From f7f6abe24d7658bcc1b83cff3a57e47d6f2c050a Mon Sep 17 00:00:00 2001 From: Bryan Petty Date: Fri, 4 Jan 2002 16:15:08 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'WX_2_2_9'. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_2_9@13364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- .cvsignore | 17 +- BuildCVS.txt | 78 +- Makefile.in | 488 +- config.guess | 878 +- config.sub | 588 +- configure | 5027 +++--- configure.in | 2333 +-- contrib/Makefile.in | 8 +- contrib/configure | 6 + contrib/configure.in | 3 + contrib/docs/.cvsignore | 5 + contrib/docs/latex/ogl/back.gif | Bin 225 -> 978 bytes contrib/docs/latex/ogl/contents.gif | Bin 231 -> 996 bytes contrib/docs/latex/ogl/forward.gif | Bin 164 -> 959 bytes contrib/docs/latex/ogl/ogl.hpj | 2 +- contrib/docs/latex/ogl/up.gif | Bin 137 -> 998 bytes contrib/include/wx/stc/stc.h | 1486 +- contrib/samples/Makefile.in | 12 +- contrib/samples/mmedia/MMboardVC.dsp | 235 + contrib/samples/mmedia/MMboardVC.dsw | 29 + contrib/samples/mmedia/Makefile.in | 33 +- contrib/samples/ogl/Makefile.in | 12 + contrib/samples/ogl/ogledit/Makefile | 39 - contrib/samples/ogl/ogledit/Makefile.in | 16 + contrib/samples/ogl/ogledit/OGLEditVC.dsp | 315 + contrib/samples/ogl/ogledit/OGLEditVC.dsw | 29 + contrib/samples/ogl/ogledit/makefile.unx | 39 +- contrib/samples/ogl/ogledit/view.cpp | 2 +- contrib/samples/ogl/studio/Makefile | 57 - contrib/samples/ogl/studio/Makefile.in | 19 + contrib/samples/ogl/studio/StudioVC.dsp | 391 + contrib/samples/ogl/studio/StudioVC.dsw | 29 + contrib/samples/ogl/studio/makefile.unx | 62 +- contrib/samples/stc/Makefile.in | 4 +- contrib/samples/stc/StcTestVC.dsp | 175 + contrib/samples/stc/StcTestVC.dsw | 29 + contrib/samples/stc/stctest.cpp | 2 +- contrib/src/Makefile.in | 4 +- contrib/src/mmedia/Makefile.in | 20 +- contrib/src/mmedia/sndwav.cpp | 8 +- contrib/src/mmedia/vidxanm.cpp | 2 + contrib/src/ogl/Makefile.in | 22 +- contrib/src/ogl/makefile.vc | 21 +- contrib/src/stc/Makefile.in | 46 +- contrib/src/stc/PlatWX.cpp | 155 +- contrib/src/stc/ScintillaWX.cpp | 86 +- contrib/src/stc/ScintillaWX.h | 10 +- contrib/src/stc/StcVC.dsp | 42 +- contrib/src/stc/gen_iface.py | 684 + contrib/src/stc/makefile.b32 | 39 +- contrib/src/stc/makefile.g95 | 12 + contrib/src/stc/makefile.vc | 13 +- contrib/src/stc/scintilla/README.txt | 4 +- contrib/src/stc/scintilla/include/Accessor.h | 80 +- contrib/src/stc/scintilla/include/KeyWords.h | 37 +- contrib/src/stc/scintilla/include/Platform.h | 47 +- contrib/src/stc/scintilla/include/PosRegExp.h | 138 + contrib/src/stc/scintilla/include/PropSet.h | 168 +- contrib/src/stc/scintilla/include/SciLexer.h | 176 +- contrib/src/stc/scintilla/include/Scintilla.h | 737 +- .../src/stc/scintilla/include/Scintilla.iface | 1452 ++ .../stc/scintilla/include/ScintillaWidget.h | 46 + contrib/src/stc/scintilla/include/WinDefs.h | 85 +- .../stc/scintilla/include/WindowAccessor.h | 47 + contrib/src/stc/scintilla/src/Accessor.cxx | 112 - .../src/stc/scintilla/src/AutoComplete.cxx | 41 +- contrib/src/stc/scintilla/src/AutoComplete.h | 18 +- contrib/src/stc/scintilla/src/CallTip.cxx | 3 +- contrib/src/stc/scintilla/src/CallTip.h | 5 +- contrib/src/stc/scintilla/src/CellBuffer.cxx | 446 +- contrib/src/stc/scintilla/src/CellBuffer.h | 70 +- .../stc/scintilla/src/ContractionState.cxx | 39 +- .../src/stc/scintilla/src/ContractionState.h | 4 +- contrib/src/stc/scintilla/src/Document.cxx | 446 +- contrib/src/stc/scintilla/src/Document.h | 53 +- .../stc/scintilla/src/DocumentAccessor.cxx | 176 + .../src/stc/scintilla/src/DocumentAccessor.h | 49 + contrib/src/stc/scintilla/src/Editor.cxx | 1425 +- contrib/src/stc/scintilla/src/Editor.h | 63 +- contrib/src/stc/scintilla/src/Indicator.cxx | 16 + contrib/src/stc/scintilla/src/KeyMap.cxx | 106 +- contrib/src/stc/scintilla/src/KeyMap.h | 13 +- contrib/src/stc/scintilla/src/KeyWords.cxx | 2212 +-- contrib/src/stc/scintilla/src/LexCPP.cxx | 262 + contrib/src/stc/scintilla/src/LexHTML.cxx | 1151 ++ contrib/src/stc/scintilla/src/LexLua.cxx | 298 + contrib/src/stc/scintilla/src/LexOthers.cxx | 351 + contrib/src/stc/scintilla/src/LexPerl.cxx | 508 + contrib/src/stc/scintilla/src/LexPython.cxx | 281 + contrib/src/stc/scintilla/src/LexSQL.cxx | 156 + contrib/src/stc/scintilla/src/LexVB.cxx | 139 + contrib/src/stc/scintilla/src/LineMarker.cxx | 20 - contrib/src/stc/scintilla/src/PosRegExp.cxx | 1181 ++ contrib/src/stc/scintilla/src/PropSet.cxx | 625 +- contrib/src/stc/scintilla/src/SVector.h | 31 +- .../src/stc/scintilla/src/ScintillaBase.cxx | 198 +- contrib/src/stc/scintilla/src/ScintillaBase.h | 15 +- contrib/src/stc/scintilla/src/Style.cxx | 86 +- contrib/src/stc/scintilla/src/Style.h | 18 +- .../src/stc/scintilla/src/UniConversion.cxx | 77 + contrib/src/stc/scintilla/src/UniConversion.h | 9 + contrib/src/stc/scintilla/src/ViewStyle.cxx | 79 +- contrib/src/stc/scintilla/src/ViewStyle.h | 19 +- .../src/stc/scintilla/src/WindowAccessor.cxx | 175 + contrib/src/stc/stc.cpp | 2381 +-- contrib/src/stc/stc.cpp.in | 523 + contrib/src/stc/stc.h.in | 297 + debian/README.Debian | 40 +- debian/changelog | 143 +- debian/control.in | 179 +- debian/copyright | 197 +- debian/libwxbase-dbg.dirs | 5 + debian/libwxbase-dbg.links | 2 + debian/libwxbase-dbg.postinst | 11 + debian/libwxbase-dbg.prerm | 7 + debian/libwxbase-dev.dirs | 2 +- debian/libwxbase-dev.docs | 3 - debian/libwxbase-dev.files | 8 +- debian/libwxbase-dev.links | 2 +- debian/libwxbase-dev.postinst | 2 +- debian/libwxbase-dev.prerm | 2 +- debian/libwxbase-msw-dev.dirs | 4 + debian/libwxbase-msw-dev.links | 2 + debian/libwxbase-msw-dev.postinst | 7 + debian/libwxbase-msw-dev.prerm | 7 + debian/libwxbase.dirs | 2 + debian/libwxbase.docs | 1 - debian/libwxbase.files | 1 - debian/libwxgtk-contrib-dev.dirs | 2 + debian/libwxgtk-contrib-dev.files | 5 + debian/libwxgtk-contrib.dirs | 2 + debian/libwxgtk-contrib.postinst | 10 + debian/libwxgtk-dbg.dirs | 5 + debian/libwxgtk-dbg.links | 2 + debian/libwxgtk-dbg.postinst | 11 + debian/libwxgtk-dbg.prerm | 7 + debian/libwxgtk-dev.dirs | 4 +- debian/libwxgtk-dev.docs | 3 - debian/libwxgtk-dev.files | 7 +- debian/libwxgtk-dev.links | 3 +- debian/libwxgtk-dev.postinst | 2 +- debian/libwxgtk-dev.prerm | 2 +- debian/libwxgtk-python.dirs | 3 +- debian/libwxgtk-python.docs | 6 +- debian/libwxgtk-python.files | 6 +- debian/libwxgtk-python.postinst | 7 +- debian/libwxgtk-python.prerm | 8 +- debian/libwxgtk.docs | 1 - debian/libwxgtk.files | 2 - debian/libwxmsw-dev.dirs | 4 + debian/libwxmsw-dev.links | 2 + debian/libwxmsw-dev.postinst | 7 + debian/libwxmsw-dev.prerm | 7 + debian/lintian-override | 5 + debian/rules | 635 +- debian/wx-config.1 | 16 +- ...win-doc.doc-base.in => wxwin-doc.doc-base} | 0 debian/wxwin-doc.docs | 2 +- debian/wxwin-examples.docs | 1 - debian/wxwin-headers-msw.dirs | 2 + debian/wxwin-headers.dirs | 3 + debian/wxwin-headers.files | 1 + debian/wxwin-i18n.dirs | 2 + debian/wxwin-i18n.files | 2 + demos/bombs/BombsVC.dsp | 223 + demos/bombs/BombsVC.dsw | 29 + demos/dbbrowse/DbbrowseVC.dsp | 351 + demos/dbbrowse/DbbrowseVC.dsw | 29 + demos/dbbrowse/browsedb.cpp | 45 +- demos/dbbrowse/browsedb.h | 32 +- demos/dbbrowse/dbbrowse.cpp | 8 +- demos/dbbrowse/dbbrowse.dsp | 156 + demos/dbbrowse/dbbrowse.dsw | 29 + demos/dbbrowse/dbgrid.cpp | 4 +- demos/dbbrowse/dbtree.cpp | 6 +- demos/dbbrowse/de/mo.cmd | 1 + demos/dbbrowse/de/mo_de.cmd | 1 + demos/dbbrowse/de/xget.cmd | 3 +- demos/dbbrowse/doc.cpp | 5 +- demos/dbbrowse/dummy.cpp | 36 + demos/dbbrowse/makefile.g95 | 2 +- demos/dbbrowse/makefile.gtk | 15 - demos/dbbrowse/pgmctrl.cpp | 3 +- demos/forty/FortyVC.dsp | 347 + demos/forty/FortyVC.dsw | 29 + demos/forty/make_cw.mcp | Bin 173926 -> 815 bytes demos/fractal/FractalVC.dsp | 175 + demos/fractal/FractalVC.dsw | 29 + demos/life/LifeVC.dsp | 235 + demos/life/LifeVC.dsw | 29 + demos/life/Makefile.in | 4 +- demos/life/bitmaps/info.bmp | Bin 0 -> 246 bytes demos/life/bitmaps/info.xpm | 24 + demos/life/bitmaps/open.bmp | Bin 0 -> 238 bytes demos/life/bitmaps/open.xpm | 26 + demos/life/bitmaps/reset.bmp | Bin 822 -> 238 bytes demos/life/bitmaps/reset.xpm | 30 +- demos/life/breeder.lif | 2523 +++ demos/life/dialogs.cpp | 27 +- demos/life/dialogs.h | 2 +- demos/life/game.cpp | 198 +- demos/life/game.h | 118 +- demos/life/life.cpp | 691 +- demos/life/life.h | 3 +- demos/life/life.rc | 3 + demos/life/makefile.b32 | 2 +- demos/life/makefile.bcc | 2 +- demos/life/makefile.dos | 2 +- demos/life/makefile.g95 | 3 +- demos/life/makefile.unx | 2 +- demos/life/makefile.vc | 2 +- demos/life/makefile.wat | 2 +- demos/life/reader.cpp | 91 + demos/life/reader.h | 58 + demos/life/samples.inc | 41 +- demos/poem/PoemVC.dsp | 179 + demos/poem/PoemVC.dsw | 29 + demos/poem/wxpoem.cpp | 12 +- difflast.pl | 13 +- distrib/msw/expdwild.bat | 15 + distrib/msw/extradoc.rsp | 3 + distrib/msw/filerepl.bat | 27 + distrib/msw/generic.rsp | 25 +- distrib/msw/innobott.txt | 40 + distrib/msw/innotop.txt | 45 + distrib/msw/jpeg.rsp | 4 +- distrib/msw/makeall.bat | 622 + distrib/msw/makefile.rsp | 63 +- distrib/msw/makeinno.bat | 71 + distrib/msw/makewise.bat | 6 +- distrib/msw/motif.rsp | 1 + distrib/msw/msw.rsp | 12 +- distrib/msw/ogl.rsp | 32 +- distrib/msw/patch.rsp | 45 +- distrib/msw/tardist | 139 +- distrib/msw/tarwxmotif | 94 + distrib/msw/tex2rtf.rsp | 10 +- distrib/msw/tiff.rsp | 4 +- distrib/msw/tmake/b32.t | 31 +- distrib/msw/tmake/base.t | 28 +- distrib/msw/tmake/filelist.t | 2 + distrib/msw/tmake/filelist.txt | 27 +- distrib/msw/tmake/g95.t | 29 +- distrib/msw/tmake/msw.t | 27 +- distrib/msw/tmake/vc.t | 62 +- distrib/msw/tmake/vc6.t | 66 +- distrib/msw/tmake/vc6base.t | 24 +- distrib/msw/tmake/vc6bdll.t | 137 + distrib/msw/tmake/vc6dll.t | 92 +- distrib/msw/tmake/vcapp.t | 348 + distrib/msw/tmake/wat.t | 62 +- distrib/msw/utilmake.rsp | 3 + distrib/msw/utils.rsp | 60 + distrib/msw/vc.rsp | 36 +- distrib/msw/vcupdate.bat | 10 + distrib/msw/wisebott.txt | 16 +- distrib/msw/wisesys.txt | 8 +- distrib/msw/wisetop.txt | 12 +- distrib/msw/wx_chm.rsp | 3 + distrib/msw/wx_htb.rsp | 3 + distrib/msw/wx_html.rsp | 2 +- distrib/msw/zipdist.bat | 106 +- distrib/msw/zipdistinno.bat | 233 + distrib/msw/zippatch.bat | 6 +- docs/base/install.txt | 61 + docs/base/todo.txt | 5 + docs/bugs.txt | 6 +- docs/changes.txt | 328 +- docs/gtk/changes.txt | 572 +- docs/gtk/install.txt | 6 +- docs/gtk/makewxgtk | 2 +- docs/gtk/readme.txt | 18 +- docs/gtk/todo.txt | 15 +- docs/html/faq.htm | 7 +- docs/html/faqgen.htm | 193 +- docs/html/faqgtk.htm | 27 +- docs/html/faqmac.htm | 196 +- docs/html/faqmot.htm | 39 +- docs/html/faqmsw.htm | 177 +- docs/html/gettext/gettext.htm | 4961 ------ docs/html/gettext/gettext_1.html | 636 + docs/html/gettext/gettext_10.html | 656 + docs/html/gettext/gettext_11.html | 164 + docs/html/gettext/gettext_12.html | 448 + docs/html/gettext/gettext_2.html | 667 + docs/html/gettext/gettext_3.html | 606 + docs/html/gettext/gettext_4.html | 337 + docs/html/gettext/gettext_5.html | 747 + docs/html/gettext/gettext_6.html | 258 + docs/html/gettext/gettext_7.html | 122 + docs/html/gettext/gettext_8.html | 896 + docs/html/gettext/gettext_9.html | 513 + docs/html/gettext/gettext_foot.html | 35 + docs/html/gettext/gettext_toc.html | 143 + docs/html/gettext/index.html | 143 + docs/html/gettext/msgfmt.htm | 222 - docs/html/gettext/xgettext.htm | 144 - docs/html/i18n.htm | 50 +- docs/html/index.htm | 48 +- docs/html/logo.gif | Bin 4656 -> 3590 bytes docs/html/makedist.htm | 129 + docs/html/news.htm | 54 +- docs/html/platform.htm | 116 +- docs/html/roadmap.htm | 6 +- docs/html/standard.htm | 63 +- docs/html/wxbook.htm | 6 +- docs/install.txt | 14 - docs/latex/wx/app.tex | 7 +- docs/latex/wx/array.tex | 17 +- docs/latex/wx/arrstrng.tex | 30 +- docs/latex/wx/back.gif | Bin 225 -> 978 bytes docs/latex/wx/bbutton.tex | 14 +- docs/latex/wx/bitmap.tex | 12 +- docs/latex/wx/body.tex | 36 +- docs/latex/wx/books.gif | Bin 242 -> 440 bytes docs/latex/wx/boxsizer.tex | 16 +- docs/latex/wx/button.tex | 8 +- docs/latex/wx/calctrl.tex | 433 +- docs/latex/wx/caret.tex | 147 + docs/latex/wx/category.tex | 58 +- docs/latex/wx/clasinfo.tex | 2 +- docs/latex/wx/classes.tex | 20 + docs/latex/wx/cmdevent.tex | 20 +- docs/latex/wx/cmdlpars.tex | 451 + docs/latex/wx/colordlg.tex | 8 +- docs/latex/wx/colour.tex | 2 +- docs/latex/wx/combobox.tex | 10 +- docs/latex/wx/conditn.tex | 11 +- docs/latex/wx/config.tex | 70 +- docs/latex/wx/contents.gif | Bin 231 -> 996 bytes docs/latex/wx/csconv.tex | 60 + docs/latex/wx/cursor.tex | 2 +- docs/latex/wx/database.tex | 9 +- docs/latex/wx/dataform.tex | 2 +- docs/latex/wx/dataobj.tex | 2 +- docs/latex/wx/datespan.tex | 15 + docs/latex/wx/datetime.tex | 1126 +- docs/latex/wx/db.tex | 1677 ++ docs/latex/wx/dc.tex | 59 +- docs/latex/wx/ddeclint.tex | 2 +- docs/latex/wx/dialevt.tex | 48 + docs/latex/wx/dialog.tex | 13 +- docs/latex/wx/dialup.tex | 215 + docs/latex/wx/dir.tex | 2 +- docs/latex/wx/dllload.tex | 145 + docs/latex/wx/dobjcomp.tex | 2 +- docs/latex/wx/dobjsmpl.tex | 2 +- docs/latex/wx/document.tex | 4 +- docs/latex/wx/dragimag.tex | 60 + docs/latex/wx/dropsrc.tex | 29 +- docs/latex/wx/droptrgt.tex | 2 +- docs/latex/wx/encconv.tex | 31 +- docs/latex/wx/event.tex | 7 - docs/latex/wx/file.tex | 23 +- docs/latex/wx/filedlg.tex | 8 +- docs/latex/wx/filetype.tex | 2 +- docs/latex/wx/flexsizr.tex | 24 + docs/latex/wx/fontenum.tex | 2 +- docs/latex/wx/forward.gif | Bin 164 -> 959 bytes docs/latex/wx/frame.tex | 26 +- docs/latex/wx/fs.tex | 53 +- docs/latex/wx/fs_mem.tex | 2 + docs/latex/wx/fsfile.tex | 4 +- docs/latex/wx/ftp.tex | 2 +- docs/latex/wx/function.tex | 300 +- docs/latex/wx/gridattr.tex | 170 + docs/latex/wx/gridedit.tex | 134 + docs/latex/wx/gridrend.tex | 50 + docs/latex/wx/gridsizr.tex | 24 + docs/latex/wx/gridtbl.tex | 236 + docs/latex/wx/gridwork.tex | 59 + docs/latex/wx/hash.tex | 5 +- docs/latex/wx/helpinst.tex | 27 +- docs/latex/wx/hteasypr.tex | 41 +- docs/latex/wx/hthelpct.tex | 5 +- docs/latex/wx/hthlpfrm.tex | 5 + docs/latex/wx/htmlcell.tex | 4 +- docs/latex/wx/htmlhand.tex | 2 +- docs/latex/wx/htmlhlpf.tex | 2 +- docs/latex/wx/htmlstrt.tex | 4 +- docs/latex/wx/htparser.tex | 6 +- docs/latex/wx/httag.tex | 2 +- docs/latex/wx/httagmod.tex | 2 +- docs/latex/wx/htwidget.tex | 2 +- docs/latex/wx/htwindow.tex | 4 +- docs/latex/wx/htwinprs.tex | 4 +- docs/latex/wx/hworld.tex | 16 +- docs/latex/wx/image.tex | 74 +- docs/latex/wx/imaglist.tex | 20 + docs/latex/wx/keyevent.tex | 24 +- docs/latex/wx/list.tex | 6 +- docs/latex/wx/listctrl.tex | 17 +- docs/latex/wx/listevt.tex | 59 +- docs/latex/wx/locale.tex | 68 +- docs/latex/wx/longlong.tex | 2 +- docs/latex/wx/manual.tex | 8 +- docs/latex/wx/mask.tex | 3 +- docs/latex/wx/mbcnvfil.tex | 49 + docs/latex/wx/mbcnvut7.tex | 38 + docs/latex/wx/mbcnvut8.tex | 59 + docs/latex/wx/mbconv.tex | 108 + docs/latex/wx/mdi.tex | 13 +- docs/latex/wx/menu.tex | 4 +- docs/latex/wx/mouseevt.tex | 20 +- docs/latex/wx/msgdlg.tex | 6 +- docs/latex/wx/mutexlck.tex | 2 +- docs/latex/wx/nbsizer.tex | 2 +- docs/latex/wx/node.tex | 2 +- docs/latex/wx/notebook.tex | 22 +- docs/latex/wx/notifevt.tex | 14 + docs/latex/wx/porting.tex | 10 +- docs/latex/wx/postscpt.tex | 12 + docs/latex/wx/print.tex | 40 +- docs/latex/wx/process.tex | 38 +- docs/latex/wx/progdlg.tex | 9 +- docs/latex/wx/proplist.tex | 4 +- docs/latex/wx/protocol.tex | 8 +- docs/latex/wx/psbox.tex | 4 +- docs/latex/wx/rect.tex | 4 +- docs/latex/wx/sashwin.tex | 5 +- docs/latex/wx/sbsizer.tex | 2 +- docs/latex/wx/scrolevt.tex | 21 +- docs/latex/wx/scrolwin.tex | 2 +- docs/latex/wx/sizer.tex | 142 +- docs/latex/wx/socket.tex | 131 +- docs/latex/wx/spinbutt.tex | 40 +- docs/latex/wx/spinctrl.tex | 2 +- docs/latex/wx/spinevt.tex | 51 + docs/latex/wx/splitevt.tex | 2 +- docs/latex/wx/splitter.tex | 11 +- docs/latex/wx/statline.tex | 4 +- docs/latex/wx/stattext.tex | 4 +- docs/latex/wx/statusbr.tex | 4 +- docs/latex/wx/stopwtch.tex | 2 +- docs/latex/wx/stream.tex | 8 +- docs/latex/wx/strmbase.tex | 10 +- docs/latex/wx/strmsock.tex | 2 +- docs/latex/wx/table.tex | 27 + docs/latex/wx/tbitmap.tex | 14 +- docs/latex/wx/tclipbrd.tex | 4 +- docs/latex/wx/tconfig.tex | 4 +- docs/latex/wx/tconstr.tex | 21 +- docs/latex/wx/tcpclint.tex | 2 +- docs/latex/wx/tdate.tex | 32 +- docs/latex/wx/tdb.tex | 2 +- docs/latex/wx/tdelwin.tex | 4 +- docs/latex/wx/tdnd.tex | 6 +- docs/latex/wx/tdocview.tex | 4 +- docs/latex/wx/tempfile.tex | 2 +- docs/latex/wx/tevent.tex | 8 +- docs/latex/wx/texpr.tex | 2 +- docs/latex/wx/text.tex | 10 +- docs/latex/wx/textfile.tex | 115 +- docs/latex/wx/tfile.tex | 8 +- docs/latex/wx/tfontenc.tex | 19 +- docs/latex/wx/tguide.tex | 2 +- docs/latex/wx/thread.tex | 12 +- docs/latex/wx/ti18n.tex | 10 +- docs/latex/wx/timer.tex | 4 +- docs/latex/wx/timespan.tex | 15 + docs/latex/wx/tipc.tex | 4 +- docs/latex/wx/tlog.tex | 14 +- docs/latex/wx/tmbconv.tex | 177 + docs/latex/wx/tnoneng.tex | 66 +- docs/latex/wx/toolbar.tex | 6 +- docs/latex/wx/tooltip.tex | 61 + docs/latex/wx/topics.tex | 2 + docs/latex/wx/treectrl.tex | 46 +- docs/latex/wx/treeevt.tex | 4 +- docs/latex/wx/tresourc.tex | 153 +- docs/latex/wx/truntime.tex | 2 +- docs/latex/wx/tsamples.tex | 80 +- docs/latex/wx/tscroll.tex | 12 +- docs/latex/wx/tstream.tex | 6 +- docs/latex/wx/tstring.tex | 12 +- docs/latex/wx/tthreads.tex | 2 +- docs/latex/wx/ttips.tex | 4 +- docs/latex/wx/ttoolbar.tex | 6 +- docs/latex/wx/ttreectl.tex | 4 +- docs/latex/wx/tunicode.tex | 28 +- docs/latex/wx/tvalidat.tex | 2 +- docs/latex/wx/txtstrm.tex | 33 +- docs/latex/wx/up.gif | Bin 137 -> 998 bytes docs/latex/wx/upduievt.tex | 3 +- docs/latex/wx/url.tex | 2 +- docs/latex/wx/validatr.tex | 2 +- docs/latex/wx/variant.tex | 3 +- docs/latex/wx/window.tex | 175 +- docs/latex/wx/wizard.tex | 124 + docs/latex/wx/wizevt.tex | 66 + docs/latex/wx/wizpage.tex | 164 + docs/latex/wx/wnddisbl.tex | 2 +- docs/latex/wx/wx.hpj | 2 +- docs/latex/wx/wxManualTemplate.dot | Bin 0 -> 19456 bytes docs/latex/wx/wxPython.tex | 130 +- docs/latex/wx/wxhtml.tex | 8 +- docs/latex/wx/wxstring.tex | 83 +- docs/latex/wx/zipstrm.tex | 7 + docs/motif/install.txt | 17 +- docs/motif/issues.txt | 20 +- docs/motif/makewxmotif | 2 +- docs/motif/readme.txt | 14 +- docs/msw/install.txt | 219 +- docs/msw/mingw32.txt | 32 - docs/msw/readme.txt | 9 +- docs/msw/todo.txt | 60 +- docs/readme.txt | 166 +- docs/tech/index.txt | 7 + docs/tech/tn0003.txt | 9 + docs/tech/tn0004.htm | 218 + docs/tech/tn0005.txt | 66 + docs/tech/tn0006.txt | 41 + docs/{msw/bc_ide.txt => tech/tn0007.txt} | 54 +- docs/tech/tn0008.htm | 144 + docs/tech/tn0009.htm | 60 + docs/tech/tn0010.htm | 282 + docs/todo.txt | 30 - include/wx/app.h | 39 +- include/wx/arrimpl.cpp | 14 +- include/wx/buffer.h | 2 + include/wx/calctrl.h | 2 + include/wx/cmdline.h | 9 +- include/wx/confbase.h | 11 +- include/wx/cursor.h | 40 +- include/wx/dataobj.h | 2 +- include/wx/date.h | 8 +- include/wx/datetime.h | 76 +- include/wx/datetime.inl | 214 +- include/wx/db.h | 235 +- include/wx/dbtable.h | 319 +- include/wx/dc.h | 31 +- include/wx/debug.h | 21 +- include/wx/defs.h | 260 +- include/wx/dialog.h | 2 +- include/wx/dialup.h | 2 +- include/wx/dirdlg.h | 2 +- include/wx/dynarray.h | 5 +- include/wx/dynlib.h | 9 +- include/wx/encconv.h | 65 +- include/wx/event.h | 47 +- include/wx/ffile.h | 7 +- include/wx/file.h | 7 +- include/wx/fileconf.h | 14 +- include/wx/filefn.h | 74 + include/wx/font.h | 57 +- include/wx/fontenc.h | 71 + include/wx/fontmap.h | 31 +- include/wx/frame.h | 4 + include/wx/fs_inet.h | 2 +- include/wx/fs_mem.h | 2 +- include/wx/fs_zip.h | 2 +- include/wx/gdicmn.h | 8 +- include/wx/generic/caret.h | 17 +- include/wx/generic/colrdlgg.h | 123 +- include/wx/generic/dcpsg.h | 6 + include/wx/generic/dirdlgg.h | 20 +- include/wx/generic/dragimgg.h | 32 +- include/wx/generic/grid.h | 97 +- include/wx/generic/helpext.h | 2 +- include/wx/generic/helphtml.h | 6 +- include/wx/generic/helpwxht.h | 2 +- include/wx/generic/helpxlp.h | 5 + include/wx/generic/imaglist.h | 24 +- include/wx/generic/laywin.h | 18 +- include/wx/generic/panelg.h | 20 +- include/wx/generic/plot.h | 6 +- include/wx/generic/sashwin.h | 24 +- include/wx/generic/splitter.h | 37 +- include/wx/generic/treectrl.h | 3 + include/wx/generic/treelay.h | 2 +- include/wx/generic/wizard.h | 20 +- include/wx/gtk/app.h | 2 + include/wx/gtk/bitmap.h | 4 +- include/wx/gtk/bmpbuttn.h | 8 + include/wx/gtk/brush.h | 4 +- include/wx/gtk/dc.h | 1 - include/wx/gtk/dialog.h | 3 + include/wx/gtk/dnd.h | 30 +- include/wx/gtk/font.h | 2 +- include/wx/gtk/mdi.h | 81 +- include/wx/gtk/pen.h | 8 +- include/wx/gtk/radiobox.h | 57 +- include/wx/gtk1/app.h | 2 + include/wx/gtk1/bitmap.h | 4 +- include/wx/gtk1/bmpbuttn.h | 8 + include/wx/gtk1/brush.h | 4 +- include/wx/gtk1/dc.h | 1 - include/wx/gtk1/dialog.h | 3 + include/wx/gtk1/dnd.h | 30 +- include/wx/gtk1/font.h | 2 +- include/wx/gtk1/mdi.h | 81 +- include/wx/gtk1/pen.h | 8 +- include/wx/gtk1/radiobox.h | 57 +- include/wx/hash.h | 17 +- include/wx/helpbase.h | 84 +- include/wx/html/forcelnk.h | 11 + include/wx/html/helpctrl.h | 1 + include/wx/html/helpdata.h | 2 +- include/wx/html/helpfrm.h | 4 +- include/wx/html/htmlcell.h | 2 +- include/wx/html/htmprint.h | 12 +- include/wx/html/msw/wfolder.ico | Bin 318 -> 318 bytes include/wx/html/winpars.h | 1 + include/wx/imagbmp.h | 23 +- include/wx/image.h | 25 +- include/wx/intl.h | 7 +- include/wx/ipcbase.h | 33 +- include/wx/list.h | 40 +- include/wx/listimpl.cpp | 8 +- include/wx/log.h | 39 +- include/wx/longlong.h | 38 +- include/wx/mac/dc.h | 2 - include/wx/mac/setup.h | 32 +- include/wx/mdi.h | 6 + include/wx/menu.h | 57 +- include/wx/module.h | 2 +- include/wx/motif/accel.h | 4 +- include/wx/motif/bitmap.h | 6 +- include/wx/motif/brush.h | 6 +- include/wx/motif/choice.h | 2 + include/wx/motif/cursor.h | 2 +- include/wx/motif/dc.h | 2 - include/wx/motif/dcmemory.h | 2 +- include/wx/motif/font.h | 2 +- include/wx/motif/icon.h | 6 +- include/wx/motif/palette.h | 6 +- include/wx/motif/pen.h | 6 +- include/wx/motif/region.h | 152 +- include/wx/msw/app.h | 3 + include/wx/msw/bitmap.h | 4 +- include/wx/msw/brush.h | 4 +- include/wx/msw/choice.h | 2 + include/wx/msw/colordlg.h | 34 +- include/wx/msw/colours.bmp | Bin 0 -> 122 bytes include/wx/msw/combobox.h | 26 +- include/wx/msw/font.h | 5 + include/wx/msw/frame.h | 5 + include/wx/msw/gccpriv.h | 77 + include/wx/msw/helpchm.h | 57 + include/wx/msw/helpwin.h | 40 +- include/wx/msw/imaglist.h | 29 +- include/wx/msw/mdi.h | 23 +- include/wx/msw/minifram.h | 60 +- include/wx/msw/notebook.h | 3 +- include/wx/msw/ole/dataobj.h | 2 +- include/wx/msw/ole/dropsrc.h | 10 + include/wx/msw/ole/oleutils.h | 18 +- include/wx/msw/palette.h | 4 +- include/wx/msw/pen.h | 4 +- include/wx/msw/private.h | 67 +- include/wx/msw/radiobox.h | 10 + include/wx/msw/radiobut.h | 3 + include/wx/msw/regconf.h | 74 +- include/wx/msw/registry.h | 21 +- include/wx/msw/settings.h | 15 +- include/wx/msw/setup0.h | 375 +- include/wx/msw/spinctrl.h | 15 +- include/wx/msw/textctrl.h | 13 + include/wx/msw/window.h | 4 + include/wx/msw/winundef.h | 26 +- include/wx/msw/wx.rc | 6 +- include/wx/object.h | 17 +- include/wx/os2/accel.h | 28 +- include/wx/os2/dc.h | 299 +- include/wx/os2/filedlg.h | 3 + include/wx/os2/frame.h | 26 + include/wx/os2/helpwin.h | 5 +- include/wx/os2/menu.h | 5 + include/wx/os2/msgdlg.h | 35 +- include/wx/os2/private.h | 1 + include/wx/os2/setup.h | 32 +- include/wx/os2/setup0.h | 32 +- include/wx/paper.h | 3 +- include/wx/prntbase.h | 14 + include/wx/process.h | 18 +- include/wx/propform.h | 107 +- include/wx/proplist.h | 141 +- include/wx/protocol/protocol.h | 10 +- include/wx/qt/dc.h | 2 - include/wx/resource.h | 8 +- include/wx/sckipc.h | 27 +- include/wx/setup.h | 39 - include/wx/sizer.h | 330 +- include/wx/statusbr.h | 2 +- include/wx/stc/stc.h | 1486 +- include/wx/strconv.h | 2 +- include/wx/string.h | 103 +- include/wx/stubs/dc.h | 2 - include/wx/stubs/setup.h | 25 +- include/wx/tbarbase.h | 20 +- include/wx/textfile.h | 22 +- include/wx/timer.h | 7 +- include/wx/treectrl.h | 3 +- include/wx/txtstrm.h | 4 +- include/wx/url.h | 16 +- include/wx/utils.h | 54 +- include/wx/version.h | 18 +- include/wx/window.h | 2 +- include/wx/wizard.h | 5 + include/wx/wxchar.h | 64 +- include/wx/wxprec.h | 4 + include/wx/zipstrm.h | 53 +- lib/{wx214.def => wx22.def} | 613 +- locale/.cvsignore | 1 + locale/Makefile | 22 +- locale/cs.po | 4242 ++--- locale/da.po | 3221 ++++ locale/de.po | 2670 +-- locale/dk.po | 1975 --- locale/es.po | 3173 ++++ locale/fi.po | 3299 ++-- locale/fr.po | 3093 ++++ locale/it.po | 3084 ++++ locale/nl.po | 3085 ++++ locale/ru.po | 3804 +++++ locale/sl.po | 3832 +++++ locale/sv.po | 3068 ++++ locale/wxstd.po | 1533 +- locale/zh.po | 3035 ++++ make-deb | 8 +- misc/afm/Zapf.afm | 1341 ++ misc/gs_afm/Cour.afm | 1204 +- misc/gs_afm/CourBo.afm | 1214 +- misc/gs_afm/CourBoO.afm | 1212 +- misc/gs_afm/CourO.afm | 1224 +- misc/gs_afm/Helv.afm | 2472 +-- misc/gs_afm/HelvBo.afm | 2452 +-- misc/gs_afm/HelvBoO.afm | 2450 +-- misc/gs_afm/HelvO.afm | 2548 +-- misc/gs_afm/TimesBo.afm | 522 +- misc/gs_afm/TimesBoO.afm | 880 +- misc/gs_afm/TimesO.afm | 2556 +-- misc/gs_afm/TimesRo.afm | 530 +- misc/gs_afm/Zapf.afm | 1341 ++ modules | 10 - samples/SamplesVC.dsw | 737 + samples/calendar/CalendarVC.dsp | 175 + samples/calendar/CalendarVC.dsw | 29 + samples/calendar/calendar.cpp | 10 +- samples/caret/CaretVC.dsp | 175 + samples/caret/CaretVC.dsw | 29 + samples/caret/caret.cpp | 31 +- samples/checklst/CheckLstVC.dsp | 175 + samples/checklst/CheckLstVC.dsw | 29 + samples/config/ConfigVC.dsp | 175 + samples/config/ConfigVC.dsw | 29 + samples/configure | 4 +- samples/configure.in | 2 +- samples/console/console.cpp | 1142 +- samples/controls/ControlsVC.dsp | 175 + samples/controls/ControlsVC.dsw | 29 + samples/controls/controls.cpp | 265 +- samples/db/DbVC.dsp | 203 + samples/db/DbVC.dsw | 29 + samples/db/dbtest.cpp | 1166 +- samples/db/dbtest.h | 38 +- samples/db/listdb.cpp | 70 +- samples/db/listdb.h | 10 +- samples/dialogs/DialogsVC.dsp | 179 + samples/dialogs/DialogsVC.dsw | 29 + samples/dialogs/dialogs.cpp | 85 +- samples/dialogs/dialogs.h | 19 +- samples/dialup/DialupVC.dsp | 175 + samples/dialup/DialupVC.dsw | 29 + samples/dnd/DndVC.dsp | 175 + samples/dnd/DndVC.dsw | 29 + samples/dnd/dnd.cpp | 22 +- samples/dnd/dnd.rc | 3 + samples/dnd/dnd_copy.cur | Bin 0 -> 326 bytes samples/dnd/dnd_copy.xpm | 45 + samples/dnd/dnd_move.cur | Bin 0 -> 326 bytes samples/dnd/dnd_move.xpm | 44 + samples/dnd/dnd_none.cur | Bin 0 -> 326 bytes samples/dnd/dnd_none.xpm | 45 + samples/docview/DocViewVC.dsp | 227 + samples/docview/DocViewVC.dsw | 29 + samples/docview/doc.cpp | 444 +- samples/docview/doc.h | 110 +- samples/docview/docview.cpp | 338 +- samples/docview/docview.h | 36 +- samples/docview/view.cpp | 304 +- samples/docview/view.h | 68 +- samples/docvwmdi/DocVwMDIVC.dsp | 227 + samples/docvwmdi/DocVwMDIVC.dsw | 29 + samples/docvwmdi/docview.cpp | 8 +- samples/dragimag/DragimagVC.dsp | 179 + samples/dragimag/DragimagVC.dsw | 29 + samples/dragimag/Makefile.in | 1 + samples/dragimag/makefile.g95 | 2 +- samples/drawing/DrawingVC.dsp | 175 + samples/drawing/DrawingVC.dsw | 29 + samples/drawing/drawing.cpp | 186 +- samples/dynamic/DynamicVC.dsp | 175 + samples/dynamic/DynamicVC.dsw | 29 + samples/exec/ExecVC.dsp | 175 + samples/exec/ExecVC.dsw | 29 + samples/exec/exec.cpp | 258 +- samples/exec/makefile.g95 | 2 +- samples/font/FontVC.dsp | 175 + samples/font/FontVC.dsw | 29 + samples/font/font.cpp | 53 +- samples/grid/GridVC.dsp | 175 + samples/grid/GridVC.dsw | 29 + samples/grid/grid.cpp | 5 - samples/grid/makefile.g95 | 2 +- samples/help/HelpVC.dsp | 175 + samples/help/HelpVC.dsw | 29 + samples/help/Makefile.in | 23 +- samples/help/back.gif | Bin 225 -> 978 bytes samples/help/contents.gif | Bin 231 -> 996 bytes samples/help/demo.cpp | 149 +- samples/help/doc.chm | Bin 0 -> 8845 bytes samples/help/doc.hhc | 35 + samples/help/doc.hhk | 31 + samples/help/doc.hhp | 27 + samples/help/doc.zip | Bin 5136 -> 5468 bytes samples/help/doc/gifs.db | 0 samples/help/forward.gif | Bin 164 -> 959 bytes samples/help/makefile.b32 | 1 + samples/help/makefile.vc | 1 + samples/help/up.gif | Bin 137 -> 998 bytes samples/html/Makefile.in | 32 +- samples/html/about/AboutVC.dsp | 175 + samples/html/about/AboutVC.dsw | 29 + samples/html/help/HelpVC.dsp | 175 + samples/html/help/HelpVC.dsw | 29 + samples/html/helpview/HelpViewVC.dsp | 175 + samples/html/helpview/HelpViewVC.dsw | 29 + samples/html/printing/PrintingVC.dsp | 175 + samples/html/printing/PrintingVC.dsw | 29 + samples/html/test/TestVC.dsp | 175 + samples/html/test/TestVC.dsw | 29 + samples/html/virtual/VirtualVC.dsp | 175 + samples/html/virtual/VirtualVC.dsw | 29 + samples/html/widget/WidgetVC.dsp | 175 + samples/html/widget/WidgetVC.dsw | 29 + samples/html/zip/ZipVC.dsp | 175 + samples/html/zip/ZipVC.dsw | 29 + samples/image/ImageVC.dsp | 175 + samples/image/ImageVC.dsw | 29 + samples/image/image.cpp | 27 +- samples/internat/InternatVC.dsp | 175 + samples/internat/InternatVC.dsw | 29 + samples/internat/Makefile.in | 10 +- samples/internat/internat.cpp | 34 +- samples/internat/ru/internat.mo | Bin 0 -> 1618 bytes samples/internat/ru/internat.po | 81 + samples/internat/ru/wxstd.mo | Bin 0 -> 2461 bytes samples/internat/ru/wxstd.po | 127 + samples/ipc/ClientVC.dsp | 183 + samples/ipc/ClientVC.dsw | 29 + samples/ipc/Makefile.in | 6 +- samples/ipc/ServerVC.dsp | 183 + samples/ipc/ServerVC.dsw | 29 + samples/ipc/client.cpp | 13 +- samples/ipc/server.cpp | 19 +- samples/ipc/server.h | 3 +- samples/joytest/JoytestVC.dsp | 179 + samples/joytest/JoytestVC.dsw | 29 + samples/joytest/Makefile.in | 14 +- samples/joytest/joytest.cpp | 8 +- samples/joytest/joytest.h | 2 + samples/joytest/makefile.g95 | 2 +- samples/layout/LayoutVC.dsp | 179 + samples/layout/LayoutVC.dsw | 29 + samples/layout/layout.cpp | 18 +- samples/listctrl/ListctrlVC.dsp | 179 + samples/listctrl/ListctrlVC.dsw | 29 + samples/listctrl/listtest.cpp | 37 +- samples/listctrl/listtest.h | 3 + samples/makefile.g95 | 33 +- samples/makefile.vc | 2 +- samples/mdi/MdiVC.dsp | 179 + samples/mdi/MdiVC.dsw | 29 + samples/mdi/mdi.cpp | 83 +- samples/mdi/mdi.h | 10 + samples/memcheck/MemcheckVC.dsp | 175 + samples/memcheck/MemcheckVC.dsw | 29 + samples/menu/MenuVC.dsp | 175 + samples/menu/MenuVC.dsw | 29 + samples/menu/menu.cpp | 104 +- samples/mfc/MfcVC.dsp | 179 + src/xpm/xpm.dsw => samples/mfc/MfcVC.dsw | 2 +- samples/mfc/mfctest.cpp | 7 +- samples/minifram/MiniframVC.dsp | 179 + samples/minifram/MiniframVC.dsw | 29 + samples/minifram/makefile.g95 | 2 +- samples/minimal/MinimalVC.dsp | 175 + samples/minimal/MinimalVC.dsw | 29 + samples/minimal/makefile.va | 4 +- samples/minimal/minimal.cpp | 6 +- samples/minimal/minimal.rc4 | 6 + samples/nativdlg/NativdlgVC.dsp | 183 + samples/nativdlg/NativdlgVC.dsw | 29 + samples/nativdlg/dialog1.rc | 4 + samples/newgrid/griddemo.cpp | 33 +- samples/newgrid/griddemo.h | 4 + samples/notebook/makefile.g95 | 2 +- samples/notebook/notebook.cpp | 19 +- samples/oleauto/oleauto.cpp | 4 + samples/opengl/Makefile.in | 12 +- samples/opengl/cube/Makefile.in | 2 +- samples/opengl/cube/cube.cpp | 2 +- samples/opengl/isosurf/Makefile.in | 2 +- samples/opengl/penguin/Makefile.in | 2 +- samples/ownerdrw/OwnerdrwVC.dsp | 175 + samples/ownerdrw/OwnerdrwVC.dsw | 29 + samples/plot/PlotVC.dsp | 175 + samples/plot/PlotVC.dsw | 29 + samples/png/PngVC.dsp | 179 + samples/png/PngVC.dsw | 29 + samples/printing/PrintingVC.dsp | 179 + samples/printing/PrintingVC.dsw | 29 + samples/printing/printing.cpp | 13 +- samples/proplist/ProplistVC.dsp | 179 + samples/proplist/ProplistVC.dsw | 29 + samples/proplist/makefile.g95 | 2 +- samples/proplist/proplist.cpp | 3 +- samples/proplist/proplist.h | 3 +- samples/propsize/PropsizeVC.dsp | 175 + samples/propsize/PropsizeVC.dsw | 29 + samples/propsize/makefile.g95 | 2 +- samples/regtest/RegtestVC.dsp | 175 + samples/regtest/RegtestVC.dsw | 29 + samples/regtest/regtest.cpp | 24 +- samples/resource/ResourceVC.dsp | 179 + samples/resource/ResourceVC.dsw | 29 + samples/resource/dialog1.wxr | 18 +- samples/resource/resource.cpp | 2 + samples/richedit/README | 8 + samples/richedit/RichEditVC.dsp | 255 + samples/richedit/RichEditVC.dsw | 29 + samples/richedit/wxllist.cpp | 311 +- samples/richedit/wxllist.h | 66 +- samples/richedit/wxlwindow.cpp | 113 +- samples/richedit/wxlwindow.h | 13 +- samples/rotate/RotateVC.dsp | 175 + samples/rotate/RotateVC.dsw | 29 + samples/rotate/rotate.cpp | 49 +- samples/sashtest/SashtestVC.dsp | 179 + samples/sashtest/SashtestVC.dsw | 29 + samples/sashtest/makefile.g95 | 2 +- samples/sashtest/sashtest.cpp | 3 +- samples/scroll/ScrollVC.dsp | 175 + samples/scroll/ScrollVC.dsw | 29 + samples/scroll/scroll.cpp | 9 +- samples/scrollsub/ScrollsubVC.dsp | 175 + samples/scrollsub/ScrollsubVC.dsw | 29 + samples/scrollsub/scrollsub.cpp | 13 +- samples/sockets/ClientVC.dsp | 175 + samples/sockets/ClientVC.dsw | 29 + samples/sockets/Makefile.in | 6 +- samples/sockets/ServerVC.dsp | 175 + samples/sockets/ServerVC.dsw | 29 + samples/splitter/SplitterVC.dsp | 175 + samples/splitter/SplitterVC.dsw | 29 + samples/splitter/makefile.g95 | 2 +- samples/splitter/splitter.cpp | 10 +- samples/statbar/StatbarVC.dsp | 175 + samples/statbar/StatbarVC.dsw | 29 + samples/statbar/makefile.g95 | 2 +- samples/statbar/statbar.cpp | 87 +- samples/stc/Makefile.in | 4 +- samples/stc/StcTestVC.dsp | 175 + samples/stc/StcTestVC.dsw | 29 + samples/stc/stctest.cpp | 2 +- samples/tab/TabVC.dsp | 179 + samples/tab/TabVC.dsw | 29 + samples/tab/makefile.g95 | 2 +- samples/taskbar/TaskbarVC.dsp | 179 + samples/taskbar/TaskbarVC.dsw | 29 + samples/taskbar/tbtest.cpp | 5 + samples/text/TextVC.dsp | 175 + samples/text/TextVC.dsw | 29 + samples/text/makefile.b32 | 11 +- samples/text/makefile.bcc | 2 +- samples/text/makefile.wat | 2 +- samples/text/text.cpp | 140 +- samples/thread/ThreadVC.dsp | 175 + samples/thread/ThreadVC.dsw | 29 + samples/thread/makefile.g95 | 2 +- samples/thread/thread.cpp | 5 - samples/toolbar/ToolbarVC.dsp | 175 + samples/toolbar/ToolbarVC.dsw | 29 + samples/toolbar/makefile.g95 | 2 +- samples/toolbar/toolbar.cpp | 102 +- samples/treectrl/TreectrlVC.dsp | 197 + samples/treectrl/TreectrlVC.dsw | 29 + samples/treectrl/makefile.g95 | 2 +- samples/treectrl/treectrl.cpp | 82 +- samples/treelay/TreelayVC.dsp | 179 + samples/treelay/TreelayVC.dsw | 29 + samples/treelay/makefile.g95 | 2 +- samples/typetest/TypetestVC.dsp | 179 + samples/typetest/TypetestVC.dsw | 29 + samples/typetest/makefile.g95 | 2 +- samples/typetest/typetest.cpp | 268 +- samples/typetest/typetest.h | 2 + samples/validate/ValidateVC.dsp | 179 + samples/validate/ValidateVC.dsw | 29 + samples/validate/makefile.g95 | 2 +- samples/wizard/WizardVC.dsp | 174 + samples/wizard/WizardVC.dsw | 29 + samples/wizard/makefile.g95 | 2 +- samples/wizard/wizard.cpp | 13 +- setup.h.in | 39 +- setup.h_vms | 4 + src/Wxwindll.icc | 6 +- src/common/base.rc | 49 + src/common/cmdline.cpp | 95 +- src/common/cmndata.cpp | 18 +- src/common/config.cpp | 42 +- src/common/datetime.cpp | 286 +- src/common/db.cpp | 1468 +- src/common/dbtable.cpp | 1176 +- src/common/dlgcmn.cpp | 2 + src/common/docmdi.cpp | 14 +- src/common/docview.cpp | 113 +- src/common/dynarray.cpp | 2 - src/common/dynlib.cpp | 105 +- src/common/encconv.cpp | 270 +- src/common/event.cpp | 15 +- src/common/file.cpp | 116 +- src/common/fileconf.cpp | 89 +- src/common/filefn.cpp | 311 +- src/common/filesys.cpp | 29 +- src/common/fontcmn.cpp | 16 +- src/common/fontmap.cpp | 306 +- src/common/framecmn.cpp | 62 +- src/common/fs_inet.cpp | 23 +- src/common/fs_mem.cpp | 6 +- src/common/fs_zip.cpp | 52 +- src/common/ftp.cpp | 26 +- src/common/gdicmn.cpp | 367 +- src/common/gifdecod.cpp | 2 +- src/common/hash.cpp | 23 +- src/common/http.cpp | 7 +- src/common/imagbmp.cpp | 122 +- src/common/image.cpp | 256 +- src/common/imagjpeg.cpp | 19 +- src/common/imagpng.cpp | 11 +- src/common/imagtiff.cpp | 123 +- src/common/init.cpp | 2 +- src/common/intl.cpp | 156 +- src/common/layout.cpp | 28 +- src/common/list.cpp | 3 +- src/common/log.cpp | 147 +- src/common/memory.cpp | 16 +- src/common/menucmn.cpp | 22 +- src/common/mimecmn.cpp | 15 +- src/common/object.cpp | 26 +- src/common/paper.cpp | 90 +- src/common/parser.y | 13 +- src/common/prntbase.cpp | 8 +- src/common/process.cpp | 19 +- src/common/resource.cpp | 5242 +++--- src/common/sckaddr.cpp | 4 +- src/common/sckfile.cpp | 4 + src/common/sckipc.cpp | 49 +- src/common/sizer.cpp | 680 +- src/common/socket.cpp | 33 +- src/common/strconv.cpp | 234 +- src/common/stream.cpp | 28 +- src/common/string.cpp | 112 +- src/common/textcmn.cpp | 2 +- src/common/textfile.cpp | 21 +- src/common/timercmn.cpp | 46 +- src/common/txtstrm.cpp | 70 +- src/common/unzip.c | 16 +- src/common/url.cpp | 97 +- src/common/utilscmn.cpp | 106 +- src/common/valgen.cpp | 268 +- src/common/valtext.cpp | 10 +- src/common/variant.cpp | 39 +- src/common/wfstream.cpp | 217 +- src/common/wincmn.cpp | 97 +- src/common/wxchar.cpp | 18 +- src/common/wxexpr.cpp | 28 +- src/common/zipstrm.cpp | 25 +- src/common/zstream.cpp | 21 +- src/files.lst | 116 +- src/generic/calctrl.cpp | 23 +- src/generic/caret.cpp | 71 +- src/generic/choicdgg.cpp | 21 +- src/generic/colrdlgg.cpp | 23 +- src/generic/dcpsg.cpp | 420 +- src/generic/dirdlgg.cpp | 138 +- src/generic/dragimgg.cpp | 82 +- src/generic/filedlgg.cpp | 23 +- src/generic/grid.cpp | 1769 +- src/generic/gridsel.cpp | 73 +- src/generic/helpext.cpp | 4 +- src/generic/helphtml.cpp | 12 +- src/generic/helpwxht.cpp | 17 +- src/generic/imaglist.cpp | 21 +- src/generic/laywin.cpp | 33 +- src/generic/listctrl.cpp | 782 +- src/generic/logg.cpp | 491 +- src/generic/msgdlgg.cpp | 4 - src/generic/notebook.cpp | 4 +- src/generic/numdlgg.cpp | 5 +- src/generic/panelg.cpp | 52 +- src/generic/printps.cpp | 44 +- src/generic/progdlgg.cpp | 10 +- src/generic/prop.cpp | 2 +- src/generic/propform.cpp | 914 +- src/generic/proplist.cpp | 8 +- src/generic/sashwin.cpp | 49 +- src/generic/scrolwin.cpp | 16 +- src/generic/splitter.cpp | 182 +- src/generic/statusbr.cpp | 8 + src/generic/treectrl.cpp | 155 +- src/generic/treelay.cpp | 20 +- src/generic/wizard.cpp | 103 +- src/gtk/app.cpp | 128 +- src/gtk/bitmap.cpp | 26 +- src/gtk/bmpbuttn.cpp | 142 +- src/gtk/brush.cpp | 4 +- src/gtk/button.cpp | 3 +- src/gtk/clipbrd.cpp | 8 +- src/gtk/colour.cpp | 98 +- src/gtk/combobox.cpp | 14 +- src/gtk/cursor.cpp | 17 +- src/gtk/data.cpp | 6 - src/gtk/dcclient.cpp | 137 +- src/gtk/dialog.cpp | 55 +- src/gtk/dnd.cpp | 125 +- src/gtk/files.lst | 7 +- src/gtk/font.cpp | 4 +- src/gtk/frame.cpp | 109 +- src/gtk/gauge.cpp | 2 + src/gtk/glcanvas.cpp | 6 + src/gtk/joystick.cpp | 9 +- src/gtk/listbox.cpp | 148 +- src/gtk/mdi.cpp | 171 +- src/gtk/menu.cpp | 172 +- src/gtk/notebook.cpp | 8 +- src/gtk/pen.cpp | 4 +- src/gtk/radiobox.cpp | 77 +- src/gtk/radiobut.cpp | 54 +- src/gtk/scrolbar.cpp | 12 +- src/gtk/settings.cpp | 102 +- src/gtk/slider.cpp | 13 +- src/gtk/spinctrl.cpp | 37 +- src/gtk/statline.cpp | 26 +- src/gtk/tbargtk.cpp | 7 +- src/gtk/textctrl.cpp | 132 +- src/gtk/threadpsx.cpp | 758 - src/gtk/tooltip.cpp | 6 +- src/gtk/win_gtk.c | 180 +- src/gtk/window.cpp | 476 +- src/gtk1/app.cpp | 128 +- src/gtk1/bitmap.cpp | 26 +- src/gtk1/bmpbuttn.cpp | 142 +- src/gtk1/brush.cpp | 4 +- src/gtk1/button.cpp | 3 +- src/gtk1/clipbrd.cpp | 8 +- src/gtk1/colour.cpp | 98 +- src/gtk1/combobox.cpp | 14 +- src/gtk1/cursor.cpp | 17 +- src/gtk1/data.cpp | 6 - src/gtk1/dcclient.cpp | 137 +- src/gtk1/dialog.cpp | 55 +- src/gtk1/dnd.cpp | 125 +- src/gtk1/files.lst | 7 +- src/gtk1/font.cpp | 4 +- src/gtk1/frame.cpp | 109 +- src/gtk1/gauge.cpp | 2 + src/gtk1/glcanvas.cpp | 6 + src/gtk1/joystick.cpp | 9 +- src/gtk1/listbox.cpp | 148 +- src/gtk1/mdi.cpp | 171 +- src/gtk1/menu.cpp | 172 +- src/gtk1/notebook.cpp | 8 +- src/gtk1/pen.cpp | 4 +- src/gtk1/radiobox.cpp | 77 +- src/gtk1/radiobut.cpp | 54 +- src/gtk1/scrolbar.cpp | 12 +- src/gtk1/settings.cpp | 102 +- src/gtk1/slider.cpp | 13 +- src/gtk1/spinctrl.cpp | 37 +- src/gtk1/statline.cpp | 26 +- src/gtk1/tbargtk.cpp | 7 +- src/gtk1/textctrl.cpp | 132 +- src/gtk1/threadpsx.cpp | 758 - src/gtk1/tooltip.cpp | 6 +- src/gtk1/win_gtk.c | 180 +- src/gtk1/window.cpp | 476 +- src/html/helpctrl.cpp | 16 +- src/html/helpdata.cpp | 131 +- src/html/helpfrm.cpp | 227 +- src/html/htmlcell.cpp | 163 +- src/html/htmlfilt.cpp | 6 +- src/html/htmlfilter.cpp | 173 - src/html/htmlhelp.cpp | 835 - src/html/htmlpars.cpp | 14 +- src/html/htmltag.cpp | 71 +- src/html/htmlwin.cpp | 30 +- src/html/htmprint.cpp | 62 +- src/html/m_dflist.cpp | 2 +- src/html/m_fonts.cpp | 2 +- src/html/m_hline.cpp | 5 +- src/html/m_image.cpp | 52 +- src/html/m_layout.cpp | 2 +- src/html/m_links.cpp | 2 +- src/html/m_list.cpp | 3 +- src/html/m_meta.cpp | 2 +- src/html/m_pre.cpp | 2 +- src/html/m_tables.cpp | 124 +- src/html/search.cpp | 74 - src/html/winpars.cpp | 27 +- src/jpeg/{jpeg.dsp => JpegVC.dsp} | 0 src/jpeg/{jpeg.dsw => JpegVC.dsw} | 2 +- src/jpeg/jconfig.h | 2 + src/jpeg/jmorecfg.h | 31 +- src/jpeg/makefile.vc | 4 +- src/jpeg/makefile.wat | 190 +- src/mac/app.cpp | 21 + src/mac/carbon/app.cpp | 21 + src/make.env.in | 29 +- src/makeb32.env | 9 +- src/makeenvs/linux.env | 122 - src/makeenvs/sgi.env | 119 - src/makeenvs/solaris.env | 122 - src/makeg95.env | 6 +- src/makelib.b32 | 2 +- src/makelib.env.in | 94 +- src/makelib.g95 | 7 +- src/makelib.vc | 5 +- src/makeprog.b32 | 6 +- src/makeprog.env.in | 30 +- src/makeprog.g95 | 4 +- src/makeprog.wat | 4 +- src/makeva.env | 6 +- src/makevc.env | 28 +- src/makewat.env | 8 +- src/motif/app.cpp | 20 + src/motif/choice.cpp | 96 +- src/motif/combobox.cpp | 35 +- src/motif/control.cpp | 2 +- src/motif/dcclient.cpp | 2 +- src/motif/dialog.cpp | 14 + src/motif/files.lst | 7 +- src/motif/glcanvas.cpp | 144 +- src/motif/radiobox.cpp | 11 +- src/motif/radiobut.cpp | 11 +- src/motif/slider.cpp | 1 + src/motif/textctrl.cpp | 2 +- src/motif/window.cpp | 11 +- src/motif/xmcombo/xmcombo.c | 6 +- src/msw/accel.cpp | 13 +- src/msw/app.cpp | 127 +- src/msw/bitmap.cpp | 39 +- src/msw/bmpbuttn.cpp | 39 +- src/msw/button.cpp | 32 +- src/msw/caret.cpp | 6 +- src/msw/checkbox.cpp | 36 +- src/msw/choice.cpp | 61 +- src/msw/clipbrd.cpp | 14 +- src/msw/colordlg.cpp | 158 +- src/msw/combobox.cpp | 406 +- src/msw/control.cpp | 18 +- src/msw/curico.cpp | 4 +- src/msw/data.cpp | 29 +- src/msw/dc.cpp | 415 +- src/msw/dcclient.cpp | 2 +- src/msw/dcmemory.cpp | 5 +- src/msw/dcprint.cpp | 17 +- src/msw/dde.cpp | 26 +- src/msw/dialog.cpp | 111 +- src/msw/dialup.cpp | 70 +- src/msw/dib.cpp | 4 +- src/msw/dibutils.cpp | 2 +- src/msw/dirdlg.cpp | 13 +- src/msw/dragimag.cpp | 2 +- src/msw/filedlg.cpp | 157 +- src/msw/files.lst | 41 +- src/msw/font.cpp | 26 +- src/msw/fontenum.cpp | 53 +- src/msw/fontutil.cpp | 120 +- src/msw/frame.cpp | 257 +- src/msw/gauge95.cpp | 71 +- src/msw/gaugemsw.cpp | 8 +- src/msw/gdiimage.cpp | 61 +- src/msw/glcanvas.cpp | 37 +- src/msw/gsocket.c | 5 +- src/msw/gsockmsw.c | 9 +- src/msw/helpchm.cpp | 152 + src/msw/helpwin.cpp | 129 +- src/msw/icon.cpp | 16 +- src/msw/imaglist.cpp | 64 +- src/msw/iniconf.cpp | 25 +- src/msw/listbox.cpp | 55 +- src/msw/listctrl.cpp | 201 +- src/msw/makefile.b32 | 27 +- src/msw/makefile.bcc | 2 +- src/msw/makefile.dos | 2 +- src/msw/makefile.g95 | 32 +- src/msw/makefile.sc | 3 +- src/msw/makefile.vc | 65 +- src/msw/makefile.wat | 131 +- src/msw/mdi.cpp | 118 +- src/msw/menu.cpp | 105 +- src/msw/menuitem.cpp | 6 +- src/msw/metafile.cpp | 8 +- src/msw/mimetype.cpp | 40 +- src/msw/nativdlg.cpp | 8 +- src/msw/ole/automtn.cpp | 34 +- src/msw/ole/dataobj.cpp | 83 +- src/msw/ole/dropsrc.cpp | 5 +- src/msw/ole/droptgt.cpp | 18 +- src/msw/ole/oleutils.cpp | 24 +- src/msw/ole/uuid.cpp | 3 +- src/msw/printdlg.cpp | 32 +- src/msw/printwin.cpp | 32 +- src/msw/radiobox.cpp | 366 +- src/msw/radiobut.cpp | 42 +- src/msw/regconf.cpp | 396 +- src/msw/registry.cpp | 105 +- src/msw/settings.cpp | 105 +- src/msw/slider95.cpp | 1 + src/msw/slidrmsw.cpp | 4 +- src/msw/spinbutt.cpp | 7 +- src/msw/spinctrl.cpp | 73 +- src/msw/statbmp.cpp | 2 +- src/msw/statbr95.cpp | 22 +- src/msw/statline.cpp | 22 +- src/msw/stattext.cpp | 4 +- src/msw/tabctrl.cpp | 2 +- src/msw/taskbar.cpp | 6 + src/msw/tbar95.cpp | 235 +- src/msw/textctrl.cpp | 225 +- src/msw/thread.cpp | 197 +- src/msw/tooltip.cpp | 28 +- src/msw/treectrl.cpp | 146 +- src/msw/utils.cpp | 46 +- src/msw/utilsexc.cpp | 397 +- src/msw/version.rc | 59 + src/msw/window.cpp | 574 +- src/msw/xpmhand.cpp | 11 +- src/os2/accel.cpp | 145 +- src/os2/app.cpp | 82 +- src/os2/data.cpp | 6 - src/os2/dc.cpp | 191 +- src/os2/dcclient.cpp | 32 +- src/os2/dcmemory.cpp | 6 +- src/os2/dir.cpp | 2 - src/os2/font.cpp | 197 +- src/os2/frame.cpp | 714 +- src/os2/gdiimage.cpp | 2 + src/os2/gsocket.c | 9 - src/os2/makefile.va | 12 +- src/os2/mdi.cpp | 2 +- src/os2/menu.cpp | 167 +- src/os2/menuitem.cpp | 8 +- src/os2/metafile.cpp | 4 +- src/os2/msgdlg.cpp | 108 +- src/os2/thread.cpp | 4 + src/os2/utils.cpp | 2 - src/os2/utilsexc.cpp | 2 - src/os2/window.cpp | 110 +- src/png/{png.dsp => PngVC.dsp} | 6 +- src/{tiff/tiff.dsw => png/PngVC.dsw} | 2 +- src/png/makefile.nt | 68 - src/png/makefile.vc | 10 +- src/regex/COPYRIGHT | 20 - src/regex/Makefile | 130 - src/regex/README | 32 - src/regex/WHATSNEW | 108 - src/regex/cclass.h | 31 - src/regex/cname.h | 102 - src/regex/engine.ih | 35 - src/regex/mkh | 76 - src/regex/re_syntax.n | 970 -- src/regex/regc_color.c | 780 - src/regex/regc_lex.c | 1146 -- src/regex/regc_nfa.c | 1559 -- src/regex/regcomp.ih | 51 - src/regex/rege_dfa.c | 699 - src/regex/regerror.c | 109 - src/regex/regerror.ih | 12 - src/regex/regerrs.h | 75 - src/regex/regex.3 | 509 - src/regex/regex.7 | 235 - src/regex/regex.h | 202 - src/regex/regexec.c | 1038 -- src/regex/regfree.c | 53 - src/regex/regfronts.c | 83 - src/regex/regguts.h | 417 - src/regex/tests | 477 - src/stc/Makefile.in | 46 +- src/stc/PlatWX.cpp | 155 +- src/stc/ScintillaWX.cpp | 86 +- src/stc/ScintillaWX.h | 10 +- src/stc/StcVC.dsp | 42 +- src/stc/gen_iface.py | 684 + src/stc/makefile.b32 | 39 +- src/stc/makefile.g95 | 12 + src/stc/makefile.vc | 13 +- src/stc/scintilla/README.txt | 4 +- src/stc/scintilla/include/Accessor.h | 80 +- src/stc/scintilla/include/KeyWords.h | 37 +- src/stc/scintilla/include/Platform.h | 47 +- src/stc/scintilla/include/PosRegExp.h | 138 + src/stc/scintilla/include/PropSet.h | 168 +- src/stc/scintilla/include/SciLexer.h | 176 +- src/stc/scintilla/include/Scintilla.h | 737 +- src/stc/scintilla/include/Scintilla.iface | 1452 ++ src/stc/scintilla/include/ScintillaWidget.h | 46 + src/stc/scintilla/include/WinDefs.h | 85 +- src/stc/scintilla/include/WindowAccessor.h | 47 + src/stc/scintilla/src/Accessor.cxx | 112 - src/stc/scintilla/src/AutoComplete.cxx | 41 +- src/stc/scintilla/src/AutoComplete.h | 18 +- src/stc/scintilla/src/CallTip.cxx | 3 +- src/stc/scintilla/src/CallTip.h | 5 +- src/stc/scintilla/src/CellBuffer.cxx | 446 +- src/stc/scintilla/src/CellBuffer.h | 70 +- src/stc/scintilla/src/ContractionState.cxx | 39 +- src/stc/scintilla/src/ContractionState.h | 4 +- src/stc/scintilla/src/Document.cxx | 446 +- src/stc/scintilla/src/Document.h | 53 +- src/stc/scintilla/src/DocumentAccessor.cxx | 176 + src/stc/scintilla/src/DocumentAccessor.h | 49 + src/stc/scintilla/src/Editor.cxx | 1425 +- src/stc/scintilla/src/Editor.h | 63 +- src/stc/scintilla/src/Indicator.cxx | 16 + src/stc/scintilla/src/KeyMap.cxx | 106 +- src/stc/scintilla/src/KeyMap.h | 13 +- src/stc/scintilla/src/KeyWords.cxx | 2212 +-- src/stc/scintilla/src/LexCPP.cxx | 262 + src/stc/scintilla/src/LexHTML.cxx | 1151 ++ src/stc/scintilla/src/LexLua.cxx | 298 + src/stc/scintilla/src/LexOthers.cxx | 351 + src/stc/scintilla/src/LexPerl.cxx | 508 + src/stc/scintilla/src/LexPython.cxx | 281 + src/stc/scintilla/src/LexSQL.cxx | 156 + src/stc/scintilla/src/LexVB.cxx | 139 + src/stc/scintilla/src/LineMarker.cxx | 20 - src/stc/scintilla/src/PosRegExp.cxx | 1181 ++ src/stc/scintilla/src/PropSet.cxx | 625 +- src/stc/scintilla/src/SVector.h | 31 +- src/stc/scintilla/src/ScintillaBase.cxx | 198 +- src/stc/scintilla/src/ScintillaBase.h | 15 +- src/stc/scintilla/src/Style.cxx | 86 +- src/stc/scintilla/src/Style.h | 18 +- src/stc/scintilla/src/UniConversion.cxx | 77 + src/stc/scintilla/src/UniConversion.h | 9 + src/stc/scintilla/src/ViewStyle.cxx | 79 +- src/stc/scintilla/src/ViewStyle.h | 19 +- src/stc/scintilla/src/WindowAccessor.cxx | 175 + src/stc/stc.cpp | 2381 +-- src/stc/stc.cpp.in | 523 + src/stc/stc.h.in | 297 + src/tiff/{tiff.dsp => TiffVC.dsp} | 0 src/tiff/TiffVC.dsw | 29 + src/tiff/makefile.vc | 51 +- src/tiff/makefile.wat | 141 + src/tiff/tif_lzw.c | 5 + src/tiff/tif_pixarlog.c | 6 + src/tiff/tif_predict.c | 5 + src/tiff/tif_zip.c | 6 + src/unix/dialup.cpp | 562 +- src/unix/fontutil.cpp | 1 + src/unix/gsocket.c | 5 +- src/unix/mimetype.cpp | 148 +- src/unix/net.cpp | 422 - src/unix/utilsunx.cpp | 61 +- src/wxWin.icc | 2 + src/wxvc.dsp | 12 + src/wxvc.dsw | 10 +- src/wxvc_dll.dsp | 110 +- src/xpm/{attrib.c => Attrib.c} | 2 +- src/xpm/{crbuffri.c => CrBufFrI.c} | 0 src/xpm/{crdatfri.c => CrDatFrI.c} | 0 src/xpm/{crifrbuf.c => CrIFrBuf.c} | 0 src/xpm/{crifrdat.c => CrIFrDat.c} | 0 src/xpm/{image.c => Image.c} | 0 src/xpm/{info.c => Info.c} | 0 src/xpm/{rdftodat.c => RdFToDat.c} | 0 src/xpm/{rdftoi.c => RdFToI.c} | 3 +- src/xpm/{wrffrdat.c => WrFFrDat.c} | 0 src/xpm/{wrffri.c => WrFFrI.c} | 0 src/xpm/{xpmi.h => XpmI.h} | 0 src/xpm/XpmVC.dsp | 186 + src/{png/png.dsw => xpm/XpmVC.dsw} | 2 +- src/xpm/makefile.b32 | 7 + src/xpm/makefile.vc | 2 + src/xpm/scan.c | 4 +- src/xpm/simx.c | 2 +- src/xpm/xpm.dsp | 8 +- src/zlib/{zlib.dsp => ZlibVC.dsp} | 0 src/zlib/ZlibVC.dsw | 29 + src/zlib/makefile.vc | 5 + src/zlib/makefile.wat | 8 +- src/zlib/zlib.dsw | 29 - src/zlib/zutil.h | 18 +- utils/HelpGen/Makefile.in | 4 +- utils/HelpGen/src/HelpGen.cpp | 10 +- utils/HelpGen/src/HelpGenVC.dsp | 348 + utils/HelpGen/src/HelpGenVC.dsw | 29 + utils/HelpGen/src/markup.h | 2 +- utils/HelpGen/src/wx_extra_imps.cpp | 19 +- .../demo => Install/builder}/bitmaps/copy.bmp | Bin utils/Install/builder/bitmaps/copy.xpm | 25 + utils/Install/builder/bitmaps/cut.bmp | Bin 0 -> 238 bytes utils/Install/builder/bitmaps/cut.xpm | 24 + utils/Install/builder/bitmaps/help.bmp | Bin 0 -> 238 bytes utils/Install/builder/bitmaps/help.xpm | 25 + .../demo => Install/builder}/bitmaps/new.bmp | Bin utils/Install/builder/bitmaps/new.xpm | 24 + utils/Install/builder/bitmaps/open.bmp | Bin 0 -> 238 bytes utils/Install/builder/bitmaps/open.xpm | 26 + utils/Install/builder/bitmaps/page.bmp | Bin 0 -> 714 bytes .../builder}/bitmaps/paste.bmp | Bin utils/Install/builder/bitmaps/preview.bmp | Bin 0 -> 238 bytes utils/Install/builder/bitmaps/preview.xpm | 26 + utils/Install/builder/bitmaps/print.bmp | Bin 0 -> 238 bytes utils/Install/builder/bitmaps/print.xpm | 26 + utils/Install/builder/bitmaps/save.bmp | Bin 0 -> 238 bytes utils/Install/builder/bitmaps/save.xpm | 25 + utils/Install/builder/makefile | 23 + utils/Install/builder/makefile.b32 | 10 + utils/Install/builder/makefile.bcc | 14 + utils/Install/builder/makefile.dos | 10 + utils/Install/builder/makefile.g95 | 10 + utils/Install/builder/makefile.sc | 37 + utils/Install/builder/makefile.sl | 14 + utils/Install/builder/makefile.twn | 35 + utils/Install/builder/makefile.unx | 23 + utils/Install/builder/makefile.vc | 11 + utils/Install/builder/makefile.wat | 11 + .../bitmaps => Install/builder}/mondrian.ico | Bin utils/Install/builder/mondrian.xpm | 44 + utils/Install/builder/wxib.cpp | 647 + utils/Install/builder/wxib.def | 8 + utils/Install/builder/wxib.rc | 12 + utils/Install/builder/wxibVC.dsp | 175 + utils/Install/builder/wxibvc.dsw | 29 + utils/Install/incace/acestruc.h | 151 + utils/Install/incace/attribs.h | 33 + utils/Install/incace/declare.h | 38 + utils/Install/incace/globals.h | 90 + utils/Install/incace/os.h | 26 + utils/Install/incace/portable.h | 101 + utils/Install/incace/uac_comm.h | 14 + utils/Install/incace/uac_crc.h | 20 + utils/Install/incace/uac_crt.h | 12 + utils/Install/incace/uac_dcpr.h | 14 + utils/Install/incace/uac_sys.h | 18 + utils/Install/incace/unace.h | 66 + utils/Install/inczip/consts.h | 46 + utils/Install/inczip/crypt.h | 24 + utils/Install/inczip/ebcdic.h | 272 + utils/Install/inczip/globals.h | 395 + utils/Install/inczip/inflate.h | 24 + utils/Install/inczip/nt.h | 28 + utils/Install/inczip/os2acl.h | 29 + utils/Install/inczip/os2cfg.h | 136 + utils/Install/inczip/os2data.h | 139 + utils/Install/inczip/rsxntwin.h | 155 + utils/Install/inczip/tables.h | 81 + utils/Install/inczip/ttyio.h | 186 + utils/Install/inczip/unzip.h | 548 + utils/Install/inczip/unzpriv.h | 2384 +++ utils/Install/inczip/version.h | 44 + utils/Install/inczip/w32cfg.h | 222 + utils/Install/inczip/zip.h | 15 + utils/Install/install.c | 1081 ++ utils/Install/install.h | 116 + utils/Install/instsup.cpp | 717 + utils/Install/instsup.h | 26 + utils/Install/packace/globals.c | 134 + utils/Install/packace/makefile | 46 + utils/Install/packace/makefile.b32 | 41 + utils/Install/packace/makefile.g95 | 46 + utils/Install/packace/makefile.gcc | 46 + utils/Install/packace/uac_comm.c | 51 + utils/Install/packace/uac_crc.c | 36 + utils/Install/packace/uac_crt.c | 149 + utils/Install/packace/uac_dcpr.c | 553 + utils/Install/packace/uac_sys.c | 105 + utils/Install/packace/unace.c | 584 + utils/Install/packzip/api.c | 601 + utils/Install/packzip/apihelp.c | 147 + utils/Install/packzip/crc32.c | 56 + utils/Install/packzip/crc_i386.S | 230 + utils/Install/packzip/crc_i386.asm | 229 + utils/Install/packzip/crc_i386.c | 215 + utils/Install/packzip/crc_lcc.asm | 108 + utils/Install/packzip/crctab.c | 219 + utils/Install/packzip/crypt.c | 12 + utils/Install/packzip/envargs.c | 314 + utils/Install/packzip/explode.c | 871 + utils/Install/packzip/extract.c | 1985 +++ utils/Install/packzip/fileio.c | 2153 +++ utils/Install/packzip/funzip.c | 468 + utils/Install/packzip/globals.c | 204 + utils/Install/packzip/inflate.c | 1305 ++ utils/Install/packzip/list.c | 649 + utils/Install/packzip/makefile | 146 + utils/Install/packzip/makefile.b32 | 118 + utils/Install/packzip/makefile.g95 | 158 + utils/Install/packzip/makefile.gcc | 146 + utils/Install/packzip/makefile.os2 | 670 + utils/Install/packzip/match.c | 294 + utils/Install/packzip/nt.c | 659 + utils/Install/packzip/os2.c | 2187 +++ utils/Install/packzip/os2acl.c | 381 + utils/Install/packzip/process.c | 1383 ++ utils/Install/packzip/rexxapi.c | 886 + utils/Install/packzip/rexxapi.def | 18 + utils/Install/packzip/rexxhelp.c | 178 + utils/Install/packzip/stub.def | 6 + utils/Install/packzip/ttyio.c | 625 + utils/Install/packzip/unix.c | 1424 ++ utils/Install/packzip/unreduce.c | 230 + utils/Install/packzip/unshrink.c | 301 + utils/Install/packzip/unzip.c | 1744 ++ utils/Install/packzip/unzip.def | 4 + utils/Install/packzip/unzipstb.c | 48 + utils/Install/packzip/win32.c | 2390 +++ utils/Install/packzip/zipinfo.c | 1912 +++ utils/Install/script/finished.ini | 9 + utils/Install/script/finished.wxr | 25 + utils/Install/script/install.bmp | Bin 0 -> 14418 bytes utils/Install/script/install.xpm | 292 + utils/Install/script/license.txt | 26 + utils/Install/script/nocheck.ini | 5 + utils/Install/script/page1.ini | 12 + utils/Install/script/page1.wxr | 27 + utils/Install/script/page2.ini | 11 + utils/Install/script/page2.wxr | 27 + utils/Install/script/page3.ini | 11 + utils/Install/script/page3.wxr | 29 + utils/Install/script/page4.ini | 11 + utils/Install/script/page4.wxr | 25 + utils/Install/script/readme.ini | 8 + utils/Install/script/readme.txt | 25 + utils/Install/script/wxinst.cfg | 62 + utils/Install/sfxace/globals.c | 137 + utils/Install/sfxace/install.PRJ | 50 + utils/Install/sfxace/install.def | 3 + utils/Install/sfxace/install.rc | 2 + utils/Install/sfxace/makefile | 47 + utils/Install/sfxace/makefile.b32 | 76 + utils/Install/sfxace/makefile.g95 | 53 + utils/Install/sfxace/makefile.gcc | 47 + utils/Install/sfxace/sfx.RES | Bin 0 -> 13744 bytes utils/Install/sfxace/sfx.rc | 2 + utils/Install/sfxace/uac_comm.c | 51 + utils/Install/sfxace/uac_crc.c | 36 + utils/Install/sfxace/uac_crt.c | 303 + utils/Install/sfxace/uac_dcpr.c | 554 + utils/Install/sfxace/uac_sys.c | 96 + utils/Install/sfxace/unace.c | 555 + utils/Install/sfxzip/api.c | 601 + utils/Install/sfxzip/apihelp.c | 147 + utils/Install/sfxzip/crc32.c | 56 + utils/Install/sfxzip/crc_i386.S | 230 + utils/Install/sfxzip/crc_i386.asm | 229 + utils/Install/sfxzip/crc_i386.c | 215 + utils/Install/sfxzip/crc_lcc.asm | 108 + utils/Install/sfxzip/crctab.c | 219 + utils/Install/sfxzip/crypt.c | 12 + utils/Install/sfxzip/envargs.c | 314 + utils/Install/sfxzip/explode.c | 871 + utils/Install/sfxzip/extract.c | 1993 +++ utils/Install/sfxzip/fileio.c | 2161 +++ utils/Install/sfxzip/funzip.c | 468 + utils/Install/sfxzip/globals.c | 204 + utils/Install/sfxzip/inflate.c | 1305 ++ utils/Install/sfxzip/list.c | 644 + utils/Install/sfxzip/makefile | 142 + utils/Install/sfxzip/makefile.b32 | 135 + utils/Install/sfxzip/makefile.g95 | 164 + utils/Install/sfxzip/makefile.gcc | 142 + utils/Install/sfxzip/makefile.os2 | 670 + utils/Install/sfxzip/match.c | 294 + utils/Install/sfxzip/nt.c | 659 + utils/Install/sfxzip/os2.c | 2187 +++ utils/Install/sfxzip/os2acl.c | 381 + utils/Install/sfxzip/process.c | 1400 ++ utils/Install/sfxzip/rexxapi.c | 886 + utils/Install/sfxzip/rexxhelp.c | 178 + utils/Install/sfxzip/sfx.RES | Bin 0 -> 13744 bytes utils/Install/sfxzip/sfx.rc | 2 + utils/Install/sfxzip/ttyio.c | 625 + utils/Install/sfxzip/unix.c | 1424 ++ utils/Install/sfxzip/unreduce.c | 230 + utils/Install/sfxzip/unshrink.c | 301 + utils/Install/sfxzip/unzip.c | 1744 ++ utils/Install/sfxzip/unzipstb.c | 48 + utils/Install/sfxzip/win32.c | 2390 +++ utils/Install/sfxzip/zipinfo.c | 1912 +++ utils/Install/wxmain.cpp | 316 + utils/dialoged/Makefile.in | 4 +- utils/dialoged/docs/back.gif | Bin 225 -> 877 bytes utils/dialoged/docs/body.tex | 60 +- utils/dialoged/docs/changes.tex | 9 + utils/dialoged/docs/contents.gif | Bin 231 -> 821 bytes utils/dialoged/docs/copyhght.bmp | Bin 0 -> 238 bytes utils/dialoged/docs/copyhght.gif | Bin 0 -> 125 bytes utils/dialoged/docs/copywdth.bmp | Bin 0 -> 238 bytes utils/dialoged/docs/copywdth.gif | Bin 0 -> 127 bytes utils/dialoged/docs/dialoged.tex | 6 +- utils/dialoged/docs/disthor.bmp | Bin 0 -> 238 bytes utils/dialoged/docs/disthor.gif | Bin 0 -> 123 bytes utils/dialoged/docs/distvert.bmp | Bin 0 -> 238 bytes utils/dialoged/docs/distvert.gif | Bin 0 -> 113 bytes utils/dialoged/docs/forward.gif | Bin 109 -> 877 bytes utils/dialoged/docs/tex2rtf.ini | 5 + utils/dialoged/docs/up.gif | Bin 6 -> 998 bytes utils/dialoged/src/DialogEdVC.dsp | 367 + utils/dialoged/src/DialogEdVC.dsw | 29 + utils/dialoged/src/bitmaps/copyhght.bmp | Bin 0 -> 238 bytes utils/dialoged/src/bitmaps/copyhght.xpm | 21 + utils/dialoged/src/bitmaps/copywdth.bmp | Bin 0 -> 238 bytes utils/dialoged/src/bitmaps/copywdth.xpm | 21 + utils/dialoged/src/bitmaps/disthor.bmp | Bin 0 -> 238 bytes utils/dialoged/src/bitmaps/disthor.xpm | 21 + utils/dialoged/src/bitmaps/distvert.bmp | Bin 0 -> 238 bytes utils/dialoged/src/bitmaps/distvert.xpm | 21 + utils/dialoged/src/dialoged.cpp | 12 +- utils/dialoged/src/dialoged.h | 6 +- utils/dialoged/src/dialoged.rc | 4 + utils/dialoged/src/dlghndlr.cpp | 1887 +-- utils/dialoged/src/dlghndlr.h | 217 +- utils/dialoged/src/edlist.cpp | 20 +- utils/dialoged/src/edlist.h | 10 +- utils/dialoged/src/edtree.cpp | 24 +- utils/dialoged/src/edtree.h | 12 +- utils/dialoged/src/makefile.vc | 21 + utils/dialoged/src/reseditr.cpp | 3902 +++-- utils/dialoged/src/reseditr.h | 659 +- utils/dialoged/src/reswrite.cpp | 982 +- utils/dialoged/src/symbtabl.cpp | 88 +- utils/dialoged/src/symbtabl.h | 18 +- utils/dialoged/src/winprop.cpp | 3668 ++--- utils/dialoged/src/winprop.h | 492 +- utils/dialoged/src/winstyle.cpp | 303 +- utils/dialoged/src/winstyle.h | 30 +- utils/hhp2cached/hhp2cachedVC.dsp | 175 + utils/hhp2cached/hhp2cachedVC.dsw | 29 + utils/makegen/makefile.g95 | 2 +- utils/makegen/templates/makefile.g95 | 2 +- utils/projgen/makeproj.cpp | 2 +- utils/tex2rtf/Makefile.in | 4 +- utils/tex2rtf/docs/back.gif | Bin 225 -> 978 bytes utils/tex2rtf/docs/contents.gif | Bin 231 -> 996 bytes utils/tex2rtf/docs/forward.gif | Bin 164 -> 959 bytes utils/tex2rtf/docs/tex2rtf.hpj | 2 +- utils/tex2rtf/docs/tex2rtf.ini | 5 + utils/tex2rtf/docs/tex2rtf.tex | 4 +- utils/tex2rtf/docs/up.gif | Bin 137 -> 998 bytes utils/tex2rtf/src/Tex2RTFVC.dsp | 343 + utils/tex2rtf/src/Tex2RTFVC.dsw | 29 + utils/tex2rtf/src/htmlutil.cpp | 60 +- utils/tex2rtf/src/makefile.vc | 21 + utils/tex2rtf/src/tex2any.cpp | 77 +- utils/tex2rtf/src/tex2rtf.cpp | 12 +- utils/tex2rtf/src/texutils.cpp | 6 +- utils/wxPython/.cvsignore | 124 - utils/wxPython/BUILD.txt | 148 - utils/wxPython/Makefile | 18 - utils/wxPython/SWIG.patches/Include.patch | 139 - utils/wxPython/SWIG.patches/Modules.patch | 202 - utils/wxPython/SWIG.patches/SWIG.patch | 530 - utils/wxPython/buildall | 11 - utils/wxPython/buildall.bat | 10 - utils/wxPython/demo/FileBrowseButton.py | 19 - utils/wxPython/demo/Main.py | 440 - utils/wxPython/demo/OldSizers.py | 400 - utils/wxPython/demo/wxGrid.py | 87 - utils/wxPython/demo/wxTextEntryDialog.py | 50 - utils/wxPython/distrib/.rpmrc | 5 - utils/wxPython/distrib/makerpm | 33 - utils/wxPython/distrib/maketgz | 48 - utils/wxPython/distrib/wxPython.rsp | 104 - utils/wxPython/distrib/wxPython.spec.in | 53 - utils/wxPython/distrib/wxPython.wsm | Bin 33 -> 0 bytes utils/wxPython/distrib/zipit.bat | 28 - utils/wxPython/lib/filebrowsebutton.py | 170 - utils/wxPython/lib/sizers/.cvsignore | 2 - utils/wxPython/lib/sizers/__init__.py | 45 - utils/wxPython/lib/sizers/border.py | 109 - utils/wxPython/lib/sizers/box.py | 137 - utils/wxPython/lib/sizers/shape.py | 97 - utils/wxPython/lib/sizers/sizer.py | 112 - utils/wxPython/modules/README | 14 - utils/wxPython/modules/buildall.py | 31 - utils/wxPython/modules/glcanvas/build.cfg | 19 - utils/wxPython/modules/glcanvas/glcanvasc.def | 2 - utils/wxPython/modules/html/.cvsignore | 13 - utils/wxPython/modules/html/BUGS | 23 - utils/wxPython/modules/html/README | 20 - utils/wxPython/modules/html/build.cfg | 16 - utils/wxPython/modules/html/helpsys.cpp | 322 - utils/wxPython/modules/html/helpsys.h | 76 - utils/wxPython/modules/html/htmlc.def | 2 - utils/wxPython/modules/html/htmlhelper.py | 59 - utils/wxPython/modules/html/test/helpsys.py | 73 - utils/wxPython/modules/html/test/htmlhelp.py | 19 - utils/wxPython/modules/html/test/htmlview.py | 77 - .../wxPython/modules/html/test/htmlwidget.py | 97 - utils/wxPython/modules/lseditor/.cvsignore | 13 - utils/wxPython/modules/lseditor/BUGS | 6 - utils/wxPython/modules/lseditor/COPYING | 340 - utils/wxPython/modules/lseditor/README | 13 - utils/wxPython/modules/lseditor/build.cfg | 9 - utils/wxPython/modules/lseditor/config.h | 82 - utils/wxPython/modules/lseditor/controlarea.h | 262 - utils/wxPython/modules/lseditor/editorpl.h | 153 - utils/wxPython/modules/lseditor/finddlg.cpp | 146 - utils/wxPython/modules/lseditor/finddlg.h | 38 - .../wxPython/modules/lseditor/gtk/.cvsignore | 1 - .../modules/lseditor/gtk/lseditor.cpp | 1913 --- .../wxPython/modules/lseditor/gtk/lseditor.py | 189 - utils/wxPython/modules/lseditor/lseditor.i | 150 - utils/wxPython/modules/lseditor/lseditorc.def | 2 - .../wxPython/modules/lseditor/lseditorpl.cpp | 344 - utils/wxPython/modules/lseditor/lseditorpl.h | 133 - utils/wxPython/modules/lseditor/markup.cpp | 46 - utils/wxPython/modules/lseditor/markup.h | 51 - .../wxPython/modules/lseditor/msw/.cvsignore | 1 - .../modules/lseditor/msw/lseditor.cpp | 1866 --- .../wxPython/modules/lseditor/msw/lseditor.py | 189 - utils/wxPython/modules/lseditor/plugin.cpp | 58 - utils/wxPython/modules/lseditor/plugin.h | 98 - .../modules/lseditor/sourcepainter.cpp | 696 - .../wxPython/modules/lseditor/sourcepainter.h | 109 - utils/wxPython/modules/lseditor/tdefs.cpp | 4233 ----- utils/wxPython/modules/lseditor/tdefs.h | 903 - .../wxPython/modules/lseditor/test/editor.py | 118 - utils/wxPython/modules/lseditor/wxsdefs.h | 374 - utils/wxPython/modules/lseditor/wxstlac.h | 659 - utils/wxPython/modules/lseditor/wxstldefs.h | 49 - utils/wxPython/modules/lseditor/wxstllst.h | 555 - utils/wxPython/modules/lseditor/wxstlvec.h | 857 - utils/wxPython/modules/ogl/build.cfg | 23 - utils/wxPython/modules/ogl/ogl.cpp | 718 - utils/wxPython/modules/ogl/oglc.def | 2 - utils/wxPython/modules/stubs/.cvsignore | 10 - utils/wxPython/modules/stubs/README | 21 - utils/wxPython/modules/stubs/gtk/.cvsignore | 1 - utils/wxPython/modules/stubs/msw/.cvsignore | 1 - utils/wxPython/modules/utils/.cvsignore | 7 - utils/wxPython/modules/utils/build.cfg | 5 - utils/wxPython/modules/utils/gtk/utils.cpp | 1336 -- utils/wxPython/modules/utils/gtk/utils.py | 111 - utils/wxPython/modules/utils/msw/utils.cpp | 1336 -- utils/wxPython/modules/utils/msw/utils.py | 111 - utils/wxPython/modules/utils/utils.i | 139 - utils/wxPython/modules/utils/utilsc.def | 2 - utils/wxPython/src/__version__.py | 1 - utils/wxPython/src/build.cfg | 123 - utils/wxPython/src/gtk/dummy | 0 utils/wxPython/src/gtk/misc2.cpp | 2497 --- utils/wxPython/src/gtk/misc2.py | 325 - utils/wxPython/src/gtk/windows2.cpp | 5544 ------- utils/wxPython/src/gtk/windows2.py | 600 - utils/wxPython/src/makefile.nt | 339 - utils/wxPython/src/motif/dummy | 0 utils/wxPython/src/msw/.cvsignore | 1 - utils/wxPython/src/msw/dummy | 0 utils/wxPython/src/msw/misc2.cpp | 2503 --- utils/wxPython/src/msw/misc2.py | 325 - utils/wxPython/src/qt/dummy | 0 utils/wxPython/src/wxc.def | 6 - utils/wxPython/src/wxp.cpp | 2049 --- utils/wxPython/tests/paul.pyc | Bin 1091 -> 0 bytes utils/wxprop/src/prop.cpp | 1119 -- wx-config.in | 65 +- wxBase.dsp | 32 +- wxBase.dsw | 41 + wxBase.spec | 42 +- wxBaseDll.dsp | 376 + wxGTK.spec | 42 +- wxMotif.spec | 53 +- wxPython/.cvsignore | 8 + wxPython/BUILD.unix.txt | 271 + wxPython/BUILD.win32.txt | 276 + {utils/wxPython => wxPython}/CHANGES.txt | 227 +- wxPython/MANIFEST.in | 94 + {utils/wxPython => wxPython}/README.txt | 38 +- wxPython/SWIG/README.txt | 6 + wxPython/SWIG/pyexp.swg | 32 + wxPython/SWIG/typemaps.i | 561 + wxPython/b | 90 + wxPython/b.bat | 65 + .../modules => wxPython/contrib}/.cvsignore | 0 wxPython/contrib/README | 3 + .../contrib}/glcanvas/.cvsignore | 0 .../contrib}/glcanvas/glcanvas.i | 38 +- .../contrib}/glcanvas/gtk/.cvsignore | 0 .../contrib}/glcanvas/gtk/glcanvas.cpp | 458 +- .../contrib}/glcanvas/gtk/glcanvas.py | 8 +- .../contrib}/glcanvas/msw/.cvsignore | 0 .../contrib}/glcanvas/msw/glcanvas.cpp | 159 +- .../contrib}/glcanvas/msw/glcanvas.py | 8 +- .../contrib}/ogl/.cvsignore | 1 + wxPython/contrib/ogl/README.txt | 7 + .../contrib}/ogl/_ogldefs.i | 0 .../contrib/ogl/_oglextras.py | 0 wxPython/contrib/ogl/ogl.cpp | 411 + .../modules => wxPython/contrib}/ogl/ogl.i | 96 +- .../modules => wxPython/contrib}/ogl/ogl.py | 6 + .../contrib}/ogl/oglbasic.cpp | 766 +- .../contrib}/ogl/oglbasic.i | 20 +- .../contrib}/ogl/oglbasic.py | 9 +- .../contrib}/ogl/oglcanvas.cpp | 471 +- .../contrib}/ogl/oglcanvas.i | 23 +- .../contrib}/ogl/oglcanvas.py | 19 +- .../contrib}/ogl/oglhelpers.cpp | 0 .../contrib}/ogl/oglhelpers.h | 4 +- .../contrib}/ogl/oglshapes.cpp | 658 +- .../contrib}/ogl/oglshapes.i | 30 +- .../contrib}/ogl/oglshapes.py | 20 +- .../contrib}/ogl/oglshapes2.cpp | 558 +- .../contrib}/ogl/oglshapes2.i | 22 +- .../contrib}/ogl/oglshapes2.py | 16 +- wxPython/contrib/stc/.cvsignore | 6 + wxPython/contrib/stc/README.txt | 7 + wxPython/contrib/stc/_stcextras.py | 4 + wxPython/contrib/stc/stc.py | 7 + wxPython/contrib/stc/stc_.cpp | 9007 ++++++++++ wxPython/contrib/stc/stc_.i | 104 + wxPython/contrib/stc/stc_.py | 1279 ++ {utils/wxPython => wxPython}/demo/.cvsignore | 1 + {utils/wxPython => wxPython}/demo/About.py | 28 +- wxPython/demo/ActiveXWrapper_Acrobat.py | 130 + wxPython/demo/ActiveXWrapper_IE.py | 205 + .../wxPython => wxPython}/demo/ColorPanel.py | 0 .../demo/CustomDragAndDrop.py | 22 +- .../wxPython => wxPython}/demo/DialogUnits.py | 1 + .../wxPython => wxPython}/demo/DragAndDrop.py | 0 wxPython/demo/FancyText.py | 41 + wxPython/demo/FileBrowseButton.py | 76 + .../demo/FontEnumerator.py | 0 .../demo/GenericButtons.py | 1 + wxPython/demo/GridCustEditor.py | 231 + wxPython/demo/GridCustTable.py | 153 + wxPython/demo/GridEnterHandler.py | 62 + wxPython/demo/GridHugeTable.py | 71 + wxPython/demo/GridSimple.py | 189 + wxPython/demo/GridStdEdRend.py | 181 + wxPython/demo/LayoutAnchors.py | 140 + {utils/wxPython => wxPython}/demo/Layoutf.py | 0 {utils/wxPython => wxPython}/demo/MDIDemo.py | 5 +- wxPython/demo/MDISashDemo.py | 140 + wxPython/demo/Main.py | 544 + .../demo/PrintFramework.py | 0 {utils/wxPython => wxPython}/demo/PyShell.py | 3 +- wxPython/demo/PyShellWindow.py | 15 + .../demo/PythonEvents.py | 0 {utils/wxPython => wxPython}/demo/README.txt | 0 {utils/wxPython => wxPython}/demo/Sizers.py | 2 + {utils/wxPython => wxPython}/demo/SlashDot.py | 2 + {utils/wxPython => wxPython}/demo/Threads.py | 4 + .../wxPython => wxPython}/demo/XMLtreeview.py | 20 +- .../demo/bitmaps/.cvsignore | 0 wxPython/demo/bitmaps/01c.gif | Bin 0 -> 545 bytes wxPython/demo/bitmaps/10s.gif | Bin 0 -> 990 bytes wxPython/demo/bitmaps/12h.gif | Bin 0 -> 2770 bytes wxPython/demo/bitmaps/13d.gif | Bin 0 -> 2800 bytes .../demo/bitmaps/Calend.bmp | Bin .../demo/bitmaps/DbDec.bmp | Bin .../demo/bitmaps/DbInc.bmp | Bin .../demo/bitmaps/Dec.bmp | Bin .../demo/bitmaps/Inc.bmp | Bin .../wxPython => wxPython}/demo/bitmaps/Pt.bmp | Bin wxPython/demo/bitmaps/backgrnd.png | Bin 0 -> 16672 bytes .../tests => wxPython/demo}/bitmaps/copy.bmp | Bin .../demo/bitmaps/image.bmp | Bin .../demo/bitmaps/image.gif | Bin .../demo/bitmaps/image.jpg | Bin .../demo/bitmaps/image.png | Bin .../demo/bitmaps/lb1.bmp | Bin .../demo/bitmaps/lb2.bmp | Bin .../demo}/bitmaps/mondrian.ico | Bin .../tests => wxPython/demo}/bitmaps/new.bmp | Bin .../demo/bitmaps/open.bmp | Bin .../tests => wxPython/demo}/bitmaps/paste.bmp | Bin wxPython/demo/bitmaps/robin.jpg | Bin 0 -> 4799 bytes .../demo/bitmaps/smiles.bmp | Bin .../demo/bitmaps/smiles.ico | Bin .../demo/bitmaps/splash.gif | Bin .../tests => wxPython/demo}/bitmaps/test2.bmp | Bin 12342 -> 12342 bytes .../demo/bitmaps/test_image.png | Bin .../demo/bitmaps/test_mask.bmp | Bin .../demo/bitmaps/tog1.bmp | Bin .../demo/bitmaps/tog2.bmp | Bin wxPython/demo/data/.cvsignore | 2 + wxPython/demo/data/echo.py | 29 + wxPython/demo/data/grid.i | 1752 ++ .../demo/data/imagemap.htm | 0 .../demo/data/imagemap.png | Bin .../wxPython => wxPython}/demo/data/pic.png | Bin .../wxPython => wxPython}/demo/data/pic2.bmp | Bin wxPython/demo/data/pic2.gif | Bin 0 -> 9184 bytes wxPython/demo/data/stc.h | 1396 ++ wxPython/demo/data/stc.h.html | 1405 ++ .../demo/data/tables.htm | 0 .../wxPython => wxPython}/demo/data/test.htm | 4 + wxPython/demo/data/tips.txt | 7 + .../demo/data/widgetTest.htm | 0 {utils/wxPython => wxPython}/demo/demo.py | 0 .../demo/demoMainLoop.py | 0 {utils/wxPython => wxPython}/demo/hangman.py | 3 + {utils/wxPython => wxPython}/demo/paper.xml | 0 {utils/wxPython => wxPython}/demo/pyTree.py | 0 {utils/wxPython => wxPython}/demo/quotes.xml | 0 wxPython/demo/redemo.py | 25 + {utils/wxPython => wxPython}/demo/run.py | 10 +- wxPython/demo/viewer.py | 96 + wxPython/demo/viewer_basics.py | 61 + .../wxPython => wxPython}/demo/widgetTest.py | 7 +- {utils/wxPython => wxPython}/demo/wxButton.py | 4 +- .../wxPython => wxPython}/demo/wxCalendar.py | 317 +- wxPython/demo/wxCalendarCtrl.py | 40 + .../wxPython => wxPython}/demo/wxCheckBox.py | 0 .../demo/wxCheckListBox.py | 0 {utils/wxPython => wxPython}/demo/wxChoice.py | 4 +- .../demo/wxColourDialog.py | 0 .../wxPython => wxPython}/demo/wxComboBox.py | 4 + {utils/wxPython => wxPython}/demo/wxDialog.py | 0 .../wxPython => wxPython}/demo/wxDirDialog.py | 0 wxPython/demo/wxDragImage.py | 249 + {utils/wxPython => wxPython}/demo/wxEditor.py | 0 .../demo/wxFileDialog.py | 5 +- .../wxPython => wxPython}/demo/wxFloatBar.py | 3 +- .../demo/wxFontDialog.py | 0 {utils/wxPython => wxPython}/demo/wxFrame.py | 2 + .../wxPython => wxPython}/demo/wxGLCanvas.py | 11 +- {utils/wxPython => wxPython}/demo/wxGauge.py | 15 +- wxPython/demo/wxGrid.py | 101 + .../demo/wxHtmlWindow.py | 6 + {utils/wxPython => wxPython}/demo/wxImage.py | 0 .../demo/wxLayoutConstraints.py | 0 .../wxPython => wxPython}/demo/wxListBox.py | 55 + .../wxPython => wxPython}/demo/wxListCtrl.py | 46 +- .../wxPython => wxPython}/demo/wxMVCTree.py | 0 {utils/wxPython => wxPython}/demo/wxMask.py | 3 +- .../demo/wxMessageDialog.py | 0 .../wxPython => wxPython}/demo/wxMiniFrame.py | 1 + .../demo/wxMultipleChoiceDialog.py | 0 .../wxPython => wxPython}/demo/wxNotebook.py | 4 +- {utils/wxPython => wxPython}/demo/wxOGL.py | 4 + .../demo/wxPageSetupDialog.py | 0 .../demo/wxPlotCanvas.py | 0 .../demo/wxPrintDialog.py | 0 wxPython/demo/wxProcess.py | 157 + .../demo/wxProgressDialog.py | 0 .../wxPython => wxPython}/demo/wxRadioBox.py | 0 .../demo/wxSashWindow.py | 38 +- .../demo/wxScrolledMessageDialog.py | 0 .../demo/wxScrolledWindow.py | 15 +- .../demo/wxSingleChoiceDialog.py | 0 {utils/wxPython => wxPython}/demo/wxSlider.py | 0 .../demo/wxSpinButton.py | 0 wxPython/demo/wxSpinCtrl.py | 37 + .../demo/wxSplitterWindow.py | 10 +- .../demo/wxStaticBitmap.py | 6 + .../demo/wxStaticText.py | 0 .../wxPython => wxPython}/demo/wxStatusBar.py | 54 +- wxPython/demo/wxStyledTextCtrl_1.py | 186 + wxPython/demo/wxStyledTextCtrl_2.py | 307 + .../wxPython => wxPython}/demo/wxTextCtrl.py | 13 +- wxPython/demo/wxTextEntryDialog.py | 30 + {utils/wxPython => wxPython}/demo/wxTimer.py | 0 .../wxPython => wxPython}/demo/wxToolBar.py | 90 +- .../wxPython => wxPython}/demo/wxTreeCtrl.py | 64 +- .../demo/wxVTKRenderWindow.py | 0 .../wxPython => wxPython}/demo/wxValidator.py | 0 .../wxPython => wxPython}/distrib/.cvsignore | 1 - wxPython/distrib/.rpmrc | 5 + wxPython/distrib/README.dbg.txt | 30 + .../distrib/autobuild.py | 95 +- {utils/wxPython => wxPython}/distrib/build.py | 132 +- wxPython/distrib/makedbg.bat | 33 + wxPython/distrib/makedemo | 36 + wxPython/distrib/makedev.bat | 41 + wxPython/distrib/makerpm | 47 + wxPython/distrib/maketgz | 62 + .../wxPython => wxPython}/distrib/makexferzip | 0 .../distrib/makexferzip.bat | 0 {utils/wxPython => wxPython}/distrib/wise.aut | 2 +- wxPython/distrib/wxPython.WSM | Bin 0 -> 33 bytes .../distrib/wxPython.bmp | Bin wxPython/distrib/wxPython.rsp | 106 + wxPython/distrib/wxPython.spec | 101 + .../distrib/wxPython.wse | 187 +- wxPython/distrib/zipit.bat | 46 + wxPython/my_distutils.py | 239 + wxPython/my_install_data.py | 167 + wxPython/setup.cfg | 14 + wxPython/setup.py | 535 + {utils/wxPython => wxPython}/src/.cvsignore | 5 + {utils/wxPython => wxPython}/src/__init__.py | 0 wxPython/src/__version__.py | 1 + wxPython/src/_calextras.py | 4 + {utils/wxPython => wxPython}/src/_defs.i | 28 + {utils/wxPython => wxPython}/src/_extras.py | 172 +- wxPython/src/_gridextras.py | 19 + .../_extras.py => wxPython/src/_htmlextras.py | 0 wxPython/src/b | 4 + wxPython/src/calendar.i | 237 + {utils/wxPython => wxPython}/src/clip_dnd.i | 50 +- {utils/wxPython => wxPython}/src/cmndlgs.i | 50 +- {utils/wxPython => wxPython}/src/controls.i | 183 +- {utils/wxPython => wxPython}/src/controls2.i | 242 +- {utils/wxPython => wxPython}/src/events.i | 39 +- wxPython/src/export.h | 68 + wxPython/src/filesys.i | 276 + {utils/wxPython => wxPython}/src/frames.i | 36 +- {utils/wxPython => wxPython}/src/gdi.i | 50 +- wxPython/src/grid.i | 1748 ++ .../wxPython => wxPython}/src/gtk/.cvsignore | 0 wxPython/src/gtk/calendar.cpp | 1804 ++ wxPython/src/gtk/calendar.py | 244 + .../src/gtk/clip_dnd.cpp | 317 +- .../wxPython => wxPython}/src/gtk/clip_dnd.py | 14 +- .../wxPython => wxPython}/src/gtk/cmndlgs.cpp | 603 +- .../src/msw => wxPython/src/gtk}/cmndlgs.py | 20 +- .../src/gtk/controls.cpp | 1144 +- .../src/msw => wxPython/src/gtk}/controls.py | 70 +- .../msw => wxPython/src/gtk}/controls2.cpp | 3211 ++-- .../src/msw => wxPython/src/gtk}/controls2.py | 249 +- .../src/msw => wxPython/src/gtk}/events.cpp | 1360 +- .../src/msw => wxPython/src/gtk}/events.py | 128 +- wxPython/src/gtk/filesys.cpp | 2315 +++ wxPython/src/gtk/filesys.py | 240 + .../wxPython => wxPython}/src/gtk/frames.cpp | 569 +- .../src/msw => wxPython/src/gtk}/frames.py | 36 +- {utils/wxPython => wxPython}/src/gtk/gdi.cpp | 762 +- {utils/wxPython => wxPython}/src/gtk/gdi.py | 35 + wxPython/src/gtk/grid.cpp | 13353 +++++++++++++++ wxPython/src/gtk/grid.py | 1512 ++ wxPython/src/gtk/html.cpp | 6104 +++++++ .../modules/html => wxPython/src/gtk}/html.py | 17 +- wxPython/src/gtk/htmlhelp.cpp | 2995 ++++ .../html => wxPython/src/gtk}/htmlhelp.py | 6 + .../wxPython => wxPython}/src/gtk/image.cpp | 563 +- .../src/msw => wxPython/src/gtk}/image.py | 26 + {utils/wxPython => wxPython}/src/gtk/mdi.cpp | 332 +- {utils/wxPython => wxPython}/src/gtk/mdi.py | 8 +- {utils/wxPython => wxPython}/src/gtk/misc.cpp | 932 +- {utils/wxPython => wxPython}/src/gtk/misc.py | 91 +- wxPython/src/gtk/misc2.cpp | 5648 +++++++ wxPython/src/gtk/misc2.py | 761 + .../wxPython => wxPython}/src/gtk/printfw.cpp | 387 +- .../src/msw => wxPython/src/gtk}/printfw.py | 8 +- .../wxPython => wxPython}/src/gtk/sizers.cpp | 1601 +- .../src/msw => wxPython/src/gtk}/sizers.py | 175 +- .../src/gtk/stattool.cpp | 495 +- .../src/msw => wxPython/src/gtk}/stattool.py | 6 +- wxPython/src/gtk/streams.cpp | 845 + wxPython/src/gtk/streams.py | 66 + wxPython/src/gtk/utils.cpp | 7906 +++++++++ wxPython/src/gtk/utils.py | 953 ++ .../src/msw => wxPython/src/gtk}/windows.cpp | 988 +- .../src/msw => wxPython/src/gtk}/windows.py | 64 +- wxPython/src/gtk/windows2.cpp | 2030 +++ wxPython/src/gtk/windows2.py | 230 + .../src/gtk/windows3.cpp | 335 +- .../wxPython => wxPython}/src/gtk/windows3.py | 11 +- {utils/wxPython => wxPython}/src/gtk/wx.cpp | 658 +- .../src/msw => wxPython/src/gtk}/wx.py | 214 +- {utils/wxPython => wxPython}/src/helpers.cpp | 252 +- {utils/wxPython => wxPython}/src/helpers.h | 651 +- .../modules/html => wxPython/src}/html.i | 75 +- .../modules/html => wxPython/src}/htmlhelp.i | 92 +- {utils/wxPython => wxPython}/src/image.i | 19 +- {utils/wxPython => wxPython}/src/libpy.c | 25 +- {utils/wxPython => wxPython}/src/mdi.i | 19 +- {utils/wxPython => wxPython}/src/misc.i | 111 +- {utils/wxPython => wxPython}/src/misc2.i | 392 +- wxPython/src/msw/.cvsignore | 1 + wxPython/src/msw/calendar.cpp | 2057 +++ wxPython/src/msw/calendar.py | 244 + .../src/msw/clip_dnd.cpp | 252 +- .../wxPython => wxPython}/src/msw/clip_dnd.py | 17 +- .../wxPython => wxPython}/src/msw/cmndlgs.cpp | 334 +- .../src/gtk => wxPython/src/msw}/cmndlgs.py | 20 +- .../src/msw/controls.cpp | 909 +- .../src/gtk => wxPython/src/msw}/controls.py | 70 +- .../gtk => wxPython/src/msw}/controls2.cpp | 2959 +++- .../src/gtk => wxPython/src/msw}/controls2.py | 249 +- .../src/gtk => wxPython/src/msw}/events.cpp | 1277 +- .../src/gtk => wxPython/src/msw}/events.py | 128 +- wxPython/src/msw/filesys.cpp | 2438 +++ wxPython/src/msw/filesys.py | 240 + .../wxPython => wxPython}/src/msw/frames.cpp | 381 +- .../src/gtk => wxPython/src/msw}/frames.py | 36 +- {utils/wxPython => wxPython}/src/msw/gdi.cpp | 860 +- {utils/wxPython => wxPython}/src/msw/gdi.py | 58 +- wxPython/src/msw/grid.cpp | 13638 ++++++++++++++++ wxPython/src/msw/grid.py | 1512 ++ .../html => wxPython/src/msw}/html.cpp | 688 +- wxPython/src/msw/html.py | 750 + .../html => wxPython/src/msw}/htmlhelp.cpp | 402 +- wxPython/src/msw/htmlhelp.py | 362 + .../wxPython => wxPython}/src/msw/image.cpp | 462 +- .../src/gtk => wxPython/src/msw}/image.py | 26 + {utils/wxPython => wxPython}/src/msw/mdi.cpp | 149 +- {utils/wxPython => wxPython}/src/msw/mdi.py | 15 +- {utils/wxPython => wxPython}/src/msw/misc.cpp | 877 +- {utils/wxPython => wxPython}/src/msw/misc.py | 91 +- wxPython/src/msw/misc2.cpp | 7104 ++++++++ wxPython/src/msw/misc2.py | 902 + .../wxPython => wxPython}/src/msw/printfw.cpp | 251 +- .../src/gtk => wxPython/src/msw}/printfw.py | 27 +- .../wxPython => wxPython}/src/msw/sizers.cpp | 1362 +- .../src/gtk => wxPython/src/msw}/sizers.py | 175 +- .../src/msw/stattool.cpp | 250 +- .../src/gtk => wxPython/src/msw}/stattool.py | 6 +- wxPython/src/msw/streams.cpp | 869 + wxPython/src/msw/streams.py | 66 + wxPython/src/msw/utils.cpp | 7937 +++++++++ wxPython/src/msw/utils.py | 953 ++ .../src/gtk => wxPython/src/msw}/windows.cpp | 872 +- .../src/gtk => wxPython/src/msw}/windows.py | 69 +- .../src/msw/windows2.cpp | 225 +- .../wxPython => wxPython}/src/msw/windows2.py | 21 +- .../src/msw/windows3.cpp | 54 +- .../wxPython => wxPython}/src/msw/windows3.py | 11 +- {utils/wxPython => wxPython}/src/msw/wx.cpp | 359 +- .../src/gtk => wxPython/src/msw}/wx.py | 214 +- .../wxPython => wxPython}/src/my_typemaps.i | 54 +- {utils/wxPython => wxPython}/src/printfw.h | 0 {utils/wxPython => wxPython}/src/printfw.i | 30 +- {utils/wxPython => wxPython}/src/sizers.i | 110 +- {utils/wxPython => wxPython}/src/stattool.i | 45 +- wxPython/src/streams.i | 507 + wxPython/src/utils.i | 1040 ++ {utils/wxPython => wxPython}/src/windows.i | 144 +- {utils/wxPython => wxPython}/src/windows2.i | 64 +- {utils/wxPython => wxPython}/src/windows3.i | 19 +- {utils/wxPython => wxPython}/src/wx.i | 75 +- {utils/wxPython => wxPython}/src/wxc.rc | 2 +- {utils/wxPython => wxPython}/src/wxp.ico | Bin {utils/wxPython => wxPython}/tests/.cvsignore | 0 {utils/wxPython => wxPython}/tests/README.txt | 5 +- .../wxPython => wxPython}/tests/TstLstIcon.py | 0 {utils/wxPython => wxPython}/tests/atom.bmp | Bin wxPython/tests/bitmaps/copy.bmp | Bin 0 -> 238 bytes wxPython/tests/bitmaps/mondrian.ico | Bin 0 -> 766 bytes wxPython/tests/bitmaps/new.bmp | Bin 0 -> 238 bytes .../tests/bitmaps/open.bmp | Bin wxPython/tests/bitmaps/paste.bmp | Bin 0 -> 238 bytes .../tests/bitmaps/smiles.bmp | Bin .../tests/bitmaps/smiles.ico | Bin .../demo => wxPython/tests}/bitmaps/test2.bmp | Bin .../tests/bitmaps/tog1.bmp | Bin .../tests/bitmaps/tog2.bmp | Bin {utils/wxPython => wxPython}/tests/blit.py | 0 wxPython/tests/dynamicform.py | 62 + wxPython/tests/fs_test.py | 41 + .../wxPython => wxPython}/tests/getvalues.py | 0 {utils/wxPython => wxPython}/tests/grid.py | 0 wxPython/tests/gridtest.py | 219 + {utils/wxPython => wxPython}/tests/hangman.py | 0 {utils/wxPython => wxPython}/tests/hook.py | 0 {utils/wxPython => wxPython}/tests/info.bmp | Bin {utils/wxPython => wxPython}/tests/leave.py | 0 .../tests/listGetItem.py | 0 {utils/wxPython => wxPython}/tests/memleak.py | 0 wxPython/tests/og.py | 69 + {utils/wxPython => wxPython}/tests/paul.py | 0 {utils/wxPython => wxPython}/tests/popup.py | 0 {utils/wxPython => wxPython}/tests/pytree.py | 0 {utils/wxPython => wxPython}/tests/query.bmp | Bin .../tests/scroll_paint.py | 0 {utils/wxPython => wxPython}/tests/spies.py | 0 {utils/wxPython => wxPython}/tests/spies2.py | 0 {utils/wxPython => wxPython}/tests/ste.py | 0 {utils/wxPython => wxPython}/tests/table.bmp | Bin {utils/wxPython => wxPython}/tests/tabs.py | 0 {utils/wxPython => wxPython}/tests/test1.py | 0 {utils/wxPython => wxPython}/tests/test2.py | 16 + {utils/wxPython => wxPython}/tests/test3.py | 16 + {utils/wxPython => wxPython}/tests/test4.py | 16 + {utils/wxPython => wxPython}/tests/test5.py | 0 {utils/wxPython => wxPython}/tests/test6.py | 0 {utils/wxPython => wxPython}/tests/test7.py | 0 {utils/wxPython => wxPython}/tests/test8.py | 0 {utils/wxPython => wxPython}/tests/testDlg.py | 0 .../wxPython => wxPython}/tests/testTree.py | 0 {utils/wxPython => wxPython}/tests/testi.py | 0 {utils/wxPython => wxPython}/tests/thrtest.py | 0 {utils/wxPython => wxPython}/tests/thtest.py | 0 {utils/wxPython => wxPython}/tests/txml.py | 0 {utils/wxPython => wxPython}/tests/val.py | 0 .../tests/wxPlotCanvas.py | 0 {utils/wxPython => wxPython}/tests/wxSlash.py | 0 {utils/wxPython => wxPython}/tests/zigron.py | 0 wxPython/wxPython/.cvsignore | 3 + {utils => wxPython}/wxPython/lib/.cvsignore | 0 {utils => wxPython}/wxPython/lib/CDate.py | 0 {utils => wxPython}/wxPython/lib/__init__.py | 0 wxPython/wxPython/lib/activexwrapper.py | 140 + wxPython/wxPython/lib/anchors.py | 91 + {utils => wxPython}/wxPython/lib/buttons.py | 37 +- {utils => wxPython}/wxPython/lib/calendar.py | 310 +- {utils => wxPython}/wxPython/lib/dialogs.py | 1 + .../wxPython/lib/editor/.cvsignore | 0 .../wxPython/lib/editor/README.txt | 0 .../wxPython/lib/editor/__init__.py | 0 .../wxPython/lib/editor/editor.py | 2 + .../wxPython/lib/editor/py_editor.py | 0 .../wxPython/lib/editor/tokenizer.py | 2 +- wxPython/wxPython/lib/fancytext.py | 249 + wxPython/wxPython/lib/filebrowsebutton.py | 424 + {utils => wxPython}/wxPython/lib/floatbar.py | 2 +- {utils => wxPython}/wxPython/lib/grids.py | 22 +- {utils => wxPython}/wxPython/lib/layoutf.py | 1 + {utils => wxPython}/wxPython/lib/mvctree.py | 7 +- wxPython/wxPython/lib/pyshell.py | 325 + wxPython/wxPython/lib/rpcMixin.py | 236 + {utils => wxPython}/wxPython/lib/shell.py | 4 +- .../wxPython/lib/splashscreen.py | 14 +- {utils => wxPython}/wxPython/lib/vtk.py | 3 + .../wxPython/lib/wxPlotCanvas.py | 7 +- {utils => wxPython}/wxPython/lib/wxpTag.py | 2 +- 2324 files changed, 375095 insertions(+), 121526 deletions(-) create mode 100644 contrib/docs/.cvsignore create mode 100644 contrib/samples/mmedia/MMboardVC.dsp create mode 100644 contrib/samples/mmedia/MMboardVC.dsw create mode 100644 contrib/samples/ogl/Makefile.in delete mode 100644 contrib/samples/ogl/ogledit/Makefile create mode 100644 contrib/samples/ogl/ogledit/Makefile.in create mode 100644 contrib/samples/ogl/ogledit/OGLEditVC.dsp create mode 100644 contrib/samples/ogl/ogledit/OGLEditVC.dsw delete mode 100644 contrib/samples/ogl/studio/Makefile create mode 100644 contrib/samples/ogl/studio/Makefile.in create mode 100644 contrib/samples/ogl/studio/StudioVC.dsp create mode 100644 contrib/samples/ogl/studio/StudioVC.dsw create mode 100644 contrib/samples/stc/StcTestVC.dsp create mode 100644 contrib/samples/stc/StcTestVC.dsw create mode 100644 contrib/src/stc/gen_iface.py create mode 100644 contrib/src/stc/scintilla/include/PosRegExp.h create mode 100644 contrib/src/stc/scintilla/include/Scintilla.iface create mode 100644 contrib/src/stc/scintilla/include/ScintillaWidget.h create mode 100644 contrib/src/stc/scintilla/include/WindowAccessor.h delete mode 100644 contrib/src/stc/scintilla/src/Accessor.cxx create mode 100644 contrib/src/stc/scintilla/src/DocumentAccessor.cxx create mode 100644 contrib/src/stc/scintilla/src/DocumentAccessor.h create mode 100644 contrib/src/stc/scintilla/src/LexCPP.cxx create mode 100644 contrib/src/stc/scintilla/src/LexHTML.cxx create mode 100644 contrib/src/stc/scintilla/src/LexLua.cxx create mode 100644 contrib/src/stc/scintilla/src/LexOthers.cxx create mode 100644 contrib/src/stc/scintilla/src/LexPerl.cxx create mode 100644 contrib/src/stc/scintilla/src/LexPython.cxx create mode 100644 contrib/src/stc/scintilla/src/LexSQL.cxx create mode 100644 contrib/src/stc/scintilla/src/LexVB.cxx create mode 100644 contrib/src/stc/scintilla/src/PosRegExp.cxx create mode 100644 contrib/src/stc/scintilla/src/UniConversion.cxx create mode 100644 contrib/src/stc/scintilla/src/UniConversion.h create mode 100644 contrib/src/stc/scintilla/src/WindowAccessor.cxx create mode 100644 contrib/src/stc/stc.cpp.in create mode 100644 contrib/src/stc/stc.h.in create mode 100644 debian/libwxbase-dbg.dirs create mode 100644 debian/libwxbase-dbg.links create mode 100644 debian/libwxbase-dbg.postinst create mode 100644 debian/libwxbase-dbg.prerm delete mode 100644 debian/libwxbase-dev.docs create mode 100644 debian/libwxbase-msw-dev.dirs create mode 100644 debian/libwxbase-msw-dev.links create mode 100644 debian/libwxbase-msw-dev.postinst create mode 100644 debian/libwxbase-msw-dev.prerm delete mode 100644 debian/libwxbase.docs delete mode 100644 debian/libwxbase.files create mode 100644 debian/libwxgtk-contrib-dev.dirs create mode 100644 debian/libwxgtk-contrib-dev.files create mode 100644 debian/libwxgtk-contrib.dirs create mode 100644 debian/libwxgtk-contrib.postinst create mode 100644 debian/libwxgtk-dbg.dirs create mode 100644 debian/libwxgtk-dbg.links create mode 100644 debian/libwxgtk-dbg.postinst create mode 100644 debian/libwxgtk-dbg.prerm delete mode 100644 debian/libwxgtk-dev.docs delete mode 100644 debian/libwxgtk.docs delete mode 100644 debian/libwxgtk.files create mode 100644 debian/libwxmsw-dev.dirs create mode 100644 debian/libwxmsw-dev.links create mode 100644 debian/libwxmsw-dev.postinst create mode 100644 debian/libwxmsw-dev.prerm create mode 100644 debian/lintian-override rename debian/{wxwin-doc.doc-base.in => wxwin-doc.doc-base} (100%) delete mode 100644 debian/wxwin-examples.docs create mode 100644 debian/wxwin-headers-msw.dirs create mode 100644 debian/wxwin-headers.dirs create mode 100644 debian/wxwin-headers.files create mode 100644 debian/wxwin-i18n.dirs create mode 100644 debian/wxwin-i18n.files create mode 100644 demos/bombs/BombsVC.dsp create mode 100644 demos/bombs/BombsVC.dsw create mode 100644 demos/dbbrowse/DbbrowseVC.dsp create mode 100644 demos/dbbrowse/DbbrowseVC.dsw create mode 100644 demos/dbbrowse/dbbrowse.dsp create mode 100644 demos/dbbrowse/dbbrowse.dsw create mode 100644 demos/dbbrowse/dummy.cpp delete mode 100644 demos/dbbrowse/makefile.gtk create mode 100644 demos/forty/FortyVC.dsp create mode 100644 demos/forty/FortyVC.dsw create mode 100644 demos/fractal/FractalVC.dsp create mode 100644 demos/fractal/FractalVC.dsw create mode 100644 demos/life/LifeVC.dsp create mode 100644 demos/life/LifeVC.dsw create mode 100644 demos/life/bitmaps/info.bmp create mode 100644 demos/life/bitmaps/info.xpm create mode 100644 demos/life/bitmaps/open.bmp create mode 100644 demos/life/bitmaps/open.xpm create mode 100644 demos/life/breeder.lif create mode 100644 demos/life/reader.cpp create mode 100644 demos/life/reader.h create mode 100644 demos/poem/PoemVC.dsp create mode 100644 demos/poem/PoemVC.dsw create mode 100755 distrib/msw/expdwild.bat create mode 100644 distrib/msw/extradoc.rsp create mode 100755 distrib/msw/filerepl.bat create mode 100644 distrib/msw/innobott.txt create mode 100644 distrib/msw/innotop.txt create mode 100755 distrib/msw/makeall.bat create mode 100755 distrib/msw/makeinno.bat create mode 100644 distrib/msw/tarwxmotif create mode 100644 distrib/msw/tmake/vc6bdll.t create mode 100644 distrib/msw/tmake/vcapp.t create mode 100644 distrib/msw/utilmake.rsp create mode 100644 distrib/msw/utils.rsp create mode 100755 distrib/msw/vcupdate.bat create mode 100644 distrib/msw/wx_chm.rsp create mode 100644 distrib/msw/wx_htb.rsp create mode 100755 distrib/msw/zipdistinno.bat create mode 100644 docs/base/install.txt create mode 100644 docs/base/todo.txt delete mode 100644 docs/html/gettext/gettext.htm create mode 100644 docs/html/gettext/gettext_1.html create mode 100644 docs/html/gettext/gettext_10.html create mode 100644 docs/html/gettext/gettext_11.html create mode 100644 docs/html/gettext/gettext_12.html create mode 100644 docs/html/gettext/gettext_2.html create mode 100644 docs/html/gettext/gettext_3.html create mode 100644 docs/html/gettext/gettext_4.html create mode 100644 docs/html/gettext/gettext_5.html create mode 100644 docs/html/gettext/gettext_6.html create mode 100644 docs/html/gettext/gettext_7.html create mode 100644 docs/html/gettext/gettext_8.html create mode 100644 docs/html/gettext/gettext_9.html create mode 100644 docs/html/gettext/gettext_foot.html create mode 100644 docs/html/gettext/gettext_toc.html create mode 100644 docs/html/gettext/index.html delete mode 100644 docs/html/gettext/msgfmt.htm delete mode 100644 docs/html/gettext/xgettext.htm create mode 100644 docs/html/makedist.htm delete mode 100644 docs/install.txt create mode 100644 docs/latex/wx/caret.tex create mode 100644 docs/latex/wx/cmdlpars.tex create mode 100644 docs/latex/wx/csconv.tex create mode 100644 docs/latex/wx/datespan.tex create mode 100644 docs/latex/wx/db.tex create mode 100644 docs/latex/wx/dialevt.tex create mode 100644 docs/latex/wx/dialup.tex create mode 100644 docs/latex/wx/dllload.tex create mode 100644 docs/latex/wx/flexsizr.tex create mode 100644 docs/latex/wx/gridattr.tex create mode 100644 docs/latex/wx/gridedit.tex create mode 100644 docs/latex/wx/gridrend.tex create mode 100644 docs/latex/wx/gridsizr.tex create mode 100644 docs/latex/wx/gridtbl.tex create mode 100644 docs/latex/wx/gridwork.tex create mode 100644 docs/latex/wx/mbcnvfil.tex create mode 100644 docs/latex/wx/mbcnvut7.tex create mode 100644 docs/latex/wx/mbcnvut8.tex create mode 100644 docs/latex/wx/mbconv.tex create mode 100644 docs/latex/wx/spinevt.tex create mode 100644 docs/latex/wx/table.tex create mode 100644 docs/latex/wx/timespan.tex create mode 100644 docs/latex/wx/tmbconv.tex create mode 100644 docs/latex/wx/tooltip.tex create mode 100644 docs/latex/wx/wizard.tex create mode 100644 docs/latex/wx/wizevt.tex create mode 100644 docs/latex/wx/wizpage.tex create mode 100644 docs/latex/wx/wxManualTemplate.dot delete mode 100644 docs/msw/mingw32.txt create mode 100644 docs/tech/tn0004.htm create mode 100644 docs/tech/tn0005.txt create mode 100644 docs/tech/tn0006.txt rename docs/{msw/bc_ide.txt => tech/tn0007.txt} (58%) create mode 100644 docs/tech/tn0008.htm create mode 100644 docs/tech/tn0009.htm create mode 100644 docs/tech/tn0010.htm create mode 100644 include/wx/fontenc.h create mode 100644 include/wx/msw/colours.bmp create mode 100644 include/wx/msw/gccpriv.h create mode 100644 include/wx/msw/helpchm.h delete mode 100644 include/wx/setup.h rename lib/{wx214.def => wx22.def} (97%) create mode 100644 locale/.cvsignore create mode 100644 locale/da.po delete mode 100644 locale/dk.po create mode 100644 locale/es.po create mode 100644 locale/fr.po create mode 100644 locale/it.po create mode 100644 locale/nl.po create mode 100644 locale/ru.po create mode 100644 locale/sl.po create mode 100644 locale/sv.po create mode 100644 locale/zh.po create mode 100644 misc/afm/Zapf.afm create mode 100644 misc/gs_afm/Zapf.afm create mode 100644 samples/SamplesVC.dsw create mode 100644 samples/calendar/CalendarVC.dsp create mode 100644 samples/calendar/CalendarVC.dsw create mode 100644 samples/caret/CaretVC.dsp create mode 100644 samples/caret/CaretVC.dsw create mode 100644 samples/checklst/CheckLstVC.dsp create mode 100644 samples/checklst/CheckLstVC.dsw create mode 100644 samples/config/ConfigVC.dsp create mode 100644 samples/config/ConfigVC.dsw create mode 100644 samples/controls/ControlsVC.dsp create mode 100644 samples/controls/ControlsVC.dsw create mode 100644 samples/db/DbVC.dsp create mode 100644 samples/db/DbVC.dsw create mode 100644 samples/dialogs/DialogsVC.dsp create mode 100644 samples/dialogs/DialogsVC.dsw create mode 100644 samples/dialup/DialupVC.dsp create mode 100644 samples/dialup/DialupVC.dsw create mode 100644 samples/dnd/DndVC.dsp create mode 100644 samples/dnd/DndVC.dsw create mode 100644 samples/dnd/dnd_copy.cur create mode 100644 samples/dnd/dnd_copy.xpm create mode 100644 samples/dnd/dnd_move.cur create mode 100644 samples/dnd/dnd_move.xpm create mode 100644 samples/dnd/dnd_none.cur create mode 100644 samples/dnd/dnd_none.xpm create mode 100644 samples/docview/DocViewVC.dsp create mode 100644 samples/docview/DocViewVC.dsw create mode 100644 samples/docvwmdi/DocVwMDIVC.dsp create mode 100644 samples/docvwmdi/DocVwMDIVC.dsw create mode 100644 samples/dragimag/DragimagVC.dsp create mode 100644 samples/dragimag/DragimagVC.dsw create mode 100644 samples/drawing/DrawingVC.dsp create mode 100644 samples/drawing/DrawingVC.dsw create mode 100644 samples/dynamic/DynamicVC.dsp create mode 100644 samples/dynamic/DynamicVC.dsw create mode 100644 samples/exec/ExecVC.dsp create mode 100644 samples/exec/ExecVC.dsw create mode 100644 samples/font/FontVC.dsp create mode 100644 samples/font/FontVC.dsw create mode 100644 samples/grid/GridVC.dsp create mode 100644 samples/grid/GridVC.dsw create mode 100644 samples/help/HelpVC.dsp create mode 100644 samples/help/HelpVC.dsw create mode 100644 samples/help/doc.chm create mode 100644 samples/help/doc.hhc create mode 100644 samples/help/doc.hhk create mode 100644 samples/help/doc.hhp delete mode 100644 samples/help/doc/gifs.db create mode 100644 samples/html/about/AboutVC.dsp create mode 100644 samples/html/about/AboutVC.dsw create mode 100644 samples/html/help/HelpVC.dsp create mode 100644 samples/html/help/HelpVC.dsw create mode 100644 samples/html/helpview/HelpViewVC.dsp create mode 100644 samples/html/helpview/HelpViewVC.dsw create mode 100644 samples/html/printing/PrintingVC.dsp create mode 100644 samples/html/printing/PrintingVC.dsw create mode 100644 samples/html/test/TestVC.dsp create mode 100644 samples/html/test/TestVC.dsw create mode 100644 samples/html/virtual/VirtualVC.dsp create mode 100644 samples/html/virtual/VirtualVC.dsw create mode 100644 samples/html/widget/WidgetVC.dsp create mode 100644 samples/html/widget/WidgetVC.dsw create mode 100644 samples/html/zip/ZipVC.dsp create mode 100644 samples/html/zip/ZipVC.dsw create mode 100644 samples/image/ImageVC.dsp create mode 100644 samples/image/ImageVC.dsw create mode 100644 samples/internat/InternatVC.dsp create mode 100644 samples/internat/InternatVC.dsw create mode 100644 samples/internat/ru/internat.mo create mode 100644 samples/internat/ru/internat.po create mode 100644 samples/internat/ru/wxstd.mo create mode 100644 samples/internat/ru/wxstd.po create mode 100644 samples/ipc/ClientVC.dsp create mode 100644 samples/ipc/ClientVC.dsw create mode 100644 samples/ipc/ServerVC.dsp create mode 100644 samples/ipc/ServerVC.dsw create mode 100644 samples/joytest/JoytestVC.dsp create mode 100644 samples/joytest/JoytestVC.dsw create mode 100644 samples/layout/LayoutVC.dsp create mode 100644 samples/layout/LayoutVC.dsw create mode 100644 samples/listctrl/ListctrlVC.dsp create mode 100644 samples/listctrl/ListctrlVC.dsw create mode 100644 samples/mdi/MdiVC.dsp create mode 100644 samples/mdi/MdiVC.dsw create mode 100644 samples/memcheck/MemcheckVC.dsp create mode 100644 samples/memcheck/MemcheckVC.dsw create mode 100644 samples/menu/MenuVC.dsp create mode 100644 samples/menu/MenuVC.dsw create mode 100644 samples/mfc/MfcVC.dsp rename src/xpm/xpm.dsw => samples/mfc/MfcVC.dsw (90%) create mode 100644 samples/minifram/MiniframVC.dsp create mode 100644 samples/minifram/MiniframVC.dsw create mode 100644 samples/minimal/MinimalVC.dsp create mode 100644 samples/minimal/MinimalVC.dsw create mode 100644 samples/minimal/minimal.rc4 create mode 100644 samples/nativdlg/NativdlgVC.dsp create mode 100644 samples/nativdlg/NativdlgVC.dsw create mode 100644 samples/ownerdrw/OwnerdrwVC.dsp create mode 100644 samples/ownerdrw/OwnerdrwVC.dsw create mode 100644 samples/plot/PlotVC.dsp create mode 100644 samples/plot/PlotVC.dsw create mode 100644 samples/png/PngVC.dsp create mode 100644 samples/png/PngVC.dsw create mode 100644 samples/printing/PrintingVC.dsp create mode 100644 samples/printing/PrintingVC.dsw create mode 100644 samples/proplist/ProplistVC.dsp create mode 100644 samples/proplist/ProplistVC.dsw create mode 100644 samples/propsize/PropsizeVC.dsp create mode 100644 samples/propsize/PropsizeVC.dsw create mode 100644 samples/regtest/RegtestVC.dsp create mode 100644 samples/regtest/RegtestVC.dsw create mode 100644 samples/resource/ResourceVC.dsp create mode 100644 samples/resource/ResourceVC.dsw create mode 100644 samples/richedit/RichEditVC.dsp create mode 100644 samples/richedit/RichEditVC.dsw create mode 100644 samples/rotate/RotateVC.dsp create mode 100644 samples/rotate/RotateVC.dsw create mode 100644 samples/sashtest/SashtestVC.dsp create mode 100644 samples/sashtest/SashtestVC.dsw create mode 100644 samples/scroll/ScrollVC.dsp create mode 100644 samples/scroll/ScrollVC.dsw create mode 100644 samples/scrollsub/ScrollsubVC.dsp create mode 100644 samples/scrollsub/ScrollsubVC.dsw create mode 100644 samples/sockets/ClientVC.dsp create mode 100644 samples/sockets/ClientVC.dsw create mode 100644 samples/sockets/ServerVC.dsp create mode 100644 samples/sockets/ServerVC.dsw create mode 100644 samples/splitter/SplitterVC.dsp create mode 100644 samples/splitter/SplitterVC.dsw create mode 100644 samples/statbar/StatbarVC.dsp create mode 100644 samples/statbar/StatbarVC.dsw create mode 100644 samples/stc/StcTestVC.dsp create mode 100644 samples/stc/StcTestVC.dsw create mode 100644 samples/tab/TabVC.dsp create mode 100644 samples/tab/TabVC.dsw create mode 100644 samples/taskbar/TaskbarVC.dsp create mode 100644 samples/taskbar/TaskbarVC.dsw create mode 100644 samples/text/TextVC.dsp create mode 100644 samples/text/TextVC.dsw create mode 100644 samples/thread/ThreadVC.dsp create mode 100644 samples/thread/ThreadVC.dsw create mode 100644 samples/toolbar/ToolbarVC.dsp create mode 100644 samples/toolbar/ToolbarVC.dsw create mode 100644 samples/treectrl/TreectrlVC.dsp create mode 100644 samples/treectrl/TreectrlVC.dsw create mode 100644 samples/treelay/TreelayVC.dsp create mode 100644 samples/treelay/TreelayVC.dsw create mode 100644 samples/typetest/TypetestVC.dsp create mode 100644 samples/typetest/TypetestVC.dsw create mode 100644 samples/validate/ValidateVC.dsp create mode 100644 samples/validate/ValidateVC.dsw create mode 100644 samples/wizard/WizardVC.dsp create mode 100644 samples/wizard/WizardVC.dsw create mode 100644 src/common/base.rc delete mode 100644 src/gtk/threadpsx.cpp delete mode 100644 src/gtk1/threadpsx.cpp delete mode 100644 src/html/htmlfilter.cpp delete mode 100644 src/html/htmlhelp.cpp delete mode 100644 src/html/search.cpp rename src/jpeg/{jpeg.dsp => JpegVC.dsp} (100%) rename src/jpeg/{jpeg.dsw => JpegVC.dsw} (90%) delete mode 100644 src/makeenvs/linux.env delete mode 100644 src/makeenvs/sgi.env delete mode 100644 src/makeenvs/solaris.env create mode 100644 src/msw/helpchm.cpp create mode 100644 src/msw/version.rc rename src/png/{png.dsp => PngVC.dsp} (92%) rename src/{tiff/tiff.dsw => png/PngVC.dsw} (90%) delete mode 100644 src/png/makefile.nt delete mode 100644 src/regex/COPYRIGHT delete mode 100644 src/regex/Makefile delete mode 100644 src/regex/README delete mode 100644 src/regex/WHATSNEW delete mode 100644 src/regex/cclass.h delete mode 100644 src/regex/cname.h delete mode 100644 src/regex/engine.ih delete mode 100644 src/regex/mkh delete mode 100644 src/regex/re_syntax.n delete mode 100644 src/regex/regc_color.c delete mode 100644 src/regex/regc_lex.c delete mode 100644 src/regex/regc_nfa.c delete mode 100644 src/regex/regcomp.ih delete mode 100644 src/regex/rege_dfa.c delete mode 100644 src/regex/regerror.c delete mode 100644 src/regex/regerror.ih delete mode 100644 src/regex/regerrs.h delete mode 100644 src/regex/regex.3 delete mode 100644 src/regex/regex.7 delete mode 100644 src/regex/regex.h delete mode 100644 src/regex/regexec.c delete mode 100644 src/regex/regfree.c delete mode 100644 src/regex/regfronts.c delete mode 100644 src/regex/regguts.h delete mode 100644 src/regex/tests create mode 100644 src/stc/gen_iface.py create mode 100644 src/stc/scintilla/include/PosRegExp.h create mode 100644 src/stc/scintilla/include/Scintilla.iface create mode 100644 src/stc/scintilla/include/ScintillaWidget.h create mode 100644 src/stc/scintilla/include/WindowAccessor.h delete mode 100644 src/stc/scintilla/src/Accessor.cxx create mode 100644 src/stc/scintilla/src/DocumentAccessor.cxx create mode 100644 src/stc/scintilla/src/DocumentAccessor.h create mode 100644 src/stc/scintilla/src/LexCPP.cxx create mode 100644 src/stc/scintilla/src/LexHTML.cxx create mode 100644 src/stc/scintilla/src/LexLua.cxx create mode 100644 src/stc/scintilla/src/LexOthers.cxx create mode 100644 src/stc/scintilla/src/LexPerl.cxx create mode 100644 src/stc/scintilla/src/LexPython.cxx create mode 100644 src/stc/scintilla/src/LexSQL.cxx create mode 100644 src/stc/scintilla/src/LexVB.cxx create mode 100644 src/stc/scintilla/src/PosRegExp.cxx create mode 100644 src/stc/scintilla/src/UniConversion.cxx create mode 100644 src/stc/scintilla/src/UniConversion.h create mode 100644 src/stc/scintilla/src/WindowAccessor.cxx create mode 100644 src/stc/stc.cpp.in create mode 100644 src/stc/stc.h.in rename src/tiff/{tiff.dsp => TiffVC.dsp} (100%) create mode 100644 src/tiff/TiffVC.dsw create mode 100644 src/tiff/makefile.wat delete mode 100644 src/unix/net.cpp rename src/xpm/{attrib.c => Attrib.c} (99%) rename src/xpm/{crbuffri.c => CrBufFrI.c} (100%) rename src/xpm/{crdatfri.c => CrDatFrI.c} (100%) rename src/xpm/{crifrbuf.c => CrIFrBuf.c} (100%) rename src/xpm/{crifrdat.c => CrIFrDat.c} (100%) rename src/xpm/{image.c => Image.c} (100%) rename src/xpm/{info.c => Info.c} (100%) rename src/xpm/{rdftodat.c => RdFToDat.c} (100%) rename src/xpm/{rdftoi.c => RdFToI.c} (99%) rename src/xpm/{wrffrdat.c => WrFFrDat.c} (100%) rename src/xpm/{wrffri.c => WrFFrI.c} (100%) rename src/xpm/{xpmi.h => XpmI.h} (100%) create mode 100644 src/xpm/XpmVC.dsp rename src/{png/png.dsw => xpm/XpmVC.dsw} (90%) rename src/zlib/{zlib.dsp => ZlibVC.dsp} (100%) create mode 100644 src/zlib/ZlibVC.dsw delete mode 100644 src/zlib/zlib.dsw create mode 100644 utils/HelpGen/src/HelpGenVC.dsp create mode 100644 utils/HelpGen/src/HelpGenVC.dsw rename utils/{wxPython/demo => Install/builder}/bitmaps/copy.bmp (100%) create mode 100644 utils/Install/builder/bitmaps/copy.xpm create mode 100644 utils/Install/builder/bitmaps/cut.bmp create mode 100644 utils/Install/builder/bitmaps/cut.xpm create mode 100644 utils/Install/builder/bitmaps/help.bmp create mode 100644 utils/Install/builder/bitmaps/help.xpm rename utils/{wxPython/demo => Install/builder}/bitmaps/new.bmp (100%) create mode 100644 utils/Install/builder/bitmaps/new.xpm create mode 100644 utils/Install/builder/bitmaps/open.bmp create mode 100644 utils/Install/builder/bitmaps/open.xpm create mode 100644 utils/Install/builder/bitmaps/page.bmp rename utils/{wxPython/demo => Install/builder}/bitmaps/paste.bmp (100%) create mode 100644 utils/Install/builder/bitmaps/preview.bmp create mode 100644 utils/Install/builder/bitmaps/preview.xpm create mode 100644 utils/Install/builder/bitmaps/print.bmp create mode 100644 utils/Install/builder/bitmaps/print.xpm create mode 100644 utils/Install/builder/bitmaps/save.bmp create mode 100644 utils/Install/builder/bitmaps/save.xpm create mode 100644 utils/Install/builder/makefile create mode 100644 utils/Install/builder/makefile.b32 create mode 100644 utils/Install/builder/makefile.bcc create mode 100644 utils/Install/builder/makefile.dos create mode 100644 utils/Install/builder/makefile.g95 create mode 100644 utils/Install/builder/makefile.sc create mode 100644 utils/Install/builder/makefile.sl create mode 100644 utils/Install/builder/makefile.twn create mode 100644 utils/Install/builder/makefile.unx create mode 100644 utils/Install/builder/makefile.vc create mode 100644 utils/Install/builder/makefile.wat rename utils/{wxPython/demo/bitmaps => Install/builder}/mondrian.ico (100%) create mode 100644 utils/Install/builder/mondrian.xpm create mode 100644 utils/Install/builder/wxib.cpp create mode 100644 utils/Install/builder/wxib.def create mode 100644 utils/Install/builder/wxib.rc create mode 100644 utils/Install/builder/wxibVC.dsp create mode 100644 utils/Install/builder/wxibvc.dsw create mode 100644 utils/Install/incace/acestruc.h create mode 100644 utils/Install/incace/attribs.h create mode 100644 utils/Install/incace/declare.h create mode 100644 utils/Install/incace/globals.h create mode 100644 utils/Install/incace/os.h create mode 100644 utils/Install/incace/portable.h create mode 100644 utils/Install/incace/uac_comm.h create mode 100644 utils/Install/incace/uac_crc.h create mode 100644 utils/Install/incace/uac_crt.h create mode 100644 utils/Install/incace/uac_dcpr.h create mode 100644 utils/Install/incace/uac_sys.h create mode 100644 utils/Install/incace/unace.h create mode 100644 utils/Install/inczip/consts.h create mode 100644 utils/Install/inczip/crypt.h create mode 100644 utils/Install/inczip/ebcdic.h create mode 100644 utils/Install/inczip/globals.h create mode 100644 utils/Install/inczip/inflate.h create mode 100644 utils/Install/inczip/nt.h create mode 100644 utils/Install/inczip/os2acl.h create mode 100644 utils/Install/inczip/os2cfg.h create mode 100644 utils/Install/inczip/os2data.h create mode 100644 utils/Install/inczip/rsxntwin.h create mode 100644 utils/Install/inczip/tables.h create mode 100644 utils/Install/inczip/ttyio.h create mode 100644 utils/Install/inczip/unzip.h create mode 100644 utils/Install/inczip/unzpriv.h create mode 100644 utils/Install/inczip/version.h create mode 100644 utils/Install/inczip/w32cfg.h create mode 100644 utils/Install/inczip/zip.h create mode 100644 utils/Install/install.c create mode 100644 utils/Install/install.h create mode 100644 utils/Install/instsup.cpp create mode 100644 utils/Install/instsup.h create mode 100644 utils/Install/packace/globals.c create mode 100644 utils/Install/packace/makefile create mode 100644 utils/Install/packace/makefile.b32 create mode 100644 utils/Install/packace/makefile.g95 create mode 100644 utils/Install/packace/makefile.gcc create mode 100644 utils/Install/packace/uac_comm.c create mode 100644 utils/Install/packace/uac_crc.c create mode 100644 utils/Install/packace/uac_crt.c create mode 100644 utils/Install/packace/uac_dcpr.c create mode 100644 utils/Install/packace/uac_sys.c create mode 100644 utils/Install/packace/unace.c create mode 100644 utils/Install/packzip/api.c create mode 100644 utils/Install/packzip/apihelp.c create mode 100644 utils/Install/packzip/crc32.c create mode 100644 utils/Install/packzip/crc_i386.S create mode 100644 utils/Install/packzip/crc_i386.asm create mode 100644 utils/Install/packzip/crc_i386.c create mode 100644 utils/Install/packzip/crc_lcc.asm create mode 100644 utils/Install/packzip/crctab.c create mode 100644 utils/Install/packzip/crypt.c create mode 100644 utils/Install/packzip/envargs.c create mode 100644 utils/Install/packzip/explode.c create mode 100644 utils/Install/packzip/extract.c create mode 100644 utils/Install/packzip/fileio.c create mode 100644 utils/Install/packzip/funzip.c create mode 100644 utils/Install/packzip/globals.c create mode 100644 utils/Install/packzip/inflate.c create mode 100644 utils/Install/packzip/list.c create mode 100644 utils/Install/packzip/makefile create mode 100644 utils/Install/packzip/makefile.b32 create mode 100644 utils/Install/packzip/makefile.g95 create mode 100644 utils/Install/packzip/makefile.gcc create mode 100644 utils/Install/packzip/makefile.os2 create mode 100644 utils/Install/packzip/match.c create mode 100644 utils/Install/packzip/nt.c create mode 100644 utils/Install/packzip/os2.c create mode 100644 utils/Install/packzip/os2acl.c create mode 100644 utils/Install/packzip/process.c create mode 100644 utils/Install/packzip/rexxapi.c create mode 100644 utils/Install/packzip/rexxapi.def create mode 100644 utils/Install/packzip/rexxhelp.c create mode 100644 utils/Install/packzip/stub.def create mode 100644 utils/Install/packzip/ttyio.c create mode 100644 utils/Install/packzip/unix.c create mode 100644 utils/Install/packzip/unreduce.c create mode 100644 utils/Install/packzip/unshrink.c create mode 100644 utils/Install/packzip/unzip.c create mode 100644 utils/Install/packzip/unzip.def create mode 100644 utils/Install/packzip/unzipstb.c create mode 100644 utils/Install/packzip/win32.c create mode 100644 utils/Install/packzip/zipinfo.c create mode 100644 utils/Install/script/finished.ini create mode 100644 utils/Install/script/finished.wxr create mode 100644 utils/Install/script/install.bmp create mode 100644 utils/Install/script/install.xpm create mode 100644 utils/Install/script/license.txt create mode 100644 utils/Install/script/nocheck.ini create mode 100644 utils/Install/script/page1.ini create mode 100644 utils/Install/script/page1.wxr create mode 100644 utils/Install/script/page2.ini create mode 100644 utils/Install/script/page2.wxr create mode 100644 utils/Install/script/page3.ini create mode 100644 utils/Install/script/page3.wxr create mode 100644 utils/Install/script/page4.ini create mode 100644 utils/Install/script/page4.wxr create mode 100644 utils/Install/script/readme.ini create mode 100644 utils/Install/script/readme.txt create mode 100644 utils/Install/script/wxinst.cfg create mode 100644 utils/Install/sfxace/globals.c create mode 100644 utils/Install/sfxace/install.PRJ create mode 100644 utils/Install/sfxace/install.def create mode 100644 utils/Install/sfxace/install.rc create mode 100644 utils/Install/sfxace/makefile create mode 100644 utils/Install/sfxace/makefile.b32 create mode 100644 utils/Install/sfxace/makefile.g95 create mode 100644 utils/Install/sfxace/makefile.gcc create mode 100644 utils/Install/sfxace/sfx.RES create mode 100644 utils/Install/sfxace/sfx.rc create mode 100644 utils/Install/sfxace/uac_comm.c create mode 100644 utils/Install/sfxace/uac_crc.c create mode 100644 utils/Install/sfxace/uac_crt.c create mode 100644 utils/Install/sfxace/uac_dcpr.c create mode 100644 utils/Install/sfxace/uac_sys.c create mode 100644 utils/Install/sfxace/unace.c create mode 100644 utils/Install/sfxzip/api.c create mode 100644 utils/Install/sfxzip/apihelp.c create mode 100644 utils/Install/sfxzip/crc32.c create mode 100644 utils/Install/sfxzip/crc_i386.S create mode 100644 utils/Install/sfxzip/crc_i386.asm create mode 100644 utils/Install/sfxzip/crc_i386.c create mode 100644 utils/Install/sfxzip/crc_lcc.asm create mode 100644 utils/Install/sfxzip/crctab.c create mode 100644 utils/Install/sfxzip/crypt.c create mode 100644 utils/Install/sfxzip/envargs.c create mode 100644 utils/Install/sfxzip/explode.c create mode 100644 utils/Install/sfxzip/extract.c create mode 100644 utils/Install/sfxzip/fileio.c create mode 100644 utils/Install/sfxzip/funzip.c create mode 100644 utils/Install/sfxzip/globals.c create mode 100644 utils/Install/sfxzip/inflate.c create mode 100644 utils/Install/sfxzip/list.c create mode 100644 utils/Install/sfxzip/makefile create mode 100644 utils/Install/sfxzip/makefile.b32 create mode 100644 utils/Install/sfxzip/makefile.g95 create mode 100644 utils/Install/sfxzip/makefile.gcc create mode 100644 utils/Install/sfxzip/makefile.os2 create mode 100644 utils/Install/sfxzip/match.c create mode 100644 utils/Install/sfxzip/nt.c create mode 100644 utils/Install/sfxzip/os2.c create mode 100644 utils/Install/sfxzip/os2acl.c create mode 100644 utils/Install/sfxzip/process.c create mode 100644 utils/Install/sfxzip/rexxapi.c create mode 100644 utils/Install/sfxzip/rexxhelp.c create mode 100644 utils/Install/sfxzip/sfx.RES create mode 100644 utils/Install/sfxzip/sfx.rc create mode 100644 utils/Install/sfxzip/ttyio.c create mode 100644 utils/Install/sfxzip/unix.c create mode 100644 utils/Install/sfxzip/unreduce.c create mode 100644 utils/Install/sfxzip/unshrink.c create mode 100644 utils/Install/sfxzip/unzip.c create mode 100644 utils/Install/sfxzip/unzipstb.c create mode 100644 utils/Install/sfxzip/win32.c create mode 100644 utils/Install/sfxzip/zipinfo.c create mode 100644 utils/Install/wxmain.cpp create mode 100644 utils/dialoged/docs/copyhght.bmp create mode 100644 utils/dialoged/docs/copyhght.gif create mode 100644 utils/dialoged/docs/copywdth.bmp create mode 100644 utils/dialoged/docs/copywdth.gif create mode 100644 utils/dialoged/docs/disthor.bmp create mode 100644 utils/dialoged/docs/disthor.gif create mode 100644 utils/dialoged/docs/distvert.bmp create mode 100644 utils/dialoged/docs/distvert.gif create mode 100644 utils/dialoged/src/DialogEdVC.dsp create mode 100644 utils/dialoged/src/DialogEdVC.dsw create mode 100644 utils/dialoged/src/bitmaps/copyhght.bmp create mode 100644 utils/dialoged/src/bitmaps/copyhght.xpm create mode 100644 utils/dialoged/src/bitmaps/copywdth.bmp create mode 100644 utils/dialoged/src/bitmaps/copywdth.xpm create mode 100644 utils/dialoged/src/bitmaps/disthor.bmp create mode 100644 utils/dialoged/src/bitmaps/disthor.xpm create mode 100644 utils/dialoged/src/bitmaps/distvert.bmp create mode 100644 utils/dialoged/src/bitmaps/distvert.xpm create mode 100644 utils/hhp2cached/hhp2cachedVC.dsp create mode 100644 utils/hhp2cached/hhp2cachedVC.dsw create mode 100644 utils/tex2rtf/src/Tex2RTFVC.dsp create mode 100644 utils/tex2rtf/src/Tex2RTFVC.dsw delete mode 100644 utils/wxPython/.cvsignore delete mode 100644 utils/wxPython/BUILD.txt delete mode 100644 utils/wxPython/Makefile delete mode 100644 utils/wxPython/SWIG.patches/Include.patch delete mode 100644 utils/wxPython/SWIG.patches/Modules.patch delete mode 100644 utils/wxPython/SWIG.patches/SWIG.patch delete mode 100755 utils/wxPython/buildall delete mode 100755 utils/wxPython/buildall.bat delete mode 100644 utils/wxPython/demo/FileBrowseButton.py delete mode 100644 utils/wxPython/demo/Main.py delete mode 100644 utils/wxPython/demo/OldSizers.py delete mode 100644 utils/wxPython/demo/wxGrid.py delete mode 100644 utils/wxPython/demo/wxTextEntryDialog.py delete mode 100644 utils/wxPython/distrib/.rpmrc delete mode 100755 utils/wxPython/distrib/makerpm delete mode 100755 utils/wxPython/distrib/maketgz delete mode 100644 utils/wxPython/distrib/wxPython.rsp delete mode 100644 utils/wxPython/distrib/wxPython.spec.in delete mode 100644 utils/wxPython/distrib/wxPython.wsm delete mode 100755 utils/wxPython/distrib/zipit.bat delete mode 100644 utils/wxPython/lib/filebrowsebutton.py delete mode 100644 utils/wxPython/lib/sizers/.cvsignore delete mode 100644 utils/wxPython/lib/sizers/__init__.py delete mode 100644 utils/wxPython/lib/sizers/border.py delete mode 100644 utils/wxPython/lib/sizers/box.py delete mode 100644 utils/wxPython/lib/sizers/shape.py delete mode 100644 utils/wxPython/lib/sizers/sizer.py delete mode 100644 utils/wxPython/modules/README delete mode 100755 utils/wxPython/modules/buildall.py delete mode 100644 utils/wxPython/modules/glcanvas/build.cfg delete mode 100644 utils/wxPython/modules/glcanvas/glcanvasc.def delete mode 100644 utils/wxPython/modules/html/.cvsignore delete mode 100644 utils/wxPython/modules/html/BUGS delete mode 100644 utils/wxPython/modules/html/README delete mode 100644 utils/wxPython/modules/html/build.cfg delete mode 100644 utils/wxPython/modules/html/helpsys.cpp delete mode 100644 utils/wxPython/modules/html/helpsys.h delete mode 100644 utils/wxPython/modules/html/htmlc.def delete mode 100644 utils/wxPython/modules/html/htmlhelper.py delete mode 100644 utils/wxPython/modules/html/test/helpsys.py delete mode 100644 utils/wxPython/modules/html/test/htmlhelp.py delete mode 100644 utils/wxPython/modules/html/test/htmlview.py delete mode 100644 utils/wxPython/modules/html/test/htmlwidget.py delete mode 100644 utils/wxPython/modules/lseditor/.cvsignore delete mode 100644 utils/wxPython/modules/lseditor/BUGS delete mode 100644 utils/wxPython/modules/lseditor/COPYING delete mode 100644 utils/wxPython/modules/lseditor/README delete mode 100644 utils/wxPython/modules/lseditor/build.cfg delete mode 100644 utils/wxPython/modules/lseditor/config.h delete mode 100644 utils/wxPython/modules/lseditor/controlarea.h delete mode 100644 utils/wxPython/modules/lseditor/editorpl.h delete mode 100644 utils/wxPython/modules/lseditor/finddlg.cpp delete mode 100644 utils/wxPython/modules/lseditor/finddlg.h delete mode 100644 utils/wxPython/modules/lseditor/gtk/.cvsignore delete mode 100644 utils/wxPython/modules/lseditor/gtk/lseditor.cpp delete mode 100644 utils/wxPython/modules/lseditor/gtk/lseditor.py delete mode 100644 utils/wxPython/modules/lseditor/lseditor.i delete mode 100644 utils/wxPython/modules/lseditor/lseditorc.def delete mode 100644 utils/wxPython/modules/lseditor/lseditorpl.cpp delete mode 100644 utils/wxPython/modules/lseditor/lseditorpl.h delete mode 100644 utils/wxPython/modules/lseditor/markup.cpp delete mode 100644 utils/wxPython/modules/lseditor/markup.h delete mode 100644 utils/wxPython/modules/lseditor/msw/.cvsignore delete mode 100644 utils/wxPython/modules/lseditor/msw/lseditor.cpp delete mode 100644 utils/wxPython/modules/lseditor/msw/lseditor.py delete mode 100644 utils/wxPython/modules/lseditor/plugin.cpp delete mode 100644 utils/wxPython/modules/lseditor/plugin.h delete mode 100644 utils/wxPython/modules/lseditor/sourcepainter.cpp delete mode 100644 utils/wxPython/modules/lseditor/sourcepainter.h delete mode 100644 utils/wxPython/modules/lseditor/tdefs.cpp delete mode 100644 utils/wxPython/modules/lseditor/tdefs.h delete mode 100644 utils/wxPython/modules/lseditor/test/editor.py delete mode 100644 utils/wxPython/modules/lseditor/wxsdefs.h delete mode 100644 utils/wxPython/modules/lseditor/wxstlac.h delete mode 100644 utils/wxPython/modules/lseditor/wxstldefs.h delete mode 100644 utils/wxPython/modules/lseditor/wxstllst.h delete mode 100644 utils/wxPython/modules/lseditor/wxstlvec.h delete mode 100644 utils/wxPython/modules/ogl/build.cfg delete mode 100644 utils/wxPython/modules/ogl/ogl.cpp delete mode 100644 utils/wxPython/modules/ogl/oglc.def delete mode 100644 utils/wxPython/modules/stubs/.cvsignore delete mode 100644 utils/wxPython/modules/stubs/README delete mode 100644 utils/wxPython/modules/stubs/gtk/.cvsignore delete mode 100644 utils/wxPython/modules/stubs/msw/.cvsignore delete mode 100644 utils/wxPython/modules/utils/.cvsignore delete mode 100644 utils/wxPython/modules/utils/build.cfg delete mode 100644 utils/wxPython/modules/utils/gtk/utils.cpp delete mode 100644 utils/wxPython/modules/utils/gtk/utils.py delete mode 100644 utils/wxPython/modules/utils/msw/utils.cpp delete mode 100644 utils/wxPython/modules/utils/msw/utils.py delete mode 100644 utils/wxPython/modules/utils/utils.i delete mode 100644 utils/wxPython/modules/utils/utilsc.def delete mode 100644 utils/wxPython/src/__version__.py delete mode 100644 utils/wxPython/src/build.cfg delete mode 100644 utils/wxPython/src/gtk/dummy delete mode 100644 utils/wxPython/src/gtk/misc2.cpp delete mode 100644 utils/wxPython/src/gtk/misc2.py delete mode 100644 utils/wxPython/src/gtk/windows2.cpp delete mode 100644 utils/wxPython/src/gtk/windows2.py delete mode 100644 utils/wxPython/src/makefile.nt delete mode 100644 utils/wxPython/src/motif/dummy delete mode 100644 utils/wxPython/src/msw/.cvsignore delete mode 100644 utils/wxPython/src/msw/dummy delete mode 100644 utils/wxPython/src/msw/misc2.cpp delete mode 100644 utils/wxPython/src/msw/misc2.py delete mode 100644 utils/wxPython/src/qt/dummy delete mode 100644 utils/wxPython/src/wxc.def delete mode 100644 utils/wxPython/src/wxp.cpp delete mode 100644 utils/wxPython/tests/paul.pyc delete mode 100644 utils/wxprop/src/prop.cpp create mode 100644 wxBase.dsw create mode 100644 wxBaseDll.dsp create mode 100644 wxPython/.cvsignore create mode 100644 wxPython/BUILD.unix.txt create mode 100644 wxPython/BUILD.win32.txt rename {utils/wxPython => wxPython}/CHANGES.txt (72%) create mode 100644 wxPython/MANIFEST.in rename {utils/wxPython => wxPython}/README.txt (57%) create mode 100644 wxPython/SWIG/README.txt create mode 100644 wxPython/SWIG/pyexp.swg create mode 100644 wxPython/SWIG/typemaps.i create mode 100755 wxPython/b create mode 100755 wxPython/b.bat rename {utils/wxPython/modules => wxPython/contrib}/.cvsignore (100%) create mode 100644 wxPython/contrib/README rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/.cvsignore (100%) rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/glcanvas.i (75%) rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/gtk/.cvsignore (100%) rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/gtk/glcanvas.cpp (57%) rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/gtk/glcanvas.py (96%) rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/msw/.cvsignore (100%) rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/msw/glcanvas.cpp (88%) rename {utils/wxPython/modules => wxPython/contrib}/glcanvas/msw/glcanvas.py (96%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/.cvsignore (84%) create mode 100644 wxPython/contrib/ogl/README.txt rename {utils/wxPython/modules => wxPython/contrib}/ogl/_ogldefs.i (100%) rename utils/wxPython/modules/ogl/_extras.py => wxPython/contrib/ogl/_oglextras.py (100%) create mode 100644 wxPython/contrib/ogl/ogl.cpp rename {utils/wxPython/modules => wxPython/contrib}/ogl/ogl.i (60%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/ogl.py (98%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglbasic.cpp (92%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglbasic.i (96%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglbasic.py (99%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglcanvas.cpp (79%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglcanvas.i (87%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglcanvas.py (95%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglhelpers.cpp (100%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglhelpers.h (98%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglshapes.cpp (95%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglshapes.i (96%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglshapes.py (99%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglshapes2.cpp (93%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglshapes2.i (95%) rename {utils/wxPython/modules => wxPython/contrib}/ogl/oglshapes2.py (99%) create mode 100644 wxPython/contrib/stc/.cvsignore create mode 100644 wxPython/contrib/stc/README.txt create mode 100644 wxPython/contrib/stc/_stcextras.py create mode 100644 wxPython/contrib/stc/stc.py create mode 100644 wxPython/contrib/stc/stc_.cpp create mode 100644 wxPython/contrib/stc/stc_.i create mode 100644 wxPython/contrib/stc/stc_.py rename {utils/wxPython => wxPython}/demo/.cvsignore (92%) rename {utils/wxPython => wxPython}/demo/About.py (68%) create mode 100644 wxPython/demo/ActiveXWrapper_Acrobat.py create mode 100644 wxPython/demo/ActiveXWrapper_IE.py rename {utils/wxPython => wxPython}/demo/ColorPanel.py (100%) rename {utils/wxPython => wxPython}/demo/CustomDragAndDrop.py (94%) rename {utils/wxPython => wxPython}/demo/DialogUnits.py (98%) rename {utils/wxPython => wxPython}/demo/DragAndDrop.py (100%) create mode 100644 wxPython/demo/FancyText.py create mode 100644 wxPython/demo/FileBrowseButton.py rename {utils/wxPython => wxPython}/demo/FontEnumerator.py (100%) rename {utils/wxPython => wxPython}/demo/GenericButtons.py (98%) create mode 100644 wxPython/demo/GridCustEditor.py create mode 100644 wxPython/demo/GridCustTable.py create mode 100644 wxPython/demo/GridEnterHandler.py create mode 100644 wxPython/demo/GridHugeTable.py create mode 100644 wxPython/demo/GridSimple.py create mode 100644 wxPython/demo/GridStdEdRend.py create mode 100644 wxPython/demo/LayoutAnchors.py rename {utils/wxPython => wxPython}/demo/Layoutf.py (100%) rename {utils/wxPython => wxPython}/demo/MDIDemo.py (91%) create mode 100644 wxPython/demo/MDISashDemo.py create mode 100644 wxPython/demo/Main.py rename {utils/wxPython => wxPython}/demo/PrintFramework.py (100%) rename {utils/wxPython => wxPython}/demo/PyShell.py (80%) create mode 100644 wxPython/demo/PyShellWindow.py rename {utils/wxPython => wxPython}/demo/PythonEvents.py (100%) rename {utils/wxPython => wxPython}/demo/README.txt (100%) rename {utils/wxPython => wxPython}/demo/Sizers.py (99%) rename {utils/wxPython => wxPython}/demo/SlashDot.py (99%) rename {utils/wxPython => wxPython}/demo/Threads.py (98%) rename {utils/wxPython => wxPython}/demo/XMLtreeview.py (77%) rename {utils/wxPython => wxPython}/demo/bitmaps/.cvsignore (100%) create mode 100644 wxPython/demo/bitmaps/01c.gif create mode 100644 wxPython/demo/bitmaps/10s.gif create mode 100644 wxPython/demo/bitmaps/12h.gif create mode 100644 wxPython/demo/bitmaps/13d.gif rename {utils/wxPython => wxPython}/demo/bitmaps/Calend.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/DbDec.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/DbInc.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/Dec.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/Inc.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/Pt.bmp (100%) create mode 100644 wxPython/demo/bitmaps/backgrnd.png rename {utils/wxPython/tests => wxPython/demo}/bitmaps/copy.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/image.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/image.gif (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/image.jpg (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/image.png (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/lb1.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/lb2.bmp (100%) rename {utils/wxPython/tests => wxPython/demo}/bitmaps/mondrian.ico (100%) rename {utils/wxPython/tests => wxPython/demo}/bitmaps/new.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/open.bmp (100%) rename {utils/wxPython/tests => wxPython/demo}/bitmaps/paste.bmp (100%) create mode 100644 wxPython/demo/bitmaps/robin.jpg rename {utils/wxPython => wxPython}/demo/bitmaps/smiles.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/smiles.ico (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/splash.gif (100%) rename {utils/wxPython/tests => wxPython/demo}/bitmaps/test2.bmp (78%) rename {utils/wxPython => wxPython}/demo/bitmaps/test_image.png (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/test_mask.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/tog1.bmp (100%) rename {utils/wxPython => wxPython}/demo/bitmaps/tog2.bmp (100%) create mode 100644 wxPython/demo/data/.cvsignore create mode 100644 wxPython/demo/data/echo.py create mode 100644 wxPython/demo/data/grid.i rename {utils/wxPython => wxPython}/demo/data/imagemap.htm (100%) rename {utils/wxPython => wxPython}/demo/data/imagemap.png (100%) rename {utils/wxPython => wxPython}/demo/data/pic.png (100%) rename {utils/wxPython => wxPython}/demo/data/pic2.bmp (100%) create mode 100644 wxPython/demo/data/pic2.gif create mode 100644 wxPython/demo/data/stc.h create mode 100644 wxPython/demo/data/stc.h.html rename {utils/wxPython => wxPython}/demo/data/tables.htm (100%) rename {utils/wxPython => wxPython}/demo/data/test.htm (99%) create mode 100644 wxPython/demo/data/tips.txt rename {utils/wxPython => wxPython}/demo/data/widgetTest.htm (100%) rename {utils/wxPython => wxPython}/demo/demo.py (100%) rename {utils/wxPython => wxPython}/demo/demoMainLoop.py (100%) rename {utils/wxPython => wxPython}/demo/hangman.py (99%) rename {utils/wxPython => wxPython}/demo/paper.xml (100%) rename {utils/wxPython => wxPython}/demo/pyTree.py (100%) rename {utils/wxPython => wxPython}/demo/quotes.xml (100%) create mode 100644 wxPython/demo/redemo.py rename {utils/wxPython => wxPython}/demo/run.py (91%) mode change 100644 => 100755 create mode 100644 wxPython/demo/viewer.py create mode 100644 wxPython/demo/viewer_basics.py rename {utils/wxPython => wxPython}/demo/widgetTest.py (84%) rename {utils/wxPython => wxPython}/demo/wxButton.py (89%) rename {utils/wxPython => wxPython}/demo/wxCalendar.py (57%) create mode 100644 wxPython/demo/wxCalendarCtrl.py rename {utils/wxPython => wxPython}/demo/wxCheckBox.py (100%) rename {utils/wxPython => wxPython}/demo/wxCheckListBox.py (100%) rename {utils/wxPython => wxPython}/demo/wxChoice.py (94%) rename {utils/wxPython => wxPython}/demo/wxColourDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxComboBox.py (94%) rename {utils/wxPython => wxPython}/demo/wxDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxDirDialog.py (100%) create mode 100644 wxPython/demo/wxDragImage.py rename {utils/wxPython => wxPython}/demo/wxEditor.py (100%) rename {utils/wxPython => wxPython}/demo/wxFileDialog.py (92%) rename {utils/wxPython => wxPython}/demo/wxFloatBar.py (96%) rename {utils/wxPython => wxPython}/demo/wxFontDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxFrame.py (95%) rename {utils/wxPython => wxPython}/demo/wxGLCanvas.py (94%) rename {utils/wxPython => wxPython}/demo/wxGauge.py (67%) create mode 100644 wxPython/demo/wxGrid.py rename {utils/wxPython => wxPython}/demo/wxHtmlWindow.py (95%) rename {utils/wxPython => wxPython}/demo/wxImage.py (100%) rename {utils/wxPython => wxPython}/demo/wxLayoutConstraints.py (100%) rename {utils/wxPython => wxPython}/demo/wxListBox.py (63%) rename {utils/wxPython => wxPython}/demo/wxListCtrl.py (82%) rename {utils/wxPython => wxPython}/demo/wxMVCTree.py (100%) rename {utils/wxPython => wxPython}/demo/wxMask.py (97%) rename {utils/wxPython => wxPython}/demo/wxMessageDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxMiniFrame.py (95%) rename {utils/wxPython => wxPython}/demo/wxMultipleChoiceDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxNotebook.py (97%) rename {utils/wxPython => wxPython}/demo/wxOGL.py (98%) rename {utils/wxPython => wxPython}/demo/wxPageSetupDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxPlotCanvas.py (100%) rename {utils/wxPython => wxPython}/demo/wxPrintDialog.py (100%) create mode 100644 wxPython/demo/wxProcess.py rename {utils/wxPython => wxPython}/demo/wxProgressDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxRadioBox.py (100%) rename {utils/wxPython => wxPython}/demo/wxSashWindow.py (70%) rename {utils/wxPython => wxPython}/demo/wxScrolledMessageDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxScrolledWindow.py (92%) rename {utils/wxPython => wxPython}/demo/wxSingleChoiceDialog.py (100%) rename {utils/wxPython => wxPython}/demo/wxSlider.py (100%) rename {utils/wxPython => wxPython}/demo/wxSpinButton.py (100%) create mode 100644 wxPython/demo/wxSpinCtrl.py rename {utils/wxPython => wxPython}/demo/wxSplitterWindow.py (80%) rename {utils/wxPython => wxPython}/demo/wxStaticBitmap.py (73%) rename {utils/wxPython => wxPython}/demo/wxStaticText.py (100%) rename {utils/wxPython => wxPython}/demo/wxStatusBar.py (65%) create mode 100644 wxPython/demo/wxStyledTextCtrl_1.py create mode 100644 wxPython/demo/wxStyledTextCtrl_2.py rename {utils/wxPython => wxPython}/demo/wxTextCtrl.py (68%) create mode 100644 wxPython/demo/wxTextEntryDialog.py rename {utils/wxPython => wxPython}/demo/wxTimer.py (100%) rename {utils/wxPython => wxPython}/demo/wxToolBar.py (51%) rename {utils/wxPython => wxPython}/demo/wxTreeCtrl.py (70%) rename {utils/wxPython => wxPython}/demo/wxVTKRenderWindow.py (100%) rename {utils/wxPython => wxPython}/demo/wxValidator.py (100%) rename {utils/wxPython => wxPython}/distrib/.cvsignore (76%) create mode 100644 wxPython/distrib/.rpmrc create mode 100644 wxPython/distrib/README.dbg.txt rename {utils/wxPython => wxPython}/distrib/autobuild.py (52%) mode change 100644 => 100755 rename {utils/wxPython => wxPython}/distrib/build.py (88%) create mode 100755 wxPython/distrib/makedbg.bat create mode 100755 wxPython/distrib/makedemo create mode 100755 wxPython/distrib/makedev.bat create mode 100755 wxPython/distrib/makerpm create mode 100755 wxPython/distrib/maketgz rename {utils/wxPython => wxPython}/distrib/makexferzip (100%) rename {utils/wxPython => wxPython}/distrib/makexferzip.bat (100%) rename {utils/wxPython => wxPython}/distrib/wise.aut (75%) create mode 100644 wxPython/distrib/wxPython.WSM rename {utils/wxPython => wxPython}/distrib/wxPython.bmp (100%) create mode 100644 wxPython/distrib/wxPython.rsp create mode 100644 wxPython/distrib/wxPython.spec rename {utils/wxPython => wxPython}/distrib/wxPython.wse (93%) create mode 100755 wxPython/distrib/zipit.bat create mode 100644 wxPython/my_distutils.py create mode 100644 wxPython/my_install_data.py create mode 100644 wxPython/setup.cfg create mode 100755 wxPython/setup.py rename {utils/wxPython => wxPython}/src/.cvsignore (78%) rename {utils/wxPython => wxPython}/src/__init__.py (100%) create mode 100644 wxPython/src/__version__.py create mode 100644 wxPython/src/_calextras.py rename {utils/wxPython => wxPython}/src/_defs.i (97%) rename {utils/wxPython => wxPython}/src/_extras.py (85%) create mode 100644 wxPython/src/_gridextras.py rename utils/wxPython/modules/html/_extras.py => wxPython/src/_htmlextras.py (100%) create mode 100755 wxPython/src/b create mode 100644 wxPython/src/calendar.i rename {utils/wxPython => wxPython}/src/clip_dnd.i (92%) rename {utils/wxPython => wxPython}/src/cmndlgs.i (77%) rename {utils/wxPython => wxPython}/src/controls.i (72%) rename {utils/wxPython => wxPython}/src/controls2.i (73%) rename {utils/wxPython => wxPython}/src/events.i (92%) create mode 100644 wxPython/src/export.h create mode 100644 wxPython/src/filesys.i rename {utils/wxPython => wxPython}/src/frames.i (75%) rename {utils/wxPython => wxPython}/src/gdi.i (95%) create mode 100644 wxPython/src/grid.i rename {utils/wxPython => wxPython}/src/gtk/.cvsignore (100%) create mode 100644 wxPython/src/gtk/calendar.cpp create mode 100644 wxPython/src/gtk/calendar.py rename {utils/wxPython => wxPython}/src/gtk/clip_dnd.cpp (94%) rename {utils/wxPython => wxPython}/src/gtk/clip_dnd.py (98%) rename {utils/wxPython => wxPython}/src/gtk/cmndlgs.cpp (86%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/cmndlgs.py (95%) rename {utils/wxPython => wxPython}/src/gtk/controls.cpp (89%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/controls.py (93%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/controls2.cpp (73%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/controls2.py (76%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/events.cpp (80%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/events.py (86%) create mode 100644 wxPython/src/gtk/filesys.cpp create mode 100644 wxPython/src/gtk/filesys.py rename {utils/wxPython => wxPython}/src/gtk/frames.cpp (72%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/frames.py (74%) rename {utils/wxPython => wxPython}/src/gtk/gdi.cpp (93%) rename {utils/wxPython => wxPython}/src/gtk/gdi.py (96%) create mode 100644 wxPython/src/gtk/grid.cpp create mode 100644 wxPython/src/gtk/grid.py create mode 100644 wxPython/src/gtk/html.cpp rename {utils/wxPython/modules/html => wxPython/src/gtk}/html.py (98%) create mode 100644 wxPython/src/gtk/htmlhelp.cpp rename {utils/wxPython/modules/html => wxPython/src/gtk}/htmlhelp.py (99%) rename {utils/wxPython => wxPython}/src/gtk/image.cpp (79%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/image.py (88%) rename {utils/wxPython => wxPython}/src/gtk/mdi.cpp (68%) rename {utils/wxPython => wxPython}/src/gtk/mdi.py (95%) rename {utils/wxPython => wxPython}/src/gtk/misc.cpp (89%) rename {utils/wxPython => wxPython}/src/gtk/misc.py (91%) create mode 100644 wxPython/src/gtk/misc2.cpp create mode 100644 wxPython/src/gtk/misc2.py rename {utils/wxPython => wxPython}/src/gtk/printfw.cpp (91%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/printfw.py (99%) rename {utils/wxPython => wxPython}/src/gtk/sizers.cpp (52%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/sizers.py (54%) rename {utils/wxPython => wxPython}/src/gtk/stattool.cpp (89%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/stattool.py (99%) create mode 100644 wxPython/src/gtk/streams.cpp create mode 100644 wxPython/src/gtk/streams.py create mode 100644 wxPython/src/gtk/utils.cpp create mode 100644 wxPython/src/gtk/utils.py rename {utils/wxPython/src/msw => wxPython/src/gtk}/windows.cpp (92%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/windows.py (95%) create mode 100644 wxPython/src/gtk/windows2.cpp create mode 100644 wxPython/src/gtk/windows2.py rename {utils/wxPython => wxPython}/src/gtk/windows3.cpp (83%) rename {utils/wxPython => wxPython}/src/gtk/windows3.py (96%) rename {utils/wxPython => wxPython}/src/gtk/wx.cpp (84%) rename {utils/wxPython/src/msw => wxPython/src/gtk}/wx.py (91%) rename {utils/wxPython => wxPython}/src/helpers.cpp (81%) rename {utils/wxPython => wxPython}/src/helpers.h (60%) rename {utils/wxPython/modules/html => wxPython/src}/html.i (89%) rename {utils/wxPython/modules/html => wxPython/src}/htmlhelp.i (59%) rename {utils/wxPython => wxPython}/src/image.i (85%) rename {utils/wxPython => wxPython}/src/libpy.c (98%) rename {utils/wxPython => wxPython}/src/mdi.i (79%) rename {utils/wxPython => wxPython}/src/misc.i (85%) rename {utils/wxPython => wxPython}/src/misc2.i (51%) create mode 100644 wxPython/src/msw/.cvsignore create mode 100644 wxPython/src/msw/calendar.cpp create mode 100644 wxPython/src/msw/calendar.py rename {utils/wxPython => wxPython}/src/msw/clip_dnd.cpp (94%) rename {utils/wxPython => wxPython}/src/msw/clip_dnd.py (97%) rename {utils/wxPython => wxPython}/src/msw/cmndlgs.cpp (92%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/cmndlgs.py (95%) rename {utils/wxPython => wxPython}/src/msw/controls.cpp (90%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/controls.py (93%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/controls2.cpp (70%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/controls2.py (72%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/events.cpp (80%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/events.py (86%) create mode 100644 wxPython/src/msw/filesys.cpp create mode 100644 wxPython/src/msw/filesys.py rename {utils/wxPython => wxPython}/src/msw/frames.cpp (80%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/frames.py (70%) rename {utils/wxPython => wxPython}/src/msw/gdi.cpp (94%) rename {utils/wxPython => wxPython}/src/msw/gdi.py (96%) create mode 100644 wxPython/src/msw/grid.cpp create mode 100644 wxPython/src/msw/grid.py rename {utils/wxPython/modules/html => wxPython/src/msw}/html.cpp (91%) create mode 100644 wxPython/src/msw/html.py rename {utils/wxPython/modules/html => wxPython/src/msw}/htmlhelp.cpp (89%) create mode 100644 wxPython/src/msw/htmlhelp.py rename {utils/wxPython => wxPython}/src/msw/image.cpp (80%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/image.py (88%) rename {utils/wxPython => wxPython}/src/msw/mdi.cpp (89%) rename {utils/wxPython => wxPython}/src/msw/mdi.py (87%) rename {utils/wxPython => wxPython}/src/msw/misc.cpp (89%) rename {utils/wxPython => wxPython}/src/msw/misc.py (91%) create mode 100644 wxPython/src/msw/misc2.cpp create mode 100644 wxPython/src/msw/misc2.py rename {utils/wxPython => wxPython}/src/msw/printfw.cpp (96%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/printfw.py (97%) rename {utils/wxPython => wxPython}/src/msw/sizers.cpp (57%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/sizers.py (54%) rename {utils/wxPython => wxPython}/src/msw/stattool.cpp (94%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/stattool.py (99%) create mode 100644 wxPython/src/msw/streams.cpp create mode 100644 wxPython/src/msw/streams.py create mode 100644 wxPython/src/msw/utils.cpp create mode 100644 wxPython/src/msw/utils.py rename {utils/wxPython/src/gtk => wxPython/src/msw}/windows.cpp (91%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/windows.py (94%) rename {utils/wxPython => wxPython}/src/msw/windows2.cpp (92%) rename {utils/wxPython => wxPython}/src/msw/windows2.py (92%) rename {utils/wxPython => wxPython}/src/msw/windows3.cpp (98%) rename {utils/wxPython => wxPython}/src/msw/windows3.py (96%) rename {utils/wxPython => wxPython}/src/msw/wx.cpp (91%) rename {utils/wxPython/src/gtk => wxPython/src/msw}/wx.py (90%) rename {utils/wxPython => wxPython}/src/my_typemaps.i (76%) rename {utils/wxPython => wxPython}/src/printfw.h (100%) rename {utils/wxPython => wxPython}/src/printfw.i (91%) rename {utils/wxPython => wxPython}/src/sizers.i (66%) rename {utils/wxPython => wxPython}/src/stattool.i (91%) create mode 100644 wxPython/src/streams.i create mode 100644 wxPython/src/utils.i rename {utils/wxPython => wxPython}/src/windows.i (78%) rename {utils/wxPython => wxPython}/src/windows2.i (84%) rename {utils/wxPython => wxPython}/src/windows3.i (86%) rename {utils/wxPython => wxPython}/src/wx.i (72%) rename {utils/wxPython => wxPython}/src/wxc.rc (68%) rename {utils/wxPython => wxPython}/src/wxp.ico (100%) rename {utils/wxPython => wxPython}/tests/.cvsignore (100%) rename {utils/wxPython => wxPython}/tests/README.txt (96%) rename {utils/wxPython => wxPython}/tests/TstLstIcon.py (100%) rename {utils/wxPython => wxPython}/tests/atom.bmp (100%) create mode 100644 wxPython/tests/bitmaps/copy.bmp create mode 100644 wxPython/tests/bitmaps/mondrian.ico create mode 100644 wxPython/tests/bitmaps/new.bmp rename {utils/wxPython => wxPython}/tests/bitmaps/open.bmp (100%) create mode 100644 wxPython/tests/bitmaps/paste.bmp rename {utils/wxPython => wxPython}/tests/bitmaps/smiles.bmp (100%) rename {utils/wxPython => wxPython}/tests/bitmaps/smiles.ico (100%) rename {utils/wxPython/demo => wxPython/tests}/bitmaps/test2.bmp (100%) rename {utils/wxPython => wxPython}/tests/bitmaps/tog1.bmp (100%) rename {utils/wxPython => wxPython}/tests/bitmaps/tog2.bmp (100%) rename {utils/wxPython => wxPython}/tests/blit.py (100%) create mode 100644 wxPython/tests/dynamicform.py create mode 100644 wxPython/tests/fs_test.py rename {utils/wxPython => wxPython}/tests/getvalues.py (100%) rename {utils/wxPython => wxPython}/tests/grid.py (100%) create mode 100644 wxPython/tests/gridtest.py rename {utils/wxPython => wxPython}/tests/hangman.py (100%) rename {utils/wxPython => wxPython}/tests/hook.py (100%) rename {utils/wxPython => wxPython}/tests/info.bmp (100%) rename {utils/wxPython => wxPython}/tests/leave.py (100%) rename {utils/wxPython => wxPython}/tests/listGetItem.py (100%) rename {utils/wxPython => wxPython}/tests/memleak.py (100%) create mode 100644 wxPython/tests/og.py rename {utils/wxPython => wxPython}/tests/paul.py (100%) rename {utils/wxPython => wxPython}/tests/popup.py (100%) rename {utils/wxPython => wxPython}/tests/pytree.py (100%) rename {utils/wxPython => wxPython}/tests/query.bmp (100%) rename {utils/wxPython => wxPython}/tests/scroll_paint.py (100%) rename {utils/wxPython => wxPython}/tests/spies.py (100%) rename {utils/wxPython => wxPython}/tests/spies2.py (100%) rename {utils/wxPython => wxPython}/tests/ste.py (100%) rename {utils/wxPython => wxPython}/tests/table.bmp (100%) rename {utils/wxPython => wxPython}/tests/tabs.py (100%) rename {utils/wxPython => wxPython}/tests/test1.py (100%) rename {utils/wxPython => wxPython}/tests/test2.py (91%) rename {utils/wxPython => wxPython}/tests/test3.py (92%) rename {utils/wxPython => wxPython}/tests/test4.py (98%) rename {utils/wxPython => wxPython}/tests/test5.py (100%) rename {utils/wxPython => wxPython}/tests/test6.py (100%) rename {utils/wxPython => wxPython}/tests/test7.py (100%) rename {utils/wxPython => wxPython}/tests/test8.py (100%) rename {utils/wxPython => wxPython}/tests/testDlg.py (100%) rename {utils/wxPython => wxPython}/tests/testTree.py (100%) rename {utils/wxPython => wxPython}/tests/testi.py (100%) rename {utils/wxPython => wxPython}/tests/thrtest.py (100%) rename {utils/wxPython => wxPython}/tests/thtest.py (100%) rename {utils/wxPython => wxPython}/tests/txml.py (100%) rename {utils/wxPython => wxPython}/tests/val.py (100%) rename {utils/wxPython => wxPython}/tests/wxPlotCanvas.py (100%) rename {utils/wxPython => wxPython}/tests/wxSlash.py (100%) rename {utils/wxPython => wxPython}/tests/zigron.py (100%) create mode 100644 wxPython/wxPython/.cvsignore rename {utils => wxPython}/wxPython/lib/.cvsignore (100%) rename {utils => wxPython}/wxPython/lib/CDate.py (100%) rename {utils => wxPython}/wxPython/lib/__init__.py (100%) create mode 100644 wxPython/wxPython/lib/activexwrapper.py create mode 100644 wxPython/wxPython/lib/anchors.py rename {utils => wxPython}/wxPython/lib/buttons.py (93%) rename {utils => wxPython}/wxPython/lib/calendar.py (56%) rename {utils => wxPython}/wxPython/lib/dialogs.py (99%) rename {utils => wxPython}/wxPython/lib/editor/.cvsignore (100%) rename {utils => wxPython}/wxPython/lib/editor/README.txt (100%) rename {utils => wxPython}/wxPython/lib/editor/__init__.py (100%) rename {utils => wxPython}/wxPython/lib/editor/editor.py (99%) rename {utils => wxPython}/wxPython/lib/editor/py_editor.py (100%) rename {utils => wxPython}/wxPython/lib/editor/tokenizer.py (96%) create mode 100644 wxPython/wxPython/lib/fancytext.py create mode 100644 wxPython/wxPython/lib/filebrowsebutton.py rename {utils => wxPython}/wxPython/lib/floatbar.py (99%) rename {utils => wxPython}/wxPython/lib/grids.py (88%) rename {utils => wxPython}/wxPython/lib/layoutf.py (99%) rename {utils => wxPython}/wxPython/lib/mvctree.py (99%) create mode 100644 wxPython/wxPython/lib/pyshell.py create mode 100644 wxPython/wxPython/lib/rpcMixin.py rename {utils => wxPython}/wxPython/lib/shell.py (99%) rename {utils => wxPython}/wxPython/lib/splashscreen.py (94%) rename {utils => wxPython}/wxPython/lib/vtk.py (97%) rename {utils => wxPython}/wxPython/lib/wxPlotCanvas.py (99%) rename {utils => wxPython}/wxPython/lib/wxpTag.py (99%) diff --git a/.cvsignore b/.cvsignore index 564c1906a7..3f8d9e710a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -21,10 +21,23 @@ linux-gnu.system.cache *.d *.swp *.swo +*.swq Release Debug -ReleaseDLL -DebugDLL +ReleaseDll +DebugDll +ReleaseUnicode +DebugUnicode +ReleaseUnicodeDll +DebugUnicodeDll +BaseRelease +BaseDebug +BaseReleaseDll +BaseDebugDll +BaseReleaseUnicode +BaseDebugUnicode +BaseReleaseUnicodeDll +BaseDebugUnicodeDll robert stamp-h.in Makefile diff --git a/BuildCVS.txt b/BuildCVS.txt index 75480522d0..632292b9e2 100644 --- a/BuildCVS.txt +++ b/BuildCVS.txt @@ -2,6 +2,9 @@ How to build the sources from CVS ------------------------------------------------------------------------ +Please use the install.txt files in docs/gtk, docs/msw, docs/motif, docs/mac +etc. alongside these instructions. + I) Windows using plain makefiles ---------------------------------------- @@ -16,45 +19,30 @@ varaibles and PATH entries. Continue with item c) below. -b) If using the GNU MinGW32 or GNU CygWin32 compilers +b) If using the GNU Mingw32 or GNU Cygwin32 compilers -You'll need the compiler itself which is available from +You can get Mingw32 from http://www.mingw.org - http://www.cygwin.com +Cygwin32 is available at http://www.cygwin.com -When using MingW32 you'll need GNU make which is a part -of the CygWin32 toolchain and is also available as a stand -alone port without the infamous Cygwin.dll from - - http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32 - -The makefile has small problems with Cygwin´s tools -so it is recommended not to use these (but MingGW32 -and its make.exe). +The makefile might have small problems with Cygwin's tools +so it is recommended to use Mingw32 and its toolchain instead +if possible. -> Set your path so that it includes the directory where your compiler and tools reside -b-2) Using Mingw32 with gcc-2.95 and Anders Norlander's - Win32 headers - -Using the newer gcc-2.95/Noralander header combination -will allow you to compile more of the MSW code, such -as OLE and Drag-n-Drop. - -Instructions are similar to those for Regular Mingw32 except - -->Get the compiler from - ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95/ - -->patch the gcc headers with info in wxWin\Mingw32-gcc295.patches. - PLEASE APPLY THESE PATCHES BY HAND! There are apparently a few - different versions of the headers floating around. - -->Edit wx/src/makeg95.env and set the MINGW32 variable at the top of - the file to either 1 (you have Mingw32) or 0 (you have Cygwin32). - If using MINGW32, also set the MINGW32VERSION variable - appropriately. +-> If your are using an old Mingw32 version (gcc-2.95 or older), + you might need to fix some headers with the patches contained + in the wxWin\Mingw32-gcc295.patches file. PLEASE APPLY THESE + PATCHES BY HAND! There are apparently a few different versions + of the headers floating around. Note that these patches are + not needed if you are using Mingw32 gcc-2.95.2 or newer. + +-> Edit wx/src/makeg95.env and set the MINGW32 variable at the top of + the file to either 1 (you have Mingw32) or 0 (you have Cygwin32). + If using MINGW32, also set the MINGW32VERSION variable + appropiately. c) Build instructions @@ -64,9 +52,9 @@ c) Build instructions -> Copy c:\wxWin\include\wx\msw\setup0.h to c:\wxWin\include\wx\msw\setup.h -> Edit c:\wxWin\include\wx\msw\setup.h so that - most features are enabled (i.e. defined to 1) with + most features are enabled (i.e. defined to 1), for example: #define wxUSE_ODBC 0 - #define wxUSE_SOCKETS 0 + #define wxUSE_SOCKETS 1 #define wxUSE_HTML 1 #define wxUSE_THREADS 1 #define wxUSE_FS_INET 0 @@ -77,14 +65,12 @@ c) Build instructions #define wxUSE_LIBJPEG 1 #define wxUSE_LIBPNG 1 - and iostreams ares disabled with + and std iostreams are disabled with #define wxUSE_STD_IOSTREAM 0 - - note: ODBC and SOCKETS can be 1 for gcc-2.95 - + -> type: cd c:\wxWin\src\msw -> type: make -f makefile.g95 (if using GNU tools) -or type: make -f makefile.vc (if using MS VC++) +or type: nmake -f makefile.vc (if using MS VC++) II) Unix ports @@ -132,6 +118,20 @@ ftp server at ftp://sourceware.cygnus.com/pub/cygwin/. Of course, you can also build the library using plain makefiles (see section I). +IV) wxBase +---------------------------------------- + +wxBase is the non GUI part of wxWindows. Currently it can be only built using +configure (i.e. under Unix and probably under Win32 with cygwin) and with +Visual C++. + +To build it using configure, just add "--disable-gui" argument to it. + +To build wxBase with VC++, use the project files wxBase.dsp and wxBaseDll.dsp +included in the CVS. See http://www.wxwindows.org/vadim/wxDocs/buildmsw.html +for the instructions on how to generate the project files for the programs +using wxBase. + V) MacOS ---------------------------------------- diff --git a/Makefile.in b/Makefile.in index 32d3e0e95c..8789d19100 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,11 +1,12 @@ # # File: makefile.unx -# Author: Julian Smart, Robert Roebling, Vadim Zeitlin +# Author: Julian Smart, Robert Roebling, Vadim Zeitlin, Ron Lee # Created: 1993 -# Updated: 1999 +# Updated: 2001 # Copyright:(c) 1993, AIAI, University of Edinburgh, # Copyright:(c) 1999, Vadim Zeitlin # Copyright:(c) 1999, Robert Roebling +# Copyright:(c) 2001, Ron Lee # # Makefile for libwx_gtk.a, libwx_motif.a and libwx_msw.a @@ -15,24 +16,22 @@ include ./src/make.env ############## override make.env for PIC ########################## -# Clears all default suffixes -.SUFFIXES: .o .cpp .c .cxx +%.o : %.c + $(CC) -c $(CFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $< -.c.o : - $(CCC) -c @DEP_INFO_FLAGS@ $(CFLAGS) $(PICFLAGS) -o $@ $< +%.o : %.cpp + $(CXX) -c $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $< -.cpp.o : - $(CC) -c @DEP_INFO_FLAGS@ $(CPPFLAGS) $(PICFLAGS) -o $@ $< - -.cxx.o : - $(CC) -c @DEP_INFO_FLAGS@ $(CPPFLAGS) $(PICFLAGS) -o $@ $< +%.o : %.cxx + $(CXX) -c $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $< ########################### Paths ################################# srcdir = @srcdir@ +top_srcdir = @top_srcdir@ -VP1 = @top_srcdir@/src/common -VP2 = @top_srcdir@/src/@TOOLKIT_DIR@ +VP1 = @TOOLKIT_VPATH@ +VP2 = @top_srcdir@/src/common VP3 = @top_srcdir@/src/motif/xmcombo VP4 = @top_srcdir@/src/generic VP5 = @top_srcdir@/src/unix @@ -42,52 +41,51 @@ VP8 = @top_srcdir@/src/jpeg VP9 = @top_srcdir@/src/tiff VP10 = @top_srcdir@/src/zlib VP11 = @top_srcdir@/src/iodbc +VP12 = @top_srcdir@/src/msw/ole + +FTVP01 = @top_srcdir@/src/freetype/unix +FTVP02 = @top_srcdir@/src/freetype/autohint +FTVP03 = @top_srcdir@/src/freetype/base +FTVP04 = @top_srcdir@/src/freetype/cff +FTVP05 = @top_srcdir@/src/freetype/cid +FTVP06 = @top_srcdir@/src/freetype/macfond +FTVP07 = @top_srcdir@/src/freetype/otlayout +FTVP08 = @top_srcdir@/src/freetype/psnames +FTVP09 = @top_srcdir@/src/freetype/raster1 +FTVP10 = @top_srcdir@/src/freetype/sfnt +FTVP11 = @top_srcdir@/src/freetype/smooth +FTVP12 = @top_srcdir@/src/freetype/truetype +FTVP13 = @top_srcdir@/src/freetype/type1 +FTVP14 = @top_srcdir@/src/freetype/type1z +FTVP15 = @top_srcdir@/src/freetype/winfonts + +VP13 = $(FTVP01)@PATH_IFS@$(FTVP02)@PATH_IFS@$(FTVP03)@PATH_IFS@$(FTVP04)@PATH_IFS@$(FTVP05)@PATH_IFS@$(FTVP06)@PATH_IFS@$(FTVP07)@PATH_IFS@$(FTVP08)@PATH_IFS@ +VP14 = $(FTVP09)@PATH_IFS@$(FTVP10)@PATH_IFS@$(FTVP11)@PATH_IFS@$(FTVP12)@PATH_IFS@$(FTVP13)@PATH_IFS@$(FTVP14)@PATH_IFS@$(FTVP15)@PATH_IFS@ # the comment at the end of the next line is needed because otherwise autoconf # would remove this line completely - it contains a built-in hack to remove # any VPATH assignment not containing ':' -VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf +VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11)@PATH_IFS@$(VP12)@PATH_IFS@$(VP13)@PATH_IFS@$(VP14) # ':' for autoconf -top_srcdir = @top_srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ libdir = @libdir@ -infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ -oldincludedir = /usr/include -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ +localedir = $(datadir)/locale top_builddir = . +build_libdir = $(top_builddir)/lib INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -# my autoconf doesn't set this -#INSTALL_SCRIPT = @INSTALL_SCRIPT@ -# maybe do an additional chmod if needed? INSTALL_SCRIPT = @INSTALL@ -transform = @program_transform_name@ -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ @@ -116,25 +114,39 @@ GTKDIR = $(WXDIR)/src/gtk MOTIFDIR = $(WXDIR)/src/motif MSWDIR = $(WXDIR)/src/msw PMDIR = $(WXDIR)/src/os2 +MACDIR = $(WXDIR)/src/mac ODBCDIR = $(WXDIR)/src/iodbc +FTDIR = $(WXDIR)/src/freetype INCDIR = $(WXDIR)/include SAMPDIR = $(WXDIR)/samples DEMODIR = $(WXDIR)/demos UTILSDIR = $(WXDIR)/utils MISCDIR = $(WXDIR)/misc -DOCDIR = $(WXDIR)/docs +DOCDIR = $(WXDIR)/docs +INTLDIR = $(WXDIR)/locale ########################## Archive name ############################### -WXARCHIVE = @DISTDIR@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz -WXGLARCHIVE = @DISTDIR@-gl-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz -WXSAMPLES = wx$(TOOLKIT)-samples-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz -WXDEMOS = wx$(TOOLKIT)-demos-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz +# append a version suffix x.y.z to all file names +VER_SUFFIX=$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER) +WXARCHIVE = @DISTDIR@-$(VER_SUFFIX).tar.gz +WXGLARCHIVE = @DISTDIR@-gl-$(VER_SUFFIX).tar.gz +WXSAMPLES = wx$(TOOLKIT)-samples-$(VER_SUFFIX).tar.gz +WXDEMOS = wx$(TOOLKIT)-demos-$(VER_SUFFIX).tar.gz + +WXARCHIVE_BZIP = @DISTDIR@-$(VER_SUFFIX).tar.bz2 +WXGLARCHIVE_BZIP = @DISTDIR@-gl-$(VER_SUFFIX).tar.bz2 +WXSAMPLES_BZIP = wx$(TOOLKIT)-samples-$(VER_SUFFIX).tar.bz2 +WXDEMOS_BZIP = wx$(TOOLKIT)-demos-$(VER_SUFFIX).tar.bz2 + DISTDIR = ./_dist_dir/@DISTDIR@ + ############################## Files ################################## +WX_LINGUAS = `cd $(top_srcdir)/locale && ls *.mo 2> /dev/null | sed -n 's/\.mo//p'` + # this line will include a file which defines ALL_SOURCES, ALL_OBJECTS, # ALL_DEPFILES and ALL_HEADERS variables with the complete list of .cpp, .o, # .d and .h/.inl files for the current toolkit @@ -146,7 +158,6 @@ HEADERS = $(ALL_HEADERS) # for the objects and depfiles, we might be bulding only part of them # depending on configure arguments, so select a subset of ALL OBJECTS = @ALL_OBJECTS@ -DEPFILES = @ALL_DEPFILES@ # the object files of sublibraries (we assume that they don't change [often], # so we don't generate these lists with tmake but embed them here) @@ -183,6 +194,24 @@ PNGOBJS = \ pngget.o \ pngset.o +FREETYPEOBJS = \ + ftsystem.o \ + autohint.o \ + ftbase.o \ + ftdebug.o \ + ftglyph.o \ + ftinit.o \ + ftmm.o \ + cff.o \ + type1cid.o \ + psnames.o \ + psmodule.o \ + raster1.o \ + sfnt.o \ + smooth.o \ + truetype.o \ + type1z.o \ + winfnt.o JPEGOBJS = \ jcomapi.o \ @@ -286,65 +315,45 @@ IODBCOBJS = \ ############################## Rules ################################## -BURNT_LIBRARY_NAME = @BURNT_LIBRARY_NAME@ -BURNT_LIBRARY_NAME_GL = @BURNT_LIBRARY_NAME_GL@ +SONAME_FLAGS = @SONAME_FLAGS@ +SONAME_FLAGS_GL = @SONAME_FLAGS_GL@ all: @WX_ALL@ -@WX_LIBRARY_NAME_STATIC@: $(OBJECTS) - @$(INSTALL) -d ./lib - $(AR) $(AROPTIONS) ./lib/$@ $(OBJECTS) - $(RANLIB) ./lib/$@ +$(build_libdir)/@WX_LIBRARY_NAME_STATIC@: $(OBJECTS) + @$(INSTALL) -d $(build_libdir) + @$(RM) $@ + $(AR) $(AROPTIONS) $@ $(OBJECTS) + $(RANLIB) $@ -@WX_LIBRARY_NAME_STATIC_GL@: glcanvas.o - @$(INSTALL) -d ./lib - $(AR) $(AROPTIONS) ./lib/$@ glcanvas.o - $(RANLIB) ./lib/$@ +$(build_libdir)/@WX_LIBRARY_NAME_STATIC_GL@: glcanvas.o + @$(INSTALL) -d $(build_libdir) + @$(RM) $@ + $(AR) $(AROPTIONS) $@ glcanvas.o + $(RANLIB) $@ -@WX_LIBRARY_NAME_SHARED@: $(OBJECTS) - @$(INSTALL) -d ./lib - $(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME) $(OBJECTS) $(EXTRALIBS) - -@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o - @$(INSTALL) -d ./lib - $(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o $(EXTRALIBS) - -CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@ - @$(RM) ./lib/@WX_LIBRARY_LINK1@ - @$(RM) ./lib/@WX_LIBRARY_LINK2@ - @$(RM) ./lib/@WX_LIBRARY_LINK3@ - cd lib \ +$(build_libdir)/@WX_LIBRARY_NAME_SHARED@: $(OBJECTS) + @$(INSTALL) -d $(build_libdir) + $(SHARED_LD) $@ $(SONAME_FLAGS) $(OBJECTS) $(EXTRALIBS) + +$(build_libdir)/@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o $(build_libdir)/@WX_LIBRARY_NAME_SHARED@ + @$(INSTALL) -d $(build_libdir) + $(SHARED_LD) $@ $(SONAME_FLAGS_GL) glcanvas.o -L$(build_libdir) @WXCONFIG_LIBS@ $(EXTRALIBS) $(OPENGLLIBS) + +$(build_libdir)/@WX_LIBRARY_LINK1@: $(build_libdir)/@WX_LIBRARY_NAME_SHARED@ + @$(RM) $(build_libdir)/@WX_LIBRARY_LINK1@ + @$(RM) $(build_libdir)/@WX_LIBRARY_LINK2@ + cd $(build_libdir) \ && $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK1@ \ - && $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK2@ \ - && $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK3@ - -CREATE_LINKS_GL: @WX_LIBRARY_NAME_SHARED_GL@ - @$(RM) ./lib/@WX_LIBRARY_LINK1_GL@ - @$(RM) ./lib/@WX_LIBRARY_LINK2_GL@ - @$(RM) ./lib/@WX_LIBRARY_LINK3_GL@ - cd lib \ + && $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK2@ + +$(build_libdir)/@WX_LIBRARY_LINK1_GL@: $(build_libdir)/@WX_LIBRARY_NAME_SHARED_GL@ + @$(RM) $(build_libdir)/@WX_LIBRARY_LINK1_GL@ + @$(RM) $(build_libdir)/@WX_LIBRARY_LINK2_GL@ + cd $(build_libdir) \ && $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK1_GL@ \ - && $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK2_GL@ \ - && $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK3_GL@ - -CREATE_INSTALLED_LINKS: preinstall - $(RM) $(libdir)/@WX_LIBRARY_LINK1@ - $(RM) $(libdir)/@WX_LIBRARY_LINK2@ - $(RM) $(libdir)/@WX_LIBRARY_LINK3@ - cd $(libdir) \ - && $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK1@ \ - && $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK2@ \ - && $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK3@ - -CREATE_INSTALLED_LINKS_GL: preinstall_gl - $(RM) $(libdir)/@WX_LIBRARY_LINK1_GL@ - $(RM) $(libdir)/@WX_LIBRARY_LINK2_GL@ - $(RM) $(libdir)/@WX_LIBRARY_LINK3_GL@ - cd $(libdir) \ - && $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK1_GL@ \ - && $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK2_GL@ \ - && $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK3_GL@ - + && $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK2_GL@ + $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h parser.o: parser.c lexer.c @@ -368,7 +377,22 @@ lexer.c: $(COMMDIR)/lexer.l sed -e "s/unput/PROIO_unput/g" > lexer.c @$(RM) @LEX_STEM@.c --include $(DEPFILES) +-include $(OBJECTS:.o=.d) + + +CREATE_INSTALLED_LINKS: preinstall + $(RM) $(libdir)/@WX_LIBRARY_LINK1@ + $(RM) $(libdir)/@WX_LIBRARY_LINK2@ + cd $(libdir) \ + && $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK1@ \ + && $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK2@ + +CREATE_INSTALLED_LINKS_GL: preinstall_gl + $(RM) $(libdir)/@WX_LIBRARY_LINK1_GL@ + $(RM) $(libdir)/@WX_LIBRARY_LINK2_GL@ + cd $(libdir) \ + && $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK1_GL@ \ + && $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK2_GL@ afminstall: preinstall $(INSTALL) -d $(datadir) @@ -380,7 +404,7 @@ afminstall: preinstall # this is the real install target: copies the library, wx-config and the # headers to the installation directory -preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_DIR@-config +preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLCHAIN_NAME@-config @echo " " @echo " Installing wxWindows..." @echo " " @@ -389,20 +413,27 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_D $(INSTALL) -d $(bindir) $(INSTALL) -d $(libdir) - $(INSTALL_SCRIPT) $(top_builddir)/wx@TOOLKIT_DIR@-config $(bindir)/wx@TOOLKIT_DIR@-config - cd $(bindir) && rm -f wx-config && $(LN_S) wx@TOOLKIT_DIR@-config wx-config + $(INSTALL_SCRIPT) $(top_builddir)/wx@TOOLCHAIN_NAME@-config $(bindir)/wx@TOOLCHAIN_NAME@-config + cd $(bindir) && rm -f wx-config && $(LN_S) wx@TOOLCHAIN_NAME@-config wx-config $(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(libdir)/@WX_TARGET_LIBRARY@ + @# this installs the import library for a MSW DLL + @# remember: for wxMSW DLL WX_LIBRARY_NAME_STATIC is the + @# import livraru name + @if test "@TOOLKIT_DIR@" = "msw" -a "@WX_LIBRARY_NAME_STATIC@" != "@WX_TARGET_LIBRARY@"; then $(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_LIBRARY_NAME_STATIC@ $(libdir)/@WX_LIBRARY_NAME_STATIC@; fi $(INSTALL) -d $(libdir)/wx $(INSTALL) -d $(libdir)/wx/include - $(INSTALL) -d $(libdir)/wx/include/wx - $(INSTALL) -d $(libdir)/wx/include/wx/@TOOLKIT_DIR@ - $(INSTALL_DATA) $(top_builddir)/include/wx/@TOOLKIT_DIR@/setup.h $(libdir)/wx/include/wx/@TOOLKIT_DIR@/setup.h - + $(INSTALL) -d $(libdir)/wx/include/@TOOLCHAIN_NAME@ + $(INSTALL) -d $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx + $(INSTALL_DATA) $(top_builddir)/lib/wx/include/@TOOLCHAIN_NAME@/wx/setup.h $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx/setup.h + $(INSTALL) -d $(includedir)/wx + @# FIXME: This will erroneously install a wx/base dir for wxBase.. @if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/@TOOLKIT_DIR@; fi @if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/html; fi @if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/generic; fi + @if test "@TOOLKIT_DIR@" = "msw"; then $(INSTALL) -d $(includedir)/wx/msw/ole; fi + $(INSTALL) -d $(includedir)/wx/protocol $(INSTALL) -d $(includedir)/wx/unix @list='$(HEADERS)'; for p in $$list; do \ @@ -410,6 +441,14 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_D echo "$(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p"; \ done + $(INSTALL) -d $(localedir) + @for p in $(WX_LINGUAS); do \ + $(INSTALL) -d $(localedir)/$$p; \ + $(INSTALL) -d $(localedir)/$$p/LC_MESSAGES; \ + $(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \ + echo "$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \ + done + preinstall_gl: $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@ @echo " " @echo " Installing wxWindows OpenGl add-on..." @@ -438,16 +477,14 @@ uninstall: @$(RM) $(libdir)/@WX_TARGET_LIBRARY@ @$(RM) $(libdir)/@WX_LIBRARY_LINK1@ @$(RM) $(libdir)/@WX_LIBRARY_LINK2@ - @$(RM) $(libdir)/@WX_LIBRARY_LINK3@ @echo " Removing GL library..." @$(RM) $(libdir)/@WX_TARGET_LIBRARY_GL@ @$(RM) $(libdir)/@WX_LIBRARY_LINK1_GL@ @$(RM) $(libdir)/@WX_LIBRARY_LINK2_GL@ - @$(RM) $(libdir)/@WX_LIBRARY_LINK3_GL@ @echo " Removing helper files..." - @$(RM) $(libdir)/wx/include/wx/@TOOLKIT_DIR@/setup.h + @$(RM) $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx/setup.h @$(RM) $(bindir)/wx-config - @$(RM) $(bindir)/wx@TOOLKIT_DIR@-config + @$(RM) $(bindir)/wx@TOOLCHAIN_NAME@-config @$(RM) $(datadir)/wx/afm/* @$(RM) $(datadir)/wx/gs_afm/* # FIXME: wxBase doesnt install these next 3 dirs. @@ -458,9 +495,16 @@ uninstall: @list='$(HEADERS)'; for p in $$list; do \ $(RM) $(includedir)/wx/$$p; \ done + @echo " Removing i18n files..." + @-for p in $(WX_LINGUAS); do \ + $(RM) $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \ + rmdir $(localedir)/$$p/LC_MESSAGES; \ + rmdir $(localedir)/$$p; \ + done @echo " Removing directories..." - @if test -d $(libdir)/wx/include/wx/@TOOLKIT_DIR@; then rmdir $(libdir)/wx/include/wx/@TOOLKIT_DIR@; fi - @if test -d $(libdir)/wx/include/wx; then rmdir $(libdir)/wx/include/wx; fi + @-rmdir $(localedir) + @if test -d $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx; then rmdir $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx; fi + @if test -d $(libdir)/wx/include/@TOOLCHAIN_NAME@; then rmdir $(libdir)/wx/include/@TOOLCHAIN_NAME@; fi @if test -d $(libdir)/wx/include; then rmdir $(libdir)/wx/include; fi @if test -d $(libdir)/wx; then rmdir $(libdir)/wx; fi @if test -d $(includedir)/wx/gtk; then rmdir $(includedir)/wx/gtk; fi @@ -505,6 +549,7 @@ ALL_DIST: distclean # but is not used when building wxBase distribution ALL_GUI_DIST: ALL_DIST cp $(WXDIR)/wx$(TOOLKIT).spec $(DISTDIR) + cp $(WXDIR)/wxBase.spec $(DISTDIR) cp $(DOCDIR)/$(TOOLKITDIR)/install.txt $(DISTDIR)/INSTALL.txt cp $(DOCDIR)/$(TOOLKITDIR)/changes.txt $(DISTDIR)/CHANGES.txt cp $(DOCDIR)/$(TOOLKITDIR)/readme.txt $(DISTDIR)/README.txt @@ -571,19 +616,21 @@ BASE_DIST: ALL_DIST mkdir $(DISTDIR)/include mkdir $(DISTDIR)/include/wx mkdir $(DISTDIR)/include/wx/protocol + mkdir $(DISTDIR)/include/wx/msw mkdir $(DISTDIR)/include/wx/unix mkdir $(DISTDIR)/src/common + mkdir $(DISTDIR)/src/msw mkdir $(DISTDIR)/src/unix cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@ cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@ cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@ - cp $(WXDIR)/wxBase.dsp $(DISTDIR) - cp $(DOCDIR)/install.txt $(DISTDIR)/INSTALL.txt + cp $(WXDIR)/wxBase*.ds[pw] $(DISTDIR) cp $(DOCDIR)/changes.txt $(DISTDIR)/CHANGES.txt cp $(DOCDIR)/readme.txt $(DISTDIR)/README.txt - cp $(DOCDIR)/todo.txt $(DISTDIR)/TODO.txt cp $(SRCDIR)/*.in $(DISTDIR)/src - cp $(WXDIR)/src/common/unzip.h $(DISTDIR)/src/common/unzip.h + cp $(WXDIR)/src/common/*.inc $(DISTDIR)/src/common + cp $(WXDIR)/src/common/base.rc $(DISTDIR)/src/common + cp $(WXDIR)/src/common/unzip.h $(DISTDIR)/src/common list='$(HEADERS)'; for p in $$list; do \ cp $(WXDIR)/include/wx/$$p $(DISTDIR)/include/wx/$$p; \ done @@ -591,8 +638,18 @@ BASE_DIST: ALL_DIST cp $(WXDIR)/src/$$p $(DISTDIR)/src/$$p; \ done + mkdir $(DISTDIR)/samples + cp $(SAMPDIR)/Makefile.in $(DISTDIR)/samples + cp $(SAMPDIR)/configure $(DISTDIR)/samples + cp $(SAMPDIR)/configure.in $(DISTDIR)/samples + + mkdir $(DISTDIR)/samples/console + cp $(SAMPDIR)/console/Makefile.in $(DISTDIR)/samples/console + cp $(SAMPDIR)/console/makefile.unx $(DISTDIR)/samples/console + cp $(SAMPDIR)/console/console.cpp $(DISTDIR)/samples/console + cp $(SAMPDIR)/console/testdata.fc $(DISTDIR)/samples/console + GTK_DIST: ALL_GUI_DIST - cp $(WXDIR)/wxGTK.spec $(DISTDIR) cp $(INCDIR)/wx/gtk/*.h $(DISTDIR)/include/wx/gtk cp $(INCDIR)/wx/gtk/*.xpm $(DISTDIR)/include/wx/gtk cp $(GTKDIR)/*.cpp $(DISTDIR)/src/gtk @@ -612,17 +669,30 @@ MOTIF_DIST: ALL_GUI_DIST cp $(MOTIFDIR)/xmcombo/*.h $(DISTDIR)/src/motif/xmcombo cp $(MOTIFDIR)/xmcombo/copying.txt $(DISTDIR)/src/motif/xmcombo +MACX_DIST: ALL_GUI_DIST + echo "Apple Mac OS X specific distribution not complete" + MSW_DIST: ALL_GUI_DIST cp $(WXDIR)/wxWINE.spec $(DISTDIR) + mkdir $(DISTDIR)/include/wx/msw/ctl3d + mkdir $(DISTDIR)/include/wx/msw/gnuwin32 + mkdir $(DISTDIR)/include/wx/msw/gnuwin32/gl + mkdir $(DISTDIR)/include/wx/msw/ole cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.cur $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.ico $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.bmp $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.rc $(DISTDIR)/include/wx/msw + cp $(INCDIR)/wx/msw/ctl3d/*.h $(DISTDIR)/include/wx/msw/ctl3d + cp $(INCDIR)/wx/msw/gnuwin32/*.h $(DISTDIR)/include/wx/msw/gnuwin32 + cp $(INCDIR)/wx/msw/gnuwin32/gl/*.h $(DISTDIR)/include/wx/msw/gnuwin32/gl + cp $(INCDIR)/wx/msw/gnuwin32/gl/*.def $(DISTDIR)/include/wx/msw/gnuwin32/gl + cp $(INCDIR)/wx/msw/ole/*.h $(DISTDIR)/include/wx/msw/ole + + mkdir $(DISTDIR)/src/msw/ole cp $(MSWDIR)/*.cpp $(DISTDIR)/src/msw cp $(MSWDIR)/*.c $(DISTDIR)/src/msw cp $(MSWDIR)/*.def $(DISTDIR)/src/msw - mkdir $(DISTDIR)/src/msw/ole cp $(MSWDIR)/ole/*.cpp $(DISTDIR)/src/msw/ole DEMOS_DIST: ALL_GUI_DIST @@ -630,9 +700,9 @@ DEMOS_DIST: ALL_GUI_DIST cp $(DEMODIR)/Makefile.in $(DISTDIR)/demos cp $(DEMODIR)/configure $(DISTDIR)/demos cp $(DEMODIR)/configure.in $(DISTDIR)/demos - + cp -R $(DEMODIR)/dbbrowse $(DISTDIR)/demos/dbbrowse - + mkdir $(DISTDIR)/demos/bombs cp $(DEMODIR)/bombs/Makefile.in $(DISTDIR)/demos/bombs cp $(DEMODIR)/bombs/makefile.unx $(DISTDIR)/demos/bombs @@ -640,7 +710,7 @@ DEMOS_DIST: ALL_GUI_DIST cp $(DEMODIR)/bombs/*.h $(DISTDIR)/demos/bombs cp $(DEMODIR)/bombs/*.xpm $(DISTDIR)/demos/bombs cp $(DEMODIR)/bombs/readme.txt $(DISTDIR)/demos/bombs - + mkdir $(DISTDIR)/demos/forty cp $(DEMODIR)/forty/Makefile.in $(DISTDIR)/demos/forty cp $(DEMODIR)/forty/makefile.unx $(DISTDIR)/demos/forty @@ -648,7 +718,7 @@ DEMOS_DIST: ALL_GUI_DIST cp $(DEMODIR)/forty/*.cpp $(DISTDIR)/demos/forty cp $(DEMODIR)/forty/*.xpm $(DISTDIR)/demos/forty cp $(DEMODIR)/forty/*.xbm $(DISTDIR)/demos/forty - + mkdir $(DISTDIR)/demos/life mkdir $(DISTDIR)/demos/life/bitmaps cp $(DEMODIR)/life/Makefile.in $(DISTDIR)/demos/life @@ -657,8 +727,9 @@ DEMOS_DIST: ALL_GUI_DIST cp $(DEMODIR)/life/*.h $(DISTDIR)/demos/life cp $(DEMODIR)/life/*.xpm $(DISTDIR)/demos/life cp $(DEMODIR)/life/*.inc $(DISTDIR)/demos/life + cp $(DEMODIR)/life/*.lif $(DISTDIR)/demos/life cp $(DEMODIR)/life/bitmaps/*.xpm $(DISTDIR)/demos/life/bitmaps - + mkdir $(DISTDIR)/demos/poem cp $(DEMODIR)/poem/Makefile.in $(DISTDIR)/demos/poem cp $(DEMODIR)/poem/makefile.unx $(DISTDIR)/demos/poem @@ -667,12 +738,12 @@ DEMOS_DIST: ALL_GUI_DIST cp $(DEMODIR)/poem/*.xpm $(DISTDIR)/demos/poem cp $(DEMODIR)/poem/*.dat $(DISTDIR)/demos/poem cp $(DEMODIR)/poem/*.txt $(DISTDIR)/demos/poem - + mkdir $(DISTDIR)/demos/fractal cp $(DEMODIR)/fractal/Makefile.in $(DISTDIR)/demos/fractal cp $(DEMODIR)/fractal/makefile.unx $(DISTDIR)/demos/fractal cp $(DEMODIR)/fractal/*.cpp $(DISTDIR)/demos/fractal - + SAMPLES_DIST: ALL_GUI_DIST mkdir $(DISTDIR)/samples cp $(SAMPDIR)/Makefile.in $(DISTDIR)/samples @@ -860,8 +931,10 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/internat/*.po $(DISTDIR)/samples/internat cp $(SAMPDIR)/internat/fr/*.mo $(DISTDIR)/samples/internat/fr cp $(SAMPDIR)/internat/de/*.mo $(DISTDIR)/samples/internat/de + cp $(SAMPDIR)/internat/ru/*.mo $(DISTDIR)/samples/internat/de cp $(SAMPDIR)/internat/fr/*.po $(DISTDIR)/samples/internat/fr cp $(SAMPDIR)/internat/de/*.po $(DISTDIR)/samples/internat/de + cp $(SAMPDIR)/internat/ru/*.po $(DISTDIR)/samples/internat/de mkdir $(DISTDIR)/samples/ipc cp $(SAMPDIR)/ipc/Makefile.in $(DISTDIR)/samples/ipc @@ -966,11 +1039,6 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/opengl/isosurf/*.h $(DISTDIR)/samples/opengl/isosurf cp $(SAMPDIR)/opengl/isosurf/*.gz $(DISTDIR)/samples/opengl/isosurf - mkdir $(DISTDIR)/samples/plot - cp $(SAMPDIR)/plot/Makefile.in $(DISTDIR)/samples/plot - cp $(SAMPDIR)/plot/makefile.unx $(DISTDIR)/samples/plot - cp $(SAMPDIR)/plot/*.cpp $(DISTDIR)/samples/plot - mkdir $(DISTDIR)/samples/png cp $(SAMPDIR)/png/Makefile.in $(DISTDIR)/samples/png cp $(SAMPDIR)/png/makefile.unx $(DISTDIR)/samples/png @@ -1144,6 +1212,12 @@ MISC_DIST: ALL_GUI_DIST mkdir $(DISTDIR)/misc/gs_afm cp $(MISCDIR)/gs_afm/*.afm $(DISTDIR)/misc/gs_afm +INTL_DIST: + mkdir $(DISTDIR)/locale + cp $(INTLDIR)/Makefile $(DISTDIR)/locale + cp $(INTLDIR)/*.po $(DISTDIR)/locale + -cp $(INTLDIR)/*.mo $(DISTDIR)/locale + MANUAL_DIST: mkdir $(DISTDIR)/docs mkdir $(DISTDIR)/docs/latex @@ -1158,53 +1232,119 @@ MANUAL_DIST: # those files needed for the Debian source package. # see utils/wxPython/distrib for scripts to make a proper wxPython dist. PYTHON_DIST: - mkdir $(DISTDIR)/utils/wxPython - mkdir $(DISTDIR)/utils/wxPython/demo - mkdir $(DISTDIR)/utils/wxPython/demo/bitmaps - mkdir $(DISTDIR)/utils/wxPython/demo/data - mkdir $(DISTDIR)/utils/wxPython/distrib - mkdir $(DISTDIR)/utils/wxPython/lib - mkdir $(DISTDIR)/utils/wxPython/lib/editor - mkdir $(DISTDIR)/utils/wxPython/lib/sizers - mkdir $(DISTDIR)/utils/wxPython/modules - mkdir $(DISTDIR)/utils/wxPython/modules/html - mkdir $(DISTDIR)/utils/wxPython/modules/utils - mkdir $(DISTDIR)/utils/wxPython/modules/utils/gtk - mkdir $(DISTDIR)/utils/wxPython/src - mkdir $(DISTDIR)/utils/wxPython/src/gtk + mkdir $(DISTDIR)/wxPython + mkdir $(DISTDIR)/wxPython/contrib + mkdir $(DISTDIR)/wxPython/contrib/glcanvas + mkdir $(DISTDIR)/wxPython/contrib/glcanvas/gtk + mkdir $(DISTDIR)/wxPython/contrib/ogl + mkdir $(DISTDIR)/wxPython/contrib/stc + mkdir $(DISTDIR)/wxPython/demo + mkdir $(DISTDIR)/wxPython/demo/bitmaps + mkdir $(DISTDIR)/wxPython/demo/data + mkdir $(DISTDIR)/wxPython/src + mkdir $(DISTDIR)/wxPython/src/gtk + mkdir $(DISTDIR)/wxPython/wxPython + mkdir $(DISTDIR)/wxPython/wxPython/lib + mkdir $(DISTDIR)/wxPython/wxPython/lib/editor + mkdir $(DISTDIR)/wxPython/wxPython/lib/sizers - cp $(UTILSDIR)/wxPython/*.txt $(DISTDIR)/utils/wxPython - -cp $(UTILSDIR)/wxPython/demo/* $(DISTDIR)/utils/wxPython/demo - -cp $(UTILSDIR)/wxPython/demo/bitmaps/* $(DISTDIR)/utils/wxPython/demo/bitmaps - -cp $(UTILSDIR)/wxPython/demo/data/* $(DISTDIR)/utils/wxPython/demo/data - cp $(UTILSDIR)/wxPython/distrib/build.py $(DISTDIR)/utils/wxPython/distrib - cp $(UTILSDIR)/wxPython/lib/*.py $(DISTDIR)/utils/wxPython/lib - cp $(UTILSDIR)/wxPython/lib/editor/*.py $(DISTDIR)/utils/wxPython/lib/editor - cp $(UTILSDIR)/wxPython/lib/sizers/*.py $(DISTDIR)/utils/wxPython/lib/sizers - -cp $(UTILSDIR)/wxPython/modules/html/* $(DISTDIR)/utils/wxPython/modules/html - -cp $(UTILSDIR)/wxPython/modules/utils/* $(DISTDIR)/utils/wxPython/modules/utils - cp $(UTILSDIR)/wxPython/modules/utils/gtk/utils.* $(DISTDIR)/utils/wxPython/modules/utils/gtk - -cp $(UTILSDIR)/wxPython/src/* $(DISTDIR)/utils/wxPython/src - cp $(UTILSDIR)/wxPython/src/gtk/*.py $(DISTDIR)/utils/wxPython/src/gtk - cp $(UTILSDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/utils/wxPython/src/gtk + cp $(WXDIR)/wxPython/*.txt $(DISTDIR)/wxPython + cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython + cp $(WXDIR)/wxPython/setup.cfg $(DISTDIR)/wxPython + cp $(WXDIR)/wxPython/MANIFEST.in $(DISTDIR)/wxPython + -cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas + cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk + -cp $(WXDIR)/wxPython/contrib/ogl/* $(DISTDIR)/wxPython/contrib/ogl + -cp $(WXDIR)/wxPython/contrib/stc/* $(DISTDIR)/wxPython/contrib/stc + -cp $(WXDIR)/wxPython/demo/* $(DISTDIR)/wxPython/demo + -cp $(WXDIR)/wxPython/demo/bitmaps/* $(DISTDIR)/wxPython/demo/bitmaps + -cp $(WXDIR)/wxPython/demo/data/* $(DISTDIR)/wxPython/demo/data + -cp $(WXDIR)/wxPython/src/* $(DISTDIR)/wxPython/src + cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk + cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk + cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib + cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor distclean: $(RM) -r _dist_dir -dist: @GUIDIST@ +# VZ: the -only targets allow to do "make dist bzip-dist-only" without copying +# the files twice +dist-only: @echo "*** Creating wxWindows distribution in $(DISTDIR)..." - cd _dist_dir; tar ch @DISTDIR@ | gzip -f9 > $(WXARCHIVE); mv $(WXARCHIVE) .. + @cd _dist_dir; \ + mv @DISTDIR@ @DISTDIR@-$(VER_SUFFIX); \ + tar ch @DISTDIR@-$(VER_SUFFIX) | gzip -f9 > ../$(WXARCHIVE); \ + mv @DISTDIR@-$(VER_SUFFIX) @DISTDIR@ @if test "$(USE_GUI)" = 1; then \ cd $(DISTDIR); \ - mv samples wxSamples; \ - tar ch wxSamples | gzip -f9 > ../../$(WXSAMPLES); \ - mv wxSamples samples; \ - mv demos wxDemos; \ - tar ch wxDemos | gzip -f9 > ../../$(WXDEMOS); \ - mv wxDemos demos; \ + mv samples wxSamples-$(VER_SUFFIX); \ + echo "*** Creating wxSamples archive..."; \ + tar ch wxSamples-$(VER_SUFFIX) | gzip -f9 > ../../$(WXSAMPLES); \ + mv wxSamples-$(VER_SUFFIX) samples; \ + mv demos wxDemos-$(VER_SUFFIX); \ + echo "*** Creating wxDemos archive..."; \ + tar ch wxDemos-$(VER_SUFFIX) | gzip -f9 > ../../$(WXDEMOS); \ + mv wxDemos-$(VER_SUFFIX) demos; \ fi -debian-dist: @GUIDIST@ MANUAL_DIST PYTHON_DIST +dist: @GUIDIST@ + cp $(WXDIR)/src/files.lst $(DISTDIR)/src/ + @echo "*** Creating wxWindows distribution in $(DISTDIR)..." + @cd _dist_dir; \ + mv @DISTDIR@ @DISTDIR@-$(VER_SUFFIX); \ + tar ch @DISTDIR@-$(VER_SUFFIX) | gzip -f9 > ../$(WXARCHIVE); \ + mv @DISTDIR@-$(VER_SUFFIX) @DISTDIR@ + @if test "$(USE_GUI)" = 1; then \ + cd $(DISTDIR); \ + mv samples wxSamples-$(VER_SUFFIX); \ + echo "*** Creating wxSamples archive..."; \ + tar ch wxSamples-$(VER_SUFFIX) | gzip -f9 > ../../$(WXSAMPLES); \ + mv wxSamples-$(VER_SUFFIX) samples; \ + mv demos wxDemos-$(VER_SUFFIX); \ + echo "*** Creating wxDemos archive..."; \ + tar ch wxDemos-$(VER_SUFFIX) | gzip -f9 > ../../$(WXDEMOS); \ + mv wxDemos-$(VER_SUFFIX) demos; \ + fi + +bzip-dist-only: + @echo "*** Creating wxWindows distribution in $(DISTDIR)..." + @cd _dist_dir; \ + mv @DISTDIR@ @DISTDIR@-$(VER_SUFFIX); \ + tar ch @DISTDIR@-$(VER_SUFFIX) | bzip2 -f9 > ../$(WXARCHIVE_BZIP); \ + mv @DISTDIR@-$(VER_SUFFIX) @DISTDIR@ + @if test "$(USE_GUI)" = 1; then \ + cd $(DISTDIR); \ + mv samples wxSamples-${VER_SUFFIX}; \ + echo "*** Creating wxSamples archive..."; \ + tar ch wxSamples-${VER_SUFFIX} | bzip2 -f9 > ../../$(WXSAMPLES_BZIP); \ + mv wxSamples-${VER_SUFFIX} samples; \ + mv demos wxDemos-${VER_SUFFIX}; \ + echo "*** Creating wxDemos archive..."; \ + tar ch wxDemos-${VER_SUFFIX} | bzip2 -f9 > ../../$(WXDEMOS_BZIP); \ + mv wxDemos-${VER_SUFFIX} demos; \ + fi + +bzip-dist: @GUIDIST@ + cp $(WXDIR)/src/files.lst $(DISTDIR)/src/ + @echo "*** Creating wxWindows distribution in $(DISTDIR)..." + @cd _dist_dir; \ + mv @DISTDIR@ @DISTDIR@-$(VER_SUFFIX); \ + tar ch @DISTDIR@-$(VER_SUFFIX) | bzip2 -f9 > ../$(WXARCHIVE_BZIP); \ + mv @DISTDIR@-$(VER_SUFFIX) @DISTDIR@ + @if test "$(USE_GUI)" = 1; then \ + cd $(DISTDIR); \ + mv samples wxSamples-${VER_SUFFIX}; \ + echo "*** Creating wxSamples archive..."; \ + tar ch wxSamples-${VER_SUFFIX} | bzip2 -f9 > ../../$(WXSAMPLES_BZIP); \ + mv wxSamples-${VER_SUFFIX} samples; \ + mv demos wxDemos-${VER_SUFFIX}; \ + echo "*** Creating wxDemos archive..."; \ + tar ch wxDemos-${VER_SUFFIX} | bzip2 -f9 > ../../$(WXDEMOS_BZIP); \ + mv wxDemos-${VER_SUFFIX} demos; \ + fi + +debian-dist: debian-native-dist debian-msw-dirs MSW_DIST mkdir $(DISTDIR)/debian -cp $(WXDIR)/debian/* $(DISTDIR)/debian cp $(WXDIR)/src/files.lst $(DISTDIR)/src/ @@ -1212,14 +1352,32 @@ debian-dist: @GUIDIST@ MANUAL_DIST PYTHON_DIST cp $(DOCDIR)/licendoc.txt $(DISTDIR)/docs cp $(DOCDIR)/preamble.txt $(DISTDIR)/docs rm -f $(DISTDIR)/*.spec + + @# now prune away a lot of the crap included by using cp -R + @# in other dist targets. Ugly and hardly portable but it + @# will run on any Debian box and that's enough for now. + + find $(DISTDIR) \( -name "CVS" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \ + \( -name "makefile.*" -a ! -name "makefile.unx" \) \) \ + -print0 | xargs -0 rm -rf + rm -rf $(WXDIR)/../wxwindows$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER)-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER) mv $(DISTDIR) $(WXDIR)/../wxwindows$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER)-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER) +debian-native-dist: @GUIDIST@ MANUAL_DIST PYTHON_DIST + +debian-msw-dirs: + mkdir $(DISTDIR)/include/wx/msw + mkdir $(DISTDIR)/src/msw + cp $(WXDIR)/src/msw/files.lst $(DISTDIR)/src/msw + + clean: $(RM) *.o $(RM) *.d $(RM) parser.c $(RM) lexer.c - $(RM) -r ./lib/* + $(RM) -r ./lib/wx/* + $(RM) ./lib/lib* cleanall: clean diff --git a/config.guess b/config.guess index 1ec70cc19e..dff9e481b7 100755 --- a/config.guess +++ b/config.guess @@ -1,7 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-09-04' + # This file 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 @@ -22,35 +25,153 @@ # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -59,56 +180,73 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <dummy.s + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit .end main EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; esac fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 + echo m68k-unknown-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -133,16 +271,16 @@ EOF wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 @@ -150,7 +288,7 @@ EOF echo pyramid-pyramid-bsd fi exit 0 ;; - NILE:*:*:dcosx) + NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) @@ -195,21 +333,41 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} + sparc*:NetBSD:*) + echo `uname -p`-unknown-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -222,9 +380,6 @@ EOF powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; @@ -234,12 +389,18 @@ EOF VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; - 2020:CLIX:*:*) + 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); @@ -254,12 +415,15 @@ EOF exit (-1); } EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -275,15 +439,18 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -304,12 +471,21 @@ EOF ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include main() @@ -320,8 +496,8 @@ EOF exit(0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -329,9 +505,9 @@ EOF echo rs6000-ibm-aix3.2 fi exit 0 ;; - *:AIX:*:4) + *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -339,7 +515,7 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=4.${UNAME_RELEASE} + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; @@ -349,7 +525,7 @@ EOF ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -365,28 +541,49 @@ EOF echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) - sed 's/^ //' << EOF >dummy.c + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE #include #include - + int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); - #endif + #endif long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) + + switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: + case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) - switch (bits) + switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; @@ -394,20 +591,26 @@ EOF } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; - #endif + #endif default: puts ("hppa1.0"); break; } exit (0); } EOF - (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` - rm -f dummy.c dummy + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include int main () @@ -432,8 +635,8 @@ EOF exit (0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -442,13 +645,16 @@ EOF 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; - i?86:OSF1:*:*) + i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else @@ -458,6 +664,9 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -480,56 +689,73 @@ EOF echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin32 + echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin32 + echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -537,145 +763,130 @@ EOF *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-unknown-linux-gnu && exit 0 ;; + little) echo mipsel-unknown-linux-gnu && exit 0 ;; esac - + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g - s/.*supported emulations: *// + s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >dummy.c <$dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); + printf ("%s-pc-linux-gnu\n", argv[1]); # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); + printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) + i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, @@ -683,14 +894,23 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i?86:*:3.2:*) + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i?86:UnixWare:*:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - fi - echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) + # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp @@ -735,7 +956,7 @@ EOF exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -746,24 +967,30 @@ EOF 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; @@ -775,8 +1002,8 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) @@ -788,13 +1015,17 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; - news*:NEWS-OS:*:6*) + news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else @@ -810,12 +1041,89 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -cat >dummy.c <$dummy.c < # include @@ -853,7 +1161,10 @@ main () #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -898,11 +1209,24 @@ main () #endif #if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif #endif #if defined (alliant) && defined (i860) @@ -913,8 +1237,8 @@ main () } EOF -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy # Apollos put the system type in the environment. @@ -946,6 +1270,48 @@ then esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub index f791166458..393f13d373 100755 --- a/config.sub +++ b/config.sub @@ -1,6 +1,10 @@ #! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-09-07' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -25,6 +29,8 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Please send patches to . +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -45,30 +51,73 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi +me=`echo "$0" | sed -e 's,.*/,,'` -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -94,15 +143,33 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) + -apple | -axis) os= basic_machine=$1 ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; -sco5) - os=sco3.2v5 + os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) @@ -121,6 +188,9 @@ case $os in os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -143,26 +213,60 @@ case $os in -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dsp16xx \ + | fr30 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el | mips64vr4300 \ + | mips64vr4300el | mips64vr5000 | mips64vr5000el \ + | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ + | mipsisa32 \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | s390 | s390x \ + | sh | sh[34] | sh[34]eb | shbe | shle \ + | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ + | stormy16 | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 \ + | we32k \ + | x86 | xscale \ + | z8k) basic_machine=$basic_machine-unknown ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) + i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -171,27 +275,64 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alphapca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armv*-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c54x-* \ + | clipper-* | cray2-* | cydra-* \ + | d10v-* | d30v-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | m32r-* \ + | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ + | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ + | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | s390-* | s390x-* \ + | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ + | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ + | v850-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; alliant | fx80) basic_machine=fx80-alliant ;; @@ -207,20 +348,24 @@ case $basic_machine in os=-sysv ;; amiga | amiga-*) - basic_machine=m68k-cbm + basic_machine=m68k-unknown ;; amigaos | amigados) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; aux) basic_machine=m68k-apple os=-aux @@ -257,13 +402,16 @@ case $basic_machine in basic_machine=cray2-cray os=-unicos ;; - [ctj]90-cray) - basic_machine=c90-cray + [cjt]90) + basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -297,6 +445,10 @@ case $basic_machine in encore | umax | mmax) basic_machine=ns32k-encore ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; fx2800) basic_machine=i860-alliant ;; @@ -307,6 +459,10 @@ case $basic_machine in basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -315,6 +471,14 @@ case $basic_machine in basic_machine=h8300-hitachi os=-hms ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; harris) basic_machine=m88k-harris os=-sysv3 @@ -330,13 +494,30 @@ case $basic_machine in basic_machine=m68k-hp os=-hpux ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) @@ -345,27 +526,42 @@ case $basic_machine in hppa-next) os=-nextstep3 ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) + i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[34567]86v4*) + i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[34567]86v) + i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[34567]86sol2) + i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -391,9 +587,17 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu @@ -408,10 +612,34 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos @@ -424,6 +652,10 @@ case $basic_machine in basic_machine=mips-sony os=-newsos ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; next | m*-next ) basic_machine=m68k-next case $os in @@ -449,9 +681,32 @@ case $basic_machine in basic_machine=i960-intel os=-nindy ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; np1) basic_machine=np1-gould ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -469,28 +724,28 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | nexen) + pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; - pentiumpro | p6 | k6 | 6x86) + pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) - basic_machine=i786-pc + basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | nexen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) + pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; - power) basic_machine=rs6000-ibm + power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; @@ -502,15 +757,37 @@ case $basic_machine in ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; sequent) basic_machine=i386-sequent ;; @@ -518,6 +795,10 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; sps7) basic_machine=m68k-bull os=-sysv2 @@ -525,6 +806,13 @@ case $basic_machine in spur) basic_machine=spur-unknown ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; sun2) basic_machine=m68000-sun ;; @@ -565,10 +853,22 @@ case $basic_machine in sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -586,6 +886,10 @@ case $basic_machine in basic_machine=a29k-nyu os=-sym1 ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; vaxv) basic_machine=vax-dec os=-sysv @@ -609,6 +913,18 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -616,6 +932,10 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -623,6 +943,15 @@ case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown @@ -639,13 +968,20 @@ case $basic_machine in vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; - sparc) + sh3 | sh4 | sh3eb | sh4eb) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -657,6 +993,19 @@ case $basic_machine in orion105) basic_machine=clipper-highlevel ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 @@ -710,13 +1059,37 @@ case $os in | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos*) + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -726,6 +1099,12 @@ case $os in -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -741,12 +1120,18 @@ case $os in -acis*) os=-aos ;; + -386bsd) + os=-bsd + ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; + -nsk*) + os=-nsk + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -772,9 +1157,18 @@ case $os in # This must come after -sysvr4. -sysv*) ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; -xenix) os=-xenix ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; -none) ;; *) @@ -800,9 +1194,15 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; + arm*-rebel) + os=-linux + ;; arm*-semi) os=-aout ;; + pdp10-*) + os=-tops20 + ;; pdp11-*) os=-none ;; @@ -821,6 +1221,15 @@ case $basic_machine in # default. # os=-sunos4 ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -833,6 +1242,15 @@ case $basic_machine in *-ibm) os=-aix ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; *-hp) os=-hpux ;; @@ -893,9 +1311,21 @@ case $basic_machine in *-masscomp) os=-rtu ;; - f301-fujitsu) + f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; *) os=-none ;; @@ -917,9 +1347,15 @@ case $basic_machine in -aix*) vendor=ibm ;; + -beos*) + vendor=be + ;; -hpux*) vendor=hp ;; + -mpeix*) + vendor=hp + ;; -hiux*) vendor=hitachi ;; @@ -935,7 +1371,7 @@ case $basic_machine in -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) @@ -947,9 +1383,29 @@ case $basic_machine in -aux*) vendor=apple ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure index c6db93af1f..8f16fc4099 100755 --- a/configure +++ b/configure @@ -51,7 +51,7 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help ---enable-gui use GUI classes" + --enable-gui use GUI classes" ac_help="$ac_help --with-gtk use GTK+" ac_help="$ac_help @@ -69,219 +69,221 @@ ac_help="$ac_help ac_help="$ac_help --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed" ac_help="$ac_help ---with-libpng use libpng (PNG image format)" + --with-libpng use libpng (PNG image format)" ac_help="$ac_help ---with-libjpeg use libjpeg (JPEG file format)" + --with-libjpeg use libjpeg (JPEG file format)" ac_help="$ac_help ---with-libtiff use libtiff (TIFF file format)" + --with-libtiff use libtiff (TIFF file format)" ac_help="$ac_help ---with-opengl use OpenGL (or Mesa)" + --with-opengl use OpenGL (or Mesa)" ac_help="$ac_help ---with-dmalloc use dmalloc library (www.letters.com/dmalloc)" + --with-dmalloc use dmalloc library (www.letters.com/dmalloc)" ac_help="$ac_help ---with-zlib use zlib for LZW compression" + --with-zlib use zlib for LZW compression" ac_help="$ac_help ---with-odbc use the IODBC and wxODBC classes" + --with-odbc use the IODBC and wxODBC classes" ac_help="$ac_help ---enable-shared create shared library code" + --enable-shared create shared library code" ac_help="$ac_help ---enable-burnt_name create set name in shared library " + --enable-soname set the DT_SONAME field in ELF shared libraries" ac_help="$ac_help ---enable-optimise create optimised code" + --enable-optimise create optimised code" ac_help="$ac_help ---enable-debug same as debug_flag and debug_info" + --enable-debug same as debug_flag and debug_info" ac_help="$ac_help ---enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)" + --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)" ac_help="$ac_help ---enable-debug_info create code with debugging information" + --enable-debug_info create code with debugging information" ac_help="$ac_help ---enable-debug_gdb create code with extra GDB debugging information" + --enable-debug_gdb create code with extra GDB debugging information" ac_help="$ac_help ---enable-debug_cntxt use wxDebugContext" + --enable-debug_cntxt use wxDebugContext" ac_help="$ac_help ---enable-mem_tracing create code with memory tracing" + --enable-mem_tracing create code with memory tracing" ac_help="$ac_help ---enable-profile create code with profiling information" + --enable-profile create code with profiling information" ac_help="$ac_help ---enable-no_rtti create code without RTTI information" + --enable-no_rtti create code without RTTI information" ac_help="$ac_help ---enable-no_exceptions create code without exceptions information" + --enable-no_exceptions create code without C++ exception handling" ac_help="$ac_help ---enable-permissive compile code disregarding strict ANSI" + --enable-permissive compile code disregarding strict ANSI" ac_help="$ac_help ---enable-no_deps create code without dependency information" + --enable-no_deps create code without dependency information" ac_help="$ac_help ---enable-intl use internationalization system" + --enable-intl use internationalization system" ac_help="$ac_help ---enable-config use wxConfig (and derived) classes" + --enable-config use wxConfig (and derived) classes" ac_help="$ac_help ---enable-sockets use socket/network classes" + --enable-sockets use socket/network classes" ac_help="$ac_help ---enable-ipc use interprocess communication (wxSocket etc.)" + --enable-ipc use interprocess communication (wxSocket etc.)" ac_help="$ac_help ---enable-dialupman use dialup network classes" + --enable-dialupman use dialup network classes" ac_help="$ac_help ---enable-apple_ieee use the Apple IEEE codec" + --enable-apple_ieee use the Apple IEEE codec" ac_help="$ac_help ---enable-timedate use date/time classes" + --enable-timedate use date/time classes" ac_help="$ac_help ---enable-wave use wxWave class" + --enable-wave use wxWave class" ac_help="$ac_help ---enable-fraction use wxFraction class" + --enable-fraction use wxFraction class" ac_help="$ac_help ---enable-dynlib use wxLibrary class for DLL loading" + --enable-dynlib use wxLibrary class for DLL loading" ac_help="$ac_help ---enable-longlong use wxLongLong class" + --enable-longlong use wxLongLong class" ac_help="$ac_help ---enable-log use logging system" + --enable-log use logging system" ac_help="$ac_help ---enable-streams use wxStream etc classes" + --enable-streams use wxStream etc classes" ac_help="$ac_help ---enable-file use wxFile classes" + --enable-file use wxFile classes" ac_help="$ac_help ---enable-textfile use wxTextFile classes" + --enable-textfile use wxTextFile classes" ac_help="$ac_help ---enable-unicode compile wxString with Unicode support" + --enable-unicode compile wxString with Unicode support" ac_help="$ac_help ---enable-wcsrtombs use wcsrtombs instead of buggy (GNU libc1/Linux libc5) wcstombs" + --enable-wcsrtombs use wcsrtombs instead of buggy (GNU libc1/Linux libc5) wcstombs" ac_help="$ac_help ---enable-wxprintfv use wxWindows implementation of vprintf()" + --enable-wxprintfv use wxWindows implementation of vprintf()" ac_help="$ac_help ---enable-joystick compile in joystick support (Linux only)" + --enable-std_iostreams use standard C++ stream classes" ac_help="$ac_help ---enable-std_iostreams use standard C++ stream classes" + --enable-filesystem use virtual file systems classes" ac_help="$ac_help ---enable-filesystem use virtual file systems classes" + --enable-fs_inet use virtual HTTP/FTP filesystems" ac_help="$ac_help ---enable-fs_inet use virtual HTTP/FTP filesystems" + --enable-fs_zip use virtual ZIP filesystems" ac_help="$ac_help ---enable-fs_zip use virtual ZIP filesystems" + --enable-zipstream use wxZipInputStream" ac_help="$ac_help ---enable-zipstream use wxZipInputStream" + --enable-catch_segvs catch signals and pass them to wxApp::OnFatalException" ac_help="$ac_help ---enable-catch_segvs catch signals and pass them to wxApp::OnFatalException" + --enable-threads use threads" ac_help="$ac_help ---enable-threads use threads" + --enable-serial use class serialization" ac_help="$ac_help ---enable-serial use class serialization" + --enable-docview use document view architecture" ac_help="$ac_help ---enable-docview use document view architecture" + --enable-help use help (using external browser at present)" ac_help="$ac_help ---enable-help use help (using external browser at present)" + --enable-constraints use layout-constraints system" ac_help="$ac_help ---enable-constraints use layout-constraints system" + --enable-printarch use printing architecture" ac_help="$ac_help ---enable-printarch use printing architecture" + --enable-mdi use multiple document interface architecture" ac_help="$ac_help ---enable-mdi use multiple document interface architecture" + --enable-postscript use wxPostscriptDC device context (default for gtk+)" ac_help="$ac_help ---enable-postscript use wxPostscriptDC device context (default for gtk+)" + --enable-prologio use Prolog IO library" ac_help="$ac_help ---enable-prologio use Prolog IO library" + --enable-resources use wxWindows resources" ac_help="$ac_help ---enable-resources use wxWindows resources" + --enable-xresources use X resources for save (default for gtk+)" ac_help="$ac_help ---enable-xresources use X resources for save (default for gtk+)" + --enable-clipboard use wxClipboard classes" ac_help="$ac_help ---enable-clipboard use wxClipboard classes" + --enable-dnd use Drag'n'Drop classes" ac_help="$ac_help ---enable-dnd use Drag'n'Drop classes" + --enable-metafile use win32 metafiles" ac_help="$ac_help ---enable-wxtree make wxTree library" + --enable-treelayout use wxTreeLayout class" ac_help="$ac_help ---enable-controls use all usual controls" + --enable-controls use all usual controls" ac_help="$ac_help ---enable-accel use accelerators" + --enable-accel use accelerators" ac_help="$ac_help ---enable-caret use wxCaret class" + --enable-caret use wxCaret class" ac_help="$ac_help ---enable-bmpbutton use wxBitmapButton class" + --enable-bmpbutton use wxBitmapButton class" ac_help="$ac_help ---enable-checkbox use wxCheckBox class" + --enable-checkbox use wxCheckBox class" ac_help="$ac_help ---enable-checklst use wxCheckListBox (listbox with checkboxes) class" + --enable-checklst use wxCheckListBox (listbox with checkboxes) class" ac_help="$ac_help ---enable-choice use wxChoice class" + --enable-choice use wxChoice class" ac_help="$ac_help ---enable-combobox use wxComboBox classes" + --enable-combobox use wxComboBox classes" ac_help="$ac_help ---enable-gauge use wxGauge class" + --enable-gauge use wxGauge class" ac_help="$ac_help ---enable-grid use wxGrid class" + --enable-grid use wxGrid class" ac_help="$ac_help ---enable-newgrid use new wxGrid class" + --enable-newgrid use new wxGrid class" ac_help="$ac_help ---enable-imaglist use wxImageList class" + --enable-imaglist use wxImageList class" ac_help="$ac_help ---enable-listbox use wxListBox class" + --enable-listbox use wxListBox class" ac_help="$ac_help ---enable-listctrl use wxListCtrl class" + --enable-listctrl use wxListCtrl class" ac_help="$ac_help ---enable-notebook use wxNotebook class" + --enable-notebook use wxNotebook class" ac_help="$ac_help ---enable-radiobox use wxRadioBox class" + --enable-radiobox use wxRadioBox class" ac_help="$ac_help ---enable-radiobtn use wxRadioButton class" + --enable-radiobtn use wxRadioButton class" ac_help="$ac_help ---enable-sash use wxSashWindow class" + --enable-sash use wxSashWindow class" ac_help="$ac_help ---enable-scrollbar use wxScrollBar class and scrollable windows" + --enable-scrollbar use wxScrollBar class and scrollable windows" ac_help="$ac_help ---enable-slider use wxSlider class" + --enable-slider use wxSlider class" ac_help="$ac_help ---enable-spinbtn use wxSpinButton class" + --enable-spinbtn use wxSpinButton class" ac_help="$ac_help ---enable-spinctrl use wxSpinCtrl class" + --enable-spinctrl use wxSpinCtrl class" ac_help="$ac_help ---enable-splitter use wxSplitterWindow class" + --enable-splitter use wxSplitterWindow class" ac_help="$ac_help ---enable-statbmp use wxStaticBitmap class" + --enable-statbmp use wxStaticBitmap class" ac_help="$ac_help ---enable-statbox use wxStaticBox class" + --enable-statbox use wxStaticBox class" ac_help="$ac_help ---enable-statline use wxStaticLine class" + --enable-statline use wxStaticLine class" ac_help="$ac_help ---enable-statusbar use wxStatusBar class" + --enable-statusbar use wxStatusBar class" ac_help="$ac_help ---enable-tabdialog use wxTabControl class" + --enable-tabdialog use wxTabControl class" ac_help="$ac_help ---enable-toolbar use wxToolBar class" + --enable-toolbar use wxToolBar class" ac_help="$ac_help ---enable-tbarnative use native wxToolBar class" + --enable-tbarnative use native wxToolBar class" ac_help="$ac_help ---enable-tbarsmpl use wxToolBarSimple class" + --enable-tbarsmpl use wxToolBarSimple class" ac_help="$ac_help ---enable-treectrl use wxTreeCtrl class" + --enable-treectrl use wxTreeCtrl class" ac_help="$ac_help ---enable-commondlg use common dialogs (wxDirDialog, wxProgressDialog, wxTextDialog, ...)" + --enable-commondlg use common dialogs (wxDirDialog, wxProgressDialog, wxTextDialog, ...)" ac_help="$ac_help ---enable-dirdlg use wxDirDialog" + --enable-dirdlg use wxDirDialog" ac_help="$ac_help ---enable-textdlg use wxTextDialog" + --enable-textdlg use wxTextDialog" ac_help="$ac_help ---enable-tipdlg use startup tips" + --enable-tipdlg use startup tips" ac_help="$ac_help ---enable-progressdlg use wxProgressDialog" + --enable-progressdlg use wxProgressDialog" ac_help="$ac_help ---enable-miniframe use wxMiniFrame class" + --enable-miniframe use wxMiniFrame class" ac_help="$ac_help ---enable-html use wxHTML sub-library" + --enable-html use wxHTML sub-library" ac_help="$ac_help ---enable-tooltips use wxToolTip class" + --enable-tooltips use wxToolTip class" ac_help="$ac_help ---enable-splines use spline drawing code" + --enable-splines use spline drawing code" ac_help="$ac_help ---enable-validators use wxValidator and derived classes" + --enable-validators use wxValidator and derived classes" ac_help="$ac_help ---enable-busyinfo use wxBusyInfo" + --enable-busyinfo use wxBusyInfo" ac_help="$ac_help ---enable-plot use wxPlot" + --enable-plot use wxPlot" ac_help="$ac_help ---enable-gif use gif images (GIF file format)" + --enable-joystick compile in joystick support (Linux only)" ac_help="$ac_help ---enable-pcx use pcx images (PCX file format)" + --enable-gif use gif images (GIF file format)" ac_help="$ac_help ---enable-pnm use pnm images (PNM file format)" + --enable-pcx use pcx images (PCX file format)" +ac_help="$ac_help + --enable-pnm use pnm images (PNM file format)" ac_help="$ac_help --with-x use the X Window System" @@ -842,7 +844,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:846: checking host system type" >&5 +echo "configure:848: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -863,7 +865,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:867: checking target system type" >&5 +echo "configure:869: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -881,7 +883,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:885: checking build system type" >&5 +echo "configure:887: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -906,18 +908,15 @@ test "$host_alias" != "$target_alias" && WX_MAJOR_VERSION_NUMBER=2 -WX_MINOR_VERSION_NUMBER=1 -WX_RELEASE_NUMBER=14 - -WX_INTERFACE_AGE=0 -WX_BINARY_AGE=0 +WX_MINOR_VERSION_NUMBER=2 +WX_RELEASE_NUMBER=9 WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER - WX_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER -WX_CURRENT=`expr $WX_RELEASE_NUMBER - $WX_INTERFACE_AGE` -WX_REVISION=$WX_INTERFACE_AGE -WX_AGE=`expr $WX_BINARY_AGE - $WX_INTERFACE_AGE` + +WX_CURRENT=6 +WX_REVISION=2 +WX_AGE=6 USE_UNIX=1 @@ -936,7 +935,10 @@ USE_SUNOS= USE_ALPHA= USE_OSF= USE_BSD= +USE_DARWIN= USE_FREEBSD= +USE_OPENBSD= +USE_NETBSD= USE_VMS= USE_ULTRIX= USE_CYGWIN= @@ -960,12 +962,14 @@ DEFAULT_DEFAULT_wxUSE_WINE=0 DEFAULT_DEFAULT_wxUSE_PM=0 PROGRAM_EXT= +SO_SUFFIX=so case "${host}" in *-hp-hpux* ) USE_HPUX=1 DEFAULT_DEFAULT_wxUSE_MOTIF=1 NEEDS_D_REENTRANT_FOR_R_FUNCS=1 + SO_SUFFIX=sl cat >> confdefs.h <<\EOF #define __HPUX__ 1 EOF @@ -1037,7 +1041,7 @@ EOF DEFAULT_DEFAULT_wxUSE_MOTIF=1 ;; - *-*-freebsd* | *-*-netbsd*) + *-*-freebsd*) USE_BSD=1 USE_FREEBSD=1 cat >> confdefs.h <<\EOF @@ -1046,6 +1050,32 @@ EOF cat >> confdefs.h <<\EOF #define __BSD__ 1 +EOF + + DEFAULT_DEFAULT_wxUSE_GTK=1 + ;; + *-*-openbsd*) + USE_BSD=1 + USE_OPENBSD=1 + cat >> confdefs.h <<\EOF +#define __FREEBSD__ 1 +EOF + + cat >> confdefs.h <<\EOF +#define __OPENBSD__ 1 +EOF + + DEFAULT_DEFAULT_wxUSE_GTK=1 + ;; + *-*-netbsd*) + USE_BSD=1 + USE_NETBSD=1 + cat >> confdefs.h <<\EOF +#define __FREEBSD__ 1 +EOF + + cat >> confdefs.h <<\EOF +#define __NETBSD__ 1 EOF DEFAULT_DEFAULT_wxUSE_GTK=1 @@ -1062,6 +1092,7 @@ EOF EOF DEFAULT_DEFAULT_wxUSE_MOTIF=1 + NEEDS_D_REENTRANT_FOR_R_FUNCS=1 ;; *-*-dgux5* ) USE_ALPHA=1 @@ -1108,9 +1139,10 @@ EOF DEFAULT_DEFAULT_wxUSE_MOTIF=1 ;; - *-*-cygwin32* | *-*-mingw32* ) + *-*-cygwin* | *-*-mingw32* ) USE_UNIX=0 USE_WIN32=1 + SO_SUFFIX=dll cat >> confdefs.h <<\EOF #define __WIN32__ 1 EOF @@ -1136,10 +1168,11 @@ EOF EOF PROGRAM_EXT=".exe" + RESCOMP=windres DEFAULT_DEFAULT_wxUSE_MSW=1 ;; - *-pc-os2_emx ) + *-pc-os2_emx | *-pc-os2-emx ) cat >> confdefs.h <<\EOF #define __EMX__ 1 EOF @@ -1148,6 +1181,24 @@ EOF DEFAULT_DEFAULT_wxUSE_PM=1 ;; + powerpc-*-darwin* ) + USE_BSD=1 + USE_DARWIN=1 + SO_SUFFIX=dylib + cat >> confdefs.h <<\EOF +#define __BSD__ 1 +EOF + + cat >> confdefs.h <<\EOF +#define __DARWIN__ 1 +EOF + + cat >> confdefs.h <<\EOF +#define __POWERPC__ 1 +EOF + + ;; + *-*-beos* ) USE_BEOS=1 cat >> confdefs.h <<\EOF @@ -1166,19 +1217,11 @@ if test "$USE_UNIX" = 1 ; then #define __UNIX__ 1 EOF - - SRC_SUBDIRS="$SRC_SUBDIRS unix" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix" -fi - -if test "$USE_BEOS" = 1; then - SRC_SUBDIRS="$SRC_SUBDIRS be" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be" fi if test "$USE_LINUX" = 1; then - echo $ac_n "checking for gettext in -lc""... $ac_c" 1>&6 -echo "configure:1182: checking for gettext in -lc" >&5 + echo $ac_n "checking for gettext in -lc""... $ac_c" 1>&6 +echo "configure:1225: checking for gettext in -lc" >&5 ac_lib_var=`echo c'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1186,7 +1229,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1237,8 +1280,8 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_THREADS=yes DEFAULT_wxUSE_SHARED=yes - DEFAULT_wxUSE_BURNT_NAME=no - DEFAULT_wxUSE_OPTIMISE=yes + DEFAULT_wxUSE_SONAME=no + DEFAULT_wxUSE_OPTIMISE=no DEFAULT_wxUSE_PROFILE=no DEFAULT_wxUSE_NO_DEPS=no DEFAULT_wxUSE_NO_RTTI=no @@ -1298,7 +1341,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_CONSTRAINTS=no DEFAULT_wxUSE_IPC=no DEFAULT_wxUSE_HELP=no - DEFAULT_wxUSE_WXTREE=no + DEFAULT_wxUSE_TREELAYOUT=no DEFAULT_wxUSE_METAFILE=no DEFAULT_wxUSE_COMMONDLGS=no @@ -1358,7 +1401,7 @@ else DEFAULT_wxUSE_THREADS=yes DEFAULT_wxUSE_SHARED=yes - DEFAULT_wxUSE_BURNT_NAME=no + DEFAULT_wxUSE_SONAME=no DEFAULT_wxUSE_OPTIMISE=yes DEFAULT_wxUSE_PROFILE=no DEFAULT_wxUSE_NO_DEPS=no @@ -1419,7 +1462,7 @@ else DEFAULT_wxUSE_CONSTRAINTS=yes DEFAULT_wxUSE_IPC=yes DEFAULT_wxUSE_HELP=yes - DEFAULT_wxUSE_WXTREE=yes + DEFAULT_wxUSE_TREELAYOUT=yes DEFAULT_wxUSE_METAFILE=yes DEFAULT_wxUSE_COMMONDLGS=yes @@ -1490,8 +1533,8 @@ done - echo $ac_n "checking "for --enable-gui"""... $ac_c" 1>&6 -echo "configure:1495: checking "for --enable-gui"" >&5 + echo $ac_n "checking for --enable-gui""... $ac_c" 1>&6 +echo "configure:1538: checking for --enable-gui" >&5 no_cache=0 # Check whether --enable-gui or --disable-gui was given. if test "${enable_gui+set}" = set; then @@ -1586,8 +1629,8 @@ fi - echo $ac_n "checking "for --with-libpng"""... $ac_c" 1>&6 -echo "configure:1591: checking "for --with-libpng"" >&5 + echo $ac_n "checking for --with-libpng""... $ac_c" 1>&6 +echo "configure:1634: checking for --with-libpng" >&5 no_cache=0 # Check whether --with-libpng or --without-libpng was given. if test "${with_libpng+set}" = set; then @@ -1599,8 +1642,10 @@ if test "${with_libpng+set}" = set; then ac_cv_use_libpng='wxUSE_LIBPNG=no' elif test "$withval" = sys; then ac_cv_use_libpng='wxUSE_LIBPNG=sys' + elif test "$withval" = builtin; then + ac_cv_use_libpng='wxUSE_LIBPNG=builtin' else - { echo "configure: error: Invalid value for --with-libpng: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-libpng: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi else @@ -1628,13 +1673,15 @@ fi echo "$ac_t""no" 1>&6 elif test "$wxUSE_LIBPNG" = sys; then echo "$ac_t""system version" 1>&6 + elif test "$wxUSE_LIBPNG" = builtin; then + echo "$ac_t""builtin version" 1>&6 else - { echo "configure: error: Invalid value for --with-libpng: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-libpng: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi - echo $ac_n "checking "for --with-libjpeg"""... $ac_c" 1>&6 -echo "configure:1638: checking "for --with-libjpeg"" >&5 + echo $ac_n "checking for --with-libjpeg""... $ac_c" 1>&6 +echo "configure:1685: checking for --with-libjpeg" >&5 no_cache=0 # Check whether --with-libjpeg or --without-libjpeg was given. if test "${with_libjpeg+set}" = set; then @@ -1646,8 +1693,10 @@ if test "${with_libjpeg+set}" = set; then ac_cv_use_libjpeg='wxUSE_LIBJPEG=no' elif test "$withval" = sys; then ac_cv_use_libjpeg='wxUSE_LIBJPEG=sys' + elif test "$withval" = builtin; then + ac_cv_use_libjpeg='wxUSE_LIBJPEG=builtin' else - { echo "configure: error: Invalid value for --with-libjpeg: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-libjpeg: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi else @@ -1675,13 +1724,15 @@ fi echo "$ac_t""no" 1>&6 elif test "$wxUSE_LIBJPEG" = sys; then echo "$ac_t""system version" 1>&6 + elif test "$wxUSE_LIBJPEG" = builtin; then + echo "$ac_t""builtin version" 1>&6 else - { echo "configure: error: Invalid value for --with-libjpeg: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-libjpeg: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi - echo $ac_n "checking "for --with-libtiff"""... $ac_c" 1>&6 -echo "configure:1685: checking "for --with-libtiff"" >&5 + echo $ac_n "checking for --with-libtiff""... $ac_c" 1>&6 +echo "configure:1736: checking for --with-libtiff" >&5 no_cache=0 # Check whether --with-libtiff or --without-libtiff was given. if test "${with_libtiff+set}" = set; then @@ -1693,8 +1744,10 @@ if test "${with_libtiff+set}" = set; then ac_cv_use_libtiff='wxUSE_LIBTIFF=no' elif test "$withval" = sys; then ac_cv_use_libtiff='wxUSE_LIBTIFF=sys' + elif test "$withval" = builtin; then + ac_cv_use_libtiff='wxUSE_LIBTIFF=builtin' else - { echo "configure: error: Invalid value for --with-libtiff: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-libtiff: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi else @@ -1722,13 +1775,15 @@ fi echo "$ac_t""no" 1>&6 elif test "$wxUSE_LIBTIFF" = sys; then echo "$ac_t""system version" 1>&6 + elif test "$wxUSE_LIBTIFF" = builtin; then + echo "$ac_t""builtin version" 1>&6 else - { echo "configure: error: Invalid value for --with-libtiff: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-libtiff: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi - echo $ac_n "checking "for --with-opengl"""... $ac_c" 1>&6 -echo "configure:1732: checking "for --with-opengl"" >&5 + echo $ac_n "checking for --with-opengl""... $ac_c" 1>&6 +echo "configure:1787: checking for --with-opengl" >&5 no_cache=0 # Check whether --with-opengl or --without-opengl was given. if test "${with_opengl+set}" = set; then @@ -1769,8 +1824,8 @@ fi fi - echo $ac_n "checking "for --with-dmalloc"""... $ac_c" 1>&6 -echo "configure:1774: checking "for --with-dmalloc"" >&5 + echo $ac_n "checking for --with-dmalloc""... $ac_c" 1>&6 +echo "configure:1829: checking for --with-dmalloc" >&5 no_cache=0 # Check whether --with-dmalloc or --without-dmalloc was given. if test "${with_dmalloc+set}" = set; then @@ -1808,8 +1863,8 @@ fi fi - echo $ac_n "checking "for --with-zlib"""... $ac_c" 1>&6 -echo "configure:1813: checking "for --with-zlib"" >&5 + echo $ac_n "checking for --with-zlib""... $ac_c" 1>&6 +echo "configure:1868: checking for --with-zlib" >&5 no_cache=0 # Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then @@ -1821,8 +1876,10 @@ if test "${with_zlib+set}" = set; then ac_cv_use_zlib='wxUSE_ZLIB=no' elif test "$withval" = sys; then ac_cv_use_zlib='wxUSE_ZLIB=sys' + elif test "$withval" = builtin; then + ac_cv_use_zlib='wxUSE_ZLIB=builtin' else - { echo "configure: error: Invalid value for --with-zlib: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-zlib: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi else @@ -1850,13 +1907,15 @@ fi echo "$ac_t""no" 1>&6 elif test "$wxUSE_ZLIB" = sys; then echo "$ac_t""system version" 1>&6 + elif test "$wxUSE_ZLIB" = builtin; then + echo "$ac_t""builtin version" 1>&6 else - { echo "configure: error: Invalid value for --with-zlib: should be yes, no or sys" 1>&2; exit 1; } + { echo "configure: error: Invalid value for --with-zlib: should be yes, no, sys, or builtin" 1>&2; exit 1; } fi - echo $ac_n "checking "for --with-odbc"""... $ac_c" 1>&6 -echo "configure:1860: checking "for --with-odbc"" >&5 + echo $ac_n "checking for --with-odbc""... $ac_c" 1>&6 +echo "configure:1919: checking for --with-odbc" >&5 no_cache=0 # Check whether --with-odbc or --without-odbc was given. if test "${with_odbc+set}" = set; then @@ -1897,8 +1956,8 @@ fi - echo $ac_n "checking "for --enable-shared"""... $ac_c" 1>&6 -echo "configure:1902: checking "for --enable-shared"" >&5 + echo $ac_n "checking for --enable-shared""... $ac_c" 1>&6 +echo "configure:1961: checking for --enable-shared" >&5 no_cache=0 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then @@ -1936,47 +1995,47 @@ fi fi - echo $ac_n "checking "for --enable-burnt_name"""... $ac_c" 1>&6 -echo "configure:1941: checking "for --enable-burnt_name"" >&5 + echo $ac_n "checking for --enable-soname""... $ac_c" 1>&6 +echo "configure:2000: checking for --enable-soname" >&5 no_cache=0 - # Check whether --enable-burnt_name or --disable-burnt_name was given. -if test "${enable_burnt_name+set}" = set; then - enableval="$enable_burnt_name" + # Check whether --enable-soname or --disable-soname was given. +if test "${enable_soname+set}" = set; then + enableval="$enable_soname" if test "$enableval" = yes; then - ac_cv_use_burnt_name='wxUSE_BURNT_NAME=yes' + ac_cv_use_soname='wxUSE_SONAME=yes' else - ac_cv_use_burnt_name='wxUSE_BURNT_NAME=no' + ac_cv_use_soname='wxUSE_SONAME=no' fi else - LINE=`grep "wxUSE_BURNT_NAME" ${wx_arg_cache_file}` + LINE=`grep "wxUSE_SONAME" ${wx_arg_cache_file}` if test "x$LINE" != x ; then eval "DEFAULT_$LINE" else no_cache=1 fi - ac_cv_use_burnt_name='wxUSE_BURNT_NAME='$DEFAULT_wxUSE_BURNT_NAME + ac_cv_use_soname='wxUSE_SONAME='$DEFAULT_wxUSE_SONAME fi - eval "$ac_cv_use_burnt_name" + eval "$ac_cv_use_soname" if test "$no_cache" != 1; then - echo $ac_cv_use_burnt_name >> ${wx_arg_cache_file}.tmp + echo $ac_cv_use_soname >> ${wx_arg_cache_file}.tmp fi - if test "$wxUSE_BURNT_NAME" = yes; then + if test "$wxUSE_SONAME" = yes; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking "for --enable-optimise"""... $ac_c" 1>&6 -echo "configure:1980: checking "for --enable-optimise"" >&5 + echo $ac_n "checking for --enable-optimise""... $ac_c" 1>&6 +echo "configure:2039: checking for --enable-optimise" >&5 no_cache=0 # Check whether --enable-optimise or --disable-optimise was given. if test "${enable_optimise+set}" = set; then @@ -2014,8 +2073,8 @@ fi fi - echo $ac_n "checking "for --enable-debug"""... $ac_c" 1>&6 -echo "configure:2019: checking "for --enable-debug"" >&5 + echo $ac_n "checking for --enable-debug""... $ac_c" 1>&6 +echo "configure:2078: checking for --enable-debug" >&5 no_cache=0 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then @@ -2062,8 +2121,8 @@ elif test "$wxUSE_DEBUG" = "no"; then fi - echo $ac_n "checking "for --enable-debug_flag"""... $ac_c" 1>&6 -echo "configure:2067: checking "for --enable-debug_flag"" >&5 + echo $ac_n "checking for --enable-debug_flag""... $ac_c" 1>&6 +echo "configure:2126: checking for --enable-debug_flag" >&5 no_cache=0 # Check whether --enable-debug_flag or --disable-debug_flag was given. if test "${enable_debug_flag+set}" = set; then @@ -2101,8 +2160,8 @@ fi fi - echo $ac_n "checking "for --enable-debug_info"""... $ac_c" 1>&6 -echo "configure:2106: checking "for --enable-debug_info"" >&5 + echo $ac_n "checking for --enable-debug_info""... $ac_c" 1>&6 +echo "configure:2165: checking for --enable-debug_info" >&5 no_cache=0 # Check whether --enable-debug_info or --disable-debug_info was given. if test "${enable_debug_info+set}" = set; then @@ -2140,8 +2199,8 @@ fi fi - echo $ac_n "checking "for --enable-debug_gdb"""... $ac_c" 1>&6 -echo "configure:2145: checking "for --enable-debug_gdb"" >&5 + echo $ac_n "checking for --enable-debug_gdb""... $ac_c" 1>&6 +echo "configure:2204: checking for --enable-debug_gdb" >&5 no_cache=0 # Check whether --enable-debug_gdb or --disable-debug_gdb was given. if test "${enable_debug_gdb+set}" = set; then @@ -2179,8 +2238,8 @@ fi fi - echo $ac_n "checking "for --enable-debug_cntxt"""... $ac_c" 1>&6 -echo "configure:2184: checking "for --enable-debug_cntxt"" >&5 + echo $ac_n "checking for --enable-debug_cntxt""... $ac_c" 1>&6 +echo "configure:2243: checking for --enable-debug_cntxt" >&5 no_cache=0 # Check whether --enable-debug_cntxt or --disable-debug_cntxt was given. if test "${enable_debug_cntxt+set}" = set; then @@ -2218,8 +2277,8 @@ fi fi - echo $ac_n "checking "for --enable-mem_tracing"""... $ac_c" 1>&6 -echo "configure:2223: checking "for --enable-mem_tracing"" >&5 + echo $ac_n "checking for --enable-mem_tracing""... $ac_c" 1>&6 +echo "configure:2282: checking for --enable-mem_tracing" >&5 no_cache=0 # Check whether --enable-mem_tracing or --disable-mem_tracing was given. if test "${enable_mem_tracing+set}" = set; then @@ -2257,8 +2316,8 @@ fi fi - echo $ac_n "checking "for --enable-profile"""... $ac_c" 1>&6 -echo "configure:2262: checking "for --enable-profile"" >&5 + echo $ac_n "checking for --enable-profile""... $ac_c" 1>&6 +echo "configure:2321: checking for --enable-profile" >&5 no_cache=0 # Check whether --enable-profile or --disable-profile was given. if test "${enable_profile+set}" = set; then @@ -2296,8 +2355,8 @@ fi fi - echo $ac_n "checking "for --enable-no_rtti"""... $ac_c" 1>&6 -echo "configure:2301: checking "for --enable-no_rtti"" >&5 + echo $ac_n "checking for --enable-no_rtti""... $ac_c" 1>&6 +echo "configure:2360: checking for --enable-no_rtti" >&5 no_cache=0 # Check whether --enable-no_rtti or --disable-no_rtti was given. if test "${enable_no_rtti+set}" = set; then @@ -2335,8 +2394,8 @@ fi fi - echo $ac_n "checking "for --enable-no_exceptions"""... $ac_c" 1>&6 -echo "configure:2340: checking "for --enable-no_exceptions"" >&5 + echo $ac_n "checking for --enable-no_exceptions""... $ac_c" 1>&6 +echo "configure:2399: checking for --enable-no_exceptions" >&5 no_cache=0 # Check whether --enable-no_exceptions or --disable-no_exceptions was given. if test "${enable_no_exceptions+set}" = set; then @@ -2374,8 +2433,8 @@ fi fi - echo $ac_n "checking "for --enable-permissive"""... $ac_c" 1>&6 -echo "configure:2379: checking "for --enable-permissive"" >&5 + echo $ac_n "checking for --enable-permissive""... $ac_c" 1>&6 +echo "configure:2438: checking for --enable-permissive" >&5 no_cache=0 # Check whether --enable-permissive or --disable-permissive was given. if test "${enable_permissive+set}" = set; then @@ -2413,8 +2472,8 @@ fi fi - echo $ac_n "checking "for --enable-no_deps"""... $ac_c" 1>&6 -echo "configure:2418: checking "for --enable-no_deps"" >&5 + echo $ac_n "checking for --enable-no_deps""... $ac_c" 1>&6 +echo "configure:2477: checking for --enable-no_deps" >&5 no_cache=0 # Check whether --enable-no_deps or --disable-no_deps was given. if test "${enable_no_deps+set}" = set; then @@ -2454,8 +2513,8 @@ fi - echo $ac_n "checking "for --enable-intl"""... $ac_c" 1>&6 -echo "configure:2459: checking "for --enable-intl"" >&5 + echo $ac_n "checking for --enable-intl""... $ac_c" 1>&6 +echo "configure:2518: checking for --enable-intl" >&5 no_cache=0 # Check whether --enable-intl or --disable-intl was given. if test "${enable_intl+set}" = set; then @@ -2493,8 +2552,8 @@ fi fi - echo $ac_n "checking "for --enable-config"""... $ac_c" 1>&6 -echo "configure:2498: checking "for --enable-config"" >&5 + echo $ac_n "checking for --enable-config""... $ac_c" 1>&6 +echo "configure:2557: checking for --enable-config" >&5 no_cache=0 # Check whether --enable-config or --disable-config was given. if test "${enable_config+set}" = set; then @@ -2533,8 +2592,8 @@ fi - echo $ac_n "checking "for --enable-sockets"""... $ac_c" 1>&6 -echo "configure:2538: checking "for --enable-sockets"" >&5 + echo $ac_n "checking for --enable-sockets""... $ac_c" 1>&6 +echo "configure:2597: checking for --enable-sockets" >&5 no_cache=0 # Check whether --enable-sockets or --disable-sockets was given. if test "${enable_sockets+set}" = set; then @@ -2573,8 +2632,8 @@ fi - echo $ac_n "checking "for --enable-ipc"""... $ac_c" 1>&6 -echo "configure:2578: checking "for --enable-ipc"" >&5 + echo $ac_n "checking for --enable-ipc""... $ac_c" 1>&6 +echo "configure:2637: checking for --enable-ipc" >&5 no_cache=0 # Check whether --enable-ipc or --disable-ipc was given. if test "${enable_ipc+set}" = set; then @@ -2613,8 +2672,8 @@ fi - echo $ac_n "checking "for --enable-dialupman"""... $ac_c" 1>&6 -echo "configure:2618: checking "for --enable-dialupman"" >&5 + echo $ac_n "checking for --enable-dialupman""... $ac_c" 1>&6 +echo "configure:2677: checking for --enable-dialupman" >&5 no_cache=0 # Check whether --enable-dialupman or --disable-dialupman was given. if test "${enable_dialupman+set}" = set; then @@ -2652,8 +2711,8 @@ fi fi - echo $ac_n "checking "for --enable-apple_ieee"""... $ac_c" 1>&6 -echo "configure:2657: checking "for --enable-apple_ieee"" >&5 + echo $ac_n "checking for --enable-apple_ieee""... $ac_c" 1>&6 +echo "configure:2716: checking for --enable-apple_ieee" >&5 no_cache=0 # Check whether --enable-apple_ieee or --disable-apple_ieee was given. if test "${enable_apple_ieee+set}" = set; then @@ -2691,8 +2750,8 @@ fi fi - echo $ac_n "checking "for --enable-timedate"""... $ac_c" 1>&6 -echo "configure:2696: checking "for --enable-timedate"" >&5 + echo $ac_n "checking for --enable-timedate""... $ac_c" 1>&6 +echo "configure:2755: checking for --enable-timedate" >&5 no_cache=0 # Check whether --enable-timedate or --disable-timedate was given. if test "${enable_timedate+set}" = set; then @@ -2730,8 +2789,8 @@ fi fi - echo $ac_n "checking "for --enable-wave"""... $ac_c" 1>&6 -echo "configure:2735: checking "for --enable-wave"" >&5 + echo $ac_n "checking for --enable-wave""... $ac_c" 1>&6 +echo "configure:2794: checking for --enable-wave" >&5 no_cache=0 # Check whether --enable-wave or --disable-wave was given. if test "${enable_wave+set}" = set; then @@ -2769,8 +2828,8 @@ fi fi - echo $ac_n "checking "for --enable-fraction"""... $ac_c" 1>&6 -echo "configure:2774: checking "for --enable-fraction"" >&5 + echo $ac_n "checking for --enable-fraction""... $ac_c" 1>&6 +echo "configure:2833: checking for --enable-fraction" >&5 no_cache=0 # Check whether --enable-fraction or --disable-fraction was given. if test "${enable_fraction+set}" = set; then @@ -2808,8 +2867,8 @@ fi fi - echo $ac_n "checking "for --enable-dynlib"""... $ac_c" 1>&6 -echo "configure:2813: checking "for --enable-dynlib"" >&5 + echo $ac_n "checking for --enable-dynlib""... $ac_c" 1>&6 +echo "configure:2872: checking for --enable-dynlib" >&5 no_cache=0 # Check whether --enable-dynlib or --disable-dynlib was given. if test "${enable_dynlib+set}" = set; then @@ -2847,8 +2906,8 @@ fi fi - echo $ac_n "checking "for --enable-longlong"""... $ac_c" 1>&6 -echo "configure:2852: checking "for --enable-longlong"" >&5 + echo $ac_n "checking for --enable-longlong""... $ac_c" 1>&6 +echo "configure:2911: checking for --enable-longlong" >&5 no_cache=0 # Check whether --enable-longlong or --disable-longlong was given. if test "${enable_longlong+set}" = set; then @@ -2886,8 +2945,8 @@ fi fi - echo $ac_n "checking "for --enable-log"""... $ac_c" 1>&6 -echo "configure:2891: checking "for --enable-log"" >&5 + echo $ac_n "checking for --enable-log""... $ac_c" 1>&6 +echo "configure:2950: checking for --enable-log" >&5 no_cache=0 # Check whether --enable-log or --disable-log was given. if test "${enable_log+set}" = set; then @@ -2925,8 +2984,8 @@ fi fi - echo $ac_n "checking "for --enable-streams"""... $ac_c" 1>&6 -echo "configure:2930: checking "for --enable-streams"" >&5 + echo $ac_n "checking for --enable-streams""... $ac_c" 1>&6 +echo "configure:2989: checking for --enable-streams" >&5 no_cache=0 # Check whether --enable-streams or --disable-streams was given. if test "${enable_streams+set}" = set; then @@ -2964,8 +3023,8 @@ fi fi - echo $ac_n "checking "for --enable-file"""... $ac_c" 1>&6 -echo "configure:2969: checking "for --enable-file"" >&5 + echo $ac_n "checking for --enable-file""... $ac_c" 1>&6 +echo "configure:3028: checking for --enable-file" >&5 no_cache=0 # Check whether --enable-file or --disable-file was given. if test "${enable_file+set}" = set; then @@ -3003,8 +3062,8 @@ fi fi - echo $ac_n "checking "for --enable-textfile"""... $ac_c" 1>&6 -echo "configure:3008: checking "for --enable-textfile"" >&5 + echo $ac_n "checking for --enable-textfile""... $ac_c" 1>&6 +echo "configure:3067: checking for --enable-textfile" >&5 no_cache=0 # Check whether --enable-textfile or --disable-textfile was given. if test "${enable_textfile+set}" = set; then @@ -3042,8 +3101,8 @@ fi fi - echo $ac_n "checking "for --enable-unicode"""... $ac_c" 1>&6 -echo "configure:3047: checking "for --enable-unicode"" >&5 + echo $ac_n "checking for --enable-unicode""... $ac_c" 1>&6 +echo "configure:3106: checking for --enable-unicode" >&5 no_cache=0 # Check whether --enable-unicode or --disable-unicode was given. if test "${enable_unicode+set}" = set; then @@ -3081,8 +3140,8 @@ fi fi - echo $ac_n "checking "for --enable-wcsrtombs"""... $ac_c" 1>&6 -echo "configure:3086: checking "for --enable-wcsrtombs"" >&5 + echo $ac_n "checking for --enable-wcsrtombs""... $ac_c" 1>&6 +echo "configure:3145: checking for --enable-wcsrtombs" >&5 no_cache=0 # Check whether --enable-wcsrtombs or --disable-wcsrtombs was given. if test "${enable_wcsrtombs+set}" = set; then @@ -3120,8 +3179,8 @@ fi fi - echo $ac_n "checking "for --enable-wxprintfv"""... $ac_c" 1>&6 -echo "configure:3125: checking "for --enable-wxprintfv"" >&5 + echo $ac_n "checking for --enable-wxprintfv""... $ac_c" 1>&6 +echo "configure:3184: checking for --enable-wxprintfv" >&5 no_cache=0 # Check whether --enable-wxprintfv or --disable-wxprintfv was given. if test "${enable_wxprintfv+set}" = set; then @@ -3159,47 +3218,8 @@ fi fi - echo $ac_n "checking "for --enable-joystick"""... $ac_c" 1>&6 -echo "configure:3164: checking "for --enable-joystick"" >&5 - no_cache=0 - # Check whether --enable-joystick or --disable-joystick was given. -if test "${enable_joystick+set}" = set; then - enableval="$enable_joystick" - - if test "$enableval" = yes; then - ac_cv_use_joystick='wxUSE_JOYSTICK=yes' - else - ac_cv_use_joystick='wxUSE_JOYSTICK=no' - fi - -else - - LINE=`grep "wxUSE_JOYSTICK" ${wx_arg_cache_file}` - if test "x$LINE" != x ; then - eval "DEFAULT_$LINE" - else - no_cache=1 - fi - - ac_cv_use_joystick='wxUSE_JOYSTICK='$DEFAULT_wxUSE_JOYSTICK - -fi - - - eval "$ac_cv_use_joystick" - if test "$no_cache" != 1; then - echo $ac_cv_use_joystick >> ${wx_arg_cache_file}.tmp - fi - - if test "$wxUSE_JOYSTICK" = yes; then - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - - echo $ac_n "checking "for --enable-std_iostreams"""... $ac_c" 1>&6 -echo "configure:3203: checking "for --enable-std_iostreams"" >&5 + echo $ac_n "checking for --enable-std_iostreams""... $ac_c" 1>&6 +echo "configure:3223: checking for --enable-std_iostreams" >&5 no_cache=0 # Check whether --enable-std_iostreams or --disable-std_iostreams was given. if test "${enable_std_iostreams+set}" = set; then @@ -3237,8 +3257,8 @@ fi fi - echo $ac_n "checking "for --enable-filesystem"""... $ac_c" 1>&6 -echo "configure:3242: checking "for --enable-filesystem"" >&5 + echo $ac_n "checking for --enable-filesystem""... $ac_c" 1>&6 +echo "configure:3262: checking for --enable-filesystem" >&5 no_cache=0 # Check whether --enable-filesystem or --disable-filesystem was given. if test "${enable_filesystem+set}" = set; then @@ -3276,8 +3296,8 @@ fi fi - echo $ac_n "checking "for --enable-fs_inet"""... $ac_c" 1>&6 -echo "configure:3281: checking "for --enable-fs_inet"" >&5 + echo $ac_n "checking for --enable-fs_inet""... $ac_c" 1>&6 +echo "configure:3301: checking for --enable-fs_inet" >&5 no_cache=0 # Check whether --enable-fs_inet or --disable-fs_inet was given. if test "${enable_fs_inet+set}" = set; then @@ -3315,8 +3335,8 @@ fi fi - echo $ac_n "checking "for --enable-fs_zip"""... $ac_c" 1>&6 -echo "configure:3320: checking "for --enable-fs_zip"" >&5 + echo $ac_n "checking for --enable-fs_zip""... $ac_c" 1>&6 +echo "configure:3340: checking for --enable-fs_zip" >&5 no_cache=0 # Check whether --enable-fs_zip or --disable-fs_zip was given. if test "${enable_fs_zip+set}" = set; then @@ -3354,8 +3374,8 @@ fi fi - echo $ac_n "checking "for --enable-zipstream"""... $ac_c" 1>&6 -echo "configure:3359: checking "for --enable-zipstream"" >&5 + echo $ac_n "checking for --enable-zipstream""... $ac_c" 1>&6 +echo "configure:3379: checking for --enable-zipstream" >&5 no_cache=0 # Check whether --enable-zipstream or --disable-zipstream was given. if test "${enable_zipstream+set}" = set; then @@ -3394,8 +3414,8 @@ fi - echo $ac_n "checking "for --enable-catch_segvs"""... $ac_c" 1>&6 -echo "configure:3399: checking "for --enable-catch_segvs"" >&5 + echo $ac_n "checking for --enable-catch_segvs""... $ac_c" 1>&6 +echo "configure:3419: checking for --enable-catch_segvs" >&5 no_cache=0 # Check whether --enable-catch_segvs or --disable-catch_segvs was given. if test "${enable_catch_segvs+set}" = set; then @@ -3435,8 +3455,8 @@ fi - echo $ac_n "checking "for --enable-threads"""... $ac_c" 1>&6 -echo "configure:3440: checking "for --enable-threads"" >&5 + echo $ac_n "checking for --enable-threads""... $ac_c" 1>&6 +echo "configure:3460: checking for --enable-threads" >&5 no_cache=0 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then @@ -3474,8 +3494,8 @@ fi fi - echo $ac_n "checking "for --enable-serial"""... $ac_c" 1>&6 -echo "configure:3479: checking "for --enable-serial"" >&5 + echo $ac_n "checking for --enable-serial""... $ac_c" 1>&6 +echo "configure:3499: checking for --enable-serial" >&5 no_cache=0 # Check whether --enable-serial or --disable-serial was given. if test "${enable_serial+set}" = set; then @@ -3517,8 +3537,8 @@ if test "$wxUSE_GUI" = "yes"; then - echo $ac_n "checking "for --enable-docview"""... $ac_c" 1>&6 -echo "configure:3522: checking "for --enable-docview"" >&5 + echo $ac_n "checking for --enable-docview""... $ac_c" 1>&6 +echo "configure:3542: checking for --enable-docview" >&5 no_cache=0 # Check whether --enable-docview or --disable-docview was given. if test "${enable_docview+set}" = set; then @@ -3556,8 +3576,8 @@ fi fi - echo $ac_n "checking "for --enable-help"""... $ac_c" 1>&6 -echo "configure:3561: checking "for --enable-help"" >&5 + echo $ac_n "checking for --enable-help""... $ac_c" 1>&6 +echo "configure:3581: checking for --enable-help" >&5 no_cache=0 # Check whether --enable-help or --disable-help was given. if test "${enable_help+set}" = set; then @@ -3595,8 +3615,8 @@ fi fi - echo $ac_n "checking "for --enable-constraints"""... $ac_c" 1>&6 -echo "configure:3600: checking "for --enable-constraints"" >&5 + echo $ac_n "checking for --enable-constraints""... $ac_c" 1>&6 +echo "configure:3620: checking for --enable-constraints" >&5 no_cache=0 # Check whether --enable-constraints or --disable-constraints was given. if test "${enable_constraints+set}" = set; then @@ -3634,8 +3654,8 @@ fi fi - echo $ac_n "checking "for --enable-printarch"""... $ac_c" 1>&6 -echo "configure:3639: checking "for --enable-printarch"" >&5 + echo $ac_n "checking for --enable-printarch""... $ac_c" 1>&6 +echo "configure:3659: checking for --enable-printarch" >&5 no_cache=0 # Check whether --enable-printarch or --disable-printarch was given. if test "${enable_printarch+set}" = set; then @@ -3673,8 +3693,8 @@ fi fi - echo $ac_n "checking "for --enable-mdi"""... $ac_c" 1>&6 -echo "configure:3678: checking "for --enable-mdi"" >&5 + echo $ac_n "checking for --enable-mdi""... $ac_c" 1>&6 +echo "configure:3698: checking for --enable-mdi" >&5 no_cache=0 # Check whether --enable-mdi or --disable-mdi was given. if test "${enable_mdi+set}" = set; then @@ -3713,8 +3733,8 @@ fi - echo $ac_n "checking "for --enable-postscript"""... $ac_c" 1>&6 -echo "configure:3718: checking "for --enable-postscript"" >&5 + echo $ac_n "checking for --enable-postscript""... $ac_c" 1>&6 +echo "configure:3738: checking for --enable-postscript" >&5 no_cache=0 # Check whether --enable-postscript or --disable-postscript was given. if test "${enable_postscript+set}" = set; then @@ -3754,8 +3774,8 @@ fi - echo $ac_n "checking "for --enable-prologio"""... $ac_c" 1>&6 -echo "configure:3759: checking "for --enable-prologio"" >&5 + echo $ac_n "checking for --enable-prologio""... $ac_c" 1>&6 +echo "configure:3779: checking for --enable-prologio" >&5 no_cache=0 # Check whether --enable-prologio or --disable-prologio was given. if test "${enable_prologio+set}" = set; then @@ -3793,8 +3813,8 @@ fi fi - echo $ac_n "checking "for --enable-resources"""... $ac_c" 1>&6 -echo "configure:3798: checking "for --enable-resources"" >&5 + echo $ac_n "checking for --enable-resources""... $ac_c" 1>&6 +echo "configure:3818: checking for --enable-resources" >&5 no_cache=0 # Check whether --enable-resources or --disable-resources was given. if test "${enable_resources+set}" = set; then @@ -3833,8 +3853,8 @@ fi - echo $ac_n "checking "for --enable-xresources"""... $ac_c" 1>&6 -echo "configure:3838: checking "for --enable-xresources"" >&5 + echo $ac_n "checking for --enable-xresources""... $ac_c" 1>&6 +echo "configure:3858: checking for --enable-xresources" >&5 no_cache=0 # Check whether --enable-xresources or --disable-xresources was given. if test "${enable_xresources+set}" = set; then @@ -3874,8 +3894,8 @@ fi - echo $ac_n "checking "for --enable-clipboard"""... $ac_c" 1>&6 -echo "configure:3879: checking "for --enable-clipboard"" >&5 + echo $ac_n "checking for --enable-clipboard""... $ac_c" 1>&6 +echo "configure:3899: checking for --enable-clipboard" >&5 no_cache=0 # Check whether --enable-clipboard or --disable-clipboard was given. if test "${enable_clipboard+set}" = set; then @@ -3913,8 +3933,8 @@ fi fi - echo $ac_n "checking "for --enable-dnd"""... $ac_c" 1>&6 -echo "configure:3918: checking "for --enable-dnd"" >&5 + echo $ac_n "checking for --enable-dnd""... $ac_c" 1>&6 +echo "configure:3938: checking for --enable-dnd" >&5 no_cache=0 # Check whether --enable-dnd or --disable-dnd was given. if test "${enable_dnd+set}" = set; then @@ -3952,40 +3972,79 @@ fi fi - - echo $ac_n "checking "for --enable-wxtree"""... $ac_c" 1>&6 -echo "configure:3958: checking "for --enable-wxtree"" >&5 + echo $ac_n "checking for --enable-metafile""... $ac_c" 1>&6 +echo "configure:3977: checking for --enable-metafile" >&5 no_cache=0 - # Check whether --enable-wxtree or --disable-wxtree was given. -if test "${enable_wxtree+set}" = set; then - enableval="$enable_wxtree" + # Check whether --enable-metafile or --disable-metafile was given. +if test "${enable_metafile+set}" = set; then + enableval="$enable_metafile" if test "$enableval" = yes; then - ac_cv_use_wxtree='wxUSE_WXTREE=yes' + ac_cv_use_metafile='wxUSE_METAFILE=yes' else - ac_cv_use_wxtree='wxUSE_WXTREE=no' + ac_cv_use_metafile='wxUSE_METAFILE=no' fi else - LINE=`grep "wxUSE_WXTREE" ${wx_arg_cache_file}` + LINE=`grep "wxUSE_METAFILE" ${wx_arg_cache_file}` if test "x$LINE" != x ; then eval "DEFAULT_$LINE" else no_cache=1 fi - ac_cv_use_wxtree='wxUSE_WXTREE='$DEFAULT_wxUSE_WXTREE + ac_cv_use_metafile='wxUSE_METAFILE='$DEFAULT_wxUSE_METAFILE fi - eval "$ac_cv_use_wxtree" + eval "$ac_cv_use_metafile" if test "$no_cache" != 1; then - echo $ac_cv_use_wxtree >> ${wx_arg_cache_file}.tmp + echo $ac_cv_use_metafile >> ${wx_arg_cache_file}.tmp fi - if test "$wxUSE_WXTREE" = yes; then + if test "$wxUSE_METAFILE" = yes; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + + echo $ac_n "checking for --enable-treelayout""... $ac_c" 1>&6 +echo "configure:4017: checking for --enable-treelayout" >&5 + no_cache=0 + # Check whether --enable-treelayout or --disable-treelayout was given. +if test "${enable_treelayout+set}" = set; then + enableval="$enable_treelayout" + + if test "$enableval" = yes; then + ac_cv_use_treelayout='wxUSE_TREELAYOUT=yes' + else + ac_cv_use_treelayout='wxUSE_TREELAYOUT=no' + fi + +else + + LINE=`grep "wxUSE_TREELAYOUT" ${wx_arg_cache_file}` + if test "x$LINE" != x ; then + eval "DEFAULT_$LINE" + else + no_cache=1 + fi + + ac_cv_use_treelayout='wxUSE_TREELAYOUT='$DEFAULT_wxUSE_TREELAYOUT + +fi + + + eval "$ac_cv_use_treelayout" + if test "$no_cache" != 1; then + echo $ac_cv_use_treelayout >> ${wx_arg_cache_file}.tmp + fi + + if test "$wxUSE_TREELAYOUT" = yes; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 @@ -3994,8 +4053,8 @@ fi - echo $ac_n "checking "for --enable-controls"""... $ac_c" 1>&6 -echo "configure:3999: checking "for --enable-controls"" >&5 + echo $ac_n "checking for --enable-controls""... $ac_c" 1>&6 +echo "configure:4058: checking for --enable-controls" >&5 no_cache=0 # Check whether --enable-controls or --disable-controls was given. if test "${enable_controls+set}" = set; then @@ -4102,8 +4161,8 @@ elif test "$wxUSE_CONTROLS" = "no"; then fi - echo $ac_n "checking "for --enable-accel"""... $ac_c" 1>&6 -echo "configure:4107: checking "for --enable-accel"" >&5 + echo $ac_n "checking for --enable-accel""... $ac_c" 1>&6 +echo "configure:4166: checking for --enable-accel" >&5 no_cache=0 # Check whether --enable-accel or --disable-accel was given. if test "${enable_accel+set}" = set; then @@ -4141,8 +4200,8 @@ fi fi - echo $ac_n "checking "for --enable-caret"""... $ac_c" 1>&6 -echo "configure:4146: checking "for --enable-caret"" >&5 + echo $ac_n "checking for --enable-caret""... $ac_c" 1>&6 +echo "configure:4205: checking for --enable-caret" >&5 no_cache=0 # Check whether --enable-caret or --disable-caret was given. if test "${enable_caret+set}" = set; then @@ -4180,8 +4239,8 @@ fi fi - echo $ac_n "checking "for --enable-bmpbutton"""... $ac_c" 1>&6 -echo "configure:4185: checking "for --enable-bmpbutton"" >&5 + echo $ac_n "checking for --enable-bmpbutton""... $ac_c" 1>&6 +echo "configure:4244: checking for --enable-bmpbutton" >&5 no_cache=0 # Check whether --enable-bmpbutton or --disable-bmpbutton was given. if test "${enable_bmpbutton+set}" = set; then @@ -4219,8 +4278,8 @@ fi fi - echo $ac_n "checking "for --enable-checkbox"""... $ac_c" 1>&6 -echo "configure:4224: checking "for --enable-checkbox"" >&5 + echo $ac_n "checking for --enable-checkbox""... $ac_c" 1>&6 +echo "configure:4283: checking for --enable-checkbox" >&5 no_cache=0 # Check whether --enable-checkbox or --disable-checkbox was given. if test "${enable_checkbox+set}" = set; then @@ -4258,8 +4317,8 @@ fi fi - echo $ac_n "checking "for --enable-checklst"""... $ac_c" 1>&6 -echo "configure:4263: checking "for --enable-checklst"" >&5 + echo $ac_n "checking for --enable-checklst""... $ac_c" 1>&6 +echo "configure:4322: checking for --enable-checklst" >&5 no_cache=0 # Check whether --enable-checklst or --disable-checklst was given. if test "${enable_checklst+set}" = set; then @@ -4297,8 +4356,8 @@ fi fi - echo $ac_n "checking "for --enable-choice"""... $ac_c" 1>&6 -echo "configure:4302: checking "for --enable-choice"" >&5 + echo $ac_n "checking for --enable-choice""... $ac_c" 1>&6 +echo "configure:4361: checking for --enable-choice" >&5 no_cache=0 # Check whether --enable-choice or --disable-choice was given. if test "${enable_choice+set}" = set; then @@ -4336,8 +4395,8 @@ fi fi - echo $ac_n "checking "for --enable-combobox"""... $ac_c" 1>&6 -echo "configure:4341: checking "for --enable-combobox"" >&5 + echo $ac_n "checking for --enable-combobox""... $ac_c" 1>&6 +echo "configure:4400: checking for --enable-combobox" >&5 no_cache=0 # Check whether --enable-combobox or --disable-combobox was given. if test "${enable_combobox+set}" = set; then @@ -4375,8 +4434,8 @@ fi fi - echo $ac_n "checking "for --enable-gauge"""... $ac_c" 1>&6 -echo "configure:4380: checking "for --enable-gauge"" >&5 + echo $ac_n "checking for --enable-gauge""... $ac_c" 1>&6 +echo "configure:4439: checking for --enable-gauge" >&5 no_cache=0 # Check whether --enable-gauge or --disable-gauge was given. if test "${enable_gauge+set}" = set; then @@ -4414,8 +4473,8 @@ fi fi - echo $ac_n "checking "for --enable-grid"""... $ac_c" 1>&6 -echo "configure:4419: checking "for --enable-grid"" >&5 + echo $ac_n "checking for --enable-grid""... $ac_c" 1>&6 +echo "configure:4478: checking for --enable-grid" >&5 no_cache=0 # Check whether --enable-grid or --disable-grid was given. if test "${enable_grid+set}" = set; then @@ -4453,8 +4512,8 @@ fi fi - echo $ac_n "checking "for --enable-newgrid"""... $ac_c" 1>&6 -echo "configure:4458: checking "for --enable-newgrid"" >&5 + echo $ac_n "checking for --enable-newgrid""... $ac_c" 1>&6 +echo "configure:4517: checking for --enable-newgrid" >&5 no_cache=0 # Check whether --enable-newgrid or --disable-newgrid was given. if test "${enable_newgrid+set}" = set; then @@ -4492,8 +4551,8 @@ fi fi - echo $ac_n "checking "for --enable-imaglist"""... $ac_c" 1>&6 -echo "configure:4497: checking "for --enable-imaglist"" >&5 + echo $ac_n "checking for --enable-imaglist""... $ac_c" 1>&6 +echo "configure:4556: checking for --enable-imaglist" >&5 no_cache=0 # Check whether --enable-imaglist or --disable-imaglist was given. if test "${enable_imaglist+set}" = set; then @@ -4531,8 +4590,8 @@ fi fi - echo $ac_n "checking "for --enable-listbox"""... $ac_c" 1>&6 -echo "configure:4536: checking "for --enable-listbox"" >&5 + echo $ac_n "checking for --enable-listbox""... $ac_c" 1>&6 +echo "configure:4595: checking for --enable-listbox" >&5 no_cache=0 # Check whether --enable-listbox or --disable-listbox was given. if test "${enable_listbox+set}" = set; then @@ -4570,8 +4629,8 @@ fi fi - echo $ac_n "checking "for --enable-listctrl"""... $ac_c" 1>&6 -echo "configure:4575: checking "for --enable-listctrl"" >&5 + echo $ac_n "checking for --enable-listctrl""... $ac_c" 1>&6 +echo "configure:4634: checking for --enable-listctrl" >&5 no_cache=0 # Check whether --enable-listctrl or --disable-listctrl was given. if test "${enable_listctrl+set}" = set; then @@ -4609,8 +4668,8 @@ fi fi - echo $ac_n "checking "for --enable-notebook"""... $ac_c" 1>&6 -echo "configure:4614: checking "for --enable-notebook"" >&5 + echo $ac_n "checking for --enable-notebook""... $ac_c" 1>&6 +echo "configure:4673: checking for --enable-notebook" >&5 no_cache=0 # Check whether --enable-notebook or --disable-notebook was given. if test "${enable_notebook+set}" = set; then @@ -4648,8 +4707,8 @@ fi fi - echo $ac_n "checking "for --enable-radiobox"""... $ac_c" 1>&6 -echo "configure:4653: checking "for --enable-radiobox"" >&5 + echo $ac_n "checking for --enable-radiobox""... $ac_c" 1>&6 +echo "configure:4712: checking for --enable-radiobox" >&5 no_cache=0 # Check whether --enable-radiobox or --disable-radiobox was given. if test "${enable_radiobox+set}" = set; then @@ -4687,8 +4746,8 @@ fi fi - echo $ac_n "checking "for --enable-radiobtn"""... $ac_c" 1>&6 -echo "configure:4692: checking "for --enable-radiobtn"" >&5 + echo $ac_n "checking for --enable-radiobtn""... $ac_c" 1>&6 +echo "configure:4751: checking for --enable-radiobtn" >&5 no_cache=0 # Check whether --enable-radiobtn or --disable-radiobtn was given. if test "${enable_radiobtn+set}" = set; then @@ -4726,8 +4785,8 @@ fi fi - echo $ac_n "checking "for --enable-sash"""... $ac_c" 1>&6 -echo "configure:4731: checking "for --enable-sash"" >&5 + echo $ac_n "checking for --enable-sash""... $ac_c" 1>&6 +echo "configure:4790: checking for --enable-sash" >&5 no_cache=0 # Check whether --enable-sash or --disable-sash was given. if test "${enable_sash+set}" = set; then @@ -4765,8 +4824,8 @@ fi fi - echo $ac_n "checking "for --enable-scrollbar"""... $ac_c" 1>&6 -echo "configure:4770: checking "for --enable-scrollbar"" >&5 + echo $ac_n "checking for --enable-scrollbar""... $ac_c" 1>&6 +echo "configure:4829: checking for --enable-scrollbar" >&5 no_cache=0 # Check whether --enable-scrollbar or --disable-scrollbar was given. if test "${enable_scrollbar+set}" = set; then @@ -4804,8 +4863,8 @@ fi fi - echo $ac_n "checking "for --enable-slider"""... $ac_c" 1>&6 -echo "configure:4809: checking "for --enable-slider"" >&5 + echo $ac_n "checking for --enable-slider""... $ac_c" 1>&6 +echo "configure:4868: checking for --enable-slider" >&5 no_cache=0 # Check whether --enable-slider or --disable-slider was given. if test "${enable_slider+set}" = set; then @@ -4843,8 +4902,8 @@ fi fi - echo $ac_n "checking "for --enable-spinbtn"""... $ac_c" 1>&6 -echo "configure:4848: checking "for --enable-spinbtn"" >&5 + echo $ac_n "checking for --enable-spinbtn""... $ac_c" 1>&6 +echo "configure:4907: checking for --enable-spinbtn" >&5 no_cache=0 # Check whether --enable-spinbtn or --disable-spinbtn was given. if test "${enable_spinbtn+set}" = set; then @@ -4882,8 +4941,8 @@ fi fi - echo $ac_n "checking "for --enable-spinctrl"""... $ac_c" 1>&6 -echo "configure:4887: checking "for --enable-spinctrl"" >&5 + echo $ac_n "checking for --enable-spinctrl""... $ac_c" 1>&6 +echo "configure:4946: checking for --enable-spinctrl" >&5 no_cache=0 # Check whether --enable-spinctrl or --disable-spinctrl was given. if test "${enable_spinctrl+set}" = set; then @@ -4921,8 +4980,8 @@ fi fi - echo $ac_n "checking "for --enable-splitter"""... $ac_c" 1>&6 -echo "configure:4926: checking "for --enable-splitter"" >&5 + echo $ac_n "checking for --enable-splitter""... $ac_c" 1>&6 +echo "configure:4985: checking for --enable-splitter" >&5 no_cache=0 # Check whether --enable-splitter or --disable-splitter was given. if test "${enable_splitter+set}" = set; then @@ -4960,8 +5019,8 @@ fi fi - echo $ac_n "checking "for --enable-statbmp"""... $ac_c" 1>&6 -echo "configure:4965: checking "for --enable-statbmp"" >&5 + echo $ac_n "checking for --enable-statbmp""... $ac_c" 1>&6 +echo "configure:5024: checking for --enable-statbmp" >&5 no_cache=0 # Check whether --enable-statbmp or --disable-statbmp was given. if test "${enable_statbmp+set}" = set; then @@ -4999,8 +5058,8 @@ fi fi - echo $ac_n "checking "for --enable-statbox"""... $ac_c" 1>&6 -echo "configure:5004: checking "for --enable-statbox"" >&5 + echo $ac_n "checking for --enable-statbox""... $ac_c" 1>&6 +echo "configure:5063: checking for --enable-statbox" >&5 no_cache=0 # Check whether --enable-statbox or --disable-statbox was given. if test "${enable_statbox+set}" = set; then @@ -5038,8 +5097,8 @@ fi fi - echo $ac_n "checking "for --enable-statline"""... $ac_c" 1>&6 -echo "configure:5043: checking "for --enable-statline"" >&5 + echo $ac_n "checking for --enable-statline""... $ac_c" 1>&6 +echo "configure:5102: checking for --enable-statline" >&5 no_cache=0 # Check whether --enable-statline or --disable-statline was given. if test "${enable_statline+set}" = set; then @@ -5077,8 +5136,8 @@ fi fi - echo $ac_n "checking "for --enable-statusbar"""... $ac_c" 1>&6 -echo "configure:5082: checking "for --enable-statusbar"" >&5 + echo $ac_n "checking for --enable-statusbar""... $ac_c" 1>&6 +echo "configure:5141: checking for --enable-statusbar" >&5 no_cache=0 # Check whether --enable-statusbar or --disable-statusbar was given. if test "${enable_statusbar+set}" = set; then @@ -5116,8 +5175,8 @@ fi fi - echo $ac_n "checking "for --enable-tabdialog"""... $ac_c" 1>&6 -echo "configure:5121: checking "for --enable-tabdialog"" >&5 + echo $ac_n "checking for --enable-tabdialog""... $ac_c" 1>&6 +echo "configure:5180: checking for --enable-tabdialog" >&5 no_cache=0 # Check whether --enable-tabdialog or --disable-tabdialog was given. if test "${enable_tabdialog+set}" = set; then @@ -5155,8 +5214,8 @@ fi fi - echo $ac_n "checking "for --enable-toolbar"""... $ac_c" 1>&6 -echo "configure:5160: checking "for --enable-toolbar"" >&5 + echo $ac_n "checking for --enable-toolbar""... $ac_c" 1>&6 +echo "configure:5219: checking for --enable-toolbar" >&5 no_cache=0 # Check whether --enable-toolbar or --disable-toolbar was given. if test "${enable_toolbar+set}" = set; then @@ -5194,8 +5253,8 @@ fi fi - echo $ac_n "checking "for --enable-tbarnative"""... $ac_c" 1>&6 -echo "configure:5199: checking "for --enable-tbarnative"" >&5 + echo $ac_n "checking for --enable-tbarnative""... $ac_c" 1>&6 +echo "configure:5258: checking for --enable-tbarnative" >&5 no_cache=0 # Check whether --enable-tbarnative or --disable-tbarnative was given. if test "${enable_tbarnative+set}" = set; then @@ -5233,8 +5292,8 @@ fi fi - echo $ac_n "checking "for --enable-tbarsmpl"""... $ac_c" 1>&6 -echo "configure:5238: checking "for --enable-tbarsmpl"" >&5 + echo $ac_n "checking for --enable-tbarsmpl""... $ac_c" 1>&6 +echo "configure:5297: checking for --enable-tbarsmpl" >&5 no_cache=0 # Check whether --enable-tbarsmpl or --disable-tbarsmpl was given. if test "${enable_tbarsmpl+set}" = set; then @@ -5272,8 +5331,8 @@ fi fi - echo $ac_n "checking "for --enable-treectrl"""... $ac_c" 1>&6 -echo "configure:5277: checking "for --enable-treectrl"" >&5 + echo $ac_n "checking for --enable-treectrl""... $ac_c" 1>&6 +echo "configure:5336: checking for --enable-treectrl" >&5 no_cache=0 # Check whether --enable-treectrl or --disable-treectrl was given. if test "${enable_treectrl+set}" = set; then @@ -5313,8 +5372,8 @@ fi - echo $ac_n "checking "for --enable-commondlg"""... $ac_c" 1>&6 -echo "configure:5318: checking "for --enable-commondlg"" >&5 + echo $ac_n "checking for --enable-commondlg""... $ac_c" 1>&6 +echo "configure:5377: checking for --enable-commondlg" >&5 no_cache=0 # Check whether --enable-commondlg or --disable-commondlg was given. if test "${enable_commondlg+set}" = set; then @@ -5352,8 +5411,8 @@ fi fi - echo $ac_n "checking "for --enable-dirdlg"""... $ac_c" 1>&6 -echo "configure:5357: checking "for --enable-dirdlg"" >&5 + echo $ac_n "checking for --enable-dirdlg""... $ac_c" 1>&6 +echo "configure:5416: checking for --enable-dirdlg" >&5 no_cache=0 # Check whether --enable-dirdlg or --disable-dirdlg was given. if test "${enable_dirdlg+set}" = set; then @@ -5391,8 +5450,8 @@ fi fi - echo $ac_n "checking "for --enable-textdlg"""... $ac_c" 1>&6 -echo "configure:5396: checking "for --enable-textdlg"" >&5 + echo $ac_n "checking for --enable-textdlg""... $ac_c" 1>&6 +echo "configure:5455: checking for --enable-textdlg" >&5 no_cache=0 # Check whether --enable-textdlg or --disable-textdlg was given. if test "${enable_textdlg+set}" = set; then @@ -5430,8 +5489,8 @@ fi fi - echo $ac_n "checking "for --enable-tipdlg"""... $ac_c" 1>&6 -echo "configure:5435: checking "for --enable-tipdlg"" >&5 + echo $ac_n "checking for --enable-tipdlg""... $ac_c" 1>&6 +echo "configure:5494: checking for --enable-tipdlg" >&5 no_cache=0 # Check whether --enable-tipdlg or --disable-tipdlg was given. if test "${enable_tipdlg+set}" = set; then @@ -5469,8 +5528,8 @@ fi fi - echo $ac_n "checking "for --enable-progressdlg"""... $ac_c" 1>&6 -echo "configure:5474: checking "for --enable-progressdlg"" >&5 + echo $ac_n "checking for --enable-progressdlg""... $ac_c" 1>&6 +echo "configure:5533: checking for --enable-progressdlg" >&5 no_cache=0 # Check whether --enable-progressdlg or --disable-progressdlg was given. if test "${enable_progressdlg+set}" = set; then @@ -5508,8 +5567,8 @@ fi fi - echo $ac_n "checking "for --enable-miniframe"""... $ac_c" 1>&6 -echo "configure:5513: checking "for --enable-miniframe"" >&5 + echo $ac_n "checking for --enable-miniframe""... $ac_c" 1>&6 +echo "configure:5572: checking for --enable-miniframe" >&5 no_cache=0 # Check whether --enable-miniframe or --disable-miniframe was given. if test "${enable_miniframe+set}" = set; then @@ -5547,8 +5606,8 @@ fi fi - echo $ac_n "checking "for --enable-html"""... $ac_c" 1>&6 -echo "configure:5552: checking "for --enable-html"" >&5 + echo $ac_n "checking for --enable-html""... $ac_c" 1>&6 +echo "configure:5611: checking for --enable-html" >&5 no_cache=0 # Check whether --enable-html or --disable-html was given. if test "${enable_html+set}" = set; then @@ -5586,8 +5645,8 @@ fi fi - echo $ac_n "checking "for --enable-tooltips"""... $ac_c" 1>&6 -echo "configure:5591: checking "for --enable-tooltips"" >&5 + echo $ac_n "checking for --enable-tooltips""... $ac_c" 1>&6 +echo "configure:5650: checking for --enable-tooltips" >&5 no_cache=0 # Check whether --enable-tooltips or --disable-tooltips was given. if test "${enable_tooltips+set}" = set; then @@ -5625,8 +5684,8 @@ fi fi - echo $ac_n "checking "for --enable-splines"""... $ac_c" 1>&6 -echo "configure:5630: checking "for --enable-splines"" >&5 + echo $ac_n "checking for --enable-splines""... $ac_c" 1>&6 +echo "configure:5689: checking for --enable-splines" >&5 no_cache=0 # Check whether --enable-splines or --disable-splines was given. if test "${enable_splines+set}" = set; then @@ -5664,8 +5723,8 @@ fi fi - echo $ac_n "checking "for --enable-validators"""... $ac_c" 1>&6 -echo "configure:5669: checking "for --enable-validators"" >&5 + echo $ac_n "checking for --enable-validators""... $ac_c" 1>&6 +echo "configure:5728: checking for --enable-validators" >&5 no_cache=0 # Check whether --enable-validators or --disable-validators was given. if test "${enable_validators+set}" = set; then @@ -5703,8 +5762,8 @@ fi fi - echo $ac_n "checking "for --enable-busyinfo"""... $ac_c" 1>&6 -echo "configure:5708: checking "for --enable-busyinfo"" >&5 + echo $ac_n "checking for --enable-busyinfo""... $ac_c" 1>&6 +echo "configure:5767: checking for --enable-busyinfo" >&5 no_cache=0 # Check whether --enable-busyinfo or --disable-busyinfo was given. if test "${enable_busyinfo+set}" = set; then @@ -5742,8 +5801,8 @@ fi fi - echo $ac_n "checking "for --enable-plot"""... $ac_c" 1>&6 -echo "configure:5747: checking "for --enable-plot"" >&5 + echo $ac_n "checking for --enable-plot""... $ac_c" 1>&6 +echo "configure:5806: checking for --enable-plot" >&5 no_cache=0 # Check whether --enable-plot or --disable-plot was given. if test "${enable_plot+set}" = set; then @@ -5781,10 +5840,49 @@ fi fi + echo $ac_n "checking for --enable-joystick""... $ac_c" 1>&6 +echo "configure:5845: checking for --enable-joystick" >&5 + no_cache=0 + # Check whether --enable-joystick or --disable-joystick was given. +if test "${enable_joystick+set}" = set; then + enableval="$enable_joystick" + + if test "$enableval" = yes; then + ac_cv_use_joystick='wxUSE_JOYSTICK=yes' + else + ac_cv_use_joystick='wxUSE_JOYSTICK=no' + fi + +else + + LINE=`grep "wxUSE_JOYSTICK" ${wx_arg_cache_file}` + if test "x$LINE" != x ; then + eval "DEFAULT_$LINE" + else + no_cache=1 + fi + + ac_cv_use_joystick='wxUSE_JOYSTICK='$DEFAULT_wxUSE_JOYSTICK + +fi - echo $ac_n "checking "for --enable-gif"""... $ac_c" 1>&6 -echo "configure:5788: checking "for --enable-gif"" >&5 + eval "$ac_cv_use_joystick" + if test "$no_cache" != 1; then + echo $ac_cv_use_joystick >> ${wx_arg_cache_file}.tmp + fi + + if test "$wxUSE_JOYSTICK" = yes; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + + + echo $ac_n "checking for --enable-gif""... $ac_c" 1>&6 +echo "configure:5886: checking for --enable-gif" >&5 no_cache=0 # Check whether --enable-gif or --disable-gif was given. if test "${enable_gif+set}" = set; then @@ -5822,8 +5920,8 @@ fi fi - echo $ac_n "checking "for --enable-pcx"""... $ac_c" 1>&6 -echo "configure:5827: checking "for --enable-pcx"" >&5 + echo $ac_n "checking for --enable-pcx""... $ac_c" 1>&6 +echo "configure:5925: checking for --enable-pcx" >&5 no_cache=0 # Check whether --enable-pcx or --disable-pcx was given. if test "${enable_pcx+set}" = set; then @@ -5861,8 +5959,8 @@ fi fi - echo $ac_n "checking "for --enable-pnm"""... $ac_c" 1>&6 -echo "configure:5866: checking "for --enable-pnm"" >&5 + echo $ac_n "checking for --enable-pnm""... $ac_c" 1>&6 +echo "configure:5964: checking for --enable-pnm" >&5 no_cache=0 # Check whether --enable-pnm or --disable-pnm was given. if test "${enable_pnm+set}" = set; then @@ -5909,73 +6007,73 @@ fi echo $ac_n "checking for toolkit""... $ac_c" 1>&6 -echo "configure:5913: checking for toolkit" >&5 +echo "configure:6011: checking for toolkit" >&5 if test "$wxUSE_GUI" = "yes"; then -if test "$USE_BEOS" = 1; then - { echo "configure: error: BeOS GUI is not supported yet, use --disable-gui" 1>&2; exit 1; } -fi + if test "$USE_BEOS" = 1; then + { echo "configure: error: BeOS GUI is not supported yet, use --disable-gui" 1>&2; exit 1; } + fi -if test "$TOOLKIT_GIVEN" = 1; then - for toolkit in `echo $ALL_TOOLKITS`; do - var=wxUSE_$toolkit - eval "value=\$${var}" - eval "$var=`echo \$value | sed -e "s/yes/1/" -e "s/no/0/"`" - done -else - for toolkit in `echo $ALL_TOOLKITS`; do - if test "$has_toolkit_in_cache" != 1; then - var=DEFAULT_DEFAULT_wxUSE_$toolkit + if test "$TOOLKIT_GIVEN" = 1; then + for toolkit in `echo $ALL_TOOLKITS`; do + var=wxUSE_$toolkit + eval "value=\$${var}" + eval "$var=`echo \$value | sed -e "s/yes/1/" -e "s/no/0/"`" + done else - var=DEFAULT_wxUSE_$toolkit + for toolkit in `echo $ALL_TOOLKITS`; do + if test "$has_toolkit_in_cache" != 1; then + var=DEFAULT_DEFAULT_wxUSE_$toolkit + else + var=DEFAULT_wxUSE_$toolkit + fi + eval "wxUSE_$toolkit=\$${var}" + done fi - eval "wxUSE_$toolkit=\$${var}" - done -fi -NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_WINE:-0} + ${wxUSE_MINGW:-0} + ${wxUSE_CYGWIN:-0}` + NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_WINE:-0} + ${wxUSE_MINGW:-0} + ${wxUSE_CYGWIN:-0}` -case "${host}" in - *-pc-os2_emx ) - NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}` - # PATH_IFS is autodetected by OS/2's configure (usually ';') - LEX_STEM="lexyy" - ;; - *) - PATH_IFS=':' - LEX_STEM="lex.yy" - ;; -esac + case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}` + # PATH_IFS is autodetected by OS/2's configure (usually ';') + LEX_STEM="lexyy" + ;; + *) + PATH_IFS=':' + LEX_STEM="lex.yy" + ;; + esac -case "$NUM_TOOLKITS" in - 1) - ;; - 0) - { echo "configure: error: Please specify a toolkit - cannot determine the default for ${host}" 1>&2; exit 1; } - ;; - *) - { echo "configure: error: Please specify at most one toolkit (may be some are cached?)" 1>&2; exit 1; } -esac + case "$NUM_TOOLKITS" in + 1) + ;; + 0) + { echo "configure: error: Please specify a toolkit - cannot determine the default for ${host}" 1>&2; exit 1; } + ;; + *) + { echo "configure: error: Please specify at most one toolkit (may be some are cached?)" 1>&2; exit 1; } + esac -for toolkit in `echo $ALL_TOOLKITS`; do - var=wxUSE_$toolkit - eval "value=\$${var}" - if test "x$value" != x; then - cache_var=CACHE_$toolkit - eval "cache=\$${cache_var}" - if test "$cache" = 1; then - echo "$var=$value" >> ${wx_arg_cache_file} - fi - if test "$value" = 1; then - echo "$ac_t""`echo $toolkit | tr A-Z a-z`" 1>&6 - fi - fi -done + for toolkit in `echo $ALL_TOOLKITS`; do + var=wxUSE_$toolkit + eval "value=\$${var}" + if test "x$value" != x; then + cache_var=CACHE_$toolkit + eval "cache=\$${cache_var}" + if test "$cache" = 1; then + echo "$var=$value" >> ${wx_arg_cache_file} + fi + if test "$value" = 1; then + echo "$ac_t""`echo $toolkit | tr A-Z a-z`" 1>&6 + fi + fi + done else PATH_IFS=':' - echo "$ac_t""base only" 1>&6 + echo "$ac_t""base ($host_alias hosted) only" 1>&6 fi @@ -6028,21 +6126,25 @@ rm -f confcache if test "$build" != "$host" ; then - CC=$host_alias-gcc - CXX=$host_alias-c++ - AR=$host_alias-ar - RANLIB=$host_alias-ranlib - DLLTOOL=$host_alias-dlltool - RESCOMP=$host_alias-windres - LD=$host_alias-ld - NM=$host_alias-nm - STRIP=$host_alias-strip + if test "$USE_WIN32" = 1 ; then + CC=$host_alias-gcc + CXX=$host_alias-c++ + AR=$host_alias-ar + RANLIB=$host_alias-ranlib + DLLTOOL=$host_alias-dlltool + RESCOMP=$host_alias-windres + LD=$host_alias-ld + NM=$host_alias-nm + STRIP=$host_alias-strip + else + { echo "configure: error: $build_alias -> $host_alias cross compilation not supported yet." 1>&2; exit 1; } + fi fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6046: checking for $ac_word" >&5 +echo "configure:6148: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6072,7 +6174,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6076: checking for $ac_word" >&5 +echo "configure:6178: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6123,7 +6225,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6127: checking for $ac_word" >&5 +echo "configure:6229: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6155,7 +6257,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:6159: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:6261: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -6166,12 +6268,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 6170 "configure" +#line 6272 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -6197,12 +6299,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:6201: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:6303: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:6206: checking whether we are using GNU C" >&5 +echo "configure:6308: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6211,7 +6313,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:6215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:6317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -6230,7 +6332,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:6234: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:6336: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6265,7 +6367,7 @@ fi CFLAGS=`echo "$CFLAGS" | sed 's/-g//g'` echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:6269: checking how to run the C preprocessor" >&5 +echo "configure:6371: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -6280,13 +6382,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -6297,13 +6399,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -6314,13 +6416,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -6347,13 +6449,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:6351: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:6453: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -6371,7 +6473,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -6407,7 +6509,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6411: checking for $ac_word" >&5 +echo "configure:6513: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6439,7 +6541,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:6443: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:6545: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -6450,12 +6552,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 6454 "configure" +#line 6556 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -6481,12 +6583,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:6485: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:6587: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:6490: checking whether we are using GNU C++" >&5 +echo "configure:6592: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6495,7 +6597,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:6499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:6601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -6514,7 +6616,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:6518: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:6620: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6547,7 +6649,7 @@ fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:6551: checking how to run the C++ preprocessor" >&5 +echo "configure:6653: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6560,12 +6662,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -6603,7 +6705,7 @@ cross_compiling=$ac_cv_prog_cc_cross # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6607: checking for $ac_word" >&5 +echo "configure:6709: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6634,7 +6736,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6638: checking for $ac_word" >&5 +echo "configure:6740: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6674,7 +6776,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:6678: checking for a BSD compatible install" >&5 +echo "configure:6780: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6730,7 +6832,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6734: checking for $ac_word" >&5 +echo "configure:6836: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6758,8 +6860,8 @@ else fi -echo $ac_n "checking "make for VPATH support"""... $ac_c" 1>&6 -echo "configure:6763: checking "make for VPATH support"" >&5 +echo $ac_n "checking make for VPATH support""... $ac_c" 1>&6 +echo "configure:6865: checking make for VPATH support" >&5 cat - << EOF > confMake check : file cp \$? \$@ @@ -6770,7 +6872,7 @@ if test ! -d sub ; then mkdir sub fi echo dummy > sub/file -${MAKE-make} -f confMake VPATH=sub 2> config.log > /dev/null +${MAKE-make} -f confMake VPATH=sub 2>&5 > /dev/null RESULT=$? rm -f sub/file check final_file confMake rmdir sub @@ -6788,7 +6890,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6792: checking for $ac_word" >&5 +echo "configure:6894: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6822,7 +6924,7 @@ test -n "$YACC" || YACC="yacc" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6826: checking for $ac_word" >&5 +echo "configure:6928: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6856,7 +6958,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:6860: checking for yywrap in -l$ac_lib" >&5 +echo "configure:6962: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6864,7 +6966,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6899,7 +7001,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:6903: checking whether ln -s works" >&5 +echo "configure:7005: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7040,85 +7142,587 @@ rm -f confcache + +ZLIB_INCLUDE= +ZLIB_LINK= +if test "$wxUSE_ZLIB" != "no" ; then + cat >> confdefs.h <<\EOF +#define wxUSE_ZLIB 1 +EOF + + + if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then + ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for zlib.h""... $ac_c" 1>&6 +echo "configure:7158: checking for zlib.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 +echo "configure:7185: checking for deflate in -lz" >&5 +ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lz $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ZLIB_LINK="-lz" +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "x$ZLIB_LINK" = "x" ; then + if test "$wxUSE_ZLIB" = "sys" ; then + { echo "configure: error: system zlib compression library not found! Use --with-zlib=builtin to use built-in version" 1>&2; exit 1; } + else + echo "configure: warning: system zlib compression library not found, will use built-in instead" 1>&2 + wxUSE_ZLIB=builtin + fi + else + wxUSE_ZLIB=sys + fi + fi + + if test "$wxUSE_ZLIB" = "builtin" ; then + ZLIB_INCLUDE="-I\${top_srcdir}/src/zlib" + fi +fi + + +PNG_INCLUDE= +PNG_LINK= +if test "$wxUSE_LIBPNG" != "no" ; then + cat >> confdefs.h <<\EOF +#define wxUSE_LIBPNG 1 +EOF + + + if test "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then + echo "configure: warning: system png library doesn't work without system zlib, will use built-in instead" 1>&2 + wxUSE_LIBPNG=builtin + fi + + if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then + ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for png.h""... $ac_c" 1>&6 +echo "configure:7263: checking for png.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for png_check_sig in -lpng""... $ac_c" 1>&6 +echo "configure:7290: checking for png_check_sig in -lpng" >&5 +ac_lib_var=`echo png'_'png_check_sig | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpng -lz -lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + PNG_LINK="-lpng" +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "x$PNG_LINK" = "x" ; then + if test "$wxUSE_LIBPNG" = "sys" ; then + { echo "configure: error: system png library not found! Use --with-libpng=builtin to use built-in version" 1>&2; exit 1; } + else + echo "configure: warning: system png library not found, will use built-in instead" 1>&2 + wxUSE_LIBPNG=builtin + fi + else + wxUSE_LIBPNG=yes + fi + fi + + if test "$wxUSE_LIBPNG" = "builtin" ; then + PNG_INCLUDE="-I\${top_srcdir}/src/png" + fi + + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png" +fi + + +JPEG_INCLUDE= +JPEG_LINK= +if test "$wxUSE_LIBJPEG" != "no" ; then + cat >> confdefs.h <<\EOF +#define wxUSE_LIBJPEG 1 +EOF + + + if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then + echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 +echo "configure:7365: checking for jpeglib.h" >&5 + if eval "test \"`echo '$''{'ac_cv_header_jpeglib_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + #include + +int main() { + + +; return 0; } +EOF +if { (eval echo configure:7382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_jpeglib_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_jpeglib_h=no + +fi +rm -f conftest* + +fi + + echo "$ac_t""$ac_cv_header_jpeglib_h" 1>&6 + + if test "$ac_cv_header_jpeglib_h" = "yes"; then + echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 +echo "configure:7400: checking for jpeg_read_header in -ljpeg" >&5 +ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ljpeg $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + JPEG_LINK="-ljpeg" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "x$JPEG_LINK" = "x" ; then + if test "$wxUSE_LIBJPEG" = "sys" ; then + { echo "configure: error: system jpeg library not found! Use --with-libjpeg=builtin to use built-in version" 1>&2; exit 1; } + else + echo "configure: warning: system jpeg library not found, will use built-in instead" 1>&2 + wxUSE_LIBJPEG=builtin + fi + else + wxUSE_LIBJPEG=sys + fi + fi + + if test "$wxUSE_LIBJPEG" = "builtin" ; then + JPEG_INCLUDE="-I\${top_srcdir}/src/jpeg" + fi +fi + + +TIFF_INCLUDE= +TIFF_LINK= +if test "$wxUSE_LIBTIFF" != "no" ; then + cat >> confdefs.h <<\EOF +#define wxUSE_LIBTIFF 1 +EOF + + + if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then + ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 +echo "configure:7470: checking for tiffio.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for TIFFError in -ltiff""... $ac_c" 1>&6 +echo "configure:7497: checking for TIFFError in -ltiff" >&5 +ac_lib_var=`echo tiff'_'TIFFError | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltiff -lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TIFF_LINK="-ltiff" +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "x$TIFF_LINK" = "x" ; then + if test "$wxUSE_LIBTIFF" = "sys" ; then + { echo "configure: error: system tiff library not found! Use --with-libtiff=builtin to use built-in version" 1>&2; exit 1; } + else + echo "configure: warning: system tiff library not found, will use built-in instead" 1>&2 + wxUSE_LIBTIFF=builtin + fi + else + wxUSE_LIBTIFF=sys + fi + fi + + if test "$wxUSE_LIBTIFF" = "builtin" ; then + TIFF_INCLUDE="-I\${top_srcdir}/src/tiff" + fi +fi + + AFMINSTALL= -if test "$wxUSE_GUI" = "yes"; then - -USE_GUI=1 - TOOLKIT= TOOLKIT_INCLUDE= -GUIOBJS= -COMMONOBJS= -GENERICOBJS= -GUI_TK_LIBRARY= -GUI_TK_LINK= +if test "$USE_WIN32" = 1 ; then + for ac_hdr in w32api.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:7571: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done -WXGTK12= -WXGTK13= - -WXWINE= - -if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then - if test "$cross_compiling" = "yes" ; then - echo "configure: warning: skipping windows.h check for cross-compilation" 1>&2 - else - echo $ac_n "checking for Windows headers""... $ac_c" 1>&6 -echo "configure:7070: checking for Windows headers" >&5 - -ac_find_includes= -for ac_dir in $SEARCH_INCLUDE; - do - if test -f "$ac_dir/windows.h"; then - ac_find_includes=$ac_dir - break - fi - done - - if test "$ac_find_includes" != "" ; then - echo "$ac_t""found $ac_find_includes" 1>&6 - TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes" - else - echo "$ac_t""no" 1>&6 - { echo "configure: error: please set CFLAGS to contain the location of windows.h" 1>&2; exit 1; } - fi - fi - - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS msw" - LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32" - - if test "$wxUSE_ODBC" = "yes" ; then - LIBS="$LIBS -lodbc32 -lole32 -loleaut32" - fi - - if test "$wxUSE_MINGW" = 1; then - LDFLAGS="$LDFLAGS -mwindows" - fi - - TOOLKIT=MSW - - GUIOBJS="\$(MSW_GUIOBJS)" - GUIHEADERS="\$(MSW_HEADERS)" - COMMONOBJS="\$(MSW_COMMONOBJS)" - GENERICOBJS="\$(MSW_GENERICOBJS)" - UNIXOBJS= - GUIDIST=MSW_DIST - - RCINCSWITCH="--include-dir" - RCDEFSWITCH="--define" - RCPREPROCESSOR="--preprocessor \"\$(CC) -c -E -xc-header -DRC_INVOKED\"" - RCINPUTSWITCH="-i" - RCOUTPUTSWITCH="-o" - RESFLAGS="$RCPREPROCESSOR $RCINCSWITCH \$(top_srcdir)/include $RCINCSWITCH \$(top_srcdir)/\$(program_dir) $RCDEFSWITCH __WIN32__ $RCDEFSWITCH __WIN95__ $RCDEFSWITCH __GNUWIN32__" - - RESPROGRAM="\$(RES_PROGRAM)" + ac_safe=`echo "windows.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for windows.h""... $ac_c" 1>&6 +echo "configure:7609: checking for windows.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 + { echo "configure: error: please set CFLAGS to contain the location of windows.h" 1>&2; exit 1; } + fi -if test "$wxUSE_GTK" = 1; then - + + echo $ac_n "checking if w32api has good enough MSIE support""... $ac_c" 1>&6 +echo "configure:7645: checking if w32api has good enough MSIE support" >&5 +if eval "test \"`echo '$''{'wx_cv_w32api_win_ie'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { + + #define wxCHECK_W32API_VERSION( major, minor ) \ + ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \ + && ( ( __W32API_MAJOR_VERSION > (major) ) \ + || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor)))) + + #if !wxCHECK_W32API_VERSION(1,1) + #error You need w32api 1.1 or newer + #endif + +; return 0; } +EOF +if { (eval echo configure:7667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + wx_cv_w32api_win_ie=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + wx_cv_w32api_win_ie=no + +fi +rm -f conftest* + +fi + +echo "$ac_t""$wx_cv_w32api_win_ie" 1>&6 + if test "$wx_cv_w32api_win_ie" = "yes" ; then + CPPFLAGS="$CPPFLAGS -D_WIN32_IE=0x400" + fi + + LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32" + + if test "$wxUSE_CYGWIN" = 1; then + LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32" + fi + + + if test "$wxUSE_ODBC" = "yes" ; then + LIBS="$LIBS -lodbc32 -lole32 -loleaut32" + fi + + RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__" + RESPROGRAMOBJ="\$(PROGRAM)_resources.o" +fi + +if test "$wxUSE_GUI" = "yes"; then + USE_GUI=1 + + GUI_TK_LIBRARY= + + WXGTK12= + WXGTK127= + WXGTK13= + + WXWINE= + + if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then + TOOLKIT=MSW + GUIDIST=MSW_DIST + fi + + case "${host}" in + *-*-mingw32* ) + LDFLAGS="$LDFLAGS -Wl,--subsystem,windows -mwindows" + esac + + if test "$wxUSE_GTK" = 1; then + if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then @@ -7135,7 +7739,134 @@ if test "$wxUSE_GTK" = 1; then # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7139: checking for $ac_word" >&5 +echo "configure:7743: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GTK_CONFIG" in + /*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac +fi +GTK_CONFIG="$ac_cv_path_GTK_CONFIG" +if test -n "$GTK_CONFIG"; then + echo "$ac_t""$GTK_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + min_gtk_version=1.2.7 + echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 +echo "configure:7778: checking for GTK - version >= $min_gtk_version" >&5 + no_gtk="" + if test "$GTK_CONFIG" != "no" ; then + GTK_CFLAGS=`$GTK_CONFIG --cflags` + GTK_LIBS=`$GTK_CONFIG --libs gthread` + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat > conftest.$ac_ext < +#include +#include +#include + +int +main () +{ + int major, minor, micro; + + if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((GTK_MAJOR_VERSION != gtk_major_version) || + (GTK_MINOR_VERSION != gtk_minor_version) || + (GTK_MICRO_VERSION != gtk_micro_version)) { + printf("Headers vs. library version mismatch!\n"); + exit(1); + } + + if (gtk_minor_version == 1) return FALSE; + + return !((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); +} + +EOF +if { (eval echo configure:7824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + no_gtk=yes +fi +rm -fr conftest* +fi + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + else + no_gtk=yes + fi + if test "x$no_gtk" = x ; then + echo "$ac_t""yes" 1>&6 + WXGTK127=1 + else + echo "$ac_t""no" 1>&6 + GTK_CFLAGS="" + GTK_LIBS="" + : + fi + + + + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + # Extract the first word of "gtk-config", so it can be a program name with args. +set dummy gtk-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:7870: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7170,7 +7901,7 @@ fi min_gtk_version=1.2.3 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:7174: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:7905: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" != "no" ; then GTK_CFLAGS=`$GTK_CONFIG --cflags` @@ -7183,7 +7914,7 @@ echo "configure:7174: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -7216,7 +7947,7 @@ main () } EOF -if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7246,38 +7977,24 @@ fi - if test "$WXGTK12" != 1; then - { echo "configure: error: - Please check that gtk-config is in path, the directory - where GTK+ libraries are installed (returned by - 'gtk-config --libs' command) is in LD_LIBRARY_PATH or - equivalent variable and GTK+ is version 1.2.3 or above. - " 1>&2; exit 1; } - fi + if test "$WXGTK12" != 1; then + { echo "configure: error: + Please check that gtk-config is in path, the directory + where GTK+ libraries are installed (returned by + 'gtk-config --libs' command) is in LD_LIBRARY_PATH or + equivalent variable and GTK+ is version 1.2.3 or above. + " 1>&2; exit 1; } + fi + + TOOLKIT_INCLUDE="$GTK_CFLAGS" + GUI_TK_LIBRARY="$GTK_LIBS" + AFMINSTALL=afminstall + TOOLKIT=GTK + GUIDIST=GTK_DIST - TOOLKIT_INCLUDE="$GTK_CFLAGS" - - - GUI_TK_LIBRARY="$GTK_LIBS" - - TOOLKIT=GTK - - AFMINSTALL=afminstall - - GUIOBJS="\$(GTK_GUIOBJS)" - GUIHEADERS="\$(GTK_HEADERS)" - COMMONOBJS="\$(GTK_COMMONOBJS)" - GENERICOBJS="\$(GTK_GENERICOBJS)" - GUIDEPS="\$(GTK_GUIDEPS)" - COMMONDEPS="\$(GTK_COMMONDEPS)" - GENERICDEPS="\$(GTK_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" - GUIDIST=GTK_DIST - - echo $ac_n "checking for gdk_im_open in -lgdk""... $ac_c" 1>&6 -echo "configure:7281: checking for gdk_im_open in -lgdk" >&5 + echo $ac_n "checking for gdk_im_open in -lgdk""... $ac_c" 1>&6 +echo "configure:7998: checking for gdk_im_open in -lgdk" >&5 ac_lib_var=`echo gdk'_'gdk_im_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7285,7 +8002,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdk $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7319,12 +8036,12 @@ else echo "$ac_t""no" 1>&6 fi -fi + fi -if test "$wxUSE_WINE" = 1; then - echo $ac_n "checking for WINE includes""... $ac_c" 1>&6 -echo "configure:7327: checking for WINE includes" >&5 - + if test "$wxUSE_WINE" = 1; then + echo $ac_n "checking for WINE includes""... $ac_c" 1>&6 +echo "configure:8044: checking for WINE includes" >&5 + ac_find_includes= for ac_dir in $SEARCH_INCLUDE; do @@ -7334,18 +8051,18 @@ for ac_dir in $SEARCH_INCLUDE; fi done - if test "$ac_find_includes" != "" ; then - echo "$ac_t""found $ac_find_includes" 1>&6 - TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes" - else - echo "$ac_t""no" 1>&6 - { echo "configure: error: please set CFLAGS to contain the location of windows.h" 1>&2; exit 1; } - fi + if test "$ac_find_includes" != "" ; then + echo "$ac_t""found $ac_find_includes" 1>&6 + TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes" + else + echo "$ac_t""no" 1>&6 + { echo "configure: error: please set CFLAGS to contain the location of windows.h" 1>&2; exit 1; } + fi - XPM_LINK="" - echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 -echo "configure:7348: checking for Xpm library" >&5 - + XPM_LINK="" + echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 +echo "configure:8065: checking for Xpm library" >&5 + ac_find_libraries= for ac_dir in $SEARCH_LIB; do @@ -7357,23 +8074,23 @@ for ac_dir in $SEARCH_LIB; done done - if test "$ac_find_libraries" != "" ; then - GUI_TK_LIBRARY="-L$ac_find_libraries" - XPM_LINK="-lXpm" - cat >> confdefs.h <<\EOF + if test "$ac_find_libraries" != "" ; then + GUI_TK_LIBRARY="-L$ac_find_libraries" + XPM_LINK="-lXpm" + cat >> confdefs.h <<\EOF #define wxHAVE_LIB_XPM 1 EOF - echo "$ac_t""found at $ac_find_libraries" 1>&6 - else - echo "$ac_t""no" 1>&6 - echo "configure: warning: library will be compiled without support for images in XPM format" 1>&2 - fi + echo "$ac_t""found at $ac_find_libraries" 1>&6 + else + echo "$ac_t""no" 1>&6 + echo "configure: warning: library will be compiled without support for images in XPM format" 1>&2 + fi - MESA_LINK="" - echo $ac_n "checking for Mesa library""... $ac_c" 1>&6 -echo "configure:7376: checking for Mesa library" >&5 - + MESA_LINK="" + echo $ac_n "checking for Mesa library""... $ac_c" 1>&6 +echo "configure:8093: checking for Mesa library" >&5 + ac_find_libraries= for ac_dir in $SEARCH_LIB; do @@ -7385,38 +8102,27 @@ for ac_dir in $SEARCH_LIB; done done - if test "$ac_find_libraries" != "" ; then - GUI_TK_LIBRARY="$GUI_TK_LIBRARY -L$ac_find_libraries" - MESA_LINK="-lMesaGL" - echo "$ac_t""found at $ac_find_libraries" 1>&6 - else - { echo "configure: error: no" 1>&2; exit 1; } + if test "$ac_find_libraries" != "" ; then + GUI_TK_LIBRARY="$GUI_TK_LIBRARY -L$ac_find_libraries" + MESA_LINK="-lMesaGL" + echo "$ac_t""found at $ac_find_libraries" 1>&6 + else + { echo "configure: error: no" 1>&2; exit 1; } + fi + + GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwine $MESA_LINK $XPM_LINK -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses" + WXWINE=1 + TOOLKIT=MSW + GUIDIST=MSW_DIST fi - GUI_TK_LINK="-lwine $MESA_LINK $XPM_LINK -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses" - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK" - WXWINE=1 - TOOLKIT=MSW - - GUIHEADERS="\$(MSW_HEADERS)" - GUIOBJS="\$(MSW_GUIOBJS)" - COMMONOBJS="\$(MSW_COMMONOBJS)" - GENERICOBJS="\$(MSW_GENERICOBJS)" - GUIDEPS="\$(MSW_GUIDEPS)" - COMMONDEPS="\$(MSW_COMMONDEPS)" - GENERICDEPS="\$(MSW_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" - GUIDIST=MSW_DIST -fi - -if test "$wxUSE_MOTIF" = 1; then - # If we find X, set shell vars x_includes and x_libraries to the + if test "$wxUSE_MOTIF" = 1; then + # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:7420: checking for X" >&5 +echo "configure:8126: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -7478,12 +8184,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7552,14 +8258,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -7665,17 +8371,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:7669: checking whether -R must be followed by a space" >&5 +echo "configure:8375: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -7691,14 +8397,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -7730,7 +8436,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:7734: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:8440: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7738,7 +8444,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7771,7 +8477,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:7775: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:8481: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7779,7 +8485,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7819,12 +8525,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:7823: checking for gethostbyname" >&5 +echo "configure:8529: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -7868,7 +8574,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:7872: checking for gethostbyname in -lnsl" >&5 +echo "configure:8578: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7876,7 +8582,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7917,12 +8623,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:7921: checking for connect" >&5 +echo "configure:8627: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -7966,7 +8672,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:7970: checking for connect in -lsocket" >&5 +echo "configure:8676: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7974,7 +8680,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8009,12 +8715,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:8013: checking for remove" >&5 +echo "configure:8719: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -8058,7 +8764,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:8062: checking for remove in -lposix" >&5 +echo "configure:8768: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8066,7 +8772,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8101,12 +8807,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:8105: checking for shmat" >&5 +echo "configure:8811: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -8150,7 +8856,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:8154: checking for shmat in -lipc" >&5 +echo "configure:8860: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8158,7 +8864,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8202,7 +8908,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:8206: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:8912: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8210,7 +8916,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8246,21 +8952,21 @@ fi fi - if test "$no_x" = "yes"; then - { echo "configure: error: X11 not found" 1>&2; exit 1; } - fi + if test "$no_x" = "yes"; then + { echo "configure: error: X11 not found" 1>&2; exit 1; } + fi - GUI_TK_LIBRARY="$X_LIBS" - TOOLKIT_INCLUDE="$X_CFLAGS" + GUI_TK_LIBRARY="$X_LIBS" + TOOLKIT_INCLUDE="$X_CFLAGS" - AFMINSTALL=afminstall + AFMINSTALL=afminstall - - COMPILED_X_PROGRAM=0 + + COMPILED_X_PROGRAM=0 - echo $ac_n "checking for Motif/Lesstif headers""... $ac_c" 1>&6 -echo "configure:8263: checking for Motif/Lesstif headers" >&5 - + echo $ac_n "checking for Motif/Lesstif headers""... $ac_c" 1>&6 +echo "configure:8969: checking for Motif/Lesstif headers" >&5 + ac_find_includes= for ac_dir in $SEARCH_INCLUDE; do @@ -8270,84 +8976,11 @@ for ac_dir in $SEARCH_INCLUDE; fi done - if test "$ac_find_includes" != "" ; then - echo "$ac_t""found $ac_find_includes" 1>&6 - else - cat > conftest.$ac_ext < - -int main() { - - int version; - - version = xmUseVersion; - -; return 0; } -EOF -if { (eval echo configure:8291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - echo "$ac_t""found in default search path" 1>&6 - COMPILED_X_PROGRAM=1 - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 - { echo "configure: error: please set CFLAGS to contain the location of Xm/Xm.h" 1>&2; exit 1; } - - -fi -rm -f conftest* - fi - - if test "$COMPILED_X_PROGRAM" = 0; then - echo $ac_n "checking for Motif/Lesstif library""... $ac_c" 1>&6 -echo "configure:8312: checking for Motif/Lesstif library" >&5 - -ac_find_libraries= -for ac_dir in $SEARCH_LIB; - do - for ac_extension in a so sl; do - if test -f "$ac_dir/libXm.$ac_extension"; then - ac_find_libraries=$ac_dir - break 2 - fi - done - done - - if test "$ac_find_libraries" != "" ; then - - ac_path_to_include=$ac_find_includes - echo "$TOOLKIT_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_include="" - else - ac_path_to_include="-I$ac_find_includes" - fi - - - echo "$GUI_TK_LIBRARY" | grep "\-L$ac_find_libraries" > /dev/null - result=$? - if test $result = 0; then - ac_path_to_link="" - else - ac_path_to_link="-L$ac_find_libraries" - fi - - - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" - TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include" - echo "$ac_t""found at $ac_find_libraries" 1>&6 + if test "$ac_find_includes" != "" ; then + echo "$ac_t""found $ac_find_includes" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < @@ -8360,7 +8993,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""found in default search path" 1>&6 @@ -8372,19 +9005,91 @@ else rm -rf conftest* echo "$ac_t""no" 1>&6 - { echo "configure: error: please set LDFLAGS to contain the location of libXm" 1>&2; exit 1; } + { echo "configure: error: please set CFLAGS to contain the location of Xm/Xm.h" 1>&2; exit 1; } fi rm -f conftest* fi - fi - - XPM_LINK="" - echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 -echo "configure:8387: checking for Xpm library" >&5 - + if test "$COMPILED_X_PROGRAM" = 0; then + echo $ac_n "checking for Motif/Lesstif library""... $ac_c" 1>&6 +echo "configure:9018: checking for Motif/Lesstif library" >&5 + +ac_find_libraries= +for ac_dir in $SEARCH_LIB; + do + for ac_extension in a so sl; do + if test -f "$ac_dir/libXm.$ac_extension"; then + ac_find_libraries=$ac_dir + break 2 + fi + done + done + + if test "$ac_find_libraries" != "" ; then + + ac_path_to_include=$ac_find_includes + echo "$TOOLKIT_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null + result=$? + if test $result = 0; then + ac_path_to_include="" + else + ac_path_to_include="-I$ac_find_includes" + fi + + + echo "$GUI_TK_LIBRARY" | grep "\-L$ac_find_libraries" > /dev/null + result=$? + if test $result = 0; then + ac_path_to_link="" + else + ac_path_to_link="-L$ac_find_libraries" + fi + + + GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" + TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include" + echo "$ac_t""found at $ac_find_libraries" 1>&6 + else + cat > conftest.$ac_ext < + +int main() { + + int version; + version = xmUseVersion; + +; return 0; } +EOF +if { (eval echo configure:9069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + echo "$ac_t""found in default search path" 1>&6 + COMPILED_X_PROGRAM=1 + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + echo "$ac_t""no" 1>&6 + { echo "configure: error: please set CFLAGS to contain the location of Xm/Xm.h" 1>&2; exit 1; } + + +fi +rm -f conftest* + fi + fi + + + XPM_LINK="" + echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 +echo "configure:9092: checking for Xpm library" >&5 + ac_find_libraries= for ac_dir in $SEARCH_LIB; do @@ -8396,8 +9101,8 @@ for ac_dir in $SEARCH_LIB; done done - if test "$ac_find_libraries" != "" ; then - + if test "$ac_find_libraries" != "" ; then + echo "$GUI_TK_LIBRARY" | grep "\-L$ac_find_libraries" > /dev/null result=$? if test $result = 0; then @@ -8406,113 +9111,83 @@ for ac_dir in $SEARCH_LIB; ac_path_to_link="-L$ac_find_libraries" fi - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" - XPM_LINK="-lXpm " - cat >> confdefs.h <<\EOF + GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" + XPM_LINK="-lXpm " + cat >> confdefs.h <<\EOF #define wxHAVE_LIB_XPM 1 EOF - echo "$ac_t""found at $ac_find_libraries" 1>&6 - else - cat > conftest.$ac_ext <&6 + else + cat > conftest.$ac_ext < - + #include + int main() { - int version; + int version; - version = XpmLibraryVersion(); - + version = XpmLibraryVersion(); + ; return 0; } EOF -if { (eval echo configure:8432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - XPM_LINK="-lXpm " - cat >> confdefs.h <<\EOF + XPM_LINK="-lXpm " + cat >> confdefs.h <<\EOF #define wxHAVE_LIB_XPM 1 EOF - echo "$ac_t""found in default search path" 1>&6 - COMPILED_X_PROGRAM=0 - + echo "$ac_t""found in default search path" 1>&6 + COMPILED_X_PROGRAM=0 + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - echo "$ac_t""no" 1>&6 - echo "configure: warning: library will be compiled without support for images in XPM format" 1>&2 + echo "$ac_t""no" 1>&6 + echo "configure: warning: library will be compiled without support for images in XPM format" 1>&2 + - fi rm -f conftest* + fi + + GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXm $XPM_LINK -lXmu -lXext -lXt -lX11" + TOOLKIT=MOTIF + GUIDIST=MOTIF_DIST fi - GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXext -lXt -lX11" - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK" - TOOLKIT=MOTIF + if test "$wxUSE_PM" = 1; then + TOOLKIT=PM + GUIDIST=GTK_DIST + fi - GUIHEADERS="\$(MOTIF_HEADERS)" - GUIOBJS="\$(MOTIF_GUIOBJS)" - COMMONOBJS="\$(MOTIF_COMMONOBJS)" - GENERICOBJS="\$(MOTIF_GENERICOBJS)" - GUIDEPS="\$(MOTIF_GUIDEPS)" - COMMONDEPS="\$(MOTIF_COMMONDEPS)" - GENERICDEPS="\$(MOTIF_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" - GUIDIST=MOTIF_DIST -fi - -if test "$wxUSE_PM" = 1; then - TOOLKIT=PM - - GUIOBJS="\$(PM_GUIOBJS)" - GUIHEADERS="\$(PM_HEADERS)" - COMMONOBJS="\$(PM_COMMONOBJS)" - GENERICOBJS="\$(PM_GENERICOBJS)" - GUIDEPS="\$(PM_GUIDEPS)" - COMMONDEPS="\$(PM_COMMONDEPS)" - GENERICDEPS="\$(PM_GENERICDEPS)" - UNIXOBJS= - UNIXDEPS= - GUIDIST=GTK_DIST -fi - -if test "$TOOLKIT" != "PM" ; then - TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[A-Z]" "[a-z]"` -else - TOOLKIT_DIR="os2" -fi - - TOOLKIT_DEF="-D__WX${TOOLKIT}__" - - WX_LIBRARY="wx_${TOOLKIT_DIR}" + if test "$TOOLKIT" = "PM" ; then + TOOLKIT_DIR="os2" + else + TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[A-Z]" "[a-z]"` + fi ALL_OBJECTS="\$(GUIOBJS) \$(COMMONOBJS) \$(GENERICOBJS) \$(UNIXOBJS) \$(HTMLOBJS) \$(OGLOBJS)" - if test "$TOOLKIT" != "MSW"; then - if test "$wxUSE_ODBC" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" - fi + if test "$TOOLKIT" != "MSW" -a "$wxUSE_ODBC" = "yes" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" fi - if test "$wxUSE_LIBJPEG" = "yes" ; then + if test "$wxUSE_LIBJPEG" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(JPEGOBJS)" fi - if test "$wxUSE_LIBTIFF" = "yes" ; then + if test "$wxUSE_LIBTIFF" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(TIFFOBJS)" fi - if test "$wxUSE_LIBPNG" = "yes" ; then + if test "$wxUSE_LIBPNG" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(PNGOBJS)" fi - if test "$wxUSE_ZLIB" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" - fi ALL_DEPFILES="\$(GUIDEPS) \$(COMMONDEPS) \$(GENERICDEPS) \$(UNIXDEPS) \$(HTMLDEPS) \$(OGLDEPS)" PORT_FILES="src/\$(TOOLKITDIR)/files.lst" @@ -8524,18 +9199,20 @@ fi else USE_GUI=0 - TOOLKIT_DIR="base" - TOOLKIT_DEF="-D__WXBASE__" + TOOLKIT_DIR="base" - ALL_OBJECTS="\$(BASE_OBJS) \${BASE_UNIX_OBJS}" - ALL_DEPFILES="\${BASE_DEPS} \${BASE_UNIX_DEPS}" + if test "$USE_WIN32" = 1 ; then + ALL_OBJECTS="\${BASE_OBJS} \${BASE_MSW_OBJS}" + ALL_DEPFILES="\${BASE_DEPS} \${BASE_MSW_DEPS}" + TOOLKIT_VPATH="\${top_srcdir}/src/msw" - if test "$wxUSE_ZLIB" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" + TOOLKIT="MSW" + else + ALL_OBJECTS="\${BASE_OBJS} \${BASE_UNIX_OBJS}" + ALL_DEPFILES="\${BASE_DEPS} \${BASE_UNIX_DEPS}" + TOOLKIT_VPATH="\${top_srcdir}/src/unix" fi - WX_LIBRARY="wxbase" - PORT_FILES="src/files.lst" RPM_FILES="src/rpmfiles.lst" RPM_SPEC="wxBase.spec" @@ -8544,161 +9221,302 @@ else DISTDIR="wxBase" fi -WX_LIBRARY_NAME="lib${WX_LIBRARY}.la" -WX_LIBRARY_NAME_GL="lib${WX_LIBRARY}_gl.la" +if test "$wxUSE_ZLIB" = "builtin" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" +fi + +if test "$wxUSE_OPENGL" = "yes"; then + ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 +echo "configure:9232: checking for GL/gl.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:9242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + cat >> confdefs.h <<\EOF +#define wxUSE_OPENGL 1 +EOF + + cat >> confdefs.h <<\EOF +#define wxUSE_GLCANVAS 1 +EOF + + echo $ac_n "checking for glFlush in -lGL""... $ac_c" 1>&6 +echo "configure:9268: checking for glFlush in -lGL" >&5 +ac_lib_var=`echo GL'_'glFlush | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lGL $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + OPENGL_LIBS="-lGL -lGLU" + +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for glFlush in -lMesaGL""... $ac_c" 1>&6 +echo "configure:9309: checking for glFlush in -lMesaGL" >&5 +ac_lib_var=`echo MesaGL'_'glFlush | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lMesaGL $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + OPENGL_LIBS="-lMesaGL -lMesaGLU" + +else + echo "$ac_t""no" 1>&6 +fi + + +fi + + +else + echo "$ac_t""no" 1>&6 +wxUSE_OPENGL=0 +fi + +fi + +if test -z "$TOOLKIT_VPATH" ; then + TOOLKIT_VPATH="\${top_srcdir}/src/${TOOLKIT_DIR}" +fi + +if test -n "$TOOLKIT" ; then + TOOLCHAIN_DEFS="-D__WX${TOOLKIT}__" +fi + +TOOLCHAIN_NAME="${TOOLKIT_DIR}" + +if test "$wxUSE_DEBUG_FLAG" = "yes"; then + TOOLCHAIN_NAME="${TOOLCHAIN_NAME}d" +fi + +TOOLCHAIN_NAME="${TOOLCHAIN_NAME}-${WX_RELEASE}" + +if test "$cross_compiling" = "yes"; then + TOOLCHAIN_NAME="${TOOLCHAIN_NAME}-${host_alias}" +fi + + +WX_LIBRARY="wx_${TOOLCHAIN_NAME}" + +if test "$wxUSE_DEBUG_FLAG" = "yes"; then + WX_LIBRARY_GL="wx_${TOOLKIT_DIR}d_gl-${WX_RELEASE}" +else + WX_LIBRARY_GL="wx_${TOOLKIT_DIR}_gl-${WX_RELEASE}" +fi + +WXCONFIG_LIBS="-l${WX_LIBRARY}" + +if test "$wxUSE_OPENGL" = "yes"; then + WXCONFIG_LIBS_GL="-l${WX_LIBRARY_GL} $OPENGL_LIBS" +fi WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a" -WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a" +WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY_GL}.a" -WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" -WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" +WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" +WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" -WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}" -WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.so" -WX_LIBRARY_LINK3="lib${WX_LIBRARY}.so" -WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}" -WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so" -WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.so" +WX_LIBRARY_LINK1="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}" +WX_LIBRARY_LINK2="lib${WX_LIBRARY}.${SO_SUFFIX}" +WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}" +WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}" -SHARED_LD= -PIC_FLAG= -WX_ALL= -WX_ALL_INSTALLED= -BURNT_LIBRARY_NAME= if test "$wxUSE_SHARED" = "yes"; then + + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1} \$(build_libdir)/${WX_LIBRARY_LINK1_GL}" + else + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1}" + fi + + if test "$GCC" = "yes"; then + PIC_FLAG="-fPIC" + fi + + SHARED_LD="${CXX} -shared -o" + case "${host}" in *-hp-hpux* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -fPIC -o" - PIC_FLAG="-fPIC" - else + if test "$GCC" != "yes" ; then + LDFLAGS="$LDFLAGS -L/usr/lib" + SHARED_LD="${CXX} -b -o" PIC_FLAG="+Z" fi - WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl" - WX_LIBRARY_NAME_SHARED_GL="libwx_${TOOLKIT_DIR}_gl.sl" if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}" + WX_ALL_INSTALLED="preinstall_gl" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" else - WX_ALL="${WX_LIBRARY_NAME_SHARED}" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" fi ;; *-*-linux* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - if test "$wxUSE_BURNT_NAME" = "yes" ; then - BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}" - BURNT_LIBRARY_NAME_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}" - fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - fi - ;; - *-*-irix5* | *-*-irix6* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - else - SHARED_LD="${CXX} -shared -o" - fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + if test "$wxUSE_SONAME" = "yes" ; then + SONAME_FLAGS="-Wl,-soname,${WX_LIBRARY_LINK1}" + SONAME_FLAGS_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}" + WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)" fi ;; *-*-solaris2* ) if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" + CPPFLAGS="$CPPFLAGS -isystem /usr/openwin/include" else SHARED_LD="${CXX} -G -o" PIC_FLAG="-KPIC" - fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + SONAME_FLAGS="-h ${WX_LIBRARY_NAME_SHARED}" + SONAME_FLAGS_GL="-h ${WX_LIBRARY_NAME_SHARED}" fi ;; - *-*-sunos4* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-freebsd* | *-*-netbsd*) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-osf* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-dgux5* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \ + *-*-sunos4* | \ + *-*-irix5* | *-*-irix6* | \ + *-*-osf* | \ + *-*-dgux5* | \ *-*-sysv5* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + ;; + *-*-darwin* ) + CFLAGS="$CFLAGS -fno-common" + CXXFLAGS="$CXXFLAGS -fno-common" + SHARED_LD="$CXX -dynamiclib -o" + PIC_FLAG="-dynamic -fPIC" ;; *-*-aix* ) SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o" - WX_ALL=${WX_LIBRARY_NAME_SHARED} ;; - *-*-cygwin32* ) - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" + *-*-cygwin* | *-*-mingw32* ) + SHARED_LD="${CC} -shared -Wl,--out-implib,lib/${WX_LIBRARY_NAME_STATIC} -o" + TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -DWXUSINGDLL=1" + WXMSW_DLL_DEFINES="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1" + + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="preinstall_gl" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" + else + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" + fi + PIC_FLAG= ;; - *-*-mingw32* ) - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" - ;; - *-pc-os2_emx ) - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" + *-pc-os2_emx | *-pc-os2-emx ) + wxUSE_SHARED=no ;; *-*-beos* ) SHARED_LD="${LD} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" ;; *) - { echo "configure: error: unknown system type ${host}." 1>&2; exit 1; } + { echo "configure: error: unknown system type $host." 1>&2; exit 1; } esac if test "x$WX_TARGET_LIBRARY" = "x"; then WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}" WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}" fi + WX_TARGET_LIBRARY_TYPE="so" -else - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" +fi + +if test "$wxUSE_SHARED" = "no"; then + + if test "$wxUSE_GUI" = "no" -o "$USE_WIN32" = 1 ; then + WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall" + fi + + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall_gl" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_STATIC} \$(build_libdir)/${WX_LIBRARY_NAME_STATIC_GL}" + else + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_STATIC}" + fi + + WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" + WX_TARGET_LIBRARY_TYPE="a" fi @@ -8707,17 +9525,17 @@ for ac_hdr in strings.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8711: checking for $ac_hdr" >&5 +echo "configure:9529: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8747,17 +9565,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8751: checking for $ac_hdr" >&5 +echo "configure:9569: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8787,17 +9605,17 @@ for ac_hdr in wchar.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8791: checking for $ac_hdr" >&5 +echo "configure:9609: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8827,17 +9645,17 @@ for ac_hdr in wcstr.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8831: checking for $ac_hdr" >&5 +echo "configure:9649: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8867,17 +9685,17 @@ for ac_hdr in fnmatch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8871: checking for $ac_hdr" >&5 +echo "configure:9689: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8910,17 +9728,17 @@ if test "$wxUSE_GUI" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8914: checking for $ac_hdr" >&5 +echo "configure:9732: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8951,12 +9769,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:8955: checking for ANSI C header files" >&5 +echo "configure:9773: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -8964,7 +9782,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8981,7 +9799,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -8999,7 +9817,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -9020,7 +9838,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -9031,7 +9849,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -9055,12 +9873,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:9059: checking for mode_t" >&5 +echo "configure:9877: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9088,12 +9906,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:9092: checking for off_t" >&5 +echo "configure:9910: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9121,12 +9939,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:9125: checking for pid_t" >&5 +echo "configure:9943: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9154,12 +9972,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:9158: checking for size_t" >&5 +echo "configure:9976: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9187,12 +10005,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:9191: checking for uid_t in sys/types.h" >&5 +echo "configure:10009: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -9222,14 +10040,114 @@ fi +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +echo $ac_n "checking if size_t is unsigned int""... $ac_c" 1>&6 +echo "configure:10052: checking if size_t is unsigned int" >&5 +if eval "test \"`echo '$''{'wx_cv_size_t_is_uint'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + + return 0; } + + struct Foo { void foo(size_t); void foo(unsigned int); }; + + int bar() { + +; return 0; } +EOF +if { (eval echo configure:10070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wx_cv_size_t_is_uint=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + wx_cv_size_t_is_uint=yes + +fi +rm -f conftest* + +fi + +echo "$ac_t""$wx_cv_size_t_is_uint" 1>&6 + +if test "$wx_cv_size_t_is_uint" = "yes"; then + cat >> confdefs.h <<\EOF +#define wxSIZE_T_IS_UINT 1 +EOF + +else + echo $ac_n "checking if size_t is unsigned long""... $ac_c" 1>&6 +echo "configure:10093: checking if size_t is unsigned long" >&5 +if eval "test \"`echo '$''{'wx_cv_size_t_is_ulong'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + + return 0; } + + struct Foo { void foo(size_t); void foo(unsigned long); }; + + int bar() { + +; return 0; } +EOF +if { (eval echo configure:10111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wx_cv_size_t_is_ulong=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + wx_cv_size_t_is_ulong=yes + +fi +rm -f conftest* + +fi + +echo "$ac_t""$wx_cv_size_t_is_ulong" 1>&6 + + if test "$wx_cv_size_t_is_ulong" = "yes"; then + cat >> confdefs.h <<\EOF +#define wxSIZE_T_IS_ULONG 1 +EOF + + fi +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + + echo $ac_n "checking for pw_gecos in struct passwd""... $ac_c" 1>&6 -echo "configure:9227: checking for pw_gecos in struct passwd" >&5 +echo "configure:10145: checking for pw_gecos in struct passwd" >&5 if eval "test \"`echo '$''{'wx_cv_struct_pw_gecos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -9240,7 +10158,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_pw_gecos=yes @@ -9270,12 +10188,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:9274: checking for working const" >&5 +echo "configure:10192: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -9345,21 +10263,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:9349: checking for inline" >&5 +echo "configure:10267: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -9386,7 +10304,7 @@ esac echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:9390: checking size of char" >&5 +echo "configure:10308: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9394,9 +10312,10 @@ else ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -9405,7 +10324,7 @@ main() exit(0); } EOF -if { (eval echo configure:9409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -9425,7 +10344,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:9429: checking size of short" >&5 +echo "configure:10348: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9433,9 +10352,10 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -9444,7 +10364,7 @@ main() exit(0); } EOF -if { (eval echo configure:9448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -9464,7 +10384,7 @@ EOF echo $ac_n "checking size of int *""... $ac_c" 1>&6 -echo "configure:9468: checking size of int *" >&5 +echo "configure:10388: checking size of int *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9472,9 +10392,10 @@ else ac_cv_sizeof_int_p=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -9483,7 +10404,7 @@ main() exit(0); } EOF -if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int_p=`cat conftestval` else @@ -9503,7 +10424,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:9507: checking size of int" >&5 +echo "configure:10428: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9511,9 +10432,10 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -9522,7 +10444,7 @@ main() exit(0); } EOF -if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -9542,7 +10464,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:9546: checking size of long" >&5 +echo "configure:10468: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9550,9 +10472,10 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -9561,7 +10484,7 @@ main() exit(0); } EOF -if { (eval echo configure:9565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -9581,7 +10504,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:9585: checking size of long long" >&5 +echo "configure:10508: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9589,9 +10512,10 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -9600,7 +10524,7 @@ main() exit(0); } EOF -if { (eval echo configure:9604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -9621,14 +10545,14 @@ EOF echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:9625: checking whether byte ordering is bigendian" >&5 +echo "configure:10549: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -9639,11 +10563,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:9643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -9654,7 +10578,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:9658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -9674,7 +10598,7 @@ if test "$cross_compiling" = yes; then ac_cv_c_bigendian=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -9734,17 +10658,17 @@ cross_compiling=$ac_cv_prog_cxx_cross do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9738: checking for $ac_hdr" >&5 +echo "configure:10662: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9771,13 +10695,13 @@ fi done - if test "x$HAVE_IOSTREAM" = x ; then + if test "$ac_cv_header_iostream" = "yes" ; then + : + else cat >> confdefs.h <<\EOF #define wxUSE_IOSTREAMH 1 EOF - else - : fi ac_ext=c @@ -9792,7 +10716,7 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking if C++ compiler supports bool""... $ac_c" 1>&6 -echo "configure:9796: checking if C++ compiler supports bool" >&5 +echo "configure:10720: checking if C++ compiler supports bool" >&5 if eval "test \"`echo '$''{'wx_cv_cpp_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9807,7 +10731,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_BOOL 1 -EOF - wx_cv_cpp_bool=yes else @@ -9861,13 +10781,13 @@ EOF echo $ac_n "checking if you need GNU extensions""... $ac_c" 1>&6 -echo "configure:9865: checking if you need GNU extensions" >&5 +echo "configure:10785: checking if you need GNU extensions" >&5 if eval "test \"`echo '$''{'wx_cv_gnu_extensions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -9880,7 +10800,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_gnu_extensions=yes else @@ -9905,7 +10825,7 @@ fi echo $ac_n "checking for wcslen in -lc""... $ac_c" 1>&6 -echo "configure:9909: checking for wcslen in -lc" >&5 +echo "configure:10829: checking for wcslen in -lc" >&5 ac_lib_var=`echo c'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9913,7 +10833,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9944,13 +10864,13 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then #define HAVE_WCSLEN 1 EOF - WCHAR_LINK="" + WCHAR_LINK= else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wcslen in -lw""... $ac_c" 1>&6 -echo "configure:9954: checking for wcslen in -lw" >&5 +echo "configure:10874: checking for wcslen in -lw" >&5 ac_lib_var=`echo w'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9958,7 +10878,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10000,12 +10920,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:10004: checking for vprintf" >&5 +echo "configure:10924: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -10052,12 +10972,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:10056: checking for _doprnt" >&5 +echo "configure:10976: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -10105,67 +11025,6 @@ fi fi -for ac_func in vsnprintf -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10112: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <> confdefs.h <<\EOF -#define HAVE_VSNPRINTF 1 -EOF - -else - echo "$ac_t""no" 1>&6 -echo "configure: warning: unsafe function sprintf will be used instead of snprintf" 1>&2 - -fi -done - - ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -10175,67 +11034,165 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross + + + + +echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 +echo "configure:11043: checking for vsnprintf" >&5 +if eval "test \"`echo '$''{'wx_cv_func_vsnprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < + #include + +int main() { + + int wx_test_vsnprintf(const char *, ...); + + wx_test_vsnprintf("%s"); + return 0; + } + + int wx_test_vsnprintf(const char *fmt, ...) + { + char *s; + + va_list argp; + va_start(argp, fmt); + vsnprintf(s, 42, fmt, argp); + va_end(argp); + +; return 0; } +EOF +if { (eval echo configure:11074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + wx_cv_func_vsnprintf=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat > conftest.$ac_ext < + #include + +int main() { + + int wx_test_vsnprintf(const char *, ...); + + wx_test_vsnprintf("%s"); + return 0; + } + + int wx_test_vsnprintf(const char *fmt, ...) + { + char *s; + + va_list argp; + va_start(argp, fmt); + _vsnprintf(s, 42, fmt, argp); + va_end(argp); + +; return 0; } +EOF +if { (eval echo configure:11110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + wx_cv_func_vsnprintf=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + wx_cv_func_vsnprintf=no + +fi +rm -f conftest* + +fi +rm -f conftest* + +fi + +echo "$ac_t""$wx_cv_func_vsnprintf" 1>&6 + +if test "$wx_cv_func_vsnprintf" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VSNPRINTF 1 +EOF + +else + echo "configure: warning: unsafe function sprintf will be used instead of snprintf" 1>&2 +fi + echo $ac_n "checking for vsscanf""... $ac_c" 1>&6 -echo "configure:10180: checking for vsscanf" >&5 +echo "configure:11142: checking for vsscanf" >&5 if eval "test \"`echo '$''{'wx_cv_func_vsscanf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - wx_cv_func_vsscanf=no - -else cat > conftest.$ac_ext < - #include + #include + #include + +int main() { - int try_vsscanf(const char *format, ...) - { - va_list ap; - va_start(ap, format); + int wx_test_vsscanf(const char *, ...); - vsscanf("17", format, ap); - - va_end(ap); + wx_test_vsscanf("%d"); + return 0; } - int main() + int wx_test_vsscanf(const char *fmt, ...) { - int i; - try_vsscanf("%d", &i); - return i == 17 ? 0 : 1; - } - + va_list argp; + va_start(argp, fmt); + vsscanf("42", fmt, argp); + va_end(argp); + +; return 0; } EOF -if { (eval echo configure:10217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +if { (eval echo configure:11171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_VSSCANF 1 -EOF - - wx_cv_func_vsscanf=yes - + wx_cv_func_vsscanf=yes + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - wx_cv_func_vsscanf=no + rm -rf conftest* + + wx_cv_func_vsscanf=no + fi -rm -fr conftest* -fi - +rm -f conftest* fi echo "$ac_t""$wx_cv_func_vsscanf" 1>&6 +if test "$wx_cv_func_vsscanf" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VSSCANF 1 +EOF + +fi + ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' @@ -10250,12 +11207,12 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then for ac_func in sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10254: checking for $ac_func" >&5 +echo "configure:11211: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10307,17 +11264,79 @@ done echo "configure: warning: No POSIX signal functions on this system, wxApp::OnFatalException will not be called" 1>&2 wxUSE_ON_FATAL_EXCEPTION=no fi + + if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then + + ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + + + echo $ac_n "checking for sa_handler type""... $ac_c" 1>&6 +echo "configure:11280: checking for sa_handler type" >&5 +if eval "test \"`echo '$''{'wx_cv_type_sa_handler'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { + + extern void testSigHandler(int); + + struct sigaction sa; + sa.sa_handler = testSigHandler; + +; return 0; } +EOF +if { (eval echo configure:11298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + wx_cv_type_sa_handler=int + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + wx_cv_type_sa_handler=void + +fi +rm -f conftest* + +fi + +echo "$ac_t""$wx_cv_type_sa_handler" 1>&6 + + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + + cat >> confdefs.h <&6 -echo "configure:10316: checking for $ac_func" >&5 +echo "configure:11335: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10368,12 +11387,12 @@ done for ac_func in timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10372: checking for $ac_func" >&5 +echo "configure:11391: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10435,12 +11454,12 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10439: checking for $ac_func" >&5 +echo "configure:11458: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10488,7 +11507,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6 -echo "configure:10492: checking for nanosleep in -lposix4" >&5 +echo "configure:11511: checking for nanosleep in -lposix4" >&5 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10496,7 +11515,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10535,12 +11554,12 @@ else for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10539: checking for $ac_func" >&5 +echo "configure:11558: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10602,12 +11621,12 @@ fi for ac_func in uname gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10606: checking for $ac_func" >&5 +echo "configure:11625: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10667,12 +11686,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in strtok_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10671: checking for $ac_func" >&5 +echo "configure:11690: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10735,12 +11754,12 @@ INET_LINK= for ac_func in inet_addr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10739: checking for $ac_func" >&5 +echo "configure:11758: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10788,7 +11807,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 -echo "configure:10792: checking for inet_addr in -lnsl" >&5 +echo "configure:11811: checking for inet_addr in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10796,7 +11815,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10826,7 +11845,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lresolv""... $ac_c" 1>&6 -echo "configure:10830: checking for inet_addr in -lresolv" >&5 +echo "configure:11849: checking for inet_addr in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10834,7 +11853,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10878,12 +11897,12 @@ done for ac_func in inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10882: checking for $ac_func" >&5 +echo "configure:11901: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10931,7 +11950,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_aton in -l$INET_LINK""... $ac_c" 1>&6 -echo "configure:10935: checking for inet_aton in -l$INET_LINK" >&5 +echo "configure:11954: checking for inet_aton in -l$INET_LINK" >&5 ac_lib_var=`echo $INET_LINK'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10939,7 +11958,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$INET_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11040,74 +12059,40 @@ rm -f confcache if test "$TOOLKIT" != "MSW"; then + + THREADS_LINK= + THREADS_OBJ= + CODE_GEN_FLAGS= + CODE_GEN_FLAGS_CXX= -THREADS_LINK="" -THREADS_OBJ="" - -if test "$wxUSE_THREADS" = "yes" ; then - if test "$wxUSE_WINE" = 1 ; then - echo "configure: warning: Threads are not supported under WINE" 1>&2 - wxUSE_THREADS="no" - elif test "$USE_BEOS" = 1; then - echo "configure: warning: BeOS threads are not yet supported" 1>&2 - wxUSE_THREADS="no" + if test "$wxUSE_THREADS" = "yes" ; then + if test "$wxUSE_WINE" = 1 ; then + echo "configure: warning: Threads are not supported under WINE" 1>&2 + wxUSE_THREADS="no" + elif test "$USE_BEOS" = 1; then + echo "configure: warning: BeOS threads are not yet supported" 1>&2 + wxUSE_THREADS="no" + fi fi -fi -if test "$wxUSE_THREADS" = "yes" ; then - - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:11061: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - THREADS_OBJ="threadpsx.lo" - THREADS_LINK="pthread" + if test "$wxUSE_THREADS" = "yes" ; then -else - echo "$ac_t""no" 1>&6 + if test "$USE_AIX" = 1; then + THREADS_LIB=pthreads + else + THREADS_LIB=pthread + fi - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:11103: checking for pthread_create in -lc_r" >&5 -ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` + echo $ac_n "checking for pthread_create in -l$THREADS_LIB""... $ac_c" 1>&6 +echo "configure:12088: checking for pthread_create in -l$THREADS_LIB" >&5 +ac_lib_var=`echo $THREADS_LIB'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lc_r $LIBS" +LIBS="-l$THREADS_LIB $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11135,24 +12120,66 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 THREADS_OBJ="threadpsx.lo" - THREADS_LINK="c_r" + THREADS_LINK=$THREADS_LIB else echo "$ac_t""no" 1>&6 - ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +echo "configure:12130: checking for pthread_create in -lc_r" >&5 +ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc_r $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + THREADS_OBJ="threadpsx.lo" + THREADS_LINK="c_r" + +else + echo "$ac_t""no" 1>&6 + + ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6 -echo "configure:11146: checking for sys/prctl.h" >&5 +echo "configure:12173: checking for sys/prctl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11169,35 +12196,35 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - THREADS_OBJ="threadsgi.lo" - + THREADS_OBJ="threadsgi.lo" + else echo "$ac_t""no" 1>&6 fi + +fi + fi - -fi - - if test -z "$THREADS_OBJ" ; then - wxUSE_THREADS=no - echo "configure: warning: No thread support on this system" 1>&2 + if test -z "$THREADS_OBJ" ; then + wxUSE_THREADS=no + echo "configure: warning: No thread support on this system" 1>&2 + fi fi -fi -if test "$wxUSE_THREADS" = "yes" ; then - for ac_func in thr_setconcurrency + if test "$wxUSE_THREADS" = "yes" ; then + for ac_func in thr_setconcurrency do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11196: checking for $ac_func" >&5 +echo "configure:12223: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11245,22 +12272,22 @@ fi done - - for ac_hdr in sched.h + + for ac_hdr in sched.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11254: checking for $ac_hdr" >&5 +echo "configure:12281: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11287,8 +12314,8 @@ fi done - echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:11292: checking for sched_yield in -l$THREADS_LINK" >&5 + echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6 +echo "configure:12319: checking for sched_yield in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11296,7 +12323,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11328,16 +12355,16 @@ EOF else echo "$ac_t""no" 1>&6 -echo $ac_n "checking for sched_yield in -l"posix4"""... $ac_c" 1>&6 -echo "configure:11333: checking for sched_yield in -l"posix4"" >&5 -ac_lib_var=`echo "posix4"'_'sched_yield | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 +echo "configure:12360: checking for sched_yield in -lposix4" >&5 +ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-l"posix4" $LIBS" +LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11370,15 +12397,16 @@ EOF else echo "$ac_t""no" 1>&6 echo "configure: warning: wxThread::Yield will not work properly" 1>&2 - + fi - + fi - echo $ac_n "checking for pthread_attr_getschedpolicy in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:11382: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 + HAVE_PRIOR_FUNCS=0 + echo $ac_n "checking for pthread_attr_getschedpolicy in -l$THREADS_LINK""... $ac_c" 1>&6 +echo "configure:12410: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_getschedpolicy | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11386,7 +12414,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11412,33 +12440,27 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_THREAD_PRIORITY_FUNCTIONS 1 -EOF - -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for pthread_attr_getschedpolicy in -l"posix4"""... $ac_c" 1>&6 -echo "configure:11423: checking for pthread_attr_getschedpolicy in -l"posix4"" >&5 -ac_lib_var=`echo "posix4"'_'pthread_attr_getschedpolicy | sed 'y%./+-%__p_%'` + echo $ac_n "checking for pthread_attr_setschedparam in -l$THREADS_LINK""... $ac_c" 1>&6 +echo "configure:12445: checking for pthread_attr_setschedparam in -l$THREADS_LINK" >&5 +ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_setschedparam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-l"posix4" $LIBS" +LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11453,22 +12475,112 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_THREAD_PRIORITY_FUNCTIONS 1 + echo $ac_n "checking for sched_get_priority_max in -l$THREADS_LINK""... $ac_c" 1>&6 +echo "configure:12480: checking for sched_get_priority_max in -l$THREADS_LINK" >&5 +ac_lib_var=`echo $THREADS_LINK'_'sched_get_priority_max | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$THREADS_LINK $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAVE_PRIOR_FUNCS=1 +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for sched_get_priority_max in -lposix4""... $ac_c" 1>&6 +echo "configure:12518: checking for sched_get_priority_max in -lposix4" >&5 +ac_lib_var=`echo posix4'_'sched_get_priority_max | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lposix4 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + HAVE_PRIOR_FUNCS=1 + POSIX4_LINK="-lposix4" + else echo "$ac_t""no" 1>&6 -echo "configure: warning: Setting thread priority will not work" 1>&2 - fi - + +fi + + +else + echo "$ac_t""no" 1>&6 +fi + + +else + echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:11472: checking for pthread_cancel in -l$THREADS_LINK" >&5 + if test "$HAVE_PRIOR_FUNCS" = 1; then + cat >> confdefs.h <<\EOF +#define HAVE_THREAD_PRIORITY_FUNCTIONS 1 +EOF + + else + echo "configure: warning: Setting thread priority will not work" 1>&2 + fi + + echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6 +echo "configure:12584: checking for pthread_cancel in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_cancel | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11476,7 +12588,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11512,48 +12624,51 @@ echo "configure: warning: wxThread::Kill() will not work properly" 1>&2 fi - echo $ac_n "checking for pthread_cleanup_push/pop""... $ac_c" 1>&6 -echo "configure:11517: checking for pthread_cleanup_push/pop" >&5 + echo $ac_n "checking for pthread_cleanup_push/pop""... $ac_c" 1>&6 +echo "configure:12629: checking for pthread_cleanup_push/pop" >&5 if eval "test \"`echo '$''{'wx_cv_func_pthread_cleanup_push'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < int main() { - pthread_cleanup_push(NULL, NULL); - pthread_cleanup_pop(0); - + pthread_cleanup_push(NULL, NULL); + pthread_cleanup_pop(0); + ; return 0; } EOF -if { (eval echo configure:11533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - wx_cv_func_pthread_cleanup_push=yes - cat >> confdefs.h <<\EOF -#define HAVE_THREAD_CLEANUP_FUNCTIONS 1 -EOF - - + wx_cv_func_pthread_cleanup_push=yes + else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - wx_cv_func_pthread_cleanup_push=no - + wx_cv_func_pthread_cleanup_push=no + fi rm -f conftest* - + fi echo "$ac_t""$wx_cv_func_pthread_cleanup_push" 1>&6 - THREADS_LINK="-l$THREADS_LINK" -fi + if test "$wx_cv_func_pthread_cleanup_push" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_THREAD_CLEANUP_FUNCTIONS 1 +EOF + + fi + + THREADS_LINK="-l$THREADS_LINK" + fi fi @@ -11563,17 +12678,15 @@ if test "$wxUSE_THREADS" = "yes"; then EOF - CFLAGS="${CFLAGS} -D_REENTRANT" - CXXFLAGS="${CXXFLAGS} -D_REENTRANT" + CODE_GEN_FLAGS="$CODE_GEN_FLAGS -D_REENTRANT" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread" else if test "$ac_cv_func_strtok_r" = "yes"; then echo $ac_n "checking if -D_REENTRANT is needed""... $ac_c" 1>&6 -echo "configure:11574: checking if -D_REENTRANT is needed" >&5 +echo "configure:12688: checking if -D_REENTRANT is needed" >&5 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then - CFLAGS="${CFLAGS} -D_REENTRANT" - CXXFLAGS="${CXXFLAGS} -D_REENTRANT" + CODE_GEN_FLAGS="${CODE_GEN_FLAGS} -D_REENTRANT" echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 @@ -11596,12 +12709,19 @@ EOF fi +if test "$WXGTK127" = 1 ; then + cat >> confdefs.h <> confdefs.h <<\EOF -#define wxUSE_ZLIB 1 -EOF - - if test "$wxUSE_ZLIB" = "yes" ; then - ZLIB_INCLUDE="-I\${top_srcdir}/src/zlib" - else - ZLIB_LINK= - ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for zlib.h""... $ac_c" 1>&6 -echo "configure:11705: checking for zlib.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:11732: checking for deflate in -lz" >&5 -ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lz $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ZLIB_LINK="-lz" -else - echo "$ac_t""no" 1>&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - - if test "x$ZLIB_LINK" = "x" ; then - { echo "configure: error: system zlib compression library not found! Use --with-zlib=yes to use built-in zlib" 1>&2; exit 1; } - fi - fi -fi - -PNG_INCLUDE= -if test "$wxUSE_LIBPNG" = "yes" -o "$wxUSE_LIBPNG" = "sys" ; then - cat >> confdefs.h <<\EOF -#define wxUSE_LIBPNG 1 -EOF - - if test "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then - echo "configure: warning: --with-libpng=sys doesn't work without --with-zlib=sys, will compile the built-in libpng instead" 1>&2 - wxUSE_LIBPNG=yes - fi - - if test "$wxUSE_LIBPNG" = "yes" ; then - PNG_INCLUDE="-I\${top_srcdir}/src/png" - else - PNG_LINK= - ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:11798: checking for png.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for png_check_sig in -lpng""... $ac_c" 1>&6 -echo "configure:11825: checking for png_check_sig in -lpng" >&5 -ac_lib_var=`echo png'_'png_check_sig | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpng -lz -lm $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - PNG_LINK="-lpng" -else - echo "$ac_t""no" 1>&6 -fi - - -else - echo "$ac_t""no" 1>&6 -fi - - if test "x$PNG_LINK" = "x" ; then - { echo "configure: error: system png library not found! Use --with-libpng=yes to use the built-in libpng" 1>&2; exit 1; } - fi - fi - - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png" -fi - -JPEG_INCLUDE= -if test "$wxUSE_LIBJPEG" = "yes" -o "$wxUSE_LIBJPEG" = "sys" ; then - cat >> confdefs.h <<\EOF -#define wxUSE_LIBJPEG 1 -EOF - - if test "$wxUSE_LIBJPEG" = "yes" ; then - JPEG_INCLUDE="-I\${top_srcdir}/src/jpeg" - else - JPEG_LINK= - ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:11889: checking for jpeglib.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 -echo "configure:11916: checking for jpeg_read_header in -ljpeg" >&5 -ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ljpeg $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - JPEG_LINK="-ljpeg" -else - echo "$ac_t""no" 1>&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - - if test "x$JPEG_LINK" = "x" ; then - { echo "configure: error: system jpeg library not found! Use --with-libjpeg=yes to use the built-in one" 1>&2; exit 1; } - fi - fi -fi - -TIFF_INCLUDE= -if test "$wxUSE_LIBTIFF" = "yes" -o "$wxUSE_LIBTIFF" = "sys" ; then - cat >> confdefs.h <<\EOF -#define wxUSE_LIBTIFF 1 -EOF - - if test "$wxUSE_LIBTIFF" = "yes" ; then - TIFF_INCLUDE="-I\${top_srcdir}/src/tiff" - else - TIFF_LINK= - ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:11977: checking for tiffio.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for TIFFError in -ltiff""... $ac_c" 1>&6 -echo "configure:12004: checking for TIFFError in -ltiff" >&5 -ac_lib_var=`echo tiff'_'TIFFError | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ltiff -lm $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - TIFF_LINK="-ltiff" -else - echo "$ac_t""no" 1>&6 -fi - -else - echo "$ac_t""no" 1>&6 -fi - - if test "x$TIFF_LINK" = "x" ; then - { echo "configure: error: system tiff library not found! Use --with-libtiff=yes to use the built-in one" 1>&2; exit 1; } - fi - fi -fi - -if test "$wxUSE_OPENGL" = "yes"; then - ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 -echo "configure:12056: checking for GL/gl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF -#define wxUSE_OPENGL 1 -EOF - - cat >> confdefs.h <<\EOF -#define wxUSE_GLCANVAS 1 -EOF - - echo $ac_n "checking for glFlush in -lGL""... $ac_c" 1>&6 -echo "configure:12092: checking for glFlush in -lGL" >&5 -ac_lib_var=`echo GL'_'glFlush | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lGL $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - OPENGL_LINK="-lGL" - -else - echo "$ac_t""no" 1>&6 - - echo $ac_n "checking for glFlush in -lMesaGL""... $ac_c" 1>&6 -echo "configure:12133: checking for glFlush in -lMesaGL" >&5 -ac_lib_var=`echo MesaGL'_'glFlush | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lMesaGL $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - OPENGL_LINK="-lMesaGL" - -else - echo "$ac_t""no" 1>&6 -fi - - -fi - - -else - echo "$ac_t""no" 1>&6 -wxUSE_OPENGL=0 -fi - -fi - - if test "$wxUSE_GUI" = "yes"; then cat >> confdefs.h <<\EOF #define wxUSE_GUI 1 @@ -12306,6 +12938,7 @@ if test "$wxUSE_INTL" = "yes" ; then EOF SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat" + GUIDIST="$GUIDIST INTL_DIST" fi fi @@ -12350,12 +12983,12 @@ if test "$wxUSE_TIMEDATE" = "yes"; then for ac_func in strptime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12354: checking for $ac_func" >&5 +echo "configure:12987: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12404,13 +13037,13 @@ done echo $ac_n "checking for timezone variable in ""... $ac_c" 1>&6 -echo "configure:12408: checking for timezone variable in " >&5 +echo "configure:13041: checking for timezone variable in " >&5 if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12422,7 +13055,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=__timezone @@ -12433,7 +13066,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -12445,7 +13078,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=_timezone @@ -12456,7 +13089,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -12468,7 +13101,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=timezone @@ -12503,12 +13136,12 @@ EOF for ac_func in localtime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12507: checking for $ac_func" >&5 +echo "configure:13140: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12558,13 +13191,13 @@ done if test "$ac_cv_func_localtime" = "yes"; then echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:12562: checking for tm_gmtoff in struct tm" >&5 +echo "configure:13195: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12576,14 +13209,10 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_tm_has_gmtoff=yes - cat >> confdefs.h <<\EOF -#define WX_GMTOFF_IN_TM 1 -EOF - else echo "configure: failed program was:" >&5 @@ -12597,17 +13226,24 @@ rm -f conftest* fi echo "$ac_t""$wx_cv_struct_tm_has_gmtoff" 1>&6 + fi + + if test "$wx_cv_struct_tm_has_gmtoff" = "yes"; then + cat >> confdefs.h <<\EOF +#define WX_GMTOFF_IN_TM 1 +EOF + fi for ac_func in gettimeofday ftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12606: checking for $ac_func" >&5 +echo "configure:13242: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12657,7 +13293,7 @@ done if test "$ac_cv_func_gettimeofday" = "yes"; then echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6 -echo "configure:12661: checking whether gettimeofday takes two arguments" >&5 +echo "configure:13297: checking whether gettimeofday takes two arguments" >&5 if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12672,7 +13308,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -12686,7 +13322,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=yes else @@ -12694,7 +13330,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -12707,7 +13343,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=no else @@ -12751,14 +13387,14 @@ fi if test "$TOOLKIT" != "MSW"; then -if test "$wxUSE_SOCKETS" = "yes"; then - echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:12757: checking for socket" >&5 + if test "$wxUSE_SOCKETS" = "yes"; then + echo $ac_n "checking for socket""... $ac_c" 1>&6 +echo "configure:13393: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -12799,7 +13435,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:12803: checking for socket in -lsocket" >&5 +echo "configure:13439: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12807,7 +13443,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12837,28 +13473,27 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 - echo "configure: warning: socket library not found - sockets will be disabled" 1>&2 - wxUSE_SOCKETS=no + echo "configure: warning: socket library not found - sockets will be disabled" 1>&2 + wxUSE_SOCKETS=no + +fi + fi - -fi + fi -fi - -fi - -if test "$wxUSE_SOCKETS" = "yes" ; then - echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6 -echo "configure:12856: checking what is the type of the third argument of getsockname" >&5 + + if test "$wxUSE_SOCKETS" = "yes" ; then + echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6 +echo "configure:13491: checking what is the type of the third argument of getsockname" >&5 if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - ac_ext=C + + ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' @@ -12866,29 +13501,8 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross - cat > conftest.$ac_ext < - #include - -int main() { - - socklen_t len; - getsockname(0, 0, &len); - -; return 0; } -EOF -if { (eval echo configure:12884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - wx_cv_type_getsockname3=socklen_t -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < conftest.$ac_ext < @@ -12896,20 +13510,20 @@ else int main() { - size_t len; + socklen_t len; getsockname(0, 0, &len); ; return 0; } EOF -if { (eval echo configure:12905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - wx_cv_type_getsockname3=size_t + wx_cv_type_getsockname3=socklen_t else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -12917,12 +13531,33 @@ else int main() { - int len; + size_t len; getsockname(0, 0, &len); ; return 0; } EOF -if { (eval echo configure:12926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wx_cv_type_getsockname3=size_t +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < + #include + +int main() { + + int len; + getsockname(0, 0, &len); + +; return 0; } +EOF +if { (eval echo configure:13561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=int else @@ -12930,37 +13565,39 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* wx_cv_type_getsockname3=unknown + +fi +rm -f conftest* fi rm -f conftest* -fi -rm -f conftest* - fi rm -f conftest* - ac_ext=c + ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross - + fi echo "$ac_t""$wx_cv_type_getsockname3" 1>&6 - if test "$wx_cv_type_getsockname3" = "unknown"; then - wxUSE_SOCKETS=no - echo "configure: warning: Couldn't find socklen_t synonym for this system" 1>&2 - else - cat >> confdefs.h <&2 + else + cat >> confdefs.h <&6 -echo "configure:12986: checking for $ac_hdr" >&5 +echo "configure:13622: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13018,39 +13654,39 @@ else fi done - if test "$ac_cv_header_linux_joystick_h" != "yes"; then - wxUSE_JOYSTICK=no - echo "configure: warning: Joystick not supported by this system" 1>&2 - fi -fi + if test "$ac_cv_header_linux_joystick_h" != "yes"; then + wxUSE_JOYSTICK=no + echo "configure: warning: Joystick not supported by this system" 1>&2 + fi + fi -fi - -if test "$wxUSE_JOYSTICK" = "yes"; then - cat >> confdefs.h <<\EOF + fi + + if test "$wxUSE_JOYSTICK" = "yes"; then + cat >> confdefs.h <<\EOF #define wxUSE_JOYSTICK 1 EOF - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" -fi + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" + fi fi if test "$TOOLKIT" != "MSW"; then -HAVE_DL_FUNCS=0 -HAVE_SHL_FUNCS=0 -if test "$wxUSE_DYNLIB_CLASS" = "yes"; then - for ac_func in dlopen + HAVE_DL_FUNCS=0 + HAVE_SHL_FUNCS=0 + if test "$wxUSE_DYNLIB_CLASS" = "yes"; then + for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13049: checking for $ac_func" >&5 +echo "configure:13685: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13092,16 +13728,16 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then #define $ac_tr_func 1 EOF - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF - HAVE_DL_FUNCS=1 - + HAVE_DL_FUNCS=1 + else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:13105: checking for dlopen in -ldl" >&5 +echo "configure:13741: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13109,7 +13745,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13136,25 +13772,25 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF - HAVE_DL_FUNCS=1 - LIBS="$LIBS -ldl" - + HAVE_DL_FUNCS=1 + LIBS="$LIBS -ldl" + else echo "$ac_t""no" 1>&6 - for ac_func in shl_load + for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13153: checking for $ac_func" >&5 +echo "configure:13789: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13196,36 +13832,184 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then #define $ac_tr_func 1 EOF - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define HAVE_SHL_LOAD 1 EOF - HAVE_SHL_FUNCS=1 - + HAVE_SHL_FUNCS=1 + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6 +echo "configure:13845: checking for dld in -lshl_load" >&5 +ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lshl_load $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + HAVE_SHL_FUNCS=1 + LIBS="$LIBS -ldld" + else echo "$ac_t""no" 1>&6 fi + + +fi done - + fi - + fi done - if test "$HAVE_DL_FUNCS" = 0; then - if test "$HAVE_SHL_FUNCS" = 0; then - if test "$USE_UNIX" = 1; then - echo "configure: warning: Missing dynamic loading support, several features will be disabled" 1>&2 - wxUSE_DYNLIB_CLASS=no - else - echo "configure: warning: Assuming wxLibrary class works on this platform" 1>&2 - fi + if test "$HAVE_DL_FUNCS" = 1; then + for ac_func in dlerror +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13903: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_DLERROR 1 +EOF + +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6 +echo "configure:13956: checking for dlerror in -ldl" >&5 +ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DLERROR 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi +done + + fi + + if test "$HAVE_DL_FUNCS" = 0; then + if test "$HAVE_SHL_FUNCS" = 0; then + if test "$USE_UNIX" = 1; then + echo "configure: warning: Missing dynamic loading support, several features will be disabled" 1>&2 + wxUSE_DYNLIB_CLASS=no + else + echo "configure: warning: Assuming wxLibrary class works on this platform" 1>&2 + fi + fi fi fi -fi fi @@ -13278,9 +14062,6 @@ EOF WXODBCFLAG="-D_IODBC_" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db" - IODBCOBJS="\$(IODBC_OBJS)" -else - IODBCOBJS= fi @@ -13408,21 +14189,22 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then fi if test "$USE_WIN32" = 1; then - for ac_hdr in ole2.h + + for ac_hdr in ole2.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13416: checking for $ac_hdr" >&5 +echo "configure:14198: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13448,7 +14230,26 @@ else fi done - if test "x$HAVE_OLE2_H" = x ; then + + if test "$ac_cv_header_ole2_h" = "yes" ; then + if test "$GCC" = yes ; then + ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)" + ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)" + CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks" + LIBS="$LIBS -lole32 -luuid -lrpcrt4 -loleaut32" + + if test "$wxUSE_METAFILE" = "yes"; then + cat >> confdefs.h <<\EOF +#define wxUSE_METAFILE 1 +EOF + + cat >> confdefs.h <<\EOF +#define wxUSE_ENH_METAFILE 1 +EOF + + fi + fi + else echo "configure: warning: Drag and drop disabled because OLE headers not found" 1>&2 wxUSE_DRAG_AND_DROP=no fi @@ -13738,12 +14539,12 @@ EOF fi - -if test "$wxUSE_METAFILE" = "yes"; then +if test "$wxUSE_TREELAYOUT" = "yes"; then cat >> confdefs.h <<\EOF -#define wxUSE_METAFILE 1 +#define wxUSE_TREELAYOUT 1 EOF + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treelay" fi if test "$wxUSE_DIRDLG" = "yes"; then @@ -13804,7 +14605,6 @@ if test "$wxUSE_HTML" = "yes"; then EOF SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS html" fi if test "$wxUSE_VALIDATORS" = "yes"; then @@ -13850,23 +14650,29 @@ EOF -GUILIBS="$GUI_TK_LIBRARY $OPENGL_LINK $TOOLKIT_LINK" +GUILIBS="$GUI_TK_LIBRARY $TOOLKIT_LINK" -EXTRA_LIBS="-lm $LIBS $ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK" +EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm" if test "$wxUSE_GUI" = "yes"; then - EXTRA_LIBS="$EXTRA_LIBS $GUILIBS $PNG_LINK $JPEG_LINK $TIFF_LINK" + EXTRA_LIBS="$GUILIBS $PNG_LINK $JPEG_LINK $TIFF_LINK $EXTRA_LIBS" fi LD_LIBS="\${top_builddir}/lib/${WX_LIBRARY_NAME_STATIC} $EXTRA_LIBS" -INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $TOOLKIT_INCLUDE" +INCLUDES="-I. -I\${top_builddir}/lib/wx/include/${TOOLCHAIN_NAME} -I\${top_srcdir}/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $TOOLKIT_INCLUDE" + +if test "$wxUSE_GTK" = 1; then + WXCONFIG_INCLUDE= +else + WXCONFIG_INCLUDE="$TOOLKIT_INCLUDE" +fi if test "$GXX" = yes ; then CXXWARNINGS="-Wall" fi EXTRA_CFLAGS="$WXDEBUG $WXODBCFLAG $PROFILE $OPTIMISE $INCLUDES" -CFLAGS=`echo $CFLAGS $EXTRA_CFLAGS | sed 's/ \\+/ /g'` +CFLAGS=`echo $CFLAGS $EXTRA_CFLAGS $CXXWARNINGS | sed 's/ \\+/ /g'` CXXFLAGS=`echo $CXXFLAGS $EXTRA_CFLAGS $CXXWARNINGS | sed 's/ \+/ /g'` LDFLAGS="$LDFLAGS $PROFILE" @@ -13874,7 +14680,7 @@ LDFLAGS="$LDFLAGS $PROFILE" if test "$wxUSE_GUI" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs dragimag drawing dynamic \ - font fractal image menu minimal richedit" + font image menu minimal richedit" CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)" else @@ -13948,18 +14754,6 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq - - - - - - - - - - - - @@ -13974,7 +14768,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:13978: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:14772: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14001,16 +14795,10 @@ else fi -if test -d include; then - if test -d include/wx; then - if test -d include/wx/${TOOLKIT_DIR}; then - if test -f include/wx/${TOOLKIT_DIR}/setup.h; then - mv -f include/wx/${TOOLKIT_DIR}/setup.h setup.h - fi - fi - fi +if test -f lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h; then + mv -f lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h setup.h fi - + if test "$wxUSE_GUI" = "yes"; then @@ -14203,49 +14991,39 @@ s%@PATH_IFS@%$PATH_IFS%g s%@WX_MAJOR_VERSION_NUMBER@%$WX_MAJOR_VERSION_NUMBER%g s%@WX_MINOR_VERSION_NUMBER@%$WX_MINOR_VERSION_NUMBER%g s%@WX_RELEASE_NUMBER@%$WX_RELEASE_NUMBER%g -s%@WX_LIBRARY_NAME@%$WX_LIBRARY_NAME%g s%@WX_LIBRARY_NAME_STATIC@%$WX_LIBRARY_NAME_STATIC%g s%@WX_LIBRARY_NAME_SHARED@%$WX_LIBRARY_NAME_SHARED%g -s%@WX_LIBRARY@%$WX_LIBRARY%g s%@WX_TARGET_LIBRARY@%$WX_TARGET_LIBRARY%g s%@WX_LIBRARY_LINK1@%$WX_LIBRARY_LINK1%g s%@WX_LIBRARY_LINK2@%$WX_LIBRARY_LINK2%g -s%@WX_LIBRARY_LINK3@%$WX_LIBRARY_LINK3%g s%@PROGRAM_EXT@%$PROGRAM_EXT%g -s%@WX_LIBRARY_NAME_GL@%$WX_LIBRARY_NAME_GL%g s%@WX_LIBRARY_NAME_STATIC_GL@%$WX_LIBRARY_NAME_STATIC_GL%g s%@WX_LIBRARY_NAME_SHARED_GL@%$WX_LIBRARY_NAME_SHARED_GL%g -s%@WX_LIBRARY_GL@%$WX_LIBRARY_GL%g s%@WX_TARGET_LIBRARY_GL@%$WX_TARGET_LIBRARY_GL%g s%@WX_LIBRARY_LINK1_GL@%$WX_LIBRARY_LINK1_GL%g s%@WX_LIBRARY_LINK2_GL@%$WX_LIBRARY_LINK2_GL%g -s%@WX_LIBRARY_LINK3_GL@%$WX_LIBRARY_LINK3_GL%g s%@WX_ALL@%$WX_ALL%g s%@WX_ALL_INSTALLED@%$WX_ALL_INSTALLED%g s%@SHARED_LD@%$SHARED_LD%g s%@PIC_FLAG@%$PIC_FLAG%g -s%@DEP_INFO_FLAGS@%$DEP_INFO_FLAGS%g s%@CODE_GEN_FLAGS@%$CODE_GEN_FLAGS%g -s%@BURNT_LIBRARY_NAME@%$BURNT_LIBRARY_NAME%g -s%@BURNT_LIBRARY_NAME_GL@%$BURNT_LIBRARY_NAME_GL%g +s%@CODE_GEN_FLAGS_CXX@%$CODE_GEN_FLAGS_CXX%g +s%@SONAME_FLAGS@%$SONAME_FLAGS%g +s%@SONAME_FLAGS_GL@%$SONAME_FLAGS_GL%g +s%@WX_TARGET_LIBRARY_SONAME@%$WX_TARGET_LIBRARY_SONAME%g s%@WX_TARGET_LIBRARY_TYPE@%$WX_TARGET_LIBRARY_TYPE%g s%@WXDEBUG_DEFINE@%$WXDEBUG_DEFINE%g s%@USE_GUI@%$USE_GUI%g s%@AFMINSTALL@%$AFMINSTALL%g s%@TOOLKIT@%$TOOLKIT%g -s%@TOOLKIT_DEF@%$TOOLKIT_DEF%g +s%@TOOLCHAIN_DEFS@%$TOOLCHAIN_DEFS%g s%@TOOLKIT_DIR@%$TOOLKIT_DIR%g -s%@TOOLKIT_INCLUDE@%$TOOLKIT_INCLUDE%g -s%@GUIHEADERS@%$GUIHEADERS%g -s%@GUIOBJS@%$GUIOBJS%g -s%@COMMONOBJS@%$COMMONOBJS%g -s%@GENERICOBJS@%$GENERICOBJS%g -s%@GUIDEPS@%$GUIDEPS%g -s%@COMMONDEPS@%$COMMONDEPS%g -s%@GENERICDEPS@%$GENERICDEPS%g -s%@IODBCOBJS@%$IODBCOBJS%g -s%@UNIXOBJS@%$UNIXOBJS%g -s%@UNIXDEPS@%$UNIXDEPS%g +s%@TOOLCHAIN_NAME@%$TOOLCHAIN_NAME%g +s%@TOOLKIT_VPATH@%$TOOLKIT_VPATH%g +s%@cross_compiling@%$cross_compiling%g +s%@WXCONFIG_LIBS@%$WXCONFIG_LIBS%g +s%@WXCONFIG_LIBS_GL@%$WXCONFIG_LIBS_GL%g +s%@WXCONFIG_INCLUDE@%$WXCONFIG_INCLUDE%g s%@ALL_OBJECTS@%$ALL_OBJECTS%g s%@ALL_DEPFILES@%$ALL_DEPFILES%g s%@GUIDIST@%$GUIDIST%g @@ -14253,20 +15031,15 @@ s%@PORT_FILES@%$PORT_FILES%g s%@DISTDIR@%$DISTDIR%g s%@RPM_SPEC@%$RPM_SPEC%g s%@RPM_FILES@%$RPM_FILES%g -s%@SRC_SUBDIRS@%$SRC_SUBDIRS%g -s%@INCLUDE_SUBDIRS@%$INCLUDE_SUBDIRS%g -s%@UTILS_SUBDIRS@%$UTILS_SUBDIRS%g -s%@DOCS_SUBDIRS@%$DOCS_SUBDIRS%g s%@SAMPLES_SUBDIRS@%$SAMPLES_SUBDIRS%g -s%@USER_SUBDIRS@%$USER_SUBDIRS%g s%@EXTRA_LIBS@%$EXTRA_LIBS%g +s%@OPENGL_LIBS@%$OPENGL_LIBS%g s%@EXTRADEFS@%$EXTRADEFS%g s%@LD_LIBS@%$LD_LIBS%g -s%@RCINPUTSWITCH@%$RCINPUTSWITCH%g -s%@RCOUTPUTSWITCH@%$RCOUTPUTSWITCH%g -s%@RESPROGRAM@%$RESPROGRAM%g +s%@WXMSW_DLL_DEFINES@%$WXMSW_DLL_DEFINES%g s%@RESCOMP@%$RESCOMP%g s%@RESFLAGS@%$RESFLAGS%g +s%@RESPROGRAMOBJ@%$RESPROGRAMOBJ%g s%@DLLTOOL@%$DLLTOOL%g s%@AS@%$AS%g s%@NM@%$NM%g @@ -14489,18 +15262,19 @@ fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - chmod +x wx-config - mv wx-config wx${TOOLKIT_DIR}-config - ${LN_S} wx${TOOLKIT_DIR}-config wx-config - - + if test ! -h wx-config; then + chmod +x wx-config + mv wx-config wx${TOOLCHAIN_NAME}-config + ${LN_S} wx${TOOLCHAIN_NAME}-config wx-config + fi + if test ! -d lib; then mkdir lib fi @@ -14510,30 +15284,15 @@ cat >> $CONFIG_STATUS <<\EOF if test ! -d lib/wx/include; then mkdir lib/wx/include fi - if test ! -d lib/wx/include/wx; then - mkdir lib/wx/include/wx + if test ! -d lib/wx/include/${TOOLCHAIN_NAME}; then + mkdir lib/wx/include/${TOOLCHAIN_NAME} fi - if test ! -d lib/wx/include/wx/${TOOLKIT_DIR}; then - mkdir lib/wx/include/wx/${TOOLKIT_DIR} + if test ! -d lib/wx/include/${TOOLCHAIN_NAME}/wx; then + mkdir lib/wx/include/${TOOLCHAIN_NAME}/wx fi if test -f setup.h; then - cp -f setup.h lib/wx/include/wx/${TOOLKIT_DIR}/setup.h + mv -f setup.h lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h fi - - - if test ! -d include; then - mkdir include - fi - if test ! -d include/wx; then - mkdir include/wx - fi - if test ! -d include/wx/${TOOLKIT_DIR}; then - mkdir include/wx/${TOOLKIT_DIR} - fi - if test -f setup.h; then - mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h - fi - exit 0 EOF diff --git a/configure.in b/configure.in index bde4a0e0f9..516fc060d6 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ AC_REVISION($Id$)dnl dnl --------------------------------------------------------------------------- dnl dnl Top-level configure.in for wxWindows by Robert Roebling, Phil Blecker and -dnl Vadim Zeitlin +dnl Vadim Zeitlin and Ron Lee dnl dnl This script is under the wxWindows licence. dnl @@ -116,7 +116,7 @@ for ac_dir in $1; ]) dnl --------------------------------------------------------------------------- -dnl call WX_PATH_FIND_LIBRARIES(search path, header name), sets ac_find_includes +dnl call WX_PATH_FIND_LIBRARIES(search path, header name), sets ac_find_libraries dnl to the full name of the file that was found or leaves it empty if not found dnl --------------------------------------------------------------------------- AC_DEFUN(WX_PATH_FIND_LIBRARIES, @@ -184,10 +184,10 @@ AC_DEFUN(WX_CPP_NEW_HEADERS, AC_CHECK_HEADERS(iostream) - if test "x$HAVE_IOSTREAM" = x ; then - ifelse([$2], , :, [$2]) - else + if test "$ac_cv_header_iostream" = "yes" ; then ifelse([$1], , :, [$1]) + else + ifelse([$2], , :, [$2]) fi AC_LANG_RESTORE @@ -216,7 +216,6 @@ AC_DEFUN(WX_CPP_BOOL, return 0; ], [ - AC_DEFINE(HAVE_BOOL) wx_cv_cpp_bool=yes ], [ @@ -290,13 +289,13 @@ AC_DEFUN(WX_ARG_CACHE_FLUSH, ]) dnl this macro checks for a three-valued command line --with argument: -dnl possible arguments are 'yes', 'no', or 'sys' +dnl possible arguments are 'yes', 'no', 'sys', or 'builtin' dnl usage: WX_ARG_SYS_WITH(option, helpmessage, variable-name) AC_DEFUN(WX_ARG_SYS_WITH, [ - AC_MSG_CHECKING("for --with-$1") + AC_MSG_CHECKING([for --with-$1]) no_cache=0 - AC_ARG_WITH($1, $2, + AC_ARG_WITH($1, [$2], [ if test "$withval" = yes; then ac_cv_use_$1='$3=yes' @@ -304,8 +303,10 @@ AC_DEFUN(WX_ARG_SYS_WITH, ac_cv_use_$1='$3=no' elif test "$withval" = sys; then ac_cv_use_$1='$3=sys' + elif test "$withval" = builtin; then + ac_cv_use_$1='$3=builtin' else - AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no or sys]) + AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin]) fi ], [ @@ -330,8 +331,10 @@ AC_DEFUN(WX_ARG_SYS_WITH, AC_MSG_RESULT(no) elif test "$$3" = sys; then AC_MSG_RESULT(system version) + elif test "$$3" = builtin; then + AC_MSG_RESULT(builtin version) else - AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no or sys]) + AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin]) fi ]) @@ -339,9 +342,9 @@ dnl this macro checks for a command line argument and caches the result dnl usage: WX_ARG_WITH(option, helpmessage, variable-name) AC_DEFUN(WX_ARG_WITH, [ - AC_MSG_CHECKING("for --with-$1") + AC_MSG_CHECKING([for --with-$1]) no_cache=0 - AC_ARG_WITH($1, $2, + AC_ARG_WITH($1, [$2], [ if test "$withval" = yes; then ac_cv_use_$1='$3=yes' @@ -376,9 +379,9 @@ dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH dnl usage: WX_ARG_ENABLE(option, helpmessage, variable-name) AC_DEFUN(WX_ARG_ENABLE, [ - AC_MSG_CHECKING("for --enable-$1") + AC_MSG_CHECKING([for --enable-$1]) no_cache=0 - AC_ARG_ENABLE($1, $2, + AC_ARG_ENABLE($1, [$2], [ if test "$enableval" = yes; then ac_cv_use_$1='$3=yes' @@ -448,27 +451,38 @@ AC_CANONICAL_SYSTEM dnl When making releases do: dnl dnl WX_RELEASE_NUMBER += 1 -dnl WX_INTERFACE_AGE += 1 -dnl WX_BINARY_AGE += 1 dnl -dnl if any functions have been added, do: +dnl ..and update WX_CURRENT, WX_RELEASE and WX_AGE according to the +dnl following rules: dnl -dnl WX_INTERFACE_AGE = 0 +dnl If any changes have been made to the public interface, that is if any +dnl exported class, method, global or global type has been added, removed +dnl or changed in any way, then do: WX_CURRENT += 1 +dnl +dnl If source changes have been made that *do not* alter the public +dnl interface then do: WX_REVISION += 1 +dnl If WX_CURRENT was incremented (as above) instead do: WX_REVISION = 0 +dnl +dnl If any public interface was added, do: WX_AGE += 1 +dnl If any public interface was removed (or altered in a way effectively +dnl removing the previous definition), instead do: WX_AGE = 0 +dnl +dnl When the major or minor version numbers are incremented, all the above +dnl variables should be reset to 0. +dnl +dnl The resulting library name will be of the form: +dnl libwx_$(TOOLKIT)-$(WX_RELEASE).${SO_SUFFIX}.$(WX_CURRENT).$(WX_REVISION).$(WX_AGE) WX_MAJOR_VERSION_NUMBER=2 -WX_MINOR_VERSION_NUMBER=1 -WX_RELEASE_NUMBER=14 - -WX_INTERFACE_AGE=0 -WX_BINARY_AGE=0 +WX_MINOR_VERSION_NUMBER=2 +WX_RELEASE_NUMBER=9 WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER - -dnl wxWindows shared library versioning WX_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER -WX_CURRENT=`expr $WX_RELEASE_NUMBER - $WX_INTERFACE_AGE` -WX_REVISION=$WX_INTERFACE_AGE -WX_AGE=`expr $WX_BINARY_AGE - $WX_INTERFACE_AGE` + +WX_CURRENT=6 +WX_REVISION=2 +WX_AGE=6 dnl ------------------------------------------------------------------------ dnl Check platform (host system) @@ -491,7 +505,10 @@ USE_SUNOS= USE_ALPHA= USE_OSF= USE_BSD= +USE_DARWIN= USE_FREEBSD= +USE_OPENBSD= +USE_NETBSD= USE_VMS= USE_ULTRIX= USE_CYGWIN= @@ -524,6 +541,7 @@ DEFAULT_DEFAULT_wxUSE_WINE=0 DEFAULT_DEFAULT_wxUSE_PM=0 PROGRAM_EXT= +SO_SUFFIX=so dnl to support a new system, you need to add its canonical name (as determined dnl by config.sub or specified by the configure command line) to this "case" @@ -534,6 +552,7 @@ case "${host}" in USE_HPUX=1 DEFAULT_DEFAULT_wxUSE_MOTIF=1 NEEDS_D_REENTRANT_FOR_R_FUNCS=1 + SO_SUFFIX=sl AC_DEFINE(__HPUX__) ;; *-*-linux* ) @@ -572,19 +591,34 @@ case "${host}" in AC_DEFINE(__BSD__) DEFAULT_DEFAULT_wxUSE_MOTIF=1 ;; - *-*-freebsd* | *-*-netbsd*) + *-*-freebsd*) USE_BSD=1 USE_FREEBSD=1 AC_DEFINE(__FREEBSD__) AC_DEFINE(__BSD__) DEFAULT_DEFAULT_wxUSE_GTK=1 ;; + *-*-openbsd*) + USE_BSD=1 + USE_OPENBSD=1 + AC_DEFINE(__FREEBSD__) + AC_DEFINE(__OPENBSD__) + DEFAULT_DEFAULT_wxUSE_GTK=1 + ;; + *-*-netbsd*) + USE_BSD=1 + USE_NETBSD=1 + AC_DEFINE(__FREEBSD__) + AC_DEFINE(__NETBSD__) + DEFAULT_DEFAULT_wxUSE_GTK=1 + ;; *-*-osf* ) USE_ALPHA=1 USE_OSF=1 AC_DEFINE(__ALPHA__) AC_DEFINE(__OSF__) DEFAULT_DEFAULT_wxUSE_MOTIF=1 + NEEDS_D_REENTRANT_FOR_R_FUNCS=1 ;; *-*-dgux5* ) USE_ALPHA=1 @@ -610,9 +644,10 @@ case "${host}" in DEFAULT_DEFAULT_wxUSE_MOTIF=1 ;; - *-*-cygwin32* | *-*-mingw32* ) + *-*-cygwin* | *-*-mingw32* ) USE_UNIX=0 USE_WIN32=1 + SO_SUFFIX=dll AC_DEFINE(__WIN32__) AC_DEFINE(__WIN95__) AC_DEFINE(__WINDOWS__) @@ -620,15 +655,26 @@ case "${host}" in AC_DEFINE(STRICT) AC_DEFINE(WINVER, 0x0400) PROGRAM_EXT=".exe" + RESCOMP=windres DEFAULT_DEFAULT_wxUSE_MSW=1 ;; - *-pc-os2_emx ) + *-pc-os2_emx | *-pc-os2-emx ) AC_DEFINE(__EMX__) PROGRAM_EXT=".exe" DEFAULT_DEFAULT_wxUSE_PM=1 ;; + powerpc-*-darwin* ) + dnl PowerPC Darwin based distributions (including Mac OS X) + USE_BSD=1 + USE_DARWIN=1 + SO_SUFFIX=dylib + AC_DEFINE(__BSD__) + AC_DEFINE(__DARWIN__) + AC_DEFINE(__POWERPC__) + ;; + *-*-beos* ) dnl leave USE_UNIX on - BeOS is sufficiently Unix-like for this USE_BEOS=1 @@ -642,19 +688,11 @@ esac if test "$USE_UNIX" = 1 ; then wxUSE_UNIX=yes AC_DEFINE(__UNIX__) - - SRC_SUBDIRS="$SRC_SUBDIRS unix" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix" -fi - -if test "$USE_BEOS" = 1; then - SRC_SUBDIRS="$SRC_SUBDIRS be" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be" fi dnl Linux: test for libc5/glibc2: glibc2 has gettext() included if test "$USE_LINUX" = 1; then - AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2)) + AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2)) fi dnl --------------------------------------------------------------------------- @@ -676,8 +714,8 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_THREADS=yes DEFAULT_wxUSE_SHARED=yes - DEFAULT_wxUSE_BURNT_NAME=no - DEFAULT_wxUSE_OPTIMISE=yes + DEFAULT_wxUSE_SONAME=no + DEFAULT_wxUSE_OPTIMISE=no DEFAULT_wxUSE_PROFILE=no DEFAULT_wxUSE_NO_DEPS=no DEFAULT_wxUSE_NO_RTTI=no @@ -737,7 +775,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_CONSTRAINTS=no DEFAULT_wxUSE_IPC=no DEFAULT_wxUSE_HELP=no - DEFAULT_wxUSE_WXTREE=no + DEFAULT_wxUSE_TREELAYOUT=no DEFAULT_wxUSE_METAFILE=no DEFAULT_wxUSE_COMMONDLGS=no @@ -797,7 +835,7 @@ else DEFAULT_wxUSE_THREADS=yes DEFAULT_wxUSE_SHARED=yes - DEFAULT_wxUSE_BURNT_NAME=no + DEFAULT_wxUSE_SONAME=no DEFAULT_wxUSE_OPTIMISE=yes DEFAULT_wxUSE_PROFILE=no DEFAULT_wxUSE_NO_DEPS=no @@ -858,7 +896,7 @@ else DEFAULT_wxUSE_CONSTRAINTS=yes DEFAULT_wxUSE_IPC=yes DEFAULT_wxUSE_HELP=yes - DEFAULT_wxUSE_WXTREE=yes + DEFAULT_wxUSE_TREELAYOUT=yes DEFAULT_wxUSE_METAFILE=yes DEFAULT_wxUSE_COMMONDLGS=yes @@ -980,7 +1018,7 @@ dnl compile options dnl --------------------------------------------------------------------------- WX_ARG_ENABLE(shared, [ --enable-shared create shared library code], wxUSE_SHARED) -WX_ARG_ENABLE(burnt_name, [ --enable-burnt_name create set name in shared library ], wxUSE_BURNT_NAME) +WX_ARG_ENABLE(soname, [ --enable-soname set the DT_SONAME field in ELF shared libraries], wxUSE_SONAME) WX_ARG_ENABLE(optimise, [ --enable-optimise create optimised code], wxUSE_OPTIMISE) WX_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], wxUSE_DEBUG) @@ -999,7 +1037,7 @@ WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt use wxDebugContext], wxU WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing create code with memory tracing], wxUSE_MEM_TRACING) WX_ARG_ENABLE(profile, [ --enable-profile create code with profiling information], wxUSE_PROFILE) WX_ARG_ENABLE(no_rtti, [ --enable-no_rtti create code without RTTI information], wxUSE_NO_RTTI) -WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without exceptions information], wxUSE_NO_EXCEPTIONS) +WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ exception handling], wxUSE_NO_EXCEPTIONS) WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE) WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS) @@ -1028,7 +1066,6 @@ WX_ARG_ENABLE(textfile, [ --enable-textfile use wxTextFile classes], WX_ARG_ENABLE(unicode, [ --enable-unicode compile wxString with Unicode support], wxUSE_UNICODE) WX_ARG_ENABLE(wcsrtombs, [ --enable-wcsrtombs use wcsrtombs instead of buggy (GNU libc1/Linux libc5) wcstombs], wxUSE_WCSRTOMBS) WX_ARG_ENABLE(wxprintfv, [ --enable-wxprintfv use wxWindows implementation of vprintf()], wxUSE_EXPERIMENTAL_PRINTF) -WX_ARG_ENABLE(joystick, [ --enable-joystick compile in joystick support (Linux only)], wxUSE_JOYSTICK) WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM) WX_ARG_ENABLE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM) WX_ARG_ENABLE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET) @@ -1079,9 +1116,9 @@ dnl --------------------------------------------------------------------------- WX_ARG_ENABLE(clipboard, [ --enable-clipboard use wxClipboard classes], wxUSE_CLIPBOARD) WX_ARG_ENABLE(dnd, [ --enable-dnd use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP) +WX_ARG_ENABLE(metafile, [ --enable-metafile use win32 metafiles], wxUSE_METAFILE) -dnl TODO: doesn't work yet -WX_ARG_ENABLE(wxtree, [ --enable-wxtree make wxTree library], wxUSE_WXTREE) +WX_ARG_ENABLE(treelayout, [ --enable-treelayout use wxTreeLayout class], wxUSE_TREELAYOUT) dnl --------------------------------------------------------------------------- dnl optional GUI controls (in alphabetical order except the first one) @@ -1208,6 +1245,7 @@ WX_ARG_ENABLE(splines, [ --enable-splines use spline drawing code], WX_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS) WX_ARG_ENABLE(busyinfo, [ --enable-busyinfo use wxBusyInfo], wxUSE_BUSYINFO) WX_ARG_ENABLE(plot, [ --enable-plot use wxPlot], wxUSE_PLOT) +WX_ARG_ENABLE(joystick, [ --enable-joystick compile in joystick support (Linux only)], wxUSE_JOYSTICK) dnl --------------------------------------------------------------------------- dnl support for image formats that do not rely on external library @@ -1230,78 +1268,78 @@ AC_MSG_CHECKING(for toolkit) if test "$wxUSE_GUI" = "yes"; then -if test "$USE_BEOS" = 1; then - AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui]) -fi + if test "$USE_BEOS" = 1; then + AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui]) + fi -if test "$TOOLKIT_GIVEN" = 1; then - dnl convert "yes" to 1 and "no" to 0 - for toolkit in `echo $ALL_TOOLKITS`; do - var=wxUSE_$toolkit - eval "value=\$${var}" - eval "$var=`echo \$value | sed -e "s/yes/1/" -e "s/no/0/"`" - done -else - dnl try to guess the most apropriate toolkit for this platform - for toolkit in `echo $ALL_TOOLKITS`; do - if test "$has_toolkit_in_cache" != 1; then - var=DEFAULT_DEFAULT_wxUSE_$toolkit + if test "$TOOLKIT_GIVEN" = 1; then + dnl convert "yes" to 1 and "no" to 0 + for toolkit in `echo $ALL_TOOLKITS`; do + var=wxUSE_$toolkit + eval "value=\$${var}" + eval "$var=`echo \$value | sed -e "s/yes/1/" -e "s/no/0/"`" + done else - var=DEFAULT_wxUSE_$toolkit + dnl try to guess the most apropriate toolkit for this platform + for toolkit in `echo $ALL_TOOLKITS`; do + if test "$has_toolkit_in_cache" != 1; then + var=DEFAULT_DEFAULT_wxUSE_$toolkit + else + var=DEFAULT_wxUSE_$toolkit + fi + eval "wxUSE_$toolkit=\$${var}" + done fi - eval "wxUSE_$toolkit=\$${var}" - done -fi -dnl we suppose that expr exists... -NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_WINE:-0} + ${wxUSE_MINGW:-0} + ${wxUSE_CYGWIN:-0}` + dnl we suppose that expr exists... + NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_WINE:-0} + ${wxUSE_MINGW:-0} + ${wxUSE_CYGWIN:-0}` -dnl Allow wxUSE_PM only for OS/2 with EMX. -dnl Path separator; ':' for unix. -dnl Stem for flex output; lexyy for OS/2, lex.yy otherwise -dnl Extension for programs; '.exe' for OS/2 and msw builds (set later). -case "${host}" in - *-pc-os2_emx ) - NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}` - # PATH_IFS is autodetected by OS/2's configure (usually ';') - LEX_STEM="lexyy" - ;; - *) - PATH_IFS=':' - LEX_STEM="lex.yy" - ;; -esac + dnl Allow wxUSE_PM only for OS/2 with EMX. + dnl Path separator; ':' for unix. + dnl Stem for flex output; lexyy for OS/2, lex.yy otherwise + dnl Extension for programs; '.exe' for OS/2 and msw builds (set later). + case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}` + # PATH_IFS is autodetected by OS/2's configure (usually ';') + LEX_STEM="lexyy" + ;; + *) + PATH_IFS=':' + LEX_STEM="lex.yy" + ;; + esac -case "$NUM_TOOLKITS" in - 1) - ;; - 0) - AC_MSG_ERROR(Please specify a toolkit - cannot determine the default for ${host}) - ;; - *) - AC_MSG_ERROR(Please specify at most one toolkit (may be some are cached?)) -esac + case "$NUM_TOOLKITS" in + 1) + ;; + 0) + AC_MSG_ERROR(Please specify a toolkit - cannot determine the default for ${host}) + ;; + *) + AC_MSG_ERROR(Please specify at most one toolkit (may be some are cached?)) + esac -dnl cache the wxUSE_ values too -for toolkit in `echo $ALL_TOOLKITS`; do - var=wxUSE_$toolkit - eval "value=\$${var}" - if test "x$value" != x; then - cache_var=CACHE_$toolkit - eval "cache=\$${cache_var}" - if test "$cache" = 1; then - echo "$var=$value" >> ${wx_arg_cache_file} - fi - if test "$value" = 1; then - AC_MSG_RESULT(`echo $toolkit | tr [[A-Z]] [[a-z]]`) - fi - fi -done + dnl cache the wxUSE_ values too + for toolkit in `echo $ALL_TOOLKITS`; do + var=wxUSE_$toolkit + eval "value=\$${var}" + if test "x$value" != x; then + cache_var=CACHE_$toolkit + eval "cache=\$${cache_var}" + if test "$cache" = 1; then + echo "$var=$value" >> ${wx_arg_cache_file} + fi + if test "$value" = 1; then + AC_MSG_RESULT(`echo $toolkit | tr [[A-Z]] [[a-z]]`) + fi + fi + done dnl from "if wxUSE_GUI" else PATH_IFS=':' - AC_MSG_RESULT(base only) + AC_MSG_RESULT(base ($host_alias hosted) only) fi dnl --------------------------------------------------------------------------- @@ -1314,15 +1352,19 @@ AC_CACHE_SAVE dnl cross-compiling support: we're cross compiling if the build system is dnl different from the target one (assume host and target be always the same) if test "$build" != "$host" ; then - CC=$host_alias-gcc - CXX=$host_alias-c++ - AR=$host_alias-ar - RANLIB=$host_alias-ranlib - DLLTOOL=$host_alias-dlltool - RESCOMP=$host_alias-windres - LD=$host_alias-ld - NM=$host_alias-nm - STRIP=$host_alias-strip + if test "$USE_WIN32" = 1 ; then + CC=$host_alias-gcc + CXX=$host_alias-c++ + AR=$host_alias-ar + RANLIB=$host_alias-ranlib + DLLTOOL=$host_alias-dlltool + RESCOMP=$host_alias-windres + LD=$host_alias-ld + NM=$host_alias-nm + STRIP=$host_alias-strip + else + AC_MSG_ERROR($build_alias -> $host_alias cross compilation not supported yet.) + fi fi dnl C-compiler checks @@ -1377,7 +1419,7 @@ dnl defines STRIP as strip or nothing if not found AC_CHECK_PROG(STRIP, strip, strip, true) dnl check if VPATH works -AC_MSG_CHECKING("make for VPATH support") +AC_MSG_CHECKING(make for VPATH support) dnl create Makefile cat - << EOF > confMake check : file @@ -1389,7 +1431,7 @@ if test ! -d sub ; then mkdir sub fi echo dummy > sub/file -${MAKE-make} -f confMake VPATH=sub 2> config.log > /dev/null +${MAKE-make} -f confMake VPATH=sub 2>&5 > /dev/null RESULT=$? rm -f sub/file check final_file confMake rmdir sub @@ -1510,37 +1552,314 @@ dnl ------------------------------------------------------------------------ dnl flush the cache because checking for libraries below might abort AC_CACHE_SAVE +dnl --------------------------------------------------------------------------- +dnl Optional libraries +dnl +dnl --with-=sys +dnl looks for system library and fails if not found +dnl +dnl --with- +dnl --with-=yes +dnl looks for system library and, if not found, prints a warning, +dnl falls back to the builtin wx version, and continues configuration +dnl +dnl --with-=builtin +dnl uses builtin wx version without searching for system library +dnl +dnl --with-=no +dnl --without- +dnl do not use library (neither system nor builtin wx version) +dnl +dnl --------------------------------------------------------------------------- + +dnl ------------------------------------------------------------------------ +dnl Check for zlib compression library +dnl ------------------------------------------------------------------------ + +ZLIB_INCLUDE= +ZLIB_LINK= +if test "$wxUSE_ZLIB" != "no" ; then + AC_DEFINE(wxUSE_ZLIB) + + if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then + AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, deflate, ZLIB_LINK="-lz")) + + if test "x$ZLIB_LINK" = "x" ; then + if test "$wxUSE_ZLIB" = "sys" ; then + AC_MSG_ERROR([system zlib compression library not found! Use --with-zlib=builtin to use built-in version]) + else + AC_MSG_WARN([system zlib compression library not found, will use built-in instead]) + wxUSE_ZLIB=builtin + fi + else + dnl we are using the system library + wxUSE_ZLIB=sys + fi + fi + + if test "$wxUSE_ZLIB" = "builtin" ; then + ZLIB_INCLUDE="-I\${top_srcdir}/src/zlib" + fi +fi + +dnl ------------------------------------------------------------------------ +dnl Check for png library +dnl ------------------------------------------------------------------------ + +PNG_INCLUDE= +PNG_LINK= +if test "$wxUSE_LIBPNG" != "no" ; then + AC_DEFINE(wxUSE_LIBPNG) + + dnl for the check below to have a chance to succeed, we must already have + dnl libz somewhere + if test "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then + AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead]) + wxUSE_LIBPNG=builtin + fi + + if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then + AC_CHECK_HEADER(png.h, + AC_CHECK_LIB(png, png_check_sig, + PNG_LINK="-lpng", + , + [-lz -lm]) + ) + + if test "x$PNG_LINK" = "x" ; then + if test "$wxUSE_LIBPNG" = "sys" ; then + AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version]) + else + AC_MSG_WARN([system png library not found, will use built-in instead]) + wxUSE_LIBPNG=builtin + fi + else + dnl we are using the system library + wxUSE_LIBPNG=yes + fi + fi + + if test "$wxUSE_LIBPNG" = "builtin" ; then + PNG_INCLUDE="-I\${top_srcdir}/src/png" + fi + + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png" +fi + +dnl ------------------------------------------------------------------------ +dnl Check for jpeg library +dnl ------------------------------------------------------------------------ + +JPEG_INCLUDE= +JPEG_LINK= +if test "$wxUSE_LIBJPEG" != "no" ; then + AC_DEFINE(wxUSE_LIBJPEG) + + if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then + dnl can't use AC_CHECK_HEADER as jconfig.h defines things like + dnl HAVE_STDLIB_H which are already defined and this provokes + dnl a compiler warning which configure considers as an error... + AC_MSG_CHECKING(for jpeglib.h) + AC_CACHE_VAL(ac_cv_header_jpeglib_h, + AC_TRY_COMPILE( + [ + #undef HAVE_STDLIB_H + #include + #include + ], + [ + ], + ac_cv_header_jpeglib_h=yes, + ac_cv_header_jpeglib_h=no + ) + ) + AC_MSG_RESULT($ac_cv_header_jpeglib_h) + + if test "$ac_cv_header_jpeglib_h" = "yes"; then + AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK="-ljpeg") + fi + + if test "x$JPEG_LINK" = "x" ; then + if test "$wxUSE_LIBJPEG" = "sys" ; then + AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version]) + else + AC_MSG_WARN([system jpeg library not found, will use built-in instead]) + wxUSE_LIBJPEG=builtin + fi + else + dnl we are using the system library + wxUSE_LIBJPEG=sys + fi + fi + + if test "$wxUSE_LIBJPEG" = "builtin" ; then + JPEG_INCLUDE="-I\${top_srcdir}/src/jpeg" + fi +fi + +dnl ------------------------------------------------------------------------ +dnl Check for tiff library +dnl ------------------------------------------------------------------------ + +TIFF_INCLUDE= +TIFF_LINK= +if test "$wxUSE_LIBTIFF" != "no" ; then + AC_DEFINE(wxUSE_LIBTIFF) + + if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then + AC_CHECK_HEADER(tiffio.h, + AC_CHECK_LIB(tiff, TIFFError, + TIFF_LINK="-ltiff", + , + -lm) + ) + + if test "x$TIFF_LINK" = "x" ; then + if test "$wxUSE_LIBTIFF" = "sys" ; then + AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version]) + else + AC_MSG_WARN([system tiff library not found, will use built-in instead]) + wxUSE_LIBTIFF=builtin + fi + else + dnl we are using the system library + wxUSE_LIBTIFF=sys + fi + fi + + if test "$wxUSE_LIBTIFF" = "builtin" ; then + TIFF_INCLUDE="-I\${top_srcdir}/src/tiff" + fi +fi + dnl ---------------------------------------------------------------- dnl search for toolkit (widget sets) dnl ---------------------------------------------------------------- AFMINSTALL= -if test "$wxUSE_GUI" = "yes"; then - -USE_GUI=1 - TOOLKIT= TOOLKIT_INCLUDE= -GUIOBJS= -COMMONOBJS= -GENERICOBJS= +dnl are we building for a win32 target environment? +dnl If so, setup common stuff needed for both GUI and Base libs. -GUI_TK_LIBRARY= -GUI_TK_LINK= +if test "$USE_WIN32" = 1 ; then + AC_CHECK_HEADERS(w32api.h) + AC_CHECK_HEADER(windows.h, [], + [ + AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) + ]) -WXGTK12= -WXGTK13= + dnl check if can use _WIN_IE macro + AC_CACHE_CHECK([if w32api has good enough MSIE support], wx_cv_w32api_win_ie, + [ + AC_TRY_COMPILE([#include ], + [ + #define wxCHECK_W32API_VERSION( major, minor ) \ + ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \ + && ( ( __W32API_MAJOR_VERSION > (major) ) \ + || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor)))) -WXWINE= + #if !wxCHECK_W32API_VERSION(1,1) + #error You need w32api 1.1 or newer + #endif + ], [ + wx_cv_w32api_win_ie=yes + ], [ + wx_cv_w32api_win_ie=no + ]) + ]) + if test "$wx_cv_w32api_win_ie" = "yes" ; then + CPPFLAGS="$CPPFLAGS -D_WIN32_IE=0x400" + fi -if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then - if test "$cross_compiling" = "yes" ; then - dnl mingw32 will find them even if they're not in one of standard paths - AC_MSG_WARN(skipping windows.h check for cross-compilation) - else - AC_MSG_CHECKING(for Windows headers) + dnl --- Quick & Dirty ; link against most/all libraries + dnl --- This will bloat the executable, but it'll work for now... + dnl --- FIXME: trim this list for wxBase + LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32" + + dnl cygwin linker does not provide these + if test "$wxUSE_CYGWIN" = 1; then + LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32" + fi + + dnl This is the original list of libs we were linking with. + dnl Some of them needed to be pruned, eg. -lcrtdll would cause + dnl a crash at startup on NT, and some appear to just not be + dnl required. The latter is the reason for preserving this + dnl list for a little while longer. + dnl LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32" + + dnl add extra odbc libs if we have compiled in odbc + if test "$wxUSE_ODBC" = "yes" ; then + LIBS="$LIBS -lodbc32 -lole32 -loleaut32" + fi + + RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__" + RESPROGRAMOBJ="\$(PROGRAM)_resources.o" +fi + +if test "$wxUSE_GUI" = "yes"; then + USE_GUI=1 + + GUI_TK_LIBRARY= + + WXGTK12= + WXGTK127= + WXGTK13= + + WXWINE= + + if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then + TOOLKIT=MSW + GUIDIST=MSW_DIST + fi + + dnl -mwindows causes a heap of other default gui libs to be linked in. + dnl FIXME: If cygwin needs this, please push it above, if not, please + dnl remove this comment :-) + case "${host}" in + *-*-mingw32* ) + LDFLAGS="$LDFLAGS -Wl,--subsystem,windows -mwindows" + esac + + if test "$wxUSE_GTK" = 1; then + dnl avoid calling AM_PATH_GTK twice, so check first for the newer version + dnl and only then, if it wasn't found, for an older one + AM_PATH_GTK(1.2.7, WXGTK127=1) + AM_PATH_GTK(1.2.3, WXGTK12=1) + + if test "$WXGTK12" != 1; then + AC_MSG_ERROR([ + Please check that gtk-config is in path, the directory + where GTK+ libraries are installed (returned by + 'gtk-config --libs' command) is in LD_LIBRARY_PATH or + equivalent variable and GTK+ is version 1.2.3 or above. + ]) + fi + + dnl it doesn't really work with 1.3.0 now... + dnl AM_PATH_GTK(1.3.0, + dnl WXGTK13=1, + dnl AM_PATH_GTK(1.2.1, + dnl WXGTK12=1, + dnl AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.1 or above?) + dnl ) + dnl ) + + TOOLKIT_INCLUDE="$GTK_CFLAGS" + GUI_TK_LIBRARY="$GTK_LIBS" + AFMINSTALL=afminstall + TOOLKIT=GTK + GUIDIST=GTK_DIST + + dnl test for XIM support in libgdk + AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM)) + fi + + if test "$wxUSE_WINE" = 1; then + AC_MSG_CHECKING(for WINE includes) WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h) if test "$ac_find_includes" != "" ; then AC_MSG_RESULT(found $ac_find_includes) @@ -1549,234 +1868,83 @@ if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then AC_MSG_RESULT(no) AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) fi - fi - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS msw" - dnl --- Quick & Dirty ; link against most/all libraries - dnl --- This will bloat the executable, but it'll work for now... - LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32" - - dnl add extra odbc libs if we have compiled in odbc - if test "$wxUSE_ODBC" = "yes" ; then - LIBS="$LIBS -lodbc32 -lole32 -loleaut32" - fi - - dnl -mwindows is needed to avoid that spawning of a console window - if test "$wxUSE_MINGW" = 1; then - LDFLAGS="$LDFLAGS -mwindows" - fi - - TOOLKIT=MSW - - GUIOBJS="\$(MSW_GUIOBJS)" - GUIHEADERS="\$(MSW_HEADERS)" - COMMONOBJS="\$(MSW_COMMONOBJS)" - GENERICOBJS="\$(MSW_GENERICOBJS)" - UNIXOBJS= - GUIDIST=MSW_DIST - - dnl we should calculate these - RCINCSWITCH="--include-dir" - RCDEFSWITCH="--define" - RCPREPROCESSOR="--preprocessor \"\$(CC) -c -E -xc-header -DRC_INVOKED\"" - RCINPUTSWITCH="-i" - RCOUTPUTSWITCH="-o" - RESFLAGS="$RCPREPROCESSOR $RCINCSWITCH \$(top_srcdir)/include $RCINCSWITCH \$(top_srcdir)/\$(program_dir) $RCDEFSWITCH __WIN32__ $RCDEFSWITCH __WIN95__ $RCDEFSWITCH __GNUWIN32__" - - dnl set optinal RES_PROGRAM_OPT to RES_PROGRAM - RESPROGRAM="\$(RES_PROGRAM)" - -fi - -if test "$wxUSE_GTK" = 1; then - dnl avoid calling AM_PATH_GTK twice, so check first for the newer version - dnl and only then, if it wasn't found, for an older one - AM_PATH_GTK(1.2.3, WXGTK12=1) - - if test "$WXGTK12" != 1; then - AC_MSG_ERROR([ - Please check that gtk-config is in path, the directory - where GTK+ libraries are installed (returned by - 'gtk-config --libs' command) is in LD_LIBRARY_PATH or - equivalent variable and GTK+ is version 1.2.3 or above. - ]) - fi - -dnl it doesn't really work with 1.3.0 now... -dnl AM_PATH_GTK(1.3.0, -dnl WXGTK13=1, -dnl AM_PATH_GTK(1.2.1, -dnl WXGTK12=1, -dnl AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.1 or above?) -dnl ) -dnl ) - - TOOLKIT_INCLUDE="$GTK_CFLAGS" - -dnl Appending gthreads as it was done here is not portable, instead -dnl we now call "gtk-config --libs gthread" which sets the right library -dnl name for us. The following hacks are no longer required. - - GUI_TK_LIBRARY="$GTK_LIBS" - -dnl dnl On FreeBSD, the libs are called gtk12 etc, so we must append gthread12 -dnl echo $GTK_LIBS | fgrep -q "glib12" -dnl if test $? = 0 ; then -dnl GUI_TK_LIBRARY="$GTK_LIBS -gthread12" -dnl else -dnl GUI_TK_LIBRARY="$GTK_LIBS -lgthread" -dnl fi - TOOLKIT=GTK - - AFMINSTALL=afminstall - - GUIOBJS="\$(GTK_GUIOBJS)" - GUIHEADERS="\$(GTK_HEADERS)" - COMMONOBJS="\$(GTK_COMMONOBJS)" - GENERICOBJS="\$(GTK_GENERICOBJS)" - GUIDEPS="\$(GTK_GUIDEPS)" - COMMONDEPS="\$(GTK_COMMONDEPS)" - GENERICDEPS="\$(GTK_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" - GUIDIST=GTK_DIST - - dnl test for XIM support in libgdk - AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM)) -fi - -if test "$wxUSE_WINE" = 1; then - AC_MSG_CHECKING(for WINE includes) - WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h) - if test "$ac_find_includes" != "" ; then - AC_MSG_RESULT(found $ac_find_includes) - TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes" - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) - fi - - XPM_LINK="" - AC_MSG_CHECKING(for Xpm library) - WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) - if test "$ac_find_libraries" != "" ; then - GUI_TK_LIBRARY="-L$ac_find_libraries" - XPM_LINK="-lXpm" - AC_DEFINE(wxHAVE_LIB_XPM) - AC_MSG_RESULT(found at $ac_find_libraries) - else - AC_MSG_RESULT(no) - AC_MSG_WARN(library will be compiled without support for images in XPM format) - fi - - MESA_LINK="" - AC_MSG_CHECKING(for Mesa library) - WX_PATH_FIND_LIBRARIES($SEARCH_LIB,MesaGL) - if test "$ac_find_libraries" != "" ; then - GUI_TK_LIBRARY="$GUI_TK_LIBRARY -L$ac_find_libraries" - MESA_LINK="-lMesaGL" - AC_MSG_RESULT(found at $ac_find_libraries) - else - AC_MSG_ERROR(no) - fi - - GUI_TK_LINK="-lwine $MESA_LINK $XPM_LINK -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses" - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK" - WXWINE=1 - TOOLKIT=MSW - - GUIHEADERS="\$(MSW_HEADERS)" - GUIOBJS="\$(MSW_GUIOBJS)" - COMMONOBJS="\$(MSW_COMMONOBJS)" - GENERICOBJS="\$(MSW_GENERICOBJS)" - GUIDEPS="\$(MSW_GUIDEPS)" - COMMONDEPS="\$(MSW_COMMONDEPS)" - GENERICDEPS="\$(MSW_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" - GUIDIST=MSW_DIST -fi - -if test "$wxUSE_MOTIF" = 1; then - dnl use standard macros to check for X headers/libs, this brings support - dnl for the standard configure options --x-includes and --x-libraries - AC_PATH_XTRA - - if test "$no_x" = "yes"; then - AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options) - fi - - GUI_TK_LIBRARY="$X_LIBS" - TOOLKIT_INCLUDE="$X_CFLAGS" - - AFMINSTALL=afminstall - - dnl manual check for X11 headers/libs - dnl - dnl AC_MSG_CHECKING(for X11 headers) - dnl WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, X11/Intrinsic.h) - dnl if test "$ac_find_includes" != "" ; then - dnl AC_MSG_RESULT(found $ac_find_includes) - dnl else - dnl AC_MSG_RESULT(no) - dnl AC_MSG_ERROR(please set CFLAGS to contain the location of X11/Intrinsic.h) - dnl fi - dnl - dnl AC_MSG_CHECKING(for X11 libraries) - dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB, X11) - dnl if test "$ac_find_libraries" != "" ; then - dnl WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE) - dnl WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY) - dnl - dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" - dnl TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include" - dnl AC_MSG_RESULT(found at $ac_find_libraries) - dnl else - dnl AC_MSG_RESULT(no) - dnl AC_MSG_ERROR(please set LDFLAGS to contain the location of libX11) - dnl fi - - COMPILED_X_PROGRAM=0 - - AC_MSG_CHECKING(for Motif/Lesstif headers) - WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h) - if test "$ac_find_includes" != "" ; then - AC_MSG_RESULT(found $ac_find_includes) - else - AC_TRY_COMPILE( - [ - #include - ], - [ - int version; - - version = xmUseVersion; - ], - [ - AC_MSG_RESULT(found in default search path) - COMPILED_X_PROGRAM=1 - ], - [ - AC_MSG_RESULT(no) - AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h) - ] - ) - fi - - if test "$COMPILED_X_PROGRAM" = 0; then - AC_MSG_CHECKING(for Motif/Lesstif library) - WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm) + XPM_LINK="" + AC_MSG_CHECKING(for Xpm library) + WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) if test "$ac_find_libraries" != "" ; then - WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE) - WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY) - - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" - TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include" + GUI_TK_LIBRARY="-L$ac_find_libraries" + XPM_LINK="-lXpm" + AC_DEFINE(wxHAVE_LIB_XPM) AC_MSG_RESULT(found at $ac_find_libraries) else - dnl it might happen that we found headers in one of the standard - dnl paths but the libs are elsewhere - we do need to try to - dnl compile a sample program then here + AC_MSG_RESULT(no) + AC_MSG_WARN(library will be compiled without support for images in XPM format) + fi + + MESA_LINK="" + AC_MSG_CHECKING(for Mesa library) + WX_PATH_FIND_LIBRARIES($SEARCH_LIB,MesaGL) + if test "$ac_find_libraries" != "" ; then + GUI_TK_LIBRARY="$GUI_TK_LIBRARY -L$ac_find_libraries" + MESA_LINK="-lMesaGL" + AC_MSG_RESULT(found at $ac_find_libraries) + else + AC_MSG_ERROR(no) + fi + + GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwine $MESA_LINK $XPM_LINK -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses" + WXWINE=1 + TOOLKIT=MSW + GUIDIST=MSW_DIST + fi + + if test "$wxUSE_MOTIF" = 1; then + dnl use standard macros to check for X headers/libs, this brings support + dnl for the standard configure options --x-includes and --x-libraries + AC_PATH_XTRA + + if test "$no_x" = "yes"; then + AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options) + fi + + GUI_TK_LIBRARY="$X_LIBS" + TOOLKIT_INCLUDE="$X_CFLAGS" + + AFMINSTALL=afminstall + + dnl manual check for X11 headers/libs + dnl + dnl AC_MSG_CHECKING(for X11 headers) + dnl WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, X11/Intrinsic.h) + dnl if test "$ac_find_includes" != "" ; then + dnl AC_MSG_RESULT(found $ac_find_includes) + dnl else + dnl AC_MSG_RESULT(no) + dnl AC_MSG_ERROR(please set CFLAGS to contain the location of X11/Intrinsic.h) + dnl fi + dnl + dnl AC_MSG_CHECKING(for X11 libraries) + dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB, X11) + dnl if test "$ac_find_libraries" != "" ; then + dnl WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE) + dnl WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY) + dnl + dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" + dnl TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include" + dnl AC_MSG_RESULT(found at $ac_find_libraries) + dnl else + dnl AC_MSG_RESULT(no) + dnl AC_MSG_ERROR(please set LDFLAGS to contain the location of libX11) + dnl fi + + COMPILED_X_PROGRAM=0 + + AC_MSG_CHECKING(for Motif/Lesstif headers) + WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h) + if test "$ac_find_includes" != "" ; then + AC_MSG_RESULT(found $ac_find_includes) + else AC_TRY_COMPILE( [ #include @@ -1792,142 +1960,143 @@ if test "$wxUSE_MOTIF" = 1; then ], [ AC_MSG_RESULT(no) - AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm) + AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h) ] ) fi + + if test "$COMPILED_X_PROGRAM" = 0; then + AC_MSG_CHECKING(for Motif/Lesstif library) + WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm) + if test "$ac_find_libraries" != "" ; then + WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE) + WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY) + + GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" + TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include" + AC_MSG_RESULT(found at $ac_find_libraries) + else + dnl it might happen that we found headers in one of the standard + dnl paths but the libs are elsewhere - we do need to try to + dnl compile a sample program then here + AC_TRY_COMPILE( + [ + #include + ], + [ + int version; + version = xmUseVersion; + ], + [ + AC_MSG_RESULT(found in default search path) + COMPILED_X_PROGRAM=1 + ], + [ + AC_MSG_RESULT(no) + AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h) + ] + ) + fi + fi + + dnl we don't need this as we used AC_PATH_XTRA above which does it for us + dnl + dnl dnl if we already compiled a sample program, X libs are surely there + dnl if test "$COMPILED_X_PROGRAM" = 0; then + dnl AC_MSG_CHECKING(for Xt library) + dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xt) + dnl if test "$ac_find_libraries" != "" ; then + dnl WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) + dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" + dnl AC_MSG_RESULT(found at $ac_find_libraries) + dnl else + dnl AC_TRY_COMPILE + dnl ( + dnl [ + dnl #include + dnl ], + dnl [ + dnl char *p; + dnl p = XtMalloc(5); + dnl ], + dnl [ + dnl AC_MSG_RESULT(found in default search path) + dnl COMPILED_X_PROGRAM=1 + dnl ], + dnl [ + dnl AC_MSG_RESULT(no) + dnl AC_MSG_ERROR(please set LDFLAGS to contain the location of libXt) + dnl ] + dnl ) + dnl fi + dnl fi + + XPM_LINK="" + AC_MSG_CHECKING(for Xpm library) + WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) + if test "$ac_find_libraries" != "" ; then + WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) + GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" + XPM_LINK="-lXpm " + AC_DEFINE(wxHAVE_LIB_XPM) + AC_MSG_RESULT(found at $ac_find_libraries) + else + AC_TRY_COMPILE( + [ + #include + ], + [ + int version; + + version = XpmLibraryVersion(); + ], + [ + XPM_LINK="-lXpm " + AC_DEFINE(wxHAVE_LIB_XPM) + AC_MSG_RESULT(found in default search path) + COMPILED_X_PROGRAM=0 + ], + [ + AC_MSG_RESULT(no) + AC_MSG_WARN(library will be compiled without support for images in XPM format) + ] + ) + fi + + GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXm $XPM_LINK -lXmu -lXext -lXt -lX11" + TOOLKIT=MOTIF + GUIDIST=MOTIF_DIST fi - dnl we don't need this as we used AC_PATH_XTRA above which does it for us - dnl - dnl dnl if we already compiled a sample program, X libs are surely there - dnl if test "$COMPILED_X_PROGRAM" = 0; then - dnl AC_MSG_CHECKING(for Xt library) - dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xt) - dnl if test "$ac_find_libraries" != "" ; then - dnl WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) - dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" - dnl AC_MSG_RESULT(found at $ac_find_libraries) - dnl else - dnl AC_TRY_COMPILE - dnl ( - dnl [ - dnl #include - dnl ], - dnl [ - dnl char *p; - dnl p = XtMalloc(5); - dnl ], - dnl [ - dnl AC_MSG_RESULT(found in default search path) - dnl COMPILED_X_PROGRAM=1 - dnl ], - dnl [ - dnl AC_MSG_RESULT(no) - dnl AC_MSG_ERROR(please set LDFLAGS to contain the location of libXt) - dnl ] - dnl ) - dnl fi - dnl fi + if test "$wxUSE_PM" = 1; then + TOOLKIT=PM + GUIDIST=GTK_DIST + fi - XPM_LINK="" - AC_MSG_CHECKING(for Xpm library) - WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) - if test "$ac_find_libraries" != "" ; then - WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link" - XPM_LINK="-lXpm " - AC_DEFINE(wxHAVE_LIB_XPM) - AC_MSG_RESULT(found at $ac_find_libraries) + dnl the name of the directory where the files for this toolkit live + if test "$TOOLKIT" = "PM" ; then + TOOLKIT_DIR="os2" else - AC_TRY_COMPILE( - [ - #include - ], - [ - int version; - - version = XpmLibraryVersion(); - ], - [ - XPM_LINK="-lXpm " - AC_DEFINE(wxHAVE_LIB_XPM) - AC_MSG_RESULT(found in default search path) - COMPILED_X_PROGRAM=0 - ], - [ - AC_MSG_RESULT(no) - AC_MSG_WARN(library will be compiled without support for images in XPM format) - ] - ) + TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[[A-Z]]" "[[a-z]]"` fi - GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXext -lXt -lX11" - GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK" - TOOLKIT=MOTIF - - GUIHEADERS="\$(MOTIF_HEADERS)" - GUIOBJS="\$(MOTIF_GUIOBJS)" - COMMONOBJS="\$(MOTIF_COMMONOBJS)" - GENERICOBJS="\$(MOTIF_GENERICOBJS)" - GUIDEPS="\$(MOTIF_GUIDEPS)" - COMMONDEPS="\$(MOTIF_COMMONDEPS)" - GENERICDEPS="\$(MOTIF_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" - GUIDIST=MOTIF_DIST -fi - -if test "$wxUSE_PM" = 1; then - TOOLKIT=PM - - GUIOBJS="\$(PM_GUIOBJS)" - GUIHEADERS="\$(PM_HEADERS)" - COMMONOBJS="\$(PM_COMMONOBJS)" - GENERICOBJS="\$(PM_GENERICOBJS)" - GUIDEPS="\$(PM_GUIDEPS)" - COMMONDEPS="\$(PM_COMMONDEPS)" - GENERICDEPS="\$(PM_GENERICDEPS)" - UNIXOBJS= - UNIXDEPS= - GUIDIST=GTK_DIST -fi - -dnl the name of the directory where the files for this toolkit live -if test "$TOOLKIT" != "PM" ; then - TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[[A-Z]]" "[[a-z]]"` -else - TOOLKIT_DIR="os2" -fi - - dnl the symbol which allows conditional compilation for the given toolkit - TOOLKIT_DEF="-D__WX${TOOLKIT}__" - - dnl the name of the (libtool) library - WX_LIBRARY="wx_${TOOLKIT_DIR}" - - dnl the sources, their dependenices and the headers + dnl the sources, their dependencies and the headers ALL_OBJECTS="\$(GUIOBJS) \$(COMMONOBJS) \$(GENERICOBJS) \$(UNIXOBJS) \$(HTMLOBJS) \$(OGLOBJS)" dnl ODBC objects are Unix only - if test "$TOOLKIT" != "MSW"; then - if test "$wxUSE_ODBC" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" - fi + if test "$TOOLKIT" != "MSW" -a "$wxUSE_ODBC" = "yes" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" fi - if test "$wxUSE_LIBJPEG" = "yes" ; then + if test "$wxUSE_LIBJPEG" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(JPEGOBJS)" fi - if test "$wxUSE_LIBTIFF" = "yes" ; then + if test "$wxUSE_LIBTIFF" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(TIFFOBJS)" fi - if test "$wxUSE_LIBPNG" = "yes" ; then + if test "$wxUSE_LIBPNG" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(PNGOBJS)" fi - if test "$wxUSE_ZLIB" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" - fi ALL_DEPFILES="\$(GUIDEPS) \$(COMMONDEPS) \$(GENERICDEPS) \$(UNIXDEPS) \$(HTMLDEPS) \$(OGLDEPS)" PORT_FILES="src/\$(TOOLKITDIR)/files.lst" @@ -1940,20 +2109,25 @@ fi else USE_GUI=0 + dnl this doesn't quite work right for wxBase, but the places + dnl where it is wrong aren't fatal (yet) though. TOOLKIT_DIR="base" - TOOLKIT_DEF="-D__WXBASE__" dnl the sources, their dependenices and the headers - ALL_OBJECTS="\$(BASE_OBJS) \${BASE_UNIX_OBJS}" - ALL_DEPFILES="\${BASE_DEPS} \${BASE_UNIX_DEPS}" + if test "$USE_WIN32" = 1 ; then + ALL_OBJECTS="\${BASE_OBJS} \${BASE_MSW_OBJS}" + ALL_DEPFILES="\${BASE_DEPS} \${BASE_MSW_DEPS}" + TOOLKIT_VPATH="\${top_srcdir}/src/msw" - if test "$wxUSE_ZLIB" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" + dnl yes, the toolkit for wxBase on win32 is actually MSW + dnl wxBase on unix does not need a 'TOOLKIT' defined. + TOOLKIT="MSW" + else + ALL_OBJECTS="\${BASE_OBJS} \${BASE_UNIX_OBJS}" + ALL_DEPFILES="\${BASE_DEPS} \${BASE_UNIX_DEPS}" + TOOLKIT_VPATH="\${top_srcdir}/src/unix" fi - dnl building wxBase only - WX_LIBRARY="wxbase" - PORT_FILES="src/files.lst" RPM_FILES="src/rpmfiles.lst" RPM_SPEC="wxBase.spec" @@ -1963,162 +2137,189 @@ else DISTDIR="wxBase" fi -dnl the name of the (libtool) library -WX_LIBRARY_NAME="lib${WX_LIBRARY}.la" -WX_LIBRARY_NAME_GL="lib${WX_LIBRARY}_gl.la" +dnl --------------------------------------------------------------------------- +dnl Optional libraries included when system library is not used +dnl --------------------------------------------------------------------------- +if test "$wxUSE_ZLIB" = "builtin" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" +fi + +dnl --------------------------------------------------------------------------- +dnl OpenGL libraries +dnl --------------------------------------------------------------------------- +if test "$wxUSE_OPENGL" = "yes"; then + AC_CHECK_HEADER(GL/gl.h, [ + AC_DEFINE(wxUSE_OPENGL) + AC_DEFINE(wxUSE_GLCANVAS) + AC_CHECK_LIB(GL, glFlush, [ + OPENGL_LIBS="-lGL -lGLU" + ],[ + AC_CHECK_LIB(MesaGL, glFlush, [ + OPENGL_LIBS="-lMesaGL -lMesaGLU" + ],) + ],) + ],wxUSE_OPENGL=0) +fi + +if test -z "$TOOLKIT_VPATH" ; then + TOOLKIT_VPATH="\${top_srcdir}/src/${TOOLKIT_DIR}" +fi + +dnl the symbol which allows conditional compilation for the given toolkit +if test -n "$TOOLKIT" ; then + TOOLCHAIN_DEFS="-D__WX${TOOLKIT}__" +fi + +dnl the base name of the library and wxXXX-config files +TOOLCHAIN_NAME="${TOOLKIT_DIR}" + +if test "$wxUSE_DEBUG_FLAG" = "yes"; then + TOOLCHAIN_NAME="${TOOLCHAIN_NAME}d" +fi + +TOOLCHAIN_NAME="${TOOLCHAIN_NAME}-${WX_RELEASE}" + +if test "$cross_compiling" = "yes"; then + TOOLCHAIN_NAME="${TOOLCHAIN_NAME}-${host_alias}" +fi + + +dnl library link name. +WX_LIBRARY="wx_${TOOLCHAIN_NAME}" + +dnl kludge for separate opengl lib created by wxGTK. +if test "$wxUSE_DEBUG_FLAG" = "yes"; then + WX_LIBRARY_GL="wx_${TOOLKIT_DIR}d_gl-${WX_RELEASE}" +else + WX_LIBRARY_GL="wx_${TOOLKIT_DIR}_gl-${WX_RELEASE}" +fi + +dnl define which libs wx-config should link. +WXCONFIG_LIBS="-l${WX_LIBRARY}" + +if test "$wxUSE_OPENGL" = "yes"; then + WXCONFIG_LIBS_GL="-l${WX_LIBRARY_GL} $OPENGL_LIBS" +fi dnl the name of the static library WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a" -WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a" +WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY_GL}.a" dnl the name of the shared library -WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" -WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" +WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" +WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" dnl the name of the links to the shared library -WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}" -WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.so" -WX_LIBRARY_LINK3="lib${WX_LIBRARY}.so" -WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}" -WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so" -WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.so" +WX_LIBRARY_LINK1="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}" +WX_LIBRARY_LINK2="lib${WX_LIBRARY}.${SO_SUFFIX}" +WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}" +WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}" -dnl shared library settings -SHARED_LD= -PIC_FLAG= -WX_ALL= -WX_ALL_INSTALLED= -BURNT_LIBRARY_NAME= dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP --- if test "$wxUSE_SHARED" = "yes"; then + + dnl install targets + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1} \$(build_libdir)/${WX_LIBRARY_LINK1_GL}" + else + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1}" + fi + + dnl the extra compiler flags needed for compilation of shared library + if test "$GCC" = "yes"; then + dnl the switch for gcc is the same under all platforms + PIC_FLAG="-fPIC" + fi + + dnl the command to use for creating the shared library + SHARED_LD="${CXX} -shared -o" + case "${host}" in *-hp-hpux* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -fPIC -o" - PIC_FLAG="-fPIC" - else + if test "$GCC" != "yes" ; then + dnl no idea why it wants it, but it does + LDFLAGS="$LDFLAGS -L/usr/lib" + SHARED_LD="${CXX} -b -o" PIC_FLAG="+Z" fi - WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl" - WX_LIBRARY_NAME_SHARED_GL="libwx_${TOOLKIT_DIR}_gl.sl" if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}" + WX_ALL_INSTALLED="preinstall_gl" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" else - WX_ALL="${WX_LIBRARY_NAME_SHARED}" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" fi ;; dnl in fact, these settings are for any platform using gcc *-*-linux* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - if test "$wxUSE_BURNT_NAME" = "yes" ; then - BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}" - BURNT_LIBRARY_NAME_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}" - fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - fi - ;; - *-*-irix5* | *-*-irix6* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - else - SHARED_LD="${CXX} -shared -o" - fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + if test "$wxUSE_SONAME" = "yes" ; then + SONAME_FLAGS="-Wl,-soname,${WX_LIBRARY_LINK1}" + SONAME_FLAGS_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}" + dnl substitute this in makelib.env for the contrib libs + WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)" fi ;; *-*-solaris2* ) if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" + dnl newer versions of gcc need -isystem to compile X headers on + dnl Solaris (which use old style C syntax) + CPPFLAGS="$CPPFLAGS -isystem /usr/openwin/include" else SHARED_LD="${CXX} -G -o" PIC_FLAG="-KPIC" - fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + SONAME_FLAGS="-h ${WX_LIBRARY_NAME_SHARED}" + SONAME_FLAGS_GL="-h ${WX_LIBRARY_NAME_SHARED}" fi ;; - *-*-sunos4* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-freebsd* | *-*-netbsd*) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-osf* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-dgux5* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \ + *-*-sunos4* | \ + *-*-irix5* | *-*-irix6* | \ + *-*-osf* | \ + *-*-dgux5* | \ *-*-sysv5* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + dnl defaults are ok + ;; + *-*-darwin* ) + CFLAGS="$CFLAGS -fno-common" + CXXFLAGS="$CXXFLAGS -fno-common" + SHARED_LD="$CXX -dynamiclib -o" + PIC_FLAG="-dynamic -fPIC" ;; *-*-aix* ) SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o" - WX_ALL=${WX_LIBRARY_NAME_SHARED} ;; - *-*-cygwin32* ) - dnl only static for now - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" + *-*-cygwin* | *-*-mingw32* ) + SHARED_LD="${CC} -shared -Wl,--out-implib,lib/${WX_LIBRARY_NAME_STATIC} -o" + TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -DWXUSINGDLL=1" + WXMSW_DLL_DEFINES="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1" + + dnl install shared libs without symlinks + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="preinstall_gl" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" + else + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" + fi + dnl -fPIC is not required for mingw build -- all code is already + dnl position independent + PIC_FLAG= ;; - *-*-mingw32* ) + *-pc-os2_emx | *-pc-os2-emx ) dnl only static for now - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" - ;; - *-pc-os2_emx ) - dnl only static for now - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" + wxUSE_SHARED=no ;; *-*-beos* ) dnl can't use gcc under BeOS for shared library creation because it dnl complains about missing 'main' SHARED_LD="${LD} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" ;; *) - AC_MSG_ERROR(unknown system type ${host}.) + AC_MSG_ERROR(unknown system type $host.) esac dnl set target to shared if not explicitly chose static before @@ -2126,13 +2327,30 @@ if test "$wxUSE_SHARED" = "yes"; then WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}" WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}" fi + dnl do not alter the LIBRARY_TYPE strings "so" and "a", they are magic WX_TARGET_LIBRARY_TYPE="so" -else - dnl set target to static +fi + +dnl do not 'else' this, it may be changed in the above conditional. +if test "$wxUSE_SHARED" = "no"; then + + dnl give static wxBase and wxMSW build a working install target + if test "$wxUSE_GUI" = "no" -o "$USE_WIN32" = 1 ; then + dnl we're here because WX_ALL_INSTALLED is empty, but play safe anyway + WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall" + fi + + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall_gl" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_STATIC} \$(build_libdir)/${WX_LIBRARY_NAME_STATIC_GL}" + else + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_STATIC}" + fi + WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}" - WX_ALL="${WX_LIBRARY_NAME_STATIC}" + WX_TARGET_LIBRARY_TYPE="a" fi @@ -2173,6 +2391,56 @@ AC_TYPE_SIZE_T dnl defines uid_t and gid_t if not already defined AC_TYPE_UID_T +dnl check what exactly size_t is on this machine - this is necessary to avoid +dnl ambiguos overloads in several places, notably wx/string.h and wx/array.h +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_CACHE_CHECK([if size_t is unsigned int], + wx_cv_size_t_is_uint, + dnl an obvious check like AC_TRY_COMPILE[struct Foo { ... };] doesn't work + dnl with egcs (at least) up to 1.1.1 as it allows you to compile duplicate + dnl methods in a local class (i.e. class inside a function) declaration + dnl without any objections!! + dnl + dnl hence the hack below: we must have Foo at global scope! + AC_TRY_COMPILE([#include ], + [ + return 0; } + + struct Foo { void foo(size_t); void foo(unsigned int); }; + + int bar() { + ], + wx_cv_size_t_is_uint=no, + wx_cv_size_t_is_uint=yes + ) +) + +if test "$wx_cv_size_t_is_uint" = "yes"; then + AC_DEFINE(wxSIZE_T_IS_UINT) +else + AC_CACHE_CHECK([if size_t is unsigned long], + wx_cv_size_t_is_ulong, + AC_TRY_COMPILE([#include ], + [ + return 0; } + + struct Foo { void foo(size_t); void foo(unsigned long); }; + + int bar() { + ], + wx_cv_size_t_is_ulong=no, + wx_cv_size_t_is_ulong=yes + ) + ) + + if test "$wx_cv_size_t_is_ulong" = "yes"; then + AC_DEFINE(wxSIZE_T_IS_ULONG) + fi +fi + +AC_LANG_RESTORE + dnl --------------------------------------------------------------------------- dnl Checks for structures dnl --------------------------------------------------------------------------- @@ -2238,7 +2506,7 @@ dnl --------------------------------------------------------------------------- dnl check for wcslen AC_CHECK_LIB(c, wcslen, [ AC_DEFINE(HAVE_WCSLEN) - WCHAR_LINK="" + WCHAR_LINK= ], [ AC_CHECK_LIB(w, wcslen, [ AC_DEFINE(HAVE_WCSLEN) @@ -2249,53 +2517,118 @@ AC_CHECK_LIB(c, wcslen, [ dnl check for vprintf/vsprintf() which are GNU extensions AC_FUNC_VPRINTF -dnl check for vsnprintf() - a safe version of vsprintf() -AC_CHECK_FUNCS(vsnprintf, - AC_DEFINE(HAVE_VSNPRINTF), - AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf) - ) - -dnl check for vsscanf() - on some platforms (Linux, glibc 2.1.1) it's -dnl available in the library but the prototype is missing, so we can't use -dnl AC_CHECK_FUNCS here, do it manually AC_LANG_SAVE AC_LANG_CPLUSPLUS +dnl check for vsscanf() and vsnprintf() - on some platforms (Linux, glibc +dnl 2.1.1 for the first one, HP-UX for the second) it's available in the +dnl library but the prototype is missing, so we can't use AC_CHECK_FUNCS here, +dnl do it manually + +dnl we use AC_TRY_COMPILE() here instead of AC_TRY_RUN() to make the checks +dnl work for cross-compilation, but AC_TRY_COMPILE() normally only compiles +dnl one function while we need at least 2 - hence the ugly hack below. To +dnl understand why it works, remember that AC_TRY_COMPILE() just prepends +dnl "int main() {" in the beginning of the code and "; return 0; }" at the +dnl end... + +dnl if we fail to find vsnprintf, also try for _vsnprintf as that is what +dnl we'll find under MSW if it exists. + +dnl final note: AC_TRY_COMPILE will only be executed if there is nothing in +dnl the cache so we have to do AC_DEFINE(HAVE_VSNPRINTF) below and not inside +dnl it or the symbol wouldn't be defined for the 2nd and subsequent configure +dnl runs + +dnl check for vsnprintf() - a safe version of vsprintf() +AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf, +[ + AC_TRY_COMPILE([ + #include + #include + ], [ + int wx_test_vsnprintf(const char *, ...); + + wx_test_vsnprintf("%s"); + return 0; + } + + int wx_test_vsnprintf(const char *fmt, ...) + { + char *s; + + va_list argp; + va_start(argp, fmt); + vsnprintf(s, 42, fmt, argp); + va_end(argp); + ], [ + wx_cv_func_vsnprintf=yes + ], [ + AC_TRY_COMPILE([ + #include + #include + ], [ + int wx_test_vsnprintf(const char *, ...); + + wx_test_vsnprintf("%s"); + return 0; + } + + int wx_test_vsnprintf(const char *fmt, ...) + { + char *s; + + va_list argp; + va_start(argp, fmt); + _vsnprintf(s, 42, fmt, argp); + va_end(argp); + ], [ + wx_cv_func_vsnprintf=yes + ], [ + wx_cv_func_vsnprintf=no + ]) + ]) +]) + +if test "$wx_cv_func_vsnprintf" = yes; then + AC_DEFINE(HAVE_VSNPRINTF) +else + AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf) +fi + +dnl check for vsscanf() AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf, [ - AC_TRY_RUN( - [ - #include - #include + AC_TRY_COMPILE([ + #include + #include + ], [ + int wx_test_vsscanf(const char *, ...); - int try_vsscanf(const char *format, ...) - { - va_list ap; - va_start(ap, format); - - vsscanf("17", format, ap); - - va_end(ap); + wx_test_vsscanf("%d"); + return 0; } - int main() + int wx_test_vsscanf(const char *fmt, ...) { - int i; - try_vsscanf("%d", &i); - return i == 17 ? 0 : 1; - } - ], [ - AC_DEFINE(HAVE_VSSCANF) - wx_cv_func_vsscanf=yes - ], - wx_cv_func_vsscanf=no, - wx_cv_func_vsscanf=no - ) + va_list argp; + va_start(argp, fmt); + vsscanf("42", fmt, argp); + va_end(argp); + ], [ + wx_cv_func_vsscanf=yes + ], [ + wx_cv_func_vsscanf=no + ]) ]) +if test "$wx_cv_func_vsscanf" = yes; then + AC_DEFINE(HAVE_VSSCANF) +fi + AC_LANG_RESTORE -dnl under MSW we always have Sleep() +dnl the following tests are for Unix(like) systems only if test "$TOOLKIT" != "MSW"; then dnl check for POSIX signals if we need them @@ -2306,6 +2639,30 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called]) wxUSE_ON_FATAL_EXCEPTION=no fi + + if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler, + [ + AC_TRY_COMPILE([#include ], + [ + extern void testSigHandler(int); + + struct sigaction sa; + sa.sa_handler = testSigHandler; + ], [ + wx_cv_type_sa_handler=int + ], [ + wx_cv_type_sa_handler=void + ]) + ]) + + AC_LANG_RESTORE + + AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler) + fi fi dnl check for vfork() (even if it's the same as fork() in modern Unices) @@ -2398,116 +2755,140 @@ dnl --------------------------------------------------------------------------- dnl under MSW we always have thread support if test "$TOOLKIT" != "MSW"; then -dnl the code below: -dnl defines THREADS_OBJ which contains the object files to build -dnl defines THREADS_LINK which contains the thread library to link with -dnl defines wxUSE_THREADS=1 if thread support is activated + dnl the code below: + dnl defines THREADS_OBJ which contains the object files to build + dnl defines THREADS_LINK which contains the thread library to link with + dnl defines wxUSE_THREADS=1 if thread support is activated -THREADS_LINK="" -THREADS_OBJ="" + THREADS_LINK= + THREADS_OBJ= + CODE_GEN_FLAGS= + CODE_GEN_FLAGS_CXX= -if test "$wxUSE_THREADS" = "yes" ; then - if test "$wxUSE_WINE" = 1 ; then - AC_MSG_WARN([Threads are not supported under WINE]) - wxUSE_THREADS="no" - elif test "$USE_BEOS" = 1; then - AC_MSG_WARN([BeOS threads are not yet supported]) - wxUSE_THREADS="no" + if test "$wxUSE_THREADS" = "yes" ; then + if test "$wxUSE_WINE" = 1 ; then + AC_MSG_WARN([Threads are not supported under WINE]) + wxUSE_THREADS="no" + elif test "$USE_BEOS" = 1; then + AC_MSG_WARN([BeOS threads are not yet supported]) + wxUSE_THREADS="no" + fi fi -fi -if test "$wxUSE_THREADS" = "yes" ; then - dnl find if POSIX threads are available + if test "$wxUSE_THREADS" = "yes" ; then + dnl find if POSIX threads are available - dnl standard lib name is pthread - dnl We no longer test for pthread-0.7 as it breaks compilation on some - dnl glibc2 systems, especially for static linkage. - AC_CHECK_LIB(pthread, pthread_create, [ - THREADS_OBJ="threadpsx.lo" - THREADS_LINK="pthread" - ], [ - dnl thread functions are in libc_r under FreeBSD - AC_CHECK_LIB(c_r, pthread_create, [ + dnl AIX calls the library libpthreads - thanks IBM! + if test "$USE_AIX" = 1; then + THREADS_LIB=pthreads + else + THREADS_LIB=pthread + fi + + dnl standard lib name is pthread + dnl We no longer test for pthread-0.7 as it breaks compilation on some + dnl glibc2 systems, especially for static linkage. + AC_CHECK_LIB($THREADS_LIB, pthread_create, [ THREADS_OBJ="threadpsx.lo" - THREADS_LINK="c_r" + THREADS_LINK=$THREADS_LIB ], [ - dnl VZ: SGI threads are not supported currently - AC_CHECK_HEADER(sys/prctl.h, [ - THREADS_OBJ="threadsgi.lo" + dnl thread functions are in libc_r under FreeBSD + AC_CHECK_LIB(c_r, pthread_create, [ + THREADS_OBJ="threadpsx.lo" + THREADS_LINK="c_r" + ], [ + dnl VZ: SGI threads are not supported currently + AC_CHECK_HEADER(sys/prctl.h, [ + THREADS_OBJ="threadsgi.lo" + ]) ]) ]) - ]) - if test -z "$THREADS_OBJ" ; then - wxUSE_THREADS=no - AC_MSG_WARN(No thread support on this system) + if test -z "$THREADS_OBJ" ; then + wxUSE_THREADS=no + AC_MSG_WARN(No thread support on this system) + fi fi -fi -dnl do other tests only if we are using threads -if test "$wxUSE_THREADS" = "yes" ; then - AC_CHECK_FUNCS(thr_setconcurrency) + dnl do other tests only if we are using threads + if test "$wxUSE_THREADS" = "yes" ; then + AC_CHECK_FUNCS(thr_setconcurrency) - dnl define autoconf macro to check for given function in both pthread and - dnl posix4 libraries - dnl usage: AC_FUNC_THREAD(FUNCTION_NAME) - dnl VZ: TODO - dnl AC_DEFUN(AC_FUNC_THREAD, - dnl [ - dnl AC_CHECK_LIB($THREADS_LINK, $1, - dnl AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z'), - dnl [AC_CHECK_LIB("posix4", $1, - dnl [AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z')) - dnl POSIX4_LINK="-lposix4" - dnl ]) - dnl ]) - dnl ]) + dnl define autoconf macro to check for given function in both pthread and + dnl posix4 libraries + dnl usage: AC_FUNC_THREAD(FUNCTION_NAME) + dnl VZ: TODO + dnl AC_DEFUN(AC_FUNC_THREAD, + dnl [ + dnl AC_CHECK_LIB($THREADS_LINK, $1, + dnl AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z'), + dnl [AC_CHECK_LIB([posix4], $1, + dnl [AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z')) + dnl POSIX4_LINK="-lposix4" + dnl ]) + dnl ]) + dnl ]) - AC_CHECK_HEADERS(sched.h) + AC_CHECK_HEADERS(sched.h) - AC_CHECK_LIB($THREADS_LINK, sched_yield, - AC_DEFINE(HAVE_SCHED_YIELD), - [AC_CHECK_LIB("posix4", sched_yield, - [AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK="-lposix4"], - AC_MSG_WARN(wxThread::Yield will not work properly) - )] - ) + AC_CHECK_LIB($THREADS_LINK, sched_yield, + AC_DEFINE(HAVE_SCHED_YIELD), + [AC_CHECK_LIB([posix4], sched_yield, + [AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK="-lposix4"], + AC_MSG_WARN(wxThread::Yield will not work properly) + )] + ) - dnl VZ: we should be checking for all of the following functions instead: - dnl 1. pthread_attr_getschedpolicy - dnl 2. sched_get_priority_min and sched_get_priority_max - dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam - dnl but it seems that if the first one is there, the other ones are too (of - dnl course the proper solution would be to implement AC_FUNC_THREAD above - dnl and do test for them all - anyone?) - AC_CHECK_LIB($THREADS_LINK, pthread_attr_getschedpolicy, - AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS), - [AC_CHECK_LIB("posix4", pthread_attr_getschedpolicy, - [AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS) POSIX4_LINK="-lposix4"], - AC_MSG_WARN(Setting thread priority will not work) - )] - ) + dnl to be able to set the thread priority, we need to have all of the + dnl following functions: + dnl 1. pthread_attr_getschedpolicy + dnl 2. sched_get_priority_min and sched_get_priority_max + dnl (this one can be in either libpthread or libposix4 (under Solaris)) + dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam + HAVE_PRIOR_FUNCS=0 + AC_CHECK_LIB($THREADS_LINK, pthread_attr_getschedpolicy, + AC_CHECK_LIB($THREADS_LINK, pthread_attr_setschedparam, + AC_CHECK_LIB($THREADS_LINK, sched_get_priority_max, + HAVE_PRIOR_FUNCS=1, + AC_CHECK_LIB([posix4], sched_get_priority_max, + [ + HAVE_PRIOR_FUNCS=1 + POSIX4_LINK="-lposix4" + ], + ) + ) + ) + ) - AC_CHECK_LIB($THREADS_LINK, pthread_cancel, - AC_DEFINE(HAVE_PTHREAD_CANCEL), - AC_MSG_WARN([wxThread::Kill() will not work properly])) + if test "$HAVE_PRIOR_FUNCS" = 1; then + AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS) + else + AC_MSG_WARN(Setting thread priority will not work) + fi - AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup_push, - [ - AC_TRY_COMPILE([#include ], - [ - pthread_cleanup_push(NULL, NULL); - pthread_cleanup_pop(0); - ], [ - wx_cv_func_pthread_cleanup_push=yes - AC_DEFINE(HAVE_THREAD_CLEANUP_FUNCTIONS) - ], [ - wx_cv_func_pthread_cleanup_push=no - ]) - ]) + AC_CHECK_LIB($THREADS_LINK, pthread_cancel, + AC_DEFINE(HAVE_PTHREAD_CANCEL), + AC_MSG_WARN([wxThread::Kill() will not work properly])) - THREADS_LINK="-l$THREADS_LINK" -fi + AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup_push, + [ + AC_TRY_COMPILE([#include ], + [ + pthread_cleanup_push(NULL, NULL); + pthread_cleanup_pop(0); + ], [ + wx_cv_func_pthread_cleanup_push=yes + ], [ + wx_cv_func_pthread_cleanup_push=no + ]) + ]) + + if test "$wx_cv_func_pthread_cleanup_push" = "yes"; then + AC_DEFINE(HAVE_THREAD_CLEANUP_FUNCTIONS) + fi + + THREADS_LINK="-l$THREADS_LINK" + fi dnl from if !MSW fi @@ -2516,8 +2897,7 @@ if test "$wxUSE_THREADS" = "yes"; then AC_DEFINE(wxUSE_THREADS) dnl must define _REENTRANT for multithreaded code - CFLAGS="${CFLAGS} -D_REENTRANT" - CXXFLAGS="${CXXFLAGS} -D_REENTRANT" + CODE_GEN_FLAGS="$CODE_GEN_FLAGS -D_REENTRANT" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread" else @@ -2526,8 +2906,7 @@ else if test "$ac_cv_func_strtok_r" = "yes"; then AC_MSG_CHECKING(if -D_REENTRANT is needed) if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then - CFLAGS="${CFLAGS} -D_REENTRANT" - CXXFLAGS="${CXXFLAGS} -D_REENTRANT" + CODE_GEN_FLAGS="${CODE_GEN_FLAGS} -D_REENTRANT" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -2544,12 +2923,16 @@ if test "$WXGTK12" = 1 ; then AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12) fi +if test "$WXGTK127" = 1 ; then + AC_DEFINE_UNQUOTED(__WXGTK127__,$WXGTK127) +fi + if test "$WXWINE" = 1 ; then - TOOLKIT_DEF="${TOOLKIT_DEF} -D__WXWINE__" + TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXWINE__" fi if test "$wxUSE_CYGWIN" = 1 ; then - TOOLKIT_DEF="${TOOLKIT_DEF} -D__WIN95__" + TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WIN95__" fi WXDEBUG= @@ -2589,20 +2972,25 @@ if test "$wxUSE_PROFILE" = "yes" ; then PROFILE="-pg" fi -DEP_INFO_FLAGS= -CODE_GEN_FLAGS= if test "$GCC" = yes ; then if test "$wxUSE_NO_RTTI" = "yes" ; then - CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-rtti" + CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-rtti" fi if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then - CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-exceptions" + CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-exceptions" fi if test "$wxUSE_PERMISSIVE" = "yes" ; then - CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive" + CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive" fi if test "$wxUSE_NO_DEPS" = "no" ; then - DEP_INFO_FLAGS="-MMD" + CFLAGS="-MMD $CFLAGS" + CXXFLAGS="-MMD $CXXFLAGS" + fi + if test "$USE_WIN32" = 1 ; then + # I'm not even really sure what this was ever added to solve, + # but someone added it for mingw native builds, so I guess + # they had a reason, right?? + CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-pcc-struct-return" fi fi @@ -2624,97 +3012,6 @@ else fi fi -dnl --------------------------------------------------------------------------- -dnl Optional libraries -dnl --------------------------------------------------------------------------- - -ZLIB_INCLUDE= -if test "$wxUSE_ZLIB" = "yes" -o "$wxUSE_ZLIB" = "sys" ; then - AC_DEFINE(wxUSE_ZLIB) - if test "$wxUSE_ZLIB" = "yes" ; then - ZLIB_INCLUDE="-I\${top_srcdir}/src/zlib" - else - ZLIB_LINK= - AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, deflate, ZLIB_LINK="-lz")) - if test "x$ZLIB_LINK" = "x" ; then - AC_MSG_ERROR(system zlib compression library not found! Use --with-zlib=yes to use built-in zlib) - fi - fi -fi - -PNG_INCLUDE= -if test "$wxUSE_LIBPNG" = "yes" -o "$wxUSE_LIBPNG" = "sys" ; then - AC_DEFINE(wxUSE_LIBPNG) - dnl for the check below to have a chance to succeed, we must already have - dnl libz somewhere - if test "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then - AC_MSG_WARN([--with-libpng=sys doesn't work without --with-zlib=sys, will compile the built-in libpng instead]) - wxUSE_LIBPNG=yes - fi - - if test "$wxUSE_LIBPNG" = "yes" ; then - PNG_INCLUDE="-I\${top_srcdir}/src/png" - else - PNG_LINK= - AC_CHECK_HEADER(png.h, - AC_CHECK_LIB(png, png_check_sig, - PNG_LINK="-lpng", - , - [-lz -lm]) - ) - if test "x$PNG_LINK" = "x" ; then - AC_MSG_ERROR(system png library not found! Use --with-libpng=yes to use the built-in libpng) - fi - fi - - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png" -fi - -JPEG_INCLUDE= -if test "$wxUSE_LIBJPEG" = "yes" -o "$wxUSE_LIBJPEG" = "sys" ; then - AC_DEFINE(wxUSE_LIBJPEG) - if test "$wxUSE_LIBJPEG" = "yes" ; then - JPEG_INCLUDE="-I\${top_srcdir}/src/jpeg" - else - JPEG_LINK= - AC_CHECK_HEADER(jpeglib.h, AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK="-ljpeg")) - if test "x$JPEG_LINK" = "x" ; then - AC_MSG_ERROR(system jpeg library not found! Use --with-libjpeg=yes to use the built-in one) - fi - fi -fi - -TIFF_INCLUDE= -if test "$wxUSE_LIBTIFF" = "yes" -o "$wxUSE_LIBTIFF" = "sys" ; then - AC_DEFINE(wxUSE_LIBTIFF) - if test "$wxUSE_LIBTIFF" = "yes" ; then - TIFF_INCLUDE="-I\${top_srcdir}/src/tiff" - else - TIFF_LINK= - AC_CHECK_HEADER(tiffio.h, AC_CHECK_LIB(tiff, TIFFError, - TIFF_LINK="-ltiff", - , - -lm)) - if test "x$TIFF_LINK" = "x" ; then - AC_MSG_ERROR(system tiff library not found! Use --with-libtiff=yes to use the built-in one) - fi - fi -fi - -if test "$wxUSE_OPENGL" = "yes"; then - AC_CHECK_HEADER(GL/gl.h, [ - AC_DEFINE(wxUSE_OPENGL) - AC_DEFINE(wxUSE_GLCANVAS) - AC_CHECK_LIB(GL, glFlush, [ - OPENGL_LINK="-lGL" - ],[ - AC_CHECK_LIB(MesaGL, glFlush, [ - OPENGL_LINK="-lMesaGL" - ],) - ],) - ],wxUSE_OPENGL=0) -fi - dnl --------------------------------------------------------------------------- dnl the library may be built without GUI classes at all dnl --------------------------------------------------------------------------- @@ -2812,6 +3109,7 @@ if test "$wxUSE_INTL" = "yes" ; then else AC_DEFINE(wxUSE_INTL) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat" + GUIDIST="$GUIDIST INTL_DIST" fi fi @@ -2912,13 +3210,16 @@ if test "$wxUSE_TIMEDATE" = "yes"; then ], [ wx_cv_struct_tm_has_gmtoff=yes - AC_DEFINE(WX_GMTOFF_IN_TM) ], wx_cv_struct_tm_has_gmtoff=no ) ]) fi + if test "$wx_cv_struct_tm_has_gmtoff" = "yes"; then + AC_DEFINE(WX_GMTOFF_IN_TM) + fi + dnl check for gettimeofday (SVr4, BSD 4.3) and ftime (V7, BSD 4.3) for the dnl function to be used for high resolution timers AC_CHECK_FUNCS(gettimeofday ftime, break) @@ -2974,80 +3275,83 @@ dnl ------------------------------------------------------------------------ dnl under MSW we always have sockets if test "$TOOLKIT" != "MSW"; then -if test "$wxUSE_SOCKETS" = "yes"; then - dnl under Solaris, socket functions live in -lsocket - AC_CHECK_FUNC(socket,, - AC_CHECK_LIB(socket, socket, - INET_LINK="$INET_LINK -lsocket", - [ - AC_MSG_WARN([socket library not found - sockets will be disabled]) - wxUSE_SOCKETS=no - ] + if test "$wxUSE_SOCKETS" = "yes"; then + dnl under Solaris, socket functions live in -lsocket + AC_CHECK_FUNC(socket,, + AC_CHECK_LIB(socket, socket, + INET_LINK="$INET_LINK -lsocket", + [ + AC_MSG_WARN([socket library not found - sockets will be disabled]) + wxUSE_SOCKETS=no + ] + ) ) - ) -fi + fi -fi -dnl if !MSW + dnl this test may be appropriate if building under cygwin + dnl right now I'm assuming it also uses the winsock stuff + dnl like mingw does.. -- RL -if test "$wxUSE_SOCKETS" = "yes" ; then - dnl determine the type of third argument for getsockname - AC_CACHE_CHECK([what is the type of the third argument of getsockname], - wx_cv_type_getsockname3, - [ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + if test "$wxUSE_SOCKETS" = "yes" ; then + dnl determine the type of third argument for getsockname + AC_CACHE_CHECK([what is the type of the third argument of getsockname], + wx_cv_type_getsockname3, + [ + AC_LANG_SAVE + AC_LANG_CPLUSPLUS - AC_TRY_COMPILE( - [ - #include - #include - ], - [ - socklen_t len; - getsockname(0, 0, &len); - ], - wx_cv_type_getsockname3=socklen_t, AC_TRY_COMPILE( [ #include #include ], [ - size_t len; + socklen_t len; getsockname(0, 0, &len); ], - wx_cv_type_getsockname3=size_t, + wx_cv_type_getsockname3=socklen_t, AC_TRY_COMPILE( [ #include #include ], [ - int len; + size_t len; getsockname(0, 0, &len); ], - wx_cv_type_getsockname3=int, - wx_cv_type_getsockname3=unknown + wx_cv_type_getsockname3=size_t, + AC_TRY_COMPILE( + [ + #include + #include + ], + [ + int len; + getsockname(0, 0, &len); + ], + wx_cv_type_getsockname3=int, + wx_cv_type_getsockname3=unknown + ) ) ) - ) - AC_LANG_RESTORE - ]) + AC_LANG_RESTORE + ]) - if test "$wx_cv_type_getsockname3" = "unknown"; then - wxUSE_SOCKETS=no - AC_MSG_WARN([Couldn't find socklen_t synonym for this system]) - else - AC_DEFINE_UNQUOTED(SOCKLEN_T, $wx_cv_type_getsockname3) + if test "$wx_cv_type_getsockname3" = "unknown"; then + wxUSE_SOCKETS=no + AC_MSG_WARN([Couldn't find socklen_t synonym for this system]) + else + AC_DEFINE_UNQUOTED(SOCKLEN_T, $wx_cv_type_getsockname3) + fi fi + fi +dnl if !MSW if test "$wxUSE_SOCKETS" = "yes" ; then AC_DEFINE(wxUSE_SOCKETS) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS protocol" fi dnl --------------------------------------------------------------------------- @@ -3056,25 +3360,25 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_GUI" = "yes"; then -dnl under MSW we always have joystick support -if test "$TOOLKIT" != "MSW"; then + dnl under MSW we always have joystick support + if test "$TOOLKIT" != "MSW"; then -if test "$wxUSE_JOYSTICK" = "yes"; then - dnl joystick support is only for Linux 2.1.x or greater - AC_CHECK_HEADERS(linux/joystick.h) - if test "$ac_cv_header_linux_joystick_h" != "yes"; then - wxUSE_JOYSTICK=no - AC_MSG_WARN(Joystick not supported by this system, disabled) - fi -fi + if test "$wxUSE_JOYSTICK" = "yes"; then + dnl joystick support is only for Linux 2.1.x or greater + AC_CHECK_HEADERS(linux/joystick.h) + if test "$ac_cv_header_linux_joystick_h" != "yes"; then + wxUSE_JOYSTICK=no + AC_MSG_WARN(Joystick not supported by this system, disabled) + fi + fi -fi -dnl if !MSW + fi + dnl if !MSW -if test "$wxUSE_JOYSTICK" = "yes"; then - AC_DEFINE(wxUSE_JOYSTICK) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" -fi + if test "$wxUSE_JOYSTICK" = "yes"; then + AC_DEFINE(wxUSE_JOYSTICK) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" + fi fi dnl if wxUSE_GUI @@ -3086,44 +3390,58 @@ dnl ------------------------------------------------------------------------ dnl under MSW we always have LoadLibrary/GetProcAddress if test "$TOOLKIT" != "MSW"; then -HAVE_DL_FUNCS=0 -HAVE_SHL_FUNCS=0 -if test "$wxUSE_DYNLIB_CLASS" = "yes"; then - dnl the test is a bit complicated because we check for dlopen() both with - dnl and without -ldl and we also try to find shl_load() if there is no - dnl dlopen() on this system - AC_CHECK_FUNCS(dlopen, - [ - AC_DEFINE(HAVE_DLOPEN) - HAVE_DL_FUNCS=1 - ], - [ - AC_CHECK_LIB(dl, dlopen, - [ - AC_DEFINE(HAVE_DLOPEN) - HAVE_DL_FUNCS=1 - LIBS="$LIBS -ldl" - ], - [ - AC_CHECK_FUNCS(shl_load, - [ - AC_DEFINE(HAVE_SHL_LOAD) - HAVE_SHL_FUNCS=1 - ]) - ]) - ]) + HAVE_DL_FUNCS=0 + HAVE_SHL_FUNCS=0 + if test "$wxUSE_DYNLIB_CLASS" = "yes"; then + dnl the test is a bit complicated because we check for dlopen() both with + dnl and without -ldl and we also try to find shl_load() if there is no + dnl dlopen() on this system + AC_CHECK_FUNCS(dlopen, + [ + AC_DEFINE(HAVE_DLOPEN) + HAVE_DL_FUNCS=1 + ], + [ + AC_CHECK_LIB(dl, dlopen, + [ + AC_DEFINE(HAVE_DLOPEN) + HAVE_DL_FUNCS=1 + LIBS="$LIBS -ldl" + ], + [ + AC_CHECK_FUNCS(shl_load, + [ + AC_DEFINE(HAVE_SHL_LOAD) + HAVE_SHL_FUNCS=1 + ], + [ + AC_CHECK_LIB(shl_load, dld, + [ + HAVE_SHL_FUNCS=1 + LIBS="$LIBS -ldld" + ]) + ]) + ]) + ]) - if test "$HAVE_DL_FUNCS" = 0; then - if test "$HAVE_SHL_FUNCS" = 0; then - if test "$USE_UNIX" = 1; then - AC_MSG_WARN([Missing dynamic loading support, several features will be disabled]) - wxUSE_DYNLIB_CLASS=no - else - AC_MSG_WARN([Assuming wxLibrary class works on this platform]) - fi + dnl check also for dlerror() + if test "$HAVE_DL_FUNCS" = 1; then + AC_CHECK_FUNCS(dlerror, + AC_DEFINE(HAVE_DLERROR), + AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))) + fi + + if test "$HAVE_DL_FUNCS" = 0; then + if test "$HAVE_SHL_FUNCS" = 0; then + if test "$USE_UNIX" = 1; then + AC_MSG_WARN([Missing dynamic loading support, several features will be disabled]) + wxUSE_DYNLIB_CLASS=no + else + AC_MSG_WARN([Assuming wxLibrary class works on this platform]) + fi + fi fi fi -fi fi dnl if !MSW @@ -3168,9 +3486,6 @@ if test "$wxUSE_ODBC" = "yes" ; then AC_DEFINE(wxUSE_ODBC) WXODBCFLAG="-D_IODBC_" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db" - IODBCOBJS="\$(IODBC_OBJS)" -else - IODBCOBJS= fi dnl ---------------------------------------------------------------- @@ -3270,8 +3585,28 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then if test "$USE_WIN32" = 1; then dnl check for ole headers and disable DnD if not present (earlier dnl versions of mingw32 don't have them) + AC_CHECK_HEADERS(ole2.h) - if test "x$HAVE_OLE2_H" = x ; then + + dnl for some reason this test always fails here?? + dnl if test "x$HAVE_OLE2_H" != x ; then + dnl this one does the right thing though + if test "$ac_cv_header_ole2_h" = "yes" ; then + if test "$GCC" = yes ; then + ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)" + ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)" + CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks" + LIBS="$LIBS -lole32 -luuid -lrpcrt4 -loleaut32" + + dnl metafiles need the ole code, right?? if not this + dnl doesn't need to be in here. + if test "$wxUSE_METAFILE" = "yes"; then + AC_DEFINE(wxUSE_METAFILE) + dnl this one should probably be made separately configurable + AC_DEFINE(wxUSE_ENH_METAFILE) + fi + fi + else AC_MSG_WARN(Drag and drop disabled because OLE headers not found) wxUSE_DRAG_AND_DROP=no fi @@ -3466,13 +3801,9 @@ dnl --------------------------------------------------------------------------- dnl misc options dnl --------------------------------------------------------------------------- -dnl TODO this is unused for now... -dnl if test "$wxUSE_WXTREE" = "yes"; then -dnl AC_DEFINE(wxUSE_WXTREE) -dnl fi - -if test "$wxUSE_METAFILE" = "yes"; then - AC_DEFINE(wxUSE_METAFILE) +if test "$wxUSE_TREELAYOUT" = "yes"; then + AC_DEFINE(wxUSE_TREELAYOUT) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treelay" fi if test "$wxUSE_DIRDLG" = "yes"; then @@ -3515,7 +3846,6 @@ fi if test "$wxUSE_HTML" = "yes"; then AC_DEFINE(wxUSE_HTML) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html" - INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS html" fi if test "$wxUSE_VALIDATORS" = "yes"; then @@ -3554,15 +3884,15 @@ dnl --------------------------------------------------------------------------- dnl Output the makefiles and such from the results found above dnl --------------------------------------------------------------------------- -GUILIBS="$GUI_TK_LIBRARY $OPENGL_LINK $TOOLKIT_LINK" +GUILIBS="$GUI_TK_LIBRARY $TOOLKIT_LINK" dnl all additional libraries (except wxWindows itself) we link with dnl dnl note that we always link with -lm - extended.c uses floor() and is always dnl linked in -EXTRA_LIBS="-lm $LIBS $ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK" +EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm" if test "$wxUSE_GUI" = "yes"; then - EXTRA_LIBS="$EXTRA_LIBS $GUILIBS $PNG_LINK $JPEG_LINK $TIFF_LINK" + EXTRA_LIBS="$GUILIBS $PNG_LINK $JPEG_LINK $TIFF_LINK $EXTRA_LIBS" fi dnl all the libraries needed to link wxWindows programs when using the @@ -3570,7 +3900,14 @@ dnl makefile system without libtool LD_LIBS="\${top_builddir}/lib/${WX_LIBRARY_NAME_STATIC} $EXTRA_LIBS" dnl all -I options we must pass to the compiler -INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $TOOLKIT_INCLUDE" +INCLUDES="-I. -I\${top_builddir}/lib/wx/include/${TOOLCHAIN_NAME} -I\${top_srcdir}/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $TOOLKIT_INCLUDE" + +dnl wxGTK does not need TOOLKIT includes in wx-config +if test "$wxUSE_GTK" = 1; then + WXCONFIG_INCLUDE= +else + WXCONFIG_INCLUDE="$TOOLKIT_INCLUDE" +fi dnl C/C++ compiler options used to compile wxWindows if test "$GXX" = yes ; then @@ -3581,7 +3918,7 @@ if test "$GXX" = yes ; then fi EXTRA_CFLAGS="$WXDEBUG $WXODBCFLAG $PROFILE $OPTIMISE $INCLUDES" -CFLAGS=`echo $CFLAGS $EXTRA_CFLAGS | sed 's/ \\+/ /g'` +CFLAGS=`echo $CFLAGS $EXTRA_CFLAGS $CXXWARNINGS | sed 's/ \\+/ /g'` CXXFLAGS=`echo $CXXFLAGS $EXTRA_CFLAGS $CXXWARNINGS | sed 's/ \+/ /g'` LDFLAGS="$LDFLAGS $PROFILE" @@ -3593,7 +3930,7 @@ if test "$wxUSE_GUI" = "yes"; then dnl TODO some samples are never built so far: dnl ipc, mfc, nativdlg, oleauto, ownerdrw, proplist SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs dragimag drawing dynamic \ - font fractal image menu minimal richedit" + font image menu minimal richedit" dnl this is needed to be able to find AFM files CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)" @@ -3619,25 +3956,19 @@ dnl global options AC_SUBST(WX_MAJOR_VERSION_NUMBER) AC_SUBST(WX_MINOR_VERSION_NUMBER) AC_SUBST(WX_RELEASE_NUMBER) -AC_SUBST(WX_LIBRARY_NAME) AC_SUBST(WX_LIBRARY_NAME_STATIC) AC_SUBST(WX_LIBRARY_NAME_SHARED) -AC_SUBST(WX_LIBRARY) AC_SUBST(WX_TARGET_LIBRARY) AC_SUBST(WX_LIBRARY_LINK1) AC_SUBST(WX_LIBRARY_LINK2) -AC_SUBST(WX_LIBRARY_LINK3) AC_SUBST(PROGRAM_EXT) dnl global gl options -AC_SUBST(WX_LIBRARY_NAME_GL) AC_SUBST(WX_LIBRARY_NAME_STATIC_GL) AC_SUBST(WX_LIBRARY_NAME_SHARED_GL) -AC_SUBST(WX_LIBRARY_GL) AC_SUBST(WX_TARGET_LIBRARY_GL) AC_SUBST(WX_LIBRARY_LINK1_GL) AC_SUBST(WX_LIBRARY_LINK2_GL) -AC_SUBST(WX_LIBRARY_LINK3_GL) dnl are we supposed to create the links? AC_SUBST(WX_ALL) @@ -3645,10 +3976,12 @@ AC_SUBST(WX_ALL_INSTALLED) AC_SUBST(SHARED_LD) AC_SUBST(PIC_FLAG) -AC_SUBST(DEP_INFO_FLAGS) AC_SUBST(CODE_GEN_FLAGS) -AC_SUBST(BURNT_LIBRARY_NAME) -AC_SUBST(BURNT_LIBRARY_NAME_GL) +AC_SUBST(CODE_GEN_FLAGS_CXX) + +AC_SUBST(SONAME_FLAGS) +AC_SUBST(SONAME_FLAGS_GL) +AC_SUBST(WX_TARGET_LIBRARY_SONAME) AC_SUBST(WX_TARGET_LIBRARY_TYPE) dnl debugging options @@ -3658,21 +3991,19 @@ dnl toolkit options AC_SUBST(USE_GUI) AC_SUBST(AFMINSTALL) AC_SUBST(TOOLKIT) -AC_SUBST(TOOLKIT_DEF) +AC_SUBST(TOOLCHAIN_DEFS) AC_SUBST(TOOLKIT_DIR) -AC_SUBST(TOOLKIT_INCLUDE) +AC_SUBST(TOOLCHAIN_NAME) +AC_SUBST(TOOLKIT_VPATH) + +dnl wx-config options +AC_SUBST(host_alias) +AC_SUBST(cross_compiling) +AC_SUBST(WXCONFIG_LIBS) +AC_SUBST(WXCONFIG_LIBS_GL) +AC_SUBST(WXCONFIG_INCLUDE) dnl what to compile -AC_SUBST(GUIHEADERS) -AC_SUBST(GUIOBJS) -AC_SUBST(COMMONOBJS) -AC_SUBST(GENERICOBJS) -AC_SUBST(GUIDEPS) -AC_SUBST(COMMONDEPS) -AC_SUBST(GENERICDEPS) -AC_SUBST(IODBCOBJS) -AC_SUBST(UNIXOBJS) -AC_SUBST(UNIXDEPS) AC_SUBST(ALL_OBJECTS) AC_SUBST(ALL_DEPFILES) @@ -3684,26 +4015,21 @@ AC_SUBST(RPM_SPEC) AC_SUBST(RPM_FILES) dnl additional subdirectories where we will build -AC_SUBST(SRC_SUBDIRS) -AC_SUBST(INCLUDE_SUBDIRS) -AC_SUBST(UTILS_SUBDIRS) -AC_SUBST(DOCS_SUBDIRS) AC_SUBST(SAMPLES_SUBDIRS) -AC_SUBST(USER_SUBDIRS) dnl additional libraries and linker settings AC_SUBST(LDFLAGS) AC_SUBST(EXTRA_LIBS) +AC_SUBST(OPENGL_LIBS) AC_SUBST(EXTRADEFS) AC_SUBST(LIBS) AC_SUBST(LD_LIBS) +AC_SUBST(WXMSW_DLL_DEFINES) dnl additional resurces settings -AC_SUBST(RCINPUTSWITCH) -AC_SUBST(RCOUTPUTSWITCH) -AC_SUBST(RESPROGRAM) AC_SUBST(RESCOMP) AC_SUBST(RESFLAGS) +AC_SUBST(RESPROGRAMOBJ) dnl These seam to be missing AC_SUBST(DLLTOOL) @@ -3719,16 +4045,10 @@ dnl - and we do use it) AC_PROG_MAKE_SET dnl move setup.h back if available -if test -d include; then - if test -d include/wx; then - if test -d include/wx/${TOOLKIT_DIR}; then - if test -f include/wx/${TOOLKIT_DIR}/setup.h; then - mv -f include/wx/${TOOLKIT_DIR}/setup.h setup.h - fi - fi - fi +if test -f lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h; then + mv -f lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h setup.h fi - + AC_CONFIG_HEADER(setup.h:setup.h.in) dnl some more GUI only things @@ -3755,13 +4075,19 @@ AC_OUTPUT([ Makefile ], [ - chmod +x wx-config - mv wx-config wx${TOOLKIT_DIR}-config - ${LN_S} wx${TOOLKIT_DIR}-config wx-config - - dnl the debian installer wants setup.h to be in the lib subdir - dnl so we *copy* it there - + dnl This test is required to make the following idempotent. + dnl Otherwise running config.status or rerunning configure + dnl would stomp the wx-config link or try to move it onto + dnl itself. + dnl Use -h instead of -L to test for link (GD) + dnl -h is documented as obsolete under Mac OS X but works + dnl -L is obsolete under Solaris8 + if test ! -h wx-config; then + chmod +x wx-config + mv wx-config wx${TOOLCHAIN_NAME}-config + ${LN_S} wx${TOOLCHAIN_NAME}-config wx-config + fi + if test ! -d lib; then mkdir lib fi @@ -3771,35 +4097,20 @@ AC_OUTPUT([ if test ! -d lib/wx/include; then mkdir lib/wx/include fi - if test ! -d lib/wx/include/wx; then - mkdir lib/wx/include/wx + if test ! -d lib/wx/include/${TOOLCHAIN_NAME}; then + mkdir lib/wx/include/${TOOLCHAIN_NAME} fi - if test ! -d lib/wx/include/wx/${TOOLKIT_DIR}; then - mkdir lib/wx/include/wx/${TOOLKIT_DIR} + if test ! -d lib/wx/include/${TOOLCHAIN_NAME}/wx; then + mkdir lib/wx/include/${TOOLCHAIN_NAME}/wx fi if test -f setup.h; then - cp -f setup.h lib/wx/include/wx/${TOOLKIT_DIR}/setup.h + mv -f setup.h lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h fi - - dnl *move* setup.h to its final place - - if test ! -d include; then - mkdir include - fi - if test ! -d include/wx; then - mkdir include/wx - fi - if test ! -d include/wx/${TOOLKIT_DIR}; then - mkdir include/wx/${TOOLKIT_DIR} - fi - if test -f setup.h; then - mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h - fi - ], [ - TOOLKIT_DIR="${TOOLKIT_DIR}" + TOOLCHAIN_NAME="${TOOLCHAIN_NAME}" LN_S="${LN_S}" ] ) +dnl vi: set et sts=4 sw=4: diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 163174b4b9..178d992a57 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -3,11 +3,11 @@ # all: - cd src; make + cd src; $(MAKE) clean: - cd src; make clean - cd samples; make clean + cd src; $(MAKE) clean + cd samples; $(MAKE) clean samples: - cd samples; make + cd samples; $(MAKE) diff --git a/contrib/configure b/contrib/configure index e5e4981399..1e0f10b3cb 100755 --- a/contrib/configure +++ b/contrib/configure @@ -819,6 +819,9 @@ trap 'rm -fr `echo " src/stc/Makefile samples/Makefile samples/mmedia/Makefile + samples/ogl/Makefile + samples/ogl/ogledit/Makefile + samples/ogl/studio/Makefile samples/stc/Makefile " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF @@ -905,6 +908,9 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile src/stc/Makefile samples/Makefile samples/mmedia/Makefile + samples/ogl/Makefile + samples/ogl/ogledit/Makefile + samples/ogl/studio/Makefile samples/stc/Makefile "} EOF diff --git a/contrib/configure.in b/contrib/configure.in index fb7fc13b83..d4b6e3aa27 100644 --- a/contrib/configure.in +++ b/contrib/configure.in @@ -44,5 +44,8 @@ AC_OUTPUT([ src/stc/Makefile samples/Makefile samples/mmedia/Makefile + samples/ogl/Makefile + samples/ogl/ogledit/Makefile + samples/ogl/studio/Makefile samples/stc/Makefile ]) diff --git a/contrib/docs/.cvsignore b/contrib/docs/.cvsignore new file mode 100644 index 0000000000..c8328b5f27 --- /dev/null +++ b/contrib/docs/.cvsignore @@ -0,0 +1,5 @@ +html +htmlhelp +pdf +winhelp +htb diff --git a/contrib/docs/latex/ogl/back.gif b/contrib/docs/latex/ogl/back.gif index 8a61076d3ba74bdedc1d24f60c3d1f5a361a6cee..88a3740f9134d7a569b56a9f76e6aa552672993e 100644 GIT binary patch literal 978 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7H6AG;jlf>Rey!M3TUK6P?i!m{q7|$j(iU2nb+j@t;aY#t_B`I%AGL2Z zO6>3Q?Jm>3v>|kImhI|mtHW1|tWDEBQI>amZ`s68xzaas@2+e3%;$D{>W3T0V&ot1 Q_1d}V>FF7|>?{n{02fm-00000 literal 225 zcmV<703QEGNk%v~VLt#E0Pz3-zrVld=jU&4Z(9HWEC2ui06zd20008IjE||y?GK}z zNf>~$-n{z{YJwGn=81mem9{RpmcUHc_KoNIPRH~B4DyD9p%LJl6@Sa4^Epcbno6kk zD5XxT&EQg7>t<(Iwfoo diff --git a/contrib/docs/latex/ogl/contents.gif b/contrib/docs/latex/ogl/contents.gif index 3dddfa3dd5f0c652e8b27cd6c29e1fdd49ced5a8..723174f81d04d16e94016186ac0322dcddb603c7 100644 GIT binary patch literal 996 zcmZ?wbhEHbbYM_m_|5kxA zV8N1xh6Z3tW&ovR5Cxe34SwPCqkp^L+21?)C@%eigo zjb6XYK{ltit-ZayK=RQZsqlw)b_u-S7xTMFKYoAy)o)vOlz%vRFz5Xto6e7mgSU6F l8>#t(=cJr!`K{OHv%&EGv6=dhWPNvSd3kw-DjN%fH2`phKPvzL literal 231 zcmVG0Pz3-zrVld=jU&4Z(9HWEC2ui06_p40008OjE||y?GK}z zO&EZ)-n{z{a)K3v=81;mmA0S4Fj_r^UyThZDG{h6k9m zHI_(7spd!5_$SH6m{NZ; wbH-jL-q~hvBDNIFUuAn+=ylY_lIO=twXW(!Y|OjPCFiqa!^6Y8%uEc{09+_1fB*mh literal 164 zcmV;V09*e@Nk%v~VI=?<0Pz3-zrVld=jU&4Z(9HWEC2ui03`qz0007gjE||y?Z1Qp zwAzdF6*A}#V%!v#-{_g@)>Q-cu3}3Ku`2^Nfa3dZ+VyHW%gtsZ`jV7k@%j8Ij}~W) zc{NUP6)X3OWa^|{8nl?rh|gZ1@{(qofnsWu+nmFHSnaq>lB41zSVC9`a)_v*xHx0L S5h*!IS!o$ynW>ps0028gDN7ju diff --git a/contrib/docs/latex/ogl/ogl.hpj b/contrib/docs/latex/ogl/ogl.hpj index 5db5ace6f0..062c8fb3e2 100644 --- a/contrib/docs/latex/ogl/ogl.hpj +++ b/contrib/docs/latex/ogl/ogl.hpj @@ -1,5 +1,5 @@ [OPTIONS] -BMROOT=d:\wx2\wxwind~1\docs\latex\ogl ; Assume that bitmaps are where the source is +BMROOT=d:\wx2\wxwind~1\contrib\docs\latex\ogl ; Assume that bitmaps are where the source is TITLE=OGL Manual CONTENTS=Contents COMPRESS=HIGH diff --git a/contrib/docs/latex/ogl/up.gif b/contrib/docs/latex/ogl/up.gif index 316d0d2a14b571bea2eb874efd04bfe509f53b34..870c89e80a826e3b225cc8fe9a30edf9c5a66c22 100644 GIT binary patch literal 998 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7p%TfE%gtCeAWZlgxpoy|ZDMRPr_m>p rx}08pS4?)u<%PW +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +#define wxSTC_INVALID_POSITION -1 +#define wxSTC_START 2000 +#define wxSTC_OPTIONAL_START 3000 +#define wxSTC_LEXER_START 4000 +#define wxSTC_CMD_REDO 2011 +#define wxSTC_CMD_SELECTALL 2013 +#define wxSTC_WS_INVISIBLE 0 +#define wxSTC_WS_VISIBLEALWAYS 1 +#define wxSTC_WS_VISIBLEAFTERINDENT 2 +#define wxSTC_EOL_CRLF 0 +#define wxSTC_EOL_CR 1 +#define wxSTC_EOL_LF 2 + +// The SC_CP_UTF8 value can be used to enter Unicode mode. +// This is the same value as CP_UTF8 in Windows +#define wxSTC_CP_UTF8 65001 +#define wxSTC_MARKER_MAX 31 +#define wxSTC_MARK_CIRCLE 0 +#define wxSTC_MARK_ROUNDRECT 1 +#define wxSTC_MARK_ARROW 2 +#define wxSTC_MARK_SMALLRECT 3 +#define wxSTC_MARK_SHORTARROW 4 +#define wxSTC_MARK_EMPTY 5 +#define wxSTC_MARK_ARROWDOWN 6 +#define wxSTC_MARK_MINUS 7 +#define wxSTC_MARK_PLUS 8 +#define wxSTC_MARKNUM_FOLDER 30 +#define wxSTC_MARKNUM_FOLDEROPEN 31 +#define wxSTC_MARGIN_SYMBOL 0 +#define wxSTC_MARGIN_NUMBER 1 +#define wxSTC_STYLE_DEFAULT 32 +#define wxSTC_STYLE_LINENUMBER 33 +#define wxSTC_STYLE_BRACELIGHT 34 +#define wxSTC_STYLE_BRACEBAD 35 +#define wxSTC_STYLE_CONTROLCHAR 36 +#define wxSTC_STYLE_INDENTGUIDE 37 +#define wxSTC_STYLE_MAX 127 + +// Character set identifiers are used in StyleSetCharacterSet. +// The values are the same as the Windows *_CHARSET values. +#define wxSTC_CHARSET_ANSI 0 +#define wxSTC_CHARSET_DEFAULT 1 +#define wxSTC_CHARSET_BALTIC 186 +#define wxSTC_CHARSET_CHINESEBIG5 136 +#define wxSTC_CHARSET_EASTEUROPE 238 +#define wxSTC_CHARSET_GB2312 134 +#define wxSTC_CHARSET_GREEK 161 +#define wxSTC_CHARSET_HANGUL 129 +#define wxSTC_CHARSET_MAC 77 +#define wxSTC_CHARSET_OEM 255 +#define wxSTC_CHARSET_RUSSIAN 204 +#define wxSTC_CHARSET_SHIFTJIS 128 +#define wxSTC_CHARSET_SYMBOL 2 +#define wxSTC_CHARSET_TURKISH 162 +#define wxSTC_CHARSET_JOHAB 130 +#define wxSTC_CHARSET_HEBREW 177 +#define wxSTC_CHARSET_ARABIC 178 +#define wxSTC_CHARSET_VIETNAMESE 163 +#define wxSTC_CHARSET_THAI 222 +#define wxSTC_INDIC_MAX 7 +#define wxSTC_INDIC_PLAIN 0 +#define wxSTC_INDIC_SQUIGGLE 1 +#define wxSTC_INDIC_TT 2 +#define wxSTC_INDIC_DIAGONAL 3 +#define wxSTC_INDIC_STRIKE 4 +#define wxSTC_INDIC0_MASK 32 +#define wxSTC_INDIC1_MASK 64 +#define wxSTC_INDIC2_MASK 128 +#define wxSTC_INDICS_MASK 32 | 64 | 128 + +// PrintColourMode - use same colours as screen. +#define wxSTC_PRINT_NORMAL 0 + +// PrintColourMode - invert the light value of each style for printing. +#define wxSTC_PRINT_INVERTLIGHT 1 + +// PrintColourMode - force black text on white background for printing. +#define wxSTC_PRINT_BLACKONWHITE 2 +#define wxSTC_FIND_DOWN 1 +#define wxSTC_FIND_WHOLEWORD 2 +#define wxSTC_FIND_MATCHCASE 4 +#define wxSTC_FIND_WORDSTART 0x00100000 + +// SCFIND_REGEXP is not yet implemented. +#define wxSTC_FIND_REGEXP 0x00200000 +#define wxSTC_CMD_UNDO 2176 +#define wxSTC_CMD_CUT 2177 +#define wxSTC_CMD_COPY 2178 +#define wxSTC_CMD_PASTE 2179 +#define wxSTC_FOLDLEVELBASE 0x400 +#define wxSTC_FOLDLEVELWHITEFLAG 0x1000 +#define wxSTC_FOLDLEVELHEADERFLAG 0x2000 +#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF +#define wxSTC_CMD_LINEDOWN 2300 +#define wxSTC_CMD_LINEDOWNEXTEND 2301 +#define wxSTC_CMD_LINEUP 2302 +#define wxSTC_CMD_LINEUPEXTEND 2303 +#define wxSTC_CMD_CHARLEFT 2304 +#define wxSTC_CMD_CHARLEFTEXTEND 2305 +#define wxSTC_CMD_CHARRIGHT 2306 +#define wxSTC_CMD_CHARRIGHTEXTEND 2307 +#define wxSTC_CMD_WORDLEFT 2308 +#define wxSTC_CMD_WORDLEFTEXTEND 2309 +#define wxSTC_CMD_WORDRIGHT 2310 +#define wxSTC_CMD_WORDRIGHTEXTEND 2311 +#define wxSTC_CMD_HOME 2312 +#define wxSTC_CMD_HOMEEXTEND 2313 +#define wxSTC_CMD_LINEEND 2314 +#define wxSTC_CMD_LINEENDEXTEND 2315 +#define wxSTC_CMD_DOCUMENTSTART 2316 +#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317 +#define wxSTC_CMD_DOCUMENTEND 2318 +#define wxSTC_CMD_DOCUMENTENDEXTEND 2319 +#define wxSTC_CMD_PAGEUP 2320 +#define wxSTC_CMD_PAGEUPEXTEND 2321 +#define wxSTC_CMD_PAGEDOWN 2322 +#define wxSTC_CMD_PAGEDOWNEXTEND 2323 +#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324 +#define wxSTC_CMD_CANCEL 2325 +#define wxSTC_CMD_DELETEBACK 2326 +#define wxSTC_CMD_TAB 2327 +#define wxSTC_CMD_BACKTAB 2328 +#define wxSTC_CMD_NEWLINE 2329 +#define wxSTC_CMD_FORMFEED 2330 +#define wxSTC_CMD_VCHOME 2331 +#define wxSTC_CMD_VCHOMEEXTEND 2332 +#define wxSTC_CMD_ZOOMIN 2333 +#define wxSTC_CMD_ZOOMOUT 2334 +#define wxSTC_CMD_DELWORDLEFT 2335 +#define wxSTC_CMD_DELWORDRIGHT 2336 +#define wxSTC_CMD_LINECUT 2337 +#define wxSTC_CMD_LINEDELETE 2338 +#define wxSTC_CMD_LINETRANSPOSE 2339 +#define wxSTC_CMD_LOWERCASE 2340 +#define wxSTC_CMD_UPPERCASE 2341 +#define wxSTC_CMD_LINESCROLLDOWN 2342 +#define wxSTC_CMD_LINESCROLLUP 2343 +#define wxSTC_EDGE_NONE 0 +#define wxSTC_EDGE_LINE 1 +#define wxSTC_EDGE_BACKGROUND 2 + +// Show caret within N lines of edge when it's scrolled to view +#define wxSTC_CARET_SLOP 0x01 + +// Center caret on screen when it's scrolled to view +#define wxSTC_CARET_CENTER 0x02 + +// OR this with CARET_CENTER to reposition even when visible, or +// OR this with CARET_SLOP to reposition whenever outside slop border +#define wxSTC_CARET_STRICT 0x04 + +// Notifications +// Type of modification and the action which caused the modification +// These are defined as a bit mask to make it easy to specify which notifications are wanted. +// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +#define wxSTC_MOD_INSERTTEXT 0x1 +#define wxSTC_MOD_DELETETEXT 0x2 +#define wxSTC_MOD_CHANGESTYLE 0x4 +#define wxSTC_MOD_CHANGEFOLD 0x8 +#define wxSTC_PERFORMED_USER 0x10 +#define wxSTC_PERFORMED_UNDO 0x20 +#define wxSTC_PERFORMED_REDO 0x40 +#define wxSTC_LASTSTEPINUNDOREDO 0x100 +#define wxSTC_MOD_CHANGEMARKER 0x200 +#define wxSTC_MOD_BEFOREINSERT 0x400 +#define wxSTC_MOD_BEFOREDELETE 0x800 +#define wxSTC_MODEVENTMASKALL 0xF77 + +// Symbolic key codes and modifier flags +// ASCII and other printable characters below 256 +// Extended keys above 300 +#define wxSTC_KEY_DOWN 300 +#define wxSTC_KEY_UP 301 +#define wxSTC_KEY_LEFT 302 +#define wxSTC_KEY_RIGHT 303 +#define wxSTC_KEY_HOME 304 +#define wxSTC_KEY_END 305 +#define wxSTC_KEY_PRIOR 306 +#define wxSTC_KEY_NEXT 307 +#define wxSTC_KEY_DELETE 308 +#define wxSTC_KEY_INSERT 309 +#define wxSTC_KEY_ESCAPE 7 +#define wxSTC_KEY_BACK 8 +#define wxSTC_KEY_TAB 9 +#define wxSTC_KEY_RETURN 13 +#define wxSTC_KEY_ADD 310 +#define wxSTC_KEY_SUBTRACT 311 +#define wxSTC_KEY_DIVIDE 312 +#define wxSTC_SCMOD_SHIFT 1 +#define wxSTC_SCMOD_CTRL 2 +#define wxSTC_SCMOD_ALT 4 + +// For SciLexer.h +#define wxSTC_LEX_CONTAINER 0 +#define wxSTC_LEX_NULL 1 +#define wxSTC_LEX_PYTHON 2 +#define wxSTC_LEX_CPP 3 +#define wxSTC_LEX_HTML 4 +#define wxSTC_LEX_XML 5 +#define wxSTC_LEX_PERL 6 +#define wxSTC_LEX_SQL 7 +#define wxSTC_LEX_VB 8 +#define wxSTC_LEX_PROPERTIES 9 +#define wxSTC_LEX_ERRORLIST 10 +#define wxSTC_LEX_MAKEFILE 11 +#define wxSTC_LEX_BATCH 12 +#define wxSTC_LEX_XCODE 13 +#define wxSTC_LEX_LATEX 14 +#define wxSTC_LEX_LUA 15 +#define wxSTC_LEX_DIFF 16 + +// Lexical states for SCLEX_PYTHON +#define wxSTC_P_DEFAULT 0 +#define wxSTC_P_COMMENTLINE 1 +#define wxSTC_P_NUMBER 2 +#define wxSTC_P_STRING 3 +#define wxSTC_P_CHARACTER 4 +#define wxSTC_P_WORD 5 +#define wxSTC_P_TRIPLE 6 +#define wxSTC_P_TRIPLEDOUBLE 7 +#define wxSTC_P_CLASSNAME 8 +#define wxSTC_P_DEFNAME 9 +#define wxSTC_P_OPERATOR 10 +#define wxSTC_P_IDENTIFIER 11 +#define wxSTC_P_COMMENTBLOCK 12 +#define wxSTC_P_STRINGEOL 13 + +// Lexical states for SCLEX_CPP, SCLEX_VB +#define wxSTC_C_DEFAULT 0 +#define wxSTC_C_COMMENT 1 +#define wxSTC_C_COMMENTLINE 2 +#define wxSTC_C_COMMENTDOC 3 +#define wxSTC_C_NUMBER 4 +#define wxSTC_C_WORD 5 +#define wxSTC_C_STRING 6 +#define wxSTC_C_CHARACTER 7 +#define wxSTC_C_UUID 8 +#define wxSTC_C_PREPROCESSOR 9 +#define wxSTC_C_OPERATOR 10 +#define wxSTC_C_IDENTIFIER 11 +#define wxSTC_C_STRINGEOL 12 +#define wxSTC_C_VERBATIM 13 + +// Lexical states for SCLEX_HTML, SCLEX_XML +#define wxSTC_H_DEFAULT 0 +#define wxSTC_H_TAG 1 +#define wxSTC_H_TAGUNKNOWN 2 +#define wxSTC_H_ATTRIBUTE 3 +#define wxSTC_H_ATTRIBUTEUNKNOWN 4 +#define wxSTC_H_NUMBER 5 +#define wxSTC_H_DOUBLESTRING 6 +#define wxSTC_H_SINGLESTRING 7 +#define wxSTC_H_OTHER 8 +#define wxSTC_H_COMMENT 9 +#define wxSTC_H_ENTITY 10 + +// XML and ASP +#define wxSTC_H_TAGEND 11 +#define wxSTC_H_XMLSTART 12 +#define wxSTC_H_XMLEND 13 +#define wxSTC_H_SCRIPT 14 +#define wxSTC_H_ASP 15 +#define wxSTC_H_ASPAT 16 +#define wxSTC_H_CDATA 17 +#define wxSTC_H_QUESTION 18 + +// More HTML +#define wxSTC_H_VALUE 19 + +// Embedded Javascript +#define wxSTC_HJ_START 40 +#define wxSTC_HJ_DEFAULT 41 +#define wxSTC_HJ_COMMENT 42 +#define wxSTC_HJ_COMMENTLINE 43 +#define wxSTC_HJ_COMMENTDOC 44 +#define wxSTC_HJ_NUMBER 45 +#define wxSTC_HJ_WORD 46 +#define wxSTC_HJ_KEYWORD 47 +#define wxSTC_HJ_DOUBLESTRING 48 +#define wxSTC_HJ_SINGLESTRING 49 +#define wxSTC_HJ_SYMBOLS 50 +#define wxSTC_HJ_STRINGEOL 51 + +// ASP Javascript +#define wxSTC_HJA_START 55 +#define wxSTC_HJA_DEFAULT 56 +#define wxSTC_HJA_COMMENT 57 +#define wxSTC_HJA_COMMENTLINE 58 +#define wxSTC_HJA_COMMENTDOC 59 +#define wxSTC_HJA_NUMBER 60 +#define wxSTC_HJA_WORD 61 +#define wxSTC_HJA_KEYWORD 62 +#define wxSTC_HJA_DOUBLESTRING 63 +#define wxSTC_HJA_SINGLESTRING 64 +#define wxSTC_HJA_SYMBOLS 65 +#define wxSTC_HJA_STRINGEOL 66 + +// Embedded VBScript +#define wxSTC_HB_START 70 +#define wxSTC_HB_DEFAULT 71 +#define wxSTC_HB_COMMENTLINE 72 +#define wxSTC_HB_NUMBER 73 +#define wxSTC_HB_WORD 74 +#define wxSTC_HB_STRING 75 +#define wxSTC_HB_IDENTIFIER 76 +#define wxSTC_HB_STRINGEOL 77 + +// ASP VBScript +#define wxSTC_HBA_START 80 +#define wxSTC_HBA_DEFAULT 81 +#define wxSTC_HBA_COMMENTLINE 82 +#define wxSTC_HBA_NUMBER 83 +#define wxSTC_HBA_WORD 84 +#define wxSTC_HBA_STRING 85 +#define wxSTC_HBA_IDENTIFIER 86 +#define wxSTC_HBA_STRINGEOL 87 + +// Embedded Python +#define wxSTC_HP_START 90 +#define wxSTC_HP_DEFAULT 91 +#define wxSTC_HP_COMMENTLINE 92 +#define wxSTC_HP_NUMBER 93 +#define wxSTC_HP_STRING 94 +#define wxSTC_HP_CHARACTER 95 +#define wxSTC_HP_WORD 96 +#define wxSTC_HP_TRIPLE 97 +#define wxSTC_HP_TRIPLEDOUBLE 98 +#define wxSTC_HP_CLASSNAME 99 +#define wxSTC_HP_DEFNAME 100 +#define wxSTC_HP_OPERATOR 101 +#define wxSTC_HP_IDENTIFIER 102 + +// ASP Python +#define wxSTC_HPA_START 105 +#define wxSTC_HPA_DEFAULT 106 +#define wxSTC_HPA_COMMENTLINE 107 +#define wxSTC_HPA_NUMBER 108 +#define wxSTC_HPA_STRING 109 +#define wxSTC_HPA_CHARACTER 110 +#define wxSTC_HPA_WORD 111 +#define wxSTC_HPA_TRIPLE 112 +#define wxSTC_HPA_TRIPLEDOUBLE 113 +#define wxSTC_HPA_CLASSNAME 114 +#define wxSTC_HPA_DEFNAME 115 +#define wxSTC_HPA_OPERATOR 116 +#define wxSTC_HPA_IDENTIFIER 117 + +// PHP +#define wxSTC_HPHP_DEFAULT 118 +#define wxSTC_HPHP_HSTRING 119 +#define wxSTC_HPHP_SIMPLESTRING 120 +#define wxSTC_HPHP_WORD 121 +#define wxSTC_HPHP_NUMBER 122 +#define wxSTC_HPHP_VARIABLE 123 +#define wxSTC_HPHP_COMMENT 124 +#define wxSTC_HPHP_COMMENTLINE 125 +#define wxSTC_HPHP_STRINGEOL 126 + +// Lexical states for SCLEX_PERL +#define wxSTC_PL_DEFAULT 0 +#define wxSTC_PL_HERE 1 +#define wxSTC_PL_COMMENTLINE 2 +#define wxSTC_PL_POD 3 +#define wxSTC_PL_NUMBER 4 +#define wxSTC_PL_WORD 5 +#define wxSTC_PL_STRING 6 +#define wxSTC_PL_CHARACTER 7 +#define wxSTC_PL_PUNCTUATION 8 +#define wxSTC_PL_PREPROCESSOR 9 +#define wxSTC_PL_OPERATOR 10 +#define wxSTC_PL_IDENTIFIER 11 +#define wxSTC_PL_SCALAR 12 +#define wxSTC_PL_ARRAY 13 +#define wxSTC_PL_HASH 14 +#define wxSTC_PL_SYMBOLTABLE 15 +#define wxSTC_PL_REF 16 +#define wxSTC_PL_REGEX 17 +#define wxSTC_PL_REGSUBST 18 +#define wxSTC_PL_LONGQUOTE 19 +#define wxSTC_PL_BACKTICKS 20 +#define wxSTC_PL_DATASECTION 21 + +// Lexical states for SCLEX_LATEX +#define wxSTC_L_DEFAULT 0 +#define wxSTC_L_COMMAND 1 +#define wxSTC_L_TAG 2 +#define wxSTC_L_MATH 3 +#define wxSTC_L_COMMENT 4 + +// Lexical states for SCLEX_LUA +#define wxSTC_LUA_DEFAULT 0 +#define wxSTC_LUA_COMMENT 1 +#define wxSTC_LUA_COMMENTLINE 2 +#define wxSTC_LUA_COMMENTDOC 3 +#define wxSTC_LUA_NUMBER 4 +#define wxSTC_LUA_WORD 5 +#define wxSTC_LUA_STRING 6 +#define wxSTC_LUA_CHARACTER 7 +#define wxSTC_LUA_LITERALSTRING 8 +#define wxSTC_LUA_PREPROCESSOR 9 +#define wxSTC_LUA_OPERATOR 10 +#define wxSTC_LUA_IDENTIFIER 11 +#define wxSTC_LUA_STRINGEOL 12 +#define wxSTC_ERR_DEFAULT 0 +#define wxSTC_ERR_PYTHON 1 +#define wxSTC_ERR_GCC 2 +#define wxSTC_ERR_MS 3 +#define wxSTC_ERR_CMD 4 +#define wxSTC_ERR_BORLAND 5 +#define wxSTC_ERR_PERL 6 + +// END of generated section +//---------------------------------------------------------------------- +// Others + +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)) + + //---------------------------------------------------------------------- -// constants and stuff - -enum wxSTC_UndoType { - wxSTC_UndoCollectNone, - wxSTC_UndoCollectAutoStart -}; - - -enum wxSTC_EOL { - wxSTC_EOL_CRLF, - wxSTC_EOL_CR, - wxSTC_EOL_LF -}; - -enum wxSTC_EDGE { - wxSTC_EDGE_NONE, - wxSTC_EDGE_LINE, - wxSTC_EDGE_BACKGROUND -}; - - - -const int wxSTC_LEX_STYLE_MAX = 31; -const int wxSTC_STYLE_DEFAULT = 32; -const int wxSTC_STYLE_LINENUMBER = 33; -const int wxSTC_STYLE_BRACELIGHT = 34; -const int wxSTC_STYLE_BRACEBAD = 35; -const int wxSTC_STYLE_CONTROLCHAR = 36; -const int wxSTC_STYLE_MAX = 63; -const int wxSTC_STYLE_MASK = 31; - -const int wxSTC_MARKER_MAX = 31; -const int wxSTC_MARK_CIRCLE = 0; -const int wxSTC_MARK_ROUNDRECT = 1; -const int wxSTC_MARK_ARROW = 2; -const int wxSTC_MARK_SMALLRECT = 3; -const int wxSTC_MARK_SHORTARROW = 4; -const int wxSTC_MARK_EMPTY = 5; - -const int wxSTC_INDIC_PLAIN = 0; -const int wxSTC_INDIC_SQUIGGLE = 1; -const int wxSTC_INDIC_TT = 2; -const int wxSTC_INDIC0_MASK = 32; -const int wxSTC_INDIC1_MASK = 64; -const int wxSTC_INDIC2_MASK = 128; -const int wxSTC_INDICS_MASK = (wxSTC_INDIC0_MASK | wxSTC_INDIC1_MASK | wxSTC_INDIC2_MASK); - - -// key commands -enum { - wxSTC_CMD_LINEDOWN = 2300, - wxSTC_CMD_LINEDOWNEXTEND, - wxSTC_CMD_LINEUP, - wxSTC_CMD_LINEUPEXTEND, - wxSTC_CMD_CHARLEFT, - wxSTC_CMD_CHARLEFTEXTEND, - wxSTC_CMD_CHARRIGHT, - wxSTC_CMD_CHARRIGHTEXTEND, - wxSTC_CMD_WORDLEFT, - wxSTC_CMD_WORDLEFTEXTEND, - wxSTC_CMD_WORDRIGHT, - wxSTC_CMD_WORDRIGHTEXTEND, - wxSTC_CMD_HOME, - wxSTC_CMD_HOMEEXTEND, - wxSTC_CMD_LINEEND, - wxSTC_CMD_LINEENDEXTEND, - wxSTC_CMD_DOCUMENTSTART, - wxSTC_CMD_DOCUMENTSTARTEXTEND, - wxSTC_CMD_DOCUMENTEND, - wxSTC_CMD_DOCUMENTENDEXTEND, - wxSTC_CMD_PAGEUP, - wxSTC_CMD_PAGEUPEXTEND, - wxSTC_CMD_PAGEDOWN, - wxSTC_CMD_PAGEDOWNEXTEND, - wxSTC_CMD_EDITTOGGLEOVERTYPE, - wxSTC_CMD_CANCEL, - wxSTC_CMD_DELETEBACK, - wxSTC_CMD_TAB, - wxSTC_CMD_BACKTAB, - wxSTC_CMD_NEWLINE, - wxSTC_CMD_FORMFEED, - wxSTC_CMD_VCHOME, - wxSTC_CMD_VCHOMEEXTEND, - wxSTC_CMD_ZOOMIN, - wxSTC_CMD_ZOOMOUT, - wxSTC_CMD_DELWORDLEFT, - wxSTC_CMD_DELWORDRIGHT -}; - - -enum wxSTC_LEX { - wxSTC_LEX_CONTAINER=0, - wxSTC_LEX_NULL, - wxSTC_LEX_PYTHON, - wxSTC_LEX_CPP, - wxSTC_LEX_HTML, - wxSTC_LEX_XML, - wxSTC_LEX_PERL, - wxSTC_LEX_SQL, - wxSTC_LEX_VB, - wxSTC_LEX_PROPERTIES, - wxSTC_LEX_ERRORLIST, - wxSTC_LEX_MAKEFILE, - wxSTC_LEX_BATCH, -}; - - - -const int wxSTC_CARET_SLOP = 0x01; -const int WXSTC_CARET_CENTER = 0x02; -const int wxSTC_CARET_STRICT = 0x04; - -const int wxSTC_MARGIN_SYMBOL = 0; -const int wxSTC_MARGIN_NUMBER = 1; - class ScintillaWX; // forward declare class WordList; @@ -153,273 +461,789 @@ extern const wxChar* wxSTCNameStr; class wxStyledTextCtrl : public wxControl { public: +#ifdef SWIG + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const char* name = "styledtext"); +#else wxStyledTextCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxSTCNameStr); +#endif + + +#ifndef SWIG ~wxStyledTextCtrl(); +#endif + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + // Add text to the document + void AddText(const wxString& text); - // Text retrieval and modification - wxString GetText(); - bool SetText(const wxString& text); - wxString GetLine(int line); - void ReplaceSelection(const wxString& text); - void SetReadOnly(bool readOnly); - bool GetReadOnly(); - wxString GetTextRange(int startPos, int endPos); - wxString GetStyledTextRange(int startPos, int endPos); - void GetTextRange(int startPos, int endPos, char* buff); - void GetStyledTextRange(int startPos, int endPos, char* buff); - void AddText(const wxString& text); - void AddStyledText(const wxString& text); - void InsertText(int pos, const wxString& text); - void ClearAll(); - char GetCharAt(int pos); - char GetStyleAt(int pos); - void SetStyleBits(int bits); - int GetStyleBits(); + // Add array of cells to document + void AddStyledText(const wxString& text); + // Insert string at a position + void InsertText(int pos, const wxString& text); - // Clipboard - void Cut(); - void Copy(); - void Paste(); - bool CanPaste(); - void ClearClipbrd(); // avoiding name conflict with virtual in wxWindow + // Delete all text in the document + void ClearAll(); + // Set all style bytes to 0, remove all folding information + void ClearDocumentStyle(); - // Undo and Redo - void Undo(); - bool CanUndo(); - void EmptyUndoBuffer(); - void Redo(); - bool CanRedo(); - void SetUndoCollection(wxSTC_UndoType type); - wxSTC_UndoType GetUndoCollection(); - void BeginUndoAction(); - void EndUndoAction(); + // The number of characters in the document + int GetLength(); + // Returns the character byte at the position + int GetCharAt(int pos); - // Selection and information - void GetSelection(int* startPos, int* endPos); - void SetSelection(int startPos, int endPos); - wxString GetSelectedText(); - void HideSelection(bool hide); - bool GetHideSelection(); + // Returns the position of the caret + int GetCurrentPos(); - int GetTextLength(); - int GetFirstVisibleLine(); - bool GetModified(); - int GetLineCount(); - wxRect GetRect(); - int GetLineFromPos(int pos); - int GetLineStartPos(int line); - int GetLineLengthAtPos(int pos); - int GetLineLength(int line); - wxString GetCurrentLineText(int* linePos=NULL); - int GetCurrentLine(); - int PositionFromPoint(wxPoint pt); - int LineFromPoint(wxPoint pt); - wxPoint PointFromPosition(int pos); - int GetCurrentPos(); - int GetAnchor(); - void SelectAll(); - void SetCurrentPosition(int pos); - void SetAnchor(int pos); - void GotoPos(int pos); - void GotoLine(int line); - void ChangePosition(int delta, bool extendSelection); - void PageMove(int cmdKey, bool extendSelection); + // Returns the position of the opposite end of the selection to the caret + int GetAnchor(); - void ScrollBy(int columnDelta, int lineDelta); - void ScrollToLine(int line); - void ScrollToColumn(int column); - void EnsureCaretVisible(); - void SetCaretPolicy(int policy, int slop=0); - int GetSelectionType(); + // Returns the style byte at the position + int GetStyleAt(int pos); + // Redoes the next action on the undo history + void Redo(); + // Choose between collecting actions into the undo + // history and discarding them. + void SetUndoCollection(bool collectUndo); - // Searching - int FindText(int minPos, int maxPos, const wxString& text, - bool caseSensitive, bool wholeWord); - void SearchAnchor(); - int SearchNext(const wxString& text, bool caseSensitive, bool wholeWord); - int SearchPrev(const wxString& text, bool caseSensitive, bool wholeWord); + // Select all the text in the document. + void SelectAll(); + // Remember the current position in the undo history as the position + // at which the document was saved. + void SetSavePoint(); - // Visible whitespace - bool GetViewWhitespace(); - void SetViewWhitespace(bool visible); + // Retrieve a buffer of cells. + wxString GetStyledText(int startPos, int endPos); + // Are there any redoable actions in the undo history. + bool CanRedo(); - // Line endings - wxSTC_EOL GetEOLMode(); - void SetEOLMode(wxSTC_EOL mode); - bool GetViewEOL(); - void SetViewEOL(bool visible); - void ConvertEOL(wxSTC_EOL mode); + // Retrieve the line number at which a particular marker is located + int MarkerLineFromHandle(int handle); + // Delete a marker. + void MarkerDeleteHandle(int handle); - // Styling - int GetEndStyled(); - void StartStyling(int pos, int mask); - void SetStyleFor(int length, int style); - void SetStyleBytes(int length, char* styleBytes); + // Is undo history being collected? + bool GetUndoCollection(); + // Are white space characters currently visible? + // Returns one of SCWS_* constants. + int GetViewWhiteSpace(); - // Style Definition - void StyleClearAll(); - void StyleResetDefault(); - void StyleSetSpec(int styleNum, const wxString& spec); - void StyleSetForeground(int styleNum, const wxColour& colour); - void StyleSetBackground(int styleNum, const wxColour& colour); - void StyleSetFont(int styleNum, wxFont& font); - void StyleSetFontAttr(int styleNum, int size, const wxString& faceName, bool bold, bool italic); - void StyleSetBold(int styleNum, bool bold); - void StyleSetItalic(int styleNum, bool italic); - void StyleSetFaceName(int styleNum, const wxString& faceName); - void StyleSetSize(int styleNum, int pointSize); - void StyleSetEOLFilled(int styleNum, bool fillEOL); + // Make white space characters invisible, always visible or visible outside indentation. + void SetViewWhiteSpace(int viewWS); + // Find the position from a point within the window. + int PositionFromPoint(wxPoint pt); - // Margins in the edit area - int GetLeftMargin(); - int GetRightMargin(); - void SetMargins(int left, int right); + // Set caret to start of a line and ensure it is visible. + void GotoLine(int line); + // Set caret to a position and ensure it is visible. + void GotoPos(int pos); - // Margins for selection, markers, etc. - void SetMarginType(int margin, int type); - int GetMarginType(int margin); + // Set the selection anchor to a position. The anchor is the opposite + // end of the selection from the caret. + void SetAnchor(int posAnchor); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. + wxString GetCurLine(int* OUTPUT=NULL); + + // Retrieve the position of the last correctly styled character. + int GetEndStyled(); + + // Convert all line endings in the document to use the current mode. + void ConvertEOLs(); + + // Retrieve the current end of line mode - one of CRLF, CR, or LF. + int GetEOLMode(); + + // Set the current end of line mode. + void SetEOLMode(int eolMode); + + // Set the current styling position to pos and the styling mask to mask. + // The styling mask can be used to protect some bits in each styling byte from + // modification. + void StartStyling(int pos, int mask); + + // Change style from current styling position for length characters to a style + // and move the current styling position to after this newly styled segment. + void SetStyling(int length, int style); + + // Is drawing done first into a buffer or direct to the screen. + bool GetBufferedDraw(); + + // If drawing is buffered then each line of text is drawn into a bitmap buffer + // before drawing it to the screen to avoid flicker. + void SetBufferedDraw(bool buffered); + + // Change the visible size of a tab to be a multiple of the width of a space + // character. + void SetTabWidth(int tabWidth); + + // Retrieve the visible size of a tab. + int GetTabWidth(); + + // Set the code page used to interpret the bytes of the document as characters. + // The SC_CP_UTF8 value can be used to enter Unicode mode. + void SetCodePage(int codePage); + + // Set the symbol used for a particular marker number, + // and optionally the for and background colours. + void MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour); + + // Set the foreground colour used for a particular marker number. + void MarkerSetForeground(int markerNumber, const wxColour& fore); + + // Set the background colour used for a particular marker number. + void MarkerSetBackground(int markerNumber, const wxColour& back); + + // Add a marker to a line. + void MarkerAdd(int line, int markerNumber); + + // Delete a marker from a line + void MarkerDelete(int line, int markerNumber); + + // Delete all markers with a particular number from all lines + void MarkerDeleteAll(int markerNumber); + + // Get a bit mask of all the markers set on a line. + int MarkerGet(int line); + + // Find the next line after lineStart that includes a marker in mask. + int MarkerNext(int lineStart, int markerMask); + + // Find the previous line before lineStart that includes a marker in mask. + int MarkerPrevious(int lineStart, int markerMask); + + // Set a margin to be either numeric or symbolic. + void SetMarginType(int margin, int marginType); + + // Retrieve the type of a margin. + int GetMarginType(int margin); + + // Set the width of a margin to a width expressed in pixels. void SetMarginWidth(int margin, int pixelWidth); - int GetMarginWidth(int margin); + + // Retrieve the width of a margin in pixels. + int GetMarginWidth(int margin); + + // Set a mask that determines which markers are displayed in a margin. void SetMarginMask(int margin, int mask); - int GetMarginMask(int margin); + + // Retrieve the marker mask of a margin. + int GetMarginMask(int margin); + + // Make a margin sensitive or insensitive to mouse clicks. void SetMarginSensitive(int margin, bool sensitive); + + // Retrieve the mouse click sensitivity of a margin. bool GetMarginSensitive(int margin); + // Clear all the styles and make equivalent to the global default style. + void StyleClearAll(); - // Selection and Caret styles - void SetSelectionForeground(const wxColour& colour); - void SetSelectionBackground(const wxColour& colour); - void SetCaretForeground(const wxColour& colour); - int GetCaretPeriod(); - void SetCaretPeriod(int milliseconds); + // Set the foreground colour of a style. + void StyleSetForeground(int style, const wxColour& fore); + // Set the background colour of a style. + void StyleSetBackground(int style, const wxColour& back); - // Other settings - void SetBufferedDraw(bool isBuffered); - void SetTabWidth(int numChars); - void SetWordChars(const wxString& wordChars); + // Set a style to be bold or not. + void StyleSetBold(int style, bool bold); + // Set a style to be italic or not. + void StyleSetItalic(int style, bool italic); - // Brace highlighting - void BraceHighlight(int pos1, int pos2); - void BraceBadlight(int pos); - int BraceMatch(int pos, int maxReStyle=0); + // Set the size of characters of a style. + void StyleSetSize(int style, int sizePoints); + // Set the font of a style. + void StyleSetFaceName(int style, const wxString& fontName); - // Markers - void MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground, - const wxColour& background); - void MarkerSetType(int markerNumber, int markerSymbol); - void MarkerSetForeground(int markerNumber, const wxColour& colour); - void MarkerSetBackground(int markerNumber, const wxColour& colour); - int MarkerAdd(int line, int markerNumber); - void MarkerDelete(int line, int markerNumber); - void MarkerDeleteAll(int markerNumber); - int MarkerGet(int line); - int MarkerGetNextLine(int lineStart, int markerMask); - int MarkerGetPrevLine(int lineStart, int markerMask); - int MarkerLineFromHandle(int handle); - void MarkerDeleteHandle(int handle); + // Set a style to have its end of line filled or not. + void StyleSetEOLFilled(int style, bool filled); + // Reset the default style to its state at startup + void StyleResetDefault(); - // Indicators - void IndicatorSetStyle(int indicNum, int indicStyle); - int IndicatorGetStyle(int indicNum); - void IndicatorSetColour(int indicNum, const wxColour& colour); + // Set a style to be underlined or not. + void StyleSetUnderline(int style, bool underline); + // Set the foreground colour of the selection and whether to use this setting. + void SetSelForeground(bool useSetting, const wxColour& fore); - // Auto completion - void AutoCompShow(const wxString& listOfWords); - void AutoCompCancel(); - bool AutoCompActive(); - int AutoCompPosAtStart(); - void AutoCompComplete(); - void AutoCompStopChars(const wxString& stopChars); + // Set the background colour of the selection and whether to use this setting. + void SetSelBackground(bool useSetting, const wxColour& back); + // Set the foreground colour of the caret. + void SetCaretForeground(const wxColour& fore); - // Call tips - void CallTipShow(int pos, const wxString& text); - void CallTipCancel(); - bool CallTipActive(); - int CallTipPosAtStart(); - void CallTipSetHighlight(int start, int end); - void CallTipSetBackground(const wxColour& colour); + // When key+modifier combination km is pressed perform msg. + void CmdKeyAssign(int key, int modifiers, int cmd); + // When key+modifier combination km do nothing. + void CmdKeyClear(int key, int modifiers); - // Key bindings - void CmdKeyAssign(int key, int modifiers, int cmd); - void CmdKeyClear(int key, int modifiers); - void CmdKeyClearAll(); - void CmdKeyExecute(int cmd); + // Drop all key mappings. + void CmdKeyClearAll(); + // Set the styles for a segment of the document. + void SetStyleBytes(int length, char* styleBytes); - // Print formatting - int FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect); + // Set a style to be visible or not. + void StyleSetVisible(int style, bool visible); + // Get the time in milliseconds that the caret is on and off. + int GetCaretPeriod(); - // Document Sharing (multiple views) - void* GetDocument(); - void SetDocument(void* document); - // TODO: create a wx wrapper for Scintilla's document class + // Get the time in milliseconds that the caret is on and off. 0 = steady on. + void SetCaretPeriod(int periodMilliseconds); + // Set the set of characters making up words for when moving or selecting + // by word. + void SetWordChars(const wxString& characters); - // Folding - int VisibleFromDocLine(int docLine); - int DocLineFromVisible(int displayLine); - int SetFoldLevel(int line, int level); - int GetFoldLevel(int line); - int GetLastChild(int line); - int GetFoldParent(int line); - void ShowLines(int lineStart, int lineEnd); - void HideLines(int lineStart, int lineEnd); - bool GetLineVisible(int line); - void SetFoldExpanded(int line); - bool GetFoldExpanded(int line); - void ToggleFold(int line); - void EnsureVisible(int line); + // Start a sequence of actions that is undone and redone as a unit. + // May be nested. + void BeginUndoAction(); + // End a sequence of actions that is undone and redone as a unit. + void EndUndoAction(); - // Long Lines - int GetEdgeColumn(); - void SetEdgeColumn(int column); - wxSTC_EDGE GetEdgeMode(); - void SetEdgeMode(wxSTC_EDGE mode); + // Set an indicator to plain, squiggle or TT. + void IndicatorSetStyle(int indic, int style); + + // Retrieve the style of an indicator. + int IndicatorGetStyle(int indic); + + // Set the foreground colour of an indicator. + void IndicatorSetForeground(int indic, const wxColour& fore); + + // Retrieve the foreground colour of an indicator. + wxColour IndicatorGetForeground(int indic); + + // Divide each styling byte into lexical class bits (default:5) and indicator + // bits (default:3). If a lexer requires more than 32 lexical states, then this + // is used to expand the possible states. + void SetStyleBits(int bits); + + // Retrieve number of bits in style bytes used to hold the lexical state. + int GetStyleBits(); + + // Used to hold extra styling information for each line. + void SetLineState(int line, int state); + + // Retrieve the extra styling information for a line. + int GetLineState(int line); + + // Retrieve the last line number that has line state. + int GetMaxLineState(); + + // Display a auto-completion list. + // The lenEntered parameter indicates how many characters before + // the caret should be used to provide context. + void AutoCompShow(int lenEntered, const wxString& itemList); + + // Remove the auto-completion list from the screen. + void AutoCompCancel(); + + // Is there an auto-completion list visible? + bool AutoCompActive(); + + // Retrieve the position of the caret when the auto-completion list was + // displayed. + int AutoCompPosStart(); + + // User has selected an item so remove the list and insert the selection. + void AutoCompComplete(); + + // Define a set of character that when typed cancel the auto-completion list. + void AutoCompStops(const wxString& characterSet); + + // Change the separator character in the string setting up an auto-completion + // list. Default is space but can be changed if items contain space. + void AutoCompSetSeparator(int separatorCharacter); + + // Retrieve the auto-completion list separator character. + int AutoCompGetSeparator(); + + // Select the item in the auto-completion list that starts with a string. + void AutoCompSelect(const wxString& text); + + // Should the auto-completion list be cancelled if the user backspaces to a + // position before where the box was created. + void AutoCompSetCancelAtStart(bool cancel); + + // Retrieve whether auto-completion cancelled by backspacing before start. + bool AutoCompGetCancelAtStart(); + + // Define a set of character that when typed fills up the selected word. + void AutoCompSetFillUps(const wxString& characterSet); + + // Should a single item auto-completion list automatically choose the item. + void AutoCompSetChooseSingle(bool chooseSingle); + + // Retrieve whether a single item auto-completion list automatically choose the item. + bool AutoCompGetChooseSingle(); + + // Set whether case is significant when performing auto-completion searches. + void AutoCompSetIgnoreCase(bool ignoreCase); + + // Retrieve state of ignore case flag. + bool AutoCompGetIgnoreCase(); + + // Set the number of spaces used for one level of indentation. + void SetIndent(int indentSize); + + // Retrieve indentation size. + int GetIndent(); + + // Indentation will only use space characters if useTabs is false, otherwise + // it will use a combination of tabs and spaces. + void SetUseTabs(bool useTabs); + + // Retrieve whether tabs will be used in indentation. + bool GetUseTabs(); + + // Change the indentation of a line to a number of columns. + void SetLineIndentation(int line, int indentSize); + + // Retrieve the number of columns that a line is indented. + int GetLineIndentation(int line); + + // Retrieve the position before the first non indentation character on a line. + int GetLineIndentPosition(int line); + + // Retrieve the column number of a position, taking tab width into account. + int GetColumn(int pos); + + // Show or hide the horizontal scroll bar. + void SetUseHorizontalScrollBar(bool show); + + // Is the horizontal scroll bar visible? + bool GetUseHorizontalScrollBar(); + + // Show or hide indentation guides. + void SetIndentationGuides(bool show); + + // Are the indentation guides visible? + bool GetIndentationGuides(); + + // Set the highlighted indentation guide column. + // 0 = no highlighted guide. + void SetHighlightGuide(int column); + + // Get the highlighted indentation guide column. + int GetHighlightGuide(); + + // Get the position after the last visible characters on a line. + int GetLineEndPosition(int line); + + // Get the code page used to interpret the bytes of the document as characters. + int GetCodePage(); + + // Get the foreground colour of the caret. + wxColour GetCaretForeground(); + + // In read-only mode? + bool GetReadOnly(); + + // Sets the position of the caret. + void SetCurrentPos(int pos); + + // Sets the position that starts the selection - this becomes the anchor. + void SetSelectionStart(int pos); + + // Returns the position at the start of the selection. + int GetSelectionStart(); + + // Sets the position that ends the selection - this becomes the currentPosition. + void SetSelectionEnd(int pos); + + // Returns the position at the end of the selection. + int GetSelectionEnd(); + + // Sets the print magnification added to the point size of each style for printing. + void SetPrintMagnification(int magnification); + + // Returns the print magnification. + int GetPrintMagnification(); + + // Modify colours when printing for clearer printed text. + void SetPrintColourMode(int mode); + + // Returns the print colour mode. + int GetPrintColourMode(); + + // Find some text in the document. + int FindText(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord); + + // On Windows will draw the document into a display context such as a printer. + int FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect); + + // Retrieve the line at the top of the display. + int GetFirstVisibleLine(); + + // Retrieve the contents of a line. + wxString GetLine(int line); + + // Returns the number of lines in the document. There is always at least one. + int GetLineCount(); + + // Sets the size in pixels of the left margin. + void SetMarginLeft(int width); + + // Returns the size in pixels of the left margin. + int GetMarginLeft(); + + // Sets the size in pixels of the right margin. + void SetMarginRight(int width); + + // Returns the size in pixels of the right margin. + int GetMarginRight(); + + // Is the document different from when it was last saved? + bool GetModify(); + + // Select a range of text. + void SetSelection(int start, int end); + + // Retrieve the selected text. + wxString GetSelectedText(); + + // Retrieve a range of text. + wxString GetTextRange(int startPos, int endPos); + + // Draw the selection in normal style or with selection highlighted. + void HideSelection(bool normal); + + // Retrieve the line containing a position. + int LineFromPosition(int pos); + + // Retrieve the position at the start of a line. + int PositionFromLine(int line); + + // Scroll horizontally and vertically. + void LineScroll(int columns, int lines); + + // Ensure the caret is visible. + void EnsureCaretVisible(); + + // Replace the selected text with the argument text. + void ReplaceSelection(const wxString& text); + + // Set to read only or read write. + void SetReadOnly(bool readOnly); + + // Will a paste succeed? + bool CanPaste(); + + // Are there any undoable actions in the undo history. + bool CanUndo(); + + // Delete the undo history. + void EmptyUndoBuffer(); + + // Undo one action in the undo history. + void Undo(); + + // Cut the selection to the clipboard. + void Cut(); + + // Copy the selection to the clipboard. + void Copy(); + + // Paste the contents of the clipboard into the document replacing the selection. + void Paste(); + + // Clear the selection. + void Clear(); + + // Replace the contents of the document with the argument text. + void SetText(const wxString& text); + + // Retrieve all the text in the document. + wxString GetText(); + + // Retrieve the number of characters in the document. + int GetTextLength(); + + // Set to overtype (true) or insert mode + void SetOvertype(bool overtype); + + // Returns true if overtype mode is active otherwise false is returned. + bool GetOvertype(); + + // Show a call tip containing a definition near position pos. + void CallTipShow(int pos, const wxString& definition); + + // Remove the call tip from the screen. + void CallTipCancel(); + + // Is there an active call tip? + bool CallTipActive(); + + // Retrieve the position where the caret was before displaying the call tip. + int CallTipPosAtStart(); + + // Highlight a segment of the definition. + void CallTipSetHighlight(int start, int end); + + // Set the background colour for the call tip. + void CallTipSetBackground(const wxColour& back); + + // Find the display line of a document line taking hidden lines into account. + int VisibleFromDocLine(int line); + + // Find the document line of a display line taking hidden lines into account. + int DocLineFromVisible(int lineDisplay); + + // Set the fold level of a line. + // This encodes an integer level along with flags indicating whether the + // line is a header and whether it is effectively white space. + void SetFoldLevel(int line, int level); + + // Retrieve the fold level of a line. + int GetFoldLevel(int line); + + // Find the last child line of a header line. + int GetLastChild(int line, int level); + + // Find the parent line of a child line. + int GetFoldParent(int line); + + // Make a range of lines visible. + void ShowLines(int lineStart, int lineEnd); + + // Make a range of lines invisible. + void HideLines(int lineStart, int lineEnd); + + // Is a line visible? + bool GetLineVisible(int line); + + // Show the children of a header line. + void SetFoldExpanded(int line, bool expanded); + + // Is a header line expanded? + bool GetFoldExpanded(int line); + + // Switch a header line between expanded and contracted. + void ToggleFold(int line); + + // Ensure a particular line is visible by expanding any header line hiding it. + void EnsureVisible(int line); + + // Set some debugging options for folding + void SetFoldFlags(int flags); + + // How many characters are on a line, not including end of line characters. + int LineLength(int line); + + // Highlight the characters at two positions. + void BraceHighlight(int pos1, int pos2); + + // Highlight the character at a position indicating there is no matching brace. + void BraceBadLight(int pos); + + // Find the position of a matching brace or INVALID_POSITION if no match. + int BraceMatch(int pos); + + // Are the end of line characters visible. + bool GetViewEOL(); + + // Make the end of line characters visible or invisible + void SetViewEOL(bool visible); + + // Retrieve a pointer to the document object. + void* GetDocPointer(); + + // Change the document object used. + void SetDocPointer(void* docPointer); + + // Set which document modification events are sent to the container. + void SetModEventMask(int mask); + + // Retrieve the column number which text should be kept within. + int GetEdgeColumn(); + + // Set the column number of the edge. + // If text goes past the edge then it is highlighted. + void SetEdgeColumn(int column); + + // Retrieve the edge highlight mode. + int GetEdgeMode(); + + // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that + // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + void SetEdgeMode(int mode); + + // Retrieve the colour used in edge indication. wxColour GetEdgeColour(); - void SetEdgeColour(const wxColour& colour); + + // Change the colour used in edge indication. + void SetEdgeColour(const wxColour& edgeColour); + + // Sets the current caret position to be the search anchor. + void SearchAnchor(); + + // Find some text starting at the search anchor. + int SearchNext(int flags, const wxString& text); + + // Find some text starting at the search anchor and moving backwards. + int SearchPrev(int flags, const wxString& text); + + // Set the way the line the caret is on is kept visible. + void SetCaretPolicy(int caretPolicy, int caretSlop); + + // Retrieves the number of lines completely visible. + int LinesOnScreen(); + + // Set whether a pop up menu is displayed automatically when the user presses + // the wrong mouse button. + void UsePopUp(bool allowPopUp); + + // Is the selection a rectangular. The alternative is the more common stream selection. + bool SelectionIsRectangle(); + + // Set the zoom level. This number of points is added to the size of all fonts. + // It may be positive to magnify or negative to reduce. + void SetZoom(int zoom); + + // Retrieve the zoom level. + int GetZoom(); + + // Create a new document object. + // Starts with reference count of 1 and not selected into editor. + void* CreateDocument(); + + // Extend life of document. + void AddRefDocument(void* docPointer); + + // Release a reference to the document, deleting document if it fades to black. + void ReleaseDocument(void* docPointer); + + // Get which document modification events are sent to the container. + int GetModEventMask(); + + // Start notifying the container of all key presses and commands. + void StartRecord(); + + // Stop notifying the container of all key presses and commands. + void StopRecord(); + + // Set the lexing language of the document. + void SetLexer(int lexer); + + // Retrieve the lexing language of the document. + int GetLexer(); + + // Colourise a segment of the document using the current lexing language. + void Colourise(int start, int end); + + // Set up a value that may be used by a lexer for some optional feature. + void SetProperty(const wxString& key, const wxString& value); + + // Set up the key words used by the lexer. + void SetKeyWords(int keywordSet, const wxString& keyWords); + +// END of generated section +//---------------------------------------------------------------------- +// Others... - // Lexer - void SetLexer(wxSTC_LEX lexer); - wxSTC_LEX GetLexer(); - void Colourise(int start, int end); - void SetProperty(const wxString& key, const wxString& value); - void SetKeywords(int keywordSet, const wxString& keywordList); + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:#RRGGBB sets the foreground colour + // back:#RRGGBB sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec(int styleNum, const wxString& spec); + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont(int styleNum, wxFont& font); + + + + // Set all font style attributes at once. + void StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline); + + + + // Perform one of the operations defined by the wxSTC_CMD_* constants. + void CmdKeyExecute(int cmd); + + + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins(int left, int right); + + + // Retrieve the start and end positions of the current selection. +#ifdef SWIG + void GetSelection(int* OUTPUT, int* OUTPUT); +#else + void GetSelection(int* startPos, int* endPos); +#endif + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition(int pos); + + + // Scroll enough to make the given line visible + void ScrollToLine(int line); + + + // Scroll enough to make the given column visible + void ScrollToColumn(int column); + +//---------------------------------------------------------------------- + + +#ifndef SWIG private: // Event handlers void OnPaint(wxPaintEvent& evt); @@ -430,11 +1254,13 @@ private: void OnMouseLeftUp(wxMouseEvent& evt); void OnMouseRightUp(wxMouseEvent& evt); void OnChar(wxKeyEvent& evt); + void OnKeyDown(wxKeyEvent& evt); void OnLoseFocus(wxFocusEvent& evt); void OnGainFocus(wxFocusEvent& evt); void OnSysColourChanged(wxSysColourChangedEvent& evt); void OnEraseBackground(wxEraseEvent& evt); void OnMenu(wxCommandEvent& evt); + void OnListBox(wxCommandEvent& evt); // Turn notifications from Scintilla into events @@ -445,22 +1271,22 @@ private: private: DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxStyledTextCtrl) ScintillaWX* m_swx; wxStopWatch m_stopWatch; - bool m_readOnly; - wxSTC_UndoType m_undoType; friend class ScintillaWX; friend class Platform; +#endif }; //---------------------------------------------------------------------- class wxStyledTextEvent : public wxCommandEvent { public: - wxStyledTextEvent(wxEventType commandType, int id); + wxStyledTextEvent(wxEventType commandType=0, int id=0); ~wxStyledTextEvent() {} void SetPosition(int pos) { m_position = pos; } @@ -499,7 +1325,10 @@ public: void CopyObject(wxObject& obj) const; +#ifndef SWIG private: + DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) + int m_position; int m_key; int m_modifiers; @@ -517,11 +1346,11 @@ private: int m_message; // wxEVT_STC_MACRORECORD int m_wParam; int m_lParam; - +#endif }; - +// Event types enum { wxEVT_STC_CHANGE = 1650, wxEVT_STC_STYLENEEDED, @@ -535,9 +1364,12 @@ enum { wxEVT_STC_KEY, wxEVT_STC_MACRORECORD, wxEVT_STC_MARGINCLICK, - wxEVT_STC_NEEDSHOWN + wxEVT_STC_NEEDSHOWN, + wxEVT_STC_POSCHANGED }; + +#ifndef SWIG typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, @@ -549,9 +1381,13 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, -#define EVT_STC_CMDKEY(id, fn) { wxEVT_STC_CMDKEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, -#define EVT_STC_UNKNOWNCMDKEY(id, fn) { wxEVT_STC_UNKNOWNCMDKEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#endif //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/contrib/samples/Makefile.in b/contrib/samples/Makefile.in index 2ec692ed42..c054aa6453 100644 --- a/contrib/samples/Makefile.in +++ b/contrib/samples/Makefile.in @@ -1,12 +1,10 @@ -# -# Makefile : Builds wxWindows utils for Unix. -# +# $Id$ + +CONTRIB_SAMPLES=mmedia ogl stc all: - cd mmedia; make - cd stc; make + @for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done clean: - cd mmedia; make clean - cd stc; make clean + @for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE) clean); done diff --git a/contrib/samples/mmedia/MMboardVC.dsp b/contrib/samples/mmedia/MMboardVC.dsp new file mode 100644 index 0000000000..08ad9b2192 --- /dev/null +++ b/contrib/samples/mmedia/MMboardVC.dsp @@ -0,0 +1,235 @@ +# Microsoft Developer Studio Project File - Name="MMboardVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MMboardVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MMboardVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MMboardVC.mak" CFG="MMboardVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MMboardVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MMboardVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MMboardVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "MMboardVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MMboardVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib mmedia.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/mmboard.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib mmediad.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/mmboard.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib mmediad.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/mmboard.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib mmedia.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/mmboard.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "MMboardVC - Win32 Release" +# Name "MMboardVC - Win32 Debug" +# Name "MMboardVC - Win32 Debug DLL" +# Name "MMboardVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\mmboard.cpp + +!IF "$(CFG)" == "MMboardVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\mmboard.h + +!IF "$(CFG)" == "MMboardVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\mmbman.cpp + +!IF "$(CFG)" == "MMboardVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\mmbman.h + +!IF "$(CFG)" == "MMboardVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MMboardVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\mmboard.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/contrib/samples/mmedia/MMboardVC.dsw b/contrib/samples/mmedia/MMboardVC.dsw new file mode 100644 index 0000000000..3b08cf2e8e --- /dev/null +++ b/contrib/samples/mmedia/MMboardVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MMboardVC"=.\MMboardVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/contrib/samples/mmedia/Makefile.in b/contrib/samples/mmedia/Makefile.in index 04b776a093..7c4c5cbbba 100644 --- a/contrib/samples/mmedia/Makefile.in +++ b/contrib/samples/mmedia/Makefile.in @@ -1,13 +1,5 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1998 -# Updated: -# Copyright: (c) 1998 Julian Smart -# -# "%W% %G%" -# -# Makefile for minimal example (UNIX). +# Makefile for mmedia sample. +# $Id$ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. @@ -17,25 +9,8 @@ PROGRAM=mmboard OBJECTS=mmboard.o mmbman.o -EXTRA_LIBS= $(top_builddir)/contrib/src/mmedia/libmmedia.@WX_TARGET_LIBRARY_TYPE@ @ESD_LINK@ +APPEXTRALIBS=$(top_builddir)/lib/libmmedia.@WX_TARGET_LIBRARY_TYPE@ @ESD_LINK@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include -# the comment at the end of the next line is needed because otherwise autoconf -# would remove this line completely - it contains a built-in hack to remove -# any VPATH assignment not containing ':' -VPATH = @PATH_IFS@$(top_srcdir)/contrib/samples/mmedia # ':' for autoconf +include $(top_builddir)/src/makeprog.env -include ../../../src/make.env - -.SUFFIXES: .o .cpp .c - -.cpp.o: - $(CC) -c $(CPPFLAGS) $(EXTRA_CPPFLAGS) -o $@ $< - -all: $(PROGRAM) - -clean: - rm -f *.o $(PROGRAM) - -mmboard: $(OBJECTS) - $(CC) $(LDFLAGS) -o mmboard $(OBJECTS) $(EXTRA_LIBS) $(LDLIBS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ diff --git a/contrib/samples/ogl/Makefile.in b/contrib/samples/ogl/Makefile.in new file mode 100644 index 0000000000..e53c85784e --- /dev/null +++ b/contrib/samples/ogl/Makefile.in @@ -0,0 +1,12 @@ +# +# Makefile : Builds wxWindows utils for Unix. +# + +OGL_SAMPLES=ogledit studio + +all: + @for d in $(OGL_SAMPLES); do (cd $$d && $(MAKE)); done + +clean: + @for d in $(OGL_SAMPLES); do (cd $$d && $(MAKE) clean); done + diff --git a/contrib/samples/ogl/ogledit/Makefile b/contrib/samples/ogl/ogledit/Makefile deleted file mode 100644 index 76d11a5ebb..0000000000 --- a/contrib/samples/ogl/ogledit/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# File: Makefile -# Author: Julian Smart -# Created: 1999 -# Updated: -# Copyright: (c) 2000 Julian Smart -# -# Makefile for OGL demo (GTK version) -# -# This makefile requires wxWindows/GTK to be -# installed (possibly using "make install") -# on your system. -# - -CPP = gcc -g -CC = gcc -WXCONFIG=../../../../wx-config -WXINCLUDE=-I../../../../include -I../../../include -WXLIB=-L../../../../lib -L../../../src/ogl - -OBJECTS=ogledit.o palette.o doc.o view.o - -ogledit: $(OBJECTS) - $(CPP) -o ogledit $(OBJECTS) `$(WXCONFIG) --libs` $(WXLIB) -logl - -ogledit.o: ogledit.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c ogledit.cpp - -palette.o: palette.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c palette.cpp - -doc.o: doc.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c doc.cpp - -view.o: view.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c view.cpp - -clean: - rm -f *.o ogledit diff --git a/contrib/samples/ogl/ogledit/Makefile.in b/contrib/samples/ogl/ogledit/Makefile.in new file mode 100644 index 0000000000..055739c441 --- /dev/null +++ b/contrib/samples/ogl/ogledit/Makefile.in @@ -0,0 +1,16 @@ +# Makefile for OGLEdit example. +# $Id$ + +top_srcdir = @top_srcdir@/.. +top_builddir = ../../../.. +program_dir = contrib/samples/ogl/ogledit + +PROGRAM=ogledit + +OBJECTS=$(PROGRAM).o doc.o view.o palette.o + +APPEXTRALIBS=$(top_builddir)/lib/libogl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRADEFS=-I$(top_srcdir)/contrib/include + +include $(top_builddir)/src/makeprog.env + diff --git a/contrib/samples/ogl/ogledit/OGLEditVC.dsp b/contrib/samples/ogl/ogledit/OGLEditVC.dsp new file mode 100644 index 0000000000..c18b05c997 --- /dev/null +++ b/contrib/samples/ogl/ogledit/OGLEditVC.dsp @@ -0,0 +1,315 @@ +# Microsoft Developer Studio Project File - Name="OGLEditVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=OGLEditVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "OGLEditVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "OGLEditVC.mak" CFG="OGLEditVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "OGLEditVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "OGLEditVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "OGLEditVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "OGLEditVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/ogledit.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/ogledit.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/ogledit.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/ogledit.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "OGLEditVC - Win32 Release" +# Name "OGLEditVC - Win32 Debug" +# Name "OGLEditVC - Win32 Debug DLL" +# Name "OGLEditVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\ogledit.cpp + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\doc.cpp + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\palette.cpp + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\view.cpp + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\doc.h + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\ogledit.h + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\palette.h + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\view.h + +!IF "$(CFG)" == "OGLEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\ogledit.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../../include" /i "../../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/contrib/samples/ogl/ogledit/OGLEditVC.dsw b/contrib/samples/ogl/ogledit/OGLEditVC.dsw new file mode 100644 index 0000000000..402b32e8de --- /dev/null +++ b/contrib/samples/ogl/ogledit/OGLEditVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "OGLEditVC"=.\OGLEditVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/contrib/samples/ogl/ogledit/makefile.unx b/contrib/samples/ogl/ogledit/makefile.unx index 31b223db53..76d11a5ebb 100644 --- a/contrib/samples/ogl/ogledit/makefile.unx +++ b/contrib/samples/ogl/ogledit/makefile.unx @@ -1,20 +1,39 @@ # -# File: makefile.unx +# File: Makefile # Author: Julian Smart -# Created: 1998 +# Created: 1999 # Updated: -# Copyright: (c) 1998 Julian Smart +# Copyright: (c) 2000 Julian Smart # -# "%W% %G%" +# Makefile for OGL demo (GTK version) +# +# This makefile requires wxWindows/GTK to be +# installed (possibly using "make install") +# on your system. # -# Makefile for OGLEdit example (UNIX). -PROGRAM=ogledit +CPP = gcc -g +CC = gcc +WXCONFIG=../../../../wx-config +WXINCLUDE=-I../../../../include -I../../../include +WXLIB=-L../../../../lib -L../../../src/ogl -OBJECTS=$(PROGRAM).o doc.o view.o palette.o +OBJECTS=ogledit.o palette.o doc.o view.o -# EXTRACPPFLAGS=-I$(WXDIR)/contrib/include -EXTRALDLIBS=-logl$(GUISUFFIX) +ogledit: $(OBJECTS) + $(CPP) -o ogledit $(OBJECTS) `$(WXCONFIG) --libs` $(WXLIB) -logl -include ../../../../src/makeprog.env +ogledit.o: ogledit.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c ogledit.cpp +palette.o: palette.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c palette.cpp + +doc.o: doc.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c doc.cpp + +view.o: view.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c view.cpp + +clean: + rm -f *.o ogledit diff --git a/contrib/samples/ogl/ogledit/view.cpp b/contrib/samples/ogl/ogledit/view.cpp index 0d8e58232b..bd6681d0fe 100644 --- a/contrib/samples/ogl/ogledit/view.cpp +++ b/contrib/samples/ogl/ogledit/view.cpp @@ -292,7 +292,7 @@ void MyCanvas::OnLeftClick(double x, double y, int keys) } if (info) { - view->GetDocument()->GetCommandProcessor()->Submit(new DiagramCommand(info->GetClassName(), OGLEDIT_ADD_SHAPE, (DiagramDocument *)view->GetDocument(), info, + view->GetDocument()->GetCommandProcessor()->Submit(new DiagramCommand((char*) info->GetClassName(), OGLEDIT_ADD_SHAPE, (DiagramDocument *)view->GetDocument(), info, x, y)); } } diff --git a/contrib/samples/ogl/studio/Makefile b/contrib/samples/ogl/studio/Makefile deleted file mode 100644 index 2070bc3b13..0000000000 --- a/contrib/samples/ogl/studio/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# File: Makefile -# Author: Julian Smart -# Created: 1999 -# Updated: -# Copyright: (c) 2000 Julian Smart -# -# Makefile for OGL demo (GTK version) -# -# This makefile requires wxWindows/GTK to be -# installed (possibly using "make install") -# on your system. -# - -CPP = gcc -g -CC = gcc -WXCONFIG=../../../../wx-config -WXINCLUDE=-I../../../../include -I../../../include -WXLIB=-L../../../../lib -L../../../src/ogl - -OBJECTS=studio.o cspalette.o csprint.o dialogs.o doc.o mainfrm.o project.o shapes.o symbols.o view.o - -studio: $(OBJECTS) - $(CPP) -o studio $(OBJECTS) `$(WXCONFIG) --libs` $(WXLIB) -logl - -studio.o: studio.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c studio.cpp - -cspalette.o: cspalette.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c cspalette.cpp - -doc.o: doc.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c doc.cpp - -view.o: view.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c view.cpp - -dialogs.o: dialogs.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c dialogs.cpp - -mainfrm.o: mainfrm.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c mainfrm.cpp - -project.o: project.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c project.cpp - -shapes.o: shapes.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c shapes.cpp - -symbols.o: symbols.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c symbols.cpp - -csprint.o: csprint.cpp - $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c csprint.cpp - -clean: - rm -f *.o studio diff --git a/contrib/samples/ogl/studio/Makefile.in b/contrib/samples/ogl/studio/Makefile.in new file mode 100644 index 0000000000..1f6d9c4673 --- /dev/null +++ b/contrib/samples/ogl/studio/Makefile.in @@ -0,0 +1,19 @@ +# Makefile for OGL Studio. +# $Id$ + +top_srcdir = @top_srcdir@/.. +top_builddir = ../../../.. +program_dir = contrib/samples/ogl/studio + +PROGRAM=studio + +DATAFILES=studio_resources.wxr + +OBJECTS=$(PROGRAM).o doc.o shapes.o symbols.o view.o cspalette.o\ + mainfrm.o project.o dialogs.o csprint.o + +APPEXTRALIBS=$(top_builddir)/lib/libogl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRADEFS=-I$(top_srcdir)/contrib/include -I$(top_srcdir)/$(program_dir)/bitmaps + +include $(top_builddir)/src/makeprog.env + diff --git a/contrib/samples/ogl/studio/StudioVC.dsp b/contrib/samples/ogl/studio/StudioVC.dsp new file mode 100644 index 0000000000..d512968fb9 --- /dev/null +++ b/contrib/samples/ogl/studio/StudioVC.dsp @@ -0,0 +1,391 @@ +# Microsoft Developer Studio Project File - Name="StudioVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=StudioVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "StudioVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "StudioVC.mak" CFG="StudioVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "StudioVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "StudioVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "StudioVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "StudioVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/studio.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/studio.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/studio.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/studio.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "StudioVC - Win32 Release" +# Name "StudioVC - Win32 Debug" +# Name "StudioVC - Win32 Debug DLL" +# Name "StudioVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\cspalette.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\cspalette.h +# End Source File +# Begin Source File + +SOURCE=.\csprint.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dialogs.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dialogs.h +# End Source File +# Begin Source File + +SOURCE=.\doc.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\doc.h +# End Source File +# Begin Source File + +SOURCE=.\mainfrm.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\mainfrm.h +# End Source File +# Begin Source File + +SOURCE=.\project.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\project.h +# End Source File +# Begin Source File + +SOURCE=.\shapes.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\shapes.h +# End Source File +# Begin Source File + +SOURCE=.\studio.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\studio.h +# End Source File +# Begin Source File + +SOURCE=.\studio.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../../include" /i "../../../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\symbols.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\symbols.h +# End Source File +# Begin Source File + +SOURCE=.\view.cpp + +!IF "$(CFG)" == "StudioVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\view.h +# End Source File +# End Target +# End Project diff --git a/contrib/samples/ogl/studio/StudioVC.dsw b/contrib/samples/ogl/studio/StudioVC.dsw new file mode 100644 index 0000000000..aa82567fd8 --- /dev/null +++ b/contrib/samples/ogl/studio/StudioVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "StudioVC"=.\StudioVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/contrib/samples/ogl/studio/makefile.unx b/contrib/samples/ogl/studio/makefile.unx index 5fca57a097..2070bc3b13 100644 --- a/contrib/samples/ogl/studio/makefile.unx +++ b/contrib/samples/ogl/studio/makefile.unx @@ -1,39 +1,57 @@ # -# File: makefile.unx +# File: Makefile # Author: Julian Smart -# Created: 1998 +# Created: 1999 # Updated: -# Copyright: (c) 1998 Julian Smart +# Copyright: (c) 2000 Julian Smart # -# "%W% %G%" +# Makefile for OGL demo (GTK version) +# +# This makefile requires wxWindows/GTK to be +# installed (possibly using "make install") +# on your system. # -# Makefile for OGL Studio (UNIX). -PROGRAM=studio +CPP = gcc -g +CC = gcc +WXCONFIG=../../../../wx-config +WXINCLUDE=-I../../../../include -I../../../include +WXLIB=-L../../../../lib -L../../../src/ogl -OBJECTS=$(PROGRAM).o doc.o shapes.o symbols.o view.o cspalette.o\ - mainfrm.o project.o dialogs.o csprint.o +OBJECTS=studio.o cspalette.o csprint.o dialogs.o doc.o mainfrm.o project.o shapes.o symbols.o view.o -EXTRACPPFLAGS=-I$(WXDIR)/utils/ogl/src -I./bitmaps -EXTRALDLIBS=-logl$(GUISUFFIX) +studio: $(OBJECTS) + $(CPP) -o studio $(OBJECTS) `$(WXCONFIG) --libs` $(WXLIB) -logl -#WXDIR=/home/jacs/wx2 +studio.o: studio.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c studio.cpp -include $(WXDIR)/src/makeprog.env +cspalette.o: cspalette.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c cspalette.cpp -cleanogl: - cd $(WXDIR)/utils/ogl/src; make -f makefile.unx cleanmotif +doc.o: doc.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c doc.cpp -ogl: - cd $(WXDIR)/utils/ogl/src; make -f makefile.unx motif +view.o: view.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c view.cpp -wx: - cd $(WXDIR)/src/motif; make -f makefile.unx motif +dialogs.o: dialogs.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c dialogs.cpp -cleanwx: - cd $(WXDIR)/src/motif; make -f makefile.unx cleanmotif +mainfrm.o: mainfrm.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c mainfrm.cpp -cleanall: cleanmotif cleanogl cleanwx +project.o: project.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c project.cpp -makeall: wx ogl motif +shapes.o: shapes.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c shapes.cpp +symbols.o: symbols.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c symbols.cpp + +csprint.o: csprint.cpp + $(CPP) `$(WXCONFIG) --cflags` -I../../src $(WXINCLUDE) -c csprint.cpp + +clean: + rm -f *.o studio diff --git a/contrib/samples/stc/Makefile.in b/contrib/samples/stc/Makefile.in index 39b2292d0d..cffdcc78d7 100644 --- a/contrib/samples/stc/Makefile.in +++ b/contrib/samples/stc/Makefile.in @@ -13,9 +13,9 @@ PROGRAM=stctest OBJECTS=$(PROGRAM).o -APPEXTRALIBS=$(top_builddir)/contrib/src/stc/libstc.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/libstc.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include DATAFILES=stctest.cpp -include ../../../src/makeprog.env +include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/stc/StcTestVC.dsp b/contrib/samples/stc/StcTestVC.dsp new file mode 100644 index 0000000000..05bb9197ed --- /dev/null +++ b/contrib/samples/stc/StcTestVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="StcTestVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=StcTestVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "StcTestVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "StcTestVC.mak" CFG="StcTestVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "StcTestVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "StcTestVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "StcTestVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "StcTestVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "StcTestVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "StcTestVC - Win32 Release" +# Name "StcTestVC - Win32 Debug" +# Name "StcTestVC - Win32 Debug DLL" +# Name "StcTestVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\stctest.cpp + +!IF "$(CFG)" == "StcTestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\stctest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/contrib/samples/stc/StcTestVC.dsw b/contrib/samples/stc/StcTestVC.dsw new file mode 100644 index 0000000000..22af0485e9 --- /dev/null +++ b/contrib/samples/stc/StcTestVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "StcTestVC"=.\StcTestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/contrib/samples/stc/stctest.cpp b/contrib/samples/stc/stctest.cpp index fe337aadb3..bb581a99ab 100644 --- a/contrib/samples/stc/stctest.cpp +++ b/contrib/samples/stc/stctest.cpp @@ -165,7 +165,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) ed->EmptyUndoBuffer(); ed->SetLexer(wxSTC_LEX_CPP); - ed->SetKeywords(0, + ed->SetKeyWords(0, "asm auto bool break case catch char class const " "const_cast continue default delete do double " "dynamic_cast else enum explicit export extern " diff --git a/contrib/src/Makefile.in b/contrib/src/Makefile.in index 93e54c589c..42a7ef8d06 100644 --- a/contrib/src/Makefile.in +++ b/contrib/src/Makefile.in @@ -1,6 +1,4 @@ -# -# Makefile : Builds wxWindows contrib src for Unix. -# +# $Id$ CONTRIB_SUBDIRS=ogl mmedia stc diff --git a/contrib/src/mmedia/Makefile.in b/contrib/src/mmedia/Makefile.in index 7eaca8e349..3162aa9b3f 100644 --- a/contrib/src/mmedia/Makefile.in +++ b/contrib/src/mmedia/Makefile.in @@ -1,7 +1,8 @@ -# +# $Id$ -top_srcdir = @top_srcdir@ +top_srcdir = @top_srcdir@/.. top_builddir = ../../.. +libsrc_dir = contrib/src/mmedia TARGET_LIBNAME=libmmedia @@ -9,17 +10,20 @@ LIBVERSION_CURRENT=1 LIBVERSION_REVISION=0 LIBVERSION_AGE=0 +HEADER_PATH=$(top_srcdir)/contrib/include/wx +HEADER_SUBDIR=mmedia + +HEADERS=cdbase.h cdunix.h cdwin.h sndaiff.h sndbase.h sndcodec.h \ + sndcpcm.h sndesd.h sndfile.h sndg72x.h sndmsad.h sndoss.h \ + sndpcm.h sndulaw.h sndwav.h sndwin.h vidbase.h vidwin.h \ + vidxanm.h + OBJECTS=cdbase.o cdwin.o g711.o g721.o g723_24.o \ g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \ sndcpcm.o sndfile.o sndg72x.o sndpcm.o sndulaw.o \ sndwav.o sndwin.o vidbase.o vidwin.o vidxanm.o sndoss.o sndesd.o -# the comment at the end of the next line is needed because otherwise autoconf -# would remove this line completely - it contains a built-in hack to remove -# any VPATH assignment not containing ':' -VPATH = :$(top_srcdir)/src/mmedia # ':' for autoconf - -APPEXTRADEFS=-I$(top_srcdir)/include +APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makelib.env diff --git a/contrib/src/mmedia/sndwav.cpp b/contrib/src/mmedia/sndwav.cpp index 7d6d891878..7410212425 100644 --- a/contrib/src/mmedia/sndwav.cpp +++ b/contrib/src/mmedia/sndwav.cpp @@ -312,8 +312,14 @@ FAIL_WITH(s->Write(&signature, 4).LastWrite() != 4, wxSOUND_INVSTRM); delete frmt; } - + +#ifdef wxSIZE_T_IS_ULONG + // FIXME: we still need this horrible cast until wxDataOutputStream + // is made 64 bit friendly. + data << (unsigned int)(fmt_data.GetSize() + m_sndformat->GetBytesFromTime(time)); +#else data << (fmt_data.GetSize() + m_sndformat->GetBytesFromTime(time)); +#endif // We, finally, copy the header block to the output stream { diff --git a/contrib/src/mmedia/vidxanm.cpp b/contrib/src/mmedia/vidxanm.cpp index 4700a23803..a395c650f9 100644 --- a/contrib/src/mmedia/vidxanm.cpp +++ b/contrib/src/mmedia/vidxanm.cpp @@ -18,8 +18,10 @@ #include #endif +#ifdef __WXGTK__ // Pizza ! #include +#endif #include #include diff --git a/contrib/src/ogl/Makefile.in b/contrib/src/ogl/Makefile.in index 64f08fbfad..e1e0aedcd1 100644 --- a/contrib/src/ogl/Makefile.in +++ b/contrib/src/ogl/Makefile.in @@ -1,7 +1,8 @@ -# +# $Id$ -top_srcdir = @top_srcdir@ +top_srcdir = @top_srcdir@/.. top_builddir = ../../.. +libsrc_dir = contrib/src/ogl TARGET_LIBNAME=libogl @@ -9,14 +10,17 @@ LIBVERSION_CURRENT=1 LIBVERSION_REVISION=0 LIBVERSION_AGE=0 -OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \ - basic2.o canvas.o constrnt.o drawn.o mfutils.o ogldiag.o +HEADER_PATH=$(top_srcdir)/contrib/include/wx +HEADER_SUBDIR=ogl -# the comment at the end of the next line is needed because otherwise autoconf -# would remove this line completely - it contains a built-in hack to remove -# any VPATH assignment not containing ':' -VPATH = :$(top_srcdir)/src/ogl # ':' for autoconf +HEADERS=basic.h basicp.h bmpshape.h canvas.h composit.h constrnt.h \ + divided.h drawn.h drawnp.h lines.h linesp.h mfutils.h misc.h \ + ogl.h ogldiag.h -APPEXTRADEFS=-I$(top_srcdir)/include +OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \ + basic2.o canvas.o constrnt.o drawn.o mfutils.o ogldiag.o + +APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makelib.env + diff --git a/contrib/src/ogl/makefile.vc b/contrib/src/ogl/makefile.vc index df1072a2c2..f4d62a3a74 100644 --- a/contrib/src/ogl/makefile.vc +++ b/contrib/src/ogl/makefile.vc @@ -132,7 +132,8 @@ DOCSOURCES=$(LOCALDOCDIR)\ogl.tex \ $(LOCALDOCDIR)\topics.tex $(LOCALDOCDIR)\sample.tex html: $(DOCDIR)\html\ogl\ogl.htm -htmlhelp: $(DOCDIR)\html\ogl\ogl.chm +htmlhelp: $(DOCDIR)\htmlhelp\ogl.chm +htb: $(DOCDIR)\htb\ogl.htb hlp: $(DOCDIR)\winhelp\ogl.hlp pdfrtf: $(DOCDIR)\pdf\ogl.rtf ps: $(DOCDIR)\ps\ogl.ps @@ -166,16 +167,27 @@ $(DOCDIR)\html\ogl\ogl.htm: $(DOCSOURCES) copy *.gif $(DOCDIR)\html\ogl -start $(WAITFLAG) tex2rtf $(LOCALDOCDIR)\ogl.tex $(DOCDIR)\html\ogl\ogl.htm -twice -html -erase $(DOCDIR)\html\ogl\*.con - -erase *.con + -erase *.con -erase $(DOCDIR)\html\ogl\*.ref cd $(THISDIR) - -$(DOCDIR)\html\ogl\ogl.chm: $(DOCDIR)\html\ogl\ogl.htm $(DOCDIR)\html\ogl\ogl.hhp +$(DOCDIR)\htmlhelp\ogl.chm: $(DOCDIR)\html\ogl\ogl.htm $(DOCDIR)\html\ogl\ogl.hhp cd $(DOCDIR)\html\ogl -hhc ogl.hhp + move ogl.chm $(DOCDIR)\htmlhelp\ogl.chm cd $(THISDIR) +# An htb file is a zip file containing the .htm, .gif, .hhp, .hhc and .hhk +# files, renamed to htb. +# This can then be used with e.g. helpview. +# Optionally, a cached version of the .hhp file can be generated with hhp2cached. +$(DOCDIR)\htb\ogl.htb: $(DOCDIR)\html\ogl\ogl.htm + cd $(DOCDIR)\html\ogl + -erase /Y ogl.zip ogl.htb + zip32 ogl.zip *.htm *.gif *.hhp *.hhc *.hhk + -mkdir $(DOCDIR)\htb + move ogl.zip $(DOCDIR)\htb\ogl.htb + cd $(THISDIR) $(LOCALDOCDIR)\ogl.dvi: $(DOCSOURCES) cd $(LOCALDOCDIR) @@ -193,4 +205,3 @@ $(WXDIR)\docs\ps\ogl.ps: $(LOCALDOCDIR)\ogl.dvi move ogl.ps $(WXDIR)\docs\ps\ogl.ps cd $(THISDIR) - diff --git a/contrib/src/stc/Makefile.in b/contrib/src/stc/Makefile.in index 425ea48714..9f1ebcf396 100644 --- a/contrib/src/stc/Makefile.in +++ b/contrib/src/stc/Makefile.in @@ -5,12 +5,11 @@ # Version: $Id$ ############################################################################### -top_srcdir = @top_srcdir@ +top_srcdir = @top_srcdir@/.. top_builddir = ../../.. -this_dir = $(top_srcdir)/src/stc -scintilla_dir=$(this_dir)/scintilla -VPATH=$(this_dir)@PATH_IFS@$(scintilla_dir)/src # ':' for autoconf +scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla +libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src TARGET_LIBNAME=libstc @@ -18,23 +17,40 @@ LIBVERSION_CURRENT=1 LIBVERSION_REVISION=0 LIBVERSION_AGE=0 +HEADER_PATH=$(top_srcdir)/contrib/include/wx +HEADER_SUBDIR=stc + +HEADERS=stc.h + OBJECTS=PlatWX.o ScintillaWX.o stc.o \ - Accessor.o \ - AutoComplete.o \ + DocumentAccessor.o \ + LexCPP.o \ + LexHTML.o \ + LexLua.o \ + LexOthers.o \ + LexPerl.o \ + LexPython.o \ + LexSQL.o \ + LexVB.o \ + UniConversion.o \ + WindowAccessor.o \ + AutoComplete.o \ CallTip.o \ - CellBuffer.o \ - ContractionState.o \ + CellBuffer.o \ + ContractionState.o \ Document.o \ - Editor.o \ + Editor.o \ Indicator.o \ - KeyMap.o \ + KeyMap.o \ KeyWords.o \ - LineMarker.o \ + LineMarker.o \ PropSet.o \ - ScintillaBase.o \ + ScintillaBase.o \ Style.o \ - ViewStyle.o - -APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/include + ViewStyle.o \ + PosRegExp.o \ + + +APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include include $(top_builddir)/src/makelib.env diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 0dbd3d5ea7..e0eeab7d98 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -4,17 +4,23 @@ // Robin Dunn // The License.txt file describes the conditions under which this software may be distributed. +#include #include "Platform.h" #include "wx/stc/stc.h" + +#ifdef __WXGTK__ +#include +#endif + Point Point::FromLong(long lpoint) { - return Point(lpoint & 0xFFFF, lpoint >> 32); + return Point(lpoint & 0xFFFF, lpoint >> 16); } wxRect wxRectFromPRectangle(PRectangle prc) { wxRect rc(prc.left, prc.top, - prc.right-prc.left+1, prc.bottom-prc.top+1); + prc.right-prc.left, prc.bottom-prc.top); return rc; } @@ -105,14 +111,15 @@ Font::Font() { Font::~Font() { } -void Font::Create(const char *faceName, int size, bool bold, bool italic) { +void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic) { Release(); id = new wxFont(size, wxDEFAULT, italic ? wxITALIC : wxNORMAL, bold ? wxBOLD : wxNORMAL, false, - faceName); + faceName, + wxFONTENCODING_DEFAULT); } @@ -181,13 +188,21 @@ void Surface::BrushColor(Colour back) { } void Surface::SetFont(Font &font_) { - hdc->SetFont(*font_.GetID()); + if (font_.GetID()) { + hdc->SetFont(*font_.GetID()); + } } int Surface::LogPixelsY() { return hdc->GetPPI().y; } + +int Surface::DeviceHeightFont(int points) { + return points * LogPixelsY() / 72; +} + + void Surface::MoveTo(int x_, int y_) { x = x_; y = y_; @@ -232,7 +247,7 @@ void Surface::FillRectangle(PRectangle rc, Surface &surfacePattern) { void Surface::RoundedRectangle(PRectangle rc, Colour fore, Colour back) { PenColour(fore); BrushColor(back); - hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 8); + hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4); } void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) { @@ -242,7 +257,8 @@ void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) { } void Surface::Copy(PRectangle rc, Point from, Surface &surfaceSource) { - hdc->Blit(rc.left, rc.top, rc.Width(), rc.Height(), + wxRect r = wxRectFromPRectangle(rc); + hdc->Blit(r.x, r.y, r.width, r.height, surfaceSource.hdc, from.x, from.y, wxCOPY); } @@ -344,7 +360,8 @@ void Surface::SetClip(PRectangle rc) { hdc->SetClippingRegion(wxRectFromPRectangle(rc)); } - +void Surface::FlushCachedState() { +} Window::~Window() { } @@ -365,7 +382,8 @@ PRectangle Window::GetPosition() { } void Window::SetPosition(PRectangle rc) { - id->SetSize(rc.left, rc.top, rc.Width(), rc.Height()); + wxRect r = wxRectFromPRectangle(rc); + id->SetSize(r); } void Window::SetPositionRelative(PRectangle rc, Window) { @@ -374,7 +392,7 @@ void Window::SetPositionRelative(PRectangle rc, Window) { PRectangle Window::GetClientPosition() { wxSize sz = id->GetClientSize(); - return PRectangle(0, 0, sz.x - 1, sz.y - 1); + return PRectangle(0, 0, sz.x, sz.y); } void Window::Show(bool show) { @@ -386,7 +404,8 @@ void Window::InvalidateAll() { } void Window::InvalidateRectangle(PRectangle rc) { - id->Refresh(false, &wxRectFromPRectangle(rc)); + wxRect r = wxRectFromPRectangle(rc); + id->Refresh(false, &r); } void Window::SetFont(Font &font) { @@ -432,6 +451,76 @@ void Window::SetTitle(const char *s) { } +class wxSTCListBox : public wxListBox { +public: + wxSTCListBox(wxWindow* parent, wxWindowID id) + : wxListBox(parent, id, wxDefaultPosition, wxDefaultSize, + 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER) + {} + + void OnFocus(wxFocusEvent& event) { + GetParent()->SetFocus(); + event.Skip(); + } + +#ifdef __WXGTK__ + void DoSetFirstItem(int n); +#endif + +private: + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox) + EVT_SET_FOCUS(wxSTCListBox::OnFocus) +END_EVENT_TABLE() + + + + +#ifdef __WXGTK__ + // This can be removed after 2.2.2 I think +void wxSTCListBox::DoSetFirstItem( int n ) +{ + wxCHECK_RET( m_list, wxT("invalid listbox") ); + + if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list)) + return; + + // terribly efficient + const gchar *vadjustment_key = "gtk-vadjustment"; + guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key); + + GtkAdjustment *adjustment = + (GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id); + wxCHECK_RET( adjustment, wxT("invalid listbox code") ); + + GList *target = g_list_nth( m_list->children, n ); + wxCHECK_RET( target, wxT("invalid listbox index") ); + + GtkWidget *item = GTK_WIDGET(target->data); + wxCHECK_RET( item, wxT("invalid listbox code") ); + + // find the last item before this one which is already realized + size_t nItemsBefore; + for ( nItemsBefore = 0; item && (item->allocation.y == -1); nItemsBefore++ ) + { + target = target->prev; + if ( !target ) + { + // nothing we can do if there are no allocated items yet + return; + } + + item = GTK_WIDGET(target->data); + } + + gtk_adjustment_set_value(adjustment, + item->allocation.y + + nItemsBefore*item->allocation.height); +} +#endif + ListBox::ListBox() { } @@ -440,8 +529,32 @@ ListBox::~ListBox() { } void ListBox::Create(Window &parent, int ctrlID) { - id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize, - 0, NULL, wxLB_SINGLE | wxLB_SORT); + id = new wxSTCListBox(parent.id, ctrlID); +// id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize, +// 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER); +} + +PRectangle ListBox::GetDesiredRect() { + wxSize sz = ((wxListBox*)id)->GetBestSize(); + PRectangle rc; + rc.top = 0; + rc.left = 0; + if (sz.x > 150) // TODO: A better way to determine these max sizes + sz.x = 150; + if (sz.y > 100) + sz.y = 100; + rc.right = sz.x; + rc.bottom = sz.y; + + return rc; +} + +void ListBox::SetAverageCharWidth(int width) { + aveCharWidth = width; +} + +void ListBox::SetFont(Font &font) { + Window::SetFont(font); } void ListBox::Clear() { @@ -458,6 +571,13 @@ int ListBox::Length() { void ListBox::Select(int n) { ((wxListBox*)id)->SetSelection(n); +#ifdef __WXGTK__ + if (n > 4) + n = n - 4; + else + n = 1; + ((wxListBox*)id)->SetFirstItem(n); +#endif } int ListBox::GetSelection() { @@ -465,7 +585,14 @@ int ListBox::GetSelection() { } int ListBox::Find(const char *prefix) { - return ((wxListBox*)id)->FindString(prefix); + if (prefix) { + for (int x=0; x < ((wxListBox*)id)->Number(); x++) { + wxString text = ((wxListBox*)id)->GetString(x); + if (text.StartsWith(prefix)) + return x; + } + } + return -1; } void ListBox::GetValue(int n, char *value, int len) { diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index cd0064be5c..0912f8ee61 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -14,6 +14,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +#include + #include "ScintillaWX.h" #include "wx/stc/stc.h" @@ -60,6 +62,29 @@ void wxSTCDropTarget::OnLeave() { } +class wxSTCCallTip : public wxWindow { +public: + wxSTCCallTip(wxWindow* parent, int ID, CallTip* ct) + : wxWindow(parent, ID) + { + m_ct = ct; + } + + void OnPaint(wxPaintEvent& evt) { + wxPaintDC dc(this); + Surface surfaceWindow; + surfaceWindow.Init(&dc); + m_ct->PaintCT(&surfaceWindow); + surfaceWindow.Release(); + } + + CallTip* m_ct; + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSTCCallTip, wxWindow) + EVT_PAINT(wxSTCCallTip::OnPaint) +END_EVENT_TABLE() //---------------------------------------------------------------------- // Constructor/Destructor @@ -193,9 +218,8 @@ void ScintillaWX::NotifyParent(SCNotification scn) { void ScintillaWX::Copy() { if (currentPos != anchor) { char* text = CopySelectionRange(); - textDO.SetText(text); wxTheClipboard->Open(); - wxTheClipboard->SetData(&textDO); + wxTheClipboard->SetData(new wxTextDataObject(text)); wxTheClipboard->Close(); } } @@ -236,7 +260,7 @@ bool ScintillaWX::CanPaste() { } void ScintillaWX::CreateCallTipWindow(PRectangle) { - ct.wCallTip = new wxWindow(wDraw.GetID(), -1); + ct.wCallTip = new wxSTCCallTip(wDraw.GetID(), -1, &ct); ct.wDraw = ct.wCallTip; } @@ -249,8 +273,6 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { if (!enabled) popup.GetID()->Enable(cmd, enabled); - - // TODO: need to create event handler mappings for the cmd ID } @@ -259,18 +281,18 @@ void ScintillaWX::ClaimSelection() { } -LRESULT ScintillaWX::DefWndProc(UINT /*iMessage*/, WPARAM /*wParam*/, LPARAM /*lParam*/) { +long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) { return 0; } -LRESULT ScintillaWX::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { - switch (iMessage) { - case EM_CANPASTE: - return CanPaste(); - default: +long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { +// switch (iMessage) { +// case EM_CANPASTE: +// return CanPaste(); +// default: return ScintillaBase::WndProc(iMessage, wParam, lParam); - } - return 0; +// } +// return 0; } @@ -293,6 +315,11 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { FullPaint(); } paintState = notPainting; +#ifdef __WXGTK__ + // On wxGTK the editor window paints can overwrite the listbox... + if (ac.Active()) + ((wxWindow*)ac.lb.GetID())->Refresh(TRUE); +#endif } @@ -384,10 +411,36 @@ void ScintillaWX::DoButtonMove(Point pt) { void ScintillaWX::DoAddChar(char ch) { + //bool acActiveBeforeCharAdded = ac.Active(); AddChar(ch); + //if (acActiveBeforeCharAdded) + // AutoCompleteChanged(ch); } int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt) { + switch (key) { + case WXK_DOWN: key = SCK_DOWN; break; + case WXK_UP: key = SCK_UP; break; + case WXK_LEFT: key = SCK_LEFT; break; + case WXK_RIGHT: key = SCK_RIGHT; break; + case WXK_HOME: key = SCK_HOME; break; + case WXK_END: key = SCK_END; break; + case WXK_PRIOR: key = SCK_PRIOR; break; + case WXK_NEXT: key = SCK_NEXT; break; + case WXK_DELETE: key = SCK_DELETE; break; + case WXK_INSERT: key = SCK_INSERT; break; + case WXK_ESCAPE: key = SCK_ESCAPE; break; + case WXK_BACK: key = SCK_BACK; break; + case WXK_TAB: key = SCK_TAB; break; + case WXK_RETURN: key = SCK_RETURN; break; + case WXK_ADD: key = SCK_ADD; break; + case WXK_SUBTRACT: key = SCK_SUBTRACT; break; + case WXK_DIVIDE: key = SCK_DIVIDE; break; + case WXK_CONTROL: key = 0; break; + case WXK_ALT: key = 0; break; + case WXK_SHIFT: key = 0; break; + } + return KeyDown(key, shift, ctrl, alt); } @@ -401,6 +454,9 @@ void ScintillaWX::DoContextMenu(Point pt) { ContextMenu(pt); } +void ScintillaWX::DoOnListBox() { + AutoCompleteCompleted(); +} //---------------------------------------------------------------------- @@ -434,11 +490,15 @@ void ScintillaWX::DoDragLeave() { void ScintillaWX::FullPaint() { paintState = painting; rcPaint = GetTextRectangle(); + paintingAllText = true; wxClientDC dc(wMain.GetID()); Surface surfaceWindow; surfaceWindow.Init(&dc); Paint(&surfaceWindow, rcPaint); surfaceWindow.Release(); + +// wMain.GetID()->Refresh(FALSE); + paintState = notPainting; } diff --git a/contrib/src/stc/ScintillaWX.h b/contrib/src/stc/ScintillaWX.h index 2d273fc99a..b773eac3a9 100644 --- a/contrib/src/stc/ScintillaWX.h +++ b/contrib/src/stc/ScintillaWX.h @@ -97,8 +97,12 @@ public: virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); virtual void ClaimSelection(); - virtual LRESULT DefWndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); - virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); + virtual long DefWndProc(unsigned int iMessage, + unsigned long wParam, + long lParam); + virtual long WndProc(unsigned int iMessage, + unsigned long wParam, + long lParam); virtual void NotifyChange(); virtual void NotifyParent(SCNotification scn); @@ -126,6 +130,7 @@ public: void DoCommand(int ID); void DoContextMenu(Point pt); + void DoOnListBox(); // helpers @@ -139,7 +144,6 @@ private: bool capturedMouse; wxStyledTextCtrl* stc; - wxTextDataObject textDO; wxSTCDropTarget* dropTarget; wxDragResult dragResult; }; diff --git a/contrib/src/stc/StcVC.dsp b/contrib/src/stc/StcVC.dsp index 3b8fc6d9e7..5e77ef19e2 100644 --- a/contrib/src/stc/StcVC.dsp +++ b/contrib/src/stc/StcVC.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="StcVC" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 @@ -22,11 +22,9 @@ CFG=StcVC - Win32 Debug !MESSAGE # Begin Project -# PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe -RSC=rc.exe !IF "$(CFG)" == "StcVC - Win32 Release" @@ -40,11 +38,12 @@ RSC=rc.exe # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c # SUBTRACT CPP /YX -# ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -64,11 +63,12 @@ LIB32=link.exe -lib # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c # SUBTRACT CPP /YX -# ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -179,6 +179,34 @@ SOURCE=.\scintilla\src\KeyWords.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexCPP.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexHTML.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexOthers.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexPerl.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexPython.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexSQL.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexVB.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LineMarker.cxx # End Source File # Begin Source File diff --git a/contrib/src/stc/gen_iface.py b/contrib/src/stc/gen_iface.py new file mode 100644 index 0000000000..257180da6b --- /dev/null +++ b/contrib/src/stc/gen_iface.py @@ -0,0 +1,684 @@ +#!/bin/env python +#---------------------------------------------------------------------------- +# Name: gen_iface.py +# Purpose: Generate stc.h and stc.cpp from the info in Scintilla.iface +# +# Author: Robin Dunn +# +# Created: 5-Sept-2000 +# RCS-ID: $Id$ +# Copyright: (c) 2000 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------------- + + +import sys, string, re +from fileinput import FileInput + + +IFACE = './scintilla/include/Scintilla.iface' +H_TEMPLATE = './stc.h.in' +CPP_TEMPLATE = './stc.cpp.in' +H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' # +CPP_DEST = './stc.cpp' #'./stc_test.cpp' + + +# Value prefixes to convert +valPrefixes = [('SCI_', ''), + ('SC_', ''), + ('SCN_', None), # just toss these... + ('SCEN_', None), + ('SCE_', ''), + ('SCLEX_', 'LEX_'), + ('SCK_', 'KEY_'), + ('SCFIND_', 'FIND_'), + ('SCWS_', 'WS_'), +] + +# Message funcion values that should have a CMD_ constant as well +cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ] + + +# Map some generic typenames to wx types, using return value syntax +retTypeMap = { + 'position': 'int', + 'string': 'wxString', + 'colour': 'wxColour', + } + +# Map some generic typenames to wx types, using parameter syntax +paramTypeMap = { + 'position': 'int', + 'string': 'const wxString&', + 'colour': 'const wxColour&', + 'keymod': 'int', +} + +# Map of method info that needs tweaked. Either the name needs changed, or +# the method definition/implementation. Tuple items are: +# +# 1. New method name. None to skip the method, 0 to leave the +# default name. +# 2. Method definition for the .h file, 0 to leave alone +# 3. Method implementation for the .cpp file, 0 to leave alone. +# 4. tuple of Doc string lines, or 0 to leave alone. +# +methodOverrideMap = { + 'AddText' : (0, + 'void %s(const wxString& text);', + + '''void %s(const wxString& text) { + SendMsg(%s, text.Len(), (long)text.c_str());''', + 0), + + 'AddStyledText' : (0, + 'void %s(const wxString& text);', + + '''void %s(const wxString& text) { + SendMsg(%s, text.Len(), (long)text.c_str());''', + 0), + + 'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0), + 'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0), + + 'GetStyledText' : (0, + 'wxString %s(int startPos, int endPos);', + + '''wxString %s(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + TextRange tr; + tr.lpstrText = text.GetWriteBuf(len*2+1); + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + SendMsg(%s, 0, (long)&tr); + text.UngetWriteBuf(len*2); + return text;''', + + ('Retrieve a buffer of cells.',)), + + + 'PositionFromPoint' : (0, + 'int %s(wxPoint pt);', + + '''int %s(wxPoint pt) { + return SendMsg(%s, pt.x, pt.y);''', + + 0), + + 'GetCurLine' : (0, + 'wxString %s(int* OUTPUT=NULL);', + + '''wxString %s(int* linePos) { + wxString text; + int len = LineLength(GetCurrentLine()); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(%s, len, (long)buf); + text.UngetWriteBuf(); + if (linePos) *linePos = pos; + + return text;''', + + 0), + + 'SetUsePalette' : (None, 0,0,0), + + 'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0), + 'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0), + + 'MarkerDefine' : (0, + '''void %s(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour);''', + + '''void %s(int markerNumber, int markerSymbol, + const wxColour& foreground, + const wxColour& background) { + + SendMsg(%s, markerNumber, markerSymbol); + if (foreground.Ok()) + MarkerSetForeground(markerNumber, foreground); + if (background.Ok()) + MarkerSetBackground(markerNumber, background);''', + + ('Set the symbol used for a particular marker number,', + 'and optionally the for and background colours.')), + + 'SetMarginTypeN' : ('SetMarginType', 0, 0, 0), + 'GetMarginTypeN' : ('GetMarginType', 0, 0, 0), + 'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0), + 'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0), + 'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0), + 'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0), + 'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0), + 'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0), + + 'StyleSetFore' : ('StyleSetForeground', 0, 0, 0), + 'StyleSetBack' : ('StyleSetBackground', 0, 0, 0), + 'SetSelFore' : ('SetSelForeground', 0, 0, 0), + 'SetSelBack' : ('SetSelBackground', 0, 0, 0), + 'SetCaretFore' : ('SetCaretForeground', 0, 0, 0), + 'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0), + + # need to fix this to map between wx and scintilla encoding flags, leave it out for now... + 'StyleSetCharacterSet' : (None, 0, 0, 0), + + 'AssignCmdKey' : ('CmdKeyAssign', + 'void %s(int key, int modifiers, int cmd);', + + '''void %s(int key, int modifiers, int cmd) { + SendMsg(%s, MAKELONG(key, modifiers), cmd);''', + + 0), + + 'ClearCmdKey' : ('CmdKeyClear', + 'void %s(int key, int modifiers);', + + '''void %s(int key, int modifiers) { + SendMsg(%s, MAKELONG(key, modifiers));''', + + 0), + + 'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0), + + + 'SetStylingEx' : ('SetStyleBytes', + 'void %s(int length, char* styleBytes);', + + '''void %s(int length, char* styleBytes) { + SendMsg(%s, length, (long)styleBytes);''', + + 0), + + + 'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0), + 'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0), + 'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0), + 'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0), + + 'AutoCShow' : ('AutoCompShow', 0, 0, 0), + 'AutoCCancel' : ('AutoCompCancel', 0, 0, 0), + 'AutoCActive' : ('AutoCompActive', 0, 0, 0), + 'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0), + 'AutoCComplete' : ('AutoCompComplete', 0, 0, 0), + 'AutoCStops' : ('AutoCompStops', 0, 0, 0), + 'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0), + 'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0), + 'AutoCSelect' : ('AutoCompSelect', 0, 0, 0), + 'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0), + 'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0), + 'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0), + 'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0), + 'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0), + 'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0), + 'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0), + + 'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0), + 'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0), + + 'GetCaretFore' : ('GetCaretForeground', 0, 0, 0), + + 'GetUsePalette' : (None, 0, 0, 0), + + 'FindText' : (0, + '''int %s(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord);''', + '''int %s(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord) { + TextToFind ft; + int flags = 0; + + flags |= caseSensitive ? SCFIND_MATCHCASE : 0; + flags |= wholeWord ? SCFIND_WHOLEWORD : 0; + ft.chrg.cpMin = minPos; + ft.chrg.cpMax = maxPos; + ft.lpstrText = (char*)text.c_str(); + + return SendMsg(%s, flags, (long)&ft);''', + 0), + + 'FormatRange' : (0, + '''int %s(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect);''', + ''' int %s(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect) { + RangeToFormat fr; + + fr.hdc = draw; + fr.hdcTarget = target; + fr.rc.top = renderRect.GetTop(); + fr.rc.left = renderRect.GetLeft(); + fr.rc.right = renderRect.GetRight(); + fr.rc.bottom = renderRect.GetBottom(); + fr.rcPage.top = pageRect.GetTop(); + fr.rcPage.left = pageRect.GetLeft(); + fr.rcPage.right = pageRect.GetRight(); + fr.rcPage.bottom = pageRect.GetBottom(); + fr.chrg.cpMin = startPos; + fr.chrg.cpMax = endPos; + + return SendMsg(%s, doDraw, (long)&fr);''', + 0), + + + 'GetLine' : (0, + 'wxString %s(int line);', + + '''wxString %s(int line) { + wxString text; + int len = LineLength(line); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(%s, line, (long)buf); + text.UngetWriteBuf(); + + return text;''', + + ('Retrieve the contents of a line.',)), + + 'SetSel' : ('SetSelection', 0, 0, 0), + 'GetSelText' : ('GetSelectedText', + 'wxString %s();', + + '''wxString %s() { + wxString text; + int start; + int end; + + GetSelection(&start, &end); + int len = end - start; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(%s, 0, (long)buff); + text.UngetWriteBuf(); + return text;''', + + ('Retrieve the selected text.',)), + + 'GetTextRange' : (0, + 'wxString %s(int startPos, int endPos);', + + '''wxString %s(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + char* buff = text.GetWriteBuf(len+1); + TextRange tr; + tr.lpstrText = buff; + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + + SendMsg(%s, 0, (long)&tr); + text.UngetWriteBuf(); + return text;''', + + ('Retrieve a range of text.',)), + + 'PointXFromPosition' : (None, 0, 0, 0), + 'PointYFromPosition' : (None, 0, 0, 0), + + 'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0), + 'ReplaceSel' : ('ReplaceSelection', 0, 0, 0), + 'Null' : (None, 0, 0, 0), + + 'GetText' : (0, + 'wxString %s();', + + '''wxString %s() { + wxString text; + int len = GetTextLength()+1; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(%s, len, (long)buff); + buff[len] = 0; + text.UngetWriteBuf(); + return text;''', + + ('Retrieve all the text in the document.', )), + + 'GetDirectFunction' : (None, 0, 0, 0), + 'GetDirectPointer' : (None, 0, 0, 0), + + 'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0), + 'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0), + 'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0), + + + # Remove all methods that are key commands since they can be + # executed with CmdKeyExecute + 'LineDown' : (None, 0, 0, 0), + 'LineDownExtend' : (None, 0, 0, 0), + 'LineUp' : (None, 0, 0, 0), + 'LineUpExtend' : (None, 0, 0, 0), + 'CharLeft' : (None, 0, 0, 0), + 'CharLeftExtend' : (None, 0, 0, 0), + 'CharRight' : (None, 0, 0, 0), + 'CharRightExtend' : (None, 0, 0, 0), + 'WordLeft' : (None, 0, 0, 0), + 'WordLeftExtend' : (None, 0, 0, 0), + 'WordRight' : (None, 0, 0, 0), + 'WordRightExtend' : (None, 0, 0, 0), + 'Home' : (None, 0, 0, 0), + 'HomeExtend' : (None, 0, 0, 0), + 'LineEnd' : (None, 0, 0, 0), + 'LineEndExtend' : (None, 0, 0, 0), + 'DocumentStart' : (None, 0, 0, 0), + 'DocumentStartExtend' : (None, 0, 0, 0), + 'DocumentEnd' : (None, 0, 0, 0), + 'DocumentEndExtend' : (None, 0, 0, 0), + 'PageUp' : (None, 0, 0, 0), + 'PageUpExtend' : (None, 0, 0, 0), + 'PageDown' : (None, 0, 0, 0), + 'PageDownExtend' : (None, 0, 0, 0), + 'EditToggleOvertype' : (None, 0, 0, 0), + 'Cancel' : (None, 0, 0, 0), + 'DeleteBack' : (None, 0, 0, 0), + 'Tab' : (None, 0, 0, 0), + 'BackTab' : (None, 0, 0, 0), + 'NewLine' : (None, 0, 0, 0), + 'FormFeed' : (None, 0, 0, 0), + 'VCHome' : (None, 0, 0, 0), + 'VCHomeExtend' : (None, 0, 0, 0), + 'ZoomIn' : (None, 0, 0, 0), + 'ZoomOut' : (None, 0, 0, 0), + 'DelWordLeft' : (None, 0, 0, 0), + 'DelWordRight' : (None, 0, 0, 0), + 'LineCut' : (None, 0, 0, 0), + 'LineDelete' : (None, 0, 0, 0), + 'LineTranspose' : (None, 0, 0, 0), + 'LowerCase' : (None, 0, 0, 0), + 'UpperCase' : (None, 0, 0, 0), + 'LineScrollDown' : (None, 0, 0, 0), + 'LineScrollUp' : (None, 0, 0, 0), + + + 'GetDocPointer' : (0, + 'void* %s();', + '''void* %s() { + return (void*)SendMsg(%s);''', + 0), + + 'SetDocPointer' : (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, (long)docPointer);''', + 0), + + 'CreateDocument' : (0, + 'void* %s();', + '''void* %s() { + return (void*)SendMsg(%s);''', + 0), + + 'AddRefDocument' : (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, (long)docPointer);''', + 0), + + 'ReleaseDocument' : (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, (long)docPointer);''', + 0), + + 'GrabFocus' : (None, 0, 0, 0), + + '' : ('', 0, 0, 0), + + } + +#---------------------------------------------------------------------------- + +def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest): + curDocStrings = [] + values = [] + methods = [] + + # parse iface file + fi = FileInput(iface) + for line in fi: + line = line[:-1] + if line[:2] == '##' or line == '': + #curDocStrings = [] + continue + + op = line[:4] + if line[:2] == '# ': # a doc string + curDocStrings.append(line[2:]) + + elif op == 'val ': + parseVal(line[4:], values, curDocStrings) + curDocStrings = [] + + elif op == 'fun ' or op == 'set ' or op == 'get ': + parseFun(line[4:], methods, curDocStrings, values) + curDocStrings = [] + + elif op == 'cat ': + if string.strip(line[4:]) == 'Deprecated': + break # skip the rest of the file + + elif op == 'evt ': + pass + + else: + print '***** Unknown line type: ', line + + + # process templates + data = {} + data['VALUES'] = processVals(values) + defs, imps = processMethods(methods) + data['METHOD_DEFS'] = defs + data['METHOD_IMPS'] = imps + + # get template text + h_text = open(h_tmplt).read() + cpp_text = open(cpp_tmplt).read() + + # do the substitutions + h_text = h_text % data + cpp_text = cpp_text % data + + # write out destination files + open(h_dest, 'w').write(h_text) + open(cpp_dest, 'w').write(cpp_text) + + + +#---------------------------------------------------------------------------- + +def processVals(values): + text = [] + for name, value, docs in values: + if docs: + text.append('') + for x in docs: + text.append('// ' + x) + text.append('#define %s %s' % (name, value)) + return string.join(text, '\n') + +#---------------------------------------------------------------------------- + +def processMethods(methods): + defs = [] + imps = [] + + for retType, name, number, param1, param2, docs in methods: + retType = retTypeMap.get(retType, retType) + params = makeParamString(param1, param2) + + name, theDef, theImp, docs = checkMethodOverride(name, number, docs) + + if name is None: + continue + + # Build the method definition for the .h file + if docs: + defs.append('') + for x in docs: + defs.append(' // ' + x) + if not theDef: + theDef = ' %s %s(%s);' % (retType, name, params) + defs.append(theDef) + + # Build the method implementation string + if docs: + imps.append('') + for x in docs: + imps.append('// ' + x) + if not theImp: + theImp = '%s wxStyledTextCtrl::%s(%s) {\n ' % (retType, name, params) + + if retType == 'wxColour': + theImp = theImp + 'long c = ' + elif retType != 'void': + theImp = theImp + 'return ' + theImp = theImp + 'SendMsg(%s, %s, %s)' % (number, + makeArgString(param1), + makeArgString(param2)) + if retType == 'bool': + theImp = theImp + ' != 0' + if retType == 'wxColour': + theImp = theImp + ';\n return wxColourFromLong(c)' + + theImp = theImp + ';\n}' + imps.append(theImp) + + + return string.join(defs, '\n'), string.join(imps, '\n') + + +#---------------------------------------------------------------------------- + +def checkMethodOverride(name, number, docs): + theDef = theImp = None + if methodOverrideMap.has_key(name): + item = methodOverrideMap[name] + + if item[0] != 0: + name = item[0] + if item[1] != 0: + theDef = ' ' + (item[1] % name) + if item[2] != 0: + theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}' + if item[3] != 0: + docs = item[3] + + return name, theDef, theImp, docs + +#---------------------------------------------------------------------------- + +def makeArgString(param): + if not param: + return '0' + + typ, name = param + + if typ == 'string': + return '(long)%s.c_str()' % name + if typ == 'colour': + return 'wxColourAsLong(%s)' % name + + return name + +#---------------------------------------------------------------------------- + +def makeParamString(param1, param2): + def doOne(param): + if param: + aType = paramTypeMap.get(param[0], param[0]) + return aType + ' ' + param[1] + else: + return '' + + st = doOne(param1) + if st and param2: + st = st + ', ' + st = st + doOne(param2) + return st + + +#---------------------------------------------------------------------------- + +def parseVal(line, values, docs): + name, val = string.split(line, '=') + + # remove prefixes such as SCI, etc. + for old, new in valPrefixes: + lo = len(old) + if name[:lo] == old: + if new is None: + return + name = new + name[lo:] + + # add it to the list + values.append( ('wxSTC_' + name, val, docs) ) + +#---------------------------------------------------------------------------- + +funregex = re.compile(r'\s*([a-zA-Z0-9_]+)' # return type + '\s+([a-zA-Z0-9_]+)=' # name= + '([0-9]+)' # number + '\(([ a-zA-Z0-9_]*),' # (param, + '([ a-zA-Z0-9_]*)\)') # param) + +def parseFun(line, methods, docs, values): + def parseParam(param): + param = string.strip(param) + if param == '': + param = None + else: + param = tuple(string.split(param)) + return param + + mo = funregex.match(line) + if mo is None: + print "***** Line doesn't match! : " + line + + retType, name, number, param1, param2 = mo.groups() + + param1 = parseParam(param1) + param2 = parseParam(param2) + + # Special case. For the key command functionss we want a value defined too + num = string.atoi(number) + for v in cmdValues: + if (type(v) == type(()) and v[0] <= num < v[1]) or v == num: + parseVal('CMD_%s=%s' % (string.upper(name), number), values, ()) + + #if retType == 'void' and not param1 and not param2: + + methods.append( (retType, name, number, param1, param2, tuple(docs)) ) + + +#---------------------------------------------------------------------------- + + +def main(args): + # TODO: parse command line args to replace default input/output files??? + + # Now just do it + processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST) + + + +if __name__ == '__main__': + main(sys.argv) + +#---------------------------------------------------------------------------- + + diff --git a/contrib/src/stc/makefile.b32 b/contrib/src/stc/makefile.b32 index 3d52701553..0d86478b7c 100644 --- a/contrib/src/stc/makefile.b32 +++ b/contrib/src/stc/makefile.b32 @@ -2,7 +2,7 @@ # File: makefile.b32 # Author: Julian Smart # Created: 1999 -# Updated: +# Updated: # Copyright: # # Makefile : Builds wxMMedia library for 32-bit BC++ @@ -21,25 +21,38 @@ STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) LIBTARGET=$(WXDIR)\contrib\lib\stc.lib OBJECTS = \ - Accessor.obj \ + Accessor.obj \ AutoComplete.obj \ - CallTip.obj \ - CellBuffer.obj \ - ContractionState.obj\ - Document.obj \ + CallTip.obj \ + CellBuffer.obj \ + ContractionState.obj \ + Document.obj \ + DocumentAccessor.obj \ Editor.obj \ - Indicator.obj \ + Indicator.obj \ KeyMap.obj \ - KeyWords.obj \ - LineMarker.obj \ - PropSet.obj \ + KeyWords.obj \ + LexCPP.obj \ + LexHTML.obj \ + LexLua.obj \ + LexOthers.obj \ + LexPerl.obj \ + LexPython.obj \ + LexSQL.obj \ + LexVB.obj \ + LineMarker.obj \ + PropSet.obj \ + PosRegExp.obj \ ScintillaBase.obj \ Style.obj \ - ViewStyle.obj \ + UniConversion.obj \ + ViewStyle.obj \ + WindowAccessor.obj \ \ PlatWX.obj \ - ScintillaWX.obj \ - stc.obj \ + ScintillaWX.obj \ + stc.obj \ + !include $(WXDIR)\src\makelib.b32 diff --git a/contrib/src/stc/makefile.g95 b/contrib/src/stc/makefile.g95 index b6d802ecd9..5b0cc02089 100644 --- a/contrib/src/stc/makefile.g95 +++ b/contrib/src/stc/makefile.g95 @@ -25,6 +25,18 @@ OBJECTS = \ $(S)/ScintillaBase.$(OBJSUFF) \ $(S)/Style.$(OBJSUFF) \ $(S)/ViewStyle.$(OBJSUFF) \ + $(S)/LexCPP.$(OBJSUFF) \ + $(S)/LexHTML.$(OBJSUFF) \ + $(S)/LexLua.$(OBJSUFF) \ + $(S)/LexOthers.$(OBJSUFF) \ + $(S)/LexPerl.$(OBJSUFF) \ + $(S)/LexPython.$(OBJSUFF) \ + $(S)/LexSQL.$(OBJSUFF) \ + $(S)/LexVB.$(OBJSUFF) \ + $(S)/DocumentAccessor.$(OBJSUFF)\ + $(S)/UniConversion.$(OBJSUFF) \ + $(S)/WindowAccessor.$(OBJSUFF) \ + $(S)/PosRegExp.$(OBJSUFF) \ PlatWX.$(OBJSUFF) \ ScintillaWX.$(OBJSUFF) \ stc.$(OBJSUFF) diff --git a/contrib/src/stc/makefile.vc b/contrib/src/stc/makefile.vc index c1adeacff6..c101bba3f1 100644 --- a/contrib/src/stc/makefile.vc +++ b/contrib/src/stc/makefile.vc @@ -15,21 +15,32 @@ NOPCH=1 !include $(WXDIR)\src\makevc.env OBJECTS = \ - $(D)\Accessor.obj \ $(D)\AutoComplete.obj \ $(D)\CallTip.obj \ $(D)\CellBuffer.obj \ $(D)\ContractionState.obj\ $(D)\Document.obj \ + $(D)\DocumentAccessor.obj\ $(D)\Editor.obj \ $(D)\Indicator.obj \ $(D)\KeyMap.obj \ $(D)\KeyWords.obj \ + $(D)\LexCPP.obj \ + $(D)\LexHTML.obj \ + $(D)\LexLua.obj \ + $(D)\LexOthers.obj \ + $(D)\LexPerl.obj \ + $(D)\LexPython.obj \ + $(D)\LexSQL.obj \ + $(D)\LexVB.obj \ $(D)\LineMarker.obj \ + $(D)\PosRegExp.obj \ $(D)\PropSet.obj \ $(D)\ScintillaBase.obj \ $(D)\Style.obj \ + $(D)\UniConversion.obj \ $(D)\ViewStyle.obj \ + $(D)\WindowAccessor.obj \ \ $(D)\PlatWX.obj \ $(D)\ScintillaWX.obj \ diff --git a/contrib/src/stc/scintilla/README.txt b/contrib/src/stc/scintilla/README.txt index 705fb99652..b88d57495c 100644 --- a/contrib/src/stc/scintilla/README.txt +++ b/contrib/src/stc/scintilla/README.txt @@ -3,5 +3,5 @@ scintilla/include directories from the Scintilla/SCiTE source distribution. All other code needed to implement Scintilla on top of wxWindows is located in the directory above this one. -The current version of the Scintilla code is somewhere between 1.22 -and 1.23, (from their CVS.) +The current version of the Scintilla code is 1.32 + diff --git a/contrib/src/stc/scintilla/include/Accessor.h b/contrib/src/stc/scintilla/include/Accessor.h index 1bba4af55e..b4b7e62ecf 100644 --- a/contrib/src/stc/scintilla/include/Accessor.h +++ b/contrib/src/stc/scintilla/include/Accessor.h @@ -3,26 +3,30 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; + +class Accessor; + +typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); + +// Interface to data in a Scintilla class Accessor { protected: - // bufferSize is a trade off between time taken to copy the characters and SendMessage overhead + enum {extremePosition=0x7FFFFFFF}; + // bufferSize is a trade off between time taken to copy the characters and retrieval overhead // slopSize positions the buffer before the desired position in case there is some backtracking enum {bufferSize=4000, slopSize=bufferSize/8}; char buf[bufferSize+1]; - WindowID id; - PropSet &props; int startPos; int endPos; - int lenDoc; - int offset; // Optional but including an offset makes GCC generate better code - void Fill(int position); + int codePage; + + virtual bool InternalIsLeadByte(char ch)=0; + virtual void Fill(int position)=0; public: - Accessor(WindowID id_, PropSet &props_, int offset_=0) : - id(id_), props(props_), startPos(0x7FFFFFFF), endPos(0), - lenDoc(-1), offset(offset_) { - } + Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} + virtual ~Accessor() {} char operator[](int position) { - position += offset; if (position < startPos || position >= endPos) { Fill(position); } @@ -30,7 +34,6 @@ public: } char SafeGetCharAt(int position, char chDefault=' ') { // Safe version of operator[], returning a defined value for invalid position - position += offset; if (position < startPos || position >= endPos) { Fill(position); if (position < startPos || position >= endPos) { @@ -40,37 +43,28 @@ public: } return buf[position - startPos]; } - char StyleAt(int position); - int GetLine(int position); - int LineStart(int line); - int LevelAt(int line); - int Length(); - void Flush() { - startPos = 0x7FFFFFFF; - lenDoc = -1; + bool IsLeadByte(char ch) { + return codePage && InternalIsLeadByte(ch); } - int GetLineState(int line); - int SetLineState(int line, int state); - PropSet &GetPropSet() { return props; } -}; - -class StylingContext : public Accessor { - char styleBuf[bufferSize]; - int validLen; - char chFlags; - char chWhile; - unsigned int startSeg; -public: - StylingContext(WindowID id_, PropSet &props_, int offset_=0) : - Accessor(id_,props_,offset_), validLen(0), chFlags(0) {} - void StartAt(unsigned int start, char chMask=31); - void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; - void ColourSegment(unsigned int start, unsigned int end, int chAttr); - unsigned int GetStartSegment() { return startSeg; } - void StartSegment(unsigned int pos); - void ColourTo(unsigned int pos, int chAttr); - int GetLine(int position); - void SetLevel(int line, int level); - void Flush(); + void SetCodePage(int codePage_) { codePage = codePage_; } + + virtual char StyleAt(int position)=0; + virtual int GetLine(int position)=0; + virtual int LineStart(int line)=0; + virtual int LevelAt(int line)=0; + virtual int Length()=0; + virtual void Flush()=0; + virtual int GetLineState(int line)=0; + virtual int SetLineState(int line, int state)=0; + virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; + + // Style setting + virtual void StartAt(unsigned int start, char chMask=31)=0; + virtual void SetFlags(char chFlags_, char chWhile_)=0; + virtual unsigned int GetStartSegment()=0; + virtual void StartSegment(unsigned int pos)=0; + virtual void ColourTo(unsigned int pos, int chAttr)=0; + virtual void SetLevel(int line, int level)=0; + virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; }; diff --git a/contrib/src/stc/scintilla/include/KeyWords.h b/contrib/src/stc/scintilla/include/KeyWords.h index 2cc03b788f..3159dcc1b4 100644 --- a/contrib/src/stc/scintilla/include/KeyWords.h +++ b/contrib/src/stc/scintilla/include/KeyWords.h @@ -3,6 +3,39 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -void ColouriseDoc(int codePage, int startPos, int lengthDoc, int initStyle, - int language, WordList *keywordlists[], StylingContext &styler); +typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler); + +class LexerModule { + static LexerModule *base; + LexerModule *next; + int language; + LexerFunction fn; +public: + LexerModule(int language_, LexerFunction fn_); + static void Colourise(unsigned int startPos, int lengthDoc, int initStyle, + int language, WordList *keywordlists[], Accessor &styler); +}; + +inline bool iswordchar(char ch) { + return isalnum(ch) || ch == '.' || ch == '_'; +} + +inline bool iswordstart(char ch) { + return isalnum(ch) || ch == '_'; +} + +inline bool isoperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '.' || ch == '~') + return true; + return false; +} diff --git a/contrib/src/stc/scintilla/include/Platform.h b/contrib/src/stc/scintilla/include/Platform.h index 3a5e9816dc..de9cf202a1 100644 --- a/contrib/src/stc/scintilla/include/Platform.h +++ b/contrib/src/stc/scintilla/include/Platform.h @@ -45,6 +45,7 @@ #pragma warning(disable: 4800 4244 4309) #endif #include +#include #include #endif @@ -79,12 +80,6 @@ typedef wxWindow* WindowID; typedef wxMenu* MenuID; #endif -#if PLAT_GTK || PLAT_WX -#define SHIFT_PRESSED 1 -#define LEFT_CTRL_PRESSED 2 -#define LEFT_ALT_PRESSED 4 -#endif - // Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably class Point { @@ -198,6 +193,7 @@ public: }; class Font { +protected: FontID id; #if PLAT_WX int ascent; @@ -207,18 +203,21 @@ class Font { Font &operator=(const Font &) { id=0; return *this; } public: Font(); - ~Font(); + virtual ~Font(); - void Create(const char *faceName, int size, bool bold=false, bool italic=false); - void Release(); + virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic); + virtual void Release(); FontID GetID() { return id; } + // Alias another font - caller guarantees not to Release + void SetID(FontID id_) { id = id_; } friend class Surface; }; // A surface abstracts a place to draw class Surface { private: + bool unicodeMode; #if PLAT_GTK GdkDrawable *drawable; GdkGC *gc; @@ -266,6 +265,7 @@ public: bool Initialised(); void PenColour(Colour fore); int LogPixelsY(); + int DeviceHeightFont(int points); void MoveTo(int x_, int y_); void LineTo(int x_, int y_); void Polygon(Point *pts, int npts, Colour fore, Colour back); @@ -290,6 +290,11 @@ public: int SetPalette(Palette *pal, bool inBackGround); void SetClip(PRectangle rc); + void FlushCachedState(); + + void SetUnicodeMode(bool unicodeMode_) { + unicodeMode=unicodeMode_; + } }; // Class to hide the details of window manipulation @@ -300,6 +305,7 @@ protected: WindowID id; public: Window() : id(0) {} + Window(const Window &source) : id(source.id) {} virtual ~Window(); Window &operator=(WindowID id_) { id = id_; @@ -316,7 +322,7 @@ public: void Show(bool show=true); void InvalidateAll(); void InvalidateRectangle(PRectangle rc); - void SetFont(Font &font); + virtual void SetFont(Font &font); enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow }; void SetCursor(Cursor curs); void SetTitle(const char *s); @@ -333,14 +339,17 @@ class ListBox : public Window { WindowID scroller; int current; #endif + int desiredVisibleRows; + unsigned int maxItemCharacters; + unsigned int aveCharWidth; public: ListBox(); virtual ~ListBox(); - ListBox &operator=(WindowID id_) { - id = id_; - return *this; - } void Create(Window &parent, int ctrlID); + virtual void SetFont(Font &font); + void SetAverageCharWidth(int width); + void SetVisibleRows(int rows); + PRectangle GetDesiredRect(); void Clear(); void Append(char *s); int Length(); @@ -385,6 +394,16 @@ public: // These are utility functions not really tied to a platform static int Minimum(int a, int b); static int Maximum(int a, int b); + // Next three assume 16 bit shorts and 32 bit longs + static long LongFromTwoShorts(short a,short b) { + return (a) | ((b) << 16); + } + static short HighShortFromLong(long x) { + return static_cast(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast(x & 0xffff); + } static void DebugPrintf(const char *format, ...); static int Clamp(int val, int minVal, int maxVal); }; diff --git a/contrib/src/stc/scintilla/include/PosRegExp.h b/contrib/src/stc/scintilla/include/PosRegExp.h new file mode 100644 index 0000000000..b915b1ed49 --- /dev/null +++ b/contrib/src/stc/scintilla/include/PosRegExp.h @@ -0,0 +1,138 @@ +#ifndef POSREGEXP_H +#define POSREGEXP_H + +#define MatchesNum 0x10 + +enum EOps +{ + ReBlockOps = 0x1000, + ReMul, // * + RePlus, // + + ReQuest, // ? + ReNGMul, // *? + ReNGPlus, // +? + ReNGQuest, // ?? + ReRangeN, // {n,} + ReRangeNM, // {n,m} + ReNGRangeN, // {n,}? + ReNGRangeNM, // {n,m}? + ReOr, // | + ReBehind = 0x1100, // ?#n + ReNBehind = 0x1200, // ?~n + ReAhead = 0x1300, // ?= + ReNAhead = 0x1400, // ?! + + ReSymbolOps = 0x2000, + ReEmpty, + ReSymb, // a b \W \s ... + ReEnum, // [] + ReNEnum, // [^] + ReBrackets, // (...) + ReBkTrace = 0x2100, // \yN + ReBkBrack = 0x2200 // \N +}; + +enum ESymbols +{ + ReAnyChr = 0x4000, // . + ReSoL, // ^ + ReEoL, // $ + ReDigit, // \d + ReNDigit, // \D + ReWordSymb, // \w + ReNWordSymb, // \W + ReWSpace, // \s + ReNWSpace, // \S + ReUCase, // \u + ReNUCase , // \l + ReWBound, // \b + ReNWBound, // \B + RePreNW, // \c + ReStart, // \m + ReEnd, // \M + + ReChr = 0x0 // Char in Lower Byte +}; +enum ETempSymb +{ + ReTemp = 0x7000, + ReLBrack, ReRBrack, + ReEnumS, ReEnumE, ReNEnumS, + ReRangeS, ReRangeE, ReNGRangeE, ReFrToEnum +}; + +#define BackSlash '\\' + +typedef union SCharData +{ + int IArr[8]; + char CArr[32]; + void SetBit(unsigned char Bit); + void ClearBit(unsigned char Bit); + bool GetBit(unsigned char Bit); +} *PCharData; + +typedef struct SRegInfo +{ + SRegInfo(); + ~SRegInfo(); + + EOps Op; + union{ + SRegInfo *Param; + int Symb; + PCharData ChrClass; + }un; + int s,e; + SRegInfo *Parent; + SRegInfo *Next; +} *PRegInfo; + +typedef struct SMatches +{ + int s[MatchesNum]; + int e[MatchesNum]; + int CurMatch; +} *PMatches; + +typedef class PosRegExp +{ + PRegInfo Info; + PMatches BkTrace; + bool NoCase,Extend,NoMoves; + bool Error; + int *Exprn; + int posParse; + int posEnd,posStart; + int posBkStr; + int FirstChar; + + bool SetExprLow(const char *Expr); + bool SetStructs(PRegInfo &Info,int st,int end); + void Optimize(); + bool CheckSymb(int Symb,bool Inc); + bool LowParse(PRegInfo Re); + bool LowParseRe(PRegInfo &Next); + bool LowCheckNext(PRegInfo Re); + bool ParseRe(int posStr); + bool QuickCheck(); +public: + PMatches Matches; + int Ok, CurMatch; + + void *param; + char (*CharAt)(int pos, void *param); + + PosRegExp(); + ~PosRegExp(); + + bool isok(); + bool SetNoMoves(bool Moves); + bool SetBkTrace(int posStr,PMatches Trace); + bool SetExpr(const char *Expr); + bool Parse(int posStr, int posStop, PMatches Mtch); + bool Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves = -1); + bool Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res); +} *PPosRegExp; + +#endif /* POSREGEXP_H */ diff --git a/contrib/src/stc/scintilla/include/PropSet.h b/contrib/src/stc/scintilla/include/PropSet.h index 31da01f954..025174f8ab 100644 --- a/contrib/src/stc/scintilla/include/PropSet.h +++ b/contrib/src/stc/scintilla/include/PropSet.h @@ -8,44 +8,92 @@ bool EqualCaseInsensitive(const char *a, const char *b); +#if PLAT_WIN +#define strcasecmp stricmp +#define strncasecmp strnicmp +#endif + +#ifdef __WXMSW__ +#define strcasecmp stricmp +#define strncasecmp strnicmp +#endif + // Define another string class. // While it would be 'better' to use std::string, that doubles the executable size. -inline char *StringDup(const char *s) { +inline char *StringDup(const char *s, int len=-1) { if (!s) return 0; - char *sNew = new char[strlen(s) + 1]; - if (sNew) - strcpy(sNew, s); + if (len == -1) + len = strlen(s); + char *sNew = new char[len + 1]; + if (sNew) { + strncpy(sNew, s, len); + sNew[len] = '\0'; + } return sNew; } class SString { char *s; + int ssize; public: + typedef const char* const_iterator; + typedef int size_type; + static size_type npos; + const char* begin(void) const { + return s; + } + const char* end(void) const { + return &s[ssize]; + } + size_type size(void) const { + if (s) + return ssize; + else + return 0; + } + SString &assign(const char* sother, int size_ = -1) { + char *t = s; + s = StringDup(sother,size_); + ssize = (s) ? strlen(s) : 0; + delete []t; + return *this; + } + SString &assign(const SString& sother, int size_ = -1) { + return assign(sother.s,size_); + } + SString &assign(const_iterator ibeg, const_iterator iend) { + return assign(ibeg,iend - ibeg); + } SString() { s = 0; + ssize = 0; } SString(const SString &source) { s = StringDup(source.s); + ssize = (s) ? strlen(s) : 0; } SString(const char *s_) { s = StringDup(s_); + ssize = (s) ? strlen(s) : 0; } SString(int i) { char number[100]; sprintf(number, "%0d", i); - //itoa(i, number, 10); s = StringDup(number); + ssize = (s) ? strlen(s) : 0; } ~SString() { delete []s; s = 0; + ssize = 0; } SString &operator=(const SString &source) { if (this != &source) { delete []s; s = StringDup(source.s); + ssize = (s) ? strlen(s) : 0; } return *this; } @@ -56,6 +104,9 @@ public: return false; return strcmp(s, other.s) == 0; } + bool operator!=(const SString &other) const { + return !operator==(other); + } bool operator==(const char *sother) const { if ((s == 0) && (sother == 0)) return true; @@ -63,6 +114,9 @@ public: return false; return strcmp(s, sother) == 0; } + bool operator!=(const char *sother) const { + return !operator==(sother); + } const char *c_str() const { if (s) return s; @@ -75,106 +129,116 @@ public: else return 0; } - char operator[](int i) { + char operator[](int i) const { if (s) return s[i]; else return '\0'; } SString &operator +=(const char *sother) { + return append(sother,-1); + } + SString &operator +=(const SString &sother) { + return append(sother.s,sother.ssize); + } + SString &operator +=(char ch) { + return append(&ch,1); + } + SString &append(const char* sother, int lenOther) { int len = length(); - int lenOther = strlen(sother); + if(lenOther < 0) + lenOther = strlen(sother); char *sNew = new char[len + lenOther + 1]; if (sNew) { if (s) memcpy(sNew, s, len); - memcpy(sNew + len, sother, lenOther); + strncpy(&sNew[len], sother, lenOther); sNew[len + lenOther] = '\0'; delete []s; s = sNew; + ssize = (s) ? strlen(s) : 0; } return *this; } - int value() { + int value() const { if (s) return atoi(s); - else + else return 0; } + void substitute(char find, char replace) { + char *t = s; + while (t) { + t = strchr(t, find); + if (t) + *t = replace; + } + } + // I don't think this really belongs here -- Neil + void correctPath() { +#ifdef unix + substitute('\\', '/'); +#else + substitute('/', '\\'); +#endif + } +}; + +struct Property { + unsigned int hash; + char *key; + char *val; + Property *next; + Property() : hash(0), key(0), val(0), next(0) {} }; class PropSet { private: - char **vals; - int size; - int used; + enum { hashRoots=31 }; + Property *props[hashRoots]; public: PropSet *superPS; PropSet(); ~PropSet(); - void EnsureCanAddEntry(); void Set(const char *key, const char *val); void Set(char *keyval); SString Get(const char *key); + SString GetExpanded(const char *key); + SString Expand(const char *withvars); int GetInt(const char *key, int defaultValue=0); SString GetWild(const char *keybase, const char *filename); SString GetNewExpand(const char *keybase, const char *filename); void Clear(); - void ReadFromMemory(const char *data, int len); - void Read(const char *filename); -}; - -// This is a fixed length list of strings suitable for display in combo boxes -// as a memory of user entries -template -class EntryMemory { - SString entries[sz]; -public: - void Insert(SString s) { - for (int i=0;i0;j--) { - entries[j] = entries[j-1]; - } - entries[0] = s; - return; - } - } - for (int k=sz-1;k>0;k--) { - entries[k] = entries[k-1]; - } - entries[0] = s; - } - int Length() const { - int len = 0; - for (int i=0;i?@[\\]^`{|}~", ch) != NULL; +} + #endif diff --git a/contrib/src/stc/scintilla/include/SciLexer.h b/contrib/src/stc/scintilla/include/SciLexer.h index d6667e4e25..69402ab9ab 100644 --- a/contrib/src/stc/scintilla/include/SciLexer.h +++ b/contrib/src/stc/scintilla/include/SciLexer.h @@ -3,11 +3,15 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + #ifndef SCILEXER_H #define SCILEXER_H // SciLexer features - not in standard Scintilla +//++Autogenerated -- start of section automatically generated from Scintilla.iface #define SCLEX_CONTAINER 0 #define SCLEX_NULL 1 #define SCLEX_PYTHON 2 @@ -21,8 +25,10 @@ #define SCLEX_ERRORLIST 10 #define SCLEX_MAKEFILE 11 #define SCLEX_BATCH 12 - -// Lexical states for SCLEX_PYTHON +#define SCLEX_XCODE 13 +#define SCLEX_LATEX 14 +#define SCLEX_LUA 15 +#define SCLEX_DIFF 16 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 #define SCE_P_NUMBER 2 @@ -35,8 +41,8 @@ #define SCE_P_DEFNAME 9 #define SCE_P_OPERATOR 10 #define SCE_P_IDENTIFIER 11 - -// Lexical states for SCLEX_CPP, SCLEX_VB +#define SCE_P_COMMENTBLOCK 12 +#define SCE_P_STRINGEOL 13 #define SCE_C_DEFAULT 0 #define SCE_C_COMMENT 1 #define SCE_C_COMMENTLINE 2 @@ -45,13 +51,12 @@ #define SCE_C_WORD 5 #define SCE_C_STRING 6 #define SCE_C_CHARACTER 7 -#define SCE_C_PUNTUATION 8 +#define SCE_C_UUID 8 #define SCE_C_PREPROCESSOR 9 #define SCE_C_OPERATOR 10 #define SCE_C_IDENTIFIER 11 #define SCE_C_STRINGEOL 12 - -// Lexical states for SCLEX_HTML, SCLEX_xML +#define SCE_C_VERBATIM 13 #define SCE_H_DEFAULT 0 #define SCE_H_TAG 1 #define SCE_H_TAGUNKNOWN 2 @@ -63,51 +68,90 @@ #define SCE_H_OTHER 8 #define SCE_H_COMMENT 9 #define SCE_H_ENTITY 10 -// Embedded Javascript -#define SCE_HJ_START 11 -#define SCE_HJ_DEFAULT 12 -#define SCE_HJ_COMMENT 13 -#define SCE_HJ_COMMENTLINE 14 -#define SCE_HJ_COMMENTDOC 15 -#define SCE_HJ_NUMBER 16 -#define SCE_HJ_WORD 17 -#define SCE_HJ_KEYWORD 18 -#define SCE_HJ_DOUBLESTRING 19 -#define SCE_HJ_SINGLESTRING 20 -#define SCE_HJ_SYMBOLS 21 -#define SCE_HJ_STRINGEOL 28 -// XML and ASP -#define SCE_H_TAGEND 22 -#define SCE_H_XMLSTART 23 -#define SCE_H_XMLEND 24 -#define SCE_H_SCRIPT 25 -#define SCE_H_ASP 26 -#define SCE_H_ASPAT 27 -// Embedded VBScript -#define SCE_HB_START 40 -#define SCE_HB_DEFAULT 41 -#define SCE_HB_COMMENTLINE 42 -#define SCE_HB_NUMBER 43 -#define SCE_HB_WORD 44 -#define SCE_HB_STRING 45 -#define SCE_HB_IDENTIFIER 46 -#define SCE_HB_STRINGEOL 47 -// Embedded Python -#define SCE_HP_START 50 -#define SCE_HP_DEFAULT 51 -#define SCE_HP_COMMENTLINE 52 -#define SCE_HP_NUMBER 53 -#define SCE_HP_STRING 54 -#define SCE_HP_CHARACTER 55 -#define SCE_HP_WORD 56 -#define SCE_HP_TRIPLE 57 -#define SCE_HP_TRIPLEDOUBLE 58 -#define SCE_HP_CLASSNAME 59 -#define SCE_HP_DEFNAME 60 -#define SCE_HP_OPERATOR 61 -#define SCE_HP_IDENTIFIER 62 - -// Lexical states for SCLEX_PERL +#define SCE_H_TAGEND 11 +#define SCE_H_XMLSTART 12 +#define SCE_H_XMLEND 13 +#define SCE_H_SCRIPT 14 +#define SCE_H_ASP 15 +#define SCE_H_ASPAT 16 +#define SCE_H_CDATA 17 +#define SCE_H_QUESTION 18 +#define SCE_H_VALUE 19 +#define SCE_HJ_START 40 +#define SCE_HJ_DEFAULT 41 +#define SCE_HJ_COMMENT 42 +#define SCE_HJ_COMMENTLINE 43 +#define SCE_HJ_COMMENTDOC 44 +#define SCE_HJ_NUMBER 45 +#define SCE_HJ_WORD 46 +#define SCE_HJ_KEYWORD 47 +#define SCE_HJ_DOUBLESTRING 48 +#define SCE_HJ_SINGLESTRING 49 +#define SCE_HJ_SYMBOLS 50 +#define SCE_HJ_STRINGEOL 51 +#define SCE_HJA_START 55 +#define SCE_HJA_DEFAULT 56 +#define SCE_HJA_COMMENT 57 +#define SCE_HJA_COMMENTLINE 58 +#define SCE_HJA_COMMENTDOC 59 +#define SCE_HJA_NUMBER 60 +#define SCE_HJA_WORD 61 +#define SCE_HJA_KEYWORD 62 +#define SCE_HJA_DOUBLESTRING 63 +#define SCE_HJA_SINGLESTRING 64 +#define SCE_HJA_SYMBOLS 65 +#define SCE_HJA_STRINGEOL 66 +#define SCE_HB_START 70 +#define SCE_HB_DEFAULT 71 +#define SCE_HB_COMMENTLINE 72 +#define SCE_HB_NUMBER 73 +#define SCE_HB_WORD 74 +#define SCE_HB_STRING 75 +#define SCE_HB_IDENTIFIER 76 +#define SCE_HB_STRINGEOL 77 +#define SCE_HBA_START 80 +#define SCE_HBA_DEFAULT 81 +#define SCE_HBA_COMMENTLINE 82 +#define SCE_HBA_NUMBER 83 +#define SCE_HBA_WORD 84 +#define SCE_HBA_STRING 85 +#define SCE_HBA_IDENTIFIER 86 +#define SCE_HBA_STRINGEOL 87 +#define SCE_HP_START 90 +#define SCE_HP_DEFAULT 91 +#define SCE_HP_COMMENTLINE 92 +#define SCE_HP_NUMBER 93 +#define SCE_HP_STRING 94 +#define SCE_HP_CHARACTER 95 +#define SCE_HP_WORD 96 +#define SCE_HP_TRIPLE 97 +#define SCE_HP_TRIPLEDOUBLE 98 +#define SCE_HP_CLASSNAME 99 +#define SCE_HP_DEFNAME 100 +#define SCE_HP_OPERATOR 101 +#define SCE_HP_IDENTIFIER 102 +#define SCE_HPA_START 105 +#define SCE_HPA_DEFAULT 106 +#define SCE_HPA_COMMENTLINE 107 +#define SCE_HPA_NUMBER 108 +#define SCE_HPA_STRING 109 +#define SCE_HPA_CHARACTER 110 +#define SCE_HPA_WORD 111 +#define SCE_HPA_TRIPLE 112 +#define SCE_HPA_TRIPLEDOUBLE 113 +#define SCE_HPA_CLASSNAME 114 +#define SCE_HPA_DEFNAME 115 +#define SCE_HPA_OPERATOR 116 +#define SCE_HPA_IDENTIFIER 117 +#define SCE_HPHP_DEFAULT 118 +#define SCE_HPHP_HSTRING 119 +#define SCE_HPHP_SIMPLESTRING 120 +#define SCE_HPHP_WORD 121 +#define SCE_HPHP_NUMBER 122 +#define SCE_HPHP_VARIABLE 123 +#define SCE_HPHP_COMMENT 124 +#define SCE_HPHP_COMMENTLINE 125 +#define SCE_HPHP_STRINGEOL 126 #define SCE_PL_DEFAULT 0 #define SCE_PL_HERE 1 #define SCE_PL_COMMENTLINE 2 @@ -130,5 +174,31 @@ #define SCE_PL_LONGQUOTE 19 #define SCE_PL_BACKTICKS 20 #define SCE_PL_DATASECTION 21 - +#define SCE_L_DEFAULT 0 +#define SCE_L_COMMAND 1 +#define SCE_L_TAG 2 +#define SCE_L_MATH 3 +#define SCE_L_COMMENT 4 +#define SCE_LUA_DEFAULT 0 +#define SCE_LUA_COMMENT 1 +#define SCE_LUA_COMMENTLINE 2 +#define SCE_LUA_COMMENTDOC 3 +#define SCE_LUA_NUMBER 4 +#define SCE_LUA_WORD 5 +#define SCE_LUA_STRING 6 +#define SCE_LUA_CHARACTER 7 +#define SCE_LUA_LITERALSTRING 8 +#define SCE_LUA_PREPROCESSOR 9 +#define SCE_LUA_OPERATOR 10 +#define SCE_LUA_IDENTIFIER 11 +#define SCE_LUA_STRINGEOL 12 +#define SCE_ERR_DEFAULT 0 +#define SCE_ERR_PYTHON 1 +#define SCE_ERR_GCC 2 +#define SCE_ERR_MS 3 +#define SCE_ERR_CMD 4 +#define SCE_ERR_BORLAND 5 +#define SCE_ERR_PERL 6 +//--Autogenerated -- end of section automatically generated from Scintilla.iface + #endif diff --git a/contrib/src/stc/scintilla/include/Scintilla.h b/contrib/src/stc/scintilla/include/Scintilla.h index 07572168dc..ca81d135bd 100644 --- a/contrib/src/stc/scintilla/include/Scintilla.h +++ b/contrib/src/stc/scintilla/include/Scintilla.h @@ -3,117 +3,74 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + #ifndef SCINTILLA_H #define SCINTILLA_H // Compile-time configuration options #define MACRO_SUPPORT 1 // Comment out to remove macro hooks -#if PLAT_GTK -#include -#include - -#ifdef __cplusplus -extern "C" { +#if PLAT_WIN +#ifdef STATIC_BUILD +void Scintilla_RegisterClasses(HINSTANCE hInstance); +#endif #endif -#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) -#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAS T (klass, scintilla_get_type (), ScintillaClass) -#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) +typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wParam, long lParam); - typedef struct _ScintillaObject ScintillaObject; - typedef struct _ScintillaClass ScintillaClass; - - struct _ScintillaObject - { - GtkFixed vbox; - void *pscin; - }; - - struct _ScintillaClass - { - GtkFixedClass parent_class; - - void (* command) (ScintillaObject *ttt); - void (* notify) (ScintillaObject *ttt); - }; - - guint scintilla_get_type (void); - GtkWidget* scintilla_new (void); - void scintilla_set_id (ScintillaObject *sci,int id); - long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam); - -#include "WinDefs.h" - -#ifdef __cplusplus -} -#endif - -#endif - -#if PLAT_WX -#include "WinDefs.h" -#endif - -// Both GTK and Windows - -#define INVALID_POSITION -1 - -// Define start of Scintilla messages to be greater than all edit (EM_*) messages -// as many EM_ messages can be used. +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define INVALID_POSITION -1 #define SCI_START 2000 #define SCI_OPTIONAL_START 3000 #define SCI_LEXER_START 4000 - -#define SCI_ADDTEXT SCI_START + 1 -#define SCI_ADDSTYLEDTEXT SCI_START + 2 -#define SCI_INSERTTEXT SCI_START + 3 -#define SCI_CLEARALL SCI_START + 4 -#define SCI_GETLENGTH SCI_START + 6 -#define SCI_GETCHARAT SCI_START + 7 -#define SCI_GETCURRENTPOS SCI_START + 8 -#define SCI_GETANCHOR SCI_START + 9 -#define SCI_GETSTYLEAT SCI_START + 10 - -#define SCI_REDO SCI_START + 11 -#define SCI_SETUNDOCOLLECTION SCI_START + 12 -#define SCI_SELECTALL SCI_START + 13 -#define SCI_SETSAVEPOINT SCI_START + 14 -#define SCI_GETSTYLEDTEXT SCI_START + 15 -#define SCI_CANREDO SCI_START + 16 -#define SCI_MARKERLINEFROMHANDLE SCI_START + 17 -#define SCI_MARKERDELETEHANDLE SCI_START + 18 - -#define SC_UNDOCOLLECT_NONE 0 -#define SC_UNDOCOLLECT_AUTOSTART 1 - -#define SCI_GETVIEWWS SCI_START + 20 -#define SCI_SETVIEWWS SCI_START + 21 -#define SCI_CHANGEPOSITION SCI_START + 22 -#define SCI_GOTOLINE SCI_START + 24 -#define SCI_GOTOPOS SCI_START + 25 -#define SCI_SETANCHOR SCI_START + 26 -#define SCI_GETCURLINE SCI_START + 27 -#define SCI_GETENDSTYLED SCI_START + 28 -#define SCI_CONVERTEOLS SCI_START + 29 - -#define SCI_GETEOLMODE SCI_START + 30 -#define SCI_SETEOLMODE SCI_START + 31 - +#define SCI_ADDTEXT 2001 +#define SCI_ADDSTYLEDTEXT 2002 +#define SCI_INSERTTEXT 2003 +#define SCI_CLEARALL 2004 +#define SCI_CLEARDOCUMENTSTYLE 2005 +#define SCI_GETLENGTH 2006 +#define SCI_GETCHARAT 2007 +#define SCI_GETCURRENTPOS 2008 +#define SCI_GETANCHOR 2009 +#define SCI_GETSTYLEAT 2010 +#define SCI_REDO 2011 +#define SCI_SETUNDOCOLLECTION 2012 +#define SCI_SELECTALL 2013 +#define SCI_SETSAVEPOINT 2014 +#define SCI_GETSTYLEDTEXT 2015 +#define SCI_CANREDO 2016 +#define SCI_MARKERLINEFROMHANDLE 2017 +#define SCI_MARKERDELETEHANDLE 2018 +#define SCI_GETUNDOCOLLECTION 2019 +#define SCWS_INVISIBLE 0 +#define SCWS_VISIBLEALWAYS 1 +#define SCWS_VISIBLEAFTERINDENT 2 +#define SCI_GETVIEWWS 2020 +#define SCI_SETVIEWWS 2021 +#define SCI_POSITIONFROMPOINT 2022 +#define SCI_GOTOLINE 2024 +#define SCI_GOTOPOS 2025 +#define SCI_SETANCHOR 2026 +#define SCI_GETCURLINE 2027 +#define SCI_GETENDSTYLED 2028 +#define SCI_CONVERTEOLS 2029 #define SC_EOL_CRLF 0 #define SC_EOL_CR 1 #define SC_EOL_LF 2 - -#define SCI_STARTSTYLING SCI_START + 32 -#define SCI_SETSTYLING SCI_START + 33 - -#define SCI_SETBUFFEREDDRAW SCI_START + 35 -#define SCI_SETTABWIDTH SCI_START + 36 -#define SCI_SETCODEPAGE SCI_START + 37 -#define SCI_SETUSEPALETTE SCI_START + 39 - +#define SCI_GETEOLMODE 2030 +#define SCI_SETEOLMODE 2031 +#define SCI_STARTSTYLING 2032 +#define SCI_SETSTYLING 2033 +#define SCI_GETBUFFEREDDRAW 2034 +#define SCI_SETBUFFEREDDRAW 2035 +#define SCI_SETTABWIDTH 2036 +#define SCI_GETTABWIDTH 2121 +#define SC_CP_UTF8 65001 +#define SCI_SETCODEPAGE 2037 +#define SCI_SETUSEPALETTE 2039 #define MARKER_MAX 31 - #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 #define SC_MARK_ARROW 2 @@ -123,217 +80,296 @@ extern "C" { #define SC_MARK_ARROWDOWN 6 #define SC_MARK_MINUS 7 #define SC_MARK_PLUS 8 - -#define SCI_MARKERDEFINE SCI_START + 40 -#define SCI_MARKERSETFORE SCI_START + 41 -#define SCI_MARKERSETBACK SCI_START + 42 -#define SCI_MARKERADD SCI_START + 43 -#define SCI_MARKERDELETE SCI_START + 44 -#define SCI_MARKERDELETEALL SCI_START + 45 -#define SCI_MARKERGET SCI_START + 46 -#define SCI_MARKERNEXT SCI_START + 47 -#define SCI_MARKERPREVIOUS SCI_START + 48 - #define SC_MARKNUM_FOLDER 30 #define SC_MARKNUM_FOLDEROPEN 31 - -#define SC_MASK_FOLDERS ((1< start a category +## fun -> a function +## get -> a property get function +## set -> a property set function +## val -> definition of a constant +## evt -> an event +## All other feature names should be ignored. They may be defined in the future. +## A property may have a set function, a get function or both. Each will have +## "Get" or "Set" in their names and the corresponding name will have the obvious switch. +## A property may be subscripted, in which case the first parameter is the subscript. +## fun, get, and set features have a strict syntax: +## [=,) +## param is [=] +## Additional white space is allowed between elements. +## The syntax for evt is [=[,]*]) +## Feature names that contain an underscore are defined by Windows, so in these +## cases, using the Windows definition is preferred where available. + +## Types: +## void +## int +## bool -> integer, 1=true, 0=false +## position -> integer position in a document +## colour -> colour integer containing red, green and blue bytes. +## string -> pointer to const character +## stringresult -> pointer to character +## cells -> pointer to array of cells, each cell containing a style byte and character byte +## charrange -> range of a min and a max position +## charrangeresult -> like charrange, but output param +## textrange -> charrange + output string +## findtext -> searchrange, text -> foundposition +## findtextex -> searchrange +## keymod -> integer containing key in low half and modifiers in high half +## countedstring +## formatrange +## point -> x,y +## pointresult -> like point, but output param +## rectangle -> left,top,right,bottom +## Client code should ignore definitions containing types it does not understand, except +## for possibly #defining the constants + +cat Basics + +################################################ +## For Scintilla.h +val INVALID_POSITION=-1 +## Define start of Scintilla messages to be greater than all edit (EM_*) messages +## as many EM_ messages can be used although that use is deprecated. +val SCI_START=2000 +val SCI_OPTIONAL_START=3000 +val SCI_LEXER_START=4000 + +# Add text to the document +fun void AddText=2001(int length, string text) + +# Add array of cells to document +fun void AddStyledText=2002(int length, cells c) + +# Insert string at a position +fun void InsertText=2003(position pos, string text) + +# Delete all text in the document +fun void ClearAll=2004(,) + +# Set all style bytes to 0, remove all folding information +fun void ClearDocumentStyle=2005(,) + +# The number of characters in the document +get int GetLength=2006(,) + +# Returns the character byte at the position +get int GetCharAt=2007(position pos,) + +# Returns the position of the caret +get position GetCurrentPos=2008(,) + +# Returns the position of the opposite end of the selection to the caret +get position GetAnchor=2009(,) + +# Returns the style byte at the position +get int GetStyleAt=2010(position pos,) + +# Redoes the next action on the undo history +fun void Redo=2011(,) + +# Choose between collecting actions into the undo +# history and discarding them. +set void SetUndoCollection=2012(bool collectUndo,) + +# Select all the text in the document. +fun void SelectAll=2013(,) + +# Remember the current position in the undo history as the position +# at which the document was saved. +fun void SetSavePoint=2014(,) + +# Retrieve a buffer of cells. +# Returns the number of bytes in the buffer not including terminating nulls. +fun int GetStyledText=2015(, textrange tr) + +# Are there any redoable actions in the undo history. +fun bool CanRedo=2016(,) + +# Retrieve the line number at which a particular marker is located +fun int MarkerLineFromHandle=2017(int handle,) + +# Delete a marker. +fun void MarkerDeleteHandle=2018(int handle,) + +# Is undo history being collected? +get bool GetUndoCollection=2019(,) + +val SCWS_INVISIBLE=0 +val SCWS_VISIBLEALWAYS=1 +val SCWS_VISIBLEAFTERINDENT=2 + +# Are white space characters currently visible? +# Returns one of SCWS_* constants. +get int GetViewWS=2020(,) + +# Make white space characters invisible, always visible or visible outside indentation. +set void SetViewWS=2021(int viewWS,) + +# Find the position from a point within the window. +fun int PositionFromPoint=2022(int x, int y) + +# Set caret to start of a line and ensure it is visible. +fun void GotoLine=2024(int line,) + +# Set caret to a position and ensure it is visible. +fun void GotoPos=2025(position pos,) + +# Set the selection anchor to a position. The anchor is the opposite +# end of the selection from the caret. +set void SetAnchor=2026(position posAnchor,) + +# Retrieve the text of the line containing the caret. +# Returns the index of the caret on the line. +fun int GetCurLine=2027(int length, stringresult text) + +# Retrieve the position of the last correctly styled character. +get position GetEndStyled=2028(,) + +# Convert all line endings in the document to use the current mode. +fun void ConvertEOLs=2029(,) + +val SC_EOL_CRLF=0 +val SC_EOL_CR=1 +val SC_EOL_LF=2 + +# Retrieve the current end of line mode - one of CRLF, CR, or LF. +get int GetEOLMode=2030(,) + +# Set the current end of line mode. +set void SetEOLMode=2031(int eolMode,) + +# Set the current styling position to pos and the styling mask to mask. +# The styling mask can be used to protect some bits in each styling byte from +# modification. +fun void StartStyling=2032(position pos, int mask) + +# Change style from current styling position for length characters to a style +# and move the current styling position to after this newly styled segment. +fun void SetStyling=2033(int length, int style) + +# Is drawing done first into a buffer or direct to the screen. +get bool GetBufferedDraw=2034(,) + +# If drawing is buffered then each line of text is drawn into a bitmap buffer +# before drawing it to the screen to avoid flicker. +set void SetBufferedDraw=2035(bool buffered,) + +# Change the visible size of a tab to be a multiple of the width of a space +# character. +set void SetTabWidth=2036(int tabWidth,) + +# Retrieve the visible size of a tab. +get int GetTabWidth=2121(,) + +# The SC_CP_UTF8 value can be used to enter Unicode mode. +# This is the same value as CP_UTF8 in Windows +val SC_CP_UTF8=65001 + +# Set the code page used to interpret the bytes of the document as characters. +# The SC_CP_UTF8 value can be used to enter Unicode mode. +set void SetCodePage=2037(int codePage,) + +# In palette mode, Scintilla uses the environments palette calls to display +# more colours. This may lead to ugly displays. +set void SetUsePalette=2039(bool usePalette,) + +val MARKER_MAX=31 +val SC_MARK_CIRCLE=0 +val SC_MARK_ROUNDRECT=1 +val SC_MARK_ARROW=2 +val SC_MARK_SMALLRECT=3 +val SC_MARK_SHORTARROW=4 +val SC_MARK_EMPTY=5 +val SC_MARK_ARROWDOWN=6 +val SC_MARK_MINUS=7 +val SC_MARK_PLUS=8 + +val SC_MARKNUM_FOLDER=30 +val SC_MARKNUM_FOLDEROPEN=31 + +# Set the symbol used for a particular marker number. +fun void MarkerDefine=2040(int markerNumber, int markerSymbol) + +# Set the foreground colour used for a particular marker number. +fun void MarkerSetFore=2041(int markerNumber, colour fore) + +# Set the background colour used for a particular marker number. +fun void MarkerSetBack=2042(int markerNumber, colour back) + +# Add a marker to a line. +fun void MarkerAdd=2043(int line, int markerNumber) + +# Delete a marker from a line +fun void MarkerDelete=2044(int line, int markerNumber) + +# Delete all markers with a particular number from all lines +fun void MarkerDeleteAll=2045(int markerNumber,) + +# Get a bit mask of all the markers set on a line. +fun int MarkerGet=2046(int line,) + +# Find the next line after lineStart that includes a marker in mask. +fun int MarkerNext=2047(int lineStart, int markerMask) + +# Find the previous line before lineStart that includes a marker in mask. +fun int MarkerPrevious=2048(int lineStart, int markerMask) + +val SC_MARGIN_SYMBOL=0 +val SC_MARGIN_NUMBER=1 + +# Set a margin to be either numeric or symbolic. +set void SetMarginTypeN=2240(int margin, int marginType) + +# Retrieve the type of a margin. +get int GetMarginTypeN=2241(int margin,) + +# Set the width of a margin to a width expressed in pixels. +set void SetMarginWidthN=2242(int margin, int pixelWidth) + +# Retrieve the width of a margin in pixels. +get int GetMarginWidthN=2243(int margin,) + +# Set a mask that determines which markers are displayed in a margin. +set void SetMarginMaskN=2244(int margin, int mask) + +# Retrieve the marker mask of a margin. +get int GetMarginMaskN=2245(int margin,) + +# Make a margin sensitive or insensitive to mouse clicks. +set void SetMarginSensitiveN=2246(int margin, bool sensitive) + +# Retrieve the mouse click sensitivity of a margin. +get bool GetMarginSensitiveN=2247(int margin,) + +val STYLE_DEFAULT=32 +val STYLE_LINENUMBER=33 +val STYLE_BRACELIGHT=34 +val STYLE_BRACEBAD=35 +val STYLE_CONTROLCHAR=36 +val STYLE_INDENTGUIDE=37 +val STYLE_MAX=127 + +# Character set identifiers are used in StyleSetCharacterSet. +# The values are the same as the Windows *_CHARSET values. +val SC_CHARSET_ANSI=0 +val SC_CHARSET_DEFAULT=1 +val SC_CHARSET_BALTIC=186 +val SC_CHARSET_CHINESEBIG5=136 +val SC_CHARSET_EASTEUROPE=238 +val SC_CHARSET_GB2312=134 +val SC_CHARSET_GREEK=161 +val SC_CHARSET_HANGUL=129 +val SC_CHARSET_MAC=77 +val SC_CHARSET_OEM=255 +val SC_CHARSET_RUSSIAN=204 +val SC_CHARSET_SHIFTJIS=128 +val SC_CHARSET_SYMBOL=2 +val SC_CHARSET_TURKISH=162 +val SC_CHARSET_JOHAB=130 +val SC_CHARSET_HEBREW=177 +val SC_CHARSET_ARABIC=178 +val SC_CHARSET_VIETNAMESE=163 +val SC_CHARSET_THAI=222 + +# Clear all the styles and make equivalent to the global default style. +set void StyleClearAll=2050(,) + +# Set the foreground colour of a style. +set void StyleSetFore=2051(int style, colour fore) + +# Set the background colour of a style. +set void StyleSetBack=2052(int style, colour back) + +# Set a style to be bold or not. +set void StyleSetBold=2053(int style, bool bold) + +# Set a style to be italic or not. +set void StyleSetItalic=2054(int style, bool italic) + +# Set the size of characters of a style. +set void StyleSetSize=2055(int style, int sizePoints) + +# Set the font of a style. +set void StyleSetFont=2056(int style, string fontName) + +# Set a style to have its end of line filled or not. +set void StyleSetEOLFilled=2057(int style, bool filled) + +# Reset the default style to its state at startup +fun void StyleResetDefault=2058(,) + +# Set a style to be underlined or not. +set void StyleSetUnderline=2059(int style, bool underline) + +# Set the character set of the font in a style. +set void StyleSetCharacterSet=2066(int style, int characterSet) + +# Set the foreground colour of the selection and whether to use this setting. +fun void SetSelFore=2067(bool useSetting, colour fore) + +# Set the background colour of the selection and whether to use this setting. +fun void SetSelBack=2068(bool useSetting, colour back) + +# Set the foreground colour of the caret. +set void SetCaretFore=2069(colour fore,) + +# When key+modifier combination km is pressed perform msg. +fun void AssignCmdKey=2070(keymod km, int msg) + +# When key+modifier combination km do nothing. +fun void ClearCmdKey=2071(keymod km,) + +# Drop all key mappings. +fun void ClearAllCmdKeys=2072(,) + +# Set the styles for a segment of the document. +fun void SetStylingEx=2073(int length, string styles) + +# Set a style to be visible or not. +set void StyleSetVisible=2074(int style, bool visible) + +# Get the time in milliseconds that the caret is on and off. +get int GetCaretPeriod=2075(,) + +# Get the time in milliseconds that the caret is on and off. 0 = steady on. +set void SetCaretPeriod=2076(int periodMilliseconds,) + +# Set the set of characters making up words for when moving or selecting +# by word. +set void SetWordChars=2077(, string characters) + +# Start a sequence of actions that is undone and redone as a unit. +# May be nested. +fun void BeginUndoAction=2078(,) + +# End a sequence of actions that is undone and redone as a unit. +fun void EndUndoAction=2079(,) + +val INDIC_MAX=7 +val INDIC_PLAIN=0 +val INDIC_SQUIGGLE=1 +val INDIC_TT=2 +val INDIC_DIAGONAL=3 +val INDIC_STRIKE=4 +val INDIC0_MASK=32 +val INDIC1_MASK=64 +val INDIC2_MASK=128 +##val INDICS_MASK=INDIC0_MASK | INDIC1_MASK | INDIC2_MASK +val INDICS_MASK=32 | 64 | 128 + +# Set an indicator to plain, squiggle or TT. +set void IndicSetStyle=2080(int indic, int style) + +# Retrieve the style of an indicator. +get int IndicGetStyle=2081(int indic,) + +# Set the foreground colour of an indicator. +set void IndicSetFore=2082(int indic, colour fore) + +# Retrieve the foreground colour of an indicator. +get colour IndicGetFore=2083(int indic,) + +# Divide each styling byte into lexical class bits (default:5) and indicator +# bits (default:3). If a lexer requires more than 32 lexical states, then this +# is used to expand the possible states. +set void SetStyleBits=2090(int bits,) + +# Retrieve number of bits in style bytes used to hold the lexical state. +get int GetStyleBits=2091(,) + +# Used to hold extra styling information for each line. +set void SetLineState=2092(int line, int state) + +# Retrieve the extra styling information for a line. +get int GetLineState=2093(int line,) + +# Retrieve the last line number that has line state. +get int GetMaxLineState=2094(,) + +# Display a auto-completion list. +# The lenEntered parameter indicates how many characters before +# the caret should be used to provide context. +fun void AutoCShow=2100(int lenEntered, string itemList) + +# Remove the auto-completion list from the screen. +fun void AutoCCancel=2101(,) + +# Is there an auto-completion list visible? +fun bool AutoCActive=2102(,) + +# Retrieve the position of the caret when the auto-completion list was +# displayed. +fun position AutoCPosStart=2103(,) + +# User has selected an item so remove the list and insert the selection. +fun void AutoCComplete=2104(,) + +# Define a set of character that when typed cancel the auto-completion list. +fun void AutoCStops=2105(, string characterSet) + +# Change the separator character in the string setting up an auto-completion +# list. Default is space but can be changed if items contain space. +set void AutoCSetSeparator=2106(int separatorCharacter,) + +# Retrieve the auto-completion list separator character. +get int AutoCGetSeparator=2107(,) + +# Select the item in the auto-completion list that starts with a string. +fun void AutoCSelect=2108(, string text) + +# Should the auto-completion list be cancelled if the user backspaces to a +# position before where the box was created. +set void AutoCSetCancelAtStart=2110(bool cancel,) + +# Retrieve whether auto-completion cancelled by backspacing before start. +get bool AutoCGetCancelAtStart=2111(,) + +# Define a set of character that when typed fills up the selected word. +set void AutoCSetFillUps=2112(, string characterSet) + +# Should a single item auto-completion list automatically choose the item. +set void AutoCSetChooseSingle=2113(bool chooseSingle,) + +# Retrieve whether a single item auto-completion list automatically choose the item. +get bool AutoCGetChooseSingle=2114(,) + +# Set whether case is significant when performing auto-completion searches. +set void AutoCSetIgnoreCase=2115(bool ignoreCase,) + +# Retrieve state of ignore case flag. +get bool AutoCGetIgnoreCase=2116(,) + +# Set the number of spaces used for one level of indentation. +set void SetIndent=2122(int indentSize,) + +# Retrieve indentation size. +get int GetIndent=2123(,) + +# Indentation will only use space characters if useTabs is false, otherwise +# it will use a combination of tabs and spaces. +set void SetUseTabs=2124(bool useTabs,) + +# Retrieve whether tabs will be used in indentation. +get bool GetUseTabs=2125(,) + +# Change the indentation of a line to a number of columns. +set void SetLineIndentation=2126(int line, int indentSize) + +# Retrieve the number of columns that a line is indented. +get int GetLineIndentation=2127(int line,) + +# Retrieve the position before the first non indentation character on a line. +get position GetLineIndentPosition=2128(int line,) + +# Retrieve the column number of a position, taking tab width into account. +get int GetColumn=2129(position pos,) + +# Show or hide the horizontal scroll bar. +set void SetHScrollBar=2130(bool show,) + +# Is the horizontal scroll bar visible? +get bool GetHScrollBar=2131(,) + +# Show or hide indentation guides. +set void SetIndentationGuides=2132(bool show,) + +# Are the indentation guides visible? +get bool GetIndentationGuides=2133(,) + +# Set the highlighted indentation guide column. +# 0 = no highlighted guide. +set void SetHighlightGuide=2134(int column,) + +# Get the highlighted indentation guide column. +get int GetHighlightGuide=2135(,) + +# Get the position after the last visible characters on a line. +get int GetLineEndPosition=2136(int line,) + +# Get the code page used to interpret the bytes of the document as characters. +get int GetCodePage=2137(,) + +# Get the foreground colour of the caret. +get colour GetCaretFore=2138(,) + +# In palette mode? +get bool GetUsePalette=2139(,) + +# In read-only mode? +get bool GetReadOnly=2140(,) + +# Sets the position of the caret. +set void SetCurrentPos=2141(position pos,) + +# Sets the position that starts the selection - this becomes the anchor. +set void SetSelectionStart=2142(position pos,) + +# Returns the position at the start of the selection. +get position GetSelectionStart=2143(,) + +# Sets the position that ends the selection - this becomes the currentPosition. +set void SetSelectionEnd=2144(position pos,) + +# Returns the position at the end of the selection. +get position GetSelectionEnd=2145(,) + +# Sets the print magnification added to the point size of each style for printing. +set void SetPrintMagnification=2146(int magnification,) + +# Returns the print magnification. +get int GetPrintMagnification=2147(,) + +# PrintColourMode - use same colours as screen. +val SC_PRINT_NORMAL=0 +# PrintColourMode - invert the light value of each style for printing. +val SC_PRINT_INVERTLIGHT=1 +# PrintColourMode - force black text on white background for printing. +val SC_PRINT_BLACKONWHITE=2 + +# Modify colours when printing for clearer printed text. +set void SetPrintColourMode=2148(int mode,) + +# Returns the print colour mode. +get int GetPrintColourMode=2149(,) + +val SCFIND_DOWN=1 +val SCFIND_WHOLEWORD=2 +val SCFIND_MATCHCASE=4 +val SCFIND_WORDSTART=0x00100000 +# SCFIND_REGEXP is not yet implemented. +val SCFIND_REGEXP=0x00200000 + +# Find some text in the document. +fun position FindText=2150(int flags, findtext ft) + +# On Windows will draw the document into a display context such as a printer. +fun void FormatRange=2151(bool draw, formatrange fr) + +# Retrieve the line at the top of the display. +get int GetFirstVisibleLine=2152(,) + +# Retrieve the contents of a line. +# Returns the length of the line. +fun int GetLine=2153(int line, stringresult text) + +# Returns the number of lines in the document. There is always at least one. +get int GetLineCount=2154(,) + +# Sets the size in pixels of the left margin. +set void SetMarginLeft=2155(, int width) + +# Returns the size in pixels of the left margin. +get int GetMarginLeft=2156(,) + +# Sets the size in pixels of the right margin. +set void SetMarginRight=2157(, int width) + +# Returns the size in pixels of the right margin. +get int GetMarginRight=2158(,) + +# Is the document different from when it was last saved? +get bool GetModify=2159(,) + +# Select a range of text. +fun void SetSel=2160(position start, position end) + +# Retrieve the selected text. +# Return the length of the text. +fun int GetSelText=2161(,stringresult text) + +# Retrieve a range of text. +# Return the length of the text. +fun int GetTextRange=2162(, textrange tr) + +# Draw the selection in normal style or with selection highlighted. +fun void HideSelection=2163(bool normal,) + +# Retrieve the x value of the point in the window where a position is displayed. +fun int PointXFromPosition=2164(, position pos) + +# Retrieve the y value of the point in the window where a position is displayed. +fun int PointYFromPosition=2165(, position pos) + +# Retrieve the line containing a position. +fun int LineFromPosition=2166(position pos,) + +# Retrieve the position at the start of a line. +fun int PositionFromLine=2167(int line,) + +# Scroll horizontally and vertically. +fun void LineScroll=2168(int columns, int lines) + +# Ensure the caret is visible. +fun void ScrollCaret=2169(,) + +# Replace the selected text with the argument text. +fun void ReplaceSel=2170(, string text) + +# Set to read only or read write. +set void SetReadOnly=2171(bool readOnly,) + +# Null operation. +fun void Null=2172(,) + +# Will a paste succeed? +fun bool CanPaste=2173(,) + +# Are there any undoable actions in the undo history. +fun bool CanUndo=2174(,) + +# Delete the undo history. +fun void EmptyUndoBuffer=2175(,) + +# Undo one action in the undo history. +fun void Undo=2176(,) + +# Cut the selection to the clipboard. +fun void Cut=2177(,) + +# Copy the selection to the clipboard. +fun void Copy=2178(,) + +# Paste the contents of the clipboard into the document replacing the selection. +fun void Paste=2179(,) + +# Clear the selection. +fun void Clear=2180(,) + +# Replace the contents of the document with the argument text. +fun void SetText=2181(, string text) + +# Retrieve all the text in the document. +# Returns number of characters retrieved. +fun int GetText=2182(int length, stringresult text) + +# Retrieve the number of characters in the document. +get int GetTextLength=2183(,) + +# Retrieve a pointer to a function that processes messages for this Scintilla. +get int GetDirectFunction=2184(,) + +# Retrieve a pointer value to use as the first argument when calling +# the function returned by GetDirectFunction. +get int GetDirectPointer=2185(,) + +# Set to overtype (true) or insert mode +set void SetOvertype=2186(bool overtype,) + +# Returns true if overtype mode is active otherwise false is returned. +get bool GetOvertype=2187(,) + +# Show a call tip containing a definition near position pos. +fun void CallTipShow=2200(position pos, string definition) + +# Remove the call tip from the screen. +fun void CallTipCancel=2201(,) + +# Is there an active call tip? +fun bool CallTipActive=2202(,) + +# Retrieve the position where the caret was before displaying the call tip. +fun position CallTipPosStart=2203(,) + +# Highlight a segment of the definition. +fun void CallTipSetHlt=2204(int start, int end) + +# Set the background colour for the call tip. +set void CallTipSetBack=2205(colour back,) + +# Find the display line of a document line taking hidden lines into account. +fun int VisibleFromDocLine=2220(int line,) + +# Find the document line of a display line taking hidden lines into account. +fun int DocLineFromVisible=2221(int lineDisplay,) + +val SC_FOLDLEVELBASE=0x400 +val SC_FOLDLEVELWHITEFLAG=0x1000 +val SC_FOLDLEVELHEADERFLAG=0x2000 +val SC_FOLDLEVELNUMBERMASK=0x0FFF + +# Set the fold level of a line. +# This encodes an integer level along with flags indicating whether the +# line is a header and whether it is effectively white space. +set void SetFoldLevel=2222(int line, int level) + +# Retrieve the fold level of a line. +get int GetFoldLevel=2223(int line,) + +# Find the last child line of a header line. +get int GetLastChild=2224(int line, int level) + +# Find the parent line of a child line. +get int GetFoldParent=2225(int line,) + +# Make a range of lines visible. +fun void ShowLines=2226(int lineStart, int lineEnd) + +# Make a range of lines invisible. +fun void HideLines=2227(int lineStart, int lineEnd) + +# Is a line visible? +get bool GetLineVisible=2228(int line,) + +# Show the children of a header line. +set void SetFoldExpanded=2229(int line, bool expanded) + +# Is a header line expanded? +get bool GetFoldExpanded=2230(int line,) + +# Switch a header line between expanded and contracted. +fun void ToggleFold=2231(int line,) + +# Ensure a particular line is visible by expanding any header line hiding it. +fun void EnsureVisible=2232(int line,) + +# Set some debugging options for folding +fun void SetFoldFlags=2233(int flags,) + +## Start of key messages +# Move caret down one line. +fun void LineDown=2300(,) + +# Move caret down one line extending selection to new caret position. +fun void LineDownExtend=2301(,) + +# Move caret up one line. +fun void LineUp=2302(,) + +# Move caret up one line extending selection to new caret position. +fun void LineUpExtend=2303(,) + +# Move caret left one character. +fun void CharLeft=2304(,) + +# Move caret left one character extending selection to new caret position. +fun void CharLeftExtend=2305(,) + +# Move caret right one character. +fun void CharRight=2306(,) + +# Move caret right one character extending selection to new caret position. +fun void CharRightExtend=2307(,) + +# Move caret left one word. +fun void WordLeft=2308(,) + +# Move caret left one word extending selection to new caret position. +fun void WordLeftExtend=2309(,) + +# Move caret right one word. +fun void WordRight=2310(,) + +# Move caret right one word extending selection to new caret position. +fun void WordRightExtend=2311(,) + +# Move caret to first position on line. +fun void Home=2312(,) + +# Move caret to first position on line extending selection to new caret position. +fun void HomeExtend=2313(,) + +# Move caret to last position on line. +fun void LineEnd=2314(,) + +# Move caret to last position on line extending selection to new caret position. +fun void LineEndExtend=2315(,) + +# Move caret to first position in document. +fun void DocumentStart=2316(,) + +# Move caret to first position in document extending selection to new caret position. +fun void DocumentStartExtend=2317(,) + +# Move caret to last position in document. +fun void DocumentEnd=2318(,) + +# Move caret to last position in document extending selection to new caret position. +fun void DocumentEndExtend=2319(,) + +# Move caret one page up. +fun void PageUp=2320(,) + +# Move caret one page up extending selection to new caret position. +fun void PageUpExtend=2321(,) + +# Move caret one page down. +fun void PageDown=2322(,) + +# Move caret one page down extending selection to new caret position. +fun void PageDownExtend=2323(,) + +# Switch from insert to overtype mode or the reverse. +fun void EditToggleOvertype=2324(,) + +# Cancel any modes such as call tip or auto-completion list display. +fun void Cancel=2325(,) + +# Delete the selection or if no selection, the character before the caret. +fun void DeleteBack=2326(,) + +# If selection is empty or all on one line replace the selection with a tab +# character. +# If more than one line selected, indent the lines. +fun void Tab=2327(,) + +# Dedent the selected lines. +fun void BackTab=2328(,) + +# Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +fun void NewLine=2329(,) + +# Insert a Form Feed character. +fun void FormFeed=2330(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +fun void VCHome=2331(,) + +# Like VCHome but extending selection to new caret position. +fun void VCHomeExtend=2332(,) + +# Magnify the displayed text by increasing the sizes by 1 point. +fun void ZoomIn=2333(,) + +# Make the displayed text smaller by decreasing the sizes by 1 point. +fun void ZoomOut=2334(,) + +# Delete the word to the left of the caret. +fun void DelWordLeft=2335(,) + +# Delete the word to the right of the caret. +fun void DelWordRight=2336(,) + +# Cut the line containing the caret. +fun void LineCut=2337(,) + +# Delete the line containing the caret. +fun void LineDelete=2338(,) + +# Switch the current line with the previous. +fun void LineTranspose=2339(,) + +# Transform the selection to lower case. +fun void LowerCase=2340(,) + +# Transform the selection to upper case. +fun void UpperCase=2341(,) + +# Scroll the document down, keeping the caret visible. +fun void LineScrollDown=2342(,) + +# Scroll the document up, keeping the caret visible. +fun void LineScrollUp=2343(,) + +# How many characters are on a line, not including end of line characters. +fun int LineLength=2350(int line,) + +# Highlight the characters at two positions. +fun void BraceHighlight=2351(position pos1,position pos2) + +# Highlight the character at a position indicating there is no matching brace. +fun void BraceBadLight=2352(position pos,) + +# Find the position of a matching brace or INVALID_POSITION if no match. +fun position BraceMatch=2353(position pos,) + +# Are the end of line characters visible. +get bool GetViewEOL=2355(,) + +# Make the end of line characters visible or invisible +set void SetViewEOL=2356(bool visible,) + +# Retrieve a pointer to the document object. +get int GetDocPointer=2357(,) + +# Change the document object used. +set void SetDocPointer=2358(int pointer,) + +# Set which document modification events are sent to the container. +set void SetModEventMask=2359(int mask,) + +val EDGE_NONE=0 +val EDGE_LINE=1 +val EDGE_BACKGROUND=2 + +# Retrieve the column number which text should be kept within. +get int GetEdgeColumn=2360(,) + +# Set the column number of the edge. +# If text goes past the edge then it is highlighted. +set void SetEdgeColumn=2361(int column,) + +# Retrieve the edge highlight mode. +get int GetEdgeMode=2362(,) + +# The edge may be displayed by a line (EDGE_LINE) or by highlighting text that +# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +set void SetEdgeMode=2363(int mode,) + +# Retrieve the colour used in edge indication. +get colour GetEdgeColour=2364(,) + +# Change the colour used in edge indication. +set void SetEdgeColour=2365(colour edgeColour,) + +# Sets the current caret position to be the search anchor. +fun void SearchAnchor=2366(,) + +# Find some text starting at the search anchor. +fun int SearchNext=2367(int flags, string text) + +# Find some text starting at the search anchor and moving backwards. +fun int SearchPrev=2368(int flags, string text) + +# Show caret within N lines of edge when it's scrolled to view +val CARET_SLOP=0x01 +# Center caret on screen when it's scrolled to view +val CARET_CENTER=0x02 +# OR this with CARET_CENTER to reposition even when visible, or +# OR this with CARET_SLOP to reposition whenever outside slop border +val CARET_STRICT=0x04 +# Set the way the line the caret is on is kept visible. +fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop) + +# Retrieves the number of lines completely visible. +get int LinesOnScreen=2370(,) + +# Set whether a pop up menu is displayed automatically when the user presses +# the wrong mouse button. +fun void UsePopUp=2371(bool allowPopUp,) + +# Is the selection a rectangular. The alternative is the more common stream selection. +get bool SelectionIsRectangle=2372(,) + +# Set the zoom level. This number of points is added to the size of all fonts. +# It may be positive to magnify or negative to reduce. +set void SetZoom=2373(int zoom,) +# Retrieve the zoom level. +get int GetZoom=2374(,) + +# Create a new document object. +# Starts with reference count of 1 and not selected into editor. +fun int CreateDocument=2375(,) +# Extend life of document. +fun void AddRefDocument=2376(, int doc) +# Release a reference to the document, deleting document if it fades to black. +fun void ReleaseDocument=2377(, int doc) + +# Get which document modification events are sent to the container. +get int GetModEventMask=2378(,) + +# Set the focus to this Scintilla widget. +# GTK+ Specific +fun void GrabFocus=2400(,) + +# Start notifying the container of all key presses and commands. +fun void StartRecord=3001(,) + +# Stop notifying the container of all key presses and commands. +fun void StopRecord=3002(,) + +# Set the lexing language of the document. +set void SetLexer=4001(int lexer,) + +# Retrieve the lexing language of the document. +get int GetLexer=4002(,) + +# Colourise a segment of the document using the current lexing language. +fun void Colourise=4003(position start, position end) + +# Set up a value that may be used by a lexer for some optional feature. +set void SetProperty=4004(string key, string value) + +# Set up the key words used by the lexer. +set void SetKeyWords=4005(int keywordSet, string keyWords) + +# Notifications +# Type of modification and the action which caused the modification +# These are defined as a bit mask to make it easy to specify which notifications are wanted. +# One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +val SC_MOD_INSERTTEXT=0x1 +val SC_MOD_DELETETEXT=0x2 +val SC_MOD_CHANGESTYLE=0x4 +val SC_MOD_CHANGEFOLD=0x8 +val SC_PERFORMED_USER=0x10 +val SC_PERFORMED_UNDO=0x20 +val SC_PERFORMED_REDO=0x40 +val SC_LASTSTEPINUNDOREDO=0x100 +val SC_MOD_CHANGEMARKER=0x200 +val SC_MOD_BEFOREINSERT=0x400 +val SC_MOD_BEFOREDELETE=0x800 +val SC_MODEVENTMASKALL=0xF77 + +# For compatibility, these go through the COMMAND notification rather than NOTIFY +# and have exactly the same values as the EN_* constants. +val SCEN_CHANGE=768 +val SCEN_SETFOCUS=512 +val SCEN_KILLFOCUS=256 + +# Symbolic key codes and modifier flags +# ASCII and other printable characters below 256 +# Extended keys above 300 + +val SCK_DOWN=300 +val SCK_UP=301 +val SCK_LEFT=302 +val SCK_RIGHT=303 +val SCK_HOME=304 +val SCK_END=305 +val SCK_PRIOR=306 +val SCK_NEXT=307 +val SCK_DELETE=308 +val SCK_INSERT=309 +val SCK_ESCAPE=7 +val SCK_BACK=8 +val SCK_TAB=9 +val SCK_RETURN=13 +val SCK_ADD=310 +val SCK_SUBTRACT=311 +val SCK_DIVIDE=312 + +val SCMOD_SHIFT=1 +val SCMOD_CTRL=2 +val SCMOD_ALT=4 + +################################################ +# For SciLexer.h +val SCLEX_CONTAINER=0 +val SCLEX_NULL=1 +val SCLEX_PYTHON=2 +val SCLEX_CPP=3 +val SCLEX_HTML=4 +val SCLEX_XML=5 +val SCLEX_PERL=6 +val SCLEX_SQL=7 +val SCLEX_VB=8 +val SCLEX_PROPERTIES=9 +val SCLEX_ERRORLIST=10 +val SCLEX_MAKEFILE=11 +val SCLEX_BATCH=12 +val SCLEX_XCODE=13 +val SCLEX_LATEX=14 +val SCLEX_LUA=15 +val SCLEX_DIFF=16 +# Lexical states for SCLEX_PYTHON +val SCE_P_DEFAULT=0 +val SCE_P_COMMENTLINE=1 +val SCE_P_NUMBER=2 +val SCE_P_STRING=3 +val SCE_P_CHARACTER=4 +val SCE_P_WORD=5 +val SCE_P_TRIPLE=6 +val SCE_P_TRIPLEDOUBLE=7 +val SCE_P_CLASSNAME=8 +val SCE_P_DEFNAME=9 +val SCE_P_OPERATOR=10 +val SCE_P_IDENTIFIER=11 +val SCE_P_COMMENTBLOCK=12 +val SCE_P_STRINGEOL=13 +# Lexical states for SCLEX_CPP, SCLEX_VB +val SCE_C_DEFAULT=0 +val SCE_C_COMMENT=1 +val SCE_C_COMMENTLINE=2 +val SCE_C_COMMENTDOC=3 +val SCE_C_NUMBER=4 +val SCE_C_WORD=5 +val SCE_C_STRING=6 +val SCE_C_CHARACTER=7 +val SCE_C_UUID=8 +val SCE_C_PREPROCESSOR=9 +val SCE_C_OPERATOR=10 +val SCE_C_IDENTIFIER=11 +val SCE_C_STRINGEOL=12 +val SCE_C_VERBATIM=13 +# Lexical states for SCLEX_HTML, SCLEX_XML +val SCE_H_DEFAULT=0 +val SCE_H_TAG=1 +val SCE_H_TAGUNKNOWN=2 +val SCE_H_ATTRIBUTE=3 +val SCE_H_ATTRIBUTEUNKNOWN=4 +val SCE_H_NUMBER=5 +val SCE_H_DOUBLESTRING=6 +val SCE_H_SINGLESTRING=7 +val SCE_H_OTHER=8 +val SCE_H_COMMENT=9 +val SCE_H_ENTITY=10 +# XML and ASP +val SCE_H_TAGEND=11 +val SCE_H_XMLSTART=12 +val SCE_H_XMLEND=13 +val SCE_H_SCRIPT=14 +val SCE_H_ASP=15 +val SCE_H_ASPAT=16 +val SCE_H_CDATA=17 +val SCE_H_QUESTION=18 +# More HTML +val SCE_H_VALUE=19 +# Embedded Javascript +val SCE_HJ_START=40 +val SCE_HJ_DEFAULT=41 +val SCE_HJ_COMMENT=42 +val SCE_HJ_COMMENTLINE=43 +val SCE_HJ_COMMENTDOC=44 +val SCE_HJ_NUMBER=45 +val SCE_HJ_WORD=46 +val SCE_HJ_KEYWORD=47 +val SCE_HJ_DOUBLESTRING=48 +val SCE_HJ_SINGLESTRING=49 +val SCE_HJ_SYMBOLS=50 +val SCE_HJ_STRINGEOL=51 +# ASP Javascript +val SCE_HJA_START=55 +val SCE_HJA_DEFAULT=56 +val SCE_HJA_COMMENT=57 +val SCE_HJA_COMMENTLINE=58 +val SCE_HJA_COMMENTDOC=59 +val SCE_HJA_NUMBER=60 +val SCE_HJA_WORD=61 +val SCE_HJA_KEYWORD=62 +val SCE_HJA_DOUBLESTRING=63 +val SCE_HJA_SINGLESTRING=64 +val SCE_HJA_SYMBOLS=65 +val SCE_HJA_STRINGEOL=66 +# Embedded VBScript +val SCE_HB_START=70 +val SCE_HB_DEFAULT=71 +val SCE_HB_COMMENTLINE=72 +val SCE_HB_NUMBER=73 +val SCE_HB_WORD=74 +val SCE_HB_STRING=75 +val SCE_HB_IDENTIFIER=76 +val SCE_HB_STRINGEOL=77 +# ASP VBScript +val SCE_HBA_START=80 +val SCE_HBA_DEFAULT=81 +val SCE_HBA_COMMENTLINE=82 +val SCE_HBA_NUMBER=83 +val SCE_HBA_WORD=84 +val SCE_HBA_STRING=85 +val SCE_HBA_IDENTIFIER=86 +val SCE_HBA_STRINGEOL=87 +# Embedded Python +val SCE_HP_START=90 +val SCE_HP_DEFAULT=91 +val SCE_HP_COMMENTLINE=92 +val SCE_HP_NUMBER=93 +val SCE_HP_STRING=94 +val SCE_HP_CHARACTER=95 +val SCE_HP_WORD=96 +val SCE_HP_TRIPLE=97 +val SCE_HP_TRIPLEDOUBLE=98 +val SCE_HP_CLASSNAME=99 +val SCE_HP_DEFNAME=100 +val SCE_HP_OPERATOR=101 +val SCE_HP_IDENTIFIER=102 +# ASP Python +val SCE_HPA_START=105 +val SCE_HPA_DEFAULT=106 +val SCE_HPA_COMMENTLINE=107 +val SCE_HPA_NUMBER=108 +val SCE_HPA_STRING=109 +val SCE_HPA_CHARACTER=110 +val SCE_HPA_WORD=111 +val SCE_HPA_TRIPLE=112 +val SCE_HPA_TRIPLEDOUBLE=113 +val SCE_HPA_CLASSNAME=114 +val SCE_HPA_DEFNAME=115 +val SCE_HPA_OPERATOR=116 +val SCE_HPA_IDENTIFIER=117 +# PHP +val SCE_HPHP_DEFAULT=118 +val SCE_HPHP_HSTRING=119 +val SCE_HPHP_SIMPLESTRING=120 +val SCE_HPHP_WORD=121 +val SCE_HPHP_NUMBER=122 +val SCE_HPHP_VARIABLE=123 +val SCE_HPHP_COMMENT=124 +val SCE_HPHP_COMMENTLINE=125 +val SCE_HPHP_STRINGEOL=126 +# Lexical states for SCLEX_PERL +val SCE_PL_DEFAULT=0 +val SCE_PL_HERE=1 +val SCE_PL_COMMENTLINE=2 +val SCE_PL_POD=3 +val SCE_PL_NUMBER=4 +val SCE_PL_WORD=5 +val SCE_PL_STRING=6 +val SCE_PL_CHARACTER=7 +val SCE_PL_PUNCTUATION=8 +val SCE_PL_PREPROCESSOR=9 +val SCE_PL_OPERATOR=10 +val SCE_PL_IDENTIFIER=11 +val SCE_PL_SCALAR=12 +val SCE_PL_ARRAY=13 +val SCE_PL_HASH=14 +val SCE_PL_SYMBOLTABLE=15 +val SCE_PL_REF=16 +val SCE_PL_REGEX=17 +val SCE_PL_REGSUBST=18 +val SCE_PL_LONGQUOTE=19 +val SCE_PL_BACKTICKS=20 +val SCE_PL_DATASECTION=21 +# Lexical states for SCLEX_LATEX +val SCE_L_DEFAULT=0 +val SCE_L_COMMAND=1 +val SCE_L_TAG=2 +val SCE_L_MATH=3 +val SCE_L_COMMENT=4 +# Lexical states for SCLEX_LUA +val SCE_LUA_DEFAULT=0 +val SCE_LUA_COMMENT=1 +val SCE_LUA_COMMENTLINE=2 +val SCE_LUA_COMMENTDOC=3 +val SCE_LUA_NUMBER=4 +val SCE_LUA_WORD=5 +val SCE_LUA_STRING=6 +val SCE_LUA_CHARACTER=7 +val SCE_LUA_LITERALSTRING=8 +val SCE_LUA_PREPROCESSOR=9 +val SCE_LUA_OPERATOR=10 +val SCE_LUA_IDENTIFIER=11 +val SCE_LUA_STRINGEOL=12 +val SCE_ERR_DEFAULT=0 +val SCE_ERR_PYTHON=1 +val SCE_ERR_GCC=2 +val SCE_ERR_MS=3 +val SCE_ERR_CMD=4 +val SCE_ERR_BORLAND=5 +val SCE_ERR_PERL=6 + +# Events + +evt void StyleNeeded=2000(int position) +evt void CharAdded=2001(int ch) +evt void SavePointReached=2002(void) +evt void SavePointLeft=2003(void) +evt void ModifyAttemptRO=2004(void) +# GTK+ Specific to work around focus and accelerator problems: +evt void Key=2005(int ch, int modifiers) +evt void DoubleClick=2006(void) +evt void UpdateUI=2007(void) +# The old name for SCN_UPDATEUI +val SCN_CHECKBRACE=2007 +evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) +# Optional module for macro recording +evt void MacroRecord=2009(int message, int wParam, int lParam) +evt void MarginClick=2010(int modifiers, int position, int margin) +evt void NeedShown=2011(int position, int length) +evt void PosChanged=2012(int position) + +cat Deprecated + +################################################ +# From WinDefs.h + +# ***** DEPRECATED from here to end of file ****** + +# Will a paste succeed? +fun bool EM_CanPaste=1074(,) + +# Are there any undoable actions in the undo history. +fun bool EM_CanUndo=198(,) + +# Find the position and line from a point within the window. +fun int EM_CharFromPos=215(,point pt) + +# Delete the undo history. +fun void EM_EmptyUndoBuffer=205(,) + +# Retrieve the selection range. +fun void EM_ExGetSel=1076(,charrangeresult cr) + +# Retrieve the line number of a position in the document. +get int EM_ExLineFromChar=1078(,position pos) + +# Select a range of text. +fun void EM_ExSetSel=1079(,charrange cr) + +# Find some text in the document. +fun position EM_FindText=1080(int flags, findtext ft) + +# Find some text in the document. Returns range of found text in ft argument. +fun position EM_FindTextEx=1103(int flags, findtextex ft) + +# On Windows will draw the document into a display context such as a printer. +fun void EM_FormatRange=1081(bool draw, formatrange fr) + +# Retrieve the line at the top of the display. +get int EM_GetFirstVisibleLine=206(,) + +# Retrieve the contents of a line. +# Returns the length of the line. +fun int EM_GetLine=196(int line, countedstring text) + +# Returns the number of lines in the document. There is always at least one. +fun int EM_GetLineCount=186(,) + +# Returns the size in pixels of left and right margins packed into one integer. +# The left margin is in the low half and the right margin in the high half. +fun int EM_GetMargins=212(,) + +# Is the document different from when it was last saved? +get bool EM_GetModify=184(,) + +# Get the area used to display the document. +fun void EM_GetRect=178(,rectangle r) + +# Return the selection packed into one integer with the start of the selection +# in the low half and the end in the high half. +fun int EM_GetSel=176(,) + +# Retrieve the selected text. +# Return the length of the text. +fun int EM_GetSelText=1086(,stringresult text) + +# Retrieve a range of text. +# Return the length of the text. +fun int EM_GetTextRange=1099(, textrange tr) + +# Draw the selection in normal style or with selection highlighted. +fun void EM_HideSelection=1087(bool normal,) + +# Retrieve the line of a position. +fun int EM_LineFromChar=201(position pos,) + +# Retrieve the position at the start of a line. +fun position EM_LineIndex=187(int line,) + +# Retrieve the number of characters on a line not including end of line characters. +fun int EM_LineLength=193(int line,) + +# Scroll horizontally and vertically. +fun void EM_LineScroll=182(int columns, int lines) + +# Retrieve the point in the window where a position is displayed. +fun void EM_PosFromChar=214(pointresult pt, position pos) + +# Replace the selected text with the argument text. +fun void EM_ReplaceSel=194(, string text) + +# Ensure the caret is visible. +fun void EM_ScrollCaret=183(,) + +# Returns SEL_EMPTY if selection contains no characters, otherwise SEL_TEXT. +fun void EM_SelectionType=1090(,) + +# Set the width of the left and right margins +fun void EM_SetMargins=211(int flags, int values) + +# Set to read only or read write. +set void EM_SetReadOnly=207(bool readOnly,) + +# Select the range of text from start to end. +fun void EM_SetSel=177(position start, position end) + +# Undo one action in the undo history. +fun void EM_Undo=199(,) + +# Null operation. +fun void WM_Null=0(,) + +# Clear the selection. +fun void WM_Clear=771(,) + +fun void WM_Command=273(,) + +# Copy the selection to the clipboard. +fun void WM_Copy=769(,) + +# Cut the selection to the clipboard. +fun void WM_Cut=768(,) + +# Retrieve all the text in the document. +# Returns number of characters retrieved. +fun int WM_GetText=13(int length, stringresult text) + +# Retrieve the number of characters in the document. +fun int WM_GetTextLength=14(,) + +# Notification back to container +fun void WM_Notify=78(int id, int stuff) + +# Paste the contents of the clipboard into the document replacing the selection. +fun void WM_Paste=770(,) + +# Replace the contents of the document with the argument text. +fun void WM_SetText=12(, string text) + +# Undo one action in the undo history. +fun void WM_Undo=772(,) + +# Notification codes +val EN_CHANGE=768 +val EN_KILLFOCUS=512 +val EN_SETFOCUS=256 + +# Flags for setting margins. +val EC_LEFTMARGIN=1 +val EC_RIGHTMARGIN=2 +val EC_USEFONTINFO=0xffff + +# Selection type. +val SEL_EMPTY=0 +val SEL_TEXT=1 + +# Find replace mask constants +val FR_MATCHCASE=0x4 +val FR_WHOLEWORD=0x2 +val FR_DOWN=0x1 + +# Key modifier flag. +val SHIFT_PRESSED=1 +val LEFT_CTRL_PRESSED=2 +val LEFT_ALT_PRESSED=4 + +#events +evt void EN_Change=768(void) diff --git a/contrib/src/stc/scintilla/include/ScintillaWidget.h b/contrib/src/stc/scintilla/include/ScintillaWidget.h new file mode 100644 index 0000000000..980557a2e7 --- /dev/null +++ b/contrib/src/stc/scintilla/include/ScintillaWidget.h @@ -0,0 +1,46 @@ +// Scintilla source code edit control +// ScintillaWidget.h - definition of Scintilla widget for GTK+ +// Only needed by GTK+ code but is harmless on other platforms. +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SCINTILLAWIDGET_H +#define SCINTILLAWIDGET_H + +#if PLAT_GTK + +#ifdef __cplusplus +extern "C" { +#endif + +#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) +#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) +#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) + +typedef struct _ScintillaObject ScintillaObject; +typedef struct _ScintillaClass ScintillaClass; + +struct _ScintillaObject { + GtkFixed vbox; + void *pscin; +}; + +struct _ScintillaClass { + GtkFixedClass parent_class; + + void (* command) (ScintillaObject *ttt); + void (* notify) (ScintillaObject *ttt); +}; + +guint scintilla_get_type (void); +GtkWidget* scintilla_new (void); +void scintilla_set_id (ScintillaObject *sci,int id); +long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam); + +#ifdef __cplusplus +} +#endif + +#endif + +#endif diff --git a/contrib/src/stc/scintilla/include/WinDefs.h b/contrib/src/stc/scintilla/include/WinDefs.h index 0b125e7313..c56f02d810 100644 --- a/contrib/src/stc/scintilla/include/WinDefs.h +++ b/contrib/src/stc/scintilla/include/WinDefs.h @@ -16,93 +16,47 @@ #define LPSTR char * #define LONG long +//#if 0 /* RTF control */ #define EM_CANPASTE (1074) #define EM_CANUNDO (198) #define EM_CHARFROMPOS (215) -#define EM_DISPLAYBAND (1075) #define EM_EMPTYUNDOBUFFER (205) #define EM_EXGETSEL (1076) -#define EM_EXLIMITTEXT (1077) #define EM_EXLINEFROMCHAR (1078) #define EM_EXSETSEL (1079) #define EM_FINDTEXT (1080) #define EM_FINDTEXTEX (1103) -#define EM_FINDWORDBREAK (1100) -#define EM_FMTLINES (200) #define EM_FORMATRANGE (1081) -#define EM_GETCHARFORMAT (1082) -#define EM_GETEVENTMASK (1083) #define EM_GETFIRSTVISIBLELINE (206) -#define EM_GETHANDLE (189) -#define EM_GETLIMITTEXT (213) #define EM_GETLINE (196) #define EM_GETLINECOUNT (186) #define EM_GETMARGINS (212) #define EM_GETMODIFY (184) -#define EM_GETIMECOLOR (1129) -#define EM_GETIMEOPTIONS (1131) -#define EM_GETOPTIONS (1102) -#define EM_GETOLEINTERFACE (1084) -#define EM_GETPARAFORMAT (1085) -#define EM_GETPASSWORDCHAR (210) -#define EM_GETPUNCTUATION (1125) #define EM_GETRECT (178) #define EM_GETSEL (176) #define EM_GETSELTEXT (1086) #define EM_GETTEXTRANGE (1099) -#define EM_GETTHUMB (190) -#define EM_GETWORDBREAKPROC (209) -#define EM_GETWORDBREAKPROCEX (1104) -#define EM_GETWORDWRAPMODE (1127) #define EM_HIDESELECTION (1087) -#define EM_LIMITTEXT (197) #define EM_LINEFROMCHAR (201) #define EM_LINEINDEX (187) #define EM_LINELENGTH (193) #define EM_LINESCROLL (182) -#define EM_PASTESPECIAL (1088) #define EM_POSFROMCHAR (214) #define EM_REPLACESEL (194) -#define EM_REQUESTRESIZE (1089) -#define EM_SCROLL (181) #define EM_SCROLLCARET (183) #define EM_SELECTIONTYPE (1090) -#define EM_SETBKGNDCOLOR (1091) -#define EM_SETCHARFORMAT (1092) -#define EM_SETEVENTMASK (1093) -#define EM_SETHANDLE (188) -#define EM_SETIMECOLOR (1128) -#define EM_SETIMEOPTIONS (1130) -#define EM_SETLIMITTEXT (197) #define EM_SETMARGINS (211) -#define EM_SETMODIFY (185) -#define EM_SETOLECALLBACK (1094) -#define EM_SETOPTIONS (1101) -#define EM_SETPARAFORMAT (1095) -#define EM_SETPASSWORDCHAR (204) -#define EM_SETPUNCTUATION (1124) #define EM_SETREADONLY (207) -#define EM_SETRECT (179) -#define EM_SETRECTNP (180) #define EM_SETSEL (177) -#define EM_SETTABSTOPS (203) -#define EM_SETTARGETDEVICE (1096) -#define EM_SETWORDBREAKPROC (208) -#define EM_SETWORDBREAKPROCEX (1105) -#define EM_SETWORDWRAPMODE (1126) -#define EM_STREAMIN (1097) -#define EM_STREAMOUT (1098) #define EM_UNDO (199) #define WM_NULL (0) #define WM_CLEAR (771) -#define WM_COMMAND (273) #define WM_COPY (769) #define WM_CUT (768) #define WM_GETTEXT (13) #define WM_GETTEXTLENGTH (14) -#define WM_NOTIFY (78) #define WM_PASTE (770) #define WM_SETTEXT (12) #define WM_UNDO (772) @@ -115,6 +69,9 @@ #define EC_RIGHTMARGIN 2 #define EC_USEFONTINFO 0xffff +//#endif + +#if 0 #if PLAT_GTK #define VK_DOWN GDK_Down #define VK_UP GDK_Up @@ -132,6 +89,7 @@ #define VK_RETURN GDK_Return #define VK_ADD GDK_KP_Add #define VK_SUBTRACT GDK_KP_Subtract +#define VK_DIVIDE GDK_KP_Divide #endif #if PLAT_WX @@ -151,12 +109,18 @@ #define VK_RETURN WXK_RETURN #define VK_ADD WXK_ADD #define VK_SUBTRACT WXK_SUBTRACT +//TODO: +#define VK_DIVIDE WXK_DIVIDE +#endif + +#define SHIFT_PRESSED 1 +#define LEFT_CTRL_PRESSED 2 +#define LEFT_ALT_PRESSED 4 // Are these needed any more #define LPSTR char * #define LONG long #define LPDWORD (long *) -#endif /* SELCHANGE structure */ #define SEL_EMPTY (0) @@ -165,15 +129,6 @@ #define SEL_MULTICHAR (4) #define SEL_MULTIOBJECT (8) -/* FINDREPLACE structure */ -#define FR_MATCHCASE (0x4) -#define FR_WHOLEWORD (0x2) -#define FR_DOWN (0x1) - -#define SHIFT_PRESSED 1 -#define LEFT_CTRL_PRESSED 2 -#define LEFT_ALT_PRESSED 4 - struct RECT { LONG left; LONG top; @@ -181,6 +136,15 @@ struct RECT { LONG bottom; }; +/* FINDREPLACE structure */ + +#define FR_MATCHCASE (0x4) +#define FR_WHOLEWORD (0x2) +#define FR_DOWN (0x1) + +#endif + +#if 0 struct CHARRANGE { LONG cpMin; LONG cpMax; @@ -210,9 +174,10 @@ struct FORMATRANGE { RECT rcPage; CHARRANGE chrg; }; +#endif -#define MAKELONG(a, b) ((a) | ((b) << 16)) -#define LOWORD(x) (x & 0xffff) -#define HIWORD(x) (x >> 16) +//#define MAKELONG(a, b) ((a) | ((b) << 16)) +//#define LOWORD(x) (x & 0xffff) +//#define HIWORD(x) (x >> 16) #endif diff --git a/contrib/src/stc/scintilla/include/WindowAccessor.h b/contrib/src/stc/scintilla/include/WindowAccessor.h new file mode 100644 index 0000000000..4f41dfc7ff --- /dev/null +++ b/contrib/src/stc/scintilla/include/WindowAccessor.h @@ -0,0 +1,47 @@ +// WindowAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +class WindowAccessor : public Accessor { + // Private so WindowAccessor objects can not be copied + WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {} + WindowAccessor &operator=(const WindowAccessor &) { return *this; } +protected: + WindowID id; + PropSet &props; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + + bool InternalIsLeadByte(char ch); + void Fill(int position); +public: + WindowAccessor(WindowID id_, PropSet &props_) : + Accessor(), id(id_), props(props_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { + } + ~WindowAccessor(); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); +}; diff --git a/contrib/src/stc/scintilla/src/Accessor.cxx b/contrib/src/stc/scintilla/src/Accessor.cxx deleted file mode 100644 index 57b7e4dc4e..0000000000 --- a/contrib/src/stc/scintilla/src/Accessor.cxx +++ /dev/null @@ -1,112 +0,0 @@ -// SciTE - Scintilla based Text Editor -// Accessor.cxx - rapid easy access to contents of a Scintilla -// Copyright 1998-2000 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include - -#include "Platform.h" - -#include "PropSet.h" -#include "Accessor.h" -#include "Scintilla.h" - -void Accessor::Fill(int position) { - if (lenDoc == -1) - lenDoc = Platform::SendScintilla(id, WM_GETTEXTLENGTH, 0, 0); - startPos = position - slopSize; - if (startPos + bufferSize > lenDoc) - startPos = lenDoc - bufferSize; - if (startPos < 0) - startPos = 0; - endPos = startPos + bufferSize; - if (endPos > lenDoc) - endPos = lenDoc; - - TEXTRANGE tr = {{startPos, endPos}, buf}; - Platform::SendScintilla(id, EM_GETTEXTRANGE, 0, reinterpret_cast(&tr)); -} - -char Accessor::StyleAt(int position) { - return static_cast(Platform::SendScintilla( - id, SCI_GETSTYLEAT, position, 0)); -} - -int Accessor::GetLine(int position) { - return Platform::SendScintilla(id, EM_LINEFROMCHAR, position, 0); -} - -int Accessor::LineStart(int line) { - return Platform::SendScintilla(id, EM_LINEINDEX, line, 0); -} - -int Accessor::LevelAt(int line) { - return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0); -} - -int Accessor::Length() { - if (lenDoc == -1) - lenDoc = Platform::SendScintilla(id, WM_GETTEXTLENGTH, 0, 0); - return lenDoc; -} - -int Accessor::GetLineState(int line) { - return Platform::SendScintilla(id, SCI_GETLINESTATE, line); -} - -int Accessor::SetLineState(int line, int state) { - return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state); -} - -void StylingContext::StartAt(unsigned int start, char chMask) { - Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask); -} - -void StylingContext::ColourSegment(unsigned int start, unsigned int end, int chAttr) { - // Only perform styling if non empty range - if (end != start - 1) { - if (end < start) { - Platform::DebugPrintf("Bad colour positions %d - %d\n", start, end); - } - - if (validLen + (end - start + 1) >= bufferSize) - Flush(); - if (validLen + (end - start + 1) >= bufferSize) { - // Too big for buffer so send directly - Platform::SendScintilla(id, SCI_SETSTYLING, end - start + 1, chAttr); - } else { - if (chAttr != chWhile) - chFlags = 0; - chAttr |= chFlags; - for (unsigned int i = start; i <= end; i++) { - styleBuf[validLen++] = chAttr; - } - } - } -} - -void StylingContext::StartSegment(unsigned int pos) { - startSeg = pos; -} - -void StylingContext::ColourTo(unsigned int pos, int chAttr) { - ColourSegment(startSeg, pos, chAttr); - startSeg = pos+1; -} - -int StylingContext::GetLine(int position) { - return Platform::SendScintilla(id, EM_LINEFROMCHAR, position, 0); -} - -void StylingContext::SetLevel(int line, int level) { - Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level); -} - -void StylingContext::Flush() { - if (validLen > 0) { - Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen, - reinterpret_cast(styleBuf)); - validLen = 0; - } -} diff --git a/contrib/src/stc/scintilla/src/AutoComplete.cxx b/contrib/src/stc/scintilla/src/AutoComplete.cxx index c3ec29c3c9..5bc50d1efa 100644 --- a/contrib/src/stc/scintilla/src/AutoComplete.cxx +++ b/contrib/src/stc/scintilla/src/AutoComplete.cxx @@ -10,11 +10,16 @@ #include "AutoComplete.h" -AutoComplete::AutoComplete() { - lb = 0; - active = false; - posStart = 0; - strcpy(stopChars, ""); +AutoComplete::AutoComplete() : + active(false), + separator(' '), + ignoreCase(false), + chooseSingle(false), + posStart(0), + startLen(0), + cancelAtStartPos(true) { + stopChars[0] = '\0'; + fillUpChars[0] = '\0'; } AutoComplete::~AutoComplete() { @@ -44,8 +49,24 @@ bool AutoComplete::IsStopChar(char ch) { return ch && strchr(stopChars, ch); } -int AutoComplete::SetList(const char *list) { - int maxStrLen = 12; +void AutoComplete::SetFillUpChars(const char *fillUpChars_) { + strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars)); + fillUpChars[sizeof(fillUpChars) - 1] = '\0'; +} + +bool AutoComplete::IsFillUpChar(char ch) { + return ch && strchr(fillUpChars, ch); +} + +void AutoComplete::SetSeparator(char separator_) { + separator = separator_; +} + +char AutoComplete::GetSeparator() { + return separator; +} + +void AutoComplete::SetList(const char *list) { lb.Clear(); char *words = new char[strlen(list) + 1]; if (words) { @@ -53,21 +74,18 @@ int AutoComplete::SetList(const char *list) { char *startword = words; int i = 0; for (; words && words[i]; i++) { - if (words[i] == ' ') { + if (words[i] == separator) { words[i] = '\0'; lb.Append(startword); - maxStrLen = Platform::Maximum(maxStrLen, strlen(startword)); startword = words + i + 1; } } if (startword) { lb.Append(startword); - maxStrLen = Platform::Maximum(maxStrLen, strlen(startword)); } delete []words; } lb.Sort(); - return maxStrLen; } void AutoComplete::Show() { @@ -78,7 +96,6 @@ void AutoComplete::Show() { void AutoComplete::Cancel() { if (lb.Created()) { lb.Destroy(); - lb = 0; active = false; } } diff --git a/contrib/src/stc/scintilla/src/AutoComplete.h b/contrib/src/stc/scintilla/src/AutoComplete.h index 10216027bd..c1789ad7b6 100644 --- a/contrib/src/stc/scintilla/src/AutoComplete.h +++ b/contrib/src/stc/scintilla/src/AutoComplete.h @@ -9,10 +9,16 @@ class AutoComplete { bool active; char stopChars[256]; + char fillUpChars[256]; + char separator; public: + bool ignoreCase; + bool chooseSingle; ListBox lb; int posStart; int startLen; + // Should autocompletion be canceled if editor's currentPos <= startPos? + bool cancelAtStartPos; AutoComplete(); ~AutoComplete(); @@ -27,8 +33,16 @@ public: void SetStopChars(const char *stopChars_); bool IsStopChar(char ch); - // The list string contains a sequence of words separated by spaces - int SetList(const char *list); + // The fillup chars are characters which, when typed, fill up the selected word + void SetFillUpChars(const char *fillUpChars_); + bool IsFillUpChar(char ch); + + // The separator character is used when interpreting the list in SetList + void SetSeparator(char separator_); + char GetSeparator(); + + // The list string contains a sequence of words separated by the separator character + void SetList(const char *list); void Show(); void Cancel(); diff --git a/contrib/src/stc/scintilla/src/CallTip.cxx b/contrib/src/stc/scintilla/src/CallTip.cxx index ad6740208b..d22a963645 100644 --- a/contrib/src/stc/scintilla/src/CallTip.cxx +++ b/contrib/src/stc/scintilla/src/CallTip.cxx @@ -8,6 +8,7 @@ #include "Platform.h" +#include "Scintilla.h" #include "CallTip.h" CallTip::CallTip() { @@ -117,7 +118,7 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, Surface surfaceMeasure; surfaceMeasure.Init(); int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72; - font.Create(faceName, deviceHeight); + font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false); if (val) delete []val; val = new char[strlen(defn) + 1]; diff --git a/contrib/src/stc/scintilla/src/CallTip.h b/contrib/src/stc/scintilla/src/CallTip.h index cd5b093c84..cb5bc29032 100644 --- a/contrib/src/stc/scintilla/src/CallTip.h +++ b/contrib/src/stc/scintilla/src/CallTip.h @@ -6,13 +6,14 @@ #ifndef CALLTIP_H #define CALLTIP_H -const char callClassName[] = "CallTip"; - class CallTip { int startHighlight; int endHighlight; char *val; Font font; + // Private so CallTip objects can not be copied + CallTip(const CallTip &) {} + CallTip &operator=(const CallTip &) { return *this; } public: Window wCallTip; Window wDraw; diff --git a/contrib/src/stc/scintilla/src/CellBuffer.cxx b/contrib/src/stc/scintilla/src/CellBuffer.cxx index 777688511a..befec75fc3 100644 --- a/contrib/src/stc/scintilla/src/CellBuffer.cxx +++ b/contrib/src/stc/scintilla/src/CellBuffer.cxx @@ -88,7 +88,7 @@ void MarkerHandleSet::RemoveHandle(int handle) { if (mhn->handle == handle) { *pmhn = mhn->next; delete mhn; - return; + return ; } pmhn = &((*pmhn)->next); } @@ -101,7 +101,7 @@ void MarkerHandleSet::RemoveNumber(int markerNum) { if (mhn->number == markerNum) { *pmhn = mhn->next; delete mhn; - return; + return ; } pmhn = &((*pmhn)->next); } @@ -119,7 +119,11 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { LineVector::LineVector() { linesData = 0; lines = 0; + size = 0; levels = 0; + sizeLevels = 0; + handleCurrent = 1; + Init(); } @@ -161,6 +165,7 @@ void LineVector::Expand(int sizeNew) { Platform::DebugPrintf("No memory available\n"); // TODO: Blow up } + } void LineVector::ExpandLevels(int sizeNew) { @@ -180,6 +185,13 @@ void LineVector::ExpandLevels(int sizeNew) { Platform::DebugPrintf("No memory available\n"); // TODO: Blow up } + +} + +void LineVector::ClearLevels() { + delete []levels; + levels = 0; + sizeLevels = 0; } void LineVector::InsertValue(int pos, int value) { @@ -191,11 +203,23 @@ void LineVector::InsertValue(int pos, int value) { } } lines++; - for (int i = lines + 1; i > pos; i--) { + for (int i = lines; i > pos; i--) { linesData[i] = linesData[i - 1]; } linesData[pos].startPosition = value; linesData[pos].handleSet = 0; + if (levels) { + for (int j = lines; j > pos; j--) { + levels[j] = levels[j - 1]; + } + if (pos == 0) { + levels[pos] = SC_FOLDLEVELBASE; + } else if (pos == (lines - 1)) { // Last line will not be a folder + levels[pos] = SC_FOLDLEVELBASE; + } else { + levels[pos] = levels[pos - 1]; + } + } } void LineVector::SetValue(int pos, int value) { @@ -221,6 +245,15 @@ void LineVector::Remove(int pos) { for (int i = pos; i < lines; i++) { linesData[i] = linesData[i + 1]; } + if (levels) { + // Level information merges back onto previous line + int posAbove = pos - 1; + if (posAbove < 0) + posAbove = 0; + for (int j = posAbove; j < lines; j++) { + levels[j] = levels[j + 1]; + } + } lines--; } @@ -233,9 +266,8 @@ int LineVector::LineFromPosition(int pos) { return lines - 1; int lower = 0; int upper = lines; - int middle = 0; do { - middle = (upper + lower + 1) / 2; // Round high + int middle = (upper + lower + 1) / 2; // Round high if (pos < linesData[middle].startPosition) { upper = middle - 1; } else { @@ -260,11 +292,12 @@ int LineVector::AddMark(int line, int markerNum) { } void LineVector::MergeMarkers(int pos) { - if (linesData[pos].handleSet || linesData[pos + 1].handleSet) { - if (linesData[pos].handleSet && linesData[pos + 1].handleSet) { - linesData[pos].handleSet->CombineWith(linesData[pos].handleSet); - linesData[pos].handleSet = 0; - } + if (linesData[pos + 1].handleSet != NULL) { + if (linesData[pos].handleSet == NULL ) + linesData[pos].handleSet = new MarkerHandleSet; + linesData[pos].handleSet->CombineWith(linesData[pos + 1].handleSet); + delete linesData[pos + 1].handleSet; + linesData[pos + 1].handleSet = NULL; } } @@ -316,12 +349,13 @@ Action::~Action() { Destroy(); } -void Action::Create(actionType at_, int position_, char *data_, int lenData_) { +void Action::Create(actionType at_, int position_, char *data_, int lenData_, bool mayCoalesce_) { delete []data; position = position_; at = at_; data = data_; lenData = lenData_; + mayCoalesce = mayCoalesce_; } void Action::Destroy() { @@ -336,12 +370,207 @@ void Action::Grab(Action *source) { at = source->at; data = source->data; lenData = source->lenData; + mayCoalesce = source->mayCoalesce; // Ownership of source data transferred to this source->position = 0; source->at = startAction; source->data = 0; source->lenData = 0; + source->mayCoalesce = true; +} + +// The undo history stores a sequence of user operations that represent the user's view of the +// commands executed on the text. +// Each user operation contains a sequence of text insertion and text deletion actions. +// All the user operations are stored in a list of individual actions with 'start' actions used +// as delimiters between user operations. +// Initially there is one start action in the history. +// As each action is performed, it is recorded in the history. The action may either become +// part of the current user operation or may start a new user operation. If it is to be part of the +// current operation, then it overwrites the current last action. If it is to be part of a new +// operation, it is appended after the current last action. +// After writing the new action, a new start action is appended at the end of the history. +// The decision of whether to start a new user operation is based upon two factors. If a +// compound operation has been explicitly started by calling BeginUndoAction and no matching +// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current +// operation. If there is no outstanding BeginUndoAction call then a new operation is started +// unless it looks as if the new action is caused by the user typing or deleting a stream of text. +// Sequences that look like typing or deletion are coalesced into a single user operation. + +UndoHistory::UndoHistory() { + + lenActions = 100; + actions = new Action[lenActions]; + maxAction = 0; + currentAction = 0; + undoSequenceDepth = 0; + savePoint = 0; + + actions[currentAction].Create(startAction); +} + +UndoHistory::~UndoHistory() { + delete []actions; + actions = 0; +} + +void UndoHistory::EnsureUndoRoom() { + //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, length, currentAction); + if (currentAction >= 2) { + // Have to test that there is room for 2 more actions in the array + // as two actions may be created by this function + if (currentAction >= (lenActions - 2)) { + // Run out of undo nodes so extend the array + int lenActionsNew = lenActions * 2; + Action *actionsNew = new Action[lenActionsNew]; + if (!actionsNew) + return ; + for (int act = 0; act <= currentAction; act++) + actionsNew[act].Grab(&actions[act]); + delete []actions; + lenActions = lenActionsNew; + actions = actionsNew; + } + } +} + +void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData) { + EnsureUndoRoom(); + //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); + //Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, + // actions[currentAction - 1].position, actions[currentAction - 1].lenData); + if (currentAction >= 1) { + if (0 == undoSequenceDepth) { + // Top level actions may not always be coalesced + Action &actPrevious = actions[currentAction - 1]; + // See if current action can be coalesced into previous action + // Will work if both are inserts or deletes and position is same + if (at != actPrevious.at) { + currentAction++; + } else if (currentAction == savePoint) { + currentAction++; + } else if ((at == removeAction) && + ((position + lengthData * 2) != actPrevious.position)) { + // Removals must be at same position to coalesce + currentAction++; + } else if ((at == insertAction) && + (position != (actPrevious.position + actPrevious.lenData*2))) { + // Insertions must be immediately after to coalesce + currentAction++; + } else { + //Platform::DebugPrintf("action coalesced\n"); + } + + } else { + // Actions not at top level are always coalesced unless this is after return to top level + if (!actions[currentAction].mayCoalesce) + currentAction++; + } + } else { + currentAction++; + } + actions[currentAction].Create(at, position, data, lengthData); + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; +} + +void UndoHistory::BeginUndoAction() { + EnsureUndoRoom(); + if (undoSequenceDepth == 0) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } + undoSequenceDepth++; +} + +void UndoHistory::EndUndoAction() { + EnsureUndoRoom(); + undoSequenceDepth--; + if (0 == undoSequenceDepth) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } +} + +void UndoHistory::DropUndoSequence() { + undoSequenceDepth = 0; +} + +void UndoHistory::DeleteUndoHistory() { + for (int i = 1; i < maxAction; i++) + actions[i].Destroy(); + maxAction = 0; + currentAction = 0; + actions[currentAction].Create(startAction); + savePoint = 0; +} + +void UndoHistory::SetSavePoint() { + savePoint = currentAction; +} + +bool UndoHistory::IsSavePoint() const { + return savePoint == currentAction; +} + +bool UndoHistory::CanUndo() const { + return (currentAction > 0) && (maxAction > 0); +} + +int UndoHistory::StartUndo() { + // Drop any trailing startAction + if (actions[currentAction].at == startAction && currentAction > 0) + currentAction--; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act > 0) { + act--; + } + return currentAction - act; +} + +const Action &UndoHistory::GetUndoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedUndoStep() { + currentAction--; +} + +bool UndoHistory::CanRedo() const { + return maxAction > currentAction; +} + +int UndoHistory::StartRedo() { + // Drop any leading startAction + if (actions[currentAction].at == startAction && currentAction < maxAction) + currentAction++; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act < maxAction) { + act++; + } + return act - currentAction; +} + +const Action &UndoHistory::GetRedoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedRedoStep() { + currentAction++; } CellBuffer::CellBuffer(int initialLength) { @@ -352,28 +581,17 @@ CellBuffer::CellBuffer(int initialLength) { gaplen = initialLength; part2body = body + gaplen; readOnly = false; - - lenActions = 100; - actions = new Action[lenActions]; - maxAction = 0; - currentAction = 0; - collectingUndo = undoCollectAutoStart; - undoSequenceDepth = 0; - savePoint = 0; - - actions[currentAction].Create(startAction); + collectingUndo = true; } CellBuffer::~CellBuffer() { delete []body; body = 0; - delete []actions; - actions = 0; } void CellBuffer::GapTo(int position) { if (position == part1len) - return; + return ; if (position < part1len) { int diff = part1len - position; //Platform::DebugPrintf("Move gap backwards to %d diff = %d part1len=%d length=%d \n", position,diff, part1len, length); @@ -405,6 +623,7 @@ void CellBuffer::RoomFor(int insertionLength) { size = newSize; //Platform::DebugPrintf("end need room %d %d - size=%d length=%d\n", gaplen, insertionLength,size,length); } + } // To make it easier to write code that uses ByteAt, a position outside the range of the buffer @@ -429,16 +648,16 @@ void CellBuffer::SetByteAt(int position, char ch) { if (position < 0) { //Platform::DebugPrintf("Bad position %d\n",position); - return; + return ; } if (position >= length + 11) { Platform::DebugPrintf("Very Bad position %d of %d\n", position, length); //exit(2); - return; + return ; } if (position >= length) { //Platform::DebugPrintf("Bad position %d of %d\n",position,length); - return; + return ; } if (position < part1len) { @@ -454,20 +673,20 @@ char CellBuffer::CharAt(int position) { void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) { if (lengthRetrieve < 0) - return; + return ; if (position < 0) - return; + return ; int bytePos = position * 2; if ((bytePos + lengthRetrieve * 2) > length) { - Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n",bytePos, - lengthRetrieve, length); - return; + Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", bytePos, + lengthRetrieve, length); + return ; } GapTo(0); // Move the buffer so its easy to subscript into it char *pb = part2body + bytePos; while (lengthRetrieve--) { *buffer++ = *pb; - pb +=2; + pb += 2; } } @@ -486,7 +705,7 @@ const char *CellBuffer::InsertString(int position, char *s, int insertLength) { for (int i = 0; i < insertLength / 2; i++) { data[i] = s[i * 2]; } - AppendAction(insertAction, position, data, insertLength / 2); + uh.AppendAction(insertAction, position, data, insertLength / 2); } BasicInsertString(position, s, insertLength); @@ -502,9 +721,9 @@ void CellBuffer::InsertCharStyle(int position, char ch, char style) { } bool CellBuffer::SetStyleAt(int position, char style, char mask) { - char curVal = ByteAt(position*2 + 1); + char curVal = ByteAt(position * 2 + 1); if ((curVal & mask) != style) { - SetByteAt(position*2 + 1, (curVal & ~mask) | style); + SetByteAt(position*2 + 1, static_cast((curVal & ~mask) | style)); return true; } else { return false; @@ -517,7 +736,7 @@ bool CellBuffer::SetStyleFor(int position, int lengthStyle, char style, char mas while (lengthStyle--) { char curVal = ByteAt(bytePos); if ((curVal & mask) != style) { - SetByteAt(bytePos, (curVal & ~mask) | style); + SetByteAt(bytePos, static_cast((curVal & ~mask) | style)); changed = true; } bytePos += 2; @@ -525,48 +744,6 @@ bool CellBuffer::SetStyleFor(int position, int lengthStyle, char style, char mas return changed; } -void CellBuffer::EnsureUndoRoom() { - //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, length, currentAction); - if (currentAction >= 2) { - // Have to test that there is room for 2 more actions in the array - // as two actions may be created by this function - if (currentAction >= (lenActions - 2)) { - // Run out of undo nodes so extend the array - int lenActionsNew = lenActions * 2; - Action *actionsNew = new Action[lenActionsNew]; - if (!actionsNew) - return; - for (int act = 0; act <= currentAction; act++) - actionsNew[act].Grab(&actions[act]); - delete []actions; - lenActions = lenActionsNew; - actions = actionsNew; - } - } -} - -void CellBuffer::AppendAction(actionType at, int position, char *data, int lengthData) { - EnsureUndoRoom(); - //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); - if (currentAction >= 2) { - // See if current action can be coalesced into previous action - // Will work if both are inserts or deletes and position is same or two different - if ((at != actions[currentAction - 1].at) || (abs(position - actions[currentAction - 1].position) > 2)) { - currentAction++; - } else if (currentAction == savePoint) { - currentAction++; - } - } else { - currentAction++; - } - actions[currentAction].Create(at, position, data, lengthData); - if ((collectingUndo == undoCollectAutoStart) && (0 == undoSequenceDepth)) { - currentAction++; - actions[currentAction].Create(startAction); - } - maxAction = currentAction; -} - const char *CellBuffer::DeleteChars(int position, int deleteLength) { // InsertString and DeleteChars are the bottleneck though which all changes occur char *data = 0; @@ -577,7 +754,7 @@ const char *CellBuffer::DeleteChars(int position, int deleteLength) { for (int i = 0; i < deleteLength / 2; i++) { data[i] = ByteAt(position + i * 2); } - AppendAction(removeAction, position, data, deleteLength / 2); + uh.AppendAction(removeAction, position, data, deleteLength / 2); } BasicDeleteChars(position, deleteLength); @@ -616,11 +793,11 @@ void CellBuffer::SetReadOnly(bool set) { } void CellBuffer::SetSavePoint() { - savePoint = currentAction; + uh.SetSavePoint(); } bool CellBuffer::IsSavePoint() { - return savePoint == currentAction; + return uh.IsSavePoint(); } int CellBuffer::AddMark(int line, int markerNum) { @@ -661,7 +838,7 @@ int CellBuffer::LineFromHandle(int markerHandle) { void CellBuffer::BasicInsertString(int position, char *s, int insertLength) { //Platform::DebugPrintf("Inserting at %d for %d\n", position, insertLength); if (insertLength == 0) - return; + return ; RoomFor(insertLength); GapTo(position); @@ -721,7 +898,7 @@ void CellBuffer::BasicInsertString(int position, char *s, int insertLength) { void CellBuffer::BasicDeleteChars(int position, int deleteLength) { //Platform::DebugPrintf("Deleting at %d for %d\n", position, deleteLength); if (deleteLength == 0) - return; + return ; if ((position == 0) && (deleteLength == length)) { // If whole buffer is being deleted, faster to reinitialise lines data @@ -753,6 +930,7 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) { ignoreNL = true; // First \n is not real deletion } + char ch = chNext; for (int i = 0; i < deleteLength; i += 2) { chNext = ' '; @@ -770,6 +948,7 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) { ignoreNL = false; // Further \n are not real deletions } + ch = chNext; } // May have to fix up end if last deletion causes cr to be next to lf @@ -790,9 +969,9 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) { part2body = body + gaplen; } -undoCollectionType CellBuffer::SetUndoCollection(undoCollectionType collectUndo) { +bool CellBuffer::SetUndoCollection(bool collectUndo) { collectingUndo = collectUndo; - undoSequenceDepth = 0; + uh.DropUndoSequence(); return collectingUndo; } @@ -800,116 +979,72 @@ bool CellBuffer::IsCollectingUndo() { return collectingUndo; } -void CellBuffer::AppendUndoStartAction() { - EnsureUndoRoom(); - // Finish any currently active undo sequence - undoSequenceDepth = 0; - if (actions[currentAction].at != startAction) { - undoSequenceDepth++; - currentAction++; - actions[currentAction].Create(startAction); - maxAction = currentAction; - } -} - void CellBuffer::BeginUndoAction() { - EnsureUndoRoom(); - if (undoSequenceDepth == 0) { - if (actions[currentAction].at != startAction) { - currentAction++; - actions[currentAction].Create(startAction); - maxAction = currentAction; - } - } - undoSequenceDepth++; + uh.BeginUndoAction(); } void CellBuffer::EndUndoAction() { - EnsureUndoRoom(); - undoSequenceDepth--; - if (0 == undoSequenceDepth) { - if (actions[currentAction].at != startAction) { - currentAction++; - actions[currentAction].Create(startAction); - maxAction = currentAction; - } - } + uh.EndUndoAction(); } void CellBuffer::DeleteUndoHistory() { - for (int i = 1; i < maxAction; i++) - actions[i].Destroy(); - maxAction = 0; - currentAction = 0; - savePoint = 0; + uh.DeleteUndoHistory(); } bool CellBuffer::CanUndo() { - return (!readOnly) && ((currentAction > 0) && (maxAction > 0)); + return (!readOnly) && (uh.CanUndo()); } int CellBuffer::StartUndo() { - // Drop any trailing startAction - if (actions[currentAction].at == startAction && currentAction > 0) - currentAction--; - - // Count the steps in this action - int act = currentAction; - while (actions[act].at != startAction && act > 0) { - act--; - } - return currentAction - act; + return uh.StartUndo(); } -const Action &CellBuffer::UndoStep() { - const Action &actionStep = actions[currentAction]; +const Action &CellBuffer::GetUndoStep() const { + return uh.GetUndoStep(); +} + +void CellBuffer::PerformUndoStep() { + const Action &actionStep = uh.GetUndoStep(); if (actionStep.at == insertAction) { BasicDeleteChars(actionStep.position, actionStep.lenData*2); } else if (actionStep.at == removeAction) { char *styledData = new char[actionStep.lenData * 2]; for (int i = 0; i < actionStep.lenData; i++) { styledData[i*2] = actionStep.data[i]; - styledData[i*2+1] = 0; + styledData[i*2 + 1] = 0; } BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); delete []styledData; } - currentAction--; - return actionStep; + uh.CompletedUndoStep(); } bool CellBuffer::CanRedo() { - return (!readOnly) && (maxAction > currentAction); + return (!readOnly) && (uh.CanRedo()); } int CellBuffer::StartRedo() { - // Drop any leading startAction - if (actions[currentAction].at == startAction && currentAction < maxAction) - currentAction++; - - // Count the steps in this action - int act = currentAction; - while (actions[act].at != startAction && act < maxAction) { - act++; - } - return act - currentAction; + return uh.StartRedo(); } -const Action &CellBuffer::RedoStep() { - const Action &actionStep = actions[currentAction]; +const Action &CellBuffer::GetRedoStep() const { + return uh.GetRedoStep(); +} + +void CellBuffer::PerformRedoStep() { + const Action &actionStep = uh.GetRedoStep(); if (actionStep.at == insertAction) { char *styledData = new char[actionStep.lenData * 2]; for (int i = 0; i < actionStep.lenData; i++) { styledData[i*2] = actionStep.data[i]; - styledData[i*2+1] = 0; + styledData[i*2 + 1] = 0; } BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); delete []styledData; } else if (actionStep.at == removeAction) { BasicDeleteChars(actionStep.position, actionStep.lenData*2); } - currentAction++; - return actionStep; + uh.CompletedRedoStep(); } int CellBuffer::SetLineState(int line, int state) { @@ -925,7 +1060,7 @@ int CellBuffer::GetLineState(int line) { int CellBuffer::GetMaxLineState() { return lineStates.Length(); } - + int CellBuffer::SetLevel(int line, int level) { int prev = 0; if ((line >= 0) && (line < lv.lines)) { @@ -948,3 +1083,6 @@ int CellBuffer::GetLevel(int line) { } } +void CellBuffer::ClearLevels() { + lv.ClearLevels(); +} diff --git a/contrib/src/stc/scintilla/src/CellBuffer.h b/contrib/src/stc/scintilla/src/CellBuffer.h index 5fbe2ea8a0..4a1ecb3989 100644 --- a/contrib/src/stc/scintilla/src/CellBuffer.h +++ b/contrib/src/stc/scintilla/src/CellBuffer.h @@ -58,6 +58,7 @@ public: void Expand(int sizeNew); void ExpandLevels(int sizeNew=-1); + void ClearLevels(); void InsertValue(int pos, int value); void SetValue(int pos, int value); void Remove(int pos); @@ -79,15 +80,52 @@ public: int position; char *data; int lenData; + bool mayCoalesce; Action(); ~Action(); - void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0); + void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true); void Destroy(); void Grab(Action *source); }; -enum undoCollectionType { undoCollectNone, undoCollectAutoStart, undoCollectManualStart }; +class UndoHistory { + Action *actions; + int lenActions; + int maxAction; + int currentAction; + int undoSequenceDepth; + int savePoint; + + void EnsureUndoRoom(); + +public: + UndoHistory(); + ~UndoHistory(); + + void AppendAction(actionType at, int position, char *data, int length); + + void BeginUndoAction(); + void EndUndoAction(); + void DropUndoSequence(); + void DeleteUndoHistory(); + + // The save point is a marker in the undo stack where the container has stated that + // the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint() const; + + // To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + // called that many times. Similarly for redo. + bool CanUndo() const; + int StartUndo(); + const Action &GetUndoStep() const; + void CompletedUndoStep(); + bool CanRedo() const; + int StartRedo(); + const Action &GetRedoStep() const; + void CompletedRedoStep(); +}; // Holder for an expandable array of characters that supports undo and line markers // Based on article "Data Structures in a Bit-Mapped Text Editor" @@ -102,24 +140,16 @@ private: char *part2body; bool readOnly; - Action *actions; - int lenActions; - int maxAction; - int currentAction; - undoCollectionType collectingUndo; - int undoSequenceDepth; - int savePoint; + bool collectingUndo; + UndoHistory uh; LineVector lv; - SVector lineStates; + SVector lineStates; void GapTo(int position); void RoomFor(int insertionLength); - void EnsureUndoRoom(); - void AppendAction(actionType at, int position, char *data, int length); - inline char ByteAt(int position); void SetByteAt(int position, char ch); @@ -143,7 +173,7 @@ public: // Setting styles for positions outside the range of the buffer is safe and has no effect. // True is returned if the style of a character changed. - bool SetStyleAt(int position, char style, char mask=(char)0xff); + bool SetStyleAt(int position, char style, char mask='\377'); bool SetStyleFor(int position, int length, char style, char mask); const char *DeleteChars(int position, int deleteLength); @@ -168,21 +198,22 @@ public: void BasicInsertString(int position, char *s, int insertLength); void BasicDeleteChars(int position, int deleteLength); - undoCollectionType SetUndoCollection(undoCollectionType collectUndo); + bool SetUndoCollection(bool collectUndo); bool IsCollectingUndo(); - void AppendUndoStartAction(); void BeginUndoAction(); void EndUndoAction(); void DeleteUndoHistory(); - // To perform an undo, StartUndo is called to retreive the number of steps, then UndoStep is + // To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is // called that many times. Similarly for redo. bool CanUndo(); int StartUndo(); - const Action &UndoStep(); + const Action &GetUndoStep() const; + void PerformUndoStep(); bool CanRedo(); int StartRedo(); - const Action &RedoStep(); + const Action &GetRedoStep() const; + void PerformRedoStep(); int SetLineState(int line, int state); int GetLineState(int line); @@ -190,6 +221,7 @@ public: int SetLevel(int line, int level); int GetLevel(int line); + void ClearLevels(); }; #define CELL_SIZE 2 diff --git a/contrib/src/stc/scintilla/src/ContractionState.cxx b/contrib/src/stc/scintilla/src/ContractionState.cxx index 6f41461eb1..0558b4c365 100644 --- a/contrib/src/stc/scintilla/src/ContractionState.cxx +++ b/contrib/src/stc/scintilla/src/ContractionState.cxx @@ -30,7 +30,6 @@ void ContractionState::MakeValid() const { if (!valid) { // Could be cleverer by keeping the index of the last still valid entry // rather than invalidating all. - int linePrev = -1; int lineDisplay = 0; for (int line=0; line= size) { - Grow(size + growSize); + if ((linesInDoc + lineCount + 2) >= size) { + Grow(linesInDoc + lineCount + growSize); } linesInDoc += lineCount; linesInDisplay += lineCount; - for (int i = linesInDoc + 1; i >= lineDoc + lineCount; i--) { + for (int i = linesInDoc; i >= lineDoc + lineCount; i--) { lines[i].visible = lines[i - lineCount].visible; lines[i].expanded = lines[i - lineCount].expanded; } @@ -130,16 +129,18 @@ void ContractionState::DeleteLines(int lineDoc, int lineCount) { linesInDisplay -= lineCount; return; } - int delta = 0; - for (int d=0;d lineDocEnd) + return false; if (size == 0) { - Grow(lineDocEnd + growSize); + Grow(linesInDoc + growSize); } // TODO: modify docLine members to mirror displayLine int delta = 0; @@ -166,12 +171,6 @@ bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible delta += visible ? 1 : -1; lines[line].visible = visible; } - lines[line].displayLine += delta; - } - if (delta != 0) { - for (int line=lineDocEnd+1; line <= linesInDoc; line++) { - lines[line].displayLine += delta; - } } } linesInDisplay += delta; @@ -191,7 +190,7 @@ bool ContractionState::GetExpanded(int lineDoc) const { bool ContractionState::SetExpanded(int lineDoc, bool expanded) { if (size == 0) { - Grow(lineDoc + growSize); + Grow(linesInDoc + growSize); } if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { if (lines[lineDoc].expanded != expanded) { @@ -201,3 +200,9 @@ bool ContractionState::SetExpanded(int lineDoc, bool expanded) { } return false; } + +void ContractionState::ShowAll() { + delete []lines; + lines = 0; + size = 0; +} diff --git a/contrib/src/stc/scintilla/src/ContractionState.h b/contrib/src/stc/scintilla/src/ContractionState.h index 9e17a76937..2c344efeea 100644 --- a/contrib/src/stc/scintilla/src/ContractionState.h +++ b/contrib/src/stc/scintilla/src/ContractionState.h @@ -42,9 +42,11 @@ public: bool GetVisible(int lineDoc) const; bool SetVisible(int lineDocStart, int lineDocEnd, bool visible); - + bool GetExpanded(int lineDoc) const; bool SetExpanded(int lineDoc, bool expanded); + + void ShowAll(); }; #endif diff --git a/contrib/src/stc/scintilla/src/Document.cxx b/contrib/src/stc/scintilla/src/Document.cxx index 7d832241fc..c883dd253f 100644 --- a/contrib/src/stc/scintilla/src/Document.cxx +++ b/contrib/src/stc/scintilla/src/Document.cxx @@ -32,7 +32,10 @@ Document::Document() { } endStyled = 0; enteredCount = 0; + enteredReadOnlyCount = 0; tabInChars = 8; + indentInChars = 0; + useTabs = true; watchers = 0; lenWatchers = 0; } @@ -51,7 +54,7 @@ int Document::AddRef() { return refCount++; } -// Decrease reference count and return its provius value. +// Decrease reference count and return its previous value. // Delete the document if reference count reaches zero. int Document::Release() { int curRefCount = --refCount; @@ -65,26 +68,54 @@ void Document::SetSavePoint() { NotifySavePoint(true); } +int Document::AddMark(int line, int markerNum) { + int prev = cb.AddMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0); + NotifyModified(mh); + return prev; +} + +void Document::DeleteMark(int line, int markerNum) { + cb.DeleteMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0); + NotifyModified(mh); +} + +void Document::DeleteMarkFromHandle(int markerHandle) { + cb.DeleteMarkFromHandle(markerHandle); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + NotifyModified(mh); +} + +void Document::DeleteAllMarks(int markerNum) { + cb.DeleteAllMarks(markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + NotifyModified(mh); +} + int Document::LineStart(int line) { return cb.LineStart(line); } +int Document::LineEnd(int line) { + if (line == LinesTotal() - 1) { + return LineStart(line + 1); + } else { + int position = LineStart(line + 1) - 1; + // When line terminator is CR+LF, may need to go back one more + if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { + position--; + } + return position; + } +} + int Document::LineFromPosition(int pos) { return cb.LineFromPosition(pos); } int Document::LineEndPosition(int position) { - int line = LineFromPosition(position); - if (line == LinesTotal() - 1) { - position = LineStart(line + 1); - } else { - position = LineStart(line + 1) - 1; - // When line terminator is CR+LF, may need to go back one more - if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { - position--; - } - } - return position; + return LineEnd(LineFromPosition(position)); } int Document::VCHomePosition(int position) { @@ -124,7 +155,10 @@ int Document::GetLastChild(int lineParent, int level) { level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK; int maxLine = LinesTotal(); int lineMaxSubord = lineParent; - while ((lineMaxSubord < maxLine-1) && IsSubordinate(level, GetLevel(lineMaxSubord+1))) { + while (lineMaxSubord < maxLine-1) { + EnsureStyledTo(LineStart(lineMaxSubord+2)); + if (!IsSubordinate(level, GetLevel(lineMaxSubord+1))) + break; lineMaxSubord++; } if (lineMaxSubord > lineParent) { @@ -167,27 +201,58 @@ bool Document::IsCrLf(int pos) { return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); } -bool Document::IsDBCS(int pos) { #if PLAT_WIN +bool Document::IsDBCS(int pos) { if (dbcsCodePage) { - // Anchor DBCS calculations at start of line because start of line can - // not be a DBCS trail byte. - int startLine = pos; - while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') - startLine--; - while (startLine <= pos) { - if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) { + if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + return ch >= 0x80; + } else { + // Anchor DBCS calculations at start of line because start of line can + // not be a DBCS trail byte. + int startLine = pos; + while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') + startLine--; + while (startLine <= pos) { + if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) { + startLine++; + if (startLine >= pos) + return true; + } startLine++; - if (startLine >= pos) - return true; } - startLine++; } } return false; +} #else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool Document::IsDBCS(int) { return false; +} #endif + +int Document::LenChar(int pos) { + if (IsCrLf(pos)) { + return 2; + } else if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + if (ch < 0x80) + return 1; + int len = 2; + if (ch >= (0x80+0x40+0x20)) + len = 3; + int lengthDoc = Length(); + if ((pos + len) > lengthDoc) + return lengthDoc-pos; + else + return len; + } else if (IsDBCS(pos)) { + return 2; + } else { + return 1; + } } // Normalise a position so that it is not halfway through a two byte character. @@ -221,29 +286,41 @@ int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { #if PLAT_WIN if (dbcsCodePage) { - // Anchor DBCS calculations at start of line because start of line can - // not be a DBCS trail byte. - int startLine = pos; - while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') - startLine--; - bool atLeadByte = false; - while (startLine < pos) { - if (atLeadByte) - atLeadByte = false; - else if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) - atLeadByte = true; - else - atLeadByte = false; - startLine++; - //Platform::DebugPrintf("DBCS %s\n", atlead ? "D" : "-"); - } + if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) { + // ch is a trail byte + if (moveDir > 0) + pos++; + else + pos--; + ch = static_cast(cb.CharAt(pos)); + } + } else { + // Anchor DBCS calculations at start of line because start of line can + // not be a DBCS trail byte. + int startLine = pos; + while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') + startLine--; + bool atLeadByte = false; + while (startLine < pos) { + if (atLeadByte) + atLeadByte = false; + else if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) + atLeadByte = true; + else + atLeadByte = false; + startLine++; + //Platform::DebugPrintf("DBCS %s\n", atlead ? "D" : "-"); + } - if (atLeadByte) { - // Position is between a lead byte and a trail byte - if (moveDir > 0) - return pos + 1; - else - return pos - 1; + if (atLeadByte) { + // Position is between a lead byte and a trail byte + if (moveDir > 0) + return pos + 1; + else + return pos - 1; + } } } #endif @@ -261,41 +338,62 @@ void Document::ModifiedAt(int pos) { // Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number void Document::DeleteChars(int pos, int len) { + if ((pos + len) > Length()) + return; + if (cb.IsReadOnly() && enteredReadOnlyCount==0) { + enteredReadOnlyCount++; + NotifyModifyAttempt(); + enteredReadOnlyCount--; + } if (enteredCount == 0) { enteredCount++; - if (cb.IsReadOnly()) - NotifyModifyAttempt(); if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, + pos, len, + 0, 0)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); const char *text = cb.DeleteChars(pos*2, len * 2); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); ModifiedAt(pos); - int modFlags = SC_MOD_DELETETEXT | SC_PERFORMED_USER; - DocModification mh(modFlags, pos, len, LinesTotal() - prevLinesTotal, text); - NotifyModified(mh); + NotifyModified( + DocModification( + SC_MOD_DELETETEXT | SC_PERFORMED_USER, + pos, len, + LinesTotal() - prevLinesTotal, text)); } enteredCount--; } } void Document::InsertStyledString(int position, char *s, int insertLength) { + if (cb.IsReadOnly() && enteredReadOnlyCount==0) { + enteredReadOnlyCount++; + NotifyModifyAttempt(); + enteredReadOnlyCount--; + } if (enteredCount == 0) { enteredCount++; - if (cb.IsReadOnly()) - NotifyModifyAttempt(); if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, + position / 2, insertLength / 2, + 0, 0)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); const char *text = cb.InsertString(position, s, insertLength); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); ModifiedAt(position / 2); - - int modFlags = SC_MOD_INSERTTEXT | SC_PERFORMED_USER; - DocModification mh(modFlags, position / 2, insertLength / 2, LinesTotal() - prevLinesTotal, text); - NotifyModified(mh); + NotifyModified( + DocModification( + SC_MOD_INSERTTEXT | SC_PERFORMED_USER, + position / 2, insertLength / 2, + LinesTotal() - prevLinesTotal, text)); } enteredCount--; } @@ -307,9 +405,18 @@ int Document::Undo() { enteredCount++; bool startSavePoint = cb.IsSavePoint(); int steps = cb.StartUndo(); + //Platform::DebugPrintf("Steps=%d\n", steps); for (int step=0; step= tabSize) && (length > 0)) { + *linebuf++ = '\t'; + indent -= tabSize; + length--; + } + } + while ((indent > 0) && (length > 0)) { + *linebuf++ = ' '; + indent--; + length--; + } + *linebuf = '\0'; +} + +int Document::GetLineIndentation(int line) { + int indent = 0; + if ((line >= 0) && (line < LinesTotal())) { + int lineStart = LineStart(line); + int length = Length(); + for (int i=lineStart;i= 0) && (line < LinesTotal())) { + for (int i=LineStart(line);i= lineTop; line--) { - InsertChar(LineStart(line), '\t'); - } - } else { - // Dedent - suck white space off the front of the line to dedent by equivalent of a tab - for (int line = lineBottom; line >= lineTop; line--) { - int ispc = 0; - while (ispc < tabInChars && cb.CharAt(LineStart(line) + ispc) == ' ') - ispc++; - int posStartLine = LineStart(line); - if (ispc == tabInChars) { - DeleteChars(posStartLine, ispc); - } else if (cb.CharAt(posStartLine + ispc) == '\t') { - DeleteChars(posStartLine, ispc + 1); - } else { // Hit a non-white - DeleteChars(posStartLine, ispc); - } - } + // Dedent - suck white space off the front of the line to dedent by equivalent of a tab + for (int line = lineBottom; line >= lineTop; line--) { + int indentOfLine = GetLineIndentation(line); + if (forwards) + SetLineIndentation(line, indentOfLine + IndentSize()); + else + SetLineIndentation(line, indentOfLine - IndentSize()); } } @@ -485,6 +677,8 @@ void Document::ConvertLineEnds(int eolModeSet) { } bool Document::IsWordChar(unsigned char ch) { + if ((SC_CP_UTF8 == dbcsCodePage) && (ch >0x80)) + return true; return wordchars[ch]; } @@ -523,25 +717,29 @@ int Document::NextWordStart(int pos, int delta) { return pos; } -bool Document::IsWordAt(int start, int end) { - int lengthDoc = Length(); - if (start > 0) { - char ch = CharAt(start - 1); - if (IsWordChar(ch)) - return false; - } - if (end < lengthDoc - 1) { - char ch = CharAt(end); - if (IsWordChar(ch)) - return false; +bool Document::IsWordStartAt(int pos) { + if (pos > 0) { + return !IsWordChar(CharAt(pos - 1)); } return true; } +bool Document::IsWordEndAt(int pos) { + if (pos < Length() - 1) { + return !IsWordChar(CharAt(pos)); + } + return true; +} + +bool Document::IsWordAt(int start, int end) { + return IsWordStartAt(start) && IsWordEndAt(end); +} + // Find text in document, supporting both forward and backward // searches (just pass minPos > maxPos to do a backward search) // Has not been tested with backwards DBCS searches yet. -long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word) { +long Document::FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart) { bool forward = minPos <= maxPos; int increment = forward ? 1 : -1; @@ -551,16 +749,14 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv // Compute actual search ranges needed int lengthFind = strlen(s); - int endSearch = 0; + int endSearch = endPos; if (startPos <= endPos) { endSearch = endPos - lengthFind + 1; - } else { - endSearch = endPos; } //Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind); char firstChar = s[0]; if (!caseSensitive) - firstChar = toupper(firstChar); + firstChar = static_cast(toupper(firstChar)); int pos = startPos; while (forward ? (pos < endSearch) : (pos >= endSearch)) { char ch = CharAt(pos); @@ -573,8 +769,10 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv found = false; } if (found) { - if ((!word) || IsWordAt(pos, pos + lengthFind)) - return pos; + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; } } } else { @@ -586,8 +784,10 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv found = false; } if (found) { - if ((!word) || IsWordAt(pos, pos + lengthFind)) - return pos; + if (!(word && wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; } } } @@ -605,6 +805,25 @@ int Document::LinesTotal() { return cb.Lines(); } +void Document::ChangeCase(Range r, bool makeUpperCase) { + for (int pos=r.start; pos(toupper(ch))); + } + } else { + if (isupper(ch)) { + ChangeChar(pos, static_cast(tolower(ch))); + } + } + } + } +} + void Document::SetWordChars(unsigned char *chars) { int ch; for (ch = 0; ch < 256; ch++) { @@ -671,6 +890,13 @@ void Document::SetStyles(int length, char *styles) { } } +bool Document::EnsureStyledTo(int pos) { + // Ask the watchers to style, and stop as soon as one responds. + for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) + watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos); + return pos <= GetEndStyled(); +} + bool Document::AddWatcher(DocWatcher *watcher, void *userData) { for (int i = 0; i < lenWatchers; i++) { if ((watchers[i].watcher == watcher) && diff --git a/contrib/src/stc/scintilla/src/Document.h b/contrib/src/stc/scintilla/src/Document.h index fba611c7f7..af477dd79b 100644 --- a/contrib/src/stc/scintilla/src/Document.h +++ b/contrib/src/stc/scintilla/src/Document.h @@ -74,9 +74,10 @@ private: CellBuffer cb; bool wordchars[256]; int stylingPos; - int stylingMask; + char stylingMask; int endStyled; int enteredCount; + int enteredReadOnlyCount; WatcherWithUserData *watchers; int lenWatchers; @@ -86,8 +87,11 @@ public: int stylingBitsMask; int eolMode; + // dbcsCodePage can also be SC_CP_UTF8 to enable UTF-8 mode int dbcsCodePage; int tabInChars; + int indentInChars; + bool useTabs; Document(); virtual ~Document(); @@ -98,6 +102,7 @@ public: int LineFromPosition(int pos); int ClampPositionIntoDocument(int pos); bool IsCrLf(int pos); + int LenChar(int pos); int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); // Gateways to modifying document @@ -108,21 +113,28 @@ public: bool CanUndo() { return cb.CanUndo(); } bool CanRedo() { return cb.CanRedo(); } void DeleteUndoHistory() { cb.DeleteUndoHistory(); } - undoCollectionType SetUndoCollection(undoCollectionType collectUndo) { + bool SetUndoCollection(bool collectUndo) { return cb.SetUndoCollection(collectUndo); } - void AppendUndoStartAction() { cb.AppendUndoStartAction(); } + bool IsCollectingUndo() { return cb.IsCollectingUndo(); } void BeginUndoAction() { cb.BeginUndoAction(); } void EndUndoAction() { cb.EndUndoAction(); } void SetSavePoint(); bool IsSavePoint() { return cb.IsSavePoint(); } + + int GetLineIndentation(int line); + void SetLineIndentation(int line, int indent); + int GetLineIndentPosition(int line); + int GetColumn(int position); void Indent(bool forwards, int lineBottom, int lineTop); void ConvertLineEnds(int eolModeSet); void SetReadOnly(bool set) { cb.SetReadOnly(set); } + bool IsReadOnly() { return cb.IsReadOnly(); } void InsertChar(int pos, char ch); void InsertString(int position, const char *s); void InsertString(int position, const char *s, int insertLength); + void ChangeChar(int pos, char ch); void DelChar(int pos); int DelCharBack(int pos); @@ -132,17 +144,19 @@ public: } char StyleAt(int position) { return cb.StyleAt(position); } int GetMark(int line) { return cb.GetMark(line); } - int AddMark(int line, int markerNum) { return cb.AddMark(line, markerNum); } - void DeleteMark(int line, int markerNum) { cb.DeleteMark(line, markerNum); } - void DeleteMarkFromHandle(int markerHandle) { cb.DeleteMarkFromHandle(markerHandle); } - void DeleteAllMarks(int markerNum) { cb.DeleteAllMarks(markerNum); } + int AddMark(int line, int markerNum); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); } int LineStart(int line); + int LineEnd(int line); int LineEndPosition(int position); int VCHomePosition(int position); int SetLevel(int line, int level); int GetLevel(int line) { return cb.GetLevel(line); } + void ClearLevels() { cb.ClearLevels(); } int GetLastChild(int lineParent, int level=-1); int GetFoldParent(int line); @@ -150,16 +164,20 @@ public: int ExtendWordSelect(int pos, int delta); int NextWordStart(int pos, int delta); int Length() { return cb.Length(); } - long FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word); - long FindText(WORD iMessage,WPARAM wParam,LPARAM lParam); + long FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart); + long FindText(int iMessage, unsigned long wParam, long lParam); int LinesTotal(); + void ChangeCase(Range r, bool makeUpperCase); + void SetWordChars(unsigned char *chars); void SetStylingBits(int bits); void StartStyling(int position, char mask); void SetStyleFor(int length, char style); void SetStyles(int length, char *styles); int GetEndStyled() { return endStyled; } + bool EnsureStyledTo(int pos); int SetLineState(int line, int state) { return cb.SetLineState(line, state); } int GetLineState(int line) { return cb.GetLineState(line); } @@ -173,12 +191,16 @@ public: private: bool IsDBCS(int pos); bool IsWordChar(unsigned char ch); + bool IsWordStartAt(int pos); + bool IsWordEndAt(int pos); bool IsWordAt(int start, int end); void ModifiedAt(int pos); - + void NotifyModifyAttempt(); void NotifySavePoint(bool atSavePoint); void NotifyModified(DocModification mh); + + int IndentSize() { return indentInChars ? indentInChars : tabInChars; } }; // To optimise processing of document modifications by DocWatchers, a hint is passed indicating the @@ -205,6 +227,16 @@ public: line(0), foldLevelNow(0), foldLevelPrev(0) {} + + DocModification(int modificationType_, const Action &act, int linesAdded_=0) : + modificationType(modificationType_), + position(act.position / 2), + length(act.lenData), + linesAdded(linesAdded_), + text(act.data), + line(0), + foldLevelNow(0), + foldLevelPrev(0) {} }; // A class that wants to receive notifications from a Document must be derived from DocWatcher @@ -217,6 +249,7 @@ public: virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; virtual void NotifyDeleted(Document *doc, void *userData) = 0; + virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; }; #endif diff --git a/contrib/src/stc/scintilla/src/DocumentAccessor.cxx b/contrib/src/stc/scintilla/src/DocumentAccessor.cxx new file mode 100644 index 0000000000..6828e37c3f --- /dev/null +++ b/contrib/src/stc/scintilla/src/DocumentAccessor.cxx @@ -0,0 +1,176 @@ +// SciTE - Scintilla based Text Editor +// Accessor.cxx - rapid easy access to contents of a Scintilla +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "SVector.h" +#include "Accessor.h" +#include "DocumentAccessor.h" +#include "CellBuffer.h" +#include "Scintilla.h" +#include "Document.h" + +DocumentAccessor::~DocumentAccessor() { +} + +#if PLAT_WIN +bool DocumentAccessor::InternalIsLeadByte(char ch) { + if (SC_CP_UTF8 == codePage) + // For lexing, all characters >= 0x80 are treated the + // same so none is considered a lead byte. + return false; + else + return IsDBCSLeadByteEx(codePage, ch); +} +#else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool DocumentAccessor::InternalIsLeadByte(char) { + return false; +} +#endif + +void DocumentAccessor::Fill(int position) { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + startPos = position - slopSize; + if (startPos + bufferSize > lenDoc) + startPos = lenDoc - bufferSize; + if (startPos < 0) + startPos = 0; + endPos = startPos + bufferSize; + if (endPos > lenDoc) + endPos = lenDoc; + + pdoc->GetCharRange(buf, startPos, endPos-startPos); + buf[endPos-startPos] = '\0'; +} + +char DocumentAccessor::StyleAt(int position) { + return pdoc->StyleAt(position); +} + +int DocumentAccessor::GetLine(int position) { + return pdoc->LineFromPosition(position); +} + +int DocumentAccessor::LineStart(int line) { + return pdoc->LineStart(line); +} + +int DocumentAccessor::LevelAt(int line) { + return pdoc->GetLevel(line); +} + +int DocumentAccessor::Length() { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + return lenDoc; +} + +int DocumentAccessor::GetLineState(int line) { + return pdoc->GetLineState(line); +} + +int DocumentAccessor::SetLineState(int line, int state) { + return pdoc->SetLineState(line, state); +} + +void DocumentAccessor::StartAt(unsigned int start, char chMask) { + pdoc->StartStyling(start, chMask); +} + +void DocumentAccessor::StartSegment(unsigned int pos) { + startSeg = pos; +} + +void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) { + // Only perform styling if non empty range + if (pos != startSeg - 1) { + if (pos < startSeg) { + Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos); + } + + if (validLen + (pos - startSeg + 1) >= bufferSize) + Flush(); + if (validLen + (pos - startSeg + 1) >= bufferSize) { + // Too big for buffer so send directly + pdoc->SetStyleFor(pos - startSeg + 1, static_cast(chAttr)); + } else { + if (chAttr != chWhile) + chFlags = 0; + chAttr |= chFlags; + for (unsigned int i = startSeg; i <= pos; i++) { + styleBuf[validLen++] = static_cast(chAttr); + } + } + } + startSeg = pos+1; +} + +void DocumentAccessor::SetLevel(int line, int level) { + pdoc->SetLevel(line, level); +} + +void DocumentAccessor::Flush() { + startPos = extremePosition; + lenDoc = -1; + if (validLen > 0) { + pdoc->SetStyles(validLen, styleBuf); + validLen = 0; + } +} + +int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { + int end = Length(); + int spaceFlags = 0; + + // Determines the indentation level of the current line and also checks for consistent + // indentation compared to the previous line. + // Indentation is judged consistent when the indentation whitespace of each line lines + // the same or the indentation of one line is a prefix of the other. + + int pos = LineStart(line); + char ch = (*this)[pos]; + int indent = 0; + bool inPrevPrefix = line > 0; + int posPrev = inPrevPrefix ? LineStart(line-1) : 0; + while ((ch == ' ' || ch == '\t') && (pos < end)) { + if (inPrevPrefix) { + char chPrev = (*this)[posPrev++]; + if (chPrev == ' ' || chPrev == '\t') { + if (chPrev != ch) + spaceFlags |= wsInconsistent; + } else { + inPrevPrefix = false; + } + } + if (ch == ' ') { + spaceFlags |= wsSpace; + indent++; + } else { // Tab + spaceFlags |= wsTab; + if (spaceFlags & wsSpace) + spaceFlags |= wsSpaceTab; + indent = (indent / 8 + 1) * 8; + } + ch = (*this)[++pos]; + } + + *flags = spaceFlags; + indent += SC_FOLDLEVELBASE; + // if completely empty line or the start of a comment... + if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) + return indent | SC_FOLDLEVELWHITEFLAG; + else + return indent; +} + diff --git a/contrib/src/stc/scintilla/src/DocumentAccessor.h b/contrib/src/stc/scintilla/src/DocumentAccessor.h new file mode 100644 index 0000000000..ccc05fee9f --- /dev/null +++ b/contrib/src/stc/scintilla/src/DocumentAccessor.h @@ -0,0 +1,49 @@ +// DocumentAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +class Document; + +class DocumentAccessor : public Accessor { + // Private so DocumentAccessor objects can not be copied + DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {} + DocumentAccessor &operator=(const DocumentAccessor &) { return *this; } +protected: + Document *pdoc; + PropSet &props; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + + bool InternalIsLeadByte(char ch); + void Fill(int position); +public: + DocumentAccessor(Document *pdoc_, PropSet &props_) : + Accessor(), pdoc(pdoc_), props(props_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { + } + ~DocumentAccessor(); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); +}; diff --git a/contrib/src/stc/scintilla/src/Editor.cxx b/contrib/src/stc/scintilla/src/Editor.cxx index 6508c95b1f..e1cc7468b9 100644 --- a/contrib/src/stc/scintilla/src/Editor.cxx +++ b/contrib/src/stc/scintilla/src/Editor.cxx @@ -11,6 +11,11 @@ #include "Platform.h" #include "Scintilla.h" + +#if PLAT_WX || PLAT_GTK +#include "WinDefs.h" +#endif + #include "ContractionState.h" #include "SVector.h" #include "CellBuffer.h" @@ -33,6 +38,9 @@ Editor::Editor() { stylesValid = false; + printMagnification = 0; + printColourMode = SC_PRINT_NORMAL; + hideSelection = false; inOverstrike = false; @@ -58,43 +66,47 @@ Editor::Editor() { selType = selStream; xStartSelect = 0; xEndSelect = 0; + primarySelection = true; caretPolicy = CARET_SLOP; caretSlop = 0; searchAnchor = 0; - + ucWheelScrollLines = 0; cWheelDelta = 0; //wheel delta from roll xOffset = 0; xCaretMargin = 50; - + horizontalScrollBarVisible = true; + currentPos = 0; anchor = 0; topLine = 0; posTopLine = 0; - + needUpdateUI = true; - braces[0]=invalidPosition; - braces[1]=invalidPosition; + braces[0] = invalidPosition; + braces[1] = invalidPosition; bracesMatchStyle = STYLE_BRACEBAD; - - edgeState = EDGE_NONE; + highlightGuideColumn = 0; + theEdge = 0; - + paintState = notPainting; - + modEventMask = SC_MODEVENTMASKALL; + displayPopupMenu = true; + pdoc = new Document(); pdoc ->AddRef(); pdoc->AddWatcher(this, 0); #ifdef MACRO_SUPPORT recordingMacro = 0; -#endif +#endif foldFlags = 0; } @@ -110,12 +122,14 @@ Editor::~Editor() { } void Editor::Finalise() { + CancelModes(); } void Editor::DropGraphics() { pixmapLine.Release(); pixmapSelMargin.Release(); pixmapSelPattern.Release(); + pixmapIndentGuide.Release(); } void Editor::InvalidateStyleData() { @@ -182,12 +196,12 @@ int Editor::MaxScrollPos() { return retVal; } -bool IsControlCharacter(char ch) { +static inline bool IsControlCharacter(signed char ch) { // iscntrl returns true for lots of chars > 127 which are displayable return ch >= 0 && ch < ' '; } -const char *ControlCharacterString(char ch) { +const char *ControlCharacterString(unsigned char ch) { const char *reps[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", @@ -208,15 +222,16 @@ Point Editor::LocationFromPosition(unsigned int pos) { //Platform::DebugPrintf("line=%d\n", line); Surface surface; surface.Init(); + surface.SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); Point pt; pt.y = (lineVisible - topLine) * vs.lineHeight; // + half a lineheight? unsigned int posLineStart = pdoc->LineStart(line); + LineLayout ll; + LayoutLine(line, &surface, vs, ll); if ((pos - posLineStart) > LineLayout::maxLineLength) { // very long line so put x at arbitrary large position - pt.x = 30000 + vs.fixedColumnWidth - xOffset; + pt.x = ll.positions[LineLayout::maxLineLength] + vs.fixedColumnWidth - xOffset; } else { - LineLayout ll; - LayoutLine(line, &surface, vs, ll); pt.x = ll.positions[pos - posLineStart] + vs.fixedColumnWidth - xOffset; } return pt; @@ -226,7 +241,7 @@ int Editor::XFromPosition(unsigned int pos) { Point pt = LocationFromPosition(pos); return pt.x - vs.fixedColumnWidth + xOffset; } - + int Editor::LineFromLocation(Point pt) { return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine); } @@ -247,16 +262,17 @@ int Editor::PositionFromLocation(Point pt) { return 0; if (line >= pdoc->LinesTotal()) return pdoc->Length(); -//Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); + //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); Surface surface; surface.Init(); + surface.SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); unsigned int posLineStart = pdoc->LineStart(line); LineLayout ll; LayoutLine(line, &surface, vs, ll); for (int i = 0; i < ll.numCharsInLine; i++) { - if (pt.x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || - ll.chars[i] == '\r' || ll.chars[i] == '\n') { + if (pt.x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || + ll.chars[i] == '\r' || ll.chars[i] == '\n') { return i + posLineStart; } } @@ -271,13 +287,14 @@ int Editor::PositionFromLineX(int line, int x) { //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); Surface surface; surface.Init(); + surface.SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); unsigned int posLineStart = pdoc->LineStart(line); LineLayout ll; LayoutLine(line, &surface, vs, ll); for (int i = 0; i < ll.numCharsInLine; i++) { - if (x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || - ll.chars[i] == '\r' || ll.chars[i] == '\n') { + if (x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || + ll.chars[i] == '\r' || ll.chars[i] == '\n') { return i + posLineStart; } } @@ -356,7 +373,7 @@ int Editor::SelectionStart(int line) { //return PositionFromLineX(line, minX + vs.fixedColumnWidth - xOffset); return PositionFromLineX(line, minX); } - } + } } int Editor::SelectionEnd(int line) { @@ -427,10 +444,26 @@ void Editor::SetEmptySelection(int currentPos_) { SetSelection(currentPos_, currentPos_); } +int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { + // Asks document to find a good position and then moves out of any invisible positions + pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd); + int mask = pdoc->stylingBitsMask; + if (moveDir > 0) { + while ((pos < pdoc->Length()) && + (!vs.styles[pdoc->StyleAt(pos - 1) & mask].visible)) + pos++; + } else { + while ((pos > 0) && + (!vs.styles[pdoc->StyleAt(pos - 1) & mask].visible)) + pos--; + } + return pos; +} + int Editor::MovePositionTo(int newPos, bool extend) { int delta = newPos - currentPos; newPos = pdoc->ClampPositionIntoDocument(newPos); - newPos = pdoc->MovePositionOutsideChar(newPos, delta); + newPos = MovePositionOutsideChar(newPos, delta); if (extend) { SetSelection(newPos); } else { @@ -443,7 +476,7 @@ int Editor::MovePositionTo(int newPos, bool extend) { int Editor::MovePositionSoVisible(int pos, int moveDir) { pos = pdoc->ClampPositionIntoDocument(pos); - pos = pdoc->MovePositionOutsideChar(pos, moveDir); + pos = MovePositionOutsideChar(pos, moveDir); int lineDoc = pdoc->LineFromPosition(pos); if (cs.GetVisible(lineDoc)) { return pos; @@ -483,7 +516,7 @@ void Editor::ScrollTo(int line) { } } -void Editor::ScrollText(int linesToMove) { +void Editor::ScrollText(int /* linesToMove */) { //Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove); Redraw(); } @@ -497,6 +530,19 @@ void Editor::HorizontalScrollTo(int xPos) { Redraw(); } +void Editor::MoveCaretInsideView() { + PRectangle rcClient = GetTextRectangle(); + Point pt = LocationFromPosition(currentPos); + if (pt.y < rcClient.top) { + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top))); + } else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) { + int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight; + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed))); + } +} + void Editor::EnsureCaretVisible(bool useMargin) { //Platform::DebugPrintf("EnsureCaretVisible %d\n", xOffset); PRectangle rcClient = GetTextRectangle(); @@ -513,11 +559,11 @@ void Editor::EnsureCaretVisible(bool useMargin) { int xMargin = Platform::Clamp(xCaretMargin, 2, Platform::Maximum(rcClient.Width() - 10, 4) / 2); if (!useMargin) xMargin = 2; - + // Ensure certain amount of text visible on both sides of caretSo move if caret just on edge rcClient.left = rcClient.left + xMargin; rcClient.right = rcClient.right - xMargin; - + if (!rcClient.Contains(pt) || !rcClient.Contains(ptBottomCaret) || (caretPolicy & CARET_STRICT)) { //Platform::DebugPrintf("EnsureCaretVisible move, (%d,%d) (%d,%d)\n", pt.x, pt.y, rcClient.left, rcClient.right); // It should be possible to scroll the window to show the caret, @@ -527,8 +573,8 @@ void Editor::EnsureCaretVisible(bool useMargin) { SetTopLine(Platform::Clamp(lineCaret - caretSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); - } else if ((lineCaret > topLine + LinesOnScreen() - 1) || - ((caretPolicy & CARET_STRICT) && (lineCaret > topLine + LinesOnScreen() - 1 - caretSlop))) { + } else if ((lineCaret > topLine + LinesOnScreen() - 1) || + ((caretPolicy & CARET_STRICT) && (lineCaret > topLine + LinesOnScreen() - 1 - caretSlop))) { SetTopLine(Platform::Clamp(lineCaret - LinesOnScreen() + 1 + caretSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); @@ -565,7 +611,7 @@ void Editor::ShowCaretAtCurrentPosition() { if (!wMain.HasFocus()) { caret.active = false; caret.on = false; - return; + return ; } caret.active = true; caret.on = true; @@ -586,13 +632,13 @@ void Editor::InvalidateCaret() { void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (vs.fixedColumnWidth == 0) - return; + return ; PRectangle rcMargin = GetClientRectangle(); rcMargin.right = vs.fixedColumnWidth; if (!rc.Intersects(rcMargin)) - return; + return ; Surface *surface; if (bufferedDraw) { @@ -604,9 +650,9 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { PRectangle rcSelMargin = rcMargin; rcSelMargin.right = rcMargin.left; - for (int margin=0; margin < vs.margins; margin++) { + for (int margin = 0; margin < vs.margins; margin++) { if (vs.ms[margin].width > 0) { - + rcSelMargin.left = rcSelMargin.right; rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; @@ -620,18 +666,18 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { */ if (vs.ms[margin].mask & SC_MASK_FOLDERS) // Required because of special way brush is created for selection margin - surface->FillRectangle(rcSelMargin, pixmapSelPattern); + surface->FillRectangle(rcSelMargin, pixmapSelPattern); else - surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); + surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); } else { surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); } - + int visibleLine = topLine; int line = cs.DocFromDisplay(visibleLine); int yposScreen = 0; - while (line < pdoc->LinesTotal() && yposScreen < rcMargin.bottom) { + while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { int marks = pdoc->GetMark(line); if (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) { if (cs.GetExpanded(line)) { @@ -648,22 +694,21 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { char number[100]; number[0] = '\0'; sprintf(number, "%d", line + 1); - if (foldFlags & 8) + if (foldFlags & 64) sprintf(number, "%X", pdoc->GetLevel(line)); - int xpos = 0; - PRectangle rcNumber=rcMarker; + PRectangle rcNumber = rcMarker; // Right justify int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, strlen(number)); - xpos = rcNumber.right - width - 3; + int xpos = rcNumber.right - width - 3; rcNumber.left = xpos; if ((visibleLine < cs.LinesDisplayed()) && cs.GetVisible(line)) { surface->DrawText(rcNumber, vs.styles[STYLE_LINENUMBER].font, rcNumber.top + vs.maxAscent, number, strlen(number), - vs.styles[STYLE_LINENUMBER].fore.allocated, - vs.styles[STYLE_LINENUMBER].back.allocated); + vs.styles[STYLE_LINENUMBER].fore.allocated, + vs.styles[STYLE_LINENUMBER].back.allocated); } } - + if (marks) { for (int markBit = 0; (markBit < 32) && marks; markBit++) { if (marks & 1) { @@ -674,7 +719,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { marks >>= 1; } } - + visibleLine++; line = cs.DocFromDisplay(visibleLine); yposScreen += vs.lineHeight; @@ -684,8 +729,8 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { PRectangle rcBlankMargin = rcMargin; rcBlankMargin.left = rcSelMargin.right; - surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated); - + surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated); + if (bufferedDraw) { surfWindow->Copy(rcMargin, Point(), pixmapSelMargin); } @@ -711,44 +756,60 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; char styleByte = 0; int styleMask = pdoc->stylingBitsMask; - for (int charInDoc = posLineStart; - charInDoc < posLineEnd && numCharsInLine < LineLayout::maxLineLength - 1; - charInDoc++) { + ll.xHighlightGuide = 0; + if (posLineEnd > (posLineStart + LineLayout::maxLineLength)) { + posLineEnd = posLineStart + LineLayout::maxLineLength; + } + for (int charInDoc = posLineStart; charInDoc < posLineEnd; charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); styleByte = pdoc->StyleAt(charInDoc); if (vstyle.viewEOL || ((chDoc != '\r') && (chDoc != '\n'))) { ll.chars[numCharsInLine] = chDoc; - ll.styles[numCharsInLine] = styleByte & styleMask; - ll.indicators[numCharsInLine] = styleByte & ~styleMask; + ll.styles[numCharsInLine] = static_cast(styleByte & styleMask); + ll.indicators[numCharsInLine] = static_cast(styleByte & ~styleMask); numCharsInLine++; } } - ll.chars[numCharsInLine] = 0; + // Extra element at the end of the line to hold end x position and act as + ll.chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character ll.styles[numCharsInLine] = styleByte; // For eolFilled ll.indicators[numCharsInLine] = 0; - // Layout the line, determining the position of each character + // Layout the line, determining the position of each character, + // with an extra element at the end for the end of the line. int startseg = 0; int startsegx = 0; ll.positions[0] = 0; unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars; - + for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { if ((ll.styles[charInLine] != ll.styles[charInLine + 1]) || IsControlCharacter(ll.chars[charInLine]) || IsControlCharacter(ll.chars[charInLine + 1])) { ll.positions[startseg] = 0; - if (IsControlCharacter(ll.chars[charInLine])) { - if (ll.chars[charInLine] == '\t') { - ll.positions[charInLine + 1] = ((((startsegx + 2) / - tabWidth) + 1) * tabWidth) - startsegx; + if (vstyle.styles[ll.styles[charInLine]].visible) { + if (IsControlCharacter(ll.chars[charInLine])) { + if (ll.chars[charInLine] == '\t') { + ll.positions[charInLine + 1] = ((((startsegx + 2) / + tabWidth) + 1) * tabWidth) - startsegx; + } else { + const char *ctrlChar = ControlCharacterString(ll.chars[charInLine]); + // +3 For a blank on front and rounded edge each side: + ll.positions[charInLine + 1] = surface->WidthText(ctrlCharsFont, ctrlChar, strlen(ctrlChar)) + 3; + } } else { - const char *ctrlChar = ControlCharacterString(ll.chars[charInLine]); - // +3 For a blank on front and rounded edge each side: - ll.positions[charInLine + 1] = surface->WidthText(ctrlCharsFont, ctrlChar, strlen(ctrlChar)) + 3; + int lenSeg = charInLine - startseg + 1; + if ((lenSeg == 1) && (' ' == ll.chars[startseg])) { + // Over half the segments are single characters and of these about half are space characters. + ll.positions[charInLine + 1] = vstyle.styles[ll.styles[charInLine]].spaceWidth; + } else { + surface->MeasureWidths(vstyle.styles[ll.styles[charInLine]].font, ll.chars + startseg, + charInLine - startseg + 1, ll.positions + startseg + 1); + } + } + } else { // invisible + for (int posToZero = startseg; posToZero <= (charInLine + 1); posToZero++) { + ll.positions[posToZero] = 0; } - } else { - surface->MeasureWidths(vstyle.styles[ll.styles[charInLine]].font, ll.chars + startseg, - charInLine - startseg + 1, ll.positions + startseg + 1); } for (int posToIncrease = startseg; posToIncrease <= (charInLine + 1); posToIncrease++) { ll.positions[posToIncrease] += startsegx; @@ -760,10 +821,11 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou ll.numCharsInLine = numCharsInLine; } -void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, PRectangle rcLine, LineLayout &ll) { - +void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, + PRectangle rcLine, LineLayout &ll) { + PRectangle rcSegment = rcLine; - + // Using one font for all control characters so it can be controlled independently to ensure // the box goes around the characters tightly. Seems to be no way to work out what height // is taken by an individual character - internal leading gives varying results. @@ -784,12 +846,14 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, marks = pdoc->GetMark(line) & vsDraw.maskInLine; } + bool inIndentation = true; + int indentWidth = pdoc->indentInChars * vsDraw.spaceWidth; + if (indentWidth == 0) + indentWidth = pdoc->tabInChars * vsDraw.spaceWidth; + int posLineStart = pdoc->LineStart(line); int posLineEnd = pdoc->LineStart(line + 1); - int selStart = SelectionStart(line); - int selEnd = SelectionEnd(line); - int styleMask = pdoc->stylingBitsMask; int startseg = 0; for (int i = 0; i < ll.numCharsInLine; i++) { @@ -798,37 +862,57 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, // If there is the end of a style run for any reason if ((ll.styles[i] != ll.styles[i + 1]) || IsControlCharacter(ll.chars[i]) || IsControlCharacter(ll.chars[i + 1]) || - ((selStart != selEnd) && ((iDoc + 1 == selStart) || (iDoc + 1 == selEnd))) || - (i == (theEdge-1))) { + ((ll.selStart != ll.selEnd) && ((iDoc + 1 == ll.selStart) || (iDoc + 1 == ll.selEnd))) || + (i == (ll.edgeColumn - 1))) { int styleMain = ll.styles[i]; Colour textBack = vsDraw.styles[styleMain].back.allocated; Colour textFore = vsDraw.styles[styleMain].fore.allocated; Font &textFont = vsDraw.styles[styleMain].font; - bool inSelection = (iDoc >= selStart) && (iDoc < selEnd) && (selStart != selEnd); - if (inSelection && !hideSelection) { - if (vsDraw.selbackset) - textBack = vsDraw.selbackground.allocated; + bool inSelection = (iDoc >= ll.selStart) && (iDoc < ll.selEnd) && (ll.selStart != ll.selEnd); + if (inSelection) { + if (vsDraw.selbackset) { + if (primarySelection) + textBack = vsDraw.selbackground.allocated; + else + textBack = vsDraw.selbackground2.allocated; + } if (vsDraw.selforeset) textFore = vsDraw.selforeground.allocated; } else { if (marks) textBack = markBack; - if ((edgeState == EDGE_BACKGROUND) && (i >= theEdge) && (ll.chars[i] != '\n') && (ll.chars[i] != '\r')) - textBack = vs.edgecolour.allocated; + if ((vsDraw.edgeState == EDGE_BACKGROUND) && (i >= ll.edgeColumn) && (ll.chars[i] != '\n') && (ll.chars[i] != '\r')) + textBack = vsDraw.edgecolour.allocated; } // Manage tab display if (ll.chars[i] == '\t') { rcSegment.left = ll.positions[i] + xStart; rcSegment.right = ll.positions[i + 1] + xStart; surface->FillRectangle(rcSegment, textBack); - if (vsDraw.viewWhitespace) { + if ((vsDraw.viewWhitespace != wsInvisible) || ((inIndentation && vsDraw.viewIndentationGuides))) { surface->PenColour(textFore); - PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, - rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); - DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); } - // Manage control character display - } else if (IsControlCharacter(ll.chars[i])) { + if (inIndentation && vsDraw.viewIndentationGuides) { + for (int xIG = ll.positions[i] / indentWidth * indentWidth; xIG < ll.positions[i + 1]; xIG += indentWidth) { + if (xIG >= ll.positions[i] && xIG > 0) { + Point from(0, ((lineVisible & 1) && (vsDraw.lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea(xIG + xStart + 1, rcSegment.top, xIG + xStart + 2, rcSegment.bottom); + surface->Copy(rcCopyArea, from, (ll.xHighlightGuide == xIG) ? + pixmapIndentGuideHighlight : pixmapIndentGuide); + } + } + } + if (vsDraw.viewWhitespace != wsInvisible) { + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, + rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); + DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); + } + } + // Manage control character display + } + else if (IsControlCharacter(ll.chars[i])) { + inIndentation = false; const char *ctrlChar = ControlCharacterString(ll.chars[i]); rcSegment.left = ll.positions[i] + xStart; rcSegment.right = ll.positions[i + 1] + xStart; @@ -847,30 +931,52 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, rcChar.left++; rcChar.right--; surface->DrawTextClipped(rcChar, ctrlCharsFont, - rcSegment.top + vsDraw.maxAscent, ctrlChar, strlen(ctrlChar), - textBack, textFore); - // Manage normal display + rcSegment.top + vsDraw.maxAscent, ctrlChar, strlen(ctrlChar), + textBack, textFore); + // Manage normal display } else { rcSegment.left = ll.positions[startseg] + xStart; rcSegment.right = ll.positions[i + 1] + xStart; - // Only try do draw if really visible - enhances performance by not calling environment to + // Only try to draw if really visible - enhances performance by not calling environment to // draw strings that are completely past the right side of the window. if (rcSegment.left <= rcLine.right) { surface->DrawText(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, ll.chars + startseg, i - startseg + 1, textFore, textBack); - if (vsDraw.viewWhitespace) { + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides)) { for (int cpos = 0; cpos <= i - startseg; cpos++) { if (ll.chars[cpos + startseg] == ' ') { - int xmid = (ll.positions[cpos + startseg] + ll.positions[cpos + startseg + 1]) / 2; - PRectangle rcDot(xmid + xStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); - rcDot.right = rcDot.left + 1; - rcDot.bottom = rcDot.top + 1; - surface->FillRectangle(rcDot, textFore); + if (vsDraw.viewWhitespace != wsInvisible) { + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + int xmid = (ll.positions[cpos + startseg] + ll.positions[cpos + startseg + 1]) / 2; + PRectangle rcDot(xmid + xStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); + rcDot.right = rcDot.left + 1; + rcDot.bottom = rcDot.top + 1; + surface->FillRectangle(rcDot, textFore); + } + } + if (inIndentation && vsDraw.viewIndentationGuides) { + int startSpace = ll.positions[cpos + startseg]; + if (startSpace > 0 && (startSpace % indentWidth == 0)) { + Point from(0, ((lineVisible & 1) && (vsDraw.lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea(startSpace + xStart + 1, rcSegment.top, startSpace + xStart + 2, rcSegment.bottom); + surface->Copy(rcCopyArea, from, (ll.xHighlightGuide == ll.positions[cpos + startseg]) ? + pixmapIndentGuideHighlight : pixmapIndentGuide); + } + } + } else { + inIndentation = false; } } } } + if (vsDraw.styles[styleMain].underline) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + surface->FillRectangle(rcUL, textFore); + } } startseg = i + 1; } @@ -881,10 +987,10 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, for (int indica = 0; indica <= INDIC_MAX; indica++) indStart[indica] = 0; - for (int indicPos = 0; indicPos <= ll.numCharsInLine; indicPos++) { + for (int indicPos = 0; indicPos < ll.numCharsInLine; indicPos++) { if (ll.indicators[indicPos] != ll.indicators[indicPos + 1]) { int mask = 1 << pdoc->stylingBits; - for (int indicnum = 0; mask <= 0x100; indicnum++) { + for (int indicnum = 0; mask < 0x100; indicnum++) { if ((ll.indicators[indicPos + 1] & mask) && !(ll.indicators[indicPos] & mask)) { indStart[indicnum] = ll.positions[indicPos + 1]; } @@ -906,9 +1012,12 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, int xEol = ll.positions[ll.numCharsInLine]; rcSegment.left = xEol + xStart; rcSegment.right = xEol + vsDraw.aveCharWidth + xStart; - bool eolInSelection = (posLineEnd > selStart) && (posLineEnd <= selEnd) && (selStart != selEnd); - if (eolInSelection && !hideSelection && vsDraw.selbackset && (line < pdoc->LinesTotal()-1)) { - surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); + bool eolInSelection = (posLineEnd > ll.selStart) && (posLineEnd <= ll.selEnd) && (ll.selStart != ll.selEnd); + if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1)) { + if (primarySelection) + surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); + else + surface->FillRectangle(rcSegment, vsDraw.selbackground2.allocated); } else if (marks) { surface->FillRectangle(rcSegment, markBack); } else { @@ -924,12 +1033,12 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, } else { surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); } - - if (edgeState == EDGE_LINE) { - int edgeX = theEdge * vsDraw.spaceWidth; + + if (vsDraw.edgeState == EDGE_LINE) { + int edgeX = ll.edgeColumn * vsDraw.spaceWidth; rcSegment.left = edgeX + xStart; rcSegment.right = rcSegment.left + 1; - surface->FillRectangle(rcSegment, vs.edgecolour.allocated); + surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated); } } @@ -960,6 +1069,22 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { pixmapSelPattern.FillRectangle(rcPattern, vs.selbarlight.allocated); } } + if (!pixmapIndentGuide.Initialised()) { + // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line + pixmapIndentGuide.InitPixMap(1, vs.lineHeight + 1, surfaceWindow); + pixmapIndentGuideHighlight.InitPixMap(1, vs.lineHeight + 1, surfaceWindow); + PRectangle rcIG(0, 0, 1, vs.lineHeight); + pixmapIndentGuide.FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back.allocated); + pixmapIndentGuide.PenColour(vs.styles[STYLE_INDENTGUIDE].fore.allocated); + pixmapIndentGuideHighlight.FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back.allocated); + pixmapIndentGuideHighlight.PenColour(vs.styles[STYLE_BRACELIGHT].fore.allocated); + for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) { + pixmapIndentGuide.MoveTo(0, stripe); + pixmapIndentGuide.LineTo(2, stripe); + pixmapIndentGuideHighlight.MoveTo(0, stripe); + pixmapIndentGuideHighlight.LineTo(2, stripe); + } + } if (bufferedDraw) { if (!pixmapLine.Initialised()) { @@ -979,7 +1104,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { int screenLinePaintFirst = rcArea.top / vs.lineHeight; // The area to be painted plus one extra line is styled. // The extra line is to determine when a style change, such as statrting a comment flows on to other lines. - int lineStyleLast = topLine + (rcArea.bottom-1) / vs.lineHeight + 1; + int lineStyleLast = topLine + (rcArea.bottom - 1) / vs.lineHeight + 1; //Platform::DebugPrintf("Paint lines = %d .. %d\n", topLine + screenLinePaintFirst, lineStyleLast); int endPosPaint = pdoc->Length(); if (lineStyleLast < cs.LinesDisplayed()) @@ -991,39 +1116,37 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ypos += screenLinePaintFirst * vs.lineHeight; int yposScreen = screenLinePaintFirst * vs.lineHeight; - if (endPosPaint > pdoc->GetEndStyled()) { - // Notify container to do some more styling - NotifyStyleNeeded(endPosPaint); - } + // Ensure we are styled as far as we are painting. + pdoc->EnsureStyledTo(endPosPaint); + if (needUpdateUI) { NotifyUpdateUI(); needUpdateUI = false; } - + PaintSelMargin(surfaceWindow, rcArea); PRectangle rcRightMargin = rcClient; rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; if (rcArea.Intersects(rcRightMargin)) { - surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated); + surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated); } if (paintState == paintAbandoned) { - // Either NotifyStyleNeeded or NotifyUpdateUI noticed that painting is needed + // Either styling or NotifyUpdateUI noticed that painting is needed // outside the current painting rectangle //Platform::DebugPrintf("Abandoning paint\n"); - return; + return ; } //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); - Surface *surface = 0; if (rcArea.right > vs.fixedColumnWidth) { + Surface *surface = surfaceWindow; if (bufferedDraw) { surface = &pixmapLine; - } else { - surface = surfaceWindow; } + surface->SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); int visibleLine = topLine + screenLinePaintFirst; int line = cs.DocFromDisplay(visibleLine); @@ -1040,7 +1163,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { rcTextArea.right -= vs.rightMarginWidth; surfaceWindow->SetClip(rcTextArea); //GTimer *tim=g_timer_new(); - while (visibleLine <= cs.LinesDisplayed() && yposScreen < rcArea.bottom) { + while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) { //g_timer_start(tim); //Platform::DebugPrintf("Painting line %d\n", line); @@ -1056,34 +1179,64 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // and determine the x position at which each character starts. LineLayout ll; LayoutLine(line, surface, vs, ll); - + // Highlight the current braces if any - if ((braces[0] >= posLineStart) && (braces[0] < posLineEnd)) - ll.styles[braces[0] - posLineStart] = bracesMatchStyle; - if ((braces[1] >= posLineStart) && (braces[1] < posLineEnd)) - ll.styles[braces[1] - posLineStart] = bracesMatchStyle; - + if ((braces[0] >= posLineStart) && (braces[0] < posLineEnd)) { + int braceOffset = braces[0] - posLineStart; + if (braceOffset < ll.numCharsInLine) + ll.styles[braceOffset] = static_cast(bracesMatchStyle); + } + if ((braces[1] >= posLineStart) && (braces[1] < posLineEnd)) { + int braceOffset = braces[1] - posLineStart; + if (braceOffset < ll.numCharsInLine) + ll.styles[braceOffset] = static_cast(bracesMatchStyle); + } + if ((braces[0] >= posLineStart && braces[1] <= posLineEnd) || + (braces[1] >= posLineStart && braces[0] <= posLineEnd)) { + ll.xHighlightGuide = highlightGuideColumn * vs.spaceWidth; + } + + ll.selStart = SelectionStart(line); + ll.selEnd = SelectionEnd(line); + if (hideSelection) { + ll.selStart = -1; + ll.selEnd = -1; + } + // Need to fix this up so takes account of Unicode and DBCS + ll.edgeColumn = theEdge; + // Draw the line if (cs.GetVisible(line)) - DrawLine(surface, vs, line, xStart, rcLine, ll); + DrawLine(surface, vs, line, visibleLine, xStart, rcLine, ll); - if (foldFlags & 2) { + bool expanded = cs.GetExpanded(line); + if ( (expanded && (foldFlags & 2)) || (!expanded && (foldFlags & 4)) ) { if (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) { PRectangle rcFoldLine = rcLine; rcFoldLine.bottom = rcFoldLine.top + 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } } - + if ( (expanded && (foldFlags & 8)) || (!expanded && (foldFlags & 16)) ) { + if (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + // Draw the Caret if (line == lineCaret) { - int xposCaret = ll.positions[posCaret - posLineStart] + xStart; - int widthOverstrikeCaret = - ll.positions[posCaret - posLineStart + 1] - ll.positions[posCaret - posLineStart]; - if (posCaret == pdoc->Length()) // At end of document + int offset = Platform::Minimum(posCaret - posLineStart, LineLayout::maxLineLength); + int xposCaret = ll.positions[offset] + xStart; + int widthOverstrikeCaret; + if (posCaret == pdoc->Length()) { // At end of document widthOverstrikeCaret = vs.aveCharWidth; - if ((posCaret - posLineStart) >= ll.numCharsInLine) // At end of line + } else if ((posCaret - posLineStart) >= ll.numCharsInLine) { // At end of line widthOverstrikeCaret = vs.aveCharWidth; + } else { + widthOverstrikeCaret = ll.positions[offset + 1] - ll.positions[offset]; + } if (widthOverstrikeCaret < 3) // Make sure its visible widthOverstrikeCaret = 3; if (((caret.active && caret.on) || (posDrag >= 0)) && xposCaret >= 0) { @@ -1104,12 +1257,12 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { surface->FillRectangle(rcCaret, vs.caretcolour.allocated); } } - + if (cs.GetVisible(line)) { if (bufferedDraw) { Point from(vs.fixedColumnWidth, 0); PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, - rcClient.right, yposScreen + vs.lineHeight); + rcClient.right, yposScreen + vs.lineHeight); surfaceWindow->Copy(rcCopyArea, from, pixmapLine); } } @@ -1126,13 +1279,14 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //Platform::DebugPrintf("Paint [%0d] took %g\n", line, g_timer_elapsed(tim, 0)); } //g_timer_destroy(tim); + PRectangle rcBeyondEOF = rcClient; rcBeyondEOF.left = vs.fixedColumnWidth; rcBeyondEOF.right = rcBeyondEOF.right; rcBeyondEOF.top = (cs.LinesDisplayed() - topLine) * vs.lineHeight; if (rcBeyondEOF.top < rcBeyondEOF.bottom) { surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back.allocated); - if (edgeState == EDGE_LINE) { + if (vs.edgeState == EDGE_LINE) { int edgeX = theEdge * vs.spaceWidth; rcBeyondEOF.left = edgeX + xStart; rcBeyondEOF.right = rcBeyondEOF.left + 1; @@ -1145,24 +1299,40 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // Space (3 space characters) between line numbers and text when printing. #define lineNumberPrintSpace " " +Colour InvertedLight(Colour orig) { + unsigned int r = orig.GetRed(); + unsigned int g = orig.GetGreen(); + unsigned int b = orig.GetBlue(); + unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye + unsigned int il = 0xff - l; + if (l == 0) + return Colour(0xff, 0xff, 0xff); + r = r * il / l; + g = g * il / l; + b = b * il / l; + return Colour(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); +} + // This is mostly copied from the Paint method but with some things omitted // such as the margin markers, line numbers, selection and caret // Should be merged back into a combined Draw method. -long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { +long Editor::FormatRange(bool draw, RangeToFormat *pfr) { if (!pfr) return 0; Surface *surface = new Surface(); surface->Init(pfr->hdc); + surface->SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); Surface *surfaceMeasure = new Surface(); surfaceMeasure->Init(pfr->hdcTarget); - + surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); + ViewStyle vsPrint(vs); - + // Modify the view style for printing as do not normally want any of the transient features to be printed // Printing supports only the line number margin. int lineNumberIndex = -1; - for (int margin=0; margin < ViewStyle::margins; margin++) { + for (int margin = 0; margin < ViewStyle::margins; margin++) { if ((!vsPrint.ms[margin].symbol) && (vsPrint.ms[margin].width > 0)) { lineNumberIndex = margin; } else { @@ -1171,13 +1341,24 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { } vsPrint.showMarkedLines = false; vsPrint.fixedColumnWidth = 0; - vsPrint.zoomLevel = 0; + vsPrint.zoomLevel = printMagnification; + vsPrint.viewIndentationGuides = false; // Don't show the selection when printing vsPrint.selbackset = false; vsPrint.selforeset = false; // White background for the line numbers - vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff,0xff,0xff); - + vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff, 0xff, 0xff); + for (int sty = 0;sty <= STYLE_MAX;sty++) { + if (printColourMode == SC_PRINT_INVERTLIGHT) { + vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired); + vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired); + } else if (printColourMode == SC_PRINT_BLACKONWHITE) { + vsPrint.styles[sty].fore.desired = Colour(0, 0, 0); + vsPrint.styles[sty].back.desired = Colour(0xff, 0xff, 0xff); + } + } + vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff, 0xff, 0xff); + vsPrint.Refresh(*surfaceMeasure); // Ensure colours are set up vsPrint.RefreshColourPalette(palette, true); @@ -1185,8 +1366,8 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { // Determining width must hapen after fonts have been realised in Refresh int lineNumberWidth = 0; if (lineNumberIndex >= 0) { - lineNumberWidth = surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, - "9999" lineNumberPrintSpace, 4 + strlen(lineNumberPrintSpace)); + lineNumberWidth = surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, + "9999" lineNumberPrintSpace, 4 + strlen(lineNumberPrintSpace)); vsPrint.ms[lineNumberIndex].width = lineNumberWidth; } @@ -1204,10 +1385,9 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { if (linePrintLast < pdoc->LinesTotal()) endPosPrint = pdoc->LineStart(linePrintLast + 1); - if (endPosPrint > pdoc->GetEndStyled()) { - // Notify container to do some more styling - NotifyStyleNeeded(endPosPrint); - } + // Ensure we are styled to where we are formatting. + pdoc->EnsureStyledTo(endPosPrint); + int xStart = vsPrint.fixedColumnWidth + pfr->rc.left + lineNumberWidth; int ypos = pfr->rc.top; int line = linePrintStart; @@ -1221,28 +1401,39 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { rcLine.top = ypos; rcLine.right = pfr->rc.right; rcLine.bottom = ypos + vsPrint.lineHeight; - + if (lineNumberWidth) { char number[100]; sprintf(number, "%d" lineNumberPrintSpace, line + 1); PRectangle rcNumber = rcLine; rcNumber.right = rcNumber.left + lineNumberWidth; // Right justify - rcNumber.left += lineNumberWidth - - surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, number, strlen(number)); + rcNumber.left -= + surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, number, strlen(number)); surface->DrawText(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, ypos + vsPrint.maxAscent, number, strlen(number), - vsPrint.styles[STYLE_LINENUMBER].fore.allocated, - vsPrint.styles[STYLE_LINENUMBER].back.allocated); + vsPrint.styles[STYLE_LINENUMBER].fore.allocated, + vsPrint.styles[STYLE_LINENUMBER].back.allocated); } - + + // When printing, the hdc and hdcTarget may be the same, so + // changing the state of surfaceMeasure may change the underlying + // state of surface. Therefore, any cached state is discarded before + // using each surface. + // Copy this line and its styles from the document into local arrays // and determine the x position at which each character starts. + surfaceMeasure->FlushCachedState(); LineLayout ll; LayoutLine(line, surfaceMeasure, vsPrint, ll); - + ll.selStart = -1; + ll.selEnd = -1; + // Need to fix this up so takes account of Unicode and DBCS + ll.edgeColumn = theEdge; + // Draw the line - DrawLine(surface, vsPrint, line, xStart, rcLine, ll); + surface->FlushCachedState(); + DrawLine(surface, vsPrint, line, line, xStart, rcLine, ll); ypos += vsPrint.lineHeight; line++; @@ -1255,6 +1446,10 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { return endPosPrint; } +// Empty method is overridden on GTK+ to show / hide scrollbars +void Editor::ReconfigureScrollBars() {} + + void Editor::SetScrollBarsTo(PRectangle) { RefreshStyleData(); @@ -1274,12 +1469,20 @@ void Editor::SetScrollBarsTo(PRectangle) { //Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage); } + void Editor::SetScrollBars() { PRectangle rsClient = GetClientRectangle(); SetScrollBarsTo(rsClient); } void Editor::AddChar(char ch) { + char s[2]; + s[0] = ch; + s[1] = '\0'; + AddCharUTF(s, 1); +} + +void Editor::AddCharUTF(char *s, unsigned int len) { bool wasSelection = currentPos != anchor; ClearSelection(); if (inOverstrike && !wasSelection) { @@ -1289,11 +1492,13 @@ void Editor::AddChar(char ch) { } } } - pdoc->InsertChar(currentPos, ch); - SetEmptySelection(currentPos + 1); + pdoc->InsertString(currentPos, s, len); + SetEmptySelection(currentPos + len); EnsureCaretVisible(); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); SetLastXChosen(); - NotifyChar(ch); + NotifyChar(s[0]); } void Editor::ClearSelection() { @@ -1302,8 +1507,7 @@ void Editor::ClearSelection() { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int startPos = SelectionStart(); - int line; - for (line=lineStart; line <= lineEnd; line++) { + for (int line = lineEnd; line >= lineStart; line--) { startPos = SelectionStart(line); unsigned int chars = SelectionEnd(line) - startPos; if (0 != chars) { @@ -1334,6 +1538,13 @@ void Editor::ClearAll() { SetVerticalScrollPos(); } +void Editor::ClearDocumentStyle() { + pdoc->StartStyling(0, '\377'); + pdoc->SetStyleFor(pdoc->Length(), 0); + cs.ShowAll(); + pdoc->ClearLevels(); +} + void Editor::Cut() { Copy(); ClearSelection(); @@ -1345,9 +1556,9 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) { int xInsert = XFromPosition(currentPos); int line = pdoc->LineFromPosition(currentPos); bool prevCr = false; - for (int i=0; i= pdoc->LinesTotal()) { if (pdoc->eolMode != SC_EOL_LF) @@ -1358,7 +1569,7 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) { currentPos = PositionFromLineX(line, xInsert); prevCr = ptr[i] == '\r'; } else { - pdoc->InsertString(currentPos, ptr+i, 1); + pdoc->InsertString(currentPos, ptr + i, 1); currentPos++; insertPos = currentPos; prevCr = false; @@ -1383,6 +1594,7 @@ void Editor::SelectAll() { void Editor::Undo() { if (pdoc->CanUndo()) { + InvalidateCaret(); int newPos = pdoc->Undo(); SetEmptySelection(newPos); EnsureCaretVisible(); @@ -1399,6 +1611,8 @@ void Editor::Redo() { void Editor::DelChar() { pdoc->DelChar(currentPos); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); } void Editor::DelCharBack() { @@ -1409,18 +1623,24 @@ void Editor::DelCharBack() { ClearSelection(); SetEmptySelection(currentPos); } + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); } -void Editor::NotifyFocus(bool) { -} +void Editor::NotifyFocus(bool) {} -void Editor::NotifyStyleNeeded(int endStyleNeeded) { + +void Editor::NotifyStyleToNeeded(int endStyleNeeded) { SCNotification scn; scn.nmhdr.code = SCN_STYLENEEDED; scn.position = endStyleNeeded; NotifyParent(scn); } +void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) { + NotifyStyleToNeeded(endStyleNeeded); +} + void Editor::NotifyChar(char ch) { SCNotification scn; scn.nmhdr.code = SCN_CHARADDED; @@ -1431,9 +1651,9 @@ void Editor::NotifyChar(char ch) { char txt[2]; txt[0] = ch; txt[1] = '\0'; - NotifyMacroRecord(EM_REPLACESEL, 0, (LPARAM) txt); + NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast(txt)); } -#endif +#endif } void Editor::NotifySavePoint(bool isSavePoint) { @@ -1467,7 +1687,7 @@ void Editor::NotifyUpdateUI() { bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { int marginClicked = -1; int x = 0; - for (int margin=0; margin < ViewStyle::margins; margin++) { + for (int margin = 0; margin < ViewStyle::margins; margin++) { if ((pt.x > x) && (pt.x < x + vs.ms[margin].width)) marginClicked = margin; x += vs.ms[margin].width; @@ -1500,6 +1720,13 @@ void Editor::NotifyModifyAttempt(Document*, void *) { NotifyModifyAttempt(); } +void Editor::NotifyMove(int position) { + SCNotification scn; + scn.nmhdr.code = SCN_POSCHANGED; + scn.position = position; + NotifyParent(scn); +} + void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) { //Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off"); NotifySavePoint(atSavePoint); @@ -1563,13 +1790,21 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { } } } + if (cs.LinesDisplayed() < cs.LinesInDoc()) { + // Some lines are hidden so may need shown. + // TODO: check if the modified area is hidden. + if (mh.modificationType & SC_MOD_BEFOREINSERT) { + NotifyNeedShown(mh.position, 0); + } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { + NotifyNeedShown(mh.position, mh.length); + } + } if (mh.linesAdded != 0) { // Update contraction state for inserted and removed lines // lineOfPos should be calculated in context of state before modification, shouldn't it int lineOfPos = pdoc->LineFromPosition(mh.position); if (mh.linesAdded > 0) { - NotifyNeedShown(mh.position, mh.length); cs.InsertLines(lineOfPos, mh.linesAdded); } else { cs.DeleteLines(lineOfPos, -mh.linesAdded); @@ -1582,7 +1817,7 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { SetVerticalScrollPos(); } } - + //Platform::DebugPrintf("** %x Doc Changed\n", this); // TODO: could invalidate from mh.startModification to end of screen //InvalidateRange(mh.position, mh.position + mh.length); @@ -1599,12 +1834,17 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { SetScrollBars(); } + if (mh.modificationType & SC_MOD_CHANGEMARKER) { + RedrawSelMargin(); + } + // If client wants to see this modification if (mh.modificationType & modEventMask) { if ((mh.modificationType & SC_MOD_CHANGESTYLE) == 0) { // Real modification made to text of document. NotifyChange(); // Send EN_CHANGE } + SCNotification scn; scn.nmhdr.code = SCN_MODIFIED; scn.position = mh.position; @@ -1619,20 +1859,20 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { } } -void Editor::NotifyDeleted(Document *document, void *userData) { +void Editor::NotifyDeleted(Document *, void *) { /* Do nothing */ } #ifdef MACRO_SUPPORT -void Editor::NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam) { +void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam) { // Enumerates all macroable messages switch (iMessage) { - case WM_CUT: - case WM_COPY: - case WM_PASTE: - case WM_CLEAR: - case EM_REPLACESEL: + case SCI_CUT: + case SCI_COPY: + case SCI_PASTE: + case SCI_CLEAR: + case SCI_REPLACESEL: case SCI_ADDTEXT: case SCI_INSERTTEXT: case SCI_CLEARALL: @@ -1677,12 +1917,18 @@ void Editor::NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_VCHOMEEXTEND: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: break; - // Filter out all others (display changes, etc) + // Filter out all others (display changes, etc) default: -// printf("Filtered out %ld of macro recording\n", iMessage); - return; + // printf("Filtered out %ld of macro recording\n", iMessage); + + return ; } // Send notification @@ -1693,13 +1939,13 @@ void Editor::NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam) { scn.lParam = lParam; NotifyParent(scn); } -#endif +#endif // Force scroll and keep position relative to top of window void Editor::PageMove(int direction, bool extend) { Point pt = LocationFromPosition(currentPos); int topLineNew = Platform::Clamp( - topLine + direction * LinesToScroll(), 0, MaxScrollPos()); + topLine + direction * LinesToScroll(), 0, MaxScrollPos()); int newPos = PositionFromLocation( Point(lastXChosen, pt.y + direction * (vs.lineHeight * LinesToScroll()))); if (topLineNew != topLine) { @@ -1712,7 +1958,64 @@ void Editor::PageMove(int direction, bool extend) { } } -int Editor::KeyCommand(UINT iMessage) { +void Editor::ChangeCaseOfSelection(bool makeUpperCase) { + pdoc->BeginUndoAction(); + int startCurrent = currentPos; + int startAnchor = anchor; + if (selType == selRectangle) { + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + for (int line = lineEnd; line >= lineStart; line--) { + pdoc->ChangeCase( + Range(SelectionStart(line), SelectionEnd(line)), + makeUpperCase); + } + // Would be nicer to keep the rectangular selection but this is complex + selType = selStream; + SetSelection(startCurrent, startCurrent); + } else { + pdoc->ChangeCase(Range(SelectionStart(), SelectionEnd()), + makeUpperCase); + SetSelection(startCurrent, startAnchor); + } + pdoc->EndUndoAction(); +} + + +void Editor::LineTranspose() { + int line = pdoc->LineFromPosition(currentPos); + if (line > 0) { + int startPrev = pdoc->LineStart(line - 1); + int endPrev = pdoc->LineEnd(line - 1); + int start = pdoc->LineStart(line); + int end = pdoc->LineEnd(line); + int startNext = pdoc->LineStart(line + 1); + if (end < pdoc->Length()) { + end = startNext; + char *thisLine = CopyRange(start, end); + pdoc->DeleteChars(start, end - start); + pdoc->InsertString(startPrev, thisLine, end - start); + MovePositionTo(startPrev + end - start); + delete []thisLine; + } else { + // Last line so line has no line end + char *thisLine = CopyRange(start, end); + char *prevEnd = CopyRange(endPrev, start); + pdoc->DeleteChars(endPrev, end - endPrev); + pdoc->InsertString(startPrev, thisLine, end - start); + pdoc->InsertString(startPrev + end - start, prevEnd, start - endPrev); + MovePositionTo(startPrev + end - endPrev); + delete []thisLine; + delete []prevEnd; + } + + } +} + +void Editor::CancelModes() {} + + +int Editor::KeyCommand(unsigned int iMessage) { Point pt = LocationFromPosition(currentPos); switch (iMessage) { @@ -1724,6 +2027,10 @@ int Editor::KeyCommand(UINT iMessage) { MovePositionTo(PositionFromLocation( Point(lastXChosen, pt.y + vs.lineHeight)), true); break; + case SCI_LINESCROLLDOWN: + ScrollTo(topLine + 1); + MoveCaretInsideView(); + break; case SCI_LINEUP: MovePositionTo(PositionFromLocation( Point(lastXChosen, pt.y - vs.lineHeight))); @@ -1732,6 +2039,10 @@ int Editor::KeyCommand(UINT iMessage) { MovePositionTo(PositionFromLocation( Point(lastXChosen, pt.y - vs.lineHeight)), true); break; + case SCI_LINESCROLLUP: + ScrollTo(topLine - 1); + MoveCaretInsideView(); + break; case SCI_CHARLEFT: if (SelectionEmpty()) { MovePositionTo(MovePositionSoVisible(currentPos - 1, -1)); @@ -1820,20 +2131,26 @@ int Editor::KeyCommand(UINT iMessage) { inOverstrike = !inOverstrike; DropCaret(); ShowCaretAtCurrentPosition(); + NotifyUpdateUI(); break; - case SCI_CANCEL: // Cancel any modes - handled in subclass + case SCI_CANCEL: // Cancel any modes - handled in subclass // Also unselect text - SetEmptySelection(currentPos); + CancelModes(); break; case SCI_DELETEBACK: DelCharBack(); + SetLastXChosen(); EnsureCaretVisible(); break; case SCI_TAB: Indent(true); + SetLastXChosen(); + EnsureCaretVisible(); break; case SCI_BACKTAB: Indent(false); + SetLastXChosen(); + EnsureCaretVisible(); break; case SCI_NEWLINE: ClearSelection(); @@ -1879,13 +2196,46 @@ int Editor::KeyCommand(UINT iMessage) { int startWord = pdoc->NextWordStart(currentPos, -1); pdoc->DeleteChars(startWord, currentPos - startWord); MovePositionTo(startWord); + SetLastXChosen(); } break; case SCI_DELWORDRIGHT: { int endWord = pdoc->NextWordStart(currentPos, 1); pdoc->DeleteChars(currentPos, endWord - currentPos); + MovePositionTo(currentPos); } break; + case SCI_LINECUT: { + int lineStart = pdoc->LineFromPosition(currentPos); + int lineEnd = pdoc->LineFromPosition(anchor); + if (lineStart > lineEnd) { + int t = lineEnd; + lineEnd = lineStart; + lineStart = t; + } + int start = pdoc->LineStart(lineStart); + int end = pdoc->LineStart(lineEnd + 1); + SetSelection(start, end); + Cut(); + } + break; + case SCI_LINEDELETE: { + int line = pdoc->LineFromPosition(currentPos); + int start = pdoc->LineStart(line); + int end = pdoc->LineStart(line + 1); + pdoc->DeleteChars(start, end - start); + MovePositionTo(start); + } + break; + case SCI_LINETRANSPOSE: + LineTranspose(); + break; + case SCI_LOWERCASE: + ChangeCaseOfSelection(false); + break; + case SCI_UPPERCASE: + ChangeCaseOfSelection(true); + break; } return 0; } @@ -1904,11 +2254,11 @@ int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt) { return KeyDefault(key, modifiers); } -void Editor::SetWhitespaceVisible(bool view) { - vs.viewWhitespace = view; +void Editor::SetWhitespaceVisible(int view) { + vs.viewWhitespace = static_cast(view); } -bool Editor::GetWhitespaceVisible() { +int Editor::GetWhitespaceVisible() { return vs.viewWhitespace; } @@ -1918,9 +2268,15 @@ void Editor::Indent(bool forwards) { int lineCurrentPos = pdoc->LineFromPosition(currentPos); if (lineOfAnchor == lineCurrentPos) { ClearSelection(); - pdoc->InsertChar(currentPos, '\t'); - //pdoc->InsertChar(currentPos++, '\t'); - SetEmptySelection(currentPos + 1); + if (pdoc->useTabs) { + pdoc->InsertChar(currentPos, '\t'); + SetEmptySelection(currentPos + 1); + } else { + for (int i = 0; i < pdoc->tabInChars; i++) { + pdoc->InsertChar(currentPos, ' '); + } + SetEmptySelection(currentPos + pdoc->tabInChars); + } } else { int anchorPosOnLine = anchor - pdoc->LineStart(lineOfAnchor); int currentPosPosOnLine = currentPos - pdoc->LineStart(lineCurrentPos); @@ -1946,12 +2302,13 @@ void Editor::Indent(bool forwards) { } } -long Editor::FindText(UINT iMessage, WPARAM wParam, LPARAM lParam) { - FINDTEXTEX *ft = reinterpret_cast(lParam); +long Editor::FindText(unsigned int iMessage, unsigned long wParam, long lParam) { + TextToFind *ft = reinterpret_cast(lParam); int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText, - wParam & FR_MATCHCASE, wParam & FR_WHOLEWORD); + wParam & SCFIND_MATCHCASE, wParam & SCFIND_WHOLEWORD, + wParam & SCFIND_WORDSTART); if (pos != -1) { - if (iMessage == EM_FINDTEXTEX) { + if (iMessage != EM_FINDTEXT) { ft->chrgText.cpMin = pos; ft->chrgText.cpMax = pos + strlen(ft->lpstrText); } @@ -1959,8 +2316,8 @@ long Editor::FindText(UINT iMessage, WPARAM wParam, LPARAM lParam) { return pos; } -// Relocatable search support : Searches relative to current selection -// point and sets the selection to the found text range with +// Relocatable search support : Searches relative to current selection +// point and sets the selection to the found text range with // each search. // Anchor following searches at current selection start: This allows @@ -1975,18 +2332,20 @@ void Editor::SearchAnchor() { // Accepts both SCI_SEARCHNEXT and SCI_SEARCHPREV. // wParam contains search modes : ORed FR_MATCHCASE and FR_WHOLEWORD. // lParam contains the text to search for. -long Editor::SearchText(UINT iMessage, WPARAM wParam, LPARAM lParam) { +long Editor::SearchText(unsigned int iMessage, unsigned long wParam, long lParam) { const char *txt = reinterpret_cast(lParam); int pos; if (iMessage == SCI_SEARCHNEXT) { - pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, - wParam & FR_MATCHCASE, - wParam & FR_WHOLEWORD); + pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, + wParam & SCFIND_MATCHCASE, + wParam & SCFIND_WHOLEWORD, + wParam & SCFIND_WORDSTART); } else { - pos = pdoc->FindText(searchAnchor, 0, txt, - wParam & FR_MATCHCASE, - wParam & FR_WHOLEWORD); + pos = pdoc->FindText(searchAnchor, 0, txt, + wParam & SCFIND_MATCHCASE, + wParam & SCFIND_WHOLEWORD, + wParam & SCFIND_WORDSTART); } if (pos != -1) { @@ -2034,7 +2393,7 @@ int Editor::SelectionRangeLength() { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int totalSize = 0; - for (int line=lineStart; line <= lineEnd; line++) { + for (int line = lineStart; line <= lineEnd; line++) { totalSize += SelectionEnd(line) - SelectionStart(line) + 1; if (pdoc->eolMode == SC_EOL_CRLF) totalSize++; @@ -2055,8 +2414,8 @@ char *Editor::CopySelectionRange() { text = new char[totalSize + 1]; if (text) { int j = 0; - for (int line=lineStart; line <= lineEnd; line++) { - for (int i=SelectionStart(line);iCharAt(i); } if (pdoc->eolMode != SC_EOL_LF) @@ -2086,7 +2445,7 @@ void Editor::CopySelectionIntoDrag() { void Editor::SetDragPosition(int newPos) { if (newPos >= 0) { - newPos = pdoc->MovePositionOutsideChar(newPos, 1); + newPos = MovePositionOutsideChar(newPos, 1); posDrop = newPos; } if (posDrag != newPos) { @@ -2104,6 +2463,7 @@ void Editor::StartDrag() { //wDraw.SetCursor(Window::cursorArrow); } + void Editor::DropAt(int position, const char *value, bool moving, bool rectangular) { //Platform::DebugPrintf("DropAt %d\n", inDragDrop); if (inDragDrop) @@ -2111,11 +2471,15 @@ void Editor::DropAt(int position, const char *value, bool moving, bool rectangul int positionWasInSelection = PositionInSelection(position); - if ((!inDragDrop) || !(0 == positionWasInSelection)) { + bool positionOnEdgeOfSelection = + (position == SelectionStart()) || (position == SelectionEnd()); + + if ((!inDragDrop) || !(0 == positionWasInSelection) || + (positionOnEdgeOfSelection && !moving)) { int selStart = SelectionStart(); int selEnd = SelectionEnd(); - + pdoc->BeginUndoAction(); int positionAfterDeletion = position; @@ -2124,7 +2488,7 @@ void Editor::DropAt(int position, const char *value, bool moving, bool rectangul if (rectangular) { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); - for (int line=lineStart; line <= lineEnd; line++) { + for (int line = lineStart; line <= lineEnd; line++) { int startPos = SelectionStart(line); int endPos = SelectionEnd(line); if (position >= startPos) { @@ -2143,14 +2507,14 @@ void Editor::DropAt(int position, const char *value, bool moving, bool rectangul ClearSelection(); } position = positionAfterDeletion; - + if (rectangular) { PasteRectangular(position, value, strlen(value)); pdoc->EndUndoAction(); // Should try to select new rectangle but it may not be a rectangle now so just select the drop position - SetSelection(position, position); + SetSelection(position, position); } else { - position = pdoc->MovePositionOutsideChar(position, currentPos - position); + position = MovePositionOutsideChar(position, currentPos - position); pdoc->InsertString(position, value); pdoc->EndUndoAction(); SetSelection(position + strlen(value), position); @@ -2170,7 +2534,7 @@ static int BeforeInOrAfter(int val, int minim, int maxim) { } int Editor::PositionInSelection(int pos) { - pos = pdoc->MovePositionOutsideChar(pos, currentPos - pos); + pos = MovePositionOutsideChar(pos, currentPos - pos); if (selType == selRectangle) { if (pos < SelectionStart()) return -1; @@ -2224,13 +2588,13 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b //Platform::DebugPrintf("Scintilla:ButtonDown %d %d = %d alt=%d\n", curTime, lastClickTime, curTime - lastClickTime, alt); ptMouseLast = pt; int newPos = PositionFromLocation(pt); - newPos = pdoc->MovePositionOutsideChar(newPos, currentPos - newPos); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); inDragDrop = false; - + bool processed = NotifyMarginClick(pt, shift, ctrl, alt); if (processed) - return; - + return ; + if (shift) { SetSelection(newPos); } @@ -2276,7 +2640,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b if (ctrl) { SelectAll(); lastClickTime = curTime; - return; + return ; } lineAnchor = LineFromLocation(pt); // While experimenting with folding turn off line selection @@ -2323,7 +2687,7 @@ void Editor::ButtonMove(Point pt) { xEndSelect = pt.x - vs.fixedColumnWidth + xOffset; ptMouseLast = pt; int movePos = PositionFromLocation(pt); - movePos = pdoc->MovePositionOutsideChar(movePos, currentPos - movePos); + movePos = MovePositionOutsideChar(movePos, currentPos - movePos); if (posDrag >= 0) { SetDragPosition(movePos); } else { @@ -2343,10 +2707,10 @@ void Editor::ButtonMove(Point pt) { int lineMove = LineFromLocation(pt); if (lineAnchor < lineMove) { SetSelection(pdoc->LineStart(lineMove + 1), - pdoc->LineStart(lineAnchor)); + pdoc->LineStart(lineAnchor)); } else { SetSelection(pdoc->LineStart(lineMove), - pdoc->LineStart(lineAnchor + 1)); + pdoc->LineStart(lineAnchor + 1)); } } } @@ -2355,8 +2719,9 @@ void Editor::ButtonMove(Point pt) { if (vs.fixedColumnWidth > 0) { // There is a margin if (PointInSelMargin(pt)) { wDraw.SetCursor(Window::cursorReverseArrow); - return; // No need to test for selection + return ; // No need to test for selection } + } // Display regular (drag) cursor over selection if (PointInSelection(pt)) @@ -2379,7 +2744,7 @@ void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { ptMouseLast = pt; SetMouseCapture(false); int newPos = PositionFromLocation(pt); - newPos = pdoc->MovePositionOutsideChar(newPos, currentPos - newPos); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); if (inDragDrop) { int selStart = SelectionStart(); int selEnd = SelectionEnd(); @@ -2441,53 +2806,53 @@ static bool IsIn(int a, int minimum, int maximum) { } static bool IsOverlap(int mina, int maxa, int minb, int maxb) { - return - IsIn(mina, minb, maxb) || - IsIn(maxa, minb, maxb) || - IsIn(minb, mina, maxa) || - IsIn(maxb, mina, maxa); + return + IsIn(mina, minb, maxb) || + IsIn(maxa, minb, maxb) || + IsIn(minb, mina, maxa) || + IsIn(maxb, mina, maxa); } void Editor::CheckForChangeOutsidePaint(Range r) { if (paintState == painting && !paintingAllText) { //Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end); if (!r.Valid()) - return; - + return ; + PRectangle rcText = GetTextRectangle(); // Determine number of lines displayed including a possible partially displayed last line int linesDisplayed = (rcText.bottom - rcText.top - 1) / vs.lineHeight + 1; int bottomLine = topLine + linesDisplayed - 1; - + int lineRangeStart = cs.DisplayFromDoc(pdoc->LineFromPosition(r.start)); int lineRangeEnd = cs.DisplayFromDoc(pdoc->LineFromPosition(r.end)); if (!IsOverlap(topLine, bottomLine, lineRangeStart, lineRangeEnd)) { //Platform::DebugPrintf("No overlap (%d-%d) with window(%d-%d)\n", // lineRangeStart, lineRangeEnd, topLine, bottomLine); - return; + return ; } - + // Assert rcPaint contained within or equal to rcText if (rcPaint.top > rcText.top) { - // does range intersect rcText.top .. rcPaint.top - int paintTopLine = ((rcPaint.top - rcText.top-1) / vs.lineHeight) + topLine; + // does range intersect rcText.top .. rcPaint.top + int paintTopLine = ((rcPaint.top - rcText.top - 1) / vs.lineHeight) + topLine; // paintTopLine is the top line of the paint rectangle or the line just above if that line is completely inside the paint rectangle if (IsOverlap(topLine, paintTopLine, lineRangeStart, lineRangeEnd)) { - //Platform::DebugPrintf("Change (%d-%d) in top npv(%d-%d)\n", + //Platform::DebugPrintf("Change (%d-%d) in top npv(%d-%d)\n", // lineRangeStart, lineRangeEnd, topLine, paintTopLine); paintState = paintAbandoned; - return; + return ; } } if (rcPaint.bottom < rcText.bottom) { // does range intersect rcPaint.bottom .. rcText.bottom - int paintBottomLine = ((rcPaint.bottom - rcText.top-1) / vs.lineHeight + 1) + topLine; + int paintBottomLine = ((rcPaint.bottom - rcText.top - 1) / vs.lineHeight + 1) + topLine; // paintTopLine is the bottom line of the paint rectangle or the line just below if that line is completely inside the paint rectangle if (IsOverlap(paintBottomLine, bottomLine, lineRangeStart, lineRangeEnd)) { - //Platform::DebugPrintf("Change (%d-%d) in bottom npv(%d-%d)\n", + //Platform::DebugPrintf("Change (%d-%d) in bottom npv(%d-%d)\n", // lineRangeStart, lineRangeEnd, paintBottomLine, bottomLine); paintState = paintAbandoned; - return; + return ; } } } @@ -2495,27 +2860,37 @@ void Editor::CheckForChangeOutsidePaint(Range r) { char BraceOpposite(char ch) { switch (ch) { - case '(': return ')'; - case ')': return '('; - case '[': return ']'; - case ']': return '['; - case '{': return '}'; - case '}': return '{'; - case '<': return '>'; - case '>': return '<'; - default: return '\0'; + case '(': + return ')'; + case ')': + return '('; + case '[': + return ']'; + case ']': + return '['; + case '{': + return '}'; + case '}': + return '{'; + case '<': + return '>'; + case '>': + return '<'; + default: + return '\0'; } } // TODO: should be able to extend styled region to find matching brace // TODO: may need to make DBCS safe // so should be moved into Document -int Editor::BraceMatch(int position, int maxReStyle) { +int Editor::BraceMatch(int position, int /*maxReStyle*/) { char chBrace = pdoc->CharAt(position); char chSeek = BraceOpposite(chBrace); - if (!chSeek) + if (chSeek == '\0') return - 1; - char styBrace = pdoc->StyleAt(position) & pdoc->stylingBitsMask; + char styBrace = static_cast( + pdoc->StyleAt(position) & pdoc->stylingBitsMask); int direction = -1; if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') direction = 1; @@ -2523,7 +2898,7 @@ int Editor::BraceMatch(int position, int maxReStyle) { position = position + direction; while ((position >= 0) && (position < pdoc->Length())) { char chAtPos = pdoc->CharAt(position); - char styAtPos = pdoc->StyleAt(position) & pdoc->stylingBitsMask; + char styAtPos = static_cast(pdoc->StyleAt(position) & pdoc->stylingBitsMask); if ((position > pdoc->GetEndStyled()) || (styAtPos == styBrace)) { if (chAtPos == chBrace) depth++; @@ -2539,12 +2914,12 @@ int Editor::BraceMatch(int position, int maxReStyle) { void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { if ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) { - if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { + if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[0])); CheckForChangeOutsidePaint(Range(pos0)); braces[0] = pos0; } - if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { + if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[1])); CheckForChangeOutsidePaint(Range(pos1)); braces[1] = pos1; @@ -2566,6 +2941,10 @@ void Editor::SetDocPointer(Document *document) { pdoc = document; } pdoc->AddRef(); + // Reset the contraction state to fully shown. + cs.Clear(); + cs.InsertLines(0, pdoc->LinesTotal() - 1); + pdoc->AddWatcher(this, 0); Redraw(); SetScrollBars(); @@ -2597,7 +2976,7 @@ void Editor::ToggleContraction(int line) { int lineMaxSubord = pdoc->GetLastChild(line); cs.SetExpanded(line, 0); if (lineMaxSubord > line) { - cs.SetVisible(line+1, lineMaxSubord, false); + cs.SetVisible(line + 1, lineMaxSubord, false); SetScrollBars(); Redraw(); } @@ -2628,30 +3007,37 @@ void Editor::EnsureLineVisible(int line) { } } -LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { +static bool ValidMargin(unsigned long wParam) { + return wParam < ViewStyle::margins; +} + + +long Editor::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { //Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam); // Optional macro recording hook #ifdef MACRO_SUPPORT if (recordingMacro) NotifyMacroRecord(iMessage, wParam, lParam); -#endif +#endif switch (iMessage) { case WM_GETTEXT: + case SCI_GETTEXT: { if (lParam == 0) return 0; char *ptr = reinterpret_cast(lParam); unsigned int iChar = 0; - for (; iChar < wParam-1; iChar++) + for (; iChar < wParam - 1; iChar++) ptr[iChar] = pdoc->CharAt(iChar); ptr[iChar] = '\0'; return iChar; } case WM_SETTEXT: + case SCI_SETTEXT: { if (lParam == 0) return FALSE; @@ -2662,32 +3048,35 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { } case WM_GETTEXTLENGTH: + case SCI_GETTEXTLENGTH: return pdoc->Length(); - case WM_NOTIFY: - //Platform::DebugPrintf("S notify %d %d\n", wParam, lParam); - break; - case WM_CUT: + case SCI_CUT: Cut(); SetLastXChosen(); break; case WM_COPY: + case SCI_COPY: Copy(); break; case WM_PASTE: + case SCI_PASTE: Paste(); SetLastXChosen(); + EnsureCaretVisible(); break; case WM_CLEAR: + case SCI_CLEAR: Clear(); SetLastXChosen(); break; case WM_UNDO: + case SCI_UNDO: Undo(); SetLastXChosen(); break; @@ -2734,26 +3123,30 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { // EM_GETPUNCTUATION // EM_SETPUNCTUATION // EM_GETTHUMB + // EM_SETTARGETDEVICE // Not supported but should be: // EM_GETEVENTMASK // EM_SETEVENTMASK // For printing: // EM_DISPLAYBAND - // EM_SETTARGETDEVICE case EM_CANUNDO: + case SCI_CANUNDO: return pdoc->CanUndo() ? TRUE : FALSE; case EM_UNDO: Undo(); + SetLastXChosen(); break; case EM_EMPTYUNDOBUFFER: + case SCI_EMPTYUNDOBUFFER: pdoc->DeleteUndoHistory(); return 0; case EM_GETFIRSTVISIBLELINE: + case SCI_GETFIRSTVISIBLELINE: return topLine; case EM_GETLINE: { @@ -2762,7 +3155,7 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { int lineStart = pdoc->LineStart(wParam); int lineEnd = pdoc->LineStart(wParam + 1); char *ptr = reinterpret_cast(lParam); - WORD *pBufSize = reinterpret_cast(lParam); + short *pBufSize = reinterpret_cast(lParam); if (*pBufSize < lineEnd - lineStart) { ptr[0] = '\0'; // If no characters copied have to put a NUL into buffer return 0; @@ -2773,21 +3166,29 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return iPlace; } + case SCI_GETLINE: { + if (lParam == 0) + return 0; + int lineStart = pdoc->LineStart(wParam); + int lineEnd = pdoc->LineStart(wParam + 1); + char *ptr = reinterpret_cast(lParam); + int iPlace = 0; + for (int iChar = lineStart; iChar < lineEnd; iChar++) + ptr[iPlace++] = pdoc->CharAt(iChar); + return iPlace; + } + case EM_GETLINECOUNT: + case SCI_GETLINECOUNT: if (pdoc->LinesTotal() == 0) return 1; else return pdoc->LinesTotal(); case EM_GETMODIFY: + case SCI_GETMODIFY: return !pdoc->IsSavePoint(); - case EM_SETMODIFY: - // Not really supported now that there is the save point stuff - //pdoc->isModified = wParam; - //return pdoc->isModified; - return false; - case EM_GETRECT: if (lParam == 0) return 0; @@ -2799,24 +3200,28 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { *reinterpret_cast(wParam) = SelectionStart(); if (lParam) *reinterpret_cast(lParam) = SelectionEnd(); - return MAKELONG(SelectionStart(), SelectionEnd()); + return Platform::LongFromTwoShorts( + static_cast(SelectionStart()), + static_cast(SelectionEnd())); case EM_EXGETSEL: { if (lParam == 0) return 0; - CHARRANGE *pCR = reinterpret_cast(lParam); + CharacterRange *pCR = reinterpret_cast(lParam); pCR->cpMin = SelectionStart(); pCR->cpMax = SelectionEnd(); } break; - case EM_SETSEL: { + case EM_SETSEL: + case SCI_SETSEL: { int nStart = static_cast(wParam); int nEnd = static_cast(lParam); if (nEnd < 0) nEnd = pdoc->Length(); if (nStart < 0) nStart = nEnd; // Remove selection + selType = selStream; SetSelection(nEnd, nStart); EnsureCaretVisible(); } @@ -2825,7 +3230,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case EM_EXSETSEL: { if (lParam == 0) return 0; - CHARRANGE *pCR = reinterpret_cast(lParam); + CharacterRange *pCR = reinterpret_cast(lParam); + selType = selStream; if (pCR->cpMax == -1) { SetSelection(pCR->cpMin, pdoc->Length()); } else { @@ -2835,7 +3241,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return pdoc->LineFromPosition(SelectionStart()); } - case EM_GETSELTEXT: { + case EM_GETSELTEXT: + case SCI_GETSELTEXT: { if (lParam == 0) return 0; char *ptr = reinterpret_cast(lParam); @@ -2851,22 +3258,6 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return iChar; } - case EM_GETWORDBREAKPROC: - return 0; - - case EM_SETWORDBREAKPROC: - break; - - case EM_LIMITTEXT: - // wParam holds the number of characters control should be limited to - break; - - case EM_GETLIMITTEXT: - return 0xffffffff; - - case EM_GETOLEINTERFACE: - return 0; - case EM_LINEFROMCHAR: if (static_cast(wParam) < 0) wParam = SelectionStart(); @@ -2877,7 +3268,13 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { lParam = SelectionStart(); // Not specified, but probably OK return pdoc->LineFromPosition(lParam); + case SCI_LINEFROMPOSITION: + if (static_cast(wParam) < 0) + return 0; + return pdoc->LineFromPosition(wParam); + case EM_LINEINDEX: + case SCI_POSITIONFROMLINE: if (static_cast(wParam) < 0) wParam = pdoc->LineFromPosition(SelectionStart()); if (wParam == 0) @@ -2888,8 +3285,7 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { // return -1; return pdoc->LineStart(wParam); - case EM_LINELENGTH: - { + case EM_LINELENGTH: { if (static_cast(wParam) < 0) // Who use this anyway? return 0; // Should be... Too complex to describe here, see MS specs! if (static_cast(wParam) > pdoc->Length()) // Useful test, anyway... @@ -2910,7 +3306,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return 0; return pdoc->LineStart(wParam + 1) - pdoc->LineStart(wParam); - case EM_REPLACESEL: { + case EM_REPLACESEL: + case SCI_REPLACESEL: { if (lParam == 0) return 0; pdoc->BeginUndoAction(); @@ -2924,22 +3321,26 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case EM_LINESCROLL: + case SCI_LINESCROLL: ScrollTo(topLine + lParam); HorizontalScrollTo(xOffset + wParam * vs.spaceWidth); return TRUE; case EM_SCROLLCARET: + case SCI_SCROLLCARET: EnsureCaretVisible(); break; case EM_SETREADONLY: + case SCI_SETREADONLY: pdoc->SetReadOnly(wParam); return TRUE; - case EM_SETRECT: - break; + case SCI_GETREADONLY: + return pdoc->IsReadOnly(); case EM_CANPASTE: + case SCI_CANPASTE: return 1; case EM_CHARFROMPOS: { @@ -2948,7 +3349,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { Point *ppt = reinterpret_cast(lParam); int pos = PositionFromLocation(*ppt); int line = pdoc->LineFromPosition(pos); - return MAKELONG(pos, line); + return Platform::LongFromTwoShorts( + static_cast(pos), static_cast < short > (line)); } case EM_POSFROMCHAR: { @@ -2964,16 +3366,34 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return 0; } + case SCI_POINTXFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.x; + } + + case SCI_POINTYFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.y; + } + case EM_FINDTEXT: return FindText(iMessage, wParam, lParam); case EM_FINDTEXTEX: + case SCI_FINDTEXT: return FindText(iMessage, wParam, lParam); - case EM_GETTEXTRANGE: { + case EM_GETTEXTRANGE: + case SCI_GETTEXTRANGE: { if (lParam == 0) return 0; - TEXTRANGE *tr = reinterpret_cast(lParam); + TextRange *tr = reinterpret_cast(lParam); int cpMax = tr->chrg.cpMax; if (cpMax == -1) cpMax = pdoc->Length(); @@ -2984,11 +3404,16 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return len; // Not including NUL } + case EM_SELECTIONTYPE: +#ifdef SEL_EMPTY if (currentPos == anchor) return SEL_EMPTY; else return SEL_TEXT; +#else + return 0; +#endif case EM_HIDESELECTION: hideSelection = wParam; @@ -2996,25 +3421,45 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case EM_FORMATRANGE: - return FormatRange(wParam, reinterpret_cast(lParam)); + case SCI_FORMATRANGE: + return FormatRange(wParam, reinterpret_cast(lParam)); case EM_GETMARGINS: - return MAKELONG(vs.leftMarginWidth, vs.rightMarginWidth); - + return Platform::LongFromTwoShorts(static_cast(vs.leftMarginWidth), + static_cast(vs.rightMarginWidth)); + + case SCI_GETMARGINLEFT: + return vs.leftMarginWidth; + + case SCI_GETMARGINRIGHT: + return vs.rightMarginWidth; + case EM_SETMARGINS: +#ifdef EC_LEFTMARGIN if (wParam & EC_LEFTMARGIN) { - vs.leftMarginWidth = LOWORD(lParam); + vs.leftMarginWidth = Platform::LowShortFromLong(lParam); } if (wParam & EC_RIGHTMARGIN) { - vs.rightMarginWidth = HIWORD(lParam); + vs.rightMarginWidth = Platform::HighShortFromLong(lParam); } if (wParam == EC_USEFONTINFO) { vs.leftMarginWidth = vs.aveCharWidth / 2; vs.rightMarginWidth = vs.aveCharWidth / 2; } InvalidateStyleRedraw(); +#endif break; - + + case SCI_SETMARGINLEFT: + vs.leftMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + + case SCI_SETMARGINRIGHT: + vs.rightMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + // Control specific mesages case SCI_ADDTEXT: { @@ -3055,15 +3500,16 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { ClearAll(); return 0; - case SCI_SETUNDOCOLLECTION: - pdoc->SetUndoCollection(static_cast(wParam)); + case SCI_CLEARDOCUMENTSTYLE: + ClearDocumentStyle(); return 0; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_APPENDUNDOSTARTACTION: - pdoc->AppendUndoStartAction(); + case SCI_SETUNDOCOLLECTION: + pdoc->SetUndoCollection(wParam); return 0; -#endif + + case SCI_GETUNDOCOLLECTION: + return pdoc->IsCollectingUndo(); case SCI_BEGINUNDOACTION: pdoc->BeginUndoAction(); @@ -3093,12 +3539,48 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_GETCHARAT: return pdoc->CharAt(wParam); + case SCI_SETCURRENTPOS: + SetSelection(wParam, anchor); + break; + case SCI_GETCURRENTPOS: return currentPos; + case SCI_SETANCHOR: + SetSelection(currentPos, wParam); + break; + case SCI_GETANCHOR: return anchor; + case SCI_SETSELECTIONSTART: + SetSelection(Platform::Maximum(currentPos, wParam), wParam); + break; + + case SCI_GETSELECTIONSTART: + return Platform::Minimum(anchor, currentPos); + + case SCI_SETSELECTIONEND: + SetSelection(wParam, Platform::Minimum(anchor, wParam)); + break; + + case SCI_GETSELECTIONEND: + return Platform::Maximum(anchor, currentPos); + + case SCI_SETPRINTMAGNIFICATION: + printMagnification = wParam; + break; + + case SCI_GETPRINTMAGNIFICATION: + return printMagnification; + + case SCI_SETPRINTCOLOURMODE: + printColourMode = wParam; + break; + + case SCI_GETPRINTCOLOURMODE: + return printColourMode; + case SCI_GETSTYLEAT: if (static_cast(wParam) >= pdoc->Length()) return 0; @@ -3121,7 +3603,7 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_GETSTYLEDTEXT: { if (lParam == 0) return 0; - TEXTRANGE *tr = reinterpret_cast(lParam); + TextRange *tr = reinterpret_cast(lParam); int iPlace = 0; for (int iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) { tr->lpstrText[iPlace++] = pdoc->CharAt(iChar); @@ -3146,10 +3628,13 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return vs.viewWhitespace; case SCI_SETVIEWWS: - vs.viewWhitespace = wParam; + vs.viewWhitespace = static_cast(wParam); Redraw(); break; + case SCI_POSITIONFROMPOINT: + return PositionFromLocation(Point(wParam, lParam)); + case SCI_GOTOLINE: GoToLine(wParam); break; @@ -3160,10 +3645,6 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { Redraw(); break; - case SCI_SETANCHOR: - SetSelection(currentPos, wParam); - break; - case SCI_GETCURLINE: { if (lParam == 0) return 0; @@ -3189,56 +3670,109 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case SCI_STARTSTYLING: - pdoc->StartStyling(wParam, lParam); + pdoc->StartStyling(wParam, static_cast(lParam)); break; case SCI_SETSTYLING: - pdoc->SetStyleFor(wParam, lParam); + pdoc->SetStyleFor(wParam, static_cast(lParam)); break; - case SCI_SETSTYLINGEX: // Specify a complete styling buffer + case SCI_SETSTYLINGEX: // Specify a complete styling buffer if (lParam == 0) return 0; pdoc->SetStyles(wParam, reinterpret_cast(lParam)); break; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_SETMARGINWIDTH: - if (wParam < 100) { - vs.ms[1].width = wParam; - } - InvalidateStyleRedraw(); - break; -#endif - case SCI_SETBUFFEREDDRAW: bufferedDraw = wParam; break; + case SCI_GETBUFFEREDDRAW: + return bufferedDraw; + case SCI_SETTABWIDTH: if (wParam > 0) pdoc->tabInChars = wParam; InvalidateStyleRedraw(); break; + case SCI_GETTABWIDTH: + return pdoc->tabInChars; + + case SCI_SETINDENT: + pdoc->indentInChars = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETINDENT: + return pdoc->indentInChars; + + case SCI_SETUSETABS: + pdoc->useTabs = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETUSETABS: + return pdoc->useTabs; + + case SCI_SETLINEINDENTATION: + pdoc->SetLineIndentation(wParam, lParam); + break; + + case SCI_GETLINEINDENTATION: + return pdoc->GetLineIndentation(wParam); + + case SCI_GETLINEINDENTPOSITION: + return pdoc->GetLineIndentPosition(wParam); + + case SCI_GETCOLUMN: + return pdoc->GetColumn(wParam); + + case SCI_SETHSCROLLBAR : + horizontalScrollBarVisible = wParam; + SetScrollBars(); + ReconfigureScrollBars(); + break; + + case SCI_GETHSCROLLBAR: + return horizontalScrollBarVisible; + + case SCI_SETINDENTATIONGUIDES: + vs.viewIndentationGuides = wParam; + Redraw(); + break; + + case SCI_GETINDENTATIONGUIDES: + return vs.viewIndentationGuides; + + case SCI_SETHIGHLIGHTGUIDE: + if ((highlightGuideColumn != static_cast(wParam)) || (wParam > 0)) { + highlightGuideColumn = wParam; + Redraw(); + } + break; + + case SCI_GETHIGHLIGHTGUIDE: + return highlightGuideColumn; + + case SCI_GETLINEENDPOSITION: + return pdoc->LineEnd(wParam); + case SCI_SETCODEPAGE: pdoc->dbcsCodePage = wParam; break; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_SETLINENUMBERWIDTH: - if (wParam < 200) { - vs.ms[0].width = wParam; - } - InvalidateStyleRedraw(); - break; -#endif + case SCI_GETCODEPAGE: + return pdoc->dbcsCodePage; case SCI_SETUSEPALETTE: palette.allowRealization = wParam; InvalidateStyleRedraw(); break; + case SCI_GETUSEPALETTE: + return palette.allowRealization; + // Marker definition and setting case SCI_MARKERDEFINE: if (wParam <= MARKER_MAX) @@ -3260,18 +3794,15 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case SCI_MARKERADD: { int markerID = pdoc->AddMark(wParam, lParam); - RedrawSelMargin(); return markerID; } case SCI_MARKERDELETE: pdoc->DeleteMark(wParam, lParam); - RedrawSelMargin(); break; case SCI_MARKERDELETEALL: pdoc->DeleteAllMarks(static_cast(wParam)); - RedrawSelMargin(); break; case SCI_MARKERGET: @@ -3295,53 +3826,53 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return -1; case SCI_SETMARGINTYPEN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].symbol = (lParam == SC_MARGIN_SYMBOL); InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINTYPEN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].symbol ? SC_MARGIN_SYMBOL : SC_MARGIN_NUMBER; else return 0; - + case SCI_SETMARGINWIDTHN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].width = lParam; InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINWIDTHN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].width; else return 0; - + case SCI_SETMARGINMASKN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].mask = lParam; InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINMASKN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].mask; else return 0; - + case SCI_SETMARGINSENSITIVEN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].sensitive = lParam; InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINSENSITIVEN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].sensitive ? 1 : 0; else return 0; @@ -3391,37 +3922,54 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { if (lParam == 0) return 0; if (wParam <= STYLE_MAX) { - strcpy(vs.styles[wParam].fontName, reinterpret_cast(lParam)); + vs.SetStyleFontName(wParam, reinterpret_cast(lParam)); InvalidateStyleRedraw(); } break; - + case SCI_STYLESETUNDERLINE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].underline = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCHARACTERSET: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].characterSet = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETVISIBLE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].visible = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLERESETDEFAULT: vs.ResetDefaultStyle(); InvalidateStyleRedraw(); break; - case SCI_SETSTYLEBITS: pdoc->SetStylingBits(wParam); break; - + case SCI_GETSTYLEBITS: return pdoc->stylingBits; - + case SCI_SETLINESTATE: return pdoc->SetLineState(wParam, lParam); - + case SCI_GETLINESTATE: return pdoc->GetLineState(wParam); - + case SCI_GETMAXLINESTATE: return pdoc->GetMaxLineState(); - - // Folding messages - + + // Folding messages + case SCI_VISIBLEFROMDOCLINE: return cs.DisplayFromDoc(wParam); - + case SCI_DOCLINEFROMVISIBLE: return cs.DocFromDisplay(wParam); @@ -3431,40 +3979,40 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { RedrawSelMargin(); return prev; } - + case SCI_GETFOLDLEVEL: return pdoc->GetLevel(wParam); - + case SCI_GETLASTCHILD: return pdoc->GetLastChild(wParam, lParam); - + case SCI_GETFOLDPARENT: return pdoc->GetFoldParent(wParam); - + case SCI_SHOWLINES: cs.SetVisible(wParam, lParam, true); SetScrollBars(); Redraw(); break; - + case SCI_HIDELINES: cs.SetVisible(wParam, lParam, false); SetScrollBars(); Redraw(); break; - + case SCI_GETLINEVISIBLE: return cs.GetVisible(wParam); - + case SCI_SETFOLDEXPANDED: if (cs.SetExpanded(wParam, lParam)) { RedrawSelMargin(); } break; - + case SCI_GETFOLDEXPANDED: return cs.GetExpanded(wParam); - + case SCI_SETFOLDFLAGS: foldFlags = wParam; Redraw(); @@ -3473,11 +4021,11 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_TOGGLEFOLD: ToggleContraction(wParam); break; - + case SCI_ENSUREVISIBLE: EnsureLineVisible(wParam); break; - + case SCI_SEARCHANCHOR: SearchAnchor(); break; @@ -3485,47 +4033,19 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_SEARCHNEXT: case SCI_SEARCHPREV: return SearchText(iMessage, wParam, lParam); - break; case SCI_SETCARETPOLICY: caretPolicy = wParam; caretSlop = lParam; break; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_SETFORE: - vs.styles[STYLE_DEFAULT].fore.desired = Colour(wParam); - InvalidateStyleRedraw(); - break; + case SCI_LINESONSCREEN: + return LinesOnScreen(); - case SCI_SETBACK: - vs.styles[STYLE_DEFAULT].back.desired = Colour(wParam); - InvalidateStyleRedraw(); + case SCI_USEPOPUP: + displayPopupMenu = wParam; break; - case SCI_SETBOLD: - vs.styles[STYLE_DEFAULT].bold = wParam; - InvalidateStyleRedraw(); - break; - - case SCI_SETITALIC: - vs.styles[STYLE_DEFAULT].italic = wParam; - InvalidateStyleRedraw(); - break; - - case SCI_SETSIZE: - vs.styles[STYLE_DEFAULT].size = wParam; - InvalidateStyleRedraw(); - break; - - case SCI_SETFONT: - if (wParam == 0) - return 0; - strcpy(vs.styles[STYLE_DEFAULT].fontName, reinterpret_cast(wParam)); - InvalidateStyleRedraw(); - break; -#endif - case SCI_SETSELFORE: vs.selforeset = wParam; vs.selforeground.desired = Colour(lParam); @@ -3543,12 +4063,17 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { InvalidateStyleRedraw(); break; + case SCI_GETCARETFORE: + return vs.caretcolour.desired.AsLong(); + case SCI_ASSIGNCMDKEY: - kmap.AssignCmdKey(LOWORD(wParam), HIWORD(wParam), lParam); + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), lParam); break; case SCI_CLEARCMDKEY: - kmap.AssignCmdKey(LOWORD(wParam), HIWORD(wParam), WM_NULL); + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), WM_NULL); break; case SCI_CLEARALLCMDKEYS: @@ -3612,12 +4137,19 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_ZOOMOUT: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: + case SCI_LINESCROLLDOWN: + case SCI_LINESCROLLUP: return KeyCommand(iMessage); case SCI_BRACEHIGHLIGHT: SetBraceHighlight(static_cast(wParam), lParam, STYLE_BRACELIGHT); break; - + case SCI_BRACEBADLIGHT: SetBraceHighlight(static_cast(wParam), -1, STYLE_BRACEBAD); break; @@ -3635,46 +4167,81 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { Redraw(); break; + case SCI_SETZOOM: + vs.zoomLevel = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETZOOM: + return vs.zoomLevel; + case SCI_GETEDGECOLUMN: return theEdge; - + case SCI_SETEDGECOLUMN: theEdge = wParam; InvalidateStyleRedraw(); break; - + case SCI_GETEDGEMODE: - return edgeState; - + return vs.edgeState; + case SCI_SETEDGEMODE: - edgeState = wParam; + vs.edgeState = wParam; InvalidateStyleRedraw(); break; - + case SCI_GETEDGECOLOUR: return vs.edgecolour.desired.AsLong(); - + case SCI_SETEDGECOLOUR: vs.edgecolour.desired = Colour(wParam); InvalidateStyleRedraw(); break; - + case SCI_GETDOCPOINTER: - return reinterpret_cast(pdoc); + return reinterpret_cast(pdoc); case SCI_SETDOCPOINTER: SetDocPointer(reinterpret_cast(lParam)); return 0; + case SCI_CREATEDOCUMENT: { + Document *doc = new Document(); + doc->AddRef(); + return reinterpret_cast(doc); + } + + case SCI_ADDREFDOCUMENT: + (reinterpret_cast(lParam))->AddRef(); + break; + + case SCI_RELEASEDOCUMENT: + (reinterpret_cast(lParam))->Release(); + break; + case SCI_SETMODEVENTMASK: modEventMask = wParam; return 0; - + + case SCI_GETMODEVENTMASK: + return modEventMask; + case SCI_CONVERTEOLS: pdoc->ConvertLineEnds(wParam); SetSelection(currentPos, anchor); // Ensure selection inside document return 0; + case SCI_SELECTIONISRECTANGLE: + return (selType == selRectangle) ? 1 : 0; + + case SCI_SETOVERTYPE: + inOverstrike = wParam; + break; + + case SCI_GETOVERTYPE: + return inOverstrike ? TRUE : FALSE; + #ifdef MACRO_SUPPORT case SCI_STARTRECORD: recordingMacro = 1; @@ -3683,8 +4250,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_STOPRECORD: recordingMacro = 0; return 0; -#endif - +#endif + default: return DefWndProc(iMessage, wParam, lParam); } diff --git a/contrib/src/stc/scintilla/src/Editor.h b/contrib/src/stc/scintilla/src/Editor.h index 4ff334767a..83967cfd6a 100644 --- a/contrib/src/stc/scintilla/src/Editor.h +++ b/contrib/src/stc/scintilla/src/Editor.h @@ -31,13 +31,21 @@ public: // Drawing is only performed for maxLineLength characters on each line. enum {maxLineLength = 4000}; int numCharsInLine; - char chars[maxLineLength]; - char styles[maxLineLength]; - char indicators[maxLineLength]; - int positions[maxLineLength]; + int xHighlightGuide; + bool highlightColumn; + int selStart; + int selEnd; + int edgeColumn; + char chars[maxLineLength+1]; + char styles[maxLineLength+1]; + char indicators[maxLineLength+1]; + int positions[maxLineLength+1]; }; class Editor : public DocWatcher { + // Private so Editor objects can not be copied + Editor(const Editor &) : DocWatcher() {} + Editor &operator=(const Editor &) { return *this; } protected: // ScintillaBase subclass needs access to much of Editor // On GTK+, Scintilla is a container widget holding two scroll bars and a drawing area @@ -51,6 +59,8 @@ protected: // ScintillaBase subclass needs access to much of Editor bool stylesValid; ViewStyle vs; Palette palette; + int printMagnification; + int printColourMode; bool hideSelection; bool inOverstrike; @@ -61,13 +71,16 @@ protected: // ScintillaBase subclass needs access to much of Editor int xOffset; // Horizontal scrolled amount in pixels int xCaretMargin; // Ensure this many pixels visible on both sides of caret + bool horizontalScrollBarVisible; Surface pixmapLine; Surface pixmapSelMargin; Surface pixmapSelPattern; + Surface pixmapIndentGuide; + Surface pixmapIndentGuideHighlight; // Intellimouse support - currently only implemented for Windows unsigned int ucWheelScrollLines; - short cWheelDelta; //wheel delta from roll + int cWheelDelta; //wheel delta from roll KeyMap kmap; @@ -94,8 +107,8 @@ protected: // ScintillaBase subclass needs access to much of Editor bool needUpdateUI; Position braces[2]; int bracesMatchStyle; + int highlightGuideColumn; - int edgeState; int theEdge; enum { notPainting, painting, paintAbandoned } paintState; @@ -110,12 +123,15 @@ protected: // ScintillaBase subclass needs access to much of Editor enum { selStream, selRectangle, selRectangleFixed } selType; int xStartSelect; int xEndSelect; + bool primarySelection; int caretPolicy; int caretSlop; int searchAnchor; + int displayPopupMenu; + #ifdef MACRO_SUPPORT int recordingMacro; #endif @@ -162,6 +178,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void SetSelection(int currentPos_, int anchor_); void SetSelection(int currentPos_); void SetEmptySelection(int currentPos_); + int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); int MovePositionTo(int newPos, bool extend = false); int MovePositionSoVisible(int pos, int moveDir); void SetLastXChosen(); @@ -169,6 +186,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void ScrollTo(int line); virtual void ScrollText(int linesToMove); void HorizontalScrollTo(int xPos); + void MoveCaretInsideView(); void EnsureCaretVisible(bool useMargin=true); void ShowCaretAtCurrentPosition(); void DropCaret(); @@ -176,20 +194,23 @@ protected: // ScintillaBase subclass needs access to much of Editor void PaintSelMargin(Surface *surface, PRectangle &rc); void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout &ll); - void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, + void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout &ll); void Paint(Surface *surfaceWindow, PRectangle rcArea); - long FormatRange(bool draw, FORMATRANGE *pfr); + long FormatRange(bool draw, RangeToFormat *pfr); virtual void SetVerticalScrollPos() = 0; virtual void SetHorizontalScrollPos() = 0; virtual bool ModifyScrollBars(int nMax, int nPage) = 0; + virtual void ReconfigureScrollBars(); void SetScrollBarsTo(PRectangle rsClient); void SetScrollBars(); - virtual void AddChar(char ch); + void AddChar(char ch); + virtual void AddCharUTF(char *s, unsigned int len); void ClearSelection(); void ClearAll(); + void ClearDocumentStyle(); void Cut(); void PasteRectangular(int pos, const char *ptr, int len); virtual void Copy() = 0; @@ -205,8 +226,9 @@ protected: // ScintillaBase subclass needs access to much of Editor virtual void NotifyChange() = 0; virtual void NotifyFocus(bool focus); virtual void NotifyParent(SCNotification scn) = 0; - virtual void NotifyStyleNeeded(int endStyleNeeded); + virtual void NotifyStyleToNeeded(int endStyleNeeded); void NotifyChar(char ch); + void NotifyMove(int position); void NotifySavePoint(bool isSavePoint); void NotifyModifyAttempt(); virtual void NotifyDoubleClick(Point pt, bool shift); @@ -218,24 +240,29 @@ protected: // ScintillaBase subclass needs access to much of Editor void NotifySavePoint(Document *document, void *userData, bool atSavePoint); void NotifyModified(Document *document, DocModification mh, void *userData); void NotifyDeleted(Document *document, void *userData); + void NotifyStyleNeeded(Document *doc, void *userData, int endPos); + #ifdef MACRO_SUPPORT - void NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam); + void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam); #endif void PageMove(int direction, bool extend=false); - virtual int KeyCommand(UINT iMessage); + void ChangeCaseOfSelection(bool makeUpperCase); + void LineTranspose(); + virtual void CancelModes(); + virtual int KeyCommand(unsigned int iMessage); virtual int KeyDefault(int /* key */, int /*modifiers*/); int KeyDown(int key, bool shift, bool ctrl, bool alt); - bool GetWhitespaceVisible(); - void SetWhitespaceVisible(bool view); + int GetWhitespaceVisible(); + void SetWhitespaceVisible(int view); void Indent(bool forwards); - long FindText(UINT iMessage,WPARAM wParam,LPARAM lParam); + long FindText(unsigned int iMessage, unsigned long wParam, long lParam); void SearchAnchor(); - long SearchText(UINT iMessage,WPARAM wParam,LPARAM lParam); + long SearchText(unsigned int iMessage, unsigned long wParam, long lParam); void GoToLine(int lineNo); char *CopyRange(int start, int end); @@ -269,11 +296,11 @@ protected: // ScintillaBase subclass needs access to much of Editor void ToggleContraction(int line); void EnsureLineVisible(int line); - virtual LRESULT DefWndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) = 0; + virtual long DefWndProc(unsigned int iMessage, unsigned long wParam, long lParam) = 0; public: // Public so scintilla_send_message can use it - virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); + virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam); // Public so scintilla_set_id can use it int ctrlID; }; diff --git a/contrib/src/stc/scintilla/src/Indicator.cxx b/contrib/src/stc/scintilla/src/Indicator.cxx index fb6ad09157..05bdf66b53 100644 --- a/contrib/src/stc/scintilla/src/Indicator.cxx +++ b/contrib/src/stc/scintilla/src/Indicator.cxx @@ -37,6 +37,22 @@ void Indicator::Draw(Surface *surface, PRectangle &rc) { surface->MoveTo(x-3, ymid); surface->LineTo(x-3, ymid+2); } + } else if (style == INDIC_DIAGONAL) { + int x = rc.left; + while (x < rc.right) { + surface->MoveTo(x, rc.top+2); + int endX = x+3; + int endY = rc.top - 1; + if (endX > rc.right) { + endY += endX - rc.right; + endX = rc.right; + } + surface->LineTo(endX, endY); + x += 4; + } + } else if (style == INDIC_STRIKE) { + surface->MoveTo(rc.left, rc.top - 4); + surface->LineTo(rc.right, rc.top - 4); } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); diff --git a/contrib/src/stc/scintilla/src/KeyMap.cxx b/contrib/src/stc/scintilla/src/KeyMap.cxx index f339cd2750..d2a6660f3c 100644 --- a/contrib/src/stc/scintilla/src/KeyMap.cxx +++ b/contrib/src/stc/scintilla/src/KeyMap.cxx @@ -28,7 +28,7 @@ void KeyMap::Clear() { alloc = 0; } -void KeyMap::AssignCmdKey(int key, int modifiers, UINT msg) { +void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) { if ((len+1) >= alloc) { KeyToCommand *ktcNew = new KeyToCommand[alloc + 5]; if (!ktcNew) @@ -51,7 +51,7 @@ void KeyMap::AssignCmdKey(int key, int modifiers, UINT msg) { len++; } -UINT KeyMap::Find(int key, int modifiers) { +unsigned int KeyMap::Find(int key, int modifiers) { for (int i=0; i < len; i++) { if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) { return kmap[i].msg; @@ -61,51 +61,61 @@ UINT KeyMap::Find(int key, int modifiers) { } KeyToCommand KeyMap::MapDefault[] = { - VK_DOWN, SCI_NORM, SCI_LINEDOWN, - VK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND, - VK_UP, SCI_NORM, SCI_LINEUP, - VK_UP, SCI_SHIFT, SCI_LINEUPEXTEND, - VK_LEFT, SCI_NORM, SCI_CHARLEFT, - VK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND, - VK_LEFT, SCI_CTRL, SCI_WORDLEFT, - VK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND, - VK_RIGHT, SCI_NORM, SCI_CHARRIGHT, - VK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND, - VK_RIGHT, SCI_CTRL, SCI_WORDRIGHT, - VK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND, - VK_HOME, SCI_NORM, SCI_VCHOME, - VK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND, - VK_HOME, SCI_CTRL, SCI_DOCUMENTSTART, - VK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND, - VK_END, SCI_NORM, SCI_LINEEND, - VK_END, SCI_SHIFT, SCI_LINEENDEXTEND, - VK_END, SCI_CTRL, SCI_DOCUMENTEND, - VK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND, - VK_PRIOR, SCI_NORM, SCI_PAGEUP, - VK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND, - VK_NEXT, SCI_NORM, SCI_PAGEDOWN, - VK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND, - VK_DELETE, SCI_NORM, WM_CLEAR, - VK_DELETE, SCI_SHIFT, WM_CUT, - VK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT, - VK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE, - VK_INSERT, SCI_SHIFT, WM_PASTE, - VK_INSERT, SCI_CTRL, WM_COPY, - VK_ESCAPE, SCI_NORM, SCI_CANCEL, - VK_BACK, SCI_NORM, SCI_DELETEBACK, - VK_BACK, SCI_CTRL, SCI_DELWORDLEFT, - 'Z', SCI_CTRL, WM_UNDO, - 'Y', SCI_CTRL, SCI_REDO, - 'X', SCI_CTRL, WM_CUT, - 'C', SCI_CTRL, WM_COPY, - 'V', SCI_CTRL, WM_PASTE, - 'A', SCI_CTRL, SCI_SELECTALL, - VK_TAB, SCI_NORM, SCI_TAB, - VK_TAB, SCI_SHIFT, SCI_BACKTAB, - VK_RETURN, SCI_NORM, SCI_NEWLINE, - 'L', SCI_CTRL, SCI_FORMFEED, - VK_ADD, SCI_CTRL, SCI_ZOOMIN, - VK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT, - 0,0,0, + {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, + {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, + {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN}, + {SCK_UP, SCI_NORM, SCI_LINEUP}, + {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, + {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP}, + {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, + {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, + {SCK_LEFT, SCI_CTRL, SCI_WORDLEFT}, + {SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND}, + {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT}, + {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND}, + {SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT}, + {SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND}, + {SCK_HOME, SCI_NORM, SCI_VCHOME}, + {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND}, + {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART}, + {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, + {SCK_END, SCI_NORM, SCI_LINEEND}, + {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND}, + {SCK_END, SCI_CTRL, SCI_DOCUMENTEND}, + {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, + {SCK_PRIOR, SCI_NORM, SCI_PAGEUP}, + {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND}, + {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN}, + {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND}, + {SCK_DELETE, SCI_NORM, SCI_CLEAR}, + {SCK_DELETE, SCI_SHIFT, SCI_CUT}, + {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT}, + {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE}, + {SCK_INSERT, SCI_SHIFT, SCI_PASTE}, + {SCK_INSERT, SCI_CTRL, SCI_COPY}, + {SCK_ESCAPE, SCI_NORM, SCI_CANCEL}, + {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, + {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, + {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, + {SCK_BACK, SCI_ALT, SCI_UNDO}, + {'Z', SCI_CTRL, SCI_UNDO}, + {'Y', SCI_CTRL, SCI_REDO}, + {'X', SCI_CTRL, SCI_CUT}, + {'C', SCI_CTRL, SCI_COPY}, + {'V', SCI_CTRL, SCI_PASTE}, + {'A', SCI_CTRL, SCI_SELECTALL}, + {SCK_TAB, SCI_NORM, SCI_TAB}, + {SCK_TAB, SCI_SHIFT, SCI_BACKTAB}, + {SCK_RETURN, SCI_NORM, SCI_NEWLINE}, + {SCK_ADD, SCI_CTRL, SCI_ZOOMIN}, + {SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT}, + {SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM}, + //'L', SCI_CTRL, SCI_FORMFEED, + {'L', SCI_CTRL, SCI_LINECUT}, + {'L', SCI_CSHIFT, SCI_LINEDELETE}, + {'T', SCI_CTRL, SCI_LINETRANSPOSE}, + {'U', SCI_CTRL, SCI_LOWERCASE}, + {'U', SCI_CSHIFT, SCI_UPPERCASE}, + {0,0,0}, }; diff --git a/contrib/src/stc/scintilla/src/KeyMap.h b/contrib/src/stc/scintilla/src/KeyMap.h index 814f3aa3b7..c843104174 100644 --- a/contrib/src/stc/scintilla/src/KeyMap.h +++ b/contrib/src/stc/scintilla/src/KeyMap.h @@ -7,16 +7,17 @@ #define KEYTOCOMMAND_H #define SCI_NORM 0 -#define SCI_SHIFT SHIFT_PRESSED -#define SCI_CTRL LEFT_CTRL_PRESSED -#define SCI_ALT LEFT_ALT_PRESSED +#define SCI_SHIFT SCMOD_SHIFT +#define SCI_CTRL SCMOD_CTRL +#define SCI_ALT SCMOD_ALT #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) +#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) class KeyToCommand { public: int key; int modifiers; - UINT msg; + unsigned int msg; }; class KeyMap { @@ -28,8 +29,8 @@ public: KeyMap(); ~KeyMap(); void Clear(); - void AssignCmdKey(int key, int modifiers, UINT msg); - UINT Find(int key, int modifiers); // 0 returned on failure + void AssignCmdKey(int key, int modifiers, unsigned int msg); + unsigned int Find(int key, int modifiers); // 0 returned on failure }; #endif diff --git a/contrib/src/stc/scintilla/src/KeyWords.cxx b/contrib/src/stc/scintilla/src/KeyWords.cxx index 20f6762470..113ba222df 100644 --- a/contrib/src/stc/scintilla/src/KeyWords.cxx +++ b/contrib/src/stc/scintilla/src/KeyWords.cxx @@ -17,2201 +17,29 @@ #include "Scintilla.h" #include "SciLexer.h" -inline bool IsLeadByte(int codePage, char ch) { -#if PLAT_GTK - // TODO: support DBCS under GTK+ - return false; -#elif PLAT_WIN - return codePage && IsDBCSLeadByteEx(codePage, ch); -#elif PLAT_WX - return false; -#endif +LexerModule *LexerModule::base = 0; + +LexerModule::LexerModule(int language_, LexerFunction fn_) : + language(language_), fn(fn_) { + next = base; + base = this; } -inline bool iswordchar(char ch) { - return isalnum(ch) || ch == '.' || ch == '_'; -} - -inline bool iswordstart(char ch) { - return isalnum(ch) || ch == '_'; -} - -enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; - -static int IndentAmount(StylingContext &styler, int line, int *flags) { - int end = styler.Length(); - int spaceFlags = 0; - - // Determines the indentation level of the current line and also checks for consistent - // indentation compared to the previous line. - // Indentation is judged consistent when the indentation whitespace of each line lines - // the same or the indentation of one line is a prefix of the other. - - int pos = styler.LineStart(line); - char ch = styler[pos]; - int indent = 0; - bool inPrevPrefix = line > 0; - int posPrev = inPrevPrefix ? styler.LineStart(line-1) : 0; - while ((ch == ' ' || ch == '\t') && (pos < end)) { - if (inPrevPrefix) { - char chPrev = styler[posPrev++]; - if (chPrev == ' ' || chPrev == '\t') { - if (chPrev != ch) - spaceFlags |= wsInconsistent; - } else { - inPrevPrefix = false; - } +void LexerModule::Colourise(unsigned int startPos, int lengthDoc, int initStyle, + int language, WordList *keywordlists[], Accessor &styler) { + LexerModule *lm = base; + while (lm) { + if (lm->language == language) { + lm->fn(startPos, lengthDoc, initStyle, keywordlists, styler); + return; } - if (ch == ' ') { - spaceFlags |= wsSpace; - indent++; - } else { // Tab - spaceFlags |= wsTab; - if (spaceFlags & wsSpace) - spaceFlags |= wsSpaceTab; - indent = (indent / 8 + 1) * 8; - } - ch = styler[++pos]; + lm = lm->next; } - - *flags = spaceFlags; - indent += SC_FOLDLEVELBASE; - if (isspace(ch)) // Completely empty line - return indent | SC_FOLDLEVELWHITEFLAG; - else - return indent; -} - -inline bool isoperator(char ch) { - if (isalnum(ch)) - return false; - // '.' left out as it is used to make up numbers - if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || - ch == '(' || ch == ')' || ch == '-' || ch == '+' || - ch == '=' || ch == '|' || ch == '{' || ch == '}' || - ch == '[' || ch == ']' || ch == ':' || ch == ';' || - ch == '<' || ch == '>' || ch == ',' || ch == '/' || - ch == '?' || ch == '!' || ch == '.' || ch == '~') - return true; - return false; -} - -static void classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_C_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_C_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_C_WORD; - } - styler.ColourSegment(start, end, chAttr); -} - -static void ColouriseCppDoc(int codePage, int startPos, int length, - int initStyle, WordList &keywords, StylingContext &styler) { - - bool fold = styler.GetPropSet().GetInt("fold"); - int lineCurrent = styler.GetLine(startPos); - int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; - int levelCurrent = levelPrev; - - int state = initStyle; - char chPrev = ' '; - char chNext = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - int visChars = 0; - for (unsigned int i = startPos; i <= lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - - if ((fold) && ((ch == '\r' && chNext != '\n') || (ch == '\n'))) { - int lev = levelPrev; - if (visChars == 0) - lev |= SC_FOLDLEVELWHITEFLAG; - if ((levelCurrent > levelPrev) && (visChars > 0)) - lev |= SC_FOLDLEVELHEADERFLAG; - styler.SetLevel(lineCurrent, lev); - lineCurrent++; - visChars = 0; - levelPrev = levelCurrent; - } - if (!isspace(ch)) - visChars++; - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - i += 1; - continue; - } - - if (state == SCE_C_STRINGEOL) { - if (ch != '\r' && ch != '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } - if (state == SCE_C_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_WORD; - startSeg = i; - } else if (ch == '/' && chNext == '*') { - styler.ColourSegment(startSeg, i - 1, state); - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_C_COMMENTDOC; - else - state = SCE_C_COMMENT; - startSeg = i; - } else if (ch == '/' && chNext == '/') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRING; - startSeg = i; - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_CHARACTER; - startSeg = i; - } else if (ch == '#') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_PREPROCESSOR; - startSeg = i; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_C_OPERATOR); - startSeg = i + 1; - if ((ch == '{') || (ch == '}')) { - levelCurrent += (ch == '{') ? 1 : -1; - } - } - } else if (state == SCE_C_WORD) { - if (!iswordchar(ch)) { - classifyWordCpp(startSeg, i - 1, keywords, styler); - state = SCE_C_DEFAULT; - startSeg = i; - if (ch == '/' && chNext == '*') { - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_C_COMMENTDOC; - else - state = SCE_C_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } else if (ch == '\'') { - state = SCE_C_CHARACTER; - } else if (ch == '#') { - state = SCE_C_PREPROCESSOR; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - if ((ch == '{') || (ch == '}')) { - levelCurrent += (ch == '{') ? 1 : -1; - } - } - } - } else { - if (state == SCE_C_PREPROCESSOR) { - if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_COMMENT) { - if (ch == '/' && chPrev == '*' && ( - (i > startSeg + 2) || ((initStyle == SCE_C_COMMENT) && (startSeg == startPos)))) { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_C_COMMENTDOC) { - if (ch == '/' && chPrev == '*' && ( - (i > startSeg + 3) || ((initStyle == SCE_C_COMMENTDOC) && (startSeg == startPos)))) { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_C_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_STRING) { - if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRINGEOL; - startSeg = i; - } else if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_C_CHARACTER) { - if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRINGEOL; - startSeg = i; - } else if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } - if (state == SCE_C_DEFAULT) { // One of the above succeeded - if (ch == '/' && chNext == '*') { - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_C_COMMENTDOC; - else - state = SCE_C_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } else if (ch == '\'') { - state = SCE_C_CHARACTER; - } else if (ch == '#') { - state = SCE_C_PREPROCESSOR; - } else if (iswordstart(ch)) { - state = SCE_C_WORD; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - if ((ch == '{') || (ch == '}')) { - levelCurrent += (ch == '{') ? 1 : -1; - } - } - } - } - chPrev = ch; - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc - 1, state); - // Fill in the real level of the next line, keeping the current flags as they will be filled in later - if (fold) { - int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; - //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); - styler.SetLevel(lineCurrent, levelPrev | flagsNext); - - } -} - -inline bool isPerlOperator(char ch) { - if (isalnum(ch)) - return false; - // '.' left out as it is used to make up numbers - if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '\\' || - ch == '(' || ch == ')' || ch == '-' || ch == '+' || - ch == '=' || ch == '|' || ch == '{' || ch == '}' || - ch == '[' || ch == ']' || ch == ':' || ch == ';' || - ch == '<' || ch == '>' || ch == ',' || ch == '/' || - ch == '?' || ch == '!' || ch == '.' || ch == '~') - return true; - return false; -} - -static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_PL_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_PL_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_PL_WORD; - } - styler.ColourSegment(start, end, chAttr); - return chAttr; -} - -static bool isEndVar(char ch) { - return !isalnum(ch) && ch != '#' && ch != '$' && - ch != '_' && ch != '\''; -} - -static bool isMatch(StylingContext &styler, int lengthDoc, int pos, const char *val) { - if ((pos + static_cast(strlen(val))) >= lengthDoc) { - return false; - } - while (*val) { - if (*val != styler[pos++]) { - return false; - } - val++; - } - return true; -} - -static bool isOKQuote(char ch) { - if (isalnum(ch)) - return false; - if (isspace(ch)) - return false; - if (iscntrl(ch)) - return false; - return true; -} - -static char opposite(char ch) { - if (ch == '(') - return ')'; - if (ch == '[') - return ']'; - if (ch == '{') - return '}'; - if (ch == '<') - return '>'; - return ch; -} - -static void ColourisePerlDoc(int codePage, int startPos, int length, int initStyle, - WordList &keywords, StylingContext &styler) { - char sooked[100]; - int quotes = 0; - char quoteDown = 'd'; - char quoteUp = 'd'; - int quoteRep = 1; - int sookedpos = 0; - bool preferRE = true; - sooked[sookedpos] = '\0'; - int state = initStyle; - int lengthDoc = startPos + length; - // If in a long distance lexical state, seek to the beginning to find quote characters - if (state == SCE_PL_HERE || state == SCE_PL_REGEX || - state == SCE_PL_REGSUBST || state == SCE_PL_LONGQUOTE) { - while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) { - startPos--; - } - state = SCE_PL_DEFAULT; - } - styler.StartAt(startPos); - char chPrev = ' '; - char chNext = styler[startPos]; - int startSeg = startPos; - for (int i = startPos; i <= lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - char chNext2 = styler.SafeGetCharAt(i + 2); - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - i += 1; - continue; - } - - if (state == SCE_PL_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - if (ch == 's' && !isalnum(chNext)) { - state = SCE_PL_REGSUBST; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 2; - startSeg = i; - } else if (ch == 'm' && !isalnum(chNext)) { - state = SCE_PL_REGEX; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 1; - startSeg = i; - } else if (ch == 't' && chNext == 'r' && !isalnum(chNext2)) { - state = SCE_PL_REGSUBST; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 2; - startSeg = i; - i++; - chNext = chNext2; - } else if (ch == 'q' && (chNext == 'q' || chNext == 'r' || chNext == 'w' || chNext == 'x') && !isalnum(chNext2)) { - state = SCE_PL_LONGQUOTE; - startSeg = i; - i++; - chNext = chNext2; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 1; - } else { - state = SCE_PL_WORD; - startSeg = i; - preferRE = false; - } - } else if (ch == '#') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_STRING; - startSeg = i; - } else if (ch == '\'') { - if (chPrev == '&') { - // Archaic call - styler.ColourSegment(i, i, state); - startSeg = i + 1; - } else { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_CHARACTER; - startSeg = i; - } - } else if (ch == '`') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_BACKTICKS; - startSeg = i; - } else if (ch == '$') { - preferRE = false; - styler.ColourSegment(startSeg, i - 1, state); - if (isalnum(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { - state = SCE_PL_SCALAR; - startSeg = i; - } else if (chNext != '{' && chNext != '[') { - styler.ColourSegment(i - 1, i, SCE_PL_SCALAR); - i++; - startSeg = i + 1; - ch = ' '; - chNext = ' '; - } else { - styler.ColourSegment(i, i, SCE_PL_SCALAR); - startSeg = i + 1; - } - } else if (ch == '@') { - preferRE = false; - styler.ColourSegment(startSeg, i - 1, state); - if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { - state = SCE_PL_ARRAY; - startSeg = i; - } else if (chNext != '{' && chNext != '[') { - styler.ColourSegment(i - 1, i, SCE_PL_ARRAY); - i++; - startSeg = i + 1; - ch = ' '; - } else { - styler.ColourSegment(i, i, SCE_PL_ARRAY); - startSeg = i + 1; - } - } else if (ch == '%') { - preferRE = false; - styler.ColourSegment(startSeg, i - 1, state); - if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { - state = SCE_PL_HASH; - startSeg = i; - } else if (chNext != '{' && chNext != '[') { - styler.ColourSegment(i - 1, i, SCE_PL_HASH); - i++; - startSeg = i + 1; - ch = ' '; - } else { - styler.ColourSegment(i, i, SCE_PL_HASH); - startSeg = i + 1; - } - } else if (ch == '*') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_SYMBOLTABLE; - startSeg = i; - } else if (ch == '/' && preferRE) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_REGEX; - quoteUp = '/'; - quoteDown = '/'; - quotes = 1; - quoteRep = 1; - startSeg = i; - } else if (ch == '<' && chNext == '<') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_HERE; - startSeg = i; - i++; - ch = chNext; - chNext = chNext2; - quotes = 0; - sookedpos = 0; - sooked[sookedpos] = '\0'; - } else if (ch == '=' && isalpha(chNext)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_POD; - startSeg = i; - quotes = 0; - sookedpos = 0; - sooked[sookedpos] = '\0'; - } else if (isPerlOperator(ch)) { - if (ch == ')' || ch == ']') - preferRE = false; - else - preferRE = true; - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_PL_OPERATOR); - startSeg = i + 1; - } - } else if (state == SCE_PL_WORD) { - if (!iswordchar(ch) && ch != '\'') { // Archaic Perl has quotes inside names - if (isMatch(styler, lengthDoc, startSeg, "__DATA__")) { - styler.ColourSegment(startSeg, i, SCE_PL_DATASECTION); - state = SCE_PL_DATASECTION; - } else if (isMatch(styler, lengthDoc, startSeg, "__END__")) { - styler.ColourSegment(startSeg, i, SCE_PL_DATASECTION); - state = SCE_PL_DATASECTION; - } else { - if (classifyWordPerl(startSeg, i - 1, keywords, styler) == SCE_PL_WORD) - preferRE = true; - state = SCE_PL_DEFAULT; - startSeg = i; - if (ch == '#') { - state = SCE_PL_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_PL_STRING; - } else if (ch == '\'') { - state = SCE_PL_CHARACTER; - } else if (ch == '<' && chNext == '<') { - state = SCE_PL_HERE; - quotes = 0; - startSeg = i; - sookedpos = 0; - sooked[sookedpos] = '\0'; - } else if (isPerlOperator(ch)) { - if (ch == ')' || ch == ']') - preferRE = false; - else - preferRE = true; - styler.ColourSegment(startSeg, i, SCE_PL_OPERATOR); - state = SCE_PL_DEFAULT; - startSeg = i + 1; - } - } - } - } else { - if (state == SCE_PL_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_DEFAULT; - startSeg = i; - } - } else if (state == SCE_PL_HERE) { - if (isalnum(ch) && quotes < 2) { - sooked[sookedpos++] = ch; - sooked[sookedpos] = '\0'; - if (quotes == 0) - quotes = 1; - } else { - quotes++; - } - - if (quotes > 1 && isMatch(styler, lengthDoc, i, sooked)) { - styler.ColourSegment(startSeg, i + sookedpos - 1, SCE_PL_HERE); - state = SCE_PL_DEFAULT; - i += sookedpos; - startSeg = i; - chNext = ' '; - } - } else if (state == SCE_PL_STRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_PL_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_PL_CHARACTER) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_PL_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_PL_BACKTICKS) { - if (ch == '`') { - styler.ColourSegment(startSeg, i, state); - state = SCE_PL_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_PL_POD) { - if (ch == '=') { - if (isMatch(styler, lengthDoc, i, "=cut")) { - styler.ColourSegment(startSeg, i - 1 + 4, state); - i += 4; - startSeg = i; - state = SCE_PL_DEFAULT; - chNext = ' '; - ch = ' '; - } - } - } else if (state == SCE_PL_SCALAR) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_ARRAY) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_HASH) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_SYMBOLTABLE) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_REF) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_REGEX) { - if (!quoteUp && !isspace(ch)) { - quoteUp = ch; - quoteDown = opposite(ch); - quotes++; - } else { - if (ch == quoteDown && chPrev != '\\') { - quotes--; - if (quotes == 0) { - quoteRep--; - if (quoteUp == quoteDown) { - quotes++; - } - } - if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - } else if (ch == quoteUp && chPrev != '\\') { - quotes++; - } else if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - } - } else if (state == SCE_PL_REGSUBST) { - if (!quoteUp && !isspace(ch)) { - quoteUp = ch; - quoteDown = opposite(ch); - quotes++; - } else { - if (ch == quoteDown && chPrev != '\\') { - quotes--; - if (quotes == 0) { - quoteRep--; - } - if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - if (quoteUp == quoteDown) { - quotes++; - } - } else if (ch == quoteUp && chPrev != '\\') { - quotes++; - } else if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - } - } else if (state == SCE_PL_LONGQUOTE) { - if (!quoteDown && !isspace(ch)) { - quoteUp = ch; - quoteDown = opposite(quoteUp); - quotes++; - } else if (ch == quoteDown) { - quotes--; - if (quotes == 0) { - quoteRep--; - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - if (quoteUp == quoteDown) { - quotes++; - } - } - } else if (ch == quoteUp) { - quotes++; - } - } - - if (state == SCE_PL_DEFAULT) { // One of the above succeeded - if (ch == '#') { - state = SCE_PL_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_PL_STRING; - } else if (ch == '\'') { - state = SCE_PL_CHARACTER; - } else if (iswordstart(ch)) { - state = SCE_PL_WORD; - preferRE = false; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_PL_OPERATOR); - startSeg = i + 1; - } - } - } - chPrev = ch; - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc, state); -} - - -static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } - char chAttr = SCE_C_DEFAULT; - if (wordIsNumber) - chAttr = SCE_C_NUMBER; - else { - if (keywords.InList(s)) { - chAttr = SCE_C_WORD; - if (strcmp(s, "rem") == 0) - chAttr = SCE_C_COMMENTLINE; - } - } - styler.ColourSegment(start, end, chAttr); - if (chAttr == SCE_C_COMMENTLINE) - return SCE_C_COMMENTLINE; - else - return SCE_C_DEFAULT; -} - -static void ColouriseVBDoc(int codePage, int startPos, int length, int initStyle, - WordList &keywords, StylingContext &styler) { - int state = initStyle; - char chNext = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - for (int i = startPos; i < lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - i += 1; - continue; - } - - if (state == SCE_C_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_WORD; - startSeg = i; - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRING; - startSeg = i; - } - } else if (state == SCE_C_WORD) { - if (!iswordchar(ch)) { - state = classifyWordVB(startSeg, i - 1, keywords, styler); - if (state == SCE_C_DEFAULT) { - startSeg = i; - if (ch == '\'') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } - } - } - } else { - if (state == SCE_C_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_STRING) { - // VB doubles quotes to preserve them - if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } - if (state == SCE_C_DEFAULT) { // One of the above succeeded - if (ch == '\'') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } else if (iswordstart(ch)) { - state = SCE_C_WORD; - } - } - } - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc, state); -} - -static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler, char *prevWord) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_P_IDENTIFIER; - if (0 == strcmp(prevWord, "class")) - chAttr = SCE_P_CLASSNAME; - else if (0 == strcmp(prevWord, "def")) - chAttr = SCE_P_DEFNAME; - else if (wordIsNumber) - chAttr = SCE_P_NUMBER; - else if (keywords.InList(s)) - chAttr = SCE_P_WORD; - styler.ColourSegment(start, end, chAttr); - strcpy(prevWord, s); -} - -static void ColourisePyDoc(int codePage, int startPos, int length, int initStyle, WordList &keywords, StylingContext &styler) { - //Platform::DebugPrintf("Python coloured\n"); - bool fold = styler.GetPropSet().GetInt("fold"); - int whingeLevel = styler.GetPropSet().GetInt("tab.timmy.whinge.level"); - char prevWord[200]; - prevWord[0] = '\0'; - if (length == 0) - return ; - int lineCurrent = styler.GetLine(startPos); - int spaceFlags = 0; - // TODO: Need to check previous line for indentation for both folding and bad indentation - int indentCurrent = IndentAmount(styler, lineCurrent, &spaceFlags); - - int state = initStyle & 31; - char chPrev = ' '; - char chPrev2 = ' '; - char chNext = styler[startPos]; - char chNext2 = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - bool atStartLine = true; - for (int i = startPos; i <= lengthDoc; i++) { - - if (atStartLine) { - if (whingeLevel == 1) { - styler.SetFlags((spaceFlags & wsInconsistent) ? 64 : 0, state); - } else if (whingeLevel == 2) { - styler.SetFlags((spaceFlags & wsSpaceTab) ? 64 : 0, state); - } else if (whingeLevel == 3) { - styler.SetFlags((spaceFlags & wsSpace) ? 64 : 0, state); - } else if (whingeLevel == 4) { - styler.SetFlags((spaceFlags & wsTab) ? 64 : 0, state); - } - atStartLine = false; - } - - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - chNext2 = styler.SafeGetCharAt(i + 2); - - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) { - // Perform colourisation of white space and triple quoted strings at end of each line to allow - // tab marking to work inside white space and triple quoted strings - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - } - - int lev = indentCurrent; - int indentNext = IndentAmount(styler, lineCurrent + 1, &spaceFlags); - if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { - // Only non whitespace lines can be headers - if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { - lev |= SC_FOLDLEVELHEADERFLAG; - } - } - indentCurrent = indentNext; - if (fold) { - styler.SetLevel(lineCurrent, lev); - } - lineCurrent++; - atStartLine = true; - } - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - chPrev2 = ' '; - i += 1; - continue; - } - - if (state == SCE_P_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_P_WORD; - startSeg = i; - } else if (ch == '#') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_P_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_P_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_STRING; - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_P_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_P_OPERATOR); - startSeg = i + 1; - } - } else if (state == SCE_P_WORD) { - if (!iswordchar(ch)) { - classifyWordPy(startSeg, i - 1, keywords, styler, prevWord); - state = SCE_P_DEFAULT; - startSeg = i; - if (ch == '#') { - state = SCE_P_COMMENTLINE; - } else if (ch == '\"') { - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_P_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_STRING; - } - } else if (ch == '\'') { - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_P_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_P_OPERATOR); - startSeg = i + 1; - } - } - } else { - if (state == SCE_P_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_P_DEFAULT; - startSeg = i; - } - } else if (state == SCE_P_STRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_P_CHARACTER) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_P_TRIPLE) { - if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_P_TRIPLEDOUBLE) { - if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } - } - chPrev2 = chPrev; - chPrev = ch; - } - if (startSeg <= lengthDoc) { - if (state == SCE_P_DEFAULT) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_WORD) { - classifyWordPy(startSeg, lengthDoc, keywords, styler, prevWord); - } else if (state == SCE_P_COMMENTLINE) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_STRING) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_CHARACTER) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_TRIPLE) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_TRIPLEDOUBLE) { - styler.ColourSegment(startSeg, lengthDoc, state); - } - } -} - -static void ColouriseBatchLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - if (0 == strncmp(lineBuffer, "REM", 3)) { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (0 == strncmp(lineBuffer, "rem", 3)) { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (0 == strncmp(lineBuffer, "SET", 3)) { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if (0 == strncmp(lineBuffer, "set", 3)) { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if (lineBuffer[0] == ':') { - styler.ColourSegment(0, lengthLine - 1, 3); - } else { - styler.ColourSegment(0, lengthLine - 1, 0); - } -} - -static void ColouriseBatchDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i < startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - ColouriseBatchLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColouriseBatchLine(lineBuffer, linePos, styler); -} - -enum { eScriptNone, eScriptJS, eScriptVBS, eScriptPython }; -static int segIsScriptingIndicator(StylingContext &styler, unsigned int start, unsigned int end, int prevValue) { - char s[100]; - s[0] = '\0'; - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } -Platform::DebugPrintf("Scripting indicator [%s]\n", s); - if (strstr(s, "vbs")) - return eScriptVBS; - if (strstr(s, "pyth")) - return eScriptPython; - if (strstr(s, "javas")) - return eScriptJS; - if (strstr(s, "jscr")) - return eScriptJS; - - return prevValue; -} - -static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') || - (styler[start] == '-') || (styler[start] == '#'); - char chAttr = SCE_H_ATTRIBUTEUNKNOWN; - if (wordIsNumber) { - chAttr = SCE_H_NUMBER; - } else { - char s[100]; - s[0] = '\0'; - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } - if (keywords.InList(s)) - chAttr = SCE_H_ATTRIBUTE; - } - styler.ColourTo(end, chAttr); -} - -static int classifyTagHTML(unsigned int start, unsigned int end, - WordList &keywords, StylingContext &styler) { - char s[100]; - // Copy after the '<' - unsigned int i = 0; - for (int cPos=start; cPos <= end && i < 30; cPos++) { - char ch = styler[cPos]; - if (ch != '<') - s[i++] = tolower(ch); - } - s[i] = '\0'; - char chAttr = SCE_H_TAGUNKNOWN; - if (s[0] == '!' && s[1] == '-' && s[2] == '-') { //Comment - chAttr = SCE_H_COMMENT; - } else if (s[0] == '/') { // Closing tag - if (keywords.InList(s + 1)) - chAttr = SCE_H_TAG; - } else { - if (keywords.InList(s)) { - chAttr = SCE_H_TAG; - if (0 == strcmp(s, "script")) - chAttr = SCE_H_SCRIPT; - } - } - styler.ColourTo(end, chAttr); - return chAttr; -} - -static void classifyWordHTJS(unsigned int start, unsigned int end, - WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_HJ_WORD; - if (wordIsNumber) - chAttr = SCE_HJ_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_HJ_KEYWORD; - } - styler.ColourTo(end, chAttr); -} - -static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } - char chAttr = SCE_HB_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_HB_NUMBER; - else { - if (keywords.InList(s)) { - chAttr = SCE_HB_WORD; - if (strcmp(s, "rem") == 0) - chAttr = SCE_HB_COMMENTLINE; - } - } - styler.ColourTo(end, chAttr); - if (chAttr == SCE_HB_COMMENTLINE) - return SCE_HB_COMMENTLINE; - else - return SCE_HB_DEFAULT; -} - -static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler, char *prevWord) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_HP_IDENTIFIER; - if (0 == strcmp(prevWord, "class")) - chAttr = SCE_HP_CLASSNAME; - else if (0 == strcmp(prevWord, "def")) - chAttr = SCE_HP_DEFNAME; - else if (wordIsNumber) - chAttr = SCE_HP_NUMBER; - else if (keywords.InList(s)) - chAttr = SCE_HP_WORD; - styler.ColourTo(end, chAttr); - strcpy(prevWord, s); -} - -inline bool ishtmlwordchar(char ch) { - return isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'; -} - -static bool InTagState(int state) { - return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || - state == SCE_H_SCRIPT || - state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || - state == SCE_H_NUMBER || state == SCE_H_OTHER || - state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; -} - -static bool isLineEnd(char ch) { - return ch == '\r' || ch == '\n'; -} - -static void ColouriseHyperTextDoc(int codePage, int startPos, int length, - int initStyle, WordList &keywords, WordList &keywords2, WordList &keywords3, WordList &keywords4, - StylingContext &styler) { - - styler.StartAt(startPos, 63); - bool lastTagWasScript = false; - char prevWord[200]; - prevWord[0] = '\0'; - int scriptLanguage = eScriptJS; - int state = initStyle; - // If inside a tag, it may be a script tage, so reread from the start to ensure any language tas are seen - if (InTagState(state)) { - while ((startPos > 1) && (InTagState(styler.StyleAt(startPos - 1)))) { - startPos--; - } - state = SCE_H_DEFAULT; - } - styler.StartAt(startPos, 63); - - int lineState = eScriptVBS; - int lineCurrent = styler.GetLine(startPos); - if (lineCurrent > 0) - lineState = styler.GetLineState(lineCurrent); - int defaultScript = lineState &0xff; - int beforeASP = (lineState >> 8) &0xff; - int inASP = (lineState >> 16) &0xff; - - char chPrev = ' '; - char chPrev2 = ' '; - styler.StartSegment(startPos); - int lengthDoc = startPos + length; - for (int i = startPos; i <= lengthDoc; i++) { - char ch = styler[i]; - char chNext = styler.SafeGetCharAt(i + 1); - char chNext2 = styler.SafeGetCharAt(i + 2); - - if (IsLeadByte(codePage, ch)) { // dbcs - chPrev2 = ' '; - chPrev = ' '; - i += 1; - continue; - } - - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - // New line -> record any line state onto /next/ line - lineCurrent++; - styler.SetLineState(lineCurrent, - defaultScript | (beforeASP << 8) | (inASP << 16)); - } - - // Handle ASP even within other constructs as it is a preprocessor - if ((ch == '<') && (chNext == '%')) { - beforeASP = state; - styler.ColourTo(i - 1, state); - if (chNext2 == '@') { - styler.ColourTo(i + 2, SCE_H_ASP); - state = SCE_H_ASPAT; - i+=2; - } else { - if (defaultScript == eScriptVBS) - state = SCE_HB_START; - else if (defaultScript == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - if (chNext2 == '=') { - styler.ColourTo(i + 2, SCE_H_ASP); - i+=2; - } else { - styler.ColourTo(i + 1, SCE_H_ASP); - i++; - } - } - inASP = 1; - continue; - } - if (inASP && (ch == '%') && (chNext == '>')) { - if (state == SCE_H_ASPAT) - defaultScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i-1, defaultScript); - // Bounce out of any ASP mode - styler.ColourTo(i - 1, state); - //if (state == SCE_H_ASPAT) - // styler.ColourTo(i+1, SCE_H_ASPAT); - //else - styler.ColourTo(i+1, SCE_H_ASP); - i++; - state = beforeASP; - beforeASP = SCE_H_DEFAULT; - inASP = 0; - continue; - } - - if (state == SCE_H_DEFAULT) { - if (ch == '<') { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - if (chNext == '?') { - styler.ColourTo(i + 1, SCE_H_XMLSTART); - i++; - ch = chNext; - } - } else if (ch == '&') { - styler.ColourTo(i - 1, SCE_H_DEFAULT); - state = SCE_H_ENTITY; - } - } else if (state == SCE_H_COMMENT) { - if ((ch == '>') && (chPrev == '-')) { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_ENTITY) { - if (ch == ';') { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_TAGUNKNOWN) { - if (!ishtmlwordchar(ch) && ch != '/' && ch != '-') { - int eClass = classifyTagHTML(styler.GetStartSegment(), i - 1, keywords, styler); - lastTagWasScript = eClass == SCE_H_SCRIPT; - if (lastTagWasScript) { - scriptLanguage = eScriptJS; - eClass = SCE_H_TAG; - } - if (ch == '>') { - styler.ColourTo(i, SCE_H_TAG); - if (lastTagWasScript) { - if (scriptLanguage == eScriptVBS) - state = SCE_HB_START; - else if (scriptLanguage == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - } else { - state = SCE_H_DEFAULT; - } - } else { - if (eClass == SCE_H_COMMENT) { - state = SCE_H_COMMENT; - } else { - state = SCE_H_OTHER; - } - } - } - } else if (state == SCE_H_ATTRIBUTE) { - if (!ishtmlwordchar(ch) && ch != '/' && ch != '-') { - if (lastTagWasScript) - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i-1, scriptLanguage); - classifyAttribHTML(styler.GetStartSegment(), i - 1, keywords, styler); - if (ch == '>') { - styler.ColourTo(i, SCE_H_TAG); - if (lastTagWasScript) { - if (scriptLanguage == eScriptVBS) - state = SCE_HB_START; - else if (scriptLanguage == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - } else { - state = SCE_H_DEFAULT; - } - } else { - state = SCE_H_OTHER; - } - } - } else if (state == SCE_H_ASP) { - if ((ch == '>') && (chPrev == '%')) { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_ASPAT) { - if ((ch == '>') && (chPrev == '%')) { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_OTHER) { - if (ch == '>') { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_H_TAG); - if (lastTagWasScript) { - if (scriptLanguage == eScriptVBS) - state = SCE_HB_START; - else if (scriptLanguage == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - } else { - state = SCE_H_DEFAULT; - } - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - state = SCE_H_DOUBLESTRING; - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - state = SCE_H_SINGLESTRING; - } else if (ch == '/' && chNext == '>') { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_TAGEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } else if (ch == '?' && chNext == '>') { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_XMLEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } else if (ishtmlwordchar(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_H_ATTRIBUTE; - } - } else if (state == SCE_H_DOUBLESTRING) { - if (ch == '\"') { - if (lastTagWasScript) - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); - styler.ColourTo(i, SCE_H_DOUBLESTRING); - state = SCE_H_OTHER; - } - } else if (state == SCE_H_SINGLESTRING) { - if (ch == '\'') { - if (lastTagWasScript) - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); - styler.ColourTo(i, SCE_H_SINGLESTRING); - state = SCE_H_OTHER; - } - } else if (state == SCE_HJ_DEFAULT || state == SCE_HJ_START) { - if (iswordstart(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HJ_WORD; - } else if (ch == '/' && chNext == '*') { - styler.ColourTo(i - 1, state); - if (chNext2 == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_SINGLESTRING; - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_COMMENTLINE; - } else if (isoperator(ch)) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_HJ_SYMBOLS); - state = SCE_HJ_DEFAULT; - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HJ_START) { - styler.ColourTo(i - 1, state); - state = SCE_HJ_DEFAULT; - } - } - } else if (state == SCE_HJ_WORD) { - if (!iswordchar(ch)) { - classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler); - //styler.ColourTo(i - 1, eHTJSKeyword); - state = SCE_HJ_DEFAULT; - if (ch == '/' && chNext == '*') { - if (chNext2 == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_HJ_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - state = SCE_HJ_SINGLESTRING; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HJ_SYMBOLS); - state = SCE_HJ_DEFAULT; - } - } - } else if (state == SCE_HJ_COMMENT) { - if (ch == '/' && chPrev == '*') { - state = SCE_HJ_DEFAULT; - styler.ColourTo(i, SCE_HJ_COMMENT); - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_TAGEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } - } else if (state == SCE_HJ_COMMENTDOC) { - if (ch == '/' && chPrev == '*') { - state = SCE_HJ_DEFAULT; - styler.ColourTo(i, SCE_HJ_COMMENTDOC); - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_TAGEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } - } else if (state == SCE_HJ_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, SCE_HJ_COMMENTLINE); - state = SCE_HJ_DEFAULT; - } else if ((ch == '<') && (chNext == '/')) { - // Common to hide end script tag in comment - styler.ColourTo(i - 1, SCE_HJ_COMMENTLINE); - state = SCE_H_TAGUNKNOWN; - } - } else if (state == SCE_HJ_DOUBLESTRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - } - } else if (ch == '\"') { - styler.ColourTo(i, SCE_HJ_DOUBLESTRING); - state = SCE_HJ_DEFAULT; - i++; - ch = chNext; - } else if (isLineEnd(ch)) { - styler.ColourTo(i-1, state); - state = SCE_HJ_STRINGEOL; - } - } else if (state == SCE_HJ_SINGLESTRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - } - } else if (ch == '\'') { - styler.ColourTo(i, SCE_HJ_SINGLESTRING); - state = SCE_HJ_DEFAULT; - i++; - ch = chNext; - } else if (isLineEnd(ch)) { - styler.ColourTo(i-1, state); - state = SCE_HJ_STRINGEOL; - } - } else if (state == SCE_HJ_STRINGEOL) { - if (!isLineEnd(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HJ_DEFAULT; - } - } else if (state == SCE_HB_DEFAULT || state == SCE_HB_START) { - if (iswordstart(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HB_WORD; - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - state = SCE_HB_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - state = SCE_HB_STRING; - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, state); - state = SCE_HB_COMMENTLINE; - } else if (isoperator(ch)) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_HB_DEFAULT); - state = SCE_HB_DEFAULT; - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HB_START) { - styler.ColourTo(i - 1, state); - state = SCE_HB_DEFAULT; - } - } - } else if (state == SCE_HB_WORD) { - if (!iswordchar(ch)) { - state = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler); - if (state == SCE_HB_DEFAULT) { - if (ch == '\"') { - state = SCE_HB_STRING; - } else if (ch == '\'') { - state = SCE_HB_COMMENTLINE; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HB_DEFAULT); - state = SCE_HB_DEFAULT; - } - } - } - } else if (state == SCE_HB_STRING) { - if (ch == '\"') { - styler.ColourTo(i, state); - state = SCE_HB_DEFAULT; - i++; - ch = chNext; - } else if (ch == '\r' || ch == '\n') { - styler.ColourTo(i-1, state); - state = SCE_HB_STRINGEOL; - } - } else if (state == SCE_HB_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, state); - state = SCE_HB_DEFAULT; - } else if ((ch == '<') && (chNext == '/')) { - // Common to hide end script tag in comment - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } - } else if (state == SCE_HB_STRINGEOL) { - if (!isLineEnd(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HB_DEFAULT; - } - } else if (state == SCE_HP_DEFAULT || state == SCE_HP_START) { - if (iswordstart(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HP_WORD; - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, state); - state = SCE_HP_COMMENTLINE; - } else if (ch == '#') { - styler.ColourTo(i - 1, state); - state = SCE_HP_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_HP_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_STRING; - } - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_HP_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_HP_OPERATOR); - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HP_START) { - styler.ColourTo(i - 1, state); - state = SCE_HP_DEFAULT; - } - } - } else if (state == SCE_HP_WORD) { - if (!iswordchar(ch)) { - classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord); - state = SCE_HP_DEFAULT; - if (ch == '#') { - state = SCE_HP_COMMENTLINE; - } else if (ch == '\"') { - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_HP_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_STRING; - } - } else if (ch == '\'') { - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_HP_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HP_OPERATOR); - } - } - } else { - if (state == SCE_HP_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_STRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_CHARACTER) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_TRIPLE) { - if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_TRIPLEDOUBLE) { - if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } - } - if (state == SCE_HB_DEFAULT) { // One of the above succeeded - if (ch == '\"') { - state = SCE_HB_STRING; - } else if (ch == '\'') { - state = SCE_HB_COMMENTLINE; - } else if (iswordstart(ch)) { - state = SCE_HB_WORD; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HB_DEFAULT); - } - } - if (state == SCE_HJ_DEFAULT) { // One of the above succeeded - if (ch == '/' && chNext == '*') { - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_HJ_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - state = SCE_HJ_SINGLESTRING; - } else if (iswordstart(ch)) { - state = SCE_HJ_WORD; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HJ_SYMBOLS); - } - } - chPrev2 = chPrev; - chPrev = ch; - } - styler.ColourTo(lengthDoc - 1, state); -} - -static void ColourisePropsLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - int i = 0; - while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces - i++; - if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (lineBuffer[i] == '[') { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if (lineBuffer[i] == '@') { - styler.ColourSegment(0, i, 4); - if (lineBuffer[++i] == '=') - styler.ColourSegment(i, i, 3); - if (++i < lengthLine) - styler.ColourSegment(i, lengthLine - 1, 0); - } else { - while (lineBuffer[i] != '=' && (i < lengthLine)) // Search the '=' character - i++; - if (lineBuffer[i] == '=') { - styler.ColourSegment(0, i - 1, 0); - styler.ColourSegment(i, i, 3); - if (++i < lengthLine) - styler.ColourSegment(i, lengthLine - 1, 0); - } else - styler.ColourSegment(0, lengthLine - 1, 0); - } -} - -static void ColourisePropsDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i <= startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - lineBuffer[linePos] = '\0'; - ColourisePropsLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColourisePropsLine(lineBuffer, linePos, styler); -} - -static void ColouriseMakeLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - int i = 0; - while (isspace(lineBuffer[i]) && (i < lengthLine)) - i++; - if (lineBuffer[i] == '#' || lineBuffer[i] == '!') { - styler.ColourSegment(0, lengthLine - 1, 1); - } else { - styler.ColourSegment(0, lengthLine - 1, 0); - } -} - -static void ColouriseMakeDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i <= startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - ColouriseMakeLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColouriseMakeLine(lineBuffer, linePos, styler); -} - -static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - if (lineBuffer[0] == '>') { - // Command or return status - styler.ColourSegment(0, lengthLine - 1, 4); - } else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) { - // Borland error message - styler.ColourSegment(0, lengthLine - 1, 5); - } else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) { - // Borland warning message - styler.ColourSegment(0, lengthLine - 1, 5); - } else { - // Look for ::message - // Look for (line)message - // Look for (line,pos)message - int state = 0; - for (int i = 0; i < lengthLine; i++) { - if (state == 0 && lineBuffer[i] == ':' && isdigit(lineBuffer[i + 1])) { - state = 1; - } else if (state == 0 && lineBuffer[i] == '(') { - state = 10; - } else if (state == 1 && isdigit(lineBuffer[i])) { - state = 2; - } else if (state == 2 && lineBuffer[i] == ':') { - state = 3; - break; - } else if (state == 2 && !isdigit(lineBuffer[i])) { - state = 99; - } else if (state == 10 && isdigit(lineBuffer[i])) { - state = 11; - } else if (state == 11 && lineBuffer[i] == ',') { - state = 14; - } else if (state == 11 && lineBuffer[i] == ')') { - state = 12; - break; - } else if (state == 12 && lineBuffer[i] == ':') { - state = 13; - } else if (state == 14 && lineBuffer[i] == ')') { - state = 15; - break; - } else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) { - state = 99; - } - } - if (state == 3) { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if ((state == 14) || (state == 15)) { - styler.ColourSegment(0, lengthLine - 1, 3); - } else { - styler.ColourSegment(0, lengthLine - 1, 0); - } - } -} - -static void ColouriseErrorListDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i <= startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - ColouriseErrorListLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColouriseErrorListLine(lineBuffer, linePos, styler); -} - -static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = toupper(styler[start + i]); - s[i + 1] = '\0'; - } - char chAttr = SCE_C_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_C_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_C_WORD; - } - styler.ColourSegment(start, end, chAttr); -} - -static void ColouriseSQLDoc(int codePage, int startPos, int length, - int initStyle, WordList &keywords, StylingContext &styler) { - - bool fold = styler.GetPropSet().GetInt("fold"); - int lineCurrent = styler.GetLine(startPos); - int spaceFlags = 0; - int indentCurrent = 0; - - int state = initStyle; - char chPrev = ' '; - char chNext = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - bool prevCr = false; - for (int i = startPos; i <= lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - indentCurrent = IndentAmount(styler, lineCurrent, &spaceFlags); - int lev = indentCurrent; - if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { - // Only non whitespace lines can be headers - int indentNext = IndentAmount(styler, lineCurrent + 1, &spaceFlags); - if (indentCurrent < (indentNext & ~SC_FOLDLEVELWHITEFLAG)) { - lev |= SC_FOLDLEVELHEADERFLAG; - } - } - if (fold) { - styler.SetLevel(lineCurrent, lev); - } - } - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - i += 1; - continue; - } - - if (state == SCE_C_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_WORD; - startSeg = i; - } else if (ch == '/' && chNext == '*') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENT; - startSeg = i; - } else if (ch == '-' && chNext == '-') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENTLINE; - startSeg = i; - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRING; - startSeg = i; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_C_OPERATOR); - startSeg = i + 1; - } - } else if (state == SCE_C_WORD) { - if (!iswordchar(ch)) { - classifyWordSQL(startSeg, i - 1, keywords, styler); - state = SCE_C_DEFAULT; - startSeg = i; - if (ch == '/' && chNext == '*') { - state = SCE_C_COMMENT; - } else if (ch == '-' && chNext == '-') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\'') { - state = SCE_C_STRING; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - } - } - } else { - if (state == SCE_C_COMMENT) { - if (ch == '/' && chPrev == '*' && ( - (i > startSeg + 2) || ((initStyle == SCE_C_COMMENT) && (startSeg == startPos)))) { - state = SCE_C_DEFAULT; - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - } - } else if (state == SCE_C_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_STRING) { - if (ch == '\'') { - if ( chNext == '\'' ) { - i++; - } else { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - startSeg = i; - } - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } - if (state == SCE_C_DEFAULT) { // One of the above succeeded - if (ch == '/' && chNext == '*') { - state = SCE_C_COMMENT; - } else if (ch == '-' && chNext == '-') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\'') { - state = SCE_C_STRING; - } else if (iswordstart(ch)) { - state = SCE_C_WORD; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - } - } - } - chPrev = ch; - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc - 1, state); -} - -void ColouriseDoc(int codePage, int startPos, int lengthDoc, int initStyle, - int language, WordList *keywordlists[], StylingContext &styler) { - //Platform::DebugPrintf("ColouriseDoc <%s>\n", language); - if (language == SCLEX_PYTHON) { - // Python uses a different mask because bad indentation is marked by oring with 32 - styler.StartAt(startPos, 127); - ColourisePyDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_PERL) { - // Lexer for perl often has to backtrack to start of current style to determine - // which characters are being used as quotes, how deeply nested is the - // start position and what the termination string is for here documents - ColourisePerlDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if ((language == SCLEX_HTML) || (language == SCLEX_XML)) { - // Lexer for HTML requires more lexical states (6 bits worth) than most lexers - ColouriseHyperTextDoc(codePage, startPos, lengthDoc, initStyle, - *keywordlists[0], *keywordlists[1], *keywordlists[2], *keywordlists[3], styler); - } else { - styler.StartAt(startPos); - if (language == SCLEX_CPP) { - ColouriseCppDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_SQL) { - ColouriseSQLDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_VB) { - ColouriseVBDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_PROPERTIES) { - ColourisePropsDoc(startPos, lengthDoc, initStyle, styler); - } else if (language == SCLEX_ERRORLIST) { - ColouriseErrorListDoc(startPos, lengthDoc, initStyle, styler); - } else if (language == SCLEX_MAKEFILE) { - ColouriseMakeDoc(startPos, lengthDoc, initStyle, styler); - } else if (language == SCLEX_BATCH) { - ColouriseBatchDoc(startPos, lengthDoc, initStyle, styler); - } else { - // Null language means all style bytes are 0 so just mark the end - no need to fill in. - styler.StartAt(startPos + lengthDoc - 1); - styler.ColourSegment(0, 0, 0); - } + // Unknown language + // Null language means all style bytes are 0 so just mark the end - no need to fill in. + if (lengthDoc > 0) { + styler.StartAt(startPos + lengthDoc - 1); + styler.StartSegment(startPos + lengthDoc - 1); + styler.ColourTo(startPos + lengthDoc - 1, 0); } } diff --git a/contrib/src/stc/scintilla/src/LexCPP.cxx b/contrib/src/stc/scintilla/src/LexCPP.cxx new file mode 100644 index 0000000000..b6358ab332 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexCPP.cxx @@ -0,0 +1,262 @@ +// SciTE - Scintilla based Text Editor +// LexCPP.cxx - lexer for C++, C, Java, and Javascript +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + bool wordIsUUID = false; + char chAttr = SCE_C_IDENTIFIER; + if (isdigit(s[0]) || (s[0] == '.')) + chAttr = SCE_C_NUMBER; + else { + if (keywords.InList(s)) { + chAttr = SCE_C_WORD; + wordIsUUID = strcmp(s, "uuid") == 0; + } + } + styler.ColourTo(end, chAttr); + return wordIsUUID; +} + +static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + bool fold = styler.GetPropertyInt("fold"); + bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor"); + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + + int state = initStyle; + if (state == SCE_C_STRINGEOL) // Does not leak onto next line + state = SCE_C_DEFAULT; + char chPrev = ' '; + char chNext = styler[startPos]; + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + styler.StartSegment(startPos); + bool lastWordWasUUID = false; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // End of line + if (state == SCE_C_STRINGEOL) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + levelPrev = levelCurrent; + } + visibleChars = 0; + } + if (!isspace(ch)) + visibleChars++; + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (ch == '@' && chNext == '\"') { + styler.ColourTo(i-1, state); + state = SCE_C_VERBATIM; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } else if (iswordstart(ch) || (ch == '@')) { + styler.ColourTo(i-1, state); + if (lastWordWasUUID) { + state = SCE_C_UUID; + lastWordWasUUID = false; + } else { + state = SCE_C_IDENTIFIER; + } + } else if (ch == '/' && chNext == '*') { + styler.ColourTo(i-1, state); + if (styler.SafeGetCharAt(i + 2) == '*') + state = SCE_C_COMMENTDOC; + else + state = SCE_C_COMMENT; + } else if (ch == '/' && chNext == '/') { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i-1, state); + state = SCE_C_STRING; + } else if (ch == '\'') { + styler.ColourTo(i-1, state); + state = SCE_C_CHARACTER; + } else if (ch == '#' && visibleChars == 1) { + // Preprocessor commands are alone on their line + styler.ColourTo(i-1, state); + state = SCE_C_PREPROCESSOR; + // Skip whitespace between # and preprocessor word + do { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } while (isspace(ch) && (i < lengthDoc)); + } else if (isoperator(ch)) { + styler.ColourTo(i-1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + } else if (state == SCE_C_IDENTIFIER) { + if (!iswordchar(ch)) { + lastWordWasUUID = classifyWordCpp(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_C_DEFAULT; + if (ch == '/' && chNext == '*') { + if (styler.SafeGetCharAt(i + 2) == '*') + state = SCE_C_COMMENTDOC; + else + state = SCE_C_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (ch == '\'') { + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + } + } else { + if (state == SCE_C_PREPROCESSOR) { + if (stylingWithinPreprocessor) { + if (isspace(ch)) { + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } else { + if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) { + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENT) { + if (ch == '/' && chPrev == '*') { + if (((i > styler.GetStartSegment() + 2) || ( + (initStyle == SCE_C_COMMENT) && + (styler.GetStartSegment() == static_cast(startPos))))) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENTDOC) { + if (ch == '/' && chPrev == '*') { + if (((i > styler.GetStartSegment() + 2) || ( + (initStyle == SCE_C_COMMENTDOC) && + (styler.GetStartSegment() == static_cast(startPos))))) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } else if (chNext == '\r' || chNext == '\n') { + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } + } else if (state == SCE_C_CHARACTER) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_VERBATIM) { + if (ch == '\"') { + if (chNext == '\"') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } else { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_UUID) { + if (ch == '\r' || ch == '\n' || ch == ')') { + styler.ColourTo(i-1, state); + if (ch == ')') + styler.ColourTo(i, SCE_C_OPERATOR); + state = SCE_C_DEFAULT; + } + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + + } +} + +LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc); diff --git a/contrib/src/stc/scintilla/src/LexHTML.cxx b/contrib/src/stc/scintilla/src/LexHTML.cxx new file mode 100644 index 0000000000..7868b47fc8 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexHTML.cxx @@ -0,0 +1,1151 @@ +// SciTE - Scintilla based Text Editor +// LexHTML.cxx - lexer for HTML +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START) +#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START) +#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START) + +enum { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML }; +enum { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc }; + +static int segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, int prevValue) { + char s[30 + 1]; + s[0] = '\0'; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + //Platform::DebugPrintf("Scripting indicator [%s]\n", s); + if (strstr(s, "vbs")) + return eScriptVBS; + if (strstr(s, "pyth")) + return eScriptPython; + if (strstr(s, "javas")) + return eScriptJS; + if (strstr(s, "jscr")) + return eScriptJS; + if (strstr(s, "php")) + return eScriptPHP; + if (strstr(s, "xml")) + return eScriptXML; + + return prevValue; +} + +static int PrintScriptingIndicatorOffset(Accessor &styler, unsigned int start, unsigned int end) { + int iResult = 0; + char s[30 + 1]; + s[0] = '\0'; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + if (0 == strncmp(s, "php", 3)) { + iResult = 3; + } + + return iResult; +} + +//static int ScriptOfState(int state,int defaultScript) +static int ScriptOfState(int state) { + int scriptLanguage; + + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + scriptLanguage = eScriptPython; + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + scriptLanguage = eScriptVBS; + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_STRINGEOL)) { + scriptLanguage = eScriptJS; + } else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) { + scriptLanguage = eScriptPHP; + } else { + // scriptLanguage = defaultScript; + scriptLanguage = eScriptNone; + } + + return scriptLanguage; +} + +static int statePrintForState(int state, int inScriptType) { + int StateToPrint; + + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON); + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS); + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_STRINGEOL)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS); + } else { + StateToPrint = state; + } + + return StateToPrint; +} + +static int stateForPrintState(int StateToPrint) { + int state; + + if ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) { + state = StateToPrint - SCE_HA_PYTHON; + } else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) { + state = StateToPrint - SCE_HA_VBS; + } else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_STRINGEOL)) { + state = StateToPrint - SCE_HA_JS; + } else { + state = StateToPrint; + } + + return state; +} + +static inline bool IsNumber(unsigned int start, Accessor &styler) { + return isdigit(styler[start]) || (styler[start] == '.') || + (styler[start] == '-') || (styler[start] == '#'); +} + +static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + bool wordIsNumber = IsNumber(start, styler); + char chAttr = SCE_H_ATTRIBUTEUNKNOWN; + if (wordIsNumber) { + chAttr = SCE_H_NUMBER; + } else { + char s[30 + 1]; + s[0] = '\0'; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + if (keywords.InList(s)) + chAttr = SCE_H_ATTRIBUTE; + } + if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords) + // No keywords -> all are known + chAttr = SCE_H_ATTRIBUTE; + styler.ColourTo(end, chAttr); +} + +static int classifyTagHTML(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler) { + char s[30 + 1]; + // Copy after the '<' + unsigned int i = 0; + for (unsigned int cPos = start; cPos <= end && i < 30; cPos++) { + char ch = styler[cPos]; + if (ch != '<') + s[i++] = static_cast(tolower(ch)); + } + s[i] = '\0'; + char chAttr = SCE_H_TAGUNKNOWN; + if (s[0] == '!' && s[1] == '-' && s[2] == '-') { //Comment + chAttr = SCE_H_COMMENT; + } else if (strcmp(s, "![cdata[") == 0) { // In lower case because already converted + chAttr = SCE_H_CDATA; + } else if (s[0] == '/') { // Closing tag + if (keywords.InList(s + 1)) + chAttr = SCE_H_TAG; + } else { + if (keywords.InList(s)) { + chAttr = SCE_H_TAG; + } + if (0 == strcmp(s, "script")) { + chAttr = SCE_H_SCRIPT; + } + } + if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords) + // No keywords -> all are known + chAttr = SCE_H_TAG; + styler.ColourTo(end, chAttr); + return chAttr; +} + +static void classifyWordHTJS(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler, int inScriptType) { + char chAttr = SCE_HJ_WORD; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HJ_NUMBER; + else { + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + if (keywords.InList(s)) + chAttr = SCE_HJ_KEYWORD; + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); +} + +static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, int inScriptType) { + char chAttr = SCE_HB_IDENTIFIER; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HB_NUMBER; + else { + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + if (keywords.InList(s)) { + chAttr = SCE_HB_WORD; + if (strcmp(s, "rem") == 0) + chAttr = SCE_HB_COMMENTLINE; + } + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + if (chAttr == SCE_HB_COMMENTLINE) + return SCE_HB_COMMENTLINE; + else + return SCE_HB_DEFAULT; +} + +static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord, int inScriptType) { + bool wordIsNumber = isdigit(styler[start]); + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_HP_IDENTIFIER; + if (0 == strcmp(prevWord, "class")) + chAttr = SCE_HP_CLASSNAME; + else if (0 == strcmp(prevWord, "def")) + chAttr = SCE_HP_DEFNAME; + else if (wordIsNumber) + chAttr = SCE_HP_NUMBER; + else if (keywords.InList(s)) + chAttr = SCE_HP_WORD; + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + strcpy(prevWord, s); +} + +// Update the word colour to default or keyword +// Called when in a PHP word +static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char chAttr = SCE_HPHP_DEFAULT; + bool wordIsNumber = isdigit(styler[start]); + if (wordIsNumber) + chAttr = SCE_HPHP_NUMBER; + else { + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + if (keywords.InList(s)) + chAttr = SCE_HPHP_WORD; + } + styler.ColourTo(end, chAttr); +} + +// Return the first state to reach when entering a scripting language +static int StateForScript(int scriptLanguage) { + int Result; + switch (scriptLanguage) { + case eScriptVBS: + Result = SCE_HB_START; + break; + case eScriptPython: + Result = SCE_HP_START; + break; + case eScriptPHP: + Result = SCE_HPHP_DEFAULT; + break; + case eScriptXML: + Result = SCE_H_TAGUNKNOWN; + break; + default : + Result = SCE_HJ_START; + break; + } + return Result; +} + +inline bool ishtmlwordchar(char ch) { + return isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'; +} + +static bool InTagState(int state) { + return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || + state == SCE_H_SCRIPT || + state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || + state == SCE_H_NUMBER || state == SCE_H_OTHER || + state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; +} + +static bool isLineEnd(char ch) { + return ch == '\r' || ch == '\n'; +} + +static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + + // Lexer for HTML requires more lexical states (7 bits worth) than most lexers + styler.StartAt(startPos, 127); + char prevWord[200]; + prevWord[0] = '\0'; + int StateToPrint = initStyle; + int state = stateForPrintState(StateToPrint); + + // If inside a tag, it may be a script tag, so reread from the start to ensure any language tags are seen + if (InTagState(state)) { + while ((startPos > 1) && (InTagState(styler.StyleAt(startPos - 1)))) { + startPos--; + } + state = SCE_H_DEFAULT; + } + styler.StartAt(startPos, 127); + + int lineState = eScriptVBS; + int lineCurrent = styler.GetLine(startPos); + if (lineCurrent > 0) + lineState = styler.GetLineState(lineCurrent); + int inScriptType = (lineState >> 0) & 0x03; // 2 bits + int defaultScript = (lineState >> 4) & 0x0F; // 4 bits + int beforePreProc = (lineState >> 8) & 0xFF; // 8 bits + + // int scriptLanguage = ScriptOfState(state,defaultScript); + int scriptLanguage = ScriptOfState(state); + + bool fold = styler.GetPropertyInt("fold"); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + int visibleChars = 0; + + char chPrev = ' '; + char ch = ' '; + styler.StartSegment(startPos); + int lengthDoc = startPos + length; + for (int i = startPos; i < lengthDoc; i++) { + char chPrev2 = chPrev; + chPrev = ch; + ch = styler[i]; + char chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + // Handle DBCS codepages + if (styler.IsLeadByte(ch)) { + chPrev = ' '; + i += 1; + continue; + } + + if (fold && !isspace(ch)) + visibleChars++; + + // handle script folding + if (fold) { + switch (scriptLanguage) { + case eScriptJS: + case eScriptPHP: + //not currently supported case eScriptVBS: + if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC)) { + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + break; + case eScriptPython: + if (state != SCE_HP_COMMENTLINE) { + if ((ch == ':') && ((chNext == '\n') || (chNext == '\r' && chNext2 == '\n'))) { + levelCurrent++; + } else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) { + // check if the number of tabs is lower than the level + int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8; + for (int j = 0;Findlevel > 0;j++) { + char chTmp = styler.SafeGetCharAt(i + j + 1); + if (chTmp == '\t') { + Findlevel -= 8; + } else if (chTmp == ' ') { + Findlevel--; + } else break; + } + + if (Findlevel > 0) { + levelCurrent -= Findlevel / 8; + if (Findlevel % 8) levelCurrent--; + } + } + } + break; + } + } + + // decide what is the current state to print (depending of the script tag) + StateToPrint = statePrintForState(state, inScriptType); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // New line -> record any line state onto /next/ line + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + visibleChars = 0; + levelPrev = levelCurrent; + } + lineCurrent++; + styler.SetLineState(lineCurrent, + ((inScriptType & 0x03) << 0) | + ((defaultScript & 0x0F) << 4) | + ((beforePreProc & 0xFF) << 8)); + } + + // generic end of script processing + else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { + // Check if it's the end of the script tag (or any other HTML tag) + switch (state) { + // in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!) + case SCE_H_DOUBLESTRING: + case SCE_H_SINGLESTRING: + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + case SCE_HJ_COMMENTLINE: + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HB_STRING: + case SCE_HP_STRING: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + break; + default : + // maybe we should check here if it's a tag and if it's SCRIPT + + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_TAGUNKNOWN; + inScriptType = eHtml; + scriptLanguage = eScriptNone; + i += 2; + continue; + } + } + + ///////////////////////////////////// + // handle the start of PHP pre-processor = Non-HTML + else if ((ch == '<') && (chNext == '?')) { + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment() + 2, i + 10, eScriptPHP); + i++; + i += PrintScriptingIndicatorOffset(styler, styler.GetStartSegment() + 2, i + 10); + if (scriptLanguage == eScriptXML) + styler.ColourTo(i, SCE_H_XMLSTART); + else + styler.ColourTo(i, SCE_H_QUESTION); + state = StateForScript(scriptLanguage); + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + continue; + } + + // handle the start of ASP pre-processor = Non-HTML + else if ((ch == '<') && (chNext == '%')) { + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + + if (chNext2 == '@') { + i += 2; // place as if it was the second next char treated + state = SCE_H_ASPAT; + } else { + if (chNext2 == '=') { + i += 2; // place as if it was the second next char treated + } + else { + i++; // place as if it was the next char treated + } + + + state = StateForScript(defaultScript); + } + styler.ColourTo(i, SCE_H_ASP); + continue; + } + + // handle the end of a pre-processor = Non-HTML + else if (((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && ((ch == '?') || (ch == '%')) && (chNext == '>')) { + if (state == SCE_H_ASPAT) { + defaultScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, defaultScript); + } + // Bounce out of any ASP mode + switch (state) { + case SCE_HJ_WORD: + classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); + break; + case SCE_HB_WORD: + classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); + break; + case SCE_HP_WORD: + classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType); + break; + case SCE_HPHP_WORD: + classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); + break; + default : + styler.ColourTo(i - 1, StateToPrint); + break; + } + i++; + if (ch == '%') + styler.ColourTo(i, SCE_H_ASP); + else if (scriptLanguage == eScriptXML) + styler.ColourTo(i, SCE_H_XMLEND); + else + styler.ColourTo(i, SCE_H_QUESTION); + state = beforePreProc; + if (inScriptType == eNonHtmlScriptPreProc) + inScriptType = eNonHtmlScript; + else + inScriptType = eHtml; + scriptLanguage = eScriptNone; + continue; + } + ///////////////////////////////////// + + switch (state) { + case SCE_H_DEFAULT: + if (ch == '<') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '!' && chNext2 == '-' && styler.SafeGetCharAt(i + 3) == '-') + state = SCE_H_COMMENT; + else + state = SCE_H_TAGUNKNOWN; + } else if (ch == '&') { + styler.ColourTo(i - 1, SCE_H_DEFAULT); + state = SCE_H_ENTITY; + } + break; + case SCE_H_COMMENT: + if ((ch == '>') && (chPrev == '-') && (chPrev2 == '-')) { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + } + break; + case SCE_H_CDATA: + if ((ch == '>') && (chPrev == ']') && (chPrev2 == ']')) { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + } + break; + case SCE_H_ENTITY: + if (ch == ';') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + } + if (ch != '#' && !isalnum(ch)) { // Should check that '#' follows '&', but it is unlikely anyway... + styler.ColourTo(i, SCE_H_TAGUNKNOWN); + state = SCE_H_DEFAULT; + } + break; + case SCE_H_TAGUNKNOWN: + if (!ishtmlwordchar(ch) && ch != '/' && ch != '-' && ch != '[') { + int eClass = classifyTagHTML(styler.GetStartSegment(), i - 1, keywords, styler); + if (eClass == SCE_H_SCRIPT) { + inScriptType = eNonHtmlScript; + scriptLanguage = defaultScript; + eClass = SCE_H_TAG; + } + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else { + if (eClass == SCE_H_CDATA) { + state = SCE_H_CDATA; + } else { + state = SCE_H_OTHER; + } + } + } + break; + case SCE_H_ATTRIBUTE: + if (!ishtmlwordchar(ch) && ch != '/' && ch != '-') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, scriptLanguage); + } + classifyAttribHTML(styler.GetStartSegment(), i - 1, keywords, styler); + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else if (ch == '=') { + styler.ColourTo(i, SCE_H_OTHER); + state = SCE_H_VALUE; + } else { + state = SCE_H_OTHER; + } + } + break; + case SCE_H_OTHER: + if (ch == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_DOUBLESTRING; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_SINGLESTRING; + } else if (ch == '=') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_VALUE; + } else if (ch == '/' && chNext == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i + 1, SCE_H_TAGEND); + i++; + ch = chNext; + state = SCE_H_DEFAULT; + } else if (ch == '?' && chNext == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i + 1, SCE_H_XMLEND); + i++; + ch = chNext; + state = SCE_H_DEFAULT; + } else if (ishtmlwordchar(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_ATTRIBUTE; + } + break; + case SCE_H_DOUBLESTRING: + if (ch == '\"') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); + } + styler.ColourTo(i, SCE_H_DOUBLESTRING); + state = SCE_H_OTHER; + } + break; + case SCE_H_SINGLESTRING: + if (ch == '\'') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); + } + styler.ColourTo(i, SCE_H_SINGLESTRING); + state = SCE_H_OTHER; + } + break; + case SCE_H_VALUE: + if (!ishtmlwordchar(ch)) { + if (ch == '\"') { + // Should really test for being first character + state = SCE_H_DOUBLESTRING; + } else if (ch == '\'') { + state = SCE_H_SINGLESTRING; + } else { + if (IsNumber(styler.GetStartSegment(), styler)) { + styler.ColourTo(i - 1, SCE_H_NUMBER); + } else { + styler.ColourTo(i - 1, StateToPrint); + } + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else { + state = SCE_H_OTHER; + } + } + } + break; + case SCE_HJ_DEFAULT: + case SCE_HJ_START: + case SCE_HJ_SYMBOLS: + if (iswordstart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_WORD; + } else if (ch == '/' && chNext == '*') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext2 == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_SINGLESTRING; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); + state = SCE_HJ_DEFAULT; + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HJ_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DEFAULT; + } + } + break; + case SCE_HJ_WORD: + if (!iswordchar(ch)) { + classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); + //styler.ColourTo(i - 1, eHTJSKeyword); + state = SCE_HJ_DEFAULT; + if (ch == '/' && chNext == '*') { + if (chNext2 == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_HJ_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + state = SCE_HJ_SINGLESTRING; + } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isoperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); + state = SCE_HJ_DEFAULT; + } + } + break; + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + if (ch == '/' && chPrev == '*') { + styler.ColourTo(i, StateToPrint); + state = SCE_HJ_DEFAULT; + } + break; + case SCE_HJ_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, statePrintForState(SCE_HJ_COMMENTLINE, inScriptType)); + state = SCE_HJ_DEFAULT; + } + break; + case SCE_HJ_DOUBLESTRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + } + } else if (ch == '\"') { + styler.ColourTo(i, statePrintForState(SCE_HJ_DOUBLESTRING, inScriptType)); + state = SCE_HJ_DEFAULT; + i++; + ch = chNext; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_STRINGEOL; + } + break; + case SCE_HJ_SINGLESTRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + } + } else if (ch == '\'') { + styler.ColourTo(i, statePrintForState(SCE_HJ_SINGLESTRING, inScriptType)); + state = SCE_HJ_DEFAULT; + i++; + ch = chNext; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_STRINGEOL; + } + break; + case SCE_HJ_STRINGEOL: + if (!isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DEFAULT; + } else if (!isLineEnd(chNext)) { + styler.ColourTo(i, StateToPrint); + state = SCE_HJ_DEFAULT; + } + break; + case SCE_HB_DEFAULT: + case SCE_HB_START: + if (iswordstart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_WORD; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_STRING; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_COMMENTLINE; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, SCE_HB_DEFAULT); + state = SCE_HB_DEFAULT; + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HB_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } + } + break; + case SCE_HB_WORD: + if (!iswordchar(ch)) { + state = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); + if (state == SCE_HB_DEFAULT) { + if (ch == '\"') { + state = SCE_HB_STRING; + } else if (ch == '\'') { + state = SCE_HB_COMMENTLINE; + } else if (isoperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); + state = SCE_HB_DEFAULT; + } + } + } + break; + case SCE_HB_STRING: + if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HB_DEFAULT; + i++; + ch = chNext; + } else if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_STRINGEOL; + } + break; + case SCE_HB_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } + break; + case SCE_HB_STRINGEOL: + if (!isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } else if (!isLineEnd(chNext)) { + styler.ColourTo(i, StateToPrint); + state = SCE_HB_DEFAULT; + } + break; + case SCE_HP_DEFAULT: + case SCE_HP_START: + if (iswordstart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_WORD; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_COMMENTLINE; + } else if (ch == '#') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_HP_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + // state = statePrintForState(SCE_HP_STRING,inScriptType); + state = SCE_HP_STRING; + } + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_HP_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_HP_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HP_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_DEFAULT; + } + } + break; + case SCE_HP_WORD: + if (!iswordchar(ch)) { + classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType); + state = SCE_HP_DEFAULT; + if (ch == '#') { + state = SCE_HP_COMMENTLINE; + } else if (ch == '\"') { + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_HP_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_HP_STRING; + } + } else if (ch == '\'') { + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_HP_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_HP_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); + } + } + break; + case SCE_HP_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_STRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_CHARACTER: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_TRIPLE: + if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_TRIPLEDOUBLE: + if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + ///////////// start - PHP state handling + case SCE_HPHP_WORD: + if (!iswordstart(ch)) { + classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); + if (ch == '/' && chNext == '*') { + i++; + state = SCE_HPHP_COMMENT; + } else if (ch == '/' && chNext == '/') { + i++; + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '#') { + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HPHP_HSTRING; + } else if (ch == '\'') { + state = SCE_HPHP_SIMPLESTRING; + } else if (ch == '$') { + state = SCE_HPHP_VARIABLE; + } else { + state = SCE_HPHP_DEFAULT; + } + } + break; + case SCE_HPHP_NUMBER: + if (!isdigit(ch)) { + styler.ColourTo(i - 1, SCE_HPHP_NUMBER); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_VARIABLE: + if (!iswordstart(ch)) { + styler.ColourTo(i - 1, SCE_HPHP_VARIABLE); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_COMMENT: + if (ch == '/' && chPrev == '*') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_HSTRING: + if (ch == '\\') { + // skip the next char + i++; + } else if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_SIMPLESTRING: + if (ch == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_DEFAULT: + styler.ColourTo(i - 1, StateToPrint); + if (isdigit(ch)) { + state = SCE_HPHP_NUMBER; + } else if (iswordstart(ch)) { + state = SCE_HPHP_WORD; + } else if (ch == '/' && chNext == '*') { + i++; + state = SCE_HPHP_COMMENT; + } else if (ch == '/' && chNext == '/') { + i++; + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '#') { + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HPHP_HSTRING; + } else if (ch == '\'') { + state = SCE_HPHP_SIMPLESTRING; + } else if (ch == '$') { + state = SCE_HPHP_VARIABLE; + } + break; + ///////////// end - PHP state handling + } + + + + if (state == SCE_HB_DEFAULT) { // One of the above succeeded + if (ch == '\"') { + state = SCE_HB_STRING; + } else if (ch == '\'') { + state = SCE_HB_COMMENTLINE; + } else if (iswordstart(ch)) { + state = SCE_HB_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_HB_DEFAULT); + } + } else if (state == SCE_HBA_DEFAULT) { // One of the above succeeded + if (ch == '\"') { + state = SCE_HBA_STRING; + } else if (ch == '\'') { + state = SCE_HBA_COMMENTLINE; + } else if (iswordstart(ch)) { + state = SCE_HBA_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_HBA_DEFAULT); + } + } else if (state == SCE_HJ_DEFAULT) { // One of the above succeeded + if (ch == '/' && chNext == '*') { + if (styler.SafeGetCharAt(i + 2) == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_HJ_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + state = SCE_HJ_SINGLESTRING; + } else if (iswordstart(ch)) { + state = SCE_HJ_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_HJ_SYMBOLS); + } + } + } + + StateToPrint = statePrintForState(state, inScriptType); + styler.ColourTo(lengthDoc - 1, StateToPrint); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + + } +} + +LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc); +LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc); + diff --git a/contrib/src/stc/scintilla/src/LexLua.cxx b/contrib/src/stc/scintilla/src/LexLua.cxx new file mode 100644 index 0000000000..e6da7668dd --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexLua.cxx @@ -0,0 +1,298 @@ +// LexLua.cxx - lexer for Lua language +// Written by Paul Winwood + +#include +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void classifyWordLua(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) +{ + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) + { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + + char chAttr = SCE_LUA_IDENTIFIER; + + if (wordIsNumber) + chAttr = SCE_LUA_NUMBER; + else + { + if (keywords.InList(s)) + { + chAttr = SCE_LUA_WORD; + } + } + styler.ColourTo(end, chAttr); +} + +static void ColouriseLuaDoc(unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) +{ + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + styler.GetLine(startPos); + + int state = initStyle; + char chPrev = ' '; + char chNext = styler[startPos]; + unsigned int lengthDoc = startPos + length; + bool firstChar = true; + int literalString = 0; + + styler.StartSegment(startPos); + for (unsigned int i = startPos; i <= lengthDoc; i++) + { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) + { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_LUA_STRINGEOL) + { + if (ch != '\r' && ch != '\n') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_DEFAULT; + } + } + + if (state == SCE_LUA_LITERALSTRING && ch == '[' && chNext == '[') + { + literalString++; + } + else + if (state == SCE_LUA_DEFAULT) + { + if (ch == '-' && chNext == '-') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_COMMENTLINE; + } + else + if (ch == '[' && chNext == '[') + { + state = SCE_LUA_LITERALSTRING; + literalString = 1; + } + else + if (iswordstart(ch)) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_WORD; + } + else + if (ch == '\"') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_STRING; + } + else + if (ch == '\'') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_CHARACTER; + } + else + if (ch == '$' && firstChar) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_PREPROCESSOR; + } + else + if (isoperator(ch)) + { + styler.ColourTo(i-1, state); + styler.ColourTo(i, SCE_LUA_OPERATOR); + } + } + else + if (state == SCE_LUA_WORD) + { + if (!iswordchar(ch)) + { + classifyWordLua(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_LUA_DEFAULT; + if (ch == '[' && chNext == '[') + { + literalString = 1; + state = SCE_LUA_LITERALSTRING; + } + else + if (ch == '-' && chNext == '-') + { + state = SCE_LUA_COMMENTLINE; + } + else + if (ch == '\"') + { + state = SCE_LUA_STRING; + } + else + if (ch == '\'') + { + state = SCE_LUA_CHARACTER; + } + else + if (ch == '$' && firstChar) + { + state = SCE_LUA_PREPROCESSOR; + } + else + if (isoperator(ch)) + { + styler.ColourTo(i, SCE_LUA_OPERATOR); + } + } + } + else + { + if (state == SCE_LUA_LITERALSTRING) + { + if (ch == ']' && (chPrev == ']') && (--literalString == 0)) + { + styler.ColourTo(i, state); + state = SCE_LUA_DEFAULT; + } + } + else + if (state == SCE_LUA_PREPROCESSOR) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_DEFAULT; + } + } + else + if (state == SCE_LUA_COMMENTLINE) + { + if (ch == '\r' || ch == '\n') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_DEFAULT; + } + } + else + if (state == SCE_LUA_STRING) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_STRINGEOL; + } + else + if (ch == '\\') + { + if (chNext == '\"' || chNext == '\\') + { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else + if (ch == '\"') + { + styler.ColourTo(i, state); + state = SCE_LUA_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else + if (state == SCE_LUA_CHARACTER) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_STRINGEOL; + } + else + if (ch == '\\') + { + if (chNext == '\'' || chNext == '\\') + { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else + if (ch == '\'') + { + styler.ColourTo(i, state); + state = SCE_LUA_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + + if (state == SCE_LUA_DEFAULT) + { + if (ch == '-' && chNext == '-') + { + state = SCE_LUA_COMMENTLINE; + } + else + if (ch == '\"') + { + state = SCE_LUA_STRING; + } + else + if (ch == '\'') + { + state = SCE_LUA_CHARACTER; + } + else + if (ch == '$' && firstChar) + { + state = SCE_LUA_PREPROCESSOR; + } + else + if (iswordstart(ch)) + { + state = SCE_LUA_WORD; + } + else + if (isoperator(ch)) + { + styler.ColourTo(i, SCE_LUA_OPERATOR); + } + } + } + chPrev = ch; + firstChar = (ch == '\r' || ch == '\n'); + } + styler.ColourTo(lengthDoc - 1, state); +} + +LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc); diff --git a/contrib/src/stc/scintilla/src/LexOthers.cxx b/contrib/src/stc/scintilla/src/LexOthers.cxx new file mode 100644 index 0000000000..dd86033687 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexOthers.cxx @@ -0,0 +1,351 @@ +// SciTE - Scintilla based Text Editor +// LexOthers.cxx - lexers for properties files, batch files, make files and error lists +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void ColouriseBatchLine(char *lineBuffer, int endLine, Accessor &styler) { + if (0 == strncmp(lineBuffer, "REM", 3)) { + styler.ColourTo(endLine, 1); + } else if (0 == strncmp(lineBuffer, "rem", 3)) { + styler.ColourTo(endLine, 1); + } else if (0 == strncmp(lineBuffer, "SET", 3)) { + styler.ColourTo(endLine, 2); + } else if (0 == strncmp(lineBuffer, "set", 3)) { + styler.ColourTo(endLine, 2); + } else if (lineBuffer[0] == ':') { + styler.ColourTo(endLine, 3); + } else { + styler.ColourTo(endLine, 0); + } +} + +static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i < startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseBatchLine(lineBuffer, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseBatchLine(lineBuffer, startPos + length, styler); +} + +static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) { + // It is needed to remember the current state to recognize starting + // comment lines before the first "diff " or "--- ". If a real + // difference starts then each line starting with ' ' is a whitespace + // otherwise it is considered a comment (Only in..., Binary file...) + if (0 == strncmp(lineBuffer, "diff ", 3)) { + styler.ColourTo(endLine, 2); + } else if (0 == strncmp(lineBuffer, "--- ", 3)) { + styler.ColourTo(endLine, 3); + } else if (0 == strncmp(lineBuffer, "+++ ", 3)) { + styler.ColourTo(endLine, 3); + } else if (lineBuffer[0] == '@') { + styler.ColourTo(endLine, 4); + } else if (lineBuffer[0] == '-') { + styler.ColourTo(endLine, 5); + } else if (lineBuffer[0] == '+') { + styler.ColourTo(endLine, 6); + } else if (lineBuffer[0] != ' ') { + styler.ColourTo(endLine, 1); + } else { + styler.ColourTo(endLine, 0); + } +} + +static void ColouriseDiffDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i < startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseDiffLine(lineBuffer, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseDiffLine(lineBuffer, startPos + length, styler); +} + +static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, Accessor &styler) { + int i = 0; + while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces + i++; + if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') { + styler.ColourTo(endPos, 1); + } else if (lineBuffer[i] == '[') { + styler.ColourTo(endPos, 2); + } else if (lineBuffer[i] == '@') { + styler.ColourTo(startLine+i, 4); + if (lineBuffer[++i] == '=') + styler.ColourTo(startLine+i, 3); + styler.ColourTo(endPos, 0); + } else { + while (lineBuffer[i] != '=' && (i < lengthLine)) // Search the '=' character + i++; + if (lineBuffer[i] == '=') { + styler.ColourTo(startLine+i-1, 0); + styler.ColourTo(startLine+i, 3); + styler.ColourTo(endPos, 0); + } else { + styler.ColourTo(endPos, 0); + } + } +} + +static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + int startLine = startPos; + for (unsigned int i = startPos; i <= startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if ((styler[i] == '\r' && styler.SafeGetCharAt(i+1) != '\n') || + styler[i] == '\n' || + (linePos >= sizeof(lineBuffer) - 1)) { + lineBuffer[linePos] = '\0'; + ColourisePropsLine(lineBuffer, linePos, startLine, i, styler); + linePos = 0; + startLine = i+1; + } + } + if (linePos > 0) + ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length, styler); +} + +static void ColouriseMakeLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) { + int i = 0; + while (isspace(lineBuffer[i]) && (i < lengthLine)) + i++; + if (lineBuffer[i] == '#' || lineBuffer[i] == '!') { + styler.ColourTo(endPos, 1); + } else { + styler.ColourTo(endPos, 0); + } +} + +static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i <= startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseMakeLine(lineBuffer, linePos, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseMakeLine(lineBuffer, linePos, startPos + length, styler); +} + +static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) { + if (lineBuffer[0] == '>') { + // Command or return status + styler.ColourTo(endPos, SCE_ERR_CMD); + } else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) { + styler.ColourTo(endPos, SCE_ERR_PYTHON); + } else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) { + // Borland error message + styler.ColourTo(endPos, SCE_ERR_BORLAND); + } else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) { + // Borland warning message + styler.ColourTo(endPos, SCE_ERR_BORLAND); + } else if (strstr(lineBuffer, " at " ) && + strstr(lineBuffer, " at " ) < lineBuffer+lengthLine && + strstr(lineBuffer, " line ") && + strstr(lineBuffer, " line ") < lineBuffer+lengthLine) { + // perl error message + styler.ColourTo(endPos, SCE_ERR_PERL); + } else { + // Look for ::message + // Look for (line)message + // Look for (line,pos)message + int state = 0; + for (int i = 0; i < lengthLine; i++) { + if (state == 0 && lineBuffer[i] == ':' && isdigit(lineBuffer[i + 1])) { + state = 1; + } else if (state == 0 && lineBuffer[i] == '(') { + state = 10; + } else if (state == 1 && isdigit(lineBuffer[i])) { + state = 2; + } else if (state == 2 && lineBuffer[i] == ':') { + state = 3; + break; + } else if (state == 2 && !isdigit(lineBuffer[i])) { + state = 99; + } else if (state == 10 && isdigit(lineBuffer[i])) { + state = 11; + } else if (state == 11 && lineBuffer[i] == ',') { + state = 14; + } else if (state == 11 && lineBuffer[i] == ')') { + state = 12; + } else if (state == 12 && lineBuffer[i] == ':') { + state = 13; + } else if (state == 14 && lineBuffer[i] == ')') { + state = 15; + break; + } else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) { + state = 99; + } + } + if (state == 3) { + styler.ColourTo(endPos, SCE_ERR_GCC); + } else if ((state == 13) || (state == 14) || (state == 15)) { + styler.ColourTo(endPos, SCE_ERR_MS); + } else { + styler.ColourTo(endPos, SCE_ERR_DEFAULT); + } + } +} + +static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i <= startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseErrorListLine(lineBuffer, linePos, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseErrorListLine(lineBuffer, linePos, startPos + length, styler); +} + +static int isSpecial(char s) { + + return (s == '\\') || (s == ',') || (s == ';') || (s == '\'') || (s == ' ') || + (s == '\"') || (s == '`') || (s == '^') || (s == '~'); +} + +static int isTag(int start, Accessor &styler) { + + char s[6]; + unsigned int i = 0, e=1; + while (i < 5 && e) { + s[i] = styler[start + i]; + i++; + e = styler[start + i] != '{'; + } + s[i] = '\0'; + return (strcmp(s, "begin") == 0) || (strcmp(s, "end") == 0); +} + +static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + + styler.StartAt(startPos); + + int state = initStyle; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + int lengthDoc = startPos + length; + + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_L_DEFAULT : + switch(ch) { + case '\\' : + styler.ColourTo(i - 1, state); + if (isSpecial(styler[i + 1])) { + styler.ColourTo(i + 1, SCE_L_COMMAND); + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + else { + if (isTag(i+1, styler)) + state = SCE_L_TAG; + else + state = SCE_L_COMMAND; + } + break; + case '$' : + styler.ColourTo(i - 1, state); + state = SCE_L_MATH; + if (chNext == '$') { + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + break; + case '%' : + styler.ColourTo(i - 1, state); + state = SCE_L_COMMENT; + break; + } + break; + case SCE_L_COMMAND : + if (chNext == '[' || chNext == '{' || chNext == '}' || + chNext == ' ' || chNext == '\r' || chNext == '\n') { + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + break; + case SCE_L_TAG : + if (ch == '}') { + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + } + break; + case SCE_L_MATH : + if (ch == '$') { + if (chNext == '$') { + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + } + break; + case SCE_L_COMMENT : + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_L_DEFAULT; + } + } + } + styler.ColourTo(lengthDoc, state); +} + +LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc); +LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc); +LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc); +LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc); +LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc); +LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc); diff --git a/contrib/src/stc/scintilla/src/LexPerl.cxx b/contrib/src/stc/scintilla/src/LexPerl.cxx new file mode 100644 index 0000000000..a7186fe552 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexPerl.cxx @@ -0,0 +1,508 @@ +// SciTE - Scintilla based Text Editor +// LexPerl.cxx - lexer for subset of Perl +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +inline bool isPerlOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '\\' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '.' || ch == '~') + return true; + return false; +} + +static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_PL_IDENTIFIER; + if (wordIsNumber) + chAttr = SCE_PL_NUMBER; + else { + if (keywords.InList(s)) + chAttr = SCE_PL_WORD; + } + styler.ColourTo(end, chAttr); + return chAttr; +} + +static bool isEndVar(char ch) { + return !isalnum(ch) && ch != '#' && ch != '$' && + ch != '_' && ch != '\''; +} + +static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) { + if ((pos + static_cast(strlen(val))) >= lengthDoc) { + return false; + } + while (*val) { + if (*val != styler[pos++]) { + return false; + } + val++; + } + return true; +} + +static char opposite(char ch) { + if (ch == '(') + return ')'; + if (ch == '[') + return ']'; + if (ch == '{') + return '}'; + if (ch == '<') + return '>'; + return ch; +} + +static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + // Lexer for perl often has to backtrack to start of current style to determine + // which characters are being used as quotes, how deeply nested is the + // start position and what the termination string is for here documents + + WordList &keywords = *keywordlists[0]; + + char sooked[100]; + int quotes = 0; + char quoteDown = 'd'; + char quoteUp = 'd'; + int quoteRep = 1; + int sookedpos = 0; + bool preferRE = true; + sooked[sookedpos] = '\0'; + int state = initStyle; + int lengthDoc = startPos + length; + // If in a long distance lexical state, seek to the beginning to find quote characters + if (state == SCE_PL_HERE || state == SCE_PL_REGEX || + state == SCE_PL_REGSUBST || state == SCE_PL_LONGQUOTE) { + while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) { + startPos--; + } + state = SCE_PL_DEFAULT; + } + styler.StartAt(startPos); + char chPrev = styler.SafeGetCharAt(startPos - 1); + char chNext = styler[startPos]; + styler.StartSegment(startPos); + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_PL_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + if (ch == 's' && !isalnum(chNext)) { + state = SCE_PL_REGSUBST; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 2; + } else if (ch == 'm' && !isalnum(chNext)) { + state = SCE_PL_REGEX; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 1; + } else if (ch == 't' && chNext == 'r' && !isalnum(chNext2)) { + state = SCE_PL_REGSUBST; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 2; + i++; + chNext = chNext2; + } else if (ch == 'q' && (chNext == 'q' || chNext == 'r' || chNext == 'w' || chNext == 'x') && !isalnum(chNext2)) { + state = SCE_PL_LONGQUOTE; + i++; + chNext = chNext2; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 1; + } else { + state = SCE_PL_WORD; + preferRE = false; + } + } else if (ch == '#') { + styler.ColourTo(i - 1, state); + state = SCE_PL_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, state); + state = SCE_PL_STRING; + } else if (ch == '\'') { + if (chPrev == '&') { + // Archaic call + styler.ColourTo(i, state); + } else { + styler.ColourTo(i - 1, state); + state = SCE_PL_CHARACTER; + } + } else if (ch == '`') { + styler.ColourTo(i - 1, state); + state = SCE_PL_BACKTICKS; + } else if (ch == '$') { + preferRE = false; + styler.ColourTo(i - 1, state); + if (isalnum(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { + state = SCE_PL_SCALAR; + } else if (chNext != '{' && chNext != '[') { + styler.ColourTo(i, SCE_PL_SCALAR); + i++; + ch = ' '; + chNext = ' '; + } else { + styler.ColourTo(i, SCE_PL_SCALAR); + } + } else if (ch == '@') { + preferRE = false; + styler.ColourTo(i - 1, state); + if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { + state = SCE_PL_ARRAY; + } else if (chNext != '{' && chNext != '[') { + styler.ColourTo(i, SCE_PL_ARRAY); + i++; + ch = ' '; + } else { + styler.ColourTo(i, SCE_PL_ARRAY); + } + } else if (ch == '%') { + preferRE = false; + styler.ColourTo(i - 1, state); + if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { + state = SCE_PL_HASH; + } else if (chNext != '{' && chNext != '[') { + styler.ColourTo(i, SCE_PL_HASH); + i++; + ch = ' '; + } else { + styler.ColourTo(i, SCE_PL_HASH); + } + } else if (ch == '*') { + styler.ColourTo(i - 1, state); + state = SCE_PL_SYMBOLTABLE; + } else if (ch == '/' && preferRE) { + styler.ColourTo(i - 1, state); + state = SCE_PL_REGEX; + quoteUp = '/'; + quoteDown = '/'; + quotes = 1; + quoteRep = 1; + } else if (ch == '<' && chNext == '<') { + styler.ColourTo(i - 1, state); + state = SCE_PL_HERE; + i++; + ch = chNext; + chNext = chNext2; + quotes = 0; + sookedpos = 0; + sooked[sookedpos] = '\0'; + } else if (ch == '=' && (chPrev == '\r' || chPrev == '\n') && isalpha(chNext)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_POD; + quotes = 0; + sookedpos = 0; + sooked[sookedpos] = '\0'; + } else if (isPerlOperator(ch)) { + if (ch == ')' || ch == ']') + preferRE = false; + else + preferRE = true; + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_PL_OPERATOR); + } + } else if (state == SCE_PL_WORD) { + if (!iswordchar(ch) && ch != '\'') { // Archaic Perl has quotes inside names + if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__DATA__")) { + styler.ColourTo(i, SCE_PL_DATASECTION); + state = SCE_PL_DATASECTION; + } else if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__END__")) { + styler.ColourTo(i, SCE_PL_DATASECTION); + state = SCE_PL_DATASECTION; + } else { + if (classifyWordPerl(styler.GetStartSegment(), i - 1, keywords, styler) == SCE_PL_WORD) + preferRE = true; + state = SCE_PL_DEFAULT; + if (ch == '#') { + state = SCE_PL_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_PL_STRING; + } else if (ch == '\'') { + state = SCE_PL_CHARACTER; + } else if (ch == '<' && chNext == '<') { + state = SCE_PL_HERE; + quotes = 0; + sookedpos = 0; + sooked[sookedpos] = '\0'; + } else if (isPerlOperator(ch)) { + if (ch == ')' || ch == ']') + preferRE = false; + else + preferRE = true; + styler.ColourTo(i, SCE_PL_OPERATOR); + state = SCE_PL_DEFAULT; + } + } + } + } else { + if (state == SCE_PL_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_HERE) { + if ((isalnum(ch) || ch == '_') && quotes < 2) { + sooked[sookedpos++] = ch; + sooked[sookedpos] = '\0'; + if (quotes == 0) + quotes = 1; + } else { + quotes++; + } + if ((quotes > 1) && + (chPrev == '\n' || chPrev == '\r') && + isMatch(styler, lengthDoc, i, sooked)) { + i += sookedpos; + chNext = styler.SafeGetCharAt(i); + if (chNext == '\n' || chNext == '\r') { + styler.ColourTo(i - 1, SCE_PL_HERE); + state = SCE_PL_DEFAULT; + } + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_CHARACTER) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_BACKTICKS) { + if (ch == '`') { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_POD) { + if (ch == '=' && (chPrev == '\r' || chPrev == '\n')) { + if (isMatch(styler, lengthDoc, i, "=cut")) { + styler.ColourTo(i - 1 + 4, state); + i += 4; + state = SCE_PL_DEFAULT; + ch = styler.SafeGetCharAt(i); + chNext = styler.SafeGetCharAt(i + 1); + } + } + } else if (state == SCE_PL_SCALAR) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_ARRAY) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_HASH) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_SYMBOLTABLE) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_REF) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_REGEX) { + if (!quoteUp && !isspace(ch)) { + quoteUp = ch; + quoteDown = opposite(ch); + quotes++; + } else { + if (ch == quoteDown && chPrev != '\\') { + quotes--; + if (quotes == 0) { + quoteRep--; + if (quoteUp == quoteDown) { + quotes++; + } + } + if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + } else if (ch == quoteUp && chPrev != '\\') { + quotes++; + } else if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + } + } else if (state == SCE_PL_REGSUBST) { + if (!quoteUp && !isspace(ch)) { + quoteUp = ch; + quoteDown = opposite(ch); + quotes++; + } else { + if (quotes == 0 && quoteRep == 1) { + /* We matched something like s(...) or tr{...} + * and are looking for the next matcher characters, + * which could be either bracketed ({...}) or non-bracketed + * (/.../). + * + * Number-signs are problematic. If they occur after + * the close of the first part, treat them like + * a quoteUp char, even if they actually start comments. + * + * If we find an alnum, we end the regsubst, and punt. + * + * Eric Promislow ericp@activestate.com Aug 9,2000 + */ + if (isspace(ch)) { + // Keep going + } else if (isalnum(ch)) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } else { + quoteUp = ch; + quoteDown = opposite(ch); + quotes++; + } + } else if (ch == quoteDown && chPrev != '\\') { + quotes--; + if (quotes == 0) { + quoteRep--; + } + if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + if (quoteUp == quoteDown) { + quotes++; + } + } else if (ch == quoteUp && chPrev != '\\') { + quotes++; + } else if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + } + } else if (state == SCE_PL_LONGQUOTE) { + if (!quoteDown && !isspace(ch)) { + quoteUp = ch; + quoteDown = opposite(quoteUp); + quotes++; + } else if (ch == quoteDown) { + quotes--; + if (quotes == 0) { + quoteRep--; + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + if (quoteUp == quoteDown) { + quotes++; + } + } + } else if (ch == quoteUp) { + quotes++; + } + } + + if (state == SCE_PL_DEFAULT) { // One of the above succeeded + if (ch == '#') { + state = SCE_PL_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_PL_STRING; + } else if (ch == '\'') { + state = SCE_PL_CHARACTER; + } else if (iswordstart(ch)) { + state = SCE_PL_WORD; + preferRE = false; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_PL_OPERATOR); + } + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc, state); +} + +LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc); diff --git a/contrib/src/stc/scintilla/src/LexPython.cxx b/contrib/src/stc/scintilla/src/LexPython.cxx new file mode 100644 index 0000000000..492d21c7d9 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexPython.cxx @@ -0,0 +1,281 @@ +// SciTE - Scintilla based Text Editor +// LexPython.cxx - lexer for Python +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void ClassifyWordPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) { + char s[100]; + bool wordIsNumber = isdigit(styler[start]); + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_P_IDENTIFIER; + if (0 == strcmp(prevWord, "class")) + chAttr = SCE_P_CLASSNAME; + else if (0 == strcmp(prevWord, "def")) + chAttr = SCE_P_DEFNAME; + else if (wordIsNumber) + chAttr = SCE_P_NUMBER; + else if (keywords.InList(s)) + chAttr = SCE_P_WORD; + // make sure that dot-qualifiers inside the word are lexed correct + else for (unsigned int i = 0; i < end - start + 1; i++) { + if (styler[start + i] == '.') { + styler.ColourTo(start + i - 1, chAttr); + styler.ColourTo(start + i, SCE_P_OPERATOR); + } + } + styler.ColourTo(end, chAttr); + strcpy(prevWord, s); +} + +static bool IsPyComment(Accessor &styler, int pos, int len) { + return len>0 && styler[pos]=='#'; +} + +static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + int lengthDoc = startPos + length; + + // Backtrack to previous line in case need to fix its fold status or tab whinging + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + if (startPos == 0) + initStyle = SCE_P_DEFAULT; + else + initStyle = styler.StyleAt(startPos-1); + } + } + + // Python uses a different mask because bad indentation is marked by oring with 32 + styler.StartAt(startPos, 127); + + WordList &keywords = *keywordlists[0]; + + bool fold = styler.GetPropertyInt("fold"); + int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level"); + char prevWord[200]; + prevWord[0] = '\0'; + if (length == 0) + return ; + int spaceFlags = 0; + + int state = initStyle & 31; + + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment); + if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) + indentCurrent |= SC_FOLDLEVELWHITEFLAG; + + char chPrev = ' '; + char chPrev2 = ' '; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + bool atStartLine = true; + for (int i = startPos; i < lengthDoc; i++) { + + if (atStartLine) { + char chBad = static_cast(64); + char chGood = static_cast(0); + char chFlags = chGood; + if (whingeLevel == 1) { + chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood; + } else if (whingeLevel == 2) { + chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood; + } else if (whingeLevel == 3) { + chFlags = (spaceFlags & wsSpace) ? chBad : chGood; + } else if (whingeLevel == 4) { + chFlags = (spaceFlags & wsTab) ? chBad : chGood; + } + styler.SetFlags(chFlags, static_cast(state)); + atStartLine = false; + } + + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) { + if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) { + // Perform colourisation of white space and triple quoted strings at end of each line to allow + // tab marking to work inside white space and triple quoted strings + styler.ColourTo(i, state); + } + + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsPyComment); + if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) + indentNext |= SC_FOLDLEVELWHITEFLAG; + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsPyComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + if (fold) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + atStartLine = true; + } + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + chPrev2 = ' '; + i += 1; + continue; + } + + if (state == SCE_P_STRINGEOL) { + if (ch != '\r' && ch != '\n') { + styler.ColourTo(i - 1, state); + state = SCE_P_DEFAULT; + } + } + if (state == SCE_P_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_P_WORD; + } else if (ch == '#') { + styler.ColourTo(i - 1, state); + state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, state); + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_P_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_STRING; + } + } else if (ch == '\'') { + styler.ColourTo(i - 1, state); + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_P_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_P_OPERATOR); + } + } else if (state == SCE_P_WORD) { + if (!iswordchar(ch)) { + ClassifyWordPy(styler.GetStartSegment(), i - 1, keywords, styler, prevWord); + state = SCE_P_DEFAULT; + if (ch == '#') { + state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE; + } else if (ch == '\"') { + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_P_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_STRING; + } + } else if (ch == '\'') { + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_P_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_P_OPERATOR); + } + } + } else { + if (state == SCE_P_COMMENTLINE || state == SCE_P_COMMENTBLOCK) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_STRING) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + styler.ColourTo(i - 1, state); + state = SCE_P_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_CHARACTER) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + styler.ColourTo(i - 1, state); + state = SCE_P_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_TRIPLE) { + if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_TRIPLEDOUBLE) { + if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } + } + chPrev2 = chPrev; + chPrev = ch; + } + if (state == SCE_P_WORD) { + ClassifyWordPy(styler.GetStartSegment(), lengthDoc, keywords, styler, prevWord); + } else { + styler.ColourTo(lengthDoc, state); + } +} + +LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc); diff --git a/contrib/src/stc/scintilla/src/LexSQL.cxx b/contrib/src/stc/scintilla/src/LexSQL.cxx new file mode 100644 index 0000000000..facd0e6b7b --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexSQL.cxx @@ -0,0 +1,156 @@ +// SciTE - Scintilla based Text Editor +// LexSQL.cxx - lexer for SQL +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(toupper(styler[start + i])); + s[i + 1] = '\0'; + } + char chAttr = SCE_C_IDENTIFIER; + if (wordIsNumber) + chAttr = SCE_C_NUMBER; + else { + if (keywords.InList(s)) + chAttr = SCE_C_WORD; + } + styler.ColourTo(end, chAttr); +} + +static void ColouriseSQLDoc(unsigned int startPos, int length, + int initStyle, WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + bool fold = styler.GetPropertyInt("fold"); + int lineCurrent = styler.GetLine(startPos); + int spaceFlags = 0; + + int state = initStyle; + char chPrev = ' '; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + unsigned int lengthDoc = startPos + length; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags); + int lev = indentCurrent; + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags); + if (indentCurrent < (indentNext & ~SC_FOLDLEVELWHITEFLAG)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + if (fold) { + styler.SetLevel(lineCurrent, lev); + } + } + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_C_WORD; + } else if (ch == '/' && chNext == '*') { + styler.ColourTo(i - 1, state); + state = SCE_C_COMMENT; + } else if (ch == '-' && chNext == '-') { + styler.ColourTo(i - 1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\'') { + styler.ColourTo(i - 1, state); + state = SCE_C_STRING; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_WORD) { + if (!iswordchar(ch)) { + classifyWordSQL(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_C_DEFAULT; + if (ch == '/' && chNext == '*') { + state = SCE_C_COMMENT; + } else if (ch == '-' && chNext == '-') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\'') { + state = SCE_C_STRING; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + } + } + } else { + if (state == SCE_C_COMMENT) { + if (ch == '/' && chPrev == '*') { + if (((i > (styler.GetStartSegment() + 2)) || ((initStyle == SCE_C_COMMENT) && + (styler.GetStartSegment() == startPos)))) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '\'') { + if ( chNext == '\'' ) { + i++; + } else { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + i++; + } + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + if (state == SCE_C_DEFAULT) { // One of the above succeeded + if (ch == '/' && chNext == '*') { + state = SCE_C_COMMENT; + } else if (ch == '-' && chNext == '-') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\'') { + state = SCE_C_STRING; + } else if (iswordstart(ch)) { + state = SCE_C_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + } + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); +} + +LexerModule lmSQL(SCLEX_SQL, ColouriseSQLDoc); diff --git a/contrib/src/stc/scintilla/src/LexVB.cxx b/contrib/src/stc/scintilla/src/LexVB.cxx new file mode 100644 index 0000000000..67dfa78427 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexVB.cxx @@ -0,0 +1,139 @@ +// SciTE - Scintilla based Text Editor +// LexVB.cxx - lexer for Visual Basic and VBScript +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') || + (styler[start] == '&' && tolower(styler[start+1]) == 'h'); + unsigned int i; + for (i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + } + s[i] = '\0'; + char chAttr = SCE_C_DEFAULT; + if (wordIsNumber) + chAttr = SCE_C_NUMBER; + else { + if (strcmp(s, "rem") == 0) + chAttr = SCE_C_COMMENTLINE; + else if (keywords.InList(s)) + chAttr = SCE_C_WORD; + } + styler.ColourTo(end, chAttr); + if (chAttr == SCE_C_COMMENTLINE) + return SCE_C_COMMENTLINE; + else + return SCE_C_DEFAULT; +} + +static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + int visibleChars = 0; + int state = initStyle; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + int lengthDoc = startPos + length; + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i += 1; + continue; + } + + if (ch == '\r' || ch == '\n') { + // End of line + if (state == SCE_C_COMMENTLINE || state == SCE_C_PREPROCESSOR) { + styler.ColourTo(i - 1, state); + state = SCE_C_DEFAULT; + } + visibleChars = 0; + } + if (!isspace(ch)) + visibleChars++; + + if (state == SCE_C_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_C_WORD; + } else if (ch == '\'') { + styler.ColourTo(i - 1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, state); + state = SCE_C_STRING; + } else if (ch == '#' && visibleChars == 1) { + // Preprocessor commands are alone on their line + styler.ColourTo(i - 1, state); + state = SCE_C_PREPROCESSOR; + } else if (ch == '&' && tolower(chNext) == 'h') { + styler.ColourTo(i - 1, state); + state = SCE_C_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_WORD) { + if (!iswordchar(ch)) { + state = classifyWordVB(styler.GetStartSegment(), i - 1, keywords, styler); + if (state == SCE_C_DEFAULT) { + if (ch == '\'') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } + } + } else { + if (state == SCE_C_STRING) { + // VB doubles quotes to preserve them + if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + if (state == SCE_C_DEFAULT) { // One of the above succeeded + if (ch == '\'') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (iswordstart(ch)) { + state = SCE_C_WORD; + } + } + } + } + styler.ColourTo(lengthDoc, state); +} + +LexerModule lmVB(SCLEX_VB, ColouriseVBDoc); diff --git a/contrib/src/stc/scintilla/src/LineMarker.cxx b/contrib/src/stc/scintilla/src/LineMarker.cxx index 9afccb8227..f54978c3fc 100644 --- a/contrib/src/stc/scintilla/src/LineMarker.cxx +++ b/contrib/src/stc/scintilla/src/LineMarker.cxx @@ -51,20 +51,6 @@ void LineMarker::Draw(Surface *surface, PRectangle &rc) { } else if (markType == SC_MARK_PLUS) { int armSize = dimOn2-2; - Point xpts[] = { - Point(centreX - armSize, centreY), - Point(centreX, centreY), - Point(centreX, centreY - armSize), - Point(centreX, centreY - armSize), - Point(centreX, centreY), - Point(centreX + armSize, centreY), - Point(centreX + armSize, centreY), - Point(centreX, centreY), - Point(centreX, centreY + armSize), - Point(centreX, centreY + armSize), - Point(centreX, centreY), - Point(centreX - armSize, centreY), - }; Point pts[] = { Point(centreX - armSize, centreY - 1), Point(centreX - 1, centreY - 1), @@ -90,12 +76,6 @@ void LineMarker::Draw(Surface *surface, PRectangle &rc) { Point(centreX + armSize, centreY +1), Point(centreX - armSize, centreY + 1), }; - Point xpts[] = { - Point(centreX - armSize, centreY), - Point(centreX + armSize, centreY), - Point(centreX + armSize, centreY), - Point(centreX - armSize, centreY), - }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); diff --git a/contrib/src/stc/scintilla/src/PosRegExp.cxx b/contrib/src/stc/scintilla/src/PosRegExp.cxx new file mode 100644 index 0000000000..ea719b7c28 --- /dev/null +++ b/contrib/src/stc/scintilla/src/PosRegExp.cxx @@ -0,0 +1,1181 @@ +#include +#include +#include +#include + +#include "PosRegExp.h" + +//Up: /[A-Z \x80-\x9f \xf0 ]/x +//Lo: /[a-z \xa0-\xaf \xe0-\xef \xf1 ]/x +//Wd: /[\d _ A-Z a-z \xa0-\xaf \xe0-\xf1 \x80-\x9f]/x +//* // Dos866 +SCharData UCData = {0x0, 0x0, 0x7fffffe, 0x0, 0xffffffff, 0x0, 0x0, 0x10000}, + LCData = {0x0, 0x0, 0x0, 0x7fffffe, 0x0, 0xffff, 0x0, 0x2ffff}, + WdData = {0x0, 0x3ff0000, 0x87fffffe, 0x7fffffe, 0xffffffff, 0xffff, 0x0, 0x3ffff}, + DigData = {0x0, 0x3ff0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +/*/ // cp1251 +SCharData UCData = {0x0, 0x0, 0x7fffffe, 0x0, 0x0, 0x0, 0xffffffff, 0x0}, + LCData = {0x0, 0x0, 0x0, 0x7fffffe, 0x0, 0x0, 0x0, 0xffffffff}, + WdData = {0x0, 0x3ff0000, 0x87fffffe, 0x7fffffe, 0x0, 0x0, 0xffffffff, 0xffffffff}, + DigData = {0x0, 0x3ff0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +//*/ + +/////////////////////////////////////////////// + +int GetNumber(int *str,int s,int e) { + int r = 1, num = 0; + if (e < s) return -1; + for(int i = e-1; i >= s; i--) { + if (str[i] > '9' || str[i] < '0') return -1; + num += (str[i] - 0x30)*r; + r *= 10; + }; + return num; + /* + char tmp[20]; + double Res; + if (e == s) return -1; + for (int i = s;i < e;i++) + tmp[i-s] = (char)Str[i]; + tmp[e-s] = 0; + GetNumber(tmp,&Res); + return (int)Res; + */ +}; + +bool IsDigit(char Symb) { + return DigData.GetBit(Symb); +}; +bool IsWord(char Symb) { + return WdData.GetBit(Symb); +}; +bool IsUpperCase(char Symb) { + return UCData.GetBit(Symb); +}; +bool IsLowerCase(char Symb) { + return LCData.GetBit(Symb); +}; +char LowCase(char Chr) { + if (UCData.GetBit(Chr)) + return Chr+0x20; + return Chr; +}; + +/////////////////////////////////////////////// + +SRegInfo::SRegInfo() { + Next = Parent = 0; + un.Param = 0; + Op = ReEmpty; +}; +SRegInfo::~SRegInfo() { + if (Next) delete Next; + if (un.Param) + switch(Op) { + case ReEnum: + case ReNEnum: + delete un.ChrClass; + break; + default: + if (Op > ReBlockOps && Op < ReSymbolOps || Op == ReBrackets) + delete un.Param; + break; + }; +}; + +/////////////////////////////////////////////// + +void SCharData::SetBit(unsigned char Bit) { + int p = Bit/8; + CArr[p] |= (1 << Bit%8); +}; +void SCharData::ClearBit(unsigned char Bit) { + int p = Bit/8; + CArr[p] &= ~(1 << Bit%8); +}; +bool SCharData::GetBit(unsigned char Bit) { + int p = (unsigned char)Bit/8; + return (CArr[p] & (1 << Bit%8))!=0; +}; + +///////////////////////////////////////////////////////////////// +////////////////////// RegExp Class /////////////////////////// +///////////////////////////////////////////////////////////////// + +PosRegExp::PosRegExp() { + Info = 0; + Exprn = 0; + NoMoves = false; + Error = true; + FirstChar = 0; + CurMatch = 0; +}; +PosRegExp::~PosRegExp() { + if (Info) delete Info; +}; + +bool PosRegExp::SetExpr(const char *Expr) { + if (!this) return false; + Error = true; + CurMatch = 0; + if (SetExprLow(Expr)) Error = false; + return !Error; +}; +bool PosRegExp::isok() { + return !Error; +}; + + +bool PosRegExp::SetExprLow(const char *Expr) { + int Len = strlen(Expr); + bool Ok = false; + int i,j,s = 0,pos,tmp; + int EnterBr = 0,EnterGr = 0,EnterFg = 0; + + if (Info) delete Info; + Info = new SRegInfo; + Exprn = new int[Len]; + + NoCase = false; + Extend = false; + if (Expr[0] == '/') s++; + else return false; + + for (i = Len; i > 0 && !Ok;i--) + if (Expr[i] == '/') { + Len = i-s; + Ok = true; + for (int j = i+1; Expr[j]; j++) { + if (Expr[j] == 'i') NoCase = true; + if (Expr[j] == 'x') Extend = true; + }; + }; + if (!Ok) return false; + + //////////////////////////////// + for (j = 0,pos = 0; j < Len; j++,pos++) { + if (Extend && Expr[j+s] == ' ') { + pos--; + continue; + }; + + Exprn[pos] = (int)(unsigned char)Expr[j+s]; + + if (Expr[j+s] == BackSlash) { + switch (Expr[j+s+1]) { + case 'd': + Exprn[pos] = ReDigit; + break; + case 'D': + Exprn[pos] = ReNDigit; + break; + case 'w': + Exprn[pos] = ReWordSymb; + break; + case 'W': + Exprn[pos] = ReNWordSymb; + break; + case 's': + Exprn[pos] = ReWSpace; + break; + case 'S': + Exprn[pos] = ReNWSpace; + break; + case 'u': + Exprn[pos] = ReUCase; + break; + case 'l': + Exprn[pos] = ReNUCase; + break; + case 't': + Exprn[pos] = '\t'; + break; + case 'n': + Exprn[pos] = '\n'; + break; + case 'r': + Exprn[pos] = '\r'; + break; + case 'b': + Exprn[pos] = ReWBound; + break; + case 'B': + Exprn[pos] = ReNWBound; + break; + case 'c': + Exprn[pos] = RePreNW; + break; + case 'm': + Exprn[pos] = ReStart; + break; + case 'M': + Exprn[pos] = ReEnd; + break; + case 'x': + tmp = toupper(Expr[j+s+2])-0x30; + tmp = (tmp>9?tmp-7:tmp)<<4; + tmp += (toupper(Expr[j+s+3])-0x30)>9?toupper(Expr[j+s+3])-0x37:(toupper(Expr[j+s+3])-0x30); + Exprn[pos] = tmp; + j+=2; + break; + case 'y': + tmp = Expr[j+s+2] - 0x30; + if (tmp >= 0 && tmp <= 9) { + if (tmp == 1) { + tmp = 10 + Expr[j+s+3] - 0x30; + if (tmp >= 10 && tmp <= 19) j++; + else tmp = 1; + }; + Exprn[pos] = ReBkTrace + tmp; + j++; + break; + }; + default: + tmp = Expr[j+s+1] - 0x30; + if (tmp >= 0 && tmp <= 9) { + if (tmp == 1) { + tmp = 10 + Expr[j+s+2] - 0x30; + if (tmp >= 10 && tmp <= 19) j++; + else tmp = 1; + }; + Exprn[pos] = ReBkBrack + tmp; + break; + } else + Exprn[pos] = Expr[j+s+1]; + break; + }; + j++; + continue; + }; + if (Expr[j+s] == ']') { + Exprn[pos] = ReEnumE; + if (EnterFg || !EnterGr) return false; + EnterGr--; + }; + if (Expr[j+s] == '-' && EnterGr) Exprn[pos] = ReFrToEnum; + + if (EnterGr) continue; + + if (Expr[j+s] == '[' && Expr[j+s+1] == '^') { + Exprn[pos] = ReNEnumS; + if (EnterFg) return false; + EnterGr++; + j++; + continue; + }; + if (Expr[j+s] == '*' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGMul; + j++; + continue; + }; + if (Expr[j+s] == '+' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGPlus; + j++; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGQuest; + j++; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '#' && + Expr[j+s+2]>='0' && Expr[j+s+2]<='9') { + Exprn[pos] = ReBehind+Expr[j+s+2]-0x30; + j+=2; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '~' && + Expr[j+s+2]>='0' && Expr[j+s+2]<='9') { + Exprn[pos] = ReNBehind+Expr[j+s+2]-0x30; + j+=2; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '=') { + Exprn[pos] = ReAhead; + j++; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '!') { + Exprn[pos] = ReNAhead; + j++; + continue; + }; + + if (Expr[j+s] == '(') { + Exprn[pos] = ReLBrack; + if (EnterFg) return false; + EnterBr++; + }; + if (Expr[j+s] == ')') { + Exprn[pos] = ReRBrack; + if (!EnterBr || EnterFg) return false; + EnterBr--; + }; + if (Expr[j+s] == '[') { + Exprn[pos] = ReEnumS; + if (EnterFg) return false; + EnterGr++; + }; + if (Expr[j+s] == '{') { + Exprn[pos] = ReRangeS; + if (EnterFg) return false; + EnterFg++; + }; + if (Expr[j+s] == '}' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGRangeE; + if (!EnterFg) return false; + EnterFg--; + j++; + continue; + }; + if (Expr[j+s] == '}') { + Exprn[pos] = ReRangeE; + if (!EnterFg) return false; + EnterFg--; + }; + + if (Expr[j+s] == '^') Exprn[pos] = ReSoL; + if (Expr[j+s] == '$') Exprn[pos] = ReEoL; + if (Expr[j+s] == '.') Exprn[pos] = ReAnyChr; + if (Expr[j+s] == '*') Exprn[pos] = ReMul; + if (Expr[j+s] == '+') Exprn[pos] = RePlus; + if (Expr[j+s] == '?') Exprn[pos] = ReQuest; + if (Expr[j+s] == '|') Exprn[pos] = ReOr; + }; + if (EnterGr || EnterBr || EnterFg) return false; + + Info->Op = ReBrackets; + Info->un.Param = new SRegInfo; + Info->s = CurMatch++; + + if (!SetStructs(Info->un.Param,0,pos)) return false; + Optimize(); + delete Exprn; + return true; +}; + +void PosRegExp::Optimize() { + PRegInfo Next = Info; + FirstChar = 0; + while(Next) { + if (Next->Op == ReBrackets || Next->Op == RePlus || Next->Op == ReNGPlus) { + Next = Next->un.Param; + continue; + }; + if (Next->Op == ReSymb) { + if (Next->un.Symb & 0xFF00 && Next->un.Symb != ReSoL && Next->un.Symb != ReWBound) + break; + FirstChar = Next->un.Symb; + break; + }; + break; + }; +}; + +bool PosRegExp::SetStructs(PRegInfo &re,int start,int end) { + PRegInfo Next,Prev,Prev2; + int comma,st,en,ng,i, j,k; + int EnterBr; + bool Add; + + if (end - start < 0) return false; + Next = re; + for (i = start; i < end; i++) { + Add = false; + // Ops + if (Exprn[i] > ReBlockOps && Exprn[i] < ReSymbolOps) { + Next->un.Param = 0; + Next->Op = (EOps)Exprn[i]; + Add = true; + }; + // {n,m} + if (Exprn[i] == ReRangeS) { + st = i; + en = -1; + comma = -1; + ng = 0; + for (j = i;j < end;j++) { + if (Exprn[j] == ReNGRangeE) { + en = j; + ng = 1; + break; + }; + if (Exprn[j] == ReRangeE) { + en = j; + break; + }; + if ((char)Exprn[j] == ',') + comma = j; + }; + if (en == -1) return false; + if (comma == -1) comma = en; + Next->s = (char)GetNumber(Exprn,st+1,comma); + if (comma != en) + Next->e = (char)GetNumber(Exprn,comma+1,en); + else + Next->e = Next->s; + Next->un.Param = 0; + Next->Op = ng?ReNGRangeNM:ReRangeNM; + if (en-comma == 1) { + Next->e = -1; + Next->Op = ng?ReNGRangeN:ReRangeN; + }; + i=j; + Add = true; + }; + // [] [^] + if (Exprn[i] == ReEnumS || Exprn[i] == ReNEnumS) { + Next->Op = (Exprn[i] == ReEnumS)?ReEnum:ReNEnum; + for (j = i+1;j < end;j++) { + if (Exprn[j] == ReEnumE) + break; + }; + if (j == end) return false; + Next->un.ChrClass = new SCharData; + memset(Next->un.ChrClass, 0, 32); + for (j = i+1;Exprn[j] != ReEnumE;j++) { + if (Exprn[j+1] == ReFrToEnum) { + for (i = (Exprn[j]&0xFF); i < (Exprn[j+2]&0xFF);i++) + Next->un.ChrClass->SetBit(i&0xFF); + j++; + continue; + }; + switch(Exprn[j]) { + case ReDigit: + for (k = 0x30;k < 0x40;k++) + if (IsDigit((char)k)) + Next->un.ChrClass->SetBit(k); + break; + case ReNDigit: + for (k = 0x30;k < 0x40;k++) + if (!IsDigit((char)k)) + Next->un.ChrClass->SetBit(k); + Next->un.ChrClass->ClearBit(0x0a); + Next->un.ChrClass->ClearBit(0x0d); + break; + case ReWordSymb: + for (k = 0;k < 256;k++) + if (IsWord((char)k)) + Next->un.ChrClass->SetBit(k); + break; + case ReNWordSymb: + for (k = 0;k < 256;k++) + if (!IsWord((char)k)) + Next->un.ChrClass->SetBit(k); + Next->un.ChrClass->ClearBit(0x0a); + Next->un.ChrClass->ClearBit(0x0d); + break; + case ReWSpace: + Next->un.ChrClass->SetBit(0x20); + Next->un.ChrClass->SetBit(0x09); + break; + case ReNWSpace: + memset(Next->un.ChrClass->IArr, 0xFF, 32); + Next->un.ChrClass->ClearBit(0x20); + Next->un.ChrClass->ClearBit(0x09); + Next->un.ChrClass->ClearBit(0x0a); + Next->un.ChrClass->ClearBit(0x0d); + break; + default: + if (!(Exprn[j]&0xFF00)) + Next->un.ChrClass->SetBit(Exprn[j]&0xFF); + break; + }; + }; + Add = true; + i=j; + }; + // ( ... ) + if (Exprn[i] == ReLBrack) { + EnterBr = 1; + for (j = i+1;j < end;j++) { + if (Exprn[j] == ReLBrack) EnterBr++; + if (Exprn[j] == ReRBrack) EnterBr--; + if (!EnterBr) break; + }; + if (EnterBr) return false; + Next->Op = ReBrackets; + Next->un.Param = new SRegInfo; + Next->un.Param->Parent = Next; + Next->s = CurMatch++; + if (CurMatch > MatchesNum) CurMatch = MatchesNum; + if (!SetStructs(Next->un.Param,i+1,j)) return false; + Add = true; + i=j; + }; + if ((Exprn[i]&0xFF00) == ReBkTrace) { + Next->Op = ReBkTrace; + Next->un.Symb = Exprn[i]&0xFF; + Add = true; + }; + if ((Exprn[i]&0xFF00) == ReBkBrack) { + Next->Op = ReBkBrack; + Next->un.Symb = Exprn[i]&0xFF; + Add = true; + }; + if ((Exprn[i]&0xFF00) == ReBehind) { + Next->Op = ReBehind; + Next->s = Exprn[i]&0xFF; + Add = true; + }; + if ((Exprn[i]&0xFF00) == ReNBehind) { + Next->Op = ReNBehind; + Next->s = Exprn[i]&0xFF; + Add = true; + }; + // Chars + if (Exprn[i] >= ReAnyChr && Exprn[i] < ReTemp || Exprn[i] < 0x100) { + Next->Op = ReSymb; + Next->un.Symb = Exprn[i]; + Add = true; + }; + // Next + if (Add && i != end-1) { + Next->Next = new SRegInfo; + Next->Next->Parent = Next->Parent; + Next = Next->Next; + }; + }; + Next = re; + Prev = Prev2 = 0; + while(Next) { + if (Next->Op > ReBlockOps && Next->Op < ReSymbolOps) { + if (!Prev) return false; + if (!Prev2) re = Next; + else Prev2->Next = Next; + //if (Prev->Op > ReBlockOps && Prev->Op < ReSymbolOps) return false; + Prev->Parent = Next; + Prev->Next = 0; + Next->un.Param = Prev; + Prev = Prev2; + }; + Prev2 = Prev; + Prev = Next; + Next = Next->Next; + }; + + return true; +}; + +///////////////////////////////////////////////////////////////// +///////////////////////// Parsing ///////////////////////////// +///////////////////////////////////////////////////////////////// + +bool PosRegExp::CheckSymb(int Symb,bool Inc) { + bool Res; + char ch; + switch(Symb) { + case ReAnyChr: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReSoL: + if (posStart == posParse) + return true; + ch = CharAt(posParse-1,param); + return ch == '\n' || ch == '\r'; + case ReEoL: + if (posEnd == posParse) + return true; + ch = CharAt(posParse,param); + return ch == '\n' || ch == '\r'; + case ReDigit: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = (ch >= 0x30 && ch <= 0x39); + if (Res && Inc) posParse++; + return Res; + case ReNDigit: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = !(ch >= 0x30 && ch <= 0x39) && ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReWordSymb: + if (posParse >= posEnd) return false; + Res = IsWord(CharAt(posParse,param)); + if (Res && Inc) posParse++; + return Res; + case ReNWordSymb: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = !IsWord(ch) && ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReWSpace: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = (ch == 0x20 || ch == '\t'); + if (Res && Inc) posParse++; + return Res; + case ReNWSpace: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = !(ch == 0x20 || ch == '\t') && ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReUCase: + if (posParse >= posEnd) return false; + Res = IsUpperCase(CharAt(posParse,param)); + if (Res && Inc) posParse++; + return Res; + case ReNUCase: + if (posParse >= posEnd) return false; + Res = IsLowerCase(CharAt(posParse,param)); + if (Res && Inc) posParse++; + return Res; + case ReWBound: + if (posParse >= posEnd) return true; + ch = CharAt(posParse,param); + return IsWord(CharAt(posParse,param)) && (posParse == posStart || !IsWord(CharAt(posParse-1,param))); + case ReNWBound: + if (posParse >= posEnd) return true; + return !IsWord(CharAt(posParse,param)) && IsWord(CharAt(posParse-1,param)); + case RePreNW: + if (posParse >= posEnd) return true; + return (posParse == posStart || !IsWord(CharAt(posParse-1,param))); + case ReStart: + Matches->s[0] = (posParse-posStart); + return true; + case ReEnd: + Matches->e[0] = (posParse-posStart); + return true; + default: + if ((Symb & 0xFF00) || posParse >= posEnd) return false; + if (NoCase) { + if (LowCase(CharAt(posParse,param)) != LowCase((char)Symb&0xFF)) return false; + } else + if (CharAt(posParse,param) != (char)(Symb&0xFF)) return false; + if (Inc) posParse++; + return true; + }; +} + +bool PosRegExp::LowParseRe(PRegInfo &Next) { + PRegInfo OrNext; + int i,match,sv; + int posStr; + + switch(Next->Op) { + case ReSymb: + if (!CheckSymb(Next->un.Symb,true)) return false; + break; + case ReEmpty: + break; + case ReBkTrace: + if (!posBkStr | !BkTrace) return false; + sv = Next->un.Symb; + posStr = posParse; + for (i = BkTrace->s[sv]; i < BkTrace->e[sv]; i++) { + if (CharAt(posStr,param) != CharAt(posBkStr+i,param) || posEnd == posStr) return false; + posStr++; + }; + posParse = posStr; + break; + case ReBkBrack: + sv = Next->un.Symb; + posStr = posParse; + if (Matches->s[sv] == -1 || Matches->e[sv] == -1) return false; + for (i = Matches->s[sv]; i < Matches->e[sv]; i++) { + if (CharAt(posStr,param) != CharAt(posStart+i,param) || posEnd == posStr) return false; + posStr++; + }; + posParse = posStr; + break; + case ReBehind: + sv = Next->s; + posStr = posParse; + posParse -= sv; + if (!LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReNBehind: + sv = Next->s; + posStr = posParse; + posParse -= sv; + if (LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReAhead: + posStr = posParse; + if (!LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReNAhead: + posStr = posParse; + if (LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReEnum: + if (posParse >= posEnd) return false; + if (!Next->un.ChrClass->GetBit(CharAt(posParse,param))) return false; + posParse++; + break; + case ReNEnum: + if (posParse >= posEnd) return false; + if (Next->un.ChrClass->GetBit(CharAt(posParse,param))) return false; + posParse++; + break; + case ReBrackets: + match = Next->s; + sv = posParse-posStart; + posStr = posParse; + if (LowParse(Next->un.Param)) { + if (match || (Matches->s[match] == -1)) + Matches->s[match] = sv; + if (match || (Matches->e[match] == -1)) + Matches->e[match] = posParse-posStart; + return true; + }; + posParse = posStr; + return false; + case ReMul: + posStr = posParse; + while (LowParse(Next->un.Param)); + while(!LowCheckNext(Next) && posStr < posParse) posParse--; + break; + case ReNGMul: + do { + if (LowCheckNext(Next)) break; + } while (LowParse(Next->un.Param)); + break; + case RePlus: + posStr = posParse; + match = false; + while (LowParse(Next->un.Param)) + match = true; + if (!match) return false; + while(!LowCheckNext(Next) && posStr < posParse) posParse--; + break; + case ReNGPlus: + if (!LowParse(Next->un.Param)) return false; + do { + if (LowCheckNext(Next)) break; + } while (LowParse(Next->un.Param)); + break; + case ReQuest: + LowParse(Next->un.Param); + break; + case ReNGQuest: + if (LowCheckNext(Next)) break; + if (!LowParse(Next->un.Param)) return false; + break; + case ReOr: + OrNext = Next; + // posStr = posParse; + if (LowParse(Next->un.Param)) { + while (OrNext && OrNext->Op == ReOr) + OrNext = OrNext->Next; + /*if (!LowCheckNext(OrNext)){ + posParse = posStr; + OrNext = Next; + };*/ + }; + Next = OrNext; + break; + case ReRangeN: + posStr = posParse; + i = 0; + while (LowParse(Next->un.Param)) i++; // ??? + do { + if (i < Next->s) { + posParse = posStr; + return false; + }; + i--; + } while(!LowCheckNext(Next) && posStr < posParse--); + break; + case ReNGRangeN: + posStr = posParse; + i = 0; + while (LowParse(Next->un.Param)) { + i++; + if (i >= Next->s && LowCheckNext(Next)) // ??? + break; + }; + if (i < Next->s) { + posParse = posStr; + return false; + }; + break; + case ReRangeNM: + posStr = posParse; + i = 0; + while (i < Next->s && LowParse(Next->un.Param)) // ??? + i++; + if (i < Next->s) { + posParse = posStr; + return false; + }; + while (i < Next->e && LowParse(Next->un.Param)) // ??? + i++; + + while(!LowCheckNext(Next)) { + i--; + posParse--; + if (i < Next->s) { + posParse = posStr; + return false; + }; + }; + break; + case ReNGRangeNM: + posStr = posParse; + i = 0; + while (i < Next->s && LowParse(Next->un.Param)) // ??? + i++; + if (i < Next->s) { + posParse = posStr; + return false; + }; + while(!LowCheckNext(Next)) { + i++; + if (!LowParse(Next->un.Param) || i > Next->e) { // ??? + posParse = posStr; + return false; + }; + }; + break; + }; + return true; +}; + +bool PosRegExp::LowCheckNext(PRegInfo Re) { + PRegInfo Next; + int tmp = posParse; + Next = Re; + do { + if (Next && Next->Op == ReOr) + while (Next && Next->Op == ReOr) + Next = Next->Next; + if (Next->Next && !LowParse(Next->Next)) { + posParse = tmp; + Ok = false; + return false; + }; + Next = Next->Parent; + } while(Next); + posParse = tmp; + if (Ok != false) Ok = true; + return true; +}; + +bool PosRegExp::LowParse(PRegInfo Re) { + while(Re && posParse <= posEnd) { + if (!LowParseRe(Re)) return false; + if (Re) Re = Re->Next; + }; + return true; +}; + +bool PosRegExp::QuickCheck() { + if (!NoMoves || !FirstChar) + return true; + switch(FirstChar) { + case ReSoL: + if (posParse != posStart) return false; + return true; + case ReWBound: + return IsWord(CharAt(posParse,param)) && (posParse == posStart || !IsWord(CharAt(posParse-1,param))); + default: + if (NoCase && LowCase(CharAt(posParse,param)) != LowCase(FirstChar)) return false; + if (!NoCase && CharAt(posParse,param) != (char)FirstChar) return false; + return true; + }; +}; + +bool PosRegExp::ParseRe(int posStr) { + if (Error) return false; + + posParse = posStr; + if (!QuickCheck()) return false; + + for (int i = 0; i < MatchesNum; i++) + Matches->s[i] = Matches->e[i] = -1; + Matches->CurMatch = CurMatch; + + Ok = -1; + //try{ + do { + if (!LowParse(Info)) { + if (NoMoves) return false; + } else + return true; + posParse = ++posStr; + } while(posParse != posEnd+1); + return false; + //}__except(){ + // return true; + //}; +} +; + +bool PosRegExp::Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves) { + if (!this) return false; + + bool s = NoMoves; + if (Moves != -1) NoMoves = Moves!=0; + posStart = posSol; + posEnd = posEol; + Matches = Mtch; + bool r = ParseRe(posStr); + NoMoves = s; + return r; +}; + +bool PosRegExp::Parse(int posStr, int posStop, PMatches Mtch) { + if (!this) return false; + posStart = posStr; + posEnd = posStop; + Matches = Mtch; + return ParseRe(posStr); +}; + +bool PosRegExp::SetNoMoves(bool Moves) { + NoMoves = Moves; + return true; +}; + +bool PosRegExp::SetBkTrace(int posStr,PMatches Trace) { + BkTrace = Trace; + posBkStr = posStr; + return true; +}; + +#define EVAL_MATCHES 16 +#define EVAL_CHUNKSIZE 256 + +#define EVAL_LOWERCASE 1 +#define EVAL_UPPERCASE 2 +#define EVAL_LOWERCASE_NEXT 4 +#define EVAL_UPPERCASE_NEXT 8 + +bool PosRegExp::Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res) { + int length, + newlength, + chunklength, + value, + size, + src, + end; + unsigned flag; + char ch, + *dest, + *pool; + + size = EVAL_CHUNKSIZE; + pool = (char*) malloc (size); + dest = pool; + length = 0; + flag = 0; + while (*Expr) { + switch (ch = *Expr++) { + case '\\': + switch (ch = *Expr++) { + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + ch -= ('A' - '0'); + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + value = ch - '0'; + if (Mtch->s[value] != -1 && value < EVAL_MATCHES) { + chunklength = Mtch->e[value] - Mtch->s[value]; + if (chunklength) { + newlength = chunklength + length; + if (newlength > size) { + do + size += EVAL_CHUNKSIZE; + while (size < newlength); + pool = (char*) realloc (pool, size); + dest = pool + length; + } + length = newlength; + src = posStr + Mtch->s[value]; + end = posStr + Mtch->e[value]; + if (flag & EVAL_UPPERCASE) { + if (flag & EVAL_LOWERCASE_NEXT) { + *dest++ = tolower (CharAt(src++,param)); + flag &= ~EVAL_LOWERCASE_NEXT; + } + while (src < end) + *dest++ = toupper (CharAt(src++,param)); + } else if (flag & EVAL_LOWERCASE) { + if (flag & EVAL_UPPERCASE_NEXT) { + *dest++ = toupper (CharAt(src++,param)); + flag &= ~EVAL_UPPERCASE_NEXT; + } + while (src < end) + *dest++ = tolower (CharAt(src++,param)); + } else { + if (flag & EVAL_LOWERCASE_NEXT) { + *dest++ = tolower (CharAt(src++,param)); + flag &= ~EVAL_LOWERCASE_NEXT; + } else if (flag & EVAL_UPPERCASE_NEXT) { + *dest++ = toupper (CharAt(src++,param)); + flag &= ~EVAL_UPPERCASE_NEXT; + } + while (src < end) + *dest++ = CharAt(src++,param); + } + } + } else + goto error; + continue; + case '\0': + goto error; + case 'r': + ch = '\r'; + break; + case 'n': + ch = '\n'; + break; + case 'b': + ch = '\b'; + break; + case 'a': + ch = '\a'; + break; + case 't': + ch = '\t'; + break; + case 'U': + flag |= EVAL_UPPERCASE; + continue; + case 'u': + flag |= EVAL_UPPERCASE_NEXT; + continue; + case 'L': + flag |= EVAL_LOWERCASE; + continue; + case 'l': + flag |= EVAL_LOWERCASE_NEXT; + continue; + case 'Q': + case 'q': + flag &= ~(EVAL_UPPERCASE | EVAL_LOWERCASE); + continue; + case 'x': + { + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + value = value + '0' - 'A' + 10; + if (value > 15) + goto error; + ch = value << 4; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + value = value + '0' - 'A' + 10; + if (value > 15) + goto error; + Expr++; + ch |= value; + break; + } + case 'd': + { + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch = value * 100; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch += value * 10; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch += value; + Expr++; + break; + } + case 'o': + { + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch = value << 6; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch += value << 3; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch |= value; + Expr++; + /* break; */ + } + /* default: + break; */ + } + default: + if (++length > size) { + do + size += EVAL_CHUNKSIZE; + while (size < length); + pool = (char*) realloc (pool, size); + dest = pool + length - 1; + } + if (flag & EVAL_LOWERCASE_NEXT) { + *dest++ = tolower (ch); + flag &= ~EVAL_LOWERCASE_NEXT; + } else if (flag & EVAL_UPPERCASE_NEXT) { + *dest++ = toupper (ch); + flag &= ~EVAL_UPPERCASE_NEXT; + } else if (flag & EVAL_UPPERCASE) + *dest++ = toupper (ch); + else if (flag & EVAL_LOWERCASE) + *dest++ = tolower (ch); + else + *dest++ = ch; + } + } + if (++length > size) { + do + size += EVAL_CHUNKSIZE; + while (size < length); + pool = (char*) realloc (pool, size); + dest = pool + length - 1; + } + *dest = '\0'; + *Res = pool; + return true; +error: + free (pool); + return false; +} diff --git a/contrib/src/stc/scintilla/src/PropSet.cxx b/contrib/src/stc/scintilla/src/PropSet.cxx index 7e2a906a47..a58d143164 100644 --- a/contrib/src/stc/scintilla/src/PropSet.cxx +++ b/contrib/src/stc/scintilla/src/PropSet.cxx @@ -24,9 +24,22 @@ bool EqualCaseInsensitive(const char *a, const char *b) { #endif } +SString::size_type SString::npos = -1; + +inline unsigned int HashString(const char *s) { + unsigned int ret = 0; + while (*s) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; +} + // Get a line of input. If end of line escaped with '\\' then continue reading. static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { bool continuation = true; + s[0] = '\0'; while ((len > 1) && lenData > 0) { char ch = *fpc; fpc++; @@ -38,7 +51,7 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { fpc++; lenData--; } - *s++ = '\0'; + *s = '\0'; return true; } } else if ((ch == '\\') && (lenData > 0) && ((*fpc == '\r') || (*fpc == '\n'))) { @@ -46,6 +59,7 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { } else { continuation = false; *s++ = ch; + *s = '\0'; len--; } } @@ -54,47 +68,39 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { PropSet::PropSet() { superPS = 0; - size = 10; - used = 0; - vals = new char * [size]; + for (int root=0; root < hashRoots; root++) + props[root] = 0; } PropSet::~PropSet() { superPS = 0; Clear(); - delete []vals; -} - -void PropSet::EnsureCanAddEntry() { - if (used >= size - 2) { - int newsize = size + 10; - char **newvals = new char * [newsize]; - - for (int i = 0; i < used; i++) { - newvals[i] = vals[i]; - } - delete []vals; - vals = newvals; - size = newsize; - } } void PropSet::Set(const char *key, const char *val) { - EnsureCanAddEntry(); - for (int i = 0; i < used; i += 2) { - if (EqualCaseInsensitive(vals[i], key)) { + unsigned int hash = HashString(key); + for (Property *p=props[hash % hashRoots]; p; p=p->next) { + if ((hash == p->hash) && (0 == strcmp(p->key, key))) { // Replace current value - delete [](vals[i + 1]); - vals[i + 1] = StringDup(val); + delete [](p->val); + p->val = StringDup(val); return; } } // Not found - vals[used++] = StringDup(key); - vals[used++] = StringDup(val); + Property *pNew = new Property; + if (pNew) { + pNew->hash = HashString(key); + pNew->key = StringDup(key); + pNew->val = StringDup(val); + pNew->next = props[hash % hashRoots]; + props[hash % hashRoots] = pNew; + } } void PropSet::Set(char *keyval) { + while (isspace(*keyval)) + keyval++; char *eqat = strchr(keyval, '='); if (eqat) { *eqat = '\0'; @@ -104,11 +110,12 @@ void PropSet::Set(char *keyval) { } SString PropSet::Get(const char *key) { - for (int i = 0; i < used; i += 2) { - if (EqualCaseInsensitive(vals[i], key)) { - return vals[i + 1]; - } - } + unsigned int hash = HashString(key); + for (Property *p=props[hash % hashRoots]; p; p=p->next) { + if ((hash == p->hash) && (0 == strcmp(p->key, key))) { + return p->val; + } + } if (superPS) { // Failed here, so try in base property set return superPS->Get(key); @@ -117,17 +124,47 @@ SString PropSet::Get(const char *key) { } } +SString PropSet::GetExpanded(const char *key) { + SString val = Get(key); + return Expand(val.c_str()); +} + +SString PropSet::Expand(const char *withvars) { + char *base = StringDup(withvars); + char *cpvar = strstr(base, "$("); + while (cpvar) { + char *cpendvar = strchr(cpvar, ')'); + if (cpendvar) { + int lenvar = cpendvar - cpvar - 2; // Subtract the $() + char *var = StringDup(cpvar+2, lenvar); + SString val = GetExpanded(var); + int newlenbase = strlen(base) + val.length() - lenvar; + char *newbase = new char[newlenbase]; + strncpy(newbase, base, cpvar - base); + strcpy(newbase + (cpvar - base), val.c_str()); + strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1); + delete []var; + delete []base; + base = newbase; + } + cpvar = strstr(base, "$("); + } + SString sret = base; + delete []base; + return sret; +} + int PropSet::GetInt(const char *key, int defaultValue) { SString val = Get(key); if (val.length()) - return Get(key).value(); + return val.value(); else return defaultValue; } -bool isprefix(const char *target, const char *prefix) { +inline bool isprefix(const char *target, const char *prefix) { while (*target && *prefix) { - if (toupper(*target) != toupper(*prefix)) + if (*target != *prefix) return false; target++; prefix++; @@ -144,64 +181,63 @@ bool issuffix(const char *target, const char *suffix) { if (lensuffix > lentarget) return false; for (int i = lensuffix - 1; i >= 0; i--) { - if (toupper(target[i + lentarget - lensuffix]) != toupper(suffix[i])) + if (target[i + lentarget - lensuffix] != suffix[i]) return false; } return true; } SString PropSet::GetWild(const char *keybase, const char *filename) { - for (int i = 0; i < used; i += 2) { - if (isprefix(vals[i], keybase)) { - char *orgkeyfile = vals[i] + strlen(keybase); - char *keyfile = NULL; + for (int root=0; root < hashRoots; root++) { + for (Property *p=props[root]; p; p=p->next) { + if (isprefix(p->key, keybase)) { + char *orgkeyfile = p->key + strlen(keybase); + char *keyfile = NULL; - if (strstr(orgkeyfile, "$(") == orgkeyfile) { - char *cpendvar = strchr(orgkeyfile, ')'); - if (cpendvar) { - int lenvar = cpendvar - orgkeyfile - 2; // Subtract the $() - char *var = static_cast(malloc(lenvar + 1)); - strncpy(var, orgkeyfile + 2, lenvar); - var[lenvar] = '\0'; - SString s = Get(var); - free(var); - keyfile = strdup(s.c_str()); - } - } - char *keyptr = keyfile; + if (strstr(orgkeyfile, "$(") == orgkeyfile) { + char *cpendvar = strchr(orgkeyfile, ')'); + if (cpendvar) { + *cpendvar = '\0'; + SString s = Get(orgkeyfile + 2); + *cpendvar= ')'; + keyfile = strdup(s.c_str()); + } + } + char *keyptr = keyfile; - if (keyfile == NULL) - keyfile = orgkeyfile; + if (keyfile == NULL) + keyfile = orgkeyfile; - for (; ; ) { - char *del = strchr(keyfile, ';'); - if (del == NULL) - del = keyfile + strlen(keyfile); - char delchr = *del; - *del = '\0'; - if (*keyfile == '*') { - if (issuffix(filename, keyfile + 1)) { - *del = delchr; - free(keyptr); - return vals[i + 1]; - } - } else if (EqualCaseInsensitive(keyfile, filename)) { - *del = delchr; - free(keyptr); - return vals[i + 1]; - } - if (delchr == '\0') - break; - *del = delchr; - keyfile = del + 1; - } - free(keyptr); + for (; ; ) { + char *del = strchr(keyfile, ';'); + if (del == NULL) + del = keyfile + strlen(keyfile); + char delchr = *del; + *del = '\0'; + if (*keyfile == '*') { + if (issuffix(filename, keyfile + 1)) { + *del = delchr; + free(keyptr); + return p->val; + } + } else if (0 == strcmp(keyfile, filename)) { + *del = delchr; + free(keyptr); + return p->val; + } + if (delchr == '\0') + break; + *del = delchr; + keyfile = del + 1; + } + free(keyptr); - if (EqualCaseInsensitive(vals[i], keybase)) { - return vals[i + 1]; - } - } - } + if (0 == strcmp(p->key, keybase)) { + return p->val; + } + } + } + } if (superPS) { // Failed here, so try in base property set return superPS->GetWild(keybase, filename); @@ -217,9 +253,7 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) { char *cpendvar = strchr(cpvar, ')'); if (cpendvar) { int lenvar = cpendvar - cpvar - 2; // Subtract the $() - char *var = new char[lenvar + 1]; - strncpy(var, cpvar + 2, lenvar); - var[lenvar] = '\0'; + char *var = StringDup(cpvar+2, lenvar); SString val = GetWild(var, filename); int newlenbase = strlen(base) + val.length() - lenvar; char *newbase = new char[newlenbase]; @@ -238,33 +272,54 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) { } void PropSet::Clear() { - for (int i = 0; i < used; i++) { - delete [](vals[i]); - vals[i] = 0; - } - used = 0; + for (int root=0; root < hashRoots; root++) { + Property *p=props[root]; + while (p) { + Property *pNext=p->next; + p->hash = 0; + delete p->key; + p->key = 0; + delete p->val; + p->val = 0; + delete p; + p = pNext; + } + props[root] = 0; + } } -void PropSet::ReadFromMemory(const char *data, int len) { - if (len > 0) { - const char *pd = data; - char linebuf[60000]; - while (GetFullLine(pd, len, linebuf, sizeof(linebuf))) { - if (isalpha(linebuf[0])) - Set(linebuf); +void PropSet::ReadFromMemory(const char *data, int len, const char *directoryForImports) { + const char *pd = data; + char linebuf[60000]; + bool ifIsTrue = true; + while (len > 0) { + GetFullLine(pd, len, linebuf, sizeof(linebuf)); + if (isalpha(linebuf[0])) // If clause ends with first non-indented line + ifIsTrue = true; + if (isprefix(linebuf, "if ")) { + const char *expr = linebuf + strlen("if") + 1; + ifIsTrue = GetInt(expr); + } else if (isprefix(linebuf, "import ") && directoryForImports) { + char importPath[1024]; + strcpy(importPath, directoryForImports); + strcat(importPath, linebuf + strlen("import") + 1); + strcat(importPath, ".properties"); + Read(importPath,directoryForImports); + } else if (isalpha(linebuf[0])) { + Set(linebuf); + } else if (isspace(linebuf[0]) && ifIsTrue) { + Set(linebuf); } } } -void PropSet::Read(const char *filename) { - //printf("Opening properties <%s>\n", filename); - Clear(); +void PropSet::Read(const char *filename, const char *directoryForImports) { char propsData[60000]; FILE *rcfile = fopen(filename, "rb"); if (rcfile) { int lenFile = fread(propsData, 1, sizeof(propsData), rcfile); fclose(rcfile); - ReadFromMemory(propsData, lenFile); + ReadFromMemory(propsData, lenFile, directoryForImports); } else { //printf("Could not open <%s>\n", filename); } @@ -280,7 +335,8 @@ static bool iswordsep(char ch, bool onlyLineEnds) { // Creates an array that points into each word in the string and puts \0 terminators // after each word. -static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) { +static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) { +#if 1 char prev = '\n'; int words = 0; for (int j = 0; wordlist[j]; j++) { @@ -292,8 +348,8 @@ static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) { if (keywords) { words = 0; prev = '\0'; - int len = strlen(wordlist); - for (int k = 0; k < len; k++) { + int slen = strlen(wordlist); + for (int k = 0; k < slen; k++) { if (!iswordsep(wordlist[k], onlyLineEnds)) { if (!prev) { keywords[words] = &wordlist[k]; @@ -304,25 +360,69 @@ static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) { } prev = wordlist[k]; } - keywords[words] = &wordlist[len]; + keywords[words] = &wordlist[slen]; + *len = words; + } else { + *len = 0; } +#else + int words = 0; // length of the returned buffer of pointers + #undef APICHUNK // how many pointers will be pre-allocated (to avoid buffer reallocation on each new pointer) + #define APICHUNK 256 + int size = APICHUNK; // real size of the returned buffer of pointers + char **keywords; // buffer for the pointers returned + int slen = strlen(wordlist); //length of the buffer with api file + keywords = (char**) malloc((size + 1) * sizeof (*keywords)); + words = 0; + for (int k = 0;;) { + while (iswordsep(wordlist[k], onlyLineEnds)) + wordlist[k++] = '\0'; + if (k >= slen) + break; + if (words >= size) { + do + size += APICHUNK; + while (size <= words); + keywords = (char**) realloc(keywords, (size + 1) * sizeof (*keywords)); + } + keywords[words++] = wordlist + k; + do + if (k < slen) + k++; + else + goto out; + while (!iswordsep(wordlist[k], onlyLineEnds)); + } +out: + keywords[words] = wordlist + slen; + *len = words; +#endif return keywords; } void WordList::Clear() { if (words) { - delete []words; delete []list; +#if 1 + delete []words; +#else + free(words); +#endif + free(wordsNoCase); } words = 0; + wordsNoCase = 0; list = 0; len = 0; + sorted = false; } void WordList::Set(const char *s) { - len = 0; list = StringDup(s); - words = ArrayFromWordList(list, onlyLineEnds); + sorted = false; + words = ArrayFromWordList(list, &len, onlyLineEnds); + wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase)); + memcpy(wordsNoCase, words, (len + 1) * sizeof (*words)); } char *WordList::Allocate(int size) { @@ -332,46 +432,36 @@ char *WordList::Allocate(int size) { } void WordList::SetFromAllocated() { - len = 0; - words = ArrayFromWordList(list, onlyLineEnds); + sorted = false; + words = ArrayFromWordList(list, &len, onlyLineEnds); + wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase)); + memcpy(wordsNoCase, words, (len + 1) * sizeof (*words)); } -// Shell sort based upon public domain C implementation by Raymond Gardner 1991 -// Used here because of problems with mingw qsort. -static void SortWordList(char **words, unsigned int len) { - unsigned int gap = len / 2; - - while (gap > 0) { - unsigned int i = gap; - while (i < len) { - unsigned int j = i; - char **a = words + j; - do { - j -= gap; - char **b = a; - a -= gap; - if (strcmp(*a, *b) > 0) { - char *tmp = *a; - *a = *b; - *b = tmp; - } else { - break; - } - } while (j >= gap); - i++; - } - gap = gap / 2; - } +int cmpString(const void *a1, const void *a2) { + // Can't work out the correct incantation to use modern casts here + return strcmp(*(char**)(a1), *(char**)(a2)); } +int cmpStringNoCase(const void *a1, const void *a2) { + // Can't work out the correct incantation to use modern casts here + return strcasecmp(*(char**)(a1), *(char**)(a2)); +} + +static void SortWordList(char **words, char **wordsNoCase, unsigned int len) { + qsort(reinterpret_cast(words), len, sizeof(*words), + cmpString); + qsort(reinterpret_cast(wordsNoCase), len, sizeof(*wordsNoCase), + cmpStringNoCase); +} + bool WordList::InList(const char *s) { if (0 == words) return false; - if (len == 0) { - for (int i = 0; words[i][0]; i++) - len++; - SortWordList(words, len); - for (int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) + if (!sorted) { + sorted = true; + SortWordList(words, wordsNoCase, len); + for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) starts[k] = -1; for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; @@ -397,3 +487,256 @@ bool WordList::InList(const char *s) { } return false; } + +/** + * Returns an element (complete) of the wordlist array which has the beginning + * the same as the passed string. The length of the word to compare is passed + * too. Letter case can be ignored or preserved (default). + */ +const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) { + int start = 0; // lower bound of the api array block to search + int end = len - 1; // upper bound of the api array block to search + int pivot; // index of api array element just being compared + int cond; // comparison result (in the sense of strcmp() result) + const char *word; // api array element just being compared + + if (0 == words) + return NULL; + if (!sorted) { + sorted = true; + SortWordList(words, wordsNoCase, len); + } + if (ignoreCase) + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = wordsNoCase[pivot]; + cond = strncasecmp(wordStart, word, searchLen); + if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here? + return word; // result must not be freed with free() + else if (cond < 0) + end = pivot - 1; + else if (cond > 0) + start = pivot + 1; + } + else // preserve the letter case + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = words[pivot]; + cond = strncmp(wordStart, word, searchLen); + if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here? + return word; // result must not be freed with free() + else if (cond >= 0) + start = pivot + 1; + else if (cond < 0) + end = pivot - 1; + } + return NULL; +} + +/** + * Returns elements (first words of them) of the wordlist array which have + * the beginning the same as the passed string. The length of the word to + * compare is passed too. Letter case can be ignored or preserved (default). + * If there are more words meeting the condition they are returned all of + * them in the ascending order separated with spaces. + * + * NOTE: returned buffer has to be freed with a free() call. + */ +char *WordList::GetNearestWords(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) { + int wordlen; // length of the word part (before the '(' brace) of the api array element + int length = 0; // length of the returned buffer of words (string) + int newlength; // length of the new buffer before the reallocating itself + #undef WORDCHUNK // how many characters will be pre-allocated (to avoid buffer reallocation on each new word) + #define WORDCHUNK 100 + int size = WORDCHUNK; // real size of the returned buffer of words + char *buffer; // buffer for the words returned + int start = 0; // lower bound of the api array block to search + int end = len - 1; // upper bound of the api array block to search + int pivot; // index of api array element just being compared + int cond; // comparison result (in the sense of strcmp() result) + int oldpivot; // pivot storage to be able to browse the api array upwards and then downwards + const char *word; // api array element just being compared + const char *brace; // position of the opening brace in the api array element just being compared + + if (0 == words) + return NULL; + if (!sorted) { + sorted = true; + SortWordList(words, wordsNoCase, len); + } + buffer = (char*) malloc(size); + *buffer = '\0'; + if (ignoreCase) + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = wordsNoCase[pivot]; + cond = strncasecmp(wordStart, word, searchLen); + if (!cond) { + oldpivot = pivot; + do { // browse sequentially the rest after the hit + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + if (++pivot > end) + break; + word = wordsNoCase[pivot]; + } while (!strncasecmp(wordStart, word, searchLen)); + + pivot = oldpivot; + for (;;) { // browse sequentially the rest before the hit + if (--pivot < start) + break; + word = wordsNoCase[pivot]; + if (strncasecmp(wordStart, word, searchLen)) + break; + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) + { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + } + return buffer; // result has to be freed with free() + } + else if (cond < 0) + end = pivot - 1; + else if (cond > 0) + start = pivot + 1; + } + else // preserve the letter case + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = words[pivot]; + cond = strncmp(wordStart, word, searchLen); + if (!cond) { + oldpivot = pivot; + do { // browse sequentially the rest after the hit + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) + { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + if (++pivot > end) + break; + word = words[pivot]; + } while (!strncmp(wordStart, word, searchLen)); + + pivot = oldpivot; + for (;;) { // browse sequentially the rest before the hit + if (--pivot < start) + break; + word = words[pivot]; + if (strncmp(wordStart, word, searchLen)) + break; + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) + { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + } + return buffer; // result has to be freed with free() + } + else if (cond < 0) + end = pivot - 1; + else if (cond > 0) + start = pivot + 1; + } + free(buffer); + return NULL; +} diff --git a/contrib/src/stc/scintilla/src/SVector.h b/contrib/src/stc/scintilla/src/SVector.h index 49fc376dda..d4d49c717d 100644 --- a/contrib/src/stc/scintilla/src/SVector.h +++ b/contrib/src/stc/scintilla/src/SVector.h @@ -6,13 +6,12 @@ #ifndef SVECTOR_H #define SVECTOR_H -// A simple expandable vector. -// T must support assignment. +// A simple expandable integer vector. // Storage not allocated for elements until an element is used. // This makes it very lightweight unless used so is a good match for optional features. -template + class SVector { - T *v; + int *v; unsigned int size; // Number of elements allocated unsigned int len; // Number of elements in vector bool allocFailure; // A memory allocation call has failed @@ -20,19 +19,23 @@ class SVector { // Internally allocate more elements than the user wants to avoid // thrashng the memory allocator void SizeTo(int newSize) { - if (newSize < sizeIncrement) - newSize += sizeIncrement; + if (newSize < 4000) + newSize += 4000; else newSize = (newSize * 3) / 2; - T* newv = new T[newSize]; + int* newv = new int[newSize]; if (!newv) { allocFailure = true; return; } size = newSize; - for (int i=0; i= len) { if (i >= size) { SizeTo(i); @@ -94,13 +97,13 @@ public: size = 0; len = 0; } - void SetLength(int newLen) { - if (newLen > len) { - if (newLen >= size) { - SizeTo(newLen); + void SetLength(unsigned int newLength) { + if (newLength > len) { + if (newLength >= size) { + SizeTo(newLength); } } - len = newLen; + len = newLength; } int Length() const { return len; diff --git a/contrib/src/stc/scintilla/src/ScintillaBase.cxx b/contrib/src/stc/scintilla/src/ScintillaBase.cxx index eb68904b79..4f182850ad 100644 --- a/contrib/src/stc/scintilla/src/ScintillaBase.cxx +++ b/contrib/src/stc/scintilla/src/ScintillaBase.cxx @@ -11,10 +11,12 @@ #include "Platform.h" #include "Scintilla.h" +#include "PropSet.h" #ifdef SCI_LEXER #include "SciLexer.h" -#include "PropSet.h" #include "Accessor.h" +#include "WindowAccessor.h" +#include "DocumentAccessor.h" #include "KeyWords.h" #endif #include "ContractionState.h" @@ -39,9 +41,15 @@ ScintillaBase::ScintillaBase() { #endif } -ScintillaBase::~ScintillaBase() {} +ScintillaBase::~ScintillaBase() { +#ifdef SCI_LEXER + for (int wl=0;wlDeleteChars(currentPos, lenEntered); + SetEmptySelection(currentPos); + pdoc->InsertString(currentPos, list); + SetEmptySelection(currentPos + strlen(list)); + } else { + SetEmptySelection(currentPos); + pdoc->InsertString(currentPos, list + lenEntered); + SetEmptySelection(currentPos + strlen(list + lenEntered)); + } + return; + } + } ac.Start(wDraw, idAutoComplete, currentPos, lenEntered); PRectangle rcClient = GetClientRectangle(); Point pt = LocationFromPosition(currentPos-lenEntered); - //Platform::DebugPrintf("Auto complete %x\n", lbAutoComplete); int heightLB = 100; int widthLB = 100; if (pt.x >= rcClient.right - widthLB) { @@ -186,16 +213,18 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { rcac.right = rcac.left + widthLB; rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom); ac.lb.SetPositionRelative(rcac, wMain); - ac.lb.SetFont(vs.styles[0].font); + ac.lb.SetFont(vs.styles[STYLE_DEFAULT].font); + ac.lb.SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth); - int maxStrLen = ac.SetList(list); + ac.SetList(list); // Fiddle the position of the list so it is right next to the target and wide enough for all its strings - PRectangle rcList = ac.lb.GetPosition(); + PRectangle rcList = ac.lb.GetDesiredRect(); int heightAlloced = rcList.bottom - rcList.top; + widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left); // Make an allowance for large strings in list rcList.left = pt.x - 5; - rcList.right = rcList.left + Platform::Maximum(widthLB, maxStrLen * 8 + 16); + rcList.right = rcList.left + widthLB; if (pt.y >= rcClient.bottom - heightLB && // Wont fit below. pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above. rcList.top = pt.y - heightAlloced; @@ -204,8 +233,10 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { } rcList.bottom = rcList.top + heightAlloced; ac.lb.SetPositionRelative(rcList, wMain); - //lbAutoComplete.SetPosition(rcList); ac.Show(); + if (lenEntered != 0) { + AutoCompleteMoveToCurrentWord(); + } } void ScintillaBase::AutoCompleteCancel() { @@ -216,36 +247,63 @@ void ScintillaBase::AutoCompleteMove(int delta) { ac.Move(delta); } +void ScintillaBase::AutoCompleteMoveToCurrentWord() { + char wordCurrent[1000]; + int i; + int startWord = ac.posStart - ac.startLen; + for (i = startWord; i < currentPos; i++) + wordCurrent[i - startWord] = pdoc->CharAt(i); + wordCurrent[i - startWord] = '\0'; + ac.Select(wordCurrent); +} + void ScintillaBase::AutoCompleteChanged(char ch) { - if (currentPos <= ac.posStart) { + if (ac.IsFillUpChar(ch)) { + AutoCompleteCompleted(ch); + } else if (currentPos <= ac.posStart - ac.startLen) { + ac.Cancel(); + } else if (ac.cancelAtStartPos && currentPos <= ac.posStart) { ac.Cancel(); } else if (ac.IsStopChar(ch)) { ac.Cancel(); } else { - char wordCurrent[1000]; - int i; - int startWord = ac.posStart - ac.startLen; - for (i = startWord; i < currentPos; i++) - wordCurrent[i - startWord] = pdoc->CharAt(i); - wordCurrent[i - startWord] = '\0'; - ac.Select(wordCurrent); + AutoCompleteMoveToCurrentWord(); } } -void ScintillaBase::AutoCompleteCompleted() { +void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) { int item = ac.lb.GetSelection(); - char selected[200]; + char selected[1000]; if (item != -1) { ac.lb.GetValue(item, selected, sizeof(selected)); } ac.Cancel(); - if (currentPos != ac.posStart) { - pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart); - } - SetEmptySelection(ac.posStart); - if (item != -1) { - pdoc->InsertString(currentPos, selected + ac.startLen); - SetEmptySelection(currentPos + strlen(selected + ac.startLen)); + + if (ac.ignoreCase) { + if (currentPos != ac.posStart) { + pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart); + } + SetEmptySelection(ac.posStart - ac.startLen); + pdoc->DeleteChars(ac.posStart - ac.startLen, ac.startLen); + if (item != -1) { + SString piece = selected; + if (fillUp) + piece += fillUp; + pdoc->InsertString(currentPos, piece.c_str()); + SetEmptySelection(currentPos + piece.length()); + } + } else { + if (currentPos != ac.posStart) { + pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart); + } + SetEmptySelection(ac.posStart); + if (item != -1) { + SString piece = selected + ac.startLen; + if (fillUp) + piece += fillUp; + pdoc->InsertString(currentPos, piece.c_str()); + SetEmptySelection(currentPos + piece.length()); + } } } @@ -256,16 +314,21 @@ void ScintillaBase::ContextMenu(Point pt) { AddToPopUp(""); AddToPopUp("Cut", idcmdCut, currentPos != anchor); AddToPopUp("Copy", idcmdCopy, currentPos != anchor); - AddToPopUp("Paste", idcmdPaste, WndProc(EM_CANPASTE, 0, 0)); + AddToPopUp("Paste", idcmdPaste, WndProc(SCI_CANPASTE, 0, 0)); AddToPopUp("Delete", idcmdDelete, currentPos != anchor); AddToPopUp(""); AddToPopUp("Select All", idcmdSelectAll); popup.Show(pt, wMain); } -void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { +void ScintillaBase::CancelModes() { AutoCompleteCancel(); ct.CallTipCancel(); + Editor::CancelModes(); +} + +void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { + CancelModes(); Editor::ButtonDown(pt, curTime, shift, ctrl, alt); } @@ -276,33 +339,33 @@ void ScintillaBase::Colourise(int start, int end) { end = lengthDoc; int len = end - start; - PropSet props; - - StylingContext styler(wMain.GetID(), props); + //WindowAccessor styler(wMain.GetID(), props); + DocumentAccessor styler(pdoc, props); int styleStart = 0; if (start > 0) styleStart = styler.StyleAt(start - 1); - - ColouriseDoc(pdoc->dbcsCodePage, start, len, styleStart, lexLanguage, keyWordLists, styler); + styler.SetCodePage(pdoc->dbcsCodePage); + + LexerModule::Colourise(start, len, styleStart, lexLanguage, keyWordLists, styler); styler.Flush(); } #endif -void ScintillaBase::NotifyStyleNeeded(int endStyleNeeded) { +void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) { #ifdef SCI_LEXER if (lexLanguage != SCLEX_CONTAINER) { int endStyled = Platform::SendScintilla(wMain.GetID(), SCI_GETENDSTYLED, 0, 0); - int lineEndStyled = Platform::SendScintilla(wMain.GetID(), EM_LINEFROMCHAR, endStyled, 0); - endStyled = Platform::SendScintilla(wMain.GetID(), EM_LINEINDEX, lineEndStyled, 0); + int lineEndStyled = Platform::SendScintilla(wMain.GetID(), SCI_LINEFROMPOSITION, endStyled, 0); + endStyled = Platform::SendScintilla(wMain.GetID(), SCI_POSITIONFROMLINE, lineEndStyled, 0); Colourise(endStyled, endStyleNeeded); return; } #endif - Editor::NotifyStyleNeeded(endStyleNeeded); + Editor::NotifyStyleToNeeded(endStyleNeeded); } -LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { +long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { switch (iMessage) { case SCI_AUTOCSHOW: AutoCompleteStart(wParam, reinterpret_cast(lParam)); @@ -322,16 +385,52 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { AutoCompleteCompleted(); break; + case SCI_AUTOCSETSEPARATOR: + ac.SetSeparator(static_cast(wParam)); + break; + + case SCI_AUTOCGETSEPARATOR: + return ac.GetSeparator(); + case SCI_AUTOCSTOPS: ac.SetStopChars(reinterpret_cast(lParam)); break; + + case SCI_AUTOCSELECT: + ac.Select(reinterpret_cast(lParam)); + break; + + case SCI_AUTOCSETCANCELATSTART: + ac.cancelAtStartPos = wParam; + break; + + case SCI_AUTOCGETCANCELATSTART: + return ac.cancelAtStartPos; + case SCI_AUTOCSETFILLUPS: + ac.SetFillUpChars(reinterpret_cast(lParam)); + break; + + case SCI_AUTOCSETCHOOSESINGLE: + ac.chooseSingle = wParam; + break; + + case SCI_AUTOCGETCHOOSESINGLE: + return ac.chooseSingle; + + case SCI_AUTOCSETIGNORECASE: + ac.ignoreCase = wParam; + break; + + case SCI_AUTOCGETIGNORECASE: + return ac.ignoreCase; + case SCI_CALLTIPSHOW: { AutoCompleteCancel(); if (!ct.wCallTip.Created()) { PRectangle rc = ct.CallTipStart(currentPos, LocationFromPosition(wParam), reinterpret_cast(lParam), - vs.styles[0].fontName, vs.styles[0].size); + vs.styles[STYLE_DEFAULT].fontName, vs.styles[STYLE_DEFAULT].size); // If the call-tip window would be out of the client // space, adjust so it displays above the text. PRectangle rcClient = GetClientRectangle(); @@ -377,6 +476,7 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_COLOURISE: Colourise(wParam, lParam); + Redraw(); break; case SCI_SETPROPERTY: @@ -385,7 +485,7 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case SCI_SETKEYWORDS: - if ((wParam >= 0) && (wParam < numWordLists)) { + if (wParam < numWordLists) { keyWordLists[wParam]->Clear(); keyWordLists[wParam]->Set(reinterpret_cast(lParam)); } diff --git a/contrib/src/stc/scintilla/src/ScintillaBase.h b/contrib/src/stc/scintilla/src/ScintillaBase.h index e9f8f28d03..e630ba1aac 100644 --- a/contrib/src/stc/scintilla/src/ScintillaBase.h +++ b/contrib/src/stc/scintilla/src/ScintillaBase.h @@ -7,6 +7,9 @@ #define SCINTILLABASE_H class ScintillaBase : public Editor { + // Private so ScintillaBase objects can not be copied + ScintillaBase(const ScintillaBase &) : Editor() {} + ScintillaBase &operator=(const ScintillaBase &) { return *this; } protected: // Enumeration of commands and child windows enum { @@ -42,15 +45,17 @@ protected: virtual void RefreshColourPalette(Palette &pal, bool want); - virtual void AddChar(char ch); + virtual void AddCharUTF(char *s, unsigned int len); void Command(int cmdId); - virtual int KeyCommand(UINT iMessage); + virtual void CancelModes(); + virtual int KeyCommand(unsigned int iMessage); void AutoCompleteStart(int lenEntered, const char *list); void AutoCompleteCancel(); void AutoCompleteMove(int delta); void AutoCompleteChanged(char ch=0); - void AutoCompleteCompleted(); + void AutoCompleteCompleted(char fillUp='\0'); + void AutoCompleteMoveToCurrentWord(); virtual void CreateCallTipWindow(PRectangle rc) = 0; @@ -59,10 +64,10 @@ protected: virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); - virtual void NotifyStyleNeeded(int endStyleNeeded); + virtual void NotifyStyleToNeeded(int endStyleNeeded); public: // Public so scintilla_send_message can use it - virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); + virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam); }; #endif diff --git a/contrib/src/stc/scintilla/src/Style.cxx b/contrib/src/stc/scintilla/src/Style.cxx index 56312314ff..0a52ed41a3 100644 --- a/contrib/src/stc/scintilla/src/Style.cxx +++ b/contrib/src/stc/scintilla/src/Style.cxx @@ -7,49 +7,111 @@ #include "Platform.h" +#include "Scintilla.h" #include "Style.h" Style::Style() { - Clear(); + aliasOfDefaultFont = true; + Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), + Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT, + false, false, false, false, true); +} + +Style::Style(const Style &source) { + Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), + 0, 0, 0, + false, false, false, false, true); + fore.desired = source.fore.desired; + back.desired = source.back.desired; + characterSet = source.characterSet; + bold = source.bold; + italic = source.italic; + size = source.size; + eolFilled = source.eolFilled; + underline = source.underline; + visible = source.visible; } Style::~Style() { - font.Release(); + if (aliasOfDefaultFont) + font.SetID(0); + else + font.Release(); + aliasOfDefaultFont = false; } Style &Style::operator=(const Style &source) { if (this == &source) return *this; - Clear(); + Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), + 0, 0, SC_CHARSET_DEFAULT, + false, false, false, false, true); fore.desired = source.fore.desired; back.desired = source.back.desired; + characterSet = source.characterSet; bold = source.bold; italic = source.italic; size = source.size; - strcpy(fontName, source.fontName); eolFilled = source.eolFilled; + underline = source.underline; + visible = source.visible; return *this; } -void Style::Clear(Colour fore_, Colour back_, int size_, const char *fontName_, - bool bold_, bool italic_, bool eolFilled_) { +void Style::Clear(Colour fore_, Colour back_, int size_, + const char *fontName_, int characterSet_, + bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_) { fore.desired = fore_; back.desired = back_; + characterSet = characterSet_; bold = bold_; italic = italic_; size = size_; - strcpy(fontName, fontName_); + fontName = fontName_; eolFilled = eolFilled_; - font.Release(); + underline = underline_; + visible = visible_; + if (aliasOfDefaultFont) + font.SetID(0); + else + font.Release(); + aliasOfDefaultFont = false; } -void Style::Realise(Surface &surface, int zoomLevel) { +bool Style::EquivalentFontTo(const Style *other) const { + if (bold != other->bold || + italic != other->italic || + size != other->size || + characterSet != other->characterSet) + return false; + if (fontName == other->fontName) + return true; + if (!fontName) + return false; + if (!other->fontName) + return false; + return strcmp(fontName, other->fontName) == 0; +} + +void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle) { int sizeZoomed = size + zoomLevel; if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1 sizeZoomed = 2; - - int deviceHeight = (sizeZoomed * surface.LogPixelsY()) / 72; - font.Create(fontName, deviceHeight, bold, italic); + + if (aliasOfDefaultFont) + font.SetID(0); + else + font.Release(); + int deviceHeight = surface.DeviceHeightFont(sizeZoomed); + aliasOfDefaultFont = defaultStyle && + (EquivalentFontTo(defaultStyle) || !fontName); + if (aliasOfDefaultFont) { + font.SetID(defaultStyle->font.GetID()); + } else if (fontName) { + font.Create(fontName, characterSet, deviceHeight, bold, italic); + } else { + font.SetID(0); + } ascent = surface.Ascent(font); descent = surface.Descent(font); diff --git a/contrib/src/stc/scintilla/src/Style.h b/contrib/src/stc/scintilla/src/Style.h index 916b646315..9a2b4586a3 100644 --- a/contrib/src/stc/scintilla/src/Style.h +++ b/contrib/src/stc/scintilla/src/Style.h @@ -10,11 +10,15 @@ class Style { public: ColourPair fore; ColourPair back; + bool aliasOfDefaultFont; bool bold; bool italic; int size; - char fontName[100]; + const char *fontName; + int characterSet; bool eolFilled; + bool underline; + bool visible; Font font; unsigned int lineHeight; @@ -25,13 +29,15 @@ public: unsigned int spaceWidth; Style(); + Style(const Style &source); ~Style(); Style &operator=(const Style &source); - void Clear(Colour fore_=Colour(0,0,0), Colour back_=Colour(0xff,0xff,0xff), - int size_=Platform::DefaultFontSize(), - const char *fontName_=Platform::DefaultFont(), - bool bold_=false, bool italic_=false, bool eolFilled_=false); - void Realise(Surface &surface, int zoomLevel); + void Clear(Colour fore_, Colour back_, + int size_, + const char *fontName_, int characterSet_, + bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_); + bool EquivalentFontTo(const Style *other) const; + void Realise(Surface &surface, int zoomLevel, Style *defaultStyle=0); }; #endif diff --git a/contrib/src/stc/scintilla/src/UniConversion.cxx b/contrib/src/stc/scintilla/src/UniConversion.cxx new file mode 100644 index 0000000000..9306f307c2 --- /dev/null +++ b/contrib/src/stc/scintilla/src/UniConversion.cxx @@ -0,0 +1,77 @@ +// UniConversion.h - functions to handle UFT-8 and UCS-2 strings +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include + +#include "UniConversion.h" + +unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) { + unsigned int len = 0; + for (unsigned int i = 0; i < tlen && uptr[i]; i++) { + unsigned int uch = uptr[i]; + if (uch < 0x80) + len++; + else if (uch < 0x800) + len+=2; + else + len +=3; + } + return len; +} + +void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) { + int k = 0; + for (unsigned int i = 0; i < tlen && uptr[i]; i++) { + unsigned int uch = uptr[i]; + if (uch < 0x80) { + putf[k++] = static_cast(uch); + } else if (uch < 0x800) { + putf[k++] = static_cast(0xC0 | (uch >> 6)); + putf[k++] = static_cast(0x80 | (uch & 0x3f)); + } else { + putf[k++] = static_cast(0xE0 | (uch >> 12)); + putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); + putf[k++] = static_cast(0x80 | (uch & 0x3f)); + } + } + putf[len] = '\0'; +} + +unsigned int UCS2Length(const char *s, unsigned int len) { + unsigned int ulen = 0; + for (unsigned int i=0;i(s[i]); + if ((ch < 0x80) || (ch > (0x80 + 0x40))) + ulen++; + } + return ulen; +} + +unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen) { +#ifdef USE_API + return ::MultiByteToWideChar(CP_UTF8, 0, s, len, tbuf, tlen); +#else + unsigned int ui=0; + const unsigned char *us = reinterpret_cast(s); + unsigned int i=0; + while ((i((ch & 0x1F) << 6); + ch = us[i++]; + tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); + } else { + tbuf[ui] = static_cast((ch & 0xF) << 12); + ch = us[i++]; + tbuf[ui] = static_cast(tbuf[ui] + ((ch & 0x7F) << 6)); + ch = us[i++]; + tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); + } + ui++; + } + return ui; +#endif +} diff --git a/contrib/src/stc/scintilla/src/UniConversion.h b/contrib/src/stc/scintilla/src/UniConversion.h new file mode 100644 index 0000000000..cace497c48 --- /dev/null +++ b/contrib/src/stc/scintilla/src/UniConversion.h @@ -0,0 +1,9 @@ +// UniConversion.h - functions to handle UFT-8 and UCS-2 strings +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen); +void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len); +unsigned int UCS2Length(const char *s, unsigned int len); +unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen); + diff --git a/contrib/src/stc/scintilla/src/ViewStyle.cxx b/contrib/src/stc/scintilla/src/ViewStyle.cxx index 001ecdb319..9b7a8535e9 100644 --- a/contrib/src/stc/scintilla/src/ViewStyle.cxx +++ b/contrib/src/stc/scintilla/src/ViewStyle.cxx @@ -17,14 +17,46 @@ MarginStyle::MarginStyle() : symbol(false), width(16), mask(0xffffffff), sensitive(false) { } +// A list of the fontnames - avoids wasting space in each style +FontNames::FontNames() { + max = 0; +} + +FontNames::~FontNames() { + Clear(); +} + +void FontNames::Clear() { + for (int i=0;i +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "WindowAccessor.h" +#include "Scintilla.h" + +WindowAccessor::~WindowAccessor() { +} + +#if PLAT_WIN +bool WindowAccessor::InternalIsLeadByte(char ch) { + if (SC_CP_UTF8 == codePage) + // For lexing, all characters >= 0x80 are treated the + // same so none is considered a lead byte. + return false; + else + return IsDBCSLeadByteEx(codePage, ch); +} +#else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool WindowAccessor::InternalIsLeadByte(char) { + return false; +} +#endif + +void WindowAccessor::Fill(int position) { + if (lenDoc == -1) + lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); + startPos = position - slopSize; + if (startPos + bufferSize > lenDoc) + startPos = lenDoc - bufferSize; + if (startPos < 0) + startPos = 0; + endPos = startPos + bufferSize; + if (endPos > lenDoc) + endPos = lenDoc; + + TextRange tr = {{startPos, endPos}, buf}; + Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast(&tr)); +} + +char WindowAccessor::StyleAt(int position) { + return static_cast(Platform::SendScintilla( + id, SCI_GETSTYLEAT, position, 0)); +} + +int WindowAccessor::GetLine(int position) { + return Platform::SendScintilla(id, SCI_LINEFROMPOSITION, position, 0); +} + +int WindowAccessor::LineStart(int line) { + return Platform::SendScintilla(id, SCI_POSITIONFROMLINE, line, 0); +} + +int WindowAccessor::LevelAt(int line) { + return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0); +} + +int WindowAccessor::Length() { + if (lenDoc == -1) + lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); + return lenDoc; +} + +int WindowAccessor::GetLineState(int line) { + return Platform::SendScintilla(id, SCI_GETLINESTATE, line); +} + +int WindowAccessor::SetLineState(int line, int state) { + return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state); +} + +void WindowAccessor::StartAt(unsigned int start, char chMask) { + Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask); +} + +void WindowAccessor::StartSegment(unsigned int pos) { + startSeg = pos; +} + +void WindowAccessor::ColourTo(unsigned int pos, int chAttr) { + // Only perform styling if non empty range + if (pos != startSeg - 1) { + if (pos < startSeg) { + Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos); + } + + if (validLen + (pos - startSeg + 1) >= bufferSize) + Flush(); + if (validLen + (pos - startSeg + 1) >= bufferSize) { + // Too big for buffer so send directly + Platform::SendScintilla(id, SCI_SETSTYLING, pos - startSeg + 1, chAttr); + } else { + if (chAttr != chWhile) + chFlags = 0; + chAttr |= chFlags; + for (unsigned int i = startSeg; i <= pos; i++) { + styleBuf[validLen++] = static_cast(chAttr); + } + } + } + startSeg = pos+1; +} + +void WindowAccessor::SetLevel(int line, int level) { + Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level); +} + +void WindowAccessor::Flush() { + startPos = extremePosition; + lenDoc = -1; + if (validLen > 0) { + Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen, + reinterpret_cast(styleBuf)); + validLen = 0; + } +} + +int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { + int end = Length(); + int spaceFlags = 0; + + // Determines the indentation level of the current line and also checks for consistent + // indentation compared to the previous line. + // Indentation is judged consistent when the indentation whitespace of each line lines + // the same or the indentation of one line is a prefix of the other. + + int pos = LineStart(line); + char ch = (*this)[pos]; + int indent = 0; + bool inPrevPrefix = line > 0; + int posPrev = inPrevPrefix ? LineStart(line-1) : 0; + while ((ch == ' ' || ch == '\t') && (pos < end)) { + if (inPrevPrefix) { + char chPrev = (*this)[posPrev++]; + if (chPrev == ' ' || chPrev == '\t') { + if (chPrev != ch) + spaceFlags |= wsInconsistent; + } else { + inPrevPrefix = false; + } + } + if (ch == ' ') { + spaceFlags |= wsSpace; + indent++; + } else { // Tab + spaceFlags |= wsTab; + if (spaceFlags & wsSpace) + spaceFlags |= wsSpaceTab; + indent = (indent / 8 + 1) * 8; + } + ch = (*this)[++pos]; + } + + *flags = spaceFlags; + indent += SC_FOLDLEVELBASE; + // if completely empty line or the start of a comment... + if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) + return indent | SC_FOLDLEVELWHITEFLAG; + else + return indent; +} + diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index e85c952886..311378fe58 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -5,7 +5,7 @@ // derive directly from the Scintilla classes, but instead // delegates most things to the real Scintilla class. // This allows the use of Scintilla without polluting the -// namespace with all the classes and itentifiers from Scintilla. +// namespace with all the classes and identifiers from Scintilla. // // Author: Robin Dunn // @@ -15,11 +15,53 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +#include + #include "wx/stc/stc.h" #include "ScintillaWX.h" #include +// The following code forces a reference to all of the Scintilla lexers. +// If we don't do something like this, then the linker tends to "optimize" +// them away. (eric@sourcegear.com) + +int wxForceScintillaLexers(void) +{ + extern LexerModule lmCPP; + extern LexerModule lmHTML; + extern LexerModule lmXML; + extern LexerModule lmProps; + extern LexerModule lmErrorList; + extern LexerModule lmMake; + extern LexerModule lmBatch; + extern LexerModule lmPerl; + extern LexerModule lmPython; + extern LexerModule lmSQL; + extern LexerModule lmVB; + + if ( + &lmCPP + && &lmHTML + && &lmXML + && &lmProps + && &lmErrorList + && &lmMake + && &lmBatch + && &lmPerl + && &lmPython + && &lmSQL + && &lmVB + ) + { + return 1; + } + else + { + return 0; + } +} + //---------------------------------------------------------------------- const wxChar* wxSTCNameStr = "stcwindow"; @@ -33,13 +75,19 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp) EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp) EVT_CHAR (wxStyledTextCtrl::OnChar) + EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown) EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus) EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus) EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged) EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground) EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu) + EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox) END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent) + //---------------------------------------------------------------------- // Constructor and Destructor @@ -50,556 +98,32 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent, long style, const wxString& name) : wxControl(parent, id, pos, size, - style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS, + style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN, wxDefaultValidator, name) { m_swx = new ScintillaWX(this); - // m_keywords = new WordList; m_stopWatch.Start(); - m_readOnly = false; - m_undoType = wxSTC_UndoCollectAutoStart; } wxStyledTextCtrl::~wxStyledTextCtrl() { delete m_swx; - // delete m_keywords; } //---------------------------------------------------------------------- -inline long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { +long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { return m_swx->WndProc(msg, wp, lp); } -//---------------------------------------------------------------------- -// Text retrieval and modification +#ifdef MAKELONG +#undef MAKELONG +#endif -wxString wxStyledTextCtrl::GetText() { - wxString text; - int len = GetTextLength(); - char* buff = text.GetWriteBuf(len); - - SendMsg(WM_GETTEXT, len, (long)buff); - text.UngetWriteBuf(); - return text; -} - - -bool wxStyledTextCtrl::SetText(const wxString& text) { - return SendMsg(WM_SETTEXT, 0, (long)text.c_str()) != 0; -} - - -wxString wxStyledTextCtrl::GetLine(int line) { - wxString text; - int len = GetLineLength(line); - char* buff = text.GetWriteBuf(len+1); - - *((WORD*)buff) = len+1; - SendMsg(EM_GETLINE, line, (long)buff); - text.UngetWriteBuf(); - return text; -} - - -void wxStyledTextCtrl::ReplaceSelection(const wxString& text) { - SendMsg(EM_REPLACESEL, 0, (long)text.c_str()); -} - - -void wxStyledTextCtrl::SetReadOnly(bool readOnly) { - SendMsg(EM_SETREADONLY, (long)readOnly); - m_readOnly = readOnly; -} - - -bool wxStyledTextCtrl::GetReadOnly() { - // TODO: need support in Scintilla to do this right, - // until then we'll track it ourselves - return m_readOnly; -} - - -void wxStyledTextCtrl::GetTextRange(int startPos, int endPos, char* buff) { - TEXTRANGE tr; - tr.lpstrText = buff; - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - SendMsg(EM_GETTEXTRANGE, 0, (long)&tr); -} - - -wxString wxStyledTextCtrl::GetTextRange(int startPos, int endPos) { - wxString text; - int len = endPos - startPos; - char* buff = text.GetWriteBuf(len); - GetTextRange(startPos, endPos, buff); - text.UngetWriteBuf(); - return text; -} - - -void wxStyledTextCtrl::GetStyledTextRange(int startPos, int endPos, char* buff) { - TEXTRANGE tr; - tr.lpstrText = buff; - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - SendMsg(SCI_GETSTYLEDTEXT, 0, (long)&tr); -} - - -wxString wxStyledTextCtrl::GetStyledTextRange(int startPos, int endPos) { - wxString text; - int len = endPos - startPos; - char* buff = text.GetWriteBuf(len*2); - GetStyledTextRange(startPos, endPos, buff); - text.UngetWriteBuf(len*2); - return text; -} - - -void wxStyledTextCtrl::AddText(const wxString& text) { - SendMsg(SCI_ADDTEXT, text.Len(), (long)text.c_str()); -} - - -void wxStyledTextCtrl::AddStyledText(const wxString& text) { - SendMsg(SCI_ADDSTYLEDTEXT, text.Len(), (long)text.c_str()); -} - - -void wxStyledTextCtrl::InsertText(int pos, const wxString& text) { - SendMsg(SCI_INSERTTEXT, pos, (long)text.c_str()); -} - - -void wxStyledTextCtrl::ClearAll() { - SendMsg(SCI_CLEARALL); -} - - -char wxStyledTextCtrl::GetCharAt(int pos) { - return SendMsg(SCI_GETCHARAT, pos); -} - - -char wxStyledTextCtrl::GetStyleAt(int pos) { - return SendMsg(SCI_GETSTYLEAT, pos); -} - - -void wxStyledTextCtrl::SetStyleBits(int bits) { - SendMsg(SCI_SETSTYLEBITS, bits); -} - - -int wxStyledTextCtrl::GetStyleBits() { - return SendMsg(SCI_GETSTYLEBITS); -} - - -//---------------------------------------------------------------------- -// Clipboard - - -void wxStyledTextCtrl::Cut() { - SendMsg(WM_CUT); -} - - -void wxStyledTextCtrl::Copy() { - SendMsg(WM_COPY); -} - - -void wxStyledTextCtrl::Paste() { - SendMsg(WM_PASTE); -} - - -bool wxStyledTextCtrl::CanPaste() { - return SendMsg(EM_CANPASTE) != 0; -} - - -void wxStyledTextCtrl::ClearClipbrd() { - SendMsg(WM_CLEAR); -} - - - -//---------------------------------------------------------------------- -// Undo and Redo - -void wxStyledTextCtrl::Undo() { - SendMsg(WM_UNDO); -} - - -bool wxStyledTextCtrl::CanUndo() { - return SendMsg(EM_CANUNDO) != 0; -} - - -void wxStyledTextCtrl::EmptyUndoBuffer() { - SendMsg(EM_EMPTYUNDOBUFFER); -} - - -void wxStyledTextCtrl::Redo() { - SendMsg(SCI_REDO); -} - - -bool wxStyledTextCtrl::CanRedo() { - return SendMsg(SCI_CANREDO) != 0; -} - - -void wxStyledTextCtrl::SetUndoCollection(wxSTC_UndoType type) { - SendMsg(SCI_SETUNDOCOLLECTION, type); - m_undoType = type; -} - - -wxSTC_UndoType wxStyledTextCtrl::GetUndoCollection() { - // TODO: need support in Scintilla to do this right, - // until then we'll track it ourselves - return m_undoType; -} - - -void wxStyledTextCtrl::BeginUndoAction() { - SendMsg(SCI_BEGINUNDOACTION); -} - - -void wxStyledTextCtrl::EndUndoAction() { - SendMsg(SCI_ENDUNDOACTION); -} - - - - -//---------------------------------------------------------------------- -// Selection and information - - -void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) { - SendMsg(EM_GETSEL, (long)startPos, (long)endPos); -} - - -void wxStyledTextCtrl::SetSelection(int startPos, int endPos) { - SendMsg(EM_SETSEL, startPos, endPos); -} - - -wxString wxStyledTextCtrl::GetSelectedText() { - wxString text; - int start; - int end; - - GetSelection(&start, &end); - int len = end - start; - char* buff = text.GetWriteBuf(len); - - SendMsg(EM_GETSELTEXT, 0, (long)buff); - text.UngetWriteBuf(); - return text; -} - - -void wxStyledTextCtrl::HideSelection(bool hide) { - SendMsg(EM_HIDESELECTION, hide); -} - - -bool wxStyledTextCtrl::GetHideSelection() { - return m_swx->GetHideSelection(); -} - - -int wxStyledTextCtrl::GetTextLength() { - return SendMsg(WM_GETTEXTLENGTH); -} - - -int wxStyledTextCtrl::GetFirstVisibleLine() { - return SendMsg(EM_GETFIRSTVISIBLELINE); -} - - -int wxStyledTextCtrl::GetLineCount() { - return SendMsg(EM_GETLINECOUNT); -} - - -bool wxStyledTextCtrl::GetModified() { - return SendMsg(EM_GETMODIFY) != 0; -} - - -wxRect wxStyledTextCtrl::GetRect() { - PRectangle pr; - SendMsg(EM_GETRECT, 0, (long)&pr); - - wxRect rect = wxRectFromPRectangle(pr); - return rect; -} - - -int wxStyledTextCtrl::GetLineFromPos(int pos) { - return SendMsg(EM_LINEFROMCHAR, pos); -} - - -int wxStyledTextCtrl::GetLineStartPos(int line) { - return SendMsg(EM_LINEINDEX, line); -} - - -int wxStyledTextCtrl::GetLineLengthAtPos(int pos) { - return SendMsg(EM_LINELENGTH, pos); -} - - -int wxStyledTextCtrl::GetLineLength(int line) { - return SendMsg(SCI_LINELENGTH, line); -} - - -int wxStyledTextCtrl::GetCurrentLine() { - int line = GetLineFromPos(GetCurrentPos()); - return line; -} - - -wxString wxStyledTextCtrl::GetCurrentLineText(int* linePos) { - wxString text; - int len = GetLineLength(GetCurrentLine()); - char* buff = text.GetWriteBuf(len+1); - - int pos = SendMsg(SCI_GETCURLINE, len+1, (long)buff); - text.UngetWriteBuf(); - - if (linePos) - *linePos = pos; - - return text; -} - - -int wxStyledTextCtrl::PositionFromPoint(wxPoint pt) { - Point spt(pt.x, pt.y); - long rv = SendMsg(EM_CHARFROMPOS, 0, (long)&spt); - return LOWORD(rv); -} - - -int wxStyledTextCtrl::LineFromPoint(wxPoint pt) { - Point spt(pt.x, pt.y); - long rv = SendMsg(EM_CHARFROMPOS, 0, (long)&spt); - return HIWORD(rv); -} - - -wxPoint wxStyledTextCtrl::PointFromPosition(int pos) { - Point pt; - SendMsg(EM_POSFROMCHAR, pos, (long)&pt); - return wxPoint(pt.x, pt.y); -} - - -int wxStyledTextCtrl::GetCurrentPos() { - return SendMsg(SCI_GETCURRENTPOS); -} - - -int wxStyledTextCtrl::GetAnchor() { - return SendMsg(SCI_GETANCHOR); -} - - -void wxStyledTextCtrl::SelectAll() { - SendMsg(SCI_SELECTALL); -} - - -void wxStyledTextCtrl::SetCurrentPosition(int pos) { - SendMsg(SCI_GOTOPOS, pos); -} - - -void wxStyledTextCtrl::SetAnchor(int pos) { - SendMsg(SCI_SETANCHOR, pos); -} - - -void wxStyledTextCtrl::GotoPos(int pos) { - SendMsg(SCI_GOTOPOS, pos); -} - - -void wxStyledTextCtrl::GotoLine(int line) { - SendMsg(SCI_GOTOLINE, line); -} - - -void wxStyledTextCtrl::ChangePosition(int delta, bool extendSelection) { - // TODO: Is documented but doesn't seem to be implemented - //SendMsg(SCI_CHANGEPOSITION, delta, extendSelection); -} - - -void wxStyledTextCtrl::PageMove(int cmdKey, bool extendSelection) { - // TODO: Is documented but doesn't seem to be implemented - //SendMsg(SCI_PAGEMOVE, cmdKey, extendSelection); -} - - -void wxStyledTextCtrl::ScrollBy(int columnDelta, int lineDelta) { - SendMsg(EM_LINESCROLL, columnDelta, lineDelta); -} - -void wxStyledTextCtrl::ScrollToLine(int line) { - m_swx->DoScrollToLine(line); -} - - -void wxStyledTextCtrl::ScrollToColumn(int column) { - m_swx->DoScrollToColumn(column); -} - - -void wxStyledTextCtrl::EnsureCaretVisible() { - SendMsg(EM_SCROLLCARET); -} - - -void wxStyledTextCtrl::SetCaretPolicy(int policy, int slop) { - SendMsg(SCI_SETCARETPOLICY, policy, slop); -} - - -int wxStyledTextCtrl::GetSelectionType() { - return SendMsg(EM_SELECTIONTYPE); -} - - - - -//---------------------------------------------------------------------- -// Searching - -int wxStyledTextCtrl::FindText(int minPos, int maxPos, - const wxString& text, - bool caseSensitive, bool wholeWord) { - FINDTEXTEX ft; - int flags = 0; - - flags |= caseSensitive ? FR_MATCHCASE : 0; - flags |= wholeWord ? FR_WHOLEWORD : 0; - ft.chrg.cpMin = minPos; - ft.chrg.cpMax = maxPos; - ft.lpstrText = (char*)text.c_str(); - - return SendMsg(EM_FINDTEXT, flags, (long)&ft); -} - - -void wxStyledTextCtrl::SearchAnchor() { - SendMsg(SCI_SEARCHANCHOR); -} - - -int wxStyledTextCtrl::SearchNext(const wxString& text, bool caseSensitive, bool wholeWord) { - int flags = 0; - flags |= caseSensitive ? FR_MATCHCASE : 0; - flags |= wholeWord ? FR_WHOLEWORD : 0; - - return SendMsg(SCI_SEARCHNEXT, flags, (long)text.c_str()); -} - - -int wxStyledTextCtrl::SearchPrev(const wxString& text, bool caseSensitive, bool wholeWord) { - int flags = 0; - flags |= caseSensitive ? FR_MATCHCASE : 0; - flags |= wholeWord ? FR_WHOLEWORD : 0; - - return SendMsg(SCI_SEARCHPREV, flags, (long)text.c_str()); -} - -//---------------------------------------------------------------------- -// Visible whitespace - - -bool wxStyledTextCtrl::GetViewWhitespace() { - return SendMsg(SCI_GETVIEWWS) != 0; -} - - -void wxStyledTextCtrl::SetViewWhitespace(bool visible) { - SendMsg(SCI_SETVIEWWS, visible); -} - - - -//---------------------------------------------------------------------- -// Line endings - -wxSTC_EOL wxStyledTextCtrl::GetEOLMode() { - return (wxSTC_EOL)SendMsg(SCI_GETEOLMODE); -} - - -void wxStyledTextCtrl::SetEOLMode(wxSTC_EOL mode) { - SendMsg(SCI_SETEOLMODE, mode); -} - - -bool wxStyledTextCtrl::GetViewEOL() { - return SendMsg(SCI_GETVIEWEOL) != 0; -} - - -void wxStyledTextCtrl::SetViewEOL(bool visible) { - SendMsg(SCI_SETVIEWEOL, visible); -} - -void wxStyledTextCtrl::ConvertEOL(wxSTC_EOL mode) { - SendMsg(SCI_CONVERTEOLS, mode); -} - -//---------------------------------------------------------------------- -// Styling - -int wxStyledTextCtrl::GetEndStyled() { - return SendMsg(SCI_GETENDSTYLED); -} - - -void wxStyledTextCtrl::StartStyling(int pos, int mask) { - SendMsg(SCI_STARTSTYLING, pos, mask); -} - - -void wxStyledTextCtrl::SetStyleFor(int length, int style) { - SendMsg(SCI_SETSTYLING, length, style); -} - - -void wxStyledTextCtrl::SetStyleBytes(int length, char* styleBytes) { - SendMsg(SCI_SETSTYLINGEX, length, (long)styleBytes); -} - - -//---------------------------------------------------------------------- -// Style Definition +#define MAKELONG(a, b) ((a) | ((b) << 16)) static long wxColourAsLong(const wxColour& co) { @@ -625,15 +149,1228 @@ static wxColour wxColourFromSpec(const wxString& spec) { } +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py from the contents of Scintilla.iface. Do not edit +// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate. + + +// Add text to the document +void wxStyledTextCtrl::AddText(const wxString& text) { + SendMsg(2001, text.Len(), (long)text.c_str()); +} + +// Add array of cells to document +void wxStyledTextCtrl::AddStyledText(const wxString& text) { + SendMsg(2002, text.Len(), (long)text.c_str()); +} + +// Insert string at a position +void wxStyledTextCtrl::InsertText(int pos, const wxString& text) { + SendMsg(2003, pos, (long)text.c_str()); +} + +// Delete all text in the document +void wxStyledTextCtrl::ClearAll() { + SendMsg(2004, 0, 0); +} + +// Set all style bytes to 0, remove all folding information +void wxStyledTextCtrl::ClearDocumentStyle() { + SendMsg(2005, 0, 0); +} + +// The number of characters in the document +int wxStyledTextCtrl::GetLength() { + return SendMsg(2006, 0, 0); +} + +// Returns the character byte at the position +int wxStyledTextCtrl::GetCharAt(int pos) { + return SendMsg(2007, pos, 0); +} + +// Returns the position of the caret +int wxStyledTextCtrl::GetCurrentPos() { + return SendMsg(2008, 0, 0); +} + +// Returns the position of the opposite end of the selection to the caret +int wxStyledTextCtrl::GetAnchor() { + return SendMsg(2009, 0, 0); +} + +// Returns the style byte at the position +int wxStyledTextCtrl::GetStyleAt(int pos) { + return SendMsg(2010, pos, 0); +} + +// Redoes the next action on the undo history +void wxStyledTextCtrl::Redo() { + SendMsg(2011, 0, 0); +} + +// Choose between collecting actions into the undo +// history and discarding them. +void wxStyledTextCtrl::SetUndoCollection(bool collectUndo) { + SendMsg(2012, collectUndo, 0); +} + +// Select all the text in the document. +void wxStyledTextCtrl::SelectAll() { + SendMsg(2013, 0, 0); +} + +// Remember the current position in the undo history as the position +// at which the document was saved. +void wxStyledTextCtrl::SetSavePoint() { + SendMsg(2014, 0, 0); +} + +// Retrieve a buffer of cells. +wxString wxStyledTextCtrl::GetStyledText(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + TextRange tr; + tr.lpstrText = text.GetWriteBuf(len*2+1); + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + SendMsg(2015, 0, (long)&tr); + text.UngetWriteBuf(len*2); + return text; +} + +// Are there any redoable actions in the undo history. +bool wxStyledTextCtrl::CanRedo() { + return SendMsg(2016, 0, 0) != 0; +} + +// Retrieve the line number at which a particular marker is located +int wxStyledTextCtrl::MarkerLineFromHandle(int handle) { + return SendMsg(2017, handle, 0); +} + +// Delete a marker. +void wxStyledTextCtrl::MarkerDeleteHandle(int handle) { + SendMsg(2018, handle, 0); +} + +// Is undo history being collected? +bool wxStyledTextCtrl::GetUndoCollection() { + return SendMsg(2019, 0, 0) != 0; +} + +// Are white space characters currently visible? +// Returns one of SCWS_* constants. +int wxStyledTextCtrl::GetViewWhiteSpace() { + return SendMsg(2020, 0, 0); +} + +// Make white space characters invisible, always visible or visible outside indentation. +void wxStyledTextCtrl::SetViewWhiteSpace(int viewWS) { + SendMsg(2021, viewWS, 0); +} + +// Find the position from a point within the window. +int wxStyledTextCtrl::PositionFromPoint(wxPoint pt) { + return SendMsg(2022, pt.x, pt.y); +} + +// Set caret to start of a line and ensure it is visible. +void wxStyledTextCtrl::GotoLine(int line) { + SendMsg(2024, line, 0); +} + +// Set caret to a position and ensure it is visible. +void wxStyledTextCtrl::GotoPos(int pos) { + SendMsg(2025, pos, 0); +} + +// Set the selection anchor to a position. The anchor is the opposite +// end of the selection from the caret. +void wxStyledTextCtrl::SetAnchor(int posAnchor) { + SendMsg(2026, posAnchor, 0); +} + +// Retrieve the text of the line containing the caret. +// Returns the index of the caret on the line. +wxString wxStyledTextCtrl::GetCurLine(int* linePos) { + wxString text; + int len = LineLength(GetCurrentLine()); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(2027, len, (long)buf); + text.UngetWriteBuf(); + if (linePos) *linePos = pos; + + return text; +} + +// Retrieve the position of the last correctly styled character. +int wxStyledTextCtrl::GetEndStyled() { + return SendMsg(2028, 0, 0); +} + +// Convert all line endings in the document to use the current mode. +void wxStyledTextCtrl::ConvertEOLs() { + SendMsg(2029, 0, 0); +} + +// Retrieve the current end of line mode - one of CRLF, CR, or LF. +int wxStyledTextCtrl::GetEOLMode() { + return SendMsg(2030, 0, 0); +} + +// Set the current end of line mode. +void wxStyledTextCtrl::SetEOLMode(int eolMode) { + SendMsg(2031, eolMode, 0); +} + +// Set the current styling position to pos and the styling mask to mask. +// The styling mask can be used to protect some bits in each styling byte from +// modification. +void wxStyledTextCtrl::StartStyling(int pos, int mask) { + SendMsg(2032, pos, mask); +} + +// Change style from current styling position for length characters to a style +// and move the current styling position to after this newly styled segment. +void wxStyledTextCtrl::SetStyling(int length, int style) { + SendMsg(2033, length, style); +} + +// Is drawing done first into a buffer or direct to the screen. +bool wxStyledTextCtrl::GetBufferedDraw() { + return SendMsg(2034, 0, 0) != 0; +} + +// If drawing is buffered then each line of text is drawn into a bitmap buffer +// before drawing it to the screen to avoid flicker. +void wxStyledTextCtrl::SetBufferedDraw(bool buffered) { + SendMsg(2035, buffered, 0); +} + +// Change the visible size of a tab to be a multiple of the width of a space +// character. +void wxStyledTextCtrl::SetTabWidth(int tabWidth) { + SendMsg(2036, tabWidth, 0); +} + +// Retrieve the visible size of a tab. +int wxStyledTextCtrl::GetTabWidth() { + return SendMsg(2121, 0, 0); +} + +// Set the code page used to interpret the bytes of the document as characters. +// The SC_CP_UTF8 value can be used to enter Unicode mode. +void wxStyledTextCtrl::SetCodePage(int codePage) { + SendMsg(2037, codePage, 0); +} + +// Set the symbol used for a particular marker number, +// and optionally the for and background colours. +void wxStyledTextCtrl::MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground, + const wxColour& background) { + + SendMsg(2040, markerNumber, markerSymbol); + if (foreground.Ok()) + MarkerSetForeground(markerNumber, foreground); + if (background.Ok()) + MarkerSetBackground(markerNumber, background); +} + +// Set the foreground colour used for a particular marker number. +void wxStyledTextCtrl::MarkerSetForeground(int markerNumber, const wxColour& fore) { + SendMsg(2041, markerNumber, wxColourAsLong(fore)); +} + +// Set the background colour used for a particular marker number. +void wxStyledTextCtrl::MarkerSetBackground(int markerNumber, const wxColour& back) { + SendMsg(2042, markerNumber, wxColourAsLong(back)); +} + +// Add a marker to a line. +void wxStyledTextCtrl::MarkerAdd(int line, int markerNumber) { + SendMsg(2043, line, markerNumber); +} + +// Delete a marker from a line +void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) { + SendMsg(2044, line, markerNumber); +} + +// Delete all markers with a particular number from all lines +void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) { + SendMsg(2045, markerNumber, 0); +} + +// Get a bit mask of all the markers set on a line. +int wxStyledTextCtrl::MarkerGet(int line) { + return SendMsg(2046, line, 0); +} + +// Find the next line after lineStart that includes a marker in mask. +int wxStyledTextCtrl::MarkerNext(int lineStart, int markerMask) { + return SendMsg(2047, lineStart, markerMask); +} + +// Find the previous line before lineStart that includes a marker in mask. +int wxStyledTextCtrl::MarkerPrevious(int lineStart, int markerMask) { + return SendMsg(2048, lineStart, markerMask); +} + +// Set a margin to be either numeric or symbolic. +void wxStyledTextCtrl::SetMarginType(int margin, int marginType) { + SendMsg(2240, margin, marginType); +} + +// Retrieve the type of a margin. +int wxStyledTextCtrl::GetMarginType(int margin) { + return SendMsg(2241, margin, 0); +} + +// Set the width of a margin to a width expressed in pixels. +void wxStyledTextCtrl::SetMarginWidth(int margin, int pixelWidth) { + SendMsg(2242, margin, pixelWidth); +} + +// Retrieve the width of a margin in pixels. +int wxStyledTextCtrl::GetMarginWidth(int margin) { + return SendMsg(2243, margin, 0); +} + +// Set a mask that determines which markers are displayed in a margin. +void wxStyledTextCtrl::SetMarginMask(int margin, int mask) { + SendMsg(2244, margin, mask); +} + +// Retrieve the marker mask of a margin. +int wxStyledTextCtrl::GetMarginMask(int margin) { + return SendMsg(2245, margin, 0); +} + +// Make a margin sensitive or insensitive to mouse clicks. +void wxStyledTextCtrl::SetMarginSensitive(int margin, bool sensitive) { + SendMsg(2246, margin, sensitive); +} + +// Retrieve the mouse click sensitivity of a margin. +bool wxStyledTextCtrl::GetMarginSensitive(int margin) { + return SendMsg(2247, margin, 0) != 0; +} + +// Clear all the styles and make equivalent to the global default style. void wxStyledTextCtrl::StyleClearAll() { - SendMsg(SCI_STYLECLEARALL); + SendMsg(2050, 0, 0); } +// Set the foreground colour of a style. +void wxStyledTextCtrl::StyleSetForeground(int style, const wxColour& fore) { + SendMsg(2051, style, wxColourAsLong(fore)); +} +// Set the background colour of a style. +void wxStyledTextCtrl::StyleSetBackground(int style, const wxColour& back) { + SendMsg(2052, style, wxColourAsLong(back)); +} + +// Set a style to be bold or not. +void wxStyledTextCtrl::StyleSetBold(int style, bool bold) { + SendMsg(2053, style, bold); +} + +// Set a style to be italic or not. +void wxStyledTextCtrl::StyleSetItalic(int style, bool italic) { + SendMsg(2054, style, italic); +} + +// Set the size of characters of a style. +void wxStyledTextCtrl::StyleSetSize(int style, int sizePoints) { + SendMsg(2055, style, sizePoints); +} + +// Set the font of a style. +void wxStyledTextCtrl::StyleSetFaceName(int style, const wxString& fontName) { + SendMsg(2056, style, (long)fontName.c_str()); +} + +// Set a style to have its end of line filled or not. +void wxStyledTextCtrl::StyleSetEOLFilled(int style, bool filled) { + SendMsg(2057, style, filled); +} + +// Reset the default style to its state at startup void wxStyledTextCtrl::StyleResetDefault() { - SendMsg(SCI_STYLERESETDEFAULT); + SendMsg(2058, 0, 0); } +// Set a style to be underlined or not. +void wxStyledTextCtrl::StyleSetUnderline(int style, bool underline) { + SendMsg(2059, style, underline); +} + +// Set the foreground colour of the selection and whether to use this setting. +void wxStyledTextCtrl::SetSelForeground(bool useSetting, const wxColour& fore) { + SendMsg(2067, useSetting, wxColourAsLong(fore)); +} + +// Set the background colour of the selection and whether to use this setting. +void wxStyledTextCtrl::SetSelBackground(bool useSetting, const wxColour& back) { + SendMsg(2068, useSetting, wxColourAsLong(back)); +} + +// Set the foreground colour of the caret. +void wxStyledTextCtrl::SetCaretForeground(const wxColour& fore) { + SendMsg(2069, wxColourAsLong(fore), 0); +} + +// When key+modifier combination km is pressed perform msg. +void wxStyledTextCtrl::CmdKeyAssign(int key, int modifiers, int cmd) { + SendMsg(2070, MAKELONG(key, modifiers), cmd); +} + +// When key+modifier combination km do nothing. +void wxStyledTextCtrl::CmdKeyClear(int key, int modifiers) { + SendMsg(2071, MAKELONG(key, modifiers)); +} + +// Drop all key mappings. +void wxStyledTextCtrl::CmdKeyClearAll() { + SendMsg(2072, 0, 0); +} + +// Set the styles for a segment of the document. +void wxStyledTextCtrl::SetStyleBytes(int length, char* styleBytes) { + SendMsg(2073, length, (long)styleBytes); +} + +// Set a style to be visible or not. +void wxStyledTextCtrl::StyleSetVisible(int style, bool visible) { + SendMsg(2074, style, visible); +} + +// Get the time in milliseconds that the caret is on and off. +int wxStyledTextCtrl::GetCaretPeriod() { + return SendMsg(2075, 0, 0); +} + +// Get the time in milliseconds that the caret is on and off. 0 = steady on. +void wxStyledTextCtrl::SetCaretPeriod(int periodMilliseconds) { + SendMsg(2076, periodMilliseconds, 0); +} + +// Set the set of characters making up words for when moving or selecting +// by word. +void wxStyledTextCtrl::SetWordChars(const wxString& characters) { + SendMsg(2077, 0, (long)characters.c_str()); +} + +// Start a sequence of actions that is undone and redone as a unit. +// May be nested. +void wxStyledTextCtrl::BeginUndoAction() { + SendMsg(2078, 0, 0); +} + +// End a sequence of actions that is undone and redone as a unit. +void wxStyledTextCtrl::EndUndoAction() { + SendMsg(2079, 0, 0); +} + +// Set an indicator to plain, squiggle or TT. +void wxStyledTextCtrl::IndicatorSetStyle(int indic, int style) { + SendMsg(2080, indic, style); +} + +// Retrieve the style of an indicator. +int wxStyledTextCtrl::IndicatorGetStyle(int indic) { + return SendMsg(2081, indic, 0); +} + +// Set the foreground colour of an indicator. +void wxStyledTextCtrl::IndicatorSetForeground(int indic, const wxColour& fore) { + SendMsg(2082, indic, wxColourAsLong(fore)); +} + +// Retrieve the foreground colour of an indicator. +wxColour wxStyledTextCtrl::IndicatorGetForeground(int indic) { + long c = SendMsg(2083, indic, 0); + return wxColourFromLong(c); +} + +// Divide each styling byte into lexical class bits (default:5) and indicator +// bits (default:3). If a lexer requires more than 32 lexical states, then this +// is used to expand the possible states. +void wxStyledTextCtrl::SetStyleBits(int bits) { + SendMsg(2090, bits, 0); +} + +// Retrieve number of bits in style bytes used to hold the lexical state. +int wxStyledTextCtrl::GetStyleBits() { + return SendMsg(2091, 0, 0); +} + +// Used to hold extra styling information for each line. +void wxStyledTextCtrl::SetLineState(int line, int state) { + SendMsg(2092, line, state); +} + +// Retrieve the extra styling information for a line. +int wxStyledTextCtrl::GetLineState(int line) { + return SendMsg(2093, line, 0); +} + +// Retrieve the last line number that has line state. +int wxStyledTextCtrl::GetMaxLineState() { + return SendMsg(2094, 0, 0); +} + +// Display a auto-completion list. +// The lenEntered parameter indicates how many characters before +// the caret should be used to provide context. +void wxStyledTextCtrl::AutoCompShow(int lenEntered, const wxString& itemList) { + SendMsg(2100, lenEntered, (long)itemList.c_str()); +} + +// Remove the auto-completion list from the screen. +void wxStyledTextCtrl::AutoCompCancel() { + SendMsg(2101, 0, 0); +} + +// Is there an auto-completion list visible? +bool wxStyledTextCtrl::AutoCompActive() { + return SendMsg(2102, 0, 0) != 0; +} + +// Retrieve the position of the caret when the auto-completion list was +// displayed. +int wxStyledTextCtrl::AutoCompPosStart() { + return SendMsg(2103, 0, 0); +} + +// User has selected an item so remove the list and insert the selection. +void wxStyledTextCtrl::AutoCompComplete() { + SendMsg(2104, 0, 0); +} + +// Define a set of character that when typed cancel the auto-completion list. +void wxStyledTextCtrl::AutoCompStops(const wxString& characterSet) { + SendMsg(2105, 0, (long)characterSet.c_str()); +} + +// Change the separator character in the string setting up an auto-completion +// list. Default is space but can be changed if items contain space. +void wxStyledTextCtrl::AutoCompSetSeparator(int separatorCharacter) { + SendMsg(2106, separatorCharacter, 0); +} + +// Retrieve the auto-completion list separator character. +int wxStyledTextCtrl::AutoCompGetSeparator() { + return SendMsg(2107, 0, 0); +} + +// Select the item in the auto-completion list that starts with a string. +void wxStyledTextCtrl::AutoCompSelect(const wxString& text) { + SendMsg(2108, 0, (long)text.c_str()); +} + +// Should the auto-completion list be cancelled if the user backspaces to a +// position before where the box was created. +void wxStyledTextCtrl::AutoCompSetCancelAtStart(bool cancel) { + SendMsg(2110, cancel, 0); +} + +// Retrieve whether auto-completion cancelled by backspacing before start. +bool wxStyledTextCtrl::AutoCompGetCancelAtStart() { + return SendMsg(2111, 0, 0) != 0; +} + +// Define a set of character that when typed fills up the selected word. +void wxStyledTextCtrl::AutoCompSetFillUps(const wxString& characterSet) { + SendMsg(2112, 0, (long)characterSet.c_str()); +} + +// Should a single item auto-completion list automatically choose the item. +void wxStyledTextCtrl::AutoCompSetChooseSingle(bool chooseSingle) { + SendMsg(2113, chooseSingle, 0); +} + +// Retrieve whether a single item auto-completion list automatically choose the item. +bool wxStyledTextCtrl::AutoCompGetChooseSingle() { + return SendMsg(2114, 0, 0) != 0; +} + +// Set whether case is significant when performing auto-completion searches. +void wxStyledTextCtrl::AutoCompSetIgnoreCase(bool ignoreCase) { + SendMsg(2115, ignoreCase, 0); +} + +// Retrieve state of ignore case flag. +bool wxStyledTextCtrl::AutoCompGetIgnoreCase() { + return SendMsg(2116, 0, 0) != 0; +} + +// Set the number of spaces used for one level of indentation. +void wxStyledTextCtrl::SetIndent(int indentSize) { + SendMsg(2122, indentSize, 0); +} + +// Retrieve indentation size. +int wxStyledTextCtrl::GetIndent() { + return SendMsg(2123, 0, 0); +} + +// Indentation will only use space characters if useTabs is false, otherwise +// it will use a combination of tabs and spaces. +void wxStyledTextCtrl::SetUseTabs(bool useTabs) { + SendMsg(2124, useTabs, 0); +} + +// Retrieve whether tabs will be used in indentation. +bool wxStyledTextCtrl::GetUseTabs() { + return SendMsg(2125, 0, 0) != 0; +} + +// Change the indentation of a line to a number of columns. +void wxStyledTextCtrl::SetLineIndentation(int line, int indentSize) { + SendMsg(2126, line, indentSize); +} + +// Retrieve the number of columns that a line is indented. +int wxStyledTextCtrl::GetLineIndentation(int line) { + return SendMsg(2127, line, 0); +} + +// Retrieve the position before the first non indentation character on a line. +int wxStyledTextCtrl::GetLineIndentPosition(int line) { + return SendMsg(2128, line, 0); +} + +// Retrieve the column number of a position, taking tab width into account. +int wxStyledTextCtrl::GetColumn(int pos) { + return SendMsg(2129, pos, 0); +} + +// Show or hide the horizontal scroll bar. +void wxStyledTextCtrl::SetUseHorizontalScrollBar(bool show) { + SendMsg(2130, show, 0); +} + +// Is the horizontal scroll bar visible? +bool wxStyledTextCtrl::GetUseHorizontalScrollBar() { + return SendMsg(2131, 0, 0) != 0; +} + +// Show or hide indentation guides. +void wxStyledTextCtrl::SetIndentationGuides(bool show) { + SendMsg(2132, show, 0); +} + +// Are the indentation guides visible? +bool wxStyledTextCtrl::GetIndentationGuides() { + return SendMsg(2133, 0, 0) != 0; +} + +// Set the highlighted indentation guide column. +// 0 = no highlighted guide. +void wxStyledTextCtrl::SetHighlightGuide(int column) { + SendMsg(2134, column, 0); +} + +// Get the highlighted indentation guide column. +int wxStyledTextCtrl::GetHighlightGuide() { + return SendMsg(2135, 0, 0); +} + +// Get the position after the last visible characters on a line. +int wxStyledTextCtrl::GetLineEndPosition(int line) { + return SendMsg(2136, line, 0); +} + +// Get the code page used to interpret the bytes of the document as characters. +int wxStyledTextCtrl::GetCodePage() { + return SendMsg(2137, 0, 0); +} + +// Get the foreground colour of the caret. +wxColour wxStyledTextCtrl::GetCaretForeground() { + long c = SendMsg(2138, 0, 0); + return wxColourFromLong(c); +} + +// In read-only mode? +bool wxStyledTextCtrl::GetReadOnly() { + return SendMsg(2140, 0, 0) != 0; +} + +// Sets the position of the caret. +void wxStyledTextCtrl::SetCurrentPos(int pos) { + SendMsg(2141, pos, 0); +} + +// Sets the position that starts the selection - this becomes the anchor. +void wxStyledTextCtrl::SetSelectionStart(int pos) { + SendMsg(2142, pos, 0); +} + +// Returns the position at the start of the selection. +int wxStyledTextCtrl::GetSelectionStart() { + return SendMsg(2143, 0, 0); +} + +// Sets the position that ends the selection - this becomes the currentPosition. +void wxStyledTextCtrl::SetSelectionEnd(int pos) { + SendMsg(2144, pos, 0); +} + +// Returns the position at the end of the selection. +int wxStyledTextCtrl::GetSelectionEnd() { + return SendMsg(2145, 0, 0); +} + +// Sets the print magnification added to the point size of each style for printing. +void wxStyledTextCtrl::SetPrintMagnification(int magnification) { + SendMsg(2146, magnification, 0); +} + +// Returns the print magnification. +int wxStyledTextCtrl::GetPrintMagnification() { + return SendMsg(2147, 0, 0); +} + +// Modify colours when printing for clearer printed text. +void wxStyledTextCtrl::SetPrintColourMode(int mode) { + SendMsg(2148, mode, 0); +} + +// Returns the print colour mode. +int wxStyledTextCtrl::GetPrintColourMode() { + return SendMsg(2149, 0, 0); +} + +// Find some text in the document. +int wxStyledTextCtrl::FindText(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord) { + TextToFind ft; + int flags = 0; + + flags |= caseSensitive ? SCFIND_MATCHCASE : 0; + flags |= wholeWord ? SCFIND_WHOLEWORD : 0; + ft.chrg.cpMin = minPos; + ft.chrg.cpMax = maxPos; + ft.lpstrText = (char*)text.c_str(); + + return SendMsg(2150, flags, (long)&ft); +} + +// On Windows will draw the document into a display context such as a printer. + int wxStyledTextCtrl::FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect) { + RangeToFormat fr; + + fr.hdc = draw; + fr.hdcTarget = target; + fr.rc.top = renderRect.GetTop(); + fr.rc.left = renderRect.GetLeft(); + fr.rc.right = renderRect.GetRight(); + fr.rc.bottom = renderRect.GetBottom(); + fr.rcPage.top = pageRect.GetTop(); + fr.rcPage.left = pageRect.GetLeft(); + fr.rcPage.right = pageRect.GetRight(); + fr.rcPage.bottom = pageRect.GetBottom(); + fr.chrg.cpMin = startPos; + fr.chrg.cpMax = endPos; + + return SendMsg(2151, doDraw, (long)&fr); +} + +// Retrieve the line at the top of the display. +int wxStyledTextCtrl::GetFirstVisibleLine() { + return SendMsg(2152, 0, 0); +} + +// Retrieve the contents of a line. +wxString wxStyledTextCtrl::GetLine(int line) { + wxString text; + int len = LineLength(line); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(2153, line, (long)buf); + text.UngetWriteBuf(); + + return text; +} + +// Returns the number of lines in the document. There is always at least one. +int wxStyledTextCtrl::GetLineCount() { + return SendMsg(2154, 0, 0); +} + +// Sets the size in pixels of the left margin. +void wxStyledTextCtrl::SetMarginLeft(int width) { + SendMsg(2155, 0, width); +} + +// Returns the size in pixels of the left margin. +int wxStyledTextCtrl::GetMarginLeft() { + return SendMsg(2156, 0, 0); +} + +// Sets the size in pixels of the right margin. +void wxStyledTextCtrl::SetMarginRight(int width) { + SendMsg(2157, 0, width); +} + +// Returns the size in pixels of the right margin. +int wxStyledTextCtrl::GetMarginRight() { + return SendMsg(2158, 0, 0); +} + +// Is the document different from when it was last saved? +bool wxStyledTextCtrl::GetModify() { + return SendMsg(2159, 0, 0) != 0; +} + +// Select a range of text. +void wxStyledTextCtrl::SetSelection(int start, int end) { + SendMsg(2160, start, end); +} + +// Retrieve the selected text. +wxString wxStyledTextCtrl::GetSelectedText() { + wxString text; + int start; + int end; + + GetSelection(&start, &end); + int len = end - start; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(2161, 0, (long)buff); + text.UngetWriteBuf(); + return text; +} + +// Retrieve a range of text. +wxString wxStyledTextCtrl::GetTextRange(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + char* buff = text.GetWriteBuf(len+1); + TextRange tr; + tr.lpstrText = buff; + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + + SendMsg(2162, 0, (long)&tr); + text.UngetWriteBuf(); + return text; +} + +// Draw the selection in normal style or with selection highlighted. +void wxStyledTextCtrl::HideSelection(bool normal) { + SendMsg(2163, normal, 0); +} + +// Retrieve the line containing a position. +int wxStyledTextCtrl::LineFromPosition(int pos) { + return SendMsg(2166, pos, 0); +} + +// Retrieve the position at the start of a line. +int wxStyledTextCtrl::PositionFromLine(int line) { + return SendMsg(2167, line, 0); +} + +// Scroll horizontally and vertically. +void wxStyledTextCtrl::LineScroll(int columns, int lines) { + SendMsg(2168, columns, lines); +} + +// Ensure the caret is visible. +void wxStyledTextCtrl::EnsureCaretVisible() { + SendMsg(2169, 0, 0); +} + +// Replace the selected text with the argument text. +void wxStyledTextCtrl::ReplaceSelection(const wxString& text) { + SendMsg(2170, 0, (long)text.c_str()); +} + +// Set to read only or read write. +void wxStyledTextCtrl::SetReadOnly(bool readOnly) { + SendMsg(2171, readOnly, 0); +} + +// Will a paste succeed? +bool wxStyledTextCtrl::CanPaste() { + return SendMsg(2173, 0, 0) != 0; +} + +// Are there any undoable actions in the undo history. +bool wxStyledTextCtrl::CanUndo() { + return SendMsg(2174, 0, 0) != 0; +} + +// Delete the undo history. +void wxStyledTextCtrl::EmptyUndoBuffer() { + SendMsg(2175, 0, 0); +} + +// Undo one action in the undo history. +void wxStyledTextCtrl::Undo() { + SendMsg(2176, 0, 0); +} + +// Cut the selection to the clipboard. +void wxStyledTextCtrl::Cut() { + SendMsg(2177, 0, 0); +} + +// Copy the selection to the clipboard. +void wxStyledTextCtrl::Copy() { + SendMsg(2178, 0, 0); +} + +// Paste the contents of the clipboard into the document replacing the selection. +void wxStyledTextCtrl::Paste() { + SendMsg(2179, 0, 0); +} + +// Clear the selection. +void wxStyledTextCtrl::Clear() { + SendMsg(2180, 0, 0); +} + +// Replace the contents of the document with the argument text. +void wxStyledTextCtrl::SetText(const wxString& text) { + SendMsg(2181, 0, (long)text.c_str()); +} + +// Retrieve all the text in the document. +wxString wxStyledTextCtrl::GetText() { + wxString text; + int len = GetTextLength()+1; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(2182, len, (long)buff); + buff[len] = 0; + text.UngetWriteBuf(); + return text; +} + +// Retrieve the number of characters in the document. +int wxStyledTextCtrl::GetTextLength() { + return SendMsg(2183, 0, 0); +} + +// Set to overtype (true) or insert mode +void wxStyledTextCtrl::SetOvertype(bool overtype) { + SendMsg(2186, overtype, 0); +} + +// Returns true if overtype mode is active otherwise false is returned. +bool wxStyledTextCtrl::GetOvertype() { + return SendMsg(2187, 0, 0) != 0; +} + +// Show a call tip containing a definition near position pos. +void wxStyledTextCtrl::CallTipShow(int pos, const wxString& definition) { + SendMsg(2200, pos, (long)definition.c_str()); +} + +// Remove the call tip from the screen. +void wxStyledTextCtrl::CallTipCancel() { + SendMsg(2201, 0, 0); +} + +// Is there an active call tip? +bool wxStyledTextCtrl::CallTipActive() { + return SendMsg(2202, 0, 0) != 0; +} + +// Retrieve the position where the caret was before displaying the call tip. +int wxStyledTextCtrl::CallTipPosAtStart() { + return SendMsg(2203, 0, 0); +} + +// Highlight a segment of the definition. +void wxStyledTextCtrl::CallTipSetHighlight(int start, int end) { + SendMsg(2204, start, end); +} + +// Set the background colour for the call tip. +void wxStyledTextCtrl::CallTipSetBackground(const wxColour& back) { + SendMsg(2205, wxColourAsLong(back), 0); +} + +// Find the display line of a document line taking hidden lines into account. +int wxStyledTextCtrl::VisibleFromDocLine(int line) { + return SendMsg(2220, line, 0); +} + +// Find the document line of a display line taking hidden lines into account. +int wxStyledTextCtrl::DocLineFromVisible(int lineDisplay) { + return SendMsg(2221, lineDisplay, 0); +} + +// Set the fold level of a line. +// This encodes an integer level along with flags indicating whether the +// line is a header and whether it is effectively white space. +void wxStyledTextCtrl::SetFoldLevel(int line, int level) { + SendMsg(2222, line, level); +} + +// Retrieve the fold level of a line. +int wxStyledTextCtrl::GetFoldLevel(int line) { + return SendMsg(2223, line, 0); +} + +// Find the last child line of a header line. +int wxStyledTextCtrl::GetLastChild(int line, int level) { + return SendMsg(2224, line, level); +} + +// Find the parent line of a child line. +int wxStyledTextCtrl::GetFoldParent(int line) { + return SendMsg(2225, line, 0); +} + +// Make a range of lines visible. +void wxStyledTextCtrl::ShowLines(int lineStart, int lineEnd) { + SendMsg(2226, lineStart, lineEnd); +} + +// Make a range of lines invisible. +void wxStyledTextCtrl::HideLines(int lineStart, int lineEnd) { + SendMsg(2227, lineStart, lineEnd); +} + +// Is a line visible? +bool wxStyledTextCtrl::GetLineVisible(int line) { + return SendMsg(2228, line, 0) != 0; +} + +// Show the children of a header line. +void wxStyledTextCtrl::SetFoldExpanded(int line, bool expanded) { + SendMsg(2229, line, expanded); +} + +// Is a header line expanded? +bool wxStyledTextCtrl::GetFoldExpanded(int line) { + return SendMsg(2230, line, 0) != 0; +} + +// Switch a header line between expanded and contracted. +void wxStyledTextCtrl::ToggleFold(int line) { + SendMsg(2231, line, 0); +} + +// Ensure a particular line is visible by expanding any header line hiding it. +void wxStyledTextCtrl::EnsureVisible(int line) { + SendMsg(2232, line, 0); +} + +// Set some debugging options for folding +void wxStyledTextCtrl::SetFoldFlags(int flags) { + SendMsg(2233, flags, 0); +} + +// How many characters are on a line, not including end of line characters. +int wxStyledTextCtrl::LineLength(int line) { + return SendMsg(2350, line, 0); +} + +// Highlight the characters at two positions. +void wxStyledTextCtrl::BraceHighlight(int pos1, int pos2) { + SendMsg(2351, pos1, pos2); +} + +// Highlight the character at a position indicating there is no matching brace. +void wxStyledTextCtrl::BraceBadLight(int pos) { + SendMsg(2352, pos, 0); +} + +// Find the position of a matching brace or INVALID_POSITION if no match. +int wxStyledTextCtrl::BraceMatch(int pos) { + return SendMsg(2353, pos, 0); +} + +// Are the end of line characters visible. +bool wxStyledTextCtrl::GetViewEOL() { + return SendMsg(2355, 0, 0) != 0; +} + +// Make the end of line characters visible or invisible +void wxStyledTextCtrl::SetViewEOL(bool visible) { + SendMsg(2356, visible, 0); +} + +// Retrieve a pointer to the document object. +void* wxStyledTextCtrl::GetDocPointer() { + return (void*)SendMsg(2357); +} + +// Change the document object used. +void wxStyledTextCtrl::SetDocPointer(void* docPointer) { + SendMsg(2358, (long)docPointer); +} + +// Set which document modification events are sent to the container. +void wxStyledTextCtrl::SetModEventMask(int mask) { + SendMsg(2359, mask, 0); +} + +// Retrieve the column number which text should be kept within. +int wxStyledTextCtrl::GetEdgeColumn() { + return SendMsg(2360, 0, 0); +} + +// Set the column number of the edge. +// If text goes past the edge then it is highlighted. +void wxStyledTextCtrl::SetEdgeColumn(int column) { + SendMsg(2361, column, 0); +} + +// Retrieve the edge highlight mode. +int wxStyledTextCtrl::GetEdgeMode() { + return SendMsg(2362, 0, 0); +} + +// The edge may be displayed by a line (EDGE_LINE) or by highlighting text that +// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +void wxStyledTextCtrl::SetEdgeMode(int mode) { + SendMsg(2363, mode, 0); +} + +// Retrieve the colour used in edge indication. +wxColour wxStyledTextCtrl::GetEdgeColour() { + long c = SendMsg(2364, 0, 0); + return wxColourFromLong(c); +} + +// Change the colour used in edge indication. +void wxStyledTextCtrl::SetEdgeColour(const wxColour& edgeColour) { + SendMsg(2365, wxColourAsLong(edgeColour), 0); +} + +// Sets the current caret position to be the search anchor. +void wxStyledTextCtrl::SearchAnchor() { + SendMsg(2366, 0, 0); +} + +// Find some text starting at the search anchor. +int wxStyledTextCtrl::SearchNext(int flags, const wxString& text) { + return SendMsg(2367, flags, (long)text.c_str()); +} + +// Find some text starting at the search anchor and moving backwards. +int wxStyledTextCtrl::SearchPrev(int flags, const wxString& text) { + return SendMsg(2368, flags, (long)text.c_str()); +} + +// Set the way the line the caret is on is kept visible. +void wxStyledTextCtrl::SetCaretPolicy(int caretPolicy, int caretSlop) { + SendMsg(2369, caretPolicy, caretSlop); +} + +// Retrieves the number of lines completely visible. +int wxStyledTextCtrl::LinesOnScreen() { + return SendMsg(2370, 0, 0); +} + +// Set whether a pop up menu is displayed automatically when the user presses +// the wrong mouse button. +void wxStyledTextCtrl::UsePopUp(bool allowPopUp) { + SendMsg(2371, allowPopUp, 0); +} + +// Is the selection a rectangular. The alternative is the more common stream selection. +bool wxStyledTextCtrl::SelectionIsRectangle() { + return SendMsg(2372, 0, 0) != 0; +} + +// Set the zoom level. This number of points is added to the size of all fonts. +// It may be positive to magnify or negative to reduce. +void wxStyledTextCtrl::SetZoom(int zoom) { + SendMsg(2373, zoom, 0); +} + +// Retrieve the zoom level. +int wxStyledTextCtrl::GetZoom() { + return SendMsg(2374, 0, 0); +} + +// Create a new document object. +// Starts with reference count of 1 and not selected into editor. +void* wxStyledTextCtrl::CreateDocument() { + return (void*)SendMsg(2375); +} + +// Extend life of document. +void wxStyledTextCtrl::AddRefDocument(void* docPointer) { + SendMsg(2376, (long)docPointer); +} + +// Release a reference to the document, deleting document if it fades to black. +void wxStyledTextCtrl::ReleaseDocument(void* docPointer) { + SendMsg(2377, (long)docPointer); +} + +// Get which document modification events are sent to the container. +int wxStyledTextCtrl::GetModEventMask() { + return SendMsg(2378, 0, 0); +} + +// Start notifying the container of all key presses and commands. +void wxStyledTextCtrl::StartRecord() { + SendMsg(3001, 0, 0); +} + +// Stop notifying the container of all key presses and commands. +void wxStyledTextCtrl::StopRecord() { + SendMsg(3002, 0, 0); +} + +// Set the lexing language of the document. +void wxStyledTextCtrl::SetLexer(int lexer) { + SendMsg(4001, lexer, 0); +} + +// Retrieve the lexing language of the document. +int wxStyledTextCtrl::GetLexer() { + return SendMsg(4002, 0, 0); +} + +// Colourise a segment of the document using the current lexing language. +void wxStyledTextCtrl::Colourise(int start, int end) { + SendMsg(4003, start, end); +} + +// Set up a value that may be used by a lexer for some optional feature. +void wxStyledTextCtrl::SetProperty(const wxString& key, const wxString& value) { + SendMsg(4004, (long)key.c_str(), (long)value.c_str()); +} + +// Set up the key words used by the lexer. +void wxStyledTextCtrl::SetKeyWords(int keywordSet, const wxString& keyWords) { + SendMsg(4005, keywordSet, (long)keyWords.c_str()); +} + +// END of generated section +//---------------------------------------------------------------------- + + +// Returns the line number of the line with the caret. +int wxStyledTextCtrl::GetCurrentLine() { + int line = LineFromPosition(GetCurrentPos()); + return line; +} // Extract style settings from a spec-string which is composed of one or @@ -646,8 +1383,8 @@ void wxStyledTextCtrl::StyleResetDefault() { // face:[facename] sets the font face name to use // size:[num] sets the font size in points // eol turns on eol filling +// underline turns on underlining // - void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { wxStringTokenizer tkz(spec, ","); @@ -663,6 +1400,9 @@ void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { else if (option == "italic") StyleSetItalic(styleNum, true); + else if (option == "underline") + StyleSetUnderline(styleNum, true); + else if (option == "eol") StyleSetEOLFilled(styleNum, true); @@ -684,550 +1424,72 @@ void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { } -void wxStyledTextCtrl::StyleSetForeground(int styleNum, const wxColour& colour) { - SendMsg(SCI_STYLESETFORE, styleNum, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::StyleSetBackground(int styleNum, const wxColour& colour) { - SendMsg(SCI_STYLESETBACK, styleNum, wxColourAsLong(colour)); -} - - +// Set style size, face, bold, italic, and underline attributes from +// a wxFont's attributes. void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { int size = font.GetPointSize(); wxString faceName = font.GetFaceName(); bool bold = font.GetWeight() == wxBOLD; bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); - StyleSetFontAttr(styleNum, size, faceName, bold, italic); + // TODO: add encoding/charset mapping + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); } - +// Set all font style attributes at once. void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size, const wxString& faceName, - bool bold, bool italic) { + bool bold, bool italic, + bool underline) { StyleSetSize(styleNum, size); StyleSetFaceName(styleNum, faceName); StyleSetBold(styleNum, bold); StyleSetItalic(styleNum, italic); + StyleSetUnderline(styleNum, underline); + + // TODO: add encoding/charset mapping } -void wxStyledTextCtrl::StyleSetBold(int styleNum, bool bold) { - SendMsg(SCI_STYLESETBOLD, styleNum, bold); -} - - -void wxStyledTextCtrl::StyleSetItalic(int styleNum, bool italic) { - SendMsg(SCI_STYLESETITALIC, styleNum, italic); -} - - -void wxStyledTextCtrl::StyleSetFaceName(int styleNum, const wxString& faceName) { - SendMsg(SCI_STYLESETFONT, styleNum, (long)faceName.c_str()); -} - - -void wxStyledTextCtrl::StyleSetSize(int styleNum, int pointSize) { - SendMsg(SCI_STYLESETSIZE, styleNum, pointSize); -} - - -void wxStyledTextCtrl::StyleSetEOLFilled(int styleNum, bool fillEOL) { - SendMsg(SCI_STYLESETEOLFILLED, styleNum, fillEOL); -} - - -//---------------------------------------------------------------------- -// Margins in the edit area - -int wxStyledTextCtrl::GetLeftMargin() { - return LOWORD(SendMsg(EM_GETMARGINS)); -} - - -int wxStyledTextCtrl::GetRightMargin() { - return HIWORD(SendMsg(EM_GETMARGINS)); -} - - -void wxStyledTextCtrl::SetMargins(int left, int right) { - int flag = 0; - int val = 0; - - if (right != -1) { - flag |= EC_RIGHTMARGIN; - val = right << 16; - } - if (left != -1) { - flag |= EC_LEFTMARGIN; - val |= (left & 0xffff); - } - - SendMsg(EM_SETMARGINS, flag, val); -} - - -//---------------------------------------------------------------------- -// Margins for selection, markers, etc. - -void wxStyledTextCtrl::SetMarginType(int margin, int type) { - SendMsg(SCI_SETMARGINTYPEN, margin, type); -} - - -int wxStyledTextCtrl::GetMarginType(int margin) { - return SendMsg(SCI_GETMARGINTYPEN, margin); -} - - -void wxStyledTextCtrl::SetMarginWidth(int margin, int pixelWidth) { - SendMsg(SCI_SETMARGINWIDTHN, margin, pixelWidth); -} - - -int wxStyledTextCtrl::GetMarginWidth(int margin) { - return SendMsg(SCI_GETMARGINWIDTHN, margin); -} - - -void wxStyledTextCtrl::SetMarginMask(int margin, int mask) { - SendMsg(SCI_SETMARGINMASKN, margin, mask); -} - - -int wxStyledTextCtrl::GetMarginMask(int margin) { - return SendMsg(SCI_GETMARGINMASKN, margin); -} - - -void wxStyledTextCtrl::SetMarginSensitive(int margin, bool sensitive) { - SendMsg(SCI_SETMARGINSENSITIVEN, margin, sensitive); -} - - -bool wxStyledTextCtrl::GetMarginSensitive(int margin) { - return SendMsg(SCI_GETMARGINSENSITIVEN, margin) != 0; -} - - - - -//---------------------------------------------------------------------- -// Selection and Caret styles - - -void wxStyledTextCtrl::SetSelectionForeground(const wxColour& colour) { - SendMsg(SCI_SETSELFORE, 0, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::SetSelectionBackground(const wxColour& colour) { - SendMsg(SCI_SETSELBACK, 0, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::SetCaretForeground(const wxColour& colour) { - SendMsg(SCI_SETCARETFORE, 0, wxColourAsLong(colour)); -} - - -int wxStyledTextCtrl::GetCaretPeriod() { - return SendMsg(SCI_GETCARETPERIOD); -} - - -void wxStyledTextCtrl::SetCaretPeriod(int milliseconds) { - SendMsg(SCI_SETCARETPERIOD, milliseconds); -} - - - -//---------------------------------------------------------------------- -// Other settings - - -void wxStyledTextCtrl::SetBufferedDraw(bool isBuffered) { - SendMsg(SCI_SETBUFFEREDDRAW, isBuffered); -} - - -void wxStyledTextCtrl::SetTabWidth(int numChars) { - SendMsg(SCI_SETTABWIDTH, numChars); -} - - -void wxStyledTextCtrl::SetWordChars(const wxString& wordChars) { - SendMsg(SCI_SETTABWIDTH, 0, (long)wordChars.c_str()); -} - - -//---------------------------------------------------------------------- -// Brace highlighting - - -void wxStyledTextCtrl::BraceHighlight(int pos1, int pos2) { - SendMsg(SCI_BRACEHIGHLIGHT, pos1, pos2); -} - - -void wxStyledTextCtrl::BraceBadlight(int pos) { - SendMsg(SCI_BRACEBADLIGHT, pos); -} - - -int wxStyledTextCtrl::BraceMatch(int pos, int maxReStyle) { - return SendMsg(SCI_BRACEMATCH, pos, maxReStyle); -} - - - -//---------------------------------------------------------------------- -// Markers - -void wxStyledTextCtrl::MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground, - const wxColour& background) { - MarkerSetType(markerNumber, markerSymbol); - MarkerSetForeground(markerNumber, foreground); - MarkerSetBackground(markerNumber, background); -} - - -void wxStyledTextCtrl::MarkerSetType(int markerNumber, int markerSymbol) { - SendMsg(SCI_MARKERDEFINE, markerNumber, markerSymbol); -} - - -void wxStyledTextCtrl::MarkerSetForeground(int markerNumber, const wxColour& colour) { - SendMsg(SCI_MARKERSETFORE, markerNumber, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::MarkerSetBackground(int markerNumber, const wxColour& colour) { - SendMsg(SCI_MARKERSETBACK, markerNumber, wxColourAsLong(colour)); -} - - -int wxStyledTextCtrl::MarkerAdd(int line, int markerNumber) { - return SendMsg(SCI_MARKERADD, line, markerNumber); -} - - -void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) { - SendMsg(SCI_MARKERDELETE, line, markerNumber); -} - - -void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) { - SendMsg(SCI_MARKERDELETEALL, markerNumber); -} - - -int wxStyledTextCtrl::MarkerGet(int line) { - return SendMsg(SCI_MARKERGET); -} - - -int wxStyledTextCtrl::MarkerGetNextLine(int lineStart, int markerMask) { - return SendMsg(SCI_MARKERNEXT, lineStart, markerMask); -} - - -int wxStyledTextCtrl::MarkerGetPrevLine(int lineStart, int markerMask) { -// return SendMsg(SCI_MARKERPREV, lineStart, markerMask); - return 0; -} - - -int wxStyledTextCtrl::MarkerLineFromHandle(int handle) { - return SendMsg(SCI_MARKERLINEFROMHANDLE, handle); -} - - -void wxStyledTextCtrl::MarkerDeleteHandle(int handle) { - SendMsg(SCI_MARKERDELETEHANDLE, handle); -} - - - -//---------------------------------------------------------------------- -// Indicators - - -void wxStyledTextCtrl::IndicatorSetStyle(int indicNum, int indicStyle) { - SendMsg(SCI_INDICSETSTYLE, indicNum, indicStyle); -} - - -int wxStyledTextCtrl::IndicatorGetStyle(int indicNum) { - return SendMsg(SCI_INDICGETSTYLE, indicNum); -} - - -void wxStyledTextCtrl::IndicatorSetColour(int indicNum, const wxColour& colour) { - SendMsg(SCI_INDICSETSTYLE, indicNum, wxColourAsLong(colour)); -} - - - -//---------------------------------------------------------------------- -// Auto completion - - -void wxStyledTextCtrl::AutoCompShow(const wxString& listOfWords) { - SendMsg(SCI_AUTOCSHOW, 0, (long)listOfWords.c_str()); -} - - -void wxStyledTextCtrl::AutoCompCancel() { - SendMsg(SCI_AUTOCCANCEL); -} - - -bool wxStyledTextCtrl::AutoCompActive() { - return SendMsg(SCI_AUTOCACTIVE) != 0; -} - - -int wxStyledTextCtrl::AutoCompPosAtStart() { - return SendMsg(SCI_AUTOCPOSSTART); -} - - -void wxStyledTextCtrl::AutoCompComplete() { - SendMsg(SCI_AUTOCCOMPLETE); -} - - -void wxStyledTextCtrl::AutoCompStopChars(const wxString& stopChars) { - SendMsg(SCI_AUTOCSHOW, 0, (long)stopChars.c_str()); -} - - -//---------------------------------------------------------------------- -// Call tips - -void wxStyledTextCtrl::CallTipShow(int pos, const wxString& text) { - SendMsg(SCI_CALLTIPSHOW, pos, (long)text.c_str()); -} - - -void wxStyledTextCtrl::CallTipCancel() { - SendMsg(SCI_CALLTIPCANCEL); -} - - -bool wxStyledTextCtrl::CallTipActive() { - return SendMsg(SCI_CALLTIPACTIVE) != 0; -} - - -int wxStyledTextCtrl::CallTipPosAtStart() { - return SendMsg(SCI_CALLTIPPOSSTART); -} - - -void wxStyledTextCtrl::CallTipSetHighlight(int start, int end) { - SendMsg(SCI_CALLTIPSETHLT, start, end); -} - - -void wxStyledTextCtrl::CallTipSetBackground(const wxColour& colour) { - SendMsg(SCI_CALLTIPSETBACK, wxColourAsLong(colour)); -} - - -//---------------------------------------------------------------------- -// Key bindings - -void wxStyledTextCtrl::CmdKeyAssign(int key, int modifiers, int cmd) { - SendMsg(SCI_ASSIGNCMDKEY, MAKELONG(key, modifiers), cmd); -} - - -void wxStyledTextCtrl::CmdKeyClear(int key, int modifiers) { - SendMsg(SCI_CLEARCMDKEY, MAKELONG(key, modifiers)); -} - - -void wxStyledTextCtrl::CmdKeyClearAll() { - SendMsg(SCI_CLEARALLCMDKEYS); -} - - +// Perform one of the operations defined by the wxSTC_CMD_* constants. void wxStyledTextCtrl::CmdKeyExecute(int cmd) { SendMsg(cmd); } - -//---------------------------------------------------------------------- -// Print formatting - -int -wxStyledTextCtrl::FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect) { - FORMATRANGE fr; - - fr.hdc = draw; - fr.hdcTarget = target; - fr.rc.top = renderRect.GetTop(); - fr.rc.left = renderRect.GetLeft(); - fr.rc.right = renderRect.GetRight(); - fr.rc.bottom = renderRect.GetBottom(); - fr.rcPage.top = pageRect.GetTop(); - fr.rcPage.left = pageRect.GetLeft(); - fr.rcPage.right = pageRect.GetRight(); - fr.rcPage.bottom = pageRect.GetBottom(); - fr.chrg.cpMin = startPos; - fr.chrg.cpMax = endPos; - - return SendMsg(EM_FORMATRANGE, doDraw, (long)&fr); +// Set the left and right margin in the edit area, measured in pixels. +void wxStyledTextCtrl::SetMargins(int left, int right) { + SetMarginLeft(left); + SetMarginRight(right); } -//---------------------------------------------------------------------- -// Document Sharing - -void* wxStyledTextCtrl::GetDocument() { - return (void*)SendMsg(SCI_GETDOCPOINTER); +// Retrieve the start and end positions of the current selection. +void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) { + if (startPos != NULL) + *startPos = SendMsg(SCI_GETSELECTIONSTART); + if (endPos != NULL) + *endPos = SendMsg(SCI_GETSELECTIONEND); } -void wxStyledTextCtrl::SetDocument(void* document) { - SendMsg(SCI_SETDOCPOINTER, 0, (long)document); +// Retrieve the point in the window where a position is displayed. +wxPoint wxStyledTextCtrl::PointFromPosition(int pos) { + int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos); + int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos); + return wxPoint(x, y); +} + +// Scroll enough to make the given line visible +void wxStyledTextCtrl::ScrollToLine(int line) { + m_swx->DoScrollToLine(line); } -//---------------------------------------------------------------------- -// Folding - -int wxStyledTextCtrl::VisibleFromDocLine(int docLine) { - return SendMsg(SCI_VISIBLEFROMDOCLINE, docLine); -} - - -int wxStyledTextCtrl::DocLineFromVisible(int displayLine) { - return SendMsg(SCI_DOCLINEFROMVISIBLE, displayLine); -} - - -int wxStyledTextCtrl::SetFoldLevel(int line, int level) { - return SendMsg(SCI_SETFOLDLEVEL, line, level); -} - - -int wxStyledTextCtrl::GetFoldLevel(int line) { - return SendMsg(SCI_GETFOLDLEVEL, line); -} - - -int wxStyledTextCtrl::GetLastChild(int line) { - return SendMsg(SCI_GETLASTCHILD, line); -} - - -int wxStyledTextCtrl::GetFoldParent(int line) { - return SendMsg(SCI_GETFOLDPARENT, line); -} - - -void wxStyledTextCtrl::ShowLines(int lineStart, int lineEnd) { - SendMsg(SCI_SHOWLINES, lineStart, lineEnd); -} - - -void wxStyledTextCtrl::HideLines(int lineStart, int lineEnd) { - SendMsg(SCI_HIDELINES, lineStart, lineEnd); -} - - -bool wxStyledTextCtrl::GetLineVisible(int line) { - return SendMsg(SCI_GETLINEVISIBLE, line) != 0; -} - - -void wxStyledTextCtrl::SetFoldExpanded(int line) { - SendMsg(SCI_SETFOLDEXPANDED, line); -} - - -bool wxStyledTextCtrl::GetFoldExpanded(int line) { - return SendMsg(SCI_GETFOLDEXPANDED, line) != 0; -} - - -void wxStyledTextCtrl::ToggleFold(int line) { - SendMsg(SCI_TOGGLEFOLD, line); -} - - -void wxStyledTextCtrl::EnsureVisible(int line) { - SendMsg(SCI_ENSUREVISIBLE, line); -} - - -//---------------------------------------------------------------------- -// Long Lines - -int wxStyledTextCtrl::GetEdgeColumn() { - return SendMsg(SCI_GETEDGECOLUMN); -} - -void wxStyledTextCtrl::SetEdgeColumn(int column) { - SendMsg(SCI_SETEDGECOLUMN, column); -} - -wxSTC_EDGE wxStyledTextCtrl::GetEdgeMode() { - return (wxSTC_EDGE) SendMsg(SCI_GETEDGEMODE); -} - -void wxStyledTextCtrl::SetEdgeMode(wxSTC_EDGE mode){ - SendMsg(SCI_SETEDGEMODE, mode); -} - -wxColour wxStyledTextCtrl::GetEdgeColour() { - long c = SendMsg(SCI_GETEDGECOLOUR); - return wxColourFromLong(c); -} - -void wxStyledTextCtrl::SetEdgeColour(const wxColour& colour) { - SendMsg(SCI_SETEDGECOLOUR, wxColourAsLong(colour)); -} - - -//---------------------------------------------------------------------- -// Lexer - -void wxStyledTextCtrl::SetLexer(wxSTC_LEX lexer) { - SendMsg(SCI_SETLEXER, lexer); -} - - -wxSTC_LEX wxStyledTextCtrl::GetLexer() { - return (wxSTC_LEX)SendMsg(SCI_GETLEXER); -} - - -void wxStyledTextCtrl::Colourise(int start, int end) { - SendMsg(SCI_COLOURISE, start, end); -} - - -void wxStyledTextCtrl::SetProperty(const wxString& key, const wxString& value) { - SendMsg(SCI_SETPROPERTY, (long)key.c_str(), (long)value.c_str()); -} - - -void wxStyledTextCtrl::SetKeywords(int keywordSet, const wxString& keywordList) { - SendMsg(SCI_SETKEYWORDS, keywordSet, (long)keywordList.c_str()); +// Scroll enough to make the given column visible +void wxStyledTextCtrl::ScrollToColumn(int column) { + m_swx->DoScrollToColumn(column); } @@ -1278,20 +1540,23 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) { } void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { - int processed = 0; long key = evt.KeyCode(); if ((key > WXK_ESCAPE) && (key != WXK_DELETE) && (key < 255) && !evt.ControlDown() && !evt.AltDown()) { m_swx->DoAddChar(key); - processed = true; } else { - key = toupper(key); - processed = m_swx->DoKeyDown(key, evt.ShiftDown(), - evt.ControlDown(), evt.AltDown()); + evt.Skip(); } +} + +void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { + long key = evt.KeyCode(); + key = toupper(key); + int processed = m_swx->DoKeyDown(key, evt.ShiftDown(), + evt.ControlDown(), evt.AltDown()); if (! processed) evt.Skip(); } @@ -1319,9 +1584,15 @@ void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) { } +void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) { + m_swx->DoOnListBox(); +} + + //---------------------------------------------------------------------- // Turn notifications from Scintilla into events + void wxStyledTextCtrl::NotifyChange() { wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId()); GetEventHandler()->ProcessEvent(evt); @@ -1367,6 +1638,9 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { case SCN_NEEDSHOWN: eventType = wxEVT_STC_NEEDSHOWN; break; + case SCN_POSCHANGED: + eventType = wxEVT_STC_POSCHANGED; + break; } if (eventType) { wxStyledTextEvent evt(eventType, GetId()); @@ -1375,7 +1649,8 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { evt.SetModifiers(scn.modifiers); if (eventType == wxEVT_STC_MODIFIED) { evt.SetModificationType(scn.modificationType); - evt.SetText(scn.text); + if (scn.text) + evt.SetText(wxString(scn.text, scn.length)); evt.SetLength(scn.length); evt.SetLinesAdded(scn.linesAdded); evt.SetLine(scn.line); diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in new file mode 100644 index 0000000000..b5df70df2a --- /dev/null +++ b/contrib/src/stc/stc.cpp.in @@ -0,0 +1,523 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: stc.cpp +// Purpose: A wxWindows implementation of Scintilla. This class is the +// one meant to be used directly by wx applications. It does not +// derive directly from the Scintilla classes, but instead +// delegates most things to the real Scintilla class. +// This allows the use of Scintilla without polluting the +// namespace with all the classes and identifiers from Scintilla. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#include + +#include "wx/stc/stc.h" +#include "ScintillaWX.h" + +#include + +// The following code forces a reference to all of the Scintilla lexers. +// If we don't do something like this, then the linker tends to "optimize" +// them away. (eric@sourcegear.com) + +int wxForceScintillaLexers(void) +{ + extern LexerModule lmCPP; + extern LexerModule lmHTML; + extern LexerModule lmXML; + extern LexerModule lmProps; + extern LexerModule lmErrorList; + extern LexerModule lmMake; + extern LexerModule lmBatch; + extern LexerModule lmPerl; + extern LexerModule lmPython; + extern LexerModule lmSQL; + extern LexerModule lmVB; + + if ( + &lmCPP + && &lmHTML + && &lmXML + && &lmProps + && &lmErrorList + && &lmMake + && &lmBatch + && &lmPerl + && &lmPython + && &lmSQL + && &lmVB + ) + { + return 1; + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------- + +const wxChar* wxSTCNameStr = "stcwindow"; + +BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) + EVT_PAINT (wxStyledTextCtrl::OnPaint) + EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin) + EVT_SIZE (wxStyledTextCtrl::OnSize) + EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown) + EVT_MOTION (wxStyledTextCtrl::OnMouseMove) + EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp) + EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp) + EVT_CHAR (wxStyledTextCtrl::OnChar) + EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown) + EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus) + EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus) + EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged) + EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground) + EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu) + EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox) +END_EVENT_TABLE() + + +IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent) + +//---------------------------------------------------------------------- +// Constructor and Destructor + +wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) : + wxControl(parent, id, pos, size, + style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN, + wxDefaultValidator, name) +{ + m_swx = new ScintillaWX(this); + m_stopWatch.Start(); +} + + +wxStyledTextCtrl::~wxStyledTextCtrl() { + delete m_swx; +} + + +//---------------------------------------------------------------------- + +long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { + + return m_swx->WndProc(msg, wp, lp); +} + + +#ifdef MAKELONG +#undef MAKELONG +#endif + +#define MAKELONG(a, b) ((a) | ((b) << 16)) + + +static long wxColourAsLong(const wxColour& co) { + return (((long)co.Blue() << 16) | + ((long)co.Green() << 8) | + ((long)co.Red())); +} + +static wxColour wxColourFromLong(long c) { + wxColour clr; + clr.Set(c & 0xff, (c >> 8) & 0xff, (c >> 16) & 0xff); + return clr; +} + + +static wxColour wxColourFromSpec(const wxString& spec) { + // spec should be #RRGGBB + char* junk; + int red = strtol(spec.Mid(1,2), &junk, 16); + int green = strtol(spec.Mid(3,2), &junk, 16); + int blue = strtol(spec.Mid(5,2), &junk, 16); + return wxColour(red, green, blue); +} + + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py from the contents of Scintilla.iface. Do not edit +// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate. + +%(METHOD_IMPS)s + +// END of generated section +//---------------------------------------------------------------------- + + +// Returns the line number of the line with the caret. +int wxStyledTextCtrl::GetCurrentLine() { + int line = LineFromPosition(GetCurrentPos()); + return line; +} + + +// Extract style settings from a spec-string which is composed of one or +// more of the following comma separated elements: +// +// bold turns on bold +// italic turns on italics +// fore:#RRGGBB sets the foreground colour +// back:#RRGGBB sets the background colour +// face:[facename] sets the font face name to use +// size:[num] sets the font size in points +// eol turns on eol filling +// underline turns on underlining +// +void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { + + wxStringTokenizer tkz(spec, ","); + while (tkz.HasMoreTokens()) { + wxString token = tkz.GetNextToken(); + + wxString option = token.BeforeFirst(':'); + wxString val = token.AfterFirst(':'); + + if (option == "bold") + StyleSetBold(styleNum, true); + + else if (option == "italic") + StyleSetItalic(styleNum, true); + + else if (option == "underline") + StyleSetUnderline(styleNum, true); + + else if (option == "eol") + StyleSetEOLFilled(styleNum, true); + + else if (option == "size") { + long points; + if (val.ToLong(&points)) + StyleSetSize(styleNum, points); + } + + else if (option == "face") + StyleSetFaceName(styleNum, val); + + else if (option == "fore") + StyleSetForeground(styleNum, wxColourFromSpec(val)); + + else if (option == "back") + StyleSetBackground(styleNum, wxColourFromSpec(val)); + } +} + + +// Set style size, face, bold, italic, and underline attributes from +// a wxFont's attributes. +void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { + int size = font.GetPointSize(); + wxString faceName = font.GetFaceName(); + bool bold = font.GetWeight() == wxBOLD; + bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); + + // TODO: add encoding/charset mapping + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); +} + +// Set all font style attributes at once. +void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline) { + StyleSetSize(styleNum, size); + StyleSetFaceName(styleNum, faceName); + StyleSetBold(styleNum, bold); + StyleSetItalic(styleNum, italic); + StyleSetUnderline(styleNum, underline); + + // TODO: add encoding/charset mapping +} + + +// Perform one of the operations defined by the wxSTC_CMD_* constants. +void wxStyledTextCtrl::CmdKeyExecute(int cmd) { + SendMsg(cmd); +} + + +// Set the left and right margin in the edit area, measured in pixels. +void wxStyledTextCtrl::SetMargins(int left, int right) { + SetMarginLeft(left); + SetMarginRight(right); +} + + +// Retrieve the start and end positions of the current selection. +void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) { + if (startPos != NULL) + *startPos = SendMsg(SCI_GETSELECTIONSTART); + if (endPos != NULL) + *endPos = SendMsg(SCI_GETSELECTIONEND); +} + + +// Retrieve the point in the window where a position is displayed. +wxPoint wxStyledTextCtrl::PointFromPosition(int pos) { + int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos); + int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos); + return wxPoint(x, y); +} + +// Scroll enough to make the given line visible +void wxStyledTextCtrl::ScrollToLine(int line) { + m_swx->DoScrollToLine(line); +} + + +// Scroll enough to make the given column visible +void wxStyledTextCtrl::ScrollToColumn(int column) { + m_swx->DoScrollToColumn(column); +} + + + +//---------------------------------------------------------------------- +// Event handlers + +void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) { + wxPaintDC dc(this); + wxRegion region = GetUpdateRegion(); + + m_swx->DoPaint(&dc, region.GetBox()); +} + +void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) { + if (evt.GetOrientation() == wxHORIZONTAL) + m_swx->DoHScroll(evt.GetEventType(), evt.GetPosition()); + else + m_swx->DoVScroll(evt.GetEventType(), evt.GetPosition()); +} + +void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { + wxSize sz = GetClientSize(); + m_swx->DoSize(sz.x, sz.y); +} + +void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), + evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); +} + +void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoButtonMove(Point(pt.x, pt.y)); +} + +void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(), + evt.ControlDown()); +} + + +void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoContextMenu(Point(pt.x, pt.y)); +} + +void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { + long key = evt.KeyCode(); + if ((key > WXK_ESCAPE) && + (key != WXK_DELETE) && (key < 255) && + !evt.ControlDown() && !evt.AltDown()) { + + m_swx->DoAddChar(key); + } + else { + evt.Skip(); + } +} + +void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { + long key = evt.KeyCode(); + key = toupper(key); + int processed = m_swx->DoKeyDown(key, evt.ShiftDown(), + evt.ControlDown(), evt.AltDown()); + if (! processed) + evt.Skip(); +} + +void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) { + m_swx->DoLoseFocus(); +} + +void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) { + m_swx->DoGainFocus(); +} + +void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) { + m_swx->DoSysColourChange(); +} + +void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) { + // do nothing to help avoid flashing +} + + + +void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) { + m_swx->DoCommand(evt.GetId()); +} + + +void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) { + m_swx->DoOnListBox(); +} + + +//---------------------------------------------------------------------- +// Turn notifications from Scintilla into events + + +void wxStyledTextCtrl::NotifyChange() { + wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId()); + GetEventHandler()->ProcessEvent(evt); +} + +void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { + SCNotification& scn = *_scn; + int eventType = 0; + switch (scn.nmhdr.code) { + case SCN_STYLENEEDED: + eventType = wxEVT_STC_STYLENEEDED; + break; + case SCN_CHARADDED: + eventType = wxEVT_STC_CHARADDED; + break; + case SCN_UPDATEUI: + eventType = wxEVT_STC_UPDATEUI; + break; + case SCN_SAVEPOINTREACHED: + eventType = wxEVT_STC_SAVEPOINTREACHED; + break; + case SCN_SAVEPOINTLEFT: + eventType = wxEVT_STC_SAVEPOINTLEFT; + break; + case SCN_MODIFYATTEMPTRO: + eventType = wxEVT_STC_ROMODIFYATTEMPT; + break; + case SCN_DOUBLECLICK: + eventType = wxEVT_STC_DOUBLECLICK; + break; + case SCN_MODIFIED: + eventType = wxEVT_STC_MODIFIED; + break; + case SCN_KEY: + eventType = wxEVT_STC_KEY; + break; + case SCN_MACRORECORD: + eventType = wxEVT_STC_MACRORECORD; + break; + case SCN_MARGINCLICK: + eventType = wxEVT_STC_MARGINCLICK; + break; + case SCN_NEEDSHOWN: + eventType = wxEVT_STC_NEEDSHOWN; + break; + case SCN_POSCHANGED: + eventType = wxEVT_STC_POSCHANGED; + break; + } + if (eventType) { + wxStyledTextEvent evt(eventType, GetId()); + evt.SetPosition(scn.position); + evt.SetKey(scn.ch); + evt.SetModifiers(scn.modifiers); + if (eventType == wxEVT_STC_MODIFIED) { + evt.SetModificationType(scn.modificationType); + if (scn.text) + evt.SetText(wxString(scn.text, scn.length)); + evt.SetLength(scn.length); + evt.SetLinesAdded(scn.linesAdded); + evt.SetLine(scn.line); + evt.SetFoldLevelNow(scn.foldLevelNow); + evt.SetFoldLevelPrev(scn.foldLevelPrev); + } + if (eventType == wxEVT_STC_MARGINCLICK) + evt.SetMargin(scn.margin); + if (eventType == wxEVT_STC_MACRORECORD) { + evt.SetMessage(scn.message); + evt.SetWParam(scn.wParam); + evt.SetLParam(scn.lParam); + } + + GetEventHandler()->ProcessEvent(evt); + } +} + + + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- + +wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id) + : wxCommandEvent(commandType, id) +{ + m_position = 0; + m_key = 0; + m_modifiers = 0; + m_modificationType = 0; + m_length = 0; + m_linesAdded = 0; + m_line = 0; + m_foldLevelNow = 0; + m_foldLevelPrev = 0; + m_margin = 0; + m_message = 0; + m_wParam = 0; + m_lParam = 0; + + +} + +bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; } +bool wxStyledTextEvent::GetControl() const { return (m_modifiers & SCI_CTRL) != 0; } +bool wxStyledTextEvent::GetAlt() const { return (m_modifiers & SCI_ALT) != 0; } + +void wxStyledTextEvent::CopyObject(wxObject& obj) const { + wxCommandEvent::CopyObject(obj); + + wxStyledTextEvent* o = (wxStyledTextEvent*)&obj; + o->m_position = m_position; + o->m_key = m_key; + o->m_modifiers = m_modifiers; + o->m_modificationType = m_modificationType; + o->m_text = m_text; + o->m_length = m_length; + o->m_linesAdded = m_linesAdded; + o->m_line = m_line; + o->m_foldLevelNow = m_foldLevelNow; + o->m_foldLevelPrev = m_foldLevelPrev; + + o->m_margin = m_margin; + + o->m_message = m_message; + o->m_wParam = m_wParam; + o->m_lParam = m_lParam; + + + +} + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- + diff --git a/contrib/src/stc/stc.h.in b/contrib/src/stc/stc.h.in new file mode 100644 index 0000000000..d9c23f9be3 --- /dev/null +++ b/contrib/src/stc/stc.h.in @@ -0,0 +1,297 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: stc.h +// Purpose: A wxWindows implementation of Scintilla. This class is the +// one meant to be used directly by wx applications. It does not +// derive directly from the Scintilla classes, and in fact there +// is no mention of Scintilla classes at all in this header. +// This class delegates all method calls and events to the +// Scintilla objects and so forth. This allows the use of +// Scintilla without polluting the namespace with all the +// classes and itentifiers from Scintilla. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef __stc_h__ +#define __stc_h__ + + +#include + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +%(VALUES)s + +// END of generated section +//---------------------------------------------------------------------- +// Others + +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)) + + + +//---------------------------------------------------------------------- + +class ScintillaWX; // forward declare +class WordList; +struct SCNotification; + + +extern const wxChar* wxSTCNameStr; + +//---------------------------------------------------------------------- + +class wxStyledTextCtrl : public wxControl { +public: + +#ifdef SWIG + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const char* name = "styledtext"); +#else + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSTCNameStr); +#endif + + +#ifndef SWIG + ~wxStyledTextCtrl(); +#endif + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +%(METHOD_DEFS)s + +// END of generated section +//---------------------------------------------------------------------- +// Others... + + + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:#RRGGBB sets the foreground colour + // back:#RRGGBB sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec(int styleNum, const wxString& spec); + + + + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont(int styleNum, wxFont& font); + + + + // Set all font style attributes at once. + void StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline); + + + + // Perform one of the operations defined by the wxSTC_CMD_* constants. + void CmdKeyExecute(int cmd); + + + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins(int left, int right); + + + // Retrieve the start and end positions of the current selection. +#ifdef SWIG + void GetSelection(int* OUTPUT, int* OUTPUT); +#else + void GetSelection(int* startPos, int* endPos); +#endif + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition(int pos); + + + // Scroll enough to make the given line visible + void ScrollToLine(int line); + + + // Scroll enough to make the given column visible + void ScrollToColumn(int column); + +//---------------------------------------------------------------------- + + +#ifndef SWIG +private: + // Event handlers + void OnPaint(wxPaintEvent& evt); + void OnScrollWin(wxScrollWinEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnMouseLeftDown(wxMouseEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseLeftUp(wxMouseEvent& evt); + void OnMouseRightUp(wxMouseEvent& evt); + void OnChar(wxKeyEvent& evt); + void OnKeyDown(wxKeyEvent& evt); + void OnLoseFocus(wxFocusEvent& evt); + void OnGainFocus(wxFocusEvent& evt); + void OnSysColourChanged(wxSysColourChangedEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnMenu(wxCommandEvent& evt); + void OnListBox(wxCommandEvent& evt); + + + // Turn notifications from Scintilla into events + void NotifyChange(); + void NotifyParent(SCNotification* scn); + + long SendMsg(int msg, long wp=0, long lp=0); + +private: + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxStyledTextCtrl) + + ScintillaWX* m_swx; + wxStopWatch m_stopWatch; + + + friend class ScintillaWX; + friend class Platform; +#endif +}; + +//---------------------------------------------------------------------- + +class wxStyledTextEvent : public wxCommandEvent { +public: + wxStyledTextEvent(wxEventType commandType=0, int id=0); + ~wxStyledTextEvent() {} + + void SetPosition(int pos) { m_position = pos; } + void SetKey(int k) { m_key = k; } + void SetModifiers(int m) { m_modifiers = m; } + void SetModificationType(int t) { m_modificationType = t; } + void SetText(const char* t) { m_text = t; } + void SetLength(int len) { m_length = len; } + void SetLinesAdded(int num) { m_linesAdded = num; } + void SetLine(int val) { m_line = val; } + void SetFoldLevelNow(int val) { m_foldLevelNow = val; } + void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } + void SetMargin(int val) { m_margin = val; } + void SetMessage(int val) { m_message = val; } + void SetWParam(int val) { m_wParam = val; } + void SetLParam(int val) { m_lParam = val; } + + int GetPosition() const { return m_position; } + int GetKey() const { return m_key; } + int GetModifiers() const { return m_modifiers; } + int GetModificationType() const { return m_modificationType; } + wxString GetText() const { return m_text; } + int GetLength() const { return m_length; } + int GetLinesAdded() const { return m_linesAdded; } + int GetLine() const { return m_line; } + int GetFoldLevelNow() const { return m_foldLevelNow; } + int GetFoldLevelPrev() const { return m_foldLevelPrev; } + int GetMargin() const { return m_margin; } + int GetMessage() const { return m_message; } + int GetWParam() const { return m_wParam; } + int GetLParam() const { return m_lParam; } + + bool GetShift() const; + bool GetControl() const; + bool GetAlt() const; + + void CopyObject(wxObject& obj) const; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) + + int m_position; + int m_key; + int m_modifiers; + + int m_modificationType; // wxEVT_STC_MODIFIED + wxString m_text; + int m_length; + int m_linesAdded; + int m_line; + int m_foldLevelNow; + int m_foldLevelPrev; + + int m_margin; // wxEVT_STC_MARGINCLICK + + int m_message; // wxEVT_STC_MACRORECORD + int m_wParam; + int m_lParam; +#endif +}; + + +// Event types +enum { + wxEVT_STC_CHANGE = 1650, + wxEVT_STC_STYLENEEDED, + wxEVT_STC_CHARADDED, + wxEVT_STC_UPDATEUI, + wxEVT_STC_SAVEPOINTREACHED, + wxEVT_STC_SAVEPOINTLEFT, + wxEVT_STC_ROMODIFYATTEMPT, + wxEVT_STC_DOUBLECLICK, + wxEVT_STC_MODIFIED, + wxEVT_STC_KEY, + wxEVT_STC_MACRORECORD, + wxEVT_STC_MARGINCLICK, + wxEVT_STC_NEEDSHOWN, + wxEVT_STC_POSCHANGED +}; + + +#ifndef SWIG +typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); + +#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, + +#endif + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- +#endif + + diff --git a/debian/README.Debian b/debian/README.Debian index bc3cbd2c72..beaae7c54f 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -3,11 +3,45 @@ wxwindows for Debian The following packages are built from the wxWindows CVS source. -libwxgtk wxGTK shared library -libwxgtk-dev Headers and static lib for building wxGTK apps -libwxgtk-python Python binding to wxGTK +libwxbase wxBase runtime shared libraries +libwxbase-dev extra files and static libs for building wxBase apps +libwxbase-dbg wxBase libraries built with -g and __WXDEBUG__ + +libwxgtk wxGTK runtime shared libraries +libwxgtk-dev extra files and static libs for building wxGTK apps +libwxgtk-dbg wxGTK libraries built with -g and __WXDEBUG__ + +libwxgtk-python Python binding to wxGTK (from 2.2.3 onward, this + obsoletes the libwxgtk-python-contrib package as + all python modules are build into a single monolith) + +wxwin-contrib wxWin contrib runtime shared libs (built with wxGTK) +wxwin-contrib-dev extra files and static contrib libs for building apps + +wxwin-headers common header files for building wxWindows apps wxwin-doc HTML version of the wxWindows manual wxwin-examples wxWindows and wxPython demos and samples (source) +wxwin-i18n message catalogs for native language support + + + The following three can be built from the source package + with the mingw32 cross compiler, but are not currently + distributed by Debian. If you feel that should change, + please file a bug against the wxwindows2.2 package, or + append your views to a report already there if you're not + the first to do so. + + [ you can check the current state of affairs at: + http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=wxwindows2.2 ] + + Oh and, please do *not* file bug reports for these three + to the Debian bts. But do feel free to email be personally + if you find problems and/or have patches to fix them. + +libwxmsw2.2-dev_2.2.8_i386.deb mingw32-cross wxMSW libs. +libwxbase-msw2.2-dev_2.2.8_i386.deb mingw32-cross wxBase libs. +wxwin2.2-headers-msw_2.2.8_i386.deb extra headers needed for wxMSW. -- Ron Lee , Sun, 13 Feb 2000 18:40:00 +1030 + diff --git a/debian/changelog b/debian/changelog index 8eebb0864a..3d5d18cedf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,145 @@ -wxwindows2.1 (2.1.14) unstable; urgency=low +wxwindows2.2 (2.2.9) unstable; urgency=high - * Repackaged to build from cvs. + * fix for arches with unsigned char as default. + * high urgency because this fix really should get + into woody. + Closes: #127014 + + -- Ron Lee Mon, 31 Dec 2001 06:53:27 -0800 + +wxwindows2.2 (2.2.8.5) unstable; urgency=low + + * Add wxSIZE_T_IS defines to setup.h + Add automate that to my TODO list. + + -- Ron Lee Tue, 27 Nov 2001 05:55:47 -0800 + +wxwindows2.2 (2.2.8.4) unstable; urgency=low + + * Put the (modified) size_t == ulong kludge back into sndwav.cpp + it's still needed until wxDataOutputStream is made 64 bit + friendly, which may not happen for 2.2 since it will probably + not be binary compatible. + * caps a memory leak in the jpeg handler. + + -- Ron Lee Sun, 25 Nov 2001 11:53:59 -0800 + +wxwindows2.2 (2.2.8.3) unstable; urgency=low + + * Backported size_t test from 2.3 tree, removes the need for + specific tests for various 64 bit platforms including now + S/390 (thanks to Gerhard Tonn for the report). + Closes: #120768 + + -- Ron Lee Fri, 23 Nov 2001 20:53:49 -0800 + +wxwindows2.2 (2.2.8.2) unstable; urgency=low + + * python-dev doesn't get me python? More bytes in Build-Dep then + I guess ... Closes: #119954 + + -- Ron Lee Sun, 18 Nov 2001 04:28:41 -0800 + +wxwindows2.2 (2.2.8.1) unstable; urgency=low + + * Rebuild for python2.1 Closes: #119226, #118835 + + -- Ron Lee Mon, 12 Nov 2001 21:47:38 -0800 + +wxwindows2.2 (2.2.8) unstable; urgency=medium + + * Fixed bogus samples makefile. Closes: #110061 + * Added ability to build wxMSW-cross packages, but they + are not built and distributed by default. + + If you think such creatures belong in the archive, + see README.Debian + + * Pruned more inapplicable files from the raw cvs source, + cleaned configure.in and removed the need for a common setup.h, + removed superfluous library links and generally tweaked things + so as to make adding new ports easier. + * added --gl-libs flag to wx-config. + * added wx2.4 forward compatible event macros. + * added build fixes for IA64 from Jeff Licquia, and fixed clean + rules to pick up unnoticed strays that effected NMU builds. + Thanks Jeff. Closes: #101734, #104679 (fixed in NMU) + * Medium urgency since several other packages are waiting + for this to get into testing. + + -- Ron Lee Thu, 30 Aug 2001 15:41:49 -0700 + +wxwindows2.2 (2.2.7) unstable; urgency=medium + + * The "Testing Tarantella" release. + * various small control (mis)behaviours corrected. + * added missing build-dep for gettext. + * updated wxPython description, Closes: #102689 + * Never publicly released, oh well. + + -- Ron Lee Sun, 10 Jun 2001 19:32:46 -0700 + +wxwindows2.2 (2.2.6.1) unstable; urgency=low + + * fix rules so it really doesn't build -indep for ports + and fixed ambiguous overload bug in mmedia contrib. + This time it will build on alpha for sure. Really. :) + Closes: #92288 + * added extra -dev package deps. Closes: #91364 + + -- Ron Lee Sat, 7 Apr 2001 06:49:58 -0700 + +wxwindows2.2 (2.2.6) unstable; urgency=low + + * changed i18n package back to building during arch phase + so we can reap the .mo files as they are created. Closes: #86174 + * OBCBLR Closes: #84692 + * fix wxPython build gremlin. Closes: #89209, #85129 + * tweaked wx-config alternatives priority to favour the most + likely default use. + * general buglet count reduced. + + -- Ron Lee Thu, 8 Mar 2001 21:10:07 -0800 + +wxwindows2.2 (2.2.5.1) unstable; urgency=low + + * "This One's for Dirk" Closes: #84696 + * 2.2.5 has known issues and will not be released for Debian. + * Fixed parser.y for Alpha builds (#82949) + * changed mesa dependency to the virtual libgl package and + added Conflicts for the old 2.1 packages (which are now + gone from woody anyway) Closes: #80120, #70778, #70779, #70780 + * wxPython now builds as a single unit (including contrib) + so removed the libwxgtk-python-contrib package + * updated translations + * new event table macro to enable code being written with 2.2 + to be forward compatible with the changes in 2.4 + * numerous sundry bugfixes + + -- Ron Lee Wed, 24 Jan 2001 18:51:24 -0800 + +wxwindows2.2 (2.2.2) unstable; urgency=low + + * added missing dependancy for contrib-dev package. Closes: #70880 + * by popular demand, added a package with the python-contrib libs. + * more tweaks to deb/rules. autodetect the python install location, + and cache the results of configure tests for all packages. + * and of course a whole stack of minor fixes in the main codebase too. + + -- Ron Lee Tue, 5 Sep 2000 18:51:24 +0930 + +wxwindows2.2 (2.2.1) unstable; urgency=low + + * wxWin 2.2.1 stable release. + * First upload to deb.org after repackaging to build directly from + upstream cvs. + * still not quite lintian clean yet: + - wxPython lib can't be built with a proper soname yet. + - the -dbg packages need an override for the shlib symlink. + - and a couple of packages have the lib symlink 'before the + lib', but that's ugly to fix right now, they aren't critical + libs, and allegedly this will be handled by dpkg sometime soon. + * moved full licence text into copyright file. -- Ron Lee Sun, 13 Feb 2000 18:40:00 +1030 diff --git a/debian/control.in b/debian/control.in index 9dbe952fb1..b2ca8fb7b6 100644 --- a/debian/control.in +++ b/debian/control.in @@ -1,9 +1,9 @@ Source: wxwindows=V Section: libs Priority: optional -Build-Depends: debhelper, libgtk1.2-dev, python-dev (>=1.5), flex, bison +Build-Depends: debhelper (>=2.0), flex, bison, gettext, libgtk1.2-dev, python (>=2.1), python (<<2.2), python2.1-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, libgl-dev, libesd0-dev Maintainer: Ron Lee -Standards-Version: 3.1.1 +Standards-Version: 3.5.6.0 Package: libwxbase=V Architecture: any @@ -15,8 +15,8 @@ Description: wxBase library (runtime) - non-GUI support classes of wxWindows too portable wrappers around many OS-specific functions allowing to build the same program under all supported folders, wxThread class for writing multithreaded programs using either Win32 or POSIX threads and much more. - wxBase currently supports the following platforms: Win32, generic Unix - (Linux, FreeBSD, Solaris, HP-UX, ...) and BeOS. + wxBase currently supports the following platforms: Generic Unix (Linux, FreeBSD, + Solaris, HP-UX, ...), win32, and BeOS. . This package is only useful for non-gui apps. It offers a subset of the classes in libwx_gtk=V for use in console apps and daemons. It is currently @@ -25,7 +25,7 @@ Description: wxBase library (runtime) - non-GUI support classes of wxWindows too Package: libwxbase=V-dev Architecture: any Section: devel -Depends: libwxbase=V (= ${Source-Version}), libwxgtk=V-dev (= ${Source-Version}), libc6-dev +Depends: wxwin=V-headers (= ${Source-Version}), libwxbase=V (= ${Source-Version}), zlib1g-dev, libc6-dev Suggests: wxwin=V-doc, gettext Conflicts: libwxbase-dev Replaces: libwxbase-dev @@ -36,52 +36,151 @@ Description: wxBase library (development) - non-GUI support classes of wxWindows portable wrappers around many OS-specific functions allowing to build the same program under all supported folders, wxThread class for writing multithreaded programs using either Win32 or POSIX threads and much more. - wxBase currently supports the following platforms: Win32, generic Unix - (Linux, FreeBSD, Solaris, HP-UX, ...) and BeOS. + wxBase currently supports the following platforms: Generic Unix (Linux, FreeBSD, + Solaris, HP-UX, ...), win32, and BeOS. . - This package is only useful for non-gui apps. It offers a subset of the - classes in libwx_gtk=V for use in console apps and daemons. It is currently - under development and may not be as stable as the gui version. + This package provides the files needed to compile apps using the wxBase library. + +Package: libwxbase=V-dbg +Architecture: any +Section: devel +Priority: extra +Depends: wxwin=V-headers (= ${Source-Version}), libc6-dev +Conflicts: libwxbase-dbg +Replaces: libwxbase-dbg +Provides: libwxbase-dbg +Description: wxBase library (debug) - non-GUI support classes of wxWindows toolkit + wxBase is a collection of C++ classes providing basic data structures + (strings, lists, arrays), powerful wxDateTime class for date manipulations, + portable wrappers around many OS-specific functions allowing to build the + same program under all supported folders, wxThread class for writing + multithreaded programs using either Win32 or POSIX threads and much more. + wxBase currently supports the following platforms: Generic Unix (Linux, FreeBSD, + Solaris, HP-UX, ...) win32, and BeOS. + . + This package provides a debug version of the wxBase library. It is compiled + both with -g for normal debugger tracing and with the __WXDEBUG__ flag which + provides many internal checks by wxWindows itself that are not performed on + apps compiled with the 'release version' libs in the -dev package. Package: libwxgtk=V Architecture: any Section: libs Depends: ${shlibs:Depends} +Suggests: libgl1 +Replaces: wxgtk2.1 Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ runtime) wxWindows is a class library for C++ providing GUI (Graphical User - Interface) and other facilities on more than one platform. Version 2.1 + Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . This package provides the shared libraries needed to run programs linked - against wxWindows. + against wxWindows. To use the (optional) glcanvas library you will need + to have Mesa or OpenGL installed. Package: libwxgtk=V-dev Architecture: any Section: devel -Depends: libwxgtk=V (= ${Source-Version}), libc6-dev -Suggests: wxwin=V-doc, libstdc++-dev, gettext +Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libgtk1.2-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, libc6-dev +Suggests: wxwin=V-doc, libstdc++-dev, gettext, libgl-dev Conflicts: libwxgtk-dev -Replaces: libwxgtk-dev +Replaces: libwxgtk-dev, wxgtk2.1-dev Provides: libwxgtk-dev Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development) wxWindows is a class library for C++ providing GUI (Graphical User - Interface) and other facilities on more than one platform. Version 2.1 + Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . - This package provides files needed to compile wxWindows programs. It - includes header files and static libraries. + This package provides files needed to compile wxWindows programs. If you + want to compile apps using the (optional) glcanvas library you will need + to have Mesa or OpenGL installed too. + +Package: libwxgtk=V-dbg +Architecture: any +Section: devel +Priority: extra +Depends: wxwin=V-headers (= ${Source-Version}), libc6-dev +Conflicts: libwxgtk-dbg +Replaces: libwxgtk-dbg +Provides: libwxgtk-dbg +Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development) + wxWindows is a class library for C++ providing GUI (Graphical User + Interface) and other facilities on more than one platform. Version =V + currently supports subsets of GTK+, Motif, and MS Windows. + . + This package provides a debug version of the wxGtk library. It is compiled + both with -g for normal debugger tracing and with the __WXDEBUG__ flag which + provides many internal checks by wxWindows itself that are not performed on + apps compiled with the 'release version' libs in the -dev package. Package: libwxgtk=V-python Architecture: any Section: interpreters -Depends: libwxgtk=V (= ${Source-Version}), python-base (>=1.5), ${shlibs:Depends} -Suggests: wxwin=V-doc -Description: wxWindows Cross-platform C++ GUI toolkit (Python binding) +Depends: python (>=2.1), python (<<2.2), ${shlibs:Depends} +Suggests: wxwin=V-doc, wxwin=V-examples +Conflicts: libwxgtk=V-python-contrib, python-wxwin +Replaces: libwxgtk=V-python-contrib, python-wxwin +Description: wxWindows Cross-platform C++ GUI toolkit (wxPython binding) wxWindows is a class library for C++ providing GUI (Graphical User - Interface) and other facilities on more than one platform. Version 2.1 + Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . - This package provides a Python binding to the wxGTK library. + This package provides a Python binding to the wxGTK library and it's + contrib libs. + +Package: libwxgtk=V-contrib +Architecture: any +Section: libs +Depends: libwxgtk=V (= ${Source-Version}), ${shlibs:Depends} +Description: wxWindows Cross-platform C++ GUI toolkit (runtime contrib libs) + wxWindows is a class library for C++ providing GUI (Graphical User + Interface) and other facilities on more than one platform. Version =V + currently supports subsets of GTK+, Motif, and MS Windows. + . + This package provides the contrib libs of the wxWindows source tree + (mmedia, ogl, stc) + +Package: libwxgtk=V-contrib-dev +Architecture: any +Section: devel +Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V-dev (= ${Source-Version}), libwxgtk=V-contrib (= ${Source-Version}), libc6-dev +Conflicts: libwxgtk-contrib-dev +Replaces: libwxgtk-contrib-dev +Provides: libwxgtk-contrib-dev +Description: wxWindows Cross-platform C++ GUI toolkit (development contrib libs) + wxWindows is a class library for C++ providing GUI (Graphical User + Interface) and other facilities on more than one platform. Version =V + currently supports subsets of GTK+, Motif, and MS Windows. + . + Install this package if you wish to compile applications that use the + contrib libs from the wxWindows source tree (mmedia, ogl, stc) + +Package: wxwin=V-headers +Architecture: any +Section: devel +Conflicts: wxwin-headers +Replaces: wxwin-headers, wxgtk2.1-dev +Provides: wxwin-headers +Description: wxWindows Cross-platform C++ GUI toolkit (header files) + wxWindows is a class library for C++ providing GUI (Graphical User + Interface) and other facilities on more than one platform. Version =V + currently supports subsets of GTK+, Motif, and MS Windows. + . + This package provides the common header files required to build applications + using the wxWindows toolkit. + +Package: wxwin=V-i18n +Architecture: all +Section: libs +Conflicts: wxwin-i18n +Replaces: wxwin-i18n +Provides: wxwin-i18n +Description: wxWindows Cross-platform C++ GUI toolkit (i18n support) + wxWindows is a class library for C++ providing GUI (Graphical User + Interface) and other facilities on more than one platform. Version =V + currently supports subsets of GTK+, Motif, and MS Windows. + . + This package provides the i18n message catalogs for wxWindows. Package: wxwin=V-doc Architecture: all @@ -89,7 +188,7 @@ Section: doc Suggests: doc-base, www-browser Description: wxWindows Cross-platform C++ GUI toolkit (documentation) wxWindows is a class library for C++ providing GUI (Graphical User - Interface) and other facilities on more than one platform. Version 2.1 + Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . This package provides a HTML version of the wxWindows reference manual. @@ -100,8 +199,38 @@ Section: devel Suggests: libwxgtk=V-dev (= ${Source-Version}), wxwin=V-doc Description: wxWindows Cross-platform C++ GUI toolkit (examples) wxWindows is a class library for C++ providing GUI (Graphical User - Interface) and other facilities on more than one platform. Version 2.1 + Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . This package contains examples of using the wxWindows toolkit. +Package: libwxbase-msw=V-dev +Architecture: i386 +Section: otherosfs +Depends: wxwin=V-headers-msw (= ${Source-Version}) +Conflicts: libwxbase-msw-dev +Replaces: libwxbase-msw-dev +Provides: libwxbase-msw-dev +Description: wxBase mingw32msvc-cross + mingw32msvc-cross wxBase libs. + +Package: libwxmsw=V-dev +Architecture: i386 +Section: otherosfs +Depends: wxwin=V-headers-msw (= ${Source-Version}) +Conflicts: libwxmsw-dev +Replaces: libwxmsw-dev +Provides: libwxmsw-dev +Description: wxMSW mingw32msvc-cross + mingw32msvc-cross wxMSW libs. + +Package: wxwin=V-headers-msw +Architecture: i386 +Section: otherosfs +Depends: wxwin=V-headers (= ${Source-Version}) +Conflicts: wxwin-headers-msw +Replaces: wxwin-headers-msw +Provides: wxwin-headers-msw +Description: Extra wxWindows headers for mingw32msvc-cross + Headers required by the wxWindows mingw32msvc-cross libraries. + diff --git a/debian/copyright b/debian/copyright index e46773d05d..55c8d06dfc 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,18 +1,193 @@ This package was debianized by Ron Lee on Sun, 13 Feb 2000 18:40:00 +1030. -wxWindows main upstream site is www.wxwindows.org +more information about wxWindows, as well as the source these debs +are produced from can be found at www.wxwindows.org -wxWindows is licenced under the LGPL with a special exception for -binary only apps produced with it. Some parts of the library (as -compiled for Debian) might *not* include this extra exception in -their licence. If you wish to distribute binary object code under -terms other than those allowed by the (L)GPL (but allowed by the -wxWindows Licence), you must first ensure all linked in code is -subject to this exception. This package is almost certainly built -with code licenced under terms which do not include that exception. +Note for Debian users: +====================== + +Most of the core wxWindows library is licenced under the wxWindows Library +Licence (included below), however some additional features of the library +may include source licenced under terms which do not include the exception +permitting you to licence binary object code versions of works based on the +Library under terms of your own choice. At any time and without warning, +newer versions of the Debian binary packages may include such code. + +In short, if you plan to licence apps built against these debs under terms +compatible with the GPL or LGPL, then you have nothing to worry about. If +you wish to release your code under a licence which does not grant all of +the same rights as the LGPL would assert but would be permitted under the +terms of the exception, then you are strongly advised to either check the +licencing terms of all components that these debs (and all future versions +that you use) are built with, or build your own binaries of wxWindows which +include only such code as is definitely covered by the exception. + +You should presume that these debs will fall under the provisions of the +unmodified LGPL unless you can prove otherwise, however this note in no way +alters the actual terms of the authorative licence detailed below, it is +intended to be purely informative of the fact that the Debian binary packages +will be built primarily with features useful to Free Software developers and +may not be suitable "as is" for compiling software for distribution that is +licenced incompatibly with the LGPL. + +Modifications and additions to the Library itself are encouraged to be +placed under the wxWindows Library Licence. We hope you find it useful. + + -- Ron + +----------------------------------------------------------------------------- + +Preamble +======== + +The licensing of the wxWindows library is intended to protect the wxWindows +library, its developers, and its users, so that the considerable investment +it represents is not abused. + +Under the terms of the wxWindows Licence, you as a user are not +obliged to distribute wxWindows source code with your products, if you +distribute these products in binary form. However, you are prevented from +restricting use of the library in source code form, or denying others the +rights to use or distribute wxWindows library source code in the way +intended. + +The wxWindows Licence establishes the copyright for the code and related +material, and it gives you legal permission to copy, distribute and/or +modify the library. It also asserts that no warranty is given by the authors +for this or derived code. + +The core distribution of the wxWindows library contains files +under two different licences: + +- Most files are distributed under the GNU Library General Public + Licence, version 2, with the special exception that you may create and + distribute object code versions built from the source code or modified + versions of it (even if these modified versions include code under a + different licence), and distribute such binaries under your own + terms. + +- Most core wxWindows manuals are made available under the "wxWindows + Free Documentation Licence", which allows you to distribute modified + versions of the manuals, such as versions documenting any modifications + made by you in your version of the library. However, you may not restrict + any third party from reincorporating your changes into the original + manuals. - See the file licence.txt for authorative details of - the wxWindows licence. + + wxWindows Library Licence, Version 3 + ==================================== + + Copyright (c) 1998 Julian Smart, Robert Roebling et al + + Everyone is permitted to copy and distribute verbatim copies + of this licence document, but changing it is not allowed. + + WXWINDOWS LIBRARY LICENCE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public Licence as published by + the Free Software Foundation; either version 2 of the Licence, or (at + your option) any later version. + + This library 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 Library + General Public Licence for more details. + + You should have received a copy of the GNU Library General Public Licence + along with this software, usually in a file named COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA. + + EXCEPTION NOTICE + + 1. As a special exception, the copyright holders of this library give + permission for additional uses of the text contained in this release of + the library as licenced under the wxWindows Library Licence, applying + either version 3 of the Licence, or (at your option) any later version of + the Licence as published by the copyright holders of version 3 of the + Licence document. + + 2. The exception is that you may use, copy, link, modify and distribute + under the user's own terms, binary object code versions of works based + on the Library. + + 3. If you copy code from files distributed under the terms of the GNU + General Public Licence or the GNU Library General Public Licence into a + copy of this library, as this licence permits, the exception does not + apply to the code that you add in this way. To avoid misleading anyone as + to the status of such modified files, you must delete this exception + notice from such code and/or adjust the licensing conditions notice + accordingly. + + 4. If you write modifications of your own for this library, it is your + choice whether to permit this exception to apply to your modifications. + If you do not wish that, you must delete the exception notice from such + code and/or adjust the licensing conditions notice accordingly. + + + + wxWindows Free Documentation Licence, Version 3 + =============================================== + + Copyright (c) 1998 Julian Smart, Robert Roebling et al + + Everyone is permitted to copy and distribute verbatim copies + of this licence document, but changing it is not allowed. + + WXWINDOWS FREE DOCUMENTATION LICENCE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 1. Permission is granted to make and distribute verbatim copies of this + manual or piece of documentation provided any copyright notice and this + permission notice are preserved on all copies. + + 2. Permission is granted to process this file or document through a + document processing system and, at your option and the option of any third + party, print the results, provided a printed document carries a copying + permission notice identical to this one. + + 3. Permission is granted to copy and distribute modified versions of this + manual or piece of documentation under the conditions for verbatim + copying, provided also that any sections describing licensing conditions + for this manual, such as, in particular, the GNU General Public Licence, + the GNU Library General Public Licence, and any wxWindows Licence are + included exactly as in the original, and provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. + + 4. Permission is granted to copy and distribute translations of this + manual or piece of documentation into another language, under the above + conditions for modified versions, except that sections related to + licensing, including this paragraph, may also be included in translations + approved by the copyright holders of the respective licence documents in + addition to the original English. + + WARRANTY DISCLAIMER + + 5. BECAUSE THIS MANUAL OR PIECE OF DOCUMENTATION IS LICENSED FREE OF CHARGE, + THERE IS NO WARRANTY FOR IT, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER + PARTIES PROVIDE THIS MANUAL OR PIECE OF DOCUMENTATION "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 MANUAL OR PIECE OF DOCUMENTATION IS WITH YOU. SHOULD THE MANUAL OR + PIECE OF DOCUMENTATION PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL + NECESSARY SERVICING, REPAIR OR CORRECTION. + + 6. 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 MANUAL OR PIECE OF DOCUMENTATION 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 + MANUAL OR PIECE OF DOCUMENTATION (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 A PROGRAM BASED ON THE MANUAL OR PIECE OF + DOCUMENTATION TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR + OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + diff --git a/debian/libwxbase-dbg.dirs b/debian/libwxbase-dbg.dirs new file mode 100644 index 0000000000..c5ba0318f3 --- /dev/null +++ b/debian/libwxbase-dbg.dirs @@ -0,0 +1,5 @@ +usr/bin +usr/lib/wx/include/based-=V/wx +usr/share/man/man1 +usr/share/lintian/overrides + diff --git a/debian/libwxbase-dbg.links b/debian/libwxbase-dbg.links new file mode 100644 index 0000000000..7b8770e7a7 --- /dev/null +++ b/debian/libwxbase-dbg.links @@ -0,0 +1,2 @@ +usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbased-=V-config.1.gz + diff --git a/debian/libwxbase-dbg.postinst b/debian/libwxbase-dbg.postinst new file mode 100644 index 0000000000..2aae1122d4 --- /dev/null +++ b/debian/libwxbase-dbg.postinst @@ -0,0 +1,11 @@ +#! /bin/sh +set -e + +update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbased-=V-config 50 + +if [ "$1" = "configure" ]; then + ldconfig +fi + +#DEBHELPER# + diff --git a/debian/libwxbase-dbg.prerm b/debian/libwxbase-dbg.prerm new file mode 100644 index 0000000000..1f1080f90d --- /dev/null +++ b/debian/libwxbase-dbg.prerm @@ -0,0 +1,7 @@ +#! /bin/sh +set -e + +update-alternatives --remove wx-config /usr/bin/wxbased-=V-config + +#DEBHELPER# + diff --git a/debian/libwxbase-dev.dirs b/debian/libwxbase-dev.dirs index 22e51e28b4..adecdf7a7e 100644 --- a/debian/libwxbase-dev.dirs +++ b/debian/libwxbase-dev.dirs @@ -1,3 +1,3 @@ usr/bin -usr/lib/wx/include/wx +usr/lib/wx/include/base-=V/wx usr/share/man/man1 diff --git a/debian/libwxbase-dev.docs b/debian/libwxbase-dev.docs deleted file mode 100644 index 3596b0d607..0000000000 --- a/debian/libwxbase-dev.docs +++ /dev/null @@ -1,3 +0,0 @@ -docs/preamble.txt -docs/licence.txt -docs/licendoc.txt diff --git a/debian/libwxbase-dev.files b/debian/libwxbase-dev.files index 60de00e333..610ec6f1b3 100644 --- a/debian/libwxbase-dev.files +++ b/debian/libwxbase-dev.files @@ -1,4 +1,4 @@ -usr/bin/wxbase-config -usr/lib/wx/include/wx/base/setup.h -usr/lib/libwxbase*.so -usr/lib/libwxbase*.a +usr/bin/wxbase-=V-config +usr/lib/wx/include/base-=V/wx/setup.h +usr/lib/libwx_base*.so + diff --git a/debian/libwxbase-dev.links b/debian/libwxbase-dev.links index e0598ad269..b470e36be2 100644 --- a/debian/libwxbase-dev.links +++ b/debian/libwxbase-dev.links @@ -1 +1 @@ -usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbase-config.1.gz +usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbase-=V-config.1.gz diff --git a/debian/libwxbase-dev.postinst b/debian/libwxbase-dev.postinst index 8587a5ddf1..a8e5a81bc1 100644 --- a/debian/libwxbase-dev.postinst +++ b/debian/libwxbase-dev.postinst @@ -1,7 +1,7 @@ #! /bin/sh set -e -update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbase-config 50 +update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbase-=V-config 60 #DEBHELPER# diff --git a/debian/libwxbase-dev.prerm b/debian/libwxbase-dev.prerm index be132da496..54d3029c56 100644 --- a/debian/libwxbase-dev.prerm +++ b/debian/libwxbase-dev.prerm @@ -1,7 +1,7 @@ #! /bin/sh set -e -update-alternatives --remove wx-config /usr/bin/wxbase-config +update-alternatives --remove wx-config /usr/bin/wxbase-=V-config #DEBHELPER# diff --git a/debian/libwxbase-msw-dev.dirs b/debian/libwxbase-msw-dev.dirs new file mode 100644 index 0000000000..0f7274eb91 --- /dev/null +++ b/debian/libwxbase-msw-dev.dirs @@ -0,0 +1,4 @@ +usr/bin +usr/=H/lib/wx/include/base-=V-=H/wx +usr/share/man/man1 + diff --git a/debian/libwxbase-msw-dev.links b/debian/libwxbase-msw-dev.links new file mode 100644 index 0000000000..7cb936bb34 --- /dev/null +++ b/debian/libwxbase-msw-dev.links @@ -0,0 +1,2 @@ +usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxbase-=V-=H-config.1.gz + diff --git a/debian/libwxbase-msw-dev.postinst b/debian/libwxbase-msw-dev.postinst new file mode 100644 index 0000000000..5ee74f62cd --- /dev/null +++ b/debian/libwxbase-msw-dev.postinst @@ -0,0 +1,7 @@ +#! /bin/sh +set -e + +update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbase-=V-=H-config 40 + +#DEBHELPER# + diff --git a/debian/libwxbase-msw-dev.prerm b/debian/libwxbase-msw-dev.prerm new file mode 100644 index 0000000000..42e29e0c64 --- /dev/null +++ b/debian/libwxbase-msw-dev.prerm @@ -0,0 +1,7 @@ +#! /bin/sh +set -e + +update-alternatives --remove wx-config /usr/bin/wxbase-=V-=H-config + +#DEBHELPER# + diff --git a/debian/libwxbase.dirs b/debian/libwxbase.dirs index 68457717bd..99e2a10872 100644 --- a/debian/libwxbase.dirs +++ b/debian/libwxbase.dirs @@ -1 +1,3 @@ +usr/bin usr/lib + diff --git a/debian/libwxbase.docs b/debian/libwxbase.docs deleted file mode 100644 index 561d5c39f9..0000000000 --- a/debian/libwxbase.docs +++ /dev/null @@ -1 +0,0 @@ -docs/licence.txt diff --git a/debian/libwxbase.files b/debian/libwxbase.files deleted file mode 100644 index 35686b0e13..0000000000 --- a/debian/libwxbase.files +++ /dev/null @@ -1 +0,0 @@ -usr/lib/libwxbase*.so.* diff --git a/debian/libwxgtk-contrib-dev.dirs b/debian/libwxgtk-contrib-dev.dirs new file mode 100644 index 0000000000..7e033b0c69 --- /dev/null +++ b/debian/libwxgtk-contrib-dev.dirs @@ -0,0 +1,2 @@ +usr/lib/ + diff --git a/debian/libwxgtk-contrib-dev.files b/debian/libwxgtk-contrib-dev.files new file mode 100644 index 0000000000..96ed45a3df --- /dev/null +++ b/debian/libwxgtk-contrib-dev.files @@ -0,0 +1,5 @@ +usr/include/wx/ +usr/lib/libmmedia.so +usr/lib/libogl.so +usr/lib/libstc.so + diff --git a/debian/libwxgtk-contrib.dirs b/debian/libwxgtk-contrib.dirs new file mode 100644 index 0000000000..7e033b0c69 --- /dev/null +++ b/debian/libwxgtk-contrib.dirs @@ -0,0 +1,2 @@ +usr/lib/ + diff --git a/debian/libwxgtk-contrib.postinst b/debian/libwxgtk-contrib.postinst new file mode 100644 index 0000000000..881b6e24e2 --- /dev/null +++ b/debian/libwxgtk-contrib.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ]; then + ldconfig +fi + +#DEBHELPER# + diff --git a/debian/libwxgtk-dbg.dirs b/debian/libwxgtk-dbg.dirs new file mode 100644 index 0000000000..f20b3d0ecb --- /dev/null +++ b/debian/libwxgtk-dbg.dirs @@ -0,0 +1,5 @@ +usr/bin +usr/lib/wx/include/gtkd-=V/wx +usr/share/man/man1 +usr/share/lintian/overrides + diff --git a/debian/libwxgtk-dbg.links b/debian/libwxgtk-dbg.links new file mode 100644 index 0000000000..7ef5011266 --- /dev/null +++ b/debian/libwxgtk-dbg.links @@ -0,0 +1,2 @@ +usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtkd-=V-config.1.gz + diff --git a/debian/libwxgtk-dbg.postinst b/debian/libwxgtk-dbg.postinst new file mode 100644 index 0000000000..d5c1795ebf --- /dev/null +++ b/debian/libwxgtk-dbg.postinst @@ -0,0 +1,11 @@ +#! /bin/sh +set -e + +update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtkd-=V-config 50 + +if [ "$1" = "configure" ]; then + ldconfig +fi + +#DEBHELPER# + diff --git a/debian/libwxgtk-dbg.prerm b/debian/libwxgtk-dbg.prerm new file mode 100644 index 0000000000..72616f1df8 --- /dev/null +++ b/debian/libwxgtk-dbg.prerm @@ -0,0 +1,7 @@ +#! /bin/sh +set -e + +update-alternatives --remove wx-config /usr/bin/wxgtkd-=V-config + +#DEBHELPER# + diff --git a/debian/libwxgtk-dev.dirs b/debian/libwxgtk-dev.dirs index f3281f468f..32b01a1202 100644 --- a/debian/libwxgtk-dev.dirs +++ b/debian/libwxgtk-dev.dirs @@ -1,4 +1,4 @@ usr/bin -usr/lib/wx/include/wx/gtk/ -usr/include/wx +usr/lib/wx/include/gtk-=V/wx usr/share/man/man1 + diff --git a/debian/libwxgtk-dev.docs b/debian/libwxgtk-dev.docs deleted file mode 100644 index 3596b0d607..0000000000 --- a/debian/libwxgtk-dev.docs +++ /dev/null @@ -1,3 +0,0 @@ -docs/preamble.txt -docs/licence.txt -docs/licendoc.txt diff --git a/debian/libwxgtk-dev.files b/debian/libwxgtk-dev.files index d1e42a2f78..17d4068a55 100644 --- a/debian/libwxgtk-dev.files +++ b/debian/libwxgtk-dev.files @@ -1,5 +1,4 @@ -usr/bin/wxgtk-config -usr/include/wx/ -usr/lib/wx/include/wx/gtk/setup.h +usr/bin/wxgtk-=V-config +usr/lib/wx/include/gtk-=V/wx/setup.h usr/lib/libwx_gtk*.so -usr/lib/libwx_gtk*.a + diff --git a/debian/libwxgtk-dev.links b/debian/libwxgtk-dev.links index 725498bd4d..ae94c6caa8 100644 --- a/debian/libwxgtk-dev.links +++ b/debian/libwxgtk-dev.links @@ -1 +1,2 @@ -usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk-config.1.gz +usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk-=V-config.1.gz + diff --git a/debian/libwxgtk-dev.postinst b/debian/libwxgtk-dev.postinst index 001496b132..e4b02b2e9c 100644 --- a/debian/libwxgtk-dev.postinst +++ b/debian/libwxgtk-dev.postinst @@ -1,7 +1,7 @@ #! /bin/sh set -e -update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk-config 50 +update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk-=V-config 70 #DEBHELPER# diff --git a/debian/libwxgtk-dev.prerm b/debian/libwxgtk-dev.prerm index 0b730b471a..cfe25f580e 100644 --- a/debian/libwxgtk-dev.prerm +++ b/debian/libwxgtk-dev.prerm @@ -1,7 +1,7 @@ #! /bin/sh set -e -update-alternatives --remove wx-config /usr/bin/wxgtk-config +update-alternatives --remove wx-config /usr/bin/wxgtk-=V-config #DEBHELPER# diff --git a/debian/libwxgtk-python.dirs b/debian/libwxgtk-python.dirs index cab7c0ae3d..5705e1f9f0 100644 --- a/debian/libwxgtk-python.dirs +++ b/debian/libwxgtk-python.dirs @@ -1 +1,2 @@ -usr/lib/python1.5/site-packages/wxPython/lib/sizers +usr/lib/=PY/site-packages/wxPython/lib + diff --git a/debian/libwxgtk-python.docs b/debian/libwxgtk-python.docs index 7a7c47f4db..846f206bff 100644 --- a/debian/libwxgtk-python.docs +++ b/debian/libwxgtk-python.docs @@ -1,3 +1,3 @@ -utils/wxPython/README.txt -utils/wxPython/CHANGES.txt -docs/licence.txt +wxPython/README.txt +wxPython/CHANGES.txt + diff --git a/debian/libwxgtk-python.files b/debian/libwxgtk-python.files index ac1d8ae000..877efadf42 100644 --- a/debian/libwxgtk-python.files +++ b/debian/libwxgtk-python.files @@ -1,2 +1,4 @@ -usr/lib/python1.5/site-packages/wxPython -usr/lib/libwxPyHelpers.so +usr/lib/=PY/site-packages/wxPython +usr/lib/libwxPyHelpers*.so +usr/lib/libwxPyHelpers*.so.* + diff --git a/debian/libwxgtk-python.postinst b/debian/libwxgtk-python.postinst index a1bebf841b..440a4ac991 100644 --- a/debian/libwxgtk-python.postinst +++ b/debian/libwxgtk-python.postinst @@ -2,12 +2,11 @@ set -e -WXPYTHONDIR="/usr/lib/python1.5/site-packages/wxPython" +WXPYTHONDIR="/usr/lib/=PY/site-packages/wxPython" if [ "$1" = "configure" ]; then - python /usr/lib/python1.5/compileall.py -q ${WXPYTHONDIR} - python -O /usr/lib/python1.5/compileall.py -q ${WXPYTHONDIR} - ldconfig + python /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR} + python -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR} fi #DEBHELPER# diff --git a/debian/libwxgtk-python.prerm b/debian/libwxgtk-python.prerm index 8417f23f42..03d602c2d3 100644 --- a/debian/libwxgtk-python.prerm +++ b/debian/libwxgtk-python.prerm @@ -2,8 +2,12 @@ set -e -WXPYTHONDIR="/usr/lib/python1.5/site-packages/wxPython" -find ${WXPYTHONDIR} -name "*.py?" -exec rm -f {} \; +PACKAGE="libwxgtk=V-python" + +dpkg --listfiles $PACKAGE | + awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | + xargs rm -f >&2 + #DEBHELPER# diff --git a/debian/libwxgtk.docs b/debian/libwxgtk.docs deleted file mode 100644 index 561d5c39f9..0000000000 --- a/debian/libwxgtk.docs +++ /dev/null @@ -1 +0,0 @@ -docs/licence.txt diff --git a/debian/libwxgtk.files b/debian/libwxgtk.files deleted file mode 100644 index ad2e7b204b..0000000000 --- a/debian/libwxgtk.files +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/libwx_gtk*.so.* -usr/share/wx diff --git a/debian/libwxmsw-dev.dirs b/debian/libwxmsw-dev.dirs new file mode 100644 index 0000000000..b5c129eacb --- /dev/null +++ b/debian/libwxmsw-dev.dirs @@ -0,0 +1,4 @@ +usr/bin +usr/=H/lib/wx/include/msw-=V-=H/wx +usr/share/man/man1 + diff --git a/debian/libwxmsw-dev.links b/debian/libwxmsw-dev.links new file mode 100644 index 0000000000..7acae87205 --- /dev/null +++ b/debian/libwxmsw-dev.links @@ -0,0 +1,2 @@ +usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxmsw-=V-=H-config.1.gz + diff --git a/debian/libwxmsw-dev.postinst b/debian/libwxmsw-dev.postinst new file mode 100644 index 0000000000..285809bdd7 --- /dev/null +++ b/debian/libwxmsw-dev.postinst @@ -0,0 +1,7 @@ +#! /bin/sh +set -e + +update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxmsw-=V-=H-config 40 + +#DEBHELPER# + diff --git a/debian/libwxmsw-dev.prerm b/debian/libwxmsw-dev.prerm new file mode 100644 index 0000000000..eae8656486 --- /dev/null +++ b/debian/libwxmsw-dev.prerm @@ -0,0 +1,7 @@ +#! /bin/sh +set -e + +update-alternatives --remove wx-config /usr/bin/wxmsw-=V-=H-config + +#DEBHELPER# + diff --git a/debian/lintian-override b/debian/lintian-override new file mode 100644 index 0000000000..9a3e920620 --- /dev/null +++ b/debian/lintian-override @@ -0,0 +1,5 @@ +libwxgtk2.2-dbg: non-dev-pkg-with-shlib-symlink +libwxgtk2.2-dbg: unused-shlib-entry-in-control-file +libwxbase2.2-dbg: non-dev-pkg-with-shlib-symlink +libwxbase2.2-dbg: unused-shlib-entry-in-control-file + diff --git a/debian/rules b/debian/rules index 17d49a9165..e1154a7bf2 100755 --- a/debian/rules +++ b/debian/rules @@ -3,42 +3,95 @@ # # Sculpted 13/2/2000 by Ron Lee from new and # variously stolen code :-) -# (including a debhelper template, GNU copyright 1997 to 1999 by -# Joey Hess, and some ideas found in the ncurses rules file that -# I quite liked. Thanks!) +# It makes copious use of the debhelper utilities written by +# Joey Hess and others. #export DH_VERBOSE=1 export DH_COMPAT=2 +export DH_OPTIONS release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p') +python_dir:=python$(shell python -c "import sys;print sys.version[:3]") + +cross_host=i586-mingw32msvc +cross_build=$(shell ./config.guess) # Packages to build: package_wxbase_lib=libwxbase$(release) package_wxbase_dev=libwxbase$(release)-dev +package_wxbase_dbg=libwxbase$(release)-dbg package_gtk_lib=libwxgtk$(release) package_gtk_dev=libwxgtk$(release)-dev +package_gtk_dbg=libwxgtk$(release)-dbg package_gtk_py=libwxgtk$(release)-python +package_gtk_contrib=libwxgtk$(release)-contrib +package_gtk_contrib_dev=libwxgtk$(release)-contrib-dev +package_headers=wxwin$(release)-headers +package_i18n=wxwin$(release)-i18n package_doc=wxwin$(release)-doc package_examples=wxwin$(release)-examples +package_wxbase_msw_dev=libwxbase-msw$(release)-dev +package_msw_dev=libwxmsw$(release)-dev +package_headers_msw=wxwin$(release)-headers-msw + # Build directories: objdir_wxbase_shared=objs_wxbase_sh objdir_wxbase_static=objs_wxbase_st +objdir_wxbase_debug=objs_wxbase_d objdir_gtk_shared=objs_gtk_sh objdir_gtk_static=objs_gtk_st +objdir_gtk_debug=objs_gtk_d objdir_doc_cruft=objs_doc_con objdir_doc=docs/wxWindows-manual.html objdir_examples=docs/examples -objdirs=$(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_gtk_shared) \ - $(objdir_gtk_static) $(objdir_doc) $(objdir_examples) +objdir_i18n=locale + +objdir_wxbase_msw_static=objs_wxbase_msw_st +objdir_msw_static=objs_msw_st + +objdirs=$(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_wxbase_debug) \ + $(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) \ + $(objdir_doc_cruft) $(objdir_doc) $(objdir_examples) \ + $(objdir_wxbase_msw_static) $(objdir_msw_static) + +# note that the i18n package is actually arch indep (once built) +# but must be built (and installed) during the arch any phase as +# it's pulled out of the wxGtk shared lib package. + +# Build stamps: +build_arch_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \ + build-wxbase-debug-stamp build-gtk-shared-stamp \ + build-gtk-static-stamp build-gtk-debug-stamp \ + build-contrib-shared-stamp build-contrib-static-stamp \ + build-gtk-py-stamp build-i18n-stamp + +build_indep_stamps=build-examples-stamp build-doc-stamp + +build_cross_stamps=build-wxbase-msw-dev-stamp build-msw-dev-stamp + +build_stamps_native=$(build_arch_stamps) $(build_indep_stamps) + +build_stamps=$(build_stamps_native) $(build_cross_stamps) + +# Install targets: +install_all_arch=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \ + install-gtk-lib install-gtk-dev install-gtk-dbg \ + install-gtk-contrib install-gtk-contrib-dev install-gtk-py \ + install-headers install-i18n + +install_all_indep=install-examples install-doc + +install_all_cross=install-wxbase-msw-dev install-msw-dev install-headers-msw + +install_all_native=$(install_all_arch) $(install_all_indep) + +install_all=$(install_all_native) $(install_all_cross) -build_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \ - build-gtk-shared-stamp build-gtk-static-stamp \ - build-gtk-python-stamp build-examples-stamp build-doc-stamp wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \ - --prefix=$(shell pwd) \ - --exec-prefix=$(shell pwd)/$(objdir_gtk_shared) + --prefix=$(shell pwd) \ + --exec-prefix=$(shell pwd)/$(objdir_gtk_shared) # The Rules: @@ -46,16 +99,104 @@ wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \ debian/control: debian/control.in sed -e 's/=V/$(release)/g' < debian/control.in > debian/control -debian/wxwin-doc.doc-base: debian/wxwin-doc.doc-base.in - sed -e 's/=V/$(release)/g' < debian/wxwin-doc.doc-base.in > debian/wxwin-doc.doc-base +control-files-stamp: debian/control + dh_testdir + @for f in dirs postinst; do \ + echo "generating control file $(package_wxbase_lib).$$f"; \ + cp debian/libwxbase.$$f debian/$(package_wxbase_lib).$$f; \ + done; + @for f in dirs files links postinst prerm; do \ + echo "generating control file $(package_wxbase_dev).$$f"; \ + sed -e 's/=V/$(release)/g' < debian/libwxbase-dev.$$f \ + > debian/$(package_wxbase_dev).$$f; \ + done; + @for f in dirs links postinst prerm; do \ + echo "generating control file $(package_wxbase_dbg).$$f"; \ + sed -e 's/=V/$(release)/g' < debian/libwxbase-dbg.$$f \ + > debian/$(package_wxbase_dbg).$$f; \ + done; + @for f in dirs postinst; do \ + echo "generating control file $(package_gtk_lib).$$f"; \ + cp debian/libwxgtk.$$f debian/$(package_gtk_lib).$$f; \ + done; + @for f in dirs files links postinst prerm; do \ + echo "generating control file $(package_gtk_dev).$$f"; \ + sed -e 's/=V/$(release)/g' < debian/libwxgtk-dev.$$f \ + > debian/$(package_gtk_dev).$$f; \ + done; + @for f in dirs links postinst prerm; do \ + echo "generating control file $(package_gtk_dbg).$$f"; \ + sed -e 's/=V/$(release)/g' < debian/libwxgtk-dbg.$$f \ + > debian/$(package_gtk_dbg).$$f; \ + done; + @for f in dirs docs files postinst prerm; do \ + echo "generating control file $(package_gtk_py).$$f"; \ + sed -e 's/=PY/$(python_dir)/g;s/=V/$(release)/g' < debian/libwxgtk-python.$$f \ + > debian/$(package_gtk_py).$$f; \ + done; + @for f in dirs postinst; do \ + echo "generating control file $(package_gtk_contrib).$$f"; \ + cp debian/libwxgtk-contrib.$$f debian/$(package_gtk_contrib).$$f; \ + done; + @for f in dirs files; do \ + echo "generating control file $(package_gtk_contrib_dev).$$f"; \ + cp debian/libwxgtk-contrib-dev.$$f debian/$(package_gtk_contrib_dev).$$f; \ + done; + @for f in dirs files; do \ + echo "generating control file $(package_headers).$$f"; \ + cp debian/wxwin-headers.$$f debian/$(package_headers).$$f; \ + done; + @for f in dirs files; do \ + echo "generating control file $(package_i18n).$$f"; \ + cp debian/wxwin-i18n.$$f debian/$(package_i18n).$$f; \ + done; + @for f in dirs docs doc-base; do \ + echo "generating control file $(package_doc).$$f"; \ + sed -e 's/=V/$(release)/g' < debian/wxwin-doc.$$f \ + > debian/$(package_doc).$$f; \ + done; + @for f in examples; do \ + echo "generating control file $(package_examples).$$f"; \ + cp debian/wxwin-examples.$$f debian/$(package_examples).$$f; \ + done; + @for f in dirs links postinst prerm; do \ + echo "generating control file $(package_wxbase_msw_dev).$$f"; \ + sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxbase-msw-dev.$$f \ + > debian/$(package_wxbase_msw_dev).$$f; \ + done; + @for f in dirs links postinst prerm; do \ + echo "generating control file $(package_msw_dev).$$f"; \ + sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxmsw-dev.$$f \ + > debian/$(package_msw_dev).$$f; \ + done; + @for f in dirs; do \ + echo "generating control file $(package_headers_msw).$$f"; \ + sed -e 's/=H/$(cross_host)/g' < debian/wxwin-headers-msw.$$f \ + > debian/$(package_headers_msw).$$f; \ + done; + touch $@ + +build_arch: control-files-stamp $(build_arch_stamps) +build_all: control-files-stamp $(build_stamps_native) + +# Really we should probably do nothing here until we know which +# binary target is being called, but alpha builds were exploding +# (compiler segfaults) in random places when building under fakeroot +# from the binary-arch target. Build all -arch files here then, and +# let the -indep stuff fend for itself later. + +build: build_arch -build: debian/control debian/wxwin-doc.doc-base $(build_stamps) build-wxbase-shared-stamp: dh_testdir mkdir $(objdir_wxbase_shared) cd $(objdir_wxbase_shared) \ - && ../configure --prefix=/usr --disable-gui --enable-burnt_name \ + && ../configure --prefix=/usr \ + --cache-file=../config_deb.cache \ + --disable-gui \ + --enable-soname \ + --with-zlib=sys \ && $(MAKE) touch $@ @@ -63,7 +204,24 @@ build-wxbase-static-stamp: dh_testdir mkdir $(objdir_wxbase_static) cd $(objdir_wxbase_static) \ - && ../configure --prefix=/usr --disable-gui --disable-shared \ + && ../configure --prefix=/usr \ + --cache-file=../config_deb.cache \ + --disable-gui \ + --disable-shared \ + --with-zlib=sys \ + && $(MAKE) + touch $@ + +build-wxbase-debug-stamp: + dh_testdir + mkdir $(objdir_wxbase_debug) + cd $(objdir_wxbase_debug) \ + && ../configure --prefix=/usr \ + --cache-file=../config_deb.cache \ + --disable-gui \ + --enable-debug \ + --enable-soname \ + --with-zlib=sys \ && $(MAKE) touch $@ @@ -71,7 +229,15 @@ build-gtk-shared-stamp: dh_testdir mkdir $(objdir_gtk_shared) cd $(objdir_gtk_shared) \ - && ../configure --prefix=/usr --with-gtk --enable-burnt_name --disable-newgrid \ + && ../configure --prefix=/usr \ + --cache-file=../config_deb.cache \ + --with-gtk \ + --with-opengl \ + --enable-soname \ + --with-zlib=sys \ + --with-libjpeg=sys \ + --with-libpng=sys \ + --with-libtiff=sys \ && $(MAKE) touch $@ @@ -79,19 +245,52 @@ build-gtk-static-stamp: dh_testdir mkdir $(objdir_gtk_static) cd $(objdir_gtk_static) \ - && ../configure --prefix=/usr --with-gtk --disable-shared \ + && ../configure --prefix=/usr \ + --cache-file=../config_deb.cache \ + --with-gtk \ + --with-opengl \ + --disable-shared \ + --with-zlib=sys \ + --with-libjpeg=sys \ + --with-libpng=sys \ + --with-libtiff=sys \ && $(MAKE) touch $@ -build-gtk-python-stamp: build-gtk-shared-stamp +build-gtk-debug-stamp: dh_testdir - cd utils/wxPython/src \ - && touch gtk/*.cpp gtk/*.py \ - && ../distrib/build.py -b WXDIR=../../.. WXCONFIG='$(wxconfig)' - cd utils/wxPython/modules/html \ - && ../../distrib/build.py -b WXDIR=../../../.. WXCONFIG='$(wxconfig)' - cd utils/wxPython/modules/utils \ - && ../../distrib/build.py -b WXDIR=../../../.. WXCONFIG='$(wxconfig)' + mkdir $(objdir_gtk_debug) + cd $(objdir_gtk_debug) \ + && ../configure --prefix=/usr \ + --cache-file=../config_deb.cache \ + --with-gtk \ + --with-opengl \ + --enable-debug \ + --enable-soname \ + --with-zlib=sys \ + --with-libjpeg=sys \ + --with-libpng=sys \ + --with-libtiff=sys \ + && $(MAKE) + touch $@ + +build-contrib-shared-stamp: build-gtk-shared-stamp + dh_testdir + cd $(objdir_gtk_shared)/contrib/src \ + && $(MAKE) + touch $@ + +build-contrib-static-stamp: build-gtk-static-stamp + dh_testdir + cd $(objdir_gtk_static)/contrib/src \ + && $(MAKE) + touch $@ + +build-gtk-py-stamp: build-gtk-shared-stamp + dh_testdir + touch docs/lgpl.txt + cd wxPython \ + && ./setup.py build IN_CVS_TREE=1 WX_CONFIG='$(wxconfig)' touch $@ build-doc-stamp: build-gtk-shared-stamp @@ -101,7 +300,7 @@ build-doc-stamp: build-gtk-shared-stamp mkdir $(objdir_doc) mkdir $(objdir_doc_cruft) cd $(objdir_doc_cruft) \ - && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib \ + && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \ ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \ ../docs/latex/wx/manual.tex ../$(objdir_doc)/wxwin.htm -twice -html cp docs/latex/wx/*.gif $(objdir_doc) @@ -110,12 +309,17 @@ build-doc-stamp: build-gtk-shared-stamp $(objdir_doc)/wxwin.htx $(objdir_doc)/wxwin.ref touch $@ -build-examples-stamp: +build-examples-stamp: build-gtk-shared-stamp dh_testdir mkdir $(objdir_examples) + + # copy all samples and the Makefile generated for libwxgtk. cp -a samples $(objdir_examples) + rm -f $(objdir_examples)/samples/Makefile + cp -a $(objdir_gtk_shared)/samples/Makefile $(objdir_examples)/samples + cp -a demos $(objdir_examples) - cp -a utils/wxPython/demo $(objdir_examples)/wxPython + cp -a wxPython/demo $(objdir_examples)/wxPython @for d in $(objdir_examples)/demos $(objdir_examples)/samples; do \ (cd $$d \ && mv Makefile.in Makefile \ @@ -129,109 +333,338 @@ build-examples-stamp: done; touch $@ +build-i18n-stamp: build-gtk-shared-stamp + dh_testdir + + # touch .po files first, since if they are not already up + # to date then _now_ is not the time to fix it. + # That should have been been done before cvs was tagged. + cd $(objdir_i18n) \ + && touch *.po \ + && $(MAKE) allmo + touch $@ + +build-wxbase-msw-dev-stamp: + dh_testdir + mkdir $(objdir_wxbase_msw_static) + cd $(objdir_wxbase_msw_static) \ + && ../configure --prefix=/usr/$(cross_host) \ + --cache-file=../config_deb.cache \ + --host=$(cross_host) \ + --build=$(cross_build) \ + --disable-gui \ + --disable-shared \ + && $(MAKE) + touch $@ + +build-msw-dev-stamp: + dh_testdir + mkdir $(objdir_msw_static) + cd $(objdir_msw_static) \ + && ../configure --prefix=/usr/$(cross_host) \ + --cache-file=../config_deb.cache \ + --host=$(cross_host) \ + --build=$(cross_build) \ + --with-mingw \ + --disable-shared \ + && $(MAKE) + touch $@ + + clean: debian/control dh_testdir dh_testroot - rm -rf $(build_stamps) $(objdirs) - -cd utils/wxPython/src && $(MAKE) clean - -cd utils/wxPython/modules/html && $(MAKE) clean - -cd utils/wxPython/modules/utils && $(MAKE) clean + + rm -rf config_deb.cache control-files-stamp $(build_stamps) $(objdirs) + rm -f docs/lgpl.txt + rm -f docs/latex/wx/manual.bb + rm -f $(objdir_i18n)/*.mo + + cd wxPython \ + && ./setup.py clean \ + && rm -rf licence \ + && rm -rf build \ + && rm -rf contrib/ogl/contrib \ + && rm -rf contrib/stc/contrib \ + && rm -rf *.pyc + dh_clean rm -f debian/$(package_wxbase_lib).* rm -f debian/$(package_wxbase_dev).* + rm -f debian/$(package_wxbase_dbg).* rm -f debian/$(package_gtk_lib).* rm -f debian/$(package_gtk_dev).* + rm -f debian/$(package_gtk_dbg).* rm -f debian/$(package_gtk_py).* + rm -f debian/$(package_gtk_contrib).* + rm -f debian/$(package_gtk_contrib_dev).* + rm -f debian/$(package_headers).* + rm -f debian/$(package_i18n).* rm -f debian/$(package_doc).* rm -f debian/$(package_examples).* + rm -f debian/$(package_wxbase_msw_dev).* + rm -f debian/$(package_msw_dev).* + rm -f debian/$(package_headers_msw).* -install: build +install_arch: build_arch $(install_all_arch) + +install: build_all $(install_all_native) + +install-wxbase-lib: DH_OPTIONS=-p$(package_wxbase_lib) +install-wxbase-lib: build-wxbase-shared-stamp dh_testdir dh_testroot - @for f in dirs docs files postinst; do \ - echo "generating control file $(package_wxbase_lib).$$f"; \ - cp debian/libwxbase.$$f debian/$(package_wxbase_lib).$$f; \ - done; - @for f in dirs docs files links postinst prerm; do \ - echo "generating control file $(package_wxbase_dev).$$f"; \ - cp debian/libwxbase-dev.$$f debian/$(package_wxbase_dev).$$f; \ - done; - @for f in dirs docs files postinst; do \ - echo "generating control file $(package_gtk_lib).$$f"; \ - cp debian/libwxgtk.$$f debian/$(package_gtk_lib).$$f; \ - done; - @for f in dirs docs files links postinst prerm; do \ - echo "generating control file $(package_gtk_dev).$$f"; \ - cp debian/libwxgtk-dev.$$f debian/$(package_gtk_dev).$$f; \ - done; - @for f in dirs docs files postinst prerm; do \ - echo "generating control file $(package_gtk_py).$$f"; \ - cp debian/libwxgtk-python.$$f debian/$(package_gtk_py).$$f; \ - done; - @for f in dirs docs doc-base; do \ - echo "generating control file $(package_doc).$$f"; \ - cp debian/wxwin-doc.$$f debian/$(package_doc).$$f; \ - done; - @for f in docs examples; do \ - echo "generating control file $(package_examples).$$f"; \ - cp debian/wxwin-examples.$$f debian/$(package_examples).$$f; \ - done; dh_clean -k dh_installdirs + cp -a $(objdir_wxbase_shared)/lib/* debian/$(package_wxbase_lib)/usr/lib + cp $(objdir_wxbase_shared)/wxbase-$(release)-config debian/$(package_wxbase_lib)/usr/bin/ + +install-wxbase-dev: DH_OPTIONS=-p$(package_wxbase_dev) +install-wxbase-dev: build-wxbase-static-stamp install-wxbase-lib + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_movefiles --sourcedir=debian/$(package_wxbase_lib) + cp $(objdir_wxbase_static)/lib/*.a debian/$(package_wxbase_dev)/usr/lib + +install-wxbase-dbg: DH_OPTIONS=-p$(package_wxbase_dbg) +install-wxbase-dbg: build-wxbase-debug-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cp -a $(objdir_wxbase_debug)/lib/* debian/$(package_wxbase_dbg)/usr/lib + cp $(objdir_wxbase_debug)/wxbased-$(release)-config debian/$(package_wxbase_dbg)/usr/bin/ + cp debian/lintian-override debian/$(package_wxbase_dbg)/usr/share/lintian/overrides/$(package_wxbase_dbg) + +install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib) +install-gtk-lib: build-gtk-shared-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs cd $(objdir_gtk_shared) \ - && $(MAKE) install prefix=`pwd`/../debian/tmp/usr - rm -f debian/tmp/usr/bin/wx-config - cp $(objdir_gtk_static)/lib/*.a debian/tmp/usr/lib - cp -a $(objdir_wxbase_shared)/lib/* debian/tmp/usr/lib - cp $(objdir_wxbase_shared)/wxbase-config debian/tmp/usr/bin/ - cp $(objdir_wxbase_static)/lib/*.a debian/tmp/usr/lib - cd utils/wxPython/src \ - && ../distrib/build.py -i \ - TARGETDIR=../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \ - HELPERLIBDIR=../../../debian/tmp/usr/lib \ - WXDIR=../../.. - cd utils/wxPython/modules/html \ - && ../../distrib/build.py -i \ - TARGETDIR=../../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \ - WXDIR=../../../.. - cd utils/wxPython/modules/utils \ - && ../../distrib/build.py -i \ - TARGETDIR=../../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \ - WXDIR=../../../.. - rm -rf debian/tmp/usr/lib/python1.5/site-packages/wxPython/demo - find debian/tmp/usr/lib/python1.5/site-packages/wxPython \ + && $(MAKE) install prefix=`pwd`/../debian/$(package_gtk_lib)/usr + rm -f debian/$(package_gtk_lib)/usr/bin/wx-config + +install-gtk-dev: DH_OPTIONS=-p$(package_gtk_dev) +install-gtk-dev: build-gtk-static-stamp install-gtk-lib + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_movefiles --sourcedir=debian/$(package_gtk_lib) + cp $(objdir_gtk_static)/lib/libwx_gtk*.a debian/$(package_gtk_dev)/usr/lib + +install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg) +install-gtk-dbg: build-gtk-debug-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cp -a $(objdir_gtk_debug)/lib/* debian/$(package_gtk_dbg)/usr/lib + cp $(objdir_gtk_debug)/wxgtkd-$(release)-config debian/$(package_gtk_dbg)/usr/bin/ + cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg) + +install-gtk-contrib: DH_OPTIONS=-p$(package_gtk_contrib) +install-gtk-contrib: build-contrib-shared-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cd $(objdir_gtk_shared)/contrib/src \ + && $(MAKE) install prefix=`pwd`/../../../debian/$(package_gtk_contrib)/usr + +install-gtk-contrib-dev: DH_OPTIONS=-p$(package_gtk_contrib_dev) +install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-dev + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_movefiles --sourcedir=debian/$(package_gtk_contrib) + cp $(objdir_gtk_static)/lib/*.a debian/$(package_gtk_contrib_dev)/usr/lib + rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk*.a + +install-gtk-py: DH_OPTIONS=-p$(package_gtk_py) +install-gtk-py: build-gtk-py-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cd wxPython \ + && ./setup.py install --prefix=`pwd`/../debian/$(package_gtk_py)/usr + find debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython \ -name '*.py?' -exec rm '{}' ';' - dh_movefiles + +install-headers: DH_OPTIONS=-p$(package_headers) +install-headers: install-gtk-lib + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_movefiles --sourcedir=debian/$(package_gtk_lib) + dh_installmanpages \ + ansi2knr.1 \ + jpegtran.1 \ + libpng.3 \ + libpngpf.3 \ + zlib.3 \ + png.5 + +install-i18n: DH_OPTIONS=-p$(package_i18n) +install-i18n: build-i18n-stamp install-gtk-lib + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_movefiles --sourcedir=debian/$(package_gtk_lib) + +install-doc: DH_OPTIONS=-p$(package_doc) +install-doc: build-doc-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +install-examples: DH_OPTIONS=-p$(package_examples) +install-examples: build-examples-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +install-wxbase-msw-dev: DH_OPTIONS=-p$(package_wxbase_msw_dev) +install-wxbase-msw-dev: build-wxbase-msw-dev-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cp -a $(objdir_wxbase_msw_static)/lib/* debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib + cp $(objdir_wxbase_msw_static)/wxbase-$(release)-$(cross_host)-config debian/$(package_wxbase_msw_dev)/usr/bin/ + $(cross_host)-strip --strip-debug debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib/*.a + +install-msw-dev: DH_OPTIONS=-p$(package_msw_dev) +install-msw-dev: build-msw-dev-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cp -a $(objdir_msw_static)/lib/* debian/$(package_msw_dev)/usr/$(cross_host)/lib + cp $(objdir_msw_static)/wxmsw-$(release)-$(cross_host)-config debian/$(package_msw_dev)/usr/bin/ + $(cross_host)-strip --strip-debug debian/$(package_msw_dev)/usr/$(cross_host)/lib/*.a + +install-headers-msw: DH_OPTIONS=-p$(package_headers_msw) +install-headers-msw: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + @# Symlink all the headers that will be installed by the main -headers + @# package to where the cross compiler will expect them. + @for f in `ls -1 include/wx`; do \ + ln -s /usr/include/wx/$$f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx; \ + echo "linking header /usr/include/wx/$$f"; \ + done; + @# But install this lot for real. + rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx/msw + cp -a include/wx/msw debian/$(package_headers_msw)/usr/$(cross_host)/include/wx + @# and remove this cruft(?) + rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx/treelay.h -# Build architecture-independent files here. -binary-indep: build install -# nothing to do. - -# Build architecture-dependent files here. -binary-arch: build install +binary-common: dh_testdir dh_testroot dh_installdocs - dh_installmanpages -p$(package_gtk_dev) \ - ansi2knr.1 \ - jpegtran.1 \ - libpng.3 \ - libpngpf.3 \ - zlib.3 \ - png.5 dh_installchangelogs dh_installexamples dh_link - dh_strip + + @# Don't strip debug libs at all, and strip cross libs elsewhere + @# with the cross host tools until dh_strip gets smarter. + dh_strip -N$(package_gtk_dbg) -N$(package_wxbase_dbg) -N$(package_wxbase_msw_dev) -N$(package_msw_dev) + dh_compress dh_fixperms - dh_makeshlibs + dh_makeshlibs -N$(package_gtk_py) -V dh_installdeb - dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_py)/usr/lib + dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib dh_gencontrol dh_md5sums dh_builddeb -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +# Build architecture-independent files here. +# Note that you currently can't build the indep packages without first +# building the arch specific package files needed to create them. +binary-indep: build_all install + $(MAKE) -f debian/rules \ + DH_OPTIONS="-i -N$(package_wxbase_msw_dev) -N$(package_msw_dev) -N$(package_headers_msw)" \ + binary-common + +# Build just the architecture-dependent files here. +binary-arch: build_arch install_arch + $(MAKE) -f debian/rules \ + DH_OPTIONS="-a -N$(package_wxbase_msw_dev) -N$(package_msw_dev) -N$(package_headers_msw)" \ + binary-common + +# Build all packages target. +binary: binary-arch binary-indep + +# This is a special target for building the wxMSW-cross packages. +# It's not currently called during the official package build run +# but may be run separately to build the extra packages. +# There is an implied build dep on the mingw32 cross compiler +# that is not in the control file. +binary-cross: control-files-stamp $(install_all_cross) + $(MAKE) -f debian/rules \ + DH_OPTIONS="-p$(package_wxbase_msw_dev) -p$(package_msw_dev) -p$(package_headers_msw)" \ + binary-common + + +############################################################################ +# +# Some rules to build a subset of the complete list of packages that can be +# built from CVS. Beware that packages produced with these rules may *NOT* +# be compatible with packages built using the 'binary' target or even with +# Debian policy. Do not distribute packages built with these rules, they +# are currently useful for rapid in-house testing by developers only. + +# libwxgtk shared lib package +binary-gtk: control-files-stamp install-gtk-lib install-headers + $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_lib) -p$(package_headers)" binary-common + +binary-gtk-dev: control-files-stamp install-gtk-dev install-headers + $(MAKE) -f debian/rules \ + DH_OPTIONS="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \ + binary-common + +binary-gtk-dbg: control-files-stamp install-gtk-dbg install-headers + $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_headers)" binary-common + +# libwxbase shared lib package +binary-wxbase: control-files-stamp install-wxbase-lib install-headers + $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_wxbase_lib) -p$(package_headers)" binary-common + +binary-wxbase-dev: control-files-stamp install-wxbase-dev install-headers + $(MAKE) -f debian/rules \ + DH_OPTIONS="-p$(package_wxbase_lib) -p$(package_wxbase_dev) -p$(package_headers)" \ + binary-common + +binary-wxbase-dbg: control-files-stamp install-wxbase-dbg install-headers + $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_wxbase_dbg) -p$(package_headers)" binary-common + +# docs package +binary-doc: control-files-stamp install-doc + $(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common + + +.PHONY: build build_all build_arch clean binary-indep binary-arch binary binary-common \ + binary-gtk binary-gtk-dev binary-gtk-dbg binary-wxbase binary-wxbase-dev \ + binary-wxbase-dbg binary-doc binary-cross \ + install install_arch install-wxbase-lib \ + install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \ + install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \ + install-gtk-py install-headers install-i18n install-doc install-examples \ + install-wxbase-msw-dev install-msw-dev install-headers-msw + diff --git a/debian/wx-config.1 b/debian/wx-config.1 index 72aeac5390..5f1b2828ff 100644 --- a/debian/wx-config.1 +++ b/debian/wx-config.1 @@ -8,7 +8,8 @@ wx-config - generate compile time info for wxWindows .B wxgtk-config .HP .B wx-config -[\-\-version] [\-\-libs] [\-\-cflags] [\-\-cc] [\-\-cxx] [\-\-ld] +[\-\-version] [\-\-libs] [\-\-gl\-libs] [\-\-cppflags] +[\-\-cflags] [\-\-cxxflags] [\-\-cc] [\-\-cxx] [\-\-ld] [\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] .SH DESCRIPTION \fIwx-config\fP is a tool to determine the compiler and linker @@ -35,10 +36,19 @@ include in a bug report. ( But of course you already knew that ... ) .TP 8 .B \-\-libs -Generate linker flags for a \fIwxWindows\fP program. +Output linker flags for a \fIwxWindows\fP program. +.TP 8 +.B \-\-gl\-libs +Output additional linker flags for apps using GLCanvas. +.TP 8 +.B \-\-cppflags +Output build\-time preprocessor flags. .TP 8 .B \-\-cflags -Generate compiler flags for the same. +Output C compiler flags. +.TP 8 +.B \-\-cxxflags +Output C++ compiler flags. .TP 8 .B \-\-cc Output the name of the C compiler \fB$(CC)\fP. diff --git a/debian/wxwin-doc.doc-base.in b/debian/wxwin-doc.doc-base similarity index 100% rename from debian/wxwin-doc.doc-base.in rename to debian/wxwin-doc.doc-base diff --git a/debian/wxwin-doc.docs b/debian/wxwin-doc.docs index b96b3290fb..924030842d 100644 --- a/debian/wxwin-doc.docs +++ b/debian/wxwin-doc.docs @@ -1,2 +1,2 @@ -docs/licendoc.txt docs/wxWindows-manual.html + diff --git a/debian/wxwin-examples.docs b/debian/wxwin-examples.docs deleted file mode 100644 index 561d5c39f9..0000000000 --- a/debian/wxwin-examples.docs +++ /dev/null @@ -1 +0,0 @@ -docs/licence.txt diff --git a/debian/wxwin-headers-msw.dirs b/debian/wxwin-headers-msw.dirs new file mode 100644 index 0000000000..ebfde3d2ab --- /dev/null +++ b/debian/wxwin-headers-msw.dirs @@ -0,0 +1,2 @@ +usr/=H/include/wx + diff --git a/debian/wxwin-headers.dirs b/debian/wxwin-headers.dirs new file mode 100644 index 0000000000..d3e1cff74a --- /dev/null +++ b/debian/wxwin-headers.dirs @@ -0,0 +1,3 @@ +usr/include/wx +usr/share/man/man1 + diff --git a/debian/wxwin-headers.files b/debian/wxwin-headers.files new file mode 100644 index 0000000000..e3a60cecd2 --- /dev/null +++ b/debian/wxwin-headers.files @@ -0,0 +1 @@ +usr/include/wx/ diff --git a/debian/wxwin-i18n.dirs b/debian/wxwin-i18n.dirs new file mode 100644 index 0000000000..d10fb40c7b --- /dev/null +++ b/debian/wxwin-i18n.dirs @@ -0,0 +1,2 @@ +/usr/share/locale + diff --git a/debian/wxwin-i18n.files b/debian/wxwin-i18n.files new file mode 100644 index 0000000000..39825b2213 --- /dev/null +++ b/debian/wxwin-i18n.files @@ -0,0 +1,2 @@ +/usr/share/locale/ + diff --git a/demos/bombs/BombsVC.dsp b/demos/bombs/BombsVC.dsp new file mode 100644 index 0000000000..77f925f18b --- /dev/null +++ b/demos/bombs/BombsVC.dsp @@ -0,0 +1,223 @@ +# Microsoft Developer Studio Project File - Name="BombsVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=BombsVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BombsVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BombsVC.mak" CFG="BombsVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BombsVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "BombsVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "BombsVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "BombsVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BombsVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/bombs.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/bombs.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/bombs.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/bombs.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "BombsVC - Win32 Release" +# Name "BombsVC - Win32 Debug" +# Name "BombsVC - Win32 Debug DLL" +# Name "BombsVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\bombs.cpp + +!IF "$(CFG)" == "BombsVC - Win32 Release" + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\bombs.h +# End Source File +# Begin Source File + +SOURCE=.\bombs.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\bombs1.cpp + +!IF "$(CFG)" == "BombsVC - Win32 Release" + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\game.cpp + +!IF "$(CFG)" == "BombsVC - Win32 Release" + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "BombsVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\game.h +# End Source File +# End Target +# End Project diff --git a/demos/bombs/BombsVC.dsw b/demos/bombs/BombsVC.dsw new file mode 100644 index 0000000000..6caef40d84 --- /dev/null +++ b/demos/bombs/BombsVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BombsVC"=.\BombsVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/demos/dbbrowse/DbbrowseVC.dsp b/demos/dbbrowse/DbbrowseVC.dsp new file mode 100644 index 0000000000..a1c938eeb8 --- /dev/null +++ b/demos/dbbrowse/DbbrowseVC.dsp @@ -0,0 +1,351 @@ +# Microsoft Developer Studio Project File - Name="DbbrowseVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DbbrowseVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DbbrowseVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DbbrowseVC.mak" CFG="DbbrowseVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DbbrowseVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DbbrowseVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DbbrowseVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DbbrowseVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dbbrowse.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dbbrowse.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dbbrowse.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dbbrowse.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DbbrowseVC - Win32 Release" +# Name "DbbrowseVC - Win32 Debug" +# Name "DbbrowseVC - Win32 Debug DLL" +# Name "DbbrowseVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\browsedb.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\browsedb.h +# End Source File +# Begin Source File + +SOURCE=.\dbbrowse.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dbbrowse.h +# End Source File +# Begin Source File + +SOURCE=.\dbbrowse.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\dbgrid.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dbgrid.h +# End Source File +# Begin Source File + +SOURCE=.\dbtree.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dbtree.h +# End Source File +# Begin Source File + +SOURCE=.\dlguser.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dlguser.h +# End Source File +# Begin Source File + +SOURCE=.\doc.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\doc.h +# End Source File +# Begin Source File + +SOURCE=.\pgmctrl.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\pgmctrl.h +# End Source File +# Begin Source File + +SOURCE=.\std.h +# End Source File +# Begin Source File + +SOURCE=.\tabpgwin.cpp + +!IF "$(CFG)" == "DbbrowseVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\tabpgwin.h +# End Source File +# End Target +# End Project diff --git a/demos/dbbrowse/DbbrowseVC.dsw b/demos/dbbrowse/DbbrowseVC.dsw new file mode 100644 index 0000000000..cba2b38938 --- /dev/null +++ b/demos/dbbrowse/DbbrowseVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DbbrowseVC"=.\DbbrowseVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/demos/dbbrowse/browsedb.cpp b/demos/dbbrowse/browsedb.cpp index 122d3eeae3..d7e64a5f7c 100644 --- a/demos/dbbrowse/browsedb.cpp +++ b/demos/dbbrowse/browsedb.cpp @@ -33,6 +33,11 @@ // Global structure for holding ODBC connection information // - darf nur einmal im Projekte definiert werden ?? Extra Databasse Klasse ? wxDbConnectInf ConnectInf; // Für DBase + +#if !wxUSE_ODBC + #error Demo cannot be compiled unless setup.h has wxUSE_ODBC set to 1 +#endif + //---------------------------------------------------------------------------------------- extern WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */ //---------------------------------------------------------------------------------------- @@ -90,9 +95,9 @@ BrowserDB::~BrowserDB() Zeiger_auf_NULL(1); // Clean up Tables and Databases (Commit, Close und delete) } // BrowserDB destructor //---------------------------------------------------------------------------------------- -bool BrowserDB::Initialize(int Quite) +bool BrowserDB::Initialize(int Quiet) { - if (!OnStartDB(Quite)) + if (!OnStartDB(Quiet)) { wxLogMessage(_("\n\n-E-> BrowserDB::OnStartDB(%s) : Failed ! "),ODBCSource.c_str()); return FALSE; @@ -100,21 +105,21 @@ bool BrowserDB::Initialize(int Quite) return TRUE; } // BrowserDB:Initialize //---------------------------------------------------------------------------------------- -bool BrowserDB::OnStartDB(int Quite) +bool BrowserDB::OnStartDB(int Quiet) { wxStopWatch sw; - if (!Quite) + if (!Quiet) wxLogMessage(_("\n-I-> BrowserDB::OnStartDB(%s) : Begin "),ODBCSource.c_str()); if (db_BrowserDB != NULL) { - if (!Quite) + if (!Quiet) wxLogMessage(_("\n-I-> BrowserDB::OnStartDB() : DB is allready open.")); return TRUE; } // Initialize the ODBC Environment for Database Operations if (SQLAllocEnv(&ConnectInf.Henv) != SQL_SUCCESS) { - if (!Quite) + if (!Quiet) wxLogMessage(_("\n-E-> BrowserDB::OnStartDB() : DB CONNECTION ERROR : A problem occured while trying to get a connection to the data source")); return FALSE; } @@ -152,7 +157,7 @@ bool BrowserDB::OnStartDB(int Quite) strcpy(ConnectInf.Dsn, ""); strcpy(ConnectInf.Uid, ""); strcpy(ConnectInf.AuthStr, ""); - if (!Quite) + if (!Quiet) { wxLogMessage(_("\n-E-> BrowserDB::OnConnectDataSource() DB CONNECTION ERROR : Unable to connect to the data source.\n\nCheck the name of your data source to verify it has been correctly entered/spelled.\n\nWith some databases, the user name and password must\nbe created with full rights to the table prior to making a connection\n(using tools provided by the database manufacturer)")); wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time()); @@ -160,7 +165,7 @@ bool BrowserDB::OnStartDB(int Quite) return FALSE; } //-------------------------------------------------------------------------------------- - if (!Quite) + if (!Quiet) { Temp1 = db_BrowserDB->GetDatabaseName(); Temp2 = db_BrowserDB->GetDataSource(); @@ -171,9 +176,9 @@ bool BrowserDB::OnStartDB(int Quite) } else return FALSE; } //---------------------------------------------------------------------------------------- -bool BrowserDB::OnCloseDB(int Quite) +bool BrowserDB::OnCloseDB(int Quiet) { - if (!Quite) + if (!Quiet) wxLogMessage(_("-I-> BrowserDB::OnCloseDB() : Begin ")); if (db_BrowserDB) { @@ -187,12 +192,12 @@ bool BrowserDB::OnCloseDB(int Quite) } db_BrowserDB = NULL; } - if (!Quite) + if (!Quiet) wxLogMessage(_("\n-I-> BrowserDB::OnCloseDB() : End ")); return TRUE; } //---------------------------------------------------------------------------------------- -bool BrowserDB::OnGetNext(int Cols,int Quite) +bool BrowserDB::OnGetNext(int Cols,int Quiet) { SDWORD cb; int i_dbDataType; @@ -326,7 +331,7 @@ bool BrowserDB::OnGetNext(int Cols,int Quite) return TRUE; } //---------------------------------------------------------------------------------------- -bool BrowserDB::OnSelect(wxString tb_Name, int Quite) +bool BrowserDB::OnSelect(wxString tb_Name, int Quiet) { wxStopWatch sw; wxString SQLStmt; @@ -357,34 +362,34 @@ bool BrowserDB::OnSelect(wxString tb_Name, int Quite) //--------------------------------------------------------------------------------------- // SetColDefs ( 0,"NAME", DB_DATA_TYPE_VARCHAR, Name, SQL_C_CHAR, sizeof(Name), TRUE, TRUE); // Primary index //--------------------------------------------------------------------------------------- - if (!Quite) + if (!Quiet) { wxLogMessage(_("\n-I-> BrowserDB::OnSelect(%s) Records(%d): End - Time needed : %ld ms"),tb_Name.c_str(),i_Records,sw.Time()); } return TRUE; } //---------------------------------------------------------------------------------------- -bool BrowserDB::OnExecSql(wxString SQLStmt, int Quite) +bool BrowserDB::OnExecSql(wxString SQLStmt, int Quiet) { //--------------------------------------------------------------------------------------- if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData()))) { Temp0.Printf(_("\n-E-> BrowserDB::OnExecSQL - ODBC-Error with ExecSql of >%s<.\n-E-> "),SQLStmt.c_str()); Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__); - if (!Quite) + if (!Quiet) wxLogMessage(Temp0); else wxMessageBox("-E-> BrowserDB::OnExecSql - ExecSql()"); return FALSE; } - if (!Quite) + if (!Quiet) { // wxLogMessage(_("\n-I-> BrowserDB::OnExecSql(%s) - End - Time needed : %ld ms"),SQLStmt.c_str(),sw.Time()); } return TRUE; } //---------------------------------------------------------------------------------------- -wxDbInf* BrowserDB::OnGetCatalog(int Quite) +wxDbInf* BrowserDB::OnGetCatalog(int Quiet) { char UName[255]; strcpy(UName,UserName); @@ -392,13 +397,13 @@ wxDbInf* BrowserDB::OnGetCatalog(int Quite) return ct_BrowserDB; } //---------------------------------------------------------------------------------------- -wxColInf* BrowserDB::OnGetColumns(char *tableName, int numCols,int Quite) +wxDbColInf* BrowserDB::OnGetColumns(char *tableName, int numCols, int Quiet) { char UName[255]; int i; strcpy(UName,UserName); cl_BrowserDB = db_BrowserDB->GetColumns(tableName,&numCols,UName); - cl_BrowserDB->pColFor = new wxColFor[numCols]; + cl_BrowserDB->pColFor = new wxDbColFor[numCols]; for (i=0;ipColFor+i)->Format(1,(cl_BrowserDB+i)->dbDataType,(cl_BrowserDB+i)->sqlDataType, diff --git a/demos/dbbrowse/browsedb.h b/demos/dbbrowse/browsedb.h index 90fcc2bcca..d55d9c9f47 100644 --- a/demos/dbbrowse/browsedb.h +++ b/demos/dbbrowse/browsedb.h @@ -1,6 +1,6 @@ //---------------------------------------------------------------------------------------- // Name: browsedb.h -// Purpose: a wxDB class +// Purpose: a wxDb class // Author: Mark Johnson, mj10777@gmx.net // Modified by: // Created: 19991127.mj10777 @@ -26,24 +26,24 @@ class BrowserDB // for user login names and passwords, getting workstation settings, etc. // ---> IMPORTANT <--- // - // For each database object created which uses this wxDB pointer + // For each database object created which uses this wxDb pointer // connection to the database, when a CommitTrans() or RollBackTrans() - // will commit or rollback EVERY object which uses this wxDB pointer. + // will commit or rollback EVERY object which uses this wxDb pointer. // - // To allow each table object (those derived from wxTable) to be + // To allow each table object (those derived from wxDbTable) to be // individually committed or rolled back, you MUST use a different - // instance of wxDB in the constructor of the table. Doing so creates + // instance of wxDb in the constructor of the table. Doing so creates // more overhead, and will use more database connections (some DBs have // connection limits...), so use connections sparringly. // // It is recommended that one "main" database connection be created for // the entire program to use for READ-ONLY database accesses, but for each // table object which will do a CommitTrans() or RollbackTrans() that a - // new wxDB object be created and used for it. + // new wxDb object be created and used for it. //--------------------------------------------------------------------------------------- - wxDB* db_BrowserDB; + wxDb* db_BrowserDB; wxDbInf* ct_BrowserDB; - wxColInf* cl_BrowserDB; + wxDbColInf* cl_BrowserDB; wxString ODBCSource, UserName, Password; MainDoc *pDoc; //--------------------------------------------------------------------------------------- @@ -61,15 +61,15 @@ class BrowserDB BrowserDB(); ~BrowserDB(); void Zeiger_auf_NULL(int Art); - bool Initialize(int Quite); + bool Initialize(int Quiet); //--------------------------------------------------------------------------------------- - bool OnStartDB(int Quite); - bool OnCloseDB(int Quite); - bool OnSelect(wxString tb_Name,int Quite); - bool OnExecSql(wxString SQLStmt,int Quite); - bool OnGetNext(int Cols,int Quite); - wxDbInf* OnGetCatalog(int Quite); - wxColInf* OnGetColumns(char *tableName, int numCols,int Quite); + bool OnStartDB(int Quiet); + bool OnCloseDB(int Quiet); + bool OnSelect(wxString tb_Name,int Quiet); + bool OnExecSql(wxString SQLStmt,int Quiet); + bool OnGetNext(int Cols,int Quiet); + wxDbInf* OnGetCatalog(int Quiet); + wxDbColInf* OnGetColumns(char *tableName, int numCols,int Quiet); void OnFillSqlTyp(); void OnFilldbTyp(); //--------------------------------------------------------------------------------------- diff --git a/demos/dbbrowse/dbbrowse.cpp b/demos/dbbrowse/dbbrowse.cpp index a51faf47e2..c75312caab 100644 --- a/demos/dbbrowse/dbbrowse.cpp +++ b/demos/dbbrowse/dbbrowse.cpp @@ -269,6 +269,11 @@ MainFrame::MainFrame(wxFrame *frame, char *title, const wxPoint& pos, const wxS //---------------------------------------------------------------------------------------- MainFrame::~MainFrame(void) { + // Close the help frame; this will cause the config data to get written. + if (p_Help->GetFrame()) // returns NULL if no help frame active + p_Help->GetFrame()->Close(TRUE); + delete p_Help; // Memory Leak + p_Help = NULL; // save the control's values to the config if (p_ProgramCfg == NULL) return; @@ -292,9 +297,6 @@ MainFrame::~MainFrame(void) //---------------------------------------------------------------------------------------- void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { - // Close the help frame; this will cause the config data to get written. - if (p_Help->GetFrame()) // returns NULL if no help frame active - p_Help->GetFrame()->Close(TRUE); Close(TRUE); } //---------------------------------------------------------------------------------------- diff --git a/demos/dbbrowse/dbbrowse.dsp b/demos/dbbrowse/dbbrowse.dsp new file mode 100644 index 0000000000..a35645f4c3 --- /dev/null +++ b/demos/dbbrowse/dbbrowse.dsp @@ -0,0 +1,156 @@ +# Microsoft Developer Studio Project File - Name="dbbrowse" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=dbbrowse - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "dbbrowse.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "dbbrowse.mak" CFG="dbbrowse - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "dbbrowse - Win32 Release" (basierend auf "Win32 (x86) Application") +!MESSAGE "dbbrowse - Win32 Debug" (basierend auf "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "dbbrowse - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "__WXMSW__" /D "__WIN95__" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 wx.lib jpeg.lib png.lib tiff.lib xpm.lib zlib.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib rpcrt4.lib shell32.lib user32.lib uuid.lib winspool.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib" + +!ELSEIF "$(CFG)" == "dbbrowse - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "__WXDEBUG__" /D WXDEBUG=1 /D "__WXMSW__" /D "__WIN95__" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_MBCS" /D "__WINDOWS__" /Yu"wx/wxprec.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 wxd.lib jpegd.lib pngd.lib tiffd.lib xpmd.lib zlibd.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib rpcrt4.lib shell32.lib user32.lib uuid.lib winspool.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "dbbrowse - Win32 Release" +# Name "dbbrowse - Win32 Debug" +# Begin Group "Quellcodedateien" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\browsedb.cpp +# End Source File +# Begin Source File + +SOURCE=.\dbbrowse.cpp +# End Source File +# Begin Source File + +SOURCE=.\dbgrid.cpp +# End Source File +# Begin Source File + +SOURCE=.\dbtree.cpp +# End Source File +# Begin Source File + +SOURCE=.\dlguser.cpp + +!IF "$(CFG)" == "dbbrowse - Win32 Release" + +# ADD CPP /Yu + +!ELSEIF "$(CFG)" == "dbbrowse - Win32 Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\doc.cpp +# End Source File +# Begin Source File + +SOURCE=.\dummy.cpp +# ADD CPP /Yc"wx/wxprec.h" +# End Source File +# Begin Source File + +SOURCE=.\pgmctrl.cpp +# End Source File +# Begin Source File + +SOURCE=.\tabpgwin.cpp +# End Source File +# End Group +# Begin Group "Header-Dateien" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\std.h +# End Source File +# End Group +# Begin Group "Ressourcendateien" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\dbbrowse.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/demos/dbbrowse/dbbrowse.dsw b/demos/dbbrowse/dbbrowse.dsw new file mode 100644 index 0000000000..1b66ac463c --- /dev/null +++ b/demos/dbbrowse/dbbrowse.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! + +############################################################################### + +Project: "dbbrowse"=".\dbbrowse.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/demos/dbbrowse/dbgrid.cpp b/demos/dbbrowse/dbgrid.cpp index eb4ff84a5e..f84b628f96 100644 --- a/demos/dbbrowse/dbgrid.cpp +++ b/demos/dbbrowse/dbgrid.cpp @@ -74,6 +74,8 @@ DBGrid::DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wx //---------------------------------------------------------------------------------------- DBGrid::~DBGrid() { + delete popupMenu1; + delete popupMenu2; } //---------------------------------------------------------------------------------------- int DBGrid::OnTableView(wxString Table) @@ -122,7 +124,7 @@ int DBGrid::OnTableView(wxString Table) } if (z % 50 == 0) { - Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - Record %6d has been read."),Table.c_str(),z); + Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - Record %6d (from %d) has been read."),Table.c_str(),z,(db_Br+i_Which)->i_Records); pDoc->p_MainFrame->SetStatusText(Temp0, 0); } } // for (z=0;z<(db_Br+i_Which)->i_Records;z++) diff --git a/demos/dbbrowse/dbtree.cpp b/demos/dbbrowse/dbtree.cpp index f3541f6fc3..6aa4fc61e5 100644 --- a/demos/dbbrowse/dbtree.cpp +++ b/demos/dbbrowse/dbtree.cpp @@ -100,6 +100,10 @@ DBTree::~DBTree() (pDoc->db_Br+i_Which)->cl_BrowserDB = NULL; delete ct_BrowserDB; delete p_imageListNormal; + if (popupMenu1) // If the DSN has no Tables, then no delete should be done ! + delete popupMenu1; + if (popupMenu1) // If the DSN has no Tables, then no delete should be done ! + delete popupMenu2; } //---------------------------------------------------------------------------------------- #undef TREE_EVENT_HANDLER @@ -202,7 +206,7 @@ int DBTree::OnPopulate() z++; if (z % 10 == 0) { - Temp0.Printf(_("-I-> DBTree::OnPopulate(%s) - Table %6d has been read."),(ct_BrowserDB->pTableInf+x)->tableName,z); + Temp0.Printf(_("-I-> DBTree::OnPopulate(%s) - Table %6d (from %d) has been read."),(ct_BrowserDB->pTableInf+x)->tableName,z,ct_BrowserDB->numTables); pDoc->p_MainFrame->SetStatusText(Temp0, 0); } } // if ((ct_BrowserDB->pTableInf+x)->tableType == "TABLE" or VIEW) diff --git a/demos/dbbrowse/de/mo.cmd b/demos/dbbrowse/de/mo.cmd index da7c1256c9..d8ae41c89c 100755 --- a/demos/dbbrowse/de/mo.cmd +++ b/demos/dbbrowse/de/mo.cmd @@ -1,2 +1,3 @@ +#! /bin/sh msgfmt -o dbbrowse.mo dbbrowse.po msgfmt -o help.mo help.po diff --git a/demos/dbbrowse/de/mo_de.cmd b/demos/dbbrowse/de/mo_de.cmd index 722caf2c11..1e6d197077 100755 --- a/demos/dbbrowse/de/mo_de.cmd +++ b/demos/dbbrowse/de/mo_de.cmd @@ -1 +1,2 @@ +#! /bin/sh msgfmt -o wxStd.mo de.po diff --git a/demos/dbbrowse/de/xget.cmd b/demos/dbbrowse/de/xget.cmd index bbd922a278..17edc1468b 100755 --- a/demos/dbbrowse/de/xget.cmd +++ b/demos/dbbrowse/de/xget.cmd @@ -1 +1,2 @@ - xgettext -C -i -s -j -a -d PgmText -f xget.cfg +#! /bin/sh +xgettext -C -i -s -j -a -d PgmText -f xget.cfg diff --git a/demos/dbbrowse/doc.cpp b/demos/dbbrowse/doc.cpp index 01dedcc357..59acac8256 100644 --- a/demos/dbbrowse/doc.cpp +++ b/demos/dbbrowse/doc.cpp @@ -63,7 +63,8 @@ MainDoc::~MainDoc() // ---------------------------------------------------------- // -E-> The Tree Controls take to long to close : Why ?? // ---------------------------------------------------------- - // wxMessageBox("-I-> end Doc"); + delete ft_Doc; + ft_Doc = NULL; p_TabArea->Show(FALSE); // Deactivate the Window p_PageArea->Show(FALSE); // Deactivate the Window p_PgmCtrl = NULL; @@ -108,6 +109,8 @@ bool MainDoc::OnInitView() wxBitmap *p_FolderClose = new wxBitmap("PgmCtrl"); //, wxBITMAP_TYPE_BMP_RESOURCE); // BJO20000115 //--------------------------------------------------------------------------------------- p_TabArea->AddTab(p_PgmCtrl,"PgmCtrl",p_FolderClose); + delete p_FolderClose; // Memory leak + p_FolderClose = NULL; //--------------------------------------------------------------------------------------- // now create "output" window //--------------------------------------------------------------------------------------- diff --git a/demos/dbbrowse/dummy.cpp b/demos/dbbrowse/dummy.cpp new file mode 100644 index 0000000000..4829376c7c --- /dev/null +++ b/demos/dbbrowse/dummy.cpp @@ -0,0 +1,36 @@ +/* + * File: dummy.cc + * Purpose: See below + * Author: Julian Smart + * Created: 1993 + * Updated: + * Copyright: (c) 1993, AIAI, University of Edinburgh + */ + +/* A dummy file to include wx.h. If precompiling wx.h, I + * always start by compiling this and producing the PCH file. + * Then subsequent source files use the PCH file. + * + * If precompiling wx.h for wxWindows and derived apps, + * link dummy.obj with your program (the MSC 7 linker complains otherwise). + * + * This is the only convenient way I found to use precompiled headers + * under MSC 7. + * + * This will produce a big PCH file. + */ + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/msw/msvcrt.h" + +// Foils optimizations in Visual C++ (see also app.cpp). Without it, +// dummy.obj isn't linked and we get a linker error. +#if defined(__VISUALC__) && defined(__WIN16__) + char wxDummyChar = 0; +#endif + diff --git a/demos/dbbrowse/makefile.g95 b/demos/dbbrowse/makefile.g95 index 1c535312d0..683a280f01 100644 --- a/demos/dbbrowse/makefile.g95 +++ b/demos/dbbrowse/makefile.g95 @@ -8,7 +8,7 @@ # Makefile for wxWindows sample (Cygwin/Mingw32). # Set WXDIR for your system -WXDIR = $(WXWIN) +WXDIR = ../.. TARGET=dbbrowse OBJECTS = dbbrowse.o doc.o pgmctrl.o tabpgwin.o \ diff --git a/demos/dbbrowse/makefile.gtk b/demos/dbbrowse/makefile.gtk deleted file mode 100644 index cd8a960812..0000000000 --- a/demos/dbbrowse/makefile.gtk +++ /dev/null @@ -1,15 +0,0 @@ - -# Top dir of wxWindows -top_builddir = /gtm/bart/wxGTK - -PROGRAM=dbbrowser_gtk - - -OBJECTS= dbbrowse.o doc.o pgmctrl.o tabpgwin.o\ - browsedb.o dbtree.o dbgrid.o dlguser.o - - - - -include $(top_builddir)/src/makeprog.env - diff --git a/demos/dbbrowse/pgmctrl.cpp b/demos/dbbrowse/pgmctrl.cpp index 7e80d77d53..6006503a5a 100644 --- a/demos/dbbrowse/pgmctrl.cpp +++ b/demos/dbbrowse/pgmctrl.cpp @@ -88,6 +88,7 @@ PgmCtrl::PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const PgmCtrl::~PgmCtrl() { delete p_imageListNormal; + delete popupMenu1; } //---------------------------------------------------------------------------------------- #undef TREE_EVENT_HANDLER @@ -242,7 +243,7 @@ void PgmCtrl::OnRightSelect(wxTreeEvent& WXUNUSED(event)) } //-------------------------------------------------------------------------------------- } -} +} // void PgmCtrl::OnRightSelect(wxTreeEvent& WXUNUSED(event)) //---------------------------------------------------------------------------------------- void PgmCtrl::OnMouseMove(wxMouseEvent &event) { diff --git a/demos/forty/FortyVC.dsp b/demos/forty/FortyVC.dsp new file mode 100644 index 0000000000..e7be85b9df --- /dev/null +++ b/demos/forty/FortyVC.dsp @@ -0,0 +1,347 @@ +# Microsoft Developer Studio Project File - Name="FortyVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FortyVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FortyVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FortyVC.mak" CFG="FortyVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FortyVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FortyVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FortyVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "FortyVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/forty.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/forty.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/forty.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/forty.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "FortyVC - Win32 Release" +# Name "FortyVC - Win32 Debug" +# Name "FortyVC - Win32 Debug DLL" +# Name "FortyVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\canvas.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\canvas.h +# End Source File +# Begin Source File + +SOURCE=.\card.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\card.h +# End Source File +# Begin Source File + +SOURCE=.\forty.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\forty.h +# End Source File +# Begin Source File + +SOURCE=.\forty.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\game.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\game.h +# End Source File +# Begin Source File + +SOURCE=.\pile.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\pile.h +# End Source File +# Begin Source File + +SOURCE=.\playerdg.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\playerdg.h +# End Source File +# Begin Source File + +SOURCE=.\scoredg.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\scoredg.h +# End Source File +# Begin Source File + +SOURCE=.\scorefil.cpp + +!IF "$(CFG)" == "FortyVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FortyVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\scorefil.h +# End Source File +# End Target +# End Project diff --git a/demos/forty/FortyVC.dsw b/demos/forty/FortyVC.dsw new file mode 100644 index 0000000000..8d42e1e6a1 --- /dev/null +++ b/demos/forty/FortyVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FortyVC"=.\FortyVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/demos/forty/make_cw.mcp b/demos/forty/make_cw.mcp index cc1070d6ef09779a9f98793e10c1a8e0fdec7881..e4cdd9822554dd92240e39a04bccc22d5716e344 100644 GIT binary patch delta 8 PcmaEMj%z*J27P7#6AA-X literal 173926 zcmeI5349gR^~Yyk5&{VyKtyHt0q#H$a6#Mx1Q1Lh0t#9yc_a@AW;2W63R;)0YWK~y zcC&V`UA47VtF5iIF14*){kOGMyJ%OfwTu7nx%bZY-YhQ=5y)IPbANO0nKN_GJ@?$n zygPTAJ3HGf%PO-h`v@y@-BVWPhLM(a&^mbkvNJZBPK!EQ@@sS5-L0M7*~ae9E&1kN zr)aR`S5VOmv>9rJ^3W!z8QK6H4K+bSp%!QqbSZQ>G!;4vngX2(Erqs2J&+i(8`>W_ z06GxrgD!;Xpd+9|pe@k(&|;_q>V#-3l~%Dm16m2Kh8m$+Py^yK6D~<60{y#4h?}$hAx3FhK_`; zhW3LFho(a_pqbD{=saiybP!YxWuZ0D3g~obA=CxE8afwx6*Lwa2aSg&Kog<4&{fdx zO4o3ro2c$@wToG@AC{!Oq^(r`#lBj6qf6=%NYY4Y8tfLx&@VEzbZO#P9mbIT(3Bxc zh|k9+@hRh1;(HRCB%ZuRnA=|h6>o`^5`J{DHIxjJty4li6ps3@*b-ADRnOYGjsNSL zx7KX#Y;W)EVCS@at|i~yvu@sT)9Lz3sVMR(3p#&BX)+sCBq#U89VBr%Ycxr$k~o@` zgP}PR2}dr^U6@awB2}th zE`@#_vLDb8*pbqrRCu^2pqs)}SK1YlVL+LKT1(C6S+?&K(ar7FSYl}@J|&kWn&rH5 zE@>W#_cC6{I4fg}_=3c7@i&QkvM=#n#$Oo&WQ>!sRoY9&*HV+j{A-LIM;XW7Pn|(@ zY7gAsl#emx=a~Hi%>IE!?jW;2)|8J^HIVT{8-9YxC#qV?_$oCP!)jkW!IaN8`HANE zlav)?{L^x$8~vxKJhXQyy?PVuQ(A*l?0KiJWwmh;vHcxy^X5RuYiwLZ$5Y3vtM$2- zIz_N|`8@~s2%Jn`i&#R~q9@J=96t~rkoFgUDD(kXr6*202092D3yp)uLldD%&}1kJ z9SR)@9R*E?WXh;Er^1PQ{n5Mc$-ew9wzJMck0LC{wv?1C7dDi-_vJ86{t_SF`Cy^?e%P4?A5Ynnv9%vJ z*#$$tGg_0ojT7td&0E*Ew|2C)=i25k>g(z4Y|oyazi4Y`cT11uD_YRpobTz$Hs*Ra z2l#7p3|hU})%o7u){aeqq9v_u`D{b3tE;eJVP9)oOLpF zfBNI*ot~8kS4;C9h3vZ49=T6%-_VxtE-YKx*0~|qmR;G^+uGiGadCNlYsdM;T<58n zulkE-aVNwTw0BXdz-e>|57asetGQ@N1DEZ;q$O(_v0z8O&CirSHAHiJuA?Q(1?7th z>vJ8O`f{6!3mS6GD_4iwUMb~PqKhcztA=8SR8RPIoz3p^K;I$y9Qxj*=-L}|JP zN-9z858LJ)7gjl8FW%Oi#}hj{q#qS{ft1HpP|AxdC|svGO`cWVuD-R$-|*|HUrg^- z#SuMRl|}b*RUFmRRbfPLS7p&XUKNM;dbcRTS={m%d%7}3Hg!uJyLw)tiXtO{uQbHz zb!lNlP~5PnpbFw5gC`IY9lXNG2;qqoMG3Dc!UWOLLLC|xF_b`b)bJNa8Buz0@lc?T zq$tiQqOnjNb|aiBJXN~QepAT)e#lfT!Ezc78Hz#b3vilco!56je9|n1XISxL045$ zJah%)<6@y$M11tbXwL935fCZGNyRftbyAUycT$lkj-!E#N-#VcqT;HnCMLeRGO=;i zm5PqH0g;5b8;~v4n2~Wfpe@2$DwrijV=WXHi?u{TB-TQ)aafDQMPV(WwxNFos@S82 zVj{375a-&SR8m`blHqRcmB+V3Y~0mK;-jvS35~hBEHdKi;>39C6N`$rK9TrX>k|x* zv_64Y!zDynttK(XYO#a}8xV?$uSO_3x_Sc14p>TL_4LI#U_?~)4vsZ)Ttw9>;^L{6 zh>xaPCMK480!fk7lPs<8Mn_RkQ?Yg25F7ne%oT}57C$%|LO4%LZg(tR9dna@Rm=%oO$AuzMu3jh?*E)r=#jai`k<>bo@z}2@Ivxk4isG@qG&COj z1!CiIkziOnE)t54$3>#W@wiAN!IUxa*sm%!9{UAj;&F&rSUe7hg~#JUky4ygjw#hi zMK<0^MI!iYH4qn6anY~eg(6|kRs%9o@mSP5kt#YK`=uh{aiK_DJT8#$Bx>KI$5o(3q>sA|tLYPK>ucv8ZV46N!(tKEd!v>l27ITtbx9Y7%3t7E6e* z0ime)YJ})J#lKvs2;>PQJD_-UX$~loaSkZuAyL)4m{=oobYw);D&pd)mWYq0S|%oz zdICw2)RQdDbkR}N(-dMIx$V^gF)`E=ii)A0L`)3zgd$_8ClVDyJqdN$;W5+`iin{> zfhZRaO2xH9P_o#CgXQt<5E(-~CDAd|CsPzdy|U04>J`Vv&;qfr7+N3_9YYHQi(_bk zK&;_nVyLGkHimj)F)_4AC@hBhgu-KJP$1a>lVWI4Uz`Jm#L(cuu||%Hp`MDU80twx z$52luB8CP9;$mn}vb4S%9z%ngBCO-wZM#8fRbK~lo&8gVv!ck6Ys|H^i=_(Zp9XI4 z=A?RcA?uY3^JskL1-YDSb76<>L zQa9!ol@x^fqH+`Ai}+#nER5&=gNnnrzqBxVhm?idNcxm>zZ*CPeq{5?L9xv%0wK*S zY`K>$JW-e_koE3d{Raest-qik#`=r=p|y}-6j2KWVr%M)pM}RcwUSypVXH6{_{##J zz+X@p3jAfkP~a~KgaUs-VJHYKb3%c?&>sp4`2k-kEG)8Mp@8v~LUyPHgZGO5LkeyY z14TL%_*q^k@N! zuke^5mMZS>T0Eq?n*y)1YeulEYhHLq_mu^@xsM;x$$h21F7D$N*D9=g>jT0&w=N6o z+JTZl$2KLjufJP++=!+Vhlpu9DK2U{VLIK}J3(=^kqdTZEnL)*H9Mpm>w>~g>~TZ8 zuvZ*YuY&ID9pltO#&^vv?7Ut{p!0g{!p`fJ1Us+C4|HCSt%5*&apx^4b31PVzo7FLl=^Pf^|{q~ zifdKac|A47o!2WX?7T%KZs+xt_&RTp8_{&3oi})7QPVk{Hz-zI?Lg=Cgae(|V;6K@ zufX4VgWRId8!V1-Nnhs;9^=#^*VdNpRqu=U6up+Fe?egv_Ll`avA-nHjr|3M z9XYhj>B{~>e`hY_2YjNiu*iCa0>&>2*`XE;c5DA31syw3q`S7C<#ld9x43&3mAW0g zsHC8a7nPe%Uc?WpXJJS8A5`4c{iTJSJ*3R-?twC2hcDzuHg9OBFFZP=d7X}5C>myp zK4XC;zHV^obp)s$~J&yU1VOWc${4 z(yI}&*qXZ@=K7YJ&6|i?)2EyDFco%}xth!+Ui?NkdyBeY%4*o z2D$DMO?!|9=qLw3 z2SNuyW1(@-cxVDN5t;-|h7N|Z&~#`9G!v?UWWl2BArtfgq3Fz zyJdZNPIf#r78(bQhbBN1p-IqW=wN6HG!>c#9RkgQj)rDKbD+79`P)&J=a%zH zx&o4Q)FoXHIWq4D%i8LaJ`Igj$g=Jvm$lXmx}_Fvf?rl4j2 zoBVK%Gh+KA3>F*6H)=?kESsYQfn|J{uAr4Uj$HOh8Cki*zXjB<$BHf)Me79wT9nFzQEw~$QK&i zK`wHnGHKsB1+6mi)x`$Ck$j24(!NU#{w(=v21}cY9Z6;1XR};EtL&HLryKkS@_K`x zCvVWWyo!8n4@UwV$D&RlbgVmBF3l(q^RctJthj&?0@^dw=7)~z!L8_3p5Sx-J4q>xiL90UA zqRC)sx17OZrws>((QpIoBh)qcqe`eFApj9FL?gEX6RFZcaJc_)>;0fe%t)wB+ zcl#8yhDbYJXt4PBR)ZIkZ!=i@Li~?3MB43Q1+5`slS>Si>$=on;az6%YsoJ+_|4?o z4SpZ_4ud~IE_-hO`FkT%25}vk3TOzU%6}kwbOvvhkt8#WeY{-mg%P*x|B+Wg)1hjJ9AV{+E0rGzppv9SmimDU_khMwg8) z8(lWKY|d$OE*ZgXblT{&xfc6X5a+kK7MpX}oWtfEHo9$e+vv8@ZKK;h7ZUwbp=r<| z5WUkr3_2V-0y+|s>!ZFl^|fa}jE*)v*PaC(ZRtCWKaoEJJq!IAdJ_6Q^cU!_(BGin zA%8acAE2k9zeE3ko`ar;{t3MR{R?^#*>lLTyG46g*vG=|7VSbas6Y1Q8%XkJqD|Xb zPm$Apa(83XZZ_>^OS^I1)(4=QpbtVHf<6qr2YMg$5$L1P&Ct7{_d_>AAA@dzJ`Q~X z`Xuxz=+n?=pwB{|gKmXB4}AgpBJ?Hb%g|RKi6-xbZil`KeGR$;`Z{zc*LFNK4>|#w z51k0jfsTbvf=-4`fo4OmhK_@dflh^Lp#{)FXc1HgErymr=Rr%M)1YP0a_DrZ9%_JA zKr5j}XfAXHvWH;`XTelPS*==;!v z&_mF}&?C?fphuw}BD;?KN6?R<$Dp4;KZSk<{T%uQ^h@Y*=x*r$pkG11hJFJ*0sR&l z0#!n^wfki%8(a=mL&G6ye@PWk88iYK35|mGgGNL9Lt~%=paY?Ups~<6Xgo9lng~sT zCPN2987K=)fu=&!phKWTp^Ko4p-Z4kq069NXe)F%v>n<3^+4O83!y8ZE1}mwS3y@p z*Fe`ouZ3O*y&if4^hW4S&~?!D&<)U=p|?PN&|9ImL2rlN0lgD?7ql8$1Dy$-1+9hf z1$Fndj{I!s90(s#cTxC|p)Jt)P#c85 zsk@2}@=mA=x&Z2iWaLW`g}Xfd<|Iucq6odzv~mP4mQ_4w%*p)WyShQ0#b27Ly)6}lbz zD)cqz)6f^7&qJSs?!Y~`R{3kjz7zTebQg3t^iAj<=w9es(6^!cpzlE6h3<#G2R#6N zA3cYWe-?TWdI)+LdIb6b^eFTu=sM_n=mzM`(6!L(p|?P9h42OY8t9GC8=%)g_(tYX za{R-_KWzNNemC?U=)KU5(EFhGLmz-{f<6d+2>LMe5$L1P&FDFV{I$@>pj)7iL!W>? z34ID%N*#U<{Q~+W^f>f?(2t;>K)-^14gCiCA@noor_f{26X-vZ{I}5WpeLcHpr@hV zLw|t&2>l6q26`6yGxQheuh8G1zeE2(&k^K5hMt3-hyDq@0R0Pk5!wiCf;K~~&=#l( zYKG2-+Msr5J(P!9pbbz5x~GwMLS4`WP&d>A^+J8nh0s=L8*~wLF?0!ZDRdchIkX); zQ^|AC4(JN#O6WDvRnXPga$r+tVAZACQVXOO*o!StUU=i4w=4#=oG>i}yfcf_qKA;?MQSO++s7=X&HOA(!}bJ#v$gOZ>SWxr32Q{J9>v zDaf5AkHkok(=3piO8MFn>M03+;GiBTzO zqIFVzyuo>|{d}$rA@M2nE5(tA=xFE^m+M{n2uYtxZWi3+NXv-eT!};lM`#6DAFLm% z$sL9y9uufL4Z-h$Dg}^kg@!7mAHm9Bag3~NeA*sM?F?0lSeGhqyzam#F=!Ek*InQ zM9S2&kx`kH;W3OFc?I)m#F=!Ek@||gNSUv)kx`PAd6BO0kp z?zFOkz(=u}qM%h)M?TfySCLOM_!9C%41O>9p$3bcd88$&>^p1@SI{c^899%bB$Y{h zk5teqKY(1$M=F@81~-$-xk*E=WOJ&5){qa9*BX2W`2vG~K`zIWDrK`sHsJAW zq-{u*QrE=_T9x(WOAO{woqBvrR(Tbh(+vMZB420lPsqxC4n+*zD)nX^nMXK&$)1shN{T}kX!FQAMs8mw*Z`nwFNW+J-k@g@B7e8uM&>Ak+ zzQy2+$j>+UM)Ed;?;@8zKpHMOI}}u5tJA=lR{$)#;b2d-iB1qH1G#h1Tm@J-}m3(|pivJsyn9r#l= zUs2FH@CEYQG(Ko7`RxYJBmb(w=a7HRU}?uY3>I5Tm?a(bT{dzK(m_wL`G$hl*dgS1 z89bBxZiA&AziIF`@_P)H_7wY)#)|B>6tu=ZP5y0-$5oTxXYgF|?-;zET&{yO?g}ar{-nXu z=F-NbNup2MhBSF7o8K#FO_sL)gTbQnj|NLy|H)wK)6Wf2T0T20v>6w=p1D*J}a}5Bu&ExGCN7qA=F)FDJi@NJjP(rd4R!h0v~AbXTS#; zOdqnx8jL+<_L8JS(XIYe5j-0_L9wkv*MYH%q(d(Oi`@m&$7Pn2!ruZPY%qRmXEi>I zdfQVBo(rC8u;`p-@MYjb491si=^LcO?ge8zh4EASaE%YgW-?<+(&5v=M;crYKFZ(@ zFlCYszX3eM;4gw_8Z16gV=%sB&(in^^w~!nybO#jBptB@JjdYc!PH065x0VmG5E*e zV-3cyWhRlNBeA8-LQ=REJkQ`9_ymKm1$_X|VJKY$0i;^o6wse+G>INt*d%@Yx3c8!R!7RD*BI3_pdbtIXh2 zSp4eM2EQ46p21%MuQ&K-;3k8g2h+xqW{m`IFj#EcY%ung84i+Wp-*N!D10%PxTEkp z!J7>JEO@iQ4}e<@eg=$>N|IMGWG02e6Txi;9}mVZiZAx3J_>VAnN^|iCEzZD-wnRN z;4gr?4Sp2dWAGory&B8wAL{W1yR)<43k@GXm01~*W@BTSouM%0GD}0@>%i1m;ZK6O z4uz$Tmm2&8n0TT1{{&yI@f@-3c7u-q?=TqOm)RYX=Fo;R%R^zVS7v)C{C4nF27eiR zwZY#9Ut{p^!1PZ^@|up!!cllU_;m&!2Y$W5_^-?Wk~Ek0kr_b>qg!SYDf}TYbyoPR z;Oh;3419yZ;^+98q+_IxZ!!3A@LLUD2!5Nv_@>M_l5`AhD6@_frXDi;Na2rw-(~Qf zVA@#m9|yn3;OD{b)%aLB?~Mje2fxo?`n}9rl5}hy`~icpw|$er;y)iWSZqt3B^@hu z{IJ2#g1IJ1$7R4DHCSwWv%z!0A2YZfe2c;K37G{Y={VY7WZtgoum`6y?QJum}`;Q zb&^ha1pI)(Pl4%Il1}&^_(6^59{_&H;2JRYk~F^#%<&30gMVP~mEcDW#;;{Io22=) zt;}{)nCq2UXbOvO<8um2pTZ9$oj3}NT@*eX{4;|WfPZeV#EoAVO#G9Xb&^gLo1<4@ z{7YuqDJ=f>D}%+)e{HbX{5Kk(Gz|QN!P4%(HCXEYJA;>lpEP&_7~4rYX$Sae1+A0b z0sg(gQujX?EOq~*!JJ2C?MXW6zu;#yKKUT2Ga%#XTkq6_*C$V2Co7C+u$wW{}_A? zm^w&0a84aydsGs=>(>k>ZYzj`Ltutj>=v2;|DL0t5&QutD8F+}n zZv$5vOj~D$8jPJYw56m|Y1<6vP#7Czsx_`9&kQ&CNKdAA5qN~*H-kqSd;|cpWOvqZ{`5aUoaVbpus1CX>Umjq>f_^?g5W8_*yW&C}{z< z%}g-(Ht5G|32IEs1&LL?b_LDa$6h0K3HFybliovf2Pc^s?Jk4NyNoKZ6TKF+A z$18jn_%MU%qcYQ1(n5SwW|&G^R0+nW3QK*DGWb~Vbc0ubXJ|aQw#{4Dx3_k*w&&Wc zC9T~(z1h|IP3`%PUTc1?rn9fts&CzpUDn>!+1;CE4M(e?acy9CZC0%7(i7rE}*fv88p(3_5-Bsuhdt&CZ#t7q2o9@kMJK{_4{f*E@J+ z{bEP@%w=^-+nE5ZSI}I=YuRwo`rh1z8gv>Z zI#|m(dh^{IbIp0#k@7_~s8K~~Z~An1f9p0egld$AT<>N%pt-HPr1@l_ z^z`;^=wV-uHYaiva_W4pJJ+F4R=8ZJ*>{)d1pol&TnjO^L9+Zg1WO7G&;dZYvB~W~wZ^WKYYtbxC|M{w;%z zwW6~lZ*_HSa((k+n$X<|tS~ybM)ZEyR_3qYk7$dea@_H zxtcT$Vhf1d$sGt;M)}43`K=wzZGA2I`GeRhY1PF7#xKf@U+{x=>Jx+AGn{x)E2~$r z#1fN&tnSXO`R?<3va5S@9WBhmVD{36?p*gp^VNK#)Mo~R&-nbJT1JxjYI5XEnM=63 zuS+Iu&Nm;wO#NXn_=8hNpI;1#@CzL+TJt@rXE;{d_j8|LR7UuP6EE~M>(zCqr~Wah z{9-76F+|O)jH|ZY(9p;$PP>+BIedBU!kjbjI#kHFmh^+!ge=d7clj}|=vlgK z$;O&Zts8-nY59Ux=9L9r4G2lK@Rm0&URtxIYg0(E%PL9FmhO!;kbBTh0C_6juy#@1 zP8=FIq=~&%t5+=wFn3}{^sHIDZcWYR-u7K-G^v-;vjsPcxelfkizCKJ7(MN~WM-vb zT~DZ2c&C@QXp&M(XEQHH?OJN$a5eRN*VI^|M^a5L{*p@ZXQijPE!V>lJpEvq+7Xgc{c1C{Jes9<@`l1ZmjRz;O^`sXyUj5jl9kA7lNmH zFa1S`sz}!?%Y#Ix()Gk&Q0aPNJD~RhTBH}6kw9LsiAg12Pkvjho|sd(MS7%kcSAwa z^+;qDl4a6W8)3>luKNQq`*`Hh{-f*)7}CM%R$$ED8 zNEu=0evgz9dUnuLoDny!<&*5=>KTBMQr@@^?Z7@}(OdbxG6(MEBV|O3v66BBM#@M% zVyE3TQkK$Q>U#E|ky1Z=mY=cAk_?VxIr#|HbK(P?7co)f99WoZJ#qcd7kLx)#9xrx zlN0sC2F!lctHi%ilCGyEzsrxkl$~S$vPiabzawu%y>{RP{ffLvdRVa_F468dbo^6M zbv@nrm}g#0Rt~I^6Me=3i!5!dhY^!}&sriZqz|s?+^{7^P2mDRp`!ZUxgp=ZDIZ$S zm&^9B-w6iv9&o5sMLDjyy6nPBtNpMgq$p;wx|R-S!Qiv339Ro+kz70#v@l(f}AYZw#1Wj zFCDg*sD~`&w$zi0tgkHdc3Om-EHR=I`m%ttBjntRK<-fFF7V`3%PAdf{Bp9iTjICH z&?n2jC4O5BIeBK8_-!%dW+0dNZ879nHZl3zV#w7Xm-uZlFcOz z?rfjc)!o_B*WBAPYfH=dvu4-Kp2cH{rBR*7EwTFUSxD(Mnlx7gQeSaN;F9KL8} z-QvTuhu1Awvw*B|*`hUOP1cfi?A3y5ofCC?;@mi5S)Ds!@G_9D?d8lCyuH*`I3m)hQ@f zr=)fhg-<@oBOCH8ud3h2k%@#I9pUpn zqYR~15AMkKvTSr$8!M$IJf?|Klk)d&3&?1Yrqlw1*#fqu-<#)VM7=jZO8%ls-$5D7 zF5%T(0%ZE$yl0OTc@{|DoA+#yB5eUDUeu=V&8IHmvw+VpMymH<_4ESgoq3;R3I~$~ ze10*)sw!c|_FytjTGv5m0Vc4zA37Rzm6r;qe|rwfW{<3Nx;8?jX__cW*G7mmk0tgQ z&^e*$+6a-x-qYSckqb@NMhO2|tJbt)O}aLMu|#3!n`a;S4sSo-u#DC-KyO&4Ya>jb zu0EDr*qCO&U+*17wwCkeXmi9_G~0deC{a&|?;R!UiB(kc_3Z99J|pTi3Nt$I3&j~a zsa`vLdg9(VD_Kv%G=Wl95mNO^*G7nF`F_9g8L3D7X29OdO4mjZbM8cH;+TP22d0@-y>y&o*nd4XT*(b`K0!8^$fsBnXZi>>q)E6+|xS6DP0?(*d`9A$$)`a zMJQbx!Le#s?nZ=|H`4XrUL{7}Bt7Zc2%&3h?4WU!ozt}uVmyey3DUI@!n$z@ye7xP z(zOwyttGQ))0A2uwLoeCu>fzu1(VEpO4F`cVEy`@-duO@t|{5Iqtmy}cg=q3(SyeV z2bfQNrlD`}w0T<7)B>pm!YxpAPZ%yX7`SRk;Iq(a3bBA%xkPR>eFLW~1ExNht>k@A z8-^`k*xA?7!jG*XnqZwuQYG?}5f+!X_vCxXYnQF4>*#CSm5)A!pD^X77T6mt;OlIA zlml& z7&|^X=+`kW_dn`!tkTasQ~aBAKQ;KpWo@`}R&24XA+?s3t_|n6%^=5eORJwD%8EX$ z890A_Ye#ciUrRn+J#dh_hT|7y#xMA;Rq7Li-6x!QQ7dc1>3Gr8-8`QUSG0F_r0y|j z-NW$<3{b&Hl3}rX%URodb#JbtCD+|z7QVk|zO015D0P;>;4F?`5HHd-0|!Hcmsm%i zU!-dWmT0q7Y~Qs2uk>c?@*Da#?YmWsubJFS#!IB7gUJFFzE33%rg|6DHT@`BfkDz; z*8;wYgDx)xsRdFC3{DFSxb#tRx7>zSUsW8Gc5Zbo;)vZy-KzQG=r zxg@C7-Vxm2<-MYb`SPb`ns&_s>C2kCX2104)B?NF0_n?|yV2O`sZtB17TBXLP;^hY zM_=vBdU5J*n9Z<;eD|h&cID3gwc!4xAn!7k*VQjw*L;3!OJjHEmbI%J7X_xkRa#}b zO5UBgLcZr0>5GpqYon*i2a5%~E;d+doYphU0uo!9h7(p4#v?$FfnS@^{=<)PCS+@2 z*Q?-;g|)B*xpBxXC_!#Ka&;xhO+;>qC+A)gY;UyT`X;fz)RT*>$7JMAi;z<(OOTt3+*O`jWcwb2+|?z>9gExro?PHoG0-^3rDCTg$d+xQ zB>hBPq=;}q0vYTfAIuzdM~RoP|j@>zm}Ps?rT%EwJd zD_KwaiMp_6fR}!vF2XP+vYU__(8${ye`5DD2{9k6(w|9)`}~UU!#jz3;xDN5>xo!T z%v84@dSVrotY>$BcqhWnvWlAX!JN33Ppa1rpPsmuFImq3e0WFIEB!=WM9Zh2sEhOW zCQ~>NAKq!mHLqMP-#_B*ua5IW?l{Kj`9^WqlUycOoPMG%+D>AhS7fA&_*9u(X}?Cw zL_H;rl!dEOR z>Y^={E^Hian?X{NE^ItV8v5n0W;)N|<+pKqhCSN?>B7c)cKf^{S2ySvHm;QE{l1Bb zJKGAc{0pS%2dcu`j=8Q?{B*LOC#~z%3Pi=L5V`Mqu!ftg<3_5rtbuqxTvWv*+xPx> zCS79Nu~fRmwl`DSu}Q!4fn8#|%(AK*maSOUu%NzX@w&yKS5qroHNTjRlZQ&iG4*2J za(G3pWevv?>B3oY_8LTGGE}FFc@Lrn??+XQU!;q9_rqrUx~LN`YSYEM_w}akSN$Bn z;2`;INV=GJzpS_K3OjyL%gru+Vb51n7H0B0Xm)j9m&_uWe_B4*lJD+GmvY^Ay`Z>e zKED_e;TQaD-ks}i&8MDGY`%S#Nd;N?Q_uB%m{LC+!nU)>7Ja=JkQCqI3C*M=EC0F#~=sC+8vkhy{ zX*3N_)4$A1pmv<1?)zQa9%9}SYe74E(DZSUaEedrZ<>zns#hqFL%-QtC3E{%Gzww5c?kD>UP zNBxFZ^h2IV#3yx&nf_K1Z=|#|wLoft)B^jk1zy(Y80q-34|`5pwbTNs1yT#dTi|6K zU(&BwMjF3~lJqN;_)J_GuNnDi@_k;YEHVwsDyjZ=_*#nQ1vfAb~|Sip?0{vKB- zFM1jp>K7LB3-^6rM2P&_T0>*~lEUK(_e;{Vc2Qm7asAzI;((P4muHiXYiL|+zLT1b ztXE@w=Y}LbN##ul3~1zy{}h(@4Xemn_4C_YiF)EM$o(QqqMj1J&6TVtR#C~PdwTm4<4@z_C5drNOkcxoNk|iv%+hbp z$d_;84=E+CiiR3iluE2z%&D48*+6`oEB%UPjG_JCv5xp&pM3LpU`Fm&WTcF&RX<0{ zL_P5x&>fi)^~4Tv-W@=)o>)aCU(fCyDI@AN3MW=0O8OPcUil<%SfAe0{xX1i;olrNLIV|UCI?MWkL;#yuKR1b^~bY6sFQLr#C6`s};_Z3+g zb+U_QEt)=E78i@x6MsRa>xm7R{kWd=E0$sHwZmz5B6wWOC$*QWr#rFTap+Z{k*EeF1(z?=jP_ScbQ{a5G-fu;mLo`#M^9aOv^<$o&$G+{7`fQ`WP8iDeJg zE?ZI8(bu-iPdokRN^xp|z19NhyHa~?(+%i_r(XyjP;>5$%F-_c?~SdtM_zL}s_c=? zl3vtqv_SfW;N58Kz2#Jc{tLnBcUfImO~1<;SQW~(OTWOteV0}4S%yP;4fV2GdES(M zEwx{bu`dgYd+29~_=SAUY+tTyTDOud;P^$YL=F~|UeVc+x6-c@m2AIMaNn{(uB|QG zo8#BJ-q@cw_pM6%Ym?qH_^pxReef+i8r2?%cSc0dp7xgAK+HUqdJV*^0MVo7iwxAP zfb=apOd6gBVkRS+?e3n0NkZYLFXYN?rB##bE93|EmoHdl=F{Xu-=3&7(lyQUA&bDF zfgR>Q$>%Ntys(`?`IgLu|`WB*NiSXR_Zbd|k_50n5NIh}| z12zMCpM484ok<<;sS9~f)!EsRJuTlB8C&&S{qW-*ZYdFAApRz3;)JEV-Q-+XT%P!T z>g2uro;ULCr+%(15v^xWd_Q$}-(yBvr=RzjiF!)B$4t}{+0j*Jaqn4@^~5SFSM8XeGhC5-Jp*=+Nd;pPSFxa{ zJw|{cd1o|ULdzt*S2_?+&ziW9-8oYF?p4DZjO*#=iW!l5#KybpUUi>*4|t44+@UCMIZL^NtSq$RIJbf>(}=%zqhxLy*u~K4c6{FWqPjE0(+$e(og*E zmCcr3bZUXr0xyFFitY(thI8yCD%IUE_82LXzZc0A@qACsmR!-#ljkgJ%r>k&r%_eQ z*3Y%%7R+}yZOhHLdI0ESrVIA%C616@=H6ogfB)Kht~$Nafwn-pVBbJnbg$EwF4(u% zHQAne!Re^7r?yObUAxNy>4JT`%hG$%c?SK0eT)pl)H_7km3=$;qmTQmq&y@jud83W zuKE1dmd5VREo)cvS)oexL!SR>!p`}}EC0h39~wwghz0mnwjx*48RtK)k67}HvieoI zmZ|4=g=iaCmhJnETjuA;;%=p-bSX>MPJ@0a%VeLaw91URynAgAxt1)FA!6=&XvC)n z?724=O--s+tX#36VR6mkb&CtHUGLXQrcTPn$#qdbw%9e=Nd3^0il!DwEs$DZZ?}N@ zoy}Atjg5PIYo^zqS|GK+Kv^J-jRR%LR8MMw)B^jG1^lrw3MbXqe;g0=M0~w$nq;#< zHk)L#T^^vNf3%A!(v(^twZNdaKpGDRy$hrUNG*_Bz_GySd6rdYwfFQEylU`TZYn1T zzs-@fwqp7zQ%-C$XjJG34@-#&uhcZH80KR?$b_p|N2U2G8{F!FZMC{~7&` z{LR?hezoR5{g}r;i#}$nztiBgP(EJiFaOVP;5R9G>)vxLYs77eUvY3P{G8^Wa~Q{r z(fmbnJsULt(b1^+oaRsFg?+nO^Q*>!E4BXn{s)%xk)~%vY-{9c;2~Q6rf0$DYyOZglb@pHM_vZs^qV37aP^eGp$WcORq@jIgMX&w51Irv z@##xf&_CyBe%Yh&&Fa#(eF6U&s?YnwcfdF6h>f}(Z0xW>?0JE{p09rm`E#|NY51N^ zTS}_r`YogXu$l19n(qHOg|anT|BF-Ln+aQgr=OOYcAWcH_-3v2>O0W0LCfF%PWTs! zc1*d3%{+bHVfc={Rk5wAspQ)J<=_7R{B4?FiGP~*su({V{zZm=u_u2|2EOc*Dz9Rr z+pFTjCirGiiFI<``}KK`L#KTy`=lm5wrG#l*ZIYlz_g8|vnR8;Me{#E-?7DSNR`BY zt48ZN??m|972A3qyJgIIPgw?khvrxQj(n=t^VJW-r~M>V-pR)J;SPB{zQf%g@4>dXg>|JH18gzyJ5}uU2ep_#4T$=<7WALHO5b{?OIrM*lmp zrA^zD>@xhn>a|*a#7|(nR`W-Ucl&Aizws&ib(%k>#_Ok(z7L;1AZf=Uu1L0q%`9r0Dn0`86&UL+!{|mXX z&$Z%L(oUpd|6!y1Y59LY0sqa4ZCxWiuls4m3B(Lr`ah|PYcTz^{4Lnheyd_zRrDQ4 z&m&p*Z&Q4G&a+_CPv<@Xe!J!$^Bu3B4k2dR^huI^{EJ>cy^7di(>H{FviPtQugbyi z()?5F-F{lW1D~h49mVfs?`0vs3b+>r^^s(>4f3N1BjvbtSy7`arZ`685 z987Nd=^fHu@6-HI;-|WwmR~P%;Qg9kiElXeU$zcHkzUVjo<^2D_|B&Y2a}c@ir{(XT2LHo~Z=W(6Z2IYI#ZNw><+n?_=zdypmbAr3 zHGjnIpuze)G^zi)#7S>oMbL`IBFS|2fUS5}P~Y=~Q_3t(xDm0c`r| zvC=O-ule~_x1Uyw9t!^pn!kx_Fym?Yw}j6*B<+XKJNDU%ZR{^8wl$J5%ZcZY<2&}3 zHGfnuxoP*YHhgR+X}^E6G5z$3o8aFjT!v5jlhaQt?*dD^lFt4%8$F(u-zxs|RmHYO zSCAV$Z7tVP4_jkj;Q}Zvx-lm_H zf1wu4F(iB2Vz-}G%sT|?)YtNUriQRues*Zf=X7t>EGj;jWLPxC)6 zxfxIY{SbU~NxFh-cKYe68} zJR1JPifvsh_A~u-e{5{iA0%xTe>e52Ivf5E6x;sPc5>5C8;LRYqniKe{m4x}JrrNH zf2jD@J-;S5`z}pEO=P=(}&N6LEjesou|9~v|=cI!G28hpL?g z54?-q^wa-QM_cSgda;X*(X+T4{%;i9en4WN9#6}EbqZMG3)$nHZa*#m_TeyotNFkF zpxaL?h7tqp-)a7j#rO1hT7KUG@RN$48MV~wr!^PAe@e?g_&IVjp5BTt+fQrx13v8a z)9Rz(i{Fds@c}cQmOm)+e^7k;L8*uCrxio6vHeHIx9*)vZti=>-U9zmntu*$?btt$ zZR}?h-#(RdIqj9Jfd8!FV-rVy?mOVq_9T1T6t>2n+pmZ57tMcc0=e#|+o^=ABvyJVrO&TTmHxi@SoH2 z57m*Ie)=_h$$nn*x6LFsez^Xd@UbJweh7bd`e_SoV!vScJIGDF#=Q~#zZ5?+^&oQH zPs^W^IPjw4+fTQW>wa4P0BvoH-@C~?hryn~WS+zL_(Kjs!g)U6=S#huzxRE7tMNG-@EaldX3cUf0{po^2tvt`RZ-& zhfg0PWlsMcSjUIzjkH}xv8_x!{$=jBt6x(KwpBr9*R6R`} z&oE|??8n63IzCk0jXg8vn*S3i*X>e$+oAAvoinS)!q@$}y7mD0LzH}G^A#tAn%^y%jt^B&VDrp)!>7I`K2$w?D13=KWZgez zWBlaf^T87}zgMnP$A{{7SHPd7`F-MFre5#GXESnrWPNg7dYrAUybH#`!iGPGt z9*nH8;h(}*$A_vXq`p%O|6%eiy1wJT3V*8NTi49~2*hI`V(R#+k!4|LQBr zwS42v;txj{KJng>f7M;^k2L)2Jo!r(!#_&%Ur(HHiyumAu6 diff --git a/demos/fractal/FractalVC.dsp b/demos/fractal/FractalVC.dsp new file mode 100644 index 0000000000..c60a4355e7 --- /dev/null +++ b/demos/fractal/FractalVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="FractalVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FractalVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FractalVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FractalVC.mak" CFG="FractalVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FractalVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FractalVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FractalVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "FractalVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FractalVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/fractal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FractalVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/fractal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FractalVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/fractal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FractalVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/fractal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "FractalVC - Win32 Release" +# Name "FractalVC - Win32 Debug" +# Name "FractalVC - Win32 Debug DLL" +# Name "FractalVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\fractal.cpp + +!IF "$(CFG)" == "FractalVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FractalVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FractalVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FractalVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\fractal.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/demos/fractal/FractalVC.dsw b/demos/fractal/FractalVC.dsw new file mode 100644 index 0000000000..2b5c2eca2a --- /dev/null +++ b/demos/fractal/FractalVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FractalVC"=.\FractalVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/demos/life/LifeVC.dsp b/demos/life/LifeVC.dsp new file mode 100644 index 0000000000..3dfb7220e2 --- /dev/null +++ b/demos/life/LifeVC.dsp @@ -0,0 +1,235 @@ +# Microsoft Developer Studio Project File - Name="LifeVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=LifeVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "LifeVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "LifeVC.mak" CFG="LifeVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "LifeVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "LifeVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "LifeVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "LifeVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "LifeVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/life.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/life.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/life.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/life.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "LifeVC - Win32 Release" +# Name "LifeVC - Win32 Debug" +# Name "LifeVC - Win32 Debug DLL" +# Name "LifeVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\dialogs.cpp + +!IF "$(CFG)" == "LifeVC - Win32 Release" + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dialogs.h +# End Source File +# Begin Source File + +SOURCE=.\game.cpp + +!IF "$(CFG)" == "LifeVC - Win32 Release" + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\game.h +# End Source File +# Begin Source File + +SOURCE=.\life.cpp + +!IF "$(CFG)" == "LifeVC - Win32 Release" + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LifeVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\life.h +# End Source File +# Begin Source File + +SOURCE=.\life.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\reader.cpp +# End Source File +# Begin Source File + +SOURCE=.\reader.h +# End Source File +# End Target +# End Project diff --git a/demos/life/LifeVC.dsw b/demos/life/LifeVC.dsw new file mode 100644 index 0000000000..4dfff86137 --- /dev/null +++ b/demos/life/LifeVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "LifeVC"=.\LifeVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/demos/life/Makefile.in b/demos/life/Makefile.in index 14db842f1f..77da68dce4 100644 --- a/demos/life/Makefile.in +++ b/demos/life/Makefile.in @@ -13,11 +13,11 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../.. program_dir = demos/life -DATAFILES = samples.inc +DATAFILES = samples.inc breeder.lif PROGRAM=life -OBJECTS=$(PROGRAM).o dialogs.o game.o +OBJECTS=$(PROGRAM).o dialogs.o game.o reader.o include ../../src/makeprog.env diff --git a/demos/life/bitmaps/info.bmp b/demos/life/bitmaps/info.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3e27204adae286dfc247fec57bff534d8f90a287 GIT binary patch literal 246 zcmZ?r{l)+RWk5;;hy|dSk%0v)(Eucm@If$G08Rj9fQX@?0YU*uAd}(1fdfDqB=H}N v823=;=;U&0ua+_3>YyQsonW~6N3OvKTr2(k@|B{{YeKb~(CUb3rr5zpcQ zCn>O}mP9XDa6kd~GO1FGG0<95V`X5i$V8neN$dxz4&8XX3!AZr-;ApY^eS-9oTLj~ Y^Hcc9z2|$wrXTtLH=Rc2n(WoWFRhqJ00000 literal 0 HcmV?d00001 diff --git a/demos/life/bitmaps/open.xpm b/demos/life/bitmaps/open.xpm new file mode 100644 index 0000000000..54748e910d --- /dev/null +++ b/demos/life/bitmaps/open.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char *open_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c None", +". c Black", +"X c Yellow", +"o c Gray100", +"O c #bfbf00", +/* pixels */ +" ", +" ... ", +" . . .", +" ..", +" ... ...", +" .XoX....... ", +" .oXoXoXoXo. ", +" .XoXoXoXoX. ", +" .oXoX..........", +" .XoX.OOOOOOOOO.", +" .oo.OOOOOOOOO. ", +" .X.OOOOOOOOO. ", +" ..OOOOOOOOO. ", +" ........... ", +" " +}; diff --git a/demos/life/bitmaps/reset.bmp b/demos/life/bitmaps/reset.bmp index 41ea143e80b3bdd14bc09ac2b704be967c27a1dc..d66feb2384ad4c626a078c995c1a3e49af78ec3c 100644 GIT binary patch literal 238 zcmbu2yA6Oa5JQcGL>b0l4tjP;1(ew=nJ8j|<6WY3bU0`GK9aK^RUId`!4(ELX-1{H u>6c`QQqJ8_T9s0iQsQ8(Wab^@`3kuPA_p->w)Xt4Pkz>06 literal 822 zcmZ?rHDhJ~12Z700mK4O%*Y@C7H0s;AK`;whyVk_fx!wO4#adFesQ2IvKE*xQ3T-% z&}7lLaAn90xEeSESr#iBt`f+=ssK%pB=yLOA#60$khyTh5J5C9vPvKut1MPQWYf?L Lft!OVK1f6W`g6_} diff --git a/demos/life/bitmaps/reset.xpm b/demos/life/bitmaps/reset.xpm index b9ebd02762..4b17daab6f 100644 --- a/demos/life/bitmaps/reset.xpm +++ b/demos/life/bitmaps/reset.xpm @@ -1,24 +1,24 @@ /* XPM */ static char *reset_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 16 2 1", +"16 15 3 1", " c None", ". c Black", +"X c Gray100", /* pixels */ " ", -" ", -" ", -" .. .. ", -" ... ... ", -" ... ... ", -" ...... ", -" .... ", -" .... ", -" ...... ", -" ... ... ", -" ... ... ", -" .. .. ", -" ", -" ", +" ........ ", +" .XXXXXX.. ", +" .XXXXXX.X. ", +" .XXXXXX.... ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" ........... ", " " }; diff --git a/demos/life/breeder.lif b/demos/life/breeder.lif new file mode 100644 index 0000000000..5a6ca8d581 --- /dev/null +++ b/demos/life/breeder.lif @@ -0,0 +1,2523 @@ +#Life 1.05 +#D Breeder, the classic original +#D by Bill Gosper, early 1970's. +#D +#D This is the first pattern to +#D demonstrate that quadratic +#D growth was possible in the +#D Game of Life. Much better +#D results have been achieved +#D since then (see MAX). +#N +#P -368 -2 +*** +..* +.* +#P -374 -16 +...** +...** +. +. +. +...* +..*** +.*...* +*.***.* +.***** +. +. +. +. +. +. +. +. +. +. +. +. +. +....*** +...*...* +..*.....* +..**.*.** +. +. +.....* +....*.* +....*.* +.....* +. +.....** +.....** +#P -339 -16 +** +** +. +. +. +. +. +. +. +. +. +** +*.* +.** +. +. +. +. +. +. +. +. +...** +..*.* +..** +. +. +. +. +. +. +. +. +. +..** +..** +#P -334 -15 +*.* +** +.* +#P -333 15 +** +*.* +* +#P -307 -16 +** +** +. +. +. +. +. +. +. +. +. +** +*.* +.** +. +. +. +. +. +. +. +. +...** +..*.* +..** +. +. +. +. +. +. +. +. +. +..** +..** +#P -286 -31 +*.* +** +.* +#P -285 31 +** +*.* +* +#P -275 -16 +** +** +. +. +. +. +. +. +. +. +. +** +*.* +.** +. +. +. +. +. +. +. +. +...** +..*.* +..** +. +. +. +. +. +. +. +. +. +..** +..** +#P -238 -47 +*.* +** +.* +#P -237 47 +** +*.* +* +#P -243 -16 +** +** +. +. +. +. +. +. +. +. +. +** +*.* +.** +. +. +. +. +. +. +. +. +...** +..*.* +..** +. +. +. +. +. +. +. +. +. +..** +..** +#P -190 -63 +*.* +** +.* +#P -189 63 +** +*.* +* +#P -211 -16 +** +** +. +. +. +. +. +. +. +. +. +** +*.* +.** +. +. +. +. +. +. +. +. +...** +..*.* +..** +. +. +. +. +. +. +. +. +. +..** +..** +#P -179 -16 +** +** +. +. +. +. +. +.....* +.....*.* +.....** +.** +*..* +*..* +.** +. +. +. +. +. +. +. +. +...** +..*..* +..*..* +...** +.......** +.......*.* +.......* +. +. +. +. +. +..** +..** +#P -142 -79 +*.* +** +.* +#P -141 79 +** +*.* +* +#P -147 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +. +. +. +. +. +. +. +. +...** +..*..* +..*..* +...** +. +. +. +. +. +. +. +. +..** +..** +#P -126 -25 +* +*.* +** +#P -124 26 +** +*.* +* +#P -94 -95 +*.* +** +.* +#P -93 95 +** +*.* +* +#P -115 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +. +. +. +. +. +. +. +. +...** +..*..* +..*..* +...** +. +. +. +. +. +. +. +. +..** +..** +#P -78 -41 +* +*.* +** +#P -76 42 +** +*.* +* +#P -46 -111 +*.* +** +.* +#P -45 111 +** +*.* +* +#P -83 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +. +. +. +. +. +. +. +. +...** +..*..* +..*..* +...** +. +. +. +. +. +. +. +. +..** +..** +#P -30 -57 +* +*.* +** +#P -28 58 +** +*.* +* +#P 3 127 +** +*.* +* +#P 2 -127 +*.* +** +.* +#P -51 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +. +. +. +. +. +. +. +. +...** +..*..* +..*..* +...** +. +. +. +. +. +. +. +. +..** +..** +#P 18 -73 +* +*.* +** +#P -4 66 +** +*.* +* +#P -19 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +. +. +. +. +. +. +. +. +...** +..*..* +..*..* +...** +. +. +. +. +. +. +. +. +..** +..** +#P 66 -89 +* +*.* +** +#P 44 82 +** +*.* +* +#P 13 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +#P 15 18 +** +** +#P 26 -8 +.* +* +*** +#P 25 16 +.** +** +..* +#P -14 54 +** +** +#P -33 -110 +** +** +#P -22 -119 +*.* +** +.* +#P -1 -110 +** +** +#P 20 74 +** +*.* +* +#P 68 90 +** +*.* +* +#P -31 112 +** +** +#P -21 119 +** +*.* +* +#P 1 112 +** +** +#P 45 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +#P 47 18 +** +** +#P 48 23 +* +* +..** +#P 74 -24 +.* +* +*** +#P 73 32 +.** +** +..* +#P 77 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +#P 79 18 +** +** +. +. +. +** +** +#P 109 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +#P 111 18 +** +** +. +. +. +** +** +#P 122 -40 +.* +* +*** +#P 141 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +#P 143 18 +** +** +. +. +. +** +** +#P 173 -16 +** +** +. +. +. +. +. +. +. +. +.** +*..* +*..* +.** +#P 175 18 +** +** +. +. +. +** +** +#P 205 -16 +** +** +#P 207 18 +** +** +. +. +. +** +** +#P 215 -14 +* +*.* +** +#P 215 8 +.** +** +..* +#P 237 -16 +** +** +#P 239 18 +** +** +. +. +. +** +** +#P 263 -30 +* +*.* +** +#P 263 24 +.** +** +..* +#P 269 -21 +** +** +. +. +. +** +** +#P 271 18 +** +** +. +. +. +** +** +#P 287 -38 +* +*.* +** +#P 311 -46 +* +*.* +** +#P 311 40 +.** +** +..* +#P 335 48 +.** +** +..* +#P 170 -56 +.* +* +*** +#P 194 -64 +.* +* +*** +#P 188 -59 +** +** +#P 220 -59 +** +** +#P 252 -64 +** +** +. +. +. +** +** +#P 139 -80 +** +** +#P 107 -80 +** +** +#P 75 -80 +** +** +#P 31 -115 +** +** +. +. +. +** +** +#P -19 -151 +** +** +. +. +. +** +** +#P 50 49 +** +** +. +. +. +** +** +#P 74 49 +** +** +. +. +. +** +** +#P 90 49 +** +** +. +. +. +** +** +#P -34 147 +** +** +. +. +. +** +** +#P 22 147 +** +** +. +. +. +** +** +#P 38 147 +** +** +. +. +. +** +** +#P 105 112 +** +** +. +. +. +** +** +#P 89 112 +** +** +. +. +. +** +** +#P 33 112 +** +** +. +. +. +** +** +#P 21 -151 +** +** +. +. +. +** +** +#P 37 -151 +** +** +. +. +. +** +** +#P 26 -135 +*.* +** +.* +#P 87 -115 +** +** +. +. +. +** +** +#P 103 -115 +** +** +. +. +. +** +** +#P 171 -85 +** +** +. +. +. +** +** +#P 195 -85 +** +** +. +. +. +** +** +#P 211 -85 +** +** +. +. +. +** +** +#P 308 -64 +** +** +. +. +. +** +** +#P 324 -64 +** +** +. +. +. +** +** +#P 301 -21 +** +** +. +. +. +** +** +#P 325 -21 +** +** +. +. +. +** +** +#P 341 -21 +** +** +. +. +. +** +** +#P 343 18 +** +** +. +. +. +** +** +#P 327 18 +** +** +. +. +. +** +** +#P 303 18 +** +** +. +. +. +** +** +#P 333 62 +** +** +. +. +. +** +** +#P 349 62 +** +** +. +. +. +** +** +#P 277 62 +** +** +. +. +. +** +** +#P 362 -30 +.....** +.****.** +.****** +..**** +.* +*.* +*.* +....** +....*.* +......* +....*** +. +. +. +....*** +......* +....*.* +....** +*.* +*.* +.* +..**** +.****** +.****.** +.....** +#P 346 -28 +...** +..*.* +.*..* +......* +* +.....*.*.* +..*..*.*..* +...**.....*..* +........*.*.*..* +.....**.*...*..* +. +.....**.*...*..* +........*.*.*..* +...**.....*..* +..*..*.*..* +.....*.*.* +* +......* +.*..* +..*.* +...** +#P 352 -33 +.**** +****** +****.** +....** +#P 352 -6 +....** +****.** +****** +.**** +#P 331 -23 +.** +*..* +*.* +.* +. +. +. +.* +*.* +*..* +.** +#P 327 -30 +.*** +***** +***.** +...** +#P 327 -9 +...** +***.** +***** +.*** + +#P 313 -22 +.** +*..*....* +.**.....* +. +. +. +.**.....* +*..*....* +.** + +#P 294 -20 +** +** +. +** +** +#P 287 -27 +....** +...*..* +**.* +.....** +*...** +..*.* +. +. +. +. +. +. +. +..*.* +*...** +.....** +**.* +...*..* +....** +#P 364 9 +.......** +...****.** +...****** +....**** +..* +** +.*..* +..***.** +........* +........* +....*..** +.....** +. +.....** +....*..** +........* +........* +..***.** +.*..* +** +..* +....**** +...****** +...****.** +.......** +#P 350 10 +.*** +.* +....* +...* +. +......* +.....**** +........* +****..*.** +*.*.*.*....** +.**..*.* +. +.**..*.* +*.*.*.*....** +****..*.** +........* +.....**** +......* +. +...* +....* +.* +.*** +#P 356 6 +.**** +****** +****.** +....** +#P 342 -38 +.** +**** +**.** +..** +#P 356 33 +....** +****.** +****** +.**** +#P 346 38 +..** +**.** +**** +.** +#P 326 -2 +.* +* +. +.*.* +...* +.* +..* +#P 331 9 +.*** +***** +***.** +...** +#P 331 30 +...** +***.** +***** +.*** +#P 333 16 +.** +*..* +*.* +.* +. +. +. +.* +*.* +*..* +.** +#P 315 17 +.** +*..* +.** +. +. +. +.** +*..* +.** +#P 296 19 +** +** +. +** +** +#P 290 11 +..** +...** +.*.* +*** +*..* +*.*** +.*..* +..** +. +. +. +. +. +..** +.*..* +*.*** +*..* +*** +.*.* +...** +..** +#P 287 32 +.** +** +..* +#P 367 51 +...** +.*....* +.......* +.*.....* +..****** +. +. +. +. +...*** +.*...** +.*.*..** +*.....* +.***** +. +.***** +*.....* +.*.*..** +.*...** +...*** +. +. +. +. +..****** +.*.....* +.......* +.*....* +...** +#P 355 57 +..*..* +.***.** +**...*.** +.*...* +.*.*.*.** +..*****.*.* +...*....** +.........* +. +.........* +...*....** +..*****.*.* +.*.*.*.** +.*...* +**...*.** +.***.** +..*..* +#P 357 51 +.****** +*.....* +......* +*....* +.*.* +#P 357 75 +.*.* +*....* +......* +*.....* +.****** +#P 339 60 +.** +*..* +*.* +.* +. +. +. +.* +*.* +*..* +.** +#P 332 54 +.***** +*....* +.....* +*...* +..* +#P 332 72 +..* +*...* +.....* +*....* +.***** +#P 322 60 +..**.* +.****.** +*....** +*.* +.* +. +.* +*.* +*....** +.****.** +..**.* +#P 306 62 +**.** +.*** +.** +. +.** +.*** +**.** +#P 302 63 +* +** +. +** +* +#P 292 57 +.......* +......*.* +.........* +....*.** +..*.** +***..** +.**..** +. +. +. +.**..** +***..** +..*.** +....*.** +.........* +......*.* +.......* +#P 272 56 +.***** +*....* +.....* +*...* +..* +#P 272 70 +..* +*...* +.....* +*....* +.***** +#P 347 81 +*..* +....* +*...* +.**** +#P 343 -74 +.**** +****** +****.** +....** +. +. +. +. +..** +.*..** +***..* +*....* +***** +. +***** +*....* +***..* +.*..** +..** +. +. +. +. +....** +****.** +****** +.**** +#P 330 -70 +...* +....* +..**** +**...*.** +.*.*.*.* +.*...***..* +..*.*...* +...*....*** +. +. +. +...*....*** +..*.*...* +.*...***..* +.*.*.*.* +**...*.** +..**** +....* +...* +#P 332 -75 +....** +****.** +****** +.**** +#P 332 -50 +.**** +****** +****.** +....** +#P 314 -66 +.** +*..* +*.* +.* +. +. +. +.* +*.* +*..* +.** +#P 307 -72 +...** +***.** +***** +.*** +#P 307 -53 +.*** +***** +***.** +...** +#P 297 -69 +..* +..* +. +......* +.****.* +*..*.** +*.* +.* +. +.* +*.* +*..*.** +.****.* +......* +. +..* +..* +#P 281 -65 +.*.* +....* +**.* +..* +. +..* +**.* +....* +.*.* +#P 277 -63 +* +*** +. +*** +* +#P 268 -68 +.....*** +...*..** +..*...*.* +*...* +*...** +* +.*...* +. +.*...* +* +*...** +*...* +..*...*.* +...*..** +.....*** +#P 322 -80 +..** +**.** +**** +.** +#P 247 -70 +...** +***.** +***** +.*** +#P 236 -94 +.....** +.****.** +.****** +..**** +. +. +..** +.*...* +.*....* +*.....* +.**.*** +. +. +. +.**.*** +*.....* +.*....* +.*...* +..** +. +. +..**** +.****** +.****.** +.....** +#P 232 -91 +.* +*..* +. +. +. +.* +..* +. +. +. +. +. +..* +.* +. +. +. +*..* +.* +#P 226 -97 +.**** +****** +****.** +....** +#P 226 -70 +....** +****.** +****** +.**** +#P 218 -89 +.....*** +...***** +..*** +.*...* +**..*....** +*......*** +.******** +. +.******** +*......*** +**..*....** +.*...* +..*** +...***** +.....*** +#P 216 -102 +.** +**** +**.** +..** +#P 218 -94 +*** +* +.* +#P 218 -72 +.* +* +*** +#P 201 -73 +...** +***.** +***** +.*** +#P 201 -94 +.*** +***** +***.** +...** +#P 201 -88 +.** +.** +*..* +*.* +.* +. +. +. +.* +*.* +*..* +.** +.** +#P 183 -86 +.** +*..* +.** +. +. +. +.** +*..* +.**. +#P 156 -93 +....*.* +...**..* +..***..* +.*** +.*.*..** +**.***.* +.*......* +..*....* +....***** +........** +........** +. +........** +........** +....***** +..*....* +.*......* +**.***.* +.*.*..** +.*** +..***..* +...**..* +....*.* +#P 141 -92 +.*** +***** +***.** +...** +#P 122 -125 +.**** +****** +****.** +....** +. +. +. +. +..** +.*..** +***..* +*....* +***** +. +***** +*....* +***..* +.*..** +..** +. +. +. +. +....** +****.** +****** +.**** +#P 109 -121 +...* +....* +..**** +**...*.** +.*.*.*.* +.*...***..* +..*.*...* +...*....*** +. +. +. +...*....*** +..*.*...* +.*...***..* +.*.*.*.* +**...*.** +..**** +....* +...* +#P 111 -126 +....** +****.** +****** +.**** +#P 111 -101 +.**** +****** +****.** +....** +#P 93 -117 +.** +*..* +*.* +.* +. +. +. +.* +*.* +*..* +.** +#P 86 -123 +...** +***.** +***** +.*** +#P 86 -104 +.*** +***** +***.** +...** +#P 76 -120 +..* +..* +. +......* +.****.* +*..*.** +*.* +.* +. +.* +*.* +*..*.** +.****.* +......* +. +..* +..* +#P 60 -116 +.*.* +....* +**.* +..* +. +..* +**.* +....* +.*.* +#P 56 -114 +* +*** +. +*** +* +#P 47 -119 +.....*** +...*..** +..*...*.* +*...* +*...** +* +.*...* +. +.*...* +* +*...** +*...* +..*...*.* +...*..** +.....*** +#P 101 -131 +..** +**.** +**** +.** +#P 90 -97 +* +*.* +** +#P 26 -121 +...** +***.** +***** +.*** +#P 51 -160 +.****** +*.....* +......* +*....* +..** +. +..** +.*.** +**.*.* +*.**.** +*...** +..*** +. +..*** +*...** +*.**.** +**.*.* +.*.** +..** +. +..** +*....* +......* +*.....* +.****** +#P 43 -154 +..*** +*...* +* +* +.*..* +..*.* +. +..*.* +.*..* +* +* +*...* +..*** +#P 40 -164 +..** +*....* +......* +*.....* +.****** +#P 40 -136 +.****** +*.....* +......* +*....* +..** +#P 27 -153 +..* +.*.* +* +.* +. +. +. +.* +* +.*.* +..* +#P 26 -163 +..* +*.* +*.* +#P 15 -161 +..* +*...* +.....* +*....* +.***** +#P 15 -139 +.***** +*....* +.....* +*...* +..* +#P 15 -153 +* +.* +.* +* +. +. +. +* +.* +.* +* +#P 8 -155 +...** +...** +...** +**.** +.*.* +.*** +. +. +. +.*** +.*.* +**.** +...** +...** +...** +#P 5 -151 +** +** +. +. +. +** +** +#P -7 -152 +.** +*..* +.** +. +. +. +.** +*..* +.** +#P -33 -161 +.*.* +.*.* +.*.** +...** +*..* +.** +#P -33 -140 +.** +*..* +...** +.*.** +.*.* +.*.* +#P -45 -159 +..* +*...* +.....* +*....* +.***** +#P -45 -141 +.***** +*....* +.....* +*...* +..* +#P 30 -168 +*..* +....* +*...* +.**** +#P 111 38 +......** +....*....* +..........* +....*.....* +.....****** +.* +.*** +*.**..* +..***..* +.*****..* +.***.*.*** +......**.** +.....**.** +. +. +. +.....**.** +......**.** +.***.*.*** +.*****..* +..***..* +*.**..* +.*** +.* +.....****** +....*.....* +..........* +....*....* +......** +#P 104 38 +.****** +*.....* +......* +*....* +..** +#P 104 62 +..** +*....* +......* +*.....* +.****** +#P 97 45 +......* +.....*** +..*** +.*...*...* +*..*.*....* +*........* +.******** +. +.******** +*........* +*..*.*....* +.*...*...* +..*** +.....*** +......* +#P 97 40 +.** +** +..* +#P 97 62 +..* +** +.** +#P 79 41 +.***** +*....* +.....* +*...* +..* +. +..** +.*..* +.*.* +..* +. +. +. +..* +.*.* +.*..* +..** +. +..* +*...* +.....* +*....* +.***** +#P 62 48 +.** +*..* +.** +. +. +. +.** +*..* +.** +#P 43 50 +** +** +. +** +** +#P 36 41 +....** +...*** +.**...* +.*...* +* +***..** +*.*.*** +.***.** +...** +. +. +. +. +. +...** +.***.** +*.*.*** +***..** +* +.*...* +.**...* +...*** +....** +#P 19 43 +.***** +*....* +.....* +*...* +..* +#P 18 54 +** +** +#P 94 68 +*..* +....* +*...* +.**** +#P 124 102 +.**** +****** +****.** +....** +. +. +. +. +..** +.*..** +***..* +*....* +***** +. +***** +*....* +***..* +.*..** +..** +. +. +. +. +....** +****.** +****** +.**** +#P 111 106 +...* +....* +..**** +**...*.** +.*.*.*.* +.*...***..* +..*.*...* +...*....*** +. +. +. +...*....*** +..*.*...* +.*...***..* +.*.*.*.* +**...*.** +..**** +....* +...* +#P 113 101 +....** +****.** +****** +.**** +#P 113 126 +.**** +****** +****.** +....** +#P 95 110 +.** +*..* +*.* +.* +. +. +. +.* +*.* +*..* +.** +#P 88 104 +...** +***.** +***** +.*** +#P 88 123 +.*** +***** +***.** +...** +#P 78 107 +..* +..* +. +......* +.****.* +*..*.** +*.* +.* +. +.* +*.* +*..*.** +.****.* +......* +. +..* +..* +#P 62 111 +.*.* +....* +**.* +..* +. +..* +**.* +....* +.*.* +#P 58 113 +* +*** +. +*** +* +#P 49 108 +.....*** +...*..** +..*...*.* +*...* +*...** +* +.*...* +. +.*...* +* +*...** +*...* +..*...*.* +...*..** +.....*** +#P 28 121 +.*** +***** +***.** +...** +#P 103 131 +.** +**** +**.** +..** +#P 92 98 +** +*.* +* +#P 51 137 +...**** +..****** +..****.** +......** +. +. +. +...*** +.** +.*....** +**.**..* +.......* +....*** +. +....*** +.......* +**.**..* +.*....** +.** +...*** +. +. +. +......** +..****.** +..****** +...**** +#P 43 143 +....* +....** +..*..* +*** +.** +..*.* +....* +. +....* +..*.* +.** +*** +..*..* +....** +....* +#P 42 136 +....** +****.** +****** +.**** +#P 42 161 +.**** +****** +****.** +....** +#P 28 145 +..* +.** +*** +. +. +. +. +. +*** +.** +..* +#P 17 139 +...** +***.** +***** +.*** +#P 17 158 +.*** +***** +***.** +...** +#P 16 146 +** +** +#P 16 153 +** +** +#P 9 143 +...** +..*..* +.....* +** +. +.*.* +..* +. +..* +.*.* +. +** +.....* +..*..* +...** +#P -15 139 +...............* +.............**.* +............*...* +........****.*.* +.......*.*...** +.**....*.* +**.*..**.** +.**.***..**** +...*...**.*.** +.........**.** +...........* +. +...........* +.........**.** +...*...**.*.** +.**.***..**** +**.*..**.** +.**....*.* +.......*.*...** +........****.*.* +............*...* +.............**.* +...............* +#P -21 144 +..* +.*.* +*...* +.*..* +.**.** +. +. +. +.**.** +.*..* +*...* +.*.* +..* +#P -43 141 +...** +***.** +***** +.*** +#P -43 156 +.*** +***** +***.** +...** +#P 28 164 +.** +* +#P 32 166 +.** +**** +**.** +..** +#P 27 135 +** +*.* +* diff --git a/demos/life/dialogs.cpp b/demos/life/dialogs.cpp index 0d8989793e..98b1cc21b6 100644 --- a/demos/life/dialogs.cpp +++ b/demos/life/dialogs.cpp @@ -93,16 +93,16 @@ LifeSamplesDialog::LifeSamplesDialog(wxWindow *parent) 0, NULL, wxLB_SINGLE | wxLB_NEEDED_SB | wxLB_HSCROLL ); - for (unsigned i = 0; i < (sizeof(g_shapes) / sizeof(LifeShape)); i++) - m_list->Append(g_shapes[i].m_name); + for (unsigned i = 0; i < (sizeof(g_patterns) / sizeof(LifePattern)); i++) + m_list->Append(g_patterns[i].m_name); // descriptions wxStaticBox *statbox = new wxStaticBox( this, -1, _("Description")); m_life = new Life(); - m_life->SetShape(g_shapes[0]); + m_life->SetPattern(g_patterns[0]); m_canvas = new LifeCanvas( this, m_life, FALSE ); m_text = new wxTextCtrl( this, -1, - g_shapes[0].m_desc, + g_patterns[0].m_description, wxDefaultPosition, wxSize(300, 60), wxTE_MULTILINE | wxTE_READONLY); @@ -136,9 +136,9 @@ LifeSamplesDialog::~LifeSamplesDialog() m_canvas->Destroy(); } -const LifeShape& LifeSamplesDialog::GetShape() +const LifePattern& LifeSamplesDialog::GetPattern() { - return g_shapes[m_value]; + return g_patterns[m_value]; } void LifeSamplesDialog::OnListBox(wxCommandEvent& event) @@ -148,15 +148,14 @@ void LifeSamplesDialog::OnListBox(wxCommandEvent& event) if (sel != -1) { m_value = m_list->GetSelection(); - m_text->SetValue(g_shapes[ sel ].m_desc); - m_life->SetShape(g_shapes[ sel ]); + m_text->SetValue(g_patterns[ sel ].m_description); + m_life->SetPattern(g_patterns[ sel ]); - // quick and dirty :-) - if ((g_shapes[ sel ].m_width > 36) || - (g_shapes[ sel ].m_height > 22)) - m_canvas->SetCellSize(2); - else + // these values shouldn't be hardcoded... + if ((size_t)sel < (sizeof(g_patterns) / sizeof(LifePattern)) - 3) m_canvas->SetCellSize(8); + else + m_canvas->SetCellSize(2); } } @@ -182,7 +181,7 @@ LifeAboutDialog::LifeAboutDialog(wxWindow *parent) wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL ); sizer->Add( sbmp, 0, wxCENTRE | wxALL, 10 ); sizer->Add( new wxStaticLine(this, -1), 0, wxGROW | wxLEFT | wxRIGHT, 5 ); - sizer->Add( CreateTextSizer(_("Life! version 2.1 for wxWindows\n\n" + sizer->Add( CreateTextSizer(_("Life! version 2.2 for wxWindows\n\n" "(c) 2000 Guillermo Rodriguez Garcia\n\n" "\n\n" "Portions of the code are based in XLife;\n" diff --git a/demos/life/dialogs.h b/demos/life/dialogs.h index b2187cb0c3..e41e45953c 100644 --- a/demos/life/dialogs.h +++ b/demos/life/dialogs.h @@ -44,7 +44,7 @@ public: ~LifeSamplesDialog(); // members - const LifeShape& GetShape(); + const LifePattern& GetPattern(); // event handlers void OnListBox(wxCommandEvent &event); diff --git a/demos/life/game.cpp b/demos/life/game.cpp index f5c2e09f3b..46264b5238 100644 --- a/demos/life/game.cpp +++ b/demos/life/game.cpp @@ -117,17 +117,24 @@ bool CellBox::SetCell(int dx, int dy, bool alive) Life::Life() { - m_numcells = 0; - m_boxes = new CellBox *[HASHSIZE]; - m_head = NULL; - m_available = NULL; + // pattern description + m_name = _(""); + m_rules = _(""); + m_description = _(""); + + // pattern data + m_numcells = 0; + m_boxes = new CellBox *[HASHSIZE]; + m_head = NULL; + m_available = NULL; for (int i = 0; i < HASHSIZE; i++) m_boxes[i] = NULL; - m_cells = new Cell[ARRAYSIZE]; - m_ncells = 0; - m_findmore = FALSE; - m_changed = FALSE; + // state vars for BeginFind & FindMore + m_cells = new Cell[ARRAYSIZE]; + m_ncells = 0; + m_findmore = FALSE; + m_changed = FALSE; } Life::~Life() @@ -145,8 +152,6 @@ void Life::Clear() { CellBox *c, *nc; - m_numcells = 0; - // clear the hash table pointers for (int i = 0; i < HASHSIZE; i++) m_boxes[i] = NULL; @@ -170,6 +175,12 @@ void Life::Clear() c = nc; } m_available = NULL; + + // reset state + m_name = _(""); + m_rules = _(""); + m_description = _(""); + m_numcells = 0; } // -------------------------------------------------------------------------- @@ -204,19 +215,38 @@ void Life::SetCell(wxInt32 x, wxInt32 y, bool alive) } } -void Life::SetShape(const LifeShape& shape) +void Life::SetPattern(const LifePattern& pattern) { - char *p = shape.m_data; - - int i0 = -(shape.m_width / 2); - int j0 = -(shape.m_height / 2); - int i1 = i0 + shape.m_width - 1; - int j1 = j0 + shape.m_height - 1; + wxArrayString data = pattern.m_shape; + wxString line; + long x = 0, + y = 0; Clear(); - for (int j = j0; j <= j1; j++) - for (int i = i0; i <= i1; i++) - SetCell(i, j, *(p++) == '*'); + for (size_t n = 0; n < data.GetCount(); n++) + { + line = data[n]; + + if ( (line.GetChar(0) != wxT('*')) && + (line.GetChar(0) != wxT('.')) ) + { + // assume that it is a digit or a minus sign + line.BeforeFirst(wxT(' ')).ToLong(&x); + line.AfterFirst(wxT(' ')).ToLong(&y); + } + else + { + // pattern data + for (size_t k = 0; k < line.Len(); k++) + SetCell(x + k, y, line.GetChar(k) == wxT('*')); + + y++; + } + } + + m_name = pattern.m_name; + m_rules = pattern.m_rules; + m_description = pattern.m_description; } // -------------------------------------------------------------------------- @@ -337,110 +367,110 @@ void Life::KillBox(CellBox *c) Cell Life::FindCenter() { - double i, j; + double sx, sy; int n; - i = 0.0; - j = 0.0; + sx = 0.0; + sy = 0.0; n = 0; CellBox *c; for (c = m_head; c; c = c->m_next) if (!c->m_dead) { - i += c->m_x; - j += c->m_y; + sx += c->m_x; + sy += c->m_y; n++; } if (n > 0) { - i = (i / n) + CELLBOX / 2; - j = (j / n) + CELLBOX / 2; + sx = (sx / n) + CELLBOX / 2; + sy = (sy / n) + CELLBOX / 2; } Cell cell; - cell.i = (wxInt32) i; - cell.j = (wxInt32) j; + cell.i = (wxInt32) sx; + cell.j = (wxInt32) sy; return cell; } Cell Life::FindNorth() { - wxInt32 i = 0, j = 0; + wxInt32 x = 0, y = 0; bool first = TRUE; CellBox *c; for (c = m_head; c; c = c->m_next) - if (!c->m_dead && ((first) || (c->m_y < j))) + if (!c->m_dead && ((first) || (c->m_y < y))) { - i = c->m_x; - j = c->m_y; + x = c->m_x; + y = c->m_y; first = FALSE; } Cell cell; - cell.i = first? 0 : i + CELLBOX / 2; - cell.j = first? 0 : j + CELLBOX / 2; + cell.i = first? 0 : x + CELLBOX / 2; + cell.j = first? 0 : y + CELLBOX / 2; return cell; } Cell Life::FindSouth() { - wxInt32 i = 0, j = 0; + wxInt32 x = 0, y = 0; bool first = TRUE; CellBox *c; for (c = m_head; c; c = c->m_next) - if (!c->m_dead && ((first) || (c->m_y > j))) + if (!c->m_dead && ((first) || (c->m_y > y))) { - i = c->m_x; - j = c->m_y; + x = c->m_x; + y = c->m_y; first = FALSE; } Cell cell; - cell.i = first? 0 : i + CELLBOX / 2; - cell.j = first? 0 : j + CELLBOX / 2; + cell.i = first? 0 : x + CELLBOX / 2; + cell.j = first? 0 : y + CELLBOX / 2; return cell; } Cell Life::FindWest() { - wxInt32 i = 0, j = 0; + wxInt32 x = 0, y = 0; bool first = TRUE; CellBox *c; for (c = m_head; c; c = c->m_next) - if (!c->m_dead && ((first) || (c->m_x < i))) + if (!c->m_dead && ((first) || (c->m_x < x))) { - i = c->m_x; - j = c->m_y; + x = c->m_x; + y = c->m_y; first = FALSE; } Cell cell; - cell.i = first? 0 : i + CELLBOX / 2; - cell.j = first? 0 : j + CELLBOX / 2; + cell.i = first? 0 : x + CELLBOX / 2; + cell.j = first? 0 : y + CELLBOX / 2; return cell; } Cell Life::FindEast() { - wxInt32 i = 0, j = 0; + wxInt32 x = 0, y = 0; bool first = TRUE; CellBox *c; for (c = m_head; c; c = c->m_next) - if (!c->m_dead && ((first) || (c->m_x > i))) + if (!c->m_dead && ((first) || (c->m_x > x))) { - i = c->m_x; - j = c->m_y; + x = c->m_x; + y = c->m_y; first = FALSE; } Cell cell; - cell.i = first? 0 : i + CELLBOX / 2; - cell.j = first? 0 : j + CELLBOX / 2; + cell.i = first? 0 : x + CELLBOX / 2; + cell.j = first? 0 : y + CELLBOX / 2; return cell; } @@ -453,35 +483,35 @@ Cell Life::FindEast() // argument (or pass 0, the default value) to post alive cells // only, else it will post cells which have changed. // -void Life::DoLine(wxInt32 i, wxInt32 j, wxUint32 live, wxUint32 old) +void Life::DoLine(wxInt32 x, wxInt32 y, wxUint32 live, wxUint32 old) { wxUint32 diff = (live ^ old) & 0xff; if (!diff) return; - for (wxInt32 k = 8; k; k--, i++) + for (wxInt32 k = 8; k; k--, x++) { if (diff & 0x01) { - m_cells[m_ncells].i = i; - m_cells[m_ncells].j = j; + m_cells[m_ncells].i = x; + m_cells[m_ncells].j = y; m_ncells++; } diff >>= 1; } } -void Life::BeginFind(wxInt32 i0, wxInt32 j0, wxInt32 i1, wxInt32 j1, bool changed) +void Life::BeginFind(wxInt32 x0, wxInt32 y0, wxInt32 x1, wxInt32 y1, bool changed) { // TODO: optimize for the case where the maximum number of // cellboxes that fit in the specified viewport is smaller // than the current total of boxes; iterating over the list // should then be faster than searching in the hash table. - m_i0 = m_i = i0 & 0xfffffff8; - m_j0 = m_j = j0 & 0xfffffff8; - m_i1 = (i1 + 7) & 0xfffffff8; - m_j1 = (j1 + 7) & 0xfffffff8; + m_x0 = m_x = x0 & 0xfffffff8; + m_y0 = m_y = y0 & 0xfffffff8; + m_x1 = (x1 + 7) & 0xfffffff8; + m_y1 = (y1 + 7) & 0xfffffff8; m_findmore = TRUE; m_changed = changed; @@ -495,10 +525,10 @@ bool Life::FindMore(Cell *cells[], size_t *ncells) if (m_changed) { - for ( ; m_j <= m_j1; m_j += 8, m_i = m_i0) - for ( ; m_i <= m_i1; m_i += 8) + for ( ; m_y <= m_y1; m_y += 8, m_x = m_x0) + for ( ; m_x <= m_x1; m_x += 8) { - if ((c = LinkBox(m_i, m_j, FALSE)) == NULL) + if ((c = LinkBox(m_x, m_y, FALSE)) == NULL) continue; // check whether there is enough space left in the array @@ -508,22 +538,22 @@ bool Life::FindMore(Cell *cells[], size_t *ncells) return FALSE; } - DoLine(m_i, m_j , c->m_live1, c->m_old1 ); - DoLine(m_i, m_j + 1, c->m_live1 >> 8, c->m_old1 >> 8 ); - DoLine(m_i, m_j + 2, c->m_live1 >> 16, c->m_old1 >> 16); - DoLine(m_i, m_j + 3, c->m_live1 >> 24, c->m_old1 >> 24); - DoLine(m_i, m_j + 4, c->m_live2, c->m_old2 ); - DoLine(m_i, m_j + 5, c->m_live2 >> 8, c->m_old2 >> 8 ); - DoLine(m_i, m_j + 6, c->m_live2 >> 16, c->m_old2 >> 16); - DoLine(m_i, m_j + 7, c->m_live2 >> 24, c->m_old2 >> 24); + DoLine(m_x, m_y , c->m_live1, c->m_old1 ); + DoLine(m_x, m_y + 1, c->m_live1 >> 8, c->m_old1 >> 8 ); + DoLine(m_x, m_y + 2, c->m_live1 >> 16, c->m_old1 >> 16); + DoLine(m_x, m_y + 3, c->m_live1 >> 24, c->m_old1 >> 24); + DoLine(m_x, m_y + 4, c->m_live2, c->m_old2 ); + DoLine(m_x, m_y + 5, c->m_live2 >> 8, c->m_old2 >> 8 ); + DoLine(m_x, m_y + 6, c->m_live2 >> 16, c->m_old2 >> 16); + DoLine(m_x, m_y + 7, c->m_live2 >> 24, c->m_old2 >> 24); } } else { - for ( ; m_j <= m_j1; m_j += 8, m_i = m_i0) - for ( ; m_i <= m_i1; m_i += 8) + for ( ; m_y <= m_y1; m_y += 8, m_x = m_x0) + for ( ; m_x <= m_x1; m_x += 8) { - if ((c = LinkBox(m_i, m_j, FALSE)) == NULL) + if ((c = LinkBox(m_x, m_y, FALSE)) == NULL) continue; // check whether there is enough space left in the array @@ -533,14 +563,14 @@ bool Life::FindMore(Cell *cells[], size_t *ncells) return FALSE; } - DoLine(m_i, m_j , c->m_live1 ); - DoLine(m_i, m_j + 1, c->m_live1 >> 8 ); - DoLine(m_i, m_j + 2, c->m_live1 >> 16); - DoLine(m_i, m_j + 3, c->m_live1 >> 24); - DoLine(m_i, m_j + 4, c->m_live2 ); - DoLine(m_i, m_j + 5, c->m_live2 >> 8 ); - DoLine(m_i, m_j + 6, c->m_live2 >> 16); - DoLine(m_i, m_j + 7, c->m_live2 >> 24); + DoLine(m_x, m_y , c->m_live1 ); + DoLine(m_x, m_y + 1, c->m_live1 >> 8 ); + DoLine(m_x, m_y + 2, c->m_live1 >> 16); + DoLine(m_x, m_y + 3, c->m_live1 >> 24); + DoLine(m_x, m_y + 4, c->m_live2 ); + DoLine(m_x, m_y + 5, c->m_live2 >> 8 ); + DoLine(m_x, m_y + 6, c->m_live2 >> 16); + DoLine(m_x, m_y + 7, c->m_live2 >> 24); } } diff --git a/demos/life/game.h b/demos/life/game.h index f88644cb9b..cca12fae4b 100644 --- a/demos/life/game.h +++ b/demos/life/game.h @@ -29,45 +29,44 @@ #endif // -------------------------------------------------------------------------- -// Cell -// -------------------------------------------------------------------------- - -// A Cell is just a struct which contains a pair of (i, j) coords. -// These structs are not used internally anywhere; they are just -// used to pass cell coordinates around. - -struct Cell -{ - wxInt32 i; - wxInt32 j; -}; - -// -------------------------------------------------------------------------- -// LifeShape +// LifePattern // -------------------------------------------------------------------------- // A class which holds a pattern -class LifeShape +class LifePattern { public: - LifeShape(wxString name, - wxString desc, - int width, - int height, - char *data) + // This ctor is used by the LifeReader class + LifePattern(wxString name, + wxString description, + wxString rules, + wxArrayString shape) { - m_name = name; - m_desc = desc; - m_width = width; - m_height = height; - m_data = data; - } + m_name = name; + m_description = description; + m_rules = rules; + m_shape = shape; + }; + + // A more convenient ctor for the built-in samples + LifePattern(wxString name, + wxString description, + int width, + int height, + const char *shape) + { + m_name = name; + m_description = description; + m_rules = _(""); + m_shape.Add( wxString::Format("%i %i", -width/2, -height/2) ); + for(int j = 0; j < height; j++) + m_shape.Add( wxString(shape + (j * width), (size_t) width) ); + }; - wxString m_name; - wxString m_desc; - int m_width; - int m_height; - char *m_data; + wxString m_name; + wxString m_description; + wxString m_rules; + wxArrayString m_shape; }; @@ -75,8 +74,17 @@ public: // Life // -------------------------------------------------------------------------- +// A struct used to pass cell coordinates around +struct Cell +{ + wxInt32 i; + wxInt32 j; +}; + +// A private class that contains data about a block of cells class CellBox; +// A class that models a Life game instance class Life { public: @@ -85,10 +93,12 @@ public: ~Life(); // accessors - inline wxUint32 GetNumCells() const { return m_numcells; }; - bool IsAlive (wxInt32 x, wxInt32 y); - void SetCell (wxInt32 x, wxInt32 y, bool alive = TRUE); - void SetShape (const LifeShape &shape); + inline wxUint32 GetNumCells() const { return m_numcells; }; + inline wxString GetRules() const { return m_rules; }; + inline wxString GetDescription() const { return m_description; }; + bool IsAlive(wxInt32 x, wxInt32 y); + void SetCell(wxInt32 x, wxInt32 y, bool alive = TRUE); + void SetPattern(const LifePattern &pattern); // game control void Clear(); @@ -119,8 +129,8 @@ public: // FALSE, then the operation is not complete: just process all cells // and call FillMore() again. // - void BeginFind(wxInt32 i0, wxInt32 j0, - wxInt32 i1, wxInt32 j1, + void BeginFind(wxInt32 x0, wxInt32 y0, + wxInt32 x1, wxInt32 y1, bool changed); bool FindMore(Cell *cells[], size_t *ncells); @@ -131,20 +141,28 @@ private: void KillBox(CellBox *c); // helper for BeginFind & FindMore - void DoLine(wxInt32 i, wxInt32 j, wxUint32 alive, wxUint32 old = 0); + void DoLine(wxInt32 x, wxInt32 y, wxUint32 alive, wxUint32 old = 0); - CellBox *m_head; // list of alive boxes - CellBox *m_available; // list of reusable dead boxes - CellBox **m_boxes; // hash table of alive boxes - wxUint32 m_numcells; // population (number of alive cells) - Cell *m_cells; // cell array for FindMore() - size_t m_ncells; // number of valid cells in cell array - wxInt32 m_i, m_j, // state vars for FindMore() - m_i0, m_j0, - m_i1, m_j1; - bool m_changed; - bool m_findmore; + // pattern description + wxString m_name; // name (currently unused) + wxString m_rules; // rules (currently unused) + wxString m_description; // description + + // pattern data + CellBox *m_head; // list of alive boxes + CellBox *m_available; // list of reusable dead boxes + CellBox **m_boxes; // hash table of alive boxes + wxUint32 m_numcells; // population (number of alive cells) + + // state vars for BeginFind & FindMore + Cell *m_cells; // array of cells + size_t m_ncells; // number of valid entries in m_cells + wxInt32 m_x, m_y, // counters and search mode + m_x0, m_y0, + m_x1, m_y1; + bool m_changed; + bool m_findmore; }; #endif // _LIFE_GAME_H_ diff --git a/demos/life/life.cpp b/demos/life/life.cpp index 8b29dca570..d466aa37ed 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -29,10 +29,13 @@ #endif #include "wx/statline.h" +#include "wx/wfstream.h" +#include "wx/filedlg.h" #include "life.h" #include "game.h" #include "dialogs.h" +#include "reader.h" // -------------------------------------------------------------------------- // resources @@ -44,10 +47,12 @@ // bitmap buttons for the toolbar #include "bitmaps/reset.xpm" + #include "bitmaps/open.xpm" #include "bitmaps/play.xpm" #include "bitmaps/stop.xpm" #include "bitmaps/zoomin.xpm" #include "bitmaps/zoomout.xpm" + #include "bitmaps/info.xpm" // navigator #include "bitmaps/north.xpm" @@ -67,22 +72,14 @@ enum // timer ID_TIMER = 1001, - // menu items and toolbar buttons - ID_RESET, + // file menu + ID_NEW, + ID_OPEN, ID_SAMPLES, ID_ABOUT, ID_EXIT, - ID_START, - ID_STEP, - ID_STOP, - ID_ZOOMIN, - ID_ZOOMOUT, - ID_TOPSPEED, - // speed selection slider - ID_SLIDER, - - // navigation + // view menu ID_SHOWNAV, ID_ORIGIN, ID_CENTER, @@ -90,6 +87,18 @@ enum ID_SOUTH, ID_EAST, ID_WEST, + ID_ZOOMIN, + ID_ZOOMOUT, + ID_INFO, + + // game menu + ID_START, + ID_STEP, + ID_STOP, + ID_TOPSPEED, + + // speed selection slider + ID_SLIDER, }; // -------------------------------------------------------------------------- @@ -98,14 +107,11 @@ enum // Event tables BEGIN_EVENT_TABLE(LifeFrame, wxFrame) + EVT_MENU (ID_NEW, LifeFrame::OnMenu) + EVT_MENU (ID_OPEN, LifeFrame::OnOpen) EVT_MENU (ID_SAMPLES, LifeFrame::OnSamples) - EVT_MENU (ID_RESET, LifeFrame::OnMenu) EVT_MENU (ID_ABOUT, LifeFrame::OnMenu) EVT_MENU (ID_EXIT, LifeFrame::OnMenu) - EVT_MENU (ID_START, LifeFrame::OnMenu) - EVT_MENU (ID_STEP, LifeFrame::OnMenu) - EVT_MENU (ID_STOP, LifeFrame::OnMenu) - EVT_MENU (ID_TOPSPEED, LifeFrame::OnMenu) EVT_MENU (ID_SHOWNAV, LifeFrame::OnMenu) EVT_MENU (ID_ORIGIN, LifeFrame::OnNavigate) EVT_BUTTON (ID_CENTER, LifeFrame::OnNavigate) @@ -115,6 +121,11 @@ BEGIN_EVENT_TABLE(LifeFrame, wxFrame) EVT_BUTTON (ID_WEST, LifeFrame::OnNavigate) EVT_MENU (ID_ZOOMIN, LifeFrame::OnZoom) EVT_MENU (ID_ZOOMOUT, LifeFrame::OnZoom) + EVT_MENU (ID_INFO, LifeFrame::OnMenu) + EVT_MENU (ID_START, LifeFrame::OnMenu) + EVT_MENU (ID_STEP, LifeFrame::OnMenu) + EVT_MENU (ID_STOP, LifeFrame::OnMenu) + EVT_MENU (ID_TOPSPEED, LifeFrame::OnMenu) EVT_COMMAND_SCROLL (ID_SLIDER, LifeFrame::OnSlider) EVT_TIMER (ID_TIMER, LifeFrame::OnTimer) EVT_CLOSE ( LifeFrame::OnClose) @@ -128,7 +139,10 @@ BEGIN_EVENT_TABLE(LifeCanvas, wxWindow) EVT_PAINT ( LifeCanvas::OnPaint) EVT_SCROLLWIN ( LifeCanvas::OnScroll) EVT_SIZE ( LifeCanvas::OnSize) - EVT_MOUSE_EVENTS ( LifeCanvas::OnMouse) + EVT_MOTION ( LifeCanvas::OnMouse) + EVT_LEFT_DOWN ( LifeCanvas::OnMouse) + EVT_LEFT_UP ( LifeCanvas::OnMouse) + EVT_LEFT_DCLICK ( LifeCanvas::OnMouse) EVT_ERASE_BACKGROUND( LifeCanvas::OnEraseBackground) END_EVENT_TABLE() @@ -142,7 +156,7 @@ IMPLEMENT_APP(LifeApp) // ========================================================================== // some shortcuts -#define ADD_TOOL(id, bmp, tooltip, help) \ +#define ADD_TOOL(id, bmp, tooltip, help) \ toolBar->AddTool(id, bmp, wxNullBitmap, FALSE, -1, -1, (wxObject *)0, tooltip, help) @@ -184,32 +198,34 @@ LifeFrame::LifeFrame() : wxFrame((wxFrame *)0, -1, _("Life!"), wxPoint(200, 200) wxMenu *menuView = new wxMenu("", wxMENU_TEAROFF); wxMenu *menuGame = new wxMenu("", wxMENU_TEAROFF); - menuFile->Append(ID_RESET, _("Reset"), _("Start a new game")); - menuFile->Append(ID_SAMPLES, _("Sample game..."), _("Select a sample configuration")); + menuFile->Append(ID_NEW, _("&New"), _("Start a new game")); + menuFile->Append(ID_OPEN, _("&Open..."), _("Open an existing Life pattern")); + menuFile->Append(ID_SAMPLES, _("&Sample game..."), _("Select a sample configuration")); menuFile->AppendSeparator(); menuFile->Append(ID_ABOUT, _("&About...\tCtrl-A"), _("Show about dialog")); menuFile->AppendSeparator(); menuFile->Append(ID_EXIT, _("E&xit\tAlt-X"), _("Quit this program")); - menuView->Append(ID_SHOWNAV, _("Navigation toolbox"), _("Show or hide toolbox"), TRUE); + menuView->Append(ID_SHOWNAV, _("Navigation &toolbox"), _("Show or hide toolbox"), TRUE); menuView->Check (ID_SHOWNAV, TRUE); menuView->AppendSeparator(); - menuView->Append(ID_ORIGIN, _("Absolute origin"), _("Go to (0, 0)")); - menuView->Append(ID_CENTER, _("Center of mass"), _("Find center of mass")); - menuView->Append(ID_NORTH, _("North"), _("Find northernmost cell")); - menuView->Append(ID_SOUTH, _("South"), _("Find southernmost cell")); - menuView->Append(ID_EAST, _("East"), _("Find easternmost cell")); - menuView->Append(ID_WEST, _("West"), _("Find westernmost cell")); + menuView->Append(ID_ORIGIN, _("&Absolute origin"), _("Go to (0, 0)")); + menuView->Append(ID_CENTER, _("&Center of mass"), _("Find center of mass")); + menuView->Append(ID_NORTH, _("&North"), _("Find northernmost cell")); + menuView->Append(ID_SOUTH, _("&South"), _("Find southernmost cell")); + menuView->Append(ID_EAST, _("&East"), _("Find easternmost cell")); + menuView->Append(ID_WEST, _("&West"), _("Find westernmost cell")); menuView->AppendSeparator(); - menuView->Append(ID_ZOOMIN, _("Zoom &in\tCtrl-I")); - menuView->Append(ID_ZOOMOUT, _("Zoom &out\tCtrl-O")); + menuView->Append(ID_ZOOMIN, _("Zoom &in\tCtrl-I"), _("Zoom in")); + menuView->Append(ID_ZOOMOUT, _("Zoom &out\tCtrl-O"), _("Zoom out")); + menuView->Append(ID_INFO, _("&Description...\tCtrl-D"), _("View pattern description")); menuGame->Append(ID_START, _("&Start\tCtrl-S"), _("Start")); menuGame->Append(ID_STEP, _("&Next\tCtrl-N"), _("Single step")); menuGame->Append(ID_STOP, _("S&top\tCtrl-T"), _("Stop")); menuGame->Enable(ID_STOP, FALSE); menuGame->AppendSeparator(); - menuGame->Append(ID_TOPSPEED, _("Top speed!"), _("Go as fast as possible")); + menuGame->Append(ID_TOPSPEED, _("T&op speed!"), _("Go as fast as possible")); wxMenuBar *menuBar = new wxMenuBar(); menuBar->Append(menuFile, _("&File")); @@ -218,23 +234,30 @@ LifeFrame::LifeFrame() : wxFrame((wxFrame *)0, -1, _("Life!"), wxPoint(200, 200) SetMenuBar(menuBar); // tool bar - wxBitmap tbBitmaps[5]; + wxBitmap tbBitmaps[7]; tbBitmaps[0] = wxBITMAP(reset); - tbBitmaps[1] = wxBITMAP(play); - tbBitmaps[2] = wxBITMAP(stop); - tbBitmaps[3] = wxBITMAP(zoomin); - tbBitmaps[4] = wxBITMAP(zoomout); + tbBitmaps[1] = wxBITMAP(open); + tbBitmaps[2] = wxBITMAP(zoomin); + tbBitmaps[3] = wxBITMAP(zoomout); + tbBitmaps[4] = wxBITMAP(info); + tbBitmaps[5] = wxBITMAP(play); + tbBitmaps[6] = wxBITMAP(stop); wxToolBar *toolBar = CreateToolBar(); toolBar->SetMargins(5, 5); toolBar->SetToolBitmapSize(wxSize(16, 16)); - ADD_TOOL(ID_RESET, tbBitmaps[0], _("Reset"), _("Start a new game")); - ADD_TOOL(ID_START, tbBitmaps[1], _("Start"), _("Start")); - ADD_TOOL(ID_STOP, tbBitmaps[2], _("Stop"), _("Stop")); + + ADD_TOOL(ID_NEW, tbBitmaps[0], _("New"), _("Start a new game")); + ADD_TOOL(ID_OPEN, tbBitmaps[1], _("Open"), _("Open an existing Life pattern")); toolBar->AddSeparator(); - ADD_TOOL(ID_ZOOMIN, tbBitmaps[3], _("Zoom in"), _("Zoom in")); - ADD_TOOL(ID_ZOOMOUT, tbBitmaps[4], _("Zoom out"), _("Zoom out")); + ADD_TOOL(ID_ZOOMIN, tbBitmaps[2], _("Zoom in"), _("Zoom in")); + ADD_TOOL(ID_ZOOMOUT, tbBitmaps[3], _("Zoom out"), _("Zoom out")); + ADD_TOOL(ID_INFO, tbBitmaps[4], _("Description"), _("Show description")); + toolBar->AddSeparator(); + ADD_TOOL(ID_START, tbBitmaps[5], _("Start"), _("Start")); + ADD_TOOL(ID_STOP, tbBitmaps[6], _("Stop"), _("Stop")); + toolBar->Realize(); toolBar->EnableTool(ID_STOP, FALSE); // must be after Realize() ! @@ -263,16 +286,16 @@ LifeFrame::LifeFrame() : wxFrame((wxFrame *)0, -1, _("Life!"), wxPoint(200, 200) // info panel m_text = new wxStaticText(panel2, -1, - wxEmptyString, - wxDefaultPosition, - wxDefaultSize, - wxALIGN_CENTER | wxST_NO_AUTORESIZE); + wxEmptyString, + wxDefaultPosition, + wxDefaultSize, + wxALIGN_CENTER | wxST_NO_AUTORESIZE); wxSlider *slider = new wxSlider(panel2, ID_SLIDER, - 5, 1, 10, - wxDefaultPosition, - wxSize(200, -1), - wxSL_HORIZONTAL | wxSL_AUTOTICKS); + 5, 1, 10, + wxDefaultPosition, + wxSize(200, -1), + wxSL_HORIZONTAL | wxSL_AUTOTICKS); UpdateInfoText(); @@ -318,9 +341,9 @@ void LifeFrame::UpdateInfoText() wxString msg; msg.Printf(_(" Generation: %u (T: %u ms), Population: %u "), - m_tics, - m_topspeed? 0 : m_interval, - m_life->GetNumCells()); + m_tics, + m_topspeed? 0 : m_interval, + m_life->GetNumCells()); m_text->SetLabel(msg); } @@ -344,65 +367,99 @@ void LifeFrame::UpdateUI() GetMenuBar()->GetMenu(1)->Enable(ID_ZOOMOUT, cellsize > 1); } -// event handlers +// Event handlers ----------------------------------------------------------- + +// OnMenu handles all events which don't have their own event handler void LifeFrame::OnMenu(wxCommandEvent& event) { switch (event.GetId()) { - case ID_START : OnStart(); break; - case ID_STEP : OnStep(); break; - case ID_STOP : OnStop(); break; - case ID_SHOWNAV : - { - bool checked = GetMenuBar()->GetMenu(1)->IsChecked(ID_SHOWNAV); - m_navigator->Show(checked); - break; - } - case ID_TOPSPEED: - { - m_running = TRUE; - m_topspeed = TRUE; - UpdateUI(); - while (m_running && m_topspeed) - { - OnStep(); - wxYield(); - } - break; - } - case ID_RESET: - { - // stop if it was running - OnStop(); - m_life->Clear(); - m_canvas->Recenter(0, 0); - m_tics = 0; - UpdateInfoText(); - break; - } - case ID_ABOUT: - { - LifeAboutDialog dialog(this); - dialog.ShowModal(); - break; - } - case ID_EXIT : - { - // TRUE is to force the frame to close - Close(TRUE); - break; - } + case ID_NEW: + { + // stop if it was running + OnStop(); + m_life->Clear(); + m_canvas->Recenter(0, 0); + m_tics = 0; + UpdateInfoText(); + break; + } + case ID_ABOUT: + { + LifeAboutDialog dialog(this); + dialog.ShowModal(); + break; + } + case ID_EXIT: + { + // TRUE is to force the frame to close + Close(TRUE); + break; + } + case ID_SHOWNAV : + { + bool checked = GetMenuBar()->GetMenu(1)->IsChecked(ID_SHOWNAV); + m_navigator->Show(checked); + break; + } + case ID_INFO: + { + wxString desc = m_life->GetDescription(); + + if ( desc.IsEmpty() ) + desc = _("Not available"); + + // should we make the description editable here? + wxMessageBox(desc, _("Description"), wxOK | wxICON_INFORMATION); + + break; + } + case ID_START : OnStart(); break; + case ID_STEP : OnStep(); break; + case ID_STOP : OnStop(); break; + case ID_TOPSPEED: + { + m_running = TRUE; + m_topspeed = TRUE; + UpdateUI(); + while (m_running && m_topspeed) + { + OnStep(); + wxYield(); + } + break; + } } } -void LifeFrame::OnClose(wxCloseEvent& WXUNUSED(event)) +void LifeFrame::OnOpen(wxCommandEvent& WXUNUSED(event)) { - // Stop if it was running; this is absolutely needed because - // the frame won't be actually destroyed until there are no - // more pending events, and this in turn won't ever happen - // if the timer is running faster than the window can redraw. - OnStop(); - Destroy(); + wxFileDialog filedlg(this, + _("Choose a file to open"), + _(""), + _(""), + _("Life patterns (*.lif)|*.lif|All files (*.*)|*.*"), + wxOPEN | wxFILE_MUST_EXIST); + + if (filedlg.ShowModal() == wxID_OK) + { + wxFileInputStream stream(filedlg.GetPath()); + LifeReader reader(stream); + + // the reader handles errors itself, no need to do anything here + if (reader.IsOk()) + { + // stop if running and put the pattern + OnStop(); + m_life->Clear(); + m_life->SetPattern(reader.GetPattern()); + + // recenter canvas + m_canvas->Recenter(0, 0); + m_tics = 0; + UpdateInfoText(); + } + } } void LifeFrame::OnSamples(wxCommandEvent& WXUNUSED(event)) @@ -415,16 +472,16 @@ void LifeFrame::OnSamples(wxCommandEvent& WXUNUSED(event)) if (dialog.ShowModal() == wxID_OK) { - const LifeShape shape = dialog.GetShape(); + const LifePattern pattern = dialog.GetPattern(); - // put the shape - m_life->Clear(); - m_life->SetShape(shape); + // put the pattern + m_life->Clear(); + m_life->SetPattern(pattern); - // recenter canvas - m_canvas->Recenter(0, 0); - m_tics = 0; - UpdateInfoText(); + // recenter canvas + m_canvas->Recenter(0, 0); + m_tics = 0; + UpdateInfoText(); } } @@ -434,13 +491,13 @@ void LifeFrame::OnZoom(wxCommandEvent& event) if ((event.GetId() == ID_ZOOMIN) && cellsize < 32) { - m_canvas->SetCellSize(cellsize * 2); - UpdateUI(); + m_canvas->SetCellSize(cellsize * 2); + UpdateUI(); } else if ((event.GetId() == ID_ZOOMOUT) && cellsize > 1) { - m_canvas->SetCellSize(cellsize / 2); - UpdateUI(); + m_canvas->SetCellSize(cellsize / 2); + UpdateUI(); } } @@ -450,12 +507,12 @@ void LifeFrame::OnNavigate(wxCommandEvent& event) switch (event.GetId()) { - case ID_NORTH: c = m_life->FindNorth(); break; - case ID_SOUTH: c = m_life->FindSouth(); break; - case ID_WEST: c = m_life->FindWest(); break; - case ID_EAST: c = m_life->FindEast(); break; - case ID_CENTER: c = m_life->FindCenter(); break; - case ID_ORIGIN: c.i = c.j = 0; break; + case ID_NORTH: c = m_life->FindNorth(); break; + case ID_SOUTH: c = m_life->FindSouth(); break; + case ID_WEST: c = m_life->FindWest(); break; + case ID_EAST: c = m_life->FindEast(); break; + case ID_CENTER: c = m_life->FindCenter(); break; + case ID_ORIGIN: c.i = c.j = 0; break; } m_canvas->Recenter(c.i, c.j); @@ -467,8 +524,8 @@ void LifeFrame::OnSlider(wxScrollEvent& event) if (m_running) { - OnStop(); - OnStart(); + OnStop(); + OnStart(); } UpdateInfoText(); @@ -479,13 +536,23 @@ void LifeFrame::OnTimer(wxTimerEvent& WXUNUSED(event)) OnStep(); } +void LifeFrame::OnClose(wxCloseEvent& WXUNUSED(event)) +{ + // Stop if it was running; this is absolutely needed because + // the frame won't be actually destroyed until there are no + // more pending events, and this in turn won't ever happen + // if the timer is running faster than the window can redraw. + OnStop(); + Destroy(); +} + void LifeFrame::OnStart() { if (!m_running) { - m_timer->Start(m_interval); - m_running = TRUE; - UpdateUI(); + m_timer->Start(m_interval); + m_running = TRUE; + UpdateUI(); } } @@ -493,19 +560,19 @@ void LifeFrame::OnStop() { if (m_running) { - m_timer->Stop(); - m_running = FALSE; - m_topspeed = FALSE; - UpdateUI(); + m_timer->Stop(); + m_running = FALSE; + m_topspeed = FALSE; + UpdateUI(); } } void LifeFrame::OnStep() { if (m_life->NextTic()) - m_tics++; + m_tics++; else - OnStop(); + OnStop(); m_canvas->DrawChanged(); UpdateInfoText(); @@ -517,11 +584,11 @@ void LifeFrame::OnStep() // -------------------------------------------------------------------------- LifeNavigator::LifeNavigator(wxWindow *parent) - : wxMiniFrame(parent, -1, - _("Navigation"), - wxDefaultPosition, - wxDefaultSize, - wxCAPTION | wxSIMPLE_BORDER) + : wxMiniFrame(parent, -1, + _("Navigation"), + wxDefaultPosition, + wxDefaultSize, + wxCAPTION | wxSIMPLE_BORDER) { wxPanel *panel = new wxPanel(this, -1); wxBoxSizer *sizer1 = new wxBoxSizer(wxVERTICAL); @@ -529,11 +596,11 @@ LifeNavigator::LifeNavigator(wxWindow *parent) // create bitmaps and masks for the buttons wxBitmap - bmpn = wxBITMAP(north), - bmpw = wxBITMAP(west), - bmpc = wxBITMAP(center), - bmpe = wxBITMAP(east), - bmps = wxBITMAP(south); + bmpn = wxBITMAP(north), + bmpw = wxBITMAP(west), + bmpc = wxBITMAP(center), + bmpe = wxBITMAP(east), + bmps = wxBITMAP(south); #if !defined(__WXGTK__) && !defined(__WXMOTIF__) bmpn.SetMask(new wxMask(bmpn, *wxLIGHT_GREY)); @@ -545,11 +612,11 @@ LifeNavigator::LifeNavigator(wxWindow *parent) // create the buttons and attach tooltips to them wxBitmapButton - *bn = new wxBitmapButton(panel, ID_NORTH, bmpn), - *bw = new wxBitmapButton(panel, ID_WEST , bmpw), - *bc = new wxBitmapButton(panel, ID_CENTER, bmpc), - *be = new wxBitmapButton(panel, ID_EAST , bmpe), - *bs = new wxBitmapButton(panel, ID_SOUTH, bmps); + *bn = new wxBitmapButton(panel, ID_NORTH, bmpn), + *bw = new wxBitmapButton(panel, ID_WEST , bmpw), + *bc = new wxBitmapButton(panel, ID_CENTER, bmpc), + *be = new wxBitmapButton(panel, ID_EAST , bmpe), + *bs = new wxBitmapButton(panel, ID_SOUTH, bmps); #if wxUSE_TOOLTIPS bn->SetToolTip(_("Find northernmost cell")); @@ -577,9 +644,9 @@ LifeNavigator::LifeNavigator(wxWindow *parent) wxRect parentRect = parent->GetRect(); wxSize childSize = GetSize(); int x = parentRect.GetX() + - parentRect.GetWidth(); + parentRect.GetWidth(); int y = parentRect.GetY() + - (parentRect.GetHeight() - childSize.GetHeight()) / 4; + (parentRect.GetHeight() - childSize.GetHeight()) / 4; Move(x, y); // done @@ -590,9 +657,9 @@ void LifeNavigator::OnClose(wxCloseEvent& event) { // avoid if we can if (event.CanVeto()) - event.Veto(); + event.Veto(); else - Destroy(); + Destroy(); } @@ -602,8 +669,8 @@ void LifeNavigator::OnClose(wxCloseEvent& event) // canvas constructor LifeCanvas::LifeCanvas(wxWindow *parent, Life *life, bool interactive) - : wxWindow(parent, -1, wxPoint(0, 0), wxSize(100, 100), - wxSUNKEN_BORDER) + : wxWindow(parent, -1, wxPoint(0, 0), wxSize(100, 100), + wxSUNKEN_BORDER) { m_life = life; m_interactive = interactive; @@ -615,7 +682,7 @@ LifeCanvas::LifeCanvas(wxWindow *parent, Life *life, bool interactive) m_viewportW = 0; if (m_interactive) - SetCursor(*wxCROSS_CURSOR); + SetCursor(*wxCROSS_CURSOR); // reduce flicker if wxEVT_ERASE_BACKGROUND is not available SetBackgroundColour(*wxWHITE); @@ -658,10 +725,10 @@ void LifeCanvas::SetCellSize(int cellsize) // adjust scrollbars if (m_interactive) { - SetScrollbar(wxHORIZONTAL, m_viewportW, m_viewportW, 3 * m_viewportW); - SetScrollbar(wxVERTICAL, m_viewportH, m_viewportH, 3 * m_viewportH); - m_thumbX = m_viewportW; - m_thumbY = m_viewportH; + SetScrollbar(wxHORIZONTAL, m_viewportW, m_viewportW, 3 * m_viewportW); + SetScrollbar(wxVERTICAL, m_viewportH, m_viewportH, 3 * m_viewportH); + m_thumbX = m_viewportW; + m_thumbY = m_viewportH; } Refresh(FALSE); @@ -688,14 +755,14 @@ void LifeCanvas::DrawCell(wxInt32 i, wxInt32 j, wxDC &dc) // if cellsize is 1 or 2, there will be no grid switch (m_cellsize) { - case 1: - dc.DrawPoint(x, y); - break; - case 2: - dc.DrawRectangle(x, y, 2, 2); - break; - default: - dc.DrawRectangle(x + 1, y + 1, m_cellsize - 1, m_cellsize - 1); + case 1: + dc.DrawPoint(x, y); + break; + case 2: + dc.DrawRectangle(x, y, 2, 2); + break; + default: + dc.DrawRectangle(x + 1, y + 1, m_cellsize - 1, m_cellsize - 1); } } @@ -709,30 +776,30 @@ void LifeCanvas::DrawChanged() bool done = FALSE; m_life->BeginFind(m_viewportX, - m_viewportY, - m_viewportX + m_viewportW, - m_viewportY + m_viewportH, - TRUE); + m_viewportY, + m_viewportX + m_viewportW, + m_viewportY + m_viewportH, + TRUE); dc.BeginDrawing(); if (m_cellsize == 1) { - dc.SetPen(*wxBLACK_PEN); + dc.SetPen(*wxBLACK_PEN); } else { - dc.SetPen(*wxTRANSPARENT_PEN); - dc.SetBrush(*wxBLACK_BRUSH); + dc.SetPen(*wxTRANSPARENT_PEN); + dc.SetBrush(*wxBLACK_BRUSH); } dc.SetLogicalFunction(wxINVERT); while (!done) { - done = m_life->FindMore(&cells, &ncells); + done = m_life->FindMore(&cells, &ncells); - for (size_t m = 0; m < ncells; m++) - DrawCell(cells[m].i, cells[m].j, dc); + for (size_t m = 0; m < ncells; m++) + DrawCell(cells[m].i, cells[m].j, dc); } dc.EndDrawing(); } @@ -775,16 +842,16 @@ void LifeCanvas::OnPaint(wxPaintEvent& event) } else { - x = CellToX(i0); - y = CellToY(j0); - w = CellToX(i1 + 1) - x + 1; - h = CellToY(j1 + 1) - y + 1; + x = CellToX(i0); + y = CellToY(j0); + w = CellToX(i1 + 1) - x + 1; + h = CellToY(j1 + 1) - y + 1; - dc.SetPen(*wxLIGHT_GREY_PEN); - for (wxInt32 yy = y; yy <= (y + h - m_cellsize); yy += m_cellsize) - dc.DrawRectangle(x, yy, w, m_cellsize + 1); - for (wxInt32 xx = x; xx <= (x + w - m_cellsize); xx += m_cellsize) - dc.DrawLine(xx, y, xx, y + h); + dc.SetPen(*wxLIGHT_GREY_PEN); + for (wxInt32 yy = y; yy <= (y + h - m_cellsize); yy += m_cellsize) + dc.DrawRectangle(x, yy, w, m_cellsize + 1); + for (wxInt32 xx = x; xx <= (x + w - m_cellsize); xx += m_cellsize) + dc.DrawLine(xx, y, xx, y + h); } // draw all alive cells @@ -793,15 +860,15 @@ void LifeCanvas::OnPaint(wxPaintEvent& event) while (!done) { - for (size_t m = 0; m < ncells; m++) - DrawCell(cells[m].i, cells[m].j, dc); + for (size_t m = 0; m < ncells; m++) + DrawCell(cells[m].i, cells[m].j, dc); - done = m_life->FindMore(&cells, &ncells); + done = m_life->FindMore(&cells, &ncells); } // last set for (size_t m = 0; m < ncells; m++) - DrawCell(cells[m].i, cells[m].j, dc); + DrawCell(cells[m].i, cells[m].j, dc); dc.EndDrawing(); } @@ -809,7 +876,7 @@ void LifeCanvas::OnPaint(wxPaintEvent& event) void LifeCanvas::OnMouse(wxMouseEvent& event) { if (!m_interactive) - return; + return; // which cell are we pointing at? wxInt32 i = XToCell( event.GetX() ); @@ -820,90 +887,98 @@ void LifeCanvas::OnMouse(wxMouseEvent& event) msg.Printf(_("Cell: (%d, %d)"), i, j); ((LifeFrame *) wxGetApp().GetTopWindow())->SetStatusText(msg, 1); - // button pressed? + // NOTE that wxMouseEvent::LeftDown() and wxMouseEvent::LeftIsDown() + // have different semantics. The first one is used to signal that the + // button was just pressed (i.e., in "button down" events); the second + // one just describes the current status of the button, independently + // of the mouse event type. LeftIsDown is typically used in "mouse + // move" events, to test if the button is _still_ pressed. + + // is the button down? if (!event.LeftIsDown()) { - m_status = MOUSE_NOACTION; - return; + m_status = MOUSE_NOACTION; + return; } - // button just pressed? - if (m_status == MOUSE_NOACTION) + // was it pressed just now? + if (event.LeftDown()) { - // yes, update status and toggle this cell - m_status = (m_life->IsAlive(i, j)? MOUSE_ERASING : MOUSE_DRAWING); - - m_mi = i; - m_mj = j; - m_life->SetCell(i, j, m_status == MOUSE_DRAWING); - DrawCell(i, j, m_status == MOUSE_DRAWING); + // yes: start a new action and toggle this cell + m_status = (m_life->IsAlive(i, j)? MOUSE_ERASING : MOUSE_DRAWING); + + m_mi = i; + m_mj = j; + m_life->SetCell(i, j, m_status == MOUSE_DRAWING); + DrawCell(i, j, m_status == MOUSE_DRAWING); } else if ((m_mi != i) || (m_mj != j)) { - bool alive = (m_status == MOUSE_DRAWING); + // no: continue ongoing action + bool alive = (m_status == MOUSE_DRAWING); - // prepare DC and pen + brush to optimize drawing - wxClientDC dc(this); - dc.SetPen(alive? *wxBLACK_PEN : *wxWHITE_PEN); - dc.SetBrush(alive? *wxBLACK_BRUSH : *wxWHITE_BRUSH); - dc.BeginDrawing(); + // prepare DC and pen + brush to optimize drawing + wxClientDC dc(this); + dc.SetPen(alive? *wxBLACK_PEN : *wxWHITE_PEN); + dc.SetBrush(alive? *wxBLACK_BRUSH : *wxWHITE_BRUSH); + dc.BeginDrawing(); - // draw a line of cells using Bresenham's algorithm - wxInt32 d, ii, jj, di, ai, si, dj, aj, sj; - di = i - m_mi; - ai = abs(di) << 1; - si = (di < 0)? -1 : 1; - dj = j - m_mj; - aj = abs(dj) << 1; - sj = (dj < 0)? -1 : 1; + // draw a line of cells using Bresenham's algorithm + wxInt32 d, ii, jj, di, ai, si, dj, aj, sj; + di = i - m_mi; + ai = abs(di) << 1; + si = (di < 0)? -1 : 1; + dj = j - m_mj; + aj = abs(dj) << 1; + sj = (dj < 0)? -1 : 1; - ii = m_mi; - jj = m_mj; + ii = m_mi; + jj = m_mj; - if (ai > aj) - { - // iterate over i - d = aj - (ai >> 1); - - while (ii != i) - { - m_life->SetCell(ii, jj, alive); - DrawCell(ii, jj, dc); - if (d >= 0) - { - jj += sj; - d -= ai; - } - ii += si; - d += aj; - } - } - else - { - // iterate over j - d = ai - (aj >> 1); + if (ai > aj) + { + // iterate over i + d = aj - (ai >> 1); + + while (ii != i) + { + m_life->SetCell(ii, jj, alive); + DrawCell(ii, jj, dc); + if (d >= 0) + { + jj += sj; + d -= ai; + } + ii += si; + d += aj; + } + } + else + { + // iterate over j + d = ai - (aj >> 1); - while (jj != j) - { - m_life->SetCell(ii, jj, alive); - DrawCell(ii, jj, dc); - if (d >= 0) - { - ii += si; - d -= aj; - } - jj += sj; - d += ai; - } - } + while (jj != j) + { + m_life->SetCell(ii, jj, alive); + DrawCell(ii, jj, dc); + if (d >= 0) + { + ii += si; + d -= aj; + } + jj += sj; + d += ai; + } + } - // last cell - m_life->SetCell(ii, jj, alive); - DrawCell(ii, jj, dc); - m_mi = ii; - m_mj = jj; + // last cell + m_life->SetCell(ii, jj, alive); + DrawCell(ii, jj, dc); + m_mi = ii; + m_mj = jj; - dc.EndDrawing(); + dc.EndDrawing(); } ((LifeFrame *) wxGetApp().GetTopWindow())->UpdateInfoText(); @@ -928,10 +1003,10 @@ void LifeCanvas::OnSize(wxSizeEvent& event) // scrollbars if (m_interactive) { - SetScrollbar(wxHORIZONTAL, m_viewportW, m_viewportW, 3 * m_viewportW); - SetScrollbar(wxVERTICAL, m_viewportH, m_viewportH, 3 * m_viewportH); - m_thumbX = m_viewportW; - m_thumbY = m_viewportH; + SetScrollbar(wxHORIZONTAL, m_viewportW, m_viewportW, 3 * m_viewportW); + SetScrollbar(wxVERTICAL, m_viewportH, m_viewportH, 3 * m_viewportH); + m_thumbX = m_viewportW; + m_thumbY = m_viewportH; } // allow default processing @@ -948,45 +1023,45 @@ void LifeCanvas::OnScroll(wxScrollWinEvent& event) int scrollinc = 0; switch (type) { - case wxEVT_SCROLLWIN_TOP: - { - if (orient == wxHORIZONTAL) - scrollinc = -m_viewportW; - else - scrollinc = -m_viewportH; - break; - } - case wxEVT_SCROLLWIN_BOTTOM: - { - if (orient == wxHORIZONTAL) - scrollinc = m_viewportW; - else - scrollinc = m_viewportH; - break; - } - case wxEVT_SCROLLWIN_LINEUP: scrollinc = -1; break; - case wxEVT_SCROLLWIN_LINEDOWN: scrollinc = +1; break; - case wxEVT_SCROLLWIN_PAGEUP: scrollinc = -10; break; - case wxEVT_SCROLLWIN_PAGEDOWN: scrollinc = +10; break; - case wxEVT_SCROLLWIN_THUMBTRACK: - { - if (orient == wxHORIZONTAL) - { - scrollinc = pos - m_thumbX; - m_thumbX = pos; - } - else - { - scrollinc = pos - m_thumbY; - m_thumbY = pos; - } - break; - } - case wxEVT_SCROLLWIN_THUMBRELEASE: - { - m_thumbX = m_viewportW; - m_thumbY = m_viewportH; - } + case wxEVT_SCROLLWIN_TOP: + { + if (orient == wxHORIZONTAL) + scrollinc = -m_viewportW; + else + scrollinc = -m_viewportH; + break; + } + case wxEVT_SCROLLWIN_BOTTOM: + { + if (orient == wxHORIZONTAL) + scrollinc = m_viewportW; + else + scrollinc = m_viewportH; + break; + } + case wxEVT_SCROLLWIN_LINEUP: scrollinc = -1; break; + case wxEVT_SCROLLWIN_LINEDOWN: scrollinc = +1; break; + case wxEVT_SCROLLWIN_PAGEUP: scrollinc = -10; break; + case wxEVT_SCROLLWIN_PAGEDOWN: scrollinc = +10; break; + case wxEVT_SCROLLWIN_THUMBTRACK: + { + if (orient == wxHORIZONTAL) + { + scrollinc = pos - m_thumbX; + m_thumbX = pos; + } + else + { + scrollinc = pos - m_thumbY; + m_thumbY = pos; + } + break; + } + case wxEVT_SCROLLWIN_THUMBRELEASE: + { + m_thumbX = m_viewportW; + m_thumbY = m_viewportH; + } } #if defined(__WXGTK__) || defined(__WXMOTIF__) @@ -994,8 +1069,8 @@ void LifeCanvas::OnScroll(wxScrollWinEvent& event) // so reset it back as we always want it to be in the same position. if (type != wxEVT_SCROLLWIN_THUMBTRACK) { - SetScrollbar(wxHORIZONTAL, m_viewportW, m_viewportW, 3 * m_viewportW); - SetScrollbar(wxVERTICAL, m_viewportH, m_viewportH, 3 * m_viewportH); + SetScrollbar(wxHORIZONTAL, m_viewportW, m_viewportW, 3 * m_viewportW); + SetScrollbar(wxVERTICAL, m_viewportH, m_viewportH, 3 * m_viewportH); } #endif @@ -1004,13 +1079,13 @@ void LifeCanvas::OnScroll(wxScrollWinEvent& event) // scroll the window and adjust the viewport if (orient == wxHORIZONTAL) { - m_viewportX += scrollinc; - ScrollWindow( -m_cellsize * scrollinc, 0, (const wxRect *) NULL); + m_viewportX += scrollinc; + ScrollWindow( -m_cellsize * scrollinc, 0, (const wxRect *) NULL); } else { - m_viewportY += scrollinc; - ScrollWindow( 0, -m_cellsize * scrollinc, (const wxRect *) NULL); + m_viewportY += scrollinc; + ScrollWindow( 0, -m_cellsize * scrollinc, (const wxRect *) NULL); } } diff --git a/demos/life/life.h b/demos/life/life.h index 0fa61a695c..75cd4d23a1 100644 --- a/demos/life/life.h +++ b/demos/life/life.h @@ -137,8 +137,9 @@ private: DECLARE_EVENT_TABLE() // event handlers - void OnSamples(wxCommandEvent& event); void OnMenu(wxCommandEvent& event); + void OnOpen(wxCommandEvent& event); + void OnSamples(wxCommandEvent& event); void OnNavigate(wxCommandEvent& event); void OnZoom(wxCommandEvent& event); void OnSlider(wxScrollEvent& event); diff --git a/demos/life/life.rc b/demos/life/life.rc index ae701642ed..269df77d17 100644 --- a/demos/life/life.rc +++ b/demos/life/life.rc @@ -2,13 +2,16 @@ mondrian ICON "mondrian.ico" #include "wx/msw/wx.rc" reset BITMAP "bitmaps/reset.bmp" +open BITMAP "bitmaps/open.bmp" play BITMAP "bitmaps/play.bmp" stop BITMAP "bitmaps/stop.bmp" zoomin BITMAP "bitmaps/zoomin.bmp" zoomout BITMAP "bitmaps/zoomout.bmp" +info BITMAP "bitmaps/info.bmp" north BITMAP "bitmaps/north.bmp" east BITMAP "bitmaps/east.bmp" south BITMAP "bitmaps/south.bmp" west BITMAP "bitmaps/west.bmp" center BITMAP "bitmaps/center.bmp" life BITMAP "bitmaps/life.bmp" + diff --git a/demos/life/makefile.b32 b/demos/life/makefile.b32 index 051d35b22f..a56b222798 100644 --- a/demos/life/makefile.b32 +++ b/demos/life/makefile.b32 @@ -10,7 +10,7 @@ WXDIR = $(WXWIN) TARGET=life -OBJECTS = $(TARGET).obj dialogs.obj game.obj +OBJECTS = $(TARGET).obj dialogs.obj game.obj reader.obj !include $(WXDIR)\src\makeprog.b32 diff --git a/demos/life/makefile.bcc b/demos/life/makefile.bcc index e7ac35af26..52b5acfd36 100644 --- a/demos/life/makefile.bcc +++ b/demos/life/makefile.bcc @@ -13,7 +13,7 @@ WXDIR = $(WXWIN) TARGET=life -OBJECTS=$(TARGET).obj dialogs.obj game.obj +OBJECTS=$(TARGET).obj dialogs.obj game.obj reader.obj !include $(WXDIR)\src\makeprog.bcc diff --git a/demos/life/makefile.dos b/demos/life/makefile.dos index c042c700cf..50e2bb53d4 100644 --- a/demos/life/makefile.dos +++ b/demos/life/makefile.dos @@ -11,7 +11,7 @@ WXDIR = $(WXWIN) TARGET=life -OBJECTS = $(TARGET).obj dialogs.obj game.obj +OBJECTS = $(TARGET).obj dialogs.obj game.obj reader.obj !include $(WXDIR)\src\makeprog.msc diff --git a/demos/life/makefile.g95 b/demos/life/makefile.g95 index 16127c981a..8f988b4a89 100644 --- a/demos/life/makefile.g95 +++ b/demos/life/makefile.g95 @@ -10,7 +10,8 @@ WXDIR = ../.. TARGET=life -OBJECTS = $(TARGET).o dialogs.o game.o +EXTRALDFLAGS=-Wl,--subsystem,console +OBJECTS = $(TARGET).o dialogs.o game.o reader.o include $(WXDIR)/src/makeprog.g95 diff --git a/demos/life/makefile.unx b/demos/life/makefile.unx index 8b8c3669d4..4fe657b60e 100644 --- a/demos/life/makefile.unx +++ b/demos/life/makefile.unx @@ -17,7 +17,7 @@ CC = gcc PROGRAM = life -OBJECTS = $(PROGRAM).o dialogs.o game.o +OBJECTS = $(PROGRAM).o dialogs.o game.o reader.o # implementation diff --git a/demos/life/makefile.vc b/demos/life/makefile.vc index 1f8314a8dd..c73905457d 100644 --- a/demos/life/makefile.vc +++ b/demos/life/makefile.vc @@ -12,7 +12,7 @@ WXDIR = $(WXWIN) PROGRAM=life -OBJECTS = $(PROGRAM).obj dialogs.obj game.obj +OBJECTS = $(PROGRAM).obj dialogs.obj game.obj reader.obj !include $(WXDIR)\src\makeprog.vc diff --git a/demos/life/makefile.wat b/demos/life/makefile.wat index 4ee7d9205c..4fd507ae4b 100644 --- a/demos/life/makefile.wat +++ b/demos/life/makefile.wat @@ -8,7 +8,7 @@ WXDIR = $(%WXWIN) PROGRAM = life -OBJECTS = $(PROGRAM).obj dialogs.obj game.obj +OBJECTS = $(PROGRAM).obj dialogs.obj game.obj reader.obj !include $(WXDIR)\src\makeprog.wat diff --git a/demos/life/reader.cpp b/demos/life/reader.cpp new file mode 100644 index 0000000000..4d348ef402 --- /dev/null +++ b/demos/life/reader.cpp @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: reader.cpp +// Purpose: Life! pattern reader (writer coming soon) +// Author: Guillermo Rodriguez Garcia, +// Modified by: +// Created: Jan/2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000, Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ========================================================================== +// headers, declarations, constants +// ========================================================================== + +#ifdef __GNUG__ + #pragma implementation "reader.h" +#endif + +// 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 "wx/txtstrm.h" +#include "reader.h" + + +// ========================================================================== +// LifeReader +// ========================================================================== + +#define LIFE_CHECKVAL( msg ) \ + if (!m_ok) \ + { \ + wxMessageBox( msg, _("Error"), wxICON_EXCLAMATION | wxOK ); \ + return; \ + } + +LifeReader::LifeReader(wxInputStream& is) +{ + wxBufferedInputStream buff_is(is); + wxTextInputStream text_is(buff_is); + wxString line, rest; + + // check stream + m_ok = is.IsOk(); + LIFE_CHECKVAL(_("Couldn't read any data")); + + // read signature + m_ok = text_is.ReadLine().Contains(wxT("#Life 1.05")); + LIFE_CHECKVAL(_("Error reading signature. Not a Life pattern?")); + + // read description + m_description = wxT(""); + line = text_is.ReadLine(); + while (buff_is.IsOk() && line.StartsWith(wxT("#D"), &rest)) + { + m_description += rest.Trim(FALSE); + m_description += wxT("\n"); + line = text_is.ReadLine(); + } + + m_ok = buff_is.IsOk(); + LIFE_CHECKVAL(_("Unexpected EOF while reading description")); + + // read rules + m_ok = line.StartsWith(wxT("#N")); + LIFE_CHECKVAL(_("Sorry, non-conway rules not supported yet")); + + // read shape + while (buff_is.IsOk()) + { + line = ( text_is.ReadLine() ).Trim(); + + if (!line.IsEmpty()) + { + if (line.StartsWith(wxT("#P "), &rest)) + m_shape.Add(rest); + else + m_shape.Add(line); + } + } +} + diff --git a/demos/life/reader.h b/demos/life/reader.h new file mode 100644 index 0000000000..27a10af30e --- /dev/null +++ b/demos/life/reader.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: reader.h +// Purpose: Life! pattern reader (writer coming soon) +// Author: Guillermo Rodriguez Garcia, +// Modified by: +// Created: Jan/2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000, Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _LIFE_READER_H_ +#define _LIFE_READER_H_ + +#ifdef __GNUG__ + #pragma interface "reader.h" +#endif + +// for compilers that support precompilation, includes "wx/wx.h" +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "game.h" + +// -------------------------------------------------------------------------- +// LifeReader +// -------------------------------------------------------------------------- + +class LifeReader +{ +public: + LifeReader(wxInputStream& is); + + inline bool IsOk() const { return m_ok; }; + inline wxString GetDescription() const { return m_description; }; + inline wxString GetRules() const { return m_rules; }; + inline wxArrayString GetShape() const { return m_shape; }; + inline LifePattern GetPattern() const + { + return LifePattern(_(""), m_description, m_rules, m_shape); + }; + +private: + bool m_ok; + wxString m_description; + wxString m_rules; + wxArrayString m_shape; +}; + +#endif // _LIFE_READER_H_ diff --git a/demos/life/samples.inc b/demos/life/samples.inc index b8e7f59761..63b6d820c2 100644 --- a/demos/life/samples.inc +++ b/demos/life/samples.inc @@ -23,9 +23,10 @@ * */ -const LifeShape g_shapes[] = +const LifePattern g_patterns[] = { - LifeShape( _("Glider"), + LifePattern( + _("Glider"), _("The glider is the first of a series of life forms, known " "as spaceships or fishes, which can travel along the game " "field retaining their original shape."), @@ -33,7 +34,8 @@ const LifeShape g_shapes[] = ".*." "..*" "***"), - LifeShape( _("Heavyweight spaceship"), + LifePattern( + _("Heavyweight spaceship"), _("The glider is just the smaller of the spaceships; this " "one, known as the heavyweight spaceship or 'big fish', " "is the largest spaceship which can travel alone without " @@ -44,7 +46,8 @@ const LifeShape g_shapes[] = "......*" "*.....*" ".******"), - LifeShape( _("Eater"), + LifePattern( + _("Eater"), _("An eater is any still life that can repair itself from " "some attacks. This one (bottom right), also known as " "'fishhook', eats gliders and fishes (spaceships) provided " @@ -60,7 +63,8 @@ const LifeShape g_shapes[] = "......*.*." "........*." "........**" ), - LifeShape( _("Dice shaker"), + LifePattern( + _("Dice shaker"), _("Oscillators have been extensively explored in Life!. " "The dice shaker turns around each seven tics; thus, it " "is an oscillator with a period of fourteen."), @@ -71,7 +75,8 @@ const LifeShape g_shapes[] = "*.*.*.*" "*.*.*.*" "**...**" ), - LifeShape( _("Hertz oscillator"), + LifePattern( + _("Hertz oscillator"), _("The Hertz oscillator is a good example of a set of life " "patterns known as 'billiard tables'. A billiard table is " "an oscillator which is built inside a stable border. In " @@ -88,7 +93,8 @@ const LifeShape g_shapes[] = ".............." ".......**....." ".......**....." ), - LifeShape( _("Phoenix"), + LifePattern( + _("Phoenix"), _("A phoenix is a pattern whose cells all die in every " "generation, and yet lives forever. For example, this is " "a phoenix with period two."), @@ -101,7 +107,8 @@ const LifeShape g_shapes[] = ".*......" "...*.*.." "...*...." ), - LifeShape( _("R-pentomino"), + LifePattern( + _("R-pentomino"), _("The R-pentomino is a methuselah - a life form which " "lives for hundreds of generations without stabilizing " "or dying. In particular, the R-Pentomino requires more " @@ -111,7 +118,8 @@ const LifeShape g_shapes[] = ".**" "**." ".*." ), - LifeShape( _("Thunderbird"), + LifePattern( + _("Thunderbird"), _("The thunderbird is another popular methuselah, which " "doesn't stabilize until the 243th generation. Note that " "because the initial configuration is symmetrical with " @@ -123,14 +131,16 @@ const LifeShape g_shapes[] = ".*." ".*." ".*." ), - LifeShape( _("Accorn"), + LifePattern( + _("Accorn"), _("Probably the most popular methuselah, the accorn lives " "for 5206 (!) generations."), 7, 3, ".*....." "...*..." "**..***" ), - LifeShape( _("Galaxy"), + LifePattern( + _("Galaxy"), _("One from my personal collection. It is really beautiful " "to see this configuration expand and shrink periodically " "for hundreds of tics before reaching a stable state."), @@ -148,7 +158,8 @@ const LifeShape g_shapes[] = "......*......" "......*......" ".......***..." ), - LifeShape( _("Glider gun"), + LifePattern( + _("Glider gun"), _("A gun is a stationary pattern that emits spaceships " "forever. The glider gun shown here was the first known " "gun, and indeed the first known finite pattern with " @@ -164,7 +175,8 @@ const LifeShape g_shapes[] = "**.........*...**........*.........." "............*.*....................." ".............*......................" ), - LifeShape( _("Puffer train"), + LifePattern( + _("Puffer train"), _("A puffer is an object that moves like a spaceship, except " "that it leaves a trail of debris behind. The puffer train " "is one of the best-known puffers. Originally found by " @@ -191,7 +203,8 @@ const LifeShape g_shapes[] = "....*" "*...*" ".****" ), - LifeShape( _("Max"), + LifePattern( + _("Max"), _("Max is the fastest-growing known pattern in Conway's Game " "of Life (possibly the fastest possible). It fills space to " "a density of 1/2, conjectured to be the maximum density, " diff --git a/demos/poem/PoemVC.dsp b/demos/poem/PoemVC.dsp new file mode 100644 index 0000000000..38e828216b --- /dev/null +++ b/demos/poem/PoemVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="PoemVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PoemVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PoemVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PoemVC.mak" CFG="PoemVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PoemVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PoemVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PoemVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "PoemVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PoemVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wxpoem.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PoemVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/wxpoem.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PoemVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxpoem.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PoemVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxpoem.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "PoemVC - Win32 Release" +# Name "PoemVC - Win32 Debug" +# Name "PoemVC - Win32 Debug DLL" +# Name "PoemVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\wxpoem.cpp + +!IF "$(CFG)" == "PoemVC - Win32 Release" + +!ELSEIF "$(CFG)" == "PoemVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PoemVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PoemVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wxpoem.h +# End Source File +# Begin Source File + +SOURCE=.\wxpoem.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/demos/poem/PoemVC.dsw b/demos/poem/PoemVC.dsw new file mode 100644 index 0000000000..eb671f033b --- /dev/null +++ b/demos/poem/PoemVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PoemVC"=.\PoemVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index 2a2d89c031..4fb213a9bf 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -510,7 +510,9 @@ void MainWindow::Search(bool ask) if (s != "") { if (search_string) delete[] search_string; + search_string = copystring(s); + search_ok = TRUE; } else search_ok = FALSE; } @@ -683,7 +685,9 @@ int MyApp::OnExit() delete NormalFont; delete BoldFont; delete ItalicFont; - delete poem_buffer; + delete[] poem_buffer; + if (search_string) + delete[] search_string; return 0; } @@ -922,7 +926,7 @@ long MainWindow::DoSearch(void) FILE *file; long i = 0; int ch = 0; - char buf[100]; + char buf[512]; long find_start; long previous_poem_start; @@ -993,7 +997,7 @@ long MainWindow::DoSearch(void) // Load index (or compile it if none found) void TryLoadIndex() { - index_ok = LoadIndex(index_filename); + index_ok = (LoadIndex(index_filename) != 0); if (!index_ok || (nitems == 0)) { PoetryError("Index file not found; will compile new one", "wxPoem"); @@ -1021,7 +1025,7 @@ bool Compile(void) long i = 0; int j; int ch = 0; - char buf[100]; + char buf[512]; if (data_filename) sprintf(buf, "%s.dat", data_filename); diff --git a/difflast.pl b/difflast.pl index 33aecea66a..d1473e627a 100755 --- a/difflast.pl +++ b/difflast.pl @@ -14,16 +14,17 @@ use strict; my $CVS = "cvs -z3"; # the cvs command +# the regexp for cvs revision number +my $RE_CVS_REV = "\\d+(?:\\.\\d+)+"; + sub dec_rev($) { my $rev = $_[0]; # decrement the revision number to get the previos one - # (FIXME this is totally bogus, won't work with branches) - my $revlen = length($rev) - rindex($rev, '.') - 1; - my $m = 10**$revlen; + $rev =~ s/(\d+)$/$1 - 1/e; - return int($rev) . "." . ($rev*$m - int($rev)*$m - 1) + return $rev; } sub get_last_rev($) @@ -39,7 +40,7 @@ sub get_last_rev($) while () { # notice that we shouldn't have '$' followed by 'Id' or cvs will # substitute it! - if ( /\$(Id): $basename,v (\d+\.\d+)/ ) { + if ( /\$(Id): $basename,v ($RE_CVS_REV)/ ) { return &dec_rev($2); } } @@ -48,7 +49,7 @@ sub get_last_rev($) open(INPUT, "$CVS -q status $file |") or return 0; while () { - if ( /Working revision:\s+(\d+\.\d+)/ ) { + if ( /Working revision:\s+($RE_CVS_REV)/ ) { return &dec_rev($1); } } diff --git a/distrib/msw/expdwild.bat b/distrib/msw/expdwild.bat new file mode 100755 index 0000000000..34974a61d7 --- /dev/null +++ b/distrib/msw/expdwild.bat @@ -0,0 +1,15 @@ +@echo off +rem Expands wildcards in response file (arg 1) into output file (arg 2) +rem Note: requires ls.exe from GNU-WIN32 distribution, renamed to ls2.exe. +rem Correction: this is too slow, so we're using the built in 'dir'. + +set newname=%temp\temp.tmp +sed -e "s/\//\\/g" %1 > %newname + +set len=%@LINES[%newname] +rem set len=%@DEC[%len] +do i = 0 to %len by 1 + set line=%@LINE[%newname,%i] + if NOT "%line" == "" dir /FB %line >> %2 +enddo + diff --git a/distrib/msw/extradoc.rsp b/distrib/msw/extradoc.rsp new file mode 100644 index 0000000000..08d9c68619 --- /dev/null +++ b/distrib/msw/extradoc.rsp @@ -0,0 +1,3 @@ +docs/pdf/odbc.pdf +docs/html/gettext/*.html + diff --git a/distrib/msw/filerepl.bat b/distrib/msw/filerepl.bat new file mode 100755 index 0000000000..815fc0b19b --- /dev/null +++ b/distrib/msw/filerepl.bat @@ -0,0 +1,27 @@ +@echo off +Rem Replace a string with another string in the given files. +Rem The first argument is the string to be replaced. +Rem The second argument is the replacement string. +Rem The third argument is a file listing the files to be processed. + +set keyword=%1 +set repl=%2 +set files=%3 +echo s/%keyword/%repl/g > script.tmp + +call %wxwin\distrib\msw\expdwild.bat %3 list.tmp + +set len=%@LINES[%files] +do i = 0 to %len by 1 + set line=%@LINE[list.tmp,%i] + if "%line" == "**EOF**" enddo +rem echo Cmd: grep %keyword %line + grep %keyword %line > size.tmp + if "%@FILESIZE[size.tmp]" == "0" enddo + sed -f script.tmp %line > file.tmp + move file.tmp %line +enddo +erase script.tmp +erase list.tmp +erase size.tmp +:end diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index 69f8de0516..323e917b57 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -1,6 +1,5 @@ *.spec BuildCVS.txt -acconfig.h *.m4 autogen.sh configure @@ -25,6 +24,7 @@ distrib/msw/*.bat distrib/msw/*.cpp distrib/msw/*.txt distrib/msw/tardist +distrib/msw/tarwxmotif distrib/msw/tmake/*.t distrib/msw/tmake/Makefile distrib/msw/tmake/filelist.txt @@ -32,12 +32,15 @@ distrib/msw/tmake/makeall.bat distrib/msw/tmake/makeall.sh distrib/msw/tmake/wxwin.pro distrib/msw/tmake/tmake.conf -distrib/gtk/* +distrib/gtk/*.txt +distrib/gtk/Setup +distrib/gtk/copy_src locale/*.po locale/*.mo docs/readme.txt +docs/readme_vms.txt docs/install.txt docs/release.txt docs/changes.txt @@ -58,6 +61,7 @@ docs/html/icons/*.gif docs/html/icons/*.png docs/html/icons/*.jpg docs/tech/*.txt +docs/tech/*.htm src/makeenvs/*.env src/make.env @@ -103,7 +107,11 @@ src/png/TODO src/png/*.1 src/png/*.3 src/png/*.5 -src/png/scripts/* +src/png/scripts/*.ppc +src/png/scripts/*.bat +src/png/scripts/makefile* +src/png/scripts/*.com +src/png/scripts/*.def src/zlib/*.c src/zlib/*.h @@ -236,6 +244,8 @@ samples/sockets/client.b32 samples/sockets/server.b32 samples/sockets/client.bcc samples/sockets/server.bcc +samples/sockets/client.g95 +samples/sockets/server.g95 samples/sockets/*.xbm samples/sockets/*.xpm samples/sockets/*.ico @@ -255,6 +265,10 @@ samples/help/*.hlp samples/help/*.cnt samples/help/*.zip samples/help/*.htb +samples/help/*.chm +samples/help/*.hhp +samples/help/*.hhk +samples/help/*.hhc samples/help/*.hpj samples/help/*.tex samples/help/*.ini @@ -594,6 +608,7 @@ samples/dnd/*.xpm samples/dnd/*.png samples/dnd/*.ico samples/dnd/*.txt +samples/dnd/*.cur samples/tab/*.cpp samples/tab/*.h @@ -642,6 +657,7 @@ samples/image/*.pnm samples/image/*.pcx samples/image/*.jpg samples/image/*.gif +samples/image/*.tif samples/image/*.ico samples/image/*.txt @@ -670,6 +686,8 @@ samples/ipc/client.bcc samples/ipc/server.bcc samples/ipc/client.dos samples/ipc/server.dos +samples/ipc/client.g95 +samples/ipc/server.g95 samples/ipc/*.rc samples/ipc/*.def samples/ipc/*.bmp @@ -1063,6 +1081,7 @@ demos/life/*.def demos/life/*.ico demos/life/*.xpm demos/life/*.txt +demos/life/*.lif demos/life/bitmaps/*.xpm demos/life/bitmaps/*.bmp diff --git a/distrib/msw/innobott.txt b/distrib/msw/innobott.txt new file mode 100644 index 0000000000..97f30032a4 --- /dev/null +++ b/distrib/msw/innobott.txt @@ -0,0 +1,40 @@ + +[Icons] + Name: {group}\Dialog Editor; Filename: {app}\bin\dialoged.exe; WorkingDir: {app}\bin; IconFilename: {app}\bin\dialoged.exe; IconIndex: 0 + Name: {group}\Dialog Editor Help; Filename: {app}\bin\dialoged.hlp; WorkingDir: {app}\bin; IconIndex: 0; Flags: useapppaths + Name: {group}\Life! Demo; Filename: {app}\bin\life.exe; WorkingDir: {app}\bin; IconFilename: {app}\bin\life.exe; IconIndex: 0 + Name: {group}\Tex2rtf; Filename: {app}\bin\tex2rtf.exe; WorkingDir: {app}\bin; IconFilename: {app}\bin\tex2rtf.exe; IconIndex: 0 + Name: {group}\Tex2rtf Help; Filename: {app}\bin\tex2rtf.hlp; WorkingDir: {app}\bin; IconIndex: 0; Flags: useapppaths + Name: {group}\Changes; Filename: {app}\docs\changes.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths + Name: {group}\Readme; Filename: {app}\docs\readme.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths + Name: {group}\Debug View; Filename: {app}\bin\DBGVIEW.EXE; WorkingDir: {app}\bin; IconFilename: {app}\bin\DBGVIEW.EXE; IconIndex: 0 + Name: {group}\Compiling wxWindows; Filename: {app}\docs\msw\install.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths + Name: {group}\wxWindows Help; Filename: {app}\docs\htmlhelp\wx.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths + Name: {group}\HTML Docs Index; Filename: {app}\docs\html\index.htm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths + +[INI] + +[Registry] + +[UninstallDelete] + +[InstallDelete] + +[Run] + +[UninstallRun] + + +; ============================================== +; The lines below are used by ScriptMaker +; They are not required by Inno Setup +; DO NOT DELETE THEM or you may be unable to reload the script + +;[ScriptSetup] +;VerNum=2.2.7 +;InnoVer=1.3 +;AddVerTo=AppVerName +;SetupFilename=setup.exe +;OutputFolder=C:\wx2stable\wxWindows\deliver +;CopyrightText=Copyright © The wxWindows Team + diff --git a/distrib/msw/innotop.txt b/distrib/msw/innotop.txt new file mode 100644 index 0000000000..72bfd9f4e5 --- /dev/null +++ b/distrib/msw/innotop.txt @@ -0,0 +1,45 @@ +; Inno Setup Script +; Created with ScriptMaker Version 1.3.22 +; 29 January 2001 at 14:22 + +[Setup] + MinVersion=4.0,4.0 + AppName=wxWindows 2.2.9 + AppId=wxWindows + CreateUninstallRegKey=1 + UsePreviousAppDir=0 + UsePreviousGroup=0 + AppVersion=2.2.9 + AppVerName=wxWindows 2.2.9 + AppCopyright=Copyright © The wxWindows Team + BackColor=$FF0000 + BackColor2=$000000 + BackColorDirection=toptobottom + WindowShowCaption=1 + WindowStartMaximized=1 + WindowVisible=1 + WindowResizable=1 + UninstallDisplayName=wxWindows 2.2.9 + UninstallLogMode=Append + DirExistsWarning=auto + UninstallFilesDir={app} + DisableDirPage=0 + DisableStartupPrompt=0 + CreateAppDir=1 + DisableProgramGroupPage=0 + AlwaysCreateUninstallIcon=1 + UninstallIconName=Uninstall wxWindows 2.2.9 + Uninstallable=1 + DefaultDirName=c:\wx2 DefaultGroupName=wxWindows 2.2.9 + LicenseFile=C:\wx2stable\wxWindows\docs\licence.txt + InfoBeforeFile=C:\wx2stable\wxWindows\docs\readme.txt + InfoAfterFile=C:\wx2stable\wxWindows\docs\msw\install.txt + MessagesFile=compiler:default.isl + DiskSpanning=1 + DiskSize=1457664 + DiskClusterSize=512 + ReserveBytes=0 + UseSetupLdr=1 + SourceDir=C:\wx2stable\wxWindows\deliver\wx + OutputDir=C:\wx2stable\wxWindows\deliver + diff --git a/distrib/msw/jpeg.rsp b/distrib/msw/jpeg.rsp index 7095a60175..c3f84fcbc5 100644 --- a/distrib/msw/jpeg.rsp +++ b/distrib/msw/jpeg.rsp @@ -1,6 +1,6 @@ src/jpeg/make* -src/jpeg/jpeg.dsp -src/jpeg/jpeg.dsw +src/jpeg/JpegVC.dsp +src/jpeg/JpegVC.dsw src/jpeg/*.c src/jpeg/*.h src/jpeg/README diff --git a/distrib/msw/makeall.bat b/distrib/msw/makeall.bat new file mode 100755 index 0000000000..65862691ba --- /dev/null +++ b/distrib/msw/makeall.bat @@ -0,0 +1,622 @@ +Rem @echo off +Rem This script compiles wxWindows and some samples/demos with +Rem a range of compilers. +Rem Note that it currently uses batch scripts local to Julian Smart's machine, +Rem to set up the environment correctly. +Rem This is a 4DOS batch file, though 4DOS dependencies have been kept to +Rem a minimum. +Rem Julian Smart, August 12th, 2000 +Rem TODO: making a Unicode distribution by modifying setup.h programmatically. +Rem TODO: check differing setup.h options, again by programmatic modification + +set WXDIR=%WXWIN% +set FATWXWIN=%WXDIR% +set FULLWXWIN=%WXDIR% +if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FATWXWIN=%@PATH[%WXDIR%]wxwind~1 +if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FULLWXWIN=%@PATH[%WXDIR%]wxWindows + +Rem The following line is for a specific environment -- edit, or comment out +if not %@INDEX["%WXDIR%","wx2stable"] == "-1" set FATWXWIN=d:\wx2sta~1\wxwind~1 + +echo Full wxWindows path is %FULLWXWIN%, FAT path is %FATWXWIN% +set BUILDDEST=%TEMP%\wxWinBuild +Rem Only carry on if we haven't specified a single target +set CARRYON=0 + +rem goto end + +if "%1" == "vc6" goto dovc6 +if "%1" == "bc55" goto dobc55 +if "%1" == "bc50" goto dobc50 +if "%1" == "ming2992" goto doming2952 +if "%1" == "cygwin11" goto docygwin11 +if "%1" == "vc1" goto dovc1 +if "%1" == "bc16" goto dobc16 + +set CARRYON=1 + +if not direxist %BUILDDEST% mkdir /S %BUILDDEST% + + +:dovc6 + +cd %WXDIR%\samples +erase /S *.exe +cd %WXDIR%\demos +erase /S *.exe +cd %WXDIR%\contrib\samples +erase /S *.exe +cd %WXDIR%\utils\dialoged\src +erase /S *.exe +cd %WXDIR%\utils\tex2rtf\src +erase /S *.exe + +echo Starting wxWindows build at %_TIME, %_DATE + +Rem First, VC++ 6. + +echo === VC++ 6 === +echo ============== + +Rem Set up the environment +call msvc6 + +echo *** VC++ Debug *** +Rem VC++ Debug +cd %WXDIR%\src\msw +nmake -f makefile.vc cleanall +nmake -f makefile.vc +if not direxist %BUILDDEST%\VC6Debug mkdir /S %BUILDDEST%\VC6Debug +erase /F /Y %BUILDDEST%\VC6Debug +cd %WXDIR%\samples +nmake -f makefile.vc clean + +Rem Make one sample, just to make sure Debug mode is OK +cd %WXDIR%\samples\controls +nmake -f makefile.vc +copy controls.exe %BUILDDEST%\VC6Debug +nmake -f makefile.vc clean + +cd %WXDIR%\src\msw +nmake -f makefile.vc cleanall + +echo *** VC++ Release *** + +nmake -f makefile.vc cleanall FINAL=1 +nmake -f makefile.vc FINAL=1 + +if not direxist %BUILDDEST%\VC6Release mkdir /S %BUILDDEST%\VC6Release +erase /F /Y %BUILDDEST%\VC6Release + +cd %WXDIR%\samples +nmake -f makefile.vc clean FINAL=1 +nmake -f makefile.vc FINAL=1 +Rem Copy all executables to VC6Release +Rem Euch, this is the only way I can think of right now +Rem to copy them to the same directory. Daft but... +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release +nmake -f makefile.vc clean FINAL=1 + +cd %WXDIR%\demos +nmake -f makefile.vc clean FINAL=1 +nmake -f makefile.vc FINAL=1 +Rem Copy all executables to VC6Release +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release +nmake -f makefile.vc clean FINAL=1 + +Rem Compile OGL +cd %WXDIR%\contrib\src\ogl +nmake -f makefile.vc clean FINAL=1 +nmake -f makefile.vc FINAL=1 +cd %WXDIR%\contrib\samples\ogl\ogledit +nmake -f makefile.vc clean FINAL=1 +nmake -f makefile.vc FINAL=1 +copy *.exe %BUILDDEST%\VC6Release +nmake -f makefile.vc clean FINAL=1 +cd %WXDIR%\contrib\samples\ogl\studio +nmake -f makefile.vc clean FINAL=1 +nmake -f makefile.vc FINAL=1 +copy *.exe %BUILDDEST%\VC6Release +nmake -f makefile.vc clean FINAL=1 +cd %WXDIR%\contrib\src\ogl +nmake -f makefile.vc clean FINAL=1 + +Rem Compile Dialog Editor +cd %WXDIR%\utils\dialoged\src +nmake -f makefile.vc clean FINAL=1 +nmake -f makefile.vc FINAL=1 +copy *.exe %BUILDDEST%\VC6Release +nmake -f makefile.vc clean FINAL=1 + +Rem Compile Tex2RTF +cd %WXDIR%\utils\tex2rtf\src +nmake -f makefile.vc clean FINAL=1 +nmake -f makefile.vc FINAL=1 +copy *.exe %BUILDDEST%\VC6Release +nmake -f makefile.vc clean FINAL=1 + +Rem Clean up + +cd %WXDIR%\src\msw +nmake -f makefile.vc cleanall FINAL=1 + +echo *** VC++ Debug DLL *** + +nmake -f makefile.vc cleanall WXMAKINGDLL=1 +nmake -f makefile.vc dll pch + +if not direxist %BUILDDEST%\VC6DebugDLL mkdir /S %BUILDDEST%\VC6DebugDLL +erase /F /Y %BUILDDEST%\VC6DebugDLL + +copy %WXDIR%\lib\*d.dll %BUILDDEST%\VC6DebugDLL + +Rem Make one sample, for a sanity check + +cd %WXDIR%\samples\controls +nmake -f makefile.vc WXUSINGDLL=1 +copy controls.exe %BUILDDEST%\VC6DebugDLL +nmake -f makefile.vc clean + +cd %WXDIR%\src\msw +nmake -f makefile.vc cleanall WXMAKINGDLL=1 + +echo *** VC++ Release DLL *** + +nmake -f makefile.vc cleanall FINAL=1 WXMAKINGDLL=1 +nmake -f makefile.vc dll pch FINAL=1 + +if not direxist %BUILDDEST%\VC6ReleaseDLL mkdir /S %BUILDDEST%\VC6ReleaseDLL +erase /F /Y %BUILDDEST%\VC6ReleaseDLL + +copy %WXDIR%\lib\*.dll %BUILDDEST%\VC6ReleaseDLL + +Rem Make one sample, for a sanity check + +cd %WXDIR%\samples\controls +nmake -f makefile.vc WXUSINGDLL=1 FINAL=1 +copy controls.exe %BUILDDEST%\VC6ReleaseDLL +nmake -f makefile.vc clean FINAL=1 + +cd %WXDIR%\src\msw +nmake -f makefile.vc cleanall WXMAKINGDLL=1 FINAL=1 + +if "%CARRYON" == "0" goto end + +:dobc55 + +echo === BC++ 5.5 === +echo ================ + +call bcb55 + +echo *** WIN32 BC++ Debug *** + +Rem WIN32 BC++ Debug +cd %WXDIR%\src\msw +make -f makefile.b32 cleanall +make -f makefile.b32 +if not direxist %BUILDDEST%\BC55Debug mkdir /S %BUILDDEST%\BC55Debug +erase /F /Y %BUILDDEST%\BC55Debug +cd %WXDIR%\samples +make -f makefile.b32 clean + +Rem Make one sample, just to make sure Debug mode is OK +cd %WXDIR%\samples\controls +make -f makefile.b32 +copy controls.exe %BUILDDEST%\BC55Debug +make -f makefile.b32 clean + +Rem Compile OGL +cd %WXDIR%\contrib\src\ogl +make -f makefile.b32 clean +make -f makefile.b32 +cd %WXDIR%\contrib\samples\ogl\ogledit +make -f makefile.b32 clean +make -f makefile.b32 +copy *.exe %BUILDDEST%\BC55Debug +make -f makefile.b32 clean +cd %WXDIR%\contrib\samples\ogl\studio +make -f makefile.b32 clean +make -f makefile.b32 +copy *.exe %BUILDDEST%\BC55Debug +make -f makefile.b32 clean +cd %WXDIR%\contrib\src\ogl +make -f makefile.b32 clean + +cd %WXDIR%\src\msw +make -f makefile.b32 cleanall + +goto bcdebugdll + +echo *** WIN32 BC++ Release *** + +make -f makefile.b32 cleanall FINAL=1 +make -f makefile.b32 FINAL=1 + +if not direxist %BUILDDEST%\BC55Release mkdir /S %BUILDDEST%\BC55Release +erase /F /Y %BUILDDEST%\BC55Release + +cd %WXDIR%\samples +make -f makefile.b32 clean FINAL=1 +make -f makefile.b32 FINAL=1 +Rem Copy all executables to BC55Release +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release +make -f makefile.b32 clean FINAL=1 + +cd %WXDIR%\demos +make -f makefile.b32 clean FINAL=1 +make -f makefile.b32 FINAL=1 +Rem Copy all executables to BC55Release +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release +make -f makefile.b32 clean FINAL=1 + +Rem Compile OGL +cd %WXDIR%\contrib\src\ogl +make -f makefile.b32 clean FINAL=1 +make -f makefile.b32 FINAL=1 +cd %WXDIR%\contrib\samples\ogl\ogledit +make -f makefile.b32 clean FINAL=1 +make -f makefile.b32 FINAL=1 +copy *.exe %BUILDDEST%\BC55Release +make -f makefile.b32 clean FINAL=1 +cd %WXDIR%\contrib\samples\ogl\studio +make -f makefile.b32 clean FINAL=1 +make -f makefile.b32 FINAL=1 +copy *.exe %BUILDDEST%\BC55Release +make -f makefile.b32 clean FINAL=1 +cd %WXDIR%\contrib\src\ogl +make -f makefile.b32 clean FINAL=1 + +Rem Compile Dialog Editor +cd %WXDIR%\utils\dialoged\src +make -f makefile.b32 clean FINAL=1 +make -f makefile.b32 FINAL=1 +copy *.exe %BUILDDEST%\BC55Release +make -f makefile.b32 clean FINAL=1 + +Rem Compile Tex2RTF +cd %WXDIR%\utils\tex2rtf\src +make -f makefile.b32 clean FINAL=1 +make -f makefile.b32 FINAL=1 +copy *.exe %BUILDDEST%\BC55Release +make -f makefile.b32 clean FINAL=1 + +Rem Clean up + +cd %WXDIR%\src\msw +make -f makefile.b32 cleanall FINAL=1 + +:bcdebugdll + +echo *** WIN32 BC++ Debug DLL *** + +make -f makefile.b32 cleanall +make -f makefile.b32 dll + +if not direxist %BUILDDEST%\BC55DebugDLL mkdir /S %BUILDDEST%\BC55DebugDLL +erase /F /Y %BUILDDEST%\BC55DebugDLL + +copy %WXDIR%\lib\*.dll %BUILDDEST%\BC55DebugDLL + +Rem Make one sample, for a sanity check + +cd %WXDIR%\samples\controls +make -f makefile.b32 WXUSINGDLL=1 +copy controls.exe %BUILDDEST%\BC55DebugDLL +make -f makefile.b32 clean + +cd %WXDIR%\src\msw +make -f makefile.b32 cleanall + +if "%CARRYON" == "0" goto end + +:dobc50 + + +echo === BC++ 5.0 === +echo ================ + +call borland + +echo *** WIN32 BC++ Debug *** + +Rem WIN32 BC++ Debug +cd %WXDIR%\src\msw +make -f makefile.b32 cleanall +make -f makefile.b32 +if not direxist %BUILDDEST%\BC50Debug mkdir /S %BUILDDEST%\BC50Debug +erase /F /Y %BUILDDEST%\BC50Debug +cd %WXDIR%\samples +make -f makefile.b32 clean + +Rem Make one sample, just to make sure Debug mode is OK +cd %WXDIR%\samples\controls +make -f makefile.b32 +copy controls.exe %BUILDDEST%\BC50Debug +make -f makefile.b32 clean + +cd %WXDIR%\src\msw +make -f makefile.b32 cleanall + +if "%CARRYON" == "0" goto end + +:docygwin11 + + +echo === Cygwin 1.1 === +echo ================== + +call cygwin11 + +echo *** Cygwin Debug *** + +Rem Cygwin Release +cd %WXDIR%\src\msw +make -f makefile.g95 cleanall +make -f makefile.g95 FINAL=1 +if not direxist %BUILDDEST%\Cygwin11Release mkdir /S %BUILDDEST%\Cygwin11Release +erase /F /Y %BUILDDEST%\Cygwin11Release +cd %WXDIR%\samples +make -f makefile.g95 clean FINAL=1 + +if not direxist %BUILDDEST%\Cygwin11Release mkdir /S %BUILDDEST%\Cygwin11Release +erase /F /Y %BUILDDEST%\Cygwin11Release + +cd %WXDIR%\samples +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +Rem Copy all executables to Cygwin11Release +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release +make -f makefile.g95 clean FINAL=1 + +cd %WXDIR%\demos +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +Rem Copy all executables to Cygwin11Release +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release +make -f makefile.g95 clean FINAL=1 + +Rem Compile OGL +cd %WXDIR%\contrib\src\ogl +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +cd %WXDIR%\contrib\samples\ogl\ogledit +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Cygwin11Release +make -f makefile.g95 clean FINAL=1 +cd %WXDIR%\contrib\samples\ogl\studio +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Cygwin11Release +make -f makefile.g95 clean FINAL=1 +cd %WXDIR%\contrib\src\ogl +make -f makefile.g95 clean FINAL=1 + +Rem Compile Dialog Editor +cd %WXDIR%\utils\dialoged\src +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Cygwin11Release +make -f makefile.g95 clean FINAL=1 + +Rem Compile Tex2RTF +cd %WXDIR%\utils\tex2rtf\src +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Cygwin11Release +make -f makefile.g95 clean FINAL=1 + +echo Stripping executables... +strip %BUILDDEST%\Cygwin11Release\*.exe + +Rem Cleanup + +cd %WXDIR%\src\msw +make -f makefile.g95 cleanall + +if "%CARRYON" == "0" goto end + +:doming2952 + +echo === Mingw32 2.95.2 === +echo ====================== + +call ming2952 + +echo *** Cygwin Debug *** + +Rem Cygwin Release +cd %WXDIR%\src\msw +make -f makefile.g95 cleanall +make -f makefile.g95 FINAL=1 +if not direxist %BUILDDEST%\Ming2952Release mkdir /S %BUILDDEST%\Ming2952Release +erase /F /Y %BUILDDEST%\Ming2952Release +cd %WXDIR%\samples +make -f makefile.g95 clean FINAL=1 + +if not direxist %BUILDDEST%\Ming2952Release mkdir /S %BUILDDEST%\Ming2952Release +erase /F /Y %BUILDDEST%\Ming2952Release + +cd %WXDIR%\samples +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +Rem Copy all executables to Ming2952Release +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release +make -f makefile.g95 clean FINAL=1 + +cd %WXDIR%\demos +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +Rem Copy all executables to Ming2952Release +erase %TEMP%\temp.zip +zip16 -r %TEMP%\temp.zip *.exe +unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release +make -f makefile.g95 clean FINAL=1 + +Rem Compile OGL +cd %WXDIR%\contrib\src\ogl +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +cd %WXDIR%\contrib\samples\ogl\ogledit +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Ming2952Release +make -f makefile.g95 clean FINAL=1 +cd %WXDIR%\contrib\samples\ogl\studio +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Ming2952Release +make -f makefile.g95 clean FINAL=1 +cd %WXDIR%\contrib\src\ogl +make -f makefile.g95 clean FINAL=1 + +Rem Compile Dialog Editor +cd %WXDIR%\utils\dialoged\src +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Ming2952Release +make -f makefile.g95 clean FINAL=1 + +Rem Compile Tex2RTF +cd %WXDIR%\utils\tex2rtf\src +make -f makefile.g95 clean FINAL=1 +make -f makefile.g95 FINAL=1 +copy *.exe %BUILDDEST%\Ming2952Release +make -f makefile.g95 clean FINAL=1 + +echo Stripping executables... +strip %BUILDDEST%\Ming2952Release\*.exe + +Rem Cleanup + +cd %WXDIR%\src\msw +make -f makefile.g95 cleanall + +if "%CARRYON" == "0" goto end + +:dovc1 + +echo === 16-bit VC++ === +echo =================== + +Rem Set up the environment +call msvc1 + +Rem Needs full wxWindows path for making libraries +set WXWIN=%FULLWXWIN% + +echo *** VC++ Debug *** +Rem VC++ Debug +cd %WXDIR%\src\msw +nmake -f makefile.dos cleanall +nmake -f makefile.dos +if not direxist %BUILDDEST%\VC1Debug mkdir /S %BUILDDEST%\VC1Debug +erase /F /Y %BUILDDEST%\VC1Debug + +Rem Make one sample, just to make sure Debug mode is OK +cd %WXDIR%\samples\minimal +nmake -f makefile.dos clean +Rem Needs FAT wxWindows path for making executables +set WXWIN=%FATWXWIN% +nmake -f makefile.dos + +copy minimal.exe /S %BUILDDEST%\VC1Debug +nmake -f makefile.dos clean + +cd %WXDIR%\src\msw +nmake -f makefile.dos cleanall + +Rem Needs full wxWindows path for making libraries +set WXWIN=%FULLWXWIN% + +echo *** VC++ Release *** + +nmake -f makefile.dos cleanall FINAL=1 +nmake -f makefile.dos FINAL=1 + +if not direxist %BUILDDEST%\VC1Release mkdir /S %BUILDDEST%\VC1Release +erase /F /Y %BUILDDEST%\VC1Release + +Rem Make one sample, just to make sure Release mode is OK +cd %WXDIR%\samples\minimal +nmake -f makefile.dos clean +nmake -f makefile.dos FINAL=1 +Rem Needs FAT wxWindows path for making executables +set WXWIN=%FATWXWIN% +nmake -f makefile.dos FINAL=1 +copy minimal.exe /S %BUILDDEST%\VC1Release +nmake -f makefile.dos clean +set WXWIN=%tmpwxwin% + +Rem Clean up + +cd %WXDIR%\src\msw +nmake -f makefile.dos cleanall FINAL=1 + +if "%CARRYON" == "0" goto end + +:dobc16 + +echo === 16-bit BC++ === +echo =================== + +Rem Set up the environment +call borland + +echo *** 16-bit BC++ Debug *** +Rem 16-bit BC++ Debug +cd %WXDIR%\src\msw +make -f makefile.bcc cleanall +make -f makefile.bcc +if not direxist %BUILDDEST%\BC16Debug mkdir /S %BUILDDEST%\BC16Debug +erase /F /Y %BUILDDEST%\BC16Debug + +Rem Make one sample, just to make sure Debug mode is OK +cd %WXDIR%\samples\minimal +make -f makefile.bcc clean +make -f makefile.bcc +copy minimal.exe /S %BUILDDEST%\BC16Debug +make -f makefile.bcc clean + +cd %WXDIR%\src\msw +make -f makefile.bcc cleanall + +echo *** 16-bit BC++ Release *** + +make -f makefile.bcc cleanall FINAL=1 +make -f makefile.bcc FINAL=1 + +if not direxist %BUILDDEST%\BC16Release mkdir /S %BUILDDEST%\BC16Release +erase /F /Y %BUILDDEST%\BC16Release + +Rem Make one sample, just to make sure Release mode is OK +cd %WXDIR%\samples\minimal +make -f makefile.bcc clean +make -f makefile.bcc FINAL=1 +copy minimal.exe /S %BUILDDEST%\BC16Release +make -f makefile.bcc clean + +Rem Clean up + +cd %WXDIR%\src\msw +make -f makefile.bcc cleanall FINAL=1 + +:end + +echo Finished wxWindows build at %_TIME, %_DATE + diff --git a/distrib/msw/makefile.rsp b/distrib/msw/makefile.rsp index a25712dcd6..28e07b008b 100644 --- a/distrib/msw/makefile.rsp +++ b/distrib/msw/makefile.rsp @@ -16,10 +16,19 @@ samples/dragimag/Makefile.in samples/drawing/Makefile.in samples/dynamic/Makefile.in samples/exec/Makefile.in -samples/genvalid/Makefile.in +samples/grid/Makefile.in +samples/newgrid/Makefile.in +samples/help/Makefile.in +samples/internat/Makefile.in +samples/ipc/Makefile.in +samples/png/Makefile.in +samples/richedit/Makefile.in +samples/resource/Makefile.in +samples/sockets/Makefile.in samples/html/Makefile.in samples/html/about/Makefile.in samples/html/help/Makefile.in +samples/html/helpview/Makefile.in samples/html/printing/Makefile.in samples/html/test/Makefile.in samples/html/virtual/Makefile.in @@ -29,6 +38,7 @@ samples/image/Makefile.in samples/joytest/Makefile.in samples/layout/Makefile.in samples/listctrl/Makefile.in +samples/memcheck/Makefile.in samples/mdi/Makefile.in samples/minifram/Makefile.in samples/minimal/Makefile.in @@ -50,7 +60,6 @@ samples/treectrl/Makefile.in samples/typetest/Makefile.in samples/validate/Makefile.in samples/wizard/Makefile.in -samples/socket/Makefile.in samples/dialup/Makefile.in samples/font/Makefile.in samples/menu/Makefile.in @@ -59,13 +68,20 @@ samples/opengl/Makefile.in samples/opengl/cube/Makefile.in samples/opengl/penguin/Makefile.in samples/opengl/isosurf/Makefile.in +demos/Makefile.in demos/bombs/Makefile.in demos/forty/Makefile.in demos/fractal/Makefile.in demos/poem/Makefile.in demos/life/Makefile.in +demos/dbbrowse/Makefile.in utils/dialoged/Makefile.in utils/dialoged/src/Makefile.in +utils/tex2rtf/Makefile.in +utils/tex2rtf/src/Makefile.in +utils/makegen/Makefile.in +utils/HelpGen/Makefile.in +utils/HelpGen/src/Makefile.in utils/Makefile.in utils/hhp2cached/Makefile.in contrib/Makefile.in @@ -81,26 +97,23 @@ contrib/samples/mmedia/Makefile.in contrib/samples/stc/Makefile.in descrip.mms -lib\vms.opt -lib\vms_gtk.opt -contrib\samples\mmedia\descrip.mms -deliver\wx\src\common\descrip.mms -deliver\wx\src\png\scripts\descrip.mms -deliver\wx\src\zlib\descrip.mms -demos\bombs\descrip.mms -samples\caret\descrip.mms -samples\checklst\descrip.mms -samples\config\descrip.mms -samples\controls\descrip.mms -samples\dialogs\descrip.mms -samples\image\descrip.mms -samples\menu\descrip.mms -samples\minimal\descrip.mms -src\common\descrip.mms -src\generic\descrip.mms -src\gtk\descrip.mms -src\motif\descrip.mms -src\png\scripts\descrip.mms -src\unix\descrip.mms -src\zlib\descrip.mms -utils\dialoged\src\descrip.mms +lib/vms.opt +lib/vms_gtk.opt +contrib/samples/mmedia/descrip.mms +demos/bombs/descrip.mms +samples/caret/descrip.mms +samples/checklst/descrip.mms +samples/config/descrip.mms +samples/controls/descrip.mms +samples/dialogs/descrip.mms +samples/image/descrip.mms +samples/menu/descrip.mms +samples/minimal/descrip.mms +src/common/descrip.mms +src/generic/descrip.mms +src/gtk/descrip.mms +src/motif/descrip.mms +src/png/scripts/descrip.mms +src/unix/descrip.mms +src/zlib/descrip.mms +utils/dialoged/src/descrip.mms diff --git a/distrib/msw/makeinno.bat b/distrib/msw/makeinno.bat new file mode 100755 index 0000000000..a6ada9c35f --- /dev/null +++ b/distrib/msw/makeinno.bat @@ -0,0 +1,71 @@ +@echo off +Rem Make an Inno Setup distribution list, where files and dirs are represented by +Rem sections like this: +Rem [Dirs] +Rem Name: {app}\docs +Rem +Rem [Files] +Rem Source: c:\wx2stable\wxWindows\deliver2\docs\readme.txt; DestDir: {app}\docs\; DestName: readme.txt + +set wxwindir=c:\wx2stable\wxWindows + +Rem Generate a list of all files in the distribution. +Rem We have to be in the right directory already. +dir /BS >& %TEMP\files1.tmp + +Rem Now we iterate through the list of files, writing out the middle section of +Rem the file. +Rem We have to remove the first part of the path, +Rem by truncating the start by the size of the current directory. + +set sz=%@EVAL[%@LEN[%_CWD]+1] +set len=%@LINES[%TEMP\files1.tmp] + +erase /Y %TEMP\files2.tmp + +Rem Add directories + +echo. >> %temp\files2.tmp +echo [Dirs] >> %temp\files2.tmp + +do i = 0 to %len by 1 + set line=%@LINE[%TEMP\files1.tmp,%i] + Rem Skip files. + if not isdir %line enddo + set sz2=%@LEN[%line] + set n=%@EVAL[%sz2-%sz] + set line2=%@SUBSTR[%line,%sz,%n] + if "%line2%" == "" enddo + + echo Name: {app}\%line2 >> %TEMP\files2.tmp +enddo + +echo. >>%TEMP\files2.tmp + +Rem Add files + +echo. >> %temp\files2.tmp +echo [Files] >> %temp\files2.tmp + +do i = 0 to %len by 1 + set line=%@LINE[%TEMP\files1.tmp,%i] + Rem Skip directories. + if isdir %line enddo + set sz2=%@LEN[%line] + set n=%@EVAL[%sz2-%sz] + set line2=%@SUBSTR[%line,%sz,%n] + set filename=%@FILENAME[%line2] + set dirname=%@PATH[%line2] + + echo Source: %line; DestDir: {app}\%dirname; DestName: %filename >> %TEMP\files2.tmp +enddo + +Rem Concatenate the 3 sections +cat %wxwindir\distrib\msw\innotop.txt %TEMP\files2.tmp %wxwindir\distrib\msw\innobott.txt > %wxwindir\distrib\msw\wxwin2.iss + +erase /Y %TEMP\files1.tmp +rem erase /Y %TEMP\files2.tmp + +goto end + +:end diff --git a/distrib/msw/makewise.bat b/distrib/msw/makewise.bat index dc124c56b7..05a31dd404 100755 --- a/distrib/msw/makewise.bat +++ b/distrib/msw/makewise.bat @@ -22,7 +22,11 @@ set len=%@LINES[%TEMP\files1.tmp] erase /Y %TEMP\files2.tmp Rem, first add system files -cat %WXWIN\distrib\msw\wisesys.txt > %temp\files2.tmp +Rem NB: not doing this for now, because I'm not sure which are the right files +Rem for Win9x/NT/W2K +Rem cat %WXWIN\distrib\msw\wisesys.txt > %temp\files2.tmp + +echo. > %temp\files2.tmp do i = 0 to %len by 1 set line=%@LINE[%TEMP\files1.tmp,%i] diff --git a/distrib/msw/motif.rsp b/distrib/msw/motif.rsp index db6bd0600f..80fcea626e 100644 --- a/distrib/msw/motif.rsp +++ b/distrib/msw/motif.rsp @@ -29,6 +29,7 @@ include/wx/motif/*.h include/install-sh include/wx/install-sh +docs/base/*.txt docs/motif/*.txt docs/motif/makewxmotif diff --git a/distrib/msw/msw.rsp b/distrib/msw/msw.rsp index c03417682f..cd4387562d 100644 --- a/distrib/msw/msw.rsp +++ b/distrib/msw/msw.rsp @@ -8,6 +8,7 @@ lib/watcom/*.bat lib/bcc16/*.lib docs/licence.txt +docs/base/*.txt docs/msw/*.txt docs/wine/*.txt docs/wine/COPYING.LIB @@ -15,9 +16,13 @@ docs/wine/COPYING.LIB distrib/msw/*.rsp distrib/msw/*.bat -tools/gettext/xgettext.exe -tools/gettext/msgfmt.exe -tools/gettext/msgunfmt.exe +tools/gettext/*.exe +tools/gettext/*.sed + +wxBase.dsp +wxBase.dsw +wxBaseDll.dsp +wxBaseDll.dsw src/makeb32.env src/makeprog.b32 @@ -54,6 +59,7 @@ src/common/dosyacc.c src/common/doslex.c src/common/y_tab.c src/common/lex_yy.c +src/common/*.rc src/msw/*.cpp src/msw/*.h diff --git a/distrib/msw/ogl.rsp b/distrib/msw/ogl.rsp index 626702ed4f..730a69dede 100644 --- a/distrib/msw/ogl.rsp +++ b/distrib/msw/ogl.rsp @@ -23,7 +23,15 @@ contrib/src/ogl/*.rc contrib/src/ogl/*.def contrib/src/ogl/*.xbm contrib/src/ogl/*.xpm -contrib/src/ogl/make*.* +contrib/src/ogl/makefile.vc +contrib/src/ogl/makefile.bcc +contrib/src/ogl/makefile.b32 +contrib/src/ogl/makefile.wat +contrib/src/ogl/makefile.g95 +contrib/src/ogl/makefile.unx +contrib/src/ogl/makefile.dos +contrib/src/ogl/makefile.vms +contrib/src/ogl/Makefile.in contrib/src/ogl/*.txt contrib/src/ogl/*.ico contrib/src/ogl/*.bmp @@ -35,8 +43,15 @@ contrib/samples/ogl/ogledit/*.h contrib/samples/ogl/ogledit/*.rc contrib/samples/ogl/ogledit/*.def contrib/samples/ogl/ogledit/*.xbm -contrib/samples/ogl/ogledit/make*.* -contrib/samples/ogl/ogledit/Makefile +contrib/samples/ogl/ogledit/makefile.vc +contrib/samples/ogl/ogledit/makefile.bcc +contrib/samples/ogl/ogledit/makefile.b32 +contrib/samples/ogl/ogledit/makefile.wat +contrib/samples/ogl/ogledit/makefile.g95 +contrib/samples/ogl/ogledit/makefile.unx +contrib/samples/ogl/ogledit/makefile.dos +contrib/samples/ogl/ogledit/makefile.vms +contrib/samples/ogl/ogledit/Makefile.in contrib/samples/ogl/ogledit/*.txt contrib/samples/ogl/ogledit/*.ico contrib/samples/ogl/ogledit/*.bmp @@ -53,8 +68,15 @@ contrib/samples/ogl/studio/*.h contrib/samples/ogl/studio/*.rc contrib/samples/ogl/studio/*.def contrib/samples/ogl/studio/*.xbm -contrib/samples/ogl/studio/make*.* -contrib/samples/ogl/studio/Makefile +contrib/samples/ogl/studio/makefile.vc +contrib/samples/ogl/studio/makefile.bcc +contrib/samples/ogl/studio/makefile.b32 +contrib/samples/ogl/studio/makefile.wat +contrib/samples/ogl/studio/makefile.g95 +contrib/samples/ogl/studio/makefile.unx +contrib/samples/ogl/studio/makefile.dos +contrib/samples/ogl/studio/makefile.vms +contrib/samples/ogl/studio/Makefile.in contrib/samples/ogl/studio/*.txt contrib/samples/ogl/studio/*.ico contrib/samples/ogl/studio/*.bmp diff --git a/distrib/msw/patch.rsp b/distrib/msw/patch.rsp index 80185ac474..58c7ffe9b4 100644 --- a/distrib/msw/patch.rsp +++ b/distrib/msw/patch.rsp @@ -1,16 +1,31 @@ -include/wx/wxchar.h -include/wx/msw/setup.h -samples/dnd/*.wxr -src/unix/fontutil.cpp -src/common/fontmap.cpp -src/msw/statbox.cpp -include/wx/msw/statbox.h -utils/ogl/samples/ogledit/palette.cpp -utils/ogl/samples/studio/shapes.cpp -utils/ogl/samples/studio/shapes.h -utils/ogl/samples/studio/studio.h -utils/dialoged/src/dialoged.cpp -utils/dialoged/src/dlghndlr.cpp -utils/dialoged/src/reseditr.cpp -utils/dialoged/src/dialoged.h +include/wx/datetime.inl +include/wx/sckipc.h +include/wx/ipcbase.h +include/wx/gtk/pen.h +include/wx/defs.h +include/wx/version.h +include/wx/generic/grid.h +src/msw/treectrl.cpp +src/common/sckipc.cpp +src/common/intl.cpp +src/gtk/frame.cpp +src/gtk/mdi.cpp +src/motif/dialog.cpp +src/generic/scrolwin.cpp +src/generic/listctrl.cpp +src/generic/grid.cpp +src/gtk/settings.cpp +samples/treectrl/TreectrlVC.dsp +samples/treectrl/treectrl.cpp +samples/sockets/client.g95 +samples/sockets/server.g95 +samples/ipc/client.g95 +samples/ipc/server.g95 +samples/wizard/WizardVC.dsp + +src/xpm/makefile.b32 +configure +configure.in +docs/msw/install.txt +src/makewat.env diff --git a/distrib/msw/tardist b/distrib/msw/tardist index 72b1df566e..f93757f4d1 100644 --- a/distrib/msw/tardist +++ b/distrib/msw/tardist @@ -2,17 +2,47 @@ # tardist: make up a tar.gz distribution of wxWindows 2 # Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver) +# We can't use e.g. this: +# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip +# because there's not enough space on the command line, plus we need to ignore the +# blank lines. + +expandlines() +{ + toexpand=$1 + outputfile=$2 + + rm -f $outputfile + touch $outputfile + for line in `cat $toexpand` ; do + if [ "$line" != "" ]; then + ls $line >> $outputfile + fi + done +} + + init="" -if [ $1 = "" ] +if [ "$1" = "" ] then + echo Usage: tardist wx-dir output-dir version exit fi -if [ $2 = "" ] +if [ "$2" = "" ] then + echo Usage: tardist wx-dir output-dir version exit fi +if [ "$3" = "" ] +then + echo Usage: tardist wx-dir output-dir version + exit +fi + +WXVER=$3 + echo About to archive wxWindows: echo From $1 echo To $2 @@ -24,85 +54,88 @@ cd $1 echo Removing backup files... rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ -rm -f $2/wx200*.tgz -rm -f $2/tex2rtf2.tgz -rm -f $2/ogl3.tgz -rm -f $2/treedraw.tar.gz -rm -f $2/glcanvas.tar.gz -rm -f $2/jpeg.tgz +rm -f $2/wx*-${WXVER}*.tgz +rm -f $2/tex2rtf2-*.tgz +rm -f $2/dialoged-*.tgz +rm -f $2/ogl3-*.tgz +rm -f $2/jpeg-*.tgz +rm -f $2/tiff-*.tgz +rm -f $2/stc-*.tgz +rm -f $2/canvas-*.tgz +rm -f $2/contrib-*.tgz echo Tarring... ### Generic ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/makefile.rsp` > /tmp/wxgen.txt -tar cvf $2/wx200gen.tar -T /tmp/wxgen.txt -gzip $2/wx200gen.tar -mv $2/wx200gen.tar.gz $2/wx200gen.tgz +tar cvf $2/wxWindows-${WXVER}-gen.tar -T /tmp/wxgen.txt +gzip $2/wxWindows-${WXVER}-gen.tar +mv $2/wxWindows-${WXVER}-gen.tar.gz $2/wxWindows-${WXVER}-gen.tgz ### wxGTK -ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/makefile.rsp` > /tmp/wxgtk.txt -tar cvf $2/wx200gtk.tar -T /tmp/wxgtk.txt -gzip $2/wx200gtk.tar -mv $2/wx200gtk.tar.gz $2/wx200gtk.tgz +ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp` > /tmp/wxgtk.txt +tar cvf $2/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt +gzip $2/wxGTK-${WXVER}.tar +mv $2/wxGTK-${WXVER}.tar.gz $2/wxGTK-${WXVER}.tgz ### wxMotif -ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/makefile.rsp` > /tmp/wxmotif.txt -tar cvf $2/wx200mot.tar -T /tmp/wxmotif.txt -gzip $2/wx200mot.tar -mv $2/wx200mot.tar.gz $2/wx200mot.tgz +ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp` > /tmp/wxmotif.txt +tar cvf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt +gzip $2/wxMotif-${WXVER}.tar +mv $2/wxMotif-${WXVER}.tar.gz $2/wxMotif-${WXVER}.tgz + +### wxMSW +ls `cat $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/bc.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp` > /tmp/wxmsw.txt +tar cvf $2/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt +gzip $2/wxMSW-${WXVER}.tar +mv $2/wxMSW-${WXVER}.tar.gz $2/wxMSW-${WXVER}.tgz ### Doc sources ls `cat $1/distrib/msw/docsrc.rsp` > /tmp/docsrc.txt -tar cvf $2/wx200doc.tar -T /tmp/docsrc.txt -gzip $2/wx200doc.tar -mv $2/wx200doc.tar.gz $2/wx200doc.tgz +tar cvf $2/wxWindows-${WXVER}-doc.tar -T /tmp/docsrc.txt +gzip $2/wxWindows-${WXVER}-doc.tar +mv $2/wxWindows-${WXVER}-doc.tar.gz $2/wxWindows-${WXVER}-doc.tgz ### HTML docs ls `cat $1/distrib/msw/wx_html.rsp` > /tmp/html.txt -tar cvf $2/wx200htm.tar -T /tmp/html.txt -gzip $2/wx200htm.tar -mv $2/wx200htm.tar.gz $2/wx200htm.tgz +tar cvf $2/wxWindows-${WXVER}-htm.tar -T /tmp/html.txt +gzip $2/wxWindows-${WXVER}-htm.tar +mv $2/wxWindows-${WXVER}-htm.tar.gz $2/wxWindows-${WXVER}-htm.tgz ### PDF docs ls `cat $1/distrib/msw/wx_pdf.rsp` > /tmp/pdf.txt -tar cvf $2/wx200pdf.tar -T /tmp/pdf.txt -gzip $2/wx200pdf.tar -mv $2/wx200pdf.tar.gz $2/wx200pdf.tgz +tar cvf $2/wxWindows-${WXVER}-pdf.tar -T /tmp/pdf.txt +gzip $2/wxWindows-${WXVER}-pdf.tar +mv $2/wxWindows-${WXVER}-pdf.tar.gz $2/wxWindows-${WXVER}-pdf.tgz ### Stubs files -ls `cat $1/distrib/msw/stubs.rsp` > /tmp/stubs.txt -tar cvf $2/wx200stubs.tar -T /tmp/stubs.txt -gzip $2/wx200stubs.tar -mv $2/wx200stubs.tar.gz $2/wx200stubs.tgz +#ls `cat $1/distrib/msw/stubs.rsp` > /tmp/stubs.txt +#tar cvf $2/wxWindows-${WXVER}-stubs.tar -T /tmp/stubs.txt +#gzip $2/wxWindows-${WXVER}-stubs.tar +#mv $2/wxWindows-${WXVER}-stubs.tar.gz $2/wxWindows-${WXVER}-stubs.tgz ### Tex2RTF ls `cat $1/distrib/msw/tex2rtf.rsp` > /tmp/tex2rtf.txt -tar cvf $2/tex2rtf2.tar -T /tmp/tex2rtf.txt -gzip $2/tex2rtf2.tar -mv $2/tex2rtf2.tar.gz $2/tex2rtf2.tgz +tar cvf $2/tex2rtf2-${WXVER}.tar -T /tmp/tex2rtf.txt +gzip $2/tex2rtf2-${WXVER}.tar +mv $2/tex2rtf2-${WXVER}.tar.gz $2/tex2rtf2-${WXVER}.tgz ### OGL ls `cat $1/distrib/msw/ogl.rsp` > /tmp/ogl.txt -tar cvf $2/ogl3.tar -T /tmp/ogl.txt -gzip $2/ogl3.tar -mv $2/ogl3.tar.gz $2/ogl3.tgz - -### wxGLCanvas -ls `cat $1/distrib/msw/glcanvas.rsp` > /tmp/glcanvas.txt -tar cvf $2/glcanvas.tar -T /tmp/glcanvas.txt -gzip $2/glcanvas.tar -mv $2/glcanvas.tar.gz $2/glcanvas.tgz - -### wxTreeLayout -ls `cat $1/distrib/msw/wxtree.rsp` > /tmp/wxtree.txt -tar cvf $2/treedraw.tar -T /tmp/wxtree.txt -gzip $2/treedraw.tar -mv $2/treedraw.tar.gz $2/treedraw.tgz +tar cvf $2/ogl3-${WXVER}.tar -T /tmp/ogl.txt +gzip $2/ogl3-${WXVER}.tar +mv $2/ogl3-${WXVER}.tar.gz $2/ogl3-${WXVER}.tgz ### JPEG ls `cat $1/distrib/msw/jpeg.rsp` > /tmp/jpeg.txt -tar cvf $2/jpeg.tar -T /tmp/jpeg.txt -gzip $2/jpeg.tar -mv $2/jpeg.tar.gz $2/jpeg.tgz +tar cvf $2/jpeg-${WXVER}.tar -T /tmp/jpeg.txt +gzip $2/jpeg-${WXVER}.tar +mv $2/jpeg-${WXVER}.tar.gz $2/jpeg-${WXVER}.tgz + +### TIFF +ls `cat $1/distrib/msw/tiff.rsp` > /tmp/tiff.txt +tar cvf $2/tiff-${WXVER}.tar -T /tmp/tiff.txt +gzip $2/tiff-${WXVER}.tar +mv $2/tiff-${WXVER}.tar.gz $2/tiff-${WXVER}.tgz echo Done! diff --git a/distrib/msw/tarwxmotif b/distrib/msw/tarwxmotif new file mode 100644 index 0000000000..b2b59be0d3 --- /dev/null +++ b/distrib/msw/tarwxmotif @@ -0,0 +1,94 @@ +#!/bin/sh +# tardist: make up a tar.gz distribution of wxWindows 2 +# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver) + +init="" +WXVER=2.2.1 +if [ $1 = "" ] +then + exit +fi + +if [ $2 = "" ] +then + exit +fi + +echo About to archive wxWindows: +echo From $1 +echo To $2 +echo CTRL-C if this is not correct. +read dummy + +cd $1 + +echo Removing backup files... +rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ + +echo Setting permissions... +chmod a+x $1/configure $1/config.sub $1/config.guess $1/samples/configure $1/demos/configure $1/contrib/configure + +rm -f $2/wxMotif-${WXVER}*.tgz +rm -f $2/wxWindows*.tgz +rm -f $2/tex2rtf2.tgz +rm -f $2/ogl3.tgz +rm -f $2/jpeg.tgz +rm -f $2/tiff.tgz + +echo Tarring... + +### wxMotif +ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/wx_html.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/utils.rsp` > /tmp/wxmotif.txt +tar cvf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt +gzip $2/wxMotif-${WXVER}.tar +mv $2/wxMotif-${WXVER}.tar.gz $2/wxMotif-${WXVER}.tgz + +### HTML docs +ls `cat $1/distrib/msw/wx_html.rsp` > /tmp/html.txt +tar cvf $2/wxWindows-${WXVER}-HTML.tar -T /tmp/html.txt +gzip $2/wxWindows-${WXVER}-HTML.tar +mv $2/wxWindows-${WXVER}-HTML.tar.gz $2/wxWindows-${WXVER}-HTML.tgz + +### HTB (wxHTML Help) docs +ls `cat $1/distrib/msw/wx_htb.rsp` > /tmp/htb.txt +tar cvf $2/wxWindows-${WXVER}-HTB.tar -T /tmp/htb.txt +gzip $2/wxWindows-${WXVER}-HTB.tar +mv $2/wxWindows-${WXVER}-HTB.tar.gz $2/wxWindows-${WXVER}-HTB.tgz + +### PDF docs +ls `cat $1/distrib/msw/wx_pdf.rsp` > /tmp/pdf.txt +tar cvf $2/wxWindows-${WXVER}-PDF.tar -T /tmp/pdf.txt +gzip $2/wxWindows-${WXVER}-PDF.tar +mv $2/wxWindows-${WXVER}-PDF.tar.gz $2/wxWindows-${WXVER}-PDF.tgz + +### Stubs files +#ls `cat $1/distrib/msw/stubs.rsp` > /tmp/stubs.txt +#tar cvf $2/wxWindows-${WXVER}-stubs.tar -T /tmp/stubs.txt +#gzip $2/wxWindows-${WXVER}-stubs.tar +#mv $2/wxWindows-${WXVER}-stubs.tar.gz $2/wxWindows-${WXVER}-stubs.tgz + +### Tex2RTF +ls `cat $1/distrib/msw/tex2rtf.rsp` > /tmp/tex2rtf.txt +tar cvf $2/tex2rtf2.tar -T /tmp/tex2rtf.txt +gzip $2/tex2rtf2.tar +mv $2/tex2rtf2.tar.gz $2/tex2rtf2.tgz + +### OGL +ls `cat $1/distrib/msw/ogl.rsp` > /tmp/ogl.txt +tar cvf $2/ogl3.tar -T /tmp/ogl.txt +gzip $2/ogl3.tar +mv $2/ogl3.tar.gz $2/ogl3.tgz + +### JPEG +#ls `cat $1/distrib/msw/jpeg.rsp` > /tmp/jpeg.txt +#tar cvf $2/jpeg.tar -T /tmp/jpeg.txt +#gzip $2/jpeg.tar +#mv $2/jpeg.tar.gz $2/jpeg.tgz + +### TIFF +#ls `cat $1/distrib/msw/tiff.rsp` > /tmp/tiff.txt +#tar cvf $2/tiff.tar -T /tmp/tiff.txt +#gzip $2/tiff.tar +#mv $2/tiff.tar.gz $2/tiff.tgz + +echo Done! diff --git a/distrib/msw/tex2rtf.rsp b/distrib/msw/tex2rtf.rsp index 536d55564c..278f47879b 100644 --- a/distrib/msw/tex2rtf.rsp +++ b/distrib/msw/tex2rtf.rsp @@ -1,7 +1,15 @@ utils/tex2rtf/Makefile.in utils/tex2rtf/src/*.cpp utils/tex2rtf/src/*.h -utils/tex2rtf/src/make*.* +utils/tex2rtf/src/makefile.vc +utils/tex2rtf/src/makefile.bcc +utils/tex2rtf/src/makefile.dos +utils/tex2rtf/src/makefile.b32 +utils/tex2rtf/src/makefile.wat +utils/tex2rtf/src/makefile.unx +utils/tex2rtf/src/makefile.vms +utils/tex2rtf/src/makefile.g95 +utils/tex2rtf/src/Makefile.in utils/tex2rtf/src/*.xbm utils/tex2rtf/src/*.xpm utils/tex2rtf/src/*.sty diff --git a/distrib/msw/tiff.rsp b/distrib/msw/tiff.rsp index 5fb9219b64..cba0610eb3 100644 --- a/distrib/msw/tiff.rsp +++ b/distrib/msw/tiff.rsp @@ -1,6 +1,6 @@ src/tiff/make* -src/tiff/tiff.dsp -src/tiff/tiff.dsw +src/tiff/TiffVC.dsp +src/tiff/TiffVC.dsw src/tiff/*.c src/tiff/*.h src/tiff/README diff --git a/distrib/msw/tmake/b32.t b/distrib/msw/tmake/b32.t index a7317f0c7c..37f85b10dc 100644 --- a/distrib/msw/tmake/b32.t +++ b/distrib/msw/tmake/b32.t @@ -39,11 +39,12 @@ foreach $file (sort keys %wxMSW) { next if $wxMSW{$file} =~ /\b16\b/; - if ( $file =~ /^automtn/ ) { - #! comment in old makefile.b32 seems to imply that this file can't - #! be compiled with Borland (leads to crash in oleauto sample) - next; - } +#! if ( $file =~ /^automtn/ ) { +#! #! comment in old makefile.b32 seems to imply that this file can not +#! #! be compiled with Borland (leads to crash in oleauto sample) +#! No longer true, at least for BC++ 5.2 +#! next; +#! } $isCFile = $file =~ /\.c$/; @@ -111,12 +112,12 @@ PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET) !endif !if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS) +PERIPH_LIBS=$(WXDIR)\lib\xpm.lib $(PERIPH_LIBS) PERIPH_TARGET=xpm $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) !endif -#PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS) +#PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(PERIPH_LIBS) PERIPH_LIBS= PERIPH_TARGET=zlib png jpeg tiff $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff $(PERIPH_CLEAN_TARGET) @@ -125,7 +126,7 @@ PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff $(PERIPH_CLEAN_TA DUMMY=dummy !else DUMMY=dummydll -LIBS= cw32 import32 ole2w32 +LIBS= cw32mti import32 ole2w32 odbc32 xpm zlib winpng jpeg tiff !endif LIBTARGET=$(WXLIB) @@ -163,7 +164,6 @@ OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) default: wx -#wx: $(CFG) $(LNKCFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) all: all_libs all_execs @@ -172,7 +172,7 @@ all: all_libs all_execs $(LIBTARGET): $(DUMMY).obj $(OBJECTS) -erase $(LIBTARGET) - tlib $(LIBTARGET) /P1024 @&&! + tlib "$(LIBTARGET)" /P1024 @&&! +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) ! @@ -181,7 +181,7 @@ $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(LIBTARGET): $(DUMMY).obj $(OBJECTS) -erase $(LIBTARGET) -erase $(WXLIBDIR)\wx.dll - tlink32 $(LINK_FLAGS) /v @&&! + $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&! c0d32.obj $(OBJECTS) $(WXLIBDIR)\wx nul @@ -343,6 +343,7 @@ clean_tiff: $(CFG): makefile.b32 copy &&! +-Hc -H=$(WXDIR)\src\msw\wx32.csm -3 -d @@ -368,13 +369,11 @@ $(DEBUG_FLAGS) $(WIN95FLAG) ! $(CFG) -#$(LNKCFG): makefile.b32 -# copy &&! -#-L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk -#! $(LNKCFG) - clean: $(PERIPH_CLEAN_TARGET) -erase $(LIBTARGET) + -erase $(WXLIBDIR)\wx.dll + -erase $(WXLIBDIR)\wx.tds + -erase $(WXLIBDIR)\wx.il? -erase *.obj -erase *.pch -erase *.csm diff --git a/distrib/msw/tmake/base.t b/distrib/msw/tmake/base.t index eabcdf40da..e9f7deda00 100644 --- a/distrib/msw/tmake/base.t +++ b/distrib/msw/tmake/base.t @@ -44,6 +44,17 @@ $project{"BASE_UNIX_DEPS"} .= $filedep . " "; } + foreach $file (sort keys %wxMSW) { + next unless $wxMSW{$file} =~ /\bB\b/; + + ($fileobj = $file) =~ s/cp?p?$/\o/; + ($filedep = $file) =~ s/cp?p?$/\d/; + + $project{"BASE_SOURCES"} .= "msw/" . $file . " "; + $project{"BASE_MSW_OBJS"} .= $fileobj . " "; + $project{"BASE_MSW_DEPS"} .= $filedep . " "; + } + #! find all our headers foreach $file (sort keys %wxWXINCLUDE) { next unless $wxWXINCLUDE{$file} =~ /\bB\b/; @@ -57,6 +68,12 @@ $project{"BASE_HEADERS"} .= "unix/" . $file . " " } + foreach $file (sort keys %wxMSWINCLUDE) { + next unless $wxMSWINCLUDE{$file} =~ /\bB\b/; + + $project{"BASE_HEADERS"} .= "msw/" . $file . " " + } + foreach $file (sort keys %wxPROTOCOLINCLUDE) { next unless $wxPROTOCOLINCLUDE{$file} =~ /\bB\b/; @@ -80,5 +97,12 @@ BASE_DEPS = \ BASE_UNIX_OBJS = \ #$ ExpandList("BASE_UNIX_OBJS"); -BASE_DEPS = \ - #$ ExpandList("BASE_DEPS"); +BASE_UNIX_DEPS = \ + #$ ExpandList("BASE_UNIX_DEPS"); + +BASE_MSW_OBJS = \ + #$ ExpandList("BASE_MSW_OBJS"); + +BASE_MSW_DEPS = \ + #$ ExpandList("BASE_MSW_DEPS"); + diff --git a/distrib/msw/tmake/filelist.t b/distrib/msw/tmake/filelist.t index 7cd700b24f..3c9a59f707 100644 --- a/distrib/msw/tmake/filelist.t +++ b/distrib/msw/tmake/filelist.t @@ -59,6 +59,8 @@ $wxHTMLINCLUDE{$fields[0]} = $fields[2]; } elsif ( $fields[1] eq "F" ) { $wxMOTIFINCLUDE{$fields[0]} = $fields[2]; + } elsif ( $fields[1] eq "9" && $fields[2] eq "O" ) { + $wxOLEINCLUDE{$fields[0]} = $fields[2]; } elsif ( $fields[1] eq "9" ) { $wxMSWINCLUDE{$fields[0]} = $fields[2]; } elsif ( $fields[1] eq "K" ) { diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index ca215871f1..2c7516cc18 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -123,7 +123,7 @@ docmdi.cpp C docview.cpp C dynarray.cpp C B dynlib.cpp C B -encconv.cpp C +encconv.cpp C B event.cpp C B extended.c C B ffile.cpp C B @@ -132,7 +132,7 @@ fileconf.cpp C B filefn.cpp C B filesys.cpp C B fontcmn.cpp C -fontmap.cpp C +fontmap.cpp C B framecmn.cpp C fs_inet.cpp C B fs_zip.cpp C B @@ -253,6 +253,7 @@ gaugemsw.cpp M 16 gdiimage.cpp M gdiobj.cpp M glcanvas.cpp M +helpchm.cpp M 32 helpwin.cpp M icon.cpp M imaglist.cpp M 32 @@ -349,6 +350,7 @@ frame.cpp R gauge.cpp R gdiobj.cpp R icon.cpp R +joystick.cpp R listbox.cpp R main.cpp R mdi.cpp R @@ -407,6 +409,7 @@ gauge.cpp X gdiobj.cpp X glcanvas.cpp X icon.cpp X +joystick.cpp X listbox.cpp X main.cpp X mdi.cpp X @@ -585,7 +588,7 @@ docview.h W dragimag.h W dynarray.h W B dynlib.h W B -encconv.h W +encconv.h W B event.h W B expr.h W ffile.h W B @@ -596,10 +599,11 @@ filefn.h W B filesys.h W B font.h W fontdlg.h W +fontenc.h W B fontenum.h W -fontmap.h W +fontmap.h W B fontdlg.h W -fontutil.h W +fontutil.h W B frame.h W fs_inet.h W B fs_zip.h W B @@ -683,7 +687,6 @@ scrolbar.h W scrolwin.h W serbase.h W B settings.h W -setup.h W B sizer.h W slider.h W socket.h W B @@ -817,7 +820,6 @@ control.h F cursor.h F dataform.h F dataobj.h F -dataobj2.h F dc.h F dcclient.h F dcmemory.h F @@ -901,6 +903,7 @@ gaugemsw.h 9 gdiimage.h 9 gdiobj.h 9 glcanvas.h 9 +helpchm.h 9 helpwin.h 9 icon.h 9 imaglist.h 9 @@ -934,6 +937,7 @@ slider.h 9 slider95.h 9 slidrmsw.h 9 spinbutt.h 9 +spinctrl.h 9 statbmp.h 9 statbox.h 9 statbr95.h 9 @@ -977,6 +981,15 @@ xpmhand.h 9 # disable.bmp 9 # wx.rc 9 +automtn.h 9 O +dataform.h 9 O +dataobj.h 9 O +dataobj2.h 9 O +dropsrc.h 9 O +droptgt.h 9 O +oleutils.h 9 O +uuid.h 9 O + accel.h 2 dataobj.h 2 helpwin.h 2 diff --git a/distrib/msw/tmake/g95.t b/distrib/msw/tmake/g95.t index d830757770..5f951bea22 100644 --- a/distrib/msw/tmake/g95.t +++ b/distrib/msw/tmake/g95.t @@ -236,25 +236,26 @@ JPEGOBJS = \ $(JPEGDIR)/jquant2.$(OBJSUFF) \ $(JPEGDIR)/jdmerge.$(OBJSUFF) -XPMOBJS = $(XPMDIR)/attrib.o\ - $(XPMDIR)/crbuffri.o\ - $(XPMDIR)/crdatfri.o\ +# NOTE: these filenames are case sensitive! +XPMOBJS = $(XPMDIR)/Attrib.o\ + $(XPMDIR)/CrBufFrI.o\ + $(XPMDIR)/CrDatFrI.o\ $(XPMDIR)/create.o\ - $(XPMDIR)/crifrbuf.o\ - $(XPMDIR)/crifrdat.o\ + $(XPMDIR)/CrIFrBuf.o\ + $(XPMDIR)/CrIFrDat.o\ $(XPMDIR)/data.o\ - $(XPMDIR)/image.o\ - $(XPMDIR)/info.o\ + $(XPMDIR)/Image.o\ + $(XPMDIR)/Info.o\ $(XPMDIR)/hashtab.o\ $(XPMDIR)/misc.o\ $(XPMDIR)/parse.o\ - $(XPMDIR)/rdftodat.o\ - $(XPMDIR)/rdftoi.o\ + $(XPMDIR)/RdFToDat.o\ + $(XPMDIR)/RdFToI.o\ $(XPMDIR)/rgb.o\ $(XPMDIR)/scan.o\ $(XPMDIR)/simx.o\ - $(XPMDIR)/wrffrdat.o\ - $(XPMDIR)/wrffri.o + $(XPMDIR)/WrFFrDat.o\ + $(XPMDIR)/WrFFrI.o TIFFOBJS = $(TIFFDIR)/tif_aux.o \ $(TIFFDIR)/tif_close.o \ @@ -441,6 +442,8 @@ clean: -$(RM) ../xpm/*.bak -$(RM) ../tiff/*.o -$(RM) ../tiff/*.bak + +cleanall: clean -$(RM) $(WXLIB) -$(RM) $(ZLIBLIB) -$(RM) $(PNGLIB) @@ -457,7 +460,3 @@ ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes" endif endif - -cleanall: clean - - diff --git a/distrib/msw/tmake/msw.t b/distrib/msw/tmake/msw.t index 48b489b93c..8059977fcc 100644 --- a/distrib/msw/tmake/msw.t +++ b/distrib/msw/tmake/msw.t @@ -39,15 +39,20 @@ } foreach $file (sort keys %wxMSW) { - #! OLE files can'be compiled with mingw32 yet - next if $wxMSW{$file} =~ /\b(O|16)\b/; + next if $wxMSW{$file} =~ /\b16\b/; ($fileobj = $file) =~ s/cp?p?$/\o/; ($filedep = $file) =~ s/cp?p?$/\d/; - - $project{"MSW_SOURCES"} .= "msw/" . $file . " "; - $project{"GUIOBJS"} .= $fileobj . " "; - $project{"GUIDEPS"} .= $filedep . " " + + if( $wxMSW{$file} =~ /\bO\b/ ) { + $project{"MSW_SOURCES"} .= "msw/ole/" . $file . " "; + $project{"OLEOBJS"} .= $fileobj . " "; + $project{"OLEDEPS"} .= $filedep . " "; + } else { + $project{"MSW_SOURCES"} .= "msw/" . $file . " "; + $project{"GUIOBJS"} .= $fileobj . " "; + $project{"GUIDEPS"} .= $filedep . " "; + } } foreach $file (sort keys %wxHTML) { @@ -67,6 +72,10 @@ $project{"MSW_HEADERS"} .= "msw/" . $file . " " } + foreach $file (sort keys %wxOLEINCLUDE) { + $project{"MSW_HEADERS"} .= "msw/ole/" . $file . " "; + } + foreach $file (sort keys %wxGENERICINCLUDE) { $project{"MSW_HEADERS"} .= "generic/" . $file . " " } @@ -121,6 +130,12 @@ HTMLOBJS = \ HTMLDEPS = \ #$ ExpandList("HTMLDEPS"); +OLEOBJS = \ + #$ ExpandList("OLEOBJS"); + +OLEDEPS = \ + #$ ExpandList("OLEDEPS"); + IODBCOBJS = \ #$ ExpandList("IODBCOBJS"); diff --git a/distrib/msw/tmake/vc.t b/distrib/msw/tmake/vc.t index 97f19d896b..07f2f6b67b 100644 --- a/distrib/msw/tmake/vc.t +++ b/distrib/msw/tmake/vc.t @@ -79,9 +79,6 @@ LIBTARGET=$(WXLIB) DUMMYOBJ=$D\dummy.obj !endif -# Please set these according to the settings in setup.h, so we can include -# the appropriate libraries in wx.lib - # This one overrides the others, to be consistent with the settings in setup.h MINIMAL_WXWINDOWS_SETUP=0 @@ -89,6 +86,9 @@ PERIPH_LIBS= PERIPH_TARGET= PERIPH_CLEAN_TARGET= +# Set to 0 if not using GLCanvas (only affects DLL build) +USE_GLCANVAS=1 + # These are absolute paths, so that the compiler # generates correct __FILE__ symbols for debugging. # Otherwise you don't be able to double-click on a memory @@ -235,6 +235,7 @@ $(WXDIR)\lib\$(WXLIBNAME).lib: $(DUMMYOBJ) $(OBJECTS) !if "$(USE_GLCANVAS)" == "1" GL_LIBS=opengl32.lib glu32.lib +# GL_LIBS_DELAY=/delayload:opengl32.dll !endif # Update the dynamic link library @@ -243,10 +244,15 @@ $(WXDIR)\lib\$(WXLIBNAME).dll: $(DUMMYOBJ) $(OBJECTS) $(LINKFLAGS) -out:$(WXDIR)\lib\$(WXLIBNAME).dll $(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\xpm$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib + delayimp.lib + /delayload:ws2_32.dll /delayload:advapi32.dll /delayload:user32.dll /delayload:gdi32.dll + /delayload:comdlg32.dll /delayload:shell32.dll /delayload:comctl32.dll /delayload:ole32.dll + /delayload:oleaut32.dll /delayload:rpcrt4.dll $(GL_LIBS_DELAY) << !endif +# /delayload:winmm.dll # Removed because it can cause a crash for some people ######################################################## # Windows-specific objects @@ -409,7 +415,7 @@ rcparser: nmake -f makefile.vc FINAL=$(FINAL) cd $(WXDIR)\src\msw -cleanall: clean_png clean_zlib clean_xpm clean_jpeg clean_tiff +cleanall: clean clean_png clean_zlib clean_xpm clean_jpeg clean_tiff -erase ..\..\lib\wx$(WXVERSION)$(LIBEXT).dll -erase ..\..\lib\wx$(WXVERSION)$(LIBEXT).lib -erase ..\..\lib\wx$(WXVERSION)$(LIBEXT).exp @@ -448,7 +454,7 @@ clean: $(PERIPH_CLEAN_TARGET) # Making documents -docs: allhlp allhtml allpdfrtf +docs: allhlp allhtml allpdfrtf allhtb allhtmlhelp alldocs: docs hlp: wxhlp wxhlp: $(DOCDIR)/winhelp/wx.hlp @@ -457,8 +463,9 @@ rtf: $(DOCDIR)/winhelp/wx.rtf pdfrtf: $(DOCDIR)/pdf/wx.rtf refpdfrtf: $(DOCDIR)/pdf/techref.rtf html: wxhtml +htb: $(DOCDIR)\htb\wx.htb wxhtml: $(DOCDIR)\html\wx\wx.htm -htmlhelp: $(DOCDIR)\html\wx\wx.chm +htmlhelp: $(DOCDIR)\htmlhelp\wx.chm ps: wxps referencps wxps: $(WXDIR)\docs\ps\wx.ps referencps: $(WXDIR)\docs\ps\referenc.ps @@ -466,12 +473,12 @@ referencps: $(WXDIR)\docs\ps\referenc.ps allhlp: wxhlp cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc hlp + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc hlp cd $(THISDIR) # cd $(WXDIR)\utils\wxhelp\src # nmake -f makefile.vc hlp -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.vc hlp # cd $(WXDIR)\utils\wxgraph\src # nmake -f makefile.vc hlp # cd $(WXDIR)\utils\wxchart\src @@ -486,6 +493,22 @@ allhlp: wxhlp allhtml: wxhtml cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc html + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc html + cd $(THISDIR) + +allhtmlhelp: htmlhelp + cd $(WXDIR)\utils\dialoged\src + nmake -f makefile.vc htmlhelp + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc htmlhelp + cd $(THISDIR) + +allhtb: htb + cd $(WXDIR)\utils\dialoged\src + nmake -f makefile.vc htb + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc htb cd $(THISDIR) # nmake -f makefile.vc html @@ -495,8 +518,6 @@ allhtml: wxhtml # nmake -f makefile.vc html # cd $(WXDIR)\utils\wxhelp\src # nmake -f makefile.vc html -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.vc html # cd $(WXDIR)\utils\wxgraph\src # nmake -f makefile.vc html # cd $(WXDIR)\utils\wxchart\src @@ -507,11 +528,15 @@ allhtml: wxhtml allps: wxps referencps cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc ps + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc ps cd $(THISDIR) allpdfrtf: pdfrtf cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc pdfrtf + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc pdfrtf cd $(THISDIR) # cd $(WXDIR)\utils\wxhelp\src @@ -569,6 +594,7 @@ $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex cd $(DOCDIR)\latex\wx -mkdir $(DOCDIR)\html\wx + copy *.gif $(DOCDIR)\html\wx -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html -erase $(DOCDIR)\html\wx\*.con -erase $(DOCDIR)\html\wx\*.ref @@ -576,9 +602,11 @@ $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex -erase $(DOCDIR)\latex\wx\*.ref cd $(THISDIR) -$(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp +$(DOCDIR)\htmlhelp\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp cd $(DOCDIR)\html\wx -hhc wx.hhp + -mkdir ..\..\htmlhelp + move wx.chm ..\..\htmlhelp cd $(THISDIR) $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex @@ -617,11 +645,12 @@ $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi # files, renamed to htb. # This can then be used with e.g. helpview. # Optionally, a cached version of the .hhp file can be generated with hhp2cached. -htb: +$(DOCDIR)\htb\wx.htb: $(DOCDIR)\html\wx\wx.htm cd $(WXDIR)\docs\html\wx -erase /Y wx.zip wx.htb zip32 wx.zip *.htm *.gif *.hhp *.hhc *.hhk - ren wx.zip wx.htb + -mkdir $(DOCDIR)\htb + move wx.zip $(DOCDIR)\htb\wx.htb cd $(THISDIR) # In order to force document reprocessing @@ -630,6 +659,13 @@ touchmanual: updatedocs: touchmanual alldocs +cleandocs: + -erase /Y $(DOCDIR)\html\wx\wx.htm + -erase /Y $(DOCDIR)\pdf\wx.rtf + -erase /Y $(DOCDIR)\latex\wx\wx.rtf + -erase /Y $(DOCDIR)\htmlhelp\wx.chm + -erase /Y $(DOCDIR)\htb\wx.htb + # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the # Office StartUp folder, and PDFMaker should be installed. updatepdf: # touchmanual pdfrtf diff --git a/distrib/msw/tmake/vc6.t b/distrib/msw/tmake/vc6.t index 665f35329a..bda8a3ec39 100644 --- a/distrib/msw/tmake/vc6.t +++ b/distrib/msw/tmake/vc6.t @@ -37,28 +37,41 @@ next if $wxHTML{$file} =~ /\b16\b/; $project{"WXHTMLSRCS"} .= $file . " " } + + $project{"WX_CFLAGS"} = '/D wxUSE_GUI=1 /D WIN95=1 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN32__"'; + if ( Config("unicode") ) { + $project{"OUTDIR_SUFFIX"} = "Unicode"; + $project{"WX_CFLAGS"} .= " /D _UNICODE /D UNICODE"; + $project{"PROJECTNAME"} = "wxWindowsU"; + } + else { + $project{"OUTDIR_SUFFIX"} = ""; + $project{"PROJECTNAME"} = "wxWindows"; + } + + $project{"MAKEFILE"} = $project{"PROJECTNAME"} . ".mak"; #$} -# Microsoft Developer Studio Project File - Name="wxWindows" - Package Owner=<4> +# Microsoft Developer Studio Project File - #$ Substitute('Name="$$PROJECTNAME" - Package Owner=<4>'); # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 -CFG=wxWindows - Win32 Debug +CFG=#$ Substitute('$$PROJECTNAME - Win32 Debug'); !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE -!MESSAGE NMAKE /f "wxWindows.mak". +!MESSAGE NMAKE /f "#$ ExpandGlue('MAKEFILE','','','".'); !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "wxWindows.mak" CFG="wxWindows - Win32 Debug" +!MESSAGE NMAKE /f #$ Substitute('"$$MAKEFILE" CFG="$$PROJECTNAME - Win32 Debug"'); !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "wxWindows - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "wxWindows - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE #$ Substitute('"$$PROJECTNAME - Win32 Release" (based on "Win32 (x86) Static Library")'); +!MESSAGE #$ Substitute('"$$PROJECTNAME - Win32 Debug" (based on "Win32 (x86) Static Library")'); !MESSAGE # Begin Project @@ -68,20 +81,20 @@ CFG=wxWindows - Win32 Debug CPP=cl.exe RSC=rc.exe -!IF "$(CFG)" == "wxWindows - Win32 Release" +!IF "$(CFG)" == #$ Substitute('"$$PROJECTNAME - Win32 Release"'); # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" +# PROP BASE Output_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); +# PROP BASE Intermediate_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" +# PROP Output_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); +# PROP Intermediate_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); # PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c -# ADD CPP /nologo /MT /W4 /Zi /O2 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=1 /D WIN95=1 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN32__" /D "_MT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c +# ADD CPP /nologo /MD /W4 /Zi /O2 /I "$(wx)\include" /I "$(wx)\src\zlib" /I "$(wx)\src\jpeg" /I "$(wx)\src\png" /I "$(wx)\src\tiff" /D "NDEBUG" /D "_MT" #$ Substitute('$$WX_CFLAGS /Yu"wx/wxprec.h" /FD /c'); # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -91,20 +104,20 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo -!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug" +!ELSEIF "$(CFG)" == #$ Substitute('"$$PROJECTNAME - Win32 Debug"'); # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Output_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); +# PROP BASE Intermediate_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" +# PROP Output_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); +# PROP Intermediate_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); # PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" -D "_MT" /YX /FD /c -# ADD CPP /nologo /MTd /W4 /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D DEBUG=1 /D WXDEBUG=1 /D "__WXDEBUG__" /D wxUSE_GUI=1 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /Fr /D "_MT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" -D "_MT" /YX /FD /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /I "$(wx)\src\jpeg" /I "$(wx)\src\png" /I "$(wx)\src\tiff" /D "_DEBUG" /D DEBUG=1 /D WXDEBUG=1 /D "__WXDEBUG__" /D "_MT" #$ Substitute('$$WX_CFLAGS /Yu"wx/wxprec.h" /FD /c'); # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -118,8 +131,8 @@ LIB32=link.exe -lib # Begin Target -# Name "wxWindows - Win32 Release" -# Name "wxWindows - Win32 Debug" +# Name #$Substitute('"$$PROJECTNAME - Win32 Release"'); +# Name #$Substitute('"$$PROJECTNAME - Win32 Debug"'); # PROP Default_Filter "" # Begin Source File @@ -139,17 +152,8 @@ SOURCE=.\src\msw\dummy.cpp SOURCE=.\src\common\y_tab.c -!IF "$(CFG)" == "wxWindows - Win32 Release" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug" - # ADD CPP /W1 # SUBTRACT CPP /YX /Yc /Yu - -!ENDIF - # End Source File # End Target # End Project diff --git a/distrib/msw/tmake/vc6base.t b/distrib/msw/tmake/vc6base.t index 3c40d7c4c4..def3c4434f 100644 --- a/distrib/msw/tmake/vc6base.t +++ b/distrib/msw/tmake/vc6base.t @@ -73,8 +73,8 @@ RSC=rc.exe # PROP Output_Dir "BaseRelease" # PROP Intermediate_Dir "BaseRelease" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c -# ADD CPP /nologo /MT /W4 /Zi /O2 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D WIN95=1 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN32__" /D "_MT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c +# ADD CPP /nologo /MD /W4 /Zi /O1 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D WIN95=1 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN32__" /D "_MT" /Yu"wx/wxprec.h" /FD /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -96,8 +96,8 @@ LIB32=link.exe -lib # PROP Output_Dir "BaseDebug" # PROP Intermediate_Dir "BaseDebug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c -# ADD CPP /nologo /MTd /W4 /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D DEBUG=1 /D WXDEBUG=1 /D "__WXDEBUG__" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /Fr /Yu"wx/wxprec.h" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D DEBUG=1 /D WXDEBUG=1 /D "__WXDEBUG__" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /Yu"wx/wxprec.h" /FD /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -125,21 +125,5 @@ SOURCE=.\src\msw\dummy.cpp #$ ExpandGlue("WXCSRCS", "# Begin Source File\n\nSOURCE=.\\src\\common\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n# Begin Source File\n\nSOURCE=.\\src\\common\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n"); #$ ExpandGlue("WXMSWCSRCS", "# Begin Source File\n\nSOURCE=.\\src\\msw\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n# Begin Source File\n\nSOURCE=.\\src\\msw\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n"); -# Begin Source File - -SOURCE=.\src\common\y_tab.c - -!IF "$(CFG)" == "wxBase - Win32 Release" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "wxBase - Win32 Debug" - -# ADD CPP /W1 -# SUBTRACT CPP /YX /Yc /Yu - -!ENDIF - -# End Source File # End Target # End Project diff --git a/distrib/msw/tmake/vc6bdll.t b/distrib/msw/tmake/vc6bdll.t new file mode 100644 index 0000000000..11de8c0276 --- /dev/null +++ b/distrib/msw/tmake/vc6bdll.t @@ -0,0 +1,137 @@ +#!############################################################################# +#! File: vc6bdll.t +#! Purpose: tmake template file from which wxBaseDll.dsp is generated by running +#! tmake -t vc6bdll wxwin.pro -o wxBaseDll.dsp +#! Author: Vadim Zeitlin +#! Created: 22.03.00 +#! Version: $Id$ +#!############################################################################# +#${ + #! include the code which parses filelist.txt file and initializes + #! %wxCommon, %wxGeneric and %wxMSW hashes. + IncludeTemplate("filelist.t"); + + #! now transform these hashes into $project tags + foreach $file (sort keys %wxCommon) { + next if $wxCommon{$file} !~ /\bB\b/; + + my $tag = $file =~ /\.c$/ ? "WXCSRCS" : "WXCOMMONSRCS"; + $project{$tag} .= $file . " " + } + + foreach $file (sort keys %wxMSW) { + next if $wxMSW{$file} !~ /\bB\b/; + + my $tag = $file =~ /\.c$/ ? "WXMSWCSRCS" : "WXMSWSRCS"; + $project{$tag} .= $file . " " + } + + foreach $file (sort keys %wxBase) { + my $tag = $file =~ /\.c$/ ? "WXCSRCS" : "WXCOMMONSRCS"; + $project{$tag} .= $file . " " + } +#$} +# Microsoft Developer Studio Project File - Name="wxBaseDll" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=wxBaseDll - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "wxBaseDll.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "wxBaseDll.mak" CFG="wxBaseDll - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "wxBaseDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "wxBaseDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "wxBaseDll - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "BaseReleaseDll" +# PROP Intermediate_Dir "BaseReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W4 /O1 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "$(wx)\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"BaseReleaseDll/wxbase221.dll" +# ADD LINK32 kernel32.lib user32.lib advapi32.lib wsock32.lib /nologo /version:2.2 /dll /machine:I386 /out:"BaseReleaseDll/wxbase221.dll" + +!ELSEIF "$(CFG)" == "wxBaseDll - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "BaseDebugDll" +# PROP Intermediate_Dir "BaseDebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /D "WXMAKINGDLL" /D "__WXDEBUG__" /Yu"wx/wxprec.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "$(wx)\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"BaseDebugDll/wxbase221d.dll" +# ADD LINK32 kernel32.lib user32.lib advapi32.lib wsock32.lib /nologo /version:2.2 /dll /debug /machine:I386 /pdbtype:sept /out:"BaseDebugDll/wxbase221d.dll" + +!ENDIF + +# Begin Target + +# Name "wxBaseDll - Win32 Release" +# Name "wxBaseDll - Win32 Debug" +# Begin Source File + +SOURCE=.\src\common\base.rc +# End Source File +# Begin Source File + +SOURCE=.\src\msw\dummydll.cpp +# ADD CPP /Yc"wx/wxprec.h" +# End Source File +#$ ExpandGlue("WXCOMMONSRCS", "# Begin Source File\n\nSOURCE=.\\src\\common\\", "\n# End Source File\n# Begin Source File\n\nSOURCE=.\\src\\common\\", "\n# End Source File\n"); +#$ ExpandGlue("WXMSWSRCS", "# Begin Source File\n\nSOURCE=.\\src\\msw\\", "\n# End Source File\n# Begin Source File\n\nSOURCE=.\\src\\msw\\", "\n# End Source File\n"); +#$ ExpandGlue("WXCSRCS", "# Begin Source File\n\nSOURCE=.\\src\\common\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n# Begin Source File\n\nSOURCE=.\\src\\common\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n"); +#$ ExpandGlue("WXMSWCSRCS", "# Begin Source File\n\nSOURCE=.\\src\\msw\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n# Begin Source File\n\nSOURCE=.\\src\\msw\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n"); +# End Target +# End Project diff --git a/distrib/msw/tmake/vc6dll.t b/distrib/msw/tmake/vc6dll.t index 247c3c66c0..7669691bc9 100644 --- a/distrib/msw/tmake/vc6dll.t +++ b/distrib/msw/tmake/vc6dll.t @@ -2,8 +2,13 @@ #! File: vc6dll.t #! Purpose: tmake template file from which wxWinDll.dsp is generated by running #! tmake -t vc6dll wxwin.pro -o wxWinDll.dsp +#! +#! you may also generate the project file for the Unicode DLL build: +#! tmake -t vc6dll wxwin.pro -o wxWinDll.dsp CONFIG+=unicode +#! #! Author: Vadim Zeitlin #! Created: 13.10.99 +#! Modified:11.08.00 by VZ to allow generating wxWinDllU.dsp from ti too #! Version: $Id$ #!############################################################################# #${ @@ -37,28 +42,44 @@ next if $wxHTML{$file} =~ /\b16\b/; $project{"WXHTMLSRCS"} .= $file . " " } + + $project{"WX_CFLAGS"} = "/D __WXMSW__ /D __WIN95__ /D __WINDOWS__ /D __WIN32__ /D WXMAKINGDLL"; + if ( Config("unicode") ) { + $project{"OUTDIR_SUFFIX"} = "UnicodeDll"; + $project{"DLLNAME"} = $project{"OUTDIR_SUFFIX"} . "/wxmsw221u"; + $project{"WX_CFLAGS"} .= " /D _UNICODE /D UNICODE "; + $project{"PROJECTNAME"} = "wxWinDllU"; + } + else { + $project{"OUTDIR_SUFFIX"} = "Dll"; + $project{"DLLNAME"} = $project{"OUTDIR_SUFFIX"} . "/wxmsw221"; + $project{"PROJECTNAME"} = "wxWinDll"; + } + + $project{"MAKEFILE"} = $project{"PROJECTNAME"} . ".mak"; + $project{"DEBUG_DLLNAME"} = $project{"DLLNAME"} . "d"; #$} -# Microsoft Developer Studio Project File - Name="wxWinDll" - Package Owner=<4> +# Microsoft Developer Studio Project File - #$ Substitute('Name="$$PROJECTNAME" - Package Owner=<4>'); # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -CFG=wxWinDll - Win32 Debug +CFG=#$ Substitute('$$PROJECTNAME - Win32 Debug'); !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE -!MESSAGE NMAKE /f "wxWinDll.mak". +!MESSAGE NMAKE /f "#$ ExpandGlue('MAKEFILE','','','".'); !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "wxWinDll.mak" CFG="wxWinDll - Win32 Debug" +!MESSAGE NMAKE /f #$ Substitute('"$$MAKEFILE" CFG="$$PROJECTNAME - Win32 Debug"'); !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "wxWinDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "wxWinDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE #$ Substitute('"$$PROJECTNAME - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")'); +!MESSAGE #$ Substitute('"$$PROJECTNAME - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")'); !MESSAGE # Begin Project @@ -69,64 +90,64 @@ CPP=cl.exe MTL=midl.exe RSC=rc.exe -!IF "$(CFG)" == "wxWinDll - Win32 Release" +!IF "$(CFG)" == #$ Substitute('"$$PROJECTNAME - Win32 Release"'); # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" +# PROP BASE Output_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); +# PROP BASE Intermediate_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseDLL" -# PROP Intermediate_Dir "ReleaseDLL" +# PROP Output_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); +# PROP Intermediate_Dir #$ Substitute('"Release$$OUTDIR_SUFFIX"'); # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W4 /GX /O2 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=1 /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /D "__WXMSW__" /D "__WIN95__" /D "__WINDOWS__" /D "__WIN32__" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c +# ADD BASE CPP /nologo /MD /W4 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W4 /GX /O1 /I "$(wx)\include" /I "$(wx)\src\zlib" /I "$(wx)\src\jpeg" /I "$(wx)\src\png" /I "$(wx)\src\tiff" /D "NDEBUG" /D wxUSE_GUI=1 /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" #$ Substitute('$$WX_CFLAGS /Yu"wx/wxprec.h" /FD /c'); # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "$(wx)\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib src\png\png.lib src\xpm\xpm.lib src\zlib\zlib.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib winmm.lib src\png\png.lib src\xpm\xpm.lib src\zlib\zlib.lib /nologo /dll /machine:I386 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib src\jpeg\Release\jpeg.lib src\tiff\Release\tiff.lib src\png\Release\png.lib src\xpm\Release\xpm.lib src\zlib\Release\zlib.lib /nologo /dll /machine:I386 #$ Substitute('/out:"Release$$DLLNAME.dll"'); +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib src\jpeg\Release\jpeg.lib src\tiff\Release\tiff.lib src\png\Release\png.lib src\xpm\Release\xpm.lib src\zlib\Release\zlib.lib /nologo /dll /machine:I386 #$ Substitute('/out:"Release$$DLLNAME.dll"'); -!ELSEIF "$(CFG)" == "wxWinDll - Win32 Debug" +!ELSEIF "$(CFG)" == #$ Substitute('"$$PROJECTNAME - Win32 Debug"'); # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Output_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); +# PROP BASE Intermediate_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "DebugDLL" -# PROP Intermediate_Dir "DebugDLL" +# PROP Output_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); +# PROP Intermediate_Dir #$ Substitute('"Debug$$OUTDIR_SUFFIX"'); # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W4 /Gm /ZI /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D "__WXDEBUG__" /D wxUSE_GUI=1 /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /D "__WXMSW__" /D "__WIN95__" /D "__WINDOWS__" /D "__WIN32__" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /GZ /c +# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /I "$(wx)\src\jpeg" /I "$(wx)\src\png" /I "$(wx)\src\tiff" /D "_DEBUG" /D "__WXDEBUG__" /D wxUSE_GUI=1 /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" #$ Substitute('$$WX_CFLAGS /Yu"wx/wxprec.h" /FD /GZ /c'); # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "$(wx)\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib lib\png.lib src\png\png.lib src\xpm\xpm.lib src\zlib\zlib.lib /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib src\png\png.lib src\xpm\xpm.lib src\zlib\zlib.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib src\jpeg\Debug\jpeg.lib src\tiff\Debug\tiff.lib src\png\Debug\png.lib src\xpm\Debug\xpm.lib src\zlib\Debug\zlib.lib /dll /debug /machine:I386 /pdbtype:sept #$ Substitute('/out:"Debug$$DEBUG_DLLNAME.dll"'); +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib src\jpeg\Debug\jpeg.lib src\tiff\Debug\tiff.lib src\png\Debug\png.lib src\xpm\Debug\xpm.lib src\zlib\Debug\zlib.lib /nologo /dll /debug /machine:I386 /pdbtype:sept #$ Substitute('/out:"Debug$$DEBUG_DLLNAME.dll"'); !ENDIF # Begin Target -# Name "wxWinDll - Win32 Release" -# Name "wxWinDll - Win32 Debug" +# Name #$Substitute('"$$PROJECTNAME - Win32 Release"'); +# Name #$Substitute('"$$PROJECTNAME - Win32 Debug"'); # PROP Default_Filter "" # Begin Source File @@ -144,19 +165,16 @@ SOURCE=.\src\msw\dummydll.cpp # Begin Source File +SOURCE=.\src\msw\version.rc +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 /d "_UNICODE" +# End Source File +# Begin Source File + SOURCE=.\src\common\y_tab.c -!IF "$(CFG)" == "wxWinDll - Win32 Release" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "wxWinDll - Win32 Debug" - # ADD CPP /W1 # SUBTRACT CPP /YX /Yc /Yu - -!ENDIF - # End Source File # End Target # End Project diff --git a/distrib/msw/tmake/vcapp.t b/distrib/msw/tmake/vcapp.t new file mode 100644 index 0000000000..e54adff94a --- /dev/null +++ b/distrib/msw/tmake/vcapp.t @@ -0,0 +1,348 @@ +#! +#! This TMAKE template - Microsoft Visual C++ 6.0 applications +#! +#${ + if ( Config("qt") || Config("opengl") ) { + Project('CONFIG += windows'); + } + if ( Config("qt") ) { + $moc_aware = 1; + AddIncludePath(Project('TMAKE_INCDIR_QT')); + if ( Config("opengl") ) { + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL'); + } + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT'); + } + if ( Config("opengl") ) { + Project('TMAKE_LIBS *= $$TMAKE_LIBS_OPENGL'); + } + #! wxWindows specific things (added by VZ) + #! (1) set -I and -L options + #! (2) be sure we have the same project settings as wxWindows.dsp, here it + #! means that we must disable C++ exception handling + #! (3) define the necessary constants + if ( Config("wx") ) { + Project('CONFIG += windows'); + } + if ( Config("wxbase") ) { + Project('CONFIG += wx'); + } + if ( Config("wx") ) { + if ( Config("wxnodir") ) { + $WXDIR = "..\\.."; + } + else { + #! VC 6.0 supports env vars in include path + #! $WXDIR = $ENV{'WX'}; + if ( $ENV{'wx'} ) { $WXDIR = "\$(wx)"; } + else { $WXDIR = "\$(WXWIN)"; } + } + + AddIncludePath($WXDIR . "\\include"); + } + + if ( Config("unicode") ) { + $UNICODE="Unicode"; + $UNICODE_SUFFIX="u"; + $UNICODE_FLAGS="/D _UNICODE /D UNICODE "; + + $project{"TARGET"} .= "Unicode"; + $project{"MAKEFILE"} .= "Unicode"; + } + else { + $UNICODE=""; + $UNICODE_SUFFIX=""; + $UNICODE_FLAGS=" "; + } + + if ( Config("dll") ) { + $DLL="Dll"; + $DEBUG_SUFFIX="d"; + $DLL_OR_LIB=(Config("wxbase") ? "wxbase" : "wxmsw") . "221"; + $DLL_FLAGS="/D WXUSINGDLL "; + $EXTRA_LIBS=""; + + $project{"TARGET"} .= "Dll"; + $project{"MAKEFILE"} .= "Dll"; + } + else { + $DLL=""; + $DEBUG_SUFFIX=""; + $DLL_OR_LIB=Config("wxbase") ? "wxBase" : "wxWindows"; + $DLL_FLAGS=" "; + #! actually this depends on the contents of setup.h + $EXTRA_LIBS=Config("wxbase") ? "" : "xpm zlib png jpeg tiff"; + } + + #! let's be smarter: first of all, if no extension is given, add .lib + #! (this allows for LIBS=libname in project files which map either on + #! -l libname.lib under Windows or on -llibname under Unix). + @libs = split(/\s+/, Project('LIBS')); + foreach $lib (@libs) { + if ( $lib !~ "\.lib\$" ) { $lib .= ".lib"; } + Project('TMAKE_LIBS *= ' . $lib); + } + + if ( Config("windows") ) { + $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Application'; + $project{"VC_PROJ_CODE"} = '0x0101'; + $vc_base_libs = 'kernel32.lib user32.lib gdi32.lib winspool.lib ' . + 'comdlg32.lib advapi32.lib shell32.lib ole32.lib ' . + 'oleaut32.lib uuid.lib odbc32.lib odbccp32.lib '; + if ( Config("wx") ) { + $vc_base_libs .= "comctl32.lib rpcrt4.lib wsock32.lib "; + + $vc_link_release = "$WXDIR\\Release$UNICODE$DLL\\$DLL_OR_LIB$UNICODE_SUFFIX.lib "; + $vc_link_debug = "$WXDIR\\Debug$UNICODE$DLL\\$DLL_OR_LIB$UNICODE_SUFFIX$DEBUG_SUFFIX.lib "; + foreach ( split(/ /, $EXTRA_LIBS) ) { + $vc_link_release .= "$WXDIR\\src\\$_\\Release\\$_.lib "; + $vc_link_debug .= "$WXDIR\\src\\$_\\Debug\\$_.lib "; + } + } + $vc_link_release .= '/nologo /subsystem:windows /machine:I386'; + $vc_link_debug .= '/nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept'; + + $vc_cpp_def_common = '/D "WIN32" /D "_WINDOWS" ' . $UNICODE_FLAGS . $DLL_FLAGS; + $vc_cpp_def_release = '/D "NDEBUG" ' . $vc_cpp_def_common; + $vc_cpp_def_debug = '/D "_DEBUG" ' . $vc_cpp_def_common; + } else { + $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Console Application'; + $project{"VC_PROJ_CODE"} = '0x0103'; + $vc_base_libs = 'kernel32.lib user32.lib advapi32.lib '; + if ( Config("wx") ) { + $vc_base_libs .= 'wsock32.lib '; + $vc_link_release = "$WXDIR\\BaseRelease$UNICODE$DLL\\$DLL_OR_LIB$UNICODE_SUFFIX.lib "; + $vc_link_debug = "$WXDIR\\BaseDebug$UNICODE$DLL\\$DLL_OR_LIB$UNICODE_SUFFIX$DEBUG_SUFFIX.lib "; + } + $vc_link_release .= '/nologo /subsystem:console /machine:I386'; + $vc_link_debug .= '/nologo /subsystem:console /debug /machine:I386 /pdbtype:sept'; + + $vc_cpp_def_common = '/D "WIN32" /D "_CONSOLE" ' . $UNICODE_FLAGS . $DLL_FLAGS; + $vc_cpp_def_release = '/D "NDEBUG" ' . $vc_cpp_def_common; + $vc_cpp_def_debug = '/D "_DEBUG" ' . $vc_cpp_def_common; + } + + foreach ( split(/ /, Project('LIBPATH')) ) { + $vc_link_release .= " /libpath:$_\\Release"; + $vc_link_debug .= " /libpath:$_\\Debug"; + } + + #! define wxWin debug flags in debug build + if ( Config("wx") ) { + $vc_cpp_def_debug .= '/MDd /D "__WXDEBUG__" /D "WXDEBUG=1" '; + $vc_cpp_def_release .= '/MD ' + } + + $project{"VC_BASE_LINK_RELEASE"} = $vc_base_libs . $vc_link_release; + $project{"VC_BASE_LINK_DEBUG"} = $vc_base_libs . $vc_link_debug; + $tmake_libs = Project('TMAKE_LIBS') ? (Project('TMAKE_LIBS') . " ") : ""; + $project{"VC_LINK_RELEASE"} = $vc_base_libs . $tmake_libs . $vc_link_release; + $project{"VC_LINK_DEBUG"} = $vc_base_libs . $tmake_libs . $vc_link_debug; + + $vc_cpp_opt_common1 = '/nologo /W4 '; + if ( !Config("wx") ) { + $vc_cpp_opt_common1 = $vc_cpp_opt_common1 . '/GX '; + } + #! else: disable C++ exception handling for wxWindows + + $vc_cpp_opt_release = $vc_cpp_opt_common1 . '/O1 '; + $vc_cpp_opt_debug = $vc_cpp_opt_common1 . '/Zi /Od '; + $vc_cpp_opt_common = '/YX /FD /c'; + $project{"VC_BASE_CPP_RELEASE"} = $vc_cpp_opt_release . $vc_cpp_def_release . $vc_cpp_opt_common; + $project{"VC_BASE_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_cpp_def_debug . $vc_cpp_opt_common; + ExpandGlue("INCPATH",'/I "','" /I "','"'); + if ( $text ne "" ) { $vc_inc = $text . " "; $text = ""; } else { $vc_inc = ""; } + ExpandGlue("DEFINES",'/D "','" /D "','"'); + if ( $text ne "" ) { $vc_def = $text . " "; $text = ""; } else { $vc_def = ""; } + if ( Config("wx") ) { + #! define wxWindows compilation flags + $vc_def .= '/D _WIN32 /D __WIN32__ /D WINVER=0x400 /D __WINDOWS__ /D __WXMSW__ /D __WIN95__ /D __WIN32__ /D _MT '; + + if ( Config("wxbase") ) { + $vc_def .= '/D wxUSE_GUI=0 '; + } + else { + $vc_def .= '/D wxUSE_GUI=1 '; + } + } + + $project{"VC_CPP_INCLUDE"} = $vc_inc; + $project{"VC_CPP_RELEASE"} = $vc_cpp_opt_release . $vc_inc . $vc_cpp_def_release . $vc_def . $vc_cpp_opt_common; + $project{"VC_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_inc . $vc_cpp_def_debug . $vc_def . $vc_cpp_opt_common; + + if ( Project('RES_FILE') ) { + tmake_error(".res files are not supported, use .rc."); + } + + $project{"MAKEFILE"} = $project{"PROJECT"} . ".mak"; + $project{"TARGETAPP"} = $project{"TARGET"} . ".exe"; + Project('TMAKE_FILETAGS = HEADERS SOURCES TARGET DESTDIR $$FILETAGS'); + foreach ( split(/\s/,Project('TMAKE_FILETAGS')) ) { + $project{$_} =~ s-/-\\-g; + } + StdInit(); + if ( defined($project{"DESTDIR"}) ) { + $project{"TARGETAPP"} = $project{"DESTDIR"} . "\\" . $project{"TARGETAPP"}; + $project{"TARGETAPP"} =~ s/\\+/\\/g; + } + %all_files = (); + @files = split(/\s+/,$project{"HEADERS"}); + foreach ( @files ) { $all_files{$_} = "h" }; + @files = split(/\s+/,$project{"SOURCES"}); + foreach ( @files ) { $all_files{$_} = "s" }; + @files = split(/\s+/,$project{"RC_FILE"}); + foreach ( @files ) { $all_files{$_} = "r" }; + + if ( $moc_aware ) { + @files = split(/\s+/,$project{"_HDRMOC"}); + foreach ( @files ) { $all_files{$_} = "m"; } + @files = split(/\s+/,$project{"_SRCMOC"}); + foreach ( @files ) { $all_files{$_} = "i"; } + } + %file_names = (); + foreach $f ( %all_files ) { + $n = $f; + $n =~ s/^.*\\//; + $file_names{$n} = $f; + $file_path{$n} = ".\\" . $f; + $file_path2{$n} = (($f =~ /^\./) ? "" : ".\\") . $f; + } + +#$} +# Microsoft Developer Studio Project File - #$ Substitute('Name="$$TARGET" - Package Owner=<4>'); +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE #$ Substitute('"$$VC_PROJ_TYPE" $$VC_PROJ_CODE'); + +CFG=#$ Substitute('$$TARGET - Win32 Debug'); +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "#$ ExpandGlue('MAKEFILE','','','".'); +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f #$ Substitute('"$$MAKEFILE" CFG="$$TARGET - Win32 Debug"'); +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE #$ Substitute('"$$TARGET - Win32 Release" (based on "$$VC_PROJ_TYPE")'); +!MESSAGE #$ Substitute('"$$TARGET - Win32 Debug" (based on "$$VC_PROJ_TYPE")'); +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +#$ Config("windows") && ($text='MTL=midl.exe'); +RSC=rc.exe + +!IF "$(CFG)" == #$ Substitute('"$$TARGET - Win32 Release"'); + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release#$ $text = "$UNICODE$DLL" . '"' +# PROP BASE Intermediate_Dir "Release#$ $text = "$UNICODE$DLL" . '"' +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release#$ $text = "$UNICODE$DLL" . '"' +# PROP Intermediate_Dir "Release#$ $text = "$UNICODE$DLL" . '"' +#$ Config("windows") && ($text='# PROP Ignore_Export_Lib 0'); +# PROP Target_Dir "" +# ADD BASE CPP #$ Expand("VC_BASE_CPP_RELEASE"); +# ADD CPP #$ Expand("VC_CPP_RELEASE"); +#$ Config("windows") || DisableOutput(); +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +#$ Config("windows") || EnableOutput(); +# ADD BASE RSC /l 0x409 /d "NDEBUG" #$ Expand("VC_CPP_INCLUDE"); +# ADD RSC /l 0x409 /d "NDEBUG" #$ Expand("VC_CPP_INCLUDE"); +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 #$ Expand("VC_BASE_LINK_RELEASE"); +# ADD LINK32 #$ Expand("VC_LINK_RELEASE"); + +!ELSEIF "$(CFG)" == #$ Substitute('"$$TARGET - Win32 Debug"'); + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug#$ $text = "$UNICODE$DLL" . '"' +# PROP BASE Intermediate_Dir "Debug#$ $text = "$UNICODE$DLL" . '"' +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug#$ $text = "$UNICODE$DLL" . '"' +# PROP Intermediate_Dir "Debug#$ $text = "$UNICODE$DLL" . '"' +#$ Config("windows") && ($text='# PROP Ignore_Export_Lib 0'); +# PROP Target_Dir "" +# ADD BASE CPP #$ Expand("VC_BASE_CPP_DEBUG"); +# ADD CPP #$ Expand("VC_CPP_DEBUG"); +#$ Config("windows") || DisableOutput(); +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +#$ Config("windows") || EnableOutput(); +# ADD BASE RSC /l 0x409 /d "_DEBUG" #$ Expand("VC_CPP_INCLUDE"); +# ADD RSC /l 0x409 /d "_DEBUG" #$ Expand("VC_CPP_INCLUDE"); +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 #$ Expand("VC_BASE_LINK_DEBUG"); +# ADD LINK32 #$ Expand("VC_LINK_DEBUG"); + +!ENDIF + +# Begin Target + +# Name #$Substitute('"$$TARGET - Win32 Release"'); +# Name #$Substitute('"$$TARGET - Win32 Debug"'); +#${ + foreach $n ( sort keys %file_names ) { + $f = $file_names{$n}; + $p = $file_path{$n}; + $p2 = $file_path2{$n}; + $t = $all_files{$f}; + if ( ($t eq "h") && $moc_output{$f} ) { + my($build); + $build = "\n\n# Begin Custom Build - Running moc...\nInputPath=" . $p2 . "\n\n" + . '"' . $moc_output{$f} . '" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"' + . "\n\tmoc $p2 -o " . $moc_output{$f} . "\n\n" + . "# End Custom Build\n\n"; + $text .= ("# Begin Source File\n\nSOURCE=$p\n\n" + . '!IF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Release"' + . $build); + $text .= ('!ELSEIF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Debug"' + . $build + . "!ENDIF \n\n# End Source File\n"); + } elsif ( $t eq "i" ) { + my($build,$dn); + $build = "\n\n# Begin Custom Build - Running moc...\nInputPath=" . $p2 . "\n\n" + . '"' . $f . '" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"' + . "\n\tmoc ". $moc_input{$f} . " -o $f\n\n" + . "# End Custom Build\n\n"; + $dn = $n; + $dn =~ s/\..*//; + $dn =~ tr/a-z/A-Z/; + $text .= ("# Begin Source File\n\nSOURCE=$p\n" + . "USERDEP__$dn=" . '"' . $moc_input{$f} . '"' . "\n\n" + . '!IF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Release"' + . $build); + $text .= ('!ELSEIF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Debug"' + . $build + . "!ENDIF \n\n# End Source File\n"); + } elsif ( $t eq "s" || $t eq "m" || $t eq "h" || $t eq "r" ) { + $text .= "# Begin Source File\n\nSOURCE=$p\n"; + $text .= "# End Source File\n"; + } + } + chop $text; +#$} +# End Target +# End Project + +#! vim:sta:sw=4:ts=8:nolist:noet diff --git a/distrib/msw/tmake/wat.t b/distrib/msw/tmake/wat.t index 49c3c8957c..41b4fe4505 100644 --- a/distrib/msw/tmake/wat.t +++ b/distrib/msw/tmake/wat.t @@ -28,11 +28,15 @@ $file =~ s/cp?p?$/obj/; $project{$tag} .= $file . " " } + + foreach $file (sort keys %wxHTML) { + next if $wxHTML{$file} =~ /\b16\b/; + + $file =~ s/cp?p?$/obj/; + $project{"WXHTMLOBJS"} .= $file . " " + } foreach $file (sort keys %wxCommon) { - #! doesn't compile, apparently - next if $file =~ /^imagjpeg\./; - $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; $project{"WXCOMMONOBJS"} .= $file . " "; @@ -85,13 +89,16 @@ LIBTARGET = $(WXLIB)\wx.lib DUMMY=dummydll # ODBCLIB = ..\..\contrib\odbc\odbc32.lib -EXTRATARGETS = xpm png zlib -EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib +EXTRATARGETS = xpm png zlib jpeg tiff +EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib clean_jpeg clean_tiff GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common XPMDIR=$(WXDIR)\src\xpm +JPEGDIR=$(WXDIR)\src\jpeg +TIFFDIR=$(WXDIR)\src\tiff MSWDIR=$(WXDIR)\src\msw OLEDIR=$(MSWDIR)\ole +HTMLDIR=$(WXDIR)\src\html DOCDIR = $(WXDIR)\docs @@ -107,10 +114,12 @@ COMMONOBJS = & MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t") -# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) +HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t") -all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) +# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. +OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) + +all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC $(LIBTARGET) : $(OBJECTS) %create tmp.lbc @@ -208,6 +217,23 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c } #$} + +######################################################## +# HTML objects (always compiled) + +#${ + $_ = $project{"WXHTMLOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= $_; + s/\.obj$//; + $text .= ': $(HTMLDIR)\\'; + $text .= $_ . ".cpp\n" . + ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; + } +#$} + + crbuffri.obj: $(XPMDIR)\crbuffri.c *$(CC) $(CPPFLAGS) $(IFLAGS) $< @@ -354,6 +380,26 @@ clean_zlib: .SYMBOLIC wmake -f makefile.wat clean cd $(WXDIR)\src\msw +jpeg: .SYMBOLIC + cd $(WXDIR)\src\jpeg + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_jpeg: .SYMBOLIC + cd $(WXDIR)\src\jpeg + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + +tiff: .SYMBOLIC + cd $(WXDIR)\src\tiff + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_tiff: .SYMBOLIC + cd $(WXDIR)\src\tiff + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + MFTYPE=wat self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t cd $(WXDIR)\distrib\msw\tmake diff --git a/distrib/msw/utilmake.rsp b/distrib/msw/utilmake.rsp new file mode 100644 index 0000000000..c9595f127c --- /dev/null +++ b/distrib/msw/utilmake.rsp @@ -0,0 +1,3 @@ +utils/HelpGen/Makefile.in +utils/HelpGen/src/Makefile.in +utils/makegen/Makefile.in diff --git a/distrib/msw/utils.rsp b/distrib/msw/utils.rsp new file mode 100644 index 0000000000..ce69d5db61 --- /dev/null +++ b/distrib/msw/utils.rsp @@ -0,0 +1,60 @@ +utils/wxgraph/src/*.cpp +utils/wxgraph/src/*.c +utils/wxgraph/src/*.h +utils/wxgraph/src/makefile* +utils/wxgraph/src/*.xbm +utils/wxgraph/src/*.xpm +utils/wxgraph/lib/dummy +utils/wxgraph/src/*.ico +utils/wxgraph/src/*.def +utils/wxgraph/src/*.rc + +utils/rcparser/src/*.cpp +utils/rcparser/src/*.c +utils/rcparser/src/*.h +utils/rcparser/src/makefile* +utils/rcparser/src/*.xbm +utils/rcparser/src/*.xpm +utils/rcparser/lib/dummy +utils/rcparser/src/*.ico +utils/rcparser/src/*.def +utils/rcparser/src/*.rc +utils/rcparser/src/*.rh + +utils/colours/*.h +utils/colours/*.cpp +utils/colours/*.def +utils/colours/*.rc +utils/colours/makefile* +utils/colours/*.xbm +utils/colours/*.xpm +utils/colours/*.txt + +utils/serialize/*.h +utils/serialize/*.cpp +utils/serialize/*.def +utils/serialize/*.rc +utils/serialize/makefile* +utils/serialize/*.xbm +utils/serialize/*.xpm +utils/serialize/*.txt + +utils/makegen/*.h +utils/makegen/*.cpp +utils/makegen/*.def +utils/makegen/*.rc +utils/makegen/makefile* +utils/makegen/*.xbm +utils/makegen/*.xpm +utils/makegen/*.txt +utils/makegen/templates/make* + +utils/HelpGen/src/*.h +utils/HelpGen/src/*.cpp +utils/HelpGen/src/*.def +utils/HelpGen/src/*.rc +utils/HelpGen/src/makefile* +utils/HelpGen/src/*.xbm +utils/HelpGen/src/*.xpm +utils/HelpGen/src/*.txt + diff --git a/distrib/msw/vc.rsp b/distrib/msw/vc.rsp index fd4b8ce900..c86bd54ff8 100644 --- a/distrib/msw/vc.rsp +++ b/distrib/msw/vc.rsp @@ -1,22 +1,27 @@ +wxBase.dsp +wxBase.dsw +wxBaseDll.dsp +wxBaseDll.dsw + src/wxvc.dsp src/wxvc.dsw src/wxvc_dll.dsp src/wxvc_dll.dsw -src/jpeg/jpeg.dsp -src/jpeg/jpeg.dsw +src/jpeg/JpegVC.dsp +src/jpeg/JpegVC.dsw -src/tiff/tiff.dsp -src/tiff/tiff.dsw +src/tiff/TiffVC.dsp +src/tiff/TiffVC.dsw -src/zlib/zlib.dsp -src/zlib/zlib.dsw +src/zlib/ZlibVC.dsp +src/zlib/ZlibVC.dsw -src/png/png.dsp -src/png/png.dsw +src/png/PngVC.dsp +src/png/PngVC.dsw -src/xpm/xpm.dsp -src/xpm/xpm.dsw +src/xpm/XpmVC.dsp +src/xpm/XpmVC.dsw samples/SamplesVC.dsw @@ -141,6 +146,9 @@ samples/notebook/NotebookVC.dsw samples/ownerdrw/OwnerDrwVC.dsp samples/ownerdrw/OwnerDrwVC.dsw +samples/oleauto/OleautoVC.dsp +samples/oleauto/OleautoVC.dsw + samples/plot/PlotVC.dsp samples/plot/PlotVC.dsw @@ -150,6 +158,9 @@ samples/png/PngVC.dsw samples/printing/PrintingVC.dsp samples/printing/PrintingVC.dsw +samples/proplist/ProplistVC.dsp +samples/proplist/ProplistVC.dsw + samples/propsize/PropsizeVC.dsp samples/propsize/PropsizeVC.dsw @@ -175,6 +186,8 @@ samples/scrollsub/ScrollsubVC.dsp samples/scrollsub/ScrollsubVC.dsw samples/sockets/ClientVC.dsp +samples/sockets/ServerVC.dsp +samples/sockets/ClientVC.dsw samples/sockets/ServerVC.dsw samples/splitter/SplitterVC.dsp @@ -247,6 +260,9 @@ utils/tex2rtf/src/Tex2RTFVC.dsw utils/hhp2cached/hhp2cachedVC.dsp utils/hhp2cached/hhp2cachedVC.dsw +utils/helpgen/src/HelpGenVC.dsp +utils/helpgen/src/HelpGenVC.dsw + contrib/src/ogl/OglVC.dsp contrib/src/ogl/OglVC.dsw diff --git a/distrib/msw/vcupdate.bat b/distrib/msw/vcupdate.bat new file mode 100755 index 0000000000..3d7cb4930a --- /dev/null +++ b/distrib/msw/vcupdate.bat @@ -0,0 +1,10 @@ +@echo off +Rem Replace the DLL version number in the VC++ project files. +Rem This has to be called from the root directory. + +input Enter the old version name (e.g. wx22_0): %%oldName +input Enter the new version name (e.g. wx22_1): %%newName + +call %wxwin\distrib\msw\filerepl.bat %oldName %newName %wxwin\distrib\msw\vc.rsp +echo Done. + diff --git a/distrib/msw/wisebott.txt b/distrib/msw/wisebott.txt index 309b56830e..f8a5c0c892 100644 --- a/distrib/msw/wisebott.txt +++ b/distrib/msw/wisebott.txt @@ -21,7 +21,7 @@ item: Set Variable Value=%GROUPDIR%\%GROUP% end item: Create Shortcut - Source=%MAINDIR%\Docs\Winhelp\Wx.hlp + Source=%MAINDIR%\Docs\htmlhelp\Wx.chm Destination=%GROUP%\wxWindows Manual.lnk Working Directory=%MAINDIR% end @@ -31,17 +31,17 @@ item: Create Shortcut Working Directory=%MAINDIR% end item: Create Shortcut - Source=%MAINDIR%\docs\winhelp\dialoged.hlp + Source=%MAINDIR%\docs\htmlhelp\dialoged.chm Destination=%GROUP%\Dialog Editor Help.lnk Working Directory=%MAINDIR% end item: Create Shortcut - Source=%MAINDIR%\contrib\docs\winhelp\ogl.hlp + Source=%MAINDIR%\contrib\docs\htmlhelp\ogl.chm Destination=%GROUP%\Object Graphics Library Help.lnk Working Directory=%MAINDIR% end item: Create Shortcut - Source=%MAINDIR%\docs\winhelp\tex2rtf.hlp + Source=%MAINDIR%\docs\htmlhelp\tex2rtf.chm Destination=%GROUP%\Tex2RTF Help.lnk Working Directory=%MAINDIR% end @@ -91,7 +91,7 @@ end item: Add ProgMan Icon Group=%GROUP% Icon Name=wxWindows Manual - Command Line=%MAINDIR%\Docs\Winhelp\Wx.hlp + Command Line=%MAINDIR%\Docs\htmlhelp\wx.chm Default Directory=%MAINDIR% end item: Add ProgMan Icon @@ -115,19 +115,19 @@ end item: Add ProgMan Icon Group=%GROUP% Icon Name=Dialog Editor Help - Command Line=%MAINDIR%\docs\winhelp\dialoged.hlp + Command Line=%MAINDIR%\docs\htmlhelp\dialoged.chm Default Directory=%MAINDIR% end item: Add ProgMan Icon Group=%GROUP% Icon Name=Object Graphics Library Help - Command Line=%MAINDIR%\contrib\docs\winhelp\ogl.hlp + Command Line=%MAINDIR%\contrib\docs\htmlhelp\ogl.chm Default Directory=%MAINDIR% end item: Add ProgMan Icon Group=%GROUP% Icon Name=Tex2RTF Help - Command Line=%MAINDIR%\docs\winhelp\tex2rtf.hlp + Command Line=%MAINDIR%\docs\htmlhelp\tex2rtf.chm Default Directory=%MAINDIR% end item: Add ProgMan Icon diff --git a/distrib/msw/wisesys.txt b/distrib/msw/wisesys.txt index 1f1b51be6e..dde212eee9 100644 --- a/distrib/msw/wisesys.txt +++ b/distrib/msw/wisesys.txt @@ -1,20 +1,20 @@ item: Install File - Source=c:\Windows\System\Msvcirt.dll + Source=c:\wx\dlls\winnt\Msvcirt.dll Destination=%SYS32%\Msvcirt.dll Flags=0000010000010011 end item: Install File - Source=c:\Windows\System\Msvcrt.dll + Source=c:\wx\dlls\winnt\Msvcrt.dll Destination=%SYS32%\Msvcrt.dll Flags=0000010000010011 end item: Install File - Source=c:\Windows\System\Msvcrt.dll + Source=c:\wx\dlls\win95\Msvcrt.dll Destination=%SYS%\Msvcrt.dll Flags=0000010000010011 end item: Install File - Source=c:\Windows\System\Msvcirt.dll + Source=c:\wx\dlls\win95\Msvcirt.dll Destination=%SYS%\Msvcirt.dll Flags=0000010000010011 end diff --git a/distrib/msw/wisetop.txt b/distrib/msw/wisetop.txt index d559db5e95..9e98a2945b 100644 --- a/distrib/msw/wisetop.txt +++ b/distrib/msw/wisetop.txt @@ -1,7 +1,7 @@ Document Type: WSE item: Global Version=5.0 - Title=wxWindows 2.1.14 Installation + Title=wxWindows 2.2.6 Installation Flags=00000100 Split=1420 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @@ -17,7 +17,7 @@ item: Global Patch Flags=0000000000000001 Patch Threshold=85 Patch Memory=4000 - EXE Filename=D:\wx2\wxWindows\deliver\setup.exe + EXE Filename=c:\wx2stable\wxWindows\deliver\setup.exe FTP Cluster Size=20 Variable Name1=_SYS_ Variable Default1=C:\WINDOWS\SYSTEM @@ -47,7 +47,7 @@ item: End Block end item: Set Variable Variable=APPTITLE - Value=wxWindows 2.1.14 + Value=wxWindows 2.2.6 end item: Set Variable Variable=GROUP @@ -62,7 +62,7 @@ item: Set Variable Value=wx2 end item: Display Graphic - Pathname=D:\wx2\wxWindows\distrib\msw\wxwin01.bmp + Pathname=c:\wx2stable\wxWindows\distrib\msw\wxwin01.bmp X Position=16 Y Position=16 end @@ -207,7 +207,9 @@ item: Custom Dialog Set item: Static Rectangle=86 41 256 130 Create Flags=01010000000000000000000000000000 - Text=This installation program will install %APPTITLE%. It will need about 25 MB of hard disk space. + Text=This installation program will install %APPTITLE%. It will need 30-130 MB of hard disk space, + Text=depending on the disk cluster size. Allow further disk space for compiling the library + Text=and samples. Text= Text=Press the Next button to start the installation. You can press the Cancel button now if you do not want to install %APPTITLE% at this time. Text French=Ce programme d'installation va installer %APPTITLE%. diff --git a/distrib/msw/wx_chm.rsp b/distrib/msw/wx_chm.rsp new file mode 100644 index 0000000000..0c8a76da7e --- /dev/null +++ b/distrib/msw/wx_chm.rsp @@ -0,0 +1,3 @@ +docs/htmlhelp/*.chm +contrib/docs/htmlhelp/*.chm + diff --git a/distrib/msw/wx_htb.rsp b/distrib/msw/wx_htb.rsp new file mode 100644 index 0000000000..00792253b1 --- /dev/null +++ b/distrib/msw/wx_htb.rsp @@ -0,0 +1,3 @@ +docs/htb/*.htb +contrib/docs/htb/*.htb + diff --git a/distrib/msw/wx_html.rsp b/distrib/msw/wx_html.rsp index 478f9ef94c..e59cc21bda 100644 --- a/distrib/msw/wx_html.rsp +++ b/distrib/msw/wx_html.rsp @@ -12,7 +12,7 @@ docs/html/tex2rtf/*.gif docs/html/odbc/*.htm -docs/html/gettext/*.htm +docs/html/gettext/*.html contrib/docs/html/ogl/*.htm contrib/docs/html/ogl/*.gif diff --git a/distrib/msw/zipdist.bat b/distrib/msw/zipdist.bat index ca4889596d..4754a6e8cc 100755 --- a/distrib/msw/zipdist.bat +++ b/distrib/msw/zipdist.bat @@ -1,11 +1,11 @@ @echo off -rem Zip up an external, generic + Windows distribution of wxWindows 2.0 +rem Zip up an external, generic + Windows distribution of wxWindows 2 set src=%wxwin set dest=%src\deliver set wise=0 Rem Set this to the required version -set version=2_1_14 +set version=2.2.5 if "%src" == "" goto usage if "%dest" == "" goto usage @@ -14,6 +14,7 @@ if "%1" == "--help" goto usage if "%1" == "/?" goto usage if "%1" == "wiseonly" goto dounzip if "%1" == "wise" set wise=1 +if "%1" == "tidyup" goto tidyup echo About to archive an external wxWindows distribution: echo From %src echo To %dest @@ -22,6 +23,7 @@ echo CTRL-C if this is not correct. pause erase %dest\wx*.zip +erase %dest\*.htb erase %dest\ogl3.zip erase %dest\tex2rtf2.zip erase %dest\jpeg.zip @@ -29,41 +31,55 @@ erase %dest\tiff.zip erase %dest\dialoged.zip erase %dest\utils.zip erase %dest\extradoc.zip +erase %dest\*-win32.zip -if direxist %dest\wx deltree /Y %dest\wx +if direxist %dest\wx erase /sxyz %dest\wx\ cd %src echo Zipping... -zip32 -@ %dest\wx%version%_gen.zip < %src\distrib\msw\generic.rsp -zip32 -@ -u %dest\wx%version%_gen.zip < %src\distrib\msw\makefile.rsp -zip32 -@ %dest\wx%version%_msw.zip < %src\distrib\msw\msw.rsp -zip32 -@ -u %dest\wx%version%_msw.zip < %src\distrib\msw\makefile.rsp -zip32 -@ %dest\wx%version%_gtk.zip < %src\distrib\msw\gtk.rsp -zip32 -@ -u %dest\wx%version%_gtk.zip < %src\distrib\msw\makefile.rsp -zip32 -@ %dest\wx%version%_stubs.zip < %src\distrib\msw\stubs.rsp -zip32 -@ %dest\wx%version%_mot.zip < %src\distrib\msw\motif.rsp -zip32 -@ -u %dest\wx%version%_mot.zip < %src\distrib\msw\makefile.rsp -Rem (Obsolete) zip32 -@ %dest\wx%version%_user.zip < %src\distrib\msw\user.rsp +Rem Zip up the complete wxMSW-xxx.zip file +Rem NO, do it by unarchiving component files, deleting/copying some files, then +Rem rearchiving. +Rem zip32 -@ %dest\wxMSW-%version%.zip < %src\distrib\msw\generic.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\msw.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\wx_chm.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\jpeg.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\tiff.rsp -zip32 -@ %dest\wx%version%_doc.zip < %src\distrib\msw\docsrc.rsp -zip32 -@ %dest\wx%version%_hlp.zip < %src\distrib\msw\wx_hlp.rsp -zip32 -@ %dest\wx%version%_htm.zip < %src\distrib\msw\wx_html.rsp -zip32 -@ %dest\wx%version%_pdf.zip < %src\distrib\msw\wx_pdf.rsp -zip32 -@ %dest\wx%version%_wrd.zip < %src\distrib\msw\wx_word.rsp +Rem Below is the old-style separated-out format. This is retained only +Rem for local use, and for creating wxMSW-xxx.zip. +zip32 -@ %dest\wxWindows-%version%-gen.zip < %src\distrib\msw\generic.rsp +zip32 -@ -u %dest\wxWindows-%version%-gen.zip < %src\distrib\msw\makefile.rsp +zip32 -@ %dest\wxWindows-%version%-msw.zip < %src\distrib\msw\msw.rsp +zip32 -@ -u %dest\wxWindows-%version%-msw.zip < %src\distrib\msw\makefile.rsp +zip32 -@ %dest\wxWindows-%version%-gtk.zip < %src\distrib\msw\gtk.rsp +zip32 -@ -u %dest\wxWindows-%version%-gtk.zip < %src\distrib\msw\makefile.rsp +zip32 -@ %dest\wxWindows-%version%-stubs.zip < %src\distrib\msw\stubs.rsp +zip32 -@ %dest\wxWindows-%version%-mot.zip < %src\distrib\msw\motif.rsp +zip32 -@ -u %dest\wxWindows-%version%-mot.zip < %src\distrib\msw\makefile.rsp +Rem (Obsolete) zip32 -@ %dest\wxWindows-%version%-user.zip < %src\distrib\msw\user.rsp + +zip32 -@ %dest\wxWindows-%version%-DocSource.zip < %src\distrib\msw\docsrc.rsp +zip32 -@ %dest\wxWindows-%version%-WinHelp.zip < %src\distrib\msw\wx_hlp.rsp +zip32 -@ %dest\wxWindows-%version%-HTML.zip < %src\distrib\msw\wx_html.rsp +zip32 -@ %dest\wxWindows-%version%-PDF.zip < %src\distrib\msw\wx_pdf.rsp +zip32 -@ %dest\wxWindows-%version%-Word.zip < %src\distrib\msw\wx_word.rsp +zip32 -@ %dest\wxWindows-%version%-HTB.zip < %src\distrib\msw\wx_htb.rsp +zip32 -@ %dest\wxWindows-%version%-HTMLHelp.zip < %src\distrib\msw\wx_chm.rsp Rem PDF/HTML docs that should go into the Windows setup because Rem there are no WinHelp equivalents zip32 -@ %dest\extradoc.zip < %src\distrib\msw\extradoc.rsp rem VC++ project files -zip32 -@ %dest\wx%version%_vc.zip < %src\distrib\msw\vc.rsp +zip32 -@ %dest\wxWindows-%version%-vc.zip < %src\distrib\msw\vc.rsp rem BC++ project files -zip32 -@ %dest\wx%version%_bc.zip < %src\distrib\msw\bc.rsp +zip32 -@ %dest\wxWindows-%version%-bc.zip < %src\distrib\msw\bc.rsp rem CodeWarrior project files -zip32 -@ %dest\wx%version%_cw.zip < %src\distrib\msw\cw.rsp +zip32 -@ %dest\wxWindows-%version%-cw.zip < %src\distrib\msw\cw.rsp rem OGL 3 zip32 -@ %dest\ogl3.zip < %src\distrib\msw\ogl.rsp @@ -89,7 +105,7 @@ zip32 -@ %dest\tiff.zip < %src\distrib\msw\tiff.rsp rem Dialog Editor source and binary erase %dest\dialoged_source.zip zip32 -@ %dest\dialoged_source.zip < %src\distrib\msw\dialoged.rsp -zip32 -j %dest\dialoged.zip %dest\dialoged_source.zip %src\bin\dialoged.exe %src\bin\dialoged.hlp %src\bin\dialoged.cnt +zip32 -j %dest\dialoged.zip %dest\dialoged_source.zip %src\bin\dialoged.exe %src\docs\winhelp\dialoged.hlp %src\docs\winhelp\dialoged.cnt erase %dest\dialoged_source.zip rem Misc. utils not in the main distribution @@ -101,7 +117,10 @@ copy %src\docs\msw\install.txt %dest\install_msw.txt copy %src\docs\motif\install.txt %dest\install_motif.txt copy %src\docs\gtk\install.txt %dest\install_gtk.txt copy %src\docs\readme.txt %dest -copy %src\docs\release.txt %dest +copy %src\docs\motif\readme.txt %dest\readme_motif.txt +copy %src\docs\gtk\readme.txt %dest\readme_gtk.txt +copy %src\docs\msw\readme.txt %dest\readme_msw.txt +copy %src\docs\readme_vms.txt %dest copy %src\docs\motif\makewxmotif %dest copy %src\docs\gtk\makewxgtk %dest @@ -110,6 +129,13 @@ if "%wise" == "0" goto end :dounzip +Rem Make dialoged-win32.zip and tex2rtf-win32.zip + +cd %src\bin + +zip32 %dest\dialoged-win32.zip dialoged.* +zip32 %dest\tex2rtf-win32.zip tex2rtf.* + cd %dest rem Unzip the Windows files into 'wx' @@ -119,14 +145,14 @@ Rem After this change of directory, we're in the Rem temporary 'wx' directory and not acting on Rem the source wxWindows directory. cd %dest\wx -unzip32 -o ..\wx%version%_msw.zip -unzip32 -o ..\wx%version%_gen.zip -unzip32 -o ..\wx%version%_vc.zip -unzip32 -o ..\wx%version%_bc.zip -unzip32 -o ..\wx%version%_hlp.zip +unzip32 -o ..\wxWindows-%version%-msw.zip +unzip32 -o ..\wxWindows-%version%-gen.zip +unzip32 -o ..\wxWindows-%version%-vc.zip +unzip32 -o ..\wxWindows-%version%-bc.zip +unzip32 -o ..\wxWindows-%version%-HTMLHelp.zip unzip32 -o ..\extradoc.zip Rem Need Word file, for Remstar DB classes -unzip32 -o ..\wx%version%_wrd.zip +unzip32 -o ..\wxWindows-%version%-Word.zip unzip32 -o ..\ogl3.zip unzip32 -o ..\jpeg.zip unzip32 -o ..\tiff.zip @@ -141,8 +167,12 @@ erase /SY Makefile.in erase /Y docs\html\wxbook.htm docs\html\roadmap.htm erase /Y contrib\docs\winhelp\mmedia.* erase /Y contrib\docs\winhelp\stc.* +erase /Y contrib\docs\htmlhelp\mmedia.* +erase /Y contrib\docs\htmlhelp\stc.* erase /Y contrib\docs\pdf\*.* -deltree /Y contrib\docs\latex\ogl +erase /sxzy contrib\docs\latex\ogl +erase /Y src\mingegcs.bat +erase /Y distrib rem Now copy some binary files to 'bin' if not isdir bin mkdir bin @@ -150,9 +180,13 @@ copy %src\bin\dialoged.exe bin copy %src\bin\tex2rtf.exe bin copy %src\bin\dbgview.* bin copy %src\bin\life.exe bin +copy %src\demos\life\breeder.lif bin copy %src\docs\winhelp\dialoged.hlp %src\docs\winhelp\dialoged.cnt bin copy %src\docs\winhelp\tex2rtf.hlp %src\docs\winhelp\tex2rtf.cnt bin +Rem Make wxMSW-xxx.zip +zip32 -r ..\wxMSW-%version%.zip * + rem Time to regenerate the WISE install script, wxwin2.wse. rem NB: if you've changed wxwin2.wse using WISE, call splitwise.exe rem from within distrib\msw, to split off wisetop.txt and wisebott.txt. @@ -164,10 +198,11 @@ erase /Y %dest\setup.* rem Now invoke WISE install on the new wxwin2.wse set wisecmd="c:\Program Files\wise\wise32.exe" /C %WXWIN\distrib\msw\wxwin2.wse echo Invoking %wisecmd... -start %wisecmd +start "WISE" /w %wisecmd% pause Press any key to continue with the wxWindows distribution... -Rem ren %WXWIN\deliver\setup.EXE %WXWIN\deliver\setup_%version%.exe +Rem ren %WXWIN\deliver\setup.EXE %WXWIN\deliver\wxMSW-%version%-setup.exe +:tidyup cd %dest Rem tidy up capitalisation of filenames @@ -192,8 +227,11 @@ ren s setup.w06 ren setup.w07 s ren s setup.w07 +ren setup.w08 s +ren s setup.w08 + rem Put all the setup files into a single zip archive. -zip32 wx%version%_setup.zip readme.txt setup.* +zip32 wxMSW-%version%-setup.zip readme.txt setup.* echo wxWindows archived. @@ -204,6 +242,6 @@ echo DOS wxWindows distribution. Zips up all GTK/Motif/MSW/doc files, echo and optionally makes a deliver\wx directory and a setup.exe echo if you specify 'wise' (skipping the zipping if you use 'wiseonly'). echo. -echo Usage: zipdist [wise | wiseonly] +echo "Usage: zipdist [wise | wiseonly]" :end diff --git a/distrib/msw/zipdistinno.bat b/distrib/msw/zipdistinno.bat new file mode 100755 index 0000000000..313ba377be --- /dev/null +++ b/distrib/msw/zipdistinno.bat @@ -0,0 +1,233 @@ +@echo off +rem Zip up an external, generic + Windows distribution of wxWindows 2 +rem using Inno Setup + ScriptMaker +set src=%wxwin +set dest=%src\deliver +set webfiles=c:\wx2dev\wxWebSite +set inno=0 + +Rem Set this to the required version +set version=2.2.9 + +if "%src" == "" goto usage +if "%dest" == "" goto usage +if "%1" == "-help" goto usage +if "%1" == "--help" goto usage +if "%1" == "/?" goto usage +if "%1" == "innoonly" goto dounzip +if "%1" == "inno" set inno=1 +if "%1" == "tidyup" goto tidyup +echo About to archive an external wxWindows distribution: +echo From %src +echo To %dest +if "%inno" == "1" echo with Inno Setup creation. +echo CTRL-C if this is not correct. +pause + +erase %dest\wx*.zip +erase %dest\*.htb +erase %dest\ogl3-*.zip +erase %dest\tex2rtf2-*.zip +erase %dest\jpeg-*.zip +erase %dest\tiff-*.zip +erase %dest\dialoged-*.zip +erase %dest\utils-*.zip +erase %dest\extradoc-*.zip +erase %dest\*-win32-*.zip + +if direxist %dest\wx erase /sxyz %dest\wx\ +if not direxist %dest mkdir %dest + +# Copy FAQ and other files from wxWebSite CVS +if not direxist %webfiles% echo Error - %webfiles% does not exist +if not direxist %webfiles% goto end +echo Copying FAQ from %webfiles +copy %webfiles%\site\faq*.htm %src\docs\html +copy %webfiles%\site\platform.htm %src\docs\html + +cd %src +echo Zipping... + +Rem Zip up the complete wxMSW-xxx.zip file +Rem NO, do it by unarchiving component files, deleting/copying some files, then +Rem rearchiving. +Rem zip32 -@ %dest\wxMSW-%version%.zip < %src\distrib\msw\generic.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\msw.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\wx_chm.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\jpeg.rsp +Rem zip32 -@ -u %dest\wxMSW-%version%.zip < %src\distrib\msw\tiff.rsp + +Rem Below is the old-style separated-out format. This is retained only +Rem for local use, and for creating wxMSW-xxx.zip. +zip32 -@ %dest\wxWindows-%version%-gen.zip < %src\distrib\msw\generic.rsp +zip32 -@ -u %dest\wxWindows-%version%-gen.zip < %src\distrib\msw\makefile.rsp +zip32 -@ %dest\wxWindows-%version%-msw.zip < %src\distrib\msw\msw.rsp +zip32 -@ -u %dest\wxWindows-%version%-msw.zip < %src\distrib\msw\makefile.rsp +zip32 -@ %dest\wxWindows-%version%-gtk.zip < %src\distrib\msw\gtk.rsp +zip32 -@ -u %dest\wxWindows-%version%-gtk.zip < %src\distrib\msw\makefile.rsp +zip32 -@ %dest\wxWindows-%version%-stubs.zip < %src\distrib\msw\stubs.rsp +zip32 -@ %dest\wxWindows-%version%-mot.zip < %src\distrib\msw\motif.rsp +zip32 -@ -u %dest\wxWindows-%version%-mot.zip < %src\distrib\msw\makefile.rsp +Rem (Obsolete) zip32 -@ %dest\wxWindows-%version%-user.zip < %src\distrib\msw\user.rsp + +zip32 -@ %dest\wxWindows-%version%-DocSource.zip < %src\distrib\msw\docsrc.rsp +zip32 -@ %dest\wxWindows-%version%-WinHelp.zip < %src\distrib\msw\wx_hlp.rsp +zip32 -@ %dest\wxWindows-%version%-HTML.zip < %src\distrib\msw\wx_html.rsp +zip32 -@ %dest\wxWindows-%version%-PDF.zip < %src\distrib\msw\wx_pdf.rsp +zip32 -@ %dest\wxWindows-%version%-Word.zip < %src\distrib\msw\wx_word.rsp +zip32 -@ %dest\wxWindows-%version%-HTB.zip < %src\distrib\msw\wx_htb.rsp +zip32 -@ %dest\wxWindows-%version%-HTMLHelp.zip < %src\distrib\msw\wx_chm.rsp + +Rem PDF/HTML docs that should go into the Windows setup because +Rem there are no WinHelp equivalents +zip32 -@ %dest\extradoc-%version%.zip < %src\distrib\msw\extradoc.rsp + +rem VC++ project files +zip32 -@ %dest\wxWindows-%version%-vc.zip < %src\distrib\msw\vc.rsp + +rem BC++ project files +zip32 -@ %dest\wxWindows-%version%-bc.zip < %src\distrib\msw\bc.rsp + +rem CodeWarrior project files +zip32 -@ %dest\wxWindows-%version%-cw.zip < %src\distrib\msw\cw.rsp + +rem OGL 3 +zip32 -@ %dest\ogl3-%version%.zip < %src\distrib\msw\ogl.rsp + +rem MMedia +zip32 -@ %dest\mmedia-%version%.zip < %src\distrib\msw\mmedia.rsp + +rem STC (Scintilla widget) +zip32 -@ %dest\stc-%version%.zip < %src\distrib\msw\stc.rsp + +rem GLCanvas: obsolete, now in main library +rem zip32 -@ %dest\glcanvas-%version%.zip < %src\distrib\msw\glcanvas.rsp + +rem Tex2RTF +zip32 -@ %dest\tex2rtf2-%version%.zip < %src\distrib\msw\tex2rtf.rsp + +rem JPEG source +zip32 -@ %dest\jpeg-%version%.zip < %src\distrib\msw\jpeg.rsp + +rem TIFF source +zip32 -@ %dest\tiff-%version%.zip < %src\distrib\msw\tiff.rsp + +rem Dialog Editor source and binary +erase %dest\dialoged_source.zip +zip32 -@ %dest\dialoged_source.zip < %src\distrib\msw\dialoged.rsp +zip32 -j %dest\dialoged-%version%.zip %dest\dialoged_source.zip %src\bin\dialoged.exe %src\docs\winhelp\dialoged.hlp %src\docs\winhelp\dialoged.cnt +erase %dest\dialoged_source.zip + +rem Misc. utils not in the main distribution +zip32 -@ %dest\utils-%version%.zip < %src\distrib\msw\utils.rsp +zip32 -@ -u %dest\utils-%version%.zip < %src\distrib\msw\utilmake.rsp + +copy %src\docs\changes.txt %dest\changes-%version%.txt +copy %src\docs\msw\install.txt %dest\install_msw-%version%.txt +copy %src\docs\motif\install.txt %dest\install_motif-%version%.txt +copy %src\docs\gtk\install.txt %dest\install_gtk-%version%.txt +copy %src\docs\readme.txt %dest\readme-%version%.txt +copy %src\docs\motif\readme.txt %dest\readme_motif-%version%.txt +copy %src\docs\gtk\readme.txt %dest\readme_gtk-%version%.txt +copy %src\docs\msw\readme.txt %dest\readme_msw-%version%.txt +copy %src\docs\readme_vms.txt %dest\readme_vms-%version%.txt +copy %src\docs\motif\makewxmotif %dest\makewxmotif-%version% +copy %src\docs\gtk\makewxgtk %dest\makewxgtk-%version% + +Rem Skip Inno Setup if inno is 0. +if "%inno" == "0" goto end + +:dounzip + +Rem Make dialoged-win32-%version%.zip and tex2rtf-win32-%version%.zip + +cd %src\bin + +zip32 %dest\dialoged-win32-%version%.zip dialoged.* +zip32 %dest\tex2rtf-win32-%version%.zip tex2rtf.* + +cd %dest + +rem Unzip the Windows files into 'wx' +mkdir %dest\wx + +Rem After this change of directory, we're in the +Rem temporary 'wx' directory and not acting on +Rem the source wxWindows directory. +cd %dest\wx +unzip32 -o ..\wxWindows-%version%-msw.zip +unzip32 -o ..\wxWindows-%version%-gen.zip +unzip32 -o ..\wxWindows-%version%-vc.zip +unzip32 -o ..\wxWindows-%version%-bc.zip +unzip32 -o ..\wxWindows-%version%-HTMLHelp.zip +unzip32 -o ..\extradoc.zip +Rem Need Word file, for Remstar DB classes +unzip32 -o ..\wxWindows-%version%-Word.zip +unzip32 -o ..\ogl3-%version%.zip +unzip32 -o ..\jpeg-%version%.zip +unzip32 -o ..\tiff-%version%.zip +unzip32 -o ..\tex2rtf2-%version%.zip + +rem Now delete a few files that are unnecessary +attrib -R * +erase /Y BuildCVS.txt *.in *.spec *.guess *.sub mkinstalldirs modules install-sh *.sh descrip.mms +erase /Y configure samples\configure samples\*.in demos\configure demos\*.in contrib\configure contrib\*.in +erase /Y setup.h.in setup.h_vms +erase /SY Makefile.in +erase /Y docs\html\wxbook.htm docs\html\roadmap.htm +erase /Y contrib\docs\winhelp\mmedia.* +erase /Y contrib\docs\winhelp\stc.* +erase /Y contrib\docs\htmlhelp\mmedia.* +erase /Y contrib\docs\htmlhelp\stc.* +erase /Y contrib\docs\pdf\*.* +erase /sxzy contrib\docs\latex\ogl +erase /Y src\mingegcs.bat +erase /Y distrib + +rem Now copy some binary files to 'bin' +if not isdir bin mkdir bin +copy %src\bin\dialoged.exe bin +copy %src\bin\tex2rtf.exe bin +copy %src\bin\dbgview.* bin +copy %src\bin\life.exe bin +copy %src\demos\life\breeder.lif bin +copy %src\docs\winhelp\dialoged.hlp %src\docs\winhelp\dialoged.cnt bin +copy %src\docs\winhelp\tex2rtf.hlp %src\docs\winhelp\tex2rtf.cnt bin + +Rem Make wxMSW-xxx.zip +zip32 -r ..\wxMSW-%version%.zip * + +rem Time to regenerate the Inno Setup script, wxwin2.iss. +rem NB: if you've changed wxwin2.iss using ScriptMaker, call splitinno.exe +rem from within distrib\msw, to split off innotop.txt and innobott.txt. +rem (NOT YET IMPLEMENTED) +echo Calling 'makeinno' to generate wxwin2.iss... +call %WXWIN\distrib\msw\makeinno.bat + +erase /Y %dest\setup.* + +rem Now invoke Inno Setup on the new wxwin2.iss +set innocmd="C:\Program Files\Inno Setup 1.3\compil32.exe" /cc %WXWIN\distrib\msw\wxwin2.iss +echo Invoking %innocmd... +start "Inno Setup" /w %innocmd% +pause Press any key to continue with the wxWindows distribution... +Rem ren %WXWIN\deliver2\setup.EXE %WXWIN\deliver2\wxMSW-%version%-setup.exe + +:tidyup +cd %dest + +rem Put all the setup files into a single zip archive. +zip32 wxMSW-%version%-setup.zip readme-%version%.txt setup.* + +echo wxWindows archived. + +goto end + +:usage +echo DOS wxWindows distribution. Zips up all GTK/Motif/MSW/doc files, +echo and optionally makes a deliver2\wx directory and a setup.exe +echo if you specify 'inno' (skipping the zipping if you use 'innoonly'). +echo. +echo "Usage: zipdist [inno | innoonly]" + +:end diff --git a/distrib/msw/zippatch.bat b/distrib/msw/zippatch.bat index 37742c7514..4980369d25 100755 --- a/distrib/msw/zippatch.bat +++ b/distrib/msw/zippatch.bat @@ -1,12 +1,10 @@ @echo off rem Zip up a patch file -Rem m:\wx2 contains the latest version + any crucial patches -set src=m:\wx2 +set src=d:\wx2\wxWindows set dest=%wxwin\deliver -set wise=0 Rem Set this to the required patch version -set version=03 +set version=01 if "%src" == "" goto usage if "%dest" == "" goto usage diff --git a/docs/base/install.txt b/docs/base/install.txt new file mode 100644 index 0000000000..39cc51a7e7 --- /dev/null +++ b/docs/base/install.txt @@ -0,0 +1,61 @@ + +Installing wxBase 2.2 +--------------------- + +This is wxBase 2.2 for Microsoft Windows 9x/NT/2000 and generic Unix +platforms. wxBase is a collection of non GUI classes, functions and macros +used by wxWindows framework. + +It contains several data structure classes (as wxWindows predates STL, it has +its own string, list, array, hash table, ... classes and also a powerful +wxDateTime class), OS-abstraction classes (wxThread, wxSocket, wxStopWatch &c) +and a few more utility classes (wxCmdLineParser, wxConfig for working with +.INI and other configuration files, wxDllLoader for run-time binding and much +more). + +Compilation +----------- + +a) under Win32 with Visual C++: open the provided wxBase.dsw workspace. From + it, you can build wxBase as a static library and/or as a DLL. Please see + + http://zeitlin.online.fr/wxWindows/buildmsw.html + + for the instructions on how to use wxBase in your own projects. You can + also download the precompiled binaries from + + http://zeitlin.online.fr/wxWindows/binaries.html + + NB: it should be possible to compile wxBase with other compilers as well, + if you managed to do this, please let me know so that your makefiles + could be included in the next distribution. + +b) under Unix/BeOS: use configure with --disable-gui argument. Building wxBase + in a separate directory is recommended, i.e.: + + $ gunzip -c wxBase-x.y.z.tar.gz | tar xvf - + $ cd wxBase-x.y.z + + # assuming you want to build the debug version of the library + $ mkdir debug + $ cd debug + $ ../configure --disable-gui --enable-debug + + # if you want to build the release version: + $ mkdir release + $ cd release + $ ../configure --disable-gui + + # in both cases + $ make && make install + + Under most modern Unices you can specify --disable-static option to +configure to avoid building the static libraries (but only the shared ones) to +save some time and disk space. + +Problems +-------- + +If you encounter problems or bugs, please report them to +wx-users@wxwindows.org mailing list. Be sure to mention your platform, wxBase +version and the compiler information. Thanks! diff --git a/docs/base/todo.txt b/docs/base/todo.txt new file mode 100644 index 0000000000..d0a89ce7d9 --- /dev/null +++ b/docs/base/todo.txt @@ -0,0 +1,5 @@ + +TODO for wxBase 2 +----------------- + +better BeOS support. diff --git a/docs/bugs.txt b/docs/bugs.txt index 5efee18a8f..0e3f60470b 100644 --- a/docs/bugs.txt +++ b/docs/bugs.txt @@ -32,7 +32,7 @@ was popped up. wxWINDOWS VERSION: 2.0.1 PLATFORM(S): wxMotif DATE IDENTIFIED: ?/?/1998 -IDENTIFIED BY: Julian Smart +IDENTIFIED BY: Julian Smart DATE FIXED: FIXED BY: @@ -75,7 +75,7 @@ WORKAROUND: wxWINDOWS VERSION: 2.0.1 PLATFORM(S): All DATE IDENTIFIED: ?/?/1998 -IDENTIFIED BY: Julian Smart +IDENTIFIED BY: Julian Smart DATE FIXED: FIXED BY: @@ -244,7 +244,7 @@ WORKAROUND: visitor_email_address: haneef@symphonyeda.com wxWINDOWS+VERSION: 2.1.12 DATE+FIXED: 29/11/99 -FIXED+BY: Julian Smart +FIXED+BY: Julian Smart DATE+FIXED: DATE+IDENTIFIED: 29/11/1999 diff --git a/docs/changes.txt b/docs/changes.txt index 2409dab2be..0efa29ba51 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,7 +1,325 @@ -wxWindows 2 Change Log ----------------------- +wxWindows 2.2 Change Log +======================== -2.1.14 +INCOMPATIBLE CHANGES +-------------------- + +wxMSW: + +- wxListCtrl::Find() parameter meaning changed, see docs for details + (starting item is now included in the search, use 0 to search from the + beginning) + +OTHER CHANGES +------------- + +2.2.9 +----- + +All: + +- several memory leaks fixed, a few speed optimizations were done +- using wxURL now enforces linking HTTP and FTP protocols in + +Unix: + +- configure changes: the system libraries are now used if found, fixes for + configuring under Solaris and Mac OS X, better support for 64 bit + architectures (including IA64) + +- call dlopen() with RTLD_GLOBAL flag + +- wxBase: + +- fixed bugs in wxString::rfind() and resize() +- fixed wxStrtok() +- miscellaneous fixes in wxDateTime +- bug fixes in wxODBC + +wxMSW: + +- fixed wxChoice size calculations +- fixed bad resource leak in wxListBox +- fixed crash in wxSetFocusToChild() +- fixed toolbar buttons drawing under Windows 2000 +- significant speed optimizations in wxRegConfig +- better handling of accelerators +- wxComboBox can now process enter key and sends TEXT_UPDATED more often +- fixed crashes with big XPM files +- compilation fixes for Mingw32/JPEG code + +wxGTK: + +- fix for non-US keyboards +- improvents for 8bpp displays +- various wxComboBox fixes +- corrected radio button event sending +- fixed slider value rounding, wxGA_VERTICAL style is now supported +- fixed tree control invalid pointer after drag bug + +2.2.8 +----- + +There was no official wxWindows 2.2.8 release. + +2.2.7 +----- + +All: + +- significant speed optimizations in several classes +- wxFont::operator==() fixed + +Unix: + +- support for OpenBSD added to configure (Dennis Taylor) + +wxBase: + +- wxLongLong compilation fixed for SGI native compiler +- wxString::FormatV() fatal bug fixed + +wxMSW: + +- wxExecute DDE bug corrected: no spurious error messages any more +- wxMSW focus handling problems (notable with toolbars and splitters) fixed +- wxListCtrl attributes are handled correctly when inserting/deleting/sorting +- wxPrinterDC resource leak fixed +- fixed paper size handling when printer device driver reports DM_PAPERSIZE with + dmPaperSize >= DMPAPER_USER +- implemented renaming of wxRegConfig groups + +wxGTK: + +- wxToolbar::InsertSeparator() fixed +- foreign (non US) characters input problem fixed +- assorted wxActivateEvent fixes + +wxHTML: + +- fixed parsing of à + +2.2.6 +----- + +wxBase: + +- fixed problem with wxURL when using static version of the library +- crash when reading certain malformed mailcap entries under Unix fixed +- memory/resource leak in wxSocket::Accept() fixed (Kruba Fabien) + +All (GUI): + +- Spanish translations added (Luis Paúl Tomillo) +- bug in wxDocMDIParentFrame::OnMRUFile() fixed +- wxYieldIfNeeded added, to ignore yield recursion. + +wxMSW: + +- wxChoice sizing bug introduced in 2.2.5 fixed (oops) and calculating of + the size of initially empty wxChoice controls fixed as well +- bug with negative coordinates being turned into huge positive ones in + EVT_MOVE fixed (Imad Jureidini) +- jpeg library compilation fixed for newer versions of mingw32 and cygwin +- controls which don't accept focus don't get it on left mouse click +- wxToolBar::DeleteTool() in presence of toolbar controls fixed +- wxDC::DeviceToLogical[XY] fixed (Chuck Messenger) + +wxGTK: + +- fixed configure bug: it didn't define HAVE_VSNPRINTF properly always +- wxGauge now supports wxGA_VERTICAL (Shane Forsythe) +- fixed keyboard input in wxSpinCtrl + +wxHTML: + +- fixed bug in parsing tags with whitespaces around '=' in tags, + e.g. + +2.2.5 +----- + +- fixed memory corruption/crash in wxStreamBuffer +- wxTree/ListCtrl position fix (Mike Oliver) +- Italian translations updated +- Windows 2000 toolbar colours problem fixed + +2.2.4 +----- + +- chinese translations added +- wxTreeEvent::GetPoint() returns correct position for ITEM_XXX_CLICK events + +2.2.3 +----- + +wxGTK: + +- frames created with wxDefaultSize will have some reasonable default size and + not be created with 0 size + +2.2.2 +----- + +wxGTK: + +- better (implicit) themes support + +2.2.1 +----- + +wxBase: + +- Fixed logic bug in wxDateTime::ParseDate. +- wxDB: replaced German variable names with English. +- wxDbGetConnection() did not check for the correct scrolling + of cursors when re-using a cached database connection. + +All (GUI): + +- Corrected uninitialized variable in wxDocument constructor. +- DocView now finds more appropriate parent frame for dialogs. +- Filter index checked, then path to find correct doc template. +- Unicode compile fixes. +- Generic list control column sizing bug fixed. +- Corrected wxComboBox validation behaviour. +- Added EVT_UPDATE_UI_RANGE macro. +- Some DB sample problems corrected. +- wxGrid fixes. +- Fixed low resolution problem with wxPostScriptDC. + +wxMSW: + +- Removed delayed loading for winmm in VC++ makefile (problems + reported); USE_GLCANVAS now a variable in makefile.vc. +- Comments added to setup.h. +- wxCommandEvent::IsChecked now works for menu items. +- wxDEFAULT font size handled properly. +- Mods for Cygwin 1.1. +- Updated VC++ project and makefiles for consistency. DLL now + has version number in name. +- Added insertion point functions implementation for wxComboBox. +- Handle wxNO_FULL_REPAINT_ON_RESIZE for MDI children. +- Fixed problem with iconizing miniframes. +- Fixed bug with radiobox size being miscalculated if the label was + too long. +- The MSW radiobutton now informs about its state in the event (m_int) + as wxGTK did. + +wxGTK: + +- Please see docs/gtk/changes.txt. + +wxMotif: + +- Small compilation fixes + +Documentation: + +- Added wxDb documentation. +- Added notes for Cygwin 1.1 to MSW install.txt. + +2.2.0 +----- + +wxBase: + +- Fixed bug with directories with trailing (back)slashes in wxPathExists +- wxString: added wxArrayString::operator==() and !=() +- Fixes for wxCmdLineParser +- Added wxGetLocalTimeMillis +- Completed Czech translations +- Some stream corrections +- added missing consts to wxPoint operators +- wxDateTime ParseFormat fixes +- wxFile::Open(write_append) will create file if it doesn't exist +- small fixes to MIME mailcap test command handling, more MIME tests in the sample + +All (GUI): + +- wxGenericDragImage now allows virtual image drawing, and + flicker-free dragging is now possible +- Added wxPrinter::GetLastError +- Fixed wxLogGui reentrancy problem +- Paper names now translated +- wxGrid fixes +- Generic validator now caters for more cases (integers in + wxTextCtrl, strings in wxChoice, wxComboBox) +- Fixed crash when docview On... functions return FALSE. Show + error message when an non-existent filename is typed into the Open + File dialog. +- Corrected Baltic font encoding handling +- wxImage: enhanced TIFF code, added new platform-independent BMP + writing code +- wxKeyEvent::GetKeyCode() and HasModifiers() added and documented +- Fixed wxPropertyForm crashes in sample +- wxWizard now calls TransferDataFromWindow() before calling + wxWizardPage::GetNext() fixing an obvious bug + +wxMSW: + +- wxWindow::GetCharWidth/Height now calculated accurately. + This will affect all .wxr dialog resources, so for + backward compatibility, please set + wxDIALOG_UNIT_COMPATIBILITY to 1 in setup.h +- wxListCtrl: set item text in LIST_ITEM_ACTIVATED events +- wxTextCtrl: implemented setting colours for rich edit controls +- wxColour now accepts both grey and gray +- BC++ DLL compilation fixed +- Watcom C++ makefiles improved for JPEG and TIFF compilation +- Fixed submenu accelerator bug +- Fixed dialog focus bug (crash if the previous window to have + the focus was destroyed before the dialog closed) +- Too-small default wxTextCtrl height fixed +- fixed "missing" initial resize of wxMDIChildFrame +- wxFrame restores focus better +- Now ignore wxTHICK_FRAME in wxWindow constructor: only relevant to + frames anddialogs, interferes with other window styles otherwise + (sometimes you'd get a thick frame in a subwindow) +- wxTextCtrl insertion point set to the beginning of the control by SetValue +- Fix so wxMDIParentFrame is actually shown when Show(TRUE) is called. +- wxFileDialog: adjusts struct size if there's an error (struct + sizes can be different on different versions of Windows) +- wxImageList::GetSize() documented and added to wxMSW +- fixed default dialog style to make them non resizeable again +- fixed wxFrame::IsShown() which always returned TRUE before + +wxGTK: + +- Please see docs/gtk/changes.txt. + +wxMotif: + +- Small compilation fixes + +Documentation: + +- wxCaret documented + +2.1.16 +------ + +wxBase: + +All (GUI): + +wxMSW: + +- Various bug fixes +- Added wxCHMHelpController, for invoking MS HTML Help + files. This works under VC++ only +- Modal dialog handling improved +- Printer dialog now modal + +wxGTK: + +- Various bug fixes + +wxMotif: + +- Various bug fixes + +2.1.15 ------ Documentation: @@ -50,7 +368,7 @@ all (GUI): MIME types if available (Unix only) - wxDC::DrawRotatedText() (based on contribution by Hans-Joachim Baader) - TIFF support added (libtiff required and included in the distribution) -- PCX files can now be written (24 bit only so far) +- PCX files can now be written (256 and 24 bits) - validators may work recursively if wxWS_EX_VALIDATE_RECURSIVELY is set - wxScrolledWindow now has keyboard interface - wxTextEntryDialog may be used for entering passwords (supports wxTE_PASSWORD) @@ -95,7 +413,7 @@ wxHTML: - almost complete rewrite of wxHtmlHelpController, including faster search, bookmarks, printing, setup dialog - and cross-platform binary compatible .cached files for faster + and cross-platform binary compatible .cached files for faster loading of large helpbooks, case insensitive search splitted into 3 parts: wxHtmlHelpData, Frame and Controller - added support for charsets and tag diff --git a/docs/gtk/changes.txt b/docs/gtk/changes.txt index 8afa17d42e..68825b2141 100644 --- a/docs/gtk/changes.txt +++ b/docs/gtk/changes.txt @@ -1,7 +1,205 @@ -19th March '2000: wxWindows 2.1.14 released +This file contains the detailed log of wxGTK-specific changes, please see +doc/changes.txt for the concise log of important changes in all wxWindows +ports. + +*** next release *** + +*** 22th May 2001: wxWindows 2.2.7 released *** + +Applied patch to allow using non-Latin keyboards. + +Added wxActivateEvent for top level windows. + +Corrected wxActivateEvent for app (now wxEVT_ACTIAVTE_APP). + +wxTextCtrl sends focus events. + +Corrected so-library name. + +wxTreeCtrl now shows an item, if it was programmatically selected. + +wxTextCtrl no longer sends any text event upon its construction. + +wxSpinCtrl misbehaviour fixed. + +*** 7th March 2001: wxWindows 2.2.6 released *** + +wxWakeUpIdle() works again + +wxGauge now supports wxGA_VERTICAL (Shane Forsythe) + +*** 29th January 2001: wxWindows 2.2.5 released *** + +Synchronized with wxMSW 2.2.5, include macros +for upwards 2.4.0 compatibility. + +Added missing wxEntry prototype to wx/gtk/app.h. + +Fixed compilation with --enable-no_rtti/no_exceptions +with older egcs. + +*** 15th January 2001: wxWindows 2.2.4 released *** + +Corrected wxYield() to handle recursive calls +more gracefully (and with a warning in debug mode). +This fixes a problem with crashing wxTreeCtrl's +built-in drag'n'drop and probably some other as +well. + +Corrected wxMenuItem::GetLabel() to handle deliberate '_' +characters correctly. + +Patch for better 8-bit-display support. + +Corrected log error message box. + +Implememted wxCommandEvent::IsSelection() for wxListBox. + +Corrected wxListBox::Set() for sorted mode. + +Added EVT_TEXT_UPDATED for spin ctrl. + +Corrected wrongly rounded value in slider and scrollbar +for negative values. + +Small fix for wxTextFile type guessing. + +Translation updates. + +Various other fixes. + +Synchronized release with wxMSW again. + +*** 3rd November: wxWindows 2.2.3 released *** + +Fixed bugs in HTTP code. + +Implemented wxNO_FULL_REPAINT_ON_RESIZE whenever possible +and reduced flicker a little (no longer diables GTK's own +anti-flicker code). + +Always have a clipping region equivalent to the update +region in OnPaint events (such as under wxMSW and wxMac). + +Implemented wxListBox::SetFirstItem(). + +Fixed some minor problems in HTML code, wxListCtrl, +wxListBox. + +Fixed compilation on RedHat 7.0. + +Updated many translations, added Swedish. + +Changed default screenpixels-per-inch from 100 to 75 in +printing code. + +Updated AFM font metrics for Ghostscript fonts and let +Linux and FreeBSD default to using GS fonts (and not +Adobe fonts). + +*** 20th September: wxWindows 2.2.2 released *** + +Fixed wxSizer bug that made items with option +flags greater than 1 report a wrong size. + +Fixed many incompatibilties with GTK themes - +essentially a backport from the 2.3 branch. + +Added missing wxImage::Paste() for transparent +images. + +Fixed a drawing error for ellipses and arc in both +the DC code and the PostScript code. + +Fixed wxListCtrl::HitTest() for report mode. + +Other minor fixes. + +*** 20th August 2000: wxWindows 2.2.1 released *** + +Minor build fixes. + +Use the wxCommmandEvent::IsChecked() function for checkable +menu items. This mean that the m_int parameter no longer +contains the ID of the menu! + +Fixed major problems in ODBC logging code. This change is +binary backward incompatible. + +Fixed reentry problems in DnD code. + +Changed PostScript code so that it can handle a higher +resolution (720dpi). + +Minor improvements to wxGrid code. + +Corrected guffow-scrolling so that no surplus expose +events are generated. + +Corrected bug in wxMask creation on 16-bit displays. + +Minor correction to wxDC::DrawRoundedRectangle. + +Added support for and menu accelerators. + +Made wxComboBox case-sensitive. + +Minor correction to doc-view architecture. + +Minor wxCommandLineParser changes. + +*** 10th July 2000: wxWindows 2.2.0 released *** + +Added code for writing BMP images. + +Added code for writing TIFF images. + +Fixed problem with best visuals (on SGI) + +Applied a number of compile fixes for various Unix variants. + +Fixed wrong background colours appearing sometimes and fix +for resetting the default font in controls. + +Speed-up to wxListCtrl. + +Fixed bug wxTextStream::ReadLine() + +Various improvements commandline parser. + +Changed wxColour unequal operator to compare colours. + +Fixed wxMenuBar::Replace bug. + +Added new position to slider update event. + +Minor fix to idle handling (now wxGTK events come after all GTK events). + +Various fixes to the new wxGrid class. + +Bug-fixes. + +*** 4th June 2000: wxWindows pre-2.2 release *** + +Complete freeze now. Only vital bug-fixes allowed. + +Various enhancements to wxSizer. + +Added wxGridSizer and wxFlexGridSizer. + +Reworked wxURL. + +MANY bugfixes. + +*** 22th March 2000: wxWindows 2.1.15 released *** + +Build fix. RPMs no loner require GTK's include files. An extra library for the OpenGl class now gets builts -and installed. There is also an extra RPM for this +*** 19th March 2000: wxWindows 2.1.14 released *** + +An extra library for the OpenGl class now gets builts +and installed. There is also an extra RPM for this small class now. Added possibility to compile wxGTK with already installed @@ -59,7 +257,7 @@ style when using the default. The L-GPL iODBC library must now be enables explicitly so as to not mislead people into reading the license wrong. -24th January '2000: wxWindows 2.1.13 released +*** 24th January '2000: wxWindows 2.1.13 released *** Corrections to TAB handling in notebooks. @@ -104,9 +302,9 @@ Updates to the ODBC classes (George Tasker). Build-fixes for various platforms and compilers. -6th January '2000: wxWindows 2.1.12 released +*** 6th January '2000: wxWindows 2.1.12 released *** -Who has a BigEndian computer (e.g. Sparc or PowerPC) that runs a 15 +Who has a BigEndian computer (e.g. Sparc or PowerPC) that runs a 15 and/or 16 bit colour mode? I need this for testing purposes, i.e. this person could help me by running a small testprogram and sending me the output. @@ -195,7 +393,7 @@ Fixed several problems with buffered streams. Added support for setting the end-of-line mode (Mac,DOS,Unix) in wxTextOutputStream. Added code to send events from one thread to another and added -function to wake up idle system (needed for sending inter-thread +function to wake up idle system (needed for sending inter-thread events). Corrected wrongly set flag in dialogs which broke its tab code. @@ -215,7 +413,7 @@ More minor changes and fixes. Began work on a new dialog and resource editor (wxDesigner). -7st November '99: wxWindows 2.1.11 released +*** 7st November '99: wxWindows 2.1.11 released *** There is still an unresolved problem with bitmap to image conversion on big-endian architectures (such as Solaris), @@ -229,8 +427,8 @@ release will be called wxWindows 2.2.X, development snapshots will be called 2.1.X. A lot of discussion has been wasted on how to maintain a -once released stable version. It was almost universally -agreed that only a commercial entity will have the motivation +once released stable version. It was almost universally +agreed that only a commercial entity will have the motivation ($$$) to do that - so far there is no wxWindows Inc. Support for GTK 1.0 has been dropped. This version has @@ -241,8 +439,8 @@ Rewritten the support for multiple-format Drag'n'Drop and clipboard under both GTK and MSW. There are probably some problems here and there left. -wxListBox and wxChoice can now handle only either void -client data (which it will not delete on destruction) or +wxListBox and wxChoice can now handle only either void +client data (which it will not delete on destruction) or client data of the wxClientData type (which it will delete), instead of both at the same time. The same will happen to wxComboBox some time. Also, wxListBox can now sort its @@ -336,7 +534,7 @@ Made default button action work in more cases. As the old makefile system didn't work, I trashed it and wrote a new one - mo more GNU. This, of course, caused a lot of people -to start sing their song of complaints - any change is a good +to start sing their song of complaints - any change is a good opportunity to complain, but the effect of the change is that we now have shared library support on Linux and Solaris (and probably others as well) and that the Linux shared library no @@ -399,7 +597,7 @@ A few more minor fixes. 6th August '99: Eight wxGTK 2.1 snapshot released -The new makefile system is not able to produce shared libraries +The new makefile system is not able to produce shared libraries on Unix with the exception of Linux - libtool is really great. Therefore, the build system defaults to static libraries on anything but Linux for now. @@ -462,8 +660,8 @@ Some more corrections I forgot. New wxPython (includes new layout system and printing). 15th June '99: Sixth wxGTK 2.1 snapshot released - - + + The biggest change is the completely rewritten configure/makefile system using automake. The main argument for switching to automake is that the resulting makefiles should be more portable so that @@ -473,69 +671,69 @@ shared-only compilation, can be invoked from any directory for concurrent builds wihtin one source tree, uses libtool for greater shared-library platform support, has a functinonal "make uninstall", works with GTK, Motif and WINE, conforms better to GNU standards -as far as configure option names are concerned and is easier to +as far as configure option names are concerned and is easier to maintain. - + Applied patches to compile wxGTK on OS/2. - + Configure checks for byte-order and new defines for byte swapping with respect to the byte-order. Added test for this to typetest sample. -Also made BMP handler bigendian safe so that it should work on -Solaris and such. - -Small changes to basic drawing stuff: made wxColour actually compare +Also made BMP handler bigendian safe so that it should work on +Solaris and such. + +Small changes to basic drawing stuff: made wxColour actually compare RGB values in the == operator, added new constructor to wxMask, corrected initial background colour for DCs, it is now possible to use a wxWindowDC etc before there is any window (this doesn't make any sense, but it is what wxMSW does.) - + Added support for the PRIMARY SELECTION to the wxClipboard class. - + Fixed redraw bug when scrolling window-less widgets out of the visible area (actually a work-around for a GTK bug). - + Regrouped some samples, created new one for various versions of the wxTextCtrl. - + Added wxWindow::Reparent() and wxFrame::MakeModal(). - + Improved handling of column width in wxListCtrl and made this more compatible with the wxMSW version. Also removed a bug from the wxImageList returning an off-by-one id for added images. - + Fixed keyboard hotkeys and resizing for wxMDIChildFrame menu bars. - + Added flag to wxSplitterWindow to update its children's sizes "live" instead of moving a XOR'ed bar around - this is a resource-draining option. Also corrected cursors in splitter window. - + New way to show "disabled" or greyed toolbar items. - + Rewrote parts of the tree ctrl to allow multiple selections and variable size items (Sylvain). These new function do not exist in the native Win32 tree control. - + Implemented global cursors and wxBusyCursor etc. Also removed another cursor misbehaviour. - + Updated many parts of the documentation to reflect changes in wxWindows 2.1, wxPython and more exact description of cross-platform issues as well as platform differences. - + Many other fixes, mainly by others... - + Further compile fixes for different architectures. - - + + 25th May '99: Fifth wxGTK 2.1 snapshot released - - + + This is mostly a bug-fix release. We are having funny times to make wxGTK work well with different micro versions of GTK 1.2 - which is very close to impossible. @@ -544,165 +742,165 @@ vary a lot. I use GTK 1.2.3 and only get wanrnings in one sample (notebook) and that one is due to a bug in GTK - some people using GTK 1.2.2 reported hundreds of warnings getting spitted out for what seems like no reason. - + This snapshot contains the beginnings of our merging of headers, meaning that in the future all ports will use the same headers and will share a lot more code. We have taken this moment to reorganize some code and hope to have eliminated much bad C++ code, as reported primarily by SGI's compilers (Vadim Zeitlin). - + Rewritten char and key event propagation routines to reflect documentation and do the same on wxGTK as on wxMSW. If you are interested in ascii chars -and cursor key etc, intercept EVT_CHAR, if you +and cursor key etc, intercept EVT_CHAR, if you are interested in which key actually got pressed, intercept EVT_KEYDOWN (Norbert Irmer). - + Control that are given -1 as their ID no longer get arbitrary positive IDs assigned but arbitrary negative IDs. This had caused some trouble with ID clashes. - + wxWindow and wxScrolledWindow no longer use the wxScrollEvent, but the newly invented wxScrollWinEvent so that no mixing up of events sent from wxSliders or wxScrollbars placed in a wxWindow can occur. - + Added wxProgressDialog for use with long background work such as printing. - + Added drawing sample and scrolling sample, both of which show some misbehaviours... - + When drawing with the wxXOR logical mode, wxGTK now uses GdkXOR (instead of GdkInvert) and when drawing in wxINVERT logical mode, wxGTK now uses GdkInvert (as before). When you did some rubberband dragging and you used wxXOR and a black pen, then you should change wxINVERT. - + Applied more patches for SGI and HP-UX compilation. - + More updates for wxSockets (Guilhem Lavaux). Seems to be nearly finished. - -You can now use threads within your GUI again. Well, -at least if you know what you are doing and you had a look + +You can now use threads within your GUI again. Well, +at least if you know what you are doing and you had a look at the threads sample. - + wxGLCanvas updated so that it can share display lists -over several windows and to not exhibit any flicker. +over several windows and to not exhibit any flicker. (Norber Irmer). - + wxNotebook revamped so that its process of creation matches wxMSW's more closely, also avoiding problems with wrong page number. Added InsertPage() and the possibility to prevent switching pages by intercepting the PAGE_CHANGING event. Also, wxNotebooks now get shown even if all pages are empty. - + Added Activate() to wxMDIChildFrame (Russel). - + Improved wxSplitterWindow behaviour and visual feed-back when given a minimal size etc (Bruce DeVisser). - + Minor updates to wxTreeCtrl, wxListBox, printing, wxClipboard, wxString, wxThreads and many others. - + Also wxMSW got a big face-lift, not to mention the new wxMac release... - - - + + + 11th May '99: Fourth wxGTK 2.1 snapshot released - - + + This is mostly a bug-fix release. This affects wxSocket, wxThread, and a few GUI classes. Also more work has been done and window placement and decorations etc. which we hope to have finished now. - + Applied patches for FreeBSD and SGI compilation (not yet finshed). - + Updated wxPython to beta 9. - + Made wxGLCanvas work again - strangely it flickers now... - + wxStaticText is currently broken with GTK 1.2.2 (which I don't yet have and thus could not fix). Also, scrolling subwindows (although much improved including a sample) doesn't work perfectly due to a bug in GTK 1.2.1 (probably 1.2.2 as well). - -Added wxStaticLine. - -Note that the next release might bring about changes to keyboard -handling and scroll event intercepting from wxScrolledWindow. - -By and large much of the code has stabilized and won't be much -different in the final wxWindows 2.1 release. Please test as -much as you can. - -The next release will have a new build system. - - +Added wxStaticLine. + +Note that the next release might bring about changes to keyboard +handling and scroll event intercepting from wxScrolledWindow. + +By and large much of the code has stabilized and won't be much +*** different in the final wxWindows 2.1 release. Please test as *** +much as you can. + +The next release will have a new build system. + + + 3rd May '99: Third wxGTK 2.1 snapshot released - - + + Updated INSTALL.txt and SYMBOLS.txt. - + Support for Unicode is now almost complete. Most samples work in both Unicode and non-Unicode mode. Thanks to Ove Kaaven and Vadim. - + Internal changes required for wxOLE and addition of a very experimental wxOLE code section using GNOME's Bonobo library (from GNOME's CVS). - + New version of wxPython that works with the wxGTK 2.1. This now includes a very comprensive test/demo suite. Thanks to Robin Dunn, Harm v.d. Heijden and others. Beware of the hang-man... - + More fine tuning of focus handling and GUI widgets. - + Complete rewrite of wxSocket classes (still experimental). Thanks to Guilhem Lavaux. - + wxMenuBar supports underlined shortcuts like Windows does, indicated by a leading & character. wxMenus now have hotkeys such as in wxXt and wxMSW. - + Rewritten MDI subsystem. - + Correcetions and additions to the printing framework including a paper type database (Julian). - + Several controls now support more style flags for modifying look (and feel) of the controls and windows. - + New implementation of idle handlers, which now send an idle event only once after the event queue has been emptied (which is what happens in the wxMSW port as well), not regularly. This no longer forces wxGTK applications to sleep (by having to call usleep()) in idle time - giving more CPU slices to the application if desired. - -wxGLCanvas (the OpenGl for wxWindows) now accepts keyboard input. - -The usual number of compile and bug fixes from all involved. - - +wxGLCanvas (the OpenGl for wxWindows) now accepts keyboard input. + +The usual number of compile and bug fixes from all involved. + + + 21st April '99: Second wxGTK 2.1 snapshot released - - + + Added much code for Unicode support. Still experimental, but looks very cool - thanks to Ove Kaaven and Vadim Zeitlin. If you are very brave, then you can compile wxGTK with "configure --with-unicode". - + More updates on the dreaded issue of making frames and dialogs impossible to resize etc. - + Drag and Drop works now under GTK 1.2 - at least basically when dragging and dropping text. The API is not entirely fixed yet but seems quite good now. Support for different actions (copy/move/link/..) still missing. I also removed support for GTK 1.0 Drag and Drop - this is just broken and unusable in GTK 1.0 and I don't want to fix it. - + I now embed the JPEG library and handlers for JPEG and GIF have been added to the existing PNG and BMP (and XPM for GTK version only). In the future, the RPMs will not contain these libraries but depend on @@ -711,211 +909,211 @@ ship with everything that is needed for wxGTK so that no downloading of ten image libs will be required - also avoiding problems with ten different kinds of libJPEG-6.0.1.7.IV beta 7. We also updated the PNG code to the newest PNG version. - + wxImage now makes use of the fast rendering code as provided by GTK 1.2 whenever possible. This should mean a speed-up for graphics heavy apps. - + Many fixes all over. Also should compile with GTK 1.2.0 as opposed to only with GTK 1.2.1 now. - -wxPython still doesn't compile, I think. - - +wxPython still doesn't compile, I think. + + + 12th April '99: First wxGTK 2.1 snapshot released - - + + This is the first developers' version of wxWindows 2.1 for GTK. It's main new feature is that it supports GTK 1.2 (as opposed to GTK 1.0) which will make development within the GNOME evironment a lot easier. - + Apart from the move to GTK 1.2 and the changes (some major) that were required as part of that work, enhancement or corrections have been -made to many of the non-GUI classes and functions (such as wxClipboard, +made to many of the non-GUI classes and functions (such as wxClipboard, wxThread, wxSocket, wxConfig) and a few GUI classes (accelerators in menus, listbox always with scrollbar, wxFrame honours Motif Window Manager hints, corrected tab traversal for broken GTK 1.0 widgets). - + There have been slight changes to the priting dialogs and their setup data (which might break apps using this code in previous versions). Also, a bug concerning printing white has been fixed (actually not tested). - + Although this is only the first 2.1 snapshot, there is little reason not to use it as many bugs from version 2.0 have been corrected. There are, pf course, still a few problem left with GTK 1.2 (some of which relate to bugs in GTK). - + I think I preserved backward compatility with GTK 1.0 and if not it should be easy to fix - but mostly I don't care. - + Drag'N'Drop is currently completely broken. Also, wxPython currently doesn't compile with this release. The OpenGL canvas still seems to work. - + Major targets for the final release (still a long way): a new configure system, support JPEG and GIF formats, wxHTML, super-duppah frame layout -stuff, syntax-highlighting editor, possibly Unicode, possibly some GNOME +stuff, syntax-highlighting editor, possibly Unicode, possibly some GNOME gooddies, possibly world domination. - - -5th March '99: wxWindows 2.0 released - - + + +*** 5th March '99: wxWindows 2.0 released *** + + This is the final version of wxWindows 2.0 for GTK. The versions for Windows and Motif (and also this version) are available form Julian Smart's site. The Mac version is still under development. - - -19th February '99: wxWindows 2.0 beta 5 - - + + +*** 19th February '99: wxWindows 2.0 beta 5 *** + + This is the fifth beta release and it contains mostly bug fixes and updates for documentation. - -Applied compile fixes for Solaris (different flavours and compilers). - - -12th February '99: wxWindows 2.0 beta 4 - - +Applied compile fixes for Solaris (different flavours and compilers). + + + +*** 12th February '99: wxWindows 2.0 beta 4 *** + + This is the fourth beta release and it contains mostly bug fixes and updates for documentation. - + Tracked a few more cases, where the bahaviour between wxMSW and wxGTK differed. This was the case for closing a dialog or frame as well as for clearing a device context or setting its background colour and some other minor details. - -Most standard dialogs have been face-liftet a little. - -Implememted default buttons for GTK. - -Fixed many bugs. You guessed it. - - -29th January '99: wxWindows 2.0 beta 3 - - -This is the third beta release and it contains mostly bug fixes. - +Most standard dialogs have been face-liftet a little. + +Implememted default buttons for GTK. + +Fixed many bugs. You guessed it. + + + +*** 29th January '99: wxWindows 2.0 beta 3 *** + + +This is the third beta release and it contains mostly bug fixes. + There is one field where we haven't been able to fix the API yet, and that it Drag'n'Drop. This is mostly due to the fact that DnD in GTK 1.0 is hardly usable and much different from GTK 1.2 which means that we have to design a common API for Windows, GTK 1.0 and GTK 1.2. Although we are trying to prevent that, it is possible that wxWindows 2.0 (being based on GTK 1.0) will not have proper DnD support. - -The major changes are that tool tips have been added, threads have been completely -rewritten, the ODBC code has been updated and improved, the socket code works + +The major changes are that tool tips have been added, threads have been completely +rewritten, the ODBC code has been updated and improved, the socket code works better now. - + Classes for managing MIME-types under Windows and Unix have been added. - + There is now a wxGLCanvas class for OpenGl/Mesa for the Windows, GTK and Motif ports. Come see the penguins flying... - + Documentation has received a big face lift - it now covers nearly all the classes, at least. - + The usual amount of bug fixes. Countless. - + A few member functions of wxString have been renamed. - + For those who are using the ever-so-popular wxImage class (which now available on Motif and Windows as well) in 8-bit mode: wxGTK now creates a color cube upon start-up in 8-bit mode and thus the generation of bitmaps from images has been speeded up 20 times. - + It is now possible to develop with wxGTK without having the GTK 1.0 header files installed so that having the GTK 1.2 header files installed no longer is any problem. We also provide RPMs for RedHat glibc 2 based systems, compiled with egcs 1.1.1 on SuSE 6.0. Note that the RPM will not work in SuSE 6.0 as SuSE decided to ship 6.0 with a broken GTK+ package. - - -6th January '99: wxWindows 2.0 beta 2 - - + + +*** 6th January '99: wxWindows 2.0 beta 2 *** + + This is the second beta release and contains it mostly build and bug fixes. Threads work well now on (up-to-date) glibc 2 systems, commercial Unices and Windows. - - - -20th December '98: wxWindows 2.0 beta 1 - - + + + +*** 20th December '98: wxWindows 2.0 beta 1 *** + + This is the first beta release and we have used the time before this release to tidy up some parts of the API. All releases from now on will be source code compatible but we reserve binary compatibility for the final release. Because of this, the actual library name of -the beta version will not be 2.0 but 1.99, so that we prevent +the beta version will not be 2.0 but 1.99, so that we prevent conflicts with the final library later on. After the final release we'll only fix bugs so that there will be no reason to link any program statically with wxGTK. - + We changed the name of the shared library to include the version of the GTK used so that no conflicts emerge with simultaneous versions of wxWindows for GTK 1.0 and for GTK 1.2 and so on. - + As you can see, we have not moved to GTK 1.1.X as the different development versions are too different and buggy to be useful. We'll wait for a stable GTK 1.2 release (hardly 1.2.0) and start porting then. - + wxGTK now compiles without problems on anything between gcc 2.7.2 on Linux-x86 and egcs 1.1 on Linux-Alpha and egcs 1.0 on Sparc. This isn't as easy as it sounds... - + Available form this site are the Python bindings of wxWindows. Thanks to Robin Dunn for this tremendous contribution. Tkinter is dead, Java is dead, wxPython rules! That's all there is to say. - + Although only a few new classes have been added, many have been polished up substantially, the most visible are wxListCtrl, wxTreeCtrl and all classes related to printing. Also the DialogEd now functions -much better than before. Drag'n'Drop is fucntional but probably won't +much better than before. Drag'n'Drop is fucntional but probably won't be perfect until we use GTK 1.2 and its much improved DnD features. - + wxClipboard has arrived and works for text. Other formats have not been tested carefully yet. - + wxMiniFrame has been added which might be useful for docking toolbars etc. Someone has already done that for the MSW port and we hope to include his very nice work later. - + wxDirDialog has been added (thanks to Harm von der Heijden). - + The entite "tab traveral" system for moving from item to item in a dialog has been rewritten. It now completely overrides the not-so-well-done GTK native tab system. - + Quite much has been done to improve the wxImage class, which is now available in the Windows port as well. Very useful for anything related to image processing. wxGTK also uses this class internally e.g. to scale bitmaps when the scale factor (e.g. zooming) of a drawing context has changed. - + Some of the small and handy classes (wxDate, wxTime, wxVariant) have received a face-lift. wxList has been rewritten to make it possible to write type-safe lists. The collection of utility functions (wxFileFind etc) has been revamped and cleaned-up (thanks to Vadim Zeitlin, who has also greatly enhanced many basic classes, ranging wxString to the debug and log system). - + We removed some constructors of GDI classes (such as wxPen, wxColour) which took a pointer as a parameter. This lead to many errors among users resulting in unexpected behaviour so it was decided to remove these constructors. - + As the number of users and the number of test programs and samples is steadialy rising the core classes of wxWindows for MSW and GTK 1.0 can be considered to be very stable if not outright bug-free. I haven't diff --git a/docs/gtk/install.txt b/docs/gtk/install.txt index 684f0f6615..bfeb70d010 100644 --- a/docs/gtk/install.txt +++ b/docs/gtk/install.txt @@ -1,7 +1,7 @@ !!! When sending bug reports tell us what version of wxWindows you are using (including the beta) and what compiler on what system. One - example: wxGTK 2.1 beta 6, egcs 1.1.1, Redhat 5.0 !!! + example: wxGTK 2.2.0, egcs 1.1.1, Redhat 6.2 !!! * The most simple case ----------------------- @@ -254,9 +254,7 @@ The following options handle the kind of library you want to build. --disable-threads Compile without thread support. - --disable-shared Do not create shared libraries. - - --enable-static Create static libraries. + --disable-shared Create static libraries. --disable-optimise Do not optimise the code. Can sometimes be useful for debugging diff --git a/docs/gtk/makewxgtk b/docs/gtk/makewxgtk index d6d76f2124..2e5bcdb220 100644 --- a/docs/gtk/makewxgtk +++ b/docs/gtk/makewxgtk @@ -6,6 +6,6 @@ # if you're feeling braven, you may wish to compile with threads. # -- Julian Smart rm -f *.cache -chmod a+x configure config.sub config.guess samples/configure contrib/configure +chmod a+x configure config.sub config.guess samples/configure demos/configure contrib/configure ./configure --disable-shared --with-gtk --with-debug_flag --with-debug_info --enable-debug --without-threads --without-sockets -without-odbc -without-libjpeg make diff --git a/docs/gtk/readme.txt b/docs/gtk/readme.txt index 44dbddac2d..e1c5117e2f 100644 --- a/docs/gtk/readme.txt +++ b/docs/gtk/readme.txt @@ -1,19 +1,13 @@ - Welcome to wxWindows/Gtk 2.1.14 + Welcome to wxWindows/Gtk 2.2 -you have downloaded a beta version of the GTK+ 1.2 port of -the wxWindows GUI library. Although this is not yet the -final stable release wxGTK 2.2, the current version has -been tested carefully on many systems and has been found -to work better than any other previous version. - -This is the last beta release. wxWindows is now in a code -freeze and only bugs will be corrected. +you have downloaded version 2.2 of the GTK port of the +wxWindows GUI library. wxWindows no longer supports GTK 1.0 (as did some early snapshots) so that you will need GTK 1.2 when using it. -GTK 1.2.6 is recommended although some programs will work -with GTK 1.2.3 onwards. +GTK 1.2.6 or above is recommended although some programs +will work with GTK 1.2.3 onwards. More information is available from my homepage at: @@ -44,7 +38,7 @@ VERSION OF GTK, WXGTK, WHAT DISTRIBUTION YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried... The library produced by the install process will be called -libwx_gtk.a (static) and libwx_gtk-2.1.so.14.0.0 (shared) so +libwx_gtk.a (static) and libwx_gtk-2.2.so.0.1.1 (shared) so that once a binary incompatible version of wxWindows/Gtk comes out we'll augment the library version number to avoid linking problems. diff --git a/docs/gtk/todo.txt b/docs/gtk/todo.txt index edeeb01b94..3affb18814 100644 --- a/docs/gtk/todo.txt +++ b/docs/gtk/todo.txt @@ -1,23 +1,28 @@ -------------------- High priority --------------------- -Improve, update translations. Install *.mo files somewehere. +Improve, update translations. Mostly done. -------------------- Medium priority --------------------- +wxBitmapButton doesn't refresh when parent gets refreshed. + -> Not important. + Show accelerator control labels and actually implement them - -> Changed in GTK 1.2 (so let's do it for 1.2). Difficult. + -> Difficult. -------------------- Low priority --------------------- Right aligned checkboxes: focus highlighting is wrong, tooltips can't be set can't be set + -> Postponed. GTK 1.4 can do that. + +Add wxNoteBook::GetPageIndex() +Add wxNoteBook::SetTabPosition() + -> Postponed. More testing of Unicode support. -> Postponed. -OwnerDraw for wxListCtrl and others - -> Hardly necessary. - Implement wxPalette -> Postponed. diff --git a/docs/html/faq.htm b/docs/html/faq.htm index cbe471dcb6..8dca0fa260 100644 --- a/docs/html/faq.htm +++ b/docs/html/faq.htm @@ -1,3 +1,4 @@ + @@ -8,10 +9,10 @@ - +
- diff --git a/docs/html/faqgen.htm b/docs/html/faqgen.htm index cdea35dd73..0c14ce0fe1 100644 --- a/docs/html/faqgen.htm +++ b/docs/html/faqgen.htm @@ -1,3 +1,4 @@ + @@ -8,10 +9,10 @@ -
- + + wxWindows 2 FAQ
+
- @@ -22,21 +23,38 @@ wxWindows 2 FAQ: General See also top-level FAQ page.
+

List of questions in this category

+ +

What is wxWindows?

wxWindows is a class library that allows you to compile graphical C++ programs on a range of different platforms. wxWindows defines a common API across platforms, but uses the native graphical user interface (GUI) on each platform, -so your program will take on the native 'look and feel' that users are familiar with.

+so your program will take on the native 'look and feel' that users are familiar with.

Although GUI applications are mostly built programmatically, there is a dialog editor to help -build attractive dialogs and panels.

+build attractive dialogs and panels. Robert Roebling's wxDesigner +makes light work of resizable, portable dialogs.

-You don't have to use C++ to use wxWindows: wxWindows 1 has been interfaced to several interpreted languages, -such as CLIPS, Python, Scheme, XLisp and Perl, and there is a Python interface for wxWindows 2. +You don't have to use C++ to use wxWindows: there is a Python interface for wxWindows 2, +and also a Perl interface.

-

Can I use wxWindows 2 for both proprietary (commercial) projects, and GPL'ed projects?

+

Can I use wxWindows 2 for both proprietary (commercial) projects, and GPL'ed projects?

Yes. Please see the licence for details, but basically you can distribute proprietary binaries without distributing any source code, and neither will wxWindows @@ -56,97 +74,36 @@ keen to fix bugs as soon as possible, though obviously there are no guarantees.

Who uses wxWindows?

Many organisations - commercial, government, and academic - across the -world. It's impossible to estimate the true number of users, since +world. It's impossible to estimate the true number of users, since wxWindows is obtained by many different means, and we cannot monitor distribution. The mailing list contains around 300-400 entries which is quite large for a list of this type.

-

I am about to start a wxWindows 1.xx project. Should I use 2 instead?

+See Users for a list of some users and their applications, and +also Feedback for comments.

-wxWindows 2 is still in beta but it's actually pretty useable (Windows, GTK, Motif).

- -Porting to wxWindows 2 from 1.xx will not be too painful; see the next question -for ways in which you can make it easier.

- -

Why would I want to use wxWindows 2 in preference to wxWindows 1.xx?

- -Some reasons: +

What platforms are supported by wxWindows 2?

    -
  • In 2 there is far more flexibility, for example in the way windows can be -nested, and the way events are intercepted. -
  • There is more functionality for producing sophisticated applications, -for example using the wxTreeCtrl and wxListCtrl classes. -
  • There is better C++-conformance (such as usage of wxString and const) which -will make your applications more reliable and easier to maintain. -
  • wxWindows 2 will be better supported than 1.xx. -
  • The GTK version is attractive for people interested in writing Linux and GNOME -applications. -
  • The Mac version will be one of the best frameworks available on that platform. -
- -

How can I prepare for wxWindows 2?

- -To make porting to wxWindows 2 easier in the future, take a look at some -tips for writing existing code in a 2-compatible way.

- -

How much has the API changed since 1.xx?

- -It's difficult to summarize, but some aspects haven't changed very much. For example, if you have some -complex drawing code, you will mostly need to make sure it's parameterised with a device -context (instead of obtaining one from a window or storing it). You won't have -to completely rewrite the drawing code.

- -The way that events are handled has changed, so for example, where you overrode -OnSize before, you now have a non-virtual OnSize with a single event class argument. -To make this function known to wxWindows, you add an entry in an 'event table' using macros. Addition of these macros -will eventually be made easier by a tool which will allow selection from a list -and copy-and-paste into your editor. This is extended to button presses, listbox selection -etc. so callbacks have gone (they may be added back for limited backward compatibility).

- -The class hierarchy has changed to allow greater flexibility but it probably won't affect your -existing application. One exception to this is MDI applications which now use separate MDI classes instead of style -flags. As a result, it won't be possible to switch between MDI and SDI operation at run-time -without further coding, but a benefit is less interdependence between areas of code, -and therefore smaller executable size.

- -Panel items (now called controls) no longer have labels associated with most of them, -and default panel layout has been removed. The idea is that you make greater use -of dialog resources, for better-looking dialogs.

- -

What classes have disappeared?

- -wxForm, wxTextWindow (subsumed into wxTextCtrl). - -

Does wxWindows 2 mean that wxWindows 1.xx is dead?

- -While wxWindows 2 is being developed, there will be further patches to wxWindows 1.xx. -Obviously we are investing most of our energy into the new code, but we're also trying -to fix bugs in the current version.

- -

What platforms will be supported by wxWindows 2?

- -
    -
  • Windows 3.1, Windows 95/98, Windows NT; -
  • Linux and other Unix platforms with GTK+; -
  • Unix with Motif or the free Motif clone Lesstif; -
  • Mac (coming later in 1999); -
  • A BeOS port is being investigated. -
  • A Windows CE port is being investigated. -
  • There are no plans to support OS/2 or XView. However, -you may be able to compile the GTK and Motif versions under OS/2 with X and GTK -installed, or the Windows version with IBM's Open32 extensions. +
  • Windows 3.1, Windows 95/98, Windows NT, Windows 2000, Windows ME. +
  • Linux and other Unix platforms with GTK+. +
  • Unix with Motif or the free Motif clone Lesstif. +
  • Mac OS. +
  • Embedded platforms are being investigated. See the wxUniversal project. +
  • An OS/2 port is in progress, and you can also compile wxWindows for GTK+ or Motif +on OS/2.

-

How does wxWindows 2 support platform-specific features?

+

How does wxWindows 2 support platform-specific +features?

This is a hotly-debated topic amongst the developers. My own philosophy is to make wxWindows as platform-independent as possible, but allow in a few classes (functions, window styles) that are platform-specific. For example, Windows metafiles and Windows 95 taskbar icons have their own classes on Windows, but nowhere else. Because these classes -are provided and are wxWindows-compatible, it doesn't take much +are provided and are wxWindows-compatible, it doesn't take much coding effort for an application programmer to add support for some functionality that the user on a particular platform might otherwise miss. Also, some classes that started off as platform-specific, such @@ -154,24 +111,24 @@ as the MDI classes, have been emulated on other platforms. I can imagine that even wxTaskBarIcon may be implemented for Unix desktops one day.

-In other words, wxWindows is not a 'lowest common denominator' approach, +In other words, wxWindows is not a 'lowest common denominator' approach, but it will still be possible to write portable programs using the core API. Forbidding some platform-specific classes would be a stupid approach that would alienate many potential users, and encourage the perception that toolkits such as wxWindows are not up to the demands -of today's sophisticated applications.

+of today's sophisticated applications.

Currently resources such as bitmaps and icons are handled in a platform-specific way, but it is hoped to reduce this dependence in due course.

-Another reason why wxWindows 2 is not a 'lowest common denominator' toolkit is that +Another reason why wxWindows 2 is not a 'lowest common denominator' toolkit is that some functionality missing on some platform has been provided using generic, platform-independent code, such as the wxTreeCtrl and wxListCtrl classes.

-

Does wxWindows use STL? or the standard string class?

+

Does wxWindows use STL? or the standard string class?

No. This is a much-discussed topic that has (many times) ended with the conclusion that it is in -wxWindows' best interests to avoid use of templates. Not all compilers can handle +wxWindows' best interests to avoid use of templates. Not all compilers can handle templates adequately so it would dramatically reduce the number of compilers and platforms that could be supported. It would also be undersirable to make wxWindows dependent on another large library that may have to be downloaded and installed. @@ -184,9 +141,20 @@ by being able to modify our own string class. Some compatibility with the string has been built into wxString.

There is nothing to stop an application using templates or the string class for its own -purposes.

+purposes. With wxWindows debugging options on, you may find you get errors when including +STL headers. You can work around it either by switching off memory checking, +or by adding this to a header before you include any STL files:

-

Is there a rich edit/markup widget for wxWindows 2?

+
+#ifdef new
+#undef new
+#endif
+
+ +

+ + +

Is there a rich edit/markup widget for wxWindows 2?

These are the possibilities so far:

@@ -199,34 +167,38 @@ for this widget. then wxHTML will suit your needs. wxHTML is built into wxWindows - please see the reference manual for details, and samples/html.

  • There are rich edit widgets in both WIN32 and GTK+, but there is currently -no wxWindows wrapper for these. +no wxWindows wrapper for these (but text attribute functions are being added in the wxWindows 2.3.x series).

    -

    How is wxWindows 2 being developed?

    +

    How is wxWindows 2 being developed?

    We are using the CVS system to develop and maintain wxWindows. This allows -us to make alterations and upload them instantly to the server in Edinburgh, from +us to make alterations and upload them instantly to the SourceForge server, from which others can update their source.

    To build source from CVS, see the file BuildCVS.txt in the top-level wxWindows distribution directory.

    -

    How is wxWindows 2 distributed?

    +

    How is wxWindows 2 distributed?

    -By ftp, and via the wxWindows CD-ROM.

    +By ftp, and via the wxWindows CD-ROM. +

    +If you are feeling adventurous, you may also check out the sources directly +from the cvs +

    -

    What are the plans for the future?

    +

    What are the plans for the future?

    -Currently we're working too hard on getting wxWindows 2 finished (are GUI toolkits ever +Currently we're working too hard on getting wxWindows 2 finished (are GUI toolkits ever finished?) to think very far ahead. However, we know we want to make wxWindows as robust and well-publicised as possible. We also want to aim for better platform-independence of resources such as icons and bitmaps, standardising on the PNG for all platforms.

    Other possibilities include: DCOM/CORBA compatibility; a wxWindows book; -wxStudio, an IDE; -other platforms; other interface abilities such as speech output.

    +wxWorkshop, an IDE; +other platforms, especially embedded systems; other interface abilities such as speech output.

    We will investigate the possibility of compiler or operating system vendors bundling wxWindows with their product.

    @@ -234,17 +206,28 @@ their product.

    The high-level goal of wxWindows is to be thought of as the number one C++ framework, for virtually any platform. Move over, MFC!

    -

    What about Java?

    +

    What is wxUniversal?

    + +wxUniversal is a new port of wxWindows being currently actively developed. The +main difference is that wxUniversal implements all controls (or widgets) in +wxWindows itself thus allowing to have much more flexibility (i.e. support for +themes even under MS Windows!). It also means that it is now much easier to +port wxWindows to a new platform as only the low-level classes must be ported +which make for a small part of the library. +

    +You may find more about wxUniversal here. + +

    What about Java?

    The Java honeymoon period is over :-) and people are realising that it cannot -meet all their cross-platform development needs. We don't anticipate a major threat +meet all their cross-platform development needs. We don't anticipate a major threat from Java, and the level of interest in wxWindows is as high as ever.

    -

    How can I help the project?

    +

    How can I help the project?

    -Please check out the Backroom pages, -in particular the suggested projects, and -mail Julian Smart or the developers' mailing list with your own suggestions.

    +Please check out the Community pages, +in particular the suggested projects, and +mail Julian Smart or the developers' mailing list with your own suggestions.

    diff --git a/docs/html/faqgtk.htm b/docs/html/faqgtk.htm index 1fe2c3586f..bd6386cbe2 100644 --- a/docs/html/faqgtk.htm +++ b/docs/html/faqgtk.htm @@ -8,10 +8,10 @@ -

  • - + + wxWindows 2 FAQ: General
    +
    - @@ -22,23 +22,36 @@ wxWindows 2 for GTK FAQ See also top-level FAQ page.
    - -

    What is wxWindows 2 for GTK?

    +

    List of questions in this category

    +
  • What is wxWindows 2 for GTK?
  • +
  • Does wxGTK have GNOME support?
  • +
  • Warning about GTK libraries supplied with RedHat
  • +
  • What is wxWindows 2 for GTK?
  • +
    wxWindows 2 for GTK is a port of wxWindows to the GTK+ toolkit, which is freely available for most flavours of Unix with X. wxWindows 2 for GTK is often abbreviated to wxGTK. wxGTK has a separate home page here.

    -

    Does wxGTK have GNOME support?

    +

    Does wxGTK have GNOME support?

    Currently wxGTK does not have any features that would involve dependence on any desktop -environment's libraries, so it can work on GNOME, KDE and with other window managers +environment's libraries, so it can work on GNOME, KDE and with other window managers without installation hassles. Some GNOME and KDE integration features are file based, and so may be added without dependence on libraries. Other features may be supported in the future, probably as a separate library.

    +

    Warning about GTK libraries supplied with RedHat

    + +It seems that some versions of RedHat include a badly patched version of GTK (not wxGTK) +which causes some trouble with wxWindows' socket code. Common symptoms are that when +a client tries to establish a connection to an existing server which refuses the request, +the client will get notified twice, first getting a LOST event and then a CONNECT event. +This problem can be solved by updating GTK with an official distribution of the library. +

    + diff --git a/docs/html/faqmac.htm b/docs/html/faqmac.htm index c5ad70a4b3..1357289d66 100644 --- a/docs/html/faqmac.htm +++ b/docs/html/faqmac.htm @@ -8,10 +8,10 @@ -

    - + + wxWindows 2 for GTK FAQ
    +
    - @@ -22,12 +22,194 @@ wxWindows 2 for Mac FAQ See also top-level FAQ page.
    +

    List of questions in this category

    + +
    +

    When is wxMac 2.x due to be released?

    -

    When is wxMac 2 due to be released?

    +There is a preview available. +The author of this port is Stefan Csomor. +

    -There is a preview available. -A beta release can be expected by early Q2 1999. The author of this port -is Stefan Csomor (csomor@advancedconcepts.ch). +

    - + + wxWindows 2 for Mac FAQ
    + + + +
    + + +Please note that the version of wxMac in CVS is more robust and nearly feature-complete compared with the packaged 2.0 release. +Until a new release is made, it is recommended that you download the wxMac 2.3.1 development snapshot or the sources from the CVS trunk. + +
    + +

    + +

    Which Mac platforms are supported?

    + +wxWindows 2 can be used to develop and deliver applications on Classic Mac OS (e.g. Mac OS 8.x/9.x) both as Carbon and non-Carbon applications. +

    +A Mac OS X port is in progress in order to be able to build wxWindows applications using the Apple Developer Tools that are delivered with every copy of Mac OS X. +The Mac OS X port is based on and, for the most part, merged with the Carbon code for Classic Mac OS. +

    + +

    How is the Mac OS X port different from the Classic Mac OS port?

    + +wxMac for Mac OS X shares code both with wxMac for Mac OS and common Unix code in wxWindows. The aim is to use the same Mac OS Carbon code both for Classic Mac OS and for Mac OS X while leveraging the fact that Mac OS X is a BSD Unix. +

    +This hybrid approach was suggested by Apple to the Fizzilla team working on Mozilla for Mac OS X. +

    + +

    How are improvements to the Classic Mac OS port integrated into the Mac OS X port?

    + +Since the source code is shared between the two ports, any Carbon compliant improvements to wxMac for Classic Mac OS are automatically available in the Mac OS X port. +

    +The following points should be considered when improving wxMac: +

      +
    • Non Carbon compliant changes for Classic Mac OS will most likely break the Mac OS X port. Such changes should be tested using the Carbon targets in the CodeWarrior projects for Classic Mac OS. +
    • Non Carbon compliant changes for Mac OS X will most likely break the Classic Mac OS port. Such changes should be tested using CodeWarrior under Mac OS 8.x/9.x. +
    +

    + +

    What compilers are supported?

    + +Under Classic Mac OS, MetroWerks CodeWarrior Pro 5.3 or 6 are required to build wxMac. +

    +Under Mac OS X, the Developer Tools are sufficient to build wxMac. CodeWarrior Pro 6 can also be used to build the Carbon targets. +

    + +

    How does CVS handle file types/creators under Mac OS 8.x/9.x?

    + +Before checking out the wxWindows code using a CVS client under Mac OS 8.x/9.x, be sure your computer is set up to treat xpm and xbm images correctly: +
      +
    • bring up the Internet control panel, select the Advanced Options tab, click on the File Mapping icon from the list at the left and see if there are is an entry for ".xpm" files and another for ".xbm". +
    • if an entry exists, click Change... and make sure File Type is TEXT (just those four capital letters); correct it if necessary. If there is no entry, make one with type set to TEXT and creator set to anything you like; reasonable choices include GKON (Graphic Converter) or CWIE (CodeWarrior). +
    • if you want to edit xpm or xbm files in CodeWarrior, set up a file mapping in the CodeWarrior project settings for analogous to ".h" files. +
    +

    + +

    How does CVS handle file types/creators under Mac OS X?

    + +The Mac OS X CVS client does not handle file types and creators at all (just like every Unix command line CVS client). This is an issue only when the checked out files will also be used under Mac OS 8.x/9.x. +

    +All files checked out under Mac OS X will be untyped and CodeWarrior will not recognize them correctly. To correct this, use the autotyper provided in the CVS sources: +

      +
    • decode and decompress the file wxWindows/docs/mac/TypeAsMetrowerksText.sea.hqx +
    • drag the wxWindows CVS sandbox directory onto the autotyper and most of the files will be typed according to the file extension +
    +

    + +

    What steps are required to build wxMac using CodeWarrior Pro 5.3?

    + +The latest build for Carbon support lead to a few changes that you will have to follow in order to successfully compile the code. +This is also necessary even if you don'want to build the Carbon targets. + +
      +
    1. you need CodeWarrior Pro 5.3, i.e. 5.0 with all the upgrades +
    2. you have to download the Universal Interfaces 3.3.2 or later from the Apple Developer web site, Universal Interfaces 3.4 is required for Carbon Printing support +
    3. put the Universal folder into the MacOS Support folder and replace older versions +
    4. remove from the MacOS Support folder the separate OpenTransport folder +
    5. open the file MacOS Support:MacHeaders:MacHeaders.c and add the line +
      #include <ControlDefinitions.h>
      + after the line +
      #include <Controls.h>
      +
    6. rebuild all MacHeaders from the MacHeaders.mcp project in the same folder +
    +

    +Build the projects (makemac6.mcp for CodeWarrior Pro 6; makemac.mpc for CodeWarrior Pro 5) in the following five directories: +

      +
    • wxWindows:src: +
    • wxWindows:src:jpeg: +
    • wxWindows:src:png: +
    • wxWindows:src:tiff: +
    • wxWindows:src:zlib: +
    +

    + +

    What steps are required to build wxMac under Mac OS X?

    + +You need to have the Apple Developer Tools installed. The Developer Tools CD is one of the 3 CDs that are delivered with Mac OS X but must be installed in addition to the default Mac OS X installation. +

    +Building wxMac completely without configure is not supported. +

    +Building wxWindows directly in the CVS sandbox is not recommended. Instead, wxWindows should be built in a directory configured relatively to the CVS sandbox. +For instance, to build wxMac with configure, start in the base wxWindows directory and type: +

      +
    • mkdir macbuild +
    • cd macbuild +
    • ../configure or ../configure --enable-debug +
    • make +
    +

    + +

    What important settings are required in the CodeWarrior Project Preferences?

    + +For some reasons the CodeWarrior project settings may get changed and this may lead to the inability to compile a certain target. In order to verify the settings click on the target tab, double click on the respective target and then select the following items on the tree-view on the left. Here are the important checks: + +
      + +
    1. under Target/Access Paths, make sure the first user include does not have a folder icon for recursive search. + +
    2. under Language Settings/C/C++ Language, make sure that the only checked items are: +
        +
      • Enable C++ Exceptions +
      • Enable RTTI +
      • Enable bool Support +
      • Enable wchar_t Support +
      • Relaxed Pointer Type Rules +
      • Use Unsigned Chars +
      + +
    3. under Language Settings/C/C++ Warnings, make sure that the only checked items are: +
        +
      • Illegal Pragmas +
      • Extended Error Checking +
      • Inconsistent Use of 'class' and 'struct' Keywords +
      • Hidden Virtual Functions but be aware that the framework itself has some of these beauty spots +
      + +
    4. under Linker/PPC Linker, make sure that the following items are checked: +
        +
      • Dead-strip Static Initialization Code in order to avoid including libraries that are not needed, especially as things like OpenGL get added to the projects and sources +
      + +
    +

    + +

    What are the smart preprocessing errors with the Apple Developer Tools?

    + +Smart preprocessing is activated with the -cpp-precomp option and allows much faster preprocessing of the source files by loading precompiled Carbon header files. This option speeds up the compilation of wxMac by a factor of 2 at least. +When compiling wxMac using the Apple Developer Tools, the following error is displayed for certain files: +
      +
    • cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode +
    + +This error is due to the smart precompiler which does not fully understand C++ syntax and reverts to basic preprocessing when a smart preprocessing error occurs. +This error can sometimes be corrected or avoided by modifying the source code. However, leaving these errors is not a problem since the preprocessor automatically switches to basic preprocessing if necessary. +

    + +

    How does wxMac support the standard Apple About menu item and Help menu?

    + +Because wxWindows does not have a specific API for the About menu item or the Help menu, the Mac OS port uses some static variables to help the engine make the right decisions: +
      +
    • It assumes that the About menu item is part of a Help menu. +
    • The title of the Help menu is stored in wxApp::s_macHelpMenuTitleName, it defaults to "&Help", but you can change it in your constructor to your specific menu title. +
    • The item Id of the About menu is stored in wxApp::s_macAboutMenuItemID, it defaults to wxID_ABOUT, but can be changed as well to suit your needs. +
    • The other items of the wxWindows help menu are appended to the Mac OS Help menu and the translation of Ids is handled transparently for your application. +

    diff --git a/docs/html/faqmot.htm b/docs/html/faqmot.htm index 6250821885..6f907f0bfc 100644 --- a/docs/html/faqmot.htm +++ b/docs/html/faqmot.htm @@ -8,10 +8,10 @@ - +
    - @@ -22,8 +22,16 @@ wxWindows 2 for Motif FAQ See also top-level FAQ page.
    +

    List of questions in this category

    + +
    -

    What version of Motif do I need?

    +

    What version of Motif do I need?

    You will need version 1.2 or above. Version 2 should also be fine. Some people have had a positive experience with Lesstif, @@ -31,7 +39,7 @@ a free Motif clone. (Note from Julian Smart - I use the Linux version of MetroLi

    -

    What features are missing or partially implemented?

    +

    What features are missing or partially implemented?

    The following classes are not yet implemented: wxSpinButton, wxCheckListBox, wxJoyStick, wxGLCanvas.

    @@ -53,32 +61,23 @@ system is in preparation.

    -

    Does Dialog Editor work with wxWindows for Motif?

    +

    Does Dialog Editor work with wxWindows for Motif?

    Suport for Dialog Editor is almost there, but there are some wrinkles to iron -out. You may find it's useful though: compile it and see. +out. You may find it's useful though: compile it and see.

    -

    How do I switch between debugging and release compilation modes?

    - -Unfortunately the makefile system doesn't currently allow you to compile -for both simultaneously: you need -to recompile wxWindows and your application having adjusted make.env. However, -you could rename the binary and release library archives, and adjust your makefiles -to use the appropriate one (or change a symbolic link). -

    - -

    Why are windows are not refreshed properly until I resize them?

    +

    Why are windows are not refreshed properly until I resize them?

    Very occasionally you can experience this glitch, probably because sometimes the window tries to resize and repaint itself before the final size is known. The workaround is to add code like this after window creation and initialization:

    -#ifdef __WXMOTIF__
    +#ifdef __WXMOTIF__
       wxNoOptimize noOptimize;
    -  window->SetSize(-1, -1, w, h);
    -#endif
    +  window->SetSize(-1, -1, w, h);
    +#endif
     

    diff --git a/docs/html/faqmsw.htm b/docs/html/faqmsw.htm index e5a7e96019..58dca23c94 100644 --- a/docs/html/faqmsw.htm +++ b/docs/html/faqmsw.htm @@ -8,10 +8,10 @@ -

    - + + wxWindows 2 for Motif FAQ
    +
    - @@ -22,8 +22,26 @@ wxWindows 2 for Windows FAQ See also top-level FAQ page.
    +

    List of questions in this category

    + +
    -

    Which Windows platforms are supported?

    +

    Which Windows platforms are supported?

    wxWindows 2 can be used to develop and deliver applications on Windows 3.1, Win32s, Windows 95, Windows 98, and Windows NT. A Windows CE version is being looked into (see below).

    @@ -31,8 +49,8 @@ Windows 95, Windows 98, and Windows NT. A Windows CE version is being looked int wxWindows 2 is designed to make use of WIN32 features and controls. However, unlike Microsoft, we have not forgotten users of 16-bit Windows. Most features work under Windows 3.1, including wxTreeCtrl and wxListCtrl using the generic implementation. -However, don't expect very Windows-95-specific classes to work, such as wxTaskBarIcon. The wxRegConfig -class doesn't work either because the Windows 3.1 registry is very simplistic. Check out the 16-bit +However, don't expect very Windows-95-specific classes to work, such as wxTaskBarIcon. The wxRegConfig +class doesn't work either because the Windows 3.1 registry is very simplistic. Check out the 16-bit makefiles to see what other files have been left out.

    16-bit compilation is supported under Visual C++ 1.5, and Borland BC++ 4 to 5. @@ -48,17 +66,17 @@ using wxGTK or wxMotif, then check/debug your wxWindows for Windows programs with TWIN32, and finally produce an ix86 Windows executable using Cygwin/Mingw32, without ever needing a copy of Microsoft Windows. See the Technical Note on the Web site detailing cross-compilation.

    -

    What about Windows CE?

    +

    What about Windows CE?

    This is under consideration, though we need to get wxWindows Unicode-aware first. There are other interesting issues, such as how to combine the menubar and toolbar APIs -as Windows CE requires. But there's no doubt that it will be possible, albeit +as Windows CE requires. But there's no doubt that it will be possible, albeit by mostly cutting down wxWindows 2 API functionality, and adding a few classes here and there. Since wxWindows for 2 produces small binaries (less than 300K for -the statically-linked 'minimal' sample), shoehorning wxWindows 2 into a Windows CE device's limited +the statically-linked 'minimal' sample), shoehorning wxWindows 2 into a Windows CE device's limited storage should not be a problem.

    -

    What compilers are supported?

    +

    What compilers are supported?

    Please see the wxWindows 2 for Windows install.txt file for up-to-date information, but currently the following are known to work:

    @@ -77,43 +95,42 @@ currently the following are known to work:

    There is a linking problem with Symantec C++ which I hope someone can help solve.

    -

    Which is the best compiler to use with wxWindows 2?

    +

    Which is the best compiler to use with wxWindows 2?

    -It's partly a matter of taste, but I (JACS) prefer Visual C++ since the debugger is very -good, it's very stable, the documentation is extensive, and it generates small executables. -Since project files are plain text, it's easy for me to generate appropriate project files +It's partly a matter of taste, but I (JACS) prefer Visual C++ since the debugger is very +good, it's very stable, the documentation is extensive, and it generates small executables. +Since project files are plain text, it's easy for me to generate appropriate project files for wxWindows samples.

    -Borland C++ is fine - and very fast - but it's hard (impossible?) to use the debugger without using project files, and -the debugger is nowhere near up to VC++'s quality. The IDE isn't great.

    +Borland C++ is fine - and very fast - but it's hard (impossible?) to use the debugger without using project files, and +the debugger is nowhere near up to VC++'s quality. The IDE isn't great.

    -C++Builder's power isn't really used with wxWindows since it needs integration with its -own class library (VCL). For wxWindows, I've only used it with makefiles, in which case -it's almost identical to BC++ 5.0 (the same makefiles can be used).

    +C++Builder's power isn't really used with wxWindows since it needs integration with its +own class library (VCL). For wxWindows, I've only used it with makefiles, in which case +it's almost identical to BC++ 5.0 (the same makefiles can be used).

    -You can't beat Cygwin's price (free), and you can debug adequately using gdb. However, it's +You can't beat Cygwin's price (free), and you can debug adequately using gdb. However, it's quite slow to compile since it does not use precompiled headers.

    CodeWarrior is cross-platform - you can debug and generate Windows executables from a Mac, but not the other way around I think - but the IDE is, to my mind, a bit primitive.

    -Watcom C++ is a little slow and the debugger is not really up to today's standards.

    +Watcom C++ is a little slow and the debugger is not really up to today's standards.

    -

    Is Unicode supported?

    +Among the free compilers the best choice seem to be Borland C++ command line +tools and mingw32 (port of gcc to Win32). Both of them are supported by +wxWindows. -Not yet, although there are other internationalisation features.

    +

    Is Unicode supported?

    -However, the issues surrounding Unicode support have been looked into so we know -what we need to do, and have some header files ready to use containing appropriate -type definitions. Just about every file in wxWindows will need changes, due to the -pervasive nature of characters and character arrays. Unicode support is needed -for the port to Windows CE (see above), and will probably be added in time for version 2.1.

    +Yes, Unicode is fully supported under Windows NT/2000 (Windows 9x don't +have Unicode support anyhow). -

    Can you compile wxWindows 2 as a DLL?

    +

    Can you compile wxWindows 2 as a DLL?

    Yes (using the Visual C++ or Borland C++ makefile), but be aware that distributing DLLs is a thorny issue -and you may be better off compiling statically-linked applications, unless you're -delivering a suite of separate programs, or you're compiling a lot of wxWindows applications +and you may be better off compiling statically-linked applications, unless you're +delivering a suite of separate programs, or you're compiling a lot of wxWindows applications and have limited hard disk space.

    With a DLL approach, and with different versions and configurations of wxWindows @@ -122,7 +139,7 @@ negating the point of using DLLs. Of course, this is not a problem just associat wxWindows!

    -

    How can I reduce executable size?

    +

    How can I reduce executable size?

    You can compile wxWindows as a DLL (see above, VC++/BC++ only at present). You should also compile your programs for release using non-debugging and space-optimisation options, but @@ -132,7 +149,7 @@ Statically-linked wxWindows 2 programs are smaller than wxWindows 1.xx programs, wxWindows 2 has been designed to reduce dependencies between classes, and other techniques. The linker will not include code from the library that is not (directly or indirectly) referenced -by your application. So for example, the 'minimal' sample is less than 300KB using VC++ 6.

    +by your application. So for example, the 'minimal' sample is less than 300KB using VC++ 6.

    If you want to distribute really small executables, you can use Petite @@ -140,60 +157,90 @@ by Ian Luck. This nifty utility compresses Windows executables by around 50%, so will shrink to a mere 250KB. With this sort of size, there is reduced incentive to use DLLs.

    -

    Is wxWindows compatible with MFC?

    +

    Is wxWindows compatible with MFC?

    There is a sample which demonstrates MFC and wxWindows code co-existing in the same -application. However, don't expect to be able to enable wxWindows windows with OLE-2 +application. However, don't expect to be able to enable wxWindows windows with OLE-2 functionality using MFC.

    -

    Why do I sometimes get bizarre crash problems using VC++ 5/6?

    +

    Why my code fails to compile with strange errors about new operator?

    + +The most common cause of this problem is the memory debugging settings in +wx/msw/setup.h. You have several choices: + +
      +
    • Either disable overloading the global operator new completely by + setting wxUSE_GLOBAL_MEMORY_OPERATORS and + wxUSE_DEBUG_NEW_ALWAYS to 0 in this file +
    • Or leave them on but do #undef new after including any + wxWindows headers, like this the memory debugging will be still on + for wxWindows sources but off for your own code +
    + +Notice that IMHO the first solution is preferable for VC++ users who can use +the VC++ CRT memory debugging features instead. + +

    How do I port MFC applications to wxWindows?

    + +Set up your interface from scratch using wxWindows (especially wxDesigner -- +it'll save you a lot of time) and when you have a shell prepared, you can start +'pouring in' code from the MFC app, with appropriate +modifications. This is the approach I have used, and I found +it very satisfactory. A two-step process then - reproduce the bare +interface first, then wire it up afterwards. That way you deal +with each area of complexity separately. Don't try to think MFC +and wxWindows simultaneously from the beginning - it is easier to +reproduce the initial UI by looking at the behaviour of the MFC +app, not its code. + +

    Why do I sometimes get bizarre crash problems using VC++ 5/6?

    Some crash problems can be due to inconsistent compiler -options (and of course this isn't limited to wxWindows). +options (and of course this isn't limited to wxWindows). If strange/weird/impossible things start to happen please check (dumping IDE project file as makefile and doing text comparison if necessary) that the project settings, especially the list of defined symbols, struct packing, etc. are exactly the same for all items in the project. After this, delete everything (including PCH) and recompile.

    -VC++ 5's optimization code seems to be broken and can +VC++ 5's optimization code seems to be broken and can cause problems: this can be seen when deleting an object Dialog Editor, in Release mode with optimizations on. If in doubt, switch off optimisations, although this will result in much larger executables. It seems possible that the library can be created with strong optimization, so long as the application is not strongly -optimized. For example, in wxWindows project, set to 'Minimum -Size'. In Dialog Editor project, set to 'Customize: Favor Small -Code' (and no others). This will then work.

    +optimized. For example, in wxWindows project, set to 'Minimum +Size'. In Dialog Editor project, set to 'Customize: Favor Small +Code' (and no others). This will then work.

    -

    How are the wxWindows makefiles edited under Windows?

    +

    How are the wxWindows makefiles edited under Windows?

    As of wxWindows 2.1, there is a new system written by Vadim Zeitlin, that generates the makefiles from templates using tmake.

    -Here are Vadim's notes:

    +Here are Vadim's notes:

    -To use these new makefiles, you don't need anything (but see below). +To use these new makefiles, you don't need anything (but see below). However, you should NOT modify them because these files will be rewritten when I regenerate them using tmake the next time. So, if you find a problem with any of these makefiles (say, makefile.b32) -you'll need to modify the corresponding template (b32.t in this +you'll need to modify the corresponding template (b32.t in this example) and regenerate the makefile using tmake.

    tmake can be found at www.troll.no/freebies/tmake.html. -It's a Perl5 program and so it needs Perl (doh). There is a binary for -Windows (available from the same page), but I haven't used it, so -I don't know if it works as flawlessly as "perl tmake" does (note -for people knowing Perl: don't try to run tmake with -w, it won't +It's a Perl5 program and so it needs Perl (doh). There is a binary for +Windows (available from the same page), but I haven't used it, so +I don't know if it works as flawlessly as "perl tmake" does (note +for people knowing Perl: don't try to run tmake with -w, it won't do you any good). Using it extremely simple: to regenerate makefile.b32 just go to distrib/msw/tmake and type

    tmake -t b32 wxwin.pro -o ../../src/msw/makefile.b32

    -The makefiles are untested - I don't have any of Borland, Watcom or -Symantec and I don't have enough diskspace to recompile even with +The makefiles are untested - I don't have any of Borland, Watcom or +Symantec and I don't have enough diskspace to recompile even with VC6 using makefiles. The new makefiles are as close as possible to the old ones, but not closer: in fact, there has been many strange things (should I say bugs?) in some of makefiles, some files were not compiled @@ -205,13 +252,13 @@ The templates are described in tmake ref manual (1-2 pages of text) and are quite simple. They do contain some Perl code, but my Perl is primitive (very C like) so it should be possible for anybody to make trivial modifications to it (I hope that only trivial modifications -will be needed). I've tagged the ol makefiles as MAKEFILES_WITHOUT_TMAKE +will be needed). I've tagged the ol makefiles as MAKEFILES_WITHOUT_TMAKE in the cvs, so you can always retrieve them and compare the new ones, this will make it easier to solve the problems you might have.

    Another important file is filelist.txt: it contains the list of all files to be compiled. Some of them are only compiled in 16/32 bit mode. -Some other are only compiled with some compilers (others can't compile +Some other are only compiled with some compilers (others can't compile them) - all this info is contained in this file.

    So now adding a new file to wxWindows is as easy as modifying filelist.txt @@ -219,10 +266,10 @@ So now adding a new file to wxWindows is as easy as modifying filelist.txt need to modify all files manually any more.

    Finally, there is also a file vc6.t which I use myself: this one -generates a project file for VC++ 6.0 (I didn't create vc5.t because -I don't need it and can't test it, but it should be trivial to create +generates a project file for VC++ 6.0 (I didn't create vc5.t because +I don't need it and can't test it, but it should be trivial to create one from vc6.t - probably the only things to change would be the -version number in the very beginning and the /Z option - VC5 doesn't +version number in the very beginning and the /Z option - VC5 doesn't support edit-and=continue). This is not an officially supported way of building wxWindows (that is, nobody guarantees that it will work), but it has been very useful to me and I hope it will be also for @@ -233,7 +280,7 @@ others. To generate wxWindows.dsp run

    Then just include this project in any workspace or open it from VC IDE and it will create a new workspace for you.

    -If all goes well, I'm planning to create a template file for Makefile.ams +If all goes well, I'm planning to create a template file for Makefile.ams under src/gtk and src/motif and also replace all makefiles in the samples subdirectories with the project files from which all the others will be generated. At least it will divide the number of files in samples @@ -242,21 +289,21 @@ directory by 10 (and the number of files to be maintained too).

    -

    How do you use VC++'s memory leak checking instead of that in wxWindows?

    +

    How do you use VC++'s memory leak checking instead of that in wxWindows?

    Vadim Zeitlin:
    -On the VC++ level, it's just the matter of calling _CrtSetDbgFlag() in the very
    +On the VC++ level, it's just the matter of calling _CrtSetDbgFlag() in the very
     beginning of the program. In wxWindows, this is done automatically when
     compiling with VC++ in debug mode unless wxUSE_GLOBAL_MEMORY_OPERATORS or
     __NO_VC_CRTDBG__ are defined - this check is done in wx/msw/msvcrt.h which
     is included from app.cpp which then calls wxCrtSetDbgFlag() without any
    -#ifdefs.
    +ifdefs.
     
     This works quite well: at the end of the program, all leaked blocks with their
     malloc count are shown. This number (malloc count) can be used to determine
    -where exactly the object was allocated: for this it's enough to set the variable
    +where exactly the object was allocated: for this it's enough to set the variable
     _crtBreakAlloc (look in VC98\crt\srs\dbgheap.c line 326) to this number and
     a breakpoint will be triggered when the block with this number is allocated.
     
    @@ -267,6 +314,14 @@ Regards,
     VZ
     
    +

    + +

    Why are menu hotkeys or shortcuts not working in my application?

    + +This can happen if you have a child window intercepting EVT_CHAR events and swallowing +all keyboard input. You should ensure that event.Skip() is called for all input that +isn'used by the event handler. +
    diff --git a/docs/html/gettext/gettext.htm b/docs/html/gettext/gettext.htm deleted file mode 100644 index c48fc3708b..0000000000 --- a/docs/html/gettext/gettext.htm +++ /dev/null @@ -1,4961 +0,0 @@ - - - - -GNU gettext utilities - - -

    GNU gettext tools, version 0.10

    -

    Native Language Support Library and Tools

    -

    Edition 0.10, 26 November

    -
    Ulrich Drepper
    -
    Jim Meyering
    -
    Pinard
    -

    -


    - -

    -Copyright (C) 1995 Free Software Foundation, Inc. - -

    -

    -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. - -

    -

    -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. - -

    -

    -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions, -except that this permission notice may be stated in a translation approved -by the Foundation. - -

    - - - -

    Introduction

    - - -
    -

    -This manual is still in DRAFT state. Some sections are still -empty, or almost. We keep merging material from other sources -(essentially email folders) while the proper integration of this -material is delayed. -

    - -

    -In this manual, we use he when speaking of the programmer or -maintainer, she when speaking of the translator, and they -when speaking of the installers or end users of the translated program. -This is only a convenience for clarifying the documentation. It is -absolutely not meant to imply that some roles are more appropriate -to males or females. Besides, as you might guess, GNU gettext -is meant to be useful for people using computers, whatever their sex, -race, religion or nationality! - -

    -

    -This chapter explains what are the goals seeked by the mere existence -of GNU gettext. Then, it explains a few wide concepts around -Native Language Support, and situates message translation in regard -to other aspects of national and cultural variance, as applicable -to programs. It also surveys what are those files used to convey -translations. It explains how the various tools interrelate in the -initial generation for these files, and later, how the maintenance -cycle usually operate. - -

    - - - -

    The Purpose of GNU gettext

    - -

    -Usually, programs are written and documented in English, and use -English at execution time for interacting with users. This is true -not only from within GNU, but also in a great deal of commercial -and free software. Using a common language is quite handy for -communication between developers, maintainers and users from all -countries. On the other hand, most people are less comfortable with -English than with their own native language, and would rather prefer -using their mother tongue for day to day's work, as far as possible. -Many would simply love seeing their computer screen showing -a lot less of English, and far more of their own spoken language. - -

    -

    -However, to some people, this dream might appear so far fetched that -they may believe it is not even worth spending time thinking about -it, and they have no confidence at all that the dream might ever -become true. Many did not loose hope yet, and organized themselves. -The GNU Translation Project is a formalization of this hope into a -workable structure, which has a good chance to get all of us nearer -the achievement of a truly multi-lingual set of programs. - -

    -

    -GNU gettext is an important step for the GNU Translation -Project, as it is an asset on which we may build many other steps. -This package offers to programmers, translators and even users, a -well integrated set of tools and documentation. Specifically, the GNU -gettext utilities are a set of tools that provides a framework -to help other GNU packages produce multi-lingual messages. These tools -include a set of conventions about how programs should be written to -support message catalogs, a directory and file naming organization -for the message catalogs themselves, a runtime library supporting the -retrieval of translated messages, and a few stand-alone programs to -massage in various ways the sets of translatable strings, or already -translated strings. A special GNU Emacs mode also helps interested -parties into preparing these sets, or bringing them up to date. - -

    -

    -GNU gettext is designed so it minimizes the impact of -internationalization on program sources, keeping this impact as small -and hardly noticeable as possible. Internationalization has better -chances of succeeding if it is very light weighted, or at least, -appear to be so, when looking at program sources. - -

    -

    -The GNU Translation Project also uses the GNU gettext -distribution as a vehicle for documenting its structure and methods, -even if this goes beyond the technicalities of the GNU gettext -proper. By doing so, translators will find in a single place, as -far as possible, all they need to know for properly doing their -translating work. Also, this supplementary documentation might also -help programmers, and even curious users, at understanding how GNU -gettext is related to the remainder of the GNU Translation -Project, and consequently, have a glimpse at the big picture. - -

    - - -

    I18n, L10n, and Such

    - -

    -Two long words appear all the time when we discuss support of native -language in programs, and these words have a precise meaning, worth -being explained here, once and for all in this document. The words are -internationalization and localization. Many people, -tired of writing these long words over and over again, took the -habit of writing i18n and l10n instead, quoting the first -and last letter of each word, and replacing the run of intermediate -letters by a number merely telling how many such letters there are. -But in this manual, in the sake of clarity, we will patiently write -the names in full, each time... - -

    -

    -By internationalization, one refers to the operation by which a -program, or a set of programs turned into a package, is made aware and -able to support multiple languages. This is a generalization process, -by which the programs are untied from using only English strings or -other English specific habits, and connected to generic ways of doing -the same, instead. Program developers may use various techniques to -internationalize their programs, some of them have been standardized. -GNU gettext offers one of these standards. See section The Programmer's View. - -

    -

    -By localization, one means the operation by which, in a set -of programs already internationalized, one gives the program all -needed information so that it can bend itself to handle its input -and output in a fashion which is correct for some native language and -cultural habits. This is a particularisation process, by which generic -methods already implemented in an internationalized program are used -in specific ways. The programming environment puts several functions -to the programmers disposal which allow this runtime configuration. -The formal description of specific set of cultural habits for some -country, together with all associated translations targeted to the -same native language, is called the locale for this language -or country. Users achieve localization of programs by setting proper -values to special environment variables, prior to executing those -programs, identifying which locale should be used. - -

    -

    -In fact, locale message support is only one component of the cultural -data that makes up a particular locale. There are a whole host of -routines and functions provided to aid programmers in developing -internationalized software and which allows them to access the data -stored in a particular locale. When someone presently refers to a -particular locale, they are obviously referring to the data stored -within that particular locale. Similarly, if a programmer is referring -to "accessing the locale routines", they are referring to the -complete suite of routines that access all of the locale's information. - -

    -

    -One uses the expression Native Language Support, or merely NLS, -for speaking of the overall activity or feature encompassing both -internationalization and localization, allowing for multi-lingual -interactions in a program. In a nutshell, one could say that -internationalization is the operation by which further localizations -are made possible. - -

    -

    -Also, very roughly said, when it comes to multi-lingual messages, -internationalization is usually taken care of by programmers, and -localization is usually taken care of by translators. - -

    - - -

    Aspects in Native Language Support

    - -

    -For a totally multi-lingual distribution, there are many things to -translate beyond output messages. - -

    - -
      -
    • - -As of today, GNU gettext offers a complete toolset for -translating messages output by C programs. Perl scripts and shell -scripts also need to be translated. Even if there are some hooks -so this can be done, these hooks are not integrated as well as they -should be. - -
    • - -Some programs, like autoconf or bison, are able -to produce other programs (or scripts). Even if the generating -programs themselves are internationalized, the generated programs they -produce may need internationalization on their own, and this indirect -internationalization could be automated right from the generating -program. In fact, quite usually, generating and generated programs -could be internationalized independently, as the effort needed is -fairly orthogonal. - -
    • - -A few programs include textual tables which might need translation -themselves, independently of the strings contained in the program -itself. For example, RFC 1345 gives an English description for each -character which GNU recode is able to reconstruct at execution. -Since these descriptions are extracted from the RFC by mechanical means, -translating them properly would require a prior translation of the RFC -itself. - -
    • - -Almost all programs accept options, which are often worded out so to -be descriptive for the English readers; one might want to consider -offering translated versions for program options as well. - -
    • - -Many programs read, interpret, compile, or are somewhat driven by -input files which are texts containing keywords, identifiers, or -replies which are inherently translatable. For example, one may want -gcc to allow diacriticized characters in identifiers or use -translated keywords; `rm -i' might accept something else than -`y' or `n' for replies, etc. Even if the program will -eventually make most of its output in the foreign languages, one has -to decide whether the input syntax, option values, etc., are to be -localized or not. - -
    • - -The manual accompanying a package, as well as all documentation files -in the distribution, could surely be translated, too. Translating a -manual, with the intent of later keeping up with updates, is a major -undertaking in itself, generally. - -
    - -

    -As we already stressed, translation is only one aspect of locales. -Other internationalization aspects are not currently handled by GNU -gettext, but perhaps may be handled in future versions. There -are many attributes that are needed to define a country's cultural -conventions. These attributes include beside the country's native -language, the formatting of the date and time, the representation of -numbers, the symbols for currency, etc. These local rules are -termed the country's locale. The locale represents the knowledge -needed to support the country's native attributes. - -

    -

    -There are a few major areas which may vary between countries and -hence, define what a locale must describe. The following list helps -putting multi-lingual messages into the proper context of other tasks -related to locales, and also presents some other areas which GNU -gettext might eventually tackle, maybe, one of these days. - -

    -
    - -
    Characters and Codesets -
    -The codeset most commonly used through out the USA and most English -speaking parts of the world is the ASCII codeset. However, there are -many characters needed by various locales that are not found within -this codeset. The 8-bit ISO 8859-1 code set has most of the special -characters needed to handle the major European languages. However, in -many cases, the ISO 8859-1 font is not adequate. Hence each locale -will need to specify which codeset they need to use and will need -to have the appropriate character handling routines to cope with -the codeset. - -
    Currency -
    -The symbols used vary from country to country as does the position -used by the symbol. Software needs to be able to transparently -display currency figures in the native mode for each locale. - -
    Dates -
    -The format of date varies between locales. For example, Christmas day -in 1994 is written as 12/25/94 in the USA and as 25/12/94 in Australia. -Other countries might use ISO 8061 dates, etc. - -Time of the day may be noted as hh:mm, hh.mm, -or otherwise. Some locales require time to be specified in 24-hour -mode rather than as AM or PM. Further, the nature and yearly extent -of the Daylight Saving correction vary widely between countries. - -
    Numbers -
    -Numbers can be represented differently in different locales. -For example, the following numbers are all written correctly for -their respective locales: - - -
    -12,345.67       English
    -12.345,67       French
    -1,2345.67       Asia
    -
    - -Some programs could go further and use different unit systems, like -English units or Metric units, or even take into account variants -about how numbers are spelled in full. - -
    Messages -
    -The most obvious area is the language support within a locale. This is -where GNU gettext provide an ease for developers and users to -easily change the language that the software uses to communicate to -the user. - -
    - -

    -In the near future we see no chance that beside message handling -more components of locale will be made available for use in other -GNU packages. The reason for this is that most modern system provide -a more or less reasonable support for at least some of the missing -components. Another point is that the GNU libc and Linux will get -a new and complete implementation of the whole locale functionality -which could be adopted by system lacking a reasonable locale support. - -

    - - -

    Files Conveying Translations

    - -

    -The letters PO in `.po' files means Portable Object, to -distinguish it from `.mo' files, where MO stands for Machine -Object. This paradigm, as well as the PO file format, is inspired -by the NLS standard developed by Uniforum, and implemented by Sun -in their Solaris system. - -

    -

    -PO files are meant to be read and edited by humans, and associate each -original, translatable string of a given package with its translation -in a particular target language. A single PO file is dedicated to -a single target language. If a package supports many languages, -there is one such PO file per language supported, and each package -has its own set of PO files. These PO files are best created by -the xgettext program, and later updated or refreshed through -the tupdate program. Program xgettext extracts all -marked messages from a set of C files and initializes a PO file with -empty translations. Program tupdate takes care of adjusting -PO files between releases of the corresponding sources, commenting -obsolete entries, initializing new ones, and updating all source -line references. Files ending with `.pot' are kind of base -translation files found in distributions, in PO file format, and -`.pox' files are often temporary PO files. - -

    -

    -MO files are meant to be read by programs, and are binary in nature. -A few systems already offer tools for creating and handling MO files -as part of the Native Language Support coming with the system, but the -format of these MO files is often different from system to system, -and non-portable. They do not necessary use `.mo' for file -extensions, but since system libraries are also used for accessing -these files, it works as long as the system is self-consistent about -it. If GNU gettext is able to interface with the tools already -provided with systems, it will consequently let these provided tools -take care of generating the MO files. Or else, if such tools are not -found or do not seem usable, GNU gettext will use its own ways -and its own format for MO files. Files ending with `.gmo' are -really MO files, when it is known that these files use the GNU format. - -

    - - -

    Overview of GNU gettext

    - -

    -The following diagram summarizes the relation between the files -handled by GNU gettext and the tools acting on these files. -It is followed by a somewhat detailed explanations, which you should -read while keeping an eye on the diagram. Having a clear understanding -of these interrelations would surely help programmers, translators -and maintainers. - -

    - -
    -Original C Sources ---> PO mode ---> Marked C Sources ---.
    -                                                         |
    -              .---------<--- GNU gettext Library         |
    -.--- make <---+                                          |
    -|             `---------<--------------------+-----------'
    -|                                            |
    -|   .-----<--- PACKAGE.pot <--- xgettext <---'   .---<--- PO Compendium
    -|   |                                            |             ^
    -|   |                                            `---.         |
    -|   `---.                                            +---> PO mode ---.
    -|       +----> tupdate -------> LANG.pox --->--------'                |
    -|   .---'                                                             |
    -|   |                                                                 |
    -|   `-------------<---------------.                                   |
    -|                                 +--- LANG.po <--- New LANG.pox <----'
    -|   .--- LANG.gmo <--- msgfmt <---'
    -|   |
    -|   `---> install ---> /.../LANG/PACKAGE.mo ---.
    -|                                              +---> "Hello world!"
    -`-------> install ---> /.../bin/PROGRAM -------'
    -
    - -

    -The indication `PO mode' appears in two places in this picture, -and you may safely read it as merely meaning "hand editing", using -any editor of your choice, really. However, for those of you being -the lucky users of GNU Emacs, PO mode has been specifically created -for providing a cosy environment for editing or modifying PO files. -While editing a PO file, PO mode allows for the easy browsing of -auxiliary and compendium PO files, as well as following references into -the set of C program sources from which PO files has been derived. -It has a few special features, among which the interactive marking -of program strings as translatable, and the validatation of PO files -with easy repositioning to PO file lines showing errors. - -

    -

    -As a programmer, the first step into bringing GNU gettext -into your package is identifying, right in the C sources, which -strings are meant to be translatable, and which are untranslatable. -This tedious job can be done a little more comfortably using PO -mode, but you can use any means being usual to you for modifying your -C sources. Some other simple, standard changes are also needed to -properly initialize the translation library. See section Preparing Program Sources, for -more information about all this. - -

    -

    -Once the C sources have been modified, the xgettext program -is used to find and extract all translatable strings, and create an -initial PO file out of all these. This `package.pot' file -contains all original program strings, it has sets of pointers to -exactly where in C sources each string is used, and all translations -are set to empty. The letter t in `.pot' marks that this is -a Template PO file, not yet oriented towards any particular language. -See section Invoking the xgettext Program, for more details about how one calls the -xgettext program. If you are really lazy, you might -be interested at working a lot more right away, and preparing the -whole distribution setup (see section The Maintainer's View). By doing so, you -spare typing the xgettext command yourself, as make -should now generate the proper things automatically for you! - -

    -

    -The first time through, there is no `lang.po' yet, so the -tupdate step may be skipped and replaced by a mere copy of -`package.pot' to `lang.pox', where lang -represents the target language. - -

    -

    -Then comes the initial translation of messages. Translation in -itself is a whole matter, still exclusively meant for humans, -and whose complexity far overwhelms the level of this manual. -Nevertheless, a few hints are given in some other chapter of this -manual (see section The Translator's View). You will also find there indications -about how to contact translating teams, or becoming part of them, -for sharing your translating concerns with others who target the same -native language. - -

    -

    -While adding the translated messages into the `lang.pox' -PO file, if you do not have GNU Emacs handy, you are on your own -for ensuring that your fully respect the PO file format, and quoting -conventions (see section The Format of PO Files). This is surely not an impossible task, -as this is the way many people handled PO files already for Uniforum or -Solaris. On the other hand, using PO mode in GNU Emacs, most details -of PO file format are taken care for you, but you have to acquire -some familiarity with PO mode itself. Besides main PO mode commands -(see section Main Commands), you should know how to move between entries -(see section Entry Positioning), and how to handle untranslated entries -(see section Untranslated Entries). - -

    -

    -If some common translations have already been saved into a compendium -PO file, translators may use PO mode for initializing untranslated -entries from the compendium, and also save selected translations into -the compendium, updating it (see section Using Translation Compendiums). Compendium files -are meant to be exchanged between members of a given translation team. - -

    -

    -Programs, or packages of programs, are dynamic in nature: users write -bug reports and suggestion for improvements, maintainers react by -modifying programs in various ways. The fact that a package has -already been internationalized should not make maintainers shy -of adding new strings, or modifying strings already translated. -They just do their job the best they can. For the GNU Translation -Project to work smoothly, it is important that maintainers do not -carry translation concerns on their already loaded shoulders, and that -translators be kept as free as possible of programmatic concerns. - -

    -

    -The only concern maintainers should have is carefully marking new -strings are translatable, when they should be, and do not otherwise -worry about them being translated, as this will come in proper time. -Consequently, when programs and their strings are adjusted in various -ways by maintainers, and for matters usually unrelated to translation, -xgettext would construct `package.pot' files which are -evolving over time, so the translations carried by `lang.po' -are slowly fading out of date. - -

    -

    -It is important for translators (and even maintainers) to understand -that package translation is a continuous process in the lifetime of a -package, and not something which is done once and for all at the start. -After an initial burst of translation activity for a given package, -interventions are needed once in a while, because here and there, -translated entries become obsolete, and new untranslated entries -appear, needing translation. - -

    -

    -The tupdate program has the purpose of refreshing an already -existing `lang.po' file, by comparing it with a newer -`package.pot' template file, extracted by xgettext -out of recent C sources. The refreshing operation adjusts all -references to C source locations for strings, since these strings -move as programs are modified. Also, tupdate comments out as -obsolete, in `lang.pox', those already translated entries -which are no longer used in the program sources (see section Obsolete Entries. It finally discovers new strings and insert them in -the resulting PO file as untranslated entries (see section Untranslated Entries. See section Invoking the tupdate Program, for more information about what -tupdate really does. - -

    -

    -Whatever route or means taken, the goal is obtaining an updated -`lang.pox' file offering translations for all strings. -When this is properly achieved, this file `lang.pox' may -take the place of the previous official `lang.po' file. - -

    -

    -The time mobility, or fluidity of PO files, is an integral part of -the translation game, and should be well understood, and accepted. -People resisting it will have a hard time participating in the GNU -Translation Project, or will give a hard time to other participants! -In particular, maintainers should relax and include all available PO -files in their distributions, even if these have not recently been -updated, without banging or otherwise trying to exert pressure on the -translator teams to get the job done. The pressure should rather -come from the community of users speaking a particular language, -and maintainers should consider themselves fairly relieved of any -concern about the adequacy of translation files. On the other hand, -translators should reasonably try updating the PO files they are -responsible for, while the package is undergoing pretest, prior to -an official distribution. - -

    -

    -Once the PO file is complete and dependable, the msgfmt program -is used for turning the PO file into a machine-oriented format, which -may yield efficient retrieval of translations by the programs of the -package, whenever needed at runtime (see section The Format of GNU MO Files). See section Invoking the msgfmt Program, for more information about all modalities of execution -for the msgfmt program. - -

    -

    -Finally, the modified and marked C sources are compiled and linked -with the GNU gettext library, usually through the operation of -make, given a suitable `Makefile' exists for the project, -and the resulting executable is installed somewhere users will find it. -The MO files themselves should also be properly installed. Given the -appropriate environment variables are set (see section Magic for End Users), the -program should localize itself automatically, whenever it executes. - -

    -

    -The remaining of this manual has the purpose of deepening the various -steps outlined in this section. - -

    - - -

    PO Files and PO Mode Basics

    - -

    -The GNU gettext toolset helps programmers and translators -at producing, updating and using translation files, mainly those -PO files which are textual, editable files. This chapter insists -on the format of PO files, and contains a PO mode starter. PO mode -description is spread over this manual instead of being concentrated -in one place, this chapter presents only the basics of PO mode. - -

    - - - -

    Completing GNU gettext Installation

    - -

    -Once you have received, unpacked, configured and compiled the GNU -gettext distribution, the `make install' command puts in -place the programs xgettext, msgfmt, gettext, and -tupdate, as well as their available message catalogs. For -completing a comfortable installation, you might also want to make the -PO mode available to your GNU Emacs users. - -

    -

    -To finish the installation of the PO mode, you might want modify your -file `.emacs', once and for all, so it contains a few lines looking -like: - -

    - -
    -(setq auto-mode-alist
    -      (cons '("\\.pox?\\'" . po-mode) auto-mode-alist))
    -(autoload 'po-mode "po-mode")
    -
    - -

    -Later, whenever you edit some `.po' or `.pox' file, Emacs -loads `po-mode.elc' (or `po-mode.el') as needed, and -automatically activate PO mode commands for the associated buffer. -The string PO appears in the mode line for any buffer for -which PO mode is active. Many PO files may be active at once in a -single Emacs session. - -

    - - -

    The Format of PO Files

    - -

    -A PO file is made up of many entries, each entry holding the relation -between an original untranslated string and its corresponding -translation. All entries in a given PO file usually pertain -to a single project, and all translations are expressed in a single -target language. One PO file entry has the following schematic -structure: - -

    - -
    -white-space
    -#  translator-comments
    -#. automatic-comments
    -#: reference...
    -msgid untranslated-string
    -msgstr translated-string
    -
    - -

    -The general structure of a PO file should be well understood by -the translator. When using PO mode, very little has to be known -about the format details, as PO mode takes care of them for her. - -

    -

    -Entries begin with some optional white space. Usually, when generated -through GNU gettext tools, there is exactly one blank line -between entries. Then comments follow, on lines all starting with the -character #. There are two kinds of comments: those which have -some white space immediately following the #, which comments are -created and maintained exclusively by the translator, and those which -have some non-white character just after the #, which comments -are created and maintained automatically by GNU gettext tools. -All comments, of any kind, are optional. - -

    -

    -After white space and comments, entries show two strings, giving -first the untranslated string as it appears in the original program -sources, and then, the translation of this string. The original -string is introduced by the keyword msgid, and the translation, -by msgstr. The two strings, untranslated and translated, -are quoted in various ways in the PO file, using " -delimiters and \ escapes, but the translator does not really -have to pay attention to the precise quoting format, as PO mode fully -intend to take care of quoting for her. - -

    -

    -The msgid strings, as well as automatic comments, are produced -and managed by other GNU gettext tools, and PO mode does not -provide means for the translator to alter these. The most she can -do is merely deleting them, and only by deleting the whole entry. -On the other hand, the msgstr string, as well as translator -comments, are really meant for the translator, and PO mode gives her -the full control she needs. - -

    -

    -It happens that some lines, usually whitespace or comments, follow the -very last entry of a PO file. Such lines are not part of any entry, -and PO mode is unable to take action on those lines. By using the -PO mode function M-x po-normalize, the translator may get -rid of those spurious lines. See section Normalizing Strings in Entries. - -

    -

    -The remainder of this section may be safely skipped for those using -PO mode, yet it may be interesting for everybody to have a better -idea of the precise format of a PO file. On the other hand, those -not having GNU Emacs handy should carefully continue reading on. - -

    -

    -Each of untranslated-string and translated-string respects -the C syntax for a character string, including the surrounding quotes -and imbedded backslashed escape sequences. When the time comes -to write multi-line strings, one should not use escaped newlines. -Instead, a closing quote should follow the last character on the -line to be continued, and an opening quote should resume the string -at the beginning of the following PO file line. For example: - -

    - -
    -msgid ""
    -"Here is an example of how one might continue a very long string\n"
    -"for the common case the string represents multi-line output.\n"
    -
    - -

    -In this example, the empty string is used on the first line, for -allowing the better alignment of the H from the word `Here' -over the f from the word `for'. In this example, the -msgid keyword is followed by three strings, which are meant -to be concatenated. Concatenating the empty string does not change -the resulting overall string, but it is a way for us to comply with -the necessity of msgid to be followed by a string on the same -line, while keeping the multi-line presentation left-justified, as -we find this to be cleaner disposition. The empty string could have -been omitted, but only if the string starting with `Here' was -promoted on the first line, right after msgid.(1) It was not really necessary -either to switch between the two last quoted strings immediately after -the newline `\n', the switch could have occurred after any -other character, we just did it this way because it is neater. - -

    -

    -One should carefully distinguish between end of lines marked as -`\n' inside quotes, which are part of the represented -string, and end of lines in the PO file itself, outside string quotes, -which have no incidence on the represented string. - -

    -

    -Outside strings, white lines and comments may be used freely. -Comments start at the beginning of a line with `#' and extend -until the end of the PO file line. Comments written by translators -should have the initial `#' immediately followed by some white -space. If the `#' is not immediately followed by white space, -this comment is most likely generated and managed by specialized GNU -tools, and might disappear or be replaced unexpectandly when the PO -file is given to tupdate. - -

    - - -

    Main Commands

    - -

    -When Emacs finds a PO file in a window, PO mode is activated -for that window. This puts the window read-only and establishes a -po-mode-map, which is a genuine Emacs mode, in that way that it is -not derived from text mode in any way. - -

    -

    -The main PO commands are those who do not fit in the other categories in -subsequent sections, they allow for quitting PO mode or managing windows -in special ways. - -

    -
    - -
    u -
    -Undo last modification to the PO file. - -
    q -
    -Quit processing and save the PO file. - -
    o -
    -Temporary leave the PO file window. - -
    h -
    -Show help about PO mode. - -
    = -
    -Give some PO file statistics. - -
    v -
    -Batch validate the format of the whole PO file. - -
    - -

    -The command u (po-undo) interfaces to the GNU Emacs -undo facility. See section `Undoing Changes' in The Emacs Editor. Each time u is typed, modifications the translator -did to the PO file are undone a little more. For the purpose of -undoing, each PO mode command is atomic. This is especially true for -the RET command: the whole edition made by using a single -use of this command is undone at once, even if the edition itself -implied several actions. However, while in the editing window, one -can undo the edition work quite parsimoniously. - -

    -

    -The command q (po-quit) is used when the translator is -done with the PO file. If the file has been modified, it is saved -on disk first. However, prior to all this, the command checks if -some untranslated message remains in the PO file and, if yes, the -translator is asked if she really wants to leave working with this -PO file. This is the preferred way of getting rid of an Emacs PO -file buffer. Merely killing it through the usual command C-x -k (kill-buffer), say, has the unnice effect of leaving a PO -internal work buffer behind. - -

    -

    -The command o (po-other-window) is another, softer -way, to leave PO mode, temporarily. It just moves the cursor in -some other Emacs window, and pops one if necessary. For example, if -the translator just got PO mode to show some source context in some -other, she might discover some apparent bug in the program source -that needs correction. This command allows the translator to change -sex, become a programmer, and have the cursor right into the window -containing the program she (or rather he) wants to modify. -By later getting the cursor back in the PO file window, or by -asking Emacs to edit this file once again, PO mode is then recovered. - -

    -

    -The command h (po-help) displays a summary of all -available PO mode commands. The translator should then type any -character to resume normal PO mode operations. The command ? -has the same effect as h. - -

    -

    -The command = (po-statistics) computes the total number -of entries in the PO file, the ordinal of the current entry -(counted from 1), the number of untranslated entries, the number of -obsolete entries, and displays all these numbers. - -

    -

    -The command v (po-validate) launches msgfmt in -verbose mode over the current PO file. This command first offers -to save the current PO file on disk. The msgfmt tool, from -GNU gettext, has the purpose of creating an MO file out of a -PO file, and PO mode uses the features of this program for checking -the overall format of a PO file, as well as all individual entries. - -

    -

    -The program msgfmt runs asynchronously with Emacs, so -the translator regains control immediately while her PO file -is being studied. Error output is collected in the GNU Emacs -`*compilation*' buffer, displayed in another window. The regular -GNU Emacs command C-x` (next-error), as well as other -usual compile commands, allow the translator to reposition quickly to -the offending parts of the PO file. Once the cursor on the line in -error, the translator may decide for any PO mode action which would -help correcting the error. - -

    - - -

    Entry Positioning

    - -

    -The cursor in a PO file window is almost always part of -an entry. The only exceptions are the special case when the cursor -is after the last entry in the file, or when the PO file is -empty. The entry where the cursor is found to be is said to be the -current entry. Many PO mode commands operate on the current entry, -so moving the cursor does more than allowing the translator to browse -the PO file, this also selects on which entry commands operate. - -

    -

    -Some PO mode commands alter the position of the cursor in a specialized -way. A few of those special purpose positioning are described here, -the others are described in following sections. - -

    -
    - -
    . -
    -Redisplay the current entry. - -
    n -
    -
    SPC -
    -Select the entry after the current one. - -
    p -
    -
    DEL -
    -Select the entry before the current one. - -
    < -
    -Select the first entry in the PO file. - -
    > -
    -Select the last entry in the PO file. - -
    m -
    -Record the location of the current entry for later use. - -
    l -
    -Return to a previously saved entry location. - -
    x -
    -Exchange the current entry location with the previously saved one. - -
    - -

    -Any GNU Emacs command able to reposition the cursor may be used -to select the current entry in PO mode, including commands which -move by characters, lines, paragraphs, screens or pages, and search -commands. However, there is a kind of standard way to display the -current entry in PO mode, which usual GNU Emacs commands moving -the cursor do not especially try to enforce. The command . -(po-current-entry) has the sole purpose of redisplaying the -current entry properly, after the current entry has been changed by -means external to PO mode, or the Emacs screen otherwise altered. - -

    -

    -It is yet to decide if PO mode would help the translator, or otherwise -irritate her, by forcing a more fixed window disposition while she -is doing her work. We originally had quite precise ideas about -how windows should behave, but on the other hand, anyone used to -GNU Emacs is often happy to keep full control. Maybe a fixed window -disposition might be offered as a PO mode option that the translator -might activate or deactivate at will, so it could be offered on an -experimental basis. If nobody feels a real need for using it, or -a compulsion for writing it, we might as well drop this whole idea. -The incentive for doing it should come from translators rather than -programmers, as opinions from an experienced translator are surely -more worth to me than opinions from programmers thinking about -how others should do translation. - -

    -

    -The commands n (po-next-entry) and p -(po-previous-entry) move the cursor the entry following, -or preceding, the current one. If n is given while the -cursor is on the last entry of the PO file, or if p -is given while the cursor is on the first entry, no move is done. -SPC and DEL are alternate keys for n and -p, respectively. - -

    -

    -The commands < (po-first-entry) and > -(po-last-entry) move the cursor to the first entry, or last -entry, of the PO file. When the cursor is located past the last -entry in a PO file, most PO mode commands will return an error saying -`After last entry'. However, the commands < and > -have the special property of being able to work even when the cursor -is not into some PO file entry, and you may use them for nicely -correcting this situation. But even these commands will fail on a -truly empty PO file. There are development plans for PO mode for it -to interactively fill an empty PO file from sources. See section Marking Translatable Strings. - -

    -

    -The translator may decide, before working at the translation of -a particular entry, that she needs browsing the remainder of the -PO file, maybe for finding the terminology or phraseology used -in related entries. She can of course use the standard Emacs idioms -for saving the current cursor location in some register, and use that -register for getting back, or else, to use the location ring. - -

    -

    -PO mode offers another approach, by which cursor locations may be saved -onto a special stack. The command m (po-push-location) -merely adds the location of current entry to the stack, pushing -the already saved locations under the new one. The command -l (po-pop-location) consumes the top stack element and -reposition the cursor to the entry associated with that top element. -This position is then lost, for the next l will move the cursor -to the previously saved location, and so on until locations remain -on the stack. - -

    -

    -If the translator wants the position to be kept on the location stack, -maybe for taking a mere look at the entry associated with the top -element, then go elsewhere with the intent of getting back later, she -ought to use m immediately after l. - -

    -

    -The command x (po-exchange-location) simultaneously -reposition the cursor to the entry associated with the top element of -the stack of saved locations, and replace that top element with the -location of the current entry before the move. Consequently, repeating -the x command toggles alternatively between two entries. -For achieving this, the translator will position the cursor on the -first entry, use m, then position to the second entry, and -merely use x for making the switch. - -

    - - -

    Normalizing Strings in Entries

    - -

    -There are many different ways for encoding a particular string into a -PO file entry, because there are so many different ways to split and -quote multi-line strings, and even, to represent special characters -by backslahsed escaped sequences. Some features of PO mode rely on -the ability for PO mode to scan an already existing PO file for a -particular string encoded into the msgid field of some entry. -Even if PO mode has internally all the built-in machinery for -implementing this recognition easily, doing it fast is technically -difficult. For facilitating a solution to this efficiency problem, -we decided for a canonical representation for strings. - -

    -

    -A conventional representation of strings in a PO file is currently -under discussion, and PO mode experiments a canonical representation. -Having both xgettext and PO mode converging towards a uniform -way of representing equivalent strings would be useful, as the internal -normalization needed by PO mode could be automatically satisfied -when using xgettext from GNU gettext. An explicit -PO mode normalization should then be only necessary for PO files -imported from elsewhere, or for when the convention itself evolves. - -

    -

    -So, for achieving normalization of at least the strings of a given -PO file needing a canonical representation, the following PO mode -command is available: - -

    -
    - -
    M-x po-normalize -
    -Tidy the whole PO file by making entries more uniform. - -
    - -

    -The special command M-x po-normalize, which has no associate -keys, revises all entries, ensuring that strings of both original -and translated entries use uniform internal quoting in the PO file. -It also removes any crumb after the last entry. This command may be -useful for PO files freshly imported from elsewhere, or if we ever -improve on the canonical quoting format we use. This canonical format -is not only meant for getting cleaner PO files, but also for greatly -speeding up msgid string lookup for some other PO mode commands. - -

    -

    -M-x po-normalize presently makes three passes over the entries. -The first implements heuristics for converting PO files for GNU -gettext 0.6 and earlier, in which msgid and msgstr -fields were using K&R style C string syntax for multi-line strings. -These heuristics may fail for comments not related to obsolete -entries and ending with a backslash; they also depend on subsequent -passes for finalizing the proper commenting of continued lines for -obsolete entries. This first pass might disappear once all oldish PO -files would have been adjusted. The second and third pass normalize -all msgid and msgstr strings respectively. They also -clean out those trailing backslashes used by XView's msgfmt -for continued lines. - -

    -

    -Having such an explicit normalizing command allows for importing PO -files from other sources, but also eases the evolution of the current -convention, evolution driven mostly by aesthetic concerns, as of now. -It is all easy to make suggested adjustments at a later time, as the -normalizing command and eventually, other GNU gettext tools -should greatly automate conformance. A description of the canonical -string format is given below, for the particular benefit of those not -having GNU Emacs handy, and who would nevertheless want to handcraft -their PO files in nice ways. - -

    -

    -Right now, in PO mode, strings are single line or multi-line. A string -goes multi-line if and only if it has embedded newlines, that -is, if it matches `[^\n]\n+[^\n]'. So, we would have: - -

    - -
    -msgstr "\n\nHello, world!\n\n\n"
    -
    - -

    -but, replacing the space by a newline, this becomes: - -

    - -
    -msgstr ""
    -"\n"
    -"\n"
    -"Hello,\n"
    -"world!\n"
    -"\n"
    -"\n"
    -
    - -

    -We are deliberately using a caricatural example, here, to make the -point clearer. Usually, multi-lines are not that bad looking. -It is probable that we will implement the following suggestion. -We might lump together all initial newlines into the empty string, -and also all newlines introducing empty lines (that is, for n -> 1, the n-1'th last newlines would go together on a separate -string), so making the previous example appear: - -

    - -
    -msgstr "\n\n"
    -"Hello,\n"
    -"world!\n"
    -"\n\n"
    -
    - -

    -There are a few yet undecided little points about string normalization, -to be documented in this manual, once these questions settle. - -

    - - -

    Preparing Program Sources

    - -

    -For the programmer, changes to the C source code fall into three -categories. First, you have to make the localization functions -known to all modules needing message translation. Second, you should -properly trigger the operation of GNU gettext when the program -initializes, usually from the main function. Last, you should -identify and especially mark all constant strings in your program -needing translation. - -

    -

    -Presuming that your set of programs, or package, has been adjusted -so all needed GNU gettext files are available, and your -`Makefile' files are adjusted (see section The Maintainer's View), each C module -having translated C strings should contain the line: - -

    - -
    -#include <libintl.h>
    -
    - -

    -The remaining changes to your C sources are discussed in the further -sections of this chapter. - -

    - - - -

    Triggering gettext Operations

    - -

    -The initialization of locale data should be done with more or less -the same code in every program, as demonstrated below: - -

    - -
    -int
    -main (argc, argv)
    -     int argc;
    -     char argv;
    -{
    -  ...
    -  setlocale (LC_ALL, "");
    -  bindtextdomain (PACKAGE, LOCALEDIR);
    -  textdomain (PACKAGE);
    -  ...
    -}
    -
    - -

    -PACKAGE and LOCALEDIR should be provided either by -`config.h' or by the Makefile. For now consult the gettext -sources for more information. - -

    -

    -The use of LC_ALL might not be appropriate for you. -LC_ALL includes all locale categories and especially -LC_CTYPE. This later category is responsible for determining -character classes with the isalnum etc. functions from -`ctype.h' which could especially for programs, which process some -kind of input language, be wrong. For example this would mean that a -source code using the (cedille character) is runnable in -France but not in the U.S. - -

    -

    -So it is sometimes necessary to replace the LC_ALL line in the -code above by a sequence of setlocale lines - -

    - -
    -{
    -  ...
    -  setlocale (LC_TIME, "");
    -  setlocale (LC_MESSAGES, "");
    -  ...
    -}
    -
    - -

    -or to switch for and back to the character class in question. - -

    - - -

    How Marks Appears in Sources

    - -

    -The C sources should mark all strings requiring translation. Marking -is done in such a way that each translatable string appears to be -the sole argument of some function or preprocessor macro. There are -only a few such possible functions or macros meant for translation, -and their names are said to be marking keywords. The marking is -attached to strings themselves, rather than to what we do with them. -This approach has more uses. A blatant example is an error message -produced by formatting. The format string needs translation, as -well as some strings inserted through some `%s' specification -in the format, while the result from sprintf may have so many -different instances that it is unpractical to list them all in some -`error_string_out()' routine, say. - -

    -

    -This marking operation has two goals. The first goal of marking -is for triggering the retrieval of the translation, at run time. -The keyword are possibly resolved into a routine able to dynamically -return the proper translation, as far as possible or wanted, for the -argument string. Most localizable strings are found into executable -positions, that is, affected to variables or given as parameter to -functions. But this is not universal usage, and some translatable -strings appear in structured initializations. See section Special Cases of Translatable Strings. - -

    -

    -The second goal of the marking operation is to help xgettext -at properly extracting all translatable strings when it scans a set -of program sources and produces PO file templates. - -

    -

    -The canonical keyword for marking translatable strings is -`gettext', it gave its name to the whole GNU gettext -package. For packages making only light use of the `gettext' -keyword, macro or function, it is easily used as is. However, -for packages using the gettext interface more heavily, it -is usually more convenient giving the main keyword a shorter, less -obtrusive name. Indeed, the keyword might appear on a lot of strings -all over the package, and programmers usually do not want nor need -that their program sources remind them loud, all the time, that they -are internationalized. Further, a long keyword has the disadvantage -of using more horizontal space, forcing more indentation work on -sources for those trying to keep them within 79 or 80 columns. - -

    -

    -Many GNU packages use `_' (a simple underline) as a keyword, -and write `_("Translatable string")' instead of `gettext -("Translatable string")'. Further, the usual GNU coding rule -wanting that there is a space between the keyword and the opening -parenthesis is relaxed, in practice, for this particular usage. -So, the textual overhead per translatable string is reduced to -only three characters: the underline and the two parentheses. -However, even if GNU gettext uses this convention internally, -it does not offer it officially. The real, genuine keyword is truly -`gettext' indeed. It is fairly easy for those wanting to use -`_' instead of `gettext' to declare: - -

    - -
    -#include <libintl.h>
    -#define _(String) gettext (String)
    -
    - -

    -instead of merely using `#include <libintl.h>'. - -

    -

    -Later on, the maintenance is relatively easy. If, as a programmer, -you add or modify a string, you will have to ask yourself if the -new or altered string requires translation, and include it within -`_()' if you think it should be translated. `"%s: %d"' is -an example of string not requiring translation! - -

    - - -

    Marking Translatable Strings

    - -

    -In PO mode, one set of features is meant more for the programmer than -for the translator, and allows him to interactively mark which strings, -in a set of program sources, are translatable, and which are not. -Even if it is a fairly easy job for a programmer to find and mark -such strings by other means, using any editor of his choice, PO mode -makes this work more comfortable. Further, this gives translators -who feel a little like programmers, or programmers who feel a little -like translators, a tool letting them work at marking translatable -strings in the program sources, while simultaneously producing a set of -translation in some language, for the package being internationalized. - -

    -

    -The set of program sources, aimed by the PO mode commands describe -here, should have an Emacs tags table constructed for your project, -prior to using these PO file commands. This is easy to do. In any -shell window, change the directory to the root of your project, then -execute a command resembling: - -

    - -
    -etags src/*.[hc] lib/*.[hc]
    -
    - -

    -presuming here you want to process all `.h' and `.c' files -from the `src/' and `lib/' directories. This command will -explore all said files and create a `TAGS' file in your root -directory, somewhat summarizing the contents using a special file -format Emacs can understand. - -

    -

    -For official GNU packages which follow the GNU coding standard there is -a make goal tags or TAGS which construct the tag files in -all directories and for all files containing source code. - -

    -

    -Once your `TAGS' file is ready, the following commands assist -the programmer at marking translatable strings in his set of sources. -But these commands are necessarily driven from within a PO file -window, and it is likely that you do not even have such a PO file yet. -This is not a problem at all, as you may safely open a new, empty PO -file, mainly for using these commands. This empty PO file will slowly -fill in while you mark strings as translatable in your program sources. - -

    -
    - -
    , -
    -Search through program sources for a string which looks like a -candidate for translation. - -
    M-, -
    -Mark the last string found with `_()'. - -
    M-. -
    -Mark the last string found with a keyword taken from a set of possible -keywords. This command with a prefix allows some management of these -keywords. - -
    - -

    -The , (po-tags-search) command search for the next -occurrence of a string which looks like a possible candidate for -translation, and displays the program source in another Emacs window, -positioned in such a way that the string is near the top of this other -window. If the string is to big to fit whole in this window, it is -rather positioned so only its end is shown. In any case, the cursor -is left in the PO file window. If the shown string would be better -presented differently in different native languages, you may mark it -using M-, or M-.. Otherwise, you might rather ignore it -and skip to the next string by merely repeating the , command. - -

    -

    -A string is a good candidate for translation if it contains a sequence -of three or more letters. A string containing at most two letters in -a row will be considered as a candidate if it has more letters than -non-letters. The command disregards strings containing no letters, -or isolated letters only. It also disregards strings within comments, -or strings already marked with some keyword PO mode knows (see below). - -

    -

    -If you have never told Emacs about some `TAGS' file to use, the -command will request that you specify one from the minibuffer, the -first time you use the command. You may later change your `TAGS' -file by using the regular Emacs command M-x visit-tags-table, -which will ask you to name the precise `TAGS' file you want -to use. See section `Tag Tables' in The Emacs Editor. - -

    -

    -Each time you use the , command, the search resumes where it was -left over by the previous search, and goes through all program sources, -obeying the `TAGS' file, until all sources have been processed. -However, by giving a prefix argument to the command (C-u -,), you may request that the search be restarted all over again -from the first program source; but in this case, strings that you -recently marked as translatable will be automatically skipped. - -

    -

    -Using this , command does not prevent using of other regular -Emacs tags commands. For example, regular tags-search or -tags-query-replace commands may be used without disrupting the -independent , search sequence. However, as implemented, the -initial , command (or the , command is used with a -prefix) might also reinitialize the regular Emacs tags searching to the -first tags file, this reinitialization might be considered spurious. - -

    -

    -The M-, (po-mark-translatable) command will mark the -recently found string with the `_' keyword. The M-. -(po-select-mark-and-mark) command will request that you type -one keyword from the minibuffer and use that keyword for marking -the string. Both commands will automatically create a new PO file -untranslated entry for the string being marked, and make it the -current entry (making it easy for you to immediately proceed to its -translation, if you feel like doing it right away). It is possible -that the modifications made to the program source by M-, or -M-. render some source line longer than 80 columns, forcing you -to break and re-indent this line differently. You may use the o -command from PO mode, or any other window changing command from -GNU Emacs, to break out into the program source window, and do any -needed adjustments. You will have to use some regular Emacs command -to return the cursor to the PO file window, if you want commanding -, for the next string, say. - -

    -

    -The M-. command has a few built-in speedups, so you do not -have to explicitly type all keywords all the time. The first such -speedup is that you are presented with a preferred keyword, -which you may accept by merely typing RET at the prompt. -The second speedup is that you may type any non-ambiguous prefix of the -keyword you really mean, and the command will complete it automatically -for you. This also means that PO mode has to know all -your possible keywords, and that it will not accept mistyped keywords. - -

    -

    -If you reply ? to the keyword request, the command gives a -list of all known keywords, from which you may choose. When the -command is prefixed by an argument (C-u M-.), it inhibits -updating any program source or PO file buffer, and does some simple -keyword management instead. In this case, the command asks for a -keyword, written in full, which becomes a new allowed keyword for -later M-. commands. Moreover, this new keyword automatically -becomes the preferred keyword for later commands. By typing -an already known keyword in response to C-u M-., one merely -changes the preferred keyword and does nothing more. - -

    -

    -All keywords known for M-. are recognized by the , command -when scanning for strings, and strings already marked by any of those -known keywords are automatically skipped. If many PO files are opened -simultaneously, each one has its own independent set of known keywords. -There is no provision in PO mode, currently, for deleting a known -keyword, you have to quit the file (maybe using q) and reopen -it afresh. When a PO file is newly brought up in an Emacs window, only -`gettext' and `_' are known as keywords, and `gettext' -is preferred for the M-. command. In fact, this is not useful to -prefer `_', as this one is already built in the M-, command. - -

    - - -

    Special Cases of Translatable Strings

    - -

    -The attentive reader might now point out that it is not always possible -to mark translatable string with gettext or something like this. -Consider the following case: - -

    - -
    -{
    -  static const char *messages[] = {
    -    "some very meaningful message",
    -    "and another one"
    -  };
    -  const char *string;
    -  ...
    -  string
    -    = index > 1 ? "a default message" : messages[index];
    -
    -  fputs (string);
    -  ...
    -}
    -
    - -

    -While it is no problem to mark the string "a default message" it -is not possible to mark the string initializers for messages. -What is to do? We have to fulfill two tasks. First we have to mark the -strings so that the xgettext program (see section Invoking the xgettext Program) -can find them, and second we have to translate the string at runtime -before printing them. - -

    -

    -The first task can be fulfilled by creating a new keyword, which names a -no-op. For the second we have to mark all access points to a string -from the array. So one solution can look like this: - -

    - -
    -#define gettext_noop(String) (String)
    -
    -{
    -  static const char *messages[] = {
    -    gettext_noop ("some very meaningful message"),
    -    gettext_noop ("and another one")
    -  };
    -  const char *string;
    -  ...
    -  string
    -    = index > 1 ? gettext ("a default message") : gettext (messages[index]);
    -
    -  fputs (string);
    -  ...
    -}
    -
    - -

    -Please convince yourself that the string which is written by -fputs is translated in any case. How to get xgettext know -the additional keyword gettext_noop is explained in section Invoking the xgettext Program. - -

    -

    -The above is of course not the only solution. You could also come along -with the following one: - -

    - -
    -#define gettext_noop(String) (String)
    -
    -{
    -  static const char *messages[] = {
    -    gettext_noop ("some very meaningful message",
    -    gettext_noop ("and another one")
    -  };
    -  const char *string;
    -  ...
    -  string
    -    = index > 1 ? gettext_noop ("a default message") : messages[index];
    -
    -  fputs (gettext (string));
    -  ...
    -}
    -
    - -

    -But this has some drawbacks. First the programmer has to take care that -he uses gettext_noop for the string "a default message". -A use of gettext could have in rare cases unpredictable results. -The second reason is found in the internals of the GNU gettext -Library which will make this solution less efficient. - -

    -

    -One advantage is that you need not make control flow analysis to make -sure the output is really translated in any case. But this analysis is -generally not very difficult. If it should be in any situation you can -use this second method in this situation. - -

    - - - -

    Making the Initial PO File

    - - - -

    Invoking the xgettext Program

    - - -
    -xgettext [option] inputfile ...
    -
    - -
    - -
    `-a' -
    -
    `--extract-all' -
    -Extract all strings. - -
    `-c [tag]' -
    -
    `--add-comments[=tag]' -
    -Place comment block with tag (or those preceding keyword lines) -in output file. - -
    `-C' -
    -
    `--c++' -
    -Recognize C++ style comments. - -
    `-d name' -
    -
    `--default-domain=name' -
    -Use `name.po' for output (instead of `messages.po'). - -
    `-D directory' -
    -
    `--directory=directory' -
    -Change to directory before beginning to search and scan source -files. The resulting `.po' file will be written relative to the -original directory, though. - -
    `-f file' -
    -
    `--files-from=file' -
    -Read the names of the input files from file instead of getting -them from the command line. - -
    `-h' -
    -
    `--help' -
    -Display this help and exit. - -
    `-I list' -
    -
    `--input-path=list' -
    -List of directories searched for input files. - -
    `-j' -
    -
    `--join-existing' -
    -Join messages with existing file. - -
    `-k word' -
    -
    `--keyword[=word]' -
    -Additonal keyword to be looked for (without word means not to -use default keywords). - -The default keywords, which are always looked for if not explicitly -disabled, are gettext, dgettext, dcgettext and -gettext_noop. - -
    `-m [string]' -
    -
    `--msgstr-prefix[=string]' -
    -Use string or "" as prefix for msgstr entries. - -
    `-M [string]' -
    -
    `--msgstr-suffix[=string]' -
    -Use string or "" as suffix for msgstr entries. - -
    `--no-location' -
    -Do not write `#: filename:line' lines. - -
    `-n' -
    -
    `--add-location' -
    -Generate `#: filename:line' lines (default). - -
    `--omit-header' -
    -Don't write header with `msgid ""' entry. - -This is useful for testing purposes because it eliminates a source -of variance for generated .gmo files. We can ship some of -these files in the GNU gettext package, and the result of -regenerating them through msgfmt should yield the same values. - -
    `-p dir' -
    -
    `--output-dir=dir' -
    -Output files will be placed in directory dir. - -
    `-s' -
    -
    `--sort-output' -
    -Generate sorted output and remove duplicates. - -
    `--strict' -
    -Write out strict Uniforum conforming PO file. - -
    `-v' -
    -
    `--version' -
    -Output version information and exit. - -
    `-x file' -
    -
    `--exclude-file=file' -
    -Entries from file are not extracted. - -
    - -

    -Search path for supplementary PO files is: -`/usr/local/share/nls/src/'. - -

    -

    -If inputfile is `-', standard input is read. - -

    -

    -This implementation of xgettext is able to process a few awkward -cases, like strings in preprocessor macros, ANSI concatenation of -adjacent strings, and escaped end of lines for continued strings. - -

    - - -

    C Sources Context

    - -

    -PO mode is particularily powerful when used with PO files -created through GNU gettext utilities, as those utilities -insert special comments in the PO files they generate. -Some of these special comments relate the PO file entry to -exactly where the untranslated string appears in the program sources. - -

    -

    -When the translator gets to an untranslated entry, she is fairly -often faced with an original string which is not as informative as -it normally should, being succinct, cryptic, or otherwise ambiguous. -Before chosing how to translate the string, she needs to understand -better what the string really means and how tight the translation has -to be. Most of times, when problems arise, the only way left to make -her judgment is looking at the true program sources from where this -string originated, searching for surrounding comments the programmer -might have put in there, and looking around for helping clues of -any kind. - -

    -

    -Surely, when looking at program sources, the translator will receive -more help if she is a fluent programmer. However, even if she is -not versed in programming and feels a little lost in C code, the -translator should not be shy at taking a look, once in a while. -It is most probable that she will still be able to find some of the -hints she needs. She will learn quickly to not feel uncomfortable -in program code, paying more attention to programmer's comments, -variable and function names (if he dared chosing them well), and -overall organization, than to programmation itself. - -

    -

    -The following commands are meant to help the translator at getting -program source context for a PO file entry. - -

    -
    - -
    c -
    -Resume the display of a program source context, or cycle through them. - -
    M-c -
    -Display of a program source context selected by menu. - -
    d -
    -Add a directory to the search path for source files. - -
    M-d -
    -Delete a directory from the search path for source files. - -
    - -

    -The commands c (po-cycle-reference) and M-c -(po-select-reference) both open another window displaying -some source program file, and already positioned in such a way that -it shows an actual use of the current string to translate. By doing -so, the command gives source program context for the string. But if -the entry has no source context references, or if all references -are unresolved along the search path for program sources, then the -command diagnoses this as an error. - -

    -

    -Even if c (or M-c) opens a new window, the cursor stays -in the PO file window. If the translator really wants to -get into the program source window, she ought to do it explicitly, -maybe by using command o. - -

    -

    -When c is typed for the first time, or for a PO file entry which -is different of the last one used for getting source context, then the -command reacts by giving the first context available for this entry, -if any. If some context has already been recently displayed for the -current PO file entry, and the translator wandered to do other -things, typing c again will merely resume, in another window, -the context last displayed. In particular, if the translator moved -the cursor away from the context in the source file, the command will -bring the cursor back to the context. By using c many times -in a row, with no interning other commands, PO mode will cycle to -the next available contexts for this particular entry, getting back -to the first context once the last has been shown. - -

    -

    -The command M-c behaves differently. Instead of cycling through -references, it lets the translator choose of particular reference among -many, and displays that reference. It is best used with completion, -if the translator types TAB immediately after M-c, in -response to the question, she will be offered a menu of all possible -references, as a reminder of which are the acceptable answers. -This command is useful only where there are really many contexts -available for a single string to translate. - -

    -

    -Program source files are usually found relative to where the PO -file stands. As a special provision, when this fails, the file is -also looked for, but relative to the directory immediately above it. -Those two cases take proper care of most PO files. However, it might -happen that a PO file has been moved, or is edited in a different -place than its normal location. When this happens, the translator -should tell PO mode in which directory normally sits the genuine PO -file. Many such directories may be specified, and all together, they -constitute what is called the search path for program sources. -The command d (po-add-path) is used to interactively -enter a new directory at the front of the search path, and the command -M-d (po-delete-path) is used to select, with completion, -one of the directories she does not want anymore on the search path. - -

    - - -

    Using Translation Compendiums

    - -

    -Compendiums are yet to be implemented. - -

    -

    -An incoming PO mode feature will let the translator maintain a -compendium of already achieved translations. A compendium -is a special PO file containing a set of translations recurring in -many different packages. The translator will be given commands for -adding entries to her compendium, and later initializing untranslated -entries, or updating already translated entries, from translations -kept in the compendium. For this to work, however, the compendium -would have to be normalized. See section Normalizing Strings in Entries. - -

    - - - -

    Updating Existing PO Files

    - - - -

    Invoking the tupdate Program

    - - -
    -tupdate --help
    -tupdate --version
    -tupdate new old
    -
    - -

    -File new is the last created PO file (generally by -xgettext). It need not contain any translations. File -old is the PO file including the old translations which will -be taken over to the newly created file as long as they still match. - -

    -

    -When English messages change in the programs, this is reflected in -the PO file as extracted by xgettext. In large messages, that -can be hard to detect, and will obviously result in an incomplete -translation. One of the virtues of tupdate is that it detects -such changes, saving the previous translation into a PO file comment, -so marking the entry as obsolete, and giving the modified string with -an empty translation, that is, marking the entry as untranslated. - -

    - - -

    Untranslated Entries

    - -

    -When xgettext originally creates a PO file, unless told -otherwise, it initializes the msgid field with the untranslated -string, and leaves the msgstr string to be empty. Such entries, -having an empty translation, are said to be untranslated entries. -Later, when the programmer slightly modifies some string right in -the program, this change is later reflected in the PO file -by the appearance of a new untranslated entry for the modified string. - -

    -

    -The usual commands moving from entry to entry consider untranslated -entries on the same level as active entries. Untranslated entries -are easily recognizable by the fact they end with `msgstr ""'. - -

    -

    -The work of the translator might be (quite naively) seen as the process -of seeking after an untranslated entry, editing a translation for -it, and repeating these actions until no untranslated entries remain. -Some commands are more specifically related to untranslated entry -processing. - -

    -
    - -
    e -
    -Find the next untranslated entry. - -
    M-e -
    -Find the previous untranslated entry. - -
    k -
    -Turn the current entry into an untranslated one. - -
    - -

    -The commands e (po-next-empty-entry) and M-e -(po-previous-empty) move forwards or backwards, chasing for an -obsolete entry. If none is found, the search is extended and wraps -around in the PO file buffer. - -

    -

    -An entry can be turned back into an untranslated entry by -merely emptying its translation, using the command k -(po-kill-msgstr). See section Modifying Translations. - -

    -

    -Also, when time comes to quit working on a PO file buffer -with the q command, the translator is asked for confirmation, -if some untranslated string still exists. - -

    - - -

    Obsolete Entries

    - -

    -By obsolete PO file entries, we mean those entries which are -commented out, usually by tupdate when it found that the -translation is not needed anymore by the package being localized. - -

    -

    -The usual commands moving from entry to entry consider obsolete -entries on the same level as active entries. Obsolete entries are -easily recognizable by the fact that all their lines start with -#, even those lines containing msgid or msgstr. - -

    -

    -Commands exist for emptying the translation or reinitializing it -to the original untranslated string. Commands interfacing with the -kill ring may force some previously saved text into the translation. -The user may interactively edit the translation. All these commands -may apply to obsolete entries, carefully leaving the entry obsolete -after the fact. - -

    -

    -Moreover, some commands are more specifically related to obsolete -entry processing. - -

    -
    - -
    M-n -
    -
    M-SPC -
    -Find the next obsolete entry. - -
    M-p -
    -
    M-DEL -
    -Find the previous obsolete entry. - -
    z -
    -Make an active entry obsolete, or zap out an obsolete entry. - -
    - -

    -The commands M-n (po-next-obsolete-entry) and M-p -(po-previous-obsolete-entry) move forwards or backwards, -chasing for an obsolete entry. If none is found, the search is -extended and wraps around in the PO file buffer. The commands -M-SPC and M-DEL are synonymous to M-n -and M-p, respectively. - -

    -

    -PO mode does not provide ways for un-commenting an obsolete entry -and making it active, because this would reintroduce an original -untranslated string which does not correspond to any marked string -in the program sources. This goes with the philosophy of never -introducing useless msgid values. - -

    -

    -However, it is possible to comment out an active entry, so making -it obsolete. GNU gettext utilities will later react to the -disappearance of a translation by using the untranslated string. -The command z (po-fade-out-entry) pushes the current entry -a little further towards annihilation. If the entry is active, then -the entry is merely commented out. If the entry is already obsolete, -then it is completely deleted from the PO file. It is easy to recycle -the translation so deleted into some other PO file entry, usually -one which is untranslated. See section Modifying Translations. - -

    -

    -Here is a quite interesting problem to solve for later development of -PO mode, for those nights you are not sleepy. The idea would be that -PO mode might become bright enough, one of these days, to make good -guesses at retrieving the most probable candidate, among all obsolete -entries, for initializing the translation of a newly appeared string. -I think it might be a quite hard problem to do this algorithmically, as -we have to develop good and efficient measures of string similarity. -Right now, PO mode completely lets the decision to the translator, -when the time comes to find the adequate obsolete translation, it -merely tries to provide handy tools for helping her to do so. - -

    - - -

    Modifying Translations

    - -

    -PO mode prevents direct edition of the PO file, by the usual -means Emacs give for altering a buffer's contents. By doing so, -it pretends helping the translator to avoid little clerical errors -about the overall file format, or the proper quoting of strings, -as those errors would be easily made. Other kinds of errors are -still possible, but some may be catched and diagnosed by the batch -validation process, which the translator may always trigger by the -v command. For all other errors, the translator has to rely on -her own judgment, and also on the linguistic reports submitted to her -by the users of the translated package, having the same mother tongue. - -

    -

    -When the time comes to create a translation, correct a error diagnosed -mechanically or reported by a user, the translator have to resort to -using the following commands for modifying the translations. - -

    -
    - -
    RET -
    -Interactively edit the translation. - -
    TAB -
    -Reinitialize the translation with the original, untranslated string. - -
    k -
    -Save the translation on the kill ring, and delete it. - -
    w -
    -Save the translation on the kill ring, without deleting it. - -
    y -
    -Replace the translation, taking the new from the kill ring. - -
    - -

    -The command RET (po-edit-msgstr) opens a new Emacs -window containing a copy of the translation taken from the current -PO file entry, all ready for edition, fully modifiable -and with the complete extent of GNU Emacs modifying commands. -The string is presented to the translator expunged of all quoting -marks, and she will modify the unquoted string in this -window to heart's content. Once done, the regular Emacs command -M-C-c (exit-recursive-edit) may be used to return the -edited translation into the PO file, replacing the original -translation. The keys C-c C-c are bound so they have the -same effect as M-C-c. - -

    -

    -If the translator becomes unsatisfied with her translation to the -extent she prefers keeping the translation which was existent prior to -the RET command, she may use the regular Emacs command C-] -(abort-recursive-edit) to merely get rid of edition, while -preserving the original translation. Another way would be for her -to exit normally with C-c C-c, then type u once for -undoing the whole effect of last edition. - -

    -

    -While editing her translation, the translator should pay attention at -not inserting unwanted RET (carriage returns) characters at -the end of the translated string if those are not meant to be there, -or removing such characters when they are required. Since these -characters are not visible in the editing buffer, they are easily to -introduce by mistake. To help her, RET automatically puts -the character < at the end of the string being edited, but this -< is not really part of the string. On exiting the editing -window with C-c C-c, PO mode automatically removes such -< and all whitespace added after it. If the translator adds -characters after the terminating <, it looses its delimiting -property and integrally becomes part of the string. If she removes -the delimiting <, then the edited string is taken as -is, with all trailing newlines, even if invisible. Also, if the -translated string ought to end itself with a genuine <, then the -delimiting < may not be removed; so the string should appear, -in the editing window, as ending with two < in a row. - -

    -

    -When a translation (or a comment) is being edited, the translator -may move the cursor back into the PO file buffer and freely -move to other entries, and browsing at will. The edited entry will -be recovered as soon as the edit ceases, because this is this entry -only which is being modified. If, with an edition still opened, the -translator wanders in the PO file buffer, she cannot modify -any other entry. If she tries to, PO mode will react by suggesting -that she aborts the current edit, or else, by inviting her to finish -the current edit prior to any other modification. - -

    -

    -The command TAB (po-msgid-to-msgstr) initializes, or -reinitializes the translation with the original string. This command -is normally used when the translator wants to redo a fresh translation -of the original string, disregarding any previous work. - -

    -

    -In fact, whether it is best to start a translation with an empty -string, or rather with a copy of the original string, is a matter of -taste or habit. Sometimes, the source mother tongue language and the -target language are so different that is simply best to start writing -on an empty page. At other times, the source and target languages -are so close that it would be a waste to retype a number of words -already being written in the original string. A translator may also -like having the original string right under her eyes, as she will -progressively overwrite the original text with the translation, even -if this requires some extra editing work to get rid of the original. - -

    -

    -The command k (po-kill-msgstr) merely empties the -translation string, so turning the entry into an untranslated -one. But while doing so, its previous contents is put apart in -a special place, known as the kill ring. The command w -(po-kill-ring-save-msgstr) has also the effect of taking a -copy of the translation onto the kill ring, but it otherwise leaves -the entry alone, and does not remove the translation from the -entry. Both commands use exactly the Emacs kill ring, which is shared -between buffers, and which is well known already to GNU Emacs lovers. - -

    -

    -The translator may use k or w many times in the course -of her work, as the kill ring may hold several saved translations. -From the kill ring, strings may later be reinserted in various -Emacs buffers. In particular, the kill ring may be used for moving -translation strings between different entries of a single PO file -buffer, or if the translator is handling many such buffers at once, -even between PO files. - -

    -

    -To facilitate exchanges with buffers which are not in PO mode, the -translation string put on the kill ring by the k command is fully -unquoted before being saved: external quotes are removed, multi-lines -strings are concatenated, and backslashed escaped sequences are turned -into their corresponding characters. In the special case of obsolete -entries, the translation is also uncommented prior to saving. - -

    -

    -The command y (po-yank-msgstr) completely replaces the -translation of the current entry by a string taken from the kill ring. -Following GNU Emacs terminology, we then say that the replacement -string is yanked into the PO file buffer. -See section `Yanking' in The Emacs Editor. -The first time y is used, the translation receives the value of -the most recent addition to the kill ring. If y is typed once -again, immediately, without intervening keystrokes, the translation -just inserted is taken away and replaced by the second most recent -addition to the kill ring. By repeating y many times in a row, -the translator may travel along the kill ring for saved strings, -until she finds the string she really wanted. - -

    -

    -When a string is yanked into a PO file entry, it is fully and -automatically requoted for complying with the format PO files should -have. Further, if the entry is obsolete, PO mode then appropriately -push the inserted string inside comments. Once again, translators -should not burden themselves with quoting considerations besides, of -course, the necessity of the translated string itself respective to -the program using it. - -

    -

    -Note that k or w are not the only commands pushing strings -on the kill ring, as almost any PO mode command replacing translation -strings (or the translator comments) automatically save the old string -on the kill ring. The main exceptions to this general rule are the -yanking commands themselves. - -

    -

    -To better illustrate the operation of killing and yanking, let's -use an actual example, taken from a common situation. When the -programmer slightly modifies some string right in the program, his -change is later reflected in the PO file by the appearance -of a new untranslated entry for the modified string, and the fact -that the entry translating the original or unmodified string becomes -obsolete. In many cases, the translator might spare herself some work -by retrieving the unmodified translation from the obsolete entry, -then initializing the untranslated entry msgstr field with -this retrieved translation. Once this done, the obsolete entry is -not wanted anymore, and may be safely deleted. - -

    -

    -When the translator finds an untranslated entry and suspects that a -slight variant of the translation exists, she immediately uses m -to mark the current entry location, then starts chasing obsolete -entries with M-SPC, hoping to find some translation corresponding -to the unmodified string. Once found, she uses the z command -for deleting the obsolete entry, knowing that z also kills -the translation, that is, pushes the translation on the kill ring. -Then, l returns to the initial untranslated entry, y -then yanks the saved translation right into the msgstr -field. The translator is then free to use RET for fine -tuning the translation contents, and maybe to later use e, -then m again, for going on with the next untranslated string. - -

    -

    -When some sequence of keys has to be typed over and over again, the -translator may find comfortable to become more acquainted with the GNU -Emacs capability of learning these sequences and playing them back under -request. See section `Keyboard Macros' in The Emacs Editor. - -

    - - -

    Modifying Comments

    - -

    -Any translation work done seriously will raise many linguistic -difficulties, for which decisions have to be made, and the choices -further documented. These documents may be saved within the -PO file in form of translator comments, which the translator -is free to create, delete, or modify at will. These comments may -be useful to herself when she returns to this PO file after a while. -Memory forgets! - -

    -

    -These commands are somewhat similar to those modifying translations, -so the general indications given for these apply here. See section Modifying Translations. - -

    -
    - -
    M-RET -
    -Interactively edit the translator comments. - -
    M-k -
    -Save the translator comments on the kill ring, and delete it. - -
    M-w -
    -Save the translator comments on the kill ring, without deleting it. - -
    M-y -
    -Replace the translator comments, taking the new from the kill ring. - -
    - -

    -Those commands parallel PO mode commands for modifying the translation -strings, and behave much the same way as them, except that they handle -this part of PO file comments meant for translator usage, rather -than the translation strings. So, the descriptions given below are -slightly succinct, because the full details have already been given. -See section Modifying Translations. - -

    -

    -The command M-RET (po-edit-comment) opens a new Emacs -window containing a copy of the translator comments the current -PO file entry. If there is no such comments, PO mode -understands that the translator wants to add a comment to the entry, -and she is presented an empty screen. Comment marks (#) and -the space following them are automatically removed before edition, -and reinstated after. For translator comments pertaining to obsolete -entries, the uncommenting and recommenting operations are done twice. -The command # also has the same effect as M-RET, and might -be easier to type. Once in the editing window, the keys C-c -C-c allow the translator to tell she is finished with editing -the comment. - -

    -

    -The command M-k (po-kill-comment) get rid of all -translator comments, while saving those comments on the kill ring. -The command M-w (po-kill-ring-save-comment) takes -a copy of the translator comments on the kill ring, but leaves -them undisturbed in the current entry. The command M-y -(po-yank-comment) completely replaces the translator comments -by a string taken at the front of the kill ring. When this command -is immediately repeated, the comments just inserted are withdrawn, -and replaced by other strings taken along the kill ring. - -

    -

    -On the kill ring, all strings have the same nature. There is no -distinction between translation strings and translator -comments strings. So, for example, let's presume the translator -has just finished editing a translation, and wants to create a new -translator comments for documenting why the previous translation was -not good, just to remember what was the problem. Foreseeing that she -will do that in her documentation, the translator will want to quote -the previous translation in her translator comments. For doing so, she -may initialize the translator comments with the previous translation, -still at the head of the kill ring. Because editing already pushed the -previous translation on the kill ring, she just has to type M-w -prior to #, and the previous translation will be right there, -all ready for being introduced by some explanatory text. - -

    -

    -On the other hand, presume there are some translator comments already -and that the translator wants to add to those comments, instead -of wholly replacing them. Then, she should edit the comment right -away with #. Once inside the editing window, she can use the -regular GNU Emacs commands C-y (yank) and M-y -(yank-pop) for getting the previous translation where she likes. - -

    - - -

    Consulting Auxiliary PO Files

    - -

    -An incoming feature of PO mode should help the knowledgeable translator -to take advantage of translations already achieved in other languages -she just happens to know, by providing these other language translation -as additional context for her own work. Each PO file existing for -the same package the translator is working on, but targeted to a -different mother tongue language, is called an auxiliary PO file. -Commands will exist for declaring and handling auxiliary PO files, -and also for showing contexts for the entry under work. For this to -work fully, all auxiliary PO files will have to be normalized. - -

    - - -

    Producing Binary MO Files

    - - - -

    Invoking the msgfmt Program

    - - -
    -Usage: msgfmt [option] filename.po ...
    -
    - -
    - -
    `-a number' -
    -
    `--alignment=number' -
    -Align strings to number bytes (default: 1). - -
    `-h' -
    -
    `--help' -
    -Display this help and exit. - -
    `-I list' -
    -
    `--input-path=list' -
    -List of directories searched for input files. - -
    `--no-hash' -
    -Binary file will not include the hash table. - -
    `-o file' -
    -
    `--output-file=file' -
    -Specify output file name as file. - -
    `-v' -
    -
    `--verbose' -
    -Detect and diagnose input file anomalies which might represent -translation errors. The msgid and msgstr strings are -studied and compared. It is considered abnormal that one string -starts or ends with a newline while the other does not. Also, both -strings should have the same number of `%' format specifiers, -with matching types. For example, the check will diagnose using -`%.*s' against `%s', or `%d' against `%s', or -`%d' against `%x'. It can even handle positional parameters. - -
    `-V' -
    -
    `--version' -
    -Output version information and exit. - -
    - -

    -If input file is `-', standard input is read. If output file -is `-', output is written to standard output. - -

    -

    -The search patch for msgfmt is `/usr/local/share/nls/src/', -by default. It represents the path to additional directories where -other PO files can be found. This feature could be used for some -PO files for standard libraries, in case we would like to spare -translating their strings over and over again. The `-x' option -could then exclude these strings from the generation. - -

    - - -

    The Format of GNU MO Files

    - -

    -The format of the generated MO files is best described by a picture, -which appears below. - -

    -

    -The first two words serve the identification of the file. The magic -number will always signal GNU MO files. The number is stored in the -byte order of the generating machine, so the magic number really is -two numbers: 0x950412de and 0xde120495. The second -word describes the current revision of the file format. For now the -revision is 0. This might change in future versions, and ensures -that the readers of MO files can distinguish new formats from old -ones, so that both can be handled correctly. The version is kept -separate from the magic number, instead of using different magic -numbers for different formats, mainly because `/etc/magic' is -not updated often. It might be better to have magic separated from -internal format version identification. - -

    -

    -Follow a number of pointers to later tables in the file, allowing -for the extension of the prefix part of MO files without having to -recompile programs reading them. This might become useful for later -inserting a few flag bits, indication about the charset used, new -tables, or other things. - -

    -

    -Then, at offset O and offset T in the picture, two tables -of string descriptors can be found. In both tables, each string -descriptor uses two 32 bits integers, one for the string length, -another for the offset of the string in the MO file, counting in bytes -from the start of the file. The first table contains descriptors -for the original strings, and is sorted so the original strings -are in increasing lexicographical order. The second table contains -descriptors for the translated strings, and is parallel to the first -table: to find the corresponding translation one has to access the -array slot in the second array with the same index. - -

    -

    -Having the original strings sorted enables the use of simple binary -search, for when the MO file does not contain an hashing table, or -for when it is not practical to use the hashing table provided in -the MO file. This also has another advantage, as the empty string -in a PO file GNU gettext is usually translated into -some system information attached to that particular MO file, and the -empty string necessarily becomes the first in both the original and -translated tables, making the system information very easy to find. - -

    -

    -The size S of the hash table can be zero. In this case, the -hash table itself is not contained in the MO file. Some people might -prefer this because a precomputed hashing table takes disk space, and -does not win that much speed. The hash table contains indices -to the sorted array of strings in the MO file. Conflict resolution is -done by double hashing. The precise hashing algorithm used is fairly -dependent of GNU gettext code, and is not documented here. - -

    -

    -As for the strings themselves, they follow the hash file, and each -is terminated with a NUL, and this NUL is not counted in -the length which appears in the string descriptor. The msgfmt -program has an option selecting the alignment for MO file strings. -With this option, each string is separately aligned so it starts at -an offset which is a multiple of the alignment value. On some RISC -machines, a correct alignment will speed things up. - -

    -

    -Nothing prevents an MO file from having embedded NULs in strings. -However, the program interface currently used already presumes -that strings are NUL terminated, so embedded NULs are -somewhat useless. But MO file format is general enough so other -interfaces would be later possible, if for example, we ever want to -implement wide characters right in MO files, where NUL bytes may -accidently appear. - -

    -

    -This particular issue has been strongly debated in the GNU -gettext development forum, and it is expectable that MO file -format will evolve or change over time. It is even possible that many -formats may later be supported concurrently. But surely, we got to -start somewhere, and the MO file format described here is a good start. -Nothing is cast in concrete, and the format may later evolve fairly -easily, so we should feel comfortable with the current approach. - -

    - -
    -        byte
    -             +------------------------------------------+
    -          0  | magic number = 0x950412de                |
    -             |                                          |
    -          4  | file format revision = 0                 |
    -             |                                          |
    -          8  | number of strings                        |  == N
    -             |                                          |
    -         12  | offset of table with original strings    |  == O
    -             |                                          |
    -         16  | offset of table with translation strings |  == T
    -             |                                          |
    -         20  | size of hashing table                    |  == S
    -             |                                          |
    -         24  | offset of hashing table                  |  == H
    -             |                                          |
    -             .                                          .
    -             .    (possibly more entries later)         .
    -             .                                          .
    -             |                                          |
    -          O  | length & offset 0th string  ----------------.
    -      O + 8  | length & offset 1st string  ------------------.
    -              ...                                    ...   | |
    -O + ((N-1)*8)| length & offset (N-1)th string           |  | |
    -             |                                          |  | |
    -          T  | length & offset 0th translation  ---------------.
    -      T + 8  | length & offset 1st translation  -----------------.
    -              ...                                    ...   | | | |
    -T + ((N-1)*8)| length & offset (N-1)th translation      |  | | | |
    -             |                                          |  | | | |
    -          H  | start hash table                         |  | | | |
    -              ...                                    ...   | | | |
    -  H + S * 4  | end hash table                           |  | | | |
    -             |                                          |  | | | |
    -             | NUL terminated 0th string  <----------------' | | |
    -             |                                          |    | | |
    -             | NUL terminated 1st string  <------------------' | |
    -             |                                          |      | |
    -              ...                                    ...       | |
    -             |                                          |      | |
    -             | NUL terminated 0th translation  <---------------' |
    -             |                                          |        |
    -             | NUL terminated 1st translation  <-----------------'
    -             |                                          |
    -              ...                                    ...
    -             |                                          |
    -             +------------------------------------------+
    -
    - - - -

    The User's View

    - -

    -When GNU gettext will truly have reached is goal, average users -should feel some kind of astonished pleasure, seeing the effect of -that strange kind of magic that just makes their own native language -appear everywhere on their screens. As for naive users, they would -ideally have no special pleasure about it, merely taking their own -language for granted, and becoming rather unhappy otherwise. - -

    -

    -So, let's try to describe here how we would like the magic to operate, -as we want the users' view to be the simplest, among all ways one -could look at GNU gettext. All other software engineers: -programmers, translators, maintainers, should work together in such a -way that the magic becomes possible. This is a long and progressive -undertaking, and information is available about the progress of the -GNU Translation Project. - -

    -

    -When a package is distributed, there are two kind of users: -installers who fetch the distribution, unpack it, configure -it, compile it and install it for themselves or others to use; and -end users that call programs of the package, once these have -been installed at their site. GNU gettext is offering magic -for both installers and end users. - -

    - - - -

    The Current `NLS' Matrix for GNU

    - -

    -Languages are not equally supported in all GNU packages. To know -if some GNU package uses GNU gettext, one may check -the distribution for the `NLS' information file, for some -`ll.po' files, often kept together into some `po/' -directory, or for an `intl/' directory. Internationalized -packages have usually many `ll.po' files, where ll -represents the language. section Magic for End Users for a complete description -of the format for ll. - -

    -

    -More generally, a matrix is available for showing the current state -of GNU internationalization, listing which packages are prepared -for multi-lingual messages, and which languages is supported by each. -Because this information changes often, this matrix is not kept within -this GNU gettext manual. This information is often found in -file `NLS' from various GNU distributions, but is also as old -as the distribution itself. A recent copy of this `NLS' file, -containing up-to-date information, should generally be found on most -GNU archive sites. - -

    - - -

    Magic for Installers

    - -

    -By default, packages fully using GNU gettext, internally, -are installed in such a way that they to allow translation of -messages. At configuration time, those packages should -automatically detect whether the underlying host system provides usable -catgets or gettext functions. If neither is present, -the GNU gettext library should be automatically prepared -and used. Installers may use special options at configuration -time for changing this behavior. The command `./configure ---with-gnu-gettext' bypasses system catgets or gettext to -use GNU gettext instead, while `./configure --disable-nls' -produces program totally unable to translate messages. - -

    -

    -Internationalized packages have usually many `ll.po' -files. Unless -translations are disabled, all those available are installed together -with the package. However, the environment variable LINGUAS -may be set, prior to configuration, to limit the installed set. -LINGUAS should then contain a space separated list of two-letter -codes, stating which languages are allowed. - -

    - - -

    Magic for End Users

    - -

    -We consider here those packages using GNU gettext internally, -and for which the installers did not disable translation at -configure time. Then, users only have to set the LANG -environment variable to the appropriate `ll' prior to -using the programs in the package. See section The Current `NLS' Matrix for GNU. For example, -let's presume a German site. At the shell prompt, users merely have to -execute `setenv LANG de' (in csh) or `export -LANG; LANG=de' (in sh). They could even do this from their -`.login' or `.profile' file. - -

    - - -

    The Programmer's View

    - -

    -One aim of the current message catalog implementation provided by -GNU gettext was to use the systems message catalog handling, if the -installer wishes to do so. So we perhaps should first take a look at -the solutions we know about. The people in the POSIX committee does not -manage to agree on one of the semi-official standards which we'll -describe below. In fact they couldn't agree on anything, so nothing -decide only to include an example of an interface. The major Unix vendors -are split in the usage of the two most important specifications: X/Opens -catgets vs. Uniforums gettext interface. We'll describe them both and -later explain our solution of this dilemma. - -

    - - - -

    About catgets

    - -

    -The catgets implementation is defined in the X/Open Portability -Guide, Volume 3, XSI Supplementary Definitions, Chapter 5. But the -process of creating this standard seemed to be too slow for some of -the Unix vendors so they created their implementations on preliminary -versions of the standard. Of course this leads again to problems while -writing platform independent programs: even the usage of catgets -does not guarantee a unique interface. - -

    -

    -Another, personal comment on this that only a bunch of committee members -could have made this interface. They never really tried to program -using this interface. It is a fast, memory-saving implementation, an -user can happily live with it. But programmers hate it (at least me and -some others do...) - -

    -

    -But we must not forget one point: after all the trouble with transfering -the rights on Unix(tm) they at last came to X/Open, the very same who -published this specifications. This leads me to making the prediction -that this interface will be in future Unix standards (e.g. Spec1170) and -therefore part of all Unix implementation (implementations, which are -allowed to wear this name). - -

    - - - -

    The Interface

    - -

    -The interface to the catgets implementation consists of three -functions which correspond to those used in file access: catopen -to open the catalog for using, catgets for accessing the message -tables, and catclose for closing after work is done. Prototypes -for the functions and the needed definitions are in the -<nl_types.h> header file. - -

    -

    -catopen is used like in this: - -

    - -
    -nl_catd catd = catopen ("catalog_name", 0);
    -
    - -

    -The function takes as the argument the name of the catalog. This usual -refers to the name of the program or the package. The second parameter -is not further specified in the standard. I don't even know whether it -is implemented consistently among various systems. So the common advice -is to use 0 as the value. The return value is a handle to the -message catalog, equivalent to handles to file returned by open. - -

    -

    -This handle is of course used in the catgets function which can -be used like this: - -

    - -
    -char *translation = catgets (catd, set_no, msg_id, "original string");
    -
    - -

    -The first parameter is this catalog descriptor. The second parameter -specifies the set of messages in this catalog, in which the message -described by msg_id is obtained. catgets therefore uses a -three-stage addressing: - -

    - -
    -catalog name => set number => message ID => translation
    -
    - -

    -The fourth argument is not used to address the translation. It is given -as a default value in case when one of the addressing stages fail. One -important thing to remember is that although the return type of catgets -is char * the resulting string must not be changed. It -should better const char *, but the standard is published in -1988, one year before ANSI C. - -

    -

    -The last of these function functions is used and behaves as expected: - -

    - -
    -catclose (catd);
    -
    - -

    -After this no catgets call using the descriptor is legal anymore. - -

    - - -

    Problems with the catgets Interface?!

    - -

    -Now that this descriptions seemed to be really easy where are the -problem we speak of. In fact the interface could be used in a -reasonable way, but constructing the message catalogs is a pain. The -reason for this lies in the third argument of catgets: the unique -message ID. This has to be a numeric value for all messages in a single -set. Perhaps you could imagine the problems keeping such list while -changing the source code. Add a new message here, remove one there. Of -course there have been developed a lot of tools helping to organize this -chaos but one as the other fails in one aspect or the other. We don't -want to say that the other approach has no problems but they are far -more easily to manage. - -

    - - -

    About gettext

    - -

    -The definition of the gettext interface comes from a Uniforum -proposal and it is followed by at least one major Unix vendor -(Sun) in its last developments. It is not specified in any official -standard, though. - -

    -

    -The main points about this solution is that it does not follow the -method of normal file handling (open-use-close) and that it does not -burden the programmer so many task, especially the unique key handling. -Of course here is also a unique key needed, but this key is the -message itself (how long or short it is). See section Comparing the Two Interfaces for a -more detailed comparison of the two methods. - -

    -

    -The following section contains a rather detailed description of the -interface. We make it that detailed because this is the interface -we chose for the GNU gettext Library. Programmers interested -in using this library will be interested in this description. - -

    - - - -

    The Interface

    - -

    -The minimal functionality an interface must have is a) to select a -domain the strings are coming from (a single domain for all programs is -not reasonable because its construction and maintenance is difficult, -perhaps impossible) and b) to access a string in a selected domain. - -

    -

    -This is principally the description of the gettext interface. It -has an global domain which unqualified usages reference. Of course this -domain is selectable by the user. - -

    - -
    -char *textdomain (const char *domain_name);
    -
    - -

    -This provides the possibility to change or query the current status of -the current global domain of the LC_MESSAGE category. The -argument is a null-terminated string, whose characters must be legal in -the use in filenames. If the domain_name argument is NULL, -the function return the current value. If no value has been set -before, the name of the default domain is returned: messages. -Please note that although the return value of textdomain is of -type char * no changing is allowed. It is also important to know -that no checks of the availability are made. If the name is not -available you will see this by the fact that no translations are provided. - -

    -

    -To use a domain set by textdomain the function - -

    - -
    -char *gettext (const char *msgid);
    -
    - -

    -is to be used. This is the simplest reasonable form one can imagine. -The translation of the string msgid is returned if it is available -in the current domain. If not available the argument itself is -returned. If the argument is NULL the result is undefined. - -

    -

    -One things which should come into mind is that no explicit dependency to -the used domain is given. The current value of the domain for the -LC_MESSAGES locale is used. If this changes between two -executions of the same gettext call in the program, both calls -reference a different message catalog. - -

    -

    -For the easiest case, which is normally used in internationalized GNU -packages, once at the beginning of execution a call to textdomain -is issued, setting the domain to a unique name, normally the package -name. In the following code all strings which have to be translated are -filtered through the gettext function. That's all, the package speaks -your language. - -

    - - -

    Solving Ambiguities

    - -

    -While this single name domain work good for most applications there -might be the need to get translations from more than one domain. Of -course one could switch between different domains with calls to -textdomain, but this is really not convenient nor is it fast. A -possible situation could be one case discussing while this writing: all -error messages of functions in the set of common used functions should -go into a separate domain error. By this mean we would only need -to translate them once. - -

    -

    -For this reasons there are two more functions to retrieve strings: - -

    - -
    -char *dgettext (const char *domain_name, const char *msgid);
    -char *dcgettext (const char *domain_name, const char *msgid,
    -                 int category);
    -
    - -

    -Both take an additional argument at the first place, which corresponds -to the argument of textdomain. The third argument of -dcgettext allows to use another locale but LC_MESSAGES. -But I really don't know where this can be useful. If the -domain_name is NULL or category has an value beside -the known ones, the result is undefined. It should also be noted that -this function is not part of the second known implementation of this -function family, the one found in Solaris. - -

    -

    -A second ambiguity can arise by the fact, that perhaps more than one -domain has the same name. This can be solved by specifying where the -needed message catalog files can be found. - -

    - -
    -char *bindtextdomain (const char *domain_name,
    -                      const char *dir_name);
    -
    - -

    -Calling this function binds the given domain to a file in the specified -directory (how this file is determined follows below). Esp a file in -the systems default place is not favored against the specified file -anymore (as it would be by solely using textdomain). A NULL -pointer for the dir_name parameter returns the binding associated -with domain_name. If domain_name itself is NULL -nothing happens and a NULL pointer is returned. Here again as -for all the other functions is true that none of the return value must -be changed! - -

    - - -

    Locating Message Catalog Files

    - -

    -Because many different languages for many different packages have to be -stored we need some way to add these information to file message catalog -files. The way usually used in Unix environments is have this encoding -in the file name. This is also done here. The directory name given in -bindtextdomains second argument (or the default directory), -followed by the value and name of the locale and the domain name are -concatenated: - -

    - -
    -dir_name/locale/LC_category/domain_name.mo
    -
    - -

    -The default value for dir_name is system specific. For the GNU -library it's: - -

    -/usr/local/share/locale
    -
    - -

    -locale is the value of the locale whose name is this -LC_category. For gettext and dgettext this -locale is always LC_MESSAGES. dcgettext specifies the -locale by the third argument.(2) (3) - -

    - - -

    Optimization of the *gettext functions

    - -

    -At this point of the discussion we should talk about an advantage of the -GNU gettext implementation. Some readers might have pointed out -that an internationalized program might have a poor performance if some -string has to be translated in an inner loop. While this is unavoidable -when the string varies from one run of the loop to the other it is -simply a waste of time when the string is always the same. Take the -following example: - -

    - -
    -{
    -  while (...)
    -    {
    -      puts (gettext ("Hello world"));
    -    }
    -}
    -
    - -

    -When the locale selection does not change between two runs the resulting -string is always the same. One way to use this is: - -

    - -
    -{
    -  str = gettext ("Hello world");
    -  while (...)
    -    {
    -      puts (str);
    -    }
    -}
    -
    - -

    -But this solution is not usable in all situation (e.g. when the locale -selection changes) nor is it good readable. - -

    -

    -The GNU C compiler, version 2.7 and above, provide another solution for -this. To describe this we show here some lines of the -`intl/libgettext.h' file. For an explanation of the expression -command block see section `Statements and Declarations in Expressions' in The GNU CC Manual. - -

    - -
    -#  if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
    -#   define	dcgettext(domainname, msgid, category)           \
    -  (__extension__                                                 \
    -   ({                                                            \
    -     char *result;                                               \
    -     if (__builtin_constant_p (msgid))                           \
    -       {                                                         \
    -         extern int _nl_msg_cat_cntr;                            \
    -         static char *__translation__;                           \
    -         static int __catalog_counter__;                         \
    -         if (! __translation__                                   \
    -             || __catalog_counter__ != _nl_msg_cat_cntr)         \
    -           {                                                     \
    -             __translation__ =                                   \
    -               dcgettext__ ((domainname), (msgid), (category));  \
    -             __catalog_counter__ = _nl_msg_cat_cntr;             \
    -           }                                                     \
    -         result = __translation__;                               \
    -       }                                                         \
    -     else                                                        \
    -       result = dcgettext__ ((domainname), (msgid), (category)); \
    -     result;                                                     \
    -    }))
    -#  endif
    -
    - -

    -The interesting thing here is the __builtin_constant_p predicate. -This is evaluated at compile time and so optimization can take place -immediately. Here two cases are distinguished: the argument to -gettext is not a constant value in which case simply the function -dcgettext__ is called, the real implementation of the -dcgettext function. - -

    -

    -If the string argument is constant we can reuse the once gained -translation when the locale selection has not changed. This is exactly -what is done here. The _nl_msg_cat_cntr variable is defined in -the `loadmsgcat.c' which is available in `libintl.a' and is -changed whenever a new message catalog is loaded. - -

    - - -

    Comparing the Two Interfaces

    - -

    -The following discussion is perhaps a little bit colored. As said -above we implemented GNU gettext following the Uniforum -proposal and this surely has its reasons. But it should show how we -came to this decision. - -

    -

    -First we take a look at the developing process. When we write an -application using NLS provided by gettext we proceed as always. -Only when we come to a string which might be seen by the users and thus -has to be translated we use gettext("...") instead of -"...". At the beginning of each source file (or in a central -header file) we define - -

    - -
    -#define gettext(String) (String)
    -
    - -

    -Even this definition can be avoided when the system supports the -gettext function in its C library. When we compile this code the -result is the same as if no NLS code is used. When you take a look at -the GNU gettext code you will see that we use _("...") -instead of gettext("..."). This reduces the number of -additional characters per translatable string to 3 (in words: -three). - -

    -

    -When now a production version of the program is needed we simply replace -the definition - -

    - -
    -#define _(String) (String)
    -
    - -

    -by - -

    - -
    -#include <libintl.h>
    -#define _(String) gettext (String)
    -
    - -

    -and include the header `libintl.h'. Additionally we run the -program `xgettext' on all source code file which contain -translatable strings and we are gone. We have a running program which -does not depend on translations to be available, but which can use any -that becomes available. - -

    -

    -The same procedure can be done for the gettext_noop invocations -(see section Special Cases of Translatable Strings). First you can define gettext_noop to a -no-op macro and later use the definition from `libintl.h'. Because -this name is not used in Suns implementation of `libintl.h', -you should consider the following code for your project: - -

    - -
    -#ifdef gettext_noop
    -# define N_(Str) gettext_noop (Str)
    -#else
    -# define N_(Str) (Str)
    -#endif
    -
    - -

    -N_ is a short form similar to _. The `Makefile' in -the `po/' directory of GNU gettext knows by default both of the -mentioned short forms so you are invited to follow this proposal for -your own ease. - -

    -

    -Now to catgets. The main problem is the work for the -programmer. Every time he comes to a translatable string he has to -define a number (or a symbolic constant) which has also be defined in -the message catalog file. He also has to take care for duplicate -entries, duplicate message IDs etc. If he wants to have the same -quality in the message catalog as the GNU gettext program -provides he also has to put the descriptive comments for the strings and -the location in all source code files in the message catalog. This is -nearly a Mission: Impossible. - -

    -

    -But there are also some points people might call advantages speaking for -catgets. If you have a single word in a string and this string -is used in different contexts it is likely that in one or the other -language the word has different translations. Example: - -

    - -
    -printf ("%s: %d", gettext ("number"), number_of_errors)
    -
    -printf ("you should see %d %s", number_count,
    -        number_count == 1 ? gettext ("number") : gettext ("numbers"))
    -
    - -

    -Here we have to translate two times the string "number". Even -if you do not speak a language beside English it might be possible to -recognize that the two words have a different meaning. In German the -first appearance has to be translated to "Anzahl" and the second -to "Zahl". - -

    -

    -Now you can say that this example is really esoteric. And you are -right! This is exactly how we felt about this problem and decide that -it does not weight that much. The solution for the above problem could -be very easy: - -

    - -
    -printf (gettext ("number: %d"), number_of_errors)
    -
    -printf (number_count == 1 ? gettext ("you should see %d number")
    -                          : gettext ("you should see %d numbers"),
    -        number_count)
    -
    - -

    -We believe that we can solve all conflicts with this method. If it is -difficult one can also consider changing one of the conflicting string a -little bit. But it is not impossible to overcome. - -

    -

    -Translator note: It is perhaps appropriate here to tell those English -speaking programmers that the plural form of a noun cannot be formed by -appending a single `s'. Most other languages use different methods. So -you should at least use the method given in the above example. - -

    -

    -But I have been told that some languages have even more complex rules. -A good approach might be to consider methods like the one used for -LC_TIME in the POSIX.2 standard. - -

    - - - -

    Using libintl.a in own programs

    - -

    -Starting with version 0.9.4 the library libintl.h should be more -or less self-contained. I.e. you can use it in your own programs. The -`Makefile' will put the header and the library in directories -selected using the $(prefix). - -

    -

    -One exception of the above is found on HP-UX systems. Here the C library -does not contain the alloca function (and the HP compiler does -not generate it inlined). But it is not intended to rewrite the whole -library just because of this dumb system. Instead include the -alloca function in all package you use the libintl.a in. - -

    - - - -

    Being a gettext grok

    - -

    -To fully exploit the functionality of the GNU gettext library it -is surely helpful to read the source code. But for those who don't want -to spend that much time in reading the (sometimes complicated) code here -is a list comments: - -

    - -
      -
    • Changing the language at runtime - -For interactive programs it might be useful to offer a selection of the -used language at runtime. To understand how to do this one need to know -how the used language is determined while executing the gettext -function. The method which is presented here only works correctly -with the GNU implementation of the gettext functions. It is not -possible with underlying catgets functions or gettext -functions from the systems C library. The exception is of course the -GNU C Library which uses the GNU gettext Library for message handling. - -In the function dcgettext at every call the current setting of -the highest priority environment variable is determined and used. -Highest priority means here the following list with decreasing -priority: - - -
        -
      1. LANGUAGE - -
      2. LC_ALL - -
      3. LC_xxx, according to selected locale - -
      4. LANG - -
      - -Afterwards the path is constructed using the found value and the -translation file is loaded if available. - -What is now when the value for, say, LANGUAGE changes. According -to the process explained above the new value of this variable is found -as soon as the dcgettext function is called. But this also means -the (perhaps) different message catalog file is loaded. In other -words: the used language is changed. - -But there is one little hook. The code for gcc-2.7.0 and up provides -some optimization. This optimization normally prevents the calling of -the dcgettext function as long as now new catalog is loaded. But -if dcgettext is not called we program also cannot find the -LANGUAGE variable be changed (see section Optimization of the *gettext functions). But the -solution is very easy. Include the following code in the language -switching function. - - -
      -  /* Change language.  */
      -  setenv ("LANGUAGE", "fr", 1);
      -
      -  /* Make change known.  */
      -  {
      -    extern int  _nl_msg_cat_cntr;
      -    ++_nl_msg_cat_cntr;
      -  }
      -
      - -The variable _nl_msg_cat_cntr is defined in `loadmsgcat.c'. - -
    - - - -

    Temporary Notes for the Programmers Chapter

    - - - -

    Temporary - Two Possible Implementations

    - -

    -There are two competing methods for language independent messages: -the X/Open catgets method, and the Uniforum gettext -method. The catgets method indexes messages by integers; the -gettext method indexes them by their English translations. -The catgets method has been around longer and is supported -by more vendors. The gettext method is supported by Sun, -and it has been heard that the COSE multi-vendor initiative is -supporting it. Neither method is a POSIX standard; the POSIX.1 -committee had a lot of disagreement in this area. - -

    -

    -Neither one is in the POSIX standard. There was much disagreement -in the POSIX.1 committee about using the gettext routines -vs. catgets (XPG). In the end the committee couldn't -agree on anything, so no messaging system was included as part -of the standard. I believe the informative annex of the standard -includes the XPG3 messaging interfaces, "...as an example of -a messaging system that has been implemented..." - -

    -

    -They were very careful not to say anywhere that you should use one -set of interfaces over the other. For more on this topic please -see the Programming for Internationalization FAQ. - -

    - - -

    Temporary - About catgets

    - -

    -There have been a few discussions of late on the use of -catgets as a base. I think it important to present both -sides of the argument and hence am opting to play devil's advocate -for a little bit. - -

    -

    -I'll not deny the fact that catgets could have been designed -a lot better. It currently has quite a number of limitations and -these have already been pointed out. - -

    -

    -However there is a great deal to be said for consistency and -standardization. A common recurring problem when writing Unix -software is the myriad portability problems across Unix platforms. -It seems as if every Unix vendor had a look at the operating system -and found parts they could improve upon. Undoubtedly, these -modifications are probably innovative and solve real problems. -However, software developers have a hard time keeping up with all -these changes across so many platforms. - -

    -

    -And this has prompted the Unix vendors to begin to standardize their -systems. Hence the impetus for Spec1170. Every major Unix vendor -has committed to supporting this standard and every Unix software -developer waits with glee the day they can write software to this -standard and simply recompile (without having to use autoconf) -across different platforms. - -

    -

    -As I understand it, Spec1170 is roughly based upon version 4 of the -X/Open Portability Guidelines (XPG4). Because catgets and -friends are defined in XPG4, I'm led to believe that catgets -is a part of Spec1170 and hence will become a standardized component -of all Unix systems. - -

    - - -

    Temporary - Why a single implementation

    - -

    -Now it seems kind of wasteful to me to have two different systems -installed for accessing message catalogs. If we do want to remedy -catgets deficiencies why don't we try to expand catgets -(in a compatible manner) rather than implement an entirely new system. -Otherwise, we'll end up with two message catalog access systems -installed with an operating system - one set of routines for GNU -software, and another set of routines (catgets) for all other software. -Bloated? - -

    -

    -Supposing another catalog access system is implemented. Which do -we recommend? At least for Linux, we need to attract as many -software developers as possible. Hence we need to make it as easy -for them to port their software as possible. Which means supporting -catgets. We will be implementing the glocale code -within our libc, but does this mean we also have to incorporate -another message catalog access scheme within our libc as well? -And what about people who are going to be using the glocale -+ non-catgets routines. When they port their software to -other platforms, they're now going to have to include the front-end -(glocale) code plus the back-end code (the non-catgets -access routines) with their software instead of just including the -glocale code with their software. - -

    -

    -Message catalog support is however only the tip of the iceberg. -What about the data for the other locale categories. They also have -a number of deficiencies. Are we going to abandon them as well and -develop another duplicate set of routines (should glocale -expand beyond message catalog support)? - -

    -

    -Like many parts of Unix that can be improved upon, we're stuck with balancing -compatibility with the past with useful improvements and innovations for -the future. - -

    - - -

    Temporary - Double layer solution

    - -

    -GNU locale implements a gettext-style interface on top of a -catgets-style interface. - -

    -

    -This is not needless complexity. It is absolutely vital, because -it enables gettext to run on top of catgets, which -enables Linux International to recommend users use it today. - -

    -

    -Rewriting gettext so that it could use either -catgets or some simpler mechanism would not break -anything, but would not reduce complexity either. It might be -worth doing, but it isn't urgent. - -

    -

    -In general, simplicity is not enough of a reason to rewrite a -program that works. Simplicity is just one desirable thing. -It is not overridingly important. - -

    - - -

    Temporary - Notes

    - -

    -X/Open agreed very late on the standard form so that many -implementations differ from the final form. Both of my system (old -Linux catgets and Ultrix-4) have a strange variation. - -

    -

    -OK. After incorporating the last changes I have to spend some time on -making the GNU/Linux libc gettext functions. So in future Solaris is -not the only system having gettext. - -

    - - -

    The Translator's View

    - - - -

    Introduction 0

    - -

    -GNU is going international! The GNU Translation Project is a way -to get maintainers, translators and users all together, so GNU will -gradually become able to speak many native languages. - -

    -

    -The GNU gettext tool set contains everything maintainers -need for internationalizing their packages for messages. It also -contains quite useful tools for helping translators at localizing -messages to their native language, once a package has already been -internationalized. - -

    -

    -To achieve the GNU Translation Project, we need many interested -people who like their own language and write it well, and who are also -able to synergize with other translators speaking the same language. -If you'd like to volunteer to work at translating messages, -please send mail to your translating team. - -

    -

    -Each team has its own mailing list, courtesy of Linux -International. You may reach your translating team at the address -`ll@li.org', replacing ll by the two-letter ISO 639 -code for your language. Language codes are not the same as -country codes given in ISO 3166. The following translating teams -exist: - -

    - -
    -

    -Chinese zh, Czech cs, Danish da, Dutch nl, -Esperanto eo, Finnish fi, French fr, Irish -ga, German de, Greek el, Italian it, -Japanese ja, Indonesian in, Norwegian no, Polish -pl, Portuguese pt, Russian ru, Spanish es, -Swedish sv and Turkish tr. -

    - -

    -For example, you may reach the Chinese translating team by writing to -`zh@li.org'. When you become a member of the translating team -for your own language, you may subscribe to its list. For example, -Swedish people can send a message to `sv-request@li.org', -having this message body: - -

    - -
    -subscribe
    -
    - -

    -Keep in mind that team members should be interested in working -at translations, or at solving translational difficulties, rather than -merely lurking around. If your team does not exist yet and you want to -start one, please write to `gnu-translation@prep.ai.mit.edu'; -you will then reach the GNU coordinator for all translator teams. - -

    -

    -A handful of GNU packages have already been adapted and provided -with message translations for several languages. Translation -teams have begun to organize, using these packages as a starting -point. But there are many more packages and many languages for -which we have no volunteer translators. If you would like to -volunteer to work at translating messages, please send mail to -`gnu-translation@prep.ai.mit.edu' indicating what language(s) -you can work on. - -

    - - -

    Introduction 1

    - -

    -This is now official, GNU is going international! Here is the -announcement submitted for the January 1995 GNU Bulletin: - -

    - -
    -

    -A handful of GNU packages have already been adapted and provided -with message translations for several languages. Translation -teams have begun to organize, using these packages as a starting -point. But there are many more packages and many languages -for which we have no volunteer translators. If you'd like to -volunteer to work at translating messages, please send mail to -`gnu-translation@prep.ai.mit.edu' indicating what language(s) -you can work on. -

    - -

    -This document should answer many questions for those who are curious -about the process or would like to contribute. Please at least skim -over it, hoping to cut down a little of the high volume of email -generated by this collective effort towards GNU internationalization. - -

    -

    -GNU programming is done in English, and currently, English is used -as the main communicating language between national communities -collaborating to the GNU project. This very document is written -in English. This will not change in the foreseeable future. - -

    -

    -However, there is a strong appetite from national communities for -having more software able to write using national language and habits, -and there is an on-going effort to modify GNU software in such a way -that it becomes able to do so. The experiments driven so far raised -an enthusiastic response from pretesters, so we believe that GNU -internationalization is dedicated to succeed. - -

    -

    -For suggestion clarifications, additions or corrections to this -document, please email to `gnu-translation@prep.ai.mit.edu'. - -

    - - -

    Discussions

    - -

    -Facing this internationalization effort, a few users expressed their -concerns. Some of these doubts are presented and discussed, here. - -

    - -
      -
    • Smaller groups - -Some languages are not spoken by a very large number of people, -so people speaking them sometimes consider that there may not be -all that much demand such versions of GNU packages. Moreover, many -people being into computers, in some countries, generally seem -to prefer English versions of their software. - -On the other end, people might enjoy their own language a lot, and -be very motivated at providing to themselves the pleasure of having -their beloved GNU software speaking their mother tongue. They do -themselves a personal favor, and do not pay that much attention to -the number of people beneficiating of their work. - -
    • Misinterpretation - -Other users are shy to push forward their own language, seeing in this -some kind of misplaced propaganda. Someone thought there must be some -users of the language over the networks pestering other people with it. - -But any spoken language is worth localization, because there are -people behind the language for whom the language is important and -dear to their hearts. - -
    • Odd translations - -The biggest problem is to find the right translations so that -everybody can understand the messages. Translations are usually a -little odd. Some people get used to English, to the extent they may -find translations into their own language "rather pushy, obnoxious -and sometimes even hilarious." As a French speaking man, I have -the experience of those instruction manuals for goods, so poorly -translated in French in Korea or Taiwan... - -The fact is that we sometimes have to create a kind of national -computer culture, and this is not easy without the collaboration of -many people liking their mother tongue. This is why translations are -better achieved by people knowing and loving their own language, and -ready to work together at improving the results they obtain. - -
    • Dependencies over the GPL - -Some people wonder if using GNU gettext necessarily brings their package -under the protective wing of the GNU General Public License, when they -do not want to make their program free, or want other kinds of freedom. -The simplest answer is yes. - -The mere marking of localizable strings in a package, or conditional -inclusion of a few lines for initialization, is not really including -GPL'ed code. However, the localization routines themselves are under -the GPL and would bring the remainder of the package under the GPL -if they were distributed with it. So, I presume that, for those -for which this is a problem, it could be circumvented by letting to -the end installers the burden of assembling a package prepared for -localization, but not providing the localization routines themselves. - -
    - - - -

    Organization

    - -

    -On a larger scale, the true solution would be to organize some kind of -fairly precise set up in which volunteers could participate. I gave -some thought to this idea lately, and realize there will be some -touchy points. I thought of writing to Richard Stallman to launch -such a project, but feel it might be good to shake out the ideas -between ourselves first. Most probably that Linux International has -some experience in the field already, or would like to orchestrate -the volunteer work, maybe. Food for thought, in any case! - -

    -

    -I guess we have to setup something early, somehow, that will help -many possible contributors of the same language to interlock and avoid -work duplication, and further be put in contact for solving together -problems particular to their tongue (in most languages, there are many -difficulties peculiar to translating technical English). My Swedish -contributor acknowledged these difficulties, and I'm well aware of -them for French. - -

    -

    -This is surely not a technical issue, but we should manage so the -effort of locale contributors be maximally useful, despite the national -team layer interface between contributors and maintainers. - -

    -

    -GNU needs some setup for coordinating language coordinators. -Localizing evolving GNU programs will surely become a permanent -and continuous activity in GNU, once started. The setup should be -minimally completed and tested before GNU gettext becomes an official -reality. The email address `gnu-translation@prep.ai.mit.edu' -has been setup for receiving offers from volunteers and general -email on these topics. This address reaches the GNU Translation -Project coordinator. - -

    - - - -

    Central Coordination

    - -

    -I also think GNU will need sooner than it thinks, that someone setup -a way to organize and coordinate these groups. Some kind of group -of groups. My opinion is that it would be good that GNU delegate -this task to a small group of collaborating volunteers, shortly. -Perhaps in `gnu.announce' a list of this national committee's -can be published. - -

    -

    -My role as coordinator would simply be to refer to Ulrich any German -speaking volunteer interested to localization of GNU programs, and -maybe helping national groups to initially organize, while maintaining -national registries for until national groups are ready to take over. -In fact, the coordinator should ease volunteers to get in contact with -one another for creating national teams, which should then select -one coordinator per language, or country (regionalized language). -If well done, the coordination should be useful without being an -overwhelming task, the time to put delegations in place. - -

    - - -

    National Teams

    - -

    -I suggest we look for volunteer coordinators/editors for individual -languages. These people will scan contributions of translation files -for various programs, for their own languages, and will ensure high -and uniform standards of diction. - -

    -

    -From my current experience with other people in these days, those who -provide localizations are very enthusiastic about the process, and are -more interested in the localization process than in the program they -localize, and want to do many programs, not just one. This seems -to confirm that having a coordinator/editor for each language is a -good idea. - -

    -

    -We need to choose someone who is good at writing clear and concise -prose in the language in question. That is hard--we can't check -it ourselves. So we need to ask a few people to judge each others' -writing and select the one who is best. - -

    -

    -I announce my prerelease to a few dozen people, and you would not -believe all the discussions it generated already. I shudder to think -what will happen when this will be launched, for true, officially, -world wide. Who am I to arbitrate between two Czekolsovak users -contradicting each other, for example? - -

    -

    -I assume that your German is not much better than my French so that -I would not be able to judge about these formulations. What I would -suggest is that for each language there is a group for people who -maintain the PO files and judge about changes. I suspect there will -be cultural differences between how such groups of people will behave. -Some will have relaxed ways, reach consensus easily, and have anyone -of the group relate to the maintainers, while others will fight to -death, organize heavy administrations up to national standards, and -use strict channels. - -

    -

    -The German team is putting out a good example. Right now, they are -maybe half a dozen people revising translations of each other and -discussing the linguistic issues. I do not even have all the names. -Ulrich Drepper is taking care of coordinating the German team. -He subscribed to all my pretest lists, so I do not even have to warn -him specifically of incoming releases. - -

    -

    -I'm sure, that is a good idea to get teams for each language working -on translations. That will make the translations better and more -consistent. - -

    - - - -

    Sub-Cultures

    - -

    -Taking French for example, there are a few sub-cultures around -computers which developed diverging vocabularies. Picking volunteers -here and there without addressing this problem in an organized way, -soon in the project, might produce a distasteful mix of GNU programs, -and possibly trigger endless quarrels among those who really care. - -

    -

    -Keeping some kind of unity in the way French localization of GNU -programs is achieved is a difficult (and delicate) job. Knowing the -latin character of French people (:-), if we take this the wrong -way, we could end up nowhere, or spoil a lot of energies. Maybe we -should begin to address this problem seriously before GNU -gettext become officially published. And I suspect that this -means soon! - -

    - - -

    Organizational Ideas

    - -

    -I expect the next big changes after the official release. Please note -that I use the German translation of the short GPL message. We need -to set a few good examples before the localization goes out for true -in GNU. Here are a few points to discuss: - -

    - -
      -
    • - -Each group should have one FTP server (at least one master). - -
    • - -The files on the server should reflect the latest version (of -course!) and it should also contain a RCS directory with the -corresponding archives (I don't have this now). - -
    • - -There should also be a ChangeLog file (this is more useful than the -RCS archive but can be generated automatically from the later by -Emacs). - -
    • - -A core group should judge about questionable changes (for now -this group consists solely by me but I ask some others occasionally; -this also seems to work). - -
    - - - -

    Mailing Lists

    - -

    -If we get any inquiries about GNU gettext, send them on to: - -

    - -
    -`gnu-translation@prep.ai.mit.edu'
    -
    - -

    -The `*-pretest' lists are quite useful to me, maybe the idea could -be generalized to all GNU packages. But each maintainer his/her way! - -

    -

    -, we have a mechanism in place here at -`gnu.ai.mit.edu' to track teams, support mailing lists for -them and log members. We have a slight preference that you use it. -If this is OK with you, I can get you clued in. - -

    -

    -Things are changing! A few years ago, when Daniel Fekete and I -asked for a mailing list for GNU localization, nested at the FSF, we -were politely invited to organize it anywhere else, and so did we. -For communicating with my pretesters, I later made a handful of -mailing lists located at iro.umontreal.ca and administrated by -majordomo. These lists have been very dependable -so far... - -

    -

    -I suspect that the German team will organize itself a mailing list -located in Germany, and so forth for other countries. But before they -organize for true, it could surely be useful to offer mailing lists -located at the FSF to each national team. So yes, please explain me -how I should proceed to create and handle them. - -

    -

    -We should create temporary mailing lists, one per country, to help -people organize. Temporary, because once regrouped and structured, it -would be fair the volunteers from country bring back their list -in there and manage it as they want. My feeling is that, in the long -run, each team should run its own list, from within their country. -There also should be some central list to which all teams could -subscribe as they see fit, as long as each team is represented in it. - -

    - - -

    Information Flow

    - -

    -There will surely be some discussion about this messages after the -packages are finally released. If people now send you some proposals -for better messages, how do you proceed? Jim, please note that -right now, as I put forward nearly a dozen of localizable programs, I -receive both the translations and the coordination concerns about them. - -

    -

    -If I put one of my things to pretest, Ulrich receives the announcement -and passes it on to the German team, who make last minute revisions. -Then he submits the translation files to me as the maintainer. -For GNU packages I do not maintain, I would not even hear about it. -This scheme could be made to work GNU-wide, I think. For security -reasons, maybe Ulrich (national coordinators, in fact) should update -central registry kept by GNU (Jim, me, or Len's recruits) once in -a while. - -

    -

    -In December/January, I was aggressively ready to internationalize -all of GNU, giving myself the duty of one small GNU package per week -or so, taking many weeks or months for bigger packages. But it does -not work this way. I first did all the things I'm responsible for. -I've nothing against some missionary work on other maintainers, but -I'm also loosing a lot of energy over it--same debates over again. - -

    -

    -And when the first localized packages are released we'll get a lot of -responses about ugly translations :-). Surely, and we need to have -beforehand a fairly good idea about how to handle the information -flow between the national teams and the package maintainers. - -

    -

    -Please start saving somewhere a quick history of each PO file. I know -for sure that the file format will change, allowing for comments. -It would be nice that each file has a kind of log, and references for -those who want to submit comments or gripes, or otherwise contribute. -I sent a proposal for a fast and flexible format, but it is not -receiving acceptance yet by the GNU deciders. I'll tell you when I -have more information about this. - -

    - - -

    The Maintainer's View

    - -

    -The maintainer of a package has many responsibilities. One of them -is ensuring that the package will install easily on many platforms, -and that the magic we described earlier (see section The User's View) will work -for installers and end users. - -

    -

    -Of course, there are many possible ways by which GNU gettext -might be integrated in a distribution, and this chapter does not cover -them in all generality. Instead, it details one possible approach -which is especially adequate for many GNU distributions, because -GNU gettext is purposely for helping the internationalization -of the whole GNU project. So, the maintainer's view presented here -presumes that the package already has a `configure.in' file and -uses Autoconf. - -

    -

    -Nevertheless, GNU gettext may surely be useful for non-GNU -packages, but the maintainers of such packages might have to show -imagination and initiative in organizing their distributions so -gettext work for them in all situations. There are surely -many, out there. - -

    -

    -Even if gettext methods are now stabilizing, slight adjustments -might be needed between successive gettext versions, so you -should ideally revise this chapter in subsequent releases, looking -for changes. - -

    - - - -

    Flat or Non-Flat Directory Structures

    - -

    -Some GNU packages are distributed as tar files which unpack -in a single directory, these are said to be flat distributions. -Other GNU packages have a one level hierarchy of subdirectories, using -for example a subdirectory named `doc/' for the Texinfo manual and -man pages, another called `lib/' for holding functions meant to -replace or complement C libraries, and a subdirectory `src/' for -holding the proper sources for the package. These other distributions -are said to be non-flat. - -

    -

    -For now, we cannot say much about flat distributions. A flat -directory structure has the disadvantage of increasing the difficulty -of updating to a new version of GNU gettext. Also, if you have -many PO files, this could somewhat pollute your single directory. -In the GNU gettext distribution, the `misc/' directory -contains a shell script named `combine-sh'. That script may -be used for combining all the C files of the `intl/' directory -into a pair of C files (one `.c' and one `.h'). Those two -generated files would fit more easily in a flat directory structure, -and you will then have to add these two files to your project. - -

    -

    -Maybe because GNU gettext itself has a non-flat structure, -we have more experience with this approach, and this is what will be -described in the remaining of this chapter. Some maintainers might -use this as an opportunity to unflatten their package structure. -Only later, once gained more experience adapting GNU gettext -to flat distributions, we might add some notes about how to proceed -in flat situations. - -

    - - -

    Prerequisite Works

    - -

    -There are some works which are required for using GNU gettext -in one of your package. These works have some kind of generality -that escape the point by point descriptions used in the remainder -of this chapter. So, we describe them here. - -

    - -
      -
    • - -Before attempting to use you should install some other packages first. -Ensure that recent versions of GNU m4, GNU Autoconf and GNU -gettext are already installed at your site, and if not, proceed -to do this first. If you got to install these things, beware that -GNU m4 must be fully installed before GNU Autoconf is even -configured. - -Those three packages are only needed to you, as a maintainer; the -installers of your own package and end users do not really need any -of GNU m4, GNU Autoconf or GNU gettext for successfully -installing and running your package, with messages properly translated. -But this is not completely true if you provide internationalized -shell scripts within your own package: GNU gettext shall -then be installed at the user site if the end users want to see the -translation of shell script messages. - -
    • - -Your package should use Autoconf and have a `configure.in' file. -If it does not, you have to learn how. The Autoconf documentation -is quite well written, it is a good idea that you print it and get -familiar with it. - -
    • - -Your C sources should have already been modified according to -instructions given earlier in this manual. See section Preparing Program Sources. - -
    • - -Your `po/' directory should receive all PO files submitted to you -by the translator teams, each having `ll.po' as a name. -This is not usually easy to get translation -work done before your package gets internationalized and available! -Since the cycle has to start somewhere, the easiest for the maintainer -is to start with absolutely no PO files, and wait until various -translator teams get interested in your package, and submit PO files. - -
    - -

    -It is worth adding here a few words about how the maintainer should -ideally behave with PO files submissions. As a maintainer, your -role is to authentify the origin of the submission as being the -representative of the appropriate GNU translating team (forward the -submission to `gnu-translation@prep.ai.mit.edu' in case of -doubt), to ensure that the PO file format is not severely broken and -does not prevent successful installation, and for the rest, to merely -to put these PO files in `po/' for distribution. - -

    -

    -As a maintainer, you do not have to take on your shoulders the -responsibility of checking if the translations are adequate or -complete, and should avoid diving into linguistic matters. Translation -teams drive themselves and are fully responsible of their linguistic -choices for GNU. Keep in mind that translator teams are not -driven by maintainers. You can help by carefully redirecting all -communications and reports from users about linguistic matters to the -appropriate translation team, or explain users how to reach or join -their team. The simplest might be to send them the `NLS' file. - -

    -

    -Maintainers should never ever apply PO file bug reports -themselves, short-cutting translation teams. If some translator has -difficulty to get some of her points through her team, it should not be -an issue for her to directly negotiate translations with maintainers. -Teams ought to settle their problems themselves, if any. If you, as -a maintainer, ever think there is a real problem with a team, please -never try to solve a team's problem on your own. - -

    - - -

    Invoking the gettextize Program

    - -

    -Some files are consistently and identically needed in every package -internationalized through GNU gettext. As a matter of -convenience, the gettextize program puts all these files right -in your package. This program has the following synopsis: - -

    - -
    -gettextize [ option... ] [ directory ]
    -
    - -

    -and accepts the following options: - -

    -
    - -
    `-f' -
    -
    `--force' -
    -Force replacement of files which already exist. - -
    `-h' -
    -
    `--help' -
    -Display this help and exit. - -
    `--version' -
    -Output version information and exit. - -
    - -

    -If directory is given, this is the top level directory of a -package to prepare for using GNU gettext. If not given, it -is assumed that the current directory is the top level directory of -such a package. - -

    -

    -The program gettextize provides the following files. However, -no existing file will be replaced unless the option --force -(-f) is specified. - -

    - -
      -
    1. - -The `NLS' file is copied in the main directory of your package, -the one being at the top level. This file gives the main indications -about how to install and use the Native Language Support features -of your program. You might elect to use a more recent copy of this -`NLS' file than the one provided through gettextize, if -you have one handy. You may also fetch a more recent copy of file -`NLS' from most GNU archive sites. - -
    2. - -A `po/' directory is created for eventually holding -all translation files, but initially only containing the file -`po/Makefile.in.in' from the GNU gettext distribution. -(beware the double `.in' in the file name). If the `po/' -directory already exists, it will be preserved along with the files -it contains, and only `Makefile.in.in' will be overwritten. - -
    3. - -A `intl/' directory is created and filled with most of the files -originally in the `intl/' directory of the GNU gettext -distribution. Also, if option --force (-f) is given, -the `intl/' directory is emptied first. - -
    - -

    -If your site support symbolic links, gettextize will not -actually copy the files into your package, but establish symbolic -links instead. This avoids duplicating the disk space needed in -all packages. Merely using the `-h' option while creating the -tar archive of your distribution will resolve each link by an -actual copy in the distribution archive. So, to insist, you really -should use `-h' option with tar within your dist -goal of your main `Makefile.in'. - -

    -

    -It is interesting to understand that most new files for supporting -GNU gettext facilities in one package go in `intl/' -and `po/' subdirectories. One distinction between these two -directories is that `intl/' is meant to be completely identical -in all packages using GNU gettext, while all newly created -files, which have to be different, go into `po/'. There is a -common `Makefile.in.in' in `po/', because the `po/' -directory needs its own `Makefile', and it has been designed so -it can be identical in all packages. - -

    - - -

    Files You Must Create or Alter

    - -

    -Besides files which are automatically added through gettextize, -there are many files needing revision for properly interacting with -GNU gettext. If you are closely following GNU standards for -Makefile engineering and auto-configuration, the adaptations should -be easier to achieve. Here is a point by point description of the -changes needed in each. - -

    -

    -So, here comes a list of files, each one followed by a description of -all alterations it needs. Many examples are taken out from the GNU -gettext 0.10 distribution itself. You may indeed -refer to the source code of the GNU gettext package, as it -is intended to be a good example and master implementation for using -its own functionality. - -

    - - - -

    `POTFILES' in `po/'

    - -

    -The `po/' directory should receive a file named -`POTFILES.in'. This file tells which files, among all program -sources, have marked strings needing translation. Here is an example -of such a file: - -

    - -
    -# List of source files containing translatable strings.
    -# Copyright (C) 1995 Free Software Foundation, Inc.
    -
    -# Common library files
    -lib/error.c
    -lib/getopt.c
    -lib/xmalloc.c
    -
    -# Package source files
    -src/gettextp.c
    -src/msgfmt.c
    -src/xgettext.c
    -
    - -

    -Dashed comments and white lines are ignored. All other lines -list those source files containing strings marked for translation -(see section How Marks Appears in Sources), in a notation relative to the top level -of your whole distribution, rather than the location of the -`POTFILES.in' file itself. - -

    - - -

    `configure.in' at top level

    - - -
      -
    1. Declare the package and version. - -This is done by a set of lines like these: - - -
      -PACKAGE=gettext
      -VERSION=0.10
      -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
      -AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
      -AC_SUBST(PACKAGE)
      -AC_SUBST(VERSION)
      -
      - -Of course, you replace `gettext' with the name of your package, -and `0.10' by its version numbers, exactly as they -should appear in the packaged tar file name of your distribution -(`gettext-0.10.tar.gz', here). - -
    2. Declare the available translations. - -This is done by defining ALL_LINGUAS to the white separated, -quoted list of available languages, in a single line, like this: - - -
      -ALL_LINGUAS="de fr"
      -
      - -This example means that German and French PO files are available, so -that these languages are currently supported by your package. If you -want to further restrict, at installation time, the set of installed -languages, this should not be done by modifying ALL_LINGUAS in -`configure.in', but rather by using the LINGUAS environment -variable (see section Magic for Installers). - -
    3. Check for internationalization support. - -Here is the main m4 macro for triggering internationalization -support. Just add this line to `configure.in': - - -
      -ud_GNU_GETTEXT
      -
      - -This call is purposely simple, even if it generates a lot of configure -time checking and actions. - -
    4. Obtain some `libintl.h' header file. - -Once you called ud_GNU_GETTEXT in `configure.in', use: - - -
      -AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
      -
      - -This will create one header file `libintl.h'. The reason for -this has to do with the fact that some systems, using the Uniforum -message handling functions, already have a file of this name. - -The AC_LINK_FILES call has not been integrated into the -ud_GNU_GETTEXT macro because there can be only one such call -in a `configure' file. If you already use it, you will have to -merge the needed AC_LINK_FILES within yours, by adding -the first argument at the end of the list of your first argument, -and adding the second argument at the end of the list of your second -argument. - -
    5. Have output files created. - -The AC_OUTPUT directive, at the end of your `configure.in' -file, needs to be modified in two ways: - - -
      -AC_OUTPUT([existing configuration files intl/Makefile po/Makefile.in],
      -[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
      -existing additional actions])
      -
      - -The modification to the first argument to AC_OUTPUT asks -for substitution in the `intl/' and `po/' directories. -Note the `.in' suffix used for `po/' only. This is because -the distributed file is really `po/Makefile.in.in'. - -The modification to the second argument ensures that `po/Makefile' -gets generated out of the `po/Makefile.in' just created, including -in it the `po/POTFILES' produced by ud_GNU_GETTEXT. -Two steps are needed because `po/POTFILES' can get lengthy in -some packages, too lengthy in fact for being able to merely use an -Autoconf substituted variable, as many seds cannot handle very -long lines. - -
    - - - -

    `aclocal.m4' at top level

    - -

    -If you do not have an `aclocal.m4' file in your distribution, -the simplest is taking a copy of `aclocal.m4' from -GNU gettext. But to be precise, you only need macros -ud_LC_MESSAGES, ud_WITH_NLS and ud_GNU_GETTEXT, -so you may use an editor and remove macros you do not need. - -

    -

    -If you already have an `aclocal.m4' file, then you will have -to merge the said macros into your `aclocal.m4'. Note that if -you are upgrading from a previous release of GNU gettext, you -should most probably replace the said macros, as they usually -change a little from one release of GNU gettext to the next. -Their contents may vary as we get more experience with strange systems -out there. - -

    -

    -These macros check for the internationalization support functions -and related informations. Hopefully, once stabilized, these macros -might be integrated in the standard Autoconf set, because this -piece of m4 code will be the same for all projects using GNU -gettext. - -

    - - -

    `acconfig.h' at top level

    - -

    -If you do not have an `acconfig.h' file in your distribution, -the simplest is use take a copy of `acconfig.h' from -GNU gettext. But to be precise, you only need the -lines and comments for ENABLE_NLS, HAVE_CATGETS, -HAVE_GETTEXT and HAVE_LC_MESSAGES, so you may use -an editor and remove everything else. If you already have an -`acconfig.h' file, then you should merge the said definitions -into your `acconfig.h'. - -

    - - -

    `Makefile.in' at top level

    - -

    -Here are a few modifications you need to make to your main, top-level -`Makefile.in' file. - -

    - -
      -
    1. - -Add the following lines near the beginning of your `Makefile.in', -so the `dist:' goal will work properly (as explained further down): - - -
      -PACKAGE = @PACKAGE@
      -VERSION = @VERSION@
      -
      - -
    2. - -Add file `NLS' to the DISTFILES definition, so the file gets -distributed. - -
    3. - -Wherever you process subdirectories in your `Makefile.in', be -sure you also process @INTLSUB@ and @POSUB@, which -are replaced respectively by `intl' and `po', or empty -when the configuration processes decides these directories should -not be processed. - -Here is an example of a canonical order of processing. In this -example, we also define SUBDIRS in Makefile.in for it -to be further used in the `dist:' goal. - - -
      -SUBDIRS = doc lib @INTLSUB@ src @POSUB@
      -
      - -that you will have to adapt to your own package. - -
    4. - -A delicate point is the `dist:' goal, as both -`intl/Makefile' and `po/Makefile' will later assume that the -proper directory has been set up from the main `Makefile'. Here is -an example at what the `dist:' goal might look like: - - -
      -distdir = $(PACKAGE)-$(VERSION)
      -dist: Makefile
      -	rm -fr $(distdir)
      -	mkdir $(distdir)
      -	chmod 777 $(distdir)
      -	for file in $(DISTFILES); do \
      -	  ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
      -	done
      -	for subdir in $(SUBDIRS); do \
      -	  mkdir $(distdir)/$$subdir || exit 1; \
      -	  chmod 777 $(distdir)/$$subdir; \
      -	  (cd $$subdir && $(MAKE) $@) || exit 1; \
      -	done
      -	tar chozf $(distdir).tar.gz $(distdir)
      -	rm -fr $(distdir)
      -
      - -
    - - - -

    `Makefile.in' in `src/'

    - -

    -Some of the modifications made in the main `Makefile.in' will -also be needed in the `Makefile.in' from your package sources, -which we assume here to be in the `src/' subdirectory. Here are -all the modifications needed in `src/Makefile.in': - -

    - -
      -
    1. - -In view of the `dist:' goal, you should have these lines near the -beginning of `src/Makefile.in': - - -
      -PACKAGE = @PACKAGE@
      -VERSION = @VERSION@
      -
      - -
    2. - -If not done already, you should guarantee that top_srcdir -gets defined. This will serve for cpp include files. Just add -the line: - - -
      -top_srcdir = @top_srcdir@
      -
      - -
    3. - -You might also want to define subdir as `src', later -allowing for almost uniform `dist:' goals in all your -`Makefile.in'. At list, the `dist:' goal below assume that -you used: - - -
      -subdir = src
      -
      - -
    4. - -You should ensure that the final linking will use @INTLLIBS@ as -a library. An easy way to achieve this is to manage that it gets into -LIBS, like this: - - -
      -LIBS = @INTLLIBS@ @LIBS@
      -
      - -In most GNU packages one will find a directory `lib/' in which a -library containing some helper functions will be build. (You need at -least the few functions which the GNU gettext Library itself -needs.) However some of the functions in the `lib/' also give -messages to the user which of course should be translated, too. Taking -care of this it is not enough to place the support library (say -`libsupport.a') just between the @INTLLIBS@ and -@LIBS@ in the above example. Instead one has to write this: - - -
      -LIBS = ../lib/libsupport.a @INTLLIBS@ ../lib/libsupport.a @LIBS@
      -
      - -
    5. - -You should also ensure that directory `intl/' will be searched for -C preprocessor include files in all circumstances. So, you have to -manage so both `-I../intl' and `-I$(top_srcdir)/intl' will -be given to the C compiler. - -
    6. - -Your `dist:' goal has to conform with others. Here is a -reasonable definition for it: - - -
      -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
      -dist: Makefile $(DISTFILES)
      -	for file in $(DISTFILES); do \
      -	  ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
      -	done
      -
      - -
    - - - -

    Concluding Remarks

    - -

    -We would like to conclude this GNU gettext manual by presenting -an history of the GNU Translation Project so far. We finally give -a few pointers for those who want to do further research or readings -about Native Language Support matters. - -

    - - - -

    History of GNU gettext

    - -

    -Internationalization concerns and algorithms have been informally -and casually discussed for years in GNU, sometimes around GNU -libc, maybe around the incoming Hurd, or otherwise -(nobody clearly remembers). And even then, when the work started for -real, this was somewhat independently of these previous discussions. - -

    -

    -This all began in July 1994, when Patrick D'Cruze had the idea and -initiative of internationalizing version 3.9.2 of GNU fileutils. -He then asked Jim Meyering, the maintainer, how to get those changes -folded into an official release. That first draft was full of -#ifdefs and somewhat disconcerting, and Jim wanted to find -nicer ways. Patrick and Jim shared some tries and experimentations -in this area. Then, feeling that this might eventually have a deeper -impact on GNU, Jim wanted to know what standards were, and contacted -Richard Stallman, who very quickly and verbally described an overall -design for what was meant to become glocale, at that time. - -

    -

    -Jim implemented glocale and got a lot of exhausting feedback -from Patrick and Richard, of course, but also from Mitchum DSouza -(who wrote a catgets-like package), Roland McGrath, maybe David -MacKenzie, Pinard, and Paul Eggert, all pushing and -pulling in various directions, not always compatible, to the extent -that after a couple of test releases, glocale was torn apart. - -

    -

    -While Jim took some distance and time and became dad for a second -time, Roland wanted to get GNU libc internationalized, and -got Ulrich Drepper involved in that project. Instead of starting -from glocale, Ulrich rewrote something from scratch, but -more conformant to the set of guidelines who emerged out of the -glocale effort. Then, Ulrich got people from the previous -forum to involve themselves into this new project, and the switch -from glocale to what was first named msgutils, renamed -nlsutils, and later gettext, became officially accepted -by Richard in May 1995 or so. - -

    -

    -Let's summarize by saying that Ulrich Drepper wrote GNU gettext -in April 1995. The first official release of the package, including -PO mode, occurred in July 1995, and was numbered 0.7. Other people -contributed to the effort by providing a discussion forum around -Ulrich, writing little pieces of code, or testing. These are quoted -in the THANKS file which comes with the GNU gettext -distribution. - -

    -

    -While this was being done, adapted half a dozen of -GNU packages to glocale first, then later to gettext, -putting them in pretest, so providing along the way an effective -user environment for fine tuning the evolving tools. He also took -the responsibility of organizing and coordinating the GNU Translation -Project. After nearly a year of informal exchanges between people from -many countries, translator teams started to exist in May 1995, through -the creation and support by Patrick D'Cruze of twenty unmoderated -mailing lists for that many native languages, and two moderated -lists: one for reaching all teams at once, the other for reaching -all maintainers of internationalized packages in GNU. - -

    -

    - also wrote PO mode in June 1995 with the collaboration -of Greg McGary, as a kind of contribution to Ulrich's package. -He also gave a hand with the GNU gettext Texinfo manual. - -

    - - -

    Related Readings

    - -

    -Eugene H. Dorr (`dorre@well.com') maintains an interesting -bibliography on internationalization matters, called -Internationalization Reference List, which is available as: - -

    -ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt
    -
    - -

    -Michael Gschwind (`mike@vlsivie.tuwien.ac.at') maintains a -Frequently Asked Questions (FAQ) list, entitled Programming for -Internationalisation. This FAQ discusses writing programs which -can handle different language conventions, character sets, etc.; -and is applicable to all character set encodings, with particular -emphasis on ISO 8859-1. It is regularly published in Usenet -groups `comp.unix.questions', `comp.std.internat', -`comp.software.international', `comp.lang.c', -`comp.windows.x', `comp.std.c', `comp.answers' -and `news.answers'. The home location of this document is: - -

    -ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming
    -
    - -

    -Patrick D'Cruze (`pdcruze@li.org') wrote a tutorial about NLS -matters, and Jochen Hein (`Hein@student.tu-clausthal.de') took -over the responsibility of maintaining it. It may be found as: - -

    -ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/...
    -     ...locale-tutorial-0.8.txt.gz
    -
    - -

    -This site is mirrored in: - -

    -ftp://ftp.ibp.fr/pub/linux/sunsite/
    -
    - -

    -A French version of the same tutorial should be findable at: - -

    -ftp://ftp.ibp.fr/pub/linux/french/docs/
    -
    - -

    -together with French translations of many Linux-related documents. - -

    -


    -This document was generated on 4 September 1998 using the -texi2html -translator version 1.51.

    - - diff --git a/docs/html/gettext/gettext_1.html b/docs/html/gettext/gettext_1.html new file mode 100644 index 0000000000..e6bb104861 --- /dev/null +++ b/docs/html/gettext/gettext_1.html @@ -0,0 +1,636 @@ + + + + +GNU gettext utilities - Introduction + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    Introduction

    + + +
    +

    +This manual is still in DRAFT state. Some sections are still +empty, or almost. We keep merging material from other sources +(essentially e-mail folders) while the proper integration of this +material is delayed. +

    + +

    +In this manual, we use he when speaking of the programmer or +maintainer, she when speaking of the translator, and they +when speaking of the installers or end users of the translated program. +This is only a convenience for clarifying the documentation. It is +absolutely not meant to imply that some roles are more appropriate +to males or females. Besides, as you might guess, GNU gettext +is meant to be useful for people using computers, whatever their sex, +race, religion or nationality! + +

    +

    +This chapter explains the goals sought in the creation +of GNU gettext and the free Translation Project. +Then, it explains a few broad concepts around +Native Language Support, and positions message translation with regard +to other aspects of national and cultural variance, as they apply to +to programs. It also surveys those files used to convey the +translations. It explains how the various tools interact in the +initial generation of these files, and later, how the maintenance +cycle should usually operate. + +

    +

    +Please send suggestions and corrections to: + +

    + +
    +Internet address:
    +    bug-gnu-utils@prep.ai.mit.edu
    +
    + +

    +Please include the manual's edition number and update date in your messages. + +

    + + + +

    The Purpose of GNU gettext

    + +

    +Usually, programs are written and documented in English, and use +English at execution time to interact with users. This is true +not only of GNU software, but also of a great deal of commercial +and free software. Using a common language is quite handy for +communication between developers, maintainers and users from all +countries. On the other hand, most people are less comfortable with +English than with their own native language, and would prefer to +use their mother tongue for day to day's work, as far as possible. +Many would simply love to see their computer screen showing +a lot less of English, and far more of their own language. + +

    +

    +However, to many people, this dream might appear so far fetched that +they may believe it is not even worth spending time thinking about +it. They have no confidence at all that the dream might ever +become true. Yet some have not lost hope, and have organized themselves. +The Translation Project is a formalization of this hope into a +workable structure, which has a good chance to get all of us nearer +the achievement of a truly multi-lingual set of programs. + +

    +

    +GNU gettext is an important step for the Translation Project, +as it is an asset on which we may build many other steps. This package +offers to programmers, translators and even users, a well integrated +set of tools and documentation. Specifically, the GNU gettext +utilities are a set of tools that provides a framework within which +other free packages may produce multi-lingual messages. These tools +include a set of conventions about how programs should be written to +support message catalogs, a directory and file naming organization for the +message catalogs themselves, a runtime library supporting the retrieval of +translated messages, and a few stand-alone programs to massage in various +ways the sets of translatable strings, or already translated strings. +A special mode for GNU Emacs also helps ease interested parties into +preparing these sets, or bringing them up to date. + +

    +

    +GNU gettext is designed to minimize the impact of +internationalization on program sources, keeping this impact as small +and hardly noticeable as possible. Internationalization has better +chances of succeeding if it is very light weighted, or at least, +appear to be so, when looking at program sources. + +

    +

    +The Translation Project also uses the GNU gettext +distribution as a vehicle for documenting its structure and methods. +This goes beyond the strict technicalities of documenting the GNU gettext +proper. By so doing, translators will find in a single place, as +far as possible, all they need to know for properly doing their +translating work. Also, this supplemental documentation might also +help programmers, and even curious users, in understanding how GNU +gettext is related to the remainder of the Translation +Project, and consequently, have a glimpse at the big picture. + +

    + + +

    I18n, L10n, and Such

    + +

    +Two long words appear all the time when we discuss support of native +language in programs, and these words have a precise meaning, worth +being explained here, once and for all in this document. The words are +internationalization and localization. Many people, +tired of writing these long words over and over again, took the +habit of writing i18n and l10n instead, quoting the first +and last letter of each word, and replacing the run of intermediate +letters by a number merely telling how many such letters there are. +But in this manual, in the sake of clarity, we will patiently write +the names in full, each time... + +

    +

    +By internationalization, one refers to the operation by which a +program, or a set of programs turned into a package, is made aware of and +able to support multiple languages. This is a generalization process, +by which the programs are untied from calling only English strings or +other English specific habits, and connected to generic ways of doing +the same, instead. Program developers may use various techniques to +internationalize their programs. Some of these have been standardized. +GNU gettext offers one of these standards. See section The Programmer's View. + +

    +

    +By localization, one means the operation by which, in a set +of programs already internationalized, one gives the program all +needed information so that it can adapt itself to handle its input +and output in a fashion which is correct for some native language and +cultural habits. This is a particularisation process, by which generic +methods already implemented in an internationalized program are used +in specific ways. The programming environment puts several functions +to the programmers disposal which allow this runtime configuration. +The formal description of specific set of cultural habits for some +country, together with all associated translations targeted to the +same native language, is called the locale for this language +or country. Users achieve localization of programs by setting proper +values to special environment variables, prior to executing those +programs, identifying which locale should be used. + +

    +

    +In fact, locale message support is only one component of the cultural +data that makes up a particular locale. There are a whole host of +routines and functions provided to aid programmers in developing +internationalized software and which allow them to access the data +stored in a particular locale. When someone presently refers to a +particular locale, they are obviously referring to the data stored +within that particular locale. Similarly, if a programmer is referring +to "accessing the locale routines", they are referring to the +complete suite of routines that access all of the locale's information. + +

    +

    +One uses the expression Native Language Support, or merely NLS, +for speaking of the overall activity or feature encompassing both +internationalization and localization, allowing for multi-lingual +interactions in a program. In a nutshell, one could say that +internationalization is the operation by which further localizations +are made possible. + +

    +

    +Also, very roughly said, when it comes to multi-lingual messages, +internationalization is usually taken care of by programmers, and +localization is usually taken care of by translators. + +

    + + +

    Aspects in Native Language Support

    + +

    +For a totally multi-lingual distribution, there are many things to +translate beyond output messages. + +

    + +
      +
    • + +As of today, GNU gettext offers a complete toolset for +translating messages output by C programs. Perl scripts and shell +scripts will also need to be translated. Even if there are today some hooks +by which this can be done, these hooks are not integrated as well as they +should be. + +
    • + +Some programs, like autoconf or bison, are able +to produce other programs (or scripts). Even if the generating +programs themselves are internationalized, the generated programs they +produce may need internationalization on their own, and this indirect +internationalization could be automated right from the generating +program. In fact, quite usually, generating and generated programs +could be internationalized independently, as the effort needed is +fairly orthogonal. + +
    • + +A few programs include textual tables which might need translation +themselves, independently of the strings contained in the program +itself. For example, RFC 1345 gives an English description for each +character which GNU recode is able to reconstruct at execution. +Since these descriptions are extracted from the RFC by mechanical means, +translating them properly would require a prior translation of the RFC +itself. + +
    • + +Almost all programs accept options, which are often worded out so to +be descriptive for the English readers; one might want to consider +offering translated versions for program options as well. + +
    • + +Many programs read, interpret, compile, or are somewhat driven by +input files which are texts containing keywords, identifiers, or +replies which are inherently translatable. For example, one may want +gcc to allow diacriticized characters in identifiers or use +translated keywords; `rm -i' might accept something else than +`y' or `n' for replies, etc. Even if the program will +eventually make most of its output in the foreign languages, one has +to decide whether the input syntax, option values, etc., are to be +localized or not. + +
    • + +The manual accompanying a package, as well as all documentation files +in the distribution, could surely be translated, too. Translating a +manual, with the intent of later keeping up with updates, is a major +undertaking in itself, generally. + +
    + +

    +As we already stressed, translation is only one aspect of locales. +Other internationalization aspects are not currently handled by GNU +gettext, but perhaps may be handled in future versions. There +are many attributes that are needed to define a country's cultural +conventions. These attributes include beside the country's native +language, the formatting of the date and time, the representation of +numbers, the symbols for currency, etc. These local rules are +termed the country's locale. The locale represents the knowledge +needed to support the country's native attributes. + +

    +

    +There are a few major areas which may vary between countries and +hence, define what a locale must describe. The following list helps +putting multi-lingual messages into the proper context of other tasks +related to locales, and also presents some other areas which GNU +gettext might eventually tackle, maybe, one of these days. + +

    +
    + +
    Characters and Codesets +
    +The codeset most commonly used through out the USA and most English +speaking parts of the world is the ASCII codeset. However, there are +many characters needed by various locales that are not found within +this codeset. The 8-bit ISO 8859-1 code set has most of the special +characters needed to handle the major European languages. However, in +many cases, the ISO 8859-1 font is not adequate. Hence each locale +will need to specify which codeset they need to use and will need +to have the appropriate character handling routines to cope with +the codeset. + +
    Currency +
    +The symbols used vary from country to country as does the position +used by the symbol. Software needs to be able to transparently +display currency figures in the native mode for each locale. + +
    Dates +
    +The format of date varies between locales. For example, Christmas day +in 1994 is written as 12/25/94 in the USA and as 25/12/94 in Australia. +Other countries might use ISO 8061 dates, etc. + +Time of the day may be noted as hh:mm, hh.mm, +or otherwise. Some locales require time to be specified in 24-hour +mode rather than as AM or PM. Further, the nature and yearly extent +of the Daylight Saving correction vary widely between countries. + +
    Numbers +
    +Numbers can be represented differently in different locales. +For example, the following numbers are all written correctly for +their respective locales: + + +
    +12,345.67       English
    +12.345,67       French
    +1,2345.67       Asia
    +
    + +Some programs could go further and use different unit systems, like +English units or Metric units, or even take into account variants +about how numbers are spelled in full. + +
    Messages +
    +The most obvious area is the language support within a locale. This is +where GNU gettext provides the means for developers and users to +easily change the language that the software uses to communicate to +the user. + +
    + +

    +In the near future we see no chance that components of locale outside of +message handling will be made available for use in other +packages. The reason for this is that most modern systems provide +a more or less reasonable support for at least some of the missing +components. Another point is that the GNU libc and Linux will get +a new and complete implementation of the whole locale functionality +which could be adopted by system lacking a reasonable locale support. + +

    + + +

    Files Conveying Translations

    + +

    +The letters PO in `.po' files means Portable Object, to +distinguish it from `.mo' files, where MO stands for Machine +Object. This paradigm, as well as the PO file format, is inspired +by the NLS standard developed by Uniforum, and implemented by Sun +in their Solaris system. + +

    +

    +PO files are meant to be read and edited by humans, and associate each +original, translatable string of a given package with its translation +in a particular target language. A single PO file is dedicated to +a single target language. If a package supports many languages, +there is one such PO file per language supported, and each package +has its own set of PO files. These PO files are best created by +the xgettext program, and later updated or refreshed through +the msgmerge program. Program xgettext extracts all +marked messages from a set of C files and initializes a PO file with +empty translations. Program msgmerge takes care of adjusting +PO files between releases of the corresponding sources, commenting +obsolete entries, initializing new ones, and updating all source +line references. Files ending with `.pot' are kind of base +translation files found in distributions, in PO file format, and +`.pox' files are often temporary PO files. + +

    +

    +MO files are meant to be read by programs, and are binary in nature. +A few systems already offer tools for creating and handling MO files +as part of the Native Language Support coming with the system, but the +format of these MO files is often different from system to system, +and non-portable. They do not necessary use `.mo' for file +extensions, but since system libraries are also used for accessing +these files, it works as long as the system is self-consistent about +it. If GNU gettext is able to interface with the tools already +provided with systems, it will consequently let these provided tools +take care of generating the MO files. Or else, if such tools are not +found or do not seem usable, GNU gettext will use its own ways +and its own format for MO files. Files ending with `.gmo' are +really MO files, when it is known that these files use the GNU format. + +

    + + +

    Overview of GNU gettext

    + +

    +The following diagram summarizes the relation between the files +handled by GNU gettext and the tools acting on these files. +It is followed by a somewhat detailed explanations, which you should +read while keeping an eye on the diagram. Having a clear understanding +of these interrelations would surely help programmers, translators +and maintainers. + +

    + +
    +Original C Sources ---> PO mode ---> Marked C Sources ---.
    +                                                         |
    +              .---------<--- GNU gettext Library         |
    +.--- make <---+                                          |
    +|             `---------<--------------------+-----------'
    +|                                            |
    +|   .-----<--- PACKAGE.pot <--- xgettext <---'   .---<--- PO Compendium
    +|   |                                            |             ^
    +|   |                                            `---.         |
    +|   `---.                                            +---> PO mode ---.
    +|       +----> msgmerge ------> LANG.pox --->--------'                |
    +|   .---'                                                             |
    +|   |                                                                 |
    +|   `-------------<---------------.                                   |
    +|                                 +--- LANG.po <--- New LANG.pox <----'
    +|   .--- LANG.gmo <--- msgfmt <---'
    +|   |
    +|   `---> install ---> /.../LANG/PACKAGE.mo ---.
    +|                                              +---> "Hello world!"
    +`-------> install ---> /.../bin/PROGRAM -------'
    +
    + +

    +The indication `PO mode' appears in two places in this picture, +and you may safely read it as merely meaning "hand editing", using +any editor of your choice, really. However, for those of you being +the lucky users of GNU Emacs, PO mode has been specifically created +for providing a cozy environment for editing or modifying PO files. +While editing a PO file, PO mode allows for the easy browsing of +auxiliary and compendium PO files, as well as for following references into +the set of C program sources from which PO files have been derived. +It has a few special features, among which are the interactive marking +of program strings as translatable, and the validatation of PO files +with easy repositioning to PO file lines showing errors. + +

    +

    +As a programmer, the first step to bringing GNU gettext +into your package is identifying, right in the C sources, those strings +which are meant to be translatable, and those which are untranslatable. +This tedious job can be done a little more comfortably using emacs PO +mode, but you can use any means familiar to you for modifying your +C sources. Beside this some other simple, standard changes are needed to +properly initialize the translation library. See section Preparing Program Sources, for +more information about all this. + +

    +

    +For newly written software the strings of course can and should be +marked while writing the it. The gettext approach makes this +very easy. Simply put the following lines at the beginning of each file +or in a central header file: + +

    + +
    +#define _(String) (String)
    +#define N_(String) (String)
    +#define textdomain(Domain)
    +#define bindtextdomain(Package, Directory)
    +
    + +

    +Doing this allows you to prepare the sources for internationalization. +Later when you feel ready for the step to use the gettext library +simply remove these definitions, include `libintl.h' and link +against `libintl.a'. That is all you have to change. + +

    +

    +Once the C sources have been modified, the xgettext program +is used to find and extract all translatable strings, and create an +initial PO file out of all these. This `package.pot' file +contains all original program strings. It has sets of pointers to +exactly where in C sources each string is used. All translations +are set to empty. The letter t in `.pot' marks this as +a Template PO file, not yet oriented towards any particular language. +See section Invoking the xgettext Program, for more details about how one calls the +xgettext program. If you are really lazy, you might +be interested at working a lot more right away, and preparing the +whole distribution setup (see section The Maintainer's View). By doing so, you +spare yourself typing the xgettext command, as make +should now generate the proper things automatically for you! + +

    +

    +The first time through, there is no `lang.po' yet, so the +msgmerge step may be skipped and replaced by a mere copy of +`package.pot' to `lang.pox', where lang +represents the target language. + +

    +

    +Then comes the initial translation of messages. Translation in +itself is a whole matter, still exclusively meant for humans, +and whose complexity far overwhelms the level of this manual. +Nevertheless, a few hints are given in some other chapter of this +manual (see section The Translator's View). You will also find there indications +about how to contact translating teams, or becoming part of them, +for sharing your translating concerns with others who target the same +native language. + +

    +

    +While adding the translated messages into the `lang.pox' +PO file, if you do not have GNU Emacs handy, you are on your own +for ensuring that your efforts fully respect the PO file format, and quoting +conventions (see section The Format of PO Files). This is surely not an impossible task, +as this is the way many people have handled PO files already for Uniforum or +Solaris. On the other hand, by using PO mode in GNU Emacs, most details +of PO file format are taken care of for you, but you have to acquire +some familiarity with PO mode itself. Besides main PO mode commands +(see section Main PO mode Commands), you should know how to move between entries +(see section Entry Positioning), and how to handle untranslated entries +(see section Untranslated Entries). + +

    +

    +If some common translations have already been saved into a compendium +PO file, translators may use PO mode for initializing untranslated +entries from the compendium, and also save selected translations into +the compendium, updating it (see section Using Translation Compendiums). Compendium files +are meant to be exchanged between members of a given translation team. + +

    +

    +Programs, or packages of programs, are dynamic in nature: users write +bug reports and suggestion for improvements, maintainers react by +modifying programs in various ways. The fact that a package has +already been internationalized should not make maintainers shy +of adding new strings, or modifying strings already translated. +They just do their job the best they can. For the Translation +Project to work smoothly, it is important that maintainers do not +carry translation concerns on their already loaded shoulders, and that +translators be kept as free as possible of programmatic concerns. + +

    +

    +The only concern maintainers should have is carefully marking new +strings as translatable, when they should be, and do not otherwise +worry about them being translated, as this will come in proper time. +Consequently, when programs and their strings are adjusted in various +ways by maintainers, and for matters usually unrelated to translation, +xgettext would construct `package.pot' files which are +evolving over time, so the translations carried by `lang.po' +are slowly fading out of date. + +

    +

    +It is important for translators (and even maintainers) to understand +that package translation is a continuous process in the lifetime of a +package, and not something which is done once and for all at the start. +After an initial burst of translation activity for a given package, +interventions are needed once in a while, because here and there, +translated entries become obsolete, and new untranslated entries +appear, needing translation. + +

    +

    +The msgmerge program has the purpose of refreshing an already +existing `lang.po' file, by comparing it with a newer +`package.pot' template file, extracted by xgettext +out of recent C sources. The refreshing operation adjusts all +references to C source locations for strings, since these strings +move as programs are modified. Also, msgmerge comments out as +obsolete, in `lang.pox', those already translated entries +which are no longer used in the program sources (see section Obsolete Entries). It finally discovers new strings and inserts them in +the resulting PO file as untranslated entries (see section Untranslated Entries). See section Invoking the msgmerge Program, for more information about what +msgmerge really does. + +

    +

    +Whatever route or means taken, the goal is to obtain an updated +`lang.pox' file offering translations for all strings. +When this is properly achieved, this file `lang.pox' may +take the place of the previous official `lang.po' file. + +

    +

    +The temporal mobility, or fluidity of PO files, is an integral part of +the translation game, and should be well understood, and accepted. +People resisting it will have a hard time participating in the +Translation Project, or will give a hard time to other participants! In +particular, maintainers should relax and include all available official +PO files in their distributions, even if these have not recently been +updated, without banging or otherwise trying to exert pressure on the +translator teams to get the job done. The pressure should rather come +from the community of users speaking a particular language, and +maintainers should consider themselves fairly relieved of any concern +about the adequacy of translation files. On the other hand, translators +should reasonably try updating the PO files they are responsible for, +while the package is undergoing pretest, prior to an official +distribution. + +

    +

    +Once the PO file is complete and dependable, the msgfmt program +is used for turning the PO file into a machine-oriented format, which +may yield efficient retrieval of translations by the programs of the +package, whenever needed at runtime (see section The Format of GNU MO Files). See section Invoking the msgfmt Program, for more information about all modalities of execution +for the msgfmt program. + +

    +

    +Finally, the modified and marked C sources are compiled and linked +with the GNU gettext library, usually through the operation of +make, given a suitable `Makefile' exists for the project, +and the resulting executable is installed somewhere users will find it. +The MO files themselves should also be properly installed. Given the +appropriate environment variables are set (see section Magic for End Users), the +program should localize itself automatically, whenever it executes. + +

    +

    +The remainder of this manual has the purpose of explaining in depth the various +steps outlined above. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_10.html b/docs/html/gettext/gettext_10.html new file mode 100644 index 0000000000..2b8d78b953 --- /dev/null +++ b/docs/html/gettext/gettext_10.html @@ -0,0 +1,656 @@ + + + + +GNU gettext utilities - The Maintainer's View + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    The Maintainer's View

    + +

    +The maintainer of a package has many responsibilities. One of them +is ensuring that the package will install easily on many platforms, +and that the magic we described earlier (see section The User's View) will work +for installers and end users. + +

    +

    +Of course, there are many possible ways by which GNU gettext +might be integrated in a distribution, and this chapter does not cover +them in all generality. Instead, it details one possible approach which +is especially adequate for many free software distributions following GNU +standards, or even better, Gnits standards, because GNU gettext +is purposely for helping the internationalization of the whole GNU +project, and as many other good free packages as possible. So, the +maintainer's view presented here presumes that the package already has +a `configure.in' file and uses GNU Autoconf. + +

    +

    +Nevertheless, GNU gettext may surely be useful for free packages +not following GNU standards and conventions, but the maintainers of such +packages might have to show imagination and initiative in organizing +their distributions so gettext work for them in all situations. +There are surely many, out there. + +

    +

    +Even if gettext methods are now stabilizing, slight adjustments +might be needed between successive gettext versions, so you +should ideally revise this chapter in subsequent releases, looking +for changes. + +

    + + + +

    Flat or Non-Flat Directory Structures

    + +

    +Some free software packages are distributed as tar files which unpack +in a single directory, these are said to be flat distributions. +Other free software packages have a one level hierarchy of subdirectories, using +for example a subdirectory named `doc/' for the Texinfo manual and +man pages, another called `lib/' for holding functions meant to +replace or complement C libraries, and a subdirectory `src/' for +holding the proper sources for the package. These other distributions +are said to be non-flat. + +

    +

    +For now, we cannot say much about flat distributions. A flat +directory structure has the disadvantage of increasing the difficulty +of updating to a new version of GNU gettext. Also, if you have +many PO files, this could somewhat pollute your single directory. +In the GNU gettext distribution, the `misc/' directory +contains a shell script named `combine-sh'. That script may +be used for combining all the C files of the `intl/' directory +into a pair of C files (one `.c' and one `.h'). Those two +generated files would fit more easily in a flat directory structure, +and you will then have to add these two files to your project. + +

    +

    +Maybe because GNU gettext itself has a non-flat structure, +we have more experience with this approach, and this is what will be +described in the remaining of this chapter. Some maintainers might +use this as an opportunity to unflatten their package structure. +Only later, once gained more experience adapting GNU gettext +to flat distributions, we might add some notes about how to proceed +in flat situations. + +

    + + +

    Prerequisite Works

    + +

    +There are some works which are required for using GNU gettext +in one of your package. These works have some kind of generality +that escape the point by point descriptions used in the remainder +of this chapter. So, we describe them here. + +

    + +
      +
    • + +Before attempting to use you should install some other packages first. +Ensure that recent versions of GNU m4, GNU Autoconf and GNU +gettext are already installed at your site, and if not, proceed +to do this first. If you got to install these things, beware that +GNU m4 must be fully installed before GNU Autoconf is even +configured. + +To further ease the task of a package maintainer the automake +package was designed and implemented. GNU gettext now uses this +tool and the `Makefile's in the `intl/' and `po/' +therefore know about all the goals necessary for using automake +and `libintl' in one project. + +Those four packages are only needed to you, as a maintainer; the +installers of your own package and end users do not really need any of +GNU m4, GNU Autoconf, GNU gettext, or GNU automake +for successfully installing and running your package, with messages +properly translated. But this is not completely true if you provide +internationalized shell scripts within your own package: GNU +gettext shall then be installed at the user site if the end users +want to see the translation of shell script messages. + +
    • + +Your package should use Autoconf and have a `configure.in' file. +If it does not, you have to learn how. The Autoconf documentation +is quite well written, it is a good idea that you print it and get +familiar with it. + +
    • + +Your C sources should have already been modified according to +instructions given earlier in this manual. See section Preparing Program Sources. + +
    • + +Your `po/' directory should receive all PO files submitted to you +by the translator teams, each having `ll.po' as a name. +This is not usually easy to get translation +work done before your package gets internationalized and available! +Since the cycle has to start somewhere, the easiest for the maintainer +is to start with absolutely no PO files, and wait until various +translator teams get interested in your package, and submit PO files. + +
    + +

    +It is worth adding here a few words about how the maintainer should +ideally behave with PO files submissions. As a maintainer, your role is +to authentify the origin of the submission as being the representative +of the appropriate translating teams of the Translation Project (forward +the submission to `translation@iro.umontreal.ca' in case of doubt), +to ensure that the PO file format is not severely broken and does not +prevent successful installation, and for the rest, to merely to put these +PO files in `po/' for distribution. + +

    +

    +As a maintainer, you do not have to take on your shoulders the +responsibility of checking if the translations are adequate or +complete, and should avoid diving into linguistic matters. Translation +teams drive themselves and are fully responsible of their linguistic +choices for the Translation Project. Keep in mind that translator teams are not +driven by maintainers. You can help by carefully redirecting all +communications and reports from users about linguistic matters to the +appropriate translation team, or explain users how to reach or join +their team. The simplest might be to send them the `ABOUT-NLS' file. + +

    +

    +Maintainers should never ever apply PO file bug reports +themselves, short-cutting translation teams. If some translator has +difficulty to get some of her points through her team, it should not be +an issue for her to directly negotiate translations with maintainers. +Teams ought to settle their problems themselves, if any. If you, as +a maintainer, ever think there is a real problem with a team, please +never try to solve a team's problem on your own. + +

    + + +

    Invoking the gettextize Program

    + +

    +Some files are consistently and identically needed in every package +internationalized through GNU gettext. As a matter of +convenience, the gettextize program puts all these files right +in your package. This program has the following synopsis: + +

    + +
    +gettextize [ option... ] [ directory ]
    +
    + +

    +and accepts the following options: + +

    +
    + +
    `-c' +
    +
    `--copy' +
    +Copy the needed files instead of making symbolic links. Using links +would allow the package to always use the latest gettext code +available on the system, but it might disturb some mechanism the +maintainer is used to apply to the sources. Because running +gettextize is easy there shouldn't be problems with using copies. + +
    `-f' +
    +
    `--force' +
    +Force replacement of files which already exist. + +
    `-h' +
    +
    `--help' +
    +Display this help and exit. + +
    `--version' +
    +Output version information and exit. + +
    + +

    +If directory is given, this is the top level directory of a +package to prepare for using GNU gettext. If not given, it +is assumed that the current directory is the top level directory of +such a package. + +

    +

    +The program gettextize provides the following files. However, +no existing file will be replaced unless the option --force +(-f) is specified. + +

    + +
      +
    1. + +The `ABOUT-NLS' file is copied in the main directory of your package, +the one being at the top level. This file gives the main indications +about how to install and use the Native Language Support features +of your program. You might elect to use a more recent copy of this +`ABOUT-NLS' file than the one provided through gettextize, +if you have one handy. You may also fetch a more recent copy of file +`ABOUT-NLS' from Translation Project sites, and from most GNU +archive sites. + +
    2. + +A `po/' directory is created for eventually holding +all translation files, but initially only containing the file +`po/Makefile.in.in' from the GNU gettext distribution. +(beware the double `.in' in the file name). If the `po/' +directory already exists, it will be preserved along with the files +it contains, and only `Makefile.in.in' will be overwritten. + +
    3. + +A `intl/' directory is created and filled with most of the files +originally in the `intl/' directory of the GNU gettext +distribution. Also, if option --force (-f) is given, +the `intl/' directory is emptied first. + +
    + +

    +If your site support symbolic links, gettextize will not +actually copy the files into your package, but establish symbolic +links instead. This avoids duplicating the disk space needed in +all packages. Merely using the `-h' option while creating the +tar archive of your distribution will resolve each link by an +actual copy in the distribution archive. So, to insist, you really +should use `-h' option with tar within your dist +goal of your main `Makefile.in'. + +

    +

    +It is interesting to understand that most new files for supporting +GNU gettext facilities in one package go in `intl/' +and `po/' subdirectories. One distinction between these two +directories is that `intl/' is meant to be completely identical +in all packages using GNU gettext, while all newly created +files, which have to be different, go into `po/'. There is a +common `Makefile.in.in' in `po/', because the `po/' +directory needs its own `Makefile', and it has been designed so +it can be identical in all packages. + +

    + + +

    Files You Must Create or Alter

    + +

    +Besides files which are automatically added through gettextize, +there are many files needing revision for properly interacting with +GNU gettext. If you are closely following GNU standards for +Makefile engineering and auto-configuration, the adaptations should +be easier to achieve. Here is a point by point description of the +changes needed in each. + +

    +

    +So, here comes a list of files, each one followed by a description of +all alterations it needs. Many examples are taken out from the GNU +gettext 0.10.35 distribution itself. You may indeed +refer to the source code of the GNU gettext package, as it +is intended to be a good example and master implementation for using +its own functionality. + +

    + + + +

    `POTFILES.in' in `po/'

    + +

    +The `po/' directory should receive a file named +`POTFILES.in'. This file tells which files, among all program +sources, have marked strings needing translation. Here is an example +of such a file: + +

    + +
    +# List of source files containing translatable strings.
    +# Copyright (C) 1995 Free Software Foundation, Inc.
    +
    +# Common library files
    +lib/error.c
    +lib/getopt.c
    +lib/xmalloc.c
    +
    +# Package source files
    +src/gettextp.c
    +src/msgfmt.c
    +src/xgettext.c
    +
    + +

    +Dashed comments and white lines are ignored. All other lines +list those source files containing strings marked for translation +(see section How Marks Appears in Sources), in a notation relative to the top level +of your whole distribution, rather than the location of the +`POTFILES.in' file itself. + +

    + + +

    `configure.in' at top level

    + + +
      +
    1. Declare the package and version. + +This is done by a set of lines like these: + + +
      +PACKAGE=gettext
      +VERSION=0.10.35
      +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
      +AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
      +AC_SUBST(PACKAGE)
      +AC_SUBST(VERSION)
      +
      + +Of course, you replace `gettext' with the name of your package, +and `0.10.35' by its version numbers, exactly as they +should appear in the packaged tar file name of your distribution +(`gettext-0.10.35.tar.gz', here). + +
    2. Declare the available translations. + +This is done by defining ALL_LINGUAS to the white separated, +quoted list of available languages, in a single line, like this: + + +
      +ALL_LINGUAS="de fr"
      +
      + +This example means that German and French PO files are available, so +that these languages are currently supported by your package. If you +want to further restrict, at installation time, the set of installed +languages, this should not be done by modifying ALL_LINGUAS in +`configure.in', but rather by using the LINGUAS environment +variable (see section Magic for Installers). + +
    3. Check for internationalization support. + +Here is the main m4 macro for triggering internationalization +support. Just add this line to `configure.in': + + +
      +AM_GNU_GETTEXT
      +
      + +This call is purposely simple, even if it generates a lot of configure +time checking and actions. + +
    4. Have output files created. + +The AC_OUTPUT directive, at the end of your `configure.in' +file, needs to be modified in two ways: + + +
      +AC_OUTPUT([existing configuration files intl/Makefile po/Makefile.in],
      +existing additional actions])
      +
      + +The modification to the first argument to AC_OUTPUT asks +for substitution in the `intl/' and `po/' directories. +Note the `.in' suffix used for `po/' only. This is because +the distributed file is really `po/Makefile.in.in'. + +
    + + + +

    `aclocal.m4' at top level

    + +

    +If you do not have an `aclocal.m4' file in your distribution, +the simplest is taking a copy of `aclocal.m4' from +GNU gettext. But to be precise, you only need macros +AM_LC_MESSAGES, AM_WITH_NLS and AM_GNU_GETTEXT, +and AM_PATH_PROG_WITH_TEST, which is called by AM_WITH_NLS, +so you may use an editor and remove macros you do not need. + +

    +

    +If you already have an `aclocal.m4' file, then you will have +to merge the said macros into your `aclocal.m4'. Note that if +you are upgrading from a previous release of GNU gettext, you +should most probably replace the said macros, as they usually +change a little from one release of GNU gettext to the next. +Their contents may vary as we get more experience with strange systems +out there. + +

    +

    +These macros check for the internationalization support functions +and related informations. Hopefully, once stabilized, these macros +might be integrated in the standard Autoconf set, because this +piece of m4 code will be the same for all projects using GNU +gettext. + +

    + + +

    `acconfig.h' at top level

    + +

    +If you do not have an `acconfig.h' file in your distribution, the +simplest is use take a copy of `acconfig.h' from GNU +gettext. But to be precise, you only need the lines and comments +for ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT and +HAVE_LC_MESSAGES, HAVE_STPCPY, PACKAGE and +VERSION, so you may use an editor and remove everything else. If +you already have an `acconfig.h' file, then you should merge the +said definitions into your `acconfig.h'. + +

    + + +

    `Makefile.in' at top level

    + +

    +Here are a few modifications you need to make to your main, top-level +`Makefile.in' file. + +

    + +
      +
    1. + +Add the following lines near the beginning of your `Makefile.in', +so the `dist:' goal will work properly (as explained further down): + + +
      +PACKAGE = @PACKAGE@
      +VERSION = @VERSION@
      +
      + +
    2. + +Add file `ABOUT-NLS' to the DISTFILES definition, so the file gets +distributed. + +
    3. + +Wherever you process subdirectories in your `Makefile.in', be sure +you also process dir subdirectories `intl' and `po'. Special +rules in the `Makefiles' take care for the case where no +internationalization is wanted. + +If you are using Makefiles, either generated by automake, or hand-written +so they carefully follow the GNU coding standards, the effected goals for +which the new subdirectories must be handled include `installdirs', +`install', `uninstall', `clean', `distclean'. + +Here is an example of a canonical order of processing. In this +example, we also define SUBDIRS in Makefile.in for it +to be further used in the `dist:' goal. + + +
      +SUBDIRS = doc lib @INTLSUB@ src @POSUB@
      +
      + +that you will have to adapt to your own package. + +
    4. + +A delicate point is the `dist:' goal, as both +`intl/Makefile' and `po/Makefile' will later assume that the +proper directory has been set up from the main `Makefile'. Here is +an example at what the `dist:' goal might look like: + + +
      +distdir = $(PACKAGE)-$(VERSION)
      +dist: Makefile
      +	rm -fr $(distdir)
      +	mkdir $(distdir)
      +	chmod 777 $(distdir)
      +	for file in $(DISTFILES); do \
      +	  ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
      +	done
      +	for subdir in $(SUBDIRS); do \
      +	  mkdir $(distdir)/$$subdir || exit 1; \
      +	  chmod 777 $(distdir)/$$subdir; \
      +	  (cd $$subdir && $(MAKE) $@) || exit 1; \
      +	done
      +	tar chozf $(distdir).tar.gz $(distdir)
      +	rm -fr $(distdir)
      +
      + +
    + + + +

    `Makefile.in' in `src/'

    + +

    +Some of the modifications made in the main `Makefile.in' will +also be needed in the `Makefile.in' from your package sources, +which we assume here to be in the `src/' subdirectory. Here are +all the modifications needed in `src/Makefile.in': + +

    + +
      +
    1. + +In view of the `dist:' goal, you should have these lines near the +beginning of `src/Makefile.in': + + +
      +PACKAGE = @PACKAGE@
      +VERSION = @VERSION@
      +
      + +
    2. + +If not done already, you should guarantee that top_srcdir +gets defined. This will serve for cpp include files. Just add +the line: + + +
      +top_srcdir = @top_srcdir@
      +
      + +
    3. + +You might also want to define subdir as `src', later +allowing for almost uniform `dist:' goals in all your +`Makefile.in'. At list, the `dist:' goal below assume that +you used: + + +
      +subdir = src
      +
      + +
    4. + +You should ensure that the final linking will use @INTLLIBS@ as +a library. An easy way to achieve this is to manage that it gets into +LIBS, like this: + + +
      +LIBS = @INTLLIBS@ @LIBS@
      +
      + +In most packages internationalized with GNU gettext, one will +find a directory `lib/' in which a library containing some helper +functions will be build. (You need at least the few functions which the +GNU gettext Library itself needs.) However some of the functions +in the `lib/' also give messages to the user which of course should be +translated, too. Taking care of this it is not enough to place the support +library (say `libsupport.a') just between the @INTLLIBS@ +and @LIBS@ in the above example. Instead one has to write this: + + +
      +LIBS = ../lib/libsupport.a @INTLLIBS@ ../lib/libsupport.a @LIBS@
      +
      + +
    5. + +You should also ensure that directory `intl/' will be searched for +C preprocessor include files in all circumstances. So, you have to +manage so both `-I../intl' and `-I$(top_srcdir)/intl' will +be given to the C compiler. + +
    6. + +Your `dist:' goal has to conform with others. Here is a +reasonable definition for it: + + +
      +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
      +dist: Makefile $(DISTFILES)
      +	for file in $(DISTFILES); do \
      +	  ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
      +	done
      +
      + +
    + +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_11.html b/docs/html/gettext/gettext_11.html new file mode 100644 index 0000000000..cf4f4208cd --- /dev/null +++ b/docs/html/gettext/gettext_11.html @@ -0,0 +1,164 @@ + + + + +GNU gettext utilities - Concluding Remarks + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    Concluding Remarks

    + +

    +We would like to conclude this GNU gettext manual by presenting +an history of the Translation Project so far. We finally give +a few pointers for those who want to do further research or readings +about Native Language Support matters. + +

    + + + +

    History of GNU gettext

    + +

    +Internationalization concerns and algorithms have been informally +and casually discussed for years in GNU, sometimes around GNU +libc, maybe around the incoming Hurd, or otherwise +(nobody clearly remembers). And even then, when the work started for +real, this was somewhat independently of these previous discussions. + +

    +

    +This all began in July 1994, when Patrick D'Cruze had the idea and +initiative of internationalizing version 3.9.2 of GNU fileutils. +He then asked Jim Meyering, the maintainer, how to get those changes +folded into an official release. That first draft was full of +#ifdefs and somewhat disconcerting, and Jim wanted to find +nicer ways. Patrick and Jim shared some tries and experimentations +in this area. Then, feeling that this might eventually have a deeper +impact on GNU, Jim wanted to know what standards were, and contacted +Richard Stallman, who very quickly and verbally described an overall +design for what was meant to become glocale, at that time. + +

    +

    +Jim implemented glocale and got a lot of exhausting feedback +from Patrick and Richard, of course, but also from Mitchum DSouza +(who wrote a catgets-like package), Roland McGrath, maybe David +MacKenzie, Fran@,{c}ois Pinard, and Paul Eggert, all pushing and +pulling in various directions, not always compatible, to the extent +that after a couple of test releases, glocale was torn apart. + +

    +

    +While Jim took some distance and time and became dad for a second +time, Roland wanted to get GNU libc internationalized, and +got Ulrich Drepper involved in that project. Instead of starting +from glocale, Ulrich rewrote something from scratch, but +more conformant to the set of guidelines who emerged out of the +glocale effort. Then, Ulrich got people from the previous +forum to involve themselves into this new project, and the switch +from glocale to what was first named msgutils, renamed +nlsutils, and later gettext, became officially accepted +by Richard in May 1995 or so. + +

    +

    +Let's summarize by saying that Ulrich Drepper wrote GNU gettext +in April 1995. The first official release of the package, including +PO mode, occurred in July 1995, and was numbered 0.7. Other people +contributed to the effort by providing a discussion forum around +Ulrich, writing little pieces of code, or testing. These are quoted +in the THANKS file which comes with the GNU gettext +distribution. + +

    +

    +While this was being done, Fran@,{c}ois adapted half a dozen of +GNU packages to glocale first, then later to gettext, +putting them in pretest, so providing along the way an effective +user environment for fine tuning the evolving tools. He also took +the responsibility of organizing and coordinating the Translation +Project. After nearly a year of informal exchanges between people from +many countries, translator teams started to exist in May 1995, through +the creation and support by Patrick D'Cruze of twenty unmoderated +mailing lists for that many native languages, and two moderated +lists: one for reaching all teams at once, the other for reaching +all willing maintainers of internationalized free software packages. + +

    +

    +Fran@,{c}ois also wrote PO mode in June 1995 with the collaboration +of Greg McGary, as a kind of contribution to Ulrich's package. +He also gave a hand with the GNU gettext Texinfo manual. + +

    + + +

    Related Readings

    + +

    +Eugene H. Dorr (`dorre@well.com') maintains an interesting +bibliography on internationalization matters, called +Internationalization Reference List, which is available as: + +

    +ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt
    +
    + +

    +Michael Gschwind (`mike@vlsivie.tuwien.ac.at') maintains a +Frequently Asked Questions (FAQ) list, entitled Programming for +Internationalisation. This FAQ discusses writing programs which +can handle different language conventions, character sets, etc.; +and is applicable to all character set encodings, with particular +emphasis on ISO 8859-1. It is regularly published in Usenet +groups `comp.unix.questions', `comp.std.internat', +`comp.software.international', `comp.lang.c', +`comp.windows.x', `comp.std.c', `comp.answers' +and `news.answers'. The home location of this document is: + +

    +ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming
    +
    + +

    +Patrick D'Cruze (`pdcruze@li.org') wrote a tutorial about NLS +matters, and Jochen Hein (`Hein@student.tu-clausthal.de') took +over the responsibility of maintaining it. It may be found as: + +

    +ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/...
    +     ...locale-tutorial-0.8.txt.gz
    +
    + +

    +This site is mirrored in: + +

    +ftp://ftp.ibp.fr/pub/linux/sunsite/
    +
    + +

    +A French version of the same tutorial should be findable at: + +

    +ftp://ftp.ibp.fr/pub/linux/french/docs/
    +
    + +

    +together with French translations of many Linux-related documents. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_12.html b/docs/html/gettext/gettext_12.html new file mode 100644 index 0000000000..5d35fcaf03 --- /dev/null +++ b/docs/html/gettext/gettext_12.html @@ -0,0 +1,448 @@ + + + + +GNU gettext utilities - Country Codes + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    Country Codes

    + +

    +The ISO 639 standard defines two character codes for many countries. +All abreviations for countries or languages used in the Translation +Project should come from this standard. + +

    +
    + +
    `aa' +
    +Afar. +
    `ab' +
    +Abkhazian. +
    `af' +
    +Afrikaans. +
    `am' +
    +Amharic. +
    `ar' +
    +Arabic. +
    `as' +
    +Assamese. +
    `ay' +
    +Aymara. +
    `az' +
    +Azerbaijani. +
    `ba' +
    +Bashkir. +
    `be' +
    +Byelorussian. +
    `bg' +
    +Bulgarian. +
    `bh' +
    +Bihari. +
    `bi' +
    +Bislama. +
    `bn' +
    +Bengali; Bangla. +
    `bo' +
    +Tibetan. +
    `br' +
    +Breton. +
    `ca' +
    +Catalan. +
    `co' +
    +Corsican. +
    `cs' +
    +Czech. +
    `cy' +
    +Welsh. +
    `da' +
    +Danish. +
    `de' +
    +German. +
    `dz' +
    +Bhutani. +
    `el' +
    +Greek. +
    `en' +
    +English. +
    `eo' +
    +Esperanto. +
    `es' +
    +Spanish. +
    `et' +
    +Estonian. +
    `eu' +
    +Basque. +
    `fa' +
    +Persian. +
    `fi' +
    +Finnish. +
    `fj' +
    +Fiji. +
    `fo' +
    +Faroese. +
    `fr' +
    +French. +
    `fy' +
    +Frisian. +
    `ga' +
    +Irish. +
    `gd' +
    +Scots Gaelic. +
    `gl' +
    +Galician. +
    `gn' +
    +Guarani. +
    `gu' +
    +Gujarati. +
    `ha' +
    +Hausa. +
    `he' +
    +Hebrew (formerly iw). +
    `hi' +
    +Hindi. +
    `hr' +
    +Croatian. +
    `hu' +
    +Hungarian. +
    `hy' +
    +Armenian. +
    `ia' +
    +Interlingua. +
    `id' +
    +Indonesian (formerly in). +
    `ie' +
    +Interlingue. +
    `ik' +
    +Inupiak. +
    `is' +
    +Icelandic. +
    `it' +
    +Italian. +
    `iu' +
    +Inuktitut. +
    `ja' +
    +Japanese. +
    `jw' +
    +Javanese. +
    `ka' +
    +Georgian. +
    `kk' +
    +Kazakh. +
    `kl' +
    +Greenlandic. +
    `km' +
    +Cambodian. +
    `kn' +
    +Kannada. +
    `ko' +
    +Korean. +
    `ks' +
    +Kashmiri. +
    `ku' +
    +Kurdish. +
    `ky' +
    +Kirghiz. +
    `la' +
    +Latin. +
    `ln' +
    +Lingala. +
    `lo' +
    +Laothian. +
    `lt' +
    +Lithuanian. +
    `lv' +
    +Latvian, Lettish. +
    `mg' +
    +Malagasy. +
    `mi' +
    +Maori. +
    `mk' +
    +Macedonian. +
    `ml' +
    +Malayalam. +
    `mn' +
    +Mongolian. +
    `mo' +
    +Moldavian. +
    `mr' +
    +Marathi. +
    `ms' +
    +Malay. +
    `mt' +
    +Maltese. +
    `my' +
    +Burmese. +
    `na' +
    +Nauru. +
    `ne' +
    +Nepali. +
    `nl' +
    +Dutch. +
    `no' +
    +Norwegian. +
    `oc' +
    +Occitan. +
    `om' +
    +(Afan) Oromo. +
    `or' +
    +Oriya. +
    `pa' +
    +Punjabi. +
    `pl' +
    +Polish. +
    `ps' +
    +Pashto, Pushto. +
    `pt' +
    +Portuguese. +
    `qu' +
    +Quechua. +
    `rm' +
    +Rhaeto-Romance. +
    `rn' +
    +Kirundi. +
    `ro' +
    +Romanian. +
    `ru' +
    +Russian. +
    `rw' +
    +Kinyarwanda. +
    `sa' +
    +Sanskrit. +
    `sd' +
    +Sindhi. +
    `sg' +
    +Sangro. +
    `sh' +
    +Serbo-Croatian. +
    `si' +
    +Sinhalese. +
    `sk' +
    +Slovak. +
    `sl' +
    +Slovenian. +
    `sm' +
    +Samoan. +
    `sn' +
    +Shona. +
    `so' +
    +Somali. +
    `sq' +
    +Albanian. +
    `sr' +
    +Serbian. +
    `ss' +
    +Siswati. +
    `st' +
    +Sesotho. +
    `su' +
    +Sundanese. +
    `sv' +
    +Swedish. +
    `sw' +
    +Swahili. +
    `ta' +
    +Tamil. +
    `te' +
    +Telugu. +
    `tg' +
    +Tajik. +
    `th' +
    +Thai. +
    `ti' +
    +Tigrinya. +
    `tk' +
    +Turkmen. +
    `tl' +
    +Tagalog. +
    `tn' +
    +Setswana. +
    `to' +
    +Tonga. +
    `tr' +
    +Turkish. +
    `ts' +
    +Tsonga. +
    `tt' +
    +Tatar. +
    `tw' +
    +Twi. +
    `ug' +
    +Uighur. +
    `uk' +
    +Ukrainian. +
    `ur' +
    +Urdu. +
    `uz' +
    +Uzbek. +
    `vi' +
    +Vietnamese. +
    `vo' +
    +Volapuk. +
    `wo' +
    +Wolof. +
    `xh' +
    +Xhosa. +
    `yi' +
    +Yiddish (formerly ji). +
    `yo' +
    +Yoruba. +
    `za' +
    +Zhuang. +
    `zh' +
    +Chinese. +
    `zu' +
    +Zulu. +
    + +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_2.html b/docs/html/gettext/gettext_2.html new file mode 100644 index 0000000000..14e1844a33 --- /dev/null +++ b/docs/html/gettext/gettext_2.html @@ -0,0 +1,667 @@ + + + + +GNU gettext utilities - PO Files and PO Mode Basics + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    PO Files and PO Mode Basics

    + +

    +The GNU gettext toolset helps programmers and translators +at producing, updating and using translation files, mainly those +PO files which are textual, editable files. This chapter stresses +the format of PO files, and contains a PO mode starter. PO mode +description is spread throughout this manual instead of being concentrated +in one place. Here we present only the basics of PO mode. + +

    + + + +

    Completing GNU gettext Installation

    + +

    +Once you have received, unpacked, configured and compiled the GNU +gettext distribution, the `make install' command puts in +place the programs xgettext, msgfmt, gettext, and +msgmerge, as well as their available message catalogs. To +top off a comfortable installation, you might also want to make the +PO mode available to your GNU Emacs users. + +

    +

    +During the installation of the PO mode, you might want modify your +file `.emacs', once and for all, so it contains a few lines looking +like: + +

    + +
    +(setq auto-mode-alist
    +      (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
    +(autoload 'po-mode "po-mode")
    +
    + +

    +Later, whenever you edit some `.po', `.pot' or `.pox' +file, or any file having the string `.po.' within its name, +Emacs loads `po-mode.elc' (or `po-mode.el') as needed, and +automatically activates PO mode commands for the associated buffer. +The string PO appears in the mode line for any buffer for +which PO mode is active. Many PO files may be active at once in a +single Emacs session. + +

    +

    +If you are using Emacs version 20 or better, and have already installed +the appropriate international fonts on your system, you may also manage +for the these fonts to be automatically loaded and used for displaying +the translations on your Emacs screen, whenever necessary. For this to +happen, you might want to add the lines: + +

    + +
    +(autoload 'po-find-file-coding-system "po-mode")
    +(modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
    +                            'po-find-file-coding-system)
    +
    + +

    +to your `.emacs' file. + +

    + + +

    The Format of PO Files

    + +

    +A PO file is made up of many entries, each entry holding the relation +between an original untranslated string and its corresponding +translation. All entries in a given PO file usually pertain +to a single project, and all translations are expressed in a single +target language. One PO file entry has the following schematic +structure: + +

    + +
    +white-space
    +#  translator-comments
    +#. automatic-comments
    +#: reference...
    +#, flag...
    +msgid untranslated-string
    +msgstr translated-string
    +
    + +

    +The general structure of a PO file should be well understood by +the translator. When using PO mode, very little has to be known +about the format details, as PO mode takes care of them for her. + +

    +

    +Entries begin with some optional white space. Usually, when generated +through GNU gettext tools, there is exactly one blank line +between entries. Then comments follow, on lines all starting with the +character #. There are two kinds of comments: those which have +some white space immediately following the #, which comments are +created and maintained exclusively by the translator, and those which +have some non-white character just after the #, which comments +are created and maintained automatically by GNU gettext tools. +All comments, of either kind, are optional. + +

    +

    +After white space and comments, entries show two strings, giving +first the untranslated string as it appears in the original program +sources, and then, the translation of this string. The original +string is introduced by the keyword msgid, and the translation, +by msgstr. The two strings, untranslated and translated, +are quoted in various ways in the PO file, using " +delimiters and \ escapes, but the translator does not really +have to pay attention to the precise quoting format, as PO mode fully +intend to take care of quoting for her. + +

    +

    +The msgid strings, as well as automatic comments, are produced +and managed by other GNU gettext tools, and PO mode does not +provide means for the translator to alter these. The most she can +do is merely deleting them, and only by deleting the whole entry. +On the other hand, the msgstr string, as well as translator +comments, are really meant for the translator, and PO mode gives her +the full control she needs. + +

    +

    +The comment lines beginning with #, are special because they are +not completely ignored by the programs as comments generally are. The +comma separated list of flags is used by the msgfmt +program to give the user some better disgnostic messages. Currently +there are two forms of flags defined: + +

    +
    + +
    fuzzy +
    +This flag can be generated by the msgmerge program or it can be +inserted by the translator herself. It shows that the msgstr +string might not be a correct translation (anymore). Only the translator +can judge if the translation requires further modification, or is +acceptable as is. Once satisfied with the translation, she then removes +this fuzzy attribute. The msgmerge programs inserts this +when it combined the msgid and msgstr entries after fuzzy +search only. See section Fuzzy Entries. + +
    c-format +
    +
    no-c-format +
    +These flags should not be added by a human. Instead only the +xgettext program adds them. In an automatized PO file processing +system as proposed here the user changes would be thrown away again as +soon as the xgettext program generates a new template file. + +In case the c-format flag is given for a string the msgfmt +does some more tests to check to validity of the translation. +See section Invoking the msgfmt Program. + +
    + +

    +It happens that some lines, usually whitespace or comments, follow the +very last entry of a PO file. Such lines are not part of any entry, +and PO mode is unable to take action on those lines. By using the +PO mode function M-x po-normalize, the translator may get +rid of those spurious lines. See section Normalizing Strings in Entries. + +

    +

    +The remainder of this section may be safely skipped by those using +PO mode, yet it may be interesting for everybody to have a better +idea of the precise format of a PO file. On the other hand, those +not having GNU Emacs handy should carefully continue reading on. + +

    +

    +Each of untranslated-string and translated-string respects +the C syntax for a character string, including the surrounding quotes +and imbedded backslashed escape sequences. When the time comes +to write multi-line strings, one should not use escaped newlines. +Instead, a closing quote should follow the last character on the +line to be continued, and an opening quote should resume the string +at the beginning of the following PO file line. For example: + +

    + +
    +msgid ""
    +"Here is an example of how one might continue a very long string\n"
    +"for the common case the string represents multi-line output.\n"
    +
    + +

    +In this example, the empty string is used on the first line, to +allow better alignment of the H from the word `Here' +over the f from the word `for'. In this example, the +msgid keyword is followed by three strings, which are meant +to be concatenated. Concatenating the empty string does not change +the resulting overall string, but it is a way for us to comply with +the necessity of msgid to be followed by a string on the same +line, while keeping the multi-line presentation left-justified, as +we find this to be a cleaner disposition. The empty string could have +been omitted, but only if the string starting with `Here' was +promoted on the first line, right after msgid.(1) It was not really necessary +either to switch between the two last quoted strings immediately after +the newline `\n', the switch could have occurred after any +other character, we just did it this way because it is neater. + +

    +

    +One should carefully distinguish between end of lines marked as +`\n' inside quotes, which are part of the represented +string, and end of lines in the PO file itself, outside string quotes, +which have no incidence on the represented string. + +

    +

    +Outside strings, white lines and comments may be used freely. +Comments start at the beginning of a line with `#' and extend +until the end of the PO file line. Comments written by translators +should have the initial `#' immediately followed by some white +space. If the `#' is not immediately followed by white space, +this comment is most likely generated and managed by specialized GNU +tools, and might disappear or be replaced unexpectedly when the PO +file is given to msgmerge. + +

    + + +

    Main PO mode Commands

    + +

    +After setting up Emacs with something similar to the lines in +section Completing GNU gettext Installation, PO mode is activated for a window when Emacs finds a +PO file in that window. This puts the window read-only and establishes a +po-mode-map, which is a genuine Emacs mode, in a way that is not derived +from text mode in any way. Functions found on po-mode-hook, +if any, will be executed. + +

    +

    +When PO mode is active in a window, the letters `PO' appear +in the mode line for that window. The mode line also displays how +many entries of each kind are held in the PO file. For example, +the string `132t+3f+10u+2o' would tell the translator that the +PO mode contains 132 translated entries (see section Translated Entries, +3 fuzzy entries (see section Fuzzy Entries), 10 untranslated entries +(see section Untranslated Entries) and 2 obsolete entries (see section Obsolete Entries). Zero-coefficients items are not shown. So, in this example, if +the fuzzy entries were unfuzzied, the untranslated entries were translated +and the obsolete entries were deleted, the mode line would merely display +`145t' for the counters. + +

    +

    +The main PO commands are those which do not fit into the other categories of +subsequent sections. These allow for quitting PO mode or for managing windows +in special ways. + +

    +
    + +
    U +
    +Undo last modification to the PO file. + +
    Q +
    +Quit processing and save the PO file. + +
    q +
    +Quit processing, possibly after confirmation. + +
    O +
    +Temporary leave the PO file window. + +
    ? +
    +
    h +
    +Show help about PO mode. + +
    = +
    +Give some PO file statistics. + +
    V +
    +Batch validate the format of the whole PO file. + +
    + +

    +The command U (po-undo) interfaces to the GNU Emacs +undo facility. See section `Undoing Changes' in The Emacs Editor. Each time U is typed, modifications which the translator +did to the PO file are undone a little more. For the purpose of +undoing, each PO mode command is atomic. This is especially true for +the RET command: the whole edition made by using a single +use of this command is undone at once, even if the edition itself +implied several actions. However, while in the editing window, one +can undo the edition work quite parsimoniously. + +

    +

    +The commands Q (po-quit) and q +(po-confirm-and-quit) are used when the translator is done with the +PO file. The former is a bit less verbose than the latter. If the file +has been modified, it is saved to disk first. In both cases, and prior to +all this, the commands check if some untranslated message remains in the +PO file and, if yes, the translator is asked if she really wants to leave +off working with this PO file. This is the preferred way of getting rid +of an Emacs PO file buffer. Merely killing it through the usual command +C-x k (kill-buffer) is not the tidiest way to proceed. + +

    +

    +The command O (po-other-window) is another, softer way, +to leave PO mode, temporarily. It just moves the cursor to some other +Emacs window, and pops one if necessary. For example, if the translator +just got PO mode to show some source context in some other, she might +discover some apparent bug in the program source that needs correction. +This command allows the translator to change sex, become a programmer, +and have the cursor right into the window containing the program she +(or rather he) wants to modify. By later getting the cursor back +in the PO file window, or by asking Emacs to edit this file once again, +PO mode is then recovered. + +

    +

    +The command h (po-help) displays a summary of all available PO +mode commands. The translator should then type any character to resume +normal PO mode operations. The command ? has the same effect +as h. + +

    +

    +The command = (po-statistics) computes the total number of +entries in the PO file, the ordinal of the current entry (counted from +1), the number of untranslated entries, the number of obsolete entries, +and displays all these numbers. + +

    +

    +The command V (po-validate) launches msgfmt in verbose +mode over the current PO file. This command first offers to save the +current PO file on disk. The msgfmt tool, from GNU gettext, +has the purpose of creating a MO file out of a PO file, and PO mode uses +the features of this program for checking the overall format of a PO file, +as well as all individual entries. + +

    +

    +The program msgfmt runs asynchronously with Emacs, so the +translator regains control immediately while her PO file is being studied. +Error output is collected in the GNU Emacs `*compilation*' buffer, +displayed in another window. The regular GNU Emacs command C-x` +(next-error), as well as other usual compile commands, allow the +translator to reposition quickly to the offending parts of the PO file. +Once the cursor is on the line in error, the translator may decide on +any PO mode action which would help correcting the error. + +

    + + +

    Entry Positioning

    + +

    +The cursor in a PO file window is almost always part of +an entry. The only exceptions are the special case when the cursor +is after the last entry in the file, or when the PO file is +empty. The entry where the cursor is found to be is said to be the +current entry. Many PO mode commands operate on the current entry, +so moving the cursor does more than allowing the translator to browse +the PO file, this also selects on which entry commands operate. + +

    +

    +Some PO mode commands alter the position of the cursor in a specialized +way. A few of those special purpose positioning are described here, +the others are described in following sections. + +

    +
    + +
    . +
    +Redisplay the current entry. + +
    n +
    +
    n +
    +Select the entry after the current one. + +
    p +
    +
    p +
    +Select the entry before the current one. + +
    < +
    +Select the first entry in the PO file. + +
    > +
    +Select the last entry in the PO file. + +
    m +
    +Record the location of the current entry for later use. + +
    l +
    +Return to a previously saved entry location. + +
    x +
    +Exchange the current entry location with the previously saved one. + +
    + +

    +Any GNU Emacs command able to reposition the cursor may be used +to select the current entry in PO mode, including commands which +move by characters, lines, paragraphs, screens or pages, and search +commands. However, there is a kind of standard way to display the +current entry in PO mode, which usual GNU Emacs commands moving +the cursor do not especially try to enforce. The command . +(po-current-entry) has the sole purpose of redisplaying the +current entry properly, after the current entry has been changed by +means external to PO mode, or the Emacs screen otherwise altered. + +

    +

    +It is yet to be decided if PO mode helps the translator, or otherwise +irritates her, by forcing a rigid window disposition while she +is doing her work. We originally had quite precise ideas about +how windows should behave, but on the other hand, anyone used to +GNU Emacs is often happy to keep full control. Maybe a fixed window +disposition might be offered as a PO mode option that the translator +might activate or deactivate at will, so it could be offered on an +experimental basis. If nobody feels a real need for using it, or +a compulsion for writing it, we should drop this whole idea. +The incentive for doing it should come from translators rather than +programmers, as opinions from an experienced translator are surely +more worth to me than opinions from programmers thinking about +how others should do translation. + +

    +

    +The commands n (po-next-entry) and p +(po-previous-entry) move the cursor the entry following, +or preceding, the current one. If n is given while the +cursor is on the last entry of the PO file, or if p +is given while the cursor is on the first entry, no move is done. + +

    +

    +The commands < (po-first-entry) and > +(po-last-entry) move the cursor to the first entry, or last +entry, of the PO file. When the cursor is located past the last +entry in a PO file, most PO mode commands will return an error saying +`After last entry'. Moreover, the commands < and > +have the special property of being able to work even when the cursor +is not into some PO file entry, and one may use them for nicely +correcting this situation. But even these commands will fail on a +truly empty PO file. There are development plans for the PO mode for it +to interactively fill an empty PO file from sources. See section Marking Translatable Strings. + +

    +

    +The translator may decide, before working at the translation of +a particular entry, that she needs to browse the remainder of the +PO file, maybe for finding the terminology or phraseology used +in related entries. She can of course use the standard Emacs idioms +for saving the current cursor location in some register, and use that +register for getting back, or else, use the location ring. + +

    +

    +PO mode offers another approach, by which cursor locations may be saved +onto a special stack. The command m (po-push-location) +merely adds the location of current entry to the stack, pushing +the already saved locations under the new one. The command +r (po-pop-location) consumes the top stack element and +reposition the cursor to the entry associated with that top element. +This position is then lost, for the next r will move the cursor +to the previously saved location, and so on until no locations remain +on the stack. + +

    +

    +If the translator wants the position to be kept on the location stack, +maybe for taking a look at the entry associated with the top +element, then go elsewhere with the intent of getting back later, she +ought to use m immediately after r. + +

    +

    +The command x (po-exchange-location) simultaneously +reposition the cursor to the entry associated with the top element of +the stack of saved locations, and replace that top element with the +location of the current entry before the move. Consequently, repeating +the x command toggles alternatively between two entries. +For achieving this, the translator will position the cursor on the +first entry, use m, then position to the second entry, and +merely use x for making the switch. + +

    + + +

    Normalizing Strings in Entries

    + +

    +There are many different ways for encoding a particular string into a +PO file entry, because there are so many different ways to split and +quote multi-line strings, and even, to represent special characters +by backslahsed escaped sequences. Some features of PO mode rely on +the ability for PO mode to scan an already existing PO file for a +particular string encoded into the msgid field of some entry. +Even if PO mode has internally all the built-in machinery for +implementing this recognition easily, doing it fast is technically +difficult. To facilitate a solution to this efficiency problem, +we decided on a canonical representation for strings. + +

    +

    +A conventional representation of strings in a PO file is currently +under discussion, and PO mode experiments with a canonical representation. +Having both xgettext and PO mode converging towards a uniform +way of representing equivalent strings would be useful, as the internal +normalization needed by PO mode could be automatically satisfied +when using xgettext from GNU gettext. An explicit +PO mode normalization should then be only necessary for PO files +imported from elsewhere, or for when the convention itself evolves. + +

    +

    +So, for achieving normalization of at least the strings of a given +PO file needing a canonical representation, the following PO mode +command is available: + +

    +
    + +
    M-x po-normalize +
    +Tidy the whole PO file by making entries more uniform. + +
    + +

    +The special command M-x po-normalize, which has no associate +keys, revises all entries, ensuring that strings of both original +and translated entries use uniform internal quoting in the PO file. +It also removes any crumb after the last entry. This command may be +useful for PO files freshly imported from elsewhere, or if we ever +improve on the canonical quoting format we use. This canonical format +is not only meant for getting cleaner PO files, but also for greatly +speeding up msgid string lookup for some other PO mode commands. + +

    +

    +M-x po-normalize presently makes three passes over the entries. +The first implements heuristics for converting PO files for GNU +gettext 0.6 and earlier, in which msgid and msgstr +fields were using K&R style C string syntax for multi-line strings. +These heuristics may fail for comments not related to obsolete +entries and ending with a backslash; they also depend on subsequent +passes for finalizing the proper commenting of continued lines for +obsolete entries. This first pass might disappear once all oldish PO +files would have been adjusted. The second and third pass normalize +all msgid and msgstr strings respectively. They also +clean out those trailing backslashes used by XView's msgfmt +for continued lines. + +

    +

    +Having such an explicit normalizing command allows for importing PO +files from other sources, but also eases the evolution of the current +convention, evolution driven mostly by aesthetic concerns, as of now. +It is easy to make suggested adjustments at a later time, as the +normalizing command and eventually, other GNU gettext tools +should greatly automate conformance. A description of the canonical +string format is given below, for the particular benefit of those not +having GNU Emacs handy, and who would nevertheless want to handcraft +their PO files in nice ways. + +

    +

    +Right now, in PO mode, strings are single line or multi-line. A string +goes multi-line if and only if it has embedded newlines, that +is, if it matches `[^\n]\n+[^\n]'. So, we would have: + +

    + +
    +msgstr "\n\nHello, world!\n\n\n"
    +
    + +

    +but, replacing the space by a newline, this becomes: + +

    + +
    +msgstr ""
    +"\n"
    +"\n"
    +"Hello,\n"
    +"world!\n"
    +"\n"
    +"\n"
    +
    + +

    +We are deliberately using a caricatural example, here, to make the +point clearer. Usually, multi-lines are not that bad looking. +It is probable that we will implement the following suggestion. +We might lump together all initial newlines into the empty string, +and also all newlines introducing empty lines (that is, for n +> 1, the n-1'th last newlines would go together on a separate +string), so making the previous example appear: + +

    + +
    +msgstr "\n\n"
    +"Hello,\n"
    +"world!\n"
    +"\n\n"
    +
    + +

    +There are a few yet undecided little points about string normalization, +to be documented in this manual, once these questions settle. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_3.html b/docs/html/gettext/gettext_3.html new file mode 100644 index 0000000000..482a9872f7 --- /dev/null +++ b/docs/html/gettext/gettext_3.html @@ -0,0 +1,606 @@ + + + + +GNU gettext utilities - Preparing Program Sources + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    Preparing Program Sources

    + +

    +For the programmer, changes to the C source code fall into three +categories. First, you have to make the localization functions +known to all modules needing message translation. Second, you should +properly trigger the operation of GNU gettext when the program +initializes, usually from the main function. Last, you should +identify and especially mark all constant strings in your program +needing translation. + +

    +

    +Presuming that your set of programs, or package, has been adjusted +so all needed GNU gettext files are available, and your +`Makefile' files are adjusted (see section The Maintainer's View), each C module +having translated C strings should contain the line: + +

    + +
    +#include <libintl.h>
    +
    + +

    +The remaining changes to your C sources are discussed in the further +sections of this chapter. + +

    + + + +

    Triggering gettext Operations

    + +

    +The initialization of locale data should be done with more or less +the same code in every program, as demonstrated below: + +

    + +
    +int
    +main (argc, argv)
    +     int argc;
    +     char argv;
    +{
    +  ...
    +  setlocale (LC_ALL, "");
    +  bindtextdomain (PACKAGE, LOCALEDIR);
    +  textdomain (PACKAGE);
    +  ...
    +}
    +
    + +

    +PACKAGE and LOCALEDIR should be provided either by +`config.h' or by the Makefile. For now consult the gettext +sources for more information. + +

    +

    +The use of LC_ALL might not be appropriate for you. +LC_ALL includes all locale categories and especially +LC_CTYPE. This later category is responsible for determining +character classes with the isalnum etc. functions from +`ctype.h' which could especially for programs, which process some +kind of input language, be wrong. For example this would mean that a +source code using the @,{c} (c-cedilla character) is runnable in +France but not in the U.S. + +

    +

    +Some systems also have problems with parsing number using the +scanf functions if an other but the LC_ALL locale is used. +The standards say that additional formats but the one known in the +"C" locale might be recognized. But some systems seem to reject +numbers in the "C" locale format. In some situation, it might +also be a problem with the notation itself which makes it impossible to +recognize whether the number is in the "C" locale or the local +format. This can happen if thousands separator characters are used. +Some locales define this character accordfing to the national +conventions to '.' which is the same character used in the +"C" locale to denote the decimal point. + +

    +

    +So it is sometimes necessary to replace the LC_ALL line in the +code above by a sequence of setlocale lines + +

    + +
    +{
    +  ...
    +  setlocale (LC_TIME, "");
    +  setlocale (LC_MESSAGES, "");
    +  ...
    +}
    +
    + +

    +or to switch for and back to the character class in question. On all +POSIX conformant systems the locale categories LC_CTYPE, +LC_COLLATE, LC_MONETARY, LC_NUMERIC, and +LC_TIME are available. On some modern systems there is also a +locale LC_MESSAGES which is called on some old, XPG2 compliant +systems LC_RESPONSES. + +

    + + +

    How Marks Appears in Sources

    + +

    +All strings requiring translation should be marked in the C sources. Marking +is done in such a way that each translatable string appears to be +the sole argument of some function or preprocessor macro. There are +only a few such possible functions or macros meant for translation, +and their names are said to be marking keywords. The marking is +attached to strings themselves, rather than to what we do with them. +This approach has more uses. A blatant example is an error message +produced by formatting. The format string needs translation, as +well as some strings inserted through some `%s' specification +in the format, while the result from sprintf may have so many +different instances that it is impractical to list them all in some +`error_string_out()' routine, say. + +

    +

    +This marking operation has two goals. The first goal of marking +is for triggering the retrieval of the translation, at run time. +The keyword are possibly resolved into a routine able to dynamically +return the proper translation, as far as possible or wanted, for the +argument string. Most localizable strings are found in executable +positions, that is, attached to variables or given as parameters to +functions. But this is not universal usage, and some translatable +strings appear in structured initializations. See section Special Cases of Translatable Strings. + +

    +

    +The second goal of the marking operation is to help xgettext +at properly extracting all translatable strings when it scans a set +of program sources and produces PO file templates. + +

    +

    +The canonical keyword for marking translatable strings is +`gettext', it gave its name to the whole GNU gettext +package. For packages making only light use of the `gettext' +keyword, macro or function, it is easily used as is. However, +for packages using the gettext interface more heavily, it +is usually more convenient to give the main keyword a shorter, less +obtrusive name. Indeed, the keyword might appear on a lot of strings +all over the package, and programmers usually do not want nor need +their program sources to remind them forcefully, all the time, that they +are internationalized. Further, a long keyword has the disadvantage +of using more horizontal space, forcing more indentation work on +sources for those trying to keep them within 79 or 80 columns. + +

    +

    +Many packages use `_' (a simple underline) as a keyword, +and write `_("Translatable string")' instead of `gettext +("Translatable string")'. Further, the coding rule, from GNU standards, +wanting that there is a space between the keyword and the opening +parenthesis is relaxed, in practice, for this particular usage. +So, the textual overhead per translatable string is reduced to +only three characters: the underline and the two parentheses. +However, even if GNU gettext uses this convention internally, +it does not offer it officially. The real, genuine keyword is truly +`gettext' indeed. It is fairly easy for those wanting to use +`_' instead of `gettext' to declare: + +

    + +
    +#include <libintl.h>
    +#define _(String) gettext (String)
    +
    + +

    +instead of merely using `#include <libintl.h>'. + +

    +

    +Later on, the maintenance is relatively easy. If, as a programmer, +you add or modify a string, you will have to ask yourself if the +new or altered string requires translation, and include it within +`_()' if you think it should be translated. `"%s: %d"' is +an example of string not requiring translation! + +

    + + +

    Marking Translatable Strings

    + +

    +In PO mode, one set of features is meant more for the programmer than +for the translator, and allows him to interactively mark which strings, +in a set of program sources, are translatable, and which are not. +Even if it is a fairly easy job for a programmer to find and mark +such strings by other means, using any editor of his choice, PO mode +makes this work more comfortable. Further, this gives translators +who feel a little like programmers, or programmers who feel a little +like translators, a tool letting them work at marking translatable +strings in the program sources, while simultaneously producing a set of +translation in some language, for the package being internationalized. + +

    +

    +The set of program sources, targetted by the PO mode commands describe +here, should have an Emacs tags table constructed for your project, +prior to using these PO file commands. This is easy to do. In any +shell window, change the directory to the root of your project, then +execute a command resembling: + +

    + +
    +etags src/*.[hc] lib/*.[hc]
    +
    + +

    +presuming here you want to process all `.h' and `.c' files +from the `src/' and `lib/' directories. This command will +explore all said files and create a `TAGS' file in your root +directory, somewhat summarizing the contents using a special file +format Emacs can understand. + +

    +

    +For packages following the GNU coding standards, there is +a make goal tags or TAGS which construct the tag files in +all directories and for all files containing source code. + +

    +

    +Once your `TAGS' file is ready, the following commands assist +the programmer at marking translatable strings in his set of sources. +But these commands are necessarily driven from within a PO file +window, and it is likely that you do not even have such a PO file yet. +This is not a problem at all, as you may safely open a new, empty PO +file, mainly for using these commands. This empty PO file will slowly +fill in while you mark strings as translatable in your program sources. + +

    +
    + +
    , +
    +Search through program sources for a string which looks like a +candidate for translation. + +
    M-, +
    +Mark the last string found with `_()'. + +
    M-. +
    +Mark the last string found with a keyword taken from a set of possible +keywords. This command with a prefix allows some management of these +keywords. + +
    + +

    +The , (po-tags-search) command search for the next +occurrence of a string which looks like a possible candidate for +translation, and displays the program source in another Emacs window, +positioned in such a way that the string is near the top of this other +window. If the string is too big to fit whole in this window, it is +positioned so only its end is shown. In any case, the cursor +is left in the PO file window. If the shown string would be better +presented differently in different native languages, you may mark it +using M-, or M-.. Otherwise, you might rather ignore it +and skip to the next string by merely repeating the , command. + +

    +

    +A string is a good candidate for translation if it contains a sequence +of three or more letters. A string containing at most two letters in +a row will be considered as a candidate if it has more letters than +non-letters. The command disregards strings containing no letters, +or isolated letters only. It also disregards strings within comments, +or strings already marked with some keyword PO mode knows (see below). + +

    +

    +If you have never told Emacs about some `TAGS' file to use, the +command will request that you specify one from the minibuffer, the +first time you use the command. You may later change your `TAGS' +file by using the regular Emacs command M-x visit-tags-table, +which will ask you to name the precise `TAGS' file you want +to use. See section `Tag Tables' in The Emacs Editor. + +

    +

    +Each time you use the , command, the search resumes from where it was +left by the previous search, and goes through all program sources, +obeying the `TAGS' file, until all sources have been processed. +However, by giving a prefix argument to the command (C-u +,), you may request that the search be restarted all over again +from the first program source; but in this case, strings that you +recently marked as translatable will be automatically skipped. + +

    +

    +Using this , command does not prevent using of other regular +Emacs tags commands. For example, regular tags-search or +tags-query-replace commands may be used without disrupting the +independent , search sequence. However, as implemented, the +initial , command (or the , command is used with a +prefix) might also reinitialize the regular Emacs tags searching to the +first tags file, this reinitialization might be considered spurious. + +

    +

    +The M-, (po-mark-translatable) command will mark the +recently found string with the `_' keyword. The M-. +(po-select-mark-and-mark) command will request that you type +one keyword from the minibuffer and use that keyword for marking +the string. Both commands will automatically create a new PO file +untranslated entry for the string being marked, and make it the +current entry (making it easy for you to immediately proceed to its +translation, if you feel like doing it right away). It is possible +that the modifications made to the program source by M-, or +M-. render some source line longer than 80 columns, forcing you +to break and re-indent this line differently. You may use the O +command from PO mode, or any other window changing command from +GNU Emacs, to break out into the program source window, and do any +needed adjustments. You will have to use some regular Emacs command +to return the cursor to the PO file window, if you want command +, for the next string, say. + +

    +

    +The M-. command has a few built-in speedups, so you do not +have to explicitly type all keywords all the time. The first such +speedup is that you are presented with a preferred keyword, +which you may accept by merely typing RET at the prompt. +The second speedup is that you may type any non-ambiguous prefix of the +keyword you really mean, and the command will complete it automatically +for you. This also means that PO mode has to know all +your possible keywords, and that it will not accept mistyped keywords. + +

    +

    +If you reply ? to the keyword request, the command gives a +list of all known keywords, from which you may choose. When the +command is prefixed by an argument (C-u M-.), it inhibits +updating any program source or PO file buffer, and does some simple +keyword management instead. In this case, the command asks for a +keyword, written in full, which becomes a new allowed keyword for +later M-. commands. Moreover, this new keyword automatically +becomes the preferred keyword for later commands. By typing +an already known keyword in response to C-u M-., one merely +changes the preferred keyword and does nothing more. + +

    +

    +All keywords known for M-. are recognized by the , command +when scanning for strings, and strings already marked by any of those +known keywords are automatically skipped. If many PO files are opened +simultaneously, each one has its own independent set of known keywords. +There is no provision in PO mode, currently, for deleting a known +keyword, you have to quit the file (maybe using q) and reopen +it afresh. When a PO file is newly brought up in an Emacs window, only +`gettext' and `_' are known as keywords, and `gettext' +is preferred for the M-. command. In fact, this is not useful to +prefer `_', as this one is already built in the M-, command. + +

    + + +

    Special Comments preceding Keywords

    + +

    +In C programs strings are often used within calls of functions from the +printf family. The special thing about these format strings is +that they can contain format specifiers introduced with %. Assume +we have the code + +

    + +
    +printf (gettext ("String `%s' has %d characters\n"), s, strlen (s));
    +
    + +

    +A possible German translation for the above string might be: + +

    + +
    +"%d Zeichen lang ist die Zeichenkette `%s'"
    +
    + +

    +A C programmer, even if he cannot speak German, will recognize that +there is something wrong here. The order of the two format specifiers +is changed but of course the arguments in the printf don't have. +This will most probably lead to problems because now the length of the +string is regarded as the address. + +

    +

    +To prevent errors at runtime caused by translations the msgfmt +tool can check statically whether the arguments in the original and the +translation string match in type and number. If this is not the case a +warning will be given and the error cannot causes problems at runtime. + +

    +

    +If the word order in the above German translation would be correct one +would have to write + +

    + +
    +"%2$d Zeichen lang ist die Zeichenkette `%1$s'"
    +
    + +

    +The routines in msgfmt know about this special notation. + +

    +

    +Because not all strings in a program must be format strings it is not +useful for msgfmt to test all the strings in the `.po' file. +This might cause problems because the string might contain what looks +like a format specifier, but the string is not used in printf. + +

    +

    +Therefore the xgettext adds a special tag to those messages it +thinks might be a format string. There is no absolute rule for this, +only a heuristic. In the `.po' file the entry is marked using the +c-format flag in the #, comment line (see section The Format of PO Files). + +

    +

    +The careful reader now might say that this again can cause problems. +The heuristic might guess it wrong. This is true and therefore +xgettext knows about special kind of comment which lets +the programmer take over the decision. If in the same line or +the immediately preceding line of the gettext keyword +the xgettext program find a comment containing the words +xgettext:c-format it will mark the string in any case with +the c-format flag. This kind of comment should be used when +xgettext does not recognize the string as a format string but +is really is one and it should be tested. Please note that when the +comment is in the same line of the gettext keyword, it must be +before the string to be translated. + +

    +

    +This situation happens quite often. The printf function is often +called with strings which do not contain a format specifier. Of course +one would normally use fputs but it does happen. In this case +xgettext does not recognize this as a format string but what +happens if the translation introduces a valid format specifier? The +printf function will try to access one of the parameter but none +exists because the original code does not refer to any parameter. + +

    +

    +xgettext of course could make a wrong decision the other way +round. A string marked as a format string is not really a format +string. In this case the msgfmt might give too many warnings and +would prevent translating the `.po' file. The method to prevent +this wrong decision is similar to the one used above, only the comment +to use must contain the string xgettext:no-c-format. + +

    +

    +If a string is marked with c-format and this is not correct the +user can find out who is responsible for the decision. See section Invoking the xgettext Program to see how the --debug option can be used for solving +this problem. + +

    + + +

    Special Cases of Translatable Strings

    + +

    +The attentive reader might now point out that it is not always possible +to mark translatable string with gettext or something like this. +Consider the following case: + +

    + +
    +{
    +  static const char *messages[] = {
    +    "some very meaningful message",
    +    "and another one"
    +  };
    +  const char *string;
    +  ...
    +  string
    +    = index > 1 ? "a default message" : messages[index];
    +
    +  fputs (string);
    +  ...
    +}
    +
    + +

    +While it is no problem to mark the string "a default message" it +is not possible to mark the string initializers for messages. +What is to be done? We have to fulfill two tasks. First we have to mark the +strings so that the xgettext program (see section Invoking the xgettext Program) +can find them, and second we have to translate the string at runtime +before printing them. + +

    +

    +The first task can be fulfilled by creating a new keyword, which names a +no-op. For the second we have to mark all access points to a string +from the array. So one solution can look like this: + +

    + +
    +#define gettext_noop(String) (String)
    +
    +{
    +  static const char *messages[] = {
    +    gettext_noop ("some very meaningful message"),
    +    gettext_noop ("and another one")
    +  };
    +  const char *string;
    +  ...
    +  string
    +    = index > 1 ? gettext ("a default message") : gettext (messages[index]);
    +
    +  fputs (string);
    +  ...
    +}
    +
    + +

    +Please convince yourself that the string which is written by +fputs is translated in any case. How to get xgettext know +the additional keyword gettext_noop is explained in section Invoking the xgettext Program. + +

    +

    +The above is of course not the only solution. You could also come along +with the following one: + +

    + +
    +#define gettext_noop(String) (String)
    +
    +{
    +  static const char *messages[] = {
    +    gettext_noop ("some very meaningful message",
    +    gettext_noop ("and another one")
    +  };
    +  const char *string;
    +  ...
    +  string
    +    = index > 1 ? gettext_noop ("a default message") : messages[index];
    +
    +  fputs (gettext (string));
    +  ...
    +}
    +
    + +

    +But this has some drawbacks. First the programmer has to take care that +he uses gettext_noop for the string "a default message". +A use of gettext could have in rare cases unpredictable results. +The second reason is found in the internals of the GNU gettext +Library which will make this solution less efficient. + +

    +

    +One advantage is that you need not make control flow analysis to make +sure the output is really translated in any case. But this analysis is +generally not very difficult. If it should be in any situation you can +use this second method in this situation. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_4.html b/docs/html/gettext/gettext_4.html new file mode 100644 index 0000000000..f8f090eb2a --- /dev/null +++ b/docs/html/gettext/gettext_4.html @@ -0,0 +1,337 @@ + + + + +GNU gettext utilities - Making the Initial PO File + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    Making the Initial PO File

    + + + +

    Invoking the xgettext Program

    + + +
    +xgettext [option] inputfile ...
    +
    + +
    + +
    `-a' +
    +
    `--extract-all' +
    +Extract all strings. + +
    `-c [tag]' +
    +
    `--add-comments[=tag]' +
    +Place comment block with tag (or those preceding keyword lines) +in output file. + +
    `-C' +
    +
    `--c++' +
    +Recognize C++ style comments. + +
    `--debug' +
    +Use the flags c-format and possible-c-format to show who was +responsible for marking a message as a format string. The later form is +used if the xgettext program decided, the format form is used if +the programmer prescribed it. + +By default only the c-format form is used. The translator should +not have to care about these details. + +
    `-d name' +
    +
    `--default-domain=name' +
    +Use `name.po' for output (instead of `messages.po'). + +The special domain name `-' or `/dev/stdout' means to write +the output to `stdout'. + +
    `-D directory' +
    +
    `--directory=directory' +
    +Change to directory before beginning to search and scan source +files. The resulting `.po' file will be written relative to the +original directory, though. + +
    `-f file' +
    +
    `--files-from=file' +
    +Read the names of the input files from file instead of getting +them from the command line. + +
    `--force' +
    +Always write output file even if no message is defined. + +
    `-h' +
    +
    `--help' +
    +Display this help and exit. + +
    `-I list' +
    +
    `--input-path=list' +
    +List of directories searched for input files. + +
    `-j' +
    +
    `--join-existing' +
    +Join messages with existing file. + +
    `-k word' +
    +
    `--keyword[=word]' +
    +Additonal keyword to be looked for (without word means not to +use default keywords). + +The default keywords, which are always looked for if not explicitly +disabled, are gettext, dgettext, dcgettext and +gettext_noop. + +
    `-m [string]' +
    +
    `--msgstr-prefix[=string]' +
    +Use string or "" as prefix for msgstr entries. + +
    `-M [string]' +
    +
    `--msgstr-suffix[=string]' +
    +Use string or "" as suffix for msgstr entries. + +
    `--no-location' +
    +Do not write `#: filename:line' lines. + +
    `-n' +
    +
    `--add-location' +
    +Generate `#: filename:line' lines (default). + +
    `--omit-header' +
    +Don't write header with `msgid ""' entry. + +This is useful for testing purposes because it eliminates a source +of variance for generated .gmo files. We can ship some of +these files in the GNU gettext package, and the result of +regenerating them through msgfmt should yield the same values. + +
    `-p dir' +
    +
    `--output-dir=dir' +
    +Output files will be placed in directory dir. + +
    `-s' +
    +
    `--sort-output' +
    +Generate sorted output and remove duplicates. + +
    `--strict' +
    +Write out strict Uniforum conforming PO file. + +
    `-v' +
    +
    `--version' +
    +Output version information and exit. + +
    `-x file' +
    +
    `--exclude-file=file' +
    +Entries from file are not extracted. + +
    + +

    +Search path for supplementary PO files is: +`/usr/local/share/nls/src/'. + +

    +

    +If inputfile is `-', standard input is read. + +

    +

    +This implementation of xgettext is able to process a few awkward +cases, like strings in preprocessor macros, ANSI concatenation of +adjacent strings, and escaped end of lines for continued strings. + +

    + + +

    C Sources Context

    + +

    +PO mode is particularily powerful when used with PO files +created through GNU gettext utilities, as those utilities +insert special comments in the PO files they generate. +Some of these special comments relate the PO file entry to +exactly where the untranslated string appears in the program sources. + +

    +

    +When the translator gets to an untranslated entry, she is fairly +often faced with an original string which is not as informative as +it normally should be, being succinct, cryptic, or otherwise ambiguous. +Before chosing how to translate the string, she needs to understand +better what the string really means and how tight the translation has +to be. Most of times, when problems arise, the only way left to make +her judgment is looking at the true program sources from where this +string originated, searching for surrounding comments the programmer +might have put in there, and looking around for helping clues of +any kind. + +

    +

    +Surely, when looking at program sources, the translator will receive +more help if she is a fluent programmer. However, even if she is +not versed in programming and feels a little lost in C code, the +translator should not be shy at taking a look, once in a while. +It is most probable that she will still be able to find some of the +hints she needs. She will learn quickly to not feel uncomfortable +in program code, paying more attention to programmer's comments, +variable and function names (if he dared chosing them well), and +overall organization, than to programmation itself. + +

    +

    +The following commands are meant to help the translator at getting +program source context for a PO file entry. + +

    +
    + +
    s +
    +Resume the display of a program source context, or cycle through them. + +
    M-s +
    +Display of a program source context selected by menu. + +
    S +
    +Add a directory to the search path for source files. + +
    M-S +
    +Delete a directory from the search path for source files. + +
    + +

    +The commands s (po-cycle-reference) and M-s +(po-select-source-reference) both open another window displaying +some source program file, and already positioned in such a way that +it shows an actual use of the string to be translated. By doing +so, the command gives source program context for the string. But if +the entry has no source context references, or if all references +are unresolved along the search path for program sources, then the +command diagnoses this as an error. + +

    +

    +Even if s (or M-s) opens a new window, the cursor stays +in the PO file window. If the translator really wants to +get into the program source window, she ought to do it explicitly, +maybe by using command O. + +

    +

    +When s is typed for the first time, or for a PO file entry which +is different of the last one used for getting source context, then the +command reacts by giving the first context available for this entry, +if any. If some context has already been recently displayed for the +current PO file entry, and the translator wandered off to do other +things, typing s again will merely resume, in another window, +the context last displayed. In particular, if the translator moved +the cursor away from the context in the source file, the command will +bring the cursor back to the context. By using s many times +in a row, with no other commands intervening, PO mode will cycle to +the next available contexts for this particular entry, getting back +to the first context once the last has been shown. + +

    +

    +The command M-s behaves differently. Instead of cycling through +references, it lets the translator choose of particular reference among +many, and displays that reference. It is best used with completion, +if the translator types TAB immediately after M-s, in +response to the question, she will be offered a menu of all possible +references, as a reminder of which are the acceptable answers. +This command is useful only where there are really many contexts +available for a single string to translate. + +

    +

    +Program source files are usually found relative to where the PO +file stands. As a special provision, when this fails, the file is +also looked for, but relative to the directory immediately above it. +Those two cases take proper care of most PO files. However, it might +happen that a PO file has been moved, or is edited in a different +place than its normal location. When this happens, the translator +should tell PO mode in which directory normally sits the genuine PO +file. Many such directories may be specified, and all together, they +constitute what is called the search path for program sources. +The command S (po-consider-source-path) is used to interactively +enter a new directory at the front of the search path, and the command +M-S (po-ignore-source-path) is used to select, with completion, +one of the directories she does not want anymore on the search path. + +

    + + +

    Using Translation Compendiums

    + +

    +Compendiums are yet to be implemented. + +

    +

    +An incoming PO mode feature will let the translator maintain a +compendium of already achieved translations. A compendium +is a special PO file containing a set of translations recurring in +many different packages. The translator will be given commands for +adding entries to her compendium, and later initializing untranslated +entries, or updating already translated entries, from translations +kept in the compendium. For this to work, however, the compendium +would have to be normalized. See section Normalizing Strings in Entries. + +

    + +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_5.html b/docs/html/gettext/gettext_5.html new file mode 100644 index 0000000000..81f4c9a24b --- /dev/null +++ b/docs/html/gettext/gettext_5.html @@ -0,0 +1,747 @@ + + + + +GNU gettext utilities - Updating Existing PO Files + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    Updating Existing PO Files

    + + + +

    Invoking the msgmerge Program

    + + + +

    Translated Entries

    + +

    +Each PO file entry for which the msgstr field has been filled with +a translation, and which is not marked as fuzzy (see section Fuzzy Entries), +is a said to be a translated entry. Only translated entries will +later be compiled by GNU msgfmt and become usable in programs. +Other entry types will be excluded; translation will not occur for them. + +

    +

    +Some commands are more specifically related to translated entry processing. + +

    +
    + +
    t +
    +Find the next translated entry. + +
    M-t +
    +Find the previous translated entry. + +
    + +

    +The commands t (po-next-translated-entry) and M-t +(po-previous-transted-entry) move forwards or backwards, chasing +for an translated entry. If none is found, the search is extended and +wraps around in the PO file buffer. + +

    +

    +Translated entries usually result from the translator having edited in +a translation for them, section Modifying Translations. However, if the +variable po-auto-fuzzy-on-edit is not nil, the entry having +received a new translation first becomes a fuzzy entry, which ought to +be later unfuzzied before becoming an official, genuine translated entry. +See section Fuzzy Entries. + +

    + + +

    Fuzzy Entries

    + +

    +Each PO file entry may have a set of attributes, which are +qualities given an name and explicitely associated with the entry +translation, using a special system comment. One of these attributes +has the name fuzzy, and entries having this attribute are said +to have a fuzzy translation. They are called fuzzy entries, for short. + +

    +

    +Fuzzy entries, even if they account for translated entries for +most other purposes, usually call for revision by the translator. +Those may be produced by applying the program msgmerge to +update an older translated PO files according to a new PO template +file, when this tool hypothesises that some new msgid has +been modified only slightly out of an older one, and chooses to pair +what it thinks to be the old translation for the new modified entry. +The slight alteration in the original string (the msgid string) +should often be reflected in the translated string, and this requires +the intervention of the translator. For this reason, msgmerge +might mark some entries as being fuzzy. + +

    +

    +Also, the translator may decide herself to mark an entry as fuzzy +for her own convenience, when she wants to remember that the entry +has to be later revisited. So, some commands are more specifically +related to fuzzy entry processing. + +

    +
    + +
    f +
    +Find the next fuzzy entry. + +
    M-f +
    +Find the previous fuzzy entry. + +
    TAB +
    +Remove the fuzzy attribute of the current entry. + +
    + +

    +The commands f (po-next-fuzzy) and M-f +(po-previous-fuzzy) move forwards or backwards, chasing for +a fuzzy entry. If none is found, the search is extended and wraps +around in the PO file buffer. + +

    +

    +The command TAB (po-unfuzzy) removes the fuzzy +attribute associated with an entry, usually leaving it translated. +Further, if the variable po-auto-select-on-unfuzzy has not +the nil value, the TAB command will automatically chase +for another interesting entry to work on. The initial value of +po-auto-select-on-unfuzzy is nil. + +

    +

    +The initial value of po-auto-fuzzy-on-edit is nil. However, +if the variable po-auto-fuzzy-on-edit is set to t, any entry +edited through the RET command is marked fuzzy, as a way to ensure +some kind of double check, later. In this case, the usual paradigm is +that an entry becomes fuzzy (if not already) whenever the translator +modifies it. If she is satisfied with the translation, she then uses +TAB to pick another entry to work on, clearing the fuzzy attribute +on the same blow. If she is not satisfied yet, she merely uses SPC +to chase another entry, leaving the entry fuzzy. + +

    +

    +The translator may also use the DEL command +(po-fade-out-entry) over any translated entry to mark it as being +fuzzy, when she wants to easily leave a trace she wants to later return +working at this entry. + +

    +

    +Also, when time comes to quit working on a PO file buffer with the q +command, the translator is asked for confirmation, if fuzzy string +still exists. + +

    + + +

    Untranslated Entries

    + +

    +When xgettext originally creates a PO file, unless told +otherwise, it initializes the msgid field with the untranslated +string, and leaves the msgstr string to be empty. Such entries, +having an empty translation, are said to be untranslated entries. +Later, when the programmer slightly modifies some string right in +the program, this change is later reflected in the PO file +by the appearance of a new untranslated entry for the modified string. + +

    +

    +The usual commands moving from entry to entry consider untranslated +entries on the same level as active entries. Untranslated entries +are easily recognizable by the fact they end with `msgstr ""'. + +

    +

    +The work of the translator might be (quite naively) seen as the process +of seeking after an untranslated entry, editing a translation for +it, and repeating these actions until no untranslated entries remain. +Some commands are more specifically related to untranslated entry +processing. + +

    +
    + +
    u +
    +Find the next untranslated entry. + +
    M-u +
    +Find the previous untranslated entry. + +
    k +
    +Turn the current entry into an untranslated one. + +
    + +

    +The commands u (po-next-untranslated-entry) and M-u +(po-previous-untransted-entry) move forwards or backwards, +chasing for an untranslated entry. If none is found, the search is +extended and wraps around in the PO file buffer. + +

    +

    +An entry can be turned back into an untranslated entry by +merely emptying its translation, using the command k +(po-kill-msgstr). See section Modifying Translations. + +

    +

    +Also, when time comes to quit working on a PO file buffer +with the q command, the translator is asked for confirmation, +if some untranslated string still exists. + +

    + + +

    Obsolete Entries

    + +

    +By obsolete PO file entries, we mean those entries which are +commented out, usually by msgmerge when it found that the +translation is not needed anymore by the package being localized. + +

    +

    +The usual commands moving from entry to entry consider obsolete +entries on the same level as active entries. Obsolete entries are +easily recognizable by the fact that all their lines start with +#, even those lines containing msgid or msgstr. + +

    +

    +Commands exist for emptying the translation or reinitializing it +to the original untranslated string. Commands interfacing with the +kill ring may force some previously saved text into the translation. +The user may interactively edit the translation. All these commands +may apply to obsolete entries, carefully leaving the entry obsolete +after the fact. + +

    +

    +Moreover, some commands are more specifically related to obsolete +entry processing. + +

    +
    + +
    o +
    +Find the next obsolete entry. + +
    M-o +
    +Find the previous obsolete entry. + +
    DEL +
    +Make an active entry obsolete, or zap out an obsolete entry. + +
    + +

    +The commands o (po-next-obsolete-entry) and M-o +(po-previous-obsolete-entry) move forwards or backwards, +chasing for an obsolete entry. If none is found, the search is +extended and wraps around in the PO file buffer. + +

    +

    +PO mode does not provide ways for un-commenting an obsolete entry +and making it active, because this would reintroduce an original +untranslated string which does not correspond to any marked string +in the program sources. This goes with the philosophy of never +introducing useless msgid values. + +

    +

    +However, it is possible to comment out an active entry, so making +it obsolete. GNU gettext utilities will later react to the +disappearance of a translation by using the untranslated string. +The command DEL (po-fade-out-entry) pushes the current entry +a little further towards annihilation. If the entry is active (it is a +translated entry), then it is first made fuzzy. If it is already fuzzy, +then the entry is merely commented out, with confirmation. If the entry +is already obsolete, then it is completely deleted from the PO file. +It is easy to recycle the translation so deleted into some other PO file +entry, usually one which is untranslated. See section Modifying Translations. + +

    +

    +Here is a quite interesting problem to solve for later development of +PO mode, for those nights you are not sleepy. The idea would be that +PO mode might become bright enough, one of these days, to make good +guesses at retrieving the most probable candidate, among all obsolete +entries, for initializing the translation of a newly appeared string. +I think it might be a quite hard problem to do this algorithmically, as +we have to develop good and efficient measures of string similarity. +Right now, PO mode completely lets the decision to the translator, +when the time comes to find the adequate obsolete translation, it +merely tries to provide handy tools for helping her to do so. + +

    + + +

    Modifying Translations

    + +

    +PO mode prevents direct edition of the PO file, by the usual +means Emacs give for altering a buffer's contents. By doing so, +it pretends helping the translator to avoid little clerical errors +about the overall file format, or the proper quoting of strings, +as those errors would be easily made. Other kinds of errors are +still possible, but some may be caught and diagnosed by the batch +validation process, which the translator may always trigger by the +V command. For all other errors, the translator has to rely on +her own judgment, and also on the linguistic reports submitted to her +by the users of the translated package, having the same mother tongue. + +

    +

    +When the time comes to create a translation, correct an error diagnosed +mechanically or reported by a user, the translators have to resort to +using the following commands for modifying the translations. + +

    +
    + +
    RET +
    +Interactively edit the translation. + +
    LFD +
    +Reinitialize the translation with the original, untranslated string. + +
    k +
    +Save the translation on the kill ring, and delete it. + +
    w +
    +Save the translation on the kill ring, without deleting it. + +
    y +
    +Replace the translation, taking the new from the kill ring. + +
    + +

    +The command RET (po-edit-msgstr) opens a new Emacs window +containing a copy of the translation taken from the current PO file entry, +all ready for edition, fully modifiable and with the complete extent of +GNU Emacs modifying commands. The string is presented to the translator +expunged of all quoting marks, and she will modify the unquoted +string in this window to heart's content. Once done, the regular Emacs +command M-C-c (exit-recursive-edit) may be used to return the +edited translation into the PO file, replacing the original translation. +The keys C-c C-c are bound so they have the same effect as +M-C-c. + +

    +

    +If the translator becomes unsatisfied with her translation to the extent +she prefers keeping the translation which was existent prior to the +RET command, she may use the standard Emacs command C-] +(abort-recursive-edit) to merely get rid of edition, while +preserving the original translation. The keys C-c C-k are +bound so they have the same effect as C-]. Another way would +be for her to exit normally with C-c C-c, then type U +once for undoing the whole effect of last edition. + +

    +

    +Functions found on po-subedit-mode-hook, if any, are executed after +the string has been inserted in the edit buffer and before recursive edit +is entered. + +

    +

    +While editing her translation, the translator should pay attention to +not inserting unwanted RET (carriage returns) characters at +the end of the translated string if those are not meant to be there, +or to removing such characters when they are required. Since these +characters are not visible in the editing buffer, they are easily +introduced by mistake. To help her, RET automatically puts +the character < at the end of the string being edited, but this +< is not really part of the string. On exiting the editing +window with C-c C-c, PO mode automatically removes such +< and all whitespace added after it. If the translator adds +characters after the terminating <, it looses its delimiting +property and integrally becomes part of the string. If she removes +the delimiting <, then the edited string is taken as +is, with all trailing newlines, even if invisible. Also, if the +translated string ought to end itself with a genuine <, then the +delimiting < may not be removed; so the string should appear, +in the editing window, as ending with two < in a row. + +

    +

    +When a translation (or a comment) is being edited, the translator +may move the cursor back into the PO file buffer and freely +move to other entries, browsing at will. The edited entry will +be recovered as soon as the edit ceases, because it is this entry +only which is being modified. If, with an edition still opened, the +translator wanders in the PO file buffer, she cannot modify +any other entry. If she tries to, PO mode will react by suggesting +that she abort the current edit, or else, by inviting her to finish +the current edit prior to any other modification. + +

    +

    +The command LFD (po-msgid-to-msgstr) initializes, or +reinitializes the translation with the original string. This command +is normally used when the translator wants to redo a fresh translation +of the original string, disregarding any previous work. + +

    +

    +It is possible to arrange so, whenever editing an untranslated +entry, the LFD command be automatically executed. If you set +po-auto-edit-with-msgid to t, the translation gets +initialised with the original string, in case none exist already. +The default value for po-auto-edit-with-msgid is nil. + +

    +

    +In fact, whether it is best to start a translation with an empty +string, or rather with a copy of the original string, is a matter of +taste or habit. Sometimes, the source language and the +target language are so different that is simply best to start writing +on an empty page. At other times, the source and target languages +are so close that it would be a waste to retype a number of words +already being written in the original string. A translator may also +like having the original string right under her eyes, as she will +progressively overwrite the original text with the translation, even +if this requires some extra editing work to get rid of the original. + +

    +

    +The command k (po-kill-msgstr) merely empties the +translation string, so turning the entry into an untranslated +one. But while doing so, its previous contents is put apart in +a special place, known as the kill ring. The command w +(po-kill-ring-save-msgstr) has also the effect of taking a +copy of the translation onto the kill ring, but it otherwise leaves +the entry alone, and does not remove the translation from the +entry. Both commands use exactly the Emacs kill ring, which is shared +between buffers, and which is well known already to GNU Emacs lovers. + +

    +

    +The translator may use k or w many times in the course +of her work, as the kill ring may hold several saved translations. +From the kill ring, strings may later be reinserted in various +Emacs buffers. In particular, the kill ring may be used for moving +translation strings between different entries of a single PO file +buffer, or if the translator is handling many such buffers at once, +even between PO files. + +

    +

    +To facilitate exchanges with buffers which are not in PO mode, the +translation string put on the kill ring by the k command is fully +unquoted before being saved: external quotes are removed, multi-lines +strings are concatenated, and backslashed escaped sequences are turned +into their corresponding characters. In the special case of obsolete +entries, the translation is also uncommented prior to saving. + +

    +

    +The command y (po-yank-msgstr) completely replaces the +translation of the current entry by a string taken from the kill ring. +Following GNU Emacs terminology, we then say that the replacement +string is yanked into the PO file buffer. +See section `Yanking' in The Emacs Editor. +The first time y is used, the translation receives the value of +the most recent addition to the kill ring. If y is typed once +again, immediately, without intervening keystrokes, the translation +just inserted is taken away and replaced by the second most recent +addition to the kill ring. By repeating y many times in a row, +the translator may travel along the kill ring for saved strings, +until she finds the string she really wanted. + +

    +

    +When a string is yanked into a PO file entry, it is fully and +automatically requoted for complying with the format PO files should +have. Further, if the entry is obsolete, PO mode then appropriately +push the inserted string inside comments. Once again, translators +should not burden themselves with quoting considerations besides, of +course, the necessity of the translated string itself respective to +the program using it. + +

    +

    +Note that k or w are not the only commands pushing strings +on the kill ring, as almost any PO mode command replacing translation +strings (or the translator comments) automatically save the old string +on the kill ring. The main exceptions to this general rule are the +yanking commands themselves. + +

    +

    +To better illustrate the operation of killing and yanking, let's +use an actual example, taken from a common situation. When the +programmer slightly modifies some string right in the program, his +change is later reflected in the PO file by the appearance +of a new untranslated entry for the modified string, and the fact +that the entry translating the original or unmodified string becomes +obsolete. In many cases, the translator might spare herself some work +by retrieving the unmodified translation from the obsolete entry, +then initializing the untranslated entry msgstr field with +this retrieved translation. Once this done, the obsolete entry is +not wanted anymore, and may be safely deleted. + +

    +

    +When the translator finds an untranslated entry and suspects that a +slight variant of the translation exists, she immediately uses m +to mark the current entry location, then starts chasing obsolete +entries with o, hoping to find some translation corresponding +to the unmodified string. Once found, she uses the DEL command +for deleting the obsolete entry, knowing that DEL also kills +the translation, that is, pushes the translation on the kill ring. +Then, r returns to the initial untranslated entry, y +then yanks the saved translation right into the msgstr +field. The translator is then free to use RET for fine +tuning the translation contents, and maybe to later use u, +then m again, for going on with the next untranslated string. + +

    +

    +When some sequence of keys has to be typed over and over again, the +translator may find it useful to become better acquainted with the GNU +Emacs capability of learning these sequences and playing them back under +request. See section `Keyboard Macros' in The Emacs Editor. + +

    + + +

    Modifying Comments

    + +

    +Any translation work done seriously will raise many linguistic +difficulties, for which decisions have to be made, and the choices +further documented. These documents may be saved within the +PO file in form of translator comments, which the translator +is free to create, delete, or modify at will. These comments may +be useful to herself when she returns to this PO file after a while. + +

    +

    +Comments not having whitespace after the initial `#', for example, +those beginning with `#.' or `#:', are not translator +comments, they are exclusively created by other gettext tools. +So, the commands below will never alter such system added comments, +they are not meant for the translator to modify. See section The Format of PO Files. + +

    +

    +The following commands are somewhat similar to those modifying translations, +so the general indications given for those apply here. See section Modifying Translations. + +

    +
    + +
    # +
    +Interactively edit the translator comments. + +
    K +
    +Save the translator comments on the kill ring, and delete it. + +
    W +
    +Save the translator comments on the kill ring, without deleting it. + +
    Y +
    +Replace the translator comments, taking the new from the kill ring. + +
    + +

    +These commands parallel PO mode commands for modifying the translation +strings, and behave much the same way as they do, except that they handle +this part of PO file comments meant for translator usage, rather +than the translation strings. So, if the descriptions given below are +slightly succinct, it is because the full details have already been given. +See section Modifying Translations. + +

    +

    +The command # (po-edit-comment) opens a new Emacs +window containing a copy of the translator comments on the current +PO file entry. If there are no such comments, PO mode +understands that the translator wants to add a comment to the entry, +and she is presented with an empty screen. Comment marks (#) and +the space following them are automatically removed before edition, +and reinstated after. For translator comments pertaining to obsolete +entries, the uncommenting and recommenting operations are done twice. +Once in the editing window, the keys C-c C-c allow the +translator to tell she is finished with editing the comment. + +

    +

    +Functions found on po-subedit-mode-hook, if any, are executed after +the string has been inserted in the edit buffer and before recursive edit +is entered. + +

    +

    +The command K (po-kill-comment) get rid of all +translator comments, while saving those comments on the kill ring. +The command W (po-kill-ring-save-comment) takes +a copy of the translator comments on the kill ring, but leaves +them undisturbed in the current entry. The command Y +(po-yank-comment) completely replaces the translator comments +by a string taken at the front of the kill ring. When this command +is immediately repeated, the comments just inserted are withdrawn, +and replaced by other strings taken along the kill ring. + +

    +

    +On the kill ring, all strings have the same nature. There is no +distinction between translation strings and translator +comments strings. So, for example, let's presume the translator +has just finished editing a translation, and wants to create a new +translator comment to document why the previous translation was +not good, just to remember what was the problem. Foreseeing that she +will do that in her documentation, the translator may want to quote +the previous translation in her translator comments. To do so, she +may initialize the translator comments with the previous translation, +still at the head of the kill ring. Because editing already pushed the +previous translation on the kill ring, she merely has to type M-w +prior to #, and the previous translation will be right there, +all ready for being introduced by some explanatory text. + +

    +

    +On the other hand, presume there are some translator comments already +and that the translator wants to add to those comments, instead +of wholly replacing them. Then, she should edit the comment right +away with #. Once inside the editing window, she can use the +regular GNU Emacs commands C-y (yank) and M-y +(yank-pop) to get the previous translation where she likes. + +

    + + +

    Consulting Auxiliary PO Files

    + +

    +PO mode is able to help the knowledgeable translator, being fluent in +many languages, at taking advantage of translations already achieved +in other languages she just happens to know. It provides these other +language translations as additional context for her own work. Moreover, +it has features to ease the production of translations for many languages +at once, for translators preferring to work in this way. + +

    +

    +An auxiliary PO file is an existing PO file meant for the same +package the translator is working on, but targeted to a different mother +tongue language. Commands exist for declaring and handling auxiliary +PO files, and also for showing contexts for the entry under work. + +

    +

    +Here are the auxiliary file commands available in PO mode. + +

    +
    + +
    a +
    +Seek auxiliary files for another translation for the same entry. + +
    M-a +
    +Switch to a particular auxiliary file. + +
    A +
    +Declare this PO file as an auxiliary file. + +
    M-A +
    +Remove this PO file from the list of auxiliary files. + +
    + +

    +Command A (po-consider-as-auxiliary) adds the current +PO file to the list of auxiliary files, while command M-A +(po-ignore-as-auxiliary just removes it. + +

    +

    +The command a (po-cycle-auxiliary) seeks all auxiliary PO +files, round-robin, searching for a translated entry in some other language +having an msgid field identical as the one for the current entry. +The found PO file, if any, takes the place of the current PO file in +the display (its window gets on top). Before doing so, the current PO +file is also made into an auxiliary file, if not already. So, a +in this newly displayed PO file will seek another PO file, and so on, +so repeating a will eventually yield back the original PO file. + +

    +

    +The command M-a (po-select-auxiliary) asks the translator +for her choice of a particular auxiliary file, with completion, and +then switches to that selected PO file. The command also checks if +the selected file has an msgid field identical as the one for +the current entry, and if yes, this entry becomes current. Otherwise, +the cursor of the selected file is left undisturbed. + +

    +

    +For all this to work fully, auxiliary PO files will have to be normalized, +in that way that msgid fields should be written exactly +the same way. It is possible to write msgid fields in various +ways for representing the same string, different writing would break the +proper behaviour of the auxiliary file commands of PO mode. This is not +expected to be much a problem in practice, as most existing PO files have +their msgid entries written by the same GNU gettext tools. + +

    +

    +However, PO files initially created by PO mode itself, while marking +strings in source files, are normalised differently. So are PO +files resulting of the the `M-x normalize' command. Until these +discrepancies between PO mode and other GNU gettext tools get +fully resolved, the translator should stay aware of normalisation issues. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_6.html b/docs/html/gettext/gettext_6.html new file mode 100644 index 0000000000..09387ebe7a --- /dev/null +++ b/docs/html/gettext/gettext_6.html @@ -0,0 +1,258 @@ + + + + +GNU gettext utilities - Producing Binary MO Files + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    Producing Binary MO Files

    + + + +

    Invoking the msgfmt Program

    + + +
    +Usage: msgfmt [option] filename.po ...
    +
    + +
    + +
    `-a number' +
    +
    `--alignment=number' +
    +Align strings to number bytes (default: 1). + +
    `-h' +
    +
    `--help' +
    +Display this help and exit. + +
    `--no-hash' +
    +Binary file will not include the hash table. + +
    `-o file' +
    +
    `--output-file=file' +
    +Specify output file name as file. + +
    `--strict' +
    +Direct the program to work strictly following the Uniforum/Sun +implementation. Currently this only affects the naming of the output +file. If this option is not given the name of the output file is the +same as the domain name. If the strict Uniforum mode is enable the +suffix `.mo' is added to the file name if it is not already +present. + +We find this behaviour of Sun's implementation rather silly and so by +default this mode is not selected. + +
    `-v' +
    +
    `--verbose' +
    +Detect and diagnose input file anomalies which might represent +translation errors. The msgid and msgstr strings are +studied and compared. It is considered abnormal that one string +starts or ends with a newline while the other does not. + +Also, if the string represents a format sring used in a +printf-like function both strings should have the same number of +`%' format specifiers, with matching types. If the flag +c-format or possible-c-format appears in the special +comment #, for this entry a check is performed. For example, the +check will diagnose using `%.*s' against `%s', or `%d' +against `%s', or `%d' against `%x'. It can even handle +positional parameters. + +Normally the xgettext program automatically decides whether a +string is a format string or not. This algorithm is not perfect, +though. It might regard a string as a format string though it is not +used in a printf-like function and so msgfmt might report +errors where there are none. Or the other way round: a string is not +regarded as a format string but it is used in a printf-like +function. + +So solve this problem the programmer can dictate the decision to the +xgettext program (see section Special Comments preceding Keywords). The translator should not +consider removing the flag from the #, line. This "fix" would be +reversed again as soon as msgmerge is called the next time. + +
    `-V' +
    +
    `--version' +
    +Output version information and exit. + +
    + +

    +If input file is `-', standard input is read. If output file +is `-', output is written to standard output. + +

    + + +

    The Format of GNU MO Files

    + +

    +The format of the generated MO files is best described by a picture, +which appears below. + +

    +

    +The first two words serve the identification of the file. The magic +number will always signal GNU MO files. The number is stored in the +byte order of the generating machine, so the magic number really is +two numbers: 0x950412de and 0xde120495. The second +word describes the current revision of the file format. For now the +revision is 0. This might change in future versions, and ensures +that the readers of MO files can distinguish new formats from old +ones, so that both can be handled correctly. The version is kept +separate from the magic number, instead of using different magic +numbers for different formats, mainly because `/etc/magic' is +not updated often. It might be better to have magic separated from +internal format version identification. + +

    +

    +Follow a number of pointers to later tables in the file, allowing +for the extension of the prefix part of MO files without having to +recompile programs reading them. This might become useful for later +inserting a few flag bits, indication about the charset used, new +tables, or other things. + +

    +

    +Then, at offset O and offset T in the picture, two tables +of string descriptors can be found. In both tables, each string +descriptor uses two 32 bits integers, one for the string length, +another for the offset of the string in the MO file, counting in bytes +from the start of the file. The first table contains descriptors +for the original strings, and is sorted so the original strings +are in increasing lexicographical order. The second table contains +descriptors for the translated strings, and is parallel to the first +table: to find the corresponding translation one has to access the +array slot in the second array with the same index. + +

    +

    +Having the original strings sorted enables the use of simple binary +search, for when the MO file does not contain an hashing table, or +for when it is not practical to use the hashing table provided in +the MO file. This also has another advantage, as the empty string +in a PO file GNU gettext is usually translated into +some system information attached to that particular MO file, and the +empty string necessarily becomes the first in both the original and +translated tables, making the system information very easy to find. + +

    +

    +The size S of the hash table can be zero. In this case, the +hash table itself is not contained in the MO file. Some people might +prefer this because a precomputed hashing table takes disk space, and +does not win that much speed. The hash table contains indices +to the sorted array of strings in the MO file. Conflict resolution is +done by double hashing. The precise hashing algorithm used is fairly +dependent of GNU gettext code, and is not documented here. + +

    +

    +As for the strings themselves, they follow the hash file, and each +is terminated with a NUL, and this NUL is not counted in +the length which appears in the string descriptor. The msgfmt +program has an option selecting the alignment for MO file strings. +With this option, each string is separately aligned so it starts at +an offset which is a multiple of the alignment value. On some RISC +machines, a correct alignment will speed things up. + +

    +

    +Nothing prevents a MO file from having embedded NULs in strings. +However, the program interface currently used already presumes +that strings are NUL terminated, so embedded NULs are +somewhat useless. But MO file format is general enough so other +interfaces would be later possible, if for example, we ever want to +implement wide characters right in MO files, where NUL bytes may +accidently appear. + +

    +

    +This particular issue has been strongly debated in the GNU +gettext development forum, and it is expectable that MO file +format will evolve or change over time. It is even possible that many +formats may later be supported concurrently. But surely, we have to +start somewhere, and the MO file format described here is a good start. +Nothing is cast in concrete, and the format may later evolve fairly +easily, so we should feel comfortable with the current approach. + +

    + +
    +        byte
    +             +------------------------------------------+
    +          0  | magic number = 0x950412de                |
    +             |                                          |
    +          4  | file format revision = 0                 |
    +             |                                          |
    +          8  | number of strings                        |  == N
    +             |                                          |
    +         12  | offset of table with original strings    |  == O
    +             |                                          |
    +         16  | offset of table with translation strings |  == T
    +             |                                          |
    +         20  | size of hashing table                    |  == S
    +             |                                          |
    +         24  | offset of hashing table                  |  == H
    +             |                                          |
    +             .                                          .
    +             .    (possibly more entries later)         .
    +             .                                          .
    +             |                                          |
    +          O  | length & offset 0th string  ----------------.
    +      O + 8  | length & offset 1st string  ------------------.
    +              ...                                    ...   | |
    +O + ((N-1)*8)| length & offset (N-1)th string           |  | |
    +             |                                          |  | |
    +          T  | length & offset 0th translation  ---------------.
    +      T + 8  | length & offset 1st translation  -----------------.
    +              ...                                    ...   | | | |
    +T + ((N-1)*8)| length & offset (N-1)th translation      |  | | | |
    +             |                                          |  | | | |
    +          H  | start hash table                         |  | | | |
    +              ...                                    ...   | | | |
    +  H + S * 4  | end hash table                           |  | | | |
    +             |                                          |  | | | |
    +             | NUL terminated 0th string  <----------------' | | |
    +             |                                          |    | | |
    +             | NUL terminated 1st string  <------------------' | |
    +             |                                          |      | |
    +              ...                                    ...       | |
    +             |                                          |      | |
    +             | NUL terminated 0th translation  <---------------' |
    +             |                                          |        |
    +             | NUL terminated 1st translation  <-----------------'
    +             |                                          |
    +              ...                                    ...
    +             |                                          |
    +             +------------------------------------------+
    +
    + +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_7.html b/docs/html/gettext/gettext_7.html new file mode 100644 index 0000000000..758ce8ae69 --- /dev/null +++ b/docs/html/gettext/gettext_7.html @@ -0,0 +1,122 @@ + + + + +GNU gettext utilities - The User's View + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    The User's View

    + +

    +When GNU gettext will truly have reached is goal, average users +should feel some kind of astonished pleasure, seeing the effect of +that strange kind of magic that just makes their own native language +appear everywhere on their screens. As for naive users, they would +ideally have no special pleasure about it, merely taking their own +language for granted, and becoming rather unhappy otherwise. + +

    +

    +So, let's try to describe here how we would like the magic to operate, +as we want the users' view to be the simplest, among all ways one +could look at GNU gettext. All other software engineers: +programmers, translators, maintainers, should work together in such a +way that the magic becomes possible. This is a long and progressive +undertaking, and information is available about the progress of the +Translation Project. + +

    +

    +When a package is distributed, there are two kind of users: +installers who fetch the distribution, unpack it, configure +it, compile it and install it for themselves or others to use; and +end users that call programs of the package, once these have +been installed at their site. GNU gettext is offering magic +for both installers and end users. + +

    + + + +

    The Current `ABOUT-NLS' Matrix

    + +

    +Languages are not equally supported in all packages using GNU +gettext. To know if some package uses GNU gettext, one +may check the distribution for the `ABOUT-NLS' information file, for +some `ll.po' files, often kept together into some `po/' +directory, or for an `intl/' directory. Internationalized packages +have usually many `ll.po' files, where ll represents +the language. section Magic for End Users for a complete description of the format +for ll. + +

    +

    +More generally, a matrix is available for showing the current state +of the Translation Project, listing which packages are prepared for +multi-lingual messages, and which languages is supported by each. +Because this information changes often, this matrix is not kept within +this GNU gettext manual. This information is often found in +file `ABOUT-NLS' from various distributions, but is also as old as +the distribution itself. A recent copy of this `ABOUT-NLS' file, +containing up-to-date information, should generally be found on the +Translation Project sites, and also on most GNU archive sites. + +

    + + +

    Magic for Installers

    + +

    +By default, packages fully using GNU gettext, internally, +are installed in such a way that they to allow translation of +messages. At configuration time, those packages should +automatically detect whether the underlying host system provides usable +catgets or gettext functions. If neither is present, +the GNU gettext library should be automatically prepared +and used. Installers may use special options at configuration +time for changing this behavior. The command `./configure +--with-included-gettext' bypasses system catgets or gettext to +use GNU gettext instead, while `./configure --disable-nls' +produces program totally unable to translate messages. + +

    +

    +Internationalized packages have usually many `ll.po' +files. Unless +translations are disabled, all those available are installed together +with the package. However, the environment variable LINGUAS +may be set, prior to configuration, to limit the installed set. +LINGUAS should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +

    + + +

    Magic for End Users

    + +

    +We consider here those packages using GNU gettext internally, +and for which the installers did not disable translation at +configure time. Then, users only have to set the LANG +environment variable to the appropriate `ll' prior to +using the programs in the package. See section The Current `ABOUT-NLS' Matrix. For example, +let's presume a German site. At the shell prompt, users merely have to +execute `setenv LANG de' (in csh) or `export +LANG; LANG=de' (in sh). They could even do this from their +`.login' or `.profile' file. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_8.html b/docs/html/gettext/gettext_8.html new file mode 100644 index 0000000000..a028ce9f83 --- /dev/null +++ b/docs/html/gettext/gettext_8.html @@ -0,0 +1,896 @@ + + + + +GNU gettext utilities - The Programmer's View + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    The Programmer's View

    + +

    +One aim of the current message catalog implementation provided by +GNU gettext was to use the systems message catalog handling, if the +installer wishes to do so. So we perhaps should first take a look at +the solutions we know about. The people in the POSIX committee does not +manage to agree on one of the semi-official standards which we'll +describe below. In fact they couldn't agree on anything, so nothing +decide only to include an example of an interface. The major Unix vendors +are split in the usage of the two most important specifications: X/Opens +catgets vs. Uniforums gettext interface. We'll describe them both and +later explain our solution of this dilemma. + +

    + + + +

    About catgets

    + +

    +The catgets implementation is defined in the X/Open Portability +Guide, Volume 3, XSI Supplementary Definitions, Chapter 5. But the +process of creating this standard seemed to be too slow for some of +the Unix vendors so they created their implementations on preliminary +versions of the standard. Of course this leads again to problems while +writing platform independent programs: even the usage of catgets +does not guarantee a unique interface. + +

    +

    +Another, personal comment on this that only a bunch of committee members +could have made this interface. They never really tried to program +using this interface. It is a fast, memory-saving implementation, an +user can happily live with it. But programmers hate it (at least me and +some others do...) + +

    +

    +But we must not forget one point: after all the trouble with transfering +the rights on Unix(tm) they at last came to X/Open, the very same who +published this specifications. This leads me to making the prediction +that this interface will be in future Unix standards (e.g. Spec1170) and +therefore part of all Unix implementation (implementations, which are +allowed to wear this name). + +

    + + + +

    The Interface

    + +

    +The interface to the catgets implementation consists of three +functions which correspond to those used in file access: catopen +to open the catalog for using, catgets for accessing the message +tables, and catclose for closing after work is done. Prototypes +for the functions and the needed definitions are in the +<nl_types.h> header file. + +

    +

    +catopen is used like in this: + +

    + +
    +nl_catd catd = catopen ("catalog_name", 0);
    +
    + +

    +The function takes as the argument the name of the catalog. This usual +refers to the name of the program or the package. The second parameter +is not further specified in the standard. I don't even know whether it +is implemented consistently among various systems. So the common advice +is to use 0 as the value. The return value is a handle to the +message catalog, equivalent to handles to file returned by open. + +

    +

    +This handle is of course used in the catgets function which can +be used like this: + +

    + +
    +char *translation = catgets (catd, set_no, msg_id, "original string");
    +
    + +

    +The first parameter is this catalog descriptor. The second parameter +specifies the set of messages in this catalog, in which the message +described by msg_id is obtained. catgets therefore uses a +three-stage addressing: + +

    + +
    +catalog name => set number => message ID => translation
    +
    + +

    +The fourth argument is not used to address the translation. It is given +as a default value in case when one of the addressing stages fail. One +important thing to remember is that although the return type of catgets +is char * the resulting string must not be changed. It +should better const char *, but the standard is published in +1988, one year before ANSI C. + +

    +

    +The last of these function functions is used and behaves as expected: + +

    + +
    +catclose (catd);
    +
    + +

    +After this no catgets call using the descriptor is legal anymore. + +

    + + +

    Problems with the catgets Interface?!

    + +

    +Now that this descriptions seemed to be really easy where are the +problem we speak of. In fact the interface could be used in a +reasonable way, but constructing the message catalogs is a pain. The +reason for this lies in the third argument of catgets: the unique +message ID. This has to be a numeric value for all messages in a single +set. Perhaps you could imagine the problems keeping such list while +changing the source code. Add a new message here, remove one there. Of +course there have been developed a lot of tools helping to organize this +chaos but one as the other fails in one aspect or the other. We don't +want to say that the other approach has no problems but they are far +more easily to manage. + +

    + + +

    About gettext

    + +

    +The definition of the gettext interface comes from a Uniforum +proposal and it is followed by at least one major Unix vendor +(Sun) in its last developments. It is not specified in any official +standard, though. + +

    +

    +The main points about this solution is that it does not follow the +method of normal file handling (open-use-close) and that it does not +burden the programmer so many task, especially the unique key handling. +Of course here is also a unique key needed, but this key is the +message itself (how long or short it is). See section Comparing the Two Interfaces for a +more detailed comparison of the two methods. + +

    +

    +The following section contains a rather detailed description of the +interface. We make it that detailed because this is the interface +we chose for the GNU gettext Library. Programmers interested +in using this library will be interested in this description. + +

    + + + +

    The Interface

    + +

    +The minimal functionality an interface must have is a) to select a +domain the strings are coming from (a single domain for all programs is +not reasonable because its construction and maintenance is difficult, +perhaps impossible) and b) to access a string in a selected domain. + +

    +

    +This is principally the description of the gettext interface. It +has an global domain which unqualified usages reference. Of course this +domain is selectable by the user. + +

    + +
    +char *textdomain (const char *domain_name);
    +
    + +

    +This provides the possibility to change or query the current status of +the current global domain of the LC_MESSAGE category. The +argument is a null-terminated string, whose characters must be legal in +the use in filenames. If the domain_name argument is NULL, +the function return the current value. If no value has been set +before, the name of the default domain is returned: messages. +Please note that although the return value of textdomain is of +type char * no changing is allowed. It is also important to know +that no checks of the availability are made. If the name is not +available you will see this by the fact that no translations are provided. + +

    +

    +To use a domain set by textdomain the function + +

    + +
    +char *gettext (const char *msgid);
    +
    + +

    +is to be used. This is the simplest reasonable form one can imagine. +The translation of the string msgid is returned if it is available +in the current domain. If not available the argument itself is +returned. If the argument is NULL the result is undefined. + +

    +

    +One things which should come into mind is that no explicit dependency to +the used domain is given. The current value of the domain for the +LC_MESSAGES locale is used. If this changes between two +executions of the same gettext call in the program, both calls +reference a different message catalog. + +

    +

    +For the easiest case, which is normally used in internationalized +packages, once at the beginning of execution a call to textdomain +is issued, setting the domain to a unique name, normally the package +name. In the following code all strings which have to be translated are +filtered through the gettext function. That's all, the package speaks +your language. + +

    + + +

    Solving Ambiguities

    + +

    +While this single name domain work good for most applications there +might be the need to get translations from more than one domain. Of +course one could switch between different domains with calls to +textdomain, but this is really not convenient nor is it fast. A +possible situation could be one case discussing while this writing: all +error messages of functions in the set of common used functions should +go into a separate domain error. By this mean we would only need +to translate them once. + +

    +

    +For this reasons there are two more functions to retrieve strings: + +

    + +
    +char *dgettext (const char *domain_name, const char *msgid);
    +char *dcgettext (const char *domain_name, const char *msgid,
    +                 int category);
    +
    + +

    +Both take an additional argument at the first place, which corresponds +to the argument of textdomain. The third argument of +dcgettext allows to use another locale but LC_MESSAGES. +But I really don't know where this can be useful. If the +domain_name is NULL or category has an value beside +the known ones, the result is undefined. It should also be noted that +this function is not part of the second known implementation of this +function family, the one found in Solaris. + +

    +

    +A second ambiguity can arise by the fact, that perhaps more than one +domain has the same name. This can be solved by specifying where the +needed message catalog files can be found. + +

    + +
    +char *bindtextdomain (const char *domain_name,
    +                      const char *dir_name);
    +
    + +

    +Calling this function binds the given domain to a file in the specified +directory (how this file is determined follows below). Especially a +file in the systems default place is not favored against the specified +file anymore (as it would be by solely using textdomain). A +NULL pointer for the dir_name parameter returns the binding +associated with domain_name. If domain_name itself is +NULL nothing happens and a NULL pointer is returned. Here +again as for all the other functions is true that none of the return +value must be changed! + +

    +

    +It is important to remember that relative path names for the +dir_name parameter can be trouble. Since the path is always +computed relative to the current directory different results will be +achieved when the program executes a chdir command. Relative +paths should always be avoided to avoid dependencies and +unreliabilities. + +

    + + +

    Locating Message Catalog Files

    + +

    +Because many different languages for many different packages have to be +stored we need some way to add these information to file message catalog +files. The way usually used in Unix environments is have this encoding +in the file name. This is also done here. The directory name given in +bindtextdomains second argument (or the default directory), +followed by the value and name of the locale and the domain name are +concatenated: + +

    + +
    +dir_name/locale/LC_category/domain_name.mo
    +
    + +

    +The default value for dir_name is system specific. For the GNU +library, and for packages adhering to its conventions, it's: + +

    +/usr/local/share/locale
    +
    + +

    +locale is the value of the locale whose name is this +LC_category. For gettext and dgettext this +locale is always LC_MESSAGES. dcgettext specifies the +locale by the third argument.(2) (3) + +

    + + +

    Optimization of the *gettext functions

    + +

    +At this point of the discussion we should talk about an advantage of the +GNU gettext implementation. Some readers might have pointed out +that an internationalized program might have a poor performance if some +string has to be translated in an inner loop. While this is unavoidable +when the string varies from one run of the loop to the other it is +simply a waste of time when the string is always the same. Take the +following example: + +

    + +
    +{
    +  while (...)
    +    {
    +      puts (gettext ("Hello world"));
    +    }
    +}
    +
    + +

    +When the locale selection does not change between two runs the resulting +string is always the same. One way to use this is: + +

    + +
    +{
    +  str = gettext ("Hello world");
    +  while (...)
    +    {
    +      puts (str);
    +    }
    +}
    +
    + +

    +But this solution is not usable in all situation (e.g. when the locale +selection changes) nor is it good readable. + +

    +

    +The GNU C compiler, version 2.7 and above, provide another solution for +this. To describe this we show here some lines of the +`intl/libgettext.h' file. For an explanation of the expression +command block see section `Statements and Declarations in Expressions' in The GNU CC Manual. + +

    + +
    +#  if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
    +extern int _nl_msg_cat_cntr;
    +#   define	dcgettext(domainname, msgid, category)           \
    +  (__extension__                                                 \
    +   ({                                                            \
    +     char *result;                                               \
    +     if (__builtin_constant_p (msgid))                           \
    +       {                                                         \
    +         static char *__translation__;                           \
    +         static int __catalog_counter__;                         \
    +         if (! __translation__                                   \
    +             || __catalog_counter__ != _nl_msg_cat_cntr)         \
    +           {                                                     \
    +             __translation__ =                                   \
    +               dcgettext__ ((domainname), (msgid), (category));  \
    +             __catalog_counter__ = _nl_msg_cat_cntr;             \
    +           }                                                     \
    +         result = __translation__;                               \
    +       }                                                         \
    +     else                                                        \
    +       result = dcgettext__ ((domainname), (msgid), (category)); \
    +     result;                                                     \
    +    }))
    +#  endif
    +
    + +

    +The interesting thing here is the __builtin_constant_p predicate. +This is evaluated at compile time and so optimization can take place +immediately. Here two cases are distinguished: the argument to +gettext is not a constant value in which case simply the function +dcgettext__ is called, the real implementation of the +dcgettext function. + +

    +

    +If the string argument is constant we can reuse the once gained +translation when the locale selection has not changed. This is exactly +what is done here. The _nl_msg_cat_cntr variable is defined in +the `loadmsgcat.c' which is available in `libintl.a' and is +changed whenever a new message catalog is loaded. + +

    + + +

    Comparing the Two Interfaces

    + +

    +The following discussion is perhaps a little bit colored. As said +above we implemented GNU gettext following the Uniforum +proposal and this surely has its reasons. But it should show how we +came to this decision. + +

    +

    +First we take a look at the developing process. When we write an +application using NLS provided by gettext we proceed as always. +Only when we come to a string which might be seen by the users and thus +has to be translated we use gettext("...") instead of +"...". At the beginning of each source file (or in a central +header file) we define + +

    + +
    +#define gettext(String) (String)
    +
    + +

    +Even this definition can be avoided when the system supports the +gettext function in its C library. When we compile this code the +result is the same as if no NLS code is used. When you take a look at +the GNU gettext code you will see that we use _("...") +instead of gettext("..."). This reduces the number of +additional characters per translatable string to 3 (in words: +three). + +

    +

    +When now a production version of the program is needed we simply replace +the definition + +

    + +
    +#define _(String) (String)
    +
    + +

    +by + +

    + +
    +#include <libintl.h>
    +#define _(String) gettext (String)
    +
    + +

    +Additionally we run the program `xgettext' on all source code file +which contain translatable strings and that's it: we have a running +program which does not depend on translations to be available, but which +can use any that becomes available. + +

    +

    +The same procedure can be done for the gettext_noop invocations +(see section Special Cases of Translatable Strings). First you can define gettext_noop to a +no-op macro and later use the definition from `libintl.h'. Because +this name is not used in Suns implementation of `libintl.h', +you should consider the following code for your project: + +

    + +
    +#ifdef gettext_noop
    +# define N_(String) gettext_noop (String)
    +#else
    +# define N_(String) (String)
    +#endif
    +
    + +

    +N_ is a short form similar to _. The `Makefile' in +the `po/' directory of GNU gettext knows by default both of the +mentioned short forms so you are invited to follow this proposal for +your own ease. + +

    +

    +Now to catgets. The main problem is the work for the +programmer. Every time he comes to a translatable string he has to +define a number (or a symbolic constant) which has also be defined in +the message catalog file. He also has to take care for duplicate +entries, duplicate message IDs etc. If he wants to have the same +quality in the message catalog as the GNU gettext program +provides he also has to put the descriptive comments for the strings and +the location in all source code files in the message catalog. This is +nearly a Mission: Impossible. + +

    +

    +But there are also some points people might call advantages speaking for +catgets. If you have a single word in a string and this string +is used in different contexts it is likely that in one or the other +language the word has different translations. Example: + +

    + +
    +printf ("%s: %d", gettext ("number"), number_of_errors)
    +
    +printf ("you should see %d %s", number_count,
    +        number_count == 1 ? gettext ("number") : gettext ("numbers"))
    +
    + +

    +Here we have to translate two times the string "number". Even +if you do not speak a language beside English it might be possible to +recognize that the two words have a different meaning. In German the +first appearance has to be translated to "Anzahl" and the second +to "Zahl". + +

    +

    +Now you can say that this example is really esoteric. And you are +right! This is exactly how we felt about this problem and decide that +it does not weight that much. The solution for the above problem could +be very easy: + +

    + +
    +printf ("%s %d", gettext ("number:"), number_of_errors)
    +
    +printf (number_count == 1 ? gettext ("you should see %d number")
    +                          : gettext ("you should see %d numbers"),
    +        number_count)
    +
    + +

    +We believe that we can solve all conflicts with this method. If it is +difficult one can also consider changing one of the conflicting string a +little bit. But it is not impossible to overcome. + +

    +

    +Translator note: It is perhaps appropriate here to tell those English +speaking programmers that the plural form of a noun cannot be formed by +appending a single `s'. Most other languages use different methods. +Even the above form is not general enough to cope with all languages. +Rafal Maszkowski <rzm@mat.uni.torun.pl> reports: + +

    + +
    +

    +In Polish we use e.g. plik (file) this way: + +

    +1 plik
    +2,3,4 pliki
    +5-21 pliko'w
    +22-24 pliki
    +25-31 pliko'w
    +
    + +

    +and so on (o' means 8859-2 oacute which should be rather okreska, +similar to aogonek). +

    + +

    +A workable approach might be to consider methods like the one used for +LC_TIME in the POSIX.2 standard. The value of the +alt_digits field can be up to 100 strings which represent the +numbers 1 to 100. Using this in a situation of an internationalized +program means that an array of translatable strings should be indexed by +the number which should represent. A small example: + +

    + +
    +void
    +print_month_info (int month)
    +{
    +  const char *month_pos[12] =
    +  { N_("first"), N_("second"), N_("third"),    N_("fourth"),
    +    N_("fifth"), N_("sixth"),  N_("seventh"),  N_("eighth"),
    +    N_("ninth"), N_("tenth"),  N_("eleventh"), N_("twelfth") };
    +  printf (_("%s is the %s month\n"), nl_langinfo (MON_1 + month),
    +          _(month_pos[month]));
    +}
    +
    + +

    +It should be obvious that this method is only reasonable for small +ranges of numbers. + +

    + + + +

    Using libintl.a in own programs

    + +

    +Starting with version 0.9.4 the library libintl.h should be +self-contained. I.e., you can use it in your own programs without +providing additional functions. The `Makefile' will put the header +and the library in directories selected using the $(prefix). + +

    +

    +One exception of the above is found on HP-UX systems. Here the C library +does not contain the alloca function (and the HP compiler does +not generate it inlined). But it is not intended to rewrite the whole +library just because of this dumb system. Instead include the +alloca function in all package you use the libintl.a in. + +

    + + +

    Being a gettext grok

    + +

    +To fully exploit the functionality of the GNU gettext library it +is surely helpful to read the source code. But for those who don't want +to spend that much time in reading the (sometimes complicated) code here +is a list comments: + +

    + +
      +
    • Changing the language at runtime + +For interactive programs it might be useful to offer a selection of the +used language at runtime. To understand how to do this one need to know +how the used language is determined while executing the gettext +function. The method which is presented here only works correctly +with the GNU implementation of the gettext functions. It is not +possible with underlying catgets functions or gettext +functions from the systems C library. The exception is of course the +GNU C Library which uses the GNU gettext Library for message handling. + +In the function dcgettext at every call the current setting of +the highest priority environment variable is determined and used. +Highest priority means here the following list with decreasing +priority: + + +
        +
      1. LANGUAGE + +
      2. LC_ALL + +
      3. LC_xxx, according to selected locale + +
      4. LANG + +
      + +Afterwards the path is constructed using the found value and the +translation file is loaded if available. + +What is now when the value for, say, LANGUAGE changes. According +to the process explained above the new value of this variable is found +as soon as the dcgettext function is called. But this also means +the (perhaps) different message catalog file is loaded. In other +words: the used language is changed. + +But there is one little hook. The code for gcc-2.7.0 and up provides +some optimization. This optimization normally prevents the calling of +the dcgettext function as long as no new catalog is loaded. But +if dcgettext is not called the program also cannot find the +LANGUAGE variable be changed (see section Optimization of the *gettext functions). A +solution for this is very easy. Include the following code in the +language switching function. + + +
      +  /* Change language.  */
      +  setenv ("LANGUAGE", "fr", 1);
      +
      +  /* Make change known.  */
      +  {
      +    extern int  _nl_msg_cat_cntr;
      +    ++_nl_msg_cat_cntr;
      +  }
      +
      + +The variable _nl_msg_cat_cntr is defined in `loadmsgcat.c'. +The programmer will find himself in need for a construct like this only +when developing programs which do run longer and provide the user to +select the language at runtime. Non-interactive programs (like all +these little Unix tools) should never need this. + +
    + + + +

    Temporary Notes for the Programmers Chapter

    + + + +

    Temporary - Two Possible Implementations

    + +

    +There are two competing methods for language independent messages: +the X/Open catgets method, and the Uniforum gettext +method. The catgets method indexes messages by integers; the +gettext method indexes them by their English translations. +The catgets method has been around longer and is supported +by more vendors. The gettext method is supported by Sun, +and it has been heard that the COSE multi-vendor initiative is +supporting it. Neither method is a POSIX standard; the POSIX.1 +committee had a lot of disagreement in this area. + +

    +

    +Neither one is in the POSIX standard. There was much disagreement +in the POSIX.1 committee about using the gettext routines +vs. catgets (XPG). In the end the committee couldn't +agree on anything, so no messaging system was included as part +of the standard. I believe the informative annex of the standard +includes the XPG3 messaging interfaces, "...as an example of +a messaging system that has been implemented..." + +

    +

    +They were very careful not to say anywhere that you should use one +set of interfaces over the other. For more on this topic please +see the Programming for Internationalization FAQ. + +

    + + +

    Temporary - About catgets

    + +

    +There have been a few discussions of late on the use of +catgets as a base. I think it important to present both +sides of the argument and hence am opting to play devil's advocate +for a little bit. + +

    +

    +I'll not deny the fact that catgets could have been designed +a lot better. It currently has quite a number of limitations and +these have already been pointed out. + +

    +

    +However there is a great deal to be said for consistency and +standardization. A common recurring problem when writing Unix +software is the myriad portability problems across Unix platforms. +It seems as if every Unix vendor had a look at the operating system +and found parts they could improve upon. Undoubtedly, these +modifications are probably innovative and solve real problems. +However, software developers have a hard time keeping up with all +these changes across so many platforms. + +

    +

    +And this has prompted the Unix vendors to begin to standardize their +systems. Hence the impetus for Spec1170. Every major Unix vendor +has committed to supporting this standard and every Unix software +developer waits with glee the day they can write software to this +standard and simply recompile (without having to use autoconf) +across different platforms. + +

    +

    +As I understand it, Spec1170 is roughly based upon version 4 of the +X/Open Portability Guidelines (XPG4). Because catgets and +friends are defined in XPG4, I'm led to believe that catgets +is a part of Spec1170 and hence will become a standardized component +of all Unix systems. + +

    + + +

    Temporary - Why a single implementation

    + +

    +Now it seems kind of wasteful to me to have two different systems +installed for accessing message catalogs. If we do want to remedy +catgets deficiencies why don't we try to expand catgets +(in a compatible manner) rather than implement an entirely new system. +Otherwise, we'll end up with two message catalog access systems installed +with an operating system - one set of routines for packages using GNU +gettext for their internationalization, and another set of routines +(catgets) for all other software. Bloated? + +

    +

    +Supposing another catalog access system is implemented. Which do +we recommend? At least for Linux, we need to attract as many +software developers as possible. Hence we need to make it as easy +for them to port their software as possible. Which means supporting +catgets. We will be implementing the glocale code +within our libc, but does this mean we also have to incorporate +another message catalog access scheme within our libc as well? +And what about people who are going to be using the glocale ++ non-catgets routines. When they port their software to +other platforms, they're now going to have to include the front-end +(glocale) code plus the back-end code (the non-catgets +access routines) with their software instead of just including the +glocale code with their software. + +

    +

    +Message catalog support is however only the tip of the iceberg. +What about the data for the other locale categories. They also have +a number of deficiencies. Are we going to abandon them as well and +develop another duplicate set of routines (should glocale +expand beyond message catalog support)? + +

    +

    +Like many parts of Unix that can be improved upon, we're stuck with balancing +compatibility with the past with useful improvements and innovations for +the future. + +

    + + + +

    Temporary - Notes

    + +

    +X/Open agreed very late on the standard form so that many +implementations differ from the final form. Both of my system (old +Linux catgets and Ultrix-4) have a strange variation. + +

    +

    +OK. After incorporating the last changes I have to spend some time on +making the GNU/Linux libc gettext functions. So in future +Solaris is not the only system having gettext. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_9.html b/docs/html/gettext/gettext_9.html new file mode 100644 index 0000000000..f9b5852532 --- /dev/null +++ b/docs/html/gettext/gettext_9.html @@ -0,0 +1,513 @@ + + + + +GNU gettext utilities - The Translator's View + + + + + + +

    Go to the first, previous, next, last section, table of contents. +


    + + +

    The Translator's View

    + + + +

    Introduction 0

    + +

    +GNU is going international! The Translation Project is a way +to get maintainers, translators and users all together, so GNU will +gradually become able to speak many native languages. + +

    +

    +The GNU gettext tool set contains everything maintainers +need for internationalizing their packages for messages. It also +contains quite useful tools for helping translators at localizing +messages to their native language, once a package has already been +internationalized. + +

    +

    +To achieve the Translation Project, we need many interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +If you'd like to volunteer to work at translating messages, +please send mail to your translating team. + +

    +

    +Each team has its own mailing list, courtesy of Linux +International. You may reach your translating team at the address +`ll@li.org', replacing ll by the two-letter ISO 639 +code for your language. Language codes are not the same as +country codes given in ISO 3166. The following translating teams +exist: + +

    + +
    +

    +Chinese zh, Czech cs, Danish da, Dutch nl, +Esperanto eo, Finnish fi, French fr, Irish +ga, German de, Greek el, Italian it, +Japanese ja, Indonesian in, Norwegian no, Polish +pl, Portuguese pt, Russian ru, Spanish es, +Swedish sv and Turkish tr. +

    + +

    +For example, you may reach the Chinese translating team by writing to +`zh@li.org'. When you become a member of the translating team +for your own language, you may subscribe to its list. For example, +Swedish people can send a message to `sv-request@li.org', +having this message body: + +

    + +
    +subscribe
    +
    + +

    +Keep in mind that team members should be interested in working +at translations, or at solving translational difficulties, rather than +merely lurking around. If your team does not exist yet and you want to +start one, please write to `gnu-translation@prep.ai.mit.edu'; +you will then reach the GNU coordinator for all translator teams. + +

    +

    +A handful of GNU packages have already been adapted and provided +with message translations for several languages. Translation +teams have begun to organize, using these packages as a starting +point. But there are many more packages and many languages for +which we have no volunteer translators. If you would like to +volunteer to work at translating messages, please send mail to +`gnu-translation@prep.ai.mit.edu' indicating what language(s) +you can work on. + +

    + + +

    Introduction 1

    + +

    +This is now official, GNU is going international! Here is the +announcement submitted for the January 1995 GNU Bulletin: + +

    + +
    +

    +A handful of GNU packages have already been adapted and provided +with message translations for several languages. Translation +teams have begun to organize, using these packages as a starting +point. But there are many more packages and many languages +for which we have no volunteer translators. If you'd like to +volunteer to work at translating messages, please send mail to +`gnu-translation@prep.ai.mit.edu' indicating what language(s) +you can work on. +

    + +

    +This document should answer many questions for those who are curious +about the process or would like to contribute. Please at least skim +over it, hoping to cut down a little of the high volume of e-mail +generated by this collective effort towards GNU internationalization. + +

    +

    +Most free programming which is widely shared is done in English, and +currently, English is used as the main communicating language between +national communities collaborating to the GNU project. This very document +is written in English. This will not change in the foreseeable future. + +

    +

    +However, there is a strong appetite from national communities for +having more software able to write using national language and habits, +and there is an on-going effort to modify GNU software in such a way +that it becomes able to do so. The experiments driven so far raised +an enthusiastic response from pretesters, so we believe that GNU +internationalization is dedicated to succeed. + +

    +

    +For suggestion clarifications, additions or corrections to this +document, please e-mail to `gnu-translation@prep.ai.mit.edu'. + +

    + + +

    Discussions

    + +

    +Facing this internationalization effort, a few users expressed their +concerns. Some of these doubts are presented and discussed, here. + +

    + +
      +
    • Smaller groups + +Some languages are not spoken by a very large number of people, so people +speaking them sometimes consider that there may not be all that much +demand such versions of free software packages. Moreover, many people +being into computers, in some countries, generally seem to prefer +English versions of their software. + +On the other end, people might enjoy their own language a lot, and be +very motivated at providing to themselves the pleasure of having their +beloved free software speaking their mother tongue. They do themselves +a personal favor, and do not pay that much attention to the number of +people beneficiating of their work. + +
    • Misinterpretation + +Other users are shy to push forward their own language, seeing in this +some kind of misplaced propaganda. Someone thought there must be some +users of the language over the networks pestering other people with it. + +But any spoken language is worth localization, because there are +people behind the language for whom the language is important and +dear to their hearts. + +
    • Odd translations + +The biggest problem is to find the right translations so that +everybody can understand the messages. Translations are usually a +little odd. Some people get used to English, to the extent they may +find translations into their own language "rather pushy, obnoxious +and sometimes even hilarious." As a French speaking man, I have +the experience of those instruction manuals for goods, so poorly +translated in French in Korea or Taiwan... + +The fact is that we sometimes have to create a kind of national +computer culture, and this is not easy without the collaboration of +many people liking their mother tongue. This is why translations are +better achieved by people knowing and loving their own language, and +ready to work together at improving the results they obtain. + +
    • Dependencies over the GPL + +Some people wonder if using GNU gettext necessarily brings their package +under the protective wing of the GNU General Public License, when they +do not want to make their program free, or want other kinds of freedom. +The simplest answer is yes. + +The mere marking of localizable strings in a package, or conditional +inclusion of a few lines for initialization, is not really including +GPL'ed code. However, the localization routines themselves are under +the GPL and would bring the remainder of the package under the GPL +if they were distributed with it. So, I presume that, for those +for which this is a problem, it could be circumvented by letting to +the end installers the burden of assembling a package prepared for +localization, but not providing the localization routines themselves. + +
    + + + +

    Organization

    + +

    +On a larger scale, the true solution would be to organize some kind of +fairly precise set up in which volunteers could participate. I gave +some thought to this idea lately, and realize there will be some +touchy points. I thought of writing to Richard Stallman to launch +such a project, but feel it might be good to shake out the ideas +between ourselves first. Most probably that Linux International has +some experience in the field already, or would like to orchestrate +the volunteer work, maybe. Food for thought, in any case! + +

    +

    +I guess we have to setup something early, somehow, that will help +many possible contributors of the same language to interlock and avoid +work duplication, and further be put in contact for solving together +problems particular to their tongue (in most languages, there are many +difficulties peculiar to translating technical English). My Swedish +contributor acknowledged these difficulties, and I'm well aware of +them for French. + +

    +

    +This is surely not a technical issue, but we should manage so the +effort of locale contributors be maximally useful, despite the national +team layer interface between contributors and maintainers. + +

    +

    +The Translation Project needs some setup for coordinating language +coordinators. Localizing evolving programs will surely +become a permanent and continuous activity in the free software community, +once well started. +The setup should be minimally completed and tested before GNU +gettext becomes an official reality. The e-mail address +`translation@iro.umontreal.ca' has been setup for receiving +offers from volunteers and general e-mail on these topics. This address +reaches the Translation Project coordinator. + +

    + + + +

    Central Coordination

    + +

    +I also think GNU will need sooner than it thinks, that someone setup +a way to organize and coordinate these groups. Some kind of group +of groups. My opinion is that it would be good that GNU delegates +this task to a small group of collaborating volunteers, shortly. +Perhaps in `gnu.announce' a list of this national committee's +can be published. + +

    +

    +My role as coordinator would simply be to refer to Ulrich any German +speaking volunteer interested to localization of free software packages, and +maybe helping national groups to initially organize, while maintaining +national registries for until national groups are ready to take over. +In fact, the coordinator should ease volunteers to get in contact with +one another for creating national teams, which should then select +one coordinator per language, or country (regionalized language). +If well done, the coordination should be useful without being an +overwhelming task, the time to put delegations in place. + +

    + + +

    National Teams

    + +

    +I suggest we look for volunteer coordinators/editors for individual +languages. These people will scan contributions of translation files +for various programs, for their own languages, and will ensure high +and uniform standards of diction. + +

    +

    +From my current experience with other people in these days, those who +provide localizations are very enthusiastic about the process, and are +more interested in the localization process than in the program they +localize, and want to do many programs, not just one. This seems +to confirm that having a coordinator/editor for each language is a +good idea. + +

    +

    +We need to choose someone who is good at writing clear and concise +prose in the language in question. That is hard--we can't check +it ourselves. So we need to ask a few people to judge each others' +writing and select the one who is best. + +

    +

    +I announce my prerelease to a few dozen people, and you would not +believe all the discussions it generated already. I shudder to think +what will happen when this will be launched, for true, officially, +world wide. Who am I to arbitrate between two Czekolsovak users +contradicting each other, for example? + +

    +

    +I assume that your German is not much better than my French so that +I would not be able to judge about these formulations. What I would +suggest is that for each language there is a group for people who +maintain the PO files and judge about changes. I suspect there will +be cultural differences between how such groups of people will behave. +Some will have relaxed ways, reach consensus easily, and have anyone +of the group relate to the maintainers, while others will fight to +death, organize heavy administrations up to national standards, and +use strict channels. + +

    +

    +The German team is putting out a good example. Right now, they are +maybe half a dozen people revising translations of each other and +discussing the linguistic issues. I do not even have all the names. +Ulrich Drepper is taking care of coordinating the German team. +He subscribed to all my pretest lists, so I do not even have to warn +him specifically of incoming releases. + +

    +

    +I'm sure, that is a good idea to get teams for each language working +on translations. That will make the translations better and more +consistent. + +

    + + + +

    Sub-Cultures

    + +

    +Taking French for example, there are a few sub-cultures around computers +which developed diverging vocabularies. Picking volunteers here and +there without addressing this problem in an organized way, soon in the +project, might produce a distasteful mix of internationalized programs, +and possibly trigger endless quarrels among those who really care. + +

    +

    +Keeping some kind of unity in the way French localization of +internationalized programs is achieved is a difficult (and delicate) job. +Knowing the latin character of French people (:-), if we take this +the wrong way, we could end up nowhere, or spoil a lot of energies. +Maybe we should begin to address this problem seriously before +GNU gettext become officially published. And I suspect that this +means soon! + +

    + + +

    Organizational Ideas

    + +

    +I expect the next big changes after the official release. Please note +that I use the German translation of the short GPL message. We need +to set a few good examples before the localization goes out for true +in the free software community. Here are a few points to discuss: + +

    + +
      +
    • + +Each group should have one FTP server (at least one master). + +
    • + +The files on the server should reflect the latest version (of +course!) and it should also contain a RCS directory with the +corresponding archives (I don't have this now). + +
    • + +There should also be a ChangeLog file (this is more useful than the +RCS archive but can be generated automatically from the later by +Emacs). + +
    • + +A core group should judge about questionable changes (for now +this group consists solely by me but I ask some others occasionally; +this also seems to work). + +
    + + + +

    Mailing Lists

    + +

    +If we get any inquiries about GNU gettext, send them on to: + +

    + +
    +`translation@iro.umontreal.ca'
    +
    + +

    +The `*-pretest' lists are quite useful to me, maybe the idea could +be generalized to many GNU, and non-GNU packages. But each maintainer +his/her way! + +

    +

    +Fran@,{c}ois, we have a mechanism in place here at +`gnu.ai.mit.edu' to track teams, support mailing lists for +them and log members. We have a slight preference that you use it. +If this is OK with you, I can get you clued in. + +

    +

    +Things are changing! A few years ago, when Daniel Fekete and I +asked for a mailing list for GNU localization, nested at the FSF, we +were politely invited to organize it anywhere else, and so did we. +For communicating with my pretesters, I later made a handful of +mailing lists located at iro.umontreal.ca and administrated by +majordomo. These lists have been very dependable +so far... + +

    +

    +I suspect that the German team will organize itself a mailing list +located in Germany, and so forth for other countries. But before they +organize for true, it could surely be useful to offer mailing lists +located at the FSF to each national team. So yes, please explain me +how I should proceed to create and handle them. + +

    +

    +We should create temporary mailing lists, one per country, to help +people organize. Temporary, because once regrouped and structured, it +would be fair the volunteers from country bring back their list +in there and manage it as they want. My feeling is that, in the long +run, each team should run its own list, from within their country. +There also should be some central list to which all teams could +subscribe as they see fit, as long as each team is represented in it. + +

    + + +

    Information Flow

    + +

    +There will surely be some discussion about this messages after the +packages are finally released. If people now send you some proposals +for better messages, how do you proceed? Jim, please note that +right now, as I put forward nearly a dozen of localizable programs, I +receive both the translations and the coordination concerns about them. + +

    +

    +If I put one of my things to pretest, Ulrich receives the announcement +and passes it on to the German team, who make last minute revisions. +Then he submits the translation files to me as the maintainer. +For free packages I do not maintain, I would not even hear about it. +This scheme could be made to work for the whole Translation Project, +I think. For security reasons, maybe Ulrich (national coordinators, +in fact) should update central registry kept at the Translation Project +(Jim, me, or Len's recruits) once in a while. + +

    +

    +In December/January, I was aggressively ready to internationalize +all of GNU, giving myself the duty of one small GNU package per week +or so, taking many weeks or months for bigger packages. But it does +not work this way. I first did all the things I'm responsible for. +I've nothing against some missionary work on other maintainers, but +I'm also loosing a lot of energy over it--same debates over again. + +

    +

    +And when the first localized packages are released we'll get a lot of +responses about ugly translations :-). Surely, and we need to have +beforehand a fairly good idea about how to handle the information +flow between the national teams and the package maintainers. + +

    +

    +Please start saving somewhere a quick history of each PO file. I know +for sure that the file format will change, allowing for comments. +It would be nice that each file has a kind of log, and references for +those who want to submit comments or gripes, or otherwise contribute. +I sent a proposal for a fast and flexible format, but it is not +receiving acceptance yet by the GNU deciders. I'll tell you when I +have more information about this. + +

    +


    +

    Go to the first, previous, next, last section, table of contents. + + diff --git a/docs/html/gettext/gettext_foot.html b/docs/html/gettext/gettext_foot.html new file mode 100644 index 0000000000..2e742b9ad9 --- /dev/null +++ b/docs/html/gettext/gettext_foot.html @@ -0,0 +1,35 @@ + + + + +GNU gettext utilities - Footnotes + + + +

    GNU gettext tools, version 0.10.35

    +

    Native Language Support Library and Tools

    +

    Edition 0.10.35, 1 May 1998

    +
    Ulrich Drepper
    +
    Jim Meyering
    +
    Fran@,{c}ois Pinard
    +

    +


    +

    (1)

    +

    This +limitation is not imposed by GNU gettext, but comes from the +msgfmt implementation on Solaris. +

    (2)

    +

    Some +system, eg Ultrix, don't have LC_MESSAGES. Here we use a more or +less arbitrary value for it. +

    (3)

    +

    When the system does not support +setlocale its behavior in setting the locale values is simulated +by looking at the environment variables. +


    +This document was generated on 25 January 1999 using the +texi2html +translator version 1.51a.

    + + diff --git a/docs/html/gettext/gettext_toc.html b/docs/html/gettext/gettext_toc.html new file mode 100644 index 0000000000..c2d8d36831 --- /dev/null +++ b/docs/html/gettext/gettext_toc.html @@ -0,0 +1,143 @@ + + + + +GNU gettext utilities - Table of Contents + + + +

    GNU gettext tools, version 0.10.35

    +

    Native Language Support Library and Tools

    +

    Edition 0.10.35, 1 May 1998

    +
    Ulrich Drepper
    +
    Jim Meyering
    +
    Fran@,{c}ois Pinard
    +

    +


    + +

    + + +


    +This document was generated on 25 January 1999 using the +texi2html +translator version 1.51a.

    + + diff --git a/docs/html/gettext/index.html b/docs/html/gettext/index.html new file mode 100644 index 0000000000..c2d8d36831 --- /dev/null +++ b/docs/html/gettext/index.html @@ -0,0 +1,143 @@ + + + + +GNU gettext utilities - Table of Contents + + + +

    GNU gettext tools, version 0.10.35

    +

    Native Language Support Library and Tools

    +

    Edition 0.10.35, 1 May 1998

    +
    Ulrich Drepper
    +
    Jim Meyering
    +
    Fran@,{c}ois Pinard
    +

    +


    + +

    + + +


    +This document was generated on 25 January 1999 using the +texi2html +translator version 1.51a.

    + + diff --git a/docs/html/gettext/msgfmt.htm b/docs/html/gettext/msgfmt.htm deleted file mode 100644 index 7c4834163a..0000000000 --- a/docs/html/gettext/msgfmt.htm +++ /dev/null @@ -1,222 +0,0 @@ - - - - - -msgfmt(1) manual page - - -Table of Contents

    - -

    NAME

    -msgfmt - create a message object from a message file -

    SYNOPSIS -

    -msgfmt [ -v ] [ -o output-file ] ... -

    DESCRIPTION

    -

    -msgfmt creates message -object files from portable object files (filename.po ), without changing -the portable object files.

    -The .po file contains messages displayed to -users by system commands or by application programs. .po files can be edited, -and the messages in them can be rewritten in any language supported by -the system.

    -The xgettext(1) - command can be used to create .po files from -script or programs.

    -msgfmt interprets data as characters according to the -current setting of the LC_CTYPE - locale category. -

    Portable Object Files -

    -

    -Formats for all .po files are the same. Each .po file contains one or -more lines, with each line containing either a comment or a statement. -Comments start the line with a hash mark (#) and end with the newline -character. All comments are ignored. The format of a statement is: -

    - -
    directive -value
    -
    -
    -

    -Each directive starts at the beginning of the line and is separated -from value by white space (such as one or more space or tab characters). -value consists of one or more quoted strings separated by white space. -Use any of the following types of directives:

    -

    domain domainname
    -msgid -message_identifier
    -msgstr message_string
    -

    -The behavior of the domain -directive is affected by the options used. See OPTIONS - for the behavior -when the -o option is specified. If the -o option is not specified, the -behavior of the domain directive is as follows:

    -
    • All msgids from the beginning -of each .po file to the first domain directive are put into a default -message object file, messages.mo.
    • ·
    • When msgfmt encounters a domain domainname -directive in the .po file, all following msgids until the next domain directive -are put into the message object file
    • ·
    • Duplicate msgids are defined in -the scope of each domain. That is, a msgid is considered a duplicate only -if the identical msgid exists in the same domain.
    • ·
    • All duplicate msgids -are ignored.
    • -
    -
    -

    -The msgid directive specifies the value of a message identifier -associated with the directive that follows it. The message_identifier string -identifies a target string to be used at retrieval time. Each statement -containing a msgid directive must be followed by a statement containing -a msgstr directive.

    -The msgstr directive specifies the target string associated -with the message_identifier string declared in the immediately preceding -msgid directive.

    -Message strings can contain the escape sequences \n for -newline, \t for tab, \v for vertical tab, \b for backspace, \r for carriage -return, \f for formfeed, \\ for backslash, \" for double quote, \ddd for octal -bit pattern, and \xDD for hexadecimal bit pattern. -

    OPTIONS

    - -
    - -
    -v
    -
    Verbose. - List duplicate message identifiers. Message strings are not redefined. -
    - -
    -o output-file
    -
    Specify output file name as output-file. All domain directives -and duplicate msgids in the .po file are ignored.
    -
    - -

    EXAMPLES

    -In this example -module1.po and module2.po are portable message objects files.

    -

    example% -cat module1.po
    - # default domain "messages.mo"
    - msgid "msg 1"
    - msgstr "msg -1 translation"
    - #
    - domain "help_domain"
    - msgid "help 2"
    - msgstr "help -2 translation"
    - #
    - domain "error_domain"
    - msgid "error 3"
    - msgstr "error -3 translation"
    -

    - example% cat module2.po
    - # default domain "messages.mo" -
    - msgid "mesg 4"
    - msgstr "mesg 4 translation"
    - #
    - domain "error_domain" -
    - msgid "error 5"
    - msgstr "error 5 translation"
    - #
    - domain "window_domain" -
    - msgid "window 6"
    - msgstr "window 6 translation"
    -

    -

    -The following command -will produce the output files, messages.mo, help_domain.mo, and error_domain.mo. - -

    - -
    example% msgfmt module1.po
    -
    -
    -

    -The following command will produce the output -files, messages.mo, help_domain.mo, error_domain.mo, and window_domain.mo. - -

    - -
    example% msgfmt module1.po module2.po
    -
    -
    -

    -The following example will produce -the output file hello.mo. -

    - -
    example% msgfmt -o hello.mo module1.po module2.po -
    -
    -
    -

    -Install message object files in /usr/lib/locale/locale/LC_MESSAGES/ -domain.mo -where locale is the message locale as set by setlocale(3C) -, and domain -is text domain as set by textdomain(). The /usr/lib/locale portion can -optionally be changed by calling bindtextdomain(). See gettext(3C) -. -

    ENVIRONMENT -

    -See environ(5) - for descriptions of the following environmental variables -that affect the execution of msgfmt: LC_CTYPE - , LC_MESSAGES - , NLSPATH - -. -

    ATTRIBUTES

    -See attributes(5) - for descriptions of the following attributes: -

    -

    - + + wxWindows 2 for Windows FAQ
    - - - -
    ATTRIBUTE TYPE ATTRIBUTE VALUE
    Availability SUNWloc
    CSI - Enabled
    - -

    SEE ALSO

    -xgettext(1) -, gettext(3C) -, setlocale(3C) -, attributes(5) -, -environ(5) - -

    NOTES

    -

    -Neither msgfmt nor any gettext() routine imposes a limit -on the total length of a message. However, each line in the *.po file is -limited to MAX_INPUT - (512) bytes.

    -Installing message catalogs under the -C locale is pointless, since they are ignored for the sake of efficiency. -

    - -


    -Table of Contents

    -

    - diff --git a/docs/html/gettext/xgettext.htm b/docs/html/gettext/xgettext.htm deleted file mode 100644 index a999626c4c..0000000000 --- a/docs/html/gettext/xgettext.htm +++ /dev/null @@ -1,144 +0,0 @@ - - - - - -xgettext(1) manual page - - -Table of Contents

    - -

    NAME

    -xgettext - extract gettext call strings from C programs -

    SYNOPSIS -

    -xgettext [ -ns ] [ -a [ -x exclude-file ] ] [ -c comment-tag ] [ -d default-domain -] [ -j ] [ -m prefix ] [ -M suffix ] [ -p pathname ] -| filename ...
    -xgettext --h -

    DESCRIPTION

    -

    -xgettext is used to automate the creation of portable -message files (.po). A .po file contains copies of `C' strings that are found -in ANSI C source code in filename or the standard input if `-' is specified -on the command line. The .po file can be used as input to the msgfmt(1) - -utility, which produces a binary form of the message file that can be - used by application during run-time.

    -xgettext writes msgid strings from -gettext(3C) - calls in filename to the default output file messages.po. The -default output file name can be changed by -d option. msgid strings in -dgettext() calls are written to the output file where domainname is the -first parameter to the dgettext() call.

    -By default, xgettext creates a - .po file in the current working directory, and each entry is in the same -order the strings are extracted from filenames. When the -p option is specified, -the .po file is created in the pathname directory. An existing .po file -is overwritten.

    -Duplicate msgids are written to the .po file as comment -lines. When the -s option is specified, the .po is sorted by the msgid -string, and all duplicated msgids are removed. All msgstr directives in -the .po file are empty unless the -m option is used. -

    OPTIONS

    - -
    - -
    -n
    -
    Add comment -lines to the output file indicating file name and line number in the source -file where each extracted string is encountered. These lines appear before -each msgid in the following format:
    # # File: filename, line:
    -
    -line-number - - -
    - -
    -s
    -
    Generate output sorted by msgids with all duplicate msgids removed. -
    - -
    -a
    -
    Extract all strings, not just those found in gettext(3C) -, and dgettext -() calls. Only one .po file is created.
    - -
    -c comment-tag
    -
    The comment block -beginning with comment-tag as the first token of the comment block is -added to the output .po file as # delimited comments. For multiple domains, -xgettext directs comments and messages to the prevailing text domain.
    - -
    -d -default-domain
    -
    Rename default output file from messages.po to default-domain -.po.
    - -
    -j
    -
    Join messages with existing message files. If a .po file does not -exist, it is created. If a .po file does exist, new messages are appended. - Any duplicate msgids are commented out in the resulting .po file. Domain -directives in the existing .po file are ignored. Results not guaranteed -if the existing message file has been edited.
    - -
    -m prefix
    -
    Fill in the msgstr -with prefix. This is useful for debugging purposes. To make msgstr identical -to msgid, use an empty string ("" ) for prefix.
    - -
    -M suffix
    -
    Fill in the -msgstr with suffix. This is useful for debugging purposes.
    - -
    -p pathname -
    -
    Specify the directory where the output files will be placed. This option -overrides the current working directory.
    -
    - -
    -x exclude-file
    -
    Specify a .po -file that contains a list of msgids that are not to be extracted from -the input files. The format of exclude-file is identical to the .po file. -However, only the msgid directive line in exclude-file is used. All other -lines are simply ignored. The -x option can only be used with the -a option. -
    - -
    -h
    -
    Print a help message on the standard output.
    -
    - -

    ATTRIBUTES

    -See attributes(5) - -for descriptions of the following attributes:

    - - - -
    ATTRIBUTE TYPE ATTRIBUTE -VALUE
    Availability SUNWloc
    - -

    SEE ALSO

    -msgfmt(1) -, gettext(3C) -, attributes(5) - - -

    NOTES

    -xgettext is not able to extract cast strings, for example ANSI -C casts of literal strings to (const char *). This is unnecessary anyway, -since the prototypes in <libintl.h> already specify this type.

    - -


    -Table of Contents

    -

    - diff --git a/docs/html/i18n.htm b/docs/html/i18n.htm index 02969113af..049d8ab56f 100644 --- a/docs/html/i18n.htm +++ b/docs/html/i18n.htm @@ -17,6 +17,12 @@ The columns of this table have the obvious meaning: in each row you will see the language, the official translator (if any) for it and the status of the translations as of wxWindows 2.2.

    +Please subscribe to the + +wxWindows translators mailing list if you are interested in participating. +Thanks! +

    +To help edit message catalogs, please see Vaclav Slavik's excellent poEdit utility.

    @@ -32,7 +38,7 @@ translations as of wxWindows 2.2. - + @@ -43,6 +49,12 @@ translations as of wxWindows 2.2. + + + + + + @@ -51,20 +63,21 @@ translations as of wxWindows 2.2. - + - + @@ -81,24 +94,24 @@ translations as of wxWindows 2.2. + + + + + + - - - - - - - - + +
    CzechNot yetDone Vaclav Slavik
    Leif Jensen
    DutchDonePatrick Hubers
    English (UK) Ok
    French (standard)Not yetDone Stephane Junique, - Lionel Allorge + Lionel Allorge, Gilles Guyot
    GermanNot yetDone Daniel Reith, Gerhard Gruber, - Stefan Hedemann - Dr. Detlev Reymann + Stefan Hedemann, + Dr. Detlev Reymann, + Mark Johnson
    Bernardo Santos Wernesback
    RussianOkRoman Rolinsky, + Vadim Zeitlin +
    Spanish Not yet Guillermo Rodriguez Garcia
    RussianNot yetRoman Rolinsky -
    SwedishNot yetJonas Rydberg - OkJonas Rydberg
    @@ -112,9 +125,10 @@ any comments/suggestions. - - + + + diff --git a/docs/html/index.htm b/docs/html/index.htm index 34f3422468..469abc3de8 100644 --- a/docs/html/index.htm +++ b/docs/html/index.htm @@ -5,18 +5,17 @@ - - + - +
    - @@ -84,6 +83,9 @@ downloaded from the wxWindows Web site.

    WinHelp

    + @@ -97,6 +99,10 @@ downloaded from the wxWindows Web site.

    Reference Manual +

    + @@ -111,11 +117,33 @@ downloaded from the wxWindows Web site.

    Dialog Editor Manual +

    + + + + + + + + + + + + + @@ -149,9 +181,7 @@ downloaded from the wxWindows Web site.


    Third-party tools


    Samples

    diff --git a/docs/html/logo.gif b/docs/html/logo.gif index 2242fffd965a2779c29b9599d4e14bf2bebe4005..67ce9957bab31fcbc17589b8734e0164a04f86ad 100644 GIT binary patch literal 3590 zcmeH}{Xf&|AIG=ZX6A0jZ04qI?nXs4BI<0*!rU}+o80EMp~6I=-EcCkn%jt&`w{1e zI8i$xebNd`(Va>{=ya4$H##SMb^eC$kLUS#UXRyxJ>I{)AMfjWT(0iB9ULPA!J9yz zK|kRBySV=bcm2fW_OCP5-z0x0n|v-4iDV@uvZ_W|W4o-qTlND$28_x^Cx29*zm~mT zmMwnp_0s6X3faweP?gRE601m9n2H5MS0;$J=ToE8D z0ZOWXsz#u(9cb?cx@F)0uJBg%$%jJGwpY!ja@BhYnuJ6_%u0p{e5Eis) zy$JeoCqRfbkTt@i(>%pnvOZB(T5_T0BxOX<( zE++47-G95Y@y@v|2jo@mT}>mE4yj91x4W9hYN!IFA@j2IUcFnfWvKje%l&3nJ@W$d z;~X5VV(yH>-MH~Hnt)BrKm7jS9T@y-PP@FP;juv5ULvDL?GmX(-YUD<*Es|iaF$nc zxif-Dw51N&k2)hj@{x46D`Z;d9ppy0lJcwpozM zYdL#(pZO`U*5IS*s9hg&Kbgv}nprEla?zC|s^O9=YdJFwAA7=5HoJGwl+~R3smizr z2{;b!B^iL@Bi@x$)sh*75Hm`~OC~0NdH_O7l;BjtPMZd(sAf#lV8{#tM5ym+HUr5S zVJP4Rq7J??p(?g4Xk%Lk4T&v5@R61oj6vweo-d?Oi{1UkIe}mEOlZaitCe97+NZH> zBN0IygdTFJ7rl&(nHHIPo0TCpracCgrX>^V3kis{`h0WwqZv5HVLCb!OUcBPgu7?r z3-tY(eU)%iw_^nOzXDmx6?M~+C=JS$38nn)P+DGH&ul+jBl_W>a7}+IcmN(77BP(s zC^#ILd2G7`6bxUqV5zpv0}r8?p@_25)CtZ&TlaHjVB5=&6_wqGj{G(W%VBJJQ%1@^ z%quM5Da?DZ zG)%zoApdwi)g-@Ar^4XY}2A84b2CJD(Bx zb~zkmos;$|BB8wqf|GDj%j$HT5nMG2G(au4l`i%-B(vb3CG*+g)*N^UK8vWWx(Ex^U`y9 zsG!+M+?Rfj=gqbX^=QbT@WK90tOaU1@8`8++`me)vok<@9dWu* zGiFv^*C&oSZfB4mNSHnMVXh5gS{$Y*gY%F3oK9CKJW*-TrF1rUMsn^D6)yQjJu3GS zjYtT!t<yXDy3r(7>mo75HAu*9!c`3aLGBc5yUY@6Qipl0 zap$>J6IxRPs8m}$rmB_OTlmx7jgDAE&*dE zKAqHPtHk3v`qc9yy;(5*HSJiMfrOu#;tE6YsfaWvII*e7eI(6&x~X@}T(5E0MheTw zv;aI>)k?FX-~kq)S3p51SqxF>>ko;tvvz~QAn2{P<&6y6g?b!W)4_?$KUJ{+QJ0EU zjqelmR?_mMnF#_M)32mT3{8kG=Y{oQFeYmLx15%sHjN&~?&>qDkBcnC)xK&6*lfl7l@>4pWbJ#DZzh^8Wx)J20>)pz&36rfVZGt&uB411AEQGhwI_D<#7pSxT85nph0qiQ+71b?g; zTg!UjtN2IC*6LKK6h$;BwVbw983#?=&9ljRHHp7^QLK`6&e%MIn&hUa`Q)HOQXPJI zd$eR18nH~SwzFcLT741KluB@%OES8E^j4(b&*+iY6RiDgvIoUmwRI1xd~mGDBJF8o z%M|W5;*h-Pi)^^oA-ao#KiabrA(2OSib?DI}=aK1BHT&4UDolpnvmg%(&g7DY+WCn_f9_h%V)SU$F`{{L z`ba=tnN-+lm32o=W|MR-vz{CmMN_>~>>|ynWn}*aS49lPnABBDt%?(P$6_A<>Ym)7 z0JJ*0B(E$zo0Xva35OE`vc?Fe(#N~T%K=|;xjV?2qJ(Z&fvY%cJ5|Y4<4>3;i})m_ z{7>Mn#nf(YYi4qfbHnCju7#fw+-;j*t9?zSe+~m^wsOlke@Zzbb!+n>w%akDUN~iJ zASZ8O8xb8ShdWdR_rAB*j|V5z?HtgV?Ko`s4R04Gd`r@;8qx|#sC(q>4c~Og*1SO> z(t>#XM8EddQXTx_=97?ysMaVHAxX)b>Eul#*KA{yLcG^twR7D}urbO)j(xFm*QxsT zURxRUAAZfdS;Xu4liy~~n>ohajCpFz{MNsJg9VIy>im>1b~B2zOoG(VPQW5f&H|~o zed$NEjx&fMV~xJX5)1S05G>2{%4-x(k_e?`yO!<2AiS^+dRsW=`t{(WodJfAz=kY; z3q(fw3OJwSwxv51MkLJMVH=@l)s1V0^Vlrm}fKnl|2CX980)T!~% zOQ7v_hNhJGhvkM(BhPF`8TLoTYrHdfawP7x18rJr#A`B$Tgjfd0{V3ZR8|K%-^0E4 z1;4nkW&8@{pmGSJLX7Mct34KLtcp>3g=oh@o!~;<%tBm6A-=cJ;BleRY9T?dh?H3f JUjOkr{STDsbxQyM literal 4656 zcmW+%d05m|`%N+{!z^JR8PtFS45BuOz^G`$qDDoHP$UT2C@N9G20r}1U<@fQ?-+k_L{y6V>-}|1sJa@*->E?+` zc7h1-1^`SZ)8OEsz;PnaJMDIt)9D@b4?;;4-5DCLH3^PNhR8jyi=yvlsR%b>TM9-0g zmB1M@>ZAw;Gg~p#YBpI=q=z9%GfJSQIud6wRHX183&{~?3xP4XnIkb4M=1j5DU7#J zbwfyFX4E8DDS;(KjW8qqa1?8X=j}RJ=kO6Ihti~hrozD;jj@scG@K}0}cykW!Rw=t)$h0+j&y74Q0_z z`%s9s)eZ54z|(dcBicx(o$e7Cfgci(E(bHHq#tRS>Qjv=yUR6GmeH3OF-kLuuYb z4y78hR6pN7-Gr^!kHAxmFhO9CePU55mBN&nzx>-YwFcih& z|IgAmNnwPAp#IenByGlM)J*CT4ku{DB;bS{Cq$g+A;{oArNF;q%)jvOn*fx9K!Gv{ z7x?xvrO)VWhtSZm4IVYC9&b5(rCJ}o>Yk(Ep~gF{Ih*ZjX}rGMly)@x`st>dm1tc` zrjH2@GN*moX1RXm^IM0oGS#z)N81mLpCAdI)or@&tU(iTO+sQw<&pHLAFRK(9=m&r zk}YUSdd)RV-yP;r>RlV6ma0c2i);b_dgv0-@&`x)r1n7cB=uQel~U^6y69_r!F9tz z$Au$l*XI9lw#IPDk7~cVqa^Mpe+R-wURFXOoUa{B)GBj+z58 zdxlRt?R!0<#{Z4`;@j<#X+9gr52*;n=^a{Q(!FWib}5Zz4Ohb zi#fipknbOKd|nfr@KGOLdivJl2`jsjJ8I&6NJwQm5ajUCd>;XWNpZRLqb;|VX(UnvEY!jRsEy>X#0qF9&<>{fvkA#@Caxsk)O@6Q)^IZg%3tY6 zeKX-={N-x_o7pA%jddGO&yM{uFGmyigYiuDSnCgoH%8b0+MiC*{{1ZEbMi?OnDctt zZH-<{VW6=W?x~AAuGp!NV1jn%#1OJ<{(bvOsemHe!hpN5#EHggBX` zZd=b;q!o95zWDYeAoYxB6z83ogglUqxXLBXi8$Q2>*nS2(lj;yA7kOyQQMjmZ=Aj$ zzEn>d*d9G6z9zA#OySWZ?*R3PTfE`%o<0%Mp+wKk4I4NKq?-Bm1Qy$Az~tKFNUIa- zM=?l&Vx=+&BY+GeiiXt|%$ed;6`a2cB#`eCn3U|;D*3|GBD|1zlshskZ_n+>QVu%M z4)qwIq{4sGs}kkNMdV;&)r7*D&%T{-lSrEz>osqqXN1S+OJ_%Z4q$W4PwIWDGL={x5F;4q9!&>G6I1gUD{Z?FH}am9V> z-T&K8Bbnpiu?a9kPh2?O2u=vi6!o9v9}=vD}J;#0nVT z%Sc}MB2kfU479yrZw0w>$4+Je25wS>8nf!wiU9YfO)9#!qDcFqftYiWegyhp^dZHd zKi8_RuZ+<#qP(X#IVf+)Cy#-MtHf|z+z{->^iUGe}*POE#j~D%FAHK_LNl{msE%y9krdJZ2Z8CcWW8NH2q~=rTc!6 z1Kw6(N*Z=YkjDxIHS4j@h->iGv3r(R&nF)!ueq;I`gy+YBWH&~&*vn?3+69!s)|7uvWy83w3&Ftxw){0U9@rtA=<{C1jNs^4KHZ?>xrn%JYpdFgZC z11OjU#?|adHJBD_y@|b%YuNbojR8sC0vqnfC+D{$fafv?VFN5q4tBJID~i3;=39Vr zY_L|#vn3`hT?>qqKd*$h)Xc2jx%RpW?$vpsFSNyE=f<~~eEhHNL3in`v(i`XaQHoJ zy5Q~%PYzb4av{Dm&{DK5SO-%sD4+-EMoPhm2sUY)u^o(OfbfPY6v~|QtBL3QFjt)d z&&Y1<3>tnT6^S!9EM0??1eshw@PtE)V^LPsi-91Qp`1I6YR{1* z?<0WJ*9C4;AyO^YE&pU0XLwHpN5Hspj8LMw=aN^SJ&rAK0im0>ZdmhS!0vcwFYzo5 z$)A;XYb{pdmxlmpg=3br&+1hUa-zgf#GFfAY+N58mx+(^6$Ee*{jLGtOTP+n8vUO7 zOAdAAR)+mO?A~QI9%9>7Bd9=cGZwS!thi*t&7Fabn0$Z>tuB4)Ma>CU>kdT zbQ8uN&Jz$CxRBlw2Hcag=e>mz^ov80sBJ6o)uV>NS zoM<9q892NuL23dd9to@wCGRIRdz2i_6M;{&+BI?}I>;g>KwW*ea5zOq9z%5~wk!&5 zfDlBY&>JN6*MoIQ(v#WWInT z`;tR4WDuankI@DJAS8{0vVJ9=sD#kxPfwOFXxbt1cVE=_&)XoaWWg1=(@KIe5Z%Eu zYp+c&Ipa^wigh>qCZ{A%Kl!E83}fKpe;#Yv&PmLenEp**uQbJ^n8-9wUxi5#K2A1m zK=P5_{B7@S57sW$cT70hzJ1kuWy8M4rf&vO&kQlq?~v)r*u)ZPOi^&p%D0gJ9;a^0 ztFn=+ij<=EnZi>v%-<>A(Xa3VRtfGy`!(ZT&l|BHys|V zit(^+zhH`p0)7i@(Ra-%1(yY#W!9w0C!M*aU86}?a|C3G{IbgMykAZ{rsCkQ?_wK| zto(MZeDs9zX}kNo%+{jhZ|u-*QIsriJ0`txuuNr{gc`lpRp#vI1&YL@F#iCWq+hL8 zFDUd0mIjML#c0zKk9B5g$UVUNPUjN!`*5f5@rmuLD9JDtbWyH(KzY*0A$F-d`%lP&*cF!_;F0pj#}c8W$^i zd5n9P5nG)v& z2X?QU84Ih?b#Gs<(3P%R7`IaN17HNSt;nqav+JkNR|BgKuaJN-VW%E}s<;>(y3Rw0 z_7oEg1+p!al48neL0L_dRWaeqM8zsZ^Lkp|*DiH0pqVa!dx;Gvhz*}{icUgv)#+&g z6mPqv2JFL;Jfw>X36f?n@y`rgItO$m2J?U|7A{`^#AU!O67Z*%%tsG_rV{v3Yhv`) z<+j7X@Gpj^KLCAQz%W-%>g$dF?DLb=6+P}7oBMh+H5fD1vJHNlJ1?|vQ|}9)`D)R_ z48vDf{OE0xr(bM7^l-+W7ZbjmF?AvZzWf~cqj-xhGd$7*0HjJ#N2Pm^ zfG530TSr&N#y0+u(A_zJbGO1_Ad>6Q5k9}o!h@Y(gf@H&F_%aFq7+3=#YN`**Apu4`0)SL%8=JY{NUVYhy@0nQGyMCZR*KlcoHr}Klw zX?h7#7FZ%JXXMqqvi|!1ZH$5?ltq+s59rZ}Y6nE^bC>paCpg(9`HcU#1@UaB#sKHl zKRPu}VA))*;=dx8Pp0IVW-Ofud!W|JC6bJCLh8zrJOCYyfCmNc359(b;MMJQLHmZw zc%bqRz}sc~?_kk;6`|nMmYvSxd4`o>^C>AK-zP1|5o#rJGB~I9uvI2Q7Bb(s@!zd`6fJPwl!V zBk*+KY-m2Hh9yz#G20d3`X@PF?qQcMcunCOt0~1wUa?wG7P7JdylD%fSj)>YFElMu zHMbI;CtRuqSk)qUcGRZUCu@I!W$z-;XdW^GHSTV~@O!QHBSSp5|G=Mkm0M2nvO^IH zJWBcULushc6w01z<1!Wc^ z%Vm_Sow7xO{MYZL;o>_}L{;c)&r_o6ucIHgbK2iv&Dg(BPg{Ft;oo}CFV9vNNJt=c z2`5WMrE!S#lMTL`-HKdFp6migq0sEC)29$s%CS@JjJjXc-gc^c1Z_X7&HUwTd6s=m zp(I6=#$#{{Cp$2+X+0y)MB~ryQrO)p-r3s9s@f2BKVaTGTl)~zZOyvS{ELvp$SF=n ziqa%x#J+UNK~a^Gb(%+@5L9;?&_*oRbR# + + +Making a wxMSW distribution + + + + + + + + + +
    - - + + + +MS HTML Help + PDF
    +Reference Manual + Reference Manual +Dialog Editor Manual + Dialog Editor Manual
    +Tex2RTF Manual + +Tex2RTF Manual + +Tex2RTF Manual + +Tex2RTF Manual +
    Remstar ODBC Classes @@ -125,6 +153,10 @@ downloaded from the wxWindows Web site.


    +

    +
    Remstar ODBC Classes
    + + + +
    + +Making a wxMSW distribution + +
    + +

    + +These are some notes on the steps involved in making up a wxMSW distribution from +a CVS hierarchy. +Currently only Julian Smart does this, but in the event of the duty being +transferred, or to allow people to produce custom distributions, the following may be helpful.

    + +The distribution scripts are in the distrib/msw directory.

    + +

    Requirements

    + +
      +
    1. A wxWindows hierarchy from CVS. +
    2. A copy of Tex2RTF in your path. +
    3. 32-bit zip and unzip utilities. I use zip 2.0.1 by Mark Adler and others, and unzip 5.12 +by Info-ZIP. I call them zip32 and unzip32 in the scripts. +
    4. Adobe Acrobat to generate the PDF documentation. +
    5. The scripts use 4DOS, so you will need a copy (the evaluation copy should do). +
    6. Several Windows compilers to test out the distribution (see below). VC++ is assumed, for +running some of the scripts, e.g. the makefile for running Tex2RTF. +
    7. To make the setup.exe version of the distribution, a copy of WISE Installer +(I use version 5.0: I don't know if the scripts are compatible with +other versions). +
    8. If you need to extract the top and bottom from the wxWindows WISE script after editing it with WISE (so that +the distribution script can automatically rebuild the .wse script from the distribution files + .wse script top and bottom), +you will need to compile distrib/msw/splitwise.cpp into distrib/msw/splitwise.exe, a DOS command line program. +
    9. UPX, for compressing executables. +
    10. A lot of disk space. +
    + +

    Steps

    + +
      +
    1. Compile utils/projgen if necessary and run, to generate the .dsp/.dsw files for the samples, demos and utils +using VC++ 5/6. In fact when wxWindows is fairly stable and new samples haven't been added and settings +changed, this step isn't necessary.

      +

    2. Update version numbers: +
        +
      • Ensure include/wx/version.h specifies the correct wxWindows version. +
      • Alter WXVERSION or other version-related variables in src/makevc.env, src/makeg95.env, src/makeb32.env. +
      • Alter the DLL version in the VC++ project files using distrib/msw/vcupdate.bat (no arguments). +
      • Edit distrib/msw/zipdist.bat and change the version variable to the appropriate version. +
      • Edit the WISE script (normally distrib/msw/wisetop.txt) to change the version number. See also below for other WISE script changes. +
      • Update the date and version number in docs/latex/wx/manual.tex. +
      +

      +

    3. Check setup.h is correct for the distribution (e.g. wxUSE_ODBC = 1, wxUSE_UNICODE = 0, etc.).

      +

    4. Regenerate makefiles from the tmake templates, if necessary. Most makefiles have a target to do this using the makefile name, +or else 'self'. Or you can use the 'makeall.bat' script in distrib\msw\tmake.

      +

    5. Using VC++ 6, make a WIN32 release executable of Dialog Editor and place it in the top-level bin directory +in your CVS hierarchy. Similarly for Tex2RTF and Life!. Compress them with UPX to save space.

      +

    6. Ensure that the library and most of the samples/demos compile for the popular compilers. Currently I check +with the following compilers:

      +VC++ 1.5, VC++ 4.0, VC++ 5.0, VC++ 6.0 (static and DLL), BC++ 4.5 (WIN16/WIN32), BC++ 5.0 (WIN16/WIN32), C++Builder 3, +Watcom C++ 10.6, Cygwin b20, Mingw32 2.95. For VC++ 6 and BC++ 5.0, check compilation using both the +makefiles and the project files (wxvc.dsp, wxvc_dll.dsp, bc32.ide). See distrib/msw/makeall.bat for a script +to build wxWindows and samples for a variety of compilers.

      +

    7. Ensure that all .rsp files, that list the files to go in the distribution, are up-to-date. +For example, samples or demos may have been added to the hierarchy. The same applies to projgen (see above).

      +

    8. Likewise, ensure that vc.rsp contains references to all the sample project files (that have been generated +by projgen).

      +

    9. Ensure docs/msw/install.txt is up-to-date (detail any gotchas for particular compiler versions, etc.).

      +

    10. Update docs/readme.txt, docs/changes.txt (summarize from CVS change notifications).

      +

    11. Build the WinHelp, HTML, and PDF documentation +via the VC++ makefile, src/msw/makefile.vc. You can use e.g. the targets cleandocs alldocs. Check the +output of the Windows Help Compiler for missing links, and edit/recompile the docs if necessary. The PDF documentation is produced from the Word RTF +document, and read into Word. Apply the wxManual Style Template to improve presentation (Format|Style Gallery...). Select all, press F9 to reformat the fields. Check the table of contents for +overspill from the body of a section into the TOC. If there's a problem, it's due to the lack of a +blank line at the end of the relevant .tex file. Insert the blank line, regenerate the RTF, and reload into Word. +Then use Adobe Distiller to generate the PDF.

      +

    12. You need to edit the WISE script to change the version number, and any other changes you wish to make. +For simple changes, you can edit distrib/msw/wisetop.txt directly with a text editor. If you +wish to use WISE Installer directly, you will need to make a full wxwin2.wse file first, +by: (a) making up the distribution (next step), (b) editing wxwin2.wse with WISE Installer, (c) +running the distrib/msw/splitwise program to produce wisetop.txt, wisebott.txt, (d) executing the +next step again to remake the distribution programatically (or just run WISE directly: but remember +to run splitwise to be in sync for future reference). For more details, please see distrib/msw/readme.txt.

      +

    13. Make a deliver directory in the top-level wxWin hierarchy, change directory to distrib\msw, +and run zipdist wise (omit 'wise' if you don't want to build the setup.exe files).

      +

    14. You should now have lots of .zip files in your deliver folder, some setup.* files, +plus a wx hierarchy (extracted +from the zips) that you can now delete.

      +

    15. Test the setup.exe distribution by installing it, preferably compiling using several compilers +e.g. using distrib\msw\makeall.bat.

      +

    16. Go into Linux, unpack the distribution zip files, then call the Linux distribution script +to create .tgz files for wxMotif.

      +

    17. Upload the appropriate files to the SourceGear ftp site.

      +

    18. Download Robert's wxGTK files and upload to the SourceGear ftp site.

      +

    19. Update the web site front page, news, download and CD-ROM pages to reflect the new version.

      +

    20. If updating the CD-ROM hierarchy as well, follow these steps using the CD-ROM makefile: +
        +
      1. Edit WXDISTDIR in the makefile and change to the correct distribution directory for this version. +
      2. Run the makefile with copydist. This copies the distribution to the correct place +on the CD-ROM. +
      3. Run the makefile with copydocs. This copies the wxWindows 2 manuals to the correct +place on the CD-ROM. +
      4. Copy any project file zips that didn't need updating from an old distribution, e.g. wxWindows-x.y.z-wat.zip. +
      5. Copy Robert's wxGTK files to the directory by hand. +

      +

    + +
    + + + + diff --git a/docs/html/news.htm b/docs/html/news.htm index 83822071ff..55cd3110a0 100644 --- a/docs/html/news.htm +++ b/docs/html/news.htm @@ -8,17 +8,59 @@ - +
    -
    - + + News
    -

    March 19th, 2000

    +

    August 21st, 2000

    + +

      +
    • wxWindows 2.2.1 is the latest official stable release. +The most bug-free, easiest-to-install release yet... +
    + +

    July 28th, 2000

    + +

      +
    • Vaclav Slavik has recently written an +article about wxWindows for a Czech ezine. +
    • Dr Dobbs Journal also carries a piece on wxWindows. +
    • Hurray! There is a lot of traffic on the wxStudio mailing list, and +Gerd Mueller has offered to make the WipeOut IDE +open source and merge it with wxStudio. There is a new wxStudio page +on SourceForge. +
    + +

    July 9th, 2000

    + +

      +
    • wxWindows 2.2.0 is the result of many +fixes and enhancements to 2.1, and is an official stable release. +
    + +

    June 4th, 2000

    + +

      +
    • wxWindows 2.1.16 contains fixes +for wxGTK, wxMSW and wxMotif. It is hoped that this is the last release before the stable 2.2 version. +
    + +

    March 28th, 2000

    + +

      +
    • wxWindows 2.1.15 contains a few fixes +for wxGTK and wxMSW. wxMSW and wxMotif users who already have 2.1.14 do not need to rush to +download this version! The fixes in the patch file (see main download page) contain the +major differences between 2.1.14 and 2.1.15. +
    + +

    March 21st, 2000

    • wxWindows 2.1.14 is now available for Windows, Motif and GTK. @@ -26,9 +68,9 @@ Again, great strides have been made since the previous official version (2.1.11) stable version. Many things have been fixed and added but here are some highlights.
    • Robin Dunn is contributing a wxStyledTextCtrl, a wrapper around the Scintilla styled text edit control. It can be used to provide syntax highlighting for various languages, and other applications. -A snapshot of this work in progress, stc.zip, is provided on the ftp site alongside wxWindows 2.1.14. +A snapshot of this work in progress, stc.zip, is provided on the ftp site alongside the latest wxWindows release.
    • Guilhem Lavaux has reworked his MMedia sound and video class library and started its documentation; -it too is available alongside 2.1.14 as mmedia.zip. +it too is available alongside the latest release as mmedia.zip.

    January 14th, 2000

    diff --git a/docs/html/platform.htm b/docs/html/platform.htm index 2b488ec6bc..3fce58d0d9 100644 --- a/docs/html/platform.htm +++ b/docs/html/platform.htm @@ -1,3 +1,4 @@ + Platforms supported by wxWindows 2.x @@ -8,10 +9,10 @@ - +
    - @@ -21,7 +22,7 @@ Supported Platforms

    You will find below the list of all supported platforms for different ports of wxWindows 2.x (wxMSW/wxGTK/wxMotif ports -only). The cross icon in the third column doesn't mean that the platform is not supported, but just that wxWindows hasn't +only). The cross icon in the third column doesn't mean that the platform is not supported, but just that wxWindows hasn't been tested on it recently (the table is being updated for wxWindows 2.1.14 beta currently).

    @@ -29,7 +30,9 @@ See also the dai

    If you have tested wxWindows on a platform not mentioned here, please tell us about your experience on our mailing list! We would especially like to have information about compiling wxGTK on other Unix variants, such as IRIX, DG-UX, -other flavours of BSD, ... +other flavours of BSD, ... Please note that you will generally need GNU make +(also known as gmake) to compile wxWindows, native make programs +often don't work.

    - + + Supported Platforms
    @@ -47,65 +50,100 @@ other flavours of BSD, ... - - - - + + + - - - + Memory debugging code doesn't seem to work well + + + + - - + + - + Borland C++ can't cope with ODBC, resources and new wxGrid class + - - - - - + + + + + + - + - - - - + + + + + + - - + + + + - - - - + + + + - - + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + +
    Win32 (Windows 9x/NT)Visual C++ 4.2/5.x/6.0OkVZ, JSProject files are provided for all versions except 4.2
    Borland C++ 5.0Ok
    Also works with free command line Borland C++ 5.5
    Mingw32OkGRG, VZCross compilation from Linux works as well
    +
    Win32
    (Win 9x/NT/2K)
    Visual C++ 4.2/5.x/6.0OkVZ, JSProject files are provided for all versions except 4.2
    Borland C++ 5.0Ok
    Also works with free command line Borland C++ 5.5
    Mingw32OkGRG, VZCross compilation from Linux works as well
    Version 2.95.2 recommended, otherwise some (included) patches must be applied
    - Memory debugging code doesn't seem to work well
    CygwinUnknown
    Hasn't been tested recently, anyone?
    Watcom C++ 10AlmostJSTested with 10.6: works, but wxImage seems to be broken
    no support for JPEG, TIFF or OpenGL
    Symantec C++Unknown

    CygwinOkStephane Junique
    Andrea Venturoli
    tested under NT 4, cross-compiling for mingw also works
    Watcom C++ 10AlmostJSTested with 10.6: works, but wxImage seems to be broken
    no support for JPEG, TIFF or OpenGL
    Watcom C++ 11OkMarkus NeiferTested with 11.0b under win95
    Symantec C++Unknown

    Win16 (Windows 3.1)Visual C++ 1.52Ok
    Win16
    (Windows 3.1)
    Visual C++ 1.52Ok
    Some features are missing (OLE related classes, threads, ...)
    - Borland C++ can't cope with ODBC, resources and new wxGrid class
    Borland C++ 4.0/5.0OkJS
    Borland C++ 4.0/5.0OkJS
    LinuxwxGTK with gcc 2.7.2Unknown
    Should work, but nobody uses it any more
    wxGTK with egcs 1.1.1OkVZ, RR
    wxGTK with gcc 2.95Ok

    wxMotif with egcs 1.1.1Ok
    with LessTif 0.87Linux x86wxGTK with gcc 2.7.2Unknown
    Should work, but nobody uses it any more
    wxGTK with egcs 1.1.1OkVZ, RR
    wxGTK with gcc 2.95Ok

    wxMotif with egcs 1.1.1Ok
    with LessTif 0.87
    wxMotif with gcc 2.95Ok
    with OpenMotif
    FreeBSDwxGTK with gccOkVZLimited thread support on older systemswxGTK with gccOkVZLimited thread support on older systems
    SolariswxMotif with Sun CC 4.2OkVZThread support must be disabled on system with not MT-safe X11
    wxMotif with gccOk

    wxGTK with gccOk

    SolariswxMotif with Sun CC 4.2OkVZThread support must be disabled on system with not MT-safe X11
    wxMotif with gccOk

    wxGTK with Sun CC 4.2OkShiv Shankar Ramakrishnan
    wxGTK with gccOk

    wxGTK with Sun CC 5.0 and 6.1 (Solaris 7 and 8)OkJiri MracekYou have to edit line 2079 in glib.h to fix GTK+ error
    AIXwxGTK with AIX CCUnknown

    wxMotif with AIX CCUnknown

    wxGTK with AIX CCUnknown

    wxMotif with xlC 3.1.4.0 (AIX 4.2)OkBernhard EckSome problems with OpenGL and native X server
    HP-UXwxGTK with HP CC A.10.22Almost
    special extra compiler options must be manually added, see the docs for details
    wxGTK with gccUnknown

    HP-UX 10.20wxGTK with HP CC A.10.22
    or HP aCC B3910B A.01.18 +
    OkStaf Verhaegenyou need to add -Aa -D_HPUX_SOURCE to CFLAGS
    wxGTK with gccOkJulian Albo Garcia
    OS/2VisualAge 3.0/4.0Not yetDWIRIXwxGTKOk
    You may need to use --disable-catch_segvs if you get compiler error in utilsunx.cpp
    wxMotif with MIPSPro 7.30OkDavid MarshallOn IRIX 6.5.6 (Indigo2, 64bit), with SGI Motif 1.2
    wxMotif with "CC -mips3 -n32"OkIanYou need to set LD_LIBRARYN32_PATH
    SCO UnixWarewxGTK with gccOkWilliam SuetholzUnixWare 2.1.3 with UnixWare 7 compatibility PTF
    DEC OSF/1wxGTK with gccOkFabrice DidierjeanOSF1 4.0 on Dec Alpha
    + you may need to run configure with --host=alpha-dec-osf switch
    OS/2VisualAge 3.0/4.0Not yetDW OS/2 port is work in progress...
    EMXNot yetSN
    wxGTK with EMXOkSNconfigure scripts need to be regenerated with OS/2 port of autoconf
    wxMotif with EMXOkSNwith LessTif 0.89; configure scripts need to be regenerated with OS/2 port of autoconf
    EMXNot yetSN
    wxGTK with EMXOkSNconfigure scripts need to be regenerated with OS/2 port of autoconf
    wxMotif with EMXOkSNwith LessTif 0.89; configure scripts need to be regenerated with OS/2 port of autoconf
    OpenVMSwxGTK with Compaq-C++ V6.2 (OpenVMS Alpha 7.3)OkJouk Jansen
    Linux S/390wxGTK with gcc 2.95.2OkVZ2.3.1+ only
    @@ -120,3 +158,5 @@ any comments/suggestions. + + diff --git a/docs/html/roadmap.htm b/docs/html/roadmap.htm index 8462fa7c50..c066c92475 100644 --- a/docs/html/roadmap.htm +++ b/docs/html/roadmap.htm @@ -59,7 +59,7 @@ available at dates convenient to the developers.

    Release 2.1.14

    -Release date: March 12, 2000

    +Release date: March 21st, 2000

    This will be the final beta release before the final 2.2 release. It will be synchronized for as many platforms as possible (at least Windows and GTK, @@ -94,8 +94,8 @@ This is the next stable version of wxWindows. No new features since

    • bugs found during 2.1.14 will be fixed. -
    • translations of text strings used in wxWindows -
    • documentation updated to include all new classes +
    • translations of text strings used in wxWindows. +
    • documentation updated to include all new classes.

    diff --git a/docs/html/standard.htm b/docs/html/standard.htm index 9bd3acac53..196b63ff5a 100644 --- a/docs/html/standard.htm +++ b/docs/html/standard.htm @@ -9,10 +9,10 @@ - +
    - @@ -50,6 +50,7 @@ C++ portability guide by David Williams.
  • Don't use STL
  • Don't declare variables inside for()
  • Don't use nested classes
  • +
  • Don't use new logical operators keywords

  • Other compiler limitations
  • @@ -270,30 +271,34 @@ The scope of a variable declared inside for() statement changed several years ago, however many compilers still will complain about second declaration of i in the following code:
    -  for ( int i = 0; i < 10; i++ ) {
    +  for ( int i = 0; i < 10; i++ ) {
         ...
       }
     
       ...
     
    -  for ( int i = 0; i < 10; i++ ) {
    +  for ( int i = 0; i < 10; i++ ) {
         ...
       }
     
    -Even if it's perfectly legal now. +even though if it's perfectly legal now.

    Workaround: write this instead:

       int i;
    -  for ( i = 0; i < 10; i++ ) {
    +  for ( i = 0; i < 10; i++ ) {
         ...
       }
     
       ...
     
    -  for ( i = 0; i < 10; i++ ) {
    +  for ( i = 0; i < 10; i++ ) {
         ...
       }
     
    +or, even better, use different names for the variables in the different for +loops (in particular, avoid mute variable names like i above) - then +you can declare them in the loop statement and don't pollute the outer name +space with local loop variables.

  • Don't use nested classes
  • Nested classes are, without doubt, a very good thing because they allow to hide @@ -338,10 +343,27 @@ you can try the following:

    A nice side effect is that you don't need to recompile all the files including the header if you change the PrivateLibClass declaration (it's an example of a more general interface/implementation separation idea). + +

  • Don't use new logical operators keywords
  • +The C++ standard has introduced the following new reserved words: or, +and, not, xor, bitand, bitor, +compl, and_eq, or_eq, not_eq, +or_eq which can be used instead of the usual C operations &&, +||, ~ etc. +

    This wonderful (and not backwards compatible in addition to being +absolutely useless) new feature means that these new keywords should not be +used as the variable names - even if current compilers usually will accept +this, your code will break in the future. For most of the keywords, using them +as variable names is quite unlikely, but or and compl were +used in the wxWindows sources which seems to indicate that they are the most +likely candidates. +

    It goes without saying that these new keywords should not be used instead +of the tradional C operators neither both because most compilers don't accept +them and because using them in C code makes it less readable.
    -

  • Other compiler limitations
  • +

  • Other compiler limitations
  • This section lists the less obvious limitations of the current C++ compilers which are less restrictive than the ones mentioned in the previous section but are may be even more dangerous as a program which compiles perfectly well on @@ -351,18 +373,18 @@ compile on another platform and/or with another compiler.

    1. Use ternary operator ?: carefully
    2. The ternary operator ?: shouldn't be used with objects (i.e. if any -of its operands are objects) because some compilers (notable Borland C++) fail +of its operands are objects) because some compilers (notably Borland C++) fail to compile such code.

      Workaround: use if/else instead.

           wxString s1, s2;
       
           // Borland C++ won't compile the line below
      -    wxString s = s1.Len() < s2.Len() ? s1 : s2;
      +    wxString s = s1.Len() < s2.Len() ? s1 : s2;
       
           // but any C++ compiler will compile this
           wxString s;
      -    if ( s1.Len() < s2.Len() )
      +    if ( s1.Len() < s2.Len() )
               s = s1;
           else
               s = s2;
      @@ -388,7 +410,7 @@ it has a destructor, remember to add an empty default constructor to it.
       

    -
  • General recommendations
  • +

  • General recommendations
  • While the recommendations in the previous section may not apply to you if you're only working with perfect compilers which implement the very newest directives of C++ standard, this section contains compiler- (and language-) independent advice @@ -585,7 +607,7 @@ put another one after it.
    -

  • Unix/DOS differences
  • +

  • Unix/DOS differences
  • Two operating systems supported by wxWindows right now are (different flavours of) Unix and Windows 3.1/95/NT (although Mac, OS/2 and other ports exist/are being developed as well). The main differences between them are summarized @@ -634,18 +656,19 @@ i.e. GetId is the same as GetID.
    -

  • Style choices
  • +

  • Style choices
  • All wxWindows specific style guidelines are specified in the next section, here are the choices which are not completely arbitrary, but have some deeper and not wxWindows-specific meaning.

    1. Naming conventions: use m_ for members
    2. -It's extremely important to write readable code. One of the first steps in this -direction is the choice of naming convention. It may be quite vague or strictly -define the names of all the variables and function in the program, however it -surely must somehow allow the reader to distinguish between variable and -functions and local variables and member variables from the first glance. +We all know how important it is to write readable code. One of the first steps +in this direction is the choice of naming convention. It may be quite vague or +strictly define the names of all the variables and function in the program, +however it surely must somehow allow the reader to distinguish between +variable and functions and local variables and member variables from the first +glance.

      The first requirement is commonly respected, but for some strange reasons, the second isn't, even if it's much more important because, after all, the immediate context usually allows you to distinguish a variable from a function in diff --git a/docs/html/wxbook.htm b/docs/html/wxbook.htm index f2f2fdde53..8900967c66 100644 --- a/docs/html/wxbook.htm +++ b/docs/html/wxbook.htm @@ -8,10 +8,10 @@ -

    - + + wxWindows Programmer Style Guide
    +
    - diff --git a/docs/install.txt b/docs/install.txt deleted file mode 100644 index cb87488c42..0000000000 --- a/docs/install.txt +++ /dev/null @@ -1,14 +0,0 @@ - INSTALL.TXT - -NB: this file describes the installation of wxBase library. If you are using a - GUI version of wxWindows, please refer to the install.txt in the - appropriate subdirectory (msw, gtk, motif). - -0. Requirments and supported platforms - ----------------------------------- - -1. Installing under Win32 - ---------------------- - -2. Installing under Unix/BeOS - -------------------------- diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex index 55249bf1cd..2add770cd4 100644 --- a/docs/latex/wx/app.tex +++ b/docs/latex/wx/app.tex @@ -38,8 +38,9 @@ a reference to your application object) to be visible to other files. Constructor. Called implicitly with a definition of a wxApp object. -The argument is a language identifier; this is an experimental -feature and will be expanded and documented in future versions. +% VZ: there is no such feature so far... +% The argument is a language identifier; this is an experimental +% feature and will be expanded and documented in future versions. \membersection{wxApp::\destruct{wxApp}} @@ -457,7 +458,7 @@ deleted. If FALSE, the application will continue to run.} Sets the `top' window. You can call this from within \helpref{wxApp::OnInit}{wxapponinit} to let wxWindows know which is the main window. You don't have to set the top window; -it's only a convenience so that (for example) certain dialogs without parents can use a +it is only a convenience so that (for example) certain dialogs without parents can use a specific window as the top window. If no top window is specified by the application, wxWindows just uses the first frame or dialog in its top-level window list, when it needs to use the top window. diff --git a/docs/latex/wx/array.tex b/docs/latex/wx/array.tex index c5aca501c3..733e548d5d 100644 --- a/docs/latex/wx/array.tex +++ b/docs/latex/wx/array.tex @@ -51,7 +51,7 @@ wxArrayDouble class is scheduled for the next release of wxWindows). wxSortedArray is a wxArray variant which should be used when searching in the array is a frequently used operation. It requires you to define an additional function for comparing two elements of the array element type and always stores -its items in the sorted order (according to this function). Thus, it's +its items in the sorted order (according to this function). Thus, it is \helpref{Index()}{wxarrayindex} function execution time is $O(log(N))$ instead of $O(N)$ for the usual arrays but the \helpref{Add()}{wxarrayadd} method is slower: it is $O(log(N))$ instead of constant time (neglecting time spent in @@ -75,7 +75,7 @@ example: \begin{verbatim} #include -// we must forward declare the array because it's used inside the class +// we must forward declare the array because it is used inside the class // declaration class MyDirectory; class MyFile; @@ -249,7 +249,6 @@ This macro defines a new sorted array class named {\it name} and containing the elements of type {\it T}. The second form is used when compiling DLL under Windows and array needs to be visible outside the DLL. - Example: \begin{verbatim} @@ -259,7 +258,7 @@ class MyClass; WX_DEFINE_SORTED_ARRAY(MyClass *, wxArrayOfMyClass); \end{verbatim} -You will have to initialize the objects of this class by passing a comparaison +You will have to initialize the objects of this class by passing a comparison function to the array object constructor like this: \begin{verbatim} @@ -356,7 +355,7 @@ Default constructor initializes an empty array object. \func{}{wxSortedArray}{\param{int (*)(T first, T second)}{compareFunction}} There is no default constructor for wxSortedArray classes - you must initialize it -with a function to use for item comparaison. It is a function which is passed +with a function to use for item comparison. It is a function which is passed two arguments of type {\it T} where {\it T} is the array element type and which should return a negative, zero or positive value according to whether the first element passed to it is less than, equal to or greater than the second one. @@ -530,14 +529,14 @@ the array classes. \func{\void}{Remove}{\param{T }{item}} -Removes the element from the array either by value: the first item of the +Removes an element from the array by value: the first item of the array equal to {\it item} is removed, an assert failure will result from an attempt to remove an item which doesn't exist in the array. When an element is removed from wxObjArray it is deleted by the array - use \helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On the other hand, when an object is removed from a wxArray nothing happens - you -should delete the it manually if required: +should delete it manually if required: \begin{verbatim} T *item = array[n]; @@ -552,11 +551,11 @@ elements of a wxArray (supposed to contain pointers). \func{\void}{RemoveAt}{\param{size\_t }{index}} -Removes the element from the array either by index. When an element +Removes an element from the array by index. When an element is removed from wxObjArray it is deleted by the array - use \helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On the other hand, when an object is removed from a wxArray nothing happens - you -should delete the it manually if required: +should delete it manually if required: \begin{verbatim} T *item = array[n]; diff --git a/docs/latex/wx/arrstrng.tex b/docs/latex/wx/arrstrng.tex index dc15f1dd0f..71f698a11c 100644 --- a/docs/latex/wx/arrstrng.tex +++ b/docs/latex/wx/arrstrng.tex @@ -80,6 +80,20 @@ reasons it is not virtual, so this class should not be derived from. Assignment operator. +\membersection{wxArrayString::operator==}\label{wxarraystringoperatorequal} + +\constfunc{bool}{operator $==$}{\param{const wxArrayString\&}{ array}} + +Compares 2 arrays respecting the case. Returns TRUE only if the arrays have +the same number of elements and the same strings in the same order. + +\membersection{wxArrayString::operator!=}\label{wxarraystringoperatornotequal} + +\constfunc{bool}{operator $!=$}{\param{const wxArrayString\&}{ array}} + +Compares 2 arrays respecting the case. Returns TRUE if the arrays have +different number of elements or if the elements don't match pairwise. + \membersection{wxArrayString::operator[]}\label{wxarraystringoperatorindex} \func{wxString\&}{operator[]}{\param{size\_t }{nIndex}} @@ -205,23 +219,19 @@ Returns the last element of the array. Attempt to access the last element of an empty array will result in assert failure in debug build, however no checks are done in release mode. -\membersection{wxArrayString::Remove (by value)}\label{wxarraystringremoveval} +\membersection{wxArrayString::Remove}\label{wxarraystringremove} \func{void}{Remove}{\param{const char *}{ sz}} Removes the first item matching this value. An assert failure is provoked by an attempt to remove an element which does not exist in debug build. -See also: \helpref{Index}{wxarraystringindex}, \helpref{Remove}{wxarraystringremove} - -\membersection{wxArrayString::Remove (by index)}\label{wxarraystringremove} +See also: \helpref{Index}{wxarraystringindex} \func{void}{Remove}{\param{size\_t }{nIndex}} Removes the item at given position. -See also: \helpref{Remove}{wxarraystringremoveval} - \membersection{wxArrayString::Shrink}\label{wxarraystringshrink} \func{void}{Shrink}{\void} @@ -231,7 +241,7 @@ minimize the array memory consumption. See also: \helpref{Alloc}{wxarraystringalloc}, \helpref{Dynamic array memory management}{wxarraymemorymanagement} -\membersection{wxArrayString::Sort (alphabetically)}\label{wxarraystringsort} +\membersection{wxArrayString::Sort}\label{wxarraystringsort} \func{void}{Sort}{\param{bool}{ reverseOrder = FALSE}} @@ -242,10 +252,6 @@ Sorts the array in alphabetical order or in reverse alphabetical order if could break the order of items and, for example, subsequent calls to \helpref{Index()}{wxarraystringindex} would then not work! -See also: \helpref{Sort}{wxarraystringsortcallback} - -\membersection{wxArrayString::Sort (user defined)}\label{wxarraystringsortcallback} - \func{void}{Sort}{\param{CompareFunction }{compareFunction}} Sorts the array using the specified {\it compareFunction} for item comparison. @@ -280,5 +286,3 @@ array.Sort(CompareStringLen); could break the order of items and, for example, subsequent calls to \helpref{Index()}{wxarraystringindex} would then not work! -See also: \helpref{Sort}{wxarraystringsort} - diff --git a/docs/latex/wx/back.gif b/docs/latex/wx/back.gif index 8a61076d3ba74bdedc1d24f60c3d1f5a361a6cee..88a3740f9134d7a569b56a9f76e6aa552672993e 100644 GIT binary patch literal 978 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7H6AG;jlf>Rey!M3TUK6P?i!m{q7|$j(iU2nb+j@t;aY#t_B`I%AGL2Z zO6>3Q?Jm>3v>|kImhI|mtHW1|tWDEBQI>amZ`s68xzaas@2+e3%;$D{>W3T0V&ot1 Q_1d}V>FF7|>?{n{02fm-00000 literal 225 zcmV<703QEGNk%v~VLt#E0Pz3-zrVld=jU&4Z(9HWEC2ui06zd20008IjE||y?GK}z zNf>~$-n{z{YJwGn=81mem9{RpmcUHc_KoNIPRH~B4DyD9p%LJl6@Sa4^Epcbno6kk zD5XxT&EQg7>t<(Iwfoo diff --git a/docs/latex/wx/bbutton.tex b/docs/latex/wx/bbutton.tex index 4aa48eeba7..14d993ffe5 100644 --- a/docs/latex/wx/bbutton.tex +++ b/docs/latex/wx/bbutton.tex @@ -20,7 +20,7 @@ almost any other window. A bitmap button can be supplied with a single bitmap, and wxWindows will draw all button states using this bitmap. If the application needs more control, additional bitmaps for -the selected state, unpressed focussed state, and greyed-out state may be supplied. +the selected state, unpressed focused state, and greyed-out state may be supplied. \wxheading{Window styles} @@ -29,7 +29,11 @@ the selected state, unpressed focussed state, and greyed-out state may be suppli \twocolitem{\windowstyle{wxBU\_AUTODRAW}}{If this is specified, the button will be drawn automatically using the label bitmap only, providing a 3D-look border. If this style is not specified, the button will be drawn without borders and using all -provided bitmaps.} +provided bitmaps. WIN32 only.} +\twocolitem{\windowstyle{wxBU\_LEFT}}{Left-justifies the bitmap label. WIN32 only.} +\twocolitem{\windowstyle{wxBU\_TOP}}{Aligns the bitmap label to the top of the button. WIN32 only.} +\twocolitem{\windowstyle{wxBU\_RIGHT}}{Right-justifies the bitmap label. WIN32 only.} +\twocolitem{\windowstyle{wxBU\_BOTTOM}}{Aligns the bitmap label to the bottom of the button. WIN32 only.} \end{twocollist} See also \helpref{window styles overview}{windowstyles}. @@ -115,7 +119,7 @@ Button creation function for two-step creation. For more details, see \helpref{w \membersection{wxBitmapButton::GetBitmapDisabled}\label{wxbitmapbuttongetbitmapdisabled} -\constfunc{wxBitmap\&}{GetBitmapLabel}{\void} +\constfunc{wxBitmap\&}{GetBitmapDisabled}{\void} Returns the bitmap for the disabled state. @@ -131,11 +135,11 @@ A reference to the disabled state bitmap. \constfunc{wxBitmap\&}{GetBitmapFocus}{\void} -Returns the bitmap for the focussed state. +Returns the bitmap for the focused state. \wxheading{Return value} -A reference to the focussed state bitmap. +A reference to the focused state bitmap. \wxheading{See also} diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index fa15dd36d3..b639c4d397 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -55,7 +55,7 @@ portable programs: in this case the {\it bits} parameter should contain an XBM image. For other bit depths, the behaviour is platform dependent: under Windows, the -data is passed withotu any changes to the underlying {\tt CreateBitmap()} API. +data is passed without any changes to the underlying {\tt CreateBitmap()} API. Under other platforms, only monochrome bitmaps may be created using this constructor and \helpref{wxImage}{wximage} should be used for creating colour bitmaps from static data. @@ -505,20 +505,14 @@ Sets the validity member (does not affect the bitmap data). \membersection{wxBitmap::SetPalette}\label{wxbitmapsetpalette} -\func{void}{SetPalette}{\param{wxPalette* }{palette}} +\func{void}{SetPalette}{\param{const wxPalette\& }{palette}} -Sets the associated palette: it will be deleted in the wxBitmap -destructor, so if you do not wish it to be deleted automatically, -reset the palette to NULL before the bitmap is deleted. +Sets the associated palette. \wxheading{Parameters} \docparam{palette}{The palette to set.} -\wxheading{Remarks} - -The bitmap object owns the palette once this has been called. - \wxheading{See also} \helpref{wxPalette}{wxpalette} diff --git a/docs/latex/wx/body.tex b/docs/latex/wx/body.tex index e19128f347..a85315822a 100644 --- a/docs/latex/wx/body.tex +++ b/docs/latex/wx/body.tex @@ -86,7 +86,7 @@ in Windows Help, HTML and Word RTF formats. \item Simple-to-use, object-oriented API. \item Flexible event system. \item Graphics calls include lines, rounded rectangles, splines, polylines, etc. -\item Constraint-based and sizer-based layouting. +\item Constraint-based and sizer-based layouts. \item Print/preview and document/view architectures. \item Toolbar, notebook, tree control, advanced list control classes. \item PostScript generation under Unix, normal MS Windows printing on the PC. @@ -99,7 +99,7 @@ them to the clipboard. \item Ready-to-use HTML window (supporting a subset of HTML). \item Dialog Editor for building dialogs. \item Network support via a family of socket and protocol classes. -\item Support for platform independent image procesing. +\item Support for platform independent image processing. \item Built-in support for many file formats (BMP, PNG, JPEG, GIF, XPM, PNM, PCX). \end{itemize} @@ -123,7 +123,7 @@ Additions and changes: \begin{itemize}\itemsep=0pt \item class hierarchy changed, and restrictions about subwindow nesting lifted; -\item header files reorganised to conform to normal C++ standards; +\item header files reorganized to conform to normal C++ standards; \item classes less dependent on each another, to reduce executable size; \item wxString used instead of char* wherever possible; \item the number of separate but mandatory utilities reduced; @@ -190,7 +190,7 @@ Additions and changes: \item Many optical improvements to GTK port. \item Support for menu accelerators in GTK port. \item Enhanced and improved support for scrolling, including child windows. -\item Complete rewrite of clipboard and drag'n'drop classes. +\item Complete rewrite of clipboard and drag and drop classes. \item Improved support for ODBC databases. \item Improved tab traversal in dialogs. \end{itemize} @@ -234,7 +234,7 @@ Julian Smart\\ Uppingham\\ Rutland\\ LE15 9SG\\ -julian.smart@ukonline.co.uk +julian.smart@btopenworld.com \section{Acknowledgments} @@ -449,7 +449,7 @@ fine on some platforms, and then fail under Windows. \section{Architecture dependency} A problem which sometimes arises from writing multi-platform programs is that -the basic C types are not defiend the same on all platforms. This holds true +the basic C types are not defined the same on all platforms. This holds true for both the length in bits of the standard types (such as int and long) as well as their byte order, which might be little endian (typically on Intel computers) or big endian (typically on some Unix workstations). wxWindows @@ -492,7 +492,7 @@ its own run-time type information system, implemented using macros. Some compilers (e.g. the native IRIX cc) define NULL to be 0L so that no conversion to pointers is allowed. Because of that, all these -occurences of NULL in the GTK port use an explicit conversion such +occurrences of NULL in the GTK port use an explicit conversion such as {\small @@ -527,7 +527,7 @@ X and Windows parts of the library) conditional compilation that under Unix, includes a minimal set of headers; and when using Visual C++, includes {\tt wx.h}. This should help provide the optimal compilation for each compiler, although it is -biassed towards the precompiled headers facility available +biased towards the precompiled headers facility available in Microsoft C++. \section{File handling} @@ -577,7 +577,7 @@ more easily accessed via the Contributions page on the Web site. wxHelp is a stand-alone program, written using wxWindows, for displaying hypertext help. It is necessary since not all target systems (notably X) supply an adequate -standard for on-line help. wxHelp is modelled on the MS Windows help +standard for on-line help. wxHelp is modeled on the MS Windows help system, with contents, search and browse buttons, but does not reformat text to suit the size of window, as WinHelp does, and its input files are uncompressed ASCII with some embedded font commands and an .xlp @@ -690,9 +690,9 @@ it can alert you to problems later on. \subsection{Use wxString in preference to character arrays} Using wxString can be much safer and more convenient than using char *. -Again, I haven't practised what I'm preaching, but I'm now trying to use +Again, I haven't practiced what I'm preaching, but I'm now trying to use wxString wherever possible. You can reduce the possibility of memory -leaks substantially, and it's much more convenient to use the overloaded +leaks substantially, and it is much more convenient to use the overloaded operators than functions such as strcmp. wxString won't add a significant overhead to your program; the overhead is compensated for by easier manipulation (which means less code). @@ -721,7 +721,7 @@ kinds of bitmap depending on platform (see the section on resource files). \subsection{Positive thinking} -It's common to blow up the problem in one's imagination, so that it seems to threaten +It is common to blow up the problem in one's imagination, so that it seems to threaten weeks, months or even years of work. The problem you face may seem insurmountable: but almost never is. Once you have been programming for some time, you will be able to remember similar incidents that threw you into the depths of despair. But @@ -748,8 +748,8 @@ deallocation, this can still give totally spurious results! \subsection{Use a debugger} -This sounds like facetious advice, but it's surprising how often people -don't use a debugger. Often it's an overhead to install or learn how to +This sounds like facetious advice, but it is surprising how often people +don't use a debugger. Often it is an overhead to install or learn how to use a debugger, but it really is essential for anything but the most trivial programs. @@ -778,13 +778,13 @@ See the \helpref{debugging overview}{debuggingoverview} for further information. \subsection{Check Windows debug messages} -Under Windows, it's worth running your program with +Under Windows, it is worth running your program with \urlref{DbgView}{http://www.sysinternals.com} running or -some other program that shows Windows-generated debug messages. It's -possible it'll show invalid handles being used. You may have fun seeing +some other program that shows Windows-generated debug messages. It is +possible it will show invalid handles being used. You may have fun seeing what commercial programs cause these normally hidden errors! Microsoft recommend using the debugging version of Windows, which shows up even -more problems. However, I doubt it's worth the hassle for most +more problems. However, I doubt it is worth the hassle for most applications. wxWindows is designed to minimize the possibility of such errors, but they can still happen occasionally, slipping through unnoticed because they are not severe enough to cause a crash. diff --git a/docs/latex/wx/books.gif b/docs/latex/wx/books.gif index 036d016fb16b793dd714a3916251f59b7efc654d..118aa0a8192c37c9bb6485f20b5ade0301fc555e 100644 GIT binary patch delta 339 zcmV-Z0j&P=0k{K@Lk|f6EC2ui051S8000F3Fp*L(e}EQpxqBe2HDW>*)g^0Isllmo z%?`oGV+RBn#?J$~J>9+EZa7RvEBO6sYk7Eh2M7d+2smwjfJt_Dd58pZhl(D9V+Cpt z1%Z%wlbnW#ADIA+o{xi~oNA<(MFwh`YK~t9t(;(_1ekZ4jdcKst~61jmOj9!oT@^) z$GcsJf4;JjsX?vC$kNFKu^FeS(MHqfz1Mhu} or double clicking it. + +It has advanced possibilities for the customization of its display. All global +settings (such as colours and fonts used) can, of course, be changed. But +also, the display style for each day in the month can be set independently +using \helpref{wxCalendarDateAttr}{wxcalendardateattr} class. + +An item without custom attributes is drawn with the default colours and +font and without border, but setting custom attributes with +\helpref{SetAttr}{wxcalendarctrlsetattr} allows to modify its appearance. Just +create a custom attribute object and set it for the day you want to be +displayed specially (note that the control will take ownership of the pointer, +i.e. it will delete it itself). A day may be marked as being a holiday, even +if it is not reckognized as oen by \helpref{wxDateTime}{tdateholidays} using +\helpref{SetHoliday}{wxcalendardateattrsetholiday} method. + +As the attributes are specified for each day, they may change when the month +is changed, so you will often want to update them in +{\tt EVT\_CALENDAR\_MONTH} event handler. + +\wxheading{Derived from} + +\helpref{wxControl}{wxcontrol}\\ +\helpref{wxWindow}{wxwindow}\\ +\helpref{wxEvtHandler}{wxevthandler}\\ +\helpref{wxObject}{wxobject} \wxheading{Include files} -\wxheading{See also:} +\wxheading{Window styles} -\helpref{Calendar sample}{samplecalendar} +\twocolwidtha{5cm} +\begin{twocollist}\itemsep=4pt +\twocolitem{\windowstyle{wxCAL\_SUNDAY\_FIRST}}{Show Sunday as the first day in the week} +\twocolitem{\windowstyle{wxCAL\_MONDAY\_FIRST}}{Show Monday as the first day in the week} +\twocolitem{\windowstyle{wxCAL\_SHOW\_HOLIDAYS}}{Highlight holidays in the calendar} +\twocolitem{\windowstyle{wxCAL\_NO\_YEAR\_CHANGE}}{Disable the year changing} +\twocolitem{\windowstyle{wxCAL\_NO\_MONTH\_CHANGE}}{Disable the month (and, implicitly, the year) changing} +\end{twocollist} + +The default calendar style is {\tt wxCAL\_SHOW\_HOLIDAYS}. + +\wxheading{Event table macros} + +To process input from a calendar control, use these event handler macros to +direct input to member functions that take a +\helpref{wxCalendarEvent}{wxcalendarevent} argument. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=7pt +\twocolitem{{\bf EVT\_CALENDAR(id, func)}}{A day was double clickedi n the calendar.} +\twocolitem{{\bf EVT\_CALENDAR\_SEL\_CHANGED(id, func)}}{The selected date changed.} +\twocolitem{{\bf EVT\_CALENDAR\_DAY(id, func)}}{The selected day changed.} +\twocolitem{{\bf EVT\_CALENDAR\_MONTH(id, func)}}{The selected month changed.} +\twocolitem{{\bf EVT\_CALENDAR\_YEAR(id, func)}}{The selected year changed.} +\twocolitem{{\bf EVT\_CALENDAR\_WEEKDAY\_CLICKED(id, func)}}{User clicked on the week day header} +\end{twocollist}% + +Note that changing the selected date will result in either of +{\tt EVT\_CALENDAR\_DAY}, {\tt MONTH} or {\tt YEAR} events and +{\tt EVT\_CALENDAR\_SEL\_CHANGED} one. + +\wxheading{Constants} + +The following are the possible return values for +\helpref{HitTest}{wxcalendarctrlhittest} method: +{\small \begin{verbatim} +enum wxCalendarHitTestResult +\{ + wxCAL_HITTEST_NOWHERE, // outside of anything + wxCAL_HITTEST_HEADER, // on the header (weekdays) + wxCAL_HITTEST_DAY // on a day in the calendar +\}; +\end{verbatim}} + +\wxheading{See also} + +\helpref{Calendar sample}{samplecalendar}\\ +\helpref{wxCalendarDateAttr}{wxcalendardateattr}\\ +\helpref{wxCalendarEvent}{wxcalendarevent} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxCalendarCtrl::wxCalendarCtrl}\label{wxcalendarctrlwxcalendarctrldef} + +\func{}{wxCalendarCtrl}{\void} + +Default constructor, use \helpref{Create}{wxcalendarctrlcreate} after it. + +\membersection{wxCalendarCtrl::wxCalendarCtrl}\label{wxcalendarctrlwxcalendarctrl} + +\func{}{wxCalendarCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}} + +Does the same as \helpref{Create}{wxcalendarctrlcreate} method. + +\membersection{wxCalendarCtrl::Create}\label{wxcalendarctrlcreate} + +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}} + +Creates the control. See \helpref{wxWindow}{wxwindowctor} for the meaning of +the parameters and the control overview for the possible styles. + +\membersection{wxCalendarCtrl::\destruct{wxCalendarCtrl}}\label{wxcalendarctrldtor} + +\func{}{\destruct{wxCalendarCtrl}}{\void} + +Destroys the control. + +\membersection{wxCalendarCtrl::SetDate}\label{wxcalendarctrlsetdate} + +\func{void}{SetDate}{\param{const wxDateTime\& }{date}} + +Sets the current date. + +\membersection{wxCalendarCtrl::GetDate}\label{wxcalendarctrlgetdate} + +\constfunc{const wxDateTime\&}{GetDate}{\void} + +Gets the currently selected date. + +\membersection{wxCalendarCtrl::EnableYearChange}\label{wxcalendarctrlenableyearchange} + +\func{void}{EnableYearChange}{\param{bool }{enable = TRUE}} + +This function should be used instead of changing {\tt wxCAL\_NO\_YEAR\_CHANGE} +style bit directly. It allows or disallows the user to chaneg the year +interactively. + +\membersection{wxCalendarCtrl::EnableMonthChange}\label{wxcalendarctrlenablemonthchange} + +\func{void}{EnableMonthChange}{\param{bool }{enable = TRUE}} + +This function should be used instead of changing +{\tt wxCAL\_NO\_MONTH\_CHANGE} style bit. It allows or disallows the user to +change the month interactively. Note that if the month can not be changed, the +year can not be changed neither. + +\membersection{wxCalendarCtrl::EnableHolidayDisplay}\label{wxcalendarctrlenableholidaydisplay} + +\func{void}{EnableHolidayDisplay}{\param{bool }{display = TRUE}} + +This function should be used instead of changing {\tt wxCAL\_SHOW\_HOLIDAYS} +style bit directly. It enables or disables the special highlighting of the +holidays. + +\membersection{wxCalendarCtrl::SetHeaderColours}\label{wxcalendarctrlsetheadercolours} + +\func{void}{SetHeaderColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}} + +Set the colours used for painting the weekdays at the top of the control. + +\membersection{wxCalendarCtrl::GetHeaderColourFg}\label{wxcalendarctrlgetheadercolourfg} + +\constfunc{const wxColour\&}{GetHeaderColourFg}{\void} + +Gets the foreground colour of the header part of the calendar window. + +\wxheading{See also} + +\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours} + +\membersection{wxCalendarCtrl::GetHeaderColourBg}\label{wxcalendarctrlgetheadercolourbg} + +\constfunc{const wxColour\&}{GetHeaderColourBg}{\void} + +Gets the background colour of the header part of the calendar window. + +\wxheading{See also} + +\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours} + +\membersection{wxCalendarCtrl::SetHighlightColours}\label{wxcalendarctrlsethighlightcolours} + +\func{void}{SetHighlightColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}} + +Set the colours to be used for highlighting the currently selected date. + +\membersection{wxCalendarCtrl::GetHighlightColourFg}\label{wxcalendarctrlgethighlightcolourfg} + +\constfunc{const wxColour\&}{GetHighlightColourFg}{\void} + +Gets the foreground highlight colour. + +\wxheading{See also} + +\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours} + +\membersection{wxCalendarCtrl::GetHighlightColourBg}\label{wxcalendarctrlgethighlightcolourbg} + +\constfunc{const wxColour\&}{GetHighlightColourBg}{\void} + +Gets the background highlight colour. + +\wxheading{See also} + +\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours} + +\membersection{wxCalendarCtrl::SetHolidayColours}\label{wxcalendarctrlsetholidaycolours} + +\func{void}{SetHolidayColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}} + +Sets the colours to be used for the holidays highlighting (only used if the +window style includes {\tt wxCAL\_SHOW\_HOLIDAYS} flag). + +\membersection{wxCalendarCtrl::GetHolidayColourFg}\label{wxcalendarctrlgetholidaycolourfg} + +\constfunc{const wxColour\&}{GetHolidayColourFg}{\void} + +Return the foregound colour currently used for holiday highlighting. + +\wxheading{See also} + +\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours} + +\membersection{wxCalendarCtrl::GetHolidayColourBg}\label{wxcalendarctrlgetholidaycolourbg} + +\constfunc{const wxColour\&}{GetHolidayColourBg}{\void} + +Return the background colour currently used for holiday highlighting. + +\wxheading{See also} + +\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours} + +\membersection{wxCalendarCtrl::GetAttr}\label{wxcalendarctrlgetattr} + +\constfunc{wxCalendarDateAttr *}{GetAttr}{\param{size\_t }{day}} + +Returns the attribute for the given date (should be in the range $1\ldots31$). + +The returned pointer may be {\tt NULL}. + +\membersection{wxCalendarCtrl::SetAttr}\label{wxcalendarctrlsetattr} + +\func{void}{SetAttr}{\param{size\_t }{day}, \param{wxCalendarDateAttr* }{attr}} + +Associates the attribute with the specified date (in the range $1\ldots31$). + +If the pointer is {\tt NULL}, the items attribute is cleared. + +\membersection{wxCalendarCtrl::SetHoliday}\label{wxcalendarctrlsetholiday} + +\func{void}{SetHoliday}{\param{size\_t }{day}} + +Marks the specified day as being a holiday in the current month. + +\membersection{wxCalendarCtrl::ResetAttr}\label{wxcalendarctrlresetattr} + +\func{void}{ResetAttr}{\param{size\_t }{day}} + +Clears any attributes associated with the given day (in the range +$1\ldots31$). + +\membersection{wxCalendarCtrl::HitTest}\label{wxcalendarctrlhittest} + +\func{wxCalendarHitTestResult}{HitTest}{\param{const wxPoint\& }{pos}, \param{wxDateTime* }{date = NULL}, \param{wxDateTime::WeekDay* }{wd = NULL}} + +Returns one of {\tt wxCAL\_HITTEST\_XXX} +\helpref{constants}{wxcalendarctrl} and fills either {\it date} or +{\it wd} pointer with the corresponding value depending on the hit test code. + +\section{\class{wxCalendarDateAttr}}\label{wxcalendardateattr} + +wxCalendarDateAttr is a custom attributes for a calendar date. The objects of +this class are used with \helpref{wxCalendarCtrl}{wxcalendarctrl}. + +\wxheading{Derived from} + +No base class + +\wxheading{Constants} + +Here are the possible kinds of borders which may be used to decorate a date: + +{\small \begin{verbatim} +enum wxCalendarDateBorder +{ + wxCAL\_BORDER\_NONE, // no border (default) + wxCAL\_BORDER\_SQUARE, // a rectangular border + wxCAL\_BORDER\_ROUND // a round border +} +\end{verbatim}} + +\wxheading{See also} + +\helpref{wxCalendarCtrl}{wxcalendarctrl} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxCalendarDateAttr::wxCalendarDateAttr}\label{wxcalendardateattrwxcalendardateattr} + +\func{}{wxCalendarDateAttr}{\void} + +\func{}{wxCalendarDateAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack = wxNullColour}, \param{const wxColour\& }{colBorder = wxNullColour}, \param{const wxFont\& }{font = wxNullFont}, \param{wxCalendarDateBorder }{border = wxCAL\_BORDER\_NONE}} + +\func{}{wxCalendarDateAttr}{\param{wxCalendarDateBorder }{border}, \param{const wxColour\& }{colBorder = wxNullColour}} + +The constructors. + +\membersection{wxCalendarDateAttr::SetTextColour}\label{wxcalendardateattrsettextcolour} + +\func{void}{SetTextColour}{\param{const wxColour\& }{colText}} + +Sets the text (foreground) colour to use. + +\membersection{wxCalendarDateAttr::SetBackgroundColour}\label{wxcalendardateattrsetbackgroundcolour} + +\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}} + +Sets the text background colour to use. + +\membersection{wxCalendarDateAttr::SetBorderColour}\label{wxcalendardateattrsetbordercolour} + +\func{void}{SetBorderColour}{\param{const wxColour\& }{col}} + +Sets the border colour to use. + +\membersection{wxCalendarDateAttr::SetFont}\label{wxcalendardateattrsetfont} + +\func{void}{SetFont}{\param{const wxFont\& }{font}} + +Sets the font to use. + +\membersection{wxCalendarDateAttr::SetBorder}\label{wxcalendardateattrsetborder} + +\func{void}{SetBorder}{\param{wxCalendarDateBorder }{border}} + +Sets the \helpref{border kind}{wxcalendardateattr} + +\membersection{wxCalendarDateAttr::SetHoliday}\label{wxcalendardateattrsetholiday} + +\func{void}{SetHoliday}{\param{bool }{holiday}} + +Display the date with this attribute as a holiday. + +\membersection{wxCalendarDateAttr::HasTextColour}\label{wxcalendardateattrhastextcolour} + +\constfunc{bool}{HasTextColour}{\void} + +Returns {\tt TRUE} if this item has a non default text foreground colour. + +\membersection{wxCalendarDateAttr::HasBackgroundColour}\label{wxcalendardateattrhasbackgroundcolour} + +\constfunc{bool}{HasBackgroundColour}{\void} + +Returns {\tt TRUE} if this attribute specifies a non default text background colour. + +\membersection{wxCalendarDateAttr::HasBorderColour}\label{wxcalendardateattrhasbordercolour} + +\constfunc{bool}{HasBorderColour}{\void} + +Returns {\tt TRUE} if this attribute specifies a non default border colour. + +\membersection{wxCalendarDateAttr::HasFont}\label{wxcalendardateattrhasfont} + +\constfunc{bool}{HasFont}{\void} + +Returns {\tt TRUE} if this attribute specifies a non default font. + +\membersection{wxCalendarDateAttr::HasBorder}\label{wxcalendardateattrhasborder} + +\constfunc{bool}{HasBorder}{\void} + +Returns {\tt TRUE} if this attribute specifies a non default (i.e. any) border. + +\membersection{wxCalendarDateAttr::IsHoliday}\label{wxcalendardateattrisholiday} + +\constfunc{bool}{IsHoliday}{\void} + +Returns {\tt TRUE} if this attribute specifies that this item should be +displayed as a holiday. + +\membersection{wxCalendarDateAttr::GetTextColour}\label{wxcalendardateattrgettextcolour} + +\constfunc{const wxColour\&}{GetTextColour}{\void} + +Returns the text colour to use for the item with this attribute. + +\membersection{wxCalendarDateAttr::GetBackgroundColour}\label{wxcalendardateattrgetbackgroundcolour} + +\constfunc{const wxColour\&}{GetBackgroundColour}{\void} + +Returns the background colour to use for the item with this attribute. + +\membersection{wxCalendarDateAttr::GetBorderColour}\label{wxcalendardateattrgetbordercolour} + +\constfunc{const wxColour\&}{GetBorderColour}{\void} + +Returns the border colour to use for the item with this attribute. + +\membersection{wxCalendarDateAttr::GetFont}\label{wxcalendardateattrgetfont} + +\constfunc{const wxFont\&}{GetFont}{\void} + +Returns the font to use for the item with this attribute. + +\membersection{wxCalendarDateAttr::GetBorder}\label{wxcalendardateattrgetborder} + +\constfunc{wxCalendarDateBorder}{GetBorder}{\void} + +Returns the \helpref{border}{wxcalendardateattr} to use for the item with this attribute. + +\section{\class{wxCalendarEvent}}\label{wxcalendarevent} + +The wxCalendarEvent class is used together with +\helpref{wxCalendarCtrl}{wxcalendarctrl}. + +\wxheading{See also} + +\helpref{wxCalendarCtrl}{wxcalendarctrl} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxCalendarEvent::GetDate}{wxcalendareventgetdate} + +\constfunc{const wxDateTime&}{GetDate}{\void} + +Returns the date. This function may be called for all event types except +{\tt EVT\_CALENDAR\_WEEKDAY\_CLICKED} one for which it doesn't make sense. + +\membersection{wxCalendarEvent::GetWeekDay}{wxcalendareventgetweekday} + +\constfunc{wxDateTime::WeekDay}{GetWeekDay}{\void} + +Returns the week day on which the user clicked in +{\tt EVT\_CALENDAR\_WEEKDAY\_CLICKED} handler. It doesn't make sense to call +this function in other handlers. diff --git a/docs/latex/wx/caret.tex b/docs/latex/wx/caret.tex new file mode 100644 index 0000000000..474b9c4557 --- /dev/null +++ b/docs/latex/wx/caret.tex @@ -0,0 +1,147 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: caret.tex +%% Purpose: wxCaret documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 20.06.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxCaret}}\label{wxcaret} + +A caret is a blinking cursor showing the position where the typed text will +appear. The text controls usually have a caret but wxCaret class also allows +to use a caret in other windows. + +Currently, the caret appears as a rectangle of the given size. In the future, +it will be possible to specify a bitmap to be used for the caret shape. + +A caret is always associated with a window and the current caret can be +retrieved using \helpref{wxWindow::GetCaret}{wxwindowgetcaret}. The same caret +can't be reused in two different windows. + +\wxheading{Derived from} + +No base class + +\wxheading{Include files} + + + +\wxheading{Data structures} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxCaret::wxCaret}\label{wxcaretwxcaret} + +\func{}{wxCaret}{\void} + +Default constructor: you must use one of Create() functions later. + +\func{}{wxCaret}{\param{wxWindow* }{window}, \param{int }{width}, \param{int }{height}} + +\func{}{wxCaret}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}} + +Create the caret of given (in pixels) width and height and associates it +with the given window. + +\membersection{wxCaret::Create}\label{wxcaretcreate} + +\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{int }{width}, \param{int }{height}} + +\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}} + +Create the caret of given (in pixels) width and height and associates it +with the given window (same as constructor). + +\membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime} + +\func{static int}{GetBlinkTime}{\void} + +Returns the blink time which is measured in milliseconds and is the time elapsed +between 2 inversions of the caret (blink time of the caret is the same +for all carets, so this functions is static). + +\membersection{wxCaret::GetPosition}\label{wxcaretgetposition} + +\constfunc{void}{GetPosition}{\param{int* }{x}, \param{int* }{y}} + +\constfunc{wxPoint}{GetPosition}{\void} + +Get the caret position (in pixels). + +\membersection{wxCaret::GetSize}\label{wxcaretgetsize} + +\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}} + +\constfunc{wxSize}{GetSize}{\void} + +Get the caret size. + +\membersection{wxCaret::GetWindow}\label{wxcaretgetwindow} + +\constfunc{wxWindow*}{GetWindow}{\void} + +Get the window the caret is associated with. + +\membersection{wxCaret::Hide}\label{wxcarethide} + +\func{void}{Hide}{\void} + +Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}. + +\membersection{wxCaret::IsOk}\label{wxcaretisok} + +\constfunc{bool}{IsOk}{\void} + +Returns TRUE if the caret was created successfully. + +\membersection{wxCaret::IsVisible}\label{wxcaretisvisible} + +\constfunc{bool}{IsVisible}{\void} + +Returns TRUE if the caret is visible and FALSE if it is permanently +hidden (if it is is blinking and not shown currently but will be after the +next blink, this method still returns TRUE). + +\membersection{wxCaret::Move}\label{wxcaretmove} + +\func{void}{Move}{\param{int }{x}, \param{int }{y}} + +\func{void}{Move}{\param{const wxPoint\& }{pt}} + +Move the caret to given position (in logical coordinates). + +\membersection{wxCaret::SetBlinkTime}\label{wxcaretsetblinktime} + +\func{static void}{SetBlinkTime}{\param{int }{milliseconds}} + +Sets the blink time for all the carets. + +\wxheading{Remarks} + +Under Windows, this function will change the blink time for {\bf all} carets +permanently (until the next time it is called), even for the carets in other +applications. + +\wxheading{See also} + +\helpref{GetBlinkTime}{wxcaretgetblinktime} + +\membersection{wxCaret::SetSize}\label{wxcaretsetsize} + +\func{void}{SetSize}{\param{int }{width}, \param{int }{height}} + +\func{void}{SetSize}{\param{const wxSize\& }{size}} + +Changes the size of the caret. + +\membersection{wxCaret::Show}\label{wxcaretshow} + +\func{void}{Show}{\param{bool }{show = TRUE}} + +Shows or hides the caret. Notice that if the caret was hidden $N$ times, it +must be shown $N$ times as well to reappear on the screen. + diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index d6c9061649..3ad1756e0f 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -17,6 +17,7 @@ Frames may contain windows, and dialog boxes may directly contain controls. \twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame} \twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame} \twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar} +\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog.} \twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog (deprecated, use wxNotebook instead)} \end{twocollist} @@ -39,6 +40,8 @@ The following are a variety of classes that are derived from wxWindow. \twocolitem{\helpref{wxPlotWindow}{wxplotwindow}}{A class to display data.} \twocolitem{\helpref{wxSashWindow}{wxsashwindow}}{Window with four optional sashes that can be dragged} \twocolitem{\helpref{wxSashLayoutWindow}{wxsashlayoutwindow}}{Window that can be involved in an IDE-like layout arrangement} +\twocolitem{\helpref{wxWizardPage}{wxwizardpage}}{A base class for the page in wizard dialog.} +\twocolitem{\helpref{wxWizardPageSimple}{wxwizardpagesimple}}{A page in wizard dialog.} \end{twocollist} {\large {\bf Common dialogs}} @@ -61,6 +64,7 @@ in an application. \twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog} \twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog} \twocolitem{\helpref{wxMessageDialog}{wxmessagedialog}}{Simple message box dialog} +\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog.} \end{twocollist} {\large {\bf Controls}} @@ -72,6 +76,7 @@ that are not static can have \helpref{validators}{wxvalidator} associated with t \twocolitem{\helpref{wxControl}{wxcontrol}}{The base class for controls} \twocolitem{\helpref{wxButton}{wxbutton}}{Push button control, displaying text} \twocolitem{\helpref{wxBitmapButton}{wxbitmapbutton}}{Push button control, displaying a bitmap} +\twocolitem{\helpref{wxCalendarCtrl}{wxcalendarctrl}}{Date picker control} \twocolitem{\helpref{wxCheckBox}{wxcheckbox}}{Checkbox control} \twocolitem{\helpref{wxCheckListBox}{wxchecklistbox}}{A listbox with a checkbox to the left of each item} \twocolitem{\helpref{wxChoice}{wxchoice}}{Choice control (a combobox without the editable area)} @@ -81,8 +86,8 @@ that are not static can have \helpref{validators}{wxvalidator} associated with t \twocolitem{\helpref{wxListBox}{wxlistbox}}{A list of strings for single or multiple selection} \twocolitem{\helpref{wxListCtrl}{wxlistctrl}}{A control for displaying lists of strings and/or icons, plus a multicolumn report view} \twocolitem{\helpref{wxTabCtrl}{wxtabctrl}}{Manages several tabs} -\twocolitem{\helpref{wxTextCtrl}{wxtextctrl}}{Single or multline text editing control} -\twocolitem{\helpref{wxTreeCtrl}{wxtreectrl}}{Tree (hierachy) control} +\twocolitem{\helpref{wxTextCtrl}{wxtextctrl}}{Single or multiline text editing control} +\twocolitem{\helpref{wxTreeCtrl}{wxtreectrl}}{Tree (hierarchy) control} \twocolitem{\helpref{wxScrollBar}{wxscrollbar}}{Scrollbar control} \twocolitem{\helpref{wxSpinButton}{wxspinbutton}}{A spin or `up-down' control} \twocolitem{\helpref{wxSpinCtrl}{wxspinctrl}}{A spin control - i.e. spin button and text control} @@ -103,7 +108,7 @@ that are not static can have \helpref{validators}{wxvalidator} associated with t {\large {\bf Window layout}} -There are two different systems for layouting windows (and dialogs in particluar). +There are two different systems for layouting windows (and dialogs in particular). One is based upon so-called sizers and it requires less typing, thinking and calculating and will in almost all cases produce dialogs looking equally well on all platforms, the other is based on so-called constraints and allows for more detailed layouts. @@ -112,6 +117,8 @@ These are the classes relevant to the sizer-based layout. \begin{twocollist}\itemsep=0pt \twocolitem{\helpref{wxSizer}{wxsizer}}{Abstract base class} +\twocolitem{\helpref{wxGridSizer}{wxgridsizer}}{A sizer for laying out windows in a grid with all fields having the same size} +\twocolitem{\helpref{wxFlexGridSizer}{wxflexgridsizer}}{A sizer for laying out windows in a flexible grid} \twocolitem{\helpref{wxBoxSizer}{wxboxsizer}}{A sizer for laying out windows in a row or column} \twocolitem{\helpref{wxStaticBoxSizer}{wxstaticboxsizer}}{Same as wxBoxSizer, but with surrounding static box} \twocolitem{\helpref{wxNotebookSizer}{wxnotebooksizer}}{Sizer to use with the wxNotebook control.} @@ -179,9 +186,11 @@ An event object contains information about a specific event. Event handlers \begin{twocollist}\itemsep=0pt \twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{A window or application activation event} +\twocolitem{\helpref{wxCalendarEvent}{wxcalendarevent}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}} \twocolitem{\helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}}{Used to calculate window layout} \twocolitem{\helpref{wxCloseEvent}{wxcloseevent}}{A close window or end session event} \twocolitem{\helpref{wxCommandEvent}{wxcommandevent}}{An event from a variety of standard controls} +\twocolitem{\helpref{wxDialUpEvent}{wxdialupevent}}{Event send by \helpref{wxDialUpManager}{wxdialupmanager}} \twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{A drop files event} \twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{An erase background event} \twocolitem{\helpref{wxEvent}{wxevent}}{The event base class} @@ -203,10 +212,12 @@ An event object contains information about a specific event. Event handlers \twocolitem{\helpref{wxScrollWinEvent}{wxscrollwinevent}}{A scroll event from scrolled windows} \twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event} \twocolitem{\helpref{wxSocketEvent}{wxsocketevent}}{A socket event} +\twocolitem{\helpref{wxSpinEvent}{wxspinevent}}{An event from \helpref{wxSpinButton}{wxspinbutton}} \twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event} \twocolitem{\helpref{wxTabEvent}{wxtabevent}}{A tab control event} \twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{A tree control event} \twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event} +\twocolitem{\helpref{wxWizardEvent}{wxwizardevent}}{A wizard event} \end{twocollist} {\large {\bf Validators}} @@ -227,10 +238,12 @@ user input. These are the data structure classes supported by wxWindows. \begin{twocollist}\itemsep=0pt +\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class} +\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation (deprecated in favour of wxDateTime)} +\twocolitem{\helpref{wxDateSpan}{wxdatespan}}{A logical time interval.} +\twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations} \twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O} \twocolitem{\helpref{wxExprDatabase}{wxexprdatabase}}{A class for flexible I/O} -\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation (deprecated in favour of wxDateTime)} -\twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations} \twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation} % \twocolitem{\helpref{wxHashTableLong}{wxhashtablelong}}{A wxHashTable version for storing long data} \twocolitem{\helpref{wxList}{wxlist}}{A simple linked list implementation} @@ -247,6 +260,7 @@ These are the data structure classes supported by wxWindows. \twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers} \twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size} \twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation (deprecated in favour of wxDateTime)} +\twocolitem{\helpref{wxTimeSpan}{wxtimespan}}{A time interval.} \twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types that may change at run-time} \end{twocollist} @@ -288,7 +302,8 @@ classes, functions and macros. wxWindows provides its own classes for socket based networking. \begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxIPV4address}{wxipv4address}}{Represents an Internet adress} +\twocolitem{\helpref{wxDialUpManager}{wxdialupmanager}}{Provides functions to check the status of network connection and to establish one} +\twocolitem{\helpref{wxIPV4address}{wxipv4address}}{Represents an Internet address} \twocolitem{\helpref{wxSocketBase}{wxsocketbase}}{Represents a socket base object} \twocolitem{\helpref{wxSocketClient}{wxsocketclient}}{Represents a socket client} \twocolitem{\helpref{wxSocketServer}{wxsocketserver}}{Represents a socket server} @@ -326,7 +341,7 @@ housekeeping for a document-centric application. \begin{twocollist}\itemsep=0pt \twocolitem{\helpref{wxDocument}{wxdocument}}{Represents a document} \twocolitem{\helpref{wxView}{wxview}}{Represents a view} -\twocolitem{\helpref{wxDocTemplate}{wxdoctemplate}}{Manages the relationship between a document class and a veiw class} +\twocolitem{\helpref{wxDocTemplate}{wxdoctemplate}}{Manages the relationship between a document class and a view class} \twocolitem{\helpref{wxDocManager}{wxdocmanager}}{Manages the documents and views in an application} \twocolitem{\helpref{wxDocChildFrame}{wxdocchildframe}}{A child frame for showing a document view} \twocolitem{\helpref{wxDocParentFrame}{wxdocparentframe}}{A parent frame to contain views} @@ -339,7 +354,7 @@ housekeeping for a document-centric application. \overview{Overview}{printingoverview} A printing and previewing framework is implemented to -make it relatively straighforward to provide document printing +make it relatively straightforward to provide document printing facilities. \begin{twocollist}\itemsep=0pt @@ -432,7 +447,7 @@ capabilities of the various platforms. \twocolitem{\helpref{wxMutex}{wxmutex}}{Mutex class} \twocolitem{\helpref{wxMutexLocker}{wxmutexlocker}}{Mutex locker utility class} \twocolitem{\helpref{wxCriticalSection}{wxcriticalsection}}{Critical section class} -\twocolitem{\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}}{ritical section locker utility class} +\twocolitem{\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}}{Critical section locker utility class} \twocolitem{\helpref{wxCondition}{wxcondition}}{Condition class} \end{twocollist} @@ -467,7 +482,10 @@ used internally by the HTML classes. \begin{twocollist}\itemsep=0pt \twocolitem{\helpref{wxApp}{wxapp}}{Application class} -\twocolitem{\helpref{wxConfig}{wxconfigbase}}{Classes for configuration reading/writing} +\twocolitem{\helpref{wxCaret}{wxcaret}}{A caret (cursor) object} +\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class} +\twocolitem{\helpref{wxConfig}{wxconfigbase}}{Classes for configuration reading/writing (using either INI files or registry)} +\twocolitem{\helpref{wxDllLoader}{wxdllloader}}{Class to work with shared libraries.} \twocolitem{\helpref{wxHelpController}{wxhelpcontroller}}{Family of classes for controlling help windows} \twocolitem{\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}}{An alternative window layout facility} \twocolitem{\helpref{wxProcess}{wxprocess}}{Process class} @@ -479,20 +497,22 @@ used internally by the HTML classes. \twocolitem{\helpref{wxAutomationObject}{wxautomationobject}}{OLE automation class} \twocolitem{\helpref{wxFontMapper}{wxfontmapper}}{Font mapping, finding suitable font for given encoding} \twocolitem{\helpref{wxEncodingConverter}{wxencodingconverter}}{Encoding conversions} +\twocolitem{\helpref{wxCalendarDateAttr}{wxcalendardateattr}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}} \end{twocollist} {\large {\bf Database classes}} -\overview{Database classes overview}{odbcoverview} - -wxWindows provides two alternative sets of classes for accessing Microsoft's ODBC (Open Database Connectivity) -product. The new version by Remstar is documented in a separate manual. -The older classes are as follows: +wxWindows provides a set of classes for accessing Microsoft's ODBC (Open +Database Connectivity) product, also available for Unix and Linux. The +new version by Remstar is documented here: \begin{twocollist}\itemsep=0pt -\twocolitem{\helpref{wxDatabase}{wxdatabase}}{Database class} -\twocolitem{\helpref{wxQueryCol}{wxquerycol}}{Class representing a column} -\twocolitem{\helpref{wxQueryField}{wxqueryfield}}{Class representing a field} -\twocolitem{\helpref{wxRecordSet}{wxrecordset}}{Class representing one or more record} +\twocolitem{\helpref{wxDb}{wxdb}}{Database class} +\twocolitem{\helpref{wxDbColFor}{wxdbcolfor}}{International formatting} +\twocolitem{\helpref{wxDbColInf}{wxdbcolinf}}{Information about a columns definition} +\twocolitem{\helpref{wxDbTable}{wxdbtable}}{Access to rows of data in a table} +\twocolitem{\helpref{wxDbTableInf}{wxdbtableinf}}{Information describing the table} +\twocolitem{\helpref{wxDbInf}{wxdbinf}}{Database connection} \end{twocollist} + diff --git a/docs/latex/wx/clasinfo.tex b/docs/latex/wx/clasinfo.tex index bdb9e3fa75..66a1bd1f63 100644 --- a/docs/latex/wx/clasinfo.tex +++ b/docs/latex/wx/clasinfo.tex @@ -31,7 +31,7 @@ class, so there is no need to create such objects explicitly in an application. \func{wxObject*}{CreateObject}{\void} Creates an object of the appropriate kind. Returns NULL if the class has not been declared -dynamically createable (typically, it's an abstract class). +dynamically creatable (typically, it is an abstract class). \membersection{wxClassInfo::FindClass} diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex index ab53709cac..e52b53a287 100644 --- a/docs/latex/wx/classes.tex +++ b/docs/latex/wx/classes.tex @@ -21,6 +21,7 @@ \input strmbfrd.tex \input calclevt.tex \input calctrl.tex +\input caret.tex \input checkbox.tex \input checklst.tex \input choice.tex @@ -28,6 +29,7 @@ \input clientdc.tex \input clipbrd.tex \input closeevt.tex +\input cmdlpars.tex \input colour.tex \input colordlg.tex \input combobox.tex @@ -40,6 +42,7 @@ \input countstr.tex \input critsect.tex \input crtslock.tex +\input csconv.tex \input custdobj.tex \input cursor.tex \input database.tex @@ -49,15 +52,20 @@ \input dobjsmpl.tex \input datstrm.tex \input date.tex +\input datespan.tex \input datetime.tex +\input db.tex \input dc.tex \input ddeclint.tex \input ddeconn.tex \input ddeservr.tex \input debugcxt.tex \input dialog.tex +\input dialevt.tex +\input dialup.tex \input dir.tex \input dirdlg.tex +\input dllload.tex \input docchfrm.tex \input docmanag.tex \input docmdich.tex @@ -84,6 +92,7 @@ \input filesys.tex \input filesysh.tex \input filetype.tex +\input flexsizr.tex \input fltinstr.tex \input fltoutst.tex \input focusevt.tex @@ -100,6 +109,7 @@ \input glcanvas.tex \input valgen.tex \input grid.tex +\input gridsizr.tex \input hash.tex \input helpinst.tex \input htcell.tex @@ -146,6 +156,10 @@ \input log.tex \input longlong.tex \input mask.tex +\input mbconv.tex +\input mbcnvfil.tex +\input mbcnvut7.tex +\input mbcnvut8.tex \input mdi.tex \input memorydc.tex \input fs_mem.tex @@ -233,6 +247,7 @@ \input strmsock.tex \input spinbutt.tex \input spinctrl.tex +\input spinevt.tex \input splitevt.tex \input splitter.tex \input statbmp.tex @@ -264,6 +279,7 @@ \input txtstrm.tex \input textdlg.tex \input txtdrptg.tex +\input timespan.tex \input valtext.tex \input textfile.tex \input thread.tex @@ -271,6 +287,7 @@ \input timer.tex \input tipprov.tex \input toolbar.tex +\input tooltip.tex \input treectrl.tex \input treeevt.tex \input treelay.tex @@ -283,6 +300,9 @@ \input window.tex \input windowdc.tex \input wnddisbl.tex +\input wizard.tex +\input wizevt.tex +\input wizpage.tex \input zipstrm.tex \input strmzlib.tex \input function.tex diff --git a/docs/latex/wx/cmdevent.tex b/docs/latex/wx/cmdevent.tex index 13c342c370..973f3956de 100644 --- a/docs/latex/wx/cmdevent.tex +++ b/docs/latex/wx/cmdevent.tex @@ -36,7 +36,9 @@ which is generated by a wxListBox control.} \twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command, which is generated by a wxTextCtrl control.} \twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER command, -which is generated by a wxTextCtrl control.} +which is generated by a wxTextCtrl control. Note that you must use +wxTE\_PROCESS\_ENTER flag when creating the control if you want it to generate +such events.} \twocolitem{{\bf EVT\_MENU(id, func)}}{Process a wxEVT\_COMMAND\_MENU\_SELECTED command, which is generated by a menu item.} \twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_MENU\_RANGE command, @@ -117,16 +119,16 @@ Constructor. \membersection{wxCommandEvent::Checked} -\func{bool}{Checked}{\void} +\constfunc{bool}{Checked}{\void} -Returns TRUE or FALSE for a checkbox selection event. +Deprecated, use \helpref{IsChecked}{wxcommandeventischecked} instead. \membersection{wxCommandEvent::GetClientData} \func{void*}{GetClientData}{\void} Returns client data pointer for a listbox or choice selection event -(not valid for a deselection). Beware, this is not implmented anywhere... +(not valid for a deselection). \membersection{wxCommandEvent::GetExtraLong} @@ -154,6 +156,16 @@ a deselection). Returns item string for a listbox or choice selection event (not valid for a deselection). +\membersection{wxCommandEvent::IsChecked}\label{wxcommandeventischecked} + +\constfunc{bool}{IsChecked}{\void} + +This method can be used with checkbox and menu events: for the checkboxes, the +method returns {\tt TRUE} for a selection event and {\tt FALSE} for a +deselection one. For the menu events, this method indicates if the menu item +just has become checked or unchecked (and thus only makes sense for checkable +menu items). + \membersection{wxCommandEvent::IsSelection} \func{bool}{IsSelection}{\void} diff --git a/docs/latex/wx/cmdlpars.tex b/docs/latex/wx/cmdlpars.tex new file mode 100644 index 0000000000..5fe7725f15 --- /dev/null +++ b/docs/latex/wx/cmdlpars.tex @@ -0,0 +1,451 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: cmdlpars.tex +%% Purpose: wxCmdLineParser documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 27.03.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxCmdLineParser}}\label{wxcmdlineparser} + +wxCmdLineParser is a class for parsing command line. + +It has the following features: +\begin{enumerate} +\item distinguishes options, switches and parameters; allows option grouping +\item allows both short and long options +\item automatically generates the usage message from the command line description +\item does type checks on the options values (number, date, $\ldots$). +\end{enumerate} + +To use it you should follow these steps: +\begin{enumerate} +\item \helpref{construct}{wxcmdlineparserconstruction} an object of this class +giving it the command line to parse and optionally its description or use +{\tt AddXXX()} functions later +\item call {\tt Parse()} +\item use {\tt Found()} to retrieve the results +\end{enumerate} + +In the documentation below the following terminology is used: + +\begin{twocollist}\itemsep=0pt +\twocolitem{switch}{This is a boolean option which can be given or not, but +which doesn't have any value. We use the word switch to distinguish such boolean +options from more generic options like those described below. For example, +{\tt -v} might be a switch meaning "enable verbose mode".} +\twocolitem{option}{Option for us here is something which comes with a value 0 +unlike a switch. For example, {\tt -o:filename} might be an option which allows +to specify the name of the output file.} +\twocolitem{parameter}{This is a required program argument.} +\end{twocollist} + +\wxheading{Derived from} + +No base class + +\wxheading{Include files} + + + +\wxheading{Constants} + +The structure wxCmdLineEntryDesc is used to describe the one command +line switch, option or parameter. An array of such structures should be passed +to \helpref{SetDesc()}{wxcmdlineparsersetdesc}. Also, the meanings of parameters +of the {\tt AddXXX()} functions are the same as of the corresponding fields in +this structure: + +\begin{verbatim} +struct wxCmdLineEntryDesc +{ + wxCmdLineEntryType kind; + const wxChar *shortName; + const wxChar *longName; + const wxChar *description; + wxCmdLineParamType type; + int flags; +}; +\end{verbatim} + +The type of a command line entity is in the {\tt kind} field and may be one of +the following constants: +{\small \begin{verbatim} +enum wxCmdLineEntryType +{ + wxCMD\_LINE\_SWITCH, + wxCMD\_LINE\_OPTION, + wxCMD\_LINE\_PARAM, + wxCMD\_LINE\_NONE // use this to terminate the list +} +\end{verbatim}} + +The field {\tt shortName} is the usual, short, name of the switch or the option. +{\tt longName} is the corresponding long name or NULL if the option has no long +name. Both of these fields are unused for the parameters. Both the short and +long option names can contain only letters, digits and the underscores. + +{\tt description} is used by the \helpref{Usage()}{wxcmdlineparserusage} method +to construct a help message explaining the syntax of the program. + +The possible values of {\tt type} which specifies the type of the value accepted +by an option or parameter are: +{\small \begin{verbatim} +enum wxCmdLineParamType +{ + wxCMD\_LINE\_VAL\_STRING, // default + wxCMD\_LINE\_VAL\_NUMBER, + wxCMD\_LINE\_VAL\_DATE, + wxCMD\_LINE\_VAL\_NONE +} +\end{verbatim}} + +Finally, the {\tt flags} field is a combination of the following bit masks: +{\small \begin{verbatim} +enum +{ + wxCMD\_LINE\_OPTION\_MANDATORY = 0x01, // this option must be given + wxCMD\_LINE\_PARAM\_OPTIONAL = 0x02, // the parameter may be omitted + wxCMD\_LINE\_PARAM\_MULTIPLE = 0x04, // the parameter may be repeated + wxCMD\_LINE\_OPTION\_HELP = 0x08, // this option is a help request + wxCMD\_LINE\_NEEDS\_SEPARATOR = 0x10, // must have sep before the value +} +\end{verbatim}} + +Notice that by default (i.e. if flags are just $0$), options are optional (sic) +and each call to \helpref{AddParam()}{wxcmdlineparseraddparam} allows one more +parameter - this may be changed by giving non-default flags to it, i.e. use +{\tt wxCMD\_LINE\_OPTION\_MANDATORY} to require that the option is given and +{\tt wxCMD\_LINE\_PARAM\_OPTIONAL} to make a parameter optional. Also, +{\tt wxCMD\_LINE\_PARAM\_MULTIPLE} may be specified if the programs accepts a +variable number of parameters - but it only can be given for the last parameter +in the command line description. If you use this flag, you will probably need to +use \helpref{GetParamCount}{wxcmdlineparsergetparamcount} to retrieve the number +of parameters effectively specified after calling +\helpref{Parse}{wxcmdlineparserparse}. + +The last flag {\tt wxCMD\_LINE\_NEEDS\_SEPARATOR} can be specified to require a +separator (either a colon, an equal sign or white space) between the option +name and its value. By default, no separator is required. + +\wxheading{See also} + +\helpref{wxApp::argc}{wxappargc} and \helpref{wxApp::argv}{wxappargv}\\ +console sample + +%%%%%%%%%%%%% Methods by group %%%%%%%%%%%%% +\latexignore{\rtfignore{\wxheading{Function groups}}} + +\membersection{Construction}\label{wxcmdlineparserconstruction} + +Before \helpref{Parse}{wxcmdlineparserparse} can be called, the command line +parser object must have the command line to parse and also the rules saying +which switches, options and parameters are valid - this is called command line +description in what follows. + +You have complete freedom of choice as to when specify the required information, +the only restriction is that it must be done before calling +\helpref{Parse}{wxcmdlineparserparse}. + +To specify the command line to parse you may use either one of constructors +accepting it (\helpref{wxCmdLineParser(argc, argv)}{wxcmdlineparserwxcmdlineparserargc} or +\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdescargc} usually) or, +if you use \helpref{the default constructor}{wxcmdlineparserwxcmdlineparserdef}, +you can do it later by calling +\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc}. + +The same holds for command line description: it can be specified either in +the constructor (\helpref{without command line}{wxcmdlineparserwxcmdlineparserdesc} or +\helpref{together with it}{wxcmdlineparserwxcmdlineparserdescargc}) or +constructed later using either \helpref{SetDesc}{wxcmdlineparsersetdesc} or +combination of \helpref{AddSwitch}{wxcmdlineparseraddswitch}, +\helpref{AddOption}{wxcmdlineparseraddoption} and +\helpref{AddParam}{wxcmdlineparseraddparam} methods. + +Using constructors or \helpref{SetDesc}{wxcmdlineparsersetdesc} uses a (usually +{\tt const static}) table containing the command line description. If you want +to decide which options to acccept during the run-time, using one of the +{\tt AddXXX()} functions above might be preferable. + +\membersection{Customization}\label{wxcmdlineparsercustomization} + +wxCmdLineParser has several global options which may be changed by the +application. All of the functions described in this section should be called +before \helpref{Parse}{wxcmdlineparserparse}. + +First global option is the support for long (also known as GNU-style) options. +The long options are the ones which start with two dashes ({\tt "--"}) and look +like this: {\tt --verbose}, i.e. they generally are complete words and not some +abbreviations of them. As long options are used by more and more applications, +they are enabled by default, but may be disabled with +\helpref{DisableLongOptions}{wxcmdlineparserdisablelongoptions}. + +Another global option is the set of characters which may be used to start an +option (otherwise, the word on the command line is assumed to be a parameter). +Under Unix, {\tt '-'} is always used, but Windows has at least two common +choices for this: {\tt '-'} and {\tt '/'}. Some programs also use {\tt '+'}. +The default is to use what suits most the current platform, but may be changed +with \helpref{SetSwitchChars}{wxcmdlineparsersetswitchchars} method. + +Finally, \helpref{SetLogo}{wxcmdlineparsersetlogo} can be used to show some +application-specific text before the explanation given by +\helpref{Usage}{wxcmdlineparserusage} function. + +\membersection{Parsing command line}\label{wxcmdlineparserparsing} + +After the command line description was constructed and the desiredoptions were +set, you can finally call \helpref{Parse}{wxcmdlineparserparse} method. +It returns $0$ if the command line was correct and was parsed, $-1$ if the help +option was specified (this is a separate case as, normally, the program will +terminate after this) or a positive number if there was an error during the +command line parsing. + +In the latter case, the appropriate error message and usage information are +logged by wxCmdLineParser itself using the standard wxWindows logging functions. + +\membersection{Getting results}\label{wxcmdlineparsergettingresults} + +After calling \helpref{Parse}{wxcmdlineparserparse} (and if it returned $0$), +you may access the results of parsing using one of overloaded {\tt Found()} +methods. + +For a simple switch, you will simply call +\helpref{Found}{wxcmdlineparserfoundswitch} to determine if the switch was given +or not, for an option or a parameter, you will call a version of {\tt Found()} +which also returns the associated value in the provided variable. All +{\tt Found()} functions return TRUE if the switch or option were found in the +command line or FALSE if they were not specified. + +%%%%%%%%%%%%% Methods in alphabetic order %%%%%%%%%%%%% +\helponly{\insertatlevel{2}{ + +\wxheading{Members} + +}} + +\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdef} + +\func{}{wxCmdLineParser}{\void} + +Default constructor. You must use +\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc} or +\helpref{SetCmdLinelater.}{wxcmdlineparsersetcmdlinestr} later. + +\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserargc} + +\func{}{wxCmdLineParser}{\param{int }{argc}, \param{char** }{argv}} + +Constructor specifies the command line to parse. This is the traditional +(Unix) command line format. The parameters {\it argc} and {\it argv} have the +same meaning as for {\tt main()} function. + +\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserstr} + +\func{}{wxCmdLineParser}{\param{const wxString\& }{cmdline}} + +Constructor specifies the command line to parse in Windows format. The parameter +{\it cmdline} has the same meaning as the corresponding parameter of +{\tt WinMain()}. + +\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdesc} + +\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}} + +Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdef}, but also +specifies the \helpref{command line description}{wxcmdlineparsersetdesc}. + +\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescargc} + +\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{int }{argc}, \param{char** }{argv}} + +Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc}, but also +specifies the \helpref{command line description}{wxcmdlineparsersetdesc}. + +\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescstr} + +\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{const wxString\& }{cmdline}} + +Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}, but also +specifies the \helpref{command line description}{wxcmdlineparsersetdesc}. + +\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlineargc} + +\func{void}{SetCmdLine}{\param{int }{argc}, \param{char** }{argv}} + +Set command line to parse after using one of the constructors which don't do it. + +\wxheading{See also} + +\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc} + +\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlinestr} + +\func{void}{SetCmdLine}{\param{const wxString\& }{cmdline}} + +Set command line to parse after using one of the constructors which don't do it. + +\wxheading{See also} + +\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr} + +\membersection{wxCmdLineParser::\destruct{wxCmdLineParser}}\label{wxcmdlineparserdtor} + +\func{}{\destruct{wxCmdLineParser}}{\void} + +Frees resources allocated by the object. + +{\bf NB:} destructor is not virtual, don't use this class polymorphically. + +\membersection{wxCmdLineParser::SetSwitchChars}\label{wxcmdlineparsersetswitchchars} + +\func{void}{SetSwitchChars}{\param{const wxString\& }{switchChars}} + +{\it switchChars} contains all characters with which an option or switch may +start. Default is {\tt "-"} for Unix, {\tt "-/"} for Windows. + +\membersection{wxCmdLineParser::EnableLongOptions}\label{wxcmdlineparserenablelongoptions} + +\func{void}{EnableLongOptions}{\param{bool }{enable = TRUE}} + +Enable or disable support for the long options. + +As long options are not (yet) POSIX-compliant, this option allows to disable +them. + +\wxheading{See also} + +\helpref{Customization}{wxcmdlineparsercustomization} + +\membersection{wxCmdLineParser::DisableLongOptions}\label{wxcmdlineparserdisablelongoptions} + +\func{void}{DisableLongOptions}{\void} + +Ientical to \helpref{EnableLongOptions(FALSE)}{wxcmdlineparserenablelongoptions}. + +\membersection{wxCmdLineParser::SetLogo}\label{wxcmdlineparsersetlogo} + +\func{void}{SetLogo}{\param{const wxString\& }{logo}} + +{\it logo} is some extra text which will be shown by +\helpref{Usage}{wxcmdlineparserusage} method. + +\membersection{wxCmdLineParser::SetDesc}\label{wxcmdlineparsersetdesc} + +\func{void}{SetDesc}{\param{const wxCmdLineEntryDesc* }{desc}} + +Construct the command line description + +Take the command line description from the wxCMD\_LINE\_NONE terminated table. + +Example of usage: + +\begin{verbatim} +static const wxCmdLineEntryDesc cmdLineDesc[] = +{ + { wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" }, + { wxCMD_LINE_SWITCH, "q", "quiet", "be quiet" }, + + { wxCMD_LINE_OPTION, "o", "output", "output file" }, + { wxCMD_LINE_OPTION, "i", "input", "input dir" }, + { wxCMD_LINE_OPTION, "s", "size", "output block size", wxCMD_LINE_VAL_NUMBER }, + { wxCMD_LINE_OPTION, "d", "date", "output file date", wxCMD_LINE_VAL_DATE }, + + { wxCMD_LINE_PARAM, NULL, NULL, "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE }, + + { wxCMD_LINE_NONE } +}; + +wxCmdLineParser parser; + +parser.SetDesc(cmdLineDesc); +\end{verbatim} + +\membersection{wxCmdLineParser::AddSwitch}\label{wxcmdlineparseraddswitch} + +\func{void}{AddSwitch}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{int }{flags = 0}} + +Add a switch {\it name} with an optional long name {\it lng} (no long name if it +is empty, which is default), description {\it desc} and flags {\it flags} to the +command line description. + +\membersection{wxCmdLineParser::AddOption}\label{wxcmdlineparseraddoption} + +\func{void}{AddOption}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}} + +Add an option {\it name} with an optional long name {\it lng} (no long name if +it is empty, which is default) taking a value of the given type (string by +default) to the command line description. + +\membersection{wxCmdLineParser::AddParam}\label{wxcmdlineparseraddparam} + +\func{void}{AddParam}{\param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}} + +Add a parameter of the given {\it type} to the command line description. + +\membersection{wxCmdLineParser::Parse}\label{wxcmdlineparserparse} + +\func{int}{Parse}{\void} + +Parse the command line, return $0$ if ok, $-1$ if {\tt "-h"} or {\tt "--help"} +option was encountered and the help message was given or a positive value if a +syntax error occured. + +\membersection{wxCmdLineParser::Usage}\label{wxcmdlineparserusage} + +\func{void}{Usage}{\void} + +Give the standard usage message describing all program options. It will use the +options and parameters descriptions specified earlier, so the resulting message +will not be helpful to the user unless the descriptions were indeed specified. + +\wxheading{See also} + +\helpref{SetLogo}{wxcmdlineparsersetlogo} + +\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundswitch} + +\constfunc{bool}{Found}{\param{const wxString\& }{name}} + +Returns TRUE if the given switch was found, FALSE otherwise. + +\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundstringoption} + +\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxString* }{value}} + +Returns TRUE if an option taking a string value was found and stores the +value in the provided pointer (which should not be NULL). + +\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundintoption} + +\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{long* }{value}} + +Returns TRUE if an option taking an integer value was found and stores +the value in the provided pointer (which should not be NULL). + +\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfounddateoption} + +\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxDateTime* }{value}} + +Returns TRUE if an option taking a date value was found and stores the +value in the provided pointer (which should not be NULL). + +\membersection{wxCmdLineParser::GetParamCount}\label{wxcmdlineparsergetparamcount} + +\constfunc{size\_t}{GetParamCount}{\void} + +Returns the number of parameters found. This function makes sense mostly if you +had used {\tt wxCMD\_LINE\_PARAM\_MULTIPLE} flag. + +\membersection{wxCmdLineParser::GetParam}\label{wxcmdlineparsergetparam} + +\constfunc{wxString}{GetParam}{\param{size\_t }{n = 0u}} + +Returns the value of Nth parameter (as string only for now). + +\wxheading{See also} + +\helpref{GetParamCount}{wxcmdlineparsergetparamcount} + diff --git a/docs/latex/wx/colordlg.tex b/docs/latex/wx/colordlg.tex index 98b10e3407..1d0a57e4f3 100644 --- a/docs/latex/wx/colordlg.tex +++ b/docs/latex/wx/colordlg.tex @@ -19,7 +19,7 @@ This class represents the colour chooser dialog. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxColourDialog::wxColourDialog} +\membersection{wxColourDialog::wxColourDialog}\label{wxcolourdialogwxcolourdialog} \func{}{wxColourDialog}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}} @@ -36,6 +36,12 @@ data, which will be copied to the colour dialog's colour data. Destructor. +\membersection{wxColourDialog::Create} + +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}} + +Same as \helpref{constructor}{wxcolourdialogwxcolourdialog}. + \membersection{wxColourDialog::GetColourData} \func{wxColourData\&}{GetColourData}{\void} diff --git a/docs/latex/wx/colour.tex b/docs/latex/wx/colour.tex index 2cd926e19a..b3e69e5ee7 100644 --- a/docs/latex/wx/colour.tex +++ b/docs/latex/wx/colour.tex @@ -222,7 +222,7 @@ The default colour is black. \membersection{wxColourData::SetCustomColour}\label{wxcolourdatasetcustomcolour} -\func{void}{SetColour}{\param{int}{ i}, \param{const wxColour\&}{ colour}} +\func{void}{SetCustomColour}{\param{int}{ i}, \param{const wxColour\&}{ colour}} Sets the {\it i}th custom colour for the colour dialog. {\it i} should be an integer between 0 and 15. diff --git a/docs/latex/wx/combobox.tex b/docs/latex/wx/combobox.tex index c09c0060a5..218f17e93c 100644 --- a/docs/latex/wx/combobox.tex +++ b/docs/latex/wx/combobox.tex @@ -16,15 +16,16 @@ A combobox permits a single selection only. Combobox items are numbered from zer \wxheading{Include files} - + \wxheading{Window styles} \begin{twocollist}\itemsep=0pt \twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list. Windows only. } \twocolitem{\windowstyle{wxCB\_DROPDOWN}}{Creates a combobox with a drop-down list.} -\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combo box consisting of a drop-down list and static text item -displaying the current selection.} +\twocolitem{\windowstyle{wxCB\_READONLY}}{Same as wxCB\_DROPDOWN but only the +strings specified as the combobox choices can be selected, it is impossible to +select (even from a program) a string which is not in the choices list.} \twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.} \end{twocollist} @@ -319,6 +320,9 @@ wxPython.} Sets the text for the combobox text field. +{\bf NB:} For a combobox with {\tt wxCB\_READONLY} style the string must be in +the combobox choices list, otherwise the call to SetValue() is ignored. + \wxheading{Parameters} \docparam{text}{The text to set.} diff --git a/docs/latex/wx/conditn.tex b/docs/latex/wx/conditn.tex index 777a3cd226..a58d8b5ff4 100644 --- a/docs/latex/wx/conditn.tex +++ b/docs/latex/wx/conditn.tex @@ -5,12 +5,15 @@ objects. They may be used in a multithreaded application to wait until the given condition becomes true which happens when the condition becomes signaled. For example, if a worker thread is doing some long task and another thread has -to wait until it's finished, the latter thread will wait on the condition +to wait until it is finished, the latter thread will wait on the condition object and the worker thread will signal it on exit (this example is not perfect because in this particular case it would be much better to just \helpref{Wait()}{wxthreadwait} for the worker thread, but if there are several worker threads it already makes much more sense). +Once the thread(s) are signaled, the condition then resets to the not +signaled state, ready to fire again. + \wxheading{Derived from} None. @@ -51,18 +54,16 @@ Signals the object. \membersection{wxCondition::Wait}\label{wxconditionwait} -\func{void}{Wait}{\param{wxMutex\&}{ mutex}} +\func{void}{Wait}{\void} Waits indefinitely. -\func{bool}{Wait}{\param{wxMutex\&}{ mutex}, \param{unsigned long}{ sec}, \param{unsigned long}{ nsec}} +\func{bool}{Wait}{\param{unsigned long}{ sec}, \param{unsigned long}{ nsec}} Waits until a signal is raised or the timeout has elapsed. \wxheading{Parameters} -\docparam{mutex}{wxMutex object.} - \docparam{sec}{Timeout in seconds} \docparam{nsec}{Timeout nanoseconds component (added to {\it sec}).} diff --git a/docs/latex/wx/config.tex b/docs/latex/wx/config.tex index 2e231e1e8c..51e85c0c61 100644 --- a/docs/latex/wx/config.tex +++ b/docs/latex/wx/config.tex @@ -1,7 +1,7 @@ \section{\class{wxConfigBase}}\label{wxconfigbase} wxConfigBase class defines the basic interface of all config classes. It can -not be used by itself (it's an abstract base class) and you'll always use one +not be used by itself (it is an abstract base class) and you will always use one of its derivations: wxIniConfig, wxFileConfig, wxRegConfig or any other. However, usually you don't even need to know the precise nature of the class @@ -118,7 +118,7 @@ support a file system-like hierarchy of keys (files) and groups (directories). As in the file system case, to specify a key in the config class you must use a path to it. Config classes also support the notion of the current group, which makes it possible to use the relative paths. To clarify all this, here -is an example (it's only for the sake of demonstration, it doesn't do anything +is an example (it is only for the sake of demonstration, it doesn't do anything sensible!): \begin{verbatim} @@ -139,11 +139,11 @@ sensible!): wxASSERT( conf->Read("Subgroup/SubgroupEntry", 0l) == 3 ); - // use absolute path: it's allowed, too + // use absolute path: it is allowed, too wxASSERT( conf->Read("/RootEntry", 0l) == 1 ); \end{verbatim} -{\it Warning}: it's probably a good idea to always restore the path to its +{\it Warning}: it is probably a good idea to always restore the path to its old value on function exit: \begin{verbatim} @@ -175,7 +175,7 @@ doesn't save and restore the path): \end{verbatim} Finally, the path separator in wxConfigBase and derived classes is always '/', -regardless of the platform (i.e. it's {\bf not} '$\backslash\backslash$' under Windows). +regardless of the platform (i.e. it is {\bf not} '$\backslash\backslash$' under Windows). \helpref{SetPath}{wxconfigbasesetpath}\\ \helpref{GetPath}{wxconfigbasegetpath} @@ -186,9 +186,9 @@ The functions in this section allow to enumerate all entries and groups in the config file. All functions here return FALSE when there are no more items. You must pass the same index to GetNext and GetFirst (don't modify it). -Please note that it's {\bf not} the index of the current item (you will have +Please note that it is {\bf not} the index of the current item (you will have some great surprizes with wxRegConfig if you assume this) and you shouldn't -even look at it: it's just a "cookie" which stores the state of the +even look at it: it is just a "cookie" which stores the state of the enumeration. It can't be stored inside the class because it would prevent you from running several enumerations simultaneously, that's why you must pass it explicitly. @@ -241,10 +241,11 @@ actually enumerating them, but you will probably never need them. \helpref{Exists}{wxconfigbaseexists}\\ \helpref{GetEntryType}{wxconfigbasegetentrytype} -\membersection{Miscellaneous accessors} +\membersection{Miscellaneous functions} \helpref{GetAppName}{wxconfigbasegetappname}\\ -\helpref{GetVendorName}{wxconfigbasegetvendorname} +\helpref{GetVendorName}{wxconfigbasegetvendorname}\\ +\helpref{SetUmask}{wxfileconfigsetumask} \membersection{Key access} @@ -321,7 +322,7 @@ would be to prefix the offending symbols with a backslash. The following functions control this option: \helpref{IsExpandingEnvVars}{wxconfigbaseisexpandingenvvars}\\ -\helpref{SetExpandingEnvVars}{wxconfigbasesetexpandingenvvars}\\ +\helpref{SetExpandEnvVars}{wxconfigbasesetexpandenvvars}\\ \helpref{SetRecordDefaults}{wxconfigbasesetrecorddefaults}\\ \helpref{IsRecordingDefaults}{wxconfigbaseisrecordingdefaults} @@ -407,8 +408,7 @@ for use by desinstallation routine. \membersection{wxConfigBase::DeleteEntry}\label{wxconfigbasedeleteentry} -\func{bool}{DeleteEntry}{\param{const wxString\& }{ key}, \param{bool}{ -bDeleteGroupIfEmpty = TRUE}} +\func{bool}{DeleteEntry}{\param{const wxString\& }{ key}, \param{bool}{ bDeleteGroupIfEmpty = TRUE}} Deletes the specified entry and the group it belongs to if it was the last key in it and the second parameter is true. @@ -471,8 +471,7 @@ The result is an element of enum EntryType: \membersection{wxConfigBase::GetFirstGroup}\label{wxconfigbasegetfirstgroup} -\constfunc{bool}{GetFirstGroup}{\param{wxString\& }{str}, \param{long\&}{ -index}} +\constfunc{bool}{GetFirstGroup}{\param{wxString\& }{str}, \param{long\&}{ index}} Gets the first group. @@ -482,8 +481,7 @@ the next call.} \membersection{wxConfigBase::GetFirstEntry}\label{wxconfigbasegetfirstentry} -\constfunc{bool}{GetFirstEntry}{\param{wxString\& }{str}, \param{long\&}{ -index}} +\constfunc{bool}{GetFirstEntry}{\param{wxString\& }{str}, \param{long\&}{ index}} Gets the first entry. @@ -493,8 +491,7 @@ the next call.} \membersection{wxConfigBase::GetNextGroup}\label{wxconfigbasegetnextgroup} -\constfunc{bool}{GetNextGroup}{\param{wxString\& }{str}, \param{long\&}{ -index}} +\constfunc{bool}{GetNextGroup}{\param{wxString\& }{str}, \param{long\&}{ index}} Gets the next group. @@ -504,8 +501,7 @@ the next call.} \membersection{wxConfigBase::GetNextEntry}\label{wxconfigbasegetnextentry} -\constfunc{bool}{GetNextEntry}{\param{wxString\& }{str}, \param{long\&}{ -index}} +\constfunc{bool}{GetNextEntry}{\param{wxString\& }{str}, \param{long\&}{ index}} Gets the next entry. @@ -556,20 +552,18 @@ Returns TRUE if we are expanding environment variables in key values. \membersection{wxConfigBase::IsRecordingDefaults}\label{wxconfigbaseisrecordingdefaults} -\func{bool}{IsRecordingDefaults}{\void} const +\constfunc{bool}{IsRecordingDefaults}{\void} Returns TRUE if we are writing defaults back to the config file. \membersection{wxConfigBase::Read}\label{wxconfigbaseread} -\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ -str}} +\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}} Read a string from the key, returning TRUE if the value was read. If the key was not found, {\it str} is not changed. -\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ -str}, \param{const wxString\& }{defaultVal}} +\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}, \param{const wxString\& }{defaultVal}} Read a string from the key. The default value is returned if the key was not found. @@ -592,8 +586,7 @@ not found, {\it l} is not changed. Reads a long value, returning TRUE if the value was found. If the value was not found, {\it defaultVal} is used instead. -\constfunc{long }{Read}{\param{const wxString\& }{key}, \param{long}{ -defaultVal}} +\constfunc{long }{Read}{\param{const wxString\& }{key}, \param{long}{ defaultVal}} Reads a long value from the key and returns it. {\it defaultVal} is returned if the key is not found. @@ -667,7 +660,7 @@ exists. Sets the config object as the current one, returns the pointer to the previous current object (both the parameter and returned value may be NULL) -\membersection{wxConfigBase::SetExpandingEnvVars}\label{wxconfigbasesetexpandingenvvars} +\membersection{wxConfigBase::SetExpandEnvVars}\label{wxconfigbasesetexpandenvvars} \func{void}{SetExpandEnvVars }{\param{bool }{bDoIt = TRUE}} @@ -677,8 +670,8 @@ Determine whether we wish to expand environment variables in key values. \func{void}{SetPath}{\param{const wxString\& }{strPath}} -Set current path: if the first character is '/', it's the absolute path, -otherwise it's a relative path. '..' is supported. If the strPath doesn't +Set current path: if the first character is '/', it is the absolute path, +otherwise it is a relative path. '..' is supported. If the strPath doesn't exist it is created. \membersection{wxConfigBase::SetRecordDefaults}\label{wxconfigbasesetrecorddefaults} @@ -691,6 +684,19 @@ If on (default is off) all default values are written back to the config file. This allows the user to see what config options may be changed and is probably useful only for wxFileConfig. +\membersection{wxConfigBase::SetUmask}\label{wxfileconfigsetumask} + +\func{void}{SetUmask}{\param{int }{mode}} + +{\bf NB:} this function is not in the base wxConfigBase class but is only +implemented in wxFileConfig. Moreover, this function is Unix-specific and +doesn't do anything on other platforms. + +SetUmask() allows to set the mode to be used for the config file creation. +For example, to create a config file which is not readable by other users +(useful if it stores some sensitive information, such as passwords), you +should do {\tt SetUmask(0077)}. + \membersection{wxConfigBase::Write}\label{wxconfigbasewrite} \func{bool}{Write}{\param{const wxString\& }{ key}, \param{const wxString\& }{ @@ -714,7 +720,3 @@ implements the following methods:\par \end{twocollist}} } - - - - diff --git a/docs/latex/wx/contents.gif b/docs/latex/wx/contents.gif index 3dddfa3dd5f0c652e8b27cd6c29e1fdd49ced5a8..723174f81d04d16e94016186ac0322dcddb603c7 100644 GIT binary patch literal 996 zcmZ?wbhEHbbYM_m_|5kxA zV8N1xh6Z3tW&ovR5Cxe34SwPCqkp^L+21?)C@%eigo zjb6XYK{ltit-ZayK=RQZsqlw)b_u-S7xTMFKYoAy)o)vOlz%vRFz5Xto6e7mgSU6F l8>#t(=cJr!`K{OHv%&EGv6=dhWPNvSd3kw-DjN%fH2`phKPvzL literal 231 zcmVG0Pz3-zrVld=jU&4Z(9HWEC2ui06_p40008OjE||y?GK}z zO&EZ)-n{z{a)K3v=81;mmA0S4Fj_r^UyThZDG{h6k9m zHI_(7spd!5_$SH6m{ + +\wxheading{See also} + +\helpref{wxMBConv}{wxmbconv}, +\helpref{wxEncodingConverter}{wxencodingconverter}, +\helpref{wxMBConv classes overview}{mbconvclasses} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxCSConv::wxCSConv}\label{wxcsconvwxcsconv} + +\func{}{wxCSConv}{\param{const wxChar* }{charset}} + +Constructor. Specify the name of the character set you want to convert +from/to. + +\membersection{wxCSConv::\destruct{wxCSConv}}\label{wxcsconvdtor} + +\func{}{\destruct{wxCSConv}}{\void} + +Destructor. + +\membersection{wxCSConv::LoadNow}\label{wxcsconvloadnow} + +\func{void}{LoadNow}{\void} + +If the conversion tables needs to be loaded from disk, this method +will do so. Otherwise, they will be loaded when any of the conversion +methods are called. + +\membersection{wxCSConv::MB2WC}\label{wxcsconvmb2wc} + +\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}} + +Converts from the selected character set to Unicode. Returns the size of the destination buffer. + +\membersection{wxCSConv::WC2MB}\label{wxcsconvwc2mb} + +\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}} + +Converts from Unicode to the selected character set. Returns the size of the destination buffer. + diff --git a/docs/latex/wx/cursor.tex b/docs/latex/wx/cursor.tex index 40c5b81d20..6d0c748903 100644 --- a/docs/latex/wx/cursor.tex +++ b/docs/latex/wx/cursor.tex @@ -155,7 +155,7 @@ hotSpotY=0)}}{Constructs a cursor from a filename} Destroys the cursor. A cursor can be reused for more than one window, and does not get destroyed when the window is destroyed. wxWindows destroys all cursors on application exit, although -it's best to clean them up explicitly. +it is best to clean them up explicitly. \membersection{wxCursor::Ok}\label{wxcursorok} diff --git a/docs/latex/wx/database.tex b/docs/latex/wx/database.tex index 6647678df7..2882ebe2c9 100644 --- a/docs/latex/wx/database.tex +++ b/docs/latex/wx/database.tex @@ -3,9 +3,6 @@ Every database object represents an ODBC connection. The connection may be closed and reopened. -Note: this class is considered obsolete, replaced by the Remstar wxDB/wxTable classes -(documented separately in Word and PDF format, as odbc.doc and odbc.pdf). - \wxheading{Derived from} \helpref{wxObject}{wxobject} @@ -18,6 +15,12 @@ Note: this class is considered obsolete, replaced by the Remstar wxDB/wxTable cl \overview{wxDatabase overview}{wxdatabaseoverview}, \helpref{wxRecordSet}{wxrecordset} +A much more robust and feature-rich set of ODBC classes is now +available and recommended for use in place of the wxDatabase class. + +See details of these classes in: +\helpref{wxDB}{wxdb}, \helpref{wxDbTable}{wxdbtable} + \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxDatabase::wxDatabase} diff --git a/docs/latex/wx/dataform.tex b/docs/latex/wx/dataform.tex index 755b888236..3b9991e140 100644 --- a/docs/latex/wx/dataform.tex +++ b/docs/latex/wx/dataform.tex @@ -6,7 +6,7 @@ %% Created: 03.11.99 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxDataFormat}}\label{wxdataformat} diff --git a/docs/latex/wx/dataobj.tex b/docs/latex/wx/dataobj.tex index f38c7c16b6..5a62f8532e 100644 --- a/docs/latex/wx/dataobj.tex +++ b/docs/latex/wx/dataobj.tex @@ -6,7 +6,7 @@ %% Created: 18.10.99 %% RCS-ID: $Id$ %% Copyright: (c) wxWindows team -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxDataObject}}\label{wxdataobject} diff --git a/docs/latex/wx/datespan.tex b/docs/latex/wx/datespan.tex new file mode 100644 index 0000000000..bef43ef9c2 --- /dev/null +++ b/docs/latex/wx/datespan.tex @@ -0,0 +1,15 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: datespan.tex +%% Purpose: wxDateSpan documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 04.04.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxDateSpan}}\label{wxdatespan} + +The documentation for this section has not yet been written. + diff --git a/docs/latex/wx/datetime.tex b/docs/latex/wx/datetime.tex index b7cd210493..01d8b9e54c 100644 --- a/docs/latex/wx/datetime.tex +++ b/docs/latex/wx/datetime.tex @@ -6,7 +6,7 @@ %% Created: 07.03.00 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxDateTime}}\label{wxdatetime} @@ -88,14 +88,82 @@ Time zone symbolic names: \end{verbatim} Month names: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec and -Inv\_Month for an invalid.month value are the values of {\tt wxDateTime::Month} +Inv\_Month for an invalid.month value are the values of {\tt wxDateTime::Month} enum. -Likely, Sun, Mon, Tue, Wed, Thu, Fri, Sat, and Inv\_WeekDay are the values in +Likewise, Sun, Mon, Tue, Wed, Thu, Fri, Sat, and Inv\_WeekDay are the values in {\tt wxDateTime::WeekDay} enum. Finally, Inv\_Year is defined to be an invalid value for year parameter. +\helpref{GetMonthName()}{wxdatetimegetmonthname} and +\helpref{GetWeekDayName}{wxdatetimegetweekdayname} functions use the followign +flags: + +\begin{verbatim} + enum NameFlags + { + Name_Full = 0x01, // return full name + Name_Abbr = 0x02 // return abbreviated name + }; +\end{verbatim} + +Several functions accept an extra parameter specifying the calendar to use +(although most of them only support now the Gregorian calendar). This +parameters is one of the following values: + +\begin{verbatim} + enum Calendar + { + Gregorian, // calendar currently in use in Western countries + Julian // calendar in use since -45 until the 1582 (or later) + }; +\end{verbatim} + +Date calculatiosn often depend on the country adn wxDateTime allows to set the +country which conventions should be used using +\helpref{SetCountry}{wxdatetimesetcountry}. It takes one of the following +values as parameter: + +\begin{verbatim} + enum Country + { + Country_Unknown, // no special information for this country + Country_Default, // set the default country with SetCountry() method + // or use the default country with any other + + Country_WesternEurope_Start, + Country_EEC = Country_WesternEurope_Start, + France, + Germany, + UK, + Country_WesternEurope_End = UK, + + Russia, + + USA + }; +\end{verbatim} + +Differnet parst of the world use different conventions for the week start. +In some countries, the week starts on Sunday, while in others - on Monday. +The ISO standard doesn't address this issue, so we support both conventions in +the functions whose result depends on it ( +\helpref{GetWeekOfYear}{wxdatetimegetweekofyear} and +\helpref{GetWeekOfMonth}{wxdatetimegetweekofmonth}). + +The desired behvaiour may be specified by giving one of the following +constants as argument to these functions: + +\begin{verbatim} + enum WeekFlags + { + Default_First, // Sunday_First for US, Monday_First for the rest + Monday_First, // week starts with a Monday + Sunday_First // week starts with a Sunday + }; +\end{verbatim} + \wxheading{Derived from} No base class @@ -106,7 +174,7 @@ No base class \wxheading{See also} -%\helpref{Date classes overview}{wxdatetimeoverview},\rtfsp +\helpref{Date classes overview}{wxdatetimeoverview},\rtfsp wxTimeSpan,\rtfsp wxDateSpan,\rtfsp \helpref{wxCalendarCtrl}{wxcalendarctrl} @@ -120,6 +188,13 @@ either set or return the static variables of wxDateSpan (the country), return the current moment, year, month or number of days in it, or do some general calendar-related actions. +Please note that although several function accept an extra {\it Calendar} +parameter, it is currently ignored as only the Gregorian calendar is +supported. Future versions will support other calendars. + +\pythonnote{These methods are standalone functions named +{\tt wxDateTime_} in wxPython.} + \helpref{SetCountry}{wxdatetimesetcountry}\\ \helpref{GetCountry}{wxdatetimegetcountry}\\ \helpref{IsWestEuropeanCountry}{wxdatetimeiswesteuropeancountry}\\ @@ -137,23 +212,198 @@ calendar-related actions. \helpref{GetBeginDST}{wxdatetimegetbegindst}\\ \helpref{GetEndDST}{wxdatetimegetenddst}\\ \helpref{Now}{wxdatetimenow}\\ +\helpref{UNow}{wxdatetimeunow}\\ \helpref{Today}{wxdatetimetoday} \membersection{Constructors, assignment operators and setters} +Constructors and various {\tt Set()} methods are collected here. If you +construct a date object from separate values for day, month and year, you +should use \helpref{IsValid}{wxdatetimeisvalid} method to check that the +values were correct as constructors can not return an error code. + +\helpref{wxDateTime()}{wxdatetimewxdatetimedef}\\ +\helpref{wxDateTime(time\_t)}{wxdatetimewxdatetimetimet}\\ +\helpref{wxDateTime(struct tm)}{wxdatetimewxdatetimetm}\\ +%\helpref{wxDateTime(struct Tm)}{wxdatetimewxdatetimetm} - Tm not documented yet\\ +\helpref{wxDateTime(double jdn)}{wxdatetimewxdatetimejdn}\\ +\helpref{wxDateTime(h, m, s, ms)}{wxdatetimewxdatetimetime}\\ +\helpref{wxDateTime(day, mon, year, h, m, s, ms)}{wxdatetimewxdatetimedate}\\ +\helpref{SetToCurrent}{wxdatetimesettocurrent}\\ +\helpref{Set(time\_t)}{wxdatetimesettimet}\\ +\helpref{Set(struct tm)}{wxdatetimesettm}\\ +%\helpref{Set(struct Tm)}{wxdatetimesettm} - Tm not documented yet\\ +\helpref{Set(double jdn)}{wxdatetimesetjdn}\\ +\helpref{Set(h, m, s, ms)}{wxdatetimesettime}\\ +\helpref{Set(day, mon, year, h, m, s, ms)}{wxdatetimesetdate}\\ +\helpref{ResetTime}{wxdatetimeresettime}\\ +\helpref{SetYear}{wxdatetimesetyear}\\ +\helpref{SetMonth}{wxdatetimesetmonth}\\ +\helpref{SetDay}{wxdatetimesetdate}\\ +\helpref{SetHour}{wxdatetimesethour}\\ +\helpref{SetMinute}{wxdatetimesetminute}\\ +\helpref{SetSecond}{wxdatetimesetsecond}\\ +\helpref{SetMillisecond}{wxdatetimesetmillisecond}\\ +\helpref{operator$=$(time\_t)}{wxdatetimeoperatoreqtimet}\\ +\helpref{operator$=$(struct tm)}{wxdatetimeoperatoreqtm} +%\helpref{operator$=$(struct Tm)}{wxdatetimeoperatortm2} + \membersection{Accessors} +Here are the trivial accessors. Other functions, which might have to perform +some more complicated calculations to find the answer are under +\helpref{Calendar calculations}{wxdatetimecalculations} section. + +\helpref{IsValid}{wxdatetimeisvalid}\\ +\helpref{GetTicks}{wxdatetimegetticks}\\ +\helpref{GetYear}{wxdatetimegetyear}\\ +\helpref{GetMonth}{wxdatetimegetmonth}\\ +\helpref{GetDay}{wxdatetimegetday}\\ +\helpref{GetWeekDay}{wxdatetimegetweekday}\\ +\helpref{GetHour}{wxdatetimegethour}\\ +\helpref{GeTMinute}{wxdatetimegetminute}\\ +\helpref{GetSecond}{wxdatetimegetsecond}\\ +\helpref{GetMillisecond}{wxdatetimegetmillisecond}\\ +\helpref{GetDayOfYear}{wxdatetimegetdayofyear}\\ +\helpref{GetWeekOfYear}{wxdatetimegetweekofyear}\\ +\helpref{GetWeekOfMonth}{wxdatetimegetweekofmonth}\\ +\helpref{GetYearDay}{wxdatetimegetyearday}\\ +\helpref{IsWorkDay}{wxdatetimeisworkday}\\ +\helpref{IsGregorianDate}{wxdatetimeisgregoriandate} + \membersection{Date comparison} +There are several function to allow date comparison. To supplement them, a few +global operators $>$, $<$ etc taking wxDateTime are defined. + +\helpref{IsEqualTo}{wxdatetimeisequalto}\\ +\helpref{IsEarlierThan}{wxdatetimeisearlierthan}\\ +\helpref{IsLaterThan}{wxdatetimeislaterthan}\\ +\helpref{IsStrictlyBetween}{wxdatetimeisstrictlybetween}\\ +\helpref{IsBetween}{wxdatetimeisbetween}\\ +\helpref{IsSameDate}{wxdatetimeissamedate}\\ +\helpref{IsSameTime}{wxdatetimeissametime}\\ +\helpref{IsEqualUpTo}{wxdatetimeisequalupto} + \membersection{Date arithmetics} +These functions carry out \helpref{arithmetics}{tdatearithm} on the wxDateTime +objects. As explained in the overview, either wxTimeSpan or wxDateSpan may be +added to wxDateTime, hence all functions are overloaded to accept both +arguments. + +Also, both {\tt Add()} and {\tt Subtract()} have both const and non-const +version. The first one returns a new obejct which represents the +sum/difference of the original one with the argument while the second form +modifies the object to which it is applied. The operators $-=$ and $+=$ are +defined to be equivalent to the second forms of these functions. + +\helpref{Add(wxTimeSpan)}{wxdatetimeaddts}\\ +\helpref{Add(wxDateSpan)}{wxdatetimeaddds}\\ +\helpref{Subtract(wxTimeSpan)}{wxdatetimesubtractts}\\ +\helpref{Subtract(wxDateSpan)}{wxdatetimesubtractds}\\ +\helpref{Subtract(wxDateTime)}{wxdatetimesubtractdt}\\ +\helpref{oparator$+=$(wxTimeSpan)}{wxdatetimeaddts}\\ +\helpref{oparator$+=$(wxDateSpan)}{wxdatetimeaddds}\\ +\helpref{oparator$-=$(wxTimeSpan)}{wxdatetimesubtractts}\\ +\helpref{oparator$-=$(wxDateSpan)}{wxdatetimesubtractds} + \membersection{Parsing and formatting dates} -\membersection{Calendar calculations} +These functions perform convert wxDateTime obejcts to and from text. The +conversions to text are mostly trivial: you can either do it using the default +date and time representations for the current locale ( +\helpref{FormatDate}{wxdatetimeformatdate} and +\helpref{FormatTime}{wxdatetimeformattime}), using the international standard +representation defined by ISO 8601 ( +\helpref{FormatISODate}{wxdatetimeformatisodate} and +\helpref{FormatISOTime}{wxdatetimeformatisotime}) or by specifying any format +at all and using \helpref{Format}{wxdatetimeformat} directly. + +The conversions from text are more interesting, as there are much more +possibilities to care about. The simples cases can be taken care of with +\helpref{ParseFormat}{wxdatetimeparseformat} which can parse any date in the +given (rigid) format. \helpref{ParseRfc822Date}{wxdatetimeparserfc822date} is +another function for parsing dates in predefined format - the one of RFC 822 +which (still...) defines the format of email messages on the Internet. This +format can not be described with {\tt strptime(3)}-like format strings used by +\helpref{Format}{wxdatetimeformat}, hence the need for a separate function. + +But the most interesting functions are +\helpref{ParseDateTime}{wxdatetimeparsedatetime} and +\helpref{ParseDate}{wxdatetimeparsedate} and +\helpref{ParseTime}{wxdatetimeparsetime}. They try to parse the date ans time +(or only one of them) in `free' format, i.e. allow them to be specified in any +of possible ways. These functions will usually be used to parse the +(interactive) user input which is not bound to be in any predefined format. As +an example, \helpref{ParseDateTime}{wxdatetimeparsedatetime} can parse the +strings such as {\tt "tomorrow"}, {\tt "March first"}, {\tt "next Sunday"}. + +\helpref{ParseRfc822Date}{wxdatetimeparserfc822date}\\ +\helpref{ParseFormat}{wxdatetimeparseformat}\\ +\helpref{ParseDateTime}{wxdatetimeparsedatetime}\\ +\helpref{ParseDate}{wxdatetimeparsedate}\\ +\helpref{ParseTime}{wxdatetimeparsetime}\\ +\helpref{Format}{wxdatetimeformat}\\ +\helpref{FormatDate}{wxdatetimeformatdate}\\ +\helpref{FormatTime}{wxdatetimeformattime}\\ +\helpref{FormatISODate}{wxdatetimeformatisodate}\\ +\helpref{FormatISOTime}{wxdatetimeformatisotime} + +\membersection{Calendar calculations}\label{wxdatetimecalculations} + +The functions in this section perform the basic calendar calculations, mostly +related to the week days. They allow to find the given week day in the +week with given number (either in the month or in the year) and so on. + +All (non-const) functions in this section don't modify the time part of the +wxDateTime - they only work with the date part of it. + +\helpref{SetToWeekDayInSameWeek}{wxdatetimesettoweekdayinsameweek}\\ +\helpref{GetWeekDayInSameWeek}{wxdatetimegetweekdayinsameweek}\\ +\helpref{SetToNextWeekDay}{wxdatetimesettonextweekday}\\ +\helpref{GetNextWeekDay}{wxdatetimegetnextweekday}\\ +\helpref{SetToPrevWeekDay}{wxdatetimesettoprevweekday}\\ +\helpref{GetPrevWeekDay}{wxdatetimegetprevweekday}\\ +\helpref{SetToWeekDay}{wxdatetimesettoweekday}\\ +\helpref{GetWeekDay}{wxdatetimegetweekday2}\\ +\helpref{SetToLastWeekDay}{wxdatetimesettolastweekday}\\ +\helpref{GetLastWeekDay}{wxdatetimegetlastweekday}\\ +\helpref{SetToTheWeek}{wxdatetimesettotheweek}\\ +\helpref{GetWeek}{wxdatetimegetweek}\\ +\helpref{SetToLastMonthDay}{wxdatetimesettolastmonthday}\\ +\helpref{GetLastMonthDay}{wxdatetimegetlastmonthday}\\ +\helpref{SetToYearDay}{wxdatetimesettoyearday}\\ +\helpref{GetYearDay}{wxdatetimegetyearday} \membersection{Astronomical/historical functions} -\membersection{Time zone support} +Some degree of support for the date units used in astronomy and/or history is +provided. You can construct a wxDateTime object from a +\helpref{JDN}{wxdatetimesetjdn} and you may also get its JDN, +\helpref{MJD}{wxdatetimegetmodifiedjuliandaynumber} or +\helpref{Rata Die number}{wxdatetimegetratadie} from it. + +\helpref{wxDateTime(double jdn)}{wxdatetimewxdatetimejdn}\\ +\helpref{Set(double jdn)}{wxdatetimesetjdn}\\ +\helpref{GetJulianDayNumber}{wxdatetimegetjuliandaynumber}\\ +\helpref{GetJDN}{wxdatetimegetjdn}\\ +\helpref{GetModifiedJulianDayNumber}{wxdatetimegetmodifiedjuliandaynumber}\\ +\helpref{GetMJD}{wxdatetimegetmjd}\\ +\helpref{GetRataDie}{wxdatetimegetratadie} + +\membersection{Time zone and DST support} + +Please see the \helpref{time zone overview}{tdatetimezones} for more +information about time zones. ormally, these functions should be rarely used. + +\helpref{ToTimezone}{wxdatetimetotimezone}\\ +\helpref{MakeTimezone}{wxdatetimemaketimezone}\\ +\helpref{ToGMT}{wxdatetimetogmt}\\ +\helpref{MakeGMT}{wxdatetimemakegmt}\\ +\helpref{GetBeginDST}{wxdatetimegetbegindst}\\ +\helpref{GetEndDST}{wxdatetimegetenddst}\\ +\helpref{IsDST}{wxdatetimeisdst} \helponly{\insertatlevel{2}{ @@ -161,6 +411,8 @@ calendar-related actions. }} +%%%%%%%%%%%%%%%%%%%%%%%%%%% static functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \membersection{wxDateTime::ConvertYearToBC}\label{wxdatetimeconvertyeartobc} \func{static int}{ConvertYearToBC}{\param{int }{year}} @@ -182,65 +434,927 @@ This function should be used like this: \func{static void}{GetAmPmStrings}{\param{wxString *}{am}, \param{wxString *}{pm}} +Returns the translations of the strings {\tt AM} and {\tt PM} used for time +formatting for the current locale. Either of the pointers may be {\tt NULL} if +the corresponding value is not needed. + \membersection{wxDateTime::GetBeginDST}\label{wxdatetimegetbegindst} \func{static wxDateTime}{GetBeginDST}{\param{int }{year = Inv\_Year}, \param{Country }{country = Country\_Default}} +Get the beginning of DST for the given country in the given year (current one +by default). This function suffers from limitations described in +\helpref{DST overview}{tdatedst}. + +\wxheading{See also} + +\helpref{GetEndDST}{wxdatetimegetenddst} + \membersection{wxDateTime::GetCountry}\label{wxdatetimegetcountry} \func{static Country}{GetCountry}{\void} +Returns the current default country. The default country is used for DST +calculations, for example. + +\wxheading{See also} + +\helpref{SetCountry}{wxdatetimesetcountry} + \membersection{wxDateTime::GetCurrentYear}\label{wxdatetimegetcurrentyear} \func{static int}{GetCurrentYear}{\param{Calendar }{cal = Gregorian}} +Get the current year in given calendar (only Gregorian is currently supported). + \membersection{wxDateTime::GetCurrentMonth}\label{wxdatetimegetcurrentmonth} \func{static Month}{GetCurrentMonth}{\param{Calendar }{cal = Gregorian}} +Get the current month in given calendar (only Gregorian is currently supported). + \membersection{wxDateTime::GetCentury}\label{wxdatetimegetcentury} \func{static int}{GetCentury}{\param{int }{year = Inv\_Year}} +Get the current century, i.e. first two digits of the year, in given calendar +(only Gregorian is currently supported). + \membersection{wxDateTime::GetEndDST}\label{wxdatetimegetenddst} \func{static wxDateTime}{GetEndDST}{\param{int }{year = Inv\_Year}, \param{Country }{country = Country\_Default}} +Returns the end of DST for the given country in the given year (current one by +default). + +\wxheading{See also} + +\helpref{GetBeginDST}{wxdatetimegetbegindst} + \membersection{wxDateTime::GetMonthName}\label{wxdatetimegetmonthname} \func{static wxString}{GetMonthName}{\param{Month }{month}, \param{NameFlags }{flags = Name\_Full}} +Gets the full (default) or abbreviated (specify {\tt Name\_Abbr} name of the +given month. + +\wxheading{See also} + +\helpref{GetWeekDayName}{wxdatetimegetweekdayname} + \membersection{wxDateTime::GetNumberOfDays}\label{wxdatetimegetnumberofdays} \func{static wxDateTime\_t}{GetNumberOfDays}{\param{int }{year}, \param{Calendar }{cal = Gregorian}} \func{static wxDateTime\_t}{GetNumberOfDays}{\param{Month }{month}, \param{int }{year = Inv\_Year}, \param{Calendar }{cal = Gregorian}} +Returns the number of days in the given year or in the given month of the +year. + +The only supported value for {\it cal} parameter is currently {\tt Gregorian}. + +\pythonnote{These two methods are named {\tt GetNumberOfDaysInYear} +and {\tt GetNumberOfDaysInMonth} in wxPython.} + \membersection{wxDateTime::GetWeekDayName}\label{wxdatetimegetweekdayname} \func{static wxString}{GetWeekDayName}{\param{WeekDay }{weekday}, \param{NameFlags }{flags = Name\_Full}} +Gets the full (default) or abbreviated (specify {\tt Name\_Abbr} name of the +given week day. + +\wxheading{See also} + +\helpref{GetMonthName}{wxdatetimegetmonthname} + \membersection{wxDateTime::IsLeapYear}\label{wxdatetimeisleapyear} \func{static bool}{IsLeapYear}{\param{int }{year = Inv\_Year}, \param{Calendar }{cal = Gregorian}} +Returns {\tt TRUE} if the {\it year} is a leap one in the specified calendar. + +This functions supports Gregorian and Julian calendars. + \membersection{wxDateTime::IsWestEuropeanCountry}\label{wxdatetimeiswesteuropeancountry} \func{static bool}{IsWestEuropeanCountry}{\param{Country }{country = Country\_Default}} +This function returns {\tt TRUE} if the specified (or default) country is one +of Western European ones. It is used internally by wxDateTime to determine the +DST convention and date and time formatting rules. + \membersection{wxDateTime::IsDSTApplicable}\label{wxdatetimeisdstapplicable} \func{static bool}{IsDSTApplicable}{\param{int }{year = Inv\_Year}, \param{Country }{country = Country\_Default}} +Returns {\tt TRUE} if DST was usedi n the given year (the current one by +default) in the given country. + \membersection{wxDateTime::Now}\label{wxdatetimenow} \func{static wxDateTime}{Now}{\void} +Returns the object corresopnding to the current time. + +Example: + +\begin{verbatim} + wxDateTime now = wxDateTime::Now(); + printf("Current time in Paris:\t%s\n", now.Format("%c", wxDateTime::CET).c_str()); +\end{verbatim} + +Note that this function is accurate up to second: +\helpref{wxDateTime::UNow}{wxdatetimeunow} should be used for better precision +(but it is less efficient and might not be availabel on all platforms). + +\wxheading{See also} + +\helpref{Today}{wxdatetimetoday} + \membersection{wxDateTime::SetCountry}\label{wxdatetimesetcountry} \func{static void}{SetCountry}{\param{Country }{country}} +Sets the country to use by default. This setting influences the DST +calculations, date formatting and other things. + +The possible values for {\it country} parameter are enumerated in +\helpref{wxDateTime constants section}{wxdatetime}. + +\wxheading{See also} + +\helpref{GetCountry}{wxdatetimegetcountry} + \membersection{wxDateTime::Today}\label{wxdatetimetoday} \func{static wxDateTime}{Today}{\void} +Returns the object corresponding to the midnight of the current day (i.e. the +same as \helpref{Now()}{wxdatetimenow}, but the time part is set to $0$). + +\wxheading{See also} + +\helpref{Now}{wxdatetimenow} + +\membersection{wxDateTime::UNow}\label{wxdatetimeunow} + +\func{static wxDateTime}{UNow}{\void} + +Returns the object corresopnding to the current time including the +milliseconds if a function to get time with such precision is available on the +current platform (supported under most Unices and Win32). + +\wxheading{See also} + +\helpref{Now}{wxdatetimenow} + +%%%%%%%%%%%%%%%%%%%%%%%%%%% constructors &c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimedef} + +\func{}{wxDateTime}{\void} + +Default constructor. Use one of {\tt Set()} functions to initialize the object +later. + +\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimetimet} + +\func{wxDateTime\&}{wxDateTime}{\param{time\_t }{timet}} + +Same as \helpref{Set}{wxdatetimewxdatetimetimet}. + +\pythonnote{This constructor is named {\tt wxDateTimeFromTimeT} in wxPython.} + +\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimetm} + +\func{wxDateTime\&}{wxDateTime}{\param{const struct tm\& }{tm}} + +Same as \helpref{Set}{wxdatetimewxdatetimetm} + +\pythonnote{Unsupported.} + +\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimejdn} + +\func{wxDateTime\&}{wxDateTime}{\param{double }{jdn}} + +Same as \helpref{Set}{wxdatetimewxdatetimejdn} + +\pythonnote{This constructor is named {\tt wxDateTimeFromJDN} in wxPython.} + +\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimetime} + +\func{wxDateTime\&}{wxDateTime}{\param{wxDateTime\_t }{hour}, \param{wxDateTime\_t }{minute = 0}, \param{wxDateTime\_t }{second = 0}, \param{wxDateTime\_t }{millisec = 0}} + +Same as \helpref{Set}{wxdatetimewxdatetimetime} + +\pythonnote{This constructor is named {\tt wxDateTimeFromHMS} in wxPython.} + +\membersection{wxDateTime::wxDateTime}\label{wxdatetimewxdatetimedate} + +\func{wxDateTime\&}{wxDateTime}{\param{wxDateTime\_t }{day}, \param{Month }{month = Inv\_Month}, \param{wxDateTime\_t }{hour = 0}, \param{wxDateTime\_t }{minute = 0}, \param{wxDateTime\_t }{second = 0}, \param{wxDateTime\_t }{millisec = 0}} + +Same as \helpref{Set}{wxdatetimesetdate} + +\pythonnote{This constructor is named {\tt wxDateTimeFromDMY} in wxPython.} + +\membersection{wxDateTime::SetToCurrent}\label{wxdatetimesettocurrent} + +\func{wxDateTime&}{SetToCurrent}{\void} + +Sets the date and time of to the current values. Same as assigning the result +of \helpref{Now()}{wxdatetimenow} to this object. + +\membersection{wxDateTime::Set}\label{wxdatetimesettimet} + +\func{wxDateTime\&}{Set}{\param{time\_t }{timet}} + +Constructs the object from {\it timet} value holding the number of seconds +since Jan 1, 1970. + +\pythonnote{This method is named {\tt SetTimeT} in wxPython.} + +\membersection{wxDateTime::Set}\label{wxdatetimesettm} + +\func{wxDateTime\&}{Set}{\param{const struct tm\& }{tm}} + +Sets the date and tiem from the broken down representation in the standard +{\tt tm} structure. + +\pythonnote{Unsupported.} + +\membersection{wxDateTime::Set}\label{wxdatetimesetjdn} + +\func{wxDateTime\&}{Set}{\param{double }{jdn}} + +Sets the date from the so-called {\it Julian Day Number}. + +By definition, the Julian Day Number, usually abbreviated as JDN, of a +particular instant is the fractional number of days since 12 hours Universal +Coordinated Time (Greenwhich mean noon) on January 1 of the year -4712 in the +Julian proleptic calendar. + +\pythonnote{This method is named {\tt SetJDN} in wxPython.} + +\membersection{wxDateTime::Set}\label{wxdatetimesettime} + +\func{wxDateTime\&}{Set}{\param{wxDateTime\_t }{hour}, \param{wxDateTime\_t }{minute = 0}, \param{wxDateTime\_t }{second = 0}, \param{wxDateTime\_t }{millisec = 0}} + +Sets the date to be equal to \helpref{Today}{wxdatetimetoday} and the time +from supplied parameters. + +\pythonnote{This method is named {\tt SetHMS} in wxPython.} + +\membersection{wxDateTime::Set}\label{wxdatetimesetdate} + +\func{wxDateTime\&}{Set}{\param{wxDateTime\_t }{day}, \param{Month }{month = Inv\_Month}, \param{wxDateTime\_t }{hour = 0}, \param{wxDateTime\_t }{minute = 0}, \param{wxDateTime\_t }{second = 0}, \param{wxDateTime\_t }{millisec = 0}} + +Sets the date and time from the parameters. + +\membersection{wxDateTime::ResetTime}\label{wxdatetimeresettime} + +\func{wxDateTime\&}{ResetTime}{\void} + +Reset time to midnight (00:00:00) without changing the date. + +\membersection{wxDateTime::SetYear}\label{wxdatetimesetyear} + +\func{wxDateTime\&}{SetYear}{\param{int }{year}} + +Sets the year without changing other date components. + +\membersection{wxDateTime::SetMonth}\label{wxdatetimesetmonth} + +\func{wxDateTime\&}{SetMonth}{\param{Month }{month}} + +Sets the month without changing other date components. + +\membersection{wxDateTime::SetDay}\label{wxdatetimesetday} + +\func{wxDateTime\&}{SetDay}{\param{wxDateTime\_t }{day}} + +Sets the day without changing other date components. + +\membersection{wxDateTime::SetHour}\label{wxdatetimesethour} + +\func{wxDateTime\&}{SetHour}{\param{wxDateTime\_t }{hour}} + +Sets the hour without changing other date components. + +\membersection{wxDateTime::SetMinute}\label{wxdatetimesetminute} + +\func{wxDateTime\&}{SetMinute}{\param{wxDateTime\_t }{minute}} + +Sets the minute without changing other date components. + +\membersection{wxDateTime::SetSecond}\label{wxdatetimesetsecond} + +\func{wxDateTime\&}{SetSecond}{\param{wxDateTime\_t }{second}} + +Sets the second without changing other date components. + +\membersection{wxDateTime::SetMillisecond}\label{wxdatetimesetmillisecond} + +\func{wxDateTime\&}{SetMillisecond}{\param{wxDateTime\_t }{millisecond}} + +Sets the millisecond without changing other date components. + +\membersection{wxDateTime::operator$=$}\label{wxdatetimeoperatoreqtimet} + +\func{wxDateTime\&}{operator}{\param{time\_t }{timet}} + +Same as \helpref{Set}{wxdatetimesettimet}. + +\membersection{wxDateTime::operator$=$}\label{wxdatetimeoperatoreqtm} + +\func{wxDateTime\&}{operator}{\param{const struct tm\& }{tm}} + +Same as \helpref{Set}{wxdatetimesettm}. + +%%%%%%%%%%%%%%%%%%%%%%%%%%% accessors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::IsValid}\label{wxdatetimeisvalid} + +\constfunc{bool}{IsValid}{\void} + +Returns {\tt TRUE} if the object represents a valid time moment. + +\membersection{wxDateTime::GetTm}\label{wxdatetimegettm} + +\constfunc{Tm}{GetTm}{\param{const TimeZone\& }{tz = Local}} + +Returns broken down representation of the date and time. + +\membersection{wxDateTime::GetTicks}\label{wxdatetimegetticks} + +\constfunc{time\_t}{GetTicks}{\void} + +Returns the number of seconds since Jan 1, 1970. An assert failure will occur +if the date is not in the range covered by {\tt time\_t} type. + +\membersection{wxDateTime::GetYear}\label{wxdatetimegetyear} + +\constfunc{int}{GetYear}{\param{const TimeZone\& }{tz = Local}} + +Returns the year in the given timezone (local one by default). + +\membersection{wxDateTime::GetMonth}\label{wxdatetimegetmonth} + +\constfunc{Month}{GetMonth}{\param{const TimeZone\& }{tz = Local}} + +Returns the month in the given timezone (local one by default). + +\membersection{wxDateTime::GetDay}\label{wxdatetimegetday} + +\constfunc{wxDateTime\_t}{GetDay}{\param{const TimeZone\& }{tz = Local}} + +Returns the day in the given timezone (local one by default). + +\membersection{wxDateTime::GetWeekDay}\label{wxdatetimegetweekday} + +\constfunc{WeekDay}{GetWeekDay}{\param{const TimeZone\& }{tz = Local}} + +Returns the week day in the given timezone (local one by default). + +\membersection{wxDateTime::GetHour}\label{wxdatetimegethour} + +\constfunc{wxDateTime\_t}{GetHour}{\param{const TimeZone\& }{tz = Local}} + +Returns the hour in the given timezone (local one by default). + +\membersection{wxDateTime::GetMinute}\label{wxdatetimegetminute} + +\constfunc{wxDateTime\_t}{GetMinute}{\param{const TimeZone\& }{tz = Local}} + +Returns the minute in the given timezone (local one by default). + +\membersection{wxDateTime::GetSecond}\label{wxdatetimegetsecond} + +\constfunc{wxDateTime\_t}{GetSecond}{\param{const TimeZone\& }{tz = Local}} + +Returns the seconds in the given timezone (local one by default). + +\membersection{wxDateTime::GetMillisecond}\label{wxdatetimegetmillisecond} + +\constfunc{wxDateTime\_t}{GetMillisecond}{\param{const TimeZone\& }{tz = Local}} + +Returns the milliseconds in the given timezone (local one by default). + +\membersection{wxDateTime::GetDayOfYear}\label{wxdatetimegetdayofyear} + +\constfunc{wxDateTime\_t}{GetDayOfYear}{\param{const TimeZone\& }{tz = Local}} + +Returns the day of the year (in $1\ldots366$ range) in the given timezone +(local one by default). + +\membersection{wxDateTime::GetWeekOfYear}\label{wxdatetimegetweekofyear} + +\constfunc{wxDateTime\_t}{GetWeekOfYear}{\param{WeekFlags }{flags = Monday\_First}, \param{const TimeZone\& }{tz = Local}} + +Returns the number of the week of the year this date is in. The first week of +the year is, according to international standards, the one containing Jan 4. +The week number is in $1\ldots53$ range ($52$ for non leap years). + +The function depends on the \helpref{week start}{wxdatetime} convention +specified by the {\it flags} argument. + +\membersection{wxDateTime::GetWeekOfMonth}\label{wxdatetimegetweekofmonth} + +\constfunc{wxDateTime\_t}{GetWeekOfMonth}{\param{WeekFlags }{flags = Monday\_First}, \param{const TimeZone\& }{tz = Local}} + +Returns the ordinal number of the week in the month (in $1\ldots5$ range). + +As \helpref{GetWeekOfYear}{wxdatetimegetweekofyear}, this function supports +both conventions for the week start. See the description of these +\helpref{week start}{wxdatetime} conventions. + +\membersection{wxDateTime::IsWorkDay}\label{wxdatetimeisworkday} + +\constfunc{bool}{IsWorkDay}{\param{Country }{country = Country\_Default}} + +Returns {\tt TRUE} is this day is not a holiday in the given country. + +\membersection{wxDateTime::IsGregorianDate}\label{wxdatetimeisgregoriandate} + +\constfunc{bool}{IsGregorianDate}{\param{GregorianAdoption }{country = Gr\_Standard}} + +Returns {\tt TRUE} if the given date os later than the date of adoption of the +Gregorian calendar in the given country (and hence the Gregorian calendar +calculations make sense for it). + +%%%%%%%%%%%%%%%%%%%%%%%%%%% comparison %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::IsEqualTo}\label{wxdatetimeisequalto} + +\constfunc{bool}{IsEqualTo}{\param{const wxDateTime& }{datetime}} + +Returns {\tt TRUE} if the two dates are strictly identical. + +\membersection{wxDateTime::IsEarlierThan}\label{wxdatetimeisearlierthan} + +\constfunc{bool}{IsEarlierThan}{\param{const wxDateTime& }{datetime}} + +Returns {\tt TRUE} if this date precedes the given one. + +\membersection{wxDateTime::IsLaterThan}\label{wxdatetimeislaterthan} + +\constfunc{bool}{IsLaterThan}{\param{const wxDateTime& }{datetime}} + +Returns {\tt TRUE} if this date is later than the given one. + +\membersection{wxDateTime::IsStrictlyBetween}\label{wxdatetimeisstrictlybetween} + +\constfunc{bool}{IsStrictlyBetween}{\param{const wxDateTime& }{t1}, \param{const wxDateTime& }{t2}} + +Returns {\tt TRUE} if this date lies strictly between the two others, + +\wxheading{See also} + +\helpref{IsBetween}{wxdatetimeisbetween} + +\membersection{wxDateTime::IsBetween}\label{wxdatetimeisbetween} + +\constfunc{bool}{IsBetween}{\param{const wxDateTime& }{t1}, \param{const wxDateTime& }{t2}} + +Returns {\tt TRUE} if \helpref{IsStrictlyBetween}{wxdatetimeisstrictlybetween} +is {\tt TRUE} or if the date is equal to one of the limi values. + +\wxheading{See also} + +\helpref{IsStrictlyBetween}{wxdatetimeisstrictlybetween} + +\membersection{wxDateTime::IsSameDate}\label{wxdatetimeissamedate} + +\constfunc{bool}{IsSameDate}{\param{const wxDateTime& }{dt}} + +Returns {\tt TRUE} if the date is the same without comparing the time parts. + +\membersection{wxDateTime::IsSameTime}\label{wxdatetimeissametime} + +\constfunc{bool}{IsSameTime}{\param{const wxDateTime& }{dt}} + +Returns {\tt TRUE} if the time is the same (although dates may differ). + +\membersection{wxDateTime::IsEqualUpTo}\label{wxdatetimeisequalupto} + +\constfunc{bool}{IsEqualUpTo}{\param{const wxDateTime\& }{dt}, \param{const wxTimeSpan\& }{ts}} + +Returns {\tt TRUE} if the date is equal to another one up to the given time +interval, i.e. if the absolute difference between the two dates is less than +this interval. + +%%%%%%%%%%%%%%%%%%%%%%%%%%% arithmetics %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::Add}\label{wxdatetimeaddts} + +\constfunc{wxDateTime}{Add}{\param{const wxTimeSpan\& }{diff}} + +\func{wxDateTime\&}{Add}{\param{const wxTimeSpan\& }{diff}} + +\func{wxDateTime\&}{operator$+=$}{\param{const wxTimeSpan\& }{diff}} + +Adds the given time span to this object. + +\pythonnote{This method is named {\tt AddTS} in wxPython.} + +\membersection{wxDateTime::Subtract}\label{wxdatetimesubtractts} + +\constfunc{wxDateTime}{Subtract}{\param{const wxTimeSpan\& }{diff}} + +\func{wxDateTime\&}{Subtract}{\param{const wxTimeSpan\& }{diff}} + +\func{wxDateTime\&}{operator$-=$}{\param{const wxTimeSpan\& }{diff}} + +Subtracts the given time span from this object. + +\pythonnote{This method is named {\tt SubtractTS} in wxPython.} + +\membersection{wxDateTime::Add}\label{wxdatetimeaddds} + +\constfunc{wxDateTime}{Add}{\param{const wxDateSpan\& }{diff}} + +\func{wxDateTime\&}{Add}{\param{const wxDateSpan\& }{diff}} + +\func{wxDateTime\&}{operator$+=$}{\param{const wxDateSpan\& }{diff}} + +Adds the given date span to this object. + +\pythonnote{This method is named {\tt AddDS} in wxPython.} + +\membersection{wxDateTime::Subtract}\label{wxdatetimesubtractds} + +\constfunc{wxDateTime}{Subtract}{\param{const wxDateSpan\& }{diff}} + +\func{wxDateTime\&}{Subtract}{\param{const wxDateSpan\& }{diff}} + +\func{wxDateTime\&}{operator$-=$}{\param{const wxDateSpan\& }{diff}} + +Subtracts the given date span from this object. + +\pythonnote{This method is named {\tt SubtractDS} in wxPython.} + +\membersection{wxDateTime::Subtract}\label{wxdatetimesubtractdt} + +\constfunc{wxTimeSpan}{Subtract}{\param{const wxDateTime\& }{dt}} + +Subtracts another date from this one and returns the difference between them +as wxTimeSpan. + +%%%%%%%%%%%%%%%%%%%%%%%%%%% parsing/formatting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::ParseRfc822Date}\label{wxdatetimeparserfc822date} + +\func{const wxChar *}{ParseRfc822Date}{\param{const wxChar* }{date}} + +Parses the string {\it date} looking for a date formatted according to the RFC +822 in it. The exact description of this format may, of course, be found in +the RFC (section $5$), but, briefly, this is the format used in the headers of +Internet email messages and one of the most common strings expressing date in +this format may be something like {\tt "Sat, 18 Dec 1999 00:48:30 +0100"}. + +Returns {\tt NULL} if the conversion failed, otherwise return the pointer to +the character immediately following the part of the string which could be +parsed. If the entire string contains only the date in RFC 822 format, +the returned pointer will be pointing to a {\tt NUL} character. + +This function is intenionally strict, it will return an error for any string +which is not RFC 822 compliant. If you need to parse date formatted in more +free ways, you should use \helpref{ParseDateTime}{wxdatetimeparsedatetime} or +\helpref{ParseDate}{wxdatetimeparsedate} instead. + +\membersection{wxDateTime::ParseFormat}\label{wxdatetimeparseformat} + +\func{const wxChar *}{ParseFormat}{\param{const wxChar *}{date}, \param{const wxChar *}{format = "\%c"}, \param{const wxDateTime\& }{dateDef = wxDefaultDateTime}} + +This function parses the string {\it date} according to the given +{\it format}. The system {\tt strptime(3)} function is used whenever available, +but even if it is not, this function is still implemented (although support +for locale-dependent format specificators such as {\tt "\%c"}, {\tt "\%x"} or +{\tt "\%X"} may be not perfect). This function does handle the month and +weekday names in the current locale on all platforms, however. + +Please the description of ANSI C function {\tt strftime(3)} for the syntax of +the format string. + +The {\it dateDef} parameter is used to fill in the fields which could not be +determined from the format string. For example, if the format is {\tt "\%d"} +(the day of the month), the month and the year are taken from {\it dateDef}. +If it is not specified, \helpref{Today}{wxdatetimetoday} is used as the +default date. + +Returns {\tt NULL} if the conversion failed, otherwise return the pointer to +the character which stopped the scan. + +\membersection{wxDateTime::ParseDateTime}\label{wxdatetimeparsedatetime} + +\func{const wxChar *}{ParseDateTime}{\param{const wxChar *}{datetime}} + +Parses the string {\it datetime} containing the date and time in free format. +This function tries as hard as it can to interpret the given string as date +and time. Unlike \helpref{ParseRfc822Date}{wxdatetimeparserfc822date}, it +will accept anything that may be accepted and will only reject strings which +can not be parsed in any way at all. + +Returns {\tt NULL} if the conversion failed, otherwise return the pointer to +the character which stopped the scan. + +\membersection{wxDateTime::ParseDate}\label{wxdatetimeparsedate} + +\func{const wxChar *}{ParseDate}{\param{const wxChar *}{date}} + +This function is like \helpref{ParseDateTime}{wxdatetimeparsedatetime}, but it +only allows the date to be specified. It is thus flexible then +\helpref{ParseDateTime}{wxdatetimeparsedatetime}, but also has less chances to +misinterpret the user input. + +Returns {\tt NULL} if the conversion failed, otherwise return the pointer to +the character which stopped the scan. + +\membersection{wxDateTime::ParseTime}\label{wxdatetimeparsetime} + +\func{const wxChar *}{ParseTime}{\param{const wxChar *}{time}} + +This functions is like \helpref{ParseDateTime}{wxdatetimeparsedatetime}, but +only allows the time to be specified in the input string. + +Returns {\tt NULL} if the conversion failed, otherwise return the pointer to +the character which stopped the scan. + +\membersection{wxDateTime::Format}\label{wxdatetimeformat} + +\constfunc{wxString }{Format}{\param{const wxChar *}{format = "\%c"}, \param{const TimeZone\& }{tz = Local}} + +This function does the same as the standard ANSI C {\tt strftime(3)} function. +Please see its description for the meaning of {\it format} parameter. + +It also accepts a few wxWindows-specific extensions: you can optionally specify +the width of the field to follow using {\tt printf(3)}-like syntax and the +format specificator {\tt \%l} can be used to get the number of milliseconds. + +\wxheading{See also} + +\helpref{ParseFormat}{wxdatetimeparseformat} + +\membersection{wxDateTime::FormatDate}\label{wxdatetimeformatdate} + +\constfunc{wxString }{FormatDate}{\void} + +Identical to calling \helpref{Format()}{wxdatetimeformat} with {\tt "\%x"} +argument (which means `preferred date representation for the current locale'). + +\membersection{wxDateTime::FormatTime}\label{wxdatetimeformattime} + +\constfunc{wxString }{FormatTime}{\void} + +Identical to calling \helpref{Format()}{wxdatetimeformat} with {\tt "\%X"} +argument (which means `preferred time representation for the current locale'). + +\membersection{wxDateTime::FormatISODate}\label{wxdatetimeformatisodate} + +\constfunc{wxString }{FormatISODate}{\void} + +This function returns the date representation in the ISO 8601 format +(YYYY-MM-DD). + +\membersection{wxDateTime::FormatISOTime}\label{wxdatetimeformatisotime} + +\constfunc{wxString }{FormatISOTime}{\void} + +This function returns the time representation in the ISO 8601 format +(HH:MM:SS). + +%%%%%%%%%%%%%%%%%%%%%%%%%%% calendar calculations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::SetToWeekDayInSameWeek}\label{wxdatetimesettoweekdayinsameweek} + +\func{wxDateTime\&}{SetToWeekDayInSameWeek}{\param{WeekDay }{weekday}} + +Adjusts the date so that it will still lie in the same week as before, but its +week day will be the given one. + +Returns the reference to the modified object itself. + +\membersection{wxDateTime::GetWeekDayInSameWeek}\label{wxdatetimegetweekdayinsameweek} + +\constfunc{wxDateTime}{GetWeekDayInSameWeek}{\param{WeekDay }{weekday}} + +Returns the copy of this object to which +\helpref{SetToWeekDayInSameWeek}{wxdatetimesettoweekdayinsameweek} was +applied. + +\membersection{wxDateTime::SetToNextWeekDay}\label{wxdatetimesettonextweekday} + +\func{wxDateTime\&}{SetToNextWeekDay}{\param{WeekDay }{weekday}} + +Sets the date so that it will be the first {\it weekday} following the current +date. + +Returns the reference to the modified object itself. + +\membersection{wxDateTime::GetNextWeekDay}\label{wxdatetimegetnextweekday} + +\constfunc{wxDateTime}{GetNextWeekDay}{\param{WeekDay }{weekday}} + +Returns the copy of this object to which +\helpref{SetToNextWeekDay}{wxdatetimesettonextweekday} was applied. + +\membersection{wxDateTime::SetToPrevWeekDay}\label{wxdatetimesettoprevweekday} + +\func{wxDateTime\&}{SetToPrevWeekDay}{\param{WeekDay }{weekday}} + +Sets the date so that it will be the last {\it weekday} before the current +date. + +Returns the reference to the modified object itself. + +\membersection{wxDateTime::GetPrevWeekDay}\label{wxdatetimegetprevweekday} + +\constfunc{wxDateTime}{GetPrevWeekDay}{\param{WeekDay }{weekday}} + +Returns the copy of this object to which +\helpref{SetToPrevWeekDay}{wxdatetimesettoprevweekday} was applied. + +\membersection{wxDateTime::SetToWeekDay}\label{wxdatetimesettoweekday} + +\func{bool}{SetToWeekDay}{\param{WeekDay }{weekday}, \param{int }{n = 1}, \param{Month }{month = Inv\_Month}, \param{int }{year = Inv\_Year}} + +Sets the date to the {\it n}-th {\it weekday} in the given month of the given +year (the current month and year are used by default). The parameter {\it n} +may be either opsitive (counting from the beginning of the month) or negative +(counting from the end of it). + +For example, {\tt SetToWeekDay(2, wxDateTime::Wed)} will set the date to the +second Wednesday in the current month and +{\tt SetToWeekDay(-1, wxDateTime::Sun)} - to the last Sunday in it. + +Returns {\tt TRUE} if the date was modified successfully, {\tt FALSE} +otherwise meaning that the specified date doesn't exist. + +\membersection{wxDateTime::GetWeekDay}\label{wxdatetimegetweekday2} + +\constfunc{wxDateTime}{GetWeekDay}{\param{WeekDay }{weekday}, \param{int }{n = 1}, \param{Month }{month = Inv\_Month}, \param{int }{year = Inv\_Year}} + +Returns the copy of this object to which +\helpref{SetToWeekDay}{wxdatetimesettoweekday} was applied. + +\membersection{wxDateTime::SetToLastWeekDay}\label{wxdatetimesettolastweekday} + +\func{bool}{SetToLastWeekDay}{\param{WeekDay }{weekday}, \param{Month }{month = Inv\_Month}, \param{int }{year = Inv\_Year}} + +The effect of calling this function is the same as of calling +{\tt SetToWeekDay(-1, weekday, month, year)}. The date will be set to the last +{\it weekday} in the given month and year (the current ones by default). + +Always returns {\tt TRUE}. + +\membersection{wxDateTime::GetLastWeekDay}\label{wxdatetimegetlastweekday} + +\func{wxDateTime}{GetLastWeekDay}{\param{WeekDay }{weekday}, \param{Month }{month = Inv\_Month}, \param{int }{year = Inv\_Year}} + +Returns the copy of this object to which +\helpref{SetToLastWeekDay}{wxdatetimesettolastweekday} was applied. + +\membersection{wxDateTime::SetToTheWeek}\label{wxdatetimesettotheweek} + +\func{bool}{SetToTheWeek}{\param{wxDateTime\_t }{numWeek}, \param{WeekDay }{weekday = Mon}} + +Set the date to the given {\it weekday} in the week with given number +{\it numWeek}. The number should be in range $1\ldots53$ and {\tt FALSE} will +be returned if the specified date doesn't exist. {\tt TRUE} is returned if the +date was changed successfully. + +\membersection{wxDateTime::GetWeek}\label{wxdatetimegetweek} + +\constfunc{wxDateTime}{GetWeek}{\param{wxDateTime\_t }{numWeek}, \param{WeekDay }{weekday = Mon}} + +Returns the copy of this object to which +\helpref{SetToTheWeek}{wxdatetimesettotheweek} was applied. + +\membersection{wxDateTime::SetToLastMonthDay}\label{wxdatetimesettolastmonthday} + +\func{wxDateTime\&}{SetToLastMonthDay}{\param{Month }{month = Inv\_Month}, \param{int }{year = Inv\_Year}} + +Sets the date to the last day in the specified month (the current one by +default). + +Returns the reference to the modified object itself. + +\membersection{wxDateTime::GetLastMonthDay}\label{wxdatetimegetlastmonthday} + +\constfunc{wxDateTime}{GetLastMonthDay}{\param{Month }{month = Inv\_Month}, \param{int }{year = Inv\_Year}} + +Returns the copy of this object to which +\helpref{SetToLastMonthDay}{wxdatetimesettolastmonthday} was applied. + +\membersection{wxDateTime::SetToYearDay}\label{wxdatetimesettoyearday} + +\func{wxDateTime\&}{SetToYearDay}{\param{wxDateTime\_t }{yday}} + +Sets the date to the day number {\it yday} in the same year (i.e., unlike the +other functions, this one does not use the current year). The day number +should be in the range $1\ldots366$ for the leap years and $1\ldots365$ for +the other ones. + +Returns the reference to the modified object itself. + +\membersection{wxDateTime::GetYearDay}\label{wxdatetimegetyearday} + +\constfunc{wxDateTime}{GetYearDay}{\param{wxDateTime\_t }{yday}} + +Returns the copy of this object to which +\helpref{SetToYearDay}{wxdatetimesettoyearday} was applied. + +%%%%%%%%%%%%%%%%%%%%%%%%%%% astronomical functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::GetJulianDayNumber}\label{wxdatetimegetjuliandaynumber} + +\constfunc{double}{GetJulianDayNumber}{\void} + +Returns the \helpref{JDN}{wxdatetimesetjdn} corresponding to this date. Beware +of rounding errors! + +\wxheading{See also} + +\helpref{GetModifiedJulianDayNumber}{wxdatetimegetmodifiedjuliandaynumber} + +\membersection{wxDateTime::GetJDN}\label{wxdatetimegetjdn} + +\constfunc{double}{GetJDN}{\void} + +Synonym for \helpref{GetJulianDayNumber}{wxdatetimegetjuliandaynumber}. + +\membersection{wxDateTime::GetModifiedJulianDayNumber}\label{wxdatetimegetmodifiedjuliandaynumber} + +\constfunc{double}{GetModifiedJulianDayNumber}{\void} + +Returns the {\it Modified Julian Day Number} (MJD) which is, by definition, +equal to $JDN - 2400000.5$. The MJDs are simpler to work with as the integral +MJDs correspond to midnights of the dates in the Gregorian calendar and not th +noons like JDN. The MJD $0$ is Nov 17, 1858. + +\membersection{wxDateTime::GetMJD}\label{wxdatetimegetmjd} + +\constfunc{double}{GetMJD}{\void} + +Synonym for \helpref{GetModifiedJulianDayNumber}{wxdatetimegetmodifiedjuliandaynumber}. + +\membersection{wxDateTime::GetRataDie}\label{wxdatetimegetratadie} + +\constfunc{double}{GetRataDie}{\void} + +Return the {\it Rata Die number} of this date. + +By definition, the Rata Die number is a date specified as the number of days +relative to a base date of December 31 of the year 0. Thus January 1 of the +year 1 is Rata Die day 1. + +%%%%%%%%%%%%%%%%%%%%%%%%%%% timezone and DST %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\membersection{wxDateTime::ToTimezone}\label{wxdatetimetotimezone} + +\constfunc{wxDateTime}{ToTimezone}{\param{const TimeZone\& }{tz}, \param{bool }{noDST = FALSE}} + +Transform the date to the given time zone. If {\it noDST} is {\tt TRUE}, no +DST adjustments will be made. + +Returns the date in the new time zone. + +\membersection{wxDateTime::MakeTimezone}\label{wxdatetimemaketimezone} + +\func{wxDateTime\&}{MakeTimezone}{\param{const TimeZone\& }{tz}, \param{bool }{noDST = FALSE}} + +Modifies the object in place to represent the date in another time zone. If +{\it noDST} is {\tt TRUE}, no DST adjustments will be made. + +\membersection{wxDateTime::ToGMT}\label{wxdatetimetogmt} + +\constfunc{wxDateTime}{ToGMT}{\param{bool }{noDST = FALSE}} + +This is the same as calling \helpref{ToTimezone}{wxdatetimetotimezone} with +the argument {\tt GMT0}. + +\membersection{wxDateTime::MakeGMT}\label{wxdatetimemakegmt} + +\func{wxDateTime\&}{MakeGMT}{\param{bool }{noDST = FALSE}} + +This is the same as calling \helpref{MakeTimezone}{wxdatetimemaketimezone} with +the argument {\tt GMT0}. + +\membersection{wxDateTime::IsDST}\label{wxdatetimeisdst} + +\constfunc{int}{IsDST}{\param{Country }{country = Country\_Default}} + +Returns {\tt TRUE} if the DST is applied for this date in the given country. + +\wxheading{See also} + +\helpref{GetBeginDST}{wxdatetimegetbegindst} and +\helpref{GetEndDST}{wxdatetimegetenddst} + +\section{\class{wxDateTimeHolidayAuthority}}\label{wxdatetimeholidayauthority} + +TODO + +\section{\class{wxDateTimeWorkDays}}\label{wxdatetimeworkdays} + +TODO + diff --git a/docs/latex/wx/db.tex b/docs/latex/wx/db.tex new file mode 100644 index 0000000000..83294fb63c --- /dev/null +++ b/docs/latex/wx/db.tex @@ -0,0 +1,1677 @@ +\section{\class{wxDb}}\label{wxdb} + +A wxDb instance is a connection to an ODBC data source which may +be opened, closed, and re-opened an unlimited number of times. A +database connection allows function to be performed directly on the +data source, as well as allowing access to any tables/views defined in +the data source to which the user has sufficient privileges. + +\wxheading{Include files} + + + +\wxheading{Helper classes and data structures} + +The following classes and structs are defined in db.cpp/.h for use with the wxDb class. + +\begin{itemize}\itemsep=0pt +\item \helpref{wxDbColFor}{wxdbcolfor} +\item \helpref{wxDbColInf}{wxdbcolinf} +\item \helpref{wxDbTableInf}{wxdbtableinf} +\item \helpref{wxDbInf}{wxdbinf} +\end{itemize} + +\wxheading{Constants} + +NOTE: In a future release, all ODBC class constants will be prefaced with 'wx' + +\begin{verbatim} + + wxDB_PATH_MAX Maximum path length allowed to be passed to the ODBC + driver to indicate where the data file is located. + + DB_MAX_COLUMN_NAME_LEN Maximum supported length for the name of a column + + DB_MAX_ERROR_HISTORY Maximum number of error messages retained in the + queue before being overwritten by new errors. + + DB_MAX_ERROR_MSG_LEN Maximum supported length of an error message returned + by the ODBC classes + + DB_MAX_STATEMENT_LEN Maximum supported length for a complete SQL statement + to be passed to the ODBC driver + + DB_MAX_TABLE_NAME_LEN Maximum supported length for the name of a table + + DB_MAX_WHERE_CLAUSE_LEN Maximum supported WHERE clause length that can be + passed to the ODBC driver + + DB_TYPE_NAME_LEN Maximum length of the name of a column's data type +\end{verbatim} + + +\wxheading{Enumerated types} + +\docparam{enum {\bf wxDbSqlLogState}}{sqlLogOFF, sqlLogON} + +{\it enum {\bf wxDBMS}} + +These are the databases currently tested and working with the ODBC classes. A call to \helpref{wxDb::Dbms}{wxdbdbms} will return one of these enumerated values listed below. + +\begin{verbatim} + dbmsUNIDENTIFIED, + dbmsORACLE, + dbmsSYBASE_ASA, // Adaptive Server Anywhere + dbmsSYBASE_ASE, // Adaptive Server Enterprise + dbmsMS_SQL_SERVER, + dbmsMY_SQL, + dbmsPOSTGRES, + dbmsACCESS, + dbmsDBASE, + dbmsINFORMIX +\end{verbatim} + +See the remarks in \helpref{wxDb::Dbms}{wxdbdbms} for exceptions/issues with each of these database engines. + +\wxheading{Public member variables} + +\docparam{SWORD {\bf wxDb::cbErrorMsg}}{This member variable is populated as a result of calling \helpref{wxDb::GetNextError}{wxdbgetnexterror}. Contains the count of bytes in the wxDb::errorMsg string.} + +\docparam{int {\bf wxDb::DB\_STATUS}}{The last ODBC error that occurred on this data connection. Possible codes are:} + +\begin{verbatim} + DB_ERR_GENERAL_WARNING // SqlState = '01000' + DB_ERR_DISCONNECT_ERROR // SqlState = '01002' + DB_ERR_DATA_TRUNCATED // SqlState = '01004' + DB_ERR_PRIV_NOT_REVOKED // SqlState = '01006' + DB_ERR_INVALID_CONN_STR_ATTR // SqlState = '01S00' + DB_ERR_ERROR_IN_ROW // SqlState = '01S01' + DB_ERR_OPTION_VALUE_CHANGED // SqlState = '01S02' + DB_ERR_NO_ROWS_UPD_OR_DEL // SqlState = '01S03' + DB_ERR_MULTI_ROWS_UPD_OR_DEL // SqlState = '01S04' + DB_ERR_WRONG_NO_OF_PARAMS // SqlState = '07001' + DB_ERR_DATA_TYPE_ATTR_VIOL // SqlState = '07006' + DB_ERR_UNABLE_TO_CONNECT // SqlState = '08001' + DB_ERR_CONNECTION_IN_USE // SqlState = '08002' + DB_ERR_CONNECTION_NOT_OPEN // SqlState = '08003' + DB_ERR_REJECTED_CONNECTION // SqlState = '08004' + DB_ERR_CONN_FAIL_IN_TRANS // SqlState = '08007' + DB_ERR_COMM_LINK_FAILURE // SqlState = '08S01' + DB_ERR_INSERT_VALUE_LIST_MISMATCH // SqlState = '21S01' + DB_ERR_DERIVED_TABLE_MISMATCH // SqlState = '21S02' + DB_ERR_STRING_RIGHT_TRUNC // SqlState = '22001' + DB_ERR_NUMERIC_VALUE_OUT_OF_RNG // SqlState = '22003' + DB_ERR_ERROR_IN_ASSIGNMENT // SqlState = '22005' + DB_ERR_DATETIME_FLD_OVERFLOW // SqlState = '22008' + DB_ERR_DIVIDE_BY_ZERO // SqlState = '22012' + DB_ERR_STR_DATA_LENGTH_MISMATCH // SqlState = '22026' + DB_ERR_INTEGRITY_CONSTRAINT_VIOL // SqlState = '23000' + DB_ERR_INVALID_CURSOR_STATE // SqlState = '24000' + DB_ERR_INVALID_TRANS_STATE // SqlState = '25000' + DB_ERR_INVALID_AUTH_SPEC // SqlState = '28000' + DB_ERR_INVALID_CURSOR_NAME // SqlState = '34000' + DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL // SqlState = '37000' + DB_ERR_DUPLICATE_CURSOR_NAME // SqlState = '3C000' + DB_ERR_SERIALIZATION_FAILURE // SqlState = '40001' + DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2 // SqlState = '42000' + DB_ERR_OPERATION_ABORTED // SqlState = '70100' + DB_ERR_UNSUPPORTED_FUNCTION // SqlState = 'IM001' + DB_ERR_NO_DATA_SOURCE // SqlState = 'IM002' + DB_ERR_DRIVER_LOAD_ERROR // SqlState = 'IM003' + DB_ERR_SQLALLOCENV_FAILED // SqlState = 'IM004' + DB_ERR_SQLALLOCCONNECT_FAILED // SqlState = 'IM005' + DB_ERR_SQLSETCONNECTOPTION_FAILED // SqlState = 'IM006' + DB_ERR_NO_DATA_SOURCE_DLG_PROHIB // SqlState = 'IM007' + DB_ERR_DIALOG_FAILED // SqlState = 'IM008' + DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL // SqlState = 'IM009' + DB_ERR_DATA_SOURCE_NAME_TOO_LONG // SqlState = 'IM010' + DB_ERR_DRIVER_NAME_TOO_LONG // SqlState = 'IM011' + DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR // SqlState = 'IM012' + DB_ERR_TRACE_FILE_ERROR // SqlState = 'IM013' + DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS // SqlState = 'S0001' + DB_ERR_TABLE_NOT_FOUND // SqlState = 'S0002' + DB_ERR_INDEX_ALREADY_EXISTS // SqlState = 'S0011' + DB_ERR_INDEX_NOT_FOUND // SqlState = 'S0012' + DB_ERR_COLUMN_ALREADY_EXISTS // SqlState = 'S0021' + DB_ERR_COLUMN_NOT_FOUND // SqlState = 'S0022' + DB_ERR_NO_DEFAULT_FOR_COLUMN // SqlState = 'S0023' + DB_ERR_GENERAL_ERROR // SqlState = 'S1000' + DB_ERR_MEMORY_ALLOCATION_FAILURE // SqlState = 'S1001' + DB_ERR_INVALID_COLUMN_NUMBER // SqlState = 'S1002' + DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE // SqlState = 'S1003' + DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE // SqlState = 'S1004' + DB_ERR_OPERATION_CANCELLED // SqlState = 'S1008' + DB_ERR_INVALID_ARGUMENT_VALUE // SqlState = 'S1009' + DB_ERR_FUNCTION_SEQUENCE_ERROR // SqlState = 'S1010' + DB_ERR_OPERATION_INVALID_AT_THIS_TIME // SqlState = 'S1011' + DB_ERR_INVALID_TRANS_OPERATION_CODE // SqlState = 'S1012' + DB_ERR_NO_CURSOR_NAME_AVAIL // SqlState = 'S1015' + DB_ERR_INVALID_STR_OR_BUF_LEN // SqlState = 'S1090' + DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE // SqlState = 'S1091' + DB_ERR_OPTION_TYPE_OUT_OF_RANGE // SqlState = 'S1092' + DB_ERR_INVALID_PARAM_NO // SqlState = 'S1093' + DB_ERR_INVALID_SCALE_VALUE // SqlState = 'S1094' + DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE // SqlState = 'S1095' + DB_ERR_INF_TYPE_OUT_OF_RANGE // SqlState = 'S1096' + DB_ERR_COLUMN_TYPE_OUT_OF_RANGE // SqlState = 'S1097' + DB_ERR_SCOPE_TYPE_OUT_OF_RANGE // SqlState = 'S1098' + DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE // SqlState = 'S1099' + DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE // SqlState = 'S1100' + DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE // SqlState = 'S1101' + DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE // SqlState = 'S1103' + DB_ERR_INVALID_PRECISION_VALUE // SqlState = 'S1104' + DB_ERR_INVALID_PARAM_TYPE // SqlState = 'S1105' + DB_ERR_FETCH_TYPE_OUT_OF_RANGE // SqlState = 'S1106' + DB_ERR_ROW_VALUE_OUT_OF_RANGE // SqlState = 'S1107' + DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE // SqlState = 'S1108' + DB_ERR_INVALID_CURSOR_POSITION // SqlState = 'S1109' + DB_ERR_INVALID_DRIVER_COMPLETION // SqlState = 'S1110' + DB_ERR_INVALID_BOOKMARK_VALUE // SqlState = 'S1111' + DB_ERR_DRIVER_NOT_CAPABLE // SqlState = 'S1C00' + DB_ERR_TIMEOUT_EXPIRED // SqlState = 'S1T00' +\end{verbatim} + +\docparam{struct {\bf wxDb::dbInf}}{This structure is internal to the wxDb class and contains details of the ODBC datasource that the current instance of the wxDb is connected to in its members. When the data source is opened, all of the information contained in the dbInf structure is queried from the data source. This information is used almost exclusively within the ODBC class library. Where there is a need for this information outside of the class library a member function such as wxDbTable::IsCursorClosedOnCommit() has been added for ease of use.} + +\begin{verbatim} + char dbmsName[40] - Name of the dbms product + char dbmsVer[64] - Version # of the dbms product + char driverName[40] - Driver name + char odbcVer[60] - ODBC version of the driver + char drvMgrOdbcVer[60] - ODBC version of the driver manager + char driverVer[60] - Driver version + char serverName[80] - Server Name, typically a connect string + char databaseName[128] - Database filename + char outerJoins[2] - Does datasource support outer joins + char procedureSupport[2] - Does datasource support stored procedures + UWORD maxConnections - Maximum # of connections datasource supports + UWORD maxStmts - Maximum # of HSTMTs per HDBC + UWORD apiConfLvl - ODBC API conformance level + UWORD cliConfLvl - Is datasource SAG compliant + UWORD sqlConfLvl - SQL conformance level + UWORD cursorCommitBehavior - How cursors are affected on db commit + UWORD cursorRollbackBehavior - How cursors are affected on db rollback + UWORD supportNotNullClause - Does datasource support NOT NULL clause + char supportIEF[2] - Integrity Enhancement Facility (Ref. Integrity) + UDWORD txnIsolation - Transaction isolation level supported by driver + UDWORD txnIsolationOptions - Transaction isolation level options available + UDWORD fetchDirections - Fetch directions supported + UDWORD lockTypes - Lock types supported in SQLSetPos + UDWORD posOperations - Position operations supported in SQLSetPos + UDWORD posStmts - Position statements supported + UDWORD scrollConcurrency - Scrollable cursor concurrency options supported + UDWORD scrollOptions - Scrollable cursor options supported + UDWORD staticSensitivity - Can additions/deletions/updates be detected + UWORD txnCapable - Indicates if datasource supports transactions + UDWORD loginTimeout - Number seconds to wait for a login request +\end{verbatim} + +\docparam{char {\bf wxDb::errorList}[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]}{The last n ODBC errors that have occurred on this database connection.} + +\docparam{char {\bf wxDb::errorMsg}[SQL_MAX_MESSAGE_LENGTH]}{This member variable is populated as a result of calling \helpref{wxDb::GetNextError}{wxdbgetnexterror}. It contains the ODBC error message text.} + +\docparam{SDWORD {\bf wxDb::nativeError}}{Set by wxDb::DispAllErrors, wxDb::GetNextError, and wxDb::DispNextError. It contains the datasource-specific error code returned by the datasource to the ODBC driver. Used for reporting ODBC errors.} + +\docparam{wxChar {\bf wxDb::sqlState}[20]}{Set by wxDb::TranslateSqlState(). Indicates the error state after a failed ODBC operation. Used for reporting ODBC errors.} + +\wxheading{Remarks} + +Default cursor scrolling is defined by wxODBC_FWD_ONLY_CURSORS in setup.h +when the wxWindows library is built. This behavior can be overridden when +an instance of a wxDb is created (see \helpref{wxDb constructor}{wxdbconstr}). + +\wxheading{See also} + +\helpref{wxDbColFor}{wxdbcolfor}, \helpref{wxDbColInf}{wxdbcolinf}, \helpref{wxDbTable}{wxdbtable}, \helpref{wxDbTableInf}{wxdbtableinf}, \helpref{wxDbInf}{wxdbinf} + +\subsection{Associated non-class functions}\label{wxdbfunctions} + +The following functions are used in conjunction with the wxDb class. + +\func{wxDb *}{wxDbGetConnection}{\param{wxDbConnectInf *}{pDbConfig}, \param{bool }{FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS}} + +\func{bool}{wxDbFreeConnection}{\param{wxDb *}{pDb}} + +\func{void}{wxDbCloseConnections}{\void} + +\func{int}{wxDbConnectionsInUse}{\void} + +\func{bool}{wxDbSqlLog}{\param{wxDbSqlLogState }{state}, \param{const wxChar *}{filename = SQL_LOG_FILENAME}} + +\func{bool}{wxDbGetDataSource}{\param{HENV }{henv}, \param{char *}{Dsn}, \param{SWORD }{DsnMax}, \param{char *}{DsDesc}, \param{SWORD }{DsDescMax}, \param{UWORD }{direction = SQL_FETCH_NEXT}} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxDb::wxDb}\label{wxdbconstr} + +\func{}{wxDb}{\void} + +Default constructor. + +\func{}{wxDb}{\param{HENV\& }{aHenv}, \param{bool }{FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS}} + +Constructor, used to create an ODBC connection to a data source. + +\wxheading{Parameters} + +\docparam{aHenv}{Environment handle used for this connection.} + +\docparam{FwdOnlyCursors}{Will cursors created for use with this datasource connection only allow forward scrolling cursors.} + +\wxheading{Remarks} + +This is the constructor for the wxDb class. The wxDb object must +be created and opened before any database activity can occur. + +\wxheading{Example} + +\begin{verbatim} + wxDbConnectInf ConnectInf; + ....Set values for member variables of ConnectInf here + + wxDb sampleDB(ConnectInf.Henv); + if (!sampleDB.Open(ConnectInf.Dsn, ConnectInf.Uid, ConnectInf.AuthStr)) + { + // Error opening data source + } +\end{verbatim} + + +\membersection{wxDb::Catalog}\label{wxdbcatalog} + +\func{bool}{Catalog}{\param{char *}{ userID}, \param{char *}{fileName = SQL_CATALOG_FILENAME}} + +Allows a data "dictionary" of the data source to be created, dumping pertinent information about all data tables to which the user specified in userID has access. + +\wxheading{Parameters} + +\docparam{userID}{Database user name to use in accessing the database. All tables to which this user has rights will be evaluated in the catalog.} + +\docparam{fileName}{OPTIONAL argument. Name of the text file to create and write the DB catalog to.} + +\wxheading{Return value} + +Returns TRUE if the catalog request was successful, of FALSE if there was some reason the catalog could not be generated + +\wxheading{Example} + +\begin{verbatim} +============== ============== ================ ========= ======= +TABLE NAME COLUMN NAME DATA TYPE PRECISION LENGTH +============== ============== ================ ========= ======= +EMPLOYEE RECID (0008)NUMBER 15 8 +EMPLOYEE USER_ID (0012)VARCHAR2 13 13 +EMPLOYEE FULL_NAME (0012)VARCHAR2 26 26 +EMPLOYEE PASSWORD (0012)VARCHAR2 26 26 +EMPLOYEE START_DATE (0011)DATE 19 16 +\end{verbatim} + + +\membersection{wxDb::Close}\label{wxdbclose} + +\func{void}{Close}{\void} + +Closes the database connection. + +\wxheading{Remarks} + +At the end of your program, when you have finished all of your database work, you must close the ODBC connection to the data source. There are actually four steps involved in doing this as illustrated in the example. + +Any wxDbTable instances which use this connection must be deleted before closing the database connection. + +\wxheading{Example} + +\begin{verbatim} + // Commit any open transactions on the data source + sampleDB.CommitTrans(); + + // Delete any remaining wxDbTable objects allocated with new + delete parts; + + // Close the wxDb connection when finished with it + sampleDB.Close(); + + // Free Environment Handle that ODBC uses + if (SQLFreeEnv(Db.Henv) != SQL_SUCCESS) + { + // Error freeing environment handle + } +\end{verbatim} + + +\membersection{wxDb::CommitTrans}\label{wxdbcommittrans} + +\func{bool}{CommitTrans}{\void} + +Permanently "commits" changes (insertions/deletions/updates) to the database. + +\wxheading{Return value} + +Returns TRUE if the commit was successful, or FALSE if the commit failed. + +\wxheading{Remarks} + +Transactions begin implicitly as soon as you make a change to the database. At any time thereafter, you can save your work to the database ("Commit") or roll back all of your changes ("Rollback"). Calling this member function commits all open transactions on this ODBC connection. + +\wxheading{Special Note : {\it Cursors} } + +\normalbox{It is important to understand that different database/ODBC driver combinations handle +transactions differently. One thing in particular that you must pay attention to is +cursors, in regard to transactions. Cursors are what allow you to scroll through +records forward and backward and to manipulate records as you scroll through them. +When you issue a query, a cursor is created behind the scenes. The cursor keeps track +of the query and keeps track of the current record pointer. After you commit or +rollback a transaction, the cursor may be closed automatically. This means you must +requery the data source before you can perform any additional work against the wxDbTable +object. This is only necessary however if the data source closes the cursor after a +commit or rollback. Use the wxDbTable::IsCursorClosedOnCommit() member function to +determine the data source's transaction behavior. Note, it would be very inefficient +to just assume the data source closes the cursor and always requery. This could put +a significant, unnecessary load on data sources that leave the cursors open after a +transaction.} + + +\membersection{wxDb::CreateView}\label{wxdbcreateviews} + +\func{bool}{CreateView}{\param{char *}{ viewName}, \param{char *}{ colList}, \param{char *}{pSqlStmt}} + +Creates a SQL VIEW. + +\wxheading{Parameters} + +\docparam{viewName}{The name of the view. e.g. PARTS_V} + +\docparam{colList}{{\it OPTIONAL} Pass in a comma delimited list of column names if you wish to explicitly name each column in the result set. If not desired, pass in an empty string.} + +\docparam{pSqlStmt}{Pointer to the select statement portion of the CREATE VIEW statement. Must be a complete, valid SQL SELECT statement.} + +\wxheading{Remarks} + +A 'view' is a logical table that derives columns from one or more other tables or views. Once the view is created, it can be queried exactly like any other table in the database. + +NOTE: Views are not available with all datasources. Oracle is one example of a datasouce which does support views. + +\wxheading{Example} + +\begin{verbatim} + // Incomplete code sample + db.CreateView("PARTS_SD1", "PN, PD, QTY", + "SELECT PART_NO, PART_DESC, QTY_ON_HAND * 1.1 FROM PARTS \ + WHERE STORAGE_DEVICE = 1"); + + // PARTS_SD1 can now be queried just as if it were a data table. + // e.g. SELECT PN, PD, QTY FROM PARTS_SD1 +\end{verbatim} + + +\membersection{wxDb::DispAllErrors}\label{wxdbdispallerrors} + +\func{bool}{DispAllErrors}{\param{HENV}{ aHenv}, {\param}{HDBC}{ aHdbc = SQL_NULL_HDBC}, {\param}{HSTMT}{ aHstmt = SQL_NULL_HSTMT}} + +Logs all database errors that occurred as a result of the last executed database command. This logging also includes debug logging when compiled in debug mode via \helpref{wxLogDebug}{wxlogdebug}. If logging is turned on via \helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging}, then an entry is also logged to the defined log file. + +\wxheading{Parameters} + +\docparam{aHenv}{A handle to the ODBC environment.} + +\docparam{aHdbc}{A handle to the ODBC connection. Pass this in if the ODBC function call that erred out required a hdbc or hstmt argument.} + +\docparam{AHstmt}{A handle to the ODBC statement being executed against. Pass this in if the ODBC function call that erred out required a hstmt argument.} + +\wxheading{Remarks} + +This member function will display all of the ODBC error messages for the last ODBC function call that was made. Normally used internally within the ODBC class library. Would be used externally if calling ODBC functions directly (i.e. SQLFreeEnv()). + +\wxheading{See also} + +\helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging}, wxDbSqlLog + +\wxheading{Example} + +\begin{verbatim} + if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS) + // Display all ODBC errors for this stmt + return(db.DispAllErrors(db.henv, db.hdbc, hstmt)); +\end{verbatim} + + +\membersection{wxDb::DispNextError}\label{wxdbdispnexterror} + +\func{void}{DispNextError}{\void} + +\wxheading{Remarks} + +This function is normally used internally within the ODBC class library. +It could be used externally if calling ODBC functions directly. This +function works in conjunction with \helpref{wxDb::GetNextError}{wxdbgetnexterror} when errors (or +sometimes informational messages) returned from ODBC need to be analyzed +rather than simply displaying them as an error. GetNextError() retrieves +the next ODBC error from the ODBC error queue. The wxDb member variables +"sqlState", "nativeError" and "errorMsg" could then be evaluated. To +display the error retrieved, DispNextError() could then be called. +The combination of GetNextError() and DispNextError() can be used to +iteratively step through the errors returned from ODBC evaluating each +one in context and displaying the ones you choose. + +\wxheading{Example} + +\begin{verbatim} + // Drop the table before attempting to create it + sprintf(sqlStmt, "DROP TABLE %s", tableName); + // Execute the drop table statement + if (SQLExecDirect(hstmt,(UCHAR FAR *)sqlStmt,SQL_NTS) != SQL_SUCCESS) + { + // Check for sqlState = S0002, "Table or view not found". + // Ignore this error, bomb out on any other error. + pDb->GetNextError(henv, hdbc, hstmt); + if (strcmp(pDb->sqlState, "S0002")) + { + pDb->DispNextError(); // Displayed error retrieved + pDb->DispAllErrors(henv, hdbc, hstmt); // Display all other errors, if any + pDb->RollbackTrans(); // Rollback the transaction + CloseCursor(); // Close the cursor + return(FALSE); // Return Failure + } + } +\end{verbatim} + + +\membersection{wxDb::DropView}\label{wxdbdropview} + +\func{bool}{DropView}{\param{const char *}{viewName}} + +Drops the data table view named in 'viewName'. + +\wxheading{Parameters} + +\docparam{viewName}{Name of the view to be dropped.} + +\wxheading{Remarks} + +If the view does not exist, this function will return TRUE. Note that views are not supported with all data sources. + +\membersection{wxDb::ExecSql}\label{wxdbexecsql} + +\func{bool}{ExecSql}{\param{char *}{pSqlStmt}} + +Allows a native SQL command to be executed directly against the datasource. In addition to being able to run any standard SQL command, use of this function allows a user to (potentially) utilize features specific to the datasource they are connected to that may not be available through ODBC. The ODBC driver will pass the specified command directly to the datasource. + +\wxheading{Parameters} + +\docparam{pSqlStmt}{Pointer to the SQL statement to be executed.} + +\wxheading{Remarks} + +This member extends the wxDb class and allows you to build and execute ANY VALID +SQL statement against the data source. This allows you to extend the class +library by being able to issue any SQL statement that the data source is capable +of processing. + +\wxheading{See also} + +\helpref{wxDb::GetData}{wxdbgetdata}, \helpref{wxDb::GetNext}{wxdbgetnext} + +\membersection{wxDb::FwdOnlyCursors}\label{wxdbfwdonlycursors} + +\func{bool}{FwdOnlyCursors}{\void} + +Indicates whether this connection to the datasource only allows forward scrolling cursors or not. This state is set at connection creation time. + +\wxheading{Remarks} + +In wxWindows v2.4 release, this function will be deprecated to use a renamed version of the function called wxDb::IsFwdOnlyCursors() to match the normal wxWindows naming conventions for class member functions. + +\wxheading{See also} + +\helpref{wxDb::IsFwdOnlyCursors}{wxdbisfwdonlycursors}, \helpref{wxDb::wxDb}{wxdbconstr}, \helpref{wxDbGetConnection}{wxdbfunctions} + +\membersection{wxDb::GetCatalog}\label{wxdbgetcatalog} + +\func{wxDbInf *}{GetCatalog}{\param{char *}{userID}} + +Returns a wxDbInf pointer that points to the catalog(data source) name, schema, number of tables accessible to the current user, and a wxDbTableInf pointer to all data pertaining to all tables in the users catalog. + +\wxheading{Parameters} + +\docparam{userID}{Owner of the table. Specify a userID when the datasource you are connected to allows multiple unique tables with the same name to be owned by different users. {\it userID} is evaluated as follows:} + +\begin{verbatim} + userID == NULL ... UserID is ignored (DEFAULT) + userID == "" ... UserID set equal to 'this->uid' + userID != "" ... UserID set equal to 'userID' +\end{verbatim} + +\wxheading{Remarks} + +The returned catalog will only contain catalog entries for tables to which the user specified in 'userID' has sufficient privileges. If no user is specified (NULL passed in), a catalog pertaining to all tables in the datasource accessible via this connection will be returned. + +\membersection{wxDb::GetColumnCount}\label{wxdbgetcolumncount} + +\func{int}{GetColumnCount}{\param{char *}{tableName}, \param{const char *}{userID}} + +\wxheading{Parameters} + +\docparam{tableName}{A table name you wish to obtain column information about.} + +\docparam{userID}{Name of the user that owns the table(s). Required for some datasources for situations where there may be multiple tables with the same name in the datasource, but owned by different users. {\it userID} is evaluated in the following manner:} + +\begin{verbatim} + userID == NULL ... UserID is ignored (DEFAULT) + userID == "" ... UserID set equal to 'this->uid' + userID != "" ... UserID set equal to 'userID' +\end{verbatim} + +\wxheading{Return value} + +Returns a count of how many columns are in the specified table. If an error occurs retrieving the number of columns the function will return a -1. + +\membersection{wxDb::GetColumns}\label{wxdbgetcolumns} + +\func{wxDbColInf *}{GetColumns}{\param{char *}{tableName}, \param{int *}{numCols}, \param{const char *}{userID=NULL}} + +\func{wxDbColInf *}{GetColumns}{\param{char *}{tableName[]}, \param{const char *}{userID}} + +\wxheading{Parameters} + +\docparam{tableName}{A table name you wish to obtain column information about.} +\docparam{numCols}{A pointer to a integer which will hold a count of the number of columns returned by this function} +\docparam{tableName[]}{An array of pointers to table names you wish to obtain column information about. The last element of this array must be a NULL string.} +\docparam{userID}{Name of the user that owns the table(s). Required for some datasources for situations where there may be multiple tables with the same name in the datasource, but owned by different users. {\it userID} is evaluated in the following manner:} + +\begin{verbatim} + userID == NULL ... UserID is ignored (DEFAULT) + userID == "" ... UserID set equal to 'this->uid' + userID != "" ... UserID set equal to 'userID' +\end{verbatim} + +\wxheading{Return value} + +This function returns an array of wxDbColInf structures. This allows you to obtain +information regarding the columns of your table(s). If no columns were found, or +an error occurred, this pointer will be zero (null). + +THE CALLING FUNCTION IS RESPONSIBLE FOR DELETING THE {\it wxDbColInf} MEMORY WHEN IT IS +FINISHED WITH IT. + +\normalbox{ALL column bindings associated with this wxDb instance are unbound +by this function. This function should use its own wxDb instance +to avoid undesired unbinding of columns.} + +\wxheading{See also} + +\helpref{wxDbColInf}{wxdbcolinf} + +\wxheading{Example} + +\begin{verbatim} + char *tableList[] = {"PARTS", 0}; + wxDbColInf *colInf = pDb->GetColumns(tableList); + if (colInf) + { + // Use the column inf + ....... + // Destroy the memory + delete [] colInf; + } +\end{verbatim} + + +\membersection{wxDb::GetData}\label{wxdbgetdata} + +\func{bool}{GetData}{\param{UWORD}{ colNo}, \param{SWORD}{ cType}, \param{PTR}{ pData}, \param{SDWORD}{ maxLen}, \param{SDWORD FAR *}{ cbReturned} } + +Used to retrieve result set data without binding column values to memory variables (i.e. not using a wxDbTable instance to access table data). + +\wxheading{Parameters} + +\docparam{colNo}{Ordinal number of column in the result set to be returned.} +\docparam{cType}{The C data type that is to be returned.} +\docparam{pData}{Memory buffer which will hold the data returned by the call to this function.} +\docparam{maxLen}{Maximum size of the buffer that will hold the returned value.} +\docparam{cbReturned}{Pointer to the buffer containing the length of the actual data returned. If this value comes back as SQL_NULL_DATA, then the GetData() call has failed.} + +\wxheading{See also} + +\helpref{wxDb::GetNext}{wxdbgetnext}, \helpref{wxDb::ExecSql}{wxdbexecsql} + +\wxheading{Example} + +\begin{verbatim} + SDWORD cb; + ULONG reqQty; + wxString sqlStmt; + sqlStmt = "SELECT SUM(REQUIRED_QTY - PICKED_QTY) FROM ORDER_TABLE WHERE \ + PART_RECID = 1450 AND REQUIRED_QTY > PICKED_QTY"; + + // Perform the query + if (!pDb->ExecSql(sqlStmt.c_str())) + { + // ERROR + return(0); + } + + // Request the first row of the result set + if (!pDb->GetNext()) + { + // ERROR + return(0); + } + + Read column #1 of this row of the result set and store the value in 'reqQty' + if (!pDb->GetData(1, SQL_C_ULONG, &reqQty, 0, &cb)) + { + // ERROR + return(0); + } + + // Check for a NULL result + if (cb == SQL_NULL_DATA) + return(0); +\end{verbatim} + +\wxheading{Remarks} + +When requesting multiple columns to be returned from the result set (for example, the SQL query +requested 3 columns be returned), the calls to GetData must request the columns in ordinal +sequence (1,2,3 or 1,3 or 2,3). + +\membersection{wxDb::GetDatabaseName}\label{wxdbgetdatabasename} + +\func{char *}{GetDatabaseName}{\void} + +Returns the name of the database engine. + +\membersection{wxDb::GetDataSource}\label{wxdbgetdatasource} + +\func{char *}{GetDataSource}{\void} + +Returns the ODBC datasource name. + +\membersection{wxDb::GetHDBC}\label{wxdbgethdbc} + +\func{HDBC}{GetHDBC}{\void} + +Returns the ODBC handle to the database connection. + +\membersection{wxDb::GetHENV}\label{wxdbgethenv} + +\func{HENV}{GetHENV}{\void} + +Returns the ODBC environment handle. + +\membersection{wxDb::GetHSTMT}\label{wxdbgethstmt} + +\func{HSTMT}{GetHSTMT}{\void} + +Returns the ODBC statement handle associated with this database connection. + +\membersection{wxDb::GetKeyFields}\label{wxdbgetkeyfields} + +\func{int}{GetKeyFields}{\param{char *}{tableName}, \param{wxDbColInf *}{colInf}, \param{int}{nocols}} + +Used to determine which columns are members of primary or non-primary indexes on the specified table. If a column is a member of a foreign key for some other table, that information is detected also. + +This function is primarily for use by the \helpref{wxDb::GetColumns}{wxdbgetcolumns} function, but may be called if desired from the client application. + +\wxheading{Parameters} + +\docparam{tableName}{Name of the table for which the columns will be evaluated as to their inclusion in any indexes.} +\docparam{colInf}{Data structure containing the column definitions (obtained with \helpref{wxDb::GetColumns}{wxdbgetcolumns}). This function populates the PkCol, PkTableName, and FkTableName members of the colInf structure.} +\docparam{nocols}{Number of columns defined in the instance of colInf.} + +\wxheading{Return value} + +Currently always returns TRUE. + +\wxheading{See also} + +\helpref{wxDbColInf}{wxdbcolinf}, \helpref{wxDb::GetColumns}{wxdbgetcolumns} + +\membersection{wxDb::GetNext}\label{wxdbgetnext} + +\func{bool}{GetNext}{\void} + +Requests the next row in the result set obtained by issueing a query through a direct request using wxDb::ExecSql(). + +\wxheading{See also} + +\helpref{wxDb::ExecSql}{wxdbexecsql}, \helpref{wxDb::GetData}{wxdbgetdata} + +\membersection{wxDb::GetNextError}\label{wxdbgetnexterror} + +\func{bool}{GetNextError}{\param{HENV}{ aHenv}, \param{HDBC}{ aHdbc = SQL_NULL_HDBC}, \param{HSTMT}{ aHstmt = SQL_NULL_HSTMT}} + +\wxheading{Parameters} + +\docparam{aHenv}{A handle to the ODBC environment.} +\docparam{aHdbc}{A handle to the ODBC connection. Pass this in if the ODBC function call that +erred out required a hdbc or hstmt argument.} +\docparam{AHstmt}{A handle to the ODBC statement being executed against. Pass this in if the +ODBC function call that erred out requires a hstmt argument.} + +\wxheading{See also} + +\helpref{wxDb::DispNextError}{wxdbdispnexterror}, \helpref{wxDb::DispAllErrors}{wxdbdispallerrors} + +\wxheading{Example} + +\begin{verbatim} + if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS) + { + // Display all ODBC errors for this stmt + return(db.DispAllErrors(db.henv, db.hdbc, hstmt)); + } +\end{verbatim} + +\membersection{wxDb::GetPassword}\label{wxdbgetpassword} + +\func{char *}{GetPassword}{\void} + +Returns the password used to connect to the datasource. + +\membersection{wxDb::GetTableCount}\label{wxdbgettablecount} + +\func{int}{GetTableCount}{\void} + +Returns the number of wxDbTable() instances currently using this data source connection. + +\membersection{wxDb::GetUsername}\label{wxdbgetusername} + +\func{char *}{GetUsername}{\void} + +Returns the user name used to access the datasource. + +\membersection{wxDb::Grant}\label{wxdbgrant} + +\func{bool}{Grant}{\param{int}{ privileges}, \param{char *}{tableName}, \param{char *}{userList = "PUBLIC"}} + +Use this member function to GRANT privileges to users for accessing tables in the datasource. + +\wxheading{Parameters} + +\docparam{privileges}{Use this argument to select which privileges you want to grant. Pass DB_GRANT_ALL to grant all privileges. To grant individual privileges pass one or more of the following OR'd together:} +\begin{verbatim} + DB_GRANT_SELECT = 1 + DB_GRANT_INSERT = 2 + DB_GRANT_UPDATE = 4 + DB_GRANT_DELETE = 8 + DB_GRANT_ALL = DB_GRANT_SELECT | DB_GRANT_INSERT | + DB_GRANT_UPDATE | DB_GRANT_DELETE +\end{verbatim} +\docparam{tableName}{The name of the table you wish to grant privileges on.} +\docparam{userList}{A comma delimited list of users to grant the privileges to. If this argument is not passed in, the privileges will be given to the general PUBLIC.} + +\wxheading{Remarks} + +Some databases require user names to be specified in all capital letters (i.e. Oracle). This function does not automatically capitalize the user names passed in the comma-separated list. This is the responsibility of the calling routine. + +\wxheading{Example} + +\begin{verbatim} + db.Grant(DB_GRANT_SELECT | DB_GRANT_INSERT, "PARTS", "mary, sue"); +\end{verbatim} + + +\membersection{wxDb::IsFwdOnlyCursors}\label{wxdbisfwdonlycursors} + +\func{bool}{IsFwdOnlyCursors}{\void} + +Indicates whether this connection to the datasource only allows forward scrolling cursors or not. This state is set at connection creation time. + +\wxheading{Remarks} + +Added as of wxWindows v2.4 release, this function is a renamed version of wxDb::FwdOnlyCursors() to match the normal wxWindows naming conventions for class member functions. + +This function is not available in versions prior to v2.4. You should use \helpref{wxDb::FwdOnlyCursors}{wxdbfwdonlycursors} for wxWindows versions priori to 2.4. + +\wxheading{See also} + +\helpref{wxDb::wxDb}{wxdbconstr}, \helpref{wxDbGetConnection}{wxdbfunctions} + +\membersection{wxDb::IsOpen}\label{wxdbisopen} + +\func{bool}{IsOpen}{\void} + +Indicates whether the database connection to the datasource is currently opened. + +\membersection{wxDb::Open}\label{wxdbopen} + +\func{bool}{Open}{\param{char *}{Dsn}, \param{char *}{Uid}, \param{char *}{AuthStr}} + +\wxheading{Parameters} + +\docparam{Dsn}{Data source name. The name of the ODBC data source as +assigned when the data source is initially set up through the ODBC data +source manager.} +\docparam{Uid}{User ID. The name (ID) of the user you wish to connect as +to the data source. The user name (ID) determines what objects you +have access to in the datasource and what datasource privileges you have. +Privileges include being able to create new objects, update objects, delete +objects and so on. Users and privileges are normally administered by the +database administrator.} +\docparam{AuthStr}{The password associated witht the Uid.} + +\wxheading{Remarks} + +After a wxDb instance is created, it must then be opened. When opening a data source, there must be hree pieces of information passed. The data source name, user name (ID) and the password for the user. No database activity on the data source can be performed until it is opened. This would normally be done at program startup and the data source would remain open for the duration of the program run. Note: It is possible to have multiple data sources open at the same time to support distributed database connections. + +\wxheading{Example} + +\begin{verbatim} + wxDb sampleDB(Db.Henv); + if (!sampleDB.Open("Oracle 7.1 HP/UX", "gtasker", "myPassword")) + { + // Error opening data source + } +\end{verbatim} + + +\membersection{wxDb::RollbackTrans}\label{wxdbrollbacktrans} + +\func{bool}{RollbackTrans}{\void} + +Function to "rollback" changes made to the database. After an insert/update/delete, the operation may be "undone" by issuing this command any time before a \helpref{wxDb::CommitTrans}{wxdbcommittrans} is called on the database connection. + +\wxheading{Remarks} + +Transactions begin implicitly as soon as you make a change to the database. At any time thereafter, you can save your work to the database (using \helpref{wxDb::CommitTrans}{wxdbcommittrans}) or undo all of your changes using this function. + +\normalbox{Calling this member function rolls back ALL open (uncommitted) transactions on this ODBC connection.} + +\wxheading{See also} + +\helpref{wxDb::CommitTrans}{wxdbcommittrans} for a special note on cursors + +\membersection{wxDb::SetSqlLogging}\label{wxdbsetsqllogging} + +\func{bool}{SetSqlLogging}{\param{wxDbSqlLogState}{ state}, \param{const wxChar *}{filename = SQL_LOG_FILENAME}, \param{bool}{ append = FALSE}} + +\wxheading{Parameters} + +\docparam{state}{Either sqlLogOFF or sqlLogON (see \helpref{enum wxDbSqlLogState}{wxdbcolfor}). Turns logging of SQL commands sent to the data source OFF or ON.} +\docparam{filename}{{\it OPTIONAL}. Name of the file to which the log text is to be written.} +\docparam{append}{{\it OPTIONAL}. Whether the file is appended to or overwritten.} + +\wxheading{Remarks} + +When called with {\it sqlLogON}, all commands sent to the data source engine are logged to the file specified by {\it filename}. Logging is done by embedded WriteSqlLog() calls in the database member functions, or may be manually logged by adding calls to WriteSqlLog() in your own source code. + +When called with {\it sqlLogOFF}, the logging file is closed, and any calls to WriteSqlLog() are ignored. + +\membersection{wxDb::TableExists}\label{wxdbtablexists} + +\func{bool}{TableExists}{\param{const char *}{tableName}, \param{const char *}{userID=NULL}, \param{const char *}{path=NULL}} + +Checks the ODBC data source for the existence of a table. If a {\it userID} is specified, then the table must be accessible by that user (user must have at least minimal privileges to the table). + +\wxheading{Parameters} + +\docparam{tableName}{Name of the table to check for the existence of} +\docparam{userID}{Owner of the table. Specify a userID when the datasource you are connected +to allows multiple unique tables with the same name to be owned by different users. {\it userID} +is evaluated as follows:} + +\begin{verbatim} + userID == NULL ... UserID is ignored (DEFAULT) + userID == "" ... UserID set equal to 'this->uid' + userID != "" ... UserID set equal to 'userID' +\end{verbatim} + +\wxheading{Remarks} + +{\it tableName} may refer to a table, view, alias or synonym. + +This function does not indicate whether or not the user has privileges to query or perform other functions on the table. + +\membersection{wxDb::TranslateSqlState}\label{wxdbtranslatesqlstate} + +\func{int}{TranslateSqlState}{\param{const wxChar *}{SQLState}} + +\wxheading{Parameters} + +\docparam{SQLState}{Converts an ODBC sqlstate to an internal error code.} + +\wxheading{Return value} + +Returns the internal class DB_ERR code. See \helpref{wxDb::DB_STATUS}{wxdb} definition. + +\membersection{wxDb::WriteSqlLog}\label{wxdbwritesqllog} + +\func{bool}{WriteSqlLog}{\param{const wxChar *}{logMsg}} + +\wxheading{Parameters} + +\docparam{logMsg}{Free form string to be written to the log file.} + +\wxheading{Remarks} + +Very useful debugging tool that may be turned on/off during run time. The +passed in string {\it logMsg} will be written to a log file if SQL logging +is turned on (see \helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging} for details on turning logging on/off). + +\wxheading{Return value} + +If SQL logging is off when a call to WriteSqlLog() is made, or there is a +failure to write the log message to the log file, the function returns +FALSE without performing the requested log, otherwise TRUE is returned. + +\wxheading{See also} + +\helpref{wxDb::SetSqlLogging}{wxdbsetsqllogging} + +\begin{comment} % George: this is a duplicate of one above (only with more text) +\membersection{wxDb::IsFwdOnlyCursors}\label{wxdbisfwdonlycursors} + +\func{bool}{IsFwdOnlyCursors}{\void} + +\wxheading{Remarks} + +This setting indicates whether this database connection was created +as being capable of using only forward scrolling cursors. This function +does NOT indicate if the ODBC driver or datasource supports backward +scrolling cursors. There is no standard way of detecting if the driver +or datasource can support backward scrolling cursors. + +If a wxDb instance was created as being forward only cursors, then even if +the datasource and ODBC driver support backward scrolling cursors, then +tables using this database connection can only use forward scrolling +cursors. + +The default setting of whether a wxDb connection to a database allows +forward-only or also backward scrolling cursors is defined in setup.h by +the wxODBC_FWD_ONLY_CURSORS value. This default setting can be overridden +when the wxDb connection is initially created (see \helpref{wxDb constructor}{wxdbconstr}). + +\wxheading{Return value} + +Returns TRUE if this datasource connection is defined as using only forward +scrolling cursors, or FALSE if the connection is defined as being capable +of supporting backward scrolling cursors (see note above). + +\wxheading{See also} + +\helpref{wxDb constructor}{wxdbconstr} +\end{comment} + +\membersection{wxDb::Dbms}\label{wxdbdbms} + +\func{wxDBMS }{Dbms}{\void} + +\wxheading{Remarks} + +The return value will be of the enumerated type wxDBMS. This enumerated +type contains a list of all the currently tested and supported databases. + +Additional databases may be work with these classes, but these databases +returned by this function have been tested and confirmed to work with +these ODBC classes. + +enum wxDBMS includes: +\begin{verbatim} + dbmsUNIDENTIFIED + dbmsORACLE + dbmsSYBASE_ASA + dbmsSYBASE_ASE + dbmsMY_SQL_SERVER + dbmsMY_SQL + dbmsPOSTGRES + dbmsACCESS + dbmsDBASE + dbmsINFORMIX +\end{verbatim} + +There are known issues with conformance to the ODBC standards with several +datasources listed above. Please see the overview for specific details on +which datasource have which issues. + +\wxheading{Return value} + +The return value will indicate which of the supported datasources is +currently connected to by this connection. In the event that the +datasource is not recognized, a value of 'dbmsUNIDENTIFIED' is returned. + +\membersection{wxDb::SetDebugErrorMessages}\label{wxdbsetdebugerrormessages} + +\func{void}{SetDebugErrorMessages}{\param{bool }{state}} + +\docparam{state}{Either TRUE (debug messages are displayed) or FALSE (debug +messages are not displayed.} + +\wxheading{Remarks} + +Turns on/off debug error messages from the ODBC class library. When +this function is passed TRUE, errors are reported to the user automatically +in a text or pop-up dialog when an ODBC error occurs. When passed FALSE, +errors are silently handled. + +When compiled in release mode (FINAL=1), this setting has no affect. + +\wxheading{See also} + +\helpref{wxDb constructor}{wxdbconstr} + +\membersection{wxDb::LogError}\label{wxdblogerror} + +\func{void}{LogError}{\param{const char *}{errMsg} \param{const char *}{SQLState=0}} + +\docparam{errMsg}{Free-form text to display describing the error to be logged.} +\docparam{SQLState}{Native SQL state error} + +\wxheading{Remarks} + +Calling this function will enter a log message in the error list maintained +for the database connection. This log message is free form and can be +anything the programmer wants to enter in the error list. + +If SQL logging is turned on, the call to this function will also log the +text into the SQL log file. + +\wxheading{See also} + +\helpref{wxDb::WriteSqlLog}{wxdbwritesqllog} + +\section{\class{wxDbColInf}}\label{wxdbcolinf} + +Used with the \helpref{wxDb::GetColumns}{wxdbgetcolumns} functions for obtaining all retrievable information about a columns definition. + +\section{\class{wxDbColFor}}\label{wxdbcolfor} + +Beginning support for handling international formatting specifically on dates and floats. + +Only one function is provided with this class currently: + +\membersection{wxDbColFor::Format}\label{wxdbcolforformat} + +\func{int}{Format}{\param{int }{Nation}, \param{int }{dbDataType}, \param{SWORD }{sqlDataType}, \param{short }{columnSize}, \param{short }{decimalDigits}}\label{wxdbcolforformat} + +Work in progress, and should be inter-related with wxLocale + +\section{\class{wxDbInf}}\label{wxdbinf} + +Contains information regarding the database connection (data source name, +number of tables, etc). A pointer to a wxDbTableInf is included in this +class so a program can create a wxDbTableInf array instance to maintain all +information about all tables in the datasource to have all the datasource's +information in one memory structure. + +\section{\class{wxDbTable}}\label{wxdbtable} + +A wxDbTable instance provides re-usable access to rows of data in +a table contained within the associated ODBC data source + +\wxheading{Include files} + +\\ + + +\latexignore{\rtfignore{\wxheading{Members}}} +\wxheading{Helper classes and data structures} + +The following classes and structs are defined in dbtable.cpp/.h for use with the wxDbTable class. +\begin{verbatim} + + class wxDbColDef : Bound column definitions for use by a wxDbTable + instance + + class wxDbColDataPtr : Pointer to dynamic column definitions for use with + a wxDbTable instance + + class wxDbIdxDef : Used in creation of non-primary indexes + +\end{verbatim} + +\wxheading{Constants} +\begin{verbatim} + wxDB_DEFAULT_CURSOR Index number of the cursor that each table will use + by default. + + wxDB_QUERY_ONLY Used to indicate whether a table that is opened is + for query only, or if insert/update/deletes will + be performed on the table. Less overhead (cursors + and memory) are allocated for query only tables, plus + read access times are faster with some datasources. + + wxDB_ROWID_LEN [Oracle specific] - Used when CanUpdateByRowID() is + true. Optimizes updates so they are faster by + updating on the Oracle-specific ROWID column rather + than some other index. + + + wxDB_DISABLE_VIEW Use to indicate when a database view should not be + if a table is normally set up to use a view. + [Currently unsupported.] + +\end{verbatim} + +\wxheading{Remarks} + +\wxheading{See also} + +\helpref{wxDbTable}{wxdbtable} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxDbTable::wxDbTable}\label{wxdbtableconstr} + +\func{}{wxDbTable}{\param{wxDb *}{pwxDb}, \param{const char *}{tblName}, \param{const int }{nCols},\param{const char *}{qryTblName = 0}, \param{bool}{qryOnly = !wxDB_QUERY_ONLY},\param{const char *}{tblPath=NULL}} + +Default constructor. + +\wxheading{Parameters} + +\docparam{pSqlStmt}{} +\docparam{typeOfDel}{} +\docparam{pWhereClause}{Default is 0.} + + +\membersection{wxDbTable::wxDbTable}\label{wxdbtabledestr} + +\func{virtual}{\destruct{wxDbTable}}{} + +Virtual default destructor. + + +\membersection{wxDbTable::BuildDeleteStmt}\label{wxdbtablebuilddeletestmt} + +\func{void}{BuildSelectStmt}{\param{char *}{pSqlStmt}, \param{int }{typeOfDel}, \param{const char *}{pWhereClause=0}} + +\wxheading{Parameters} + +\docparam{pSqlStmt}{} +\docparam{typeOfDel}{} +\docparam{pWhereClause}{Default is 0.} + + +\membersection{wxDbTable::BuildSelectStmt}\label{wxdbtablebuildselectstmt} + +\func{void}{BuildSelectStmt}{\param{char *}{pSqlStmt}, \param{int }{typeOfSelect}, \param{bool }{distinct}} + +\wxheading{Parameters} + +\docparam{pSqlStmt}{} +\docparam{typeOfSelect}{} +\docparam{distinct}{} + + +\membersection{wxDbTable::BuildUpdateStmt}\label{wxdbtablebuildupdatestmt} + +\func{void}{BuildSelectStmt}{\param{char *}{pSqlStmt}, \param{int }{typeOfUpd}, \param{const char *}{pWhereClause=0}} + +\wxheading{Parameters} + +\docparam{pSqlStmt}{} +\docparam{typeOfUpd}{} +\docparam{pWhereClause}{Default is 0.} + + +\membersection{wxDbTable::BuildWhereStmt}\label{wxdbtablebuildwherestmt} + +\func{void}{BuildSelectStmt}{\param{char *}{pWhereClause}, \param{int }{typeOfWhere}, \param{const char *}{qualTableName=0}, \param{const char *}{useLikeComparison=FALSE}} + +\wxheading{Parameters} + +\docparam{pWhereClause}{} +\docparam{typeOfWhere}{} +\docparam{qualTableName}{Default is 0.} +\docparam{useLikeComparison}{Default is FALSE.} + + +\membersection{wxDbTable::CanSelectForUpdate}\label{wxdbtablecanselectforupdate} + +\func{bool}{CanSelectForUpdate}{\void} + +\wxheading{Remarks} + + +\membersection{wxDbTable::CanUpdateByROWID}\label{wxdbtablecanupdatebyrowid} + +\func{bool}{CanUpdateByROWID}{\void} + +\wxheading{Remarks} + + +\membersection{wxDbTable::ClearMemberVars}\label{wxdbtableclearmembervars} + +\func{void}{ClearMemberVars}{\void} + +\wxheading{Remarks} + + +\membersection{wxDbTable::CloseCursor}\label{wxdbtableclosecursor} + +\func{bool}{CloseCursor}{\param{HSTMT}{cursor}} + +\wxheading{Parameters} + +\docparam{cursor}{} + +\wxheading{Remarks} + + +\membersection{wxDbTable::Count}\label{wxdbtablecount} + +\func{ULONG}{Count}{\param{const char *}{args="*"}} + +\wxheading{Parameters} + +\docparam{args}{Default is "*".} + +\wxheading{Remarks} + + +\membersection{wxDbTable::CreateIndex}\label{wxdbtablecreateindex} + +\func{bool}{CreateIndex}{\param{const char *}{idxName}, \param{bool}{unique}, \param{int }{noIdxCols}, \param{wxDbIdxDef *}{pIdxDefs}, \param{bool }{attemptDrop=TRUE}} + +\wxheading{Parameters} + +\docparam{idxName}{} +\docparam{unique}{} +\docparam{noIdxCols}{} +\docparam{pIdxDefs}{} +\docparam{attemptDrop}{Default is TRUE.} + +\wxheading{Remarks} + +\membersection{wxDbTable::CreateTable}\label{wxdbtablecreatetable} + +\func{bool}{CreateTable}{\param{bool }{attemptDrop=TRUE}} + +\wxheading{Parameters} + +\docparam{attemptDrop}{Default is TRUE.} + +\wxheading{Remarks} + +\membersection{wxDbTable::DB_STATUS}\label{wxdbtabledbstatus} + +\func{bool}{DB_STATUS}{\void} + +Accessor function for the private member variable DB_STATUS. + +\membersection{wxDbTable::IsColNull}\label{wxdbtableiscolnull} + +\func{bool}{IsColNull}{\param{int }{colNo}} + +\wxheading{Parameters} + +\docparam{colNo}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::Delete}\label{wxdbtabledelete} + +\func{bool}{Delete}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::DeleteCursor}\label{wxdbtabledeletecursor} + +\func{bool}{DeleteCursor}{\param{HSTMT }{hstmtDel}} + +\wxheading{Parameters} + +\docparam{hstmtDel}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::DeleteWhere}\label{wxdbtabledeletewhere} + +\func{bool}{DeleteWhere}{\param{const char *}{pWhereClause}} + +\wxheading{Parameters} + +\docparam{pWhereClause}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::DeleteMatching}\label{wxdbtabledeletematching} + +\func{bool}{DeleteMatching}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::DropIndex}\label{wxdbtabledropindex} + +\func{bool}{DropIndex}{\param{const char *}{idxName}} + +\wxheading{Parameters} + +\docparam{idxName}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::DropTable}\label{wxdbtabledroptable} + +\func{bool}{DropTable}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetColDefs}\label{wxdbtablegetcoldefs} + +\func{wxDbColDef *}{GetColDefs}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetCursor}\label{wxdbtablegetcursor} + +\func{HSTMT}{GetCursor}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetDb}\label{wxdbtablegetdb} + +\func{wxDb *}{GetDb}{} + +Accessor function for the private member variable pDb which is a pointer to the datasource connection that this wxDbTable instance uses. + +\wxheading{Remarks} + +\membersection{wxDbTable::GetFirst}\label{wxdbtablegetfirst} + +\func{bool}{GetFirst}{\void} + +\wxheading{Remarks} + +This function can only be used if the datasource connection used by the wxDbTable instance was created with FwdOnlyCursors set to FALSE. If the connection does not allow backward scrolling cursors, this function will return FALSE, and the data contained in the bound columns will be undefined. + +\wxheading{See also} + +\helpref{wxDb::FwdOnlyCursors}{wxdbfwdonlycursors} + +\membersection{wxDbTable::GetFromClause}\label{wxdbtablegetfromclause} + +\func{const char *}{GetFromClause}{} + +Accessor function that returns the current FROM setting assigned with the \helpref{wxDbTable::SetFromClause}{wxdbtablesetfromclause}. + +\membersection{wxDbTable::GetLast}\label{wxdbtablegetlast} + +\func{bool}{GetLast}{\void} + +\wxheading{Remarks} + +This function can only be used if the datasource connection used by the wxDbTable instance was created with FwdOnlyCursors set to FALSE. If the connection does not allow backward scrolling cursors, this function will return FALSE, and the data contained in the bound columns will be undefined. + +\wxheading{See also} + +\helpref{wxDb::FwdOnlyCursors}{wxdbfwdonlycursors} + +\membersection{wxDbTable::GetNewCursor}\label{wxdbtablegetnewcursor} + +\func{HSTMT *}{GetNewCursor}{\param{bool }{setCursor=FALSE}, \param{bool }{bindColumns=TRUE}} + +\wxheading{Parameters} + +\docparam{setCursor}{Default is FALSE.} +\docparam{bindColumns}{Default is TRUE.} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetNext}\label{wxdbtablegetnext} + +\func{bool}{GetNext}{\void} + +\wxheading{Remarks} + + +\membersection{wxDbTable::GetNumberOfColumns}\label{wxdbtablegetnumberofcolumns} + +\func{bool}{GetNumberOfColumns}{} + +Accessor function that returns the number of columns that are statically bound for access by the wxDbTable instance. + +\membersection{wxDbTable::GetOrderByClause}\label{wxdbtablegetorderbyclause} + +\func{const char *}{GetOrderByClause}{} + +Accessor function that returns the current ORDER BY setting assigned with the \helpref{wxDbTable::SetOrderByClause}{wxdbtablesetorderbyclause}. + +\membersection{wxDbTable::GetPrev}\label{wxdbtablegetprev} + +\func{bool}{GetPrev}{\void} + +\wxheading{Remarks} + +This function can only be used if the datasource connection used by the wxDbTable instance was created with FwdOnlyCursors set to FALSE. If the connection does not allow backward scrolling cursors, this function will return FALSE, and the data contained in the bound columns will be undefined. + +\wxheading{See also} + +\helpref{wxDb::FwdOnlyCursors}{wxdbfwdonlycursors} + + +\membersection{wxDbTable::GetQueryTableName}\label{wxdbtablegetquerytablename} + +\func{const char *}{GetQueryTableName}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetRowNum}\label{wxdbtablegetrownum} + +\func{UWORD}{GetRowNum}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetTableName}\label{wxdbtablegettablename} + +\func{const char *}{GetTableName}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetTablePath}\label{wxdbtablegettablepath} + +\func{const char *}{GetTablePath}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::GetWhereClause}\label{wxdbtablegetwhereclause} + +\func{const char *}{GetWhereClause}{} + +Accessor function that returns the current WHERE setting assigned with the \helpref{wxDbTable::SetWhereClause}{wxdbtablesetwhereclause} + +\membersection{wxDbTable::Insert}\label{wxdbtableinsert} + +\func{int}{Insert}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::IsCursorClosedOnCommit}\label{wxdbtableiscursorclosedoncommit} + +\func{bool}{IsCursorClosedOnCommit}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::IsQueryOnly}\label{wxdbtableisqueryonly} + +\func{bool}{IsQueryOnly}{} + +Accessor function that returns a value indicating if this wxDbTable instance was created to allow only queries to be performed on the bound columns. If this function returns TRUE, then no actions may be performed using this wxDbTable instance that would modify (insert/delete/update) the table's data. + +\membersection{wxDbTable::Open}\label{wxdbtableopen} + +\func{bool}{Open}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::Query}\label{wxdbtablequery} + +\func{virtual bool}{Query}{\param{bool}{forUpdate=FALSE}, \param{bool}{distinct=FALSE}} + +\wxheading{Parameters} + +\docparam{forUpdate}{Default is FALSE.} +\docparam{distinct}{Default is FALSE.} + +\wxheading{Remarks} + +\membersection{wxDbTable::QueryBySqlStmt}\label{wxdbtablequerybysqlstmt} + +\func{bool}{QueryBySqlStmt}{\param{const char *}{pSqlStmt}} + +\wxheading{Parameters} + +\docparam{pSqlStmt}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::QueryMatching}\label{wxdbtablequerymatching} + +\func{virtual bool}{QueryMatching}{\param{bool}{forUpdate=FALSE}, \param{bool}{distinct=FALSE}} + +\wxheading{Parameters} + +\docparam{forUpdate}{Default is FALSE.} +\docparam{distinct}{Default is FALSE.} + +\wxheading{Remarks} + +\membersection{wxDbTable::QueryOnKeyFields}\label{wxdbtablequeryonkeyfields} + +\func{bool}{QueryOnKeyFields}{\param{bool}{forUpdate=FALSE}, \param{bool}{distinct=FALSE}} + +\wxheading{Parameters} + +\docparam{forUpdate}{Default is FALSE.} +\docparam{distinct}{Default is FALSE.} + +\wxheading{Remarks} + +\membersection{wxDbTable::Refresh}\label{wxdbtablerefresh} + +\func{bool}{Refresh}{\void} + +\wxheading{Remarks} + +\membersection{wxDbTable::SetColDefs}\label{wxdbtablesetcoldefs} + +\func{void}{SetColDefs}{\param{int }{index}, \param{const char *}{fieldName}, \param{int }{dataType}, \param{void *}{pData}, \param{int }{cType}, \param{int }{size}, \param{bool }{keyField = FALSE}, \param{bool }{upd = TRUE}, \param{bool }{insAllow = TRUE}, \param{bool }{derivedCol = FALSE}} + +\func{wxDbColDataPtr *}{SetColDefs}{\param{wxDbColInf *}{colInfs}, \param{ULONG }{numCols}} + +\wxheading{Parameters} + +\docparam{index}{} +\docparam{fieldName}{} +\docparam{dataType}{} +\docparam{pData}{} +\docparam{cType}{} +\docparam{size}{} +\docparam{keyField}{Default is FALSE.} +\docparam{upd}{Default is TRUE.} +\docparam{insAllow}{Default is TRUE.} +\docparam{derivedCol}{Default is FALSE.} + +\docparam{colInfs}{} +\docparam{numCols}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::SetCursor}\label{wxdbtablesetcursor} + +\func{bool}{Open}{\param{HSTMT *}{hstmtActivate = (void **) wxDB_DEFAULT_CURSOR}} + +\wxheading{Parameters} + +\docparam{hstmtActivate}{Default is wxDB_DEFAULT_CURSOR.} + +\wxheading{Remarks} + +\membersection{wxDbTable::SetFromClause}\label{wxdbtablesetfromclause} + +\func{void}{SetFromClause}{\param{const wxString& }{From}} + +\wxheading{Parameters} + +\docparam{From}{} + +\membersection{wxDbTable::SetNull}\label{wxdbtablesetnull} + +\func{bool}{SetNull}{\param{int }{colNo}} + +\func{bool}{SetNull}{\param{const char *}{colName}} + +\wxheading{Parameters} + +\docparam{colNo}{} +\docparam{colName}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::SetOrderByClause}\label{wxdbtablesetorderbyclause} + +\func{void}{SetOrderByClause}{\param{const wxString& }{OrderBy}} + +\wxheading{Parameters} + +\docparam{OrderBy}{} + +\membersection{wxDbTable::SetQueryTimeout}\label{wxdbtablesetquerytimeout} + +\func{bool}{SetQueryTimeout}{\param{UDWORD }{nSeconds}} + +\wxheading{Parameters} + +\docparam{nSeconds}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::SetWhereClause}\label{wxdbtablesetwhereclause} + +\func{void}{SetWhereClause}{\param{const wxString& }{Where}} + +\wxheading{Parameters} + +\docparam{Where}{} + +\membersection{wxDbTable::Update}\label{wxdbtableupdate} + +\func{bool}{Update}{\void} + +\func{bool}{Update}{\param{const char *}{pSqlStmt}} + +\wxheading{Parameters} + +\docparam{pSqlStmt}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::UpdateWhere}\label{wxdbtableupdatewhere} + +\func{bool}{UpdateWhere}{\param{const char *}{pWhereClause}} + +\wxheading{Parameters} + +\docparam{pWhereClause}{} + +\wxheading{Remarks} + +\membersection{wxDbTable::operator $++$}\label{wxdbtableplusplus} + +\func{bool}{operator $++$}{\void} + +Same as \helpref{wxDbTable::GetNext}{wxdbtablegetnext} + +\wxheading{See also} + +\helpref{wxDbTable::GetNext}{wxdbtablegetnext} + +\membersection{wxDbTable::operator $--$}\label{wxdbtableminusminus} + +\func{bool}{operator $--$}{\void} + +Same as \helpref{wxDbTable::GetPrev}{wxdbtablegetprev} + +\wxheading{See also} + +\helpref{wxDbTable::GetPrev}{wxdbtablegetprev} + +\section{\class{wxDbTableInf}}\label{wxdbtableinf} + +Currently only used by wxDb::GetCatalog() internally and wxDbInf class, +but may be used in future releases for user functions. Contains information +describing the table (Name, type, etc). A pointer to a wxDbColInf array +instance is included so a program can create a wxDbColInf array instance +(using \helpref{wxDb::GetColumns}{wxdbgetcolumns}) to maintain all information about the columns +of a table in one memory structure. + diff --git a/docs/latex/wx/dc.tex b/docs/latex/wx/dc.tex index a7ccf42499..9af5f09bc4 100644 --- a/docs/latex/wx/dc.tex +++ b/docs/latex/wx/dc.tex @@ -108,6 +108,18 @@ See \helpref{wxMemoryDC}{wxmemorydc} for typical usage. \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxBitmap}{wxbitmap}, \helpref{wxMask}{wxmask} +\membersection{wxDC::CalcBoundingBox}\label{wxdccalcboundingbox} + +\func{void}{CalcBoundingBox}{\param{wxCoord }{x}, \param{wxCoord }{y}} + +Adds the specified point to the bounding box which can be retrieved with +\helpref{MinX}{wxdcminx}, \helpref{MaxX}{wxdcmaxx} and +\helpref{MinY}{wxdcminy}, \helpref{MaxY}{wxdcmaxy} functions. + +\wxheading{See also} + +\helpref{ResetBoundingBox}{wxdcresetboundingbox} + \membersection{wxDC::Clear}\label{wxdcclear} \func{void}{Clear}{\void} @@ -201,8 +213,7 @@ filling the shape. \param{double}{ start}, \param{double}{ end}} Draws an arc of an ellipse. The current pen is used for drawing the arc and -the current brush is used for drawing the pie. This function is currently only available for -X window and PostScript device contexts. +the current brush is used for drawing the pie. {\it x} and {\it y} specify the x and y coordinates of the upper-left corner of the rectangle that contains the ellipse. @@ -336,6 +347,11 @@ the string. See \helpref{wxDC::GetTextExtent}{wxdcgettextextent} for how to get the dimensions of a text string, which can be used to position the text more precisely. +{\bf NB:} under wxGTK the current +\helpref{logical function}{wxdcgetlogicalfunction} is used by this function +but it is ignored by wxMSW. Thus, you should avoid using logical functions +with this function in portable programs. + \membersection{wxDC::EndDoc}\label{wxdcenddoc} \func{void}{EndDoc}{\void} @@ -358,10 +374,10 @@ Ends a document page (only relevant when outputting to a printer). \membersection{wxDC::FloodFill}\label{wxdcfloodfill} -\func{void}{FloodFill}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxColour *}{colour}, \param{int}{ style=wxFLOOD\_SURFACE}} +\func{void}{FloodFill}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{const wxColour\&}{ colour}, \param{int}{ style=wxFLOOD\_SURFACE}} -Flood fills the device context starting from the given point, in the given colour, -and using a style: +Flood fills the device context starting from the given point, using +the {\it current brush colour}, and using a style: \begin{itemize}\itemsep=0pt \item wxFLOOD\_SURFACE: the flooding occurs until a colour other than the given colour is encountered. @@ -374,12 +390,26 @@ and using a style: \func{wxBrush\&}{GetBackground}{\void} +\constfunc{const wxBrush\&}{GetBackground}{\void} + Gets the brush used for painting the background (see \helpref{wxDC::SetBackground}{wxdcsetbackground}). +\membersection{wxDC::GetBackgroundMode}\label{wxdcgetbackgroundmode} + +\constfunc{int}{GetBackgroundMode}{\void} + +Returns the current background mode: {\tt wxSOLID} or {\tt wxTRANSPARENT}. + +\wxheading{See also} + +\helpref{SetBackgroundMode}{wxdcsetbackgroundmode} + \membersection{wxDC::GetBrush}\label{wxdcgetbrush} \func{wxBrush\&}{GetBrush}{\void} +\constfunc{const wxBrush\&}{GetBrush}{\void} + Gets the current brush (see \helpref{wxDC::SetBrush}{wxdcsetbrush}). \membersection{wxDC::GetCharHeight}\label{wxdcgetcharheight} @@ -407,6 +437,8 @@ rectangle are returned as a tuple.} \func{wxFont\&}{GetFont}{\void} +\constfunc{const wxFont\&}{GetFont}{\void} + Gets the current font (see \helpref{wxDC::SetFont}{wxdcsetfont}). \membersection{wxDC::GetLogicalFunction}\label{wxdcgetlogicalfunction} @@ -432,6 +464,8 @@ See \helpref{wxDC::SetOptimization}{wxsetoptimization} for details. \func{wxPen\&}{GetPen}{\void} +\constfunc{const wxPen\&}{GetPen}{\void} + Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}). \membersection{wxDC::GetPixel}\label{wxdcgetpixel} @@ -478,6 +512,8 @@ implements the following methods:\par \func{wxColour\&}{GetTextBackground}{\void} +\constfunc{const wxColour\&}{GetTextBackground}{\void} + Gets the current text background colour (see \helpref{wxDC::SetTextBackground}{wxdcsettextbackground}). \membersection{wxDC::GetTextExtent}\label{wxdcgettextextent} @@ -511,6 +547,8 @@ See also \helpref{wxFont}{wxfont}, \helpref{wxDC::SetFont}{wxdcsetfont}. \func{wxColour\&}{GetTextForeground}{\void} +\constfunc{const wxColour\&}{GetTextForeground}{\void} + Gets the current text foreground colour (see \helpref{wxDC::SetTextForeground}{wxdcsettextforeground}). @@ -579,6 +617,17 @@ Gets the minimum vertical extent used in drawing commands so far. Returns TRUE if the DC is ok to use. +\membersection{wxDC::ResetBoundingBox}\label{wxdcresetboundingbox} + +\func{void}{ResetBoundingBox}{\void} + +Resets the bounding box: after a call to this function, the bounding box +doesn't contain anything. + +\wxheading{See also} + +\helpref{CalcBoundingBox}{wxdccalcboundingbox} + \membersection{wxDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin} \func{void}{SetDeviceOrigin}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} diff --git a/docs/latex/wx/ddeclint.tex b/docs/latex/wx/ddeclint.tex index 5bc85beb16..2f5fc7a858 100644 --- a/docs/latex/wx/ddeclint.tex +++ b/docs/latex/wx/ddeclint.tex @@ -7,7 +7,7 @@ To create a client which can communicate with a suitable server, you need to derive a class from wxDDEConnection and another from wxDDEClient. The custom wxDDEConnection class will intercept communications in a `conversation' with a server, and the custom wxDDEServer is required -so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return +so that a user-overridden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return a wxDDEConnection of the required class, when a connection is made. This DDE-based implementation is diff --git a/docs/latex/wx/dialevt.tex b/docs/latex/wx/dialevt.tex new file mode 100644 index 0000000000..b434db72f5 --- /dev/null +++ b/docs/latex/wx/dialevt.tex @@ -0,0 +1,48 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: dialevt.tex +%% Purpose: wxDialUpEvent documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 08.04.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxDialUpEvent}}\label{wxdialupevent} + +This is the event class for the dialup events sent by +\helpref{wxDialUpManager}{wxdialupmanager}. + +\wxheading{Derived from} + +\helpref{wxEvent}{wxevent}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxDialUpEvent::wxDialUpEvent}\label{wxdialupeventwxdialupevent} + +\func{}{wxDialUpEvent}{\param{bool }{isConnected}, \param{bool }{isOwnEvent}} + +Constructor is only used by \helpref{wxDialUpManager}{wxdialupmanager}. + +\membersection{wxDialUpEvent::IsConnectedEvent}\label{wxdialupeventisconnectedevent} + +\constfunc{bool}{IsConnectedEvent}{\void} + +Is this a {\tt CONNECTED} or {\tt DISCONNECTED} event? In other words, does it +notify about transition from offline to online state or vice versa? + +\membersection{wxDialUpEvent::IsOwnEvent}\label{wxdialupeventisownevent} + +\constfunc{bool}{IsOwnEvent}{\void} + +Does this event come from wxDialUpManager::Dial() or from some extrenal +process (i.e. does it result from our own attempt to establish the +connection)? + diff --git a/docs/latex/wx/dialog.tex b/docs/latex/wx/dialog.tex index b3b7d56918..0ea060871c 100644 --- a/docs/latex/wx/dialog.tex +++ b/docs/latex/wx/dialog.tex @@ -22,7 +22,10 @@ like a frame in that program flow continues, and input on other windows is still You specify the type of dialog with the {\bf wxDIALOG\_MODAL} and {\bf wxDIALOG\_MODELESS} window styles. -A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}). +A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}), which may itself +be created by Dialog Editor. For details, +see \helpref{The wxWindows resource system}{resourceformats}, \helpref{wxWindows resource functions}{resourcefuncs} and +the resource sample. An application can define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the dialog to respond to system close events. @@ -31,9 +34,10 @@ dialog to respond to system close events. \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box (Motif only).} +\twocolitem{\windowstyle{wxDIALOG\_MODAL}}{Specifies that the dialog box will be modal.} +\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box.} \twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION, wxSYSTEM\_MENU and wxTHICK\_FRAME} -\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window (Unix only).} +\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window.} \twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu.} \twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window.} \twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{The dialog stays on top of all other windows (Windows only).} @@ -279,6 +283,9 @@ propagate the notification to child windows and controls. \func{void}{SetModal}{\param{const bool}{ flag}} +{\bf NB:} This function is deprecated and doesn't work for all ports, just use +\helpref{ShowModal}{wxdialogshowmodal} to show a modal dialog instead. + Allows the programmer to specify whether the dialog box is modal (wxDialog::Show blocks control until the dialog is hidden) or modeless (control returns immediately). diff --git a/docs/latex/wx/dialup.tex b/docs/latex/wx/dialup.tex new file mode 100644 index 0000000000..7c13018ec5 --- /dev/null +++ b/docs/latex/wx/dialup.tex @@ -0,0 +1,215 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: dialup.tex +%% Purpose: wxDialUpManager documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 08.04.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxDialUpManager}}\label{wxdialupmanager} + +This class encapsulates functions dealing with veryfying the connection status +of the workstation (connected to the Internet via a direct connection, +connected through a modem or not connected at all) and to establish this +connection if possible/required (i.e. in the case of the modem). + +The program may also wish to be notified about the change in the connection +status (for example, to perform some action when the user connects to the +network the next time or, on the contrary, to stop receiving data from the net +when the user hangs up the modem). For this, you need to use one of the event +macros described below. + +This class is different from other wxWindows classes in that there is at most +one instance of this class in the program accessed via +\helpref{wxDialUpManager::Create()}{wxdialupmanagercreate} and you can't +create the objects of this class directly. + +\wxheading{Derived from} + +No base class + +\wxheading{Include files} + + + +\wxheading{Event table macros} + +To be notified about the change in the network connection status, use these +event handler macros to direct input to member functions that take a +\helpref{wxDialUpEvent}{wxdialupevent} argument. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf EVT\_DIALUP\_CONNECTED(func)}}{A connection with the network was established.} +\twocolitem{{\bf EVT\_DIALUP\_DISCONNECTED(func)}}{The connection with the network was lost.} +\end{twocollist}% + +\wxheading{See also} + +\helpref{dialup sample}{sampledialup}\\ +\helpref{wxDialUpEvent}{wxdialupevent} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxDialUpManager::Create}\label{wxdialupmanagercreate} + +\func{wxDialUpManager*}{Create}{\void} + +This function should create and return the object of the platform-specific +class derived from wxDialUpManager. You should delete the pointer when you are +done with it. + +\membersection{wxDialUpManager::IsOk}\label{wxdialupmanagerisok} + +\constfunc{bool}{IsOk}{\void} + +Returns {\tt TRUE} if the dialup manager was initialized correctly. If this +function returns {\tt FALSE}, no other functions will work neither, so it is a +good idea to call this function and check its result before calling any other +wxDialUpManager methods + +\membersection{wxDialUpManager::\destruct{wxDialUpManager}}\label{wxdialupmanagerdtor} + +\func{}{\destruct{wxDialUpManager}}{\void} + +Destructor. + +\membersection{wxDialUpManager::GetISPNames}\label{wxdialupmanagergetispnames} + +\constfunc{size\_t}{GetISPNames}{\param{wxArrayString\& }{names}} + +This function is only implemented under Windows. + +Fills the array with the names of all possible values for the first +parameter to \helpref{Dial()}{wxdialupmanagerdial} on this machine and returns +their number (may be $0$). + +\membersection{wxDialUpManager::Dial}\label{wxdialupmanagerdial} + +\func{bool}{Dial}{\param{const wxString\& }{nameOfISP = wxEmptyString}, \param{const wxString\& }{username = wxEmptyString}, \param{const wxString\& }{password = wxEmptyString}, \param{bool }{async = TRUE}} + +Dial the given ISP, use {\it username} and {\it password} to authentificate. + +The parameters are only used under Windows currently, for Unix you should use +\helpref{SetConnectCommand}{wxdialupmanagersetconnectcommand} to customize this +functions behaviour. + +If no {\it nameOfISP} is given, the function will select the default one +(proposing the user to choose among all connections defined on this machine) +and if no username and/or password are given, the function will try to do +without them, but will ask the user if really needed. + +If {\it async} parameter is {\tt FALSE}, the function waits until the end of dialing +and returns {\tt TRUE} upon successful completion. + +If {\it async} is {\tt TRUE}, the function only initiates the connection and +returns immediately - the result is reported via events (an event is sent +anyhow, but if dialing failed it will be a DISCONNECTED one). + +\membersection{wxDialUpManager::IsDialing}\label{wxdialupmanagerisdialing} + +\constfunc{bool}{IsDialing}{\void} + +Returns TRUE if (async) dialing is in progress. + +\wxheading{See also} + +\helpref{Dial}{wxdialupmanagerdial} + +\membersection{wxDialUpManager::CancelDialing}\label{wxdialupmanagercanceldialing} + +\func{bool}{CancelDialing}{\void} + +Cancel dialing the number initiated with \helpref{Dial}{wxdialupmanagerdial} +with async parameter equal to {\tt TRUE}. + +Note that this won't result in DISCONNECTED event being sent. + +\wxheading{See also} + +\helpref{IsDialing}{wxdialupmanagerisdialing} + +\membersection{wxDialUpManager::HangUp}\label{wxdialupmanagerhangup} + +\func{bool}{HangUp}{\void} + +Hang up the currently active dial up connection. + +\membersection{wxDialUpManager::IsAlwaysOnline}\label{wxdialupmanagerisalwaysonline} + +\constfunc{bool}{IsAlwaysOnline}{\void} + +Returns {\tt TRUE} if the computer has a permanent network connection (i.e. is +on a LAN) and so there is no need to use Dial() function to go online. + +{\bf NB:} this functions tries to guess the result and it is not always +guaranteed to be correct, so it is better to ask user for +confirmation or give him a possibility to override it. + +\membersection{wxDialUpManager::IsOnline}\label{wxdialupmanagerisonline} + +\constfunc{bool}{IsOnline}{\void} + +Returns {\tt TRUE} if the computer is connected to the network: under Windows, +this just means that a RAS connection exists, under Unix we check that +the "well-known host" (as specified by +\helpref{SetWellKnownHost}{wxdialupmanagersetwellknownhost}) is reachable. + +\membersection{wxDialUpManager::SetOnlineStatus}\label{wxdialupmanagersetonlinestatus} + +\func{void}{SetOnlineStatus}{\param{bool }{isOnline = TRUE}} + +Sometimes the built-in logic for determining the online status may fail, +so, in general, the user should be allowed to override it. This function +allows to forcefully set the online status - whatever our internal +algorithm may think about it. + +\wxheading{See also} + +\helpref{IsOnline}{wxdialupmanagerisonline} + +\membersection{wxDialUpManager::EnableAutoCheckOnlineStatus}\label{wxdialupmanagerenableautocheckonlinestatus} + +\func{bool}{EnableAutoCheckOnlineStatus}{\param{size\_t }{nSeconds = 60}} + +Enable automatical checks for the connection status and sending of +{\tt wxEVT\_DIALUP\_CONNECTED/wxEVT\_DIALUP\_DISCONNECTED} events. The interval +parameter is only for Unix where we do the check manually and specifies how +often should we repeat the check (each minute by default). Under Windows, the +notification about the change of connection status is sent by the system and so +we don't do any polling and this parameter is ignored. + +Returns {\tt FALSE} if couldn't set up automatic check for online status. + +\membersection{wxDialUpManager::DisableAutoCheckOnlineStatus}\label{wxdialupmanagerdisableautocheckonlinestatus} + +\func{void}{DisableAutoCheckOnlineStatus}{\void} + +Disable automatic check for connection status change - notice that the +{\tt wxEVT\_DIALUP\_XXX} events won't be sent any more neither. + +\membersection{wxDialUpManager::SetWellKnownHost}\label{wxdialupmanagersetwellknownhost} + +\func{void}{SetWellKnownHost}{\param{const wxString\& }{hostname}, \param{int }{portno = 80}} + +This method is for Unix only. + +Under Unix, the value of well-known host is used to check whether we're +connected to the internet. It is unused under Windows, but this function +is always safe to call. The default value is {\tt www.yahoo.com:80}. + +\membersection{wxDialUpManager::SetConnectCommand}\label{wxdialupmanagersetconnectcommand} + +\func{}{SetConnectCommand}{\param{const wxString\& }{commandDial = wxT("/usr/bin/pon")}, \param{const wxString\& }{commandHangup = wxT("/usr/bin/poff")}} + +This method is for Unix only. + +Sets the commands to start up the network and to hang up again. + +\wxheading{See also} + +\helpref{Dial}{wxdialupmanagerdial} + diff --git a/docs/latex/wx/dir.tex b/docs/latex/wx/dir.tex index e2e7997c3e..3b1e5b7e25 100644 --- a/docs/latex/wx/dir.tex +++ b/docs/latex/wx/dir.tex @@ -94,7 +94,7 @@ class is not meant to be used polymorphically. \func{bool}{Open}{\param{const wxString\& }{dir}} Open the directory for enumerating, returns TRUE on success or FALSE if an -error occured. +error occurred. \membersection{wxDir::IsOpened}\label{wxdirisopened} diff --git a/docs/latex/wx/dllload.tex b/docs/latex/wx/dllload.tex new file mode 100644 index 0000000000..dc4210e08d --- /dev/null +++ b/docs/latex/wx/dllload.tex @@ -0,0 +1,145 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: dllload.tex +%% Purpose: wxDllLoader documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 02.04.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxDllLoader}}\label{wxdllloader} + +wxDllLoader is a class providing an interface similar to Unix's {\tt +dlopen()}. It is used by the wxLibrary framework and manages the actual +loading of shared libraries and the resolving of symbols in them. There are no +instances of this class, it simply serves as a namespace for its static member +functions. + +The terms {\it DLL} and {\it shared library/object} will both be used in the +documentation to refer to the same thing: a {\tt .dll} file under Windows or +{\tt .so} or {\tt .sl} one under Unix. + +Example of using this class to dynamically load {\tt strlen()} function: + +\begin{verbatim} +#if defined(__WXMSW__) + static const wxChar *LIB_NAME = _T("kernel32"); + static const wxChar *FUNC_NAME = _T("lstrlenA"); +#elif defined(__UNIX__) + static const wxChar *LIB_NAME = _T("/lib/libc-2.0.7.so"); + static const wxChar *FUNC_NAME = _T("strlen"); +#endif + + wxDllType dllHandle = wxDllLoader::LoadLibrary(LIB_NAME); + if ( !dllHandle ) + { + ... error ... + } + else + { + typedef int (*strlenType)(char *); + strlenType pfnStrlen = (strlenType)wxDllLoader::GetSymbol(dllHandle, FUNC_NAME); + if ( !pfnStrlen ) + { + ... error ... + } + else + { + if ( pfnStrlen("foo") != 3 ) + { + ... error ... + } + else + { + ... ok! ... + } + } + + wxDllLoader::UnloadLibrary(dllHandle); + } +\end{verbatim} + +\wxheading{Derived from} + +No base class + +\wxheading{Include files} + + + +\wxheading{Data structures} + +This header defines a platfrom-dependent {\tt wxDllType} typedef which stores +a handle to a loaded DLLs on the given platform. + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxDllLoader::GetDllExt}\label{wxdllloadergetdllext} + +\func{static wxString}{GetDllExt}{\void} + +Returns the string containing the usual extension for shared libraries for the +given systems (including the leading dot if not empty). + +For example, this function will return {\tt ".dll"} under Windows or (usually) +{\tt ".so"} under Unix. + +\membersection{wxDllLoader::GetProgramHandle}\label{wxdllloadergetprogramhandle} + +\func{wxDllType}{GetProgramHandle}{\void} + +This function returns a valid handle for the main program itself. Notice that +the {\tt NULL} return value is valid for some systems (i.e. doesn't mean that +the function failed). + +{\bf NB:} This function is Unix specific. It will always fail under Windows +or OS/2. + +\membersection{wxDllLoader::GetSymbol}\label{wxdllloadergetsymbol} + +\func{void *}{GetSymbol}{\param{wxDllType }{dllHandle}, \param{const wxString\& }{name}} + +This function resolves a symbol in a loaded DLL, such as a variable or +function name. + +Returned value will be {\tt NULL} if the symbol was not found in the DLL or if +an error occured. + +\wxheading{Parameters} + +\docparam{dllHandle}{Valid handle previously returned by +\helpref{LoadLibrary}{wxdllloaderloadlibrary}} + +\docparam{name}{Name of the symbol.} + +\membersection{wxDllLoader::LoadLibrary}\label{wxdllloaderloadlibrary} + +\func{wxDllType}{LoadLibrary}{\param{const wxString \& }{libname}, \param{bool* }{success = NULL}} + +This function loads a shared library into memory, with {\it libname} being the +name of the library: it may be either the full name including path and +(platform-dependent) extenesion, just the basename (no path and no extension) +or a basename with extentsion. In the last two cases, the library will be +searched in all standard locations. + +Returns a handle to the loaded DLL. Use {\it success} parameter to test if it +is valid. If the handle is valid, the library must be unloaded later with +\helpref{UnloadLibrary}{wxdllloaderunloadlibrary}. + +\wxheading{Parameters} + +\docparam{libname}{Name of the shared object to load.} + +\docparam{success}{May point to a bool variable which will be set to TRUE or +FALSE; may also be {\tt NULL}.} + +\membersection{wxDllLoader::UnloadLibrary}\label{wxdllloaderunloadlibrary} + +\func{void}{UnloadLibrary}{\param{wxDllType }{dllhandle}} + +This function unloads the shared library. The handle {\it dllhandle} must have +been returned by \helpref{LoadLibrary}{wxdllloaderloadlibrary} previously. + + diff --git a/docs/latex/wx/dobjcomp.tex b/docs/latex/wx/dobjcomp.tex index 9eca258530..fbdc1c5ac4 100644 --- a/docs/latex/wx/dobjcomp.tex +++ b/docs/latex/wx/dobjcomp.tex @@ -6,7 +6,7 @@ %% Created: 02.11.99 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxDataObjectComposite}}\label{wxdataobjectcomposite} diff --git a/docs/latex/wx/dobjsmpl.tex b/docs/latex/wx/dobjsmpl.tex index 2d98a385d4..6e9fe1d7d6 100644 --- a/docs/latex/wx/dobjsmpl.tex +++ b/docs/latex/wx/dobjsmpl.tex @@ -6,7 +6,7 @@ %% Created: 02.11.99 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxDataObjectSimple}}\label{wxdataobjectsimple} diff --git a/docs/latex/wx/document.tex b/docs/latex/wx/document.tex index 23ba287409..462d6365b6 100644 --- a/docs/latex/wx/document.tex +++ b/docs/latex/wx/document.tex @@ -336,10 +336,12 @@ framework. \membersection{wxDocument::SetFilename} -\func{void}{SetFilename}{\param{const wxString\& }{filename}} +\func{void}{SetFilename}{\param{const wxString\& }{filename}, \param{bool}{ notifyViews = FALSE}} Sets the filename for this document. Usually called by the framework. +If {\it notifyViews} is TRUE, wxView::OnChangeFilename is called for all views. + \membersection{wxDocument::SetTitle} \func{void}{SetTitle}{\param{const wxString\& }{title}} diff --git a/docs/latex/wx/dragimag.tex b/docs/latex/wx/dragimag.tex index be414f9123..171de387a4 100644 --- a/docs/latex/wx/dragimag.tex +++ b/docs/latex/wx/dragimag.tex @@ -7,6 +7,9 @@ On Windows, the WIN32 API is used to do achieve smooth dragging. On other platfo wxGenericDragImage is used. Applications may also prefer to use wxGenericDragImage on Windows, too. +\pythonnote{wxPython uses wxGenericDragImage on all platforms, but +uses the wxDragImage name.} + To use this class, when you wish to start dragging an image, create a wxDragImage object and store it somewhere you can access it as the drag progresses. Call BeginDrag to start, and EndDrag to stop the drag. To move the image, @@ -19,6 +22,10 @@ either across the whole screen, or just restricted to one area of the screen to save resources. If you want the user to drag between two windows, then you will need to use full-screen dragging. +If you wish to draw the image yourself, use wxGenericDragImage and +override \helpref{wxDragImage::DoDrawImage}{wxdragimagedodrawimage} and +\helpref{wxDragImage::GetImageRect}{wxdragimagegetimagerect}. + Please see {\tt samples/dragimag} for an example. \wxheading{Derived from} @@ -48,19 +55,34 @@ Constructs a drag image from a bitmap and optional cursor. Constructs a drag image from an icon and optional cursor. +\pythonnote{This constructor is called wxDragIcon in wxPython.} + \func{}{wxDragImage}{\param{const wxString\& }{text}, \param{const wxCursor\& }{cursor = wxNullCursor}, \param{const wxPoint& }{hotspot = wxPoint(0, 0)}} Constructs a drag image from a text string and optional cursor. +\pythonnote{This constructor is called wxDragString in wxPython.} + \func{}{wxDragImage}{\param{const wxTreeCtrl\& }{treeCtrl}, \param{wxTreeItemId\& }{id}} Constructs a drag image from the text in the given tree control item, and optional cursor. +\pythonnote{This constructor is called wxDragTreeItem in wxPython.} + \func{}{wxDragImage}{\param{const wxListCtrl\& }{treeCtrl}, \param{long }{id}} Constructs a drag image from the text in the given tree control item, and optional cursor. +\pythonnote{This constructor is called wxDragListItem in wxPython.} + +\func{}{wxDragImage}{\param{const wxCursor\& }{cursor = wxNullCursor}, + \param{const wxPoint& }{hotspot = wxPoint(0, 0)}} + +Constructs a drag image an optional cursor. This constructor is only available for +wxGenericDragImage, and can be used when the application +supplies \helpref{wxDragImage::DoDrawImage}{wxdragimagedodrawimage} and \helpref{wxDragImage::GetImageRect}{wxdragimagegetimagerect}. + \wxheading{Parameters} \docparam{image}{Icon or bitmap to be used as the drag image. The bitmap can @@ -117,6 +139,16 @@ bounds the dragging operation. Specifying this can make the operation more effic by cutting down on the area under consideration, and it can also make a visual difference since the drag is clipped to this area.} +\membersection{wxDragImage::DoDrawImage}\label{wxdragimagedodrawimage} + +\func{virtual bool}{DoDrawImage}{\param{wxDC\&}{ dc}, \param{const wxPoint\&}{ pos}} + +Draws the image on the device context with top-left corner at the given position. + +This function is only available with wxGenericDragImage, to allow applications to +draw their own image instead of using an actual bitmap. If you override this function, +you must also override \helpref{wxDragImage::GetImageRect}{wxdragimagegetimagerect}. + \membersection{wxDragImage::EndDrag}\label{wxdragimageenddrag} \func{bool}{EndDrag}{\void} @@ -125,6 +157,16 @@ Call this when the drag has finished. Note that this call automatically calls ReleaseMouse. +\membersection{wxDragImage::GetImageRect}\label{wxdragimagegetimagerect} + +\constfunc{virtual wxRect}{GetImageRect}{\param{const wxPoint\&}{ pos}} + +Returns the rectangle enclosing the image, assuming that the image is drawn with its +top-left corner at the given point. + +This function is available in wxGenericDragImage only, and may be overridden (together with +\helpref{wxDragImage::DoDrawImage}{wxdragimagedodrawimage}) to provide a virtual drawing capability. + \membersection{wxDragImage::Hide}\label{wxdragimagehide} \func{bool}{Hide}{\void} @@ -153,3 +195,21 @@ will be smoother if you move the image when it is shown. Shows the image. Call this at least once when dragging. +\membersection{wxDragImage::UpdateBackingFromWindow}\label{wxdragimageupdatebackingfromwindow} + +\constfunc{bool}{UpdateBackingFromWindow}{\param{wxDC\&}{ windowDC}, \param{wxMemoryDC\&}{ destDC}, + \param{const wxRect\&}{ sourceRect}, \param{const wxRect\&}{ destRect}} + +Override this if you wish to draw the window contents to the backing bitmap +yourself. This can be desirable if you wish to avoid flicker by not having to +redraw the updated window itself just before dragging, which can cause a flicker just +as the drag starts. Instead, paint the drag image's backing bitmap to show the appropriate +graphic {\it minus the objects to be dragged}, and leave the window itself to be updated +by the drag image. This can provide eerily smooth, flicker-free drag behaviour. + +The default implementation copies the window contents to the backing bitmap. A new +implementation will normally copy information from another source, such as from its +own backing bitmap if it has one, or directly from internal data structures. + +This function is available in wxGenericDragImage only. + diff --git a/docs/latex/wx/dropsrc.tex b/docs/latex/wx/dropsrc.tex index b9ec41ca95..9b306331ee 100644 --- a/docs/latex/wx/dropsrc.tex +++ b/docs/latex/wx/dropsrc.tex @@ -2,7 +2,7 @@ This class represents a source for a drag and drop operation. -See \helpref{Drag'n'Drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview} +See \helpref{Drag and drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview} for more information. \wxheading{Derived from} @@ -37,12 +37,31 @@ enum wxDragResult \membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource} -\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL}} +\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} -Default/wxGTK-specific constructor. If you use the default constructor you must -call \helpref{SetData}{wxdropsourcesetdata} later. +\func{}{wxDropSource}{\param{wxDataObject\&}{ data}, \param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} -Note that {\it win} is required by the GTK port and therefore should always be set. +The constructors for wxDataObject. + +If you use the constructor without {\it data} parameter you must call +\helpref{SetData}{wxdropsourcesetdata} later. + +Note that the exact type of {\it iconCopy} and subsequent parameters differs +between wxMSW and wxGTK: these are cursors under Windows but icons for GTK. +You should use the macro \helpref{wxDROP\_ICON}{wxdropicon} in portable +programs instead of directly using either of these types. + +\wxheading{Parameters} + +\docparam{win}{The window which initiates the drag and drop operation.} + +\docparam{iconCopy}{The icon or cursor used for feedback for copy operation.} + +\docparam{iconMove}{The icon or cursor used for feedback for move operation.} + +\docparam{iconNone}{The icon or cursor used for feedback when operation can't be done.} + +{\it win} is the window which initiates the drag and drop operation. \membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor} diff --git a/docs/latex/wx/droptrgt.tex b/docs/latex/wx/droptrgt.tex index 235118dd32..eb9ca1eed6 100644 --- a/docs/latex/wx/droptrgt.tex +++ b/docs/latex/wx/droptrgt.tex @@ -11,7 +11,7 @@ the whole window area, but only a small portion of it. The normal sequence of ca \helpref{OnEnter}{wxdroptargetonenter}, possibly many times \helpref{OnDragOver}{wxdroptargetondragover}, \helpref{OnDrop}{wxdroptargetondrop} and finally \helpref{OnData}{wxdroptargetondata}. -See \helpref{Drag'n'Drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview} +See \helpref{Drag and drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview} for more information. \wxheading{Derived from} diff --git a/docs/latex/wx/encconv.tex b/docs/latex/wx/encconv.tex index bc95d61667..2bacaf4153 100644 --- a/docs/latex/wx/encconv.tex +++ b/docs/latex/wx/encconv.tex @@ -7,7 +7,7 @@ This class is capable of converting strings between any two 8-bit encodings/charsets. It can also convert from/to Unicode (but only -if you compiled wxWindows with wxUSE\_UNICODE set to 1). +if you compiled wxWindows with wxUSE\_WCHAR\_T set to 1). \wxheading{Derived from} @@ -20,6 +20,7 @@ if you compiled wxWindows with wxUSE\_UNICODE set to 1). \wxheading{See also} \helpref{wxFontMapper}{wxfontmapper}, +\helpref{wxMBConv}{wxmbconv}, \helpref{Writing non-English applications}{nonenglishoverview} @@ -48,14 +49,14 @@ cannot be converted because it does not exist in output encoding: \begin{twocollist}\itemsep=0pt \twocolitem{{\bf wxCONVERT\_STRICT}}{follow behaviour of GNU Recode - -just copy unconvertable characters to output and don't change them +just copy unconvertible characters to output and don't change them (its integer value will stay the same)} \twocolitem{{\bf wxCONVERT\_SUBSTITUTE}}{try some (lossy) substitutions -- e.g. replace unconvertable latin capitals with acute by ordinary +- e.g. replace unconvertible latin capitals with acute by ordinary capitals, replace en-dash or em-dash by '-' etc.} \end{twocollist} -Both modes gurantee that output string will have same length +Both modes guarantee that output string will have same length as input string. \wxheading{Return value} @@ -107,10 +108,10 @@ unix CP1252 {ISO8859_1,ISO8859_15} \end{verbatim} Equivalence is defined in terms of convertibility: -2 encodings are equivalent if you can convert text between -then without loosing information (it may - and will - happen -that you loose special chars like quotation marks or em-dashes -but you shouldn't loose any diacritics and language-specific +two encodings are equivalent if you can convert text between +then without losing information (it may - and will - happen +that you lose special chars like quotation marks or em-dashes +but you shouldn't lose any diacritics and language-specific characters when converting between equivalent encodings). Remember that this function does {\bf NOT} check for presence of @@ -121,14 +122,14 @@ encodings. (It usually returns only one encoding.) \begin{itemize}\itemsep=0pt \item Note that argument {\it enc} itself may be present in the returned array, -so that you can - as a side effect - detect whether the +so that you can, as a side-effect, detect whether the encoding is native for this platform or not. -\item helpref{Convert}{wxencodingconverterconvert} is not limited to -converting between equivalent encodings, it can convert between arbitrary -two encodings. -\item If {\it enc} is present in returned array, then it is {\bf always} first +\item \helpref{Convert}{wxencodingconverterconvert} is not limited to +converting between equivalent encodings, it can convert between two arbitrary +encodings. +\item If {\it enc} is present in the returned array, then it is {\bf always} the first item of it. -\item Please note that the returned array may not contain any items at all. +\item Please note that the returned array may contain no items at all. \end{itemize} \membersection{wxEncodingConverter::GetAllEquivalents}\label{wxencodingconvertergetallequivalents} @@ -138,7 +139,7 @@ item of it. Similar to \helpref{GetPlatformEquivalents}{wxencodingconvertergetplatformequivalents}, but this one will return ALL -equivalent encodings, regardless the platform, and including itself. +equivalent encodings, regardless of the platform, and including itself. This platform's encodings are before others in the array. And again, if {\it enc} is in the array, it is the very first item in it. diff --git a/docs/latex/wx/event.tex b/docs/latex/wx/event.tex index c7f58ab720..f747df581b 100644 --- a/docs/latex/wx/event.tex +++ b/docs/latex/wx/event.tex @@ -63,13 +63,6 @@ Set to TRUE by {\bf Skip} if this event should be skipped. Timestamp for this event. -\membersection{wxEvent::GetEventClass} - -\func{WXTYPE}{GetEventClass}{\void} - -Returns the identifier of the given event class, -such as wxTYPE\_MOUSE\_EVENT. - \membersection{wxEvent::GetEventObject} \func{wxObject*}{GetEventObject}{\void} diff --git a/docs/latex/wx/file.tex b/docs/latex/wx/file.tex index 45c210b98b..ac45262df2 100644 --- a/docs/latex/wx/file.tex +++ b/docs/latex/wx/file.tex @@ -5,6 +5,8 @@ minimize the overhead of using it - in fact, there is hardly any overhead at all, but using it brings you automatic error checking and hides differences between platforms and compilers. wxFile also automatically closes the file in its destructor making it unnecessary to worry about forgetting to do it. +wxFile is a wrapper around {\tt file descriptor.} - see also +\helpref{wxFFile}{wxffile} for a wrapper around {\tt FILE} structure. \wxheading{Derived from} @@ -39,7 +41,7 @@ These constants define the file access rights and are used with \helpref{wxFile::Create}{wxfilecreate} and \helpref{wxFile::Open}{wxfileopen}. The {\it OpenMode} enumeration defines the different modes for opening a file, -it's defined inside wxFile class so its members should be specified with {\it wxFile::} scope +it is defined inside wxFile class so its members should be specified with {\it wxFile::} scope resolution prefix. It is also used with \helpref{wxFile::Access}{wxfileaccess} function. \twocolwidtha{7cm} @@ -50,7 +52,8 @@ or test if it can be opened for writing with Access()} \twocolitem{{\bf wxFile::read\_write}}{Open file for reading and writing; can not be used with Access()} \twocolitem{{\bf wxFile::write\_append}}{Open file for appending: the file is opened for writing, but the old contents of the file is not erased and the file pointer is initially placed at the end of the file; -can not be used with Access()} +can not be used with Access(). This is the same as {\bf wxFile::write} if the +file doesn't exist.} \end{twocollist} Other constants defined elsewhere but used by wxFile functions are wxInvalidOffset which represents an @@ -158,7 +161,10 @@ in the file. Note also that this function doesn't work on unseekable file descriptors (examples include pipes, terminals and sockets under Unix) and an attempt to -use it will result in an error message in such case. +use it will result in an error message in such case. So, to read the entire +file into memory, you should write a loop which uses +\helpref{Read}{wxfileread} repeatedly and tests its return condition instead +of using Eof() as this will not work for special files under Unix. \membersection{wxFile::Exists}\label{wxfileexists} @@ -252,11 +258,11 @@ The actual offset position achieved, or wxInvalidOffset on failure. \constfunc{off\_t}{Tell}{\void} Returns the current position or wxInvalidOffset if file is not opened or if another -error occured. +error occurred. \membersection{wxFile::Write}\label{wxfilewrite} -\func{bool}{Write}{\param{const void*}{ buffer}, \param{off\_t}{ count}} +\func{size\_t}{Write}{\param{const void*}{ buffer}, \param{off\_t}{ count}} Writes the specified number of bytes from a buffer. @@ -268,7 +274,7 @@ Writes the specified number of bytes from a buffer. \wxheading{Return value} -TRUE if the operation was successful. +the number of bytes actually written \membersection{wxFile::Write}\label{wxfilewrites} @@ -278,10 +284,11 @@ Writes the contents of the string to the file, returns TRUE on success. \section{\class{wxFFile}}\label{wxffile} -A wxFFile performs raw file I/O. This is a very small class designed to +wxFFile implements buffered file I/O. This is a very small class designed to minimize the overhead of using it - in fact, there is hardly any overhead at all, but using it brings you automatic error checking and hides differences -between platforms and compilers. +between platforms and compilers. It wraps inside it a {\tt FILE *} handle used +by standard C IO library (also known as {\tt stdio}). \wxheading{Derived from} diff --git a/docs/latex/wx/filedlg.tex b/docs/latex/wx/filedlg.tex index 0932cb3306..8af8ac0366 100644 --- a/docs/latex/wx/filedlg.tex +++ b/docs/latex/wx/filedlg.tex @@ -58,7 +58,7 @@ Constructor. Use \helpref{wxFileDialog::ShowModal}{wxfiledialogshowmodal} to sho \docparam{defaultFile}{The default filename, or the empty string.} -\docparam{wildcard}{A wildcard, such as ``*.*".} +\docparam{wildcard}{A wildcard, such as ``*.*" or ``BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".} \docparam{style}{A dialog style. A bitlist of: @@ -180,13 +180,15 @@ Sets the dialog style. See \helpref{wxFileDialog::wxFileDialog}{wxfiledialogcons \func{void}{SetWildcard}{\param{const wxString\& }{wildCard}} -Sets the wildcard, which in Windows can contain multiple file types. +Sets the wildcard, which can contain multiple file types, for example: + +``BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" \membersection{wxFileDialog::ShowModal}\label{wxfiledialogshowmodal} \func{int}{ShowModal}{\void} -Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL +Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL otherwise. diff --git a/docs/latex/wx/filetype.tex b/docs/latex/wx/filetype.tex index e711958c3d..e9c0955493 100644 --- a/docs/latex/wx/filetype.tex +++ b/docs/latex/wx/filetype.tex @@ -13,7 +13,7 @@ will be returned if the corresponding information couldn't be found. The objects of this class are never created by the application code but are returned by \helpref{wxMimeTypesManager::GetFileTypeFromMimeType}{wxmimetypesmanagergetfiletypefrommimetype} and \helpref{wxMimeTypesManager::GetFileTypeFromExtension}{wxmimetypesmanagergetfiletypefromextension} methods. -But it's your responsibility to delete the returned pointer when you're done +But it is your responsibility to delete the returned pointer when you're done with it! % TODO describe MIME types better than this... diff --git a/docs/latex/wx/flexsizr.tex b/docs/latex/wx/flexsizr.tex new file mode 100644 index 0000000000..7004c0e1fa --- /dev/null +++ b/docs/latex/wx/flexsizr.tex @@ -0,0 +1,24 @@ +\section{\class{wxFlexGridSizer}}\label{wxflexgridsizer} + +A flex grid sizer is a sizer which lays out its children in a two-dimensional +table with all table fields in one row having the same +height and all fields in one column having the same width. + +\wxheading{Derived from} + +\helpref{wxGridSizer}{wxsizer}\\ +\helpref{wxSizer}{wxsizer}\\ +\helpref{wxObject}{wxobject} + +\membersection{wxFlexGridSizer::wxFlexGridSizer}\label{wxflexgridsizerwxflexgridsizer} + +\func{}{wxFlexGridSizer}{\param{int }{rows}, \param{int }{cols}, \param{int }{vgap}, \param{int }{hgap}} + +\func{}{wxFlexGridSizer}{\param{int }{cols}, \param{int }{vgap = 0}, \param{int }{hgap = 0}} + +Constructor for a wxGridSizer. {\it rows} and {\it cols} determine the number of +columns and rows in the sizer - if either of the parameters is zero, it will be +calculated to form the total number of children in the sizer, thus making the +sizer grow dynamically. {\it vgap} and {\it hgap} define extra space between +all children. + diff --git a/docs/latex/wx/fontenum.tex b/docs/latex/wx/fontenum.tex index 188cf5b819..8df3609217 100644 --- a/docs/latex/wx/fontenum.tex +++ b/docs/latex/wx/fontenum.tex @@ -6,7 +6,7 @@ %% Created: 03.11.99 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxFontEnumerator}}\label{wxfontenumerator} diff --git a/docs/latex/wx/forward.gif b/docs/latex/wx/forward.gif index 9c81e8c92fed7fe851ce02e7854dc26a58eae9b2..d8862174ed264064e4092accd3b9cef539651ad1 100644 GIT binary patch literal 959 zcmZ?wbhEHbbYM_m_|5NZ; wbH-jL-q~hvBDNIFUuAn+=ylY_lIO=twXW(!Y|OjPCFiqa!^6Y8%uEc{09+_1fB*mh literal 164 zcmV;V09*e@Nk%v~VI=?<0Pz3-zrVld=jU&4Z(9HWEC2ui03`qz0007gjE||y?Z1Qp zwAzdF6*A}#V%!v#-{_g@)>Q-cu3}3Ku`2^Nfa3dZ+VyHW%gtsZ`jV7k@%j8Ij}~W) zc{NUP6)X3OWa^|{8nl?rh|gZ1@{(qofnsWu+nmFHSnaq>lB41zSVC9`a)_v*xHx0L S5h*!IS!o$ynW>ps0028gDN7ju diff --git a/docs/latex/wx/frame.tex b/docs/latex/wx/frame.tex index e6ec525ca4..6643c627ca 100644 --- a/docs/latex/wx/frame.tex +++ b/docs/latex/wx/frame.tex @@ -24,25 +24,29 @@ application windows. \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt +\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxRESIZE\_BOX \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} \twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized). Windows only. } \twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.} -\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.} -\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}. Windows only. } -\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame. } -\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized. Windows only. } -\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame. } -\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows. Windows only. } -\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu. } -\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window. Windows and Motif only.} -\twocolitem{\windowstyle{wxSIMPLE\_BORDER}}{Displays no border or decorations. GTK and Windows only (?). } +\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}. Windows only.} +\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame.} +\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized. Windows only.} +\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame.} +\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows. Windows only.} +\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu.} +\twocolitem{\windowstyle{wxSIMPLE\_BORDER}}{Displays no border or decorations. GTK and Windows only.} \twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Unix only).} \twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{Causes the frame to be above the parent window in the z-order and not shown in the taskbar. Without this style, frames are created as top-level windows that may be obscured by -the parent window, and frame titles are shown in the taskbar. Windows and GTK. } +the parent window, and frame titles are shown in the taskbar. Windows and GTK.} \twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Causes a frame with a small titlebar to be created; -the frame title does not appear in the taskbar. Windows only. } +the frame title does not appear in the taskbar. Windows only.} \end{twocollist} +The default frame style is for normal, resizeable frames. To create a frame +which can not be resized by user, you may use the following combination of +styles: {\tt wxDEFAULT\_FRAME\_STYLE \& \~ (wxRESIZE\_BORDER \pipe wxRESIZE\_BOX \pipe wxMAXIMIZE\_BOX)}. +% Note: the space after the tilde is necessary or Tex2RTF complains. + See also \helpref{window styles overview}{windowstyles}. \wxheading{Remarks} diff --git a/docs/latex/wx/fs.tex b/docs/latex/wx/fs.tex index 61422f1947..b7d09f7181 100644 --- a/docs/latex/wx/fs.tex +++ b/docs/latex/wx/fs.tex @@ -2,36 +2,37 @@ The wxHTML library uses a {\bf virtual file systems} mechanism similar to the one used in Midnight Commander, Dos Navigator, -FAR or almost any modern file manager. (Do you remember? You can -press enter on ZIP file and its contents is displayed as if it -were a local directory...) +FAR or almost any modern file manager. It allows the user to access +data stored in archives as if they were ordinary files. On-the-fly +generated files that exist only in memory are also supported. \wxheading{Classes} -Three classes are used in order to provide full VFS: +Three classes are used in order to provide virtual file systems mechanism: \begin{itemize}\itemsep=0pt \item The \helpref{wxFSFile}{wxfsfile} class provides information -on opened file (name, input stream, mime type and anchor). +about opened file (name, input stream, mime type and anchor). \item The \helpref{wxFileSystem}{wxfilesystem} class is the interface. Its main methods are ChangePathTo() and OpenFile(). This class is most often used by the end user. \item The \helpref{wxFileSystemHandler}{wxfilesystemhandler} is the core -if VFS mechanism. You can derive your own handler and pass it to +of virtual file systems mechanism. You can derive your own handler and pass it to +of the VFS mechanism. You can derive your own handler and pass it to wxFileSystem's AddHandler() method. In the new handler you only need to -overwrite OpenFile() and CanOpen() methods. +override the OpenFile() and CanOpen() methods. \end{itemize} \wxheading{Locations} -Locations (aka filenames aka addresses) are constructed from 4 parts: +Locations (aka filenames aka addresses) are constructed from four parts: \begin{itemize}\itemsep=0pt \item {\bf protocol} - handler can recognize if it is able to open a file by checking its protocol. Examples are "http", "file" or "ftp". \item {\bf right location} - is the name of file within the protocol. In "http://www.wxwindows.org/index.html" the right location is "//www.wxwindows.org/index.html". -\item {\bf anchor} - anchor is optional and is usually not present. +\item {\bf anchor} - an anchor is optional and is usually not present. In "index.htm\#chapter2" the anchor is "chapter2". \item {\bf left location} - this is usually an empty string. It is used by 'local' protocols such as ZIP. @@ -40,33 +41,26 @@ See Combined Protocols paragraph for details. \wxheading{Combined Protocols} -Left location pretends protocol in URL string. -It's not used by global protocols like HTTP but it's used -by local ones - for example you can see this address: +The left location precedes the protocol in the URL string. +It is not used by global protocols like HTTP but it becomes handy when nesting +protocols - for example you may want to access files in a ZIP archive: file:archives/cpp\_doc.zip\#zip:reference/fopen.htm\#syntax -In this example, protocol is "zip", left location is -"reference/fopen.htm", anchor is "syntax" and right location -is "file:archives/cpp\_doc.zip". It is used by zip handler -to determine in what file this particular zip VFS is stored. +In this example, the protocol is "zip", the left location is +"reference/fopen.htm", the anchor is "syntax" and the right location +is "file:archives/cpp\_doc.zip". -In fact there are two protocols used in this example: zip and file. -You can construct even more complicated addresses like this one: - -http://www.archives.org/myarchive.zip\#zip:local/docs/cpp/stdio.zip\#zip:index.htm - -In this example you access zip VFS stdio.zip stored in another zip (myarchive.zip) -which is at WWW. +There are {\bf two} protocols used in this example: "zip" and "file". \wxheading{File Systems Included in wxHTML} -Following VFS handlers are part of wxWindows so far: +The following virtual file system handlers are part of wxWindows so far: \begin{twocollist} -\twocolitem{{\bf wxInternetFSHandler}}{Handler for accessing documents +\twocolitem{{\bf wxInternetFSHandler}}{A handler for accessing documents via HTTP or FTP protocols. Include file is .} -\twocolitem{{\bf wxZipFSHandler}}{Handler for ZIP archives. +\twocolitem{{\bf wxZipFSHandler}}{A handler for ZIP archives. Include file is . URL is in form "archive.zip\#zip:filename".} \twocolitem{{\bf wxMemoryFSHandler}}{This handler allows you to access data stored in memory (such as bitmaps) as if they were regular files. @@ -75,9 +69,11 @@ Include file is . UURL is prefixed with memory:, e.g. "memory:myfile.htm"} \end{twocollist} -In addition, wxFileSystem can access local files. +In addition, wxFileSystem itself can access local files. +\wxheading{Initializing file system handlers} + Use \helpref{wxFileSystem::AddHandler}{wxfilesystemaddhandler} to initialize a handler, for example: @@ -90,7 +86,6 @@ bool MyApp::OnInit() { wxFileSystem::AddHandler(new wxMemoryFSHandler); ... +} \end{verbatim} - - diff --git a/docs/latex/wx/fs_mem.tex b/docs/latex/wx/fs_mem.tex index 41a02f0d88..fa28cf8300 100644 --- a/docs/latex/wx/fs_mem.tex +++ b/docs/latex/wx/fs_mem.tex @@ -87,6 +87,8 @@ data (bitmap, text or raw data) will be copied into private memory stream and available under name "memory:" + filename. +Note that when storing image/bitmap, you must use image format that wxWindows +can write (e.g. JPG, PNG, see \helpref{wxImage documentation}{wximage})! \membersection{wxMemoryFSHandler::RemoveFile}\label{wxmemoryfshandlerremovefile} diff --git a/docs/latex/wx/fsfile.tex b/docs/latex/wx/fsfile.tex index 0ce31a68b5..87b802f783 100644 --- a/docs/latex/wx/fsfile.tex +++ b/docs/latex/wx/fsfile.tex @@ -12,7 +12,7 @@ It provides more information than wxWindow's input stream {\bf Note:} Any pointer returned by wxFSFile's member is valid only as long as wxFSFile object exists. For example a call to GetStream() doesn't {\it create} the stream but only returns the pointer to it. In -other words after 10 calls to GetStream() you'll obtain ten identical +other words after 10 calls to GetStream() you will obtain ten identical pointers. \wxheading{Derived from} @@ -52,7 +52,7 @@ functions. \wxheading{Notes} -It is seldom used by the application programmer but you'll need it if +It is seldom used by the application programmer but you will need it if you are writing your own virtual FS. For example you may need something similar to wxMemoryInputStream, but because wxMemoryInputStream doesn't free the memory when destroyed and thus passing a memory stream diff --git a/docs/latex/wx/ftp.tex b/docs/latex/wx/ftp.tex index f49796142e..e3c5050379 100644 --- a/docs/latex/wx/ftp.tex +++ b/docs/latex/wx/ftp.tex @@ -181,7 +181,7 @@ You will be notified when the EOF is reached by an error. \wxheading{Return value} -Returns NULL if an error occured (it could be a network failure or the fact +Returns NULL if an error occurred (it could be a network failure or the fact that the file doesn't exist). Returns the initialized stream. You will have to delete it yourself when you diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index 3259724fe6..442d985457 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -2,7 +2,51 @@ \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setfooter{\thepage}{}{}{}{}{\thepage} -The functions defined in wxWindows are described here. +The functions and macros defined in wxWindows are described here. + +\section{Version macros}\label{versionfunctions} + +The following constants are defined in wxWindows: + +\begin{itemize}\itemsep=0pt +\item {\tt wxMAJOR\_VERSION} is the major version of wxWindows +\item {\tt wxMINOR\_VERSION} is the minor version of wxWindows +\item {\tt wxRELASE\_NUMBER} is the release number +\end{itemize} + +For example, the values or these constants for wxWindows 2.1.15 are 2, 1 and +15. + +Additionally, {\tt wxVERSION\_STRING} is a user-readable string containing +the full wxWindows version and {\tt wxVERSION\_NUMBER} is a combination of the +three version numbers above: for 2.1.15, it is 2115 and it is 2200 for +wxWindows 2.2. + +\wxheading{Include files} + + or + +\membersection{wxCHECK\_VERSION}\label{wxcheckversion} + +\func{bool}{wxCHECK\_VERSION}{\param{}{major, minor, release}} + +This is a macro which evaluates to true if the current wxWindows version is at +least major.minor.release. + +For example, to test if the program is compiled with wxWindows 2.2 or higher, +the following can be done: + +\begin{verbatim} + wxString s; +#if wxCHECK_VERSION(2, 2, 0) + if ( s.StartsWith("foo") ) +#else // replacement code for old version + if ( strncmp(s, "foo", 3) == 0 ) +#endif + { + ... + } +\end{verbatim} \section{Thread functions}\label{threadfunctions} @@ -21,8 +65,8 @@ The functions defined in wxWindows are described here. This function must be called when any thread other than the main GUI thread wants to get access to the GUI library. This function will block the execution of the calling thread until the main thread (or any other thread holding the -main GUI lock) leaves the GUI library and no other other thread will enter -the GUI library until the calling thread calls \helpref{::wxMutexGuiLeave()}{wxmutexguileave}. +main GUI lock) leaves the GUI library and no other thread will enter the GUI +library until the calling thread calls \helpref{::wxMutexGuiLeave()}{wxmutexguileave}. Typically, these functions are used like this: @@ -45,7 +89,7 @@ Note that under GTK, no creation of top-level windows is allowed in any thread but the main one. This function is only defined on platforms which support preemptive -threads. +threads. \membersection{::wxMutexGuiLeave}\label{wxmutexguileave} @@ -86,7 +130,7 @@ slashes. Returns TRUE if the file exists. It also returns TRUE if the file is a directory. -\membersection{::wxFileModificationTime} +\membersection{::wxFileModificationTime}\label{wxfilemodificationtime} \func{time\_t}{wxFileModificationTime}{\param{const wxString\& }{filename}} @@ -270,7 +314,7 @@ wxSplitPath() will correctly handle filenames with both DOS and Unix path separa Windows, however it will not consider backslashes as path separators under Unix (where backslash is a valid character in a filename). -On entry, {\it fullname} should be non NULL (it may be empty though). +On entry, {\it fullname} should be non-NULL (it may be empty though). On return, {\it path} contains the file path (without the trailing separator), {\it name} contains the file name and {\it ext} contains the file extension without leading dot. All @@ -632,7 +676,7 @@ to be used for entering passwords as the function name implies. \param{const wxString\& }{default\_value = ``"}, \param{wxWindow *}{parent = NULL},\\ \param{int}{ x = -1}, \param{int}{ y = -1}, \param{bool}{ centre = TRUE}} -Pop up a dialog box with title set to {\it caption}, message {\it message}, and a +Pop up a dialog box with title set to {\it caption}, {\it message}, and a \rtfsp{\it default\_value}. The user may type in text and press OK to return this text, or press Cancel to return the empty string. @@ -730,7 +774,8 @@ wxYES\_NO or wxOK.} \twocolitem{wxOK}{Puts an Ok button on the message box. May be combined with wxCANCEL.} \twocolitem{wxCENTRE}{Centres the text.} \twocolitem{wxICON\_EXCLAMATION}{Displays an exclamation mark symbol.} -\twocolitem{wxICON\_HAND}{Displays a hand symbol.} +\twocolitem{wxICON\_HAND}{Displays an error symbol.} +\twocolitem{wxICON\_ERROR}{Displays an error symbol - the same as wxICON\_HAND.} \twocolitem{wxICON\_QUESTION}{Displays a question mark symbol.} \twocolitem{wxICON\_INFORMATION}{Displays an information symbol.} \end{twocollist} @@ -1056,6 +1101,21 @@ The clipboard must have previously been opened for this call to succeed. \section{Miscellaneous functions}\label{miscellany} +\membersection{::wxDROP\_ICON}\label{wxdropicon} + +\func{wxIconOrCursor}{wxDROP\_ICON}{\param{const char *}{name}} + +This macro creates either a cursor (MSW) or an icon (elsewhere) with the given +name. Under MSW, the cursor is loaded from the resource file and the icon is +loaded from XPM file under other platforms. + +This macro should be used with +\helpref{wxDropSource constructor}{wxdropsourcewxdropsource}. + +\wxheading{Include files} + + + \membersection{::wxNewId} \func{long}{wxNewId}{\void} @@ -1260,6 +1320,8 @@ wxWindows errors. See also \helpref{wxFatalError}{wxfatalerror}. \func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}} +\func{long}{wxExecute}{\param{const wxString\& }{command}, \param{wxArrayString\& }{output}, \param{wxArrayString\& }{errors}} + Executes another program in Unix or Windows. The first form takes a command string, such as {\tt "emacs file.txt"}. @@ -1267,8 +1329,8 @@ The first form takes a command string, such as {\tt "emacs file.txt"}. The second form takes an array of values: a command, any number of arguments, terminated by NULL. -The semantics of the third version is different from the first two and is -described in more details below. +The semantics of the third and fourth versions is different from the first two +and is described in more details below. If {\it sync} is FALSE (the default), flow of control immediately returns. If TRUE, the current application waits until the other program has terminated. @@ -1282,16 +1344,22 @@ should ensure that this can cause no recursion, in the simplest case by calling \helpref{wxEnableTopLevelWindows(FALSE)}{wxenabletoplevelwindows}. For asynchronous execution, however, the return value is the process id and -zero value indicates that the command could not be executed. +zero value indicates that the command could not be executed. As an added +complication, the return value of $-1$ in this case indicattes that we didn't +launch a new process, but connected to the running one (this can only happen in +case of using DDE under Windows for command execution). In particular, in this, +and only this, case the calling code will not get the notification about +process termination. If callback isn't NULL and if execution is asynchronous (note that callback -parameter can not be non NULL for synchronous execution), +parameter can not be non-NULL for synchronous execution), \helpref{wxProcess::OnTerminate}{wxprocessonterminate} will be called when the process finishes. Finally, you may use the third overloaded version of this function to execute a process (always synchronously) and capture its output in the array -{\it output}. +{\it output}. The fourth version adds the possibility to additionally capture +the messages from standard error output in the {\it errors} array. See also \helpref{wxShell}{wxshell}, \helpref{wxProcess}{wxprocess}, \helpref{Exec sample}{sampleexec}. @@ -1397,21 +1465,6 @@ Return the (current) user's home directory. -\membersection{::wxGetElapsedTime}\label{wxgetelapsedtime} - -\func{long}{wxGetElapsedTime}{\param{bool}{ resetTimer = TRUE}} - -Gets the time in milliseconds since the last \helpref{::wxStartTimer}{wxstarttimer}. - -If {\it resetTimer} is TRUE (the default), the timer is reset to zero -by this call. - -See also \helpref{wxTimer}{wxtimer}. - -\wxheading{Include files} - - - \membersection{::wxGetFreeMemory}\label{wxgetfreememory} \func{long}{wxGetFreeMemory}{\void} @@ -1439,7 +1492,7 @@ Returns the mouse position in screen coordinates. \func{wxString}{wxGetOsDescription}{\void} Returns the string containing the description of the current platform in a -user-readable form. For example, this function may return strings like +user-readable form. For example, this function may return strings like {\tt Windows NT Version 4.0} or {\tt Linux 2.2.2 i386}. \wxheading{See also} @@ -1457,7 +1510,7 @@ user-readable form. For example, this function may return strings like Gets operating system version information. \begin{twocollist}\itemsep=0pt -\twocolitemruled{Platform}{Return tyes} +\twocolitemruled{Platform}{Return types} \twocolitem{Macintosh}{Return value is wxMACINTOSH.} \twocolitem{GTK}{Return value is wxGTK, For GTK 1.0, {\it major} is 1, {\it minor} is 0. } \twocolitem{Motif}{Return value is wxMOTIF\_X, {\it major} is X version, {\it minor} is X revision.} @@ -1741,18 +1794,6 @@ as a keyboard shortkey in Windows and Motif) and $\backslash$t (tab in Windows). -\membersection{::wxStartTimer}\label{wxstarttimer} - -\func{void}{wxStartTimer}{\void} - -Starts a stopwatch; use \helpref{::wxGetElapsedTime}{wxgetelapsedtime} to get the elapsed time. - -See also \helpref{wxTimer}{wxtimer}. - -\wxheading{Include files} - - - \membersection{::wxToLower}\label{wxtolower} \func{char}{wxToLower}{\param{char }{ch}} @@ -1862,7 +1903,7 @@ function. Note that wxYield will not flush the message logs. This is intentional as calling wxYield is usually done to quickly update the screen and popping up a -message box dialog may be undesirable. If you do with to flush the log +message box dialog may be undesirable. If you do wish to flush the log messages immediately (otherwise it will be done during the next idle loop iteration), call \helpref{wxLog::FlushActive}{wxlogflushactive}. @@ -1876,7 +1917,7 @@ iteration), call \helpref{wxLog::FlushActive}{wxlogflushactive}. This functions wakes up the (internal and platform dependent) idle system, i.e. it will force the system to send an idle event even if the system currently {\it is} -idle and thus would not send any idle event until after some other event would get + idle and thus would not send any idle event until after some other event would get sent. This is also useful for sending events between two threads and is used by the corresponding functions \helpref{::wxPostEvent}{wxpostevent} and \helpref{wxEvtHandler::AddPendingEvent}{wxevthandleraddpendingevent}. @@ -2008,7 +2049,7 @@ dynamically. The same as DECLARE\_ABSTRACT\_CLASS. \func{}{DECLARE\_DYNAMIC\_CLASS}{className} Used inside a class declaration to declare that the objects of this class should be dynamically -createable from run-time type information. +creatable from run-time type information. Example: @@ -2162,6 +2203,18 @@ avoid using {\tt \#ifdef}s when creating bitmaps. +\membersection{wxConstCast}\label{wxconstcast} + +\func{}{wxConstCast}{ptr, classname} + +This macro expands into {\tt const\_cast(ptr)} if the compiler +supports {\it const\_cast} or into an old, C-style cast, otherwise. + +\wxheading{See also} + +\helpref{wxDynamicCast}{wxdynamiccast}\\ +\helpref{wxStaticCast}{wxstaticcast} + \membersection{WXDEBUG\_NEW}\label{debugnew} \func{}{WXDEBUG\_NEW}{arg} @@ -2185,7 +2238,7 @@ In non-debug mode, this is defined as the normal new operator. This macro returns the pointer {\it ptr} cast to the type {\it classname *} if the pointer is of this type (the check is done during the run-time) or NULL -otherwise. Usage of this macro is prefered over obsoleted wxObject::IsKindOf() +otherwise. Usage of this macro is preferred over obsoleted wxObject::IsKindOf() function. The {\it ptr} argument may be NULL, in which case NULL will be returned. @@ -2201,13 +2254,15 @@ Example: } else { - // no window has the focus or it's not a text control + // no window has the focus or it is not a text control } \end{verbatim} \wxheading{See also} -\helpref{RTTI overview}{runtimeclassoverview} +\helpref{RTTI overview}{runtimeclassoverview}\\ +\helpref{wxConstCast}{wxconstcast}\\ +\helpref{wxStatiicCast}{wxstaticcast} \membersection{wxICON}\label{wxiconmacro} @@ -2226,6 +2281,17 @@ avoid using {\tt \#ifdef}s when creating icons. +\membersection{wxStaticCast}\label{wxstaticcast} + +\func{}{wxStaticCast}{ptr, classname} + +This macro checks that the cast is valid in debug mode (an assert failure will +result if {\tt wxDynamicCast(ptr, classname) == NULL}) and then returns the +result of executing an equivalent of {\tt static\_cast(ptr)}. + +\helpref{wxDynamicCast}{wxdynamiccast}\\ +\helpref{wxConstCast}{wxconstcast} + \membersection{WXTRACE}\label{trace} \wxheading{Include files} @@ -2268,15 +2334,13 @@ files and loading user interface elements from resources. \normalbox{Please note that this use of the word `resource' is different from that used when talking about initialisation file resource reading and writing, using such functions -as wxWriteResource and wxGetResource. It's just an unfortunate clash of terminology.} +as wxWriteResource and wxGetResource. It is just an unfortunate clash of terminology.} \helponly{For an overview of the wxWindows resource mechanism, see \helpref{the wxWindows resource system}{resourceformats}.} See also \helpref{wxWindow::LoadFromResource}{wxwindowloadfromresource} for loading from resource data. -{\bf Warning:} this needs updating for wxWindows 2. - \membersection{::wxResourceAddIdentifier}\label{wxresourceaddidentifier} \func{bool}{wxResourceAddIdentifier}{\param{const wxString\& }{name}, \param{int }{value}} @@ -2300,15 +2364,15 @@ wxWindows bitmap resource identifier. For example, if the .WXR file contains the following: \begin{verbatim} -static const wxString\& aiai_resource = "bitmap(name = 'aiai_resource',\ - bitmap = ['aiai', wxBITMAP_TYPE_BMP_RESOURCE, 'WINDOWS'],\ - bitmap = ['aiai.xpm', wxBITMAP_TYPE_XPM, 'X'])."; +static const wxString\& project_resource = "bitmap(name = 'project_resource',\ + bitmap = ['project', wxBITMAP_TYPE_BMP_RESOURCE, 'WINDOWS'],\ + bitmap = ['project.xpm', wxBITMAP_TYPE_XPM, 'X'])."; \end{verbatim} then this function can be called as follows: \begin{verbatim} - wxBitmap *bitmap = wxResourceCreateBitmap("aiai_resource"); + wxBitmap *bitmap = wxResourceCreateBitmap("project_resource"); \end{verbatim} \membersection{::wxResourceCreateIcon} @@ -2320,15 +2384,15 @@ wxWindows icon resource identifier. For example, if the .WXR file contains the following: \begin{verbatim} -static const wxString\& aiai_resource = "icon(name = 'aiai_resource',\ - icon = ['aiai', wxBITMAP_TYPE_ICO_RESOURCE, 'WINDOWS'],\ - icon = ['aiai', wxBITMAP_TYPE_XBM_DATA, 'X'])."; +static const wxString\& project_resource = "icon(name = 'project_resource',\ + icon = ['project', wxBITMAP_TYPE_ICO_RESOURCE, 'WINDOWS'],\ + icon = ['project', wxBITMAP_TYPE_XBM_DATA, 'X'])."; \end{verbatim} then this function can be called as follows: \begin{verbatim} - wxIcon *icon = wxResourceCreateIcon("aiai_resource"); + wxIcon *icon = wxResourceCreateIcon("project_resource"); \end{verbatim} \membersection{::wxResourceCreateMenuBar} @@ -2387,9 +2451,9 @@ dialog(name = 'dialog1', title = 'Test dialog box', x = 312, y = 234, width = 400, height = 300, modal = 0, - control = [wxGroupBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262, + control = [1000, wxStaticBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262, [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]], - control = [wxMultiText, 'Multitext', 'wxVERTICAL_LABEL', 'multitext3', + control = [1001, wxTextCtrl, '', 'wxTE_MULTILINE', 'text3', 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.', [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0], [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]]). @@ -2415,7 +2479,7 @@ wxWindows resource data. \membersection{::wxResourceParseString}\label{wxresourceparsestring} -\func{bool}{wxResourceParseString}{\param{const wxString\& }{resource}, \param{wxResourceTable *}{table = NULL}} +\func{bool}{wxResourceParseString}{\param{char*}{ s}, \param{wxResourceTable *}{table = NULL}} Parses a string containing one or more wxWindows resource objects. If the resource objects are global static data that are included into the @@ -2425,17 +2489,17 @@ containing the resource data, to make it known to wxWindows. {\it resource} should contain data with the following form: \begin{verbatim} -static const wxString\& dialog1 = "dialog(name = 'dialog1',\ - style = 'wxCAPTION | wxDEFAULT_DIALOG_STYLE',\ - title = 'Test dialog box',\ - x = 312, y = 234, width = 400, height = 300,\ - modal = 0,\ - control = [wxGroupBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262,\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [wxMultiText, 'Multitext', 'wxVERTICAL_LABEL', 'multitext3',\ - 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.',\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]])."; +dialog(name = 'dialog1', + style = 'wxCAPTION | wxDEFAULT_DIALOG_STYLE', + title = 'Test dialog box', + x = 312, y = 234, width = 400, height = 300, + modal = 0, + control = [1000, wxStaticBox, 'Groupbox', '0', 'group6', 5, 4, 380, 262, + [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]], + control = [1001, wxTextCtrl, '', 'wxTE_MULTILINE', 'text3', + 156, 126, 200, 70, 'wxWindows is a multi-platform, GUI toolkit.', + [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0], + [11, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]]). \end{verbatim} This function will typically be used after calling \helpref{wxLoadUserResource}{wxloaduserresource} to @@ -2443,10 +2507,10 @@ load an entire {\tt .wxr file} into a string. \membersection{::wxResourceRegisterBitmapData}\label{registerbitmapdata} -\func{bool}{wxResourceRegisterBitmapData}{\param{const wxString\& }{name}, \param{const wxString\& }{xbm\_data}, \param{int }{width}, +\func{bool}{wxResourceRegisterBitmapData}{\param{const wxString\& }{name}, \param{char* }{xbm\_data}, \param{int }{width}, \param{int }{height}, \param{wxResourceTable *}{table = NULL}} -\func{bool}{wxResourceRegisterBitmapData}{\param{const wxString\& }{name}, \param{const wxString\& *}{xpm\_data}} +\func{bool}{wxResourceRegisterBitmapData}{\param{const wxString\& }{name}, \param{char** }{xpm\_data}} Makes \verb$#$included XBM or XPM bitmap data known to the wxWindows resource system. This is required if other resources will use the bitmap data, since otherwise there @@ -2504,7 +2568,7 @@ meaningless. \func{void}{wxLogVerbose}{\param{const char*}{ formatString}, \param{...}{}} -For verbose output. Normally, it's suppressed, but +For verbose output. Normally, it is suppressed, but might be activated if the user wishes to know more details about the program progress (another, but possibly confusing name for the same function is {\bf wxLogInfo}). @@ -2528,7 +2592,7 @@ Mostly used by wxWindows itself, but might be handy for logging errors after system call (API function) failure. It logs the specified message text as well as the last system error code ({\it errno} or {\it ::GetLastError()} depending on the platform) and the corresponding error message. The second form -of this function takes the error code explitly as the first argument. +of this function takes the error code explicitly as the first argument. \wxheading{See also} @@ -2615,9 +2679,89 @@ Returns the error message corresponding to the given system error code. If \helpref{wxSysErrorCode}{wxsyserrorcode}, \helpref{wxLogSysError}{wxlogsyserror} +\section{Time functions}\label{timefunctions} + +The functions in this section deal with getting the current time and +starting/stopping the global timers. Please note that the timer functions are +deprecated because they work with one global timer only and +\helpref{wxTimer}{wxtimer} and/or \helpref{wxStopWatch}{wxstopwatch} classes +should be used instead. For retrieving the current time, you may also use +\helpref{wxDateTime::Now}{wxdatetimenow} or +\helpref{wxDateTime::UNow}{wxdatetimeunow} methods. + +\membersection{::wxGetElapsedTime}\label{wxgetelapsedtime} + +\func{long}{wxGetElapsedTime}{\param{bool}{ resetTimer = TRUE}} + +Gets the time in milliseconds since the last \helpref{::wxStartTimer}{wxstarttimer}. + +If {\it resetTimer} is TRUE (the default), the timer is reset to zero +by this call. + +See also \helpref{wxTimer}{wxtimer}. + +\wxheading{Include files} + + + +\membersection{::wxGetLocalTime}\label{wxgetlocaltime} + +\func{long}{wxGetLocalTime}{\void} + +Returns the number of seconds since local time 00:00:00 Jan 1st 1970. + +\wxheading{See also} + +\helpref{wxDateTime::Now}{wxdatetimenow} + +\wxheading{Include files} + + + +\membersection{::wxGetLocalTimeMillis}\label{wxgetlocaltimemillis} + +\func{wxLongLone}{wxGetLocalTimeMillis}{\void} + +Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970. + +\wxheading{See also} + +\helpref{wxDateTime::Now}{wxdatetimenow},\\ +\helpref{wxLongLone}{wxlonglong} + +\wxheading{Include files} + + + +\membersection{::wxGetUTCTime}\label{wxgetutctime} + +\func{long}{wxGetUTCTime}{\void} + +Returns the number of seconds since GMT 00:00:00 Jan 1st 1970. + +\wxheading{See also} + +\helpref{wxDateTime::Now}{wxdatetimenow} + +\wxheading{Include files} + + + +\membersection{::wxStartTimer}\label{wxstarttimer} + +\func{void}{wxStartTimer}{\void} + +Starts a stopwatch; use \helpref{::wxGetElapsedTime}{wxgetelapsedtime} to get the elapsed time. + +See also \helpref{wxTimer}{wxtimer}. + +\wxheading{Include files} + + + \section{Debugging macros and functions}\label{debugmacros} -Useful macros and functins for error checking and defensive programming. ASSERTs are only +Useful macros and functions for error checking and defensive programming. ASSERTs are only compiled if \_\_WXDEBUG\_\_ is defined, whereas CHECK macros stay in release builds. diff --git a/docs/latex/wx/gridattr.tex b/docs/latex/wx/gridattr.tex new file mode 100644 index 0000000000..600dee811b --- /dev/null +++ b/docs/latex/wx/gridattr.tex @@ -0,0 +1,170 @@ +% +% automatically generated by HelpGen from +% grid.h at 11/May/00 18:30:19 +% + + +\section{\class{wxGridCellAttr}}\label{wxgridcellattr} + + + +wxGridCellAttr: this class can be used to alter the cells appearance in +the grid by changing their colour/font/... from default. An object of this +class may be returned by wxGridTable::GetAttr(). + + +\wxheading{Derived from} + +No base class + +\wxheading{Data structures} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxGridCellAttr::wxGridCellAttr}\label{wxgridcellattrwxgridcellattr} + +\func{}{wxGridCellAttr}{\void} + +ctors + + +\membersection{wxGridCellAttr::wxGridCellAttr}\label{wxgridcellattrwxgridcellattr} + +\func{}{wxGridCellAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack}, \param{const wxFont\& }{font}, \param{int }{hAlign}, \param{int }{vAlign}} + +VZ: considering the number of members wxGridCellAttr has now, this ctor +seems to be pretty useless... may be we should just remove it? + + +\membersection{wxGridCellAttr::Clone}\label{wxgridcellattrclone} + +\constfunc{wxGridCellAttr*}{Clone}{\void} + +creates a new copy of this object + + +\membersection{wxGridCellAttr::IncRef}\label{wxgridcellattrincref} + +\func{void}{IncRef}{\void} + +this class is ref counted: it is created with ref count of 1, so +calling DecRef() once will delete it. Calling IncRef() allows to lock +it until the matching DecRef() is called + + +\membersection{wxGridCellAttr::DecRef}\label{wxgridcellattrdecref} + +\func{void}{DecRef}{\void} + + +\membersection{wxGridCellAttr::SetTextColour}\label{wxgridcellattrsettextcolour} + +\func{void}{SetTextColour}{\param{const wxColour\& }{colText}} + +setters + + +\membersection{wxGridCellAttr::SetBackgroundColour}\label{wxgridcellattrsetbackgroundcolour} + +\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}} + + +\membersection{wxGridCellAttr::SetFont}\label{wxgridcellattrsetfont} + +\func{void}{SetFont}{\param{const wxFont\& }{font}} + + +\membersection{wxGridCellAttr::SetAlignment}\label{wxgridcellattrsetalignment} + +\func{void}{SetAlignment}{\param{int }{hAlign}, \param{int }{vAlign}} + + +\membersection{wxGridCellAttr::SetReadOnly}\label{wxgridcellattrsetreadonly} + +\func{void}{SetReadOnly}{\param{bool }{isReadOnly = TRUE}} + + +\membersection{wxGridCellAttr::SetRenderer}\label{wxgridcellattrsetrenderer} + +\func{void}{SetRenderer}{\param{wxGridCellRenderer* }{renderer}} + +takes ownership of the pointer + + +\membersection{wxGridCellAttr::SetEditor}\label{wxgridcellattrseteditor} + +\func{void}{SetEditor}{\param{wxGridCellEditor* }{editor}} + + +\membersection{wxGridCellAttr::HasTextColour}\label{wxgridcellattrhastextcolour} + +\constfunc{bool}{HasTextColour}{\void} + +accessors + + +\membersection{wxGridCellAttr::HasBackgroundColour}\label{wxgridcellattrhasbackgroundcolour} + +\constfunc{bool}{HasBackgroundColour}{\void} + + +\membersection{wxGridCellAttr::HasFont}\label{wxgridcellattrhasfont} + +\constfunc{bool}{HasFont}{\void} + + +\membersection{wxGridCellAttr::HasAlignment}\label{wxgridcellattrhasalignment} + +\constfunc{bool}{HasAlignment}{\void} + + +\membersection{wxGridCellAttr::HasRenderer}\label{wxgridcellattrhasrenderer} + +\constfunc{bool}{HasRenderer}{\void} + + +\membersection{wxGridCellAttr::HasEditor}\label{wxgridcellattrhaseditor} + +\constfunc{bool}{HasEditor}{\void} + + +\membersection{wxGridCellAttr::GetTextColour}\label{wxgridcellattrgettextcolour} + +\constfunc{const wxColour\&}{GetTextColour}{\void} + + +\membersection{wxGridCellAttr::GetBackgroundColour}\label{wxgridcellattrgetbackgroundcolour} + +\constfunc{const wxColour\&}{GetBackgroundColour}{\void} + + +\membersection{wxGridCellAttr::GetFont}\label{wxgridcellattrgetfont} + +\constfunc{const wxFont\&}{GetFont}{\void} + + +\membersection{wxGridCellAttr::GetAlignment}\label{wxgridcellattrgetalignment} + +\constfunc{void}{GetAlignment}{\param{int* }{hAlign}, \param{int* }{vAlign}} + + +\membersection{wxGridCellAttr::GetRenderer}\label{wxgridcellattrgetrenderer} + +\constfunc{wxGridCellRenderer*}{GetRenderer}{\param{wxGrid* }{grid}, \param{int }{row}, \param{int }{col}} + + +\membersection{wxGridCellAttr::GetEditor}\label{wxgridcellattrgeteditor} + +\constfunc{wxGridCellEditor*}{GetEditor}{\param{wxGrid* }{grid}, \param{int }{row}, \param{int }{col}} + + +\membersection{wxGridCellAttr::IsReadOnly}\label{wxgridcellattrisreadonly} + +\constfunc{bool}{IsReadOnly}{\void} + + +\membersection{wxGridCellAttr::SetDefAttr}\label{wxgridcellattrsetdefattr} + +\func{void}{SetDefAttr}{\param{wxGridCellAttr* }{defAttr}} + diff --git a/docs/latex/wx/gridedit.tex b/docs/latex/wx/gridedit.tex new file mode 100644 index 0000000000..67a8e7080b --- /dev/null +++ b/docs/latex/wx/gridedit.tex @@ -0,0 +1,134 @@ +% +% automatically generated by HelpGen from +% grid.h at 11/May/00 18:30:18 +% + + +\section{\class{wxGridCellEditor}}\label{wxgridcelleditor} + + + +wxGridCellEditor: This class is responsible for providing and manipulating +the in-place edit controls for the grid. Instances of wxGridCellEditor +(actually, instances of derived classes since it is an ABC) can be +associated with the cell attributes for individual cells, rows, columns, or +even for the entire grid. + + +\wxheading{Derived from} + +\helpref{wxGridCellWorker}{wxgridcellworker} + +\wxheading{Data structures} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxGridCellEditor::wxGridCellEditor}\label{wxgridcelleditorwxgridcelleditor} + +\func{}{wxGridCellEditor}{\void} + + +\membersection{wxGridCellEditor::IsCreated}\label{wxgridcelleditoriscreated} + +\func{bool}{IsCreated}{\void} + + +\membersection{wxGridCellEditor::Create}\label{wxgridcelleditorcreate} + +\func{void}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{wxEvtHandler* }{evtHandler}} + +Creates the actual edit control + + +\membersection{wxGridCellEditor::SetSize}\label{wxgridcelleditorsetsize} + +\func{void}{SetSize}{\param{const wxRect\& }{rect}} + +Size and position the edit control + + +\membersection{wxGridCellEditor::Show}\label{wxgridcelleditorshow} + +\func{void}{Show}{\param{bool }{show}, \param{wxGridCellAttr* }{attr = NULL}} + +Show or hide the edit control, use the specified attributes to set +colours/fonts for it + + +\membersection{wxGridCellEditor::PaintBackground}\label{wxgridcelleditorpaintbackground} + +\func{void}{PaintBackground}{\param{const wxRect\& }{rectCell}, \param{wxGridCellAttr* }{attr}} + +Draws the part of the cell not occupied by the control: the base class +version just fills it with background colour from the attribute + + +\membersection{wxGridCellEditor::BeginEdit}\label{wxgridcelleditorbeginedit} + +\func{void}{BeginEdit}{\param{int }{row}, \param{int }{col}, \param{wxGrid* }{grid}} + +Fetch the value from the table and prepare the edit control +to begin editing. Set the focus to the edit control. + + +\membersection{wxGridCellEditor::EndEdit}\label{wxgridcelleditorendedit} + +\func{bool}{EndEdit}{\param{int }{row}, \param{int }{col}, \param{wxGrid* }{grid}} + +Complete the editing of the current cell. Returns true if the value has +changed. If necessary, the control may be destroyed. + + +\membersection{wxGridCellEditor::Reset}\label{wxgridcelleditorreset} + +\func{void}{Reset}{\void} + +Reset the value in the control back to its starting value + + +\membersection{wxGridCellEditor::StartingKey}\label{wxgridcelleditorstartingkey} + +\func{void}{StartingKey}{\param{wxKeyEvent\& }{event}} + +If the editor is enabled by pressing keys on the grid, +this will be called to let the editor do something about +that first key if desired. + + +\membersection{wxGridCellEditor::StartingClick}\label{wxgridcelleditorstartingclick} + +\func{void}{StartingClick}{\void} + +if the editor is enabled by clicking on the cell, this method will be +called + + +\membersection{wxGridCellEditor::HandleReturn}\label{wxgridcelleditorhandlereturn} + +\func{void}{HandleReturn}{\param{wxKeyEvent\& }{event}} + +Some types of controls on some platforms may need some help +with the Return key. + + +\membersection{wxGridCellEditor::Destroy}\label{wxgridcelleditordestroy} + +\func{void}{Destroy}{\void} + +Final cleanup + + +\membersection{wxGridCellEditor::Clone}\label{wxgridcelleditorclone} + +\constfunc{wxGridCellEditor*}{Clone}{\void} + +create a new object which is the copy of this one + + +\membersection{wxGridCellEditor::\destruct{wxGridCellEditor}}\label{wxgridcelleditordtor} + +\func{}{\destruct{wxGridCellEditor}}{\void} + +the dtor is private because only DecRef() can delete us + diff --git a/docs/latex/wx/gridrend.tex b/docs/latex/wx/gridrend.tex new file mode 100644 index 0000000000..eed5aa38e8 --- /dev/null +++ b/docs/latex/wx/gridrend.tex @@ -0,0 +1,50 @@ +% +% automatically generated by HelpGen from +% grid.h at 11/May/00 18:30:18 +% + + +\section{\class{wxGridCellRenderer}}\label{wxgridcellrenderer} + + +suppress the stupid gcc warning about the class having private dtor and +no friends + +wxGridCellRenderer: this class is responsible for actually drawing the cell +in the grid. You may pass it to the wxGridCellAttr (below) to change the +format of one given cell or to wxGrid::SetDefaultRenderer() to change the +view of all cells. This is an ABC, you will normally use one of the +predefined derived classes or derive your own class from it. + + +\wxheading{Derived from} + +\helpref{wxGridCellWorker}{wxgridcellworker} + +\wxheading{Data structures} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxGridCellRenderer::Draw}\label{wxgridcellrendererdraw} + +\func{void}{Draw}{\param{wxGrid\& }{grid}, \param{wxGridCellAttr\& }{attr}, \param{wxDC\& }{dc}, \param{const wxRect\& }{rect}, \param{int }{row}, \param{int }{col}, \param{bool }{isSelected}} + +draw the given cell on the provided DC inside the given rectangle +using the style specified by the attribute and the default or selected +state corresponding to the isSelected value. +this pure virtual function has a default implementation which will +prepare the DC using the given attribute: it will draw the rectangle +with the bg colour from attr and set the text colour and font + + +\membersection{wxGridCellRenderer::GetBestSize}\label{wxgridcellrenderergetbestsize} + +\func{wxSize}{GetBestSize}{\param{wxGrid\& }{grid}, \param{wxGridCellAttr\& }{attr}, \param{wxDC\& }{dc}, \param{int }{row}, \param{int }{col}} + +get the preferred size of the cell for its contents + + +\membersection{wxGridCellRenderer::Clone}\label{wxgridcellrendererclone} + +\constfunc{wxGridCellRenderer*}{Clone}{ \ No newline at end of file diff --git a/docs/latex/wx/gridsizr.tex b/docs/latex/wx/gridsizr.tex new file mode 100644 index 0000000000..9beba7fd69 --- /dev/null +++ b/docs/latex/wx/gridsizr.tex @@ -0,0 +1,24 @@ +\section{\class{wxGridSizer}}\label{wxgridsizer} + +A grid sizer is a sizer which lays out its children in a two-dimensional +table with all table fields having the same size, +i.e. the width of each field is the width of the widest child, +the height of each field is the height of the tallest child. + +\wxheading{Derived from} + +\helpref{wxSizer}{wxsizer}\\ +\helpref{wxObject}{wxobject} + +\membersection{wxGridSizer::wxGridSizer}\label{wxgridsizerwxgridsizer} + +\func{}{wxGridSizer}{\param{int }{cols}, \param{int }{rows}, \param{int }{vgap}, \param{int }{hgap}} + +\func{}{wxGridSizer}{\param{int }{cols}, \param{int }{vgap = 0}, \param{int }{hgap = 0}} + +Constructor for a wxGridSizer. {\it rows} and {\it cols} determine the number of +columns and rows in the sizer - if either of the parameters is zero, it will be +calculated to form the total number of children in the sizer, thus making the +sizer grow dynamically. {\it vgap} and {\it hgap} define extra space between +all children. + diff --git a/docs/latex/wx/gridtbl.tex b/docs/latex/wx/gridtbl.tex new file mode 100644 index 0000000000..223e826450 --- /dev/null +++ b/docs/latex/wx/gridtbl.tex @@ -0,0 +1,236 @@ +\section{\class{wxGridTableBase}}\label{wxgridtablebase} + + +Grid table classes + +\wxheading{Derived from} + +\helpref{wxObject}{wxobject} + +\wxheading{Data structures} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxGridTableBase::wxGridTableBase}\label{wxgridtablebasewxgridtablebase} + +\func{}{wxGridTableBase}{\void} + + +\membersection{wxGridTableBase::\destruct{wxGridTableBase}}\label{wxgridtablebasedtor} + +\func{}{\destruct{wxGridTableBase}}{\void} + + +\membersection{wxGridTableBase::GetNumberRows}\label{wxgridtablebasegetnumberrows} + +\func{int}{GetNumberRows}{\void} + +You must override these functions in a derived table class + + +\membersection{wxGridTableBase::GetNumberCols}\label{wxgridtablebasegetnumbercols} + +\func{int}{GetNumberCols}{\void} + + +\membersection{wxGridTableBase::IsEmptyCell}\label{wxgridtablebaseisemptycell} + +\func{bool}{IsEmptyCell}{\param{int }{row}, \param{int }{col}} + + +\membersection{wxGridTableBase::GetValue}\label{wxgridtablebasegetvalue} + +\func{wxString}{GetValue}{\param{int }{row}, \param{int }{col}} + + +\membersection{wxGridTableBase::SetValue}\label{wxgridtablebasesetvalue} + +\func{void}{SetValue}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{value}} + + +\membersection{wxGridTableBase::GetTypeName}\label{wxgridtablebasegettypename} + +\func{wxString}{GetTypeName}{\param{int }{row}, \param{int }{col}} + +Data type determination and value access + + +\membersection{wxGridTableBase::CanGetValueAs}\label{wxgridtablebasecangetvalueas} + +\func{bool}{CanGetValueAs}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}} + + +\membersection{wxGridTableBase::CanSetValueAs}\label{wxgridtablebasecansetvalueas} + +\func{bool}{CanSetValueAs}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}} + + +\membersection{wxGridTableBase::GetValueAsLong}\label{wxgridtablebasegetvalueaslong} + +\func{long}{GetValueAsLong}{\param{int }{row}, \param{int }{col}} + + +\membersection{wxGridTableBase::GetValueAsDouble}\label{wxgridtablebasegetvalueasdouble} + +\func{double}{GetValueAsDouble}{\param{int }{row}, \param{int }{col}} + + +\membersection{wxGridTableBase::GetValueAsBool}\label{wxgridtablebasegetvalueasbool} + +\func{bool}{GetValueAsBool}{\param{int }{row}, \param{int }{col}} + + +\membersection{wxGridTableBase::SetValueAsLong}\label{wxgridtablebasesetvalueaslong} + +\func{void}{SetValueAsLong}{\param{int }{row}, \param{int }{col}, \param{long }{value}} + + +\membersection{wxGridTableBase::SetValueAsDouble}\label{wxgridtablebasesetvalueasdouble} + +\func{void}{SetValueAsDouble}{\param{int }{row}, \param{int }{col}, \param{double }{value}} + + +\membersection{wxGridTableBase::SetValueAsBool}\label{wxgridtablebasesetvalueasbool} + +\func{void}{SetValueAsBool}{\param{int }{row}, \param{int }{col}, \param{bool }{value}} + + +\membersection{wxGridTableBase::GetValueAsCustom}\label{wxgridtablebasegetvalueascustom} + +\func{void*}{GetValueAsCustom}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}} + +For user defined types + + +\membersection{wxGridTableBase::SetValueAsCustom}\label{wxgridtablebasesetvalueascustom} + +\func{void}{SetValueAsCustom}{\param{int }{row}, \param{int }{col}, \param{const wxString\& }{typeName}, \param{void* }{value}} + + +\membersection{wxGridTableBase::SetView}\label{wxgridtablebasesetview} + +\func{void}{SetView}{\param{wxGrid* }{grid}} + +Overriding these is optional + + +\membersection{wxGridTableBase::GetView}\label{wxgridtablebasegetview} + +\constfunc{wxGrid *}{GetView}{\void} + + +\membersection{wxGridTableBase::Clear}\label{wxgridtablebaseclear} + +\func{void}{Clear}{\void} + + +\membersection{wxGridTableBase::InsertRows}\label{wxgridtablebaseinsertrows} + +\func{bool}{InsertRows}{\param{size\_t }{pos = 0}, \param{size\_t }{numRows = 1}} + + +\membersection{wxGridTableBase::AppendRows}\label{wxgridtablebaseappendrows} + +\func{bool}{AppendRows}{\param{size\_t }{numRows = 1}} + + +\membersection{wxGridTableBase::DeleteRows}\label{wxgridtablebasedeleterows} + +\func{bool}{DeleteRows}{\param{size\_t }{pos = 0}, \param{size\_t }{numRows = 1}} + + +\membersection{wxGridTableBase::InsertCols}\label{wxgridtablebaseinsertcols} + +\func{bool}{InsertCols}{\param{size\_t }{pos = 0}, \param{size\_t }{numCols = 1}} + + +\membersection{wxGridTableBase::AppendCols}\label{wxgridtablebaseappendcols} + +\func{bool}{AppendCols}{\param{size\_t }{numCols = 1}} + + +\membersection{wxGridTableBase::DeleteCols}\label{wxgridtablebasedeletecols} + +\func{bool}{DeleteCols}{\param{size\_t }{pos = 0}, \param{size\_t }{numCols = 1}} + + +\membersection{wxGridTableBase::GetRowLabelValue}\label{wxgridtablebasegetrowlabelvalue} + +\func{wxString}{GetRowLabelValue}{\param{int }{row}} + + +\membersection{wxGridTableBase::GetColLabelValue}\label{wxgridtablebasegetcollabelvalue} + +\func{wxString}{GetColLabelValue}{\param{int }{col}} + + +\membersection{wxGridTableBase::SetRowLabelValue}\label{wxgridtablebasesetrowlabelvalue} + +\func{void}{SetRowLabelValue}{\param{int }{WXUNUSED(row)}, \param{const }{wxString\&}} + + +\membersection{wxGridTableBase::SetColLabelValue}\label{wxgridtablebasesetcollabelvalue} + +\func{void}{SetColLabelValue}{\param{int }{WXUNUSED(col)}, \param{const }{wxString\&}} + + +\membersection{wxGridTableBase::SetAttrProvider}\label{wxgridtablebasesetattrprovider} + +\func{void}{SetAttrProvider}{\param{wxGridCellAttrProvider* }{attrProvider}} + +Attribute handling +give us the attr provider to use - we take ownership of the pointer + + +\membersection{wxGridTableBase::GetAttrProvider}\label{wxgridtablebasegetattrprovider} + +\constfunc{wxGridCellAttrProvider*}{GetAttrProvider}{\void} + +get the currently used attr provider (may be NULL) + + +\membersection{wxGridTableBase::CanHaveAttributes}\label{wxgridtablebasecanhaveattributes} + +\func{bool}{CanHaveAttributes}{\void} + +Does this table allow attributes? Default implementation creates +a wxGridCellAttrProvider if necessary. + + +\membersection{wxGridTableBase::UpdateAttrRows}\label{wxgridtablebaseupdateattrrows} + +\func{void}{UpdateAttrRows}{\param{size\_t }{pos}, \param{int }{numRows}} + +change row/col number in attribute if needed + + +\membersection{wxGridTableBase::UpdateAttrCols}\label{wxgridtablebaseupdateattrcols} + +\func{void}{UpdateAttrCols}{\param{size\_t }{pos}, \param{int }{numCols}} + + +\membersection{wxGridTableBase::GetAttr}\label{wxgridtablebasegetattr} + +\func{wxGridCellAttr*}{GetAttr}{\param{int }{row}, \param{int }{col}} + +by default forwarded to wxGridCellAttrProvider if any. May be +overridden to handle attributes directly in the table. + + +\membersection{wxGridTableBase::SetAttr}\label{wxgridtablebasesetattr} + +\func{void}{SetAttr}{\param{wxGridCellAttr* }{attr}, \param{int }{row}, \param{int }{col}} + +these functions take ownership of the pointer + + +\membersection{wxGridTableBase::SetRowAttr}\label{wxgridtablebasesetrowattr} + +\func{void}{SetRowAttr}{\param{wxGridCellAttr* }{attr}, \param{int }{row}} + + +\membersection{wxGridTableBase::SetColAttr}\label{wxgridtablebasesetcolattr} + +\func{void}{SetColAttr}{\param{wxGridCellAttr* }{attr}, \param{int }{col}} + diff --git a/docs/latex/wx/gridwork.tex b/docs/latex/wx/gridwork.tex new file mode 100644 index 0000000000..c8dcc258a3 --- /dev/null +++ b/docs/latex/wx/gridwork.tex @@ -0,0 +1,59 @@ +% +% automatically generated by HelpGen from +% grid.h at 11/May/00 18:30:18 +% + + +\section{\class{wxGridCellWorker}}\label{wxgridcellworker} + + + +wxGridCellWorker: common base class for wxGridCellRenderer and +wxGridCellEditor +NB: this is more an implementation convenience than a design issue, so this +class is not documented and is not public at all + + +\wxheading{Derived from} + +No base class + +\wxheading{Data structures} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxGridCellWorker::wxGridCellWorker}\label{wxgridcellworkerwxgridcellworker} + +\func{}{wxGridCellWorker}{\void} + + +\membersection{wxGridCellWorker::IncRef}\label{wxgridcellworkerincref} + +\func{void}{IncRef}{\void} + +this class is ref counted: it is created with ref count of 1, so +calling DecRef() once will delete it. Calling IncRef() allows to lock +it until the matching DecRef() is called + + +\membersection{wxGridCellWorker::DecRef}\label{wxgridcellworkerdecref} + +\func{void}{DecRef}{\void} + + +\membersection{wxGridCellWorker::SetParameters}\label{wxgridcellworkersetparameters} + +\func{void}{SetParameters}{\param{const wxString\& }{params}} + +interpret renderer parameters: arbitrary string whose interpretatin is +left to the derived classes + + +\membersection{wxGridCellWorker::\destruct{wxGridCellWorker}}\label{wxgridcellworkerdtor} + +\func{}{\destruct{wxGridCellWorker}}{\void} + +virtual dtor for any base class - private because only DecRef() can +delete us + diff --git a/docs/latex/wx/hash.tex b/docs/latex/wx/hash.tex index 21dc3642cd..6e45cab36e 100644 --- a/docs/latex/wx/hash.tex +++ b/docs/latex/wx/hash.tex @@ -95,7 +95,7 @@ is destroyed. \func{wxObject *}{Get}{\param{long}{ key}} -\func{wxObject *}{Get}{\param{const wxString\& }{ key}} +\func{wxObject *}{Get}{\param{const char*}{ key}} Gets data from the hash table, using an integer or string key (depending on which has table constructor was used). @@ -121,13 +121,12 @@ description for \helpref{wxNode}{wxnode}. The user will probably only wish to us \func{void}{Put}{\param{long}{ key}, \param{wxObject *}{object}} -\func{void}{Put}{\param{const wxString\& }{ key}, \param{wxObject *}{object}} +\func{void}{Put}{\param{const char*}{ key}, \param{wxObject *}{object}} Inserts data into the hash table, using an integer or string key (depending on which has table constructor was used). The key string is copied and stored by the hash table implementation. - \membersection{wxList::GetCount} \constfunc{size\_t}{GetCount}{\void} diff --git a/docs/latex/wx/helpinst.tex b/docs/latex/wx/helpinst.tex index f0bcaaccb6..c93b02c263 100644 --- a/docs/latex/wx/helpinst.tex +++ b/docs/latex/wx/helpinst.tex @@ -31,6 +31,8 @@ There are currently the following help controller classes defined: \begin{itemize}\itemsep=0pt \item wxWinHelpController, for controlling Windows Help. +\item wxCHMHelpController, for controlling MS HTML Help. To use this, you need to set wxUSE\_MS\_HTML\_HELP +to 0 in setup.h, and link your application with Microsoft's htmlhelp.lib. Currently VC++ only. \item wxExtHelpController, for controlling external browsers under Unix. The default browser is Netscape Navigator. The 'help' sample shows its use. \item wxHelpControllerHtml, using \helpref{wxHTML}{wxhtml} to display help. See {\tt wx/helpwxht.h} for @@ -51,6 +53,7 @@ wxHelpControllerBase\\ (wxWindows chooses the appropriate help controller class)\\ (wxHelpControllerBase class)\\ (Windows Help controller)\\ + (MS HTML Help controller)\\ (external HTML browser controller)\\ (simple wxHTML-based help controller)\\ (advanced wxHTML based help controller: wxHtmlHelpController) @@ -98,10 +101,14 @@ If the help viewer is not running, runs it and displays the file at the given bl {\it WinHelp:} Refers to the context number. +{\it MS HTML Help:} Refers to the context number. + {\it External HTML help:} the same as for \helpref{wxHelpController::DisplaySection}{wxhelpcontrollerdisplaysection}. {\it wxHtmlHelpController:} {\it sectionNo} is an identifier as specified in the {\tt .hhc} file. See \helpref{Help files format}{helpformat}. +This function is for backward compatibility only, and applications should use \helpref{wxHelpController}{wxhelpcontrollerdisplaysection} instead. + \membersection{wxHelpController::DisplayContents}\label{wxhelpcontrollerdisplaycontents} \func{virtual bool}{DisplayContents}{\void} @@ -111,13 +118,23 @@ contents. \membersection{wxHelpController::DisplaySection}\label{wxhelpcontrollerdisplaysection} +\func{virtual bool}{DisplaySection}{\param{const wxString\&}{ section}} + +If the help viewer is not running, runs it and displays the given section. + +The interpretation of {\it section} differs between help viewers. For most viewers, +this call is equivalent to KeywordSearch. For MS HTML Help, external HTML help +and simple wxHTML help, if {\it section} has a .htm +or .html extension, that HTML file will be displayed; otherwise +a keyword search is done. + \func{virtual bool}{DisplaySection}{\param{int}{ sectionNo}} If the help viewer is not running, runs it and displays the given section. -{\it WinHelp:} {\it sectionNo} is a context id. +{\it WinHelp, MS HTML Help:} {\it sectionNo} is a context id. -{\it External HTML help/wxHTML based help:} wxExtHelpController and wxHelpControllerHtml implement {\it sectionNo} as an id in a map file, which is of the form: +{\it External HTML help/simple wxHTML help:} wxExtHelpController and wxHelpControllerHtml implement {\it sectionNo} as an id in a map file, which is of the form: \begin{verbatim} 0 wx.html ; Index @@ -127,6 +144,8 @@ If the help viewer is not running, runs it and displays the given section. {\it wxHtmlHelpController:} {\it sectionNo} is an identifier as specified in the {\tt .hhc} file. See \helpref{Help files format}{helpformat}. +See also the help sample for notes on how to specify section numbers for various help file formats. + \membersection{wxHelpController::GetFrameParameters}\label{wxhelpcontrollergetframeparameters} \func{virtual wxFrame *}{GetFrameParameters}{\param{const wxSize * }{size = NULL}, \param{const wxPoint * }{pos = NULL}, @@ -159,10 +178,10 @@ that the viewer is a variant of Netscape Navigator.} If the help viewer is not running, runs it, and searches for sections matching the given keyword. If one match is found, the file is displayed at this section. -{\it WinHelp:} If more than one match is found, +{\it WinHelp, MS HTML Help:} If more than one match is found, the first topic is displayed. -{\it External HTML help:} If more than one match is found, +{\it External HTML help, simple wxHTML help:} If more than one match is found, a choice of topics is displayed. {\it wxHtmlHelpController:} see \helpref{wxHtmlHelpController::KeywordSearch}{wxhtmlhelpcontrollerkeywordsearch}. diff --git a/docs/latex/wx/hteasypr.tex b/docs/latex/wx/hteasypr.tex index 03e8875f4c..ec4b0d337d 100644 --- a/docs/latex/wx/hteasypr.tex +++ b/docs/latex/wx/hteasypr.tex @@ -41,15 +41,24 @@ Constructor. \membersection{wxHtmlEasyPrinting::PreviewFile}\label{wxhtmleasyprintingpreviewfile} -\func{void}{PreviewFile}{\param{const wxString\& }{htmlfile}} +\func{bool}{PreviewFile}{\param{const wxString\& }{htmlfile}} + +Preview HTML file. + +Returns FALSE in case of error -- call +\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed +information about the kind of the error. -Previews HTML file. \membersection{wxHtmlEasyPrinting::PreviewText}\label{wxhtmleasyprintingpreviewtext} -\func{void}{PreviewText}{\param{const wxString\& }{htmltext}, \param{const wxString\& }{basepath = wxEmptyString}} +\func{bool}{PreviewText}{\param{const wxString\& }{htmltext}, \param{const wxString\& }{basepath = wxEmptyString}} -Previews HTML text (not file!). +Preview HTML text (not file!). + +Returns FALSE in case of error -- call +\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed +information about the kind of the error. \wxheading{Parameters} @@ -60,15 +69,23 @@ file). It is used to determine path for loading images, for example.} \membersection{wxHtmlEasyPrinting::PrintFile}\label{wxhtmleasyprintingprintfile} -\func{void}{PrintFile}{\param{const wxString\& }{htmlfile}} +\func{bool}{PrintFile}{\param{const wxString\& }{htmlfile}} -Prints HTML file. +Print HTML file. + +Returns FALSE in case of error -- call +\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed +information about the kind of the error. \membersection{wxHtmlEasyPrinting::PrintText}\label{wxhtmleasyprintingprinttext} -\func{void}{PrintText}{\param{const wxString\& }{htmltext}, \param{const wxString\& }{basepath = wxEmptyString}} +\func{bool}{PrintText}{\param{const wxString\& }{htmltext}, \param{const wxString\& }{basepath = wxEmptyString}} -Prints HTML text (not file!). +Print HTML text (not file!). + +Returns FALSE in case of error -- call +\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed +information about the kind of the error. \wxheading{Parameters} @@ -81,19 +98,19 @@ file). It is used to determine path for loading images, for example.} \func{void}{PrinterSetup}{\void} -Displays printer setup dialog and allows the user to modify settings. +Display printer setup dialog and allows the user to modify settings. \membersection{wxHtmlEasyPrinting::PageSetup}\label{wxhtmleasyprintingpagesetup} \func{void}{PageSetup}{\void} -Displays page setup dialog and allows the user to modify settings. +Display page setup dialog and allows the user to modify settings. \membersection{wxHtmlEasyPrinting::SetHeader}\label{wxhtmleasyprintingsetheader} \func{void}{SetHeader}{\param{const wxString\& }{header}, \param{int }{pg = wxPAGE\_ALL}} -Sets page header. +Set page header. \wxheading{Parameters} @@ -111,7 +128,7 @@ Sets page header. \func{void}{SetFooter}{\param{const wxString\& }{footer}, \param{int }{pg = wxPAGE\_ALL}} -Sets page footer. +Set page footer. \wxheading{Parameters} diff --git a/docs/latex/wx/hthelpct.tex b/docs/latex/wx/hthelpct.tex index 8d2a141ae1..fdc46abd1a 100644 --- a/docs/latex/wx/hthelpct.tex +++ b/docs/latex/wx/hthelpct.tex @@ -61,6 +61,7 @@ Constructor. \begin{twocollist}\itemsep=0pt \twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.} +\twocolitem{\windowstyle{wxHF\_FLATTOOLBAR}}{Help frame has toolbar with flat buttons (aka coolbar).} \twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.} \twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.} \twocolitem{\windowstyle{wxHF\_SEARCH}}{Help frame has search panel.} @@ -89,7 +90,7 @@ If {\it show\_wait\_msg} is TRUE then a decorationless window with progress mess \func{virtual wxHtmlHelpFrame*}{CreateHelpFrame}{\param{wxHtmlHelpData * }{data}} -This protected virtual method may be overriden so that the controller +This protected virtual method may be overridden so that the controller uses slightly different frame. See {\it samples/html/helpview} sample for an example. \membersection{wxHtmlHelpController::Display}\label{wxhtmlhelpcontrollerdisplay} @@ -144,7 +145,7 @@ Displays help window and focuses index panel. Displays help window, focuses search panel and starts searching. Returns TRUE if the keyword was found. -{\bf Important:} KeywordSearch searches only pages listed in .htc file(s). +{\bf Important:} KeywordSearch searches only pages listed in .hhc file(s). You should list all pages in the contents file. \membersection{wxHtmlHelpController::ReadCustomization}\label{wxhtmlhelpcontrollerreadcustomization} diff --git a/docs/latex/wx/hthlpfrm.tex b/docs/latex/wx/hthlpfrm.tex index d255a73df8..4d6f187109 100644 --- a/docs/latex/wx/hthlpfrm.tex +++ b/docs/latex/wx/hthlpfrm.tex @@ -32,6 +32,7 @@ Constructor. \begin{twocollist}\itemsep=0pt \twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.} +\twocolitem{\windowstyle{wxHF\_FLATTOOLBAR}}{Help frame has toolbar with flat buttons (aka coolbar).} \twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.} \twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.} \twocolitem{\windowstyle{wxHF\_SEARCH}}{Help frame has search panel.} @@ -50,9 +51,13 @@ Creates the frame. \begin{twocollist}\itemsep=0pt \twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.} +\twocolitem{\windowstyle{wxHF\_FLATTOOLBAR}}{Help frame has toolbar with flat buttons (aka coolbar).} \twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.} \twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.} \twocolitem{\windowstyle{wxHF\_SEARCH}}{Help frame has search panel.} +\twocolitem{\windowstyle{wxHF\_BOOKMARKS}}{Help frame has bookmarks controls.} +\twocolitem{\windowstyle{wxHF\_OPENFILES}}{Allow user to open arbitrary HTML document.} +\twocolitem{\windowstyle{wxHF\_PRINT}}{Toolbar contains "print" button.} \end{twocollist} \membersection{wxHtmlHelpFrame::CreateContents}\label{wxhtmlhelpframecreatecontents} diff --git a/docs/latex/wx/htmlcell.tex b/docs/latex/wx/htmlcell.tex index 731cb02a12..15a8508bcf 100644 --- a/docs/latex/wx/htmlcell.tex +++ b/docs/latex/wx/htmlcell.tex @@ -30,7 +30,7 @@ This image shows you cells and containers: \wxheading{Using Containers in Tag Handler} \helpref{wxHtmlWinParser}{wxhtmlwinparser} provides a user-friendly way -of managing containers. It's based on the idea of opening and closing containers. +of managing containers. It is based on the idea of opening and closing containers. Use \helpref{OpenContainer}{wxhtmlwinparseropencontainer} to open new a container {\it within an already opened container}. This new container is a @@ -47,7 +47,7 @@ See explanation: \helponly{\image{}{cont.bmp}} \end{comment} -It's clear there must be same number of calls to +It is clear there must be same number of calls to OpenContainer as to CloseContainer... \wxheading{Example} diff --git a/docs/latex/wx/htmlhand.tex b/docs/latex/wx/htmlhand.tex index 5017dd593e..26012444c9 100644 --- a/docs/latex/wx/htmlhand.tex +++ b/docs/latex/wx/htmlhand.tex @@ -54,7 +54,7 @@ the structure of macros. See macros reference: Starts handler definition. {\it name} is handler identifier (in fact part of class name), {\it tags} is string containing list of tags supported by this handler (in uppercase). This macro derives new class from -wxHtmlWinTagHandler and implements it's +wxHtmlWinTagHandler and implements it is \helpref{GetSupportedTags}{wxhtmltaghandlergetsupportedtags} method. Example: TAG\_HANDLER\_BEGIN(FONTS, "B,I,U,T") diff --git a/docs/latex/wx/htmlhlpf.tex b/docs/latex/wx/htmlhlpf.tex index efb11a99ec..dbc30ba75a 100644 --- a/docs/latex/wx/htmlhlpf.tex +++ b/docs/latex/wx/htmlhlpf.tex @@ -6,7 +6,7 @@ your tex2rtf.ini file. (See \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} for help controller description.) -A {\bf book} consists of three files : header file, contents file and index file. +A {\bf book} consists of three files: header file, contents file and index file. You can make a regular zip archive of these files, plus the HTML and any image files, for wxHTML (or helpview) to read; and the .zip file can optionally be renamed to .htb. diff --git a/docs/latex/wx/htmlstrt.tex b/docs/latex/wx/htmlstrt.tex index a8405f36cf..726b3223de 100644 --- a/docs/latex/wx/htmlstrt.tex +++ b/docs/latex/wx/htmlstrt.tex @@ -15,7 +15,7 @@ passed {\bf string}. See the example: mywin -> LoadPage("test.htm"); mywin -> SetPage("" "

    Error

    " - "Some error occured :-H)" + "Some error occurred :-H)" ""); \end{verbatim} @@ -43,7 +43,7 @@ See the example: html -> SetRelatedStatusBar(0); \end{verbatim} -The first command associates html object with it's parent frame +The first command associates html object with it is parent frame (this points to wxFrame object there) and sets format of title. Page title "Hello, world!" will be displayed as "HTML : Hello, world!" in this example. diff --git a/docs/latex/wx/htparser.tex b/docs/latex/wx/htparser.tex index 9398443390..b9d848e609 100644 --- a/docs/latex/wx/htparser.tex +++ b/docs/latex/wx/htparser.tex @@ -103,7 +103,7 @@ This must be called after DoParsing(). \constfunc{wxFileSystem*}{GetFS}{\void} Returns pointer to the file system. Because each tag handler has -reference to it's parent parser it can easily request the file by +reference to it is parent parser it can easily request the file by calling \begin{verbatim} @@ -131,7 +131,7 @@ Returns pointer to the source being parsed. \func{virtual void}{InitParser}{\param{const wxString\& }{source}} -Setups the parser for parsing the {\it source} string. (Should be overriden +Setups the parser for parsing the {\it source} string. (Should be overridden in derived class) \membersection{wxHtmlParser::Parse}\label{wxhtmlparserparse} @@ -188,7 +188,7 @@ It is obvious that you cannot use only one tag handler for tag. Instead you must use context-sensitive handlers for inside and inside . -This is the prefered solution: +This is the preferred solution: \begin{verbatim} TAG_HANDLER_BEGIN(MYITEM, "MYITEMS") diff --git a/docs/latex/wx/httag.tex b/docs/latex/wx/httag.tex index 17fea3117d..91a4713494 100644 --- a/docs/latex/wx/httag.tex +++ b/docs/latex/wx/httag.tex @@ -22,7 +22,7 @@ wxObject \func{}{wxHtmlTag}{\param{const wxString\& }{source}, \param{int }{pos}, \param{int }{end\_pos}, \param{wxHtmlTagsCache* }{cache}} -Constructor. You'll probably never have to construct a wxHtmlTag object +Constructor. You will probably never have to construct a wxHtmlTag object yourself. Feel free to ignore the constructor parameters. Have a look at lib/htmlparser.cpp if you're interested in creating it. diff --git a/docs/latex/wx/httagmod.tex b/docs/latex/wx/httagmod.tex index 4a2533be67..891fe52091 100644 --- a/docs/latex/wx/httagmod.tex +++ b/docs/latex/wx/httagmod.tex @@ -28,7 +28,7 @@ tag handlers. It is used almost exclusively together with set of \func{virtual void}{FillHandlersTable}{\param{wxHtmlWinParser }{*parser}} -You must override this method. In most common case it's body consists +You must override this method. In most common case it is body consists only of lines of following type: \begin{verbatim} diff --git a/docs/latex/wx/htwidget.tex b/docs/latex/wx/htwidget.tex index f9b765a6db..21f3ea8094 100644 --- a/docs/latex/wx/htwidget.tex +++ b/docs/latex/wx/htwidget.tex @@ -28,7 +28,7 @@ Constructor. \wxheading{Parameters} -\docparam{wnd}{Connected window. It's parent window {\bf must} be the wxHtmlWindow object within +\docparam{wnd}{Connected window. It is parent window {\bf must} be the wxHtmlWindow object within which it is displayed!} \docparam{w}{Floating width. If non-zero width of {\it wnd} window is adjusted so that it is diff --git a/docs/latex/wx/htwindow.tex b/docs/latex/wx/htwindow.tex index 2c5345ca6a..622efd4e73 100644 --- a/docs/latex/wx/htwindow.tex +++ b/docs/latex/wx/htwindow.tex @@ -127,7 +127,7 @@ htmlwin -> SetPage("help/myproject/index.htm"); \wxheading{Return value} -FALSE if an error occured, TRUE otherwise +FALSE if an error occurred, TRUE otherwise \membersection{wxHtmlWindow::OnLinkClicked}\label{wxhtmlwindowonlinkclicked} @@ -230,7 +230,7 @@ If you want to load a document from some location use \wxheading{Return value} -FALSE if an error occured, TRUE otherwise. +FALSE if an error occurred, TRUE otherwise. \membersection{wxHtmlWindow::SetRelatedFrame}\label{wxhtmlwindowsetrelatedframe} diff --git a/docs/latex/wx/htwinprs.tex b/docs/latex/wx/htwinprs.tex index feea123a7c..cfdb392f39 100644 --- a/docs/latex/wx/htwinprs.tex +++ b/docs/latex/wx/htwinprs.tex @@ -80,7 +80,7 @@ Returns default horizontal alignment. \constfunc{int}{GetCharHeight}{\void} -Returns (average) char height in standard font. It's used as DC-independent metrics. +Returns (average) char height in standard font. It is used as DC-independent metrics. {\bf Note:} This function doesn't return the {\it actual} height. If you want to know the height of the current font, call {\tt GetDC -> GetCharHeight()}. @@ -89,7 +89,7 @@ know the height of the current font, call {\tt GetDC -> GetCharHeight()}. \constfunc{int}{GetCharWidth}{\void} -Returns average char width in standard font. It's used as DC-independent metrics. +Returns average char width in standard font. It is used as DC-independent metrics. {\bf Note:} This function doesn't return the {\it actual} width. If you want to know the height of the current font, call {\tt GetDC -> GetCharWidth()} diff --git a/docs/latex/wx/hworld.tex b/docs/latex/wx/hworld.tex index 72116a4400..13ef9285db 100644 --- a/docs/latex/wx/hworld.tex +++ b/docs/latex/wx/hworld.tex @@ -1,11 +1,11 @@ \section{wxWindows "Hello World"}\label{helloworld} As many people have requested a mini-sample to be published here -so that some quick judgements concerning syntax +so that some quick judgments concerning syntax and basic principles can be made, you can now look at wxWindows' "Hello World": -You have to include wxWindows's header files, of course. This can +You have to include wxWindows' header files, of course. This can be done on a file by file basis (such as \#include "wx/window.h") or using one global include (\#include "wx/wx.h"). This is also useful on platforms which support precompiled headers such @@ -75,7 +75,7 @@ enum }; \end{verbatim} -We then procede to actually implement an event table in which the events +We then proceed to actually implement an event table in which the events are routed to their respective handler functions in the class MyFrame. There are predefined macros for routing all common events, ranging from the selection of a list box entry to a resize event when a user resizes @@ -101,11 +101,11 @@ using this macro, which creates an application instance and starts the program. IMPLEMENT_APP(MyApp) \end{verbatim} -As mentionend above, wxApp::OnInit() is called upon startup and should be +As mentioned above, wxApp::OnInit() is called upon startup and should be used to initialize the program, maybe showing a "splash screen" and creating the main window (or several). The frame should get a title bar text ("Hello World") and a position and start-up size. One frame can also be declared to be the -top window. Returning TRUE indicates a successful intialization. +top window. Returning TRUE indicates a successful initialization. \begin{verbatim} bool MyApp::OnInit() @@ -142,9 +142,9 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) \end{verbatim} Here are the actual event handlers. MyFrame::OnQuit() closes the main window -by calling Close(). The paramter TRUE indicates that other windows have no veto +by calling Close(). The parameter TRUE indicates that other windows have no veto power such as after asking "Do you really want to close?". If there is no other -main window left, the applicatin will quit. +main window left, the application will quit. \begin{verbatim} void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) @@ -159,7 +159,7 @@ case a typical "About" window with information about the program. \begin{verbatim} void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - wxMessageBox( "This is a wxWindows's Hello world sample", + wxMessageBox( "This is a wxWindows' Hello world sample", "About Hello World", wxOK | wxICON_INFORMATION ); } \end{verbatim} diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex index 136d07a3d5..f05d95e848 100644 --- a/docs/latex/wx/image.tex +++ b/docs/latex/wx/image.tex @@ -29,7 +29,7 @@ handler with \helpref{wxImage::AddHandler}{wximageaddhandler} or \twocolitem{{\bf \indexit{wxGIFHandler}}}{Only for loading, due to legal issues.} \twocolitem{{\bf \indexit{wxPCXHandler}}}{For loading and saving (see below).} \twocolitem{{\bf \indexit{wxPNMHandler}}}{For loading and saving (see below).} -\twocolitem{{\bf \indexit{wxTIFFHandler}}}{For loading and saving.} +\twocolitem{{\bf \indexit{wxTIFFHandler}}}{For loading.} \end{twocollist} When saving in PCX format, {\bf wxPCXHandler} will count the number of @@ -74,6 +74,13 @@ and forth without loss in that respect. Creates an image with the given width and height. +\func{}{wxImage}{\param{int}{ width}, \param{int}{ height}, \param{unsigned char*}{ data}, \param{bool}{ static_data=FALSE}} + +Creates an image from given data with the given width and height. If +{\it static_data} is TRUE, then wxImage will not delete the actual +image data in its destructor, otherwise it will free it by calling +{\it free()}. + \func{}{wxImage}{\param{const wxString\& }{name}, \param{long}{ type = wxBITMAP\_TYPE\_ANY}} \func{}{wxImage}{\param{const wxString\& }{name}, \param{const wxString\&}{ mimetype}} @@ -180,6 +187,16 @@ on program start-up to look up colors. This ensures a very fast conversion, but the image quality won't be perfect (and could be better for photo images using more sophisticated dithering algorithms). +On Windows, if there is a palette present (set with SetPalette), it will be used when +creating the wxBitmap (most useful in 8-bit display mode). On other platforms, +the palette is currently ignored. + +\membersection{wxImage::Copy}\label{wximagecopy} + +\constfunc{wxImage}{Copy}{\void} + +Returns an identical copy of the image. + \membersection{wxImage::Create}\label{wximagecreate} \func{bool}{Create}{\param{int}{ width}, \param{int}{ height}} @@ -296,6 +313,15 @@ Gets the green value of the mask colour. Gets the red value of the mask colour. +\membersection{wxImage::GetPalette}\label{wximagegetpalette} + +\constfunc{const wxPalette\&}{GetPalette}{\void} + +Returns the palette associated with the image. Currently the palette is only +used in ConvertToBitmap under Windows. + +Eventually wxImage handlers will set the palette if one exists in the image file. + \membersection{wxImage::GetSubImage}\label{wximagegetsubimage} \constfunc{wxImage}{GetSubImage}{\param{const wxRect\&}{ rect}} @@ -458,7 +484,6 @@ Saves a image in the given stream. \twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Save a PNG image file.} \twocolitem{{\bf wxBITMAP\_TYPE\_PCX}}{Save a PCX image file (tries to save as 8-bit if possible, falls back to 24-bit otherwise).} \twocolitem{{\bf wxBITMAP\_TYPE\_PNM}}{Save a PNM image file (as raw RGB always).} -\twocolitem{{\bf wxBITMAP\_TYPE\_TIF}}{Save a TIFF image file.} \end{twocollist}} \docparam{mimetype}{MIME type.} @@ -485,6 +510,13 @@ mimetype to the named file} \end{twocollist}} } +\membersection{wxImage::Mirror}\label{wximagemirror} + +\constfunc{wxImage}{Mirror}{\param{bool}{ horizontally = TRUE}} + +Returns a mirrored copy of the image. The parameter {\it horizontally} +indicates the orientation. + \membersection{wxImage::Replace}\label{wximagereplace} \func{void}{Replace}{\param{unsigned char}{ r1}, \param{unsigned char}{ g1}, \param{unsigned char}{ b1}, @@ -517,6 +549,13 @@ rotated image background. Else, black (rgb 0, 0, 0) will be used. Returns the rotated image, leaving this image intact. +\membersection{wxImage::Rotate90}\label{wximagerotate90} + +\constfunc{wxImage}{Rotate90}{\param{bool}{ clockwise = TRUE}} + +Returns a copy of the image rotated 90 degrees in the direction +indicated by {\it clockwise}. + \membersection{wxImage::Scale}\label{wximagescale} \constfunc{wxImage}{Scale}{\param{int}{ width}, \param{int}{ height}} @@ -526,7 +565,7 @@ scaling bitmaps in general as the only other way to scale bitmaps is to blit a wxMemoryDC into another wxMemoryDC. It may be mentioned that the GTK port uses this function internally -to scale bitmaps when using mapping mode in wxDC. +to scale bitmaps when using mapping modes in wxDC. Example: @@ -571,9 +610,15 @@ Specifies whether there is a mask or not. The area of the mask is determined by Sets the mask colour for this image (and tells the image to use the mask). +\membersection{wxImage::SetPalette}\label{wximagesetpalette} + +\func{void}{SetPalette}{\param{const wxPalette\&}{ palette}} + +Associates a palette with the image. Currently, the palette is not used. + \membersection{wxImage::SetRGB}\label{wximagesetrgb} -\func{void}{SetRGB}{\param{int }{x}, \param{int }{y}, \param{unsigned char }{red}, \param{unsigned char }{blue}, \param{unsigned char }{green}} +\func{void}{SetRGB}{\param{int }{x}, \param{int }{y}, \param{unsigned char }{red}, \param{unsigned char }{green}, \param{unsigned char }{blue}} Sets the pixel at the given coordinate. This routine performs bounds-checks for the coordinate so it can be considered a safe way to manipulate the @@ -779,6 +824,16 @@ Sets the handler extension. \docparam{extension}{Handler extension.} +\membersection{wxImageHandler::SetMimeType}\label{wximagehandlersetmimetype} + +\func{void}{SetMimeType}{\param{const wxString\& }{mimetype}} + +Sets the handler MIME type. + +\wxheading{Parameters} + +\docparam{mimename}{Handler MIME type.} + \membersection{wxImageHandler::SetType} \func{void}{SetType}{\param{long }{type}} @@ -789,14 +844,3 @@ Sets the handler type. \docparam{name}{Handler type.} - -\membersection{wxImageHandler::SetMimeType} - -\func{void}{SetMimeType}{\param{const wxString\& }{mimetype}} - -Sets the handler MIME type. - -\wxheading{Parameters} - -\docparam{mimename}{Handler MIME type.} - diff --git a/docs/latex/wx/imaglist.tex b/docs/latex/wx/imaglist.tex index 149b343724..548b3dae78 100644 --- a/docs/latex/wx/imaglist.tex +++ b/docs/latex/wx/imaglist.tex @@ -131,6 +131,26 @@ that the background is solid.} Returns the number of images in the list. +\membersection{wxImageList::GetSize}\label{wximagelistgetsize} + +\constfunc{bool}{GetSize}{\param{int }{index}, \param{int\& }{width}, \param{int \&}{height}} + +Retrieves the size of the images in the list. Currently, the {\it index} +parameter is ignored as all images in the list have the same size. + +\wxheading{Parameters} + +\docparam{index}{currently unused, should be 0} + +\docparam{width}{receives the width of the images in the list} + +\docparam{height}{receives the height of the images in the list} + +\wxheading{Return value} + +TRUE if the function succeeded, FALSE if it failed (for example, if the image +list was not yet initialized). + \membersection{wxImageList::Remove}\label{wximagelistremove} \func{bool}{Remove}{\param{int}{ index}} diff --git a/docs/latex/wx/keyevent.tex b/docs/latex/wx/keyevent.tex index 95552f4206..34dfc6afd3 100644 --- a/docs/latex/wx/keyevent.tex +++ b/docs/latex/wx/keyevent.tex @@ -93,6 +93,14 @@ Returns TRUE if the Alt key was down at the time of the key event. Returns TRUE if the control key was down at the time of the key event. +\membersection{wxKeyEvent::GetKeyCode} + +\constfunc{int}{GetKeyCode}{\void} + +Returns the virtual key code. ASCII events return normal ASCII values, +while non-ASCII events return values such as {\bf WXK\_LEFT} for the +left cursor key. See \helpref{Keycodes}{keycodes} for a full list of the virtual key codes. + \membersection{wxKeyEvent::GetX} \constfunc{long}{GetX}{\void} @@ -105,14 +113,6 @@ Returns the X position of the event. Returns the Y position of the event. -\membersection{wxKeyEvent::KeyCode} - -\constfunc{long}{KeyCode}{\void} - -Returns the virtual key code. ASCII events return normal ASCII values, -while non-ASCII events return values such as {\bf WXK\_LEFT} for the -left cursor key. See \helpref{Keycodes}{keycodes} for a full list of the virtual key codes. - \membersection{wxKeyEvent::MetaDown} \constfunc{bool}{MetaDown}{\void} @@ -127,6 +127,14 @@ Returns TRUE if the Meta key was down at the time of the key event. Obtains the position at which the key was pressed. +\membersection{wxKeyEvent::HasModifiers} + +\constfunc{bool}{HasModifiers}{\void} + +Returns TRUE if either of {\sc Ctrl}, {\sc Alt} or {\sc Meta} keys was down +at the time of the key event. Note that this function does not take into +account the {\sc Shift} key state. + \membersection{wxKeyEvent::ShiftDown} \constfunc{bool}{ShiftDown}{\void} diff --git a/docs/latex/wx/list.tex b/docs/latex/wx/list.tex index 663ac42594..83c051a0d0 100644 --- a/docs/latex/wx/list.tex +++ b/docs/latex/wx/list.tex @@ -19,7 +19,7 @@ data but make all of its dangerous (because untyped) functions protected, so that they can only be used from derived classes which, in turn, expose a type safe interface. With this approach a new wxList-like class must be defined for each list type (i.e. list of ints, of wxStrings or of MyObjects). This is done -with {\it WX\_DECLARE\_LIST} and {\it WX\_IMPLEMENT\_LIST} macros like this +with {\it WX\_DECLARE\_LIST} and {\it WX\_DEFINE\_LIST} macros like this (notice the similarity with WX\_DECLARE\_OBJARRAY and WX\_IMPLEMENT\_OBJARRAY macros): @@ -51,8 +51,8 @@ macros): // also have MyList::Node type which is the type-safe version of wxNode. MyList list; MyListElement element; - list.Add(element); // ok - list.Add(17); // error: incorrect type + list.Append(element); // ok + list.Append(17); // error: incorrect type // let's iterate over the list for ( MyList::Node *node = list.GetFirst(); node; node = node->GetNext() ) diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex index d6faae4522..13b14c2545 100644 --- a/docs/latex/wx/listctrl.tex +++ b/docs/latex/wx/listctrl.tex @@ -187,18 +187,21 @@ Ensures this item is visible. \func{long}{FindItem}{\param{long }{start}, \param{const wxString\& }{str}, \param{const bool }{partial = FALSE}} -Find an item whose label matches this string, starting from the item after {\it start} or -the beginning if {\it start} is -1. +Find an item whose label matches this string, starting from the item +{\it start}. \func{long}{FindItem}{\param{long }{start}, \param{long }{data}} -Find an item whose data matches this data, starting from the item after {\it start} or -the beginning if 'start' is -1. +Find an item whose data matches this data, starting from the item {\it start}. \func{long}{FindItem}{\param{long }{start}, \param{const wxPoint\& }{pt}, \param{int }{direction}} Find an item nearest this position in the specified direction, starting from -the item after {\it start} or the beginning if {\it start} is -1. +the item {\it start}. + +{\bf NB:} The meaning of parameters {\it start} has changed in wxMSW +version 2.2.0, previously the item with this index was excluded from the +search but it is included now. \pythonnote{In place of a single overloaded method name, wxPython implements the following methods:\par @@ -261,8 +264,8 @@ You must call {\it info.SetId()} to se ID of item you're interested in before calling this method. \pythonnote{The wxPython version of this method takes an integer parameter -for the item ID, and returns the wxListItem object. -} +for the item ID, an optional integer for the column number, and +returns the wxListItem object. } \membersection{wxListCtrl::GetItemData}\label{wxlistctrlgetitemdata} diff --git a/docs/latex/wx/listevt.tex b/docs/latex/wx/listevt.tex index 1723a34d79..2358a8fab5 100644 --- a/docs/latex/wx/listevt.tex +++ b/docs/latex/wx/listevt.tex @@ -48,45 +48,76 @@ functions that take a wxListEvent argument. Constructor. -\membersection{wxListEvent::m\_code} +\membersection{wxListEvent::GetCode}\label{wxlisteventgetcode} -\member{int}{m\_code} +\constfunc{int}{GetCode}{\void} Key code if the event is a keypress event. -\membersection{wxListEvent::m\_itemIndex} +\membersection{wxListEvent::GetIndex}\label{wxlisteventgetindex} -\member{long}{m\_itemIndex} +\constfunc{long}{GetIndex}{\void} The item index. -\membersection{wxListEvent::m\_oldItemIndex} +\membersection{wxListEvent::GetOldIndex}\label{wxlisteventgetoldindex} -\member{long}{m\_oldItemIndex} +\constfunc{long}{GetOldIndex}{\void} The old item index. -\membersection{wxListEvent::m\_col} +\membersection{wxListEvent::GetColumn}\label{wxlisteventgetcolumn} -\member{int}{m\_col} +\constfunc{int}{GetColumn}{\void} The column position. -\membersection{wxListEvent::m\_cancelled} +\membersection{wxListEvent::Cancelled}\label{wxlisteventcancelled} -\member{bool}{m\_cancelled} +\constfunc{bool}{Cancelled}{\void} TRUE if this event is an end edit event and the user cancelled the edit. -\membersection{wxListEvent::m\_pointDrag} +\membersection{wxListEvent::GetPoint}\label{wxlisteventgetpoint} -\member{wxPoint}{m\_pointDrag} +\constfunc{wxPoint}{GetPoint}{\void} The position of the mouse pointer if the event is a drag event. -\membersection{wxListEvent::m\_item} -\member{wxListItem}{m\_item} +\membersection{wxListEvent::GetLabel}\label{wxlisteventgetlabel} + +\constfunc{const wxString\&}{GetLabel}{\void} + +The label. + +\membersection{wxListEvent::GetText}\label{wxlisteventgettext} + +\constfunc{const wxString\&}{GetText}{\void} + +The text. + +\membersection{wxListEvent::GetImage}\label{wxlisteventgetimage} + +\constfunc{int}{GetImage}{\void} + +The image. + +\membersection{wxListEvent::GetData}\label{wxlisteventgetdata} + +\constfunc{long}{GetData}{\void} + +The data. + +\membersection{wxListEvent::GetMask}\label{wxlisteventgetmask} + +\constfunc{long}{GetMask}{\void} + +The mask. + +\membersection{wxListEvent::GetItem}\label{wxlisteventgetitem} + +\constfunc{const wxListItem\&}{GetItem}{\void} An item object, used by some events. See also \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. diff --git a/docs/latex/wx/locale.tex b/docs/latex/wx/locale.tex index f098360397..187556a1eb 100644 --- a/docs/latex/wx/locale.tex +++ b/docs/latex/wx/locale.tex @@ -51,7 +51,11 @@ understand: first of all, the application locale is changed - note that this will affect many of standard C library functions such as printf() or strftime(). Second, this wxLocale object becomes the new current global locale for the application and so all subsequent calls to wxGetTranslation() will try to -translate the messages using the message catalogs for this locale. +translate the messages using the message catalogs for this locale. Finally, +unless bLoadDefault parameter is FALSE, the method also loads the wxstd.mo +catalog (which is looked for in all the usual places and, additionally, under +the location specified bythe environment variable WXDIR if it is set) which +will allow to translate all the messages generated by the library itself. \membersection{wxLocale::\destruct{wxLocale}}\label{wxlocaledtor} @@ -61,18 +65,11 @@ The destructor, like the constructor, also has global side effects: the previous set locale is restored and so the changes described in \helpref{Init}{wxlocaleinit} documentation are rolled back. -\membersection{wxLocale::GetLocale}\label{wxlocalegetlocale} - -\constfunc{const char*}{GetLocale}{\void} - -Returns the locale name as passed to the constructor or -\helpref{Init()}{wxlocaleinit}. - \membersection{wxLocale::AddCatalog}\label{wxlocaleaddcatalog} \func{bool}{AddCatalog}{\param{const char }{*szDomain}} -Add a catalog for use with the current locale: it's searched for in standard +Add a catalog for use with the current locale: it is searched for in standard places (current directory first, then the system one), but you may also prepend additional directories to the search path with \helpref{AddCatalogLookupPathPrefix()}{wxlocaleaddcataloglookuppathprefix}. @@ -93,6 +90,36 @@ looked up under prefix//LC\_MESSAGES, prefix/LC\_MESSAGES and prefix This only applies to subsequent invocations of AddCatalog()! +\membersection{wxLocale::GetLocale}\label{wxlocalegetlocale} + +\constfunc{const char*}{GetLocale}{\void} + +Returns the locale name as passed to the constructor or +\helpref{Init()}{wxlocaleinit}. + +\membersection{wxLocale::GetName}\label{wxlocalegetname} + +\constfunc{const wxString\&}{GetName}{\void} + +Returns the current short name for the locale (as given to the constructor or +the Init() function). + +\membersection{wxLocale::GetString}\label{wxlocalegetstring} + +\constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szDomain = NULL}} + +Retrieves the translation for a string in all loaded domains unless the szDomain +parameter is specified (and then only this catalog/domain is searched). + +Returns original string if translation is not available +(in this case an error message is generated the first time +a string is not found; use \helpref{wxLogNull}{wxlogoverview} to suppress it). + +\wxheading{Remarks} + +Domains are searched in the last to first order, i.e. catalogs +added later override those added before. + \membersection{wxLocale::Init}\label{wxlocaleinit} \func{bool}{Init}{\param{const char }{*szName}, \param{const char }{*szShort = NULL}, \param{const char }{*szLocale = NULL}, \param{bool }{bLoadDefault = TRUE}} @@ -129,26 +156,9 @@ normally corresponds to 'domain' which is more or less the application name. See also: \helpref{AddCatalog}{wxlocaleaddcatalog} -\membersection{wxLocale::GetName}\label{wxlocalegetname} +\membersection{wxLocale::IsOk}\label{wxlocaleisok} -\constfunc{const wxString\&}{GetName}{\void} +\constfunc{bool}{IsOk}{\void} -Returns the current short name for the locale (as given to the constructor or -the Init() function). - -\membersection{wxLocale::GetString}\label{wxlocalegetstring} - -\constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szDomain = NULL}} - -Retrieves the translation for a string in all loaded domains unless the szDomain -parameter is specified (and then only this catalog/domain is searched). - -Returns original string if translation is not available -(in this case an error message is generated the first time -a string is not found; use \helpref{wxLogNull}{wxlogoverview} to suppress it). - -\wxheading{Remarks} - -Domains are searched in the last to first order, i.e. catalogs -added later override those added before. +Returns TRUE if the locale could be set successfully. diff --git a/docs/latex/wx/longlong.tex b/docs/latex/wx/longlong.tex index a37cff3edd..f2d56c1191 100644 --- a/docs/latex/wx/longlong.tex +++ b/docs/latex/wx/longlong.tex @@ -6,7 +6,7 @@ %% Created: 07.03.00 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxLongLong}}\label{wxlonglong} diff --git a/docs/latex/wx/manual.tex b/docs/latex/wx/manual.tex index d0061f3d62..dc8aadfdf7 100644 --- a/docs/latex/wx/manual.tex +++ b/docs/latex/wx/manual.tex @@ -1,5 +1,5 @@ \documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{report} -% JACS: doesn't make it through Tex2RTF, sorry. I'll put it into texhelp.sty +% JACS: doesn't make it through Tex2RTF, sorry. I will put it into texhelp.sty % since Tex2RTF doesn't parse it. % BTW, style MUST be report for it to work for Tex2RTF. %KB: @@ -25,13 +25,13 @@ %\special{!/@scaleunit 1 def} \parskip=10pt \parindent=0pt -\title{wxWindows 2.1.14: A portable C++ and Python GUI toolkit} +\title{wxWindows 2.2: A portable C++ and Python GUI toolkit} \winhelponly{\author{by Julian Smart et al %\winhelponly{\\$$\image{1cm;0cm}{wxwin.wmf}$$} }} \winhelpignore{\author{Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al} -\date{March 19th 2000} +\date{December 2001} } \makeindex \begin{document} @@ -91,7 +91,7 @@ members of the wxWindows team\\ Portions (c) 1996 Artificial Intelligence Applications Institute\\ \end{center} -Please also see the wxWindows licence files (preamble.txt, lgpl.txt, gpl.txt, licence.txt, +Please also see the wxWindows license files (preamble.txt, lgpl.txt, gpl.txt, license.txt, licendoc.txt) for conditions of software and documentation use. \section*{wxWindows Library License, Version 3} diff --git a/docs/latex/wx/mask.tex b/docs/latex/wx/mask.tex index e850fb3f16..bf390e9e60 100644 --- a/docs/latex/wx/mask.tex +++ b/docs/latex/wx/mask.tex @@ -1,7 +1,8 @@ \section{\class{wxMask}}\label{wxmask} This class encapsulates a monochrome mask bitmap, where the masked area is black and -the unmasked area is white. +the unmasked area is white. When associated with a bitmap and drawn in a device context, +the unmasked area of the bitmap will be drawn, and the masked area will not be drawn. \wxheading{Derived from} diff --git a/docs/latex/wx/mbcnvfil.tex b/docs/latex/wx/mbcnvfil.tex new file mode 100644 index 0000000000..c7f99ad62e --- /dev/null +++ b/docs/latex/wx/mbcnvfil.tex @@ -0,0 +1,49 @@ +% +% automatically generated by HelpGen from +% ../include/wx/strconv.h at 25/Mar/00 10:20:56 +% + +\section{\class{wxMBConvFile}}\label{wxmbconvfile} + +This class converts file names between filesystem multibyte encoding and +Unicode. It has one predefined instance, {\bf wxConvFile}. +Since some platforms (e.g. Win32) use Unicode in the filenames, +and others (e.g. Unix) use multibyte encodings, this class should only +be used directly if wxMBFILES is defined to 1. A convenience macro, +wxFNCONV, is defined to wxConvFile.cWX2MB in this case. You could use it +like this: + +\begin{verbatim} +wxChar *name = wxT("rawfile.doc"); +FILE *fil = fopen(wxFNCONV(name), "r"); +\end{verbatim} + +(although it would be better to use wxFopen(name, wxT("r")) in this case.) + +\wxheading{Derived from} + +\helpref{wxMBConv}{wxmbconv} + +\wxheading{Include files} + + + +\wxheading{See also} + +\helpref{wxMBConv classes overview}{mbconvclasses} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxMBConvFile::MB2WC}\label{wxmbconvfilemb2wc} + +\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}} + +Converts from multibyte filename encoding to Unicode. Returns the size of the destination buffer. + +\membersection{wxMBConvFile::WC2MB}\label{wxmbconvfilewc2mb} + +\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}} + +Converts from Unicode to multibyte filename encoding. Returns the size of the destination buffer. + diff --git a/docs/latex/wx/mbcnvut7.tex b/docs/latex/wx/mbcnvut7.tex new file mode 100644 index 0000000000..05185f17a9 --- /dev/null +++ b/docs/latex/wx/mbcnvut7.tex @@ -0,0 +1,38 @@ +% +% automatically generated by HelpGen from +% ../include/wx/strconv.h at 25/Mar/00 10:20:56 +% + +\section{\class{wxMBConvUTF7}}\label{wxmbconvutf7} + +This class converts between the UTF-7 encoding and Unicode. +It has one predefined instance, {\bf wxConvUTF7}. +Unfortunately, this class is not quite implemented yet. + +\wxheading{Derived from} + +\helpref{wxMBConv}{wxmbconv} + +\wxheading{Include files} + + + +\wxheading{See also} + +\helpref{wxMBConvUTF8}{wxmbconvutf8}, +\helpref{wxMBConv classes overview}{mbconvclasses} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxMBConvUTF7::MB2WC}\label{wxmbconvutf7mb2wc} + +\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}} + +Converts from UTF-7 encoding to Unicode. Returns the size of the destination buffer. + +\membersection{wxMBConvUTF7::WC2MB}\label{wxmbconvutf7wc2mb} + +\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}} + +Converts from Unicode to UTF-7 encoding. Returns the size of the destination buffer. + diff --git a/docs/latex/wx/mbcnvut8.tex b/docs/latex/wx/mbcnvut8.tex new file mode 100644 index 0000000000..19801f9571 --- /dev/null +++ b/docs/latex/wx/mbcnvut8.tex @@ -0,0 +1,59 @@ +% +% automatically generated by HelpGen from +% ../include/wx/strconv.h at 25/Mar/00 10:20:56 +% + +\section{\class{wxMBConvUTF8}}\label{wxmbconvutf8} + +This class converts between the UTF-8 encoding and Unicode. +It has one predefined instance, {\bf wxConvUTF8}. + +\wxheading{Derived from} + +\helpref{wxMBConv}{wxmbconv} + +\wxheading{Include files} + + + +\wxheading{See also} + +\helpref{wxMBConvUTF7}{wxmbconvutf7}, +\helpref{wxMBConv classes overview}{mbconvclasses} + +\wxheading{Remarks} + +UTF-8 is a compatibility encoding used to encode Unicode text into anything that was +originally written for 8-bit strings, including (but not limited to) filenames, transfer +protocols, and database fields. Notable properties include: + +\begin{itemize} +\item Variable-length encoding able to encode up to 31 bits per character +\item ASCII characters (character values under 128) are encoded as plain ASCII +(1 byte per character) +\item Null bytes do not occur in the encoding, except when there's an actual Unicode +null character +\item Preserves sort ordering for plain 8-bit comparison routines like strcmp() +\item High bit patterns unambiguates character boundaries, and makes it easy to +detect whether a string is encoded with UTF-8 or not +\end{itemize} + +All of these properties make UTF-8 a very favorable solution in any situation +where full Unicode character support is desired while remaining compatible with +code written with only 8-bit extended-ASCII characters in mind. + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxMBConvUTF8::MB2WC}\label{wxmbconvutf8mb2wc} + +\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}} + +Converts from UTF-8 encoding to Unicode. Returns the size of the destination buffer. + +\membersection{wxMBConvUTF8::WC2MB}\label{wxmbconvutf8wc2mb} + +\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}} + +Converts from Unicode to UTF-8 encoding. Returns the size of the destination buffer. + diff --git a/docs/latex/wx/mbconv.tex b/docs/latex/wx/mbconv.tex new file mode 100644 index 0000000000..5aaf60b65c --- /dev/null +++ b/docs/latex/wx/mbconv.tex @@ -0,0 +1,108 @@ +% +% automatically generated by HelpGen from +% ../include/wx/strconv.h at 25/Mar/00 10:20:56 +% + +\section{\class{wxMBConv}}\label{wxmbconv} + +This class is the base class of a hierarchy of classes capable of converting +text strings between multibyte (SBCS or DBCS) encodings and Unicode. It is itself +a wrapper around the standard libc mbstowcs() and wcstombs() routines, and has +one predefined instance, {\bf wxConvLibc}. + +\wxheading{Derived from} + +No base class + +\wxheading{Include files} + + + +\wxheading{See also} + +\helpref{wxCSConv}{wxcsconv}, +\helpref{wxEncodingConverter}{wxencodingconverter}, +\helpref{wxMBConv classes overview}{mbconvclasses} + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxMBConv::wxMBConv}\label{wxmbconvwxmbconv} + +\func{}{wxMBConv}{\void} + +Constructor. + +\membersection{wxMBConv::MB2WC}\label{wxmbconvmb2wc} + +\constfunc{virtual size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}} + +Converts from multibyte encoding to Unicode, using the libc routine mbstowcs() +(this is overridden by derived classes). Returns the size of the destination buffer. + +\membersection{wxMBConv::WC2MB}\label{wxmbconvwc2mb} + +\constfunc{virtual size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}} + +Converts from Unicode to multibyte encoding, using the libc routine wcstombs() +(this is overridden by derived classes). Returns the size of the destination buffer. + +\membersection{wxMBConv::cMB2WC}\label{wxmbconvcmb2wc} + +\constfunc{const wxWCharBuffer}{cMB2WC}{\param{const char* }{psz}} + +Converts from multibyte encoding to Unicode by calling MB2WC, +allocating a temporary wxWCharBuffer to hold the result. + +\membersection{wxMBConv::cWC2MB}\label{wxmbconvcwc2mb} + +\constfunc{const wxCharBuffer}{cWC2MB}{\param{const wchar\_t* }{psz}} + +Converts from Unicode to multibyte encoding by calling WC2MB, +allocating a temporary wxCharBuffer to hold the result. + +\membersection{wxMBConv::cMB2WX}\label{wxmbconvcmb2wx} + +\constfunc{const char*}{cMB2WX}{\param{const char* }{psz}} + +\constfunc{const wxWCharBuffer}{cMB2WX}{\param{const char* }{psz}} + +Converts from multibyte encoding to the current wxChar type +(which depends on whether wxUSE\_UNICODE is set to 1). If wxChar is char, +it returns the parameter unaltered. If wxChar is wchar\_t, it returns the +result in a wxWCharBuffer. The macro wxMB2WXbuf is defined as the correct +return type (without const). + +\membersection{wxMBConv::cWX2MB}\label{wxmbconvcwx2mb} + +\constfunc{const char*}{cWX2MB}{\param{const wxChar* }{psz}} + +\constfunc{const wxCharBuffer}{cWX2MB}{\param{const wxChar* }{psz}} + +Converts from the current wxChar type to multibyte encoding. If wxChar is char, +it returns the parameter unaltered. If wxChar is wchar\_t, it returns the +result in a wxCharBuffer. The macro wxWX2MBbuf is defined as the correct +return type (without const). + +\membersection{wxMBConv::cWC2WX}\label{wxmbconvcwc2wx} + +\constfunc{const wchar\_t*}{cWC2WX}{\param{const wchar\_t* }{psz}} + +\constfunc{const wxCharBuffer}{cWC2WX}{\param{const wchar\_t* }{psz}} + +Converts from Unicode to the current wxChar type. If wxChar is wchar\_t, +it returns the parameter unaltered. If wxChar is char, it returns the +result in a wxCharBuffer. The macro wxWC2WXbuf is defined as the correct +return type (without const). + +\membersection{wxMBConv::cWX2WC}\label{wxmbconvcwx2wc} + +\constfunc{const wchar\_t*}{cWX2WC}{\param{const wxChar* }{psz}} + +\constfunc{const wxWCharBuffer}{cWX2WC}{\param{const wxChar* }{psz}} + +Converts from the current wxChar type to Unicode. If wxChar is wchar\_t, +it returns the parameter unaltered. If wxChar is char, it returns the +result in a wxWCharBuffer. The macro wxWX2WCbuf is defined as the correct +return type (without const). + diff --git a/docs/latex/wx/mdi.tex b/docs/latex/wx/mdi.tex index 38f456036c..aecdab7cb6 100644 --- a/docs/latex/wx/mdi.tex +++ b/docs/latex/wx/mdi.tex @@ -245,7 +245,7 @@ Child frames may be either \helpref{wxMDIChildFrame}{wxmdichildframe}, or \helpr An MDI parent frame always has a \helpref{wxMDIClientWindow}{wxmdiclientwindow} associated with it, which is the parent for MDI client frames. -This client window may be resized to accomodate non-MDI windows, as seen in Microsoft Visual C++ (TM) and +This client window may be resized to accommodate non-MDI windows, as seen in Microsoft Visual C++ (TM) and Microsoft Publisher (TM), where a documentation window is placed to one side of the workspace. MDI remains popular despite dire warnings from Microsoft itself that MDI is an obsolete @@ -476,7 +476,14 @@ is available under Windows only. \func{virtual wxMDIClientWindow*}{OnCreateClient}{\void} -Override this to return a different kind of client window. +Override this to return a different kind of client window. If you override this function, +you must create your parent frame in two stages, or your function will never be called, +due to the way C++ treats virtual functions called from constructors. For example: + +\begin{verbatim} + frame = new MyParentFrame; + frame->Create(parent, myParentFrameId, wxT("My Parent Frame")); +\end{verbatim} \wxheading{Remarks} @@ -486,7 +493,7 @@ on the background. Note that it is probably impossible to have a client window that scrolls as well as painting a bitmap or pattern, since in {\bf OnScroll}, the scrollbar positions always return zero. -(Solutions to: \verb$julian.smart@ukonline.co.uk$). +(Solutions to: \verb$julian.smart@btopenworld.com$). \wxheading{See also} diff --git a/docs/latex/wx/menu.tex b/docs/latex/wx/menu.tex index 4d9face292..027c789d8f 100644 --- a/docs/latex/wx/menu.tex +++ b/docs/latex/wx/menu.tex @@ -527,7 +527,7 @@ Adds the item to the end of the menu bar. \wxheading{Return value} -TRUE on success, FALSE if an error occured. +TRUE on success, FALSE if an error occurred. \wxheading{See also} @@ -720,7 +720,7 @@ position $0$ will insert it in the very beginning of it, inserting at position \wxheading{Return value} -TRUE on success, FALSE if an error occured. +TRUE on success, FALSE if an error occurred. \wxheading{See also} diff --git a/docs/latex/wx/mouseevt.tex b/docs/latex/wx/mouseevt.tex index 00967cad97..423811a297 100644 --- a/docs/latex/wx/mouseevt.tex +++ b/docs/latex/wx/mouseevt.tex @@ -9,6 +9,20 @@ drawbacks: the LEAVE\_WINDOW event might be received some time after the mouse left the window and the state variables for it may have changed during this time. +{\bf NB: } Note the difference between methods like +\helpref{LeftDown}{wxmouseeventleftdown} and +\helpref{LeftIsDown}{wxmouseeventleftisdown}: the formet returns {\tt TRUE} +when the event corresponds to the left mouse button click while the latter +returns {\tt TRUE} if the left mouse button is currently being pressed. For +example, when the user is dragging the mouse you can use +\helpref{LeftIsDown}{wxmouseeventleftisdown} to test +whether the left mouse button is (still) depressed. Also, by convention, if +\helpref{LeftDown}{wxmouseeventleftdown} returns {\tt TRUE}, +\helpref{LeftIsDown}{wxmouseeventleftisdown} will also return {\tt TRUE} in +wxWindows whatever the underlying GUI behaviour is (which is +platform-dependent). The same applies, of course, to other mouse buttons as +well. + \wxheading{Derived from} \helpref{wxEvent}{wxevent} @@ -242,7 +256,7 @@ Returns TRUE if the event was a left double click. Returns TRUE if the left mouse button changed to down. -\membersection{wxMouseEvent::LeftIsDown} +\membersection{wxMouseEvent::LeftIsDown}\label{wxmouseeventleftisdown} \constfunc{bool}{LeftIsDown}{\void} @@ -281,7 +295,7 @@ Returns TRUE if the event was a middle double click. Returns TRUE if the middle mouse button changed to down. -\membersection{wxMouseEvent::MiddleIsDown} +\membersection{wxMouseEvent::MiddleIsDown}\label{wxmouseeventmiddleisdown} \constfunc{bool}{MiddleIsDown}{\void} @@ -312,7 +326,7 @@ Returns TRUE if the event was a right double click. Returns TRUE if the right mouse button changed to down. -\membersection{wxMouseEvent::RightIsDown} +\membersection{wxMouseEvent::RightIsDown}\label{wxmouseeventrightisdown} \constfunc{bool}{RightIsDown}{\void} diff --git a/docs/latex/wx/msgdlg.tex b/docs/latex/wx/msgdlg.tex index b2e865e901..3caf92f46a 100644 --- a/docs/latex/wx/msgdlg.tex +++ b/docs/latex/wx/msgdlg.tex @@ -43,10 +43,12 @@ Constructor. Use \helpref{wxMessageDialog::ShowModal}{wxmessagedialogshowmodal} \twocolitem{{\bf wxOK}}{Show an OK button.} \twocolitem{{\bf wxCANCEL}}{Show a Cancel button.} \twocolitem{{\bf wxYES\_NO}}{Show Yes and No buttons.} -\twocolitem{{\bf wx\_NO\_DEFAULT}}{Used with {\bf wxYES\_NO}, makes {\bf No} button the default.} +\twocolitem{{\bf wxYES\_DEFAULT}}{Used with {\bf wxYES\_NO}, makes {\bf Yes} button the default - which is the default behaviour.} +\twocolitem{{\bf wxNO\_DEFAULT}}{Used with {\bf wxYES\_NO}, makes {\bf No} button the default.} \twocolitem{{\bf wxCENTRE}}{Centre the message. Not Windows.} \twocolitem{{\bf wxICON\_EXCLAMATION}}{Shows an exclamation mark icon.} -\twocolitem{{\bf wxICON\_HAND}}{Shows a hand icon.} +\twocolitem{{\bf wxICON\_HAND}}{Shows an error icon.} +\twocolitem{{\bf wxICON\_ERROR}}{Shows an error icon - the same as wxICON\_HAND.} \twocolitem{{\bf wxICON\_QUESTION}}{Shows a question mark icon.} \twocolitem{{\bf wxICON\_INFORMATION}}{Shows an information (i) icon.} \end{twocollist} diff --git a/docs/latex/wx/mutexlck.tex b/docs/latex/wx/mutexlck.tex index b0be0556c1..881105e11e 100644 --- a/docs/latex/wx/mutexlck.tex +++ b/docs/latex/wx/mutexlck.tex @@ -25,7 +25,7 @@ None. \func{}{wxMutexLocker}{\param{wxMutex *}{mutex}} -Constructs a wxMutexLocker object associated with mutex which must be non NULL +Constructs a wxMutexLocker object associated with mutex which must be non-NULL and locks it. Call \helpref{IsLocked}{wxmutexlockerisok} to check if the mutex was successfully locked. diff --git a/docs/latex/wx/nbsizer.tex b/docs/latex/wx/nbsizer.tex index b4be9489ab..9a9f915704 100644 --- a/docs/latex/wx/nbsizer.tex +++ b/docs/latex/wx/nbsizer.tex @@ -11,7 +11,7 @@ In order to query the size of notebook page, this page needs to have its own sizer, otherwise the wxNotebookSizer will ignore it. Notebook pages get there sizer by assiging one to them using \helpref{wxWindow::SetSizer}{wxwindowsetsizer} and setting the auto-layout option to TRUE using -\helpref{wxWindow::SetAutolayout}{wxwindowsetautoLayout}. Here is one +\helpref{wxWindow::SetAutoLayout}{wxwindowsetautolayout}. Here is one example showing how to add a notebook page that the notebook sizer is aware of: diff --git a/docs/latex/wx/node.tex b/docs/latex/wx/node.tex index c718a7220e..c2b6600772 100644 --- a/docs/latex/wx/node.tex +++ b/docs/latex/wx/node.tex @@ -3,7 +3,7 @@ A node structure used in linked lists (see \helpref{wxList}{wxlist}) and derived classes. You should never use wxNodeBase class directly because it works with untyped (void *) data and this is unsafe. Use wxNode-derived classes -which are defined by WX\_DECLARE\_LIST and WX\_DEFIBE\_LIST macros instead as +which are defined by WX\_DECLARE\_LIST and WX\_DEFINE\_LIST macros instead as described in \helpref{wxList}{wxlist} documentation (see example there). wxNode is defined for compatibility as wxNodeBase containing "wxObject *" pointer, but usage of this class is deprecated. diff --git a/docs/latex/wx/notebook.tex b/docs/latex/wx/notebook.tex index 11aba42682..2ec54d1b11 100644 --- a/docs/latex/wx/notebook.tex +++ b/docs/latex/wx/notebook.tex @@ -19,6 +19,21 @@ managed by wxNotebook. +\wxheading{Window styles} + +\twocolwidtha{5cm} +\begin{twocollist}\itemsep=0pt + +\twocolitem{\windowstyle{wxNB\_FIXEDWIDTH}}{(Windows only)All tabs will have same width.} +\twocolitem{\windowstyle{wxNB\_LEFT}}{Place tabs on the left side.} +\twocolitem{\windowstyle{wxNB\_RIGHT}}{Place tabs on the right side.} +\twocolitem{\windowstyle{wxNB\_BOTTOM}}{Place tabs under instead of above the notebook pages.} + +\end{twocollist} + +See also \helpref{window styles overview}{windowstyles}. + + \wxheading{Event handling} To process input from a notebook control, use the following event handler macros to direct input to member @@ -61,8 +76,7 @@ Note that sometimes you can reduce flicker by passing the wxCLIP\_CHILDREN windo \docparam{size}{The window size.} -\docparam{style}{The window style. Its value is a bit list of zero or more of {\bf wxTC\_MULTILINE}, - {\bf wxTC\_RIGHTJUSTIFY}, {\bf wxTC\_FIXEDWIDTH} and {\bf wxTC\_OWNERDRAW}.} +\docparam{style}{The window style. See \helpref{wxNotebook}{wxnotebook}.} \docparam{name}{The name of the control (used only under Motif).} @@ -153,13 +167,13 @@ Returns the number of pages in the notebook control. \membersection{wxNotebook::GetPageImage}\label{wxnotebookgetpageimage} -\constfunc{int}{GetPageImage}{\void} +\constfunc{int}{GetPageImage}{\param{int }{nPage}} Returns the image index for the given page. \membersection{wxNotebook::GetPageText}\label{wxnotebookgetpagetext} -\constfunc{wxString}{GetPageText}{\void} +\constfunc{wxString}{GetPageText}{\param{int }{nPage}} Returns the string for the given page. diff --git a/docs/latex/wx/notifevt.tex b/docs/latex/wx/notifevt.tex index c68b7eca8b..61a78552da 100644 --- a/docs/latex/wx/notifevt.tex +++ b/docs/latex/wx/notifevt.tex @@ -7,6 +7,14 @@ It (or an object of a derived class) is sent when the controls state is being changed and allows the program to \helpref{Veto()}{wxnotifyeventveto} this change if it wants to prevent it from happening. +In some rare cases (so far only dragging the items in the tree control) the +event is disabled by default in which case +\helpref{Allow()}{wxnotifyeventallow} may be called to allow it. + +If both \helpref{Allow()}{wxnotifyeventallow} and +\helpref{Veto()}{wxnotifyeventveto} are called, only the last method called +counts. + \wxheading{Derived from} \helpref{wxCommandEvent}{wxcommandevent}\\ @@ -34,6 +42,12 @@ None Constructor (used internally by wxWindows only). +\membersection{wxNotifyEvent::Allow}\label{wxnotifyeventallow} + +\func{void}{Allow}{\param{bool }{allow = TRUE}} + +Allow the action signalled by this event to be carried. + \membersection{wxNotifyEvent::IsAllowed}\label{wxnotifyeventisallowed} \constfunc{bool}{IsAllowed}{\void} diff --git a/docs/latex/wx/porting.tex b/docs/latex/wx/porting.tex index 306260b397..ca99053109 100644 --- a/docs/latex/wx/porting.tex +++ b/docs/latex/wx/porting.tex @@ -18,7 +18,7 @@ and will be supported by the user community for some time. And when you have changed to 2.0, we hope that you will appreciate the benefits in terms of greater flexibility, better user interface aesthetics, improved C++ conformance, improved compilation speed, and many other enhancements. The revised architecture -of 2.0 will ensure that wxWindows can continue to evolve for the forseeable +of 2.0 will ensure that wxWindows can continue to evolve for the foreseeable future. {\it Please note that this document is a work in progress.} @@ -75,7 +75,7 @@ be no conversion problems later on. font sizes (for example, a 12-point font will appear bigger than before). Write your application to be flexible where fonts are concerned. Don't rely on fonts being similarly-sized across platforms, as they were (by chance) between -Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it's better to conform to the +Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it is better to conform to the standards of each platform, and currently the size difference makes it difficult to conform to Windows UI standards. You may eventually wish to build in a global 'fudge-factor' to compensate for size differences. The old font sizing will still be available via wx\_setup.h, so do not panic... @@ -147,7 +147,7 @@ See \helpref{Device contexts and painting}{portingdc}. These objects - instances of classes such as wxPen, wxBrush, wxBitmap (but not wxColour) - are now implemented with reference-counting. This makes assignment a very cheap operation, and also means that management of the resource is largely automatic. You now pass {\it references} to -objects to functions such as wxDC::SetPen, not pointers, so you will need to derefence your pointers. +objects to functions such as wxDC::SetPen, not pointers, so you will need to dereference your pointers. The device context does not store a copy of the pen itself, but takes a copy of it (via reference counting), and the object's data gets freed up when the reference count goes to zero. The application does not have to worry so much about @@ -260,7 +260,7 @@ and simply assign the result to a wxString object. For example, replace this: {\small\begin{verbatim} char* s = wxFunctionThatReturnsString(); - s = copystring(s); // Take a copy in case it's temporary + s = copystring(s); // Take a copy in case it is temporary .... // Do something with it delete[] s; \end{verbatim} @@ -362,7 +362,7 @@ Add an OnCloseWindow event handler using an EVT\_CLOSE event table entry. For de about window destruction, see the Windows Deletion Overview in the manual. This is a subtle topic so please read it very carefully. Basically, OnCloseWindow is now responsible for destroying a window with Destroy(), but the default implementation (for example for wxDialog) may not -destroy the window, so to be sure, always provide this event handler so it's obvious what's going on. +destroy the window, so to be sure, always provide this event handler so it is obvious what's going on. \subsection{OnEvent} diff --git a/docs/latex/wx/postscpt.tex b/docs/latex/wx/postscpt.tex index 425d22d4e7..2aa032dbe9 100644 --- a/docs/latex/wx/postscpt.tex +++ b/docs/latex/wx/postscpt.tex @@ -35,5 +35,17 @@ get PostScript printing settings. This constructor and the global printer settings are now deprecated; use the wxPrintData constructor instead. +\membersection{wxPostScriptDC::GetResolution}\label{wxpostscriptdcgetresolution} +\func{static int}{GetResolution}{\void} + +Return resolution used in PostScript output. See +\helpref{SetResolution}{wxpostscriptdcsetresolution}. + +\membersection{wxPostScriptDC::SetResolution}\label{wxpostscriptdcsetresolution} + +\func{static void}{SetResolution}{\param{int}{ ppi}} + +Set resolution (in pixels per inch) that will be used in PostScript +output. Default is 720ppi. diff --git a/docs/latex/wx/print.tex b/docs/latex/wx/print.tex index 38016dcd28..0bdf7b6d16 100644 --- a/docs/latex/wx/print.tex +++ b/docs/latex/wx/print.tex @@ -598,6 +598,26 @@ Returns TRUE if the user has aborted the print job. Creates the default printing abort window, with a cancel button. + +\membersection{wxPrinter::GetLastError}\label{wxprintergetlasterror} + +\func{static wxPrinterError}{GetLastError}{\void} + +Return last error. Valid after calling \helpref{Print}{wxprinterprint}, +\helpref{PrintDialog}{wxprinterprintdialog} or +\helpref{wxPrintPreview::Print}{wxprintpreviewprint}. These functions +set last error to {\bf wxPRINTER\_NO\_ERROR} if no error happened. + +Returned value is one of the following: + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf wxPRINTER\_NO\_ERROR}}{No error happened.} +\twocolitem{{\bf wxPRINTER\_CANCELLED}}{The user cancelled printing.} +\twocolitem{{\bf wxPRINTER\_ERROR}}{There was an error during printing.} +\end{twocollist} + + \membersection{wxPrinter::GetPrintDialogData}\label{wxprintergetprintdialogdata} \func{wxPrintDialogData\&}{GetPrintDialogData}{\void} @@ -612,7 +632,9 @@ Starts the printing process. Provide a parent window, a user-defined wxPrintout the printing of a document, and whether the print dialog should be invoked first. Print could return FALSE if there was a problem initializing the printer device context -(current printer not set, for example). +(current printer not set, for example) or the user cancelled printing. Call +\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed +information about the kind of the error. \membersection{wxPrinter::PrintDialog}\label{wxprinterprintdialog} @@ -620,7 +642,9 @@ Print could return FALSE if there was a problem initializing the printer device Invokes the print dialog. If successful (the user did not press Cancel and no error occurred), a suitable device context will be returned -(otherwise NULL is returned). +(otherwise NULL is returned -- call +\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed +information about the kind of the error). The application must delete this device context to avoid a memory leak. @@ -783,7 +807,7 @@ this by a scaling factor to take the preview DC size into account. \func{bool}{HasPage}{\param{int}{ pageNum}} -Should be overriden to return TRUE if the document has this page, or FALSE +Should be overridden to return TRUE if the document has this page, or FALSE if not. Returning FALSE signifies the end of the document. By default, HasPage behaves as if the document has only one page. @@ -802,9 +826,9 @@ this function cancels the print job. OnBeginDocument is called once for every copy printed. The base wxPrintout::OnBeginDocument {\it must} be called (and the return value -checked) from within the overriden function, since it calls wxDC::StartDoc. +checked) from within the overridden function, since it calls wxDC::StartDoc. -\pythonnote{If this method is overriden in a Python class then the +\pythonnote{If this method is overridden in a Python class then the base class version can be called by using the method {\tt base_OnBeginDocument(startPage, endPage)}. } @@ -816,7 +840,7 @@ Called by the framework at the end of document printing. OnEndDocument is called once for every copy printed. The base wxPrintout::OnEndDocument {\it must} be called -from within the overriden function, since it calls wxDC::EndDoc. +from within the overridden function, since it calls wxDC::EndDoc. \membersection{wxPrintout::OnBeginPrinting}\label{wxprintoutonbeginprinting} @@ -984,6 +1008,10 @@ supplied in the wxPrintPreview constructor. Will normally be called by the {\bf Print...} panel item on the preview frame's control bar. +Returns FALSE in case of error -- call +\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed +information about the kind of the error. + \membersection{wxPrintPreview::RenderPage}\label{wxprintpreviewrenderpage} \func{bool}{RenderPage}{\param{int }{pageNum}} diff --git a/docs/latex/wx/process.tex b/docs/latex/wx/process.tex index 4aa9a8df23..9438d0433e 100644 --- a/docs/latex/wx/process.tex +++ b/docs/latex/wx/process.tex @@ -14,6 +14,15 @@ However, if it is not processed, the object will delete itself and so the library users should only delete those objects whose notifications have been processed (and call \helpref{Detach()}{wxprocessdetach} for others). +wxProcess also supports IO redirection of the child process. For this, you have +to call its \helpref{Redirect}{wxprocessredirect} method before passing it to +\helpref{wxExecute}{wxexecute}. If the child process was launched successfully, +\helpref{GetInputStream}{wxprocessgetinputstream}, +\helpref{GetOutputStream}{wxprocessgetoutputstream} and +\helpref{GetErrorStream}{wxprocessgeterrorstream} can then be used to retrieve +the streams corresponding to the child process stdandard output, input and +error output respectively. + \wxheading{Derived from} \helpref{wxEvtHandler}{wxevthandler} @@ -22,6 +31,11 @@ processed (and call \helpref{Detach()}{wxprocessdetach} for others). +\wxheading{See also} + +\helpref{wxExecute}{wxexecute}\\ +\helpref{exec sample}{sampleexec} + \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxProcess::wxProcess}\label{wxprocessconstr} @@ -48,6 +62,15 @@ macro in the event table of the parent to handle it) with the given {\it id}. Destroys the wxProcess object. +\membersection{wxProcess::CloseOutput}\label{wxprocesscloseoutput} + +\func{void}{CloseOutput}{\void} + +Closes the output stream (the one connected to the stdin of the child +process). This function can be used to indicate to the child process that +there is no more data to be read - usually, a filter program will only +terminate when the input stream is closed. + \membersection{wxProcess::Detach}\label{wxprocessdetach} \func{void}{Detach}{\void} @@ -62,19 +85,26 @@ from its parent, no notification events will be sent to the parent and the object will delete itself upon reception of the process termination notification. +\membersection{wxProcess::GetErrorStream}\label{wxprocessgeterrorstream} + +\constfunc{wxInputStream* }{GetErrorStream}{\void} + +Returns an input stream which corresponds to the standard error output (stderr) +of the child process. + \membersection{wxProcess::GetInputStream}\label{wxprocessgetinputstream} \constfunc{wxInputStream* }{GetInputStream}{\void} -It returns a output stream corresponding to the input stream of the subprocess. -If it is NULL, you have not turned on the redirection. +It returns a output stream corresponding to the standard output stream of the +subprocess. If it is NULL, you have not turned on the redirection. See \helpref{wxProcess::Redirect}{wxprocessredirect}. \membersection{wxProcess::GetOutputStream}\label{wxprocessgetoutputstream} \constfunc{wxOutputStream* }{GetOutputStream}{\void} -It returns an output stream correspoding to the output stream of the subprocess. +It returns an output stream correspoding to the input stream of the subprocess. If it is NULL, you have not turned on the redirection. See \helpref{wxProcess::Redirect}{wxprocessredirect}. @@ -83,7 +113,7 @@ See \helpref{wxProcess::Redirect}{wxprocessredirect}. \constfunc{void}{OnTerminate}{\param{int}{ pid}, \param{int}{ status}} It is called when the process with the pid {\it pid} finishes. -It raises a wxWindows event when it isn't overriden. +It raises a wxWindows event when it isn't overridden. \docparam{pid}{The pid of the process which has just terminated.} diff --git a/docs/latex/wx/progdlg.tex b/docs/latex/wx/progdlg.tex index 39689596e3..5cf893f2be 100644 --- a/docs/latex/wx/progdlg.tex +++ b/docs/latex/wx/progdlg.tex @@ -48,18 +48,17 @@ bitmask constants defined in wx/defs.h: \twocolitem{{\bf wxPD\_APP\_MODAL}}{Make the progress dialog modal. If this flag is not given, it is only "locally" modal - that is the input to the parent window is disabled, but not to the other ones.} -\twocolitem{{\bf wxPD\_AUTO\_HIDE}}{By default, the progress dialog will disappear +\twocolitem{{\bf wxPD\_AUTO\_HIDE}}{Causes the progress dialog to disappear from screen as soon as the maximum value of the progress meter has been -reached. This flag prevents it from doing it - instead the dialog will wait -until the user closes it.} +reached.} \twocolitem{{\bf wxPD\_CAN\_ABORT}}{This flag tells the dialog that it should have a "Cancel" button which the user may press. If this happens, the next call to \helpref{Update()}{wxprogressdialogupdate} will return FALSE.} \twocolitem{{\bf wxPD\_ELAPSED\_TIME}}{This flag tells the dialog that it should show elapsed time (since creating the dialog).} \twocolitem{{\bf wxPD\_ESTIMATED\_TIME}}{This flag tells the dialog that it should show estimated time.} \twocolitem{{\bf wxPD\_REMAINING\_TIME}}{This flag tells the dialog that it should show remaining time.} -\twocolitem{{\bf wxPD\_SMOOTH}}{This flag tells the dialog that it should use -smooth gauge (has effect only under 32bit Windows).} +%\twocolitem{{\bf wxPD\_SMOOTH}}{This flag tells the dialog that it should use +%smooth gauge (has effect only under 32bit Windows).} \end{twocollist}% } diff --git a/docs/latex/wx/proplist.tex b/docs/latex/wx/proplist.tex index d782b0c598..f9ce7a77a2 100644 --- a/docs/latex/wx/proplist.tex +++ b/docs/latex/wx/proplist.tex @@ -333,7 +333,7 @@ one property, and there is no provision for invoking further dialogs. The reader may like to work out how the form view could be extended to provide some of the functionality of the property list! -Validator objects may be associated explictly with a wxProperty, or they may be +Validator objects may be associated explicitly with a wxProperty, or they may be indirectly associated by virtue of a property `kind' that matches validators having that kind. In the latter case, such validators are stored in a validator registry which is passed to the view before the dialog is shown. If the validator takes @@ -453,7 +453,7 @@ example, in Visual Basic and similar programming environments, you can `edit a button', or rather, edit the button's properties. One of the properties you can edit is {\it width} - but there is no explicit representation of width in a wxWindows button; instead, you call SetSize -and GetSize members. To translate this into a consisent, +and GetSize members. To translate this into a consistent, property-oriented scheme, we could derive a new class wxButtonWithProperties, which has two new functions: SetProperty and GetProperty. SetProperty accepts a property name and a value, and calls diff --git a/docs/latex/wx/protocol.tex b/docs/latex/wx/protocol.tex index d83dce4fd6..fcc9b406c3 100644 --- a/docs/latex/wx/protocol.tex +++ b/docs/latex/wx/protocol.tex @@ -68,19 +68,19 @@ Returns TRUE, if successful, else FALSE. \func{wxProtocolError}{GetError}{\void} -Returns the last occured error. +Returns the last occurred error. \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt \twocolitem{{\bf wxPROTO\_NOERR}}{No error.} -\twocolitem{{\bf wxPROTO\_NETERR}}{A generic network error occured.} -\twocolitem{{\bf wxPROTO\_PROTERR}}{An error occured during negotiation.} +\twocolitem{{\bf wxPROTO\_NETERR}}{A generic network error occurred.} +\twocolitem{{\bf wxPROTO\_PROTERR}}{An error occurred during negotiation.} \twocolitem{{\bf wxPROTO\_CONNERR}}{The client failed to connect the server.} \twocolitem{{\bf wxPROTO\_INVVAL}}{Invalid value.} \twocolitem{{\bf wxPROTO\_NOHNDLR}}{.} \twocolitem{{\bf wxPROTO\_NOFILE}}{The remote file doesn't exist.} \twocolitem{{\bf wxPROTO\_ABRT}}{Last action aborted.} -\twocolitem{{\bf wxPROTO\_RCNCT}}{An error occured during reconnection.} +\twocolitem{{\bf wxPROTO\_RCNCT}}{An error occurred during reconnection.} \twocolitem{{\bf wxPROTO\_STREAM}}{Someone tried to send a command during a transfer.} \end{twocollist} diff --git a/docs/latex/wx/psbox.tex b/docs/latex/wx/psbox.tex index b7438f4f29..3671764983 100644 --- a/docs/latex/wx/psbox.tex +++ b/docs/latex/wx/psbox.tex @@ -150,7 +150,7 @@ include "##1"}}} \newdimen\psxoffset\newdimen\psyoffset \newbox\drawingBox \newif\ifNotB@undingBox -\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of +\newhelp\PShelp{Proceed: you will have a 5cm square blank box instead of your graphics (Jean Orloff).} \def\@mpty{} \def\s@tsize#1 #2 #3 #4\@ndsize{ @@ -388,7 +388,7 @@ press x or e) and rename it before retrying.} \w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);} \w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by} \w@{% the first part in the joining (after splitting JOINTFIL into} - \w@{% it's constituents, TeX will try to process it as it stands).} + \w@{% it is constituents, TeX will try to process it as it stands).} \w@{\string\input\space psbox.tex} \w@{\string\splitfile{\string\jobname}} } diff --git a/docs/latex/wx/rect.tex b/docs/latex/wx/rect.tex index 9a8c6f106f..4611502121 100644 --- a/docs/latex/wx/rect.tex +++ b/docs/latex/wx/rect.tex @@ -38,13 +38,13 @@ Creates a wxRect object from position and size values. \member{int}{x} -x member. +x coordinate of the top-level corner of the rectangle. \membersection{wxRect::y} \member{int}{y} -y member. +y coordinate of the top-level corner of the rectangle. \membersection{wxRect::width} diff --git a/docs/latex/wx/sashwin.tex b/docs/latex/wx/sashwin.tex index 219d8e1944..fb2dd26927 100644 --- a/docs/latex/wx/sashwin.tex +++ b/docs/latex/wx/sashwin.tex @@ -21,7 +21,10 @@ The following styles apply in addition to the normal wxWindow styles. \twocolwidtha{5cm}% \begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSW\_3D}}{Draws the sashes in 3D.} +\twocolitem{\windowstyle{wxSW\_3D}}{Draws a 3D effect sash and border.} +\twocolitem{\windowstyle{wxSW\_3DSASH}}{Draws a 3D effect sash.} +\twocolitem{\windowstyle{wxSW\_3DBORDER}}{Draws a 3D effect border.} +\twocolitem{\windowstyle{wxSW\_BORDER}}{Draws a thin black border.} \end{twocollist} See also \helpref{window styles overview}{windowstyles}. diff --git a/docs/latex/wx/sbsizer.tex b/docs/latex/wx/sbsizer.tex index df5a8a5e45..3cc226a5b4 100644 --- a/docs/latex/wx/sbsizer.tex +++ b/docs/latex/wx/sbsizer.tex @@ -19,7 +19,7 @@ See also \helpref{wxSizer}{wxsizer}, \helpref{wxStaticBox}{wxstaticbox} and \func{}{wxStaticBoxSizer}{\param{wxStaticBox* }{box}, \param{int }{orient}} -Constructor. It takes an associated static box and the orientation {\it orient} +Constructor. It takes an associated static box and the orientation {\it orient} as parameters - orient can be either of wxVERTICAL or wxHORIZONTAL. \membersection{wxStaticBoxSizer::GetStaticBox}\label{wxstaticboxsizergetstaticbox} diff --git a/docs/latex/wx/scrolevt.tex b/docs/latex/wx/scrolevt.tex index f0870eaf54..c529ef32e9 100644 --- a/docs/latex/wx/scrolevt.tex +++ b/docs/latex/wx/scrolevt.tex @@ -1,9 +1,11 @@ \section{\class{wxScrollEvent}}\label{wxscrollevent} -A scroll event holds information about events sent from stand-alone scrollbars, -spin-buttons and sliders - starting from wxWindows 2.1, scrolled windows send the -\helpref{wxScrollWinEvent}{wxscrollwinevent} which does not derive from -wxCommandEvent, but from wxEvent directly. +A scroll event holds information about events sent from stand-alone +scrollbars, spin-buttons and sliders. Note that starting from wxWindows 2.1, +scrolled windows send the \helpref{wxScrollWinEvent}{wxscrollwinevent} which +does not derive from wxCommandEvent, but from wxEvent directly - don't confuse +these two kinds of events and use the event table macros mentioned below only +for the scrollbar-like controls. \wxheading{Derived from} @@ -17,10 +19,12 @@ wxCommandEvent, but from wxEvent directly. \wxheading{Event table macros} -To process a scroll event, use these event handler macros to direct input to member -functions that take a wxScrollEvent argument. You can use EVT\_COMMAND\_SCROLL... macros -with window IDs for when intercepting scroll events from controls, or EVT\_SCROLL... macros -without window IDs for intercepting scroll events from the receiving window. +To process a scroll event, use these event handler macros to direct input to +member functions that take a wxScrollEvent argument. You can use +{\tt EVT\_COMMAND\_SCROLL...} macros with window IDs for when intercepting +scroll events from controls, or {\tt EVT\_SCROLL...} macros without window IDs +for intercepting scroll events from the receiving window - except for this, +the macros behave exactly the same \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt @@ -43,6 +47,7 @@ sent as the user drags the thumtrack).} \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEDOWN(id, func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.} \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBTRACK(id, func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumtrack).} +\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.} \end{twocollist}% \wxheading{Remarks} diff --git a/docs/latex/wx/scrolwin.tex b/docs/latex/wx/scrolwin.tex index 8224091442..bfe54c172b 100644 --- a/docs/latex/wx/scrolwin.tex +++ b/docs/latex/wx/scrolwin.tex @@ -16,7 +16,7 @@ scroll position. A wxScrolledWindow will normally scroll itself and therefore its child windows as well. It might however be desired to scroll a different window than itself: e.g. when designing a -spreadsheet, you'll normally only have to scroll the (usually white) cell area, whereas the +spreadsheet, you will normally only have to scroll the (usually white) cell area, whereas the (usually grey) label area will scroll very differently. For this special purpose, you can call \helpref{SetTargetWindow}{wxscrolledwindowsettargetwindow} which means that pressing the scrollbars will scroll a different window. diff --git a/docs/latex/wx/sizer.tex b/docs/latex/wx/sizer.tex index 5bf380513a..7c83d6edc9 100644 --- a/docs/latex/wx/sizer.tex +++ b/docs/latex/wx/sizer.tex @@ -1,7 +1,7 @@ \section{\class{wxSizer}}\label{wxsizer} wxSizer is the abstract base class used for laying out subwindows in a window. You -cannot use wxSizer directly; instead, you'll have to use \helpref{wxBoxSizer}{wxboxsizer}, +cannot use wxSizer directly; instead, you will have to use \helpref{wxBoxSizer}{wxboxsizer}, \helpref{wxStaticBoxSizer}{wxstaticboxsizer} or \helpref{wxNotebookSizer}{wxnotebooksizer}. The layout algorithm used by sizers in wxWindows is closely related to layout @@ -20,7 +20,7 @@ What makes sizers so well fitted for use in wxWindows is the fact that every con reports its own minimal size and the algorithm can handle differences in font sizes or different window (dialog item) sizes on different platforms without problems. If e.g. the standard font as well as the overall design of Motif widgets requires more space than -on Windows, the intial dialog size will automatically be bigger on Motif than on Windows. +on Windows, the initial dialog size will automatically be bigger on Motif than on Windows. \pythonnote{If you wish to create a sizer class in wxPython you should derive the class from {\tt wxPySizer} in order to get Python-aware @@ -56,11 +56,11 @@ The destructor. Adds the {\it window} to the sizer. As wxSizer itself is an abstract class, the parameters have no meaning in the wxSizer class itself, but as there currently is only one class deriving directly from wxSizer and this class does not override these methods, the meaning -of the paramters is described here: +of the parameters is described here: \docparam{window}{The window to be added to the sizer. Its initial size (either set explicitly by the user or calculated internally when using wxDefaultSize) is interpreted as the minimal and in many -cases also the initial size. This is particularly useful in connection with \helpref{SetSizeHint}{wxsizersetsizehints}.} +cases also the initial size. This is particularly useful in connection with \helpref{SetSizeHints}{wxsizersetsizehints}.} \docparam{sizer}{The (child-)sizer to be added to the sizer. This allows placing a child sizer in a sizer and thus to create hierarchies of sizers (typically a vertical box as the top sizer and several @@ -75,21 +75,21 @@ the dialog.} \docparam{option}{Although the meaning of this parameter is undefined in wxSizer, it is used in wxBoxSizer to indicate if a child of a sizer can change its size in the main orientation of the wxBoxSizer - where -0 stands for not changable and a value of more than zero in interpreted relative to the value of other -children of the same wxBoxSizer. You might, e.g., have a horizontal wxBoxSizer with three children, two -of which are supposed to change their size with the sizer, then the two stretchable windows would get a +0 stands for not changable and a value of more than zero is interpreted relative to the value of other +children of the same wxBoxSizer. For example, you might have a horizontal wxBoxSizer with three children, two +of which are supposed to change their size with the sizer. Then the two stretchable windows would get a value of 1 each to make them grow and shrink equally with the sizer's horizontal dimension.} \docparam{flag}{This parameter can be used to set a number of flags which can be combined using -the binary OR operator |. Two main behaviours are defined using these flags: One is the border +the binary OR operator |. Two main behaviours are defined using these flags. One is the border around a window: the {\it border} parameter determines the border width whereas the flags given here determine where the border may be (wxTOP, wxBOTTOM, wxLEFT, wxRIGHT or wxALL). The other flags -determine the child window's behaviour if the size of the sizer changes, but - in contrast to -the {\it option} flag - not in the main orientation, but the respectively other orientation. So +determine the child window's behaviour if the size of the sizer changes. However this is not - in contrast to +the {\it option} flag - in the main orientation, but in the respectively other orientation. So if you created a wxBoxSizer with the wxVERTICAL option, these flags will be relevant if the sizer changes its horizontal size. A child may get resized to completely fill out the new size (using -either wxGROW or wxEXPAND), may get proportionally resized (wxSHAPED), may get centered (wxALIGN\_CENTER -or wxALIGN\_CENTRE) or may get aligned to either side (wxALIGN\_LEFT and wxALIGN\_TOP are set to 0 +either wxGROW or wxEXPAND), it may get proportionally resized (wxSHAPED), it may get centered (wxALIGN\_CENTER +or wxALIGN\_CENTRE) or it may get aligned to either side (wxALIGN\_LEFT and wxALIGN\_TOP are set to 0 and thus represent the default, wxALIGN\_RIGHT and wxALIGN\_BOTTOM have their obvious meaning). With proportional resize, a child may also be centered in the main orientation using wxALIGN\_CENTER\_VERTICAL (same as wxALIGN\_CENTRE\_VERTICAL) and wxALIGN\_CENTER\_HORIZONTAL @@ -99,42 +99,22 @@ wxALIGN\_CENTER\_VERTICAL (same as wxALIGN\_CENTRE\_VERTICAL) and wxALIGN\_CENTE \docparam{userData}{Allows an extra object to be attached to the sizer item, for use in derived classes when sizing information is more -complex than what {\it option} and {\it flag} will allow for.} +complex than the {\it option} and {\it flag} will allow for.} -\membersection{wxSizer::Prepend}\label{wxsizerprepend} +\membersection{wxSizer::CalcMin}\label{wxsizercalcmin} -\func{void}{Prepend}{\param{wxWindow* }{window}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}} +\func{wxSize}{CalcMin}{\void} -\func{void}{Prepend}{\param{wxSizer* }{sizer}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}} +This method is abstract and has to be overwritten by any derived class. +Here, the sizer will do the actual calculation of its children minimal sizes. -\func{void}{Prepend}{\param{int }{width}, \param{int }{height}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border= 0}, \param{wxObject* }{userData = NULL}} +\membersection{wxSizer::Fit}\label{wxsizerfit} -Same as \helpref{wxSizer::Add}{wxsizeradd}, but prepends the items to the beginning of the -list of items (windows, subsizers or spaces) owned by this sizer. +\func{void}{Fit}{\param{wxWindow* }{window}} -\membersection{wxSizer::Remove}\label{wxsizerremove} - -\func{bool}{Remove}{\param{wxWindow* }{window}} - -\func{bool}{Remove}{\param{wxSizer* }{sizer}} - -\func{bool}{Remove}{\param{int }{nth}} - -Removes a child from the sizer. {\it window} is the window to be removed, {\it sizer} the -equivalent sizer and {\it nth} is the position of the child in the sizer, typically 0 for -the first item. This method does not cause any layout or resizing to take place and does -not delete the window itself. Call \helpref{wxSizer::Layout}{wxsizerlayout} for updating -the layout "on screen" after removing a child fom the sizer. - -Returns TRUE if the child item was found and removed, FALSE otherwise. - -\membersection{wxSizer::SetDimension}\label{wxsizersetdimension} - -\func{void}{SetDimension}{\param{int }{x}, \param{int }{y}, \param{int }{width}, \param{int }{height}} - -Call this to force the sizer to take the given dimension and thus force the items owned -by the sizer to resize themselves according to the rules defined by the paramater in the -\helpref{wxSizer::Add}{wxsizeradd} and \helpref{wxSizer::Prepend}{wxsizerprepend} methods. +Tell the sizer to resize the {\it window} to match the sizer's minimal size. This +is commonly done in the constructor of the window itself, see sample in the description +of \helpref{wxBoxSizer}{wxboxsizer}. \membersection{wxSizer::GetSize}\label{wxsizergetsize} @@ -152,7 +132,28 @@ Returns the current position of the sizer. \func{wxSize}{GetMinSize}{\void} -Returns the minimal size of the sizer. +Returns the minimal size of the sizer. This is either the combined minimal +size of all the children and their borders or the minimal size set by +\helpref{SetMinSize}{wxsizersetminsize}, depending on which is bigger. + +\membersection{wxSizer::Layout}\label{wxsizerlayout} + +\func{void}{Layout}{\void} + +Call this to force layout of the children anew, e.g. after having added a child +to or removed a child (window, other sizer or space) from the sizer while keeping +the current dimension. + +\membersection{wxSizer::Prepend}\label{wxsizerprepend} + +\func{void}{Prepend}{\param{wxWindow* }{window}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}} + +\func{void}{Prepend}{\param{wxSizer* }{sizer}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border = 0}, \param{wxObject* }{userData = NULL}} + +\func{void}{Prepend}{\param{int }{width}, \param{int }{height}, \param{int }{option = 0}, \param{int }{flag = 0}, \param{int }{border= 0}, \param{wxObject* }{userData = NULL}} + +Same as \helpref{wxSizer::Add}{wxsizeradd}, but prepends the items to the beginning of the +list of items (windows, subsizers or spaces) owned by this sizer. \membersection{wxSizer::RecalcSizes}\label{wxsizerrecalcsizes} @@ -162,28 +163,53 @@ This method is abstract and has to be overwritten by any derived class. Here, the sizer will do the actual calculation of its children's positions and sizes. -\membersection{wxSizer::CalcMin}\label{wxsizercalcmin} +\membersection{wxSizer::Remove}\label{wxsizerremove} -\func{wxSize}{CalcMin}{\void} +\func{bool}{Remove}{\param{wxWindow* }{window}} -This method is abstract and has to be overwritten by any derived class. -Here, the sizer will do the actual calculation of its children minimal sizes. +\func{bool}{Remove}{\param{wxSizer* }{sizer}} -\membersection{wxSizer::Layout}\label{wxsizerlayout} +\func{bool}{Remove}{\param{int }{nth}} -\func{void}{Layout}{\void} +Removes a child from the sizer. {\it window} is the window to be removed, {\it sizer} is the +equivalent sizer and {\it nth} is the position of the child in the sizer, typically 0 for +the first item. This method does not cause any layout or resizing to take place and does +not delete the window itself. Call \helpref{wxSizer::Layout}{wxsizerlayout} to update +the layout "on screen" after removing a child fom the sizer. -Call this to force laying out the children anew, e.g. after having added a child -to or removed a child (window, other sizer or space) from the sizer while keeping -the current dimension. +Returns TRUE if the child item was found and removed, FALSE otherwise. -\membersection{wxSizer::Fit}\label{wxsizerfit} +\membersection{wxSizer::SetDimension}\label{wxsizersetdimension} -\func{void}{Fit}{\param{wxWindow* }{window}} +\func{void}{SetDimension}{\param{int }{x}, \param{int }{y}, \param{int }{width}, \param{int }{height}} -Tell the sizer to resize the {\it window} to match the sizer's minimal size. This -is commonly done in the constructor of the window itself, see sample in the description -of \helpref{wxBoxSizer}{wxboxsizer}. +Call this to force the sizer to take the given dimension and thus force the items owned +by the sizer to resize themselves according to the rules defined by the paramater in the +\helpref{Add}{wxsizeradd} and \helpref{Prepend}{wxsizerprepend} methods. + +\membersection{wxSizer::SetMinSize}\label{wxsizersetminsize} + +\func{void}{SetMinSize}{\param{int }{width}, \param{int }{height}} + +\func{void}{SetMinSize}{\param{wxSize }{size}} + +Call this to give the sizer a minimal size. Normally, the sizer will calculate its +minimal size based purely on how much space its children need. After calling this +method \helpref{GetMinSize}{wxsizergetminsize} will return either the minimal size +as requested by its children or the minimal size set here, depending on which is +bigger. + +\membersection{wxSizer::SetItemMinSize}\label{wxsizersetitemminsize} + +\func{void}{SetItemMinSize}{\param{wxWindow* }{window}, \param{int}{ width}, \param{int}{ height}} + +\func{void}{SetItemMinSize}{\param{wxSizer* }{sizer}, \param{int}{ width}, \param{int}{ height}} + +\func{void}{SetItemMinSize}{\param{int}{ pos}, \param{int}{ width}, \param{int}{ height}} + +Set an item's minimum size by window, sizer, or position. The item will be found recursively +in the sizer's descendants. This function enables an application to set the size of an item +after initial creation. \membersection{wxSizer::SetSizeHints}\label{wxsizersetsizehints} @@ -191,6 +217,6 @@ of \helpref{wxBoxSizer}{wxboxsizer}. Tell the sizer to set the minimal size of the {\it window} to match the sizer's minimal size. This is commonly done in the constructor of the window itself, see sample in the description -of \helpref{wxBoxSizer}{wxboxsizer} if the window is resizable (as many dialogs under Unix and +of \helpref{wxBoxSizer}{wxboxsizer} if the window is resizable (as are many dialogs under Unix and frames on probably all platforms). diff --git a/docs/latex/wx/socket.tex b/docs/latex/wx/socket.tex index 7e67b86192..1a288d3348 100644 --- a/docs/latex/wx/socket.tex +++ b/docs/latex/wx/socket.tex @@ -6,7 +6,7 @@ %% Created: 1999 %% RCS-ID: $Id$ %% Copyright: (c) wxWindows team -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxSocketBase}}\label{wxsocketbase} @@ -44,7 +44,7 @@ defines all basic IO functionality. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf wxSOCKET\_INPUT}}{There is data available for reading.} \twocolitem{{\bf wxSOCKET\_OUTPUT}}{The socket is ready to be written to.} -\twocolitem{{\bf wxSOCKET\_CONNECTION}}{Incoming connection (server), or connection establishment (client).} +\twocolitem{{\bf wxSOCKET\_CONNECTION}}{Incoming connection request (server), or successful connection establishment (client).} \twocolitem{{\bf wxSOCKET\_LOST}}{The connection has been closed.} \end{twocollist} @@ -76,13 +76,13 @@ at the incoming queue (server). The {\bf wxSOCKET\_LOST} event is issued when a close indication is received for the socket. This means that the connection broke down or that it was closed by the peer. Also, this event will be issued if -a delayed connection request fails. +a connection request fails. \wxheading{Event handling} To process events coming from a socket object, use the following event -handler macro to direct events to member functions that take a -\helpref{wxSocketEvent}{wxsocketevent} argument. +handler macro to direct events to member functions that take +a \helpref{wxSocketEvent}{wxsocketevent} argument. \twocolwidtha{7cm}% \begin{twocollist}\itemsep=0pt @@ -106,7 +106,7 @@ handler macro to direct events to member functions that take a \helpref{wxSocketBase}{wxsocketbaseconstruct}\\ \helpref{\destruct{wxSocketBase}}{wxsocketbasedestruct}\\ -\helpref{wxDestroy}{wxsocketbasedestroy} +\helpref{Destroy}{wxsocketbasedestroy} \membersection{Socket state} @@ -219,16 +219,19 @@ void SocketCallback(wxSocketBase& sock, wxSocketNotify evt, char *cdata); \end{verbatim} The first parameter is a reference to the socket object in which the -event occured. The second parameter tells you which event occured. +event occurred. The second parameter tells you which event occurred. (See \helpref{wxSocket events}{wxsocketbase}). The third parameter is the user data you specified using \helpref{CallbackData}{wxsocketbasecallbackdata}. -Note that events are preferred over callbacks where possible. - \wxheading{Return value} A pointer to the previous callback. +\wxheading{Remark/Warning} + +Note that callbacks are now deprecated and unsupported, and they remain +for backwards compatibility only. Use events instead. + \wxheading{See also} \helpref{wxSocketBase::CallbackData}{wxsocketbasecallbackdata}, @@ -245,12 +248,17 @@ A pointer to the previous callback. This function sets the the user data which will be passed to a callback function set via \helpref{Callback}{wxsocketbasecallback}. -Note that events are preferred over callbacks where possible. - \wxheading{Return value} A pointer to the previous user data. +\wxheading{Remark/Warning} + +Note that callbacks are now deprecated and unsupported, and they remain +for backwards compatibility only. Use events instead. + +\wxheading{See also} + \helpref{wxSocketBase::Callback}{wxsocketbasecallback}, \helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}, \helpref{wxSocketBase::Notify}{wxsocketbasenotify} @@ -265,8 +273,9 @@ A pointer to the previous user data. This function shuts down the socket, disabling further transmission and reception of data; it also disables events for the socket and frees the associated system resources. Upon socket destruction, Close is automatically -called. This means that you don't need to do it yourself, unless you -explicitly want to disable further operation. +called, so in most cases you won't need to do it yourself, unless you +explicitly want to shut down the socket, typically to notify the peer +that you are closing the connection. \wxheading{Remark/Warning} @@ -316,7 +325,7 @@ If you use \helpref{Error}{wxsocketbaseerror}, it will always return FALSE. \constfunc{bool}{Error}{\void} -Returns TRUE if an error occured in the last IO operation. +Returns TRUE if an error occurred in the last IO operation. Use this function to check for an error condition after one of the following calls: Discard, Peek, Read, ReadMsg, Unread, Write, WriteMsg. @@ -336,7 +345,7 @@ Returns a pointer of the client data for this socket, as set with % \membersection{wxSocketBase::GetLocal}\label{wxsocketbasegetlocal} -\constfunc{bool}{GetLocal}{\param{wxSockAddress\& }{addr\_man}} +\constfunc{bool}{GetLocal}{\param{wxSockAddress\& }{addr}} This function returns the local address field of the socket. The local address field contains the complete local address of the socket (local @@ -344,7 +353,7 @@ address, local port, ...). \wxheading{Return value} -It returns TRUE if no errors happened, FALSE otherwise. +TRUE if no error happened, FALSE otherwise. % % GetFlags @@ -360,7 +369,7 @@ Returns current IO flags, as set with \helpref{SetFlags}{wxsocketbasesetflags} % \membersection{wxSocketBase::GetPeer}\label{wxsocketbasegetpeer} -\constfunc{bool}{GetPeer}{\param{wxSockAddress\& }{addr\_man}} +\constfunc{bool}{GetPeer}{\param{wxSockAddress\& }{addr}} This function returns the peer address field of the socket. The peer address field contains the complete peer host address of the socket @@ -368,7 +377,7 @@ address field contains the complete peer host address of the socket \wxheading{Return value} -It returns TRUE if no errors happened, FALSE otherwise. +TRUE if no error happened, FALSE otherwise. % % InterruptWait @@ -446,7 +455,7 @@ ReadMsg, Unread, Write, WriteMsg. Returns the last wxSocket error. See \helpref{wxSocket errors}{wxsocketbase}. Please note that this function merely returns the last error code, -but it should not be used to determine if an error has occured (this +but it should not be used to determine if an error has occurred (this is because successful operations do not change the LastError value). Use \helpref{Error}{wxsocketbaseerror} first, in order to determine if the last IO call failed. If this returns TRUE, use LastError @@ -484,8 +493,8 @@ For \helpref{wxSocketServer}{wxsocketserver}, Ok will return TRUE if the server could bind to the specified address and is already listening for new connections. -Ok does not check for IO errors; use \helpref{Error}{wxsocketbaseerror} -instead for that purpose. +Ok does not check for IO errors; +use \helpref{Error}{wxsocketbaseerror} instead for that purpose. % % RestoreState @@ -532,16 +541,15 @@ Calls to SaveState and RestoreState can be nested. \func{void}{SetClientData}{\param{void *}{data}} Sets user-supplied client data for this socket. All socket events will -contain a pointer to this data, which can be retrieved with the -\helpref{wxSocketEvent::GetClientData}{wxsocketeventgetclientdata} -function. +contain a pointer to this data, which can be retrieved with +the \helpref{wxSocketEvent::GetClientData}{wxsocketeventgetclientdata} function. % % SetEventHandler % \membersection{wxSocketBase::SetEventHandler}\label{wxsocketbaseseteventhandler} -\func{void}{SetEventHandler}{\param{wxEvtHandler\&}{ evt\_hdlr}, \param{int}{ id = -1}} +\func{void}{SetEventHandler}{\param{wxEvtHandler\&}{ handler}, \param{int}{ id = -1}} Sets an event handler to be called when a socket event occurs. The handler will be called for those events for which notification is @@ -550,7 +558,7 @@ enabled with \helpref{SetNotify}{wxsocketbasesetnotify} and \wxheading{Parameters} -\docparam{evt\_hdlr}{Specifies the event handler you want to use.} +\docparam{handler}{Specifies the event handler you want to use.} \docparam{id}{The id of socket event.} @@ -566,11 +574,11 @@ enabled with \helpref{SetNotify}{wxsocketbasesetnotify} and % \membersection{wxSocketBase::SetFlags}\label{wxsocketbasesetflags} -\func{void}{SetFlags}{\param{wxSocketBase::wxSocketFlags}{ flags}} +\func{void}{SetFlags}{\param{wxSocketFlags}{ flags}} -Use SetFlags to customize IO operation for this socket. The {\it flags} -parameter is a combination of flags ORed toghether. The following flags -can be used: +Use SetFlags to customize IO operation for this socket. +The {\it flags} parameter may be a combination of flags ORed toghether. +The following flags can be used: \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt @@ -585,9 +593,9 @@ A brief overview on how to use these flags follows. If no flag is specified (this is the same as {\bf wxSOCKET\_NONE}), IO calls will return after some data has been read or written, even when the transfer might not be complete. This is the same as issuing -exactly one blocking low-level call to recv() or send(). Note that -{\it blocking} here refers to when the function returns, not to whether -the GUI blocks during this time. +exactly one blocking low-level call to recv() or send(). Note +that {\it blocking} here refers to when the function returns, not +to whether the GUI blocks during this time. If {\bf wxSOCKET\_NOWAIT} is specified, IO calls will return immediately. Read operations will retrieve only available data. Write operations will @@ -601,9 +609,9 @@ If {\bf wxSOCKET\_WAITALL} is specified, IO calls won't return until ALL the data has been read or written (or until an error occurs), blocking if necessary, and issuing several low level calls if necessary. This is the same as having a loop which makes as many blocking low-level calls to -recv() or send() as needed so as to transfer all the data. Note that -{\it blocking} here refers to when the function returns, not to whether -the GUI blocks during this time. +recv() or send() as needed so as to transfer all the data. Note +that {\it blocking} here refers to when the function returns, not +to whether the GUI blocks during this time. The {\bf wxSOCKET\_BLOCK} flag controls whether the GUI blocks during IO operations. If this flag is specified, the socket will not yield @@ -632,7 +640,7 @@ it controls whether the GUI blocks. \func{void}{SetNotify}{\param{wxSocketEventFlags}{ flags}} SetNotify specifies which socket events are to be sent to the event handler. -The {\it flags} parameter is a combination of flags ORed toghether. The +The {\it flags} parameter may be combination of flags ORed toghether. The following flags can be used: \twocolwidtha{7cm} @@ -663,9 +671,9 @@ For more information on socket events see \helpref{wxSocket events}{wxsocketbase \func{void}{SetTimeout}{\param{int }{seconds}} This function sets the default socket timeout in seconds. This timeout -applies to all IO calls, and also to the \helpref{Wait}{wxsocketbasewait} -family of functions if you don't specify a wait interval. Initially, the -default is set to 10 minutes. +applies to all IO calls, and also to the \helpref{Wait}{wxsocketbasewait} family +of functions if you don't specify a wait interval. Initially, the default +timeout is 10 minutes. % % Peek @@ -816,18 +824,19 @@ Returns a reference to the current object. \func{bool}{Wait}{\param{long}{ seconds = -1}, \param{long}{ millisecond = 0}} -This function waits until one of the following conditions is TRUE. Note -that it is recommended to use the individual Wait functions to wait for -the required condition, instead of this one. +This function waits until any of the following conditions is TRUE: \begin{itemize} \item The socket becomes readable. \item The socket becomes writable. -\item An ongoing connection request has completed (only for clients) -\item An incoming connection request has arrived (only for servers) +\item An ongoing connection request has completed (\helpref{wxSocketClient}{wxsocketclient} only) +\item An incoming connection request has arrived (\helpref{wxSocketServer}{wxsocketserver} only) \item The connection has been closed. \end{itemize} +Note that it is recommended to use the individual Wait functions +to wait for the required condition, instead of this one. + \wxheading{Parameters} \docparam{seconds}{Number of seconds to wait. @@ -1054,7 +1063,7 @@ Constructor. \func{}{\destruct{wxSocketClient}}{\void} -Destructor. +Destructor. Please see \helpref{wxSocketBase::Destroy}{wxsocketbasedestroy}. % % Connect @@ -1065,8 +1074,8 @@ Destructor. Connects to a server using the specified address. -If {\it wait} is TRUE, Connect will wait until the connection completes. -{\bf Warning:} This will block the GUI. +If {\it wait} is TRUE, Connect will wait until the connection +completes. {\bf Warning:} This will block the GUI. If {\it wait} is FALSE, Connect will try to establish the connection and return immediately, without blocking the GUI. When used this way, even if @@ -1085,13 +1094,13 @@ and {\bf wxSOCKET\_LOST} events (for connection failure). Returns TRUE if the connection is established and no error occurs. -If {\it wait} was TRUE, and Connect returns FALSE, an error occured +If {\it wait} was TRUE, and Connect returns FALSE, an error occurred and the connection failed. If {\it wait} was FALSE, and Connect returns FALSE, you should still be prepared to handle the completion of this connection request, either -with \helpref{WaitOnConnect}{wxsocketclientwaitonconnect} or by watching -{\bf wxSOCKET\_CONNECTION} and {\bf wxSOCKET\_LOST} events. +with \helpref{WaitOnConnect}{wxsocketclientwaitonconnect} or by +watching {\bf wxSOCKET\_CONNECTION} and {\bf wxSOCKET\_LOST} events. \wxheading{See also} @@ -1107,8 +1116,8 @@ with \helpref{WaitOnConnect}{wxsocketclientwaitonconnect} or by watching \func{bool}{WaitOnConnect}{\param{long}{ seconds = -1}, \param{long}{ milliseconds = 0}} Wait until a connection request completes, or until the specified timeout -elapses. Use this function after issuing a call to \helpref{Connect}{wxsocketclientconnect} -with {\it wait} set to FALSE. +elapses. Use this function after issuing a call +to \helpref{Connect}{wxsocketclientconnect} with {\it wait} set to FALSE. \wxheading{Parameters} @@ -1139,7 +1148,7 @@ bool waitmore = TRUE; while ( !client->WaitOnConnect(seconds, millis) && waitmore ) { // possibly give some feedback to the user, - // and update waitmore if needed. + // and update waitmore as needed. } bool success = client->IsConnected(); \end{verbatim} @@ -1167,8 +1176,8 @@ This event class contains information about socket events. \wxheading{Event table macros} -To process a socket event, use these event handler macros to direct input to member -functions that take a wxSocketEvent argument. +To process a socket event, use these event handler macros to direct input +to member functions that take a wxSocketEvent argument. \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt @@ -1265,8 +1274,8 @@ Accepts an incoming connection request, and creates a new the server-side of the connection. If {\it wait} is TRUE and there are no pending connections to be -accepted, it will wait for the next incoming connection to arrive. -{\bf Warning:} This will block the GUI. +accepted, it will wait for the next incoming connection to +arrive. {\bf Warning:} This will block the GUI. If {\it wait} is FALSE, it will try to accept a pending connection if there is one, but it will always return immediately without blocking @@ -1277,7 +1286,7 @@ that there is an incoming connection waiting to be accepted. \wxheading{Return value} -Returns an opened socket connection, or NULL if an error occured or +Returns an opened socket connection, or NULL if an error occurred or if the {\it wait} parameter was FALSE and there were no pending connections. @@ -1303,14 +1312,14 @@ Accept an incoming connection using the specified socket object. \wxheading{Return value} -Returns TRUE on success, or FALSE if an error occured or if the +Returns TRUE on success, or FALSE if an error occurred or if the {\it wait} parameter was FALSE and there were no pending connections. \helpref{wxSocketServer::WaitForAccept}{wxsocketserverwaitforaccept}, \helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}, \helpref{wxSocketBase::Notify}{wxsocketbasenotify}, -\helpref{wxSocketServer::Accept}{wxsocketserveraccept} for a detailed explanation +\helpref{wxSocketServer::Accept}{wxsocketserveraccept} % % WaitForAccept diff --git a/docs/latex/wx/spinbutt.tex b/docs/latex/wx/spinbutt.tex index cbd1263151..623d20c8d2 100644 --- a/docs/latex/wx/spinbutt.tex +++ b/docs/latex/wx/spinbutt.tex @@ -1,7 +1,13 @@ \section{\class{wxSpinButton}}\label{wxspinbutton} -A wxSpinButton has two small up and down (or left and right) arrow buttons. It is often -used next to a text control for increment and decrementing a value. +A wxSpinButton has two small up and down (or left and right) arrow buttons. It +is often used next to a text control for increment and decrementing a value. +Portable programs should try to use \helpref{wxSpinCtrl}{wxspinctrl} instead +as wxSpinButton is not implemented for all platforms (Win32 and GTK only +currently). + +{\bf NB:} the range supported by this control (and wxSpinCtrl) depends on the +platform but is at least {\tt SHRT\_MIN} to {\tt SHRT\_MAX}. \wxheading{Derived from} @@ -10,6 +16,10 @@ used next to a text control for increment and decrementing a value. \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{See also} + +\helpref{wxSpinCtrl}{wxspinctrl} + \wxheading{Include files} @@ -18,7 +28,7 @@ used next to a text control for increment and decrementing a value. \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button.} +\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button (note that this style is not supported in wxGTK).} \twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.} \twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.} \twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.} @@ -28,23 +38,15 @@ See also \helpref{window styles overview}{windowstyles}. \wxheading{Event handling} -To process input from a spin button, use one of these event handler macros to direct input to member -functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: +To process input from a spin button, use one of these event handler macros to +direct input to member functions that take a +\helpref{wxSpinEvent}{wxspinevent} argument: \twocolwidtha{7cm} \begin{twocollist} -\twocolitem{{\bf EVT\_SPIN(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_SPIN\_UP(id, func)}}{Catch up (or left) commands. Win32 only. } -\twocolitem{{\bf EVT\_SPIN\_DOWN(id, func)}}{Catch down (or right) commands. Win32 only. } -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_BOTTOM(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_LINEUP(id, func)}}{Catch a line up command.} -\twocolitem{{\bf EVT\_COMMAND\_LINEDOWN(id, func)}}{Catch a line down command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEUP(id, func)}}{Catch a page up command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEDOWN(id, func)}}{Catch a page down command.} -\twocolitem{{\bf EVT\_COMMAND\_THUMBTRACK(id, func)}}{Catch a thumbtrack command (continuous movement of the scroll thumb).} +\twocolitem{{\bf EVT\_SPIN(id, func)}}{Generated whenever an arros is pressed.} +\twocolitem{{\bf EVT\_SPIN\_UP(id, func)}}{Generated when left/up arrow is pressed.} +\twocolitem{{\bf EVT\_SPIN\_DOWN(id, func)}}{Generated when right/down arrow is pressed.} \end{twocollist}% \wxheading{See also} @@ -106,7 +108,7 @@ See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details. \constfunc{int}{GetMax}{\void} -Returns the maximum permissable value. +Returns the maximum permissible value. \wxheading{See also} @@ -116,7 +118,7 @@ Returns the maximum permissable value. \constfunc{int}{GetMin}{\void} -Returns the minimum permissable value. +Returns the minimum permissible value. \wxheading{See also} diff --git a/docs/latex/wx/spinctrl.tex b/docs/latex/wx/spinctrl.tex index 44570693f6..4cf5aaa00a 100644 --- a/docs/latex/wx/spinctrl.tex +++ b/docs/latex/wx/spinctrl.tex @@ -30,7 +30,7 @@ wxSpinCtrl combines \helpref{wxTextCtrl}{wxtextctrl} and \wxheading{Event handling} To process input from a spin button, use one of these event handler macros to direct input to member -functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: +functions that take a \helpref{wxSpinEvent}{wxspinevent} argument: \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt diff --git a/docs/latex/wx/spinevt.tex b/docs/latex/wx/spinevt.tex new file mode 100644 index 0000000000..6b063c96fb --- /dev/null +++ b/docs/latex/wx/spinevt.tex @@ -0,0 +1,51 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: spinevt.tex +%% Purpose: wxSpinEvent documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 29.03.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxSpinEvent}}\label{wxspinevent} + +This event class is used for the events generated by +\helpref{wxSpinButton}{wxspinbutton} and \helpref{wxSpinCtrl}{wxspinctrl}. + +\wxheading{Derived from} + +\helpref{wxNotifyEvent}{wxnotifyevent}\\ +\helpref{wxCommandEvent}{wxcommandevent}\\ +\helpref{wxEvent}{wxevent}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + or + +\wxheading{See also} + +\helpref{wxSpinButton}{wxspinbutton} and \helpref{wxSpinCtrl}{wxspinctrl} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxSpinEvent::wxSpinEvent}\label{wxspineventctor} + +\func{}{wxSpinEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{id = 0}} + +The constructor is not normally used by the user code. + +\membersection{wxSpinEvent::GetPosition}\label{wxspineventgetposition} + +\constfunc{int}{GetPosition}{\void} + +Retrieve the current spin button or control value. + +\membersection{wxSpinEvent::SetPosition}\label{wxspineventsetposition} + +\func{void}{SetPosition}{\param{int }{pos}} + +Set the value associated with the event. + diff --git a/docs/latex/wx/splitevt.tex b/docs/latex/wx/splitevt.tex index c2af34411c..759204f531 100644 --- a/docs/latex/wx/splitevt.tex +++ b/docs/latex/wx/splitevt.tex @@ -114,7 +114,7 @@ May only be called while processing wxEVT\_COMMAND\_SPLITTER\_SASH\_POS\_CHANGING and wxEVT\_COMMAND\_SPLITTER\_SASH\_POS\_CHANGED events. -\wxheading{Paramters} +\wxheading{Parameters} \docparam{pos}{New sash position.} diff --git a/docs/latex/wx/splitter.tex b/docs/latex/wx/splitter.tex index 879dc12714..bd311fcabc 100644 --- a/docs/latex/wx/splitter.tex +++ b/docs/latex/wx/splitter.tex @@ -13,7 +13,10 @@ This is also recommended for GTK. \begin{twocollist}\itemsep=0pt \twocolitem{\windowstyle{wxSP\_3D}}{Draws a 3D effect border and sash.} -\twocolitem{\windowstyle{wxSP\_BORDER}}{Draws a thin black border around the window, and a black sash.} +\twocolitem{\windowstyle{wxSP\_3DSASH}}{Draws a 3D effect sash.} +\twocolitem{\windowstyle{wxSP\_3DBORDER}}{Draws a 3D effect border.} +\twocolitem{\windowstyle{wxSP\_FULLSASH}}{Draws the ends of the sash (so the window can be used without a border).} +\twocolitem{\windowstyle{wxSP\_BORDER}}{Draws a thin black border around the window.} \twocolitem{\windowstyle{wxSP\_NOBORDER}}{No border, and a black sash.} \twocolitem{\windowstyle{wxSP\_PERMIT\_UNSPLIT}}{Always allow to unsplit, even with the minimum pane size other than zero.} @@ -252,7 +255,7 @@ and then resplitting the window back because it will provoke much less flicker (if any). It is valid to call this function whether the splitter has two windows or only one. -Both parameters should be non NULL and {\it winOld} must specify one of the +Both parameters should be non-NULL and {\it winOld} must specify one of the windows managed by the splitter. If the parameters are incorrect or the window couldn't be replaced, FALSE is returned. Otherwise the function will return TRUE, but please notice that it will not delete the replaced window and you @@ -343,7 +346,7 @@ Initializes the top and bottom panes of the splitter window. \docparam{window2}{The bottom pane.} \docparam{sashPosition}{The initial position of the sash. If this value is -positive, it specifies the size of the upper pane. If it's negative, it's +positive, it specifies the size of the upper pane. If it is negative, it is absolute value gives the size of the lower pane. Finally, specify 0 (default) to choose the default position (half of the total window height).} @@ -376,7 +379,7 @@ Initializes the left and right panes of the splitter window. \docparam{window2}{The right pane.} \docparam{sashPosition}{The initial position of the sash. If this value is -positive, it specifies the size of the left pane. If it's negative, it's +positive, it specifies the size of the left pane. If it is negative, it is absolute value gives the size of the right pane. Finally, specify 0 (default) to choose the default position (half of the total window width).} diff --git a/docs/latex/wx/statline.tex b/docs/latex/wx/statline.tex index d304f367f3..93f62a82ae 100644 --- a/docs/latex/wx/statline.tex +++ b/docs/latex/wx/statline.tex @@ -34,7 +34,7 @@ groups of controls. The line may be only vertical or horizontal. Default constructor. -\func{}{wxStaticLine}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp +\func{}{wxStaticLine}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp \param{long}{ style = wxLI\_HORIZONTAL}, \param{const wxString\& }{name = ``staticLine"}} @@ -61,7 +61,7 @@ whether the line if horizontal or vertical) is ignored.} \membersection{wxStaticLine::Create}\label{wxstaticlinecreate} -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{label},\rtfsp +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp \param{long}{ style = 0}, \param{const wxString\& }{name = ``staticLine"}} diff --git a/docs/latex/wx/stattext.tex b/docs/latex/wx/stattext.tex index 2802fe6ff8..433a509909 100644 --- a/docs/latex/wx/stattext.tex +++ b/docs/latex/wx/stattext.tex @@ -43,7 +43,7 @@ See also \helpref{window styles overview}{windowstyles}. Default constructor. \func{}{wxStaticText}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{label = ``"}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp +\param{const wxString\& }{label}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp \param{long}{ style = 0}, \param{const wxString\& }{name = ``staticText"}} Constructor, creating and showing a text control. @@ -71,7 +71,7 @@ Constructor, creating and showing a text control. \membersection{wxStaticText::Create}\label{wxstatictextcreate} \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp -\param{const wxString\& }{label = ``"}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp +\param{const wxString\& }{label}, \param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp \param{long}{ style = 0}, \param{const wxString\& }{name = ``staticText"}} Creation function, for two-step construction. For details see \helpref{wxStaticText::wxStaticText}{wxstatictextconstr}. diff --git a/docs/latex/wx/statusbr.tex b/docs/latex/wx/statusbr.tex index 9f134c6ac7..17a082322a 100644 --- a/docs/latex/wx/statusbr.tex +++ b/docs/latex/wx/statusbr.tex @@ -204,6 +204,9 @@ and refreshes the window. Sets the number of fields, and optionally the field widths. +\pythonnote{Only the first parameter is accepted. Use SetStatusWidths +to set the widths of the fields.} + \wxheading{Parameters} \docparam{number}{The number of fields.} @@ -263,4 +266,3 @@ variable fields. \pythonnote{Only a single parameter is required, a Python list of integers.} - diff --git a/docs/latex/wx/stopwtch.tex b/docs/latex/wx/stopwtch.tex index 98b60ed19f..cff119d2ca 100644 --- a/docs/latex/wx/stopwtch.tex +++ b/docs/latex/wx/stopwtch.tex @@ -1,6 +1,6 @@ \section{\class{wxStopWatch}}\label{wxstopwatch} -The wxStopWatch class allow you to measure time intervalls. +The wxStopWatch class allow you to measure time intervals. \wxheading{Include files} diff --git a/docs/latex/wx/stream.tex b/docs/latex/wx/stream.tex index 397098dd8c..a9f7c711c0 100644 --- a/docs/latex/wx/stream.tex +++ b/docs/latex/wx/stream.tex @@ -90,7 +90,7 @@ accordingly until all requested data is read. \wxheading{Return value} It returns the size of the data read. If the returned size is different of the specified -{\it size}, an error has occured and should be tested using +{\it size}, an error has occurred and should be tested using \helpref{LastError}{wxstreambaselasterror}. \func{size\_t}{Read}{\param{wxStreamBuffer *}{buffer}} @@ -121,7 +121,7 @@ Gets a single char from the stream buffer. It acts like the Read call. \wxheading{Problem} -You aren't directly notified if an error occured during the IO call. +You aren't directly notified if an error occurred during the IO call. \wxheading{See also} @@ -135,7 +135,7 @@ Puts a single char to the stream buffer. \wxheading{Problem} -You aren't directly notified if an error occured during the IO call. +You aren't directly notified if an error occurred during the IO call. \wxheading{See also} @@ -195,7 +195,7 @@ you create an empty stream buffer (See \helpref{wxStreamBuffer::wxStreamBuffer}{ \wxheading{Remarks} -When you use this function, you'll have to destroy the IO buffers yourself +When you use this function, you will have to destroy the IO buffers yourself after the stream buffer is destroyed or don't use it anymore. In the case you use it with an empty buffer, the stream buffer will not resize it when it is full. diff --git a/docs/latex/wx/strmbase.tex b/docs/latex/wx/strmbase.tex index 0a6a5a38ef..243e5a48ef 100644 --- a/docs/latex/wx/strmbase.tex +++ b/docs/latex/wx/strmbase.tex @@ -43,7 +43,7 @@ Destructor. \constfunc{wxStreamError}{IsOk}{\void} -Returns TRUE if no error occured on the stream. +Returns TRUE if no error occurred on the stream. \wxheading{See also} @@ -57,10 +57,10 @@ This function returns the last error. \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt -\twocolitem{{\bf wxSTREAM\_NO\_ERROR}}{No error occured.} -\twocolitem{{\bf wxSTREAM\_EOF}}{An End-Of-File occured.} -\twocolitem{{\bf wxSTREAM\_WRITE\_ERROR}}{A generic error occured on the last write call.} -\twocolitem{{\bf wxSTREAM\_READ\_ERROR}}{A generic error occured on the last read call.} +\twocolitem{{\bf wxSTREAM\_NO\_ERROR}}{No error occurred.} +\twocolitem{{\bf wxSTREAM\_EOF}}{An End-Of-File occurred.} +\twocolitem{{\bf wxSTREAM\_WRITE\_ERROR}}{A generic error occurred on the last write call.} +\twocolitem{{\bf wxSTREAM\_READ\_ERROR}}{A generic error occurred on the last read call.} \end{twocollist} \membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread} diff --git a/docs/latex/wx/strmsock.tex b/docs/latex/wx/strmsock.tex index 95aefe0e9c..d7179d0cbb 100644 --- a/docs/latex/wx/strmsock.tex +++ b/docs/latex/wx/strmsock.tex @@ -6,7 +6,7 @@ %% Created: 1999 %% RCS-ID: $Id$ %% Copyright: (c) wxWindows team -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ----------------------------------------------------------------------------- diff --git a/docs/latex/wx/table.tex b/docs/latex/wx/table.tex new file mode 100644 index 0000000000..458bb44f7f --- /dev/null +++ b/docs/latex/wx/table.tex @@ -0,0 +1,27 @@ +\section{\class{wxTable}}\label{wxtable} + +A wxTable instance provides access to rows of data in +a table contained within the associated ODBC data source + +\wxheading{Include files} + + + + + +\wxheading{Data structures} + +\wxheading{Remarks} + +\wxheading{See also} + +\helpref{wxTable}{wxtable} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxTable::wxTable}\label{wxtableconstr} + +\func{}{wxTable}{\void} + +Default constructor. + diff --git a/docs/latex/wx/tbitmap.tex b/docs/latex/wx/tbitmap.tex index 856b8df220..a5ed114011 100644 --- a/docs/latex/wx/tbitmap.tex +++ b/docs/latex/wx/tbitmap.tex @@ -80,7 +80,7 @@ it to wxBitmap form. Note that using wxImage is the preferred way to load images in wxWindows, with the exception of resources (XPM-files or native Windows resources). Writing an image format handler for wxImage is also far easier than writing one for wxBitmap, because wxImage has -exactly one format on all platforms wheras wxBitmap can store pixel data +exactly one format on all platforms whereas wxBitmap can store pixel data very differently, depending on colour depths and platform. \wxheading{wxBitmap} @@ -172,21 +172,23 @@ then call the static function \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} {\small \begin{verbatim} - #include #include ... // Initialisation - wxBitmap::AddHandler(new wxPNGFileHandler); wxBitmap::AddHandler(new wxXPMFileHandler); wxBitmap::AddHandler(new wxXPMDataHandler); ... \end{verbatim} } -Assuming the handlers have been written correctly, you should now be able to load and save PNG files -and XPM files using the usual wxBitmap API. +Assuming the handlers have been written correctly, you should now be able to load and save +XPM files using the usual wxBitmap API. {\bf Note:} bitmap handlers are not implemented on all platforms. Currently, the above is only necessary on Windows, to save the extra overhead of formats that may not be necessary (if you don't use them, they -are not linked into the executable). Unix platforms have PNG and XPM capability built-in (where supported). +are not linked into the executable). Unix platforms have XPM capability built-in (where supported). + +Also, just because a handler (such as a PNG handler) is not present does not mean that +wxBitmap does not support that file format. If wxBitmap fails to find a suitable handler, +the file-loading capabilities of wxImage are used instead. diff --git a/docs/latex/wx/tclipbrd.tex b/docs/latex/wx/tclipbrd.tex index 545c46195b..ae3f102ab3 100644 --- a/docs/latex/wx/tclipbrd.tex +++ b/docs/latex/wx/tclipbrd.tex @@ -35,7 +35,7 @@ should do. The data provider is responsible for creating a \helpref{wxDataObject}{wxdataobject} containing the data to be -transfered. Then it should either pass it to the clipboard using +transferred. Then it should either pass it to the clipboard using \helpref{SetData}{wxclipboardsetdata} function or to \helpref{wxDropSource}{wxdropsource} and call \helpref{DoDragDrop}{wxdropsourcedodragdrop} function. @@ -62,7 +62,7 @@ create a \helpref{wxDataObject}{wxdataobject} derived class which supports the data formats you need and pass it as argument to \helpref{wxClipboard::GetData}{wxclipboardgetdata}. If it returns {\tt FALSE}, no data in (any of) the supported format(s) is available. If it returns {\tt -TRUE}, the data has been successfully transfered to wxDataObject. +TRUE}, the data has been successfully transferred to wxDataObject. For drag and drop case, the \helpref{wxDropTarget::OnData}{wxdroptargetondata} virtual function will be called when a data object is dropped, from which the diff --git a/docs/latex/wx/tconfig.tex b/docs/latex/wx/tconfig.tex index 0002c0c33d..cff0337218 100644 --- a/docs/latex/wx/tconfig.tex +++ b/docs/latex/wx/tconfig.tex @@ -13,7 +13,7 @@ information. They were especially designed for this usage and, although may probably be used for many other things as well, should be limited to it. It means that this information should be: -\begin{enumerate} +\begin{enumerate}\itemsep=0pt \item Typed, i.e. strings or numbers for the moment. You can not store binary data, for example. \item Small. For instance, it is not recommended to use the Windows @@ -23,7 +23,7 @@ consumption point of view. \end{enumerate} On the other hand, the features provided make them very useful for storing all -kinds of small to medium volumes of hierarchically-organized, heterogenous +kinds of small to medium volumes of hierarchically-organized, heterogeneous data. In short, this is a place where you can conveniently stuff all your data (numbers and strings) organizing it in a tree where you use the filesystem-like paths to specify the location of a piece of data. In diff --git a/docs/latex/wx/tconstr.tex b/docs/latex/wx/tconstr.tex index 4d14c3dff0..386eb27e1d 100644 --- a/docs/latex/wx/tconstr.tex +++ b/docs/latex/wx/tconstr.tex @@ -2,8 +2,8 @@ Classes: \helpref{wxLayoutConstraints}{wxlayoutconstraints}, \helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}. -Objects of class wxLayoutConstraint can be associated with a window to define the -way its subwindows are laid out, with respect to their siblings or parent. +Objects of class wxLayoutConstraint can be associated with a window to define +the way it is laid out, with respect to its siblings or the parent. The class consists of the following eight constraints of class wxIndividualLayoutConstraint, some or all of which should be accessed directly to set the appropriate @@ -34,9 +34,12 @@ label). The constrains calculation is done in \helpref{wxWindow::Layout}{wxwindowlayout} function which evaluates constraints. To call it you can either call -wxWindow::SetAutoLayout to tell default OnSize handlers to call Layout -automatically whenever the window size changes, or override OnSize and call Layout -yourself. +\helpref{wxWindow::SetAutoLayout}{wxwindowsetautolayout} if the parent window +is a frame, panel or a dialog to tell default OnSize handlers to call Layout +automatically whenever the window size changes, or override OnSize and call +Layout yourself (note that you do have to call +\helpref{Layout}{wxwindowlayout} yourself if the parent window is not a +frame, panel or dialog). \subsection{Constraint layout: more detail} @@ -69,13 +72,13 @@ When the user sets constraints, many of the constraints for windows edges and dimensions remain unconstrained. For a given window, the wxWindow::Layout algorithm first resets all constraints in all children to have unknown edge or dimension values, and then iterates through the constraints, -evaulating them. For unconstrained edges and dimensions, it +evaluating them. For unconstrained edges and dimensions, it tries to find the value using known relationships that always hold. For example, an unconstrained {\it width} may be calculated from the {\it left} and {\it right edges}, if both are currently known. For edges and dimensions with user-supplied constraints, these -constraints are evaulated if the inputs of the constraint are known. +constraints are evaluated if the inputs of the constraint are known. -The algorithm stops when all child edges and dimension are known (success), or there +The algorithm stops when all child edges and dimension are known (success), or there are unknown edges or dimensions but there has been no change in this cycle (failure). It then sets all the window positions and sizes according to the values it has found. @@ -85,7 +88,7 @@ irrelevant, however you may reduce the number of iterations (and thus speed up the layout calculations) by creating the controls in such order that as many constraints as possible can be calculated during the first iteration. For example, if you have 2 buttons which you'd like to position in the lower right corner, it is -slighty more efficient to first create the second button and specify that its +slightly more efficient to first create the second button and specify that its right border IsSameAs(parent, wxRight) and then create the first one by specifying that it should be LeftOf() the second one than to do in a more natural left-to-right order. diff --git a/docs/latex/wx/tcpclint.tex b/docs/latex/wx/tcpclint.tex index 40ae1dc631..2d080a31d4 100644 --- a/docs/latex/wx/tcpclint.tex +++ b/docs/latex/wx/tcpclint.tex @@ -9,7 +9,7 @@ To create a client which can communicate with a suitable server, you need to derive a class from wxTCPConnection and another from wxTCPClient. The custom wxTCPConnection class will intercept communications in a `conversation' with a server, and the custom wxTCPServer is required -so that a user-overriden \helpref{wxTCPClient::OnMakeConnection}{wxtcpclientonmakeconnection} member can return +so that a user-overridden \helpref{wxTCPClient::OnMakeConnection}{wxtcpclientonmakeconnection} member can return a wxTCPConnection of the required class, when a connection is made. \wxheading{Derived from} diff --git a/docs/latex/wx/tdate.tex b/docs/latex/wx/tdate.tex index fa232d914d..9dfef5b2b7 100644 --- a/docs/latex/wx/tdate.tex +++ b/docs/latex/wx/tdate.tex @@ -6,12 +6,12 @@ %% Created: 07.03.00 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Date and time classes overview}\label{wxdatetimeoverview} -Classes: \helpref{wxDateTime}{wxdatetime}, \helpref{wxDateSpan}{wxdatespan}, \helpref{wxTimeSpan}, \helpref{wxtimespan}, \helpref{wxCalendarCtrl}{wxcalendarctrl} +Classes: \helpref{wxDateTime}{wxdatetime}, \helpref{wxDateSpan}{wxdatespan}, \helpref{wxTimeSpan}{wxtimespan}, \helpref{wxCalendarCtrl}{wxcalendarctrl} \subsection{Introduction} @@ -20,15 +20,15 @@ of the supported features of \helpref{wxDateTime}{wxdatetime} class are: \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt -\item{Wide range}{The range of supported dates goes from about 4714 B.C. to +\twocolitem{Wide range}{The range of supported dates goes from about 4714 B.C. to some 480 million years in the future.} -\item{Precision}{Not using floating point calculations anywhere ensures that +\twocolitem{Precision}{Not using floating point calculations anywhere ensures that the date calculations don't suffer from rounding errors.} -\item{Many features}{Not only all usual calculations with dates are supported, +\twocolitem{Many features}{Not only all usual calculations with dates are supported, but also more exotic week and year day calculations, work day testing, standard astronomical functions, conversion to and from strings in either strict or free format.} -\item{Efficiency}{Objects of wxDateTime are small (8 bytes) and working with +\twocolitem{Efficiency}{Objects of wxDateTime are small (8 bytes) and working with them is fast} \end{twocollist} @@ -44,7 +44,8 @@ There are also helper classes which are used together with wxDateTime: \helpref{wxDateTimeHolidayAuthority}{wxdatetimeholidayauthority} which is used to determine whether a given date is a holiday or not and \helpref{wxDateTimeWorkDays}{wxdatetimeworkdays} which is a derivation of this -class for which (only) Saturdays and Sundays are the holidays. +class for which (only) Saturdays and Sundays are the holidays. See more about +these classes in the discussion of the \helpref{holidays}{tdateholidays}. Finally, in other parts of this manual you may find mentions of wxDate and wxTime classes. \helpref{These classes}{tdatecompatibility} are obsolete and @@ -110,7 +111,7 @@ also more efficient). However, wxDateSpan may be very useful in situations when you do need to understand what does `in a month' mean (of course, it is just {\tt wxDateTime::Now() + wxDateSpan::Month()}). -\subsection{Date arithmetics} +\subsection{Date arithmetics}\label{tdatearithm} Many different operations may be performed with the dates, however not all of them make sense. For example, multiplying date by a number is an invalid @@ -119,7 +120,7 @@ perfectly valid. Here is what can be done: -\begin{twocollist} +\begin{twocollist}\itemsep=0pt \item{{\bf Addition}}{a wxTimeSpan or wxDateSpan can be added to wxDateTime resulting in a new wxDateTime object and also 2 objects of the same span class can be added together giving another object of the smae class.} @@ -174,9 +175,9 @@ simply print time in any time zone. To see how to do it, the last issue to address is how to construct a TimeZone object which must be passed to all these methods. First of all, you may construct it manually by specifying the time zone offset in seconds from GMT, but -usually you will just use one of the \helpref{symbolic time zone -names}{wxdatetimetimezones} and let the conversion constructor do the job. -I.e.. you would just write +usually you will just use one of the \helpref{symbolic time zone names}{wxdatetime} and +let the conversion constructor do the job. +I.e. you would just write \begin{verbatim} wxDateTime dt(...whatever...); @@ -184,7 +185,7 @@ printf("The time is %s in local time zone", dt.FormatTime().c_str()); printf("The time is %s in GMT", dt.FormatTime(wxDateTime::GMT).c_str()); \end{verbatim} -\subsection{Daylight saving time (DST)} +\subsection{Daylight saving time (DST)}\label{tdatedst} DST (a.k.a. `summer time') handling is always a delicate task which is better left to the operating system which is supposed to be configured by the @@ -204,9 +205,14 @@ too, so they are subject to the same limitations. % is this really needed? \subsection{Conversion to/from text} +\subsection{wxDateTime and Holidays}\label{tdateholidays} + +TODO. + \subsection{Compatibility}\label{tdatecompatibility} The old classes for date/time manipulations ported from wxWindows version 1.xx are still included but are reimplemented in terms of wxDateTime. However, using them is strongly discouraged because they have a few quirks/bugs and were not `Y2K' compatible. + diff --git a/docs/latex/wx/tdb.tex b/docs/latex/wx/tdb.tex index 33a52a9b6f..1d2dae0ef2 100644 --- a/docs/latex/wx/tdb.tex +++ b/docs/latex/wx/tdb.tex @@ -17,7 +17,7 @@ file via an ODBC driver. The language for most of the database operations is SQL, so you need to learn a small amount of SQL as well as the wxWindows ODBC wrapper API. Even though the databases may not be SQL-based, the ODBC drivers translate SQL into appropriate operations -for the database or file: even text files have rudimentry ODBC support, +for the database or file: even text files have rudimentary ODBC support, along with dBASE, Access, Excel and other file formats. The run-time files for ODBC are bundled with many existing database diff --git a/docs/latex/wx/tdelwin.tex b/docs/latex/wx/tdelwin.tex index f9df4e54f0..7d7b02a1b1 100644 --- a/docs/latex/wx/tdelwin.tex +++ b/docs/latex/wx/tdelwin.tex @@ -17,7 +17,7 @@ decide whether or not to destroy the window. If the application is for some reason forcing the application to close (\helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns FALSE), the window should always be destroyed, otherwise there is the option to ignore the request, or maybe wait until the user has answered a question -before deciding whether it's safe to close. The handler for EVT\_CLOSE should +before deciding whether it is safe to close. The handler for EVT\_CLOSE should signal to the calling code if it does not destroy the window, by calling \helpref{wxCloseEvent::Veto}{wxcloseeventveto}. Calling this provides useful information to the calling code. @@ -70,7 +70,7 @@ the exit command altogether. \wxheading{What should I do to upgrade my 1.xx OnClose to 2.0?} -In wxWindows 1.xx, the {\bf OnClose} function did not actually delete 'this', but signalled +In wxWindows 1.xx, the {\bf OnClose} function did not actually delete 'this', but signaled to the calling function (either {\bf Close}, or the wxWindows framework) to delete or not delete the window. diff --git a/docs/latex/wx/tdnd.tex b/docs/latex/wx/tdnd.tex index 0e1837d51b..3f57d7ab24 100644 --- a/docs/latex/wx/tdnd.tex +++ b/docs/latex/wx/tdnd.tex @@ -1,4 +1,4 @@ -\section{Drag'n'Drop overview}\label{wxdndoverview} +\section{Drag and drop overview}\label{wxdndoverview} Classes: \helpref{wxDataObject}{wxdataobject}, \helpref{wxTextDataObject}{wxtextdataobject}, @@ -8,12 +8,12 @@ Classes: \helpref{wxDataObject}{wxdataobject}, \helpref{wxFileDropTarget}{wxfiledroptarget} Note that wxUSE\_DRAG\_AND\_DROP must be defined in setup.h in order -to use Drag'n'Drop in wxWindows. +to use drag and drop in wxWindows. See also: \helpref{wxDataObject overview}{wxdataobjectoverview} and \helpref{DnD sample}{samplednd} It may be noted that data transfer to and from the clipboard is quite -similar to data transfer with Drag'n'Drop and the code to implement +similar to data transfer with drag and drop and the code to implement these two types is almost the same. In particular, both data transfer mechanisms store data in some kind of \helpref{wxDataObject}{wxdataobject} and identify its format(s) using the \helpref{wxDataFormat}{wxdataformat} diff --git a/docs/latex/wx/tdocview.tex b/docs/latex/wx/tdocview.tex index af54462093..0e569ca94c 100644 --- a/docs/latex/wx/tdocview.tex +++ b/docs/latex/wx/tdocview.tex @@ -116,7 +116,7 @@ and \helpref{wxDocManager}{wxdocmanager} classes. See the example application in {\tt samples/docview}. To use the abstract wxView class, you need to derive a new class and override -at least the member functions OnCreate, OnDraw, OnUpdate and OnClose. You'll probably +at least the member functions OnCreate, OnDraw, OnUpdate and OnClose. You will probably want to override OnMenuCommand to respond to menu commands from the frame containing the view. @@ -189,7 +189,7 @@ The wxDocManager class is part of the document/view framework supported by wxWin and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}\rtfsp and \helpref{wxDocTemplate}{wxdoctemplate} classes. -A wxDocManager instance coordinates documents, views and document templates. It keeps a list of document and +A wxDocManager instance coordinates documents, views and document templates. It keeps a list of document and template instances, and much functionality is routed through this object, such as providing selection and file dialogs. The application can use this class `as is' or derive a class and override some members to extend or change the functionality. diff --git a/docs/latex/wx/tempfile.tex b/docs/latex/wx/tempfile.tex index bc21de6fcd..4fe80189c9 100644 --- a/docs/latex/wx/tempfile.tex +++ b/docs/latex/wx/tempfile.tex @@ -66,7 +66,7 @@ Associates wxTempFile with the file to be replaced and opens it. You should use \func{bool}{Open}{\param{const wxString\& }{strName}} Open the temporary file (strName is the name of file to be replaced), returns -TRUE on success, FALSE if an error occured. +TRUE on success, FALSE if an error occurred. \membersection{wxTempFile::IsOpened}\label{wxtempfileisopened} \constfunc{bool}{IsOpened}{\void} diff --git a/docs/latex/wx/tevent.tex b/docs/latex/wx/tevent.tex index e6b7cb9382..d322a350fb 100644 --- a/docs/latex/wx/tevent.tex +++ b/docs/latex/wx/tevent.tex @@ -136,7 +136,7 @@ recursively applied to the parent window's event handler. If this returns TRUE, confused by this powerful feature of the wxWindows event processing system. To put it a different way, events derived either directly or indirectly from wxCommandEvent will travel up the containment -heirarchy from child to parent until an event handler is found that +hierarchy from child to parent until an event handler is found that doesn't call event.Skip(). Events not derived from wxCommandEvent are sent only to the window they occurred in and then stop. @@ -238,7 +238,7 @@ in, such as a frame and its children. You may use the wxID\_OK identifier, for e any number of dialogs so long as you don't have several within the same dialog. If you pass -1 to a window constructor, an identifier will be generated for you, but beware: -if things don't respond in the way they should, it could be because of an id conflict. It's safer +if things don't respond in the way they should, it could be because of an id conflict. It is safer to supply window ids at all times. Automatic generation of identifiers starts at 1 so may well conflict with your own identifiers. @@ -328,7 +328,7 @@ called via \helpref{wxWindow::Close}{wxwindowclose}.} \twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{The EVT\_DROP\_FILES macros handles file drop events.} \twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{The EVT\_ERASE\_BACKGROUND macro is used to handle window erase requests.} -\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{The EVT\_SET\_FOCUS and EVT\_KILL\_FOCUS macros are used to handle keybaord focus events.} +\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{The EVT\_SET\_FOCUS and EVT\_KILL\_FOCUS macros are used to handle keyboard focus events.} \twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{EVT\_CHAR and EVT\_CHAR\_HOOK macros handle keyboard input for any window.} \twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{The EVT\_IDLE macro handle application idle events @@ -341,7 +341,7 @@ to handle dialog initialisation.} mouse events or all mouse events.} \twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{The EVT\_MOVE macro is used to handle a window move.} \twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{The EVT\_PAINT macro is used to handle window paint requests.} -\twocolitem{\helpref{wxScrollEvent}{wxscrollevent}}{These macros are used to handle scroll events from +\twocolitem{\helpref{wxScrollEvent}{wxscrollevent}}{These macros are used to handle scroll events from \helpref{wxScrollBar}{wxscrollbar}, \helpref{wxSlider}{wxslider},and \helpref{wxSpinButton}{wxspinbutton}.} \twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{The EVT\_SIZE macro is used to handle a window resize.} \twocolitem{\helpref{wxSplitterEvent}{wxsplitterevent}}{The EVT\_SPLITTER\_SASH\_POS\_CHANGED, EVT\_SPLITTER\_UNSPLIT diff --git a/docs/latex/wx/texpr.tex b/docs/latex/wx/texpr.tex index 70a01967b0..0f915a823f 100644 --- a/docs/latex/wx/texpr.tex +++ b/docs/latex/wx/texpr.tex @@ -140,7 +140,7 @@ way to the current compilation. These are the known bugs: \begin{enumerate}\itemsep=0pt -\item Functors are permissable only in the main clause (object). +\item Functors are permissible only in the main clause (object). Therefore nesting of structures must be done using lists, not predicates as in Prolog. \item There is a limit to the size of strings read in (about 5000 bytes). diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index ce3b6c77db..ebb4649ec5 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -30,6 +30,7 @@ you can still use Ctrl-Enter to pass to the next control from the keyboard.} \twocolitem{\windowstyle{wxTE\_MULTILINE}}{The text control allows multiple lines.} \twocolitem{\windowstyle{wxTE\_PASSWORD}}{The text will be echoed as asterisks.} \twocolitem{\windowstyle{wxTE\_READONLY}}{The text will not be user-editable.} +\twocolitem{\windowstyle{wxTE\_RICH}}{create rich edit control instead of a normal one under Windows, does nothing elsewhere} \twocolitem{\windowstyle{wxHSCROLL}}{A horizontal scrollbar will be created. No effect under GTK+.} \end{twocollist} @@ -122,9 +123,10 @@ controls don't have a horizontal scrollbar, the text is automatically scrolled so that the \helpref{insertion point}{wxtextctrlgetinsertionpoint} is always visible. -Under Windows, if the {\bf wxTE\_MULTILINE} style is used, the window is implemented -as a Windows rich text control with unlimited capacity. Otherwise, normal edit control limits -apply. +Under Windows, if the {\bf wxTE\_RICH} style is used, the window is implemented +as a Windows rich text control with (practically) unlimited capacity. +Otherwise, normal edit control limits apply (only about 32Kb of total data +under Windows 9x). \wxheading{See also} @@ -515,7 +517,7 @@ Selects the text starting at the first position up to (but not including) the ch \func{virtual void}{SetValue}{\param{const wxString\& }{ value}} -Sets the text value. +Sets the text value and marks the control as not-modified. \wxheading{Parameters} diff --git a/docs/latex/wx/textfile.tex b/docs/latex/wx/textfile.tex index fb612de7da..7cd79b94a0 100644 --- a/docs/latex/wx/textfile.tex +++ b/docs/latex/wx/textfile.tex @@ -17,10 +17,11 @@ which are well handled by wxTextFile. The typical things you may do with wxTextFile in order are: \begin{itemize}\itemsep=0pt -\item Create and open it: this is done with \helpref{Open}{wxtextfileopen} -function which opens the file (name may be specified either as Open argument or -in the constructor), reads its contents in memory and closes it. If all of these -operations are successful, Open() will return TRUE and FALSE on error. +\item Create and open it: this is done with either +\helpref{Create}{wxtextfilecreate} or \helpref{Open}{wxtextfileopen} +function which opens the file (name may be specified either as the argument to +these functions or in the constructor), reads its contents in memory (in the +case of {\tt Open()}) and closes it. \item Work with the lines in the file: this may be done either with "direct access" functions like \helpref{GetLineCount}{wxtextfilegetlinecount} and \helpref{GetLine}{wxtextfilegetline} ({\it operator[]} does exactly the same @@ -73,7 +74,8 @@ enum wxTextFileType \constfunc{}{wxTextFile}{\void} -Default constructor, use Open(string) to initialize the object. +Default constructor, use \helpref{Create}{wxtextfilecreate} or +\helpref{Open}{wxtextfileopen} with a file name parameter to initialize the object. \membersection{wxTextFile::wxTextFile}\label{wxtextfilector} @@ -81,26 +83,17 @@ Default constructor, use Open(string) to initialize the object. Constructor does not load the file into memory, use Open() to do it. -\membersection{wxTextFile::Exists}\label{wxtextfileexists} +\membersection{wxTextFile::\destruct{wxTextFile}}\label{wxtextfiledtor} -\constfunc{bool}{Exists}{\void} +\constfunc{}{\destruct{wxTextFile}}{\void} -Return TRUE if file exists - the name of the file should have been specified -in the constructor before calling Exists(). +Destructor does nothing. -\membersection{wxTextFile::Open}\label{wxtextfileopen} +\membersection{wxTextFile::AddLine}\label{wxtextfileaddline} -\constfunc{bool}{Open}{\void} +\constfunc{void}{AddLine}{\param{const wxString\& }{str}, \param{wxTextFileType }{type = typeDefault}} -Open() opens the file with the name which was given in the \helpref{constructor}{wxtextfilector} -and also loads file in memory on success. - -\membersection{wxTextFile::Open}\label{wxtextfileopenname} - -\constfunc{bool}{Open}{\param{const wxString\& }{strFile}} - -Same as \helpref{Open()}{wxtextfileopen} but allows to specify the file name -(must be used if the default constructor was used to create the object). +Adds a line to the end of file. \membersection{wxTextFile::Close}\label{wxtextfileclose} @@ -109,6 +102,26 @@ Same as \helpref{Open()}{wxtextfileopen} but allows to specify the file name Closes the file and frees memory, {\bf losing all changes}. Use \helpref{Write()}{wxtextfilewrite} if you want to save them. +\membersection{wxTextFile::Create}\label{wxtextfilecreate} + +\constfunc{bool}{Create}{\void} + +\constfunc{bool}{Create}{\param{const wxString\& }{strFile}} + +Creates the file with the given name or the name which was given in the +\helpref{constructor}{wxtextfilector}. The array of file lines is initially +empty. + +It will fail if the file already exists, \helpref{Open}{wxtextfileopen} should +be used in this case. + +\membersection{wxTextFile::Exists}\label{wxtextfileexists} + +\constfunc{bool}{Exists}{\void} + +Return TRUE if file exists - the name of the file should have been specified +in the constructor before calling Exists(). + \membersection{wxTextFile::IsOpened}\label{wxtextfileisopened} \constfunc{bool}{IsOpened}{\void} @@ -158,6 +171,15 @@ and used by \helpref{GetFirstLine()}{wxtextfilegetfirstline}/\helpref{GetNextLin Returns TRUE if the current line is the last one. +\membersection{wxTextFile::GetEOL}\label{wxtextfilegeteol} + +\constfunc{static const char*}{GetEOL}{\param{wxTextFileType }{type = typeDefault}} + +Get the line termination string corresponding to given constant. {\it typeDefault} is +the value defined during the compilation and corresponds to the native format of the +platform, i.e. it will be wxTextFileType\_Dos under Windows, wxTextFileType\_Unix under +Unix and wxTextFileType\_Mac under Mac. + \membersection{wxTextFile::GetFirstLine}\label{wxtextfilegetfirstline} \constfunc{wxString\&}{GetFirstLine}{\void} @@ -167,10 +189,13 @@ allows more "iterator-like" traversal of the list of lines, i.e. you may write something like: \begin{verbatim} -for ( str = GetFirstLine(); !Eof(); str = GetNextLine() ) +wxTextFile file; +... +for ( str = file.GetFirstLine(); !file.Eof(); str = file.GetNextLine() ) { // do something with the current line in str } +// do something with the last line in str \end{verbatim} \membersection{wxTextFile::GetNextLine}\label{wxtextfilegetnextline} @@ -190,7 +215,21 @@ Gets the previous line in the file. \func{wxString\&}{GetLastLine}{\void} -Gets the last line of the file. +Gets the last line of the file. Together with +\helpref{GetPrevLine}{wxtextfilegetprevline} it allows to enumerate the lines +in the file from the end to the beginning like this: + +\begin{verbatim} +wxTextFile file; +... +for ( str = file.GetLastLine(); + file.GetCurrentLine() > 0; + str = file.GetPrevLine() ) +{ + // do something with the current line in str +} +// do something with the first line in str +\end{verbatim} \membersection{wxTextFile::GetLineType}\label{wxtextfilegetlinetype} @@ -212,18 +251,23 @@ be returned. If the detection mechanism fails wxTextFileType\_None is returned. Get the name of the file. -\membersection{wxTextFile::AddLine}\label{wxtextfileaddline} - -\constfunc{void}{AddLine}{\param{const wxString\& }{str}, \param{wxTextFileType }{type = typeDefault}} - -Adds a line to the end of file. - \membersection{wxTextFile::InsertLine}\label{wxtextfileinsertline} \constfunc{void}{InsertLine}{\param{const wxString\& }{str}, \param{size\_t }{n}, \param{wxTextFileType }{type = typeDefault}} Insert a line before the line number {\it n}. +\membersection{wxTextFile::Open}\label{wxtextfileopen} + +\constfunc{bool}{Open}{\void} + +\constfunc{bool}{Open}{\param{const wxString\& }{strFile}} + +Open() opens the file with the given name or the name which was given in the +\helpref{constructor}{wxtextfilector} and also loads file in memory on +success. It will fail if the file does not exist, +\helpref{Create}{wxtextfilecreate} should be used in this case. + \membersection{wxTextFile::RemoveLine}\label{wxtextfileremoveline} \constfunc{void}{RemoveLine}{\param{size\_t }{n}} @@ -240,18 +284,3 @@ convert, for example, DOS files to Unix. Returns TRUE if operation succeeded, FALSE if it failed. -\membersection{wxTextFile::GetEOL}\label{wxtextfilegeteol} - -\constfunc{static const char*}{GetEOL}{\param{wxTextFileType }{type = typeDefault}} - -Get the line termination string corresponding to given constant. {\it typeDefault} is -the value defined during the compilation and corresponds to the native format of the -platform, i.e. it will be wxTextFileType\_Dos under Windows, wxTextFileType\_Unix under -Unix and wxTextFileType\_Mac under Mac. - -\membersection{wxTextFile::\destruct{wxTextFile}}\label{wxtextfiledtor} - -\constfunc{}{\destruct{wxTextFile}}{\void} - -Destructor does nothing. - diff --git a/docs/latex/wx/tfile.tex b/docs/latex/wx/tfile.tex index 9e03bfe5bd..0d1b508a88 100644 --- a/docs/latex/wx/tfile.tex +++ b/docs/latex/wx/tfile.tex @@ -10,11 +10,11 @@ As usual, the accent is put on cross-platform features which explains, for example, the \helpref{wxTextFile}{wxtextfile} class which may be used to convert between different types of text files (DOS/Unix/Mac). -wxFile may be used for low-level IO. It contains all usual functions to work -with files (opening/closing, reading/writing, seeking...) but, compared to -using standard C functions, brings error checking (in case of an error a message +wxFile may be used for low-level IO. It contains all the usual functions to work +with files (opening/closing, reading/writing, seeking, and so on) but compared with +using standard C functions, has error checking (in case of an error a message is logged using \helpref{wxLog}{wxlog} facilities) and closes the file -automatically in destructor which may be quite convenient. +automatically in the destructor which may be quite convenient. wxTempFile is a very small file designed to make replacing the files contents safer - see its \helpref{documentation}{wxtempfile} for more details. diff --git a/docs/latex/wx/tfontenc.tex b/docs/latex/wx/tfontenc.tex index f6e08d0bc2..2cbccfa31a 100644 --- a/docs/latex/wx/tfontenc.tex +++ b/docs/latex/wx/tfontenc.tex @@ -6,7 +6,7 @@ %% Created: 03.11.99 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Font encoding overview}\label{wxfontencodingoverview} @@ -16,7 +16,7 @@ By encoding we mean here the mapping between the character codes and the letters. Probably the most well-known encoding is (7 bit) ASCII one which is used almost universally now to represent the letters of the English alphabet and some other common characters. However, it is not enough to represent the -letters of foreign alphabetes and here other encodings come into play. Please +letters of foreign alphabets and here other encodings come into play. Please note that we will only discuss 8-bit fonts here and not \helpref{Unicode}{unicode}. @@ -38,27 +38,28 @@ wxFONTENCODING\_SYSTEM, but may be changed to make all the fonts created later to use it (by default).} \twocolitem{wxFONTENCODING\_ISO8859\_1..15}{ISO8859 family encodings which are usually used by all non-Microsoft operating systems} -\twocolitem{wxFONTENCODING\_KOI8}{Standard cyrillic encoding for the Internet +\twocolitem{wxFONTENCODING\_KOI8}{Standard Cyrillic encoding for the Internet (but see also wxFONTENCODING\_ISO8859\_5 and wxFONTENCODING\_CP1251)} \twocolitem{wxFONTENCODING\_CP1250}{Microsoft analogue of ISO8859-2} \twocolitem{wxFONTENCODING\_CP1251}{Microsoft analogue of ISO8859-5} \twocolitem{wxFONTENCODING\_CP1252}{Microsoft analogue of ISO8859-1} \end{twocollist} -As you may see, Microsofts encoding partly mirror the standard ISO8859 ones, +As you may see, Microsoft's encoding partly mirror the standard ISO8859 ones, but there are (minor) differences even between ISO8859-1 (Latin1, ISO encoding for Western Europe) and CP1251 (WinLatin1, standard code page for English versions of Windows) and there are more of them for other encodings. -The situation is particularly complicated with cyrillic encodings for which +The situation is particularly complicated with Cyrillic encodings for which (more than) three incompatible encodings exist: KOI8 (the old standard, widely -used on the Internet), ISO8859-5 (ISO standard for cyrillic) and CP1251 +used on the Internet), ISO8859-5 (ISO standard for Cyrillic) and CP1251 (WinCyrillic). -This abundance of (incompatible) encodigns should make it clear that using +This abundance of (incompatible) encoding:w +s should make it clear that using encodings is less easy than it might seem. The problems arise both from the -fact that the standard encodigns for the given language (say Russian, which is -written in cyrillic) are different on different platforms and because the +fact that the standard encodings for the given language (say Russian, which is +written in Cyrillic) are different on differe nt platforms and because the fonts in the given encoding might just not be installed (this is especially a problem with Unix, or, in general, not Win32, systems). diff --git a/docs/latex/wx/tguide.tex b/docs/latex/wx/tguide.tex index 2179ddeb56..50703ecff9 100644 --- a/docs/latex/wx/tguide.tex +++ b/docs/latex/wx/tguide.tex @@ -1,6 +1,6 @@ \section{Writing a wxWindows application: a rough guide}\label{roughguide} -To set a wxWindows application going, you'll need to derive a \helpref{wxApp}{wxapp} class and +To set a wxWindows application going, you will need to derive a \helpref{wxApp}{wxapp} class and override \helpref{wxApp::OnInit}{wxapponinit}. An application must have a top-level \helpref{wxFrame}{wxframe} or \helpref{wxDialog}{wxdialog} window. diff --git a/docs/latex/wx/thread.tex b/docs/latex/wx/thread.tex index e67f8a688a..e531599ce2 100644 --- a/docs/latex/wx/thread.tex +++ b/docs/latex/wx/thread.tex @@ -43,12 +43,19 @@ None. \membersection{wxThread::wxThread}\label{wxthreadctor} -\func{}{wxThread}{\void} +\func{}{wxThread}{\param{wxThreadKind }{kind = wxTHREAD\_DETACHED}} Constructor creates a new detached (default) or joinable C++ thread object. It does not create (or starts execution of) the real thread - for this you should use \helpref{Create}{wxthreadcreate} and \helpref{Run}{wxthreadrun} methods. +The possible values for {\it kind} parameters are: +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf wxTHREAD\_DETACHED}}{Create a detached thread.} +\twocolitem{{\bf wxTHREAD\_JOINABLE}}{Create a joinable thread} +\end{twocollist} + \membersection{wxThread::\destruct{wxThread}} \func{}{\destruct{wxThread}}{\void} @@ -326,8 +333,7 @@ See also \helpref{Sleep()}{wxthreadsleep}. \constfunc{ExitCode}{Wait}{\void} -Waits until the thread terminates and returns its exit code or {\tt -(ExitCode)-1} on error. +Waits until the thread terminates and returns its exit code or {\tt (ExitCode)-1} on error. You can only Wait() for joinable (not detached) threads. diff --git a/docs/latex/wx/ti18n.tex b/docs/latex/wx/ti18n.tex index 77641c7457..9cc3af337b 100644 --- a/docs/latex/wx/ti18n.tex +++ b/docs/latex/wx/ti18n.tex @@ -1,11 +1,11 @@ \section{Internationalization}\label{internationalization} -Although internationalization (i18n for short) of an application involves far -more than just translating its text messages to another message (date, time and +Although internationalization of an application (i18n for short) involves far +more than just translating its text messages to another message -- date, time and currency formats need changing too, some languages are written left to right and others right to left, character encoding may differ and many other things -may need changing too), it is a necessary first step. wxWindows provides -facilities for the messages translation with its +may need changing too -- it is a necessary first step. wxWindows provides +facilities for message translation with its \helpref{wxLocale}{wxlocale} class and is itself fully translated into several languages. Please consult wxWindows home page for the most up-to-date translations - and if you translate it into one of the languages not done @@ -24,7 +24,7 @@ to be buggy, so you should find a later version of it! There are two kinds of message catalogs: source catalogs which are text files with extension .po and binary catalogs which are created from the source ones -with {\it msgfmt} program (part fo gettext package) and have the extension .mo. +with {\it msgfmt} program (part of gettext package) and have the extension .mo. Only the binary files are needed during program execution. The program i18n involves several steps: diff --git a/docs/latex/wx/timer.tex b/docs/latex/wx/timer.tex index 00eba9a6ca..62ddfb3f1a 100644 --- a/docs/latex/wx/timer.tex +++ b/docs/latex/wx/timer.tex @@ -34,7 +34,7 @@ be stopped later with \helpref{Stop}{wxtimerstop}. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxTimer::wxTimer}\label{wxtimerctordef} +\membersection{wxTimer::wxTimer}\label{wxtimerwxtimer} \func{}{wxTimer}{\void} @@ -42,8 +42,6 @@ Default constructor. If you use it to construct the object and don't call \helpref{SetOwner}{wxtimersetowner} later, you must override \helpref{Notify}{wxtimernotify} method to process the notifications. -\membersection{wxTimer::wxTimer}\label{wxtimerwxtimer} - \func{}{wxTimer}{\param{wxEvtHandler *}{owner}, \param{int }{id = -1}} Creates a timer and associates it with {\it owner}. Please see diff --git a/docs/latex/wx/timespan.tex b/docs/latex/wx/timespan.tex new file mode 100644 index 0000000000..b5909c76b6 --- /dev/null +++ b/docs/latex/wx/timespan.tex @@ -0,0 +1,15 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: datespan.tex +%% Purpose: wxDateSpan documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 04.04.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxTimeSpan}}\label{wxtimespan} + +TODO + diff --git a/docs/latex/wx/tipc.tex b/docs/latex/wx/tipc.tex index 5eb9e7d2ed..9ae5159e15 100644 --- a/docs/latex/wx/tipc.tex +++ b/docs/latex/wx/tipc.tex @@ -51,7 +51,7 @@ identify the server and a topic name to identify the topic for the duration of the connection. Under Unix, the service name must contain an integer port identifier. -The server then responds and either vetos the connection or allows it. +The server then responds and either vetoes the connection or allows it. If allowed, a connection object is created which persists until the connection is closed. The connection object is then used for subsequent messages between client and server. @@ -132,7 +132,7 @@ To create a client which can communicate with a suitable server, you need to derive a class from wxDDEConnection and another from wxDDEClient. The custom wxDDEConnection class will intercept communications in a `conversation' with a server, and the custom wxDDEServer is required -so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return +so that a user-overridden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return a wxDDEConnection of the required class, when a connection is made. For example: diff --git a/docs/latex/wx/tlog.tex b/docs/latex/wx/tlog.tex index f123323aa0..22c9b78ceb 100644 --- a/docs/latex/wx/tlog.tex +++ b/docs/latex/wx/tlog.tex @@ -29,7 +29,7 @@ appear in a message box by default (but it can be changed, see below). Notice that the standard behaviour is to not show informational messages if there are any errors later - the logic being that the later error messages make the informational messages preceding them meaningless. -\item{\bf wxLogVerbose} is for verbose output. Normally, it's suppressed, but +\item{\bf wxLogVerbose} is for verbose output. Normally, it is suppressed, but might be activated if the user wishes to know more details about the program progress (another, but possibly confusing name for the same function is {\bf wxLogInfo}). @@ -39,7 +39,7 @@ bar of the active or specified (as the first argument) \helpref{wxFrame}{wxframe handy for logging errors after system call (API function) failure. It logs the specified message text as well as the last system error code ({\it errno} or {\it ::GetLastError()} depending on the platform) and the corresponding error -message. The second form of this function takes the error code explitly as the +message. The second form of this function takes the error code explicitly as the first argument. \item{\bf wxLogDebug} is {\bf the} right function for debug output. It only does anything at all in the debug mode (when the preprocessor symbol @@ -62,7 +62,7 @@ generic mechanisms, but are not really adapted for wxWindows, while the log classes are. Some of advantages in using wxWindows log functions are: \begin{itemize}\itemsep=0pt -\item{\bf Portability} It's a common practice to use {\it printf()} statements or +\item{\bf Portability} It is a common practice to use {\it printf()} statements or cout/cerr C++ streams for writing out some (debug or otherwise) information. Although it works just fine under Unix, these messages go strictly nowhere under Windows where the stdout of GUI programs is not assigned to anything. @@ -72,7 +72,7 @@ printf()}. Moreover {\it wxMSW} doesn't have a {\bf console} as you may have with {\it wxGTK}. Under {\it wxMSW}, a call using {\it cout} just goes nowhere. To cope with this problem, {\it wxWindows} provides a way to redirect {\it cout} -calls to \helpref{wxTreeCtrl}{wxtreectrl}, {\it i.e.}: +calls to \helpref{wxTextCtrl}{wxtextctrl}, {\it i.e.}: {\small \begin{verbatim} wxLogWindow *logger=new wxLogWindow(your_frame,"Logger"); @@ -109,7 +109,7 @@ After having enumerated all the functions which are normally used to log the messages, and why would you want to use them we now describe how all this works. -wxWindows has the notion of a {\it log target}: it's just a class deriving +wxWindows has the notion of a {\it log target}: it is just a class deriving from \helpref{wxLog}{wxlog}. As such, it implements the virtual functions of the base class which are called when a message is logged. Only one log target is {\it active} at any moment, this is the one used by {\it wxLogXXX()} @@ -136,7 +136,7 @@ stderr by default as its name suggests. \item{\bf wxLogStream} This class has the same functionality as wxLogStderr, but uses {\it ostream} and cerr instead of {\it FILE *} and stderr. \item{\bf wxLogGui} This is the standard log target for wxWindows -applications (it's used by default if you don't do anything) and provides the +applications (it is used by default if you don't do anything) and provides the most reasonable handling of all types of messages for given platform. \item{\bf wxLogWindow} This log target provides a "log console" which collects all messages generated by the application and also passes them to the @@ -146,7 +146,7 @@ clear the log, close it completely or save all messages to file. anything. The objects of this class may be instantiated to (temporarily) suppress output of {\it wxLogXXX()} functions. As an example, trying to open a non-existing file will usually provoke an error message, but if for some -reasons it's unwanted, just use this construction: +reasons it is unwanted, just use this construction: {\small \begin{verbatim} diff --git a/docs/latex/wx/tmbconv.tex b/docs/latex/wx/tmbconv.tex new file mode 100644 index 0000000000..4401bfa99b --- /dev/null +++ b/docs/latex/wx/tmbconv.tex @@ -0,0 +1,177 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: tmbconv.tex +%% Purpose: Overview of the wxMBConv classes in wxWindows +%% Author: Ove Kaaven +%% Modified by: +%% Created: 25.03.00 +%% RCS-ID: $Id$ +%% Copyright: (c) 2000 Ove Kaaven +%% Licence: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{wxMBConv classes overview}\label{mbconvclasses} + +Classes: \helpref{wxMBConv}{wxmbconv}, \helpref{wxMBConvFile}{wxmbconvfile}, +\helpref{wxMBConvUTF7}{wxmbconvutf7}, \helpref{wxMBConvUTF8}{wxmbconvutf8}, +\helpref{wxCSConv}{wxcsconv} + +The wxMBConv classes in wxWindows enables an Unicode-aware application to +easily convert between Unicode and the variety of 8-bit encoding systems still +in use. + +\subsection{Background: The need for conversion} + +As programs are becoming more and more globalized, and users exchange documents +across country boundaries as never before, applications increasingly need to +take into account all the different character sets in use around the world. It +is no longer enough to just depend on the default byte-sized character set that +computers have traditionally used. + +A few years ago, a solution was proposed: the Unicode standard. Able to contain +the complete set of characters in use in one unified global coding system, +it would resolve the character set problems once and for all. + +But it hasn't happened yet, and the migration towards Unicode has created new +challenges, resulting in "compatibility encodings" such as UTF-8. A large +number of systems out there still depends on the old 8-bit encodings, hampered +by the huge amounts of legacy code still widely deployed. Even sending +Unicode data from one Unicode-aware system to another may need encoding to an +8-bit multibyte encoding (UTF-7 or UTF-8 is typically used for this purpose), to +pass unhindered through any traditional transport channels. + +\subsection{Background: The wxString class} + +If you have compiled wxWindows in Unicode mode, the wxChar type will become +identical to wchar\_t rather than char, and a wxString stores wxChars. Hence, +all wxString manipulation in your application will then operate on Unicode +strings, and almost as easily as working with ordinary char strings (you +just need to remember to use the wxT() macro to encapsulate any string +literals). + +But often, your environment doesn't want Unicode strings. You could be sending +data over a network, or processing a text file for some other application. You +need a way to quickly convert your easily-handled Unicode data to and from a +traditional 8-bit-encoding. And this is what the wxMBConv classes do. + +\subsection{wxMBConv classes} + +The base class for all these conversions is the wxMBConv class (which itself +implements standard libc locale conversion). Derived classes include +wxMBConvFile, wxMBConvUTF7, wxMBConvUTF8, and wxCSConv, which implement +different kinds of conversions. You can also derive your own class for your +own custom encoding and use it, should you need it. All you need to do is +override the MB2WC and WC2MB methods. + +\subsection{wxMBConv objects} + +In C++, for a class to be useful and possible to pass around, it needs to be +instantiated. All of the wxWindows-provided wxMBConv classes have predefined +instances (wxConvLibc, wxConvFile, wxConvUTF7, wxConvUTF8, wxConvLocal). +You can use these predefined objects directly, or you can instantiate your own +objects. + +A variable, wxConvCurrent, points to the conversion object that the user interface +is supposed to use, in the case that the user interface is not Unicode-based (like +with GTK+ 1.2). By default, it points to wxConvLibc or wxConvLocal, depending on +which works best on the current platform. + +\subsection{wxCSConv} + +The wxCSConv class is special because when it is instantiated, you can tell it +which character set it should use, which makes it meaningful to keep many +instances of them around, each with a different character set (or you can +create a wxCSConv instance on the fly). + +The predefined wxCSConv instance, wxConvLocal, is preset to use the +default user character set, but you should rarely need to use it directly, +it is better to go through wxConvCurrent. + +\subsection{Converting strings} + +Once you have chosen which object you want to use to convert your text, +here is how you would use them with wxString. These examples all assume +that you are using a Unicode build of wxWindows, although they will still +compile in a non-Unicode build (they just won't convert anything). + +Example 1: Constructing a wxString from input in current encoding. + +\begin{verbatim} +wxString str(input_data, *wxConvCurrent); +\end{verbatim} + +Example 2: Input in UTF-8 encoding. + +\begin{verbatim} +wxString str(input_data, wxConvUTF8); +\end{verbatim} + +Example 3: Input in KOI8-R. Construction of wxCSConv instance on the fly. + +\begin{verbatim} +wxString str(input_data, wxCSConv(wxT("koi8-r"))); +\end{verbatim} + +Example 4: Printing a wxString to stdout in UTF-8 encoding. + +\begin{verbatim} +puts(str.mb_str(wxConvUTF8)); +\end{verbatim} + +Example 5: Printing a wxString to stdout in custom encoding. +Using preconstructed wxCSConv instance. + +\begin{verbatim} +wxCSConv cust(user_encoding); +printf("Data: %s\n", (const char*) str.mb_str(cust)); +\end{verbatim} + +Note: Since mb_str() returns a temporary wxCharBuffer to hold the result +of the conversion, you need to explicitly cast it to const char* if you use +it in a vararg context (like with printf). + +\subsection{Converting buffers} + +If you have specialized needs, or just don't want to use wxString, you +can also use the conversion methods of the conversion objects directly. +This can even be useful if you need to do conversion in a non-Unicode +build of wxWindows; converting a string from UTF-8 to the current +encoding should be possible by doing this: + +\begin{verbatim} +wxString str(wxConvUTF8.cMB2WC(input_data), *wxConvCurrent); +\end{verbatim} + +Here, cMB2WC of the UTF8 object returns a wxWCharBuffer containing a Unicode +string. The wxString constructor then converts it back to an 8-bit character +set using the passed conversion object, *wxConvCurrent. (In a Unicode build +of wxWindows, the constructor ignores the passed conversion object and +retains the Unicode data.) + +This could also be done by first making a wxString of the original data: + +\begin{verbatim} +wxString input_str(input_data); +wxString str(input_str.wc_str(wxConvUTF8), *wxConvCurrent); +\end{verbatim} + +To print a wxChar buffer to a non-Unicode stdout: + +\begin{verbatim} +printf("Data: %s\n", (const char*) wxConvCurrent->cWX2MB(unicode_data)); +\end{verbatim} + +If you need to do more complex processing on the converted data, you +may want to store the temporary buffer in a local variable: + +\begin{verbatim} +const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(unicode_data); +const char *tmp_str = (const char*) tmp_buf; +printf("Data: %s\n", tmp_str); +process_data(tmp_str); +\end{verbatim} + +If a conversion had taken place in cWX2MB (i.e. in a Unicode build), +the buffer will be deallocated as soon as tmp_buf goes out of scope. +(The macro wxWX2MBbuf reflects the correct return value of cWX2MB +(either char* or wxCharBuffer), except for the const.) + diff --git a/docs/latex/wx/tnoneng.tex b/docs/latex/wx/tnoneng.tex index e937c42010..d1c5d65249 100644 --- a/docs/latex/wx/tnoneng.tex +++ b/docs/latex/wx/tnoneng.tex @@ -5,33 +5,33 @@ user in language other than English. Unfortunately many languages use different charsets under Unix and Windows (and other platforms, to make situation even more complicated). These charsets usually differ in so many characters it is impossible to use same texts under all platforms. -wxWindows provide mechanism that helps you avoid distributing many + +wxWindows library provides mechanism that helps you avoid distributing many identical, only differently encoded, packages with your application (e.g. help files and menu items in iso8859-13 and windows-1257). Thanks -to this mechanism you can distribute only let's say iso8859-13 data +to this mechanism you can, for example, distribute only iso8859-13 data and it will be handled transparently under all systems. Please read \helpref{Internationalization}{internationalization} which -describes locales concept. +describes the locales concept. -Whereever in the following text {\it iso8859-2} and {\it windows-1250} are +In the following text, wherever {\it iso8859-2} and {\it windows-1250} are used, any encodings are meant and any encodings may be substituted there. \wxheading{Locales} -The best way how to ensure correctly displayed texts in GUI across platforms +The best way to ensure correctly displayed texts in a GUI across platforms is to use locales. Write your in-code messages in English or without -diacritics and put real messages into message catalog (see +diacritics and put real messages into the message catalog (see \helpref{Internationalization}{internationalization}). -Standard .po file begins with a header like this: +A standard .po file begins with a header like this: \begin{verbatim} # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" @@ -44,19 +44,17 @@ msgstr "" "Content-Transfer-Encoding: ENCODING\n" \end{verbatim} -Notice these two lines: +Notice this particular line: \begin{verbatim} -#, fuzzy "Content-Type: text/plain; charset=CHARSET\n" \end{verbatim} -The first tells {\it msgfmt} compiler not to include string "" (empty) -to compiled .mo catalog. Second one informs about charset used to write -translated messages. +It specifies the charset used by the catalog. All strings in the catalog +are encoded using this charset. -You have to do 2 things: fill-in proper charset information and delete -the {\tt fuzzy} line. Your .po file may look like this after doing so: +You have to fill in proper charset information. Your .po file may look like this +after doing so: \begin{verbatim} # SOME DESCRIPTIVE TITLE. @@ -72,28 +70,30 @@ msgstr "" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso8859-2\n" -"Content-Transfer-Encoding: ENCODING\n" +"Content-Transfer-Encoding: 8bit\n" \end{verbatim} +(Make sure that the header is {\bf not} marked as {\it fuzzy}.) + wxWindows is able to use this catalog under any supported platform -(although iso8859-2 is Unix encoding and is not understood by Windows). +(although iso8859-2 is a Unix encoding and is normally not understood by +Windows). -How is this done? When you tell wxLocale class to load message catalog that -contains the header (msgid "". Normal .mo catalogs do {\bf not} contain it, -you must remove the line with {\it fuzzy}!), it checks the charset. If the +How is this done? When you tell the wxLocale class to load a message catalog that +contains correct header, it checks the charset. If the charset is "alien" on the platform the program is currently running (e.g. -any of ISO encodings under Windows or CP12XX under Unix) it uses +any of ISO encodings under Windows or CP12XX under Unix) it uses \helpref{wxEncodingConverter::GetPlatformEquivalents}{wxencodingconvertergetplatformequivalents} -to obtain encoding that is more common on this platform and converts +to obtain an encoding that is more common on this platform and converts the message catalog to this encoding. Note that it does {\bf not} check -for presence of this encoding! It only assumes that it is always better to -have strings in platform native encoding than in an encoding that is rarely -(if ever) used. +for presence of fonts in the "platform" encoding! It only assumes that it is +always better to have strings in platform native encoding than in an encoding +that is rarely (if ever) used. -The behaviour described about is disabled by default. +The behaviour described above is disabled by default. You must set {\it bConvertEncoding} to TRUE in \helpref{wxLocale constructor}{wxlocaledefctor} in order to enable -runtime encoding conversion! +runtime encoding conversion. \wxheading{Font mapping} @@ -122,26 +122,26 @@ if (!wxTheFontMapper->IsEncodingAvailable(enc, facename)) \wxheading{Converting data} You may want to store all program data (created documents etc.) in -same encoding, let's say windows1250. Obviously, the best way would +the same encoding, let's say windows1250. Obviously, the best way would be to use \helpref{wxEncodingConverter}{wxencodingconverter}. \wxheading{Help files} If you're using \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} there is -no problem at all. You must only make sure that all HTML files contain -META tag, e.g. +no problem at all. You must only make sure that all the HTML files contain +the META tag, e.g. \begin{verbatim} - + \end{verbatim} -and that hhp project file contains one additional line in {\tt OPTIONS} +and that the hhp project file contains one additional line in the {\tt OPTIONS} section: \begin{verbatim} Charset=iso8859-2 \end{verbatim} -This additional entry tells HTML help controller what encoding is used +This additional entry tells the HTML help controller what encoding is used in contents and index tables. diff --git a/docs/latex/wx/toolbar.tex b/docs/latex/wx/toolbar.tex index 20d988a8f8..486ae32798 100644 --- a/docs/latex/wx/toolbar.tex +++ b/docs/latex/wx/toolbar.tex @@ -168,12 +168,16 @@ Adds a separator for spacing groups of tools. \membersection{wxToolBar::AddTool}\label{wxtoolbaraddtool} +\func{wxToolBarTool*}{AddTool}{\param{int}{ toolId}, \param{const wxBitmap\&}{ bitmap1},\rtfsp +\param{const wxString\& }{shortHelpString = ""}, \param{const wxString\& }{longHelpString = ""}} + \func{wxToolBarTool*}{AddTool}{\param{int}{ toolId}, \param{const wxBitmap\&}{ bitmap1},\rtfsp \param{const wxBitmap\&}{ bitmap2 = wxNullBitmap}, \param{bool}{ isToggle = FALSE},\rtfsp \param{long}{ xPos = -1}, \param{long}{ yPos = -1},\rtfsp \param{wxObject* }{clientData = NULL}, \param{const wxString\& }{shortHelpString = ""}, \param{const wxString\& }{longHelpString = ""}} -Adds a tool to the toolbar. +Adds a tool to the toolbar. The first (short and most commonly used) version +adds a normal (and not a togglable) button without any associated client data. \wxheading{Parameters} diff --git a/docs/latex/wx/tooltip.tex b/docs/latex/wx/tooltip.tex new file mode 100644 index 0000000000..0430c381f7 --- /dev/null +++ b/docs/latex/wx/tooltip.tex @@ -0,0 +1,61 @@ +% +% automatically generated by HelpGen from +% /home/vasek/tooltip.h at 24/May/00 16:57:08 +% + +\section{\class{wxToolTip}}\label{wxtooltip} + +This class holds information about a tooltip associated with a window +(see \helpref{wxWindow::SetToolTip}{wxwindowsettooltip}). + +The two static methods, \helpref{wxToolTip::Enable}{wxtooltipenable} and +\helpref{wxToolTip::SetDelay}{wxtooltipsetdelay} can be used to globally +alter tooltips behaviour. + +\wxheading{Derived from} + +\helpref{wxObject}{wxobject} + + +\latexignore{\rtfignore{\wxheading{Members}}} + + +\membersection{wxToolTip::Enable}\label{wxtooltipenable} + +\func{static void}{Enable}{\param{bool }{flag}} + +Enable or disable tooltips globally. + + +\membersection{wxToolTip::SetDelay}\label{wxtooltipsetdelay} + +\func{static void}{SetDelay}{\param{long }{msecs}} + +Set the delay after which the tooltip appears. + + +\membersection{wxToolTip::wxToolTip}\label{wxtooltipwxtooltip} + +\func{}{wxToolTip}{\param{const wxString\& }{tip}} + +Constructor. + +\membersection{wxToolTip::SetTip}\label{wxtooltipsettip} + +\func{void}{SetTip}{\param{const wxString\& }{tip}} + +Set the tooltip text. + + +\membersection{wxToolTip::GetTip}\label{wxtooltipgettip} + +\constfunc{wxString}{GetTip}{\void} + +Get the tooltip text. + +\membersection{wxToolTip::GetWindow}\label{wxtooltipgetwindow} + +\constfunc{wxWindow*}{GetWindow}{\void} + +Get the associated window. + diff --git a/docs/latex/wx/topics.tex b/docs/latex/wx/topics.tex index c232ebbef4..1c246e3404 100644 --- a/docs/latex/wx/topics.tex +++ b/docs/latex/wx/topics.tex @@ -11,7 +11,9 @@ This chapter contains a selection of topic overviews, first things first: \input tapp.tex \input truntime.tex \input tstring.tex +\input tdate.tex \input tunicode.tex +\input tmbconv.tex \input ti18n.tex \input tnoneng.tex \input tcontain.tex diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index cbfc4b3e97..630572918c 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -1,7 +1,10 @@ \section{\class{wxTreeCtrl}}\label{wxtreectrl} -A tree control presents information as a hierarchy, with items that may be expanded -to show further items. Items in a tree control are referenced by wxTreeItemId handles. +A tree control presents information as a hierarchy, with items that may be +expanded to show further items. Items in a tree control are referenced by +wxTreeItemId handles. The only method of wxTreeItemId class which can be used +is {\it IsOk()} which returns {\tt TRUE} if the handle is valid and +{\tt FALSE} otherwise. To intercept events from a tree control, use the event table macros described in \helpref{wxTreeEvent}{wxtreeevent}. @@ -40,6 +43,7 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} \twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} +\twocolitem{{\bf EVT\_TREE\_END\_DRAG(id, func)}}{Drag ended (drop).} \twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} @@ -55,11 +59,28 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. \twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.} \end{twocollist}% +Note that to allow drag and drop in the tree control you must explicitly call +\helpref{Allow()}{wxnotifyeventallow} in the event handler, by default +dragging is disabled. On the other hand, label editing is allowed by default +for the controls with \windowstyle{wxTR\_EDIT\_LABELS} style but you can call +\helpref{Veto()}{wxnotifyeventveto} to prevent it from happening. + \wxheading{See also} \helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp \helpref{wxImageList}{wximagelist}, \helpref{wxTreeEvent}{wxtreeevent} +\wxheading{Win32 notes} + +wxTreeCtrl class uses the standard common treeview control under Win32 +implemented in the system library {\tt comctl32.dll}. Some versions of this +library are known to have bugs with handling the tree control colours: the +usual symptom is that the expanded items leave black (or otherwise incorrectly +coloured) background behind them, especially for the controls using non +default background colour. The recommended solution is to upgrade the {\tt comctl32.dll} +to a newer version: see +\urlref{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}. + \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxTreeCtrl::wxTreeCtrl}\label{wxtreectrlconstr} @@ -167,7 +188,7 @@ will be sent which can be vetoed as well. \wxheading{See also} -\helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel}, +\helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel}, \helpref{wxTreeEvent}{wxtreeevent} \membersection{wxTreeCtrl::EndEditLabel}\label{wxtreectrlendeditlabel} @@ -318,7 +339,7 @@ Returns the last child of the item (or an invalid tree item if this item has no \wxheading{See also} -\helpref{GetFirstChild}{wxtreectrlgetfirstchild}, +\helpref{GetFirstChild}{wxtreectrlgetfirstchild}, \helpref{GetLastChild}{wxtreectrlgetlastchild} \membersection{wxTreeCtrl::GetNextChild}\label{wxtreectrlgetnextchild} @@ -397,7 +418,7 @@ Returns the root item for the tree control. \constfunc{int}{GetItemSelectedImage}{\param{const wxTreeItemId\& }{item}} -Gets the selected item image (this function is obsolete, use +Gets the selected item image (this function is obsolete, use {\tt GetItemImage(item, wxTreeItemIcon\_Selected}) instead). \membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection} @@ -405,7 +426,7 @@ Gets the selected item image (this function is obsolete, use \constfunc{wxTreeItemId}{GetSelection}{\void} Returns the selection, or an invalid item if there is no selection. -This function only works with the controls without wxTR\_MULTIPLE style, use +This function only works with the controls without wxTR\_MULTIPLE style, use \helpref{GetSelections}{wxtreectrlgetselections} for the controls which do have this style. @@ -431,8 +452,8 @@ Returns the state image list (from which application-defined state images are ta \func{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}} -Calculates which (if any) item is under the given point, returning extra information -in {\it flags}. {\it flags} is a bitlist of the following: +Calculates which (if any) item is under the given point, returning the tree item +id at this point plus extra information {\it flags}. {\it flags} is a bitlist of the following: \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt @@ -465,6 +486,9 @@ Inserts an item after a given one ({\it previous}) or before one identified by i If {\it image} > -1 and {\it selImage} is -1, the same image is used for both selected and unselected items. +\pythonnote{The second form of this method is called +\tt{InsertItemBefore} in wxPython.} + \membersection{wxTreeCtrl::IsBold}\label{wxtreectrlisbold} \constfunc{bool}{IsBold}{\param{const wxTreeItemId\& }{item}} @@ -598,7 +622,7 @@ usage and loading time. \func{void}{SetItemImage}{\param{const wxTreeItemId\&}{ item}, \param{int }{image}, \param{wxTreeItemIcon }{which = wxTreeItemIcon\_Normal}} -Sets the specified item image. See \helpref{GetItemImage}{wxtreectrlgetitemimage} +Sets the specified item image. See \helpref{GetItemImage}{wxtreectrlgetitemimage} for the description of the {\it which} parameter. \membersection{wxTreeCtrl::SetItemSelectedImage}\label{wxtreectrlsetitemselectedimage} @@ -629,7 +653,7 @@ Sets the state image list (from which application-defined state images are taken \func{void}{SortChildren}{\param{const wxTreeItemId\&}{ item}} -Sorts the children of the given item using +Sorts the children of the given item using \helpref{OnCompareItems}{wxtreectrloncompareitems} method of wxTreeCtrl. You should override that method to change the sort order (the default is ascending alphabetical order). @@ -654,7 +678,7 @@ Removes the selection from the currently selected item (if any). \func{void}{UnselectAll}{\void} -This function either behaves the same as \helpref{Unselect}{wxtreectrlunselect} +This function either behaves the same as \helpref{Unselect}{wxtreectrlunselect} if the control doesn't have wxTR\_MULTIPLE style, or removes the selection from all items if it does have this style. diff --git a/docs/latex/wx/treeevt.tex b/docs/latex/wx/treeevt.tex index 4338aa64ca..6f4d1715e9 100644 --- a/docs/latex/wx/treeevt.tex +++ b/docs/latex/wx/treeevt.tex @@ -22,6 +22,7 @@ functions that take a wxTreeEvent argument. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} \twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} +\twocolitem{{\bf EVT\_TREE\_END\_DRAG(id, func)}}{Drag ended (drop).} \twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} @@ -62,7 +63,8 @@ Returns the old item index (valid for EVT\_TREE\_ITEM\_CHANGING and CHANGED even \constfunc{wxPoint}{GetPoint}{} -Returns the position of the mouse pointer if the event is a drag event. +Returns the position of the mouse pointer if the event is a drag or a click +event. \membersection{wxTreeEvent::GetCode} diff --git a/docs/latex/wx/tresourc.tex b/docs/latex/wx/tresourc.tex index 86f055a611..35aaea2b28 100644 --- a/docs/latex/wx/tresourc.tex +++ b/docs/latex/wx/tresourc.tex @@ -1,6 +1,6 @@ \section{The wxWindows resource system}\label{resourceformats} -From version 1.61, wxWindows has an optional {\it resource file} facility, +wxWindows has an optional {\it resource file} facility, which allows separation of dialog, menu, bitmap and icon specifications from the application code. @@ -11,49 +11,35 @@ the .WXR file does not {\it replace} the native Windows resource file, it merely supplements it. There is no existing native resource format in X (except for the defaults file, which has limited expressive power). -Using wxWindows resources for panels and dialogs has an effect on how -you deal with panel item callbacks: you can't specify a callback function in -a resource file, so how do you achieve the same effect as with programmatic -panel construction? The solution is similar to that adopted by Windows, which -is to use the {\it parent} panel or dialog to intercept user events. - -From 1.61, wxWindows routes panel item events that do not have a callback -to the \helpref{OnCommand}{wxwindowoncommand} member of the panel (or dialog). So, to use -panel or dialog resources, you need to derive a new class and override the -default (empty) OnCommand member. The first argument is a reference -to a wxWindow, and the second is a reference to a wxCommandEvent. Check the -name of the panel item that's generating an event by using the \helpref{wxWindow::GetName}{wxwindowgetname}\rtfsp -function and a string comparison function such as \helpref{wxStringEq}{wxstringeq}. -You may need to cast the reference to an appropriate specific type to perform -some operations. - -To obtain a pointer to a panel item when you only have the name (for example, -when you need to set a value of a text item from outside of the {\bf OnCommand} function), -use the function \helpref{wxFindWindowByName}{wxfindwindowbyname}. - For details of functions for manipulating resource files and loading user interface elements, see \helpref{wxWindows resource functions}{resourcefuncs}. +You can use Dialog Editor to create resource files. Unfortunately neither +Dialog Editor nor the .WXR format currently cover all wxWindows controls; +some are missing, such as wxSpinCtrl, wxSpinButton, wxListCtrl, wxTreeCtrl and others. + +Note that in later versions of wxWindows, this resource format will be replaced +by XML specifications that can also include sizers. + \subsection{The format of a .WXR file} -A wxWindows resource file may look a little odd at first. It's C++ +A wxWindows resource file may look a little odd at first. It is C++ compatible, comprising mostly of static string variable declarations with -PrologIO syntax within the string. +wxExpr syntax within the string. Here's a sample .WXR file: \begin{verbatim} /* * wxWindows Resource File - * Written by wxBuilder * */ #include "noname.ids" -static char *aiai_resource = "bitmap(name = 'aiai_resource',\ - bitmap = ['aiai', wxBITMAP_TYPE_BMP_RESOURCE, 'WINDOWS'],\ - bitmap = ['aiai.xpm', wxBITMAP_TYPE_XPM, 'X'])."; +static char *my_resource = "bitmap(name = 'my_resource',\ + bitmap = ['myproject', wxBITMAP_TYPE_BMP_RESOURCE, 'WINDOWS'],\ + bitmap = ['myproject.xpm', wxBITMAP_TYPE_XPM, 'X'])."; static char *menuBar11 = "menu(name = 'menuBar11',\ menu = \ @@ -79,9 +65,9 @@ static char *panel3 = "dialog(name = 'panel3',\ button_font = [14, 'wxSWISS', 'wxNORMAL', 'wxBOLD', 0],\ label_font = [10, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ x = 0, y = 37, width = 292, height = 164,\ - control = [wxButton, 'OK', '', 'button5', 23, 34, -1, -1, 'aiai_resource'],\ - control = [wxMessage, 'A Label', '', 'message7', 166, 61, -1, -1, 'aiai_resource'],\ - control = [wxText, 'Text', 'wxVERTICAL_LABEL', 'text8', 24, 110, -1, -1])."; + control = [1000, wxButton, 'OK', '', 'button5', 23, 34, -1, -1, 'my_resource'],\ + control = [1001, wxStaticText, 'A Label', '', 'message7', 166, 61, -1, -1, 'my_resource'],\ + control = [1002, wxTextCtrl, 'Text', 'wxTE_MULTITEXT', 'text8', 24, 110, -1, -1])."; \end{verbatim} As you can see, C++-style comments are allowed, and apparently include files @@ -89,15 +75,15 @@ are supported too: but this is a special case, where the included file is a file of defines shared by the C++ application code and resource file to relate identifiers (such as FILE\_OPEN) to integers. -Each {\it resource object} is of standard PrologIO syntax, that is, +Each {\it resource object} is of standard \helpref{wxExpr}{wxexpr} syntax, that is, an object name such as {\bf dialog} or {\bf icon}, then an open parenthesis, a list of comma-delimited attribute/value pairs, a closing parenthesis, and a full stop. Backslashes are required to escape newlines, for the benefit of C++ syntax. If double quotation marks are used to delimit strings, they need to be escaped with backslash within a C++ string -(so it's easier to use single quotation marks instead). +(so it is easier to use single quotation marks instead). -\normalbox{{\it A note on PrologIO string syntax:} A string that begins with +\normalbox{{\it A note on string syntax:} A string that begins with an alphabetic character, and contains only alphanumeric characters, hyphens and underscores, need not be quoted at all. Single quotes and double quotes may be used to delimit more complex strings. In fact, single-quoted @@ -107,8 +93,8 @@ as strings for the purpose of the resource system.} A resource file like this is typically included in the application main file, as if it were a normal C++ file. This eliminates the need for a separate resource file to be distributed alongside the executable. However, the -resource file can be dynamically loaded if desired (for example by a non-C++ -language such as CLIPS, Prolog or Python). +resource file can be dynamically loaded if desired (useful for non-C++ +languages such as Python). Once included, the resources need to be `parsed' (interpreted), because so far the data is just a number of static string variables. The function\rtfsp @@ -122,8 +108,8 @@ get all your resources into one variable if you want to. by functions such as {\bf ::wxResourceCreateBitmap} and {\bf wxPanel::LoadFromResource}. If a wxWindows resource object (such as a bitmap resource) refers to a -C++ data structure, such as static XBM or XPM data, a further call ({\bf -::wxResourceRegisterBitmapData}) needs to be made on initialization to tell +C++ data structure, such as static XPM data, a further call ({\bf ::wxResourceRegisterBitmapData}) needs +to be made on initialization to tell wxWindows about this data. The wxWindows resource object will refer to a string identifier, such as `project\_data' in the example file above. This identifier will be looked up in a table to get the C++ static data @@ -137,37 +123,52 @@ use. \begin{verbatim} /* - * File: noname.cc - * Purpose: main application module, generated by wxBuilder. + * File: project.cpp + * Purpose: main application module */ -#include "wx.h" -#include "wx_help.h" -#include "noname.h" +#include "wx/wx.h" +#include "project.h" // Includes the dialog, menu etc. resources -#include "noname.wxr" +#include "project.wxr" -// Includes XBM data -#include "project.xbm" +// Includes XPM data +#include "project.xpm" -// Declare an instance of the application: allows the program to start -AppClass theApp; +IMPLEMENT_APP(AppClass) // Called to initialize the program -wxFrame *AppClass::OnInit(void) +bool AppClass::OnInit() { -#ifdef wx_x wxResourceRegisterBitmapData("project_data", project_bits, project_width, project_height); -#endif + wxResourceParseData(menuBar11); - wxResourceParseData(aiai_resource); + wxResourceParseData(my_resource); wxResourceParseData(project_resource); wxResourceParseData(panel3); ... + + return TRUE; } \end{verbatim} +The following code shows a dialog: + +\begin{verbatim} + // project.wxr contains dialog1 + MyDialog *dialog = new MyDialog; + if (dialog->LoadFromResource(this, "dialog1")) + { + wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("text3", dialog); + if (text) + text->SetValue("wxWindows resource demo"); + dialog->ShowModal(); + } + dialog->Destroy(); +\end{verbatim} + +Please see also the resource sample. \subsection{Dialog resource format} @@ -177,52 +178,52 @@ is a list consisting of point size, family, style, weight, underlined, optional \begin{twocollist}\itemsep=0pt \twocolitemruled{Attribute}{Value} +\twocolitem{id}{The integer identifier of the resource.} \twocolitem{name}{The name of the resource.} \twocolitem{style}{Optional dialog box or panel window style.} \twocolitem{title}{The title of the dialog box (unused if a panel).}. \twocolitem{modal}{Whether modal: 1 if modal, 0 if modeless, absent if a panel resource.} +\twocolitem{use_dialog_units}{If 1, use dialog units (dependent on the dialog font size) for control sizes and positions.} +\twocolitem{use_system_defaults}{If 1, override colours and fonts to use system settings instead.} \twocolitem{button\_font}{The font used for control buttons: a list comprising point size (integer), family (string), font style (string), font weight (string) and underlining (0 or 1).} \twocolitem{label\_font}{The font used for control labels: a list comprising point size (integer), -family (string), font style (string), font weight (string) and underlining (0 or 1).} +family (string), font style (string), font weight (string) and underlining (0 or 1). Now obsolete; use button\_font instead.} \twocolitem{x}{The x position of the dialog or panel.} \twocolitem{y}{The y position of the dialog or panel.} \twocolitem{width}{The width of the dialog or panel.} \twocolitem{height}{The height of the dialog or panel.} -\twocolitem{background\_colour}{The background colour of the dialog or panel. Only valid if the style includes wxUSER\_COLOURS.} -\twocolitem{label\_colour}{The default label colour for the children of the dialog or panel. Only valid if the style includes wxUSER\_COLOURS.} -\twocolitem{button\_colour}{The default button text colour for the children of the dialog or panel. Only valid if the style includes wxUSER\_COLOURS.} -\twocolitem{label\_font}{Font spec} -\twocolitem{button\_font}{Font spec} +\twocolitem{background\_colour}{The background colour of the dialog or panel.} +\twocolitem{label\_colour}{The default label colour for the children of the dialog or panel. Now obsolete; use button\_colour instead.} +\twocolitem{button\_colour}{The default button text colour for the children of the dialog or panel.} \end{twocollist} Then comes zero or more attributes named `control' for each control (panel item) on the dialog or panel. The value is a list of further elements. In the table below, the names in the first column correspond to the first element of the value list, and the second column details the -remaining elements of the list. +remaining elements of the list. Note that titles for some controls are obsolete +(they don't have titles), but the syntax is retained for backward compatibility. \begin{twocollist}\itemsep=0pt \twocolitemruled{Control}{Values} -\twocolitem{wxButton}{title (string), window style (string), name (string), x, y, width, height, button bitmap resource (optional string), button font spec} -\twocolitem{wxCheckBox}{title (string), window style (string), name (string), x, y, width, height, default value (optional integer, 1 or 0), label font spec} -\twocolitem{wxChoice}{title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), label font spec, button font spec} -\twocolitem{wxComboBox}{title (string), window style (string), name (string), x, y, width, height, default text value, values (optional list of strings), label font spec, button font spec} -\twocolitem{wxGauge}{title (string), window style (string), name (string), x, y, width, height, value (optional integer), range (optional integer), label font spec, button font spec} -\twocolitem{wxGroupBox}{title (string), window style (string), name (string), x, y, width, height, label font spec} -\twocolitem{wxListBox}{title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), multiple (optional string, wxSINGLE or wxMULTIPLE), +\twocolitem{wxButton}{id (integer), title (string), window style (string), name (string), x, y, width, height, button bitmap resource (optional string), button font spec} +\twocolitem{wxCheckBox}{id (integer), title (string), window style (string), name (string), x, y, width, height, default value (optional integer, 1 or 0), label font spec} +\twocolitem{wxChoice}{id (integer), title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), label font spec, button font spec} +\twocolitem{wxComboBox}{id (integer), title (string), window style (string), name (string), x, y, width, height, default text value, values (optional list of strings), label font spec, button font spec} +\twocolitem{wxGauge}{id (integer), title (string), window style (string), name (string), x, y, width, height, value (optional integer), range (optional integer), label font spec, button font spec} +\twocolitem{wxStaticBox}{id (integer), title (string), window style (string), name (string), x, y, width, height, label font spec} +\twocolitem{wxListBox}{id (integer), title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), multiple (optional string, wxSINGLE or wxMULTIPLE), label font spec, button font spec} -\twocolitem{wxMessage}{title (string), window style (string), name (string), x, y, width, height, message bitmap resource (optional string), label font spec} -\twocolitem{wxMultiText}{title (string), window style (string), name (string), x, y, width, height, default value (optional string), +\twocolitem{wxStaticText}{id (integer), title (string), window style (string), name (string), x, y, width, height, message bitmap resource (optional string), label font spec} +\twocolitem{wxRadioBox}{id (integer), title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), number of rows or cols, label font spec, button font spec} -\twocolitem{wxRadioBox}{title (string), window style (string), name (string), x, y, width, height, values (optional list of strings), number of rows or cols, -label font spec, button font spec} -\twocolitem{wxRadioButton}{title (string), window style (string), name (string), x, y, width, height, default value (optional integer, 1 or 0), label font spec} -\twocolitem{wxScrollBar}{title (string), window style (string), name (string), x, y, width, height, value (optional integer), +\twocolitem{wxRadioButton}{id (integer), title (string), window style (string), name (string), x, y, width, height, default value (optional integer, 1 or 0), label font spec} +\twocolitem{wxScrollBar}{id (integer), title (string), window style (string), name (string), x, y, width, height, value (optional integer), page length (optional integer), object length (optional integer), view length (optional integer)} -\twocolitem{wxSlider}{title (string), window style (string), name (string), x, y, width, height, value (optional integer), minimum (optional integer), maximum (optional integer), +\twocolitem{wxSlider}{id (integer), title (string), window style (string), name (string), x, y, width, height, value (optional integer), minimum (optional integer), maximum (optional integer), label font spec, button font spec} -\twocolitem{wxText}{title (string), window style (string), name (string), x, y, width, height, default value (optional string), +\twocolitem{wxTextCtrl}{id (integer), title (string), window style (string), name (string), x, y, width, height, default value (optional string), label font spec, button font spec} \end{twocollist} @@ -292,7 +293,6 @@ a full list). \item Y resolution (optional). \end{itemize} - \subsection{Resource format design issues} The .WXR file format is a recent addition and subject to change. @@ -309,8 +309,8 @@ for non-C++ programs that use wxWindows. parser and a binary format). \item It would be difficult to append a binary resource component onto an executable in a portable way. -\item The file format is essentially the PrologIO object format, for which -a parser already exists, so parsing is easy. For those programs that use PrologIO +\item The file format is essentially the \helpref{wxExpr}{wxexpr} object format, for which +a parser already exists, so parsing is easy. For those programs that use wxExpr anyway, the size overhead of the parser is minimal. \end{itemize} @@ -329,5 +329,4 @@ object, in addition to providing \verb$#$defines for application code convenienc \subsection{Compiling the resource system} To enable the resource system, set {\bf wxUSE\_WX\_RESOURCES} to 1 in setup.h. -If your wxWindows makefile supports it, set the same name in the makefile to 1. diff --git a/docs/latex/wx/truntime.tex b/docs/latex/wx/truntime.tex index df443465ea..a0dc67d8d3 100644 --- a/docs/latex/wx/truntime.tex +++ b/docs/latex/wx/truntime.tex @@ -19,7 +19,7 @@ to use whenever possible \helpref{wxDynamicCast()}{wxdynamiccast} macro which, for the implementations that support it, is defined just as dynamic\_cast<> and uses wxWindows RTTI for all the others. This macro is limited to wxWindows classes only and only works with pointers (unlike the real dynamic\_cast<> which -also accepts referencies). +also accepts references). Each class that you wish to be known the type system should have a macro such as DECLARE\_DYNAMIC\_CLASS just inside the class declaration. diff --git a/docs/latex/wx/tsamples.tex b/docs/latex/wx/tsamples.tex index 1fa01ecf41..6c448dc45c 100644 --- a/docs/latex/wx/tsamples.tex +++ b/docs/latex/wx/tsamples.tex @@ -6,7 +6,7 @@ %% Created: 02.11.99 %% RCS-ID: $Id$ %% Copyright: (c) wxWindows team -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % NB: please keep the subsections in alphabetic order! @@ -61,8 +61,8 @@ menu) and also how to process the notifications from it. This sample demonstrates the use of the \helpref{wxCheckListBox}{wxchecklistbox} class intercepting check, select and double click events. It also tests the -use of various methods modifiying the control, such as by deleting items -from it or inserting new once (these fucntions are actually implememted in +use of various methods modifying the control, such as by deleting items +from it or inserting new once (these functions are actually implemented in the parent class \helpref{wxListBox}{wxlistbox} so the sample tests that class as well). The layout of the dialog is created using a \helpref{wxBoxSizer}{wxboxsizer} demonstrating a simple dynamic layout. @@ -70,7 +70,7 @@ demonstrating a simple dynamic layout. \subsection{Config sample}\label{sampleconfig} This sample demonstrates the \helpref{wxConfig}{wxconfigbase} classes in a platform -indepedent way, i.e. it uses text based files to store a given configuration under +indenpedent way, i.e. it uses text based files to store a given configuration under Unix and uses the Registry under Windows. See \helpref{wxConfig overview}{wxconfigoverview} for the descriptions of all @@ -83,9 +83,9 @@ wxWindows. The sample tests their basic functionality, events, placement, modification in terms of colour and font as well as the possibility to change the controls programmatically, such as adding item to a list box etc. Apart from that, the sample uses a \helpref{wxNotebook}{wxnotebook} and tests most -fetaures of this special control (using bitmap in the tabs, using +features of this special control (using bitmap in the tabs, using \helpref{wxSizers}{wxsizer} and \helpref{constraints}{wxlayoutconstraints} within -notebook pages, advanving pages programmatically and vetoing a page change +notebook pages, advancing pages programmatically and vetoing a page change by intercepting the \helpref{wxNotebookEvent}{wxnotebookevent}. The various controls tested are listed here: @@ -119,7 +119,20 @@ system. \subsection{Dialogs sample}\label{sampledialogs} This sample shows how to use the common dialogs available from wxWindows. These -dialogs are desrcibed in details in the \helpref{Common dialogs overview}{commondialogsoverview}. +dialogs are described in details in the \helpref{Common dialogs overview}{commondialogsoverview}. + +\subsection{Dialup sample}\label{sampledialup} + +This sample shows \helpref{wxDialUpManager}{wxdialupmanager} +class. It displays in the status bar the information gathered through itsi +nterface: in particular, the current connection status (online or offline) and +whether the connection is permanent (in which case a string `LAN' appears in +the thrid status bar field - but note that you may have be on a LAN not +connected to the Internet, in which case you will not see this) or not. + +Using the menu entries, you may also dial or hang up the line if you have a +modem attached and (this only makes sense for Windows) list the available +connections. \subsection{Dynamic sample}\label{sampledynamic} @@ -128,7 +141,7 @@ This sample is a very small sample that demonstrates the use of the should be used whenever it is not known at compile time, which control will receive which event or which controls are actually going to be in a dialog or frame. This is most typically the case for any scripting -languge that would work as a wrapper for wxWindows or programs where +language that would work as a wrapper for wxWindows or programs where forms or similar datagrams can be created by the uses. \subsection{Exec sample}\label{sampleexec} @@ -138,10 +151,13 @@ The exec sample demonstrates the \helpref{wxExecute}{wxexecute} and external programs and the sample shows how to do this synchronously (waiting until the program terminates) or asynchronously (notification will come later). +It also shows how to capture the output of the child process in both +synchronous and asynchronous cases. + \subsection{Scroll subwindow sample}\label{samplescrollsub} This sample demonstrates the use of the \helpref{wxScrolledWindow}{wxscrolledwindow} -class including placing subwindows into it and drawing simple graphics. It uses the +class including placing subwindows into it and drawing simple graphics. It uses the \helpref{SetTargetWindow}{wxscrolledwindowsettargetwindow} method and thus the effect of scrolling does not show in the scrolled window itself, but in one of its subwindows. @@ -226,7 +242,7 @@ the library to work with unsupported tags. handler (ships with wxWindows) allows you to access HTML pages stored in compressed archive as if they were ordinary files. -{\bf Virtual} is yet another VFS demo. This one generates pages at run-time. +{\bf Virtual} is yet another virtual file systems demo. This one generates pages at run-time. You may find it useful if you need to display some reports in your application. {\bf Printing} explains use of \helpref{wxHtmlEasyPrinting}{wxhtmleasyprinting} @@ -234,7 +250,7 @@ class which serves as as-simple-as-possible interface for printing HTML documents without much work. In fact, only few function calls are sufficient. {\bf Help} and {\bf Helpview} are variations on displaying HTML help -(compatible with MS HTML Help Workshop). {\it Help} shows how to embed +(compatible with MS HTML Help Workshop). {\it Help} shows how to embed \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} in your application while {\it Helpview} is simple tool that only pops up help window and displays help books given at command line. @@ -244,7 +260,7 @@ displays help books given at command line. The image sample demonstrates the use of the \helpref{wxImage}{wximage} class and shows how to download images in a variety of formats, currently PNG, GIF, TIFF, JPEG, BMP, PNM and PCX. The top of the sample shows to rectangles, one -of which is drawn directly in the window, the other one is drawn into a +of which is drawn directly in the window, the other one is drawn into a \helpref{wxBitmap}{wxbitmap}, converted to a wxImage, saved as a PNG image and then reloaded from the PNG file again so that conversions between wxImage and wxBitmap as well as loading and save PNG files are tested. @@ -301,8 +317,8 @@ they set up their own event handler, and then request to be notified of {\bf wxSOCKET\_INPUT} (incoming data) or {\bf wxSOCKET\_LOST} (connection closed at the remote end) events. In the sample, the event handler is the same for all connections; to find out which socket the -event is addressed to, the \helpref{GetSocket}{wxsocketeventgetsocket} -function is used. +event is addressed to, the \helpref{GetSocket}{wxsocketeventgetsocket} function +is used. Although it might take some time to get used to the event-oriented system upon which wxSocket is built, the benefits are many. See, for @@ -323,8 +339,8 @@ both clients and connection objects in the server set up an event handler to catch {\bf wxSOCKET\_LOST} events, each one is immediately notified if the other end closes the connection. -There is also an URL test which shows how to use the \helpref{wxURL}{wxurl} -class to fetch data from a given URL. +There is also an URL test which shows how to use +the \helpref{wxURL}{wxurl} class to fetch data from a given URL. The sockets sample is work in progress. Some things to do: @@ -353,10 +369,10 @@ password, ignoring TAB, ignoring ENTER). Secondly it shows how to intercept a \helpref{wxKeyEvent}{wxkeyevent} in both the raw form using the {\tt EVT\_KEY\_UP} and {\tt EVT\_KEY\_DOWN} macros and the -higherlevel from using the {\tt EVT\_CHAR} macro. All characters will be logged +higher level from using the {\tt EVT\_CHAR} macro. All characters will be logged in a log window at the bottom of the main window. By pressing some of the function -keys, you can test some actions in the text ctrl as well as get statitics on the -text ctrls, which is useful for testing if these statitics actually are correct. +keys, you can test some actions in the text ctrl as well as get statistics on the +text ctrls, which is useful for testing if these stastitics actually are correct. Thirdly, on platforms which support it, the sample will offer to copy text to the \helpref{wxClipboard}{wxclipboard} and to paste text from it. The GTK version will @@ -397,7 +413,7 @@ The following things are demonstrated: and \helpref{wxToolBar::AddControl}{wxtoolbaraddcontrol}: see MyApp::InitToolbar in the sample. \item Using {\tt EVT\_UPDATE\_UI} handler for automatically enabling/disabling -toolbar buttons without having to explicitly call EnableTool. This is is done +toolbar buttons without having to explicitly call EnableTool. This is done in MyFrame::OnUpdateCopyAndCut. \item Using \helpref{wxToolBar::DeleteTool}{wxtoolbardeletetool} and \helpref{wxToolBar::InsertTool}{wxtoolbarinserttool} to dynamically update the @@ -415,3 +431,27 @@ Adding, inserting and deleting items and branches from the tree as well as sorting (in default alphabetical order as well as in custom one) is demonstrated here as well - try the corresponding menu entries. +\subsection{Wizard sample}\label{samplewizard} + +This sample shows so-called wizard dialog (implemented using +\helpref{wxWizard}{wxwizard} and related classes). It shows almost all +features supported: + +\begin{itemize}\itemsep=0pt +\item Using bitmaps with the wizard and changing them depending on the page +shown (notice that wxValidationPage in the sample has a different image from +the other ones) +\item Using \helpref{TransferDataFromWindow}{wxwindowtransferdatafromwindow} +to verify that the data entered is correct before passing to the next page +(done in wxValidationPage which forces the user to check a checkbox before +continuing). +\item Using more elaborated techniques to allow returning to the previous +page, but not continuing to the next one or vice versa (in wxRadioboxPage) +\item This (wxRadioboxPage) page also shows how the page may process {\tt +Cancel} button itself instead of relying on the wizard parent to do it. +\item Normally, the order of the pages in the wizard is known at compile-time, +but sometimes it depends on the user choices: wxCheckboxPage shows how to +dynamically decide which page to display next (see also +\helpref{wxWizardPage}{wxwizardpage}) +\end{itemize} + diff --git a/docs/latex/wx/tscroll.tex b/docs/latex/wx/tscroll.tex index 40986ab426..3f218b92e8 100644 --- a/docs/latex/wx/tscroll.tex +++ b/docs/latex/wx/tscroll.tex @@ -3,7 +3,7 @@ Classes: \helpref{wxWindow}{wxwindow}, \helpref{wxScrolledWindow}{wxscrolledwindow}, \helpref{wxIcon}{wxicon}, \helpref{wxScrollBar}{wxscrollbar}. Scrollbars come in various guises in wxWindows. All windows have the potential -to show a vertical scrollbar and/or a horizontal scrollbar: it's a basic capability of a window. +to show a vertical scrollbar and/or a horizontal scrollbar: it is a basic capability of a window. However, in practice, not all windows do make use of scrollbars, such as a single-line wxTextCtrl. Because any class derived from \helpref{wxWindow}{wxwindow} may have scrollbars, @@ -18,7 +18,7 @@ events varies from one window class to another. \helpref{wxScrolledWindow}{wxscrolledwindow} (formerly wxCanvas) is an example of a window that adds functionality to make scrolling really work. It assumes that scrolling happens in consistent units, not different-sized jumps, and that page size is represented -by the visible portion of the window. It's suited to drawing applications, but perhaps +by the visible portion of the window. It is suited to drawing applications, but perhaps not so suitable for a sophisticated editor in which the amount scrolled may vary according to the size of text on a given line. For this, you would derive from wxWindow and implement scrolling yourself. \helpref{wxGrid}{wxgrid} is an example of a class @@ -27,7 +27,7 @@ that implements its own scrolling, largely because columns and rows can vary in \wxheading{The scrollbar model} The function \helpref{wxWindow::SetScrollbar}{wxwindowsetscrollbar} gives a clue about -the way a scrollbar is modelled. This function takes the following arguments: +the way a scrollbar is modeled. This function takes the following arguments: \twocolwidtha{5cm}% \begin{twocollist} @@ -42,7 +42,7 @@ the way a scrollbar is modelled. This function takes the following arguments: the built-in horizontal or vertical scrollbar. {\it position} is simply the position of the `thumb' (the bit you drag to scroll around). -It's given in scroll units, and so is relative to the total range of the scrollbar. +It is given in scroll units, and so is relative to the total range of the scrollbar. {\it visible} gives the number of scroll units that represents the portion of the window currently visible. Normally, a scrollbar is capable of indicating this visually @@ -51,7 +51,7 @@ by showing a different length of thumb. {\it range} is the maximum value of the scrollbar, where zero is the start position. You choose the units that suit you, so if you wanted to display text that has 100 lines, you would set this to 100. -Note that this doesn't have to correspond to the number of pixels scrolled - it's +Note that this doesn't have to correspond to the number of pixels scrolled - it is up to you how you actually show the contents of the window. {\it refresh} just indicates whether the scrollbar should be repainted immediately or not. @@ -83,7 +83,7 @@ from your \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function. %\normalbox{{\bf For Windows programmers:} note that scrollbar range in wxWindows has a different meaning %from that in Windows. In native Windows scrollbar calls, range is the number of positions that the scrollbar -%can physically scroll through - in our example above, it would be 34. But it's easier +%can physically scroll through - in our example above, it would be 34. But it is easier %to think in terms of the number of units that the whole scrollbar represents - the virtual %window size - which is why wxWindows does it differently.} diff --git a/docs/latex/wx/tstream.tex b/docs/latex/wx/tstream.tex index 9bb13376ab..a472c2f0e1 100644 --- a/docs/latex/wx/tstream.tex +++ b/docs/latex/wx/tstream.tex @@ -27,7 +27,7 @@ wxFilterIn/OutputStream \end{enumerate} wxStreamBase is the base definition of a stream. It defines, for example, -the API of OnSysRead, OnSysWrite, OnSysSeek and OnSysTell. These functions are +the API of OnSysRead, OnSysWrite, OnSysSeek and OnSysTell. These functions are really implemented by the "IO" classes. wxInputStream and wxOutputStream inherit from it. @@ -39,8 +39,8 @@ wxInputStream is the base class for read-only streams. It implements Read, SeekI (I for Input), and all read or IO generic related functions. wxOutputStream does the same thing but it is for write-only streams. -wxFilterIn/OutputStream is base class definition for stream filtering. -I mean by stream filtering, a stream which does no syscall but filter datas +wxFilterIn/OutputStream is the base class definition for stream filtering. +Stream filtering means a stream which does no syscall but filters data which are passed to it and then pass them to another stream. For example, wxZLibInputStream is an inline stream decompressor. diff --git a/docs/latex/wx/tstring.tex b/docs/latex/wx/tstring.tex index 4bd1f1aa26..e57912e91a 100644 --- a/docs/latex/wx/tstring.tex +++ b/docs/latex/wx/tstring.tex @@ -13,7 +13,7 @@ wxString only works with ASCII (8 bit characters) strings as of this release, but support for UNICODE (16 but characters) is planned for the next one. This class has all the standard operations you can expect to find in a string class: -dynamic memory management (string extends to accomodate new characters), +dynamic memory management (string extends to accommodate new characters), construction from other strings, C strings and characters, assignment operators, access to individual characters, string concatenation and comparison, substring extraction, case conversion, trimming and padding (with spaces), searching and @@ -60,8 +60,8 @@ wxString internally by wxWindows. However, there are several problems as well. The most important one is probably that there are often several functions to do exactly the same thing: for example, to get the length of the string either one of -\helpref{length()}{wxstringlength}, \helpref{Len()}{wxstringlen} or -\helpref{Length()}{wxstringLength} may be used. The first function, as almost +length(), \helpref{Len()}{wxstringlen} or +\helpref{Length()}{wxstringlength} may be used. The first function, as almost all the other functions in lowercase, is std::string compatible. The second one is "native" wxString version and the last one is wxWindows 1.xx way. So the question is: which one is better to use? And the answer is that: @@ -73,7 +73,7 @@ in both wxWindows and other programs (by just typedefing wxString as std::string when used outside wxWindows) and by staying compatible with future versions of wxWindows which will probably start using std::string sooner or later too. -In the situations where there is no correspondinw std::string function, please +In the situations where there is no corresponding std::string function, please try to use the new wxString methods and not the old wxWindows 1.xx variants which are deprecated and may disappear in future versions. @@ -171,7 +171,7 @@ share the same data. But as soon as one of the two (or more) strings is modified, the data has to be copied because the changes to one of the strings shouldn't be seen in the -otheres. As data copying only happens when the string is written to, this is +others. As data copying only happens when the string is written to, this is known as COW. What is important to understand is that all this happens absolutely @@ -259,7 +259,7 @@ which tells the wxString class to collect performance statistics and to show them on stderr on program termination. This will show you the average length of strings your program manipulates, their average initial length and also the percent of times when memory wasn't reallocated when string concatenation was -done but the alread preallocated memory was used (this value should be about +done but the already preallocated memory was used (this value should be about 98\% for the default allocation policy, if it is less than 90\% you should really consider fine tuning wxString for your application). diff --git a/docs/latex/wx/tthreads.tex b/docs/latex/wx/tthreads.tex index b9ba1b517b..26d769af94 100644 --- a/docs/latex/wx/tthreads.tex +++ b/docs/latex/wx/tthreads.tex @@ -15,7 +15,7 @@ well. These classes will hopefully make writing MT programs easier and they also provide some extra error checking (compared to the native (be it Win32 or Posix) -thread API), however it is still an untrivial undertaking especially for large +thread API), however it is still an non-trivial undertaking especially for large projects. Before starting an MT application (or starting to add MT features to an existing one) it is worth asking oneself if there is no easier and safer way to implement the same functionality. Of course, in some situations threads diff --git a/docs/latex/wx/ttips.tex b/docs/latex/wx/ttips.tex index f239b6b984..e63e6e5303 100644 --- a/docs/latex/wx/ttips.tex +++ b/docs/latex/wx/ttips.tex @@ -6,7 +6,7 @@ the advanced users of the program, the experience shows that the tips may be quite helpful for the novices and so more and more programs now do this. For a wxWindows programmer, implementing this feature is extremely easy. To -show a tip, it's enough to just call \helpref{wxShowTip}{wxshowtip} function +show a tip, it is enough to just call \helpref{wxShowTip}{wxshowtip} function like this: \begin{verbatim} @@ -19,7 +19,7 @@ like this: \end{verbatim} Of course, you need to get the text of the tips from somewhere - in the example -above, the text is supposed to be in the file tips.txt from where it's read by +above, the text is supposed to be in the file tips.txt from where it is read by the {\it tip provider}. The tip provider is just an object of a class deriving from \helpref{wxTipProvider}{wxtipprovider}. It has to implement one pure virtual function of the base class: \helpref{GetTip}{wxtipprovidergettip}. diff --git a/docs/latex/wx/ttoolbar.tex b/docs/latex/wx/ttoolbar.tex index 258e4c2416..9879a96323 100644 --- a/docs/latex/wx/ttoolbar.tex +++ b/docs/latex/wx/ttoolbar.tex @@ -39,7 +39,7 @@ No absolute positioning is supported but you can specify the number of rows, and add tool separators with {\bf AddSeparator}. Tooltips are supported. {\bf OnRightClick} is not supported. This is the default wxToolBar on Windows 95, Windows NT 4 and above. With the style wxTB\_FLAT, the flat toolbar -look is used, with a border that is highlit when the cursor moves over the buttons. +look is used, with a border that is highlighted when the cursor moves over the buttons. \end{itemize} A toolbar might appear as a single row of images under @@ -72,7 +72,7 @@ Include {\tt "wx/toolbar.h"}, or if using a class directly, one of: \end{itemize} Example of toolbar use are given in the sample program ``toolbar''. The -source is given below. In fact it's out of date because recommended +source is given below. In fact it is out of date because recommended practise is to use event handlers (using EVT\_MENU or EVT\_TOOL) instead of overriding OnLeftClick. @@ -86,7 +86,7 @@ overriding OnLeftClick. // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// License: wxWindows license ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". diff --git a/docs/latex/wx/ttreectl.tex b/docs/latex/wx/ttreectl.tex index 7c30c800b0..30847cf1d9 100644 --- a/docs/latex/wx/ttreectl.tex +++ b/docs/latex/wx/ttreectl.tex @@ -23,7 +23,7 @@ may be retrieved with the corresponding functions: \helpref{IsSelected}{wxtreectrlisselected}, \helpref{IsVisible}{wxtreectrlisvisible}, \helpref{IsBold}{wxtreectrlisbold} and \helpref{IsExpanded}{wxtreectrlisexpanded}. Only one item at a time may be -selected, selecting anopther one (with +selected, selecting another one (with \helpref{SelectItem}{wxtreectrlselectitem}) automatically unselects the previously selected one. @@ -47,7 +47,7 @@ beginning, only the root item is created (with EVT\_TREE\_ITEM\_EXPANDING event is received: then all items lying immediately under the item being expanded should be added, but, of course, only when this event is received for the first time for this item - otherwise, the items would -be added twice if the user expands/collapses/reexapnds the branch. +be added twice if the user expands/collapses/re-expands the branch. The tree control provides functions for enumerating its items. There are 3 groups of enumeration functions: for the children of a given item, for the diff --git a/docs/latex/wx/tunicode.tex b/docs/latex/wx/tunicode.tex index 2f4f472597..718c25d6fb 100644 --- a/docs/latex/wx/tunicode.tex +++ b/docs/latex/wx/tunicode.tex @@ -19,7 +19,7 @@ characters from languages other than English. Starting with release 2.1 wxWindows has support for compiling in Unicode mode on the platforms which support it. Unicode is a standard for character -encoding which addreses the shortcomings of the previous, 8 bit standards, by +encoding which addresses the shortcomings of the previous, 8 bit standards, by using 16 bit for encoding each character. This allows to have 65536 characters instead of the usual 256 and is sufficient to encode all of the world languages at once. More details about Unicode may be found at {\tt www.unicode.org}. @@ -28,14 +28,14 @@ languages at once. More details about Unicode may be found at {\tt www.unicode.o As this solution is obviously preferable to the previous ones (think of incompatible encodings for the same language, locale chaos and so on), many -modern ooperating systems support it. The probably first example is Windows NT +modern operating systems support it. The probably first example is Windows NT which uses only Unicode internally since its very first version. Writing internationalized programs is much easier with Unicode and, as the support for it improves, it should become more and more so. Moreover, in the Windows NT/2000 case, even the program which uses only standard ASCII can profit from using Unicode because they will work more efficiently - there will be no -need for the system to convert all strings hte program uses to/from Unicode +need for the system to convert all strings the program uses to/from Unicode each time a system call is made. \subsection{Unicode and ANSI modes} @@ -46,7 +46,7 @@ environment. A better solution is to write programs in such way that they may be compiled either in ANSI (traditional) mode or in the Unicode one. This can be achieved quite simply by using the means provided by wxWindows. -Basicly, there are only a few things to watch out for: +Basically, there are only a few things to watch out for: \begin{itemize} \item Character type ({\tt char} or {\tt wchar\_t}) @@ -96,7 +96,7 @@ section. \subsection{Unicode support in wxWindows} -In wxWindows, the code fragment froim above should be written instead: +In wxWindows, the code fragment from above should be written instead: \begin{verbatim} wxChar ch = wxT('*'); @@ -116,7 +116,7 @@ a separate type for strings though, because the standard Unicode strings depending on the compile mode. Finally, there is a special {\tt wxT()} macro which should enclose all literal -strings in the program. As it's easy to see comparing the last fragment with +strings in the program. As it is easy to see comparing the last fragment with the one above, this macro expands to nothing in the (usual) ANSI mode and prefixes {\tt 'L'} to its argument in the Unicode mode. @@ -145,7 +145,7 @@ Although everything works fine inside the program, things can get nasty when it tries to communicate with the outside world which, sadly, often expects ANSI strings (a notable exception is the entire Win32 API which accepts either Unicode or ANSI strings and which thus makes it unnecessary to ever perform -any convertions in the program). +any conversions in the program). To get a ANSI string from a wxString, you may use the mb\_str() function which always returns an ANSI @@ -156,5 +156,17 @@ useful, is wc\_str() function which always returns the Unicode string. % TODO describe fn_str(), wx_str(), wxCharBuf classes, ... -% Please remember to put a blank line at the end of each file! (Tex2RTF 'issue') + +\subsection{Unicode-related compilation settings} + +You should define {\tt wxUSE\_UNICODE} to $1$ to compile your program in +Unicode mode. Note that it currently only works in Win32 and that some parts of +wxWindows are not Unicode-compliant yet (ODBC classes, for example). If you +compile your program in ANSI mode you can still define {\tt wxUSE\_WCHAR\_T} +to get some limited support for {\tt wchar\_t} type. + +This will allow your program to perform conversions between Unicode strings and +ANSI ones (\helpref{wxEncodingConverter}{wxencodingconverter} depends on this +partially) and construct wxString objects from Unicode strings (presumably read +from some external file or elsewhere). diff --git a/docs/latex/wx/tvalidat.tex b/docs/latex/wx/tvalidat.tex index c64e6749ce..871797c76a 100644 --- a/docs/latex/wx/tvalidat.tex +++ b/docs/latex/wx/tvalidat.tex @@ -117,6 +117,6 @@ void wxDialog::OnOK(wxCommandEvent& event) So if using validators and a normal OK button, you may not even need to write any code for handling dialog dismissal. -If you load your dialog from a resource file, you'll need to iterate through the controls +If you load your dialog from a resource file, you will need to iterate through the controls setting validators, since validators can't be specified in a dialog resource. diff --git a/docs/latex/wx/txtstrm.tex b/docs/latex/wx/txtstrm.tex index 515ecbaf6e..08217a6d98 100644 --- a/docs/latex/wx/txtstrm.tex +++ b/docs/latex/wx/txtstrm.tex @@ -76,12 +76,41 @@ Reads a 32 bit integer from the stream. Reads a double (IEEE encoded) from the stream. +\membersection{wxTextInputStream::ReadLine}\label{wxtextinputstreamreadline} + +\func{wxString}{wxTextInputStream::ReadLine}{\void} + +Reads a line from the input stream and returns it (without the end of line +character). + \membersection{wxTextInputStream::ReadString} \func{wxString}{wxTextInputStream::ReadString}{\void} -Reads a line from the stream. A line is a string which ends with -$\backslash$n or $\backslash$r$\backslash$n or $\backslash$r. +{\bf NB:} This method is deprecated, use \helpref{ReadLine}{wxtextinputstreamreadline} +or \helpref{ReadWord}{wxtextinputstreamreadword} instead. + +Same as \helpref{ReadLine}{wxtextinputstreamreadline}. + +\membersection{wxTextInputStream::ReadWord}\label{wxtextinputstreamreadword} + +\func{wxString}{wxTextInputStream::ReadWord}{\void} + +Reads a word (a sequence of characters until the next separator) from the +input stream. + +\wxheading{See also} + +\helpref{SetStringSeparators}{wxtextinputstreamsetstringseparators} + +\membersection{wxTextInputStream::SetStringSeparators}\label{wxtextinputstreamsetstringseparators} + +\func{void}{SetStringSeparators}{\param{const wxString\& }{sep}} + +Sets the characters which are used to define the word boundaries in +\helpref{ReadWord}{wxtextinputstreamreadword}. + +The default separators are the space and {\tt TAB} characters. % ---------------------------------------------------------------------------- % wxTextOutputStream diff --git a/docs/latex/wx/up.gif b/docs/latex/wx/up.gif index 316d0d2a14b571bea2eb874efd04bfe509f53b34..870c89e80a826e3b225cc8fe9a30edf9c5a66c22 100644 GIT binary patch literal 998 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7p%TfE%gtCeAWZlgxpoy|ZDMRPr_m>p rx}08pS4?)u<%PWDestroy()}. + +\wxheading{Derived from} + +\helpref{wxDialog}{wxdialog}\\ +\helpref{wxPanel}{wxpanel}\\ +\helpref{wxWindow}{wxwindow}\\ +\helpref{wxEvtHandler}{wxevthandler}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\wxheading{Event table macros} + +To process input from a wizard dialog, use these event handler macros to +direct input to member functions that take a +\helpref{wxWizardEvent}{wxwizardevent} argument. For some events, +\helpref{Veto()}{wxnotifyeventveto} can be called to prevent the event from +happening. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=2pt +\twocolitem{{\bf EVT\_WIZARD\_PAGE\_CHANGED(id, func)}}{The page has been just +changed (this event can not be vetoed).} +\twocolitem{{\bf EVT\_WIZARD\_PAGE\_CHANGING(id, func)}}{The page is being +changed (this event can be vetoed).} +\twocolitem{{\bf EVT\_WIZARD\_CANCEL(id, func)}}{The user attempted to cancel +the wizard (this event may also be vetoed).} +\end{twocollist}% + +\wxheading{See also} + +\helpref{wxWizardEvent}{wxwizardevent}, \helpref{wxWizardPage}{wxwizardpage}, \helpref{wxWizard sample}{samplewizard} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxWizard::Create}\label{wxwizardcreate} + +\func{static wxWizard*}{Create}{\param{wxWindow* }{parent}, \param{int }{id = -1}, \param{const wxString\& }{title = wxEmptyString}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}, \param{const wxPoint\& }{pos = wxDefaultPosition}} + +Creates the wizard dialog. The returned pointer should not be deleted +directly, you should rather call {\tt Destroy()} on it and wxWindows will +delete it itself. + +Notice that unlike almost all other wxWindows classes, there is no {\it size} +parameter in wxWizard constructor because the wizard will have a predefined +default size by default. If you want to change this, you should use the +\helpref{SetPageSize}{wxwizardsetpagesize} function. + +\wxheading{Parameters} + +\docparam{parent}{The parent window, may be NULL.} + +\docparam{id}{The id of the dialog, will usually be just $-1$.} + +\docparam{title}{The title of the dialog.} + +\docparam{bitmap}{The default bitmap used in the left side of the wizard. See +also \helpref{GetBitmap}{wxwizardpagegetbitmap}.} + +\docparam{pos}{The position of the dialog, it will be centered on the screen +by default.} + +\membersection{wxWizard::RunWizard}\label{wxwizardrunwizard} + +\func{bool}{RunWizard}{\param{wxWizardPage* }{firstPage}} + +Executes the wizard starting from the given page, returns {\tt TRUE} if it was +successfully finished or {\tt FALSE} if user cancelled it. The {\it firstPage} +can not be {\tt NULL}. + +\membersection{wxWizard::GetCurrentPage}\label{wxwizardgetcurrentpage} + +\constfunc{wxWizardPage*}{GetCurrentPage}{\void} + +Get the current page while the wizard is running. {\tt NULL} is returned if +\helpref{RunWizard()}{wxwizardrunwizard} is not being executed now. + +\membersection{wxWizard::GetPageSize}\label{wxwizardgetpagesize} + +\constfunc{wxSize}{GetPageSize}{\void} + +Returns the size available for the pages. + +\membersection{wxWizard::SetPageSize}\label{wxwizardsetpagesize} + +\func{void}{SetPageSize}{\param{const wxSize\& }{sizePage}} + +Sets the minimal size to be made available for the wizard pages. The wizard +will take into account the size of the bitmap (if any) itself. Also, the +wizard will never be smaller than the default size. + +The recommended way to use this function is to layout all wizard pages using +the sizers (even though the wizard is not resizeable) and then use +\helpref{wxSizer::CalcMin}{wxsizercalcmin} in a loop to calculate the maximum +of minimal sizes of the pages and pass it to SetPageSize(). + diff --git a/docs/latex/wx/wizevt.tex b/docs/latex/wx/wizevt.tex new file mode 100644 index 0000000000..e62e8667a3 --- /dev/null +++ b/docs/latex/wx/wizevt.tex @@ -0,0 +1,66 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: wizevt.tex +%% Purpose: wxWizardEvent class documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 02.04.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxWizardEvent}}\label{wxwizardevent} + +wxWizardEvent class represents an event generated by the +\helpref{wizard}{wxwizard}: this event is first sent to the page itself and, +if not processed there, goes up the window hierarchy as usual. + +\wxheading{Derived from} + +\helpref{wxNotifyEvent}{wxnotifyevent}\\ +\helpref{wxCommandEvent}{wxcommandevent}\\ +\helpref{wxEvent}{wxevent}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\wxheading{Event table macros} + +To process input from a wizard dialog, use these event handler macros to +direct input to member functions that take a wxWizardEvent argument. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=2pt +\twocolitem{{\bf EVT\_WIZARD\_PAGE\_CHANGED(id, func)}}{The page has been just +changed (this event can not be vetoed).} +\twocolitem{{\bf EVT\_WIZARD\_PAGE\_CHANGING(id, func)}}{The page is being +changed (this event can be vetoed).} +\twocolitem{{\bf EVT\_WIZARD\_CANCEL(id, func)}}{The user attempted to cancel +the wizard (this event may also be vetoed).} +\end{twocollist}% + +\wxheading{See also} + +\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxWizardEvent::wxWizardEvent}\label{wxwizardeventwxwizardevent} + +\func{}{wxWizardEvent}{\param{wxEventType }{type = wxEVT\_NULL}, \param{int }{id = -1}, \param{bool }{direction = TRUE}} + +Constructor. It is not normally used by the user code as the objects of this +type are constructed by wxWizard. + +\membersection{wxWizardEvent::GetDirection}\label{wxwizardeventgetdirection} + +\constfunc{bool}{GetDirection}{\void} + +Return the direction in which the page is changing: for {\tt +EVT\_WIZARD\_PAGE\_CHANGING}, return {\tt TRUE} if we're going forward or +FALSE otherwise and for {\tt EVT\_WIZARD\_PAGE\_CHANGED} return {\tt TRUE} if +we came from the previous page and {\tt FALSE} if we returned from the next +one. + diff --git a/docs/latex/wx/wizpage.tex b/docs/latex/wx/wizpage.tex new file mode 100644 index 0000000000..2418fe5dd5 --- /dev/null +++ b/docs/latex/wx/wizpage.tex @@ -0,0 +1,164 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: wizpage.tex +%% Purpose: wxWizardPage and wxWizardPageSimple classes documentation +%% Author: Vadim Zeitlin +%% Modified by: +%% Created: 02.04.00 +%% RCS-ID: $Id$ +%% Copyright: (c) Vadim Zeitlin +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxWizardPage}}\label{wxwizardpage} + +wxWizardPage is one of the screens in \helpref{wxWizard}{wxwizard}: it must +know what are the following and preceding pages (which may be {\tt NULL} for the +first/last page). Except for this extra knowledge, wxWizardPage is just a +panel, so the controls may be placed directly on it in the usual way. + +This class allows to decide what is the orde fo pages in the wizard +dynamically (during run-time) and so providex maximal flexibility. Usually, +however, the order of pages is known in advance in which case +\helpref{wxWizardPageSimple}{wxwizardpagesimple} class is enough and it is simpler +to use. + +\wxheading{Virtual functions to override} + +To use this class, you must override \helpref{GetPrev}{wxwizardpagegetprev} +and \helpref{GetNext}{wxwizardpagegetnext} pure virtual functions (or you +may use \helpref{wxWizardPageSimple}{wxwizardpagesimple} instead). + +\helpref{GetBitmap}{wxwizardpagegetbitmap} can also be overridden, but this +should be very rarely needed. + +\wxheading{Derived from} + +\helpref{wxPanel}{wxpanel}\\ +\helpref{wxWindow}{wxwindow}\\ +\helpref{wxEvtHandler}{wxevthandler}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\wxheading{See also} + +\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxWizardPage::wxWizardPage}\label{wxwizardpagewxwizardpage} + +\func{}{wxWizardPage}{\param{wxWizard* }{parent}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}} + +Constructor accepts an optional bitmap which will be used for this page +instead of the default one for this wizard (note that all bitmaps used should +be of the same size). Notice that no other parameters are needed because the +wizard will resize and reposition the page anyhow. + +\membersection{wxWizardPage::GetPrev}\label{wxwizardpagegetprev} + +\constfunc{wxWizardPage*}{GetPrev}{\void} + +Get the page which should be shown when the user chooses the {\tt "Back"} +button: if {\tt NULL} is returned, this button will be disabled. The first +page of the wizard will usually return {\tt NULL} from here, but the others +will not. + +\wxheading{See also} + +\helpref{GetNext}{wxwizardpagegetnext} + +\membersection{wxWizardPage::GetNext}\label{wxwizardpagegetnext} + +\constfunc{wxWizardPage*}{GetNext}{\void} + +Get the page which should be shown when the user chooses the {\tt "Next"} +button: if {\tt NULL} is returned, this button will be disabled. The last +page of the wizard will usually return {\tt NULL} from here, but the others +will not. + +\wxheading{See also} + +\helpref{GetPrev}{wxwizardpagegetprev} + +\membersection{wxWizardPage::GetBitmap}\label{wxwizardpagegetbitmap} + +\constfunc{wxBitmap}{GetBitmap}{\void} + +This method is called by wxWizard to get the bitmap to display alongside the +page. By default, {\tt m\_bitmap} member variable which was set in the +\helpref{constructor}{wxwizardpagewxwizardpage}. + +If the bitmap was not explicitly set (i.e. if {\tt wxNullBitmap} is returned), +the default bitmap for the wizard should be used. + +The only cases when you would want to override this function is if the page +bitmap depends dynamically on the user choices, i.e. almost never. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wxWizardPageSimple %%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{\class{wxWizardPageSimple}}\label{wxwizardpagesimple} + +wxWizardPageSimple is the simplest possible +\helpref{wxWizardPage}{wxwizardpage} implementation: it just returns the +pointers given to its constructor from GetNext() and GetPrev() functions. + +This makes it very easy to use the obejcts of this class in the wizards where +the pages order is known statically - on the other hand, if this is not the +case you must derive your own class from \helpref{wxWizardPage}{wxwizardpage} +instead. + +\wxheading{Derived from} + +\helpref{wxWizardPage}{wxwizardpage}\\ +\helpref{wxPanel}{wxpanel}\\ +\helpref{wxWindow}{wxwindow}\\ +\helpref{wxEvtHandler}{wxevthandler}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\wxheading{See also} + +\helpref{wxWizard}{wxwizard}, \helpref{wxWizard sample}{samplewizard} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxWizardPageSimple::wxWizardPageSimple}\label{wxwizardpagesimplewxwizardpagesimple} + +\func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL}} + +Constructor takes the previous and next pages. They may be modified later by +\helpref{SetPrev()}{wxwizardpagesimplesetprev} or +\helpref{SetNext()}{wxwizardpagesimplesetnext}. + +\membersection{wxWizardPageSimple::SetPrev}\label{wxwizardpagesimplesetprev} + +\func{void}{SetPrev}{\param{wxWizardPage* }{prev}} + +Sets the previous page. + +\membersection{wxWizardPageSimple::SetNext}\label{wxwizardpagesimplesetnext} + +\func{void}{SetNext}{\param{wxWizardPage* }{next}} + +Sets the next page. + +\membersection{wxWizardPageSimple::Chain}\label{wxwizardpagesimplechain} + +\func{static void}{Chain}{\param{wxWizardPageSimple* }{first}, \param{wxWizardPageSimple* }{second}} + +A convenience function to make the pages follow each other. + +Example: +\begin{verbatim} + wxRadioboxPage *page3 = new wxRadioboxPage(wizard); + wxValidationPage *page4 = new wxValidationPage(wizard); + + wxWizardPageSimple::Chain(page3, page4); +\end{verbatim} + diff --git a/docs/latex/wx/wnddisbl.tex b/docs/latex/wx/wnddisbl.tex index efd93453b4..798dae3dd7 100644 --- a/docs/latex/wx/wnddisbl.tex +++ b/docs/latex/wx/wnddisbl.tex @@ -6,7 +6,7 @@ %% Created: 03.03.00 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxWindowDisabler}}\label{wxwindowdisabler} diff --git a/docs/latex/wx/wx.hpj b/docs/latex/wx/wx.hpj index 5bf567ae88..f86e0d792c 100644 --- a/docs/latex/wx/wx.hpj +++ b/docs/latex/wx/wx.hpj @@ -1,5 +1,5 @@ [OPTIONS] -BMROOT=d:\wx2\wxWind~1\docs/latex/wx ; Assume that bitmaps are where the source is +BMROOT=c:\wx2sta~1\wxwind~1\docs/latex/wx ; Assume that bitmaps are where the source is TITLE=wxWindows Manual CONTENTS=Contents COMPRESS=HIGH diff --git a/docs/latex/wx/wxManualTemplate.dot b/docs/latex/wx/wxManualTemplate.dot new file mode 100644 index 0000000000000000000000000000000000000000..d1ba9933e2c5e21da9ab27f74a23e2a68ea53b99 GIT binary patch literal 19456 zcmeHPZERat8Gi4zo!D+tr%sx7UDw^Vnc4agl71$r?VL7g(n8wOX3AiJ&551HU1EEQ zyQYGnbjwD64AhMw_M@ru6CZyHDgp#ZZaZmAVlmHiu1{jS zc9({M+U}n8x$pUU-*e7;KJIzXJ?_O{FS>O0yUYG4MQ(?p`ypFq#H1Lma{8&CAJ}-JQ_&PgL1U(Dq7C8qjl>Q_AN3Qi=>s7G@51+eU z)>etUu-#Ay=TiF%a?J*^*}zPooL^`7l=65zc9=BZ&)8DoIy<|1F3<6nqAkeLgLG70 z9?MakZ=GM{2Z$ff@soZ8;a79vV)}*L6e*@xd?F_Ju7T3cg*G7HpHTi=m{xD1a&IEM z1mVRLP~>#`b-6{!qT|a^%B9okTArr5opvs}{eM6}>qYaGqs4NH!_-eHr~5%u%~y`< z^0hpMUxWU1{6{giSD>KZpuDA^#d1p3VJ>mHJgukU+&H>$&*g1TcrF;a{+jCg{0;R$ zm2MH&GZY`Q@GoMGrH>ECtaNN7H5^I9leGF{RwR`gj>n=5rH5kHvGLw`BAPrlW{pG= zMJF_2*7z{c0qh1kfsX;*z&>C7%&JN28Mt*@D%Vl;A!9)U=ny1cnZ_@CtAS;JZcM&hX!#GyEg@J;;pb4%PSj(5$*$dzZ@oy&@k6M!LkE0A#W22xaG| zJ>)g2^1~9?;yqCiv4Zb;_P_3X-S4`Oi~Ey(cNX|Mz&?C8zdirT4-}+aEt~SsvMGNl zn^GXUAaHpeJozlQt=}c$YB2HY!?Ph;VPIp9-m!glY-lDn=i}Brp!=WwIX!*bHs7iE zJTzb$hWUW_n#A8^1e;{}0YmORfAPcC`AgeZp7&O+0#=_o<7oiyJ3kNk4vV7!M+3LE z27+>z`0=uM1g`>Gt8}oA!&kB~f^~Lxz@A3rUo=zFn%rAw$V(@q>N37twIie$VD09kSm}$^*&9uL3fm}t)zs_h^<2o zf5=Su2_h=+#OkiM@M$A8l2V zDj}(&P!cu~+hDhrZvo}iA%{OyS;$%GVjZA;pW-gv3$2RV2X1d6w|90_1W|*w@YU>D zrNeq@$M_n=2s?_Ana21!0RJd(SUpoRgt*-py$Ph|yA2q2A>WzC5nasK)e z`8lqF_zO&)cNga0qGqirTfkK*d(g%xv@xD*M-VLxO#WOJO}1oJoyG$u$59aZ7pQWs z=d;^Vr`l4Auc{26-KNFhd)O?+S6znBZd*P0EZ6mXJ8{x%$OeO>rMjSfg{ulvmtfNi z^>fCI3$&r;>@txx7;}a^ZLEO|AN)z^=r}agqcp`aVd6x{o?i&aIRGa!JQP&t*rerL zB@z|__X8b3ClCRm0Qc1A0PM+U{0J&P_t{)S$-5f351@?g0NYAAeZZ%IC{VldrRBe;LlQ!f` zqhk-EO9w!o1RYhKJO&XAad zA}BEiIekiIH^K?jg0Dw=XyxZ>L}^Ln{~(lT$i;n+JPw1x%Z1W~;o-qcs}lXq-ZlVE z!<@5&44}&clNben4-4@SG?`Kw9)&)0CSfpUI!f%-wCpxkt)K&wGN3(EcRNl@Mx;F`}eUk0rOJp;;e zFQYJSFu890ci%B>IS`8%M0|`gS&zL(hvSiib!a3qnihN;WxUFRc>39fW8>ZGOQ_Y8 z`*12FsnYzBG~-$CO=9!2E#2{f(d1ZiFm3fFN269tW0R!9h?nP|qbVR^KKdRQd>mht zmH)-0#jnfMH|s)5os#nXMd~<51C9n94LBNbG~j5!(SV}?M+1%q91S=ca5PY?fpYdg z?NsxPU%hd<@$Q;0eFgUax_7?QjyO+I9BuU$fc87>(IJ2~dkWwg!1Dl)SziJc0jGf_ zz!b0m_%=Y>{`&y!;U59@z)u0%;J*YYdkKW++x*PimcX6lk$4g&It=JzkT;t`P#p2%!+(_m!F%6z`={npfZ$TOlz2H2!;mA_$E6&H& zP4_`nC&r|4w~W7EDDUn^`P4Y)?p)iiik>OIxaBujpB9v_+dkLwd23zk-@s`UZ-u7t zD~x_Q!jzkGL6pxmjBD0h%Vz<)B)e2z9#7*!Ip@MKljrRCtBv<+zaICR&RO^zGrm{( zHxfhLIcsjd20vJS1HJFU3!bemUb{I@i|(hjCkKv>#1d(>C+I%JJ8OtilbQZTo!;0Y RZ?(Sq#EnLtlXfd;;6JK#wEX}8 literal 0 HcmV?d00001 diff --git a/docs/latex/wx/wxPython.tex b/docs/latex/wx/wxPython.tex index 53d6881842..9523dd3cb9 100644 --- a/docs/latex/wx/wxPython.tex +++ b/docs/latex/wx/wxPython.tex @@ -35,8 +35,8 @@ wxPython is a Python package that can be imported at runtime that includes a collection of Python modules and an extension module (native code). It provides a series of Python classes that mirror (or shadow) many of the wxWindows GUI classes. This extension module -attempts to mirror the class heiarchy of wxWindows as closely as -possble. This means that there is a wxFrame class in wxPython that +attempts to mirror the class heirarchy of wxWindows as closely as +possible. This means that there is a wxFrame class in wxPython that looks, smells, tastes and acts almost the same as the wxFrame class in the C++ version. @@ -45,17 +45,17 @@ applications, or in situations where Python is embedded in a C++ application as an internal scripting or macro language. Currently wxPython is available for Win32 platforms and the GTK -toolkit (wxGTK) on most Unix/X-windows platforms. The effort to -enable wxPython for wxMotif will begin shortly. See \helpref{Building Python}{wxpbuild} for +toolkit (wxGTK) on most Unix/X-windows platforms. See the wxPython +website \urlref{http://wxPython.org/}{http://wxPython.org/} for details about getting wxPython working for you. %---------------------------------------------------------------------- \section{Why use wxPython?}\label{wxpwhy} So why would you want to use wxPython over just C++ and wxWindows? -Personally I prefer using Python for everything. I only use C++ when -I absolutely have to eek more performance out of an algorithm, and even -then I ususally code it as an extension module and leave the majority +Personally I prefer using Python for everything. I only use C++ when I +absolutely have to eek more performance out of an algorithm, and even +then I usually code it as an extension module and leave the majority of the program in Python. Another good thing to use wxPython for is quick prototyping of your @@ -80,7 +80,7 @@ This has its upsides and its downsides... The upside is that Tk is a pretty versatile toolkit. It can be made to do a lot of things in a lot of different environments. It is fairly -easy to create new widgets and use them interchangably in your +easy to create new widgets and use them interchangeably in your programs. The downside is Tcl. When using Tkinter you actually have two @@ -89,7 +89,7 @@ Tcl interpreter for the GUI. Since the guts of Tcl is mostly about string processing, it is fairly slow as well. (Not too bad on a fast Pentium II, but you really notice the difference on slower machines.) -It wasn't until the lastest version of Tcl/Tk that native Look and +It wasn't until the latest version of Tcl/Tk that native Look and Feel was possible on non-Motif platforms. This is because Tk usually implements its own widgets (controls) even when there are native controls available. @@ -111,82 +111,11 @@ to use the GUI portions. \wxheading{Others} There are quite a few other GUI modules available for Python, some in -active use, some that havn't been updated for ages. Most are simple +active use, some that haven't been updated for ages. Most are simple wrappers around some C or C++ toolkit or another, and most are not -cross-platform compatible. See \urlref{this link}{http://www.python.org/download/Contributed.html\#Graphics} +cross-platform compatible. See \urlref{this link}{http://www.python.org/download/Contributed.html\#Graphics} for a listing of a few of them. -%---------------------------------------------------------------------- -\section{Building wxPython}\label{wxpbuild} - -I used SWIG (\urlref{http://www.swig.org}{http://www.swig.org}) to -to create the source code for the -extension module. This enabled me to only have to deal with a small -amount of code and only have to bother with the exceptional issues. -SWIG takes care of the rest and generates all the repetative code for -me. You don't need SWIG to build the extension module as all the -generated C++ code is included under the src directory. - -I added a few minor features to SWIG to control some of the code -generation. If you want to play around with this you will need to get -a recent version of SWIG from their CVS or from a daily build. See -\urlref{http://www.swig.org/}{http://www.swig.org/} for details. - -wxPython is organized as a Python package. This means that the -directory containing the results of the build process should be a -subdirectory of a directory on the {\tt PYTHONPATH}. (And preferably should -be named wxPython.) You can control where the build process will dump -wxPython by setting the {\tt TARGETDIR} variable for the build utility (see -below). - -\begin{enumerate}\itemsep=0pt -\item Build wxWindows as described in its BuildCVS.txt file. For Unix -systems I run configure with these flags: - -\begin{verbatim} - --with-gtk - --with-libjpeg - --without-odbc - --enable-unicode=no - --enable-threads=yes - --enable-socket=yes - --enable-static=no - --enable-shared=yes - --disable-std_iostreams -\end{verbatim} - -You can use whatever flags you want, but I know these work. - -For Win32 systems I use Visual C++ 6.0, but 5.0 should work also. The -build utility currently does not support any other Win32 compilers. -\item At this point you may want to make an alias or symlink, script, -batch file, whatever on the PATH that invokes {\tt \$(WXWIN)/utils/wxPython/distrib/build.py} to -help simplify matters somewhat. For example, on my Win32 system I have a file named - {\tt build}.bat in a directory on the PATH that contains: - -{\tt python \%WXWIN/utils/wxPython/distrib/build.py \%1 \%2 \%3 \%4 \%5 \%6} -\item Change into the {\tt \$(WXWIN)/utils/wxPython/src} directory. -\item Type "{\tt build -b}" to build wxPython and "{\tt build -i}" to -install it, or "{\tt build -bi}" to do both steps at once. - -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 are -able to to override many configuration options in a file named -build.local. -\item To build and install the add-on modules, change to the appropriate -directory under {\tt \$(WXWIN)/utils/wxPython/modules} and run the build -utility again. -\item Change to the {\tt \$(WXWIN)/utils/wxPython/demo} directory. -\item Try executing the demo program. For example: - -{\tt python demo.py} - -To run it without requiring a console on Win32, you can use the -{\tt pythonw.exe} version of Python either from the command line or from a -shortcut. -\end{enumerate} %---------------------------------------------------------------------- \section{Using wxPython}\label{wxpusing} @@ -300,7 +229,7 @@ methods of the class. These helper functions are intended to be like the event table macros that wxWindows employs. But since static event tables are impossible with wxPython, we use helpers that are named the same to dynamically build the table. The only real difference is -that the first arguemnt to the event helpers is always the window that +that the first argument to the event helpers is always the window that the event table entry should be added to. \item Notice the use of {\tt wxDLG\_PNT} and {\tt wxDLG\_SZE} in lines 19 - 29 to convert from dialog units to pixels. These helpers are unique @@ -311,14 +240,14 @@ called? The answer is, yes it does. This is because many of the {\em standard} events are attached to windows that have the associated {\em standard} method names. I have tried to follow the lead of the C++ classes in this area to determine what is {\em standard} but since -that changes from time to time I can make no guarentees, nor will it +that changes from time to time I can make no guarantees, nor will it be fully documented. When in doubt, use an EVT\_*** function. \item At lines 17 to 21 notice that there are no saved references to the panel or the static text items that are created. Those of you who know Python might be wondering what happens when Python deletes these objects when they go out of scope. Do they disappear from the GUI? They don't. Remember that in wxPython the Python objects are just shadows of the -coresponding C++ objects. Once the C++ windows and controls are +corresponding C++ objects. Once the C++ windows and controls are attached to their parents, the parents manage them and delete them when necessary. For this reason, most wxPython objects do not need to have a \_\_del\_\_ method that explicitly causes the C++ object to be @@ -360,6 +289,7 @@ as possible to the C++ spec over time. \item \helpref{wxBusyCursor}{wxbusycursor} \item \helpref{wxButton}{wxbutton} \item \helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent} +\item \helpref{wxCalendarCtrl}{wxcalendarctrl} \item wxCaret \item \helpref{wxCheckBox}{wxcheckbox} \item \helpref{wxCheckListBox}{wxchecklistbox} @@ -380,29 +310,38 @@ as possible to the C++ spec over time. \item \helpref{wxDataObject}{wxdataobject} \item \helpref{wxDataObjectComposite}{wxdataobjectcomposite} \item \helpref{wxDataObjectSimple}{wxdataobjectsimple} +\item \helpref{wxDateTime}{wxdatetime} +\item \helpref{wxDateSpan}{wxdatespan} \item \helpref{wxDC}{wxdc} \item \helpref{wxDialog}{wxdialog} \item \helpref{wxDirDialog}{wxdirdialog} +\item \helpref{wxDragImage}{wxdragimage} \item \helpref{wxDropFilesEvent}{wxdropfilesevent} \item \helpref{wxDropSource}{wxdropsource} \item \helpref{wxDropTarget}{wxdroptarget} \item \helpref{wxEraseEvent}{wxeraseevent} \item \helpref{wxEvent}{wxevent} \item \helpref{wxEvtHandler}{wxevthandler} +\item wxFileConfig \item \helpref{wxFileDataObject}{wxfiledataobject} \item \helpref{wxFileDialog}{wxfiledialog} \item \helpref{wxFileDropTarget}{wxfiledroptarget} +\item \helpref{wxFileSystem}{wxfilesystem} +\item \helpref{wxFileSystemHandler}{wxfilesystemhandler} \item \helpref{wxFocusEvent}{wxfocusevent} \item \helpref{wxFontData}{wxfontdata} \item \helpref{wxFontDialog}{wxfontdialog} \item \helpref{wxFont}{wxfont} \item \helpref{wxFrame}{wxframe} +\item \helpref{wxFSFile}{wxfsfile} \item \helpref{wxGauge}{wxgauge} \item wxGIFHandler \item wxGLCanvas +\begin{comment} \item wxGridCell \item wxGridEvent \item \helpref{wxGrid}{wxgrid} +\end{comment} \item \helpref{wxHtmlCell}{wxhtmlcell} \item \helpref{wxHtmlContainerCell}{wxhtmlcontainercell} \item \helpref{wxHtmlDCRenderer}{wxhtmldcrenderer} @@ -422,6 +361,8 @@ as possible to the C++ spec over time. \item \helpref{wxImageList}{wximagelist} \item \helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint} \item \helpref{wxInitDialogEvent}{wxinitdialogevent} +\item \helpref{wxInputStream}{wxinputstream} +\item wxInternetFSHandler \item \helpref{wxJoystickEvent}{wxjoystickevent} \item wxJPEGHandler \item \helpref{wxKeyEvent}{wxkeyevent} @@ -431,12 +372,13 @@ as possible to the C++ spec over time. \item \helpref{wxListCtrl}{wxlistctrl} \item \helpref{wxListEvent}{wxlistevent} \item \helpref{wxListItem}{wxlistctrlsetitem} +\item \helpref{wxMask}{wxmask} +\item wxMaximizeEvent \item \helpref{wxMDIChildFrame}{wxmdichildframe} \item \helpref{wxMDIClientWindow}{wxmdiclientwindow} \item \helpref{wxMDIParentFrame}{wxmdiparentframe} -\item \helpref{wxMask}{wxmask} -\item wxMaximizeEvent \item \helpref{wxMemoryDC}{wxmemorydc} +\item \helpref{wxMemoryFSHandler}{wxmemoryfshandler} \item \helpref{wxMenuBar}{wxmenubar} \item \helpref{wxMenuEvent}{wxmenuevent} \item \helpref{wxMenuItem}{wxmenuitem} @@ -466,6 +408,7 @@ as possible to the C++ spec over time. \item \helpref{wxPrintPreview}{wxprintpreview} \item \helpref{wxPrinterDC}{wxprinterdc} \item \helpref{wxPrintout}{wxprintout} +\item \helpref{wxProcess}{wxprocess} \item \helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent} \item \helpref{wxRadioBox}{wxradiobox} \item \helpref{wxRadioButton}{wxradiobutton} @@ -504,6 +447,9 @@ as possible to the C++ spec over time. \item \helpref{wxTextDropTarget}{wxtextdroptarget} \item \helpref{wxTextEntryDialog}{wxtextentrydialog} \item \helpref{wxTimer}{wxtimer} +\item \helpref{wxTimerEvent}{wxtimerevent} +\item \helpref{wxTimeSpan}{wxtimespan} +\item \helpref{wxTipProvider}{wxtipprovider} \item wxToolBarTool \item \helpref{wxToolBar}{wxtoolbar} \item wxToolTip @@ -515,21 +461,23 @@ as possible to the C++ spec over time. \item \helpref{wxValidator}{wxvalidator} \item \helpref{wxWindowDC}{wxwindowdc} \item \helpref{wxWindow}{wxwindow} +\item wxZipFSHandler \end{itemize} %---------------------------------------------------------------------- \section{Where to go for help}\label{wxphelp} Since wxPython is a blending of multiple technologies, help comes from -multiple sources. See -\urlref{http://alldunn.com/wxPython}{http://alldunn.com/wxPython} for details on +multiple sources. See +\urlref{http://wxpython.org/}{http://wxpython.org/} for details on various sources of help, but probably the best source is the wxPython-users mail list. You can view the archive or subscribe by going to -\urlref{http://starship.python.net/mailman/listinfo/wxpython-users}{http://starship.python.net/mailman/listinfo/wxpython-users} +\urlref{http://lists.sourceforge.net/mailman/listinfo/wxpython-users}{http://lists.sourceforge.net/mailman/listinfo/wxpython-users} Or you can send mail directly to the list using this address: -wxpython-users@starship.python.net +wxpython-users@lists.sourceforge.net + diff --git a/docs/latex/wx/wxhtml.tex b/docs/latex/wx/wxhtml.tex index 2375de3b12..9a72e5bd90 100644 --- a/docs/latex/wx/wxhtml.tex +++ b/docs/latex/wx/wxhtml.tex @@ -7,10 +7,8 @@ This addendum is written by Vaclav Slavik, the author of the wxHTML library. The wxHTML library provides classes for parsing and displaying HTML. -(It is not intended to be a high-end HTML browser. If you're looking for -something like that try \urlref{http://www.mozilla.org}{http://www.mozilla.org} - there's a -chance you'll be able to make their widget wxWindows-compatible. I'm sure -everyone will enjoy your work in that case...) +(It is not intended to be a high-end HTML browser. If you are looking for +something like that try \urlref{http://www.mozilla.org}{http://www.mozilla.org}) wxHTML can be used as a generic rich text viewer - for example to display a nice About Box (like those of GNOME apps) or to display the result of @@ -22,7 +20,7 @@ extend wxHtml library with new, unsupported tags. Not only that, you can even use your own application specific tags! See lib/mod\_*.cpp files for details. -There is a generic (non-wxHtmlWindow) wxHtmlParser class. +There is a generic (i.e. independent on wxHtmlWindow) wxHtmlParser class. \input htmlstrt.tex \input htmlprn.tex diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex index 9c82d7fb3e..353f01e385 100644 --- a/docs/latex/wx/wxstring.tex +++ b/docs/latex/wx/wxstring.tex @@ -93,16 +93,22 @@ insensitive comparisons you should use \helpref{CmpNoCase}{wxstringcmpnocase} or give a second parameter to IsSameAs. This last function is may be more convenient if only equality of the strings matters because it returns a boolean true value if the strings are the same and not 0 (which is usually FALSE in C) -as Cmp does. +as {\tt Cmp()} does. \helpref{Matches}{wxstringmatches} is a poor man's regular expression matcher: it only understands '*' and '?' metacharacters in the sense of DOS command line interpreter. +\helpref{StartsWith}{wxstringstartswith} is helpful when parsing a line of +text which should start with some predefined prefix and is more efficient than +doing direct string comparaison as you would also have to precalculate the +length of the prefix then. + \helpref{Cmp}{wxstringcmp}\\ \helpref{CmpNoCase}{wxstringcmpnocase}\\ \helpref{IsSameAs}{wxstringissameas}\\ -\helpref{Matches}{wxstringmatches} +\helpref{Matches}{wxstringmatches}\\ +\helpref{StartsWith}{wxstringstartswith} \membersection{Substring extraction} @@ -117,7 +123,8 @@ substring. \helpref{BeforeFirst}{wxstringbeforefirst}\\ \helpref{BeforeLast}{wxstringbeforelast}\\ \helpref{AfterFirst}{wxstringafterfirst}\\ -\helpref{AfterLast}{wxstringafterlast} +\helpref{AfterLast}{wxstringafterlast}\\ +\helpref{StartsWith}{wxstringstartswith} \membersection{Case conversion} @@ -196,9 +203,9 @@ Other string functions. \helpref{Pad}{wxstringpad}\\ \helpref{Truncate}{wxstringtruncate} -\membersection{wxWindows 1.xx compatiblity functions} +\membersection{wxWindows 1.xx compatibility functions} -These functiosn are deprecated, please consider using new wxWindows 2.0 +These functions are deprecated, please consider using new wxWindows 2.0 functions instead of them (or, even better, std::string compatible variants). \helpref{SubString}{wxstringsubstring}\\ @@ -395,7 +402,14 @@ Constructs a string of {\it n} copies of character {\it ch}. \func{}{wxString}{\param{const char*}{ psz}, \param{size\_t}{ nLength = wxSTRING\_MAXLEN}} Takes first {\it nLength} characters from the C string {\it psz}. -The default value of wxSTRING\_MAXLEN means take all the string. +The default value of wxSTRING\_MAXLEN means to take all the string. + +Note that this constructor may be used even if {\it psz} points to a buffer +with binary data (i.e. containing {\tt NUL} characters) as long as you provide +the correct value for {\it nLength}. However, the default form of it works +only with strings without intermediate {\tt NUL}s because it uses +{\tt strlen()} to calculate the effective length and it would not give correct +results otherwise. \func{}{wxString}{\param{const unsigned char*}{ psz}, \param{size\_t}{ nLength = wxSTRING\_MAXLEN}} @@ -509,7 +523,7 @@ See also: \helpref{Empty}{wxstringempty} Case-sensitive comparison. Returns a positive value if the string is greater than the argument, zero if -it si equal to it or negative value if it is less than argument (same semantics +it is equal to it or a negative value if it is less than the argument (same semantics as the standard {\it strcmp()} function). See also \helpref{CmpNoCase}{wxstringcmpnocase}, \helpref{IsSameAs}{wxstringissameas}. @@ -521,7 +535,7 @@ See also \helpref{CmpNoCase}{wxstringcmpnocase}, \helpref{IsSameAs}{wxstringissa Case-insensitive comparison. Returns a positive value if the string is greater than the argument, zero if -it si equal to it or negative value if it is less than argument (same semantics +it is equal to it or a negative value if it is less than the argument (same semantics as the standard {\it strcmp()} function). See also \helpref{Cmp}{wxstringcmp}, \helpref{IsSameAs}{wxstringissameas}. @@ -597,9 +611,9 @@ This static function returns the string containing the result of calling \membersection{wxString::Freq}\label{wxstringfreq} -\constfunc{int}{Frec}{\param{char }{ch}} +\constfunc{int}{Freq}{\param{char }{ch}} -Returns the number of occurences of {it ch} in the string. +Returns the number of occurrences of {\it ch} in the string. \membersection{wxString::GetChar}\label{wxstringgetchar} @@ -677,7 +691,7 @@ Returns TRUE if the string is NULL (same as IsEmpty). \constfunc{bool}{IsNumber}{\void} -Returns TRUE if the string is a number. +Returns TRUE if the string is a positive or negative integer. Will return FALSE for decimals. \membersection{wxString::IsSameAs}\label{wxstringissameas} @@ -862,6 +876,16 @@ Minimizes the string's memory. This can be useful after a call to The same as Printf. +\membersection{wxString::StartsWith}\label{wxstringstartswith} + +\constfunc{bool}{StartsWith}{\param{const wxChar }{*prefix}, \param{wxString }{*rest = NULL}} + +This function can be used to test if the string starts with the specified +{\it prefix}. If it does, the function will return {\tt TRUE} and put the rest +of the string (i.e. after the prefix) into {\it rest} string if it is not +{\tt NULL}. Otherwise, the function returns {\tt FALSE} and doesn't modify the +{\it rest}. + \membersection{wxString::Strip}\label{wxstringstrip} \begin{verbatim} @@ -875,34 +899,53 @@ doesn't change this string. \membersection{wxString::SubString}\label{wxstringsubstring} -\constfunc{wxString}{SubString}{\param{size\_t}{ to}, \param{size\_t}{ from}} +\constfunc{wxString}{SubString}{\param{size\_t}{ from}, \param{size\_t}{ to}} -Same as \helpref{Mid}{wxstringmid}. +Deprecated, use \helpref{Mid}{wxstringmid} instead (but note that parameters +have different meaning). + +Returns the part of the string between the indices {\it from} and {\it to} +inclusive. \membersection{wxString::ToDouble}\label{wxstringtodouble} -\constfunc{bool}{To}{\param{double}{ *val}} +\constfunc{bool}{ToDouble}{\param{double}{ *val}} Attempts to convert the string to a floating point number. Returns TRUE on -suceess (the number is stored in the location pointed to by {\it val}) or FALSE +success (the number is stored in the location pointed to by {\it val}) or FALSE if the string does not represent such number. +\wxheading{See also} + +\helpref{wxString::ToLong}{wxstringtolong},\\ +\helpref{wxString::ToULong}{wxstringtoulong} + \membersection{wxString::ToLong}\label{wxstringtolong} -\constfunc{bool}{To}{\param{long}{ *val}} +\constfunc{bool}{ToLong}{\param{long}{ *val}} -Attempts to convert the string to a signed integer. Returns TRUE on suceess +Attempts to convert the string to a signed integer. Returns TRUE on success (the number is stored in the location pointed to by {\it val}) or FALSE if the string does not represent such number. +\wxheading{See also} + +\helpref{wxString::ToDouble}{wxstringtodouble},\\ +\helpref{wxString::ToULong}{wxstringtoulong} + \membersection{wxString::ToULong}\label{wxstringtoulong} -\constfunc{bool}{To}{\param{unsigned long}{ *val}} +\constfunc{bool}{ToULong}{\param{unsigned long}{ *val}} -Attempts to convert the string to an unsigned integer. Returns TRUE on suceess +Attempts to convert the string to an unsigned integer. Returns TRUE on success (the number is stored in the location pointed to by {\it val}) or FALSE if the string does not represent such number. +\wxheading{See also} + +\helpref{wxString::ToDouble}{wxstringtodouble},\\ +\helpref{wxString::ToLong}{wxstringtolong} + \membersection{wxString::Trim}\label{wxstringtrim} \func{wxString\&}{Trim}{\param{bool}{ fromRight = TRUE}} @@ -960,7 +1003,7 @@ See also \helpref{IsEmpty()}{wxstringisempty}. Assignment: the effect of each operation is the same as for the corresponding constructor (see \helpref{wxString constructors}{wxstringconstruct}). -\membersection{operator wxString::$+$}\label{wxstringoperatorplus} +\membersection{wxString::operator $+$}\label{wxstringoperatorplus} Concatenation: all these operators return a new strign equal to the sum of the operands. diff --git a/docs/latex/wx/zipstrm.tex b/docs/latex/wx/zipstrm.tex index c2864364aa..33a4f3ff0b 100644 --- a/docs/latex/wx/zipstrm.tex +++ b/docs/latex/wx/zipstrm.tex @@ -9,6 +9,13 @@ This class is input stream from ZIP archive. The archive must be local file (accessible via FILE*). It has all features including GetSize and seeking. +\wxheading{Note} + +If you need to enumerate files in ZIP archive, you can use +\helpref{wxFileSystem}{wxfilesystem} together with wxZipFSHandler (see +\helpref{the overview}{fs}. + + \wxheading{Derived from} \helpref{wxInputStream}{wxinputstream} diff --git a/docs/motif/install.txt b/docs/motif/install.txt index 9d5feda8f1..294b687db6 100644 --- a/docs/motif/install.txt +++ b/docs/motif/install.txt @@ -1,4 +1,4 @@ -wxWindows 2.1 for Motif installation +wxWindows 2.2 for Motif installation ------------------------------------ IMPORTANT NOTE: @@ -11,7 +11,7 @@ IMPORTANT NOTE: When sending bug reports tell us what version of wxWindows you are using (including the beta) and what compiler on what system. One - example: wxMotif 2.1 beta 6, egcs 1.1.1, Redhat 5.0 + example: wxMotif 2.2.0, egcs 1.1.1, Redhat 5.0 First steps ----------- @@ -19,17 +19,12 @@ First steps - Prerequisites: Motif 1.2 or above, or Lesstif (not yet tested). Motif 2.0 and above may also be suitable. -- Download the appropriate .tgz archive, or alternatively the files - wx2_x_y_gen.zip and wx2_x_y_mot.zip. Download documentation in a - preferred format, such as wx2_x_y_htm.zip or wx2_x_y_pdf.zip. +- Download wxMotif-x.y.z.tgz, where x.y.z is the version number. + Download documentation in a preferred format, such as + wxWindows-HTML.zip or wxWindows-PDF.zip. - Make a directory such as ~/wx and unarchive the files into this - directory. If using the zip archives, use the -a option if available - to convert the ASCII files to Unix format. Don't worry about files being - overwritten: they should be identical anyway. - - (See http://www.cdrom.com/pub/infozip/ if you don't have zip/unzip - already installed. Zip isn't the same as gzip!) + directory. - It is recommended that you install bison and flex; using yacc and lex may require tweaking of the makefiles. You also need diff --git a/docs/motif/issues.txt b/docs/motif/issues.txt index 5bb2656c0e..98a32d4f3e 100644 --- a/docs/motif/issues.txt +++ b/docs/motif/issues.txt @@ -5,6 +5,8 @@ Last updated 19/3/2000. See also: todo.txt. +- Sockets not yet working since idle wake-up not implemented. + - wxTextCtrl doesn't work as a stream buffer in Linux/gcc. - No wxSpinButton. @@ -21,14 +23,22 @@ See also: todo.txt. e.g. wxScrolledWindows, so maybe have wxSystemSettings value for scrollbar colour, and/or ability to set scrollbar colour independently. -- wxFrame can accept events, but apps cannot draw into it for some reason, - so the rotate sample won't work. Workaround: use an embedded wxWindow. +- wxFrame can accept events, but apps cannot draw into it for + Workaround: use an embedded wxWindow. + +- The background of a window sometimes isn't restored when changing + notebook pages (see sashtest, mdi examples). The notebook background + colour shows through. A resize, or scroll, restores the correct + background colour. - In Life! sample, text above slider isn't legible. -- samples/html/helpview and samples/help show a problem when showing - the advanced HTML help controller: a BadDrawable X error occurs - (unfortunately hard to tell where). Somewhere in wxHtmlHelpFrame. +- samples/html/helpview and samples/help demonstrate that sometimes, + XPM images can't be loaded, perhaps only in 256-colour mode. This + will now cause an assert rather than an X error. But we need to + either cure the XPM loading problem, or provide alternative toolbar + buttons (for HelpView) and icons (for places where icons are used e.g. + in the log dialog). - Dialog Editor needs a lot of work. diff --git a/docs/motif/makewxmotif b/docs/motif/makewxmotif index 3146edfe56..bed60a303b 100644 --- a/docs/motif/makewxmotif +++ b/docs/motif/makewxmotif @@ -6,6 +6,6 @@ # if you're feeling brave, you may wish to compile with threads. # -- Julian Smart rm -f *.cache -chmod a+x configure config.sub config.guess samples/configure contrib/configure +chmod a+x configure config.sub config.guess samples/configure demos/configure contrib/configure ./configure --disable-shared --with-motif --without-gtk --with-debug_flag --with-debug_info --enable-debug --without-sockets --without-odbc --without-threads --enable-newgrid make diff --git a/docs/motif/readme.txt b/docs/motif/readme.txt index 442b0681ef..441069e4a6 100644 --- a/docs/motif/readme.txt +++ b/docs/motif/readme.txt @@ -1,14 +1,8 @@ - Welcome to wxWindows/Motif 2.1.14 + Welcome to wxWindows/Motif 2.2.7 -You have downloaded version 2.1.14 of the Motif port of -the wxWindows GUI library. Although this is not yet the -final stable release wxMotif 2.2, the current version has -been tested carefully on many systems and has been found -to work better than any other previous version. - -This is the last beta release. wxWindows is now in a code -freeze and only bugs will be corrected. +You have downloaded version 2.2.7 of the Motif port of +the wxWindows GUI library. More information about the wxWindows project as a whole can be found at: @@ -39,7 +33,7 @@ Alternatively, you may also use the bug reporting system linked from the wxWindows web page. The library produced by the install process will be called -libwx_motif.a (static) and libwx_motif-2.1.so.14.0.0 (shared) so that +libwx_motif.a (static) and libwx_motif-2.2.so.0.1.1 (shared) so that once a binary incompatible version of wxWindows/Motif comes out we'll augment the library version number to avoid linking problems. diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 2444068794..eac7a4c491 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -1,11 +1,9 @@ -Installing wxWindows 2.1 +Installing wxWindows 2.2 ------------------------ -This is a beta release of wxWindows 2.1 for Microsoft -Windows 95, 98 and NT. This is not a production release, -although a huge number of bugs found in earlier versions -of wxWindows have been fixed. +This is wxWindows 2.2 for Microsoft Windows 3.1, 95, 98 and +Windows NT/Windows 2000. This is an official, stable release. IMPORTANT NOTE: If you experience problems installing, please re-read this instructions and other related files (changes.txt, @@ -34,20 +32,8 @@ program contains the following: - Tex2RTF source; - Dialog Editor binary. -Alternatively, you may unarchive the set of .zip files by hand, -where x is the minor version number and y is the release number: - -wx2_x_y_gen.zip Generic source code and samples (required) -wx2_x_y_msw.zip Windows-specific source code and samples (required) -wx2_x_y_doc.zip Documentation source code (not required) -wx2_x_y_hlp.zip WinHelp documentation -wx2_x_y_pdf.zip Acrobat PDF documentation -wx2_x_y_htm.zip HTML documentation -wx2_x_y_vc.zip MS VC++ 5.0 project files -wx2_x_y_cw.zip Metrowerks CodeWarrior project files -wx2_x_y_bc.zip BC++ 5 project files -jpeg.zip Use this to allow wxImage to read and write JPEG files -tiff.zip Use this to allow wxImage to read and write TIFF files +Alternatively, you may unarchive the .zip form by hand: +wxMSW-x.y.z.zip where x.y.z is the version number. Unarchive the required files plus any optional documentation files into a suitable directory such as c:\wx. @@ -59,6 +45,9 @@ Other add-on packages are available from the wxWindows Web site, such as: - tex2rtf3.zip. Tex2RTF: create Windows Help, HTML, and Word RTF files from the same document source. +For instructions on compiling wxBase (wxWindows-without-GUI), +please see docs/base/install.txt. + General installation notes -------------------------- @@ -81,7 +70,8 @@ Visual C++ 4.0/5.0/6.0 compilation Using project files (VC++ 5 and 6 only): -1. Unarchive wx2_x_y_vc.zip, the VC++ 5/6 project makefiles. +1. Unarchive wxWindows-x.y.z-vc.zip, the VC++ 5/6 project + makefiles (already included in wxMSW-x.y.z.zip and the setup version). 2. Open src/wxvc.dsp, set Debug or Release configuration for the wxvc project, and compile. Alternatively, use Batch Build to build both Debug and Release configurations. @@ -148,7 +138,7 @@ To build the DLL version using makefiles: suitable precompiled header file for compiling applications. The resulting libraries are called: - wx\lib\wx[version].lib(dll) (debug version) + wx\lib\wx[version]d.lib(dll) (debug version) wx\lib\wx[version].lib(dll) (release version, using FINAL=1) 2. Invoke a sample makefile with 'nmake -f makefile.vc WXUSINGDLL=1' @@ -199,12 +189,13 @@ the project. After this, delete everything (including PCH) and recompile. Note (5): for some further notes about upgrading your project files to be compatible with wxWindows 2.1.14, please see -"Highlights of wxWindows 2.1.14" from the Download page of the +"Highlights of wxWindows" from the Download page of the web site or CD-ROM. Note (6): to create your own IDE files, see the technical note on the wxWindows web site or CD-ROM, entitled "Compiling wxWindows -applications in the VC++ IDE". You can also copy .dsp and .dsw +applications in the VC++ IDE" (technical note docs/tech/tn0010.htm in the +wxWindows distribution). You can also copy .dsp and .dsw files from an existing wxWindows sample and adapt them. Visual C++ 1.5 compilation (16-bit) @@ -239,6 +230,13 @@ Compiling using the makefiles: 'make -f makefile.b32 clean' 'make -f makefile.b32 FINAL=1' for the library and samples. +5. To make and use wxWindows as a DLL, type + 'make -f makefile.b32 clean' + 'make -f makefile.b32 DLL=1' + and then for each sample, + 'make -f makefile.b32 WXUSINGDLL=1' + Please note that the samples have not been exhaustively tested + with this configuration. Note (1): the wxWindows library and (some) samples compile in 16-bit mode using makefile.bcc, but at present the wxWindows resource system is switched @@ -299,39 +297,127 @@ some samples) you need to compile them with bc32.ide. Note (3): the debug version of the wxWindows library is about 40 MB, and the release version is around 5 MB. -See also the file bc_ide.txt for further instructions and details +See also the file docs/tech/tn0007.txt for further instructions and details of how to create your own project files. +Borland C++ 5.5 compilation +--------------------------- + +Before compiling wxWindows with Borland C++ 5.5, there are a few +issues concerning the compiler installation: + +1. The compiler must be installed to a path that does not contain + spaces, such as c:\Borland\Bcc55 (in particular, do not install + it below "C:\Program Files"). + +2. Make sure that you downloaded and installed the service pack 1 + for Borland C++ 5.5. This SP1 can be downloaded from: + http://www.borland.com/devsupport/bcppbuilder/patches/#freecompiler55 + + IMPORTANT: + When installing SP1, make sure that you extract (UnZip) the files + to the directory where you installed Borland C++ 5.5 (e.g., + c:\Borland\Bcc55) with the option "use folder names" selected. + This is necessary, to ensure that the files (mostly include files) + are extracted to the right directory. + +3. Create the following two files in the same directory where you + installed Borland C++ 5.5 (e.g., c:\Borland\Bcc55): + + a. bcc32.cfg + text file containing the following two lines: + -I"c:\Borland\Bcc55\include" + -L"c:\Borland\Bcc55\lib" + + b. ilink32.cfg + text file containing the following line: + -L"c:\Borland\Bcc55\lib" + + (replace c:\Borland\Bcc55 with the actual path where you installed + Borland C++ 5.5) + +4. Add the borland BIN directory to your path (e.g., c:\Borland\Bcc55\bin), + and define the environment variable BCCDIR= + (e.g., set BCCDIR=c:\Borland\Bcc55) + +Compiling wxWindows: + +Once the compiler and its service pack are properly installed, you build +wxWindows using the provided makefile.b32 in the src/msw directory: + +a. To build wxWindows in DEBUG mode: + + cd c:\wx2\src\msw + make -f makefile.b32 + + (replace c:\wx2 with the actual path where you installed wxWindows) + +b. To build wxWindows in RELEASE mode: + + cd c:\wx2\src\msw + make -f makefile.b32 FINAL=1 + + (if you had previously built wxWindows, you need to clean all of + the object and intermediate files. Before the above make command, + run: 'make -f makefile.b32 CLEANALL') + +IMPORTANT: +The Service Pack 1 for Borland C++ 5.5 must be installed before wxWindows +is compiled. If you compiled wxWindows before, it is advised that you +re-compile it following the next steps: + + cd c:\wx2\src\msw + make -f makefile.b32 CLEANALL + make -f makefile.b32 (or make -f makefile.b32 FINAL=1) + + (replace c:\wx2 with the actual path where you installed wxWindows) + +** REMEMBER ** + +In all of your wxWindows applications, your source code should include +the following preprocessor directive: + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +(check the samples -- e.g., \wx2\samples\minimal\minimal.cpp -- for +more details) + Borland C++Builder compilation ------------------------------ -C++Builder compilation is the same as for Borland C++ above. +1. Build the wxWindows libraries using the Borland make utility as + specified in the section called "Borland C++ 4.5/5.0 compilation" + above. (C++ Builder includes a stand-alone C++ compiler. For example, + C++ Builder 4.0 comes with C++ 5.4.) -Tested with C++Builder 1.0 and 3.0. Only makefiles are currently -supplied. +2. You can build samples using the makefiles as per the + instructions for BC++ above, or you can follow the instructions + in docs/tech/tn0004.htm or http://biolpc22.york.ac.uk/wx/bc/ide.html. Watcom C++ 10.6/11 compilation --------------------------- 1. Make sure your WXWIN variable is set, and uses the DOS short name form. -2. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to +2. Change directory to wx\src\msw. Type + 'wmake -f makefile.wat all' to make the wxWindows core library. -3. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat' +3. Change directory to wx\samples\minimal and type + 'wmake -f makefile.wat all' to make this sample. Repeat for other samples of interest. -Note (1): setup.h overrides wxUSE_LIBJPEG and sets it to 0, since -imagjpeg.cpp doesn't compile. -Note (2): makewat.env uses the odbc32.lib supplied in wxWindows' lib\watcom +Note (1): makewat.env uses the odbc32.lib supplied in wxWindows' lib\watcom directory. See the notes in that directory. -Note (3): if variant.cpp is compiled with date/time class +Note (2): if variant.cpp is compiled with date/time class options, the linker gives up. So the date/time option is switched off for Watcom C++. Also, wxAutomationObject is not compiled with Watcom C++. -Note (4): if Watcom can't read the precompiled header when -building a sample, try deleting src\msw\watcom.pch and -compiling the sample again. -Note (5): if you get _popen_ and _pclose_ link errors, try +Note (3): if Watcom can't read the precompiled header when +building a sample or library, try deleting src\msw\watcom.pch and +compiling again. +Note (4): if you get _popen_ and _pclose_ link errors, try recompiling wxWindows with XPM support disabled in setup.h. Alternatively, make sure these lines exist at the top of src\xpm\xpmi.h: @@ -344,7 +430,7 @@ src\xpm\xpmi.h: Metrowerks CodeWarrior compilation ---------------------------------- -1. Downloaded and unzip wx2_x_y_cw.zip. +1. Downloaded and unzip wxWindows-x.y.z-cw.zip. 2. Load the make_cw.mcp project in wx\src, and compile. 3. Load the make_cw.mcp project in wx\samples\minimal, and compile. Further project files for samples will be available in due @@ -393,37 +479,33 @@ the debugging version of the library is 90MB, with samples coming in at 40MB :-) However, wxWindows at least makes a good test suite for improving the compiler. -Cygwin b19/b20/Mingw32 compilation +Cygwin/Mingw32 compilation ---------------------------------- -wxWindows 2 supports Cygwin (formerly GnuWin32) b19, b20, Mingw32, -and Mingw32/EGCS. +wxWindows 2 supports Cygwin (formerly GnuWin32) betas and +releases, and Mingw32. -Thanks are due to Keith Garry Boyce (garp@opustel.com) and Cygnus for making -it all possible. +Thanks are due to Keith Garry Boyce (garp@opustel.com), Cygnus +and others for making it all possible. -From wxWindows 2.0 beta 9, both Cygwin and Mingw32 (the minimal -distribution of Cygwin) can be used with the same makefiles. +Both Cygwin and Mingw32 (the minimal distribution of Cygwin) can be used +with the same makefiles. Here are the steps required: - Retrieve and install the latest beta of Cygwin, or Mingw32, as per the instructions with either of these packages. -- If using Mingw32 (including the EGCS variant), you need some - extra files to use the wxWindows makefiles. You can find these - files in ports/mingw32 on the ftp site or CD-ROM, as extra.zip. - These should be extracted to the Mingw32 directory. - If you have already have downloaded bison, flex, make, rm, cp, mv +- If using Mingw32, you need some extra files to use the wxWindows + makefiles. You can find these files in ports/mingw32 on the ftp + site or CD-ROM, as extra.zip. These should be extracted to the Mingw32 + directory. If you have alread downloaded bison, flex, make, rm, cp, mv from elsewhere, you won't need this. - If using Mingw32 2.8.1, see also see mingw32.txt in this directory - (docs/msw) about a fix that has to be applied to a Mingw32 header file. - If using Mingw32 2.95 and below with wxWindows 2.1 or above, you - must hand-patch in Mingw32-gcc295.patches (located in the top-level of the - wxWindows 2 installation). Mingw32 2.95.2 and above contain the - fixes already. + must hand-patch with Mingw32-gcc295.patches (located in the + top-level of the wxWindows 2 installation). Mingw32 2.95.2 + and above contain the fixes already. - Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat) to set up appropriate variables, if necessary mounting drives. @@ -435,12 +517,9 @@ Here are the steps required: supplied). - Edit wx/src/makeg95.env and set the MINGW32 variable at the top of - the file to either 1 (you have Mingw32) or 0 (you have Cygwin32). - If using MINGW32, also set the MINGW32VERSION variable - appropriately. - -- Mingw32 may not support winsock.h, so if you have a problem - here, comment out socket-related files in src/msw/makefile.g95. + the file to either 1 (you have Mingw32 or Cygwin 1.x releases) or 0 + (if you have Cygwin betas). If using Mingw32, also set the + MINGW32VERSION variable appropriately. - Set your WXWIN variable to where wxWindows is installed. *** IMPORTANT: For Cygwin/Mingw32, use forward slashes in the path, not @@ -457,7 +536,7 @@ Here are the steps required: - Use the 'strip' command to reduce executable size. -- With Cygnus Cygwin, you can invoke gdb --nw myfile.exe to +- With Cygwin, you can invoke gdb --nw myfile.exe to debug an executable. If there are memory leaks, they will be flagged when the program quits. @@ -487,9 +566,9 @@ Notes: (a missing bracket). -4. If there's a problem with the copy command in +4. If there's a problem with the copy or remove commands in src/msw/makefile.g95, you may need to change the COPY and - COPYSEP variables in makeg95.env. + RM variables in makeg95.env. 5. If there's a problem executing the windres program, try commenting out RCPREPROCESSOR in makeg95.env. @@ -509,11 +588,10 @@ Notes: References: - - The GNU-WIN32 site is at - http://www.cygnus.com/gnu-win32/ + - The Cygwin site is at + http://sourceware.cygnus.com - Mingw32 is available at: - ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/gcc-2.95/ - - See also http://web.ukonline.co.uk/julian.smart/wxwin/gnuwin32.htm + ftp://www.mingw.org TWIN32 and gcc on Linux ----------------------- @@ -542,5 +620,6 @@ General Notes - If you are installing wxWindows 2 from CVS, you may find that include/wx/msw/setup.h is missing. This is deliberate, to avoid developers' different setup.h configurations getting confused. - Please copy setup0.h to setup.h before compiling. + Please copy setup0.h to setup.h before compiling. Also, read + the BuildCVS.txt for other hints. diff --git a/docs/msw/mingw32.txt b/docs/msw/mingw32.txt deleted file mode 100644 index 934585bc72..0000000000 --- a/docs/msw/mingw32.txt +++ /dev/null @@ -1,32 +0,0 @@ -Return-Path: -Delivered-To: julian.smart@ukonline.co.uk -Delivered-To: fixup-julian.smart@ukonline.co.uk@fixme -Date: Tue, 01 Dec 1998 23:27:18 -0700 -From: "J.Russell Smyth" -X-Accept-Language: en -To: Julian Smart -Subject: fixes for mingw32 - -Julian, - - After 3 hours I have found the problem causing - -..\\..\\include\\wx/string.h:520: warning: ANSI C++ forbids implicit -conversion -from `void *' in assignment - --There is an error in -mingw\lib\gcc-lib\i386-mingw32\2.8.1\include\stdarg.h - -(not a real diff.. dont have win95 diff avail right now) -67c67 -<#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || -defined(__NetBSD__) ---- ->#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || -defined(__NetBSD__)||defined(__WIN32__) - -this fixes it!! I will send a message to the maintainer of mingw to let -him know of this problem. - - diff --git a/docs/msw/readme.txt b/docs/msw/readme.txt index 2ae9f1b797..c6e11e4380 100644 --- a/docs/msw/readme.txt +++ b/docs/msw/readme.txt @@ -1,5 +1,8 @@ -This is the wxWindows for Windows Preview. +This is wxWindows for Windows (wxMSW) +------------------------------------- -For more information, please see changes.txt, todo.txt, and the -manuals. +For information on installing wxWindows, please see install.txt. + +For further information, please see docs/html/index.htm and the +wxWindows reference manual. diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt index a6a72a791f..559ee9e0ac 100644 --- a/docs/msw/todo.txt +++ b/docs/msw/todo.txt @@ -1,6 +1,6 @@ -Todo on wxWin 2.0, Windows platform ------------------------------------ +Todo on wxWin 2, Windows platform +--------------------------------- HIGH PRIORITY ------------- @@ -12,8 +12,6 @@ Add centring, right justify styles to wxStaticText. Extend wxSystemSettings to get symbols for current nationality, e.g. ',' instead of '.' for decimal points. -Supply correct ctl3d/odbc lib files for BC++, Watcom (corrupt?) - wxToolTip::Enable should be static for wxGTK compatibility (VZ) LOW PRIORITY (MEDIUM TERM) @@ -21,53 +19,19 @@ LOW PRIORITY (MEDIUM TERM) Supply VC++ project generator utility. -Convert remaining utilities e.g. wxGraphLayout. - More wxSystemSettings (see comment in settings.cpp). -Synchronize drawing functions on all platforms, using Chris's -code to test them. - Shell function to invoke a document with open, print, whatever... Write tutorial. Add wxDC::DeviceToLogical -> wxPoint etc (convenience accessors). -Generic makefiles? Rewrite makefiles to maintain simultaneous debug/release -objects. - -Add a wxTabCtrl sample. - -Improve printing. More API functions for printer DCs (to get -printer characteristics) and more reliable printing framework. - Add GetIcon, GetBitmap to wxImageList. Perhaps store bitmaps in image list so we can get them later. Merge dib.cpp, dibutils.cpp (see also some DIB code in bitmap.cpp). -Debug PNG support in wxBitmap (no 4-bit support), and possibly add a convertor from PNG -to HICON. We could perhaps also support inclusion of PNGs into -a .res file as a custom resource. - -Fonts: ability to enumerate them. - -Angled text. - -Think about reimplementing wxBitmapButton, wxStaticBitmap using -BS_BITMAP, SS_BITMAP - but this may not allow wxBitmap -argument, so instead just allow controls loaded from native -resource to deal with this style and call default processing. - -wxWizard class? - -Doc/view - have some standard views/docs e.g. wxTextView. - -Miscellaneous file/system function wrappers. - -Bug database. - Menu bitmaps - document Vadim's enhancements. wxCreateDynamicObject is apparently slow: ~ 2000 calls to strcmp. Need to @@ -76,25 +40,11 @@ use some kind of hash table scheme. Write wxDisplay class for querying settings and passing to wxFrame to mirror the X situation (multiple displays). -Write translator between old and new .wxr formats (including -substituting static text for obsolete labels). - -Write more validators. Also, how do they work if loading the -dialog from a .wxr? Could call SetValidator from within -InitDialog for all controls, then call TransferDataToWindow. - -Classes for file/OS utility functions. - -Add support for more static controls e.g. wxStaticLine. - Perhaps rewrite wxFile to use FILE* descriptors, so Eof and Flush can work. Find out how to set wxFileDialog position. -Maybe bundle Andrew Tucker's DBWIN32 with wxWindows (it's only -26KB), for viewing debug messages without a debugger. - Implement wxDC floating point transformations. A wxDC function (or two) for drawing 3D edges? @@ -102,15 +52,10 @@ A wxDC function (or two) for drawing 3D edges? LOW PRIORITY (LONG TERM) ------------------------ -Improve and expand wxSizer classes. - ActiveX support Look at porting to WinCE -Enhance Tex2RTF to generate Microsoft HTML help, perhaps Netscape -HTML help also. - GDI objects could be optimised further in constructors by searching for a matching, pre-existing object, and assigning from that, thus sharing the internal handle. A problem with this @@ -138,4 +83,3 @@ different platforms. Rich text class. - diff --git a/docs/readme.txt b/docs/readme.txt index c3f7ac1b6c..d79be43869 100644 --- a/docs/readme.txt +++ b/docs/readme.txt @@ -1,5 +1,8 @@ -wxWindows 2.1.14 ----------------- +wxWindows 2.2.9 +--------------- + +README +------ Welcome to wxWindows 2, a sophisticated cross-platform C++ framework for writing advanced GUI applications using (where @@ -12,27 +15,17 @@ and facilities for writing TCP/IP applications, thread handling, and more. Where certain features are not available on a platform, such as MDI and tree controls on Unix, they are emulated. -A detailed 1100-page reference manual is supplied in HTML, PDF and +A detailed 1400-page reference manual is supplied in HTML, PDF and Windows Help form: see the docs hierarchy. -For a quick start, point your Web browser at docs/html/index.htm for a list of -important documents and samples. +For a quick start, point your Web browser at docs/html/index.htm for a +list of important documents and samples. Changes in this release ----------------------- Please see changes.txt for details. -Note that there is a new contrib hierarchy for contributions, -which mirrors the regular wxWindows hierarchy. The Object -Graphics Library and MMedia library have been moved under -contrib, so you may need to change your makefiles or project -files, together with your source files. E.g. change #include "ogl.h" -to #include . - -Also VC++ project files and makefiles have been made more -consistent, so some paths and library names have changed. - Platforms supported ------------------- @@ -44,79 +37,110 @@ wxWindows 2 currently supports the following platforms: - Mac (not covered here: please see the wxWindows web site for details) +Additionally, the wxBase library containing only the non GUI classes can be +built under Unix/Win32 and (with some limitation) BeOS. + Most popular C++ compilers are supported; see the install.txt file for each platform (available via docs/html/index.htm) for details. +See also http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/platform.html. Files ----- -The distribution is available in a number of formats. -The most convenient is the platform-specific distribution, -but the zip set forms a more complete distribution, for example if -you wish to take part in wxWindows development. Also, add-ons -such as OGL may only be available in zip form. - -Zip set -------- - -Depending on what you downloaded, you may have one or more of -these ports. You may unarchive any or all of the ports into -the same directory hierarchy. The zip archive set comprises the -following, where x is the minor version and y the release number: - -wx2_x_y_gen.zip Generic source code and samples (required) -wx2_x_y_msw.zip Windows-specific source code -wx2_x_y_mot.zip Motif-specific source code -wx2_x_y_gtk.zip GTK-specific source code -wx2_x_y_stubs.zip Stubs ('empty port') source. Needs - wx2_x_y_gen.zip/tgz. -wx2_x_y_doc.zip Documentation source code (not required) -wx2_x_y_hlp.zip WinHelp documentation -wx2_x_y_pdf.zip Acrobat PDF documentation -wx2_x_y_htm.zip HTML documentation -wx2_x_y_vc.zip MS VC++ 5/6 project files -wx2_x_y_bc.zip Borland C++ 5 project files -wx2_x_y_cw.zip Metrowerks CodeWarrior 4.1 project files -jpeg.zip Optional JPEG library -tiff.zip Optional TIFF library -ogl3.zip Optional Object Graphics Library -mmedia.zip Optional MMedia class library (Motif, GTK, MSW) -stc.zip Optional wxStyledTextCtrl library (Motif, GTK, MSW) -tex2rtf2.zip Tex2RTF documentation tool +The distribution is available in archive formats appropriate to the +target system. Documentation is available mainly in zip format. +Some add-on libraries (such as the Object Graphics Library) are +available in zip form only. In the following, x.y.z represents +the current version number (for example, 2.2.3). wxWindows for GTK distribution ------------------------------ -wxGTK-2.x.y.tgz wxGTK source distribution. You will - need the HTML and/or PDF documentation - from the zip set (above). +wxGTK-x.y.z.tgz wxGTK source distribution. You will + need the HTML, HTB and/or PDF documentation + (see below) +wxGTK-demos-x.y.z.tgz wxGTK demos source +wxGTK-samples-x.y.z.tgz wxGTK samples source +wxGTK-x.y.z-0.src.rpm wxGTK Linux source as an RPM, without manuals +wxGTK-x.y.z-0.i386.rpm wxGTK Linux binaries as an RPM, without manuals +wxGTK-devel-x.y.z-0.i386.rpm wxGTK Linux minimum development system as an RPM wxWindows for Motif distribution -------------------------------- -wxMotif-2.x.y.tgz wxMotif source distribution. You will - need the HTML and/or PDF documentation - -- OR -- from the zip set (above). +wxMotif-x.y.z.tgz wxMotif source distribution. Contains + TIFF, JPEG, Tex2RTF source plus HTML + documentation. -wx2_x_y_gen.zip -wx2_x_y_mot.zip -jpeg.zip -tiff.zip +wxWindows for MS Windows distribution +------------------------------------- -wxWindows for Windows distribution ----------------------------------- +setup.exe, setup.w* Setup files (Windows 95/98, NT) + in floppy-disk-sized chunks +wxMSW-x.y.z-setup.zip Zip archive containing the + setup files +wxMSW-x.y.z.zip Zip archive containing all the + files that are in the setup + distribution -As well as the core source, the Windows setup contains: +As well as the core source, the wxMSW distribution contains: -- Windows Help versions of the documentation (docs/winhelp); -- wxGLCanvas (OpenGL integration, in utils/glcanvas); -- OGL 3 (Object Graphics Library, in utils/ogl); -- wxTreeLayout (for tree drawing, in utils/wxtree); +- Windows HTML Help versions of the documentation (docs/htmlhelp); +- Object Graphics Library, in contrib/src/ogl; - a Dialog Editor binary; -- the JPEG library. +- a Tex2RTF binary; +- Life! sample binary; +- the JPEG library source; +- the TIFF library source. -setup.exe Setup file (Windows 95/98, NT) -setup.* Other setup files +wxBase (wxWindows without GUI) distribution +------------------------------------------- + +wxBase-x.y.z.tgz wxBase source distribution (the same files +wxBase-x.y.z.zip but compressed using different formats) + +wxBase-x.y.z-0.i386.rpm wxBase Linux binaries as an RPM +wxBase-x.y.z-0.src.rpm source for the i386 RPM above +wxBase-devel-x.y.z-0.i386.rpm wxBase headers (requires wxBase.rpm) + +wxBase doesn't include the documentation as you are likely to already have it +from either wxGTK or wxMSW distributions. If you don't, please download the +manual separately. + +NB: you can also build wxBase from the files included in either wxMSW or wxGTK + distribution (follow the same instructions as for wxBase distribution in + doc/base/install.txt) + +Documentation files +------------------- + +wxWindows-x.y.z-WinHelp.zip WinHelp documentation +wxWindows-x.y.z-PDF.zip Acrobat PDF documentation +wxWindows-x.y.z-HTML.zip HTML documentation +wxWindows-x.y.z-HTMLHelp.zip Windows HTML Help documentation +wxWindows-x.y.z-HTB.zip wxHTML documentation (for + use with the helpview utility) +wxWindows-x.y.z-Word.zip MS Word documentation (currently, + database class documentation only) +wxWindows-x.y.z-DocSource.zip Documentation source code (not required) + +Add-ons +------- + +wxWindows-x.y.z-cw.zip Metrowerks CodeWarrior 4.1 project files +wxWindows-x.y.z-wat.zip Watcom C++ project files +wxWindows-x.y.z-vc.zip Visual C++ project files (in wxMSW distr.) +wxWindows-x.y.z-bc.zip Borland C++ project files (in wxMSW distr.) +jpeg.zip JPEG library (already included + in most distributions) +tiff.zip TIFF library (already included + in most distributions) +ogl3.zip Optional Object Graphics Library +mmedia.zip Optional MMedia library (Motif, GTK, MSW) +stc.zip Optional wxStyledTextCtrl library + (Motif, GTK, MSW) +tex2rtf2.zip Tex2RTF documentation tool +wxGTK-gl-x.y.z-0.i386.rpm add-on OpenGL binary as an RPM Installation ------------ @@ -126,6 +150,7 @@ the samples or write your own applications. For installation information, please see the install.txt file in the individual directories: + docs/base docs/msw docs/gtk docs/motif @@ -168,7 +193,6 @@ If you use JPEG image handler, documentation for your program should contain following sentence: "This software is based in part on the work of the Independent JPEG Group". See src/jpeg/README for details. - Documentation ------------- @@ -203,9 +227,9 @@ The main wxWindows ftp site is at: A wxWindows CD-ROM with the latest distribution plus an HTML front-end and hundreds of MB of compilers, utilities and other material may be ordered from the CD-ROM page (see the wxWindows -web site) or contact Julian Smart . +web site) or contact Julian Smart . Good luck! -The wxWindows Team, 19 March, 2000 +The wxWindows Team, September, 2001 diff --git a/docs/tech/index.txt b/docs/tech/index.txt index 12ddc25678..f9174d1d8d 100644 --- a/docs/tech/index.txt +++ b/docs/tech/index.txt @@ -1,5 +1,12 @@ TN0001 How to add a new sample TN0002 wxWindows translator guide TN0003 Adding wxWindows class documentation +TN0004 Compiling a sample in the C++Builder IDE +TN0005 Adding a wxWindows contribution +TN0006 Making and installing RPMs for wxWindows +TN0007 Using and modifying the BC++ IDE files +TN0008 How to learn wxWindows programming +TN0009 Creating and converting icons +TN0010 Compiling wxWindows applications in the VC++ IDE Version: $Id$ diff --git a/docs/tech/tn0003.txt b/docs/tech/tn0003.txt index 57cab689b1..13d9367301 100644 --- a/docs/tech/tn0003.txt +++ b/docs/tech/tn0003.txt @@ -45,6 +45,15 @@ For Word RTF: tex2rtf manual.tex manual.rtf -rtf -twice +If you wish to have a GUI display show the status of what is happening +as the conversion is happening, use the '-interactive' command line +parameter, and then choose FILE|GO from the menu. For example: + + tex2rtf manual.tex manual.rtf -rtf -twice -interactive + +NOTE: You must be using the latest tex2rtf which was released with +v2.2.0 of wxWindowsto use the -interactive switch + If you wish to generate documentation for wxHTML Help Viewer (or Windows HTML Help), set htmlWorkshopFiles to true in your tex2rtf.ini file. See also the wxHTML Notes section in the diff --git a/docs/tech/tn0004.htm b/docs/tech/tn0004.htm new file mode 100644 index 0000000000..59fd68658e --- /dev/null +++ b/docs/tech/tn0004.htm @@ -0,0 +1,218 @@ + + + + + + + Compiling wx Samples in the Borland IDE + + + +

    +Compiling wxWindows samples with the Borland CBuilder

    + +This document is available online here.

    + +

    +Before you begin

    +This refers to the 2.1.15 wxWindows distribution. It is my account of trying +to compile the samples so I can use the Borland IDE to edit/compile/debug. +I have used CBuilder 1.00 (2 patches, nice and fast) CBuilder 3 (slower) +and CBuilder 4 (only occasionally) +

    Make sure that the wx distribution is extracted to a path with no spaces +in it, and preferably on the root of your drive. Borland's compilers sometimes +have problems with spaces and with the long paths which occur if you try +to place it in a tree like d:\compiler\gui\wx... +

    +Part 1 Build the library

    +Build the wx\wx32.lib and related files using the command line compiler +
    Run a command prompt in the wx/src/msw directory and type +

    set wxwin=pathtowx +
    set bccdir=pathtobc4 +
    make -f makefile.b32 +

    In my case this I extracted the wx distribution in c:\ and the +compiler is in w:\borland\cb\bin so this looks: +

    set wxwin=c:\wx +
    set bccdir=w:\borland\cb +
    make -f makefile.b32 +

    If this doesn't compile, +

      +
    • +you've probably got the set wxwin command wrong,
    • + +
    • +or the path was not set by the Borland setup
    • +
    +If this doesn't link, +
      +
    • +you've probably got the set bccdir command wrong
    • +
    + +
    +

    +To make the samples

    + +

    +Solution 1

    + +

    +Download a zip file which contains modifed +cpp, mak and bpr files - it will overwrite your wx distribution cpp files!

    + +

    +Solution 2

    +Creating the files by hand . This is for the calendar sample; you will +have to change the names for the other samples +
      +
    • +Create a calendar.mak file [must have the same name as the cpp file] in +a plain text editor with this contents
    • +
    +#----------------------------------------------------------------------------- +
    #this is for Borland CBuilder IDE v1 and 3 +
    #add a \ at the end of the lines if you editor breaks the long +lines up +
    #copy this into notepad and save from there +
    #----------------------------------------------------------------------------- +
    !ifndef BCB +
    BCB = $(MAKEDIR)\.. +
    !endif +
    PROJECT = calendar.exe +
    OBJFILES = +
    RESFILES = calendar.res +
    RESDEPEN = $(RESFILES) +
    LIBFILES = +
    #----------------------------------------------------------------------------- +
    CFLAG1 = -Od -v -a1 -c +
    # -Od disable optimisations -v debug -a1 byte align -c compile +only (matches my make for the library) +
    CFLAG2 = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32;__BIDE__;-I$(BCB)\include;$(BCB)\include\vcl;..\..\include; +-H=BC32.CSM +
    PFLAGS = +
    RFLAGS = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32;__BIDE__; +-I$(BCB)\include;..\..\include; +
    LFLAGS = -L$(BCB)\lib;$(BCB)\lib\obj;..\..\lib -aa -Tpe -v -V4.0 +-c +
    IFLAGS = +
    LINKER = ilink32 +
    #----------------------------------------------------------------------------- +
    ALLOBJ = c0w32.obj $(OBJFILES) +
    ALLRES = $(RESFILES) +
    ALLLIB = $(LIBFILES) vcl.lib xpm.lib wx32.lib ole2w32.lib import32.lib +odbc32.lib cw32mt.lib +
    #you will need to add other libraries to the line above, eg the +jpeg.lib for image samples +
    --------------------------------------------------------------------------- +
    .autodepend +
      +

    #----------------------------------------------------------------------------- +
    $(PROJECT): $(OBJFILES) $(RESDEPEN) +

    #end of file +
      +

      +
    • + modify the .cpp file to include these +lines near the top
    • +
    +#ifdef __BIDE__ +
    #define _NO_VCL +
    #include "condefs.h" +
    #define WinMain WinMain +
       // USEUNIT ("another.cpp"); // use a line like this +if you have more than one .cpp file +
        USERC ("calendar.rc"); +
    #endif +
      +

    In CBuilder 1 you can use Open Project to open the mak file and +edit/compile/debug. +
    In CBuilder 3 and 4, then you can use Open Project and choose +the Open Borland CBuilder 1 Project from the drop down file types. The +system will modify the mak file and update it for you. +

    Now try compiling it in the ide. +

    +Hints:

    + +
      +
    • +You can set it up for normal and debug modes (change the -v switch in CFLAG1  +and LFLAG)
    • + +
    • +If you get problems saying Project undefined, then copy the text using +a simple editor like notepad to the file minimal.mak (I have had problems +in CBuilder 1.00 with Unix style line endings)
    • + +
    • +If you want to avoid the warnings about hiding virtual methods add -w-hid +to the CFLAGS1 line
    • + +
    • +the #define WinMain WinMain line allows CBuilder to think it has a non-VCL +main function
    • + +
    • +the USEUNIT macros tell CBuilder which other source files to include, without +needing a VCL form
    • + +
    • +the condefs.h file defines the USEUNIT macros for non-VCL use
    • + +
    • +For the other samples, change the names of the cpp and rc files. If you +have multiple files, just add more USEUNIT and USERC macros
    • +
    + +

    +Solution 3

    + +
      +
    • +download the wxWindows-2.1.15-bcb.zip file,
    • + +
    • +extract it
    • + +
    • +use the idetomak (CBuilder 1) or  idetobpr +(CBuilder 3/4) utility on the .ide file in the samples +directory. This modifies the cpp source and makes a "suitable" bpr file +(at least in CBuilder 1/3/4).
    • + +
    • +add the location of the wx/include files in the  project | options +| directory dialog
    • +
    +I found in CBuilder 1 that the idetomak utility did not manage +to convert all the samples, but idetobpr worked OK in CBuilder +3 and 4. I have a report that not all the bpr files made inb CBuilder 4 +are correct +

    +Error with ODBC32

    +Sometimes you get an error saying that there are unreolved externals in +ODBC. The soltuion is to run a command prompt in your wx\lib directory +and use the implib command: +

    C:\wx\lib>implib odbc32 c:\windows\system\odbc32.dll +

    This creates the necessary library, odbc32.lib +

    +Unresolved Problem

    +In Borland CBuilder 1.00 (with linker service patch)  I frequently +get an error +

    Turbo Incremental Link  Version 1.0 Copyright (c) 1997 Borland +International +
    Fatal: Assertion failed: typeInx < typeCnt at "ilinkdbg.c", +line 2060 +
    Fatal: Access violation.  Program terminated. +
    Error: Internal failure -- retrying link... +
    Fatal: Assertion failed: typeInx < typeCnt at "ilinkdbg.c", +line 2060 +
    Fatal: Access violation.  Program terminated. +

    ** error 2 ** deleting minimal.exe +

    I have not been able to track down why sometimes this error occurs and +other times it is OK +
    I have not seen this in Cbuilder 3 or 4 +

    +


    +

    Page updated on 31 May 2000 by Chris Elliott + + diff --git a/docs/tech/tn0005.txt b/docs/tech/tn0005.txt new file mode 100644 index 0000000000..db4a67275d --- /dev/null +++ b/docs/tech/tn0005.txt @@ -0,0 +1,66 @@ + Adding a wxWindows contribution + =============================== + +Here are some different kinds of contribution: + +1. Bug fixes. You can send these to the wx-devel list. +2. New classes. New classes normally go in the contrib hierarchy: + please see below for more details. They may be promoted to + the main wxWindows hierarchy if they are deemed to be 'core'. +3. A utility application, such as a new dialog editor or + file format conversion utility. If adding to the CVS + archive, you may put it under the utils hierarchy, + preferably with further src and docs directories. + +You may or may not wish to add your code to the main wxWindows CVS +archive. Whether your code is appropriate for this archive +should first be ascertained by discussing it on wx-devel@wxwindows.org. + +The contrib hierarchy +--------------------- + +When contributing a new class or set of classes, please +organise your files in the following hierarchy, so that +when a user unarchives your contribution, it +slots neatly into the existing source hierarchy. +It also simplifies compilation for users, since wxWindows +makefiles and project files are set up to search in +contrib/include/wx and contrib/lib. For example, to +include yourclass.h, the following directive is used: + +#include "wx/yourclass/yourclass.h" + +Here are the directories: + +contrib/include/wx/yourclass/ ; Your header(s) go here +contrib/src/yourclass/ ; Your source file(s) go here +contrib/samples/yourclass/ ; Your sample(s) go here +contrib/docs/latex/yourclass/ ; Your Latex doc sources go here +contrib/docs/html/yourclass/ ; Your HTML doc files go here +contrib/docs/htmlhelp/yourclass/ ; Your MS HTML Help doc files go here +contrib/docs/htb/yourclass/ ; Your wxHTML doc files go here +contrib/docs/pdf/yourclass/ ; Your PDF doc files go here +contrib/docs/winhelp/yourclass/ ; Your WinHelp doc files go here + +It is recommended that you produce a manual using Tex2RTF, as specified +in Technical Note TN0003. This allows you to output all the above +formats, though for PDF you will need Latex and Ghostscript or +Word and Adobe Acrobat, and for MS HTML Help and WinHelp you need +the appropriate (freely available) help compilers. + +Your binary library files can go in the main lib directory or contrib/lib, +but the main lib directory is recommended. + +Please include a readme.txt in your source directory, and conform +as much as possible to the coding guidelines specified on the web +site in the 'Backroom' section. Include as many makefiles as +possible for different compilers. + +Your archive can be in .tgz or .zip format. For inclusion on +the wxWindows ftp site and CD-ROM, please send your submission to +Julian Smart as a binary attachment. +An entry will be added to the Contributions web page. + +Author: Julian Smart +Version: $Id$ + diff --git a/docs/tech/tn0006.txt b/docs/tech/tn0006.txt new file mode 100644 index 0000000000..295939c128 --- /dev/null +++ b/docs/tech/tn0006.txt @@ -0,0 +1,41 @@ +How to make RPMs of the wxWindows sources +========================================= + +This is just a short description. It is assumed that you know what you are +doing. I do not take any responsibility for damaged systems, use at your own +risk! + + 1. Extract the archive in a temporary directory. Since you are + reading this text, you already have done this. + 2. Copy the .spec file to + (rpm-dir)/SPECS + 3. Copy the .tgz file to + (rpm-dir)/SOURCES + 4. Start the RPM manager with + rpm -bb (rpm-dir)/SPECS/(.spec-file) + or with + rpm -ba (rpm-dir)/SPECS/(.spec-file) + (the latter also builds the .src.rpm-file) + 5. You now have a nice set of RPMs in (rpm-dir)/RPMS + +Example +======= + +Here's how to install e.g. wxMotif 2.1.14: + + cp wxMotif.spec /usr/src/packages/SPECS + cp wxMotif-2.1.14.tgz /usr/src/packages/SOURCES + rpm -bb /usr/src/packages/SPECS/wxMotif.spec + +Install the resulting packages with + + rpm --install /usr/src/packages/RPMS/i386/wxMotif-2.1.14-0.i386.rpm + rpm --install /usr/src/packages/RPMS/i386/wxMotif-devel-2.1.14-0.i386.rpm + rpm --install /usr/src/packages/RPMS/i386/wxMotif-gl-2.1.14-0.i386.rpm + + + +That's all. You should now have a working wxWindows library. + +Regards, + Robert Fendt diff --git a/docs/msw/bc_ide.txt b/docs/tech/tn0007.txt similarity index 58% rename from docs/msw/bc_ide.txt rename to docs/tech/tn0007.txt index d0e0e59b7f..2d646b9976 100644 --- a/docs/msw/bc_ide.txt +++ b/docs/tech/tn0007.txt @@ -1,13 +1,16 @@ +Using and modifying the BC++ IDE files +====================================== + Readme for wxWindows 2.0 Ide-files First release Feb. 1999, detlev@reymann-online.de -1. What you can do with this IDE files +1. What you can do with the BC++ IDE files 2. Where to install the files 3. How to modify them for your own needs 4. How to create IDE files for your own wxWindows-programs -1. What you can do with this IDE files -====================================== +1. What you can do with the IDE files +===================================== There are two IDE files. src\bc32.ide should help you to create the wxWindows libraries from within the Ide of Borlands @@ -40,14 +43,14 @@ $inherit-macro (Julian found the trick), this should work. To add a new sample to samples\bc32.ide, follow these steps: -a. Choose Project->New target... and type in e.g. +1. Choose Project->New target... and type in e.g. samples\newsample. Press OK. -b. Static, no OWL, MFC or class libraries. Check Multithread +2. Static, no OWL, MFC or class libraries. Check Multithread on. Press OK. -c. Right-click on the new node, choose Add node... and add +3. Right-click on the new node, choose Add node... and add ..\lib\wx32.lib and ..\lib\xpm.lib. Add any other source files you require. -d. Right-click on the new node, choose Edit Local Options.. and +4. Right-click on the new node, choose Edit Local Options.. and add in Directories, specify the following: Include: $inherit;.\newsample @@ -59,22 +62,21 @@ d. Right-click on the new node, choose Edit Local Options.. and 4. How to create IDE files for your own wxWindows-programs ========================================================== -I think you are familiar with the necessary options for your own -program. So I will only describe what is neccessary to link -yout program with the wxWindows library. If you want to create -an IDE file for your own wxWindows program, create a new project -from the menu file->new->project. Deactivate all the -standard-options, the only three thing that should be activated is -"static" for the libraries, if you want to use the library -produced with the library-ide, the checkbox OLE (you can -leave this checkbox unchecked, but then you have to add the -library \bc5\lib\ole2w32.lib to your project), and the -Multithread checkbox. You have to add -the include-path of wxWindows to the include-path in the -options-dialog (options->project->directories->include). The -result should be something like: -path_of_my_program;\bc5\include;\wxwin2\include; Then you have -to add the libraries to the project. Open the project-view and -activate your program. Then right-click and choose "add" and -select the wxWindows library (e.g. \wxwin\lib\wx32.lib). Also -add the xpm library. +If you want to create an IDE file for your own wxWindows program, +please follow these steps. + +1. Create a new project from the menu file->new->project. +2. Deactivate all the standard-options, the only three things + that should be activated are "static" for the libraries, + the checkbox OLE (you can leave this checkbox unchecked, + but then you have to add the library \bc5\lib\ole2w32.lib + to your project), and the Multithread checkbox. +3. Add the include-path of wxWindows to the include-path in the + options-dialog (options->project->directories->include). The + result should be something like: + path_of_my_program;\bc5\include;\wxwin2\include; +4. Add the libraries to the project. Open the project-view and + activate your program. Then right-click and choose "add" and + select the wxWindows library (e.g. \wxwin\lib\wx32.lib). Also + add the xpm library. + diff --git a/docs/tech/tn0008.htm b/docs/tech/tn0008.htm new file mode 100644 index 0000000000..dcbc731c92 --- /dev/null +++ b/docs/tech/tn0008.htm @@ -0,0 +1,144 @@ + + + +How to learn wxWindows programming + + + + + + + + +

    - + + wxWindows Book
    + + + +
    + +How to learn wxWindows programming + +
    + +

    + +The following is a response by Edward Ream to a common question, +"What's the best way to learn wxWindows [and C++]?".

    + +Date: Sun, 04 Jun 2000 14:37:06 -0500
    +From: "Edward K. Ream"
    +To: wx-users@wxwindows.org
    +Subject: Re: [wx-users] How to learn using wx-windows
    +Reply-To: wx-users@wxwindows.org

    + +> Reading the Linux Journal article on wxpython, and having used wxclips
    +> I got interested in wxwindows as a development interface. However, the
    +> programming experience I got is old, and from a former generation (For-
    +> tran). I'd like to refresh my experience and start in C++. Will
    +> wx-windows be a very high step to take?

    + +I'm new to wxWindows myself, but I'd like to answer this question +anyway. In the past two years I've learned two similar frameworks +(Apple's Yellow Box, aka NextStep/OpenStep and Borland's C++ +Builder/Delphi) and last year I became a C++ enthusiast after 20 years +of using C.

    + +About C++.

    + +The major Aha for me was that the complexity of C++ doesn't matter in +practice. What _does_ matter is that C++ allows you to do simple things +simply, more simply than C. With a system like wxWindows you will be +creating objects and then using those objects to call methods. So don't +be afraid of C++: you'll only be using the easy tip of the +iceberg.

    + +Besides the C++ Programming Language, by Bjarne Stroustrup, the +"official" guide to C++, I highly recommend Inside the C++ Object Model, +by Stanley B. Lippman. (Lipmann was one of the C++ honchos at Bell +Labs.) This book will tell you what _not_ to do, as well as why +everything in C++ is as it is. If you are confused by anything in C++, +Lippman's book is the cure.

    + +About applications frameworks.

    + +Application frameworks such as wxWindows are organized around a set of +cooperating classes. Take a look at the main application class, wxApp, +some frame and panel classes, graphics classes, menu classes, control +classes, etc. In general, to do anything in a framework involves +creating an object of the specified type, then doing something with that +object.

    + +For example, suppose you want to create a menu bar. A menu bar is +composed of a single menu bar object of type(class) wxMenuBar that +contains menu objects of type wxMenu. Each menu object contains menu +item objects of type wxMenuItem. So you create the menu bar object, +then create all the menu objects (creating the menu item objects along +the way) and finally "attach" the menu objects to the menu bar object +using a call to the wxMenuBar::Append method.

    + +As an overview I would look at the "Alphabetical class reference" +section of the reference manual. I find the HTML version to be the +easiest to use: you can browse very quickly through it. Here's how to +read this (very large) reference:

    + +

      +
    1. Get an overview of the kinds of classes involved. The class names +will tell you a lot about what each class does. Open some of the +classes, in particular, wxApp (the main application object), wxFrame, +wxControl (the base class for all controls) and one or two controls, +like wxButton. + +
    2. When scanning a class for the first several times, read the +introductory remarks and quickly scan the list of methods of the class +to get a general idea about what kinds of operations can be done to +objects of the class. You are not looking for detail at this stage, +just for the big picture. In particular, what classes exist and how do +they work together. + +
    3. Pay particular attention to the classes from which a class is +derived. For example, a button (an object of type wxButton) is derived +from the wxControl, wxWindow, wxEvtHandler and wxObject classes. What +does this mean? It means that a button _is_ a control, and a button +_is_ a window, and a button _is_ an event handler and a button _is_ an +object. So you must understand the parent classes of an object to +understand the object itself. + +For example, if b is a button you can invoke b.m for any of method m of +the wxControl, wxWindow, wxEvtHandler or wxObject classes. You are not +limited to just the methods of wxButton! This is one of the keys of +object oriented programming. +
    + +Some other tips:

    + +Read some sample code. You will find that almost none of the C++ +language is actually being used; it's just endlessly creating objects +and then calling methods using those objects.

    + +Learn as much as you can about the String class; after using a good +String class you'll never want to use C's string functions again. +wxWindows contains other nifty utilty classes as well.

    + +The application class, wxApp, contains the main event loop. Learn about +event handling and event tables (reading sample code will help). Almost +everything in this kind of application framework happens as the result +of an event and your app is essentially doing nothing but responding to +events. Having the event loop written for you is a major, major +benefit.

    + +I hope this helps. Perhaps we can work together in learning about +wxWindows. Please feel free to ask me any questions you might have. If +I've made any blunders in this posting I hope the wxWindows experts will +correct me gently.

    + +Edward
    +--------------------------------------------------------------------
    +Edward K. Ream email: edream@tds.net
    +Leo: Literate Editor with Outlines
    +Leo: http://personalpages.tds.net/~edream/front.html
    +--------------------------------------------------------------------

    + + + + + diff --git a/docs/tech/tn0009.htm b/docs/tech/tn0009.htm new file mode 100644 index 0000000000..3bafb059fa --- /dev/null +++ b/docs/tech/tn0009.htm @@ -0,0 +1,60 @@ + + + +Creating and converting icons + + + + + + + + + + + + +
    + +Creating and converting icons + +
    + +

    + +Icons are bitmaps that may contain transparency information. Under X, icons are +usually created from XPM files, which may be loaded from a file or created from +data embedded in a C++ source file.

    + +Under Windows, icon files (extension .ico) may contain multiple icons for different sizes and colour +depths, and can be loaded from a file or loaded from the Windows resources compiled +into the executable.

    + +You can decide to use only XPMs on Windows and Unix, or you could use XPMs on Unix and +Windows icons under Windows -- the latter will require some #idefs in your code or use of the wxICON macro.

    + +If you are using a compiler such as Borland C++, Visual C++ or Watcom C++, you +can use the provided icon editor. However, if using Cygwin or Mingw32, there +is no icon editor so you must obtain one separately, such as IconEdit32.

    + +To convert from XPM to BMP (which can be loaded or pasted into an icon editor to save as an ICO file), +you can use Vadim Zeitlin's xpm2bmp.exe utility. +To convert from BMP to XPM, you can use bmp2xpm.exe +which is actually the old wxWindows 1.68 utility, xpmshow. You will have to edit the resulting +file since the full path is used as the variable name, plus you may wish to specify a transparent colour e.g.:

    + +

    +"  s None  c None",
    +
    + +This will indicate that the space character will be taken as the transparent colour throughout the image.

    + + + + + + + diff --git a/docs/tech/tn0010.htm b/docs/tech/tn0010.htm new file mode 100644 index 0000000000..f5051266bd --- /dev/null +++ b/docs/tech/tn0010.htm @@ -0,0 +1,282 @@ + + + +Compiling wxWindows applications in the VC++ IDE + + + + + + + + + + + + + +
    + +Compiling wxWindows applications in the VC++ IDE + +
    + +

    + +

    +Settings for wxWindows 2 / Settings for wxWindows 1.68 +
    + +

    + +To compile wxWindows samples and applications using the VC++ 5.0 or 6.0 IDE (having compiled wxWindows +using the makefile or project file provided), the following +steps and settings should be used.

    + +

    Steps

    + +
      +
    1. Create a new WIN32 Application project. +
    2. Add the .cpp and .rc files for your project. +
    3. Apply the settings listed below to the project, replacing c:\wx2 with your wxWindows +installation path. +
    + +

    + +

    Settings for wxWindows 2

    + +These settings apply to wxWindows 2.1.14 and above.

    + +

    +
    General
    +The Output files and Intermediate files directory fields should be Debug +for the Debug configuration, and Release for the Release configuration.

    + +

    Debug: General
    +The Executable for debug sessions field should be altered to be the path and name +you'd expect (it may have generated a different name).

    + +

    C/C++: Preprocessor
    +The Preprocessor definitions field should contain the following symbols for Debug:

    + +

    +WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=1,
    +__WIN95__,__WIN32__,WINVER=0x0400,STRICT
    +
    +

    +and these for Release:

    + +

    +NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN95__,__WIN32__,
    +WINVER=0x0400,STRICT
    +

    +The Additional include directories field should contain the following:

    +

    +c:\wx2\include,c:\wx2\contrib\include
    +
    +

    (and of couse any other directories you wish to use in your project).

    + +

    C/C++: Precompiled Headers
    + +The Not using precompiled headers or Automatic use of precompiled headers +button should be selected.

    + +

    C/C++: Code Generation
    + +The Use run-time library control should be set to Debug Multithreaded DLL (Debug) +or Multithreaded DLL (Release).

    + +

    Link: Input
    + +The Object/library modules field should contain: + +
    +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
    +ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib
    +winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib
    +
    + +for the Debug configuration and + +
    +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
    +ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib
    +winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib
    +
    + +for the Release configuration.

    + +The Ignore libraries field should contain: + +

    +libcd.lib,libcid.lib,msvcrt.lib
    +
    + +for the Debug configuration and + +
    +libc.lib,libci.lib,msvcrtd.lib
    +
    + +for the Release configuration.

    + +The Additional library path field should contain + +

    +c:\wx2\lib,c:\wx2\contrib\lib
    +
    + +for both Debug and Release configurations. + +

    + +

    Resources
    + +Select your .rc file. The Additional resource include directories field should contain: + +
    +c:\wx2\include;c:\wx2\contrib\include
    +
    + +
    + +
    + +

    Settings for wxWindows 1.68

    + +Note: these have not yet been checked.

    + +

    +
    Debug: General
    +The Executable for debug sessions field should be altered to be the path and name +you'd expect (it may have generated a different name).

    + +

    General
    +The Output directories fields can be made blank if you want the objects +and executable to be created in the project directory and not a subdirectory.

    + +

    C/C++: Preprocessor
    +The Preprocessor definitions field should contain the following symbols:

    +

    +WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=1,WIN95=1,WINVER=0x0400,STRICT
    +
    +

    +The Additional include directories field should contain the following:

    +

    +../../include/base,../../include/msw
    +
    +

    (and of couse any other directories you wish to use in your project).

    + +

    C/C++: Precompiled Headers
    + +The Not using precompiled headers or Automatic use of precompiled headers +button should be selected (I can't find a way of using the wxWindows PCH file).

    + +

    C/C++: Code Generation
    + +The Use run-time library control should be set to Multithreaded DLL. This +sets the compiler switch to /MD to match the wxWindows makefile.

    + +

    Link: Input
    + +The Object/library modules field should contain: + +
    +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
    +shell32.lib odbc32.lib odbccp32.lib comctl32.lib
    +../../lib/wx.lib ../../src/msw/dummy.obj
    +
    + +The Ignore libraries field should contain: + +
    +libcd.lib,libcid.lib
    +
    + +

    + +

    Resources
    + +Select your .rc file. The Additional resource include directories field should contain: + +
    +..\..\include\msw;..\..\contrib\fafa
    +
    + +
    + +

    + + + + + + + + diff --git a/docs/todo.txt b/docs/todo.txt index 1caf48797b..53c2818850 100644 --- a/docs/todo.txt +++ b/docs/todo.txt @@ -14,38 +14,8 @@ Please see also: usage, how many classes of each kind are in use, etc.? That would be neat. -- Documentation: mention include files with each class. - -- Document/update wxTime. - -- Document wxSpinCtrl & wxFontMapper. - -- Fix TCP/IP mode in dde sample (how to use; why does it crash). - - In doc/view file selector, document type is selected by extension, not the type selected in the (Windows) file selector. -- Add all makefiles/documentation for utils/serialize. - -- Implement wxScrolledWindow::OnChar to scroll the window using - the keyboard. - -- Documentation for ODBC classes - -For 2.1: small changes not involving rewriting anything -------------------------------------------------------- - - wxArrayDouble class? -- generate CREATE/DESTROY events just after/before a window (any window, not - just frame/dialog) is created/deleted - -- Dynamic menu handling: wxMenuBar::DeleteMenu(), InsertMenu() - -For 2.2: major new additions -------------------------------------------------------- - -- Unicode support (Win32 only probably) - -- DnD and OLE clipboard, uniform DnD/clipboard handling - diff --git a/include/wx/app.h b/include/wx/app.h index ab9e88a562..5538e053bd 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -380,35 +380,18 @@ public: #define WXAPIENTRY WXFAR wxSTDCALL #endif - // Patch from Mumit Khan to allow DLL compilation under mingw. Note that - // this includes which is a bad thing because it prevents - // wxWindows to work with MFC, so for now I'm making this change for - // mingw/cygwin only (these don't work with MFC yet). GRG Mar/2000 - #if defined(__GNUWIN32__) - #include - #include "wx/msw/winundef.h" + #include + #include "wx/msw/winundef.h" - #define IMPLEMENT_WXWIN_MAIN \ - extern "C" int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);\ - int WINAPI WinMain(HINSTANCE hInstance, \ - HINSTANCE hPrevInstance,\ - LPSTR m_lpCmdLine, int nCmdShow )\ - {\ - return wxEntry((WXHINSTANCE) hInstance, \ - (WXHINSTANCE) hPrevInstance,\ - m_lpCmdLine, nCmdShow);\ - } - #else - #define IMPLEMENT_WXWIN_MAIN \ - int WXAPIENTRY WinMain(HINSTANCE hInstance, \ - HINSTANCE hPrevInstance,\ - LPSTR m_lpCmdLine, int nCmdShow )\ - {\ - return wxEntry((WXHINSTANCE) hInstance, \ - (WXHINSTANCE) hPrevInstance,\ - m_lpCmdLine, nCmdShow);\ - } - #endif + #define IMPLEMENT_WXWIN_MAIN \ + extern "C" int WXAPIENTRY WinMain(HINSTANCE hInstance,\ + HINSTANCE hPrevInstance,\ + LPSTR m_lpCmdLine, int nCmdShow)\ + {\ + return wxEntry((WXHINSTANCE) hInstance,\ + (WXHINSTANCE) hPrevInstance,\ + m_lpCmdLine, nCmdShow);\ + } #else #define IMPLEMENT_WXWIN_MAIN #endif diff --git a/include/wx/arrimpl.cpp b/include/wx/arrimpl.cpp index 585893ccc7..cf1e290613 100644 --- a/include/wx/arrimpl.cpp +++ b/include/wx/arrimpl.cpp @@ -21,7 +21,13 @@ *****************************************************************************/ // needed to resolve the conflict between global T and macro parameter T + +// VC++ can't cope with string concatenation in Unicode mode +#if defined(wxUSE_UNICODE) && wxUSE_UNICODE +#define _WX_ERROR_REMOVE2(x) wxT("bad index in ::RemoveAt()") +#else #define _WX_ERROR_REMOVE2(x) wxT("bad index in " #x "::RemoveAt()") +#endif // macro implements remaining (not inline) methods of template list // (it's private to this file) @@ -51,21 +57,19 @@ name::name(const name& src) \ DoCopy(src); \ } \ \ -void name::Empty() \ +void name::DoEmpty() \ { \ for ( size_t ui = 0; ui < Count(); ui++ ) \ delete (T*)wxBaseArray::Item(ui); \ - \ - wxBaseArray::Clear(); \ } \ \ -void name::RemoveAt(size_t uiIndex) \ +void name::RemoveAt(size_t uiIndex) \ { \ wxCHECK_RET( uiIndex < Count(), _WX_ERROR_REMOVE2(name) ); \ \ delete (T*)wxBaseArray::Item(uiIndex); \ \ - wxBaseArray::RemoveAt(uiIndex); \ + wxBaseArray::RemoveAt(uiIndex); \ } \ \ void name::Add(const T& item) \ diff --git a/include/wx/buffer.h b/include/wx/buffer.h index d64ed386e6..6556f39cd6 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -54,6 +54,7 @@ public: return *this; } + const char *data() const { return m_str; } operator const char *() const { return m_str; } char operator[](size_t n) const { return m_str[n]; } @@ -103,6 +104,7 @@ public: return *this; } + const wchar_t *data() const { return m_wcs; } operator const wchar_t *() const { return m_wcs; } wchar_t operator[](size_t n) const { return m_wcs[n]; } diff --git a/include/wx/calctrl.h b/include/wx/calctrl.h index 337ee8e8c4..16c03fc153 100644 --- a/include/wx/calctrl.h +++ b/include/wx/calctrl.h @@ -139,6 +139,8 @@ protected: private: wxDateTime m_date; wxDateTime::WeekDay m_wday; + + DECLARE_DYNAMIC_CLASS(wxCalendarEvent) }; // ---------------------------------------------------------------------------- diff --git a/include/wx/cmdline.h b/include/wx/cmdline.h index c8bea6105f..771d9596a0 100644 --- a/include/wx/cmdline.h +++ b/include/wx/cmdline.h @@ -32,7 +32,8 @@ enum wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated - wxCMD_LINE_OPTION_HELP = 0x08 // this option is a help request + wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request + wxCMD_LINE_NEEDS_SEPARATOR = 0x10 // must have sep before the value }; // an option value or parameter may be a string (the most common case), a @@ -95,20 +96,20 @@ public: // default ctor or ctor giving the cmd line in either Unix or Win form wxCmdLineParser() { Init(); } - wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); } + wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); } wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); } // the same as above, but also gives the cmd line description - otherwise, // use AddXXX() later wxCmdLineParser(const wxCmdLineEntryDesc *desc) { Init(); SetDesc(desc); } - wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv) + wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); SetDesc(desc); } wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline) { Init(); SetCmdLine(cmdline); SetDesc(desc); } // set cmd line to parse after using one of the ctors which don't do it - void SetCmdLine(int argc, char **argv); + void SetCmdLine(int argc, wxChar **argv); void SetCmdLine(const wxString& cmdline); // not virtual, don't use this class polymorphically diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 840b5ed9a7..936e22190c 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -35,13 +35,13 @@ /// separates group and entry names (probably shouldn't be changed) #ifndef wxCONFIG_PATH_SEPARATOR - #define wxCONFIG_PATH_SEPARATOR '/' + #define wxCONFIG_PATH_SEPARATOR _T('/') #endif /// introduces immutable entries // (i.e. the ones which can't be changed from the local config file) #ifndef wxCONFIG_IMMUTABLE_PREFIX - #define wxCONFIG_IMMUTABLE_PREFIX '!' + #define wxCONFIG_IMMUTABLE_PREFIX _T('!') #endif /// should we use registry instead of configuration files under Windows? @@ -113,7 +113,7 @@ public: long style = 0); // empty but ensures that dtor of all derived classes is virtual - virtual ~wxConfigBase() { } + virtual ~wxConfigBase(); // path management // set current path: if the first character is '/', it's the absolute path, @@ -226,6 +226,7 @@ public: // misc accessors wxString GetAppName() const { return m_appName; } wxString GetVendorName() const { return m_vendorName; } + // Used wxIniConfig to set members in constructor void SetAppName(const wxString& appName) { m_appName = appName; } void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; } @@ -307,12 +308,12 @@ private: $VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and '_' only. '$' must be escaped ('\$') in order to be taken literally. */ -extern wxString wxExpandEnvVars(const wxString &sz); +extern WXDLLEXPORT wxString wxExpandEnvVars(const wxString &sz); /* Split path into parts removing '..' in progress */ -extern void wxSplitPath(wxArrayString& aParts, const wxChar *sz); +extern WXDLLEXPORT void wxSplitPath(wxArrayString& aParts, const wxChar *sz); #endif // _WX_CONFIG_H_ diff --git a/include/wx/cursor.h b/include/wx/cursor.h index f163125fa6..699f982722 100644 --- a/include/wx/cursor.h +++ b/include/wx/cursor.h @@ -21,23 +21,37 @@ /* This is a small class which can be used by all ports to temporarily suspend the busy cursor. Useful in modal dialogs. + + Actually that is not (any longer) quite true.. currently it is + only used in wxGTK Dialog::ShowModal() and now uses static + wxBusyCursor methods that are only implemented for wxGTK so far. + The BusyCursor handling code should probably be implemented in + common code somewhere instead of the separate implementations we + currently have. Also the name BusyCursorSuspender is a little + misleading since it doesn't actually suspend the BusyCursor, just + masks one that is already showing. + If another call to wxBeginBusyCursor is made while this is active + the Busy Cursor will again be shown. But at least now it doesn't + interfere with the state of wxIsBusy() -- RL + */ class wxBusyCursorSuspender { public: - wxBusyCursorSuspender() - { - m_wasBusy = wxIsBusy(); - if(m_wasBusy) - wxEndBusyCursor(); - } - ~wxBusyCursorSuspender() - { - if(m_wasBusy) - wxBeginBusyCursor(); - } - private: - bool m_wasBusy; + wxBusyCursorSuspender() + { + if( wxIsBusy() ) + { + wxSetCursor( wxBusyCursor::GetStoredCursor() ); + } + } + ~wxBusyCursorSuspender() + { + if( wxIsBusy() ) + { + wxSetCursor( wxBusyCursor::GetBusyCursor() ); + } + } }; #endif // _WX_CURSOR_H_BASE_ diff --git a/include/wx/dataobj.h b/include/wx/dataobj.h index 544d90ef13..e7042d2b07 100644 --- a/include/wx/dataobj.h +++ b/include/wx/dataobj.h @@ -250,7 +250,7 @@ private: // wxDataObject directly. // ---------------------------------------------------------------------------- -WX_DECLARE_LIST(wxDataObjectSimple, wxSimpleDataObjectList); +WX_DECLARE_EXPORTED_LIST(wxDataObjectSimple, wxSimpleDataObjectList); class WXDLLEXPORT wxDataObjectComposite : public wxDataObject { diff --git a/include/wx/date.h b/include/wx/date.h index 11ff72017f..09e8e00c49 100644 --- a/include/wx/date.h +++ b/include/wx/date.h @@ -161,16 +161,16 @@ public: int GetMonth() const { return m_date.GetMonth() + 1; } // First Date Of Month - wxDate GetMonthStart() const { return(wxDate(GetMonth(), 1, GetYear())); } + wxDate GetMonthStart() const { return(wxDate(GetMonth()-1, 1, GetYear())); } // Last Date Of Month - wxDate GetMonthEnd() const { return wxDate(GetMonth()+1, 1, GetYear())-1; } + wxDate GetMonthEnd() const { return wxDate(GetMonth(), 1, GetYear())-1; } // eg. 1992 int GetYear() const { return m_date.GetYear(); } // First Date Of Year - wxDate GetYearStart() const { return wxDate(1, 1, GetYear()); } + wxDate GetYearStart() const { return wxDate(0, 1, GetYear()); } // Last Date Of Year - wxDate GetYearEnd() const { return wxDate(1, 1, GetYear()+1) - 1; } + wxDate GetYearEnd() const { return wxDate(0, 1, GetYear()+1) - 1; } bool IsBetween(const wxDate& first, const wxDate& second) const { diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 1d7a329e67..eac9134455 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -30,12 +30,14 @@ class WXDLLEXPORT wxDateSpan; // performances and this only leads to increased rebuild time (because every // time an inline method is changed, all files including the header must be // rebuilt) -#ifdef __WXDEBUG__ +// For Mingw32, causes a link error. +#if defined( __WXDEBUG__) && !defined(__MINGW32__) + #undef inline #define inline #endif // Debug /* - * TODO Well, everything :-) + * TODO * * + 1. Time zones with minutes (make TimeZone a class) * ? 2. getdate() function like under Solaris @@ -63,7 +65,7 @@ class WXDLLEXPORT wxDateSpan; wxTimeSpan + wxTimeSpan = wxTimeSpan wxDateSpan + wxDateSpan = wxDateSpan - substraction + subtraction ------------ wxDateTime - wxDateTime = wxTimeSpan wxDateTime - wxTimeSpan = wxDateTime @@ -84,7 +86,7 @@ class WXDLLEXPORT wxDateSpan; -wxDateSpan = wxDateSpan For each binary operation OP (+, -, *) we have the following operatorOP=() as - a method and the method with a symbolic name OPER (Add, Substract, Multiply) + a method and the method with a symbolic name OPER (Add, Subtract, Multiply) as a synonym for it and another const method with the same name which returns the changed copy of the object and operatorOP() as a global function which is implemented in terms of the const version of OPEN. For the unary - we have @@ -510,6 +512,10 @@ public: // return the wxDateTime object for the current time static inline wxDateTime Now(); + // return the wxDateTime object for the current time with millisecond + // precision (if available on this platform) + static wxDateTime UNow(); + // return the wxDateTime object for today midnight: i.e. as Now() but // with time set to 0 static inline wxDateTime Today(); @@ -520,7 +526,7 @@ public: // ------------------------------------------------------------------------ // default ctor does not initialize the object, use Set()! - wxDateTime() { } + wxDateTime() { m_time = wxLongLong((long)ULONG_MAX, ULONG_MAX); } // from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970) #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) @@ -754,8 +760,8 @@ public: // result of timezone shift) // ------------------------------------------------------------------------ - // is the date valid (TRUE even for non initialized objects)? - inline bool IsValid() const { return this != &wxInvalidDateTime; } + // is the date valid? + inline bool IsValid() const { return m_time != wxInvalidDateTime.m_time; } // get the broken down date/time representation in the given timezone // @@ -855,10 +861,10 @@ public: inline wxDateTime& operator+=(const wxTimeSpan& diff); // return the difference of the date with a time span - inline wxDateTime Substract(const wxTimeSpan& diff) const; - // substract a time span (positive or negative) - inline wxDateTime& Substract(const wxTimeSpan& diff); - // substract a time span (positive or negative) + inline wxDateTime Subtract(const wxTimeSpan& diff) const; + // subtract a time span (positive or negative) + inline wxDateTime& Subtract(const wxTimeSpan& diff); + // subtract a time span (positive or negative) inline wxDateTime& operator-=(const wxTimeSpan& diff); // return the sum of the date with a date span @@ -869,14 +875,14 @@ public: inline wxDateTime& operator+=(const wxDateSpan& diff); // return the difference of the date with a date span - inline wxDateTime Substract(const wxDateSpan& diff) const; - // substract a date span (positive or negative) - inline wxDateTime& Substract(const wxDateSpan& diff); - // substract a date span (positive or negative) + inline wxDateTime Subtract(const wxDateSpan& diff) const; + // subtract a date span (positive or negative) + inline wxDateTime& Subtract(const wxDateSpan& diff); + // subtract a date span (positive or negative) inline wxDateTime& operator-=(const wxDateSpan& diff); // return the difference between two dates - inline wxTimeSpan Substract(const wxDateTime& dt) const; + inline wxTimeSpan Subtract(const wxDateTime& dt) const; // conversion to/from text: all conversions from text return the pointer to // the next character following the date specification (i.e. the one where @@ -961,7 +967,7 @@ private: // ---------------------------------------------------------------------------- // This class contains a difference between 2 wxDateTime values, so it makes -// sense to add it to wxDateTime and it is the result of substraction of 2 +// sense to add it to wxDateTime and it is the result of subtraction of 2 // objects of that class. See also wxDateSpan. // ---------------------------------------------------------------------------- @@ -1017,11 +1023,11 @@ public: wxTimeSpan& operator+=(const wxTimeSpan& diff) { return Add(diff); } // return the difference of two timespans - inline wxTimeSpan Substract(const wxTimeSpan& diff) const; - // substract another timespan - inline wxTimeSpan& Substract(const wxTimeSpan& diff); - // substract another timespan - wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Substract(diff); } + inline wxTimeSpan Subtract(const wxTimeSpan& diff) const; + // subtract another timespan + inline wxTimeSpan& Subtract(const wxTimeSpan& diff); + // subtract another timespan + wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Subtract(diff); } // multiply timespan by a scalar inline wxTimeSpan Multiply(int n) const; @@ -1094,11 +1100,7 @@ public: // resulting text representation. Notice that only some of format // specifiers valid for wxDateTime are valid for wxTimeSpan: hours, // minutes and seconds make sense, but not "PM/AM" string for example. - wxString Format(const wxChar *format = _T("%c")) const; - // preferred date representation for the current locale - wxString FormatDate() const { return Format(_T("%x")); } - // preferred time representation for the current locale - wxString FormatTime() const { return Format(_T("%X")); } + wxString Format(const wxChar *format = _T("%H:%M:%S")) const; // implementation // ------------------------------------------------------------------------ @@ -1125,7 +1127,7 @@ private: // won't be changed unless the resulting date would be invalid: for example, // Jan 31 + 1 month will be Feb 28, not (non existing) Feb 31. // -// Because of this feature, adding and substracting back again the same +// Because of this feature, adding and subtracting back again the same // wxDateSpan will *not*, in general give back the original date: Feb 28 - 1 // month will be Jan 28, not Jan 31! // @@ -1212,10 +1214,10 @@ public: inline wxDateSpan& operator+=(const wxDateSpan& other); // return difference of two date spans - inline wxDateSpan Substract(const wxDateSpan& other) const; - // substract another wxDateSpan from us - inline wxDateSpan& Substract(const wxDateSpan& other); - // substract another wxDateSpan from us + inline wxDateSpan Subtract(const wxDateSpan& other) const; + // subtract another wxDateSpan from us + inline wxDateSpan& Subtract(const wxDateSpan& other); + // subtract another wxDateSpan from us inline wxDateSpan& operator-=(const wxDateSpan& other); // return a copy of this time span with changed sign @@ -1245,7 +1247,7 @@ private: #include "wx/dynarray.h" -WX_DECLARE_OBJARRAY(wxDateTime, wxDateTimeArray); +WX_DECLARE_EXPORTED_OBJARRAY(wxDateTime, wxDateTimeArray); // ---------------------------------------------------------------------------- // wxDateTimeHolidayAuthority: an object of this class will decide whether a @@ -1262,7 +1264,7 @@ WX_DEFINE_EXPORTED_ARRAY(wxDateTimeHolidayAuthority *, wxHolidayAuthoritiesArray class wxDateTimeHolidaysModule; class WXDLLEXPORT wxDateTimeHolidayAuthority { - friend wxDateTimeHolidaysModule; +friend class wxDateTimeHolidaysModule; public: // returns TRUE if the given date is a holiday static bool IsHoliday(const wxDateTime& dt); @@ -1350,7 +1352,7 @@ inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt, inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt, const wxTimeSpan& ts) { - return dt.Substract(ts); + return dt.Subtract(ts); } inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt, @@ -1362,13 +1364,13 @@ inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt, inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt, const wxDateSpan& ds) { - return dt.Substract(ds); + return dt.Subtract(ds); } inline wxTimeSpan WXDLLEXPORT operator-(const wxDateTime& dt1, const wxDateTime& dt2) { - return dt1.Substract(dt2); + return dt1.Subtract(dt2); } // comparison diff --git a/include/wx/datetime.inl b/include/wx/datetime.inl index 8d3112b6a4..302d65c195 100644 --- a/include/wx/datetime.inl +++ b/include/wx/datetime.inl @@ -40,19 +40,19 @@ const long wxDateTime::TIME_T_FACTOR = 1000l; #endif // wxDEFINE_TIME_CONSTANTS -bool wxDateTime::IsInStdRange() const +inline bool wxDateTime::IsInStdRange() const { return m_time >= 0l && (m_time / TIME_T_FACTOR) < LONG_MAX; } /* static */ -wxDateTime wxDateTime::Now() +inline wxDateTime wxDateTime::Now() { return wxDateTime(*GetTmNow()); } /* static */ -wxDateTime wxDateTime::Today() +inline wxDateTime wxDateTime::Today() { struct tm *tm = GetTmNow(); tm->tm_hour = @@ -63,7 +63,7 @@ wxDateTime wxDateTime::Today() } #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) -wxDateTime& wxDateTime::Set(time_t timet) +inline wxDateTime& wxDateTime::Set(time_t timet) { // assign first to avoid long multiplication overflow! m_time = timet; @@ -73,56 +73,56 @@ wxDateTime& wxDateTime::Set(time_t timet) } #endif -wxDateTime& wxDateTime::SetToCurrent() +inline wxDateTime& wxDateTime::SetToCurrent() { *this = Now(); return *this; } #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) -wxDateTime::wxDateTime(time_t timet) +inline wxDateTime::wxDateTime(time_t timet) { Set(timet); } #endif -wxDateTime::wxDateTime(const struct tm& tm) +inline wxDateTime::wxDateTime(const struct tm& tm) { Set(tm); } -wxDateTime::wxDateTime(const Tm& tm) +inline wxDateTime::wxDateTime(const Tm& tm) { Set(tm); } -wxDateTime::wxDateTime(double jdn) +inline wxDateTime::wxDateTime(double jdn) { Set(jdn); } -wxDateTime& wxDateTime::Set(const Tm& tm) +inline wxDateTime& wxDateTime::Set(const Tm& tm) { wxASSERT_MSG( tm.IsValid(), _T("invalid broken down date/time") ); return Set(tm.mday, (Month)tm.mon, tm.year, tm.hour, tm.min, tm.sec); } -wxDateTime::wxDateTime(wxDateTime_t hour, - wxDateTime_t minute, - wxDateTime_t second, - wxDateTime_t millisec) +inline wxDateTime::wxDateTime(wxDateTime_t hour, + wxDateTime_t minute, + wxDateTime_t second, + wxDateTime_t millisec) { Set(hour, minute, second, millisec); } -wxDateTime::wxDateTime(wxDateTime_t day, - Month month, - int year, - wxDateTime_t hour, - wxDateTime_t minute, - wxDateTime_t second, - wxDateTime_t millisec) +inline wxDateTime::wxDateTime(wxDateTime_t day, + Month month, + int year, + wxDateTime_t hour, + wxDateTime_t minute, + wxDateTime_t second, + wxDateTime_t millisec) { Set(day, month, year, hour, minute, second, millisec); } @@ -131,14 +131,14 @@ wxDateTime::wxDateTime(wxDateTime_t day, // wxDateTime accessors // ---------------------------------------------------------------------------- -wxLongLong wxDateTime::GetValue() const +inline wxLongLong wxDateTime::GetValue() const { wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); return m_time; } -time_t wxDateTime::GetTicks() const +inline time_t wxDateTime::GetTicks() const { wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); if ( !IsInStdRange() ) @@ -149,60 +149,61 @@ time_t wxDateTime::GetTicks() const return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo()); } -bool wxDateTime::SetToLastWeekDay(WeekDay weekday, - Month month, - int year) +inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday, + Month month, + int year) { return SetToWeekDay(weekday, -1, month, year); } -wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday) const +inline wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday) const { MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) ); } -wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const +inline wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const { MODIFY_AND_RETURN( SetToNextWeekDay(weekday) ); } -wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const +inline wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const { MODIFY_AND_RETURN( SetToPrevWeekDay(weekday) ); } -wxDateTime wxDateTime::GetWeekDay(WeekDay weekday, - int n, - Month month, - int year) const +inline wxDateTime wxDateTime::GetWeekDay(WeekDay weekday, + int n, + Month month, + int year) const { wxDateTime dt(*this); return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxInvalidDateTime; } -wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday, - Month month, - int year) +inline wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday, + Month month, + int year) { wxDateTime dt(*this); return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxInvalidDateTime; } -wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek, WeekDay weekday) const +inline wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek, + WeekDay weekday) const { wxDateTime dt(*this); return dt.SetToTheWeek(numWeek, weekday) ? dt : wxInvalidDateTime; } -wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const +inline wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const { MODIFY_AND_RETURN( SetToLastMonthDay(month, year) ); } -wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const +inline wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const { MODIFY_AND_RETURN( SetToYearDay(yday) ); } @@ -211,46 +212,47 @@ wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const // wxDateTime comparison // ---------------------------------------------------------------------------- -bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const +inline bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const { wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); return m_time == datetime.m_time; } -bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const +inline bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const { wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); return m_time < datetime.m_time; } -bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const +inline bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const { wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); return m_time > datetime.m_time; } -bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1, - const wxDateTime& t2) const +inline bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1, + const wxDateTime& t2) const { // no need for assert, will be checked by the functions we call return IsLaterThan(t1) && IsEarlierThan(t2); } -bool wxDateTime::IsBetween(const wxDateTime& t1, const wxDateTime& t2) const +inline bool wxDateTime::IsBetween(const wxDateTime& t1, + const wxDateTime& t2) const { // no need for assert, will be checked by the functions we call return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2); } -bool wxDateTime::IsSameDate(const wxDateTime& dt) const +inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const { return (m_time - dt.m_time).Abs() < MILLISECONDS_PER_DAY; } -bool wxDateTime::IsSameTime(const wxDateTime& dt) const +inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const { // notice that we can't do something like this: // @@ -266,23 +268,24 @@ bool wxDateTime::IsSameTime(const wxDateTime& dt) const tm1.msec == tm2.msec; } -bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const +inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, + const wxTimeSpan& ts) const { - return IsBetween(dt.Substract(ts), dt.Add(ts)); + return IsBetween(dt.Subtract(ts), dt.Add(ts)); } // ---------------------------------------------------------------------------- // wxDateTime arithmetics // ---------------------------------------------------------------------------- -wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const +inline wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const { wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); return wxDateTime(m_time + diff.GetValue()); } -wxDateTime& wxDateTime::Add(const wxTimeSpan& diff) +inline wxDateTime& wxDateTime::Add(const wxTimeSpan& diff) { wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); @@ -291,19 +294,19 @@ wxDateTime& wxDateTime::Add(const wxTimeSpan& diff) return *this; } -wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff) +inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff) { return Add(diff); } -wxDateTime wxDateTime::Substract(const wxTimeSpan& diff) const +inline wxDateTime wxDateTime::Subtract(const wxTimeSpan& diff) const { wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); return wxDateTime(m_time - diff.GetValue()); } -wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff) +inline wxDateTime& wxDateTime::Subtract(const wxTimeSpan& diff) { wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); @@ -312,39 +315,39 @@ wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff) return *this; } -wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff) +inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff) { - return Substract(diff); + return Subtract(diff); } -wxTimeSpan wxDateTime::Substract(const wxDateTime& datetime) const +inline wxTimeSpan wxDateTime::Subtract(const wxDateTime& datetime) const { wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); - return wxTimeSpan(datetime.GetValue() - GetValue()); + return wxTimeSpan(GetValue() - datetime.GetValue()); } -wxDateTime wxDateTime::Add(const wxDateSpan& diff) const +inline wxDateTime wxDateTime::Add(const wxDateSpan& diff) const { return wxDateTime(*this).Add(diff); } -wxDateTime& wxDateTime::Substract(const wxDateSpan& diff) +inline wxDateTime& wxDateTime::Subtract(const wxDateSpan& diff) { return Add(diff.Negate()); } -wxDateTime wxDateTime::Substract(const wxDateSpan& diff) const +inline wxDateTime wxDateTime::Subtract(const wxDateSpan& diff) const { - return wxDateTime(*this).Substract(diff); + return wxDateTime(*this).Subtract(diff); } -wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff) +inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff) { - return Substract(diff); + return Subtract(diff); } -wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff) +inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff) { return Add(diff); } @@ -353,8 +356,8 @@ wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff) // wxDateTime and timezones // ---------------------------------------------------------------------------- -wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, - bool noDST) const +inline wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, + bool noDST) const { MODIFY_AND_RETURN( MakeTimezone(tz, noDST) ); } @@ -363,7 +366,10 @@ wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, // wxTimeSpan construction // ---------------------------------------------------------------------------- -wxTimeSpan::wxTimeSpan(long hours, long minutes, long seconds, long milliseconds) +inline wxTimeSpan::wxTimeSpan(long hours, + long minutes, + long seconds, + long milliseconds) { // assign first to avoid precision loss m_diff = hours; @@ -379,27 +385,27 @@ wxTimeSpan::wxTimeSpan(long hours, long minutes, long seconds, long milliseconds // wxTimeSpan accessors // ---------------------------------------------------------------------------- -wxLongLong wxTimeSpan::GetSeconds() const +inline wxLongLong wxTimeSpan::GetSeconds() const { return m_diff / 1000l; } -int wxTimeSpan::GetMinutes() const +inline int wxTimeSpan::GetMinutes() const { return (GetSeconds() / 60l).GetLo(); } -int wxTimeSpan::GetHours() const +inline int wxTimeSpan::GetHours() const { return GetMinutes() / 60; } -int wxTimeSpan::GetDays() const +inline int wxTimeSpan::GetDays() const { return GetHours() / 24; } -int wxTimeSpan::GetWeeks() const +inline int wxTimeSpan::GetWeeks() const { return GetDays() / 7; } @@ -408,53 +414,53 @@ int wxTimeSpan::GetWeeks() const // wxTimeSpan arithmetics // ---------------------------------------------------------------------------- -wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const +inline wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const { return wxTimeSpan(m_diff + diff.GetValue()); } -wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff) +inline wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff) { m_diff += diff.GetValue(); return *this; } -wxTimeSpan wxTimeSpan::Substract(const wxTimeSpan& diff) const +inline wxTimeSpan wxTimeSpan::Subtract(const wxTimeSpan& diff) const { return wxTimeSpan(m_diff - diff.GetValue()); } -wxTimeSpan& wxTimeSpan::Substract(const wxTimeSpan& diff) +inline wxTimeSpan& wxTimeSpan::Subtract(const wxTimeSpan& diff) { m_diff -= diff.GetValue(); return *this; } -wxTimeSpan& wxTimeSpan::Multiply(int n) +inline wxTimeSpan& wxTimeSpan::Multiply(int n) { m_diff *= (long)n; return *this; } -wxTimeSpan wxTimeSpan::Multiply(int n) const +inline wxTimeSpan wxTimeSpan::Multiply(int n) const { return wxTimeSpan(m_diff * (long)n); } -wxTimeSpan wxTimeSpan::Abs() const +inline wxTimeSpan wxTimeSpan::Abs() const { return wxTimeSpan(GetValue().Abs()); } -bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const +inline bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const { return GetValue() == ts.GetValue(); } -bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const +inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const { return GetValue().Abs() > ts.GetValue().Abs(); } @@ -463,8 +469,7 @@ bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const // wxDateSpan // ---------------------------------------------------------------------------- -wxDateSpan& -wxDateSpan::operator+=(const wxDateSpan& other) +inline wxDateSpan& wxDateSpan::operator+=(const wxDateSpan& other) { m_years += other.m_years; m_months += other.m_months; @@ -474,7 +479,19 @@ wxDateSpan::operator+=(const wxDateSpan& other) return *this; } -wxDateSpan& wxDateSpan::Multiply(int factor) +inline wxDateSpan& wxDateSpan::Add(const wxDateSpan& other) +{ + return *this += other; +} + +inline wxDateSpan wxDateSpan::Add(const wxDateSpan& other) const +{ + wxDateSpan ds(*this); + ds.Add(other); + return ds; +} + +inline wxDateSpan& wxDateSpan::Multiply(int factor) { m_years *= factor; m_months *= factor; @@ -484,17 +501,19 @@ wxDateSpan& wxDateSpan::Multiply(int factor) return *this; } -wxDateSpan wxDateSpan::Multiply(int factor) const +inline wxDateSpan wxDateSpan::Multiply(int factor) const { - return wxDateSpan(*this).Multiply(factor); + wxDateSpan ds(*this); + ds.Multiply(factor); + return ds; } -wxDateSpan wxDateSpan::Negate() const +inline wxDateSpan wxDateSpan::Negate() const { return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days); } -wxDateSpan& wxDateSpan::Neg() +inline wxDateSpan& wxDateSpan::Neg() { m_years = -m_years; m_months = -m_months; @@ -504,6 +523,23 @@ wxDateSpan& wxDateSpan::Neg() return *this; } +inline wxDateSpan& wxDateSpan::operator-=(const wxDateSpan& other) +{ + return *this += other.Negate(); +} + +inline wxDateSpan& wxDateSpan::Subtract(const wxDateSpan& other) +{ + return *this -= other; +} + +inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const +{ + wxDateSpan ds(*this); + ds.Subtract(other); + return ds; +} + #undef MILLISECONDS_PER_DAY #undef MODIFY_AND_RETURN diff --git a/include/wx/db.h b/include/wx/db.h index ab4310297b..ad1b1ce5c9 100644 --- a/include/wx/db.h +++ b/include/wx/db.h @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// // Name: db.h -// Purpose: Header file wxDB class. The wxDB class represents a connection -// to an ODBC data source. The wxDB class allows operations on the data +// Purpose: Header file wxDb class. The wxDb class represents a connection +// to an ODBC data source. The wxDb class allows operations on the data // source such as opening and closing the data source. // Author: Doug Card // Modified by: George Tasker +// Bart Jourquin +// Mark Johnson // Mods: Dec, 1998: // -Added support for SQL statement logging and database cataloging // April, 1999 @@ -38,6 +40,12 @@ #ifndef DB_DOT_H #define DB_DOT_H + +// BJO 20000503: introduce new GetColumns members which are more database independant and +// return columns in the order they were created +#define OLD_GETCOLUMNS 1 +#define EXPERIMENTAL_WXDB_FUNCTIONS 0 + // Use this line for wxWindows v1.x //#include "wx_ver.h" // Use this line for wxWindows v2.x @@ -45,7 +53,7 @@ #if wxMAJOR_VERSION == 2 #ifdef __GNUG__ - #pragma interface "db.h" + #pragma interface "db.h" #endif #endif @@ -93,7 +101,7 @@ enum enumDummy {enumDum1}; #define FALSE 0 #endif -const int DB_PATH_MAX = 254; +const int wxDB_PATH_MAX = 254; extern char const *SQL_LOG_FILENAME; extern char const *SQL_CATALOG_FILENAME; @@ -243,10 +251,10 @@ struct wxDbConnectInf char fileType[SQL_MAX_DSN_LENGTH+1]; // Not sure what the max length is // Optionals needed for some databases like dBase - char defaultDir[DB_PATH_MAX]; // Directory that db file resides in + char defaultDir[wxDB_PATH_MAX]; // Directory that db file resides in }; -struct wxSqlTypeInfo +struct wxDbSqlTypeInfo { char TypeName[DB_TYPE_NAME_LEN]; int FsqlType; @@ -257,25 +265,25 @@ struct wxSqlTypeInfo }; -class WXDLLEXPORT wxColFor +class WXDLLEXPORT wxDbColFor { public: wxString s_Field; // Formated String for Output wxString s_Format[7]; // Formated Objects - TIMESTAMP has the biggest (7) - wxString s_Menge[7]; // Formated Objects - amount of things that can be formatted - int i_Menge[7]; // Formated Objects - TT MM YYYY HH MM SS m + wxString s_Amount[7]; // Formated Objects - amount of things that can be formatted + int i_Amount[7]; // Formated Objects - TT MM YYYY HH MM SS m int i_Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US int i_dbDataType; // conversion of the 'sqlDataType' to the generic data type used by these classes SWORD i_sqlDataType; - wxColFor(); - ~wxColFor(); + wxDbColFor(); + ~wxDbColFor(); int Format(int Nation, int dbDataType, SWORD sqlDataType, short columnSize, short decimalDigits); }; -class WXDLLEXPORT wxColInf +class WXDLLEXPORT wxDbColInf { public: char catalog[128+1]; @@ -296,39 +304,49 @@ public: char PkTableName[DB_MAX_TABLE_NAME_LEN+1]; // Tables that use this PKey as a FKey int FkCol; // Foreign key column 0=No; 1= First Key, 2 = Second Key etc. char FkTableName[DB_MAX_TABLE_NAME_LEN+1]; // Foreign key table name - wxColFor *pColFor; // How should this columns be formatted + wxDbColFor *pColFor; // How should this columns be formatted + + wxDbColInf(); + ~wxDbColInf(); }; -class WXDLLEXPORT wxTableInf // Description of a Table + + +class WXDLLEXPORT wxDbTableInf // Description of a Table { public: - char tableName[DB_MAX_TABLE_NAME_LEN+1]; - char tableType[254+1]; // "TABLE" or "SYSTEM TABLE" etc. - char tableRemarks[254+1]; - int numCols; // How many Columns does this Table have: GetColumnCount(..); - wxColInf *pColInf; // pColInf = NULL ; User can later call GetColumns(..); + char tableName[DB_MAX_TABLE_NAME_LEN+1]; + char tableType[254+1]; // "TABLE" or "SYSTEM TABLE" etc. + char tableRemarks[254+1]; + int numCols; // How many Columns does this Table have: GetColumnCount(..); + wxDbColInf *pColInf; // pColInf = NULL ; User can later call GetColumns(..); + wxDbTableInf(); + ~wxDbTableInf(); }; class WXDLLEXPORT wxDbInf // Description of a Database { public: - char catalog[128+1]; - char schema[128+1]; - int numTables; // How many tables does this database have - wxTableInf *pTableInf; // pTableInf = new wxTableInf[numTables]; + char catalog[128+1]; + char schema[128+1]; + int numTables; // How many tables does this database have + wxDbTableInf *pTableInf; // pTableInf = new wxDbTableInf[numTables]; + + wxDbInf(); + ~wxDbInf(); }; -enum wxSqlLogState +enum wxDbSqlLogState { sqlLogOFF, sqlLogON }; // These are the databases currently tested and working with these classes -// See the comments in wxDB::Dbms() for exceptions/issues with +// See the comments in wxDb::Dbms() for exceptions/issues with // each of these database engines enum wxDBMS { @@ -341,21 +359,22 @@ enum wxDBMS dbmsPOSTGRES, dbmsACCESS, dbmsDBASE, - dbmsINFORMIX + dbmsINFORMIX, + dbmsVIRTUOSO }; -// The wxDB::errorList is copied to this variable when the wxDB object +// The wxDb::errorList is copied to this variable when the wxDb object // is closed. This way, the error list is still available after the // database object is closed. This is necessary if the database // connection fails so the calling application can show the operator -// why the connection failed. Note: as each wxDB object is closed, it -// will overwrite the errors of the previously destroyed wxDB object in +// why the connection failed. Note: as each wxDb object is closed, it +// will overwrite the errors of the previously destroyed wxDb object in // this variable. extern char DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; -class WXDLLEXPORT wxDB +class WXDLLEXPORT wxDb { private: bool dbIsOpen; @@ -363,16 +382,52 @@ private: char *uid; // User ID char *authStr; // Authorization string (password) FILE *fpSqlLog; // Sql Log file pointer - wxSqlLogState sqlLogState; // On or Off + wxDbSqlLogState sqlLogState; // On or Off bool fwdOnlyCursors; // Private member functions bool getDbInfo(void); - bool getDataTypeInfo(SWORD fSqlType, wxSqlTypeInfo &structSQLTypeInfo); + bool getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo); bool setConnectionOptions(void); void logError(const char *errMsg, const char *SQLState); +#if !wxODBC_BACKWARD_COMPATABILITY + // ODBC handles + HENV henv; // ODBC Environment handle + HDBC hdbc; // ODBC DB Connection handle + HSTMT hstmt; // ODBC Statement handle + + //Error reporting mode + bool silent; + + // Number of Ctable objects connected to this db object. FOR INTERNAL USE ONLY!!! + unsigned int nTables; + + // Information about logical data types VARCHAR, INTEGER, FLOAT and DATE. + // + // This information is obtained from the ODBC driver by use of the + // SQLGetTypeInfo() function. The key piece of information is the + // type name the data source uses for each logical data type. + // e.g. VARCHAR; Oracle calls it VARCHAR2. + wxDbSqlTypeInfo typeInfVarchar; + wxDbSqlTypeInfo typeInfInteger; + wxDbSqlTypeInfo typeInfFloat; + wxDbSqlTypeInfo typeInfDate; +#endif public: +#if wxODBC_BACKWARD_COMPATABILITY + // ODBC handles + HENV henv; // ODBC Environment handle + HDBC hdbc; // ODBC DB Connection handle + HSTMT hstmt; // ODBC Statement handle + + //Error reporting mode + bool silent; + + // Number of Ctable objects connected to this db object. FOR INTERNAL USE ONLY!!! + unsigned int nTables; +#endif + // The following structure contains database information gathered from the // datasource when the datasource is first opened. struct @@ -387,6 +442,9 @@ public: char databaseName[128]; // Database filename char outerJoins[2]; // Indicates whether the data source supports outer joins char procedureSupport[2]; // Indicates whether the data source supports stored procedures +#if EXPERIMENTAL_WXDB_FUNCTIONS // will be added in 2.4 + char accessibleTables[2]; // Indicates whether the data source only reports accessible tables in SQLTables. +#endif UWORD maxConnections; // Maximum # of connections the data source supports UWORD maxStmts; // Maximum # of HSTMTs per HDBC UWORD apiConfLvl; // ODBC API conformance level @@ -409,34 +467,29 @@ public: UDWORD loginTimeout; // Number seconds to wait for a login request } dbInf; - // ODBC handles - HENV henv; // ODBC Environment handle - HDBC hdbc; // ODBC DB Connection handle - HSTMT hstmt; // ODBC Statement handle - // ODBC Error Inf. - char sqlState[20]; - SDWORD nativeError; - char errorMsg[SQL_MAX_MESSAGE_LENGTH]; SWORD cbErrorMsg; - char errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; int DB_STATUS; + wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; + wxChar errorMsg[SQL_MAX_MESSAGE_LENGTH]; + SDWORD nativeError; + wxChar sqlState[20]; - //Error reporting mode - bool silent; - - // Number of Ctable objects connected to this db object - unsigned int nTables; - - // Inf. about logical data types VARCHAR, INTEGER, FLOAT and DATE. - // This inf. is obtained from the ODBC driver by use of the - // SQLGetTypeInfo() function. The key piece of inf. is the +#if wxODBC_BACKWARD_COMPATABILITY + // Information about logical data types VARCHAR, INTEGER, FLOAT and DATE. + // + // This information is obtained from the ODBC driver by use of the + // SQLGetTypeInfo() function. The key piece of information is the // type name the data source uses for each logical data type. // e.g. VARCHAR; Oracle calls it VARCHAR2. - wxSqlTypeInfo typeInfVarchar, typeInfInteger, typeInfFloat, typeInfDate; + wxDbSqlTypeInfo typeInfVarchar; + wxDbSqlTypeInfo typeInfInteger; + wxDbSqlTypeInfo typeInfFloat; + wxDbSqlTypeInfo typeInfDate; +#endif // Public member functions - wxDB(HENV &aHenv, bool FwdOnlyCursors=(bool)TRUE); + wxDb(HENV &aHenv, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS); bool Open(char *Dsn, char *Uid, char *AuthStr); // Data Source Name, User ID, Password void Close(void); bool CommitTrans(void); @@ -450,12 +503,14 @@ public: bool GetNext(void); bool GetData(UWORD colNo, SWORD cType, PTR pData, SDWORD maxLen, SDWORD FAR *cbReturned); bool Grant(int privileges, const char *tableName, const char *userList = "PUBLIC"); - int TranslateSqlState(const char *SQLState); + int TranslateSqlState(const wxChar *SQLState); wxDbInf *GetCatalog(char *userID); bool Catalog(const char *userID=NULL, const char *fileName = SQL_CATALOG_FILENAME); - int GetKeyFields(char *tableName, wxColInf* colInf,int nocols); - wxColInf *GetColumns(char *tableName[], const char *userID=NULL); - wxColInf *GetColumns(char *tableName, int *numCols, const char *userID=NULL); + int GetKeyFields(char *tableName, wxDbColInf* colInf, int nocols); + + wxDbColInf *GetColumns(char *tableName[], const char *userID=NULL); + wxDbColInf *GetColumns(char *tableName, int *numCols, const char *userID=NULL); + int GetColumnCount(char *tableName, const char *userID=NULL); char *GetDatabaseName(void) {return dbInf.dbmsName;} char *GetDataSource(void) {return dsn;} @@ -465,13 +520,29 @@ public: HENV GetHENV(void) {return henv;} HDBC GetHDBC(void) {return hdbc;} HSTMT GetHSTMT(void) {return hstmt;} + int GetTableCount() {return nTables;}; // number of tables using this connection + wxDbSqlTypeInfo GetTypeInfVarchar(){return typeInfVarchar;} + wxDbSqlTypeInfo GetTypeInfInteger(){return typeInfInteger;} + wxDbSqlTypeInfo GetTypeInfFloat() {return typeInfFloat;} + wxDbSqlTypeInfo GetTypeInfDate() {return typeInfDate;} + bool TableExists(const char *tableName, const char *userID=NULL, const char *path=NULL); // Table name can refer to a table, view, alias or synonym +#if EXPERIMENTAL_WXDB_FUNCTIONS // will be added in 2.4 + bool TablePrivileges(const char *tableName, const char* priv, const char *userID=NULL, const char *path=NULL); // Table name can refer to a table, view, alias or synonym +#endif void LogError(const char *errMsg, const char *SQLState = 0) {logError(errMsg, SQLState);} - bool SqlLog(wxSqlLogState state, const char *filename = SQL_LOG_FILENAME, bool append = FALSE); - bool WriteSqlLog(const char *logMsg); + void SetDebugErrorMessages(bool state) { silent = !state; } + bool SetSqlLogging(wxDbSqlLogState state, const wxChar *filename = SQL_LOG_FILENAME, bool append = FALSE); + bool WriteSqlLog(const wxChar *logMsg); wxDBMS Dbms(void); - bool FwdOnlyCursors(void) {return fwdOnlyCursors;} -}; // wxDB + bool FwdOnlyCursors(void) {return fwdOnlyCursors;} + + // These two functions are provided strictly for use by wxDbTable. + // DO NOT USE THESE FUNCTIONS, OR MEMORY LEAKS MAY OCCUR + void incrementTableCount() { nTables++; return; } + void decrementTableCount() { nTables--; return; } + +}; // wxDb // This structure forms a node in a linked list. The linked list of "DbList" objects @@ -481,8 +552,8 @@ public: struct wxDbList { wxDbList *PtrPrev; // Pointer to previous item in the list - char Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name - wxDB *PtrDb; // Pointer to the wxDB object + wxChar Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name + wxDb *PtrDb; // Pointer to the wxDb object bool Free; // Is item free or in use? wxDbList *PtrNext; // Pointer to next item in the list }; @@ -494,7 +565,7 @@ class wxTablesInUse : public wxObject public: const char *tableName; ULONG tableID; - class wxDB *pDb; + class wxDb *pDb; }; // wxTablesInUse #endif @@ -502,14 +573,14 @@ class wxTablesInUse : public wxObject // The following routines allow a user to get new database connections, free them // for other code segments to use, or close all of them when the application has // completed. -wxDB WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS); -bool WXDLLEXPORT wxDbFreeConnection(wxDB *pDb); +wxDb WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS); +bool WXDLLEXPORT wxDbFreeConnection(wxDb *pDb); void WXDLLEXPORT wxDbCloseConnections(void); int WXDLLEXPORT wxDbConnectionsInUse(void); -// This function sets the sql log state for all open wxDB objects -bool wxDbSqlLog(wxSqlLogState state, const char *filename = SQL_LOG_FILENAME); +// This function sets the sql log state for all open wxDb objects +bool wxDbSqlLog(wxDbSqlLogState state, const wxChar *filename = SQL_LOG_FILENAME); #if 0 @@ -527,22 +598,30 @@ bool WXDLLEXPORT wxDbGetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsD // Change this to 0 to remove use of all deprecated functions -#if 1 +#if wxODBC_BACKWARD_COMPATABILITY //################################################################################# //############### DEPRECATED functions for backward compatability ################# //################################################################################# // Backward compability structures/classes. This will eventually go away -typedef wxColInf CcolInf; -typedef wxSqlTypeInfo SqlTypeInfo; -typedef enum wxSqlLogState sqlLog; -typedef enum wxDBMS dbms; -typedef enum wxDBMS DBMS; -typedef wxODBC_ERRORS ODBC_ERRORS; -typedef wxDbConnectInf DbStuff; -typedef wxDbList DbList; +const int DB_PATH_MAX = wxDB_PATH_MAX; + +typedef wxDb wxDB; +typedef wxDbTableInf wxTableInf; +typedef wxDbColInf wxColInf; +typedef wxDbColInf CcolInf; +typedef wxDbColFor wxColFor; +typedef wxDbSqlTypeInfo SqlTypeInfo; +typedef wxDbSqlTypeInfo wxSqlTypeInfo; +typedef enum wxDbSqlLogState sqlLog; +typedef enum wxDbSqlLogState wxSqlLogState; +typedef enum wxDBMS dbms; +typedef enum wxDBMS DBMS; +typedef wxODBC_ERRORS ODBC_ERRORS; +typedef wxDbConnectInf DbStuff; +typedef wxDbList DbList; #ifdef __WXDEBUG__ -typedef wxTablesInUse CstructTablesInUse; +typedef wxTablesInUse CstructTablesInUse; #endif // Deprecated function names that are replaced by the function names listed above @@ -551,7 +630,7 @@ bool WXDLLEXPORT FreeDbConnection(wxDB *pDb); void WXDLLEXPORT CloseDbConnections(void); int WXDLLEXPORT NumberDbConnectionsInUse(void); -bool SqlLog(sqlLog state, const char *filename = SQL_LOG_FILENAME); +bool SqlLog(sqlLog state, const wxChar *filename = SQL_LOG_FILENAME); bool WXDLLEXPORT GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax, UWORD direction = SQL_FETCH_NEXT); diff --git a/include/wx/dbtable.h b/include/wx/dbtable.h index 5a5e5c9a85..203f453ad4 100644 --- a/include/wx/dbtable.h +++ b/include/wx/dbtable.h @@ -1,8 +1,10 @@ /////////////////////////////////////////////////////////////////////////////// // Name: dbtable.h -// Purpose: Declaration of the wxTable class. +// Purpose: Declaration of the wxDbTable class. // Author: Doug Card // Modified by: George Tasker +// Bart Jourquin +// Mark Johnson // Created: 9.96 // RCS-ID: $Id$ // Copyright: (c) 1996 Remstar International, Inc. @@ -33,7 +35,7 @@ #if wxMAJOR_VERSION == 2 #ifdef __GNUG__ - #pragma interface "dbtable.h" + #pragma interface "dbtable.h" #endif #endif @@ -43,20 +45,20 @@ #include "db.h" #endif -const int ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger -const int DEFAULT_CURSOR = 0; -const bool QUERY_ONLY = TRUE; -const bool DISABLE_VIEW = TRUE; +const int wxDB_ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger +const int wxDB_DEFAULT_CURSOR = 0; +const bool wxDB_QUERY_ONLY = TRUE; +const bool wxDB_DISABLE_VIEW = TRUE; // The following class is used to define a column of a table. -// The wxTable constructor will dynamically allocate as many of +// The wxDbTable constructor will dynamically allocate as many of // these as there are columns in the table. The class derived -// from wxTable must initialize these column definitions in it's +// from wxDbTable must initialize these column definitions in it's // constructor. These column definitions provide inf. to the -// wxTable class which allows it to create a table in the data +// wxDbTable class which allows it to create a table in the data // source, exchange data between the data source and the C++ // object, and so on. -class WXDLLEXPORT wxColDef +class WXDLLEXPORT wxDbColDef { public: char ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name @@ -70,153 +72,246 @@ public: bool DerivedCol; // Specifies whether this column is a derived value SDWORD CbValue; // Internal use only!!! bool Null; // NOT FULLY IMPLEMENTED - Allows NULL values in Inserts and Updates -}; // wxColDef +}; // wxDbColDef -class WXDLLEXPORT wxColDataPtr +class WXDLLEXPORT wxDbColDataPtr { public: void *PtrDataObj; int SzDataObj; int SqlCtype; -}; // wxColDataPtr +}; // wxDbColDataPtr // This structure is used when creating secondary indexes. -class WXDLLEXPORT wxIdxDef +class WXDLLEXPORT wxDbIdxDef { public: char ColName[DB_MAX_COLUMN_NAME_LEN+1]; bool Ascending; -}; // wxIdxDef +}; // wxDbIdxDef -class WXDLLEXPORT wxTable +class WXDLLEXPORT wxDbTable { private: - ULONG tableID; // Used for debugging. This can help to match up mismatched constructors/destructors + ULONG tableID; // Used for debugging. This can help to match up mismatched constructors/destructors // Private member variables - UDWORD cursorType; + UDWORD cursorType; + bool insertable; // Private member functions - bool bindInsertParams(void); - bool bindUpdateParams(void); - bool bindCols(HSTMT cursor); - bool getRec(UWORD fetchType); - bool execDelete(const char *pSqlStmt); - bool execUpdate(const char *pSqlStmt); - bool query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt = 0); + bool bindInsertParams(void); + bool bindUpdateParams(void); + bool bindCols(HSTMT cursor); + bool getRec(UWORD fetchType); + bool execDelete(const char *pSqlStmt); + bool execUpdate(const char *pSqlStmt); + bool query(int queryType, bool forUpdate, bool distinct, const char *pSqlStmt = 0); -public: - // Pointer to the database object this table belongs to - wxDB *pDb; +#if !wxODBC_BACKWARD_COMPATABILITY +// these were public + // Where, Order By and From clauses + wxString where; // Standard SQL where clause, minus the word WHERE + wxString orderBy; // Standard SQL order by clause, minus the ORDER BY + wxString from; // Allows for joins in a wxDbTable::Query(). Format: ",tbl,tbl..." // ODBC Handles - HENV henv; // ODBC Environment handle - HDBC hdbc; // ODBC DB Connection handle - HSTMT hstmt; // ODBC Statement handle - HSTMT *hstmtDefault; // Default cursor - HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts - HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes - HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates - HSTMT hstmtInternal; // ODBC Statement handle used internally only - HSTMT *hstmtCount; // ODBC Statement handle used by Count() function (No binding of columns) - - // Table Inf. - char tableName[DB_MAX_TABLE_NAME_LEN+1]; // Table name - char queryTableName[DB_MAX_TABLE_NAME_LEN+1]; // Query Table Name - int noCols; // # of columns in the table - bool queryOnly; // Query Only, no inserts, updates or deletes - - char tablePath[DB_PATH_MAX]; // needed for dBase tables - - // Column Definitions - wxColDef *colDefs; // Array of wxColDef structures - - // Where, Order By and From clauses - char *where; // Standard SQL where clause, minus the word WHERE - char *orderBy; // Standard SQL order by clause, minus the ORDER BY - char *from; // Allows for joins in a wxTable::Query(). Format: ",tbl,tbl..." + HENV henv; // ODBC Environment handle + HDBC hdbc; // ODBC DB Connection handle + HSTMT hstmt; // ODBC Statement handle + HSTMT *hstmtDefault; // Default cursor + HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts + HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes + HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates + HSTMT hstmtInternal; // ODBC Statement handle used internally only + HSTMT *hstmtCount; // ODBC Statement handle used by Count() function (No binding of columns) // Flags - bool selectForUpdate; + bool selectForUpdate; + // Pointer to the database object this table belongs to + wxDb *pDb; + + // Table Inf. + char tablePath[wxDB_PATH_MAX]; // needed for dBase tables + char tableName[DB_MAX_TABLE_NAME_LEN+1]; // Table name + char queryTableName[DB_MAX_TABLE_NAME_LEN+1]; // Query Table Name + int noCols; // # of columns in the table + bool queryOnly; // Query Only, no inserts, updates or deletes + + // Column Definitions + wxDbColDef *colDefs; // Array of wxDbColDef structures +#endif +public: +#if wxODBC_BACKWARD_COMPATABILITY + // Where, Order By and From clauses + char *where; // Standard SQL where clause, minus the word WHERE + char *orderBy; // Standard SQL order by clause, minus the ORDER BY + char *from; // Allows for joins in a wxDbTable::Query(). Format: ",tbl,tbl..." + + // ODBC Handles + HENV henv; // ODBC Environment handle + HDBC hdbc; // ODBC DB Connection handle + HSTMT hstmt; // ODBC Statement handle + HSTMT *hstmtDefault; // Default cursor + HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts + HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes + HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates + HSTMT hstmtInternal; // ODBC Statement handle used internally only + HSTMT *hstmtCount; // ODBC Statement handle used by Count() function (No binding of columns) + + // Flags + bool selectForUpdate; + + // Pointer to the database object this table belongs to + wxDb *pDb; + + // Table Inf. + char tablePath[wxDB_PATH_MAX]; // needed for dBase tables + char tableName[DB_MAX_TABLE_NAME_LEN+1]; // Table name + char queryTableName[DB_MAX_TABLE_NAME_LEN+1]; // Query Table Name + int noCols; // # of columns in the table + bool queryOnly; // Query Only, no inserts, updates or deletes + + // Column Definitions + wxDbColDef *colDefs; // Array of wxDbColDef structures +#endif // Public member functions - wxTable(wxDB *pwxDB, const char *tblName, const int nCols, - const char *qryTblName = 0, bool qryOnly = !QUERY_ONLY, const char *tblPath=NULL); - virtual ~wxTable(); - bool Open(void); - bool CreateTable(bool attemptDrop=TRUE); - bool DropTable(void); - bool CreateIndex(const char * idxName, bool unique, int noIdxCols, wxIdxDef *pIdxDefs, bool attemptDrop=TRUE); - bool DropIndex(const char * idxName); - bool CloseCursor(HSTMT cursor); - int Insert(void); - bool Update(void); - bool Update(const char *pSqlStmt); - bool UpdateWhere(const char *pWhereClause); - bool Delete(void); - bool DeleteWhere(const char *pWhereClause); - bool DeleteMatching(void); - virtual bool Query(bool forUpdate = FALSE, bool distinct = FALSE); - bool QueryBySqlStmt(char *pSqlStmt); - bool QueryMatching(bool forUpdate = FALSE, bool distinct = FALSE); - bool QueryOnKeyFields(bool forUpdate = FALSE, bool distinct = FALSE); - bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); } - bool operator++(int) { return(getRec(SQL_FETCH_NEXT)); } + wxDbTable(wxDb *pwxDb, const char *tblName, const int nCols, + const char *qryTblName = 0, bool qryOnly = !wxDB_QUERY_ONLY, const char *tblPath=NULL); + virtual ~wxDbTable(); - /***** These four functions only work with wxDB instances that are defined ***** + bool Open(void); + bool CreateTable(bool attemptDrop=TRUE); + bool DropTable(void); + bool CreateIndex(const char * idxName, bool unique, int noIdxCols, wxDbIdxDef *pIdxDefs, bool attemptDrop=TRUE); + bool DropIndex(const char * idxName); + + // Accessors + + // The member variables returned by these accessors are all + // set when the wxDbTable instance is createand cannot be + // changed, hence there is no corresponding SetXxxx function + wxDb *GetDb() { return pDb; } + const char *GetTableName() { return tableName; } + const char *GetQueryTableName() { return queryTableName; } + const char *GetTablePath() { return tablePath; } + + int GetNumberOfColumns() { return noCols; } // number of "defined" columns for this wxDbTable instance + + + const char *GetFromClause() { return from; } + const char *GetOrderByClause() { return orderBy; } + const char *GetWhereClause() { return where; } + + bool IsQueryOnly() { return queryOnly; } +#if wxODBC_BACKWARD_COMPATABILITY + void SetFromClause(const char *From) { from = (char *)From; } + void SetOrderByClause(const char *OrderBy) { orderBy = (char *)OrderBy; } + void SetWhereClause(const char *Where) { where = (char *)Where; } +#else + void SetFromClause(const wxString& From) { from = From; } + void SetOrderByClause(const wxString& OrderBy) { orderBy = OrderBy; } + void SetWhereClause(const wxString& Where) { where = Where; } +#endif + int Insert(void); + bool Update(void); + bool Update(const char *pSqlStmt); + bool UpdateWhere(const char *pWhereClause); + bool Delete(void); + bool DeleteWhere(const char *pWhereClause); + bool DeleteMatching(void); + virtual bool Query(bool forUpdate = FALSE, bool distinct = FALSE); + bool QueryBySqlStmt(const char *pSqlStmt); + bool QueryMatching(bool forUpdate = FALSE, bool distinct = FALSE); + bool QueryOnKeyFields(bool forUpdate = FALSE, bool distinct = FALSE); + bool Refresh(void); + bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); } + bool operator++(int) { return(getRec(SQL_FETCH_NEXT)); } + + /***** These four functions only work with wxDb instances that are defined ***** ***** as not being FwdOnlyCursors *****/ - bool GetPrev(void); - bool operator--(int); - bool GetFirst(void); - bool GetLast(void); + bool GetPrev(void); + bool operator--(int); + bool GetFirst(void); + bool GetLast(void); - bool IsCursorClosedOnCommit(void); - bool IsColNull(int colNo); - UWORD GetRowNum(void); - void GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct); - void GetDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause = 0); - void GetUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereClause = 0); - void GetWhereClause(char *pWhereClause, int typeOfWhere, const char *qualTableName = 0, bool useLikeComparison=FALSE); - bool CanSelectForUpdate(void); - bool CanUpdByROWID(void); - void ClearMemberVars(void); - bool SetQueryTimeout(UDWORD nSeconds); - void SetColDefs (int index, const char *fieldName, int dataType, void *pData, int cType, - int size, bool keyField = FALSE, bool upd = TRUE, - bool insAllow = TRUE, bool derivedCol = FALSE); - wxColDataPtr* SetColDefs (wxColInf *colInfs, ULONG numCols); + bool IsCursorClosedOnCommit(void); + UWORD GetRowNum(void); - HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE); - bool DeleteCursor(HSTMT *hstmtDel); - void SetCursor(HSTMT *hstmtActivate = (void **) DEFAULT_CURSOR); - HSTMT GetCursor(void) { return(hstmt); } - ULONG Count(const char *args="*"); - int DB_STATUS(void) { return(pDb->DB_STATUS); } - bool Refresh(void); - bool SetNull(int colNo); - bool SetNull(const char *colName); + void BuildSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct); + void BuildDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause = 0); + void BuildUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereClause = 0); + void BuildWhereClause(char *pWhereClause, int typeOfWhere, const char *qualTableName = 0, bool useLikeComparison=FALSE); +#if wxODBC_BACKWARD_COMPATABILITY +// The following member functions are deprecated. You should use the BuildXxxxxStmt functions (above) + void GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct) + { BuildSelectStmt(pSqlStmt,typeOfSelect,distinct); } + void GetDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause = 0) + { BuildDeleteStmt(pSqlStmt,typeOfDel,pWhereClause); } + void GetUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereClause = 0) + { BuildUpdateStmt(pSqlStmt,typeOfUpd,pWhereClause); } + void GetWhereClause(char *pWhereClause, int typeOfWhere, + const char *qualTableName = 0, bool useLikeComparison=FALSE) + { BuildWhereClause(pWhereClause,typeOfWhere,qualTableName,useLikeComparison); } +#endif + bool CanSelectForUpdate(void); + bool CanUpdByROWID(void); + void ClearMemberVars(void); + bool SetQueryTimeout(UDWORD nSeconds); -#ifdef __WXDEBUG__ - ULONG GetTableID() { return tableID; }; + wxDbColDef *GetColDefs() { return colDefs; } + void SetColDefs(int index, const char *fieldName, int dataType, void *pData, int cType, + int size, bool keyField = FALSE, bool upd = TRUE, + bool insAllow = TRUE, bool derivedCol = FALSE); + wxDbColDataPtr *SetColDefs(wxDbColInf *colInfs, ULONG numCols); + + bool CloseCursor(HSTMT cursor); + bool DeleteCursor(HSTMT *hstmtDel); + void SetCursor(HSTMT *hstmtActivate = (void **) wxDB_DEFAULT_CURSOR); + HSTMT GetCursor(void) { return(hstmt); } + HSTMT *GetNewCursor(bool setCursor = FALSE, bool bindColumns = TRUE); +#if wxODBC_BACKWARD_COMPATABILITY +// The following member function is deprecated. You should use the GetNewCursor + HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE) { return GetNewCursor(setCursor,bindColumns); } #endif -}; // wxTable + ULONG Count(const char *args="*"); + int DB_STATUS(void) { return(pDb->DB_STATUS); } + + bool IsColNull(int colNo); + bool SetNull(int colNo); + bool SetNull(const char *colName); + +#ifdef __WXDEBUG__ + ULONG GetTableID() { return tableID; } +#endif + +}; // wxDbTable // Change this to 0 to remove use of all deprecated functions -#if 1 +#if wxODBC_BACKWARD_COMPATABILITY //################################################################################# //############### DEPRECATED functions for backward compatability ################# //################################################################################# // Backward compability. These will eventually go away -typedef wxColDef CcolDef; -typedef wxColDataPtr CcolDataPtr; -typedef wxIdxDef CidxDef; +typedef wxDbTable wxTable; +typedef wxDbIdxDef wxIdxDef; +typedef wxDbIdxDef CidxDef; +typedef wxDbColDef wxColDef; +typedef wxDbColDef CcolDef; +typedef wxDbColDataPtr wxColDataPtr; +typedef wxDbColDataPtr CcolDataPtr; +const int ROWID = wxDB_ROWID_LEN; +const int DEFAULT_CURSOR = wxDB_DEFAULT_CURSOR; +const bool QUERY_ONLY = wxDB_QUERY_ONLY; +const bool DISABLE_VIEW = wxDB_DISABLE_VIEW; #endif #endif diff --git a/include/wx/dc.h b/include/wx/dc.h index 551e35da34..4fc92c6f0a 100644 --- a/include/wx/dc.h +++ b/include/wx/dc.h @@ -49,7 +49,7 @@ public: m_clipping = FALSE; m_ok = TRUE; - m_minX = m_minY = m_maxX = m_maxY = 0; + ResetBoundingBox(); m_signX = m_signY = 1; @@ -330,6 +330,7 @@ public: // --------- // const... + int GetBackgroundMode() const { return m_backgroundMode; } const wxBrush& GetBackground() const { return m_backgroundBrush; } const wxBrush& GetBrush() const { return m_brush; } const wxFont& GetFont() const { return m_font; } @@ -400,10 +401,29 @@ public: virtual void CalcBoundingBox(wxCoord x, wxCoord y) { - if ( x < m_minX ) m_minX = x; - if ( y < m_minY ) m_minY = y; - if ( x > m_maxX ) m_maxX = x; - if ( y > m_maxY ) m_maxY = y; + if ( m_isBBoxValid ) + { + if ( x < m_minX ) m_minX = x; + if ( y < m_minY ) m_minY = y; + if ( x > m_maxX ) m_maxX = x; + if ( y > m_maxY ) m_maxY = y; + } + else + { + m_isBBoxValid = TRUE; + + m_minX = x; + m_minY = y; + m_maxX = x; + m_maxY = y; + } + } + + void ResetBoundingBox() + { + m_isBBoxValid = FALSE; + + m_minX = m_maxX = m_minY = m_maxY = 0; } // Get the final bounding box of the PostScript or Metafile picture. @@ -577,6 +597,7 @@ protected: bool m_ok:1; bool m_clipping:1; bool m_isInteractive:1; + bool m_isBBoxValid:1; // coordinate system variables diff --git a/include/wx/debug.h b/include/wx/debug.h index c7a69752d3..4cb9dd165d 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -43,6 +43,10 @@ // ---------------------------------------------------------------------------- //@{ +// Use of these suppresses compiler warnings about testing constant expression +WXDLLEXPORT_DATA(extern const bool) wxTrue; +WXDLLEXPORT_DATA(extern const bool) wxFalse; + /** @name Macros which are completely disabled in 'release' mode */ //@{ #ifdef __WXDEBUG__ @@ -58,15 +62,8 @@ /// generic assert macro #define wxASSERT(cond) if ( !(cond) ) wxOnAssert(__TFILE__, __LINE__) -#if 0 // defined(__BORLANDC__) && defined(__WIN16__) - // Too much text, so make wxASSERT_MSG the same as wxASSERT, - // thus removing the text from the program. - #define wxASSERT_MSG(x, m) if ( !(x) ) wxOnAssert(__TFILE__, __LINE__) -#else /// assert with additional message explaining it's cause #define wxASSERT_MSG(x, m) if ( !(x) ) wxOnAssert(__TFILE__, __LINE__, m) -#endif - #else // nothing to do in release modes (hopefully at this moment there are // no more bugs ;-) @@ -74,17 +71,11 @@ #define wxASSERT_MSG(x, m) #endif //__WXDEBUG__ - /// special form of assert: always triggers it (in debug mode) +/// special form of assert: always triggers it (in debug mode) #define wxFAIL wxASSERT(wxFalse) -#if 0 // defined(__BORLANDC__) && defined(__WIN16__) - // Too much text, so make wxFAIL_MSG the same as wxFAIL, - // thus removing the text from the program. -#define wxFAIL_MSG(msg) wxASSERT(wxFalse) -#else - /// FAIL with some message +/// FAIL with some message #define wxFAIL_MSG(msg) wxASSERT_MSG(wxFalse, msg) -#endif //@} // NB: these macros work also in release mode! diff --git a/include/wx/defs.h b/include/wx/defs.h index a5e111e13c..3e1d30b2f8 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -22,8 +22,8 @@ // OS: first test for generic Unix defines, then for particular flavours and // finally for Unix-like systems -#if defined(__unix) || defined(__unix__) || defined(____SVR4____) || \ - defined(__LINUX__) || defined(__sgi) || \ +#if defined(__UNIX__) || defined(__unix) || defined(__unix__) || \ + defined(____SVR4____) || defined(__LINUX__) || defined(__sgi) || \ defined(__hpux) || defined(sun) || defined(__SUN__) || defined(_AIX) || \ defined(__EMX__) || defined(__VMS) || defined(__BEOS__) @@ -48,6 +48,10 @@ #endif #endif // Sun + #ifdef __EMX__ + #define OS2EMX_PLAIN_CHAR + #endif + #elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) ) // MacOS #elif defined(__OS2__) @@ -96,8 +100,9 @@ # pragma warning(disable:4100) // unreferenced formal parameter # pragma warning(disable:4511) // copy ctor couldn't be generated # pragma warning(disable:4512) // operator=() couldn't be generated -# pragma warning(disable:4699) // Using precompiled header +# pragma warning(disable:4699) // using precompiled header # pragma warning(disable:4134) // conversion between pointers to members of same class +# pragma warning(disable:4710) // function not inlined #ifndef WIN32 # pragma warning(disable:4135) // conversion between different integral types # pragma warning(disable:4769) // assignment of near pointer to long integer @@ -135,10 +140,9 @@ #define va_list __gnuc_va_list #endif // HP-UX -// Mingw32 gcc-2.95 uses new windows headers which are more ms-like -// we are setting this define because of the complex check -// using NORLANDER as Cygwin may follow. (header author is Anders Norlander) -#if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) +// Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which +// are more ms-like (header author is Anders Norlander, hence the name) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) #ifndef wxUSE_NORLANDER_HEADERS #define wxUSE_NORLANDER_HEADERS 1 #endif @@ -148,9 +152,9 @@ #endif #endif -// "old" GNUWIN32 is the one without Norlander's headers: it lacks the standard -// Win32 headers and we define the used stuff ourselves for it in -// wx/msw/gnuwin32/extra.h +// "old" GNUWIN32 is the one without Norlander's headers: it lacks the +// standard Win32 headers and we define the used stuff ourselves for it +// in wx/msw/gnuwin32/extra.h #if defined(__GNUC__) && !wxUSE_NORLANDER_HEADERS #define __GNUWIN32_OLD__ #endif @@ -223,16 +227,22 @@ #undef PACKAGE #undef VERSION +// size_t is the same as unsigned int for all Windows compilers we know, +// so define it if it hadn't been done by configure yet +#if defined(__WXMSW__) && !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) +#define wxSIZE_T_IS_UINT +#endif + // this has to be done after including setup.h which might // define __HPUX__ 1 itself #if defined(__hpux) && !defined(__HPUX__) - #define __HPUX__ +#define __HPUX__ #endif // HP-UX // if we're on a Unix system but didn't use configure (so that setup.h didn't // define __UNIX__), do define __UNIX__ now #if !defined(__UNIX__) && defined(__UNIX_LIKE__) - #define __UNIX__ +#define __UNIX__ #endif // Unix #include "wx/version.h" @@ -380,25 +390,8 @@ typedef int wxWindowID; #if defined(__WXMSW__) -// _declspec works in BC++ 5 and later, as well as VC++ -#if defined(__VISUALC__) || defined(__BORLANDC__) - -# ifdef WXMAKINGDLL -# define WXDLLEXPORT _declspec( dllexport ) -# define WXDLLEXPORT_DATA(type) _declspec( dllexport ) type -# define WXDLLEXPORT_CTORFN -# elif defined(WXUSINGDLL) -# define WXDLLEXPORT _declspec( dllimport ) -# define WXDLLEXPORT_DATA(type) _declspec( dllimport ) type -# define WXDLLEXPORT_CTORFN -# else -# define WXDLLEXPORT -# define WXDLLEXPORT_DATA(type) type -# define WXDLLEXPORT_CTORFN -# endif - -#elif defined(__GNUC__) - +// __declspec works in BC++ 5 and later, as well as VC++ and gcc +#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) # ifdef WXMAKINGDLL # define WXDLLEXPORT __declspec( dllexport ) # define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type @@ -412,34 +405,46 @@ typedef int wxWindowID; # define WXDLLEXPORT_DATA(type) type # define WXDLLEXPORT_CTORFN # endif - -#elif defined(__WXPM__) - -# ifdef WXMAKINGDLL -# define WXDLLEXPORT _Export -# define WXDLLEXPORT_DATA(type) _Export type -# define WXDLLEXPORT_CTORFN -# elif defined(WXUSINGDLL) -# define WXDLLEXPORT _Export -# define WXDLLEXPORT_DATA(type) _Export type -# define WXDLLEXPORT_CTORFN -# else +#else # define WXDLLEXPORT # define WXDLLEXPORT_DATA(type) type # define WXDLLEXPORT_CTORFN -# endif - -#else -# define WXDLLEXPORT -# define WXDLLEXPORT_DATA(type) type -# define WXDLLEXPORT_CTORFN #endif -#else // !Windows +#elif defined(__WXPM__) + +# if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) + +# ifdef WXMAKINGDLL +# define WXDLLEXPORT _Export +# define WXDLLEXPORT_DATA(type) _Export type +# define WXDLLEXPORT_CTORFN +# elif defined(WXUSINGDLL) +# define WXDLLEXPORT _Export +# define WXDLLEXPORT_DATA(type) _Export type +# define WXDLLEXPORT_CTORFN +# else +# define WXDLLEXPORT +# define WXDLLEXPORT_DATA(type) type +# define WXDLLEXPORT_CTORFN +# endif + +# else + +# define WXDLLEXPORT +# define WXDLLEXPORT_DATA(type) type +# define WXDLLEXPORT_CTORFN + +# endif + +#else // !(MSW or OS2) + # define WXDLLEXPORT # define WXDLLEXPORT_DATA(type) type # define WXDLLEXPORT_CTORFN -#endif // Win/!Win + +#endif + // For ostream, istream ofstream #if defined(__BORLANDC__) && defined( _RTLDLL ) @@ -456,8 +461,12 @@ class WXDLLEXPORT wxEvent; #define wxNOT_FOUND (-1) // ---------------------------------------------------------------------------- -/** @name Very common macros */ +// Very common macros // ---------------------------------------------------------------------------- + +// everybody gets the assert and other debug macros +#include "wx/debug.h" + //@{ /// delete pointer if it is not NULL and NULL it afterwards // (checking that it's !NULL before passing it to delete is just a @@ -489,10 +498,6 @@ class WXDLLEXPORT wxEvent; /// size of statically declared array #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) -// Use of these suppresses some compiler warnings -WXDLLEXPORT_DATA(extern const bool) wxTrue; -WXDLLEXPORT_DATA(extern const bool) wxFalse; - // ---------------------------------------------------------------------------- // compiler specific settings // ---------------------------------------------------------------------------- @@ -519,9 +524,13 @@ WXDLLEXPORT_DATA(extern const bool) wxFalse; // where should i put this? we need to make sure of this as it breaks // the code. #if !wxUSE_IOSTREAMH && defined(__WXDEBUG__) -#ifndef __MWERKS__ -#undef __WXDEBUG__ -#endif +# ifndef __MWERKS__ +// #undef __WXDEBUG__ +# ifdef wxUSE_DEBUG_NEW_ALWAYS +# undef wxUSE_DEBUG_NEW_ALWAYS +# define wxUSE_DEBUG_NEW_ALWAYS 0 +# endif +# endif #endif // Callback function type definition @@ -688,7 +697,7 @@ typedef float wxFloat32 ; = { 0xE158 }; #pragma parameter __D0 wxINT16_SWAP_ALWAYS(__D0) - pascal wxInt16 wxUINT16_SWAP_ALWAYS(wxInt16 value) + pascal wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value) = { 0xE158 }; #pragma parameter __D0 wxUINT32_SWAP_ALWAYS (__D0) @@ -696,7 +705,7 @@ typedef float wxFloat32 ; = { 0xE158, 0x4840, 0xE158 }; #pragma parameter __D0 wxINT32_SWAP_ALWAYS (__D0) - pascal wxInt32 wxUINT32_SWAP_ALWAYS(wxInt32 value) + pascal wxInt32 wxINT32_SWAP_ALWAYS(wxInt32 value) = { 0xE158, 0x4840, 0xE158 }; #endif @@ -893,16 +902,21 @@ enum wxStretch #define wxICONIZE 0x4000 #define wxMINIMIZE wxICONIZE #define wxMAXIMIZE 0x2000 -#define wxTHICK_FRAME 0x1000 +// free value: 0x1000 #define wxSYSTEM_MENU 0x0800 #define wxMINIMIZE_BOX 0x0400 #define wxMAXIMIZE_BOX 0x0200 #define wxTINY_CAPTION_HORIZ 0x0100 #define wxTINY_CAPTION_VERT 0x0080 -#define wxRESIZE_BOX wxMAXIMIZE_BOX #define wxRESIZE_BORDER 0x0040 + +// deprecated versions defined for compatibility reasons +#define wxRESIZE_BOX wxMAXIMIZE_BOX +#define wxTHICK_FRAME wxRESIZE_BORDER + #define wxDIALOG_MODAL 0x0020 #define wxDIALOG_MODELESS 0x0000 + // Add for normal Windows frame behaviour #define wxFRAME_FLOAT_ON_PARENT 0x0020 @@ -918,14 +932,16 @@ enum wxStretch #endif #define wxDEFAULT_FRAME_STYLE \ - (wxSYSTEM_MENU | wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN) + (wxSYSTEM_MENU | wxRESIZE_BORDER | \ + wxMINIMIZE_BOX | wxMAXIMIZE_BOX | \ + wxCAPTION | wxCLIP_CHILDREN) #ifdef __WXMSW__ -# define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU|wxCAPTION|wxTHICK_FRAME) +# define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU | wxCAPTION) #else -// Under Unix, the dialogs don't have a system menu. Specifying -// wxSYSTEM_MENU here, will make a close button appear. -# define wxDEFAULT_DIALOG_STYLE (wxCAPTION|wxTHICK_FRAME) +// Under Unix, the dialogs don't have a system menu. Specifying wxSYSTEM_MENU +// here will make a close button appear. +# define wxDEFAULT_DIALOG_STYLE wxCAPTION #endif /* @@ -1062,6 +1078,10 @@ enum wxStretch */ #define wxBU_AUTODRAW 0x0004 #define wxBU_NOAUTODRAW 0x0000 +#define wxBU_LEFT 0x0040 +#define wxBU_TOP 0x0080 +#define wxBU_RIGHT 0x0100 +#define wxBU_BOTTOM 0x0200 /* * wxTreeCtrl flags @@ -1074,6 +1094,7 @@ enum wxStretch #define wxTR_MULTIPLE 0x0020 #define wxTR_EXTENDED 0x0040 #define wxTR_HAS_VARIABLE_ROW_HEIGHT 0x0080 +#define wxTR_NO_LINES 0x0100 /* * wxListCtrl flags @@ -1118,10 +1139,14 @@ enum wxStretch * wxSplitterWindow flags */ #define wxSP_NOBORDER 0x0000 -#define wxSP_3D 0x0010 +#define wxSP_NOSASH 0x0010 #define wxSP_BORDER 0x0020 #define wxSP_PERMIT_UNSPLIT 0x0040 #define wxSP_LIVE_UPDATE 0x0080 +#define wxSP_3DSASH 0x0100 +#define wxSP_3DBORDER 0x0200 +#define wxSP_FULLSASH 0x0400 +#define wxSP_3D (wxSP_3DBORDER | wxSP_3DSASH) /* * wxFrame extra flags @@ -1678,27 +1703,27 @@ typedef enum { #ifdef __WXMAC__ typedef WindowPtr WXHWND; -typedef Handle WXHANDLE; -typedef CIconHandle WXHICON; +typedef Handle WXHANDLE; +typedef CIconHandle WXHICON; //typedef unsigned long WXHFONT; -typedef MenuHandle WXHMENU; +typedef MenuHandle WXHMENU; //typedef unsigned long WXHPEN; //typedef unsigned long WXHBRUSH; //typedef unsigned long WXHPALETTE; -typedef CursHandle WXHCURSOR; +typedef CursHandle WXHCURSOR; typedef RgnHandle WXHRGN; //typedef unsigned long WXHACCEL; //typedef unsigned long WXHINSTANCE; -typedef GWorldPtr WXHBITMAP; +typedef GWorldPtr WXHBITMAP; //typedef unsigned long WXHIMAGELIST; //typedef unsigned long WXHGLOBAL; -typedef GrafPtr WXHDC; +typedef GrafPtr WXHDC; typedef unsigned int WXUINT; typedef unsigned long WXDWORD; typedef unsigned short WXWORD; //typedef unsigned int WXWPARAM; //typedef long WXLPARAM; -typedef RGBColor WXCOLORREF; +typedef RGBColor WXCOLORREF; //typedef void * WXRGNDATA; //typedef void * WXMSG; //typedef unsigned long WXHCONV; @@ -1708,12 +1733,26 @@ typedef RGBColor WXCOLORREF; //typedef void * WXLPCREATESTRUCT; typedef int (*WXFARPROC)(); -typedef WindowPtr WXWindow; -typedef ControlHandle WXWidget; +typedef WindowPtr WXWindow; +typedef ControlHandle WXWidget; #endif #if defined(__WXMSW__) || defined(__WXPM__) + +// the keywords needed for WinMain() declaration +#ifdef __WIN16__ +# ifdef __VISUALC__ +# define WXFAR __far +# else +# define WXFAR _far +# endif +#else // Win32 +# ifndef WXFAR +# define WXFAR +# endif +#endif // Win16/32 + // Stand-ins for Windows types or OS/2, to avoid #including all of windows.h or os2.h typedef unsigned long WXHWND; typedef unsigned long WXHANDLE; @@ -1726,7 +1765,7 @@ typedef unsigned long WXHPALETTE; typedef unsigned long WXHCURSOR; typedef unsigned long WXHRGN; typedef unsigned long WXHACCEL; -typedef unsigned long WXHINSTANCE; +typedef void WXFAR * WXHINSTANCE; typedef unsigned long WXHBITMAP; typedef unsigned long WXHIMAGELIST; typedef unsigned long WXHGLOBAL; @@ -1734,17 +1773,17 @@ typedef unsigned long WXHDC; typedef unsigned int WXUINT; typedef unsigned long WXDWORD; typedef unsigned short WXWORD; -#ifdef __WXMSW__ -typedef unsigned int WXWPARAM; -typedef long WXLPARAM; -#else +#ifdef __WXPM__ # define WXWPARAM MPARAM # define WXLPARAM MPARAM # define RECT RECTL # define LOGFONT FATTRS # define LOWORD SHORT1FROMMP # define HIWORD SHORT2FROMMP -#endif // __WXMSW__ +#else +typedef unsigned int WXWPARAM; +typedef long WXLPARAM; +#endif // __WXPM__ typedef unsigned long WXCOLORREF; typedef void * WXRGNDATA; typedef void * WXMSG; @@ -1760,7 +1799,7 @@ typedef void * WXLPCREATESTRUCT; typedef unsigned long WXMPARAM; typedef unsigned long WXMSGID; typedef void* WXRESULT; -typedef int (*WXFARPROC)(); +// typedef WXRESULT (*WXFARPROC)(WXHWND, WXMSGID, WXMPARAM, WXMPARAM); // some windows handles not defined by PM typedef unsigned long HANDLE; typedef unsigned long HICON; @@ -1807,6 +1846,13 @@ typedef struct tagLOGPALETTE typedef int (*WXFARPROC)(); #elif defined(__WIN32__) typedef int (__stdcall *WXFARPROC)(); +#elif defined(__WXPM__) +# if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) + // VA 3.0 for some reason needs base data types when typedefing a proc proto??? + typedef void* (_System *WXFARPROC)(unsigned long, unsigned long, void*, void*); +# else + typedef WXRESULT (_System *WXFARPROC)(WXHWND, WXMSGID, WXWPARAM, WXLPARAM); +# endif #else typedef int (*WXFARPROC)(); #endif @@ -1814,29 +1860,15 @@ typedef struct tagLOGPALETTE typedef WXHWND WXWidget; #if defined(__BORLANDC__) && !defined(__WIN32__) -#ifndef LPTSTR -#define LPTSTR LPSTR -#endif -#ifndef LPCTSTR -#define LPCTSTR LPSTR -#endif +# ifndef LPTSTR +# define LPTSTR LPSTR +# endif +# ifndef LPCTSTR +# define LPCTSTR LPSTR +# endif #endif -// the keywords needed for WinMain() declaration - -#ifdef __WIN16__ - #ifdef __VISUALC__ - #define WXFAR __far - #else // !VC++ - #define WXFAR _far - #endif -#else // Win32 - #ifndef WXFAR - #define WXFAR - #endif -#endif // Win16/32 - -#endif // MSW +#endif // MSW or OS2 #ifdef __WXMOTIF__ /* Stand-ins for X/Xt/Motif types */ @@ -1862,6 +1894,8 @@ typedef unsigned long Atom; /* this might fail on a few architectures */ #ifdef __WXGTK__ /* Stand-ins for GLIB types */ +typedef char gchar; +typedef signed char gint8; typedef int gint; typedef unsigned guint; typedef unsigned long gulong; @@ -1874,7 +1908,7 @@ typedef struct _GdkColor GdkColor; typedef struct _GdkColormap GdkColormap; typedef struct _GdkFont GdkFont; typedef struct _GdkGC GdkGC; -#ifdef __WXGTK13__ +#ifdef __WXGTK20__ typedef struct _GdkDrawable GdkWindow; typedef struct _GdkDrawable GdkBitmap; typedef struct _GdkDrawable GdkPixmap; @@ -1905,6 +1939,18 @@ typedef struct _GtkItemFactory GtkItemFactory; typedef struct _GtkSelectionData GtkSelectionData; typedef GtkWidget *WXWidget; + +#ifndef __WXGTK20__ +#define GTK_OBJECT_GET_CLASS(object) (GTK_OBJECT(object)->klass) +#define GTK_CLASS_TYPE(klass) ((klass)->type) +#endif + +#ifdef __WXGTK20__ +/* Stand-ins for Pango types */ +typedef struct _PangoContext PangoContext; +typedef struct _PangoLayout PangoLayout; +typedef struct _PangoFontDescription PangoFontDescription; +#endif #endif // GTK // This is required because of clashing macros in windows.h, which may be diff --git a/include/wx/dialog.h b/include/wx/dialog.h index fb131cd96c..78e89ce307 100644 --- a/include/wx/dialog.h +++ b/include/wx/dialog.h @@ -27,7 +27,6 @@ public: void SetReturnCode(int returnCode) { m_returnCode = returnCode; } int GetReturnCode() const { return m_returnCode; } -protected: // splits text up at newlines and places the // lines into a vertical wxBoxSizer wxSizer *CreateTextSizer( const wxString &message ); @@ -35,6 +34,7 @@ protected: // places buttons into a horizontal wxBoxSizer wxSizer *CreateButtonSizer( long flags ); +protected: // the return code from modal dialog int m_returnCode; }; diff --git a/include/wx/dialup.h b/include/wx/dialup.h index ecd17efbe5..d861592739 100644 --- a/include/wx/dialup.h +++ b/include/wx/dialup.h @@ -24,7 +24,7 @@ class WXDLLEXPORT wxArrayString; -extern const wxChar *wxEmptyString; +WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #define WXDIALUP_MANAGER_DEFAULT_BEACONHOST wxT("www.yahoo.com") diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index 7298d81612..96ee554d3f 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -10,7 +10,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogDefaultFolderStr; WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #if defined(__WXMSW__) -#if defined(__WIN16__) || (defined(__GNUWIN32__)&&!defined(wxUSE_NORLANDER_HEADERS)) || defined(__SALFORDC__) +#if defined(__WIN16__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) || defined(__SALFORDC__) #include "wx/generic/dirdlgg.h" #else #include "wx/msw/dirdlg.h" diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 109a89437c..702df0bad0 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -17,7 +17,6 @@ #endif #include "wx/defs.h" -#include "wx/debug.h" /** @name Dynamic arrays and object arrays (array which own their elements) @memo Arrays which grow on demand and do range checking (only in debug) @@ -304,7 +303,8 @@ public: \ void Insert(const T* pItem, size_t uiIndex) \ { wxBaseArray::Insert((long)pItem, uiIndex); } \ \ - void Empty(); \ + void Empty() { DoEmpty(); wxBaseArray::Empty(); } \ + void Clear() { DoEmpty(); wxBaseArray::Clear(); } \ \ T* Detach(size_t uiIndex) \ { T* p = (T*)wxBaseArray::Item(uiIndex); \ @@ -315,6 +315,7 @@ public: \ void Sort(CMPFUNC##T fCmp) { wxBaseArray::Sort((CMPFUNC)fCmp); } \ \ private: \ + void DoEmpty(); \ void DoCopy(const name& src); \ } diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index 313180829c..b13587e3e5 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -70,7 +70,7 @@ There are no instances of this class, it simply serves as a namespace for its static member functions. */ -class wxDllLoader +class WXDLLEXPORT wxDllLoader { public: /** This function loads a shared library into memory, with libname @@ -94,6 +94,9 @@ public: */ static void * GetSymbol(wxDllType dllHandle, const wxString &name); + // return the standard DLL extension (with leading dot) for this platform + static wxString GetDllExt(); + private: /// forbid construction of objects wxDllLoader(); @@ -103,7 +106,7 @@ private: // wxLibrary // ---------------------------------------------------------------------------- -class wxLibrary : public wxObject +class WXDLLEXPORT wxLibrary : public wxObject { public: wxHashTable classTable; @@ -130,7 +133,7 @@ protected: // wxLibraries // ---------------------------------------------------------------------------- -class wxLibraries +class WXDLLEXPORT wxLibraries { public: wxLibraries(); diff --git a/include/wx/encconv.h b/include/wx/encconv.h index ca991709e0..13dc535342 100644 --- a/include/wx/encconv.h +++ b/include/wx/encconv.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: encconv.h +// Name: wx/encconv.h // Purpose: wxEncodingConverter class for converting between different // font encodings // Author: Vaclav Slavik @@ -7,26 +7,31 @@ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __ENCCONV_H__ -#define __ENCCONV_H__ +#ifndef _WX_ENCCONV_H_ +#define _WX_ENCCONV_H_ #ifdef __GNUG__ #pragma interface "encconv.h" #endif #include "wx/defs.h" -#include "wx/font.h" +#include "wx/object.h" +#include "wx/fontenc.h" #include "wx/dynarray.h" +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- - -enum { +enum +{ wxCONVERT_STRICT, wxCONVERT_SUBSTITUTE }; -enum { +enum +{ wxPLATFORM_CURRENT = -1, wxPLATFORM_UNIX = 0, @@ -35,8 +40,11 @@ enum { wxPLATFORM_MAC }; -WX_DEFINE_ARRAY(wxFontEncoding, wxFontEncodingArray); +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- +WX_DEFINE_ARRAY(wxFontEncoding, wxFontEncodingArray); //-------------------------------------------------------------------------------- // wxEncodingConverter @@ -52,7 +60,7 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject ~wxEncodingConverter() { if (m_Table) delete[] m_Table; } // Initialize convertion. Both output or input encoding may - // be wxFONTENCODING_UNICODE, but only if wxUSE_UNICODE is set to 1. + // be wxFONTENCODING_UNICODE, but only if wxUSE_WCHAR_T is set to 1. // // All subsequent calls to Convert() will interpret it's argument // as a string in input_enc encoding and will output string in @@ -82,15 +90,15 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject // Convert input string according to settings passed to Init. // Note that you must call Init before using Convert! - void Convert(const wxChar* input, wxChar* output); - void Convert(wxChar* str) { Convert(str, str); } - wxString Convert(const wxString& input); - -#if wxUSE_UNICODE // otherwise wxChar === char - void Convert(const char* input, wxChar* output); - void Convert(const wxChar* input, char* output); void Convert(const char* input, char* output); void Convert(char* str) { Convert(str, str); } + wxString Convert(const wxString& input); + +#if wxUSE_WCHAR_T + void Convert(const char* input, wchar_t* output); + void Convert(const wchar_t* input, char* output); + void Convert(const wchar_t* input, wchar_t* output); + void Convert(wchar_t* str) { Convert(str, str); } #endif // Return equivalent(s) for given font that are used // under given platform. wxPLATFORM_CURRENT means the plaform @@ -129,28 +137,15 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject private: - wxChar *m_Table; +#if wxUSE_WCHAR_T + wchar_t *m_Table; +#else + char *m_Table; +#endif bool m_UnicodeInput, m_UnicodeOutput; bool m_JustCopy; }; -#endif // __ENCCONV_H__ - - - - - - - - - - - - - - - - - +#endif // _WX_ENCCONV_H_ diff --git a/include/wx/event.h b/include/wx/event.h index 9d047f12cb..fe41a55f33 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -51,6 +51,18 @@ class WXDLLEXPORT wxList; typedef int wxEventType; +// these macros are for upwards compatibility with 2.4, +// use them when defining events and event tables +#define DECLARE_EVENT_TABLE_ENTRY(type, id, idLast, fn, obj) \ + { type, id, idLast, fn, obj } + +#define BEGIN_DECLARE_EVENT_TYPES() enum { +#define END_DECLARE_EVENT_TYPES() }; +#define DECLARE_EVENT_TYPE(name, value) name = wxEVT_FIRST + value, +#define DECLARE_LOCAL_EVENT_TYPE(name, value) name = wxEVT_FIRST + value, +#define DEFINE_EVENT_TYPE(name) +#define DEFINE_LOCAL_EVENT_TYPE(name) + // the standard event types enum { @@ -283,7 +295,7 @@ enum wxEVT_PLOT_AREA_SEL_CREATED = wxEVT_FIRST + 1015, wxEVT_PLOT_AREA_SEL_CHANGING = wxEVT_FIRST + 1016, wxEVT_PLOT_AREA_SEL_CHANGED = wxEVT_FIRST + 1017, - wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxEVT_FIRST + 1020, + wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxEVT_FIRST + 1020, wxEVT_PLOT_END_X_LABEL_EDIT = wxEVT_FIRST + 1021, wxEVT_PLOT_BEGIN_Y_LABEL_EDIT = wxEVT_FIRST + 1022, wxEVT_PLOT_END_Y_LABEL_EDIT = wxEVT_FIRST + 1023, @@ -443,7 +455,7 @@ public: wxString GetString() const { return m_commandString; } // Get checkbox value - bool Checked() const { return (m_commandInt != 0); } + bool IsChecked() const { return m_commandInt != 0; } // TRUE if the listbox event was a selection. bool IsSelection() const { return (m_extraLong != 0); } @@ -456,6 +468,10 @@ public: void CopyObject(wxObject& obj) const; +#ifdef WXWIN_COMPATIBILITY_2 + bool Checked() const { return IsChecked(); } +#endif // WXWIN_COMPATIBILITY_2 + public: wxString m_commandString; // String event argument int m_commandInt; @@ -768,7 +784,11 @@ public: bool MetaDown() const { return m_metaDown; } bool AltDown() const { return m_altDown; } bool ShiftDown() const { return m_shiftDown; } - long KeyCode() const { return m_keyCode; } + + bool HasModifiers() const { return ControlDown() || AltDown() || MetaDown(); } + + // get the key code: an ASCII7 char or an element of wxKeyCode enum + int GetKeyCode() const { return (int)m_keyCode; } // Find the position of the event void GetPosition(wxCoord *xpos, wxCoord *ypos) const @@ -796,6 +816,9 @@ public: void CopyObject(wxObject& obj) const; + // deprecated + long KeyCode() const { return m_keyCode; } + public: wxCoord m_x, m_y; @@ -862,7 +885,7 @@ public: #if defined(__WXDEBUG__) && defined(__WXMSW__) // see comments in src/msw/dcclient.cpp where g_isPainting is defined - extern int g_isPainting; + extern WXDLLEXPORT int g_isPainting; #endif // debug class WXDLLEXPORT wxPaintEvent : public wxEvent @@ -973,7 +996,7 @@ class WXDLLEXPORT wxMenuEvent : public wxEvent public: wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0) - { m_eventType = type; m_menuId = id; } + { m_eventType = type; m_menuId = id; m_id = id; } int GetMenuId() const { return m_menuId; } @@ -1369,7 +1392,7 @@ private: wxEVT_DESTROY */ -class WXDLLEXPORT wxWindowCreateEvent : public wxEvent +class WXDLLEXPORT wxWindowCreateEvent : public wxCommandEvent { DECLARE_DYNAMIC_CLASS(wxWindowCreateEvent) @@ -1379,7 +1402,7 @@ public: wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } }; -class WXDLLEXPORT wxWindowDestroyEvent : public wxEvent +class WXDLLEXPORT wxWindowDestroyEvent : public wxCommandEvent { DECLARE_DYNAMIC_CLASS(wxWindowDestroyEvent) @@ -1499,7 +1522,7 @@ public: wxObjectEventFunction func = NULL, wxObject *userData = (wxObject *) NULL ) { return Disconnect(id, -1, eventType, func, userData); } - + // implementation from now on virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); bool SearchDynamicEventTable( wxEvent& event ); @@ -1795,15 +1818,17 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ { wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ { wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ { wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ - { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, // Idle event #define EVT_IDLE(func) \ - { wxEVT_IDLE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_IDLE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, (wxObject *) NULL }, // Update UI event #define EVT_UPDATE_UI(id, func) \ - { wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL }, +#define EVT_UPDATE_UI_RANGE(id1, id2, func) \ + { wxEVT_UPDATE_UI, id1, id2, (wxObjectEventFunction)(wxEventFunction)(wxUpdateUIEventFunction)&func, (wxObject *) NULL }, // ---------------------------------------------------------------------------- // Global data diff --git a/include/wx/ffile.h b/include/wx/ffile.h index 4695dc989b..969aa40039 100644 --- a/include/wx/ffile.h +++ b/include/wx/ffile.h @@ -65,10 +65,11 @@ public: // returns the number of bytes written size_t Write(const void *pBuf, size_t nCount); // returns true on success - bool Write(const wxString& s) + bool Write(const wxString& s, wxMBConv& conv = wxConvLibc) { - size_t size = s.Len()*sizeof(wxChar); - return Write(s.c_str(), size) == size; + const wxWX2MBbuf buf = s.mb_str(conv); + size_t size = strlen(buf); + return Write((const char *)buf, size) == size; } // flush data not yet written bool Flush(); diff --git a/include/wx/file.h b/include/wx/file.h index 89718b6120..d52ad5f423 100644 --- a/include/wx/file.h +++ b/include/wx/file.h @@ -99,10 +99,11 @@ public: // returns the number of bytes written size_t Write(const void *pBuf, size_t nCount); // returns true on success - bool Write(const wxString& s) + bool Write(const wxString& s, wxMBConv& conv = wxConvLibc) { - size_t size = s.Len()*sizeof(wxChar); - return Write(s.c_str(), size) == size; + const wxWX2MBbuf buf = s.mb_str(conv); + size_t size = strlen(buf); + return Write((const char *) buf, size) == size; } // flush data not yet written bool Flush(); diff --git a/include/wx/fileconf.h b/include/wx/fileconf.h index 779dc8d4fa..b7cc9c2cdc 100644 --- a/include/wx/fileconf.h +++ b/include/wx/fileconf.h @@ -121,7 +121,7 @@ private: *m_pPrev; // previous one }; -class wxFileConfig : public wxConfigBase +class WXDLLEXPORT wxFileConfig : public wxConfigBase { public: // construct the "standard" full name for global (system-wide) and @@ -149,6 +149,14 @@ public: // dtor will save unsaved data virtual ~wxFileConfig(); + // under Unix, set the umask to be used for the file creation, do nothing + // under other systems +#ifdef __UNIX__ + void SetUmask(int mode) { m_umask = mode; } +#else // !__UNIX__ + void SetUmask(int WXUNUSED(mode)) { } +#endif // __UNIX__/!__UNIX__ + // implement inherited pure virtual functions virtual void SetPath(const wxString& strPath); virtual const wxString& GetPath() const { return m_strPath; } @@ -244,6 +252,10 @@ private: ConfigGroup *m_pRootGroup, // the top (unnamed) group *m_pCurrentGroup; // the current group +#ifdef __UNIX__ + int m_umask; // the umask to use for file creation +#endif // __UNIX__ + public: WX_DEFINE_SORTED_ARRAY(ConfigEntry *, ArrayEntries); WX_DEFINE_SORTED_ARRAY(ConfigGroup *, ArrayGroups); diff --git a/include/wx/filefn.h b/include/wx/filefn.h index f983b7e93a..0be6462ddb 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -60,6 +60,80 @@ enum wxSeekMode WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; +// ---------------------------------------------------------------------------- +// declare our versions of low level file functions: some compilers prepend +// underscores to the usual names, some also have Unicode versions of them +// ---------------------------------------------------------------------------- + +// Microsoft compiler loves underscores, feed them to it +#ifdef __VISUALC__ + // functions + #define wxClose _close + #define wxRead _read + #define wxWrite _write + #define wxLseek _lseek + #define wxFsync _commit + #define wxEof _eof + + #define wxTell _tell + + #if wxUSE_UNICODE + #define wxOpen _wopen + #define wxAccess _waccess + + #define wxMkDir _wmkdir + #define wxRmDir _wrmdir + + #define wxStat _wstat + #else // !wxUSE_UNICODE + #define wxOpen _open + #define wxAccess _access + + #define wxMkDir _mkdir + #define wxRmDir _rmdir + + #define wxStat _stat + #endif + + // types + #define wxStructStat struct _stat + + // constants (unless already defined by the user code) + #ifndef O_RDONLY + #define O_RDONLY _O_RDONLY + #define O_WRONLY _O_WRONLY + #define O_RDWR _O_RDWR + #define O_EXCL _O_EXCL + #define O_CREAT _O_CREAT + #define O_BINARY _O_BINARY + + #define S_IFMT _S_IFMT + #define S_IFDIR _S_IFDIR + #define S_IFREG _S_IFREG + #endif // O_RDONLY +#else + // functions + #define wxOpen open + #define wxClose close + #define wxRead read + #define wxWrite write + #define wxLseek lseek + #define wxFsync commit + #define wxAccess access + #define wxEof eof + + #define wxMkDir mkdir + #define wxRmDir rmdir + + #define wxTell(fd) lseek(fd, 0, SEEK_CUR) + + #define wxStat stat + + // types + #define wxStructStat struct stat + +#endif // VC++ + // ---------------------------------------------------------------------------- // functions // ---------------------------------------------------------------------------- diff --git a/include/wx/font.h b/include/wx/font.h index 6b1737db51..706aad009f 100644 --- a/include/wx/font.h +++ b/include/wx/font.h @@ -21,6 +21,7 @@ // ---------------------------------------------------------------------------- #include "wx/defs.h" // for wxDEFAULT &c +#include "wx/fontenc.h" // the font encoding constants #include "wx/gdiobj.h" // the base class // ---------------------------------------------------------------------------- @@ -66,62 +67,6 @@ enum wxFontWeight wxFONTWEIGHT_MAX }; -// font encodings -enum wxFontEncoding -{ - wxFONTENCODING_SYSTEM = -1, // system default - wxFONTENCODING_DEFAULT, // current default encoding - - // ISO8859 standard defines a number of single-byte charsets - wxFONTENCODING_ISO8859_1, // West European (Latin1) - wxFONTENCODING_ISO8859_2, // Central and East European (Latin2) - wxFONTENCODING_ISO8859_3, // Esperanto (Latin3) - wxFONTENCODING_ISO8859_4, // Baltic languages (Estonian) (Latin4) - wxFONTENCODING_ISO8859_5, // Cyrillic - wxFONTENCODING_ISO8859_6, // Arabic - wxFONTENCODING_ISO8859_7, // Greek - wxFONTENCODING_ISO8859_8, // Hebrew - wxFONTENCODING_ISO8859_9, // Turkish (Latin5) - wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6) - wxFONTENCODING_ISO8859_11, // Thai - wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it - // here anyhow to make all ISO8859 - // consecutive numbers - wxFONTENCODING_ISO8859_13, // Latin7 - wxFONTENCODING_ISO8859_14, // Latin8 - wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro) - wxFONTENCODING_ISO8859_MAX, - - // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html) - wxFONTENCODING_KOI8, // we don't support any of KOI8 variants - wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866 - wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria - - // what would we do without Microsoft? They have their own encodings - // for DOS - wxFONTENCODING_CP437, // original MS-DOS codepage - wxFONTENCODING_CP850, // CP437 merged with Latin1 - wxFONTENCODING_CP852, // CP437 merged with Latin2 - wxFONTENCODING_CP855, // another cyrillic encoding - wxFONTENCODING_CP866, // and another one - // and for Windows - wxFONTENCODING_CP874, // WinThai - wxFONTENCODING_CP1250, // WinLatin2 - wxFONTENCODING_CP1251, // WinCyrillic - wxFONTENCODING_CP1252, // WinLatin1 - wxFONTENCODING_CP1253, // WinGreek (8859-7) - wxFONTENCODING_CP1254, // WinTurkish - wxFONTENCODING_CP1255, // WinHebrew - wxFONTENCODING_CP1256, // WinArabic - wxFONTENCODING_CP1257, // WinBaltic (same as Latin 7) - wxFONTENCODING_CP12_MAX, - - wxFONTENCODING_UNICODE, // Unicode - currently used only by - // wxEncodingConverter class - - wxFONTENCODING_MAX -}; - // ---------------------------------------------------------------------------- // wxFontBase represents a font object // ---------------------------------------------------------------------------- diff --git a/include/wx/fontenc.h b/include/wx/fontenc.h new file mode 100644 index 0000000000..83300a6f40 --- /dev/null +++ b/include/wx/fontenc.h @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fontenc.h +// Purpose: wxFontEncoding constants +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.03.00 +// RCS-ID: $Id$ +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTENC_H_ +#define _WX_FONTENC_H_ + +// font encodings +enum wxFontEncoding +{ + wxFONTENCODING_SYSTEM = -1, // system default + wxFONTENCODING_DEFAULT, // current default encoding + + // ISO8859 standard defines a number of single-byte charsets + wxFONTENCODING_ISO8859_1, // West European (Latin1) + wxFONTENCODING_ISO8859_2, // Central and East European (Latin2) + wxFONTENCODING_ISO8859_3, // Esperanto (Latin3) + wxFONTENCODING_ISO8859_4, // Baltic (old) (Latin4) + wxFONTENCODING_ISO8859_5, // Cyrillic + wxFONTENCODING_ISO8859_6, // Arabic + wxFONTENCODING_ISO8859_7, // Greek + wxFONTENCODING_ISO8859_8, // Hebrew + wxFONTENCODING_ISO8859_9, // Turkish (Latin5) + wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6) + wxFONTENCODING_ISO8859_11, // Thai + wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it + // here anyhow to make all ISO8859 + // consecutive numbers + wxFONTENCODING_ISO8859_13, // Baltic (Latin7) + wxFONTENCODING_ISO8859_14, // Latin8 + wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro) + wxFONTENCODING_ISO8859_MAX, + + // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html) + wxFONTENCODING_KOI8, // we don't support any of KOI8 variants + wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866 + wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria + + // what would we do without Microsoft? They have their own encodings + // for DOS + wxFONTENCODING_CP437, // original MS-DOS codepage + wxFONTENCODING_CP850, // CP437 merged with Latin1 + wxFONTENCODING_CP852, // CP437 merged with Latin2 + wxFONTENCODING_CP855, // another cyrillic encoding + wxFONTENCODING_CP866, // and another one + // and for Windows + wxFONTENCODING_CP874, // WinThai + wxFONTENCODING_CP1250, // WinLatin2 + wxFONTENCODING_CP1251, // WinCyrillic + wxFONTENCODING_CP1252, // WinLatin1 + wxFONTENCODING_CP1253, // WinGreek (8859-7) + wxFONTENCODING_CP1254, // WinTurkish + wxFONTENCODING_CP1255, // WinHebrew + wxFONTENCODING_CP1256, // WinArabic + wxFONTENCODING_CP1257, // WinBaltic (same as Latin 7) + wxFONTENCODING_CP12_MAX, + + wxFONTENCODING_UNICODE, // Unicode - currently used only by + // wxEncodingConverter class + + wxFONTENCODING_MAX +}; + +#endif // _WX_FONTENC_H_ diff --git a/include/wx/fontmap.h b/include/wx/fontmap.h index ba5403b81d..43285146c0 100644 --- a/include/wx/fontmap.h +++ b/include/wx/fontmap.h @@ -20,11 +20,18 @@ // headers // ---------------------------------------------------------------------------- -#include "wx/font.h" // for wxFont and wxFontEncoding -#include "wx/fontutil.h" // for wxNativeEncodingInfo +#include "wx/fontenc.h" // for wxFontEncoding +#if wxUSE_GUI + #include "wx/fontutil.h" // for wxNativeEncodingInfo +#endif // wxUSE_GUI -class WXDLLEXPORT wxConfigBase; -class WXDLLEXPORT wxWindow; +#if wxUSE_CONFIG + class WXDLLEXPORT wxConfigBase; +#endif // wxUSE_CONFIG + +#if wxUSE_GUI + class WXDLLEXPORT wxWindow; +#endif // wxUSE_GUI // ---------------------------------------------------------------------------- // wxFontMapper manages user-definable correspondence between logical font @@ -49,6 +56,7 @@ public: // virtual dtor for a base class virtual ~wxFontMapper(); +#if wxUSE_GUI // find an alternative for the given encoding (which is supposed to not be // available on this system). If successful, return TRUE and fill info // structure with the parameters required to create the font, otherwise @@ -69,6 +77,7 @@ public: // If no facename is given, virtual bool IsEncodingAvailable(wxFontEncoding encoding, const wxString& facename = wxEmptyString); +#endif // wxUSE_GUI // returns the encoding for the given charset (in the form of RFC 2046) or // wxFONTENCODING_SYSTEM if couldn't decode it @@ -90,11 +99,13 @@ public: // configure the appearance of the dialogs we may popup // ---------------------------------------------------- +#if wxUSE_GUI // the parent window for modal dialogs void SetDialogParent(wxWindow *parent) { m_windowParent = parent; } // the title for the dialogs (note that default is quite reasonable) void SetDialogTitle(const wxString& title) { m_titleDialog = title; } +#endif // wxUSE_GUI // functions which allow to configure the config object used: by default, // the global one (from wxConfigBase::Get() will be used) and the default @@ -102,6 +113,7 @@ public: // GetDefaultConfigPath() // ---------------------------------------------------------------------- +#if wxUSE_CONFIG // set the config object to use (may be NULL to use default) void SetConfig(wxConfigBase *config) { m_config = config; } @@ -110,8 +122,11 @@ public: // return default config path static const wxChar *GetDefaultConfigPath(); +#endif protected: + +#if wxUSE_CONFIG // get the config object we're using - if it wasn't set explicitly, this // function will use wxConfig::Get() to get the global one wxConfigBase *GetConfig(); @@ -119,6 +134,7 @@ protected: // gets the root path for our settings - if itwasn't set explicitly, use // GetDefaultConfigPath() const wxString& GetConfigPath(); +#endif // change to the given (relative) path in the config, return TRUE if ok // (then GetConfig() will return something !NULL), FALSE if no config @@ -131,6 +147,7 @@ protected: // restore the config path after use void RestorePath(const wxString& pathOld); +#if wxUSE_GUI // GetAltForEncoding() helper: tests for the existence of the given // encoding and saves the result in config if ok - this results in the // following (desired) behaviour: when an unknown/unavailable encoding is @@ -141,16 +158,22 @@ protected: bool TestAltEncoding(const wxString& configEntry, wxFontEncoding encReplacement, wxNativeEncodingInfo *info); +#endif // wxUSE_GUI +#if wxUSE_CONFIG // config object and path (in it) to use wxConfigBase *m_config; +#endif + wxString m_configRootPath; +#if wxUSE_GUI // the title for our dialogs wxString m_titleDialog; // the parent window for our dialogs wxWindow *m_windowParent; +#endif // wxUSE_GUI friend class wxFontMapperPathChanger; }; diff --git a/include/wx/frame.h b/include/wx/frame.h index 3a3c0354a3..6f5ca2de91 100644 --- a/include/wx/frame.h +++ b/include/wx/frame.h @@ -192,6 +192,10 @@ protected: // something changes virtual void PositionStatusBar() { } + // show the help string for this menu item in the given status bar: the + // status bar pointer can be NULL; return TRUE if help was shown + bool ShowMenuHelp(wxStatusBar *statbar, int id); + wxStatusBar *m_frameStatusBar; #endif // wxUSE_STATUSBAR diff --git a/include/wx/fs_inet.h b/include/wx/fs_inet.h index 0df2d43213..3480e98cce 100644 --- a/include/wx/fs_inet.h +++ b/include/wx/fs_inet.h @@ -20,7 +20,7 @@ limitation) */ #ifdef __GNUG__ -#pragma implementation +#pragma interface "fs_inet.h" #endif #include "wx/wxprec.h" diff --git a/include/wx/fs_mem.h b/include/wx/fs_mem.h index f85dd29f39..7195025136 100644 --- a/include/wx/fs_mem.h +++ b/include/wx/fs_mem.h @@ -8,7 +8,7 @@ #ifdef __GNUG__ -#pragma implementation +#pragma interface "fs_mem.h" #endif #include "wx/wxprec.h" diff --git a/include/wx/fs_zip.h b/include/wx/fs_zip.h index b884fe055b..46e23f1a90 100644 --- a/include/wx/fs_zip.h +++ b/include/wx/fs_zip.h @@ -8,7 +8,7 @@ #ifdef __GNUG__ -#pragma implementation +#pragma interface "fs_zip.h" #endif #include "wx/wxprec.h" diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 9a7231e8ff..457c2da1e0 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -226,8 +226,8 @@ public: wxRealPoint() { x = y = 0.0; }; wxRealPoint(double xx, double yy) { x = xx; y = yy; }; - wxRealPoint operator+(const wxRealPoint& pt) { return wxRealPoint(x + pt.x, y + pt.y); } - wxRealPoint operator-(const wxRealPoint& pt) { return wxRealPoint(x - pt.x, y - pt.y); } + wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); } + wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); } bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; } }; @@ -247,8 +247,8 @@ public: bool operator!=(const wxPoint& p) const { return !(*this == p); } // arithmetic operations (component wise) - wxPoint operator+(const wxPoint& p) { return wxPoint(x + p.x, y + p.y); } - wxPoint operator-(const wxPoint& p) { return wxPoint(x - p.x, y - p.y); } + wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); } + wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); } wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; } wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; } diff --git a/include/wx/generic/caret.h b/include/wx/generic/caret.h index ffb95c3422..9b2340de44 100644 --- a/include/wx/generic/caret.h +++ b/include/wx/generic/caret.h @@ -48,14 +48,24 @@ public: // implementation // -------------- - // blink the caret once - void Blink(); + // called by wxWindow (not using the event tables) + virtual void OnSetFocus(); + virtual void OnKillFocus(); + + // called by wxCaretTimer + void OnTimer(); protected: virtual void DoShow(); virtual void DoHide(); virtual void DoMove(); + // blink the caret once + void Blink(); + + // refresh the caret + void Refresh(); + // draw the caret on the given DC void DoDraw(wxDC *dc); @@ -64,7 +74,8 @@ private: void InitGeneric(); wxCaretTimer m_timer; - bool m_blinkedOut; // TRUE => caret hidden right now + bool m_blinkedOut, // TRUE => caret hidden right now + m_hasFocus; // TRUE => our window has focus }; #endif // _WX_CARET_H_ diff --git a/include/wx/generic/colrdlgg.h b/include/wx/generic/colrdlgg.h index 2b9e0dc4e1..e246d07966 100644 --- a/include/wx/generic/colrdlgg.h +++ b/include/wx/generic/colrdlgg.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: colrdlgg.h +// Name: wx/generic/colrdlgg.h // Purpose: wxGenericColourDialog // Author: Julian Smart // Modified by: @@ -27,88 +27,91 @@ #define wxID_BLUE_SLIDER 3003 class WXDLLEXPORT wxSlider; -class WXDLLEXPORT wxGenericColourDialog: public wxDialog +class WXDLLEXPORT wxGenericColourDialog : public wxDialog { - DECLARE_DYNAMIC_CLASS(wxGenericColourDialog) - protected: - wxColourData colourData; - wxWindow *dialogParent; +public: + wxGenericColourDialog(); + wxGenericColourDialog(wxWindow *parent, + wxColourData *data = (wxColourData *) NULL); + virtual ~wxGenericColourDialog(); - // Area reserved for grids of colours - wxRect standardColoursRect; - wxRect customColoursRect; - wxRect singleCustomColourRect; + bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); - // Size of each colour rectangle - wxPoint smallRectangleSize; + wxColourData &GetColourData() { return colourData; } - // For single customizable colour - wxPoint customRectangleSize; + virtual int ShowModal(); - // Grid spacing (between rectangles) - int gridSpacing; + // Internal functions + void OnMouseEvent(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); - // Section spacing (between left and right halves of dialog box) - int sectionSpacing; + virtual void CalculateMeasurements(); + virtual void CreateWidgets(); + virtual void InitializeColours(); - // 48 'standard' colours - wxColour standardColours[48]; + virtual void PaintBasicColours(wxDC& dc); + virtual void PaintCustomColours(wxDC& dc); + virtual void PaintCustomColour(wxDC& dc); + virtual void PaintHighlight(wxDC& dc, bool draw); - // 16 'custom' colours - wxColour customColours[16]; + virtual void OnBasicColourClick(int which); + virtual void OnCustomColourClick(int which); - // One single custom colour (use sliders) - wxColour singleCustomColour; + void OnAddCustom(wxCommandEvent& event); - // Which colour is selected? An index into one of the two areas. - int colourSelection; - int whichKind; // 1 for standard colours, 2 for custom colours, + void OnRedSlider(wxCommandEvent& event); + void OnGreenSlider(wxCommandEvent& event); + void OnBlueSlider(wxCommandEvent& event); - wxSlider *redSlider; - wxSlider *greenSlider; - wxSlider *blueSlider; + void OnCloseWindow(wxCloseEvent& event); - int buttonY; +protected: + wxColourData colourData; + wxWindow *dialogParent; - int okButtonX; - int customButtonX; + // Area reserved for grids of colours + wxRect standardColoursRect; + wxRect customColoursRect; + wxRect singleCustomColourRect; -// static bool colourDialogCancelled; - public: - wxGenericColourDialog(void); - wxGenericColourDialog(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); - ~wxGenericColourDialog(void); + // Size of each colour rectangle + wxPoint smallRectangleSize; - bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); + // For single customizable colour + wxPoint customRectangleSize; - int ShowModal(void); - wxColourData &GetColourData(void) { return colourData; } + // Grid spacing (between rectangles) + int gridSpacing; - // Internal functions - void OnMouseEvent(wxMouseEvent& event); - void OnPaint(wxPaintEvent& event); + // Section spacing (between left and right halves of dialog box) + int sectionSpacing; - virtual void CalculateMeasurements(void); - virtual void CreateWidgets(void); - virtual void InitializeColours(void); - - virtual void PaintBasicColours(wxDC& dc); - virtual void PaintCustomColours(wxDC& dc); - virtual void PaintCustomColour(wxDC& dc); - virtual void PaintHighlight(wxDC& dc, bool draw); + // 48 'standard' colours + wxColour standardColours[48]; - virtual void OnBasicColourClick(int which); - virtual void OnCustomColourClick(int which); + // 16 'custom' colours + wxColour customColours[16]; - void OnAddCustom(wxCommandEvent& event); + // One single custom colour (use sliders) + wxColour singleCustomColour; - void OnRedSlider(wxCommandEvent& event); - void OnGreenSlider(wxCommandEvent& event); - void OnBlueSlider(wxCommandEvent& event); + // Which colour is selected? An index into one of the two areas. + int colourSelection; + int whichKind; // 1 for standard colours, 2 for custom colours, - void OnCloseWindow(wxCloseEvent& event); + wxSlider *redSlider; + wxSlider *greenSlider; + wxSlider *blueSlider; -DECLARE_EVENT_TABLE() + int buttonY; + + int okButtonX; + int customButtonX; + + // static bool colourDialogCancelled; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericColourDialog) }; /* This shouldn't be necessary, we have a #define in wx/colordlg.h. diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index 9ce1a6efe4..2dd0dbca4a 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -130,6 +130,12 @@ public: virtual int GetDepth() const { return 24; } + static void SetResolution(int ppi); + static int GetResolution(); + +private: + static float ms_PSScaleFactor; + protected: FILE* m_pstream; // PostScript output stream diff --git a/include/wx/generic/dirdlgg.h b/include/wx/generic/dirdlgg.h index 2f06ecc14c..53135f57bb 100644 --- a/include/wx/generic/dirdlgg.h +++ b/include/wx/generic/dirdlgg.h @@ -6,7 +6,7 @@ // Created: 12/12/98 // Copyright: (c) Harm van der Heijden and Robert Roebling // RCS-ID: $Id$ -// Licence: wxWindows licence +// Licence: wxWindows licence // // Notes: wxDirDialog class written by Harm van der Heijden, // uses wxDirCtrl class written by Robert Roebling for the @@ -106,11 +106,11 @@ public: wxDirCtrl(); wxDirCtrl(wxWindow *parent, const wxWindowID id = -1, - const wxString &dir = wxDirDialogDefaultFolderStr, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - const long style = wxTR_HAS_BUTTONS, - const wxString& name = wxTreeCtrlNameStr ); + const wxString &dir = wxDirDialogDefaultFolderStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const long style = wxTR_HAS_BUTTONS, + const wxString& name = wxTreeCtrlNameStr ); void ShowHidden( const bool yesno ); void OnExpandItem(wxTreeEvent &event ); void OnCollapseItem(wxTreeEvent &event ); @@ -118,6 +118,8 @@ public: void OnEndEditItem(wxTreeEvent &event ); protected: + friend class wxDirDialog; + void CreateItems(const wxTreeItemId &parent); void SetupSections(); wxArrayString m_paths, m_names; @@ -136,9 +138,9 @@ class WXDLLEXPORT wxDirDialog: public wxDialog public: wxDirDialog() {} wxDirDialog(wxWindow *parent, - const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultPath = wxEmptyString, - long style = 0, const wxPoint& pos = wxDefaultPosition); + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = 0, const wxPoint& pos = wxDefaultPosition); inline void SetMessage(const wxString& message) { m_message = message; } inline void SetPath(const wxString& path) { m_path = path; } inline void SetStyle(long style) { m_dialogStyle = style; } diff --git a/include/wx/generic/dragimgg.h b/include/wx/generic/dragimgg.h index f35a28cc6f..53830a504c 100644 --- a/include/wx/generic/dragimgg.h +++ b/include/wx/generic/dragimgg.h @@ -97,7 +97,11 @@ public: // Ctors & dtor //////////////////////////////////////////////////////////////////////////// - wxGenericDragImage(); + wxGenericDragImage(const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0)) + { + Init(); + Create(cursor, hotspot); + } wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0)) { Init(); @@ -133,9 +137,16 @@ public: // Attributes //////////////////////////////////////////////////////////////////////////// + // For efficiency, tell wxGenericDragImage to use a bitmap that's already + // created (e.g. from last drag) + void SetBackingBitmap(wxBitmap* bitmap) { m_pBackingBitmap = bitmap; } + // Operations //////////////////////////////////////////////////////////////////////////// + // Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect) + bool Create(const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0)); + // Create a drag image from a bitmap and optional cursor bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0)); @@ -178,10 +189,22 @@ public: void Init(); - wxRect GetImageRect(const wxPoint& pos) const; + // Override this if you are using a virtual image (drawing your own image) + virtual wxRect GetImageRect(const wxPoint& pos) const; + + // Override this if you are using a virtual image (drawing your own image) + virtual bool DoDrawImage(wxDC& dc, const wxPoint& pos) const; + + // Override this if you wish to draw the window contents to the backing bitmap + // yourself. This can be desirable if you wish to avoid flicker by not having to + // redraw the window itself before dragging in order to be graphic-minus-dragged-objects. + // Instead, paint the drag image's backing bitmap to be correct, and leave the window + // to be updated only when dragging the objects away (thus giving a smoother appearance). + virtual bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC, + const wxRect& sourceRect, const wxRect& destRect) const; // Erase and redraw simultaneously if possible - bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew); + virtual bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew); protected: wxBitmap m_bitmap; @@ -189,6 +212,7 @@ protected: wxCursor m_cursor; wxCursor m_oldCursor; wxPoint m_hotspot; + wxPoint m_offset; // The hostpot value passed to BeginDrag wxPoint m_position; bool m_isDirty; bool m_isShown; @@ -197,6 +221,8 @@ protected: // Stores the window contents while we're dragging the image around wxBitmap m_backingBitmap; + wxBitmap* m_pBackingBitmap; // Pointer to existing backing bitmap + // (pass to wxGenericDragImage as an efficiency measure) // A temporary bitmap for repairing/redrawing wxBitmap m_repairBitmap; diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 5f707fb54b..dca3220704 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -298,6 +298,8 @@ public: wxGridCellEditor(); bool IsCreated() { return m_control != NULL; } + wxControl* GetControl() { return m_control; } + void SetControl(wxControl* control) { m_control = control; } // Creates the actual edit control virtual void Create(wxWindow* parent, @@ -326,9 +328,18 @@ public: // Reset the value in the control back to its starting value virtual void Reset() = 0; - // If the editor is enabled by pressing keys on the grid, - // this will be called to let the editor do something about - // that first key if desired. + // return TRUE to allow the given key to start editing: the base class + // version only checks that the event has no modifiers. The derived + // classes are supposed to do "if ( base::IsAcceptedKey() && ... )" in + // their IsAcceptedKey() implementation, although, of course, it is not a + // mandatory requirment. + // + // NB: if the key is F2 (special), editing will always start and this + // method will not be called at all (but StartingKey() will) + virtual bool IsAcceptedKey(wxKeyEvent& event); + + // If the editor is enabled by pressing keys on the grid, this will be + // called to let the editor do something about that first key if desired virtual void StartingKey(wxKeyEvent& event); // if the editor is enabled by clicking on the cell, this method will be @@ -377,6 +388,7 @@ public: virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + virtual bool IsAcceptedKey(wxKeyEvent& event); virtual void BeginEdit(int row, int col, wxGrid* grid); virtual bool EndEdit(int row, int col, wxGrid* grid); @@ -414,6 +426,7 @@ public: wxWindowID id, wxEvtHandler* evtHandler); + virtual bool IsAcceptedKey(wxKeyEvent& event); virtual void BeginEdit(int row, int col, wxGrid* grid); virtual bool EndEdit(int row, int col, wxGrid* grid); @@ -447,10 +460,13 @@ private: class WXDLLEXPORT wxGridCellFloatEditor : public wxGridCellTextEditor { public: + wxGridCellFloatEditor(int width = -1, int precision = -1); + virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler); + virtual bool IsAcceptedKey(wxKeyEvent& event); virtual void BeginEdit(int row, int col, wxGrid* grid); virtual bool EndEdit(int row, int col, wxGrid* grid); @@ -460,12 +476,16 @@ public: virtual wxGridCellEditor *Clone() const { return new wxGridCellFloatEditor; } + // parameters string format is "width,precision" + virtual void SetParameters(const wxString& params); + protected: // string representation of m_valueOld - wxString GetString() const - { return wxString::Format(_T("%f"), m_valueOld); } + wxString GetString() const; private: + int m_width, + m_precision; double m_valueOld; }; @@ -480,6 +500,7 @@ public: virtual void SetSize(const wxRect& rect); virtual void Show(bool show, wxGridCellAttr *attr = (wxGridCellAttr *)NULL); + virtual bool IsAcceptedKey(wxKeyEvent& event); virtual void BeginEdit(int row, int col, wxGrid* grid); virtual bool EndEdit(int row, int col, wxGrid* grid); @@ -502,7 +523,7 @@ class WXDLLEXPORT wxGridCellChoiceEditor : public wxGridCellEditor public: // if !allowOthers, user can't type a string not in choices array wxGridCellChoiceEditor(size_t count = 0, - const wxChar* choices[] = NULL, + const wxString choices[] = NULL, bool allowOthers = FALSE); virtual void Create(wxWindow* parent, @@ -754,11 +775,6 @@ public: // a wxGridCellAttrProvider if necessary. virtual bool CanHaveAttributes(); - - // change row/col number in attribute if needed - virtual void UpdateAttrRows( size_t pos, int numRows ); - virtual void UpdateAttrCols( size_t pos, int numCols ); - // by default forwarded to wxGridCellAttrProvider if any. May be // overridden to handle attributes directly in the table. virtual wxGridCellAttr *GetAttr( int row, int col ); @@ -933,8 +949,8 @@ private: // For comparisons... // -extern wxGridCellCoords wxGridNoCellCoords; -extern wxRect wxGridNoCellRect; +extern WXDLLEXPORT wxGridCellCoords wxGridNoCellCoords; +extern WXDLLEXPORT wxRect wxGridNoCellRect; // An array of cell coords... // @@ -979,10 +995,10 @@ public: // ------ display update functions // - void CalcRowLabelsExposed( wxRegion& reg ); + void CalcRowLabelsExposed( const wxRegion& reg ); - void CalcColLabelsExposed( wxRegion& reg ); - void CalcCellsExposed( wxRegion& reg ); + void CalcColLabelsExposed( const wxRegion& reg ); + void CalcCellsExposed( const wxRegion& reg ); // ------ event handlers @@ -1049,7 +1065,8 @@ public: // flicker // void BeginBatch() { m_batchCount++; } - void EndBatch() { if ( m_batchCount > 0 ) m_batchCount--; } + void EndBatch(); + int GetBatchCount() { return m_batchCount; } @@ -1062,6 +1079,7 @@ public: void DisableCellEditControl() { EnableCellEditControl(FALSE); } bool CanEnableCellControl() const; bool IsCellEditControlEnabled() const; + bool IsCellEditControlShown() const; bool IsCurrentCellReadOnly() const; @@ -1131,6 +1149,7 @@ public: wxString GetRowLabelValue( int row ); wxString GetColLabelValue( int col ); wxColour GetGridLineColour() { return m_gridLineColour; } + wxColour GetCellHighlightColour() { return m_cellHighlightColour; } void SetRowLabelSize( int width ); void SetColLabelSize( int height ); @@ -1142,6 +1161,7 @@ public: void SetRowLabelValue( int row, const wxString& ); void SetColLabelValue( int col, const wxString& ); void SetGridLineColour( const wxColour& ); + void SetCellHighlightColour( const wxColour& ); void EnableDragRowSize( bool enable = TRUE ); void DisableDragRowSize() { EnableDragRowSize( FALSE ); } @@ -1270,12 +1290,27 @@ public: void SelectRow( int row, bool addToSelected = FALSE ); void SelectCol( int col, bool addToSelected = FALSE ); - void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol ); + // MB: This ugly confusion of SelectBlock functions will be absent + // in post wx-2.2 releases + // + void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected ); + + void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol ) + { SelectBlock( topRow, leftCol, bottomRow, rightCol, FALSE ); } + + void SelectBlock( const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool addToSelected ) + { SelectBlock( topLeft.GetRow(), topLeft.GetCol(), + bottomRight.GetRow(), bottomRight.GetCol(), + addToSelected ); } void SelectBlock( const wxGridCellCoords& topLeft, const wxGridCellCoords& bottomRight ) { SelectBlock( topLeft.GetRow(), topLeft.GetCol(), - bottomRight.GetRow(), bottomRight.GetCol() ); } + bottomRight.GetRow(), bottomRight.GetCol(), + FALSE ); } void SelectAll(); @@ -1296,15 +1331,6 @@ public: wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft, const wxGridCellCoords & bottomRight ); - // This function returns the rectangle that encloses the selected cells - // in device coords and clipped to the client size of the grid window. - // - wxRect SelectionToDeviceRect() - { - return BlockToDeviceRect( m_selectingTopLeft, - m_selectingBottomRight ); - } - // Access or update the selection fore/back colours wxColour GetSelectionBackground() const { return m_selectionBackground; } @@ -1347,7 +1373,7 @@ public: int x, int y, int w = -1, int h = -1, long style = wxWANTS_CHARS, const wxString& name = wxPanelNameStr ) - : wxScrolledWindow( parent, -1, wxPoint(x,y), wxSize(w,h), + : wxScrolledWindow( parent, -1, wxPoint(x,y), wxSize(w,h), (style|wxWANTS_CHARS), name ) { Create(); @@ -1511,11 +1537,6 @@ protected: wxGridTableBase *m_table; bool m_ownTable; - int m_left; - int m_top; - int m_right; - int m_bottom; - int m_numRows; int m_numCols; @@ -1579,6 +1600,7 @@ protected: wxColour m_gridLineColour; bool m_gridLinesEnabled; + wxColour m_cellHighlightColour; // common part of AutoSizeColumn/Row() and GetBestSize() int SetOrCalcColumnSizes(bool calcOnly, bool setAsMin = TRUE); @@ -1704,6 +1726,7 @@ protected: void OnPaint( wxPaintEvent& ); void OnSize( wxSizeEvent& ); void OnKeyDown( wxKeyEvent& ); + void OnKeyUp( wxKeyEvent& ); void OnEraseBackground( wxEraseEvent& ); @@ -1711,6 +1734,12 @@ protected: void SetCurrentCell( int row, int col ) { SetCurrentCell( wxGridCellCoords(row, col) ); } + void HighlightBlock( int topRow, int leftCol, int bottomRow, int rightCol ); + + void HighlightBlock( const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight ) + { HighlightBlock( topLeft.GetRow(), topLeft.GetCol(), + bottomRight.GetRow(), bottomRight.GetCol() ); } // ------ functions to get/send data (see also public functions) // diff --git a/include/wx/generic/helpext.h b/include/wx/generic/helpext.h index 3c0b0c0360..8cdedc4d89 100644 --- a/include/wx/generic/helpext.h +++ b/include/wx/generic/helpext.h @@ -74,7 +74,7 @@ DECLARE_CLASS(wxExtHelpController) /// Is the viewer a variant of netscape? bool m_BrowserIsNetscape; /// Call the browser using a relative URL. - virtual bool DisplayHelp(wxString const &); + virtual bool DisplayHelp(const wxString&); }; #endif // wxUSE_HELP diff --git a/include/wx/generic/helphtml.h b/include/wx/generic/helphtml.h index 6bf25dff3e..44a5cbc4a2 100644 --- a/include/wx/generic/helphtml.h +++ b/include/wx/generic/helphtml.h @@ -103,6 +103,10 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) /** Display help for id sectionNo -- identical with DisplaySection(). @return true on success */ + virtual bool DisplaySection(const wxString& section); + /** Display help for URL (using DisplayHelp) or keyword (using KeywordSearch) + @return true on success + */ virtual bool DisplayBlock(long blockNo); /** Search comment/documentation fields in map file and present a list to chose from. @@ -117,7 +121,7 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) virtual void OnQuit(void); /// Call the browser using a relative URL. - virtual bool DisplayHelp(wxString const &) = 0; + virtual bool DisplayHelp(const wxString &) = 0; /// Allows one to override the default settings for the help frame. virtual void SetFrameParameters(const wxString& WXUNUSED(title), diff --git a/include/wx/generic/helpwxht.h b/include/wx/generic/helpwxht.h index 449c20f085..62d3da59aa 100644 --- a/include/wx/generic/helpwxht.h +++ b/include/wx/generic/helpwxht.h @@ -58,7 +58,7 @@ DECLARE_CLASS(wxHelpControllerHtml) private: /// Call the browser using a relative URL. - virtual bool DisplayHelp(wxString const &); + virtual bool DisplayHelp(const wxString &); protected: friend class wxHelpFrame; class wxHelpFrame *m_Frame; diff --git a/include/wx/generic/helpxlp.h b/include/wx/generic/helpxlp.h index 823b5b936f..2452d92910 100644 --- a/include/wx/generic/helpxlp.h +++ b/include/wx/generic/helpxlp.h @@ -104,6 +104,11 @@ class WXDLLEXPORT wxXLPHelpController: public wxHelpControllerBase virtual bool DisplayBlock(long blockNo); virtual bool KeywordSearch(const wxString& k); + virtual bool DisplaySection(const wxString& section) + { + return wxHelpControllerBase::DisplaySection(section); + } + virtual bool Quit(void); virtual void OnQuit(void); diff --git a/include/wx/generic/imaglist.h b/include/wx/generic/imaglist.h index e65e1787c7..390a498328 100644 --- a/include/wx/generic/imaglist.h +++ b/include/wx/generic/imaglist.h @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.h +// Name: wx/generic/imaglist.h // Purpose: // Author: Robert Roebling // Created: 01/02/97 // Id: // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef __IMAGELISTH_G__ @@ -49,15 +49,16 @@ enum { class wxImageList: public wxObject { - DECLARE_DYNAMIC_CLASS(wxImageList) - - public: - +public: wxImageList() { } wxImageList( int width, int height, bool mask = TRUE, int initialCount = 1 ); ~wxImageList(); + bool Create( int width, int height, bool mask = TRUE, int initialCount = 1 ); bool Create(); + int GetImageCount() const; + bool GetSize( int index, int &width, int &height ) const; + int Add( const wxBitmap& bitmap ); int Add( const wxBitmap& bitmap, const wxBitmap& mask ); int Add( const wxBitmap& bitmap, const wxColour& maskColour ); @@ -65,15 +66,18 @@ class wxImageList: public wxObject bool Replace( int index, const wxBitmap &bitmap ); bool Remove( int index ); bool RemoveAll(); - bool GetSize( int index, int &width, int &height ) const; + bool Draw(int index, wxDC& dc, int x, int y, - int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE ); - - private: + int flags = wxIMAGELIST_DRAW_NORMAL, + bool solidBackground = FALSE); +private: wxList m_images; + int m_width; int m_height; + + DECLARE_DYNAMIC_CLASS(wxImageList) }; #endif // __IMAGELISTH_G__ diff --git a/include/wx/generic/laywin.h b/include/wx/generic/laywin.h index bc6f743951..db428595fd 100644 --- a/include/wx/generic/laywin.h +++ b/include/wx/generic/laywin.h @@ -141,7 +141,18 @@ class WXDLLEXPORT wxSashLayoutWindow: public wxSashWindow { DECLARE_CLASS(wxSashLayoutWindow) public: + wxSashLayoutWindow() + { + Init(); + } + wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow") + { + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow"); // Accessors @@ -161,7 +172,10 @@ public: // Called by layout algorithm to retrieve information about the window. void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event); -protected: + +private: + void Init(); + wxLayoutAlignment m_alignment; wxLayoutOrientation m_orientation; wxSize m_defaultSize; @@ -190,7 +204,7 @@ public: return LayoutWindow(frame, mainWindow); } - // mainWindow is sized to whatever's left over. This function for backward + // mainWindow is sized to whatever's left over. bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL); }; diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h index de9db536e2..eda2bd5abd 100644 --- a/include/wx/generic/panelg.h +++ b/include/wx/generic/panelg.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: panelg.h -// Purpose: wxPanel: similar to wxWindows but is coloured as for a dialog +// Name: wx/generic/panelg.h +// Purpose: wxPanel: a container for child controls // Author: Julian Smart // Modified by: // Created: 01/02/97 @@ -13,14 +13,23 @@ #define _WX_GENERIC_PANEL_H_ #ifdef __GNUG__ -#pragma interface "panelg.h" + #pragma interface "panelg.h" #endif +// ---------------------------------------------------------------------------- +// headers and forward declarations +// ---------------------------------------------------------------------------- + #include "wx/window.h" -#include "wx/button.h" + +class WXDLLEXPORT wxButton; WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr; +// ---------------------------------------------------------------------------- +// wxPanel contains other controls and implements TAB traversal between them +// ---------------------------------------------------------------------------- + class WXDLLEXPORT wxPanel : public wxWindow { public: @@ -106,5 +115,8 @@ private: DECLARE_EVENT_TABLE() }; +// this function is for wxWindows use only +extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child); + #endif // _WX_GENERIC_PANEL_H_ diff --git a/include/wx/generic/plot.h b/include/wx/generic/plot.h index 69db90d019..a929055c57 100644 --- a/include/wx/generic/plot.h +++ b/include/wx/generic/plot.h @@ -325,9 +325,9 @@ public: void ResetScrollbar(); private: - friend wxPlotArea; - friend wxPlotXAxisArea; - friend wxPlotYAxisArea; + friend class wxPlotArea; + friend class wxPlotXAxisArea; + friend class wxPlotYAxisArea; double m_xUnitsPerValue; double m_xZoom; diff --git a/include/wx/generic/sashwin.h b/include/wx/generic/sashwin.h index d1dfdbfefb..647cbd6aff 100644 --- a/include/wx/generic/sashwin.h +++ b/include/wx/generic/sashwin.h @@ -55,8 +55,11 @@ public: */ #define wxSW_NOBORDER 0x0000 -#define wxSW_3D 0x0010 +//#define wxSW_3D 0x0010 #define wxSW_BORDER 0x0020 +#define wxSW_3DSASH 0x0040 +#define wxSW_3DBORDER 0x0080 +#define wxSW_3D (wxSW_3DSASH | wxSW_3DBORDER) /* * wxSashWindow allows any of its edges to have a sash which can be dragged @@ -74,13 +77,24 @@ public: // Public API // Default constructor - wxSashWindow(); + wxSashWindow() + { + Init(); + } // Normal constructor wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow"); + const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow") + { + Init(); + Create(parent, id, pos, size, style, name); + } + ~wxSashWindow(); + bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow"); + // Set whether there's a sash in this position void SetSashVisible(wxSashEdgePosition edge, bool sash); @@ -151,7 +165,9 @@ public: // Initialize colours void InitColours(); -protected: +private: + void Init(); + wxSashEdge m_sashes[4]; int m_dragMode; wxSashEdgePosition m_draggingEdge; diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index 4bdd5ace6a..0307f1902a 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -60,16 +60,30 @@ public: // Public API // Default constructor - wxSplitterWindow(); + wxSplitterWindow() + { + Init(); + } // Normal constructor wxSplitterWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D|wxCLIP_CHILDREN, - const wxString& name = "splitter"); + const wxString& name = "splitter") + { + Init(); + Create(parent, id, pos, size, style, name); + } + ~wxSplitterWindow(); + bool Create(wxWindow *parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_3D|wxCLIP_CHILDREN, + const wxString& name = "splitter"); + // Gets the only or left/top pane wxWindow *GetWindow1() const { return m_windowOne; } @@ -164,23 +178,26 @@ public: void OnIdle(wxIdleEvent& event); // Draws borders - void DrawBorders(wxDC& dc); + virtual void DrawBorders(wxDC& dc); // Draws the sash - void DrawSash(wxDC& dc); + virtual void DrawSash(wxDC& dc); // Draws the sash tracker (for whilst moving the sash) - void DrawSashTracker(int x, int y); + virtual void DrawSashTracker(int x, int y); // Tests for x, y over sash - bool SashHitTest(int x, int y, int tolerance = 2); + virtual bool SashHitTest(int x, int y, int tolerance = 2); // Resizes subwindows - void SizeWindows(); + virtual void SizeWindows(); // Initialize colours void InitColours(); + void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; } + bool GetNeedUpdating() const { return m_needUpdating ; } + protected: // our event handlers void OnSashPosChanged(wxSplitterEvent& event); @@ -191,9 +208,13 @@ protected: void SendUnsplitEvent(wxWindow *winRemoved); +private: + void Init(); + + int m_splitMode; bool m_permitUnsplitAlways; - bool m_needUpdating; // when in live mode, set the to TRUE to resize children in idle + bool m_needUpdating; // when in live mode, set this to TRUE to resize children in idle wxWindow* m_windowOne; wxWindow* m_windowTwo; int m_dragMode; diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h index 7d1dd7e39d..50d949b2b2 100644 --- a/include/wx/generic/treectrl.h +++ b/include/wx/generic/treectrl.h @@ -312,6 +312,8 @@ public: // expand this item void Expand(const wxTreeItemId& item); + // expand this item and all subitems recursively + void ExpandAll(const wxTreeItemId& item); // collapse the item without removing its children void Collapse(const wxTreeItemId& item); // collapse the item and remove all children @@ -408,6 +410,7 @@ protected: wxTimer *m_renameTimer; bool m_renameAccept; + bool m_lastOnSame; // last click on the same item as prev wxString m_renameRes; // the common part of all ctors diff --git a/include/wx/generic/treelay.h b/include/wx/generic/treelay.h index f4a90e808e..02a697132f 100644 --- a/include/wx/generic/treelay.h +++ b/include/wx/generic/treelay.h @@ -61,7 +61,7 @@ public: inline long GetLeftMargin(void) const { return m_leftMargin; } inline bool GetOrientation(void) const { return m_orientation; } - inline void SetOrientation(bool or) { m_orientation = or; } + inline void SetOrientation(bool orient) { m_orientation = orient; } private: void CalcLayout(long node_id, int level, wxDC& dc); diff --git a/include/wx/generic/wizard.h b/include/wx/generic/wizard.h index 7c26f62b85..32186f6bab 100644 --- a/include/wx/generic/wizard.h +++ b/include/wx/generic/wizard.h @@ -24,12 +24,12 @@ public: int id = -1, const wxString& title = wxEmptyString, const wxBitmap& bitmap = wxNullBitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize); + const wxPoint& pos = wxDefaultPosition); // implement base class pure virtuals virtual bool RunWizard(wxWizardPage *firstPage); virtual wxWizardPage *GetCurrentPage() const; + virtual void SetPageSize(const wxSize& size); virtual wxSize GetPageSize() const; // implementation only from now on @@ -39,15 +39,27 @@ public: bool IsRunning() const { return m_page != NULL; } // show the prev/next page, but call TransferDataFromWindow on the current - // page first and return FALSE without changing the page if it returns - // FALSE + // page first and return FALSE without changing the page if + // TransferDataFromWindow() returns FALSE - otherwise, returns TRUE bool ShowPage(wxWizardPage *page, bool goingForward = TRUE); private: + // was the dialog really created? + bool WasCreated() const { return m_btnPrev != NULL; } + + // do fill the dialog with controls + void DoCreateControls(); + // event handlers void OnCancel(wxCommandEvent& event); void OnBackOrNext(wxCommandEvent& event); + // the page size requested by user + wxSize m_sizePage; + + // the dialog position from the ctor + wxPoint m_posWizard; + // wizard dimensions int m_x, m_y; // the origin for the pages int m_width, // the size of the page itself diff --git a/include/wx/gtk/app.h b/include/wx/gtk/app.h index 7b911ec302..1b2ab8de77 100644 --- a/include/wx/gtk/app.h +++ b/include/wx/gtk/app.h @@ -92,4 +92,6 @@ extern "C" } #endif +int WXDLLEXPORT wxEntry( int argc, char *argv[] ); + #endif // __GTKAPPH__ diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index 5096d3b8b5..41959d5ba6 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -70,8 +70,8 @@ public: wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM ); ~wxBitmap(); wxBitmap& operator = ( const wxBitmap& bmp ); - bool operator == ( const wxBitmap& bmp ); - bool operator != ( const wxBitmap& bmp ); + bool operator == ( const wxBitmap& bmp ) const; + bool operator != ( const wxBitmap& bmp ) const; bool Ok() const; bool Create(int width, int height, int depth = -1); diff --git a/include/wx/gtk/bmpbuttn.h b/include/wx/gtk/bmpbuttn.h index 3f1c684d63..233e8d90e8 100644 --- a/include/wx/gtk/bmpbuttn.h +++ b/include/wx/gtk/bmpbuttn.h @@ -74,6 +74,10 @@ public: void SetBitmapLabel( const wxBitmap& bitmap ); void SetBitmapSelected( const wxBitmap& bitmap ); + void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } + int GetMarginX() const { return m_marginX; } + int GetMarginY() const { return m_marginY; } + virtual bool Enable(bool enable); // implementation @@ -93,6 +97,10 @@ public: wxBitmap m_focus; wxBitmap m_selected; +protected: + int m_marginX; + int m_marginY; + private: DECLARE_DYNAMIC_CLASS(wxBitmapButton) }; diff --git a/include/wx/gtk/brush.h b/include/wx/gtk/brush.h index d42e564a81..31d4b7292c 100644 --- a/include/wx/gtk/brush.h +++ b/include/wx/gtk/brush.h @@ -40,8 +40,8 @@ public: wxBrush( const wxBrush &brush ); ~wxBrush(); wxBrush& operator = ( const wxBrush& brush ); - bool operator == ( const wxBrush& brush ); - bool operator != ( const wxBrush& brush ); + bool operator == ( const wxBrush& brush ) const; + bool operator != ( const wxBrush& brush ) const; bool Ok() const; int GetStyle() const; diff --git a/include/wx/gtk/dc.h b/include/wx/gtk/dc.h index 2ce4f8de26..78c421c9c4 100644 --- a/include/wx/gtk/dc.h +++ b/include/wx/gtk/dc.h @@ -148,7 +148,6 @@ public: bool m_needComputeScaleX, m_needComputeScaleY; // not yet used - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. private: DECLARE_ABSTRACT_CLASS(wxDC) diff --git a/include/wx/gtk/dialog.h b/include/wx/gtk/dialog.h index c996833727..7050e0b05e 100644 --- a/include/wx/gtk/dialog.h +++ b/include/wx/gtk/dialog.h @@ -103,6 +103,9 @@ protected: // common part of all ctors void Init(); + // common part of Destroy() and ~wxDialog + void CleanUp(); + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); diff --git a/include/wx/gtk/dnd.h b/include/wx/gtk/dnd.h index e6e45f03a8..52199517b4 100644 --- a/include/wx/gtk/dnd.h +++ b/include/wx/gtk/dnd.h @@ -36,6 +36,16 @@ class wxFileDropTarget; class wxDropSource; +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// this macro may be used instead for wxDropSource ctor arguments: it will use +// the icon 'name' from an XPM file under GTK, but will expand to something +// else under MSW. If you don't use it, you will have to use #ifdef in the +// application code. +#define wxDROP_ICON(name) wxICON(name) + //------------------------------------------------------------------------- // wxDropTarget //------------------------------------------------------------------------- @@ -78,12 +88,16 @@ class wxDropSource: public wxDropSourceBase public: /* constructor. set data later with SetData() */ wxDropSource( wxWindow *win = (wxWindow *)NULL, - const wxIcon &go = wxNullIcon ); + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); /* constructor for setting one data object */ wxDropSource( wxDataObject& data, wxWindow *win, - const wxIcon &go = wxNullIcon ); + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); ~wxDropSource(); @@ -94,7 +108,7 @@ public: void RegisterWindow(); void UnregisterWindow(); - void PrepareIcon( int hot_x, int hot_y, GdkDragContext *context ); + void PrepareIcon( int action, GdkDragContext *context ); GtkWidget *m_widget; GtkWidget *m_iconWindow; @@ -102,9 +116,17 @@ public: wxWindow *m_window; wxDragResult m_retValue; - wxIcon m_icon; + wxIcon m_iconCopy, + m_iconMove, + m_iconNone; bool m_waiting; + +private: + // common part of both ctors + void SetIcons(const wxIcon& copy, + const wxIcon& move, + const wxIcon& none); }; #endif diff --git a/include/wx/gtk/font.h b/include/wx/gtk/font.h index c3885bfa26..6e01c6cc87 100644 --- a/include/wx/gtk/font.h +++ b/include/wx/gtk/font.h @@ -35,7 +35,7 @@ class wxFont : public wxFontBase public: // ctors and such wxFont() { Init(); } - wxFont(const wxFont& font) { Init(); Ref(font); } + wxFont(const wxFont& font) : wxFontBase() { Init(); Ref(font); } wxFont(const wxString& fontname, const wxFontData& fontdata); // assignment diff --git a/include/wx/gtk/mdi.h b/include/wx/gtk/mdi.h index e8f87df94d..a697bb790c 100644 --- a/include/wx/gtk/mdi.h +++ b/include/wx/gtk/mdi.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h +// Name: gtk/mdi.h // Purpose: // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -45,12 +45,20 @@ extern const wxChar* wxStatusLineNameStr; class wxMDIParentFrame: public wxFrame { public: - wxMDIParentFrame(); - wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr ); + wxMDIParentFrame() { Init(); } + wxMDIParentFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + ~wxMDIParentFrame(void); bool Create( wxWindow *parent, wxWindowID id, const wxString& title, @@ -60,32 +68,31 @@ public: void GetClientSize(int *width, int *height) const; wxMDIChildFrame *GetActiveChild() const; - - wxMDIClientWindow *GetClientWindow() const; + + wxMDIClientWindow *GetClientWindow() const; virtual wxMDIClientWindow *OnCreateClient(); - + virtual void Cascade() {} virtual void Tile() {} virtual void ArrangeIcons() {} virtual void ActivateNext(); virtual void ActivatePrevious(); - void OnActivate( wxActivateEvent& event ); - void OnSysColourChanged( wxSysColourChangedEvent& event ); - - // implementation + // implementation wxMDIClientWindow *m_clientWindow; bool m_justInserted; virtual void GtkOnSize( int x, int y, int width, int height ); virtual void OnInternalIdle(); - + +protected: + void Init(); + private: friend class wxMDIChildFrame; - + DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) - DECLARE_EVENT_TABLE() }; //----------------------------------------------------------------------------- @@ -105,19 +112,20 @@ public: wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); - + virtual void SetMenuBar( wxMenuBar *menu_bar ); virtual wxMenuBar *GetMenuBar() const; + wxSize GetClientSize() const { return wxFrame::GetClientSize(); } virtual void GetClientSize( int *width, int *height ) const; virtual void AddChild( wxWindowBase *child ); virtual void Activate(); - + #if wxUSE_STATUSBAR // no status bars virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number) = 1, - long WXUNUSED(style) = 1, + long WXUNUSED(style) = 1, wxWindowID WXUNUSED(id) = 1, const wxString& WXUNUSED(name) = wxEmptyString) { return (wxStatusBar*)NULL; } @@ -131,37 +139,38 @@ public: virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW), int WXUNUSED(maxH), int WXUNUSED(incW), int WXUNUSED(incH) ) {} - + #if wxUSE_TOOLBAR // no toolbar bars - virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id), + virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id), const wxString& WXUNUSED(name) ) { return (wxToolBar*)NULL; } virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; } #endif - + // no icon void SetIcon( const wxIcon &icon ) { m_icon = icon; } - - // no title - void SetTitle( const wxString &title ) { m_title = title; } + + // no title + void SetTitle( const wxString &title ); wxString GetTitle() const { return m_title; } - + // no maximize etc virtual void Maximize( bool WXUNUSED(maximize) ) {} virtual void Restore() {} - + virtual bool IsTopLevel() const { return FALSE; } - - void OnActivate( wxActivateEvent &event ); - - // implementation - + + void OnActivate( wxActivateEvent& event ); + void OnMenuHighlight( wxMenuEvent& event ); + + // implementation + wxMenuBar *m_menuBar; GtkNotebookPage *m_page; bool m_justInserted; - + private: - DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) }; diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index 2f1d51c909..7e6f2c7335 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -21,15 +21,13 @@ #include "wx/gdiobj.h" #include "wx/gdicmn.h" -#include // only needed for wxGTKDash, should it go elsewhere.. - //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- class wxPen; -#if GTK_CHECK_VERSION(1,2,7) +#ifdef __WXGTK127__ typedef gint8 wxGTKDash; #else typedef gchar wxGTKDash; @@ -47,8 +45,8 @@ public: wxPen( const wxPen& pen ); ~wxPen(); wxPen& operator = ( const wxPen& pen ); - bool operator == ( const wxPen& pen ); - bool operator != ( const wxPen& pen ); + bool operator == ( const wxPen& pen ) const; + bool operator != ( const wxPen& pen ) const; void SetColour( const wxColour &colour ); void SetColour( int red, int green, int blue ); diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h index eded3b86e9..d7805a70ca 100644 --- a/include/wx/gtk/radiobox.h +++ b/include/wx/gtk/radiobox.h @@ -43,24 +43,37 @@ extern const char *wxRadioBoxNameStr; class wxRadioBox: public wxControl { public: - wxRadioBox(); - inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 1, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ) + wxRadioBox() { Init(); } + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 1, + long style = wxRA_HORIZONTAL, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) { - Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); + Init(); + + Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); } - ~wxRadioBox(void); - bool Create( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ); - + + ~wxRadioBox(); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 0, + long style = wxRA_HORIZONTAL, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + int FindString( const wxString& s) const; void SetSelection( int n ); int GetSelection() const; @@ -100,12 +113,20 @@ public: void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); #endif // wxUSE_TOOLTIPS wxSize LayoutItems(); - void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); + + virtual void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); + virtual void OnInternalIdle(); bool m_alreadySent; + bool m_hasFocus, + m_lostFocus; int m_majorDim; wxList m_boxes; - + +protected: + // common part of all ctors + void Init(); + private: DECLARE_DYNAMIC_CLASS(wxRadioBox) }; diff --git a/include/wx/gtk1/app.h b/include/wx/gtk1/app.h index 7b911ec302..1b2ab8de77 100644 --- a/include/wx/gtk1/app.h +++ b/include/wx/gtk1/app.h @@ -92,4 +92,6 @@ extern "C" } #endif +int WXDLLEXPORT wxEntry( int argc, char *argv[] ); + #endif // __GTKAPPH__ diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 5096d3b8b5..41959d5ba6 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -70,8 +70,8 @@ public: wxBitmap( const wxString &filename, int type = wxBITMAP_TYPE_XPM ); ~wxBitmap(); wxBitmap& operator = ( const wxBitmap& bmp ); - bool operator == ( const wxBitmap& bmp ); - bool operator != ( const wxBitmap& bmp ); + bool operator == ( const wxBitmap& bmp ) const; + bool operator != ( const wxBitmap& bmp ) const; bool Ok() const; bool Create(int width, int height, int depth = -1); diff --git a/include/wx/gtk1/bmpbuttn.h b/include/wx/gtk1/bmpbuttn.h index 3f1c684d63..233e8d90e8 100644 --- a/include/wx/gtk1/bmpbuttn.h +++ b/include/wx/gtk1/bmpbuttn.h @@ -74,6 +74,10 @@ public: void SetBitmapLabel( const wxBitmap& bitmap ); void SetBitmapSelected( const wxBitmap& bitmap ); + void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } + int GetMarginX() const { return m_marginX; } + int GetMarginY() const { return m_marginY; } + virtual bool Enable(bool enable); // implementation @@ -93,6 +97,10 @@ public: wxBitmap m_focus; wxBitmap m_selected; +protected: + int m_marginX; + int m_marginY; + private: DECLARE_DYNAMIC_CLASS(wxBitmapButton) }; diff --git a/include/wx/gtk1/brush.h b/include/wx/gtk1/brush.h index d42e564a81..31d4b7292c 100644 --- a/include/wx/gtk1/brush.h +++ b/include/wx/gtk1/brush.h @@ -40,8 +40,8 @@ public: wxBrush( const wxBrush &brush ); ~wxBrush(); wxBrush& operator = ( const wxBrush& brush ); - bool operator == ( const wxBrush& brush ); - bool operator != ( const wxBrush& brush ); + bool operator == ( const wxBrush& brush ) const; + bool operator != ( const wxBrush& brush ) const; bool Ok() const; int GetStyle() const; diff --git a/include/wx/gtk1/dc.h b/include/wx/gtk1/dc.h index 2ce4f8de26..78c421c9c4 100644 --- a/include/wx/gtk1/dc.h +++ b/include/wx/gtk1/dc.h @@ -148,7 +148,6 @@ public: bool m_needComputeScaleX, m_needComputeScaleY; // not yet used - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. private: DECLARE_ABSTRACT_CLASS(wxDC) diff --git a/include/wx/gtk1/dialog.h b/include/wx/gtk1/dialog.h index c996833727..7050e0b05e 100644 --- a/include/wx/gtk1/dialog.h +++ b/include/wx/gtk1/dialog.h @@ -103,6 +103,9 @@ protected: // common part of all ctors void Init(); + // common part of Destroy() and ~wxDialog + void CleanUp(); + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); diff --git a/include/wx/gtk1/dnd.h b/include/wx/gtk1/dnd.h index e6e45f03a8..52199517b4 100644 --- a/include/wx/gtk1/dnd.h +++ b/include/wx/gtk1/dnd.h @@ -36,6 +36,16 @@ class wxFileDropTarget; class wxDropSource; +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// this macro may be used instead for wxDropSource ctor arguments: it will use +// the icon 'name' from an XPM file under GTK, but will expand to something +// else under MSW. If you don't use it, you will have to use #ifdef in the +// application code. +#define wxDROP_ICON(name) wxICON(name) + //------------------------------------------------------------------------- // wxDropTarget //------------------------------------------------------------------------- @@ -78,12 +88,16 @@ class wxDropSource: public wxDropSourceBase public: /* constructor. set data later with SetData() */ wxDropSource( wxWindow *win = (wxWindow *)NULL, - const wxIcon &go = wxNullIcon ); + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); /* constructor for setting one data object */ wxDropSource( wxDataObject& data, wxWindow *win, - const wxIcon &go = wxNullIcon ); + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); ~wxDropSource(); @@ -94,7 +108,7 @@ public: void RegisterWindow(); void UnregisterWindow(); - void PrepareIcon( int hot_x, int hot_y, GdkDragContext *context ); + void PrepareIcon( int action, GdkDragContext *context ); GtkWidget *m_widget; GtkWidget *m_iconWindow; @@ -102,9 +116,17 @@ public: wxWindow *m_window; wxDragResult m_retValue; - wxIcon m_icon; + wxIcon m_iconCopy, + m_iconMove, + m_iconNone; bool m_waiting; + +private: + // common part of both ctors + void SetIcons(const wxIcon& copy, + const wxIcon& move, + const wxIcon& none); }; #endif diff --git a/include/wx/gtk1/font.h b/include/wx/gtk1/font.h index c3885bfa26..6e01c6cc87 100644 --- a/include/wx/gtk1/font.h +++ b/include/wx/gtk1/font.h @@ -35,7 +35,7 @@ class wxFont : public wxFontBase public: // ctors and such wxFont() { Init(); } - wxFont(const wxFont& font) { Init(); Ref(font); } + wxFont(const wxFont& font) : wxFontBase() { Init(); Ref(font); } wxFont(const wxString& fontname, const wxFontData& fontdata); // assignment diff --git a/include/wx/gtk1/mdi.h b/include/wx/gtk1/mdi.h index e8f87df94d..a697bb790c 100644 --- a/include/wx/gtk1/mdi.h +++ b/include/wx/gtk1/mdi.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h +// Name: gtk/mdi.h // Purpose: // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -45,12 +45,20 @@ extern const wxChar* wxStatusLineNameStr; class wxMDIParentFrame: public wxFrame { public: - wxMDIParentFrame(); - wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, - const wxString& name = wxFrameNameStr ); + wxMDIParentFrame() { Init(); } + wxMDIParentFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + ~wxMDIParentFrame(void); bool Create( wxWindow *parent, wxWindowID id, const wxString& title, @@ -60,32 +68,31 @@ public: void GetClientSize(int *width, int *height) const; wxMDIChildFrame *GetActiveChild() const; - - wxMDIClientWindow *GetClientWindow() const; + + wxMDIClientWindow *GetClientWindow() const; virtual wxMDIClientWindow *OnCreateClient(); - + virtual void Cascade() {} virtual void Tile() {} virtual void ArrangeIcons() {} virtual void ActivateNext(); virtual void ActivatePrevious(); - void OnActivate( wxActivateEvent& event ); - void OnSysColourChanged( wxSysColourChangedEvent& event ); - - // implementation + // implementation wxMDIClientWindow *m_clientWindow; bool m_justInserted; virtual void GtkOnSize( int x, int y, int width, int height ); virtual void OnInternalIdle(); - + +protected: + void Init(); + private: friend class wxMDIChildFrame; - + DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) - DECLARE_EVENT_TABLE() }; //----------------------------------------------------------------------------- @@ -105,19 +112,20 @@ public: wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ); - + virtual void SetMenuBar( wxMenuBar *menu_bar ); virtual wxMenuBar *GetMenuBar() const; + wxSize GetClientSize() const { return wxFrame::GetClientSize(); } virtual void GetClientSize( int *width, int *height ) const; virtual void AddChild( wxWindowBase *child ); virtual void Activate(); - + #if wxUSE_STATUSBAR // no status bars virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number) = 1, - long WXUNUSED(style) = 1, + long WXUNUSED(style) = 1, wxWindowID WXUNUSED(id) = 1, const wxString& WXUNUSED(name) = wxEmptyString) { return (wxStatusBar*)NULL; } @@ -131,37 +139,38 @@ public: virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW), int WXUNUSED(maxH), int WXUNUSED(incW), int WXUNUSED(incH) ) {} - + #if wxUSE_TOOLBAR // no toolbar bars - virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id), + virtual wxToolBar* CreateToolBar( long WXUNUSED(style), wxWindowID WXUNUSED(id), const wxString& WXUNUSED(name) ) { return (wxToolBar*)NULL; } virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; } #endif - + // no icon void SetIcon( const wxIcon &icon ) { m_icon = icon; } - - // no title - void SetTitle( const wxString &title ) { m_title = title; } + + // no title + void SetTitle( const wxString &title ); wxString GetTitle() const { return m_title; } - + // no maximize etc virtual void Maximize( bool WXUNUSED(maximize) ) {} virtual void Restore() {} - + virtual bool IsTopLevel() const { return FALSE; } - - void OnActivate( wxActivateEvent &event ); - - // implementation - + + void OnActivate( wxActivateEvent& event ); + void OnMenuHighlight( wxMenuEvent& event ); + + // implementation + wxMenuBar *m_menuBar; GtkNotebookPage *m_page; bool m_justInserted; - + private: - DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) }; diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index 2f1d51c909..7e6f2c7335 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -21,15 +21,13 @@ #include "wx/gdiobj.h" #include "wx/gdicmn.h" -#include // only needed for wxGTKDash, should it go elsewhere.. - //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- class wxPen; -#if GTK_CHECK_VERSION(1,2,7) +#ifdef __WXGTK127__ typedef gint8 wxGTKDash; #else typedef gchar wxGTKDash; @@ -47,8 +45,8 @@ public: wxPen( const wxPen& pen ); ~wxPen(); wxPen& operator = ( const wxPen& pen ); - bool operator == ( const wxPen& pen ); - bool operator != ( const wxPen& pen ); + bool operator == ( const wxPen& pen ) const; + bool operator != ( const wxPen& pen ) const; void SetColour( const wxColour &colour ); void SetColour( int red, int green, int blue ); diff --git a/include/wx/gtk1/radiobox.h b/include/wx/gtk1/radiobox.h index eded3b86e9..d7805a70ca 100644 --- a/include/wx/gtk1/radiobox.h +++ b/include/wx/gtk1/radiobox.h @@ -43,24 +43,37 @@ extern const char *wxRadioBoxNameStr; class wxRadioBox: public wxControl { public: - wxRadioBox(); - inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 1, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ) + wxRadioBox() { Init(); } + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 1, + long style = wxRA_HORIZONTAL, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) { - Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); + Init(); + + Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); } - ~wxRadioBox(void); - bool Create( wxWindow *parent, wxWindowID id, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (const wxString *) NULL, - int majorDim = 0, long style = wxRA_HORIZONTAL, - const wxValidator& val = wxDefaultValidator, - const wxString& name = wxRadioBoxNameStr ); - + + ~wxRadioBox(); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 0, + long style = wxRA_HORIZONTAL, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + int FindString( const wxString& s) const; void SetSelection( int n ); int GetSelection() const; @@ -100,12 +113,20 @@ public: void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); #endif // wxUSE_TOOLTIPS wxSize LayoutItems(); - void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); + + virtual void DoSetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ); + virtual void OnInternalIdle(); bool m_alreadySent; + bool m_hasFocus, + m_lostFocus; int m_majorDim; wxList m_boxes; - + +protected: + // common part of all ctors + void Init(); + private: DECLARE_DYNAMIC_CLASS(wxRadioBox) }; diff --git a/include/wx/hash.h b/include/wx/hash.h index cf10d040c8..ccd513dd8f 100644 --- a/include/wx/hash.h +++ b/include/wx/hash.h @@ -128,7 +128,7 @@ public: ~wxHashTable(); // copy ctor and assignment operator - wxHashTable(const wxHashTable& table) { DoCopy(table); } + wxHashTable(const wxHashTable& table) : wxObject() { DoCopy(table); } wxHashTable& operator=(const wxHashTable& table) { Clear(); DoCopy(table); return *this; } @@ -200,8 +200,8 @@ private: // defines a new type safe hash table which stores the elements of type eltype // in lists of class listclass -#define WX_DECLARE_HASH(eltype, listclass, hashclass) \ - class WXDLLEXPORT hashclass : public wxHashTableBase \ +#define _WX_DECLARE_HASH(eltype, listclass, hashclass, classexp) \ + classexp hashclass : public wxHashTableBase \ { \ public: \ hashclass(wxKeyType keyType = wxKEY_INTEGER, \ @@ -244,7 +244,7 @@ private: protected: \ void DoPut(long key, long value, eltype *data) \ { \ - size_t slot = (size_t)abs(key % m_hashSize); \ + size_t slot = (size_t)abs((int)(key % (long)m_hashSize)); \ \ if ( !m_hashTable[slot] ) \ { \ @@ -258,5 +258,14 @@ private: } \ } +// this macro is to be used in the user code +#define WX_DECLARE_HASH(el, list, hash) \ + _WX_DECLARE_HASH(el, list, hash, class) + +// and this one does exactly the same thing but should be used inside the +// library +#define WX_DECLARE_EXPORTED_HASH(el, list, hash) \ + _WX_DECLARE_HASH(el, list, hash, class WXDLLEXPORT) + #endif // _WX_HASH_H__ diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h index 37cc6ea158..c35b3b0cb1 100644 --- a/include/wx/helpbase.h +++ b/include/wx/helpbase.h @@ -30,48 +30,52 @@ // Defines the API for help controllers class WXDLLEXPORT wxHelpControllerBase: public wxObject { - DECLARE_CLASS(wxHelpControllerBase) + DECLARE_CLASS(wxHelpControllerBase) + +public: + inline wxHelpControllerBase() {} + inline ~wxHelpControllerBase() {}; + + // Must call this to set the filename and server name. + // server is only required when implementing TCP/IP-based + // help controllers. + virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return FALSE; } + virtual bool Initialize(const wxString& WXUNUSED(file)) { return FALSE; } + + // Set viewer: only relevant to some kinds of controller + virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {} + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = "") = 0; + virtual bool DisplayContents(void) = 0; + virtual bool DisplaySection(int sectionNo) = 0; - public: - inline wxHelpControllerBase() {} - inline ~wxHelpControllerBase() {}; - - // Must call this to set the filename and server name. - // server is only required when implementing TCP/IP-based - // help controllers. - virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return FALSE; } - virtual bool Initialize(const wxString& WXUNUSED(file)) { return FALSE; } - - // Set viewer: only relevant to some kinds of controller - virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {} - - // If file is "", reloads file given in Initialize - virtual bool LoadFile(const wxString& file = "") = 0; - virtual bool DisplayContents(void) = 0; - virtual bool DisplaySection(int sectionNo) = 0; - virtual bool DisplayBlock(long blockNo) = 0; - virtual bool KeywordSearch(const wxString& k) = 0; - /// Allows one to override the default settings for the help frame. - virtual void SetFrameParameters(const wxString& WXUNUSED(title), - const wxSize& WXUNUSED(size), - const wxPoint& WXUNUSED(pos) = wxDefaultPosition, - bool WXUNUSED(newFrameEachTime) = FALSE) - { - // does nothing by default - } - /// Obtains the latest settings used by the help frame and the help - /// frame. - virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL, - wxPoint *WXUNUSED(pos) = NULL, - bool *WXUNUSED(newFrameEachTime) = NULL) - { - return (wxFrame*) NULL;// does nothing by default - } - - virtual bool Quit(void) = 0; - virtual void OnQuit(void) {}; + // By default, uses KeywordSection to display a topic. Implementations + // may override this for more specific behaviour. + virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); }; + virtual bool DisplayBlock(long blockNo) = 0; + virtual bool KeywordSearch(const wxString& k) = 0; + /// Allows one to override the default settings for the help frame. + virtual void SetFrameParameters(const wxString& WXUNUSED(title), + const wxSize& WXUNUSED(size), + const wxPoint& WXUNUSED(pos) = wxDefaultPosition, + bool WXUNUSED(newFrameEachTime) = FALSE) + { + // does nothing by default + } + /// Obtains the latest settings used by the help frame and the help + /// frame. + virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL, + wxPoint *WXUNUSED(pos) = NULL, + bool *WXUNUSED(newFrameEachTime) = NULL) + { + return (wxFrame*) NULL;// does nothing by default + } + + virtual bool Quit(void) = 0; + virtual void OnQuit(void) {}; }; #endif // wxUSE_HELP #endif - // _WX_HELPBASEH__ +// _WX_HELPBASEH__ diff --git a/include/wx/html/forcelnk.h b/include/wx/html/forcelnk.h index 16485fdd57..69b260e850 100644 --- a/include/wx/html/forcelnk.h +++ b/include/wx/html/forcelnk.h @@ -56,5 +56,16 @@ See mod_*.cpp and htmlwin.cpp for example :-) static int _link_dummy_var_##module_name = \ _link_dummy_func_##module_name (); +#define FORCE_WXHTML_MODULES() \ + FORCE_LINK(m_layout) \ + FORCE_LINK(m_fonts) \ + FORCE_LINK(m_image) \ + FORCE_LINK(m_list) \ + FORCE_LINK(m_dflist) \ + FORCE_LINK(m_pre) \ + FORCE_LINK(m_hline) \ + FORCE_LINK(m_links) \ + FORCE_LINK(m_tables) \ + FORCE_LINK(m_meta) #endif // _WX_FORCELNK_H_ diff --git a/include/wx/html/helpctrl.h b/include/wx/html/helpctrl.h index b052c83e94..4a247371a1 100644 --- a/include/wx/html/helpctrl.h +++ b/include/wx/html/helpctrl.h @@ -70,6 +70,7 @@ class WXDLLEXPORT wxHtmlHelpController : public wxHelpControllerBase // wxEvtHan virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {} virtual bool LoadFile(const wxString& file = ""); virtual bool DisplaySection(int sectionNo); + virtual bool DisplaySection(const wxString& section) { return Display(section); } virtual bool DisplayBlock(long blockNo) { return DisplaySection(blockNo); } virtual void SetFrameParameters(const wxString& title, const wxSize& size, diff --git a/include/wx/html/helpdata.h b/include/wx/html/helpdata.h index 906d12b13b..e5b96e3965 100644 --- a/include/wx/html/helpdata.h +++ b/include/wx/html/helpdata.h @@ -85,7 +85,7 @@ class WXDLLEXPORT wxSearchEngine : public wxObject { public: wxSearchEngine() : wxObject() {m_Keyword = NULL; } - ~wxSearchEngine() {if (m_Keyword) free(m_Keyword); } + ~wxSearchEngine() {if (m_Keyword) delete[] m_Keyword; } virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only); // Sets the keyword we will be searching for diff --git a/include/wx/html/helpfrm.h b/include/wx/html/helpfrm.h index 5ac3a97957..7ce4bc2a7f 100644 --- a/include/wx/html/helpfrm.h +++ b/include/wx/html/helpfrm.h @@ -43,7 +43,9 @@ #define wxHF_BOOKMARKS 0x0010 #define wxHF_OPENFILES 0x0020 #define wxHF_PRINT 0x0040 -#define wxHF_DEFAULTSTYLE (wxHF_TOOLBAR | wxHF_CONTENTS | wxHF_INDEX | wxHF_SEARCH | wxHF_BOOKMARKS | wxHF_PRINT) +#define wxHF_FLATTOOLBAR 0x0080 +#define wxHF_DEFAULTSTYLE (wxHF_TOOLBAR | wxHF_CONTENTS | wxHF_INDEX | \ + wxHF_SEARCH | wxHF_BOOKMARKS | wxHF_PRINT) // Command IDs : diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h index cf872a1def..e64f3f379c 100644 --- a/include/wx/html/htmlcell.h +++ b/include/wx/html/htmlcell.h @@ -314,7 +314,7 @@ class WXDLLEXPORT wxHtmlLinkInfo : public wxObject { m_Href = m_Target = wxEmptyString; m_Event = NULL, m_Cell = NULL; } wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) : wxObject() { m_Href = href; m_Target = target; m_Event = NULL, m_Cell = NULL; } - wxHtmlLinkInfo(const wxHtmlLinkInfo& l) + wxHtmlLinkInfo(const wxHtmlLinkInfo& l) : wxObject() { m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event, m_Cell = l.m_Cell; } wxHtmlLinkInfo& operator=(const wxHtmlLinkInfo& l) { m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event, m_Cell = l.m_Cell; return *this; } diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index f84dea24af..d185767c94 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -179,14 +179,14 @@ class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame *parent_frame = NULL); ~wxHtmlEasyPrinting(); - void PreviewFile(const wxString &htmlfile); - void PreviewText(const wxString &htmltext, const wxString& basepath = wxEmptyString); + bool PreviewFile(const wxString &htmlfile); + bool PreviewText(const wxString &htmltext, const wxString& basepath = wxEmptyString); // Preview file / html-text for printing // (and offers printing) // basepath is base directory for opening subsequent files (e.g. from tag) - void PrintFile(const wxString &htmlfile); - void PrintText(const wxString &htmltext, const wxString& basepath = wxEmptyString); + bool PrintFile(const wxString &htmlfile); + bool PrintText(const wxString &htmltext, const wxString& basepath = wxEmptyString); // Print file / html-text w/o preview void PrinterSetup(); @@ -211,8 +211,8 @@ class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject private: wxHtmlPrintout *CreatePrintout(); - void DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2); - void DoPrint(wxHtmlPrintout *printout); + bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2); + bool DoPrint(wxHtmlPrintout *printout); wxPrintData *m_PrintData; wxPageSetupDialogData *m_PageSetupData; diff --git a/include/wx/html/msw/wfolder.ico b/include/wx/html/msw/wfolder.ico index c42bea708246935d2e46dc9d47b364a5f5fe247e..0ffdb660e38b446fb5fa819bf39e77d9e615dd96 100644 GIT binary patch literal 318 zcma)&%?*Gc422)Y0l*N?c=Kpx@O4_DB0dPFtdl;(&W_u}% zB+6l=1xmADqpB!{nOb@4H`(FkA0#xQ?1K?yOGdwcG@`I*2_fc*O>7n$zen22CgrZB MNBkc>f$OQe0YauNK>z>% literal 318 zcma)&!3}^Q3`IZ00YHgoym=H|!M$X(j^ZZx3tsfZga1j}v}phgk8=*nYJgc^N;8o% z80bK*{xuOn&a9NeTfW7P==gIslCOlcTP36|D*bVr8xorq@26w5cG4UNw^DOmStZ;x M_lW-^7jVCQ561^8O#lD@ diff --git a/include/wx/html/winpars.h b/include/wx/html/winpars.h index 2c90277586..1d96d69de5 100644 --- a/include/wx/html/winpars.h +++ b/include/wx/html/winpars.h @@ -66,6 +66,7 @@ class WXDLLEXPORT wxHtmlWinParser : public wxHtmlParser static void AddModule(wxHtmlTagsModule *module); // Adds tags module. see wxHtmlTagsModule for details. + static void RemoveModule(wxHtmlTagsModule *module); // parsing-related methods. These methods are called by tag handlers: wxHtmlContainerCell *GetContainer() const {return m_Container;} diff --git a/include/wx/imagbmp.h b/include/wx/imagbmp.h index 8fc5d9a820..ea5f4657ff 100644 --- a/include/wx/imagbmp.h +++ b/include/wx/imagbmp.h @@ -16,28 +16,29 @@ #include "wx/image.h" -//----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // wxBMPHandler -//----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxBMPHandler: public wxImageHandler +class WXDLLEXPORT wxBMPHandler : public wxImageHandler { - DECLARE_DYNAMIC_CLASS(wxBMPHandler) - public: - - inline wxBMPHandler() + wxBMPHandler() { - m_name = "BMP file"; - m_extension = "bmp"; + m_name = _T("BMP file"); + m_extension = _T("bmp"); m_type = wxBITMAP_TYPE_BMP; - m_mime = "image/bmp"; + m_mime = _T("image/bmp"); }; #if wxUSE_STREAMS + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 ); virtual bool DoCanRead( wxInputStream& stream ); -#endif +#endif // wxUSE_STREAMS + + DECLARE_DYNAMIC_CLASS(wxBMPHandler) }; diff --git a/include/wx/image.h b/include/wx/image.h index 09aa6ed4a2..423dc55f69 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -89,6 +89,7 @@ class WXDLLEXPORT wxImage: public wxObject public: wxImage(); wxImage( int width, int height ); + wxImage( int width, int height, unsigned char* data, bool static_data = FALSE ); wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY ); wxImage( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY ); wxImage( const wxString& name, const wxString& mimetype ); @@ -97,7 +98,6 @@ public: wxImage( const wxImage& image ); wxImage( const wxImage* image ); - // these functions get implemented in /src/(platform)/bitmap.cpp wxImage( const wxBitmap &bitmap ); operator wxBitmap() const { return ConvertToBitmap(); } wxBitmap ConvertToBitmap() const; @@ -106,10 +106,19 @@ public: #endif void Create( int width, int height ); + void Create( int width, int height, unsigned char* data, bool static_data = FALSE ); void Destroy(); + // creates an identical copy of the image (the = operator + // just raises the ref count) + wxImage Copy() const; + // return the new image with size width*height wxImage GetSubImage( const wxRect& ) const; + + // pastes image into this instance and takes care of + // the mask colour and out of bounds problems + void Paste( const wxImage &image, int x, int y ); // return the new image with size width*height wxImage Scale( int width, int height ) const; @@ -120,7 +129,10 @@ public: // Rotates the image about the given point, 'angle' radians. // Returns the rotated image, leaving this image intact. wxImage Rotate(double angle, const wxPoint & centre_of_rotation, - bool interpolating = TRUE, wxPoint * offset_after_rotation = (wxPoint*) NULL) const ; + bool interpolating = TRUE, wxPoint * offset_after_rotation = (wxPoint*) NULL) const; + + wxImage Rotate90( bool clockwise = TRUE ) const; + wxImage Mirror( bool horizontally = TRUE ) const; // replace one colour with another void Replace( unsigned char r1, unsigned char g1, unsigned char b1, @@ -128,9 +140,9 @@ public: // these routines are slow but safe void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b ); - unsigned char GetRed( int x, int y ); - unsigned char GetGreen( int x, int y ); - unsigned char GetBlue( int x, int y ); + unsigned char GetRed( int x, int y ) const; + unsigned char GetGreen( int x, int y ) const; + unsigned char GetBlue( int x, int y ) const; static bool CanRead( const wxString& name ); virtual bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY ); @@ -156,7 +168,8 @@ public: char unsigned *GetData() const; void SetData( char unsigned *data ); - + void SetData( char unsigned *data, int new_width, int new_height ); + void SetMaskColour( unsigned char r, unsigned char g, unsigned char b ); unsigned char GetMaskRed() const; unsigned char GetMaskGreen() const; diff --git a/include/wx/intl.h b/include/wx/intl.h index fd8960ae45..f9e8f15a2a 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -77,6 +77,9 @@ public: // restores old locale ~wxLocale(); + // return TRUE if the locale was set successfully + bool IsOk() const { return m_pszOldLocale != NULL; } + // returns locale name const wxChar *GetLocale() const { return m_strLocale; } @@ -110,7 +113,7 @@ public: // domains are searched in the last to first order, i.e. catalogs // added later override those added before. const wxMB2WXbuf GetString(const wxChar *szOrigString, - const wxChar *szDomain = (const wxChar *) NULL) const; + const wxChar *szDomain = (const wxChar *) NULL) const; // Returns the current short name for the locale const wxString& GetName() const { return m_strShort; } @@ -126,7 +129,7 @@ private: wxLocale *m_pOldLocale; // previous wxLocale wxMsgCatalog *m_pMsgCat; // pointer to linked list of catalogs - + bool m_bConvertEncoding; }; diff --git a/include/wx/ipcbase.h b/include/wx/ipcbase.h index 178cb3b31f..6d3e80562c 100644 --- a/include/wx/ipcbase.h +++ b/include/wx/ipcbase.h @@ -48,7 +48,8 @@ class WXDLLEXPORT wxClientBase; class WXDLLEXPORT wxConnectionBase: public wxObject { DECLARE_CLASS(wxConnectionBase) - public: + +public: inline wxConnectionBase(void) {} inline ~wxConnectionBase(void) {} @@ -102,8 +103,7 @@ class WXDLLEXPORT wxConnectionBase: public wxObject wxIPCFormat WXUNUSED(format) ) { return FALSE; }; - // Callbacks to BOTH - + // Callbacks to BOTH - override at will // Default behaviour is to delete connection and return TRUE virtual bool OnDisconnect(void) = 0; }; @@ -111,28 +111,35 @@ class WXDLLEXPORT wxConnectionBase: public wxObject class WXDLLEXPORT wxServerBase: public wxObject { DECLARE_CLASS(wxServerBase) - public: +public: inline wxServerBase(void) {} inline ~wxServerBase(void) {}; - virtual bool Create(const wxString& serverName) = 0; // Returns FALSE if can't create server (e.g. port - // number is already in use) - virtual wxConnectionBase *OnAcceptConnection(const wxString& topic) = 0; + // Returns FALSE on error (e.g. port number is already in use) + virtual bool Create(const wxString& serverName) = 0; + + // Callbacks to SERVER - override at will + virtual wxConnectionBase *OnAcceptConnection(const wxString& topic) = 0; }; class WXDLLEXPORT wxClientBase: public wxObject { DECLARE_CLASS(wxClientBase) - public: + +public: inline wxClientBase(void) {}; inline ~wxClientBase(void) {}; - virtual bool ValidHost(const wxString& host) = 0; - virtual wxConnectionBase *MakeConnection(const wxString& host, const wxString& server, const wxString& topic) = 0; - // Call this to make a connection. - // Returns NULL if cannot. - virtual wxConnectionBase *OnMakeConnection(void) = 0; // Tailor this to return own connection. + virtual bool ValidHost(const wxString& host) = 0; + + // Call this to make a connection. Returns NULL if cannot. + virtual wxConnectionBase *MakeConnection(const wxString& host, + const wxString& server, + const wxString& topic) = 0; + + // Callbacks to CLIENT - override at will + virtual wxConnectionBase *OnMakeConnection(void) = 0; }; #endif diff --git a/include/wx/list.h b/include/wx/list.h index ff710bd22c..7ac799ff36 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -20,6 +20,7 @@ working with right types. This achieves the 2nd goal. As for the first one, we provide a special derivation of wxListBase called wxList which looks just like the old class. + Last change: AC 27 Jan 101 4:38 pm */ #ifndef _WX_LISTH__ @@ -34,7 +35,6 @@ // ----------------------------------------------------------------------------- #include "wx/defs.h" -#include "wx/debug.h" #include "wx/object.h" #include "wx/string.h" @@ -246,9 +246,7 @@ public: wxListBase(void *object, ... /* terminate with NULL */); protected: - // copy ctor and assignment operator - wxListBase(const wxListBase& list) - { DoCopy(list); } + // assignment operator wxListBase& operator=(const wxListBase& list) { Clear(); DoCopy(list); return *this; } @@ -324,6 +322,11 @@ private: *m_nodeLast; wxKeyType m_keyType; // type of our keys (may be wxKEY_NONE) + +protected: + // copy ctor. This has to go below Init, or VC++ 1.5 will complain. + wxListBase(const wxListBase& list) : wxObject() + { Init(); DoCopy(list); } }; // ----------------------------------------------------------------------------- @@ -353,10 +356,10 @@ private: // wxWindowBase pointers are put into the list, but wxWindow pointers are // retrieved from it. -#define WX_DECLARE_LIST_3(T, Tbase, name, nodetype) \ +#define WX_DECLARE_LIST_3(T, Tbase, name, nodetype, classexp) \ typedef int (*wxSortFuncFor_##name)(const T **, const T **); \ \ - class WXDLLEXPORT nodetype : public wxNodeBase \ + classexp nodetype : public wxNodeBase \ { \ public: \ nodetype(wxListBase *list = (wxListBase *)NULL, \ @@ -379,7 +382,7 @@ private: virtual void DeleteData(); \ }; \ \ - class WXDLLEXPORT name : public wxListBase \ + classexp name : public wxListBase \ { \ public: \ typedef nodetype Node; \ @@ -389,6 +392,9 @@ private: name(size_t count, T *elements[]) \ : wxListBase(count, (void **)elements) { } \ \ + name& operator=(const name& list) \ + { return (name&)wxListBase::operator=(list); } \ + \ nodetype *GetFirst() const \ { return (nodetype *)wxListBase::GetFirst(); } \ nodetype *GetLast() const \ @@ -447,12 +453,16 @@ private: } \ } -#define WX_DECLARE_LIST_2(elementtype, listname, nodename) \ - WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename) +#define WX_DECLARE_LIST_2(elementtype, listname, nodename, classexp) \ + WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp) #define WX_DECLARE_LIST(elementtype, listname) \ typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ - WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node) + WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class) + +#define WX_DECLARE_EXPORTED_LIST(elementtype, listname) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class WXDLLEXPORT) // this macro must be inserted in your program after // #include @@ -472,13 +482,16 @@ private: // wxList compatibility class: in fact, it's a list of wxObjects // ----------------------------------------------------------------------------- -WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode); +WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode, class WXDLLEXPORT); class WXDLLEXPORT wxList : public wxObjectList { public: wxList(int key_type = wxKEY_NONE) : wxObjectList((wxKeyType)key_type) { } + wxList& operator=(const wxList& list) + { return (wxList&)wxListBase::operator=(list); } + // compatibility methods void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); } @@ -489,7 +502,7 @@ public: // wxStringList class for compatibility with the old code // ----------------------------------------------------------------------------- -WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode); +WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode, class WXDLLEXPORT); class WXDLLEXPORT wxStringList : public wxStringListBase { @@ -501,7 +514,8 @@ public: // copying the string list: the strings are copied, too (extremely // inefficient!) - wxStringList(const wxStringList& other) { DeleteContents(TRUE); DoCopy(other); } + wxStringList(const wxStringList& other) : wxStringListBase() + { DeleteContents(TRUE); DoCopy(other); } wxStringList& operator=(const wxStringList& other) { Clear(); DoCopy(other); return *this; } diff --git a/include/wx/listimpl.cpp b/include/wx/listimpl.cpp index d7ef44dded..3beb66103d 100644 --- a/include/wx/listimpl.cpp +++ b/include/wx/listimpl.cpp @@ -9,10 +9,10 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#define _DEFINE_LIST(T, name) \ - void wx##name##Node::DeleteData() \ - { \ - delete (T *)GetData(); \ +#define _DEFINE_LIST(T, name) \ + void wx##name##Node::DeleteData() \ + { \ + delete (T *)GetData(); \ } // redefine the macro so that now it will generate the class implementation diff --git a/include/wx/log.h b/include/wx/log.h index 8c17c182d8..5c69c29011 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -298,12 +298,6 @@ protected: // empty everything void Clear(); - // the translated titles for misc message boxes: only translate ones to - // avoid reentrancy problems later - wxString m_error, - m_warning, - m_info; - wxArrayString m_aMessages; // the log message texts wxArrayInt m_aSeverity; // one of wxLOG_XXX values wxArrayLong m_aTimes; // the time of each message @@ -327,15 +321,15 @@ public: ~wxLogWindow(); // window operations - // show/hide the log window + // show/hide the log window void Show(bool bShow = TRUE); - // retrieve the pointer to the frame + // retrieve the pointer to the frame wxFrame *GetFrame() const; // accessors - // the previous log target (may be NULL) + // the previous log target (may be NULL) wxLog *GetOldLog() const { return m_pOldLog; } - // are we passing the messages to the previous log target? + // are we passing the messages to the previous log target? bool IsPassingMessages() const { return m_bPassMessages; } // we can pass the messages to the previous log target (we're in this mode by @@ -344,14 +338,20 @@ public: void PassMessages(bool bDoPass) { m_bPassMessages = bDoPass; } // base class virtuals - // we don't need it ourselves, but we pass it to the previous logger + // we don't need it ourselves, but we pass it to the previous logger virtual void Flush(); // overridables - // called immediately after the log frame creation allowing for - // any extra initializations + // called immediately after the log frame creation allowing for + // any extra initializations virtual void OnFrameCreate(wxFrame *frame); - // called right before the log frame is going to be deleted + // called if the user closes the window interactively, will not be + // called if it is destroyed for another reason (such as when program + // exits) - return TRUE from here to allow the frame to close, FALSE + // to prevent this from happening + virtual bool OnFrameClose(wxFrame *frame); + // called right before the log frame is going to be deleted: will + // always be called unlike OnFrameClose() virtual void OnFrameDelete(wxFrame *frame); protected: @@ -471,7 +471,7 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); // this second version will only log the message if the mask had been // added to the list of masks with AddTraceMask() - DECLARE_LOG_FUNCTION2(Trace, const char *mask); + DECLARE_LOG_FUNCTION2(Trace, const wxChar *mask); // the last one does nothing if all of level bits are not set // in wxLog::GetActive()->GetTraceMask() - it's deprecated in favour of @@ -489,24 +489,19 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); // debug only logging functions: use them with API name and error code // ---------------------------------------------------------------------------- -#ifndef __TFILE__ - #define __XFILE__(x) Tx) - #define __TFILE__ __XFILE__(__FILE__) -#endif - #ifdef __WXDEBUG__ // make life easier for people using VC++ IDE: clicking on the message // will take us immediately to the place of the failed API #ifdef __VISUALC__ #define wxLogApiError(api, rc) \ wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ - __TFILE__, __LINE__, _T(api), \ + __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc)) #else // !VC++ #define wxLogApiError(api, rc) \ wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \ "error 0x%08lx (%s)."), \ - __TFILE__, __LINE__, _T(api), \ + __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc)) #endif // VC++/!VC++ diff --git a/include/wx/longlong.h b/include/wx/longlong.h index 5ff8a9b01c..9a65a54930 100644 --- a/include/wx/longlong.h +++ b/include/wx/longlong.h @@ -3,8 +3,6 @@ // Purpose: declaration of wxLongLong class - best implementation of a 64 // bit integer for the current platform. // Author: Jeffrey C. Ollie , Vadim Zeitlin -// Remarks: this class is not public in wxWindows 2.0! It is intentionally -// not documented and is for private use only. // Modified by: // Created: 10.02.99 // RCS-ID: $Id$ @@ -21,7 +19,6 @@ #include "wx/defs.h" #include "wx/wxchar.h" -#include "wx/debug.h" #include // for LONG_MAX @@ -30,7 +27,7 @@ // wxLongLongNative -- this is extremely useful to find the bugs in // wxLongLongWx class! -//#define wxLONGLONG_TEST_MODE +// #define wxLONGLONG_TEST_MODE #ifdef wxLONGLONG_TEST_MODE #define wxUSE_LONGLONG_WX 1 @@ -53,9 +50,9 @@ #define wxLongLongIsLong #elif (defined(__VISUALC__) && defined(__WIN32__)) || defined( __VMS__ ) #define wxLongLong_t __int64 -#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x530) +#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520) #define wxLongLong_t __int64 -#elif defined(__GNUG__) +#elif defined(__GNUG__) || defined(__sgi) #define wxLongLong_t long long #elif defined(__MWERKS__) #if __option(longlong) @@ -68,14 +65,14 @@ #define wxLongLong_t long long #else // no native long long type // both warning and pragma warning are not portable, but at least an - // unknown pragma should never be an error. - // Err, actually, Watcom C++ doesn't like it. - // (well, if the compilers are _that_ broken, I'm removing it (VZ)) -#if 0 //ndef __WATCOMC__ + // unknown pragma should never be an error - except that, actually, Watcom + // C++ doesn't like it, so we have to disable it in this case +#ifndef __WATCOMC__ #pragma warning "Your compiler does not appear to support 64 bit "\ - "integers, using emulation class instead." + "integers, using emulation class instead.\n" \ + "Please report your compiler version to " \ + "wx-dev@lists.wxwindows.org!" #endif - #define wxUSE_LONGLONG_WX 1 #endif // compiler @@ -90,7 +87,12 @@ #endif class WXDLLEXPORT wxLongLongWx; +#if defined(__VISUALC__) && !defined(__WIN32__) + #define wxLongLong wxLongLongWx +#else typedef wxLongLongWx wxLongLong; +#endif + #else // if nothing is defined, use native implementation by default, of course #ifndef wxUSE_LONGLONG_NATIVE @@ -315,7 +317,6 @@ private: #endif // wxUSE_LONGLONG_NATIVE #if wxUSE_LONGLONG_WX - class WXDLLEXPORT wxLongLongWx { public: @@ -460,6 +461,17 @@ public: bool operator>=(const wxLongLongWx& ll) const { return *this > ll || *this == ll; } + bool operator<(long l) const { return *this < wxLongLongWx(l); } + bool operator>(long l) const { return *this > wxLongLongWx(l); } + bool operator==(long l) const + { + return l >= 0 ? (m_hi == 0 && m_lo == (unsigned long)l) + : (m_hi == -1 && m_lo == (unsigned long)l); + } + + bool operator<=(long l) const { return *this < l || *this == l; } + bool operator>=(long l) const { return *this > l || *this == l; } + // multiplication wxLongLongWx operator*(const wxLongLongWx& ll) const; wxLongLongWx& operator*=(const wxLongLongWx& ll); diff --git a/include/wx/mac/dc.h b/include/wx/mac/dc.h index dd55252573..89d8cdd981 100644 --- a/include/wx/mac/dc.h +++ b/include/wx/mac/dc.h @@ -375,8 +375,6 @@ class WXDLLEXPORT wxDC: public wxObject bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. - long m_clipX1,m_clipY1,m_clipX2,m_clipY2; long m_minX,m_maxX,m_minY,m_maxY; diff --git a/include/wx/mac/setup.h b/include/wx/mac/setup.h index bfb74aab4d..14101ee807 100644 --- a/include/wx/mac/setup.h +++ b/include/wx/mac/setup.h @@ -262,17 +262,27 @@ // Set this to 0 if your compiler can't cope // with omission of prototype parameters. -#define wxUSE_ODBC 1 - // Define 1 to use ODBC classes +#define wxUSE_ODBC 1 + // Define 1 to use ODBC classes -#define wxODBC_FWD_ONLY_CURSORS 1 - // Some databases/ODBC drivers only allow forward scrolling cursors. - // Unless you specifically want to use backward scrolling - // cursors, and you know that all of the databases/ODBC drivers - // that you will use these odbc classes with allow backward - // scrolling cursors, this setting should remain set to 1 - // for maximum database/driver compatibilty +#define wxODBC_FWD_ONLY_CURSORS 1 + // For backward compatibility reasons, this parameter now only + // controls the default scrolling method used by cursors. This + // default behavior can be overriden by setting the second param + // of wxDB::GetDbConnection() to indicate whether the connection + // (and any wxTable()s that use the connection) should support + // forward only scrolling of cursors, or both forward and backward + // Support for backward scrolling cursors is dependent on the + // data source as well as the ODBC driver being used. + +#define wxODBC_BACKWARD_COMPATABILITY 0 + // Default is 0. Set to 1 to use the deprecated classes, enum + // types, function, member variables. With a setting of 1, full + // backward compatability with the 2.0.x release is possible. + // It is STRONGLY recommended that this be set to 0, as + // future development will be done only on the non-deprecated + // functions/classes/member variables/etc. @@ -292,10 +302,6 @@ // Use standard C++ streams if 1. If 0, use wxWin // streams implementation. -#define wxUSE_WXCONFIG 1 - // if enabled, compiles built-in OS independent wxConfig - // class and it's file (any platform) and registry (Win) - // based implementations #define wxUSE_THREADS 0 // support for multithreaded applications: if // 1, compile in thread classes (thread.h) diff --git a/include/wx/mdi.h b/include/wx/mdi.h index 40d7abf66c..d0a8dd8f2d 100644 --- a/include/wx/mdi.h +++ b/include/wx/mdi.h @@ -1,6 +1,10 @@ #ifndef _WX_MDI_H_BASE_ #define _WX_MDI_H_BASE_ +#include "wx/defs.h" + +#if wxUSE_MDI_ARCHITECTURE + #if defined(__WXMSW__) #include "wx/msw/mdi.h" #elif defined(__WXMOTIF__) @@ -17,5 +21,7 @@ #include "wx/stubs/mdi.h" #endif +#endif // wxUSE_MDI_ARCHITECTURE + #endif // _WX_MDI_H_BASE_ diff --git a/include/wx/menu.h b/include/wx/menu.h index c297b599a6..ca2e84ba20 100644 --- a/include/wx/menu.h +++ b/include/wx/menu.h @@ -32,8 +32,8 @@ class WXDLLEXPORT wxMenuBar; class WXDLLEXPORT wxMenuItem; // pseudo template list classes -WX_DECLARE_LIST(wxMenu, wxMenuList); -WX_DECLARE_LIST(wxMenuItem, wxMenuItemList); +WX_DECLARE_EXPORTED_LIST(wxMenu, wxMenuList); +WX_DECLARE_EXPORTED_LIST(wxMenuItem, wxMenuItemList); // ---------------------------------------------------------------------------- // conditional compilation @@ -102,6 +102,59 @@ public: // insert an item before given position bool Insert(size_t pos, wxMenuItem *item); + void Insert(size_t pos, + int id, + const wxString& text, + const wxString& help = wxEmptyString, + bool isCheckable = FALSE) + { + Insert(pos, wxMenuItem::New((wxMenu *)this, id, text, help, isCheckable)); + } + + // insert a separator + void InsertSeparator(size_t pos) + { + Insert(pos, wxMenuItem::New((wxMenu *)this)); + } + + // insert a submenu + void Insert(size_t pos, + int id, + const wxString& text, + wxMenu *submenu, + const wxString& help = wxEmptyString) + { + Insert(pos, wxMenuItem::New((wxMenu *)this, id, text, help, FALSE, submenu)); + } + + // prepend an item to the menu + void Prepend(wxMenuItem *item) + { + Insert(0u, item); + } + + void Prepend(int id, + const wxString& text, + const wxString& help = wxEmptyString, + bool isCheckable = FALSE) + { + Insert(0u, id, text, help, isCheckable); + } + + // insert a separator + void PrependSeparator() + { + InsertSeparator(0u); + } + + // insert a submenu + void Prepend(int id, + const wxString& text, + wxMenu *submenu, + const wxString& help = wxEmptyString) + { + Insert(0u, id, text, submenu, help); + } // detach an item from the menu, but don't delete it so that it can be // added back later (but if it's not, the caller is responsible for diff --git a/include/wx/module.h b/include/wx/module.h index e15b4de06b..73e913ee1b 100644 --- a/include/wx/module.h +++ b/include/wx/module.h @@ -21,7 +21,7 @@ // declare a linked list of modules class wxModule; -WX_DECLARE_LIST(wxModule, wxModuleList); +WX_DECLARE_EXPORTED_LIST(wxModule, wxModuleList); // declaring a class derived from wxModule will automatically create an // instance of this class on program startup, call its OnInit() method and call diff --git a/include/wx/motif/accel.h b/include/wx/motif/accel.h index fb12365d8c..33aeba8ce3 100644 --- a/include/wx/motif/accel.h +++ b/include/wx/motif/accel.h @@ -76,8 +76,8 @@ public: wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); // Load from array // Copy constructors - wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); } - wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); } + wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject() { Ref(accel); } + wxAcceleratorTable(const wxAcceleratorTable* accel) : wxObject() { if (accel) Ref(*accel); } ~wxAcceleratorTable(); diff --git a/include/wx/motif/bitmap.h b/include/wx/motif/bitmap.h index c673a408fa..82b4618b8b 100644 --- a/include/wx/motif/bitmap.h +++ b/include/wx/motif/bitmap.h @@ -134,7 +134,7 @@ public: wxBitmap(); // Platform-specific // Copy constructors - wxBitmap(const wxBitmap& bitmap) + wxBitmap(const wxBitmap& bitmap) : wxGDIObject() { Ref(bitmap); if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } // Initialize with raw XBM data @@ -183,8 +183,8 @@ public: void SetMask(wxMask *mask) ; wxBitmap& operator = (const wxBitmap& bitmap) { if (*this == bitmap) return (*this); Ref(bitmap); return *this; } - bool operator == (const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; } - bool operator != (const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; } + bool operator == (const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; } + bool operator != (const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; } // Format handling static wxList& GetHandlers() { return sm_handlers; } diff --git a/include/wx/motif/brush.h b/include/wx/motif/brush.h index 15488cba9b..6cd33c3399 100644 --- a/include/wx/motif/brush.h +++ b/include/wx/motif/brush.h @@ -47,7 +47,7 @@ public: wxBrush(); wxBrush(const wxColour& col, int style); wxBrush(const wxBitmap& stipple); - inline wxBrush(const wxBrush& brush) { Ref(brush); } + inline wxBrush(const wxBrush& brush) : wxGDIObject() { Ref(brush); } ~wxBrush(); virtual void SetColour(const wxColour& col) ; @@ -56,8 +56,8 @@ public: virtual void SetStipple(const wxBitmap& stipple) ; inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } - inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; } - inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; } + inline bool operator == (const wxBrush& brush) const { return m_refData == brush.m_refData; } + inline bool operator != (const wxBrush& brush) const { return m_refData != brush.m_refData; } inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); }; diff --git a/include/wx/motif/choice.h b/include/wx/motif/choice.h index 5171d41fe9..df445f9e9b 100644 --- a/include/wx/motif/choice.h +++ b/include/wx/motif/choice.h @@ -96,6 +96,8 @@ protected: WXWidget* m_widgetList ; WXWidget m_formWidget; wxStringList m_stringList; + wxList m_clientList; // contains the client data for the items + virtual void DoSetSize(int x, int y, int width, int height, diff --git a/include/wx/motif/cursor.h b/include/wx/motif/cursor.h index a6344c8148..6e482edf2a 100644 --- a/include/wx/motif/cursor.h +++ b/include/wx/motif/cursor.h @@ -54,7 +54,7 @@ public: wxCursor(); // Copy constructors - wxCursor(const wxCursor& cursor) { Ref(cursor); } + wxCursor(const wxCursor& cursor) : wxBitmap() { Ref(cursor); } wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, const char maskBits[] = NULL); diff --git a/include/wx/motif/dc.h b/include/wx/motif/dc.h index fb6316232e..5368b113b0 100644 --- a/include/wx/motif/dc.h +++ b/include/wx/motif/dc.h @@ -162,8 +162,6 @@ public: // recompute scale? bool m_needComputeScaleX, m_needComputeScaleY; - // wxPSDC wants to have this. Will disappear. - float m_scaleFactor; }; #endif diff --git a/include/wx/motif/dcmemory.h b/include/wx/motif/dcmemory.h index 51b16b19c9..bde81607ca 100644 --- a/include/wx/motif/dcmemory.h +++ b/include/wx/motif/dcmemory.h @@ -34,7 +34,7 @@ public: wxBitmap& GetBitmap() const { return (wxBitmap&) m_bitmap; } private: - friend wxPaintDC; + friend class wxPaintDC; wxBitmap m_bitmap; }; diff --git a/include/wx/motif/font.h b/include/wx/motif/font.h index 906bc2462a..9a1783bb66 100644 --- a/include/wx/motif/font.h +++ b/include/wx/motif/font.h @@ -22,7 +22,7 @@ class wxFont : public wxFontBase public: // ctors and such wxFont() { Init(); } - wxFont(const wxFont& font) { Init(); Ref(font); } + wxFont(const wxFont& font) : wxFontBase() { Init(); Ref(font); } wxFont(int size, int family, diff --git a/include/wx/motif/icon.h b/include/wx/motif/icon.h index c79cb7bb11..f6f321d36e 100644 --- a/include/wx/motif/icon.h +++ b/include/wx/motif/icon.h @@ -42,7 +42,7 @@ public: wxIcon(); // Copy constructors - inline wxIcon(const wxIcon& icon) { Ref(icon); } + inline wxIcon(const wxIcon& icon) : wxBitmap() { Ref(icon); } // Initialize with XBM data wxIcon(const char bits[], int width, int height); @@ -61,8 +61,8 @@ public: { return wxBitmap::LoadFile(name, type); } inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } - inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; } - inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; } + inline bool operator == (const wxIcon& icon) const { return m_refData == icon.m_refData; } + inline bool operator != (const wxIcon& icon) const { return m_refData != icon.m_refData; } virtual bool Ok() const { return ((m_refData != NULL) && (M_ICONDATA->m_ok)); } }; diff --git a/include/wx/motif/palette.h b/include/wx/motif/palette.h index cf198a273f..a93af41915 100644 --- a/include/wx/motif/palette.h +++ b/include/wx/motif/palette.h @@ -55,7 +55,7 @@ class WXDLLEXPORT wxPalette: public wxGDIObject public: wxPalette(); - wxPalette(const wxPalette& palette) { Ref(palette); } + wxPalette(const wxPalette& palette) : wxGDIObject() { Ref(palette); } wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); ~wxPalette(); @@ -66,8 +66,8 @@ public: virtual bool Ok() const { return (m_refData != NULL) ; } wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; } - bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; } - bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; } + bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; } + bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; } // Motif-specific WXColormap GetXColormap(WXDisplay* display = NULL) const; diff --git a/include/wx/motif/pen.h b/include/wx/motif/pen.h index 120d793d89..7a73c72128 100644 --- a/include/wx/motif/pen.h +++ b/include/wx/motif/pen.h @@ -53,12 +53,12 @@ public: wxPen(); wxPen(const wxColour& col, int width, int style); wxPen(const wxBitmap& stipple, int width); - inline wxPen(const wxPen& pen) { Ref(pen); } + inline wxPen(const wxPen& pen) : wxGDIObject() { Ref(pen); } ~wxPen(); inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; } - inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; } - inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; } + inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; } + inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; } virtual bool Ok() const { return (m_refData != NULL) ; } diff --git a/include/wx/motif/region.h b/include/wx/motif/region.h index ffd3e993db..39dafdcd12 100644 --- a/include/wx/motif/region.h +++ b/include/wx/motif/region.h @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_REGION_H_ @@ -28,16 +28,18 @@ WX_DECLARE_LIST(wxRect, wxRectList); enum wxRegionContain { - wxOutRegion = 0, wxPartRegion = 1, wxInRegion = 2 + wxOutRegion, + wxPartRegion, + wxInRegion }; // So far, for internal use only enum wxRegionOp { -wxRGN_AND, // Creates the intersection of the two combined regions. -wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1. -wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. -wxRGN_OR, // Creates the union of two combined regions. -wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas. + wxRGN_AND, // Creates the intersection of the two combined regions. + wxRGN_COPY, // Creates a copy of the region identified by hrgnSrc1. + wxRGN_DIFF, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. + wxRGN_OR, // Creates the union of two combined regions. + wxRGN_XOR // Creates the union of two combined regions except for any overlapping areas. }; class WXDLLEXPORT wxRegion : public wxGDIObject { @@ -47,64 +49,63 @@ public: wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h); wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); wxRegion(const wxRect& rect); - wxRegion(); - ~wxRegion(); + wxRegion(); + ~wxRegion(); - //# Copying - inline wxRegion(const wxRegion& r) - { Ref(r); } - inline wxRegion& operator = (const wxRegion& r) - { Ref(r); return (*this); } + //# Copying + inline wxRegion(const wxRegion& r) : wxGDIObject() { Ref(r); } + inline wxRegion& operator = (const wxRegion& r) + { Ref(r); return (*this); } - //# Modify region - // Clear current region - void Clear(); + //# Modify region + // Clear current region + void Clear(); - // Union rectangle or region with this. - inline bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_OR); } - inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); } - inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); } + // Union rectangle or region with this. + inline bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_OR); } + inline bool Union(const wxRect& rect) { return Combine(rect, wxRGN_OR); } + inline bool Union(const wxRegion& region) { return Combine(region, wxRGN_OR); } - // Intersect rectangle or region with this. - inline bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_AND); } - inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); } - inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); } + // Intersect rectangle or region with this. + inline bool Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_AND); } + inline bool Intersect(const wxRect& rect) { return Combine(rect, wxRGN_AND); } + inline bool Intersect(const wxRegion& region) { return Combine(region, wxRGN_AND); } - // Subtract rectangle or region from this: + // Subtract rectangle or region from this: // Combines the parts of 'this' that are not part of the second region. - inline bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_DIFF); } - inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); } - inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); } + inline bool Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_DIFF); } + inline bool Subtract(const wxRect& rect) { return Combine(rect, wxRGN_DIFF); } + inline bool Subtract(const wxRegion& region) { return Combine(region, wxRGN_DIFF); } - // XOR: the union of two combined regions except for any overlapping areas. - inline bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_XOR); } - inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); } - inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); } + // XOR: the union of two combined regions except for any overlapping areas. + inline bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { return Combine(x, y, width, height, wxRGN_XOR); } + inline bool Xor(const wxRect& rect) { return Combine(rect, wxRGN_XOR); } + inline bool Xor(const wxRegion& region) { return Combine(region, wxRGN_XOR); } - //# Information on region - // Outer bounds of region - void GetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const; - wxRect GetBox() const ; + //# Information on region + // Outer bounds of region + void GetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const; + wxRect GetBox() const ; - // Is region empty? - bool Empty() const; - inline bool IsEmpty() const { return Empty(); } - bool Ok() const { return (m_refData != NULL) ; } + // Is region empty? + bool Empty() const; + inline bool IsEmpty() const { return Empty(); } + bool Ok() const { return (m_refData != NULL) ; } - //# Tests - // Does the region contain the point (x,y)? - wxRegionContain Contains(wxCoord x, wxCoord y) const; - // Does the region contain the point pt? - wxRegionContain Contains(const wxPoint& pt) const; - // Does the region contain the rectangle (x, y, w, h)? - wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h) const; - // Does the region contain the rectangle rect? - wxRegionContain Contains(const wxRect& rect) const; + //# Tests + // Does the region contain the point (x,y)? + wxRegionContain Contains(wxCoord x, wxCoord y) const; + // Does the region contain the point pt? + wxRegionContain Contains(const wxPoint& pt) const; + // Does the region contain the rectangle (x, y, w, h)? + wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h) const; + // Does the region contain the rectangle rect? + wxRegionContain Contains(const wxRect& rect) const; // Internal - bool Combine(wxCoord x, wxCoord y, wxCoord width, wxCoord height, wxRegionOp op); - bool Combine(const wxRegion& region, wxRegionOp op); - bool Combine(const wxRect& rect, wxRegionOp op); + bool Combine(wxCoord x, wxCoord y, wxCoord width, wxCoord height, wxRegionOp op); + bool Combine(const wxRegion& region, wxRegionOp op); + bool Combine(const wxRect& rect, wxRegionOp op); // Get the internal Region handle WXRegion GetXRegion() const; @@ -123,33 +124,34 @@ public: class WXDLLEXPORT wxRegionIterator : public wxObject { DECLARE_DYNAMIC_CLASS(wxRegionIterator); public: - wxRegionIterator(); - wxRegionIterator(const wxRegion& region); - ~wxRegionIterator(); + wxRegionIterator(); + wxRegionIterator(const wxRegion& region); + ~wxRegionIterator(); - void Reset() { m_current = 0; } - void Reset(const wxRegion& region); + void Reset() { m_current = 0; } + void Reset(const wxRegion& region); - operator bool () const { return m_current < m_numRects; } - bool HaveRects() const { return m_current < m_numRects; } + operator bool () const { return m_current < m_numRects; } + bool HaveRects() const { return m_current < m_numRects; } - void operator ++ (); - void operator ++ (int); + void operator ++ (); + void operator ++ (int); - wxCoord GetX() const; - wxCoord GetY() const; - wxCoord GetW() const; - wxCoord GetWidth() const { return GetW(); } - wxCoord GetH() const; - wxCoord GetHeight() const { return GetH(); } - wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); } + wxCoord GetX() const; + wxCoord GetY() const; + wxCoord GetW() const; + wxCoord GetWidth() const { return GetW(); } + wxCoord GetH() const; + wxCoord GetHeight() const { return GetH(); } + wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); } private: - size_t m_current; - size_t m_numRects; - wxRegion m_region; - wxRect* m_rects; + size_t m_current; + size_t m_numRects; + wxRegion m_region; + wxRect* m_rects; }; -#endif - // _WX_REGION_H_ +#endif // _WX_REGION_H_ + +// vi:sts=4:sw=4:et diff --git a/include/wx/msw/app.h b/include/wx/msw/app.h index 90a612d06c..82ed68a9ba 100644 --- a/include/wx/msw/app.h +++ b/include/wx/msw/app.h @@ -79,7 +79,10 @@ public: static bool RegisterWindowClasses(); // Convert Windows to argc, argv style void ConvertToStandardCommandArgs(char* p); + + /*virtual*/ void DoMessage(WXMSG *pMsg); virtual bool DoMessage(); + virtual bool ProcessMessage(WXMSG* pMsg); void DeletePendingObjects(); bool ProcessIdle(); diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index cc0989f68b..7b9820cbb0 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -142,8 +142,8 @@ public: wxMask *GetMask() const { return (GetBitmapData() ? GetBitmapData()->m_bitmapMask : (wxMask*) NULL); } void SetMask(wxMask *mask) ; - bool operator==(const wxBitmap& bitmap) { return m_refData == bitmap.m_refData; } - bool operator!=(const wxBitmap& bitmap) { return m_refData != bitmap.m_refData; } + bool operator==(const wxBitmap& bitmap) const { return m_refData == bitmap.m_refData; } + bool operator!=(const wxBitmap& bitmap) const { return m_refData != bitmap.m_refData; } #if WXWIN_COMPATIBILITY_2 void SetOk(bool isOk); diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index 05ae288300..1ec1b80b7e 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -57,8 +57,8 @@ public: virtual void SetStipple(const wxBitmap& stipple) ; inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } - inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; } - inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; } + inline bool operator == (const wxBrush& brush) const { return m_refData == brush.m_refData; } + inline bool operator != (const wxBrush& brush) const { return m_refData != brush.m_refData; } inline wxColour& GetColour(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; inline int GetStyle(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); }; diff --git a/include/wx/msw/choice.h b/include/wx/msw/choice.h index f60a023057..cc00ce00b3 100644 --- a/include/wx/msw/choice.h +++ b/include/wx/msw/choice.h @@ -66,6 +66,8 @@ public: // MSW only virtual bool MSWCommand(WXUINT param, WXWORD id); long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); protected: virtual void DoSetItemClientData( int n, void* clientData ); diff --git a/include/wx/msw/colordlg.h b/include/wx/msw/colordlg.h index 5643ef6f2f..cf93a514ef 100644 --- a/include/wx/msw/colordlg.h +++ b/include/wx/msw/colordlg.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: colordlg.h +// Name: wx/msw/colordlg.h // Purpose: wxColourDialog class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_COLORDLG_H_ @@ -20,25 +20,37 @@ #include "wx/dialog.h" #include "wx/cmndata.h" -/* - * COLOUR DIALOG - */ +// ---------------------------------------------------------------------------- +// wxColourDialog: dialog for choosing a colours +// ---------------------------------------------------------------------------- -class WXDLLEXPORT wxColourDialog: public wxDialog +class WXDLLEXPORT wxColourDialog : public wxDialog { -DECLARE_DYNAMIC_CLASS(wxColourDialog) public: - wxColourDialog(void); + wxColourDialog(); wxColourDialog(wxWindow *parent, wxColourData *data = NULL); bool Create(wxWindow *parent, wxColourData *data = NULL); - int ShowModal(void); - wxColourData& GetColourData(void) { return m_colourData; } + wxColourData& GetColourData() { return m_colourData; } + + // override some base class virtuals + virtual void SetTitle(const wxString& title); + virtual wxString GetTitle(); + + virtual int ShowModal(); protected: + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + wxColourData m_colourData; - wxWindow* m_dialogParent; + wxString m_title; + + DECLARE_DYNAMIC_CLASS(wxColourDialog) }; #endif diff --git a/include/wx/msw/colours.bmp b/include/wx/msw/colours.bmp new file mode 100644 index 0000000000000000000000000000000000000000..62d1f8045fecec3f0b54c57c0e885b4d6e464624 GIT binary patch literal 122 zcmZ?rtzv+HG9aY^#B4y!2*xZxl7Rt43UNcQ0FVvB5YWKD07MK84G;=Q0+|d44jcf| ZAc_BA#PI(=hy}zz2oeGk9Q9}a0{|Z^7?}V7 literal 0 HcmV?d00001 diff --git a/include/wx/msw/combobox.h b/include/wx/msw/combobox.h index 1828e0045a..ab5127be3d 100644 --- a/include/wx/msw/combobox.h +++ b/include/wx/msw/combobox.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: combobox.h +// Name: wx/msw/combobox.h // Purpose: wxComboBox class // Author: Julian Smart // Modified by: @@ -46,14 +46,16 @@ public: Create(parent, id, value, pos, size, n, choices, style, validator, name); } - bool Create(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, - long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxComboBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); // List functions: see wxChoice @@ -75,7 +77,13 @@ public: virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); + // implementation only from now on virtual bool MSWCommand(WXUINT param, WXWORD id); + bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + + WXHWND GetEditHWND() const; protected: virtual void DoMoveWindow(int x, int y, int width, int height); diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index 1ab10844bc..f7c564b1e9 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -78,6 +78,11 @@ public: virtual bool RealizeResource(); virtual WXHANDLE GetResourceHandle(); virtual bool FreeResource(bool force = FALSE); + + // for consistency with other wxMSW classes and to have a const + // GetResourceHandle()-like function we have a synonym for it + WXHFONT GetHFONT() const; + /* virtual bool UseResource(); virtual bool ReleaseResource(); diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index f17f7e57df..5221e427c2 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -96,6 +96,8 @@ public: WXHMENU GetWinMenu() const { return m_hMenu; } + virtual void RemoveChild(wxWindowBase *child); + // event handlers bool HandlePaint(); bool HandleSize(int x, int y, WXUINT flag); @@ -149,6 +151,9 @@ protected: static bool m_useNativeStatusBar; #endif // wxUSE_STATUSBAR + // the last focused child: we restore focus to it on activation + wxWindow *m_winLastFocused; + // Data to save/restore when calling ShowFullScreen long m_fsStyle; // Passed to ShowFullScreen wxRect m_fsOldSize; diff --git a/include/wx/msw/gccpriv.h b/include/wx/msw/gccpriv.h new file mode 100644 index 0000000000..c0e84b250b --- /dev/null +++ b/include/wx/msw/gccpriv.h @@ -0,0 +1,77 @@ +// MinGW w32api specific stuff + +#ifndef _WX_MSW_GCCPRIV_H_ +#define _WX_MSW_GCCPRIV_H_ + +#if defined( __MINGW32__ ) && !defined( HAVE_W32API_H ) + #if ( __GNUC__ > 2 ) || ( ( __GNUC__ == 2 ) && ( __GNUC_MINOR__ >= 95 ) ) + #include <_mingw.h> + #if __MINGW32_MAJOR_VERSION >= 1 + #define HAVE_W32API_H + #endif + #endif +#endif + +// check for MinGW/Cygwin w32api version ( releases >= 0.5, only ) +#if defined( HAVE_W32API_H ) +#include +#endif + +#define wxCHECK_W32API_VERSION( major, minor ) \ + ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \ + && ( ( __W32API_MAJOR_VERSION > (major) ) \ + || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor) ) ) ) + +// Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which +// are more ms-like (header author is Anders Norlander, hence the name) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>=95))) + #ifndef wxUSE_NORLANDER_HEADERS + #define wxUSE_NORLANDER_HEADERS 1 + #endif +#else + #ifndef wxUSE_NORLANDER_HEADERS + #define wxUSE_NORLANDER_HEADERS 0 + #endif +#endif + +// "old" GNUWIN32 is the one without Norlander's headers: it lacks the +// standard Win32 headers and we define the used stuff ourselves for it +// in wx/msw/gnuwin32/extra.h +#if defined(__GNUC__) && !wxUSE_NORLANDER_HEADERS + #define __GNUWIN32_OLD__ +#endif + +// Cygwin 1.0 +#if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9)) + #define __CYGWIN10__ +#endif + +// Mingw runtime 1.0-20010604 has some missing _tXXXX functions, +// so let's define them ourselves: +#if defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 1, 0 ) + #ifndef _tsetlocale + #if wxUSE_UNICODE + #define _tsetlocale _wsetlocale + #else + #define _tsetlocale setlocale + #endif + #endif + #ifndef _tgetenv + #if wxUSE_UNICODE + #define _tgetenv _wgetenv + #else + #define _tgetenv getenv + #endif + #endif + #ifndef _tfopen + #if wxUSE_UNICODE + #define _tfopen _wfopen + #else + #define _tfopen fopen + #endif + #endif +#endif + + +#endif + // _WX_MSW_GCCPRIV_H_ diff --git a/include/wx/msw/helpchm.h b/include/wx/msw/helpchm.h new file mode 100644 index 0000000000..d6db1b92c7 --- /dev/null +++ b/include/wx/msw/helpchm.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: helpchm.h +// Purpose: Help system: MS HTML Help implementation +// Author: Julian Smart +// Modified by: +// Created: 16/04/2000 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPCHM_H_ +#define _WX_HELPCHM_H_ + +#ifdef __GNUG__ +#pragma interface "helpchm.h" +#endif + +#include "wx/wx.h" + +#if wxUSE_HELP + +#include "wx/helpbase.h" + +class WXDLLEXPORT wxCHMHelpController: public wxHelpControllerBase +{ + DECLARE_CLASS(wxCHMHelpController) + +public: + wxCHMHelpController() {} + ~wxCHMHelpController() {} + + // Must call this to set the filename + virtual bool Initialize(const wxString& file); + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplaySection(const wxString& section); + virtual bool DisplayBlock(long blockNo); + virtual bool KeywordSearch(const wxString& k); + virtual bool Quit(); + + inline wxString GetHelpFile() const { return m_helpFile; } + +protected: + // Append extension if necessary. + wxString GetValidFilename(const wxString& file) const; + +protected: + wxString m_helpFile; +}; + +#endif // wxUSE_HELP +#endif +// _WX_HELPCHM_H_ diff --git a/include/wx/msw/helpwin.h b/include/wx/msw/helpwin.h index 308439b8b3..c3260a6e38 100644 --- a/include/wx/msw/helpwin.h +++ b/include/wx/msw/helpwin.h @@ -24,31 +24,33 @@ class WXDLLEXPORT wxWinHelpController: public wxHelpControllerBase { - DECLARE_CLASS(wxWinHelpController) + DECLARE_CLASS(wxWinHelpController) + +public: + wxWinHelpController() {}; + ~wxWinHelpController() {}; - public: - wxWinHelpController(void); - ~wxWinHelpController(void); + // Must call this to set the filename + virtual bool Initialize(const wxString& file); - // Must call this to set the filename and server name - virtual bool Initialize(const wxString& file); + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplayBlock(long blockNo); + virtual bool KeywordSearch(const wxString& k); + virtual bool Quit(); - // If file is "", reloads file given in Initialize - virtual bool LoadFile(const wxString& file = ""); - virtual bool DisplayContents(void); - virtual bool DisplaySection(int sectionNo); - virtual bool DisplayBlock(long blockNo); - virtual bool KeywordSearch(const wxString& k); - - virtual bool Quit(void); - virtual void OnQuit(void); - - inline wxString GetHelpFile(void) const { return m_helpFile; } + inline wxString GetHelpFile() const { return m_helpFile; } protected: - wxString m_helpFile; + // Append extension if necessary. + wxString GetValidFilename(const wxString& file) const; + +private: + wxString m_helpFile; }; #endif // wxUSE_HELP #endif - // _WX_HELPWIN_H_ +// _WX_HELPWIN_H_ diff --git a/include/wx/msw/imaglist.h b/include/wx/msw/imaglist.h index 153cfd00d1..bef31bd242 100644 --- a/include/wx/msw/imaglist.h +++ b/include/wx/msw/imaglist.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.h +// Name: wx/msw/imaglist.h // Purpose: wxImageList class // Author: Julian Smart // Modified by: @@ -49,32 +49,34 @@ enum { // now, the app must take care of ownership issues. That is, the // image lists must be explicitly deleted after the control(s) that uses them // is (are) deleted, or when the app exits. -class WXDLLEXPORT wxImageList: public wxObject +class WXDLLEXPORT wxImageList : public wxObject { - DECLARE_DYNAMIC_CLASS(wxImageList) - public: +public: /* * Public interface */ - wxImageList(void); + wxImageList(); // Creates an image list. // Specify the width and height of the images in the list, // whether there are masks associated with them (e.g. if creating images // from icons), and the initial size of the list. - inline wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1) + wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1) { Create(width, height, mask, initialCount); } - ~wxImageList(void); + ~wxImageList(); // Attributes //////////////////////////////////////////////////////////////////////////// // Returns the number of images in the image list. - int GetImageCount(void) const; + int GetImageCount() const; + + // Returns the size (same for all images) of the images in the list + bool GetSize(int index, int &width, int &height) const; // Operations //////////////////////////////////////////////////////////////////////////// @@ -118,14 +120,15 @@ class WXDLLEXPORT wxImageList: public wxObject bool Remove(int index); // Remove all images - bool RemoveAll(void); + bool RemoveAll(); // Draws the given image on a dc at the specified position. // If 'solidBackground' is TRUE, Draw sets the image list background // colour to the background colour of the wxDC, to speed up // drawing by eliminating masked drawing where possible. bool Draw(int index, wxDC& dc, int x, int y, - int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE); + int flags = wxIMAGELIST_DRAW_NORMAL, + bool solidBackground = FALSE); // TODO: miscellaneous functionality /* @@ -155,7 +158,7 @@ class WXDLLEXPORT wxImageList: public wxObject bool BeginDrag(int index, const wxPoint& hotSpot); // Ends a drag operation. - bool EndDrag(void); + bool EndDrag(); // Call this function to move the image that is being dragged during a drag-and-drop operation. // This function is typically called in response to a mouse move message. To begin a drag @@ -216,10 +219,12 @@ class WXDLLEXPORT wxImageList: public wxObject //////////////////////////////////////////////////////////////////////////// // Returns the native image list handle - inline WXHIMAGELIST GetHIMAGELIST(void) const { return m_hImageList; } + WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; } protected: WXHIMAGELIST m_hImageList; + + DECLARE_DYNAMIC_CLASS(wxImageList) }; #endif diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index 319d880da3..385659df1c 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: mdi.h +// Name: wx/msw/mdi.h // Purpose: MDI (Multiple Document Interface) classes // Author: Julian Smart // Modified by: @@ -121,7 +121,7 @@ private: class WXDLLEXPORT wxMDIChildFrame : public wxFrame { public: - wxMDIChildFrame(); + wxMDIChildFrame() { Init(); } wxMDIChildFrame(wxMDIParentFrame *parent, wxWindowID id, const wxString& title, @@ -130,6 +130,8 @@ public: long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) { + Init(); + Create(parent, id, title, pos, size, style, name); } @@ -150,8 +152,10 @@ public: virtual void Restore(); virtual void Activate(); - // Handlers + // Implementation only from now on + // ------------------------------- + // Handlers bool HandleMDIActivate(long bActivate, WXHWND, WXHWND); bool HandleWindowPosChanging(void *lpPos); bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); @@ -162,14 +166,22 @@ public: virtual void MSWDestroyWindow(); - // Implementation bool ResetWindowStyle(void *vrect); + void OnIdle(wxIdleEvent& event); + protected: virtual void DoGetPosition(int *x, int *y) const; virtual void DoSetClientSize(int width, int height); virtual void InternalSetMenuBar(); + // common part of all ctors + void Init(); + +private: + bool m_needsResize; // flag which tells us to artificially resize the frame + + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) }; @@ -179,8 +191,6 @@ protected: class WXDLLEXPORT wxMDIClientWindow : public wxWindow { - DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) - public: wxMDIClientWindow() { Init(); } wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0) @@ -207,6 +217,7 @@ protected: private: DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) }; #endif diff --git a/include/wx/msw/minifram.h b/include/wx/msw/minifram.h index 9d1b228aac..116371e281 100644 --- a/include/wx/msw/minifram.h +++ b/include/wx/msw/minifram.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: minifram.h +// Name: wx/msw/minifram.h // Purpose: wxMiniFrame class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_MINIFRAM_H_ @@ -20,55 +20,51 @@ #ifdef __WIN32__ -class WXDLLEXPORT wxMiniFrame: public wxFrame { - - DECLARE_DYNAMIC_CLASS(wxMiniFrame) - +class WXDLLEXPORT wxMiniFrame : public wxFrame +{ public: - inline wxMiniFrame(void) {} - inline wxMiniFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + wxMiniFrame() { } + wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, + const wxString& name = wxFrameNameStr) { Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_FLOAT_ON_PARENT, name); } protected: + DECLARE_DYNAMIC_CLASS(wxMiniFrame) }; -#else - -class WXDLLEXPORT wxMiniFrame: public wxFrame { - - DECLARE_DYNAMIC_CLASS(wxMiniFrame) +#else // !Win32 +class WXDLLEXPORT wxMiniFrame : public wxFrame +{ public: - inline wxMiniFrame(void) {} - inline wxMiniFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ, - const wxString& name = wxFrameNameStr) + wxMiniFrame() { } + wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ, + const wxString& name = wxFrameNameStr) { Create(parent, id, title, pos, size, style, name); } - ~wxMiniFrame(void); + virtual ~wxMiniFrame(); - long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); -protected: + DECLARE_DYNAMIC_CLASS(wxMiniFrame) }; -#endif - +#endif // Win32/!Win32 #endif // _WX_MINIFRAM_H_ diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h index 7ac0e7945b..4b95a47eb7 100644 --- a/include/wx/msw/notebook.h +++ b/include/wx/msw/notebook.h @@ -31,7 +31,8 @@ class WXDLLEXPORT wxImageList; class WXDLLEXPORT wxWindow; // array of notebook pages -typedef wxWindow WXDLLEXPORT wxNotebookPage; // so far, any window can be a page +//typedef wxWindow WXDLLEXPORT wxNotebookPage; // so far, any window can be a page +typedef wxWindow wxNotebookPage; // so far, any window can be a page WX_DEFINE_EXPORTED_ARRAY(wxNotebookPage *, wxArrayPages); diff --git a/include/wx/msw/ole/dataobj.h b/include/wx/msw/ole/dataobj.h index dd2d0cf503..41b013a9e8 100644 --- a/include/wx/msw/ole/dataobj.h +++ b/include/wx/msw/ole/dataobj.h @@ -42,7 +42,7 @@ public: #ifdef __WXDEBUG__ // function to return symbolic name of clipboard format (for debug messages) - static const char *GetFormatName(wxDataFormat format); + static const wxChar *GetFormatName(wxDataFormat format); #define wxGetFormatName(format) wxDataObject::GetFormatName(format) #else // !Debug diff --git a/include/wx/msw/ole/dropsrc.h b/include/wx/msw/ole/dropsrc.h index 079514324b..4765f2e6df 100644 --- a/include/wx/msw/ole/dropsrc.h +++ b/include/wx/msw/ole/dropsrc.h @@ -28,6 +28,16 @@ class wxIDropSource; class WXDLLEXPORT wxDataObject; class WXDLLEXPORT wxWindow; +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// this macro may be used instead for wxDropSource ctor arguments: it will use +// the cursor 'name' from the resources under MSW, but will expand to +// something else under GTK. If you don't use it, you will have to use #ifdef +// in the application code. +#define wxDROP_ICON(name) wxCursor(#name) + // ---------------------------------------------------------------------------- // wxDropSource is used to start the drag-&-drop operation on associated // wxDataObject object. It's responsible for giving UI feedback while dragging. diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h index d20c22c17b..da8a992d1f 100644 --- a/include/wx/msw/ole/oleutils.h +++ b/include/wx/msw/ole/oleutils.h @@ -17,7 +17,7 @@ #endif #include "wx/defs.h" -#ifdef wxUSE_NORLANDER_HEADERS +#if wxUSE_NORLANDER_HEADERS #include #endif // ============================================================================ @@ -85,9 +85,9 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount); #define IMPLEMENT_IUNKNOWN_METHODS(classname) \ STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \ { \ - wxLogQueryInterface(#classname, riid); \ + wxLogQueryInterface(_T(#classname), riid); \ \ - if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \ + if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \ *ppv = this; \ AddRef(); \ \ @@ -96,20 +96,20 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount); else { \ *ppv = NULL; \ \ - return (HRESULT) E_NOINTERFACE; \ + return (HRESULT) E_NOINTERFACE; \ } \ } \ \ STDMETHODIMP_(ULONG) classname::AddRef() \ { \ - wxLogAddRef(#classname, m_cRef); \ + wxLogAddRef(_T(#classname), m_cRef); \ \ return ++m_cRef; \ } \ \ STDMETHODIMP_(ULONG) classname::Release() \ { \ - wxLogRelease(#classname, m_cRef); \ + wxLogRelease(_T(#classname), m_cRef); \ \ if ( --m_cRef == 0 ) { \ delete this; \ @@ -132,11 +132,11 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount); // ---------------------------------------------------------------------------- // tries to translate riid into a symbolic name, if possible -void wxLogQueryInterface(const char *szInterface, REFIID riid); +void wxLogQueryInterface(const wxChar *szInterface, REFIID riid); // these functions print out the new value of reference counter -void wxLogAddRef (const char *szInterface, ULONG cRef); -void wxLogRelease(const char *szInterface, ULONG cRef); +void wxLogAddRef (const wxChar *szInterface, ULONG cRef); +void wxLogRelease(const wxChar *szInterface, ULONG cRef); #else //!WXDEBUG #define wxLogQueryInterface(szInterface, riid) diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h index 4383c44a3f..3eaa3ac4ef 100644 --- a/include/wx/msw/palette.h +++ b/include/wx/msw/palette.h @@ -49,8 +49,8 @@ public: virtual bool Ok(void) const { return (m_refData != NULL) ; } inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; } - inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; } - inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; } + inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; } + inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; } virtual bool FreeResource(bool force = FALSE); diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 719140d8cf..1cf0f4266c 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -57,8 +57,8 @@ public: ~wxPen(); inline wxPen& operator = (const wxPen& pen) { if (*this == pen) return (*this); Ref(pen); return *this; } - inline bool operator == (const wxPen& pen) { return m_refData == pen.m_refData; } - inline bool operator != (const wxPen& pen) { return m_refData != pen.m_refData; } + inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; } + inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; } virtual bool Ok() const { return (m_refData != NULL) ; } diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 2a27a0287d..e31a276505 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -59,7 +59,7 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; // define things missing from some compilers' headers // --------------------------------------------------------------------------- -#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS) +#if defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS #ifndef ZeroMemory inline void ZeroMemory(void *buf, size_t len) { memset(buf, 0, len); } #endif @@ -67,44 +67,17 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; // this defines a CASTWNDPROC macro which casts a pointer to the type of a // window proc + #ifdef __GNUWIN32_OLD__ -# define CASTWNDPROC (long unsigned) + #define CASTWNDPROC (long unsigned) #else -# ifdef __BORLANDC__ - -# ifdef __WIN32__ -#if __BORLANDC__ > 0x530 - typedef long (__stdcall * WndProcCast)( HWND__*, unsigned int, unsigned int, long) ; -#else - typedef int (pascal * WndProcCast) (); -#endif -# define CASTWNDPROC (WndProcCast) -# else - typedef int (pascal * WndProcCast) (); -# define CASTWNDPROC (WndProcCast) -# endif - -# else -# if defined (__WIN32__) && defined(STRICT) - typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long); -# define CASTWNDPROC (WndProcCast) -# elif defined(__WIN16__) -# ifdef __BORLANDC__ - typedef int (pascal * WndProcCast) (); -# define CASTWNDPROC (WndProcCast) -# else -# if defined(__VISUALC__) && defined(STRICT) -# define CASTWNDPROC (WNDPROC) -# else - typedef int (PASCAL * WndProcCast) (); -# define CASTWNDPROC (WndProcCast) -# endif -# endif -# else -# define CASTWNDPROC -# endif -# endif -#endif + #if defined(STRICT) || defined(__GNUC__) + typedef WNDPROC WndProcCast; + #else + typedef FARPROC WndProcCast; + #endif + #define CASTWNDPROC (WndProcCast) +#endif // __GNUWIN32_OLD__ // --------------------------------------------------------------------------- // some stuff for old Windows versions (FIXME: what does it do here??) @@ -182,13 +155,18 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; #define DEFAULT_ITEM_HEIGHT 80 // Scale font to get edit control height -#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (3*(cy)/2) +//#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (3*(cy)/2) +#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (cy+8) + +#if wxUSE_GUI // Generic subclass proc, for panel item moving/sizing and intercept // EDIT control VK_RETURN messages extern LONG APIENTRY _EXPORT wxSubclassedGenericControlProc(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); +#endif // wxUSE_GUI + // --------------------------------------------------------------------------- // constants which might miss from some compilers' headers // --------------------------------------------------------------------------- @@ -216,6 +194,8 @@ extern LONG APIENTRY _EXPORT #define wxZeroMemory(obj) memset((void*) & obj, 0, sizeof(obj)) #endif +#if wxUSE_GUI + #include // make conversion from wxColour and COLORREF a bit less painful @@ -314,15 +294,15 @@ private: #define GetHcursor() ((HCURSOR)GetHCURSOR()) #define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR()) +#define GetHfont() ((HFONT)GetHFONT()) +#define GetHfontOf(font) ((HFONT)(font).GetHFONT()) + +#endif // wxUSE_GUI + // --------------------------------------------------------------------------- // global data // --------------------------------------------------------------------------- -#if 0 // where is this?? -// The MakeProcInstance version of the function wxSubclassedGenericControlProc -WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc; -#endif // 0 - WXDLLEXPORT_DATA(extern wxChar*) wxBuffer; WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; @@ -349,6 +329,7 @@ WXDLLEXPORT wxWindow* wxFindWinFromHandle(WXHWND hWnd); WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font); WXDLLEXPORT void wxFillLogFont(LOGFONT *logFont, const wxFont *font); WXDLLEXPORT wxFont wxCreateFontFromLogFont(const LOGFONT *logFont); +WXDLLEXPORT wxFontEncoding wxGetFontEncFromCharSet(int charset); WXDLLEXPORT void wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos); WXDLLEXPORT void wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos); diff --git a/include/wx/msw/radiobox.h b/include/wx/msw/radiobox.h index 3736dc4dcf..471ca12608 100644 --- a/include/wx/msw/radiobox.h +++ b/include/wx/msw/radiobox.h @@ -81,6 +81,8 @@ public: virtual bool SetFont(const wxFont& font); long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); WXHWND *GetRadioButtons() const { return m_radioButtons; } bool ContainsHWND(WXHWND hWnd) const; void SendNotificationEvent(); @@ -98,8 +100,15 @@ public: #endif // WXWIN_COMPATIBILITY protected: + // subclass one radio button void SubclassRadioButton(WXHWND hWndBtn); + // get the max size of radio buttons + wxSize GetMaxButtonSize() const; + + // get the total size occupied by the radio box buttons + wxSize GetTotalButtonSize(const wxSize& sizeBtn) const; + WXHWND * m_radioButtons; int m_majorDim; int * m_radioWidth; // for bitmaps @@ -112,6 +121,7 @@ protected: virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual wxSize DoGetBestSize() const; }; #endif diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h index f5bb924c91..b75df13479 100644 --- a/include/wx/msw/radiobut.h +++ b/include/wx/msw/radiobut.h @@ -48,6 +48,9 @@ class WXDLLEXPORT wxRadioButton: public wxControl virtual bool GetValue(void) const ; bool MSWCommand(WXUINT param, WXWORD id); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + void Command(wxCommandEvent& event); }; diff --git a/include/wx/msw/regconf.h b/include/wx/msw/regconf.h index 8cad906888..91c1020e19 100644 --- a/include/wx/msw/regconf.h +++ b/include/wx/msw/regconf.h @@ -17,8 +17,9 @@ #endif #ifndef _REGISTRY_H - #include + #include "wx/msw/registry.h" #endif +#include "wx/object.h" // ---------------------------------------------------------------------------- // wxRegConfig @@ -29,10 +30,10 @@ class WXDLLEXPORT wxRegConfig : public wxConfigBase public: // ctor & dtor // will store data in HKLM\appName and HKCU\appName - wxRegConfig(const wxString& appName = "", - const wxString& vendorName = "", - const wxString& localFilename = "", - const wxString& globalFilename = "", + wxRegConfig(const wxString& appName = _T(""), + const wxString& vendorName = _T(""), + const wxString& localFilename = _T(""), + const wxString& globalFilename = _T(""), long style = 0); // dtor will save unsaved data @@ -65,37 +66,37 @@ public: // read/write bool Read(const wxString& key, wxString *pStr) const; bool Read(const wxString& key, wxString *pStr, const wxString& szDefault) const; - wxString Read(const wxString& key, const wxString& defVal) const - { return wxConfigBase::Read(key, defVal); } - + wxString Read(const wxString& key, const wxString& defVal) const + { return wxConfigBase::Read(key, defVal); } + bool Read(const wxString& key, long *plResult) const; - bool Read(const wxString& key, long *pl, long defVal) const - { return wxConfigBase::Read(key, pl, defVal); } + bool Read(const wxString& key, long *pl, long defVal) const + { return wxConfigBase::Read(key, pl, defVal); } long Read(const wxString& key, long defVal) const - { return wxConfigBase::Read(key, defVal); } - + { return wxConfigBase::Read(key, defVal); } + // The following are necessary to satisfy the compiler bool Read(const wxString& key, int *pi, int defVal) const - { return wxConfigBase::Read(key, pi, defVal); } - bool Read(const wxString& key, int *pi) const - { return wxConfigBase::Read(key, pi); } + { return wxConfigBase::Read(key, pi, defVal); } + bool Read(const wxString& key, int *pi) const + { return wxConfigBase::Read(key, pi); } + + bool Read(const wxString& key, double* val, double defVal) const + { return wxConfigBase::Read(key, val, defVal); } + bool Read(const wxString& key, double* val) const + { return wxConfigBase::Read(key, val); } + + bool Read(const wxString& key, bool *pb, bool defVal) const + { return wxConfigBase::Read(key, pb, defVal); } + bool Read(const wxString& key, bool *pb) const + { return wxConfigBase::Read(key, pb); } - bool Read(const wxString& key, double* val, double defVal) const - { return wxConfigBase::Read(key, val, defVal); } - bool Read(const wxString& key, double* val) const - { return wxConfigBase::Read(key, val); } - - bool Read(const wxString& key, bool *pb, bool defVal) const - { return wxConfigBase::Read(key, pb, defVal); } - bool Read(const wxString& key, bool *pb) const - { return wxConfigBase::Read(key, pb); } - bool Write(const wxString& key, const wxString& szValue); bool Write(const wxString& key, long lValue); - bool Write(const wxString& key, double dValue) - { return wxConfigBase::Write(key, dValue); } - bool Write(const wxString& key, bool bValue) - { return wxConfigBase::Write(key, bValue); } + bool Write(const wxString& key, double dValue) + { return wxConfigBase::Write(key, dValue); } + bool Write(const wxString& key, bool bValue) + { return wxConfigBase::Write(key, bValue); } virtual bool Flush(bool /* bCurrentOnly = FALSE */ ) { return TRUE; } @@ -108,6 +109,21 @@ public: virtual bool DeleteGroup(const wxString& key); virtual bool DeleteAll(); +protected: + // opens the local key creating it if necessary and returns it + wxRegKey& LocalKey() const // must be const to be callable from const funcs + { + wxRegConfig* self = wxConstCast(this, wxRegConfig); + + if ( !m_keyLocal.IsOpened() ) + { + // create on demand + self->m_keyLocal.Create(); + } + + return self->m_keyLocal; + } + private: // no copy ctor/assignment operator wxRegConfig(const wxRegConfig&); diff --git a/include/wx/msw/registry.h b/include/wx/msw/registry.h index 134267eef0..eb3b35dd48 100644 --- a/include/wx/msw/registry.h +++ b/include/wx/msw/registry.h @@ -16,15 +16,6 @@ #pragma interface "registry.h" #endif -// ---------------------------------------------------------------------------- -// mutable hack (see also registry.cpp) -// ---------------------------------------------------------------------------- -#if wxUSE_MUTABLE - #define MUTABLE mutable -#else - #define MUTABLE -#endif - // ---------------------------------------------------------------------------- // types used in this module // ---------------------------------------------------------------------------- @@ -211,7 +202,17 @@ public: bool GetFirstKey (wxString& strKeyName , long& lIndex); bool GetNextKey (wxString& strKeyName , long& lIndex) const; + // for wxRegConfig usage only: preallocate some memory for the name + void ReserveMemoryForName(size_t bytes) { m_strKey.reserve(bytes); } + private: + // common part of all ctors + void Init() + { + m_hKey = (WXHKEY) NULL; + m_dwLastError = 0; + } + // no copy ctor/assignment operator wxRegKey(const wxRegKey& key); // not implemented wxRegKey& operator=(const wxRegKey& key); // not implemented @@ -220,7 +221,7 @@ private: m_hRootKey; // handle of the top key (i.e. StdKey) wxString m_strKey; // key name (relative to m_hRootKey) - MUTABLE long m_dwLastError; // last error (0 if none) + long m_dwLastError; // last error (0 if none) }; #endif //_REGISTRY_H diff --git a/include/wx/msw/settings.h b/include/wx/msw/settings.h index 1f16e900c2..5dad2084f5 100644 --- a/include/wx/msw/settings.h +++ b/include/wx/msw/settings.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: settings.h +// Name: wx/msw/settings.h // Purpose: wxSystemSettings class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_SETTINGS_H_ @@ -16,23 +16,22 @@ #pragma interface "settings.h" #endif -#include "wx/setup.h" #include "wx/colour.h" #include "wx/font.h" -class WXDLLEXPORT wxSystemSettings: public wxObject +class WXDLLEXPORT wxSystemSettings : public wxObject { public: - inline wxSystemSettings(void) {} + wxSystemSettings() { } // Get a system colour - static wxColour GetSystemColour(int index); + static wxColour GetSystemColour(int index); // Get a system font - static wxFont GetSystemFont(int index); + static wxFont GetSystemFont(int index); // Get a system metric, e.g. scrollbar size - static int GetSystemMetric(int index); + static int GetSystemMetric(int index); }; #endif diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index d2b150d449..7f86d86870 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -6,7 +6,7 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_SETUP_H_ @@ -16,8 +16,11 @@ // global settings // ---------------------------------------------------------------------------- -// define this to 0 when building wxBase library -#define wxUSE_GUI 1 +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI // ---------------------------------------------------------------------------- // compatibility settings @@ -46,6 +49,22 @@ // Recommended setting: 0 #define wxICON_IS_BITMAP 0 +// Define as 1 for font size to be backward compatible to 1.63 and earlier. +// 1.64 and later define point sizes to be compatible with Windows. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxFONT_SIZE_COMPATIBILITY 0 + +// Set to 0 for accurate dialog units, else 1 to be as per 2.1.16 and before. +// If migrating between versions, your dialogs may seem to shrink. +// +// Default is 1 +// +// Recommended setting: 0 (the new calculations are more correct!) +#define wxDIALOG_UNIT_COMPATIBILITY 1 + // ---------------------------------------------------------------------------- // debugging settings // ---------------------------------------------------------------------------- @@ -118,6 +137,33 @@ #define wxUSE_ON_FATAL_EXCEPTION 0 #endif +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// Set wxUSE_UNICODE to 1 to compile wxWindows in Unicode mode: wxChar will be +// defined as wchar_t, wxString will use Unicode internally. If you set this +// to 1, you must use wxT() macro for all literal strings in the program. +// +// Unicode is currently only fully supported under Windows NT/2000 (Windows 9x +// doesn't support it and the programs compiled in Unicode mode will not run +// under 9x). +// +// Default is 0 +// +// Recommended setting: 0 (unless you only plan to use Windows NT/2000) +#define wxUSE_UNICODE 0 + +// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without +// compiling the program in Unicode mode. More precisely, it will be possible +// to construct wxString from a wide (Unicode) string and convert any wxString +// to Unicode. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WCHAR_T 1 + // ---------------------------------------------------------------------------- // global features // ---------------------------------------------------------------------------- @@ -210,16 +256,15 @@ // If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows // to connect/disconnect from the network and be notified whenever the dial-up -// network connection is established/terminated. +// network connection is established/terminated. Requires wxUSE_DYNLIB_CLASS. // // Default is 1. // // Recommended setting: 1 #define wxUSE_DIALUP_MANAGER 1 -// Compile in wxLibrary class for run-time DLL loading and function calling -// -// This setting is for Win32 only +// Compile in wxLibrary class for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. // // Default is 1. // @@ -229,33 +274,58 @@ // Set to 1 to use socket classes #define wxUSE_SOCKETS 1 -// Set to 1 to enable virtual file systems -// (needed by wxHTML) +#if wxUSE_GUI + +// Set to 1 to enable virtual file systems (required by wxHTML) #define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) #define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) #define wxUSE_FS_INET 1 -// input stream for reading from zip archives +// Set to 1 to compile wxZipInput/OutputStream classes. #define wxUSE_ZIPSTREAM 1 -#define wxUSE_APPLE_IEEE 1 - // if enabled, the float codec written by Apple - // will be used to write, in a portable way, - // float on the disk +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG. +#define wxUSE_ZLIB 1 -// use wxFile class - required by i18n code, wxConfig and others - recommended +#else // !wxUSE_GUI + +// although it is possible to compile all of those in wxBase, this is not done +// by default +#define wxUSE_FILESYSTEM 0 +#define wxUSE_FS_ZIP 0 +#define wxUSE_FS_INET 0 +#define wxUSE_ZIPSTREAM 0 +#define wxUSE_ZLIB 0 + +#endif // wxUSE_GUI/!wxUSE_GUI + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWindows one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Use wxFile class. +// +// Default is 1. +// +// Recommended setting: 1 (highly recommended, required i18n code, wxConfig...) #define wxUSE_FILE 1 -// use wxTextFile class: requires wxFile, required by wxConfig +// use wxTextFile class: requires wxFile, required by wxFileConfig #define wxUSE_TEXTFILE 1 -// i18n support: _() macro, wxLocale class. Requires wxFile +// i18n support: _() macro, wxLocale class. Requires wxTextFile. #define wxUSE_INTL 1 -#define wxUSE_DYNAMIC_CLASSES 1 - // If 1, enables provision of run-time type information. - // NOW MANDATORY: don't change. - // ---------------------------------------------------------------------------- // Optional controls // ---------------------------------------------------------------------------- @@ -293,7 +363,7 @@ // of disabled controls) #define wxUSE_CARET 1 #define wxUSE_CHECKBOX 1 -#define wxUSE_CHECKLISTBOX 1 +#define wxUSE_CHECKLISTBOX 1 // requires wxUSE_OWNER_DRAWN #define wxUSE_CHOICE 1 #define wxUSE_COMBOBOX 1 #define wxUSE_GAUGE 1 @@ -329,7 +399,7 @@ // Default is 1 for both options. // // Recommended setting: 1 for wxUSE_NEW_GRID, 0 if you have an old code using -// wxGrid and 100% backwards compatible (with all old wxGrid quirks) is +// wxGrid and 100% backwards compatibality (with all old wxGrid quirks) is // essential. // // WIN16/BC++ resets wxUSE_NEW_GRID to 0 because it exceeds the data limit. @@ -442,9 +512,10 @@ #define wxUSE_IPC 1 // 0 for no interprocess comms -// Note: wxHELP uses IPC under X so these are interdependent! #define wxUSE_HELP 1 // 0 for no help facility +#define wxUSE_MS_HTML_HELP 0 + // 0 for no MS HTML Help #define wxUSE_RESOURCES 1 // 0 for no wxGetResource/wxWriteResource #define wxUSE_CONSTRAINTS 1 @@ -473,34 +544,41 @@ // Use .wxr resource mechanism (requires PrologIO library) // ---------------------------------------------------------------------------- -// Postscript support settings +// postscript support settings // ---------------------------------------------------------------------------- +// Set to 1 for PostScript device context. #define wxUSE_POSTSCRIPT 0 - // 0 for no PostScript device context -#define wxUSE_AFM_FOR_POSTSCRIPT 0 - // 1 to use font metric files in GetTextExtent +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 0 + +// Set to 0 to disable PostScript print/preview architecture code under Windows +// (just use Windows printing). #define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 - // Set to 0 to disable PostScript print/preview architecture code - // under Windows (just use Windows printing). // ---------------------------------------------------------------------------- // database classes // ---------------------------------------------------------------------------- +// Define 1 to use ODBC classes #define wxUSE_ODBC 0 - // Define 1 to use ODBC classes +// For backward compatibility reasons, this parameter now only controls the +// default scrolling method used by cursors. This default behavior can be +// overriden by setting the second param of wxDB::wxDbGetConnection() or +// wxDb() constructor to indicate whether the connection (and any wxDbTable()s +// that use the connection) should support forward only scrolling of cursors, +// or both forward and backward support for backward scrolling cursors is +// dependent on the data source as well as the ODBC driver being used. #define wxODBC_FWD_ONLY_CURSORS 1 - // For backward compatibility reasons, this parameter now only - // controls the default scrolling method used by cursors. This - // default behavior can be overriden by setting the second param - // of wxDB::GetDbConnection() to indicate whether the connection - // (and any wxTable()s that use the connection) should support - // forward only scrolling of cursors, or both forward and backward - // Support for backward scrolling cursors is dependent on the - // data source as well as the ODBC driver being used. + +// Default is 0. Set to 1 to use the deprecated classes, enum types, function, +// member variables. With a setting of 1, full backward compatability with the +// 2.0.x release is possible. It is STRONGLY recommended that this be set to 0, +// as future development will be done only on the non-deprecated +// functions/classes/member variables/etc. +#define wxODBC_BACKWARD_COMPATABILITY 0 // ---------------------------------------------------------------------------- // other compiler (mis)features @@ -526,78 +604,131 @@ // image format support // ---------------------------------------------------------------------------- -#define wxUSE_ZLIB 1 - // Use zlib for compression in streams and PNG code +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. #define wxUSE_LIBPNG 1 - // Use PNG bitmap/image code + +// Set to 1 for JPEG format support (requires libjpeg) #define wxUSE_LIBJPEG 1 - // Use JPEG bitmap/image code + +// Set to 1 for TIFF format support (requires libtiff) #define wxUSE_LIBTIFF 1 - // Use TIFF bitmap/image code + +// Set to 1 for GIF format support #define wxUSE_GIF 1 - // Use GIF bitmap/image code + +// Set to 1 for PNM format support #define wxUSE_PNM 1 - // Use PNM bitmap/image code + +// Set to 1 for PCX format support #define wxUSE_PCX 1 - // Use PCX bitmap/image code // ---------------------------------------------------------------------------- // Windows-only settings // ---------------------------------------------------------------------------- -// Most of the settings in this section are obsolete or not used - -// Make settings compatible with MFC +// Set this to 1 if you want to use wxWindows and MFC in the same program. This +// will override some other settings (see below) +// +// Default is 0. +// +// Recommended setting: 0 unless you really have to use MFC #define wxUSE_MFC 0 -// required for drag-and-drop, clipboard, OLE Automation +// Set this to 1 for generic OLE support: this is required for drag-and-drop, +// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and +// can't compile/doesn't have the OLE headers. +// +// Default is 1. +// +// Recommended setting: 1 #define wxUSE_OLE 1 +// Set this to 1 to use Microsoft CTL3D library for "3D-look" under Win16 or NT +// 3.x. This setting is ignored under Win9x and NT 4.0+. +// +// Default is 0 for (most) Win32 (systems), 1 for Win16 +// +// Recommended setting: same as default #if defined(__WIN95__) #define wxUSE_CTL3D 0 #else -// Define 1 to use Microsoft CTL3D library. -// See note above about using FAFA and CTL3D. #define wxUSE_CTL3D 1 #endif -// can we use RICHEDIT control? +// Define as 1 to use Microsoft's ItsyBitsy small title bar library, for +// wxMiniFrame. This setting is only used for Win3.1; Win9x and NT use native +// miniframes support instead. +// +// Default is 0 for (most) Win32 (systems), 1 for Win16 +// +// Recommended setting: same as default +#if defined(__WIN95__) +#define wxUSE_ITSY_BITSY 0 +#else +#define wxUSE_ITSY_BITSY 1 +#endif + +// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH +// which allows to put more than ~32Kb of text in it even under Win9x (NT +// doesn't have such limitation). +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1, only set it to 0 if your compiler doesn't have +// or can't compile #if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__) #define wxUSE_RICHEDIT 1 #else #define wxUSE_RICHEDIT 0 #endif -#define wxUSE_ITSY_BITSY 1 - // Define 1 to use Microsoft's ItsyBitsy - // small title bar library, for wxMiniFrame. - // This setting is only used for Win3.1; - // Win9x and NT use native miniframes - // support instead. -#define wxUSE_BITMAP_MESSAGE 1 - // Define 1 to use bitmap messages. -#define wxFONT_SIZE_COMPATIBILITY 0 - // Define 1 for font size to be backward compatible - // to 1.63 and earlier. 1.64 and later define point - // sizes to be compatible with Windows. +// Set this to 1 to enable support for the owner-drawn menu and listboxes. This +// is required by wxUSE_CHECKLISTBOX. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 for a small library size reduction +#define wxUSE_OWNER_DRAWN 1 + +// ---------------------------------------------------------------------------- +// obsolete settings +// ---------------------------------------------------------------------------- + +// NB: all settings in this section are obsolete and should not be used/changed +// at all, they will disappear + +// Set to 1 to use PenWindows #define wxUSE_PENWINDOWS 0 - // Set to 1 to use PenWindows -#define wxUSE_OWNER_DRAWN 1 - // Owner-drawn menus and listboxes +// Define 1 to use bitmap messages. +#define wxUSE_BITMAP_MESSAGE 1 -#if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) -#ifndef wxUSE_NORLANDER_HEADERS -# define wxUSE_NORLANDER_HEADERS 1 -#endif -#endif +// If 1, enables provision of run-time type information. +// NOW MANDATORY: don't change. +#define wxUSE_DYNAMIC_CLASSES 1 // ---------------------------------------------------------------------------- // disable the settings which don't work for some compilers // ---------------------------------------------------------------------------- -// These don't work as expected for mingw32 and cygwin32 +#ifndef wxUSE_NORLANDER_HEADERS +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) +# define wxUSE_NORLANDER_HEADERS 1 +#else +# define wxUSE_NORLANDER_HEADERS 0 +#endif +#endif + #if defined(__GNUWIN32__) +// These don't work as expected for mingw32 and cygwin32 #undef wxUSE_MEMORY_TRACING #define wxUSE_MEMORY_TRACING 0 @@ -606,6 +737,18 @@ #undef wxUSE_DEBUG_NEW_ALWAYS #define wxUSE_DEBUG_NEW_ALWAYS 0 + +#undef wxUSE_MS_HTML_HELP +#define wxUSE_MS_HTML_HELP 0 + +// Cygwin betas don't have wcslen +#if defined(__CYGWIN__) || defined(__CYGWIN32__) +# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) +# undef wxUSE_WCHAR_T +# define wxUSE_WCHAR_T 0 +# endif +#endif + #endif // __GNUWIN32__ // MFC duplicates these operators @@ -617,6 +760,12 @@ #define wxUSE_DEBUG_NEW_ALWAYS 0 #endif // wxUSE_MFC +// ODBC classes aren't Unicode-compatible yet +#if wxUSE_UNICODE +#undef wxUSE_ODBC +#define wxUSE_ODBC 0 +#endif + #if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) // Can't use OLE drag and drop in Windows 3.1 because we don't know how // to implement UUIDs @@ -631,6 +780,11 @@ #define wxUSE_NATIVE_STATUSBAR 0 #endif +#if !wxUSE_OWNER_DRAWN +#undef wxUSE_CHECKLISTBOX +#define wxUSE_CHECKLISTBOX 0 +#endif + // Salford C++ doesn't like some of the memory operator definitions #ifdef __SALFORDC__ #undef wxUSE_MEMORY_TRACING @@ -647,7 +801,7 @@ #undef wxUSE_OWNER_DRAWN #define wxUSE_OWNER_DRAWN 0 -#endif +#endif // __SALFORDC__ #ifdef __TWIN32__ @@ -657,7 +811,7 @@ #undef wxUSE_ODBC #define wxUSE_ODBC 0 -#endif +#endif // __TWIN32__ // BC++/Win16 can't cope with the amount of data in resource.cpp #if defined(__WIN16__) && defined(__BORLANDC__) @@ -677,15 +831,29 @@ #define wxUSE_LIBJPEG 0 #endif +#if defined(__BORLANDC__) +// Need a BC++-specific htmlhelp.lib before we can enable this +#undef wxUSE_MS_HTML_HELP +#define wxUSE_MS_HTML_HELP 0 +#endif + +// wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode +#if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL)) +#undef wxUSE_DEBUG_NEW_ALWAYS +#define wxUSE_DEBUG_NEW_ALWAYS 0 +#endif + #if defined(__WXMSW__) && defined(__WATCOMC__) -#undef wxUSE_LIBJPEG -#define wxUSE_LIBJPEG 0 - -#undef wxUSE_LIBTIFF -#define wxUSE_LIBTIFF 0 - +/* #undef wxUSE_GLCANVAS #define wxUSE_GLCANVAS 0 +*/ + +#undef wxUSE_MS_HTML_HELP +#define wxUSE_MS_HTML_HELP 0 + +#undef wxUSE_WCHAR_T +#define wxUSE_WCHAR_T 0 #endif #if defined(__WXMSW__) && !defined(__WIN32__) @@ -726,7 +894,48 @@ #undef wxUSE_GLCANVAS #define wxUSE_GLCANVAS 0 +#undef wxUSE_MS_HTML_HELP +#define wxUSE_MS_HTML_HELP 0 + +#undef wxUSE_WCHAR_T +#define wxUSE_WCHAR_T 0 + +#endif // Win16 + +// ---------------------------------------------------------------------------- +// undef the things which don't make sense for wxBase build +// ---------------------------------------------------------------------------- + +#if !wxUSE_GUI + +#undef wxUSE_HTML +#define wxUSE_HTML 0 + +#endif // !wxUSE_GUI + +// ---------------------------------------------------------------------------- +// check the settings consistency: do it here to abort compilation immediately +// and not almost in the very end when the relevant file fails to compile and +// you need to modify setup.h and rebuild everything +// ---------------------------------------------------------------------------- + +#if wxUSE_TIMEDATE && !wxUSE_LONGLONG + #error wxDateTime requires wxLongLong #endif +#if wxUSE_TEXTFILE && !wxUSE_FILE + #error You cannot compile wxTextFile without wxFile +#endif + +#if wxUSE_FILESYSTEM && !wxUSE_STREAMS + #error You cannot compile virtual file systems without wxUSE_STREAMS +#endif + +#if wxUSE_HTML && !wxUSE_FILESYSTEM + #error You cannot compile wxHTML without virtual file systems +#endif + +// add more tests here... + #endif // _WX_SETUP_H_ diff --git a/include/wx/msw/spinctrl.h b/include/wx/msw/spinctrl.h index 9a160ff7aa..243e7b6833 100644 --- a/include/wx/msw/spinctrl.h +++ b/include/wx/msw/spinctrl.h @@ -1,4 +1,4 @@ -///////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// // Name: msw/spinctrl.h // Purpose: wxSpinCtrl class declaration for Win32 // Author: Vadim Zeitlin @@ -57,6 +57,8 @@ public: // implementation only from now on // ------------------------------- + virtual ~wxSpinCtrl(); + virtual void SetValue(int val) { wxSpinButton::SetValue(val); } virtual int GetValue() const; virtual bool SetFont(const wxFont &font); @@ -65,16 +67,23 @@ public: virtual bool Enable(bool enable = TRUE); virtual bool Show(bool show = TRUE); - virtual bool AcceptsFocus() const { return TRUE; } + // wxSpinButton doesn't accept focus, but we do + virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); } + + WXFARPROC GetBuddyWndProc() const { return m_oldBuddyWndProc; } protected: + virtual void DoGetPosition(int *x, int *y) const; virtual void DoMoveWindow(int x, int y, int width, int height); virtual wxSize DoGetBestSize() const; + virtual void DoGetSize(int *width, int *height) const; // the handler for wxSpinButton events void OnSpinChange(wxSpinEvent& event); - WXHWND m_hwndBuddy; + // the data for the "buddy" text ctrl + WXHWND m_hwndBuddy; + WXFARPROC m_oldBuddyWndProc; private: DECLARE_DYNAMIC_CLASS(wxSpinCtrl) diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 732a38ebe8..f233ee08f6 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -115,10 +115,23 @@ public: virtual void Command(wxCommandEvent& event); virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + + // In WIN16, need to override normal erasing because + // Ctl3D doesn't use the wxWindows background colour. +#ifdef __WIN16__ + void OnEraseBackground(wxEraseEvent& event); +#endif #if wxUSE_RICHEDIT bool IsRich() const { return m_isRich; } void SetRichEdit(bool isRich) { m_isRich = isRich; } + + // rich edit controls are not compatible with normal ones and wem ust set + // the colours for them otherwise + virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetForegroundColour(const wxColour& colour); #endif // wxUSE_RICHEDIT virtual void AdoptAttributesFromHWND(); diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 20f6cbb2aa..72126d5668 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -161,6 +161,10 @@ public: wxWindow* GetWindowChild1(wxWindowID id); wxWindow* GetWindowChild(wxWindowID id); + // a MSW only function which sends a size event to the window using its + // current size - this has an effect of refreshing the window layout + void SendSizeEvent(); + // implementation from now on // -------------------------- diff --git a/include/wx/msw/winundef.h b/include/wx/msw/winundef.h index e580f24650..7a078f9a76 100644 --- a/include/wx/msw/winundef.h +++ b/include/wx/msw/winundef.h @@ -177,27 +177,33 @@ #ifdef LoadLibrary #undef LoadLibrary - inline HINSTANCE LoadLibrary(LPCTSTR lpLibFileName) - { #ifdef _UNICODE + inline HINSTANCE LoadLibrary(LPCWSTR lpLibFileName) + { return LoadLibraryW(lpLibFileName); - #else - return LoadLibraryA(lpLibFileName); - #endif } + #else + inline HINSTANCE LoadLibrary(LPCSTR lpLibFileName) + { + return LoadLibraryA(lpLibFileName); + } + #endif #endif // FindResource #ifdef FindResource #undef FindResource - inline HRSRC FindResource(HMODULE hModule, LPCTSTR lpName, LPCTSTR lpType) - { #ifdef _UNICODE + inline HRSRC FindResource(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType) + { return FindResourceW(hModule, lpName, lpType); - #else - return FindResourceA(hModule, lpName, lpType); - #endif } + #else + inline HRSRC FindResource(HMODULE hModule, LPCSTR lpName, LPCSTR lpType) + { + return FindResourceA(hModule, lpName, lpType); + } + #endif #endif // IsMaximized diff --git a/include/wx/msw/wx.rc b/include/wx/msw/wx.rc index 0f60b9bca7..85f671a478 100644 --- a/include/wx/msw/wx.rc +++ b/include/wx/msw/wx.rc @@ -41,7 +41,7 @@ // wxResizeableDialog DIALOG DISCARDABLE 34, 22, 144, 75 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +STYLE DS_MODALFRAME | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_THICKFRAME CAPTION "" BEGIN #ifdef __WATCOMC__ @@ -145,3 +145,7 @@ plot_enl_bmp BITMAP "wx/msw/plot_enl.bmp" plot_shr_bmp BITMAP "wx/msw/plot_shr.bmp" plot_zin_bmp BITMAP "wx/msw/plot_zin.bmp" plot_zot_bmp BITMAP "wx/msw/plot_zot.bmp" + +// For obtaining the RGB values of standard colours +wxBITMAP_STD_COLOURS BITMAP "wx/msw/colours.bmp" + diff --git a/include/wx/object.h b/include/wx/object.h index f444b6786e..3ce6e27bc3 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -170,6 +170,21 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ ? (className *)(obj) \ : (className *)0) +#define wxConstCast(obj, className) ((className *)(obj)) + +#ifdef __WXDEBUG__ + inline void wxCheckCast(void *ptr) + { + wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") ); + } + + #define wxStaticCast(obj, className) \ + (wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj))) + +#else // !Debug + #define wxStaticCast(obj, className) ((className *)(obj)) +#endif // Debug/!Debug + // Unfortunately Borland seems to need this include. #ifdef __BORLANDC__ #if wxUSE_IOSTREAMH @@ -203,7 +218,7 @@ class WXDLLEXPORT wxObject // VC++ 6.0 #if defined(__VISUALC__) && (__VISUALC__ >= 1200) - void operator delete(void *buf, char*, int); + void operator delete(void *buf, wxChar*, int); #endif // Causes problems for VC++ diff --git a/include/wx/os2/accel.h b/include/wx/os2/accel.h index 49730d5d9b..226e0320bc 100644 --- a/include/wx/os2/accel.h +++ b/include/wx/os2/accel.h @@ -53,28 +53,32 @@ class WXDLLEXPORT wxAcceleratorTable: public wxObject DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) public: wxAcceleratorTable(); - wxAcceleratorTable(const wxString& resource); // Load from .rc resource - wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); // Load from array + wxAcceleratorTable(const wxString& rsResource); // Load from .rc resource + wxAcceleratorTable( int n + ,wxAcceleratorEntry vaEntries[] + ); // Load from array // Copy constructors - inline wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); } - inline wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); } + inline wxAcceleratorTable(const wxAcceleratorTable& rAccel) { Ref(rAccel); } + inline wxAcceleratorTable(const wxAcceleratorTable* pAccel) { if (pAccel) Ref(*pAccel); } ~wxAcceleratorTable(); - inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) - { if (*this == accel) return (*this); Ref(accel); return *this; }; - inline bool operator == (const wxAcceleratorTable& accel) - { return m_refData == accel.m_refData; }; - inline bool operator != (const wxAcceleratorTable& accel) - { return m_refData != accel.m_refData; }; + inline wxAcceleratorTable& operator = (const wxAcceleratorTable& rAccel) + { if (*this == rAccel) return (*this); Ref(rAccel); return *this; }; + inline bool operator == (const wxAcceleratorTable& rAccel) + { return m_refData == rAccel.m_refData; }; + inline bool operator != (const wxAcceleratorTable& rAccel) + { return m_refData != rAccel.m_refData; }; bool Ok() const; void SetHACCEL(WXHACCEL hAccel); - WXHACCEL GetHACCEL() const; + WXHACCEL GetHACCEL(void) const; // translate the accelerator, return TRUE if done - bool Translate(wxWindow *window, WXMSG *msg) const; + bool Translate( WXHWND hWnd + ,WXMSG* pMsg + ) const; }; WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable; diff --git a/include/wx/os2/dc.h b/include/wx/os2/dc.h index 2df64604bc..d54d3f4488 100644 --- a/include/wx/os2/dc.h +++ b/include/wx/os2/dc.h @@ -78,148 +78,253 @@ public: // implement base class pure virtuals // ---------------------------------- - virtual void Clear(); + virtual void Clear(void); - virtual bool StartDoc(const wxString& message); - virtual void EndDoc(); + virtual bool StartDoc(const wxString& rsMessage); + virtual void EndDoc(void); - virtual void StartPage(); - virtual void EndPage(); + virtual void StartPage(void); + virtual void EndPage(void); - virtual void SetFont(const wxFont& font); - virtual void SetPen(const wxPen& pen); - virtual void SetBrush(const wxBrush& brush); - virtual void SetBackground(const wxBrush& brush); - virtual void SetBackgroundMode(int mode); - virtual void SetPalette(const wxPalette& palette); + virtual void SetFont(const wxFont& rFont); + virtual void SetPen(const wxPen& rPen); + virtual void SetBrush(const wxBrush& rBrush); + virtual void SetBackground(const wxBrush& rBrush); + virtual void SetBackgroundMode(int nMode); + virtual void SetPalette(const wxPalette& rPalette); - virtual void DestroyClippingRegion(); + virtual void DestroyClippingRegion(void); - virtual wxCoord GetCharHeight() const; - virtual wxCoord GetCharWidth() const; - virtual void DoGetTextExtent(const wxString& string, - wxCoord *x, wxCoord *y, - wxCoord *descent = NULL, - wxCoord *externalLeading = NULL, - wxFont *theFont = NULL) const; + virtual wxCoord GetCharHeight(void) const; + virtual wxCoord GetCharWidth(void) const; + virtual void DoGetTextExtent( const wxString& rsString + ,wxCoord* pX + ,wxCoord* pY + ,wxCoord* pDescent = NULL + ,wxCoord* pExternalLeading = NULL + ,wxFont* pTheFont = NULL + ) const; + virtual bool CanDrawBitmap(void) const; + virtual bool CanGetTextExtent(void) const; + virtual int GetDepth(void) const; + virtual wxSize GetPPI(void) const; - virtual bool CanDrawBitmap() const; - virtual bool CanGetTextExtent() const; - virtual int GetDepth() const; - virtual wxSize GetPPI() const; - - virtual void SetMapMode(int mode); - virtual void SetUserScale(double x, double y); - virtual void SetSystemScale(double x, double y); - virtual void SetLogicalScale(double x, double y); - virtual void SetLogicalOrigin(wxCoord x, wxCoord y); - virtual void SetDeviceOrigin(wxCoord x, wxCoord y); - virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); - virtual void SetLogicalFunction(int function); + virtual void SetMapMode(int nMode); + virtual void SetUserScale( double dX + ,double dY + ); + virtual void SetSystemScale( double dX + ,double dY + ); + virtual void SetLogicalScale( double dX + ,double dY + ); + virtual void SetLogicalOrigin( wxCoord vX + ,wxCoord vY + ); + virtual void SetDeviceOrigin( wxCoord vX + ,wxCoord vY + ); + virtual void SetAxisOrientation( bool bXLeftRight + ,bool bYBottomUp + ); + virtual void SetLogicalFunction(int nFunction); // implementation from now on // -------------------------- - virtual void SetRop(WXHDC cdc); - virtual void DoClipping(WXHDC cdc); - virtual void SelectOldObjects(WXHDC dc); + virtual void SetRop(WXHDC hCdc); + virtual void SelectOldObjects(WXHDC hDc); - wxWindow *GetWindow() const { return m_canvas; } - void SetWindow(wxWindow *win) { m_canvas = win; } + wxWindow* GetWindow(void) const { return m_pCanvas; } + void SetWindow(wxWindow* pWin) { m_pCanvas = pWin; } - WXHDC GetHDC() const { return m_hDC; } - void SetHDC(WXHDC dc, bool bOwnsDC = FALSE) + WXHDC GetHDC(void) const { return m_hDC; } + void SetHDC( WXHDC hDc + ,bool bOwnsDC = FALSE + ) { - m_hDC = dc; + m_hDC = hDc; m_bOwnsDC = bOwnsDC; } + const wxBitmap& GetSelectedBitmap(void) const { return m_vSelectedBitmap; } + wxBitmap& GetSelectedBitmap(void) { return m_vSelectedBitmap; } + protected: - virtual void DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, - int style = wxFLOOD_SURFACE); + virtual void DoFloodFill( wxCoord vX + ,wxCoord vY + ,const wxColour& rCol + ,int nStyle = wxFLOOD_SURFACE + ); - virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; + virtual bool DoGetPixel( wxCoord vX + ,wxCoord vY + ,wxColour* pCol + ) const; - virtual void DoDrawPoint(wxCoord x, wxCoord y); - virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + virtual void DoDrawPoint( wxCoord vX + ,wxCoord vY + ); + virtual void DoDrawLine( wxCoord vX1 + ,wxCoord vY1 + ,wxCoord vX2 + ,wxCoord vY2 + ); - virtual void DoDrawArc(wxCoord x1, wxCoord y1, - wxCoord x2, wxCoord y2, - wxCoord xc, wxCoord yc); - virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, - double sa, double ea); + virtual void DoDrawArc( wxCoord vX1 + ,wxCoord vY1 + ,wxCoord vX2 + ,wxCoord vY2 + ,wxCoord vXc + ,wxCoord vYc + ); + virtual void DoDrawCheckMark( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); + virtual void DoDrawEllipticArc( wxCoord vX + ,wxCoord vY + ,wxCoord vW + ,wxCoord vH + ,double dSa + ,double dEa + ); - virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); - virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, - wxCoord width, wxCoord height, - double radius); - virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoDrawRectangle( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); + virtual void DoDrawRoundedRectangle( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ,double dRadius + ); + virtual void DoDrawEllipse( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); - virtual void DoCrossHair(wxCoord x, wxCoord y); + virtual void DoCrossHair( wxCoord vX + ,wxCoord vY + ); - virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); - virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, - bool useMask = FALSE); + virtual void DoDrawIcon( const wxIcon& rIcon + ,wxCoord vX + ,wxCoord vY + ); + virtual void DoDrawBitmap( const wxBitmap& rBmp + ,wxCoord vX + ,wxCoord vY + ,bool bUseMask = FALSE + ); - virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); - virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, - double angle); + virtual void DoDrawText( const wxString& rsText + ,wxCoord vX + ,wxCoord vY + ); + virtual void DoDrawRotatedText( const wxString& rsText + ,wxCoord vX + ,wxCoord vY + ,double dAngle + ); - virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, - wxDC *source, wxCoord xsrc, wxCoord ysrc, - int rop = wxCOPY, bool useMask = FALSE); + virtual bool DoBlit( wxCoord vXdest + ,wxCoord vYdest + ,wxCoord vWidth + ,wxCoord vHeight + ,wxDC* pSource + ,wxCoord vXsrc + ,wxCoord vYsrc + ,int nRop = wxCOPY + ,bool bUseMask = FALSE + ); - // this is gnarly - we can't even call this function DoSetClippingRegion() - // because of virtual function hiding - virtual void DoSetClippingRegionAsRegion(const wxRegion& region); - virtual void DoSetClippingRegion(wxCoord x, wxCoord y, - wxCoord width, wxCoord height); - virtual void DoGetClippingRegion(wxCoord *x, wxCoord *y, - wxCoord *width, wxCoord *height) + virtual void DoSetClippingRegionAsRegion(const wxRegion& rRegion); + virtual void DoSetClippingRegion( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); + virtual void DoGetClippingRegion( wxCoord* pX + ,wxCoord* pY + ,wxCoord* pWidth + ,wxCoord* pHeight) { - GetClippingBox(x, y, width, height); + GetClippingBox( pX + ,pY + ,pWidth + ,pHeight + ); } - virtual void DoGetSize(int *width, int *height) const; - virtual void DoGetSizeMM(int* width, int* height) const; + virtual void DoGetSize( int* pWidth + ,int* pHeight + ) const; + virtual void DoGetSizeMM( int* pWidth + ,int* pHeight + ) const; - virtual void DoDrawLines(int n, wxPoint points[], - wxCoord xoffset, wxCoord yoffset); - virtual void DoDrawPolygon(int n, wxPoint points[], - wxCoord xoffset, wxCoord yoffset, - int fillStyle = wxODDEVEN_RULE); + virtual void DoDrawLines( int n + ,wxPoint vaPoints[] + ,wxCoord vXoffset + ,wxCoord yYoffset + ); + virtual void DoDrawPolygon( int n + ,wxPoint vaPoints[] + ,wxCoord vXoffset + ,wxCoord vYoffset + ,int nFillStyle = wxODDEVEN_RULE + ); #if wxUSE_SPLINES - virtual void DoDrawSpline(wxList *points); + virtual void DoDrawSpline(wxList* pPoints); #endif // wxUSE_SPLINES - // OS2-specific member variables - int m_windowExtX; - int m_windowExtY; + // + // common part of DoDrawText() and DoDrawRotatedText() + // + void DrawAnyText( const wxString& rsText + ,wxCoord vX + ,wxCoord vY + ); + // OS2-specific member variables ?? do we even need this under OS/2? + int m_nWindowExtX; + int m_nWindowExtY; + + // // the window associated with this DC (may be NULL) - wxWindow *m_canvas; - - wxBitmap m_selectedBitmap; + // + wxWindow* m_pCanvas; + wxBitmap m_vSelectedBitmap; + // // TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it - bool m_bOwnsDC:1; + // + bool m_bOwnsDC:1; + // // our HDC and its usage count: we only free it when the usage count drops // to 0 - WXHDC m_hDC; - int m_hDCCount; + // + WXHDC m_hDC; + int m_nDCCount; + // // Store all old GDI objects when do a SelectObject, so we can select them // back in (this unselecting user's objects) so we can safely delete the // DC. - WXHBITMAP m_oldBitmap; - WXHPEN m_oldPen; - WXHBRUSH m_oldBrush; - WXHFONT m_oldFont; - WXHPALETTE m_oldPalette; - - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. + // + WXHBITMAP m_hOldBitmap; + WXHPEN m_hOldPen; + WXHBRUSH m_hOldBrush; + WXHFONT m_hOldFont; + WXHPALETTE m_hOldPalette; }; #endif // _WX_DC_H_ diff --git a/include/wx/os2/filedlg.h b/include/wx/os2/filedlg.h index 134f26b77a..d1b17552db 100644 --- a/include/wx/os2/filedlg.h +++ b/include/wx/os2/filedlg.h @@ -39,8 +39,11 @@ public: inline wxString GetMessage() const { return m_message; } inline wxString GetPath() const { return m_path; } + inline void GetPaths(wxArrayString& a) { a.Empty(); a.Add(m_path); } inline wxString GetDirectory() const { return m_dir; } inline wxString GetFilename() const { return m_fileName; } + inline void GetFilenames(wxArrayString& a) { a.Empty(); + a.Add( m_fileName); } inline wxString GetWildcard() const { return m_wildCard; } inline long GetStyle() const { return m_dialogStyle; } inline int GetFilterIndex() const { return m_filterIndex ; } diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index e2b86e739f..67a9dc775b 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -140,6 +140,10 @@ public: void SetToolTipCtrl(WXHWND hHwndTT) { m_hWndToolTip = hHwndTT; } #endif // tooltips + void SetClient(WXHWND c_Hwnd); + void SetClient(wxWindow* c_Window); + wxWindow *GetClient(); + protected: // common part of all ctors void Init(void); @@ -196,12 +200,34 @@ protected: int m_nFsToolBarHeight; bool m_bFsIsMaximized; bool m_bFsIsShowing; + bool m_bIsShown; + wxWindow* m_pWinLastFocused; private: #if wxUSE_TOOLTIPS WXHWND m_hWndToolTip; #endif // tooltips + // + // Handles to child windows of the Frame that we don't have child objects for + // + WXHWND m_hTitleBar; + WXHWND m_hHScroll; + WXHWND m_hVScroll; + + // + // Swp structures for various client data + // DW: Better off in attached RefData? + // + SWP m_vSwp; + SWP m_vSwpClient; + SWP m_vSwpTitleBar; + SWP m_vSwpMenuBar; + SWP m_vSwpHScroll; + SWP m_vSwpVScroll; + SWP m_vSwpStatusBar; + SWP m_vSwpToolBar; + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxFrame) }; diff --git a/include/wx/os2/helpwin.h b/include/wx/os2/helpwin.h index 4b52caf81b..ab87cf1f5b 100644 --- a/include/wx/os2/helpwin.h +++ b/include/wx/os2/helpwin.h @@ -42,8 +42,9 @@ class WXDLLEXPORT wxWinHelpController: public wxHelpControllerBase protected: wxString m_helpFile; private: - // virtual function hiding supression :: do not use - bool Initialize(const wxString& file, int WXUNUSED(server) ) { return(Initialize(file)); } + // virtual function hiding supression :: do not use + bool Initialize(const wxString& rFile, int WXUNUSED(nServer) ) { return(Initialize(rFile)); } + bool DisplaySection(const wxString& rSection) { return wxHelpControllerBase::DisplaySection(rSection); } }; #endif diff --git a/include/wx/os2/menu.h b/include/wx/os2/menu.h index 948351c469..7b05ee3297 100644 --- a/include/wx/os2/menu.h +++ b/include/wx/os2/menu.h @@ -154,6 +154,11 @@ private: // WXHMENU m_hMenu; + // + // The helper variable for creating unique IDs. + // + static USHORT m_nextMenuId; + #if wxUSE_ACCEL // // The accelerators for our menu items diff --git a/include/wx/os2/msgdlg.h b/include/wx/os2/msgdlg.h index 0855e17f81..af7a32d046 100644 --- a/include/wx/os2/msgdlg.h +++ b/include/wx/os2/msgdlg.h @@ -22,25 +22,34 @@ WXDLLEXPORT_DATA(extern const char*) wxMessageBoxCaptionStr; -class WXDLLEXPORT wxMessageDialog: public wxDialog +class WXDLLEXPORT wxMessageDialog : public wxDialog { DECLARE_DYNAMIC_CLASS(wxMessageDialog) -protected: - wxString m_caption; - wxString m_message; - long m_dialogStyle; - wxWindow * m_parent; public: - wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + wxMessageDialog( wxWindow* pParent + ,const wxString& rsMessage + ,const wxString& rsCaption = wxMessageBoxCaptionStr + ,long lStyle = wxOK|wxCENTRE + ,const wxPoint& rPos = wxDefaultPosition + ); - int ShowModal(); -}; + int ShowModal(void); + +protected: + wxString m_sCaption; + wxString m_sMessage; + long m_lDialogStyle; + wxWindow* m_pParent; +}; // end of CLASS wxMessageDialog -int WXDLLEXPORT wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, - wxWindow *parent = NULL, int x = -1, int y = -1); +int WXDLLEXPORT wxMessageBox( const wxString& rsMessage + ,const wxString& rsCaption = wxMessageBoxCaptionStr + ,long lStyle = wxOK|wxCENTRE + ,wxWindow* pParent = NULL + ,int nX = -1 + ,int nY = -1 + ); #endif // _WX_MSGBOXDLG_H_ diff --git a/include/wx/os2/private.h b/include/wx/os2/private.h index 2dd674aeed..1c83c9da7e 100644 --- a/include/wx/os2/private.h +++ b/include/wx/os2/private.h @@ -18,6 +18,7 @@ #define INCL_PM #define INCL_GPI #define INCL_WINSYS +#define INCL_SHLERRORS #include class WXDLLEXPORT wxFont; diff --git a/include/wx/os2/setup.h b/include/wx/os2/setup.h index 8ac9024a09..af39e6ba89 100644 --- a/include/wx/os2/setup.h +++ b/include/wx/os2/setup.h @@ -149,7 +149,11 @@ // since you may well need to output // an error log in a production // version (or non-debugging beta) +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 +#else #define wxUSE_GLOBAL_MEMORY_OPERATORS 1 +#endif // In debug mode, cause new and delete to be redefined globally. // If this causes problems (e.g. link errors), set this to 0. @@ -167,13 +171,23 @@ #define wxUSE_ODBC 1 // Define 1 to use ODBC classes -#define wxODBC_FWD_ONLY_CURSORS 1 - // Some databases/ODBC drivers only allow forward scrolling cursors. - // Unless you specifically want to use backward scrolling - // cursors, and you know that all of the databases/ODBC drivers - // that you will use these odbc classes with allow backward - // scrolling cursors, this setting should remain set to 1 - // for maximum database/driver compatibilty +#define wxODBC_FWD_ONLY_CURSORS 1 + // For backward compatibility reasons, this parameter now only + // controls the default scrolling method used by cursors. This + // default behavior can be overriden by setting the second param + // of wxDB::GetDbConnection() to indicate whether the connection + // (and any wxTable()s that use the connection) should support + // forward only scrolling of cursors, or both forward and backward + // Support for backward scrolling cursors is dependent on the + // data source as well as the ODBC driver being used. + +#define wxODBC_BACKWARD_COMPATABILITY 0 + // Default is 0. Set to 1 to use the deprecated classes, enum + // types, function, member variables. With a setting of 1, full + // backward compatability with the 2.0.x release is possible. + // It is STRONGLY recommended that this be set to 0, as + // future development will be done only on the non-deprecated + // functions/classes/member variables/etc. #define wxUSE_IOSTREAMH 1 // VC++ 4.2 and above allows and @@ -187,10 +201,6 @@ // Use standard C++ streams if 1. If 0, use wxWin // streams implementation. -#define wxUSE_WXCONFIG 1 - // if enabled, compiles built-in OS independent wxConfig - // class and it's file (any platform) and registry (Win) - // based implementations #define wxUSE_THREADS 1 // support for multithreaded applications: if // 1, compile in thread classes (thread.h) diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 8ac9024a09..af39e6ba89 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -149,7 +149,11 @@ // since you may well need to output // an error log in a production // version (or non-debugging beta) +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 +#else #define wxUSE_GLOBAL_MEMORY_OPERATORS 1 +#endif // In debug mode, cause new and delete to be redefined globally. // If this causes problems (e.g. link errors), set this to 0. @@ -167,13 +171,23 @@ #define wxUSE_ODBC 1 // Define 1 to use ODBC classes -#define wxODBC_FWD_ONLY_CURSORS 1 - // Some databases/ODBC drivers only allow forward scrolling cursors. - // Unless you specifically want to use backward scrolling - // cursors, and you know that all of the databases/ODBC drivers - // that you will use these odbc classes with allow backward - // scrolling cursors, this setting should remain set to 1 - // for maximum database/driver compatibilty +#define wxODBC_FWD_ONLY_CURSORS 1 + // For backward compatibility reasons, this parameter now only + // controls the default scrolling method used by cursors. This + // default behavior can be overriden by setting the second param + // of wxDB::GetDbConnection() to indicate whether the connection + // (and any wxTable()s that use the connection) should support + // forward only scrolling of cursors, or both forward and backward + // Support for backward scrolling cursors is dependent on the + // data source as well as the ODBC driver being used. + +#define wxODBC_BACKWARD_COMPATABILITY 0 + // Default is 0. Set to 1 to use the deprecated classes, enum + // types, function, member variables. With a setting of 1, full + // backward compatability with the 2.0.x release is possible. + // It is STRONGLY recommended that this be set to 0, as + // future development will be done only on the non-deprecated + // functions/classes/member variables/etc. #define wxUSE_IOSTREAMH 1 // VC++ 4.2 and above allows and @@ -187,10 +201,6 @@ // Use standard C++ streams if 1. If 0, use wxWin // streams implementation. -#define wxUSE_WXCONFIG 1 - // if enabled, compiles built-in OS independent wxConfig - // class and it's file (any platform) and registry (Win) - // based implementations #define wxUSE_THREADS 1 // support for multithreaded applications: if // 1, compile in thread classes (thread.h) diff --git a/include/wx/paper.h b/include/wx/paper.h index 1d9a7bb750..f81b155079 100644 --- a/include/wx/paper.h +++ b/include/wx/paper.h @@ -19,6 +19,7 @@ #include "wx/defs.h" #include "wx/event.h" #include "wx/cmndata.h" +#include "wx/intl.h" /* * Paper type: see defs.h for wxPaperSize enum. @@ -40,7 +41,7 @@ public: // platformId is a platform-specific id, such as in Windows, DMPAPER_... wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h); - inline const wxString& GetName() const { return m_paperName; } + inline wxString GetName() const { return wxGetTranslation(m_paperName); } inline wxPaperSize GetId() const { return m_paperId; } inline int GetPlatformId() const { return m_platformId; } diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index f323f25e85..1533a3d526 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -38,6 +38,15 @@ class WXDLLEXPORT wxPreviewCanvas; class WXDLLEXPORT wxPreviewControlBar; class WXDLLEXPORT wxPreviewFrame; + +enum wxPrinterError +{ + wxPRINTER_NO_ERROR = 0, + wxPRINTER_CANCELLED, + wxPRINTER_ERROR +}; + + /* * Represents the printer: manages printing a wxPrintout object */ @@ -56,6 +65,8 @@ public: wxPrintDialogData& GetPrintDialogData() const { return (wxPrintDialogData&) m_printDialogData; } bool GetAbort() const { return sm_abortIt; } + + static wxPrinterError GetLastError() { return sm_lastError; } /////////////////////////////////////////////////////////////////////////// // OVERRIDES @@ -67,6 +78,9 @@ public: protected: wxPrintDialogData m_printDialogData; wxPrintout* m_currentPrintout; + + static wxPrinterError sm_lastError; + public: static wxWindow* sm_abortWindow; static bool sm_abortIt; diff --git a/include/wx/process.h b/include/wx/process.h index f88b6a85c7..ea2fc303d8 100644 --- a/include/wx/process.h +++ b/include/wx/process.h @@ -19,7 +19,10 @@ #include "wx/defs.h" #include "wx/object.h" #include "wx/event.h" + +#if wxUSE_STREAMS #include "wx/stream.h" +#endif // Process Event handling class WXDLLEXPORT wxProcessEvent : public wxEvent @@ -72,20 +75,31 @@ public: // before the process it started terminates void Detach(); +#if wxUSE_STREAMS // Pipe handling wxInputStream *GetInputStream() const { return m_inputStream; } + wxInputStream *GetErrorStream() const { return m_errorStream; } wxOutputStream *GetOutputStream() const { return m_outputStream; } + // close the output stream indicating that nothing more will be written + void CloseOutput() { delete m_outputStream; m_outputStream = NULL; } + // implementation only (for wxExecute) - void SetPipeStreams(wxInputStream *inStream, wxOutputStream *outStream); + void SetPipeStreams(wxInputStream *inStream, + wxOutputStream *outStream, + wxInputStream *errStream); +#endif // wxUSE_STREAMS protected: void Init(wxEvtHandler *parent, int id, bool redirect); int m_id; - wxInputStream *m_inputStream; +#if wxUSE_STREAMS + wxInputStream *m_inputStream, + *m_errorStream; wxOutputStream *m_outputStream; +#endif // wxUSE_STREAMS bool m_redirect; }; diff --git a/include/wx/propform.h b/include/wx/propform.h index 120b0a1bf2..3b3b1ad859 100644 --- a/include/wx/propform.h +++ b/include/wx/propform.h @@ -236,23 +236,27 @@ class WXDLLEXPORT wxStringFormValidator: public wxPropertyFormValidator class WXDLLEXPORT wxPropertyFormDialog: public wxDialog { - DECLARE_CLASS(wxPropertyFormDialog) - public: - wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"); +public: + wxPropertyFormDialog(wxPropertyFormView *v = NULL, + wxWindow *parent = NULL, + const wxString& title = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = _T("dialogBox")); - void OnCloseWindow(wxCloseEvent& event); - void OnDefaultAction(wxControl *item); - void OnCommand(wxWindow& win, wxCommandEvent& event); + void OnCloseWindow(wxCloseEvent& event); + void OnDefaultAction(wxControl *item); + void OnCommand(wxWindow& win, wxCommandEvent& event); - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); + // Extend event processing to search the view's event table + virtual bool ProcessEvent(wxEvent& event); - private: - wxPropertyFormView* m_view; +private: + wxPropertyFormView* m_view; -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxPropertyFormDialog) }; /* @@ -261,22 +265,29 @@ DECLARE_EVENT_TABLE() class WXDLLEXPORT wxPropertyFormPanel: public wxPanel { - DECLARE_CLASS(wxPropertyFormPanel) - public: - wxPropertyFormPanel(wxPropertyFormView *v, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "panel"): - wxPanel(parent, -1, pos, size, style, name) - { - m_view = v; - } - void OnDefaultAction(wxControl *item); - void OnCommand(wxWindow& win, wxCommandEvent& event); +public: + wxPropertyFormPanel(wxPropertyFormView *v = NULL, + wxWindow *parent = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = _T("panel")) + : wxPanel(parent, -1, pos, size, style, name) + { + m_view = v; + } + void OnDefaultAction(wxControl *item); + void OnCommand(wxWindow& win, wxCommandEvent& event); - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); + // Extend event processing to search the view's event table + virtual bool ProcessEvent(wxEvent& event); + void SetView(wxPropertyFormView* view) { m_view = view; } + wxPropertyFormView* GetView() const { return m_view; } - private: - wxPropertyFormView* m_view; +private: + wxPropertyFormView* m_view; + + DECLARE_CLASS(wxPropertyFormPanel) }; /* @@ -285,28 +296,32 @@ class WXDLLEXPORT wxPropertyFormPanel: public wxPanel class WXDLLEXPORT wxPropertyFormFrame: public wxFrame { - DECLARE_CLASS(wxPropertyFormFrame) - public: - wxPropertyFormFrame(wxPropertyFormView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): - wxFrame(parent, -1, title, pos, size, style, name) - { - m_view = v; - m_propertyPanel = NULL; - } - void OnCloseWindow(wxCloseEvent& event); +public: + wxPropertyFormFrame(wxPropertyFormView *v = NULL, + wxFrame *parent = NULL, + const wxString& title = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = _T("frame")) + : wxFrame(parent, -1, title, pos, size, style, name) + { + m_view = v; + m_propertyPanel = NULL; + } + void OnCloseWindow(wxCloseEvent& event); - // Must call this to create panel and associate view - virtual bool Initialize(void); - virtual wxPanel *OnCreatePanel(wxFrame *parent, wxPropertyFormView *v); - inline virtual wxPanel *GetPropertyPanel(void) const { return m_propertyPanel; } + // Must call this to create panel and associate view + virtual bool Initialize(void); + virtual wxPanel *OnCreatePanel(wxFrame *parent, wxPropertyFormView *v); + inline virtual wxPanel *GetPropertyPanel(void) const { return m_propertyPanel; } - private: - wxPropertyFormView* m_view; - wxPanel* m_propertyPanel; +private: + wxPropertyFormView* m_view; + wxPanel* m_propertyPanel; -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxPropertyFormFrame) }; #endif diff --git a/include/wx/proplist.h b/include/wx/proplist.h index de72221bbd..ea93c33eb0 100644 --- a/include/wx/proplist.h +++ b/include/wx/proplist.h @@ -191,15 +191,22 @@ private: class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl { - DECLARE_CLASS(wxPropertyTextEdit) - public: - wxPropertyTextEdit(wxPropertyListView *v, wxWindow *parent, const wxWindowID id, - const wxString& value, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "text"); - void OnSetFocus(void); - void OnKillFocus(void); +public: + wxPropertyTextEdit(wxPropertyListView *v = NULL, + wxWindow *parent = NULL, + const wxWindowID id = -1, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = _T("text")); - wxPropertyListView* m_view; + void OnSetFocus(); + void OnKillFocus(); + + wxPropertyListView* m_view; + + DECLARE_CLASS(wxPropertyTextEdit) }; #define wxPROP_ALLOW_TEXT_EDITING 1 @@ -272,22 +279,27 @@ class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator class WXDLLEXPORT wxPropertyListDialog: public wxDialog { - DECLARE_CLASS(wxPropertyListDialog) - public: - wxPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"); - void OnCloseWindow(wxCloseEvent& event); - void OnDefaultAction(wxControl *item); - void OnCancel(wxCommandEvent& event); +public: + wxPropertyListDialog(wxPropertyListView *v = NULL, + wxWindow *parent = NULL, + const wxString& title = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = _T("dialogBox")); - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); + void OnCloseWindow(wxCloseEvent& event); + void OnDefaultAction(wxControl *item); + void OnCancel(wxCommandEvent& event); - private: - wxPropertyListView* m_view; + // Extend event processing to search the view's event table + virtual bool ProcessEvent(wxEvent& event); -DECLARE_EVENT_TABLE() +private: + wxPropertyListView* m_view; + + DECLARE_CLASS(wxPropertyListDialog) + DECLARE_EVENT_TABLE() }; /* @@ -296,31 +308,34 @@ DECLARE_EVENT_TABLE() class WXDLLEXPORT wxPropertyListPanel: public wxPanel { - DECLARE_CLASS(wxPropertyListPanel) - public: - wxPropertyListPanel(wxPropertyListView *v, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "panel"): - wxPanel(parent, -1, pos, size, style, name) - { - m_view = v; - } - ~wxPropertyListPanel(); - void OnDefaultAction(wxControl *item); +public: + wxPropertyListPanel(wxPropertyListView *v = NULL, + wxWindow *parent = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = _T("panel")) + : wxPanel(parent, -1, pos, size, style, name) + { + m_view = v; + } + ~wxPropertyListPanel(); + void OnDefaultAction(wxControl *item); - inline void SetView(wxPropertyListView* v) { m_view = v; } - inline wxPropertyListView* GetView() const { return m_view; } + inline void SetView(wxPropertyListView* v) { m_view = v; } + inline wxPropertyListView* GetView() const { return m_view; } - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); + // Extend event processing to search the view's event table + virtual bool ProcessEvent(wxEvent& event); - // Call Layout() - void OnSize(wxSizeEvent& event); + // Call Layout() + void OnSize(wxSizeEvent& event); - private: - wxPropertyListView* m_view; +private: + wxPropertyListView* m_view; -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxPropertyListPanel) }; /* @@ -329,29 +344,33 @@ DECLARE_EVENT_TABLE() class WXDLLEXPORT wxPropertyListFrame: public wxFrame { - DECLARE_CLASS(wxPropertyListFrame) - public: - wxPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): - wxFrame(parent, -1, title, pos, size, style, name) - { - m_view = v; - m_propertyPanel = NULL; - } - void OnCloseWindow(wxCloseEvent& event); +public: + wxPropertyListFrame(wxPropertyListView *v = NULL, + wxFrame *parent = NULL, + const wxString& title = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = _T("frame")) + : wxFrame(parent, -1, title, pos, size, style, name) + { + m_view = v; + m_propertyPanel = NULL; + } + void OnCloseWindow(wxCloseEvent& event); - // Must call this to create panel and associate view - virtual bool Initialize(void); - virtual wxPropertyListPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); - inline virtual wxPropertyListPanel *GetPropertyPanel(void) const { return m_propertyPanel; } - inline wxPropertyListView* GetView() const { return m_view; } + // Must call this to create panel and associate view + virtual bool Initialize(void); + virtual wxPropertyListPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); + inline virtual wxPropertyListPanel *GetPropertyPanel(void) const { return m_propertyPanel; } + inline wxPropertyListView* GetView() const { return m_view; } - private: - wxPropertyListView* m_view; - wxPropertyListPanel* m_propertyPanel; +private: + wxPropertyListView* m_view; + wxPropertyListPanel* m_propertyPanel; -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxPropertyListFrame) }; /* diff --git a/include/wx/protocol/protocol.h b/include/wx/protocol/protocol.h index 1ac98294c8..894ca9615d 100644 --- a/include/wx/protocol/protocol.h +++ b/include/wx/protocol/protocol.h @@ -96,7 +96,15 @@ public: \ static wxProtoInfo g_proto_##class; #define IMPLEMENT_PROTOCOL(class, name, serv, host) \ -wxProtoInfo class::g_proto_##class(name, serv, host, CLASSINFO(class)); +wxProtoInfo class::g_proto_##class(name, serv, host, CLASSINFO(class)); \ +bool wxProtocolUse##class = TRUE; + +#define USE_PROTOCOL(class) \ + extern bool wxProtocolUse##class ; \ + static struct wxProtocolUserFor##class \ + { \ + wxProtocolUserFor##class() { wxProtocolUse##class = TRUE; } \ + } wxProtocolDoUse##class; class WXDLLEXPORT wxProtoInfo : public wxObject { diff --git a/include/wx/qt/dc.h b/include/wx/qt/dc.h index eb10154ab9..9943b0e2ab 100644 --- a/include/wx/qt/dc.h +++ b/include/wx/qt/dc.h @@ -365,8 +365,6 @@ class WXDLLEXPORT wxDC: public wxObject bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. - long m_clipX1,m_clipY1,m_clipX2,m_clipY2; long m_minX,m_maxX,m_minY,m_maxY; }; diff --git a/include/wx/resource.h b/include/wx/resource.h index ef958da862..34f282c777 100644 --- a/include/wx/resource.h +++ b/include/wx/resource.h @@ -36,9 +36,13 @@ // Extended styles: for resource usage only // Use dialog units instead of pixels -#define wxRESOURCE_DIALOG_UNITS 1 +#define wxRESOURCE_DIALOG_UNITS 0x0001 // Use default system colour and font -#define wxRESOURCE_USE_DEFAULTS 2 +#define wxRESOURCE_USE_DEFAULTS 0x0002 +// Old-style vertical label +#define wxRESOURCE_VERTICAL_LABEL 0x0004 +// Old-style horizontal label +#define wxRESOURCE_HORIZONTAL_LABEL 0x0008 // Macros to help use dialog units #define wxDLG_POINT(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxPoint(x, y)) : wxPoint(x, y)) diff --git a/include/wx/sckipc.h b/include/wx/sckipc.h index 603eef900c..743da0ab9f 100644 --- a/include/wx/sckipc.h +++ b/include/wx/sckipc.h @@ -59,6 +59,7 @@ class WXDLLEXPORT wxTCPClient; class WXDLLEXPORT wxTCPConnection: public wxConnectionBase { DECLARE_DYNAMIC_CLASS(wxTCPConnection) + public: wxTCPConnection(char *buffer, int size); wxTCPConnection(); @@ -77,18 +78,19 @@ public: // Calls that both can make virtual bool Disconnect(void); + // Callbacks to BOTH - override at will // Default behaviour is to delete connection and return TRUE virtual bool OnDisconnect(void) { delete this; return TRUE; } - // To enable the compressor + // To enable the compressor (NOTE: not implemented!) void Compress(bool on); protected: - wxSocketBase *m_sock; - wxSocketStream *m_sockstrm; - wxDataInputStream *m_codeci; + wxSocketBase *m_sock; + wxSocketStream *m_sockstrm; + wxDataInputStream *m_codeci; wxDataOutputStream *m_codeco; - wxString m_topic; + wxString m_topic; friend class wxTCPServer; friend class wxTCPClient; @@ -112,9 +114,14 @@ public: wxTCPServer(); virtual ~wxTCPServer(); - // Returns FALSE if can't create server (e.g. port number is already in use) - virtual bool Create(const wxString& server_name); + // Returns FALSE on error (e.g. port number is already in use) + virtual bool Create(const wxString& serverName); + + // Callbacks to SERVER - override at will virtual wxConnectionBase *OnAcceptConnection(const wxString& topic); + +protected: + wxSocketServer *m_server; }; class wxTCPClient: public wxClientBase @@ -126,13 +133,13 @@ public: virtual ~wxTCPClient(); virtual bool ValidHost(const wxString& host); - // Call this to make a connection. - // Returns NULL if cannot. + + // Call this to make a connection. Returns NULL if cannot. virtual wxConnectionBase *MakeConnection(const wxString& host, const wxString& server, const wxString& topic); - // Tailor this to return own connection. + // Callbacks to CLIENT - override at will virtual wxConnectionBase *OnMakeConnection(); }; diff --git a/include/wx/setup.h b/include/wx/setup.h deleted file mode 100644 index aeadc41966..0000000000 --- a/include/wx/setup.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The main configuration file for wxWindows. - * - * NB: this file can be included in .c files, so it must be compileable by a C - * compiler - use #ifdef __cplusplus for C++ specific features and avoid - * using C++ style comments - */ - -#ifndef _WX_SETUP_H_BASE_ -#define _WX_SETUP_H_BASE_ - -/* compatibility code, to be removed asap: */ - -#if !defined(__WXBASE__) && !defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__WXMOTIF__) && !defined(__WXQT__) && !defined(__WXSTUBS__) && !defined(__WXMAC__) && !defined(__WXPM__) -#error No __WXxxx__ define set! Please define one of __WXBASE__,__WXGTK__,__WXMSW__,__WXMOTIF__,__WXMAC__,__WXQT__,__WXPM__,__WXSTUBS__ -#endif - -#ifdef __WXBASE__ -#include "wx/base/setup.h" -#elif defined(__VMS) -#include "wx_root:[wxwindows]setup.h" -#elif defined(__WXMSW__) -#include "wx/msw/setup.h" -#elif defined(__WXMAC__) -#include "wx/mac/setup.h" -#elif defined(__WXQT__) -#include "wx/qt/setup.h" -#elif defined(__WXMOTIF__) -#include "wx/motif/setup.h" -#elif defined(__WXPM__) -#include "wx/os2/setup.h" -#elif defined(__WXSTUBS__) -#include "wx/stubs/setup.h" -#elif defined(__WXGTK__) -#include "wx/gtk/setup.h" -#endif - -#endif - /* _WX_SETUP_H_BASE_ */ diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 091a17db79..ef1ab55469 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -42,69 +42,84 @@ class WXDLLEXPORT wxSizerItem: public wxObject { DECLARE_CLASS(wxSizerItem); public: - // spacer - wxSizerItem( int width, int height, int option, int flag, int border, wxObject* userData); + // spacer + wxSizerItem( int width, int height, int option, int flag, int border, wxObject* userData); - // window - wxSizerItem( wxWindow *window, int option, int flag, int border, wxObject* userData ); + // window + wxSizerItem( wxWindow *window, int option, int flag, int border, wxObject* userData ); - // subsizer - wxSizerItem( wxSizer *sizer, int option, int flag, int border, wxObject* userData ); + // subsizer + wxSizerItem( wxSizer *sizer, int option, int flag, int border, wxObject* userData ); - ~wxSizerItem(); + ~wxSizerItem(); - virtual wxSize GetSize(); - virtual wxSize CalcMin(); - virtual void SetDimension( wxPoint pos, wxSize size ); + virtual wxSize GetSize(); + virtual wxSize CalcMin(); + virtual void SetDimension( wxPoint pos, wxSize size ); + + wxSize GetMinSize() + { return m_minSize; } - void SetRatio( int width, int height ) - // if either of dimensions is zero, ratio is assumed to be 1 - // to avoid "divide by zero" errors - { m_ratio = (width && height) ? ((float) width / (float) height) : 1; } - void SetRatio( wxSize size ) - { m_ratio = (size.x && size.y) ? ((float) size.x / (float) size.y) : 1; } - void SetRatio( float ratio ) { m_ratio = ratio; } - float GetRatio() const { return m_ratio; } + void SetRatio( int width, int height ) + // if either of dimensions is zero, ratio is assumed to be 1 + // to avoid "divide by zero" errors + { m_ratio = (width && height) ? ((float) width / (float) height) : 1; } + void SetRatio( wxSize size ) + { m_ratio = (size.x && size.y) ? ((float) size.x / (float) size.y) : 1; } + void SetRatio( float ratio ) + { m_ratio = ratio; } + float GetRatio() const + { return m_ratio; } - bool IsWindow(); - bool IsSizer(); - bool IsSpacer(); + bool IsWindow(); + bool IsSizer(); + bool IsSpacer(); - void SetInitSize( int x, int y ) - { m_minSize.x = x; m_minSize.y = y; } - void SetOption( int option ) - { m_option = option; } - void SetFlag( int flag ) - { m_flag = flag; } - void SetBorder( int border ) - { m_border = border; } + void SetInitSize( int x, int y ) + { m_minSize.x = x; m_minSize.y = y; } + void SetOption( int option ) + { m_option = option; } + void SetFlag( int flag ) + { m_flag = flag; } + void SetBorder( int border ) + { m_border = border; } - wxWindow *GetWindow() const - { return m_window; } - wxSizer *GetSizer() const - { return m_sizer; } - int GetOption() const - { return m_option; } - int GetFlag() const - { return m_flag; } - int GetBorder() const - { return m_border; } - wxObject* GetUserData() - { return m_userData; } + wxWindow *GetWindow() const + { return m_window; } + void SetWindow( wxWindow *window ) + { m_window = window; } + wxSizer *GetSizer() const + { return m_sizer; } + void SetSizer( wxSizer *sizer ) + { m_sizer = sizer; } + int GetOption() const + { return m_option; } + int GetFlag() const + { return m_flag; } + int GetBorder() const + { return m_border; } + wxObject* GetUserData() + { return m_userData; } + wxPoint GetPosition() + { return m_pos; } protected: - wxWindow *m_window; - wxSizer *m_sizer; - wxSize m_size; - wxSize m_minSize; - int m_option; - int m_border; - int m_flag; - // als: aspect ratio can always be calculated from m_size, - // but this would cause precision loss when the window - // is shrinked. it is safer to preserve initial value. - float m_ratio; - wxObject *m_userData; + wxWindow *m_window; + wxSizer *m_sizer; + wxSize m_size; + wxPoint m_pos; + wxSize m_minSize; + int m_option; + int m_border; + int m_flag; + + // als: aspect ratio can always be calculated from m_size, + // but this would cause precision loss when the window + // is shrinked. it is safer to preserve initial value. + float m_ratio; + + // user data for shadow objects + wxObject *m_userData; }; //--------------------------------------------------------------------------- @@ -113,53 +128,150 @@ protected: class WXDLLEXPORT wxSizer: public wxObject { - DECLARE_CLASS(wxSizer); public: - wxSizer(); - ~wxSizer(); + wxSizer(); + ~wxSizer(); - virtual void Add( wxWindow *window, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Add( wxSizer *sizer, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Add( int width, int height, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + /* These should be called Append() really. */ + virtual void Add( wxWindow *window, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Add( wxSizer *sizer, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Add( int width, int height, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Insert( int before, wxWindow *window, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Insert( int before, wxSizer *sizer, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Insert( int before, int width, int height, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Insert( int before, wxWindow *window, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Insert( int before, wxSizer *sizer, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Insert( int before, int width, int height, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Prepend( wxWindow *window, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Prepend( wxSizer *sizer, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual void Prepend( int width, int height, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Prepend( wxWindow *window, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Prepend( wxSizer *sizer, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual void Prepend( int width, int height, int option = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); - virtual bool Remove( wxWindow *window ); - virtual bool Remove( wxSizer *sizer ); - virtual bool Remove( int pos ); + virtual bool Remove( wxWindow *window ); + virtual bool Remove( wxSizer *sizer ); + virtual bool Remove( int pos ); - void SetDimension( int x, int y, int width, int height ); + void SetMinSize( int width, int height ) + { DoSetMinSize( width, height ); } + void SetMinSize( wxSize size ) + { DoSetMinSize( size.x, size.y ); } + + /* Searches recursively */ + bool SetItemMinSize( wxWindow *window, int width, int height ) + { return DoSetItemMinSize( window, width, height ); } + bool SetItemMinSize( wxWindow *window, wxSize size ) + { return DoSetItemMinSize( window, size.x, size.y ); } + + /* Searches recursively */ + bool SetItemMinSize( wxSizer *sizer, int width, int height ) + { return DoSetItemMinSize( sizer, width, height ); } + bool SetItemMinSize( wxSizer *sizer, wxSize size ) + { return DoSetItemMinSize( sizer, size.x, size.y ); } + + bool SetItemMinSize( int pos, int width, int height ) + { return DoSetItemMinSize( pos, width, height ); } + bool SetItemMinSize( int pos, wxSize size ) + { return DoSetItemMinSize( pos, size.x, size.y ); } + + wxSize GetSize() + { return m_size; } + wxPoint GetPosition() + { return m_position; } + + /* Calculate the minimal size or return m_minSize if bigger. */ + wxSize GetMinSize(); - wxSize GetSize() - { return m_size; } - wxPoint GetPosition() - { return m_position; } - wxSize GetMinSize() - { return CalcMin(); } + virtual void RecalcSizes() = 0; + virtual wxSize CalcMin() = 0; - virtual void RecalcSizes() = 0; - virtual wxSize CalcMin() = 0; + virtual void Layout(); - virtual void Layout(); + void Fit( wxWindow *window ); + void SetSizeHints( wxWindow *window ); - void Fit( wxWindow *window ); - void SetSizeHints( wxWindow *window ); + wxList& GetChildren() + { return m_children; } - wxList& GetChildren() - { return m_children; } + void SetDimension( int x, int y, int width, int height ); protected: - wxSize m_size; - wxPoint m_position; - wxList m_children; + wxSize m_size; + wxSize m_minSize; + wxPoint m_position; + wxList m_children; - wxSize GetMinWindowSize( wxWindow *window ); + wxSize GetMinWindowSize( wxWindow *window ); + + virtual void DoSetMinSize( int width, int height ); + virtual bool DoSetItemMinSize( wxWindow *window, int width, int height ); + virtual bool DoSetItemMinSize( wxSizer *sizer, int width, int height ); + virtual bool DoSetItemMinSize( int pos, int width, int height ); + +private: + DECLARE_CLASS(wxSizer); +}; + +//--------------------------------------------------------------------------- +// wxGridSizer +//--------------------------------------------------------------------------- + +class WXDLLEXPORT wxGridSizer: public wxSizer +{ +public: + wxGridSizer( int rows, int cols, int vgap, int hgap ); + wxGridSizer( int cols, int vgap = 0, int hgap = 0 ); + + void RecalcSizes(); + wxSize CalcMin(); + + void SetCols( int cols ) { m_cols = cols; } + void SetRows( int rows ) { m_rows = rows; } + void SetVGap( int gap ) { m_vgap = gap; } + void SetHGap( int gap ) { m_hgap = gap; } + int GetCols() { return m_cols; } + int GetRows() { return m_rows; } + int GetVGap() { return m_vgap; } + int GetHGap() { return m_hgap; } + +protected: + int m_rows; + int m_cols; + int m_vgap; + int m_hgap; + + void SetItemBounds( wxSizerItem *item, int x, int y, int w, int h ); + +private: + DECLARE_CLASS(wxGridSizer); +}; + +//--------------------------------------------------------------------------- +// wxFlexGridSizer +//--------------------------------------------------------------------------- + +class WXDLLEXPORT wxFlexGridSizer: public wxGridSizer +{ +public: + wxFlexGridSizer( int rows, int cols, int vgap, int hgap ); + wxFlexGridSizer( int cols, int vgap = 0, int hgap = 0 ); + ~wxFlexGridSizer(); + + void RecalcSizes(); + wxSize CalcMin(); + + void AddGrowableRow( size_t idx ); + void RemoveGrowableRow( size_t idx ); + void AddGrowableCol( size_t idx ); + void RemoveGrowableCol( size_t idx ); + +protected: + int *m_rowHeights; + int *m_colWidths; + wxArrayInt m_growableRows; + wxArrayInt m_growableCols; + + void CreateArrays(); + +private: + DECLARE_CLASS(wxFlexGridSizer); }; //--------------------------------------------------------------------------- @@ -168,15 +280,14 @@ protected: class WXDLLEXPORT wxBoxSizer: public wxSizer { - DECLARE_CLASS(wxBoxSizer); public: - wxBoxSizer( int orient ); + wxBoxSizer( int orient ); - void RecalcSizes(); - wxSize CalcMin(); + void RecalcSizes(); + wxSize CalcMin(); - int GetOrientation() - { return m_orient; } + int GetOrientation() + { return m_orient; } protected: int m_orient; @@ -185,6 +296,9 @@ protected: int m_minHeight; int m_fixedWidth; int m_fixedHeight; + +private: + DECLARE_CLASS(wxBoxSizer); }; //--------------------------------------------------------------------------- @@ -193,18 +307,20 @@ protected: class WXDLLEXPORT wxStaticBoxSizer: public wxBoxSizer { - DECLARE_CLASS(wxStaticBoxSizer); public: - wxStaticBoxSizer( wxStaticBox *box, int orient ); + wxStaticBoxSizer( wxStaticBox *box, int orient ); - void RecalcSizes(); - wxSize CalcMin(); + void RecalcSizes(); + wxSize CalcMin(); - wxStaticBox *GetStaticBox() - { return m_staticBox; } + wxStaticBox *GetStaticBox() + { return m_staticBox; } protected: - wxStaticBox *m_staticBox; + wxStaticBox *m_staticBox; + +private: + DECLARE_CLASS(wxStaticBoxSizer); }; //--------------------------------------------------------------------------- @@ -215,18 +331,20 @@ protected: class WXDLLEXPORT wxNotebookSizer: public wxSizer { - DECLARE_CLASS(wxNotebookSizer); public: - wxNotebookSizer( wxNotebook *nb ); + wxNotebookSizer( wxNotebook *nb ); - void RecalcSizes(); - wxSize CalcMin(); + void RecalcSizes(); + wxSize CalcMin(); - wxNotebook *GetNotebook() - { return m_notebook; } + wxNotebook *GetNotebook() + { return m_notebook; } protected: - wxNotebook *m_notebook; + wxNotebook *m_notebook; + +private: + DECLARE_CLASS(wxNotebookSizer); }; #endif diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index 029c7cb621..510309de15 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -63,7 +63,7 @@ protected: // we can't just typedef wxStatusBar to be one of 95/Generic because we should // be able to forward declare it (done in several places) and because wxWin // RTTI wouldn't work then -class wxStatusBar : public wxStatusBarReal +class WXDLLEXPORT wxStatusBar : public wxStatusBarReal { public: wxStatusBar() { } diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 628d87fd3d..fc07f2f616 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -23,123 +23,431 @@ #include +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +#define wxSTC_INVALID_POSITION -1 +#define wxSTC_START 2000 +#define wxSTC_OPTIONAL_START 3000 +#define wxSTC_LEXER_START 4000 +#define wxSTC_CMD_REDO 2011 +#define wxSTC_CMD_SELECTALL 2013 +#define wxSTC_WS_INVISIBLE 0 +#define wxSTC_WS_VISIBLEALWAYS 1 +#define wxSTC_WS_VISIBLEAFTERINDENT 2 +#define wxSTC_EOL_CRLF 0 +#define wxSTC_EOL_CR 1 +#define wxSTC_EOL_LF 2 + +// The SC_CP_UTF8 value can be used to enter Unicode mode. +// This is the same value as CP_UTF8 in Windows +#define wxSTC_CP_UTF8 65001 +#define wxSTC_MARKER_MAX 31 +#define wxSTC_MARK_CIRCLE 0 +#define wxSTC_MARK_ROUNDRECT 1 +#define wxSTC_MARK_ARROW 2 +#define wxSTC_MARK_SMALLRECT 3 +#define wxSTC_MARK_SHORTARROW 4 +#define wxSTC_MARK_EMPTY 5 +#define wxSTC_MARK_ARROWDOWN 6 +#define wxSTC_MARK_MINUS 7 +#define wxSTC_MARK_PLUS 8 +#define wxSTC_MARKNUM_FOLDER 30 +#define wxSTC_MARKNUM_FOLDEROPEN 31 +#define wxSTC_MARGIN_SYMBOL 0 +#define wxSTC_MARGIN_NUMBER 1 +#define wxSTC_STYLE_DEFAULT 32 +#define wxSTC_STYLE_LINENUMBER 33 +#define wxSTC_STYLE_BRACELIGHT 34 +#define wxSTC_STYLE_BRACEBAD 35 +#define wxSTC_STYLE_CONTROLCHAR 36 +#define wxSTC_STYLE_INDENTGUIDE 37 +#define wxSTC_STYLE_MAX 127 + +// Character set identifiers are used in StyleSetCharacterSet. +// The values are the same as the Windows *_CHARSET values. +#define wxSTC_CHARSET_ANSI 0 +#define wxSTC_CHARSET_DEFAULT 1 +#define wxSTC_CHARSET_BALTIC 186 +#define wxSTC_CHARSET_CHINESEBIG5 136 +#define wxSTC_CHARSET_EASTEUROPE 238 +#define wxSTC_CHARSET_GB2312 134 +#define wxSTC_CHARSET_GREEK 161 +#define wxSTC_CHARSET_HANGUL 129 +#define wxSTC_CHARSET_MAC 77 +#define wxSTC_CHARSET_OEM 255 +#define wxSTC_CHARSET_RUSSIAN 204 +#define wxSTC_CHARSET_SHIFTJIS 128 +#define wxSTC_CHARSET_SYMBOL 2 +#define wxSTC_CHARSET_TURKISH 162 +#define wxSTC_CHARSET_JOHAB 130 +#define wxSTC_CHARSET_HEBREW 177 +#define wxSTC_CHARSET_ARABIC 178 +#define wxSTC_CHARSET_VIETNAMESE 163 +#define wxSTC_CHARSET_THAI 222 +#define wxSTC_INDIC_MAX 7 +#define wxSTC_INDIC_PLAIN 0 +#define wxSTC_INDIC_SQUIGGLE 1 +#define wxSTC_INDIC_TT 2 +#define wxSTC_INDIC_DIAGONAL 3 +#define wxSTC_INDIC_STRIKE 4 +#define wxSTC_INDIC0_MASK 32 +#define wxSTC_INDIC1_MASK 64 +#define wxSTC_INDIC2_MASK 128 +#define wxSTC_INDICS_MASK 32 | 64 | 128 + +// PrintColourMode - use same colours as screen. +#define wxSTC_PRINT_NORMAL 0 + +// PrintColourMode - invert the light value of each style for printing. +#define wxSTC_PRINT_INVERTLIGHT 1 + +// PrintColourMode - force black text on white background for printing. +#define wxSTC_PRINT_BLACKONWHITE 2 +#define wxSTC_FIND_DOWN 1 +#define wxSTC_FIND_WHOLEWORD 2 +#define wxSTC_FIND_MATCHCASE 4 +#define wxSTC_FIND_WORDSTART 0x00100000 + +// SCFIND_REGEXP is not yet implemented. +#define wxSTC_FIND_REGEXP 0x00200000 +#define wxSTC_CMD_UNDO 2176 +#define wxSTC_CMD_CUT 2177 +#define wxSTC_CMD_COPY 2178 +#define wxSTC_CMD_PASTE 2179 +#define wxSTC_FOLDLEVELBASE 0x400 +#define wxSTC_FOLDLEVELWHITEFLAG 0x1000 +#define wxSTC_FOLDLEVELHEADERFLAG 0x2000 +#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF +#define wxSTC_CMD_LINEDOWN 2300 +#define wxSTC_CMD_LINEDOWNEXTEND 2301 +#define wxSTC_CMD_LINEUP 2302 +#define wxSTC_CMD_LINEUPEXTEND 2303 +#define wxSTC_CMD_CHARLEFT 2304 +#define wxSTC_CMD_CHARLEFTEXTEND 2305 +#define wxSTC_CMD_CHARRIGHT 2306 +#define wxSTC_CMD_CHARRIGHTEXTEND 2307 +#define wxSTC_CMD_WORDLEFT 2308 +#define wxSTC_CMD_WORDLEFTEXTEND 2309 +#define wxSTC_CMD_WORDRIGHT 2310 +#define wxSTC_CMD_WORDRIGHTEXTEND 2311 +#define wxSTC_CMD_HOME 2312 +#define wxSTC_CMD_HOMEEXTEND 2313 +#define wxSTC_CMD_LINEEND 2314 +#define wxSTC_CMD_LINEENDEXTEND 2315 +#define wxSTC_CMD_DOCUMENTSTART 2316 +#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317 +#define wxSTC_CMD_DOCUMENTEND 2318 +#define wxSTC_CMD_DOCUMENTENDEXTEND 2319 +#define wxSTC_CMD_PAGEUP 2320 +#define wxSTC_CMD_PAGEUPEXTEND 2321 +#define wxSTC_CMD_PAGEDOWN 2322 +#define wxSTC_CMD_PAGEDOWNEXTEND 2323 +#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324 +#define wxSTC_CMD_CANCEL 2325 +#define wxSTC_CMD_DELETEBACK 2326 +#define wxSTC_CMD_TAB 2327 +#define wxSTC_CMD_BACKTAB 2328 +#define wxSTC_CMD_NEWLINE 2329 +#define wxSTC_CMD_FORMFEED 2330 +#define wxSTC_CMD_VCHOME 2331 +#define wxSTC_CMD_VCHOMEEXTEND 2332 +#define wxSTC_CMD_ZOOMIN 2333 +#define wxSTC_CMD_ZOOMOUT 2334 +#define wxSTC_CMD_DELWORDLEFT 2335 +#define wxSTC_CMD_DELWORDRIGHT 2336 +#define wxSTC_CMD_LINECUT 2337 +#define wxSTC_CMD_LINEDELETE 2338 +#define wxSTC_CMD_LINETRANSPOSE 2339 +#define wxSTC_CMD_LOWERCASE 2340 +#define wxSTC_CMD_UPPERCASE 2341 +#define wxSTC_CMD_LINESCROLLDOWN 2342 +#define wxSTC_CMD_LINESCROLLUP 2343 +#define wxSTC_EDGE_NONE 0 +#define wxSTC_EDGE_LINE 1 +#define wxSTC_EDGE_BACKGROUND 2 + +// Show caret within N lines of edge when it's scrolled to view +#define wxSTC_CARET_SLOP 0x01 + +// Center caret on screen when it's scrolled to view +#define wxSTC_CARET_CENTER 0x02 + +// OR this with CARET_CENTER to reposition even when visible, or +// OR this with CARET_SLOP to reposition whenever outside slop border +#define wxSTC_CARET_STRICT 0x04 + +// Notifications +// Type of modification and the action which caused the modification +// These are defined as a bit mask to make it easy to specify which notifications are wanted. +// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +#define wxSTC_MOD_INSERTTEXT 0x1 +#define wxSTC_MOD_DELETETEXT 0x2 +#define wxSTC_MOD_CHANGESTYLE 0x4 +#define wxSTC_MOD_CHANGEFOLD 0x8 +#define wxSTC_PERFORMED_USER 0x10 +#define wxSTC_PERFORMED_UNDO 0x20 +#define wxSTC_PERFORMED_REDO 0x40 +#define wxSTC_LASTSTEPINUNDOREDO 0x100 +#define wxSTC_MOD_CHANGEMARKER 0x200 +#define wxSTC_MOD_BEFOREINSERT 0x400 +#define wxSTC_MOD_BEFOREDELETE 0x800 +#define wxSTC_MODEVENTMASKALL 0xF77 + +// Symbolic key codes and modifier flags +// ASCII and other printable characters below 256 +// Extended keys above 300 +#define wxSTC_KEY_DOWN 300 +#define wxSTC_KEY_UP 301 +#define wxSTC_KEY_LEFT 302 +#define wxSTC_KEY_RIGHT 303 +#define wxSTC_KEY_HOME 304 +#define wxSTC_KEY_END 305 +#define wxSTC_KEY_PRIOR 306 +#define wxSTC_KEY_NEXT 307 +#define wxSTC_KEY_DELETE 308 +#define wxSTC_KEY_INSERT 309 +#define wxSTC_KEY_ESCAPE 7 +#define wxSTC_KEY_BACK 8 +#define wxSTC_KEY_TAB 9 +#define wxSTC_KEY_RETURN 13 +#define wxSTC_KEY_ADD 310 +#define wxSTC_KEY_SUBTRACT 311 +#define wxSTC_KEY_DIVIDE 312 +#define wxSTC_SCMOD_SHIFT 1 +#define wxSTC_SCMOD_CTRL 2 +#define wxSTC_SCMOD_ALT 4 + +// For SciLexer.h +#define wxSTC_LEX_CONTAINER 0 +#define wxSTC_LEX_NULL 1 +#define wxSTC_LEX_PYTHON 2 +#define wxSTC_LEX_CPP 3 +#define wxSTC_LEX_HTML 4 +#define wxSTC_LEX_XML 5 +#define wxSTC_LEX_PERL 6 +#define wxSTC_LEX_SQL 7 +#define wxSTC_LEX_VB 8 +#define wxSTC_LEX_PROPERTIES 9 +#define wxSTC_LEX_ERRORLIST 10 +#define wxSTC_LEX_MAKEFILE 11 +#define wxSTC_LEX_BATCH 12 +#define wxSTC_LEX_XCODE 13 +#define wxSTC_LEX_LATEX 14 +#define wxSTC_LEX_LUA 15 +#define wxSTC_LEX_DIFF 16 + +// Lexical states for SCLEX_PYTHON +#define wxSTC_P_DEFAULT 0 +#define wxSTC_P_COMMENTLINE 1 +#define wxSTC_P_NUMBER 2 +#define wxSTC_P_STRING 3 +#define wxSTC_P_CHARACTER 4 +#define wxSTC_P_WORD 5 +#define wxSTC_P_TRIPLE 6 +#define wxSTC_P_TRIPLEDOUBLE 7 +#define wxSTC_P_CLASSNAME 8 +#define wxSTC_P_DEFNAME 9 +#define wxSTC_P_OPERATOR 10 +#define wxSTC_P_IDENTIFIER 11 +#define wxSTC_P_COMMENTBLOCK 12 +#define wxSTC_P_STRINGEOL 13 + +// Lexical states for SCLEX_CPP, SCLEX_VB +#define wxSTC_C_DEFAULT 0 +#define wxSTC_C_COMMENT 1 +#define wxSTC_C_COMMENTLINE 2 +#define wxSTC_C_COMMENTDOC 3 +#define wxSTC_C_NUMBER 4 +#define wxSTC_C_WORD 5 +#define wxSTC_C_STRING 6 +#define wxSTC_C_CHARACTER 7 +#define wxSTC_C_UUID 8 +#define wxSTC_C_PREPROCESSOR 9 +#define wxSTC_C_OPERATOR 10 +#define wxSTC_C_IDENTIFIER 11 +#define wxSTC_C_STRINGEOL 12 +#define wxSTC_C_VERBATIM 13 + +// Lexical states for SCLEX_HTML, SCLEX_XML +#define wxSTC_H_DEFAULT 0 +#define wxSTC_H_TAG 1 +#define wxSTC_H_TAGUNKNOWN 2 +#define wxSTC_H_ATTRIBUTE 3 +#define wxSTC_H_ATTRIBUTEUNKNOWN 4 +#define wxSTC_H_NUMBER 5 +#define wxSTC_H_DOUBLESTRING 6 +#define wxSTC_H_SINGLESTRING 7 +#define wxSTC_H_OTHER 8 +#define wxSTC_H_COMMENT 9 +#define wxSTC_H_ENTITY 10 + +// XML and ASP +#define wxSTC_H_TAGEND 11 +#define wxSTC_H_XMLSTART 12 +#define wxSTC_H_XMLEND 13 +#define wxSTC_H_SCRIPT 14 +#define wxSTC_H_ASP 15 +#define wxSTC_H_ASPAT 16 +#define wxSTC_H_CDATA 17 +#define wxSTC_H_QUESTION 18 + +// More HTML +#define wxSTC_H_VALUE 19 + +// Embedded Javascript +#define wxSTC_HJ_START 40 +#define wxSTC_HJ_DEFAULT 41 +#define wxSTC_HJ_COMMENT 42 +#define wxSTC_HJ_COMMENTLINE 43 +#define wxSTC_HJ_COMMENTDOC 44 +#define wxSTC_HJ_NUMBER 45 +#define wxSTC_HJ_WORD 46 +#define wxSTC_HJ_KEYWORD 47 +#define wxSTC_HJ_DOUBLESTRING 48 +#define wxSTC_HJ_SINGLESTRING 49 +#define wxSTC_HJ_SYMBOLS 50 +#define wxSTC_HJ_STRINGEOL 51 + +// ASP Javascript +#define wxSTC_HJA_START 55 +#define wxSTC_HJA_DEFAULT 56 +#define wxSTC_HJA_COMMENT 57 +#define wxSTC_HJA_COMMENTLINE 58 +#define wxSTC_HJA_COMMENTDOC 59 +#define wxSTC_HJA_NUMBER 60 +#define wxSTC_HJA_WORD 61 +#define wxSTC_HJA_KEYWORD 62 +#define wxSTC_HJA_DOUBLESTRING 63 +#define wxSTC_HJA_SINGLESTRING 64 +#define wxSTC_HJA_SYMBOLS 65 +#define wxSTC_HJA_STRINGEOL 66 + +// Embedded VBScript +#define wxSTC_HB_START 70 +#define wxSTC_HB_DEFAULT 71 +#define wxSTC_HB_COMMENTLINE 72 +#define wxSTC_HB_NUMBER 73 +#define wxSTC_HB_WORD 74 +#define wxSTC_HB_STRING 75 +#define wxSTC_HB_IDENTIFIER 76 +#define wxSTC_HB_STRINGEOL 77 + +// ASP VBScript +#define wxSTC_HBA_START 80 +#define wxSTC_HBA_DEFAULT 81 +#define wxSTC_HBA_COMMENTLINE 82 +#define wxSTC_HBA_NUMBER 83 +#define wxSTC_HBA_WORD 84 +#define wxSTC_HBA_STRING 85 +#define wxSTC_HBA_IDENTIFIER 86 +#define wxSTC_HBA_STRINGEOL 87 + +// Embedded Python +#define wxSTC_HP_START 90 +#define wxSTC_HP_DEFAULT 91 +#define wxSTC_HP_COMMENTLINE 92 +#define wxSTC_HP_NUMBER 93 +#define wxSTC_HP_STRING 94 +#define wxSTC_HP_CHARACTER 95 +#define wxSTC_HP_WORD 96 +#define wxSTC_HP_TRIPLE 97 +#define wxSTC_HP_TRIPLEDOUBLE 98 +#define wxSTC_HP_CLASSNAME 99 +#define wxSTC_HP_DEFNAME 100 +#define wxSTC_HP_OPERATOR 101 +#define wxSTC_HP_IDENTIFIER 102 + +// ASP Python +#define wxSTC_HPA_START 105 +#define wxSTC_HPA_DEFAULT 106 +#define wxSTC_HPA_COMMENTLINE 107 +#define wxSTC_HPA_NUMBER 108 +#define wxSTC_HPA_STRING 109 +#define wxSTC_HPA_CHARACTER 110 +#define wxSTC_HPA_WORD 111 +#define wxSTC_HPA_TRIPLE 112 +#define wxSTC_HPA_TRIPLEDOUBLE 113 +#define wxSTC_HPA_CLASSNAME 114 +#define wxSTC_HPA_DEFNAME 115 +#define wxSTC_HPA_OPERATOR 116 +#define wxSTC_HPA_IDENTIFIER 117 + +// PHP +#define wxSTC_HPHP_DEFAULT 118 +#define wxSTC_HPHP_HSTRING 119 +#define wxSTC_HPHP_SIMPLESTRING 120 +#define wxSTC_HPHP_WORD 121 +#define wxSTC_HPHP_NUMBER 122 +#define wxSTC_HPHP_VARIABLE 123 +#define wxSTC_HPHP_COMMENT 124 +#define wxSTC_HPHP_COMMENTLINE 125 +#define wxSTC_HPHP_STRINGEOL 126 + +// Lexical states for SCLEX_PERL +#define wxSTC_PL_DEFAULT 0 +#define wxSTC_PL_HERE 1 +#define wxSTC_PL_COMMENTLINE 2 +#define wxSTC_PL_POD 3 +#define wxSTC_PL_NUMBER 4 +#define wxSTC_PL_WORD 5 +#define wxSTC_PL_STRING 6 +#define wxSTC_PL_CHARACTER 7 +#define wxSTC_PL_PUNCTUATION 8 +#define wxSTC_PL_PREPROCESSOR 9 +#define wxSTC_PL_OPERATOR 10 +#define wxSTC_PL_IDENTIFIER 11 +#define wxSTC_PL_SCALAR 12 +#define wxSTC_PL_ARRAY 13 +#define wxSTC_PL_HASH 14 +#define wxSTC_PL_SYMBOLTABLE 15 +#define wxSTC_PL_REF 16 +#define wxSTC_PL_REGEX 17 +#define wxSTC_PL_REGSUBST 18 +#define wxSTC_PL_LONGQUOTE 19 +#define wxSTC_PL_BACKTICKS 20 +#define wxSTC_PL_DATASECTION 21 + +// Lexical states for SCLEX_LATEX +#define wxSTC_L_DEFAULT 0 +#define wxSTC_L_COMMAND 1 +#define wxSTC_L_TAG 2 +#define wxSTC_L_MATH 3 +#define wxSTC_L_COMMENT 4 + +// Lexical states for SCLEX_LUA +#define wxSTC_LUA_DEFAULT 0 +#define wxSTC_LUA_COMMENT 1 +#define wxSTC_LUA_COMMENTLINE 2 +#define wxSTC_LUA_COMMENTDOC 3 +#define wxSTC_LUA_NUMBER 4 +#define wxSTC_LUA_WORD 5 +#define wxSTC_LUA_STRING 6 +#define wxSTC_LUA_CHARACTER 7 +#define wxSTC_LUA_LITERALSTRING 8 +#define wxSTC_LUA_PREPROCESSOR 9 +#define wxSTC_LUA_OPERATOR 10 +#define wxSTC_LUA_IDENTIFIER 11 +#define wxSTC_LUA_STRINGEOL 12 +#define wxSTC_ERR_DEFAULT 0 +#define wxSTC_ERR_PYTHON 1 +#define wxSTC_ERR_GCC 2 +#define wxSTC_ERR_MS 3 +#define wxSTC_ERR_CMD 4 +#define wxSTC_ERR_BORLAND 5 +#define wxSTC_ERR_PERL 6 + +// END of generated section +//---------------------------------------------------------------------- +// Others + +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)) + + //---------------------------------------------------------------------- -// constants and stuff - -enum wxSTC_UndoType { - wxSTC_UndoCollectNone, - wxSTC_UndoCollectAutoStart -}; - - -enum wxSTC_EOL { - wxSTC_EOL_CRLF, - wxSTC_EOL_CR, - wxSTC_EOL_LF -}; - -enum wxSTC_EDGE { - wxSTC_EDGE_NONE, - wxSTC_EDGE_LINE, - wxSTC_EDGE_BACKGROUND -}; - - - -const int wxSTC_LEX_STYLE_MAX = 31; -const int wxSTC_STYLE_DEFAULT = 32; -const int wxSTC_STYLE_LINENUMBER = 33; -const int wxSTC_STYLE_BRACELIGHT = 34; -const int wxSTC_STYLE_BRACEBAD = 35; -const int wxSTC_STYLE_CONTROLCHAR = 36; -const int wxSTC_STYLE_MAX = 63; -const int wxSTC_STYLE_MASK = 31; - -const int wxSTC_MARKER_MAX = 31; -const int wxSTC_MARK_CIRCLE = 0; -const int wxSTC_MARK_ROUNDRECT = 1; -const int wxSTC_MARK_ARROW = 2; -const int wxSTC_MARK_SMALLRECT = 3; -const int wxSTC_MARK_SHORTARROW = 4; -const int wxSTC_MARK_EMPTY = 5; - -const int wxSTC_INDIC_PLAIN = 0; -const int wxSTC_INDIC_SQUIGGLE = 1; -const int wxSTC_INDIC_TT = 2; -const int wxSTC_INDIC0_MASK = 32; -const int wxSTC_INDIC1_MASK = 64; -const int wxSTC_INDIC2_MASK = 128; -const int wxSTC_INDICS_MASK = (wxSTC_INDIC0_MASK | wxSTC_INDIC1_MASK | wxSTC_INDIC2_MASK); - - -// key commands -enum { - wxSTC_CMD_LINEDOWN = 2300, - wxSTC_CMD_LINEDOWNEXTEND, - wxSTC_CMD_LINEUP, - wxSTC_CMD_LINEUPEXTEND, - wxSTC_CMD_CHARLEFT, - wxSTC_CMD_CHARLEFTEXTEND, - wxSTC_CMD_CHARRIGHT, - wxSTC_CMD_CHARRIGHTEXTEND, - wxSTC_CMD_WORDLEFT, - wxSTC_CMD_WORDLEFTEXTEND, - wxSTC_CMD_WORDRIGHT, - wxSTC_CMD_WORDRIGHTEXTEND, - wxSTC_CMD_HOME, - wxSTC_CMD_HOMEEXTEND, - wxSTC_CMD_LINEEND, - wxSTC_CMD_LINEENDEXTEND, - wxSTC_CMD_DOCUMENTSTART, - wxSTC_CMD_DOCUMENTSTARTEXTEND, - wxSTC_CMD_DOCUMENTEND, - wxSTC_CMD_DOCUMENTENDEXTEND, - wxSTC_CMD_PAGEUP, - wxSTC_CMD_PAGEUPEXTEND, - wxSTC_CMD_PAGEDOWN, - wxSTC_CMD_PAGEDOWNEXTEND, - wxSTC_CMD_EDITTOGGLEOVERTYPE, - wxSTC_CMD_CANCEL, - wxSTC_CMD_DELETEBACK, - wxSTC_CMD_TAB, - wxSTC_CMD_BACKTAB, - wxSTC_CMD_NEWLINE, - wxSTC_CMD_FORMFEED, - wxSTC_CMD_VCHOME, - wxSTC_CMD_VCHOMEEXTEND, - wxSTC_CMD_ZOOMIN, - wxSTC_CMD_ZOOMOUT, - wxSTC_CMD_DELWORDLEFT, - wxSTC_CMD_DELWORDRIGHT -}; - - -enum wxSTC_LEX { - wxSTC_LEX_CONTAINER=0, - wxSTC_LEX_NULL, - wxSTC_LEX_PYTHON, - wxSTC_LEX_CPP, - wxSTC_LEX_HTML, - wxSTC_LEX_XML, - wxSTC_LEX_PERL, - wxSTC_LEX_SQL, - wxSTC_LEX_VB, - wxSTC_LEX_PROPERTIES, - wxSTC_LEX_ERRORLIST, - wxSTC_LEX_MAKEFILE, - wxSTC_LEX_BATCH, -}; - - - -const int wxSTC_CARET_SLOP = 0x01; -const int WXSTC_CARET_CENTER = 0x02; -const int wxSTC_CARET_STRICT = 0x04; - -const int wxSTC_MARGIN_SYMBOL = 0; -const int wxSTC_MARGIN_NUMBER = 1; - class ScintillaWX; // forward declare class WordList; @@ -153,273 +461,789 @@ extern const wxChar* wxSTCNameStr; class wxStyledTextCtrl : public wxControl { public: +#ifdef SWIG + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const char* name = "styledtext"); +#else wxStyledTextCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxSTCNameStr); +#endif + + +#ifndef SWIG ~wxStyledTextCtrl(); +#endif + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + // Add text to the document + void AddText(const wxString& text); - // Text retrieval and modification - wxString GetText(); - bool SetText(const wxString& text); - wxString GetLine(int line); - void ReplaceSelection(const wxString& text); - void SetReadOnly(bool readOnly); - bool GetReadOnly(); - wxString GetTextRange(int startPos, int endPos); - wxString GetStyledTextRange(int startPos, int endPos); - void GetTextRange(int startPos, int endPos, char* buff); - void GetStyledTextRange(int startPos, int endPos, char* buff); - void AddText(const wxString& text); - void AddStyledText(const wxString& text); - void InsertText(int pos, const wxString& text); - void ClearAll(); - char GetCharAt(int pos); - char GetStyleAt(int pos); - void SetStyleBits(int bits); - int GetStyleBits(); + // Add array of cells to document + void AddStyledText(const wxString& text); + // Insert string at a position + void InsertText(int pos, const wxString& text); - // Clipboard - void Cut(); - void Copy(); - void Paste(); - bool CanPaste(); - void ClearClipbrd(); // avoiding name conflict with virtual in wxWindow + // Delete all text in the document + void ClearAll(); + // Set all style bytes to 0, remove all folding information + void ClearDocumentStyle(); - // Undo and Redo - void Undo(); - bool CanUndo(); - void EmptyUndoBuffer(); - void Redo(); - bool CanRedo(); - void SetUndoCollection(wxSTC_UndoType type); - wxSTC_UndoType GetUndoCollection(); - void BeginUndoAction(); - void EndUndoAction(); + // The number of characters in the document + int GetLength(); + // Returns the character byte at the position + int GetCharAt(int pos); - // Selection and information - void GetSelection(int* startPos, int* endPos); - void SetSelection(int startPos, int endPos); - wxString GetSelectedText(); - void HideSelection(bool hide); - bool GetHideSelection(); + // Returns the position of the caret + int GetCurrentPos(); - int GetTextLength(); - int GetFirstVisibleLine(); - bool GetModified(); - int GetLineCount(); - wxRect GetRect(); - int GetLineFromPos(int pos); - int GetLineStartPos(int line); - int GetLineLengthAtPos(int pos); - int GetLineLength(int line); - wxString GetCurrentLineText(int* linePos=NULL); - int GetCurrentLine(); - int PositionFromPoint(wxPoint pt); - int LineFromPoint(wxPoint pt); - wxPoint PointFromPosition(int pos); - int GetCurrentPos(); - int GetAnchor(); - void SelectAll(); - void SetCurrentPosition(int pos); - void SetAnchor(int pos); - void GotoPos(int pos); - void GotoLine(int line); - void ChangePosition(int delta, bool extendSelection); - void PageMove(int cmdKey, bool extendSelection); + // Returns the position of the opposite end of the selection to the caret + int GetAnchor(); - void ScrollBy(int columnDelta, int lineDelta); - void ScrollToLine(int line); - void ScrollToColumn(int column); - void EnsureCaretVisible(); - void SetCaretPolicy(int policy, int slop=0); - int GetSelectionType(); + // Returns the style byte at the position + int GetStyleAt(int pos); + // Redoes the next action on the undo history + void Redo(); + // Choose between collecting actions into the undo + // history and discarding them. + void SetUndoCollection(bool collectUndo); - // Searching - int FindText(int minPos, int maxPos, const wxString& text, - bool caseSensitive, bool wholeWord); - void SearchAnchor(); - int SearchNext(const wxString& text, bool caseSensitive, bool wholeWord); - int SearchPrev(const wxString& text, bool caseSensitive, bool wholeWord); + // Select all the text in the document. + void SelectAll(); + // Remember the current position in the undo history as the position + // at which the document was saved. + void SetSavePoint(); - // Visible whitespace - bool GetViewWhitespace(); - void SetViewWhitespace(bool visible); + // Retrieve a buffer of cells. + wxString GetStyledText(int startPos, int endPos); + // Are there any redoable actions in the undo history. + bool CanRedo(); - // Line endings - wxSTC_EOL GetEOLMode(); - void SetEOLMode(wxSTC_EOL mode); - bool GetViewEOL(); - void SetViewEOL(bool visible); - void ConvertEOL(wxSTC_EOL mode); + // Retrieve the line number at which a particular marker is located + int MarkerLineFromHandle(int handle); + // Delete a marker. + void MarkerDeleteHandle(int handle); - // Styling - int GetEndStyled(); - void StartStyling(int pos, int mask); - void SetStyleFor(int length, int style); - void SetStyleBytes(int length, char* styleBytes); + // Is undo history being collected? + bool GetUndoCollection(); + // Are white space characters currently visible? + // Returns one of SCWS_* constants. + int GetViewWhiteSpace(); - // Style Definition - void StyleClearAll(); - void StyleResetDefault(); - void StyleSetSpec(int styleNum, const wxString& spec); - void StyleSetForeground(int styleNum, const wxColour& colour); - void StyleSetBackground(int styleNum, const wxColour& colour); - void StyleSetFont(int styleNum, wxFont& font); - void StyleSetFontAttr(int styleNum, int size, const wxString& faceName, bool bold, bool italic); - void StyleSetBold(int styleNum, bool bold); - void StyleSetItalic(int styleNum, bool italic); - void StyleSetFaceName(int styleNum, const wxString& faceName); - void StyleSetSize(int styleNum, int pointSize); - void StyleSetEOLFilled(int styleNum, bool fillEOL); + // Make white space characters invisible, always visible or visible outside indentation. + void SetViewWhiteSpace(int viewWS); + // Find the position from a point within the window. + int PositionFromPoint(wxPoint pt); - // Margins in the edit area - int GetLeftMargin(); - int GetRightMargin(); - void SetMargins(int left, int right); + // Set caret to start of a line and ensure it is visible. + void GotoLine(int line); + // Set caret to a position and ensure it is visible. + void GotoPos(int pos); - // Margins for selection, markers, etc. - void SetMarginType(int margin, int type); - int GetMarginType(int margin); + // Set the selection anchor to a position. The anchor is the opposite + // end of the selection from the caret. + void SetAnchor(int posAnchor); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. + wxString GetCurLine(int* OUTPUT=NULL); + + // Retrieve the position of the last correctly styled character. + int GetEndStyled(); + + // Convert all line endings in the document to use the current mode. + void ConvertEOLs(); + + // Retrieve the current end of line mode - one of CRLF, CR, or LF. + int GetEOLMode(); + + // Set the current end of line mode. + void SetEOLMode(int eolMode); + + // Set the current styling position to pos and the styling mask to mask. + // The styling mask can be used to protect some bits in each styling byte from + // modification. + void StartStyling(int pos, int mask); + + // Change style from current styling position for length characters to a style + // and move the current styling position to after this newly styled segment. + void SetStyling(int length, int style); + + // Is drawing done first into a buffer or direct to the screen. + bool GetBufferedDraw(); + + // If drawing is buffered then each line of text is drawn into a bitmap buffer + // before drawing it to the screen to avoid flicker. + void SetBufferedDraw(bool buffered); + + // Change the visible size of a tab to be a multiple of the width of a space + // character. + void SetTabWidth(int tabWidth); + + // Retrieve the visible size of a tab. + int GetTabWidth(); + + // Set the code page used to interpret the bytes of the document as characters. + // The SC_CP_UTF8 value can be used to enter Unicode mode. + void SetCodePage(int codePage); + + // Set the symbol used for a particular marker number, + // and optionally the for and background colours. + void MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour); + + // Set the foreground colour used for a particular marker number. + void MarkerSetForeground(int markerNumber, const wxColour& fore); + + // Set the background colour used for a particular marker number. + void MarkerSetBackground(int markerNumber, const wxColour& back); + + // Add a marker to a line. + void MarkerAdd(int line, int markerNumber); + + // Delete a marker from a line + void MarkerDelete(int line, int markerNumber); + + // Delete all markers with a particular number from all lines + void MarkerDeleteAll(int markerNumber); + + // Get a bit mask of all the markers set on a line. + int MarkerGet(int line); + + // Find the next line after lineStart that includes a marker in mask. + int MarkerNext(int lineStart, int markerMask); + + // Find the previous line before lineStart that includes a marker in mask. + int MarkerPrevious(int lineStart, int markerMask); + + // Set a margin to be either numeric or symbolic. + void SetMarginType(int margin, int marginType); + + // Retrieve the type of a margin. + int GetMarginType(int margin); + + // Set the width of a margin to a width expressed in pixels. void SetMarginWidth(int margin, int pixelWidth); - int GetMarginWidth(int margin); + + // Retrieve the width of a margin in pixels. + int GetMarginWidth(int margin); + + // Set a mask that determines which markers are displayed in a margin. void SetMarginMask(int margin, int mask); - int GetMarginMask(int margin); + + // Retrieve the marker mask of a margin. + int GetMarginMask(int margin); + + // Make a margin sensitive or insensitive to mouse clicks. void SetMarginSensitive(int margin, bool sensitive); + + // Retrieve the mouse click sensitivity of a margin. bool GetMarginSensitive(int margin); + // Clear all the styles and make equivalent to the global default style. + void StyleClearAll(); - // Selection and Caret styles - void SetSelectionForeground(const wxColour& colour); - void SetSelectionBackground(const wxColour& colour); - void SetCaretForeground(const wxColour& colour); - int GetCaretPeriod(); - void SetCaretPeriod(int milliseconds); + // Set the foreground colour of a style. + void StyleSetForeground(int style, const wxColour& fore); + // Set the background colour of a style. + void StyleSetBackground(int style, const wxColour& back); - // Other settings - void SetBufferedDraw(bool isBuffered); - void SetTabWidth(int numChars); - void SetWordChars(const wxString& wordChars); + // Set a style to be bold or not. + void StyleSetBold(int style, bool bold); + // Set a style to be italic or not. + void StyleSetItalic(int style, bool italic); - // Brace highlighting - void BraceHighlight(int pos1, int pos2); - void BraceBadlight(int pos); - int BraceMatch(int pos, int maxReStyle=0); + // Set the size of characters of a style. + void StyleSetSize(int style, int sizePoints); + // Set the font of a style. + void StyleSetFaceName(int style, const wxString& fontName); - // Markers - void MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground, - const wxColour& background); - void MarkerSetType(int markerNumber, int markerSymbol); - void MarkerSetForeground(int markerNumber, const wxColour& colour); - void MarkerSetBackground(int markerNumber, const wxColour& colour); - int MarkerAdd(int line, int markerNumber); - void MarkerDelete(int line, int markerNumber); - void MarkerDeleteAll(int markerNumber); - int MarkerGet(int line); - int MarkerGetNextLine(int lineStart, int markerMask); - int MarkerGetPrevLine(int lineStart, int markerMask); - int MarkerLineFromHandle(int handle); - void MarkerDeleteHandle(int handle); + // Set a style to have its end of line filled or not. + void StyleSetEOLFilled(int style, bool filled); + // Reset the default style to its state at startup + void StyleResetDefault(); - // Indicators - void IndicatorSetStyle(int indicNum, int indicStyle); - int IndicatorGetStyle(int indicNum); - void IndicatorSetColour(int indicNum, const wxColour& colour); + // Set a style to be underlined or not. + void StyleSetUnderline(int style, bool underline); + // Set the foreground colour of the selection and whether to use this setting. + void SetSelForeground(bool useSetting, const wxColour& fore); - // Auto completion - void AutoCompShow(const wxString& listOfWords); - void AutoCompCancel(); - bool AutoCompActive(); - int AutoCompPosAtStart(); - void AutoCompComplete(); - void AutoCompStopChars(const wxString& stopChars); + // Set the background colour of the selection and whether to use this setting. + void SetSelBackground(bool useSetting, const wxColour& back); + // Set the foreground colour of the caret. + void SetCaretForeground(const wxColour& fore); - // Call tips - void CallTipShow(int pos, const wxString& text); - void CallTipCancel(); - bool CallTipActive(); - int CallTipPosAtStart(); - void CallTipSetHighlight(int start, int end); - void CallTipSetBackground(const wxColour& colour); + // When key+modifier combination km is pressed perform msg. + void CmdKeyAssign(int key, int modifiers, int cmd); + // When key+modifier combination km do nothing. + void CmdKeyClear(int key, int modifiers); - // Key bindings - void CmdKeyAssign(int key, int modifiers, int cmd); - void CmdKeyClear(int key, int modifiers); - void CmdKeyClearAll(); - void CmdKeyExecute(int cmd); + // Drop all key mappings. + void CmdKeyClearAll(); + // Set the styles for a segment of the document. + void SetStyleBytes(int length, char* styleBytes); - // Print formatting - int FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect); + // Set a style to be visible or not. + void StyleSetVisible(int style, bool visible); + // Get the time in milliseconds that the caret is on and off. + int GetCaretPeriod(); - // Document Sharing (multiple views) - void* GetDocument(); - void SetDocument(void* document); - // TODO: create a wx wrapper for Scintilla's document class + // Get the time in milliseconds that the caret is on and off. 0 = steady on. + void SetCaretPeriod(int periodMilliseconds); + // Set the set of characters making up words for when moving or selecting + // by word. + void SetWordChars(const wxString& characters); - // Folding - int VisibleFromDocLine(int docLine); - int DocLineFromVisible(int displayLine); - int SetFoldLevel(int line, int level); - int GetFoldLevel(int line); - int GetLastChild(int line); - int GetFoldParent(int line); - void ShowLines(int lineStart, int lineEnd); - void HideLines(int lineStart, int lineEnd); - bool GetLineVisible(int line); - void SetFoldExpanded(int line); - bool GetFoldExpanded(int line); - void ToggleFold(int line); - void EnsureVisible(int line); + // Start a sequence of actions that is undone and redone as a unit. + // May be nested. + void BeginUndoAction(); + // End a sequence of actions that is undone and redone as a unit. + void EndUndoAction(); - // Long Lines - int GetEdgeColumn(); - void SetEdgeColumn(int column); - wxSTC_EDGE GetEdgeMode(); - void SetEdgeMode(wxSTC_EDGE mode); + // Set an indicator to plain, squiggle or TT. + void IndicatorSetStyle(int indic, int style); + + // Retrieve the style of an indicator. + int IndicatorGetStyle(int indic); + + // Set the foreground colour of an indicator. + void IndicatorSetForeground(int indic, const wxColour& fore); + + // Retrieve the foreground colour of an indicator. + wxColour IndicatorGetForeground(int indic); + + // Divide each styling byte into lexical class bits (default:5) and indicator + // bits (default:3). If a lexer requires more than 32 lexical states, then this + // is used to expand the possible states. + void SetStyleBits(int bits); + + // Retrieve number of bits in style bytes used to hold the lexical state. + int GetStyleBits(); + + // Used to hold extra styling information for each line. + void SetLineState(int line, int state); + + // Retrieve the extra styling information for a line. + int GetLineState(int line); + + // Retrieve the last line number that has line state. + int GetMaxLineState(); + + // Display a auto-completion list. + // The lenEntered parameter indicates how many characters before + // the caret should be used to provide context. + void AutoCompShow(int lenEntered, const wxString& itemList); + + // Remove the auto-completion list from the screen. + void AutoCompCancel(); + + // Is there an auto-completion list visible? + bool AutoCompActive(); + + // Retrieve the position of the caret when the auto-completion list was + // displayed. + int AutoCompPosStart(); + + // User has selected an item so remove the list and insert the selection. + void AutoCompComplete(); + + // Define a set of character that when typed cancel the auto-completion list. + void AutoCompStops(const wxString& characterSet); + + // Change the separator character in the string setting up an auto-completion + // list. Default is space but can be changed if items contain space. + void AutoCompSetSeparator(int separatorCharacter); + + // Retrieve the auto-completion list separator character. + int AutoCompGetSeparator(); + + // Select the item in the auto-completion list that starts with a string. + void AutoCompSelect(const wxString& text); + + // Should the auto-completion list be cancelled if the user backspaces to a + // position before where the box was created. + void AutoCompSetCancelAtStart(bool cancel); + + // Retrieve whether auto-completion cancelled by backspacing before start. + bool AutoCompGetCancelAtStart(); + + // Define a set of character that when typed fills up the selected word. + void AutoCompSetFillUps(const wxString& characterSet); + + // Should a single item auto-completion list automatically choose the item. + void AutoCompSetChooseSingle(bool chooseSingle); + + // Retrieve whether a single item auto-completion list automatically choose the item. + bool AutoCompGetChooseSingle(); + + // Set whether case is significant when performing auto-completion searches. + void AutoCompSetIgnoreCase(bool ignoreCase); + + // Retrieve state of ignore case flag. + bool AutoCompGetIgnoreCase(); + + // Set the number of spaces used for one level of indentation. + void SetIndent(int indentSize); + + // Retrieve indentation size. + int GetIndent(); + + // Indentation will only use space characters if useTabs is false, otherwise + // it will use a combination of tabs and spaces. + void SetUseTabs(bool useTabs); + + // Retrieve whether tabs will be used in indentation. + bool GetUseTabs(); + + // Change the indentation of a line to a number of columns. + void SetLineIndentation(int line, int indentSize); + + // Retrieve the number of columns that a line is indented. + int GetLineIndentation(int line); + + // Retrieve the position before the first non indentation character on a line. + int GetLineIndentPosition(int line); + + // Retrieve the column number of a position, taking tab width into account. + int GetColumn(int pos); + + // Show or hide the horizontal scroll bar. + void SetUseHorizontalScrollBar(bool show); + + // Is the horizontal scroll bar visible? + bool GetUseHorizontalScrollBar(); + + // Show or hide indentation guides. + void SetIndentationGuides(bool show); + + // Are the indentation guides visible? + bool GetIndentationGuides(); + + // Set the highlighted indentation guide column. + // 0 = no highlighted guide. + void SetHighlightGuide(int column); + + // Get the highlighted indentation guide column. + int GetHighlightGuide(); + + // Get the position after the last visible characters on a line. + int GetLineEndPosition(int line); + + // Get the code page used to interpret the bytes of the document as characters. + int GetCodePage(); + + // Get the foreground colour of the caret. + wxColour GetCaretForeground(); + + // In read-only mode? + bool GetReadOnly(); + + // Sets the position of the caret. + void SetCurrentPos(int pos); + + // Sets the position that starts the selection - this becomes the anchor. + void SetSelectionStart(int pos); + + // Returns the position at the start of the selection. + int GetSelectionStart(); + + // Sets the position that ends the selection - this becomes the currentPosition. + void SetSelectionEnd(int pos); + + // Returns the position at the end of the selection. + int GetSelectionEnd(); + + // Sets the print magnification added to the point size of each style for printing. + void SetPrintMagnification(int magnification); + + // Returns the print magnification. + int GetPrintMagnification(); + + // Modify colours when printing for clearer printed text. + void SetPrintColourMode(int mode); + + // Returns the print colour mode. + int GetPrintColourMode(); + + // Find some text in the document. + int FindText(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord); + + // On Windows will draw the document into a display context such as a printer. + int FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect); + + // Retrieve the line at the top of the display. + int GetFirstVisibleLine(); + + // Retrieve the contents of a line. + wxString GetLine(int line); + + // Returns the number of lines in the document. There is always at least one. + int GetLineCount(); + + // Sets the size in pixels of the left margin. + void SetMarginLeft(int width); + + // Returns the size in pixels of the left margin. + int GetMarginLeft(); + + // Sets the size in pixels of the right margin. + void SetMarginRight(int width); + + // Returns the size in pixels of the right margin. + int GetMarginRight(); + + // Is the document different from when it was last saved? + bool GetModify(); + + // Select a range of text. + void SetSelection(int start, int end); + + // Retrieve the selected text. + wxString GetSelectedText(); + + // Retrieve a range of text. + wxString GetTextRange(int startPos, int endPos); + + // Draw the selection in normal style or with selection highlighted. + void HideSelection(bool normal); + + // Retrieve the line containing a position. + int LineFromPosition(int pos); + + // Retrieve the position at the start of a line. + int PositionFromLine(int line); + + // Scroll horizontally and vertically. + void LineScroll(int columns, int lines); + + // Ensure the caret is visible. + void EnsureCaretVisible(); + + // Replace the selected text with the argument text. + void ReplaceSelection(const wxString& text); + + // Set to read only or read write. + void SetReadOnly(bool readOnly); + + // Will a paste succeed? + bool CanPaste(); + + // Are there any undoable actions in the undo history. + bool CanUndo(); + + // Delete the undo history. + void EmptyUndoBuffer(); + + // Undo one action in the undo history. + void Undo(); + + // Cut the selection to the clipboard. + void Cut(); + + // Copy the selection to the clipboard. + void Copy(); + + // Paste the contents of the clipboard into the document replacing the selection. + void Paste(); + + // Clear the selection. + void Clear(); + + // Replace the contents of the document with the argument text. + void SetText(const wxString& text); + + // Retrieve all the text in the document. + wxString GetText(); + + // Retrieve the number of characters in the document. + int GetTextLength(); + + // Set to overtype (true) or insert mode + void SetOvertype(bool overtype); + + // Returns true if overtype mode is active otherwise false is returned. + bool GetOvertype(); + + // Show a call tip containing a definition near position pos. + void CallTipShow(int pos, const wxString& definition); + + // Remove the call tip from the screen. + void CallTipCancel(); + + // Is there an active call tip? + bool CallTipActive(); + + // Retrieve the position where the caret was before displaying the call tip. + int CallTipPosAtStart(); + + // Highlight a segment of the definition. + void CallTipSetHighlight(int start, int end); + + // Set the background colour for the call tip. + void CallTipSetBackground(const wxColour& back); + + // Find the display line of a document line taking hidden lines into account. + int VisibleFromDocLine(int line); + + // Find the document line of a display line taking hidden lines into account. + int DocLineFromVisible(int lineDisplay); + + // Set the fold level of a line. + // This encodes an integer level along with flags indicating whether the + // line is a header and whether it is effectively white space. + void SetFoldLevel(int line, int level); + + // Retrieve the fold level of a line. + int GetFoldLevel(int line); + + // Find the last child line of a header line. + int GetLastChild(int line, int level); + + // Find the parent line of a child line. + int GetFoldParent(int line); + + // Make a range of lines visible. + void ShowLines(int lineStart, int lineEnd); + + // Make a range of lines invisible. + void HideLines(int lineStart, int lineEnd); + + // Is a line visible? + bool GetLineVisible(int line); + + // Show the children of a header line. + void SetFoldExpanded(int line, bool expanded); + + // Is a header line expanded? + bool GetFoldExpanded(int line); + + // Switch a header line between expanded and contracted. + void ToggleFold(int line); + + // Ensure a particular line is visible by expanding any header line hiding it. + void EnsureVisible(int line); + + // Set some debugging options for folding + void SetFoldFlags(int flags); + + // How many characters are on a line, not including end of line characters. + int LineLength(int line); + + // Highlight the characters at two positions. + void BraceHighlight(int pos1, int pos2); + + // Highlight the character at a position indicating there is no matching brace. + void BraceBadLight(int pos); + + // Find the position of a matching brace or INVALID_POSITION if no match. + int BraceMatch(int pos); + + // Are the end of line characters visible. + bool GetViewEOL(); + + // Make the end of line characters visible or invisible + void SetViewEOL(bool visible); + + // Retrieve a pointer to the document object. + void* GetDocPointer(); + + // Change the document object used. + void SetDocPointer(void* docPointer); + + // Set which document modification events are sent to the container. + void SetModEventMask(int mask); + + // Retrieve the column number which text should be kept within. + int GetEdgeColumn(); + + // Set the column number of the edge. + // If text goes past the edge then it is highlighted. + void SetEdgeColumn(int column); + + // Retrieve the edge highlight mode. + int GetEdgeMode(); + + // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that + // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + void SetEdgeMode(int mode); + + // Retrieve the colour used in edge indication. wxColour GetEdgeColour(); - void SetEdgeColour(const wxColour& colour); + + // Change the colour used in edge indication. + void SetEdgeColour(const wxColour& edgeColour); + + // Sets the current caret position to be the search anchor. + void SearchAnchor(); + + // Find some text starting at the search anchor. + int SearchNext(int flags, const wxString& text); + + // Find some text starting at the search anchor and moving backwards. + int SearchPrev(int flags, const wxString& text); + + // Set the way the line the caret is on is kept visible. + void SetCaretPolicy(int caretPolicy, int caretSlop); + + // Retrieves the number of lines completely visible. + int LinesOnScreen(); + + // Set whether a pop up menu is displayed automatically when the user presses + // the wrong mouse button. + void UsePopUp(bool allowPopUp); + + // Is the selection a rectangular. The alternative is the more common stream selection. + bool SelectionIsRectangle(); + + // Set the zoom level. This number of points is added to the size of all fonts. + // It may be positive to magnify or negative to reduce. + void SetZoom(int zoom); + + // Retrieve the zoom level. + int GetZoom(); + + // Create a new document object. + // Starts with reference count of 1 and not selected into editor. + void* CreateDocument(); + + // Extend life of document. + void AddRefDocument(void* docPointer); + + // Release a reference to the document, deleting document if it fades to black. + void ReleaseDocument(void* docPointer); + + // Get which document modification events are sent to the container. + int GetModEventMask(); + + // Start notifying the container of all key presses and commands. + void StartRecord(); + + // Stop notifying the container of all key presses and commands. + void StopRecord(); + + // Set the lexing language of the document. + void SetLexer(int lexer); + + // Retrieve the lexing language of the document. + int GetLexer(); + + // Colourise a segment of the document using the current lexing language. + void Colourise(int start, int end); + + // Set up a value that may be used by a lexer for some optional feature. + void SetProperty(const wxString& key, const wxString& value); + + // Set up the key words used by the lexer. + void SetKeyWords(int keywordSet, const wxString& keyWords); + +// END of generated section +//---------------------------------------------------------------------- +// Others... - // Lexer - void SetLexer(wxSTC_LEX lexer); - wxSTC_LEX GetLexer(); - void Colourise(int start, int end); - void SetProperty(const wxString& key, const wxString& value); - void SetKeywords(int keywordSet, const wxString& keywordList); + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:#RRGGBB sets the foreground colour + // back:#RRGGBB sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec(int styleNum, const wxString& spec); + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont(int styleNum, wxFont& font); + + + + // Set all font style attributes at once. + void StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline); + + + + // Perform one of the operations defined by the wxSTC_CMD_* constants. + void CmdKeyExecute(int cmd); + + + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins(int left, int right); + + + // Retrieve the start and end positions of the current selection. +#ifdef SWIG + void GetSelection(int* OUTPUT, int* OUTPUT); +#else + void GetSelection(int* startPos, int* endPos); +#endif + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition(int pos); + + + // Scroll enough to make the given line visible + void ScrollToLine(int line); + + + // Scroll enough to make the given column visible + void ScrollToColumn(int column); + +//---------------------------------------------------------------------- + + +#ifndef SWIG private: // Event handlers void OnPaint(wxPaintEvent& evt); @@ -430,11 +1254,13 @@ private: void OnMouseLeftUp(wxMouseEvent& evt); void OnMouseRightUp(wxMouseEvent& evt); void OnChar(wxKeyEvent& evt); + void OnKeyDown(wxKeyEvent& evt); void OnLoseFocus(wxFocusEvent& evt); void OnGainFocus(wxFocusEvent& evt); void OnSysColourChanged(wxSysColourChangedEvent& evt); void OnEraseBackground(wxEraseEvent& evt); void OnMenu(wxCommandEvent& evt); + void OnListBox(wxCommandEvent& evt); // Turn notifications from Scintilla into events @@ -445,22 +1271,22 @@ private: private: DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxStyledTextCtrl) ScintillaWX* m_swx; wxStopWatch m_stopWatch; - bool m_readOnly; - wxSTC_UndoType m_undoType; friend class ScintillaWX; friend class Platform; +#endif }; //---------------------------------------------------------------------- class wxStyledTextEvent : public wxCommandEvent { public: - wxStyledTextEvent(wxEventType commandType, int id); + wxStyledTextEvent(wxEventType commandType=0, int id=0); ~wxStyledTextEvent() {} void SetPosition(int pos) { m_position = pos; } @@ -499,7 +1325,10 @@ public: void CopyObject(wxObject& obj) const; +#ifndef SWIG private: + DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) + int m_position; int m_key; int m_modifiers; @@ -517,11 +1346,11 @@ private: int m_message; // wxEVT_STC_MACRORECORD int m_wParam; int m_lParam; - +#endif }; - +// Event types enum { wxEVT_STC_CHANGE = 1650, wxEVT_STC_STYLENEEDED, @@ -535,9 +1364,12 @@ enum { wxEVT_STC_KEY, wxEVT_STC_MACRORECORD, wxEVT_STC_MARGINCLICK, - wxEVT_STC_NEEDSHOWN + wxEVT_STC_NEEDSHOWN, + wxEVT_STC_POSCHANGED }; + +#ifndef SWIG typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, @@ -549,9 +1381,13 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, #define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, -#define EVT_STC_CMDKEY(id, fn) { wxEVT_STC_CMDKEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, -#define EVT_STC_UNKNOWNCMDKEY(id, fn) { wxEVT_STC_UNKNOWNCMDKEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#endif //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/include/wx/strconv.h b/include/wx/strconv.h index fa3e22c42d..92d5729370 100644 --- a/include/wx/strconv.h +++ b/include/wx/strconv.h @@ -46,7 +46,7 @@ public: const wxWCharBuffer cMB2WX(const char *psz) const { return cMB2WC(psz); } const wxCharBuffer cWX2MB(const wchar_t *psz) const { return cWC2MB(psz); } const wchar_t* cWC2WX(const wchar_t *psz) const { return psz; } - const wchar_t* cMB2WC(const wchar_t *psz) const { return psz; } + const wchar_t* cWX2WC(const wchar_t *psz) const { return psz; } #else // ANSI const char* cMB2WX(const char *psz) const { return psz; } const char* cWX2MB(const char *psz) const { return psz; } diff --git a/include/wx/string.h b/include/wx/string.h index 1b0c138ea9..08def0c468 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -66,7 +66,6 @@ #endif // AIX #include "wx/defs.h" // everybody should include this -#include "wx/debug.h" // for wxASSERT() #include "wx/wxchar.h" // for wxChar #include "wx/buffer.h" // for wxCharBuffer #include "wx/strconv.h" // for wxConvertXXX() macros and wxMBConv classes @@ -205,6 +204,12 @@ struct WXDLLEXPORT wxStringData // lock/unlock void Lock() { if ( !IsEmpty() ) nRefs++; } + + // VC++ will refuse to inline this function but profiling shows that it + // is wrong +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) + __forceinline +#endif void Unlock() { if ( !IsEmpty() && --nRefs == 0) free(this); } // if we had taken control over string memory (GetWriteBuf), it's @@ -315,6 +320,8 @@ public: // (default value of wxSTRING_MAXLEN means take all the string) wxString(const wxChar *psz, size_t nLength = wxSTRING_MAXLEN) { InitWith(psz, 0, nLength); } + wxString(const wxChar *psz, wxMBConv& WXUNUSED(conv), size_t nLength = wxSTRING_MAXLEN) + { InitWith(psz, 0, nLength); } #if wxUSE_UNICODE // from multibyte string @@ -328,13 +335,10 @@ public: // from C string (for compilers using unsigned char) wxString(const unsigned char* psz, size_t nLength = wxSTRING_MAXLEN) { InitWith((const char*)psz, 0, nLength); } - // from multibyte string - wxString(const char *psz, wxMBConv& WXUNUSED(conv) , size_t nLength = wxSTRING_MAXLEN) - { InitWith(psz, 0, nLength); } #if wxUSE_WCHAR_T // from wide (Unicode) string - wxString(const wchar_t *pwz); + wxString(const wchar_t *pwz, wxMBConv& conv = wxConvLibc); #endif // !wxUSE_WCHAR_T // from wxCharBuffer @@ -404,16 +408,16 @@ public: // operator version of GetChar wxChar operator[](int n) const { ASSERT_VALID_INDEX( n ); return m_pchData[n]; } -#ifdef __alpha__ - // operator version of GetChar - wxChar operator[](unsigned int n) const - { ASSERT_VALID_INDEX( n ); return m_pchData[n]; } -#endif // operator version of GetWriteableChar wxChar& operator[](size_t n) { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; } -#ifdef __alpha__ + +#ifndef wxSIZE_T_IS_UINT + // operator version of GetChar + wxChar operator[](unsigned int n) const + { ASSERT_VALID_INDEX( n ); return m_pchData[n]; } + // operator version of GetWriteableChar wxChar& operator[](unsigned int n) { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; } @@ -423,18 +427,30 @@ public: operator const wxChar*() const { return m_pchData; } // explicit conversion to C string (use this with printf()!) const wxChar* c_str() const { return m_pchData; } - // (and this with [wx]Printf()!) + // identical to c_str() const wxChar* wx_str() const { return m_pchData; } // identical to c_str() const wxChar* GetData() const { return m_pchData; } // conversions with (possible) format convertions: have to return a // buffer with temporary data + // + // the functions defined (in either Unicode or ANSI) mode are mb_str() to + // return an ANSI (multibyte) string, wc_str() to return a wide string and + // fn_str() to return a string which should be used with the OS APIs + // accepting the file names. The return value is always the same, but the + // type differs because a function may either return pointer to the buffer + // directly or have to use intermediate buffer for translation. #if wxUSE_UNICODE - const wxCharBuffer mb_str(wxMBConv& conv = wxConvLibc) const { return conv.cWC2MB(m_pchData); } + const wxCharBuffer mb_str(wxMBConv& conv = wxConvLibc) const + { return conv.cWC2MB(m_pchData); } + const wxWX2MBbuf mbc_str() const { return mb_str(*wxConvCurrent); } - const wxChar* wc_str(wxMBConv& WXUNUSED(conv) = wxConvLibc) const { return m_pchData; } + const wxChar* wc_str() const { return m_pchData; } + + // for compatibility with !wxUSE_UNICODE version + const wxChar* wc_str(wxMBConv& WXUNUSED(conv)) const { return m_pchData; } #if wxMBFILES const wxCharBuffer fn_str() const { return mb_str(wxConvFile); } @@ -442,17 +458,18 @@ public: const wxChar* fn_str() const { return m_pchData; } #endif // wxMBFILES/!wxMBFILES #else // ANSI -#if wxUSE_MULTIBYTE - const wxChar* mb_str(wxMBConv& WXUNUSED(conv) = wxConvLibc) const - { return m_pchData; } - const wxWX2MBbuf mbc_str() const { return mb_str(*wxConvCurrent); } -#else // !mmultibyte const wxChar* mb_str() const { return m_pchData; } + + // for compatibility with wxUSE_UNICODE version + const wxChar* mb_str(wxMBConv& WXUNUSED(conv)) const { return m_pchData; } + const wxWX2MBbuf mbc_str() const { return mb_str(); } -#endif // multibyte/!multibyte + #if wxUSE_WCHAR_T - const wxWCharBuffer wc_str(wxMBConv& conv) const { return conv.cMB2WC(m_pchData); } + const wxWCharBuffer wc_str(wxMBConv& conv) const + { return conv.cMB2WC(m_pchData); } #endif // wxUSE_WCHAR_T + const wxChar* fn_str() const { return m_pchData; } #endif // Unicode/ANSI @@ -580,10 +597,15 @@ public: // if nCount = default value) wxString Mid(size_t nFirst, size_t nCount = wxSTRING_MAXLEN) const; - // operator version of Mid() + // operator version of Mid() wxString operator()(size_t start, size_t len) const { return Mid(start, len); } + // check that the tring starts with prefix and return the rest of the + // string in the provided pointer if it is not NULL, otherwise return + // FALSE + bool StartsWith(const wxChar *prefix, wxString *rest = NULL) const; + // get first nCount characters wxString Left(size_t nCount) const; // get last nCount characters @@ -816,8 +838,8 @@ public: wxString& replace(size_t nStart, size_t nLen, const wxString& str, size_t nStart2, size_t nLen2); // replaces the substring with first nCount chars of sz - wxString& replace(size_t nStart, size_t nLen, - const wxChar* sz, size_t nCount); + wxString& replace(size_t nStart, size_t nLen, + const wxChar* sz, size_t nCount); // swap two strings void swap(wxString& str); @@ -833,7 +855,7 @@ public: #if !defined(__VISUALC__) || defined(__WIN32__) // find first n characters of sz size_t find(const wxChar* sz, size_t nStart = 0, size_t n = npos) const; -#endif +#endif // VC++ 1.5 // Gives a duplicate symbol (presumably a case-insensitivity problem) #if !defined(__BORLANDC__) @@ -852,7 +874,7 @@ public: size_t n = npos) const; // as find, but from the end size_t rfind(wxChar ch, size_t nStart = npos) const; -#endif +#endif // VC++ 1.5 // find first/last occurence of any character in the set @@ -883,7 +905,8 @@ public: // same as above size_t find_first_not_of(wxChar ch, size_t nStart = 0) const; // as strcspn() - size_t find_last_not_of(const wxString& str, size_t nStart=npos) const; + size_t find_last_not_of(const wxString& str, size_t nStart = npos) const + { return find_first_not_of(str.c_str(), nStart); } // same as above size_t find_last_not_of(const wxChar* sz, size_t nStart = npos) const; // same as above @@ -895,15 +918,18 @@ public: // just like strcmp() int compare(const wxString& str) const { return Cmp(str); } // comparison with a substring - int compare(size_t nStart, size_t nLen, const wxString& str) const; + int compare(size_t nStart, size_t nLen, const wxString& str) const + { return Mid(nStart, nLen).Cmp(str); } // comparison of 2 substrings int compare(size_t nStart, size_t nLen, - const wxString& str, size_t nStart2, size_t nLen2) const; + const wxString& str, size_t nStart2, size_t nLen2) const + { return Mid(nStart, nLen).Cmp(str.Mid(nStart2, nLen2)); } // just like strcmp() int compare(const wxChar* sz) const { return Cmp(sz); } // substring comparison with first nCount characters of sz int compare(size_t nStart, size_t nLen, - const wxChar* sz, size_t nCount = npos) const; + const wxChar* sz, size_t nCount = npos) const + { return Mid(nStart, nLen).Cmp(wxString(sz, nCount)); } // substring extraction wxString substr(size_t nStart = 0, size_t nLen = npos) const @@ -985,6 +1011,9 @@ public: // remove first item matching this value void Remove(const wxChar *sz); // remove item by index + void RemoveAt(size_t nIndex); + + // obsolete, use RemoveAt(), this one is going to disappear! void Remove(size_t nIndex); // sorting @@ -994,6 +1023,12 @@ public: // sort array elements using specified comparaison function void Sort(CompareFunction compareFunction); + // comparison + // compare two arrays case sensitively + bool operator==(const wxArrayString& a) const; + // compare two arrays case sensitively + bool operator!=(const wxArrayString& a) const { return !(*this == a); } + protected: void Copy(const wxArrayString& src); // copies the contents of another array @@ -1072,11 +1107,19 @@ inline bool operator==(const wxString& s1, const wxWCharBuffer& s2) { return (s1.Cmp((const wchar_t *)s2) == 0); } inline bool operator==(const wxWCharBuffer& s1, const wxString& s2) { return (s2.Cmp((const wchar_t *)s1) == 0); } +inline bool operator!=(const wxString& s1, const wxWCharBuffer& s2) + { return (s1.Cmp((const wchar_t *)s2) != 0); } +inline bool operator!=(const wxWCharBuffer& s1, const wxString& s2) + { return (s2.Cmp((const wchar_t *)s1) != 0); } #else inline bool operator==(const wxString& s1, const wxCharBuffer& s2) { return (s1.Cmp((const char *)s2) == 0); } inline bool operator==(const wxCharBuffer& s1, const wxString& s2) { return (s2.Cmp((const char *)s1) == 0); } +inline bool operator!=(const wxString& s1, const wxCharBuffer& s2) + { return (s1.Cmp((const char *)s2) != 0); } +inline bool operator!=(const wxCharBuffer& s1, const wxString& s2) + { return (s2.Cmp((const char *)s1) != 0); } #endif wxString WXDLLEXPORT operator+(const wxString& string1, const wxString& string2); diff --git a/include/wx/stubs/dc.h b/include/wx/stubs/dc.h index ce3e9998d1..596e26de9a 100644 --- a/include/wx/stubs/dc.h +++ b/include/wx/stubs/dc.h @@ -364,8 +364,6 @@ class WXDLLEXPORT wxDC: public wxObject bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - float m_scaleFactor; // wxPSDC wants to have this. Will disappear. - long m_clipX1,m_clipY1,m_clipX2,m_clipY2; long m_minX,m_maxX,m_minY,m_maxY; }; diff --git a/include/wx/stubs/setup.h b/include/wx/stubs/setup.h index b791618903..ef79941f19 100644 --- a/include/wx/stubs/setup.h +++ b/include/wx/stubs/setup.h @@ -103,23 +103,28 @@ // Define 1 to use ODBC classes #define wxODBC_FWD_ONLY_CURSORS 1 - // Some databases/ODBC drivers only allow forward scrolling cursors. - // Unless you specifically want to use backward scrolling - // cursors, and you know that all of the databases/ODBC drivers - // that you will use these odbc classes with allow backward - // scrolling cursors, this setting should remain set to 1 - // for maximum database/driver compatibilty + // For backward compatibility reasons, this parameter now only + // controls the default scrolling method used by cursors. This + // default behavior can be overriden by setting the second param + // of wxDB::GetDbConnection() to indicate whether the connection + // (and any wxTable()s that use the connection) should support + // forward only scrolling of cursors, or both forward and backward + // Support for backward scrolling cursors is dependent on the + // data source as well as the ODBC driver being used. +#define wxODBC_BACKWARD_COMPATABILITY 0 + // Default is 0. Set to 1 to use the deprecated classes, enum + // types, function, member variables. With a setting of 1, full + // backward compatability with the 2.0.x release is possible. + // It is STRONGLY recommended that this be set to 0, as + // future development will be done only on the non-deprecated + // functions/classes/member variables/etc. #define wxUSE_IOSTREAMH 1 // VC++ 4.2 and above allows and // but you can't mix them. Set to 1 for , // 0 for -#define wxUSE_WXCONFIG 1 - // if enabled, compiles built-in OS independent wxConfig - // class and it's file (any platform) and registry (Win) - // based implementations #define wxUSE_TIMEDATE 1 // Use time and date #define wxUSE_THREADS 0 diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index e75206df99..399c6f96dc 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -206,7 +206,7 @@ protected: }; // a list of toolbar tools -WX_DECLARE_LIST(wxToolBarToolBase, wxToolBarToolsList); +WX_DECLARE_EXPORTED_LIST(wxToolBarToolBase, wxToolBarToolsList); // ---------------------------------------------------------------------------- // the base class for all toolbars @@ -221,6 +221,16 @@ public: // toolbar construction // -------------------- + // the most commonly used version of AddTool() + wxToolBarToolBase *AddTool(int id, + const wxBitmap& bitmap, + const wxString& shortHelpString = wxEmptyString, + const wxString& longHelpString = wxEmptyString) + { + return AddTool(id, bitmap, wxNullBitmap, FALSE, NULL, + shortHelpString, longHelpString); + } + // If pushedBitmap is NULL, a reversed version of bitmap is created and // used as the pushed/toggled image. If toggle is TRUE, the button toggles // between the two states. @@ -325,10 +335,13 @@ public: virtual void SetToolSeparation(int separation) { m_toolSeparation = separation; } - virtual wxSize GetToolMargins() { return wxSize(m_xMargin, m_yMargin); } + virtual wxSize GetToolMargins() { return GetMargins(); } virtual int GetToolPacking() { return m_toolPacking; } virtual int GetToolSeparation() { return m_toolSeparation; } + // for compatibility + wxSize GetMargins() const { return wxSize(m_xMargin, m_yMargin); } + // toolbar geometry // ---------------- @@ -397,6 +410,9 @@ public: // Do the toolbar button updates (check for EVT_UPDATE_UI handlers) virtual void DoToolbarUpdates(); + // Don't want toolbars to accept the focus + virtual bool AcceptsFocus() const { return FALSE; } + protected: // to implement in derived classes // ------------------------------- diff --git a/include/wx/textfile.h b/include/wx/textfile.h index 0f9ec816a3..c6e33dcca3 100644 --- a/include/wx/textfile.h +++ b/include/wx/textfile.h @@ -25,16 +25,12 @@ #define wxUSE_TEXTFILE 0 #endif // wxUSE_FILE -#if wxUSE_TEXTFILE - -#include "wx/string.h" -#include "wx/file.h" -#include "wx/dynarray.h" - // ---------------------------------------------------------------------------- -// wxTextFile +// constants // ---------------------------------------------------------------------------- +// NB: this is always defined, even if !wxUSE_TEXTFILE + // the line termination type enum wxTextFileType { @@ -45,6 +41,16 @@ enum wxTextFileType wxTextFileType_Os2 // 'CR' 'LF' }; +#if wxUSE_TEXTFILE + +#include "wx/string.h" +#include "wx/file.h" +#include "wx/dynarray.h" + +// ---------------------------------------------------------------------------- +// wxTextFile +// ---------------------------------------------------------------------------- + WX_DEFINE_EXPORTED_ARRAY(wxTextFileType, ArrayFileType); class WXDLLEXPORT wxTextFile @@ -98,7 +104,7 @@ public: // you're using "direct access" i.e. GetLine() size_t GetCurrentLine() const { return m_nCurLine; } void GoToLine(size_t n) { m_nCurLine = n; } - bool Eof() const { return m_nCurLine == m_aLines.Count() - 1; } + bool Eof() const { return (m_aLines.Count() == 0 || m_nCurLine == m_aLines.Count() - 1); } // these methods allow more "iterator-like" traversal of the list of // lines, i.e. you may write something like: diff --git a/include/wx/timer.h b/include/wx/timer.h index eddeb32d2c..7ea894d04a 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -222,10 +222,13 @@ long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); // ---------------------------------------------------------------------------- // Get number of seconds since local time 00:00:00 Jan 1st 1970. -long WXDLLEXPORT wxGetLocalTime(); +extern long WXDLLEXPORT wxGetLocalTime(); // Get number of seconds since GMT 00:00:00, Jan 1st 1970. -long WXDLLEXPORT wxGetUTCTime(); +extern long WXDLLEXPORT wxGetUTCTime(); + +// Get number of milliseconds since local time 00:00:00 Jan 1st 1970 +extern wxLongLong WXDLLEXPORT wxGetLocalTimeMillis(); #define wxGetCurrentTime() wxGetLocalTime() diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h index 278ea204f8..b28ad9a538 100644 --- a/include/wx/treectrl.h +++ b/include/wx/treectrl.h @@ -139,7 +139,8 @@ public: wxTreeItemId GetOldItem() const { return m_itemOld; } // the point where the mouse was when the drag operation started (for - // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only) + // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only) or the point where + // the mouse click event happened (wxEVT_COMMAND_TREE_ITEM_XXX_CLICK) wxPoint GetPoint() const { return m_pointDrag; } // keyboard code (for wxEVT_COMMAND_TREE_KEY_DOWN only) diff --git a/include/wx/txtstrm.h b/include/wx/txtstrm.h index 5b114305a8..9553ce1356 100644 --- a/include/wx/txtstrm.h +++ b/include/wx/txtstrm.h @@ -47,7 +47,7 @@ public: // Operators wxTextInputStream& operator>>(wxString& word); - wxTextInputStream& operator>>(wxChar& c); + wxTextInputStream& operator>>(char& c); wxTextInputStream& operator>>(wxInt16& i); wxTextInputStream& operator>>(wxInt32& i); wxTextInputStream& operator>>(wxUint16& i); @@ -90,7 +90,7 @@ public: wxTextOutputStream& operator<<(const wxChar *string); wxTextOutputStream& operator<<(const wxString& string); - wxTextOutputStream& operator<<(wxChar c); + wxTextOutputStream& operator<<(char c); wxTextOutputStream& operator<<(wxInt16 c); wxTextOutputStream& operator<<(wxInt32 c); wxTextOutputStream& operator<<(wxUint16 c); diff --git a/include/wx/url.h b/include/wx/url.h index 6b15187585..b941e10e16 100644 --- a/include/wx/url.h +++ b/include/wx/url.h @@ -8,6 +8,7 @@ // Copyright: (c) 1997, 1998 Guilhem Lavaux // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// + #ifndef _WX_URL_H #define _WX_URL_H @@ -42,11 +43,11 @@ public: virtual ~wxURL(); wxString GetProtocolName() const { return m_protoinfo->m_protoname; } - wxString GetHostName() const { return m_hostname; } - wxString GetURL() const { return m_url; } - wxProtocol& GetProtocol() { return *m_protocol; } - wxURLError GetError() const { return m_error; } - wxString GetPath() const { return m_path; } + wxString GetHostName() const { return m_hostname; } + wxString GetURL() const { return m_url; } + wxProtocol& GetProtocol() { return *m_protocol; } + wxURLError GetError() const { return m_error; } + wxString GetPath() const { return m_path; } wxInputStream *GetInputStream(); @@ -55,7 +56,10 @@ public: void SetProxy(const wxString& url_proxy); #endif // wxUSE_SOCKETS - static wxString ConvertToValidURI(const wxString& uri); + static wxString ConvertToValidURI( + const wxString& uri, + const wxChar* delims = wxT(";/?:@&=+$,") + ); static wxString ConvertFromURI(const wxString& uri); protected: diff --git a/include/wx/utils.h b/include/wx/utils.h index 2eec7b1c11..8414491774 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -148,7 +148,13 @@ WXDLLEXPORT long wxExecute(const wxString& command, bool sync = FALSE, wxProcess *process = (wxProcess *) NULL); // execute the command capturing its output into an array line by line -WXDLLEXPORT long wxExecute(const wxString& command, wxArrayString& output); +WXDLLEXPORT long wxExecute(const wxString& command, + wxArrayString& output); + +// also capture stderr +WXDLLEXPORT long wxExecute(const wxString& command, + wxArrayString& output, + wxArrayString& error); enum wxSignal { @@ -270,6 +276,9 @@ WXDLLEXPORT int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, con // Yield to other apps/messages WXDLLEXPORT bool wxYield(); +// Like wxYield, but fails silently if the yield is recursive. +WXDLLEXPORT bool wxYieldIfNeeded(); + // Yield to other apps/messages and disable user input WXDLLEXPORT bool wxSafeYield(wxWindow *win = NULL); @@ -294,6 +303,7 @@ public: private: wxWindowList *m_winDisabled; + // not used any more but left here for binary compatibility #ifdef __WXMSW__ wxWindow *m_winTop; #endif // MSW @@ -320,25 +330,18 @@ class WXDLLEXPORT wxBusyCursor public: wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) { wxBeginBusyCursor(cursor); } - ~wxBusyCursor() + ~wxBusyCursor() { wxEndBusyCursor(); } + + // FIXME: These two methods are currently only implemented (and needed?) + // in wxGTK. BusyCursor handling should probably be moved to + // common code since the wxGTK and wxMSW implementations are very + // similar except for wxMSW using HCURSOR directly instead of + // wxCursor.. -- RL. + static const wxCursor &GetStoredCursor(); + static const wxCursor GetBusyCursor(); }; -// ---------------------------------------------------------------------------- -// Error message functions used by wxWindows (deprecated, use wxLog) -// ---------------------------------------------------------------------------- - -// Format a message on the standard error (UNIX) or the debugging -// stream (Windows) -WXDLLEXPORT void wxDebugMsg(const wxChar *fmt ...); - -// Non-fatal error (continues) -WXDLLEXPORT_DATA(extern const wxChar*) wxInternalErrorStr; -WXDLLEXPORT void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr); - -// Fatal error (exits) -WXDLLEXPORT_DATA(extern const wxChar*) wxFatalErrorStr; -WXDLLEXPORT void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr); // ---------------------------------------------------------------------------- // Reading and writing resources (eg WIN.INI, .Xdefaults) @@ -418,5 +421,22 @@ void wxAllocColor(Display *display,Colormap colormap,XColor *xcolor); #endif // wxUSE_GUI +// ---------------------------------------------------------------------------- +// Error message functions used by wxWindows (deprecated, use wxLog) +// ---------------------------------------------------------------------------- + +// Format a message on the standard error (UNIX) or the debugging +// stream (Windows) +WXDLLEXPORT void wxDebugMsg(const wxChar *fmt ...); + +// Non-fatal error (continues) +WXDLLEXPORT_DATA(extern const wxChar*) wxInternalErrorStr; +WXDLLEXPORT void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr); + +// Fatal error (exits) +WXDLLEXPORT_DATA(extern const wxChar*) wxFatalErrorStr; +WXDLLEXPORT void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr); + + #endif // _WX_UTILSH__ diff --git a/include/wx/version.h b/include/wx/version.h index 77e1bbf05a..4e4c202df8 100644 --- a/include/wx/version.h +++ b/include/wx/version.h @@ -1,25 +1,31 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: version.h +// Name: wx/version.h // Purpose: wxWindows version numbers // Author: Julian Smart // Modified by: // Created: 29/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_VERSIONH__ #define _WX_VERSIONH__ -/* Bump-up with each new version */ +// Bump-up with each new version #define wxMAJOR_VERSION 2 -#define wxMINOR_VERSION 1 -#define wxRELEASE_NUMBER 14 -#define wxVERSION_STRING "wxWindows 2.1.14" +#define wxMINOR_VERSION 2 +#define wxRELEASE_NUMBER 9 +#define wxVERSION_STRING _T("wxWindows 2.2.9") #define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER #define wxBETA_NUMBER 0 #define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0) +// check if the current version is at least major.minor.release +#define wxCHECK_VERSION(major,minor,release) \ + (wxMAJOR_VERSION > (major) || \ + (wxMAJOR_VERSION == (major) && wxMINOR_VERSION > (minor)) || \ + (wxMAJOR_VERSION == (major) && wxMINOR_VERSION == (minor) && wxRELEASE_NUMBER >= (release))) + #endif // _WX_VERSIONH__ diff --git a/include/wx/window.h b/include/wx/window.h index 3a1e9362bb..3410f7d3b5 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -58,7 +58,7 @@ class WXDLLEXPORT wxWindow; // (pseudo)template list classes // ---------------------------------------------------------------------------- -WX_DECLARE_LIST_3(wxWindow, wxWindowBase, wxWindowList, wxWindowListNode); +WX_DECLARE_LIST_3(wxWindow, wxWindowBase, wxWindowList, wxWindowListNode, class WXDLLEXPORT); // ---------------------------------------------------------------------------- // global variables diff --git a/include/wx/wizard.h b/include/wx/wizard.h index 58eb283c51..ec311b7cb9 100644 --- a/include/wx/wizard.h +++ b/include/wx/wizard.h @@ -133,6 +133,11 @@ public: // get the current page (NULL if RunWizard() isn't running) virtual wxWizardPage *GetCurrentPage() const = 0; + // set the min size which should be available for the pages: a + // wizard will take into account the size of the bitmap (if any) + // itself and will never be less than some predefined fixed size + virtual void SetPageSize(const wxSize& size) = 0; + // get the size available for the page: the wizards are not resizeable, so // this size doesn't change virtual wxSize GetPageSize() const = 0; diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 2f53037c71..9ed27fc584 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -22,6 +22,10 @@ // # error "MBCS is not supported by wxChar" #endif +// ---------------------------------------------------------------------------- +// first deal with Unicode setting +// ---------------------------------------------------------------------------- + // set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined #if defined(_UNICODE) || defined(UNICODE) # undef wxUSE_UNICODE @@ -30,7 +34,7 @@ # ifndef wxUSE_UNICODE # define wxUSE_UNICODE 0 # endif -#endif +#endif // Unicode // and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1... #if wxUSE_UNICODE @@ -40,7 +44,13 @@ # ifndef UNICODE # define UNICODE # endif -#endif +#endif // Unicode + +// Unicode support requires wchar_t +#if wxUSE_UNICODE +# undef wxUSE_WCHAR_T +# define wxUSE_WCHAR_T 1 +#endif // Unicode // ---------------------------------------------------------------------------- // define wxHAVE_TCHAR_FUNCTIONS for the compilers which support the @@ -98,9 +108,7 @@ // time.h functions -- none defined in tchar.h #define wxAsctime asctime #define wxCtime ctime - - -#endif +#endif // compilers with (good) TCHAR support #ifdef wxHAVE_TCHAR_FUNCTIONS # define HAVE_WCSLEN 1 @@ -116,9 +124,11 @@ typedef _TUCHAR wxUChar; # define wxSChar signed char # define wxUChar unsigned char # endif - // wchar_t is available -# undef wxUSE_WCHAR_T -# define wxUSE_WCHAR_T 1 + + // wchar_t is available + #ifndef wxUSE_WCHAR_T + #define wxUSE_WCHAR_T 1 + #endif // !defined(wxUSE_WCHAR_T) // ctype.h functions #ifndef wxNO_TCHAR_CTYPE @@ -239,14 +249,11 @@ typedef _TUCHAR wxUChar; #else // !TCHAR-aware compilers // check whether we should include wchar.h or equivalent -# if wxUSE_UNICODE -# undef wxUSE_WCHAR_T -# define wxUSE_WCHAR_T 1 // wchar_t *must* be available in Unicode mode -# elif !defined(wxUSE_WCHAR_T) +# if !defined(wxUSE_WCHAR_T) # if defined(__VISUALC__) && (__VISUALC__ < 900) # define wxUSE_WCHAR_T 0 // wchar_t is not available for MSVC++ 1.5 # elif defined(__UNIX__) -# if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) +# if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__) # define wxUSE_WCHAR_T 1 # else # define wxUSE_WCHAR_T 0 @@ -263,13 +270,13 @@ typedef _TUCHAR wxUChar; // add additional compiler checks if this fails # define wxUSE_WCHAR_T 1 # endif -# endif//wxUSE_UNICODE +# endif // !defined(wxUSE_WCHAR_T) # if wxUSE_WCHAR_T # ifdef HAVE_WCSTR_H # include # else -# ifndef __FreeBSD__ +# if !defined(__FreeBSD__) && !defined(__DARWIN__) # include # else # include @@ -359,7 +366,7 @@ typedef unsigned __WCHAR_TYPE__ wxUChar; # define wxUChar unsigned char # endif -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || defined(__DARWIN__) # undef _T # endif @@ -603,6 +610,8 @@ WXDLLEXPORT size_t wxStrxfrm(wxChar *dest, const wxChar *src, size_t n); # include WXDLLEXPORT FILE * wxFopen(const wxChar *path, const wxChar *mode); WXDLLEXPORT FILE * wxFreopen(const wxChar *path, const wxChar *mode, FILE *stream); +WXDLLEXPORT int wxRemove(const wxChar *path); +WXDLLEXPORT int wxRename(const wxChar *oldpath, const wxChar *newpath); WXDLLEXPORT int wxPrintf(const wxChar *fmt, ...); WXDLLEXPORT int wxVprintf(const wxChar *fmt, va_list argptr); WXDLLEXPORT int wxFprintf(FILE *stream, const wxChar *fmt, ...); @@ -628,17 +637,38 @@ WXDLLEXPORT int wxSystem(const wxChar *psz); WXDLLEXPORT size_t wxStrftime(wxChar *s, size_t max, const wxChar *fmt, const struct tm *tm); #endif +// under VC++ 6.0 isspace() returns 1 for 8 bit chars which completely breaks +// the file parsing - this may be true for 5.0 as well, update #ifdef then +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) && !wxUSE_UNICODE + #undef wxIsspace + #define wxIsspace(c) ((((unsigned)c) < 128) && isspace(c)) +#endif // VC++ + +// ---------------------------------------------------------------------------- +// common macros which are always defined +// ---------------------------------------------------------------------------- + // although global macros with such names are really bad, we want to have // another name for _T() which should be used to avoid confusion between _T() // and _() in wxWindows sources #define wxT(x) _T(x) -// a Unicode-friendly __FILE__ analog +// Unicode-friendly __FILE__, __DATE__ and __TIME__ analogs #ifndef __TFILE__ #define __XFILE__(x) wxT(x) #define __TFILE__ __XFILE__(__FILE__) #endif +#ifndef __TDATE__ + #define __XDATE__(x) wxT(x) + #define __TDATE__ __XDATE__(__DATE__) +#endif + +#ifndef __TTIME__ + #define __XTIME__(x) wxT(x) + #define __TTIME__ __XTIME__(__TIME__) +#endif + #endif //_WX_WXCHAR_H_ diff --git a/include/wx/wxprec.h b/include/wx/wxprec.h index e4f29ad5b4..0bfccf8d0d 100644 --- a/include/wx/wxprec.h +++ b/include/wx/wxprec.h @@ -27,6 +27,10 @@ #ifdef WX_PRECOMP +// include first to ensure that UNICODE macro is correctly set +// _before_ including +#include "wx/wxchar.h" + // include standard Windows headers #if defined(__WXMSW__) && !wxUSE_MFC #include diff --git a/include/wx/zipstrm.h b/include/wx/zipstrm.h index 1c4be27845..4b8b4cf346 100644 --- a/include/wx/zipstrm.h +++ b/include/wx/zipstrm.h @@ -28,25 +28,27 @@ class WXDLLEXPORT wxZipInputStream : public wxInputStream { - private: - size_t m_Size; - off_t m_Pos; - void *m_Archive; - // this void* is handle of archive . - // I'm sorry it is void and not proper type but I don't want - // to make unzip.h header public. +public: + wxZipInputStream(const wxString& archive, const wxString& file); + // archive is name of .zip archive, file is name of file to be extracted. + // Remember that archive must be local file accesible via fopen, fread functions! + ~wxZipInputStream(); - public: - wxZipInputStream(const wxString& archive, const wxString& file); - // archive is name of .zip archive, file is name of file to be extracted. - // Remember that archive must be local file accesible via fopen, fread functions! - ~wxZipInputStream(); + virtual size_t GetSize() const {return m_Size;} + virtual bool Eof() const; - protected: - virtual size_t GetSize() const {return m_Size;} - virtual size_t OnSysRead(void *buffer, size_t bufsize); - virtual off_t OnSysSeek(off_t seek, wxSeekMode mode); - virtual off_t OnSysTell() const {return m_Pos;} +protected: + virtual size_t OnSysRead(void *buffer, size_t bufsize); + virtual off_t OnSysSeek(off_t seek, wxSeekMode mode); + virtual off_t OnSysTell() const {return m_Pos;} + +private: + size_t m_Size; + off_t m_Pos; + + // this void* is handle of archive . I'm sorry it is void and not proper + // type but I don't want to make unzip.h header public. + void *m_Archive; }; @@ -55,20 +57,3 @@ class WXDLLEXPORT wxZipInputStream : public wxInputStream #endif // __ZIPSTREAM_H__ - - - - - - - - - - - - - - - - - diff --git a/lib/wx214.def b/lib/wx22.def similarity index 97% rename from lib/wx214.def rename to lib/wx22.def index ef24d22806..37001d56e1 100644 --- a/lib/wx214.def +++ b/lib/wx22.def @@ -1,11 +1,11 @@ -LIBRARY WX214 INITINSTANCE TERMINSTANCE +LIBRARY WX22 INITINSTANCE TERMINSTANCE PROTMODE DATA MULTIPLE NONSHARED READWRITE LOADONCALL CODE LOADONCALL EXPORTS -;From library: H:\dev\wx2\wxWindows\lib\wx.lib - ;From object file: dummydll.cpp +;From library: G:\DEV\WX22\WXWINDOWS\LIB\wx.lib + ;From object file: dummy.cpp ;PUBDEFs (Symbols available from object file): wxDummyChar ;From object file: ..\common\appcmn.cpp @@ -68,8 +68,6 @@ EXPORTS RemoveAt__14wxArrayOptionsFUi ;wxArrayParams::Insert(const wxCmdLineParam&,unsigned int) Insert__13wxArrayParamsFRC14wxCmdLineParamUi - ;wxArrayOptions::Empty() - Empty__14wxArrayOptionsFv ;wxCmdLineParserData::wxCmdLineParserData() __ct__19wxCmdLineParserDataFv ;wxCmdLineParser::SetCmdLine(const wxString&) @@ -84,6 +82,8 @@ EXPORTS Insert__14wxArrayOptionsFRC15wxCmdLineOptionUi ;wxArrayParams::Add(const wxCmdLineParam&) Add__13wxArrayParamsFRC14wxCmdLineParam + ;wxArrayParams::DoEmpty() + DoEmpty__13wxArrayParamsFv ;wxArrayOptions::~wxArrayOptions() __dt__14wxArrayOptionsFv ;wxCmdLineParser::Usage() @@ -106,12 +106,12 @@ EXPORTS __dt__15wxCmdLineParserFv ;wxArrayParams::~wxArrayParams() __dt__13wxArrayParamsFv - ;wxArrayParams::Empty() - Empty__13wxArrayParamsFv ;wxArrayParams::operator=(const wxArrayParams&) __as__13wxArrayParamsFRC13wxArrayParams ;wxCmdLineParser::AddOption(const wxString&,const wxString&,const wxString&,wxCmdLineParamType,int) AddOption__15wxCmdLineParserFRC8wxStringN2118wxCmdLineParamTypei + ;wxArrayOptions::DoEmpty() + DoEmpty__14wxArrayOptionsFv ;wxCmdLineParser::GetParamCount() const GetParamCount__15wxCmdLineParserCFv ;wxArrayOptions::DoCopy(const wxArrayOptions&) @@ -197,6 +197,8 @@ EXPORTS __ct__21wxPageSetupDialogDataFRC21wxPageSetupDialogData ;wxColourData::wxColourData(const wxColourData&) __ct__12wxColourDataFRC12wxColourData + ;wxPrintData::operator=(const wxPrintSetupData&) + __as__11wxPrintDataFRC16wxPrintSetupData ;wxConstructorForwxPrintDialogData() wxConstructorForwxPrintDialogData__Fv ;wxPrintData::~wxPrintData() @@ -215,6 +217,8 @@ EXPORTS Read__12wxConfigBaseCFRC8wxStringPii ;wxConfigBase::Read(const wxString&,wxString*,const wxString&) const Read__12wxConfigBaseCFRC8wxStringP8wxStringT1 + ;wxConfigBase::~wxConfigBase() + __dt__12wxConfigBaseFv ;wxConfigPathChanger::~wxConfigPathChanger() __dt__19wxConfigPathChangerFv ;wxConfigBase::Read(const wxString&,unsigned long*) const @@ -315,6 +319,12 @@ EXPORTS __dt__15wxDateTimeArrayFv ;wxDateTime::operator+=(const wxDateSpan&) __apl__10wxDateTimeFRC10wxDateSpan + ;wxTimeSpan::Subtract(const wxTimeSpan&) + Subtract__10wxTimeSpanFRC10wxTimeSpan + ;wxDateTime::Subtract(const wxDateSpan&) + Subtract__10wxDateTimeFRC10wxDateSpan + ;wxDateTime::Subtract(const wxDateSpan&) const + Subtract__10wxDateTimeCFRC10wxDateSpan ;wxDateTime::ResetTime() ResetTime__10wxDateTimeFv ;wxDateTime::Now() @@ -329,6 +339,8 @@ EXPORTS GetDays__10wxTimeSpanCFv ;wxDateTime::GetCurrentMonth(wxDateTime::Calendar) GetCurrentMonth__10wxDateTimeFQ2_10wxDateTime8Calendar + ;wxDateTimeArray::DoEmpty() + DoEmpty__15wxDateTimeArrayFv ;wxDateTime::Add(const wxTimeSpan&) const Add__10wxDateTimeCFRC10wxTimeSpan ;wxDateTime::SetMinute(unsigned short) @@ -341,8 +353,6 @@ EXPORTS __ct__10wxTimeSpanFlN31 ;wxDateTime::Tm::Tm(const tm&,const wxDateTime::TimeZone&) __ct__Q2_10wxDateTime2TmFRC2tmRCQ2_10wxDateTime8TimeZone - ;wxDateTime::Substract(const wxDateTime&) const - Substract__10wxDateTimeCFRC10wxDateTime ;wxDateTime::SetYear(int) SetYear__10wxDateTimeFi ;wxDateTime::SetToLastMonthDay(wxDateTime::Month,int) @@ -359,18 +369,20 @@ EXPORTS GetDayOfYear__10wxDateTimeCFRCQ2_10wxDateTime8TimeZone ;wxDateTime::GetCentury(int) GetCentury__10wxDateTimeFi - ;wxTimeSpan::Substract(const wxTimeSpan&) - Substract__10wxTimeSpanFRC10wxTimeSpan - ;wxDateTime::Tm::Tm() - __ct__Q2_10wxDateTime2TmFv ;wxDateTime::SetToWeekDay(wxDateTime::WeekDay,int,wxDateTime::Month,int) SetToWeekDay__10wxDateTimeFQ2_10wxDateTime7WeekDayiQ2_10wxDateTime5MonthT2 + ;wxDateTime::Tm::Tm() + __ct__Q2_10wxDateTime2TmFv + ;wxDateTime::Subtract(const wxTimeSpan&) + Subtract__10wxDateTimeFRC10wxTimeSpan ;wxDateTime::GetNumberOfDays(wxDateTime::Month,int,wxDateTime::Calendar) GetNumberOfDays__10wxDateTimeFQ2_10wxDateTime5MonthiQ2_10wxDateTime8Calendar ;wxTimeSpan::GetHours() const GetHours__10wxTimeSpanCFv ;wxDateTime::GetCurrentYear(wxDateTime::Calendar) GetCurrentYear__10wxDateTimeFQ2_10wxDateTime8Calendar + ;wxDateSpan::Add(const wxDateSpan&) + Add__10wxDateSpanFRC10wxDateSpan ;wxDateTime::SetDay(unsigned short) SetDay__10wxDateTimeFUs ;wxDateTime::SetHour(unsigned short) @@ -425,10 +437,6 @@ EXPORTS AddMonths__Q2_10wxDateTime2TmFi ;wxDateTime::TimeZone::TimeZone(wxDateTime::TZ) __ct__Q2_10wxDateTime8TimeZoneFQ2_10wxDateTime2TZ - ;wxDateTime::Substract(const wxTimeSpan&) const - Substract__10wxDateTimeCFRC10wxTimeSpan - ;wxDateTime::Substract(const wxDateSpan&) const - Substract__10wxDateTimeCFRC10wxDateSpan ;wxDateSpan::Neg() Neg__10wxDateSpanFv ;wxDateTime::IsLeapYear(int,wxDateTime::Calendar) @@ -443,8 +451,8 @@ EXPORTS GetNumberOfDays__10wxDateTimeFiQ2_10wxDateTime8Calendar ;wxDateTime::GetCountry() GetCountry__10wxDateTimeFv - ;wxDateTimeArray::Empty() - Empty__15wxDateTimeArrayFv + ;wxDateSpan::Add(const wxDateSpan&) const + Add__10wxDateSpanCFRC10wxDateSpan ;wxDateTime::ParseRfc822Date(const char*) ParseRfc822Date__10wxDateTimeFPCc ;wxDateTime::ParseTime(const char*) @@ -454,6 +462,8 @@ EXPORTS __vft18wxDateTimeWorkDays26wxDateTimeHolidayAuthority ;wxDateTime::TIME_T_FACTOR TIME_T_FACTOR__10wxDateTime + ;wxDateTime::Subtract(const wxDateTime&) const + Subtract__10wxDateTimeCFRC10wxDateTime ;wxDateTime::SetToWeekDayInSameWeek(wxDateTime::WeekDay) SetToWeekDayInSameWeek__10wxDateTimeFQ2_10wxDateTime7WeekDay ;wxDateTime::SetToTheWeek(unsigned short,wxDateTime::WeekDay) @@ -480,8 +490,12 @@ EXPORTS __apl__10wxDateTimeFRC10wxTimeSpan ;wxDateTime::operator-=(const wxDateSpan&) __ami__10wxDateTimeFRC10wxDateSpan - ;wxDateTime::Substract(const wxDateSpan&) - Substract__10wxDateTimeFRC10wxDateSpan + ;wxDateSpan::operator-=(const wxDateSpan&) + __ami__10wxDateSpanFRC10wxDateSpan + ;wxTimeSpan::Subtract(const wxTimeSpan&) const + Subtract__10wxTimeSpanCFRC10wxTimeSpan + ;wxDateSpan::Subtract(const wxDateSpan&) const + Subtract__10wxDateSpanCFRC10wxDateSpan ;wxDateTime::SetToCurrent() SetToCurrent__10wxDateTimeFv ;wxDateSpan::Negate() const @@ -541,12 +555,14 @@ EXPORTS __apl__10wxDateSpanFRC10wxDateSpan ;wxDateTime::operator-=(const wxTimeSpan&) __ami__10wxDateTimeFRC10wxTimeSpan + ;wxDateTime::UNow() + UNow__10wxDateTimeFv ;wxDateTime::Today() Today__10wxDateTimeFv - ;wxTimeSpan::Substract(const wxTimeSpan&) const - Substract__10wxTimeSpanCFRC10wxTimeSpan - ;wxDateTime::Substract(const wxTimeSpan&) - Substract__10wxDateTimeFRC10wxTimeSpan + ;wxDateTime::Subtract(const wxTimeSpan&) const + Subtract__10wxDateTimeCFRC10wxTimeSpan + ;wxDateSpan::Subtract(const wxDateSpan&) + Subtract__10wxDateSpanFRC10wxDateSpan ;wxDateTime::IsEqualUpTo(const wxDateTime&,const wxTimeSpan&) const IsEqualUpTo__10wxDateTimeCFRC10wxDateTimeRC10wxTimeSpan ;wxDateTime::GetWeekDay(wxDateTime::WeekDay,int,wxDateTime::Month,int) const @@ -561,12 +577,12 @@ EXPORTS Add__10wxDateTimeFRC10wxDateSpan ;wxTimeSpan::Abs() const Abs__10wxTimeSpanCFv - ;wxTimeSpan::Format(const char*) const - Format__10wxTimeSpanCFPCc - ;wxDateTime::SetToYearDay(unsigned short) - SetToYearDay__10wxDateTimeFUs ;wxDateTime::GetYearDay(unsigned short) const GetYearDay__10wxDateTimeCFUs + ;wxDateTime::SetToYearDay(unsigned short) + SetToYearDay__10wxDateTimeFUs + ;wxTimeSpan::Format(const char*) const + Format__10wxTimeSpanCFPCc ;From object file: ..\common\datstrm.cpp ;PUBDEFs (Symbols available from object file): ;wxDataOutputStream::operator<<(unsigned int) @@ -1158,6 +1174,8 @@ EXPORTS ;wxLibrary::PrepareClasses(wxClassInfo*) PrepareClasses__9wxLibraryFP11wxClassInfo __vft9wxLibrary8wxObject + ;wxDllLoader::GetDllExt() + GetDllExt__11wxDllLoaderFv ;wxLibraries::LoadLibrary(const wxString&) LoadLibrary__11wxLibrariesFRC8wxString wxTheLibraries @@ -1167,14 +1185,20 @@ EXPORTS GetAllEquivalents__19wxEncodingConverterF14wxFontEncoding ;wxEncodingConverter::wxEncodingConverter() __ct__19wxEncodingConverterFv + ;wxEncodingConverter::Convert(const char*,wchar_t*) + Convert__19wxEncodingConverterFPCcPw ;wxEncodingConverter::Init(wxFontEncoding,wxFontEncoding,int) Init__19wxEncodingConverterF14wxFontEncodingT1i + ;wxEncodingConverter::Convert(const wchar_t*,char*) + Convert__19wxEncodingConverterFPCwPc ;wxEncodingConverter::Convert(const wxString&) Convert__19wxEncodingConverterFRC8wxString ;wxEncodingConverter::GetPlatformEquivalents(wxFontEncoding,int) GetPlatformEquivalents__19wxEncodingConverterF14wxFontEncodingi ;wxEncodingConverter::Convert(const char*,char*) Convert__19wxEncodingConverterFPCcPc + ;wxEncodingConverter::Convert(const wchar_t*,wchar_t*) + Convert__19wxEncodingConverterFPCwPw ;From object file: ..\common\event.cpp ;PUBDEFs (Symbols available from object file): ;wxEvent::CopyObject(wxObject&) const @@ -1411,7 +1435,7 @@ EXPORTS wxConstructorForwxFocusEvent__Fv ;wxEvtHandler::sm_eventTable sm_eventTable__12wxEvtHandler - ;From object file: H:\DEV\WX2\WXWINDOWS\src\common\extended.c + ;From object file: G:\DEV\WX22\WXWINDOWS\src\common\extended.c ;PUBDEFs (Symbols available from object file): ConvertToIeeeExtended ConvertFromIeeeExtended @@ -1814,6 +1838,8 @@ EXPORTS CreateToolBar__11wxFrameBaseFliRC8wxString ;wxFrameBase::OnMenuHighlight(wxMenuEvent&) OnMenuHighlight__11wxFrameBaseFR11wxMenuEvent + ;wxFrameBase::ShowMenuHelp(wxStatusBar*,int) + ShowMenuHelp__11wxFrameBaseFP11wxStatusBari ;wxFrameBase::GetEventTable() const GetEventTable__11wxFrameBaseCFv __vft11wxFrameBase8wxObject @@ -1929,6 +1955,8 @@ EXPORTS SendCommand__5wxFTPFRC8wxStringc ;wxFTP::GetOutputStream(const wxString&) GetOutputStream__5wxFTPFRC8wxString + ;wxFTP::GetList(wxArrayString&,const wxString&) + GetList__5wxFTPFR13wxArrayStringRC8wxString ;wxFTP::sm_classwxFTP sm_classwxFTP__5wxFTP ;From object file: ..\common\gdicmn.cpp @@ -2212,6 +2240,8 @@ EXPORTS ;PUBDEFs (Symbols available from object file): ;wxBMPHandler::sm_classwxBMPHandler sm_classwxBMPHandler__12wxBMPHandler + ;wxBMPHandler::SaveFile(wxImage*,wxOutputStream&,unsigned long) + SaveFile__12wxBMPHandlerFP7wxImageR14wxOutputStreamUl ;wxConstructorForwxBMPHandler() wxConstructorForwxBMPHandler__Fv ;wxBMPHandler::LoadFile(wxImage*,wxInputStream&,unsigned long,int) @@ -2221,6 +2251,8 @@ EXPORTS __vft12wxBMPHandler8wxObject ;From object file: ..\common\image.cpp ;PUBDEFs (Symbols available from object file): + ;wxImage::wxImage(int,int,unsigned char*,unsigned long) + __ct__7wxImageFiT1PUcUl ;wxImage::GetSubImage(const wxRect&) const GetSubImage__7wxImageCFRC6wxRect ;wxImage::FindHandler(long) @@ -2233,6 +2265,10 @@ EXPORTS __ct__7wxImageFiT1 ;wxImageModule::sm_classwxImageModule sm_classwxImageModule__13wxImageModule + ;wxImage::GetRed(int,int) const + GetRed__7wxImageCFiT1 + ;wxImage::GetGreen(int,int) const + GetGreen__7wxImageCFiT1 ;wxConstructorForwxImage() wxConstructorForwxImage__Fv ;wxImage::Ok() const @@ -2247,11 +2283,15 @@ EXPORTS GetData__7wxImageCFv ;wxImage::Destroy() Destroy__7wxImageFv + ;wxImage::Copy() const + Copy__7wxImageCFv ;wxImage::FindHandlerMime(const wxString&) FindHandlerMime__7wxImageFRC8wxString + ;wxImage::Mirror(unsigned long) const + Mirror__7wxImageCFUl + __vft14wxImageHandler8wxObject ;wxImage::LoadFile(const wxString&,long) LoadFile__7wxImageFRC8wxStringl - __vft14wxImageHandler8wxObject ;wxImage::Scale(int,int) const Scale__7wxImageCFiT1 ;wxImage::sm_handlers @@ -2291,6 +2331,8 @@ EXPORTS wxConstructorForwxImageModule__Fv ;wxImage::wxImage() __ct__7wxImageFv + ;wxImage::Paste(const wxImage&,int,int) + Paste__7wxImageFRC7wxImageiT2 ;wxImage::HasMask() const HasMask__7wxImageCFv ;wxImage::GetMaskRed() const @@ -2301,10 +2343,14 @@ EXPORTS RemoveHandler__7wxImageFRC8wxString ;wxImage::FindHandler(const wxString&) FindHandler__7wxImageFRC8wxString + ;wxImage::Create(int,int,unsigned char*,unsigned long) + Create__7wxImageFiT1PUcUl ;wxImage::wxImage(wxInputStream&,long) __ct__7wxImageFR13wxInputStreaml ;wxImage::SetMask(unsigned long) SetMask__7wxImageFUl + ;wxImage::Rotate90(unsigned long) const + Rotate90__7wxImageCFUl ;wxImage::Create(int,int) Create__7wxImageFiT1 __vft14wxImageRefData15wxObjectRefData @@ -2314,10 +2360,10 @@ EXPORTS SetMaskColour__7wxImageFUcN21 ;wxImageHandler::GetImageCount(wxInputStream&) GetImageCount__14wxImageHandlerFR13wxInputStream - ;wxImage::GetGreen(int,int) - GetGreen__7wxImageFiT1 ;wxImage::ConvertToBitmap() const ConvertToBitmap__7wxImageCFv + ;wxImage::SetData(unsigned char*,int,int) + SetData__7wxImageFPUciT2 ;wxImage::GetMaskBlue() const GetMaskBlue__7wxImageCFv ;wxImage::GetHeight() const @@ -2334,14 +2380,12 @@ EXPORTS SaveFile__14wxImageHandlerFP7wxImageR14wxOutputStreamUl ;wxImage::LoadFile(wxInputStream&,long) LoadFile__7wxImageFR13wxInputStreaml - ;wxImage::GetRed(int,int) - GetRed__7wxImageFiT1 + ;wxImage::GetBlue(int,int) const + GetBlue__7wxImageCFiT1 ;wxImage::sm_classwxImage sm_classwxImage__7wxImage ;wxImage::SaveFile(const wxString&,const wxString&) SaveFile__7wxImageFRC8wxStringT1 - ;wxImage::GetBlue(int,int) - GetBlue__7wxImageFiT1 ;wxImage::ComputeHistogram(wxHashTable&) ComputeHistogram__7wxImageFR11wxHashTable ;wxImage::CanRead(wxInputStream&) @@ -2448,8 +2492,6 @@ EXPORTS AddCatalog__8wxLocaleFPCc ;wxMsgCatalog::Load(const char*,const char*,unsigned long) Load__12wxMsgCatalogFPCcT1Ul - ;wxSuppressTransErrors() - wxSuppressTransErrors__Fv ;wxLocale::wxLocale() __ct__8wxLocaleFv ;wxLocale::Init(const char*,const char*,const char*,unsigned long,unsigned long) @@ -2458,14 +2500,12 @@ EXPORTS GetString__8wxLocaleCFPCcT1 ;wxGetLocale() wxGetLocale__Fv + ;NoTransErr::ms_suppressCount + ms_suppressCount__10NoTransErr ;wxMsgCatalog::GetString(const char*) const GetString__12wxMsgCatalogCFPCc ;wxLocale::FindCatalog(const char*) const FindCatalog__8wxLocaleCFPCc - ;wxRestoreTransErrors() - wxRestoreTransErrors__Fv - ;wxIsLoggingTransErrors() - wxIsLoggingTransErrors__Fv ;wxLocale::AddCatalogLookupPathPrefix(const wxString&) AddCatalogLookupPathPrefix__8wxLocaleFRC8wxString ;wxLocale::IsLoaded(const char*) const @@ -2819,8 +2859,6 @@ EXPORTS debugOn__14wxDebugContext ;wxDebugContext::checkPoint checkPoint__14wxDebugContext - ;operator new(unsigned int,char*,int) - __nw__FUiPci ;wxDebugContext::PaddedSize(const unsigned int) PaddedSize__14wxDebugContextFCUi ;wxMemStruct::AssertIt() @@ -2843,8 +2881,6 @@ EXPORTS m_balign__14wxDebugContext ;wxDebugContext::EndMarkerPos(const char*,const unsigned int) EndMarkerPos__14wxDebugContextFPCcCUi - ;operator new(unsigned int) - __nw__FUi ;wxMemStruct::AssertList() AssertList__11wxMemStructFv ;wxMemStruct::ErrorMsg(const char*) @@ -2871,10 +2907,6 @@ EXPORTS GetPadding__14wxDebugContextFCUi ;wxTrace(const char*,...) wxTrace__FPCce - ;operator new[](unsigned int,char*,int) - __vn__FUiPci - ;operator new[](unsigned int) - __vn__FUi ;wxDebugContext::TotSize(const unsigned int) TotSize__14wxDebugContextFCUi ;wxMemStruct::PrintNode() @@ -2893,8 +2925,6 @@ EXPORTS m_head__14wxDebugContext ;wxMemStruct::Append() Append__11wxMemStructFv - ;operator delete[](void*) - __vd__FPv ;wxDebugContext::Dump() Dump__14wxDebugContextFv ;From object file: ..\common\menucmn.cpp @@ -2915,12 +2945,12 @@ EXPORTS FindMenu__13wxMenuBarBaseCFRC8wxString ;wxMenuBarBase::SetHelpString(int,const wxString&) SetHelpString__13wxMenuBarBaseFiRC8wxString + ;wxMenuBase::Insert(unsigned int,wxMenuItem*) + Insert__10wxMenuBaseFUiP10wxMenuItem ;wxMenuBase::Remove(wxMenuItem*) Remove__10wxMenuBaseFP10wxMenuItem ;wxMenuBase::IsChecked(int) const IsChecked__10wxMenuBaseCFi - ;wxMenuBase::Insert(unsigned int,wxMenuItem*) - Insert__10wxMenuBaseFUiP10wxMenuItem ;wxMenuBarBase::GetLabel(int) const GetLabel__13wxMenuBarBaseCFi ;wxMenuBase::GetLabel(int) const @@ -3010,9 +3040,11 @@ EXPORTS ExpandCommand__10wxFileTypeFRC8wxStringRCQ2_10wxFileType17MessageParameters ;wxMimeTypesManager::IsOfType(const wxString&,const wxString&) IsOfType__18wxMimeTypesManagerFRC8wxStringT1 + ;wxArrayFileTypeInfo::DoEmpty() + DoEmpty__19wxArrayFileTypeInfoFv + wxTheMimeTypesManager ;wxArrayFileTypeInfo::~wxArrayFileTypeInfo() __dt__19wxArrayFileTypeInfoFv - wxTheMimeTypesManager ;wxFileType::wxFileType() __ct__10wxFileTypeFv ;wxFileType::GetIcon(wxIcon*) const @@ -3041,14 +3073,12 @@ EXPORTS RemoveAt__19wxArrayFileTypeInfoFUi ;wxMimeTypeCmnModule::sm_classwxMimeTypeCmnModule sm_classwxMimeTypeCmnModule__19wxMimeTypeCmnModule - ;wxArrayFileTypeInfo::Empty() - Empty__19wxArrayFileTypeInfoFv + ;wxMimeTypesManager::wxMimeTypesManager() + __ct__18wxMimeTypesManagerFv ;wxConstructorForwxMimeTypeCmnModule() wxConstructorForwxMimeTypeCmnModule__Fv ;wxMimeTypesManager::~wxMimeTypesManager() __dt__18wxMimeTypesManagerFv - ;wxMimeTypesManager::wxMimeTypesManager() - __ct__18wxMimeTypesManagerFv ;wxArrayFileTypeInfo::operator=(const wxArrayFileTypeInfo&) __as__19wxArrayFileTypeInfoFRC19wxArrayFileTypeInfo ;wxFileType::GetOpenCommand(wxString*,const wxFileType::MessageParameters&) const @@ -3125,8 +3155,6 @@ EXPORTS StoreObject__8wxObjectFR20wxObjectOutputStream ;wxObjectRefData::~wxObjectRefData() __dt__15wxObjectRefDataFv - ;wxObject::operator delete[](void*) - __vd__8wxObjectFPv ;wxObject::Clone() const Clone__8wxObjectCFv ;wxClassInfo::sm_first @@ -3150,8 +3178,6 @@ EXPORTS sm_classwxObject__8wxObject ;wxObject::operator new(unsigned int,char*,int) __nw__8wxObjectFUiPci - ;wxObject::operator new[](unsigned int,char*,int) - __vn__8wxObjectFUiPci ;wxObject::wxObject() __ct__8wxObjectFv ;wxObject::~wxObject() @@ -3198,6 +3224,7 @@ EXPORTS ReadObjectDef__19wxObjectInputStreamFP18wxObjectStreamInfo ;wxObjectInputStream::RemoveChildren(int) RemoveChildren__19wxObjectInputStreamFi + ;From object file: ..\common\odbc.cpp ;From object file: ..\common\paper.cpp ;PUBDEFs (Symbols available from object file): __vft18wxPrintPaperModule8wxObject @@ -3281,6 +3308,8 @@ EXPORTS __vft10wxPrintout8wxObject ;wxPrintout::HasPage(int) HasPage__10wxPrintoutFi + ;wxPrinterBase::sm_lastError + sm_lastError__13wxPrinterBase ;wxPrinterBase::sm_abortWindow sm_abortWindow__13wxPrinterBase ;wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout*,wxPrintout*,wxPrintDialogData*) @@ -3389,13 +3418,13 @@ EXPORTS PaintPage__18wxPrintPreviewBaseFP8wxWindowR4wxDC ;From object file: ..\common\process.cpp ;PUBDEFs (Symbols available from object file): + ;wxProcess::SetPipeStreams(wxInputStream*,wxOutputStream*,wxInputStream*) + SetPipeStreams__9wxProcessFP13wxInputStreamP14wxOutputStreamT1 ;wxConstructorForwxProcess() wxConstructorForwxProcess__Fv ;wxProcess::Init(wxEvtHandler*,int,unsigned long) Init__9wxProcessFP12wxEvtHandleriUl __vft9wxProcess8wxObject - ;wxProcess::SetPipeStreams(wxInputStream*,wxOutputStream*) - SetPipeStreams__9wxProcessFP13wxInputStreamP14wxOutputStream ;wxProcess::~wxProcess() __dt__9wxProcessFv ;wxConstructorForwxProcessEvent() @@ -3410,25 +3439,21 @@ EXPORTS Detach__9wxProcessFv ;From object file: ..\common\protocol.cpp ;PUBDEFs (Symbols available from object file): - __vft16wxProtocolModule8wxObject ;wxProtocol::wxProtocol() __ct__10wxProtocolFv ;wxProtocol::Reconnect() Reconnect__10wxProtocolFv - ;wxProtocolModule::OnInit() - OnInit__16wxProtocolModuleFv - ;wxProtocolModule::OnExit() - OnExit__16wxProtocolModuleFv + ;wxProtocol::ReadLine(wxString&) + ReadLine__10wxProtocolFR8wxString ;wxProtocol::sm_classwxProtocol sm_classwxProtocol__10wxProtocol - ;wxConstructorForwxProtocolModule() - wxConstructorForwxProtocolModule__Fv + __vft10wxProtocol8wxObject ;wxProtoInfo::wxProtoInfo(const char*,const char*,const unsigned long,wxClassInfo*) __ct__11wxProtoInfoFPCcT1CUlP11wxClassInfo ;GetLine(wxSocketBase*,wxString&) GetLine__FP12wxSocketBaseR8wxString - ;wxProtocolModule::sm_classwxProtocolModule - sm_classwxProtocolModule__16wxProtocolModule + ;wxProtocol::ReadLine(wxSocketBase*,wxString&) + ReadLine__10wxProtocolFP12wxSocketBaseR8wxString ;From object file: ..\common\resource.cpp ;PUBDEFs (Symbols available from object file): ;wxResourceTable::ParseResourceFile(wxInputStream*) @@ -3621,14 +3646,16 @@ EXPORTS Advise__15wxTCPConnectionFRC8wxStringPci11wxIPCFormat ;wxTCPClient::wxTCPClient() __ct__11wxTCPClientFv + ;wxTCPEventHandler::sm_eventTableEntries + sm_eventTableEntries__17wxTCPEventHandler ;wxTCPServer::sm_classwxTCPServer sm_classwxTCPServer__11wxTCPServer - ;Client_OnRequest(wxSocketBase&,wxSocketNotify,char*) - Client_OnRequest__FR12wxSocketBase14wxSocketNotifyPc ;wxTCPClient::sm_classwxTCPClient sm_classwxTCPClient__11wxTCPClient ;wxConstructorForwxTCPServer() wxConstructorForwxTCPServer__Fv + ;wxConstructorForwxTCPEventHandlerModule() + wxConstructorForwxTCPEventHandlerModule__Fv ;wxTCPServer::~wxTCPServer() __dt__11wxTCPServerFv ;wxTCPConnection::Disconnect() @@ -3637,34 +3664,43 @@ EXPORTS ValidHost__11wxTCPClientFRC8wxString ;wxTCPConnection::StartAdvise(const wxString&) StartAdvise__15wxTCPConnectionFRC8wxString - ;Server_OnRequest(wxSocketServer&,wxSocketNotify,char*) - Server_OnRequest__FR14wxSocketServer14wxSocketNotifyPc ;wxTCPServer::OnAcceptConnection(const wxString&) OnAcceptConnection__11wxTCPServerFRC8wxString ;wxTCPServer::Create(const wxString&) Create__11wxTCPServerFRC8wxString ;wxTCPConnection::Poke(const wxString&,char*,int,wxIPCFormat) Poke__15wxTCPConnectionFRC8wxStringPci11wxIPCFormat + ;wxTCPEventHandler::Client_OnRequest(wxSocketEvent&) + Client_OnRequest__17wxTCPEventHandlerFR13wxSocketEvent ;wxTCPClient::MakeConnection(const wxString&,const wxString&,const wxString&) MakeConnection__11wxTCPClientFRC8wxStringN21 + ;wxTCPEventHandlerModule::sm_classwxTCPEventHandlerModule + sm_classwxTCPEventHandlerModule__23wxTCPEventHandlerModule ;wxTCPConnection::wxTCPConnection(char*,int) __ct__15wxTCPConnectionFPci ;wxTCPServer::wxTCPServer() __ct__11wxTCPServerFv ;wxConstructorForwxTCPClient() wxConstructorForwxTCPClient__Fv + ;wxTCPEventHandler::sm_eventTable + sm_eventTable__17wxTCPEventHandler ;wxTCPConnection::~wxTCPConnection() __dt__15wxTCPConnectionFv ;wxTCPConnection::Execute(const char*,int,wxIPCFormat) Execute__15wxTCPConnectionFPCci11wxIPCFormat + __vft17wxTCPEventHandler8wxObject ;wxTCPConnection::Request(const wxString&,int*,wxIPCFormat) Request__15wxTCPConnectionFRC8wxStringPi11wxIPCFormat ;wxTCPConnection::wxTCPConnection() __ct__15wxTCPConnectionFv ;wxTCPConnection::sm_classwxTCPConnection sm_classwxTCPConnection__15wxTCPConnection + ;wxTCPEventHandler::GetEventTable() const + GetEventTable__17wxTCPEventHandlerCFv ;wxTCPConnection::StopAdvise(const wxString&) StopAdvise__15wxTCPConnectionFRC8wxString + ;wxTCPEventHandler::Server_OnRequest(wxSocketEvent&) + Server_OnRequest__17wxTCPEventHandlerFR13wxSocketEvent __vft11wxTCPClient8wxObject ;wxTCPClient::~wxTCPClient() __dt__11wxTCPClientFv @@ -3720,26 +3756,42 @@ EXPORTS ;PUBDEFs (Symbols available from object file): ;wxSizerItem::wxSizerItem(int,int,int,int,int,wxObject*) __ct__11wxSizerItemFiN41P8wxObject + __vft11wxGridSizer8wxObject ;wxSizerItem::wxSizerItem(wxSizer*,int,int,int,wxObject*) __ct__11wxSizerItemFP7wxSizeriN22P8wxObject ;wxSizer::Insert(int,wxSizer*,int,int,int,wxObject*) Insert__7wxSizerFiP7wxSizerN31P8wxObject ;wxSizer::Add(wxWindow*,int,int,int,wxObject*) Add__7wxSizerFP8wxWindowiN22P8wxObject + ;wxSizer::DoSetItemMinSize(int,int,int) + DoSetItemMinSize__7wxSizerFiN21 ;wxStaticBoxSizer::wxStaticBoxSizer(wxStaticBox*,int) __ct__16wxStaticBoxSizerFP11wxStaticBoxi - ;wxBoxSizer::CalcMin() - CalcMin__10wxBoxSizerFv + ;wxGridSizer::wxGridSizer(int,int,int) + __ct__11wxGridSizerFiN21 + ;wxSizer::DoSetItemMinSize(wxWindow*,int,int) + DoSetItemMinSize__7wxSizerFP8wxWindowiT2 ;wxStaticBoxSizer::sm_classwxStaticBoxSizer sm_classwxStaticBoxSizer__16wxStaticBoxSizer + ;wxGridSizer::sm_classwxGridSizer + sm_classwxGridSizer__11wxGridSizer + ;wxFlexGridSizer::RecalcSizes() + RecalcSizes__15wxFlexGridSizerFv + ;wxGridSizer::RecalcSizes() + RecalcSizes__11wxGridSizerFv ;wxStaticBoxSizer::CalcMin() CalcMin__16wxStaticBoxSizerFv + ;wxFlexGridSizer::CalcMin() + CalcMin__15wxFlexGridSizerFv + ;wxBoxSizer::CalcMin() + CalcMin__10wxBoxSizerFv ;wxSizer::Fit(wxWindow*) Fit__7wxSizerFP8wxWindow ;wxSizer::GetMinWindowSize(wxWindow*) GetMinWindowSize__7wxSizerFP8wxWindow ;wxSizer::Prepend(wxWindow*,int,int,int,wxObject*) Prepend__7wxSizerFP8wxWindowiN22P8wxObject + __vft15wxFlexGridSizer8wxObject __vft11wxSizerItem8wxObject ;wxSizer::Insert(int,wxWindow*,int,int,int,wxObject*) Insert__7wxSizerFiP8wxWindowN31P8wxObject @@ -3749,6 +3801,12 @@ EXPORTS SetDimension__11wxSizerItemF7wxPoint6wxSize ;wxSizerItem::sm_classwxSizerItem sm_classwxSizerItem__11wxSizerItem + ;wxFlexGridSizer::wxFlexGridSizer(int,int,int) + __ct__15wxFlexGridSizerFiN21 + ;wxGridSizer::wxGridSizer(int,int,int,int) + __ct__11wxGridSizerFiN31 + ;wxFlexGridSizer::RemoveGrowableRow(unsigned int) + RemoveGrowableRow__15wxFlexGridSizerFUi ;wxSizer::~wxSizer() __dt__7wxSizerFv ;wxSizer::sm_classwxSizer @@ -3768,26 +3826,38 @@ EXPORTS __vft7wxSizer8wxObject ;wxSizer::Remove(int) Remove__7wxSizerFi - ;wxSizerItem::IsSpacer() - IsSpacer__11wxSizerItemFv + ;wxSizer::GetMinSize() + GetMinSize__7wxSizerFv + ;wxFlexGridSizer::~wxFlexGridSizer() + __dt__15wxFlexGridSizerFv ;wxSizer::wxSizer() __ct__7wxSizerFv ;wxBoxSizer::RecalcSizes() RecalcSizes__10wxBoxSizerFv + ;wxSizerItem::IsSpacer() + IsSpacer__11wxSizerItemFv + ;wxFlexGridSizer::CreateArrays() + CreateArrays__15wxFlexGridSizerFv ;wxSizer::SetSizeHints(wxWindow*) SetSizeHints__7wxSizerFP8wxWindow ;wxSizer::Add(wxSizer*,int,int,int,wxObject*) Add__7wxSizerFP7wxSizeriN22P8wxObject ;wxSizer::Prepend(int,int,int,int,int,wxObject*) Prepend__7wxSizerFiN41P8wxObject + ;wxFlexGridSizer::AddGrowableCol(unsigned int) + AddGrowableCol__15wxFlexGridSizerFUi ;wxBoxSizer::wxBoxSizer(int) __ct__10wxBoxSizerFi ;wxSizerItem::IsSizer() IsSizer__11wxSizerItemFv + ;wxFlexGridSizer::sm_classwxFlexGridSizer + sm_classwxFlexGridSizer__15wxFlexGridSizer ;wxBoxSizer::sm_classwxBoxSizer sm_classwxBoxSizer__10wxBoxSizer ;wxSizer::Remove(wxSizer*) Remove__7wxSizerFP7wxSizer + ;wxSizer::DoSetItemMinSize(wxSizer*,int,int) + DoSetItemMinSize__7wxSizerFP7wxSizeriT2 ;wxSizerItem::wxSizerItem(wxWindow*,int,int,int,wxObject*) __ct__11wxSizerItemFP8wxWindowiN22P8wxObject __vft16wxStaticBoxSizer8wxObject @@ -3798,8 +3868,20 @@ EXPORTS Add__7wxSizerFiN41P8wxObject ;wxSizer::SetDimension(int,int,int,int) SetDimension__7wxSizerFiN31 + ;wxFlexGridSizer::wxFlexGridSizer(int,int,int,int) + __ct__15wxFlexGridSizerFiN31 + ;wxFlexGridSizer::RemoveGrowableCol(unsigned int) + RemoveGrowableCol__15wxFlexGridSizerFUi + ;wxSizer::DoSetMinSize(int,int) + DoSetMinSize__7wxSizerFiT1 + ;wxFlexGridSizer::AddGrowableRow(unsigned int) + AddGrowableRow__15wxFlexGridSizerFUi ;wxSizer::Layout() Layout__7wxSizerFv + ;wxGridSizer::SetItemBounds(wxSizerItem*,int,int,int,int) + SetItemBounds__11wxGridSizerFP11wxSizerItemiN32 + ;wxGridSizer::CalcMin() + CalcMin__11wxGridSizerFv ;From object file: ..\common\socket.cpp ;PUBDEFs (Symbols available from object file): ;wxSocketBase::SetTimeout(long) @@ -3887,12 +3969,8 @@ EXPORTS __ct__12wxSocketBaseFv ;wxConstructorForwxSocketModule() wxConstructorForwxSocketModule__Fv - ;wxSocketBase::Callback(void(*)(wxSocketBase&,wxSocketNotify,char*)) - Callback__12wxSocketBaseFPFR12wxSocketBase14wxSocketNotifyPc_v ;wxSocketBase::GetPeer(wxSockAddress&) const GetPeer__12wxSocketBaseCFR13wxSockAddress - ;wxSocketBase::CallbackData(char*) - CallbackData__12wxSocketBaseFPc ;wxSocketBase::Notify(unsigned long) Notify__12wxSocketBaseFUl ;wxSocketServer::Accept(unsigned long) @@ -3923,27 +4001,17 @@ EXPORTS cMB2WC__8wxMBConvCFPCc ;wxCSConv::SetName(const char*) SetName__8wxCSConvFPCc - ;wxCSArray::Index(const wxCharacterSet&,unsigned long) const - Index__9wxCSArrayCFRC14wxCharacterSetUl ;wxMBConvUTF7::MB2WC(wchar_t*,const char*,unsigned int) const MB2WC__12wxMBConvUTF7CFPwPCcUi ;wxMBConvUTF8::WC2MB(char*,const wchar_t*,unsigned int) const WC2MB__12wxMBConvUTF8CFPcPCwUi - ;wxCSArray::RemoveAt(unsigned int) - RemoveAt__9wxCSArrayFUi ;wxMBConvUTF8::MB2WC(wchar_t*,const char*,unsigned int) const MB2WC__12wxMBConvUTF8CFPwPCcUi - ;wxCSArray::DoCopy(const wxCSArray&) - DoCopy__9wxCSArrayFRC9wxCSArray __vft12wxMBConvFile8wxMBConv __vft12wxMBConvUTF88wxMBConv wxConvCurrent ;wxMBConv::WC2MB(char*,const wchar_t*,unsigned int) const WC2MB__8wxMBConvCFPcPCwUi - ;wxCSArray::wxCSArray(const wxCSArray&) - __ct__9wxCSArrayFRC9wxCSArray - ;wxCSArray::Insert(const wxCharacterSet&,unsigned int) - Insert__9wxCSArrayFRC14wxCharacterSetUi ;wxCSConv::~wxCSConv() __dt__8wxCSConvFv wxConvUTF7 @@ -3952,8 +4020,6 @@ EXPORTS ;wxMBConvFile::MB2WC(wchar_t*,const char*,unsigned int) const MB2WC__12wxMBConvFileCFPwPCcUi wxConvFile - ;wxCSArray::operator=(const wxCSArray&) - __as__9wxCSArrayFRC9wxCSArray ;wxCSConv::WC2MB(char*,const wchar_t*,unsigned int) const WC2MB__8wxCSConvCFPcPCwUi ;wxMBConvUTF7::WC2MB(char*,const wchar_t*,unsigned int) const @@ -3962,19 +4028,13 @@ EXPORTS WC2MB__12wxMBConvFileCFPcPCwUi ;wxCSConv::MB2WC(wchar_t*,const char*,unsigned int) const MB2WC__8wxCSConvCFPwPCcUi - ;wxCSArray::~wxCSArray() - __dt__9wxCSArrayFv ;wxCSConv::LoadNow() LoadNow__8wxCSConvFv ;wxCSConv::wxCSConv(const char*) __ct__8wxCSConvFPCc wxConvLibc - ;wxCSArray::Add(const wxCharacterSet&) - Add__9wxCSArrayFRC14wxCharacterSet ;wxMBConv::MB2WC(wchar_t*,const char*,unsigned int) const MB2WC__8wxMBConvCFPwPCcUi - ;wxCSArray::Empty() - Empty__9wxCSArrayFv __vft8wxMBConv ;wxMBConv::cWC2MB(const wchar_t*) const cWC2MB__8wxMBConvCFPCw @@ -4224,8 +4284,6 @@ EXPORTS npos__8wxString ;operator+(const char*,const wxString&) __pl__FPCcRC8wxString - ;wxString::wxString(const wchar_t*) - __ct__8wxStringFPCw ;wxString::operator=(const unsigned char*) __as__8wxStringFPCUc ;wxArrayString::operator=(const wxArrayString&) @@ -4276,8 +4334,12 @@ EXPORTS insert__8wxStringFUiRC8wxString ;operator+(const wxString&,const char*) __pl__FRC8wxStringPCc + ;wxArrayString::operator==(const wxArrayString&) const + __eq__13wxArrayStringCFRC13wxArrayString ;wxString::operator=(const wchar_t*) __as__8wxStringFPCw + ;wxString::StartsWith(const char*,wxString*) const + StartsWith__8wxStringCFPCcP8wxString ;wxArrayString::Remove(const char*) Remove__13wxArrayStringFPCc ;wxString::ConcatSelf(int,const char*) @@ -4326,6 +4388,8 @@ EXPORTS rfind__8wxStringCFPCcUiT2 ;wxArrayString::~wxArrayString() __dt__13wxArrayStringFv + ;wxString::wxString(const wchar_t*,wxMBConv&) + __ct__8wxStringFPCwR8wxMBConv ;wxString::Lower() const Lower__8wxStringCFv ;wxArrayString::Free() @@ -4545,12 +4609,14 @@ EXPORTS ;wxTextInputStream::operator>>(unsigned int&) __rs__17wxTextInputStreamFRUi __vft18wxTextOutputStream - ;wxTextInputStream::operator>>(wxString&) - __rs__17wxTextInputStreamFR8wxString + ;wxTextInputStream::EatEOL(const char&) + EatEOL__17wxTextInputStreamFRCc ;wxTextInputStream::operator>>(short&) __rs__17wxTextInputStreamFRs ;wxTextInputStream::operator>>(unsigned short&) __rs__17wxTextInputStreamFRUs + ;wxTextInputStream::operator>>(wxString&) + __rs__17wxTextInputStreamFR8wxString ;wxTextOutputStream::operator<<(const wxString&) __ls__18wxTextOutputStreamFRC8wxString ;wxTextOutputStream::Write8(unsigned char) @@ -4607,7 +4673,7 @@ EXPORTS Read32__17wxTextInputStreamFv ;wxTextInputStream::SkipIfEndOfLine(char) SkipIfEndOfLine__17wxTextInputStreamFc - ;From object file: H:\DEV\WX2\WXWINDOWS\src\common\unzip.c + ;From object file: G:\DEV\WX22\WXWINDOWS\src\common\unzip.c ;PUBDEFs (Symbols available from object file): unzReadCurrentFile unzGetCurrentFileInfo @@ -4629,35 +4695,46 @@ EXPORTS ;PUBDEFs (Symbols available from object file): ;wxURL::PrepProto(wxString&) PrepProto__5wxURLFR8wxString - ;wxURL::ConvertToValidURI(const wxString&) - ConvertToValidURI__5wxURLFRC8wxString + ;wxURL::ConvertToValidURI(const wxString&,const char*) + ConvertToValidURI__5wxURLFRC8wxStringPCc ;wxURL::ConvertFromURI(const wxString&) ConvertFromURI__5wxURLFRC8wxString + ;wxURL::ms_protocols + ms_protocols__5wxURL + __vft11wxURLModule8wxObject + ;wxURLModule::sm_classwxURLModule + sm_classwxURLModule__11wxURLModule ;wxURL::SetProxy(const wxString&) SetProxy__5wxURLFRC8wxString ;wxProtoInfo::sm_classwxProtoInfo sm_classwxProtoInfo__11wxProtoInfo - ;wxURL::g_proxy - g_proxy__5wxURL + ;wxURL::ms_useDefaultProxy + ms_useDefaultProxy__5wxURL ;wxURL::ParseURL() ParseURL__5wxURLFv ;wxURL::~wxURL() __dt__5wxURLFv + ;wxURLModule::OnInit() + OnInit__11wxURLModuleFv ;wxURL::GetInputStream() GetInputStream__5wxURLFv ;wxURL::SetDefaultProxy(const wxString&) SetDefaultProxy__5wxURLFRC8wxString - ;wxURL::g_protocols - g_protocols__5wxURL ;wxURL::CleanData() CleanData__5wxURLFv + ;wxURLModule::OnExit() + OnExit__11wxURLModuleFv ;wxURL::PrepPath(wxString&) PrepPath__5wxURLFR8wxString ;wxURL::sm_classwxURL sm_classwxURL__5wxURL + ;wxURL::ms_proxyDefault + ms_proxyDefault__5wxURL __vft5wxURL8wxObject ;wxURL::FetchProtocol() FetchProtocol__5wxURLFv + ;wxConstructorForwxURLModule() + wxConstructorForwxURLModule__Fv ;wxURL::wxURL(const wxString&) __ct__5wxURLFRC8wxString ;wxURL::PrepHost(wxString&) @@ -4692,6 +4769,8 @@ EXPORTS wxMessageBox__FRC8wxStringT1lP8wxWindowiT5 ;wxNewId() wxNewId__Fv + ;wxExecute(const wxString&,wxArrayString&,wxArrayString&) + wxExecute__FRC8wxStringR13wxArrayStringT2 ;wxHexToDec(const wxString&) wxHexToDec__FRC8wxString ;wxExecute(const wxString&,wxArrayString&) @@ -5608,6 +5687,8 @@ EXPORTS ;wxZipInputStream::OnSysRead(void*,unsigned int) OnSysRead__16wxZipInputStreamFPvUi __vft16wxZipInputStream12wxStreamBase + ;wxZipInputStream::Eof() const + Eof__16wxZipInputStreamCFv ;From object file: ..\common\zstream.cpp ;PUBDEFs (Symbols available from object file): ;wxZlibInputStream::wxZlibInputStream(wxInputStream&) @@ -5660,6 +5741,8 @@ EXPORTS Create__14wxCalendarCtrlFP8wxWindowiRC10wxDateTimeRC7wxPointRC6wxSizelRC8wxString ;wxCalendarCtrl::Show(unsigned long) Show__14wxCalendarCtrlFUl + ;wxCalendarEvent::sm_classwxCalendarEvent + sm_classwxCalendarEvent__15wxCalendarEvent ;wxCalendarCtrl::OnDClick(wxMouseEvent&) OnDClick__14wxCalendarCtrlFR12wxMouseEvent ;wxCalendarCtrl::RefreshDate(const wxDateTime&) @@ -5670,6 +5753,8 @@ EXPORTS DoSetSize__14wxCalendarCtrlFiN41 ;wxMonthComboBox::GetEventTable() const GetEventTable__15wxMonthComboBoxCFv + ;wxConstructorForwxCalendarEvent() + wxConstructorForwxCalendarEvent__Fv ;wxCalendarCtrl::~wxCalendarCtrl() __dt__14wxCalendarCtrlFv ;wxCalendarCtrl::SetHolidayAttrs() @@ -5758,6 +5843,14 @@ EXPORTS __dt__7wxCaretFv ;wxCaretTimer::wxCaretTimer(wxCaret*) __ct__12wxCaretTimerFP7wxCaret + ;wxCaret::OnTimer() + OnTimer__7wxCaretFv + ;wxCaret::Refresh() + Refresh__7wxCaretFv + ;wxCaret::OnSetFocus() + OnSetFocus__7wxCaretFv + ;wxCaret::OnKillFocus() + OnKillFocus__7wxCaretFv ;wxCaret::DoShow() DoShow__7wxCaretFv ;wxCaret::DoHide() @@ -6033,14 +6126,12 @@ EXPORTS __dt__18wxGenericDragImageFv ;wxGenericDragImage::Create(const wxIcon&,const wxCursor&,const wxPoint&) Create__18wxGenericDragImageFRC6wxIconRC8wxCursorRC7wxPoint - ;wxGenericDragImage::wxGenericDragImage() - __ct__18wxGenericDragImageFv + ;wxGenericDragImage::BeginDrag(const wxPoint&,wxWindow*,wxWindow*) + BeginDrag__18wxGenericDragImageFRC7wxPointP8wxWindowT2 ;wxGenericDragImage::Show() Show__18wxGenericDragImageFv ;wxGenericDragImage::Hide() Hide__18wxGenericDragImageFv - ;wxGenericDragImage::BeginDrag(const wxPoint&,wxWindow*,wxWindow*) - BeginDrag__18wxGenericDragImageFRC7wxPointP8wxWindowT2 ;wxGenericDragImage::Create(const wxTreeCtrl&,wxTreeItemId&) Create__18wxGenericDragImageFRC10wxTreeCtrlR12wxTreeItemId __vft18wxGenericDragImage8wxObject @@ -6056,6 +6147,12 @@ EXPORTS Init__18wxGenericDragImageFv ;wxGenericDragImage::EndDrag() EndDrag__18wxGenericDragImageFv + ;wxGenericDragImage::UpdateBackingFromWindow(wxDC&,wxMemoryDC&,const wxRect&,const wxRect&) const + UpdateBackingFromWindow__18wxGenericDragImageCFR4wxDCR10wxMemoryDCRC6wxRectT3 + ;wxGenericDragImage::Create(const wxCursor&,const wxPoint&) + Create__18wxGenericDragImageFRC8wxCursorRC7wxPoint + ;wxGenericDragImage::DoDrawImage(wxDC&,const wxPoint&) const + DoDrawImage__18wxGenericDragImageCFR4wxDCRC7wxPoint ;wxGenericDragImage::Create(const wxListCtrl&,long) Create__18wxGenericDragImageFRC10wxListCtrll ;wxGenericDragImage::sm_classwxGenericDragImage @@ -6335,6 +6432,8 @@ EXPORTS SetViewer__19wxExtHelpControllerFRC8wxStringl ;From object file: ..\generic\helphtml.cpp ;PUBDEFs (Symbols available from object file): + ;wxHTMLHelpControllerBase::DisplaySection(const wxString&) + DisplaySection__24wxHTMLHelpControllerBaseFRC8wxString ;wxHTMLHelpControllerBase::DisplaySection(int) DisplaySection__24wxHTMLHelpControllerBaseFi ;wxHTMLHelpControllerBase::Initialize(const wxString&) @@ -6445,6 +6544,8 @@ EXPORTS Replace__11wxImageListFiRC8wxBitmap ;wxImageList::wxImageList(int,int,unsigned long,int) __ct__11wxImageListFiT1UlT1 + ;wxImageList::Create(int,int,unsigned long,int) + Create__11wxImageListFiT1UlT1 ;wxImageList::~wxImageList() __dt__11wxImageListFv ;wxImageList::GetSize(int,int&,int&) const @@ -6472,12 +6573,14 @@ EXPORTS LayoutMDIFrame__17wxLayoutAlgorithmFP16wxMDIParentFrameP6wxRect ;wxLayoutAlgorithm::LayoutWindow(wxWindow*,wxWindow*) LayoutWindow__17wxLayoutAlgorithmFP8wxWindowT1 + ;wxSashLayoutWindow::Init() + Init__18wxSashLayoutWindowFv ;wxConstructorForwxCalculateLayoutEvent() wxConstructorForwxCalculateLayoutEvent__Fv + ;wxSashLayoutWindow::Create(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&) + Create__18wxSashLayoutWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString ;wxSashLayoutWindow::GetEventTable() const GetEventTable__18wxSashLayoutWindowCFv - ;wxSashLayoutWindow::wxSashLayoutWindow(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&) - __ct__18wxSashLayoutWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString ;wxSashLayoutWindow::sm_classwxSashLayoutWindow sm_classwxSashLayoutWindow__18wxSashLayoutWindow ;wxCalculateLayoutEvent::sm_classwxCalculateLayoutEvent @@ -6510,10 +6613,12 @@ EXPORTS OnIdle__10wxListCtrlFR11wxIdleEvent ;wxListMainWindow::DeleteItem(long) DeleteItem__16wxListMainWindowFl - ;wxListItemData::SetSize(int,int) - SetSize__14wxListItemDataFiT1 + ;wxListLineDataArray::wxListLineDataArray(const wxListLineDataArray&) + __ct__19wxListLineDataArrayFRC19wxListLineDataArray ;wxListEvent::wxListEvent(int,int) __ct__11wxListEventFiT1 + ;wxListItemData::SetSize(int,int) + SetSize__14wxListItemDataFiT1 ;wxListLineData::SetItem(int,const wxListItem&) SetItem__14wxListLineDataFiRC10wxListItem ;wxListMainWindow::SendNotify(wxListLineData*,int) @@ -6579,8 +6684,8 @@ EXPORTS GetItemRect__16wxListMainWindowFlR6wxRect ;wxListEvent::CopyObject(wxObject&) const CopyObject__11wxListEventCFR8wxObject - ;wxListItemData::IsHit(int,int) const - IsHit__14wxListItemDataCFiT1 + ;wxListLineDataArray::operator=(const wxListLineDataArray&) + __as__19wxListLineDataArrayFRC19wxListLineDataArray ;wxListLineData::sm_classwxListLineData sm_classwxListLineData__14wxListLineData ;wxListItem::sm_classwxListItem @@ -6601,6 +6706,8 @@ EXPORTS SelectLine__16wxListMainWindowFP14wxListLineData ;wxListHeaderData::IsHit(int,int) const IsHit__16wxListHeaderDataCFiT1 + ;wxListItemData::IsHit(int,int) const + IsHit__14wxListItemDataCFiT1 ;wxListCtrl::InsertItem(wxListItem&) InsertItem__10wxListCtrlFR10wxListItem ;wxListMainWindow::HitTest(int,int,int&) @@ -6673,20 +6780,24 @@ EXPORTS OnChar__14wxListTextCtrlFR10wxKeyEvent ;wxListLineData::IsInRect(int,int,const wxRect&) IsInRect__14wxListLineDataFiT1RC6wxRect + ;wxListLineDataArray::Index(const wxListLineData&,unsigned long) const + Index__19wxListLineDataArrayCFRC14wxListLineDataUl ;wxListLineData::Hilight(unsigned long) Hilight__14wxListLineDataFUl ;wxListCtrl::FindItem(long,const wxString&,unsigned long) FindItem__10wxListCtrlFlRC8wxStringUl ;wxListLineData::DrawRubberBand(wxDC*,unsigned long) DrawRubberBand__14wxListLineDataFP4wxDCUl - ;wxListItemData::SetPosition(int,int) - SetPosition__14wxListItemDataFiT1 + ;wxListLineDataArray::RemoveAt(unsigned int) + RemoveAt__19wxListLineDataArrayFUi ;wxListHeaderData::wxListHeaderData(const wxListItem&) __ct__16wxListHeaderDataFRC10wxListItem ;wxListHeaderData::SetWidth(int) SetWidth__16wxListHeaderDataFi ;wxListHeaderData::SetPosition(int,int) SetPosition__16wxListHeaderDataFiT1 + ;wxListItemData::SetPosition(int,int) + SetPosition__14wxListItemDataFiT1 ;wxListCtrl::SetItemState(long,long,long) SetItemState__10wxListCtrlFlN21 ;wxListHeaderData::SetHeight(int) @@ -6790,10 +6901,12 @@ EXPORTS DeleteItem__10wxListCtrlFl ;wxListLineData::AssignRect(wxRect&,const wxRect&) AssignRect__14wxListLineDataFR6wxRectRC6wxRect - ;wxListItemData::SetImage(int) - SetImage__14wxListItemDataFi + ;wxListLineDataArray::DoCopy(const wxListLineDataArray&) + DoCopy__19wxListLineDataArrayFRC19wxListLineDataArray ;wxListMainWindow::UnfocusLine(wxListLineData*) UnfocusLine__16wxListMainWindowFP14wxListLineData + ;wxListItemData::SetImage(int) + SetImage__14wxListItemDataFi ;wxListCtrl::SetColumn(int,wxListItem&) SetColumn__10wxListCtrlFiR10wxListItem ;wxListLineData::InitItems(int) @@ -6814,8 +6927,8 @@ EXPORTS DeleteColumn__16wxListMainWindowFi ;wxListLineData::CalculateSize(wxDC*,int) CalculateSize__14wxListLineDataFP4wxDCi - ;wxListMainWindow::GetImageSize(int,int&,int&) - GetImageSize__16wxListMainWindowFiRiT2 + ;wxListLineDataArray::~wxListLineDataArray() + __dt__19wxListLineDataArrayFv ;wxConstructorForwxListItem() wxConstructorForwxListItem__Fv ;wxListCtrl::~wxListCtrl() @@ -6832,6 +6945,8 @@ EXPORTS GetSelectedItemCount__10wxListCtrlCFv ;wxListMainWindow::GetMode() const GetMode__16wxListMainWindowCFv + ;wxListMainWindow::GetImageSize(int,int&,int&) + GetImageSize__16wxListMainWindowFiRiT2 ;wxListHeaderWindow::GetEventTable() const GetEventTable__18wxListHeaderWindowCFv ;wxListCtrl::GetDropTarget() const @@ -6881,12 +6996,14 @@ EXPORTS EnsureVisible__16wxListMainWindowFl ;wxListCtrl::EnsureVisible(long) EnsureVisible__10wxListCtrlFl - ;wxListItemData::wxListItemData(const wxListItem&) - __ct__14wxListItemDataFRC10wxListItem + ;wxListLineDataArray::Add(const wxListLineData&) + Add__19wxListLineDataArrayFRC14wxListLineData ;wxListItemData::sm_classwxListItemData sm_classwxListItemData__14wxListItemData ;wxListHeaderData::sm_classwxListHeaderData sm_classwxListHeaderData__16wxListHeaderData + ;wxListItemData::wxListItemData(const wxListItem&) + __ct__14wxListItemDataFRC10wxListItem ;wxListMainWindow::SetItem(wxListItem&) SetItem__16wxListMainWindowFR10wxListItem ;wxListItemData::SetItem(const wxListItem&) @@ -6903,6 +7020,8 @@ EXPORTS ScrollList__10wxListCtrlFiT1 ;wxListLineData::IsHit(int,int) IsHit__14wxListLineDataFiT1 + ;wxListLineDataArray::Insert(const wxListLineData&,unsigned int) + Insert__19wxListLineDataArrayFRC14wxListLineDataUi ;wxListMainWindow::InsertItem(wxListItem&) InsertItem__16wxListMainWindowFR10wxListItem ;wxListCtrl::InsertItem(long,const wxString&,int) @@ -6921,6 +7040,8 @@ EXPORTS FindItem__10wxListCtrlFlRC7wxPointi ;wxListMainWindow::DeleteLine(wxListLineData*) DeleteLine__16wxListMainWindowFP14wxListLineData + ;wxListLineDataArray::DoEmpty() + DoEmpty__19wxListLineDataArrayFv ;wxConstructorForwxListItemData() wxConstructorForwxListItemData__Fv ;wxConstructorForwxListHeaderWindow() @@ -6965,6 +7086,8 @@ EXPORTS __ct__18wxListHeaderWindowFP8wxWindowiP16wxListMainWindowRC7wxPointRC6wxSizelRC8wxString ;wxListMainWindow::wxListMainWindow(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&) __ct__16wxListMainWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString + ;wxListHeaderWindow::AdjustDC(wxDC&) + AdjustDC__18wxListHeaderWindowFR4wxDC ;From object file: ..\generic\logg.cpp ;PUBDEFs (Symbols available from object file): ;wxLogDialog::wxLogDialog(wxWindow*,const wxArrayString&,const wxArrayInt&,const wxArrayLong&,const wxString&,long) @@ -6977,6 +7100,8 @@ EXPORTS GetEventTable__10wxLogFrameCFv ;wxLogWindow::GetFrame() const GetFrame__11wxLogWindowCFv + ;wxLogDialog::ms_details + ms_details__11wxLogDialog ;wxLogDialog::sm_eventTableEntries sm_eventTableEntries__11wxLogDialog ;wxLogFrame::OnSave(wxCommandEvent&) @@ -6993,6 +7118,10 @@ EXPORTS __dt__10wxLogFrameFv ;wxLogGui::Flush() Flush__8wxLogGuiFv + ;wxLogFrame::DoClose() + DoClose__10wxLogFrameFv + ;wxLogDialog::CreateDetailsControls() + CreateDetailsControls__11wxLogDialogFv ;wxLogGui::DoLog(unsigned long,const char*,long) DoLog__8wxLogGuiFUlPCcl ;wxLogDialog::OnListSelect(wxListEvent&) @@ -7005,6 +7134,8 @@ EXPORTS __vft11wxLogWindow5wxLog ;wxLogTextCtrl::DoLogString(const char*,long) DoLogString__13wxLogTextCtrlFPCcl + ;wxLogDialog::OnSave(wxCommandEvent&) + OnSave__11wxLogDialogFR14wxCommandEvent ;wxLogFrame::OnCloseWindow(wxCloseEvent&) OnCloseWindow__10wxLogFrameFR12wxCloseEvent ;wxLogWindow::DoLogString(const char*,long) @@ -7026,10 +7157,12 @@ EXPORTS __vft10wxLogFrame8wxObject ;wxLogDialog::OnOk(wxCommandEvent&) OnOk__11wxLogDialogFR14wxCommandEvent - ;wxLogWindow::OnFrameDelete(wxFrame*) - OnFrameDelete__11wxLogWindowFP7wxFrame + ;wxLogWindow::OnFrameClose(wxFrame*) + OnFrameClose__11wxLogWindowFP7wxFrame ;wxLogFrame::sm_eventTable sm_eventTable__10wxLogFrame + ;wxLogWindow::OnFrameDelete(wxFrame*) + OnFrameDelete__11wxLogWindowFP7wxFrame ;wxLogDialog::~wxLogDialog() __dt__11wxLogDialogFv ;wxLogWindow::Flush() @@ -7086,6 +7219,8 @@ EXPORTS SetFocus__7wxPanelFv ;wxPanel::SetFocusToChild() SetFocusToChild__7wxPanelFv + ;wxSetFocusToChild(wxWindow*,wxWindow**) + wxSetFocusToChild__FP8wxWindowPP8wxWindow ;From object file: ..\generic\plot.cpp ;PUBDEFs (Symbols available from object file): ;wxPlotXAxisArea::OnMouse(wxMouseEvent&) @@ -7164,12 +7299,10 @@ EXPORTS GetAt__12wxPlotWindowFUi ;wxPlotWindow::Delete(wxPlotOnOffCurve*) Delete__12wxPlotWindowFP16wxPlotOnOffCurve - ;wxArrayPlotOnOff::Empty() - Empty__16wxArrayPlotOnOffFv - ;wxConstructorForwxPlotYAxisArea() - wxConstructorForwxPlotYAxisArea__Fv ;wxArrayPlotOnOff::wxArrayPlotOnOff(const wxArrayPlotOnOff&) __ct__16wxArrayPlotOnOffFRC16wxArrayPlotOnOff + ;wxConstructorForwxPlotYAxisArea() + wxConstructorForwxPlotYAxisArea__Fv ;wxPlotWindow::RedrawXAxis() RedrawXAxis__12wxPlotWindowFv ;wxPlotWindow::GetOnOffCurveCount() @@ -7200,12 +7333,14 @@ EXPORTS sm_classwxPlotXAxisArea__15wxPlotXAxisArea ;wxPlotWindow::Add(wxPlotOnOffCurve*) Add__12wxPlotWindowFP16wxPlotOnOffCurve - ;wxPlotCurve::wxPlotCurve(int,double,double) - __ct__11wxPlotCurveFidT2 + ;wxArrayPlotOnOff::DoEmpty() + DoEmpty__16wxArrayPlotOnOffFv ;wxConstructorForwxPlotXAxisArea() wxConstructorForwxPlotXAxisArea__Fv ;wxPlotWindow::~wxPlotWindow() __dt__12wxPlotWindowFv + ;wxPlotCurve::wxPlotCurve(int,double,double) + __ct__11wxPlotCurveFidT2 ;wxPlotXAxisArea::GetEventTable() const GetEventTable__15wxPlotXAxisAreaCFv ;wxPlotArea::GetEventTable() const @@ -7632,6 +7767,8 @@ EXPORTS OnUpdateView__18wxPropertyFormViewFv ;wxConstructorForwxStringFormValidator() wxConstructorForwxStringFormValidator__Fv + ;wxConstructorForwxPropertyFormDialog() + wxConstructorForwxPropertyFormDialog__Fv ;wxPropertyFormView::OnClose() OnClose__18wxPropertyFormViewFv ;wxRealFormValidator::OnCheckValue(wxProperty*,wxPropertyFormView*,wxWindow*) @@ -7657,6 +7794,8 @@ EXPORTS sm_eventTable__19wxPropertyFormFrame ;wxPropertyFormView::Check() Check__18wxPropertyFormViewFv + ;wxConstructorForwxPropertyFormPanel() + wxConstructorForwxPropertyFormPanel__Fv ;wxBoolFormValidator::sm_classwxBoolFormValidator sm_classwxBoolFormValidator__19wxBoolFormValidator ;wxPropertyFormView::TransferToPropertySheet() @@ -7711,6 +7850,8 @@ EXPORTS sm_classwxPropertyFormFrame__19wxPropertyFormFrame ;wxPropertyFormView::GetEventTable() const GetEventTable__18wxPropertyFormViewCFv + ;wxConstructorForwxPropertyFormFrame() + wxConstructorForwxPropertyFormFrame__Fv ;wxPropertyFormView::TransferToDialog() TransferToDialog__18wxPropertyFormViewFv ;wxPropertyFormView::ShowView(wxPropertySheet*,wxWindow*) @@ -7828,10 +7969,12 @@ EXPORTS sm_classwxPropertyListFrame__19wxPropertyListFrame ;wxPropertyListView::EditProperty(wxProperty*) EditProperty__18wxPropertyListViewFP10wxProperty - ;wxPropertyTextEdit::OnSetFocus() - OnSetFocus__18wxPropertyTextEditFv + ;wxConstructorForwxPropertyTextEdit() + wxConstructorForwxPropertyTextEdit__Fv ;wxConstructorForwxPropertyListView() wxConstructorForwxPropertyListView__Fv + ;wxConstructorForwxPropertyListDialog() + wxConstructorForwxPropertyListDialog__Fv ;wxConstructorForwxIntegerListValidator() wxConstructorForwxIntegerListValidator__Fv ;wxRealListValidator::sm_classwxRealListValidator @@ -7840,6 +7983,8 @@ EXPORTS sm_classwxIntegerListValidator__22wxIntegerListValidator ;wxPropertyStringListEditorDialog::ShowCurrentSelection() ShowCurrentSelection__32wxPropertyStringListEditorDialogFv + ;wxPropertyTextEdit::OnSetFocus() + OnSetFocus__18wxPropertyTextEditFv ;wxPropertyListView::OnClose() OnClose__18wxPropertyListViewFv ;wxPropertyListValidator::OnSelect(unsigned long,wxProperty*,wxPropertyListView*,wxWindow*) @@ -7949,6 +8094,8 @@ EXPORTS OnKillFocus__18wxPropertyTextEditFv ;wxConstructorForwxStringListValidator() wxConstructorForwxStringListValidator__Fv + ;wxConstructorForwxPropertyListFrame() + wxConstructorForwxPropertyListFrame__Fv ;wxConstructorForwxListOfStringsListValidator() wxConstructorForwxListOfStringsListValidator__Fv ;wxFilenameListValidator::~wxFilenameListValidator() @@ -8008,6 +8155,8 @@ EXPORTS GetEventTable__18wxPropertyListViewCFv ;wxConstructorForwxRealListValidator() wxConstructorForwxRealListValidator__Fv + ;wxConstructorForwxPropertyListPanel() + wxConstructorForwxPropertyListPanel__Fv ;wxConstructorForwxColourListValidator() wxConstructorForwxColourListValidator__Fv ;wxStringListValidator::sm_classwxStringListValidator @@ -8053,30 +8202,30 @@ EXPORTS OnPaint__12wxSashWindowFR12wxPaintEvent ;wxSashWindow::SashHitTest(int,int,int) SashHitTest__12wxSashWindowFiN21 - ;wxSashWindow::DrawBorders(wxDC&) - DrawBorders__12wxSashWindowFR4wxDC + ;wxSashWindow::Create(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&) + Create__12wxSashWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString ;wxSashWindow::DrawSash(wxSashEdgePosition,wxDC&) DrawSash__12wxSashWindowF18wxSashEdgePositionR4wxDC - ;wxSashWindow::~wxSashWindow() - __dt__12wxSashWindowFv + ;wxSashWindow::DrawBorders(wxDC&) + DrawBorders__12wxSashWindowFR4wxDC + ;wxSashWindow::Init() + Init__12wxSashWindowFv ;wxConstructorForwxSashWindow() wxConstructorForwxSashWindow__Fv ;wxConstructorForwxSashEvent() wxConstructorForwxSashEvent__Fv + ;wxSashWindow::~wxSashWindow() + __dt__12wxSashWindowFv ;wxSashWindow::InitColours() InitColours__12wxSashWindowFv ;wxSashWindow::GetEventTable() const GetEventTable__12wxSashWindowCFv ;wxSashWindow::DrawSashes(wxDC&) DrawSashes__12wxSashWindowFR4wxDC - ;wxSashWindow::wxSashWindow() - __ct__12wxSashWindowFv - ;wxSashWindow::wxSashWindow(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&) - __ct__12wxSashWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString - ;wxSashWindow::sm_eventTableEntries - sm_eventTableEntries__12wxSashWindow ;wxSashWindow::sm_classwxSashWindow sm_classwxSashWindow__12wxSashWindow + ;wxSashWindow::sm_eventTableEntries + sm_eventTableEntries__12wxSashWindow ;From object file: ..\generic\scrolwin.cpp ;PUBDEFs (Symbols available from object file): ;wxScrolledWindow::GetScrollPageSize(int) const @@ -8142,12 +8291,10 @@ EXPORTS OnUnsplitEvent__16wxSplitterWindowFR15wxSplitterEvent ;wxSplitterWindow::ReplaceWindow(wxWindow*,wxWindow*) ReplaceWindow__16wxSplitterWindowFP8wxWindowT1 - ;wxSplitterWindow::wxSplitterWindow() - __ct__16wxSplitterWindowFv ;wxSplitterWindow::InitColours() InitColours__16wxSplitterWindowFv - ;wxSplitterWindow::wxSplitterWindow(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&) - __ct__16wxSplitterWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString + ;wxSplitterWindow::OnSetCursor(wxSetCursorEvent&) + OnSetCursor__16wxSplitterWindowFR16wxSetCursorEvent __vft16wxSplitterWindow8wxObject ;wxSplitterWindow::DrawSashTracker(int,int) DrawSashTracker__16wxSplitterWindowFiT1 @@ -8173,16 +8320,20 @@ EXPORTS OnIdle__16wxSplitterWindowFR11wxIdleEvent ;wxSplitterWindow::OnDoubleClick(wxSplitterEvent&) OnDoubleClick__16wxSplitterWindowFR15wxSplitterEvent + ;wxSplitterWindow::Init() + Init__16wxSplitterWindowFv ;wxSplitterWindow::GetEventTable() const GetEventTable__16wxSplitterWindowCFv - ;wxSplitterWindow::DrawBorders(wxDC&) - DrawBorders__16wxSplitterWindowFR4wxDC + ;wxSplitterWindow::Create(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxString&) + Create__16wxSplitterWindowFP8wxWindowiRC7wxPointRC6wxSizelRC8wxString ;wxSplitterWindow::sm_eventTable sm_eventTable__16wxSplitterWindow ;wxSplitterWindow::sm_classwxSplitterWindow sm_classwxSplitterWindow__16wxSplitterWindow ;wxSplitterWindow::Initialize(wxWindow*) Initialize__16wxSplitterWindowFP8wxWindow + ;wxSplitterWindow::DrawBorders(wxDC&) + DrawBorders__16wxSplitterWindowFR4wxDC ;wxSplitterWindow::OnMouseEvent(wxMouseEvent&) OnMouseEvent__16wxSplitterWindowFR12wxMouseEvent ;wxSplitterWindow::SetSashPosition(int,unsigned long) @@ -8462,8 +8613,8 @@ EXPORTS OnCompareItems__10wxTreeCtrlFRC12wxTreeItemIdT1 ;wxTreeCtrl::CalculateLevel(wxGenericTreeItem*,wxDC&,int,int&) CalculateLevel__10wxTreeCtrlFP17wxGenericTreeItemR4wxDCiRi - ;wxArrayTreeItemIds::Empty() - Empty__18wxArrayTreeItemIdsFv + ;wxTreeCtrl::OnRenameAccept() + OnRenameAccept__10wxTreeCtrlFv ;wxConstructorForwxTreeEvent() wxConstructorForwxTreeEvent__Fv ;wxConstructorForwxTreeCtrl() @@ -8474,8 +8625,6 @@ EXPORTS SetItemTextColour__10wxTreeCtrlFRC12wxTreeItemIdRC8wxColour ;wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId&,const wxColour&) SetItemBackgroundColour__10wxTreeCtrlFRC12wxTreeItemIdRC8wxColour - ;wxTreeCtrl::OnRenameAccept() - OnRenameAccept__10wxTreeCtrlFv ;wxTreeCtrl::GetStateImageList() const GetStateImageList__10wxTreeCtrlCFv ;wxTreeCtrl::GetCount() const @@ -8565,6 +8714,8 @@ EXPORTS GetItemData__10wxTreeCtrlCFRC12wxTreeItemId ;wxTreeCtrl::GetFirstChild(const wxTreeItemId&,long&) const GetFirstChild__10wxTreeCtrlCFRC12wxTreeItemIdRl + ;wxTreeCtrl::ExpandAll(const wxTreeItemId&) + ExpandAll__10wxTreeCtrlFRC12wxTreeItemId ;wxTreeCtrl::DrawBorder(const wxTreeItemId&) DrawBorder__10wxTreeCtrlFRC12wxTreeItemId ;wxTreeCtrl::Delete(const wxTreeItemId&) @@ -8630,10 +8781,12 @@ EXPORTS PaintLevel__10wxTreeCtrlFP17wxGenericTreeItemR4wxDCiRi ;wxTreeCtrl::AddRoot(const wxString&,int,int,wxTreeItemData*) AddRoot__10wxTreeCtrlFRC8wxStringiT2P14wxTreeItemData - ;wxTreeCtrl::SetItemImage(const wxTreeItemId&,int,wxTreeItemIcon) - SetItemImage__10wxTreeCtrlFRC12wxTreeItemIdi14wxTreeItemIcon + ;wxArrayTreeItemIds::DoEmpty() + DoEmpty__18wxArrayTreeItemIdsFv ;wxArrayTreeItemIds::~wxArrayTreeItemIds() __dt__18wxArrayTreeItemIdsFv + ;wxTreeCtrl::SetItemImage(const wxTreeItemId&,int,wxTreeItemIcon) + SetItemImage__10wxTreeCtrlFRC12wxTreeItemIdi14wxTreeItemIcon ;wxTreeCtrl::SelectItem(const wxTreeItemId&,unsigned long,unsigned long) SelectItem__10wxTreeCtrlFRC12wxTreeItemIdUlT2 ;wxGenericTreeItem::Reset() @@ -8651,11 +8804,13 @@ EXPORTS ;From object file: ..\generic\treelay.cpp ;From object file: ..\generic\wizard.cpp ;PUBDEFs (Symbols available from object file): + ;wxWizard::wxWizard(wxWindow*,int,const wxString&,const wxBitmap&,const wxPoint&) + __ct__8wxWizardFP8wxWindowiRC8wxStringRC8wxBitmapRC7wxPoint + __vft8wxWizard8wxObject ;wxWizard::OnCancel(wxCommandEvent&) OnCancel__8wxWizardFR14wxCommandEvent - __vft8wxWizard8wxObject - ;wxWizard::wxWizard(wxWindow*,int,const wxString&,const wxBitmap&,const wxPoint&,const wxSize&) - __ct__8wxWizardFP8wxWindowiRC8wxStringRC8wxBitmapRC7wxPointRC6wxSize + ;wxWizard::SetPageSize(const wxSize&) + SetPageSize__8wxWizardFRC6wxSize ;wxWizard::RunWizard(wxWizardPage*) RunWizard__8wxWizardFP12wxWizardPage ;wxWizard::GetEventTable() const @@ -8684,6 +8839,8 @@ EXPORTS sm_eventTable__8wxWizard ;wxWizard::sm_eventTableEntries sm_eventTableEntries__8wxWizard + ;wxWizard::DoCreateControls() + DoCreateControls__8wxWizardFv ;wxWizard::GetCurrentPage() const GetCurrentPage__8wxWizardCFv ;wxWizardPage::wxWizardPage(wxWizard*,const wxBitmap&) @@ -8699,8 +8856,12 @@ EXPORTS sm_classwxWizardPage__12wxWizardPage ;From object file: ..\html\helpctrl.cpp ;PUBDEFs (Symbols available from object file): + ;wxHtmlHelpController::GetFrameParameters(wxSize*,wxPoint*,unsigned long*) + GetFrameParameters__20wxHtmlHelpControllerFP6wxSizeP7wxPointPUl ;wxHtmlHelpController::CreateHelpFrame(wxHtmlHelpData*) CreateHelpFrame__20wxHtmlHelpControllerFP14wxHtmlHelpData + ;wxHtmlHelpController::DisplaySection(int) + DisplaySection__20wxHtmlHelpControllerFi ;wxHtmlHelpController::DestroyHelpWindow() DestroyHelpWindow__20wxHtmlHelpControllerFv ;wxHtmlHelpController::AddBook(const wxString&,unsigned long) @@ -8708,12 +8869,20 @@ EXPORTS __vft20wxHtmlHelpController8wxObject ;wxHtmlHelpController::CreateHelpWindow() CreateHelpWindow__20wxHtmlHelpControllerFv + ;wxHtmlHelpController::Quit() + Quit__20wxHtmlHelpControllerFv ;wxHtmlHelpController::ReadCustomization(wxConfigBase*,const wxString&) ReadCustomization__20wxHtmlHelpControllerFP12wxConfigBaseRC8wxString + ;wxHtmlHelpController::sm_classwxHtmlHelpController + sm_classwxHtmlHelpController__20wxHtmlHelpController ;wxHtmlHelpController::WriteCustomization(wxConfigBase*,const wxString&) WriteCustomization__20wxHtmlHelpControllerFP12wxConfigBaseRC8wxString ;wxHtmlHelpController::UseConfig(wxConfigBase*,const wxString&) UseConfig__20wxHtmlHelpControllerFP12wxConfigBaseRC8wxString + ;wxHtmlHelpController::Initialize(const wxString&) + Initialize__20wxHtmlHelpControllerFRC8wxString + ;wxHtmlHelpController::SetFrameParameters(const wxString&,const wxSize&,const wxPoint&,unsigned long) + SetFrameParameters__20wxHtmlHelpControllerFRC8wxStringRC6wxSizeRC7wxPointUl ;wxConstructorForwxHtmlHelpController() wxConstructorForwxHtmlHelpController__Fv ;wxHtmlHelpController::~wxHtmlHelpController() @@ -8724,6 +8893,8 @@ EXPORTS __ct__20wxHtmlHelpControllerFi ;wxHtmlHelpController::SetTitleFormat(const wxString&) SetTitleFormat__20wxHtmlHelpControllerFRC8wxString + ;wxHtmlHelpController::LoadFile(const wxString&) + LoadFile__20wxHtmlHelpControllerFRC8wxString ;From object file: ..\html\helpdata.cpp ;PUBDEFs (Symbols available from object file): ;wxHtmlHelpData::wxHtmlHelpData() @@ -8746,8 +8917,8 @@ EXPORTS __as__18wxHtmlBookRecArrayFRC18wxHtmlBookRecArray ;HP_TagHandler::WriteOut(wxHtmlContentsItem*&,int&) WriteOut__13HP_TagHandlerFRP18wxHtmlContentsItemRi - ;wxHtmlBookRecArray::Empty() - Empty__18wxHtmlBookRecArrayFv + ;wxHtmlBookRecArray::DoEmpty() + DoEmpty__18wxHtmlBookRecArrayFv ;wxHtmlBookRecArray::Add(const wxHtmlBookRecord&) Add__18wxHtmlBookRecArrayFRC16wxHtmlBookRecord ;wxHtmlHelpData::SaveCachedBook(wxHtmlBookRecord*,wxOutputStream*) @@ -8825,12 +8996,12 @@ EXPORTS __vft15wxHtmlHelpFrame8wxObject ;wxHtmlHelpFrame::wxHtmlHelpFrame(wxWindow*,int,const wxString&,int,wxHtmlHelpData*) __ct__15wxHtmlHelpFrameFP8wxWindowiRC8wxStringT2P14wxHtmlHelpData - ;wxHtmlHelpFrame::Create(wxWindow*,int,const wxString&,int) - Create__15wxHtmlHelpFrameFP8wxWindowiRC8wxStringT2 - ;wxHtmlHelpFrame::OptionsDialog() - OptionsDialog__15wxHtmlHelpFrameFv ;wxHtmlHelpFrame::DisplayContents() DisplayContents__15wxHtmlHelpFrameFv + ;wxHtmlHelpFrame::OptionsDialog() + OptionsDialog__15wxHtmlHelpFrameFv + ;wxHtmlHelpFrame::Create(wxWindow*,int,const wxString&,int) + Create__15wxHtmlHelpFrameFP8wxWindowiRC8wxStringT2 ;wxHtmlHelpFrame::CreateIndex() CreateIndex__15wxHtmlHelpFrameFv ;wxHtmlHelpFrameOptionsDialog::sm_eventTableEntries @@ -8841,18 +9012,18 @@ EXPORTS OnSearch__15wxHtmlHelpFrameFR14wxCommandEvent ;wxHtmlHelpFrame::Init(wxHtmlHelpData*) Init__15wxHtmlHelpFrameFP14wxHtmlHelpData - ;wxHtmlHelpFrame::NotifyPageChanged() - NotifyPageChanged__15wxHtmlHelpFrameFv + ;wxHtmlHelpFrame::DisplayIndex() + DisplayIndex__15wxHtmlHelpFrameFv ;wxConstructorForwxHtmlHelpFrame() wxConstructorForwxHtmlHelpFrame__Fv ;wxHtmlHelpFrame::~wxHtmlHelpFrame() __dt__15wxHtmlHelpFrameFv + ;wxHtmlHelpFrame::NotifyPageChanged() + NotifyPageChanged__15wxHtmlHelpFrameFv ;wxHtmlHelpFrameOptionsDialog::GetEventTable() const GetEventTable__28wxHtmlHelpFrameOptionsDialogCFv ;wxHtmlHelpFrame::GetEventTable() const GetEventTable__15wxHtmlHelpFrameCFv - ;wxHtmlHelpFrame::DisplayIndex() - DisplayIndex__15wxHtmlHelpFrameFv ;wxHtmlHelpFrame::CreateSearch() CreateSearch__15wxHtmlHelpFrameFv ;wxHtmlHelpFrame::ReadCustomization(wxConfigBase*,const wxString&) @@ -9043,8 +9214,8 @@ EXPORTS DoCopy__16HtmlHistoryArrayFRC16HtmlHistoryArray ;HtmlHistoryArray::Add(const HtmlHistoryItem&) Add__16HtmlHistoryArrayFRC15HtmlHistoryItem - ;HtmlHistoryArray::Empty() - Empty__16HtmlHistoryArrayFv + ;HtmlHistoryArray::DoEmpty() + DoEmpty__16HtmlHistoryArrayFv ;wxConstructorForwxHtmlWinModule() wxConstructorForwxHtmlWinModule__Fv ;wxHtmlWindow::HistoryClear() @@ -9222,14 +9393,14 @@ EXPORTS __ct__22wxHtmlImageMapAreaCellFQ2_22wxHtmlImageMapAreaCell8celltypeR8wxStringd ;wxHtmlImageMapAreaCell::GetLink(int,int) const GetLink__22wxHtmlImageMapAreaCellCFiT1 - ;CoordArray::Empty() - Empty__10CoordArrayFv ;wxHtmlImageMapCell::Find(int,const void*) const Find__18wxHtmlImageMapCellCFiPCv ;HTML_ModuleImage::sm_classHTML_ModuleImage sm_classHTML_ModuleImage__16HTML_ModuleImage ;_link_dummy_func_m_image() _link_dummy_func_m_image__Fv + ;CoordArray::DoEmpty() + DoEmpty__10CoordArrayFv ;wxHtmlImageCell::wxHtmlImageCell(wxFSFile*,int,int,double,int,wxString) __ct__15wxHtmlImageCellFP8wxFSFileiT2dT28wxString __vft18wxHtmlImageMapCell8wxObject @@ -9349,6 +9520,8 @@ EXPORTS InitParser__15wxHtmlWinParserFRC8wxString ;wxHtmlWinParser::SetContainer(wxHtmlContainerCell*) SetContainer__15wxHtmlWinParserFP19wxHtmlContainerCell + ;wxHtmlWinParser::RemoveModule(wxHtmlTagsModule*) + RemoveModule__15wxHtmlWinParserFP16wxHtmlTagsModule ;wxHtmlWinParser::~wxHtmlWinParser() __dt__15wxHtmlWinParserFv ;wxHtmlWinParser::OpenContainer() @@ -9410,11 +9583,11 @@ EXPORTS __ct__18wxAcceleratorTableFv ;wxAcceleratorRefData::wxAcceleratorRefData() __ct__20wxAcceleratorRefDataFv - ;wxAcceleratorTable::Translate(wxWindow*,void**) const - Translate__18wxAcceleratorTableCFP8wxWindowPPv __vft18wxAcceleratorTable8wxObject ;wxAcceleratorRefData::~wxAcceleratorRefData() __dt__20wxAcceleratorRefDataFv + ;wxAcceleratorTable::Translate(unsigned long,void**) const + Translate__18wxAcceleratorTableCFUlPPv ;wxAcceleratorTable::wxAcceleratorTable(const wxString&) __ct__18wxAcceleratorTableFRC8wxString ;From object file: ..\os2\app.cpp @@ -9424,13 +9597,11 @@ EXPORTS wxTheApp ;wxApp::sm_classwxApp sm_classwxApp__5wxApp - ;wxMsgArray::Empty() - Empty__10wxMsgArrayFv + ;wxConstructorForwxApp() + wxConstructorForwxApp__Fv ;wxWakeUpIdle() wxWakeUpIdle__Fv wxSTD_MDICHILDFRAME_ICON - ;wxConstructorForwxApp() - wxConstructorForwxApp__Fv vHabmain ;wxApp::~wxApp() __dt__5wxAppFv @@ -9446,7 +9617,6 @@ EXPORTS OnIdle__5wxAppFR11wxIdleEvent ;wxMsgArray::wxMsgArray(const wxMsgArray&) __ct__10wxMsgArrayFRC10wxMsgArray - wxhInstance wxPanelClassName wxMDIFrameClassName ;wxMsgArray::Insert(const _QMSG&,unsigned int) @@ -9469,20 +9639,20 @@ EXPORTS DoCopy__10wxMsgArrayFRC10wxMsgArray ;wxMsgArray::operator=(const wxMsgArray&) __as__10wxMsgArrayFRC10wxMsgArray - ;wxApp::GetEventTable() const - GetEventTable__5wxAppCFv ;wxYield() wxYield__Fv wxSTD_FRAME_ICON wxDEFAULT_FRAME_ICON - ;wxApp::ProcessPendingEvents() - ProcessPendingEvents__5wxAppFv ;wxApp::ProcessIdle() ProcessIdle__5wxAppFv ;wxApp::MainLoop() MainLoop__5wxAppFv ;wxApp::Initialized() Initialized__5wxAppFv + ;wxApp::GetEventTable() const + GetEventTable__5wxAppCFv + ;wxMsgArray::DoEmpty() + DoEmpty__10wxMsgArrayFv wxFrameClassNameNoRedraw ;wxSetInstance(unsigned long) wxSetInstance__FUl @@ -9966,10 +10136,10 @@ EXPORTS sm_classwxCursor__8wxCursor ;wxCursor::FreeResource(unsigned long) FreeResource__8wxCursorFUl - ;wxCursor::~wxCursor() - __dt__8wxCursorFv ;wxSetCursor(const wxCursor&) wxSetCursor__FRC8wxCursor + ;wxCursor::~wxCursor() + __dt__8wxCursorFv ;wxCursor::wxCursor(const char*,int,int,int,int,const char*) __ct__8wxCursorFPCciN32T1 __vft15wxCursorRefData15wxObjectRefData @@ -10008,13 +10178,12 @@ EXPORTS wxLIGHT_GREY wxDefaultSize wxBLUE - wxOsVersion + wxPageNumber wxTextCtrlNameStr wxStaticTextNameStr wxStaticBoxNameStr wxSliderNameStr wxRED_PEN - wxPageNumber wxMultiTextNameStr wxMEDIUM_GREY_PEN wxGaugeNameStr @@ -10031,13 +10200,13 @@ EXPORTS wxITALIC_FONT wxGREY_BRUSH wxWHITE - wxHOURGLASS_CURSOR + wxBLACK_PEN wxScrollBarNameStr wxSTANDARD_CURSOR wxMessageBoxCaptionStr + wxHOURGLASS_CURSOR wxComboBoxNameStr wxCROSS_CURSOR - wxBLACK_PEN wxTopLevelWindows wxTRANSPARENT_BRUSH wxWHITE_BRUSH @@ -10146,6 +10315,8 @@ EXPORTS DoDrawEllipse__4wxDCFiN31 ;wxDCBase::DeviceToLogicalYRel(int) const DeviceToLogicalYRel__8wxDCBaseCFi + ;wxDC::DrawAnyText(const wxString&,int,int) + DrawAnyText__4wxDCFRC8wxStringiT2 ;wxDC::sm_classwxDC sm_classwxDC__4wxDC ;wxDC::DoDrawRoundedRectangle(int,int,int,int,double) @@ -10175,6 +10346,8 @@ EXPORTS DoDrawPolygon__4wxDCFiP7wxPointN31 ;wxDC::DoDrawLines(int,wxPoint*,int,int) DoDrawLines__4wxDCFiP7wxPointN21 + ;wxDC::DoDrawCheckMark(int,int,int,int) + DoDrawCheckMark__4wxDCFiN31 ;wxDCBase::DeviceToLogicalX(int) const DeviceToLogicalX__8wxDCBaseCFi ;wxDC::~wxDC() @@ -10245,14 +10418,12 @@ EXPORTS StartPage__4wxDCFv ;wxDC::GetCharWidth() const GetCharWidth__4wxDCCFv - ;wxDC::DoClipping(unsigned long) - DoClipping__4wxDCFUl + ;wxDC::DoDrawRotatedText(const wxString&,int,int,double) + DoDrawRotatedText__4wxDCFRC8wxStringiT2d ;wxDC::SetRop(unsigned long) SetRop__4wxDCFUl ;wxDC::SetBackground(const wxBrush&) SetBackground__4wxDCFRC7wxBrush - ;wxDC::DoDrawRotatedText(const wxString&,int,int,double) - DoDrawRotatedText__4wxDCFRC8wxStringiT2d ;wxDC::DoDrawPoint(int,int) DoDrawPoint__4wxDCFiT1 ;wx_spline_push(double,double,double,double,double,double,double,double) @@ -10304,6 +10475,8 @@ EXPORTS RemoveAt__13wxArrayDCInfoFUi ;wxPaintDC::FindInCache(unsigned int*) const FindInCache__9wxPaintDCCFPUi + ;wxArrayDCInfo::DoEmpty() + DoEmpty__13wxArrayDCInfoFv ;wxWindowDC::~wxWindowDC() __dt__10wxWindowDCFv ;wxClientDC::~wxClientDC() @@ -10320,8 +10493,6 @@ EXPORTS wxConstructorForwxClientDC__Fv ;wxWindowDC::wxWindowDC() __ct__10wxWindowDCFv - ;wxArrayDCInfo::Empty() - Empty__13wxArrayDCInfoFv ;wxArrayDCInfo::wxArrayDCInfo(const wxArrayDCInfo&) __ct__13wxArrayDCInfoFRC13wxArrayDCInfo ;wxWindowDC::sm_classwxWindowDC @@ -11242,6 +11413,8 @@ EXPORTS __vft9wxMenuBar8wxObject ;wxMenuBar::Attach(wxFrame*) Attach__9wxMenuBarFP7wxFrame + ;wxMenu::m_nextMenuId + m_nextMenuId__6wxMenu ;wxMenu::Init() Init__6wxMenuFv ;wxConstructorForwxMenu() @@ -11558,8 +11731,8 @@ EXPORTS SetCap__5wxPenFi ;wxPen::~wxPen() __dt__5wxPenFv - ;wxPen::SetDashes(int,const long*) - SetDashes__5wxPenFiPCl + ;wxPen::SetDashes(int,const signed char*) + SetDashes__5wxPenFiPCSc ;wxPen::SetStyle(int) SetStyle__5wxPenFi ;wx2os2PenStyle(int) @@ -11757,8 +11930,6 @@ EXPORTS ;PUBDEFs (Symbols available from object file): ;wxRegion::Combine(const wxRect&,wxRegionOp) Combine__8wxRegionFRC6wxRect10wxRegionOp - ;wxRegion::Contains(long,long,long,long) const - Contains__8wxRegionCFlN31 ;wxRegion::GetBox() const GetBox__8wxRegionCFv ;wxRegionIterator::operator++() @@ -11767,8 +11938,8 @@ EXPORTS Combine__8wxRegionFRC8wxRegion10wxRegionOp ;wxRegion::wxRegion(const wxPoint&,const wxPoint&) __ct__8wxRegionFRC7wxPointT1 - ;wxRegion::GetBox(long&,long&,long&,long&) const - GetBox__8wxRegionCFRlN31 + ;wxRegion::Contains(int,int) const + Contains__8wxRegionCFiT1 ;wxRegionIterator::GetY() const GetY__16wxRegionIteratorCFv ;wxConstructorForwxRegion() @@ -11782,12 +11953,10 @@ EXPORTS __vft8wxRegion8wxObject ;wxRegion::Contains(const wxRect&) const Contains__8wxRegionCFRC6wxRect - ;wxRegion::wxRegion(long,long,long,long) - __ct__8wxRegionFlN31 + ;wxRegion::GetBox(int&,int&,int&,int&) const + GetBox__8wxRegionCFRiN31 ;wxRegionIterator::operator++(int) __pp__16wxRegionIteratorFi - ;wxRegion::Contains(long,long) const - Contains__8wxRegionCFlT1 ;wxRegion::wxRegion() __ct__8wxRegionFv ;wxConstructorForwxRegionIterator() @@ -11802,10 +11971,12 @@ EXPORTS GetHRGN__8wxRegionCFv ;wxRegion::Clear() Clear__8wxRegionFv - ;wxRegion::Combine(long,long,long,long,wxRegionOp) - Combine__8wxRegionFlN3110wxRegionOp + ;wxRegion::Combine(int,int,int,int,wxRegionOp) + Combine__8wxRegionFiN3110wxRegionOp ;wxRegion::Contains(const wxPoint&) const Contains__8wxRegionCFRC7wxPoint + ;wxRegion::Contains(int,int,int,int) const + Contains__8wxRegionCFiN31 ;wxRegionIterator::GetW() const GetW__16wxRegionIteratorCFv ;wxRegion::~wxRegion() @@ -11817,6 +11988,8 @@ EXPORTS ;wxRegion::wxRegion(unsigned long) __ct__8wxRegionFUl __vft16wxRegionIterator8wxObject + ;wxRegion::wxRegion(int,int,int,int) + __ct__8wxRegionFiN31 ;wxRegion::Empty() const Empty__8wxRegionCFv ;wxRegionIterator::GetX() const @@ -11921,6 +12094,8 @@ EXPORTS sm_classwxSlider__8wxSlider ;From object file: ..\os2\spinbutt.cpp ;PUBDEFs (Symbols available from object file): + ;wxSpinEvent::sm_classwxSpinEvent + sm_classwxSpinEvent__11wxSpinEvent ;wxSpinButton::GetValue() const GetValue__12wxSpinButtonCFv ;wxSpinButton::sm_classwxSpinButton @@ -11934,6 +12109,8 @@ EXPORTS SetValue__12wxSpinButtonFi ;wxSpinButton::SetRange(int,int) SetRange__12wxSpinButtonFiT1 + ;wxConstructorForwxSpinEvent() + wxConstructorForwxSpinEvent__Fv ;wxConstructorForwxSpinButton() wxConstructorForwxSpinButton__Fv ;wxSpinButton::~wxSpinButton() diff --git a/locale/.cvsignore b/locale/.cvsignore new file mode 100644 index 0000000000..cd1f2c9439 --- /dev/null +++ b/locale/.cvsignore @@ -0,0 +1 @@ +*.mo diff --git a/locale/Makefile b/locale/Makefile index 75deb8923e..36f5b70aa5 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -3,14 +3,20 @@ # this makefile may be invoked to build either wxstd.po or any lang.mo +# Autodetect the languages we support. Currently this relies on make +# being called with this dir as the cwd, but if we generate this file +# with configure an explicit path should be specified -- RL. + +WX_LINGUAS := `ls *.po 2> /dev/null | sed -n 's/\(wxstd\)\?\.po//p'` + # the programs we use (TODO: use configure to detect them) -MSGFMT=msgfmt +MSGFMT=msgfmt --verbose MSGMERGE=msgmerge XGETTEXT=xgettext XARGS=xargs # common xgettext args: C++ syntax, use the specified macro names as markers -XGETTEXT_ARGS=-C -k_ -kwxTRANSLATE -s +XGETTEXT_ARGS=-C -k_ -kwxGetTranslation -kwxTRANSLATE -s -j # implicit rules %.mo: %.po @@ -21,10 +27,22 @@ XGETTEXT_ARGS=-C -k_ -kwxTRANSLATE -s if [ -f $@ ]; then $(MSGMERGE) $@ wxstd.po > $@.new && mv $@.new $@; else cp wxstd.po $@; fi wxstd.po: + touch $@ find ../include -name "*.h" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po find ../src -name "*.cpp" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po +allpo: force-update + @-for t in $(WX_LINGUAS); do $(MAKE) $$t.po; done + +allmo: + @for t in $(WX_LINGUAS); do $(MAKE) $$t.mo; done + +force-update: + $(RM) wxstd.po + # targets depending on this one will be always remade FORCE: +.PHONY: allpo allmo force-update + # $Id$ diff --git a/locale/cs.po b/locale/cs.po index 9db969b1fc..3d72c90124 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1,142 +1,465 @@ -#. This catalog was generated by i18n-ed -#. Number of items: 572 -#. Language: Czech -#. Prefix: _ -#. Paths: 1 -#. ../src -#. Wildcards: 4 -#. *.cpp -#. *.h -#. *.H -#. *.CPP - - msgid "" msgstr "" "Project-Id-Version: wxWindows-2.2\n" -"POT-Creation-Date: 1999-02-19 16:03+0100\n" -"PO-Revision-Date: 2000-03-14 12:30+0100\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-06-17 19:23+0200\n" "Last-Translator: Vaclav Slavik \n" -"Language-Team: wxWindows Team \n" +"Language-Team: wxWindows translators \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso8859-2\n" "Content-Transfer-Encoding: 8-bit\n" -#: ../src/generic/dirdlgg.cpp:479 -msgid "\n(Do you have the required permissions?)" -msgstr "\n(Máte potøebná pøístupová práva?)" +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(Máte potøebná pøístupová práva?)" -#: ../src/generic/dirdlgg.cpp:466 -msgid "\ndoes not exist\nCreate it now?" -msgstr "\nneexistuje\nChcete ho vytvoøit?" +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"neexistuje\n" +"Chcete ho vytvoøit?" -#: ../src/common/log.cpp:238 +#: ../src/common/log.cpp:242 +#, c-format msgid " (error %ld: %s)" msgstr " (chyba %ld: %s)" -#: ../src/common/resourc2.cpp:265 -#: ../src/common/resourc2.cpp:1334 -#: ../src/common/resource.cpp:1769 -#: ../src/common/resource.cpp:1899 -#: ../src/common/resource.cpp:2980 +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr " - náhled" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr " bajtù " + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "Obálka è. 10, 4 1/8 x 9 1/2 palce" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "Obálka è. 11, 4 1/2 x 10 3/8 palce" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "Obálka è. 12, 4 3/4 x 11 palcù" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "Obálka è. 14, 5 x 11 1/2 palce" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "Obálka è. 9, 3 7/8 x 8 7/8 palce" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format msgid "#define %s must be an integer." msgstr "#define %s musí být integer." -#: ../src/common/resourc2.cpp:709 -#: ../src/common/resource.cpp:2350 +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i z %i" + +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (nebo %s)" + +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s - chyba" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s - informace" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s - varování" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format msgid "%s not a bitmap resource specification." msgstr "%s není specifikace bitmap resource." -#: ../src/common/resourc2.cpp:864 -#: ../src/common/resource.cpp:2506 +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format msgid "%s not an icon resource specification." msgstr "%s není specifikace icon resource." -#: ../src/common/resourc2.cpp:357 -#: ../src/common/resourc2.cpp:1430 -#: ../src/common/resource.cpp:1862 -#: ../src/common/resource.cpp:1991 -#: ../src/common/resource.cpp:3077 +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format msgid "%s: ill-formed resource file syntax." msgstr "%s: chybná syntaxe resource souboru." -#: ../src/generic/logg.cpp:435 -#: ../src/generic/tipdlg.cpp:170 +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 msgid "&Close" msgstr "&Zavøít" -#: ../src/generic/logg.cpp:436 +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&Detaily" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Dokonèit" + +#: ../src/generic/logg.cpp:478 msgid "&Log" msgstr "&Log" -#: ../src/common/docview.cpp:1889 -#: ../src/common/docview.cpp:1900 +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Dal¹í >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&Dal¹í >" + +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "&Dal¹í tip" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 msgid "&Redo" msgstr "&Zopakovat" -#: ../src/common/docview.cpp:1883 -#: ../src/common/docview.cpp:1910 +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 msgid "&Redo " msgstr "&Zopakovat " -#: ../src/generic/logg.cpp:431 +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 msgid "&Save..." msgstr "&Ulo¾it..." -#: ../src/common/docview.cpp:1895 +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Zobrazit tipy pøi spu¹tìní" + +#: ../src/common/docview.cpp:1951 msgid "&Undo" msgstr "Z&pìt" -#: ../src/common/docview.cpp:1870 +#: ../src/common/docview.cpp:1926 msgid "&Undo " msgstr "Z&pìt " -#: ../src/common/config.cpp:390 +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&Okno" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format msgid "'%s' has extra '..', ignored." msgstr "'%s' obsahuje pøebyteèné '..', ignoruji." -#: ../src/common/intl.cpp:389 +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' je neplatný" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' není správná èíselná hodnota pro volbu '%s'." + +#: ../src/common/intl.cpp:412 +#, c-format msgid "'%s' is not a valid message catalog." msgstr "'%s' není katalog pøekladù." -#: ../src/common/textfile.cpp:250 +#: ../src/common/textfile.cpp:253 +#, c-format msgid "'%s' is probably a binary file." msgstr "'%s' je zøejmì binární soubor." -#: ../src/common/resourc2.cpp:297 -#: ../src/common/resourc2.cpp:1370 -#: ../src/common/resource.cpp:1801 -#: ../src/common/resource.cpp:1931 -#: ../src/common/resource.cpp:3016 -msgid ", expected static, #include or #define\nwhilst parsing resource." -msgstr ", oèekávám static, #include nebo #define\nbìhem parsování resource." +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' má být èíslo." -#: ../src/common/paper.cpp:97 -msgid "A3 297 x 420 mm" -msgstr "A3 297 x 420 mm" +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' má obsahovat pouze ASCII znaky." -#: ../src/common/paper.cpp:96 -msgid "A4 210 x 297 mm" -msgstr "A4 210 x 297 mm" +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' má obsahovat pouze písmena." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' má obsahovat pouze písmena nebo èíslice." + +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(Nápovìda)" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(zálo¾ky)" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", oèekávám static, #include nebo #define\n" +"bìhem parsování resource." + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 palcù" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 palcù" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "Obálka 6 3/4, 3 5/8 x 6 1/2 palce" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": soubor neexistuje!" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": neznámá znaková sada" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": neznámé kódování" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &Zpìt" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr " " + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr " " + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4
    " +msgstr "" +"Obyèejné písmo
    (a podtr¾ené. " +"Kurziva. Tuèné. Tuèná kurziva.
    velikost -2
    velikost -1
    velikost +0
    velikost +1
    velikost +2
    velikost +3
    velikost +4

    Neproporcionální písmo.
    " +"tuèné kurziva tuèná kurziva " +"podtr¾ené
    velikost -2
    velikost -1
    velikost +0
    velikost +1
    velikost +2
    velikost +3
    velikost " +"+4
    " + +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "stránka A3, 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "stránka A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "malá stránka A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "stránka A5, 148 x 210 mm" #: ../src/generic/fontdlgg.cpp:325 msgid "ABCDEFGabcdefg12345" msgstr "ABCDEFGabcdefg12345" -#: ../src/generic/colrdlgg.cpp:264 +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "Pøidá tuto stránku k zálo¾kám" + +#: ../src/generic/colrdlgg.cpp:269 msgid "Add to custom colours" msgstr "Pøidat k u¾ivatelským barvám" +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "Pøidávám knihu %s" + #: ../src/generic/prntdlgg.cpp:163 msgid "All" msgstr "V¹echny" -#: ../src/generic/logg.cpp:476 +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "V¹echny (*)|*" + +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "V¹echny (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "U¾ vytáèím." + +#: ../src/generic/logg.cpp:1021 +#, c-format msgid "Append log to file '%s' (choosing [No] will overwrite it)?" msgstr "Pøipojit log k souboru '%s' (pokud zvolíte [Ne], soubor pøepí¹ete)?" -#: ../src/common/resourc2.cpp:844 -#: ../src/common/resource.cpp:2486 +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "Arabské (ISO-8859-6)" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "Obálka B4, 250 x 353 mm" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "stránka B4, 250 x 354 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "Obálka B5, 176 x 250 mm" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "stránka A5, 182 x 257 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "Obálka B6, 176 x 125 mm" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: Zatím neumím zpracovat 4bitové kódování." + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: Nemohu alokovat pamì»." + +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: Nemohu ulo¾it po¹kozený obrázek." + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: Nemohu zapsat data." + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: Nemohu zapsat hlavièku souboru." + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: Kódování neodpovídá bitové hloubce." + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: Obrázek má vý¹ku vìt¹í ne¾ 32767 pixelù." + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP: Obrázek má ¹íøku vìt¹í ne¾ 32767 pixelù." + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: Neznámá bitová hloubka." + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP: Neznámé kódování." + +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "Zpìt" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Zpìt" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Baltské (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Baltské (staré) (ISO-8859-4)" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format msgid "Bitmap resource specification %s not found." msgstr "Bitmap resource %s nenalezen." @@ -148,139 +471,362 @@ msgstr "Tu msgid "Bottom margin (mm):" msgstr "Dolní okraj (mm):" -#: ../src/generic/logg.cpp:433 +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "stránka C, 17 x 22 palcù" + +#: ../src/generic/logg.cpp:475 msgid "C&lear" msgstr "&Vymazat" -#: ../src/mac/thread.cpp:179 -#: ../src/msw/thread.cpp:222 -#: ../src/os2/THREAD.CPP:219 +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "Obálka C3, 324 x 458 mm" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "Obálka C4, 229 x 324 mm" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "Obálka C5, 162 x 229 mm" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "Obálka C6, 114 x 162 mm" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "Obálka C65, 114 x 229 mm" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 msgid "Can not create event object." msgstr "Nemohu vytvoøit object události." +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "Nemohu vytvoøit mutex." + #: ../src/mac/thread.cpp:92 -#: ../src/os2/THREAD.CPP:93 msgid "Can not create mutex." msgstr "Nemohu vytvoøit mutex." -#: ../src/common/filefn.cpp:1279 -#: ../src/msw/dir.cpp:294 -#: ../src/os2/DIR.CPP:194 +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 #: ../src/unix/dir.cpp:214 +#, c-format msgid "Can not enumerate files in directory '%s'" msgstr "Nemohu zjistit soubory v adresáøi '%s'" -#: ../src/mac/thread.cpp:407 -#: ../src/msw/thread.cpp:520 +#: ../src/msw/thread.cpp:552 +#, c-format msgid "Can not resume thread %x" msgstr "Nemohu obnovit vlákno %x" -#: ../src/mac/thread.cpp:327 -#: ../src/msw/thread.cpp:402 +#: ../src/msw/thread.cpp:433 msgid "Can not start thread: error writing TLS." msgstr "Nemohu spustit vlákno: chyba pøi zápisu TLS." -#: ../src/mac/thread.cpp:392 -#: ../src/msw/thread.cpp:505 +#: ../src/msw/thread.cpp:537 +#, c-format msgid "Can not suspend thread %x" msgstr "Nemohu pozastavit vlákno %x" -#: ../src/mac/thread.cpp:544 -#: ../src/msw/thread.cpp:823 +#: ../src/msw/thread.cpp:871 msgid "Can not wait for thread termination" msgstr "Nemohu poèkat na ukonèení vlákna" -#: ../src/common/docview.cpp:1872 +#: ../src/common/docview.cpp:1928 msgid "Can't &Undo " msgstr "Nemohu vzít zpìt" -#: ../src/mac/thread.cpp:356 -#: ../src/msw/thread.cpp:487 -#: ../src/os2/THREAD.CPP:427 +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "Nemohu detekovat formát obrázku '%s': soubor neexistuje." + +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "Nemohu zavøít registrový klíè '%s'" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "Nemohu kopírovat hodnoty nepodporovaného typu %d" + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" +"Nemohu vytvoøit ovládací prvek list, zkontrolujte, jestli máte " +"nainstalovanou comctl32.dll." + +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "Nemohu vytvoøit registrový klíè '%s'" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "Nemohu vytvoøit meziprocesovou rouru pro ètení" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "Nemohu vytvoøit meziprocesovou rouru pro zápis" + +#: ../src/msw/thread.cpp:519 msgid "Can't create thread" msgstr "Nemohu vytvoøit vlákno" -#: ../src/msw/iniconf.cpp:472 -#: ../src/os2/INICONF.CPP:446 +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"Nemohu vytvoøit okno tøídy %s!\n" +"Mo¾ná se jedná o problém kompatibility Windows 3.x?" + +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "Nemohu smazat klíè '%s'" + +#: ../src/msw/iniconf.cpp:476 +#, c-format msgid "Can't delete the INI file '%s'" msgstr "Nemohu smazat INI soubor '%s'" -#: ../src/msw/utilsexc.cpp:400 -msgid "Can't execute command '%s'" -msgstr "Nemohu spustit pøíkaz '%s'" +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "Nemohu smazat hodnotu '%s' z klíèe '%s'" -#: ../src/common/object.cpp:322 -#: ../src/common/object.cpp:343 +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "Nemohu smazat hodnotu klíèe '%s'" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "Nemohu vyjmenovat podklíèe klíèe '%s'" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "Nemohu vyjmenovat hodnoty klíèe '%s'" + +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "Nemohu zjistit pozici v souboru '%s'" + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"Nemohu najít dialogovou ¹ablonu dummy!\n" +"Ovìøte, jestli je správnì nastavená cesta k wx.rc." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format msgid "Can't find the serialization object '%s' for the object '%s'." msgstr "Nemohu najít serializaèní objekt '%s' k objektu '%s'." -#: ../src/common/object.cpp:314 +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "Nemohu získat informace o registrovém klíèi '%s'" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "Nemohu naèíst obrázek ze souboru '%s': soubor neexistuje." + +#: ../src/common/object.cpp:307 msgid "Can't load wxSerial dynamic library." msgstr "Nemohu naèíst dynamickou knihovnu wxSerial." -#: ../src/generic/logg.cpp:522 +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "Nemohu otevøít soubor '%s'" + +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "Nemohu otevøít registrový klíè '%s'" + +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "Nemohu pøeèíst hodnotu '%s'" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "Nemohu naèíst hodnotu klíèe '%s'" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 msgid "Can't save log contents to file." msgstr "Nemohu ulo¾it obsah logu do souboru." -#: ../src/mac/thread.cpp:381 -#: ../src/msw/thread.cpp:453 -#: ../src/os2/THREAD.CPP:409 +#: ../src/msw/thread.cpp:485 msgid "Can't set thread priority" msgstr "Nemohu nastavit prioritu vlákna" -#: ../src/common/dlgcmn.cpp:146 -#: ../src/common/prntbase.cpp:107 -#: ../src/generic/dcpsg.cpp:2192 -#: ../src/generic/dirdlgg.cpp:413 -#: ../src/generic/filedlgg.cpp:911 -#: ../src/generic/fontdlgg.cpp:257 -#: ../src/generic/prntdlgg.cpp:468 -#: ../src/generic/progdlgg.cpp:179 -#: ../src/generic/proplist.cpp:523 -#: ../src/generic/wizard.cpp:174 -#: ../src/gtk/filedlg.cpp:164 -#: ../src/gtk/fontdlg.cpp:178 -#: ../src/html/helpfrm.cpp:890 -#: ../src/motif/msgdlg.cpp:178 +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "Nemohu nastavit hodnotu '%s'" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 msgid "Cancel" msgstr "Storno" -#: ../src/msw/app.cpp:220 +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "Nemohu nalézt aktivní vytáèené pøipojení: %s" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "Nemohu najít umístìní adresáøe" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "Nemohu zjistit rozsah priorit pro plánovací politiku %d." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "Nemohu zjistit jméno poèítaèe" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "Nemohu zjistit oficiální jméno poèítaèe" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "Nemohu zavìsit - ¾ádná aktivní vytáèená pøipojení." + +#: ../src/msw/app.cpp:252 msgid "Cannot initialize OLE" msgstr "Nemohu inicializovat OLE" -#: ../src/generic/logg.cpp:433 +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "Nelze otevøít HTML dokument: %s" + +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "Nelze otevøít HTML nápovìdu: %s" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "Nemohu otevøít URL '%s'" + +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "Nelze otevøít soubor s obsahem: %s" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Nemohu otevøít soubor k PostScriptovému tisku!" + +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "Nelze otevøít soubor s rejstøíkem: %s" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "Nemohu tisknout prázdnou stránku." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "Nemohu obnovit plánovací politiku vlákna." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "Nemohu spustit vlákno: chyba zápisu TLS" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "Rozli¹ovat velká/malá" + +#: ../src/common/fontmap.cpp:113 +#, fuzzy +msgid "Celtic (ISO-8859-14)" +msgstr "Baltské (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Støedoevropské (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "Vyberte ISP, ke kterému se má volat" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "Vyberte písmo" + +#: ../src/generic/logg.cpp:475 msgid "Clear the log contents" msgstr "Smazat obsah logu" -#: ../src/common/prntbase.cpp:357 -#: ../src/generic/progdlgg.cpp:307 +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 #: ../src/generic/proplist.cpp:518 msgid "Close" msgstr "Zavøít" -#: ../src/generic/logg.cpp:435 +#: ../src/generic/logg.cpp:477 msgid "Close this window" msgstr "Zavøít okno" -#: ../src/generic/filedlgg.cpp:1072 -#: ../src/gtk/filedlg.cpp:75 +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Polo¾ka konfigurace nemù¾e zaèínat na '%c'" + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 msgid "Confirm" msgstr "Potvrdit" +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Pøipojuji se..." + #: ../src/generic/helpxlp.cpp:240 +#, c-format msgid "Connection to wxHelp timed out in %d seconds" msgstr "Vypr¹elo spojení s wxHelp :%d sekund" +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Obsah" + #: ../src/generic/prntdlgg.cpp:196 msgid "Copies:" msgstr "Kopie:" -#: ../src/common/resourc2.cpp:287 -#: ../src/common/resourc2.cpp:1358 -#: ../src/common/resource.cpp:1791 -#: ../src/common/resource.cpp:1921 -#: ../src/common/resource.cpp:3004 +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format msgid "Could not find resource include file %s." msgstr "Nemohu nalézt resource include file %s." @@ -288,256 +834,647 @@ msgstr "Nemohu nal msgid "Could not find tab for id" msgstr "Nemohu najít tab k id" -#: ../src/common/resource.cpp:791 -msgid "Could not resolve control class or id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)" -msgstr "Nemohu zjistit tøídu prvku (control) nebo jeho id: '%s'. Pou¾ijte (nenulové) èíslo\n nebo poskytnìte #define (viz. manuál)" +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "Nemohu naèíst Rich Edit DLL '%s'" -#: ../src/common/resource.cpp:1236 -msgid "Could not resolve menu id '%s'. Use (non-zero) integer instead\nor provide #define (see manual for caveats)" -msgstr "Nemohu zjistit id menu '%s'. Pou¾ijte (nenulové) èíslo\nnebo poskytnìte #define (viz. manuál)" +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"Nemohu zjistit tøídu prvku (control) nebo jeho id: '%s'. Pou¾ijte (nenulové) " +"èíslo\n" +" nebo poskytnìte #define (viz. manuál)" -#: ../src/common/prntbase.cpp:709 +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"Nemohu zjistit id menu '%s'. Pou¾ijte (nenulové) èíslo\n" +"nebo poskytnìte #define (viz. manuál)" + +#: ../src/common/prntbase.cpp:711 msgid "Could not start document preview." msgstr "Nemohu zobrazit náhled dokumentu." -#: ../src/generic/printps.cpp:200 -#: ../src/msw/printwin.cpp:240 +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 msgid "Could not start printing." msgstr "Nemohu zahájit tisk." -#: ../src/common/wincmn.cpp:762 +#: ../src/common/wincmn.cpp:784 msgid "Could not transfer data to window" msgstr "Nemohu pøenést data do okna." -#: ../src/mac/thread.cpp:121 #: ../src/msw/thread.cpp:166 -#: ../src/os2/THREAD.CPP:124 msgid "Couldn't acquire a mutex lock" msgstr "Nemohu získat zámek mutexu." -#: ../src/msw/dragimag.cpp:142 -#: ../src/msw/dragimag.cpp:179 -#: ../src/msw/imaglist.cpp:145 -#: ../src/msw/imaglist.cpp:167 -#: ../src/msw/imaglist.cpp:180 +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 msgid "Couldn't add an image to the image list." msgstr "Nemohu pøidat obrázek do seznamu." #: ../src/mac/thread.cpp:227 -#: ../src/os2/THREAD.CPP:258 msgid "Couldn't change the state of event object." msgstr "Nemohu zmìnit stav event object." #: ../src/msw/timer.cpp:96 -#: ../src/os2/TIMER.CPP:89 msgid "Couldn't create a timer" msgstr "Nemohu vytvoøit èasovaè" -#: ../src/mac/thread.cpp:427 -#: ../src/msw/thread.cpp:540 +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Nemohu v dynamické knihovnì nalézt symbol '%s'" + +#: ../src/msw/thread.cpp:578 msgid "Couldn't get the current thread pointer" msgstr "Nemohu získat ukazatel na aktuální vlákno" -#: ../src/mac/thread.cpp:155 +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "Nemohu spustit DDE server '%s'." + +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "" +"Nemohu naèíst PNG obrázek - buï je po¹kozený soubor nebo je nedostatek " +"pamìti." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "Nemohu zaregistrovat formát schránky '%s'." + #: ../src/msw/thread.cpp:198 -#: ../src/os2/THREAD.CPP:157 msgid "Couldn't release a mutex" msgstr "Nemohu uvolnit mutex" -#: ../src/msw/listctrl.cpp:608 +#: ../src/msw/listctrl.cpp:616 +#, c-format msgid "Couldn't retrieve information about list control item %d." msgstr "Nemohu získat informace o polo¾ce %d v seznamu." -#: ../src/mac/thread.cpp:609 -#: ../src/msw/thread.cpp:910 +#: ../src/msw/thread.cpp:958 msgid "Couldn't terminate thread" msgstr "Nemohu pøeru¹it vlákno" +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "Vytváøení adresáøe" + +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "Vytvoøit nový adresáø" + +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "Aktuální adresáø:" + +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "Baltské (ISO-8859-13)" + +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "stránka D, 22 x 34 palcù" + +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "Po¾adavek na DDE poke selhal" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "Obálka DL, 110 x 220 mm" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "Datum" + #: ../src/generic/fontdlgg.cpp:207 msgid "Decorative" msgstr "Ozdobný" -#: ../src/generic/dirdlgg.cpp:467 +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" +"Vytáèené pøipojení není dostupné, proto¾e Remote Access Service (RAS) není " +"nainstalován. Prosím, nainstalujte ho." + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Víte, ¾e..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Nelze vytvoøit adresáø '%s'" + +#: ../src/generic/dirdlgg.cpp:539 msgid "Directory does not exist" msgstr "Adresáø neexistuje" -#: ../src/common/docview.cpp:431 +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"Zobrazí v¹echny polo¾ky rejstøíku, které obsahují daný podøetìzec. " +"Nerozli¹uje velká a malá písmena." + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "Zobrazí dialog s nastaveními" + +#: ../src/common/docview.cpp:440 +#, c-format msgid "Do you want to save changes to document %s?" msgstr "Chcete ulo¾it zmìny do dokumentu %s?" -#: ../src/generic/helphtml.cpp:310 +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Hotovo" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Hotovo." + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "stránka E, 34 x 44 palcù" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "Dosa¾ený èas : " + +#: ../src/generic/helphtml.cpp:320 msgid "Entries found" msgstr "Nalezené polo¾ky" -#: ../src/common/config.cpp:343 -msgid "Environment variables expansion failed: missing '%c' at position %d in '%s'." -msgstr "Chyba bìhem expanze promnìných prostøedí: chybí '%c' na pozici %d v '%s'." +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"Chyba bìhem expanze promìnných prostøedí: chybí '%c' na pozici %d v '%s'." -#: ../src/generic/dcpsg.cpp:1541 -#: ../src/generic/dirdlgg.cpp:263 -#: ../src/generic/dirdlgg.cpp:281 -#: ../src/generic/dirdlgg.cpp:292 -#: ../src/generic/dirdlgg.cpp:533 -#: ../src/generic/filedlgg.cpp:620 -#: ../src/generic/filedlgg.cpp:712 -#: ../src/generic/filedlgg.cpp:726 -#: ../src/generic/filedlgg.cpp:739 -#: ../src/generic/filedlgg.cpp:1038 -#: ../src/generic/filedlgg.cpp:1087 -#: ../src/generic/helpxlp.cpp:241 -#: ../src/generic/logg.cpp:201 -#: ../src/gtk/filedlg.cpp:83 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 #: ../src/gtk/fontdlg.cpp:72 msgid "Error" msgstr "Chyba" -#: ../src/generic/dirdlgg.cpp:480 +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Chyba" + +#: ../src/generic/dirdlgg.cpp:552 msgid "Error creating directory" msgstr "Chyba pøi vytváøení adresáøe" -#: ../src/common/log.cpp:354 +#: ../src/common/log.cpp:362 msgid "Error: " msgstr "Chyba: " -#: ../src/generic/dirdlgg.cpp:213 +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Esperanto (ISO-8859-3)" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Odhadovaný èas : " + +#: ../src/generic/dirdlgg.cpp:217 msgid "Etcetera" msgstr "Etcetera" -#: ../src/msw/utilsexc.cpp:484 +#: ../src/msw/utilsexc.cpp:585 +#, c-format msgid "Execution of command '%s' failed" msgstr "Chyba pøi volání pøíkazu '%s'" -#: ../src/common/resourc2.cpp:326 -#: ../src/common/resourc2.cpp:1399 -#: ../src/common/resource.cpp:1830 -#: ../src/common/resource.cpp:1960 -#: ../src/common/resource.cpp:3045 +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 palce" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 msgid "Expected '*' whilst parsing resource." msgstr "Pøi parsování resource oèekávám '*'." -#: ../src/common/resourc2.cpp:342 -#: ../src/common/resourc2.cpp:1415 -#: ../src/common/resource.cpp:1847 -#: ../src/common/resource.cpp:1976 -#: ../src/common/resource.cpp:3062 +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 msgid "Expected '=' whilst parsing resource." msgstr "Pøi parsování resource oèekávám '='." -#: ../src/common/resourc2.cpp:312 -#: ../src/common/resourc2.cpp:1385 -#: ../src/common/resource.cpp:1816 -#: ../src/common/resource.cpp:1946 -#: ../src/common/resource.cpp:3031 +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 msgid "Expected 'char' whilst parsing resource." msgstr "Pøi parsování resource oèekávám 'char'." +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "Nepodaøilo se %s pøipojení k Internetu: %s" + #: ../src/msw/clipbrd.cpp:122 -#: ../src/os2/CLIPBRD.CPP:94 msgid "Failed to close the clipboard." msgstr "Nemohu uzavøít schránku." -#: ../src/generic/dirdlgg.cpp:478 +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "Nepodaøilo se pøipojit: chybí u¾ivatelské jméno nebo heslo." + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "Nelze se pøipojit: ¾ádný ISP." + +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "Nelze zkopírovat hodnotu registru '%s'" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "Nelze zkopírovat obsah registrového klíèe '%s' do '%s'." + +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "Nelze vytvoøit DDE øe»ezec" + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "Nepodaøilo se vytvoøit rodièovské MDI okno." + +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "Nelze vytvoøit status bar." + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "Nelze navázat spojení se server '%s' na téma '%s'" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" +"Nelze vytvoøit dialog. Nejspí¹ jste zapomnìl vlo¾it wx/msw/wx.rc do resource " +"souboru." + +#: ../src/generic/dirdlgg.cpp:550 msgid "Failed to create directory " msgstr "Nemohu vytvoøit adresáø" -#: ../src/os2/tooltip.cpp:193 -msgid "Failed to create the tooltip '%s'" -msgstr "Nemohu vytvoøit tooltip '%s'" +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "Nelze zobrati HTML dokument v kódování %s" #: ../src/msw/clipbrd.cpp:134 -#: ../src/os2/CLIPBRD.CPP:108 msgid "Failed to empty the clipboard." msgstr "Nemohu vyprázdnit shcránku." -#: ../src/common/resourc2.cpp:809 -#: ../src/common/resource.cpp:2450 -msgid "Failed to find XBM resource %s.\nForgot to use wxResourceLoadBitmapData?" -msgstr "Nemohu nalézt XBM resource %s.\nNezapomnìl jste pou¾ít wxResourceLoadBitmapData?" +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "Nelze navázat 'advise loop' s DDE serverem" -#: ../src/common/resourc2.cpp:964 -#: ../src/common/resource.cpp:2606 -msgid "Failed to find XBM resource %s.\nForgot to use wxResourceLoadIconData?" -msgstr "Nemohu nalézt XBM resource %s.\nNezapomnìl jste pou¾ít wxResourceLoadIconData?" +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "Nepodaøilo se navázat vytáèené spojení: %s" -#: ../src/common/resourc2.cpp:825 -#: ../src/common/resource.cpp:2466 -msgid "Failed to find XPM resource %s.\nForgot to use wxResourceLoadBitmapData?" -msgstr "Nemohu nalézt XPM resource %s.\nNezapomnìl jste pou¾ít wxResourceLoadBitmapData?" +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "Nepodaøilo se spustit '%s'\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Nemohu nalézt XBM resource %s.\n" +"Nezapomnìl jste pou¾ít wxResourceLoadBitmapData?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"Nemohu nalézt XBM resource %s.\n" +"Nezapomnìl jste pou¾ít wxResourceLoadIconData?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Nemohu nalézt XPM resource %s.\n" +"Nezapomnìl jste pou¾ít wxResourceLoadBitmapData?" + +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "Nepodaøilo se získat jména ISP: %s" + +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "Nelze získat data ze schránky" + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "Nemohu zjistit systémový UTC èas." + +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "Nepodaøilo se zjistit místní systémový èas" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" +"Nemohu pøipojit vlákno, zji¹tìna mo¾ná chybná alokace pamìti - restartujte " +"prosím program" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Nelze naèíst sdílenou knihovnu '%s'" #: ../src/msw/clipbrd.cpp:102 -#: ../src/os2/CLIPBRD.CPP:71 msgid "Failed to open the clipboard." msgstr "Nemohu otevøít schránku." +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "Nepodaøilo se vlo¾it data do schránky" + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "Nepodaøilo se pøesmìrovat vstup/výstup synovského procesu" + +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Nelze zaregistrovat DDE server '%s'" + +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Nemohu ulo¾it kódování znakové sady '%s'." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "Nelze pøejmenovat registrový klíè '%s' na '%s'." + +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "Nelze pøejmenovat registrový klíè '%s' na '%s'." + #: ../src/msw/clipbrd.cpp:428 -#: ../src/os2/CLIPBRD.CPP:401 msgid "Failed to retrieve data from the clipboard." msgstr "Nemohu získat data ze schránky." +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "Nepodaøilo se získat text chybového hlá¹ení RAS" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "Nelze zjistit formáty podporované schránkou" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "Nepodaøilo se poslat DDE advise notifikaci" + #: ../src/msw/clipbrd.cpp:300 -#: ../src/os2/CLIPBRD.CPP:274 msgid "Failed to set clipboard data." msgstr "Nemohu ulo¾it data do schránky." #: ../src/unix/threadpsx.cpp:1071 +#, c-format msgid "Failed to set thread priority %d." msgstr "Nemohu nastavit prioritu vlákna %d." +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "Nepodaøilo se ulo¾it obrázek '%s' do pamì»ového VFS!" + #: ../src/unix/threadpsx.cpp:1251 msgid "Failed to terminate a thread." msgstr "Nemohu ukonèit vlákno." -#: ../src/generic/logg.cpp:329 +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "Nelze ukonèit 'advise loop' s DDE serverem" + +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Nelze ukonèit vytáèené spojení: %s" + +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Nelze odregistrovat DDE server '%s'" + +#: ../src/generic/logg.cpp:371 msgid "Fatal error" msgstr "Kritická chyba" -#: ../src/common/log.cpp:347 +#: ../src/common/log.cpp:355 msgid "Fatal error: " msgstr "Kritická chyba: " -#: ../src/generic/filedlgg.cpp:1070 -#: ../src/gtk/filedlg.cpp:73 +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Fatální chyba: program se ukonèí" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format msgid "File '%s' already exists, do you really want to overwrite it?" msgstr "Soubor '%s' existuje, opravdu ho chcete pøepsat?" -#: ../src/common/docview.cpp:287 -#: ../src/common/docview.cpp:323 +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "Soubor nelze naèíst." + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 msgid "File error" msgstr "Chyba souboru" -#: ../src/msw/filedlg.cpp:280 +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "Soubor tohoto jména ji¾ existuje." + +#: ../src/msw/filedlg.cpp:303 +#, c-format msgid "Files (%s)|%s" msgstr "Soubory (%s)|%s" +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "Najít" + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "Neproporcionální písmo:" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 palcù" + #: ../src/generic/fontdlgg.cpp:124 msgid "Font" msgstr "Font" -#: ../src/unix/utilsunx.cpp:480 +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "Velikost písma:" + +#: ../src/unix/utilsunx.cpp:500 msgid "Fork failed" msgstr "Selhalo forkování" -#: ../src/common/resourc2.cpp:295 -#: ../src/common/resourc2.cpp:1368 -#: ../src/common/resource.cpp:1799 -#: ../src/common/resource.cpp:1929 -#: ../src/common/resource.cpp:3014 +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Dále" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 msgid "Found " msgstr "Nalezeno " +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "Nalezeno výskytù: %i" + #: ../src/generic/prntdlgg.cpp:187 msgid "From:" msgstr "Od:" -#: ../src/generic/helphtml.cpp:309 -#: ../src/generic/helphtml.cpp:310 +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: datový proud je useknutý pøed koncem." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: chyba ve formátu GIF obrázku." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: nedostatek pamìti." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF: neznámá chyba!!!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "German Legal Fanfold, 8 1/2 x 13 palcù" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "German Std Fanfold, 8 1/2 x 12 palcù" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "Jdi zpìt" + +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Jdi dopøedu" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "Jdi o úroveò vý¹" + +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "Jít do domovského adresáøe" + +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "Jít do nadøazeného adresáøe" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Øecké (ISO-8859-7)" + +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "Kotva HTML %s neexistuje." + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books " +"(*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All " +"files (*.*)|*" +msgstr "" +"soubory HTML (*.htm)|*.htm|soubory HTML (*.html)|*.html|HTML nápovìda " +"(*.htb)|*.htb|HTML nápovìda (*.zip)|*.zip|Projekt HTML nápovìdy " +"(*.hhp)|*.hhp|V¹echny soubory (*.*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Hebrejské (ISO-8859-8)" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Nápovìda" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "Nastavení prohlí¾eèe nápovìdy" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 msgid "Help Index" msgstr "Index nápovìdy" -#: ../src/common/resourc2.cpp:997 -#: ../src/common/resourc2.cpp:1008 -#: ../src/common/resource.cpp:2639 -#: ../src/common/resource.cpp:2650 +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "Tisk nápovìdy" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "Nápovìda: %s" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format msgid "Icon resource specification %s not found." msgstr "Icon resource specification %s nenalezen." @@ -545,56 +1482,131 @@ msgstr "Icon resource specification %s nenalezen." msgid "Ill-formed resource file syntax." msgstr "©patná syntaxe resource souboru." -#: ../src/generic/logg.cpp:209 -msgid "Information" -msgstr "Informace" +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "Nedovolené jméno adresáøe." + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "Neplatná specifikace souboru." + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" +"Není mo¾né vytvoøit rich edit prvek, pou¾iji obyèejný. Pøeinstalujte prosím " +"riched32.dll." + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "Není mo¾né získat vstup synovského procesu" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "©patná verze knihy s HTML nápovìdou" + +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Rejtøík" + +#: ../src/common/fontmap.cpp:111 +#, fuzzy +msgid "Indian (ISO-8859-12)" +msgstr "Severské (ISO-8859-10)" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "Po¹kozený index v TIFF obrázku." #: ../src/generic/fontdlgg.cpp:213 msgid "Italic" msgstr "Kurzíva" -#: ../src/generic/dcpsg.cpp:2183 -#: ../src/generic/prntdlgg.cpp:441 +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Italská obálka, 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG: Nemohu naèíst obrázek - soubor je nejspí¹ po¹kozen." + +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG: Nemohu ulo¾it obrázek." + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 #: ../src/generic/prntdlgg.cpp:637 msgid "Landscape" msgstr "Na ¹íøku" +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Ledger, 17 x 11 palcù" + #: ../src/generic/prntdlgg.cpp:649 msgid "Left margin (mm):" msgstr "Levý okraj (mm):" -#: ../src/common/paper.cpp:99 -msgid "Legal 8 1/2 x 14 in" -msgstr "Legal 8 1/2 x 14 in" +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal, 8 1/2 x 14 palcù" -#: ../src/common/paper.cpp:98 -msgid "Letter 8 1/2 x 11 in" -msgstr "Letter 8 1/2 x 11 in" +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Letter Small, 8 1/2 x 11 in" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter, 8 1/2 x 11 palcù" #: ../src/generic/fontdlgg.cpp:216 msgid "Light" msgstr "Tenké" -#: ../src/generic/filedlgg.cpp:1265 -#: ../src/gtk/filedlg.cpp:241 -#: ../src/motif/filedlg.cpp:351 -#: ../src/msw/filedlg.cpp:438 +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format msgid "Load %s file" msgstr "Naèíst soubor %s" -#: ../src/generic/logg.cpp:525 +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "Naèítám : " + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "Naèítání ¹edých ascii PNM obrázkù není je¹tì implementováno." + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "Naèítání ¹edých raw PNM obrázkù není je¹tì implementováno." + +#: ../src/generic/logg.cpp:538 +#, c-format msgid "Log saved to the file '%s'." msgstr "Log ulo¾en do souboru '%s'." -#: ../src/gtk/mdi.cpp:420 +#: ../src/gtk/mdi.cpp:435 msgid "MDI child" msgstr "MDI syn" -#: ../src/unix/mimetype.cpp:1542 +#: ../src/unix/mimetype.cpp:1597 +#, c-format msgid "Mailcap file %s, line %d: incomplete entry ignored." msgstr "Soubor Mailcap %s, øádka %d: nekompletní polo¾ka ignorována." -#: ../src/unix/mimetype.cpp:1262 +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "Pamì»ový VFS u¾ obsahuje soubor '%s'!" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format msgid "Mime.types file %s, line %d: unterminated quoted string." msgstr "Soubor Mime.types %s, øádka %d: neukonèený uzávorkovaný øetìzec." @@ -602,79 +1614,193 @@ msgstr "Soubor Mime.types %s, msgid "Modern" msgstr "Moderní" -#: ../src/generic/dirdlgg.cpp:209 +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Obálka Monarch, 3 7/8 x 7 1/2 palce" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Dal¹í..." + +#: ../src/generic/dirdlgg.cpp:213 msgid "Mounted Devices" msgstr "Pøipojená zaøízení" #: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Mùj disk" + +#: ../src/generic/dirdlgg.cpp:212 msgid "My Home" msgstr "Domovský adresáø" -#: ../src/generic/dirdlgg.cpp:415 +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Jméno" + +#: ../src/generic/dirdlgg.cpp:427 msgid "New..." msgstr "Nový..." -#: ../src/common/dlgcmn.cpp:109 -#: ../src/common/dlgcmn.cpp:119 +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "NoveJmeno" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "Následující stránka" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 #: ../src/motif/msgdlg.cpp:178 msgid "No" msgstr "Ne" -#: ../src/common/resourc2.cpp:814 -#: ../src/common/resourc2.cpp:969 -#: ../src/common/resource.cpp:2455 -#: ../src/common/resource.cpp:2611 +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 msgid "No XBM facility available!" msgstr "Chybí podpora XBM!" -#: ../src/common/resourc2.cpp:830 -#: ../src/common/resourc2.cpp:988 -#: ../src/common/resource.cpp:2471 -#: ../src/common/resource.cpp:2630 +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 msgid "No XPM facility available!" msgstr "Chybí podpora XPM!" -#: ../src/common/resourc2.cpp:991 -#: ../src/common/resource.cpp:2633 +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 msgid "No XPM icon facility available!" msgstr "Chybí podpora XPM ikon!" -#: ../src/generic/helphtml.cpp:304 +#: ../src/generic/helphtml.cpp:314 msgid "No entries found." msgstr "Nenalezeny ¾ádné polo¾ky." -#: ../src/generic/fontdlgg.cpp:212 -#: ../src/generic/fontdlgg.cpp:215 +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"Neznámé kódování '%s'.\n" +"Pøejete si vybrat font, který se má s tímto kódováním pou¾ít\n" +"(jinak se text v tomto kódování nezobrazí správnì)?" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "Nenalezen ¾ádný ovladaè pro tento typ obrázkù." + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "®ádný ovladaè pro typ obrázkù %d." + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "®ádný ovladaè pro typ obrázkù %s." + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "®ádný výskyt nenalezen" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Severské (ISO-8859-10)" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 msgid "Normal" msgstr "Normální" -#: ../src/common/dlgcmn.cpp:125 -#: ../src/generic/dcpsg.cpp:2191 -#: ../src/generic/dirdlgg.cpp:411 -#: ../src/generic/filedlgg.cpp:902 -#: ../src/generic/fontdlgg.cpp:256 -#: ../src/generic/prntdlgg.cpp:467 -#: ../src/generic/proplist.cpp:511 -#: ../src/gtk/filedlg.cpp:158 -#: ../src/gtk/fontdlg.cpp:172 -#: ../src/html/helpfrm.cpp:889 +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Normální písmo:" + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Note, 8 1/2 x 11 palcù" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 msgid "OK" msgstr "OK" +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "Otevøi HTML dokument" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "Zakázaná operace." + +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "Volba '%s' vy¾aduje hodnotu, oèekávám '='." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "Volba '%s' vy¾aduje hodnotu." + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "Volba '%s': '%s' neudává datum." + #: ../src/generic/prntdlgg.cpp:447 msgid "Options" msgstr "Nastavení" -#: ../src/generic/prntdlgg.cpp:443 -#: ../src/generic/prntdlgg.cpp:638 +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 msgid "Orientation" msgstr "Orientace" -#: ../src/common/prntbase.cpp:729 +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: Nemohu alokovat pamì»." + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: nepodporovaný formát obrázku" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: po¹kozený obrázek" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: tento soubor není PCX." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX: neznámá chyba !!!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: èíslo verze je pøíli¹ malé" + +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PNM: Nemohu alokovat pamì»." + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM: formát souboru nerozeznán." + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM: Soubor je nejspí¹ uøíznutý pøed koncem." + +#: ../src/common/prntbase.cpp:731 +#, c-format msgid "Page %d" msgstr "Strana %d" -#: ../src/common/prntbase.cpp:727 +#: ../src/common/prntbase.cpp:729 +#, c-format msgid "Page %d of %d" msgstr "Strana %d z %d" @@ -686,28 +1812,46 @@ msgstr "Nastaven msgid "Pages" msgstr "Strany" -#: ../src/generic/prntdlgg.cpp:433 -#: ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Velikost papíru" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 #: ../src/generic/prntdlgg.cpp:804 msgid "Paper size" msgstr "Velikost papíru" -#: ../src/unix/utilsunx.cpp:429 -#: ../src/unix/utilsunx.cpp:453 +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "Práva" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 msgid "Pipe creation failed" msgstr "Nelze vytvoøit rouru" -#: ../src/common/prntbase.cpp:105 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "Prosím vyberte korektní font." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Vyberte prosím existující soubor." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "Prosím vyberte si poskytovatele (ISP), ke kterému se chcete pøipojit" + +#: ../src/common/prntbase.cpp:107 msgid "Please wait..." msgstr "Èekejte prosím..." -#: ../src/generic/dcpsg.cpp:2182 -#: ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 #: ../src/generic/prntdlgg.cpp:636 msgid "Portrait" msgstr "Na vý¹ku" -#: ../src/generic/dcpsg.cpp:377 +#: ../src/generic/dcpsg.cpp:391 msgid "PostScript" msgstr "PostScript" @@ -715,30 +1859,31 @@ msgstr "PostScript" msgid "PostScript file" msgstr "soubor PostScript" -#: ../src/generic/dcpsg.cpp:2224 +#: ../src/generic/dcpsg.cpp:2303 msgid "PostScript:" msgstr "PostScript:" -#: ../src/generic/dcpsg.cpp:2187 +#: ../src/generic/dcpsg.cpp:2266 msgid "Preview Only" msgstr "Pouze náhled" -#: ../src/generic/prntdlgg.cpp:113 -#: ../src/generic/prntdlgg.cpp:127 -#: ../src/generic/prntdlgg.cpp:141 +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Náhled:" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "Pøedchozí stránka" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 msgid "Print" msgstr "Vytisknout" -#: ../src/generic/printps.cpp:200 -msgid "Print Error" -msgstr "Chyba tisku" - -#: ../src/common/docview.cpp:884 +#: ../src/common/docview.cpp:897 msgid "Print Preview" msgstr "Náhled tisku" -#: ../src/common/prntbase.cpp:685 -#: ../src/common/prntbase.cpp:709 +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 msgid "Print Preview Failure" msgstr "Chyba bìhem vytváøení náhledu." @@ -746,8 +1891,7 @@ msgstr "Chyba b msgid "Print Range" msgstr "Rozsah" -#: ../src/generic/prntdlgg.cpp:408 -#: ../src/generic/prntdlgg.cpp:415 +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 msgid "Print Setup" msgstr "Nastavení tisku" @@ -759,24 +1903,27 @@ msgstr "Tisknout barevn msgid "Print spooling" msgstr "Tisková fronta" -#: ../src/generic/dcpsg.cpp:2186 -#: ../src/generic/prntdlgg.cpp:150 +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "Vytiskne tuto stránku" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 msgid "Print to File" msgstr "Tisknout do souboru" -#: ../src/common/prntbase.cpp:364 +#: ../src/common/prntbase.cpp:366 msgid "Print..." msgstr "Tisknout..." -#: ../src/generic/dcpsg.cpp:2197 +#: ../src/generic/dcpsg.cpp:2276 msgid "Printer Command: " msgstr "Pøíkaz tisku: " -#: ../src/generic/dcpsg.cpp:2202 +#: ../src/generic/dcpsg.cpp:2281 msgid "Printer Options: " msgstr "Nastavení tiskárny: " -#: ../src/generic/dcpsg.cpp:346 +#: ../src/generic/dcpsg.cpp:360 msgid "Printer Settings" msgstr "Nastavení tiskárny" @@ -796,33 +1943,80 @@ msgstr "Nastaven msgid "Printer..." msgstr "Tiskárna..." -#: ../src/common/prntbase.cpp:104 -#: ../src/common/prntbase.cpp:146 -#: ../src/html/htmprint.cpp:507 +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 msgid "Printing" msgstr "Tisk" -#: ../src/common/prntbase.cpp:118 +#: ../src/common/prntbase.cpp:120 msgid "Printing Error" msgstr "Chyba tisku" -#: ../src/common/log.cpp:348 +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Tisknu stranu %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Tisknu..." + +#: ../src/common/log.cpp:356 msgid "Program aborted." msgstr "Program pøeru¹en." -#: ../src/generic/logg.cpp:477 +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Quarto, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 msgid "Question" msgstr "Otázka" -#: ../src/msw/registry.cpp:626 -msgid "Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted." -msgstr "Klíè registru '%s' je potøeba k normálnímu bìhu systému,\npokud ho sma¾ete, systém bude nestabilní:\noperace pøeru¹ena." +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "Chyba pøi ètení ze souboru '%s'" -#: ../src/generic/helphtml.cpp:309 +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "Registrový klíè '%s' u¾ existuje." + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "Registrový klíè '%s' neexistuje, nemohu ho pøejmenovat." + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"Klíè registru '%s' je potøeba k normálnímu bìhu systému,\n" +"pokud ho sma¾ete, systém bude nestabilní:\n" +"operace pøeru¹ena." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "Registrový klíè '%s' u¾ existuje." + +#: ../src/generic/helphtml.cpp:319 msgid "Relevant entries:" msgstr "Související polo¾ky:" -#: ../src/msw/filedlg.cpp:400 +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Zbývající èas : " + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "Odstraní tuto stránku ze zálo¾ek" + +#: ../src/msw/filedlg.cpp:445 +#, c-format msgid "Replace file '%s'?" msgstr "Nahradit soubor '%s'?" @@ -834,18 +2028,17 @@ msgstr "Prav msgid "Roman" msgstr "Patkové" -#: ../src/generic/filedlgg.cpp:1281 -#: ../src/gtk/filedlg.cpp:257 -#: ../src/motif/filedlg.cpp:353 -#: ../src/msw/filedlg.cpp:439 +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format msgid "Save %s file" msgstr "Ulo¾it soubor %s" -#: ../src/common/docview.cpp:240 +#: ../src/common/docview.cpp:249 msgid "Save as" msgstr "Ulo¾it jako" -#: ../src/generic/logg.cpp:431 +#: ../src/generic/logg.cpp:473 msgid "Save log contents to file" msgstr "Ulo¾it obsah logu do souboru" @@ -853,49 +2046,116 @@ msgstr "Ulo msgid "Script" msgstr "Psací" -#: ../src/common/docview.cpp:1414 +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "Hledat" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"Prohledá obsah knih(y) s nápovìdou a vypí¹e v¹echny výskyty textu, který " +"jste zadal" + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "Hledej ve v¹ech knihách" + +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "Hledám..." + +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "Sekce" + +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "Chyba pøi nastavování pozice v souboru '%s'" + +#: ../src/common/docview.cpp:1469 msgid "Select a document template" msgstr "Vyberte ¹ablonu dokumentu" -#: ../src/common/docview.cpp:1437 +#: ../src/common/docview.cpp:1494 msgid "Select a document view" msgstr "Vyberte zobrazení dokumentu" -#: ../src/common/docview.cpp:1332 -#: ../src/common/docview.cpp:1369 +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 msgid "Select a file" msgstr "Vyberte soubor" -#: ../src/generic/dcpsg.cpp:2185 +#: ../src/generic/dcpsg.cpp:2264 msgid "Send to Printer" msgstr "Poslat na tiskárnu" +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "" + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Nastavení" + #: ../src/generic/prntdlgg.cpp:155 msgid "Setup..." msgstr "Nastavení..." +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "" +"Nalezeno nìkolik aktivních vytáèených pøipojení, vybírám jedno náhodnì." + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "Zobraz v¹e" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "Zobrazí v¹echny polo¾ky v rejstøíku" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "Ukázat skryté soubory" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "Zobraz/schovej navigaèní panel" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "Velikost" + #: ../src/generic/fontdlgg.cpp:214 msgid "Slant" msgstr "Sklonìné" -#: ../src/common/docview.cpp:297 +#: ../src/common/docview.cpp:306 msgid "Sorry, could not open this file for saving." msgstr "Tento soubor nelze otevøít pro zápis." -#: ../src/common/docview.cpp:333 -#: ../src/common/docview.cpp:345 +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 msgid "Sorry, could not open this file." msgstr "Tento soubor nelze otevøít." -#: ../src/common/docview.cpp:304 +#: ../src/common/docview.cpp:313 msgid "Sorry, could not save this file." msgstr "Tento soubor nelze ulo¾it." -#: ../src/common/prntbase.cpp:685 +#: ../src/common/prntbase.cpp:687 msgid "Sorry, not enough memory to create a preview." msgstr "Nedostatek pamìti na vytvoøení náhledu." -#: ../src/generic/logg.cpp:585 +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Statement, 5 1/2 x 8 1/2 palce" + +#: ../src/generic/logg.cpp:598 msgid "Status: " msgstr "Status: " @@ -903,35 +2163,146 @@ msgstr "Status: " msgid "Swiss" msgstr "Swiss" +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: Nemohu alokovat pamì»." + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: Chyba pøi naèítání obrázku." + +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: Chyba pøi naèítání obrázku." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: Chyba pøi ukládání obrázku." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: Chyba pøi ukládání obrázku." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloid, 11 x 17 palcù" + #: ../src/generic/fontdlgg.cpp:211 msgid "Teletype" msgstr "Psací stroj" -#: ../src/common/docview.cpp:1414 +#: ../src/common/docview.cpp:1469 msgid "Templates" msgstr "©ablony" -#: ../src/generic/dirdlgg.cpp:214 +#: ../src/generic/dirdlgg.cpp:218 msgid "Temporary" msgstr "Doèasný" -#: ../src/generic/dirdlgg.cpp:206 +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Thajské (ISO-8859-11)" + +#: ../src/generic/dirdlgg.cpp:210 msgid "The Computer" msgstr "Poèítaè" -#: ../src/generic/dirdlgg.cpp:464 +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"Znaková sada '%s' je neznámá. Mù¾ete vybrat\n" +"jinou sadu jako náhradu nebo stisknìte\n" +"[Zru¹it], pokud ji nelze nahradit" + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "Formát schránky '%d' neexistuje." + +#: ../src/generic/dirdlgg.cpp:536 msgid "The directory " msgstr "Adresáø " -#: ../src/mac/thread.cpp:728 -#: ../src/msw/thread.cpp:1038 -msgid "Thread module initialization failed: can not store value in thread local storage" -msgstr "Modul s vlákny se nepodaøilo iniciovat: nemohu ukládat hodnoty v 'local storage'" +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"Soubor '%s' neexistuje.\n" +"Bude odstranìn ze seznamu nedávno otevøených souborù." -#: ../src/mac/thread.cpp:715 -#: ../src/msw/thread.cpp:1025 -msgid "Thread module initialization failed: impossible to allocate index in thread local storage" -msgstr "Modul s vlákny se nepodaøilo iniciovat: nemohu alokovat index v 'local storage'" +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "Po¾adovaný parametr '%s' nebyl zadán." + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "Text nelze ulo¾it." + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "Musíte zadat hodnotu volby '%s'." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" +"Verze Remote Access Service (RAS) na tomto poèítaèi je pøíli¹ stará, prosím " +"upgradujte (chybí tato funkce: %s)." + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"Modul s vlákny se nepodaøilo iniciovat: nemohu ukládat hodnoty v 'local " +"storage'" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "Selhala inicializace modulu s vlákny: nelze vytvoøit klíè" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"Modul s vlákny se nepodaøilo iniciovat: nemohu alokovat index v 'local " +"storage'" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "Nastavení priority vlákna je ignorováno." + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Èas" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Tip dne" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Tip není k dispozici!" #: ../src/generic/prntdlgg.cpp:191 msgid "To:" @@ -941,64 +2312,104 @@ msgstr "Do:" msgid "Top margin (mm):" msgstr "Horní okraj (mm)" +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "Soubor '%s' nelze odebrat z pamì»ového VFS, proto¾e nebyl naèten!" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "Sna¾ím se zjistit NULLové jméno poèítaèe: vzdávám to" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "Turské (ISO-8859-9)" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "US Std Fanfold, 17 7/8 x 11 palcù" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "Nelze otevøít po¾adovaný HTML dokument: %s" + #: ../src/generic/fontdlgg.cpp:242 msgid "Underline" msgstr "Podtr¾ené" -#: ../src/common/resourc2.cpp:305 -#: ../src/common/resourc2.cpp:319 -#: ../src/common/resourc2.cpp:335 -#: ../src/common/resourc2.cpp:349 -#: ../src/common/resourc2.cpp:1378 -#: ../src/common/resourc2.cpp:1392 -#: ../src/common/resourc2.cpp:1408 -#: ../src/common/resourc2.cpp:1422 -#: ../src/common/resource.cpp:1809 -#: ../src/common/resource.cpp:1823 -#: ../src/common/resource.cpp:1840 -#: ../src/common/resource.cpp:1854 -#: ../src/common/resource.cpp:1939 -#: ../src/common/resource.cpp:1953 -#: ../src/common/resource.cpp:1969 -#: ../src/common/resource.cpp:1983 -#: ../src/common/resource.cpp:3024 -#: ../src/common/resource.cpp:3038 -#: ../src/common/resource.cpp:3055 -#: ../src/common/resource.cpp:3069 +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 msgid "Unexpected end of file whilst parsing resource." msgstr "Neoèekávaný konec souboru bìhem zpracování resource" -#: ../src/unix/mimetype.cpp:1304 +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "Neoèekávaný parametr '%s'" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "Neznámá chyba DDD: %08x" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "Neznámé kódování (%d)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format msgid "Unknown field in file %s, line %d: '%s'." msgstr "Neznámá polo¾ka v souboru %s, øádka %d: '%s'." -#: ../src/common/mimecmn.cpp:162 +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "Neznámá 'dlouhá' volba '%s'" + +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "Neznámá volba '%s'" + +#: ../src/common/mimecmn.cpp:161 +#, c-format msgid "Unmatched '{' in an entry for mime type %s." msgstr "Pøebyteèná '{' v popisu mime typu %s." -#: ../src/common/docview.cpp:1867 -#: ../src/common/docview.cpp:1882 -#: ../src/common/docview.cpp:1909 +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 msgid "Unnamed command" msgstr "Nepojmenovaný pøíkaz" -#: ../src/common/resourc2.cpp:687 -#: ../src/common/resource.cpp:2327 +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format msgid "Unrecognized style %s whilst parsing resource." msgstr "Neznámý styl %s bìhem zpracování resource" -#: ../src/msw/clipbrd.cpp:268 -#: ../src/msw/clipbrd.cpp:369 -#: ../src/os2/CLIPBRD.CPP:242 -#: ../src/os2/CLIPBRD.CPP:342 +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 msgid "Unsupported clipboard format." msgstr "Nepodporovaný formát schránky." -#: ../src/generic/dirdlgg.cpp:210 +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Pou¾ití: %s" + +#: ../src/generic/dirdlgg.cpp:215 msgid "User" msgstr "User" -#: ../src/generic/dirdlgg.cpp:211 +#: ../src/generic/dirdlgg.cpp:214 msgid "User Local" msgstr "User Local" @@ -1006,1541 +2417,678 @@ msgstr "User Local" msgid "Validation conflict" msgstr "Konflikt validace" -#: ../src/generic/dirdlgg.cpp:212 +#: ../src/generic/dirdlgg.cpp:216 msgid "Variables" msgstr "Promnìné" -#: ../src/common/docview.cpp:1437 +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "Prohlí¾et soubory v detailním pohledu" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "Prohlí¾et soubory v seznamu" + +#: ../src/common/docview.cpp:1494 msgid "Views" msgstr "Pohledy" -#: ../src/common/docview.cpp:428 -#: ../src/common/resource.cpp:121 -#: ../src/generic/logg.cpp:205 +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Èekání na ukonèení podprocesu selhalo" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 msgid "Warning" msgstr "Varování" -#: ../src/common/log.cpp:358 +#: ../src/common/log.cpp:366 msgid "Warning: " msgstr "Varování: " -#: ../src/generic/dcpsg.cpp:2242 +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "Varování: pokus o vyjmutí HTML tag handleru z prázdného zásobníku." + +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "Západoevropské (ISO-8859-1/Latin 1)" + +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "Západoevropské nové (ISO-8859-15/Latin 0)" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "Pouze celá slova" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "Win32s na Windows 3.1" + +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "Windows 9%c" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Arabské pro Windows (CP 1256)" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Baltské pro Windows (CP 1257)" + +#: ../src/common/fontmap.cpp:116 +#, fuzzy +msgid "Windows Central European (CP 1250)" +msgstr "Hebrejské pro Windows (CP 1255)" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Cyrilice pro Windows (CP 1251)" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Øecké pro Windows (CP 1253)" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Hebrejské pro Windows (CP 1255)" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Turecké pro Windows (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +#, fuzzy +msgid "Windows Western European (CP 1252)" +msgstr "Windows Latin 1 (CP 1252)" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "Chyba pøi zápisu do souboru '%s'" + +#: ../src/generic/dcpsg.cpp:2321 msgid "X Scaling" msgstr "Mìøítko v X" -#: ../src/generic/dcpsg.cpp:2251 +#: ../src/generic/dcpsg.cpp:2330 msgid "X Translation" msgstr "Posunutí v X" -#: ../src/generic/dcpsg.cpp:2246 +#: ../src/generic/dcpsg.cpp:2325 msgid "Y Scaling" msgstr "Mìøítko v Y" -#: ../src/generic/dcpsg.cpp:2255 +#: ../src/generic/dcpsg.cpp:2334 msgid "Y Translation" msgstr "Posunutí v Y" -#: ../src/common/dlgcmn.cpp:107 -#: ../src/common/dlgcmn.cpp:114 +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 #: ../src/motif/msgdlg.cpp:178 msgid "Yes" msgstr "Ano" -#: ../src/common/docview.cpp:1978 -msgid "[EMPTY]" -msgstr "[PRÁZDNÉ]" - -#: ../src/common/fileconf.cpp:1416 -msgid "attempt to change immutable key '%s' ignored." -msgstr "pokus o zmìnu nemìnného klíèe '%s' ignorován." - -#: ../src/common/file.cpp:283 -msgid "can't close file descriptor %d" -msgstr "nemohu zavøít deskriptor souboru %d" - -#: ../src/common/file.cpp:581 -#: ../src/common/file.cpp:591 -msgid "can't commit changes to file '%s'" -msgstr "Nemohu ulo¾it zmìny v souboru '%s'" - -#: ../src/common/file.cpp:231 -msgid "can't create file '%s'" -msgstr "nemohu vytvoøit soubor '%s'" - -#: ../src/common/fileconf.cpp:886 -msgid "can't delete user configuration file '%s'" -msgstr "nemohu smazat u¾ivatelský konfiguraèní soubor '%s'" - -#: ../src/common/file.cpp:462 -msgid "can't determine if the end of file is reached on descriptor %d" -msgstr "nemohu zjistit, jestli byl dosa¾en konec souboru v deskriptoru %d" - -#: ../src/common/file.cpp:428 -msgid "can't find length of file on file descriptor %d" -msgstr "nemohu zjistit délku souboru na deskriptoru %d" - -#: ../src/msw/utils.cpp:328 -msgid "can't find user's HOME, using current directory." -msgstr "nemohu najít u¾ivatelùv domovský adresáø, pou¾iji aktuální adresáø" - -#: ../src/common/file.cpp:342 -msgid "can't flush file descriptor %d" -msgstr "nemohu vyprázdnit (flush) deskriptor %d" - -#: ../src/common/file.cpp:396 -msgid "can't get seek position on file descriptor %d" -msgstr "nemohu zjistit pozici v deskriptoru %d" - -#: ../src/common/ffile.cpp:85 -#: ../src/common/file.cpp:269 -msgid "can't open file '%s'" -msgstr "nemohu otevøít soubor '%s'" - -#: ../src/common/fileconf.cpp:310 -msgid "can't open global configuration file '%s'." -msgstr "nemohu otevøít globální konfiguraèní soubor '%s'." - -#: ../src/common/fileconf.cpp:322 -msgid "can't open user configuration file '%s'." -msgstr "nemohu otevøít konfiguraèní soubor '%s'" - -#: ../src/common/fileconf.cpp:774 -msgid "can't open user configuration file." -msgstr "nemohu otevøít soubor s u¾ivatelskou konfigurací" - -#: ../src/common/file.cpp:309 -msgid "can't read from file descriptor %d" -msgstr "nemohu èíst z deskriptoru %d" - -#: ../src/common/file.cpp:576 -#: ../src/common/file.cpp:586 -msgid "can't remove file '%s'" -msgstr "nemohu odstranit soubor '%s'" - -#: ../src/common/file.cpp:604 -#: ../src/common/file.cpp:607 -msgid "can't remove temporary file '%s'" -msgstr "nemohu odstranit doèasný soubor '%s'" - -#: ../src/common/file.cpp:382 -msgid "can't seek on file descriptor %d" -msgstr "nemohu seekovat v deskriptoru %d" - -#: ../src/common/textfile.cpp:354 -msgid "can't write file '%s' to disk." -msgstr "nemohu zapsat soubor '%s' na disk." - -#: ../src/common/file.cpp:327 -msgid "can't write to file descriptor %d" -msgstr "nemohu zapisovat do deskriptoru %d" - -#: ../src/common/fileconf.cpp:781 -msgid "can't write user configuration file." -msgstr "nemohu ulo¾it u¾ivatelskou konfiguraci" - -#: ../src/common/intl.cpp:351 -msgid "catalog file for domain '%s' not found." -msgstr "katalog pro doménu '%s' nenalezen." - -#: ../src/common/filefn.cpp:1774 -msgid "empty file name in wxFindFileInPath" -msgstr "prázdné jméno souboru ve wxFindFileInPath" - -#: ../src/common/fileconf.cpp:1403 -msgid "entry '%s' appears more than once in group '%s'" -msgstr "polo¾ka '%s' se v '%s' vyskytuje víc ne¾ jednou" - -#: ../src/common/fileconf.cpp:464 -msgid "file '%s', line %d: '%s' ignored after group header." -msgstr "soubor '%s', øádka %d: '%s' ignorováno po hlavièce skupiny." - -#: ../src/common/fileconf.cpp:493 -msgid "file '%s', line %d: '=' expected." -msgstr "soubor '%s', øádka %d: oèekávám '='." - -#: ../src/common/fileconf.cpp:521 -msgid "file '%s', line %d: key '%s' was first found at line %d." -msgstr "soubor '%s', øádka %d: klíè '%s' byl poprvé nalezen na øádce %d." - -#: ../src/common/fileconf.cpp:510 -msgid "file '%s', line %d: value for immutable key '%s' ignored." -msgstr "soubor '%s', øádka %d: hodnota pro nemìnný klíè '%s' ignorována." - -#: ../src/common/fileconf.cpp:431 -msgid "file '%s': unexpected character %c at line %d." -msgstr "soubor '%s': neoèekávaný znak %c na øádku %d." - -#: ../src/common/file.cpp:466 -msgid "invalid eof() return value." -msgstr "¹patná návratová hodnota eof()." - -#: ../src/generic/logg.cpp:490 -msgid "invalid message box return value" -msgstr "¹patná návratová hodnota message boxu" - -#: ../src/common/intl.cpp:542 -msgid "locale '%s' can not be set." -msgstr "locale '%s' nemù¾e být nastaveno" - -#: ../src/common/intl.cpp:635 -msgid "string '%s' not found in domain '%s' for locale '%s'." -msgstr "øetìzec '%s' nenalezen v doménì '%s' pro locale '%s'." - -#: ../src/common/intl.cpp:640 -msgid "string '%s' not found in locale '%s'." -msgstr "øetìzec '%s' nenalezen v locale '%s'." - -#: ../src/common/fileconf.cpp:1523 -msgid "unexpected \" at position %d in '%s'." -msgstr "neoèekávané \" na pozici %d v '%s'." - -#: ../src/common/file.cpp:365 -msgid "unknown seek origin" -msgstr "neznámý poèátek pro nastavení pozice" - -#: ../src/common/docview.cpp:397 -msgid "unnamed" -msgstr "nepojmenovaný" - -#: ../src/common/docview.cpp:1174 -msgid "unnamed%d" -msgstr "nepojmenovaný%d" - -#: ../src/common/intl.cpp:356 -msgid "using catalog '%s' from '%s'." -msgstr "pou¾ívám katalog '%s' z '%s'." - -#: ../src/common/filefn.cpp:1222 -msgid "wxWindows: error finding temporary file name.\n" -msgstr "wxWindows: chyba pøi hledání jména doèasného souboru.\n" - -#: ../src/common/cmdline.cpp:498 -msgid "Unknown long option '%s'" -msgstr "Neznámá 'dlouhá' volba '%s'" - -#: ../src/common/cmdline.cpp:520 -msgid "Unknown option '%s'" -msgstr "Neznámá volba '%s'" - -#: ../src/common/cmdline.cpp:593 -msgid "Option '%s' requires a value, '=' expected." -msgstr "Volba '%s' vy¾aduje hodnotu, oèekávám '='." - -#: ../src/common/cmdline.cpp:612 -msgid "Option '%s' requires a value." -msgstr "Volba '%s' vy¾aduje hodnotu." - -#: ../src/common/cmdline.cpp:654 -msgid "'%s' is not a correct numeric value for option '%s'." -msgstr "'%s' není správná èíselná hodnota pro volbu '%s'." - -#: ../src/common/cmdline.cpp:669 -msgid "Option '%s': '%s' cannot be converted to a date." -msgstr "Volba '%s': '%s' neudává datum." - -#: ../src/common/cmdline.cpp:712 -msgid "Unexpected parameter '%s'" -msgstr "Neoèekávaný parametr '%s'" - -#: ../src/common/cmdline.cpp:735 -msgid "%s (or %s)" -msgstr "%s (nebo %s)" - -#: ../src/common/cmdline.cpp:740 -msgid "The value for the option '%s' must be specified." -msgstr "Musíte zadat hodnotu volby '%s'." - -#: ../src/common/cmdline.cpp:761 -msgid "The required parameter '%s' was not specified." -msgstr "Po¾adovaný parametr '%s' nebyl zadán." - -#: ../src/common/cmdline.cpp:793 -msgid "Usage: %s" -msgstr "Pou¾ití: %s" - -#: ../src/common/cmdline.cpp:875 -msgid "str" -msgstr "øetìzec" - -#: ../src/common/cmdline.cpp:876 -msgid "num" -msgstr "èíslo" - -#: ../src/common/cmdline.cpp:877 -msgid "date" -msgstr "datum" - -#: ../src/common/dlgcmn.cpp:130 -#: ../src/generic/helpwxht.cpp:157 -msgid "Forward" -msgstr "Dále" - -#: ../src/common/dlgcmn.cpp:133 -msgid "Backward" -msgstr "Zpìt" - -#: ../src/common/dlgcmn.cpp:136 -msgid "Setup" -msgstr "Nastavení" - -#: ../src/common/dlgcmn.cpp:139 -msgid "More..." -msgstr "Dal¹í..." - -#: ../src/common/dlgcmn.cpp:142 -#: ../src/generic/prntdlgg.cpp:687 -#: ../src/generic/proplist.cpp:528 -#: ../src/html/helpfrm.cpp:208 -msgid "Help" -msgstr "Nápovìda" - -#: ../src/common/docview.cpp:1192 -msgid " - " -msgstr " - " - -#: ../src/common/docview.cpp:1620 -msgid "The file '%s' doesn't exist and couldn't be opened.\nIt has been also removed from the MRU files list." -msgstr "Soubor '%s' neexistuje.\nBude odstranìn ze seznamu nedávno otevøených souborù." - -#: ../src/common/dynlib.cpp:225 -msgid "Failed to load shared library '%s'" -msgstr "Nelze naèíst sdílenou knihovnu '%s'" - -#: ../src/common/dynlib.cpp:268 -msgid "Couldn't find symbol '%s' in a dynamic library" -msgstr "Nemohu v dynamické knihovnì nalézt symbol '%s'" - -#: ../src/common/ffile.cpp:101 -msgid "can't close file '%s'" -msgstr "nemohu zavøít soubor '%s'" - -#: ../src/common/ffile.cpp:133 -#: ../src/common/ffile.cpp:154 -msgid "Read error on file '%s'" -msgstr "Chyba pøi ètení ze souboru '%s'" - -#: ../src/common/ffile.cpp:168 -msgid "Write error on file '%s'" -msgstr "Chyba pøi zápisu do souboru '%s'" - -#: ../src/common/ffile.cpp:182 -msgid "failed to flush the file '%s'" -msgstr "nelze vyprázdnit buffer souboru '%s'" - -#: ../src/common/ffile.cpp:221 -msgid "Seek error on file '%s'" -msgstr "Chyba pøi nastavování pozice v souboru '%s'" - -#: ../src/common/ffile.cpp:234 -msgid "Can't find current position in file '%s'" -msgstr "Nemohu zjistit pozici v souboru '%s'" - -#: ../src/common/fileconf.cpp:743 -msgid "Config entry name cannot start with '%c'." -msgstr "Polo¾ka konfigurace nemù¾e zaèínat na '%c'" - -#: ../src/common/filefn.cpp:1092 -msgid "Directory '%s' couldn't be created" -msgstr "Nelze vytvoøit adresáø '%s'" - -#: ../src/common/fontmap.cpp:306 -msgid "Unknown encoding (%d)" -msgstr "Neznámé kódování (%d)" - -#: ../src/common/fontmap.cpp:329 -msgid "unknown-%d" -msgstr "nezname-%d" - -#: ../src/common/fontmap.cpp:438 -msgid ": unknown charset" -msgstr ": neznámá znaková sada" - -#: ../src/common/fontmap.cpp:444 -msgid "The charset '%s' is unknown. You may select\nanother charset to replace it with or choose\n[Cancel] if it cannot be replaced" -msgstr "Znaková sada '%s' je neznámá. Mù¾ete vybrat\njinou sadu jako náhradu nebo stisknìte\n[Zru¹it], pokud ji nelze nahradit" - -#: ../src/common/fontmap.cpp:486 -msgid "Failed to remember the encoding for the charset '%s'." -msgstr "Nemohu ulo¾it kódování znakové sady '%s'." - -#: ../src/common/fontmap.cpp:545 -msgid "can't load any font, aborting" -msgstr "nemohu naèíst ¾ádný font, konèím" - -#: ../src/common/fontmap.cpp:598 -msgid ": unknown encoding" -msgstr ": neznámé kódování" - -#: ../src/common/fontmap.cpp:606 -msgid "The encoding '%s' is unknown.\nWould you like to select a font to be used for this encoding\n(otherwise the text in this encoding will not be shown correctly)?" -msgstr "Neznámé kódování '%s'.\nPøejete si vybrat font, který se má s tímto kódováním pou¾ít\n(jinak se text v tomto kódování nezobrazí správnì)?" - -#: ../src/common/imagbmp.cpp:98 -msgid "BMP: Image width > 32767 pixels for file." -msgstr "BMP: Obrázek má ¹íøku vìt¹í ne¾ 32767 pixelù." - -#: ../src/common/imagbmp.cpp:104 -msgid "BMP: Image height > 32767 pixels for file." -msgstr "BMP: Obrázek má vý¹ku vìt¹í ne¾ 32767 pixelù." - -#: ../src/common/imagbmp.cpp:118 -msgid "BMP: Unknown bitdepth in file." -msgstr "BMP: Neznámá bitová hloubka." - -#: ../src/common/imagbmp.cpp:127 -msgid "BMP: Unknown encoding in file." -msgstr "BMP: Neznámé kódování." - -#: ../src/common/imagbmp.cpp:141 -msgid "BMP: Encoding doesn't match bitdepth." -msgstr "BMP: Kódování neodpovídá bitové hloubce." - -#: ../src/common/imagbmp.cpp:150 -#: ../src/common/imagbmp.cpp:162 -msgid "BMP: Couldn't allocate memory." -msgstr "BMP: Nemohu alokovat pamì»." - -#: ../src/common/imagbmp.cpp:271 -msgid "BMP: Cannot deal with 4bit encoded yet." -msgstr "BMP: Zatím neumím zpracovat 4bitové kódování." - -#: ../src/common/image.cpp:413 -#: ../src/common/image.cpp:433 -msgid "Can't load image from file '%s': file does not exist." -msgstr "Nemohu naèíst obrázek ze souboru '%s': soubor neexistuje." - -#: ../src/common/image.cpp:518 -msgid "No handler found for image type." -msgstr "Nenalezen ¾ádný ovladaè pro tento typ obrázkù." - -#: ../src/common/image.cpp:526 -#: ../src/common/image.cpp:560 -msgid "No image handler for type %d defined." -msgstr "®ádný ovladaè pro typ obrázkù %d." - -#: ../src/common/image.cpp:544 -#: ../src/common/image.cpp:576 -msgid "No image handler for type %s defined." -msgstr "®ádný ovladaè pro typ obrázkù %s." - -#: ../src/common/image.cpp:713 -msgid "Can't check image format of file '%s': file does not exist." -msgstr "Nemohu detekovat formát obrázku '%s': soubor neexistuje." - -#: ../src/common/imagjpeg.cpp:195 -msgid "JPEG: Couldn't load - file is probably corrupted." -msgstr "JPEG: Nemohu naèíst obrázek - soubor je nejspí¹ po¹kozen." - -#: ../src/common/imagjpeg.cpp:312 -msgid "JPEG: Couldn't save image." -msgstr "JPEG: Nemohu ulo¾it obrázek." - -#: ../src/common/imagpcx.cpp:434 -msgid "PCX: this is not a PCX file." -msgstr "PCX: tento soubor není PCX." - -#: ../src/common/imagpng.cpp:245 -msgid "Couldn't load a PNG image - file is corrupted or not enough memory." -msgstr "Nemohu naèíst PNG obrázek - buï je po¹kozený soubor nebo je nedostatek pamìti." - -#: ../src/common/imagpnm.cpp:72 -msgid "Loading Grey Ascii PNM image is not yet implemented." -msgstr "Naèítání ¹edých ascii PNM obrázkù není je¹tì implementováno." - -#: ../src/common/imagpnm.cpp:75 -msgid "Loading Grey Raw PNM image is not yet implemented." -msgstr "Naèítání ¹edých raw PNM obrázkù není je¹tì implementováno." - -#: ../src/common/imagpnm.cpp:80 -msgid "PNM: File format is not recognized." -msgstr "PNM: formát souboru nerozeznán." - -#: ../src/common/imagpnm.cpp:96 -msgid "PNM: Couldn't allocate memory." -msgstr "PNM: Nemohu alokovat pamì»." - -#: ../src/common/imagpnm.cpp:112 -msgid "PNM: File seems truncated." -msgstr "PNM: Soubor je nejspí¹ uøíznutý pøed koncem." - -#: ../src/common/imagtiff.cpp:128 -msgid "TIFF: Error loading image." -msgstr "TIFF: Chyba pøi naèítání obrázku." - -#: ../src/common/imagtiff.cpp:136 -msgid "Invalid TIFF image index." -msgstr "Po¹kozený index v TIFF obrázku." - -#: ../src/common/imagtiff.cpp:157 -#: ../src/common/imagtiff.cpp:166 -msgid "TIFF: Couldn't allocate memory." -msgstr "TIFF: Nemohu alokovat pamì»." - -#: ../src/common/imagtiff.cpp:176 -msgid "TIFF: Error reading image." -msgstr "TIFF: Chyba pøi naèítání obrázku." - -#: ../src/common/layout.cpp:1093 -msgid "wxWindowBase::Layout() failed.\n" -msgstr "wxWindowBase::Layout() selhal.\n" - -#: ../src/common/resourc2.cpp:982 -#: ../src/common/resource.cpp:2624 -msgid "Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?" -msgstr "Nelze najít XPM resource %s.\nNezpomnìl jste pou¾ít wxResourceLoadIconData?" - -#: ../src/common/sckaddr.cpp:107 -msgid "Trying to solve a NULL hostname: giving up" -msgstr "Sna¾ím se zjistit NULLové jméno poèítaèe: vzdávám to" - -#: ../src/common/socket.cpp:327 -#: ../src/common/socket.cpp:381 -msgid "wxSocket: invalid signature in ReadMsg." -msgstr "wxSocket: chybná signatura v ReadMsg." - -#: ../src/common/textcmn.cpp:94 -msgid "File couldn't be loaded." -msgstr "Soubor nelze naèíst." - -#: ../src/common/textcmn.cpp:121 -msgid "The text couldn't be saved." -msgstr "Text nelze ulo¾it." - -#: ../src/common/textfile.cpp:234 -msgid "unknown line terminator" -msgstr "neznámý ukonèovaè øádky" - -#: ../src/common/timercmn.cpp:195 -msgid "Failed to get the local system time" -msgstr "Nepodaøilo se zjistit místní systémový èas" - -#: ../src/common/timercmn.cpp:235 -msgid "mktime() failed" -msgstr "mktime() selhalo" - -#: ../src/common/timercmn.cpp:239 -msgid "gmtime() failed" -msgstr "gmtime() selhalo" - -#: ../src/common/timercmn.cpp:243 -msgid "Failed to get the UTC system time." -msgstr "Nemohu zjistit systémový UTC èas." - -#: ../src/common/timercmn.cpp:266 -msgid "wxGetTimeOfDay failed." -msgstr "wxGetTimeOfDay selhalo." - -#: ../src/common/utilscmn.cpp:462 -msgid "ctrl" -msgstr "ctrl" - -#: ../src/common/utilscmn.cpp:464 -msgid "alt" -msgstr "alt" - -#: ../src/common/utilscmn.cpp:466 -msgid "shift" -msgstr "shift" - -#: ../src/common/valtext.cpp:140 -msgid "'%s' is invalid" -msgstr "'%s' je neplatný" - -#: ../src/common/valtext.cpp:160 -msgid "'%s' should only contain ASCII characters." -msgstr "'%s' má obsahovat pouze ASCII znaky." - -#: ../src/common/valtext.cpp:166 -msgid "'%s' should only contain alphabetic characters." -msgstr "'%s' má obsahovat pouze písmena." - -#: ../src/common/valtext.cpp:172 -msgid "'%s' should only contain alphabetic or numeric characters." -msgstr "'%s' má obsahovat pouze písmena nebo èíslice." - -#: ../src/common/valtext.cpp:178 -msgid "'%s' should be numeric." -msgstr "'%s' má být èíslo." - -#: ../src/common/fs_mem.cpp:142 -msgid "Memory VFS already contains file '%s'!" -msgstr "Pamì»ový VFS u¾ obsahuje soubor '%s'!" - -#: ../src/common/fs_mem.cpp:165 -msgid "Failed to store image '%s' to memory VFS!" -msgstr "Nepodaøilo se ulo¾it obrázek '%s' do pamì»ového VFS!" - -#: ../src/common/fs_mem.cpp:200 -msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" -msgstr "Soubor '%s' nelze odebrat z pamì»ového VFS, proto¾e nebyl naèten!" - -#: ../src/generic/dcpsg.cpp:1541 -msgid "Cannot open file for PostScript printing!" -msgstr "Nemohu otevøít soubor k PostScriptovému tisku!" - -#: ../src/generic/dcpsg.cpp:2467 -msgid "A4 sheet, 210 x 297 mm" -msgstr "A4 sheet, 210 x 297 mm" - -#: ../src/generic/dirdlgg.cpp:187 -msgid "Sections" -msgstr "Sekce" - -#: ../src/generic/dirdlgg.cpp:204 -msgid "My Harddisk" -msgstr "Mùj disk" - -#: ../src/generic/dirdlgg.cpp:259 -#: ../src/generic/filedlgg.cpp:708 -msgid "." -msgstr "." - -#: ../src/generic/dirdlgg.cpp:260 -#: ../src/generic/filedlgg.cpp:709 -msgid ".." -msgstr ".." - -#: ../src/generic/dirdlgg.cpp:263 -#: ../src/generic/filedlgg.cpp:712 -msgid "Illegal directory name." -msgstr "Nedovolené jméno adresáøe." - -#: ../src/generic/dirdlgg.cpp:281 -#: ../src/generic/filedlgg.cpp:726 -msgid "File name exists already." -msgstr "Soubor tohoto jména ji¾ existuje." - -#: ../src/generic/dirdlgg.cpp:292 -#: ../src/generic/dirdlgg.cpp:533 -#: ../src/generic/filedlgg.cpp:620 -#: ../src/generic/filedlgg.cpp:739 -msgid "Operation not permitted." -msgstr "Zakázaná operace." - -#: ../src/generic/dirdlgg.cpp:401 -msgid "Show hidden" -msgstr "Zobrazit skryté" - -#: ../src/generic/dirdlgg.cpp:499 +#: ../src/generic/dirdlgg.cpp:571 msgid "You cannot add a new directory to this section." msgstr "Nemù¾ete pøidat nový adresáø do této sekce." -#: ../src/generic/dirdlgg.cpp:500 -msgid "Create directory" -msgstr "Vytváøení adresáøe" +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[PRÁZDNÉ]" -#: ../src/generic/filedlgg.cpp:321 -msgid "

    " -msgstr "" +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "DDEML aplikace zpùsobila prodlou¾enou vzácnou podmínku." -#: ../src/generic/filedlgg.cpp:322 -msgid " " -msgstr " " +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" +"Funkce DDEML byla zavolána bez pøedchozího volání DdeInitialize,\n" +"nebo dostala neplatný identifikátor\n" +"instance." -#: ../src/generic/filedlgg.cpp:326 -msgid " bytes " -msgstr " bajtù" +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "clientùv pokus navázat konverzaci selhal." -#: ../src/generic/filedlgg.cpp:354 -msgid "" -msgstr "" +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "selhala alokace pamìti." -#: ../src/generic/filedlgg.cpp:355 -msgid "" -msgstr "" +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "nepodaøilo se ovìøit parametr pomocí DDEML." -#: ../src/generic/filedlgg.cpp:531 -msgid "Name" -msgstr "Jméno" +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "po¾adavek na synchronní advise transakci vypr¹el." -#: ../src/generic/filedlgg.cpp:532 -msgid "Size" -msgstr "Velikost" +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "po¾adavek na synchronní datovou transakci vypr¹el." -#: ../src/generic/filedlgg.cpp:533 -msgid "Date" -msgstr "Datum" +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "po¾adavek na synchronní execute transakci vypr¹el." -#: ../src/generic/filedlgg.cpp:534 -#: ../src/generic/logg.cpp:764 -msgid "Time" -msgstr "Èas" +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "po¾adavek na synchronní poke transakci vypr¹el." -#: ../src/generic/filedlgg.cpp:535 -msgid "Permissions" -msgstr "Práva" +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "po¾adavek na ukonèení advise transakce vypr¹el." -#: ../src/generic/filedlgg.cpp:605 -msgid "NewName" -msgstr "NoveJmeno" +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" +"v konverzaci ukonèené klientem do¹lo k pokusu o serverovou\n" +"transakci, nebo se server\n" +"ukonèil pøed dodìláním transakce." -#: ../src/generic/filedlgg.cpp:820 -msgid "All files (*)|*" -msgstr "V¹echny (*)|*" +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "transakce neuspìla." -#: ../src/generic/filedlgg.cpp:850 -msgid "View files as a list view" -msgstr "Prohlí¾et soubory v seznamu" +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" -#: ../src/generic/filedlgg.cpp:856 -msgid "View files as a detailed view" -msgstr "Prohlí¾et soubory v detailním pohledu" +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" +"aplikace inicializovaná jako APPCLASS_MONITOR se\n" +" pokusila o DDE transakci,\n" +"nebo se aplikace inicializovaná jako APPCMD_CLIENTONLY pokusila\n" +"o serverovou transakci." -#: ../src/generic/filedlgg.cpp:864 -msgid "Go to parent directory" -msgstr "Jít do nadøazeného adresáøe" +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "interní volání PostMessage selhalo." -#: ../src/generic/filedlgg.cpp:870 -msgid "Go to home directory" -msgstr "Jít do domovského adresáøe" +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "nastala interní chyba v DDEML." -#: ../src/generic/filedlgg.cpp:878 -msgid "Create new directory" -msgstr "Vytvoøit nový adresáø" +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" +"DDEML funkce dostala neplatný identifikátor transakce.\n" +"Identifikátor transakce se stává neplatný, jakmile se aplikace vrátí z\n" +"XTYP_XACT_COMPLETE callbacku." -#: ../src/generic/filedlgg.cpp:885 -msgid "Current directory:" -msgstr "Aktuální adresáø:" +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "pokus o zmìnu nemìnného klíèe '%s' ignorován." -#: ../src/generic/filedlgg.cpp:908 -msgid "Show hidden files" -msgstr "Ukázat skryté soubory" +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "nemohu zavøít soubor '%s'" -#: ../src/generic/filedlgg.cpp:1038 -msgid "Illegal file specification." -msgstr "Neplatná specifikace souboru." +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "nemohu zavøít deskriptor souboru %d" -#: ../src/generic/filedlgg.cpp:1087 -#: ../src/gtk/filedlg.cpp:83 -msgid "Please choose an existing file." -msgstr "Vyberte prosím existující soubor." +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "Nemohu ulo¾it zmìny v souboru '%s'" -#: ../src/generic/helpext.cpp:96 -#: ../src/generic/helpext.cpp:109 -msgid "Cannot open URL '%s'" -msgstr "Nemohu otevøít URL '%s'" +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "nemohu vytvoøit soubor '%s'" -#: ../src/generic/helpwxht.cpp:156 -msgid "Back" -msgstr "Zpìt" +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "nemohu smazat u¾ivatelský konfiguraèní soubor '%s'" -#: ../src/generic/helpwxht.cpp:158 -#: ../src/html/helpfrm.cpp:301 -#: ../src/html/helpfrm.cpp:310 -msgid "Contents" -msgstr "Obsah" +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "nemohu zjistit, jestli byl dosa¾en konec souboru v deskriptoru %d" -#: ../src/generic/helpwxht.cpp:160 -#: ../src/html/helpfrm.cpp:412 -#: ../src/html/helpfrm.cpp:432 -msgid "Search" -msgstr "Hledat" +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "nemohu zjistit délku souboru na deskriptoru %d" -#: ../src/generic/helpwxht.cpp:250 -#: ../src/html/helpctrl.cpp:44 -msgid "Help: %s" -msgstr "Nápovìda: %s" +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "nemohu najít u¾ivatelùv domovský adresáø, pou¾iji aktuální adresáø" -#: ../src/generic/logg.cpp:763 -msgid "Message" -msgstr "Zpráva" +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "nemohu vyprázdnit (flush) deskriptor %d" -#: ../src/generic/printps.cpp:185 -msgid "Printing..." -msgstr "Tisknu..." +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "nemohu zjistit pozici v deskriptoru %d" -#: ../src/generic/printps.cpp:218 -msgid "Printing page %d..." -msgstr "Tisknu stranu %d..." +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "nemohu naèíst ¾ádný font, konèím" -#: ../src/generic/prntdlgg.cpp:555 -#: ../src/generic/prntdlgg.cpp:626 -#: ../src/generic/prntdlgg.cpp:808 -msgid "Paper Size" -msgstr "Velikost papíru" +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "nemohu otevøít soubor '%s'" -#: ../src/generic/progdlgg.cpp:153 -msgid "Elapsed time : " -msgstr "Dosa¾ený èas : " +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "nemohu otevøít globální konfiguraèní soubor '%s'." -#: ../src/generic/progdlgg.cpp:160 -msgid "Estimated time : " -msgstr "Odhadovaný èas : " +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "nemohu otevøít konfiguraèní soubor '%s'" -#: ../src/generic/progdlgg.cpp:167 -msgid "Remaining time : " -msgstr "Zbývající èas : " +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "nemohu otevøít soubor s u¾ivatelskou konfigurací" + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "nemohu èíst z deskriptoru %d" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "nemohu odstranit soubor '%s'" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "nemohu odstranit doèasný soubor '%s'" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "nemohu seekovat v deskriptoru %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "nemohu zapsat soubor '%s' na disk." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "nemohu zapisovat do deskriptoru %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "nemohu ulo¾it u¾ivatelskou konfiguraci" + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "katalog pro doménu '%s' nenalezen." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "datum" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "osmnáctý" + +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "osmý" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "jedenáctý" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "polo¾ka '%s' se v '%s' vyskytuje víc ne¾ jednou" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "navázat" + +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "nelze vyprázdnit buffer souboru '%s'" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "patnáctý" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "pátý" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "soubor '%s', øádka %d: '%s' ignorováno po hlavièce skupiny." + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "soubor '%s', øádka %d: oèekávám '='." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "soubor '%s', øádka %d: klíè '%s' byl poprvé nalezen na øádce %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "soubor '%s', øádka %d: hodnota pro nemìnný klíè '%s' ignorována." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "soubor '%s': neoèekávaný znak %c na øádku %d." + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "první" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "ètrnáctý" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "ètvrtý" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "gmtime() selhalo" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "inicializovat" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "¹patná návratová hodnota eof()." + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "¹patná návratová hodnota message boxu" + +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "velké" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "locale '%s' nemù¾e být nastaveno" + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "hledám katalog '%s' v cestì '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "støední" + +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "Tenké" + +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "mktime() selhalo" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "devatenáctý" + +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "devátý" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "¾ádná chyba DDE." + +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "bezejmenná" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "poledne" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "èíslo" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "problém reentrance." + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "druhý" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "sedmnáctý" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "sedmý" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "¹estnáctý" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "¹estý" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "malé" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "øetìzec" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "desátý" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "odpovìï na transakci zpùsobila nastavení bitu DDE_FBUSY." + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "tøetí" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "tøináctý" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "dnes" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "vèera" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "dvanáctý" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "dvacátý" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "neoèekávané \" na pozici %d v '%s'." #: ../src/generic/progdlgg.cpp:241 msgid "unknown" msgstr "neznámý" -#: ../src/generic/progdlgg.cpp:313 -msgid "Done." -msgstr "Hotovo." - -#: ../src/generic/tipdlg.cpp:138 -msgid "Tips not available, sorry!" -msgstr "Tip není k dispozici!" - -#: ../src/generic/tipdlg.cpp:162 -msgid "Tip of the Day" -msgstr "Tip dne" - -#: ../src/generic/tipdlg.cpp:172 -msgid "&Show tips at startup" -msgstr "&Zobrazit tipy pøi spu¹tìní" - -#: ../src/generic/tipdlg.cpp:175 -msgid "&Next Tip" -msgstr "&Dal¹í tip" - -#: ../src/generic/tipdlg.cpp:177 -msgid "Did you know..." -msgstr "Vìdìl jste..." - -#: ../src/generic/wizard.cpp:168 -msgid "< &Back" -msgstr "< &Zpìt" - -#: ../src/generic/wizard.cpp:171 -#: ../src/generic/wizard.cpp:270 -msgid "&Next >" -msgstr "&Dal¹í >" - -#: ../src/generic/wizard.cpp:268 -msgid "&Finish" -msgstr "&Dokonèit" - -#: ../src/gtk/fontdlg.cpp:72 -msgid "Please choose a valid font." -msgstr "Prosím vyberte korektní font." - -#: ../src/gtk/fontdlg.cpp:159 -msgid "Choose font" -msgstr "Vyberte písmo" - -#: ../src/html/helpctrl.cpp:88 -msgid "Adding book %s" -msgstr "Pøidávám knihu %s" - -#: ../src/html/helpdata.cpp:238 -msgid "Cannot open contents file: %s" -msgstr "Nelze otevøít soubor s obsahem: %s" - -#: ../src/html/helpdata.cpp:253 -msgid "Cannot open index file: %s" -msgstr "Nelze otevøít soubor s rejstøíkem: %s" - -#: ../src/html/helpdata.cpp:288 -msgid "Incorrect version of HTML help book" -msgstr "©patná verze knihy s HTML nápovìdou" - -#: ../src/html/helpdata.cpp:529 -msgid "noname" -msgstr "bezejmenná" - -#: ../src/html/helpdata.cpp:542 -msgid "Cannot open HTML help book: %s" -msgstr "Nelze otevøít HTML nápovìdu: %s" - -#: ../src/html/helpfrm.cpp:267 -msgid "Remove current page from bookmarks" -msgstr "Odstraní tuto stránku ze zálo¾ek" - -#: ../src/html/helpfrm.cpp:268 -msgid "Add current page to bookmarks" -msgstr "Pøidá tuto stránku k zálo¾kám" - -#: ../src/html/helpfrm.cpp:274 -#: ../src/html/helpfrm.cpp:763 -#: ../src/html/helpfrm.cpp:1301 -msgid "(bookmarks)" -msgstr "(zálo¾ky)" - -#: ../src/html/helpfrm.cpp:329 -msgid "Show all" -msgstr "Zobraz v¹e" - -#: ../src/html/helpfrm.cpp:338 -msgid "Find" -msgstr "Najít" - -#: ../src/html/helpfrm.cpp:363 -msgid "Show all items in index" -msgstr "Zobrazí v¹echny polo¾ky v rejstøíku" - -#: ../src/html/helpfrm.cpp:364 -msgid "Display all index items that contain given substring. Search is case insensitive." -msgstr "Zobrazí v¹echny polo¾ky rejstøíku, které obsahují daný podøetìzec. Nerozli¹uje velká a malá písmena." - -#: ../src/html/helpfrm.cpp:370 -msgid "Index" -msgstr "Rejtøík" - -#: ../src/html/helpfrm.cpp:396 -msgid "Case sensitive" -msgstr "Rozli¹ovat velká/malá" - -#: ../src/html/helpfrm.cpp:404 -msgid "Whole words only" -msgstr "Pouze celá slova" - -#: ../src/html/helpfrm.cpp:414 -msgid "Search contents of help book(s) for all occurences of the text you typed above" -msgstr "Prohledá obsah knih(y) s nápovìdou a vypí¹e v¹echny výskyty textu, který jste zadal" - -#: ../src/html/helpfrm.cpp:476 -msgid "Show/hide navigation panel" -msgstr "Zobraz/schovej navigaèní panel" - -#: ../src/html/helpfrm.cpp:481 -msgid "Go back" -msgstr "Jdi zpìt" - -#: ../src/html/helpfrm.cpp:484 -msgid "Go forward" -msgstr "Jdi dopøedu" - -#: ../src/html/helpfrm.cpp:489 -msgid "Go one level up in document hierarchy" -msgstr "Jdi o úroveò vý¹" - -#: ../src/html/helpfrm.cpp:492 -msgid "Previous page" -msgstr "Pøedchozí stránka" - -#: ../src/html/helpfrm.cpp:495 -msgid "Next page" -msgstr "Následující stránka" - -#: ../src/html/helpfrm.cpp:503 -#: ../src/html/helpfrm.cpp:1161 -msgid "Open HTML document" -msgstr "Otevøi HTML dokument" - -#: ../src/html/helpfrm.cpp:509 -msgid "Print this page" -msgstr "Vytiskne tuto stránku" - -#: ../src/html/helpfrm.cpp:515 -msgid "Display options dialog" -msgstr "Zobrazí dialog s nastaveními" - -#: ../src/html/helpfrm.cpp:608 -msgid "Searching..." -msgstr "Hledám..." - -#: ../src/html/helpfrm.cpp:608 -msgid "No matching page found yet" -msgstr "®ádný výskyt nenalezen" - -#: ../src/html/helpfrm.cpp:617 -msgid "Found %i matches" -msgstr "Nalezeno výskytù: %i" - -#: ../src/html/helpfrm.cpp:659 -msgid "(Help)" -msgstr "(Nápovìda)" - -#: ../src/html/helpfrm.cpp:698 -#: ../src/html/helpfrm.cpp:699 -#: ../src/html/helpfrm.cpp:1248 -#: ../src/html/helpfrm.cpp:1275 -msgid "%i of %i" -msgstr "%i z %i" - -#: ../src/html/helpfrm.cpp:715 -msgid "Search in all books" -msgstr "Hledej ve v¹ech knihách" - -#: ../src/html/helpfrm.cpp:852 -msgid "Help Browser Options" -msgstr "Nastavení prohlí¾eèe nápovìdy" - -#: ../src/html/helpfrm.cpp:854 -msgid "very small" -msgstr "velmi malé" - -#: ../src/html/helpfrm.cpp:854 -msgid "small" -msgstr "malé" - -#: ../src/html/helpfrm.cpp:854 -msgid "medium" -msgstr "støední" - -#: ../src/html/helpfrm.cpp:854 -msgid "large" -msgstr "velké" - -#: ../src/html/helpfrm.cpp:854 -msgid "very large" -msgstr "velmi velké" - -#: ../src/html/helpfrm.cpp:861 -msgid "Normal font:" -msgstr "Normální písmo:" - -#: ../src/html/helpfrm.cpp:869 -msgid "Fixed font:" -msgstr "Neproporcionální písmo:" - -#: ../src/html/helpfrm.cpp:879 -msgid "Font size:" -msgstr "Velikost písma:" - -#: ../src/html/helpfrm.cpp:883 -msgid "Preview:" -msgstr "Náhled:" - -#: ../src/html/helpfrm.cpp:927 -msgid "Normal face
    (and underlined. Italic face. Bold face. Bold italic face.
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4

    Fixed size face.
    bold italic bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " -msgstr "Obyèejné písmo
    (a podtr¾ené. Kurziva. Tuèné. Tuèná kurziva.
    velikost -2
    velikost -1
    velikost +0
    velikost +1
    velikost +2
    velikost +3
    velikost +4

    Neproporcionální písmo.
    tuèné kurziva tuèná kurziva podtr¾ené
    velikost -2
    velikost -1
    velikost +0
    velikost +1
    velikost +2
    velikost +3
    velikost +4
    " - -#: ../src/html/helpfrm.cpp:1150 -msgid "Help Printing" -msgstr "Tisk nápovìdy" - -#: ../src/html/htmlfilt.cpp:146 -msgid "Cannot open HTML document: %s" -msgstr "Nelze otevøít HTML dokument: %s" - -#: ../src/html/htmlpars.cpp:179 -msgid "Warning: attempt to remove HTML tag handler from empty stack." -msgstr "Varování: pokus o vyjmutí HTML tag handleru z prázdného zásobníku." - -#: ../src/html/htmlwin.cpp:166 -msgid "Connecting..." -msgstr "Pøipojuji se..." - -#: ../src/html/htmlwin.cpp:175 -msgid "Unable to open requested HTML document: %s" -msgstr "Nelze otevøít po¾adovaný HTML dokument: %s" - -#: ../src/html/htmlwin.cpp:187 -msgid "Loading : " -msgstr "Naèítám : " - -#: ../src/html/htmlwin.cpp:216 -msgid "Done" -msgstr "Hotovo" - -#: ../src/html/htmlwin.cpp:251 -msgid "HTML anchor %s does not exist." -msgstr "Kotva HTML %s neexistuje." - -#: ../src/html/htmprint.cpp:486 -msgid "There was a problem previewing.\nPerhaps your current printer is not set correctly?" -msgstr "Pøi vytváøení náhledu se vyskytl problém.\nMo¾ná nemáte správnì nastavenou tiskárnu?" - -#: ../src/html/htmprint.cpp:486 -msgid "Previewing" -msgstr "Vytváøím náhled" - -#: ../src/html/htmprint.cpp:491 -msgid " Preview" -msgstr " Náhled" - -#: ../src/html/htmprint.cpp:507 -msgid "There was a problem printing.\nPerhaps your current printer is not set correctly?" -msgstr "Pøi tisku se vyskytla chyba.\nMo¾ná máte ¹patnì nastavenou tiskárnu?" - -#: ../src/html/winpars.cpp:357 -msgid "Failed to display HTML document in %s encoding" -msgstr "Nelze zobrati HTML dokument v kódování %s" - -#: ../src/motif/app.cpp:584 -msgid "wxWindows could not open display for '%s': exiting." -msgstr "wxWindows nemohou otevøít displej pro '%s': ukonèuji." - -#: ../src/msw/app.cpp:726 -msgid "Unrecoverable program error detected: the application will terminate." -msgstr "Nastala chyba, z ní¾ se nelze zotavit: program bude ukonèen." - -#: ../src/msw/app.cpp:727 -msgid "Fatal Error" -msgstr "Fatální chyba" - -#: ../src/msw/app.cpp:1224 -#: ../src/os2/APP.CPP:904 -msgid "Fatal error: exiting" -msgstr "Fatální chyba: program se ukonèí" - -#: ../src/msw/clipbrd.cpp:539 -msgid "Failed to put data on the clipboard" -msgstr "Nepodaøilo se vlo¾it data do schránky" - -#: ../src/msw/clipbrd.cpp:623 -msgid "Failed to get data from the clipboard" -msgstr "Nelze získat data ze schránky" - -#: ../src/msw/clipbrd.cpp:652 -msgid "Failed to retrieve the supported clipboard formats" -msgstr "Nelze zjistit formáty podporované schránkou" - -#: ../src/msw/dde.cpp:285 -msgid "Failed to register DDE server '%s'" -msgstr "Nelze zaregistrovat DDE server '%s'" - -#: ../src/msw/dde.cpp:301 -msgid "Failed to unregister DDE server '%s'" -msgstr "Nelze odregistrovat DDE server '%s'" - -#: ../src/msw/dde.cpp:402 -msgid "Failed to create connection to server '%s' on topic '%s'" -msgstr "Nelze navázat spojení se server '%s' na téma '%s'" - -#: ../src/msw/dde.cpp:587 -msgid "DDE poke request failed" -msgstr "Po¾adavek na DDE poke selhal" - -#: ../src/msw/dde.cpp:606 -msgid "Failed to establish an advise loop with DDE server" -msgstr "Nelze navázat 'advise loop' s DDE serverem" - -#: ../src/msw/dde.cpp:625 -msgid "Failed to terminate the advise loop with DDE server" -msgstr "Nelze ukonèit 'advise loop' s DDE serverem" - -#: ../src/msw/dde.cpp:651 -msgid "Failed to send DDE advise notification" -msgstr "Nepodaøilo se poslat DDE advise notifikaci" - -#: ../src/msw/dde.cpp:924 -msgid "Failed to create DDE string" -msgstr "Nelze vytvoøit DDE øe»ezec" - -#: ../src/msw/dde.cpp:962 -msgid "no DDE error." -msgstr "¾ádná chyba DDE." - -#: ../src/msw/dde.cpp:966 -msgid "a request for a synchronous advise transaction has timed out." -msgstr "po¾adavek na synchronní advise transakci vypr¹el." - -#: ../src/msw/dde.cpp:969 -msgid "the response to the transaction caused the DDE_FBUSY bit to be set." -msgstr "odpovìï na transakci zpùsobila nastavení bitu DDE_FBUSY." - -#: ../src/msw/dde.cpp:972 -msgid "a request for a synchronous data transaction has timed out." -msgstr "po¾adavek na synchronní datovou transakci vypr¹el." - -#: ../src/msw/dde.cpp:975 -msgid "a DDEML function was called without first calling the DdeInitialize function,\n\ror an invalid instance identifier\n\rwas passed to a DDEML function." -msgstr "DDEML funkce byla zavolána bez pøedchozího volání DdeInitialize,\n\rnebo byl do DDEML funkce\n\rpøedán neplatný identifikátor instance." - -#: ../src/msw/dde.cpp:978 -msgid "an application initialized as APPCLASS_MONITOR has\n\rattempted to perform a DDE transaction,\n\ror an application initialized as APPCMD_CLIENTONLY has \n\rattempted to perform server transactions." -msgstr "aplikace iniciovaná jako APPCLASS_MONITOR se\n\rpokusila provést DDE transakci,\n\rnebo se aplikace iniciovaná jako APPCMD_CLIENTONLY pokusila\n\rprovést serverové transakce." - -#: ../src/msw/dde.cpp:981 -msgid "a request for a synchronous execute transaction has timed out." -msgstr "po¾adavek na synchronní execute transakci vypr¹el." - -#: ../src/msw/dde.cpp:984 -msgid "a parameter failed to be validated by the DDEML." -msgstr "nepodaøilo se ovìøit parametr pomocí DDEML." - -#: ../src/msw/dde.cpp:987 -msgid "a DDEML application has created a prolonged race condition." -msgstr "DDEML aplikace zpùsobila prodlou¾enou vzácnou podmínku." - -#: ../src/msw/dde.cpp:990 -msgid "a memory allocation failed." -msgstr "selhala alokace pamìti." - -#: ../src/msw/dde.cpp:993 -msgid "a client's attempt to establish a conversation has failed." -msgstr "clientùv pokus navázat konverzaci selhal." - -#: ../src/msw/dde.cpp:996 -msgid "a transaction failed." -msgstr "transakce neuspìla." - -#: ../src/msw/dde.cpp:999 -msgid "a request for a synchronous poke transaction has timed out." -msgstr "po¾adavek na synchronní poke transakci vypr¹el." - -#: ../src/msw/dde.cpp:1002 -msgid "an internal call to the PostMessage function has failed. " -msgstr "interní volání PostMessage selhalo." - -#: ../src/msw/dde.cpp:1005 -msgid "reentrancy problem." -msgstr "problém reentrance." - -#: ../src/msw/dde.cpp:1008 -msgid "a server-side transaction was attempted on a conversation\n\rthat was terminated by the client, or the server\n\rterminated before completing a transaction." -msgstr "bìhem konverzace pøeru¹ené klientem do¹lo k pokusu o \n\rserverovou transakci, nebo se server ukonèil\n\rpøed dokonèením transakce." - -#: ../src/msw/dde.cpp:1011 -msgid "an internal error has occurred in the DDEML." -msgstr "nastala interní chyba v DDEML." - -#: ../src/msw/dde.cpp:1014 -msgid "a request to end an advise transaction has timed out." -msgstr "po¾adavek na ukonèení advise transakce vypr¹el." - -#: ../src/msw/dde.cpp:1017 -msgid "an invalid transaction identifier was passed to a DDEML function.\n\rOnce the application has returned from an XTYP_XACT_COMPLETE callback,\n\rthe transaction identifier for that callback is no longer valid." -msgstr "DDEML funkce dostala neplatný identifikátor transakce.\n\rJakmile se aplikace vrátí z XTYP_XACT_COMPLETE callbacku,identifikátor transakce je u¾ neplatný." - -#: ../src/msw/dde.cpp:1020 -msgid "Unknown DDE error %08x" -msgstr "Neznámá chyba DDD: %08x" - -#: ../src/msw/dialog.cpp:177 -msgid "Failed to create dialog." -msgstr "Nelze vytvoøit dialog." - -#: ../src/msw/dialup.cpp:352 -msgid "Dial up functions are unavailable because the remote access service (RAS) is not installed on this machine. Please install it." -msgstr "Vytáèené pøipojení není dostupné, proto¾e Remote Access Service (RAS) není nainstalován. Prosím, nainstalujte ho." - -#: ../src/msw/dialup.cpp:415 -msgid "The version of remote access service (RAS) installed on this machine is too old, please upgrade (the following required function is missing: %s)." -msgstr "Verze Remote Access Service (RAS) na tomto poèítaèi je pøíli¹ stará, prosím upgradujte (chybí tato funkce: %s)." - -#: ../src/msw/dialup.cpp:459 -msgid "Failed to retrieve text of RAS error message" -msgstr "Nepodaøilo se získat text chybového hlá¹ení RAS" - -#: ../src/msw/dialup.cpp:462 +#: ../src/msw/dialup.cpp:466 +#, c-format msgid "unknown error (error code %08x)." msgstr "neznámá chyba (kód %08x)." -#: ../src/msw/dialup.cpp:514 -msgid "Cannot find active dialup connection: %s" -msgstr "Nemohu nalézt aktivní vytáèené pøipojení: %s" - -#: ../src/msw/dialup.cpp:536 -msgid "Several active dialup connections found, choosing one randomly." -msgstr "Nalezeno nìkolik aktivních vytáèených pøipojení, vybírám jedno náhodnì." - -#: ../src/msw/dialup.cpp:636 -msgid "Failed to establish dialup connection: %s" -msgstr "Nepodaøilo se navázat vytáèené spojení: %s" - -#: ../src/msw/dialup.cpp:696 -msgid "Failed to get ISP names: %s" -msgstr "Nepodaøilo se získat jména ISP: %s" - -#: ../src/msw/dialup.cpp:743 -msgid "Failed to connect: no ISP to dial." -msgstr "Nelze se pøipojit: ¾ádný ISP." - -#: ../src/msw/dialup.cpp:763 -msgid "Choose ISP to dial" -msgstr "Vyberte ISP, ke kterému se má volat" - -#: ../src/msw/dialup.cpp:765 -msgid "Please choose which ISP do you want to connect to" -msgstr "Prosím vyberte si poskytovatele (ISP), ke kterému se chcete pøipojit" - -#: ../src/msw/dialup.cpp:798 -msgid "Failed to connect: missing username/password." -msgstr "Nepodaøilo se pøipojit: chybí u¾ivatelské jméno nebo heslo." - -#: ../src/msw/dialup.cpp:829 -msgid "Cannot find the location of address book file" -msgstr "Nemohu najít umístìní adresáøe" - -#: ../src/msw/dialup.cpp:857 -msgid "Failed to %s dialup connection: %s" -msgstr "Nepodaøilo se %s pøipojení k Internetu: %s" - -#: ../src/msw/dialup.cpp:858 -msgid "initiate" -msgstr "inicializovat" - -#: ../src/msw/dialup.cpp:858 -msgid "establish" -msgstr "navázat" - -#: ../src/msw/dialup.cpp:922 -msgid "Cannot hang up - no active dialup connection." -msgstr "Nemohu zavìsit - ¾ádná aktivní vytáèená pøipojení." - -#: ../src/msw/dialup.cpp:930 -msgid "Failed to terminate the dialup connection: %s" -msgstr "Nelze ukonèit vytáèené spojení: %s" - -#: ../src/msw/dib.cpp:434 -msgid "Can't open file '%s'" -msgstr "Nemohu otevøít soubor '%s'" - -#: ../src/msw/listctrl.cpp:208 -msgid "Can't create list control window, check that comctl32.dll is installed." -msgstr "Nemohu vytvoøit ovládací prvek list, zkontrolujte, jestli máte nainstalovanou comctl32.dll." - -#: ../src/msw/mdi.cpp:402 -#: ../src/os2/MDI.CPP:336 -msgid "Failed to create MDI parent frame." -msgstr "Nepodaøilo se vytvoøit rodièovské MDI okno." - -#: ../src/msw/registry.cpp:342 -msgid "Can't get info about registry key '%s'" -msgstr "Nemohu získat informace o registrovém klíèi '%s'" - -#: ../src/msw/registry.cpp:368 -msgid "Can't open registry key '%s'" -msgstr "Nemohu otevøít registrový klíè '%s'" - -#: ../src/msw/registry.cpp:393 -msgid "Can't create registry key '%s'" -msgstr "Nemohu vytvoøit registrový klíè '%s'" - -#: ../src/msw/registry.cpp:410 -msgid "Can't close registry key '%s'" -msgstr "Nemohu zavøít registrový klíè '%s'" - -#: ../src/msw/registry.cpp:428 -msgid "Registry value '%s' already exists." -msgstr "Registrový klíè '%s' u¾ existuje." - -#: ../src/msw/registry.cpp:436 -msgid "Failed to rename registry value '%s' to '%s'." -msgstr "Nelze pøejmenovat registrový klíè '%s' na '%s'." - -#: ../src/msw/registry.cpp:486 -msgid "Can't copy values of unsupported type %d." -msgstr "Nemohu kopírovat hodnoty nepodporovaného typu %d" - -#: ../src/msw/registry.cpp:497 -msgid "Registry key '%s' does not exist, cannot rename it." -msgstr "Registrový klíè '%s' neexistuje, nemohu ho pøejmenovat." - -#: ../src/msw/registry.cpp:528 -msgid "Registry key '%s' already exists." -msgstr "Registrový klíè '%s' u¾ existuje." - -#: ../src/msw/registry.cpp:536 -msgid "Failed to rename the registry key '%s' to '%s'." -msgstr "Nelze pøejmenovat registrový klíè '%s' na '%s'." - -#: ../src/msw/registry.cpp:590 -msgid "Failed to copy registry value '%s'" -msgstr "Nelze zkopírovat hodnotu registru '%s'" - -#: ../src/msw/registry.cpp:600 -msgid "Failed to copy the contents of registry key '%s' to '%s'." -msgstr "Nelze zkopírovat obsah registrového klíèe '%s' do '%s'." - -#: ../src/msw/registry.cpp:656 -msgid "Can't delete key '%s'" -msgstr "Nemohu smazat klíè '%s'" - -#: ../src/msw/registry.cpp:681 -msgid "Can't delete value '%s' from key '%s'" -msgstr "Nemohu smazat hodnotu '%s' z klíèe '%s'" - -#: ../src/msw/registry.cpp:692 -msgid "Can't delete value of key '%s'" -msgstr "Nemohu smazat hodnotu klíèe '%s'" - -#: ../src/msw/registry.cpp:770 -#: ../src/msw/registry.cpp:809 -msgid "Can't read value of key '%s'" -msgstr "Nemohu naèíst hodnotu klíèe '%s'" - -#: ../src/msw/registry.cpp:795 -#: ../src/msw/registry.cpp:895 -msgid "Can't set value of '%s'" -msgstr "Nemohu nastavit hodnotu '%s'" - -#: ../src/msw/registry.cpp:871 -msgid "Can't read value of '%s'" -msgstr "Nemohu pøeèíst hodnotu '%s'" - -#: ../src/msw/registry.cpp:947 -msgid "Can't enumerate values of key '%s'" -msgstr "Nemohu vyjmenovat hodnoty klíèe '%s'" - -#: ../src/msw/registry.cpp:992 -msgid "Can't enumerate subkeys of key '%s'" -msgstr "Nemohu vyjmenovat podklíèe klíèe '%s'" - -#: ../src/msw/statbr95.cpp:121 -msgid "Failed to create a status bar." -msgstr "Nelze vytvoøit status bar." - -#: ../src/msw/textctrl.cpp:217 -msgid "Impossible to create a rich edit control, using simple text control instead. Please reinstall riched32.dll" -msgstr "Není mo¾né vytvoøit rich edit prvek, pou¾iji obyèejný. Pøeinstalujte prosím riched32.dll." - -#: ../src/msw/textctrl.cpp:1126 -msgid "Could not load Rich Edit DLL '%s'" -msgstr "Nemohu naèíst Rich Edit DLL '%s'" - -#: ../src/msw/thread.cpp:124 -msgid "Can not create mutex" -msgstr "Nemohu vytvoøit mutex." - -#: ../src/msw/utils.cpp:497 -msgid "Win32s on Windows 3.1" -msgstr "Win32s na Windows 3.1" - -#: ../src/msw/utils.cpp:501 -msgid "Windows 9%c" -msgstr "Windows 9%c" - -#: ../src/msw/utils.cpp:529 -msgid "Windows 3.1" -msgstr "Windows 3.1" - -#: ../src/msw/utilsexc.cpp:425 -msgid "Can't create the inter-process read pipe" -msgstr "Nemohu vytvoøit meziprocesovou rouru pro ètení" - -#: ../src/msw/utilsexc.cpp:435 -msgid "Can't create the inter-process write pipe" -msgstr "Nemohu vytvoøit meziprocesovou rouru pro zápis" - -#: ../src/msw/utilsexc.cpp:594 -msgid "Couldn't launch DDE server '%s'." -msgstr "Nemohu spustit DDE server '%s'." - -#: ../src/msw/window.cpp:2331 -msgid "Can't find dummy dialog template!\nCheck resource include path for finding wx.rc." -msgstr "Nemohu najít dialogovou ¹ablonu dummy!\nOvìøte, jestli je správnì nastavená cesta k wx.rc." - -#: ../src/msw/window.cpp:2378 -msgid "Can't create window of class %s!\nPossible Windows 3.x compatibility problem?" -msgstr "Nemohu vytvoøit okno tøídy %s!\nMo¾ná se jedná o problém kompatibility Windows 3.x?" - -#: ../src/msw/ole/dataobj.cpp:151 -msgid "Couldn't register clipboard format '%s'." -msgstr "Nemohu zaregistrovat formát schránky '%s'." - -#: ../src/msw/ole/dataobj.cpp:169 -msgid "The clipboard format '%d' doesn't exist." -msgstr "Formát schránky '%d' neexistuje." - -#: ../src/os2/CLIPBRD.CPP:137 -msgid "Failed to allocate %dKb of memory for clipboard transfer." -msgstr "Nepodaøilo se alokovat %dKb pamìti pro schránku." - -#: ../src/os2/CLIPBRD.CPP:151 -msgid "Failed to set clipboard data in format %s" -msgstr "Nepodaøilo se vlo¾it data ve formátu %s do schránky." - -#: ../src/os2/THREAD.CPP:175 -msgid "Can not create event semaphore." -msgstr "Nemohu vytvoøit semafor pro události." - -#: ../src/os2/THREAD.CPP:444 -#: ../src/os2/THREAD.CPP:457 -msgid "Can not suspend thread %lu" -msgstr "Nemohu pozastavit vlákno %lu." - -#: ../src/os2/UTILSEXC.CPP:175 -msgid "Execution of command '%s' failed with error: %ul" -msgstr "Chyba pøi vykonávání pøíkazu '%s': %ul" - -#: ../src/unix/dialup.cpp:336 -msgid "Already dialling ISP." -msgstr "U¾ vytáèím." - -#: ../src/unix/threadpsx.cpp:588 -msgid "Cannot start thread: error writing TLS" -msgstr "Nemohu spustit vlákno: chyba zápisu TLS" - -#: ../src/unix/threadpsx.cpp:755 -msgid "Failed to join a thread, potential memory leak detected - please restart the program" -msgstr "Nemohu pøipojit vlákno, zji¹tìna mo¾ná chybná alokace pamìti - restartujte prosím program" - -#: ../src/unix/threadpsx.cpp:935 -msgid "Cannot retrieve thread scheduling policy." -msgstr "Nemohu obnovit plánovací politiku vlákna." - -#: ../src/unix/threadpsx.cpp:954 -msgid "Cannot get priority range for scheduling policy %d." -msgstr "Nemohu zjistit rozsah priorit pro plánovací politiku %d." - -#: ../src/unix/threadpsx.cpp:962 -msgid "Thread priority setting is ignored." -msgstr "Nastavení priority vlákna je ignorováno." - -#: ../src/unix/threadpsx.cpp:1441 -msgid "Thread module initialization failed: failed to create thread key" -msgstr "Selhala inicializace modulu s vlákny: nelze vytvoøit klíè" - -#: ../src/unix/utilsunx.cpp:263 -#: ../src/unix/utilsunx.cpp:599 -msgid "Waiting for subprocess termination failed" -msgstr "Èekání na ukonèení podprocesu selhalo" - -#: ../src/unix/utilsunx.cpp:343 -msgid "Impossible to get child process input" -msgstr "Není mo¾né získat vstup synovského procesu" - -#: ../src/unix/utilsunx.cpp:430 -#: ../src/unix/utilsunx.cpp:454 -msgid "Failed to execute '%s'\n" -msgstr "Nepodaøilo se spustit '%s'\n" - -#: ../src/unix/utilsunx.cpp:524 -msgid "Failed to redirect child process input/output" -msgstr "Nepodaøilo se pøesmìrovat vstup/výstup synovského procesu" - -#: ../src/unix/utilsunx.cpp:691 -msgid "Cannot get the hostname" -msgstr "Nemohu zjistit jméno poèítaèe" - -#: ../src/unix/utilsunx.cpp:727 -msgid "Cannot get the official hostname" -msgstr "Nemohu zjistit oficiální jméno poèítaèe" - -#: ../src/unix/utilsunx.cpp:803 -#: ../src/unix/utilsunx.cpp:811 -msgid "Error " -msgstr "Chyba" - -#: ../src/html/helpfrm.cpp:1152 -msgid "Cannot print empty page." -msgstr "Nemohu tisknout prázdnou stránku." - -#: ../src/html/htmprint.cpp:272 -msgid ": file does not exist!" -msgstr ": soubor neexistuje!" - -#: ../src/common/imaggif.cpp:58 -msgid "GIF: error in GIF image format." -msgstr "GIF: chyba ve formátu GIF obrázku." - -#: ../src/common/imaggif.cpp:61 -msgid "GIF: not enough memory." -msgstr "GIF: nedostatek pamìti." - -#: ../src/common/imaggif.cpp:64 -msgid "GIF: unknown error!!!" -msgstr "GIF: neznámá chyba!!!" - -#: ../src/common/imaggif.cpp:74 -msgid "GIF: data stream seems to be truncated." -msgstr "GIF: datový proud je useknutý pøed koncem." - -#: ../src/common/imagpcx.cpp:447 -msgid "PCX: image format unsupported" -msgstr "PCX: nepodporovaný formát obrázku" - -#: ../src/common/imagpcx.cpp:448 -#: ../src/common/imagpcx.cpp:471 -msgid "PCX: couldn't allocate memory" -msgstr "PCX: nemohu alokovat pamì»" - -#: ../src/common/imagpcx.cpp:449 -msgid "PCX: version number too low" -msgstr "PCX: èíslo verze je pøíli¹ malé" - -#: ../src/common/imagpcx.cpp:450 -#: ../src/common/imagpcx.cpp:472 -msgid "PCX: unknown error !!!" -msgstr "PCX: neznámá chyba !!!" - -#: ../src/common/imagpcx.cpp:470 -msgid "PCX: invalid image" -msgstr "PCX: po¹kozený obrázek" - +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "neznámý poèátek pro nastavení pozice" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "neznámý poèátek pro nastavení pozice" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "nezname-%d" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "nepojmenovaný" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "nepojmenovaný%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "pou¾ívám katalog '%s' z '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "velmi velké" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "velmi malé" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "wxGetTimeOfDay selhalo." + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: chybná signatura v ReadMsg." + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: neznámá událost!" + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "wxWindows nemohou otevøít displej pro '%s': ukonèuji." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: chyba pøi hledání jména doèasného souboru.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "vèera" + +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Cyrilice (Latin 5)" + +#~ msgid "ISO-8859-12" +#~ msgstr "ISO-8859-12" + +#~ msgid "ISO-8859-14" +#~ msgstr "ISO-8859-14" + +#~ msgid "Windows Latin 2 (CP 1250)" +#~ msgstr "Windows Latin 2 (CP 1250)" + +#~ msgid "Previewing" +#~ msgstr "Vytváøím náhled" + +#~ msgid "Print Error" +#~ msgstr "Chyba tisku" + +#~ msgid "" +#~ "There was a problem previewing.\n" +#~ "Perhaps your current printer is not set correctly?" +#~ msgstr "" +#~ "Pøi vytváøení náhledu se vyskytl problém.\n" +#~ "Mo¾ná nemáte správnì nastavenou tiskárnu?" + +#~ msgid "" +#~ "There was a problem printing.\n" +#~ "Perhaps your current printer is not set correctly?" +#~ msgstr "" +#~ "Pøi tisku se vyskytla chyba.\n" +#~ "Mo¾ná máte ¹patnì nastavenou tiskárnu?" + +#~ msgid "Baltic II (ISO-8859-10)" +#~ msgstr "Baltské II (ISO-8859-10)" + +#~ msgid "ISO-8859-13" +#~ msgstr "ISO-8859-13" diff --git a/locale/da.po b/locale/da.po new file mode 100644 index 0000000000..19efde0498 --- /dev/null +++ b/locale/da.po @@ -0,0 +1,3221 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows-2.2.1\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 1999-10-23 12:30+0100\n" +"Last-Translator: Leif Jensen \n" +"Language-Team: wxWindows translators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso8859-1\n" +"Content-Transfer-Encoding: 8 bit\n" + +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(Har du de nødvendige tilladelser?)" + +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"eksisterer ikke\n" +"Opret den nu?" + +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (fejl %ld: %s)" + +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr "" + +#: ../src/html/htmprint.cpp:494 +#, fuzzy +msgid " Preview" +msgstr "Udskriftsmugkig" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr "" + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "#define %s skal være et heltal" + +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "" + +#: ../src/common/cmdline.cpp:735 +#, fuzzy, c-format +msgid "%s (or %s)" +msgstr " (fejl %ld: %s)" + +#: ../src/generic/logg.cpp:243 +#, fuzzy, c-format +msgid "%s Error" +msgstr "Fejl" + +#: ../src/generic/logg.cpp:251 +#, fuzzy, c-format +msgid "%s Information" +msgstr "Information" + +#: ../src/generic/logg.cpp:247 +#, fuzzy, c-format +msgid "%s Warning" +msgstr "Advarsel" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s er ikke en bitmap resource specifikation" + +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "%s er ikke en icon resource specifikation" + +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s: forkert resourcefil syntax." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&Luk" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "" + +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&Log" + +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Næste" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +#, fuzzy +msgid "&Next >" +msgstr "&Næste" + +#: ../src/generic/tipdlg.cpp:175 +#, fuzzy +msgid "&Next Tip" +msgstr "&Næste" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "&Gendan" + +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "&Gendan " + +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "&Gem..." + +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Vis tips ved opstart" + +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "" + +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "&Reetablér" + +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +#, fuzzy +msgid "&Window" +msgstr "&Reetablér" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' har ekstra '..', ignoreret." + +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' er ugyldigt" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "" + +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' er ikke et lovligt meddelelseskatalog" + +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "'%s' er sandsynligvis en binær fil." + +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' skal være numerisk." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' må kun indeholde ASCII karakterer." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' må kun indeholde bogstaver." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' må kun indeholde bogstaver eller tal." + +#: ../src/html/helpfrm.cpp:679 +#, fuzzy +msgid "(Help)" +msgstr "Hjælp" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", forventet static, #include eller #define\n" +"under parsing af resource." + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "" + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr "" + +#: ../src/common/paper.cpp:120 +#, fuzzy +msgid "10 x 14 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "" + +#: ../src/html/htmprint.cpp:272 +#, fuzzy +msgid ": file does not exist!" +msgstr "Bibliotek eksisterer ikke" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr "" + +#: ../src/common/fontmap.cpp:712 +#, fuzzy +msgid ": unknown encoding" +msgstr "ukendt søgeorigo" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr "" + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr "" + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4
    " +msgstr "" + +#: ../src/common/paper.cpp:113 +#, fuzzy +msgid "A3 sheet, 297 x 420 mm" +msgstr "A3 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "A4 papir, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +#, fuzzy +msgid "A4 small sheet, 210 x 297 mm" +msgstr "A4 papir, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +#, fuzzy +msgid "A5 sheet, 148 x 210 mm" +msgstr "A4 papir, 210 x 297 mm" + +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "" + +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "Tilføj til bruger farver" + +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "Alle" + +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "" + +#: ../include/wx/defs.h:1686 +msgid "All files (*.*)|*.*" +msgstr "" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "" + +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "Tilføj log til fil '%s' (valg af [Nej] vil overskrive den)?" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "" + +#: ../src/common/paper.cpp:116 +#, fuzzy +msgid "B4 sheet, 250 x 354 mm" +msgstr "A4 papir, 210 x 297 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "" + +#: ../src/common/paper.cpp:117 +#, fuzzy +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "A4 papir, 210 x 297 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "" + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +#, fuzzy +msgid "BMP: Couldn't allocate memory." +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/imagbmp.cpp:62 +#, fuzzy +msgid "BMP: Couldn't save invalid image." +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/imagbmp.cpp:154 +#, fuzzy +msgid "BMP: Couldn't write data." +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/imagbmp.cpp:131 +#, fuzzy +msgid "BMP: Couldn't write the file header." +msgstr "Kunne ikke afslutte tråd" + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "" + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "" + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "" + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "" + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "" + +#: ../src/generic/helpwxht.cpp:157 +#, fuzzy +msgid "Back" +msgstr "Tilbage" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Tilbage" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "Bitmap resourcespecifikation %s blev ikke fundet" + +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "Fed" + +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "Bund margin (mm):" + +#: ../src/common/paper.cpp:105 +#, fuzzy +msgid "C sheet, 17 x 22 in" +msgstr "A4 papir, 210 x 297 mm" + +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "&Rens" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "Kan ikke oprette hændelsesobjekt." + +#: ../src/msw/thread.cpp:124 +#, fuzzy +msgid "Can not create mutex" +msgstr "Kan ikke oprette mutex." + +#: ../src/mac/thread.cpp:92 +msgid "Can not create mutex." +msgstr "Kan ikke oprette mutex." + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "Kan ikke nummerere filer i bibliotek '%s'" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "Kan ikke genoptage tråd %x" + +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "Kan ikke starte tråd: fejl ved skrivning af TLS." + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "Kan ikke suspendere tråd %x" + +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "Kan ikke vente på trådafslutning" + +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "Kan ikke &reetablere " + +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "" + +#: ../src/msw/registry.cpp:418 +#, fuzzy, c-format +msgid "Can't close registry key '%s'" +msgstr "kan ikke lukke registry nøgle '%s'" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "" + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" + +#: ../src/msw/registry.cpp:399 +#, fuzzy, c-format +msgid "Can't create registry key '%s'" +msgstr "kan ikke oprette registry nøgle '%s'" + +#: ../src/msw/utilsexc.cpp:482 +#, fuzzy +msgid "Can't create the inter-process read pipe" +msgstr "Kan ikke danne tråd" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "" + +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "Kan ikke danne tråd" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"Kan ikke oprette vindue af klasse %s!\n" +"Muligvis Windows 3.x kompatibilitetsproblem?" + +#: ../src/msw/registry.cpp:658 +#, fuzzy, c-format +msgid "Can't delete key '%s'" +msgstr "kan ikke slette nøgle '%s'" + +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "Kan ikke slette INI filen '%s'" + +#: ../src/msw/registry.cpp:683 +#, fuzzy, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "kan ikke slette værdi '%s' fra nøgle '%s'" + +#: ../src/msw/registry.cpp:694 +#, fuzzy, c-format +msgid "Can't delete value of key '%s'" +msgstr "kan ikke slette værdi af nøgle '%s'" + +#: ../src/msw/registry.cpp:1020 +#, fuzzy, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "kan ikke nummerere undernøgle af nøgle '%s'" + +#: ../src/msw/registry.cpp:975 +#, fuzzy, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "kan ikke nummerere værdi af nøgle '%s'" + +#: ../src/common/ffile.cpp:234 +#, fuzzy, c-format +msgid "Can't find current position in file '%s'" +msgstr "kan ikke åbge brugerkonfigurationsfil '%s'." + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"Kan ikke finde dummy dialogskabelon!\n" +"Check resource include stien til at finde wx.rc." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "Kan ikke find serialisationsobjektet '%s' til objektet '%s'." + +#: ../src/msw/registry.cpp:348 +#, fuzzy, c-format +msgid "Can't get info about registry key '%s'" +msgstr "kan ikke gå information om registry nøgle '%s'" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "" + +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "Kan ikke load'e wxSerial dynamisk bibliotek" + +#: ../src/msw/dib.cpp:434 +#, fuzzy, c-format +msgid "Can't open file '%s'" +msgstr "kan ikke åbne filen '%s'" + +#: ../src/msw/registry.cpp:374 +#, fuzzy, c-format +msgid "Can't open registry key '%s'" +msgstr "kan ikke åbne registry nøgle '%s'" + +#: ../src/msw/registry.cpp:899 +#, fuzzy, c-format +msgid "Can't read value of '%s'" +msgstr "kan ikke læse værdien af '%s'" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, fuzzy, c-format +msgid "Can't read value of key '%s'" +msgstr "kan ikke læse værdien af nøgle '%s'" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "Kan ikke gemme log-indhold til fil." + +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "Kan ikke sætte trådprioritet" + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, fuzzy, c-format +msgid "Can't set value of '%s'" +msgstr "kan ikke sætte værdien af '%s'" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "Afbryd" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "Kan ikke få prioritetsområde for afviklingsalgoritme %d." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "Kan ikke få host-navnet" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "Kan ikke få det officielle host-navn" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "" + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "Kan ikke initialisere OLE" + +#: ../src/html/htmlfilt.cpp:146 +#, fuzzy, c-format +msgid "Cannot open HTML document: %s" +msgstr "Kan ikke åbne URL '%s'" + +#: ../src/html/helpdata.cpp:657 +#, fuzzy, c-format +msgid "Cannot open HTML help book: %s" +msgstr "Kan ikke åbne URL '%s'" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "Kan ikke åbne URL '%s'" + +#: ../src/html/helpdata.cpp:353 +#, fuzzy, c-format +msgid "Cannot open contents file: %s" +msgstr "Kan ikke åbne filen" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Kan ikke åbne fil til PostScript udskrivning!" + +#: ../src/html/helpdata.cpp:368 +#, fuzzy, c-format +msgid "Cannot open index file: %s" +msgstr "Kan ikke åbne filen" + +#: ../src/html/helpfrm.cpp:1174 +#, fuzzy +msgid "Cannot print empty page." +msgstr "Kan ikke oprette mutex." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "Kan ikke hente trådafviklingsalgoritme." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "Kan ikke starte tråd: fejl ved skrivning af TLS" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "" + +#: ../src/common/fontmap.cpp:113 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/common/fontmap.cpp:101 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "" + +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Rens log indholdet" + +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "Luk" + +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "Luk dette vindue" + +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Konfigureringsindgangsnav kan ikke begynde med '%c'." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "Bekræft" + +#: ../src/html/htmlwin.cpp:165 +#, fuzzy +msgid "Connecting..." +msgstr "Udskriver..." + +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Forbindelse til wxHelp havde timeout efter %d sekunder" + +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "Kopier:" + +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "Kunne ikke finde resource include file %s." + +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "Kunne ikke finde tab til id" + +#: ../src/msw/textctrl.cpp:1249 +#, fuzzy, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "Kunne ikke initialisere 'Rich Edit DLL'" + +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"Kunne ikke opløse kontrolklass eller id '%d'. Brug (ikke-nul) heltal " +"istedet\n" +" eller angiv #define (se manualen for fenurligheder)" + +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"Kunne ikke opløse meny-id '%s'. Brug (ikke-nul) heltal istedet\n" +"eller angiv #define (se manualen for fenurligheder)" + +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "Kunne ikke start dokument smugkig." + +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "Kunne ikke starte udskrivning" + +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "Kunne ikke overføre data til vindue" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "Kunne ikke få en mutex-lås" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "Kunne ikek tilføje et billede til billedlisten." + +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "Kunne ikke ændre tilstanden af hændelsesobjekt." + +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Kunne ikke finde symbolet '%s' i et dynamisk bibliotek" + +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "Kunne ikke få nuværende trådpegepind" + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "" + +#: ../src/common/imagpng.cpp:251 +#, fuzzy +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "Kunne ikke load'e et PNG billede - sandsynligvis er filen kurrupt." + +#: ../src/msw/ole/dataobj.cpp:151 +#, fuzzy, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "Kunne ikke skrive klippebordsdata i format %s" + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "Kunne ikke frigive en mutex" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "Kunne ikke hente information om listekontorlenhed %d." + +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "Kunne ikke afslutte tråd" + +#: ../src/generic/dirdlgg.cpp:572 +#, fuzzy +msgid "Create directory" +msgstr "Opret nyt bibliotek" + +#: ../src/generic/filedlgg.cpp:883 +#, fuzzy +msgid "Create new directory" +msgstr "Opret nyt bibliotek" + +#: ../src/generic/filedlgg.cpp:890 +#, fuzzy +msgid "Current directory:" +msgstr "Biblioteket " + +#: ../src/common/fontmap.cpp:104 +msgid "Cyrillic (ISO-8859-5)" +msgstr "" + +#: ../src/common/paper.cpp:106 +#, fuzzy +msgid "D sheet, 22 x 34 in" +msgstr "A4 papir, 210 x 297 mm" + +#: ../src/msw/dde.cpp:597 +#, fuzzy +msgid "DDE poke request failed" +msgstr "Røroprettelse fejlede" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "Dekorativt" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Vidste du..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Bibliotek '%s' kunne ikke oprettes" + +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "Bibliotek eksisterer ikke" + +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "" + +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "Ønsker du at gemme ændringer til dokument %s?" + +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "" + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "" + +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "indgange blev fundet" + +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"Omegnsvariabelekspansion fejlede: manglende '%c' ved position %d i '%s'." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "Fejl" + +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Fejl " + +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "Fejl ved oprettelse af bibliotek" + +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "Fejl: " + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "" + +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "og så videre" + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "Afvikling af kommando '%s' fejlede" + +#: ../src/common/paper.cpp:112 +#, fuzzy +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "Forventede '*' ved parsning af resource." + +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "Forventede '=' ved parsning af resource." + +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "Forventede 'char' ved parsning af resource." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "" + +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "Kunne ikke lukke klippebordet." + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "" + +#: ../src/msw/dialup.cpp:747 +#, fuzzy +msgid "Failed to connect: no ISP to dial." +msgstr "Fejlede ved oprettelse af dialog." + +#: ../src/msw/registry.cpp:594 +#, fuzzy, c-format +msgid "Failed to copy registry value '%s'" +msgstr "kan ikke åbne registry nøgle '%s'" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "" + +#: ../src/msw/dde.cpp:934 +#, fuzzy +msgid "Failed to create DDE string" +msgstr "Fejlede ved oprettelse af dialog." + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "Kunne ikke oprette MDI forældreramme." + +#: ../src/msw/statbr95.cpp:149 +#, fuzzy +msgid "Failed to create a status bar." +msgstr "Kunne ikke oprette MDI forældreramme." + +#: ../src/msw/dde.cpp:401 +#, fuzzy, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "Kunne ikke oprette tooltip '%s'" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" + +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "Kunne ikke oprette bibliotek " + +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "" + +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "Kunne ikke tømme klippebordet." + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, fuzzy, c-format +msgid "Failed to execute '%s'\n" +msgstr "Kan ikke eksekvere '%s'\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Kunne ikke finde XBM resource %s.\n" +"Glemt at bruge wxResourceLoadBitmapData?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"Kunne ikke finde XBM resource %s.\n" +"Glemt at bruge wxResourceLoadIconData?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Kunne ikke finde XPM resource %s.\n" +"Glemt at bruge wxResourceLoadBitmapData?" + +#: ../src/msw/dialup.cpp:699 +#, fuzzy, c-format +msgid "Failed to get ISP names: %s" +msgstr "Kunne ikke oprette MDI forældreramme." + +#: ../src/msw/clipbrd.cpp:623 +#, fuzzy +msgid "Failed to get data from the clipboard" +msgstr "Kunne ikke hente data fra klippebordet." + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "" + +#: ../src/common/timercmn.cpp:196 +#, fuzzy +msgid "Failed to get the local system time" +msgstr "Kunne ikke oprette tooltip '%s'" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Kunne ikke load'e delt bibliotek '%s'" + +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "Kunne ikke åbne klippebordet." + +#: ../src/msw/clipbrd.cpp:539 +#, fuzzy +msgid "Failed to put data on the clipboard" +msgstr "Kunne ikke hente data fra klippebordet." + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "" + +#: ../src/msw/dde.cpp:285 +#, fuzzy, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Kunne ikke oprette tooltip '%s'" + +#: ../src/common/fontmap.cpp:552 +#, fuzzy, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Kunne ikke oprette tooltip '%s'" + +#: ../src/msw/registry.cpp:440 +#, fuzzy, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "Kunne ikke oprette tooltip '%s'" + +#: ../src/msw/registry.cpp:540 +#, fuzzy, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "kan ikke oprette registry nøgle '%s'" + +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "Kunne ikke hente data fra klippebordet." + +#: ../src/msw/dialup.cpp:463 +#, fuzzy +msgid "Failed to retrieve text of RAS error message" +msgstr "Kunne ikke hente data fra klippebordet." + +#: ../src/msw/clipbrd.cpp:652 +#, fuzzy +msgid "Failed to retrieve the supported clipboard formats" +msgstr "Kunne ikke hente data fra klippebordet." + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "" + +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "Kunne ikke skrive klippebordsdata." + +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "Kunne ikke sætte trådprioritet %d." + +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "" + +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "Kunne ikke afslutte en tråd." + +#: ../src/msw/dde.cpp:635 +#, fuzzy +msgid "Failed to terminate the advise loop with DDE server" +msgstr "Kunne ikke afslutte en tråd." + +#: ../src/msw/dialup.cpp:933 +#, fuzzy, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Kunne ikke afslutte en tråd." + +#: ../src/msw/dde.cpp:301 +#, fuzzy, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Kunne ikke oprette tooltip '%s'" + +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "Fatal fejl" + +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "Fatal fejl: " + +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Fatal fejl: stopper" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "Fil '%s' eksisterer allerede, vil du virkelig overskrive den?" + +#: ../src/common/textcmn.cpp:94 +#, fuzzy +msgid "File couldn't be loaded." +msgstr "Bibliotek '%s' kunne ikke oprettes" + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Fil fejl" + +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "" + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "Filer (%s)|%s" + +#: ../src/html/helpfrm.cpp:340 +#, fuzzy +msgid "Find" +msgstr "Fandt " + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "" + +#: ../src/common/paper.cpp:118 +#, fuzzy +msgid "Folio, 8 1/2 x 13 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "Font" + +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "Gaffel fejlede ;-)" + +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Fremad" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "Fandt " + +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "Fra:" + +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "" + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "" + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "" + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "" + +#: ../src/common/paper.cpp:142 +#, fuzzy +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/common/paper.cpp:141 +#, fuzzy +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "" + +#: ../src/html/helpfrm.cpp:504 +#, fuzzy +msgid "Go forward" +msgstr "Fremad" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "" + +#: ../src/generic/filedlgg.cpp:875 +#, fuzzy +msgid "Go to home directory" +msgstr "Biblioteket " + +#: ../src/generic/filedlgg.cpp:869 +#, fuzzy +msgid "Go to parent directory" +msgstr "Kunne ikke oprette bibliotek " + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/html/htmlwin.cpp:250 +#, fuzzy, c-format +msgid "HTML anchor %s does not exist." +msgstr "Bibliotek eksisterer ikke" + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books " +"(*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All " +"files (*.*)|*" +msgstr "" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Hjælp" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "Hjælpeindex" + +#: ../src/html/helpfrm.cpp:1172 +#, fuzzy +msgid "Help Printing" +msgstr "Udskriver" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, fuzzy, c-format +msgid "Help: %s" +msgstr "Hjælp" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "Ikonresource specifikation %s blev ikke fundet." + +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "Forkert formateret resourcefil syntax." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +#, fuzzy +msgid "Illegal directory name." +msgstr "Biblioteket " + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "" + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "" + +#: ../src/html/helpfrm.cpp:372 +#, fuzzy +msgid "Index" +msgstr "Hjælpeindex" + +#: ../src/common/fontmap.cpp:111 +msgid "Indian (ISO-8859-12)" +msgstr "" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "" + +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "Kursiv" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "" + +#: ../src/common/imagjpeg.cpp:202 +#, fuzzy +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "Kunne ikke load'e et PNG billede - sandsynligvis er filen kurrupt." + +#: ../src/common/imagjpeg.cpp:315 +#, fuzzy +msgid "JPEG: Couldn't save image." +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "Liggende" + +#: ../src/common/paper.cpp:110 +#, fuzzy +msgid "Ledger, 17 x 11 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "Venstre margin (mm):" + +#: ../src/common/paper.cpp:103 +#, fuzzy +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/common/paper.cpp:108 +#, fuzzy +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/common/paper.cpp:102 +#, fuzzy +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Let" + +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "Load %s file" + +#: ../src/html/htmlwin.cpp:186 +#, fuzzy +msgid "Loading : " +msgstr "Advarsel: " + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "" + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "" + +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "Log gemt i filen '%s'." + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "MDI barn" + +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "Mailcap fil %s, linie %d: ufuldstændig indgang ignoreret." + +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "Mime.type fil %s, linie %d: uafsluttet streng." + +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "Modern" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Mere..." + +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "Monterede enheder" + +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "" + +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "Mit hjem" + +#: ../src/generic/filedlgg.cpp:533 +#, fuzzy +msgid "Name" +msgstr "er " + +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "Ny..." + +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "Nej" + +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "Ingen XBM facilitet tilgængelig!" + +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "Ingen XPM facilitet tilgængelig!" + +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "Ingen XPM ikonfacilitet tilgængelig!" + +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "Ingen indgange blev fundet." + +#: ../src/common/fontmap.cpp:716 +#, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "" + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "" + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "" + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normal" + +#: ../src/html/helpfrm.cpp:881 +#, fuzzy +msgid "Normal font:" +msgstr "Normal" + +#: ../src/common/paper.cpp:122 +#, fuzzy +msgid "Note, 8 1/2 x 11 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "OK" + +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "" + +#: ../src/common/cmdline.cpp:590 +#, fuzzy, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "fil '%s', linie %d: '=' forventet." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "" + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "" + +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Valgmuligheder" + +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "Orientering" + +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +#, fuzzy +msgid "PCX: couldn't allocate memory" +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "" + +#: ../src/common/imagpcx.cpp:470 +#, fuzzy +msgid "PCX: invalid image" +msgstr "ugyldig dato" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "" + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "" + +#: ../src/common/imagpnm.cpp:96 +#, fuzzy +msgid "PNM: Couldn't allocate memory." +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "" + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "" + +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Side %d" + +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Side %d af %d" + +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Sideopsætning" + +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Sider" + +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +#, fuzzy +msgid "Paper Size" +msgstr "Side størrelse" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Side størrelse" + +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "Røroprettelse fejlede" + +#: ../src/gtk/fontdlg.cpp:72 +#, fuzzy +msgid "Please choose a valid font." +msgstr "Vælg venligst en eksisterende fil." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Vælg venligst en eksisterende fil." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "" + +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "Vent venligst..." + +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "Opretstående" + +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "EfterSkrift ;-)" + +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "PostScript fil" + +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "PostScript fil:" + +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "Bare smugkig" + +#: ../src/html/helpfrm.cpp:903 +#, fuzzy +msgid "Preview:" +msgstr "Bare smugkig" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "Udskriv" + +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "Udskriftsmugkig" + +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "Udskriftsmugkig fejlede" + +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "Udskriftsområde" + +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "Udskriftsopsætning" + +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "Udskriv i farver" + +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "Udskriftsspuling" + +#: ../src/html/helpfrm.cpp:529 +#, fuzzy +msgid "Print this page" +msgstr "Udskriftsområde" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "Udskriv til fil" + +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "Udskriv..." + +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "Printer kommando: " + +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "Printer valgmuligheder: " + +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "Printer opsætninger" + +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "Printer kommando:" + +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "Printer valgmuligheder" + +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "Printer valgmuligheder:" + +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "Printer..." + +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "Udskriver" + +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "Udskriftsfejl" + +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Udskriver side %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Udskriver..." + +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "Program afsluttet" + +#: ../src/common/paper.cpp:119 +#, fuzzy +msgid "Quarto, 215 x 275 mm" +msgstr "A4 210 x 297 mm" + +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "Spørgsmål" + +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, fuzzy, c-format +msgid "Read error on file '%s'" +msgstr "Erstat fil '%s'?" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "" + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "" + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"Registry nøgle '%s' er nødvendig for almindelig system operation,\n" +"hvis du sletter den vil efterlade dit system i ubrugelig tilstand:\n" +"operationen blev afbrudt." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "" + +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Relevante indgange:" + +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "" + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "" + +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "Erstat fil '%s'?" + +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Højre margin (mm):" + +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "Roman" + +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "Gem %s fil" + +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Gem som" + +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "Gen log indhold til fil" + +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "Script" + +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "" + +#: ../src/html/helpfrm.cpp:628 +#, fuzzy +msgid "Searching..." +msgstr "Udskriver..." + +#: ../src/generic/dirdlgg.cpp:191 +#, fuzzy +msgid "Sections" +msgstr "Valgmuligheder" + +#: ../src/common/ffile.cpp:221 +#, fuzzy, c-format +msgid "Seek error on file '%s'" +msgstr "kan ikke åbne filen '%s'" + +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Vælg en dokumentskabelon" + +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Vælg et dokumentudseende" + +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Vælg en file" + +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "Send til printer" + +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "" + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Opsætning" + +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "Opsætning..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "" + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Hældning" + +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "Undskyld, jeg kunne ikke åbne denne fil mht. gemning." + +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "Undskyld, jeg kunne ikke åbne denne fil." + +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "Undskyld, jeg kunne ikke gemme denne fil." + +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "Undskyld, der er ikke nok hukkomelse til at danne et smugkig." + +#: ../src/common/paper.cpp:111 +#, fuzzy +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "Status: " + +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "Swiss" + +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +#, fuzzy +msgid "TIFF: Couldn't allocate memory." +msgstr "Kunne ikke oprette en timer" + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "" + +#: ../src/common/imagtiff.cpp:214 +#, fuzzy +msgid "TIFF: Error reading image." +msgstr "Fejl ved oprettelse af bibliotek" + +#: ../src/common/imagtiff.cpp:291 +#, fuzzy +msgid "TIFF: Error saving image." +msgstr "Fejl ved oprettelse af bibliotek" + +#: ../src/common/imagtiff.cpp:338 +#, fuzzy +msgid "TIFF: Error writing image." +msgstr "Fejl ved oprettelse af bibliotek" + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "Skrivemaskine" + +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "Skabeloner" + +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "Midlertidig" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "Datamaskinen" + +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "" + +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "Biblioteket " + +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "" + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "" + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "" + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"Trådmodul initialisering fejlede: kan ikke gemme værdi i lokal trådlager" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "Trådmodul initialisering fejlede: kunne ikke oprette trådnøgle" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"Trådmodul initialisering fejlede: umuligt at allokere index i lokal trådlager" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "" + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Dagens tip" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Tips ikke tilgængelige, beklager!" + +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "Til:" + +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "Top margin (mm):" + +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Understeget" + +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "Uventet afslutning på filen uder parsning af resource." + +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "Ukendt felt i fil %s, linie %d: '%s'." + +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "" + +#: ../src/common/cmdline.cpp:518 +#, fuzzy, c-format +msgid "Unknown option '%s'" +msgstr "Kan ikke åbne URL '%s'" + +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "Uparret '{' i en indgang for mime type %s." + +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "Unavngiven kommando" + +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "Ugenkendt stil %s under parsning af resource." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "Usupporteret klippebordsformat." + +#: ../src/common/cmdline.cpp:797 +#, fuzzy, c-format +msgid "Usage: %s" +msgstr "Side %d" + +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Bruger" + +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "Lokal bruger" + +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "Valideringskonflikt" + +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "Variable" + +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "" + +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "Udseender" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Venten på under-process afslutning fejlede" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "Advarsel" + +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "Advarsel: " + +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "" + +#: ../src/common/fontmap.cpp:100 +msgid "Western European (ISO-8859-1)" +msgstr "" + +#: ../src/common/fontmap.cpp:114 +msgid "Western European with Euro (ISO-8859-15)" +msgstr "" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "" + +#: ../src/msw/mdi.cpp:1318 +#, fuzzy +msgid "Window" +msgstr "Fandt " + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "" + +#: ../src/common/fontmap.cpp:116 +msgid "Windows Central European (CP 1250)" +msgstr "" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "" + +#: ../src/common/fontmap.cpp:118 +msgid "Windows Western European (CP 1252)" +msgstr "" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "" + +#: ../src/common/ffile.cpp:168 +#, fuzzy, c-format +msgid "Write error on file '%s'" +msgstr "kan ikke åbne filen '%s'" + +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "X scalering" + +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "X oversættelse" + +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "Y scalering" + +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "Y oversættelse" + +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "Ja" + +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "" + +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[TOM]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "" + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "" + +#: ../src/msw/dde.cpp:1000 +#, fuzzy +msgid "a memory allocation failed." +msgstr "Røroprettelse fejlede" + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" + +#: ../src/msw/dde.cpp:1006 +#, fuzzy +msgid "a transaction failed." +msgstr "Røroprettelse fejlede" + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "" + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" + +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "forsøg på at ændre uforanderlig nøgle '%s' blev ignoreret." + +#: ../src/common/ffile.cpp:101 +#, fuzzy, c-format +msgid "can't close file '%s'" +msgstr "kan ikke åbne filen '%s'" + +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "kan ikke lukke fildeskriptor %d" + +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "kan ikke overgive ændringer til fil '%s'" + +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "kan ikke oprette file '%s'" + +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "kan ikke slette brugerkonfigurationsfil '%s'" + +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "kan ikke afgøre om slutningen af filen er nået på deskriptor %d" + +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "kan ikke finde længden af filen på fildeskriptor %d" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "kan ikke finde brugerens HJEM, bruger nuværende bibliotek." + +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "kan ikke skylle fildeskriptor %d ud" + +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "kan ikke få søgeposition på fildescriptor %d" + +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "kan ikke åbne filen '%s'" + +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "kan ikke åbne global konfiguraionsfil '%s'." + +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "kan ikke åbge brugerkonfigurationsfil '%s'." + +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "kan ikke åbne brugerkonfigurationsfil." + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "kan ikke læse fra fildeskriptor %d" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "kan ikke fjerne filen '%s'" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "kan ikke fjerne midlertidig fil '%s'" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "kan ikke søge på fildeskriptor %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "kan ikke skrive fil '%s' til disk." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "kan ikke skrive til fildeskriptor %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "kan ikke skrive brugerkonfigurationsfil." + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "katalogfil for domæne '%s' blev ikke fundet." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3162 +#, fuzzy +msgid "eighth" +msgstr "Let" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "indgang '%s' optræder mere en engang i gruppe '%s'" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "" + +#: ../src/common/ffile.cpp:182 +#, fuzzy, c-format +msgid "failed to flush the file '%s'" +msgstr "Log gemt i filen '%s'." + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3159 +#, fuzzy +msgid "fifth" +msgstr "skift" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "fil '%s', linie %d: '%s' ignoreret efter gruppeindledning" + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "fil '%s', linie %d: '=' forventet." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "fil '%s', linie %d: nøgle '%s blev først fundet på linie %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "fil '%s', linie %d: værdi af uforanderlig nøgle '%s' blev ignoreret." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "fil '%s': uventet karakter %c på linie %d." + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "" + +#: ../src/msw/dialup.cpp:861 +#, fuzzy +msgid "initiate" +msgstr "ugyldig dato" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "ugyldig eof() returværdi." + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "ugyldig meddelelsesboks returværdi" + +#: ../src/html/helpfrm.cpp:874 +#, fuzzy +msgid "large" +msgstr "Sider" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "locale '%s' kan ikke sættes." + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "søger efter katalog '%s' i sti '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "" + +#: ../src/common/datetime.cpp:3319 +#, fuzzy +msgid "midnight" +msgstr "Let" + +#: ../src/common/timercmn.cpp:236 +#, fuzzy +msgid "mktime() failed" +msgstr "Gaffel fejlede ;-)" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3163 +#, fuzzy +msgid "ninth" +msgstr "Udskriv" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "" + +#: ../src/html/helpdata.cpp:644 +#, fuzzy +msgid "noname" +msgstr "unavngivet" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "" + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "skift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3160 +#, fuzzy +msgid "sixth" +msgstr "skift" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "" + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "uventet \" på position %s i '%s'." + +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "" + +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "ukendt søgeorigo" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "ukendt søgeorigo" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "unavngivet" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "unavngivet%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "bruger katalog '%s' fra '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "" + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "" + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "" + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "wxWindows kunne ikke åbne diplay for '%s': stopper." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: fejl ved søgning efter midlertidig filnavn.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "" + +#, fuzzy +#~ msgid "..." +#~ msgstr "Ny..." + +#~ msgid "Can't execute command '%s'" +#~ msgstr "Kan ikke eksekvere kommandoen '%s'" + +#~ msgid "Fatal Error" +#~ msgstr "Fatal fejl" + +#, fuzzy +#~ msgid "Previewing" +#~ msgstr "Bare smugkig" + +#~ msgid "Print Error" +#~ msgstr "Udskriv fejl" + +#, fuzzy +#~ msgid "" +#~ "Unrecoverable program error detected: the application will terminate." +#~ msgstr "Uoprettelig programfejl opdaget: programmet bliver afbrudt." + +#~ msgid "string '%s' not found in domain '%s' for locale '%s'." +#~ msgstr "streng '%s' blev ikke fundet i domæne '%s for locale '%s'." + +#~ msgid "string '%s' not found in locale '%s'." +#~ msgstr "streng '%s' blev ikke fundet i locale '%s'." + +#~ msgid " B.C." +#~ msgstr " F.K." + +#~ msgid "%s is invalid." +#~ msgstr "%s er ulovlig" + +#~ msgid "%s should be numeric." +#~ msgstr "%s skulle være numerisk" + +#~ msgid "%s should only contain ASCII characters." +#~ msgstr "%s må kun indeholde ASCII karakterer" + +#~ msgid "%s should only contain alphabetic characters." +#~ msgstr "%s må kun indeholde bogstaver" + +#~ msgid "%s should only contain alphabetic or numeric characters." +#~ msgstr "%s må kun indeholde bogstaver eller tal" + +#~ msgid "Application Error" +#~ msgstr "Program fejl" + +#~ msgid "Can not create tooltip control" +#~ msgstr "Kan ikke oprette tooltip kontrol" + +#~ msgid "Can not get data in format '%s' from clipboard." +#~ msgstr "Kan ikke få data i format '%s' fra klippebordet." + +#~ msgid "Can not get priority range for scheduling policy %d." +#~ msgstr "Kan ikke få prioriteringsområde for afviklingsalgoritme %d." + +#~ msgid "Can not put data in format '%s' on clipboard." +#~ msgstr "Kan ikke skrive data i format '%s' til klippebordet." + +#~ msgid "Can not retrieve thread scheduling policy." +#~ msgstr "Kan ikke hente trådafviklingsalgoritme." + +#~ msgid "Character '%c' is invalid in a config entry name." +#~ msgstr "Karakter '%c' er ulovlig i en konfigurationsindgangsnavn." + +#~ msgid "Debug" +#~ msgstr "Aflus" + +#~ msgid "DoLogString must be overrided if it's called." +#~ msgstr "DoLogString skal overskrives, hvis det bliver kaldt." + +#~ msgid "Enter the name of the directory to create" +#~ msgstr "Indtast navnet på biblioteket, der skal oprettes" + +#~ msgid "Entry name can't start with '%c'." +#~ msgstr "Indgangsnavn kan ikke starte med '%c'." + +#~ msgid "Failed to created dialog." +#~ msgstr "Kunne ikke oprette dialog." + +#~ msgid "" +#~ "Mime.types file %s, line %d: extra characters after the field value ignored." +#~ msgstr "" +#~ "Mime.type fil %s, linie %d: ekstra karakterer efter feltværdien ignoreret." + +#~ msgid "Sizer error" +#~ msgstr "Sizer fejl" + +#~ msgid "Thread module initialization failed: failed to create pthread key." +#~ msgstr "Trådmodul initialisering fejlede: kunne ikke oprette ptrådnøgle." + +#~ msgid "bad index in wxArrayString::Remove" +#~ msgstr "forkert index i wxArrayString::Remove" + +#~ msgid "can't set value of a group!" +#~ msgstr "kan ikke sætte værdien af gruppe!" + +#~ msgid "empty file name in wxFindFileInPath" +#~ msgstr "tom filnavn i wxFindFileInPath" + +#~ msgid "invalid day" +#~ msgstr "ugyldig dag" + +#~ msgid "invalid month" +#~ msgstr "ugyldig måned" + +#~ msgid "pm" +#~ msgstr "efter middag" + +#~ msgid "removing inexistent element in wxArrayString::Remove" +#~ msgstr "fjerner ikke-eksisterende element i wxArrayString::Remove" + +#~ msgid "unknown log level in wxLog::DoLog" +#~ msgstr "ukendt log-niveau i wxLog::DoLog" + +#~ msgid "unknown log level in wxLogGui::DoLog" +#~ msgstr "ukendt log-niveau i wxLogGui::DoLog" + +#~ msgid "wxExpandSizer has no parent!" +#~ msgstr "wxExpandSizer har ingen forældre!" + +#~ msgid "" +#~ "wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to " +#~ "let me know about the canvas!" +#~ msgstr "" +#~ "wxPrintPreviewBase::RenderPage: skal bruge wxPrintPreviewBase::SetCanvas for " +#~ "at lade mig vide om kanvasen!" + +#~ msgid "" +#~ "can't determine if the end of file is reached on descriptor " +#~ "%d" +#~ msgstr "" +#~ "kan ikke afgøre, om slutning af filen er nået på deskriptor " +#~ "%d" + +#~ msgid "bad index in wxArrayString::Insert" +#~ msgstr "forkert index i wxArrayString::Insert" + +#~ msgid "Couldn't load a JPEG image - probably file is corrupted." +#~ msgstr "Kunne ikke load'e et JPEG billede - sandsynligvis er filen korrupt." + +#~ msgid "Couldn't save a JPEG image - probably file is corrupted." +#~ msgstr "Kunne ikke gemme et JPEG billede - sandsynligvis er filen korrupt." + +#~ msgid "Failed to allocate %dKb of memory for clipboard transfer." +#~ msgstr "Kunne ikke allokere %dKb hukommelse til klippebordsoverførsel." diff --git a/locale/de.po b/locale/de.po index 745b0df25a..be70a32dc1 100644 --- a/locale/de.po +++ b/locale/de.po @@ -1,20 +1,15 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-03-07 11:31+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: wxWindows-2.2\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-08-11 11:11+0200\n" +"Last-Translator: Robert Roebling \n" +"Language-Team: wxWindows Team \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" -#: ../src/generic/dirdlgg.cpp:479 +#: ../src/generic/dirdlgg.cpp:551 msgid "" "\n" "(Do you have the required permissions?)" @@ -22,7 +17,7 @@ msgstr "" "\n" "(Haben Sie die nötigen Zugriffsrechte?)" -#: ../src/generic/dirdlgg.cpp:466 +#: ../src/generic/dirdlgg.cpp:538 msgid "" "\n" "does not exist\n" @@ -32,124 +27,179 @@ msgstr "" "existiert nicht\n" "Jetzt anlegen?" -#: ../src/common/log.cpp:238 +#: ../src/common/log.cpp:242 #, c-format msgid " (error %ld: %s)" msgstr " (Fehler %ld: %s)" -#: ../src/common/docview.cpp:1192 +#: ../src/common/docview.cpp:1206 msgid " - " -msgstr "" +msgstr " - " -#: ../src/html/htmprint.cpp:484 -#, fuzzy +#: ../src/html/htmprint.cpp:494 msgid " Preview" -msgstr "Druckvoransicht" +msgstr " Seitenansicht" -#: ../src/generic/filedlgg.cpp:326 +#: ../src/generic/filedlgg.cpp:328 msgid " bytes " -msgstr "" +msgstr " Bytes " + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "#10 Umschlag, 4 1/8 x 9 1/2 Zoll" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "#11 Umschlag, 4 1/2 x 10 3/8 Zoll" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "#12 Umschlag, 4 3/4 x 11 Zoll" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "#14 Umschlag, 5 x 11 1/2 Zoll" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "#9 Umschlag, 3 7/8 x 8 7/8 Zoll" #: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 -#: ../src/common/resource.cpp:1769 ../src/common/resource.cpp:1899 -#: ../src/common/resource.cpp:2980 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 #, c-format msgid "#define %s must be an integer." msgstr "#define %s muß eine ganze Zahl sein" -#: ../src/html/helpfrm.cpp:695 ../src/html/helpfrm.cpp:696 -#: ../src/html/helpfrm.cpp:1242 ../src/html/helpfrm.cpp:1269 +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 #, c-format msgid "%i of %i" -msgstr "" +msgstr "%i von %i" #: ../src/common/cmdline.cpp:735 -#, fuzzy, c-format +#, c-format msgid "%s (or %s)" -msgstr " (Fehler %ld: %s)" +msgstr "%s (oder %s)" -#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2350 +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s Fehler" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s Information" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s Warnung" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 #, c-format msgid "%s not a bitmap resource specification." msgstr "%s ist keine Bitmap-Resourcenangabe" -#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2506 +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 #, c-format msgid "%s not an icon resource specification." msgstr "%s ist keine Icon-Resourcenangabe" #: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 -#: ../src/common/resource.cpp:1862 ../src/common/resource.cpp:1991 -#: ../src/common/resource.cpp:3077 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 #, c-format msgid "%s: ill-formed resource file syntax." -msgstr "%s: falsch formatierte Resourcendatei-Syntax" +msgstr "%s: falscher Resourcendatei-Syntax" -#: ../src/generic/logg.cpp:435 ../src/generic/tipdlg.cpp:170 +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 msgid "&Close" msgstr "&Schließen" -#: ../src/generic/wizard.cpp:268 -msgid "&Finish" -msgstr "" +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&Einzelheiten" -#: ../src/generic/logg.cpp:436 +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Fertigstellen" + +#: ../src/generic/logg.cpp:478 msgid "&Log" msgstr "&Log" -#: ../src/generic/wizard.cpp:171 ../src/generic/wizard.cpp:270 +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Weiter >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 msgid "&Next >" -msgstr "" +msgstr "&Weiter >" #: ../src/generic/tipdlg.cpp:175 msgid "&Next Tip" -msgstr "" +msgstr "&Nächster Tip" -#: ../src/common/docview.cpp:1889 ../src/common/docview.cpp:1900 +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 msgid "&Redo" -msgstr "&Wieder-Ausführen" +msgstr "&Wiederherstellen" -#: ../src/common/docview.cpp:1883 ../src/common/docview.cpp:1910 +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 msgid "&Redo " -msgstr "&Wieder-Ausführen " +msgstr "&Wiederherstellen " -#: ../src/generic/logg.cpp:431 +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 msgid "&Save..." msgstr "&Sichern..." #: ../src/generic/tipdlg.cpp:172 msgid "&Show tips at startup" -msgstr "" +msgstr "&Tipps beim Programmstart zeigen" -#: ../src/common/docview.cpp:1895 +#: ../src/common/docview.cpp:1951 msgid "&Undo" msgstr "&Rückgängig" -#: ../src/common/docview.cpp:1870 +#: ../src/common/docview.cpp:1926 msgid "&Undo " msgstr "&Rückgängig " -#: ../src/common/config.cpp:390 +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&Fenster" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 #, c-format msgid "'%s' has extra '..', ignored." -msgstr "'%s' hat extra '..', ingoriert." +msgstr "'%s' hat extra '..', ignoriert." #: ../src/common/valtext.cpp:140 #, c-format msgid "'%s' is invalid" -msgstr "" +msgstr "'%s' ist ungültig" -#: ../src/common/cmdline.cpp:652 +#: ../src/common/cmdline.cpp:657 #, c-format msgid "'%s' is not a correct numeric value for option '%s'." -msgstr "" +msgstr "'%s' ist kein gültiger numerischer Wert für Option '%s'." -#: ../src/common/intl.cpp:389 +#: ../src/common/intl.cpp:412 #, c-format msgid "'%s' is not a valid message catalog." msgstr "'%s' ist kein gültiger Nachrichtenkatalog." -#: ../src/common/textfile.cpp:224 +#: ../src/common/textfile.cpp:253 #, c-format msgid "'%s' is probably a binary file." msgstr "'%s' ist vermutlich eine Binärdatei." @@ -157,35 +207,35 @@ msgstr "'%s' ist vermutlich eine Bin #: ../src/common/valtext.cpp:178 #, c-format msgid "'%s' should be numeric." -msgstr "" +msgstr "'%s' sollte numerisch sein." #: ../src/common/valtext.cpp:160 #, c-format msgid "'%s' should only contain ASCII characters." -msgstr "" +msgstr "'%s' sollte auschließlich ASCII Zeichen enthalten." #: ../src/common/valtext.cpp:166 #, c-format msgid "'%s' should only contain alphabetic characters." -msgstr "" +msgstr "'%s' sollte nur alphabetische Zeichen enthalten." #: ../src/common/valtext.cpp:172 #, c-format msgid "'%s' should only contain alphabetic or numeric characters." -msgstr "" +msgstr "'%s' sollte nur alphanumerische Zeichen enthalten." -#: ../src/html/helpfrm.cpp:656 +#: ../src/html/helpfrm.cpp:679 msgid "(Help)" -msgstr "" +msgstr "(Hilfe)" -#: ../src/html/helpfrm.cpp:271 ../src/html/helpfrm.cpp:760 -#: ../src/html/helpfrm.cpp:1295 +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 msgid "(bookmarks)" -msgstr "" +msgstr "(Lesezeichen)" #: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 -#: ../src/common/resource.cpp:1801 ../src/common/resource.cpp:1931 -#: ../src/common/resource.cpp:3016 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 msgid "" ", expected static, #include or #define\n" "whilst parsing resource." @@ -193,43 +243,59 @@ msgstr "" ", erwartete static, #include oder #define\n" "beim Lesen der Resource." -#: ../src/generic/dirdlgg.cpp:259 ../src/generic/filedlgg.cpp:708 +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 msgid "." -msgstr "" +msgstr "." -#: ../src/generic/dirdlgg.cpp:260 ../src/generic/filedlgg.cpp:709 +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 msgid ".." -msgstr "" +msgstr ".." -#: ../src/common/fontmap.cpp:438 +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 Zoll" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 Zoll" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "6 3/4 Umschlag, 3 5/8 x 6 1/2 Zoll" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": Datei existiert nicht!" + +#: ../src/common/fontmap.cpp:507 msgid ": unknown charset" -msgstr "" +msgstr ": unbekannte Zeichensatz" -#: ../src/common/fontmap.cpp:598 +#: ../src/common/fontmap.cpp:712 msgid ": unknown encoding" -msgstr "" +msgstr ": unbekannte Verschlüsselung ('encoding')" -#: ../src/generic/wizard.cpp:168 +#: ../src/generic/wizard.cpp:186 msgid "< &Back" -msgstr "" +msgstr "< &Zurück" -#: ../src/generic/filedlgg.cpp:354 +#: ../src/generic/filedlgg.cpp:356 msgid "

    " -msgstr "" +msgstr "" -#: ../src/generic/filedlgg.cpp:321 +#: ../src/generic/filedlgg.cpp:323 msgid " " -msgstr "" +msgstr " " -#: ../src/generic/filedlgg.cpp:355 +#: ../src/generic/filedlgg.cpp:357 msgid "" -msgstr "" +msgstr "" -#: ../src/generic/filedlgg.cpp:322 +#: ../src/generic/filedlgg.cpp:324 msgid " " -msgstr "" +msgstr " " -#: ../src/html/helpfrm.cpp:904 +#: ../src/html/helpfrm.cpp:928 msgid "" "Normal face
    (and underlined. Italic face. " "Bold face. Bold italic face.
    font size " @@ -237,101 +303,160 @@ msgid "" "+0
    font size +1
    font size " "+2
    font size +3
    font size " "+4

    Fixed size face.
    bold italic " -"bold italic underlined
    font size " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" +"Normal face
    (and Unterstrichen. Kursiv face. " +"Fett face. Fett Kursiv face.
    font size " "-2
    font size -1
    font size " "+0
    font size +1
    font size " "+2
    font size +3
    font size " -"+4" -msgstr "" +"+4

    Fixed size face.
    Fett Kursiv " +"Fett Kursiv Unterstrichen
    font size -" +"2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " -#: ../src/generic/dcpsg.cpp:2467 +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "A3 Blatt, 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 msgid "A4 sheet, 210 x 297 mm" -msgstr "" +msgstr "A4 Blatt, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "A4 kleines Blatt, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "A4 Blatt, 148 x 210 mm" #: ../src/generic/fontdlgg.cpp:325 msgid "ABCDEFGabcdefg12345" -msgstr "" +msgstr "ABCDEFGabcdefg12345ÄÖÜßäöü" -#: ../src/html/helpfrm.cpp:265 +#: ../src/html/helpfrm.cpp:270 msgid "Add current page to bookmarks" -msgstr "" +msgstr "Aktuelle HTLM-Seite den Lesezeichen hinzufügen" -#: ../src/generic/colrdlgg.cpp:264 +#: ../src/generic/colrdlgg.cpp:269 msgid "Add to custom colours" msgstr "Zu Benutzerfarben hinzufügen" -#: ../src/html/helpctrl.cpp:84 +#: ../src/html/helpctrl.cpp:83 #, c-format msgid "Adding book %s" -msgstr "" +msgstr "Buch %s wird hinzugefügt" #: ../src/generic/prntdlgg.cpp:163 msgid "All" msgstr "Alle" -#: ../src/generic/filedlgg.cpp:820 +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 msgid "All files (*)|*" -msgstr "" +msgstr "Alle Dateien (*)|*" -#: ../src/unix/dialup.cpp:336 +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "Alle Dateien (*)|*" + +#: ../src/unix/dialup.cpp:359 msgid "Already dialling ISP." -msgstr "" +msgstr "Wähle bereits ISP." -#: ../src/generic/logg.cpp:475 +#: ../src/generic/logg.cpp:1021 #, c-format msgid "Append log to file '%s' (choosing [No] will overwrite it)?" msgstr "An Logdatei '%s' anhängen ([Nein] wird sie ersetzen)?" -#: ../src/common/fontmap.cpp:93 +#: ../src/common/fontmap.cpp:105 msgid "Arabic (ISO-8859-6)" -msgstr "" +msgstr "Arabisch (ISO-8859-6)" -#: ../src/common/imagbmp.cpp:271 +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "B4 Umschlag, 250 x 353 mm" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "B4 Blatt, 250 x 354 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "B5 Umschlag, 176 x 250 mm" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "B5 Blatt, 182 x 257 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "B6 Umschlag, 176 x 125 mm" + +#: ../src/common/imagbmp.cpp:387 msgid "BMP: Cannot deal with 4bit encoded yet." -msgstr "" +msgstr "BMP: Kann noch nicht mit 4bit verschlüsseltem Code umgehen." -#: ../src/common/imagbmp.cpp:150 ../src/common/imagbmp.cpp:162 -#, fuzzy +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 msgid "BMP: Couldn't allocate memory." -msgstr "Kann keinen Wecker anlegen." +msgstr "BMP: Speicher konnte nicht alloziert werden." -#: ../src/common/imagbmp.cpp:141 +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: Konnte ungültiges Bild nicht sichern." + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: Datei konnte nich geschrieben werden." + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: Dateikopf konnte nicht geschrieben werden." + +#: ../src/common/imagbmp.cpp:257 msgid "BMP: Encoding doesn't match bitdepth." -msgstr "" +msgstr "BMP: Verschlüsselung entspricht nicht der Bittiefe." -#: ../src/common/imagbmp.cpp:104 +#: ../src/common/imagbmp.cpp:220 msgid "BMP: Image height > 32767 pixels for file." -msgstr "" +msgstr "BMP: Bildhöhe > 32767 Pixel." -#: ../src/common/imagbmp.cpp:98 +#: ../src/common/imagbmp.cpp:214 msgid "BMP: Image width > 32767 pixels for file." -msgstr "" +msgstr "BMP: Bildbreite > 32767 Pixel." -#: ../src/common/imagbmp.cpp:118 +#: ../src/common/imagbmp.cpp:234 msgid "BMP: Unknown bitdepth in file." -msgstr "" +msgstr "BMP: Unbekannte Bittiefe." -#: ../src/common/imagbmp.cpp:127 +#: ../src/common/imagbmp.cpp:243 msgid "BMP: Unknown encoding in file." -msgstr "" +msgstr "BMP: Unbekannte Verschlüsselung." -#: ../src/generic/helpwxht.cpp:156 +#: ../src/generic/helpwxht.cpp:157 msgid "Back" -msgstr "" +msgstr "Zurück" -#: ../src/common/dlgcmn.cpp:133 +#: ../src/common/dlgcmn.cpp:135 msgid "Backward" -msgstr "" +msgstr "Rückwärts" -#: ../src/common/fontmap.cpp:91 -msgid "Baltic (ISO-8859-4)" -msgstr "" +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Baltisch (ISO-8859-13)" -#: ../src/common/fontmap.cpp:97 -msgid "Baltic II (ISO-8859-10)" -msgstr "" +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Baltisch (alt) (ISO-8859-4)" -#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2486 +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 #, c-format msgid "Bitmap resource specification %s not found." msgstr "Bitmapresourceangabe %s nicht gefunden." @@ -344,367 +469,404 @@ msgstr "Fett" msgid "Bottom margin (mm):" msgstr "Unterer Rand (mm)" -#: ../src/generic/logg.cpp:433 -msgid "C&lear" -msgstr "L&öschen" +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "C Blatt, 17 x 22 Zoll" -#: ../src/msw/thread.cpp:222 +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "&Löschen" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "C3 Umschlag, 324 x 458 mm" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "C4 Umschlag, 229 x 324 mm" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "C5 Umschlag, 162 x 229 mm" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "C6 Umschlag, 114 x 162 mm" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "C65 Umschlag, 114 x 229 mm" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 msgid "Can not create event object." msgstr "Kann Eventobjekt nicht erzeugen." #: ../src/msw/thread.cpp:124 -#, fuzzy msgid "Can not create mutex" +msgstr "Kann Mutex nicht anlegen" + +#: ../src/mac/thread.cpp:92 +msgid "Can not create mutex." msgstr "Kann Mutex nicht anlegen." -#: ../src/common/filefn.cpp:1279 ../src/msw/dir.cpp:294 +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 #: ../src/unix/dir.cpp:214 #, c-format msgid "Can not enumerate files in directory '%s'" -msgstr "Kann Dateien in Verzeichnis '%s' nicht listen" +msgstr "Kann Dateien in Verzeichnis '%s' nicht auflisten" -#: ../src/msw/thread.cpp:520 +#: ../src/msw/thread.cpp:552 #, c-format msgid "Can not resume thread %x" msgstr "Kann Thread %x nicht forsetzen." -#: ../src/msw/thread.cpp:402 +#: ../src/msw/thread.cpp:433 msgid "Can not start thread: error writing TLS." -msgstr "Kann Thread nicht starten: Fehler beim Schreiben der TLS." +msgstr "Kann Thread nicht starten: Fehler beim Schreiben der 'TLS'." -#: ../src/msw/thread.cpp:505 +#: ../src/msw/thread.cpp:537 #, c-format msgid "Can not suspend thread %x" msgstr "Kann Thread %x nicht anhalten." -#: ../src/msw/thread.cpp:823 +#: ../src/msw/thread.cpp:871 msgid "Can not wait for thread termination" msgstr "Kann nicht auf Threadende warten" -#: ../src/common/docview.cpp:1872 +#: ../src/common/docview.cpp:1928 msgid "Can't &Undo " msgstr "Kann nicht rückgängig machen " -#: ../src/common/image.cpp:713 +#: ../src/common/image.cpp:953 #, c-format msgid "Can't check image format of file '%s': file does not exist." msgstr "" +"Kann Bildformat nicht überprüfen bei Datei '%s': Datei nicht vorhanden." -#: ../src/msw/registry.cpp:410 -#, fuzzy, c-format +#: ../src/msw/registry.cpp:418 +#, c-format msgid "Can't close registry key '%s'" -msgstr "Kann Datei '%s' nicht anlegen." +msgstr "Kann Registrierungsschlüssel '%s' nicht schließen." -#: ../src/msw/registry.cpp:486 +#: ../src/msw/registry.cpp:490 #, c-format msgid "Can't copy values of unsupported type %d." -msgstr "" +msgstr "Kann Inhalte des nicht unterstützten Typs %d nicht kopieren." -#: ../src/msw/listctrl.cpp:207 +#: ../src/msw/listctrl.cpp:212 msgid "Can't create list control window, check that comctl32.dll is installed." msgstr "" +"Kann ListCtrl-Fenster nicht erstellen, bitte überprüfen ob 'comctl32.dll' " +"installiert ist." -#: ../src/msw/registry.cpp:393 -#, fuzzy, c-format +#: ../src/msw/registry.cpp:399 +#, c-format msgid "Can't create registry key '%s'" -msgstr "Kann Datei '%s' nicht anlegen." +msgstr "Kann Registrierungsschlüssel '%s' nicht anlegen." -#: ../src/msw/utilsexc.cpp:425 -#, fuzzy +#: ../src/msw/utilsexc.cpp:482 msgid "Can't create the inter-process read pipe" -msgstr "Kann Thread nicht erzeugen" +msgstr "Kann 'inter-process read-pipe' nicht erzeugen" -#: ../src/msw/utilsexc.cpp:435 +#: ../src/msw/utilsexc.cpp:494 msgid "Can't create the inter-process write pipe" -msgstr "" +msgstr "Kann 'inter-process write-pipe' nicht erzeugen" -#: ../src/msw/thread.cpp:487 +#: ../src/msw/thread.cpp:519 msgid "Can't create thread" msgstr "Kann Thread nicht erzeugen" -#: ../src/msw/window.cpp:2372 +#: ../src/msw/window.cpp:2433 #, c-format msgid "" "Can't create window of class %s!\n" "Possible Windows 3.x compatibility problem?" msgstr "" +"Kann Fensterklasse %s nicht erstellen!\n" +"Möglicherweise Windows 3.x Kompatibilitätsproblem?" -#: ../src/msw/registry.cpp:656 -#, fuzzy, c-format +#: ../src/msw/registry.cpp:658 +#, c-format msgid "Can't delete key '%s'" -msgstr "Kann Wert von Eintrag '%s' nicht löschen" +msgstr "Kann Schlüssel '%s' nicht löschen" -#: ../src/msw/iniconf.cpp:463 +#: ../src/msw/iniconf.cpp:476 #, c-format msgid "Can't delete the INI file '%s'" msgstr "Kann INI-Datei '%s' nicht löschen" -#: ../src/msw/registry.cpp:681 -#, fuzzy, c-format -msgid "Can't delete value '%s' from key '%s'" -msgstr "Kann Wert '%s' von Eintrag '%s' nicht löschen." - -#: ../src/msw/registry.cpp:692 -#, fuzzy, c-format -msgid "Can't delete value of key '%s'" -msgstr "Kann Wert von Eintrag '%s' nicht löschen" - -#: ../src/msw/registry.cpp:992 -#, fuzzy, c-format -msgid "Can't enumerate subkeys of key '%s'" -msgstr "Kann Untereinträge von '%s' nicht auflisten" - -#: ../src/msw/registry.cpp:947 -#, fuzzy, c-format -msgid "Can't enumerate values of key '%s'" -msgstr "Kann Werte von Eintrag '%s' nicht auflisten" - -#: ../src/msw/utilsexc.cpp:400 +#: ../src/msw/registry.cpp:683 #, c-format -msgid "Can't execute command '%s'" -msgstr "Kann Befehl '%s' nicht ausführen" +msgid "Can't delete value '%s' from key '%s'" +msgstr "Kann Wert '%s' von Schlüssel '%s' nicht löschen." + +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "Kann Wert von Schlüssel '%s' nicht löschen" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "Kann Unterschlüssel von '%s' nicht auflisten" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "Kann Werte von Schlüssel '%s' nicht auflisten" #: ../src/common/ffile.cpp:234 -#, fuzzy, c-format +#, c-format msgid "Can't find current position in file '%s'" -msgstr "Kann Konfigurationsdatei '%s' nicht öffnen." +msgstr "Kann aktuelle Position in Datei '%s' nicht finden." -#: ../src/msw/window.cpp:2325 +#: ../src/msw/window.cpp:2383 msgid "" "Can't find dummy dialog template!\n" "Check resource include path for finding wx.rc." msgstr "" +"Kann Dummy-Dialog-Template nicht finden!\n" +"Überprüfe 'resource include'-Pfad, damit 'wx.rc' gefunden werden kann." -#: ../src/common/object.cpp:321 ../src/common/object.cpp:342 +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 #, c-format msgid "Can't find the serialization object '%s' for the object '%s'." msgstr "Kann Serialisierungsobjekt '%s' für Object '%s' nicht finden." -#: ../src/msw/registry.cpp:342 +#: ../src/msw/registry.cpp:348 #, c-format msgid "Can't get info about registry key '%s'" -msgstr "" +msgstr "Kann keine Information über den Registrierungsschlüssel '%s' finden" -#: ../src/common/image.cpp:413 ../src/common/image.cpp:433 +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 #, c-format msgid "Can't load image from file '%s': file does not exist." -msgstr "" +msgstr "Kann Bild aus Datei '%s' nicht laden : Datei ist nicht vorhanden." -#: ../src/common/object.cpp:314 +#: ../src/common/object.cpp:307 msgid "Can't load wxSerial dynamic library." -msgstr "Kann wxSerial DLL nicht laden." +msgstr "Kann wxSerial-DLL nicht laden." #: ../src/msw/dib.cpp:434 -#, fuzzy, c-format +#, c-format msgid "Can't open file '%s'" msgstr "Kann Datei '%s' nicht öffnen" -#: ../src/msw/registry.cpp:368 -#, fuzzy, c-format +#: ../src/msw/registry.cpp:374 +#, c-format msgid "Can't open registry key '%s'" -msgstr "Kann Datei '%s' nicht öffnen" +msgstr "Kann Registrierungsschlüssel '%s' nicht öffnen" -#: ../src/msw/registry.cpp:871 -#, fuzzy, c-format +#: ../src/msw/registry.cpp:899 +#, c-format msgid "Can't read value of '%s'" -msgstr "Kann Wert von Eintrag '%s' nicht löschen" +msgstr "Kann Wert von '%s' nicht lesen" -#: ../src/msw/registry.cpp:770 ../src/msw/registry.cpp:809 -#, fuzzy, c-format +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format msgid "Can't read value of key '%s'" -msgstr "Kann Wert von Eintrag '%s' nicht löschen" +msgstr "Kann Wert von Eintrag '%s' nicht lesen" -#: ../src/generic/logg.cpp:522 +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 msgid "Can't save log contents to file." msgstr "Kann Logtexte nicht in Datei sichern." -#: ../src/msw/thread.cpp:453 +#: ../src/msw/thread.cpp:485 msgid "Can't set thread priority" msgstr "Kann Thread-Priorität nicht setzen" -#: ../src/msw/registry.cpp:795 ../src/msw/registry.cpp:895 -#, fuzzy, c-format +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format msgid "Can't set value of '%s'" -msgstr "Kann Wert von Eintrag '%s' nicht löschen" +msgstr "Kann Wert von '%s' nicht setzen" -#: ../src/common/dlgcmn.cpp:146 ../src/common/prntbase.cpp:107 -#: ../src/generic/dcpsg.cpp:2192 ../src/generic/dirdlgg.cpp:413 -#: ../src/generic/filedlgg.cpp:911 ../src/generic/fontdlgg.cpp:257 -#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:182 -#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:174 +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 #: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 -#: ../src/html/helpfrm.cpp:887 ../src/motif/msgdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 msgid "Cancel" msgstr "Abbruch" -#: ../src/msw/dialup.cpp:514 +#: ../src/msw/dialup.cpp:518 #, c-format msgid "Cannot find active dialup connection: %s" -msgstr "" +msgstr "Kann keine aktive DFÜ-Verbindung finden: %s" -#: ../src/msw/dialup.cpp:829 +#: ../src/msw/dialup.cpp:832 msgid "Cannot find the location of address book file" -msgstr "" +msgstr "Kann Adressbuchdatei nicht finden" #: ../src/unix/threadpsx.cpp:954 #, c-format msgid "Cannot get priority range for scheduling policy %d." -msgstr "" +msgstr "Kann Prioritäts 'range' für 'scheduling policy' %d nicht bekommen." -#: ../src/unix/utilsunx.cpp:691 +#: ../src/unix/utilsunx.cpp:713 msgid "Cannot get the hostname" -msgstr "" +msgstr "Bekomme den Hostnamen nicht" -#: ../src/unix/utilsunx.cpp:727 +#: ../src/unix/utilsunx.cpp:749 msgid "Cannot get the official hostname" -msgstr "" +msgstr "Kann den offizielen Hostnamen nicht bekommen" -#: ../src/msw/dialup.cpp:922 +#: ../src/msw/dialup.cpp:925 msgid "Cannot hang up - no active dialup connection." -msgstr "" +msgstr "Kann nicht auflegen - keine aktive DFÜ-Verbindung vorhanden." -#: ../src/msw/app.cpp:220 +#: ../src/msw/app.cpp:252 msgid "Cannot initialize OLE" msgstr "Kann OLE nicht initialisiern" #: ../src/html/htmlfilt.cpp:146 #, c-format msgid "Cannot open HTML document: %s" -msgstr "" +msgstr "HTML-Dokument %s kann nicht geöffnet werden" -#: ../src/html/helpdata.cpp:542 +#: ../src/html/helpdata.cpp:657 #, c-format msgid "Cannot open HTML help book: %s" -msgstr "" +msgstr "HTML-Hilfebuch %s kann nicht geöffnet werden" #: ../src/generic/helpext.cpp:96 -#, fuzzy, c-format +#, c-format msgid "Cannot open URL '%s'" -msgstr "Kann Datei '%s' nicht öffnen" +msgstr "Kann URL '%s' nicht öffnen" -#: ../src/html/helpdata.cpp:238 -#, fuzzy, c-format +#: ../src/html/helpdata.cpp:353 +#, c-format msgid "Cannot open contents file: %s" -msgstr "Kann Datei nicht öffnen!" +msgstr "Kann den Inhalt der Datei nicht öffnen!" -#: ../src/generic/dcpsg.cpp:1541 +#: ../src/generic/dcpsg.cpp:1584 msgid "Cannot open file for PostScript printing!" -msgstr "" +msgstr "Kann Datei für den Postscriptdruck nicht öffnen!" -#: ../src/html/helpdata.cpp:253 -#, fuzzy, c-format +#: ../src/html/helpdata.cpp:368 +#, c-format msgid "Cannot open index file: %s" -msgstr "Kann Datei nicht öffnen!" +msgstr "Kann Indexdatei nicht öffnen!" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "Leere Seite kann nicht gedruckt werden." #: ../src/unix/threadpsx.cpp:935 msgid "Cannot retrieve thread scheduling policy." -msgstr "" +msgstr "Kann Thread 'scheduling policy' nicht holen." #: ../src/unix/threadpsx.cpp:588 msgid "Cannot start thread: error writing TLS" -msgstr "" +msgstr "Kann 'Thread' nicht starten : Fehler beim 'TLS' schreiben" -#: ../src/html/helpfrm.cpp:393 +#: ../src/html/helpfrm.cpp:398 msgid "Case sensitive" -msgstr "" +msgstr "Groß-/Kleinschreibung" -#: ../src/common/fontmap.cpp:89 -msgid "Central European (ISO-8859-2/Latin 2)" -msgstr "" +#: ../src/common/fontmap.cpp:113 +#, fuzzy +msgid "Celtic (ISO-8859-14)" +msgstr "Baltisch (ISO-8859-13)" -#: ../src/msw/dialup.cpp:763 +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Zentral-Europäisch (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 msgid "Choose ISP to dial" -msgstr "" +msgstr "Wähle ISP um anzurufen" #: ../src/gtk/fontdlg.cpp:159 msgid "Choose font" -msgstr "" +msgstr "Wähle Font" -#: ../src/generic/logg.cpp:433 +#: ../src/generic/logg.cpp:475 msgid "Clear the log contents" msgstr "Logtexte löschen" -#: ../src/common/prntbase.cpp:357 ../src/generic/progdlgg.cpp:309 +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 #: ../src/generic/proplist.cpp:518 msgid "Close" msgstr "Schließen" -#: ../src/generic/logg.cpp:435 +#: ../src/generic/logg.cpp:477 msgid "Close this window" msgstr "Fenster schließen" -#: ../src/common/fileconf.cpp:743 +#: ../src/common/fileconf.cpp:759 #, c-format msgid "Config entry name cannot start with '%c'." -msgstr "" +msgstr "Die Bezeichnung des Konfiurationseintrags kann nicht mit %c beginnen." -#: ../src/generic/filedlgg.cpp:1070 ../src/gtk/filedlg.cpp:75 +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 msgid "Confirm" msgstr "Bestätigen" -#: ../src/html/htmlwin.cpp:166 -#, fuzzy +#: ../src/html/htmlwin.cpp:165 msgid "Connecting..." -msgstr "Drucke..." +msgstr "Verbinde..." #: ../src/generic/helpxlp.cpp:240 #, c-format msgid "Connection to wxHelp timed out in %d seconds" msgstr "Verbindung mit wxHelp nach %d Sekunden abgebrochen" -#: ../src/generic/helpwxht.cpp:158 ../src/html/helpfrm.cpp:298 -#: ../src/html/helpfrm.cpp:307 +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 msgid "Contents" -msgstr "" +msgstr "Inhalt" #: ../src/generic/prntdlgg.cpp:196 msgid "Copies:" msgstr "Kopien:" -#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1791 -#: ../src/common/resource.cpp:1921 +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 #, c-format msgid "Could not find resource include file %s." msgstr "Konnte Resourcedatei %s nicht finden." #: ../src/generic/tabg.cpp:1042 msgid "Could not find tab for id" -msgstr "Konnte Seite für Id nicht finden" +msgstr "Konnte Seite für ID nicht finden" -#: ../src/msw/textctrl.cpp:1126 +#: ../src/msw/textctrl.cpp:1249 #, c-format msgid "Could not load Rich Edit DLL '%s'" -msgstr "" +msgstr "Kann 'Rich Edit'-DLL nicht laden '%s'" -#: ../src/common/resource.cpp:789 +#: ../src/common/resource.cpp:796 #, c-format msgid "" "Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" " or provide #define (see manual for caveats)" msgstr "" -"Kann keine Kontrollklasse oder Id '%s' finden. Verwenden Sie eine ganze " +"Kann keine Kontrollklasse oder ID '%s' finden. Verwenden Sie eine ganze " "Zahl\n" " oder ein #define." -#: ../src/common/resource.cpp:1234 +#: ../src/common/resource.cpp:1245 #, c-format msgid "" "Could not resolve menu id '%s'. Use (non-zero) integer instead\n" "or provide #define (see manual for caveats)" msgstr "" -"Kann keine Kontrollklasse oder Id '%s' finden. Verwenden Sie eine ganze " +"Kann keine Kontrollklasse oder ID '%s' finden. Verwenden Sie eine ganze " "Zahl\n" " oder ein #define." -#: ../src/common/prntbase.cpp:709 +#: ../src/common/prntbase.cpp:711 msgid "Could not start document preview." -msgstr "Kann Druckvoransicht nicht starten." +msgstr "Kann Druckvorschau nicht starten." -#: ../src/generic/printps.cpp:200 ../src/msw/printwin.cpp:240 +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 msgid "Could not start printing." msgstr "Kann Ausdruck nicht beginnen." -#: ../src/common/wincmn.cpp:762 +#: ../src/common/wincmn.cpp:784 msgid "Could not transfer data to window" msgstr "Kann Daten nicht ins Fenster übertragen." @@ -713,801 +875,886 @@ msgid "Couldn't acquire a mutex lock" msgstr "Kann Mutex-Lock nicht bekommen" #: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 -#: ../src/msw/imaglist.cpp:145 ../src/msw/imaglist.cpp:167 -#: ../src/msw/imaglist.cpp:180 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 msgid "Couldn't add an image to the image list." msgstr "Kann Bild nicht zur Liste hinzufügen." +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "Kann Zustand des Eventobjektes nicht ändern." + #: ../src/msw/timer.cpp:96 msgid "Couldn't create a timer" -msgstr "Kann keinen Wecker anlegen." +msgstr "Kann keinen Timer anlegen." -#: ../src/common/dynlib.cpp:268 +#: ../src/common/dynlib.cpp:309 #, c-format msgid "Couldn't find symbol '%s' in a dynamic library" -msgstr "" +msgstr "Kann Symbol '%s' in der dynamischen Bibliothek nicht finden" -#: ../src/msw/thread.cpp:540 +#: ../src/msw/thread.cpp:578 msgid "Couldn't get the current thread pointer" msgstr "Kann den aktuellen Threadzeiger nicht bekommen." -#: ../src/msw/utilsexc.cpp:594 +#: ../src/msw/utilsexc.cpp:712 #, c-format msgid "Couldn't launch DDE server '%s'." -msgstr "" +msgstr "Konnte DDE-Server nicht starten '%s'" -#: ../src/common/imagpng.cpp:245 +#: ../src/common/imagpng.cpp:251 msgid "Couldn't load a PNG image - file is corrupted or not enough memory." msgstr "" +"Konnte PNG-Bild nicht laden - Datei ist beschädigt oder der Speicher reicht " +"nicht aus." -#: ../src/msw/ole/dataobj.cpp:139 -#, fuzzy, c-format +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format msgid "Couldn't register clipboard format '%s'." -msgstr "Nicht unterstütztes Format in Zwischenablage." +msgstr "Konnte Zwischenablage-Format '%s' nicht registrieren." #: ../src/msw/thread.cpp:198 msgid "Couldn't release a mutex" -msgstr "Kann Mutex nicht freigeben." +msgstr "Konnte einen Mutex nicht freigeben." -#: ../src/msw/listctrl.cpp:608 +#: ../src/msw/listctrl.cpp:616 #, c-format msgid "Couldn't retrieve information about list control item %d." -msgstr "Kann keine Informationen über ListControl %d bekommen." +msgstr "Kann keine Informationen über List-Control %d bekommen." -#: ../src/msw/thread.cpp:910 +#: ../src/msw/thread.cpp:958 msgid "Couldn't terminate thread" msgstr "Kann Thread nicht beenden" -#: ../src/generic/dirdlgg.cpp:500 -#, fuzzy +#: ../src/generic/dirdlgg.cpp:572 msgid "Create directory" -msgstr "Neues Verzeichnis anlegen" +msgstr "Verzeichnis anlegen" -#: ../src/generic/filedlgg.cpp:878 -#, fuzzy +#: ../src/generic/filedlgg.cpp:883 msgid "Create new directory" msgstr "Neues Verzeichnis anlegen" -#: ../src/generic/filedlgg.cpp:885 -#, fuzzy +#: ../src/generic/filedlgg.cpp:890 msgid "Current directory:" -msgstr "Das Verzeichnis" +msgstr "Aktuelles Verzeichnis" -#: ../src/common/fontmap.cpp:92 -msgid "Cyrillic (Latin 5)" -msgstr "" - -#: ../src/msw/dde.cpp:587 +#: ../src/common/fontmap.cpp:104 #, fuzzy -msgid "DDE poke request failed" -msgstr "Konnte keine Pipe anlegen" +msgid "Cyrillic (ISO-8859-5)" +msgstr "Baltisch (ISO-8859-13)" -#: ../src/generic/filedlgg.cpp:533 +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "D Blatt, 22 x 34 Zoll" + +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "DDE 'poke' gescheitert" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "DL Umschlag, 110 x 220 mm" + +#: ../src/generic/filedlgg.cpp:535 msgid "Date" -msgstr "" +msgstr "Datum" #: ../src/generic/fontdlgg.cpp:207 msgid "Decorative" msgstr "Dekorativ" -#: ../src/msw/dialup.cpp:350 +#: ../src/msw/dialup.cpp:354 msgid "" "Dial up functions are unavailable because the remote access service (RAS) is " "not installed on this machine. Please install it." msgstr "" +"DFÜ-Verbindungsfunktionen stehen nicht zur Verfügung, da der RAS-Dienst " +"(Remote Access Service) auf dieser Maschine nicht installiert ist. Bitte " +"installieren." #: ../src/generic/tipdlg.cpp:177 msgid "Did you know..." -msgstr "" +msgstr "Wußten Sie schon..." -#: ../src/common/filefn.cpp:1092 +#: ../src/common/filefn.cpp:1085 #, c-format msgid "Directory '%s' couldn't be created" msgstr "Verzeichnis '%s' konnte nicht angelegt werden." -#: ../src/generic/dirdlgg.cpp:467 +#: ../src/generic/dirdlgg.cpp:539 msgid "Directory does not exist" msgstr "Verzeichnis existiert nicht" -#: ../src/html/helpfrm.cpp:361 +#: ../src/html/helpfrm.cpp:366 msgid "" "Display all index items that contain given substring. Search is case " "insensitive." msgstr "" +"Alle Themen im Index nach Suchbegriff durchsuchen. Groß-/Kleinschreibung " +"wird nicht beachtet" -#: ../src/html/helpfrm.cpp:512 +#: ../src/html/helpfrm.cpp:535 msgid "Display options dialog" -msgstr "" +msgstr "Options Dialog anzeigen" -#: ../src/common/docview.cpp:431 +#: ../src/common/docview.cpp:440 #, c-format msgid "Do you want to save changes to document %s?" -msgstr "Möchten Sie die Änderungen in Dokument %s sichern?" +msgstr "Möchten Sie die Änderungen im Dokument %s sichern?" -#: ../src/html/htmlwin.cpp:216 +#: ../src/html/htmlwin.cpp:215 msgid "Done" -msgstr "" +msgstr "Ich habe fertig :-)" -#: ../src/generic/progdlgg.cpp:315 +#: ../src/generic/progdlgg.cpp:313 msgid "Done." -msgstr "" +msgstr "Fertig" -#: ../src/generic/progdlgg.cpp:156 +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "E Blatt, 34 x 44 Zoll" + +#: ../src/generic/progdlgg.cpp:153 msgid "Elapsed time : " -msgstr "" +msgstr "bisher benötigte Zeit: " -#: ../src/generic/helphtml.cpp:310 +#: ../src/generic/helphtml.cpp:320 msgid "Entries found" msgstr "Einträge gefunden" -#: ../src/common/config.cpp:342 +#: ../src/common/config.cpp:349 #, c-format msgid "" "Environment variables expansion failed: missing '%c' at position %d in '%s'." msgstr "" -"Umgebungsvariablenexpansion schlug fehl: fehlendes '%c' an Position %d in " -"'%s'." +"Umgebungsvariablenexpansion schlug fehl. Es fehlt '%c' an Position %d in '%" +"s'." -#: ../src/generic/dcpsg.cpp:1541 ../src/generic/dirdlgg.cpp:263 -#: ../src/generic/dirdlgg.cpp:281 ../src/generic/dirdlgg.cpp:292 -#: ../src/generic/dirdlgg.cpp:533 ../src/generic/filedlgg.cpp:620 -#: ../src/generic/filedlgg.cpp:712 ../src/generic/filedlgg.cpp:726 -#: ../src/generic/filedlgg.cpp:739 ../src/generic/filedlgg.cpp:1036 -#: ../src/generic/filedlgg.cpp:1085 ../src/generic/helpxlp.cpp:241 -#: ../src/generic/logg.cpp:201 ../src/gtk/filedlg.cpp:83 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 #: ../src/gtk/fontdlg.cpp:72 msgid "Error" msgstr "Fehler" -#: ../src/unix/utilsunx.cpp:803 ../src/unix/utilsunx.cpp:811 +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 msgid "Error " -msgstr "" +msgstr "Fehler " -#: ../src/generic/dirdlgg.cpp:480 +#: ../src/generic/dirdlgg.cpp:552 msgid "Error creating directory" msgstr "Fehler beim Anlegen des Verzeichnisses" -#: ../src/common/log.cpp:354 +#: ../src/common/log.cpp:362 msgid "Error: " msgstr "Fehler: " -#: ../src/common/fontmap.cpp:90 +#: ../src/common/fontmap.cpp:102 msgid "Esperanto (ISO-8859-3)" -msgstr "" +msgstr "Esperanto (ISO-8859-3)" -#: ../src/generic/progdlgg.cpp:163 +#: ../src/generic/progdlgg.cpp:160 msgid "Estimated time : " -msgstr "" +msgstr "Geschätzte Zeit :" -#: ../src/generic/dirdlgg.cpp:213 +#: ../src/generic/dirdlgg.cpp:217 msgid "Etcetera" -msgstr "/etc" +msgstr "etc" -#: ../src/msw/utilsexc.cpp:484 +#: ../src/msw/utilsexc.cpp:585 #, c-format msgid "Execution of command '%s' failed" msgstr "Befehlsausführung '%s' schlug fehl" +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 Zoll" + #: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 -#: ../src/common/resource.cpp:1830 ../src/common/resource.cpp:1960 -#: ../src/common/resource.cpp:3045 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 msgid "Expected '*' whilst parsing resource." msgstr "Erwartete '*' beim Lesen der Resource." #: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 -#: ../src/common/resource.cpp:1847 ../src/common/resource.cpp:1976 -#: ../src/common/resource.cpp:3062 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 msgid "Expected '=' whilst parsing resource." -msgstr "" +msgstr "Erwartete '=' beim Lesen der Resource." #: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 -#: ../src/common/resource.cpp:1816 ../src/common/resource.cpp:1946 -#: ../src/common/resource.cpp:3031 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 msgid "Expected 'char' whilst parsing resource." -msgstr "" +msgstr "Erwartete 'char' beim Lesen der Resource." -#: ../src/msw/dialup.cpp:857 +#: ../src/msw/dialup.cpp:860 #, c-format msgid "Failed to %s dialup connection: %s" -msgstr "" +msgstr "Fehlerhafte %s DFÜ-Verbindung: %s" #: ../src/msw/clipbrd.cpp:122 msgid "Failed to close the clipboard." msgstr "Konnte Zwischenablage nicht schließen." -#: ../src/msw/dialup.cpp:798 +#: ../src/msw/dialup.cpp:801 msgid "Failed to connect: missing username/password." -msgstr "" +msgstr "Verbindung fehlgeschlagen : Es fehlt der Username bzw. das Passwort" -#: ../src/msw/dialup.cpp:743 -#, fuzzy +#: ../src/msw/dialup.cpp:747 msgid "Failed to connect: no ISP to dial." -msgstr "Konnte Zwischenablage nicht öffnen." +msgstr "Verbindungsversuch gescheitert : kein anwählbares ISP." -#: ../src/msw/registry.cpp:590 +#: ../src/msw/registry.cpp:594 #, c-format msgid "Failed to copy registry value '%s'" -msgstr "" +msgstr "Kopieren von Registrierungswert '%s' gescheitert" -#: ../src/msw/registry.cpp:599 +#: ../src/msw/registry.cpp:603 #, c-format msgid "Failed to copy the contents of registry key '%s' to '%s'." msgstr "" +"Kopieren des Inhalts des Registrieungsschlüssels '%s' nach '%s' gescheitert" -#: ../src/msw/dde.cpp:924 -#, fuzzy +#: ../src/msw/dde.cpp:934 msgid "Failed to create DDE string" -msgstr "Konnte Verzeichnis nicht anlegen " +msgstr "Erstellung des DDE-Strings gescheitert" -#: ../src/msw/mdi.cpp:402 -#, fuzzy +#: ../src/msw/mdi.cpp:428 msgid "Failed to create MDI parent frame." -msgstr "Konnte Verzeichnis nicht anlegen " +msgstr "Erstellung des MDI-Hauptframes gescheitert." -#: ../src/msw/statbr95.cpp:123 -#, fuzzy +#: ../src/msw/statbr95.cpp:149 msgid "Failed to create a status bar." -msgstr "Konnte Verzeichnis nicht anlegen " +msgstr "Erstellung der Statusbar gescheitert." #: ../src/msw/dde.cpp:401 #, c-format msgid "Failed to create connection to server '%s' on topic '%s'" -msgstr "" +msgstr "Aufbau der Verbindung zur Server '%s' 'on topic' gescheitert" -#: ../src/msw/dialog.cpp:177 -msgid "Failed to create dialog." +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." msgstr "" +"Dialog wurde nicht erstellt. Möglicheweise haben sie vergessen 'include wx/" +"msw/wx.rc' in ihre resource einzutragen." -#: ../src/generic/dirdlgg.cpp:478 +#: ../src/generic/dirdlgg.cpp:550 msgid "Failed to create directory " msgstr "Konnte Verzeichnis nicht anlegen " -#: ../src/html/winpars.cpp:357 +#: ../src/html/winpars.cpp:374 #, c-format msgid "Failed to display HTML document in %s encoding" -msgstr "" +msgstr "Anzeige von HTLM-Dokument in %s 'encoding' ist gescheitert" #: ../src/msw/clipbrd.cpp:134 msgid "Failed to empty the clipboard." msgstr "Konnte Zwischenablage nicht leeren." -#: ../src/msw/dde.cpp:606 +#: ../src/msw/dde.cpp:616 msgid "Failed to establish an advise loop with DDE server" -msgstr "" +msgstr "Aufbau eines 'advise loop' mit DDE Server gescheitert" -#: ../src/msw/dialup.cpp:636 +#: ../src/msw/dialup.cpp:639 #, c-format msgid "Failed to establish dialup connection: %s" -msgstr "" +msgstr "Aufbau der DFÜ-Verbindung gescheitert : %s" -#: ../src/unix/utilsunx.cpp:430 ../src/unix/utilsunx.cpp:454 -#, fuzzy, c-format +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format msgid "Failed to execute '%s'\n" msgstr "Kann '%s' nicht ausführen\n" -#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2449 +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 #, c-format msgid "" "Failed to find XBM resource %s.\n" "Forgot to use wxResourceLoadBitmapData?" msgstr "" +"Konnte XBM-Resource %s nicht finden.\n" +"Haben sie vergessen, die wxResource 'LoadBitmapData' zu verwenden?" -#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2605 +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 #, c-format msgid "" "Failed to find XBM resource %s.\n" "Forgot to use wxResourceLoadIconData?" msgstr "" +"Konnte XBM Resource %s nicht finden.\n" +"Haben sie vergessen, die wxResource 'LoadIconData' zu verwenden?" -#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2465 +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 #, c-format msgid "" "Failed to find XPM resource %s.\n" "Forgot to use wxResourceLoadBitmapData?" msgstr "" +"Konnte XPM-Resource %s nicht finden.\n" +"Haben sie vergessen, die wxResource 'LoadBitmapData' zu verwenden?" -#: ../src/msw/dialup.cpp:696 +#: ../src/msw/dialup.cpp:699 #, c-format msgid "Failed to get ISP names: %s" -msgstr "" +msgstr "Versuch gescheitert, 'IPS names' '%s' zu bekommen" #: ../src/msw/clipbrd.cpp:623 -#, fuzzy msgid "Failed to get data from the clipboard" -msgstr "Konnte Daten von der Zwischenablage nicht bekommen." +msgstr "Versuch, Daten aus der Zwischenablage zu bekommen, gescheitert" -#: ../src/common/timercmn.cpp:243 +#: ../src/common/timercmn.cpp:244 msgid "Failed to get the UTC system time." -msgstr "" +msgstr "Versuch, UTC-Systen-Zeit zu bekommen, gescheitert" -#: ../src/common/timercmn.cpp:195 -#, fuzzy +#: ../src/common/timercmn.cpp:196 msgid "Failed to get the local system time" -msgstr "Konnte Zwischenablage nicht leeren." +msgstr "Versuch, örtliche Systemzeit zu bekommen, gescheitert." #: ../src/unix/threadpsx.cpp:754 msgid "" "Failed to join a thread, potential memory leak detected - please restart the " "program" msgstr "" +"Thread-Verbindung gescheitert, mögliche 'memory leak' festgestellt - Bitte " +"Programm neu starten" -#: ../src/common/dynlib.cpp:225 +#: ../src/common/dynlib.cpp:239 #, c-format msgid "Failed to load shared library '%s'" -msgstr "" +msgstr "Laden des DLL '%s' gescheitert" #: ../src/msw/clipbrd.cpp:102 msgid "Failed to open the clipboard." msgstr "Konnte Zwischenablage nicht öffnen." #: ../src/msw/clipbrd.cpp:539 -#, fuzzy msgid "Failed to put data on the clipboard" -msgstr "Konnte Daten von der Zwischenablage nicht bekommen." +msgstr "Versuch, Daten in der Zwischenablage abzulegen, gescheitert" -#: ../src/unix/utilsunx.cpp:523 +#: ../src/unix/utilsunx.cpp:543 msgid "Failed to redirect child process input/output" -msgstr "" +msgstr "Umleitung des Ein/Ausgabe des Unterprozesses gescheitert" #: ../src/msw/dde.cpp:285 -#, fuzzy, c-format +#, c-format msgid "Failed to register DDE server '%s'" -msgstr "Konnte Verzeichnis nicht anlegen " +msgstr "Versuch, DDE-Server '%s' zu registrieren, gescheitert" -#: ../src/common/fontmap.cpp:485 +#: ../src/common/fontmap.cpp:552 #, c-format msgid "Failed to remember the encoding for the charset '%s'." msgstr "" +"Versuch gescheitert, an die Kodierung für den Zeichensatz '%s' zu erinnern." -#: ../src/msw/registry.cpp:436 +#: ../src/msw/registry.cpp:440 #, c-format msgid "Failed to rename registry value '%s' to '%s'." -msgstr "" +msgstr "Umbenennen des Registrieungswertes '%s' in '%s' gescheitert" -#: ../src/msw/registry.cpp:536 +#: ../src/msw/registry.cpp:540 #, c-format msgid "Failed to rename the registry key '%s' to '%s'." -msgstr "" +msgstr "Umbenennen des Registrieungsschlüssels von '%s' in '%s' gescheitert" #: ../src/msw/clipbrd.cpp:428 msgid "Failed to retrieve data from the clipboard." msgstr "Konnte Daten von der Zwischenablage nicht bekommen." -#: ../src/msw/dialup.cpp:458 -#, fuzzy +#: ../src/msw/dialup.cpp:463 msgid "Failed to retrieve text of RAS error message" -msgstr "Konnte Daten von der Zwischenablage nicht bekommen." +msgstr "Versuch, den Inhalt der RAS-Fehlernachricht zu holen, gescheitert" #: ../src/msw/clipbrd.cpp:652 -#, fuzzy msgid "Failed to retrieve the supported clipboard formats" -msgstr "Konnte Daten von der Zwischenablage nicht bekommen." - -#: ../src/msw/dde.cpp:651 -msgid "Failed to send DDE advise notification" msgstr "" +"Versuch, das von der Zwischenablage unterstützte Format zu holen, gescheitert" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "Versuch gescheitert, eine DDE-Benachrichtigung zu schicken" #: ../src/msw/clipbrd.cpp:300 msgid "Failed to set clipboard data." -msgstr "Konnte Datein nicht in Zwischenablage kopieren." +msgstr "Konnte Dateien nicht in die Zwischenablage kopieren." #: ../src/unix/threadpsx.cpp:1071 #, c-format msgid "Failed to set thread priority %d." -msgstr "" +msgstr "Versuch gescheitert, die Thread-Priorität %d zu setzten." -#: ../src/common/fs_mem.cpp:165 +#: ../src/common/fs_mem.cpp:167 #, c-format msgid "Failed to store image '%s' to memory VFS!" -msgstr "" +msgstr "Versuch, das Bild '%s' im VFS-Speicher zu laden, gescheitert!" #: ../src/unix/threadpsx.cpp:1251 msgid "Failed to terminate a thread." -msgstr "" +msgstr "Versuch, den Thread zu beenden, gescheitert." -#: ../src/msw/dde.cpp:625 +#: ../src/msw/dde.cpp:635 msgid "Failed to terminate the advise loop with DDE server" -msgstr "" +msgstr "Versuch gescheitert, den 'advise loop' mit DDE-Server zu beenden." -#: ../src/msw/dialup.cpp:930 -#, fuzzy, c-format +#: ../src/msw/dialup.cpp:933 +#, c-format msgid "Failed to terminate the dialup connection: %s" -msgstr "Konnte Verzeichnis nicht anlegen " +msgstr "Versuch gescheitert, die DFÜ-Verbindung zu beenden: %s" #: ../src/msw/dde.cpp:301 -#, fuzzy, c-format +#, c-format msgid "Failed to unregister DDE server '%s'" -msgstr "Konnte Verzeichnis nicht anlegen " +msgstr "Versuch gescheitert, den DDE-Server '%s' zu deregistrieren." -#: ../src/msw/app.cpp:704 -msgid "Fatal Error" -msgstr "" - -#: ../src/generic/logg.cpp:329 +#: ../src/generic/logg.cpp:371 msgid "Fatal error" msgstr "Nicht-behebbarer Fehler" -#: ../src/common/log.cpp:347 +#: ../src/common/log.cpp:355 msgid "Fatal error: " -msgstr "Nicht-behebbarer Fehler" +msgstr "Nicht-behebbarer Fehler:" -#: ../src/msw/app.cpp:1199 +#: ../src/msw/app.cpp:1274 msgid "Fatal error: exiting" -msgstr "" +msgstr "Nicht-behebbarer Fehler: Abbruch" -#: ../src/generic/filedlgg.cpp:1067 ../src/gtk/filedlg.cpp:72 +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 #, c-format msgid "File '%s' already exists, do you really want to overwrite it?" msgstr "Datei '%s' existiert bereits, möchten Sie sie wirklich überschreiben?" #: ../src/common/textcmn.cpp:94 -#, fuzzy msgid "File couldn't be loaded." -msgstr "Verzeichnis '%s' konnte nicht angelegt werden." +msgstr "Datei konnte nicht geladen werden." -#: ../src/common/docview.cpp:287 ../src/common/docview.cpp:323 +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 msgid "File error" msgstr "Dateifehler" -#: ../src/generic/dirdlgg.cpp:281 ../src/generic/filedlgg.cpp:726 +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 msgid "File name exists already." -msgstr "" +msgstr "Dateiname bereits vorhanden" -#: ../src/msw/filedlg.cpp:280 +#: ../src/msw/filedlg.cpp:303 #, c-format msgid "Files (%s)|%s" msgstr "Dateien (%s)|%s" -#: ../src/html/helpfrm.cpp:335 -#, fuzzy +#: ../src/html/helpfrm.cpp:340 msgid "Find" -msgstr "Gefunden " +msgstr "Suchen" -#: ../src/html/helpfrm.cpp:866 +#: ../src/html/helpfrm.cpp:889 msgid "Fixed font:" -msgstr "" +msgstr "Fixed font:" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 Zoll" #: ../src/generic/fontdlgg.cpp:124 msgid "Font" -msgstr "Zeichensatz" +msgstr "Font" -#: ../src/html/helpfrm.cpp:876 +#: ../src/html/helpfrm.cpp:899 msgid "Font size:" -msgstr "" +msgstr "Font Große:" -#: ../src/unix/utilsunx.cpp:480 +#: ../src/unix/utilsunx.cpp:500 msgid "Fork failed" -msgstr "" +msgstr "'Fork' gescheitert" -#: ../src/common/dlgcmn.cpp:130 ../src/generic/helpwxht.cpp:157 +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 msgid "Forward" -msgstr "" +msgstr "Vorwärts" #: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 -#: ../src/common/resource.cpp:1799 ../src/common/resource.cpp:1929 -#: ../src/common/resource.cpp:3014 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 msgid "Found " msgstr "Gefunden " -#: ../src/html/helpfrm.cpp:614 +#: ../src/html/helpfrm.cpp:637 #, c-format msgid "Found %i matches" -msgstr "" +msgstr "Suchbegriff %i mal gefunden" #: ../src/generic/prntdlgg.cpp:187 msgid "From:" msgstr "Von:" -#: ../src/html/helpfrm.cpp:478 +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: Datei scheint unvollständig zu sein." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: Fehler im GIF-Bildformat." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: nicht genug Speicher." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF: unbekannter Fehler!!!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "German Legal Entlospapier, 21,59 x 33,02 cm" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "German Std Entlospapier, 8 1/2 x 12 Zoll" + +#: ../src/html/helpfrm.cpp:501 msgid "Go back" -msgstr "" +msgstr "Vorherige HTLM-Seite zeigen" -#: ../src/html/helpfrm.cpp:481 +#: ../src/html/helpfrm.cpp:504 msgid "Go forward" -msgstr "" +msgstr "Nächste HTLM Seite zeigen" -#: ../src/html/helpfrm.cpp:486 +#: ../src/html/helpfrm.cpp:509 msgid "Go one level up in document hierarchy" -msgstr "" +msgstr "In die nächste Dokumentebene gehen" -#: ../src/generic/filedlgg.cpp:870 -#, fuzzy +#: ../src/generic/filedlgg.cpp:875 msgid "Go to home directory" -msgstr "Das Verzeichnis" +msgstr "Gehe zum Home-Verzeichnis" -#: ../src/generic/filedlgg.cpp:864 -#, fuzzy +#: ../src/generic/filedlgg.cpp:869 msgid "Go to parent directory" -msgstr "Konnte Verzeichnis nicht anlegen " +msgstr "Gehe zum 'Parent'-Verzeichnis" -#: ../src/common/fontmap.cpp:94 +#: ../src/common/fontmap.cpp:106 msgid "Greek (ISO-8859-7)" -msgstr "" +msgstr "Griechisch (ISO-8859-7)" -#: ../src/html/htmlwin.cpp:251 -#, fuzzy, c-format +#: ../src/html/htmlwin.cpp:250 +#, c-format msgid "HTML anchor %s does not exist." -msgstr "Verzeichnis existiert nicht" +msgstr "HTML 'anchor' %s existiert nicht." -#: ../src/common/fontmap.cpp:95 +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" +"HTML Dateien (*.htm)|*.htm|HTML Dateien (*.html)|*.html|Hilfebücher (*.htb)|" +"*.htb|Hilfebücher (*.zip)|*.zip|HTML-Hilfe-Projekt (*.hhp)|*.hhp|Alle " +"Dateien (*.*)|*" + +#: ../src/common/fontmap.cpp:107 msgid "Hebrew (ISO-8859-8)" -msgstr "" +msgstr "Hebräisch (ISO-8859-8)" -#: ../src/common/dlgcmn.cpp:142 ../src/generic/proplist.cpp:528 -#: ../src/html/helpfrm.cpp:205 +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 msgid "Help" -msgstr "" +msgstr "Hilfe" -#: ../src/html/helpfrm.cpp:849 +#: ../src/html/helpfrm.cpp:872 msgid "Help Browser Options" -msgstr "" +msgstr "Hilfe zu den Browser-Optionen" -#: ../src/generic/helphtml.cpp:309 ../src/generic/helphtml.cpp:310 +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 msgid "Help Index" msgstr "Hilfeindex" -#: ../src/html/helpfrm.cpp:1147 -#, fuzzy +#: ../src/html/helpfrm.cpp:1172 msgid "Help Printing" -msgstr "Drucke" +msgstr "Hilfe drucken" -#: ../src/generic/helpwxht.cpp:243 ../src/html/helpctrl.cpp:42 +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 #, c-format msgid "Help: %s" -msgstr "" - -#: ../src/common/fontmap.cpp:99 -msgid "ISO-8859-12" -msgstr "" - -#: ../src/common/fontmap.cpp:100 -msgid "ISO-8859-13" -msgstr "" - -#: ../src/common/fontmap.cpp:101 -msgid "ISO-8859-14" -msgstr "" +msgstr "Hilfe: %s" #: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 -#: ../src/common/resource.cpp:2639 ../src/common/resource.cpp:2650 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 #, c-format msgid "Icon resource specification %s not found." -msgstr "" +msgstr "Icon %s nicht gefunden." #: ../src/common/resource.cpp:251 msgid "Ill-formed resource file syntax." -msgstr "" +msgstr "Ungültige Syntax in Resource-Datei" -#: ../src/generic/dirdlgg.cpp:263 ../src/generic/filedlgg.cpp:712 -#, fuzzy +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 msgid "Illegal directory name." -msgstr "Das Verzeichnis" +msgstr "Ungültiger Verzeichnisname" -#: ../src/generic/filedlgg.cpp:1036 +#: ../src/generic/filedlgg.cpp:1043 msgid "Illegal file specification." -msgstr "" +msgstr "Ungültige Dateiangabe" -#: ../src/msw/textctrl.cpp:215 +#: ../src/msw/textctrl.cpp:219 msgid "" "Impossible to create a rich edit control, using simple text control instead. " "Please reinstall riched32.dll" msgstr "" +"Versuch eine 'rich edit control' zu erstellen gescheitert, verwende " +"stattdessen ein einfaches Text-Control. Bitte 'riched32.dll' neu installieren" -#: ../src/unix/utilsunx.cpp:343 +#: ../src/unix/utilsunx.cpp:350 msgid "Impossible to get child process input" -msgstr "" +msgstr "Es war nicht möglich, die Eingabe des Unterprozesses zu verarbeiten" -#: ../src/html/helpdata.cpp:288 +#: ../src/html/helpdata.cpp:403 msgid "Incorrect version of HTML help book" -msgstr "" +msgstr "Falsche Version des HTML-Hilfebuchs" -#: ../src/html/helpfrm.cpp:367 -#, fuzzy +#: ../src/html/helpfrm.cpp:372 msgid "Index" -msgstr "Hilfeindex" +msgstr "Hilfe-Index" -#: ../src/generic/logg.cpp:209 -msgid "Information" -msgstr "Information" +#: ../src/common/fontmap.cpp:111 +#, fuzzy +msgid "Indian (ISO-8859-12)" +msgstr "Indisch (ISO-8859-12)" -#: ../src/common/imagtiff.cpp:136 +#: ../src/common/imagtiff.cpp:171 msgid "Invalid TIFF image index." -msgstr "" +msgstr "Ungültiger Index des TIFF-Bilds." #: ../src/generic/fontdlgg.cpp:213 msgid "Italic" msgstr "Kursiv" -#: ../src/common/imagjpeg.cpp:195 +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Italy Umschlag, 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 msgid "JPEG: Couldn't load - file is probably corrupted." -msgstr "" +msgstr "JPEG: Lesefehler - Datei ist vermutlich beschädigt." -#: ../src/common/imagjpeg.cpp:312 -#, fuzzy +#: ../src/common/imagjpeg.cpp:315 msgid "JPEG: Couldn't save image." -msgstr "Kann keinen Wecker anlegen." +msgstr "JPEG: Konnte Bild nicht sichern." -#: ../src/common/fontmap.cpp:103 +#: ../src/common/fontmap.cpp:115 msgid "KOI8-R" -msgstr "" +msgstr "KOI8-R" -#: ../src/generic/dcpsg.cpp:2183 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 #: ../src/generic/prntdlgg.cpp:637 msgid "Landscape" msgstr "Querformat" +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Ledger, 17 x 11 Zoll" + #: ../src/generic/prntdlgg.cpp:649 msgid "Left margin (mm):" msgstr "Linker Rand (mm):" +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal, 8 1/2 x 14 Zoll" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Letter Small, 8 1/2 x 11 Zoll" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter, 8 1/2 x 11 Zoll" + #: ../src/generic/fontdlgg.cpp:216 msgid "Light" msgstr "Dünn" -#: ../src/generic/filedlgg.cpp:1263 ../src/gtk/filedlg.cpp:241 -#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:438 +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 #, c-format msgid "Load %s file" msgstr "%s-Datei laden" -#: ../src/html/htmlwin.cpp:187 -#, fuzzy +#: ../src/html/htmlwin.cpp:186 msgid "Loading : " -msgstr "Warning: " +msgstr "Laden : " #: ../src/common/imagpnm.cpp:72 msgid "Loading Grey Ascii PNM image is not yet implemented." msgstr "" +"Das Laden von Graustufen Ascii PNM-Bilddateien wird z.Zt. nicht unterstützt." #: ../src/common/imagpnm.cpp:75 msgid "Loading Grey Raw PNM image is not yet implemented." msgstr "" +"Das Laden von Graustufen Ascii PNM-Bilddateien wird z.Zt. nicht unterstützt." -#: ../src/generic/logg.cpp:525 +#: ../src/generic/logg.cpp:538 #, c-format msgid "Log saved to the file '%s'." msgstr "Logtext in Datei '%s' gesichert." -#: ../src/gtk/mdi.cpp:420 +#: ../src/gtk/mdi.cpp:435 msgid "MDI child" -msgstr "" +msgstr "MDI child" -#: ../src/unix/mimetype.cpp:1540 +#: ../src/unix/mimetype.cpp:1597 #, c-format msgid "Mailcap file %s, line %d: incomplete entry ignored." msgstr "Mailcap-Datei %s, Zeile %d: unvollständiger Eintrag ignoriert." -#: ../src/common/fs_mem.cpp:142 +#: ../src/common/fs_mem.cpp:144 #, c-format msgid "Memory VFS already contains file '%s'!" -msgstr "" +msgstr "VFS-Speicher beinhaltet bereits der Datei '%s'!" -#: ../src/generic/logg.cpp:763 -msgid "Message" -msgstr "" - -#: ../src/unix/mimetype.cpp:1261 +#: ../src/unix/mimetype.cpp:1295 #, c-format msgid "Mime.types file %s, line %d: unterminated quoted string." -msgstr "Mime.types-Datei %s, Zeile %d: unterminierter Text" +msgstr "Mime.types-Datei %s, Zeile %d: nicht terminierter Text" #: ../src/generic/fontdlgg.cpp:208 msgid "Modern" -msgstr "" +msgstr "Modern" -#: ../src/common/dlgcmn.cpp:139 -#, fuzzy +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Monarch Envelope, 3 7/8 x 7 1/2 Zoll" + +#: ../src/common/dlgcmn.cpp:141 msgid "More..." -msgstr "Neu..." +msgstr "Mehr..." -#: ../src/generic/dirdlgg.cpp:209 +#: ../src/generic/dirdlgg.cpp:213 msgid "Mounted Devices" msgstr "Dateisysteme" -#: ../src/generic/dirdlgg.cpp:204 -msgid "My Harddisk" -msgstr "" - #: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Mein Laufwerk" + +#: ../src/generic/dirdlgg.cpp:212 msgid "My Home" msgstr "Mein Verzeichnis" -#: ../src/generic/filedlgg.cpp:531 -#, fuzzy +#: ../src/generic/filedlgg.cpp:533 msgid "Name" -msgstr "am" +msgstr "Name" -#: ../src/generic/dirdlgg.cpp:415 +#: ../src/generic/dirdlgg.cpp:427 msgid "New..." msgstr "Neu..." -#: ../src/generic/filedlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:610 msgid "NewName" -msgstr "" +msgstr "NeuerName" -#: ../src/html/helpfrm.cpp:492 +#: ../src/html/helpfrm.cpp:515 msgid "Next page" -msgstr "" +msgstr "Nächste HTLM Seite zeigen" -#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:119 +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 #: ../src/motif/msgdlg.cpp:178 msgid "No" msgstr "Nein" #: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 -#: ../src/common/resource.cpp:2455 ../src/common/resource.cpp:2611 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 msgid "No XBM facility available!" -msgstr "" +msgstr "Kein XBM-Dienst verfügbar!" -#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2471 +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 msgid "No XPM facility available!" -msgstr "" +msgstr "Kein XPM-Dienst verfügbar!" -#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2633 +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 msgid "No XPM icon facility available!" -msgstr "" +msgstr "Kein XBM-Icon-Dienst verfügbar!" -#: ../src/generic/helphtml.cpp:304 +#: ../src/generic/helphtml.cpp:314 msgid "No entries found." msgstr "Keine Einträge gefunden." -#: ../src/common/image.cpp:518 -msgid "No handler found for image type." +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" msgstr "" +"Die Kodierung '%s' ist nicht bekannt.\n" +"Möchten Sie einen Font für diese Kodierung wählen\n" +"(sonst wird der Text mit dieser Kodierung nicht richtig angezeigt)?" -#: ../src/common/image.cpp:526 ../src/common/image.cpp:560 +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "Dieses Bild-Format wird nicht unterstützt" + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 #, c-format msgid "No image handler for type %d defined." -msgstr "" +msgstr "Bild-Format %d wurde nicht definiert." -#: ../src/common/image.cpp:544 ../src/common/image.cpp:576 +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 #, c-format msgid "No image handler for type %s defined." -msgstr "" +msgstr "Bild-Format %s wurde nicht definiert." -#: ../src/html/helpfrm.cpp:605 +#: ../src/html/helpfrm.cpp:628 msgid "No matching page found yet" -msgstr "" +msgstr "Passende Seite noch nicht gefunden" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Nordisch (ISO-8859-10)" #: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 msgid "Normal" -msgstr "" +msgstr "Normal" -#: ../src/html/helpfrm.cpp:858 +#: ../src/html/helpfrm.cpp:881 msgid "Normal font:" -msgstr "" +msgstr "Normal Font:" -#: ../src/common/dlgcmn.cpp:125 ../src/generic/dcpsg.cpp:2191 -#: ../src/generic/dirdlgg.cpp:411 ../src/generic/filedlgg.cpp:902 -#: ../src/generic/fontdlgg.cpp:256 ../src/generic/prntdlgg.cpp:467 -#: ../src/generic/proplist.cpp:511 ../src/gtk/filedlg.cpp:158 -#: ../src/gtk/fontdlg.cpp:172 ../src/html/helpfrm.cpp:886 +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Note, 8 1/2 x 11 Zoll" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 msgid "OK" -msgstr "" +msgstr "OK" -#: ../src/html/helpfrm.cpp:500 ../src/html/helpfrm.cpp:1155 +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 msgid "Open HTML document" -msgstr "" +msgstr "Öffne HTLM Dokument" -#: ../src/generic/dirdlgg.cpp:292 ../src/generic/dirdlgg.cpp:533 -#: ../src/generic/filedlgg.cpp:620 ../src/generic/filedlgg.cpp:739 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 msgid "Operation not permitted." -msgstr "" +msgstr "Ausführung nicht erlaubt." -#: ../src/common/cmdline.cpp:592 -#, fuzzy, c-format +#: ../src/common/cmdline.cpp:590 +#, c-format msgid "Option '%s' requires a value, '=' expected." -msgstr "Datei '%s', Zeile %d: '=' erwartet." +msgstr "Option '%s' erwartet einen Wert, '=' erwartet." -#: ../src/common/cmdline.cpp:612 +#: ../src/common/cmdline.cpp:610 #, c-format msgid "Option '%s' requires a value." -msgstr "" +msgstr "Option '%s' erwartet einen Wert." -#: ../src/common/cmdline.cpp:668 +#: ../src/common/cmdline.cpp:671 #, c-format msgid "Option '%s': '%s' cannot be converted to a date." -msgstr "" +msgstr "Option '%s': '%s' kann nicht in eine Datum umgesetzt werden." #: ../src/generic/prntdlgg.cpp:447 msgid "Options" @@ -1517,29 +1764,48 @@ msgstr "Optionen" msgid "Orientation" msgstr "Orientierung" +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: Speicheranforderung gescheitert" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: Bildformat wird nicht unterstützt" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: ungültiges Bild" + #: ../src/common/imagpcx.cpp:434 msgid "PCX: this is not a PCX file." -msgstr "" +msgstr "PCX: dies ist keine PCX Datei." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX: unbekannter fehler !!!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: Versionnummer zu niedrig" #: ../src/common/imagpnm.cpp:96 -#, fuzzy msgid "PNM: Couldn't allocate memory." -msgstr "Kann keinen Wecker anlegen." +msgstr "PNM: Speicheranforderung gescheitert." #: ../src/common/imagpnm.cpp:80 msgid "PNM: File format is not recognized." -msgstr "" +msgstr "PNM: Datei-Format wurde nicht erkannt." #: ../src/common/imagpnm.cpp:112 msgid "PNM: File seems truncated." -msgstr "" +msgstr "PNM: Datei wurde abgeschnitten." -#: ../src/common/prntbase.cpp:729 +#: ../src/common/prntbase.cpp:731 #, c-format msgid "Page %d" msgstr "Seite %d" -#: ../src/common/prntbase.cpp:727 +#: ../src/common/prntbase.cpp:729 #, c-format msgid "Page %d of %d" msgstr "Seite %d aus %d" @@ -1554,7 +1820,6 @@ msgstr "Seiten" #: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 #: ../src/generic/prntdlgg.cpp:808 -#, fuzzy msgid "Paper Size" msgstr "Papierformat" @@ -1563,81 +1828,70 @@ msgstr "Papierformat" msgid "Paper size" msgstr "Papierformat" -#: ../src/generic/filedlgg.cpp:535 +#: ../src/generic/filedlgg.cpp:537 msgid "Permissions" -msgstr "" +msgstr "Erlaubnisse" -#: ../src/unix/utilsunx.cpp:429 ../src/unix/utilsunx.cpp:453 +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 msgid "Pipe creation failed" msgstr "Konnte keine Pipe anlegen" #: ../src/gtk/fontdlg.cpp:72 -#, fuzzy msgid "Please choose a valid font." -msgstr "Bitte wählen Sie eine bestehende Datei." +msgstr "Bitte wählen Sie einen gültigen Font." -#: ../src/generic/filedlgg.cpp:1085 ../src/gtk/filedlg.cpp:83 +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 msgid "Please choose an existing file." msgstr "Bitte wählen Sie eine bestehende Datei." -#: ../src/msw/dialup.cpp:764 +#: ../src/msw/dialup.cpp:768 msgid "Please choose which ISP do you want to connect to" -msgstr "" +msgstr "Bitte gewünschte ISP-Verbindung auswählen" -#: ../src/common/prntbase.cpp:105 +#: ../src/common/prntbase.cpp:107 msgid "Please wait..." msgstr "Bitte warten..." -#: ../src/generic/dcpsg.cpp:2182 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 #: ../src/generic/prntdlgg.cpp:636 msgid "Portrait" msgstr "Hochformat" -#: ../src/generic/dcpsg.cpp:377 +#: ../src/generic/dcpsg.cpp:391 msgid "PostScript" -msgstr "" +msgstr "PostScript" #: ../src/generic/prntdlgg.cpp:272 msgid "PostScript file" msgstr "PostScript-Datei" -#: ../src/generic/dcpsg.cpp:2224 +#: ../src/generic/dcpsg.cpp:2303 msgid "PostScript:" -msgstr "" +msgstr "PostScript:" -#: ../src/generic/dcpsg.cpp:2187 +#: ../src/generic/dcpsg.cpp:2266 msgid "Preview Only" msgstr "Nur Voransicht" -#: ../src/html/helpfrm.cpp:880 -#, fuzzy +#: ../src/html/helpfrm.cpp:903 msgid "Preview:" -msgstr "Nur Voransicht" +msgstr "Vorschau:" -#: ../src/html/htmprint.cpp:479 -#, fuzzy -msgid "Previewing" -msgstr "Nur Voransicht" - -#: ../src/html/helpfrm.cpp:489 +#: ../src/html/helpfrm.cpp:512 msgid "Previous page" -msgstr "" +msgstr "Vorherige HTLM-Seite zeigen" #: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 msgid "Print" msgstr "Drucken" -#: ../src/generic/printps.cpp:200 -msgid "Print Error" -msgstr "Fehler beim Drucken" - -#: ../src/common/docview.cpp:884 +#: ../src/common/docview.cpp:897 msgid "Print Preview" -msgstr "Druckvoransicht" +msgstr "Druckvorschau" -#: ../src/common/prntbase.cpp:685 ../src/common/prntbase.cpp:709 +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 msgid "Print Preview Failure" -msgstr "Fehler bei Druckvoransicht" +msgstr "Fehler bei der Druckvorschau" #: ../src/generic/prntdlgg.cpp:172 msgid "Print Range" @@ -1649,40 +1903,39 @@ msgstr "Druckereinstellungen" #: ../src/generic/prntdlgg.cpp:455 msgid "Print in colour" -msgstr "In Farbe drucken" +msgstr "Farbig drucken" #: ../src/generic/prntdlgg.cpp:457 msgid "Print spooling" msgstr "Druckersteuerung" -#: ../src/html/helpfrm.cpp:506 -#, fuzzy +#: ../src/html/helpfrm.cpp:529 msgid "Print this page" -msgstr "Seitenbereich" +msgstr "Diese Seite Drucken" -#: ../src/generic/dcpsg.cpp:2186 ../src/generic/prntdlgg.cpp:150 +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 msgid "Print to File" msgstr "In Datei drucken" -#: ../src/common/prntbase.cpp:364 +#: ../src/common/prntbase.cpp:366 msgid "Print..." msgstr "Drucken..." -#: ../src/generic/dcpsg.cpp:2197 +#: ../src/generic/dcpsg.cpp:2276 msgid "Printer Command: " -msgstr "Druck-Befehl " +msgstr "Druckbefehl: " -#: ../src/generic/dcpsg.cpp:2202 +#: ../src/generic/dcpsg.cpp:2281 msgid "Printer Options: " msgstr "Befehlsoptionen: " -#: ../src/generic/dcpsg.cpp:346 +#: ../src/generic/dcpsg.cpp:360 msgid "Printer Settings" msgstr "Druckereinstellungen" #: ../src/generic/prntdlgg.cpp:459 msgid "Printer command:" -msgstr "Druck-Befehl:" +msgstr "Druckbefehl:" #: ../src/generic/prntdlgg.cpp:149 msgid "Printer options" @@ -1696,73 +1949,80 @@ msgstr "Druckereinstellungen:" msgid "Printer..." msgstr "Drucker..." -#: ../src/common/prntbase.cpp:104 ../src/common/prntbase.cpp:146 -#: ../src/html/htmprint.cpp:500 +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 msgid "Printing" -msgstr "Drucke" +msgstr "Drucken" -#: ../src/common/prntbase.cpp:118 +#: ../src/common/prntbase.cpp:120 msgid "Printing Error" msgstr "Fehler beim Drucken" -#: ../src/generic/printps.cpp:218 +#: ../src/generic/printps.cpp:232 #, c-format msgid "Printing page %d..." msgstr "Drucke Seite %d..." -#: ../src/generic/printps.cpp:185 +#: ../src/generic/printps.cpp:192 msgid "Printing..." msgstr "Drucke..." -#: ../src/common/log.cpp:348 +#: ../src/common/log.cpp:356 msgid "Program aborted." msgstr "Programm abgebrochen." -#: ../src/generic/logg.cpp:477 +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Quarto, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 msgid "Question" msgstr "Frage" #: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 -#, fuzzy, c-format +#, c-format msgid "Read error on file '%s'" -msgstr "Datei '%s' ersetzen?" +msgstr "Lesefehler in Datei '%s'" -#: ../src/msw/registry.cpp:528 +#: ../src/msw/registry.cpp:532 #, c-format msgid "Registry key '%s' already exists." -msgstr "" +msgstr "Registrierungsschlüssel '%s' bereits vorhanden." -#: ../src/msw/registry.cpp:497 +#: ../src/msw/registry.cpp:501 #, c-format msgid "Registry key '%s' does not exist, cannot rename it." msgstr "" +"Registriersschlüssel '%s' existiert nicht, Umbenennung daher nicht möglich." -#: ../src/msw/registry.cpp:624 +#: ../src/msw/registry.cpp:628 #, c-format msgid "" "Registry key '%s' is needed for normal system operation,\n" "deleting it will leave your system in unusable state:\n" "operation aborted." msgstr "" +"Registrierungsschlüssel '%s' wird vom System benötigt,\n" +"durch seine Entfernung wird das System umbrauchbar:\n" +"Abbruch." -#: ../src/msw/registry.cpp:428 +#: ../src/msw/registry.cpp:432 #, c-format msgid "Registry value '%s' already exists." -msgstr "" +msgstr "Registrierungswert '%s' bereits vorhanden." -#: ../src/generic/helphtml.cpp:309 +#: ../src/generic/helphtml.cpp:319 msgid "Relevant entries:" msgstr "Relevante Einträge:" -#: ../src/generic/progdlgg.cpp:170 +#: ../src/generic/progdlgg.cpp:167 msgid "Remaining time : " -msgstr "" +msgstr "Verbleibne Zeit : " -#: ../src/html/helpfrm.cpp:264 +#: ../src/html/helpfrm.cpp:269 msgid "Remove current page from bookmarks" -msgstr "" +msgstr "Aktuelle HTLM-Seite als Lesezeichen entfernen" -#: ../src/msw/filedlg.cpp:400 +#: ../src/msw/filedlg.cpp:445 #, c-format msgid "Replace file '%s'?" msgstr "Datei '%s' ersetzen?" @@ -1773,263 +2033,282 @@ msgstr "Rechter Rand (mm):" #: ../src/generic/fontdlgg.cpp:206 msgid "Roman" -msgstr "Römisch" +msgstr "Roman" -#: ../src/generic/filedlgg.cpp:1279 ../src/gtk/filedlg.cpp:257 -#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:439 +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 #, c-format msgid "Save %s file" msgstr "Datei %s sichern" -#: ../src/common/docview.cpp:240 +#: ../src/common/docview.cpp:249 msgid "Save as" msgstr "Sichern als" -#: ../src/generic/logg.cpp:431 +#: ../src/generic/logg.cpp:473 msgid "Save log contents to file" msgstr "Logtexte in Datei sichern" #: ../src/generic/fontdlgg.cpp:209 msgid "Script" -msgstr "" +msgstr "Script" -#: ../src/generic/helpwxht.cpp:160 ../src/html/helpfrm.cpp:409 -#: ../src/html/helpfrm.cpp:429 +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 msgid "Search" -msgstr "" +msgstr "Suchen" -#: ../src/html/helpfrm.cpp:411 +#: ../src/html/helpfrm.cpp:416 msgid "" "Search contents of help book(s) for all occurences of the text you typed " "above" -msgstr "" +msgstr "Alle Hilfebücher nach eingegebenem Begriff durchsuchen." -#: ../src/html/helpfrm.cpp:712 +#: ../src/html/helpfrm.cpp:735 msgid "Search in all books" -msgstr "" +msgstr "Alle Bücher durchsuchen" -#: ../src/html/helpfrm.cpp:605 -#, fuzzy +#: ../src/html/helpfrm.cpp:628 msgid "Searching..." -msgstr "Drucke..." +msgstr "Suche..." -#: ../src/generic/dirdlgg.cpp:187 -#, fuzzy +#: ../src/generic/dirdlgg.cpp:191 msgid "Sections" -msgstr "Optionen" +msgstr "Bereiche" #: ../src/common/ffile.cpp:221 -#, fuzzy, c-format +#, c-format msgid "Seek error on file '%s'" -msgstr "Kann Datei '%s' nicht öffnen" +msgstr "Suchfehler in Datei '%s'" -#: ../src/common/docview.cpp:1414 +#: ../src/common/docview.cpp:1469 msgid "Select a document template" -msgstr "" +msgstr "Dokument-Template wählen" -#: ../src/common/docview.cpp:1437 +#: ../src/common/docview.cpp:1494 msgid "Select a document view" -msgstr "" +msgstr "Dokument-Anzeige ('View') wählen" -#: ../src/common/docview.cpp:1332 ../src/common/docview.cpp:1369 +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 msgid "Select a file" -msgstr "" +msgstr "Datei wählen" -#: ../src/generic/dcpsg.cpp:2185 +#: ../src/generic/dcpsg.cpp:2264 msgid "Send to Printer" msgstr "Zum Drucker schicken" -#: ../src/common/dlgcmn.cpp:136 -#, fuzzy +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "Trennungzeichen nach der Option '%s' erwartet." + +#: ../src/common/dlgcmn.cpp:138 msgid "Setup" -msgstr "Einstellungen..." +msgstr "Einstellungen" #: ../src/generic/prntdlgg.cpp:155 msgid "Setup..." msgstr "Einstellungen..." -#: ../src/msw/dialup.cpp:535 +#: ../src/msw/dialup.cpp:539 msgid "Several active dialup connections found, choosing one randomly." -msgstr "" +msgstr "Mehrere aktive DFÜ-Verbindungen gefunden, wähle einer davon aus." -#: ../src/html/helpfrm.cpp:326 +#: ../src/html/helpfrm.cpp:331 msgid "Show all" -msgstr "" +msgstr "Alles zeigen" -#: ../src/html/helpfrm.cpp:360 +#: ../src/html/helpfrm.cpp:365 msgid "Show all items in index" -msgstr "" +msgstr "Alle Einträge im Index anzeigen" -#: ../src/generic/filedlgg.cpp:908 +#: ../src/generic/filedlgg.cpp:913 msgid "Show hidden files" -msgstr "" +msgstr "Versteckte Dateien anzeigen" -#: ../src/html/helpfrm.cpp:473 +#: ../src/html/helpfrm.cpp:496 msgid "Show/hide navigation panel" -msgstr "" +msgstr "Suchbaum Ein-/Ausschalten" -#: ../src/generic/filedlgg.cpp:532 +#: ../src/generic/filedlgg.cpp:534 msgid "Size" -msgstr "" +msgstr "Größe" #: ../src/generic/fontdlgg.cpp:214 msgid "Slant" msgstr "Geneigt" -#: ../src/common/docview.cpp:297 +#: ../src/common/docview.cpp:306 msgid "Sorry, could not open this file for saving." -msgstr "" +msgstr "Bedauere, diese Datei konnte zur Sicherung nicht geöffnet werden." -#: ../src/common/docview.cpp:333 ../src/common/docview.cpp:345 +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 msgid "Sorry, could not open this file." -msgstr "" +msgstr "Bedauere, diese Datei konnte nicht geöffnet werden." -#: ../src/common/docview.cpp:304 +#: ../src/common/docview.cpp:313 msgid "Sorry, could not save this file." -msgstr "" +msgstr "Bedauere, diese Datei konnte nicht gesichert werden." -#: ../src/common/prntbase.cpp:685 +#: ../src/common/prntbase.cpp:687 msgid "Sorry, not enough memory to create a preview." msgstr "Nicht genug Speicher für Voransicht." -#: ../src/generic/logg.cpp:585 +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Statement, 5 1/2 x 8 1/2 Zoll" + +#: ../src/generic/logg.cpp:598 msgid "Status: " -msgstr "" +msgstr "Status: " #: ../src/generic/fontdlgg.cpp:210 msgid "Swiss" -msgstr "Schweizer" +msgstr "Swiss" -#: ../src/common/imagtiff.cpp:157 ../src/common/imagtiff.cpp:166 -#, fuzzy +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 msgid "TIFF: Couldn't allocate memory." -msgstr "Kann keinen Wecker anlegen." +msgstr "TIFF: Speicheranforderung gescheitert." -#: ../src/common/imagtiff.cpp:128 +#: ../src/common/imagtiff.cpp:163 msgid "TIFF: Error loading image." -msgstr "" +msgstr "TIFF: Fehler beim Laden des Bilds." -#: ../src/common/imagtiff.cpp:176 -#, fuzzy +#: ../src/common/imagtiff.cpp:214 msgid "TIFF: Error reading image." -msgstr "Fehler beim Anlegen des Verzeichnisses" +msgstr "TIFF: Fehler beim Lesen des Bildes." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: Schreibfehler beim Sichern." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: Schreibfehler beim Sichern." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloid, 11 x 17 Zoll" #: ../src/generic/fontdlgg.cpp:211 msgid "Teletype" msgstr "Schreibmaschine" -#: ../src/common/docview.cpp:1414 +#: ../src/common/docview.cpp:1469 msgid "Templates" -msgstr "" +msgstr "Templaten" -#: ../src/generic/dirdlgg.cpp:214 +#: ../src/generic/dirdlgg.cpp:218 msgid "Temporary" -msgstr "" +msgstr "Temporär" -#: ../src/common/fontmap.cpp:98 +#: ../src/common/fontmap.cpp:110 msgid "Thai (ISO-8859-11)" -msgstr "" +msgstr "Thai (ISO-8859-11)" -#: ../src/generic/dirdlgg.cpp:206 +#: ../src/generic/dirdlgg.cpp:210 msgid "The Computer" msgstr "Der Computer" -#: ../src/common/fontmap.cpp:442 +#: ../src/common/fontmap.cpp:511 #, c-format msgid "" "The charset '%s' is unknown. You may select\n" "another charset to replace it with or choose\n" "[Cancel] if it cannot be replaced" msgstr "" +"Die Zeichensatz '%s' ist nicht bekannt. Wählen Sie \n" +"einen Ersatzzeichensatz oder 'Abbruch', \n" +"falls er nicht ersetzt werden kann." -#: ../src/msw/ole/dataobj.cpp:157 +#: ../src/msw/ole/dataobj.cpp:169 #, c-format msgid "The clipboard format '%d' doesn't exist." -msgstr "" +msgstr "Das Zwischenablageformat '%d' existiert nicht." -#: ../src/generic/dirdlgg.cpp:464 +#: ../src/generic/dirdlgg.cpp:536 msgid "The directory " msgstr "Das Verzeichnis" -#: ../src/common/fontmap.cpp:602 -#, c-format -msgid "" -"The encoding '%s' is unknown.\n" -"Would you like to select a font to be used for this encoding\n" -"(otherwise the text in this encoding will not be shown correctly)?" -msgstr "" - -#: ../src/common/docview.cpp:1619 +#: ../src/common/docview.cpp:1676 #, c-format msgid "" "The file '%s' doesn't exist and couldn't be opened.\n" "It has been also removed from the MRU files list." msgstr "" +"Die Datei '%s' existiert nicht und konnte nicht geöffnet werden.\n" +"Sie wurde außerdem von der MRU-Dateiliste entfernt." #: ../src/common/cmdline.cpp:761 #, c-format msgid "The required parameter '%s' was not specified." -msgstr "" +msgstr "Der benötigte Parameter '%s' wurde nicht angegeben." #: ../src/common/textcmn.cpp:121 msgid "The text couldn't be saved." -msgstr "" +msgstr "Der Text konnte nicht gesichert werden." #: ../src/common/cmdline.cpp:740 #, c-format msgid "The value for the option '%s' must be specified." -msgstr "" +msgstr "Der Wert für die Option '%s' muß angegeben werden" -#: ../src/msw/dialup.cpp:412 +#: ../src/msw/dialup.cpp:415 #, c-format msgid "" -"The version of remote access service (RAS) installed on this machine is too " -"old, please upgrade (the following required function is missing: %s)." +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." msgstr "" +"Der installierte RAS-Dienst Version ist zu alt, bitte auf den neusten Stand " +"bringen (folgende Funktion fehlt: %s)." -#: ../src/html/htmprint.cpp:479 -msgid "" -"There was a problem previewing.\n" -"Perhaps your current printer is not set correctly?" -msgstr "" - -#: ../src/html/htmprint.cpp:500 -msgid "" -"There was a problem printing.\n" -"Perhaps your current printer is not set correctly?" -msgstr "" - -#: ../src/msw/thread.cpp:1037 +#: ../src/msw/thread.cpp:1083 msgid "" "Thread module initialization failed: can not store value in thread local " "storage" msgstr "" +"Thread-Modul-Initialisierung gescheitert: Kann den Wert nicht zuweisen " +"('thread local storage'). " -#: ../src/unix/threadpsx.cpp:1440 +#: ../src/unix/threadpsx.cpp:1441 msgid "Thread module initialization failed: failed to create thread key" msgstr "" +"Thread-Modul-Initialisierung gescheitert: Thread-Schlüssel konnte nicht " +"erstellt werden" -#: ../src/msw/thread.cpp:1023 +#: ../src/msw/thread.cpp:1071 msgid "" "Thread module initialization failed: impossible to allocate index in thread " "local storage" msgstr "" +"Thread-Modul-Initialisierung gescheitert: Index konnte nicht allokiert " +"werden ( 'thread local storage' )" #: ../src/unix/threadpsx.cpp:962 msgid "Thread priority setting is ignored." +msgstr "Thread Prioritätseinstellung wird ignoriert" + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" msgstr "" -#: ../src/generic/filedlgg.cpp:534 ../src/generic/logg.cpp:764 -msgid "Time" +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" msgstr "" +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Zeit" + #: ../src/generic/tipdlg.cpp:162 msgid "Tip of the Day" -msgstr "" +msgstr "Tipp des Tages" #: ../src/generic/tipdlg.cpp:138 msgid "Tips not available, sorry!" -msgstr "" +msgstr "Bedauere, Tipps stehen nicht zur Verfügung" #: ../src/generic/prntdlgg.cpp:191 msgid "To:" @@ -2039,782 +2318,817 @@ msgstr "Bis:" msgid "Top margin (mm):" msgstr "Oberer Rand (mm):" -#: ../src/common/fs_mem.cpp:200 +#: ../src/common/fs_mem.cpp:202 #, c-format msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" msgstr "" +"Beim Versuch, die Datei '%s' aus dem VFS-Speicher zu entfernen, wurde " +"festgestellt, daß sie gar nicht geladen war!" #: ../src/common/sckaddr.cpp:107 msgid "Trying to solve a NULL hostname: giving up" -msgstr "" +msgstr "Beim Versuch, einen NULL-Hostnamen aufzulösen, gebe ich auf" -#: ../src/common/fontmap.cpp:96 +#: ../src/common/fontmap.cpp:108 msgid "Turkish (ISO-8859-9)" -msgstr "" +msgstr "Türkisch (ISO-8859-9)" -#: ../src/html/htmlwin.cpp:175 +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "US Std Entlospapier, 14 7/8 x 11 Zoll" + +#: ../src/html/htmlwin.cpp:174 #, c-format msgid "Unable to open requested HTML document: %s" -msgstr "" +msgstr "Das angeforderte HTML-Dokument konnte nicht geöffnet werden: %s" #: ../src/generic/fontdlgg.cpp:242 msgid "Underline" -msgstr "Unterstreichen" +msgstr "Unterstrichen" #: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 #: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 #: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 #: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 -#: ../src/common/resource.cpp:1809 ../src/common/resource.cpp:1823 -#: ../src/common/resource.cpp:1840 ../src/common/resource.cpp:1854 -#: ../src/common/resource.cpp:1939 ../src/common/resource.cpp:1953 -#: ../src/common/resource.cpp:1969 ../src/common/resource.cpp:1983 -#: ../src/common/resource.cpp:3024 ../src/common/resource.cpp:3038 -#: ../src/common/resource.cpp:3055 ../src/common/resource.cpp:3069 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 msgid "Unexpected end of file whilst parsing resource." -msgstr "" +msgstr "Unerwartetes Dateiende während des Lesevorgang." #: ../src/common/cmdline.cpp:712 #, c-format msgid "Unexpected parameter '%s'" -msgstr "" +msgstr "Unerwarteter Parameter '%s'" -#: ../src/msw/dde.cpp:1020 +#: ../src/msw/dde.cpp:1030 #, c-format msgid "Unknown DDE error %08x" -msgstr "" +msgstr "Unbekannter DDE-Fehler %08x" -#: ../src/common/fontmap.cpp:306 +#: ../src/common/fontmap.cpp:332 #, c-format msgid "Unknown encoding (%d)" -msgstr "" +msgstr "Unbekannte Kodierung (%d)" -#: ../src/unix/mimetype.cpp:1303 +#: ../src/unix/mimetype.cpp:1338 #, c-format msgid "Unknown field in file %s, line %d: '%s'." -msgstr "Unbekanntest Feld '%s' in Datei %s, Zeile %d." +msgstr "Unbekanntes Feld '%s' in Datei %s, Zeile %d." -#: ../src/common/cmdline.cpp:498 +#: ../src/common/cmdline.cpp:496 #, c-format msgid "Unknown long option '%s'" -msgstr "" +msgstr "Unbekannte 'long'-Option '%s'" -#: ../src/common/cmdline.cpp:520 +#: ../src/common/cmdline.cpp:518 #, c-format msgid "Unknown option '%s'" -msgstr "" +msgstr "Unbekannte Option '%s'" #: ../src/common/mimecmn.cpp:161 #, c-format msgid "Unmatched '{' in an entry for mime type %s." -msgstr "Fehlendes '}' in Eintrag für MIME-Typ %s." +msgstr "Unzutreffendes '{'-Zeichen in eimem Eintrag des MIME-Typs %s." -#: ../src/common/docview.cpp:1867 ../src/common/docview.cpp:1882 -#: ../src/common/docview.cpp:1909 +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 msgid "Unnamed command" -msgstr "" +msgstr "Ungenanntes Kommando" -#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2327 +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 #, c-format msgid "Unrecognized style %s whilst parsing resource." -msgstr "" - -#: ../src/msw/app.cpp:702 -msgid "Unrecoverable program error detected: the application will terminate." -msgstr "" +msgstr "Unbekannt: 'style' %s während das Lesevorgangs." #: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 msgid "Unsupported clipboard format." -msgstr "Nicht unterstütztes Format in Zwischenablage." +msgstr "Nicht unterstütztes Format in der Zwischenablage." -#: ../src/common/cmdline.cpp:793 -#, fuzzy, c-format +#: ../src/common/cmdline.cpp:797 +#, c-format msgid "Usage: %s" -msgstr "Seite %d" +msgstr "Verwendung: %s" -#: ../src/generic/dirdlgg.cpp:210 +#: ../src/generic/dirdlgg.cpp:215 msgid "User" msgstr "Benutzer" -#: ../src/generic/dirdlgg.cpp:211 +#: ../src/generic/dirdlgg.cpp:214 msgid "User Local" msgstr "Lokaler Benutzer" #: ../src/common/valtext.cpp:188 msgid "Validation conflict" -msgstr "" +msgstr "Verifizierungs Konflikt" -#: ../src/generic/dirdlgg.cpp:212 +#: ../src/generic/dirdlgg.cpp:216 msgid "Variables" msgstr "Variablen" -#: ../src/generic/filedlgg.cpp:856 +#: ../src/generic/filedlgg.cpp:861 msgid "View files as a detailed view" -msgstr "" +msgstr "Dateien mit Datails anzeigen" -#: ../src/generic/filedlgg.cpp:850 +#: ../src/generic/filedlgg.cpp:855 msgid "View files as a list view" -msgstr "" +msgstr "Dateien als Liste anzeigen" -#: ../src/common/docview.cpp:1437 +#: ../src/common/docview.cpp:1494 msgid "Views" -msgstr "Ansichten" +msgstr "Darstellung" -#: ../src/unix/utilsunx.cpp:263 ../src/unix/utilsunx.cpp:599 +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 msgid "Waiting for subprocess termination failed" -msgstr "" +msgstr "Wartezeit für das Ende eines Subprozesses abgelaufen" -#: ../src/common/docview.cpp:428 ../src/common/resource.cpp:121 -#: ../src/generic/logg.cpp:205 +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 msgid "Warning" msgstr "Warnung" -#: ../src/common/log.cpp:358 +#: ../src/common/log.cpp:366 msgid "Warning: " -msgstr "Warning: " +msgstr "Warnung: " -#: ../src/html/htmlpars.cpp:179 +#: ../src/html/htmlpars.cpp:177 msgid "Warning: attempt to remove HTML tag handler from empty stack." msgstr "" +"Warnung: Es wurde versucht, einen 'HTML-tag-handler' von einem leeren Stack " +"zu entfernen." -#: ../src/common/fontmap.cpp:88 -msgid "West European (ISO-8859-1/Latin 1)" -msgstr "" +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "Westeuropäisch (ISO-8859-1/Latin 1)" -#: ../src/common/fontmap.cpp:102 -msgid "West European new (ISO-8859-15/Latin 0)" -msgstr "" +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "Westeuropäisch mit Euro (ISO-8859-15/Latin 0)" -#: ../src/html/helpfrm.cpp:401 +#: ../src/html/helpfrm.cpp:406 msgid "Whole words only" -msgstr "" +msgstr "Nur ganze Worte" -#: ../src/msw/utils.cpp:497 +#: ../src/msw/utils.cpp:547 msgid "Win32s on Windows 3.1" -msgstr "" +msgstr "Win32s on Windows 3.1" -#: ../src/msw/utils.cpp:529 +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "Fenster" + +#: ../src/msw/utils.cpp:585 msgid "Windows 3.1" -msgstr "" +msgstr "Windows 3.1" -#: ../src/msw/utils.cpp:501 +#: ../src/msw/utils.cpp:551 #, c-format msgid "Windows 9%c" -msgstr "" +msgstr "Windows 9%c" -#: ../src/common/fontmap.cpp:110 +#: ../src/common/fontmap.cpp:122 msgid "Windows Arabic (CP 1256)" -msgstr "" +msgstr "Windows Arabisch (CP 1256)" -#: ../src/common/fontmap.cpp:111 +#: ../src/common/fontmap.cpp:123 msgid "Windows Baltic (CP 1257)" -msgstr "" +msgstr "Windows Baltisch (CP 1257)" -#: ../src/common/fontmap.cpp:105 +#: ../src/common/fontmap.cpp:116 +#, fuzzy +msgid "Windows Central European (CP 1250)" +msgstr "Windows Hebräisch (CP 1255)" + +#: ../src/common/fontmap.cpp:117 msgid "Windows Cyrillic (CP 1251)" -msgstr "" +msgstr "Windows Kyrillisch (CP 1251)" -#: ../src/common/fontmap.cpp:107 +#: ../src/common/fontmap.cpp:119 msgid "Windows Greek (CP 1253)" -msgstr "" +msgstr "Windows Griechisch (CP 1253)" -#: ../src/common/fontmap.cpp:109 +#: ../src/common/fontmap.cpp:121 msgid "Windows Hebrew (CP 1255)" -msgstr "" +msgstr "Windows Hebräisch (CP 1255)" -#: ../src/common/fontmap.cpp:106 -msgid "Windows Latin 1 (CP 1252)" -msgstr "" - -#: ../src/common/fontmap.cpp:104 -msgid "Windows Latin 2 (CP 1250)" -msgstr "" - -#: ../src/common/fontmap.cpp:108 +#: ../src/common/fontmap.cpp:120 msgid "Windows Turkish (CP 1254)" -msgstr "" +msgstr "Windows Türkisch (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +#, fuzzy +msgid "Windows Western European (CP 1252)" +msgstr "Windows Latin 1 (CP 1252)" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" #: ../src/common/ffile.cpp:168 -#, fuzzy, c-format +#, c-format msgid "Write error on file '%s'" -msgstr "Kann Datei '%s' nicht öffnen" +msgstr "Schreibfehler bei Datei '%s'" -#: ../src/generic/dcpsg.cpp:2242 +#: ../src/generic/dcpsg.cpp:2321 msgid "X Scaling" -msgstr "X Skalierung" +msgstr "X-Skalierung" -#: ../src/generic/dcpsg.cpp:2251 +#: ../src/generic/dcpsg.cpp:2330 msgid "X Translation" -msgstr "X Verschiebung" +msgstr "X-Verschiebung" -#: ../src/generic/dcpsg.cpp:2246 +#: ../src/generic/dcpsg.cpp:2325 msgid "Y Scaling" -msgstr "Y Skalierung" +msgstr "Y-Skalierung" -#: ../src/generic/dcpsg.cpp:2255 +#: ../src/generic/dcpsg.cpp:2334 msgid "Y Translation" -msgstr "Y Verschiebung" +msgstr "Y-Verschiebung" -#: ../src/common/dlgcmn.cpp:107 ../src/common/dlgcmn.cpp:114 +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 #: ../src/motif/msgdlg.cpp:178 msgid "Yes" msgstr "Ja" -#: ../src/generic/dirdlgg.cpp:499 +#: ../src/generic/dirdlgg.cpp:571 msgid "You cannot add a new directory to this section." -msgstr "" +msgstr "Sie können hier kein neues Verzeichnis anlegen." -#: ../src/common/docview.cpp:1978 +#: ../src/common/docview.cpp:2034 msgid "[EMPTY]" msgstr "[leer]" -#: ../src/msw/dde.cpp:987 +#: ../src/msw/dde.cpp:997 msgid "a DDEML application has created a prolonged race condition." -msgstr "" +msgstr "Eine DDEML-Application hat eine 'prolonged race condition' erstellt." -#: ../src/msw/dde.cpp:975 +#: ../src/msw/dde.cpp:985 msgid "" "a DDEML function was called without first calling the DdeInitialize " "function,\n" "or an invalid instance identifier\n" "was passed to a DDEML function." msgstr "" +"Eine DDEML-Funktion wurde aufgerufen, ohne vorher die Deinitialisierungs- " +"Funktion aufzurufen,\n" +"oder ein ungültiger 'instance identifier'\n" +"wurde an eine DDEML-Funktion übergeben." -#: ../src/msw/dde.cpp:993 +#: ../src/msw/dde.cpp:1003 msgid "a client's attempt to establish a conversation has failed." msgstr "" +"Der Versuch eines Clients, eine Verbindung herzustellen, ist gescheitert." -#: ../src/msw/dde.cpp:990 -#, fuzzy +#: ../src/msw/dde.cpp:1000 msgid "a memory allocation failed." -msgstr "Konnte keine Pipe anlegen" +msgstr "Eine Speicheranforderung ist gescheitert." -#: ../src/msw/dde.cpp:984 +#: ../src/msw/dde.cpp:994 msgid "a parameter failed to be validated by the DDEML." -msgstr "" +msgstr "Ein Parameter wurde von DDEML nicht verifiziert." -#: ../src/msw/dde.cpp:966 +#: ../src/msw/dde.cpp:976 msgid "a request for a synchronous advise transaction has timed out." msgstr "" +"Eine Anfrage für eine 'synchronous advise transaction' ist gescheitert (time-" +"out)" -#: ../src/msw/dde.cpp:972 +#: ../src/msw/dde.cpp:982 msgid "a request for a synchronous data transaction has timed out." msgstr "" +"Eine Anfrage für eine 'synchronous data transaction' ist gescheitert (time-" +"out)" -#: ../src/msw/dde.cpp:981 +#: ../src/msw/dde.cpp:991 msgid "a request for a synchronous execute transaction has timed out." msgstr "" +"Eine Anfrage für eine 'synchronous execute transaction' ist gescheitert " +"(time-out)" -#: ../src/msw/dde.cpp:999 +#: ../src/msw/dde.cpp:1009 msgid "a request for a synchronous poke transaction has timed out." msgstr "" +"Eine Anfrage für eine 'synchronous poke transaction' ist gescheitert (time-" +"out)" -#: ../src/msw/dde.cpp:1014 +#: ../src/msw/dde.cpp:1024 msgid "a request to end an advise transaction has timed out." msgstr "" +"Eine Anfrage, eine 'advise transaction' zu beenden ist, gescheitert (time-" +"out)" -#: ../src/msw/dde.cpp:1008 +#: ../src/msw/dde.cpp:1018 msgid "" "a server-side transaction was attempted on a conversation\n" "that was terminated by the client, or the server\n" "terminated before completing a transaction." msgstr "" +"Ein Verbindungsversuch vom Server\n" +"wurde vom Client abgebrochen, oder der Server\n" +"terminierte bevor die Transaktion vollständig beendet wurde." -#: ../src/msw/dde.cpp:996 -#, fuzzy +#: ../src/msw/dde.cpp:1006 msgid "a transaction failed." -msgstr "Konnte keine Pipe anlegen" +msgstr "Eine Transaktion ist gescheitert." -#: ../src/common/utilscmn.cpp:464 +#: ../src/common/utilscmn.cpp:466 msgid "alt" -msgstr "" +msgstr "alt" -#: ../src/msw/dde.cpp:978 +#: ../src/msw/dde.cpp:988 msgid "" "an application initialized as APPCLASS_MONITOR has\n" "attempted to perform a DDE transaction,\n" "or an application initialized as APPCMD_CLIENTONLY has \n" "attempted to perform server transactions." msgstr "" +"Eine Applikation, die als ein 'APPCLASS_MONITOR' gestartet wurde, \n" +"versuchte eine DDE-Transaktion auszuführen,\n" +"oder eine Applikation, die als ein 'APPCMD_CLIENTONLY' gestartet wurde, \n" +"versuchte eine Servertransaktion auszuführen." -#: ../src/msw/dde.cpp:1002 +#: ../src/msw/dde.cpp:1012 msgid "an internal call to the PostMessage function has failed. " -msgstr "" +msgstr "Ein interner Aufruf zur 'PostMessage'-Funktion ist gescheitert. " -#: ../src/msw/dde.cpp:1011 +#: ../src/msw/dde.cpp:1021 msgid "an internal error has occurred in the DDEML." -msgstr "" +msgstr "Ein interne Fehler ist im DDMEL aufgetreten." -#: ../src/msw/dde.cpp:1017 +#: ../src/msw/dde.cpp:1027 msgid "" "an invalid transaction identifier was passed to a DDEML function.\n" "Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" "the transaction identifier for that callback is no longer valid." msgstr "" +"Eine ungültige Transaktionsidentifizierung wurde an eine DDEML-Funktion " +"übergeben.\n" +"Sobald die Application aus einem 'XTYP_XACT_COMPLETE'-Callback zurückgekehrt " +"ist,\n" +"ist die Transaktionsidentifizierung für dieses Callback nicht mehr gültig." -#: ../src/common/fileconf.cpp:1416 +#: ../src/common/fileconf.cpp:1449 #, c-format msgid "attempt to change immutable key '%s' ignored." msgstr "Versuch, Eintrag '%s' zu ändern, verweigert. Ist nicht schreibbar." #: ../src/common/ffile.cpp:101 -#, fuzzy, c-format +#, c-format msgid "can't close file '%s'" -msgstr "Kann Datei '%s' nicht öffnen" +msgstr "Kann Datei '%s' nicht schließen" -#: ../src/common/file.cpp:283 +#: ../src/common/file.cpp:257 #, c-format msgid "can't close file descriptor %d" -msgstr "" +msgstr "Kann Datei-Deskriptor '%s' nicht schließen" -#: ../src/common/file.cpp:581 ../src/common/file.cpp:591 +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 #, c-format msgid "can't commit changes to file '%s'" msgstr "Kann Änderungen in Datei '%s' nicht sichern." -#: ../src/common/file.cpp:231 +#: ../src/common/file.cpp:200 #, c-format msgid "can't create file '%s'" msgstr "Kann Datei '%s' nicht anlegen." -#: ../src/common/fileconf.cpp:886 +#: ../src/common/fileconf.cpp:919 #, c-format msgid "can't delete user configuration file '%s'" -msgstr "Kann Konfigurationsdatei '%s' nicht löschen." +msgstr "Kann Konfigurationsdatei '%s' nicht löschen." -#: ../src/common/file.cpp:462 +#: ../src/common/file.cpp:438 #, c-format msgid "can't determine if the end of file is reached on descriptor %d" -msgstr "" +msgstr "Kann auf Dateibeschreibung '%d' das Dateiende nicht Feststellen" -#: ../src/common/file.cpp:428 +#: ../src/common/file.cpp:404 #, c-format msgid "can't find length of file on file descriptor %d" -msgstr "" +msgstr "Kann auf Dateibeschreibung '%d' die Dateilänge nicht finden" -#: ../src/msw/utils.cpp:328 +#: ../src/msw/utils.cpp:378 msgid "can't find user's HOME, using current directory." msgstr "Kann Benutzerverzeichnis nicht finden, verwende aktuelles Verzeichnis." -#: ../src/common/file.cpp:342 +#: ../src/common/file.cpp:319 #, c-format msgid "can't flush file descriptor %d" -msgstr "" +msgstr "Kann auf die Dateibeschreibung '%d' nicht entladen" -#: ../src/common/file.cpp:396 +#: ../src/common/file.cpp:373 #, c-format msgid "can't get seek position on file descriptor %d" -msgstr "" +msgstr "Kann auf die Dateibeschreibung %d nicht positionieren" -#: ../src/common/fontmap.cpp:545 +#: ../src/common/fontmap.cpp:646 msgid "can't load any font, aborting" -msgstr "" +msgstr "Kann keine Fonts mehr laden, Abbruch" -#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:269 +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 #, c-format msgid "can't open file '%s'" msgstr "Kann Datei '%s' nicht öffnen" -#: ../src/common/fileconf.cpp:310 +#: ../src/common/fileconf.cpp:318 #, c-format msgid "can't open global configuration file '%s'." msgstr "Kann globale Konfigurationsdatei '%s' nicht öffnen." -#: ../src/common/fileconf.cpp:322 +#: ../src/common/fileconf.cpp:330 #, c-format msgid "can't open user configuration file '%s'." msgstr "Kann Konfigurationsdatei '%s' nicht öffnen." -#: ../src/common/fileconf.cpp:774 +#: ../src/common/fileconf.cpp:799 msgid "can't open user configuration file." msgstr "Kann Benutzer-Konfigurationsdatei nicht öffnen." -#: ../src/common/file.cpp:309 +#: ../src/common/file.cpp:285 #, c-format msgid "can't read from file descriptor %d" -msgstr "" +msgstr "Kann Datei-Deskriptor '%d' nicht lesen" -#: ../src/common/file.cpp:576 ../src/common/file.cpp:586 +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 #, c-format msgid "can't remove file '%s'" msgstr "Kann Datei '%s' nicht löschen." -#: ../src/common/file.cpp:604 ../src/common/file.cpp:607 +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 #, c-format msgid "can't remove temporary file '%s'" msgstr "Kann Temporärdatei '%s' nicht löschen" -#: ../src/common/file.cpp:382 +#: ../src/common/file.cpp:359 #, c-format msgid "can't seek on file descriptor %d" -msgstr "" +msgstr "Kann auf die Dateibeschreibung '%d' nicht suchen" -#: ../src/common/textfile.cpp:328 +#: ../src/common/textfile.cpp:359 #, c-format msgid "can't write file '%s' to disk." msgstr "Kann Datei '%s' nicht schreiben." -#: ../src/common/file.cpp:327 +#: ../src/common/file.cpp:304 #, c-format msgid "can't write to file descriptor %d" -msgstr "" +msgstr "Kann Dateibeschreibung '%d' nicht schreiben" -#: ../src/common/fileconf.cpp:781 +#: ../src/common/fileconf.cpp:806 msgid "can't write user configuration file." -msgstr "Kann Benutzers Konfigurationsdatei nicht schreiben." +msgstr "Kann Benutzer-Konfigurationsdatei nicht schreiben." -#: ../src/common/intl.cpp:351 +#: ../src/common/intl.cpp:374 #, c-format msgid "catalog file for domain '%s' not found." msgstr "Nachrichtenkatalog für Sprachbereich '%s' nicht gefunden." -#: ../src/common/utilscmn.cpp:462 +#: ../src/common/utilscmn.cpp:464 msgid "ctrl" -msgstr "" +msgstr "ctrl" -#: ../src/common/cmdline.cpp:877 +#: ../src/common/cmdline.cpp:912 msgid "date" -msgstr "" +msgstr "Datum" -#: ../src/common/datetime.cpp:3185 +#: ../src/common/datetime.cpp:3172 msgid "eighteenth" -msgstr "" +msgstr "achtzehnte" -#: ../src/common/datetime.cpp:3175 -#, fuzzy +#: ../src/common/datetime.cpp:3162 msgid "eighth" -msgstr "Dünn" +msgstr "achte" -#: ../src/common/datetime.cpp:3178 +#: ../src/common/datetime.cpp:3165 msgid "eleventh" -msgstr "" +msgstr "elfte" -#: ../src/common/filefn.cpp:1729 -msgid "empty file name in wxFindFileInPath" -msgstr "" - -#: ../src/common/fileconf.cpp:1403 +#: ../src/common/fileconf.cpp:1436 #, c-format msgid "entry '%s' appears more than once in group '%s'" msgstr "Eintrag '%s' erscheint in Gruppe '%s' mehrfach" -#: ../src/msw/dialup.cpp:858 +#: ../src/msw/dialup.cpp:861 msgid "establish" -msgstr "" +msgstr "Verbunden" #: ../src/common/ffile.cpp:182 -#, fuzzy, c-format +#, c-format msgid "failed to flush the file '%s'" -msgstr "Logtext in Datei '%s' gesichert." +msgstr "Versuch, die Datei '%s' zu entladen, gescheitert" -#: ../src/common/datetime.cpp:3182 +#: ../src/common/datetime.cpp:3169 msgid "fifteenth" -msgstr "" +msgstr "fünfzehnte" -#: ../src/common/datetime.cpp:3172 +#: ../src/common/datetime.cpp:3159 msgid "fifth" -msgstr "" +msgstr "fünfte" -#: ../src/common/fileconf.cpp:463 +#: ../src/common/fileconf.cpp:480 #, c-format msgid "file '%s', line %d: '%s' ignored after group header." msgstr "Datei '%s', Zeile %d: '%s' hinter Gruppenkopf ignoriert." -#: ../src/common/fileconf.cpp:493 +#: ../src/common/fileconf.cpp:509 #, c-format msgid "file '%s', line %d: '=' expected." msgstr "Datei '%s', Zeile %d: '=' erwartet." -#: ../src/common/fileconf.cpp:520 +#: ../src/common/fileconf.cpp:535 #, c-format msgid "file '%s', line %d: key '%s' was first found at line %d." msgstr "Datei '%s', Zeile %d: Eintrag '%s' taucht erstmals in Zeile %d auf." -#: ../src/common/fileconf.cpp:509 +#: ../src/common/fileconf.cpp:525 #, c-format msgid "file '%s', line %d: value for immutable key '%s' ignored." msgstr "" -"Datei '%s', Zeile %d: Eintrag für nicht-änderbaren Eintrag '%s' ignoriert." +"Datei '%s', Zeile %d: Wert für nicht-änderbaren Eintrag '%s' ignoriert." -#: ../src/common/fileconf.cpp:431 +#: ../src/common/fileconf.cpp:448 #, c-format msgid "file '%s': unexpected character %c at line %d." msgstr "Datei '%s': unerwartetes Zeichen %c in Zeile %d." -#: ../src/common/datetime.cpp:3168 +#: ../src/common/datetime.cpp:3155 msgid "first" -msgstr "" +msgstr "erste" -#: ../src/common/datetime.cpp:3181 +#: ../src/common/datetime.cpp:3168 msgid "fourteenth" -msgstr "" +msgstr "vierzehnte" -#: ../src/common/datetime.cpp:3171 +#: ../src/common/datetime.cpp:3158 msgid "fourth" -msgstr "" +msgstr "vierte" -#: ../src/common/timercmn.cpp:239 +#: ../src/common/timercmn.cpp:240 msgid "gmtime() failed" -msgstr "" +msgstr "gmtime() gescheitert" -#: ../src/msw/dialup.cpp:858 -#, fuzzy +#: ../src/msw/dialup.cpp:861 msgid "initiate" -msgstr "ungültiges Datum" +msgstr "einleiten" -#: ../src/common/file.cpp:466 +#: ../src/common/file.cpp:442 msgid "invalid eof() return value." -msgstr "" +msgstr "ungültiger 'eof()'-Rückgabewert." -#: ../src/generic/logg.cpp:490 +#: ../src/generic/logg.cpp:1037 msgid "invalid message box return value" -msgstr "" +msgstr "ungültiger 'message box'-Rückgabewert." -#: ../src/html/helpfrm.cpp:851 -#, fuzzy +#: ../src/html/helpfrm.cpp:874 msgid "large" -msgstr "Seiten" +msgstr "Groß" -#: ../src/common/intl.cpp:542 +#: ../src/common/intl.cpp:575 #, c-format msgid "locale '%s' can not be set." msgstr "Lokale Umgebung '%s' kann nicht gesetzt werden." -#: ../src/html/helpfrm.cpp:851 +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "Suche Nachrichtenkatalog '%s' in Pfad '%s'." + +#: ../src/html/helpfrm.cpp:874 msgid "medium" -msgstr "" +msgstr "Mittel" -#: ../src/common/datetime.cpp:3289 -#, fuzzy +#: ../src/common/datetime.cpp:3319 msgid "midnight" -msgstr "Dünn" +msgstr "Mitternacht" -#: ../src/common/timercmn.cpp:235 +#: ../src/common/timercmn.cpp:236 msgid "mktime() failed" -msgstr "" - -#: ../src/common/datetime.cpp:3186 -msgid "nineteenth" -msgstr "" - -#: ../src/common/datetime.cpp:3176 -#, fuzzy -msgid "ninth" -msgstr "Drucken" - -#: ../src/html/winpars.cpp:133 -msgid "no DC assigned to wxHtmlWinParser!!" -msgstr "" - -#: ../src/msw/dde.cpp:962 -msgid "no DDE error." -msgstr "" - -#: ../src/html/helpdata.cpp:529 -#, fuzzy -msgid "noname" -msgstr "Unbenannt" - -#: ../src/common/datetime.cpp:3288 -msgid "noon" -msgstr "" - -#: ../src/common/cmdline.cpp:876 -msgid "num" -msgstr "" - -#: ../src/msw/dde.cpp:1005 -msgid "reentrancy problem." -msgstr "" - -#: ../src/common/datetime.cpp:3169 -msgid "second" -msgstr "" - -#: ../src/common/datetime.cpp:3184 -msgid "seventeenth" -msgstr "" - -#: ../src/common/datetime.cpp:3174 -msgid "seventh" -msgstr "" - -#: ../src/common/utilscmn.cpp:466 -msgid "shift" -msgstr "" - -#: ../src/common/datetime.cpp:3183 -msgid "sixteenth" -msgstr "" +msgstr "mktime() gescheitert" #: ../src/common/datetime.cpp:3173 -msgid "sixth" -msgstr "" +msgid "nineteenth" +msgstr "neunzehnte" -#: ../src/html/helpfrm.cpp:851 -msgid "small" -msgstr "" +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "neunte" -#: ../src/common/cmdline.cpp:875 -msgid "str" -msgstr "" +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "kein DDE-Fehler" -#: ../src/common/intl.cpp:635 -#, c-format -msgid "string '%s' not found in domain '%s' for locale '%s'." -msgstr "Text '%s' in Bereich '%s' für Umgebung '%s' nicht gefunden." +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "namenlos" -#: ../src/common/intl.cpp:640 -#, c-format -msgid "string '%s' not found in locale '%s'." -msgstr "Text '%s' in Umgebung '%s' nicht gefunden." +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "mittags" -#: ../src/common/datetime.cpp:3177 -msgid "tenth" -msgstr "" +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "num" -#: ../src/html/htmlfilt.cpp:133 -msgid "text/html" -msgstr "" +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "Probleme beim Wiedereintreten" -#: ../src/msw/dde.cpp:969 -msgid "the response to the transaction caused the DDE_FBUSY bit to be set." -msgstr "" +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "zweite" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "siebzehnte" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "siebte" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "Umschalt" #: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "sechszehnte" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "sechste" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "Klein" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "zehnte" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "das Ergebnis zur Transaktion hat der 'DDE_FBUSY'-Bit gesetzt." + +#: ../src/common/datetime.cpp:3157 msgid "third" -msgstr "" +msgstr "dritte" -#: ../src/common/datetime.cpp:3180 +#: ../src/common/datetime.cpp:3167 msgid "thirteenth" -msgstr "" +msgstr "dreizehnte" -#: ../src/common/datetime.cpp:2981 +#: ../src/common/datetime.cpp:3012 msgid "today" -msgstr "" +msgstr "heute" -#: ../src/common/datetime.cpp:2983 +#: ../src/common/datetime.cpp:3014 msgid "tomorrow" -msgstr "" +msgstr "morgen" -#: ../src/common/datetime.cpp:3179 +#: ../src/common/datetime.cpp:3166 msgid "twelfth" -msgstr "" +msgstr "zwölfte" -#: ../src/common/datetime.cpp:3187 +#: ../src/common/datetime.cpp:3174 msgid "twentieth" -msgstr "" +msgstr "zwanzigste" -#: ../src/common/fileconf.cpp:1523 +#: ../src/common/fileconf.cpp:1556 #, c-format msgid "unexpected \" at position %d in '%s'." -msgstr "" +msgstr "unerwartete \" bei Position %d in '%s'." -#: ../src/generic/progdlgg.cpp:243 +#: ../src/generic/progdlgg.cpp:241 msgid "unknown" -msgstr "" +msgstr "unbekannt" -#: ../src/msw/dialup.cpp:462 +#: ../src/msw/dialup.cpp:466 #, c-format msgid "unknown error (error code %08x)." -msgstr "" +msgstr "unbekannter Fehler (Fehlercode %08x)." -#: ../src/common/file.cpp:365 +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "Unbekannte Suchposition" + +#: ../src/common/file.cpp:342 msgid "unknown seek origin" -msgstr "" +msgstr "Unbekannte Suchposition" -#: ../src/common/fontmap.cpp:329 +#: ../src/common/fontmap.cpp:354 #, c-format msgid "unknown-%d" -msgstr "" +msgstr "unbekannt-%d" -#: ../src/common/docview.cpp:397 +#: ../src/common/docview.cpp:406 msgid "unnamed" msgstr "Unbenannt" -#: ../src/common/docview.cpp:1174 +#: ../src/common/docview.cpp:1188 #, c-format msgid "unnamed%d" -msgstr "Unbenannt" +msgstr "Unbenannt%d" -#: ../src/common/intl.cpp:356 +#: ../src/common/intl.cpp:379 #, c-format msgid "using catalog '%s' from '%s'." msgstr "Verwende Nachrichtenkatalog '%s' von '%s'." -#: ../src/html/helpfrm.cpp:851 +#: ../src/html/helpfrm.cpp:874 msgid "very large" -msgstr "" +msgstr "sehr groß" -#: ../src/html/helpfrm.cpp:851 +#: ../src/html/helpfrm.cpp:874 msgid "very small" -msgstr "" +msgstr "sehr klein" -#: ../src/common/imaggif.cpp:74 -msgid "wxGIFHandler: data stream seems to be truncated." -msgstr "" - -#: ../src/common/imaggif.cpp:58 -msgid "wxGIFHandler: error in GIF image format." -msgstr "" - -#: ../src/common/imaggif.cpp:61 -msgid "wxGIFHandler: not enough memory." -msgstr "" - -#: ../src/common/imaggif.cpp:64 -msgid "wxGIFHandler: unknown error!!!" -msgstr "" - -#: ../src/common/timercmn.cpp:266 +#: ../src/common/timercmn.cpp:267 msgid "wxGetTimeOfDay failed." -msgstr "" +msgstr "wxGetTimeOfDay gescheitert." -#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 -msgid "wxPCXHandler: couldn't allocate memory" -msgstr "" - -#: ../src/common/imagpcx.cpp:447 -msgid "wxPCXHandler: image format unsupported" -msgstr "" - -#: ../src/common/imagpcx.cpp:470 -msgid "wxPCXHandler: invalid image" -msgstr "" - -#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 -msgid "wxPCXHandler: unknown error !!!" -msgstr "" - -#: ../src/common/imagpcx.cpp:449 -msgid "wxPCXHandler: version number too low" -msgstr "" - -#: ../src/common/prntbase.cpp:660 -msgid "" -"wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to " -"let me know about the canvas!" -msgstr "" - -#: ../src/common/socket.cpp:296 ../src/common/socket.cpp:350 +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 msgid "wxSocket: invalid signature in ReadMsg." -msgstr "" +msgstr "wxSocket: ungültige Signatur in ReadMsg." -#: ../src/motif/app.cpp:584 +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: unbekanntes Ereignis!." + +#: ../src/motif/app.cpp:591 #, c-format msgid "wxWindows could not open display for '%s': exiting." -msgstr "" +msgstr "wxWindows konnte 'open display' nicht ausführen für '%s': Abbruch." -#: ../src/common/filefn.cpp:1222 +#: ../src/common/filefn.cpp:1237 msgid "wxWindows: error finding temporary file name.\n" -msgstr "" +msgstr "wxWindows: Fehler beim Auffinden des temporären Dateinamen.\n" -#: ../src/common/datetime.cpp:2982 +#: ../src/common/datetime.cpp:3013 msgid "yesterday" -msgstr "" +msgstr "Gestern" + +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Kyrillisch (Latin 5)" + +#~ msgid "ISO-8859-12" +#~ msgstr "ISO-8859-12" + +#~ msgid "ISO-8859-14" +#~ msgstr "ISO-8859-14" + +#~ msgid "Windows Latin 2 (CP 1250)" +#~ msgstr "Windows Latin 2 (CP 1250)" + +#~ msgid "Baltic II (ISO-8859-10)" +#~ msgstr "Baltisch II (ISO-8859-10)" + +#~ msgid "Can't execute command '%s'" +#~ msgstr "Kann Befehl '%s' nicht ausführen" + +#~ msgid "Fatal Error" +#~ msgstr "Nicht-behebbarer Fehler" + +#~ msgid "ISO-8859-13" +#~ msgstr "ISO-8859-13" + +#~ msgid "Previewing" +#~ msgstr "Vorschau" + +#~ msgid "Print Error" +#~ msgstr "Fehler beim Drucken" + +#~ msgid "" +#~ "There was a problem printing.\n" +#~ "Perhaps your current printer is not set correctly?" +#~ msgstr "" +#~ "Beim Drucken ist ein Fehler aufgetreten.\n" +#~ "Vielleicht ist ihr Drucker nicht richtig eingestellt ?" + +#~ msgid "" +#~ "Unrecoverable program error detected: the application will terminate." +#~ msgstr "Unbehebbarer Programmfehler: Die Applikation wird beendet." + +#~ msgid "string '%s' not found in domain '%s' for locale '%s'." +#~ msgstr "Text '%s' in Bereich '%s' für Umgebung '%s' nicht gefunden." + +#~ msgid "string '%s' not found in locale '%s'." +#~ msgstr "Text '%s' in Umgebung '%s' nicht gefunden." #~ msgid " B.C." -#~ msgstr " B.C." +#~ msgstr " v. Chr." #~ msgid "%s is invalid." #~ msgstr "%s ist ungültig" @@ -2823,7 +3137,7 @@ msgstr "" #~ msgstr "%s sollte numerisch sein" #~ msgid "%s should only contain ASCII characters." -#~ msgstr "%s sollte nur ASCII Zeichen enthalten" +#~ msgstr "%s sollte nur ASCII-Zeichen enthalten" #~ msgid "%s should only contain alphabetic characters." #~ msgstr "%s sollte nur Buchstaben enthalten" @@ -2853,9 +3167,6 @@ msgstr "" #~ msgstr "" #~ "Zeichen '%c' ist in einem Konfigurationseintragsnamen nicht erlaubt." -#~ msgid "Couldn't change the state of event object." -#~ msgstr "Kann Zustand des Eventobjektes nicht ändern." - #~ msgid "Enter the name of the directory to create" #~ msgstr "Geben Sie einen Namen für das neue Verzeichnis ein" @@ -2863,18 +3174,13 @@ msgstr "" #~ msgstr "Eintragsname kann nicht mit '%c' beginnen." #~ msgid "" -#~ "Mime.types file %s, line %d: extra characters after the field value ignored." +#~ "Mime.types file %s, line %d: extra characters after the field value " +#~ "ignored." #~ msgstr "" -#~ "Mime.types-Datei %s, Zeile %d: extra Zeichen nach dem Wert ignoriert." - -#~ msgid "invalid day" -#~ msgstr "ungültiger Tag" +#~ "Mime.types-Datei %s, Zeile %d: extrazeichen nach dem Wert ignoriert." #~ msgid "invalid month" #~ msgstr "ungültiger Monat" -#~ msgid "looking for catalog '%s' in path '%s'." -#~ msgstr "Suche Nachrichtenkatalog '%s' in Pfad '%s'." - #~ msgid "pm" #~ msgstr "pm" diff --git a/locale/dk.po b/locale/dk.po deleted file mode 100644 index 0303971d64..0000000000 --- a/locale/dk.po +++ /dev/null @@ -1,1975 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: wxWindows v2.1beta\n" -"POT-Creation-Date: 1999-07-06 13:24+0100\n" -"PO-Revision-Date: 1999-10-23 12:30+0100\n" -"Last-Translator: Leif Jensen \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso8859-1\n" -"Content-Transfer-Encoding: 8 bit\n" - -#: ../src/generic/dirdlgg.cpp:461 ../src/generic/dirdlgg.cpp:465 -#: ../src/generic/dirdlgg.cpp:489 ../src/generic/dirdlgg.cpp:493 -#: src/generic/dirdlgg.cpp:461 src/generic/dirdlgg.cpp:489 -msgid "" -"\n" -"(Do you have the required permissions?)" -msgstr "" -"\n" -"(Har du de nødvendige tilladelser?)" - -#: ../src/generic/dirdlgg.cpp:449 ../src/generic/dirdlgg.cpp:453 -#: src/generic/dirdlgg.cpp:449 -msgid "" -"\n" -"does not exist\n" -"Create it now?" -msgstr "" -"\n" -"eksisterer ikke\n" -"Opret den nu?" - -#: ../src/common/log.cpp:223 ../src/common/log.cpp:227 src/common/log.cpp:209 -#, c-format -msgid " (error %ld: %s)" -msgstr " (fejl %ld: %s)" - -#: ../src/common/date.cpp:385 ../src/common/date.cpp:388 -#: ../src/common/date.cpp:400 ../src/common/date.cpp:403 -#: src/common/date.cpp:384 src/common/date.cpp:399 -msgid " B.C." -msgstr " F.K." - -#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 -#: ../src/common/resource.cpp:1630 ../src/common/resource.cpp:1631 -#: ../src/common/resource.cpp:2704 ../src/common/resource.cpp:2708 -#: src/common/resourc2.cpp:265 src/common/resourc2.cpp:1334 -#: src/common/resource.cpp:1613 src/common/resource.cpp:2682 -#, c-format -msgid "#define %s must be an integer." -msgstr "#define %s skal være et heltal" - -#: src/common/valtext.cpp:143 src/common/valtext.cpp:154 -#, c-format -msgid "%s is invalid." -msgstr "%s er ulovlig" - -#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2075 -#: ../src/common/resource.cpp:2079 src/common/resourc2.cpp:709 -#: src/common/resource.cpp:2057 -#, c-format -msgid "%s not a bitmap resource specification." -msgstr "%s er ikke en bitmap resource specifikation" - -#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2230 -#: ../src/common/resource.cpp:2234 src/common/resourc2.cpp:864 -#: src/common/resource.cpp:2212 -#, c-format -msgid "%s not an icon resource specification." -msgstr "%s er ikke en icon resource specifikation" - -#: src/common/valtext.cpp:188 -#, c-format -msgid "%s should be numeric." -msgstr "%s skulle være numerisk" - -#: src/common/valtext.cpp:163 -#, c-format -msgid "%s should only contain ASCII characters." -msgstr "%s må kun indeholde ASCII karakterer" - -#: src/common/valtext.cpp:171 -#, c-format -msgid "%s should only contain alphabetic characters." -msgstr "%s må kun indeholde bogstaver" - -#: src/common/valtext.cpp:179 -#, c-format -msgid "%s should only contain alphabetic or numeric characters." -msgstr "%s må kun indeholde bogstaver eller tal" - -#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 -#: ../src/common/resource.cpp:1723 ../src/common/resource.cpp:1724 -#: ../src/common/resource.cpp:2801 ../src/common/resource.cpp:2805 -#: src/common/resourc2.cpp:357 src/common/resourc2.cpp:1430 -#: src/common/resource.cpp:1705 src/common/resource.cpp:2778 -#, c-format -msgid "%s: ill-formed resource file syntax." -msgstr "%s: forkert resourcefil syntax." - -#: ../src/common/log.cpp:638 ../src/common/log.cpp:650 -#: ../src/generic/tipdlg.cpp:171 src/common/log.cpp:633 -msgid "&Close" -msgstr "&Luk" - -#: ../src/common/log.cpp:639 ../src/common/log.cpp:651 src/common/log.cpp:634 -msgid "&Log" -msgstr "&Log" - -#: ../src/common/docview.cpp:1725 ../src/common/docview.cpp:1729 -#: ../src/common/docview.cpp:1736 ../src/common/docview.cpp:1740 -#: ../src/common/docview.cpp:1756 ../src/common/docview.cpp:1767 -#: src/common/docview.cpp:1687 src/common/docview.cpp:1698 -msgid "&Redo" -msgstr "&Gendan" - -#: ../src/common/docview.cpp:1719 ../src/common/docview.cpp:1723 -#: ../src/common/docview.cpp:1746 ../src/common/docview.cpp:1750 -#: ../src/common/docview.cpp:1777 src/common/docview.cpp:1681 -#: src/common/docview.cpp:1708 -msgid "&Redo " -msgstr "&Gendan " - -#: ../src/common/log.cpp:635 ../src/common/log.cpp:646 src/common/log.cpp:630 -msgid "&Save..." -msgstr "&Gem..." - -#: ../src/common/docview.cpp:1731 ../src/common/docview.cpp:1735 -#: ../src/common/docview.cpp:1762 src/common/docview.cpp:1693 -msgid "&Undo" -msgstr "" - -#: ../src/common/docview.cpp:1706 ../src/common/docview.cpp:1710 -#: ../src/common/docview.cpp:1737 src/common/docview.cpp:1668 -msgid "&Undo " -msgstr "&Reetablér" - -#: ../src/common/config.cpp:381 ../src/common/config.cpp:382 -#: src/common/config.cpp:393 -#, c-format -msgid "'%s' has extra '..', ignored." -msgstr "'%s' har ekstra '..', ignoreret." - -#: ../src/common/intl.cpp:339 ../src/common/intl.cpp:372 -#: src/common/intl.cpp:338 -#, c-format -msgid "'%s' is not a valid message catalog." -msgstr "'%s' er ikke et lovligt meddelelseskatalog" - -#: ../src/common/textfile.cpp:133 ../src/common/textfile.cpp:139 -#: src/common/textfile.cpp:132 -#, c-format -msgid "'%s' is probably a binary file." -msgstr "'%s' er sandsynligvis en binær fil." - -#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 -#: ../src/common/resource.cpp:1662 ../src/common/resource.cpp:1663 -#: ../src/common/resource.cpp:2740 ../src/common/resource.cpp:2744 -#: src/common/resourc2.cpp:297 src/common/resourc2.cpp:1370 -#: src/common/resource.cpp:1645 src/common/resource.cpp:2718 -msgid "" -", expected static, #include or #define\n" -"whilst parsing resource." -msgstr "" -", forventet static, #include eller #define\n" -"under parsing af resource." - -#: src/generic/dcpsg.cpp:2389 -msgid "A3 297 x 420 mm" -msgstr "A3 297 x 420 mm" - -#: src/generic/dcpsg.cpp:1210 src/generic/dcpsg.cpp:1214 -#: src/generic/dcpsg.cpp:1800 src/generic/dcpsg.cpp:1804 -#: src/generic/dcpsg.cpp:2313 src/generic/dcpsg.cpp:2388 -#: src/generic/printps.cpp:239 src/generic/printps.cpp:243 -msgid "A4 210 x 297 mm" -msgstr "A4 210 x 297 mm" - -#: ../src/generic/fontdlgg.cpp:327 ../src/generic/fontdlgg.cpp:329 -#: src/generic/fontdlgg.cpp:329 -msgid "ABCDEFGabcdefg12345" -msgstr "ABCDEFGabcdefg12345" - -#: ../src/generic/colrdlgg.cpp:236 ../src/generic/colrdlgg.cpp:238 -#: src/generic/colrdlgg.cpp:236 -msgid "Add to custom colours" -msgstr "Tilføj til bruger farver" - -#: ../src/generic/prntdlgg.cpp:140 ../src/generic/prntdlgg.cpp:147 -#: src/generic/prntdlgg.cpp:83 -msgid "All" -msgstr "Alle" - -#: ../src/common/log.cpp:675 ../src/common/log.cpp:690 src/common/log.cpp:670 -#, c-format -msgid "Append log to file '%s' (choosing [No] will overwrite it)?" -msgstr "Tilføj log til fil '%s' (valg af [Nej] vil overskrive den)?" - -#: src/gtk/window.cpp:2716 -msgid "Application Error" -msgstr "Program fejl" - -#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2210 -#: ../src/common/resource.cpp:2214 src/common/resourc2.cpp:844 -#: src/common/resource.cpp:2192 -#, c-format -msgid "Bitmap resource specification %s not found." -msgstr "Bitmap resourcespecifikation %s blev ikke fundet" - -#: ../src/generic/fontdlgg.cpp:219 ../src/generic/fontdlgg.cpp:221 -#: src/generic/fontdlgg.cpp:221 -msgid "Bold" -msgstr "Fed" - -#: ../src/generic/prntdlgg.cpp:643 ../src/generic/prntdlgg.cpp:650 -#: src/generic/prntdlgg.cpp:536 -msgid "Bottom margin (mm):" -msgstr "Bund margin (mm):" - -#: ../src/common/log.cpp:636 ../src/common/log.cpp:648 src/common/log.cpp:631 -msgid "C&lear" -msgstr "&Rens" - -#: ../src/msw/thread.cpp:183 src/msw/thread.cpp:183 -msgid "Can not create event object." -msgstr "Kan ikke oprette hændelsesobjekt." - -#: ../src/msw/thread.cpp:99 src/msw/thread.cpp:99 -msgid "Can not create mutex." -msgstr "Kan ikke oprette mutex." - -#: ../src/msw/tooltip.cpp:199 src/msw/tooltip.cpp:199 -msgid "Can not create tooltip control" -msgstr "Kan ikke oprette tooltip kontrol" - -#: ../src/common/filefn.cpp:1179 src/common/filefn.cpp:1168 -#: src/common/filefn.cpp:1282 -#, c-format -msgid "Can not enumerate files in directory '%s'" -msgstr "Kan ikke nummerere filer i bibliotek '%s'" - -#: ../src/msw/clipbrd.cpp:549 src/msw/clipbrd.cpp:549 -#, c-format -msgid "Can not get data in format '%s' from clipboard." -msgstr "Kan ikke få data i format '%s' fra klippebordet." - -#: src/gtk/threadpsx.cpp:450 -#, c-format -msgid "Can not get priority range for scheduling policy %d." -msgstr "Kan ikke få prioriteringsområde for afviklingsalgoritme %d." - -#: ../src/msw/clipbrd.cpp:474 src/msw/clipbrd.cpp:474 -#, c-format -msgid "Can not put data in format '%s' on clipboard." -msgstr "Kan ikke skrive data i format '%s' til klippebordet." - -#: ../src/msw/thread.cpp:410 src/msw/thread.cpp:410 -#, c-format -msgid "Can not resume thread %x" -msgstr "Kan ikke genoptage tråd %x" - -#: src/gtk/threadpsx.cpp:442 -msgid "Can not retrieve thread scheduling policy." -msgstr "Kan ikke hente trådafviklingsalgoritme." - -#: ../src/msw/thread.cpp:330 src/gtk/threadpsx.cpp:270 src/msw/thread.cpp:330 -msgid "Can not start thread: error writing TLS." -msgstr "Kan ikke starte tråd: fejl ved skrivning af TLS." - -#: ../src/msw/thread.cpp:395 src/msw/thread.cpp:395 -#, c-format -msgid "Can not suspend thread %x" -msgstr "Kan ikke suspendere tråd %x" - -#: ../src/msw/thread.cpp:547 src/msw/thread.cpp:543 -msgid "Can not wait for thread termination" -msgstr "Kan ikke vente på trådafslutning" - -#: ../src/common/docview.cpp:1708 ../src/common/docview.cpp:1712 -#: ../src/common/docview.cpp:1739 src/common/docview.cpp:1670 -msgid "Can't &Undo " -msgstr "Kan ikke &reetablere " - -#: ../src/msw/thread.cpp:359 src/msw/thread.cpp:359 -msgid "Can't create thread" -msgstr "Kan ikke danne tråd" - -#: ../src/msw/iniconf.cpp:453 src/msw/iniconf.cpp:464 -#, c-format -msgid "Can't delete the INI file '%s'" -msgstr "Kan ikke slette INI filen '%s'" - -#: ../src/unix/utilsunx.cpp:316 ../src/unix/utilsunx.cpp:327 -#: src/gtk/utilsgtk.cpp:360 -#, c-format -msgid "Can't execute '%s'\n" -msgstr "Kan ikke eksekvere '%s'\n" - -#: ../src/msw/utilsexc.cpp:208 src/msw/utilsexc.cpp:208 -#, c-format -msgid "Can't execute command '%s'" -msgstr "Kan ikke eksekvere kommandoen '%s'" - -#: ../src/common/object.cpp:302 ../src/common/object.cpp:323 -#: src/common/object.cpp:290 src/common/object.cpp:311 -#, c-format -msgid "Can't find the serialization object '%s' for the object '%s'." -msgstr "Kan ikke find serialisationsobjektet '%s' til objektet '%s'." - -#: ../src/common/object.cpp:295 src/common/object.cpp:283 -msgid "Can't load wxSerial dynamic library." -msgstr "Kan ikke load'e wxSerial dynamisk bibliotek" - -#: ../src/common/log.cpp:722 ../src/common/log.cpp:737 src/common/log.cpp:717 -msgid "Can't save log contents to file." -msgstr "Kan ikke gemme log-indhold til fil." - -#: ../src/msw/thread.cpp:384 src/msw/thread.cpp:384 -msgid "Can't set thread priority" -msgstr "Kan ikke sætte trådprioritet" - -#: ../src/common/dlgcmn.cpp:121 ../src/common/dlgcmn.cpp:166 -#: ../src/common/prntbase.cpp:109 ../src/common/prntbase.cpp:114 -#: ../src/generic/choicdgg.cpp:306 ../src/generic/colrdlgg.cpp:235 -#: ../src/generic/colrdlgg.cpp:237 ../src/generic/dcpsg.cpp:1917 -#: ../src/generic/dcpsg.cpp:1918 ../src/generic/dcpsg.cpp:2039 -#: ../src/generic/dirdlgg.cpp:341 ../src/generic/dirdlgg.cpp:345 -#: ../src/generic/extdlgg.cpp:142 ../src/generic/fontdlgg.cpp:259 -#: ../src/generic/fontdlgg.cpp:261 ../src/generic/msgdlgg.cpp:123 -#: ../src/generic/msgdlgg.cpp:165 ../src/generic/prntdlgg.cpp:172 -#: ../src/generic/prntdlgg.cpp:179 ../src/generic/prntdlgg.cpp:430 -#: ../src/generic/prntdlgg.cpp:437 ../src/generic/prntdlgg.cpp:580 -#: ../src/generic/prntdlgg.cpp:587 ../src/generic/progdlgg.cpp:94 -#: ../src/generic/progdlgg.cpp:174 ../src/generic/textdlgg.cpp:141 -#: ../src/gtk/choicdlg.cpp:272 ../src/gtk/filedlg.cpp:154 -#: ../src/gtk/msgdlg.cpp:137 ../src/gtk/textdlg.cpp:115 -#: src/common/prntbase.cpp:113 src/generic/choicdgg.cpp:306 -#: src/generic/colrdlgg.cpp:235 src/generic/dcpsg.cpp:1875 -#: src/generic/dirdlgg.cpp:341 src/generic/fontdlgg.cpp:261 -#: src/generic/msgdlgg.cpp:143 src/generic/prntdlgg.cpp:111 -#: src/generic/prntdlgg.cpp:317 src/generic/prntdlgg.cpp:473 -#: src/generic/textdlgg.cpp:141 src/gtk/filedlg.cpp:131 -msgid "Cancel" -msgstr "Afbryd" - -#: ../src/msw/app.cpp:213 ../src/msw/app.cpp:223 src/msw/app.cpp:192 -msgid "Cannot initialize OLE" -msgstr "Kan ikke initialisere OLE" - -#: ../src/generic/dcpsg.cpp:1296 src/generic/dcpsg.cpp:1247 -msgid "Cannot open file!" -msgstr "Kan ikke åbne filen" - -#: src/common/CVS/Base/fileconf.cpp:614 src/common/fileconf.cpp:614 -#, c-format -msgid "Character '%c' is invalid in a config entry name." -msgstr "Karakter '%c' er ulovlig i en konfigurationsindgangsnavn." - -#: ../src/common/log.cpp:636 ../src/common/log.cpp:648 src/common/log.cpp:631 -msgid "Clear the log contents" -msgstr "Rens log indholdet" - -#: ../src/common/prntbase.cpp:343 ../src/common/prntbase.cpp:352 -#: ../src/generic/progdlgg.cpp:254 src/common/prntbase.cpp:342 -msgid "Close" -msgstr "Luk" - -#: ../src/common/log.cpp:638 ../src/common/log.cpp:650 src/common/log.cpp:633 -msgid "Close this window" -msgstr "Luk dette vindue" - -#: ../src/gtk/filedlg.cpp:71 src/gtk/filedlg.cpp:60 -msgid "Confirm" -msgstr "Bekræft" - -#: ../src/generic/helpxlp.cpp:242 src/generic/helpxlp.cpp:242 -#, c-format -msgid "Connection to wxHelp timed out in %d seconds" -msgstr "Forbindelse til wxHelp havde timeout efter %d sekunder" - -#: ../src/generic/prntdlgg.cpp:167 ../src/generic/prntdlgg.cpp:174 -#: src/generic/prntdlgg.cpp:106 -msgid "Copies:" -msgstr "Kopier:" - -#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1652 -#: ../src/common/resource.cpp:1653 src/common/resourc2.cpp:287 -#: src/common/resource.cpp:1635 -#, c-format -msgid "Could not find resource include file %s." -msgstr "Kunne ikke finde resource include file %s." - -#: ../src/generic/tabg.cpp:1038 src/generic/tabg.cpp:1038 -msgid "Could not find tab for id" -msgstr "Kunne ikke finde tab til id" - -#: ../src/common/resource.cpp:753 ../src/common/resource.cpp:754 -#: src/common/resource.cpp:753 -#, c-format -msgid "" -"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" -" or provide #define (see manual for caveats)" -msgstr "" -"Kunne ikke opløse kontrolklass eller id '%d'. Brug (ikke-nul) heltal istedet\n" -" eller angiv #define (se manualen for fenurligheder)" - -#: ../src/common/resource.cpp:1203 ../src/common/resource.cpp:1204 -#: src/common/resource.cpp:1199 -#, c-format -msgid "" -"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" -"or provide #define (see manual for caveats)" -msgstr "" -"Kunne ikke opløse meny-id '%s'. Brug (ikke-nul) heltal istedet\n" -"eller angiv #define (se manualen for fenurligheder)" - -#: ../src/common/prntbase.cpp:675 ../src/common/prntbase.cpp:685 -#: src/common/prntbase.cpp:673 -msgid "Could not start document preview." -msgstr "Kunne ikke start dokument smugkig." - -#: ../src/generic/printps.cpp:189 ../src/generic/printps.cpp:193 -#: ../src/generic/printps.cpp:194 ../src/msw/printwin.cpp:228 -#: ../src/msw/printwin.cpp:232 src/generic/printps.cpp:165 -msgid "Could not start printing." -msgstr "Kunne ikke starte udskrivning" - -#: ../src/common/wincmn.cpp:598 ../src/common/wincmn.cpp:609 -#: ../src/common/wincmn.cpp:713 src/gtk/window.cpp:2716 -#: src/msw/window.cpp:3756 -msgid "Could not transfer data to window" -msgstr "Kunne ikke overføre data til vindue" - -#: ../src/msw/thread.cpp:127 src/msw/thread.cpp:127 -msgid "Couldn't acquire a mutex lock" -msgstr "Kunne ikke få en mutex-lås" - -#: ../src/msw/dragimag.cpp:88 ../src/msw/dragimag.cpp:116 -#: ../src/msw/imaglist.cpp:96 ../src/msw/imaglist.cpp:98 -#: src/msw/imaglist.cpp:96 -msgid "Couldn't add an image to the image list." -msgstr "Kunne ikek tilføje et billede til billedlisten." - -#: ../src/msw/thread.cpp:231 src/msw/thread.cpp:231 -msgid "Couldn't change the state of event object." -msgstr "Kunne ikke ændre tilstanden af hændelsesobjekt." - -#: ../src/msw/timer.cpp:109 ../src/msw/timer.cpp:111 src/msw/timer.cpp:109 -msgid "Couldn't create a timer" -msgstr "Kunne ikke oprette en timer" - -#: ../src/msw/thread.cpp:430 src/msw/thread.cpp:430 -msgid "Couldn't get the current thread pointer" -msgstr "Kunne ikke få nuværende trådpegepind" - -#: ../src/common/imagpng.cpp:216 ../src/common/imagpng.cpp:218 -#: src/common/image.cpp:662 -msgid "Couldn't load a PNG image - probably file is corrupted." -msgstr "Kunne ikke load'e et PNG billede - sandsynligvis er filen kurrupt." - -#: ../src/msw/thread.cpp:159 src/msw/thread.cpp:159 -msgid "Couldn't release a mutex" -msgstr "Kunne ikke frigive en mutex" - -#: ../src/msw/listctrl.cpp:526 ../src/msw/listctrl.cpp:534 -#: src/msw/listctrl.cpp:500 -#, c-format -msgid "Couldn't retrieve information about list control item %d." -msgstr "Kunne ikke hente information om listekontorlenhed %d." - -#: ../src/msw/thread.cpp:612 src/msw/thread.cpp:608 -msgid "Couldn't terminate thread" -msgstr "Kunne ikke afslutte tråd" - -#: ../src/generic/dirdlgg.cpp:478 ../src/generic/dirdlgg.cpp:482 -#: src/generic/dirdlgg.cpp:478 -msgid "Create New Directory" -msgstr "Opret nyt bibliotek" - -#: ../src/common/log.cpp:1041 ../src/common/log.cpp:1057 -#: src/common/log.cpp:1022 -msgid "Debug" -msgstr "Aflus" - -#: ../src/generic/fontdlgg.cpp:209 ../src/generic/fontdlgg.cpp:211 -#: src/generic/fontdlgg.cpp:211 -msgid "Decorative" -msgstr "Dekorativt" - -#: ../src/generic/dirdlgg.cpp:450 ../src/generic/dirdlgg.cpp:454 -#: src/generic/dirdlgg.cpp:450 -msgid "Directory does not exist" -msgstr "Bibliotek eksisterer ikke" - -#: ../src/common/docview.cpp:404 ../src/common/docview.cpp:423 -#: src/common/docview.cpp:371 -#, c-format -msgid "Do you want to save changes to document %s?" -msgstr "Ønsker du at gemme ændringer til dokument %s?" - -#: src/common/log.cpp:368 -msgid "DoLogString must be overrided if it's called." -msgstr "DoLogString skal overskrives, hvis det bliver kaldt." - -#: ../src/generic/dirdlgg.cpp:477 ../src/generic/dirdlgg.cpp:481 -#: src/generic/dirdlgg.cpp:477 -msgid "Enter the name of the directory to create" -msgstr "Indtast navnet på biblioteket, der skal oprettes" - -#: ../src/generic/helphtml.cpp:260 ../src/generic/helphtml.cpp:277 -#: src/generic/helphtml.cpp:260 -msgid "Entries found" -msgstr "indgange blev fundet" - -#: src/common/CVS/Base/fileconf.cpp:607 src/common/fileconf.cpp:607 -#, c-format -msgid "Entry name can't start with '%c'." -msgstr "Indgangsnavn kan ikke starte med '%c'." - -#: ../src/common/config.cpp:333 ../src/common/config.cpp:334 -#: src/common/config.cpp:345 -#, c-format -msgid "" -"Environment variables expansion failed: missing '%c' at position %d in '%s'." -msgstr "" -"Omegnsvariabelekspansion fejlede: manglende '%c' ved position %d i '%s'." - -#: ../src/common/log.cpp:474 ../src/common/log.cpp:478 -#: ../src/generic/dcpsg.cpp:1296 ../src/generic/dcpsg.cpp:1403 -#: ../src/generic/helpxlp.cpp:243 ../src/gtk/filedlg.cpp:79 -#: src/common/log.cpp:474 src/generic/dcpsg.cpp:1247 -#: src/generic/helpxlp.cpp:243 -msgid "Error" -msgstr "Fejl" - -#: ../src/generic/dirdlgg.cpp:462 ../src/generic/dirdlgg.cpp:466 -#: ../src/generic/dirdlgg.cpp:490 ../src/generic/dirdlgg.cpp:494 -#: src/generic/dirdlgg.cpp:462 src/generic/dirdlgg.cpp:490 -msgid "Error creating directory" -msgstr "Fejl ved oprettelse af bibliotek" - -#: ../src/common/log.cpp:325 ../src/common/log.cpp:329 src/common/log.cpp:332 -msgid "Error: " -msgstr "Fejl: " - -#: ../src/generic/dirdlgg.cpp:230 ../src/generic/dirdlgg.cpp:234 -#: src/generic/dirdlgg.cpp:230 -msgid "Etcetera" -msgstr "og så videre" - -#: ../src/msw/utilsexc.cpp:237 src/msw/utilsexc.cpp:237 -#, c-format -msgid "Execution of command '%s' failed" -msgstr "Afvikling af kommando '%s' fejlede" - -#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 -#: ../src/common/resource.cpp:1691 ../src/common/resource.cpp:1692 -#: ../src/common/resource.cpp:2769 ../src/common/resource.cpp:2773 -#: src/common/resourc2.cpp:326 src/common/resourc2.cpp:1399 -#: src/common/resource.cpp:1674 src/common/resource.cpp:2747 -msgid "Expected '*' whilst parsing resource." -msgstr "Forventede '*' ved parsning af resource." - -#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 -#: ../src/common/resource.cpp:1708 ../src/common/resource.cpp:1709 -#: ../src/common/resource.cpp:2786 ../src/common/resource.cpp:2790 -#: src/common/resourc2.cpp:342 src/common/resourc2.cpp:1415 -#: src/common/resource.cpp:1690 src/common/resource.cpp:2763 -msgid "Expected '=' whilst parsing resource." -msgstr "Forventede '=' ved parsning af resource." - -#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 -#: ../src/common/resource.cpp:1677 ../src/common/resource.cpp:1678 -#: ../src/common/resource.cpp:2755 ../src/common/resource.cpp:2759 -#: src/common/resourc2.cpp:312 src/common/resourc2.cpp:1385 -#: src/common/resource.cpp:1660 src/common/resource.cpp:2733 -msgid "Expected 'char' whilst parsing resource." -msgstr "Forventede 'char' ved parsning af resource." - -#: ../src/msw/clipbrd.cpp:106 ../src/msw/clipbrd.cpp:112 -#: src/msw/clipbrd.cpp:106 -msgid "Failed to close the clipboard." -msgstr "Kunne ikke lukke klippebordet." - -#: ../src/generic/dirdlgg.cpp:460 ../src/generic/dirdlgg.cpp:464 -#: ../src/generic/dirdlgg.cpp:488 ../src/generic/dirdlgg.cpp:492 -#: src/generic/dirdlgg.cpp:460 src/generic/dirdlgg.cpp:488 -msgid "Failed to create directory " -msgstr "Kunne ikke oprette bibliotek " - -#: ../src/msw/tooltip.cpp:260 src/msw/tooltip.cpp:260 -#, c-format -msgid "Failed to create the tooltip '%s'" -msgstr "Kunne ikke oprette tooltip '%s'" - -#: src/msw/dialog.cpp:143 -msgid "Failed to created dialog." -msgstr "Kunne ikke oprette dialog." - -#: ../src/msw/clipbrd.cpp:118 ../src/msw/clipbrd.cpp:124 -#: src/msw/clipbrd.cpp:118 -msgid "Failed to empty the clipboard." -msgstr "Kunne ikke tømme klippebordet." - -#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2174 -#: ../src/common/resource.cpp:2178 src/common/resourc2.cpp:808 -#: src/common/resource.cpp:2156 -#, c-format -msgid "" -"Failed to find XBM resource %s.\n" -"Forgot to use wxResourceLoadBitmapData?" -msgstr "" -"Kunne ikke finde XBM resource %s.\n" -"Glemt at bruge wxResourceLoadBitmapData?" - -#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2329 -#: ../src/common/resource.cpp:2333 src/common/resourc2.cpp:963 -#: src/common/resource.cpp:2311 -#, c-format -msgid "" -"Failed to find XBM resource %s.\n" -"Forgot to use wxResourceLoadIconData?" -msgstr "" -"Kunne ikke finde XBM resource %s.\n" -"Glemt at bruge wxResourceLoadIconData?" - -#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2190 -#: ../src/common/resource.cpp:2194 src/common/resourc2.cpp:824 -#: src/common/resource.cpp:2172 -#, c-format -msgid "" -"Failed to find XPM resource %s.\n" -"Forgot to use wxResourceLoadBitmapData?" -msgstr "" -"Kunne ikke finde XPM resource %s.\n" -"Glemt at bruge wxResourceLoadBitmapData?" - -#: ../src/msw/clipbrd.cpp:86 ../src/msw/clipbrd.cpp:92 src/msw/clipbrd.cpp:86 -msgid "Failed to open the clipboard." -msgstr "Kunne ikke åbne klippebordet." - -#: ../src/msw/clipbrd.cpp:375 ../src/msw/clipbrd.cpp:412 -#: src/msw/clipbrd.cpp:375 -msgid "Failed to retrieve data from the clipboard." -msgstr "Kunne ikke hente data fra klippebordet." - -#: ../src/msw/clipbrd.cpp:262 ../src/msw/clipbrd.cpp:286 -#: src/msw/clipbrd.cpp:262 -msgid "Failed to set clipboard data." -msgstr "Kunne ikke skrive klippebordsdata." - -#: ../src/unix/threadpsx.cpp:551 ../src/unix/threadpsx.cpp:592 -#: ../src/unix/threadpsx.cpp:601 src/gtk/threadpsx.cpp:508 -#, c-format -msgid "Failed to set thread priority %d." -msgstr "Kunne ikke sætte trådprioritet %d." - -#: ../src/unix/threadpsx.cpp:662 ../src/unix/threadpsx.cpp:703 -#: ../src/unix/threadpsx.cpp:713 src/gtk/threadpsx.cpp:611 -msgid "Failed to terminate a thread." -msgstr "Kunne ikke afslutte en tråd." - -#: ../src/common/log.cpp:545 ../src/common/log.cpp:551 src/common/log.cpp:543 -msgid "Fatal error" -msgstr "Fatal fejl" - -#: ../src/common/log.cpp:318 ../src/common/log.cpp:322 src/common/log.cpp:325 -msgid "Fatal error: " -msgstr "Fatal fejl: " - -#: ../src/gtk/filedlg.cpp:68 src/gtk/filedlg.cpp:57 -#, c-format -msgid "File '%s' already exists, do you really want to overwrite it?" -msgstr "Fil '%s' eksisterer allerede, vil du virkelig overskrive den?" - -#: ../src/common/docview.cpp:280 ../src/common/docview.cpp:281 -#: ../src/common/docview.cpp:311 ../src/common/docview.cpp:317 -#: src/common/docview.cpp:247 src/common/docview.cpp:278 -msgid "File error" -msgstr "Fil fejl" - -#: ../src/msw/filedlg.cpp:259 src/msw/filedlg.cpp:252 -#, c-format -msgid "Files (%s)|%s" -msgstr "Filer (%s)|%s" - -#: ../src/generic/fontdlgg.cpp:126 src/generic/fontdlgg.cpp:126 -msgid "Font" -msgstr "Font" - -#: ../src/unix/utilsunx.cpp:276 ../src/unix/utilsunx.cpp:287 -#: src/gtk/utilsgtk.cpp:327 -msgid "Fork failed" -msgstr "Gaffel fejlede ;-)" - -#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 -#: ../src/common/resource.cpp:1660 ../src/common/resource.cpp:1661 -#: ../src/common/resource.cpp:2738 ../src/common/resource.cpp:2742 -#: src/common/resourc2.cpp:295 src/common/resourc2.cpp:1368 -#: src/common/resource.cpp:1643 src/common/resource.cpp:2716 -msgid "Found " -msgstr "Fandt " - -#: ../src/generic/prntdlgg.cpp:158 ../src/generic/prntdlgg.cpp:165 -#: src/generic/prntdlgg.cpp:97 -msgid "From:" -msgstr "Fra:" - -#: ../src/generic/helphtml.cpp:259 ../src/generic/helphtml.cpp:260 -#: ../src/generic/helphtml.cpp:276 ../src/generic/helphtml.cpp:277 -#: src/generic/helphtml.cpp:259 src/generic/helphtml.cpp:260 -msgid "Help Index" -msgstr "Hjælpeindex" - -#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 -#: ../src/common/resource.cpp:2363 ../src/common/resource.cpp:2367 -#: ../src/common/resource.cpp:2374 ../src/common/resource.cpp:2378 -#: src/common/resourc2.cpp:997 src/common/resourc2.cpp:1008 -#: src/common/resource.cpp:2345 src/common/resource.cpp:2356 -#, c-format -msgid "Icon resource specification %s not found." -msgstr "Ikonresource specifikation %s blev ikke fundet." - -#: ../src/common/resource.cpp:232 ../src/common/resource.cpp:234 -#: src/common/resource.cpp:234 -msgid "Ill-formed resource file syntax." -msgstr "Forkert formateret resourcefil syntax." - -#: ../src/common/log.cpp:482 ../src/common/log.cpp:486 src/common/log.cpp:477 -msgid "Information" -msgstr "Information" - -#: ../src/generic/fontdlgg.cpp:215 ../src/generic/fontdlgg.cpp:217 -#: src/generic/fontdlgg.cpp:217 -msgid "Italic" -msgstr "Kursiv" - -#: ../src/generic/dcpsg.cpp:1908 ../src/generic/dcpsg.cpp:1909 -#: ../src/generic/dcpsg.cpp:2030 ../src/generic/prntdlgg.cpp:403 -#: ../src/generic/prntdlgg.cpp:410 ../src/generic/prntdlgg.cpp:606 -#: ../src/generic/prntdlgg.cpp:613 src/generic/dcpsg.cpp:1866 -#: src/generic/prntdlgg.cpp:289 src/generic/prntdlgg.cpp:499 -msgid "Landscape" -msgstr "Liggende" - -#: ../src/generic/prntdlgg.cpp:622 ../src/generic/prntdlgg.cpp:629 -#: src/generic/prntdlgg.cpp:515 -msgid "Left margin (mm):" -msgstr "Venstre margin (mm):" - -#: src/generic/dcpsg.cpp:2391 -msgid "Legal 8 1/2 x 14 in" -msgstr "Legal 8 1/2 x 14 in" - -#: src/generic/dcpsg.cpp:2390 -msgid "Letter 8 1/2 x 11 in" -msgstr "Letter 8 1/2 x 11 in" - -#: ../src/generic/fontdlgg.cpp:218 ../src/generic/fontdlgg.cpp:220 -#: src/generic/fontdlgg.cpp:220 -msgid "Light" -msgstr "Let" - -#: ../src/gtk/filedlg.cpp:212 ../src/gtk/filedlg.cpp:227 -#: ../src/gtk/filedlg.cpp:231 ../src/msw/filedlg.cpp:359 -#: ../src/msw/filedlg.cpp:360 src/gtk/filedlg.cpp:177 src/msw/filedlg.cpp:352 -#, c-format -msgid "Load %s file" -msgstr "Load %s file" - -#: ../src/common/log.cpp:725 ../src/common/log.cpp:740 src/common/log.cpp:720 -#, c-format -msgid "Log saved to the file '%s'." -msgstr "Log gemt i filen '%s'." - -#: ../src/gtk/mdi.cpp:347 ../src/gtk/mdi.cpp:369 src/gtk/mdi.cpp:321 -msgid "MDI child" -msgstr "MDI barn" - -#: ../src/common/mimetype.cpp:1263 ../src/common/mimetype.cpp:1265 -#: src/common/mimetype.cpp:1203 -#, c-format -msgid "Mailcap file %s, line %d: incomplete entry ignored." -msgstr "Mailcap fil %s, linie %d: ufuldstændig indgang ignoreret." - -#: src/common/mimetype.cpp:968 -#, c-format -msgid "" -"Mime.types file %s, line %d: extra characters after the field value ignored." -msgstr "" -"Mime.type fil %s, linie %d: ekstra karakterer efter feltværdien ignoreret." - -#: ../src/common/mimetype.cpp:977 ../src/common/mimetype.cpp:979 -#: src/common/mimetype.cpp:941 -#, c-format -msgid "Mime.types file %s, line %d: unterminated quoted string." -msgstr "Mime.type fil %s, linie %d: uafsluttet streng." - -#: ../src/generic/fontdlgg.cpp:210 ../src/generic/fontdlgg.cpp:212 -#: src/generic/fontdlgg.cpp:212 -msgid "Modern" -msgstr "Modern" - -#: ../src/generic/dirdlgg.cpp:226 ../src/generic/dirdlgg.cpp:230 -#: src/generic/dirdlgg.cpp:226 -msgid "Mounted Devices" -msgstr "Monterede enheder" - -#: ../src/generic/dirdlgg.cpp:225 ../src/generic/dirdlgg.cpp:229 -#: src/generic/dirdlgg.cpp:225 -msgid "My Home" -msgstr "Mit hjem" - -#: ../src/generic/dirdlgg.cpp:342 ../src/generic/dirdlgg.cpp:346 -#: src/generic/dirdlgg.cpp:342 -msgid "New..." -msgstr "Ny..." - -#: ../src/generic/extdlgg.cpp:103 ../src/generic/extdlgg.cpp:115 -#: ../src/generic/msgdlgg.cpp:111 ../src/generic/msgdlgg.cpp:148 -#: ../src/gtk/msgdlg.cpp:125 src/generic/msgdlgg.cpp:131 -msgid "No" -msgstr "Nej" - -#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 -#: ../src/common/resource.cpp:2180 ../src/common/resource.cpp:2184 -#: ../src/common/resource.cpp:2335 ../src/common/resource.cpp:2339 -#: src/common/resourc2.cpp:814 src/common/resourc2.cpp:969 -#: src/common/resource.cpp:2162 src/common/resource.cpp:2317 -msgid "No XBM facility available!" -msgstr "Ingen XBM facilitet tilgængelig!" - -#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2196 -#: ../src/common/resource.cpp:2200 src/common/resourc2.cpp:830 -#: src/common/resource.cpp:2178 -msgid "No XPM facility available!" -msgstr "Ingen XPM facilitet tilgængelig!" - -#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2357 -#: ../src/common/resource.cpp:2361 src/common/resourc2.cpp:991 -#: src/common/resource.cpp:2339 -msgid "No XPM icon facility available!" -msgstr "Ingen XPM ikonfacilitet tilgængelig!" - -#: ../src/generic/helphtml.cpp:254 ../src/generic/helphtml.cpp:271 -#: src/generic/helphtml.cpp:254 -msgid "No entries found." -msgstr "Ingen indgange blev fundet." - -#: ../src/generic/fontdlgg.cpp:214 ../src/generic/fontdlgg.cpp:216 -#: ../src/generic/fontdlgg.cpp:217 ../src/generic/fontdlgg.cpp:219 -#: src/generic/fontdlgg.cpp:216 src/generic/fontdlgg.cpp:219 -msgid "Normal" -msgstr "Normal" - -#: ../src/common/dlgcmn.cpp:116 ../src/common/dlgcmn.cpp:159 -#: ../src/generic/choicdgg.cpp:301 ../src/generic/colrdlgg.cpp:231 -#: ../src/generic/colrdlgg.cpp:233 ../src/generic/dcpsg.cpp:1916 -#: ../src/generic/dcpsg.cpp:1917 ../src/generic/dcpsg.cpp:2038 -#: ../src/generic/dirdlgg.cpp:340 ../src/generic/dirdlgg.cpp:344 -#: ../src/generic/extdlgg.cpp:121 ../src/generic/fontdlgg.cpp:258 -#: ../src/generic/fontdlgg.cpp:260 ../src/generic/msgdlgg.cpp:117 -#: ../src/generic/msgdlgg.cpp:158 ../src/generic/prntdlgg.cpp:171 -#: ../src/generic/prntdlgg.cpp:178 ../src/generic/prntdlgg.cpp:429 -#: ../src/generic/prntdlgg.cpp:436 ../src/generic/prntdlgg.cpp:579 -#: ../src/generic/prntdlgg.cpp:586 ../src/generic/textdlgg.cpp:136 -#: ../src/gtk/choicdlg.cpp:266 ../src/gtk/filedlg.cpp:148 -#: ../src/gtk/msgdlg.cpp:131 ../src/gtk/textdlg.cpp:109 -#: src/generic/choicdgg.cpp:301 src/generic/colrdlgg.cpp:231 -#: src/generic/dcpsg.cpp:1874 src/generic/dirdlgg.cpp:340 -#: src/generic/fontdlgg.cpp:260 src/generic/msgdlgg.cpp:138 -#: src/generic/prntdlgg.cpp:110 src/generic/prntdlgg.cpp:316 -#: src/generic/prntdlgg.cpp:472 src/generic/textdlgg.cpp:136 -#: src/gtk/filedlg.cpp:125 -msgid "OK" -msgstr "OK" - -#: ../src/generic/prntdlgg.cpp:409 ../src/generic/prntdlgg.cpp:416 -#: src/generic/prntdlgg.cpp:295 -msgid "Options" -msgstr "Valgmuligheder" - -#: ../src/generic/prntdlgg.cpp:405 ../src/generic/prntdlgg.cpp:412 -#: ../src/generic/prntdlgg.cpp:607 ../src/generic/prntdlgg.cpp:614 -#: src/generic/prntdlgg.cpp:291 src/generic/prntdlgg.cpp:500 -msgid "Orientation" -msgstr "Orientering" - -#: ../src/common/prntbase.cpp:695 ../src/common/prntbase.cpp:705 -#: src/common/prntbase.cpp:693 -#, c-format -msgid "Page %d" -msgstr "Side %d" - -#: ../src/common/prntbase.cpp:693 ../src/common/prntbase.cpp:703 -#: src/common/prntbase.cpp:691 -#, c-format -msgid "Page %d of %d" -msgstr "Side %d af %d" - -#: ../src/generic/prntdlgg.cpp:564 ../src/generic/prntdlgg.cpp:571 -#: src/generic/prntdlgg.cpp:457 -msgid "Page Setup" -msgstr "Sideopsætning" - -#: ../src/generic/prntdlgg.cpp:141 ../src/generic/prntdlgg.cpp:148 -#: src/generic/prntdlgg.cpp:84 -msgid "Pages" -msgstr "Sider" - -#: ../src/generic/prntdlgg.cpp:395 ../src/generic/prntdlgg.cpp:402 -#: ../src/generic/prntdlgg.cpp:756 ../src/generic/prntdlgg.cpp:763 -#: src/generic/prntdlgg.cpp:281 src/generic/prntdlgg.cpp:629 -msgid "Paper size" -msgstr "Side størrelse" - -#: ../src/unix/utilsunx.cpp:259 ../src/unix/utilsunx.cpp:270 -#: src/gtk/utilsgtk.cpp:315 -msgid "Pipe creation failed" -msgstr "Røroprettelse fejlede" - -#: ../src/common/prntbase.cpp:107 ../src/common/prntbase.cpp:112 -#: src/common/prntbase.cpp:111 -msgid "Please wait..." -msgstr "Vent venligst..." - -#: ../src/generic/dcpsg.cpp:1907 ../src/generic/dcpsg.cpp:1908 -#: ../src/generic/dcpsg.cpp:2029 ../src/generic/prntdlgg.cpp:402 -#: ../src/generic/prntdlgg.cpp:409 ../src/generic/prntdlgg.cpp:605 -#: ../src/generic/prntdlgg.cpp:612 src/generic/dcpsg.cpp:1865 -#: src/generic/prntdlgg.cpp:288 src/generic/prntdlgg.cpp:498 -msgid "Portrait" -msgstr "Opretstående" - -#: ../src/generic/dcpsg.cpp:366 ../src/generic/dcpsg.cpp:372 -#: src/generic/dcpsg.cpp:338 -msgid "PostScript" -msgstr "EfterSkrift ;-)" - -#: ../src/generic/prntdlgg.cpp:234 ../src/generic/prntdlgg.cpp:241 -#: src/generic/prntdlgg.cpp:159 -msgid "PostScript file" -msgstr "PostScript fil" - -#: ../src/generic/dcpsg.cpp:1949 ../src/generic/dcpsg.cpp:1950 -#: ../src/generic/dcpsg.cpp:2071 src/generic/dcpsg.cpp:1907 -msgid "PostScript:" -msgstr "PostScript fil:" - -#: ../src/generic/dcpsg.cpp:1912 ../src/generic/dcpsg.cpp:1913 -#: ../src/generic/dcpsg.cpp:2034 src/generic/dcpsg.cpp:1870 -msgid "Preview Only" -msgstr "Bare smugkig" - -#: ../src/generic/prntdlgg.cpp:102 ../src/generic/prntdlgg.cpp:109 -#: ../src/generic/prntdlgg.cpp:116 ../src/generic/prntdlgg.cpp:123 -#: src/generic/prntdlgg.cpp:71 -msgid "Print" -msgstr "Udskriv" - -#: ../src/generic/printps.cpp:189 ../src/generic/printps.cpp:193 -#: ../src/generic/printps.cpp:194 src/generic/printps.cpp:165 -msgid "Print Error" -msgstr "Udskriv fejl" - -#: ../src/common/docview.cpp:831 ../src/common/docview.cpp:857 -#: src/common/docview.cpp:785 -msgid "Print Preview" -msgstr "Udskriftsmugkig" - -#: ../src/common/prntbase.cpp:636 ../src/common/prntbase.cpp:646 -#: ../src/common/prntbase.cpp:658 ../src/common/prntbase.cpp:668 -#: ../src/common/prntbase.cpp:675 ../src/common/prntbase.cpp:685 -#: src/common/prntbase.cpp:633 src/common/prntbase.cpp:655 -#: src/common/prntbase.cpp:673 -msgid "Print Preview Failure" -msgstr "Udskriftsmugkig fejlede" - -#: ../src/generic/prntdlgg.cpp:149 ../src/generic/prntdlgg.cpp:156 -#: src/generic/prntdlgg.cpp:90 -msgid "Print Range" -msgstr "Udskriftsområde" - -#: ../src/generic/prntdlgg.cpp:370 ../src/generic/prntdlgg.cpp:377 -#: ../src/generic/prntdlgg.cpp:384 src/generic/prntdlgg.cpp:276 -msgid "Print Setup" -msgstr "Udskriftsopsætning" - -#: ../src/generic/prntdlgg.cpp:417 ../src/generic/prntdlgg.cpp:424 -#: src/generic/prntdlgg.cpp:303 -msgid "Print in colour" -msgstr "Udskriv i farver" - -#: ../src/generic/prntdlgg.cpp:419 ../src/generic/prntdlgg.cpp:426 -#: src/generic/prntdlgg.cpp:306 -msgid "Print spooling" -msgstr "Udskriftsspuling" - -#: ../src/generic/dcpsg.cpp:1911 ../src/generic/dcpsg.cpp:1912 -#: ../src/generic/dcpsg.cpp:2033 ../src/generic/prntdlgg.cpp:135 -#: ../src/generic/prntdlgg.cpp:142 src/generic/dcpsg.cpp:1869 -#: src/generic/prntdlgg.cpp:78 -msgid "Print to File" -msgstr "Udskriv til fil" - -#: ../src/common/prntbase.cpp:350 ../src/common/prntbase.cpp:359 -#: src/common/prntbase.cpp:349 -msgid "Print..." -msgstr "Udskriv..." - -#: ../src/generic/dcpsg.cpp:1922 ../src/generic/dcpsg.cpp:1923 -#: ../src/generic/dcpsg.cpp:2044 src/generic/dcpsg.cpp:1880 -msgid "Printer Command: " -msgstr "Printer kommando: " - -#: ../src/generic/dcpsg.cpp:1927 ../src/generic/dcpsg.cpp:1928 -#: ../src/generic/dcpsg.cpp:2049 src/generic/dcpsg.cpp:1885 -msgid "Printer Options: " -msgstr "Printer valgmuligheder: " - -#: ../src/generic/dcpsg.cpp:335 ../src/generic/dcpsg.cpp:341 -#: src/generic/dcpsg.cpp:306 -msgid "Printer Settings" -msgstr "Printer opsætninger" - -#: ../src/generic/prntdlgg.cpp:421 ../src/generic/prntdlgg.cpp:428 -#: src/generic/prntdlgg.cpp:308 -msgid "Printer command:" -msgstr "Printer kommando:" - -#: ../src/generic/prntdlgg.cpp:133 ../src/generic/prntdlgg.cpp:140 -#: src/generic/prntdlgg.cpp:76 -msgid "Printer options" -msgstr "Printer valgmuligheder" - -#: ../src/generic/prntdlgg.cpp:425 ../src/generic/prntdlgg.cpp:432 -#: src/generic/prntdlgg.cpp:312 -msgid "Printer options:" -msgstr "Printer valgmuligheder:" - -#: ../src/generic/prntdlgg.cpp:582 ../src/generic/prntdlgg.cpp:589 -#: src/generic/prntdlgg.cpp:475 -msgid "Printer..." -msgstr "Printer..." - -#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:111 -#: ../src/common/prntbase.cpp:148 ../src/common/prntbase.cpp:153 -#: src/common/prntbase.cpp:110 src/common/prntbase.cpp:152 -msgid "Printing" -msgstr "Udskriver" - -#: ../src/common/prntbase.cpp:120 ../src/common/prntbase.cpp:125 -#: src/common/prntbase.cpp:124 -msgid "Printing Error" -msgstr "Udskriftsfejl" - -#: ../src/common/log.cpp:319 ../src/common/log.cpp:323 src/common/log.cpp:326 -msgid "Program aborted." -msgstr "Program afsluttet" - -#: ../src/common/log.cpp:677 ../src/common/log.cpp:692 src/common/log.cpp:672 -msgid "Question" -msgstr "Spørgsmål" - -#: ../src/msw/registry.cpp:435 src/msw/registry.cpp:435 -#, c-format -msgid "" -"Registry key '%s' is needed for normal system operation,\n" -"deleting it will leave your system in unusable state:\n" -"operation aborted." -msgstr "" -"Registry nøgle '%s' er nødvendig for almindelig system operation,\n" -"hvis du sletter den vil efterlade dit system i ubrugelig tilstand:\n" -"operationen blev afbrudt." - -#: ../src/generic/helphtml.cpp:259 ../src/generic/helphtml.cpp:276 -#: src/generic/helphtml.cpp:259 -msgid "Relevant entries:" -msgstr "Relevante indgange:" - -#: ../src/msw/filedlg.cpp:336 src/msw/filedlg.cpp:329 -#, c-format -msgid "Replace file '%s'?" -msgstr "Erstat fil '%s'?" - -#: ../src/generic/prntdlgg.cpp:628 ../src/generic/prntdlgg.cpp:635 -#: src/generic/prntdlgg.cpp:521 -msgid "Right margin (mm):" -msgstr "Højre margin (mm):" - -#: ../src/generic/fontdlgg.cpp:208 ../src/generic/fontdlgg.cpp:210 -#: src/generic/fontdlgg.cpp:210 -msgid "Roman" -msgstr "Roman" - -#: ../src/gtk/filedlg.cpp:228 ../src/gtk/filedlg.cpp:243 -#: ../src/gtk/filedlg.cpp:247 ../src/msw/filedlg.cpp:359 -#: ../src/msw/filedlg.cpp:361 src/gtk/filedlg.cpp:193 src/msw/filedlg.cpp:352 -#, c-format -msgid "Save %s file" -msgstr "Gem %s fil" - -#: ../src/common/docview.cpp:231 ../src/common/docview.cpp:234 -#: src/common/docview.cpp:198 -msgid "Save as" -msgstr "Gem som" - -#: ../src/common/log.cpp:635 ../src/common/log.cpp:646 src/common/log.cpp:630 -msgid "Save log contents to file" -msgstr "Gen log indhold til fil" - -#: ../src/generic/fontdlgg.cpp:211 ../src/generic/fontdlgg.cpp:213 -#: src/generic/fontdlgg.cpp:213 -msgid "Script" -msgstr "Script" - -#: ../src/common/docview.cpp:1268 ../src/common/docview.cpp:1272 -#: ../src/common/docview.cpp:1299 src/common/docview.cpp:1243 -msgid "Select a document template" -msgstr "Vælg en dokumentskabelon" - -#: ../src/common/docview.cpp:1291 ../src/common/docview.cpp:1295 -#: ../src/common/docview.cpp:1322 src/common/docview.cpp:1266 -msgid "Select a document view" -msgstr "Vælg et dokumentudseende" - -#: ../src/common/docview.cpp:1185 ../src/common/docview.cpp:1189 -#: ../src/common/docview.cpp:1216 ../src/common/docview.cpp:1223 -#: ../src/common/docview.cpp:1227 ../src/common/docview.cpp:1254 -#: src/common/docview.cpp:1168 src/common/docview.cpp:1198 -msgid "Select a file" -msgstr "Vælg en file" - -#: ../src/generic/dcpsg.cpp:1910 ../src/generic/dcpsg.cpp:1911 -#: ../src/generic/dcpsg.cpp:2032 src/generic/dcpsg.cpp:1868 -msgid "Send to Printer" -msgstr "Send til printer" - -#: ../src/generic/prntdlgg.cpp:137 ../src/generic/prntdlgg.cpp:144 -#: src/generic/prntdlgg.cpp:80 -msgid "Setup..." -msgstr "Opsætning..." - -#: ../src/common/layout.cpp:1366 ../src/common/layout.cpp:1371 -#: src/common/layout.cpp:1326 -msgid "Sizer error" -msgstr "Sizer fejl" - -#: ../src/generic/fontdlgg.cpp:216 ../src/generic/fontdlgg.cpp:218 -#: src/generic/fontdlgg.cpp:218 -msgid "Slant" -msgstr "Hældning" - -#: ../src/common/docview.cpp:285 ../src/common/docview.cpp:291 -#: src/common/docview.cpp:252 -msgid "Sorry, could not open this file for saving." -msgstr "Undskyld, jeg kunne ikke åbne denne fil mht. gemning." - -#: ../src/common/docview.cpp:316 ../src/common/docview.cpp:322 -#: ../src/common/docview.cpp:327 ../src/common/docview.cpp:333 -#: src/common/docview.cpp:283 src/common/docview.cpp:289 -msgid "Sorry, could not open this file." -msgstr "Undskyld, jeg kunne ikke åbne denne fil." - -#: ../src/common/docview.cpp:292 ../src/common/docview.cpp:298 -#: src/common/docview.cpp:259 -msgid "Sorry, could not save this file." -msgstr "Undskyld, jeg kunne ikke gemme denne fil." - -#: ../src/common/prntbase.cpp:658 ../src/common/prntbase.cpp:668 -#: src/common/prntbase.cpp:655 -msgid "Sorry, not enough memory to create a preview." -msgstr "Undskyld, der er ikke nok hukkomelse til at danne et smugkig." - -#: ../src/common/log.cpp:787 ../src/common/log.cpp:803 src/common/log.cpp:781 -msgid "Status: " -msgstr "Status: " - -#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:214 -#: src/generic/fontdlgg.cpp:214 -msgid "Swiss" -msgstr "Swiss" - -#: ../src/generic/fontdlgg.cpp:213 ../src/generic/fontdlgg.cpp:215 -#: src/generic/fontdlgg.cpp:215 -msgid "Teletype" -msgstr "Skrivemaskine" - -#: ../src/common/docview.cpp:1268 ../src/common/docview.cpp:1272 -#: ../src/common/docview.cpp:1299 src/common/docview.cpp:1243 -msgid "Templates" -msgstr "Skabeloner" - -#: ../src/generic/dirdlgg.cpp:231 ../src/generic/dirdlgg.cpp:235 -#: src/generic/dirdlgg.cpp:231 -msgid "Temporary" -msgstr "Midlertidig" - -#: ../src/generic/dirdlgg.cpp:223 ../src/generic/dirdlgg.cpp:227 -#: src/generic/dirdlgg.cpp:223 -msgid "The Computer" -msgstr "Datamaskinen" - -#: ../src/generic/dirdlgg.cpp:447 ../src/generic/dirdlgg.cpp:451 -#: src/generic/dirdlgg.cpp:447 -msgid "The directory " -msgstr "Biblioteket " - -#: ../src/msw/thread.cpp:730 src/msw/thread.cpp:719 -msgid "" -"Thread module initialization failed: can not store value in thread local " -"storage" -msgstr "" -"Trådmodul initialisering fejlede: kan ikke gemme værdi i lokal " -"trådlager" - -#: src/gtk/threadpsx.cpp:708 -msgid "Thread module initialization failed: failed to create pthread key." -msgstr "Trådmodul initialisering fejlede: kunne ikke oprette ptrådnøgle." - -#: ../src/msw/thread.cpp:716 src/msw/thread.cpp:705 -msgid "" -"Thread module initialization failed: impossible to allocate index in thread " -"local storage" -msgstr "" -"Trådmodul initialisering fejlede: umuligt at allokere index i lokal " -"trådlager" - -#: ../src/generic/prntdlgg.cpp:162 ../src/generic/prntdlgg.cpp:169 -#: src/generic/prntdlgg.cpp:101 -msgid "To:" -msgstr "Til:" - -#: ../src/generic/prntdlgg.cpp:637 ../src/generic/prntdlgg.cpp:644 -#: src/generic/prntdlgg.cpp:530 -msgid "Top margin (mm):" -msgstr "Top margin (mm):" - -#: ../src/generic/fontdlgg.cpp:244 ../src/generic/fontdlgg.cpp:246 -#: src/generic/fontdlgg.cpp:246 -msgid "Underline" -msgstr "Understeget" - -#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 -#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 -#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 -#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 -#: ../src/common/resource.cpp:1670 ../src/common/resource.cpp:1671 -#: ../src/common/resource.cpp:1684 ../src/common/resource.cpp:1685 -#: ../src/common/resource.cpp:1701 ../src/common/resource.cpp:1702 -#: ../src/common/resource.cpp:1715 ../src/common/resource.cpp:1716 -#: ../src/common/resource.cpp:2748 ../src/common/resource.cpp:2752 -#: ../src/common/resource.cpp:2762 ../src/common/resource.cpp:2766 -#: ../src/common/resource.cpp:2779 ../src/common/resource.cpp:2783 -#: ../src/common/resource.cpp:2793 ../src/common/resource.cpp:2797 -#: src/common/resourc2.cpp:305 src/common/resourc2.cpp:319 -#: src/common/resourc2.cpp:335 src/common/resourc2.cpp:349 -#: src/common/resourc2.cpp:1378 src/common/resourc2.cpp:1392 -#: src/common/resourc2.cpp:1408 src/common/resourc2.cpp:1422 -#: src/common/resource.cpp:1653 src/common/resource.cpp:1667 -#: src/common/resource.cpp:1683 src/common/resource.cpp:1697 -#: src/common/resource.cpp:2726 src/common/resource.cpp:2740 -#: src/common/resource.cpp:2756 src/common/resource.cpp:2770 -msgid "Unexpected end of file whilst parsing resource." -msgstr "Uventet afslutning på filen uder parsning af resource." - -#: ../src/common/mimetype.cpp:1019 ../src/common/mimetype.cpp:1021 -#: src/common/mimetype.cpp:985 -#, c-format -msgid "Unknown field in file %s, line %d: '%s'." -msgstr "Ukendt felt i fil %s, linie %d: '%s'." - -#: ../src/common/mimetype.cpp:379 ../src/common/mimetype.cpp:381 -#: src/common/mimetype.cpp:363 -#, c-format -msgid "Unmatched '{' in an entry for mime type %s." -msgstr "Uparret '{' i en indgang for mime type %s." - -#: ../src/common/docview.cpp:1703 ../src/common/docview.cpp:1707 -#: ../src/common/docview.cpp:1718 ../src/common/docview.cpp:1722 -#: ../src/common/docview.cpp:1734 ../src/common/docview.cpp:1745 -#: ../src/common/docview.cpp:1749 ../src/common/docview.cpp:1776 -#: src/common/docview.cpp:1665 src/common/docview.cpp:1680 -#: src/common/docview.cpp:1707 -msgid "Unnamed command" -msgstr "Unavngiven kommando" - -#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2053 -#: ../src/common/resource.cpp:2057 src/common/resourc2.cpp:687 -#: src/common/resource.cpp:2035 -#, c-format -msgid "Unrecognized style %s whilst parsing resource." -msgstr "Ugenkendt stil %s under parsning af resource." - -#: ../src/msw/clipbrd.cpp:220 ../src/msw/clipbrd.cpp:254 -#: ../src/msw/clipbrd.cpp:330 ../src/msw/clipbrd.cpp:353 -#: src/msw/clipbrd.cpp:220 src/msw/clipbrd.cpp:330 -msgid "Unsupported clipboard format." -msgstr "Usupporteret klippebordsformat." - -#: ../src/generic/dirdlgg.cpp:227 ../src/generic/dirdlgg.cpp:231 -#: src/generic/dirdlgg.cpp:227 -msgid "User" -msgstr "Bruger" - -#: ../src/generic/dirdlgg.cpp:228 ../src/generic/dirdlgg.cpp:232 -#: src/generic/dirdlgg.cpp:228 -msgid "User Local" -msgstr "Lokal bruger" - -#: ../src/common/valtext.cpp:188 ../src/common/valtext.cpp:194 -#: src/common/valtext.cpp:144 src/common/valtext.cpp:155 -#: src/common/valtext.cpp:164 src/common/valtext.cpp:172 -#: src/common/valtext.cpp:180 src/common/valtext.cpp:189 -msgid "Validation conflict" -msgstr "Valideringskonflikt" - -#: ../src/generic/dirdlgg.cpp:229 ../src/generic/dirdlgg.cpp:233 -#: src/generic/dirdlgg.cpp:229 -msgid "Variables" -msgstr "Variable" - -#: ../src/common/docview.cpp:1291 ../src/common/docview.cpp:1295 -#: ../src/common/docview.cpp:1322 src/common/docview.cpp:1266 -msgid "Views" -msgstr "Udseender" - -#: ../src/common/docview.cpp:401 ../src/common/docview.cpp:420 -#: ../src/common/log.cpp:478 ../src/common/log.cpp:482 -#: ../src/common/resource.cpp:119 ../src/common/resource.cpp:121 -#: src/common/docview.cpp:368 src/common/resource.cpp:121 -msgid "Warning" -msgstr "Advarsel" - -#: ../src/common/log.cpp:329 ../src/common/log.cpp:333 src/common/log.cpp:336 -msgid "Warning: " -msgstr "Advarsel: " - -#: ../src/generic/dcpsg.cpp:1967 ../src/generic/dcpsg.cpp:1968 -#: ../src/generic/dcpsg.cpp:2089 src/generic/dcpsg.cpp:1925 -msgid "X Scaling" -msgstr "X scalering" - -#: ../src/generic/dcpsg.cpp:1976 ../src/generic/dcpsg.cpp:1977 -#: ../src/generic/dcpsg.cpp:2098 src/generic/dcpsg.cpp:1934 -msgid "X Translation" -msgstr "X oversættelse" - -#: ../src/generic/dcpsg.cpp:1971 ../src/generic/dcpsg.cpp:1972 -#: ../src/generic/dcpsg.cpp:2093 src/generic/dcpsg.cpp:1929 -msgid "Y Scaling" -msgstr "Y scalering" - -#: ../src/generic/dcpsg.cpp:1980 ../src/generic/dcpsg.cpp:1981 -#: ../src/generic/dcpsg.cpp:2102 src/generic/dcpsg.cpp:1938 -msgid "Y Translation" -msgstr "Y oversættelse" - -#: ../src/generic/extdlgg.cpp:101 ../src/generic/extdlgg.cpp:109 -#: ../src/generic/msgdlgg.cpp:109 ../src/generic/msgdlgg.cpp:147 -#: ../src/gtk/msgdlg.cpp:123 src/generic/msgdlgg.cpp:130 -msgid "Yes" -msgstr "Ja" - -#: ../src/common/docview.cpp:1814 ../src/common/docview.cpp:1818 -#: ../src/common/docview.cpp:1845 src/common/docview.cpp:1777 -msgid "[EMPTY]" -msgstr "[TOM]" - -#: ../src/common/time.cpp:358 src/common/time.cpp:358 -msgid "am" -msgstr "er " - -#: ../src/common/fileconf.cpp:1265 ../src/common/fileconf.cpp:1266 -#: src/common/CVS/Base/fileconf.cpp:1269 src/common/fileconf.cpp:1269 -#, c-format -msgid "attempt to change immutable key '%s' ignored." -msgstr "forsøg på at ændre uforanderlig nøgle '%s' blev ignoreret." - -#: ../src/common/string.cpp:1703 ../src/common/string.cpp:1830 -#: src/common/string.cpp:1430 -msgid "bad index in wxArrayString::Remove" -msgstr "forkert index i wxArrayString::Remove" - -#: ../src/common/file.cpp:273 ../src/common/file.cpp:274 -#: src/common/file.cpp:268 -#, c-format -msgid "can't close file descriptor %d" -msgstr "kan ikke lukke fildeskriptor %d" - -#: ../src/msw/registry.cpp:403 src/msw/registry.cpp:403 -#, c-format -msgid "can't close registry key '%s'" -msgstr "kan ikke lukke registry nøgle '%s'" - -#: ../src/common/file.cpp:563 ../src/common/file.cpp:564 -#: src/common/file.cpp:520 -#, c-format -msgid "can't commit changes to file '%s'" -msgstr "kan ikke overgive ændringer til fil '%s'" - -#: ../src/common/file.cpp:224 ../src/common/file.cpp:225 -#: src/common/file.cpp:215 -#, c-format -msgid "can't create file '%s'" -msgstr "kan ikke oprette file '%s'" - -#: ../src/msw/registry.cpp:386 src/msw/registry.cpp:386 -#, c-format -msgid "can't create registry key '%s'" -msgstr "kan ikke oprette registry nøgle '%s'" - -#: ../src/msw/registry.cpp:467 src/msw/registry.cpp:467 -#, c-format -msgid "can't delete key '%s'" -msgstr "kan ikke slette nøgle '%s'" - -#: ../src/common/fileconf.cpp:735 ../src/common/fileconf.cpp:736 -#: src/common/CVS/Base/fileconf.cpp:742 src/common/fileconf.cpp:742 -#, c-format -msgid "can't delete user configuration file '%s'" -msgstr "kan ikke slette brugerkonfigurationsfil '%s'" - -#: ../src/msw/registry.cpp:492 src/msw/registry.cpp:492 -#, c-format -msgid "can't delete value '%s' from key '%s'" -msgstr "kan ikke slette værdi '%s' fra nøgle '%s'" - -#: ../src/msw/registry.cpp:503 src/msw/registry.cpp:503 -#, c-format -msgid "can't delete value of key '%s'" -msgstr "kan ikke slette værdi af nøgle '%s'" - -#: src/common/file.cpp:447 -#, c-format -msgid "can't determine if the end of file is reached on descriptor %d" -msgstr "kan ikke afgøre om slutningen af filen er nået på deskriptor %d" - -#: ../src/msw/registry.cpp:780 ../src/msw/registry.cpp:791 -#: src/msw/registry.cpp:780 -#, c-format -msgid "can't enumerate subkeys of key '%s'" -msgstr "kan ikke nummerere undernøgle af nøgle '%s'" - -#: ../src/msw/registry.cpp:735 ../src/msw/registry.cpp:746 -#: src/msw/registry.cpp:735 -#, c-format -msgid "can't enumerate values of key '%s'" -msgstr "kan ikke nummerere værdi af nøgle '%s'" - -#: ../src/common/file.cpp:418 ../src/common/file.cpp:419 -#: src/common/file.cpp:413 -#, c-format -msgid "can't find length of file on file descriptor %d" -msgstr "kan ikke finde længden af filen på fildeskriptor %d" - -#: ../src/msw/utils.cpp:584 ../src/msw/utils.cpp:622 src/msw/utils.cpp:561 -msgid "can't find user's HOME, using current directory." -msgstr "kan ikke finde brugerens HJEM, bruger nuværende bibliotek." - -#: ../src/common/file.cpp:332 ../src/common/file.cpp:333 -#: src/common/file.cpp:327 -#, c-format -msgid "can't flush file descriptor %d" -msgstr "kan ikke skylle fildeskriptor %d ud" - -#: ../src/msw/registry.cpp:335 src/msw/registry.cpp:335 -#, c-format -msgid "can't get info about registry key '%s'" -msgstr "kan ikke gå information om registry nøgle '%s'" - -#: ../src/common/file.cpp:386 ../src/common/file.cpp:387 -#: src/common/file.cpp:381 -#, c-format -msgid "can't get seek position on file descriptor %d" -msgstr "kan ikke få søgeposition på fildescriptor %d" - -#: ../src/common/file.cpp:259 ../src/common/file.cpp:260 -#: src/common/file.cpp:254 -#, c-format -msgid "can't open file '%s'" -msgstr "kan ikke åbne filen '%s'" - -#: ../src/common/fileconf.cpp:182 ../src/common/fileconf.cpp:183 -#: src/common/CVS/Base/fileconf.cpp:186 src/common/fileconf.cpp:186 -#, c-format -msgid "can't open global configuration file '%s'." -msgstr "kan ikke åbne global konfiguraionsfil '%s'." - -#: ../src/msw/registry.cpp:361 src/msw/registry.cpp:361 -#, c-format -msgid "can't open registry key '%s'" -msgstr "kan ikke åbne registry nøgle '%s'" - -#: ../src/common/fileconf.cpp:194 ../src/common/fileconf.cpp:195 -#: src/common/CVS/Base/fileconf.cpp:198 src/common/fileconf.cpp:198 -#, c-format -msgid "can't open user configuration file '%s'." -msgstr "kan ikke åbge brugerkonfigurationsfil '%s'." - -#: ../src/common/fileconf.cpp:641 ../src/common/fileconf.cpp:642 -#: src/common/CVS/Base/fileconf.cpp:646 src/common/fileconf.cpp:646 -msgid "can't open user configuration file." -msgstr "kan ikke åbne brugerkonfigurationsfil." - -#: ../src/common/file.cpp:299 ../src/common/file.cpp:300 -#: src/common/file.cpp:294 -#, c-format -msgid "can't read from file descriptor %d" -msgstr "kan ikke læse fra fildeskriptor %d" - -#: ../src/msw/registry.cpp:658 ../src/msw/registry.cpp:670 -#: src/msw/registry.cpp:658 -#, c-format -msgid "can't read value of '%s'" -msgstr "kan ikke læse værdien af '%s'" - -#: ../src/msw/registry.cpp:569 ../src/msw/registry.cpp:581 -#: ../src/msw/registry.cpp:608 ../src/msw/registry.cpp:620 -#: src/msw/registry.cpp:569 src/msw/registry.cpp:608 -#, c-format -msgid "can't read value of key '%s'" -msgstr "kan ikke læse værdien af nøgle '%s'" - -#: ../src/common/file.cpp:558 ../src/common/file.cpp:559 -#: src/common/file.cpp:515 -#, c-format -msgid "can't remove file '%s'" -msgstr "kan ikke fjerne filen '%s'" - -#: ../src/common/file.cpp:574 ../src/common/file.cpp:575 -#: src/common/file.cpp:531 -#, c-format -msgid "can't remove temporary file '%s'" -msgstr "kan ikke fjerne midlertidig fil '%s'" - -#: ../src/common/file.cpp:372 ../src/common/file.cpp:373 -#: src/common/file.cpp:367 -#, c-format -msgid "can't seek on file descriptor %d" -msgstr "kan ikke søge på fildeskriptor %d" - -#: ../src/msw/registry.cpp:594 ../src/msw/registry.cpp:606 -#: ../src/msw/registry.cpp:682 ../src/msw/registry.cpp:694 -#: src/msw/registry.cpp:594 src/msw/registry.cpp:682 -#, c-format -msgid "can't set value of '%s'" -msgstr "kan ikke sætte værdien af '%s'" - -#: src/common/CVS/Base/fileconf.cpp:594 src/common/fileconf.cpp:594 -msgid "can't set value of a group!" -msgstr "kan ikke sætte værdien af gruppe!" - -#: ../src/common/textfile.cpp:237 ../src/common/textfile.cpp:243 -#: src/common/textfile.cpp:229 -#, c-format -msgid "can't write file '%s' to disk." -msgstr "kan ikke skrive fil '%s' til disk." - -#: ../src/common/file.cpp:317 ../src/common/file.cpp:318 -#: src/common/file.cpp:312 -#, c-format -msgid "can't write to file descriptor %d" -msgstr "kan ikke skrive til fildeskriptor %d" - -#: ../src/common/fileconf.cpp:648 ../src/common/fileconf.cpp:649 -#: src/common/CVS/Base/fileconf.cpp:653 src/common/fileconf.cpp:653 -msgid "can't write user configuration file." -msgstr "kan ikke skrive brugerkonfigurationsfil." - -#: ../src/common/intl.cpp:301 ../src/common/intl.cpp:334 -#: src/common/intl.cpp:300 -#, c-format -msgid "catalog file for domain '%s' not found." -msgstr "katalogfil for domæne '%s' blev ikke fundet." - -#: ../src/common/filefn.cpp:1527 src/common/filefn.cpp:1497 -msgid "empty file name in wxFindFileInPath" -msgstr "tom filnavn i wxFindFileInPath" - -#: ../src/common/fileconf.cpp:1252 ../src/common/fileconf.cpp:1253 -#: src/common/CVS/Base/fileconf.cpp:1256 src/common/fileconf.cpp:1256 -#, c-format -msgid "entry '%s' appears more than once in group '%s'" -msgstr "indgang '%s' optræder mere en engang i gruppe '%s'" - -#: ../src/common/fileconf.cpp:334 ../src/common/fileconf.cpp:335 -#: src/common/CVS/Base/fileconf.cpp:338 src/common/fileconf.cpp:338 -#, c-format -msgid "file '%s', line %d: '%s' ignored after group header." -msgstr "fil '%s', linie %d: '%s' ignoreret efter gruppeindledning" - -#: ../src/common/fileconf.cpp:360 ../src/common/fileconf.cpp:361 -#: src/common/CVS/Base/fileconf.cpp:357 src/common/fileconf.cpp:357 -#, c-format -msgid "file '%s', line %d: '=' expected." -msgstr "fil '%s', linie %d: '=' forventet." - -#: ../src/common/fileconf.cpp:387 ../src/common/fileconf.cpp:388 -#: src/common/CVS/Base/fileconf.cpp:384 src/common/fileconf.cpp:384 -#, c-format -msgid "file '%s', line %d: key '%s' was first found at line %d." -msgstr "fil '%s', linie %d: nøgle '%s blev først fundet på linie %d." - -#: ../src/common/fileconf.cpp:376 ../src/common/fileconf.cpp:377 -#: src/common/CVS/Base/fileconf.cpp:373 src/common/fileconf.cpp:373 -#, c-format -msgid "file '%s', line %d: value for immutable key '%s' ignored." -msgstr "fil '%s', linie %d: værdi af uforanderlig nøgle '%s' blev ignoreret." - -#: ../src/common/fileconf.cpp:302 ../src/common/fileconf.cpp:303 -#: src/common/CVS/Base/fileconf.cpp:307 src/common/fileconf.cpp:307 -#, c-format -msgid "file '%s': unexpected character %c at line %d." -msgstr "fil '%s': uventet karakter %c på linie %d." - -#: ../src/common/date.cpp:374 ../src/common/date.cpp:377 -#: ../src/common/date.cpp:392 ../src/common/date.cpp:395 -#: ../src/common/date.cpp:406 ../src/common/date.cpp:409 -#: src/common/date.cpp:373 src/common/date.cpp:391 src/common/date.cpp:405 -msgid "invalid date" -msgstr "ugyldig dato" - -#: ../src/common/date.cpp:356 ../src/common/date.cpp:359 -#: src/common/date.cpp:355 -msgid "invalid day" -msgstr "ugyldig dag" - -#: ../src/common/file.cpp:457 ../src/common/file.cpp:458 -#: src/common/file.cpp:452 -msgid "invalid eof() return value." -msgstr "ugyldig eof() returværdi." - -#: ../src/common/log.cpp:690 ../src/common/log.cpp:705 src/common/log.cpp:685 -msgid "invalid message box return value" -msgstr "ugyldig meddelelsesboks returværdi" - -#: ../src/common/date.cpp:364 ../src/common/date.cpp:367 -#: src/common/date.cpp:363 -msgid "invalid month" -msgstr "ugyldig måned" - -#: ../src/common/intl.cpp:432 ../src/common/intl.cpp:465 -#: src/common/intl.cpp:431 -#, c-format -msgid "locale '%s' can not be set." -msgstr "locale '%s' kan ikke sættes." - -#: ../src/common/intl.cpp:296 ../src/common/intl.cpp:329 -#: src/common/intl.cpp:295 -#, c-format -msgid "looking for catalog '%s' in path '%s'." -msgstr "søger efter katalog '%s' i sti '%s'." - -#: ../src/common/time.cpp:360 src/common/time.cpp:360 -msgid "pm" -msgstr "efter middag" - -#: ../src/common/string.cpp:1719 ../src/common/string.cpp:1846 -#: src/common/string.cpp:1446 -msgid "removing inexistent element in wxArrayString::Remove" -msgstr "fjerner ikke-eksisterende element i wxArrayString::Remove" - -#: ../src/common/intl.cpp:521 ../src/common/intl.cpp:554 -#: src/common/intl.cpp:519 -#, c-format -msgid "string '%s' not found in domain '%s' for locale '%s'." -msgstr "streng '%s' blev ikke fundet i domæne '%s for locale '%s'." - -#: ../src/common/intl.cpp:526 ../src/common/intl.cpp:559 -#: src/common/intl.cpp:524 -#, c-format -msgid "string '%s' not found in locale '%s'." -msgstr "streng '%s' blev ikke fundet i locale '%s'." - -#: ../src/common/fileconf.cpp:1372 ../src/common/fileconf.cpp:1373 -#: src/common/CVS/Base/fileconf.cpp:1376 src/common/fileconf.cpp:1376 -#, c-format -msgid "unexpected \" at position %d in '%s'." -msgstr "uventet \" på position %s i '%s'." - -#: src/common/log.cpp:362 -msgid "unknown log level in wxLog::DoLog" -msgstr "ukendt log-niveau i wxLog::DoLog" - -#: src/common/log.cpp:559 -msgid "unknown log level in wxLogGui::DoLog" -msgstr "ukendt log-niveau i wxLogGui::DoLog" - -#: ../src/common/file.cpp:367 ../src/common/file.cpp:368 -#: src/common/file.cpp:362 -msgid "unknown seek origin" -msgstr "ukendt søgeorigo" - -#: ../src/common/docview.cpp:370 ../src/common/docview.cpp:389 -#: src/common/docview.cpp:337 -msgid "unnamed" -msgstr "unavngivet" - -#: ../src/common/docview.cpp:1055 ../src/common/docview.cpp:1082 -#: src/common/docview.cpp:1009 -#, c-format -msgid "unnamed%d" -msgstr "unavngivet%d" - -#: ../src/common/intl.cpp:306 ../src/common/intl.cpp:339 -#: src/common/intl.cpp:305 -#, c-format -msgid "using catalog '%s' from '%s'." -msgstr "bruger katalog '%s' fra '%s'." - -#: ../src/common/layout.cpp:1366 ../src/common/layout.cpp:1371 -#: src/common/layout.cpp:1326 -msgid "wxExpandSizer has no parent!" -msgstr "wxExpandSizer har ingen forældre!" - -#: ../src/common/prntbase.cpp:635 ../src/common/prntbase.cpp:645 -#: src/common/prntbase.cpp:632 -msgid "" -"wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to " -"let me know about the canvas!" -msgstr "" -"wxPrintPreviewBase::RenderPage: skal bruge wxPrintPreviewBase::SetCanvas " -"for at lade mig vide om kanvasen!" - -#: ../src/common/filefn.cpp:1134 src/common/filefn.cpp:1123 -msgid "wxWindows: error finding temporary file name.\n" -msgstr "wxWindows: fejl ved søgning efter midlertidig filnavn.\n" - -#: ../src/gtk/filedlg.cpp:79 -msgid "Please choose an existing file." -msgstr "Vælg venligst en eksisterende fil." - -#: ../src/generic/printps.cpp:173 ../src/generic/printps.cpp:177 -#: ../src/generic/printps.cpp:179 -msgid "Printing..." -msgstr "Udskriver..." - -#: ../src/generic/printps.cpp:207 ../src/generic/printps.cpp:211 -#: ../src/generic/printps.cpp:212 -#, c-format -msgid "Printing page %d..." -msgstr "Udskriver side %d..." - -#: ../src/generic/dcpsg.cpp:2188 ../src/generic/dcpsg.cpp:2189 -#: ../src/generic/dcpsg.cpp:2310 -msgid "A4 sheet, 210 x 297 mm" -msgstr "A4 papir, 210 x 297 mm" - -#: ../src/common/dynlib.cpp:187 ../src/common/dynlib.cpp:254 -#, c-format -msgid "Couldn't find symbol '%s' in a dynamic library" -msgstr "Kunne ikke finde symbolet '%s' i et dynamisk bibliotek" - -#: ../src/common/dynlib.cpp:215 ../src/common/dynlib.cpp:274 -#, c-format -msgid "Failed to load shared library '%s'" -msgstr "Kunne ikke load'e delt bibliotek '%s'" - -#: ../src/common/file.cpp:452 ../src/common/file.cpp:453 -#, c-format -msgid "" -"can't determine if the end of file is reached on descriptor " -"%d" -msgstr "" -"kan ikke afgøre, om slutning af filen er nået på deskriptor " -"%d" - -#: ../src/common/fileconf.cpp:610 ../src/common/fileconf.cpp:611 -#, c-format -msgid "Config entry name cannot start with '%c'." -msgstr "Konfigureringsindgangsnav kan ikke begynde med '%c'." - -#: ../src/common/filefn.cpp:1003 -#, c-format -msgid "Directory '%s' couldn't be created" -msgstr "Bibliotek '%s' kunne ikke oprettes" - -#: ../src/common/string.cpp:1687 ../src/common/string.cpp:1814 -msgid "bad index in wxArrayString::Insert" -msgstr "forkert index i wxArrayString::Insert" - -#: ../src/common/valtext.cpp:140 ../src/common/valtext.cpp:146 -#, c-format -msgid "'%s' is invalid" -msgstr "'%s' er ugyldigt" - -#: ../src/common/valtext.cpp:160 ../src/common/valtext.cpp:166 -#, c-format -msgid "'%s' should only contain ASCII characters." -msgstr "'%s' må kun indeholde ASCII karakterer." - -#: ../src/common/valtext.cpp:166 ../src/common/valtext.cpp:172 -#, c-format -msgid "'%s' should only contain alphabetic characters." -msgstr "'%s' må kun indeholde bogstaver." - -#: ../src/common/valtext.cpp:172 ../src/common/valtext.cpp:178 -#, c-format -msgid "'%s' should only contain alphabetic or numeric characters." -msgstr "'%s' må kun indeholde bogstaver eller tal." - -#: ../src/common/valtext.cpp:178 ../src/common/valtext.cpp:184 -#, c-format -msgid "'%s' should be numeric." -msgstr "'%s' skal være numerisk." - -#: ../src/common/imagjpeg.cpp:169 ../src/common/imagjpeg.cpp:174 -msgid "Couldn't load a JPEG image - probably file is corrupted." -msgstr "Kunne ikke load'e et JPEG billede - sandsynligvis er filen korrupt." - -#: ../src/common/imagjpeg.cpp:282 ../src/common/imagjpeg.cpp:287 -msgid "Couldn't save a JPEG image - probably file is corrupted." -msgstr "Kunne ikke gemme et JPEG billede - sandsynligvis er filen korrupt." - -#: ../src/motif/app.cpp:559 -#, c-format -msgid "wxWindows could not open display for '%s': exiting." -msgstr "wxWindows kunne ikke åbne diplay for '%s': stopper." - -#: ../src/msw/app.cpp:198 ../src/msw/app.cpp:200 -msgid "Could not initialise Rich Edit DLL" -msgstr "Kunne ikke initialisere 'Rich Edit DLL'" - -#: ../src/msw/app.cpp:653 ../src/msw/app.cpp:698 -msgid "Unrecoverable program error detected: the application will terminate." -msgstr "Uoprettelig programfejl opdaget: programmet bliver afbrudt." - -#: ../src/msw/app.cpp:655 ../src/msw/app.cpp:700 -msgid "Fatal Error" -msgstr "Fatal fejl" - -#: ../src/msw/app.cpp:1125 ../src/msw/app.cpp:1165 -msgid "Fatal error: exiting" -msgstr "Fatal fejl: stopper" - -#: ../src/msw/dialog.cpp:140 ../src/msw/dialog.cpp:142 -#: ../src/msw/dialog.cpp:145 -msgid "Failed to create dialog." -msgstr "Fejlede ved oprettelse af dialog." - -#: ../src/unix/threadpsx.cpp:296 ../src/unix/threadpsx.cpp:298 -#: ../src/unix/threadpsx.cpp:302 -msgid "Cannot start thread: error writing TLS" -msgstr "Kan ikke starte tråd: fejl ved skrivning af TLS" - -#: ../src/unix/threadpsx.cpp:477 ../src/unix/threadpsx.cpp:518 -#: ../src/unix/threadpsx.cpp:527 -msgid "Cannot retrieve thread scheduling policy." -msgstr "Kan ikke hente trådafviklingsalgoritme." - -#: ../src/unix/threadpsx.cpp:485 ../src/unix/threadpsx.cpp:526 -#: ../src/unix/threadpsx.cpp:535 -#, c-format -msgid "Cannot get priority range for scheduling policy %d." -msgstr "Kan ikke få prioritetsområde for afviklingsalgoritme %d." - -#: ../src/unix/threadpsx.cpp:768 ../src/unix/threadpsx.cpp:813 -#: ../src/unix/threadpsx.cpp:827 -msgid "Thread module initialization failed: failed to create thread key" -msgstr "Trådmodul initialisering fejlede: kunne ikke oprette trådnøgle" - -#: ../src/unix/utilsunx.cpp:211 ../src/unix/utilsunx.cpp:222 -msgid "Waiting for subprocess termination failed" -msgstr "Venten på under-process afslutning fejlede" - -#: ../src/unix/utilsunx.cpp:449 ../src/unix/utilsunx.cpp:460 -msgid "Cannot get the hostname" -msgstr "Kan ikke få host-navnet" - -#: ../src/unix/utilsunx.cpp:485 ../src/unix/utilsunx.cpp:496 -msgid "Cannot get the official hostname" -msgstr "Kan ikke få det officielle host-navn" - -#: ../src/unix/utilsunx.cpp:547 ../src/unix/utilsunx.cpp:555 -#: ../src/unix/utilsunx.cpp:558 ../src/unix/utilsunx.cpp:566 -msgid "Error " -msgstr "Fejl " - -#: ../src/msw/mdi.cpp:352 ../src/msw/mdi.cpp:355 -msgid "Failed to create MDI parent frame." -msgstr "Kunne ikke oprette MDI forældreramme." - -#: ../src/msw/window.cpp:1342 ../src/msw/window.cpp:2225 -msgid "" -"Can't find dummy dialog template!\n" -"Check resource include path for finding wx.rc." -msgstr "" -"Kan ikke finde dummy dialogskabelon!\n" -"Check resource include stien til at finde wx.rc." - -#: ../src/msw/window.cpp:1368 ../src/msw/window.cpp:2266 -#, c-format -msgid "" -"Can't create window of class %s!\n" -"Possible Windows 3.x compatibility problem?" -msgstr "" -"Kan ikke oprette vindue af klasse %s!\n" -"Muligvis Windows 3.x kompatibilitetsproblem?" - -#: ../src/generic/dcpsg.cpp:1403 -msgid "Cannot open file for PostScript printing!" -msgstr "Kan ikke åbne fil til PostScript udskrivning!" - -#: ../src/generic/helpext.cpp:90 -#, c-format -msgid "Cannot open URL '%s'" -msgstr "Kan ikke åbne URL '%s'" - -#: ../src/generic/extdlgg.cpp:126 -msgid "Forward" -msgstr "Fremad" - -#: ../src/generic/extdlgg.cpp:129 -msgid "Backward" -msgstr "Tilbage" - -#: ../src/generic/extdlgg.cpp:132 -msgid "Setup" -msgstr "Opsætning" - -#: ../src/generic/extdlgg.cpp:135 -msgid "More..." -msgstr "Mere..." - -#: ../src/generic/extdlgg.cpp:138 -msgid "Help" -msgstr "Hjælp" - -#: ../src/generic/tipdlg.cpp:137 -msgid "Tips not available, sorry!" -msgstr "Tips ikke tilgængelige, beklager!" - -#: ../src/generic/tipdlg.cpp:161 -msgid "Tip of the Day" -msgstr "Dagens tip" - -#: ../src/generic/tipdlg.cpp:172 -msgid "&Show tips at startup" -msgstr "&Vis tips ved opstart" - -#: ../src/generic/tipdlg.cpp:173 -msgid "&Next" -msgstr "&Næste" - -#: ../src/generic/tipdlg.cpp:175 -msgid "Did you know..." -msgstr "Vidste du..." - -#: ../src/msw/clipbrd.cpp:149 -#, c-format -msgid "Failed to allocate %dKb of memory for clipboard transfer." -msgstr "Kunne ikke allokere %dKb hukommelse til klippebordsoverførsel." - -#: ../src/msw/clipbrd.cpp:164 -#, c-format -msgid "Failed to set clipboard data in format %s" -msgstr "Kunne ikke skrive klippebordsdata i format %s" - -#: ../src/msw/menu.cpp:156 -msgid "ctrl" -msgstr "ctrl" - -#: ../src/msw/menu.cpp:158 -msgid "alt" -msgstr "alt" - -#: ../src/msw/menu.cpp:160 -msgid "shift" -msgstr "skift" diff --git a/locale/es.po b/locale/es.po new file mode 100644 index 0000000000..61bf6971da --- /dev/null +++ b/locale/es.po @@ -0,0 +1,3173 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: wxWindows 2.2\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2001-02-21 12:38+0100\n" +"Last-Translator: Luis Paúl Tomillo \n" +"Language-Team: wxWindows translators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(¿Tiene los permisos necesarios?)" + +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"no existe\n" +"¿Crear uno nuevo ahora?" + +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (error %ld: %s)" + +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr " Previsualización" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr "octetos" + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "Sobre #10, 4 1/8 x 9 1/2 in" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "Sobre #11, 4 1/2 x 10 3/8 in" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "Sobre #12, 4 3/4 x 11 in" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "Sobre #14, 5 x 11 1/2 in" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "Sobre #9, 3 7/8 x 8 7/8 in" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "#define %s debe ser un entero." + +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i de %i" + +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (o %s)" + +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s Error" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s Información" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s Aviso" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s no es un recurso con especificaciones de mapa de bits." + +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "% no tiene una especificación de fuente de icono." + +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s: mal formación de la sintaxis del fichero fuente." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&Cerrar" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&Detalles" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Finalizar" + +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&Log" + +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Siguiente >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&Siguiente >" + +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "&Siguiente Sugerencia" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "&Rehacer" + +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "&Rehacer " + +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "&Guardar..." + +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "%Mostrar las sugerencias en el comienzo" + +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "&Deshacer" + +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "&Deshacer " + +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +#, fuzzy +msgid "&Window" +msgstr "&Deshacer" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' tiene '..' adicional, se ignora." + +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' es inválido" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' no es un valor numérico correcto para el parámetro '%s'." + +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' no es un catálogo de mensajes válido." + +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "'%s' es probablemente un fichero binario." + +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s debe ser numérico." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' debe contener sólo caracteres ASCII." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' debe contener sólo caracteres de texto." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s debe contener sólo caracteres alfanuméricos." + +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(Ayuda)" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(favoritos)" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", se esperaba static, #include o #define\n" +"al analizar recurso." + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 in" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 in" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "Sobre 6 3/4, 3 5/8 x 6 1/2 in" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": ¡el fichero no existe!" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": conjunto de caracteres desconocido" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": codificación desconocida" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &Atrás" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr "" + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr "" + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" +"Aspecto normal
    (y subrayado. Aspecto cursiva. " +"Aspecto negrita. Aspecto negrita cursiva.
    tamaño de fuente -2
    tamaño de fuente -1
    tamaño de fuente +0
    tamaño de " +"fuente +1
    tamaño de fuente +2
    tamaño de fuente +3
    tamaño de fuente +4

    Aspecto fuente fija.
    negrita cursiva " +"negrita cursiva subrayado
    tamaño de " +"fuente -2
    tamaño de fuente -1
    tamaño de fuente +0
    tamaño de fuente +1
    tamaño de fuente +2
    tamaño de " +"fuente +3
    tamaño de fuente +4
    " + +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "Hoja A3, 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "Hoja A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "Hoja Pequeña A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "Hoja A5, 148 x 210 mm" + +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "Añadir página actual a favoritos" + +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "Añadir a colores personalizados" + +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "Añadiendo libro %s" + +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "Todo" + +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "Todos los ficheros (*)|*" + +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "Todos los ficheros (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "Llamando al ISP" + +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "" +"¿Añadir el log al fichero '%s' (elegir [No] sobreescribira el fichero)?" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "Arabic (ISO-8859-6)" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "Sobre B4, 250 x 353 mm" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "Hoja B4, 250 x 354 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "Sobre B5, 176 x 250 mm" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "Hoja B5, 182 x 257 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "Sobre B6, 176 x 125 mm" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: Aun no pueden tratarse ficheros de 4bpp." + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: No pudo reservarse memoria." + +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: No se pudo guardar imagen no válida." + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: No se pudieron escribir datos." + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: No se pudo escribir la cabecera del fichero." + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: La codificación no se corresponde con la profundidad de color." + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: Altura de imagen > 32767 pixels por fichero." + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP: Anchura de imagen > 32767 pixels por fichero." + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: Profundidad de color desconocida en fichero." + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP: Codificación desconocida en fichero." + +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "Atrás" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Atrás" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Baltic (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Baltic (old) (ISO-8859-4)" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "Fuente de especificación de mapa de bits %s no encontrada." + +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "Gruesa" + +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "Margen inferior (mm):" + +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "Hoja C, 17 x 22 in" + +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "&Limpiar" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "Sobre C3, 324 x 458 mm" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "Sobre C4, 229 x 324 mm" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "Sobre C5, 162 x 229 mm" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "Sobre C6, 114 x 162 mm" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "Sobre C65, 114 x 229 mm" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "" + +#: ../src/msw/thread.cpp:124 +#, fuzzy +msgid "Can not create mutex" +msgstr "No se puede obtener el nombre de la máquina (hostname)" + +#: ../src/mac/thread.cpp:92 +#, fuzzy +msgid "Can not create mutex." +msgstr "No se puede imprimir una página vacía." + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "No se pueden enumerar los ficheros en directorio '%s'" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "" + +#: ../src/msw/thread.cpp:433 +#, fuzzy +msgid "Can not start thread: error writing TLS." +msgstr "No se puede empezar el hilo de ejecución: error escribiendo TLS" + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "" + +#: ../src/msw/thread.cpp:871 +#, fuzzy +msgid "Can not wait for thread termination" +msgstr "No se puede empezar el hilo de ejecución: error escribiendo TLS" + +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "No se puede deshacer " + +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "" +"No se puede comprobar formato de imagen de fichero '%s': el fichero no " +"existe." + +#: ../src/msw/registry.cpp:418 +#, fuzzy, c-format +msgid "Can't close registry key '%s'" +msgstr "no se puede cerrar el fichero '%s'" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "" + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" + +#: ../src/msw/registry.cpp:399 +#, fuzzy, c-format +msgid "Can't create registry key '%s'" +msgstr "no se puede crear el fichero '%s'" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "" + +#: ../src/msw/thread.cpp:519 +#, fuzzy +msgid "Can't create thread" +msgstr "no se puede crear el fichero '%s'" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" + +#: ../src/msw/registry.cpp:658 +#, fuzzy, c-format +msgid "Can't delete key '%s'" +msgstr "no se puede crear el fichero '%s'" + +#: ../src/msw/iniconf.cpp:476 +#, fuzzy, c-format +msgid "Can't delete the INI file '%s'" +msgstr "no se puede crear el fichero '%s'" + +#: ../src/msw/registry.cpp:683 +#, fuzzy, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "no puede borrarse el fichero de configuración de usuario '%s'" + +#: ../src/msw/registry.cpp:694 +#, fuzzy, c-format +msgid "Can't delete value of key '%s'" +msgstr "no puede borrarse el fichero de configuración de usuario '%s'" + +#: ../src/msw/registry.cpp:1020 +#, fuzzy, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "No se pueden enumerar los ficheros en directorio '%s'" + +#: ../src/msw/registry.cpp:975 +#, fuzzy, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "No se pueden enumerar los ficheros en directorio '%s'" + +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "No se puede encontrar la posición actual en el fichero '%s'" + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "" +"No se puede encontrar el objeto de serialización '%s' para el objeto '%s'." + +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "No se pudo cargar imagen de fichero '%s': el fichero no existe." + +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "No se puede cargar librería dinámica wxSerial." + +#: ../src/msw/dib.cpp:434 +#, fuzzy, c-format +msgid "Can't open file '%s'" +msgstr "no se puede abrir el fichero '%s'" + +#: ../src/msw/registry.cpp:374 +#, fuzzy, c-format +msgid "Can't open registry key '%s'" +msgstr "no se puede abrir el fichero '%s'" + +#: ../src/msw/registry.cpp:899 +#, fuzzy, c-format +msgid "Can't read value of '%s'" +msgstr "no se puede borrar fichero '%s'" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, fuzzy, c-format +msgid "Can't read value of key '%s'" +msgstr "no se puede crear el fichero '%s'" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "No se pueden guardar los contenidos del log a un fichero." + +#: ../src/msw/thread.cpp:485 +#, fuzzy +msgid "Can't set thread priority" +msgstr "Error al establecer la prioridad del hilo de ejecución %d." + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, fuzzy, c-format +msgid "Can't set value of '%s'" +msgstr "no se puede cerrar el fichero '%s'" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "Cancelar" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "" +"No se puede obtener un rango de prioridades para la política de " +"planificación %d." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "No se puede obtener el nombre de la máquina (hostname)" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "No se puede obtener el nombre oficial de la máquina (hostname)" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "" + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "" + +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "No se puede abrir el documento HTML: %s" + +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "No se puede abrir el libro de ayuda HTML: %s" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "No se puede abrir la URL '%s'" + +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "No se puede abrir los contenidos del fichero: %s" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "¡No se puede abrir el fichero para impresión PostScript!" + +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "No se puede abrir el fichero índice: %s" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "No se puede imprimir una página vacía." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "" +"No se puede recuperar la política de planificación de hilos de ejecución." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "No se puede empezar el hilo de ejecución: error escribiendo TLS" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "Caso Sensitivo" + +#: ../src/common/fontmap.cpp:113 +msgid "Celtic (ISO-8859-14)" +msgstr "Celtic (ISO-8859-14)" + +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Central European (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "Elegir fuente" + +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Borrar los contenidos del log" + +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "Cerrar" + +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "Cerrar esta ventana" + +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Un nombre de entrada de configuracón no puede empezar por '%c'." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "Confirmar" + +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Conectando..." + +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Conexión a wxHelp fuera de tiempo en %d segundos" + +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Contenidos" + +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "Copias:" + +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "No puede encontrarse el fichero de inclusión de recursos %s." + +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "No se puede encontrar pestaña para id" + +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "" + +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"No se puede resolver la clase de control o el id '%s'. Usar un entero " +"distinto de cero\n" +" o proporcionar el #define (ver consejos del manual)" + +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"No se puede resolver el id de menu '%s'. Usar un entero distinto de cero\n" +" o proporcionar el #define (ver consejos del manual)" + +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "No puede iniciarse la previsualización del documento." + +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "No se puede iniciar la impresión." + +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "No puede transferir datos a la ventana" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "" + +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "" + +#: ../src/msw/timer.cpp:96 +#, fuzzy +msgid "Couldn't create a timer" +msgstr "PCX: no pudo reservarse memoria" + +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "No se pudo encontrar el símbolo '%s' en la librería dinámica" + +#: ../src/msw/thread.cpp:578 +#, fuzzy +msgid "Couldn't get the current thread pointer" +msgstr "No se pudo escribir la cabecera del bitmap." + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "" + +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "" +"No se pudo cargar imagen PNG - el fichero está corrupto o no hay suficiente " +"memoria." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "" + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "" + +#: ../src/msw/thread.cpp:958 +#, fuzzy +msgid "Couldn't terminate thread" +msgstr "Error al terminar un hilo de ejecución." + +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "Crear directorio" + +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "Crear nuevo directorio" + +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "Directorio actual:" + +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "Celtic (ISO-8859-14)" + +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "Hoja D, 22 x 34 in" + +#: ../src/msw/dde.cpp:597 +#, fuzzy +msgid "DDE poke request failed" +msgstr "Error en la creación de la tubería" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "Sobre DL, 110 x 220 mm" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "Fecha" + +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "Decorative" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "¿Sabías que...?" + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "No pudo crearse directorio '%s'" + +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "El directorio no existe" + +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"Mostrar todos los elementos del índice que contengan la subcadena dada. La " +"búsqueda es Insensitiva." + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "Mostrar el diálogo de opciones" + +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "¿Desea guardar los cambios hechos al documento %s?" + +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Hecho" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Hecho." + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "Hoja E, 34 x 44 in" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "Tiempo transcurrido : " + +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "Documentos encontrados" + +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"Falló la expansión de las variables de entorno: falta '%c' en la posición %d " +"en '%s'." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "Error" + +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Error " + +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "Error creando directorio" + +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "Error: " + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Esperanto (ISO-8859-3)" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Tiempo estimado : " + +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "Etcetera" + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "" + +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 in" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "Se esperaba '*' al analizar el recurso." + +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "Se esperaba '=' al analizar el recurso." + +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "Se esperaba 'char' al analizar el recurso." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "" + +#: ../src/msw/clipbrd.cpp:122 +#, fuzzy +msgid "Failed to close the clipboard." +msgstr "Error al guardar bitmap" + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "" + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "" + +#: ../src/msw/registry.cpp:594 +#, fuzzy, c-format +msgid "Failed to copy registry value '%s'" +msgstr "No se pudo abrir la librería dinámica '%s'" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "" + +#: ../src/msw/dde.cpp:934 +#, fuzzy +msgid "Failed to create DDE string" +msgstr "Error al crear el directorio" + +#: ../src/msw/mdi.cpp:428 +#, fuzzy +msgid "Failed to create MDI parent frame." +msgstr "Error al crear el directorio" + +#: ../src/msw/statbr95.cpp:149 +#, fuzzy +msgid "Failed to create a status bar." +msgstr "Error al terminar un hilo de ejecución." + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" + +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "Error al crear el directorio" + +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "Error al mostrar el documento HTML con codificación %s" + +#: ../src/msw/clipbrd.cpp:134 +#, fuzzy +msgid "Failed to empty the clipboard." +msgstr "Error al establecer la prioridad del hilo de ejecución %d." + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "Error al ejecutar '%s'\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Error al buscar el recurso XPBM %s. \n" +"¿Se olvidó de usar xwResourceLoadBitmapData?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"Error al buscar fuente XBM %s. \n" +"¿Se olvidó de usar wxResourceLoadIconData?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Error al buscar el fuente XPM %s. \n" +"¿Se olvidó de usar wxResourceLoadBitmapData?" + +#: ../src/msw/dialup.cpp:699 +#, fuzzy, c-format +msgid "Failed to get ISP names: %s" +msgstr "Error al ejecutar '%s'\n" + +#: ../src/msw/clipbrd.cpp:623 +#, fuzzy +msgid "Failed to get data from the clipboard" +msgstr "Error al obtener el sistema horario local" + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "Error al obtener el sistema de tiempo UTC" + +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "Error al obtener el sistema horario local" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" +"Error al sincronizar con un hilo de ejecución, pérdida potencial de memoría " +"detectada - por favor reinicie el programa" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "No se pudo abrir la librería dinámica '%s'" + +#: ../src/msw/clipbrd.cpp:102 +#, fuzzy +msgid "Failed to open the clipboard." +msgstr "Error al guardar bitmap" + +#: ../src/msw/clipbrd.cpp:539 +#, fuzzy +msgid "Failed to put data on the clipboard" +msgstr "Error al terminar un hilo de ejecución." + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "Error en la redirección de la entrada/salida del proceso hijo" + +#: ../src/msw/dde.cpp:285 +#, fuzzy, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Error al ejecutar '%s'\n" + +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Error al recordar la codificación para el conjunto de caracteres '%s'." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "" + +#: ../src/msw/registry.cpp:540 +#, fuzzy, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "Error al recordar la codificación para el conjunto de caracteres '%s'." + +#: ../src/msw/clipbrd.cpp:428 +#, fuzzy +msgid "Failed to retrieve data from the clipboard." +msgstr "Error al terminar un hilo de ejecución." + +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "" + +#: ../src/msw/clipbrd.cpp:300 +#, fuzzy +msgid "Failed to set clipboard data." +msgstr "Error al guardar bitmap" + +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "Error al establecer la prioridad del hilo de ejecución %d." + +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "¡Error al almacenar la imagen '%s' en VFS de memoria!" + +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "Error al terminar un hilo de ejecución." + +#: ../src/msw/dde.cpp:635 +#, fuzzy +msgid "Failed to terminate the advise loop with DDE server" +msgstr "Error al terminar un hilo de ejecución." + +#: ../src/msw/dialup.cpp:933 +#, fuzzy, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Error al terminar un hilo de ejecución." + +#: ../src/msw/dde.cpp:301 +#, fuzzy, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Error al vaciar la memoria del fichero '%s'" + +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "Error fatal" + +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "Error fatal: " + +#: ../src/msw/app.cpp:1274 +#, fuzzy +msgid "Fatal error: exiting" +msgstr "Error fatal: " + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "El fichero '%s' ya existe, ¿realmente quieres sobreescribirlo?" + +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "El fichero no pudo ser cargado." + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Error de fichero" + +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "Ya existe un fichero con el mismo nombre." + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "" + +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "Buscar" + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "Fuente fija:" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 in" + +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "Fuente" + +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "Tamaño de fuente:" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "Error en bifurcación de proceso (fork)" + +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Adelante" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "Encontrado " + +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "Encontrada(s) %i coincidencias" + +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "De:" + +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: flujo de datos parece haberse truncado." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: error en formato de imagen GIF." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: memoria insuficiente." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "¡¡GIF: error desconocido!!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "German Legal Fanfold, 8 1/2 x 13 in" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "German Std Fanfold, 8 1/2 x 12 in" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "Atrás" + +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Adelante" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "Subir un nivel en la jerarquía del documento" + +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "Ir al directorio principal" + +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "Ir al directorio superior" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Greek (ISO-8859-7)" + +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "El anclaje HTML %s no existe." + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" +"Ficheros HTML (*.htm)|*.htm|Ficheros HTML (*.html)|*.html|Libros de ayuda (*." +"htb)|*.htb|Libros de ayuda (*.zip)|*.zip|Proyecto de ayuda HTML (*.hhp)|*." +"hhp|Todos los ficheros (*.*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Hebrew (ISO-8859-8)" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Ayuda" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "Opciones del Navegador de la Ayuda" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "Indice de la Ayuda" + +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "Ayuda de Impresión" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "Ayuda: %s" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "Especificación de recursos de iconos %s no encontrada." + +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "Sintaxis incorrecta del fichero fuente." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "Nombre de directorio ilegal" + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "Especificación de fichero Ilegal" + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "Imposible obtener la entrada del proceso hijo" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "Versión incorrecta del libro de ayuda HTML" + +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Índice" + +#: ../src/common/fontmap.cpp:111 +msgid "Indian (ISO-8859-12)" +msgstr "Indian (ISO-8859-12)" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "Índice inválido de fichero TIFF." + +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "Itálica" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Sobre Italy, 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG: No se pudo cargar - el fichero está probablemente corrupto." + +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG: No pudo guardarse imagen." + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "Horizontal" + +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Libro Mayor, 17 x 11 in" + +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "Margen Izquierdo (mm):" + +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal, 8 1/2 x 14 in" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Sobre Pequeño, 8 1/2 x 11 in" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Sobre, 8 1/2 x 11 in" + +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Ligera" + +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "Cargar el fichero %s" + +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "Cargando :" + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "" +"Cargar un fichero ascii PNM de escala de grises aún no está implementado." + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "" +"Cargar un fichero de imagen PNM 'raw' de escala de grises aún no está " +"implementado." + +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "Log guardado a el fichero '%s'." + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "Ventana hija MDI" + +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "Fichero Mailcap %s, linea %d: entrada incompleta ignorada." + +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "¡VFS de memoria ya contiene el fichero '%s'!" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "" +"Tipos Mime del fichero %s, linea %d: cadena entrecomillada no terminada." + +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "Modern" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Sobre Monarch, 3 7/8 x 7 1/2 in" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Más..." + +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "Dispositivos Montados" + +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Mi Disco Duro" + +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "Mi Directorio" + +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Nombre" + +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "Nuevo..." + +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "Nuevo Nombre" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "Página siguiente" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "No" + +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "¡No está disponible el soporte XBM!" + +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "¡No está disponible el soporte XPM!" + +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "¡No está disponible el soporte para iconos XPM!" + +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "No se han encontrado documentos." + +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"La codificación '%s' es desconocida.\n" +"¿Le gustaría seleccionar una fuente para usarse con esta codificación\n" +"(de otra forma el texto con esta codificación no se mostrará correctamente)?" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "No se ha encontrado ningún manipulador para el tipo de imagen." + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "No hay definido ningún manipulador de imagen para tipo %d." + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "No hay definido ningún manipulador de imagen para tipo %s." + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "Todavía no se ha encontrado una página con coincidencias" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Nordic (ISO-8859-10)" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normal" + +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Fuente normal:" + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Nota, 8 1/2 x 11 in" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "Aceptar" + +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "Abrir documento HTML" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "Operación no permitida" + +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "El parámetro '%s' necesita un valor, falta '='." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "El parámetro '%s' necesita un valor." + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "El parámetro '%s': '%s' no puede convertirse a fecha." + +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Opciones" + +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "Orientación" + +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: no pudo reservarse memoria" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: formato de imagen no soportado" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: imagen inválida" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: esto no es un fichero PCX." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "¡¡ PCX: error desconocido !!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: número de versión demasiado antigua" + +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PNM: No se pudo reservar memoria." + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM: Formato de fichero no reconocido." + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM: El fichero parece estar truncado." + +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Página %d" + +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Página %d de %d" + +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Configurar Página" + +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Páginas" + +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Tamaño del Papel" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Tamaño del papel" + +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "Permisos" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "Error en la creación de la tubería" + +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "Por favor elija una fuente válida." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Por favor elige un fichero existente" + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "" + +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "Por favor, espere..." + +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "Vertical" + +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "PostScript" + +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "Fichero PostScript" + +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "PosScript:" + +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "Solo Previsualización" + +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Previsualización:" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "Página anterior" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "Imprimir" + +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "Previsualización de la impresión" + +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "Error en previsualización de impresión" + +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "Rango de Impresión" + +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "Configuración de Impresión" + +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "Impresión en color" + +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "Cola de Impresión" + +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "Imprimir esta página" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "Imprimir a Fichero" + +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "Imprimir..." + +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "Comando de Impresora:" + +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "Opciones de Impresora:" + +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "Propiedades de la Impresora." + +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "Comando de impresión: " + +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "Opciones de impresión" + +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "Opciones de impresora:" + +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "Impresora..." + +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "Imprimiendo" + +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "Error de impresión" + +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Imprimiendo página %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Imprimiendo..." + +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "Programa abortado." + +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Quarto, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "Pregunta" + +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "Error de lectura en el fichero '%s'" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "" + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "" + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "" + +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Documentos significantivos:" + +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Tiempo restante : " + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "Eliminar la página actual de favoritos" + +#: ../src/msw/filedlg.cpp:445 +#, fuzzy, c-format +msgid "Replace file '%s'?" +msgstr "Error de lectura en el fichero '%s'" + +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Margen derecho (mm):" + +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "Roman" + +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "Guardar el fichero %s" + +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Guardar como" + +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "Guardar los contenidos del log a un fichero" + +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "Script" + +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "Buscar" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"Buscar contenidos en libro(s) de ayuda para todas las ocurrencias del texto " +"escrito" + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "Buscar en todos los libros" + +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "Buscando..." + +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "Secciones" + +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "Error de búsqueda en el fichero '%s'" + +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Seleccionar una plantilla de documento" + +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Seleccionar una vista de documento" + +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Seleccionar un fichero" + +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "Enviar a Impresora" + +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "Se esperaba separador después de opción '%s'." + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Configuración" + +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "Configuración..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "" + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "Mostrar todo" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "Mostrar todos los datos en el índice" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "Mostrar ficheros ocultos" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "Mostrar/Ocultar panel de navegación" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "Tamaño" + +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Cursiva" + +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "No pudo abrirse este fichero para guardar." + +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "No pudo abrirse este fichero." + +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "No pudo guardarse este fichero." + +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "Memoria insuficiente para crear previsualización." + +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Statement, 5 1/2 x 8 1/2 in" + +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "Estado: " + +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "Swiss" + +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: No se pudo reservar memoria." + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: Error al cargar imagen." + +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: Error al leer imagen." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: Error al guardar imagen." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: Error al escribir imagen." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloide, 11 x 17 in" + +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "Teletype" + +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "Plantillas" + +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "Temporalmente" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Thai (ISO-8859-11)" + +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "El Ordenador" + +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"El conjunto de caracteres '%s' es desconocido. Puede\n" +"seleccionar otro conjunto para reemplazarlo o elegir\n" +"[Cancelar] si no puede ser reemplazado" + +#: ../src/msw/ole/dataobj.cpp:169 +#, fuzzy, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "" +"No se puede comprobar formato de imagen de fichero '%s': el fichero no " +"existe." + +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "El directorio" + +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"El fichero '%s' no existe y no pudo abrirse.\n" +"También ha sido borrado de la lista MRU de ficheros." + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "El parámetro '%s' no fue especificado." + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "El texto no pudo ser guardado." + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "El valor para el parámetro '%s' debe especificarse." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" + +#: ../src/msw/thread.cpp:1083 +#, fuzzy +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"Error en la inicialización del módulo de hilos de ejecución: error al crear " +"clave de hilo" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "" +"Error en la inicialización del módulo de hilos de ejecución: error al crear " +"clave de hilo" + +#: ../src/msw/thread.cpp:1071 +#, fuzzy +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"Error en la inicialización del módulo de hilos de ejecución: error al crear " +"clave de hilo" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "La configuración de la prioridad del hilo de ejecución es ignorada." + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Hora" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Sugerencia del Día" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Sugerencias no disponibles,¡qué pena!" + +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "Hasta:" + +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "Margen superior (mm):" + +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "" +"¡Intentando borrar el fichero '%s' de VFS de memoria, pero no está cargado!" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "" +"Intentando resolver un nombre de máquina (hostname) nulo: imposible de " +"resolver" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "Turkish (ISO-8859-9)" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "US Std Fanfold, 14 7/8 x 11 in" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "Incapaz de abrir el docuemento HTML pedido: %s" + +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Subrayada" + +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "Fin de fichero inesperado al analizar el recurso." + +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "Parámetro '%s' inesperado" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "Codificación desconocida (%d)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "Campo desconocido en el fichero %s, linea %d: '%s'." + +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "El parámetro '%s' de entero largo es desconocido" + +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "El parámetro '%s' es desconocido" + +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "Paréntesis '(' no emparejado en una entrada para tipo mime %s." + +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "Mandato sin nombre" + +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "Estilo desconocido %s al analizar el recurso." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "" + +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Uso: %s" + +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Usuario" + +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "Usuario Local" + +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "Conflicto de validación." + +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "Variables" + +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "Ver ficheros en detalle" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "Ver ficheros como lista" + +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "Vistas" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Error en la espera de la terminación del subproceso" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "Aviso" + +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "Aviso: " + +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "Atención: intentando eliminar una etiqueta HTML de una pila vacía " + +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "Western European (ISO-8859-1/Latin 1)" + +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "Western European with Euro (ISO-8859-15/Latin 0)" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "Sólo palabras completas" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "" + +#: ../src/msw/mdi.cpp:1318 +#, fuzzy +msgid "Window" +msgstr "Buscar" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Windows Arabic (CP 1256)" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Windows Baltic (CP 1257)" + +#: ../src/common/fontmap.cpp:116 +msgid "Windows Central European (CP 1250)" +msgstr "Windows Central European (CP 1250)" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Windows Cyrillic (CP 1251)" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Windows Greek (CP 1253)" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Windows Hebrew (CP 1255)" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Windows Turkish (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +msgid "Windows Western European (CP 1252)" +msgstr "Windows Western European (CP 1252)" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "Error de escritura en el fichero '%s'" + +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "Escala X" + +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "Traslación X" + +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "Escala Y" + +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "Traslación Y" + +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "Sí" + +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "No puede añadir un nuevo directorio a esta sección." + +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[VACÍO]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "" + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "" + +#: ../src/msw/dde.cpp:1000 +#, fuzzy +msgid "a memory allocation failed." +msgstr "Error en la creación de la tubería" + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" + +#: ../src/msw/dde.cpp:1006 +#, fuzzy +msgid "a transaction failed." +msgstr "Error en la creación de la tubería" + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "" + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" + +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "intento de cambiar clave inmutable '%s', ignorado." + +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "no se puede cerrar el fichero '%s'" + +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "no se puede cerrar el descriptor de fichero %d" + +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "no se pueden hacer efectivos los cambios en fichero '%s'" + +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "no se puede crear el fichero '%s'" + +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "no puede borrarse el fichero de configuración de usuario '%s'" + +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "" +"no se puede determinar si el final del fichero con descriptor %d se ha " +"alcanzado" + +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "no se puede obtener el tamaño del fichero con descriptor %d" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "" + +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "no se puede vaciar el descriptor de fichero %d" + +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "" +"no se puede alcanzar posición de búsqueda en el descriptor de fichero %d" + +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "no se puede cargar ninguna fuente, abortando" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "no se puede abrir el fichero '%s'" + +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "no se puede abrir el fichero de configuración global '%s'." + +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "no se puede abrir el fichero de configuración de usuario '%s'." + +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "no puede abrirse el fichero de configuración de usuario" + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "no se puede leer desde el descriptor de fichero %d" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "no se puede borrar fichero '%s'" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "no se puede borrar el fichero temporal '%s'" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "no se puede buscar en el descriptor de fichero %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "no se puede guardar el fichero '%s' al disco." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "no se puede escribir en el descriptor de fichero %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "no puede escribirse el fichero de configuración de usuario" + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "fichero de catálogo para dominio '%s' no encontrado." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "fecha" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "décimo octavo" + +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "octavo" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "undécimo" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "la entrada '%s' aparece más de una vez en el grupo '%s'" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "" + +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "Error al vaciar la memoria del fichero '%s'" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "décimo quinto" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "quinto" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "fichero '%s', línea %d: '%s' ignorado después de cabecera de grupo." + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "fichero '%s', línea %d: '=' inesperado." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "" +"fichero '%s', línea %d: clave '%s' fue encontrada por primera vez en la " +"línea %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "fichero '%s', línea %d: valor ignorado para clave inmutable '%s'." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "fichero '%s': carácter inesperado %c en línea %d." + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "primero" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "décimo cuarto" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "cuarto" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "error en gmtime()" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "valor devuelto por eof() es inválido" + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "valor de retorno de caja de mensajes inválido" + +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "grande" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "locale '%s' no pudo establecerse." + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "buscando catálogo '%s' en directorio '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "medio" + +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "medianoche" + +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "error en mktime()" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "décimo noveno" + +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "noveno" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "" + +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "sin nombre" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "mediodía" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "núm" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "" + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "segundo" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "décimo séptimo" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "séptimo" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "décimo sexto" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "sexto" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "pequeño" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "cad" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "décimo" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "" + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "tercero" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "décimo tercero" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "hoy" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "mañana" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "duodécimo" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "vigésimo" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "\" inesperado en la posición %d en '%s'." + +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "desconocido" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "" + +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "origen de búsqueda desconocido" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "origen de búsqueda desconocido" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "desconocido-%d" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "sinnombre" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "sin nombre%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "usando catálogo '%s' de '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "muy grande" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "muy pequeño" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "Error en wxGetTimeOfDay" + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: firma inválida en ReadMsg" + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: ¡Evento desconocido!." + +#: ../src/motif/app.cpp:591 +#, fuzzy, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "No pudo abrirse este fichero para guardar." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: error al encontrar nombre del fichero temporal.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "ayer" + +#~ msgid "empty file name in wxFindFileInPath" +#~ msgstr "nombre de fichero vacío en wxFindFileInPath" + +#~ msgid "string '%s' not found in domain '%s' for locale '%s'." +#~ msgstr "cadena '%s' no encontrada en dominio '%s' para locale '%s'." + +#~ msgid "string '%s' not found in locale '%s'." +#~ msgstr "cadena '%s' no encontrada en locale '%s'." + +#~ msgid "Information" +#~ msgstr "Información" + +#~ msgid "Print Error" +#~ msgstr "Error de Impresión" + +#~ msgid "Found %i correspondencias" +#~ msgstr "Encontradas %i correspondencias" + +#~ msgid "" +#~ "Normal face
    (and underlined. Italic face.Bold face. Bold italic face.
    font " +#~ "size-2
    font size -1
    font " +#~ "size+0
    font size +1
    font " +#~ "size+2
    font size +3
    font " +#~ "size+4

    Fixed size face.
    bold italicbold italic underlined
    font size-" +#~ "2
    font size -1
    font size" +#~ "+0
    font size +1
    font size" +#~ "+2
    font size +3
    font size" +#~ "+4
    " +#~ msgstr "" +#~ "Cuerpo Normal
    (y subrayado. Cuerpo cursiva.Cuerpo Negrita. Cuerpo Negrita Cursiva.
    Tamaño de fuente-2
    Tamaño de fuente -1
    Tamaño de fuente+0
    Tamaño " +#~ "de fuente +1
    Tamaño de fuente+2
    Tamaño de fuente +3
    Tamaño de fuente+4

    Cuerpo de tamaño fijo
    negrita cursivanegrita cursiva subrayado
    Tamaño " +#~ "de fuente-2
    Tamaño de fuente -1
    Tamaño de fuente+0
    Tamaño de fuente +1
    Tamaño de fuente+2
    Tamaño " +#~ "de fuente +3
    Tamaño de fuente+4
    " + +#~ msgid "" +#~ "There was a problem previewing.\n" +#~ "Perhaps your current printer is not set correctly?" +#~ msgstr "" +#~ "Ha ocurrido un problema en la previsualización.\n" +#~ "¿Quizás su impresora actual no está configurada correctamente?" + +#~ msgid "Previewing" +#~ msgstr "Previsualizando" + +#~ msgid "" +#~ "There was a problem printing.\n" +#~ "Perhaps your current printer is not set correctly?" +#~ msgstr "" +#~ "Ha ocurrido un problema imprimiendo.\n" +#~ "¿Quizás su impresora actual no está configurada correctamente?" + +#~ msgid "West European (ISO-8859-1/Latin 1)" +#~ msgstr "West European (ISO-8859-1/Latin 1)" + +#~ msgid "Baltic (ISO-8859-4)" +#~ msgstr "Baltic (ISO-8859-4)" + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Cyrillic (Latin 5)" + +#~ msgid "Baltic II (ISO-8859-10)" +#~ msgstr "Baltic II (ISO-8859-10)" + +#~ msgid "ISO-8859-12" +#~ msgstr "ISO-8859-12" + +#~ msgid "ISO-8859-13" +#~ msgstr "ISO-8859-13" + +#~ msgid "ISO-8859-14" +#~ msgstr "ISO-8859-14" + +#~ msgid "West European new (ISO-8859-15/Latin 0)" +#~ msgstr "West European new (ISO-8859-15/Latin 0)" + +#~ msgid "Windows Latin 2 (CP 1250)" +#~ msgstr "Windows Latin 2 (CP 1250)" + +#~ msgid "Windows Latin 1 (CP 1252)" +#~ msgstr "Windows Latin 1 (CP 1252)" + +#~ msgid "Failed to allocate %u bytes of memory." +#~ msgstr "Error al reservar %u octetos de memoria." + +#~ msgid "Couldn't write the BMP file header." +#~ msgstr "No se pudo escribir la cabecera de fichero BMP." + +#~ msgid "Couldn't write bitmap data." +#~ msgstr "No se pudieron escribir datos del bitmap." diff --git a/locale/fi.po b/locale/fi.po index 9ca8d1449a..c73599e37e 100644 --- a/locale/fi.po +++ b/locale/fi.po @@ -1,24 +1,21 @@ msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-07-06 13:24+0100\n" +"Project-Id-Version: wxWindows-2.2.1\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" "PO-Revision-Date: 1999-07-08 14:04+0200\n" "Last-Translator: Lauri Jutila \n" -"Language-Team: LANGUAGE \n" +"Language-Team: wxWindows translators \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" -#: ../src/generic/dirdlgg.cpp:461 ../src/generic/dirdlgg.cpp:465 -#: ../src/generic/dirdlgg.cpp:489 ../src/generic/dirdlgg.cpp:493 -#: src/generic/dirdlgg.cpp:461 src/generic/dirdlgg.cpp:489 +#: ../src/generic/dirdlgg.cpp:551 msgid "" "\n" "(Do you have the required permissions?)" msgstr "" -#: ../src/generic/dirdlgg.cpp:449 ../src/generic/dirdlgg.cpp:453 -#: src/generic/dirdlgg.cpp:449 +#: ../src/generic/dirdlgg.cpp:538 msgid "" "\n" "does not exist\n" @@ -28,380 +25,832 @@ msgstr "" "ei ole olemassa.\n" "Luodaanko?" -#: ../src/common/log.cpp:223 ../src/common/log.cpp:227 src/common/log.cpp:209 +#: ../src/common/log.cpp:242 #, c-format msgid " (error %ld: %s)" msgstr " (virhe %ld: %s)" -#: ../src/common/date.cpp:385 ../src/common/date.cpp:388 -#: ../src/common/date.cpp:400 ../src/common/date.cpp:403 -#: src/common/date.cpp:384 src/common/date.cpp:399 -msgid " B.C." -msgstr " B.C." +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr "" + +#: ../src/html/htmprint.cpp:494 +#, fuzzy +msgid " Preview" +msgstr "Tulostuksen esikatselu" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr "" + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "" #: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 -#: ../src/common/resource.cpp:1630 ../src/common/resource.cpp:1631 -#: ../src/common/resource.cpp:2704 ../src/common/resource.cpp:2708 -#: src/common/resourc2.cpp:265 src/common/resourc2.cpp:1334 -#: src/common/resource.cpp:1613 src/common/resource.cpp:2682 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 #, c-format msgid "#define %s must be an integer." msgstr "#define %s pitää olla kokonaisluku" -#: src/common/valtext.cpp:143 src/common/valtext.cpp:154 +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 #, c-format -msgid "%s is invalid." -msgstr "%s on virheellinen." +msgid "%i of %i" +msgstr "" -#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2075 -#: ../src/common/resource.cpp:2079 src/common/resourc2.cpp:709 -#: src/common/resource.cpp:2057 +#: ../src/common/cmdline.cpp:735 +#, fuzzy, c-format +msgid "%s (or %s)" +msgstr " (virhe %ld: %s)" + +#: ../src/generic/logg.cpp:243 +#, fuzzy, c-format +msgid "%s Error" +msgstr "Virhe" + +#: ../src/generic/logg.cpp:251 +#, fuzzy, c-format +msgid "%s Information" +msgstr "Informaatio" + +#: ../src/generic/logg.cpp:247 +#, fuzzy, c-format +msgid "%s Warning" +msgstr "Varoitus" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 #, c-format msgid "%s not a bitmap resource specification." msgstr "%s " -#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2230 -#: ../src/common/resource.cpp:2234 src/common/resourc2.cpp:864 -#: src/common/resource.cpp:2212 +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 #, c-format msgid "%s not an icon resource specification." msgstr "" -#: src/common/valtext.cpp:188 -#, c-format -msgid "%s should be numeric." -msgstr "%s pitäisi olla numeerinen." - -#: src/common/valtext.cpp:163 -#, c-format -msgid "%s should only contain ASCII characters." -msgstr "%s saisi sisältää vain ASCII-merkkejä." - -#: src/common/valtext.cpp:171 -#, c-format -msgid "%s should only contain alphabetic characters." -msgstr "%s saisi sisältää vain aakkosia." - -#: src/common/valtext.cpp:179 -#, c-format -msgid "%s should only contain alphabetic or numeric characters." -msgstr "%s saisi sisältää vain aakkosia tai numeerisia merkkejä." - #: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 -#: ../src/common/resource.cpp:1723 ../src/common/resource.cpp:1724 -#: ../src/common/resource.cpp:2801 ../src/common/resource.cpp:2805 -#: src/common/resourc2.cpp:357 src/common/resourc2.cpp:1430 -#: src/common/resource.cpp:1705 src/common/resource.cpp:2778 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 #, c-format msgid "%s: ill-formed resource file syntax." msgstr "%s: " -#: ../src/common/log.cpp:638 ../src/common/log.cpp:650 -#: ../src/generic/tipdlg.cpp:171 src/common/log.cpp:633 +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 msgid "&Close" msgstr "&Sulje" -#: ../src/common/log.cpp:639 ../src/common/log.cpp:651 src/common/log.cpp:634 +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "" + +#: ../src/generic/logg.cpp:478 msgid "&Log" msgstr "&Loki" -#: ../src/common/docview.cpp:1725 ../src/common/docview.cpp:1729 -#: ../src/common/docview.cpp:1736 ../src/common/docview.cpp:1740 -#: ../src/common/docview.cpp:1756 ../src/common/docview.cpp:1767 -#: src/common/docview.cpp:1687 src/common/docview.cpp:1698 +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Seuraava" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +#, fuzzy +msgid "&Next >" +msgstr "&Seuraava" + +#: ../src/generic/tipdlg.cpp:175 +#, fuzzy +msgid "&Next Tip" +msgstr "&Seuraava" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 msgid "&Redo" msgstr "&Tee uudelleen" -#: ../src/common/docview.cpp:1719 ../src/common/docview.cpp:1723 -#: ../src/common/docview.cpp:1746 ../src/common/docview.cpp:1750 -#: ../src/common/docview.cpp:1777 src/common/docview.cpp:1681 -#: src/common/docview.cpp:1708 +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 msgid "&Redo " msgstr "&Tee uudelleen " -#: ../src/common/log.cpp:635 ../src/common/log.cpp:646 src/common/log.cpp:630 +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 msgid "&Save..." msgstr "&Tallenna..." -#: ../src/common/docview.cpp:1731 ../src/common/docview.cpp:1735 -#: ../src/common/docview.cpp:1762 src/common/docview.cpp:1693 +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Näytä vinkit käynnistyksessä" + +#: ../src/common/docview.cpp:1951 msgid "&Undo" msgstr "&Korjaa" -#: ../src/common/docview.cpp:1706 ../src/common/docview.cpp:1710 -#: ../src/common/docview.cpp:1737 src/common/docview.cpp:1668 +#: ../src/common/docview.cpp:1926 msgid "&Undo " msgstr "&Korjaa " -#: ../src/common/config.cpp:381 ../src/common/config.cpp:382 -#: src/common/config.cpp:393 +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +#, fuzzy +msgid "&Window" +msgstr "&Korjaa" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 #, c-format msgid "'%s' has extra '..', ignored." msgstr "'%s' sisältää ylimääräisen '..', ohitettu." -#: ../src/common/intl.cpp:339 ../src/common/intl.cpp:372 -#: src/common/intl.cpp:338 +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' on virheellinen" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "" + +#: ../src/common/intl.cpp:412 #, c-format msgid "'%s' is not a valid message catalog." msgstr "'%s' ei ole kelvollinen viestiluettelo." -#: ../src/common/textfile.cpp:133 ../src/common/textfile.cpp:139 -#: src/common/textfile.cpp:132 +#: ../src/common/textfile.cpp:253 #, c-format msgid "'%s' is probably a binary file." msgstr "'%s' on mahdollisesti binäärinen tiedosto." +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' tulisi olla numeerinen." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' tulisi sisältää vain ASCII-merkkejä." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' tulisi sisältää vain aakkosia." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' tulisi sisältää vain aakkosia tai numeerisia merkkejä." + +#: ../src/html/helpfrm.cpp:679 +#, fuzzy +msgid "(Help)" +msgstr "Apua" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "" + #: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 -#: ../src/common/resource.cpp:1662 ../src/common/resource.cpp:1663 -#: ../src/common/resource.cpp:2740 ../src/common/resource.cpp:2744 -#: src/common/resourc2.cpp:297 src/common/resourc2.cpp:1370 -#: src/common/resource.cpp:1645 src/common/resource.cpp:2718 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 msgid "" ", expected static, #include or #define\n" "whilst parsing resource." msgstr "" -#: src/generic/dcpsg.cpp:2389 -msgid "A3 297 x 420 mm" +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "" + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr "" + +#: ../src/common/paper.cpp:120 +#, fuzzy +msgid "10 x 14 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "" + +#: ../src/html/htmprint.cpp:272 +#, fuzzy +msgid ": file does not exist!" +msgstr "Hakemistoa ei ole" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr "" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr "" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr "" + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr "" + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" + +#: ../src/common/paper.cpp:113 +#, fuzzy +msgid "A3 sheet, 297 x 420 mm" msgstr "A3 297 x 420 mm" -#: src/generic/dcpsg.cpp:1210 src/generic/dcpsg.cpp:1214 -#: src/generic/dcpsg.cpp:1800 src/generic/dcpsg.cpp:1804 -#: src/generic/dcpsg.cpp:2313 src/generic/dcpsg.cpp:2388 -#: src/generic/printps.cpp:239 src/generic/printps.cpp:243 -msgid "A4 210 x 297 mm" -msgstr "A4 210 x 297 mm" +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "A4 sheet, 210 x 297 mm" -#: ../src/generic/fontdlgg.cpp:327 ../src/generic/fontdlgg.cpp:329 -#: src/generic/fontdlgg.cpp:329 +#: ../src/common/paper.cpp:114 +#, fuzzy +msgid "A4 small sheet, 210 x 297 mm" +msgstr "A4 sheet, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +#, fuzzy +msgid "A5 sheet, 148 x 210 mm" +msgstr "A4 sheet, 210 x 297 mm" + +#: ../src/generic/fontdlgg.cpp:325 msgid "ABCDEFGabcdefg12345" msgstr "ABCDEFGabcdefg12345" -#: ../src/generic/colrdlgg.cpp:236 ../src/generic/colrdlgg.cpp:238 -#: src/generic/colrdlgg.cpp:236 +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "" + +#: ../src/generic/colrdlgg.cpp:269 msgid "Add to custom colours" msgstr "Lisää muokattuihin väreihin" -#: ../src/generic/prntdlgg.cpp:140 ../src/generic/prntdlgg.cpp:147 -#: src/generic/prntdlgg.cpp:83 +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:163 msgid "All" msgstr "Kaikki" -#: ../src/common/log.cpp:675 ../src/common/log.cpp:690 src/common/log.cpp:670 +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "" + +#: ../include/wx/defs.h:1686 +msgid "All files (*.*)|*.*" +msgstr "" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "" + +#: ../src/generic/logg.cpp:1021 #, c-format msgid "Append log to file '%s' (choosing [No] will overwrite it)?" msgstr "Siirrä loki tiedostoon '%s' (valitse [Ei] korvataksesi sen)?" -#: src/gtk/window.cpp:2716 -msgid "Application Error" -msgstr "Ohjelmavirhe" +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "" -#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2210 -#: ../src/common/resource.cpp:2214 src/common/resourc2.cpp:844 -#: src/common/resource.cpp:2192 +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "" + +#: ../src/common/paper.cpp:116 +#, fuzzy +msgid "B4 sheet, 250 x 354 mm" +msgstr "A4 sheet, 210 x 297 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "" + +#: ../src/common/paper.cpp:117 +#, fuzzy +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "A4 sheet, 210 x 297 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "" + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +#, fuzzy +msgid "BMP: Couldn't allocate memory." +msgstr "Ajastimen luonti epäonnistui" + +#: ../src/common/imagbmp.cpp:62 +#, fuzzy +msgid "BMP: Couldn't save invalid image." +msgstr "Ajastimen luonti epäonnistui" + +#: ../src/common/imagbmp.cpp:154 +#, fuzzy +msgid "BMP: Couldn't write data." +msgstr "Säiettä ei voi keskeyttää" + +#: ../src/common/imagbmp.cpp:131 +#, fuzzy +msgid "BMP: Couldn't write the file header." +msgstr "Säiettä ei voi keskeyttää" + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "" + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "" + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "" + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "" + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "" + +#: ../src/generic/helpwxht.cpp:157 +#, fuzzy +msgid "Back" +msgstr "Takaisin" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Takaisin" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 #, c-format msgid "Bitmap resource specification %s not found." msgstr "" -#: ../src/generic/fontdlgg.cpp:219 ../src/generic/fontdlgg.cpp:221 -#: src/generic/fontdlgg.cpp:221 +#: ../src/generic/fontdlgg.cpp:217 msgid "Bold" msgstr "Lihavoitu" -#: ../src/generic/prntdlgg.cpp:643 ../src/generic/prntdlgg.cpp:650 -#: src/generic/prntdlgg.cpp:536 +#: ../src/generic/prntdlgg.cpp:662 msgid "Bottom margin (mm):" msgstr "Alamarginaali (mm):" -#: ../src/common/log.cpp:636 ../src/common/log.cpp:648 src/common/log.cpp:631 +#: ../src/common/paper.cpp:105 +#, fuzzy +msgid "C sheet, 17 x 22 in" +msgstr "A4 sheet, 210 x 297 mm" + +#: ../src/generic/logg.cpp:475 msgid "C&lear" msgstr "&Tyhjennä" -#: ../src/msw/thread.cpp:183 src/msw/thread.cpp:183 +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 msgid "Can not create event object." msgstr "Tapahtumaobjektin luonti epäonnistui." -#: ../src/msw/thread.cpp:99 src/msw/thread.cpp:99 +#: ../src/msw/thread.cpp:124 +#, fuzzy +msgid "Can not create mutex" +msgstr "Mutexin luonti epäonnistui" + +#: ../src/mac/thread.cpp:92 +#, fuzzy msgid "Can not create mutex." msgstr "Mutexin luonti epäonnistui" -#: ../src/msw/tooltip.cpp:199 src/msw/tooltip.cpp:199 -msgid "Can not create tooltip control" -msgstr "Työkaluvihjeiden hallinnan luonti epäonnistui" - -#: ../src/common/filefn.cpp:1179 src/common/filefn.cpp:1168 -#: src/common/filefn.cpp:1282 +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 #, c-format msgid "Can not enumerate files in directory '%s'" msgstr "Hakemiston '%s' tiedostojen luettelu epäonnistui" -#: ../src/msw/clipbrd.cpp:549 src/msw/clipbrd.cpp:549 -#, c-format -msgid "Can not get data in format '%s' from clipboard." -msgstr "Datan haku leikepöydältä formaatissa '%s' epäonnistui." - -#: src/gtk/threadpsx.cpp:450 -#, c-format -msgid "Can not get priority range for scheduling policy %d." -msgstr "" - -#: ../src/msw/clipbrd.cpp:474 src/msw/clipbrd.cpp:474 -#, c-format -msgid "Can not put data in format '%s' on clipboard." -msgstr "Datan lisäys leikepöydälle formaatissa '%s' epäonnistui." - -#: ../src/msw/thread.cpp:410 src/msw/thread.cpp:410 +#: ../src/msw/thread.cpp:552 #, c-format msgid "Can not resume thread %x" msgstr "Säikeen %x jatko epäonnistui" -#: src/gtk/threadpsx.cpp:442 -msgid "Can not retrieve thread scheduling policy." -msgstr "Säikeiden ajoittamisen haku epäonnistui." - -#: ../src/msw/thread.cpp:330 src/gtk/threadpsx.cpp:270 src/msw/thread.cpp:330 +#: ../src/msw/thread.cpp:433 msgid "Can not start thread: error writing TLS." msgstr "Säikeen käynnistys epäonnistui: virhe TLS-kirjoituksessa." -#: ../src/msw/thread.cpp:395 src/msw/thread.cpp:395 +#: ../src/msw/thread.cpp:537 #, c-format msgid "Can not suspend thread %x" msgstr "Säikeen %x keskeytys epäonnistui" -#: ../src/msw/thread.cpp:547 src/msw/thread.cpp:543 +#: ../src/msw/thread.cpp:871 msgid "Can not wait for thread termination" msgstr "Ei voi odottaa säikeen keskeytystä" -#: ../src/common/docview.cpp:1708 ../src/common/docview.cpp:1712 -#: ../src/common/docview.cpp:1739 src/common/docview.cpp:1670 +#: ../src/common/docview.cpp:1928 msgid "Can't &Undo " msgstr "&Korjaus epäonnistui " -#: ../src/msw/thread.cpp:359 src/msw/thread.cpp:359 +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "" + +#: ../src/msw/registry.cpp:418 +#, fuzzy, c-format +msgid "Can't close registry key '%s'" +msgstr "rekisteriavainta '%s' ei voida sulkea" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "" + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" + +#: ../src/msw/registry.cpp:399 +#, fuzzy, c-format +msgid "Can't create registry key '%s'" +msgstr "rekisteriavaimen '%s' luonti ei onnistu" + +#: ../src/msw/utilsexc.cpp:482 +#, fuzzy +msgid "Can't create the inter-process read pipe" +msgstr "Säiettä ei voi luoda" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "" + +#: ../src/msw/thread.cpp:519 msgid "Can't create thread" msgstr "Säiettä ei voi luoda" -#: ../src/msw/iniconf.cpp:453 src/msw/iniconf.cpp:464 +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"%s luokan ikkunan luonti epäonnistui!\n" +"Mahdollisesti Windows 3.x yhteensopivuusongelma?" + +#: ../src/msw/registry.cpp:658 +#, fuzzy, c-format +msgid "Can't delete key '%s'" +msgstr "avainta '%s' ei voi poistaa" + +#: ../src/msw/iniconf.cpp:476 #, c-format msgid "Can't delete the INI file '%s'" msgstr "INI-tiedoston '%s' poisto epäonnistui" -#: ../src/unix/utilsunx.cpp:316 ../src/unix/utilsunx.cpp:327 -#: src/gtk/utilsgtk.cpp:360 -#, c-format -msgid "Can't execute '%s'\n" -msgstr "'%s' prosessia ei voi ajaa\n" +#: ../src/msw/registry.cpp:683 +#, fuzzy, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "arvon '%s' poisto avaimesta '%s' ei onnistu" -#: ../src/msw/utilsexc.cpp:208 src/msw/utilsexc.cpp:208 -#, c-format -msgid "Can't execute command '%s'" -msgstr "'%s' komennon ajo epäonnistui" +#: ../src/msw/registry.cpp:694 +#, fuzzy, c-format +msgid "Can't delete value of key '%s'" +msgstr "avaimen '%s' arvoa ei voi poistaa" -#: ../src/common/object.cpp:302 ../src/common/object.cpp:323 -#: src/common/object.cpp:290 src/common/object.cpp:311 +#: ../src/msw/registry.cpp:1020 +#, fuzzy, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "avaimen '%s' ala-avaimia ei voi luetella" + +#: ../src/msw/registry.cpp:975 +#, fuzzy, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "avaimen '%s' arvoja ei voi luetella" + +#: ../src/common/ffile.cpp:234 +#, fuzzy, c-format +msgid "Can't find current position in file '%s'" +msgstr "käyttäjän asetustiedoston '%s' avaus ei onnistu." + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"Dummy dialog -pohjaa ei löydy!\n" +"Tarkista resurssisisällön polku, jotta wx.rc löytyisi." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 #, c-format msgid "Can't find the serialization object '%s' for the object '%s'." msgstr "" -#: ../src/common/object.cpp:295 src/common/object.cpp:283 +#: ../src/msw/registry.cpp:348 +#, fuzzy, c-format +msgid "Can't get info about registry key '%s'" +msgstr "tiedon saanti rekisteriavaimesta '%s' ei onnistu" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "" + +#: ../src/common/object.cpp:307 msgid "Can't load wxSerial dynamic library." msgstr "Ei voi ladata wxSerial dynaamista kirjastoa" -#: ../src/common/log.cpp:722 ../src/common/log.cpp:737 src/common/log.cpp:717 +#: ../src/msw/dib.cpp:434 +#, fuzzy, c-format +msgid "Can't open file '%s'" +msgstr "tiedostoa '%s' ei voi avata" + +#: ../src/msw/registry.cpp:374 +#, fuzzy, c-format +msgid "Can't open registry key '%s'" +msgstr "rekisteriavaimen '%s' avaus ei onnistu" + +#: ../src/msw/registry.cpp:899 +#, fuzzy, c-format +msgid "Can't read value of '%s'" +msgstr "ei voida lukea arvoa '%s'" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, fuzzy, c-format +msgid "Can't read value of key '%s'" +msgstr "ei voida lukea arvoa avaimesta '%s'" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 msgid "Can't save log contents to file." msgstr "Lokisisällön tallennus tiedostoon epäonnistui." -#: ../src/msw/thread.cpp:384 src/msw/thread.cpp:384 +#: ../src/msw/thread.cpp:485 msgid "Can't set thread priority" msgstr "Säikeen priorisointi epäonnistui." -#: ../src/common/dlgcmn.cpp:121 ../src/common/dlgcmn.cpp:166 -#: ../src/common/prntbase.cpp:109 ../src/common/prntbase.cpp:114 -#: ../src/generic/choicdgg.cpp:306 ../src/generic/colrdlgg.cpp:235 -#: ../src/generic/colrdlgg.cpp:237 ../src/generic/dcpsg.cpp:1917 -#: ../src/generic/dcpsg.cpp:1918 ../src/generic/dcpsg.cpp:2039 -#: ../src/generic/dirdlgg.cpp:341 ../src/generic/dirdlgg.cpp:345 -#: ../src/generic/extdlgg.cpp:142 ../src/generic/fontdlgg.cpp:259 -#: ../src/generic/fontdlgg.cpp:261 ../src/generic/msgdlgg.cpp:123 -#: ../src/generic/msgdlgg.cpp:165 ../src/generic/prntdlgg.cpp:172 -#: ../src/generic/prntdlgg.cpp:179 ../src/generic/prntdlgg.cpp:430 -#: ../src/generic/prntdlgg.cpp:437 ../src/generic/prntdlgg.cpp:580 -#: ../src/generic/prntdlgg.cpp:587 ../src/generic/progdlgg.cpp:94 -#: ../src/generic/progdlgg.cpp:174 ../src/generic/textdlgg.cpp:141 -#: ../src/gtk/choicdlg.cpp:272 ../src/gtk/filedlg.cpp:154 -#: ../src/gtk/msgdlg.cpp:137 ../src/gtk/textdlg.cpp:115 -#: src/common/prntbase.cpp:113 src/generic/choicdgg.cpp:306 -#: src/generic/colrdlgg.cpp:235 src/generic/dcpsg.cpp:1875 -#: src/generic/dirdlgg.cpp:341 src/generic/fontdlgg.cpp:261 -#: src/generic/msgdlgg.cpp:143 src/generic/prntdlgg.cpp:111 -#: src/generic/prntdlgg.cpp:317 src/generic/prntdlgg.cpp:473 -#: src/generic/textdlgg.cpp:141 src/gtk/filedlg.cpp:131 +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, fuzzy, c-format +msgid "Can't set value of '%s'" +msgstr "ei voida asettaa arvoa '%s'" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 msgid "Cancel" msgstr "Peruuta" -#: ../src/msw/app.cpp:213 ../src/msw/app.cpp:223 src/msw/app.cpp:192 +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "" + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "Host-nimeä ei onnistuttu saamaan" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "Virallista host-nimeä ei onnistuttu saamaan" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "" + +#: ../src/msw/app.cpp:252 msgid "Cannot initialize OLE" msgstr "OLE initialization epäonnistui" -#: ../src/generic/dcpsg.cpp:1296 src/generic/dcpsg.cpp:1247 -msgid "Cannot open file!" +#: ../src/html/htmlfilt.cpp:146 +#, fuzzy, c-format +msgid "Cannot open HTML document: %s" +msgstr "URL:ää '%s' ei voitu avata" + +#: ../src/html/helpdata.cpp:657 +#, fuzzy, c-format +msgid "Cannot open HTML help book: %s" +msgstr "URL:ää '%s' ei voitu avata" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "URL:ää '%s' ei voitu avata" + +#: ../src/html/helpdata.cpp:353 +#, fuzzy, c-format +msgid "Cannot open contents file: %s" msgstr "Tiedostoa ei voi avata!" -#: src/common/CVS/Base/fileconf.cpp:614 src/common/fileconf.cpp:614 -#, c-format -msgid "Character '%c' is invalid in a config entry name." -msgstr "Merkki '%c' on virheellinen asetuskohdan nimessä." +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Tiedoston avaus PostScript-tulostukseen epäonnistui!" -#: ../src/common/log.cpp:636 ../src/common/log.cpp:648 src/common/log.cpp:631 +#: ../src/html/helpdata.cpp:368 +#, fuzzy, c-format +msgid "Cannot open index file: %s" +msgstr "Tiedostoa ei voi avata!" + +#: ../src/html/helpfrm.cpp:1174 +#, fuzzy +msgid "Cannot print empty page." +msgstr "Mutexin luonti epäonnistui" + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "" + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "Säikeen käynnistys epäonnistui: virhe TLS:n kirjoituksessa" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "" + +#: ../src/common/fontmap.cpp:113 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/common/fontmap.cpp:101 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "" + +#: ../src/generic/logg.cpp:475 msgid "Clear the log contents" msgstr "Tyhjennä lokisisältö" -#: ../src/common/prntbase.cpp:343 ../src/common/prntbase.cpp:352 -#: ../src/generic/progdlgg.cpp:254 src/common/prntbase.cpp:342 +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 msgid "Close" msgstr "Sulje" -#: ../src/common/log.cpp:638 ../src/common/log.cpp:650 src/common/log.cpp:633 +#: ../src/generic/logg.cpp:477 msgid "Close this window" msgstr "Sulje ikkuna" -#: ../src/gtk/filedlg.cpp:71 src/gtk/filedlg.cpp:60 +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Asetuskohdan nimi ei voi alkaa merkillä '%c'." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 msgid "Confirm" msgstr "Varmista" -#: ../src/generic/helpxlp.cpp:242 src/generic/helpxlp.cpp:242 +#: ../src/html/htmlwin.cpp:165 +#, fuzzy +msgid "Connecting..." +msgstr "Tulostetaan..." + +#: ../src/generic/helpxlp.cpp:240 #, c-format msgid "Connection to wxHelp timed out in %d seconds" msgstr "Yhteys wxHelpiin katkesi %d sekunnin jälkeen" -#: ../src/generic/prntdlgg.cpp:167 ../src/generic/prntdlgg.cpp:174 -#: src/generic/prntdlgg.cpp:106 +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:196 msgid "Copies:" msgstr "Kopiot:" -#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1652 -#: ../src/common/resource.cpp:1653 src/common/resourc2.cpp:287 -#: src/common/resource.cpp:1635 +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 #, c-format msgid "Could not find resource include file %s." msgstr "Resurssisisältötiedostoa %s ei löydy." -#: ../src/generic/tabg.cpp:1038 src/generic/tabg.cpp:1038 +#: ../src/generic/tabg.cpp:1042 msgid "Could not find tab for id" msgstr "" -#: ../src/common/resource.cpp:753 ../src/common/resource.cpp:754 -#: src/common/resource.cpp:753 +#: ../src/msw/textctrl.cpp:1249 +#, fuzzy, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "Rich Edit DLL:n käynnistys ei onnistunut" + +#: ../src/common/resource.cpp:796 #, c-format msgid "" "Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" " or provide #define (see manual for caveats)" msgstr "" -"Hallintaluokan tai ID:n '%s' selvitys epäonnistui. Käytä (non-zero) kokonais-\n" +"Hallintaluokan tai ID:n '%s' selvitys epäonnistui. Käytä (non-zero) " +"kokonais-\n" "lukua tai anna #define (katso manuaali)" -#: ../src/common/resource.cpp:1203 ../src/common/resource.cpp:1204 -#: src/common/resource.cpp:1199 +#: ../src/common/resource.cpp:1245 #, c-format msgid "" "Could not resolve menu id '%s'. Use (non-zero) integer instead\n" @@ -410,196 +859,317 @@ msgstr "" "Valikon ID:n '%s' selvitys epäonnistui. Käytä (non-zero) kokonais-\n" "lukua tai anna #define (katso manuaali)" -#: ../src/common/prntbase.cpp:675 ../src/common/prntbase.cpp:685 -#: src/common/prntbase.cpp:673 +#: ../src/common/prntbase.cpp:711 msgid "Could not start document preview." msgstr "Dokumentin esikatselu epäonnistui." -#: ../src/generic/printps.cpp:189 ../src/generic/printps.cpp:193 -#: ../src/generic/printps.cpp:194 ../src/msw/printwin.cpp:228 -#: ../src/msw/printwin.cpp:232 src/generic/printps.cpp:165 +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 msgid "Could not start printing." msgstr "Tulostus ei käynnisty." -#: ../src/common/wincmn.cpp:598 ../src/common/wincmn.cpp:609 -#: ../src/common/wincmn.cpp:713 src/gtk/window.cpp:2716 -#: src/msw/window.cpp:3756 +#: ../src/common/wincmn.cpp:784 msgid "Could not transfer data to window" msgstr "Tiedonsiirto ikkunaan ei onnistu" -#: ../src/msw/thread.cpp:127 src/msw/thread.cpp:127 +#: ../src/msw/thread.cpp:166 msgid "Couldn't acquire a mutex lock" msgstr "Mutex lockin saanti epäonnistui" -#: ../src/msw/dragimag.cpp:88 ../src/msw/dragimag.cpp:116 -#: ../src/msw/imaglist.cpp:96 ../src/msw/imaglist.cpp:98 -#: src/msw/imaglist.cpp:96 +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 msgid "Couldn't add an image to the image list." msgstr "Kuvan lisäys (kuva)listaan epäonnistui." -#: ../src/msw/thread.cpp:231 src/msw/thread.cpp:231 +#: ../src/mac/thread.cpp:227 msgid "Couldn't change the state of event object." msgstr "Tapahtumaobjektin tilaa ei voitu vaihtaa." -#: ../src/msw/timer.cpp:109 ../src/msw/timer.cpp:111 src/msw/timer.cpp:109 +#: ../src/msw/timer.cpp:96 msgid "Couldn't create a timer" msgstr "Ajastimen luonti epäonnistui" -#: ../src/msw/thread.cpp:430 src/msw/thread.cpp:430 +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Symbolia '%s' ei löydy dynaamisesta kirjastosta" + +#: ../src/msw/thread.cpp:578 msgid "Couldn't get the current thread pointer" msgstr "Säikeen osoittimen haku epäonnistui" -#: ../src/common/imagpng.cpp:216 ../src/common/imagpng.cpp:218 -#: src/common/image.cpp:662 -msgid "Couldn't load a PNG image - probably file is corrupted." +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "" + +#: ../src/common/imagpng.cpp:251 +#, fuzzy +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." msgstr "PNG-kuvan lataus ei onnistu - tiedosto ehkä korruptoitunut." -#: ../src/msw/thread.cpp:159 src/msw/thread.cpp:159 +#: ../src/msw/ole/dataobj.cpp:151 +#, fuzzy, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "Leikepöydän datan formatointi muotoon %s epäonnistui" + +#: ../src/msw/thread.cpp:198 msgid "Couldn't release a mutex" msgstr "Mutexin vapautus ei onnistu" -#: ../src/msw/listctrl.cpp:526 ../src/msw/listctrl.cpp:534 -#: src/msw/listctrl.cpp:500 +#: ../src/msw/listctrl.cpp:616 #, c-format msgid "Couldn't retrieve information about list control item %d." msgstr "Tiedonhaku listanhallinnasta %d epäonnistui." -#: ../src/msw/thread.cpp:612 src/msw/thread.cpp:608 +#: ../src/msw/thread.cpp:958 msgid "Couldn't terminate thread" msgstr "Säiettä ei voi keskeyttää" -#: ../src/generic/dirdlgg.cpp:478 ../src/generic/dirdlgg.cpp:482 -#: src/generic/dirdlgg.cpp:478 -msgid "Create New Directory" +#: ../src/generic/dirdlgg.cpp:572 +#, fuzzy +msgid "Create directory" msgstr "Luo uusi hakemisto" -#: ../src/common/log.cpp:1041 ../src/common/log.cpp:1057 -#: src/common/log.cpp:1022 -msgid "Debug" -msgstr "Debug" +#: ../src/generic/filedlgg.cpp:883 +#, fuzzy +msgid "Create new directory" +msgstr "Luo uusi hakemisto" -#: ../src/generic/fontdlgg.cpp:209 ../src/generic/fontdlgg.cpp:211 -#: src/generic/fontdlgg.cpp:211 +#: ../src/generic/filedlgg.cpp:890 +#, fuzzy +msgid "Current directory:" +msgstr "Hakemisto" + +#: ../src/common/fontmap.cpp:104 +msgid "Cyrillic (ISO-8859-5)" +msgstr "" + +#: ../src/common/paper.cpp:106 +#, fuzzy +msgid "D sheet, 22 x 34 in" +msgstr "A4 sheet, 210 x 297 mm" + +#: ../src/msw/dde.cpp:597 +#, fuzzy +msgid "DDE poke request failed" +msgstr "Pipe luonti epäonnistui" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:207 msgid "Decorative" msgstr "Koristeellinen" -#: ../src/generic/dirdlgg.cpp:450 ../src/generic/dirdlgg.cpp:454 -#: src/generic/dirdlgg.cpp:450 +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Tiesitkö..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Hakemistoa '%s' ei onnistuttu luomaan" + +#: ../src/generic/dirdlgg.cpp:539 msgid "Directory does not exist" msgstr "Hakemistoa ei ole" -#: ../src/common/docview.cpp:404 ../src/common/docview.cpp:423 -#: src/common/docview.cpp:371 +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "" + +#: ../src/common/docview.cpp:440 #, c-format msgid "Do you want to save changes to document %s?" msgstr "Haluatko tallentaa muutokset dokumenttiin %s?" -#: src/common/log.cpp:368 -msgid "DoLogString must be overrided if it's called." -msgstr "DoLogString täytyy korvata jos sitä kutsutaan." +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "" -#: ../src/generic/dirdlgg.cpp:477 ../src/generic/dirdlgg.cpp:481 -#: src/generic/dirdlgg.cpp:477 -msgid "Enter the name of the directory to create" -msgstr "Anna nimi uudelle hakemistolle" +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "" -#: ../src/generic/helphtml.cpp:260 ../src/generic/helphtml.cpp:277 -#: src/generic/helphtml.cpp:260 +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "" + +#: ../src/generic/helphtml.cpp:320 msgid "Entries found" msgstr "Löydetty kohdat" -#: src/common/CVS/Base/fileconf.cpp:607 src/common/fileconf.cpp:607 -#, c-format -msgid "Entry name can't start with '%c'." -msgstr "Kohdan nimi ei voi alkaa '%c':lla." - -#: ../src/common/config.cpp:333 ../src/common/config.cpp:334 -#: src/common/config.cpp:345 +#: ../src/common/config.cpp:349 #, c-format msgid "" "Environment variables expansion failed: missing '%c' at position %d in '%s'." msgstr "" -#: ../src/common/log.cpp:474 ../src/common/log.cpp:478 -#: ../src/generic/dcpsg.cpp:1296 ../src/generic/dcpsg.cpp:1403 -#: ../src/generic/helpxlp.cpp:243 ../src/gtk/filedlg.cpp:79 -#: src/common/log.cpp:474 src/generic/dcpsg.cpp:1247 -#: src/generic/helpxlp.cpp:243 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 msgid "Error" msgstr "Virhe" -#: ../src/generic/dirdlgg.cpp:462 ../src/generic/dirdlgg.cpp:466 -#: ../src/generic/dirdlgg.cpp:490 ../src/generic/dirdlgg.cpp:494 -#: src/generic/dirdlgg.cpp:462 src/generic/dirdlgg.cpp:490 +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Virhe " + +#: ../src/generic/dirdlgg.cpp:552 msgid "Error creating directory" msgstr "Hakemiston luonnissa virhe" -#: ../src/common/log.cpp:325 ../src/common/log.cpp:329 src/common/log.cpp:332 +#: ../src/common/log.cpp:362 msgid "Error: " msgstr "Virhe: " -#: ../src/generic/dirdlgg.cpp:230 ../src/generic/dirdlgg.cpp:234 -#: src/generic/dirdlgg.cpp:230 +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "" + +#: ../src/generic/dirdlgg.cpp:217 msgid "Etcetera" msgstr "Jne" -#: ../src/msw/utilsexc.cpp:237 src/msw/utilsexc.cpp:237 +#: ../src/msw/utilsexc.cpp:585 #, c-format msgid "Execution of command '%s' failed" msgstr "Komennon '%s' ajo epäonnistui" +#: ../src/common/paper.cpp:112 +#, fuzzy +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Letter 8 1/2 x 11 in" + #: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 -#: ../src/common/resource.cpp:1691 ../src/common/resource.cpp:1692 -#: ../src/common/resource.cpp:2769 ../src/common/resource.cpp:2773 -#: src/common/resourc2.cpp:326 src/common/resourc2.cpp:1399 -#: src/common/resource.cpp:1674 src/common/resource.cpp:2747 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 msgid "Expected '*' whilst parsing resource." msgstr "Odotettiin '*' resursseja jäsennellessä." #: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 -#: ../src/common/resource.cpp:1708 ../src/common/resource.cpp:1709 -#: ../src/common/resource.cpp:2786 ../src/common/resource.cpp:2790 -#: src/common/resourc2.cpp:342 src/common/resourc2.cpp:1415 -#: src/common/resource.cpp:1690 src/common/resource.cpp:2763 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 msgid "Expected '=' whilst parsing resource." msgstr "Odotettiin '=' resusseja jäsennellessä." #: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 -#: ../src/common/resource.cpp:1677 ../src/common/resource.cpp:1678 -#: ../src/common/resource.cpp:2755 ../src/common/resource.cpp:2759 -#: src/common/resourc2.cpp:312 src/common/resourc2.cpp:1385 -#: src/common/resource.cpp:1660 src/common/resource.cpp:2733 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 msgid "Expected 'char' whilst parsing resource." msgstr "Odotettiin 'char' resusseja jäsennellessä." -#: ../src/msw/clipbrd.cpp:106 ../src/msw/clipbrd.cpp:112 -#: src/msw/clipbrd.cpp:106 +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "" + +#: ../src/msw/clipbrd.cpp:122 msgid "Failed to close the clipboard." msgstr "Leikepöydän sulkeminen epäonnistui." -#: ../src/generic/dirdlgg.cpp:460 ../src/generic/dirdlgg.cpp:464 -#: ../src/generic/dirdlgg.cpp:488 ../src/generic/dirdlgg.cpp:492 -#: src/generic/dirdlgg.cpp:460 src/generic/dirdlgg.cpp:488 +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "" + +#: ../src/msw/dialup.cpp:747 +#, fuzzy +msgid "Failed to connect: no ISP to dial." +msgstr "Dialogin luonti epäonnistui." + +#: ../src/msw/registry.cpp:594 +#, fuzzy, c-format +msgid "Failed to copy registry value '%s'" +msgstr "rekisteriavaimen '%s' avaus ei onnistu" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "" + +#: ../src/msw/dde.cpp:934 +#, fuzzy +msgid "Failed to create DDE string" +msgstr "Dialogin luonti epäonnistui." + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "" + +#: ../src/msw/statbr95.cpp:149 +#, fuzzy +msgid "Failed to create a status bar." +msgstr "Dialogin luonti epäonnistui." + +#: ../src/msw/dde.cpp:401 +#, fuzzy, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "Työkaluvihjeen '%s' luonti epäonnistui" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" + +#: ../src/generic/dirdlgg.cpp:550 msgid "Failed to create directory " msgstr "Ei voitu luoda hakemistoa " -#: ../src/msw/tooltip.cpp:260 src/msw/tooltip.cpp:260 +#: ../src/html/winpars.cpp:374 #, c-format -msgid "Failed to create the tooltip '%s'" -msgstr "Työkaluvihjeen '%s' luonti epäonnistui" +msgid "Failed to display HTML document in %s encoding" +msgstr "" -#: src/msw/dialog.cpp:143 -msgid "Failed to created dialog." -msgstr "Dialogin luonti ei onnistunut." - -#: ../src/msw/clipbrd.cpp:118 ../src/msw/clipbrd.cpp:124 -#: src/msw/clipbrd.cpp:118 +#: ../src/msw/clipbrd.cpp:134 msgid "Failed to empty the clipboard." msgstr "Leikepöydän tyhjennys epäonnistui." -#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2174 -#: ../src/common/resource.cpp:2178 src/common/resourc2.cpp:808 -#: src/common/resource.cpp:2156 +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, fuzzy, c-format +msgid "Failed to execute '%s'\n" +msgstr "'%s' prosessia ei voi ajaa\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 #, c-format msgid "" "Failed to find XBM resource %s.\n" @@ -608,9 +1178,7 @@ msgstr "" "XBM resurssia %s ei löydy.\n" "Unohditko käyttää wxResourceLoadBitmapData?" -#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2329 -#: ../src/common/resource.cpp:2333 src/common/resourc2.cpp:963 -#: src/common/resource.cpp:2311 +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 #, c-format msgid "" "Failed to find XBM resource %s.\n" @@ -619,9 +1187,7 @@ msgstr "" "XBM resurssia %s ei löydy.\n" "Unohditko käyttää wxResourceLoadIconData?" -#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2190 -#: ../src/common/resource.cpp:2194 src/common/resourc2.cpp:824 -#: src/common/resource.cpp:2172 +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 #, c-format msgid "" "Failed to find XPM resource %s.\n" @@ -630,434 +1196,822 @@ msgstr "" "XBM resurssia %s ei löydy.\n" "Unohditko käyttää wxResourceLoadBitmapData?" -#: ../src/msw/clipbrd.cpp:86 ../src/msw/clipbrd.cpp:92 src/msw/clipbrd.cpp:86 +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "" + +#: ../src/msw/clipbrd.cpp:623 +#, fuzzy +msgid "Failed to get data from the clipboard" +msgstr "Dataa ei voida hakea leikepöydältä." + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "" + +#: ../src/common/timercmn.cpp:196 +#, fuzzy +msgid "Failed to get the local system time" +msgstr "Työkaluvihjeen '%s' luonti epäonnistui" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Jaetun kirjaston '%s' lataus epäonnistui" + +#: ../src/msw/clipbrd.cpp:102 msgid "Failed to open the clipboard." msgstr "Leikepöydän avaus ei onnistunut." -#: ../src/msw/clipbrd.cpp:375 ../src/msw/clipbrd.cpp:412 -#: src/msw/clipbrd.cpp:375 +#: ../src/msw/clipbrd.cpp:539 +#, fuzzy +msgid "Failed to put data on the clipboard" +msgstr "Dataa ei voida hakea leikepöydältä." + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "" + +#: ../src/msw/dde.cpp:285 +#, fuzzy, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Työkaluvihjeen '%s' luonti epäonnistui" + +#: ../src/common/fontmap.cpp:552 +#, fuzzy, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Työkaluvihjeen '%s' luonti epäonnistui" + +#: ../src/msw/registry.cpp:440 +#, fuzzy, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "Työkaluvihjeen '%s' luonti epäonnistui" + +#: ../src/msw/registry.cpp:540 +#, fuzzy, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "rekisteriavaimen '%s' luonti ei onnistu" + +#: ../src/msw/clipbrd.cpp:428 msgid "Failed to retrieve data from the clipboard." msgstr "Dataa ei voida hakea leikepöydältä." -#: ../src/msw/clipbrd.cpp:262 ../src/msw/clipbrd.cpp:286 -#: src/msw/clipbrd.cpp:262 +#: ../src/msw/dialup.cpp:463 +#, fuzzy +msgid "Failed to retrieve text of RAS error message" +msgstr "Dataa ei voida hakea leikepöydältä." + +#: ../src/msw/clipbrd.cpp:652 +#, fuzzy +msgid "Failed to retrieve the supported clipboard formats" +msgstr "Dataa ei voida hakea leikepöydältä." + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "" + +#: ../src/msw/clipbrd.cpp:300 msgid "Failed to set clipboard data." msgstr "Leikepöydän datan asetus epäonnistui." -#: ../src/unix/threadpsx.cpp:551 ../src/unix/threadpsx.cpp:592 -#: ../src/unix/threadpsx.cpp:601 src/gtk/threadpsx.cpp:508 +#: ../src/unix/threadpsx.cpp:1071 #, c-format msgid "Failed to set thread priority %d." msgstr "Säikeen prioriteetin %d asetus epäonnistui." -#: ../src/unix/threadpsx.cpp:662 ../src/unix/threadpsx.cpp:703 -#: ../src/unix/threadpsx.cpp:713 src/gtk/threadpsx.cpp:611 +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "" + +#: ../src/unix/threadpsx.cpp:1251 msgid "Failed to terminate a thread." msgstr "Säikeen keskeytys ei onnistunut." -#: ../src/common/log.cpp:545 ../src/common/log.cpp:551 src/common/log.cpp:543 +#: ../src/msw/dde.cpp:635 +#, fuzzy +msgid "Failed to terminate the advise loop with DDE server" +msgstr "Säikeen keskeytys ei onnistunut." + +#: ../src/msw/dialup.cpp:933 +#, fuzzy, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Säikeen keskeytys ei onnistunut." + +#: ../src/msw/dde.cpp:301 +#, fuzzy, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Työkaluvihjeen '%s' luonti epäonnistui" + +#: ../src/generic/logg.cpp:371 msgid "Fatal error" msgstr "Tuhoisa virhe" -#: ../src/common/log.cpp:318 ../src/common/log.cpp:322 src/common/log.cpp:325 +#: ../src/common/log.cpp:355 msgid "Fatal error: " msgstr "Tuhoisa virhe: " -#: ../src/gtk/filedlg.cpp:68 src/gtk/filedlg.cpp:57 +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Tuhoisa virhe: lopetetaan" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 #, c-format msgid "File '%s' already exists, do you really want to overwrite it?" msgstr "Tiedosto '%s' on olemassa, haluatko korvata sen?" -#: ../src/common/docview.cpp:280 ../src/common/docview.cpp:281 -#: ../src/common/docview.cpp:311 ../src/common/docview.cpp:317 -#: src/common/docview.cpp:247 src/common/docview.cpp:278 +#: ../src/common/textcmn.cpp:94 +#, fuzzy +msgid "File couldn't be loaded." +msgstr "Hakemistoa '%s' ei onnistuttu luomaan" + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 msgid "File error" msgstr "Tiedostovirhe" -#: ../src/msw/filedlg.cpp:259 src/msw/filedlg.cpp:252 +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "" + +#: ../src/msw/filedlg.cpp:303 #, c-format msgid "Files (%s)|%s" msgstr "Tiedostot (%s)|%s" -#: ../src/generic/fontdlgg.cpp:126 src/generic/fontdlgg.cpp:126 +#: ../src/html/helpfrm.cpp:340 +#, fuzzy +msgid "Find" +msgstr "Löydetty " + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "" + +#: ../src/common/paper.cpp:118 +#, fuzzy +msgid "Folio, 8 1/2 x 13 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/generic/fontdlgg.cpp:124 msgid "Font" msgstr "Kirjasin" -#: ../src/unix/utilsunx.cpp:276 ../src/unix/utilsunx.cpp:287 -#: src/gtk/utilsgtk.cpp:327 +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "" + +#: ../src/unix/utilsunx.cpp:500 msgid "Fork failed" msgstr "Haarukointi epäonnistui" +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Eteenpäin" + #: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 -#: ../src/common/resource.cpp:1660 ../src/common/resource.cpp:1661 -#: ../src/common/resource.cpp:2738 ../src/common/resource.cpp:2742 -#: src/common/resourc2.cpp:295 src/common/resourc2.cpp:1368 -#: src/common/resource.cpp:1643 src/common/resource.cpp:2716 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 msgid "Found " msgstr "Löydetty " -#: ../src/generic/prntdlgg.cpp:158 ../src/generic/prntdlgg.cpp:165 -#: src/generic/prntdlgg.cpp:97 +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:187 msgid "From:" msgstr "Lähettäjä:" -#: ../src/generic/helphtml.cpp:259 ../src/generic/helphtml.cpp:260 -#: ../src/generic/helphtml.cpp:276 ../src/generic/helphtml.cpp:277 -#: src/generic/helphtml.cpp:259 src/generic/helphtml.cpp:260 +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "" + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "" + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "" + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "" + +#: ../src/common/paper.cpp:142 +#, fuzzy +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/common/paper.cpp:141 +#, fuzzy +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "Legal 8 1/2 x 14 in" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "" + +#: ../src/html/helpfrm.cpp:504 +#, fuzzy +msgid "Go forward" +msgstr "Eteenpäin" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "" + +#: ../src/generic/filedlgg.cpp:875 +#, fuzzy +msgid "Go to home directory" +msgstr "Hakemisto" + +#: ../src/generic/filedlgg.cpp:869 +#, fuzzy +msgid "Go to parent directory" +msgstr "Ei voitu luoda hakemistoa " + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/html/htmlwin.cpp:250 +#, fuzzy, c-format +msgid "HTML anchor %s does not exist." +msgstr "Hakemistoa ei ole" + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Apua" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 msgid "Help Index" msgstr "Help Index" +#: ../src/html/helpfrm.cpp:1172 +#, fuzzy +msgid "Help Printing" +msgstr "Tulostaa" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, fuzzy, c-format +msgid "Help: %s" +msgstr "Apua" + #: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 -#: ../src/common/resource.cpp:2363 ../src/common/resource.cpp:2367 -#: ../src/common/resource.cpp:2374 ../src/common/resource.cpp:2378 -#: src/common/resourc2.cpp:997 src/common/resourc2.cpp:1008 -#: src/common/resource.cpp:2345 src/common/resource.cpp:2356 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 #, c-format msgid "Icon resource specification %s not found." msgstr "Kuvakeresurssin määritelmää %s ei löydy." -#: ../src/common/resource.cpp:232 ../src/common/resource.cpp:234 -#: src/common/resource.cpp:234 +#: ../src/common/resource.cpp:251 msgid "Ill-formed resource file syntax." msgstr "Virheellinen resurssitiedoston syntaksi." -#: ../src/common/log.cpp:482 ../src/common/log.cpp:486 src/common/log.cpp:477 -msgid "Information" -msgstr "Informaatio" +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +#, fuzzy +msgid "Illegal directory name." +msgstr "Hakemisto" -#: ../src/generic/fontdlgg.cpp:215 ../src/generic/fontdlgg.cpp:217 -#: src/generic/fontdlgg.cpp:217 +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "" + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "" + +#: ../src/html/helpfrm.cpp:372 +#, fuzzy +msgid "Index" +msgstr "Help Index" + +#: ../src/common/fontmap.cpp:111 +msgid "Indian (ISO-8859-12)" +msgstr "" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "" + +#: ../src/generic/fontdlgg.cpp:213 msgid "Italic" msgstr "Italic" -#: ../src/generic/dcpsg.cpp:1908 ../src/generic/dcpsg.cpp:1909 -#: ../src/generic/dcpsg.cpp:2030 ../src/generic/prntdlgg.cpp:403 -#: ../src/generic/prntdlgg.cpp:410 ../src/generic/prntdlgg.cpp:606 -#: ../src/generic/prntdlgg.cpp:613 src/generic/dcpsg.cpp:1866 -#: src/generic/prntdlgg.cpp:289 src/generic/prntdlgg.cpp:499 +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "" + +#: ../src/common/imagjpeg.cpp:202 +#, fuzzy +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "PNG-kuvan lataus ei onnistu - tiedosto ehkä korruptoitunut." + +#: ../src/common/imagjpeg.cpp:315 +#, fuzzy +msgid "JPEG: Couldn't save image." +msgstr "Ajastimen luonti epäonnistui" + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 msgid "Landscape" msgstr "Landscape" -#: ../src/generic/prntdlgg.cpp:622 ../src/generic/prntdlgg.cpp:629 -#: src/generic/prntdlgg.cpp:515 +#: ../src/common/paper.cpp:110 +#, fuzzy +msgid "Ledger, 17 x 11 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/generic/prntdlgg.cpp:649 msgid "Left margin (mm):" msgstr "Vasen marginaali (mm):" -#: src/generic/dcpsg.cpp:2391 -msgid "Legal 8 1/2 x 14 in" +#: ../src/common/paper.cpp:103 +#, fuzzy +msgid "Legal, 8 1/2 x 14 in" msgstr "Legal 8 1/2 x 14 in" -#: src/generic/dcpsg.cpp:2390 -msgid "Letter 8 1/2 x 11 in" +#: ../src/common/paper.cpp:108 +#, fuzzy +msgid "Letter Small, 8 1/2 x 11 in" msgstr "Letter 8 1/2 x 11 in" -#: ../src/generic/fontdlgg.cpp:218 ../src/generic/fontdlgg.cpp:220 -#: src/generic/fontdlgg.cpp:220 +#: ../src/common/paper.cpp:102 +#, fuzzy +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/generic/fontdlgg.cpp:216 msgid "Light" msgstr "Light" -#: ../src/gtk/filedlg.cpp:212 ../src/gtk/filedlg.cpp:227 -#: ../src/gtk/filedlg.cpp:231 ../src/msw/filedlg.cpp:359 -#: ../src/msw/filedlg.cpp:360 src/gtk/filedlg.cpp:177 src/msw/filedlg.cpp:352 +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 #, c-format msgid "Load %s file" msgstr "Lataa %s tiedosto" -#: ../src/common/log.cpp:725 ../src/common/log.cpp:740 src/common/log.cpp:720 +#: ../src/html/htmlwin.cpp:186 +#, fuzzy +msgid "Loading : " +msgstr "Varoitus: " + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "" + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "" + +#: ../src/generic/logg.cpp:538 #, c-format msgid "Log saved to the file '%s'." msgstr "Loki tallennettu tiedostoon '%s'." -#: ../src/gtk/mdi.cpp:347 ../src/gtk/mdi.cpp:369 src/gtk/mdi.cpp:321 +#: ../src/gtk/mdi.cpp:435 msgid "MDI child" msgstr "MDI child" -#: ../src/common/mimetype.cpp:1263 ../src/common/mimetype.cpp:1265 -#: src/common/mimetype.cpp:1203 +#: ../src/unix/mimetype.cpp:1597 #, c-format msgid "Mailcap file %s, line %d: incomplete entry ignored." msgstr "" -#: src/common/mimetype.cpp:968 +#: ../src/common/fs_mem.cpp:144 #, c-format -msgid "" -"Mime.types file %s, line %d: extra characters after the field value ignored." +msgid "Memory VFS already contains file '%s'!" msgstr "" -"Mime.types tiedosto %s, rivi %d: ylimääräiset merkit kentän arvon jälkeen ohitettu." -#: ../src/common/mimetype.cpp:977 ../src/common/mimetype.cpp:979 -#: src/common/mimetype.cpp:941 +#: ../src/unix/mimetype.cpp:1295 #, c-format msgid "Mime.types file %s, line %d: unterminated quoted string." msgstr "Mime.types tiedosto %s, rivi %d: keskeyttämätön quotattu merkkijono." -#: ../src/generic/fontdlgg.cpp:210 ../src/generic/fontdlgg.cpp:212 -#: src/generic/fontdlgg.cpp:212 +#: ../src/generic/fontdlgg.cpp:208 msgid "Modern" msgstr "Moderni" -#: ../src/generic/dirdlgg.cpp:226 ../src/generic/dirdlgg.cpp:230 -#: src/generic/dirdlgg.cpp:226 +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Lisää..." + +#: ../src/generic/dirdlgg.cpp:213 msgid "Mounted Devices" msgstr "Asennetut laitteet" -#: ../src/generic/dirdlgg.cpp:225 ../src/generic/dirdlgg.cpp:229 -#: src/generic/dirdlgg.cpp:225 +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "" + +#: ../src/generic/dirdlgg.cpp:212 msgid "My Home" msgstr "Koti" -#: ../src/generic/dirdlgg.cpp:342 ../src/generic/dirdlgg.cpp:346 -#: src/generic/dirdlgg.cpp:342 +#: ../src/generic/filedlgg.cpp:533 +#, fuzzy +msgid "Name" +msgstr "am" + +#: ../src/generic/dirdlgg.cpp:427 msgid "New..." msgstr "Uusi..." -#: ../src/generic/extdlgg.cpp:103 ../src/generic/extdlgg.cpp:115 -#: ../src/generic/msgdlgg.cpp:111 ../src/generic/msgdlgg.cpp:148 -#: ../src/gtk/msgdlg.cpp:125 src/generic/msgdlgg.cpp:131 +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 msgid "No" msgstr "Ei" #: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 -#: ../src/common/resource.cpp:2180 ../src/common/resource.cpp:2184 -#: ../src/common/resource.cpp:2335 ../src/common/resource.cpp:2339 -#: src/common/resourc2.cpp:814 src/common/resourc2.cpp:969 -#: src/common/resource.cpp:2162 src/common/resource.cpp:2317 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 msgid "No XBM facility available!" msgstr "XBM laitteistoa ei ole!" -#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2196 -#: ../src/common/resource.cpp:2200 src/common/resourc2.cpp:830 -#: src/common/resource.cpp:2178 +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 msgid "No XPM facility available!" msgstr "XBM laitteistoa ei ole!" -#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2357 -#: ../src/common/resource.cpp:2361 src/common/resourc2.cpp:991 -#: src/common/resource.cpp:2339 +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 msgid "No XPM icon facility available!" msgstr "XBM laitteistoa ei ole!" -#: ../src/generic/helphtml.cpp:254 ../src/generic/helphtml.cpp:271 -#: src/generic/helphtml.cpp:254 +#: ../src/generic/helphtml.cpp:314 msgid "No entries found." msgstr "Kohtia ei löydetty." -#: ../src/generic/fontdlgg.cpp:214 ../src/generic/fontdlgg.cpp:216 -#: ../src/generic/fontdlgg.cpp:217 ../src/generic/fontdlgg.cpp:219 -#: src/generic/fontdlgg.cpp:216 src/generic/fontdlgg.cpp:219 +#: ../src/common/fontmap.cpp:716 +#, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "" + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "" + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "" + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 msgid "Normal" msgstr "Tavallinen" -#: ../src/common/dlgcmn.cpp:116 ../src/common/dlgcmn.cpp:159 -#: ../src/generic/choicdgg.cpp:301 ../src/generic/colrdlgg.cpp:231 -#: ../src/generic/colrdlgg.cpp:233 ../src/generic/dcpsg.cpp:1916 -#: ../src/generic/dcpsg.cpp:1917 ../src/generic/dcpsg.cpp:2038 -#: ../src/generic/dirdlgg.cpp:340 ../src/generic/dirdlgg.cpp:344 -#: ../src/generic/extdlgg.cpp:121 ../src/generic/fontdlgg.cpp:258 -#: ../src/generic/fontdlgg.cpp:260 ../src/generic/msgdlgg.cpp:117 -#: ../src/generic/msgdlgg.cpp:158 ../src/generic/prntdlgg.cpp:171 -#: ../src/generic/prntdlgg.cpp:178 ../src/generic/prntdlgg.cpp:429 -#: ../src/generic/prntdlgg.cpp:436 ../src/generic/prntdlgg.cpp:579 -#: ../src/generic/prntdlgg.cpp:586 ../src/generic/textdlgg.cpp:136 -#: ../src/gtk/choicdlg.cpp:266 ../src/gtk/filedlg.cpp:148 -#: ../src/gtk/msgdlg.cpp:131 ../src/gtk/textdlg.cpp:109 -#: src/generic/choicdgg.cpp:301 src/generic/colrdlgg.cpp:231 -#: src/generic/dcpsg.cpp:1874 src/generic/dirdlgg.cpp:340 -#: src/generic/fontdlgg.cpp:260 src/generic/msgdlgg.cpp:138 -#: src/generic/prntdlgg.cpp:110 src/generic/prntdlgg.cpp:316 -#: src/generic/prntdlgg.cpp:472 src/generic/textdlgg.cpp:136 -#: src/gtk/filedlg.cpp:125 +#: ../src/html/helpfrm.cpp:881 +#, fuzzy +msgid "Normal font:" +msgstr "Tavallinen" + +#: ../src/common/paper.cpp:122 +#, fuzzy +msgid "Note, 8 1/2 x 11 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 msgid "OK" msgstr "OK" -#: ../src/generic/prntdlgg.cpp:409 ../src/generic/prntdlgg.cpp:416 -#: src/generic/prntdlgg.cpp:295 +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "" + +#: ../src/common/cmdline.cpp:590 +#, fuzzy, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "tiedosto '%s', rivi %d: '=' odotettu." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "" + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "" + +#: ../src/generic/prntdlgg.cpp:447 msgid "Options" msgstr "Asetukset" -#: ../src/generic/prntdlgg.cpp:405 ../src/generic/prntdlgg.cpp:412 -#: ../src/generic/prntdlgg.cpp:607 ../src/generic/prntdlgg.cpp:614 -#: src/generic/prntdlgg.cpp:291 src/generic/prntdlgg.cpp:500 +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 msgid "Orientation" msgstr "Orientaatio" -#: ../src/common/prntbase.cpp:695 ../src/common/prntbase.cpp:705 -#: src/common/prntbase.cpp:693 +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +#, fuzzy +msgid "PCX: couldn't allocate memory" +msgstr "Ajastimen luonti epäonnistui" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "" + +#: ../src/common/imagpcx.cpp:470 +#, fuzzy +msgid "PCX: invalid image" +msgstr "virheellinen päivämäärä" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "" + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "" + +#: ../src/common/imagpnm.cpp:96 +#, fuzzy +msgid "PNM: Couldn't allocate memory." +msgstr "Ajastimen luonti epäonnistui" + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "" + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "" + +#: ../src/common/prntbase.cpp:731 #, c-format msgid "Page %d" msgstr "Sivu %d" -#: ../src/common/prntbase.cpp:693 ../src/common/prntbase.cpp:703 -#: src/common/prntbase.cpp:691 +#: ../src/common/prntbase.cpp:729 #, c-format msgid "Page %d of %d" msgstr "Sivu %d / %d" -#: ../src/generic/prntdlgg.cpp:564 ../src/generic/prntdlgg.cpp:571 -#: src/generic/prntdlgg.cpp:457 +#: ../src/generic/prntdlgg.cpp:604 msgid "Page Setup" msgstr "Sivun asetukset" -#: ../src/generic/prntdlgg.cpp:141 ../src/generic/prntdlgg.cpp:148 -#: src/generic/prntdlgg.cpp:84 +#: ../src/generic/prntdlgg.cpp:164 msgid "Pages" msgstr "Sivut" -#: ../src/generic/prntdlgg.cpp:395 ../src/generic/prntdlgg.cpp:402 -#: ../src/generic/prntdlgg.cpp:756 ../src/generic/prntdlgg.cpp:763 -#: src/generic/prntdlgg.cpp:281 src/generic/prntdlgg.cpp:629 +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +#, fuzzy +msgid "Paper Size" +msgstr "Paperin koko" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 msgid "Paper size" msgstr "Paperin koko" -#: ../src/unix/utilsunx.cpp:259 ../src/unix/utilsunx.cpp:270 -#: src/gtk/utilsgtk.cpp:315 +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 msgid "Pipe creation failed" msgstr "Pipe luonti epäonnistui" -#: ../src/common/prntbase.cpp:107 ../src/common/prntbase.cpp:112 -#: src/common/prntbase.cpp:111 +#: ../src/gtk/fontdlg.cpp:72 +#, fuzzy +msgid "Please choose a valid font." +msgstr "Valitse olemassaoleva tiedosto." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Valitse olemassaoleva tiedosto." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "" + +#: ../src/common/prntbase.cpp:107 msgid "Please wait..." msgstr "Odota..." -#: ../src/generic/dcpsg.cpp:1907 ../src/generic/dcpsg.cpp:1908 -#: ../src/generic/dcpsg.cpp:2029 ../src/generic/prntdlgg.cpp:402 -#: ../src/generic/prntdlgg.cpp:409 ../src/generic/prntdlgg.cpp:605 -#: ../src/generic/prntdlgg.cpp:612 src/generic/dcpsg.cpp:1865 -#: src/generic/prntdlgg.cpp:288 src/generic/prntdlgg.cpp:498 +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 msgid "Portrait" msgstr "Portrait" -#: ../src/generic/dcpsg.cpp:366 ../src/generic/dcpsg.cpp:372 -#: src/generic/dcpsg.cpp:338 +#: ../src/generic/dcpsg.cpp:391 msgid "PostScript" msgstr "PostScript" -#: ../src/generic/prntdlgg.cpp:234 ../src/generic/prntdlgg.cpp:241 -#: src/generic/prntdlgg.cpp:159 +#: ../src/generic/prntdlgg.cpp:272 msgid "PostScript file" msgstr "PostScript tiedosto" -#: ../src/generic/dcpsg.cpp:1949 ../src/generic/dcpsg.cpp:1950 -#: ../src/generic/dcpsg.cpp:2071 src/generic/dcpsg.cpp:1907 +#: ../src/generic/dcpsg.cpp:2303 msgid "PostScript:" msgstr "PostScript:" -#: ../src/generic/dcpsg.cpp:1912 ../src/generic/dcpsg.cpp:1913 -#: ../src/generic/dcpsg.cpp:2034 src/generic/dcpsg.cpp:1870 +#: ../src/generic/dcpsg.cpp:2266 msgid "Preview Only" msgstr "Vain esikatselu" -#: ../src/generic/prntdlgg.cpp:102 ../src/generic/prntdlgg.cpp:109 -#: ../src/generic/prntdlgg.cpp:116 ../src/generic/prntdlgg.cpp:123 -#: src/generic/prntdlgg.cpp:71 +#: ../src/html/helpfrm.cpp:903 +#, fuzzy +msgid "Preview:" +msgstr "Vain esikatselu" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 msgid "Print" msgstr "Tulosta" -#: ../src/generic/printps.cpp:189 ../src/generic/printps.cpp:193 -#: ../src/generic/printps.cpp:194 src/generic/printps.cpp:165 -msgid "Print Error" -msgstr "Tulostusvirhe" - -#: ../src/common/docview.cpp:831 ../src/common/docview.cpp:857 -#: src/common/docview.cpp:785 +#: ../src/common/docview.cpp:897 msgid "Print Preview" msgstr "Tulostuksen esikatselu" -#: ../src/common/prntbase.cpp:636 ../src/common/prntbase.cpp:646 -#: ../src/common/prntbase.cpp:658 ../src/common/prntbase.cpp:668 -#: ../src/common/prntbase.cpp:675 ../src/common/prntbase.cpp:685 -#: src/common/prntbase.cpp:633 src/common/prntbase.cpp:655 -#: src/common/prntbase.cpp:673 +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 msgid "Print Preview Failure" msgstr "Tulostuksen esikatselu epäonnistui" -#: ../src/generic/prntdlgg.cpp:149 ../src/generic/prntdlgg.cpp:156 -#: src/generic/prntdlgg.cpp:90 +#: ../src/generic/prntdlgg.cpp:172 msgid "Print Range" msgstr "Tulostusalue" -#: ../src/generic/prntdlgg.cpp:370 ../src/generic/prntdlgg.cpp:377 -#: ../src/generic/prntdlgg.cpp:384 src/generic/prntdlgg.cpp:276 +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 msgid "Print Setup" msgstr "Tulostusasetukset" -#: ../src/generic/prntdlgg.cpp:417 ../src/generic/prntdlgg.cpp:424 -#: src/generic/prntdlgg.cpp:303 +#: ../src/generic/prntdlgg.cpp:455 msgid "Print in colour" msgstr "Tulosta väreissä" -#: ../src/generic/prntdlgg.cpp:419 ../src/generic/prntdlgg.cpp:426 -#: src/generic/prntdlgg.cpp:306 +#: ../src/generic/prntdlgg.cpp:457 msgid "Print spooling" msgstr "Tulostuksen spoolaus" -#: ../src/generic/dcpsg.cpp:1911 ../src/generic/dcpsg.cpp:1912 -#: ../src/generic/dcpsg.cpp:2033 ../src/generic/prntdlgg.cpp:135 -#: ../src/generic/prntdlgg.cpp:142 src/generic/dcpsg.cpp:1869 -#: src/generic/prntdlgg.cpp:78 +#: ../src/html/helpfrm.cpp:529 +#, fuzzy +msgid "Print this page" +msgstr "Tulostusalue" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 msgid "Print to File" msgstr "Tulosta tiedostoon" -#: ../src/common/prntbase.cpp:350 ../src/common/prntbase.cpp:359 -#: src/common/prntbase.cpp:349 +#: ../src/common/prntbase.cpp:366 msgid "Print..." msgstr "Tulosta..." -#: ../src/generic/dcpsg.cpp:1922 ../src/generic/dcpsg.cpp:1923 -#: ../src/generic/dcpsg.cpp:2044 src/generic/dcpsg.cpp:1880 +#: ../src/generic/dcpsg.cpp:2276 msgid "Printer Command: " msgstr "Tulostinkomento: " -#: ../src/generic/dcpsg.cpp:1927 ../src/generic/dcpsg.cpp:1928 -#: ../src/generic/dcpsg.cpp:2049 src/generic/dcpsg.cpp:1885 +#: ../src/generic/dcpsg.cpp:2281 msgid "Printer Options: " msgstr "Tulostimen asetukset: " -#: ../src/generic/dcpsg.cpp:335 ../src/generic/dcpsg.cpp:341 -#: src/generic/dcpsg.cpp:306 +#: ../src/generic/dcpsg.cpp:360 msgid "Printer Settings" msgstr "Tulostimen asetukset" -#: ../src/generic/prntdlgg.cpp:421 ../src/generic/prntdlgg.cpp:428 -#: src/generic/prntdlgg.cpp:308 +#: ../src/generic/prntdlgg.cpp:459 msgid "Printer command:" msgstr "Tulostinkomento:" -#: ../src/generic/prntdlgg.cpp:133 ../src/generic/prntdlgg.cpp:140 -#: src/generic/prntdlgg.cpp:76 +#: ../src/generic/prntdlgg.cpp:149 msgid "Printer options" msgstr "Tulostimen asetukset" -#: ../src/generic/prntdlgg.cpp:425 ../src/generic/prntdlgg.cpp:432 -#: src/generic/prntdlgg.cpp:312 +#: ../src/generic/prntdlgg.cpp:463 msgid "Printer options:" msgstr "Tulostimen asetukset:" -#: ../src/generic/prntdlgg.cpp:582 ../src/generic/prntdlgg.cpp:589 -#: src/generic/prntdlgg.cpp:475 +#: ../src/generic/prntdlgg.cpp:682 msgid "Printer..." msgstr "Tulostin..." -#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:111 -#: ../src/common/prntbase.cpp:148 ../src/common/prntbase.cpp:153 -#: src/common/prntbase.cpp:110 src/common/prntbase.cpp:152 +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 msgid "Printing" msgstr "Tulostaa" -#: ../src/common/prntbase.cpp:120 ../src/common/prntbase.cpp:125 -#: src/common/prntbase.cpp:124 +#: ../src/common/prntbase.cpp:120 msgid "Printing Error" msgstr "Tulostusvirhe" -#: ../src/common/log.cpp:319 ../src/common/log.cpp:323 src/common/log.cpp:326 +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Tulostetaan sivua %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Tulostetaan..." + +#: ../src/common/log.cpp:356 msgid "Program aborted." msgstr "Ohjelma keskeytetty." -#: ../src/common/log.cpp:677 ../src/common/log.cpp:692 src/common/log.cpp:672 +#: ../src/common/paper.cpp:119 +#, fuzzy +msgid "Quarto, 215 x 275 mm" +msgstr "A4 210 x 297 mm" + +#: ../src/generic/logg.cpp:1023 msgid "Question" msgstr "Kysymys" -#: ../src/msw/registry.cpp:435 src/msw/registry.cpp:435 +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, fuzzy, c-format +msgid "Read error on file '%s'" +msgstr "Korvaa tiedosto '%s'?" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "" + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "" + +#: ../src/msw/registry.cpp:628 #, c-format msgid "" "Registry key '%s' is needed for normal system operation,\n" @@ -1068,169 +2022,337 @@ msgstr "" "toimintaan. Poistamalla avaimen saatat järjestelmäsi epä-\n" "vakaiseen tilaan: ohjelma keskeytetty." -#: ../src/generic/helphtml.cpp:259 ../src/generic/helphtml.cpp:276 -#: src/generic/helphtml.cpp:259 +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "" + +#: ../src/generic/helphtml.cpp:319 msgid "Relevant entries:" msgstr "Tähdelliset kohdat:" -#: ../src/msw/filedlg.cpp:336 src/msw/filedlg.cpp:329 +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "" + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "" + +#: ../src/msw/filedlg.cpp:445 #, c-format msgid "Replace file '%s'?" msgstr "Korvaa tiedosto '%s'?" -#: ../src/generic/prntdlgg.cpp:628 ../src/generic/prntdlgg.cpp:635 -#: src/generic/prntdlgg.cpp:521 +#: ../src/generic/prntdlgg.cpp:661 msgid "Right margin (mm):" msgstr "Oikea marginaali (mm):" -#: ../src/generic/fontdlgg.cpp:208 ../src/generic/fontdlgg.cpp:210 -#: src/generic/fontdlgg.cpp:210 +#: ../src/generic/fontdlgg.cpp:206 msgid "Roman" msgstr "Roman" -#: ../src/gtk/filedlg.cpp:228 ../src/gtk/filedlg.cpp:243 -#: ../src/gtk/filedlg.cpp:247 ../src/msw/filedlg.cpp:359 -#: ../src/msw/filedlg.cpp:361 src/gtk/filedlg.cpp:193 src/msw/filedlg.cpp:352 +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 #, c-format msgid "Save %s file" msgstr "Tallenna %s tiedosto" -#: ../src/common/docview.cpp:231 ../src/common/docview.cpp:234 -#: src/common/docview.cpp:198 +#: ../src/common/docview.cpp:249 msgid "Save as" msgstr "Tallenna nimellä" -#: ../src/common/log.cpp:635 ../src/common/log.cpp:646 src/common/log.cpp:630 +#: ../src/generic/logg.cpp:473 msgid "Save log contents to file" msgstr "Tallenna lokisisältö tiedostoon" -#: ../src/generic/fontdlgg.cpp:211 ../src/generic/fontdlgg.cpp:213 -#: src/generic/fontdlgg.cpp:213 +#: ../src/generic/fontdlgg.cpp:209 msgid "Script" msgstr "Skripti" -#: ../src/common/docview.cpp:1268 ../src/common/docview.cpp:1272 -#: ../src/common/docview.cpp:1299 src/common/docview.cpp:1243 +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "" + +#: ../src/html/helpfrm.cpp:628 +#, fuzzy +msgid "Searching..." +msgstr "Tulostetaan..." + +#: ../src/generic/dirdlgg.cpp:191 +#, fuzzy +msgid "Sections" +msgstr "Asetukset" + +#: ../src/common/ffile.cpp:221 +#, fuzzy, c-format +msgid "Seek error on file '%s'" +msgstr "tiedostoa '%s' ei voi avata" + +#: ../src/common/docview.cpp:1469 msgid "Select a document template" msgstr "Valitse dokumenttipohja" -#: ../src/common/docview.cpp:1291 ../src/common/docview.cpp:1295 -#: ../src/common/docview.cpp:1322 src/common/docview.cpp:1266 +#: ../src/common/docview.cpp:1494 msgid "Select a document view" msgstr "Valitse dokumentin näkymä" -#: ../src/common/docview.cpp:1185 ../src/common/docview.cpp:1189 -#: ../src/common/docview.cpp:1216 ../src/common/docview.cpp:1223 -#: ../src/common/docview.cpp:1227 ../src/common/docview.cpp:1254 -#: src/common/docview.cpp:1168 src/common/docview.cpp:1198 +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 msgid "Select a file" msgstr "Valitse tiedosto" -#: ../src/generic/dcpsg.cpp:1910 ../src/generic/dcpsg.cpp:1911 -#: ../src/generic/dcpsg.cpp:2032 src/generic/dcpsg.cpp:1868 +#: ../src/generic/dcpsg.cpp:2264 msgid "Send to Printer" msgstr "Lähetä tulostimelle" -#: ../src/generic/prntdlgg.cpp:137 ../src/generic/prntdlgg.cpp:144 -#: src/generic/prntdlgg.cpp:80 +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "" + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Asetukset" + +#: ../src/generic/prntdlgg.cpp:155 msgid "Setup..." msgstr "Asetukset..." -#: ../src/common/layout.cpp:1366 ../src/common/layout.cpp:1371 -#: src/common/layout.cpp:1326 -msgid "Sizer error" -msgstr "Virhe (sizer)" +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "" -#: ../src/generic/fontdlgg.cpp:216 ../src/generic/fontdlgg.cpp:218 -#: src/generic/fontdlgg.cpp:218 +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:214 msgid "Slant" msgstr "Slant" -#: ../src/common/docview.cpp:285 ../src/common/docview.cpp:291 -#: src/common/docview.cpp:252 +#: ../src/common/docview.cpp:306 msgid "Sorry, could not open this file for saving." msgstr "Ei voi avata tiedostoa tallennettavaksi." -#: ../src/common/docview.cpp:316 ../src/common/docview.cpp:322 -#: ../src/common/docview.cpp:327 ../src/common/docview.cpp:333 -#: src/common/docview.cpp:283 src/common/docview.cpp:289 +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 msgid "Sorry, could not open this file." msgstr "Tiedostoa ei voi avata." -#: ../src/common/docview.cpp:292 ../src/common/docview.cpp:298 -#: src/common/docview.cpp:259 +#: ../src/common/docview.cpp:313 msgid "Sorry, could not save this file." msgstr "Tiedostoa ei voi tallentaa." -#: ../src/common/prntbase.cpp:658 ../src/common/prntbase.cpp:668 -#: src/common/prntbase.cpp:655 +#: ../src/common/prntbase.cpp:687 msgid "Sorry, not enough memory to create a preview." msgstr "Liian vähän muistia esikatseluun." -#: ../src/common/log.cpp:787 ../src/common/log.cpp:803 src/common/log.cpp:781 +#: ../src/common/paper.cpp:111 +#, fuzzy +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Letter 8 1/2 x 11 in" + +#: ../src/generic/logg.cpp:598 msgid "Status: " msgstr "Tila: " -#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:214 -#: src/generic/fontdlgg.cpp:214 +#: ../src/generic/fontdlgg.cpp:210 msgid "Swiss" msgstr "Swiss" -#: ../src/generic/fontdlgg.cpp:213 ../src/generic/fontdlgg.cpp:215 -#: src/generic/fontdlgg.cpp:215 +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +#, fuzzy +msgid "TIFF: Couldn't allocate memory." +msgstr "Ajastimen luonti epäonnistui" + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "" + +#: ../src/common/imagtiff.cpp:214 +#, fuzzy +msgid "TIFF: Error reading image." +msgstr "Hakemiston luonnissa virhe" + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "" + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "" + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:211 msgid "Teletype" msgstr "Teletype" -#: ../src/common/docview.cpp:1268 ../src/common/docview.cpp:1272 -#: ../src/common/docview.cpp:1299 src/common/docview.cpp:1243 +#: ../src/common/docview.cpp:1469 msgid "Templates" msgstr "Pohjat" -#: ../src/generic/dirdlgg.cpp:231 ../src/generic/dirdlgg.cpp:235 -#: src/generic/dirdlgg.cpp:231 +#: ../src/generic/dirdlgg.cpp:218 msgid "Temporary" msgstr "Väliaikainen" -#: ../src/generic/dirdlgg.cpp:223 ../src/generic/dirdlgg.cpp:227 -#: src/generic/dirdlgg.cpp:223 +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/generic/dirdlgg.cpp:210 msgid "The Computer" msgstr "Tietokone" -#: ../src/generic/dirdlgg.cpp:447 ../src/generic/dirdlgg.cpp:451 -#: src/generic/dirdlgg.cpp:447 +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "" + +#: ../src/generic/dirdlgg.cpp:536 msgid "The directory " msgstr "Hakemisto" -#: ../src/msw/thread.cpp:730 src/msw/thread.cpp:719 +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "" + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "" + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "" + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" + +#: ../src/msw/thread.cpp:1083 msgid "" "Thread module initialization failed: can not store value in thread local " "storage" msgstr "" "Säiemoduulin käynnistys epäonnistui: arvoa ei voi tallentaa säikeen muistiin" -#: src/gtk/threadpsx.cpp:708 -msgid "Thread module initialization failed: failed to create pthread key." -msgstr "Säiemoduulin käynnistys epäonnistui: pthread-avaimen luonti ei onnistu." +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "Säiemoduulin käynnistys epäonnistui: säieavainta ei voi luoda" -#: ../src/msw/thread.cpp:716 src/msw/thread.cpp:705 +#: ../src/msw/thread.cpp:1071 msgid "" "Thread module initialization failed: impossible to allocate index in thread " "local storage" msgstr "" -"Säiemoduulin käynnistys epäonnistui: indexin varaus säikeen muistiin mahdotonta" +"Säiemoduulin käynnistys epäonnistui: indexin varaus säikeen muistiin " +"mahdotonta" -#: ../src/generic/prntdlgg.cpp:162 ../src/generic/prntdlgg.cpp:169 -#: src/generic/prntdlgg.cpp:101 +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "" + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Päivän vinkki" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Valitettavasti vinkkejä ei ole!" + +#: ../src/generic/prntdlgg.cpp:191 msgid "To:" msgstr "Vastaanottaja:" -#: ../src/generic/prntdlgg.cpp:637 ../src/generic/prntdlgg.cpp:644 -#: src/generic/prntdlgg.cpp:530 +#: ../src/generic/prntdlgg.cpp:650 msgid "Top margin (mm):" msgstr "Ylämarginaali (mm):" -#: ../src/generic/fontdlgg.cpp:244 ../src/generic/fontdlgg.cpp:246 -#: src/generic/fontdlgg.cpp:246 +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "" + +#: ../src/generic/fontdlgg.cpp:242 msgid "Underline" msgstr "Alleviivaus" @@ -1238,760 +2360,831 @@ msgstr "Alleviivaus" #: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 #: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 #: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 -#: ../src/common/resource.cpp:1670 ../src/common/resource.cpp:1671 -#: ../src/common/resource.cpp:1684 ../src/common/resource.cpp:1685 -#: ../src/common/resource.cpp:1701 ../src/common/resource.cpp:1702 -#: ../src/common/resource.cpp:1715 ../src/common/resource.cpp:1716 -#: ../src/common/resource.cpp:2748 ../src/common/resource.cpp:2752 -#: ../src/common/resource.cpp:2762 ../src/common/resource.cpp:2766 -#: ../src/common/resource.cpp:2779 ../src/common/resource.cpp:2783 -#: ../src/common/resource.cpp:2793 ../src/common/resource.cpp:2797 -#: src/common/resourc2.cpp:305 src/common/resourc2.cpp:319 -#: src/common/resourc2.cpp:335 src/common/resourc2.cpp:349 -#: src/common/resourc2.cpp:1378 src/common/resourc2.cpp:1392 -#: src/common/resourc2.cpp:1408 src/common/resourc2.cpp:1422 -#: src/common/resource.cpp:1653 src/common/resource.cpp:1667 -#: src/common/resource.cpp:1683 src/common/resource.cpp:1697 -#: src/common/resource.cpp:2726 src/common/resource.cpp:2740 -#: src/common/resource.cpp:2756 src/common/resource.cpp:2770 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 msgid "Unexpected end of file whilst parsing resource." msgstr "Odottamaton tiedoston loppuminen resursseja jäsennellessä." -#: ../src/common/mimetype.cpp:1019 ../src/common/mimetype.cpp:1021 -#: src/common/mimetype.cpp:985 +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "" + +#: ../src/unix/mimetype.cpp:1338 #, c-format msgid "Unknown field in file %s, line %d: '%s'." msgstr "Tuntematon kenttä tiedostossa %s, rivillä %d: '%s'." -#: ../src/common/mimetype.cpp:379 ../src/common/mimetype.cpp:381 -#: src/common/mimetype.cpp:363 +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "" + +#: ../src/common/cmdline.cpp:518 +#, fuzzy, c-format +msgid "Unknown option '%s'" +msgstr "URL:ää '%s' ei voitu avata" + +#: ../src/common/mimecmn.cpp:161 #, c-format msgid "Unmatched '{' in an entry for mime type %s." msgstr "Sopimaton '{' mime tyypin %s kohdalla." -#: ../src/common/docview.cpp:1703 ../src/common/docview.cpp:1707 -#: ../src/common/docview.cpp:1718 ../src/common/docview.cpp:1722 -#: ../src/common/docview.cpp:1734 ../src/common/docview.cpp:1745 -#: ../src/common/docview.cpp:1749 ../src/common/docview.cpp:1776 -#: src/common/docview.cpp:1665 src/common/docview.cpp:1680 -#: src/common/docview.cpp:1707 +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 msgid "Unnamed command" msgstr "Nimeämätön komento" -#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2053 -#: ../src/common/resource.cpp:2057 src/common/resourc2.cpp:687 -#: src/common/resource.cpp:2035 +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 #, c-format msgid "Unrecognized style %s whilst parsing resource." msgstr "Tunnistamaton tyyli %s resursseja jäsennellessä." -#: ../src/msw/clipbrd.cpp:220 ../src/msw/clipbrd.cpp:254 -#: ../src/msw/clipbrd.cpp:330 ../src/msw/clipbrd.cpp:353 -#: src/msw/clipbrd.cpp:220 src/msw/clipbrd.cpp:330 +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 msgid "Unsupported clipboard format." msgstr "Leikepöydän formaattia ei ole tuettu." -#: ../src/generic/dirdlgg.cpp:227 ../src/generic/dirdlgg.cpp:231 -#: src/generic/dirdlgg.cpp:227 +#: ../src/common/cmdline.cpp:797 +#, fuzzy, c-format +msgid "Usage: %s" +msgstr "Sivu %d" + +#: ../src/generic/dirdlgg.cpp:215 msgid "User" msgstr "Käyttäjä" -#: ../src/generic/dirdlgg.cpp:228 ../src/generic/dirdlgg.cpp:232 -#: src/generic/dirdlgg.cpp:228 +#: ../src/generic/dirdlgg.cpp:214 msgid "User Local" msgstr "Paikallinen käyttäjä" -#: ../src/common/valtext.cpp:188 ../src/common/valtext.cpp:194 -#: src/common/valtext.cpp:144 src/common/valtext.cpp:155 -#: src/common/valtext.cpp:164 src/common/valtext.cpp:172 -#: src/common/valtext.cpp:180 src/common/valtext.cpp:189 +#: ../src/common/valtext.cpp:188 msgid "Validation conflict" msgstr "Laillisuuskonflikti" -#: ../src/generic/dirdlgg.cpp:229 ../src/generic/dirdlgg.cpp:233 -#: src/generic/dirdlgg.cpp:229 +#: ../src/generic/dirdlgg.cpp:216 msgid "Variables" msgstr "Muuttujat" -#: ../src/common/docview.cpp:1291 ../src/common/docview.cpp:1295 -#: ../src/common/docview.cpp:1322 src/common/docview.cpp:1266 +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "" + +#: ../src/common/docview.cpp:1494 msgid "Views" msgstr "Näkymät" -#: ../src/common/docview.cpp:401 ../src/common/docview.cpp:420 -#: ../src/common/log.cpp:478 ../src/common/log.cpp:482 -#: ../src/common/resource.cpp:119 ../src/common/resource.cpp:121 -#: src/common/docview.cpp:368 src/common/resource.cpp:121 +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Aliprosessin keskeytymisen odotus epäonnistui" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 msgid "Warning" msgstr "Varoitus" -#: ../src/common/log.cpp:329 ../src/common/log.cpp:333 src/common/log.cpp:336 +#: ../src/common/log.cpp:366 msgid "Warning: " msgstr "Varoitus: " -#: ../src/generic/dcpsg.cpp:1967 ../src/generic/dcpsg.cpp:1968 -#: ../src/generic/dcpsg.cpp:2089 src/generic/dcpsg.cpp:1925 +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "" + +#: ../src/common/fontmap.cpp:100 +msgid "Western European (ISO-8859-1)" +msgstr "" + +#: ../src/common/fontmap.cpp:114 +msgid "Western European with Euro (ISO-8859-15)" +msgstr "" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "" + +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "" + +#: ../src/common/fontmap.cpp:116 +msgid "Windows Central European (CP 1250)" +msgstr "" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "" + +#: ../src/common/fontmap.cpp:118 +msgid "Windows Western European (CP 1252)" +msgstr "" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "" + +#: ../src/common/ffile.cpp:168 +#, fuzzy, c-format +msgid "Write error on file '%s'" +msgstr "tiedostoa '%s' ei voi avata" + +#: ../src/generic/dcpsg.cpp:2321 msgid "X Scaling" msgstr "X skaalaus" -#: ../src/generic/dcpsg.cpp:1976 ../src/generic/dcpsg.cpp:1977 -#: ../src/generic/dcpsg.cpp:2098 src/generic/dcpsg.cpp:1934 +#: ../src/generic/dcpsg.cpp:2330 msgid "X Translation" msgstr "X käännös" -#: ../src/generic/dcpsg.cpp:1971 ../src/generic/dcpsg.cpp:1972 -#: ../src/generic/dcpsg.cpp:2093 src/generic/dcpsg.cpp:1929 +#: ../src/generic/dcpsg.cpp:2325 msgid "Y Scaling" msgstr "Y skaalaus" -#: ../src/generic/dcpsg.cpp:1980 ../src/generic/dcpsg.cpp:1981 -#: ../src/generic/dcpsg.cpp:2102 src/generic/dcpsg.cpp:1938 +#: ../src/generic/dcpsg.cpp:2334 msgid "Y Translation" msgstr "Y käännös" -#: ../src/generic/extdlgg.cpp:101 ../src/generic/extdlgg.cpp:109 -#: ../src/generic/msgdlgg.cpp:109 ../src/generic/msgdlgg.cpp:147 -#: ../src/gtk/msgdlg.cpp:123 src/generic/msgdlgg.cpp:130 +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 msgid "Yes" msgstr "Kyllä" -#: ../src/common/docview.cpp:1814 ../src/common/docview.cpp:1818 -#: ../src/common/docview.cpp:1845 src/common/docview.cpp:1777 +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "" + +#: ../src/common/docview.cpp:2034 msgid "[EMPTY]" msgstr "[TYHJÄ]" -#: ../src/common/time.cpp:358 src/common/time.cpp:358 -msgid "am" -msgstr "am" +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "" -#: ../src/common/fileconf.cpp:1265 ../src/common/fileconf.cpp:1266 -#: src/common/CVS/Base/fileconf.cpp:1269 src/common/fileconf.cpp:1269 +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "" + +#: ../src/msw/dde.cpp:1000 +#, fuzzy +msgid "a memory allocation failed." +msgstr "Pipe luonti epäonnistui" + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" + +#: ../src/msw/dde.cpp:1006 +#, fuzzy +msgid "a transaction failed." +msgstr "Pipe luonti epäonnistui" + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "" + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" + +#: ../src/common/fileconf.cpp:1449 #, c-format msgid "attempt to change immutable key '%s' ignored." msgstr "muuttumattoman avaimen '%s' muutosyritys ohitettu." -#: ../src/common/string.cpp:1703 ../src/common/string.cpp:1830 -#: src/common/string.cpp:1430 -msgid "bad index in wxArrayString::Remove" -msgstr "wxArrayString::Remove - väärä indeksi" +#: ../src/common/ffile.cpp:101 +#, fuzzy, c-format +msgid "can't close file '%s'" +msgstr "tiedostoa '%s' ei voi avata" -#: ../src/common/file.cpp:273 ../src/common/file.cpp:274 -#: src/common/file.cpp:268 +#: ../src/common/file.cpp:257 #, c-format msgid "can't close file descriptor %d" msgstr "tiedoston kuvausta %d ei voida sulkea" -#: ../src/msw/registry.cpp:403 src/msw/registry.cpp:403 -#, c-format -msgid "can't close registry key '%s'" -msgstr "rekisteriavainta '%s' ei voida sulkea" - -#: ../src/common/file.cpp:563 ../src/common/file.cpp:564 -#: src/common/file.cpp:520 +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 #, c-format msgid "can't commit changes to file '%s'" msgstr "muutoksia tiedostoon '%s' ei voi tehdä" -#: ../src/common/file.cpp:224 ../src/common/file.cpp:225 -#: src/common/file.cpp:215 +#: ../src/common/file.cpp:200 #, c-format msgid "can't create file '%s'" msgstr "tiedoston '%s' luonti ei onnistu" -#: ../src/msw/registry.cpp:386 src/msw/registry.cpp:386 -#, c-format -msgid "can't create registry key '%s'" -msgstr "rekisteriavaimen '%s' luonti ei onnistu" - -#: ../src/msw/registry.cpp:467 src/msw/registry.cpp:467 -#, c-format -msgid "can't delete key '%s'" -msgstr "avainta '%s' ei voi poistaa" - -#: ../src/common/fileconf.cpp:735 ../src/common/fileconf.cpp:736 -#: src/common/CVS/Base/fileconf.cpp:742 src/common/fileconf.cpp:742 +#: ../src/common/fileconf.cpp:919 #, c-format msgid "can't delete user configuration file '%s'" msgstr "käyttäjän asetustiedostoa '%s' ei voi poistaa" -#: ../src/msw/registry.cpp:492 src/msw/registry.cpp:492 -#, c-format -msgid "can't delete value '%s' from key '%s'" -msgstr "arvon '%s' poisto avaimesta '%s' ei onnistu" - -#: ../src/msw/registry.cpp:503 src/msw/registry.cpp:503 -#, c-format -msgid "can't delete value of key '%s'" -msgstr "avaimen '%s' arvoa ei voi poistaa" - -#: src/common/file.cpp:447 +#: ../src/common/file.cpp:438 #, c-format msgid "can't determine if the end of file is reached on descriptor %d" msgstr "" -#: ../src/msw/registry.cpp:780 ../src/msw/registry.cpp:791 -#: src/msw/registry.cpp:780 -#, c-format -msgid "can't enumerate subkeys of key '%s'" -msgstr "avaimen '%s' ala-avaimia ei voi luetella" - -#: ../src/msw/registry.cpp:735 ../src/msw/registry.cpp:746 -#: src/msw/registry.cpp:735 -#, c-format -msgid "can't enumerate values of key '%s'" -msgstr "avaimen '%s' arvoja ei voi luetella" - -#: ../src/common/file.cpp:418 ../src/common/file.cpp:419 -#: src/common/file.cpp:413 +#: ../src/common/file.cpp:404 #, c-format msgid "can't find length of file on file descriptor %d" msgstr "tiedoston kokoa ei löydy tiedoston kuvauksesta %d" -#: ../src/msw/utils.cpp:584 ../src/msw/utils.cpp:622 src/msw/utils.cpp:561 +#: ../src/msw/utils.cpp:378 msgid "can't find user's HOME, using current directory." msgstr "käyttäjän kotihakemistoa ei löydy, käytetään nykyistä hakemistoa." -#: ../src/common/file.cpp:332 ../src/common/file.cpp:333 -#: src/common/file.cpp:327 +#: ../src/common/file.cpp:319 #, c-format msgid "can't flush file descriptor %d" msgstr "tiedoston kuvausta %d ei voida tyhjentää" -#: ../src/msw/registry.cpp:335 src/msw/registry.cpp:335 -#, c-format -msgid "can't get info about registry key '%s'" -msgstr "tiedon saanti rekisteriavaimesta '%s' ei onnistu" - -#: ../src/common/file.cpp:386 ../src/common/file.cpp:387 -#: src/common/file.cpp:381 +#: ../src/common/file.cpp:373 #, c-format msgid "can't get seek position on file descriptor %d" msgstr "paikanmääritys tiedoston kuvauksessa %d ei onnistu" -#: ../src/common/file.cpp:259 ../src/common/file.cpp:260 -#: src/common/file.cpp:254 +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 #, c-format msgid "can't open file '%s'" msgstr "tiedostoa '%s' ei voi avata" -#: ../src/common/fileconf.cpp:182 ../src/common/fileconf.cpp:183 -#: src/common/CVS/Base/fileconf.cpp:186 src/common/fileconf.cpp:186 +#: ../src/common/fileconf.cpp:318 #, c-format msgid "can't open global configuration file '%s'." msgstr "globaalin asetustiedoston '%s' avaus ei onnistu" -#: ../src/msw/registry.cpp:361 src/msw/registry.cpp:361 -#, c-format -msgid "can't open registry key '%s'" -msgstr "rekisteriavaimen '%s' avaus ei onnistu" - -#: ../src/common/fileconf.cpp:194 ../src/common/fileconf.cpp:195 -#: src/common/CVS/Base/fileconf.cpp:198 src/common/fileconf.cpp:198 +#: ../src/common/fileconf.cpp:330 #, c-format msgid "can't open user configuration file '%s'." msgstr "käyttäjän asetustiedoston '%s' avaus ei onnistu." -#: ../src/common/fileconf.cpp:641 ../src/common/fileconf.cpp:642 -#: src/common/CVS/Base/fileconf.cpp:646 src/common/fileconf.cpp:646 +#: ../src/common/fileconf.cpp:799 msgid "can't open user configuration file." msgstr "käyttäjän asetustiedoston avaus ei onnistu." -#: ../src/common/file.cpp:299 ../src/common/file.cpp:300 -#: src/common/file.cpp:294 +#: ../src/common/file.cpp:285 #, c-format msgid "can't read from file descriptor %d" msgstr "tiedoston kuvauksen %d luku epäonnistui" -#: ../src/msw/registry.cpp:658 ../src/msw/registry.cpp:670 -#: src/msw/registry.cpp:658 -#, c-format -msgid "can't read value of '%s'" -msgstr "ei voida lukea arvoa '%s'" - -#: ../src/msw/registry.cpp:569 ../src/msw/registry.cpp:581 -#: ../src/msw/registry.cpp:608 ../src/msw/registry.cpp:620 -#: src/msw/registry.cpp:569 src/msw/registry.cpp:608 -#, c-format -msgid "can't read value of key '%s'" -msgstr "ei voida lukea arvoa avaimesta '%s'" - -#: ../src/common/file.cpp:558 ../src/common/file.cpp:559 -#: src/common/file.cpp:515 +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 #, c-format msgid "can't remove file '%s'" msgstr "tiedoston '%s' poisto ei onnistu" -#: ../src/common/file.cpp:574 ../src/common/file.cpp:575 -#: src/common/file.cpp:531 +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 #, c-format msgid "can't remove temporary file '%s'" msgstr "väliaikaistiedoston '%s' poisto ei onnistu" -#: ../src/common/file.cpp:372 ../src/common/file.cpp:373 -#: src/common/file.cpp:367 +#: ../src/common/file.cpp:359 #, c-format msgid "can't seek on file descriptor %d" msgstr "" -#: ../src/msw/registry.cpp:594 ../src/msw/registry.cpp:606 -#: ../src/msw/registry.cpp:682 ../src/msw/registry.cpp:694 -#: src/msw/registry.cpp:594 src/msw/registry.cpp:682 -#, c-format -msgid "can't set value of '%s'" -msgstr "ei voida asettaa arvoa '%s'" - -#: src/common/CVS/Base/fileconf.cpp:594 src/common/fileconf.cpp:594 -msgid "can't set value of a group!" -msgstr "ryhmän arvoa ei voi asettaa!" - -#: ../src/common/textfile.cpp:237 ../src/common/textfile.cpp:243 -#: src/common/textfile.cpp:229 +#: ../src/common/textfile.cpp:359 #, c-format msgid "can't write file '%s' to disk." msgstr "tiedostoa '%s' ei voida kirjottaa levylle." -#: ../src/common/file.cpp:317 ../src/common/file.cpp:318 -#: src/common/file.cpp:312 +#: ../src/common/file.cpp:304 #, c-format msgid "can't write to file descriptor %d" msgstr "tiedoston kuvaukseen %d kirjoittaminen epäonnistui" -#: ../src/common/fileconf.cpp:648 ../src/common/fileconf.cpp:649 -#: src/common/CVS/Base/fileconf.cpp:653 src/common/fileconf.cpp:653 +#: ../src/common/fileconf.cpp:806 msgid "can't write user configuration file." msgstr "käyttäjän asetustiedoston kirjoitus epäonnistui." -#: ../src/common/intl.cpp:301 ../src/common/intl.cpp:334 -#: src/common/intl.cpp:300 +#: ../src/common/intl.cpp:374 #, c-format msgid "catalog file for domain '%s' not found." msgstr "luettelotiedostoa domainille '%s' ei löydy." -#: ../src/common/filefn.cpp:1527 src/common/filefn.cpp:1497 -msgid "empty file name in wxFindFileInPath" -msgstr "tyhjä tiedostonimi paikassa wxFindFileInPath" +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" -#: ../src/common/fileconf.cpp:1252 ../src/common/fileconf.cpp:1253 -#: src/common/CVS/Base/fileconf.cpp:1256 src/common/fileconf.cpp:1256 +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3162 +#, fuzzy +msgid "eighth" +msgstr "Light" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "" + +#: ../src/common/fileconf.cpp:1436 #, c-format msgid "entry '%s' appears more than once in group '%s'" msgstr "kohta '%s' ilmenee useammin kuin kerran ryhmässä '%s'" -#: ../src/common/fileconf.cpp:334 ../src/common/fileconf.cpp:335 -#: src/common/CVS/Base/fileconf.cpp:338 src/common/fileconf.cpp:338 +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "" + +#: ../src/common/ffile.cpp:182 +#, fuzzy, c-format +msgid "failed to flush the file '%s'" +msgstr "Loki tallennettu tiedostoon '%s'." + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3159 +#, fuzzy +msgid "fifth" +msgstr "shift" + +#: ../src/common/fileconf.cpp:480 #, c-format msgid "file '%s', line %d: '%s' ignored after group header." msgstr "tiedosto '%s', rivi %d: '%s' ohitettu ryhmäotsikon jälkeen." -#: ../src/common/fileconf.cpp:360 ../src/common/fileconf.cpp:361 -#: src/common/CVS/Base/fileconf.cpp:357 src/common/fileconf.cpp:357 +#: ../src/common/fileconf.cpp:509 #, c-format msgid "file '%s', line %d: '=' expected." msgstr "tiedosto '%s', rivi %d: '=' odotettu." -#: ../src/common/fileconf.cpp:387 ../src/common/fileconf.cpp:388 -#: src/common/CVS/Base/fileconf.cpp:384 src/common/fileconf.cpp:384 +#: ../src/common/fileconf.cpp:535 #, c-format msgid "file '%s', line %d: key '%s' was first found at line %d." msgstr "tiedosto '%s', rivi %d: avain '%s' löytyi ensiksi riviltä %d." -#: ../src/common/fileconf.cpp:376 ../src/common/fileconf.cpp:377 -#: src/common/CVS/Base/fileconf.cpp:373 src/common/fileconf.cpp:373 +#: ../src/common/fileconf.cpp:525 #, c-format msgid "file '%s', line %d: value for immutable key '%s' ignored." msgstr "tiedosto '%s', rivi %d: muuttamattoman avaimen '%s' arvo ohitettu." -#: ../src/common/fileconf.cpp:302 ../src/common/fileconf.cpp:303 -#: src/common/CVS/Base/fileconf.cpp:307 src/common/fileconf.cpp:307 +#: ../src/common/fileconf.cpp:448 #, c-format msgid "file '%s': unexpected character %c at line %d." msgstr "tiedosto '%s': odottamaton merkki %c rivillä %d." -#: ../src/common/date.cpp:374 ../src/common/date.cpp:377 -#: ../src/common/date.cpp:392 ../src/common/date.cpp:395 -#: ../src/common/date.cpp:406 ../src/common/date.cpp:409 -#: src/common/date.cpp:373 src/common/date.cpp:391 src/common/date.cpp:405 -msgid "invalid date" +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "" + +#: ../src/msw/dialup.cpp:861 +#, fuzzy +msgid "initiate" msgstr "virheellinen päivämäärä" -#: ../src/common/date.cpp:356 ../src/common/date.cpp:359 -#: src/common/date.cpp:355 -msgid "invalid day" -msgstr "virheellinen päivä" - -#: ../src/common/file.cpp:457 ../src/common/file.cpp:458 -#: src/common/file.cpp:452 +#: ../src/common/file.cpp:442 msgid "invalid eof() return value." msgstr "virheellinen eof() palautusarvo" -#: ../src/common/log.cpp:690 ../src/common/log.cpp:705 src/common/log.cpp:685 +#: ../src/generic/logg.cpp:1037 msgid "invalid message box return value" msgstr "virheellinen viestilaatikon palautusarvo" -#: ../src/common/date.cpp:364 ../src/common/date.cpp:367 -#: src/common/date.cpp:363 -msgid "invalid month" -msgstr "virheellinen kuukausi" +#: ../src/html/helpfrm.cpp:874 +#, fuzzy +msgid "large" +msgstr "Sivut" -#: ../src/common/intl.cpp:432 ../src/common/intl.cpp:465 -#: src/common/intl.cpp:431 +#: ../src/common/intl.cpp:575 #, c-format msgid "locale '%s' can not be set." msgstr "localea '%s' ei voida asettaa." -#: ../src/common/intl.cpp:296 ../src/common/intl.cpp:329 -#: src/common/intl.cpp:295 +#: ../src/common/intl.cpp:369 #, c-format msgid "looking for catalog '%s' in path '%s'." msgstr "etsitään luetteloa '%s' polussa '%s'." -#: ../src/common/time.cpp:360 src/common/time.cpp:360 -msgid "pm" -msgstr "pm" +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "" -#: ../src/common/string.cpp:1719 ../src/common/string.cpp:1846 -#: src/common/string.cpp:1446 -msgid "removing inexistent element in wxArrayString::Remove" -msgstr "poistetaan olematon elementti käskyssä wxArrayString::Remove" +#: ../src/common/datetime.cpp:3319 +#, fuzzy +msgid "midnight" +msgstr "Light" -#: ../src/common/intl.cpp:521 ../src/common/intl.cpp:554 -#: src/common/intl.cpp:519 -#, c-format -msgid "string '%s' not found in domain '%s' for locale '%s'." -msgstr "merkkijonoa '%s' ei löydy domainista '%s' localelle '%s'." +#: ../src/common/timercmn.cpp:236 +#, fuzzy +msgid "mktime() failed" +msgstr "Haarukointi epäonnistui" -#: ../src/common/intl.cpp:526 ../src/common/intl.cpp:559 -#: src/common/intl.cpp:524 -#, c-format -msgid "string '%s' not found in locale '%s'." -msgstr "merkkijonoa '%s' ei löydy localelle '%s'." +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "" -#: ../src/common/fileconf.cpp:1372 ../src/common/fileconf.cpp:1373 -#: src/common/CVS/Base/fileconf.cpp:1376 src/common/fileconf.cpp:1376 +#: ../src/common/datetime.cpp:3163 +#, fuzzy +msgid "ninth" +msgstr "Tulosta" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "" + +#: ../src/html/helpdata.cpp:644 +#, fuzzy +msgid "noname" +msgstr "nimeämätön" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "" + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3160 +#, fuzzy +msgid "sixth" +msgstr "shift" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "" + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "" + +#: ../src/common/fileconf.cpp:1556 #, c-format msgid "unexpected \" at position %d in '%s'." msgstr "odottamaton \" paikassa %d '%s'." -#: src/common/log.cpp:362 -msgid "unknown log level in wxLog::DoLog" -msgstr "tuntematon lokitaso käskyssä wxLog::DoLog" +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "" -#: src/common/log.cpp:559 -msgid "unknown log level in wxLogGui::DoLog" -msgstr "tuntematon lokitaso käskyssä wxLogGui::DoLog" +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "" -#: ../src/common/file.cpp:367 ../src/common/file.cpp:368 -#: src/common/file.cpp:362 +#: ../src/common/textfile.cpp:237 +msgid "unknown line terminator" +msgstr "" + +#: ../src/common/file.cpp:342 msgid "unknown seek origin" msgstr "" -#: ../src/common/docview.cpp:370 ../src/common/docview.cpp:389 -#: src/common/docview.cpp:337 +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "" + +#: ../src/common/docview.cpp:406 msgid "unnamed" msgstr "nimeämätön" -#: ../src/common/docview.cpp:1055 ../src/common/docview.cpp:1082 -#: src/common/docview.cpp:1009 +#: ../src/common/docview.cpp:1188 #, c-format msgid "unnamed%d" msgstr "nimeämätön %d" -#: ../src/common/intl.cpp:306 ../src/common/intl.cpp:339 -#: src/common/intl.cpp:305 +#: ../src/common/intl.cpp:379 #, c-format msgid "using catalog '%s' from '%s'." msgstr "käytössä luettelo '%s' '%s'sta." -#: ../src/common/layout.cpp:1366 ../src/common/layout.cpp:1371 -#: src/common/layout.cpp:1326 -msgid "wxExpandSizer has no parent!" +#: ../src/html/helpfrm.cpp:874 +msgid "very large" msgstr "" -#: ../src/common/prntbase.cpp:635 ../src/common/prntbase.cpp:645 -#: src/common/prntbase.cpp:632 -msgid "" -"wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to " -"let me know about the canvas!" +#: ../src/html/helpfrm.cpp:874 +msgid "very small" msgstr "" -#: ../src/common/filefn.cpp:1134 src/common/filefn.cpp:1123 -msgid "wxWindows: error finding temporary file name.\n" -msgstr "wxWindows: virhe väliaikaistiedoston etsinnässä.\n" - -#: ../src/gtk/filedlg.cpp:79 -msgid "Please choose an existing file." -msgstr "Valitse olemassaoleva tiedosto." - -#: ../src/generic/printps.cpp:173 ../src/generic/printps.cpp:177 -#: ../src/generic/printps.cpp:179 -msgid "Printing..." -msgstr "Tulostetaan..." - -#: ../src/generic/printps.cpp:207 ../src/generic/printps.cpp:211 -#: ../src/generic/printps.cpp:212 -#, c-format -msgid "Printing page %d..." -msgstr "Tulostetaan sivua %d..." - -#: ../src/generic/dcpsg.cpp:2188 ../src/generic/dcpsg.cpp:2189 -#: ../src/generic/dcpsg.cpp:2310 -msgid "A4 sheet, 210 x 297 mm" -msgstr "A4 sheet, 210 x 297 mm" - -#: ../src/common/dynlib.cpp:187 ../src/common/dynlib.cpp:254 -#, c-format -msgid "Couldn't find symbol '%s' in a dynamic library" -msgstr "Symbolia '%s' ei löydy dynaamisesta kirjastosta" - -#: ../src/common/dynlib.cpp:215 ../src/common/dynlib.cpp:274 -#, c-format -msgid "Failed to load shared library '%s'" -msgstr "Jaetun kirjaston '%s' lataus epäonnistui" - -#: ../src/common/file.cpp:452 ../src/common/file.cpp:453 -#, c-format -msgid "" -"can't determine if the end of file is reached on descriptor " -"%d" +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." msgstr "" -#: ../src/common/fileconf.cpp:610 ../src/common/fileconf.cpp:611 -#, c-format -msgid "Config entry name cannot start with '%c'." -msgstr "Asetuskohdan nimi ei voi alkaa merkillä '%c'." +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "" -#: ../src/common/filefn.cpp:1003 -#, c-format -msgid "Directory '%s' couldn't be created" -msgstr "Hakemistoa '%s' ei onnistuttu luomaan" +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "" -#: ../src/common/string.cpp:1687 ../src/common/string.cpp:1814 -msgid "bad index in wxArrayString::Insert" -msgstr "wxArrayString::Insert - väärä/huono indeksi" - -#: ../src/common/valtext.cpp:140 ../src/common/valtext.cpp:146 -#, c-format -msgid "'%s' is invalid" -msgstr "'%s' on virheellinen" - -#: ../src/common/valtext.cpp:160 ../src/common/valtext.cpp:166 -#, c-format -msgid "'%s' should only contain ASCII characters." -msgstr "'%s' tulisi sisältää vain ASCII-merkkejä." - -#: ../src/common/valtext.cpp:166 ../src/common/valtext.cpp:172 -#, c-format -msgid "'%s' should only contain alphabetic characters." -msgstr "'%s' tulisi sisältää vain aakkosia." - -#: ../src/common/valtext.cpp:172 ../src/common/valtext.cpp:178 -#, c-format -msgid "'%s' should only contain alphabetic or numeric characters." -msgstr "'%s' tulisi sisältää vain aakkosia tai numeerisia merkkejä." - -#: ../src/common/valtext.cpp:178 ../src/common/valtext.cpp:184 -#, c-format -msgid "'%s' should be numeric." -msgstr "'%s' tulisi olla numeerinen." - -#: ../src/common/imagjpeg.cpp:169 ../src/common/imagjpeg.cpp:174 -msgid "Couldn't load a JPEG image - probably file is corrupted." -msgstr "JPEG-kuvatiedostoa ei voi avata - tiedosto ehkä korruptoitunut." - -#: ../src/common/imagjpeg.cpp:282 ../src/common/imagjpeg.cpp:287 -msgid "Couldn't save a JPEG image - probably file is corrupted." -msgstr "JPEG-kuvatiedostoa ei voi tallentaa - tiedosto ehkä korruptoitunut." - -#: ../src/motif/app.cpp:559 +#: ../src/motif/app.cpp:591 #, c-format msgid "wxWindows could not open display for '%s': exiting." msgstr "wxWindows ei voi avata ikkunaa prosessille '%s': lopettaa." -#: ../src/msw/app.cpp:198 ../src/msw/app.cpp:200 -msgid "Could not initialise Rich Edit DLL" -msgstr "Rich Edit DLL:n käynnistys ei onnistunut" +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: virhe väliaikaistiedoston etsinnässä.\n" -#: ../src/msw/app.cpp:653 ../src/msw/app.cpp:698 -msgid "Unrecoverable program error detected: the application will terminate." -msgstr "Peruuttamaton ohjelmavirhe havaittu: ohjelma keskeytetään." - -#: ../src/msw/app.cpp:655 ../src/msw/app.cpp:700 -msgid "Fatal Error" -msgstr "Tuhoisa virhe" - -#: ../src/msw/app.cpp:1125 ../src/msw/app.cpp:1165 -msgid "Fatal error: exiting" -msgstr "Tuhoisa virhe: lopetetaan" - -#: ../src/msw/dialog.cpp:140 ../src/msw/dialog.cpp:142 -#: ../src/msw/dialog.cpp:145 -msgid "Failed to create dialog." -msgstr "Dialogin luonti epäonnistui." - -#: ../src/unix/threadpsx.cpp:296 ../src/unix/threadpsx.cpp:298 -#: ../src/unix/threadpsx.cpp:302 -msgid "Cannot start thread: error writing TLS" -msgstr "Säikeen käynnistys epäonnistui: virhe TLS:n kirjoituksessa" - -#: ../src/unix/threadpsx.cpp:477 ../src/unix/threadpsx.cpp:518 -#: ../src/unix/threadpsx.cpp:527 -msgid "Cannot retrieve thread scheduling policy." +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" msgstr "" -#: ../src/unix/threadpsx.cpp:485 ../src/unix/threadpsx.cpp:526 -#: ../src/unix/threadpsx.cpp:535 -#, c-format -msgid "Cannot get priority range for scheduling policy %d." -msgstr "" +#, fuzzy +#~ msgid "..." +#~ msgstr "Uusi..." -#: ../src/unix/threadpsx.cpp:768 ../src/unix/threadpsx.cpp:813 -#: ../src/unix/threadpsx.cpp:827 -msgid "Thread module initialization failed: failed to create thread key" -msgstr "Säiemoduulin käynnistys epäonnistui: säieavainta ei voi luoda" +#~ msgid " B.C." +#~ msgstr " B.C." -#: ../src/unix/utilsunx.cpp:211 ../src/unix/utilsunx.cpp:222 -msgid "Waiting for subprocess termination failed" -msgstr "Aliprosessin keskeytymisen odotus epäonnistui" +#~ msgid "%s is invalid." +#~ msgstr "%s on virheellinen." -#: ../src/unix/utilsunx.cpp:449 ../src/unix/utilsunx.cpp:460 -msgid "Cannot get the hostname" -msgstr "Host-nimeä ei onnistuttu saamaan" +#~ msgid "%s should be numeric." +#~ msgstr "%s pitäisi olla numeerinen." -#: ../src/unix/utilsunx.cpp:485 ../src/unix/utilsunx.cpp:496 -msgid "Cannot get the official hostname" -msgstr "Virallista host-nimeä ei onnistuttu saamaan" +#~ msgid "%s should only contain ASCII characters." +#~ msgstr "%s saisi sisältää vain ASCII-merkkejä." -#: ../src/unix/utilsunx.cpp:547 ../src/unix/utilsunx.cpp:555 -#: ../src/unix/utilsunx.cpp:558 ../src/unix/utilsunx.cpp:566 -msgid "Error " -msgstr "Virhe " +#~ msgid "%s should only contain alphabetic characters." +#~ msgstr "%s saisi sisältää vain aakkosia." -#: ../src/msw/mdi.cpp:352 ../src/msw/mdi.cpp:355 -msgid "Failed to create MDI parent frame." -msgstr "" +#~ msgid "%s should only contain alphabetic or numeric characters." +#~ msgstr "%s saisi sisältää vain aakkosia tai numeerisia merkkejä." -#: ../src/msw/window.cpp:1342 ../src/msw/window.cpp:2225 -msgid "" -"Can't find dummy dialog template!\n" -"Check resource include path for finding wx.rc." -msgstr "" -"Dummy dialog -pohjaa ei löydy!\n" -"Tarkista resurssisisällön polku, jotta wx.rc löytyisi." +#~ msgid "Application Error" +#~ msgstr "Ohjelmavirhe" -#: ../src/msw/window.cpp:1368 ../src/msw/window.cpp:2266 -#, c-format -msgid "" -"Can't create window of class %s!\n" -"Possible Windows 3.x compatibility problem?" -msgstr "" -"%s luokan ikkunan luonti epäonnistui!\n" -"Mahdollisesti Windows 3.x yhteensopivuusongelma?" +#~ msgid "Can not create tooltip control" +#~ msgstr "Työkaluvihjeiden hallinnan luonti epäonnistui" -#: ../src/generic/dcpsg.cpp:1403 -msgid "Cannot open file for PostScript printing!" -msgstr "Tiedoston avaus PostScript-tulostukseen epäonnistui!" +#~ msgid "Can not get data in format '%s' from clipboard." +#~ msgstr "Datan haku leikepöydältä formaatissa '%s' epäonnistui." -#: ../src/generic/helpext.cpp:90 -#, c-format -msgid "Cannot open URL '%s'" -msgstr "URL:ää '%s' ei voitu avata" +#~ msgid "Can not put data in format '%s' on clipboard." +#~ msgstr "Datan lisäys leikepöydälle formaatissa '%s' epäonnistui." -#: ../src/generic/extdlgg.cpp:126 -msgid "Forward" -msgstr "Eteenpäin" +#~ msgid "Can not retrieve thread scheduling policy." +#~ msgstr "Säikeiden ajoittamisen haku epäonnistui." -#: ../src/generic/extdlgg.cpp:129 -msgid "Backward" -msgstr "Takaisin" +#~ msgid "Can't execute command '%s'" +#~ msgstr "'%s' komennon ajo epäonnistui" -#: ../src/generic/extdlgg.cpp:132 -msgid "Setup" -msgstr "Asetukset" +#~ msgid "Character '%c' is invalid in a config entry name." +#~ msgstr "Merkki '%c' on virheellinen asetuskohdan nimessä." -#: ../src/generic/extdlgg.cpp:135 -msgid "More..." -msgstr "Lisää..." +#~ msgid "Debug" +#~ msgstr "Debug" -#: ../src/generic/extdlgg.cpp:138 -msgid "Help" -msgstr "Apua" +#~ msgid "DoLogString must be overrided if it's called." +#~ msgstr "DoLogString täytyy korvata jos sitä kutsutaan." -#: ../src/generic/tipdlg.cpp:137 -msgid "Tips not available, sorry!" -msgstr "Valitettavasti vinkkejä ei ole!" +#~ msgid "Enter the name of the directory to create" +#~ msgstr "Anna nimi uudelle hakemistolle" -#: ../src/generic/tipdlg.cpp:161 -msgid "Tip of the Day" -msgstr "Päivän vinkki" +#~ msgid "Entry name can't start with '%c'." +#~ msgstr "Kohdan nimi ei voi alkaa '%c':lla." -#: ../src/generic/tipdlg.cpp:172 -msgid "&Show tips at startup" -msgstr "&Näytä vinkit käynnistyksessä" +#~ msgid "Failed to created dialog." +#~ msgstr "Dialogin luonti ei onnistunut." -#: ../src/generic/tipdlg.cpp:173 -msgid "&Next" -msgstr "&Seuraava" +#~ msgid "" +#~ "Mime.types file %s, line %d: extra characters after the field value " +#~ "ignored." +#~ msgstr "" +#~ "Mime.types tiedosto %s, rivi %d: ylimääräiset merkit kentän arvon jälkeen " +#~ "ohitettu." -#: ../src/generic/tipdlg.cpp:175 -msgid "Did you know..." -msgstr "Tiesitkö..." +#~ msgid "Print Error" +#~ msgstr "Tulostusvirhe" -#: ../src/msw/clipbrd.cpp:149 -#, c-format -msgid "Failed to allocate %dKb of memory for clipboard transfer." -msgstr "%dKb " +#~ msgid "Sizer error" +#~ msgstr "Virhe (sizer)" -#: ../src/msw/clipbrd.cpp:164 -#, c-format -msgid "Failed to set clipboard data in format %s" -msgstr "Leikepöydän datan formatointi muotoon %s epäonnistui" +#~ msgid "Thread module initialization failed: failed to create pthread key." +#~ msgstr "" +#~ "Säiemoduulin käynnistys epäonnistui: pthread-avaimen luonti ei onnistu." -#: ../src/msw/menu.cpp:156 -msgid "ctrl" -msgstr "ctrl" +#~ msgid "bad index in wxArrayString::Remove" +#~ msgstr "wxArrayString::Remove - väärä indeksi" -#: ../src/msw/menu.cpp:158 -msgid "alt" -msgstr "alt" +#~ msgid "can't set value of a group!" +#~ msgstr "ryhmän arvoa ei voi asettaa!" -#: ../src/msw/menu.cpp:160 -msgid "shift" -msgstr "shift" +#~ msgid "empty file name in wxFindFileInPath" +#~ msgstr "tyhjä tiedostonimi paikassa wxFindFileInPath" -#: ../src/generic/tipdlg.cpp:161 -msgid "Tip of the Day" -msgstr "P=E4iv=E4n vinkki" +#~ msgid "invalid day" +#~ msgstr "virheellinen päivä" -#: ../src/generic/tipdlg.cpp:172 -msgid "&Show tips at startup" -msgstr "&N=E4yt=E4 vinkit k=E4ynnistyksess=E4" +#~ msgid "invalid month" +#~ msgstr "virheellinen kuukausi" -#: ../src/generic/tipdlg.cpp:173 -msgid "&Next" -msgstr "&Seuraava" +#~ msgid "pm" +#~ msgstr "pm" -#: ../src/generic/tipdlg.cpp:175 -msgid "Did you know..." -msgstr "Tiesitk=F6..." +#~ msgid "removing inexistent element in wxArrayString::Remove" +#~ msgstr "poistetaan olematon elementti käskyssä wxArrayString::Remove" -#: ../src/msw/clipbrd.cpp:149 -#, c-format -msgid "Failed to allocate %dKb of memory for clipboard transfer." -msgstr "%dKb " +#~ msgid "string '%s' not found in domain '%s' for locale '%s'." +#~ msgstr "merkkijonoa '%s' ei löydy domainista '%s' localelle '%s'." -#: ../src/msw/clipbrd.cpp:164 -#, c-format -msgid "Failed to set clipboard data in format %s" -msgstr "Leikep=F6yd=E4n datan formatointi muotoon %s ep=E4onnistui" +#~ msgid "string '%s' not found in locale '%s'." +#~ msgstr "merkkijonoa '%s' ei löydy localelle '%s'." -#: ../src/msw/menu.cpp:156 -msgid "ctrl" -msgstr "ctrl" +#~ msgid "unknown log level in wxLog::DoLog" +#~ msgstr "tuntematon lokitaso käskyssä wxLog::DoLog" -#: ../src/msw/menu.cpp:158 -msgid "alt" -msgstr "alt" +#~ msgid "unknown log level in wxLogGui::DoLog" +#~ msgstr "tuntematon lokitaso käskyssä wxLogGui::DoLog" -#: ../src/msw/menu.cpp:160 -msgid "shift" -msgstr "shift" +#~ msgid "bad index in wxArrayString::Insert" +#~ msgstr "wxArrayString::Insert - väärä/huono indeksi" + +#~ msgid "Couldn't load a JPEG image - probably file is corrupted." +#~ msgstr "JPEG-kuvatiedostoa ei voi avata - tiedosto ehkä korruptoitunut." + +#~ msgid "Couldn't save a JPEG image - probably file is corrupted." +#~ msgstr "JPEG-kuvatiedostoa ei voi tallentaa - tiedosto ehkä korruptoitunut." + +#~ msgid "" +#~ "Unrecoverable program error detected: the application will terminate." +#~ msgstr "Peruuttamaton ohjelmavirhe havaittu: ohjelma keskeytetään." + +#~ msgid "Fatal Error" +#~ msgstr "Tuhoisa virhe" + +#~ msgid "Failed to allocate %dKb of memory for clipboard transfer." +#~ msgstr "%dKb " diff --git a/locale/fr.po b/locale/fr.po new file mode 100644 index 0000000000..293dfc595d --- /dev/null +++ b/locale/fr.po @@ -0,0 +1,3093 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows WX_2_2_BRANCH\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-12-04 19:44W. Europe Standard Time\n" +"Last-Translator: Stéphane Junique \n" +"Language-Team: wxWindows translators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(Avez-vous les permissions requises ?)" + +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"n'existe pas\n" +"Voulez-vous le créer maintenant ?" + +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (erreur %ld : %s)" + +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr " Aperçu" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr " octets " + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "Enveloppe #10, 4 1/8 x 9 1/2 pouces" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "Enveloppe #11, 4 1/2 x 10 3/8 pouces" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "Enveloppe #12, 4 3/4 x 11 pouces" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "Enveloppe #14, 5 x 11 1/2 pouces" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "Enveloppe #9, 3 7/8 x 8 7/8 pouces" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "#define %s doit être un entier." + +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i de %i" + +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (ou %s)" + +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s Erreur" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s Information" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s Alarme" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s n'est pas une spécification d'une ressource bitmap." + +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "%s n'est pas une spécification d'une ressource icône." + +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s : syntaxe du fichier de ressource incorrecte." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&Fermer" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&Détails" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Fin" + +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&Journal" + +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Suivant >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&Suivant >" + +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "&Prochain Conseil" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "&Refaire" + +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "&Refaire " + +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "&Enregistrer ..." + +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Afficher les conseils au démarrage" + +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "&Annuler" + +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "&Annuler " + +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&Fenêtre" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' a trop de '..', ils sont ignorés." + +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' n'est pas valide" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' n'est pas une valeur numérique correcte pour l'option '%s'." + +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' n'est pas un catalogue de messages valide." + +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "'%s' est probablement un fichier binaire." + +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' devrait être numérique." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' ne devrait contenir que des caractères ASCII." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' ne devrait contenir que des caractères alphabétiques." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "" +"'%s' ne devrait contenir que des caractères alphabétiques ou numériques." + +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(Aide)" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(signets)" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", static, #include ou #define\n" +"attendu au cours de l'analyse des ressources." + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 pouces" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 pouces" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "Enveloppe 6 3/4, 3 5/8 x 6 1/2 pouces" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": le ficheir n'existe pas!" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr " : jeu de caractères inconnu" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr " : codage inconnu" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &Retour" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr " " + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr " " + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" +"Normal
    (et souligné. Italique. Gras. " +"Gras italique.
    taille de police -2
    taille de police -1
    taille de " +"police +0
    taille de police +1
    taille de police +2
    taille de police +3
    taille de police +4

    Police à taille " +"fixe.
    gras italique gras italique souligné
    taille de police -2
    taille " +"de police -1
    taille de police +0
    taille de police +1
    taille de police +2
    taille de police +3
    taille de " +"police +4
    " + +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "feuille A3, 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "feuille A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "petite feuille A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "feuille A5, 148 x 210 mm" + +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "Ajouter la page courante aux signets" + +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "Ajouter aux couleurs personnalisées" + +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "Ajouter le livre %s" + +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "Tout" + +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "Tous les fichiers (*)|*" + +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "Tous les fichiers (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "Déjà en cours d'appel ISP." + +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "Ajouter le journal au fichier '%s' (choisir [Non] pour l'écraser) ?" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "Arabe (ISO-8859-6)" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "Enveloppe B4, 250 x 353 mm" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "feuille B4, 250 x 354 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "Enveloppe B5, 176 x 250 mm" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "feuille B5, 182 x 257 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "Enveloppe B6, 176 x 125 mm" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "" +"BMP : Impossible d'utiliser actuellement les fichiers codés sur 4 bits." + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP : Impossible d'allouer la mémoire nécessaire." + +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP : Sauvegarde de l'image impossible." + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP : Erreur d'écriture." + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP : Erreur d'écriture de l'en-tête du fichier." + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP : L'encodage ne correspond pas aux nombres de bits par pixel." + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP : La hauteur de l'image est > 32767 pixels pour le fichier." + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP : La largeur de l'image est > 32767 pixels pour le fichier." + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP : Nombre de bits par pixel inconnu dans le fichier." + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP : Codage inconnu dans le fichier." + +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "Retour" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Précédent" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Balte (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Balte (l'ancien) (ISO-8859-4)" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "La spécification de la ressource bitmap %s est introuvable." + +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "Gras" + +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "Marge bas de page (mm) :" + +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "feuille C, 17 x 22 mm" + +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "E&ffacer" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "Enveloppe C3, 324 x 458 mm" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "Enveloppe C4, 229 x 324 mm" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "Enveloppe C5, 162 x 229 mm" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "Enveloppe C6, 114 x 162 mm" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "Enveloppe C65, 114 x 229 mm" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "Impossible de créer l'objet événement." + +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "Impossible de créer le mutex" + +#: ../src/mac/thread.cpp:92 +msgid "Can not create mutex." +msgstr "Impossible de créer le mutex" + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "Impossible d'énumérer les fichiers dans le répertoire '%s'" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "Impossible de reprendre le thread %x" + +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "Impossible de démarrer le thread : erreur à l'écriture de TLS." + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "Impossible de suspendre le thread %x" + +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "Impossible d'attendre la fin du thread" + +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "Impossible d'&Annuler" + +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "" +"Impossible de vérifier le format du fichier image '%s' : le fichier n'existe " +"pas." + +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "Impossible de fermer la clé de registre '%s'" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "Impossible de copier les valeurs du type non supporté %d." + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" +"Impossible de créer une fenêtre avec un contrôle liste, vérifier que " +"comctl32.dll est installée." + +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "Impossible de créer la clé de registre '%s'" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "Impossible de créer le tube de lecture entre processus" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "Impossible de créer le tube d'écriture entre processus" + +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "Impossible de créer le thread" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"Impossible de créer la fenêtre de classe %s !\n" +"Peut-être un problème de compatibilité avec Windows 3.x ?" + +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "Impossible d'effacer la clé '%s'" + +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "Impossible d'effacer le fichier INI '%s'" + +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "Impossible d'effacer la valeur '%s' de la clé '%s'" + +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "Impossible d'effacer la valeur de la clé '%s'" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "Impossible d'énumérer les sous-clés de la clé '%s'" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "Impossible d'énumérer les valeurs de la clé '%s'" + +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "Impossible de trouver la position courante dans le fichier '%s'" + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"Impossible de trouver le modèle pour le dialogue bidon !\n" +"Vérifier le chemin d'inclusion de la ressource pour trouver wx.rc." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "Impossible de trouver l'objet d'enregistrement '%s' pour l'objet '%s'." + +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "Impossible d'obtenir l'information sur la clé de registre '%s'" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "" +"Impossible de charger l'image du fichier '%s' : le fichier n'existe pas." + +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "Impossible de charger la bibliothèque dynamique wxSerial." + +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "Impossible d'ouvrir le fichier '%s'" + +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "Impossible d'ouvrir la clé de registre '%s'" + +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "Impossible de lire la valeur de '%s'" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "Impossible de lire la valeur de la clé '%s'" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "Impossible d'enregistrer le contenu du journal dans le fichier." + +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "Impossible de spécifier la priorité pour le thread" + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "Impossible de spécifier la valeur de '%s'" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "Annuler" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "Impossible de trouver la connexion active : %s" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "Impossible de trouver l'emplacement du fichier du livre des adresses" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "" +"Impossible d'obtenir une gamme de priorité pour le choix de la planification " +"%d." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "Impossible d'obtenir le nom de l'hôte" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "Impossible d'obtenir le nom officiel de l'hôte" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "Impossible de raccrocher - pas de connexion active." + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "Impossible d'initialiser l'OLE" + +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "Impossible d'ouvrir le document HTML : %s" + +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "Impossible d'ouvrir l'aide HTML : %s" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "Impossible d'ouvrir l'URL '%s'" + +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "Impossible d'ouvrir le fichier table des matières : %s" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Impossible d'ouvrir le fichier pour l'impression PostScript !" + +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "Impossible d'ouvrir le fichier d'index : %s" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "Impossible d'imprimer une page vide." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "Impossible de retrouver le choix de la planification des threads." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "Impossible de démarrer le thread : erreur à l'écriture de TLS" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "Sensible à la casse" + +#: ../src/common/fontmap.cpp:113 +msgid "Celtic (ISO-8859-14)" +msgstr "Balte (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Europe Centrale (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "Choisissez l'ISP pour composer le numéro" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "Choisissez la police" + +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Effacer le contenu du journal" + +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "Fermer" + +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "Fermer cette fenêtre" + +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "" +"Le nom pour l'entrée de la configuration ne peut pas commencer par '%c'." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "Confirmer" + +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Connexion ..." + +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Connexion à wxHelp annulée dans %d secondes" + +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Table des matières" + +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "Copies :" + +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "Impossible de trouver le fichier de ressources inclus %s." + +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "Impossible de trouver l'étiquette pour l'id" + +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "Impossible de charger la bibliothèque DLL Rich Edit '%s'" + +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"Impossible de résoudre la classe de contrôle ou l'id '%s'. Utilisez un " +"entier (non nul) à la place\n" +"ou fournissez un #define (voir le manuel pour les mises en garde)" + +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"Impossible de résoudre l'id du menu '%s'. Utilisez un entier (non nul) à la " +"place\n" +"ou fournissez un #define (voir le manuel pour les mises en garde)" + +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "Impossible de lancer l'aperçu du document." + +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "Impossible de lancer l'impression." + +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "Impossible de transférer les données à la fenêtre" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "Impossible d'obtenir un verrouillage de mutex" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "Impossible d'ajouter une image à la liste." + +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "Impossible de créer l'objet événement." + +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "Impossible de créer un minuteur" + +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Impossible de trouver le symbole '%s' dans la bibliothèque dynamique" + +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "Impossible d'obtenir le pointeur sur le thread courant" + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "Impossible de lancer le serveur DDE '%s'." + +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "" +"Impossible de charger une image PNG - le fichier est corrompu ou bien il n'y " +"a pas assez de mémoire." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "Impossible d'enregistrer le format de presse-papier '%s'." + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "Impossible de détacher un mutex" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "" +"Impossible d'obtenir de l'information sur un élément de la liste de contrôle " +"%d." + +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "Impossible d'arrêter le thread" + +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "Créer le répertoire" + +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "Créer un nouveau répertoire" + +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "Répertoire courant :" + +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "Balte (ISO-8859-13)" + +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "feuille D, 22 x 34 mm" + +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "La demande de transfert DDE a échoué" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "Enveloppe DL, 110 x 220 mm" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "Date" + +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "Décoratif" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" +"Les fonctions de composition de numéros ne sont pas disponibles car le " +"service d'accès à distance (RAS) n'est pas installé sur cet ordinateur. " +"Installez-le svp." + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Saviez-vous ..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Le répertoire '%s' ne peut pas être créé" + +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "Le répertoire n'existe pas" + +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"Afficher tous les éléments index qui contiennent une sous-chaîne donnée. " +"Recherche non sensible à la casse." + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "Dialogue d'options de l'affichage" + +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "Voulez-vous sauvegarder les modifications dans le document %s ?" + +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Fait" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Fait." + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "Feuille E, 34 x 44 pouces" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "Temps écoulé : " + +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "Entrées trouvées" + +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"L'expansion des variables d'environnement a échoué : caractère '%c' manquant " +"à la position %d dans '%s'." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "Erreur" + +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Erreur " + +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "Erreur en créant le répertoire" + +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "Erreur : " + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Espéranto (ISO-8859-3)" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Temps estimé : " + +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "Et cetera" + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "L'exécution de la commande '%s' a échoué" + +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 pouces" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "'*' attendu pendant l'analyse de la ressource." + +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "'=' attendu pendant l'analyse de la ressource." + +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "'char' attendu pendant l'analyse de la ressource." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "Impossible de %s la connexion : %s" + +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "Impossible de fermer le presse-papier." + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "Connexion impossible : nom d'utilisateur/mot de passe manquant." + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "Impossible de se connecter : pas de numéro ISP à composer." + +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "Impossible de copier la valeur de registre '%s'" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "Impossible de copier les contenus de la clé de registre '%s' vers '%s'" + +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "Impossible de créer la chaîne DDE" + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "Impossible de créer une fenêtre parent MDI." + +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "Impossible de créer une barre de statut." + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "Impossible de créer une connexion au serveur '%s' sur le sujet '%s'" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" +"La creation de la boite de dialogue a echoué. Peut-être vouz avez oublié " +"d'inclure wx/msw/wx.rc dans votre fichier de resources?" + +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "Impossible de créer le répertoire " + +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "Impossible d'afficher le document HTML avec l'encodage %s" + +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "Impossible de vider le presse-papier." + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "" +"Impossible d'établir une boucle de conseil (advise loop) avec le serveur DDE" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "Impossible de réaliser une connexion : %s" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "Impossible d'exécuter '%s'\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Impossible de trouver la ressource XBM %s.\n" +"Oublié d'utiliser wxResourceLoadBitmapData ?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"Impossible de trouver la ressource XBM %s.\n" +"Oublié d'utiliser wxResourceLoadIconData ?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Impossible de trouver la ressource XPM %s.\n" +"Oublié d'utiliser wxResourceLoadBitmapData ?" + +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "Impossible d'obtenir les noms ISP : %s" + +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "Impossible d'obtenir des données du presse-papier" + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "Impossible d'obtenir le temps système TUC." + +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "Impossible d'obtenir le temps système local" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" +"Impossible d'adjoindre un thread, fuite potentielle de mémoire détectée - " +"redémarrez le programme svp" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Impossible de charger la bibliothèque partagée '%s'" + +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "Impossible d'ouvrir le presse-papier." + +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "Impossible de placer des données sur le presse-papier" + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "Impossible de rediriger les entrées/sorties du processus fils" + +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Impossible d'enregistrer le serveur DDE '%s'" + +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Impossible de se rappeler l'encodage pour le jeu de caractères '%s'." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "Impossible de renommer la valeur de registre '%s' en '%s'." + +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "Impossible de renommer la clé de registre '%s' en '%s'." + +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "Impossible de retrouver des données du presse-papier." + +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "Impossible de retrouver le texte du message d'erreur RAS" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "Impossible de retrouver les formats supportés par le presse-papier" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "Impossible d'envoyer un avis de notification au DDE" + +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "Impossible de passer les données au presse-papier." + +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "Impossible d'assigner au thread la priorité %d." + +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "Impossible de stocker l'image '%s' dans la mémoire VFS !" + +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "Impossible de terminer le thread." + +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "" +"Impossible de terminer la boucle de conseil (advise loop) avec le server DDE" + +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Impossible de terminer la connexion : %s" + +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Impossible de supprimer l'enregistrement du serveur DDE '%s'" + +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "Erreur fatale" + +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "Erreur fatale : " + +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Erreur fatale : fin du programme" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "Le fichier '%s' existe déjà, voulez-vous vraiment l'écraser ?" + +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "Le fichier n'a pas pu être chargé." + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Erreur fichier" + +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "Ce nom de fichier existe déjà." + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "Fichiers (%s)|%s" + +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "Trouver" + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "Police à taille fixe :" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 pouces" + +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "Police" + +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "Taille de la police :" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "Le fork a échoué" + +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Suivant" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "Trouvé " + +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "Trouvé %i correspondances" + +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "De :" + +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF : le flot de données semble être tronqué." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF : erreur dans le format GIF de l'image." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF : pas assez de mémoire." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF : erreur inconnue !!!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "Légal allemand en accordéon, 8 1/2 x 13 pouces" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "Standard allemand, 8 1/2 x 12 pouces" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "Précédent" + +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Suivant" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "Niveau supérieur dans la hiérarchie du document" + +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "Répertoire initial" + +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "Répertoire parent" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Grec (ISO-8859-7)" + +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "L'ancrage HTML %s n'existe pas." + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" +"Fichiers HTML (*.htm)|*.htm|Fichiers HTML (*.html)|*.html|Fichiers d'aide (*." +"htb)|*.htb|Fichiers d'aide (*.zip)|*.zip|Projet d'aide HTML (*.hhp)|*.hhp|" +"Tous les fichier (*.*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Hébreu (ISO-8859-8)" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Aide" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "Aide Options Navigateur" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "Aide Index" + +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "Aide Impression" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "Aide : %s" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "La spécification pour la ressource icône %s n'a pas été trouvée." + +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "Syntaxe incorrecte dans le fichier de ressource." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "Nom de répertoire illégal." + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "Spécification de fichier illégale." + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" +"Impossible de créer un contrôle de type rich edit, utilisez à la place un " +"contrôle de type texte simple. Réinstallez riched32.dll svp" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "Impossible d'obtenir l'entrée du processus fils" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "Version incorrecte du livre d'aide HTML" + +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Index" + +#: ../src/common/fontmap.cpp:111 +msgid "Indian (ISO-8859-12)" +msgstr "Nordique (ISO-8859-10)" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "Index d'image TIFF non valide." + +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "Italique" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Enveloppe italienne, 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG : Chargement impossible - le fichier est probablement corrompu." + +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG : Sauvegarde de l'image impossible." + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "Paysage" + +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Grand livre, 17 x 11 pouces" + +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "Marge gauche (mm) :" + +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Légal, 8 1/2 x 14 pouces" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Lettre réduite, 8 1/2 x 11 pouces" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Lettre, 8 1/2 x 11 pouces" + +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Léger" + +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "Charger le fichier %s" + +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "Chargement : " + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "" +"Le chargement d'une image PNM mode Ascii en niveau de gris n'est pas encore " +"implémentée." + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "" +"Le chargement d'une image PNM mode source en niveau de gris n'est pas encore " +"implémentée." + +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "Journal sauvé dans le fichier '%s'." + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "fils MDI" + +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "Fichier mailcap %s, ligne %d : entrée incomplète ignorée." + +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "La mémoire VFS contient déjà le fichier '%s' !" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "Fichier types mime %s, ligne %d : chaîne entre quotes non terminée." + +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "Moderne" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Enveloppe monarchique, 3 7/8 x 7 1/2 pouces" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Plus ..." + +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "Périphériques Montés" + +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Mon Disque Dur" + +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "Mon Répertoire Initial (Home)" + +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Nom" + +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "Nouveau ..." + +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "NouveauNom" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "Page suivante" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "Non" + +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "Pas de fonctionalités XBM disponibles !" + +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "Pas de fonctionalités XPM disponibles !" + +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "Pas de fonctionalités icône XPM disponibles !" + +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "Entrées non trouvées." + +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"L'encodage '%s' est inconnu.\n" +"Souhaitez-vous choisir une police à utiliser pour cet encodage?\n" +"(sinon le texte n'apparaitra pas correctement en utilisant cet encodage) ?" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "Pas de fonctions spécifiques disponibles pour ce type d'image." + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "Pas de fonctions spécifiques disponibles pour l'image de type : %d." + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "Pas de fonctions spécifiques disponibles pour l'image de type : %s." + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "Pas encore trouvé la page correspondante" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Nordique (ISO-8859-10)" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normal" + +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Police normale :" + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Note, 8 1/2 x 11 pouces" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "OK" + +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "Ouvrir un document HTML" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "Opération interdite." + +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "L'option '%s' nécessite une valeur, signe '=' attendu." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "L'option '%s' nécessite une valeur." + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "Option '%s' : '%s' ne peut pas être convertie en date." + +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Options" + +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "Orientation" + +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX : Impossible d'allouer la mémoire nécessaire." + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX : format d'image non supporté" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX : image non valide" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: ce n'est pas un fichier PCX." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX : erreur inconnue !!!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX : numéro de version trop petit" + +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PNM : Impossible d'allouer la mémoire nécessaire." + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM : Le format de fichier n'est pas reconnu." + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM : Le fichier semble tronqué." + +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Page %d" + +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Page %d sur %d" + +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Paramètrage de la page" + +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Pages" + +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Taille de la page" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Taille de la page" + +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "Droits" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "La création du tube a échoué" + +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "Veuillez choisir une police valide." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Veuillez choisir un fichier existant." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "Veuillez choisir à quel ISP vous voulez vous connecter" + +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "Veuillez attendre ..." + +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "Portrait" + +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "Postscript" + +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "Fichier postscript" + +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "Postscript :" + +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "Aperçu Seulement" + +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Aperçu :" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "Page précédente" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "Impression" + +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "Aperçu avant impression" + +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "Erreur à l'exécution de l'aperçu avant impression" + +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "Pages à imprimer" + +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "Paramètrage d'impression" + +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "Impression couleur" + +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "Queue d'impression" + +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "Imprimer cette page" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "Imprimer vers un fichier" + +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "Imprimer ..." + +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "Commande Imprimante :" + +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "Options Imprimante :" + +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "Paramètres de l'Imprimante" + +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "Commande imprimante :" + +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "Options de l'imprimante" + +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "Options de l'imprimante :" + +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "Imprimante ..." + +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "Impression" + +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "Erreur lors de l'impression" + +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Impression de la page %d ..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Impression en cours ..." + +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "Abandon du programme." + +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Quarto, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "Question" + +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "Erreur de lecture dans le fichier '%s'" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "La clé de registre '%s' existe déjà." + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "Impossible de renommer la clé de registre '%s', celle-ci n'existe pas." + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"La clé de registre '%s' est nécessaire pour un fonctionnement correct du " +"système,\n" +"l'effacer mettra votre système dans un état instable:\n" +"opération abandonnée." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "La valeur '%s' existe déjà dans le registre." + +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Entrées pertinentes :" + +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Temps restant :" + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "Retirer la page courante de la liste de vos signets" + +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "Ecraser le fichier '%s' ?" + +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Marge de droite (mm) :" + +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "Roman" + +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "Enregistrer le fichier %s" + +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Enregistrer sous" + +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "Enregistrement du contenu du journal dans un fichier" + +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "Script" + +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "Recherche" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"Recherche dans la table des matières du/des livre(s) d'aide de toutes les " +"occurences du texte que vous avez tapé ci-dessus" + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "Recherche dans tous les livres" + +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "Recherche ..." + +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "Sections" + +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "Erreur de recherche dans le fichier '%s'" + +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Choisissez un modèle de document" + +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Choisissez une vue du document" + +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Choisissez un fichier" + +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "Envoyer vers l'imprimante" + +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "Separateur attendu apres l'option '%s'." + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Paramètrage" + +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "Paramètrage ..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "" +"J'ai trouvé plusieurs connexions par ligne téléphonique, j'en choisis une au " +"hasard :-)" + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "Tout montrer" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "Montrer tous les éléments dans l'index" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "Montrer les fichiers cachés" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "Montrer/cacher le panneau de navigation" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "Taille" + +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Italique" + +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "Désolé, impossible d'ouvrir ce fichier pour enregistrer." + +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "Désolé, impossible d'ouvrir ce fichier." + +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "Désolé, impossible d'enregistrer ce fichier." + +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "Désolé, il n'y a pas assez de mémoire pour créer un aperçu." + +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Communiqué, 5 1/2 x 8 1/2 pouces" + +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "Statut :" + +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "Suisse" + +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: Impossible d'allouer la mémoire nécessaire." + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: Erreur au chargement de l'image." + +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: Erreur à la lecture de l'image." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: Erreur au chargement de l'image." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: Erreur à l'écriture de l'image." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloid, 11 x 17 pouces" + +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "Télétype" + +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "Modèles" + +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "Temporaire" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Thaï (ISO-8859-11)" + +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "L'ordinateur" + +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"Le jeu de caractères '%s' est inconnu. Vous pouvez en choisir un autre\n" +"pour le remplacer ou choisir [Annuler]\n" +"s'il ne peut pas l'être" + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "Le format de presse-papier '%d' n'existe pas." + +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "Le répertoire" + +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"Le fichier '%s' n'existe pas et n'a pas pu être ouvert.\n" +"Il a aussi été retiré de la liste des fichiers MRU." + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "Le paramètre nécessaire '%s' n'a pas été fourni." + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "Le texte n'a pas pu être enregistré." + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "La valeur pour l'option '%s' doit être précisée." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" +"La version du service d'accès distant (RAS en anglais) installé sur cette " +"machine est trop ancien. Prière de le mettre à jour (la fonction '%s' est " +"manquante)." + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"Echec de l'initialisation du thread : impossible d'enregistrer une valeur en " +"local" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "" +"Echec de l'initialisation du thread : échec à la création de la clé du thread" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"Echec de l'initialisation du thread : impossible d'allouer un index en local" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "La priorité donnée au thread est ignorée." + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Temps" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Le Conseil du Jour" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Désolé mais les conseils ne sont pas disponibles !" + +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "Pour :" + +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "Marge haut de page (mm) :" + +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "" +"Tentative de retirer le fichier '%s' de la mémoire VFS, mais celui-ci n'est " +"pas chargé !" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "Tenative de résoudre le nom d'hôte NULL : j'abandonne" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "Turque (ISO-8859-9)" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "Standard US en accordéon, 14 7/8 x 11 pouces" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "Impossible d'ouvrir le document HTML demandé : %s" + +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Souligner" + +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "Fin de fichier inattendue lors de l'analyse des ressources." + +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "Paramètre '%s' inattendu" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "Erreur DDE inconnue: %08x" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "Codage inconnu (%d)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "Champ inconnu dans le fichier %s, ligne %d: '%s'." + +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "Option longue '%s' inconnue" + +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "Option '%s' inconnue" + +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "Symbole '{' non assorti dans une entrée pour le type mime %s." + +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "Commande sans nom" + +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "Style %s non reconnu pendant l'analyse des ressources." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "Format de presse-papier non supporté." + +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Usage : %s" + +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Utilisateur" + +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "Répertoire /usr/local" + +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "Conflit de validation" + +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "Variables" + +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "Voir les fichiers - vue détaillée" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "Voir les fichiers comme une liste" + +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "Vues" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Echec lors de l'attente de fin de sous-processus" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "Alarme" + +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "Alarme :" + +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "" +"Alarme : tentative de retrait d'un pointeur d'étiquette HTML de la pile " +"alors que celle-ci est vide !" + +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "Europe de l'Ouest (ISO-8859-1/Latin 1)" + +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "Europe de l'Ouest nouveau (ISO-8859-15/Latin 0)" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "Mots complets seulement" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "Win32s sur Windows 3.1" + +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "Fenêtre" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "Windows 9%c" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Windows Arabe (CP 1256)" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Windows Balte (CP 1257)" + +#: ../src/common/fontmap.cpp:116 +msgid "Windows Central European (CP 1250)" +msgstr "Windows Hébreu (CP 1255)" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Windows Cyrillique (CP 1251)" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Windows Grec (CP 1253)" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Windows Hébreu (CP 1255)" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Windows Turque (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +msgid "Windows Western European (CP 1252)" +msgstr "Windows Latin 1 (CP 1252 )" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "Erreur d'écriture dans le fichier '%s'" + +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "Echelle X" + +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "Translation X" + +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "Echelle Y" + +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "Translation Y" + +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "Oui" + +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "Vous ne pouvez pas ajouter un nouveau répertoire à cette section." + +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[VIDE]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "" +"une application DDEML a créé une situation de rivalité prolongée\n" +"(je n'ai bientôt plus de mémoire ...)" + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" +"une fonction DDEML a été appelée sans appel préalable à la fonction " +"DdeInitialize,\n" +"ou un identifiant invalide a \n" +"été fourni à la fonction DDEML." + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "une tentative client d'établir une conversation a échoué." + +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "une allocation mémoire a échoué." + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "un paramètre n'a pas pu être validé par la DDEML." + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "une demande de transaction synchrone (advise) a expiré." + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "une demande de transaction synchrone (données) a expiré." + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "une demande de transaction synchrone (exécution) a expiré." + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "une demande de transaction synchrone (poke) a expiré." + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "une demande pour terminer une transaction (advise) a expiré." + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" +"une transaction a été tentée du côté serveur lors d'une conversation déjà " +"terminée par le client, \n" +"ou le serveur a quitté avant d'avoir terminé une transaction." + +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "une transaction a échoué." + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" +"une application initialisée en tant que APPCLASS_MONITOR \n" +"a tenté d'effectuer une transaction DDE,\n" +"ou une application initialisée en tant que APPCMD_CLIENTONLY a tenté " +"d'effectuer des transactions serveur." + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "un appel interne à la fonction PostMessage a échoué." + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "une erreur interne s'est produite dans le DDEML." + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" +"un identifiant de transaction invalide a été fourni à la fonction DDEML.\n" +"Quand l'application sort d'un appel XTYP_XACT_COMPLETE, \n" +"l'identifiant de transaction pour cet appel n'est plus valide." + +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "tentative de modifier la touche non configurable '%s' ignorée." + +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "impossible de fermer le fichier '%s'" + +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "impossible de fermer le descripteur de fichier %d" + +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "impossible d'appliquer les changements au fichier '%s'" + +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "impossible de créer le fichier '%s'" + +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "impossible d'effacer le fichier de configuration utilisateur '%s'" + +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "" +"impossible de savoir si la fin du fichier a été atteinte dans le descripteur " +"%d" + +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "" +"impossible de trouver la taille du fichier dans le descripteur de fichier %d" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "" +"impossible de trouver le répertoire par défaut (HOME) de l'utilisateur - " +"j'utilise le répertoire courant." + +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "" +"impossible de forcer l'écriture sur disque du descripteur de fichier %d" + +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "" +"impossible de trouver la position courante sur le descripteur de fichier %d" + +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "impossible de charger une police de caractères - j'abandonne" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "impossible d'ouvrir le fichier '%s'" + +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "impossible d'ouvrir le fichier de configuration global '%s'." + +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "impossible d'ouvrir le fichier de configuration utilisateur '%s'." + +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "impossible d'ouvrir le fichier de configuration utilisateur." + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "impossible de lire en utilisant le descripteur de fichier %d" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "impossible de supprimer le fichier '%s'" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "impossible de supprimer le fichier temporaire '%s'" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "recherche impossible sur le descripteur de fichier %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "impossible d'écrire le fichier '%s' sur le disque." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "impossible d'écrire dans le descripteur de fichier %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "impossible d'écrire le fichier de configuration utilisateur." + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "fichier catalogue introuvable pour le domaine '%s'." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "date" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "dix-huitième" + +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "huitième" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "onzième" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "l'entrée '%s' apparaît plus d'une fois dans le groupe '%s'" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "établir" + +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "la mise a jour du fichier '%s' a échoué" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "quinzième" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "cinquième" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "fichier %s, ligne %d: '%s' est ignoré après l'entête de groupe." + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "fichier %s, ligne %d: symbole '=' est attendu." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "" +"fichier %s, ligne %d: première occurence du caractère %s à la ligne %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "" +"fichier '%s', ligne %d: la valeur pour la touche non configurable '%s' est " +"ignorée." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "fichier %s: caractère %c inattendu a la ligne %d." + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "premier" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "quatorzième" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "quatrième" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "gmtime() a échoué" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "initialisation" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "eof() a renvoyé une valeur non valide." + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "la fenêtre de message a renvoyé une valeur non valide" + +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "grand" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "le langage local '%s' ne peut pas être sélectionné." + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "recherche le catalogue '%s' dans '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "moyen" + +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "minuit" + +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "mktime() a échoué" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "dix-neuvième" + +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "neuvième" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "erreur - pas de DDE." + +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "sansnom" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "midi" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "num" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "problème de ré-entrance." + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "second" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "dix-septième" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "septième" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "seizième" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "sixième" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "petit" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "dixième" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "la réponse à la transaction a provoqué l'activation du bit DDE_FBUSY." + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "troisième" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "treizième" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "aujourd'hui" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "demain" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "douzième" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "vingtième" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "symbole \" inattendu à la position %d dans '%s'." + +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "inconnu" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "erreur inconnue (code d'erreur %08x)." + +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "origine de la recherche inconnue" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "origine de la recherche inconnue" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "inconnu-%d" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "sansnom" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "sansnom%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "utilisation du catalogue '%s' de '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "très grand" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "très petit" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "wxGetTimeOfDay a échoué." + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: signature non valide dans ReadMsg." + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: événement inconnu!" + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "" +"wxWindows n'a pas pu ouvrir de zone d'affichage (display) pour %s : abandon." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows : impossible de trouver le nom du fichier temporaire.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "hier" + +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Cyrillique (Latin 5)" diff --git a/locale/it.po b/locale/it.po new file mode 100644 index 0000000000..e662a3f018 --- /dev/null +++ b/locale/it.po @@ -0,0 +1,3084 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows-2.2.1\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-11-15 18:55ora solare Europa occidentale\n" +"Last-Translator: Mattia barbon \n" +"Language-Team: wxWindows translators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(Ha i permessi necessari?)" + +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"non esistente\n" +"Crearlo adesso?" + +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (errore %ld: %s)" + +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr " Anteprima" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr " byte " + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "Busta #10, 4 1/8 x 9 1/2 in" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "Busta #11, 4 1/2 x 10 3/8 in" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "Busta #12, 4 3/4 x 11 in" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "Busta #14, 5 x 11 1/2 in" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "Busta #9, 3 7/8 x 8 7/8 in" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "la direttiva #define %s deve essere un intero." + +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i di %i" + +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (o %s)" + +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "Errore %s" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "Informazione %s" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "Avviso %s" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s non è la specifica di una risorsa bitmap." + +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "%s non è la specifica di una risorsa icona." + +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s: sintassi errata nel file di risorsa." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&Chiudi" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&Dettagli" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Fine" + +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&Registro" + +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Successivo >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&Successivo >" + +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "&Prossimo suggerimento" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "&Ripeti" + +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "&Ripeti " + +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "&Salva..." + +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Mostra suggerimenti all'avvio" + +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "&Annulla" + +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "&Annulla " + +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&Finestra" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' ha troppi '..', ignorati." + +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' non valida" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' non è un valore numerico corretto per l'opzione '%s'." + +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' non è un catalogo di messaggi valido." + +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "Probabilmente '%s' è un file binario." + +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' deve essere numerico." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' deve contenere unicamente caratteri ASCII." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' deve contenere unicamente caratteri alfabetici." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' deve contenere unicamente caratteri alfabetici o numerici." + +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(Aiuto)" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(segnalibri)" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", atteso static, #include o #define \n" +"durante l'analisi delle risorse" + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 in" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 in" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "Busta 6 3/4, 3 5/8 x 6 1/2 in" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": file non esistente!" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": set di caratteri sconosciuto" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": codifica sconosciuta" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &Precedente" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr " " + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr " " + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" +"Normale
    (e sottolineato. Corsivo. Grassetto." +" Grassetto corsivo.
    corpo -2
    corpo -1
    corpo +0
    corpo +1
    corpo +2
    corpo +3
    corpo +4

    Corpo fisso.
    grassetto corsivo " +"grassetto corsivo sttolineato
    corpo -" +"2
    corpo -1
    corpo +0
    corpo +1
    corpo +2
    corpo +3
    corpo +4" + +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "Foglio A3, 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "Foglio A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "Foglio A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "Foglio A5, 148 x 210 mm" + +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "Aggiungi la pagina corrente ai segnalibri" + +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "Aggiungi ai colori personalizzati" + +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "Aggiunta del libro %s in corso" + +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "Tutto" + +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "Tutti i file (*)|*" + +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "Tutti i file (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "Chiamata verso l'ISP già in corso." + +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "Aggiungere registro al file '%s' (scegliere [No] per sovrascriverlo)?" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "Arabo (ISO-8859-6)" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "Busta B4, 250 x 353 mm" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "Foglio B4, 250 x 354 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "Busta B5, 176 x 250 mm" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "Foglio B5, 182 x 257 millimeter" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "Busta B6, 176 x 125 mm" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: È attualmente impossibile utilizzare la codifica a 4 bit." + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: Impossibile allocare memoria." + +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: Impossibile salvare un'immagine non valida." + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: Impossibile scrivere i dati." + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: Impossibile scrivere l'header del file." + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: La codifica non corrisponde al numero di bit per pixel." + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: L'altezza dell'immagine nel file è > di 32767 pixel." + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP: La larghezza dell'immagine nel file è > di 32767 pixel." + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: Numero di bit per pixel nel file sconosciuto." + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP: Codifica del file sconosciuta." + +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "Indietro" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Indietro" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Baltico (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Baltico (vecchio) (ISO-8859-4)" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "Specifica della risorsa di tipo bitmap %s non trovata." + +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "Grassetto" + +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "Margine inferiore (mm):" + +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "Foglio C, 17 x 22 in" + +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "C&ancella" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "Busta C3, 324 x 458 mm" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "Busta C4, 229 x 324 mm" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "Busta C5, 162 x 229 mm" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "Busta C6, 114 x 162 mm" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "Busta C65, 114 x 229 mm" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "Impossibile creare l'oggetto evento." + +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "Impossibile creare mutex" + +#: ../src/mac/thread.cpp:92 +msgid "Can not create mutex." +msgstr "Impossibile creare mutex." + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "Impossibile elencare i file nella cartella '%s'" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "Impossibile riprendere il thread %x" + +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "Impossibile avviare il thread: errore nella scrittura del TLS." + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "Impossibile sospendere il thread %x" + +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "Impossibile attendere la fine del thread" + +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "&Annulla impossibile " + +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "" +"Impossibile verificare il formato del file immagine '%s': file non esistente." + +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "Impossibile chiudere la chiave '%s' del registro di sistema" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "Impossibile copiare valori del tipo non supportato %d." + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" +"Impossibile creare list control, controllare che comctl32.dll sia installata." + +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "Impossibile creare la chiave '%s' del registro di sistema" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "Impossibile creare la pipe di lettura tra processi" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "Impossibile creare la pipe di scrittura tra processi" + +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "Impossibile creare il thread" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"Impossibile creare la finestra di classe %s!\n" +"Possibile errore di compatibilità con Windows 3.x?" + +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "Impossibile eliminare la chiave '%s'" + +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "Impossibile eliminare il file INI '%s'" + +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "Impossibile eliminare il valore '%s' dalla chiave '%s'" + +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "Impossibile eliminare il valore della chiave '%s'" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "Impossibile elencare le sottochiavi della chiave '%s'" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "Impossibile elencare i valori della chiave '%s'" + +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "Impossibile determinare la posizione corrente del file '%s'" + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"Impossibile trovare il modello '%s' per il riquadro di dialogo!\n" +"Verificare il percorso di inclusione per la ricerca di wx.rc." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "" +"Impossibile trovare l'oggetto di registrazione '%s' per l'oggetto '%s'." + +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "" +"Impossibile ottenere informazioni sulla chiave '%s' del registro di sistema" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "Impossibile caricare l'immagine dal file '%s': file non esistente." + +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "Impossibile caricare la libreria dinamica wxSerial." + +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "Impossibile aprire il file '%s'" + +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "Impossibile aprire la chiave '%s' del registro di sistema" + +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "Impossibile leggere il valore di '%s'" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "Impossibile leggere il valore della chiave '%s'" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "Impossibile salvare il contenuto del registro su file." + +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "Impossibile impostare la priorità del thread" + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "Impossibile impostare il valore di '%s'" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "Annulla" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "Impossibile trovare la connessione attiva: %s" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "Impossibile trovare il file degli indirizzi" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "" +"Impossibile ottenere un intervallo di priorità per la strategia di " +"scheduling %d." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "Impossibile ottenere il nome dell'host" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "Impossibile ottenere il nome ufficiale dell'host" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "Impossibile disconnettersi - nessuna connessione attiva." + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "Impossibile inizializzare OLE" + +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "Impossibile aprire il documento HTML: %s" + +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "Impossibile aprire il libro di help HTML: %s" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "Impossibile aprire l'URL '%s'" + +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "Impossibile aprire il file sommario: %s" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Impossibile aprire il file per la stampa PostScript!" + +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "Impossibile aprire il file di indice: %s" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "Impossibile stampare una pagina vuota." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "Impossibile determinare la strategia di scheduling." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "Impossibile avviare il thread: errore nella scrittura del TLS" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "Maiuscole/minuscole" + +#: ../src/common/fontmap.cpp:113 +msgid "Celtic (ISO-8859-14)" +msgstr "Celtico (ISO-8859-14)" + +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Europeo Centrale (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "Scegliere l'ISP da chiamare" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "Carattere" + +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Eliminare il contenuto del registro" + +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "Chiudi" + +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "Chiudi questa finestra" + +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Il nome di una voce di configurazione non può iniziare con '%c'." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "Conferma" + +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Connessione..." + +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Connessione a wxHelp annullata in %d secondi" + +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Sommario" + +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "Copie:" + +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "Impossibile trovare il file di inclusione di risorsa %s." + +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "Impossibile trovare l'etichetta per l'id" + +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "Impossibile caricare la DLL Rich Edit '%s'" + +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"Impossibile risolvere la classe del controllo o l'id '%s'. Impiegare in " +"sostituzione un intero (non nullo)\n" +" o fornire #define (vedere il manuale per avvertimenti)" + +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"Impossibile risolvere l'id del menu '%s'. Impiegare in sostituzione un " +"intero (non nullo)\n" +" o fornire #define (vedere il manuale per avvertimenti)" + +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "Impossibile mostrare l'anteprima del documento." + +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "Impossibile avviare la stampa." + +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "Impossibile trasferire i dati verso la finestra" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "Impossibile ottenere il lock sul mutex" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "Impossibile aggiungere un'immagine alla lista." + +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "Impossibile cambiare lo stato dell'oggetto evento." + +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "Impossibile creare un timer" + +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Impossibile trovare il simbolo '%s' nella libreria dinamica" + +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "Impossibile ottenere un puntatore al thread corrente" + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "Impossibile lanciare il server DDE '%s'." + +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "" +"Impossibile caricare un'immagine PNG - file danneggiato o memoria " +"insufficiente." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "Impossibile registrare il formato '%s' degli appunti." + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "Impossibile rilasciare un mutex" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "Impossibile ottenere informazioni sull'elemento %d del list control." + +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "Impossibile terminare il thread" + +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "Crea cartella" + +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "Crea una nuova cartella" + +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "Cartella corrente:" + +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "Celtico (ISO-8859-14)" + +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "Foglio D, 22 x 34 in" + +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "Richiesta DDE (poke) fallita" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "Busta DL, 110 x 220 mm" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "Data" + +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "Decorativo" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" +"Funzioni di composizione telefonica non disponibili perchè il servizio di " +"Accesso Remoto (RAS) non è installato su questo computer. Si prega di " +"installarlo." + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Sapevate..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Impossibile creare la cartella '%s'" + +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "Cartella non esistente" + +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"Visualizza tutte le voci dell'indice contenenti un dato testo. La ricerca " +"non distingue maiuscole e minuscole." + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "Mostra riquadro di dialogo per le opzioni" + +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "Salvare le modifiche al documento %s?" + +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Finito" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Finito." + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "Foglio E, 34 x 44 in" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "Tempo trascorso : " + +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "Trovati" + +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"Espansione delle variabili di ambienete fallita: carattere '%c' non trovato " +"alla posizione %d in '%s'." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "Errore" + +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Errore " + +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "Errore nella creazione della cartella" + +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "Errore: " + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Esperanto (ISO-8859-3)" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Tempo stimato : " + +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "Eccetera" + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "Esecuzione del comando '%s' fallita" + +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 in" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "Atteso '*' durante l'analisi della risorsa." + +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "Atteso '=' durante l'analisi della risorsa." + +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "Atteso 'char' durante l'analisi della risorsa." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "Impossibile %s la connessione: %s" + +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "Impossibile chiudere gli appunti." + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "Connessione impossibile: mancano nome utente/password." + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "Connessione impossibile: numero dell'ISP mancante." + +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "Impossibile copiare il valore '%s' del registro di sistema" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "" +"Impossibile copiare il contenuto della chiave '%s' del registro di sistema " +"in '%s'." + +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "Impossibile creare la stringa DDE" + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "Impossibile creare la finestra MDI madre." + +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "Impossibile creare la barra di stato." + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "Impossibile creare la connessione al server '%s' sull'argomento '%s'" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" +"Impossibile creare il riquadro di dialogo. Probabilmente wx/msw/wx.rc non è " +"stato incluso nelle risorse." + +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "Impossibile creare la cartella " + +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "Impossibile mostrare la pagina HTML con la codifica %s" + +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "Impossibile eliminare il contenuto degli appunti." + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "Impossibile stabilire un ciclo advise con il server DDE" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "Impossibile connettersi: %s" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "Impossibile eseguire '%s'\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Impossibile trovare la risorsa XBM %s.\n" +"Dimenticato di impiegare wxResourceLoadBitmapData?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"Impossibile trovare la risorsa XBM %s.\n" +"Dimenticato di impiegare wxResourceLoadIconData?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Impossibile trovare la risorsa XPM %s.\n" +"Dimenticato di impiegare wxResourceLoadBitmapData?" + +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "Impossibile ottenere i nomi degli ISP: %s" + +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "Impossibile ottenere i dati dagli appunti" + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "Impossibile ottenere l'ora UTC di sistema." + +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "Impossibile ottenere l'ora locale di sistema" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" +"Impossibile esegure la join su di un thread, possibile memoria persa (leak) " +"- per favore lanciare nuovamente il programma" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Impossibile caricare la libreria dinamica '%s'" + +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "Impossibile aprire gli appunti." + +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "Impossibile mettere dati negli appunti" + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "Impossibile redirigere l'input/output del processo figlio" + +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Impossibile registrare il server DDE '%s'" + +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Impossibile ricordare la codifica per il set di caratteri '%s'." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "Impossibile rinominare il valore '%s' del registro di sistema in '%s'." + +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "Impossibile rinominare la chiave '%s' del registro di sistema in '%s'." + +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "Impossibile leggere dati dagli appunti." + +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "" +"Impossibile ottenere il testo del messaggio di errore di Accesso Remoto (RAS)" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "Impossibile ottenere i formati supportati dagli appunti" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "Impossibile inviare una notifica advise DDE" + +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "Impossibile scrivere i dati degli appunti." + +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "Impossibile assegnare la priorità %d al thread." + +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "Impossibile memorizzare l'immagine '%s' nella memoria VFS!" + +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "Impossibile terminare il thread." + +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "Impossibile terminare il ciclo advise con il server DDE" + +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Impossibile terminare la connessione: %s" + +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Impossibile cancellare la registrazione del server DDE '%s'" + +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "Errore Fatale" + +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "Errore fatale: " + +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Errore fatale: fine del programma" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "File '%s' esistente, si desidera sovrascriverlo?" + +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "Impossibile caricare il file." + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Errore di file" + +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "Nome di file esistente." + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "File (%s)|%s" + +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "Trova" + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "Carattere a corpo fisso:" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 in" + +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "Carattere" + +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "Corpo:" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "Fork fallita" + +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Avanti" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "Trovato " + +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "Trovate %i corrispondenze" + +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "Da:" + +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: il flusso dati dembra essere interrotto." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: errore nel formato GIF dell'immagine." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: memoria insufficiente." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF: errore sconosciuto!!!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "German Legal Fanfold, 8 1/2 x 13 in" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "German Std Fanfold, 8 1/2 x 12 in" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "Indietro" + +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Avanti" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "Livello superiore nella gerarchia di documenti" + +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "Vai alla Home directory" + +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "Cartella superiore" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Greco (ISO-8859-7)" + +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "Ancora HTML %s non esistente." + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" +"File HTML (*.htm)|*.htm|File HTML (*.html)|*.html|Libri di aiuto (*.htb)|*." +"htb|Libri di aiuto (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|Tutti i " +"file (*.*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Ebraico (ISO-8859-8)" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Aiuto" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "Opzioni del browser della Guida" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "Indice" + +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "Stampa" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "Aiuto: %s" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "Specifica della risorsa icona %s non trovata." + +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "Sintassi errata nel file di risorsa." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "Nome di cartella non valido." + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "Specifica di file non valida." + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" +"Impossibile creare un controllo rich edit, impiegato un controllo di tipo " +"testo semplice. Per favore reinstallare riched32.dll" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "Impossibile ottenere l'input del processo figlio" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "Versione errata del libro di aiuto HTML" + +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Indice" + +#: ../src/common/fontmap.cpp:111 +msgid "Indian (ISO-8859-12)" +msgstr "Indiano (ISO-8859-12)" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "Indice dell'immagine TIFF non valido." + +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "Corsivo" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Busta Italiana, 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG: Caricamento impossibile - probabilmente il file è danneggiato." + +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG: Impossibile salvare l'immagine." + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "Orizzontale" + +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Ledger, 17 x 11 in" + +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "Margine sinistro (mm):" + +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal, 8 1/2 x 14 in" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Letter Small, 8 1/2 x 11 in" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter, 8 1/2 x 11 in" + +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Leggero" + +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "Caricare il file %s" + +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "Caricamento : " + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "" +"Caricamento di un'immagine PNM Ascii a toni di grigio non ancora " +"implementato." + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "" +"Caricamento di un'immagine PNM Raw a toni di grigio non ancora implementato." + +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "Registro salvato nel file '%s'." + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "Figlio MDI" + +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "File mailcap %s, riga %d: voce incompleta ignorata." + +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "La memoria VFS contiene già il file '%s'!" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "File mime.types %s, riga %d: stringa tra virgolette non terminata." + +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "Modern" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Busta Monarch, 3 7/8 x 7 1/2 in" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Ancora..." + +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "Periferiche montate" + +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Il mio Disco Rigido" + +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "La mia Home Directory" + +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Nome" + +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "Nuovo..." + +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "NuovoNome" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "Pagina successiva" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "No" + +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "Funzionalità XBM non disponibili!" + +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "Funzionalità XPM non disponibili!" + +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "Funzionalità per icone XPM non disponibili!" + +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "Voci non trovate." + +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"La codifica '%s' è sconosciuta.\n" +"È possibile scegliere un carattere da utilizzare per questa codifica\n" +"(altrimenti il testo con tale codifica non verrà visualizzato correttamente)?" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "Funzionalità non disponibili per questo formato di immagine." + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "Funzionalità non disponibili per il formato di immagine %d." + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "Funzionalità non disponibili per il formato di immagine %s." + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "Pagina corrispondente non ancora trovata" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Nordico (ISO-8859-6)" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normale" + +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Carattere normale:" + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Nota, 8 1/2 x 11 in" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "OK" + +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "Apri un documento HTML" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "Operazione non permessa." + +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "L'opzione '%s' richiede un valore, atteso '='." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "L'opzione '%s' richiede un valore." + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "Opzione '%s': impossibile convertire '%s' in una data." + +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Opzioni" + +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "Orientamento" + +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: impossibile allocare la memoria" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: formato dell'immagine non supportato" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: immagine non valida" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: non è un file PCX." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX: errore sconosciuto !!!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: numero di versione troppo piccolo" + +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PNM: Impossibile allocare la memoria." + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM: Formato del file sconosciuto." + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM: Il file sembra troncato." + +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Pagina %d" + +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Pagina %d di %d" + +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Impostazioni della pagina" + +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Pagine" + +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Dimensione del foglio" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Dimensione del foglio" + +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "Permessi" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "Creazione della pipe fallita" + +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "Per favore scegliere un carattere valido." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Per favore scegliere un file esistente." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "Per favore scegliere l'ISP a cui connettersi" + +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "Attenedere prego..." + +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "Verticale" + +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "PostScript" + +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "File PostScript" + +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "PostScript:" + +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "Solo anteprima" + +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Anteprima:" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "Pagina precedente" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "Stampa" + +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "Anteprima di stampa" + +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "Errore durante l'anteprima di stampa" + +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "Intervallo da stampare" + +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "Impostazioni di stampa" + +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "Stampa a colori" + +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "Coda di stampa" + +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "Stampa questa pagina" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "Stampa su file" + +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "Stampa..." + +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "Comando stampante: " + +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "Opzioni stampante: " + +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "Impostazioni della stampante" + +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "Comando stampante:" + +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "Opzioni stampante" + +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "Opzioni stampante:" + +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "Stampante..." + +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "Stampa in corso" + +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "Errore durante la stampa" + +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Stampa della pagina %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Stampa in corso..." + +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "Programma terminato." + +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Quarto, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "Domanda" + +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "Errore di lettura nel file '%s'" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "Chiave '%s' del registro di sistema già presente." + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "" +"Chiave '%s' del registro di sistema non esistente, impossibile rinominarla." + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"Chiave '%s' del registro di sistema necessaria per un corretto funzionamento " +"del sistema, la cancellazione renderebbe\n" +"il sistema inutilizzabile:\n" +"operazione abbandonata." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "Valore '%s' del registro di sistema già presente." + +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Voci pertinenti:" + +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Tempo rimanente : " + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "Rimuovi la pagina corrente dai segnalibri" + +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "Sovrascrivere il file '%s'?" + +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Margine destro (mm):" + +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "Roman" + +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "Salvare il file %s" + +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Salva con nome" + +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "Salva il registro su file" + +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "Script" + +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "Cerca" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"Cerca nel sommario del/dei libro/i di aiuto il testo immesso quì sopra." + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "Cerca in tutti i libri" + +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "Ricerca in corso..." + +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "Sezioni" + +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "Errore durante la seek nel file '%s'" + +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Scegliere un modello di documento" + +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Scegliere una visualizzazione del documento" + +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Scegliere un file" + +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "Invia alla stampante" + +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "Atteso separatore dopo l'opzione '%s'." + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Configurazione" + +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "Configurazione..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "Trovate più connessioni attive, ne viene scelta una a caso." + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "Visualizza tutto" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "Visualizza tutti le voci dell'indice" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "Visualizza i file nascosti" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "Visualizza/nascondi la barra di navigazione" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "Dimensione" + +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Slant" + +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "Spiacente, impossibile aprire il file per salvare." + +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "Spiacente, impossibile aprire il file." + +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "Spiacente, impossibile salvare il file." + +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "Spiacente, memoria insufficente per la creazione di un'anteprima." + +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Statement, 5 1/2 x 8 1/2 in" + +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "Stato: " + +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "Svizzero" + +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: Impossibile allocare la memoria." + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: Errore nel caricamento dell'immagine." + +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: Errore durante la lettura dell'immagine." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: Errore nel salvataggio dell'immagine." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: Errore durante la scrittura dell'immagine." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloid, 11 x 17 in" + +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "Teletype" + +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "Modelli" + +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "Temporaneo" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Thaï (ISO-8859-11)" + +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "Il Computer" + +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"Il set di caratteri '%s' è sconosciuto. È possibile sceglierne\n" +"un altro in sostituzione oppure scegliere [Annulla]\n" +"se non può essere sostituito." + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "Il formato '%d' degli appunti non esiste." + +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "La cartella" + +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"Il file '%s' non esiste e non può venire aperto.\n" +"È stato anche rimosso dalla lista di file recenti." + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "Il parametro '%s' è obbligatorio." + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "Il testo non può essere salvato." + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "L'opzione '%s' richiede un parametro." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" +"La versione del servizio di Accesso Remoto (RAS) installata è troppo " +"vecchia. Si prega di aggiornarla (la funzione %s é assente)." + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"Inizializzazione del modulo dei thread fallita: impossibile memorizzare un " +"valore nella memoria locale del thread" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "" +"Inizializzazione del modulo dei thread fallita: errore nella creazione della " +"chiave dei thread" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"Inizializzazione del modulo dei thread fallita: impossibile allocare " +"l'indice nella memoria locale del thread" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "Priorità del thread ignorata." + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Ora" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Suggerimento del giorno" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Spiacente, suggerimenti non disponibili!" + +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "Per:" + +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "Margine superiore (mm):" + +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "" +"Tentata la rimozione del file '%s' dalla memoria VFS, ma il file non è " +"caricato!" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "Abbandonata la tentata risoluzione di un nome di host NULL" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "Turco (ISO-8859-9)" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "US Std Fanfold, 14 7/8 x 11 in" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "Impossibile aprire il documento HTML richiesto: %s" + +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Sottolineato" + +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "Fine del file durante l'analisi delle risorse." + +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "Parametro '%s' non atteso" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "Errore DDE %08x sconosciuto" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "Codifica sconosciuta (%d)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "Campo sconosciuto nel file %s, riga %d: '%s'." + +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "Opzione lunga '%s' sconosciuta" + +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "Opzione '%s' sconosciuta" + +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "'{' spaiata in una voce per il tipo MIME %s." + +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "Comando privo di nome" + +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "Stile %s sconosciuto durante l'analisi delle risorse." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "Formato degli appunti non supportato." + +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Utilizzo: %s" + +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Utente" + +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "Cartella /usr/local" + +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "Conflitto durante la validazione" + +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "Variabili" + +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "Vedi i file - dettagli" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "Vedi i file - lista" + +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "Visualizzazioni" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Attesa della fine del sottoprocesso fallita" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "Avviso" + +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "Avviso:" + +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "" +"Avviso: tentata la rimozione di un handler di tag HTML da uno stack vuoto." + +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "Europeo Occidentale (ISO-8859-1/Latin 1)" + +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "Europeo Occidentale con Euro (ISO-8859-15/Latin 0)" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "Solo parole intere" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "Win32s su Windows 3.1" + +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "Finestra" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "Windows 9%c" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Windows Arabo (CP 1256)" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Windows Baltico (CP 1257)" + +#: ../src/common/fontmap.cpp:116 +msgid "Windows Central European (CP 1250)" +msgstr "Windows Europeo Centrale (CP 1250)" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Windows Cirillico (CP 1251)" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Windows Greco (CP 1253)" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Windows Ebraico (CP 1255)" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Windows Turco (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +msgid "Windows Western European (CP 1252)" +msgstr "Windows Europeo Occidentale (CP 1252)" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "Errore di scrittura nel file '%s'" + +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "Scala X" + +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "Traslazione X" + +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "Scala Y" + +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "Traslazione Y" + +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "Si" + +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "Impossibile aggiungere una nuova cartella a questa sezione." + +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[VUOTO]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "un'applicazione DDEML ha creato una 'race condition' prolungata." + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" +"una funzione DDEML è stata richiamata senza prima richiamare DdeInitialize, " +"oppure è stato passato ad una funzione DDEML\n" +"un identificatore di istanza non valido." + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "un tentativo di un client di stabilire una connessione è fallito." + +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "un'allocazione di memoria è fallita." + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "un parametro ha fallito la validazione da parte del DDEML." + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" +"una richiesta di transazione sincrona (advise) ha superato il tempo massimo." + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "" +"una richiesta di transazione sincrona (data) ha superato il tempo massimo." + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" +"una richiesta di transazione sincrona (execute) ha superato il tempo massimo." + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "" +"una richiesta di transazione sincrona (poke) ha superato il tempo massimo." + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" +"una richiesta di terminazione di transazione (advise) ha superato il tempo " +"massimo." + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" +"una transazione server è stata tentata su di una conversazione\n" +"già terminata dal client, oppure il server\n" +"è terminato prima di portare a termine la transazione." + +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "una transazione è fallita." + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" +"un'applicazione inizializzata come APPCLASS_MONITOR ha\n" +"cercato di effettuare una transazione DDE,\n" +"oppure un'applicazione inizializzata come APPCMD_CLIENTONLY\n" +"ha cercato di effettuare una transazione server." + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "una chiamata interna alla funzione PostMessage è fallita." + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "è avvenuto un errore interno nel DDEML." + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" +"è stato fornito un identificatore di transazione non valido ad una funzione " +"DDEML.\n" +"Una volta che l'applicazione è uscita da una callback XTYP_XACT_COMPLETE,\n" +"lidentificatore di transazione per questa callback non è più valido." + +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "tentativo di modificare la chiave non modificabile '%s' ignorato." + +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "impossibile chiudere il file '%s'" + +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "impossibile chiudere il descrittore di file %d" + +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "impossibile applicare i cambiamenti al file '%s'" + +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "impossibile creare il file '%s'" + +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "impossibile eliminare il file di configurazione utente '%s'" + +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "" +"impossibile determinare se il descrittore di file %d ha raggiunto la fine " +"del file" + +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "impossibile determinare la dimensione del file del descritore %d" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "" +"impossibile trovare la HOME dell'utente, viene impiegata la cartella " +"corrente." + +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "impossibile forzare la scrittura su disco del descrittore di file %d" + +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "" +"impossibile determinare la posizione corrente del descrittore di file %d" + +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "impossibile caricare un qualunque tipo di carattere, abbandono" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "impossibile aprire il file '%s'" + +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "impossibile aprire il file globale di configurazione '%s'." + +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "impossibile aprire il file di configurazione utente '%s'." + +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "impossibile aprire il file di configurazione utente." + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "impossibile leggere dal descrittore di file %d" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "impossibile eliminare il file '%s'" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "impossibile eliminare il file temporaneo '%s'" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "impossibile eseguire una seek sul descrittore di file %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "impossibile scrivere su disco il file '%s'." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "impossibile scrivere sul descrittore di file %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "impossibile scrivere il file di configurazione utente." + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "file di catalogo non trovato per il dominio '%s'." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "data" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "diciotto" + +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "otto" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "undici" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "la voce '%s' è presente più volte nel gruppo '%s'" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "stabilire" + +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "impossibile forzare la scrittura su disco del file '%s'" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "quindici" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "cinque" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "file '%s', riga %d: '%s' ignorato dopo l'inizio di un gruppo." + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "file %s, riga %d: atteso '='." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "file '%s', riga %d: la chiave '%s' è già stata trovata alla riga %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "" +"file '%s', riga %d: valore per la chiave non configurabile '%s' ignorato." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "file '%s': carattere %c non atteso alla riga %d." + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "primo" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "quattordici" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "quattro" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "gmtime() fallita" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "iniziare" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "valore di ritorno di eof() non valido." + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "il riquadro di dialogo ha ritornato un valore non valido" + +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "grande" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "impossibile selezionare le impostazioni locali '%s'." + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "ricerca del catalogo '%s' nel percorso '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "medio" + +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "mezzanotte" + +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "mktime() fallita" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "diciannove" + +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "nove" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "nessun errore DDE." + +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "senzanome" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "mezzogiorno" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "num" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "problema di rientranza." + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "due" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "diciassette" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "sette" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "sedici" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "sei" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "piccolo" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "dieci" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "" +"la risposta alla transazione ha causato l'impostazione del bit DDE_FBUSY." + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "tre" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "tredici" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "oggi" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "domani" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "dodici" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "venti" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "\" non atteso alla posizione %d in '%s'." + +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "sconosciuto" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "errore sconosciuto (codice %08x)." + +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "origine della seek sconosciuta" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "origine della seek sconosciuta" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "sconosciuto-%d" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "senzanome" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "senzanome%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "utilizzato catalogo '%s' in '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "molto grande" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "molto piccolo" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "wxGetTimeOfDay fallita." + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: signature non valida in ReadMsg." + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: evento sconosciuto!." + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "wxWindows non può aprire il display per '%s': abbandona." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: impossibile trovare il nome di file temporaneo.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "ieri" + +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Cirillico (Latin 5)" diff --git a/locale/nl.po b/locale/nl.po new file mode 100644 index 0000000000..17639a14c1 --- /dev/null +++ b/locale/nl.po @@ -0,0 +1,3085 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows-2.2.1\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-09-05 12:35Romaans (zomertijd)\n" +"Last-Translator: Patrick Hubers \n" +"Language-Team: wxWindows translators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(Heeft u de benodigde machtinging?)" + +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"bestaat niet\n" +"Nu maken?" + +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (fout %ld: %s)" + +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr " Afdrukvoorbeeld" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr " bytes " + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "Envelop nr.10, 4 1/8 x 9 1/2 inch" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "Envelop nr.11, 4 1/2 x 10 3/8 inch" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "Envelop nr.12, 4 3/4 x 11 inch" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "Envelop nr.14, 5 x 11 1/2 inch" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "Envelop nr.9, 3 7/8 x 8 7/8 inch" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "#define %s moet een geheel getal zijn." + +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i van %i" + +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (of %s)" + +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s Fout" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s Informatie" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s Waarschuwing" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s is geen bitmap-bronspecificatie." + +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "%s is geen pictogram-bronspecificatie." + +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s: incorrecte syntax voor bronbestand." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&Sluiten" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&Details" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Voltooien" + +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&Log" + +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Volgende >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&Volgende >" + +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "&Volgende tip" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "Opnie&uw" + +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "Opnie&uw " + +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "O&pslaan..." + +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Toon tips bij opstarten" + +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "&Ongedaan maken" + +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "Maak &ongedaan: " + +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&Venster" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' heeft extra '..', genegeerd" + +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' is ongeldig" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' is geen geldige numerieke waarde voor optie '%s'." + +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' is geen geldige berichtcatalogus." + +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "'%s' is waarschijnlijk een binair bestand." + +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' moet numeriek zijn." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' mag alleen ASCII-tekens bevatten." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' mag alleen letters bevatten." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' mag alleen alfa-numerieke tekens bevatten." + +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(Help)" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(favorieten)" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", verwachtte static, #include of #define\n" +"tijdens inlezen van bron." + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 inch" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 inch" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "6 3/4 envelop, 3 5/8 x 6 1/2 inch" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": bestand bestaat niet!" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": onbekende tekenset" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": onbekende codering" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &Terug" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr " " + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr " " + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" +"Normaal lettertype
    en onderstreept. Cursief " +"lettertype. Vet lettertype. Vet+cursief lettertype.
    lettergrootte -2
    lettergrootte -" +"1
    lettergrootte +0
    lettergrootte +1
    lettergrootte +2
    lettergrootte +3
    lettergrootte +4

    Niet-proportioneel lettertype.
    vet cursief " +"vet+cursief onderstreept
    lettergrootte " +"-2
    lettergrootte -1
    lettergrootte +0
    lettergrootte +1
    lettergrootte +2
    lettergrootte +3
    lettergrootte +4
    " + +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "A3, 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "A4, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "A4 klein, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "A5, 148 x 210 mm" + +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "Voeg huidige pagina toe aan favorieten" + +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "Voeg toe aan aangepaste kleuren" + +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "Bezig met toevoegen van boek %s" + +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "Alles" + +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "Alle bestanden (*)|*" + +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "Alle bestanden (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "Al bezig internetaanbieder te bellen." + +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "Voeg log toe aan bestand '%s' (kies [Nee] om te overschrijven)?" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "Arabisch (ISO-8859-6)" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "Envelop B4, 250 x 353 mm" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "B4, 250 x 354 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "Envelop B5, 176 x 250 mm" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "B5, 182, 257 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "Envelop B6, 176 x 125 mm" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: kan geen 4-bits codering verwerken" + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: kon geen geheugen reserveren" + +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: kon ongeldige afbeelding niet opslaan" + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: kon gegevens niet wegschrijven" + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: kon de bestandsheader niet schrijven" + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: codering komt niet overeen met bit-diepte" + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: afbeeldingshoogte > 32767 pixels in bestand." + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP: afbeeldingsbreedte > 32767 pixels in bestand." + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: onbekende bitdiepte in bestand." + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP: onbekende codering in bestand." + +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "Terug" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Achteruit" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Baltisch (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Baltisch (oud) (ISO-8859-4)" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "Bitmap-bronspecificatie %s niet gevonden." + +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "Vet" + +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "Ondermarge (mm):" + +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "C, 17 x 22 inch" + +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "&Wissen" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "Envelop C3, 324 x 458 mm" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "Envelop C4, 229 x 324 mm" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "Envelop C5, 162 x 229 mm" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "Envelop C6, 114 x 162 mm" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "Envelop C65, 114 x 229 mm" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "Kan geen event-object maken." + +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "Kan geen mutex maken" + +#: ../src/mac/thread.cpp:92 +#, fuzzy +msgid "Can not create mutex." +msgstr "Kan geen mutex maken" + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "Kan bestanden in map '%s' niet opsommen" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "Kan thread %x niet voortzetten" + +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "Kan thread niet starten: fout bij schrijven TLS." + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "Kan thread %x niet opschorten" + +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "Kan niet wachten op thread-beëindiging" + +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "Kan niet &ongedaan maken: " + +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "" +"Kan afbeeldingstype van bestand '%s' niet bepalen: bestand bestaat niet." + +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "Kan registersleutel '%s' niet sluiten" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "Kan geen waarden kopiëren van niet-ondersteund type %d" + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" +"Kan geen list-control venster maken, zorg dat comctl32.dll geïnstalleerd is." + +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "Kan registersleutel '%s' niet maken" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "Kan geen 'inter-process read pipe' maken" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "Kan geen 'inter-process write pipe' maken" + +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "Kan thread niet maken" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"Kan geen venster van type %s maken!\n" +"Mogelijk Windows 3.x compatibiliteitsprobleem?" + +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "Kan sleutel '%s' niet verwijderen" + +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "Kan INI-bestand '%s' niet verwijderen" + +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "Kan waarde '%s' niet verwijderen uit sleutel '%s'" + +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "Kan waarde van sleutel '%s' niet verwijderen" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "Kan subsleutels van sleutel '%s' niet opsommen" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "Kan waarden van sleutel '%s' niet opsommen" + +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "Kan huidige positie in bestand '%s' niet vinden" + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"Kan lege dialoogsjabloon niet vinden!\n" +"Kijn resource include-pad na voor wx.rc." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "Kan serialisatie-object '%s' voor object '%s' niet vinden." + +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "Kan geen informatie krijgen over registersleutel '%s'" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "Kan geen afbeelding laden uit bestand '%s': bestand bestaat niet." + +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "Kan dynamische bibliotheek wxSerial niet laden." + +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "Kan bestand '%s' niet openen" + +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "Kan registersleutel '%s' niet openen" + +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "Kan waarde van '%s' niet lezen" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "Kan waarde van sleutel '%s' niet lezen" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "Kan loggegevens niet in bestand opslaan." + +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "Kan thread-prioriteit niet instellen" + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "Kan waarde van '%s' niet instellen" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "Annuleer" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "Kan geen actieve inbelverbinding vinden: %s" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "Kan locatie van adresboek niet vinden" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "Kan prioriteitsbereik niet verkrijgen voor planningsstrategie %d." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "Kan host-naam niet verkrijgen" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "Kan officiële host-naam niet verkrijgen" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "Kan niet ophangen - geen actieve inbelverbinding" + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "Kan OLE niet initializeren" + +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "Kan HTML-document '%s' niet openen" + +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "Kan HTML-helpbestand '%s' niet openen" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "Kan URL '%s' niet openen" + +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "Kon inhoudsopgave-bestand niet openen: %s" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Kan bestand voor PostScript-afdrukken niet openen!" + +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "Kan index-bestand niet openen: %s" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "Kan geen lege pagina afdrukken." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "Kan thread-planningsstrategie niet verkrijgen." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "Kan thread niet starten: fout bij schrijven van TLS" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "Hoofdlettergevoelig" + +#: ../src/common/fontmap.cpp:113 +#, fuzzy +msgid "Celtic (ISO-8859-14)" +msgstr "Baltisch (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Centraal-Europees (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "Kies internetaanbieder om te bellen" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "Kies lettertype" + +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Wis de loggegevens" + +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "Sluiten" + +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "Sluit dit venster" + +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Naam van configuratie-ingang kan niet beginnen met '%c'." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "Bevestig" + +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Bezig te verbinden..." + +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Verbinding met wxHelp heeft na %d seconden een time-out veroorzaakt" + +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Inhoud" + +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "Kopieën:" + +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "Kon in te voegen bronbestand %s niet vinden." + +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "Kon tabblad niet vinden voor id" + +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "Kon Rich Edit dll '%s' niet laden" + +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"Kon control class of id '%s' niet herleiden. Gebruik een integer (niet nul)\n" +"of zorg voor een #define (zie handleiding voor mogelijke problemen)" + +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"Kon menu '%s' niet herleiden. Gebruik een integer (niet nul)\n" +"of zorg voor een #define (zie handleiding voor mogelijke problemen)" + +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "Kon afdrukvoorbeeld niet starten." + +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "Kon printen niet starten." + +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "Kon gegevens niet naar venster overdragen" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "Kon geen mutex-lock verkrijgen" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "Kon geen afbeelding aan de lijst toevoegen" + +#: ../src/mac/thread.cpp:227 +#, fuzzy +msgid "Couldn't change the state of event object." +msgstr "Kan geen event-object maken." + +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "Kon geen timer creëren" + +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Kon symbool %s niet vinden in een dynamische bibliotheek" + +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "Kon pointer naar huidige thread niet verkrijgen" + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "Kon DDE-server '%s' niet starten." + +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "" +"Kon PNG-afbeelding niet laden: bestand is corrupt of onvoldoende geheugen." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "Kon klembord-formaat '%s' niet registreren." + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "Kon mutex niet vrijgeven" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "Kon geen informatie verkrijgen over lijst-item %d." + +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "Kon thread niet beëindigen" + +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "Maak map" + +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "Maak nieuwe map" + +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "Huidige map:" + +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "Baltisch (ISO-8859-13)" + +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "D, 22 x34 inch" + +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "DDE 'poke request' mislukt" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "Envelop DL, 110 x 220 mm" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "Datum" + +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "Decoratief" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" +"Inbel-functies zijn niet beschikbaar omdat de inbelverbindingssoftware (RAS) " +"niet op deze machine is geïnstalleerd. Installeer het a.u.b." + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Wist u dat..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Map '%s' kon niet worden gemaakt" + +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "Map bestaat niet" + +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"Toon alle items in de index die de gegeven tekst bevatten. Niet " +"hoofdlettergevoelig." + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "Toon optie-dialoog" + +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "Wilt u de veranderingen in document '%s' bewaren?" + +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Klaar" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Klaar." + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "E, 34 x 44 inch" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "Verstreken tijd: " + +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "Ingangen gevonden" + +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"Uitbreiding van omgevingsvariabelen mislukt: ontbrekende '%c' op positie %d " +"in '%s'." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "Fout" + +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Fout " + +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "Fout bij het maken van map" + +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "Fout: " + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Esperanto (ISO-8859-3)" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Geschatte tijd: " + +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "Etcetera" + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "Uitvoering van opdracht '%s' mislukt" + +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "USA Executive, 7 1/4 x 10 1/2 inch" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "'*' verwacht bij inlezen van bron." + +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "'=' verwacht bij inlezen van bron." + +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "'char' verwacht bij inlezen van bron." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "%s van inbelverbinding mislukt: %s" + +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "Sluiten van klembord mislukt." + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "Verbinding mislukt: gebruikersnaam/wachtwoord ontbreekt." + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "Verbinding mislukt: geen internetaanbieder om te bellen." + +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "Kopiëren van registerwaarde '%s' mislukt" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "Kopiëren van registersleutel '%s' naar '%s' mislukt." + +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "Maken van DDE-string mislukt" + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "Maken van MDI-hoofdvenster mislukt." + +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "Maken van statusbalk mislukt." + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "Maken van verbinding met server '%s' voor onderwerp '%s' mislukt" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" +"Maken van dialoogvenster mislukt. U bent mogelijk '#include wx/msw/wx.rc' in " +"uw resources vergeten." + +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "Maken van map mislukt" + +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "Weergeven van HTML-document in %s-codering mislukt" + +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "Legen van klembord mislukt." + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "Opzetten van advies-lus met de DDE-server mislukt" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "Maken van inbelverbinding mislukt: %s" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "Uitvoeren van '%s' mislukt\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Vinden van XBM-bron %s mislukt.\n" +"Bent u vergeten wxResourceLoadBitmapData te gebruiken?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"Vinden van XBM-brom %s mislukt.\n" +"Bent u vergeten wxResourceLoadIconData te gebruiken?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Vinden van XPM-bron %s mislukt.\n" +"Bent u vergeten wxResourceLoadBitmapData te gebruiken?" + +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "Verkrijgen van namen van internetaanbieders mislukt: %s" + +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "Gegevens van klembord ophalen mislukt" + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "Verkrijgen van UTC systeem-tijd mislukt." + +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "Verkrijgen van lokale systeem-tijd mislukt" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" +"Aansluiten bij een thread mislukt, mogelijk geheugenlek aangetroffen - " +"herstart het programma a.u.b." + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Laden van gedeelde bibliotheek '%s' mislukt" + +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "Openen van klembord mislukt." + +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "Bewaren van gegevens op klembord mislukt" + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "Omleiden van I/O van subprocess mislukt" + +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Registratie van DDE-server '%s' mislukt" + +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Onthouden van codering voor tekenset '%s' mislukt." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "Hernoemen van registerwaarde '%s' naar '%s' mislukt" + +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "Hernoemen van registersleutel '%s' naar '%s' mislukt" + +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "Ophalen van gegevens van klembord mislukt" + +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "Verkrijgen van tekst van inbel-foutmelding mislukt" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "Verkrijgen van ondersteunde klembord-formaten mislukt" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "Versturen van DDE-adviesnotificatie mislukt" + +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "Instellen van klembordgegevens mislukt." + +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "Instellen van prioriteit van thread %d mislukt." + +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "Opslaan van afbeelding '%s' in geheugen VFS mislukt!" + +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "Beëindigen van thread mislukt." + +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "Beëindigen van advies-lus met de DDE-server mislukt" + +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Ophangen van inbelverbinding mislukt: %s" + +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Deregistreren van DDE-server %s mislukt" + +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "Fatale fout" + +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "Fatale fout: " + +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Fatale fout: bezig met afbreken" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "Bestand '%s' bestaat al, overschrijven?" + +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "Bestand kon niet worden geladen." + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Bestandsfout" + +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "Bestandsnaam bestaat al." + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "Bestanden (%s)|%s" + +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "Zoeken" + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "Niet-proportioneel lettertype:" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 inch" + +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "Lettertype" + +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "Lettertype-grootte:" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "'Fork' mislukt" + +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Vooruit" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "Gevonden: " + +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "%i Overeenkomsten gevonden" + +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "Van:" + +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: gegevensstroom lijkt afgekapt." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: fout in GIF-bestandsformaat." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: onvoldoende geheugen." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF: onbekende fout!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "Duitse Legal Fanfold, 8 1/2 x 13 inch" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "Duitse Std Fanfold, 8 1/2 x 12 inch" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "Ga terug" + +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Ga vooruit" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "Ga niveau hoger in document-hiërarchie" + +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "Ga naar startmap" + +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "Ga naar bovenliggende map" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Grieks (ISO-8859-7)" + +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "HTML-anchor %s bestaat niet." + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" +"HTML-bestanden (*.htm)|*.htm|HTML-bestanden (*.html)|*.html|Helpbestanden (*." +"htb)|*.htb|Helpbestanden (*.zip)|*.zip|HTML-Help Project (*.hhp)|*.hhp|Alle " +"bestanden (*.*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Hebreeuws (ISO-8859-8)" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Help" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "Help Browser Instellingen" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "Help Index" + +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "Help Afdrukken" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "Help: %s" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "Pictogram-bronspecificatie niet gevonden." + +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "Incorrecte syntax voor bronbestand." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "Ongeldige mapnaam." + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "Ongeldige bestandsspecificatie." + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" +"Niet mogelijk om Rich Edit control te maken, gewone tekst wordt gebruikt. " +"Installeer riched32.dll a.u.b. opnieuw" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "Onmogelijk om subprocess-invoer te verkrijgen" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "Verkeerde versie van HTML-help" + +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Index" + +#: ../src/common/fontmap.cpp:111 +#, fuzzy +msgid "Indian (ISO-8859-12)" +msgstr "Noors (ISO-8859-10)" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "Ongeldige TIFF-afbeeldingsindex." + +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "Cursief" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Envelop 'Italy', 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG: kon niet laden - bestand is waarschijnlijk corrupt." + +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG: kon afbeelding niet opslaan." + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "Liggend" + +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "USA Ledger, 17 x 11 inch" + +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "Linkermarge (mm):" + +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "USA Legal, 8 1/2 x 14 inch" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "USA Letter Small, 8 1/2 x 11 inch" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "USA Letter, 8 1/2 x 11 inch" + +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Licht" + +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "Laad %s-bestand" + +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "Bezig met laden: " + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "" +"Laden van Ascii PNM-afbeelding met grijswaarden nog niet geïmplementeerd." + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "" +"Laden van Raw PNM-afbeelding met grijswaarden nog niet geïmplementeerd." + +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "Log opgeslagen in bestand '%s'." + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "MDI subvenster" + +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "Mailcap-bestand %s, regel %d: incomplete ingang genegeerd." + +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "Geheugen VFS bevat al bestand '%s'!" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "" +"Mime.types-bestand %s, regel %d: niet-afgesloten aangehaalde tekstregel." + +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "Modern" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Envelop 'Monarch', 3 7/8 x 7 1/2 inch" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Meer..." + +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "Gekoppelde apparaten" + +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Mijn harde schijf" + +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "Mijn basismap" + +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Naam" + +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "Nieuw..." + +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "Nieuwe map" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "Volgende pagina" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "Nee" + +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "Geen XBM-faciliteit beschikbaar!" + +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "Geen XPM-faciliteit beschikbaar!" + +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "Geen XPM-pictogramfaciliteit beschikbaar!" + +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "Geen ingangen gevonden." + +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"De codering '%s' is onbekend.\n" +"Wilt u een lettertype selecteren voor deze codering\n" +"(anders zal de tekst in deze codering niet correct weergegeven worden)?" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "Geen handler gevonden voor afbeeldingstype." + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "Geen afbeeldingshandler voor het type %d gedefinieerd." + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "Geen afbeeldingshandler voor het type %s gedefinieerd." + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "Nog geen overeenkomende pagina gevonden" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Noors (ISO-8859-10)" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normaal" + +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Normaal lettertype: " + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Notitie, 8 1/2 x 11 inch" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "OK" + +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "HTML-document openen" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "Bewerking niet toegestaan." + +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "Optie '%s' vereist een waarde, '=' verwacht" + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "Optie '%s' vereist een waarde." + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "Optie '%s': '%s' kan niet naar een datum worden geconverteerd." + +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Instellingen" + +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "Oriëntatie" + +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: kon geen geheugen reserveren" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: bestandsformaat niet ondersteund" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: ongeldige afbeelding" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: dit is geen PCX-bestand." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX: onbekende fout!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: versienummer te laag" + +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PNM: kon geen geheugen reserveren." + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM: bestandsformaat niet herkend" + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM: bestand lijkt afgekapt." + +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Pagina %d" + +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Pagina %d van %d" + +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Pagina-instellingen" + +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Pagina's" + +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Papierformaat" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Papierformaat" + +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "Machtigingen" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "Maken van pipe mislukt" + +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "Kies a.u.b. een geldig lettertype." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Kies a.u.b. een bestaand bestand." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "Kies a.u.b. een internetaanbieder waarmee u verbinding wilt maken" + +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "Even geduld a.u.b...." + +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "Staand" + +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "PostScript" + +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "PostScript-bestand" + +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "PostScript:" + +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "Alleen afdrukvoorbeeld" + +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Afdrukvoorbeeld:" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "Vorige pagina" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "Afdrukken" + +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "Afdrukvoorbeeld" + +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "Afdrukvoorbeeld mislukt" + +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "Afdrukbereik" + +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "Afdrukinstellingen" + +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "In kleur afdrukken" + +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "Afdruk-spoolen" + +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "Deze pagina afdrukken" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "Naar bestand afdrukken" + +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "Afdrukken..." + +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "Printercommando: " + +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "Printer-opties: " + +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "Printer-instellingen" + +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "Printercommando:" + +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "Printer-opties" + +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "Printer-opties:" + +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "Printer..." + +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "Bezig met afdrukken" + +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "Afdrukfout" + +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Bezig met afdrukken van pagina %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Bezig met afdrukken..." + +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "Programma afgebroken." + +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Kwarto, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "Vraag" + +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "Leesfout bij bestand '%s'" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "Registersleutel '%s' bestaat al." + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "Registersleutel '%s' bestaat niet, kan niet hernoemen." + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"Registersleutel '%s' is nodig voor normaal systeemgebruik,\n" +"wissen maakt uw systeem onbruikbaar:\n" +"bewerking afgebroken." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "Registerwaarde '%s' bestaat al." + +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Relevante ingangen:" + +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Resterende tijd: " + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "Verwijder huidige pagina uit favorieten" + +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "Bestand '%s' vervangen?" + +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Rechtermarge (mm):" + +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "Romein" + +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "Sla %s-bestand op" + +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Opslaan als" + +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "Sla log-gegevens op in bestand" + +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "Schrift-letter" + +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "Zoeken" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"Zoek in inhoudsopgave van helpbestand(en) naar alle plaatsen waar de tekst " +"die u boven heeft getypt voorkomt." + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "Zoek in alle boeken" + +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "Bezig met zoeken..." + +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "Secties" + +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "Zoekfout bij bestand '%s'" + +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Selecteer een documentsjabloon" + +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Selecteer een documentweergave" + +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Selecteer een bestand" + +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "Stuur naar printer" + +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "Scheidingsteken verwacht na de optie '%s'." + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Instellingen" + +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "Instellingen..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "" +"Meerdere actieve inbelverbindingen gevonden, willekeurige keuze gemaakt." + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "Toon alles" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "Toon alle items in de index" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "Toon verborgen bestanden" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "Toon/verberg navigatie-paneel" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "Formaat" + +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Schuin" + +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "Sorry, kon dit bestand niet opslaan." + +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "Sorry, kon dit bestand niet openen." + +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "Sorry, kon dit bestand niet opslaan." + +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "Sorry, onvoldoende geheugen voor afdrukweergave." + +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "USA Statement, 5 1/2 x 8 1/2 inch" + +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "Status: " + +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "Schreefloos" + +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: kon geen geheugen reserveren." + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: fout bij laden van afbeelding." + +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: fout bij lezen van afbeelding." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: fout bij opslaan van afbeelding." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: fout bij schrijven van afbeelding." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "USA Tabloid, 11 x 17 inch" + +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "Niet-proportioneel (Teletype)" + +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "Sjablonen" + +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "Tijdelijk" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Thais (ISO-8859-11)" + +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "Deze computer" + +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"De tekenset '%s' is onbekend. U kunt een andere\n" +"tekenset kiezen om te vervangen of kies [Annuleer]\n" +"als het niet vervangen kan worden" + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "Het klembord-formaat '%d' bestaat niet." + +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "De map" + +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"Het bestand '%s' bestaat niet en kon niet geopend worden.\n" +"Het is ook verwijderd van de lijst 'recente bestanden'." + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "De benodigde parameter '%s' was niet gespecificeerd." + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "De tekst kon niet worden opgeslagen." + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "De waarde voor de optie '%s' moet worden opgegeven/" + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" +"De versie van de inbelverbindingssoftware (RAS) op deze machine is te oud " +"(de volgende benodigde functie ontbreekt: %s)." + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"Threadmodule-initialisatie mislukt: kan geen waarde opslaan in lokale thread-" +"geheugenruimte." + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "Threadmodule-initialisatie mislukt: maken van thread-sleutel mislukt" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"Threadmodule-initialisatie mislukt: niet mogelijk een index te reserven in " +"lokale thread-geheugenruimte." + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "Thread-prioriteitsinstelling is genegeerd." + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Tijd" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Tip van de dag" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Geen tips beschikbaar, sorry!" + +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "Aan:" + +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "Bovenmarge (mm):" + +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "" +"Bezig met poging om bestand '%s' uit geheugen VFS te verwijderen, maar het " +"is niet geladen!" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "Poging om een lege hostnaam te vinden: bezig op te geven" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "Turks (ISO-8859-9)" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "USA Std Fanfold, 14 7/8 x 11 inch" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "Kan gevraagd HTML-document niet openen: %s" + +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Onderstreept" + +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "Onverwacht einde van bestand tijdens inlezen van bron." + +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "Onverwachte parameter '%s'" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "Onbekende DDE-fout %08x" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "Onbekende codering (%d)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "Onbekend veld in bestand %s, regel %d: '%s''. " + +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "Onbekende lange optie '%s'" + +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "Onbekende optie '%s'" + +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "Niet-afgesloten '{' in ingang voor mime-type %s." + +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "Naamloze opdracht" + +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "Niet-herkende stijl %s tijdens inlezen van bron." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "Niet-ondersteund klembord-formaat." + +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Gebruik: %s" + +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Gebruiker" + +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "Lokale gebruiker" + +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "Validatie-conflict" + +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "Variabelen" + +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "Toon bestanden in detail-weergave" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "Toon bestanden in lijst-weergave" + +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "Weergaven" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Wachten op beëindiging van subproces mislukt" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "Waarschuwing" + +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "Waarschuwing: " + +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "" +"Waarschuwing: poging om HTML tag handler van lege stack te verwijderen." + +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "West-Europees (ISO-8859-1/Latin 1)" + +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "West-Europees nieuw (ISO-8859-15/Latin 0)" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "Alleen hele woorden" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "Windows 3.1 met Win32s" + +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "Venster" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "Windows 9%c" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Windows Arabisch (CP 1256)" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Windows Baltisch (CP 1257)" + +#: ../src/common/fontmap.cpp:116 +#, fuzzy +msgid "Windows Central European (CP 1250)" +msgstr "Windows Hebreeuws (CP 1255)" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Windows Cyrillisch (CP 1251)" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Windows Grieks (CP 1253)" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Windows Hebreeuws (CP 1255)" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Windows Turks (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +#, fuzzy +msgid "Windows Western European (CP 1252)" +msgstr "Windows Latin 1 (CP 1252)" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "Schrijffout bij bestand '%s'" + +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "X-vergroting" + +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "X-verplaatsing" + +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "Y-vergroting" + +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "Y-verplaatsing" + +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "Ja" + +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "U kunt geen nieuwe map aan deze sectie toevoegen." + +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[LEEG]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "" +"een DDEML-applicatie heeft door een 'race'-conditie geheugengebrek " +"veroorzaakt." + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" +"een DDEML-functie was aangeroepen zonder eerst de DdeInitialize-functie aan " +"te roepen\n" +"of een ongeldige applicatie-pid was doorgegeven aan een DDEML-functie." + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "een poging van een client om een conversatie op te zetten is mislukt." + +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "een geheugenreservering is mislukt." + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "een parameter kon niet door de DDEML gevalideerd worden." + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" +"aanvraag voor synchrone advies-transactie heeft een time-out veroorzaakt." + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "" +"aanvraag voor synchrone gegevens-transactie heeft een time-out veroorzaakt." + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" +"aanvraag voor synchrone uitvoerings-transactie heeft een time-out " +"veroorzaakt." + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "" +"aanvraag voor synchrone 'poke'-transactie heeft een time-out veroorzaakt." + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" +"aanvraag voor beëindigen van advies-transactie heeft een time-out " +"veroorzaakt." + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" +"vanaf de server werd een transactie geprobeerd op een conversatie\n" +"die door de client was beëindigd of de server heeft afgebroken\n" +"voordat de transactie was afgerond." + +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "een transactie is mislukt." + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" +"een applicatie die als APPCLASS_MONITOR is gestart heeft geprobeerd\n" +"een DDE-transactie uit te voeren of een applicatie die als APPCMD_CLIENTONLY " +"is\n" +"gestart heeft geprobeerd een server-transactie uit te voeren." + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "een interne oproep van de PostMessage-functie is mislukt." + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "een interne fout is opgetreden in de DDEML." + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" +"een ongeldige transactie-id werd doorgegeven aan een DDEML-functie.\n" +"Als de applicatie verdergaat na een XTYP_XACT_COMPLETE-callback dan is\n" +"de transactie-id voor die callback niet meer geldig." + +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "poging tot wijzigen van onveranderbare sleutel '%s' genegeerd." + +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "kan bestand '%s' niet sluiten" + +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "kan bestandsbeschrijving %d niet sluiten" + +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "kan verandering niet doorvoeren in bestand '%s'" + +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "kan bestand '%s' niet maken" + +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "kan bestand met gebruikersinstellingen '%s' niet wissen" + +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "" +"kan niet bepalen of bestandseinde is bereikt bij bestandsbeschrijving %d" + +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "kan bestandslengte niet vinden bij bestandsbeschrijving %d" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "kan gebruiker's startlocatie niet vinden, gebruik huidige map." + +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "kan bestandsbeschrijving %d niet legen" + +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "kan zoekpositie niet verkrijgen bij bestandsbeschrijving %d" + +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "kan geen lettertype laden, wordt afgebroken" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "kan bestand '%s'niet openen" + +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "kan globaal configuratiebestand '%s' niet openen." + +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "kan gebruikers-configuratiebestand '%s' niet openen." + +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "kan gebruikers-configuratiebestand niet openen." + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "kan niet lezen van bestandsbeschrijving %d" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "kan bestand '%s' niet verwijderen" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "kan tijdelijk bestand '%s' niet verwijderen" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "kan niet zoeken bij bestandsbeschrijving %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "kan bestand '%s' niet naar schijf schrijven." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "kan niet schrijven naar bestandsbeschrijving %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "kan gebruikers-configuratiebestand niet schrijven." + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "catalogus-bestand voor domein '%s' niet gevonden." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "datum" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "achttiende" + +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "achtste" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "elfde" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "ingang '%s' komt meer dan één keer voor in groep '%s'" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "Maken" + +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "legen van bestand '%s' mislukt" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "vijftiende" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "vijfde" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "bestand '%s', regel %d: '%s' genegeerd na groepsheader." + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "bestand '%s', regel %d: '=' verwacht." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "" +"bestand '%s', regel %d: sleutel '%s' voor het eerst gevonden op regel %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "" +"bestand '%s', regel %d: waarde voor onveranderbare sleutel '%s' genegeerd." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "bestand '%s': onverwacht teken %c in regel %d." + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "eerste" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "veertiende" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "vierde" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "gmtime() mislukt" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "Starten" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "ongeldige eof() return-waarde." + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "ongeldige return-waarde van berichtvenster" + +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "groot" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "landinstelling '%s' kan niet worden ingesteld." + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "bezig met zoeken van catalogus '%s' in pad '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "medium" + +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "middernacht" + +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "kmtime() mislukt" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "negentiende" + +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "negende" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "geen DDE-fout" + +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "naamloos" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "middag" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "num" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "probleem met 'reentrancy'." + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "tweede" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "zeventiende" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "zevende" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "zestiende" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "zesde" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "klein" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "tiende" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "het antwoord op de transactie heeft de DDE_FBUSY-bit op 1 gezet." + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "derde" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "dertiende" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "vandaag" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "morgen" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "twaalfde" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "twintigste" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "onverwachte \" op positie %d in '%s'." + +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "onbekend" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "onbekende fout (foutnummer %08x)." + +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "onbekend zoek-startpunt" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "onbekend zoek-startpunt" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "onbekend-%d" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "naamloos" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "naamloos%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "catalogus '%s' van '%s' wordt gebruikt." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "zeer groot" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "zeer klein" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "wxGetTimeOfDay mislukt." + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: ongeldige handtekening in ReadMsg." + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: onbekende gebeurtenis!" + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "wxWindows kon beeldscherm niet openen voor '%s': afbreken." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: fout bij zoeken van tijdelijke bestandsnaam.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "gisteren" + +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Cyrillisch (Latin 5)" + +#~ msgid "ISO-8859-12" +#~ msgstr "ISO-8859-12" + +#~ msgid "ISO-8859-14" +#~ msgstr "ISO-8859-14" + +#~ msgid "Windows Latin 2 (CP 1250)" +#~ msgstr "Windows Latin 2 (CP 1250)" diff --git a/locale/ru.po b/locale/ru.po new file mode 100644 index 0000000000..d4b1b1684e --- /dev/null +++ b/locale/ru.po @@ -0,0 +1,3804 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows-2.2.1\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-08-10 16:09+0200\n" +"Last-Translator: Roman Rolinsky , Vadim Zeitlin " +"\n" +"Language-Team: wx-translators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=koi8-r\n" +"Content-Transfer-Encoding: 8-bit\n" + +# ../src/generic/dirdlgg.cpp:550 +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(õ ×ÁÓ ÅÓÔØ ÎÅÏÂÈÏÄÉÍÙÅ ÒÁÚÒÅÛÅÎÉÑ?)" + +# ../src/generic/dirdlgg.cpp:537 +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"ÎÅ ÓÕÝÅÓÔ×ÕÅÔ\n" +"óÏÚÄÁÔØ ÅÇÏ ÓÅÊÞÁÓ?" + +# ../src/common/log.cpp:238 +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (ÏÛÉÂËÁ %ld: %s)" + +# ../src/common/docview.cpp:1204 +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +# ../src/html/htmprint.cpp:491 +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr "ðÒÅÄ-ÏÓÍÏÔÒ ÐÅÞÁÔÉ" + +# ../src/generic/filedlgg.cpp:328 +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr " ÂÁÊÔ " + +# ../src/common/paper.cpp:124 +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "#10 Envelope, 4 1/8 x 9 1/2 ÄÀÊÍ" + +# ../src/common/paper.cpp:125 +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "#11 Envelope, 4 1/2 x 10 3/8 ÄÀÊÍ" + +# ../src/common/paper.cpp:126 +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "#12 Envelope, 4 3/4 x 11 ÄÀÊÍ" + +# ../src/common/paper.cpp:127 +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "#14 Envelope, 5 x 11 1/2 ÄÀÊÍ" + +# ../src/common/paper.cpp:123 +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "#9 Envelope, 3 7/8 x 8 7/8 ÄÀÊÍ" + +# ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +# ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +# ../src/common/resource.cpp:2988 +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "#define %s ÄÏÌÖÎÏ ÂÙÔØ ÞÉÓÌÏÍ." + +# ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +# ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i ÉÚ %i" + +# ../src/common/cmdline.cpp:735 +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (ÉÌÉ %s)" + +# ../src/generic/logg.cpp:239 +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "ïÛÉÂËÁ %s" + +# ../src/generic/logg.cpp:247 +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "éÎÆÏÒÍÁÃÉÑ %s" + +# ../src/generic/logg.cpp:243 +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "ðÒÅÄÕÐÒÅÖÄÅÎÉÅ %s" + +# ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÓÐÅÃÉÆÉËÁÃÉÉ bitmap-ÒÅÓÕÒÓÁ." + +# ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "%s ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÓÐÅÃÉÆÉËÁÃÉÉ ÉËÏÎËÉ." + +# ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +# ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +# ../src/common/resource.cpp:3085 +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s: ÏÛÉÂÏÞÎÙÊ ÓÉÎÔÁËÓÉÓ ÆÁÊÌÁ ÒÅÓÕÒÓÏ×." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +# ../src/generic/logg.cpp:473 ../src/generic/tipdlg.cpp:170 +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&úÁËÒÙÔØ" + +# ../src/generic/logg.cpp:685 +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&äÅÔÁÌÉ" + +# ../src/generic/wizard.cpp:284 +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&úÁ×ÅÒÛÉÔØ" + +# ../src/generic/logg.cpp:474 +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&öÕÒÎÁÌ" + +# ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&óÌÅÄÕÀÝÉÊ >" + +# ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&óÌÅÄÕÀÝÉÊ >" + +# ../src/generic/tipdlg.cpp:175 +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "&óÌÅÄÕÀÝÁÑ ÐÏÄÓËÁÚËÁ" + +# ../src/common/docview.cpp:1900 ../src/common/docview.cpp:1911 +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "&÷ÏÓÓÔÁÎÏ×ÉÔØ" + +# ../src/common/docview.cpp:1894 ../src/common/docview.cpp:1921 +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "&÷ÏÓÓÔÁÎÏ×ÉÔØ " + +# ../src/generic/logg.cpp:469 ../src/generic/logg.cpp:770 +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "&óÏÈÒÁÎÉÔØ..." + +# ../src/generic/tipdlg.cpp:172 +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&ðÏËÁÚÙ×ÁÔØ ÐÏÄÓËÁÚËÉ ÐÒÉ ÓÔÁÒÔÅ" + +# ../src/common/docview.cpp:1906 +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "ï&ÔÍÅÎÉÔØ" + +# ../src/common/docview.cpp:1881 +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "ï&ÔÍÅÎÉÔØ " + +# ../src/common/docview.cpp:1906 +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&ïËÎÏ" + +# ../src/common/config.cpp:396 +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' ÓÏÄÅÒÖÉÔ ÌÉÛÎÉÅ '..', ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÏ." + +# ../src/common/valtext.cpp:140 +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' ÎÅÄÏÐÕÓÔÉÍÏ" + +# ../src/common/cmdline.cpp:657 +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' - ÎÅÄÏÐÕÓÔÉÍÏÅ ÞÉÓÌÏ×ÏÅ ÚÎÁÞÅÎÉÅ ÄÌÑ ÏÐÃÉÉ '%s'." + +# ../src/common/intl.cpp:395 +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' ÎÅ×ÅÒÎÙÊ ËÁÔÁÌÏÇ ÓÏÏÂÝÅÎÉÊ." + +# ../src/common/textfile.cpp:250 +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "'%s' ×ÏÚÍÏÖÎÏ Ä×ÏÉÞÎÙÊ ÆÁÊÌ." + +# ../src/common/valtext.cpp:178 +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' ÄÏÌÖÎÏ ÂÙÔØ ÞÉÓÌÏÍ." + +# ../src/common/valtext.cpp:160 +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' ÄÏÌÖÎÏ ÓÏÄÅÒÖÁÔØ ÔÏÌØËÏ ÓÉÍ×ÏÌÙ ASCII." + +# ../src/common/valtext.cpp:166 +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' ÄÏÌÖÎÏ ÓÏÄÅÒÖÁÔØ ÔÏÌØËÏ ÓÉÍ×ÏÌÙ ÁÌÆÁ×ÉÔÁ." + +# ../src/common/valtext.cpp:172 +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' ÄÏÌÖÎÏ ÓÏÄÅÒÖÁÔØ ÔÏÌØËÏ ÓÉÍ×ÏÌÙ ÁÌÆÁ×ÉÔÁ ÉÌÉ ÃÉÆÒÙ." + +# ../src/html/helpfrm.cpp:679 +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(ðÏÍÏÝØ)" + +# ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +# ../src/html/helpfrm.cpp:1330 +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(ÚÁËÌÁÄËÉ)" + +# ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +# ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +# ../src/common/resource.cpp:3024 +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", ÏÖÉÄÁÌÓÑ static, #include ÉÌÉ #define\n" +"×Ï ×ÒÅÍÑ ÓÉÎÔÁËÓÉÞÅÓËÏÇÏ ÁÎÁÌÉÚÁ." + +# ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +# ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +# ../src/common/paper.cpp:120 +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 ÄÀÊÍ" + +# ../src/common/paper.cpp:121 +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 ÄÀÊÍ" + +# ../src/common/paper.cpp:139 +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "6 3/4 Envelope, 3 5/8 x 6 1/2 ÄÀÊÍ" + +# ../src/html/htmprint.cpp:272 +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": ÆÁÊÌ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ!" + +# ../src/common/fontmap.cpp:462 +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": ÎÅÉÚ×ÅÓÔÎÙÊ ÎÁÂÏÒ ÓÉÍ×ÏÌÏ×" + +# ../src/common/fontmap.cpp:651 +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": ÎÅÉÚ×ÅÓÔÎÁÑ ËÏÄÉÒÏ×ËÁ" + +# ../src/generic/wizard.cpp:186 +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &îÁÚÁÄ" + +# ../src/generic/filedlgg.cpp:356 +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +# ../src/generic/filedlgg.cpp:323 +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr " " + +# ../src/generic/filedlgg.cpp:357 +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +# ../src/generic/filedlgg.cpp:324 +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr " " + +# ../src/html/helpfrm.cpp:928 +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4
    " +msgstr "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4
    " + +# ../src/common/paper.cpp:113 +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "ìÉÓÔ A3 297 x 420 ÍÍ" + +# ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2516 +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "ìÉÓÔ A4, 210 x 297 ÍÍ" + +# ../src/common/paper.cpp:114 +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "íÁÌÙÊ ÌÉÓÔ A4, 210 x 297 ÍÍ" + +# ../src/common/paper.cpp:115 +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "ìÉÓÔ A5, 148 x 210 ÍÍ" + +# ../src/generic/fontdlgg.cpp:325 +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +# ../src/html/helpfrm.cpp:270 +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "äÏÂÁ×ÉÔØ ÔÅËÕÝÕÀ ÓÔÒÁÎÉÃÕ Ë ÚÁËÌÁÄËÁÍ" + +# ../src/generic/colrdlgg.cpp:269 +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "äÏÂÁ×ÉÔØ Ë Ã×ÅÔÁÍ ÐÏÌØÚÏ×ÁÔÅÌÑ" + +# ../src/html/helpctrl.cpp:83 +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "äÏÂÁ×ÌÅÎÉÅ ËÎÉÇÉ %s" + +# ../src/generic/prntdlgg.cpp:163 +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "÷ÓÅ" + +# ../src/generic/filedlgg.cpp:825 +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "÷ÓÅ ÆÁÊÌÙ (*)|*" + +# ../src/generic/filedlgg.cpp:825 +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "÷ÓÅ ÆÁÊÌÙ (*)|*" + +# ../src/unix/dialup.cpp:359 +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "õÖÅ Ú×ÏÎÉÍ ISP." + +# ../src/generic/logg.cpp:1017 +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "äÏÂÁ×ÉÔØ × ÆÁÊÌ ÖÕÒÎÁÌÁ '%s' (×ÙÂÏÒ [îÅÔ] ÐÅÒÅÐÉÛÅÔ ÅÇÏ)?" + +# ../src/common/fontmap.cpp:102 +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "Arabic (ISO-8859-6)" + +# ../src/common/paper.cpp:134 +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "B4 Envelope, 250 x 353 ÍÍ" + +# ../src/common/paper.cpp:116 +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "ìÉÓÔ B4, 250 x 354 ÍÍ" + +# ../src/common/paper.cpp:135 +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "B5 Envelope, 176 x 250 ÍÍ" + +# ../src/common/paper.cpp:117 +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "ìÉÓÔ B5, 182 x 257 ÍÍ" + +# ../src/common/paper.cpp:136 +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "B6 Envelope, 176 x 125 ÍÍ" + +# ../src/common/imagbmp.cpp:387 +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: ðÏËÁ ÎÅ×ÏÚÍÏÖÎÏ ÒÁÂÏÔÁÔØ Ó 4-ÂÉÔÎÏÊ ËÏÄÉÒÏ×ËÏÊ." + +# ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: îÅ ÍÏÇÕ ÒÁÓÐÒÅÄÅÌÉÔØ ÐÁÍÑÔØ." + +# ../src/common/imagbmp.cpp:62 +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: îÅ ÍÏÇÕ ÚÁÐÉÓÁÔØ ÎÅÄÅÊÓÔ×ÉÔÅÌØÎÏÅ ÉÚÏÂÒÁÖÅÎÉÅ." + +# ../src/common/imagbmp.cpp:154 +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: îÅ ÍÏÇÕ ÚÁÐÉÓÁÔØ ÄÁÎÎÙÅ." + +# ../src/common/imagbmp.cpp:131 +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: îÅ ÍÏÇÕ ÚÁÐÉÓÁÔØ ÚÁÇÏÌÏ×ÏË ÆÁÊÌÁ." + +# ../src/common/imagbmp.cpp:257 +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: ëÏÄÉÒÏ×ËÁ ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÇÌÕÂÉÎÅ ÂÉÔÏ×." + +# ../src/common/imagbmp.cpp:220 +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: ÷ÙÓÏÔÁ ÆÁÊÌÁ ÉÚÏÂÒÁÖÅÎÉÑ > 32767 ÐÉËÓÅÌÏ×." + +# ../src/common/imagbmp.cpp:214 +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "ûÉÒÉÎÁ ÆÁÊÌÁ ÉÚÏÂÒÁÖÅÎÉÑ > 32767 ÐÉËÓÅÌÏ×." + +# ../src/common/imagbmp.cpp:234 +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: îÅÉÚ×ÅÓÔÎÁÑ ÇÌÕÂÉÎÁ ÂÉÔÏ× ÆÁÊÌÁ." + +# ../src/common/imagbmp.cpp:243 +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP: îÅÉÚ×ÅÓÔÎÁÑ ËÏÄÉÒÏ×ËÁ ÆÁÊÌÁ." + +# ../src/generic/helpwxht.cpp:157 +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "îÁÚÁÄ" + +# ../src/common/dlgcmn.cpp:135 +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "îÁÚÁÄ" + +# ../src/common/fontmap.cpp:109 +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Baltic (ISO-8859-13)" + +# ../src/common/fontmap.cpp:100 +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Baltic (old) (ISO-8859-4)" + +# ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "óÐÅÃÉÆÉËÁÃÉÑ ÒÅÓÕÒÓÁ bitmap %s ÎÅ ÎÁÊÄÅÎÁ." + +# ../src/generic/fontdlgg.cpp:217 +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "öÉÒÎÙÊ" + +# ../src/generic/prntdlgg.cpp:662 +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "îÉÖÎÅÅ ÐÏÌÅ (ÍÍ):" + +# ../src/common/paper.cpp:105 +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "ìÉÓÔ C, 17 x 22 ÄÀÊÍ" + +# ../src/generic/logg.cpp:471 +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "ï&ÞÉÓÔÉÔØ" + +# ../src/common/paper.cpp:130 +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "C3 Envelope, 324 x 458 ÍÍ" + +# ../src/common/paper.cpp:131 +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "C4 Envelope, 229 x 324 ÍÍ" + +# ../src/common/paper.cpp:129 +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "C5 Envelope, 162 x 229 ÍÍ" + +# ../src/common/paper.cpp:132 +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "C6 Envelope, 114 x 162 ÍÍ" + +# ../src/common/paper.cpp:133 +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "C65 Envelope, 114 x 229 ÍÍ" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÏÂßÅËÔ ÓÏÂÙÔÉÑ." + +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÓÅÍÁÆÏÒ" + +#: ../src/mac/thread.cpp:92 +#, fuzzy +msgid "Can not create mutex." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÓÅÍÁÆÏÒ" + +# ../src/common/filefn.cpp:1272 ../src/unix/dir.cpp:214 +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "îÅ ÍÏÇÕ ÐÏÄÓÞÉÔÁÔØ ÆÁÊÌÙ × ËÁÔÁÌÏÇÅ '%s'" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "îÅ×ÏÚÍÏÖÎÏ ×ÏÚÏÂÎÏ×ÉÔØ ÎÉÔØ %x" + +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁÐÕÓÔÉÔØ ÎÉÔØ: ÏÛÉÂËÁ ÚÁÐÉÓÉ TLS." + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÓÔÁÎÏ×ÉÔØ ÎÉÔØ %x" + +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÄÏÖÄÁÔØÓÑ ÏËÏÎÞÁÎÉÑ ÎÉÔÉ" + +# ../src/common/docview.cpp:1883 +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "îÅ ÍÏÇÕ ï&ÔÍÅÎÉÔØ " + +# ../src/common/image.cpp:926 +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "îÅ ÍÏÇÕ ÐÒÏ×ÅÒÉÔØ ÆÏÒÍÁÔ ÉÚÏÂÒÁÖÅÎÉÑ ÆÁÊÌÁ '%s': ÆÁÊÌ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ." + +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁËÒÙÔØ ËÌÀÞ registry '%s'" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓËÏÐÉÒÏ×ÁÔØ ÚÎÁÞÅÎÉÅ ÎÅÐÏÄÄÅÒÖÉ×ÁÅÍÏÇÏ ÔÉÐÁ %d." + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ listview control, ÐÒÏ×ÅÒØÔÅ ÕÓÔÁÎÏ×ËÕ comctl32.dll." + +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ËÌÀÞ registry '%s'" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ËÏÍÍÕÎÉËÁÃÉÏÎÎÙÊ ËÁÎÁÌ ÄÌÑ ÞÔÅÎÉÑ" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ËÏÍÍÕÎÉËÁÃÉÏÎÎÙÊ ËÁÎÁÌ ÄÌÑ ÚÁÐÉÓÉ" + +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÎÉÔØ" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÏËÎÏ ËÌÁÓÓÁ %s!\n" +"÷ÏÚÍÏÖÎÙ ÐÒÏÂÌÅÍÙ ÓÏ×ÍÅÓÔÉÍÏÓÔÉ Windows 3.x?" + +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ËÌÀÞ '%s'" + +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ INI-ÆÁÊÌ '%s'" + +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÚÎÁÞÅÎÉÅ '%s' ËÌÀÞÁ '%s'" + +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÚÎÁÞÅÎÉÅ ËÌÀÞÁ '%s'" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÄÓÞÉÔÁÔØ ÐÏÄËÌÀÞÉ ËÌÀÞÁ '%s'" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÄÓÞÉÔÁÔØ ÚÎÁÞÅÎÉÑ ËÌÀÞÁ '%s'" + +# ../src/common/ffile.cpp:234 +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "îÅ ÍÏÇÕ ÎÁÊÔÉ ÔÅËÕÝÕÀ ÐÏÚÉÃÉÀ × ÆÁÊÌÅ '%s'" + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÛÁÂÌÏÎ ÄÉÁÌÏÇÁ!\n" +"ðÒÏ×ÅÒØÔÅ ÐÕÔØ ÐÏÉÓËÁ wx.rc." + +# ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "îÅ ÍÏÇÕ ÎÁÊÔÉ ÏÂßÅËÔ ÓÅÒÉÁÌÉÚÁÃÉÉ '%s' ÄÌÑ ÏÂßÅËÔÁ '%s'." + +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÉÎÆÏÒÍÁÃÉÀ Ï ËÌÀÞÅ registry '%s'" + +# ../src/common/image.cpp:626 ../src/common/image.cpp:646 +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "îÅ ÍÏÇÕ ÚÁÇÒÕÚÉÔØ ÉÚÏÂÒÁÖÅÎÉÅ ÉÚ ÆÁÊÌÁ '%s': ÆÁÊÌ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ." + +# ../src/common/object.cpp:307 +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "îÅ ÍÏÇÕ ÚÁÇÒÕÚÉÔØ ÄÉÎÁÍÉÞÅÓËÕÀ ÂÉÂÌÉÏÔÅËÕ wxSerial." + +# ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ '%s'" + +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ËÌÀÞ registry '%s'" + +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÚÎÁÞÅÎÉÅ '%s'" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ÚÎÁÞÅÎÉÅ ËÌÀÞÁ '%s'" + +# ../src/generic/logg.cpp:531 ../src/generic/logg.cpp:928 +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "îÅ ÍÏÇÕ ÓÏÈÒÁÎÉÔØ ÓÏÄÅÒÖÁÎÉÅ ÖÕÒÎÁÌÁ × ÆÁÊÌ." + +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÐÒÉÏÒÉÔÅÔ ÎÉÔÉ" + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÚÎÁÞÅÎÉÅ '%s'" + +# ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +# ../src/generic/dcpsg.cpp:2241 ../src/generic/dirdlgg.cpp:424 +# ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +# ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +# ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +# ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +# ../src/html/helpfrm.cpp:910 +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "ïÔÍÅÎÁ" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÔÅËÕÝÅÅ ÍÏÄÅÍÎÏÅ ÐÏÄÓÏÅÄÉÎÅÎÉÅ: %s" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "æÁÊÌ Ó ÁÄÒÅÓÓÎÏÊ ËÎÉÖËÏÊ ÎÅ ÎÁÊÄÅÎ" + +# ../src/unix/threadpsx.cpp:954 +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÉÎÔÅÒ×ÁÌ ÐÒÉÏÒÉÔÅÔÁ ÄÌÑ ÒÁÓÐÏÒÑÄËÁ %d." + +# ../src/unix/utilsunx.cpp:709 +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÉÍÑ ÈÏÓÔÁ" + +# ../src/unix/utilsunx.cpp:745 +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÏÆÉÃÉÁÌØÎÏÅ ÉÍÑ ÈÏÓÔÁ" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏ×ÅÓÉÔØ ÔÒÕÂËÕ - ÎÅÔ ÐÏÄÓÏÅÄÉÎÅÎÉÑ." + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ OLE" + +# ../src/html/htmlfilt.cpp:146 +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ HTML ÄÏËÕÍÅÎÔ: %s" + +# ../src/html/helpdata.cpp:657 +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ËÎÉÇÕ ÐÏÍÏÝÉ HTML: %s" + +# ../src/generic/helpext.cpp:96 +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ URL '%s'" + +# ../src/html/helpdata.cpp:353 +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ÓÏÄÅÒÖÁÎÉÑ: %s" + +# ../src/generic/dcpsg.cpp:1584 +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ÄÌÑ ÐÅÞÁÔÉ × PostScript!" + +# ../src/html/helpdata.cpp:368 +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ ÉÎÄÅËÓÁ: %s" + +# ../src/html/helpfrm.cpp:1174 +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÎÁÐÅÞÁÔÁÔØ ÐÕÓÔÕÀ ÓÔÒÁÎÉÃÕ." + +# ../src/unix/threadpsx.cpp:935 +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÉÚ×ÌÅÞØ ÒÁÓÐÏÒÑÄÏË ÎÉÔÉ." + +# ../src/unix/threadpsx.cpp:588 +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÔÁÒÔÏ×ÁÔØ ÎÉÔØ: ÏÛÉÂËÁ ÚÁÐÉÓÉ TLS" + +# ../src/html/helpfrm.cpp:398 +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "õÞÅÔ ÒÅÇÉÓÔÒÁ" + +# ../src/common/fontmap.cpp:109 +#: ../src/common/fontmap.cpp:113 +#, fuzzy +msgid "Celtic (ISO-8859-14)" +msgstr "Baltic (ISO-8859-13)" + +# ../src/common/fontmap.cpp:98 +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Central European (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "÷ÙÂÅÒÉÔÅ ÐÏÄÓÏÅÄÉÎÅÎÉÑ" + +# ../src/gtk/fontdlg.cpp:159 +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "÷ÙÂÅÒÉÔÅ ÛÒÉÆÔ" + +# ../src/generic/logg.cpp:471 +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "ïÞÉÓÔÉÔØ ÓÏÄÅÒÖÉÍÏÅ ÖÕÒÎÁÌÁ" + +# ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +# ../src/generic/proplist.cpp:518 +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "úÁËÒÙÔØ" + +# ../src/generic/logg.cpp:473 +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "úÁËÒÙÔØ ÜÔÏ ÏËÎÏ" + +# ../src/common/fileconf.cpp:750 +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "éÍÑ ÐÏÌÑ × ÆÁÊÌÅ ËÏÎÆÉÇÕÒÁÃÉÉ ÎÅ ÍÏÖÅÔ ÎÁÞÉÎÁÔØÓÑ Ó '%c'." + +# ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "ðÏÄÔ×ÅÒÄÉÔØ" + +# ../src/html/htmlwin.cpp:166 +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "óÏÅÄÉÎÅÎÉÅ..." + +# ../src/generic/helpxlp.cpp:240 +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "óÏÅÄÉÎÅÎÉÅ Ó wxHelp ÎÅ ÂÙÌÏ ÕÓÔÁÎÏ×ÌÅÎÏ ÚÁ %d ÓÅËÕÎÄ" + +# ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +# ../src/html/helpfrm.cpp:312 +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "óÏÄÅÒÖÁÎÉÅ" + +# ../src/generic/prntdlgg.cpp:196 +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "ëÏÐÉÉ:" + +# ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +# ../src/common/resource.cpp:1930 +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "îÅ ÎÁÊÄÅÎ ×ËÌÀÞÁÅÍÙÊ ÆÁÊÌ ÒÅÓÕÒÓÏ× %s." + +# ../src/generic/tabg.cpp:1042 +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ tab ÄÌÑ id" + +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ Rich Edit DLL '%s'" + +# ../src/common/resource.cpp:796 +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"ÎÅ×ÏÚÍÏÖÎÏ ÏÔÙÓËÁÔØ ËÏÎÔÒÏÌØÎÙÊ ËÌÁÓÓ ÄÌÑ id '%s'. úÁÍÅÎÉÔÅ ÎÁ (ÎÅÎÕÌÅ×ÏÅ) " +"ÃÅÌÏÅ ÞÉÓÌÏ\n" +"ÉÌÉ ÐÒÅÄÏÓÔÁרÔÅ #define (ÓÍ. ÒÕËÏ×ÏÄÓÔ×Ï ÄÌÑ ÐÒÉÍÅÒÏ×)" + +# ../src/common/resource.cpp:1245 +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"ÎÅ×ÏÚÍÏÖÎÏ ÏÔÙÓËÁÔØ ÍÅÎÀ id '%s'. úÁÍÅÎÉÔÅ ÎÁ (ÎÅÎÕÌÅ×ÏÅ) ÃÅÌÏÅ ÞÉÓÌÏ\n" +"ÉÌÉ ÐÒÅÄÏÓÔÁרÔÅ #define (ÓÍ. ÒÕËÏ×ÏÄÓÔ×Ï ÄÌÑ ÐÒÉÍÅÒÏ×)" + +# ../src/common/prntbase.cpp:711 +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÎÁÞÁÔØ ÐÒÅÄ-ÏÓÍÏÔÒ ÄÏËÕÍÅÎÔÁ." + +# ../src/generic/printps.cpp:209 +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÎÁÞÁÔØ ÐÅÞÁÔØ." + +# ../src/common/wincmn.cpp:782 +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÄÁÔØ ÄÁÎÎÙÅ × ÏËÎÏ" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÓÅÍÁÆÏÒ" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÄÏÂÁ×ÉÔØ ÉÚÏÂÒÁÖÅÎÉÅ Ë ÓÐÉÓËÕ ÉÚÏÂÒÁÖÅÎÉÊ." + +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÉÚÍÅÎÉÔØ ÓÏÓÔÏÑÎÉÅ ÏÂßÅËÔÁ ÓÏÏÂÝÅÎÉÑ." + +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÔÁÊÍÅÒ" + +# ../src/common/dynlib.cpp:268 +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÓÉÍ×ÏÌ '%s' × ÄÉÎÁÍÉÞÅÓËÏÊ ÂÉÂÌÉÏÔÅËÅ" + +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÕËÁÚÁÔÅÌØ ÎÁ ÔÅËÕÝÕÀ ÎÉÔØ" + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁÐÕÓÔÉÔØ ÓÅÒ×ÅÒ DDE '%s." + +# ../src/common/imagpng.cpp:245 +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "" +"ÎÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÉÚÏÂÒÁÖÅÎÉÅ PNG - ×ÏÚÍÏÖÎÏ ÆÁÊÌ ÐÏ×ÒÅÖÄÅÎ ÉÌÉ " +"ÎÅÄÏÓÔÁÔÏÞÎÏ ÐÁÍÑÔÉ." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁÒÅÇÅÓÔÒÉÒÏ×ÁÔØ ÆÏÒÍÁÔ '%s;" + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÓ×ÏÂÏÄÉÔØ mutex" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÉÚ×ÌÅÞØ ÉÎÆÏÒÍÁÃÉÀ Ï ÜÌÅÍÅÎÔÅ ÓÐÉÓËÁ %d." + +# ../src/unix/threadpsx.cpp:1251 +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "îÅ ÕÄÁÌÏÓØ ÚÁ×ÅÒÛÉÔØ ÎÉÔØ" + +# ../src/generic/dirdlgg.cpp:571 +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "óÏÚÄÁÔØ ÄÉÒÅËÔÏÒÉÊ" + +# ../src/generic/filedlgg.cpp:883 +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "óÏÚÄÁÔØ ÎÏ×ÙÊ ÄÉÒÅËÔÏÒÉÊ" + +# ../src/generic/filedlgg.cpp:890 +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "ôÅËÕÝÉÊ ÄÉÒÅËÔÏÒÉÊ:" + +# ../src/common/fontmap.cpp:109 +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "Baltic (ISO-8859-13)" + +# ../src/common/paper.cpp:106 +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "ìÉÓÔ D, 22 x 34 ÄÀÊÍ" + +# ../src/unix/utilsunx.cpp:440 ../src/unix/utilsunx.cpp:468 +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "ïÛÉÂËÁ ÚÁÐÉÓÉ DDE" + +# ../src/common/paper.cpp:128 +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "DL Envelope, 110 x 220 ÍÍ" + +# ../src/generic/filedlgg.cpp:535 +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "äÁÔÁ" + +# ../src/generic/fontdlgg.cpp:207 +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "äÅËÏÒÁÔÉ×ÎÙÊ" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" +"óÅÒ×ÉÓ ÕÄÁÌÅÎÎÏÇÏ ÐÏÄÓÏÅÄÉÎÅÎÉÑ (RAS) ÎÅ ÕÓÔÁÎÏ×ÌÅÎ ÎÁ ÜÔÏÊ " +"ÍÁÛÉÎÅ.ðÏÖÁÌÕÊÓÔÁ ÕÓÔÁÎÏ×ÉÔÅ ÅÇÏ." + +# ../src/generic/tipdlg.cpp:177 +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "á ×Ù ÚÎÁÌÉ ÞÔÏ..." + +# ../src/common/filefn.cpp:1086 +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "äÉÒÅËÔÏÒÉÊ '%s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÓÏÚÄÁÎ" + +# ../src/generic/dirdlgg.cpp:538 +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "ëÁÔÁÌÏÇ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" + +# ../src/html/helpfrm.cpp:366 +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"÷Ù×ÅÓÔÉ ×ÓÅ ÓÔÒÏËÉ ÉÎÄÅËÓÁ ÓÏÄÅÒÖÁÝÉÅ ÄÁÎÎÕÀ ÐÏÄÓÔÒÏËÕ. ðÏÉÓË ÂÅÚ ÕÞÅÔÁ \n" +"ÒÅÇÉÓÔÒÁ." + +# ../src/html/helpfrm.cpp:535 +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "ïÔËÒÙÔØ ÄÉÁÌÏÇ ÏÐÃÉÊ" + +# ../src/common/docview.cpp:438 +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "÷Ù ÈÏÔÉÔÅ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ × ÄÏËÕÍÅÎÔÅ %s?" + +# ../src/html/htmlwin.cpp:216 +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "óÄÅÌÁÎÏ" + +# ../src/generic/progdlgg.cpp:313 +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "óÄÅÌÁÎÏ." + +# ../src/common/paper.cpp:107 +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "E sheet, 34 x 44 ÄÀÊÍ" + +# ../src/generic/progdlgg.cpp:153 +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "úÁÔÒÁÞÅÎÎÏÅ ×ÒÅÍÑ : " + +# ../src/generic/helphtml.cpp:320 +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "îÁÊÄÅÎÙ ÚÁÐÉÓÉ" + +# ../src/common/config.cpp:349 +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"ïÛÉÂËÁ ÒÁÓËÒÙÔÉÑ ÐÅÒÅÍÅÎÎÏÊ ÏËÒÕÖÅÎÉÑ: ÏÔÓÕÔÓÔ×ÕÅÔ '%c' × ÐÏÚÉÃÉÉ %d × '%s'." + +# ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +# ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:604 +# ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +# ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +# ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +# ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +# ../src/gtk/fontdlg.cpp:72 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "ïÛÉÂËÁ" + +# ../src/unix/utilsunx.cpp:948 ../src/unix/utilsunx.cpp:956 +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "ïÛÉÂËÁ " + +# ../src/generic/dirdlgg.cpp:551 +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "ïÛÉÂËÁ ÓÏÚÄÁÎÉÑ ËÁÔÁÌÏÇÁ" + +# ../src/common/log.cpp:354 +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "ïÛÉÂËÁ: " + +# ../src/common/fontmap.cpp:99 +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Esperanto (ISO-8859-3)" + +# ../src/generic/progdlgg.cpp:160 +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "ïÃÅÎËÁ ×ÒÅÍÅÎÉ : " + +# ../src/generic/dirdlgg.cpp:217 +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "é Ô.Ä." + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "ïÛÉÂËÁ ×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄÙ '%s'" + +# ../src/common/paper.cpp:112 +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 ÄÀÊÍ" + +# ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +# ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +# ../src/common/resource.cpp:3053 +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "ïÖÉÄÁÌÏÓØ '*' ÐÒÉ ÓÉÎÔÁËÓÉÞÅÓËÏÍ ÁÎÁÌÉÚÅ ÒÅÓÕÒÓÁ." + +# ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +# ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +# ../src/common/resource.cpp:3070 +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "ïÖÉÄÁÌÏÓØ '=' ÐÒÉ ÓÉÎÔÁËÓÉÞÅÓËÏÍ ÁÎÁÌÉÚÅ ÒÅÓÕÒÓÁ." + +# ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +# ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +# ../src/common/resource.cpp:3039 +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "ïÖÉÄÁÌÏÓØ 'char' ÐÒÉ ÓÉÎÔÁËÓÉÞÅÓËÏÍ ÁÎÁÌÉÚÅ ÒÅÓÕÒÓÁ." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ %s ÕÄÁÌÅÎÎÏÅ ÐÏÄÓÏÅÄÉÎÅÎÉÅ: %s" + +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "îÅ ÕÄÁÌÏÓØ ÚÁËÒÙÔØ clipboard." + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÄËÌÀÞÉÔØÓÑ: ÎÅÔ ÉÍÅÎÉ/ÐÁÒÏÌÑ." + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÄÏÚ×ÏÎÉÔØÓÑ: ÎÅÔÕ ISP." + +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓËÏÐÉÒÏ×ÁÔØ ÚÎÁÞÅÎÉÅ registry '%s'" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓËÏÐÉÒÏ×ÁÔØ ËÌÀÞ registry '%s'" + +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "ïÛÉÂËÁ ÓÏÚÄÁÎÉÑ ÓÔÒÏËÉ DDE" + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "ïÛÉÂËÁ ÓÏÚÄÁÎÉÑ ÒÏÄÉÔÅÌØÓËÏÇÏ ÆÒÅÊÍÁ MDI." + +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "ïÛÉÂËÁ ÓÏÚÄÁÎÉÑ ÓÔÁÔÕÓÎÏÊ ÓÔÒÏËÉ." + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÄËÌÀÞÉÔØÓÑ Ë ÓÅÒ×ÅÒÕ '%s' ÐÏ ÔÅÍÅ '%s'" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" +"îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÄÉÁÌÏÇ. îÅ ÚÁÂÙÌÉ ÌÉ ÷Ù ×ËÌÀÞÉÔØ wx/msw/wx.rc × ÒÅÓÕÒÓÙ?" + +# ../src/generic/dirdlgg.cpp:549 +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "îÅ ÕÄÁÌÏÓØ ÓÏÚÄÁÔØ ËÁÔÁÌÏÇ " + +# ../src/html/winpars.cpp:364 +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "îÅ ÕÄÁÌÏÓØ ×Ù×ÅÓÔÉ ÄÏËÕÍÅÎÔ HTML × ËÏÄÉÒÏ×ËÅ %s" + +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "îÅ ÕÄÁÌÏÓØ ÏÞÉÓÔÉÔØ clipboard." + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ 'advise loop' Ó DDE ÓÅÒ×ÅÒÏÍ" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÄÏÚ×ÏÎÉÔØÓÑ: %s" + +# ../src/unix/utilsunx.cpp:441 ../src/unix/utilsunx.cpp:469 +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "îÅ ÕÄÁÌÏÓØ ×ÙÐÏÌÎÉÔØ '%s'\n" + +# ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"îÅ ÕÄÁÌÏÓØ ÎÁÊÔÉ ÒÅÓÕÒÓ XBM %s.\n" +"÷Ù ÚÁÂÙÌÉ ÐÒÉÍÅÎÉÔØ wxResourceLoadBitmapData?" + +# ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"îÅ ÕÄÁÌÏÓØ ÎÁÊÔÉ ÒÅÓÕÒÓ XBM %s.\n" +"÷Ù ÚÁÂÙÌÉ ÐÒÉÍÅÎÉÔØ wxResourceLoadIconData?" + +# ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"îÅ ÕÄÁÌÏÓØ ÎÁÊÔÉ ÒÅÓÕÒÓ XBM %s.\n" +"÷Ù ÚÁÂÙÌÉ ÐÒÉÍÅÎÉÔØ wxResourceLoadBitmapData?" + +# ../src/unix/utilsunx.cpp:441 ../src/unix/utilsunx.cpp:469 +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "îÅ ÕÄÁÌÏÓØ ÐÏÌÕÞÉÔØ ÎÏÍÅÒÁ ISP: %s" + +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "îÅ ÕÄÁÌÏÓØ ÉÚ×ÌÅÞØ ÄÁÎÎÙÅ ÉÚ clipboard." + +# ../src/common/timercmn.cpp:237 +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "îÅ ÕÄÁÌÏÓØ ÐÏÌÕÞÉÔØ ÓÉÓÔÅÍÎÏÅ ×ÒÅÍÑ UTC." + +# ../src/common/timercmn.cpp:189 +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "îÅ ÕÄÁÌÏÓØ ÐÏÌÕÞÉÔØ ÌÏËÁÌØÎÏÅ ÓÉÓÔÅÍÎÏÅ ×ÒÅÍÑ" + +# ../src/unix/threadpsx.cpp:754 +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" +"îÅ ÕÄÁÌÏÓØ ÓÏÅÄÉÎÉÔØÓÑ Ó ÎÉÔØÀ, ×ÏÚÍÏÖÎÁ ÕÔÅÞËÁ ÐÁÍÑÔÉ - ÐÏÖÁÌÕÊÓÔÁ " +"ÐÅÒÅÚÁÐÕÓÔÉÔÅ \n" +"ÐÒÏÇÒÁÍÍÕ" + +# ../src/common/dynlib.cpp:225 +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "ïÛÉÂËÁ ÚÁÇÒÕÚËÉ ÒÁÚÄÅÌÑÅÍÏÊ ÂÉÂÌÉÏÔÅËÉ '%s'" + +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "îÅ ÕÄÁÌÏÓØ ÏÔËÒÙÔØ clipboard." + +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "îÅ ÕÄÁÌÏÓØ ÐÏÌÏÖÉÔØ ÄÁÎÎÙÅ ÎÁ clipboard." + +# ../src/unix/utilsunx.cpp:540 +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "îÅ ÕÄÁÌÏÓØ ÐÅÒÅÎÁÐÒÁ×ÉÔØ ××ÏÄ/×Ù×ÏÄ ÐÏÒÏÖÄÅÎÎÏÇÏ ÐÒÏÃÅÓÓÁ" + +# ../src/unix/utilsunx.cpp:441 ../src/unix/utilsunx.cpp:469 +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "îÅ ÕÄÁÌÏÓØ ÚÁÒÅÇÅÓÔÒÉÒÏ×ÁÔØ ÓÅÒ×ÅÒ DDE '%s'" + +# ../src/common/fontmap.cpp:507 +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "îÅ ÕÄÁÌÏÓØ ÚÁÐÏÍÎÉÔØ ËÏÄÉÒÏ×ËÕ ÄÌÑ ÎÁÂÏÒÁ ÓÉÍ×ÏÌÏ× '%s'." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÉÍÅÎÏ×ÁÔØ ÚÎÁÞÅÎÉÅ registry ÉÚ '%s' × '%s." + +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÉÍÅÎÏ×ÁÔØ ËÌÀÞ registry ÉÚ '%s' × '%s." + +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "îÅ ÕÄÁÌÏÓØ ÉÚ×ÌÅÞØ ÄÁÎÎÙÅ ÉÚ clipboard." + +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "îÅ ÕÄÁÌÏÓØ ÐÏÌÕÞÉÔØ ÓÏÏÂÝÅÎÉÅ Ï ÏÛÉÂËÅ RAS" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "îÅ ÕÄÁÌÏÓØ ÎÁÊÔÉ ÆÏÒÍÁÔÙ ÐÏÄÄÅÒÖÉ×ÁÅÍÙÅ clipboard" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÓÌÁÔØ ÎÏÔÉÆÉËÁÃÉÀ DDE" + +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "îÅ ÕÄÁÌÏÓØ ÕÓÔÁÎÏ×ÉÔØ ÄÁÎÎÙÅ clipboard." + +# ../src/unix/threadpsx.cpp:1071 +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "îÅ ÕÄÁÌÏÓØ ÕÓÔÁÎÏ×ÉÔØ ÐÒÉÏÒÉÔÅÔ ÎÉÔÉ %d." + +# ../src/common/fs_mem.cpp:167 +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "îÅ ÕÄÁÌÏÓØ ÓÏÈÒÁÎÉÔØ ÉÚÏÂÒÁÖÅÎÉÅ '%s' × ÐÁÍÑÔÉ VFS!" + +# ../src/unix/threadpsx.cpp:1251 +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "îÅ ÕÄÁÌÏÓØ ÚÁ×ÅÒÛÉÔØ ÎÉÔØ." + +# ../src/unix/threadpsx.cpp:1251 +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "îÅ ÕÄÁÌÏÓØ ÚÁ×ÅÒÛÉÔØ 'advise loop' Ó DDE ÓÅÒ×ÅÒÏÍ." + +# ../src/unix/threadpsx.cpp:1251 +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "îÅ ÕÄÁÌÏÓØ ÐÏ×ÅÓÉÔØ ÔÒÕÂËÕ: %s" + +# ../src/common/ffile.cpp:182 +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "îÅ ÕÄÁÌÏÓØ ÏÔÚÁÒÅÇÅÓÔÒÉÒÏ×ÁÔØ DDE ÓÅÒ×ÅÒ '%s'" + +# ../src/generic/logg.cpp:367 +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "ëÒÉÔÉÞÅÓËÁÑ ÏÛÉÂËÁ" + +# ../src/common/log.cpp:347 +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "ëÒÉÔÉÞÅÓËÁÑ ÏÛÉÂËÁ: " + +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "æÁÔÁÌØÎÁÑ ÏÛÉÂËÁ: ×ÙÈÏÄÉÍ" + +# ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "æÁÊÌ '%s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ, ×Ù ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÈÏÔÉÔÅ ÅÇÏ ÐÅÒÅÐÉÓÁÔØ?" + +# ../src/common/textcmn.cpp:94 +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "æÁÊÌ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÚÁÇÒÕÖÅÎ." + +# ../src/common/docview.cpp:294 ../src/common/docview.cpp:330 +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "ïÛÉÂËÁ ÆÁÊÌÁ" + +# ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "éÍÑ ÆÁÊÌÁ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ." + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "æÁÊÌÙ (%s)|%s" + +# ../src/html/helpfrm.cpp:340 +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "îÁÊÔÉ" + +# ../src/html/helpfrm.cpp:889 +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "æÉËÓÉÒÏ×ÁÎÎÙÊ ÛÒÉÆÔ:" + +# ../src/common/paper.cpp:118 +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 ÄÀÊÍ" + +# ../src/generic/fontdlgg.cpp:124 +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "ûÒÉÆÔ" + +# ../src/html/helpfrm.cpp:899 +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "òÁÚÍÅÒ ÛÒÉÆÔÁ:" + +# ../src/unix/utilsunx.cpp:497 +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "îÅÕÄÁÞÎÙÊ Fork" + +# ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "÷ÐÅÒÅÄ" + +# ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +# ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +# ../src/common/resource.cpp:3022 +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "îÁÊÄÅÎ " + +# ../src/html/helpfrm.cpp:637 +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "îÁÊÄÅÎÏ %i ÓÏÏÔ×ÅÔÓÔ×ÉÊ" + +# ../src/generic/prntdlgg.cpp:187 +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "ïÔ:" + +# ../src/common/imaggif.cpp:74 +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: ÐÏÔÏË ÄÁÎÎÙÈ ËÁÖÅÔÓÑ ÕËÏÒÏÞÅÎÎÙÍ." + +# ../src/common/imaggif.cpp:58 +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: ÏÛÉÂËÁ × ÆÏÒÍÁÔÅ ÉÚÏÂÒÁÖÅÎÉÑ GIF." + +# ../src/common/imaggif.cpp:61 +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: ÎÅÄÏÓÔÁÔÏÞÎÏ ÐÁÍÑÔÉ." + +# ../src/common/imaggif.cpp:64 +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF: ÎÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ!!!" + +# ../src/common/paper.cpp:142 +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "German Legal Fanfold, 8 1/2 x 13 ÄÀÊÍ" + +# ../src/common/paper.cpp:141 +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "German Std Fanfold, 8 1/2 x 12 in" + +# ../src/html/helpfrm.cpp:501 +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "éÄÔÉ ÎÁÚÁÄ" + +# ../src/html/helpfrm.cpp:504 +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "éÄÔÉ ×ÐÅÒÅÄ" + +# ../src/html/helpfrm.cpp:509 +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "éÄÔÉ ÎÁ ÏÄÉÎ ÕÒÏ×ÅÎØ ××ÅÒÈ × ÉÅÒÁÒÈÉÉ ÄÏËÕÍÅÎÔÁ" + +# ../src/generic/filedlgg.cpp:875 +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "÷ ÄÏÍÁÛÎÉÊ ÄÉÒÅËÔÏÒÉÊ" + +# ../src/generic/filedlgg.cpp:869 +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "÷ ÒÏÄÉÔÅÌØÓËÉÊ ÄÉÒÅËÔÏÒÉÊ" + +# ../src/common/fontmap.cpp:103 +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Greek (ISO-8859-7)" + +# ../src/html/htmlwin.cpp:251 +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "HTML-ÑËÏÒØ %s ÎÅ ÓÕÝÅÓÔ×ÕÅÔ." + +# ../src/html/helpfrm.cpp:1188 +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books " +"(*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All " +"files (*.*)|*" +msgstr "" +"æÁÊÌÙ HTML (*.htm)|*.htm|æÁÊÌÙ HTML (*.html)|*.html|ëÎÉÇÉ ÐÏÍÏÝÉ " +"(*.htb)|*.htb|ëÎÉÇÉ ÐÏÍÏÝÉ (*.zip)|*.zip|ðÒÏÅËÔ ÐÏÍÏÝÉ HTML " +"(*.hhp)|*.hhp|÷ÓÅ ÆÁÊÌÙ (*.*)|*" + +# ../src/common/fontmap.cpp:104 +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Hebrew (ISO-8859-8)" + +# ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +# ../src/html/helpfrm.cpp:208 +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "ðÏÍÏÝØ" + +# ../src/html/helpfrm.cpp:872 +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "ïÐÃÉÉ ÐÒÏÓÍÏÔÒÁ ÐÏÍÏÝÉ" + +# ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "éÎÄÅËÓ ÐÏÍÏÝÉ" + +# ../src/html/helpfrm.cpp:1172 +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "ðÏÍÏÝØ ÐÅÞÁÔÉ" + +# ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "ðÏÍÏÝØ: %s" + +# ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +# ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "îÅ ÎÁÊÄÅÎÁ ÓÐÅÃÉÆÉËÁÃÉÑ ÒÅÓÕÒÓÁ ÉËÏÎËÉ %s." + +# ../src/common/resource.cpp:251 +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "îÅ×ÅÒÎÙÊ ÓÉÎÔÁËÓÉÓ ÆÁÊÌÁ ÒÅÓÕÒÓÏ×." + +# ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "îÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÄÉÒÅËÔÏÒÉÑ." + +# ../src/generic/filedlgg.cpp:1043 +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ÓÐÅÃÉÆÉËÁÃÉÑ ÆÁÊÌÁ." + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" + +# ../src/unix/utilsunx.cpp:350 +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ××ÏÄ ÐÏÒÏÖÄÅÎÎÏÇÏ ÐÒÏÃÅÓÓÁ" + +# ../src/html/helpdata.cpp:403 +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "îÅÐÒÁ×ÉÌØÎÁÑ ×ÅÒÓÉÑ ËÎÉÇÉ ÐÏÍÏÝÉ HTML" + +# ../src/html/helpfrm.cpp:372 +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "éÎÄÅËÓ" + +# ../src/common/fontmap.cpp:106 +#: ../src/common/fontmap.cpp:111 +#, fuzzy +msgid "Indian (ISO-8859-12)" +msgstr "Nordic (ISO-8859-10)" + +# ../src/common/imagtiff.cpp:171 +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "îÅÄÏÐÕÓÔÉÍÙÊ ÉÎÄÅËÓ ÉÚÏÂÒÁÖÅÎÉÑ TIFF." + +# ../src/generic/fontdlgg.cpp:213 +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "ëÕÒÓÉ×" + +# ../src/common/paper.cpp:137 +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Italy Envelope, 110 x 230 ÍÍ" + +# ../src/common/imagjpeg.cpp:198 +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG: ÎÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ - ×ÏÚÍÏÖÎÏ ÆÁÊÌ ÐÏ×ÒÅÖÄÅÎ." + +# ../src/common/imagjpeg.cpp:315 +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG: îÅ×ÏÚÍÏÖÎÏ ÓÏÈÒÁÎÉÔØ ÉÚÏÂÒÁÖÅÎÉÅ." + +# ../src/common/fontmap.cpp:112 +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +# ../src/generic/dcpsg.cpp:2232 ../src/generic/prntdlgg.cpp:441 +# ../src/generic/prntdlgg.cpp:637 +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "ðÅÊÚÁÖ" + +# ../src/common/paper.cpp:110 +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Ledger, 17 x 11 ÄÀÊÍ" + +# ../src/generic/prntdlgg.cpp:649 +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "ìÅ×ÏÅ ÐÏÌÅ (ÍÍ):" + +# ../src/common/paper.cpp:103 +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal, 8 1/2 x 14 ÄÀÊÍ" + +# ../src/common/paper.cpp:108 +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Letter Small 8 1/2 x 11 ÄÀÊÍ" + +# ../src/common/paper.cpp:102 +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter, 8 1/2 x 11 ÄÀÊÍ" + +# ../src/generic/fontdlgg.cpp:216 +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "ó×ÅÔÌÙÊ" + +# ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "úÁÇÒÕÚÉÔØ ÆÁÊÌ %s" + +# ../src/html/htmlwin.cpp:187 +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "úÁÇÒÕÚËÁ : " + +# ../src/common/imagpnm.cpp:72 +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "úÁÇÒÕÚËÁ ÉÚÏÂÒÁÖÅÎÉÑ Grey Ascii PNM ÅÝÅ ÎÅ ÒÅÁÌÉÚÏ×ÁÎÁ." + +# ../src/common/imagpnm.cpp:75 +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "úÁÇÒÕÚËÁ ÉÚÏÂÒÁÖÅÎÉÑ Grey Raw PNM ÅÝÅ ÎÅ ÒÅÁÌÉÚÏ×ÁÎÁ." + +# ../src/generic/logg.cpp:534 +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "öÕÒÎÁÌ ÚÁÐÉÓÁÎ × ÆÁÊÌ '%s'." + +# ../src/gtk/mdi.cpp:435 +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "ðÏÔÏÍÏË MDI" + +# ../src/unix/mimetype.cpp:1570 +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "æÁÊÌ mailcap %s, ÓÔÒÏËÁ %d: ÎÅÐÏÌÎÁÑ ÚÁÐÉÓØ ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÁ." + +# ../src/common/fs_mem.cpp:144 +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "ðÁÍÑÔØ VFS ÕÖÅ ÓÏÄÅÒÖÉÔ ÆÁÊÌ '%s'!" + +# ../src/unix/mimetype.cpp:1292 +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "æÁÊÌ mime.types %s, ÓÔÒÏËÁ %d: ÎÅÚÁËÒÙÔÙÅ ËÁ×ÙÞËÉ." + +# ../src/generic/fontdlgg.cpp:208 +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "Modern" + +# ../src/common/paper.cpp:138 +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Monarch Envelope, 3 7/8 x 7 1/2 ÄÀÊÍ" + +# ../src/common/dlgcmn.cpp:141 +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "åÝÅ..." + +# ../src/generic/dirdlgg.cpp:213 +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "óÍÏÎÔÉ×ÏÒÁÎÎÙÅ ÕÓÔÒÏÊÓÔ×Á" + +# ../src/generic/dirdlgg.cpp:208 +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "öÅÓÔËÉÊ ÄÉÓË" + +# ../src/generic/dirdlgg.cpp:212 +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "äÏÍÁÛÎÉÊ ÄÉÒÅËÔÏÒÉÊ" + +# ../src/generic/filedlgg.cpp:533 +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "éÍÑ" + +# ../src/generic/dirdlgg.cpp:426 +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "îÏ×ÙÊ..." + +# ../src/generic/filedlgg.cpp:610 +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "NewName" + +# ../src/html/helpfrm.cpp:515 +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "óÌÅÄÕÀÝÁÑ ÓÔÁÎÉÃÁ" + +# ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "îÅÔ" + +# ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +# ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "óÒÅÄÓÔ×Á XBM ÏÔÓÕÔÓÔ×ÕÀÔ!" + +# ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "óÒÅÄÓÔ×Á XBM ÏÔÓÕÔÓÔ×ÕÀÔ!" + +# ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "óÒÅÄÓÔ×Á XBM icon ÏÔÓÕÔÓÔ×ÕÀÔ!" + +# ../src/generic/helphtml.cpp:314 +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "úÁÐÉÓØ ÎÅ ÎÁÊÄÅÎÁ." + +# ../src/common/fontmap.cpp:655 +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"ëÏÄÉÒÏ×ËÁ '%s' ÎÅÉÚ×ÅÓÔÎÁ. èÏÔÉÔÅ ×ÙÂÒÁÔØ ÛÒÉÆÔ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ó ÜÔÏÊ\n" +"ËÏÄÉÒÏ×ËÏÊ (ÉÎÁÞÅ ÔÅËÓÔ × ÜÔÏÊ ËÏÄÉÒÏ×ËÅ ÎÅ ÂÕÄÅÔ ÐÏËÁÚÁÎ ÐÒÁ×ÉÌØÎÏ)?" + +# ../src/common/image.cpp:731 +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "îÅ ÎÁÊÄÅÎ ÎÉ ÏÄÉÎ ÏÂÒÁÂÏÔÞÉË ÄÌÑ ÉÚÏÂÒÁÖÅÎÉÑ." + +# ../src/common/image.cpp:739 ../src/common/image.cpp:773 +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "îÅ ÏÐÒÅÄÅÌÅÎ ÎÉ ÏÄÉÎ ÏÂÒÁÂÏÔÞÉË ÄÌÑ ÉÚÏÂÒÁÖÅÎÉÑ ÔÉÐÁ %d." + +# ../src/common/image.cpp:757 ../src/common/image.cpp:789 +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "îÅ ÏÐÒÅÄÅÌÅÎ ÎÉ ÏÄÉÎ ÏÂÒÁÂÏÔÞÉË ÄÌÑ ÉÚÏÂÒÁÖÅÎÉÑ ÔÉÐÁ %d." + +# ../src/html/helpfrm.cpp:628 +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "îÉ ÏÄÎÁ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÁÑ ÓÔÒÁÎÉÃÁ ÐÏËÁ ÎÅ ÎÁÊÄÅÎÁ" + +# ../src/common/fontmap.cpp:106 +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Nordic (ISO-8859-10)" + +# ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normal" + +# ../src/html/helpfrm.cpp:881 +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "îÏÒÍÁÌØÎÙÊ ÛÒÉÆÔ:" + +# ../src/common/paper.cpp:122 +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Note, 8 1/2 x 11 ÄÀÊÍ" + +# ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2240 +# ../src/generic/dirdlgg.cpp:422 ../src/generic/filedlgg.cpp:907 +# ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:729 +# ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +# ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +# ../src/html/helpfrm.cpp:909 +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "OK" + +# ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "ïÔËÒÙÔØ ÄÏËÕÍÅÎÔ HTML" + +# ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:604 +# ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "ïÐÅÒÁÃÉÑ ÎÅ ÒÁÚÒÅÛÅÎÁ." + +# ../src/common/cmdline.cpp:590 +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "ïÐÃÉÑ '%s' ÔÒÅÂÕÅÔ ÚÎÁÞÅÎÉÑ, ÏÖÉÄÁÌÓÑ '='." + +# ../src/common/cmdline.cpp:610 +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "ïÐÃÉÑ '%s' ÔÒÅÂÕÅÔ ÚÎÁÞÅÎÉÅ." + +# ../src/common/cmdline.cpp:671 +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "ïÐÃÉÑ '%s': '%s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÓËÏÎ×ÅÒÔÉÒÏ×ÁÎÁ × ÄÁÔÕ." + +# ../src/generic/prntdlgg.cpp:447 +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "ïÐÃÉÉ" + +# ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "ïÒÉÅÎÔÁÃÉÑ" + +# ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: ÎÅ ÍÏÇÕ ÒÁÓÐÒÅÄÅÌÉÔØ ÐÁÍÑÔØ" + +# ../src/common/imagpcx.cpp:447 +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: ÆÏÒÍÁÔ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ" + +# ../src/common/imagpcx.cpp:470 +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: ÎÅÄÏÐÕÓÔÉÍÏÅ ÉÚÏÂÒÁÖÅÎÉÅ" + +# ../src/common/imagpcx.cpp:434 +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: ÜÔÏ ÎÅ ÆÁÊÌ PCX." + +# ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX: ÎÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ !!!" + +# ../src/common/imagpcx.cpp:449 +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: ÎÏÍÅÒ ×ÅÒÓÉÉ ÓÌÉÛËÏÍ ÄÌÉÎÎÙÊ" + +# ../src/common/imagpnm.cpp:96 +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PCX: îÅ×ÏÚÍÏÖÎÏ ÒÁÓÐÒÅÄÅÌÉÔØ ÐÁÍÑÔØ." + +# ../src/common/imagpnm.cpp:80 +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM: æÏÒÍÁÔ ÅÝÅ ÎÅ ÒÁÓÐÏÚÎÁÅÔÓÑ." + +# ../src/common/imagpnm.cpp:112 +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM: æÁÊÌ ËÁÖÅÔÓÑ ÕËÏÒÏÞÅÎ." + +# ../src/common/prntbase.cpp:731 +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "óÔÒÁÎÉÃÁ %d" + +# ../src/common/prntbase.cpp:729 +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "óÔÒÁÎÉÃÁ %d ÉÚ %d" + +# ../src/generic/prntdlgg.cpp:604 +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "îÁÓÔÒÏÊËÉ ÓÔÒÁÎÉÃÙ" + +# ../src/generic/prntdlgg.cpp:164 +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "óÔÒÁÎÉÃÙ" + +# ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +# ../src/generic/prntdlgg.cpp:808 +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "òÁÚÍÅÒ ÂÕÍÁÇÉ" + +# ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +# ../src/generic/prntdlgg.cpp:804 +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "òÁÚÍÅÒ ÂÕÍÁÇÉ" + +# ../src/generic/filedlgg.cpp:537 +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "òÁÚÒÅÛÅÎÉÑ" + +# ../src/unix/utilsunx.cpp:440 ../src/unix/utilsunx.cpp:468 +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "ïÛÉÂËÁ ÓÏÚÄÁÎÉÑ ÐÏÔÏËÁ ××ÏÄÁ-×Ù×ÏÄÁ" + +# ../src/gtk/fontdlg.cpp:72 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "ðÏÖÁÌÕÊÓÔÁ ×ÙÂÅÒÉÔÅ ÄÏÐÕÓÔÉÍÙÊ ÛÒÉÆÔ." + +# ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "âÕÄØÔÅ ÄÏÂÒÙ ×ÙÂÒÁÔØ ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "ðÏÖÁÌÕÊÓÔÁ ×ÙÂÅÒÉÔÅ ISP" + +# ../src/common/prntbase.cpp:107 +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "ðÏÄÏÖÄÉÔÅ, ÐÏÖÁÌÕÊÓÔÁ..." + +# ../src/generic/dcpsg.cpp:2231 ../src/generic/prntdlgg.cpp:440 +# ../src/generic/prntdlgg.cpp:636 +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "ðÏÒÔÒÅÔ" + +# ../src/generic/dcpsg.cpp:377 +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "PostScript" + +# ../src/generic/prntdlgg.cpp:272 +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "æÁÊÌ PostScript" + +# ../src/generic/dcpsg.cpp:2273 +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "PostScript:" + +# ../src/generic/dcpsg.cpp:2236 +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "ôÏÌØËÏ ÐÒÅÄ-ÏÓÍÏÔÒ" + +# ../src/html/helpfrm.cpp:903 +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "ðÒÅÄ-ÏÓÍÏÔÒ:" + +# ../src/html/helpfrm.cpp:512 +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "ðÒÅÄÙÄÕÝÁÑ ÓÔÒÁÎÉÃÁ" + +# ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "ðÅÞÁÔØ" + +# ../src/common/docview.cpp:895 +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "ðÒÅÄ-ÏÓÍÏÔÒ ÐÅÞÁÔÉ" + +# ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "ïÛÉÂËÁ ÐÒÅÄ-ÏÓÍÏÔÒÁ ÐÅÞÁÔÉ" + +# ../src/generic/prntdlgg.cpp:172 +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "ðÅÞÁÔØ ÉÎÔÅÒ×ÁÌÁ" + +# ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "îÁÓÔÒÏÊËÉ ÐÅÞÁÔÉ" + +# ../src/generic/prntdlgg.cpp:455 +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "ðÅÞÁÔØ × Ã×ÅÔÅ" + +# ../src/generic/prntdlgg.cpp:457 +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "óÐÕÌÉÎÇ ÐÅÞÁÔÉ" + +# ../src/html/helpfrm.cpp:529 +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "îÁÐÅÞÁÔÁÔØ ÜÔÕ ÓÔÒÁÎÉÃÕ" + +# ../src/generic/dcpsg.cpp:2235 ../src/generic/prntdlgg.cpp:150 +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "ðÅÞÁÔØ × ÆÁÊÌ" + +# ../src/common/prntbase.cpp:366 +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "ðÅÞÁÔØ..." + +# ../src/generic/dcpsg.cpp:2246 +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "ëÏÍÁÎÄÁ ÐÒÉÎÔÅÒÁ: " + +# ../src/generic/dcpsg.cpp:2251 +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "ïÐÃÉÉ ÐÒÉÎÔÅÒÁ: " + +# ../src/generic/dcpsg.cpp:346 +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "îÁÓÔÒÏÊËÉ ÐÒÉÎÔÅÒÁ" + +# ../src/generic/prntdlgg.cpp:459 +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "ëÏÍÁÎÄÁ ÐÒÉÎÔÅÒÁ:" + +# ../src/generic/prntdlgg.cpp:149 +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "ïÐÃÉÉ ÐÒÉÎÔÅÒÁ" + +# ../src/generic/prntdlgg.cpp:463 +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "ïÐÃÉÉ ÐÒÉÎÔÅÒÁ:" + +# ../src/generic/prntdlgg.cpp:682 +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "ðÒÉÎÔÅÒ..." + +# ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "ðÅÞÁÔØ" + +# ../src/common/prntbase.cpp:120 +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "ïÛÉÂËÁ ÐÅÞÁÔÉ" + +# ../src/generic/printps.cpp:232 +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "ðÅÞÁÔØ ÓÔÒÁÎÉÃÙ %d..." + +# ../src/generic/printps.cpp:192 +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "ðÅÞÁÔØ..." + +# ../src/common/log.cpp:348 +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "ðÒÏÇÒÁÍÍÁ ÏÓÔÁÎÏ×ÌÅÎÁ." + +# ../src/common/paper.cpp:119 +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Quarto, 215 x 275 ÍÍ" + +# ../src/generic/logg.cpp:1019 +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "÷ÏÐÒÏÓ" + +# ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "ïÛÉÂËÁ ÞÔÅÎÉÑ ÆÁÊÌÁ '%s'" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "ëÌÀÞ registry '%s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ." + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "ëÌÀÞ registry '%s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ×ÏÚÍÏÖÎÏ ÅÇÏ ÐÅÒÅÉÍÅÎÏ×ÁÔØ." + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"ëÌÀÞ registry '%s' ÎÅÏÂÈÏÄÉÍ ÄÌÑ ÎÏÒÍÁÌØÎÏÊ ÒÁÂÏÔÙ ÓÉÓÔÅÍÙ,\n" +"ÅÇÏ ÕÄÁÌÅÎÉÅ ÐÒÉ×ÅÄÅÔ ×ÁÛÕ ÓÉÓÔÅÍÕ × ÎÅÒÁÂÏÞÅÅ ÓÏÓÔÏÑÎÉÅ:\n" +"ÏÐÅÒÁÃÉÑ ÏÔÍÅÎÅÎÁ." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "úÎÁÞÅÎÉÅ registry '%s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ." + +# ../src/generic/helphtml.cpp:319 +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "ðÏÄÈÏÄÑÝÉÅ ÚÁÐÉÓÉ:" + +# ../src/generic/progdlgg.cpp:167 +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "ïÓÔÁÔÏÞÎÏÅ ×ÒÅÍÑ : " + +# ../src/html/helpfrm.cpp:269 +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "õÄÁÌÉÔØ ÔÅËÕÝÕÀ ÓÔÁÎÉÃÕ ÉÚ ÚÁËÌÁÄÏË" + +# ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "úÁÍÅÎÉÔØ ÆÁÊÌ '%s'?" + +# ../src/generic/prntdlgg.cpp:661 +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "ðÒÁ×ÁÑ ÇÒÁÎÉÃÁ (ÍÍ):" + +# ../src/generic/fontdlgg.cpp:206 +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "Roman" + +# ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "óÏÈÒÁÎÉÔØ ÆÁÊÌ %s" + +# ../src/common/docview.cpp:247 +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "óÏÈÒÁÎÉÔØ ËÁË" + +# ../src/generic/logg.cpp:469 +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "óÏÈÒÁÎÉÔØ ÓÏÄÅÒÖÁÎÉÅ ÖÕÒÎÁÌÁ × ÆÁÊÌ" + +# ../src/generic/fontdlgg.cpp:209 +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "óËÒÉÐÔ" + +# ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +# ../src/html/helpfrm.cpp:434 +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "ðÏÉÓË" + +# ../src/html/helpfrm.cpp:416 +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"ðÏÉÓË × ÓÏÄÅÒÖÁÎÉÉ ËÎÉÇ ÐÏÍÏÝÉ ×ÓÅÈ ÕÐÏÍÉÎÁÎÉÊ ××ÅÄÅÎÎÏÇÏ ×ÙÛÅ \n" +"ÔÅËÓÔÁ" + +# ../src/html/helpfrm.cpp:735 +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "ðÏÉÓË ×Ï ×ÓÅÈ ËÎÉÇÁÈ" + +# ../src/html/helpfrm.cpp:628 +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "ðÏÉÓË..." + +# ../src/generic/dirdlgg.cpp:191 +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "òÁÚÄÅÌÙ" + +# ../src/common/ffile.cpp:221 +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "ïÛÉÂËÁ ÐÏÉÓËÁ × ÆÁÊÌÅ '%s'" + +# ../src/common/docview.cpp:1426 +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "÷ÙÂÅÒÉÔÅ ÛÁÂÌÏÎ ÄÏËÕÍÅÎÔÁ" + +# ../src/common/docview.cpp:1449 +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "÷ÙÂÅÒÉÔÅ ×ÉÄ ÄÏËÕÍÅÎÔÁ" + +# ../src/common/docview.cpp:1344 ../src/common/docview.cpp:1381 +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "÷ÙÂÅÒÉÔÅ ÆÁÊÌ" + +# ../src/generic/dcpsg.cpp:2234 +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "ïÔÐÒÁ×ÉÔØ ÎÁ ÐÅÞÁÔØ" + +# ../src/common/cmdline.cpp:627 +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "ðÏÓÌÅ ÏÐÃÉÉ '%s' ÏÖÉÄÁÌÓÑ ÒÁÚÄÅÌÉÔÅÌØ." + +# ../src/common/dlgcmn.cpp:138 +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "îÁÓÔÒÏÊËÉ" + +# ../src/generic/prntdlgg.cpp:155 +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "îÁÓÔÒÏÊËÉ..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "îÅÓËÏÌØËÏ ÁËÔÉ×ÎÙÈ ÐÏÄÓÏÅÄÉÎÅÎÉÊ ÎÁÊÄÅÎÏ, ÓÌÕÞÁÊÎÏ ×ÙÂÉÒÁÅÍ ÏÄÎÏ." + +# ../src/html/helpfrm.cpp:331 +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "ðÏËÁÚÁÔØ ×ÓÅ" + +# ../src/html/helpfrm.cpp:365 +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "ðÏËÁÚÁÔØ ×ÓÅ ÓÔÏËÉ ÉÎÄÅËÓÁ" + +# ../src/generic/filedlgg.cpp:913 +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "ðÏËÁÚÁÔØ ÓËÒÙÔÙÅ ÆÁÊÌÙ" + +# ../src/html/helpfrm.cpp:496 +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "ðÏËÁÚÁÔØ/ÓÐÒÑÔÁÔØ ÎÁ×ÉÇÁÃÉÏÎÎÕÀ ÐÁÎÅÌØ" + +# ../src/generic/filedlgg.cpp:534 +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "òÁÚÍÅÒ" + +# ../src/generic/fontdlgg.cpp:214 +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "îÁËÌÏÎÎÙÊ" + +# ../src/common/docview.cpp:304 +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "üÔÏÔ ÆÁÊÌ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÏÔËÒÙÔ ÄÌÑ ÓÏÈÒÁÎÅÎÉÑ." + +# ../src/common/docview.cpp:340 ../src/common/docview.cpp:352 +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "üÔÏÔ ÆÁÊÌ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÏÔËÒÙÔ." + +# ../src/common/docview.cpp:311 +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÈÒÁÎÉÔØ ÜÔÏÔ ÆÁÊÌ." + +# ../src/common/prntbase.cpp:687 +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "îÅÄÏÓÔÁÔÏÞÎÏ ÐÁÍÑÔÉ ÄÌÑ ÓÏÚÄÁÎÉÑ ÚÏÎÙ ÐÒÅÄ-ÏÓÍÏÔÒÁ." + +# ../src/common/paper.cpp:111 +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Statement, 5 1/2 x 8 1/2 ÄÀÊÍ" + +# ../src/generic/logg.cpp:594 +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "óÔÁÔÕÓ: " + +# ../src/generic/fontdlgg.cpp:210 +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "Swiss" + +# ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +# ../src/common/imagtiff.cpp:314 +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: îÅ×ÏÚÍÏÖÎÏ ÒÁÓÐÒÅÄÅÌÉÔØ ÐÁÍÑÔØ." + +# ../src/common/imagtiff.cpp:163 +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: ïÛÉÂËÁ ÚÁÇÒÕÚËÉ ÉÚÏÂÒÁÖÅÎÉÑ." + +# ../src/common/imagtiff.cpp:214 +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: ïÛÉÂËÁ ÞÔÅÎÉÑ ÉÚÏÂÒÁÖÅÎÉÑ." + +# ../src/common/imagtiff.cpp:291 +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: ïÛÉÂËÁ ÓÏÈÒÁÎÅÎÉÑ ÉÚÏÂÒÁÖÅÎÉÑ." + +# ../src/common/imagtiff.cpp:338 +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: ïÛÉÂËÁ ÚÁÐÉÓÉ ÉÚÏÂÒÁÖÅÎÉÑ." + +# ../src/common/paper.cpp:109 +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloid, 11 x 17 ÄÀÊÍ" + +# ../src/generic/fontdlgg.cpp:211 +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "ôÅÌÅÔÁÊÐ" + +# ../src/common/docview.cpp:1426 +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "ûÁÂÌÏÎÙ" + +# ../src/generic/dirdlgg.cpp:218 +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "÷ÒÅÍÅÎÎÙÊ" + +# ../src/common/fontmap.cpp:107 +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Thai (ISO-8859-11)" + +# ../src/generic/dirdlgg.cpp:210 +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "ëÏÍÐØÀÔÅÒ" + +# ../src/common/fontmap.cpp:466 +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"îÁÂÏÒ ÓÉÍ×ÏÌÏ× '%s' ÎÅÉÚ×ÅÓÔÅÎ. ÷Ù ÍÏÖÅÔÅ ×ÙÂÒÁÔØ\n" +"×ÍÅÓÔÏ ÎÅÇÏ ÄÒÕÇÏÊ ÎÁÂÏÒ ÉÌÉ ÎÁÖÁÔØ [ïÔÍÅÎÁ] \n" +"ÅÓÌÉ ÏÎ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÚÁÍÅÎÅÎ" + +# ../src/common/image.cpp:926 +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "æÏÒÍÁÔ clipboard '%d' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ." + +# ../src/generic/dirdlgg.cpp:535 +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "äÉÒÅËÔÏÒÉÑ " + +# ../src/common/docview.cpp:1631 +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"æÁÊÌ '%s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÉÌÉ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÏÔËÒÙÔ.\n" +"ïÎ ÂÙÌ ÕÄÁÌÅÎ ÉÚ ÓÐÉÓËÁ ÆÁÊÌÏ× MRU." + +# ../src/common/cmdline.cpp:761 +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "ïÂÑÚÁÔÅÌØÎÙÊ ÐÁÒÁÍÅÔÒ '%s' ÎÅ ÕËÁÚÁÎ." + +# ../src/common/textcmn.cpp:121 +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "ôÅËÓÔ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÓÏÈÒÁÎÅÎ." + +# ../src/common/cmdline.cpp:740 +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "úÎÁÞÅÎÉÅ ÏÐÃÉÉ '%s' ÄÏÌÖÎÏ ÂÙÔØ ÕËÁÚÁÎÏ." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" +"óÅÒ×ÉÓ ÕÄÁÌÅÎÎÏÇÏ ÐÏÄÓÏÅÄÉÎÅÎÉÑ (RAS) ÕÓÔÁÎÏ×ÌÅÎÎÙÊ ÎÁ ÜÔÏÊ ÍÁÛÉÎÅ " +"ÎÅÄÏÓÔÁÔÏÞÎÏ ÎÏ×ÙÊ (ÆÕÎËÃÉÑ %s ÎÅ ÎÁÊÄÅÎÆ)." + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"ïÛÉÂËÁ ÉÎÉÃÉÁÌÉÚÁÃÉÉ ÍÏÄÕÌÑ ÎÉÔÅÊ: ÎÅ×ÏÚÍÏÖÎÏ ÓÏÈÒÁÎÉÔØ ÚÎÁÞÅÎÉÅ × ÌÏËÁÌØÎÏÍ " +"ÐÒÏÓÔÒÁÎÓÔ×Å ÎÉÔÉ" + +# ../src/unix/threadpsx.cpp:1441 +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "ïÛÉÂËÁ ÉÎÉÃÉÁÌÉÚÁÃÉÉ ÍÏÄÕÌÑ ÎÉÔÅÊ: ÎÅ ÕÄÁÌÏÓØ ÓÏÚÄÁÔØ ËÌÀÞ ÎÉÔÉ" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"ïÛÉÂËÁ ÉÎÉÃÉÁÌÉÚÁÃÉÉ ÍÏÄÕÌÑ ÎÉÔÅÊ: ÎÅ×ÏÚÍÏÖÎÏ ×ÙÄÅÌÉÔØ ÉÎÄÅËÓ × ÌÏËÁÌØÎÏÍ " +"ÐÒÏÓÔÒÁÎÓÔ×Å ÎÉÔÉ " + +# ../src/unix/threadpsx.cpp:962 +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "ðÒÉÏÒÉÔÅÔ ÎÉÔÉ ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎ." + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +# ../src/generic/filedlgg.cpp:536 +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "÷ÒÅÍÑ" + +# ../src/generic/tipdlg.cpp:162 +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "ðÏÄÓËÁÚËÁ äÎÑ" + +# ../src/generic/tipdlg.cpp:138 +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "éÚ×ÉÎÉÔÅ, ÐÏÄÓËÁÚËÉ ÎÅÄÏÓÔÕÐÎÙ!" + +# ../src/generic/prntdlgg.cpp:191 +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "äÏ:" + +# ../src/generic/prntdlgg.cpp:650 +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "÷ÅÒÈÎÑÑ ÇÒÁÎÉÃÁ (ÍÍ):" + +# ../src/common/fs_mem.cpp:202 +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "ðÏÐÙÔËÁ ÕÄÁÌÅÎÉÑ ÆÁÊÌÁ '%s' ÉÚ ÓÐÉÓËÁ ÐÁÍÑÔÉ VFS, ÎÏ ÏÎ ÎÅ ÚÁÇÒÕÖÅÎ!" + +# ../src/common/sckaddr.cpp:107 +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "ðÏÐÙÔËÁ ÏÐÒÅÄÅÌÉÔØ ÉÍÑ ÈÏÓÔÁ NULL: ÏÔÍÅÎÅÎÁ" + +# ../src/common/fontmap.cpp:105 +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "Turkish (ISO-8859-9)" + +# ../src/common/paper.cpp:140 +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "US Std Fanfold, 14 7/8 x 11 ÄÀÊÍ" + +# ../src/html/htmlwin.cpp:175 +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÚÁÐÒÏÛÅÎÎÙÊ ÄÏËÕÍÅÎÔ HTML: %s" + +# ../src/generic/fontdlgg.cpp:242 +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "ðÏÄÞÅÒËÉ×ÁÎÉÅ" + +# ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +# ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +# ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +# ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +# ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +# ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +# ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +# ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +# ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +# ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ ×Ï ×ÒÅÍÑ ÌÅËÓÉÞÅÓËÏÇÏ ÒÁÚÂÏÒÁ ÒÅÓÕÒÓÁ." + +# ../src/common/cmdline.cpp:712 +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "îÅÏÖÉÄÁÎÎÙÊ ÐÁÒÁÍÅÔÒ '%s'" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ DDE %08x" + +# ../src/common/fontmap.cpp:329 +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "îÅÏÖÉÄÁÎÎÁÑ ËÏÄÉÒÏ×ËÁ (%d)" + +# ../src/unix/mimetype.cpp:1335 +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "îÅÉÚ×ÅÓÔÎÏÅ ÐÏÌÅ × ÆÁÊÌÅ %s, ÓÔÒÏËÁ %d: '%s'." + +# ../src/common/cmdline.cpp:496 +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÄÌÉÎÎÁÑ ÏÐÃÉÑ '%s'" + +# ../src/common/cmdline.cpp:518 +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÏÐÃÉÑ '%s'" + +# ../src/common/mimecmn.cpp:161 +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "îÅÚÁËÒÙÔÁÑ ÓËÏÂËÁ '{' × ÚÁÐÉÓÉ ÄÌÑ mime type %s." + +# ../src/common/docview.cpp:1878 ../src/common/docview.cpp:1893 +# ../src/common/docview.cpp:1920 +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "îÅÎÁÚ×ÁÎÎÁÑ ËÏÍÁÎÄÁ" + +# ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "îÅÉÚ×ÅÓÔÎÙÊ ÓÔÉÌØ %s × ÌÅËÓÉÞÅÓËÏÍ ÒÁÚÂÏÒÅ ÒÅÓÕÒÓÁ." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "îÅÐÏÄÄÅÒÖÉ×ÁÅÍÙÊ ÆÏÒÍÁÔ clipboard." + +# ../src/common/cmdline.cpp:797 +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s" + +# ../src/generic/dirdlgg.cpp:215 +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "ðÏÌØÚÏ×ÁÔÅÌØÓËÉÊ" + +# ../src/generic/dirdlgg.cpp:214 +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "ìÏËÁÌØÎÙÊ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÊ" + +# ../src/common/valtext.cpp:188 +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "ëÏÎÆÌÉËÔ ÐÒÏ×ÅÒËÉ" + +# ../src/generic/dirdlgg.cpp:216 +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "ðÅÒÅÍÅÎÎÙÅ" + +# ../src/generic/filedlgg.cpp:861 +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "ðÒÏÓÍÏÔÒ ÆÁÊÌÏ× Ó ÄÅÔÁÌÑÍÉ" + +# ../src/generic/filedlgg.cpp:855 +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "ðÒÏÓÍÏÔÒ ÆÁÊÌÏ× × ×ÉÄÅ ÓÐÉÓËÁ" + +# ../src/common/docview.cpp:1449 +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "÷ÉÄÙ" + +# ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:619 +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "ïÛÉÂËÁ ÏÖÉÄÁÎÉÑ ÏËÏÎÞÁÎÉÑ ÐÏÄÐÒÏÃÅÓÓÁ" + +# ../src/common/docview.cpp:435 ../src/common/resource.cpp:121 +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "ðÒÅÄÕÐÒÅÖÄÅÎÉÅ" + +# ../src/common/log.cpp:358 +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "ðÒÅÄÕÐÒÅÖÄÅÎÉÅ: " + +# ../src/html/htmlpars.cpp:179 +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "ðÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÐÏÐÙÔËÁ ÕÄÁÌÉÔØ ÏÂÒÁÂÏÔÞÉË ÔÅÇÁ HTML ÉÚ ÐÕÓÔÏÇÏ ÓÔÅËÁ." + +# ../src/common/fontmap.cpp:97 +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "West European (ISO-8859-1/Latin 1)" + +# ../src/common/fontmap.cpp:111 +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "West European ÎÏ×ÙÊ (ISO-8859-15/Latin 0)" + +# ../src/html/helpfrm.cpp:406 +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "ôÏÌØËÏ ÐÏÌÎÙÅ ÓÌÏ×Á" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "Win32s ÎÁ Windows 3.1" + +# ../src/html/helpfrm.cpp:340 +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "ïËÎÏ" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "Windows 9%c" + +# ../src/common/fontmap.cpp:119 +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Windows Arabic (CP 1256)" + +# ../src/common/fontmap.cpp:120 +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Windows Baltic (CP 1257)" + +# ../src/common/fontmap.cpp:118 +#: ../src/common/fontmap.cpp:116 +#, fuzzy +msgid "Windows Central European (CP 1250)" +msgstr "Windows Hebrew (CP 1255)" + +# ../src/common/fontmap.cpp:114 +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Windows Cyrillic (CP 1251)" + +# ../src/common/fontmap.cpp:116 +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Windows Greek (CP 1253)" + +# ../src/common/fontmap.cpp:118 +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Windows Hebrew (CP 1255)" + +# ../src/common/fontmap.cpp:117 +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Windows Turkish (CP 1254)" + +# ../src/common/fontmap.cpp:115 +#: ../src/common/fontmap.cpp:118 +#, fuzzy +msgid "Windows Western European (CP 1252)" +msgstr "Windows Latin 1 (CP 1252)" + +# ../src/common/fontmap.cpp:121 +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +# ../src/common/ffile.cpp:168 +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "ïÛÉÂËÁ ÚÁÐÉÓÉ × ÆÁÊÌ '%s'" + +# ../src/generic/dcpsg.cpp:2291 +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "íÁÓÛÔÁÂÉÒÏ×ÁÎÉÅ ÐÏ X" + +# ../src/generic/dcpsg.cpp:2300 +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "óÄ×ÉÇ ×ÄÏÌØ X" + +# ../src/generic/dcpsg.cpp:2295 +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "íÁÓÛÔÁÂÉÒÏ×ÁÎÉÅ ÐÏ Y" + +# ../src/generic/dcpsg.cpp:2304 +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "óÄ×ÉÇ ×ÄÏÌØ Y" + +# ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "äÁ" + +# ../src/generic/dirdlgg.cpp:570 +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "÷Ù ÎÅ ÍÏÖÅÔÅ ÄÏÂÁ×ÉÔØ ÎÏ×ÙÊ ËÁÔÁÌÏÇ × ÜÔÕ ÓÅËÃÉÀ." + +# ../src/common/docview.cpp:1989 +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[ðõóôï]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "" +"ÎÅÐÅÒÅ×ÏÄÉÍÏ (a DDEML application has created a prolonged race condition)" + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" +"ÎÅÐÅÒÅ×ÏÄÉÍÏ\n" +"(a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function)" + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "ÐÏÐÙÔËÁ ËÌÉÅÎÔÁ ÕÓÔÁÎÏ×ÉÔØ Ó×ÑÚØ ÎÅ ÕÄÁÌÁÓØ." + +# ../src/unix/utilsunx.cpp:440 ../src/unix/utilsunx.cpp:468 +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "ÏÛÉÂËÁ ×ÙÄÅÌÅÎÉÑ ÐÁÍÑÔÉ." + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" + +# ../src/unix/utilsunx.cpp:440 ../src/unix/utilsunx.cpp:468 +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "ÔÒÁÎÚÁËÃÉÑ ÎÅ ÚÁ×ÅÒÛÉÌÁÓØ" + +# ../src/common/utilscmn.cpp:466 +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "" + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "" + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" + +# ../src/common/fileconf.cpp:1440 +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "ÐÏÐÙÔËÁ ÉÚÍÅÎÉÔØ ÎÅÉÚÍÅÎÎÕÀ ËÌÁ×ÉÛÕ '%s' ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÁ." + +# ../src/common/ffile.cpp:101 +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ '%s'" + +# ../src/common/file.cpp:257 +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁËÒÙÔØ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ %d" + +# ../src/common/file.cpp:555 ../src/common/file.cpp:565 +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ ÉÚÍÅÎÅÎÉÑ × ÆÁÊÌ '%s'" + +# ../src/common/file.cpp:200 +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÆÁÊÌ '%s'" + +# ../src/common/fileconf.cpp:910 +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ '%s'" + +# ../src/common/file.cpp:436 +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÄÏÓÔÉÖÅÎÉÅ ËÏÎÃÁ ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +# ../src/common/file.cpp:402 +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÄÌÉÎÕ ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "" +"ÎÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ HOME ÐÏÌØÚÏ×ÁÔÅÌÑ, ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÎ ÔÅËÕÝÉÊ " +"ÄÉÒÅËÔÏÒÉÊ." + +# ../src/common/file.cpp:316 +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÓÌÉÔØ ÆÁÊÌ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +# ../src/common/file.cpp:370 +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÔÅËÕÝÕÀ ÐÏÚÉÃÉÀ ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +# ../src/common/fontmap.cpp:597 +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÎÉ ÏÄÉÎ ÛÒÉÆÔ, ÏÓÔÁÎÏ×" + +# ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ '%s'" + +# ../src/common/fileconf.cpp:316 +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÇÌÏÂÁÌØÎÙÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ '%s'." + +# ../src/common/fileconf.cpp:328 +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ '%s'." + +# ../src/common/fileconf.cpp:790 +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ." + +# ../src/common/file.cpp:283 +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "ÏÛÉÂËÁ ÞÔÅÎÉÑ ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +# ../src/common/file.cpp:550 ../src/common/file.cpp:560 +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "ÏÛÉÂËÁ ÕÄÁÌÅÎÉÑ ÆÁÊÌÁ '%s'" + +# ../src/common/file.cpp:578 ../src/common/file.cpp:581 +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "ÏÛÉÂËÁ ÕÄÁÌÅÎÉÑ ×ÒÅÍÅÎÎÏÇÏ ÆÁÊÌÁ '%s'" + +# ../src/common/file.cpp:356 +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÍÅÓÔÉÔØÓÑ ÐÏ ÆÁÊÌÕ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +# ../src/common/textfile.cpp:354 +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "ÏÛÉÂËÁ ÚÁÐÉÓÉ ÆÁÊÌÁ '%s' ÎÁ ÄÉÓË." + +# ../src/common/file.cpp:301 +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ × ÆÁÊÌ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +# ../src/common/fileconf.cpp:797 +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ ÐÏÌØÚÏ×ÁÔÅÌØÓËÉÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ." + +# ../src/common/intl.cpp:357 +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "ÆÁÊÌ ËÁÔÁÌÏÇÁ ÄÌÑ ÄÏÍÅÎÁ '%s' ÎÅ ÎÁÊÄÅÎ." + +# ../src/common/utilscmn.cpp:464 +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +# ../src/common/cmdline.cpp:910 +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "ÄÁÔÁ" + +# ../src/common/datetime.cpp:3232 +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "×ÏÓÅÍÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3222 +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "×ÏÓØÍÏÊ" + +# ../src/common/datetime.cpp:3225 +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "ÏÄÉÎÎÁÄÃÁÔÙÊ" + +# ../src/common/fileconf.cpp:1427 +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "ÐÏÌÅ '%s' ÐÏÑ×ÌÑÅÔÓÑ ÂÏÌÅÅ ÏÄÎÏÇÏ ÒÁÚÁ × ÇÒÕÐÐÅ '%s'" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "ÕÓÔÁÎÏ×ÉÔØ" + +# ../src/common/ffile.cpp:182 +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "ÏÛÉÂËÁ ÓÂÒÏÓÁ ÂÕÆÅÒÁ ÆÁÊÌÁ '%s'." + +# ../src/common/datetime.cpp:3229 +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "ÐÑÔÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3219 +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "ÐÑÔÙÊ" + +# ../src/common/fileconf.cpp:471 +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "ÆÁÊÌ '%s', ÓÔÒÏËÁ %d: '%s' ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÏ ÐÏÓÌÅ ÚÁÇÏÌÏ×ËÁ ÇÒÕÐÐÙ." + +# ../src/common/fileconf.cpp:500 +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "ÆÁÊÌ '%s', ÓÔÒÏËÁ %d: ÏÖÉÄÁÌÓÑ '='." + +# ../src/common/fileconf.cpp:526 +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "ÆÁÊÌ '%s', ÓÔÒÏËÁ %d: ËÌÀÞ '%s' ÂÙÌ ÕÖÅ ÚÁÍÅÞÅÎ ÎÁ ÓÔÒÏËÅ %d." + +# ../src/common/fileconf.cpp:516 +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "ÆÁÊÌ '%s', ÓÔÒÏËÁ %d: ÚÎÁÞÅÎÉÅ ÎÅÉÚÍÅÎÎÏÇÏ ËÌÀÞÁ '%s' ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÏ." + +# ../src/common/fileconf.cpp:439 +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "ÆÁÊÌ '%s': ÎÅÏÖÉÄÁÎÎÙÊ ÓÉÍ×ÏÌ %c ÎÁ ÓÔÒÏËÅ %d." + +# ../src/common/datetime.cpp:3215 +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "ÐÅÒ×ÙÊ" + +# ../src/common/datetime.cpp:3228 +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "ÞÅÔÙÒÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3218 +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "ÞÅÔ×ÅÒÔÙÊ" + +# ../src/common/timercmn.cpp:233 +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "ÏÛÉÂËÁ gmtime()" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "ÎÁÞÁÔØ Ú×ÏÎÉÔØ" + +# ../src/common/file.cpp:440 +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "ÎÅÄÏÐÕÓÔÉÍÏÅ ÚÎÁÞÅÎÉÅ ×ÏÚ×ÒÁÔÁ ÉÚ eof()." + +# ../src/generic/logg.cpp:1033 +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "ÎÅÄÏÐÕÓÔÉÍÏÅ ÚÎÁÞÅÎÉÅ ×ÏÚ×ÒÁÔÁ ÉÚ ÏËÎÁ ÓÏÏÂÝÅÎÉÑ" + +# ../src/html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "ÂÏÌØÛÏÊ" + +# ../src/common/intl.cpp:549 +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "ÌÏËÅÊÌ '%s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÕÓÔÁÎÏ×ÌÅÎ." + +# ../src/common/intl.cpp:352 +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "ÐÏÉÓË ËÁÔÁÌÏÇÁ '%s' × ÐÕÔÉ '%s'." + +# ../src/html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "ÓÒÅÄÎÉÊ" + +# ../src/common/datetime.cpp:3379 +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "ÐÏÌÎÏÞØ" + +# ../src/common/timercmn.cpp:229 +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "ÏÛÉÂËÁ mktime()" + +# ../src/common/datetime.cpp:3233 +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "ÄÅ×ÑÔÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3223 +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "ÄÅ×ÑÔÙÊ" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "ÎÅÔ ÏÛÉÂËÉ" + +# ../src/html/helpdata.cpp:644 +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "ÂÅÚ ÉÍÅÎÉ" + +# ../src/common/datetime.cpp:3378 +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "ÐÏÌÄÅÎØ" + +# ../src/common/cmdline.cpp:909 +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "num" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "" + +# ../src/common/datetime.cpp:3216 +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "×ÔÏÒÏÊ" + +# ../src/common/datetime.cpp:3231 +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "ÓÅÍÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3221 +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "ÓÅÄØÍÏÊ" + +# ../src/common/utilscmn.cpp:468 +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +# ../src/common/datetime.cpp:3230 +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "ÛÅÓÔÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3220 +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "ÛÅÓÔÏÊ" + +# ../src/html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "ÍÁÌÅÎØËÉÊ" + +# ../src/common/cmdline.cpp:908 +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +# ../src/common/datetime.cpp:3224 +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "ÄÅÓÑÔÙÊ" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "" + +# ../src/common/datetime.cpp:3217 +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "ÔÒÅÔÉÊ" + +# ../src/common/datetime.cpp:3227 +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "ÔÒÉÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3022 +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "ÓÅÇÏÄÎÑ" + +# ../src/common/datetime.cpp:3024 +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "ÚÁ×ÔÒÁ" + +# ../src/common/datetime.cpp:3226 +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "Ä×ÅÎÁÄÃÁÔÙÊ" + +# ../src/common/datetime.cpp:3234 +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "Ä×ÁÄÃÁÔÙÊ" + +# ../src/common/fileconf.cpp:1547 +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "ÎÅÏÖÉÄÁÎÎÙÊ \" × ÐÏÚÉÃÉÉ %d × '%s'." + +# ../src/generic/progdlgg.cpp:241 +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "ÎÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ (ËÏÄ ÏÛÉÂËÉ %08x)" + +# ../src/common/file.cpp:339 +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÏÔÓÞÅÔ ÐÏÉÓËÁ" + +# ../src/common/file.cpp:339 +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÏÔÓÞÅÔ ÐÏÉÓËÁ" + +# ../src/common/fontmap.cpp:351 +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ-%d" + +# ../src/common/docview.cpp:404 +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "ÂÅÚÙÍÑÎÎÙÊ" + +# ../src/common/docview.cpp:1186 +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "ÂÅÚÙÍÑÎÎÙÊ%d" + +# ../src/common/intl.cpp:362 +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "ÉÓÐÏÌØÚÕÅÔÓÑ ËÁÔÁÌÏÇ '%s' ÉÚ '%s'." + +# ../src/html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "ÏÞÅÎØ ÂÏÌØÛÏÊ" + +# ../src/html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "ÏÞÅÎØ ÍÁÌÅÎØËÉÊ" + +# ../src/common/timercmn.cpp:260 +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "ÏÛÉÂËÁ wxGetTimeOfDay." + +# ../src/common/socket.cpp:329 ../src/common/socket.cpp:383 +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: ÎÅÄÅÊÓÔ×ÉÔÅÌØÎÁÑ ÐÏÄÐÉÓØ × ReadMsg." + +# ../src/common/socket.cpp:903 +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: ÎÅÉÚ×ÅÓÔÎÏÅ ÓÏÂÙÔÉÅ!" + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "wxWindows ÎÅ ÓÍÏÇ ÏÔËÒÙÔØ ÄÉÓÐÌÅÊ ÄÌÑ '%s': ×ÙÈÏÄÉÍ." + +# ../src/common/filefn.cpp:1215 +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: ÏÛÉÂËÁ ÏÐÒÅÄÅÌÅÎÉÑ ÉÍÅÎÉ ×ÒÅÍÅÎÎÏÇÏ ÆÁÊÌÁ.\n" + +# ../src/common/datetime.cpp:3023 +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "×ÞÅÒÁ" + +# ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +# ../src/common/fontmap.cpp:101 +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Cyrillic (Latin 5)" + +# ../src/common/fontmap.cpp:108 +#~ msgid "ISO-8859-12" +#~ msgstr "ISO-8859-12" + +# ../src/common/fontmap.cpp:110 +#~ msgid "ISO-8859-14" +#~ msgstr "ISO-8859-14" + +# ../src/common/fontmap.cpp:113 +#~ msgid "Windows Latin 2 (CP 1250)" +#~ msgstr "Windows Latin 2 (CP 1250)" + +#~ msgid " B.C." +#~ msgstr " ÄÏ Ò.ÈÒ." + +#~ msgid "%s is invalid." +#~ msgstr "%s ÎÅÄÏÐÕÓÔÉÍÏÅ ÚÎÁÞÅÎÉÅ." + +#~ msgid "%s should be numeric." +#~ msgstr "%s ÄÏÌÖÎÏ ÂÙÔØ ÞÉÓÌÏÍ." + +#~ msgid "%s should only contain ASCII characters." +#~ msgstr "%s ÄÏÌÖÎÏ ÓÏÄÅÒÖÁÔØ ÔÏÌØËÏ ÓÉÍ×ÏÌÙ ASCII." + +#~ msgid "%s should only contain alphabetic characters." +#~ msgstr "%s ÄÏÌÖÎÏ ÓÏÄÅÒÖÁÔØ ÔÏÌØËÏ ÓÉÍ×ÏÌÙ ÁÌÆÁ×ÉÔÁ." + +#~ msgid "%s should only contain alphabetic or numeric characters." +#~ msgstr "%s ÄÏÌÖÎÏ ÓÏÄÅÒÖÁÔØ ÔÏÌØËÏ ÓÉÍ×ÏÌÙ ÁÌÆÁ×ÉÔÁ ÉÌÉ ÃÉÆÒÙ." + +#~ msgid "Application Error" +#~ msgstr "ïÛÉÂËÁ ÐÒÉÌÏÖÅÎÉÑ" + +#~ msgid "Can not create tooltip control" +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÐÌÁ×ÁÀÝÕÀ ÐÏÄÓËÁÚËÕ." + +#~ msgid "Can not get data in format '%s' from clipboard." +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÄÁÎÎÙÅ × ÆÏÒÍÁÔÅ '%s' ÉÚ clipboard." + +#~ msgid "Can not get priority range for scheduling policy %d." +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÉÎÔÅÒ×ÁÌ ÐÒÉÏÒÉÔÅÔÁ ÄÌÑ ÚÁÄÁÎÉÑ ÒÁÓÐÏÒÑÄËÁ %d." + +#~ msgid "Can not put data in format '%s' on clipboard." +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ÐÏÍÅÓÔÉÔØ ÄÁÎÎÙÅ × ÆÏÒÍÁÔÅ '%s' × clipboard." + +#~ msgid "Can not retrieve thread scheduling policy." +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ÉÚ×ÌÅÞØ ÒÁÓÐÏÒÑÄÏË ÎÉÔÉ." + +#~ msgid "Can't execute command '%s'" +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ×ÙÐÏÌÎÉÔØ ËÏÍÁÎÄÕ '%s'" + +#~ msgid "Character '%c' is invalid in a config entry name." +#~ msgstr "îÅÄÏÐÕÓÔÉÍÙÊ ÓÉÍ×ÏÌ '%c' × ÉÍÅÎÉ ÚÁÐÉÓÉ ÆÁÊÌÁ ËÏÎÆÉÇÕÒÁÃÉÉ." + +#~ msgid "Debug" +#~ msgstr "ïÔÌÁÄËÁ" + +#~ msgid "DoLogString must be overrided if it's called." +#~ msgstr "DoLogString ÄÏÌÖÎÏ ÂÙÔØ ÐÅÒÅÏÐÒÅÄÅÌÅÎÏ × ÓÌÕÞÁÅ ×ÙÚÏ×Á." + +#~ msgid "Enter the name of the directory to create" +#~ msgstr "÷×ÅÄÉÔÅ ÉÍÑ ÓÏÚÄÁ×ÁÅÍÏÇÏ ËÁÔÁÌÏÇÁ" + +#~ msgid "Entry name can't start with '%c'." +#~ msgstr "éÍÑ ÚÁÐÉÓÉ ÎÅ ÍÏÖÅÔ ÎÁÞÉÎÁÔØÓÑ Ó '%c'." + +#~ msgid "Failed to created dialog." +#~ msgstr "îÅ ÕÄÁÌÏÓØ ÓÏÚÄÁÔØ ÄÉÁÌÏÇ." + +#~ msgid "" +#~ "Mime.types file %s, line %d: extra characters after the field value ignored." +#~ msgstr "" +#~ "æÁÊÌ mime.types %s, ÓÔÒÏËÁ %d: ÌÉÛÎÉÅ ÓÉÍ×ÏÌÙ ÐÏÓÌÅ ÚÎÁÞÅÎÉÑ ÐÏÌÑ " +#~ "ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎÙ." + +#~ msgid "Print Error" +#~ msgstr "ïÛÉÂËÁ ÐÅÞÁÔÉ" + +#~ msgid "Sizer error" +#~ msgstr "ïÛÉÂËÁ ×ÙÒÁ×ÎÉ×ÁÔÅÌÑ (sizer)" + +#~ msgid "Thread module initialization failed: failed to create pthread key." +#~ msgstr "ïÛÉÂËÁ ÉÎÉÃÉÁÌÉÚÁÃÉÉ ÍÏÄÕÌÑ ÎÉÔÅÊ: ÎÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ËÌÀÞ pthread." + +#~ msgid "bad index in wxArrayString::Remove" +#~ msgstr "ÎÅ×ÅÒÎÙÊ ÉÎÄÅËÓ × wxArrayString::Remove" + +#~ msgid "can't set value of a group!" +#~ msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÚÎÁÞÅÎÉÅ ÇÒÕÐÐÙ!" + +#~ msgid "empty file name in wxFindFileInPath" +#~ msgstr "ÐÕÓÔÏÅ ÉÍÑ ÆÁÊÌÁ × wxFindFileInPath" + +#~ msgid "invalid day" +#~ msgstr "ÎÅÄÏÐÕÓÔÉÍÙÊ ÄÅÎØ" + +#~ msgid "invalid month" +#~ msgstr "ÎÅÄÏÐÕÓÔÉÍÙÊ ÍÅÓÑÃ" + +#~ msgid "pm" +#~ msgstr "ÐÐ" + +#~ msgid "removing inexistent element in wxArrayString::Remove" +#~ msgstr "ÕÄÁÌÅÎÉÅ ÎÅÓÕÝÅÓÔ×ÕÀÝÅÇÏ ÜÌÅÍÅÎÔÁ × wxArrayString::Remove" + +#~ msgid "string '%s' not found in domain '%s' for locale '%s'." +#~ msgstr "ÎÅ ÎÁÊÄÅÎÁ ÓÔÒÏËÁ '%s' × ÄÏÍÅÎÅ '%s' ÌÏËÅÊÌÁ '%s'." + +#~ msgid "string '%s' not found in locale '%s'." +#~ msgstr "ÎÅ ÎÁÊÄÅÎÁ ÓÔÒÏËÁ '%s' × ÌÏËÅÊÌÅ '%s'." + +#~ msgid "unknown log level in wxLog::DoLog" +#~ msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÕÒÏ×ÅÎØ ÖÕÒÎÁÌÁ × wxLog::DoLog" + +#~ msgid "unknown log level in wxLogGui::DoLog" +#~ msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÕÒÏ×ÅÎØ ÖÕÒÎÁÌÁ × wxLogGui::DoLog" + +#~ msgid "wxExpandSizer has no parent!" +#~ msgstr "îÅÔ ÒÏÄÉÔÅÌÑ Õ wxExpandSizer!" + +#~ msgid "" +#~ "wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to " +#~ "let me know about the canvas!" +#~ msgstr "" +#~ "wxPrintPreviewBase::RenderPage: ÎÅÏÂÈÏÄÉÍÏ ÉÓÐÏÌØÚÏ×ÁÔØ " +#~ "wxPrintPreviewBase::SetCanvas ÞÔÏÂÙ Ñ ÚÎÁÌ Ï ËÁÎ×Å (canvas)!" + +#~ msgid "" +#~ "can't determine if the end of file is reached on descriptor " +#~ "%d" +#~ msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÄÏÓÔÉÇÎÕÔ ÌÉ ËÏÎÅà ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#~ msgid "bad index in wxArrayString::Insert" +#~ msgstr "ÎÅ×ÅÒÎÙÊ ÉÎÄÅËÓ × wxArrayString::Insert" + +#~ msgid "Couldn't load a JPEG image - probably file is corrupted." +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÉÚÏÂÒÁÖÅÎÉÅ JPEG - ×ÏÚÍÏÖÎÏ ÆÁÊÌ ÐÏ×ÒÅÖÄÅÎ." + +#~ msgid "Couldn't save a JPEG image - probably file is corrupted." +#~ msgstr "îÅ×ÏÚÍÏÖÎÏ ÓÏÈÒÁÎÉÔØ ÉÚÏÂÒÁÖÅÎÉÅ JPEG - ×ÏÚÍÏÖÎÏ ÆÁÊÌ ÐÏ×ÒÅÖÄÅÎ." + +#~ msgid "" +#~ "Unrecoverable program error detected: the application will terminate." +#~ msgstr "" +#~ "ïÂÎÁÒÕÖÅÎÁ ÎÅÉÓÐÒÁ×ÉÍÁÑ ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: ÐÒÉÌÏÖÅÎÉÅ ÂÕÄÅÔ ÚÁ×ÅÒÛÅÎÏ." + +#~ msgid "Fatal Error" +#~ msgstr "æÁÔÁÌØÎÁÑ ÏÛÉÂËÁ" + +#~ msgid "Failed to allocate %dKb of memory for clipboard transfer." +#~ msgstr "ïÛÉÂËÁ ÒÁÓÐÒÅÄÅÌÅÎÉÑ %dë ÐÁÍÑÔÉ ÄÌÑ ÐÅÒÅÄÁÞÉ clipboard." diff --git a/locale/sl.po b/locale/sl.po new file mode 100644 index 0000000000..7ab6e0b3c1 --- /dev/null +++ b/locale/sl.po @@ -0,0 +1,3832 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: wxWindows 2.2\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2001-06-28 12:48+0100\n" +"Last-Translator: Roman Plevel \n" +"Language-Team: transmission \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +# generic/dirdlgg.cpp:551 +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(Ali imate potrebna dovoljenja?)" + +# generic/dirdlgg.cpp:538 +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"ne obstaja\n" +"Ga ustvarim?" + +# common/log.cpp:242 +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr "(napaka %ld: %s)" + +# common/docview.cpp:1206 +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +# html/htmprint.cpp:490 +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr " Predogled" + +# generic/filedlgg.cpp:328 +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr "byte-ov " + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "" + +# common/resourc2.cpp:265 +# common/resourc2.cpp:1334 +# common/resource.cpp:1778 +# common/resource.cpp:1908 +# common/resource.cpp:2988 +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "" + +# html/helpfrm.cpp:718 +# html/helpfrm.cpp:719 +# html/helpfrm.cpp:1277 +# html/helpfrm.cpp:1304 +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i od %i" + +# common/cmdline.cpp:735 +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (ali%s)" + +# generic/logg.cpp:243 +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s Napaka" + +# generic/logg.cpp:251 +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s Informacija" + +# generic/logg.cpp:247 +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s Opozorilo" + +# common/resourc2.cpp:709 +# common/resource.cpp:2359 +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "" + +# common/resourc2.cpp:864 +# common/resource.cpp:2514 +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "" + +# common/resourc2.cpp:357 +# common/resourc2.cpp:1430 +# common/resource.cpp:1871 +# common/resource.cpp:2000 +# common/resource.cpp:3085 +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "" + +# msw/mdi.cpp:187 +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "&Uredi ikone" + +# msw/mdi.cpp:183 +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "&Kaskadno" + +# generic/logg.cpp:477 +# generic/tipdlg.cpp:170 +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&Zapri" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "" + +# generic/wizard.cpp:284 +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Dokonèaj" + +# generic/logg.cpp:478 +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&Dnevnik" + +# msw/mdi.cpp:188 +#: ../src/msw/mdi.cpp:188 +msgid "&Next" +msgstr "&Naslednji" + +# generic/wizard.cpp:189 +# generic/wizard.cpp:286 +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&Naslednji" + +# generic/tipdlg.cpp:175 +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "N&aslednji namig" + +# common/docview.cpp:1945 +# common/docview.cpp:1956 +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "&Ponovi" + +# common/docview.cpp:1939 +# common/docview.cpp:1966 +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "&Ponovi " + +# generic/logg.cpp:473 +# generic/logg.cpp:774 +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "&Shrani..." + +# generic/tipdlg.cpp:172 +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Poka¾i namige ob zagonu" + +# common/docview.cpp:1951 +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "&Preklièi" + +# common/docview.cpp:1926 +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "&Preklièi " + +# msw/mdi.cpp:1287 +# msw/mdi.cpp:1294 +# msw/window.cpp:2286 +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&Okno" + +# common/config.cpp:396 +# msw/regconf.cpp:264 +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' ima dodaten '..', ignoriran" + +# common/valtext.cpp:140 +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' je napaèen" + +# common/cmdline.cpp:657 +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' ni pravilna numerièna vrednost" + +# common/intl.cpp:412 +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' ni veljaven katalog sporoèil." + +# common/textfile.cpp:253 +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "" + +# common/valtext.cpp:178 +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' sme biti le ¹tevilo." + +# common/valtext.cpp:160 +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' sme vsebovati samo ASCII znake." + +# common/valtext.cpp:166 +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' sme vsebovati samo èrkovne znake." + +# common/valtext.cpp:172 +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' sme vsebovati samo èrkovne ali ¹tevilène znake." + +# html/helpfrm.cpp:679 +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(Pomoè)" + +# html/helpfrm.cpp:276 +# html/helpfrm.cpp:783 +# html/helpfrm.cpp:1330 +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(zaznamki)" + +# common/resourc2.cpp:297 +# common/resourc2.cpp:1370 +# common/resource.cpp:1810 +# common/resource.cpp:1940 +# common/resource.cpp:3024 +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" + +# generic/dirdlgg.cpp:264 +# generic/filedlgg.cpp:713 +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "" + +# generic/dirdlgg.cpp:265 +# generic/filedlgg.cpp:714 +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr "" + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "" + +# html/htmprint.cpp:272 +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": datoteka ne obstaja" + +# common/fontmap.cpp:507 +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": nepoznan nabor znakov" + +# common/fontmap.cpp:712 +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": nepoznano kodiranje" + +# generic/wizard.cpp:186 +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &Nazaj" + +# generic/filedlgg.cpp:356 +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +# generic/filedlgg.cpp:323 +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr " " + +# generic/filedlgg.cpp:357 +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +# generic/filedlgg.cpp:324 +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr " " + +# html/helpfrm.cpp:928 +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4
    " +msgstr "" +"Normalno
    (and podèrtano. Kurzivno. " +"Krepko. Krepko kurzivno.
    velikost èrk " +"-2
    velikost èrk -1
    velikost " +"èrk +0
    velikost èrk +1
    velikost èrk +2
    velikost èrk " +"+3
    velikost èrk +4

    Enaka " +"velikost.
    krepko kurzivno krepko kurzivno " +"podèrtano
    velikost èrk -2
    velikost èrk -1
    velikost èrk " +"+0
    velikost èrk +1
    velikost " +"èrk +2
    velikost èrk +3
    velikost èrk +4
    " + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:113 +#, fuzzy +msgid "A3 sheet, 297 x 420 mm" +msgstr "List A4 210 x 297 mm" + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "List A4 210 x 297 mm" + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:114 +#, fuzzy +msgid "A4 small sheet, 210 x 297 mm" +msgstr "List A4 210 x 297 mm" + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:115 +#, fuzzy +msgid "A5 sheet, 148 x 210 mm" +msgstr "List A4 210 x 297 mm" + +# generic/fontdlgg.cpp:325 +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "©èinkavec ¾eli 12345 èe¹enj" + +# html/helpfrm.cpp:270 +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "Dodaj trenutno stran med zaznamke" + +# generic/colrdlgg.cpp:269 +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "Dodaj k predelanim barvam" + +# html/helpctrl.cpp:83 +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "Dodajanj knjige %s" + +# generic/prntdlgg.cpp:163 +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "Vse" + +# generic/filedlgg.cpp:825 +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "Vse datoteke (*)|*" + +# generic/filedlgg.cpp:825 +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "Vse datoteke (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "" + +# generic/logg.cpp:1021 +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "Dodajanje dnevnika v datoteko '%s' (Izberite [Ne] jo preps)" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "" + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:116 +#, fuzzy +msgid "B4 sheet, 250 x 354 mm" +msgstr "List A4 210 x 297 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "" + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:117 +#, fuzzy +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "List A4 210 x 297 mm" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "" + +# common/imagbmp.cpp:387 +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: Zaenkrat ¹e ne znam uporabiti 4-bitnega kodiranja." + +# common/imagbmp.cpp:266 +# common/imagbmp.cpp:278 +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: Ne morem alocirati pomnilnika." + +# common/imagbmp.cpp:62 +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: Ne morem shraniti nepravilne slike." + +# common/imagbmp.cpp:154 +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: Ne morem zapisati podatkov" + +# common/imagbmp.cpp:131 +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: Ne morem zapisati datoteène glave" + +# common/imagbmp.cpp:257 +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: Kodiranej se ne ujema z bitno globino." + +# common/imagbmp.cpp:220 +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: vi¹ina slike > 32767 pikslov za datoteko." + +# common/imagbmp.cpp:214 +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP: ¹irina slike > 32767 pikslov za datoteko." + +# common/imagbmp.cpp:234 +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: Nepoznana bitna globina v datoteki." + +# common/imagbmp.cpp:243 +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "Nepoznano kodiranje v datoteki." + +# generic/helpwxht.cpp:157 +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "Nazaj" + +# common/dlgcmn.cpp:135 +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Nazaj" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "" + +# common/resourc2.cpp:844 +# common/resource.cpp:2494 +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "" + +# generic/fontdlgg.cpp:217 +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "Krepko" + +# generic/prntdlgg.cpp:662 +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "Spodnji rob" + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:105 +#, fuzzy +msgid "C sheet, 17 x 22 in" +msgstr "List A4 210 x 297 mm" + +# generic/logg.cpp:475 +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "&Izprazni" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "" + +# msw/thread.cpp:222 +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "" + +# msw/thread.cpp:124 +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/thread.cpp:519 +#: ../src/mac/thread.cpp:92 +#, fuzzy +msgid "Can not create mutex." +msgstr "ne morem ustvariti niti" + +# common/filefn.cpp:1287 +# msw/dir.cpp:294 +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "Ne morem o¹tevilèiti datotek v imeniku '%s'" + +# msw/thread.cpp:552 +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "" + +# msw/thread.cpp:433 +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "" + +# msw/thread.cpp:537 +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "" + +# msw/thread.cpp:871 +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "" + +# common/docview.cpp:1928 +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "Ne morem &preklicati" + +# common/image.cpp:953 +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "Ne morem preveriti formata slike v datoteki '%s': datoteka ne obstaja." + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:418 +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "ne morem zapreti 'registry' kljuèa '%s'" + +# msw/registry.cpp:490 +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "" + +# msw/listctrl.cpp:212 +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:399 +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "ne morem ustvariti 'registry' kljuèa '%s'" + +# msw/utilsexc.cpp:482 +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "" + +# msw/utilsexc.cpp:494 +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/thread.cpp:519 +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "ne morem ustvariti niti" + +# msw/window.cpp:2412 +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:658 +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "ne morem izbrisati kljuèa '%s'" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/iniconf.cpp:476 +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "ne morem zbrisati datoteke INI'%s'" + +# msw/registry.cpp:683 +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:694 +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "ne morem izbrisati vrednosti kljuèa '%s'" + +# msw/registry.cpp:1020 +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:975 +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "ne morem o¹tevilèiti vrednosti kljuèa '%s'" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# common/ffile.cpp:234 +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "ne morem najti trenutne pozicije v datoteki '%s'" + +# msw/window.cpp:2362 +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" + +# common/object.cpp:314 +# common/object.cpp:335 +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "" + +# msw/registry.cpp:348 +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "" + +# common/image.cpp:653 +# common/image.cpp:673 +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "Ne morem nalo¾iti slike iz datoteke '%s': datoteka ne obstaja" + +# common/object.cpp:307 +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "" + +# msw/dib.cpp:434 +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "Ne morem odpreti datoteke '%s'" + +# msw/registry.cpp:374 +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "ne morem odpreti 'registry' kljuèa '%s'" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:899 +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "ne morem prebrati vrednosti '%s'" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:774 +# msw/registry.cpp:813 +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "ne morem prebrati vrednosti kljuèa '%s'" + +# generic/logg.cpp:535 +# generic/logg.cpp:932 +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "Ne morem shraniti vsebine dnevnika" + +# msw/thread.cpp:485 +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/registry.cpp:799 +# msw/registry.cpp:923 +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "ne morem nastaviti vrednosti kljuèa '%s'" + +# common/dlgcmn.cpp:148 +# common/prntbase.cpp:109 +# generic/dcpsg.cpp:2271 +# generic/dirdlgg.cpp:425 +# generic/filedlgg.cpp:916 +# generic/fontdlgg.cpp:257 +# generic/prntdlgg.cpp:468 +# generic/progdlgg.cpp:179 +# generic/proplist.cpp:523 +# generic/wizard.cpp:192 +# html/helpfrm.cpp:910 +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "Preklièi" + +# msw/dialup.cpp:518 +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "" + +# msw/dialup.cpp:832 +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "" + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "" + +# msw/dialup.cpp:925 +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "" + +# msw/app.cpp:252 +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "" + +# html/htmlfilt.cpp:146 +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "Ne morem odpreti dokumenta HTML :%s" + +# html/helpdata.cpp:657 +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "Ne morem odpreti knjige s HTML pomoèjo: %s" + +# generic/helpext.cpp:96 +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "ne morem odpreti URL '%s'" + +# html/helpdata.cpp:353 +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "ne morem datoteke: '%s' z vsebino" + +# generic/dcpsg.cpp:1584 +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Ne morem odpreti datoteke za tiskanje PostScript" + +# html/helpdata.cpp:368 +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "ne morem odpreti indeksne datoteke '%s'" + +# html/helpfrm.cpp:1174 +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "Ne morem natisniti prazne strani." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "" + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "" + +# html/helpfrm.cpp:398 +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "Velikost èrk je pomenbna" + +#: ../src/common/fontmap.cpp:113 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/common/fontmap.cpp:101 +msgid "Central European (ISO-8859-2)" +msgstr "" + +# msw/dialup.cpp:767 +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "" + +# generic/logg.cpp:475 +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Izprazni vsebino dnevnika" + +# common/prntbase.cpp:359 +# generic/progdlgg.cpp:307 +# generic/proplist.cpp:518 +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "Zapri " + +# generic/logg.cpp:477 +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "Zapri to okno" + +# common/fileconf.cpp:760 +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Vstopno konfiguracijsko ime se ne more zaèeti s '%c'" + +# generic/filedlgg.cpp:1077 +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "Potrdi" + +# html/htmlwin.cpp:166 +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Povezovanje..." + +# generic/helpxlp.cpp:240 +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Povezava do wxHelp konèana v %d sekundah" + +# generic/helpwxht.cpp:159 +# html/helpfrm.cpp:303 +# html/helpfrm.cpp:312 +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Vsebina" + +# generic/prntdlgg.cpp:196 +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "©t. kopij" + +# common/resourc2.cpp:287 +# common/resource.cpp:1800 +# common/resource.cpp:1930 +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "" + +# generic/tabg.cpp:1042 +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "Ne morem najti tab za id" + +# msw/textctrl.cpp:1249 +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "" + +# common/resource.cpp:796 +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" + +# common/resource.cpp:1245 +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" + +# common/prntbase.cpp:711 +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "Ne morem zaèeti predogleda dokumenta" + +# generic/printps.cpp:209 +# msw/printwin.cpp:252 +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "Ne morem zaèeti s tiskanjem." + +# common/wincmn.cpp:784 +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "Ne morem prenesti podatkov v okno" + +# msw/thread.cpp:166 +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "" + +# msw/dragimag.cpp:142 +# msw/dragimag.cpp:179 +# msw/imaglist.cpp:152 +# msw/imaglist.cpp:174 +# msw/imaglist.cpp:187 +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "" + +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "" + +# msw/timer.cpp:96 +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "" + +# common/dynlib.cpp:309 +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Ne najdem simbola '%s' v dinamièni knji¾nici" + +# msw/thread.cpp:578 +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "" + +# msw/utilsexc.cpp:712 +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "" + +# common/imagpng.cpp:251 +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "" + +# msw/ole/dataobj.cpp:151 +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "" + +# msw/thread.cpp:198 +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "" + +# msw/listctrl.cpp:616 +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "" + +# msw/thread.cpp:958 +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "" + +# generic/dirdlgg.cpp:572 +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "Ustvari imenik" + +# generic/filedlgg.cpp:883 +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "Istvari nov imenik" + +# generic/filedlgg.cpp:890 +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "Trenutni imenik" + +#: ../src/common/fontmap.cpp:104 +msgid "Cyrillic (ISO-8859-5)" +msgstr "" + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:106 +#, fuzzy +msgid "D sheet, 22 x 34 in" +msgstr "List A4 210 x 297 mm" + +# msw/dde.cpp:597 +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "" + +# generic/filedlgg.cpp:535 +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "Datum" + +# generic/fontdlgg.cpp:207 +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "" + +# msw/dialup.cpp:354 +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" + +# generic/tipdlg.cpp:177 +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Ali ste vedeli..." + +# common/filefn.cpp:1086 +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Ne morem ustvariti imenika '%s'" + +# generic/dirdlgg.cpp:539 +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "Imenik ne obstaja" + +# html/helpfrm.cpp:366 +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"Poka¾i vse indeksirane predmete, ki vsebujejo podtekst. Iskanje je " +"obèutljivo na velikost èrk" + +# html/helpfrm.cpp:535 +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "Poka¾i pogovorno okno z mo¾nostmi" + +# common/docview.cpp:440 +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "Ali ¾elite shraniti sprmembe dokumenta %s" + +# html/htmlwin.cpp:216 +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Konèano" + +# generic/progdlgg.cpp:313 +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Konèano." + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "" + +# generic/progdlgg.cpp:153 +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "Porabljen èas" + +# generic/helphtml.cpp:320 +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "Najdeni naslovi" + +# common/config.cpp:349 +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"Raz¹iritev okoljske spremenjivke ni uspela: manjka '%c' na poziciji %d v '%s'" + +# generic/dirdlgg.cpp:268 +# generic/dirdlgg.cpp:286 +# generic/dirdlgg.cpp:297 +# generic/dirdlgg.cpp:605 +# generic/filedlgg.cpp:625 +# generic/filedlgg.cpp:717 +# generic/filedlgg.cpp:731 +# generic/filedlgg.cpp:744 +# generic/filedlgg.cpp:1043 +# generic/filedlgg.cpp:1092 +# generic/helpxlp.cpp:241 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "Napaka" + +# common/log.cpp:362 +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +#, fuzzy +msgid "Error " +msgstr "Napaka:" + +# generic/dirdlgg.cpp:552 +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "Napaka pri ustvarjanju imenika" + +# common/log.cpp:362 +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "Napaka:" + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "" + +# generic/progdlgg.cpp:160 +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Prièakovan èas" + +# generic/dirdlgg.cpp:217 +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "Dodatno" + +# msw/utilsexc.cpp:585 +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "" + +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "" + +# common/resourc2.cpp:326 +# common/resourc2.cpp:1399 +# common/resource.cpp:1839 +# common/resource.cpp:1969 +# common/resource.cpp:3053 +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "" + +# common/resourc2.cpp:342 +# common/resourc2.cpp:1415 +# common/resource.cpp:1856 +# common/resource.cpp:1985 +# common/resource.cpp:3070 +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "" + +# common/resourc2.cpp:312 +# common/resourc2.cpp:1385 +# common/resource.cpp:1825 +# common/resource.cpp:1955 +# common/resource.cpp:3039 +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "" + +# msw/dialup.cpp:860 +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "" + +# msw/clipbrd.cpp:122 +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "" + +# msw/dialup.cpp:801 +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "" + +# msw/dialup.cpp:747 +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "" + +# msw/registry.cpp:594 +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "" + +# msw/registry.cpp:603 +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "" + +# msw/dde.cpp:934 +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "" + +# msw/mdi.cpp:428 +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "" + +# msw/statbr95.cpp:149 +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "" + +# msw/dde.cpp:401 +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "" + +# msw/dialog.cpp:174 +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" + +# generic/dirdlgg.cpp:550 +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "Ne morem ustvariti imenika" + +# html/winpars.cpp:364 +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "Ne morem prikazati dokumenta HTML, kodiranega v %s" + +# msw/clipbrd.cpp:134 +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "" + +# msw/dde.cpp:616 +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "" + +# msw/dialup.cpp:639 +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "" + +# common/ffile.cpp:182 +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, fuzzy, c-format +msgid "Failed to execute '%s'\n" +msgstr "ne morem izprazniti datoteje '%s'" + +# common/resourc2.cpp:808 +# common/resource.cpp:2458 +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" + +# common/resourc2.cpp:963 +# common/resource.cpp:2613 +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" + +# common/resourc2.cpp:824 +# common/resource.cpp:2474 +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" + +# msw/dialup.cpp:699 +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "" + +# msw/clipbrd.cpp:623 +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "" + +# common/timercmn.cpp:244 +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "" + +# common/timercmn.cpp:196 +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" + +# common/dynlib.cpp:239 +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Ne morem odpreti deljene knji¾nice" + +# msw/clipbrd.cpp:102 +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "" + +# msw/clipbrd.cpp:539 +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "" + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "" + +# msw/dde.cpp:285 +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "" + +# common/fontmap.cpp:552 +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Ne morem zi zapomniti kodiranje za izbor znakov '%s'." + +# msw/registry.cpp:440 +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "" + +# msw/registry.cpp:540 +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "" + +# msw/clipbrd.cpp:428 +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "" + +# msw/dialup.cpp:463 +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "" + +# msw/clipbrd.cpp:652 +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "" + +# msw/dde.cpp:661 +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "" + +# msw/clipbrd.cpp:300 +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "" + +# generic/dirdlgg.cpp:550 +#: ../src/unix/threadpsx.cpp:1071 +#, fuzzy, c-format +msgid "Failed to set thread priority %d." +msgstr "Ne morem ustvariti imenika" + +# common/fs_mem.cpp:167 +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "Ne morem shraniti slike '%s' v spominski VFS!" + +# generic/dirdlgg.cpp:550 +#: ../src/unix/threadpsx.cpp:1251 +#, fuzzy +msgid "Failed to terminate a thread." +msgstr "Ne morem ustvariti imenika" + +# msw/dde.cpp:635 +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "" + +# msw/dialup.cpp:933 +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "" + +# msw/dde.cpp:301 +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "" + +# generic/logg.cpp:371 +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "Fatalna napaka" + +# common/log.cpp:355 +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "Fatalna napaka:" + +# msw/app.cpp:1263 +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Fatalna napaka: izstop" + +# generic/filedlgg.cpp:1074 +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "Datoteka %s ¾e obstaja. Ali jo res ¾elite prepisati?" + +# common/textcmn.cpp:94 +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "" + +# common/docview.cpp:296 +# common/docview.cpp:332 +# common/docview.cpp:1388 +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Datoteèna napaka:" + +# generic/dirdlgg.cpp:286 +# generic/filedlgg.cpp:731 +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "Datoteka ¾e obstaja" + +# msw/filedlg.cpp:303 +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "" + +# html/helpfrm.cpp:340 +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "Poi¹èi" + +# html/helpfrm.cpp:889 +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "enakomerna pisava" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "" + +# generic/fontdlgg.cpp:124 +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "Pisava" + +# html/helpfrm.cpp:899 +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "Velikost pisave" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "" + +# common/dlgcmn.cpp:132 +# generic/helpwxht.cpp:158 +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Naprej" + +# common/resourc2.cpp:295 +# common/resourc2.cpp:1368 +# common/resource.cpp:1808 +# common/resource.cpp:1938 +# common/resource.cpp:3022 +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "" + +# html/helpfrm.cpp:637 +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "Najdenij %i ujemanj" + +# generic/prntdlgg.cpp:187 +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "Od:" + +# common/imaggif.cpp:74 +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "" + +# common/imaggif.cpp:58 +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "" + +# common/imaggif.cpp:61 +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "" + +# common/imaggif.cpp:64 +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "" + +# html/helpfrm.cpp:501 +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "Nazaj" + +# html/helpfrm.cpp:504 +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Naprej" + +# html/helpfrm.cpp:509 +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "En nivo vi¹je v hierarhiji dokumenta" + +# generic/filedlgg.cpp:875 +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "Pojdi na domaèi imenik" + +# generic/filedlgg.cpp:869 +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "Pojdi menik gor" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "" + +# html/htmlwin.cpp:251 +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "HTML sidro %s ne obstaja" + +# html/helpfrm.cpp:1188 +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books " +"(*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All " +"files (*.*)|*" +msgstr "" +"HTML datoteke (*.htm)|*.htm|HTML datoteke (*.html)|*.html|Knjige s pomoèjo " +"(*.htb)|*.htb|Knjige s pomoèjo (*.zip)|*.zip|HTML Projekt pomoèi " +"(*.hhp)|*.hhp|Vse datoteke (*.*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "" + +# common/dlgcmn.cpp:144 +# generic/proplist.cpp:528 +# html/helpfrm.cpp:208 +# msw/mdi.cpp:1283 +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Pomoè" + +# html/helpfrm.cpp:872 +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "Mo¾nosti Brkljalnika Pomoèi" + +# generic/helphtml.cpp:319 +# generic/helphtml.cpp:320 +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "Indeks pomoèi" + +# html/helpfrm.cpp:1172 +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "Pomoè pri tiskanju" + +# generic/helpwxht.cpp:251 +# html/helpctrl.cpp:38 +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "Pomoè %s" + +# common/resourc2.cpp:997 +# common/resourc2.cpp:1008 +# common/resource.cpp:2647 +# common/resource.cpp:2658 +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "" + +# common/resource.cpp:251 +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "" + +# generic/dirdlgg.cpp:268 +# generic/filedlgg.cpp:717 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "Napaèno ime imenika" + +# generic/filedlgg.cpp:1043 +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "Napaèna specifikacija datoteke" + +# msw/textctrl.cpp:219 +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "" + +# html/helpdata.cpp:403 +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "Napaèna verzija knjige s HTML pomoèjo" + +# html/helpfrm.cpp:372 +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Indeks" + +#: ../src/common/fontmap.cpp:111 +msgid "Indian (ISO-8859-12)" +msgstr "" + +# common/imagtiff.cpp:171 +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "" + +# generic/fontdlgg.cpp:213 +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "Kurzivno" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "" + +# common/imagjpeg.cpp:202 +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "" + +# common/imagjpeg.cpp:315 +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "" + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "" + +# generic/dcpsg.cpp:2262 +# generic/prntdlgg.cpp:441 +# generic/prntdlgg.cpp:637 +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "Pokrajina" + +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "" + +# generic/prntdlgg.cpp:649 +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "Levi rob" + +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "" + +# generic/fontdlgg.cpp:216 +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Svetlo" + +# generic/filedlgg.cpp:1270 +# msw/filedlg.cpp:483 +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "" + +# html/htmlwin.cpp:187 +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "Nalaganje : " + +# common/imagpnm.cpp:72 +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "" + +# common/imagpnm.cpp:75 +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# generic/logg.cpp:538 +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "Dnevnik je bil shranjen v datoteko '%s'" + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "" + +# common/fileconf.cpp:526 +#: ../src/unix/mimetype.cpp:1597 +#, fuzzy, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "datoteka '%s', vrstica %d: vrednost immutable kluèa '%s' ignorirana." + +# common/fs_mem.cpp:144 +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "Spominski VFS ¾e vsebuje datoteko '%s'" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "" + +# generic/fontdlgg.cpp:208 +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "" + +# common/dlgcmn.cpp:141 +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Veè..." + +# generic/dirdlgg.cpp:213 +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "Dodane naprave" + +# generic/dirdlgg.cpp:208 +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Moj Disk" + +# generic/dirdlgg.cpp:212 +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "Domaèi imenik" + +# generic/filedlgg.cpp:533 +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Ime" + +# generic/dirdlgg.cpp:427 +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "Nov..." + +# generic/filedlgg.cpp:610 +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "NovoIme" + +# html/helpfrm.cpp:515 +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "Naslednja stran" + +# common/dlgcmn.cpp:111 +# common/dlgcmn.cpp:121 +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "Ne" + +# common/resourc2.cpp:814 +# common/resourc2.cpp:969 +# common/resource.cpp:2464 +# common/resource.cpp:2619 +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "" + +# common/resourc2.cpp:830 +# common/resource.cpp:2479 +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "" + +# common/resourc2.cpp:991 +# common/resource.cpp:2641 +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "" + +# generic/helphtml.cpp:314 +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "Ne najdem naslovov" + +# common/fontmap.cpp:716 +#: ../src/common/fontmap.cpp:716 +#, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"Nobena pisava za prikaz besedila, kodiranega v '%s' ne obstaja.\n" +"®elite izbrati drugo pisavo za prikaz tega kodiranja\n" +"(secer besedilo ne bo prikazano pravilno)?" + +# common/image.cpp:758 +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "Ne najdem handlerja za tip slike." + +# common/image.cpp:766 +# common/image.cpp:800 +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "" + +# common/image.cpp:784 +# common/image.cpp:816 +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "" + +# html/helpfrm.cpp:628 +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "Ne najdem ustrezne strani" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +# generic/fontdlgg.cpp:212 +# generic/fontdlgg.cpp:215 +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normalno" + +# html/helpfrm.cpp:881 +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Normalna pisava:" + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "" + +# common/dlgcmn.cpp:127 +# generic/dcpsg.cpp:2270 +# generic/dirdlgg.cpp:423 +# generic/filedlgg.cpp:907 +# generic/fontdlgg.cpp:256 +# generic/logg.cpp:733 +# generic/prntdlgg.cpp:467 +# generic/proplist.cpp:511 +# html/helpfrm.cpp:909 +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "V redu" + +# html/helpfrm.cpp:523 +# html/helpfrm.cpp:1183 +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "Odpri HTML dokument" + +# generic/dirdlgg.cpp:297 +# generic/dirdlgg.cpp:605 +# generic/filedlgg.cpp:625 +# generic/filedlgg.cpp:744 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "Operacija ni dovoljena" + +# common/cmdline.cpp:590 +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "Opcija '%s' zahteva vrednost, prièakujem '='." + +# common/cmdline.cpp:610 +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "Opcija '%s' zahteva vrednost." + +# common/cmdline.cpp:671 +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "Opcije '%s':'%s' ne morem pretvoriti v datum" + +# generic/prntdlgg.cpp:447 +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Mo¾nosti" + +# generic/prntdlgg.cpp:443 +# generic/prntdlgg.cpp:638 +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "Orientacija" + +# common/imagpcx.cpp:448 +# common/imagpcx.cpp:471 +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "" + +# common/imagpcx.cpp:447 +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "" + +# common/imagpcx.cpp:470 +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "" + +# common/imagpcx.cpp:434 +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "" + +# common/imagpcx.cpp:450 +# common/imagpcx.cpp:472 +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "" + +# common/imagpcx.cpp:449 +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "" + +# common/imagpnm.cpp:96 +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "" + +# common/imagpnm.cpp:80 +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "" + +# common/imagpnm.cpp:112 +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "" + +# common/prntbase.cpp:731 +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Stran %d" + +# common/prntbase.cpp:729 +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Stran %d v %d" + +# generic/prntdlgg.cpp:604 +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Nastavitev strani" + +# generic/prntdlgg.cpp:164 +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Strani" + +# generic/prntdlgg.cpp:555 +# generic/prntdlgg.cpp:626 +# generic/prntdlgg.cpp:808 +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Velikost parirja" + +# generic/prntdlgg.cpp:433 +# generic/prntdlgg.cpp:615 +# generic/prntdlgg.cpp:804 +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Velikost papirja" + +# generic/filedlgg.cpp:537 +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "Dovoljenja" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "" + +# generic/filedlgg.cpp:1092 +#: ../src/gtk/fontdlg.cpp:72 +#, fuzzy +msgid "Please choose a valid font." +msgstr "Izberi obstojeèo datoteko" + +# generic/filedlgg.cpp:1092 +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Izberi obstojeèo datoteko" + +# msw/dialup.cpp:768 +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "" + +# common/prntbase.cpp:107 +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "Poèakajte, prosim" + +# generic/dcpsg.cpp:2261 +# generic/prntdlgg.cpp:440 +# generic/prntdlgg.cpp:636 +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "Portet" + +# generic/dcpsg.cpp:391 +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "" + +# generic/prntdlgg.cpp:272 +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "PostScript datoteka" + +# generic/dcpsg.cpp:2303 +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "" + +# generic/dcpsg.cpp:2266 +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "Samo predogled" + +# html/helpfrm.cpp:903 +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Predogled" + +# html/helpfrm.cpp:512 +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "Prej¹nja stran" + +# generic/prntdlgg.cpp:113 +# generic/prntdlgg.cpp:127 +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "Tiskanje" + +# common/docview.cpp:897 +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "Predogled tiskanja" + +# common/prntbase.cpp:687 +# common/prntbase.cpp:711 +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "Napaka pri predogledu tiskanja" + +# generic/prntdlgg.cpp:172 +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "Podroèje tiskanja" + +# generic/prntdlgg.cpp:408 +# generic/prntdlgg.cpp:415 +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "Nastavitev tiskanja" + +# generic/prntdlgg.cpp:455 +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "Bravno tiskanje" + +# generic/prntdlgg.cpp:457 +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "Spooling tiskanja" + +# html/helpfrm.cpp:529 +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "Natisni to stran" + +# generic/dcpsg.cpp:2265 +# generic/prntdlgg.cpp:150 +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "Po¹li v datoteko" + +# common/prntbase.cpp:366 +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "Tiskaj..." + +# generic/dcpsg.cpp:2276 +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "Tiskalni¹ke komande" + +# generic/dcpsg.cpp:2281 +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "Tiskalni¹ke mo¾nosti" + +# generic/dcpsg.cpp:360 +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "Nastavitve tiskalnika" + +# generic/prntdlgg.cpp:459 +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "Tiskalni¹ka komanda" + +# generic/prntdlgg.cpp:149 +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "Nastavitve tiskalnika" + +# generic/prntdlgg.cpp:463 +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "Mo¾nosti tiskalnika" + +# generic/prntdlgg.cpp:682 +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "Tiskalnik..." + +# common/prntbase.cpp:106 +# common/prntbase.cpp:148 +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "Tiskam" + +# common/prntbase.cpp:120 +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "Napaka pri tiskanju" + +# generic/printps.cpp:232 +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Tsikanje strani %d..." + +# generic/printps.cpp:192 +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Tiskanje..." + +# common/log.cpp:356 +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "Program ustavljen." + +# generic/dcpsg.cpp:2547 +#: ../src/common/paper.cpp:119 +#, fuzzy +msgid "Quarto, 215 x 275 mm" +msgstr "List A4 210 x 297 mm" + +# generic/logg.cpp:1023 +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "Vpra¹anje" + +# common/ffile.cpp:133 +# common/ffile.cpp:154 +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "napaka pri branjui datoteke '%s'" + +# msw/registry.cpp:532 +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "" + +# msw/registry.cpp:501 +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "" + +# msw/registry.cpp:628 +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" + +# msw/registry.cpp:432 +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "" + +# generic/helphtml.cpp:319 +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Ustrezni naslovi" + +# generic/progdlgg.cpp:167 +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Preostanek èasa" + +# html/helpfrm.cpp:269 +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "Odstrani trenutno stran iz zaznamkov" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# msw/filedlg.cpp:445 +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "Zamenjam datoteko '%s'?" + +# generic/prntdlgg.cpp:661 +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Desni rob" + +# generic/fontdlgg.cpp:206 +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "" + +# generic/filedlgg.cpp:1286 +# msw/filedlg.cpp:484 +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "" + +# common/docview.cpp:249 +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Shrani kot" + +# generic/logg.cpp:473 +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "Shrani vsebino dnevnika v datoteko" + +# generic/fontdlgg.cpp:209 +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "" + +# generic/helpwxht.cpp:161 +# html/helpfrm.cpp:414 +# html/helpfrm.cpp:434 +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "Iskanje" + +# html/helpfrm.cpp:416 +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"Iskanje v knjigah s pomoèjo za vse pojavitve zgoraj natipkanega besedila" + +# html/helpfrm.cpp:735 +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "I¹èi v vseh knjigah" + +# html/helpfrm.cpp:628 +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "Iskanje..." + +# generic/dirdlgg.cpp:191 +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "Sekcije" + +# common/ffile.cpp:221 +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "napaka pri iskanju v datoteki '%s'" + +# common/docview.cpp:1469 +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Izberi ¹ablono dokumenta" + +# common/docview.cpp:1494 +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Izberi naèin ogleda dokumenta" + +# common/docview.cpp:1371 +# common/docview.cpp:1422 +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Izberi datoteko" + +# generic/dcpsg.cpp:2264 +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "Po¹lji na tiskalnik" + +# common/cmdline.cpp:627 +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "Po opciji '%s' prièakujem loèilo." + +# common/dlgcmn.cpp:138 +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Nastavitev" + +# generic/prntdlgg.cpp:155 +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "Nastavitve..." + +# msw/dialup.cpp:539 +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "" + +# html/helpfrm.cpp:331 +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "Poka¾i vse" + +# html/helpfrm.cpp:365 +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "Poka¾i vse predmete v indeksu" + +# generic/filedlgg.cpp:913 +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "Poka¾i skrite datoteke" + +# html/helpfrm.cpp:496 +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "Poka¾i/Skrij navigacijski pano" + +# generic/filedlgg.cpp:534 +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "Velikost" + +# generic/fontdlgg.cpp:214 +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Levo kurzivno" + +# common/docview.cpp:306 +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "Ne morem odpreti te datoteke za shranjevanje." + +# common/docview.cpp:342 +# common/docview.cpp:354 +# common/docview.cpp:1390 +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "Ne morem odpreti te datoteke" + +# common/docview.cpp:313 +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "Ne morem shraniti te datoteke" + +# common/prntbase.cpp:687 +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "Ni dovolj spomina za predogled tiskanja" + +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "" + +# generic/logg.cpp:598 +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "Stanje:" + +# generic/fontdlgg.cpp:210 +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "" + +# common/imagtiff.cpp:192 +# common/imagtiff.cpp:203 +# common/imagtiff.cpp:314 +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "" + +# common/imagtiff.cpp:163 +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "" + +# common/imagtiff.cpp:214 +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "" + +# common/imagtiff.cpp:291 +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "" + +# common/imagtiff.cpp:338 +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "" + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "" + +# generic/fontdlgg.cpp:211 +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "" + +# common/docview.cpp:1469 +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "©ablone" + +# generic/dirdlgg.cpp:218 +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "zaèasni" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "" + +# generic/dirdlgg.cpp:210 +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "Raèunalnik" + +# common/fontmap.cpp:511 +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"Nabor znakov '%s' je nepoznan. Lahko izberete\n" +"drug nabor za zamenjavo ali izberete\n" +"[Preklièil] èe ne more biti zamenjan" + +# msw/ole/dataobj.cpp:169 +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "" + +# generic/dirdlgg.cpp:536 +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "Imenika" + +# common/docview.cpp:1676 +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"Datoteka '%s' ne obstaja.\n" +"Prav tako je bila izbisana iz seznama MRU datotek." + +# common/cmdline.cpp:761 +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "Zahtevani parameter '%s' ni bil podan." + +# common/textcmn.cpp:121 +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "" + +# common/cmdline.cpp:740 +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "Vrednost opcije '%s' mora biti podana." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" + +# msw/thread.cpp:1083 +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "" + +# msw/thread.cpp:1071 +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "" + +# msw/mdi.cpp:184 +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "Zlo¾i &Horizontalno" + +# msw/mdi.cpp:185 +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "Zlo¾i &Vertikalno" + +# generic/filedlgg.cpp:536 +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Èas" + +# generic/tipdlg.cpp:162 +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Namigi dneva" + +# generic/tipdlg.cpp:138 +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Oprostite, namigi niso na voljo" + +# generic/prntdlgg.cpp:191 +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "Do:" + +# generic/prntdlgg.cpp:650 +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "Zgornji rob" + +# common/fs_mem.cpp:202 +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "" +"Posku¹am odstaniti datoteko '%s' iz spominskega VFS, ampak ni nalo¾ena!" + +# common/sckaddr.cpp:107 +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "" + +# html/htmlwin.cpp:175 +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "Ne morem odpreti zahtevanega HTML dokumenta: %s" + +# generic/fontdlgg.cpp:242 +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Podèrtano" + +# common/resourc2.cpp:305 +# common/resourc2.cpp:319 +# common/resourc2.cpp:335 +# common/resourc2.cpp:349 +# common/resourc2.cpp:1378 +# common/resourc2.cpp:1392 +# common/resourc2.cpp:1408 +# common/resourc2.cpp:1422 +# common/resource.cpp:1818 +# common/resource.cpp:1832 +# common/resource.cpp:1849 +# common/resource.cpp:1863 +# common/resource.cpp:1948 +# common/resource.cpp:1962 +# common/resource.cpp:1978 +# common/resource.cpp:1992 +# common/resource.cpp:3032 +# common/resource.cpp:3046 +# common/resource.cpp:3063 +# common/resource.cpp:3077 +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "" + +# common/cmdline.cpp:712 +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "Neprièakovan parameter '%s'" + +# msw/dde.cpp:1030 +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "" + +# common/fontmap.cpp:332 +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "nepoznano kodiranje (%s)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "" + +# common/cmdline.cpp:496 +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "Nepoznana dolga opcija '%s'" + +# common/cmdline.cpp:518 +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "Nepoznana opcija '%s'" + +# common/mimecmn.cpp:161 +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "" + +# common/docview.cpp:1923 +# common/docview.cpp:1938 +# common/docview.cpp:1965 +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "Neimenovan ukaz" + +# common/resourc2.cpp:687 +# common/resource.cpp:2336 +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "" + +# msw/clipbrd.cpp:268 +# msw/clipbrd.cpp:369 +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "" + +# common/cmdline.cpp:797 +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Uporaba: %s" + +# generic/dirdlgg.cpp:215 +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Uporabnik" + +# generic/dirdlgg.cpp:214 +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "Uporabnink Lokalni" + +# common/valtext.cpp:188 +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "Konflikt pri preverjanju" + +# generic/dirdlgg.cpp:216 +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "Spremenljivke" + +# generic/filedlgg.cpp:861 +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "Poka¾i podrobnosti" + +# generic/filedlgg.cpp:855 +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "Poka¾i kot seznam" + +# common/docview.cpp:1494 +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "Pogledi" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "" + +# common/docview.cpp:437 +# common/resource.cpp:121 +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "Opozorilo" + +# common/log.cpp:366 +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "Opozorilo" + +# html/htmlpars.cpp:177 +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "Opozorilo: poskus dodajanja praznega HTML 'tag'-a s praznega sklada" + +#: ../src/common/fontmap.cpp:100 +msgid "Western European (ISO-8859-1)" +msgstr "" + +#: ../src/common/fontmap.cpp:114 +msgid "Western European with Euro (ISO-8859-15)" +msgstr "" + +# html/helpfrm.cpp:406 +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "Samo cele besede" + +# msw/utils.cpp:545 +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "" + +# msw/mdi.cpp:1318 +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "Okno" + +# msw/utils.cpp:583 +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "" + +# msw/utils.cpp:549 +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "" + +#: ../src/common/fontmap.cpp:116 +msgid "Windows Central European (CP 1250)" +msgstr "" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "" + +#: ../src/common/fontmap.cpp:118 +msgid "Windows Western European (CP 1252)" +msgstr "" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "" + +# common/ffile.cpp:168 +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "napaka pri pisanju datoteke '%s'" + +# generic/dcpsg.cpp:2321 +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "X poveèava" + +# generic/dcpsg.cpp:2330 +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "X Translacija" + +# generic/dcpsg.cpp:2325 +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "Y Poveèava" + +# generic/dcpsg.cpp:2334 +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "Y Translacija" + +# common/dlgcmn.cpp:109 +# common/dlgcmn.cpp:116 +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "Da" + +# generic/dirdlgg.cpp:571 +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "Ne morete dodati novega imenika v to sekcijo" + +# common/docview.cpp:2034 +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[PRAZEN]" + +# msw/dde.cpp:997 +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "" + +# msw/dde.cpp:985 +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" + +# msw/dde.cpp:1003 +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "" + +# msw/dde.cpp:1000 +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "" + +# msw/dde.cpp:994 +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "" + +# msw/dde.cpp:976 +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" + +# msw/dde.cpp:982 +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "" + +# msw/dde.cpp:991 +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" + +# msw/dde.cpp:1009 +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "" + +# msw/dde.cpp:1024 +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" + +# msw/dde.cpp:1018 +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" + +# msw/dde.cpp:1006 +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "" + +# common/utilscmn.cpp:466 +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "" + +# msw/dde.cpp:988 +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" + +# msw/dde.cpp:1012 +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "" + +# msw/dde.cpp:1021 +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "" + +# msw/dde.cpp:1027 +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" + +# common/fileconf.cpp:1450 +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "poskus spremembe nestremenjivega kljuèa '%s' je bil ignoriran." + +# common/ffile.cpp:101 +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "ne morem zadpreti datoteke '%s'" + +# common/file.cpp:257 +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "ne morem zapreti datoteènega deskriptorja %d" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# common/file.cpp:557 +# common/file.cpp:567 +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "ne uveljviti sprememb datoteke '%s'" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# common/file.cpp:200 +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "ne morem ustvariti datoteke '%s'" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# common/fileconf.cpp:920 +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "ne morem zbrisati uporabnikove datoteke '%s'" + +# common/file.cpp:438 +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "" +"ne morem ugotoviti, ali je bil konec datoteke dose¾en na deskriptorju %d" + +# common/file.cpp:404 +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "ne morem najti dol¾ine datoteke na datoteènem deskriptorju %d" + +# msw/utils.cpp:376 +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "" + +# common/file.cpp:319 +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "ne morem izprazniti deskriptorja %d" + +# common/file.cpp:373 +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "ne morem iskalne pozicije v datoteènem deskriptorju %d" + +# common/fontmap.cpp:646 +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "ne morem nalo¾iti katere koli posave, prekinjam" + +# common/ffile.cpp:85 +# common/file.cpp:243 +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "ne morem odpreti datoteke '%s'" + +# common/fileconf.cpp:319 +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "ne morem odpreti globalne konfiguracijske datoteke '%s'" + +# common/fileconf.cpp:331 +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "ne morem odpreti uporabnikove konfiguracijske datoteke '%s'" + +# common/fileconf.cpp:800 +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "ne morem odpreti uporabni¹ke konfiguracijske datoteke" + +# common/file.cpp:285 +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "ne morem brati iz deskriptorja %d" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# common/file.cpp:552 +# common/file.cpp:562 +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "ne morem odstraniti datoteke '%s'" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# common/file.cpp:580 +# common/file.cpp:583 +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "ne odstraniti zaèasne datoteke '%s'" + +# common/file.cpp:359 +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "ne morem iskati na datoteènem deskriptorju" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +# common/textfile.cpp:359 +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "ne morem zapisati datoteke '%s' na disk" + +# common/file.cpp:304 +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "ne morem pisati na deskriptor %d" + +# common/fileconf.cpp:807 +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "ne morem zapisati uporabni¹ke konfiguracijske datoteke" + +# common/intl.cpp:374 +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "ne najdem katalo¾ne datoteke za domeno '%s'." + +# common/utilscmn.cpp:464 +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "" + +# common/cmdline.cpp:912 +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "datum" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "" + +# generic/fontdlgg.cpp:216 +#: ../src/common/datetime.cpp:3162 +#, fuzzy +msgid "eighth" +msgstr "Svetlo" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "" + +# common/fileconf.cpp:1437 +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "vstop '%s' se pojavi veèkrat v skupini '%s'" + +# msw/dialup.cpp:861 +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "" + +# common/ffile.cpp:182 +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "ne morem izprazniti datoteje '%s'" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "" + +# common/fileconf.cpp:481 +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "datoteka '%s', vrstica %d: '%s' je bil ignoriran po skupinski glavi." + +# common/fileconf.cpp:510 +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "datoteka '%s', vrstica %d: '=' prièakovan." + +# common/fileconf.cpp:536 +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "datoteka '%s', vrstica %d: kljuè '%s' je bil ¾e najden v vrstici %d." + +# common/fileconf.cpp:526 +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "datoteka '%s', vrstica %d: vrednost immutable kluèa '%s' ignorirana." + +# common/fileconf.cpp:449 +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "datoteka '%s': neprièakovan znak %c v vrstici %d" + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "" + +# common/timercmn.cpp:240 +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "" + +# msw/dialup.cpp:861 +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "" + +# common/file.cpp:442 +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "eof() vrnil napaèno vrednost" + +# generic/logg.cpp:1037 +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "Napaèna vrnjena vrednost sporoèilnega okna" + +# html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "velike" + +# common/intl.cpp:575 +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "ne morem nastaviti locale '%s'." + +# common/intl.cpp:369 +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "iskanje kataloga '%s' v poti '%s'" + +# html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "srednje" + +# generic/fontdlgg.cpp:216 +#: ../src/common/datetime.cpp:3319 +#, fuzzy +msgid "midnight" +msgstr "Svetlo" + +# common/timercmn.cpp:236 +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "" + +# generic/prntdlgg.cpp:113 +# generic/prntdlgg.cpp:127 +#: ../src/common/datetime.cpp:3163 +#, fuzzy +msgid "ninth" +msgstr "Tiskanje" + +# msw/dde.cpp:972 +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "" + +# html/helpdata.cpp:644 +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "neimanovana" + +# html/helpdata.cpp:644 +#: ../src/common/datetime.cpp:3318 +#, fuzzy +msgid "noon" +msgstr "neimanovana" + +# common/cmdline.cpp:911 +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "¹t" + +# msw/dde.cpp:1015 +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "" + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "" + +# common/utilscmn.cpp:468 +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "" + +# html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "male" + +# common/cmdline.cpp:910 +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +# generic/helpwxht.cpp:159 +# html/helpfrm.cpp:303 +# html/helpfrm.cpp:312 +#: ../src/common/datetime.cpp:3164 +#, fuzzy +msgid "tenth" +msgstr "Vsebina" + +# msw/dde.cpp:979 +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "" + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "" + +# common/fileconf.cpp:1557 +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "neprièakovan \" na poziciji %d v '%s'." + +# generic/progdlgg.cpp:241 +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "nepoznan" + +# msw/dialup.cpp:466 +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "" + +# common/file.cpp:342 +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "nepoznana smer iskanja" + +# common/file.cpp:342 +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "nepoznana smer iskanja" + +# common/fontmap.cpp:354 +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "nepoznan-%d" + +# common/docview.cpp:406 +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "neimenovana" + +# common/docview.cpp:1188 +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "neimenovana%d" + +# common/intl.cpp:379 +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "uporabljam katalog '%s' iz '%s'" + +# html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "zelo velike" + +# html/helpfrm.cpp:874 +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "zelo male" + +# common/timercmn.cpp:267 +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "" + +# common/socket.cpp:347 +# common/socket.cpp:401 +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "" + +# common/socket.cpp:921 +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "" + +# common/docview.cpp:306 +#: ../src/motif/app.cpp:591 +#, fuzzy, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "Ne morem odpreti te datoteke za shranjevanje." + +# common/filefn.cpp:1230 +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: napaki pri iskanju imena zaèasne datoteke.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "" diff --git a/locale/sv.po b/locale/sv.po new file mode 100644 index 0000000000..cb369450b4 --- /dev/null +++ b/locale/sv.po @@ -0,0 +1,3068 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows-2.2.2\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-09-06 02:02+0200\n" +"Last-Translator: Jonas Rydberg \n" +"Language-Team: wxWindows tranlators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(Har du de nödvändiga rättigheterna?)" + +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"finns inte\n" +"Skapa den nu?" + +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (fel %ld: %s)" + +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr " Förhandsgranska" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr " byte " + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "#10 Kuvert, 4 1/8 x 9 1/2 tum" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "#11 Kuvert, 4 1/2 x 10 3/8 tum" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "#12 Kuvert, 4 3/4 x 11 tum" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "#14 Kuvert, 5 x 11 1/2 tum" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "#9 Kuvert, 3 7/8 x 8 7/8 tum" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "#define %s måste vara ett heltal." + +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i av %i" + +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (eller %s)" + +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s Fel" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s Information" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s Varning" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s är inte en bitmapresursspecifkation" + +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "%s är inte en ikonresursspecifikation" + +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s: felaktig resursfilsyntax." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "&Stäng" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "&Detaljer" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "&Avsluta" + +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "&Logga" + +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "&Nästa >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "&Nästa >" + +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "&Nästa Tips" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "&Upprepa" + +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "&Upprepa " + +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "&Spara..." + +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "&Visa tips vid start" + +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "&Ångra" + +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "&Ångra " + +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "&Fönster" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "\"%s\" har extra \"..\", ignoreras." + +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "\"%s\" är ogiltig" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "\"%s\" är inte ett korrekt numeriskt värde för flagga \"%s\"." + +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "\"%s\" är inte en giltig meddelandekatalog." + +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "\"%s\" är troligen än binär fil" + +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "\"%s\" skall vara numerisk." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "\"%s\" får bara innehålla ASCII-tecken." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "\"%s\" får bara innehålla alfabetiska tecken" + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "\"%s\" får bara innehålla alfabetiska eller numeriska tecken" + +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(Hjälp)" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(bokmärken)" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", förväntade static, #include eller #define\n" +"när resursen tolkades." + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 tum" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 tum" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "6 3/4 Kuvert, 3 5/8 x 6 1/2 tum" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": filen finns inte!" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": okänd teckenuppsättning" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": okänd kodning" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< &Bakåt" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr " " + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr " " + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" +"Normalt typsnitt
    (och understruket. Kursivt " +"typsnitt. Fett typsnitt. Fett kursivt typsnitt.
    typsnittsstorlek -2
    typsnittsstorlek -1
    typsnittsstorlek +0
    typsnittsstorlek +1
    typsnittsstorlek +2
    typsnittsstorlek +3
    typsnittsstorlek +4

    Storleksbestämt " +"typsnitt.
    fet kursiv fet kursiv understruken
    typsnittsstorlek -2
    typsnittsstorlek -1
    typsnittsstorlek +0
    typsnittsstorlek +1
    typsnittsstorlek +2
    typsnittsstorlek +3
    typsnittsstorlek +4
    " + +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "A3 ark, 297 x 420 mm" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "A4 ark, 210 x 297 mm" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "A4 litet ark, 210 x 297 mm" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "A5 ark, 148 x 210 mm" + +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "Lägg till aktuell sida till bokmärken" + +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "Lägg till egendefinierade färger" + +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "Lägger till bok %s" + +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "Alla" + +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "Alla filer (*)|*" + +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "Alla filer (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "Ringer redan Internetleverantör." + +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "Lägg till logg till fil \"%s\" (om du väljer [Nej] skrivs den över)?" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "Arabiska (ISO-8859-6)" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "B4 Kuvert, 250 x 353 mm" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "B4 ark, 250 x 354 mm" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "B5 Kuvert, 176 x 250 mm" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "B5 ark, 182 x 257 millimeter" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "B6 Kuvert, 176 x 125 mm" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: Kan inte hantera 4-bitkodad ännu." + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: Kunde inte allokera minne." + +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: Kunde inte spara ogiltig bild." + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: Kunde inte skriva data." + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: Kunde inte skriva filhuvudet." + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: Kodning matchar inte bitdjup." + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: Bildhöjd > 32767 pixlar för fil." + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP: Bildbredd > 32767 pixlar för fil." + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: Okänt bitdjup i fil." + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP: Okänd kodning i fil." + +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "Bakåt" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Baklänges" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "Baltiska språk (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "Baltiska språk (gammal) (ISO-8859-4)" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "Bitmappsresursspecifikation %s inte funnen" + +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "Fet" + +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "Nedre marginal (mm):" + +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "C ark, 17 x 22 tum" + +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "&Töm" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "C3 Kuvert, 324 x 458 mm" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "C4 Kuvert, 229 x 324 mm" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "C5 Kuvert, 162 x 229 mm" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "C6 Kuvert, 114 x 162 mm" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "C65 Kuvert, 114 x 229 mm" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "Kan inte skapa händelseobjekt" + +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "Kan inte skapa mutex" + +#: ../src/mac/thread.cpp:92 +msgid "Can not create mutex." +msgstr "Kan inte skapa mutex." + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "Kan inte räkna upp filerna i katalogen \"%s\"" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "Kan inte fortsätta tråden %x" + +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "Kan inte starta tråden: fel vid skrivning av TLS." + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "Kan inte stänga av tråd %x" + +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "Kan inte vänta på att tråden avslutas" + +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "Kan inte &Ångra " + +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "Kan inte kontrollera bildformat för fil \"%s\": filen finns inte." + +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "Kan inte stänga registernyckel \"%s\"" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "Kan inte kopiera värden av ej stödd typ %d." + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "" +"Kan inte skapa listkontrollfönster, kontrollera att comctl32.dll är " +"installerad." + +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "Kan inte skapa registernyckel \"%s\"" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "Kan inte skapa mellanprocessläsröret" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "Kan inte skapa mellanprocesskrivröret" + +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "Kan inte skapa tråd" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"Kan inte skapa fönster av klass %s!\n" +"Möjligen ett Windows 3.x kompatibilitetsproblem" + +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "Kan inte ta bort nyckel \"%s\"" + +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "Kan inte ta bort INI-filen \"%s\"" + +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "Kan inte ta bort värde \"%s\" från nyckel \"%s\"" + +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "Kan inte ta bort värdet från nyckeln \"%s\"" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "Kan inte räkna upp undernycklar för nyckel \"%s\"" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "Kan inte räkna upp värden för nyckel \"%s\"" + +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "Kan inte hitta aktuell position i fil \"%s\"" + +#: ../src/msw/window.cpp:2383 +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"Kan inte hitta dummy-dialogmall!\n" +"Kontrollera resursinkluderingssökvägen för att hitta wx.rc." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "Kan inte hitta serialisationsobjektet \"%s\" till objektet \"%s\"." + +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "Kan inte hitta information om registernyckel \"%s\"" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "Kan inte ladda bild från fil \"%s\": filen finns inte." + +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "Kan inte ladda wxSerial dynamiskt bibliotek." + +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "Kan inte öppna fil \"%s\"" + +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "Kan inte öppna registernyckel \"%s\"" + +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "Kan inte läsa värdet av \"%s\"" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "Kan inte läsa värdet av nyckel \"%s\"" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "Kan inte spara logginnehållet till en fil" + +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "Kan inte sätta trådprioritet" + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "Kan inte sätta värdet på \"%s\"" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "Avbryt" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "Kan inte hitta aktiv uppringningsanslutning: %s" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "Kan inte hitta platsen för adressbokfil" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "Kan inte hämta prioritetsräckvidden för schemaläggningsregler %d." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "Kan inte få värdnamnet" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "Kan inte få det officiella värdnamnet" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "Kan inte lägga på - ingen aktiv uppringningsanslutning" + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "Kan inte initialisera OLE" + +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "Kan inte öppna HTML-dokument: %s" + +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "Kan inte öppna HTML-hjälpbok" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "Kan inte öppna URL \"%s\"" + +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "Kan inte öppna innehållsfil: %s" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "Kan inte öppna fil för PostScript-utskrift!" + +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "Kan inte öppna indexfil: %s" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "Kan inte skriva ut tom sida." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "Kan inte hämta trådschemaläggningsregler." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "Kan inte starta tråd: fel vid skrivning till TLS" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "Skiftlägeskänslig" + +#: ../src/common/fontmap.cpp:113 +#, fuzzy +msgid "Celtic (ISO-8859-14)" +msgstr "Baltiska språk (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "Centraleuropeisk (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "Välj Internetleverantör att ringa upp" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "Välj typsnitt" + +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Töm logginnehållet" + +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "Stäng" + +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "Stäng detta fönster" + +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "Konfigurationspost kan inte starta med \"%c\"." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "Bekräfta" + +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Kopplar upp..." + +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Tiden för anslutningen till wxHelp gick ut efter %d sekunder" + +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Innehåll" + +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "Kopior:" + +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "Kunde inte hitta resursinkluderingsfil %s." + +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "Kunde inte hitta flik för id" + +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "Kunde inte ladda Rich Edit DLL \"%s\"" + +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"Kunde inte slå upp kontrollklass eller -id \"%s\". Använd (icke-noll) heltal " +"istället\n" +" eller ordna med #define (se manualen för varningar)" + +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"Kunde inte slå upp meny-id \"%s\". Använd (icke-noll) heltal istället\n" +" eller ordna med #define (se manualen för varningar)" + +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "Kunde inte börja förhandsgranska dokumentet." + +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "Kunde inte börja skriva ut." + +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "Kunde inte föra över data till fönstret" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "Kunde inte anskaffa ett mutexlås" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "Kunde inte lägga till en bild till bildlistan." + +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "Kunde inte ändra tillståndet för händelseobjektet." + +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "Kunde inte skapa en timer" + +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "Kunde inte hitta symbolen \"%s\" i ett dynamiskt bibliotek" + +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "Kunde inte få den aktuella trådpekaren" + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "Kunde inte starta DDE-server \"%s\"." + +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "Kunde inte ladda PNG-bild - filen är förstörd eller för lite minne." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "Kunde inte registrera urklippsformat \"%s\"." + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "Kunde inte frigöra en mutex" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "Kunde inte hämta information om listkontrollföremål %d." + +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "Kunde inte avsluta tråd" + +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "Skapa katalog" + +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "Skapa ny katalog" + +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "Aktuell katalog:" + +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "Baltiska språk (ISO-8859-13)" + +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "D ark, 22 x 34 tum" + +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "DDE poke-förfrågan misslyckades" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "DL Kuvert, 110 x 220 mm" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "Datum" + +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "Dekorativ" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "" +"Uppringningsfunktioner är inte tillgängliga på grund av att " +"fjärråtkomstservice (RAS) inte är installerad på denna maskin. Var vänlig " +"och installera den." + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "Visste du att..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Katalog \"%s\" kunde inte skapas" + +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "Katalogen finns inte" + +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "" +"Visa alla indexposter som innehåller given delsträng. Sökningen är " +"skiftlägesokänslig." + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "Visa alternativdialog" + +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "Vill du spara ändringar i %s?" + +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Färdigt" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Färdigt." + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "E ark, 34 x 44 tum" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "Passerad tid: " + +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "Poster funna" + +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "" +"Miljövariabelexpansion misslyckades: \"%c\" saknas på position %d i \"%s\"." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "Fel" + +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "Fel " + +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "Fel vid skapande av katalog" + +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "Fel: " + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Esperanto (ISO-8859-3)" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Uppskattad tid: " + +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "Etcetera" + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "Utförande av kommando \"%s\" misslyckades" + +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 tum" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "Förväntade \"*\" när resursen tolkades." + +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "Förväntade \"=\" när resursen tolkades." + +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "Förväntade \"char\" när resursen tolkades." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "Misslyckades att %s uppringningsanslutning: %s" + +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "Kunde inte stänga urklippsbordet." + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "Kunde inte ansluta: användarnamn/lösenord saknas." + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "Kunde inte ansluta: ingen Internetleverantör att ringa upp." + +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "Kunde inte kopiera regustervärde \"%s\"" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "Kunde inte kopiera innehållet i registernyckel \"%s\" till \"%s\"." + +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "Kunde inte skapa DDE-sträng" + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "Kunde inte skapa MDI-föräldraram." + +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "Kunde inte skapa en statusrad." + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "Kunde inte skapa en anslutning till server \"%s\" med ämne \"%s\"" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "" +"Kunde inte skapa dialog. Du glömde förmodligen att inkludera wx/msw/wx.rc i " +"dina resurser." + +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "Kunde inte skapa katalog " + +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "Kunde inte visa HTML-dokument i %s-kodning" + +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "Kunde inte tömma urklippbordet." + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "Kunde inte starta en meddelandeloop med DDE-server" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "Kunde inte etablera uppringningsanslutning: %s" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "Kunde inte utföra \"%s\"\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Kunde inte hitta XBM-resurs %s.\n" +"Glömde att använda wxResourceLoadBitmapData?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"Kunde inte hitta XBM-resurs %s.\n" +"Glömde att använda wxResourceLoadIconData?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"Kunde inte hitta XPM-resurs %s.\n" +"Glömde att använda wxResourceLoadBitmapData?" + +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "Kunde inte få Internetleverantörers namn: %s" + +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "Kunde inte få data från urklippbordet" + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "Kunde inte få UTC-systemtiden." + +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "Kunde inte få den lokala systemtiden" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "" +"Kunde inte slå ihop en tråd, möjlig minnesläcka hittad - var vänlig och " +"starta om programmet" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "Kunde inte ladda delat bibliotek \"%s\"" + +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "Kunde inte öppna urklippbordet" + +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "Kunde inte skicka data till urklippbordet" + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "Kunde inte omdirigera barnprocessens in/ut" + +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "Kunde inte registrera DDE-server \"%s\"" + +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "Kunde inte komma ihåg kodningen för teckenuppsättning \"%s\"." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "Kunde inte byta namn på registervärde \"%s\" till \"%s\"." + +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "Kunde inte byta namn på registernyckel \"%s\" till \"%s\"." + +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "Kunde inte hämta data från urklippbordet." + +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "Kunde inte hämta text från RAS-felmeddelande" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "Kunde inte hämta de stödda urklippbordformaten" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "Kunde inte skicka DDE-meddelandeanmälan" + +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "Kunde inte sätta urklippborddata." + +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "Kunde inte sätta trådprioritet %d." + +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "Kunde inte spara bild \"%s\" till minnes-VFS!" + +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "Kunde inte avsluta en tråd." + +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "Kunde inte avsluta meddelandeloopen med DDE-servern" + +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "Kunde inte avsluta den uppringda anslutningen: %s" + +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "Kunde inte avregistrera DDE-server \"%s\"" + +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "Kritiskt fel" + +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "Kritiskt fel: " + +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "Kritiskt fel: avslutar" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "Filen \"%s\" finns redan, vill du verkligen skriva över den?" + +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "Filen kunde inte laddas." + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Filfel" + +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "Filnamnet finns redan." + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "Filer (%s)|%s" + +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "Sök" + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "Typsnitt med fast bredd:" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 tum" + +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "Typsnitt" + +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "Typsnittsstorlek:" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "Gren misslyckades" + +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Framåt" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "Hittade " + +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "Hittade %i träffar" + +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "Från:" + +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: dataströmmen tycks vara trunkerad." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: fel i GIF bildformat." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: inte tillräckligt minne." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF: okänt fel!!!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "Tysk Legal Fanfold, 8 1/2 x 13 tum" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "Tysk standard Fanfold, 8 1/2 x 12 tum" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "Gå tillbaka" + +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Gå framåt" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "Gå upp en nivå i dokumenthierarki" + +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "Gå till hemkatalog" + +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "Gå till föräldrakatalog" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Grekiska (ISO-8859-7)" + +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "HTML-ankare %s finns inte." + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" +"HTML-filer (*.htm)|*.htm|HTML-filer (*.html)|*.html|Hjälpböcker (*.htb)|*." +"htb|Hjälpböcker (*.zip)|*.zip|HTML-hjälpprojekt (*.hhp)|*.hhp|Alla filer (*." +"*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Hebreiska (ISO-8859-8)" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "Hjälp" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "Hjälpbläddraralternativ" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "Hjälpindex" + +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "Hjälputskrift" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "Hjälp: %s" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "Ikonresursspecifikation %s ej funnen." + +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "Felformatterad resursfilsyntax." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "Felaktigt katalognamn." + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "Felaktig filspecifikation." + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "" +"Omöjligt att skapa en rich edit control, använder enkel text control " +"istället. Installera om riched32.dll" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "Omöjligt att få barnprocessindata" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "Ej korrekt version av HTML-hjälpbok" + +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Index" + +#: ../src/common/fontmap.cpp:111 +#, fuzzy +msgid "Indian (ISO-8859-12)" +msgstr "Nordiska språk (ISO-8859-10)" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "Ogiltigt TIFF-bildindex." + +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "Kursiv" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Italienskt kuvert, 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG: Kunde inte ladda - filen är troligen förstörd." + +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG: Kunde inte spara bild." + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "Liggande" + +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Liggare, 17 x 11 tum" + +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "Vänster marginal (mm):" + +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal, 8 1/2 x 14 tum" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Letter litet, 8 1/2 x 11 tum" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter, 8 1/2 x 11 tum" + +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Tunn" + +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "Ladda %s fil" + +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "Laddar : " + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "Att ladda Grey Ascii PNM bilder är ännu inte implementerat." + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "Att ladda Grey Raw PNM bilder är ännu inte implementerat." + +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "Logg sparad till filen \"%s\"." + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "MDI-barn" + +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "Mailcap-fil %s, rad %d: ofullständig post ignorerad." + +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "Minnes-VFS innehåller redan fil \"%s\"!" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "Mime.types fil %s, rad %d: oavslutad citerad sträng" + +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "Modern" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Monarch kuvert, 3 7/8 x 7 1/2 tum" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "Mer..." + +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "Monterade enheter" + +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "Min hårddisk" + +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "Mitt hem" + +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Namn" + +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "Ny..." + +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "Nytt namn" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "Nästa sida" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "Nej" + +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "Inga XBM-faciliteter tillgängliga!" + +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "Inga XPM-faciliteter tillgängliga!" + +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "Ingen XPM-ikonfacilitet tillgänglig!" + +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "Inga poster funna." + +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"Kodningen \"%s\" är okänd.\n" +"Vill du välja ett typsnitt att använda för denna kodning\n" +"(annars kommer texten med denna kodning inte att visas korrekt)?" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "Ingen hanterare hittades för bildtypen." + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "Ingen bildhanterare för typen %d är definierad." + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "Ingen bildhanterare för typen %s är definierad." + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "Ingen matchande sida funnen ännu" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Nordiska språk (ISO-8859-10)" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Normal" + +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Normalt typsnitt:" + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "Note, 8 1/2 x 11 tum" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "OK" + +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "Öppna HTML-dokument" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "Operation ej tillåten." + +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "Flagga \"%s\" kräver ett värde, \"=\" förväntat." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "Flagga \"%s\" kräver ett värde." + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "Flagga \"%s\": \"%s\" kan inte konverteras till ett datum." + +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Alternativ" + +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "Orientering" + +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: kunde inte allokera minne" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: bildformatet stöds inte" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: ogiltig bild" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: detta är inte en PCX fil." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX: okänt fel !!!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: för lågt versionsnummer" + +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PNM: Kunde inte allokera minne." + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM: Filformat är okänt." + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM: Filen tycks vara trunkerad." + +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Sida %d" + +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Sida %d av %d" + +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Sidinställningar" + +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Sidor" + +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Pappersstorlek" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Pappersstorlek" + +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "Rättigheter" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "Kunde inte skapa rör (pipe)" + +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "Välj ett giltigt typsnitt." + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "Välj en existerande fil." + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "Välj vilken Internetleverantör du vill ansluta till" + +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "Vänta..." + +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "Stående" + +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "PostScript" + +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "PostScript-fil" + +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "PostScript:" + +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "Förhandsgranska bara" + +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Förhandsgranska:" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "Föregående sida" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "Skriv ut" + +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "Förhandsgranska utskrift" + +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "Förhandsgranskning av utskrift misslyckades" + +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "Sidintervall" + +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "Utskriftsinställningar" + +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "Skriv ut med färg" + +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "Utskrift-spooling" + +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "Skriv ut denna sida" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "Skriv ut till fil" + +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "Skriv ut..." + +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "Skrivarkommando: " + +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "Skrivaralternativ: " + +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "Skrivarinställningar" + +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "Skrivarkommando:" + +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "Skrivarinställningar" + +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "Skrivarinställningar:" + +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "Skrivare..." + +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "Skriver ut" + +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "Utskriftsfel" + +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "Skriver sida %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "Skriver ut..." + +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "Program avbrutet." + +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "Quarto, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "Fråga" + +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "Läsfel på fil \"%s\"" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "Registernyckel \"%s\" finns redan." + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "Registernyckel \"%s\" finns inte, kan inte döpas om." + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"Registernyckel \"%s\" behövs för att systemet skall fungera normalt,\n" +"om du tar bort den kommer systemet bli instabilt:\n" +"operation avbruten." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "Registervärde \"%s\" finns redan." + +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Relevanta poster:" + +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Återstående tid : " + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "Ta bort aktuell sida från bokmärken" + +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "Ersätt fil \"%s\"?" + +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Höger marginal (mm):" + +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "Roman" + +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "Spara %s fil" + +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Spara som" + +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "Spara logginnehållet till fil" + +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "Script" + +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "Sök" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "" +"Sök i hjälpboken/böckernas innehåll efter alla förekomster av texten du " +"skrev in ovan" + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "Sök i alla böcker" + +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "Söker..." + +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "Sektioner" + +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "Sökfel på fil \"%s\"" + +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Välj en dokumentmall" + +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Välj en dokumentvy" + +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Välj en fil" + +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "Skicka till skrivare" + +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "Separerare förväntad efter flaggan \"%s\"." + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "Inställningar" + +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "Inställningar..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "Flera aktiva uppringningsanslutningar hittades, väljer en slumpvis." + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "Visa alla" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "Visa alla poster i index" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "Visa dolda filer" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "Visa/dölj navigationspanel" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "Storlek" + +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Lutande" + +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "Kunde inte öppna denna fil för att spara." + +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "Kunde inte öppna denna fil." + +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "Kunde inte spara denna fil." + +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "Inte tillräckligt minne för att skapa förhandsgranskning." + +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Statement, 5 1/2 x 8 1/2 tum" + +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "Status: " + +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "Swiss" + +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: Kunde inte allokera minne." + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: Fel vid laddning av bild." + +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: Fel vid läsning av bild." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: Fel vid sparning av bild." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF: Fel vid skrivning av bild." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloid, 11 x 17 tum" + +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "Teletype" + +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "Mallar" + +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "Tillfällig" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Thai (ISO-8859-11)" + +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "Datorn" + +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"Teckenuppsättningen \"%s\" är okänd. Du kan välja\n" +" en annan teckenuppsättning som ersättning eller välja \n" +"[Avbryt] om den inte kan ersättas" + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "Urklippsformatet \"%d\" finns inte." + +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "Katalogen " + +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"Filen \"%s\" finns inte och kunde inte öppnas.\n" +"Den har också tagits bort från MRU-fillistan." + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "Den obligatoriska parametern \"%s\" var inte specifierad." + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "Texten kunde inte sparas." + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "Värdet för flaggan \"%s\" måste anges." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "" +"Versionen av fjärråtkomsttjänsten (RAS) som är installerad på denna maskin " +"är för gammal, uppgradera (följande nödvändig funktion saknas: %s)." + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "" +"Trådmodulinitialisering misslyckades: kan inte spara värde i trådens lokala " +"lagring" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "Trådmodulinitialisering misslyckades: kunde inte skapa trådnyckel" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "" +"Trådmodulinitialisering misslyckades: omöjligt att allokera index i trådens " +"lokala lagring" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "Trådprioritetsinställningar ignoreras" + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "Tid" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "Dagens tips" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "Tipsen är inte tillgängliga." + +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "Till:" + +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "Övre marginal (mm):" + +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "Försöker ta bort fil \"%s\" från minnes-VFS, men den är inte laddad!" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "Försöker slå upp ett NULL värdnamn: ger upp" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "Turkiska (ISO-8859-9)" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "US standard Fanfold, 14 7/8 x 11 tum" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "Kunde inte öppna efterfrågat HTML-dokument: %s" + +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Understrykning" + +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "Oväntat slut på filen när resursen tolkades." + +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "Oväntad parameter \"%s\"" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "Okänt DDE-fel %08x" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "Okänd kodning (%d)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "Okänt fält i fil %s, rad %d: \"%s\"." + +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "Okänd lång flagga \"%s\"" + +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "Okänd flagga \"%s\"" + +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "Omatchad \"{\" i en post för mime-typ %s." + +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "Namnlöst kommando" + +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "Okänd stil %s när resursen tolkades." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "Urklippsformatet stöds inte." + +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Användning: %s" + +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Användare" + +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "Lokal användare" + +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "Bekräftningskonflikt" + +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "Variabler" + +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "Visa filer som detaljerad lista" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "Visa filer som lista" + +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "Vyer" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "Väntan på att subprocessen skulle avslutas misslyckades" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "Varning" + +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "Varning: " + +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "Varning: försök att ta bort HTML-märkordshanterare från tom stack." + +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "Västerländsk (ISO-8859-1/Latin 1)" + +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "Ny Västerländsk (ISO-8859-15/Latin 0)" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "Endast hela ord" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "Win32s på Windows 3.1" + +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "Fönster" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "Windows 9%c" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Windows Arabiska (CP 1256)" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Windows Baltiska språk (CP 1257)" + +#: ../src/common/fontmap.cpp:116 +#, fuzzy +msgid "Windows Central European (CP 1250)" +msgstr "Windows Hebreiska (CP 1255)" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Windows Kyrilliska (CP 1251)" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Windows Grekiska (CP 1253)" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Windows Hebreiska (CP 1255)" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Windows Turkiska (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +#, fuzzy +msgid "Windows Western European (CP 1252)" +msgstr "Windows Latin 1 (CP 1252)" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "Skrivfel på fil \"%s\"" + +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "X-skalning" + +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "X-translation" + +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "Y-skalning" + +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "Y-translation" + +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "Ja" + +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "Du kan inte lägga till en ny katalog till denna sektion." + +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[TOM]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "en DDEML-applikation har skapat ett fördröjt race-tillstånd." + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" +"en DDEML-funktion kallades utan att först kalla DdeInitialize-funktionen,\n" +"eller en ogiltig instansidentifierare\n" +"sändes till en DDEML-funktion." + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "en klients försök att etablera en konversation misslyckades." + +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "en minnesallokering misslyckades." + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "en parameter kunde inte bekräftas av DDEML." + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "" +"tiden för en förfrågan för en synkron meddelandetransaktion har gått ut." + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "tiden för en förfrågan för en synkron datatransaktion har gått ut." + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "" +"tiden för en förfrågan för en synkron exekveringstransaktion har gått ut." + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "tiden för en förfrågan för en synkron poke-transaktion har gått ut." + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "" +"tiden för en förfrågan att avsluta en meddelandetransaktion har gått ut." + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" +"en transaktion på servern försökte sig på en konversation\n" +"som avslutades av klienten, eller servern\n" +"avslutade före transaktionen var genomförd." + +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "en transaktion misslyckades." + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" +"en applikation som initialiserades som en APPCLASS_MONITOR har\n" +"försökt att genomföra en DDE-transaktion,\n" +"eller en applikation initialiserad som en APPCMD_CLIENTONLY har \n" +"försökt genomföra servertransaktioner." + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "ett internt anrop till PostMessage-funktionen misslyckades. " + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "ett internt fel har uppståt i DDEML." + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" +"en ogiltig transaktionsidentifierare skickades till en DDEML-funktion.\n" +"När applikationen har återvänt från ett XTYP_XACT_COMPLETE anrop,\n" +"är transaktionsidentifieraren för det anropet inte längre giltig." + +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "försök att ändra oföränderlig tangent \"%s\" ignorerad." + +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "kan inte stänga filen \"%s\"" + +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "kan inte stänga filidentifierare %d" + +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "kan inte genomföra ändringar på fil \"%s\"" + +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "kan inte skapa fil \"%s\"" + +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "kan inte ta bort användarens konfigurationsfil \"%s\"" + +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "kan inte avgöra om slutet är nått på identifierare %d" + +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "kan inte hitta filens längd på filidentifierare %d" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "kan inte hitta användarens HOME, använder aktuell katalog." + +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "kan inte tömma filidentifierare %d" + +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "kan inte hitta sökposition på filidentifierare %d" + +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "kan inte ladda något typsnitt, avbryter" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "kan inte öppna filen \"%s\"" + +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "kan inte öppna global konfigurationsfil \"%s\"." + +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "kan inte öppna användarkonfigurationsfil \"%s\"." + +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "kan inte öppna användarens konfigurationsfil." + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "kan inte läsa från filidentifierare %d" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "kan inte ta bort filen \"%s\"" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "kan inte ta bort temporär fil \"%s\"" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "kan inte söka på filidentifierare %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "kan inte skriva fil \"%s\" till disk." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "kan inte skriva till filidentifierare %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "kan inte skriva användarens konfigurationsfil." + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "katalogfil för domän \"%s\" hittades inte." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "datum" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "artonde" + +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "åttonde" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "elfte" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "post \"%s\" förekommer mer än en gång i grupp \"%s\"" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "etablera" + +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "misslyckades att tömma filen \"%s\"" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "femtonde" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "femte" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "fil \"%s\", rad %d: \"%s\" ignorerad efter grupphuvud." + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "fil \"%s\", rad %d: \"=\" förväntat." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "fil \"%s\", rad %d: tangent \"%s\" hittades först på rad %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "fil \"%s\", rad %d: värde för oföränderlig tangent \"%s\" ignorerad." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "fil \"%s\": oväntat tecken %c på rad %d." + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "första" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "fjortonde" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "fjärde" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "gmtime() misslyckades" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "initiera" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "ogiltigt eof() returvärde." + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "meddelandebox returnerade ogiltigt värde" + +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "stor" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "lokal \"%s\" kan inte sättas." + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "söker efter katalog \"%s\" i sökväg \"%s\"." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "medium" + +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "midnatt" + +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "mktime() misslyckades" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "nittonde" + +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "nionde" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "inget DDD-fel." + +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "namnlös" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "middag" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "num" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "återinträdesproblem." + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "andra" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "sjuttonde" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "sjunde" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "skift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "sextonde" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "sjätte" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "liten" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "tionde" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "svaret på transaktionen gjorde att DDE_FBUSY-biten sattes." + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "tredje" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "trettonde" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "idag" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "imorgon" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "tolfte" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "tjugonde" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "oväntat \" på position %d i \"%s\"." + +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "okänd" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "okänt fel (felkod %08x)." + +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "okänd sökstart" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "okänd sökstart" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "okänd-%d" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "namnlös" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "namnlös%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "använder katalog \"%s\" från \"%s\"." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "väldigt stor" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "väldigt liten" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "wxGetTimeOfDay misslyckades." + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: ogiltig signatur i ReadMsg." + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: okänd händelse!" + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "wxWindows kunde inte öppna skärm för \"%s\": avslutar." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: kunde inte hitta temporärt filnamn.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "igår" + +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "Kyrilliska (Latin 5)" + +#~ msgid "ISO-8859-12" +#~ msgstr "ISO-8859-12" + +#~ msgid "ISO-8859-14" +#~ msgstr "ISO-8859-14" + +#~ msgid "Windows Latin 2 (CP 1250)" +#~ msgstr "Windows Latin 2 (CP 1250)" diff --git a/locale/wxstd.po b/locale/wxstd.po index 2d88418109..e490204e8f 100644 --- a/locale/wxstd.po +++ b/locale/wxstd.po @@ -6,53 +6,73 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-03-07 11:31+0100\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" +"Content-Transfer-Encoding: 8bit\n" -#: ../src/generic/dirdlgg.cpp:479 +#: ../src/generic/dirdlgg.cpp:551 msgid "" "\n" "(Do you have the required permissions?)" msgstr "" -#: ../src/generic/dirdlgg.cpp:466 +#: ../src/generic/dirdlgg.cpp:538 msgid "" "\n" "does not exist\n" "Create it now?" msgstr "" -#: ../src/common/log.cpp:238 +#: ../src/common/log.cpp:242 #, c-format msgid " (error %ld: %s)" msgstr "" -#: ../src/common/docview.cpp:1192 +#: ../src/common/docview.cpp:1206 msgid " - " msgstr "" -#: ../src/html/htmprint.cpp:484 +#: ../src/html/htmprint.cpp:494 msgid " Preview" msgstr "" -#: ../src/generic/filedlgg.cpp:326 +#: ../src/generic/filedlgg.cpp:328 msgid " bytes " msgstr "" +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "" + #: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 -#: ../src/common/resource.cpp:1769 ../src/common/resource.cpp:1899 -#: ../src/common/resource.cpp:2980 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 #, c-format msgid "#define %s must be an integer." msgstr "" -#: ../src/html/helpfrm.cpp:695 ../src/html/helpfrm.cpp:696 -#: ../src/html/helpfrm.cpp:1242 ../src/html/helpfrm.cpp:1269 +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 #, c-format msgid "%i of %i" msgstr "" @@ -62,36 +82,67 @@ msgstr "" msgid "%s (or %s)" msgstr "" -#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2350 +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 #, c-format msgid "%s not a bitmap resource specification." msgstr "" -#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2506 +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 #, c-format msgid "%s not an icon resource specification." msgstr "" #: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 -#: ../src/common/resource.cpp:1862 ../src/common/resource.cpp:1991 -#: ../src/common/resource.cpp:3077 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 #, c-format msgid "%s: ill-formed resource file syntax." msgstr "" -#: ../src/generic/logg.cpp:435 ../src/generic/tipdlg.cpp:170 +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 msgid "&Close" msgstr "" -#: ../src/generic/wizard.cpp:268 +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "" + +#: ../src/generic/wizard.cpp:284 msgid "&Finish" msgstr "" -#: ../src/generic/logg.cpp:436 +#: ../src/generic/logg.cpp:478 msgid "&Log" msgstr "" -#: ../src/generic/wizard.cpp:171 ../src/generic/wizard.cpp:270 +#: ../src/msw/mdi.cpp:188 +msgid "&Next" +msgstr "" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 msgid "&Next >" msgstr "" @@ -99,15 +150,15 @@ msgstr "" msgid "&Next Tip" msgstr "" -#: ../src/common/docview.cpp:1889 ../src/common/docview.cpp:1900 +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 msgid "&Redo" msgstr "" -#: ../src/common/docview.cpp:1883 ../src/common/docview.cpp:1910 +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 msgid "&Redo " msgstr "" -#: ../src/generic/logg.cpp:431 +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 msgid "&Save..." msgstr "" @@ -115,15 +166,19 @@ msgstr "" msgid "&Show tips at startup" msgstr "" -#: ../src/common/docview.cpp:1895 +#: ../src/common/docview.cpp:1951 msgid "&Undo" msgstr "" -#: ../src/common/docview.cpp:1870 +#: ../src/common/docview.cpp:1926 msgid "&Undo " msgstr "" -#: ../src/common/config.cpp:390 +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 #, c-format msgid "'%s' has extra '..', ignored." msgstr "" @@ -133,17 +188,17 @@ msgstr "" msgid "'%s' is invalid" msgstr "" -#: ../src/common/cmdline.cpp:652 +#: ../src/common/cmdline.cpp:657 #, c-format msgid "'%s' is not a correct numeric value for option '%s'." msgstr "" -#: ../src/common/intl.cpp:389 +#: ../src/common/intl.cpp:412 #, c-format msgid "'%s' is not a valid message catalog." msgstr "" -#: ../src/common/textfile.cpp:224 +#: ../src/common/textfile.cpp:253 #, c-format msgid "'%s' is probably a binary file." msgstr "" @@ -168,60 +223,76 @@ msgstr "" msgid "'%s' should only contain alphabetic or numeric characters." msgstr "" -#: ../src/html/helpfrm.cpp:656 +#: ../src/html/helpfrm.cpp:679 msgid "(Help)" msgstr "" -#: ../src/html/helpfrm.cpp:271 ../src/html/helpfrm.cpp:760 -#: ../src/html/helpfrm.cpp:1295 +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 msgid "(bookmarks)" msgstr "" #: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 -#: ../src/common/resource.cpp:1801 ../src/common/resource.cpp:1931 -#: ../src/common/resource.cpp:3016 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 msgid "" ", expected static, #include or #define\n" "whilst parsing resource." msgstr "" -#: ../src/generic/dirdlgg.cpp:259 ../src/generic/filedlgg.cpp:708 +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 msgid "." msgstr "" -#: ../src/generic/dirdlgg.cpp:260 ../src/generic/filedlgg.cpp:709 +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 msgid ".." msgstr "" -#: ../src/common/fontmap.cpp:438 +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr "" + +#: ../src/common/fontmap.cpp:507 msgid ": unknown charset" msgstr "" -#: ../src/common/fontmap.cpp:598 +#: ../src/common/fontmap.cpp:712 msgid ": unknown encoding" msgstr "" -#: ../src/generic/wizard.cpp:168 +#: ../src/generic/wizard.cpp:186 msgid "< &Back" msgstr "" -#: ../src/generic/filedlgg.cpp:354 +#: ../src/generic/filedlgg.cpp:356 msgid "

    " msgstr "" -#: ../src/generic/filedlgg.cpp:321 +#: ../src/generic/filedlgg.cpp:323 msgid " " msgstr "" -#: ../src/generic/filedlgg.cpp:355 +#: ../src/generic/filedlgg.cpp:357 msgid "" msgstr "" -#: ../src/generic/filedlgg.cpp:322 +#: ../src/generic/filedlgg.cpp:324 msgid " " msgstr "" -#: ../src/html/helpfrm.cpp:904 +#: ../src/html/helpfrm.cpp:928 msgid "" "Normal face
    (and underlined. Italic face. " "Bold face. Bold italic face.
    font size " @@ -229,30 +300,42 @@ msgid "" "+0
    font size +1
    font size " "+2
    font size +3
    font size " "+4

    Fixed size face.
    bold italic " -"bold italic underlined
    font size " -"-2
    font size -1
    font size " -"+0
    font size +1
    font size " -"+2
    font size +3
    font size " -"+4
    " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4" msgstr "" -#: ../src/generic/dcpsg.cpp:2467 +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 msgid "A4 sheet, 210 x 297 mm" msgstr "" +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "" + #: ../src/generic/fontdlgg.cpp:325 msgid "ABCDEFGabcdefg12345" msgstr "" -#: ../src/html/helpfrm.cpp:265 +#: ../src/html/helpfrm.cpp:270 msgid "Add current page to bookmarks" msgstr "" -#: ../src/generic/colrdlgg.cpp:264 +#: ../src/generic/colrdlgg.cpp:269 msgid "Add to custom colours" msgstr "" -#: ../src/html/helpctrl.cpp:84 +#: ../src/html/helpctrl.cpp:83 #, c-format msgid "Adding book %s" msgstr "" @@ -261,68 +344,104 @@ msgstr "" msgid "All" msgstr "" -#: ../src/generic/filedlgg.cpp:820 +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 msgid "All files (*)|*" msgstr "" -#: ../src/unix/dialup.cpp:336 +#: ../include/wx/defs.h:1686 +msgid "All files (*.*)|*.*" +msgstr "" + +#: ../src/unix/dialup.cpp:359 msgid "Already dialling ISP." msgstr "" -#: ../src/generic/logg.cpp:475 +#: ../src/generic/logg.cpp:1021 #, c-format msgid "Append log to file '%s' (choosing [No] will overwrite it)?" msgstr "" -#: ../src/common/fontmap.cpp:93 +#: ../src/common/fontmap.cpp:105 msgid "Arabic (ISO-8859-6)" msgstr "" -#: ../src/common/imagbmp.cpp:271 +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "" + +#: ../src/common/imagbmp.cpp:387 msgid "BMP: Cannot deal with 4bit encoded yet." msgstr "" -#: ../src/common/imagbmp.cpp:150 ../src/common/imagbmp.cpp:162 +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 msgid "BMP: Couldn't allocate memory." msgstr "" -#: ../src/common/imagbmp.cpp:141 +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "" + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "" + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "" + +#: ../src/common/imagbmp.cpp:257 msgid "BMP: Encoding doesn't match bitdepth." msgstr "" -#: ../src/common/imagbmp.cpp:104 +#: ../src/common/imagbmp.cpp:220 msgid "BMP: Image height > 32767 pixels for file." msgstr "" -#: ../src/common/imagbmp.cpp:98 +#: ../src/common/imagbmp.cpp:214 msgid "BMP: Image width > 32767 pixels for file." msgstr "" -#: ../src/common/imagbmp.cpp:118 +#: ../src/common/imagbmp.cpp:234 msgid "BMP: Unknown bitdepth in file." msgstr "" -#: ../src/common/imagbmp.cpp:127 +#: ../src/common/imagbmp.cpp:243 msgid "BMP: Unknown encoding in file." msgstr "" -#: ../src/generic/helpwxht.cpp:156 +#: ../src/generic/helpwxht.cpp:157 msgid "Back" msgstr "" -#: ../src/common/dlgcmn.cpp:133 +#: ../src/common/dlgcmn.cpp:135 msgid "Backward" msgstr "" -#: ../src/common/fontmap.cpp:91 -msgid "Baltic (ISO-8859-4)" +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" msgstr "" -#: ../src/common/fontmap.cpp:97 -msgid "Baltic II (ISO-8859-10)" +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" msgstr "" -#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2486 +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 #, c-format msgid "Bitmap resource specification %s not found." msgstr "" @@ -335,11 +454,35 @@ msgstr "" msgid "Bottom margin (mm):" msgstr "" -#: ../src/generic/logg.cpp:433 +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "" + +#: ../src/generic/logg.cpp:475 msgid "C&lear" msgstr "" -#: ../src/msw/thread.cpp:222 +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 msgid "Can not create event object." msgstr "" @@ -347,139 +490,138 @@ msgstr "" msgid "Can not create mutex" msgstr "" -#: ../src/common/filefn.cpp:1279 ../src/msw/dir.cpp:294 +#: ../src/mac/thread.cpp:92 +msgid "Can not create mutex." +msgstr "" + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 #: ../src/unix/dir.cpp:214 #, c-format msgid "Can not enumerate files in directory '%s'" msgstr "" -#: ../src/msw/thread.cpp:520 +#: ../src/msw/thread.cpp:552 #, c-format msgid "Can not resume thread %x" msgstr "" -#: ../src/msw/thread.cpp:402 +#: ../src/msw/thread.cpp:433 msgid "Can not start thread: error writing TLS." msgstr "" -#: ../src/msw/thread.cpp:505 +#: ../src/msw/thread.cpp:537 #, c-format msgid "Can not suspend thread %x" msgstr "" -#: ../src/msw/thread.cpp:823 +#: ../src/msw/thread.cpp:871 msgid "Can not wait for thread termination" msgstr "" -#: ../src/common/docview.cpp:1872 +#: ../src/common/docview.cpp:1928 msgid "Can't &Undo " msgstr "" -#: ../src/common/image.cpp:713 +#: ../src/common/image.cpp:953 #, c-format msgid "Can't check image format of file '%s': file does not exist." msgstr "" -#: ../src/msw/registry.cpp:410 +#: ../src/msw/registry.cpp:418 #, c-format msgid "Can't close registry key '%s'" msgstr "" -#: ../src/msw/registry.cpp:486 +#: ../src/msw/registry.cpp:490 #, c-format msgid "Can't copy values of unsupported type %d." msgstr "" -#: ../src/msw/listctrl.cpp:207 +#: ../src/msw/listctrl.cpp:212 msgid "Can't create list control window, check that comctl32.dll is installed." msgstr "" -#: ../src/msw/registry.cpp:393 +#: ../src/msw/registry.cpp:399 #, c-format msgid "Can't create registry key '%s'" msgstr "" -#: ../src/msw/utilsexc.cpp:425 +#: ../src/msw/utilsexc.cpp:482 msgid "Can't create the inter-process read pipe" msgstr "" -#: ../src/msw/utilsexc.cpp:435 +#: ../src/msw/utilsexc.cpp:494 msgid "Can't create the inter-process write pipe" msgstr "" -#: ../src/msw/thread.cpp:487 +#: ../src/msw/thread.cpp:519 msgid "Can't create thread" msgstr "" -#: ../src/msw/window.cpp:2372 +#: ../src/msw/window.cpp:2433 #, c-format msgid "" "Can't create window of class %s!\n" "Possible Windows 3.x compatibility problem?" msgstr "" -#: ../src/msw/registry.cpp:656 +#: ../src/msw/registry.cpp:658 #, c-format msgid "Can't delete key '%s'" msgstr "" -#: ../src/msw/iniconf.cpp:463 +#: ../src/msw/iniconf.cpp:476 #, c-format msgid "Can't delete the INI file '%s'" msgstr "" -#: ../src/msw/registry.cpp:681 +#: ../src/msw/registry.cpp:683 #, c-format msgid "Can't delete value '%s' from key '%s'" msgstr "" -#: ../src/msw/registry.cpp:692 +#: ../src/msw/registry.cpp:694 #, c-format msgid "Can't delete value of key '%s'" msgstr "" -#: ../src/msw/registry.cpp:992 +#: ../src/msw/registry.cpp:1020 #, c-format msgid "Can't enumerate subkeys of key '%s'" msgstr "" -#: ../src/msw/registry.cpp:947 +#: ../src/msw/registry.cpp:975 #, c-format msgid "Can't enumerate values of key '%s'" msgstr "" -#: ../src/msw/utilsexc.cpp:400 -#, c-format -msgid "Can't execute command '%s'" -msgstr "" - #: ../src/common/ffile.cpp:234 #, c-format msgid "Can't find current position in file '%s'" msgstr "" -#: ../src/msw/window.cpp:2325 +#: ../src/msw/window.cpp:2383 msgid "" "Can't find dummy dialog template!\n" "Check resource include path for finding wx.rc." msgstr "" -#: ../src/common/object.cpp:321 ../src/common/object.cpp:342 +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 #, c-format msgid "Can't find the serialization object '%s' for the object '%s'." msgstr "" -#: ../src/msw/registry.cpp:342 +#: ../src/msw/registry.cpp:348 #, c-format msgid "Can't get info about registry key '%s'" msgstr "" -#: ../src/common/image.cpp:413 ../src/common/image.cpp:433 +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 #, c-format msgid "Can't load image from file '%s': file does not exist." msgstr "" -#: ../src/common/object.cpp:314 +#: ../src/common/object.cpp:307 msgid "Can't load wxSerial dynamic library." msgstr "" @@ -488,50 +630,50 @@ msgstr "" msgid "Can't open file '%s'" msgstr "" -#: ../src/msw/registry.cpp:368 +#: ../src/msw/registry.cpp:374 #, c-format msgid "Can't open registry key '%s'" msgstr "" -#: ../src/msw/registry.cpp:871 +#: ../src/msw/registry.cpp:899 #, c-format msgid "Can't read value of '%s'" msgstr "" -#: ../src/msw/registry.cpp:770 ../src/msw/registry.cpp:809 +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 #, c-format msgid "Can't read value of key '%s'" msgstr "" -#: ../src/generic/logg.cpp:522 +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 msgid "Can't save log contents to file." msgstr "" -#: ../src/msw/thread.cpp:453 +#: ../src/msw/thread.cpp:485 msgid "Can't set thread priority" msgstr "" -#: ../src/msw/registry.cpp:795 ../src/msw/registry.cpp:895 +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 #, c-format msgid "Can't set value of '%s'" msgstr "" -#: ../src/common/dlgcmn.cpp:146 ../src/common/prntbase.cpp:107 -#: ../src/generic/dcpsg.cpp:2192 ../src/generic/dirdlgg.cpp:413 -#: ../src/generic/filedlgg.cpp:911 ../src/generic/fontdlgg.cpp:257 -#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:182 -#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:174 +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 #: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 -#: ../src/html/helpfrm.cpp:887 ../src/motif/msgdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 msgid "Cancel" msgstr "" -#: ../src/msw/dialup.cpp:514 +#: ../src/msw/dialup.cpp:518 #, c-format msgid "Cannot find active dialup connection: %s" msgstr "" -#: ../src/msw/dialup.cpp:829 +#: ../src/msw/dialup.cpp:832 msgid "Cannot find the location of address book file" msgstr "" @@ -540,19 +682,19 @@ msgstr "" msgid "Cannot get priority range for scheduling policy %d." msgstr "" -#: ../src/unix/utilsunx.cpp:691 +#: ../src/unix/utilsunx.cpp:713 msgid "Cannot get the hostname" msgstr "" -#: ../src/unix/utilsunx.cpp:727 +#: ../src/unix/utilsunx.cpp:749 msgid "Cannot get the official hostname" msgstr "" -#: ../src/msw/dialup.cpp:922 +#: ../src/msw/dialup.cpp:925 msgid "Cannot hang up - no active dialup connection." msgstr "" -#: ../src/msw/app.cpp:220 +#: ../src/msw/app.cpp:252 msgid "Cannot initialize OLE" msgstr "" @@ -561,7 +703,7 @@ msgstr "" msgid "Cannot open HTML document: %s" msgstr "" -#: ../src/html/helpdata.cpp:542 +#: ../src/html/helpdata.cpp:657 #, c-format msgid "Cannot open HTML help book: %s" msgstr "" @@ -571,20 +713,24 @@ msgstr "" msgid "Cannot open URL '%s'" msgstr "" -#: ../src/html/helpdata.cpp:238 +#: ../src/html/helpdata.cpp:353 #, c-format msgid "Cannot open contents file: %s" msgstr "" -#: ../src/generic/dcpsg.cpp:1541 +#: ../src/generic/dcpsg.cpp:1584 msgid "Cannot open file for PostScript printing!" msgstr "" -#: ../src/html/helpdata.cpp:253 +#: ../src/html/helpdata.cpp:368 #, c-format msgid "Cannot open index file: %s" msgstr "" +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "" + #: ../src/unix/threadpsx.cpp:935 msgid "Cannot retrieve thread scheduling policy." msgstr "" @@ -593,15 +739,19 @@ msgstr "" msgid "Cannot start thread: error writing TLS" msgstr "" -#: ../src/html/helpfrm.cpp:393 +#: ../src/html/helpfrm.cpp:398 msgid "Case sensitive" msgstr "" -#: ../src/common/fontmap.cpp:89 -msgid "Central European (ISO-8859-2/Latin 2)" +#: ../src/common/fontmap.cpp:113 +msgid "Celtic (ISO-8859-14)" msgstr "" -#: ../src/msw/dialup.cpp:763 +#: ../src/common/fontmap.cpp:101 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/msw/dialup.cpp:767 msgid "Choose ISP to dial" msgstr "" @@ -609,29 +759,29 @@ msgstr "" msgid "Choose font" msgstr "" -#: ../src/generic/logg.cpp:433 +#: ../src/generic/logg.cpp:475 msgid "Clear the log contents" msgstr "" -#: ../src/common/prntbase.cpp:357 ../src/generic/progdlgg.cpp:309 +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 #: ../src/generic/proplist.cpp:518 msgid "Close" msgstr "" -#: ../src/generic/logg.cpp:435 +#: ../src/generic/logg.cpp:477 msgid "Close this window" msgstr "" -#: ../src/common/fileconf.cpp:743 +#: ../src/common/fileconf.cpp:759 #, c-format msgid "Config entry name cannot start with '%c'." msgstr "" -#: ../src/generic/filedlgg.cpp:1070 ../src/gtk/filedlg.cpp:75 +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 msgid "Confirm" msgstr "" -#: ../src/html/htmlwin.cpp:166 +#: ../src/html/htmlwin.cpp:165 msgid "Connecting..." msgstr "" @@ -640,8 +790,8 @@ msgstr "" msgid "Connection to wxHelp timed out in %d seconds" msgstr "" -#: ../src/generic/helpwxht.cpp:158 ../src/html/helpfrm.cpp:298 -#: ../src/html/helpfrm.cpp:307 +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 msgid "Contents" msgstr "" @@ -649,8 +799,8 @@ msgstr "" msgid "Copies:" msgstr "" -#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1791 -#: ../src/common/resource.cpp:1921 +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 #, c-format msgid "Could not find resource include file %s." msgstr "" @@ -659,34 +809,34 @@ msgstr "" msgid "Could not find tab for id" msgstr "" -#: ../src/msw/textctrl.cpp:1126 +#: ../src/msw/textctrl.cpp:1249 #, c-format msgid "Could not load Rich Edit DLL '%s'" msgstr "" -#: ../src/common/resource.cpp:789 +#: ../src/common/resource.cpp:796 #, c-format msgid "" "Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" " or provide #define (see manual for caveats)" msgstr "" -#: ../src/common/resource.cpp:1234 +#: ../src/common/resource.cpp:1245 #, c-format msgid "" "Could not resolve menu id '%s'. Use (non-zero) integer instead\n" "or provide #define (see manual for caveats)" msgstr "" -#: ../src/common/prntbase.cpp:709 +#: ../src/common/prntbase.cpp:711 msgid "Could not start document preview." msgstr "" -#: ../src/generic/printps.cpp:200 ../src/msw/printwin.cpp:240 +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 msgid "Could not start printing." msgstr "" -#: ../src/common/wincmn.cpp:762 +#: ../src/common/wincmn.cpp:784 msgid "Could not transfer data to window" msgstr "" @@ -695,34 +845,38 @@ msgid "Couldn't acquire a mutex lock" msgstr "" #: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 -#: ../src/msw/imaglist.cpp:145 ../src/msw/imaglist.cpp:167 -#: ../src/msw/imaglist.cpp:180 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 msgid "Couldn't add an image to the image list." msgstr "" +#: ../src/mac/thread.cpp:227 +msgid "Couldn't change the state of event object." +msgstr "" + #: ../src/msw/timer.cpp:96 msgid "Couldn't create a timer" msgstr "" -#: ../src/common/dynlib.cpp:268 +#: ../src/common/dynlib.cpp:309 #, c-format msgid "Couldn't find symbol '%s' in a dynamic library" msgstr "" -#: ../src/msw/thread.cpp:540 +#: ../src/msw/thread.cpp:578 msgid "Couldn't get the current thread pointer" msgstr "" -#: ../src/msw/utilsexc.cpp:594 +#: ../src/msw/utilsexc.cpp:712 #, c-format msgid "Couldn't launch DDE server '%s'." msgstr "" -#: ../src/common/imagpng.cpp:245 +#: ../src/common/imagpng.cpp:251 msgid "Couldn't load a PNG image - file is corrupted or not enough memory." msgstr "" -#: ../src/msw/ole/dataobj.cpp:139 +#: ../src/msw/ole/dataobj.cpp:151 #, c-format msgid "Couldn't register clipboard format '%s'." msgstr "" @@ -731,36 +885,44 @@ msgstr "" msgid "Couldn't release a mutex" msgstr "" -#: ../src/msw/listctrl.cpp:608 +#: ../src/msw/listctrl.cpp:616 #, c-format msgid "Couldn't retrieve information about list control item %d." msgstr "" -#: ../src/msw/thread.cpp:910 +#: ../src/msw/thread.cpp:958 msgid "Couldn't terminate thread" msgstr "" -#: ../src/generic/dirdlgg.cpp:500 +#: ../src/generic/dirdlgg.cpp:572 msgid "Create directory" msgstr "" -#: ../src/generic/filedlgg.cpp:878 +#: ../src/generic/filedlgg.cpp:883 msgid "Create new directory" msgstr "" -#: ../src/generic/filedlgg.cpp:885 +#: ../src/generic/filedlgg.cpp:890 msgid "Current directory:" msgstr "" -#: ../src/common/fontmap.cpp:92 -msgid "Cyrillic (Latin 5)" +#: ../src/common/fontmap.cpp:104 +msgid "Cyrillic (ISO-8859-5)" msgstr "" -#: ../src/msw/dde.cpp:587 +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "" + +#: ../src/msw/dde.cpp:597 msgid "DDE poke request failed" msgstr "" -#: ../src/generic/filedlgg.cpp:533 +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "" + +#: ../src/generic/filedlgg.cpp:535 msgid "Date" msgstr "" @@ -768,7 +930,7 @@ msgstr "" msgid "Decorative" msgstr "" -#: ../src/msw/dialup.cpp:350 +#: ../src/msw/dialup.cpp:354 msgid "" "Dial up functions are unavailable because the remote access service (RAS) is " "not installed on this machine. Please install it." @@ -778,111 +940,118 @@ msgstr "" msgid "Did you know..." msgstr "" -#: ../src/common/filefn.cpp:1092 +#: ../src/common/filefn.cpp:1085 #, c-format msgid "Directory '%s' couldn't be created" msgstr "" -#: ../src/generic/dirdlgg.cpp:467 +#: ../src/generic/dirdlgg.cpp:539 msgid "Directory does not exist" msgstr "" -#: ../src/html/helpfrm.cpp:361 +#: ../src/html/helpfrm.cpp:366 msgid "" "Display all index items that contain given substring. Search is case " "insensitive." msgstr "" -#: ../src/html/helpfrm.cpp:512 +#: ../src/html/helpfrm.cpp:535 msgid "Display options dialog" msgstr "" -#: ../src/common/docview.cpp:431 +#: ../src/common/docview.cpp:440 #, c-format msgid "Do you want to save changes to document %s?" msgstr "" -#: ../src/html/htmlwin.cpp:216 +#: ../src/html/htmlwin.cpp:215 msgid "Done" msgstr "" -#: ../src/generic/progdlgg.cpp:315 +#: ../src/generic/progdlgg.cpp:313 msgid "Done." msgstr "" -#: ../src/generic/progdlgg.cpp:156 +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "" + +#: ../src/generic/progdlgg.cpp:153 msgid "Elapsed time : " msgstr "" -#: ../src/generic/helphtml.cpp:310 +#: ../src/generic/helphtml.cpp:320 msgid "Entries found" msgstr "" -#: ../src/common/config.cpp:342 +#: ../src/common/config.cpp:349 #, c-format msgid "" "Environment variables expansion failed: missing '%c' at position %d in '%s'." msgstr "" -#: ../src/generic/dcpsg.cpp:1541 ../src/generic/dirdlgg.cpp:263 -#: ../src/generic/dirdlgg.cpp:281 ../src/generic/dirdlgg.cpp:292 -#: ../src/generic/dirdlgg.cpp:533 ../src/generic/filedlgg.cpp:620 -#: ../src/generic/filedlgg.cpp:712 ../src/generic/filedlgg.cpp:726 -#: ../src/generic/filedlgg.cpp:739 ../src/generic/filedlgg.cpp:1036 -#: ../src/generic/filedlgg.cpp:1085 ../src/generic/helpxlp.cpp:241 -#: ../src/generic/logg.cpp:201 ../src/gtk/filedlg.cpp:83 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 #: ../src/gtk/fontdlg.cpp:72 msgid "Error" msgstr "" -#: ../src/unix/utilsunx.cpp:803 ../src/unix/utilsunx.cpp:811 +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 msgid "Error " msgstr "" -#: ../src/generic/dirdlgg.cpp:480 +#: ../src/generic/dirdlgg.cpp:552 msgid "Error creating directory" msgstr "" -#: ../src/common/log.cpp:354 +#: ../src/common/log.cpp:362 msgid "Error: " msgstr "" -#: ../src/common/fontmap.cpp:90 +#: ../src/common/fontmap.cpp:102 msgid "Esperanto (ISO-8859-3)" msgstr "" -#: ../src/generic/progdlgg.cpp:163 +#: ../src/generic/progdlgg.cpp:160 msgid "Estimated time : " msgstr "" -#: ../src/generic/dirdlgg.cpp:213 +#: ../src/generic/dirdlgg.cpp:217 msgid "Etcetera" msgstr "" -#: ../src/msw/utilsexc.cpp:484 +#: ../src/msw/utilsexc.cpp:585 #, c-format msgid "Execution of command '%s' failed" msgstr "" +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "" + #: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 -#: ../src/common/resource.cpp:1830 ../src/common/resource.cpp:1960 -#: ../src/common/resource.cpp:3045 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 msgid "Expected '*' whilst parsing resource." msgstr "" #: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 -#: ../src/common/resource.cpp:1847 ../src/common/resource.cpp:1976 -#: ../src/common/resource.cpp:3062 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 msgid "Expected '=' whilst parsing resource." msgstr "" #: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 -#: ../src/common/resource.cpp:1816 ../src/common/resource.cpp:1946 -#: ../src/common/resource.cpp:3031 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 msgid "Expected 'char' whilst parsing resource." msgstr "" -#: ../src/msw/dialup.cpp:857 +#: ../src/msw/dialup.cpp:860 #, c-format msgid "Failed to %s dialup connection: %s" msgstr "" @@ -891,33 +1060,33 @@ msgstr "" msgid "Failed to close the clipboard." msgstr "" -#: ../src/msw/dialup.cpp:798 +#: ../src/msw/dialup.cpp:801 msgid "Failed to connect: missing username/password." msgstr "" -#: ../src/msw/dialup.cpp:743 +#: ../src/msw/dialup.cpp:747 msgid "Failed to connect: no ISP to dial." msgstr "" -#: ../src/msw/registry.cpp:590 +#: ../src/msw/registry.cpp:594 #, c-format msgid "Failed to copy registry value '%s'" msgstr "" -#: ../src/msw/registry.cpp:599 +#: ../src/msw/registry.cpp:603 #, c-format msgid "Failed to copy the contents of registry key '%s' to '%s'." msgstr "" -#: ../src/msw/dde.cpp:924 +#: ../src/msw/dde.cpp:934 msgid "Failed to create DDE string" msgstr "" -#: ../src/msw/mdi.cpp:402 +#: ../src/msw/mdi.cpp:428 msgid "Failed to create MDI parent frame." msgstr "" -#: ../src/msw/statbr95.cpp:123 +#: ../src/msw/statbr95.cpp:149 msgid "Failed to create a status bar." msgstr "" @@ -926,15 +1095,17 @@ msgstr "" msgid "Failed to create connection to server '%s' on topic '%s'" msgstr "" -#: ../src/msw/dialog.cpp:177 -msgid "Failed to create dialog." +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." msgstr "" -#: ../src/generic/dirdlgg.cpp:478 +#: ../src/generic/dirdlgg.cpp:550 msgid "Failed to create directory " msgstr "" -#: ../src/html/winpars.cpp:357 +#: ../src/html/winpars.cpp:374 #, c-format msgid "Failed to display HTML document in %s encoding" msgstr "" @@ -943,42 +1114,42 @@ msgstr "" msgid "Failed to empty the clipboard." msgstr "" -#: ../src/msw/dde.cpp:606 +#: ../src/msw/dde.cpp:616 msgid "Failed to establish an advise loop with DDE server" msgstr "" -#: ../src/msw/dialup.cpp:636 +#: ../src/msw/dialup.cpp:639 #, c-format msgid "Failed to establish dialup connection: %s" msgstr "" -#: ../src/unix/utilsunx.cpp:430 ../src/unix/utilsunx.cpp:454 +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 #, c-format msgid "Failed to execute '%s'\n" msgstr "" -#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2449 +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 #, c-format msgid "" "Failed to find XBM resource %s.\n" "Forgot to use wxResourceLoadBitmapData?" msgstr "" -#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2605 +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 #, c-format msgid "" "Failed to find XBM resource %s.\n" "Forgot to use wxResourceLoadIconData?" msgstr "" -#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2465 +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 #, c-format msgid "" "Failed to find XPM resource %s.\n" "Forgot to use wxResourceLoadBitmapData?" msgstr "" -#: ../src/msw/dialup.cpp:696 +#: ../src/msw/dialup.cpp:699 #, c-format msgid "Failed to get ISP names: %s" msgstr "" @@ -987,11 +1158,11 @@ msgstr "" msgid "Failed to get data from the clipboard" msgstr "" -#: ../src/common/timercmn.cpp:243 +#: ../src/common/timercmn.cpp:244 msgid "Failed to get the UTC system time." msgstr "" -#: ../src/common/timercmn.cpp:195 +#: ../src/common/timercmn.cpp:196 msgid "Failed to get the local system time" msgstr "" @@ -1001,7 +1172,7 @@ msgid "" "program" msgstr "" -#: ../src/common/dynlib.cpp:225 +#: ../src/common/dynlib.cpp:239 #, c-format msgid "Failed to load shared library '%s'" msgstr "" @@ -1014,7 +1185,7 @@ msgstr "" msgid "Failed to put data on the clipboard" msgstr "" -#: ../src/unix/utilsunx.cpp:523 +#: ../src/unix/utilsunx.cpp:543 msgid "Failed to redirect child process input/output" msgstr "" @@ -1023,17 +1194,17 @@ msgstr "" msgid "Failed to register DDE server '%s'" msgstr "" -#: ../src/common/fontmap.cpp:485 +#: ../src/common/fontmap.cpp:552 #, c-format msgid "Failed to remember the encoding for the charset '%s'." msgstr "" -#: ../src/msw/registry.cpp:436 +#: ../src/msw/registry.cpp:440 #, c-format msgid "Failed to rename registry value '%s' to '%s'." msgstr "" -#: ../src/msw/registry.cpp:536 +#: ../src/msw/registry.cpp:540 #, c-format msgid "Failed to rename the registry key '%s' to '%s'." msgstr "" @@ -1042,7 +1213,7 @@ msgstr "" msgid "Failed to retrieve data from the clipboard." msgstr "" -#: ../src/msw/dialup.cpp:458 +#: ../src/msw/dialup.cpp:463 msgid "Failed to retrieve text of RAS error message" msgstr "" @@ -1050,7 +1221,7 @@ msgstr "" msgid "Failed to retrieve the supported clipboard formats" msgstr "" -#: ../src/msw/dde.cpp:651 +#: ../src/msw/dde.cpp:661 msgid "Failed to send DDE advise notification" msgstr "" @@ -1063,7 +1234,7 @@ msgstr "" msgid "Failed to set thread priority %d." msgstr "" -#: ../src/common/fs_mem.cpp:165 +#: ../src/common/fs_mem.cpp:167 #, c-format msgid "Failed to store image '%s' to memory VFS!" msgstr "" @@ -1072,11 +1243,11 @@ msgstr "" msgid "Failed to terminate a thread." msgstr "" -#: ../src/msw/dde.cpp:625 +#: ../src/msw/dde.cpp:635 msgid "Failed to terminate the advise loop with DDE server" msgstr "" -#: ../src/msw/dialup.cpp:930 +#: ../src/msw/dialup.cpp:933 #, c-format msgid "Failed to terminate the dialup connection: %s" msgstr "" @@ -1086,23 +1257,19 @@ msgstr "" msgid "Failed to unregister DDE server '%s'" msgstr "" -#: ../src/msw/app.cpp:704 -msgid "Fatal Error" -msgstr "" - -#: ../src/generic/logg.cpp:329 +#: ../src/generic/logg.cpp:371 msgid "Fatal error" msgstr "" -#: ../src/common/log.cpp:347 +#: ../src/common/log.cpp:355 msgid "Fatal error: " msgstr "" -#: ../src/msw/app.cpp:1199 +#: ../src/msw/app.cpp:1274 msgid "Fatal error: exiting" msgstr "" -#: ../src/generic/filedlgg.cpp:1067 ../src/gtk/filedlg.cpp:72 +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 #, c-format msgid "File '%s' already exists, do you really want to overwrite it?" msgstr "" @@ -1111,50 +1278,55 @@ msgstr "" msgid "File couldn't be loaded." msgstr "" -#: ../src/common/docview.cpp:287 ../src/common/docview.cpp:323 +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 msgid "File error" msgstr "" -#: ../src/generic/dirdlgg.cpp:281 ../src/generic/filedlgg.cpp:726 +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 msgid "File name exists already." msgstr "" -#: ../src/msw/filedlg.cpp:280 +#: ../src/msw/filedlg.cpp:303 #, c-format msgid "Files (%s)|%s" msgstr "" -#: ../src/html/helpfrm.cpp:335 +#: ../src/html/helpfrm.cpp:340 msgid "Find" msgstr "" -#: ../src/html/helpfrm.cpp:866 +#: ../src/html/helpfrm.cpp:889 msgid "Fixed font:" msgstr "" +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "" + #: ../src/generic/fontdlgg.cpp:124 msgid "Font" msgstr "" -#: ../src/html/helpfrm.cpp:876 +#: ../src/html/helpfrm.cpp:899 msgid "Font size:" msgstr "" -#: ../src/unix/utilsunx.cpp:480 +#: ../src/unix/utilsunx.cpp:500 msgid "Fork failed" msgstr "" -#: ../src/common/dlgcmn.cpp:130 ../src/generic/helpwxht.cpp:157 +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 msgid "Forward" msgstr "" #: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 -#: ../src/common/resource.cpp:1799 ../src/common/resource.cpp:1929 -#: ../src/common/resource.cpp:3014 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 msgid "Found " msgstr "" -#: ../src/html/helpfrm.cpp:614 +#: ../src/html/helpfrm.cpp:637 #, c-format msgid "Found %i matches" msgstr "" @@ -1163,75 +1335,93 @@ msgstr "" msgid "From:" msgstr "" -#: ../src/html/helpfrm.cpp:478 +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "" + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "" + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "" + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "" + +#: ../src/html/helpfrm.cpp:501 msgid "Go back" msgstr "" -#: ../src/html/helpfrm.cpp:481 +#: ../src/html/helpfrm.cpp:504 msgid "Go forward" msgstr "" -#: ../src/html/helpfrm.cpp:486 +#: ../src/html/helpfrm.cpp:509 msgid "Go one level up in document hierarchy" msgstr "" -#: ../src/generic/filedlgg.cpp:870 +#: ../src/generic/filedlgg.cpp:875 msgid "Go to home directory" msgstr "" -#: ../src/generic/filedlgg.cpp:864 +#: ../src/generic/filedlgg.cpp:869 msgid "Go to parent directory" msgstr "" -#: ../src/common/fontmap.cpp:94 +#: ../src/common/fontmap.cpp:106 msgid "Greek (ISO-8859-7)" msgstr "" -#: ../src/html/htmlwin.cpp:251 +#: ../src/html/htmlwin.cpp:250 #, c-format msgid "HTML anchor %s does not exist." msgstr "" -#: ../src/common/fontmap.cpp:95 +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "" + +#: ../src/common/fontmap.cpp:107 msgid "Hebrew (ISO-8859-8)" msgstr "" -#: ../src/common/dlgcmn.cpp:142 ../src/generic/proplist.cpp:528 -#: ../src/html/helpfrm.cpp:205 +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 msgid "Help" msgstr "" -#: ../src/html/helpfrm.cpp:849 +#: ../src/html/helpfrm.cpp:872 msgid "Help Browser Options" msgstr "" -#: ../src/generic/helphtml.cpp:309 ../src/generic/helphtml.cpp:310 +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 msgid "Help Index" msgstr "" -#: ../src/html/helpfrm.cpp:1147 +#: ../src/html/helpfrm.cpp:1172 msgid "Help Printing" msgstr "" -#: ../src/generic/helpwxht.cpp:243 ../src/html/helpctrl.cpp:42 +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 #, c-format msgid "Help: %s" msgstr "" -#: ../src/common/fontmap.cpp:99 -msgid "ISO-8859-12" -msgstr "" - -#: ../src/common/fontmap.cpp:100 -msgid "ISO-8859-13" -msgstr "" - -#: ../src/common/fontmap.cpp:101 -msgid "ISO-8859-14" -msgstr "" - #: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 -#: ../src/common/resource.cpp:2639 ../src/common/resource.cpp:2650 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 #, c-format msgid "Icon resource specification %s not found." msgstr "" @@ -1240,37 +1430,37 @@ msgstr "" msgid "Ill-formed resource file syntax." msgstr "" -#: ../src/generic/dirdlgg.cpp:263 ../src/generic/filedlgg.cpp:712 +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 msgid "Illegal directory name." msgstr "" -#: ../src/generic/filedlgg.cpp:1036 +#: ../src/generic/filedlgg.cpp:1043 msgid "Illegal file specification." msgstr "" -#: ../src/msw/textctrl.cpp:215 +#: ../src/msw/textctrl.cpp:219 msgid "" "Impossible to create a rich edit control, using simple text control instead. " "Please reinstall riched32.dll" msgstr "" -#: ../src/unix/utilsunx.cpp:343 +#: ../src/unix/utilsunx.cpp:350 msgid "Impossible to get child process input" msgstr "" -#: ../src/html/helpdata.cpp:288 +#: ../src/html/helpdata.cpp:403 msgid "Incorrect version of HTML help book" msgstr "" -#: ../src/html/helpfrm.cpp:367 +#: ../src/html/helpfrm.cpp:372 msgid "Index" msgstr "" -#: ../src/generic/logg.cpp:209 -msgid "Information" +#: ../src/common/fontmap.cpp:111 +msgid "Indian (ISO-8859-12)" msgstr "" -#: ../src/common/imagtiff.cpp:136 +#: ../src/common/imagtiff.cpp:171 msgid "Invalid TIFF image index." msgstr "" @@ -1278,38 +1468,58 @@ msgstr "" msgid "Italic" msgstr "" -#: ../src/common/imagjpeg.cpp:195 +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "" + +#: ../src/common/imagjpeg.cpp:202 msgid "JPEG: Couldn't load - file is probably corrupted." msgstr "" -#: ../src/common/imagjpeg.cpp:312 +#: ../src/common/imagjpeg.cpp:315 msgid "JPEG: Couldn't save image." msgstr "" -#: ../src/common/fontmap.cpp:103 +#: ../src/common/fontmap.cpp:115 msgid "KOI8-R" msgstr "" -#: ../src/generic/dcpsg.cpp:2183 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 #: ../src/generic/prntdlgg.cpp:637 msgid "Landscape" msgstr "" +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "" + #: ../src/generic/prntdlgg.cpp:649 msgid "Left margin (mm):" msgstr "" +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "" + #: ../src/generic/fontdlgg.cpp:216 msgid "Light" msgstr "" -#: ../src/generic/filedlgg.cpp:1263 ../src/gtk/filedlg.cpp:241 -#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:438 +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 #, c-format msgid "Load %s file" msgstr "" -#: ../src/html/htmlwin.cpp:187 +#: ../src/html/htmlwin.cpp:186 msgid "Loading : " msgstr "" @@ -1321,30 +1531,26 @@ msgstr "" msgid "Loading Grey Raw PNM image is not yet implemented." msgstr "" -#: ../src/generic/logg.cpp:525 +#: ../src/generic/logg.cpp:538 #, c-format msgid "Log saved to the file '%s'." msgstr "" -#: ../src/gtk/mdi.cpp:420 +#: ../src/gtk/mdi.cpp:435 msgid "MDI child" msgstr "" -#: ../src/unix/mimetype.cpp:1540 +#: ../src/unix/mimetype.cpp:1597 #, c-format msgid "Mailcap file %s, line %d: incomplete entry ignored." msgstr "" -#: ../src/common/fs_mem.cpp:142 +#: ../src/common/fs_mem.cpp:144 #, c-format msgid "Memory VFS already contains file '%s'!" msgstr "" -#: ../src/generic/logg.cpp:763 -msgid "Message" -msgstr "" - -#: ../src/unix/mimetype.cpp:1261 +#: ../src/unix/mimetype.cpp:1295 #, c-format msgid "Mime.types file %s, line %d: unterminated quoted string." msgstr "" @@ -1353,114 +1559,135 @@ msgstr "" msgid "Modern" msgstr "" -#: ../src/common/dlgcmn.cpp:139 +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "" + +#: ../src/common/dlgcmn.cpp:141 msgid "More..." msgstr "" -#: ../src/generic/dirdlgg.cpp:209 +#: ../src/generic/dirdlgg.cpp:213 msgid "Mounted Devices" msgstr "" -#: ../src/generic/dirdlgg.cpp:204 +#: ../src/generic/dirdlgg.cpp:208 msgid "My Harddisk" msgstr "" -#: ../src/generic/dirdlgg.cpp:208 +#: ../src/generic/dirdlgg.cpp:212 msgid "My Home" msgstr "" -#: ../src/generic/filedlgg.cpp:531 +#: ../src/generic/filedlgg.cpp:533 msgid "Name" msgstr "" -#: ../src/generic/dirdlgg.cpp:415 +#: ../src/generic/dirdlgg.cpp:427 msgid "New..." msgstr "" -#: ../src/generic/filedlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:610 msgid "NewName" msgstr "" -#: ../src/html/helpfrm.cpp:492 +#: ../src/html/helpfrm.cpp:515 msgid "Next page" msgstr "" -#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:119 +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 #: ../src/motif/msgdlg.cpp:178 msgid "No" msgstr "" #: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 -#: ../src/common/resource.cpp:2455 ../src/common/resource.cpp:2611 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 msgid "No XBM facility available!" msgstr "" -#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2471 +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 msgid "No XPM facility available!" msgstr "" -#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2633 +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 msgid "No XPM icon facility available!" msgstr "" -#: ../src/generic/helphtml.cpp:304 +#: ../src/generic/helphtml.cpp:314 msgid "No entries found." msgstr "" -#: ../src/common/image.cpp:518 +#: ../src/common/fontmap.cpp:716 +#, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" + +#: ../src/common/image.cpp:758 msgid "No handler found for image type." msgstr "" -#: ../src/common/image.cpp:526 ../src/common/image.cpp:560 +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 #, c-format msgid "No image handler for type %d defined." msgstr "" -#: ../src/common/image.cpp:544 ../src/common/image.cpp:576 +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 #, c-format msgid "No image handler for type %s defined." msgstr "" -#: ../src/html/helpfrm.cpp:605 +#: ../src/html/helpfrm.cpp:628 msgid "No matching page found yet" msgstr "" +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "" + #: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 msgid "Normal" msgstr "" -#: ../src/html/helpfrm.cpp:858 +#: ../src/html/helpfrm.cpp:881 msgid "Normal font:" msgstr "" -#: ../src/common/dlgcmn.cpp:125 ../src/generic/dcpsg.cpp:2191 -#: ../src/generic/dirdlgg.cpp:411 ../src/generic/filedlgg.cpp:902 -#: ../src/generic/fontdlgg.cpp:256 ../src/generic/prntdlgg.cpp:467 -#: ../src/generic/proplist.cpp:511 ../src/gtk/filedlg.cpp:158 -#: ../src/gtk/fontdlg.cpp:172 ../src/html/helpfrm.cpp:886 +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 msgid "OK" msgstr "" -#: ../src/html/helpfrm.cpp:500 ../src/html/helpfrm.cpp:1155 +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 msgid "Open HTML document" msgstr "" -#: ../src/generic/dirdlgg.cpp:292 ../src/generic/dirdlgg.cpp:533 -#: ../src/generic/filedlgg.cpp:620 ../src/generic/filedlgg.cpp:739 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 msgid "Operation not permitted." msgstr "" -#: ../src/common/cmdline.cpp:592 +#: ../src/common/cmdline.cpp:590 #, c-format msgid "Option '%s' requires a value, '=' expected." msgstr "" -#: ../src/common/cmdline.cpp:612 +#: ../src/common/cmdline.cpp:610 #, c-format msgid "Option '%s' requires a value." msgstr "" -#: ../src/common/cmdline.cpp:668 +#: ../src/common/cmdline.cpp:671 #, c-format msgid "Option '%s': '%s' cannot be converted to a date." msgstr "" @@ -1473,10 +1700,30 @@ msgstr "" msgid "Orientation" msgstr "" +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "" + #: ../src/common/imagpcx.cpp:434 msgid "PCX: this is not a PCX file." msgstr "" +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "" + #: ../src/common/imagpnm.cpp:96 msgid "PNM: Couldn't allocate memory." msgstr "" @@ -1489,12 +1736,12 @@ msgstr "" msgid "PNM: File seems truncated." msgstr "" -#: ../src/common/prntbase.cpp:729 +#: ../src/common/prntbase.cpp:731 #, c-format msgid "Page %d" msgstr "" -#: ../src/common/prntbase.cpp:727 +#: ../src/common/prntbase.cpp:729 #, c-format msgid "Page %d of %d" msgstr "" @@ -1517,11 +1764,11 @@ msgstr "" msgid "Paper size" msgstr "" -#: ../src/generic/filedlgg.cpp:535 +#: ../src/generic/filedlgg.cpp:537 msgid "Permissions" msgstr "" -#: ../src/unix/utilsunx.cpp:429 ../src/unix/utilsunx.cpp:453 +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 msgid "Pipe creation failed" msgstr "" @@ -1529,24 +1776,24 @@ msgstr "" msgid "Please choose a valid font." msgstr "" -#: ../src/generic/filedlgg.cpp:1085 ../src/gtk/filedlg.cpp:83 +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 msgid "Please choose an existing file." msgstr "" -#: ../src/msw/dialup.cpp:764 +#: ../src/msw/dialup.cpp:768 msgid "Please choose which ISP do you want to connect to" msgstr "" -#: ../src/common/prntbase.cpp:105 +#: ../src/common/prntbase.cpp:107 msgid "Please wait..." msgstr "" -#: ../src/generic/dcpsg.cpp:2182 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 #: ../src/generic/prntdlgg.cpp:636 msgid "Portrait" msgstr "" -#: ../src/generic/dcpsg.cpp:377 +#: ../src/generic/dcpsg.cpp:391 msgid "PostScript" msgstr "" @@ -1554,23 +1801,19 @@ msgstr "" msgid "PostScript file" msgstr "" -#: ../src/generic/dcpsg.cpp:2224 +#: ../src/generic/dcpsg.cpp:2303 msgid "PostScript:" msgstr "" -#: ../src/generic/dcpsg.cpp:2187 +#: ../src/generic/dcpsg.cpp:2266 msgid "Preview Only" msgstr "" -#: ../src/html/helpfrm.cpp:880 +#: ../src/html/helpfrm.cpp:903 msgid "Preview:" msgstr "" -#: ../src/html/htmprint.cpp:479 -msgid "Previewing" -msgstr "" - -#: ../src/html/helpfrm.cpp:489 +#: ../src/html/helpfrm.cpp:512 msgid "Previous page" msgstr "" @@ -1578,15 +1821,11 @@ msgstr "" msgid "Print" msgstr "" -#: ../src/generic/printps.cpp:200 -msgid "Print Error" -msgstr "" - -#: ../src/common/docview.cpp:884 +#: ../src/common/docview.cpp:897 msgid "Print Preview" msgstr "" -#: ../src/common/prntbase.cpp:685 ../src/common/prntbase.cpp:709 +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 msgid "Print Preview Failure" msgstr "" @@ -1606,27 +1845,27 @@ msgstr "" msgid "Print spooling" msgstr "" -#: ../src/html/helpfrm.cpp:506 +#: ../src/html/helpfrm.cpp:529 msgid "Print this page" msgstr "" -#: ../src/generic/dcpsg.cpp:2186 ../src/generic/prntdlgg.cpp:150 +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 msgid "Print to File" msgstr "" -#: ../src/common/prntbase.cpp:364 +#: ../src/common/prntbase.cpp:366 msgid "Print..." msgstr "" -#: ../src/generic/dcpsg.cpp:2197 +#: ../src/generic/dcpsg.cpp:2276 msgid "Printer Command: " msgstr "" -#: ../src/generic/dcpsg.cpp:2202 +#: ../src/generic/dcpsg.cpp:2281 msgid "Printer Options: " msgstr "" -#: ../src/generic/dcpsg.cpp:346 +#: ../src/generic/dcpsg.cpp:360 msgid "Printer Settings" msgstr "" @@ -1646,29 +1885,32 @@ msgstr "" msgid "Printer..." msgstr "" -#: ../src/common/prntbase.cpp:104 ../src/common/prntbase.cpp:146 -#: ../src/html/htmprint.cpp:500 +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 msgid "Printing" msgstr "" -#: ../src/common/prntbase.cpp:118 +#: ../src/common/prntbase.cpp:120 msgid "Printing Error" msgstr "" -#: ../src/generic/printps.cpp:218 +#: ../src/generic/printps.cpp:232 #, c-format msgid "Printing page %d..." msgstr "" -#: ../src/generic/printps.cpp:185 +#: ../src/generic/printps.cpp:192 msgid "Printing..." msgstr "" -#: ../src/common/log.cpp:348 +#: ../src/common/log.cpp:356 msgid "Program aborted." msgstr "" -#: ../src/generic/logg.cpp:477 +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "" + +#: ../src/generic/logg.cpp:1023 msgid "Question" msgstr "" @@ -1677,17 +1919,17 @@ msgstr "" msgid "Read error on file '%s'" msgstr "" -#: ../src/msw/registry.cpp:528 +#: ../src/msw/registry.cpp:532 #, c-format msgid "Registry key '%s' already exists." msgstr "" -#: ../src/msw/registry.cpp:497 +#: ../src/msw/registry.cpp:501 #, c-format msgid "Registry key '%s' does not exist, cannot rename it." msgstr "" -#: ../src/msw/registry.cpp:624 +#: ../src/msw/registry.cpp:628 #, c-format msgid "" "Registry key '%s' is needed for normal system operation,\n" @@ -1695,24 +1937,24 @@ msgid "" "operation aborted." msgstr "" -#: ../src/msw/registry.cpp:428 +#: ../src/msw/registry.cpp:432 #, c-format msgid "Registry value '%s' already exists." msgstr "" -#: ../src/generic/helphtml.cpp:309 +#: ../src/generic/helphtml.cpp:319 msgid "Relevant entries:" msgstr "" -#: ../src/generic/progdlgg.cpp:170 +#: ../src/generic/progdlgg.cpp:167 msgid "Remaining time : " msgstr "" -#: ../src/html/helpfrm.cpp:264 +#: ../src/html/helpfrm.cpp:269 msgid "Remove current page from bookmarks" msgstr "" -#: ../src/msw/filedlg.cpp:400 +#: ../src/msw/filedlg.cpp:445 #, c-format msgid "Replace file '%s'?" msgstr "" @@ -1725,17 +1967,17 @@ msgstr "" msgid "Roman" msgstr "" -#: ../src/generic/filedlgg.cpp:1279 ../src/gtk/filedlg.cpp:257 -#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:439 +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 #, c-format msgid "Save %s file" msgstr "" -#: ../src/common/docview.cpp:240 +#: ../src/common/docview.cpp:249 msgid "Save as" msgstr "" -#: ../src/generic/logg.cpp:431 +#: ../src/generic/logg.cpp:473 msgid "Save log contents to file" msgstr "" @@ -1743,26 +1985,26 @@ msgstr "" msgid "Script" msgstr "" -#: ../src/generic/helpwxht.cpp:160 ../src/html/helpfrm.cpp:409 -#: ../src/html/helpfrm.cpp:429 +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 msgid "Search" msgstr "" -#: ../src/html/helpfrm.cpp:411 +#: ../src/html/helpfrm.cpp:416 msgid "" "Search contents of help book(s) for all occurences of the text you typed " "above" msgstr "" -#: ../src/html/helpfrm.cpp:712 +#: ../src/html/helpfrm.cpp:735 msgid "Search in all books" msgstr "" -#: ../src/html/helpfrm.cpp:605 +#: ../src/html/helpfrm.cpp:628 msgid "Searching..." msgstr "" -#: ../src/generic/dirdlgg.cpp:187 +#: ../src/generic/dirdlgg.cpp:191 msgid "Sections" msgstr "" @@ -1771,23 +2013,28 @@ msgstr "" msgid "Seek error on file '%s'" msgstr "" -#: ../src/common/docview.cpp:1414 +#: ../src/common/docview.cpp:1469 msgid "Select a document template" msgstr "" -#: ../src/common/docview.cpp:1437 +#: ../src/common/docview.cpp:1494 msgid "Select a document view" msgstr "" -#: ../src/common/docview.cpp:1332 ../src/common/docview.cpp:1369 +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 msgid "Select a file" msgstr "" -#: ../src/generic/dcpsg.cpp:2185 +#: ../src/generic/dcpsg.cpp:2264 msgid "Send to Printer" msgstr "" -#: ../src/common/dlgcmn.cpp:136 +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "" + +#: ../src/common/dlgcmn.cpp:138 msgid "Setup" msgstr "" @@ -1795,27 +2042,27 @@ msgstr "" msgid "Setup..." msgstr "" -#: ../src/msw/dialup.cpp:535 +#: ../src/msw/dialup.cpp:539 msgid "Several active dialup connections found, choosing one randomly." msgstr "" -#: ../src/html/helpfrm.cpp:326 +#: ../src/html/helpfrm.cpp:331 msgid "Show all" msgstr "" -#: ../src/html/helpfrm.cpp:360 +#: ../src/html/helpfrm.cpp:365 msgid "Show all items in index" msgstr "" -#: ../src/generic/filedlgg.cpp:908 +#: ../src/generic/filedlgg.cpp:913 msgid "Show hidden files" msgstr "" -#: ../src/html/helpfrm.cpp:473 +#: ../src/html/helpfrm.cpp:496 msgid "Show/hide navigation panel" msgstr "" -#: ../src/generic/filedlgg.cpp:532 +#: ../src/generic/filedlgg.cpp:534 msgid "Size" msgstr "" @@ -1823,23 +2070,28 @@ msgstr "" msgid "Slant" msgstr "" -#: ../src/common/docview.cpp:297 +#: ../src/common/docview.cpp:306 msgid "Sorry, could not open this file for saving." msgstr "" -#: ../src/common/docview.cpp:333 ../src/common/docview.cpp:345 +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 msgid "Sorry, could not open this file." msgstr "" -#: ../src/common/docview.cpp:304 +#: ../src/common/docview.cpp:313 msgid "Sorry, could not save this file." msgstr "" -#: ../src/common/prntbase.cpp:685 +#: ../src/common/prntbase.cpp:687 msgid "Sorry, not enough memory to create a preview." msgstr "" -#: ../src/generic/logg.cpp:585 +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "" + +#: ../src/generic/logg.cpp:598 msgid "Status: " msgstr "" @@ -1847,39 +2099,52 @@ msgstr "" msgid "Swiss" msgstr "" -#: ../src/common/imagtiff.cpp:157 ../src/common/imagtiff.cpp:166 +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 msgid "TIFF: Couldn't allocate memory." msgstr "" -#: ../src/common/imagtiff.cpp:128 +#: ../src/common/imagtiff.cpp:163 msgid "TIFF: Error loading image." msgstr "" -#: ../src/common/imagtiff.cpp:176 +#: ../src/common/imagtiff.cpp:214 msgid "TIFF: Error reading image." msgstr "" +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "" + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "" + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "" + #: ../src/generic/fontdlgg.cpp:211 msgid "Teletype" msgstr "" -#: ../src/common/docview.cpp:1414 +#: ../src/common/docview.cpp:1469 msgid "Templates" msgstr "" -#: ../src/generic/dirdlgg.cpp:214 +#: ../src/generic/dirdlgg.cpp:218 msgid "Temporary" msgstr "" -#: ../src/common/fontmap.cpp:98 +#: ../src/common/fontmap.cpp:110 msgid "Thai (ISO-8859-11)" msgstr "" -#: ../src/generic/dirdlgg.cpp:206 +#: ../src/generic/dirdlgg.cpp:210 msgid "The Computer" msgstr "" -#: ../src/common/fontmap.cpp:442 +#: ../src/common/fontmap.cpp:511 #, c-format msgid "" "The charset '%s' is unknown. You may select\n" @@ -1887,24 +2152,16 @@ msgid "" "[Cancel] if it cannot be replaced" msgstr "" -#: ../src/msw/ole/dataobj.cpp:157 +#: ../src/msw/ole/dataobj.cpp:169 #, c-format msgid "The clipboard format '%d' doesn't exist." msgstr "" -#: ../src/generic/dirdlgg.cpp:464 +#: ../src/generic/dirdlgg.cpp:536 msgid "The directory " msgstr "" -#: ../src/common/fontmap.cpp:602 -#, c-format -msgid "" -"The encoding '%s' is unknown.\n" -"Would you like to select a font to be used for this encoding\n" -"(otherwise the text in this encoding will not be shown correctly)?" -msgstr "" - -#: ../src/common/docview.cpp:1619 +#: ../src/common/docview.cpp:1676 #, c-format msgid "" "The file '%s' doesn't exist and couldn't be opened.\n" @@ -1925,36 +2182,24 @@ msgstr "" msgid "The value for the option '%s' must be specified." msgstr "" -#: ../src/msw/dialup.cpp:412 +#: ../src/msw/dialup.cpp:415 #, c-format msgid "" -"The version of remote access service (RAS) installed on this machine is too " -"old, please upgrade (the following required function is missing: %s)." +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." msgstr "" -#: ../src/html/htmprint.cpp:479 -msgid "" -"There was a problem previewing.\n" -"Perhaps your current printer is not set correctly?" -msgstr "" - -#: ../src/html/htmprint.cpp:500 -msgid "" -"There was a problem printing.\n" -"Perhaps your current printer is not set correctly?" -msgstr "" - -#: ../src/msw/thread.cpp:1037 +#: ../src/msw/thread.cpp:1083 msgid "" "Thread module initialization failed: can not store value in thread local " "storage" msgstr "" -#: ../src/unix/threadpsx.cpp:1440 +#: ../src/unix/threadpsx.cpp:1441 msgid "Thread module initialization failed: failed to create thread key" msgstr "" -#: ../src/msw/thread.cpp:1023 +#: ../src/msw/thread.cpp:1071 msgid "" "Thread module initialization failed: impossible to allocate index in thread " "local storage" @@ -1964,7 +2209,15 @@ msgstr "" msgid "Thread priority setting is ignored." msgstr "" -#: ../src/generic/filedlgg.cpp:534 ../src/generic/logg.cpp:764 +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 msgid "Time" msgstr "" @@ -1984,7 +2237,7 @@ msgstr "" msgid "Top margin (mm):" msgstr "" -#: ../src/common/fs_mem.cpp:200 +#: ../src/common/fs_mem.cpp:202 #, c-format msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" msgstr "" @@ -1993,11 +2246,15 @@ msgstr "" msgid "Trying to solve a NULL hostname: giving up" msgstr "" -#: ../src/common/fontmap.cpp:96 +#: ../src/common/fontmap.cpp:108 msgid "Turkish (ISO-8859-9)" msgstr "" -#: ../src/html/htmlwin.cpp:175 +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "" + +#: ../src/html/htmlwin.cpp:174 #, c-format msgid "Unable to open requested HTML document: %s" msgstr "" @@ -2010,12 +2267,12 @@ msgstr "" #: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 #: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 #: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 -#: ../src/common/resource.cpp:1809 ../src/common/resource.cpp:1823 -#: ../src/common/resource.cpp:1840 ../src/common/resource.cpp:1854 -#: ../src/common/resource.cpp:1939 ../src/common/resource.cpp:1953 -#: ../src/common/resource.cpp:1969 ../src/common/resource.cpp:1983 -#: ../src/common/resource.cpp:3024 ../src/common/resource.cpp:3038 -#: ../src/common/resource.cpp:3055 ../src/common/resource.cpp:3069 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 msgid "Unexpected end of file whilst parsing resource." msgstr "" @@ -2024,27 +2281,27 @@ msgstr "" msgid "Unexpected parameter '%s'" msgstr "" -#: ../src/msw/dde.cpp:1020 +#: ../src/msw/dde.cpp:1030 #, c-format msgid "Unknown DDE error %08x" msgstr "" -#: ../src/common/fontmap.cpp:306 +#: ../src/common/fontmap.cpp:332 #, c-format msgid "Unknown encoding (%d)" msgstr "" -#: ../src/unix/mimetype.cpp:1303 +#: ../src/unix/mimetype.cpp:1338 #, c-format msgid "Unknown field in file %s, line %d: '%s'." msgstr "" -#: ../src/common/cmdline.cpp:498 +#: ../src/common/cmdline.cpp:496 #, c-format msgid "Unknown long option '%s'" msgstr "" -#: ../src/common/cmdline.cpp:520 +#: ../src/common/cmdline.cpp:518 #, c-format msgid "Unknown option '%s'" msgstr "" @@ -2054,34 +2311,30 @@ msgstr "" msgid "Unmatched '{' in an entry for mime type %s." msgstr "" -#: ../src/common/docview.cpp:1867 ../src/common/docview.cpp:1882 -#: ../src/common/docview.cpp:1909 +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 msgid "Unnamed command" msgstr "" -#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2327 +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 #, c-format msgid "Unrecognized style %s whilst parsing resource." msgstr "" -#: ../src/msw/app.cpp:702 -msgid "Unrecoverable program error detected: the application will terminate." -msgstr "" - #: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 msgid "Unsupported clipboard format." msgstr "" -#: ../src/common/cmdline.cpp:793 +#: ../src/common/cmdline.cpp:797 #, c-format msgid "Usage: %s" msgstr "" -#: ../src/generic/dirdlgg.cpp:210 +#: ../src/generic/dirdlgg.cpp:215 msgid "User" msgstr "" -#: ../src/generic/dirdlgg.cpp:211 +#: ../src/generic/dirdlgg.cpp:214 msgid "User Local" msgstr "" @@ -2089,135 +2342,142 @@ msgstr "" msgid "Validation conflict" msgstr "" -#: ../src/generic/dirdlgg.cpp:212 +#: ../src/generic/dirdlgg.cpp:216 msgid "Variables" msgstr "" -#: ../src/generic/filedlgg.cpp:856 +#: ../src/generic/filedlgg.cpp:861 msgid "View files as a detailed view" msgstr "" -#: ../src/generic/filedlgg.cpp:850 +#: ../src/generic/filedlgg.cpp:855 msgid "View files as a list view" msgstr "" -#: ../src/common/docview.cpp:1437 +#: ../src/common/docview.cpp:1494 msgid "Views" msgstr "" -#: ../src/unix/utilsunx.cpp:263 ../src/unix/utilsunx.cpp:599 +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 msgid "Waiting for subprocess termination failed" msgstr "" -#: ../src/common/docview.cpp:428 ../src/common/resource.cpp:121 -#: ../src/generic/logg.cpp:205 +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 msgid "Warning" msgstr "" -#: ../src/common/log.cpp:358 +#: ../src/common/log.cpp:366 msgid "Warning: " msgstr "" -#: ../src/html/htmlpars.cpp:179 +#: ../src/html/htmlpars.cpp:177 msgid "Warning: attempt to remove HTML tag handler from empty stack." msgstr "" -#: ../src/common/fontmap.cpp:88 -msgid "West European (ISO-8859-1/Latin 1)" +#: ../src/common/fontmap.cpp:100 +msgid "Western European (ISO-8859-1)" msgstr "" -#: ../src/common/fontmap.cpp:102 -msgid "West European new (ISO-8859-15/Latin 0)" +#: ../src/common/fontmap.cpp:114 +msgid "Western European with Euro (ISO-8859-15)" msgstr "" -#: ../src/html/helpfrm.cpp:401 +#: ../src/html/helpfrm.cpp:406 msgid "Whole words only" msgstr "" -#: ../src/msw/utils.cpp:497 +#: ../src/msw/utils.cpp:547 msgid "Win32s on Windows 3.1" msgstr "" -#: ../src/msw/utils.cpp:529 +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "" + +#: ../src/msw/utils.cpp:585 msgid "Windows 3.1" msgstr "" -#: ../src/msw/utils.cpp:501 +#: ../src/msw/utils.cpp:551 #, c-format msgid "Windows 9%c" msgstr "" -#: ../src/common/fontmap.cpp:110 +#: ../src/common/fontmap.cpp:122 msgid "Windows Arabic (CP 1256)" msgstr "" -#: ../src/common/fontmap.cpp:111 +#: ../src/common/fontmap.cpp:123 msgid "Windows Baltic (CP 1257)" msgstr "" -#: ../src/common/fontmap.cpp:105 +#: ../src/common/fontmap.cpp:116 +msgid "Windows Central European (CP 1250)" +msgstr "" + +#: ../src/common/fontmap.cpp:117 msgid "Windows Cyrillic (CP 1251)" msgstr "" -#: ../src/common/fontmap.cpp:107 +#: ../src/common/fontmap.cpp:119 msgid "Windows Greek (CP 1253)" msgstr "" -#: ../src/common/fontmap.cpp:109 +#: ../src/common/fontmap.cpp:121 msgid "Windows Hebrew (CP 1255)" msgstr "" -#: ../src/common/fontmap.cpp:106 -msgid "Windows Latin 1 (CP 1252)" -msgstr "" - -#: ../src/common/fontmap.cpp:104 -msgid "Windows Latin 2 (CP 1250)" -msgstr "" - -#: ../src/common/fontmap.cpp:108 +#: ../src/common/fontmap.cpp:120 msgid "Windows Turkish (CP 1254)" msgstr "" +#: ../src/common/fontmap.cpp:118 +msgid "Windows Western European (CP 1252)" +msgstr "" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "" + #: ../src/common/ffile.cpp:168 #, c-format msgid "Write error on file '%s'" msgstr "" -#: ../src/generic/dcpsg.cpp:2242 +#: ../src/generic/dcpsg.cpp:2321 msgid "X Scaling" msgstr "" -#: ../src/generic/dcpsg.cpp:2251 +#: ../src/generic/dcpsg.cpp:2330 msgid "X Translation" msgstr "" -#: ../src/generic/dcpsg.cpp:2246 +#: ../src/generic/dcpsg.cpp:2325 msgid "Y Scaling" msgstr "" -#: ../src/generic/dcpsg.cpp:2255 +#: ../src/generic/dcpsg.cpp:2334 msgid "Y Translation" msgstr "" -#: ../src/common/dlgcmn.cpp:107 ../src/common/dlgcmn.cpp:114 +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 #: ../src/motif/msgdlg.cpp:178 msgid "Yes" msgstr "" -#: ../src/generic/dirdlgg.cpp:499 +#: ../src/generic/dirdlgg.cpp:571 msgid "You cannot add a new directory to this section." msgstr "" -#: ../src/common/docview.cpp:1978 +#: ../src/common/docview.cpp:2034 msgid "[EMPTY]" msgstr "" -#: ../src/msw/dde.cpp:987 +#: ../src/msw/dde.cpp:997 msgid "a DDEML application has created a prolonged race condition." msgstr "" -#: ../src/msw/dde.cpp:975 +#: ../src/msw/dde.cpp:985 msgid "" "a DDEML function was called without first calling the DdeInitialize " "function,\n" @@ -2225,54 +2485,54 @@ msgid "" "was passed to a DDEML function." msgstr "" -#: ../src/msw/dde.cpp:993 +#: ../src/msw/dde.cpp:1003 msgid "a client's attempt to establish a conversation has failed." msgstr "" -#: ../src/msw/dde.cpp:990 +#: ../src/msw/dde.cpp:1000 msgid "a memory allocation failed." msgstr "" -#: ../src/msw/dde.cpp:984 +#: ../src/msw/dde.cpp:994 msgid "a parameter failed to be validated by the DDEML." msgstr "" -#: ../src/msw/dde.cpp:966 +#: ../src/msw/dde.cpp:976 msgid "a request for a synchronous advise transaction has timed out." msgstr "" -#: ../src/msw/dde.cpp:972 +#: ../src/msw/dde.cpp:982 msgid "a request for a synchronous data transaction has timed out." msgstr "" -#: ../src/msw/dde.cpp:981 +#: ../src/msw/dde.cpp:991 msgid "a request for a synchronous execute transaction has timed out." msgstr "" -#: ../src/msw/dde.cpp:999 +#: ../src/msw/dde.cpp:1009 msgid "a request for a synchronous poke transaction has timed out." msgstr "" -#: ../src/msw/dde.cpp:1014 +#: ../src/msw/dde.cpp:1024 msgid "a request to end an advise transaction has timed out." msgstr "" -#: ../src/msw/dde.cpp:1008 +#: ../src/msw/dde.cpp:1018 msgid "" "a server-side transaction was attempted on a conversation\n" "that was terminated by the client, or the server\n" "terminated before completing a transaction." msgstr "" -#: ../src/msw/dde.cpp:996 +#: ../src/msw/dde.cpp:1006 msgid "a transaction failed." msgstr "" -#: ../src/common/utilscmn.cpp:464 +#: ../src/common/utilscmn.cpp:466 msgid "alt" msgstr "" -#: ../src/msw/dde.cpp:978 +#: ../src/msw/dde.cpp:988 msgid "" "an application initialized as APPCLASS_MONITOR has\n" "attempted to perform a DDE transaction,\n" @@ -2280,22 +2540,22 @@ msgid "" "attempted to perform server transactions." msgstr "" -#: ../src/msw/dde.cpp:1002 +#: ../src/msw/dde.cpp:1012 msgid "an internal call to the PostMessage function has failed. " msgstr "" -#: ../src/msw/dde.cpp:1011 +#: ../src/msw/dde.cpp:1021 msgid "an internal error has occurred in the DDEML." msgstr "" -#: ../src/msw/dde.cpp:1017 +#: ../src/msw/dde.cpp:1027 msgid "" "an invalid transaction identifier was passed to a DDEML function.\n" "Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" "the transaction identifier for that callback is no longer valid." msgstr "" -#: ../src/common/fileconf.cpp:1416 +#: ../src/common/fileconf.cpp:1449 #, c-format msgid "attempt to change immutable key '%s' ignored." msgstr "" @@ -2305,142 +2565,138 @@ msgstr "" msgid "can't close file '%s'" msgstr "" -#: ../src/common/file.cpp:283 +#: ../src/common/file.cpp:257 #, c-format msgid "can't close file descriptor %d" msgstr "" -#: ../src/common/file.cpp:581 ../src/common/file.cpp:591 +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 #, c-format msgid "can't commit changes to file '%s'" msgstr "" -#: ../src/common/file.cpp:231 +#: ../src/common/file.cpp:200 #, c-format msgid "can't create file '%s'" msgstr "" -#: ../src/common/fileconf.cpp:886 +#: ../src/common/fileconf.cpp:919 #, c-format msgid "can't delete user configuration file '%s'" msgstr "" -#: ../src/common/file.cpp:462 +#: ../src/common/file.cpp:438 #, c-format msgid "can't determine if the end of file is reached on descriptor %d" msgstr "" -#: ../src/common/file.cpp:428 +#: ../src/common/file.cpp:404 #, c-format msgid "can't find length of file on file descriptor %d" msgstr "" -#: ../src/msw/utils.cpp:328 +#: ../src/msw/utils.cpp:378 msgid "can't find user's HOME, using current directory." msgstr "" -#: ../src/common/file.cpp:342 +#: ../src/common/file.cpp:319 #, c-format msgid "can't flush file descriptor %d" msgstr "" -#: ../src/common/file.cpp:396 +#: ../src/common/file.cpp:373 #, c-format msgid "can't get seek position on file descriptor %d" msgstr "" -#: ../src/common/fontmap.cpp:545 +#: ../src/common/fontmap.cpp:646 msgid "can't load any font, aborting" msgstr "" -#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:269 +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 #, c-format msgid "can't open file '%s'" msgstr "" -#: ../src/common/fileconf.cpp:310 +#: ../src/common/fileconf.cpp:318 #, c-format msgid "can't open global configuration file '%s'." msgstr "" -#: ../src/common/fileconf.cpp:322 +#: ../src/common/fileconf.cpp:330 #, c-format msgid "can't open user configuration file '%s'." msgstr "" -#: ../src/common/fileconf.cpp:774 +#: ../src/common/fileconf.cpp:799 msgid "can't open user configuration file." msgstr "" -#: ../src/common/file.cpp:309 +#: ../src/common/file.cpp:285 #, c-format msgid "can't read from file descriptor %d" msgstr "" -#: ../src/common/file.cpp:576 ../src/common/file.cpp:586 +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 #, c-format msgid "can't remove file '%s'" msgstr "" -#: ../src/common/file.cpp:604 ../src/common/file.cpp:607 +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 #, c-format msgid "can't remove temporary file '%s'" msgstr "" -#: ../src/common/file.cpp:382 +#: ../src/common/file.cpp:359 #, c-format msgid "can't seek on file descriptor %d" msgstr "" -#: ../src/common/textfile.cpp:328 +#: ../src/common/textfile.cpp:359 #, c-format msgid "can't write file '%s' to disk." msgstr "" -#: ../src/common/file.cpp:327 +#: ../src/common/file.cpp:304 #, c-format msgid "can't write to file descriptor %d" msgstr "" -#: ../src/common/fileconf.cpp:781 +#: ../src/common/fileconf.cpp:806 msgid "can't write user configuration file." msgstr "" -#: ../src/common/intl.cpp:351 +#: ../src/common/intl.cpp:374 #, c-format msgid "catalog file for domain '%s' not found." msgstr "" -#: ../src/common/utilscmn.cpp:462 +#: ../src/common/utilscmn.cpp:464 msgid "ctrl" msgstr "" -#: ../src/common/cmdline.cpp:877 +#: ../src/common/cmdline.cpp:912 msgid "date" msgstr "" -#: ../src/common/datetime.cpp:3185 +#: ../src/common/datetime.cpp:3172 msgid "eighteenth" msgstr "" -#: ../src/common/datetime.cpp:3175 +#: ../src/common/datetime.cpp:3162 msgid "eighth" msgstr "" -#: ../src/common/datetime.cpp:3178 +#: ../src/common/datetime.cpp:3165 msgid "eleventh" msgstr "" -#: ../src/common/filefn.cpp:1729 -msgid "empty file name in wxFindFileInPath" -msgstr "" - -#: ../src/common/fileconf.cpp:1403 +#: ../src/common/fileconf.cpp:1436 #, c-format msgid "entry '%s' appears more than once in group '%s'" msgstr "" -#: ../src/msw/dialup.cpp:858 +#: ../src/msw/dialup.cpp:861 msgid "establish" msgstr "" @@ -2449,302 +2705,255 @@ msgstr "" msgid "failed to flush the file '%s'" msgstr "" -#: ../src/common/datetime.cpp:3182 +#: ../src/common/datetime.cpp:3169 msgid "fifteenth" msgstr "" -#: ../src/common/datetime.cpp:3172 +#: ../src/common/datetime.cpp:3159 msgid "fifth" msgstr "" -#: ../src/common/fileconf.cpp:463 +#: ../src/common/fileconf.cpp:480 #, c-format msgid "file '%s', line %d: '%s' ignored after group header." msgstr "" -#: ../src/common/fileconf.cpp:493 +#: ../src/common/fileconf.cpp:509 #, c-format msgid "file '%s', line %d: '=' expected." msgstr "" -#: ../src/common/fileconf.cpp:520 +#: ../src/common/fileconf.cpp:535 #, c-format msgid "file '%s', line %d: key '%s' was first found at line %d." msgstr "" -#: ../src/common/fileconf.cpp:509 +#: ../src/common/fileconf.cpp:525 #, c-format msgid "file '%s', line %d: value for immutable key '%s' ignored." msgstr "" -#: ../src/common/fileconf.cpp:431 +#: ../src/common/fileconf.cpp:448 #, c-format msgid "file '%s': unexpected character %c at line %d." msgstr "" -#: ../src/common/datetime.cpp:3168 +#: ../src/common/datetime.cpp:3155 msgid "first" msgstr "" -#: ../src/common/datetime.cpp:3181 +#: ../src/common/datetime.cpp:3168 msgid "fourteenth" msgstr "" -#: ../src/common/datetime.cpp:3171 +#: ../src/common/datetime.cpp:3158 msgid "fourth" msgstr "" -#: ../src/common/timercmn.cpp:239 +#: ../src/common/timercmn.cpp:240 msgid "gmtime() failed" msgstr "" -#: ../src/msw/dialup.cpp:858 +#: ../src/msw/dialup.cpp:861 msgid "initiate" msgstr "" -#: ../src/common/file.cpp:466 +#: ../src/common/file.cpp:442 msgid "invalid eof() return value." msgstr "" -#: ../src/generic/logg.cpp:490 +#: ../src/generic/logg.cpp:1037 msgid "invalid message box return value" msgstr "" -#: ../src/html/helpfrm.cpp:851 +#: ../src/html/helpfrm.cpp:874 msgid "large" msgstr "" -#: ../src/common/intl.cpp:542 +#: ../src/common/intl.cpp:575 #, c-format msgid "locale '%s' can not be set." msgstr "" -#: ../src/html/helpfrm.cpp:851 +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "" + +#: ../src/html/helpfrm.cpp:874 msgid "medium" msgstr "" -#: ../src/common/datetime.cpp:3289 +#: ../src/common/datetime.cpp:3319 msgid "midnight" msgstr "" -#: ../src/common/timercmn.cpp:235 +#: ../src/common/timercmn.cpp:236 msgid "mktime() failed" msgstr "" -#: ../src/common/datetime.cpp:3186 +#: ../src/common/datetime.cpp:3173 msgid "nineteenth" msgstr "" -#: ../src/common/datetime.cpp:3176 +#: ../src/common/datetime.cpp:3163 msgid "ninth" msgstr "" -#: ../src/html/winpars.cpp:133 -msgid "no DC assigned to wxHtmlWinParser!!" -msgstr "" - -#: ../src/msw/dde.cpp:962 +#: ../src/msw/dde.cpp:972 msgid "no DDE error." msgstr "" -#: ../src/html/helpdata.cpp:529 +#: ../src/html/helpdata.cpp:644 msgid "noname" msgstr "" -#: ../src/common/datetime.cpp:3288 +#: ../src/common/datetime.cpp:3318 msgid "noon" msgstr "" -#: ../src/common/cmdline.cpp:876 +#: ../src/common/cmdline.cpp:911 msgid "num" msgstr "" -#: ../src/msw/dde.cpp:1005 +#: ../src/msw/dde.cpp:1015 msgid "reentrancy problem." msgstr "" -#: ../src/common/datetime.cpp:3169 +#: ../src/common/datetime.cpp:3156 msgid "second" msgstr "" -#: ../src/common/datetime.cpp:3184 +#: ../src/common/datetime.cpp:3171 msgid "seventeenth" msgstr "" -#: ../src/common/datetime.cpp:3174 +#: ../src/common/datetime.cpp:3161 msgid "seventh" msgstr "" -#: ../src/common/utilscmn.cpp:466 +#: ../src/common/utilscmn.cpp:468 msgid "shift" msgstr "" -#: ../src/common/datetime.cpp:3183 +#: ../src/common/datetime.cpp:3170 msgid "sixteenth" msgstr "" -#: ../src/common/datetime.cpp:3173 +#: ../src/common/datetime.cpp:3160 msgid "sixth" msgstr "" -#: ../src/html/helpfrm.cpp:851 +#: ../src/html/helpfrm.cpp:874 msgid "small" msgstr "" -#: ../src/common/cmdline.cpp:875 +#: ../src/common/cmdline.cpp:910 msgid "str" msgstr "" -#: ../src/common/intl.cpp:635 -#, c-format -msgid "string '%s' not found in domain '%s' for locale '%s'." -msgstr "" - -#: ../src/common/intl.cpp:640 -#, c-format -msgid "string '%s' not found in locale '%s'." -msgstr "" - -#: ../src/common/datetime.cpp:3177 +#: ../src/common/datetime.cpp:3164 msgid "tenth" msgstr "" -#: ../src/html/htmlfilt.cpp:133 -msgid "text/html" -msgstr "" - -#: ../src/msw/dde.cpp:969 +#: ../src/msw/dde.cpp:979 msgid "the response to the transaction caused the DDE_FBUSY bit to be set." msgstr "" -#: ../src/common/datetime.cpp:3170 +#: ../src/common/datetime.cpp:3157 msgid "third" msgstr "" -#: ../src/common/datetime.cpp:3180 +#: ../src/common/datetime.cpp:3167 msgid "thirteenth" msgstr "" -#: ../src/common/datetime.cpp:2981 +#: ../src/common/datetime.cpp:3012 msgid "today" msgstr "" -#: ../src/common/datetime.cpp:2983 +#: ../src/common/datetime.cpp:3014 msgid "tomorrow" msgstr "" -#: ../src/common/datetime.cpp:3179 +#: ../src/common/datetime.cpp:3166 msgid "twelfth" msgstr "" -#: ../src/common/datetime.cpp:3187 +#: ../src/common/datetime.cpp:3174 msgid "twentieth" msgstr "" -#: ../src/common/fileconf.cpp:1523 +#: ../src/common/fileconf.cpp:1556 #, c-format msgid "unexpected \" at position %d in '%s'." msgstr "" -#: ../src/generic/progdlgg.cpp:243 +#: ../src/generic/progdlgg.cpp:241 msgid "unknown" msgstr "" -#: ../src/msw/dialup.cpp:462 +#: ../src/msw/dialup.cpp:466 #, c-format msgid "unknown error (error code %08x)." msgstr "" -#: ../src/common/file.cpp:365 +#: ../src/common/textfile.cpp:237 +msgid "unknown line terminator" +msgstr "" + +#: ../src/common/file.cpp:342 msgid "unknown seek origin" msgstr "" -#: ../src/common/fontmap.cpp:329 +#: ../src/common/fontmap.cpp:354 #, c-format msgid "unknown-%d" msgstr "" -#: ../src/common/docview.cpp:397 +#: ../src/common/docview.cpp:406 msgid "unnamed" msgstr "" -#: ../src/common/docview.cpp:1174 +#: ../src/common/docview.cpp:1188 #, c-format msgid "unnamed%d" msgstr "" -#: ../src/common/intl.cpp:356 +#: ../src/common/intl.cpp:379 #, c-format msgid "using catalog '%s' from '%s'." msgstr "" -#: ../src/html/helpfrm.cpp:851 +#: ../src/html/helpfrm.cpp:874 msgid "very large" msgstr "" -#: ../src/html/helpfrm.cpp:851 +#: ../src/html/helpfrm.cpp:874 msgid "very small" msgstr "" -#: ../src/common/imaggif.cpp:74 -msgid "wxGIFHandler: data stream seems to be truncated." -msgstr "" - -#: ../src/common/imaggif.cpp:58 -msgid "wxGIFHandler: error in GIF image format." -msgstr "" - -#: ../src/common/imaggif.cpp:61 -msgid "wxGIFHandler: not enough memory." -msgstr "" - -#: ../src/common/imaggif.cpp:64 -msgid "wxGIFHandler: unknown error!!!" -msgstr "" - -#: ../src/common/timercmn.cpp:266 +#: ../src/common/timercmn.cpp:267 msgid "wxGetTimeOfDay failed." msgstr "" -#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 -msgid "wxPCXHandler: couldn't allocate memory" -msgstr "" - -#: ../src/common/imagpcx.cpp:447 -msgid "wxPCXHandler: image format unsupported" -msgstr "" - -#: ../src/common/imagpcx.cpp:470 -msgid "wxPCXHandler: invalid image" -msgstr "" - -#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 -msgid "wxPCXHandler: unknown error !!!" -msgstr "" - -#: ../src/common/imagpcx.cpp:449 -msgid "wxPCXHandler: version number too low" -msgstr "" - -#: ../src/common/prntbase.cpp:660 -msgid "" -"wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to " -"let me know about the canvas!" -msgstr "" - -#: ../src/common/socket.cpp:296 ../src/common/socket.cpp:350 +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 msgid "wxSocket: invalid signature in ReadMsg." msgstr "" -#: ../src/motif/app.cpp:584 +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "" + +#: ../src/motif/app.cpp:591 #, c-format msgid "wxWindows could not open display for '%s': exiting." msgstr "" -#: ../src/common/filefn.cpp:1222 +#: ../src/common/filefn.cpp:1237 msgid "wxWindows: error finding temporary file name.\n" msgstr "" -#: ../src/common/datetime.cpp:2982 +#: ../src/common/datetime.cpp:3013 msgid "yesterday" msgstr "" diff --git a/locale/zh.po b/locale/zh.po new file mode 100644 index 0000000000..fa583ec412 --- /dev/null +++ b/locale/zh.po @@ -0,0 +1,3035 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows-2.2.2\n" +"POT-Creation-Date: 2001-10-20 14:30-0700\n" +"PO-Revision-Date: 2000-11-09 16:09Öйú±ê׼ʱ¼ä\n" +"Last-Translator: mrfx \n" +"Language-Team: wxWindows tranlators \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=GB2312\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: ../src/generic/dirdlgg.cpp:551 +msgid "" +"\n" +"(Do you have the required permissions?)" +msgstr "" +"\n" +"(ÄúÊÇ·ñÓÐËùÐèµÄȨÏÞ?)" + +#: ../src/generic/dirdlgg.cpp:538 +msgid "" +"\n" +"does not exist\n" +"Create it now?" +msgstr "" +"\n" +"²»´æÔÚ\n" +"ÏÖÔÚ´´½¨?" + +#: ../src/common/log.cpp:242 +#, c-format +msgid " (error %ld: %s)" +msgstr " (´íÎó %ld: %s)" + +#: ../src/common/docview.cpp:1206 +msgid " - " +msgstr " - " + +#: ../src/html/htmprint.cpp:494 +msgid " Preview" +msgstr "Ô¤ÀÀ" + +#: ../src/generic/filedlgg.cpp:328 +msgid " bytes " +msgstr "×Ö½Ú" + +#: ../src/common/paper.cpp:124 +msgid "#10 Envelope, 4 1/8 x 9 1/2 in" +msgstr "#10 Envelope, 4 1/8 x 9 1/2 in" + +#: ../src/common/paper.cpp:125 +msgid "#11 Envelope, 4 1/2 x 10 3/8 in" +msgstr "#11 ÐÅ·â, 4 1/2 x 10 3/8 in" + +#: ../src/common/paper.cpp:126 +msgid "#12 Envelope, 4 3/4 x 11 in" +msgstr "#12 ÐÅ·â, 4 3/4 x 11 in" + +#: ../src/common/paper.cpp:127 +msgid "#14 Envelope, 5 x 11 1/2 in" +msgstr "#14 ÐÅ·â, 5 x 11 1/2 in" + +#: ../src/common/paper.cpp:123 +msgid "#9 Envelope, 3 7/8 x 8 7/8 in" +msgstr "#9 ÐÅ·â, 3 7/8 x 8 7/8 in" + +#: ../src/common/resourc2.cpp:265 ../src/common/resourc2.cpp:1334 +#: ../src/common/resource.cpp:1778 ../src/common/resource.cpp:1908 +#: ../src/common/resource.cpp:2988 +#, c-format +msgid "#define %s must be an integer." +msgstr "#Ëù¶¨ÒåµÄ %s ±ØÐëÊÇÕûÊý." + +#: ../src/html/helpfrm.cpp:718 ../src/html/helpfrm.cpp:719 +#: ../src/html/helpfrm.cpp:1277 ../src/html/helpfrm.cpp:1304 +#, c-format +msgid "%i of %i" +msgstr "%i of %i" + +#: ../src/common/cmdline.cpp:735 +#, c-format +msgid "%s (or %s)" +msgstr "%s (»ò %s)" + +#: ../src/generic/logg.cpp:243 +#, c-format +msgid "%s Error" +msgstr "%s ´íÎó" + +#: ../src/generic/logg.cpp:251 +#, c-format +msgid "%s Information" +msgstr "%s ÐÅÏ¢" + +#: ../src/generic/logg.cpp:247 +#, c-format +msgid "%s Warning" +msgstr "%s ¾¯¸æ" + +#: ../src/common/resourc2.cpp:709 ../src/common/resource.cpp:2359 +#, c-format +msgid "%s not a bitmap resource specification." +msgstr "%s ²»ÊÇλͼ×ÊÔ´." + +#: ../src/common/resourc2.cpp:864 ../src/common/resource.cpp:2514 +#, c-format +msgid "%s not an icon resource specification." +msgstr "%s ²»ÊÇͼ±ê×ÊÔ´." + +#: ../src/common/resourc2.cpp:357 ../src/common/resourc2.cpp:1430 +#: ../src/common/resource.cpp:1871 ../src/common/resource.cpp:2000 +#: ../src/common/resource.cpp:3085 +#, c-format +msgid "%s: ill-formed resource file syntax." +msgstr "%s: ²»Á¼×ÊÔ´ÎļþÓï·¨." + +#: ../src/msw/mdi.cpp:187 +msgid "&Arrange Icons" +msgstr "" + +#: ../src/msw/mdi.cpp:183 +msgid "&Cascade" +msgstr "" + +#: ../src/generic/logg.cpp:477 ../src/generic/tipdlg.cpp:170 +msgid "&Close" +msgstr "¹Ø±Õ[&C]" + +#: ../src/generic/logg.cpp:689 +msgid "&Details" +msgstr "ϸ½Ú[&D]" + +#: ../src/generic/wizard.cpp:284 +msgid "&Finish" +msgstr "Íê³É[&F]" + +#: ../src/generic/logg.cpp:478 +msgid "&Log" +msgstr "ÈÕÖ¾[&L]" + +#: ../src/msw/mdi.cpp:188 +#, fuzzy +msgid "&Next" +msgstr "ÏÂÒ»¸ö[&N] >" + +#: ../src/generic/wizard.cpp:189 ../src/generic/wizard.cpp:286 +msgid "&Next >" +msgstr "ÏÂÒ»¸ö[&N] >" + +#: ../src/generic/tipdlg.cpp:175 +msgid "&Next Tip" +msgstr "ÏÂÒ»¼¼ÇÉ[&N]" + +#: ../src/common/docview.cpp:1945 ../src/common/docview.cpp:1956 +msgid "&Redo" +msgstr "ÖØ¸´[&R]" + +#: ../src/common/docview.cpp:1939 ../src/common/docview.cpp:1966 +msgid "&Redo " +msgstr "ÖØ¸´[&R]" + +#: ../src/generic/logg.cpp:473 ../src/generic/logg.cpp:774 +msgid "&Save..." +msgstr "±£´æ[&S]..." + +#: ../src/generic/tipdlg.cpp:172 +msgid "&Show tips at startup" +msgstr "Æô¶¯Ê±ÏÔʾ¼¼ÇÉ[&S]" + +#: ../src/common/docview.cpp:1951 +msgid "&Undo" +msgstr "»Ö¸´[&U]" + +#: ../src/common/docview.cpp:1926 +msgid "&Undo " +msgstr "»Ö¸´[&U]" + +#: ../src/msw/mdi.cpp:1287 ../src/msw/mdi.cpp:1294 ../src/msw/window.cpp:2307 +msgid "&Window" +msgstr "´°¿Ú[&W]" + +#: ../src/common/config.cpp:396 ../src/msw/regconf.cpp:264 +#, c-format +msgid "'%s' has extra '..', ignored." +msgstr "'%s' ÓжîÍâµÄ '..', ºöÂÔÖ®." + +#: ../src/common/valtext.cpp:140 +#, c-format +msgid "'%s' is invalid" +msgstr "'%s' ÊÇÎÞЧµÄ" + +#: ../src/common/cmdline.cpp:657 +#, c-format +msgid "'%s' is not a correct numeric value for option '%s'." +msgstr "'%s' ²»ÊÇÆ¥ÅäÑ¡Ïî '%s'µÄÕýÈ·Êý×ÖÖµ." + +#: ../src/common/intl.cpp:412 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' ²»ÊÇÓÐЧµÄÏûϢĿ¼." + +#: ../src/common/textfile.cpp:253 +#, c-format +msgid "'%s' is probably a binary file." +msgstr "'%s' »òÐíÊÇÒ»¸ö¶þ½øÖÆÎļþ." + +#: ../src/common/valtext.cpp:178 +#, c-format +msgid "'%s' should be numeric." +msgstr "'%s' Ó¦¸ÃÊÇÒ»¸öÊýÖµ." + +#: ../src/common/valtext.cpp:160 +#, c-format +msgid "'%s' should only contain ASCII characters." +msgstr "'%s' Ó¦¸Ã½ö°üº¬ASCII×Ö·û." + +#: ../src/common/valtext.cpp:166 +#, c-format +msgid "'%s' should only contain alphabetic characters." +msgstr "'%s' Ó¦½ö°üº¬×Öĸ×Ö·û." + +#: ../src/common/valtext.cpp:172 +#, c-format +msgid "'%s' should only contain alphabetic or numeric characters." +msgstr "'%s' Ó¦½ö°üº¬×Öĸ»òÊý×Ö×Ö·û." + +#: ../src/html/helpfrm.cpp:679 +msgid "(Help)" +msgstr "(°ïÖú)" + +#: ../src/html/helpfrm.cpp:276 ../src/html/helpfrm.cpp:783 +#: ../src/html/helpfrm.cpp:1330 +msgid "(bookmarks)" +msgstr "(ÊéÇ©)" + +#: ../src/common/resourc2.cpp:297 ../src/common/resourc2.cpp:1370 +#: ../src/common/resource.cpp:1810 ../src/common/resource.cpp:1940 +#: ../src/common/resource.cpp:3024 +msgid "" +", expected static, #include or #define\n" +"whilst parsing resource." +msgstr "" +", ÆÚÍû static, #include »ò #define\n" +"ͬʱ¶Ô×ÊÔ´½øÐÐÓï·¨·ÖÎö." + +#: ../src/generic/dirdlgg.cpp:264 ../src/generic/filedlgg.cpp:713 +msgid "." +msgstr "." + +#: ../src/generic/dirdlgg.cpp:265 ../src/generic/filedlgg.cpp:714 +msgid ".." +msgstr ".." + +#: ../src/common/paper.cpp:120 +msgid "10 x 14 in" +msgstr "10 x 14 Ó¢´ç" + +#: ../src/common/paper.cpp:121 +msgid "11 x 17 in" +msgstr "11 x 17 Ó¢´ç" + +#: ../src/common/paper.cpp:139 +msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in" +msgstr "6 3/4 ÐÅ·â, 3 5/8 x 6 1/2 Ó¢´ç" + +#: ../src/html/htmprint.cpp:272 +msgid ": file does not exist!" +msgstr ": Îļþ²»´æÔÚ!" + +#: ../src/common/fontmap.cpp:507 +msgid ": unknown charset" +msgstr ": δ֪×Ö·û¼¯" + +#: ../src/common/fontmap.cpp:712 +msgid ": unknown encoding" +msgstr ": δ֪±àÂë" + +#: ../src/generic/wizard.cpp:186 +msgid "< &Back" +msgstr "< ·µ»Ø[&B]" + +#: ../src/generic/filedlgg.cpp:356 +msgid "

    " +msgstr "<Ŀ¼>" + +#: ../src/generic/filedlgg.cpp:323 +msgid " " +msgstr "<Ŀ¼> " + +#: ../src/generic/filedlgg.cpp:357 +msgid "" +msgstr "<Á¬½Ó>" + +#: ../src/generic/filedlgg.cpp:324 +msgid " " +msgstr "<Á¬½Ó>" + +#: ../src/html/helpfrm.cpp:928 +msgid "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " +msgstr "" +"Normal face
    (and underlined. Italic face. " +"Bold face. Bold italic face.
    font size " +"-2
    font size -1
    font size " +"+0
    font size +1
    font size " +"+2
    font size +3
    font size " +"+4

    Fixed size face.
    bold italic " +"bold italic underlined
    font size -2
    font size -1
    font size +0
    font size +1
    font size +2
    font size +3
    font size +4
    " + +#: ../src/common/paper.cpp:113 +msgid "A3 sheet, 297 x 420 mm" +msgstr "A3 Ö½ÕÅ, 297 x 420 ºÁÃ×" + +#: ../src/common/paper.cpp:104 ../src/generic/dcpsg.cpp:2547 +msgid "A4 sheet, 210 x 297 mm" +msgstr "A4 Ö½ÕÅ, 210 x 297 ºÁÃ×" + +#: ../src/common/paper.cpp:114 +msgid "A4 small sheet, 210 x 297 mm" +msgstr "A4 СֽÕÅ, 210 x 297 ºÁÃ×" + +#: ../src/common/paper.cpp:115 +msgid "A5 sheet, 148 x 210 mm" +msgstr "A5 Ö½ÕÅ, 148 x 210 ºÁÃ×" + +#: ../src/generic/fontdlgg.cpp:325 +msgid "ABCDEFGabcdefg12345" +msgstr "ABCDEFGabcdefg12345" + +#: ../src/html/helpfrm.cpp:270 +msgid "Add current page to bookmarks" +msgstr "°Ñµ±Ç°Ò³¼Óµ½ÊéÇ©ÖÐ" + +#: ../src/generic/colrdlgg.cpp:269 +msgid "Add to custom colours" +msgstr "¼Óµ½×Ô¶¨ÒåÑÕÉ«ÖÐ" + +#: ../src/html/helpctrl.cpp:83 +#, c-format +msgid "Adding book %s" +msgstr "ÕýÔÚÌí¼Ó¾í %s" + +#: ../src/generic/prntdlgg.cpp:163 +msgid "All" +msgstr "ËùÓÐ" + +#: ../include/wx/defs.h:1689 ../src/generic/filedlgg.cpp:825 +msgid "All files (*)|*" +msgstr "ËùÓÐÎļþ (*)|*" + +#: ../include/wx/defs.h:1686 +#, fuzzy +msgid "All files (*.*)|*.*" +msgstr "ËùÓÐÎļþ (*)|*" + +#: ../src/unix/dialup.cpp:359 +msgid "Already dialling ISP." +msgstr "ÒѾ­²¦½ÓISP." + +#: ../src/generic/logg.cpp:1021 +#, c-format +msgid "Append log to file '%s' (choosing [No] will overwrite it)?" +msgstr "°ÑÈÕÖ¾Ìí¼Óµ½Îļþ '%s' (Ñ¡Ôñ [·ñ] ½«¸²Ð´¸ÃÎļþ)?" + +#: ../src/common/fontmap.cpp:105 +msgid "Arabic (ISO-8859-6)" +msgstr "°¢À­²®Óï (ISO-8859-6)" + +#: ../src/common/paper.cpp:134 +msgid "B4 Envelope, 250 x 353 mm" +msgstr "B4 ÐÅ·â, 250 x 353 ºÁÃ×" + +#: ../src/common/paper.cpp:116 +msgid "B4 sheet, 250 x 354 mm" +msgstr "B4 ÐÅ·â, 250 x 354 ºÁÃ×" + +#: ../src/common/paper.cpp:135 +msgid "B5 Envelope, 176 x 250 mm" +msgstr "B5 ÐÅ·â, 176 x 250 ºÁÃ×" + +#: ../src/common/paper.cpp:117 +msgid "B5 sheet, 182 x 257 millimeter" +msgstr "B5 ÐÅ·â, 182 x 257 ºÁÃ×" + +#: ../src/common/paper.cpp:136 +msgid "B6 Envelope, 176 x 125 mm" +msgstr "B6 ÐÅ·â, 176 x 125 ºÁÃ×" + +#: ../src/common/imagbmp.cpp:387 +msgid "BMP: Cannot deal with 4bit encoded yet." +msgstr "BMP: »¹²»ÄÜ´¦Àí4λ±àÂë." + +#: ../src/common/imagbmp.cpp:266 ../src/common/imagbmp.cpp:278 +msgid "BMP: Couldn't allocate memory." +msgstr "BMP: ²»ÄÜ·ÖÅäÄÚ´æ." + +#: ../src/common/imagbmp.cpp:62 +msgid "BMP: Couldn't save invalid image." +msgstr "BMP: ²»Äܱ£´æÎÞЧͼÏñ." + +#: ../src/common/imagbmp.cpp:154 +msgid "BMP: Couldn't write data." +msgstr "BMP: ²»ÄÜдÊý¾Ý." + +#: ../src/common/imagbmp.cpp:131 +msgid "BMP: Couldn't write the file header." +msgstr "BMP: ²»ÄÜдÎļþÍ·." + +#: ../src/common/imagbmp.cpp:257 +msgid "BMP: Encoding doesn't match bitdepth." +msgstr "BMP: ±àÂë²»ÄÜÆ¥ÅäÑÕɫλÊý." + +#: ../src/common/imagbmp.cpp:220 +msgid "BMP: Image height > 32767 pixels for file." +msgstr "BMP: ¶ÔÓÚÎļþ£¬Í¼Ïñ¸ß¶È > 32767 ÏóËØ." + +#: ../src/common/imagbmp.cpp:214 +msgid "BMP: Image width > 32767 pixels for file." +msgstr "BMP: ¶ÔÓÚÎļþ£¬Í¼Ïñ¿í¶È > 32767 ÏóËØ." + +#: ../src/common/imagbmp.cpp:234 +msgid "BMP: Unknown bitdepth in file." +msgstr "BMP: ÎļþÖÐÑÕɫλÊýδ֪." + +#: ../src/common/imagbmp.cpp:243 +msgid "BMP: Unknown encoding in file." +msgstr "BMP: Îļþ±àÂëδ֪." + +#: ../src/generic/helpwxht.cpp:157 +msgid "Back" +msgstr "·µ»Ø" + +#: ../src/common/dlgcmn.cpp:135 +msgid "Backward" +msgstr "Ïòºó" + +#: ../src/common/fontmap.cpp:112 +msgid "Baltic (ISO-8859-13)" +msgstr "²¨Â޵ĺ£Óï (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:103 +msgid "Baltic (old) (ISO-8859-4)" +msgstr "²¨Â޵ĺ£Óï (¾ÉµÄ) (ISO-8859-4)" + +#: ../src/common/resourc2.cpp:844 ../src/common/resource.cpp:2494 +#, c-format +msgid "Bitmap resource specification %s not found." +msgstr "ÕÒ²»µ½Î»Í¼¹æ¸ñ %s." + +#: ../src/generic/fontdlgg.cpp:217 +msgid "Bold" +msgstr "´ÖÌå" + +#: ../src/generic/prntdlgg.cpp:662 +msgid "Bottom margin (mm):" +msgstr "µ×±ß¾à (ºÁÃ×):" + +#: ../src/common/paper.cpp:105 +msgid "C sheet, 17 x 22 in" +msgstr "C Ö½ÕÅ, 17 x 22 Ó¢´ç" + +#: ../src/generic/logg.cpp:475 +msgid "C&lear" +msgstr "Çå³ý[&L]" + +#: ../src/common/paper.cpp:130 +msgid "C3 Envelope, 324 x 458 mm" +msgstr "C3 ÐÅ·â, 324 x 458 ºÁÃ×" + +#: ../src/common/paper.cpp:131 +msgid "C4 Envelope, 229 x 324 mm" +msgstr "C4 ÐÅ·â, 229 x 324 ºÁÃ×" + +#: ../src/common/paper.cpp:129 +msgid "C5 Envelope, 162 x 229 mm" +msgstr "C5 ÐÅ·â, 162 x 229 ºÁÃ×" + +#: ../src/common/paper.cpp:132 +msgid "C6 Envelope, 114 x 162 mm" +msgstr "C6 ÐÅ·â, 114 x 162 ºÁÃ×" + +#: ../src/common/paper.cpp:133 +msgid "C65 Envelope, 114 x 229 mm" +msgstr "C65 ÐÅ·â, 114 x 229 ºÁÃ×" + +#: ../src/mac/thread.cpp:179 ../src/msw/thread.cpp:222 +msgid "Can not create event object." +msgstr "²»ÄÜ´´½¨Ê¼þ¶ÔÏó." + +#: ../src/msw/thread.cpp:124 +msgid "Can not create mutex" +msgstr "²»ÄÜ´´½¨»¥³â¶ÔÏó" + +#: ../src/mac/thread.cpp:92 +#, fuzzy +msgid "Can not create mutex." +msgstr "²»ÄÜ´´½¨»¥³â¶ÔÏó" + +#: ../src/common/filefn.cpp:1294 ../src/msw/dir.cpp:294 +#: ../src/unix/dir.cpp:214 +#, c-format +msgid "Can not enumerate files in directory '%s'" +msgstr "²»ÄÜö¾ÙĿ¼ '%s'ÖеÄÎļþ" + +#: ../src/msw/thread.cpp:552 +#, c-format +msgid "Can not resume thread %x" +msgstr "²»Äָܻ´Ïß³Ì %x" + +#: ../src/msw/thread.cpp:433 +msgid "Can not start thread: error writing TLS." +msgstr "²»ÄÜÆô¶¯Ïß³Ì: дTLS³ö´í." + +#: ../src/msw/thread.cpp:537 +#, c-format +msgid "Can not suspend thread %x" +msgstr "²»ÄÜ¹ÒÆðÏß³Ì %x" + +#: ../src/msw/thread.cpp:871 +msgid "Can not wait for thread termination" +msgstr "²»ÄܵȺòÏß³ÌÖÕÖ¹" + +#: ../src/common/docview.cpp:1928 +msgid "Can't &Undo " +msgstr "²»Äָܻ´[&U]" + +#: ../src/common/image.cpp:953 +#, c-format +msgid "Can't check image format of file '%s': file does not exist." +msgstr "²»Äܼì²éÎļþ¸ñʽ '%s': Îļþ²»´æÔÚ." + +#: ../src/msw/registry.cpp:418 +#, c-format +msgid "Can't close registry key '%s'" +msgstr "²»ÄܹرÕ×¢²á¼ü '%s'" + +#: ../src/msw/registry.cpp:490 +#, c-format +msgid "Can't copy values of unsupported type %d." +msgstr "²»ÄÜ¿½±´²»Ö§³ÖµÄÀàÐÍ %d µÄÖµ." + +#: ../src/msw/listctrl.cpp:212 +msgid "Can't create list control window, check that comctl32.dll is installed." +msgstr "²»ÄÜ´´½¨ÁÐ±í¿Ø¼þ´°¿Ú, ¼ì²écomctl32.dllÊÇ·ñÒѰ²×°." + +#: ../src/msw/registry.cpp:399 +#, c-format +msgid "Can't create registry key '%s'" +msgstr "²»ÄÜ´´½¨×¢²á¼ü '%s'" + +#: ../src/msw/utilsexc.cpp:482 +msgid "Can't create the inter-process read pipe" +msgstr "²»ÄÜ´´½¨ÄÚ²¿½ø³Ì¶Á¹ÜµÀ" + +#: ../src/msw/utilsexc.cpp:494 +msgid "Can't create the inter-process write pipe" +msgstr "²»ÄÜ´´½¨ÄÚ²¿½ø³Ìд¹ÜµÀ" + +#: ../src/msw/thread.cpp:519 +msgid "Can't create thread" +msgstr "²»ÄÜ´´½¨½ø³Ì" + +#: ../src/msw/window.cpp:2433 +#, c-format +msgid "" +"Can't create window of class %s!\n" +"Possible Windows 3.x compatibility problem?" +msgstr "" +"²»ÄÜ´´½¨Àà %s´°¿Ú!\n" +"Ò²ÐíÊÇ Windows 3.x ¼æÈÝÎÊÌâm?" + +#: ../src/msw/registry.cpp:658 +#, c-format +msgid "Can't delete key '%s'" +msgstr "²»ÄÜɾ³ý¼ü '%s'" + +#: ../src/msw/iniconf.cpp:476 +#, c-format +msgid "Can't delete the INI file '%s'" +msgstr "²»ÄÜɾ³ý INI Îļþ '%s'" + +#: ../src/msw/registry.cpp:683 +#, c-format +msgid "Can't delete value '%s' from key '%s'" +msgstr "²»ÄÜɾ³ý¼üÖµ '%s'/ '%s'" + +#: ../src/msw/registry.cpp:694 +#, c-format +msgid "Can't delete value of key '%s'" +msgstr "²»ÄÜɾ³ý¼ü '%s'µÄÖµ" + +#: ../src/msw/registry.cpp:1020 +#, c-format +msgid "Can't enumerate subkeys of key '%s'" +msgstr "²»ÄÜö¾Ù¼ü '%s'µÄ×Ó¼ü" + +#: ../src/msw/registry.cpp:975 +#, c-format +msgid "Can't enumerate values of key '%s'" +msgstr "²»ÄÜö¾Ù¼ü '%s'µÄÖµ" + +#: ../src/common/ffile.cpp:234 +#, c-format +msgid "Can't find current position in file '%s'" +msgstr "²»ÄÜÔÚÎļþ'%s'ÖÐÕÒµ½µ±Ç°Î»ÖÃ" + +#: ../src/msw/window.cpp:2383 +#, fuzzy +msgid "" +"Can't find dummy dialog template!\n" +"Check resource include path for finding wx.rc." +msgstr "" +"ÕÒ²»µ½ÐéÄâ¶Ô»°¿òÄ£°å!\n" +"¼ì²é×ÊÔ´Îļþ°üº¬Â·¾¶ÒÔÕÒµ½wx.rc." + +#: ../src/common/object.cpp:314 ../src/common/object.cpp:335 +#, c-format +msgid "Can't find the serialization object '%s' for the object '%s'." +msgstr "ÕÒ²»µ½ÐòÁл¯¶ÔÏó '%s'£¬ËüÓÃÓÚ¶ÔÏó '%s'." + +#: ../src/msw/registry.cpp:348 +#, c-format +msgid "Can't get info about registry key '%s'" +msgstr "²»ÄÜ»ñµÃ×¢²á¼ü '%s'µÄÐÅÏ¢" + +#: ../src/common/image.cpp:653 ../src/common/image.cpp:673 +#, c-format +msgid "Can't load image from file '%s': file does not exist." +msgstr "²»ÄÜ´ÓÎļþ '%s'ÖÐ×°ÈëͼÏñ: Îļþ²»´æÔÚ." + +#: ../src/common/object.cpp:307 +msgid "Can't load wxSerial dynamic library." +msgstr "²»ÄÜ×°ÔØ wxSerial ¶¯Ì¬¿â." + +#: ../src/msw/dib.cpp:434 +#, c-format +msgid "Can't open file '%s'" +msgstr "²»ÄÜ´ò¿ªÎļþ'%s'" + +#: ../src/msw/registry.cpp:374 +#, c-format +msgid "Can't open registry key '%s'" +msgstr "²»ÄÜ´ò¿ª×¢²á¼ü '%s'" + +#: ../src/msw/registry.cpp:899 +#, c-format +msgid "Can't read value of '%s'" +msgstr "²»ÄܶÁ '%s'µÄÖµ" + +#: ../src/msw/registry.cpp:774 ../src/msw/registry.cpp:813 +#, c-format +msgid "Can't read value of key '%s'" +msgstr "²»ÄܶÁ¼ü '%s'µÄÖµ" + +#: ../src/generic/logg.cpp:535 ../src/generic/logg.cpp:932 +msgid "Can't save log contents to file." +msgstr "²»ÄܰÑÈÕÖ¾ÄÚÈݱ£´æµ½Îļþ." + +#: ../src/msw/thread.cpp:485 +msgid "Can't set thread priority" +msgstr "²»ÄÜÉèÖÃÏß³ÌÓÅÏȼ¶" + +#: ../src/msw/registry.cpp:799 ../src/msw/registry.cpp:923 +#, c-format +msgid "Can't set value of '%s'" +msgstr "²»ÄÜÉèÖà '%s'µÄÖµ" + +#: ../src/common/dlgcmn.cpp:148 ../src/common/prntbase.cpp:109 +#: ../src/generic/dcpsg.cpp:2271 ../src/generic/dirdlgg.cpp:425 +#: ../src/generic/filedlgg.cpp:916 ../src/generic/fontdlgg.cpp:257 +#: ../src/generic/prntdlgg.cpp:468 ../src/generic/progdlgg.cpp:179 +#: ../src/generic/proplist.cpp:523 ../src/generic/wizard.cpp:192 +#: ../src/gtk/filedlg.cpp:164 ../src/gtk/fontdlg.cpp:178 +#: ../src/html/helpfrm.cpp:910 ../src/motif/msgdlg.cpp:178 +msgid "Cancel" +msgstr "È¡Ïû" + +#: ../src/msw/dialup.cpp:518 +#, c-format +msgid "Cannot find active dialup connection: %s" +msgstr "ÕÒ²»µ½»î¶¯µÄ²¦ºÅÁ¬½Ó: %s" + +#: ../src/msw/dialup.cpp:832 +msgid "Cannot find the location of address book file" +msgstr "ÕÒ²»µ½µØÖ·²¾ÎļþµÄλÖÃ" + +#: ../src/unix/threadpsx.cpp:954 +#, c-format +msgid "Cannot get priority range for scheduling policy %d." +msgstr "²»ÄÜ»ñµÃµ÷¶È²ßÂÔ %d µÄÓÅÏȼ¶·¶Î§." + +#: ../src/unix/utilsunx.cpp:713 +msgid "Cannot get the hostname" +msgstr "²»ÄÜ»ñµÃÖ÷»úÃû" + +#: ../src/unix/utilsunx.cpp:749 +msgid "Cannot get the official hostname" +msgstr "²»ÄÜ»ñµÃÕýʽµÄÖ÷»úÃû" + +#: ../src/msw/dialup.cpp:925 +msgid "Cannot hang up - no active dialup connection." +msgstr "²»ÄÜ¹ÒÆð - ûÓлµÄ²¦ºÅÁ¬½Ó." + +#: ../src/msw/app.cpp:252 +msgid "Cannot initialize OLE" +msgstr "²»Äܳõʼ»¯ OLE" + +#: ../src/html/htmlfilt.cpp:146 +#, c-format +msgid "Cannot open HTML document: %s" +msgstr "²»ÄÜ´ò¿ª HTML Îĵµ: %s" + +#: ../src/html/helpdata.cpp:657 +#, c-format +msgid "Cannot open HTML help book: %s" +msgstr "²»ÄÜ´ò¿ª HTML °ïÖú: %s" + +#: ../src/generic/helpext.cpp:96 +#, c-format +msgid "Cannot open URL '%s'" +msgstr "²»ÄÜ´ò¿ª URL '%s'" + +#: ../src/html/helpdata.cpp:353 +#, c-format +msgid "Cannot open contents file: %s" +msgstr "²»ÄÜ´ò¿ªÄ¿Â¼Îļþ: %s" + +#: ../src/generic/dcpsg.cpp:1584 +msgid "Cannot open file for PostScript printing!" +msgstr "²»ÄÜ´ò¿ªÎļþ½øÐÐPostScript´òÓ¡!" + +#: ../src/html/helpdata.cpp:368 +#, c-format +msgid "Cannot open index file: %s" +msgstr "²»ÄÜ´ò¿ªË÷ÒýÎļþ: %s" + +#: ../src/html/helpfrm.cpp:1174 +msgid "Cannot print empty page." +msgstr "²»ÄÜ´òÓ¡¿ÕÒ³Ãæ." + +#: ../src/unix/threadpsx.cpp:935 +msgid "Cannot retrieve thread scheduling policy." +msgstr "²»ÄÜÕÒ»ØÏ̵߳÷¶È²ßÂÔ." + +#: ../src/unix/threadpsx.cpp:588 +msgid "Cannot start thread: error writing TLS" +msgstr "²»ÄÜÆô¶¯Ïß³Ì: дTLS´íÎó" + +#: ../src/html/helpfrm.cpp:398 +msgid "Case sensitive" +msgstr "´óСдÃô¸Ð" + +#: ../src/common/fontmap.cpp:113 +#, fuzzy +msgid "Celtic (ISO-8859-14)" +msgstr "²¨Â޵ĺ£Óï (ISO-8859-13)" + +#: ../src/common/fontmap.cpp:101 +#, fuzzy +msgid "Central European (ISO-8859-2)" +msgstr "ÖÐÅ·Óïϵ (ISO-8859-2/Latin 2)" + +#: ../src/msw/dialup.cpp:767 +msgid "Choose ISP to dial" +msgstr "Ñ¡ÔñISP½øÐв¦ºÅ" + +#: ../src/gtk/fontdlg.cpp:159 +msgid "Choose font" +msgstr "Ñ¡Ôñ×ÖÌå" + +#: ../src/generic/logg.cpp:475 +msgid "Clear the log contents" +msgstr "Çå³ýÈÕÖ¾ÄÚÈÝ" + +#: ../src/common/prntbase.cpp:359 ../src/generic/progdlgg.cpp:307 +#: ../src/generic/proplist.cpp:518 +msgid "Close" +msgstr "¹Ø±Õ" + +#: ../src/generic/logg.cpp:477 +msgid "Close this window" +msgstr "¹Ø±Õ´°¿Ú" + +#: ../src/common/fileconf.cpp:759 +#, c-format +msgid "Config entry name cannot start with '%c'." +msgstr "ÅäÖÃÌõÄ¿Ãû²»ÄÜÒÔ '%c'¿ªÍ·." + +#: ../src/generic/filedlgg.cpp:1077 ../src/gtk/filedlg.cpp:75 +msgid "Confirm" +msgstr "È·ÈÏ" + +#: ../src/html/htmlwin.cpp:165 +msgid "Connecting..." +msgstr "Á¬½Ó..." + +#: ../src/generic/helpxlp.cpp:240 +#, c-format +msgid "Connection to wxHelp timed out in %d seconds" +msgstr "Á¬½Óµ½wxHelp ³¬¹ýʱÏÞ %d Ãë" + +#: ../src/generic/helpwxht.cpp:159 ../src/html/helpfrm.cpp:303 +#: ../src/html/helpfrm.cpp:312 +msgid "Contents" +msgstr "Ŀ¼" + +#: ../src/generic/prntdlgg.cpp:196 +msgid "Copies:" +msgstr "·Ý:" + +#: ../src/common/resourc2.cpp:287 ../src/common/resource.cpp:1800 +#: ../src/common/resource.cpp:1930 +#, c-format +msgid "Could not find resource include file %s." +msgstr "ÕÒ²»µ½×ÊÔ´°üº¬Îļþ %s." + +#: ../src/generic/tabg.cpp:1042 +msgid "Could not find tab for id" +msgstr "ÕÒ²»µ½idµÄ±êÇ©" + +#: ../src/msw/textctrl.cpp:1249 +#, c-format +msgid "Could not load Rich Edit DLL '%s'" +msgstr "²»ÄÜ×°ÔØ Rich Edit DLL '%s'" + +#: ../src/common/resource.cpp:796 +#, c-format +msgid "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" +msgstr "" +"Could not resolve control class or id '%s'. Use (non-zero) integer instead\n" +" or provide #define (see manual for caveats)" + +#: ../src/common/resource.cpp:1245 +#, c-format +msgid "" +"Could not resolve menu id '%s'. Use (non-zero) integer instead\n" +"or provide #define (see manual for caveats)" +msgstr "" +"²»ÄܽâÎö²Ëµ¥id '%s'. ÓÃ(·ÇÁã)ÕûÊý´úÌæ\n" +"»ò Ìṩ #define (ÏêϸÐÅÏ¢¼ûÊÖ²á)" + +#: ../src/common/prntbase.cpp:711 +msgid "Could not start document preview." +msgstr "²»ÄÜÆô¶¯ÎĵµÔ¤ÀÀ." + +#: ../src/generic/printps.cpp:209 ../src/msw/printwin.cpp:252 +msgid "Could not start printing." +msgstr "²»ÄÜÆô¶¯´òÓ¡." + +#: ../src/common/wincmn.cpp:784 +msgid "Could not transfer data to window" +msgstr "²»ÄܰÑÊý¾Ýתµ½´°¿Ú" + +#: ../src/msw/thread.cpp:166 +msgid "Couldn't acquire a mutex lock" +msgstr "²»Äܵõ½»¥³âÌåËø" + +#: ../src/msw/dragimag.cpp:142 ../src/msw/dragimag.cpp:179 +#: ../src/msw/imaglist.cpp:152 ../src/msw/imaglist.cpp:174 +#: ../src/msw/imaglist.cpp:187 +msgid "Couldn't add an image to the image list." +msgstr "²»ÄܰÑͼÏñ¼Óµ½Í¼ÏóÁбí." + +#: ../src/mac/thread.cpp:227 +#, fuzzy +msgid "Couldn't change the state of event object." +msgstr "²»ÄÜ´´½¨Ê¼þ¶ÔÏó." + +#: ../src/msw/timer.cpp:96 +msgid "Couldn't create a timer" +msgstr "²»ÄÜ´´½¨¼ÆÊ±Æ÷" + +#: ../src/common/dynlib.cpp:309 +#, c-format +msgid "Couldn't find symbol '%s' in a dynamic library" +msgstr "ÔÚ¶¯Ì¬Á¬½Ó¿âÖÐÕÒ²»µ½·ûºÅ'%s'" + +#: ../src/msw/thread.cpp:578 +msgid "Couldn't get the current thread pointer" +msgstr "²»ÄÜ»ñµÃµ±Ç°Ïß³ÌÖ¸Õë" + +#: ../src/msw/utilsexc.cpp:712 +#, c-format +msgid "Couldn't launch DDE server '%s'." +msgstr "²»ÄÜÆô¶¯DDE·þÎñÆ÷ '%s'." + +#: ../src/common/imagpng.cpp:251 +msgid "Couldn't load a PNG image - file is corrupted or not enough memory." +msgstr "²»ÄÜ×°ÈëPNGͼÏñ - Îļþ±»ÆÆ»µ »ò ûÓÐ×ã¹»ÄÚ´æ." + +#: ../src/msw/ole/dataobj.cpp:151 +#, c-format +msgid "Couldn't register clipboard format '%s'." +msgstr "²»ÄÜ×¢²á¼ôÌù°å¸ñʽ '%s'." + +#: ../src/msw/thread.cpp:198 +msgid "Couldn't release a mutex" +msgstr "²»ÄÜÊÍ·Å»¥³âÌå" + +#: ../src/msw/listctrl.cpp:616 +#, c-format +msgid "Couldn't retrieve information about list control item %d." +msgstr "²»ÄÜ»ñµÃÁÐ±í¿Ø¼þµÄÏî %dÐÅÏ¢." + +#: ../src/msw/thread.cpp:958 +msgid "Couldn't terminate thread" +msgstr "²»ÄÜÖÕÖ¹Ïß³Ì" + +#: ../src/generic/dirdlgg.cpp:572 +msgid "Create directory" +msgstr "´´½¨Ä¿Â¼" + +#: ../src/generic/filedlgg.cpp:883 +msgid "Create new directory" +msgstr "´´½¨ÐÂĿ¼" + +#: ../src/generic/filedlgg.cpp:890 +msgid "Current directory:" +msgstr "µ±Ç°Ä¿Â¼:" + +#: ../src/common/fontmap.cpp:104 +#, fuzzy +msgid "Cyrillic (ISO-8859-5)" +msgstr "²¨Â޵ĺ£Óï (ISO-8859-13)" + +#: ../src/common/paper.cpp:106 +msgid "D sheet, 22 x 34 in" +msgstr "D Ö½ÕÅ, 22 x 34 Ó¢´ç" + +#: ../src/msw/dde.cpp:597 +msgid "DDE poke request failed" +msgstr "DDE poke ÇëÇóʧ°Ü" + +#: ../src/common/paper.cpp:128 +msgid "DL Envelope, 110 x 220 mm" +msgstr "DL ÐÅ·â, 110 x 220 ºÁÃ×" + +#: ../src/generic/filedlgg.cpp:535 +msgid "Date" +msgstr "ÈÕÆÚ" + +#: ../src/generic/fontdlgg.cpp:207 +msgid "Decorative" +msgstr "ÐÞÊÎ" + +#: ../src/msw/dialup.cpp:354 +msgid "" +"Dial up functions are unavailable because the remote access service (RAS) is " +"not installed on this machine. Please install it." +msgstr "ÓÉÓÚÔ¶³Ì·ÃÎÊ·þÎñ£¨RAS£©Ã»Óа²×°ÔÚ±¾»ú,²¦ºÅ¹¦Äܲ»ÄÜʹÓÃ. Çë°²×°Ëü." + +#: ../src/generic/tipdlg.cpp:177 +msgid "Did you know..." +msgstr "ÄãÖªµÀ..." + +#: ../src/common/filefn.cpp:1085 +#, c-format +msgid "Directory '%s' couldn't be created" +msgstr "Ŀ¼'%s'²»Äܱ»´´½¨" + +#: ../src/generic/dirdlgg.cpp:539 +msgid "Directory does not exist" +msgstr "Ŀ¼²»´æÔÚ" + +#: ../src/html/helpfrm.cpp:366 +msgid "" +"Display all index items that contain given substring. Search is case " +"insensitive." +msgstr "ÏÔʾ°üº¬¸ø¶¨×Ó´®µÄËùÓÐË÷ÒýÏî. ËÑË÷ÊÇ´óСдÎ޹صÄ." + +#: ../src/html/helpfrm.cpp:535 +msgid "Display options dialog" +msgstr "ÏÔʾѡÏî¶Ô»°¿ò" + +#: ../src/common/docview.cpp:440 +#, c-format +msgid "Do you want to save changes to document %s?" +msgstr "ÄãÏë±£´æ¶ÔÎĵµ%sµÄÐÞ¸Ä?" + +#: ../src/html/htmlwin.cpp:215 +msgid "Done" +msgstr "Íê³É" + +#: ../src/generic/progdlgg.cpp:313 +msgid "Done." +msgstr "Íê³É¡£" + +#: ../src/common/paper.cpp:107 +msgid "E sheet, 34 x 44 in" +msgstr "E Ö½ÕÅ, 34 x 44 Ó¢´ç" + +#: ../src/generic/progdlgg.cpp:153 +msgid "Elapsed time : " +msgstr "ÓÃʱ£º" + +#: ../src/generic/helphtml.cpp:320 +msgid "Entries found" +msgstr "ÕÒµ½µÄÌõÄ¿" + +#: ../src/common/config.cpp:349 +#, c-format +msgid "" +"Environment variables expansion failed: missing '%c' at position %d in '%s'." +msgstr "»·¾³±äÁ¿À©Õ¹Ê§°Ü: '%c' ûÓгöÏÖÔÚλÖà %d / '%s'." + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/dirdlgg.cpp:286 +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:717 +#: ../src/generic/filedlgg.cpp:731 ../src/generic/filedlgg.cpp:744 +#: ../src/generic/filedlgg.cpp:1043 ../src/generic/filedlgg.cpp:1092 +#: ../src/generic/helpxlp.cpp:241 ../src/gtk/filedlg.cpp:83 +#: ../src/gtk/fontdlg.cpp:72 +msgid "Error" +msgstr "´íÎó" + +#: ../src/unix/utilsunx.cpp:952 ../src/unix/utilsunx.cpp:960 +msgid "Error " +msgstr "´íÎó" + +#: ../src/generic/dirdlgg.cpp:552 +msgid "Error creating directory" +msgstr "´´½¨Ä¿Â¼´íÎó" + +#: ../src/common/log.cpp:362 +msgid "Error: " +msgstr "´íÎó£º" + +#: ../src/common/fontmap.cpp:102 +msgid "Esperanto (ISO-8859-3)" +msgstr "Esperanto (ISO-8859-3)" + +#: ../src/generic/progdlgg.cpp:160 +msgid "Estimated time : " +msgstr "Ô¤ÆÚʱ¼ä£º" + +#: ../src/generic/dirdlgg.cpp:217 +msgid "Etcetera" +msgstr "ÆäËü" + +#: ../src/msw/utilsexc.cpp:585 +#, c-format +msgid "Execution of command '%s' failed" +msgstr "ÃüÁî '%s'Ö´ÐÐʧ°Ü" + +#: ../src/common/paper.cpp:112 +msgid "Executive, 7 1/4 x 10 1/2 in" +msgstr "Executive, 7 1/4 x 10 1/2 Ó¢´ç" + +#: ../src/common/resourc2.cpp:326 ../src/common/resourc2.cpp:1399 +#: ../src/common/resource.cpp:1839 ../src/common/resource.cpp:1969 +#: ../src/common/resource.cpp:3053 +msgid "Expected '*' whilst parsing resource." +msgstr "½âÎö×ÊԴʱÆÚ´ý³öÏÖ '*' ." + +#: ../src/common/resourc2.cpp:342 ../src/common/resourc2.cpp:1415 +#: ../src/common/resource.cpp:1856 ../src/common/resource.cpp:1985 +#: ../src/common/resource.cpp:3070 +msgid "Expected '=' whilst parsing resource." +msgstr "½âÎö×ÊԴʱÆÚ´ý '='." + +#: ../src/common/resourc2.cpp:312 ../src/common/resourc2.cpp:1385 +#: ../src/common/resource.cpp:1825 ../src/common/resource.cpp:1955 +#: ../src/common/resource.cpp:3039 +msgid "Expected 'char' whilst parsing resource." +msgstr "½âÎö×ÊԴʱÆÚ´ý 'char' ." + +#: ../src/msw/dialup.cpp:860 +#, c-format +msgid "Failed to %s dialup connection: %s" +msgstr "µ½ %s µÄ²¦ºÅÁ¬½Óʧ°Ü: %s" + +#: ../src/msw/clipbrd.cpp:122 +msgid "Failed to close the clipboard." +msgstr "¹Ø±Õ¼ôÌù°åʧ°Ü." + +#: ../src/msw/dialup.cpp:801 +msgid "Failed to connect: missing username/password." +msgstr "Á¬½Óʧ°Ü: ȱÉÙÓû§Ãû/¿ÚÁî." + +#: ../src/msw/dialup.cpp:747 +msgid "Failed to connect: no ISP to dial." +msgstr "Á¬½Óʧ°Ü: ûÓÐÒª²¦ºÅµÄISP." + +#: ../src/msw/registry.cpp:594 +#, c-format +msgid "Failed to copy registry value '%s'" +msgstr "¿½±´×¢²á¼üֵʧ°Ü '%s'" + +#: ../src/msw/registry.cpp:603 +#, c-format +msgid "Failed to copy the contents of registry key '%s' to '%s'." +msgstr "°Ñ×¢²á¼üÄÚÈÝ´Ó '%s' ¿½±´µ½ '%s'ʧ°Ü." + +#: ../src/msw/dde.cpp:934 +msgid "Failed to create DDE string" +msgstr "´´½¨ DDE ×Ö·û´®Ê§°Ü" + +#: ../src/msw/mdi.cpp:428 +msgid "Failed to create MDI parent frame." +msgstr "´´½¨ MDI ¸¸¿ò¼Üʧ°Ü." + +#: ../src/msw/statbr95.cpp:149 +msgid "Failed to create a status bar." +msgstr "´´½¨×´Ì¬Ìõʧ°Ü¡£" + +#: ../src/msw/dde.cpp:401 +#, c-format +msgid "Failed to create connection to server '%s' on topic '%s'" +msgstr "´´½¨µ½·þÎñÆ÷ '%s'µÄ¹ØÓÚÖ÷Ìâ'%s'µÄÁ¬½Óʧ°Ü" + +#: ../src/msw/dialog.cpp:174 +msgid "" +"Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your " +"resources." +msgstr "´´½¨¶Ô»°¿òʧ°Ü. Ò²ÐíÄãûÓаÑwx/msw/wx.rc°üÀ¨½ø×ÊÔ´ÖÐ." + +#: ../src/generic/dirdlgg.cpp:550 +msgid "Failed to create directory " +msgstr "´´½¨Ä¿Â¼Ê§°Ü" + +#: ../src/html/winpars.cpp:374 +#, c-format +msgid "Failed to display HTML document in %s encoding" +msgstr "°´±àÂë %s ÏÔʾHTMLÎĵµÊ§°Ü" + +#: ../src/msw/clipbrd.cpp:134 +msgid "Failed to empty the clipboard." +msgstr "Çå¿Õ¼ôÌù°åʧ°Ü" + +#: ../src/msw/dde.cpp:616 +msgid "Failed to establish an advise loop with DDE server" +msgstr "ÔÚDDE·þÎñÆ÷½¨Á¢adviseÑ­»·Ê§°Ü" + +#: ../src/msw/dialup.cpp:639 +#, c-format +msgid "Failed to establish dialup connection: %s" +msgstr "½¨Á¢²¦ºÅÁ¬½Ó: %sʧ°Ü" + +#: ../src/unix/utilsunx.cpp:444 ../src/unix/utilsunx.cpp:472 +#, c-format +msgid "Failed to execute '%s'\n" +msgstr "Ö´ÐÐ '%s'ʧ°Ü\n" + +#: ../src/common/resourc2.cpp:808 ../src/common/resource.cpp:2458 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"²éÕÒXBM×ÊÔ´ %sʧ°Ü.\n" +"ûÓÐʹÓÃwxResourceLoadBitmapData?" + +#: ../src/common/resourc2.cpp:963 ../src/common/resource.cpp:2613 +#, c-format +msgid "" +"Failed to find XBM resource %s.\n" +"Forgot to use wxResourceLoadIconData?" +msgstr "" +"²éÕÒXBM×ÊÔ´%sʧ°Ü.\n" +"ûÓÐʹÓÃwxResourceLoadIconData?" + +#: ../src/common/resourc2.cpp:824 ../src/common/resource.cpp:2474 +#, c-format +msgid "" +"Failed to find XPM resource %s.\n" +"Forgot to use wxResourceLoadBitmapData?" +msgstr "" +"²éÕÒXPM×ÊÔ´ %sʧ°Ü.\n" +"ûÓÐʹÓÃwxResourceLoadBitmapData?" + +#: ../src/msw/dialup.cpp:699 +#, c-format +msgid "Failed to get ISP names: %s" +msgstr "»ñÈ¡ISPÃû: %sʧ°Ü" + +#: ../src/msw/clipbrd.cpp:623 +msgid "Failed to get data from the clipboard" +msgstr "´Ó¼ôÌù°å»ñÈ¡Êý¾Ýʧ°Ü" + +#: ../src/common/timercmn.cpp:244 +msgid "Failed to get the UTC system time." +msgstr "»ñÈ¡UTCϵͳʱ¼äʧ°Ü." + +#: ../src/common/timercmn.cpp:196 +msgid "Failed to get the local system time" +msgstr "»ñÈ¡±¾µØÏµÍ³Ê±¼äʧ°Ü" + +#: ../src/unix/threadpsx.cpp:754 +msgid "" +"Failed to join a thread, potential memory leak detected - please restart the " +"program" +msgstr "ºÏ²¢Ïß³Ìʧ°Ü, ¼ì²âµ½Ç±ÔÚµØÄڴ涪ʧ - ÇëÖØÐÂÆô¶¯ÏµÍ³" + +#: ../src/common/dynlib.cpp:239 +#, c-format +msgid "Failed to load shared library '%s'" +msgstr "²»ÄÜ×°ÔØ¹²Ïí¿â '%s'" + +#: ../src/msw/clipbrd.cpp:102 +msgid "Failed to open the clipboard." +msgstr "´ò¿ª¼ôÌù°åʧ°Ü¡£" + +#: ../src/msw/clipbrd.cpp:539 +msgid "Failed to put data on the clipboard" +msgstr "°ÑÊý¾Ý·Åµ½¼ôÌù°åʧ°Ü" + +#: ../src/unix/utilsunx.cpp:543 +msgid "Failed to redirect child process input/output" +msgstr "ÖØ¶¨Ïò×Ó¹ý³ÌÊäÈë/Êä³öʧ°Ü" + +#: ../src/msw/dde.cpp:285 +#, c-format +msgid "Failed to register DDE server '%s'" +msgstr "×¢²áDDE·þÎñÆ÷ '%s'ʧ°Ü" + +#: ../src/common/fontmap.cpp:552 +#, c-format +msgid "Failed to remember the encoding for the charset '%s'." +msgstr "»ØÒä×Ö·û¼¯ '%s'±àÂëʧ°Ü." + +#: ../src/msw/registry.cpp:440 +#, c-format +msgid "Failed to rename registry value '%s' to '%s'." +msgstr "½«×¢²áÖµ '%s'¸ÄÃûµ½'%s'ʧ°Ü." + +#: ../src/msw/registry.cpp:540 +#, c-format +msgid "Failed to rename the registry key '%s' to '%s'." +msgstr "½«×¢²áÖµ '%s'¸ÄÃûµ½'%s'ʧ°Ü." + +#: ../src/msw/clipbrd.cpp:428 +msgid "Failed to retrieve data from the clipboard." +msgstr "´Ó¼ôÌù°å¼ìÈ¡Êý¾Ýʧ°Ü¡£" + +#: ../src/msw/dialup.cpp:463 +msgid "Failed to retrieve text of RAS error message" +msgstr "¼ìÈ¡RAS´íÎóÏûÏ¢ÕýÎÄʧ°Ü" + +#: ../src/msw/clipbrd.cpp:652 +msgid "Failed to retrieve the supported clipboard formats" +msgstr "¼ìȡ֧³ÖµÄ¼ôÌù°å¸ñʽʧ°Ü" + +#: ../src/msw/dde.cpp:661 +msgid "Failed to send DDE advise notification" +msgstr "·¢ËÍDDE advise ֪ͨʧ°Ü" + +#: ../src/msw/clipbrd.cpp:300 +msgid "Failed to set clipboard data." +msgstr "ÉèÖüôÌù°åÊý¾Ýʧ°Ü" + +#: ../src/unix/threadpsx.cpp:1071 +#, c-format +msgid "Failed to set thread priority %d." +msgstr "ÉèÖÃÏß³ÌÓÅÏȼ¶ %dʧ°Ü." + +#: ../src/common/fs_mem.cpp:167 +#, c-format +msgid "Failed to store image '%s' to memory VFS!" +msgstr "½«Í¼Ïñ'%s'´æµ½ÄÚ´æVFSʧ°Ü!" + +#: ../src/unix/threadpsx.cpp:1251 +msgid "Failed to terminate a thread." +msgstr "ÖÕÖ¹Ïß³Ìʧ°Ü" + +#: ../src/msw/dde.cpp:635 +msgid "Failed to terminate the advise loop with DDE server" +msgstr "ÖÕÖ¹ÓëDDE·þÎñÆ÷µÄadviseÑ­»·Ê§°Ü" + +#: ../src/msw/dialup.cpp:933 +#, c-format +msgid "Failed to terminate the dialup connection: %s" +msgstr "ÖÕÖ¹²¦ºÅÁ¬½Ó: %sʧ°Ü" + +#: ../src/msw/dde.cpp:301 +#, c-format +msgid "Failed to unregister DDE server '%s'" +msgstr "³·ÏûDDE·þÎñÆ÷ '%s'×¢²áʧ°Ü" + +#: ../src/generic/logg.cpp:371 +msgid "Fatal error" +msgstr "ÖÂÃü´íÎó" + +#: ../src/common/log.cpp:355 +msgid "Fatal error: " +msgstr "ÖÂÃü´íÎó£º" + +#: ../src/msw/app.cpp:1274 +msgid "Fatal error: exiting" +msgstr "ÖÂÃü´íÎó£ºÒÑ´æÔÚ" + +#: ../src/generic/filedlgg.cpp:1074 ../src/gtk/filedlg.cpp:72 +#, c-format +msgid "File '%s' already exists, do you really want to overwrite it?" +msgstr "Îļþ '%s' ÒÑ´æÔÚ, ÕæÐèÒª¸´Ð´Ëü?" + +#: ../src/common/textcmn.cpp:94 +msgid "File couldn't be loaded." +msgstr "Îļþ²»Äܱ»×°ÔØ" + +#: ../src/common/docview.cpp:296 ../src/common/docview.cpp:332 +#: ../src/common/docview.cpp:1388 +msgid "File error" +msgstr "Îļþ´íÎó" + +#: ../src/generic/dirdlgg.cpp:286 ../src/generic/filedlgg.cpp:731 +msgid "File name exists already." +msgstr "ÎļþÃûÒÑ´æÔÚ" + +#: ../src/msw/filedlg.cpp:303 +#, c-format +msgid "Files (%s)|%s" +msgstr "Îļþ (%s)|%s" + +#: ../src/html/helpfrm.cpp:340 +msgid "Find" +msgstr "²éÕÒ" + +#: ../src/html/helpfrm.cpp:889 +msgid "Fixed font:" +msgstr "¹Ì¶¨×ÖÌ壺" + +#: ../src/common/paper.cpp:118 +msgid "Folio, 8 1/2 x 13 in" +msgstr "Folio, 8 1/2 x 13 in" + +#: ../src/generic/fontdlgg.cpp:124 +msgid "Font" +msgstr "×ÖÌå" + +#: ../src/html/helpfrm.cpp:899 +msgid "Font size:" +msgstr "×ÖÌå´óС:" + +#: ../src/unix/utilsunx.cpp:500 +msgid "Fork failed" +msgstr "Fork ʧ°Ü" + +#: ../src/common/dlgcmn.cpp:132 ../src/generic/helpwxht.cpp:158 +msgid "Forward" +msgstr "Ïòǰ" + +#: ../src/common/resourc2.cpp:295 ../src/common/resourc2.cpp:1368 +#: ../src/common/resource.cpp:1808 ../src/common/resource.cpp:1938 +#: ../src/common/resource.cpp:3022 +msgid "Found " +msgstr "ÕÒµ½" + +#: ../src/html/helpfrm.cpp:637 +#, c-format +msgid "Found %i matches" +msgstr "ÕÒµ½ %i ¸öÆ¥ÅäÏî" + +#: ../src/generic/prntdlgg.cpp:187 +msgid "From:" +msgstr "´Ó:" + +#: ../src/common/imaggif.cpp:74 +msgid "GIF: data stream seems to be truncated." +msgstr "GIF: Êý¾ÝÁ÷ËÆºõÒѱ»½Ø¶Ï." + +#: ../src/common/imaggif.cpp:58 +msgid "GIF: error in GIF image format." +msgstr "GIF: GIFÎļþ¸ñʽ´íÎó." + +#: ../src/common/imaggif.cpp:61 +msgid "GIF: not enough memory." +msgstr "GIF: ûÓÐ×ã¹»ÄÚ´æ." + +#: ../src/common/imaggif.cpp:64 +msgid "GIF: unknown error!!!" +msgstr "GIF: λÖôíÎó!!!" + +#: ../src/common/paper.cpp:142 +msgid "German Legal Fanfold, 8 1/2 x 13 in" +msgstr "µÂ¹ú·¨¶¨¸´Ð´²¾, 8 1/2 x 13 in" + +#: ../src/common/paper.cpp:141 +msgid "German Std Fanfold, 8 1/2 x 12 in" +msgstr "µÂ¹ú±ê×¼¸´Ð´²¾, 8 1/2 x 12 in" + +#: ../src/html/helpfrm.cpp:501 +msgid "Go back" +msgstr "»ØÍË" + +#: ../src/html/helpfrm.cpp:504 +msgid "Go forward" +msgstr "Ïòǰ" + +#: ../src/html/helpfrm.cpp:509 +msgid "Go one level up in document hierarchy" +msgstr "ÔÚÎĵµ²ã´ÎÖÐÉÏÉýÒ»¼¶" + +#: ../src/generic/filedlgg.cpp:875 +msgid "Go to home directory" +msgstr "½øÈëhomeĿ¼" + +#: ../src/generic/filedlgg.cpp:869 +msgid "Go to parent directory" +msgstr "½øÈ븸Ŀ¼" + +#: ../src/common/fontmap.cpp:106 +msgid "Greek (ISO-8859-7)" +msgstr "Greek (ISO-8859-7)" + +#: ../src/html/htmlwin.cpp:250 +#, c-format +msgid "HTML anchor %s does not exist." +msgstr "HTML ê %s ²»´æÔÚ." + +#: ../src/html/helpfrm.cpp:1188 +msgid "" +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*.htb|" +"Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*.*)|*" +msgstr "HTML Îļþ (*.htm)|*.htm|HTML Îļþ (*.html)|*.html|°ïÖúÊé (*.htb)|*.htb|°ïÖúÊé (*.zip)|*.zip|HTML °ïÖúÏîÄ¿ (*.hhp)|*.hhp|ËùÓÐÎļþ (*.*)|*" + +#: ../src/common/fontmap.cpp:107 +msgid "Hebrew (ISO-8859-8)" +msgstr "Hebrew (ISO-8859-8)" + +#: ../src/common/dlgcmn.cpp:144 ../src/generic/proplist.cpp:528 +#: ../src/html/helpfrm.cpp:208 ../src/msw/mdi.cpp:1283 +msgid "Help" +msgstr "°ïÖú" + +#: ../src/html/helpfrm.cpp:872 +msgid "Help Browser Options" +msgstr "°ïÖúä¯ÀÀÆ÷Ñ¡Ïî" + +#: ../src/generic/helphtml.cpp:319 ../src/generic/helphtml.cpp:320 +msgid "Help Index" +msgstr "°ïÖúË÷Òý" + +#: ../src/html/helpfrm.cpp:1172 +msgid "Help Printing" +msgstr "°ïÖú´òÓ¡" + +#: ../src/generic/helpwxht.cpp:251 ../src/html/helpctrl.cpp:38 +#, c-format +msgid "Help: %s" +msgstr "°ïÖú: %s" + +#: ../src/common/resourc2.cpp:997 ../src/common/resourc2.cpp:1008 +#: ../src/common/resource.cpp:2647 ../src/common/resource.cpp:2658 +#, c-format +msgid "Icon resource specification %s not found." +msgstr "ûÓÐÕÒµ½Í¼±ê×ÊÔ´¹æ·¶ %s ." + +#: ../src/common/resource.cpp:251 +msgid "Ill-formed resource file syntax." +msgstr "²»Á¼µÄ×ÊÔ´ÎļþÓï·¨¡£" + +#: ../src/generic/dirdlgg.cpp:268 ../src/generic/filedlgg.cpp:717 +msgid "Illegal directory name." +msgstr "²»ºÏ·¨µÄĿ¼Ãû¡£" + +#: ../src/generic/filedlgg.cpp:1043 +msgid "Illegal file specification." +msgstr "²»ºÏ¹æ·¶µÄÎļþÃèÊö" + +#: ../src/msw/textctrl.cpp:219 +msgid "" +"Impossible to create a rich edit control, using simple text control instead. " +"Please reinstall riched32.dll" +msgstr "²»ÄÜ´´½¨rich±à¼­¿Ø¼þ, ʹÓüòµ¥Îı¾¿Ø¼þ´úÌæ. Çë֨װriched32.dll" + +#: ../src/unix/utilsunx.cpp:350 +msgid "Impossible to get child process input" +msgstr "²»¿ÉÄÜ»ñµÃ×Ó¹ý³ÌµÄÊäÈë" + +#: ../src/html/helpdata.cpp:403 +msgid "Incorrect version of HTML help book" +msgstr "HTML°ïÖú°æ±¾²»ÕýÈ·" + +#: ../src/html/helpfrm.cpp:372 +msgid "Index" +msgstr "Ë÷Òý" + +#: ../src/common/fontmap.cpp:111 +#, fuzzy +msgid "Indian (ISO-8859-12)" +msgstr "Nordic (ISO-8859-10)" + +#: ../src/common/imagtiff.cpp:171 +msgid "Invalid TIFF image index." +msgstr "ÎÞЧTIFFͼÏñË÷Òý." + +#: ../src/generic/fontdlgg.cpp:213 +msgid "Italic" +msgstr "бÌå" + +#: ../src/common/paper.cpp:137 +msgid "Italy Envelope, 110 x 230 mm" +msgstr "Òâ´óÀûÐÅ·â, 110 x 230 mm" + +#: ../src/common/imagjpeg.cpp:202 +msgid "JPEG: Couldn't load - file is probably corrupted." +msgstr "JPEG: ²»ÄÜ×°Èë - ÎļþÒ²ÐíÒѱ»ÆÆ»µ." + +#: ../src/common/imagjpeg.cpp:315 +msgid "JPEG: Couldn't save image." +msgstr "JPEG: ²»Äܱ£´æÍ¼Ïñ." + +#: ../src/common/fontmap.cpp:115 +msgid "KOI8-R" +msgstr "KOI8-R" + +#: ../src/generic/dcpsg.cpp:2262 ../src/generic/prntdlgg.cpp:441 +#: ../src/generic/prntdlgg.cpp:637 +msgid "Landscape" +msgstr "ºáÏò" + +#: ../src/common/paper.cpp:110 +msgid "Ledger, 17 x 11 in" +msgstr "Ledger, 17 x 11 Ó¢´ç" + +#: ../src/generic/prntdlgg.cpp:649 +msgid "Left margin (mm):" +msgstr "×ó±ß¾à (ºÁÃ×):" + +#: ../src/common/paper.cpp:103 +msgid "Legal, 8 1/2 x 14 in" +msgstr "Legal, 8 1/2 x 14 Ó¢´ç" + +#: ../src/common/paper.cpp:108 +msgid "Letter Small, 8 1/2 x 11 in" +msgstr "Letter Small, 8 1/2 x 11 Ó¢´ç" + +#: ../src/common/paper.cpp:102 +msgid "Letter, 8 1/2 x 11 in" +msgstr "Letter, 8 1/2 x 11 Ó¢´ç" + +#: ../src/generic/fontdlgg.cpp:216 +msgid "Light" +msgstr "Çá" + +#: ../src/generic/filedlgg.cpp:1270 ../src/gtk/filedlg.cpp:241 +#: ../src/motif/filedlg.cpp:351 ../src/msw/filedlg.cpp:483 +#, c-format +msgid "Load %s file" +msgstr "×°ÈëÎļþ %s " + +#: ../src/html/htmlwin.cpp:186 +msgid "Loading : " +msgstr "×°ÔØ:" + +#: ../src/common/imagpnm.cpp:72 +msgid "Loading Grey Ascii PNM image is not yet implemented." +msgstr "×°Èë»Ò¶È Ascii PNMͼÏñ¹¦ÄÜ»¹Ã»ÓÐʵÏÖ." + +#: ../src/common/imagpnm.cpp:75 +msgid "Loading Grey Raw PNM image is not yet implemented." +msgstr "×°Èë»Ò¶È Raw PNMͼÏñ¹¦ÄÜ»¹Ã»ÓÐʵÏÖ." + +#: ../src/generic/logg.cpp:538 +#, c-format +msgid "Log saved to the file '%s'." +msgstr "ÈÕÖ¾±£´æµ½Îļþ '%s'." + +#: ../src/gtk/mdi.cpp:435 +msgid "MDI child" +msgstr "MDI×Ó´°¿Ú" + +#: ../src/unix/mimetype.cpp:1597 +#, c-format +msgid "Mailcap file %s, line %d: incomplete entry ignored." +msgstr "Mailcap Îļþ %s, ÐÐ %d: ²»ÍêÕûÌõÄ¿±»ºöÂÔ." + +#: ../src/common/fs_mem.cpp:144 +#, c-format +msgid "Memory VFS already contains file '%s'!" +msgstr "ÄÚ´æ VFS ÒѰüº¬Îļþ '%s'!" + +#: ../src/unix/mimetype.cpp:1295 +#, c-format +msgid "Mime.types file %s, line %d: unterminated quoted string." +msgstr "Mime.ÀàÐÍÎļþ %s, ÐÐ %d: ûÓнáÊø·ûºÅµÄÒýÓÃ×Ö·û´®." + +#: ../src/generic/fontdlgg.cpp:208 +msgid "Modern" +msgstr "ÏÖ´ú" + +#: ../src/common/paper.cpp:138 +msgid "Monarch Envelope, 3 7/8 x 7 1/2 in" +msgstr "Monarch Envelope, 3 7/8 x 7 1/2 in" + +#: ../src/common/dlgcmn.cpp:141 +msgid "More..." +msgstr "¸ü¶à..." + +#: ../src/generic/dirdlgg.cpp:213 +msgid "Mounted Devices" +msgstr "¹ÒÔØÉ豸" + +#: ../src/generic/dirdlgg.cpp:208 +msgid "My Harddisk" +msgstr "ÎÒµÄÓ²ÅÌ" + +#: ../src/generic/dirdlgg.cpp:212 +msgid "My Home" +msgstr "ÎҵļÒ" + +#: ../src/generic/filedlgg.cpp:533 +msgid "Name" +msgstr "Ãû³Æ" + +#: ../src/generic/dirdlgg.cpp:427 +msgid "New..." +msgstr "´´½¨..." + +#: ../src/generic/filedlgg.cpp:610 +msgid "NewName" +msgstr "ÐÂÃû" + +#: ../src/html/helpfrm.cpp:515 +msgid "Next page" +msgstr "ÏÂÒ»Ò³" + +#: ../src/common/dlgcmn.cpp:111 ../src/common/dlgcmn.cpp:121 +#: ../src/motif/msgdlg.cpp:178 +msgid "No" +msgstr "·ñ" + +#: ../src/common/resourc2.cpp:814 ../src/common/resourc2.cpp:969 +#: ../src/common/resource.cpp:2464 ../src/common/resource.cpp:2619 +msgid "No XBM facility available!" +msgstr "ûÓпÉÓÃXBM¹¤¾ß!" + +#: ../src/common/resourc2.cpp:830 ../src/common/resource.cpp:2479 +msgid "No XPM facility available!" +msgstr "ûÓпÉÓõÄXPMÉ豸!" + +#: ../src/common/resourc2.cpp:991 ../src/common/resource.cpp:2641 +msgid "No XPM icon facility available!" +msgstr "ûÓпÉÓõÄXPMͼ±êÉ豸!" + +#: ../src/generic/helphtml.cpp:314 +msgid "No entries found." +msgstr "ûÕÒµ½ÌõÄ¿" + +#: ../src/common/fontmap.cpp:716 +#, fuzzy, c-format +msgid "" +"No font for displaying text in encoding '%s' found.\n" +"Would you like to select a font to be used for this encoding\n" +"(otherwise the text in this encoding will not be shown correctly)?" +msgstr "" +"±àÂë'%s'δ֪.\n" +"Ñ¡ÔñÓÃÓڸıàÂëµÄ×ÖÌå\n" +"(·ñÔò¸Ã±àÂëµÄÎı¾½«²»ÄÜÕýÈ·ÏÔʾ)?" + +#: ../src/common/image.cpp:758 +msgid "No handler found for image type." +msgstr "ûÓÐÕÒµ½Í¼ÏñÀàÐÍ´¦ÀíÆ÷." + +#: ../src/common/image.cpp:766 ../src/common/image.cpp:800 +#, c-format +msgid "No image handler for type %d defined." +msgstr "ûÓÐÀàÐÍ %d µÄͼÏñ´¦ÀíÆ÷." + +#: ../src/common/image.cpp:784 ../src/common/image.cpp:816 +#, c-format +msgid "No image handler for type %s defined." +msgstr "ûÓÐÀàÐÍ %sµÄͼÏñ´¦ÀíÆ÷." + +#: ../src/html/helpfrm.cpp:628 +msgid "No matching page found yet" +msgstr "No matching page found yet" + +#: ../src/common/fontmap.cpp:109 +msgid "Nordic (ISO-8859-10)" +msgstr "Nordic (ISO-8859-10)" + +#: ../src/generic/fontdlgg.cpp:212 ../src/generic/fontdlgg.cpp:215 +msgid "Normal" +msgstr "Õý³£" + +#: ../src/html/helpfrm.cpp:881 +msgid "Normal font:" +msgstr "Normal font:" + +#: ../src/common/paper.cpp:122 +msgid "Note, 8 1/2 x 11 in" +msgstr "±Ê¼Ç²¾, 8 1/2 x 11 Ó¢´ç" + +#: ../src/common/dlgcmn.cpp:127 ../src/generic/dcpsg.cpp:2270 +#: ../src/generic/dirdlgg.cpp:423 ../src/generic/filedlgg.cpp:907 +#: ../src/generic/fontdlgg.cpp:256 ../src/generic/logg.cpp:733 +#: ../src/generic/prntdlgg.cpp:467 ../src/generic/proplist.cpp:511 +#: ../src/gtk/filedlg.cpp:158 ../src/gtk/fontdlg.cpp:172 +#: ../src/html/helpfrm.cpp:909 +msgid "OK" +msgstr "È·ÈÏ" + +#: ../src/html/helpfrm.cpp:523 ../src/html/helpfrm.cpp:1183 +msgid "Open HTML document" +msgstr "´ò¿ªHTMLÎĵµ" + +#: ../src/generic/dirdlgg.cpp:297 ../src/generic/dirdlgg.cpp:605 +#: ../src/generic/filedlgg.cpp:625 ../src/generic/filedlgg.cpp:744 +msgid "Operation not permitted." +msgstr "²»ÔÊÐíµÄ²Ù×÷." + +#: ../src/common/cmdline.cpp:590 +#, c-format +msgid "Option '%s' requires a value, '=' expected." +msgstr "Ñ¡Ïî '%s' ÒªÇóÒ»¸öÖµ, ÆÚÍû '='." + +#: ../src/common/cmdline.cpp:610 +#, c-format +msgid "Option '%s' requires a value." +msgstr "Ñ¡Ïî '%s' ÐèÒªÖµ." + +#: ../src/common/cmdline.cpp:671 +#, c-format +msgid "Option '%s': '%s' cannot be converted to a date." +msgstr "Ñ¡Ïî '%s': '%s' ²»ÄÜת³ÉÈÕÆÚ." + +#: ../src/generic/prntdlgg.cpp:447 +msgid "Options" +msgstr "Ñ¡Ïî" + +#: ../src/generic/prntdlgg.cpp:443 ../src/generic/prntdlgg.cpp:638 +msgid "Orientation" +msgstr "·½Ïò" + +#: ../src/common/imagpcx.cpp:448 ../src/common/imagpcx.cpp:471 +msgid "PCX: couldn't allocate memory" +msgstr "PCX: ²»ÄÜ·ÖÅäÄÚ´æ" + +#: ../src/common/imagpcx.cpp:447 +msgid "PCX: image format unsupported" +msgstr "PCX: ͼÏñ¸ñʽ²»Ö§³Ö" + +#: ../src/common/imagpcx.cpp:470 +msgid "PCX: invalid image" +msgstr "PCX: ÎÞЧͼÏñ" + +#: ../src/common/imagpcx.cpp:434 +msgid "PCX: this is not a PCX file." +msgstr "PCX: ²»ÊÇPCXÎļþ." + +#: ../src/common/imagpcx.cpp:450 ../src/common/imagpcx.cpp:472 +msgid "PCX: unknown error !!!" +msgstr "PCX: δ֪´íÎó !!!" + +#: ../src/common/imagpcx.cpp:449 +msgid "PCX: version number too low" +msgstr "PCX: °æ±¾ºÅ̫С" + +#: ../src/common/imagpnm.cpp:96 +msgid "PNM: Couldn't allocate memory." +msgstr "PNM: ²»ÄÜ·ÖÅäÄÚ´æ." + +#: ../src/common/imagpnm.cpp:80 +msgid "PNM: File format is not recognized." +msgstr "PNM: ²»ÄÜʶ±ðµÄÎļþ¸ñʽ." + +#: ../src/common/imagpnm.cpp:112 +msgid "PNM: File seems truncated." +msgstr "PNM: ÎļþËÆºõÒѱ»½Ø¶Ï." + +#: ../src/common/prntbase.cpp:731 +#, c-format +msgid "Page %d" +msgstr "Ò³ %d" + +#: ../src/common/prntbase.cpp:729 +#, c-format +msgid "Page %d of %d" +msgstr "Ò³ %d / %d" + +#: ../src/generic/prntdlgg.cpp:604 +msgid "Page Setup" +msgstr "Ò³ÃæÉèÖÃ" + +#: ../src/generic/prntdlgg.cpp:164 +msgid "Pages" +msgstr "Ò³" + +#: ../src/generic/prntdlgg.cpp:555 ../src/generic/prntdlgg.cpp:626 +#: ../src/generic/prntdlgg.cpp:808 +msgid "Paper Size" +msgstr "Ö½ÕÅ´óС" + +#: ../src/generic/prntdlgg.cpp:433 ../src/generic/prntdlgg.cpp:615 +#: ../src/generic/prntdlgg.cpp:804 +msgid "Paper size" +msgstr "Ö½ÕÅ´óС" + +#: ../src/generic/filedlgg.cpp:537 +msgid "Permissions" +msgstr "ÔÊÐí" + +#: ../src/unix/utilsunx.cpp:443 ../src/unix/utilsunx.cpp:471 +msgid "Pipe creation failed" +msgstr "¹ÜµÀ´´½¨Ê§°Ü" + +#: ../src/gtk/fontdlg.cpp:72 +msgid "Please choose a valid font." +msgstr "ÇëÑ¡ÔñÒ»¸öÓÐЧµÄ×ÖÌå¡£" + +#: ../src/generic/filedlgg.cpp:1092 ../src/gtk/filedlg.cpp:83 +msgid "Please choose an existing file." +msgstr "ÇëÑ¡ÔñÒ»¸öÒÑ´æÔÚµÄÎļþ¡£" + +#: ../src/msw/dialup.cpp:768 +msgid "Please choose which ISP do you want to connect to" +msgstr "ÇëÑ¡ÔñÄãÏëÁ¬½ÓµÄISP" + +#: ../src/common/prntbase.cpp:107 +msgid "Please wait..." +msgstr "ÇëµÈ´ý..." + +#: ../src/generic/dcpsg.cpp:2261 ../src/generic/prntdlgg.cpp:440 +#: ../src/generic/prntdlgg.cpp:636 +msgid "Portrait" +msgstr "×ÝÏò" + +#: ../src/generic/dcpsg.cpp:391 +msgid "PostScript" +msgstr "PostScript" + +#: ../src/generic/prntdlgg.cpp:272 +msgid "PostScript file" +msgstr "PostScriptÎļþ" + +#: ../src/generic/dcpsg.cpp:2303 +msgid "PostScript:" +msgstr "PostScript:" + +#: ../src/generic/dcpsg.cpp:2266 +msgid "Preview Only" +msgstr "½öÔ¤ÀÀ" + +#: ../src/html/helpfrm.cpp:903 +msgid "Preview:" +msgstr "Ô¤ÀÀ£º" + +#: ../src/html/helpfrm.cpp:512 +msgid "Previous page" +msgstr "ǰҳ" + +#: ../src/generic/prntdlgg.cpp:113 ../src/generic/prntdlgg.cpp:127 +msgid "Print" +msgstr "´òÓ¡" + +#: ../src/common/docview.cpp:897 +msgid "Print Preview" +msgstr "´òÓ¡Ô¤ÀÀ" + +#: ../src/common/prntbase.cpp:687 ../src/common/prntbase.cpp:711 +msgid "Print Preview Failure" +msgstr "´òÓ¡Ô¤ÀÀʧ°Ü" + +#: ../src/generic/prntdlgg.cpp:172 +msgid "Print Range" +msgstr "´òÓ¡·¶Î§" + +#: ../src/generic/prntdlgg.cpp:408 ../src/generic/prntdlgg.cpp:415 +msgid "Print Setup" +msgstr "´òÓ¡ÉèÖÃ" + +#: ../src/generic/prntdlgg.cpp:455 +msgid "Print in colour" +msgstr "²ÊÉ«´òÓ¡" + +#: ../src/generic/prntdlgg.cpp:457 +msgid "Print spooling" +msgstr "´òÓ¡¼ÙÍÑ»ú" + +#: ../src/html/helpfrm.cpp:529 +msgid "Print this page" +msgstr "´òÓ¡±¾Ò³" + +#: ../src/generic/dcpsg.cpp:2265 ../src/generic/prntdlgg.cpp:150 +msgid "Print to File" +msgstr "´òÓ¡µ½Îļþ" + +#: ../src/common/prntbase.cpp:366 +msgid "Print..." +msgstr "´òÓ¡..." + +#: ../src/generic/dcpsg.cpp:2276 +msgid "Printer Command: " +msgstr "´òÓ¡»úÃüÁî: " + +#: ../src/generic/dcpsg.cpp:2281 +msgid "Printer Options: " +msgstr "´òÓ¡»úÑ¡Ïî:" + +#: ../src/generic/dcpsg.cpp:360 +msgid "Printer Settings" +msgstr "´òÓ¡»úÉèÖÃ" + +#: ../src/generic/prntdlgg.cpp:459 +msgid "Printer command:" +msgstr "´òÓ¡»úÃüÁî:" + +#: ../src/generic/prntdlgg.cpp:149 +msgid "Printer options" +msgstr "´òÓ¡»úÑ¡Ïî" + +#: ../src/generic/prntdlgg.cpp:463 +msgid "Printer options:" +msgstr "´òÓ¡»úÑ¡Ïî:" + +#: ../src/generic/prntdlgg.cpp:682 +msgid "Printer..." +msgstr "´òÓ¡»ú..." + +#: ../src/common/prntbase.cpp:106 ../src/common/prntbase.cpp:148 +msgid "Printing" +msgstr "´òÓ¡" + +#: ../src/common/prntbase.cpp:120 +msgid "Printing Error" +msgstr "´òÓ¡³ö´í" + +#: ../src/generic/printps.cpp:232 +#, c-format +msgid "Printing page %d..." +msgstr "ÕýÔÚ´òÓ¡Ò³ %d..." + +#: ../src/generic/printps.cpp:192 +msgid "Printing..." +msgstr "´òÓ¡..." + +#: ../src/common/log.cpp:356 +msgid "Program aborted." +msgstr "³ÌÐòÖÕÖ¹." + +#: ../src/common/paper.cpp:119 +msgid "Quarto, 215 x 275 mm" +msgstr "ËÄ¿ª, 215 x 275 mm" + +#: ../src/generic/logg.cpp:1023 +msgid "Question" +msgstr "ÎÊÌâ" + +#: ../src/common/ffile.cpp:133 ../src/common/ffile.cpp:154 +#, c-format +msgid "Read error on file '%s'" +msgstr "¶ÁÎļþ '%s'³ö´í" + +#: ../src/msw/registry.cpp:532 +#, c-format +msgid "Registry key '%s' already exists." +msgstr "×¢²á¼ü '%s' ÒÑ´æÔÚ." + +#: ../src/msw/registry.cpp:501 +#, c-format +msgid "Registry key '%s' does not exist, cannot rename it." +msgstr "×¢²á¼ü '%s' ²»´æÔÚ, ²»ÄܸÄÃû." + +#: ../src/msw/registry.cpp:628 +#, c-format +msgid "" +"Registry key '%s' is needed for normal system operation,\n" +"deleting it will leave your system in unusable state:\n" +"operation aborted." +msgstr "" +"Õý¹æÏµÍ³²Ù×÷ÐèҪע²á¼ü '%s',\n" +"ɾ³ýËü½«Ê¹ÏµÍ³½øÈë²»¿ÉÓÃ״̬:\n" +"²Ù×÷ÖÕÖ¹." + +#: ../src/msw/registry.cpp:432 +#, c-format +msgid "Registry value '%s' already exists." +msgstr "×¢²áÖµ '%s' ÒÑ´æÔÚ." + +#: ../src/generic/helphtml.cpp:319 +msgid "Relevant entries:" +msgstr "Ïà¹ØÌõÄ¿:" + +#: ../src/generic/progdlgg.cpp:167 +msgid "Remaining time : " +msgstr "Ê£Óàʱ¼ä : " + +#: ../src/html/helpfrm.cpp:269 +msgid "Remove current page from bookmarks" +msgstr "´ÓÊéÇ©ÖÐÒÆÈ¥µ±Ç°Ò³" + +#: ../src/msw/filedlg.cpp:445 +#, c-format +msgid "Replace file '%s'?" +msgstr "Ìæ»»Îļþ '%s'?" + +#: ../src/generic/prntdlgg.cpp:661 +msgid "Right margin (mm):" +msgstr "Óұ߾à (ºÁÃ×):" + +#: ../src/generic/fontdlgg.cpp:206 +msgid "Roman" +msgstr "ÂÞÂí" + +#: ../src/generic/filedlgg.cpp:1286 ../src/gtk/filedlg.cpp:257 +#: ../src/motif/filedlg.cpp:353 ../src/msw/filedlg.cpp:484 +#, c-format +msgid "Save %s file" +msgstr "±£´æÎļþ %s " + +#: ../src/common/docview.cpp:249 +msgid "Save as" +msgstr "Áí´æÎª" + +#: ../src/generic/logg.cpp:473 +msgid "Save log contents to file" +msgstr "°ÑÈÕÖ¾ÄÚÈݱ£´æµ½Îļþ" + +#: ../src/generic/fontdlgg.cpp:209 +msgid "Script" +msgstr "Script" + +#: ../src/generic/helpwxht.cpp:161 ../src/html/helpfrm.cpp:414 +#: ../src/html/helpfrm.cpp:434 +msgid "Search" +msgstr "ËÑË÷" + +#: ../src/html/helpfrm.cpp:416 +msgid "" +"Search contents of help book(s) for all occurences of the text you typed " +"above" +msgstr "´Ó°ïÖúÄÚÈÝÖÐËÑË÷·ûºÏÄãÔÚÉÏÃæÊäÈëµÄÕýÎĵÄËùÓÐÌõÄ¿" + +#: ../src/html/helpfrm.cpp:735 +msgid "Search in all books" +msgstr "ÔÚË÷ÒýÊéÖÐËÑË÷" + +#: ../src/html/helpfrm.cpp:628 +msgid "Searching..." +msgstr "ËÑË÷..." + +#: ../src/generic/dirdlgg.cpp:191 +msgid "Sections" +msgstr "¶Î" + +#: ../src/common/ffile.cpp:221 +#, c-format +msgid "Seek error on file '%s'" +msgstr "Îļþ '%s'¶¨Î»´íÎó" + +#: ../src/common/docview.cpp:1469 +msgid "Select a document template" +msgstr "Ñ¡ÔñÎĵµÄ£°å" + +#: ../src/common/docview.cpp:1494 +msgid "Select a document view" +msgstr "Ñ¡ÔñÎĵµÊÓͼ" + +#: ../src/common/docview.cpp:1371 ../src/common/docview.cpp:1422 +msgid "Select a file" +msgstr "Ñ¡ÔñÎļþ" + +#: ../src/generic/dcpsg.cpp:2264 +msgid "Send to Printer" +msgstr "·¢µ½´òÓ¡»ú" + +#: ../src/common/cmdline.cpp:627 +#, c-format +msgid "Separator expected after the option '%s'." +msgstr "ÆÚÍûÔÚÑ¡Ïî '%s'ºó´æÔÚ·Ö¸ô·û." + +#: ../src/common/dlgcmn.cpp:138 +msgid "Setup" +msgstr "ÉèÖÃ" + +#: ../src/generic/prntdlgg.cpp:155 +msgid "Setup..." +msgstr "ÉèÖÃ..." + +#: ../src/msw/dialup.cpp:539 +msgid "Several active dialup connections found, choosing one randomly." +msgstr "ÕÒµ½¶à¸ö»î¶¯²¦ºÅÁ¬½Ó, Ëæ»úÑ¡ÔñÒ»¸ö." + +#: ../src/html/helpfrm.cpp:331 +msgid "Show all" +msgstr "ÏÔʾËùÓÐ" + +#: ../src/html/helpfrm.cpp:365 +msgid "Show all items in index" +msgstr "°ÑËùÓÐÏîÄ¿ÏÔʾΪË÷Òý" + +#: ../src/generic/filedlgg.cpp:913 +msgid "Show hidden files" +msgstr "ÏÔʾÒþ²ØÎļþ" + +#: ../src/html/helpfrm.cpp:496 +msgid "Show/hide navigation panel" +msgstr "ÏÔʾ/Òþ²Øµ¼º½Ãæ°å" + +#: ../src/generic/filedlgg.cpp:534 +msgid "Size" +msgstr "´óС" + +#: ../src/generic/fontdlgg.cpp:214 +msgid "Slant" +msgstr "Çãб" + +#: ../src/common/docview.cpp:306 +msgid "Sorry, could not open this file for saving." +msgstr "¶Ô²»Æð£¬²»ÄÜ´ò¿ªÎļþÒԱ㱣´æ¡£" + +#: ../src/common/docview.cpp:342 ../src/common/docview.cpp:354 +#: ../src/common/docview.cpp:1390 +msgid "Sorry, could not open this file." +msgstr "¶Ô²»Æð£¬²»ÄÜ´ò¿ªÎļþ¡£" + +#: ../src/common/docview.cpp:313 +msgid "Sorry, could not save this file." +msgstr "¶Ô²»Æð£¬²»Äܱ£´æÎļþ¡£" + +#: ../src/common/prntbase.cpp:687 +msgid "Sorry, not enough memory to create a preview." +msgstr "¶Ô²»Æð, ûÓÐ×ã¹»ÄÚ´æ´´½¨Ô¤ÀÀ." + +#: ../src/common/paper.cpp:111 +msgid "Statement, 5 1/2 x 8 1/2 in" +msgstr "Statement, 5 1/2 x 8 1/2 in" + +#: ../src/generic/logg.cpp:598 +msgid "Status: " +msgstr "״̬£º" + +#: ../src/generic/fontdlgg.cpp:210 +msgid "Swiss" +msgstr "ÈðÊ¿" + +#: ../src/common/imagtiff.cpp:192 ../src/common/imagtiff.cpp:203 +#: ../src/common/imagtiff.cpp:314 +msgid "TIFF: Couldn't allocate memory." +msgstr "TIFF: ²»ÄÜ·ÖÅäÄÚ´æ." + +#: ../src/common/imagtiff.cpp:163 +msgid "TIFF: Error loading image." +msgstr "TIFF: ×°ÔØÍ¼Ïñ´íÎó." + +#: ../src/common/imagtiff.cpp:214 +msgid "TIFF: Error reading image." +msgstr "TIFF: ¶ÁͼÏñ´íÎó." + +#: ../src/common/imagtiff.cpp:291 +msgid "TIFF: Error saving image." +msgstr "TIFF: ±£´æÍ¼Ïñ´íÎó." + +#: ../src/common/imagtiff.cpp:338 +msgid "TIFF: Error writing image." +msgstr "TIFF:дͼÏñ´íÎó." + +#: ../src/common/paper.cpp:109 +msgid "Tabloid, 11 x 17 in" +msgstr "Tabloid, 11 x 17 Ó¢´ç" + +#: ../src/generic/fontdlgg.cpp:211 +msgid "Teletype" +msgstr "µç´«´ò×Ö»ú" + +#: ../src/common/docview.cpp:1469 +msgid "Templates" +msgstr "Ä£°å" + +#: ../src/generic/dirdlgg.cpp:218 +msgid "Temporary" +msgstr "ÁÙʱµÄ" + +#: ../src/common/fontmap.cpp:110 +msgid "Thai (ISO-8859-11)" +msgstr "Ì©Óï (ISO-8859-11)" + +#: ../src/generic/dirdlgg.cpp:210 +msgid "The Computer" +msgstr "¼ÆËã»ú" + +#: ../src/common/fontmap.cpp:511 +#, c-format +msgid "" +"The charset '%s' is unknown. You may select\n" +"another charset to replace it with or choose\n" +"[Cancel] if it cannot be replaced" +msgstr "" +"δ֪ ×Ö·û¼¯'%s'. Ñ¡ÔñÆäËü×Ö·û¼¯\n" +"´úÌæËü£¬»ò£¬Èç¹û²»ÄÜ\n" +"±»Ìæ´úÑ¡Ôñ[È¡Ïû] " + +#: ../src/msw/ole/dataobj.cpp:169 +#, c-format +msgid "The clipboard format '%d' doesn't exist." +msgstr "¼ôÌù°å¸ñʽ '%d' ²»´æÔÚ." + +#: ../src/generic/dirdlgg.cpp:536 +msgid "The directory " +msgstr "Ŀ¼" + +#: ../src/common/docview.cpp:1676 +#, c-format +msgid "" +"The file '%s' doesn't exist and couldn't be opened.\n" +"It has been also removed from the MRU files list." +msgstr "" +"Îļþ '%s' ²»´æÔÚ,²»Äܱ»´ò¿ª.\n" +"ÒÑ´ÓMRUÎļþÁбíÖÐÒÆÈ¥." + +#: ../src/common/cmdline.cpp:761 +#, c-format +msgid "The required parameter '%s' was not specified." +msgstr "±ØÐëµÄ²ÎÊý '%s' ûÓÐÖ¸¶¨." + +#: ../src/common/textcmn.cpp:121 +msgid "The text couldn't be saved." +msgstr "Îı¾²»Äܱ»±£´æ¡£" + +#: ../src/common/cmdline.cpp:740 +#, c-format +msgid "The value for the option '%s' must be specified." +msgstr "Ñ¡Ïî '%s'µÄÖµ±ØÐë±»Ö¸¶¨." + +#: ../src/msw/dialup.cpp:415 +#, c-format +msgid "" +"The version of remote access service (RAS) installed on this machine is " +"tooold, please upgrade (the following required function is missing: %s)." +msgstr "°²×°ÔÚ±¾»úµÄÔ¶³Ì·ÃÎÊ·þÎñ(RAS)Ì«¾É, Çë¸üÐÂËü (ÏÂÁбØÐëµÃº¯Êýȱʧ: %s)." + +#: ../src/msw/thread.cpp:1083 +msgid "" +"Thread module initialization failed: can not store value in thread local " +"storage" +msgstr "Ïß³ÌÄ£¿é³õʼ»¯Ê§°Ü: ²»ÄÜÔÚÏ̱߳¾µØ´æ´¢ÇøÖдæ·ÅÖµ" + +#: ../src/unix/threadpsx.cpp:1441 +msgid "Thread module initialization failed: failed to create thread key" +msgstr "Ïß³ÌÄ£¿é³õʼ»¯Ê§°Ü: ´´½¨Ï̼߳üʧ°Ü" + +#: ../src/msw/thread.cpp:1071 +msgid "" +"Thread module initialization failed: impossible to allocate index in thread " +"local storage" +msgstr "Ïß³ÌÄ£¿é³õʼ»¯Ê§°Ü: ²»ÄÜÔÚÏ̱߳¾µØ´æ´¢ÇøÖзÖÅäË÷Òý" + +#: ../src/unix/threadpsx.cpp:962 +msgid "Thread priority setting is ignored." +msgstr "Ïß³ÌÓÅÏȼ¶ÉèÖñ»ºöÂÔ." + +#: ../src/msw/mdi.cpp:184 +msgid "Tile &Horizontally" +msgstr "" + +#: ../src/msw/mdi.cpp:185 +msgid "Tile &Vertically" +msgstr "" + +#: ../src/generic/filedlgg.cpp:536 +msgid "Time" +msgstr "ʱ¼ä" + +#: ../src/generic/tipdlg.cpp:162 +msgid "Tip of the Day" +msgstr "ÿÈÕ¼¼ÇÉ" + +#: ../src/generic/tipdlg.cpp:138 +msgid "Tips not available, sorry!" +msgstr "¶Ô²»Æð£¬Ã»ÓÐËùÐè¼¼ÇÉ!" + +#: ../src/generic/prntdlgg.cpp:191 +msgid "To:" +msgstr "µ½:" + +#: ../src/generic/prntdlgg.cpp:650 +msgid "Top margin (mm):" +msgstr "ÉÏÒ³±ß¾à (ºÁÃ×):" + +#: ../src/common/fs_mem.cpp:202 +#, c-format +msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!" +msgstr "ÊÔͼ´ÓÄÚ´æVFSÖÐÒÆÈ¥Îļþ'%s', µ«Ëü²¢Ã»Óб»×°ÈëÄÚ´æ!" + +#: ../src/common/sckaddr.cpp:107 +msgid "Trying to solve a NULL hostname: giving up" +msgstr "ÊÔͼ½â¾ö NULL Ö÷»úÃû: ·ÅÆú" + +#: ../src/common/fontmap.cpp:108 +msgid "Turkish (ISO-8859-9)" +msgstr "ÍÁ¶úÆäÓï (ISO-8859-9)" + +#: ../src/common/paper.cpp:140 +msgid "US Std Fanfold, 14 7/8 x 11 in" +msgstr "US ±ê×¼¸´Ð´²¾, 14 7/8 x 11 Ó¢´ç" + +#: ../src/html/htmlwin.cpp:174 +#, c-format +msgid "Unable to open requested HTML document: %s" +msgstr "²»ÄÜ´ò¿ªHTMLÎĵµ: %s" + +#: ../src/generic/fontdlgg.cpp:242 +msgid "Underline" +msgstr "Ï»®Ïß" + +#: ../src/common/resourc2.cpp:305 ../src/common/resourc2.cpp:319 +#: ../src/common/resourc2.cpp:335 ../src/common/resourc2.cpp:349 +#: ../src/common/resourc2.cpp:1378 ../src/common/resourc2.cpp:1392 +#: ../src/common/resourc2.cpp:1408 ../src/common/resourc2.cpp:1422 +#: ../src/common/resource.cpp:1818 ../src/common/resource.cpp:1832 +#: ../src/common/resource.cpp:1849 ../src/common/resource.cpp:1863 +#: ../src/common/resource.cpp:1948 ../src/common/resource.cpp:1962 +#: ../src/common/resource.cpp:1978 ../src/common/resource.cpp:1992 +#: ../src/common/resource.cpp:3032 ../src/common/resource.cpp:3046 +#: ../src/common/resource.cpp:3063 ../src/common/resource.cpp:3077 +msgid "Unexpected end of file whilst parsing resource." +msgstr "ÔÚ½âÎö×ÊԴʱÒâÍâµ½´ïÎļþ½áβ." + +#: ../src/common/cmdline.cpp:712 +#, c-format +msgid "Unexpected parameter '%s'" +msgstr "ÒâÍâ²ÎÊý '%s'" + +#: ../src/msw/dde.cpp:1030 +#, c-format +msgid "Unknown DDE error %08x" +msgstr "δ֪ DDE ´íÎó %08x" + +#: ../src/common/fontmap.cpp:332 +#, c-format +msgid "Unknown encoding (%d)" +msgstr "λÖñàÂë (%d)" + +#: ../src/unix/mimetype.cpp:1338 +#, c-format +msgid "Unknown field in file %s, line %d: '%s'." +msgstr "ÔÚÎļþ %s, ÐÐ %dÊÇδ֪×Ö¶Î: '%s'." + +#: ../src/common/cmdline.cpp:496 +#, c-format +msgid "Unknown long option '%s'" +msgstr "δ֪longÑ¡Ïî '%s'" + +#: ../src/common/cmdline.cpp:518 +#, c-format +msgid "Unknown option '%s'" +msgstr "δ֪ѡÏî '%s'" + +#: ../src/common/mimecmn.cpp:161 +#, c-format +msgid "Unmatched '{' in an entry for mime type %s." +msgstr "ÀàÐÍ %sÖÐÓв»ÅäÌ×µÄ'{'." + +#: ../src/common/docview.cpp:1923 ../src/common/docview.cpp:1938 +#: ../src/common/docview.cpp:1965 +msgid "Unnamed command" +msgstr "δÃüÃûµÄÃüÁî" + +#: ../src/common/resourc2.cpp:687 ../src/common/resource.cpp:2336 +#, c-format +msgid "Unrecognized style %s whilst parsing resource." +msgstr "½âÎö×ÊԴʱÓöµ½ÎÞ·¨Ê¶±ðµÄ·ç¸ñ %s." + +#: ../src/msw/clipbrd.cpp:268 ../src/msw/clipbrd.cpp:369 +msgid "Unsupported clipboard format." +msgstr "²»Ö§³ÖµÄ¼ôÌù°å¸ñʽ" + +#: ../src/common/cmdline.cpp:797 +#, c-format +msgid "Usage: %s" +msgstr "Ó÷¨: %s" + +#: ../src/generic/dirdlgg.cpp:215 +msgid "User" +msgstr "Óû§" + +#: ../src/generic/dirdlgg.cpp:214 +msgid "User Local" +msgstr "±¾µØÓû§" + +#: ../src/common/valtext.cpp:188 +msgid "Validation conflict" +msgstr "ÑéÖ¤³åÍ»" + +#: ../src/generic/dirdlgg.cpp:216 +msgid "Variables" +msgstr "±äÁ¿" + +#: ../src/generic/filedlgg.cpp:861 +msgid "View files as a detailed view" +msgstr "°´ÏêϸÊÓͼ¹Û¿´Îļþ" + +#: ../src/generic/filedlgg.cpp:855 +msgid "View files as a list view" +msgstr "°´ÁбíÊÓͼ¹Û¿´Îļþ" + +#: ../src/common/docview.cpp:1494 +msgid "Views" +msgstr "ÊÓͼ" + +#: ../src/unix/utilsunx.cpp:270 ../src/unix/utilsunx.cpp:622 +msgid "Waiting for subprocess termination failed" +msgstr "µÈ´ý×Ó¹ý³ÌÖÕֹʧ°Ü" + +#: ../src/common/docview.cpp:437 ../src/common/resource.cpp:121 +msgid "Warning" +msgstr "¾¯¸æ" + +#: ../src/common/log.cpp:366 +msgid "Warning: " +msgstr "¾¯¸æ:" + +#: ../src/html/htmlpars.cpp:177 +msgid "Warning: attempt to remove HTML tag handler from empty stack." +msgstr "¾¯¸æ: ÊÓͼ´Ó¿ÕÕ»ÖÐÒÆÈ¥HTML±êÇ©´¦ÀíÆ÷." + +#: ../src/common/fontmap.cpp:100 +#, fuzzy +msgid "Western European (ISO-8859-1)" +msgstr "West European (ISO-8859-1/Latin 1)" + +#: ../src/common/fontmap.cpp:114 +#, fuzzy +msgid "Western European with Euro (ISO-8859-15)" +msgstr "West European new (ISO-8859-15/Latin 0)" + +#: ../src/html/helpfrm.cpp:406 +msgid "Whole words only" +msgstr "½öΪÕû×Ö" + +#: ../src/msw/utils.cpp:547 +msgid "Win32s on Windows 3.1" +msgstr "Win32s on Windows 3.1" + +#: ../src/msw/mdi.cpp:1318 +msgid "Window" +msgstr "´°¿Ú" + +#: ../src/msw/utils.cpp:585 +msgid "Windows 3.1" +msgstr "Windows 3.1" + +#: ../src/msw/utils.cpp:551 +#, c-format +msgid "Windows 9%c" +msgstr "Windows 9%c" + +#: ../src/common/fontmap.cpp:122 +msgid "Windows Arabic (CP 1256)" +msgstr "Windows Arabic (CP 1256)" + +#: ../src/common/fontmap.cpp:123 +msgid "Windows Baltic (CP 1257)" +msgstr "Windows Baltic (CP 1257)" + +#: ../src/common/fontmap.cpp:116 +#, fuzzy +msgid "Windows Central European (CP 1250)" +msgstr "Windows Ï£²®À´ (CP 1255)" + +#: ../src/common/fontmap.cpp:117 +msgid "Windows Cyrillic (CP 1251)" +msgstr "Windows Cyrillic (CP 1251)" + +#: ../src/common/fontmap.cpp:119 +msgid "Windows Greek (CP 1253)" +msgstr "Windows Greek (CP 1253)" + +#: ../src/common/fontmap.cpp:121 +msgid "Windows Hebrew (CP 1255)" +msgstr "Windows Ï£²®À´ (CP 1255)" + +#: ../src/common/fontmap.cpp:120 +msgid "Windows Turkish (CP 1254)" +msgstr "Windows ÍÁ¶úÆäÓï (CP 1254)" + +#: ../src/common/fontmap.cpp:118 +#, fuzzy +msgid "Windows Western European (CP 1252)" +msgstr "Windows Latin 1 (CP 1252)" + +#: ../src/common/fontmap.cpp:124 +msgid "Windows/DOS OEM (CP 437)" +msgstr "Windows/DOS OEM (CP 437)" + +#: ../src/common/ffile.cpp:168 +#, c-format +msgid "Write error on file '%s'" +msgstr "дÎļþ '%s'´íÎó" + +#: ../src/generic/dcpsg.cpp:2321 +msgid "X Scaling" +msgstr "XËõ·Å" + +#: ../src/generic/dcpsg.cpp:2330 +msgid "X Translation" +msgstr "XÆ½ÒÆ" + +#: ../src/generic/dcpsg.cpp:2325 +msgid "Y Scaling" +msgstr "YËõ·Å" + +#: ../src/generic/dcpsg.cpp:2334 +msgid "Y Translation" +msgstr "YÆ½ÒÆ" + +#: ../src/common/dlgcmn.cpp:109 ../src/common/dlgcmn.cpp:116 +#: ../src/motif/msgdlg.cpp:178 +msgid "Yes" +msgstr "ÊÇ" + +#: ../src/generic/dirdlgg.cpp:571 +msgid "You cannot add a new directory to this section." +msgstr "Äã²»ÄÜÏò¸ÃÏîÖмÓÈëеÄĿ¼." + +#: ../src/common/docview.cpp:2034 +msgid "[EMPTY]" +msgstr "[¿Õ]" + +#: ../src/msw/dde.cpp:997 +msgid "a DDEML application has created a prolonged race condition." +msgstr "DDEMLÓ¦ÓóÌÐòÒÑ´´½¨ÑÓʱraceÌõ¼þ." + +#: ../src/msw/dde.cpp:985 +msgid "" +"a DDEML function was called without first calling the DdeInitialize " +"function,\n" +"or an invalid instance identifier\n" +"was passed to a DDEML function." +msgstr "" +"ûÓе÷ÓÃDdeInitialize³õʼ»¯º¯Êý¾Íµ÷ÓÃDDEMLÆäËüº¯Êý,\n" +"»ò´«¸øDDEMLº¯ÊýµÄÊÇ\n" +"ÎÞЧµÄʵÀý±êʶ." + +#: ../src/msw/dde.cpp:1003 +msgid "a client's attempt to establish a conversation has failed." +msgstr "¿Í»§ÊÔͼ½¨Á¢µÄ»á»°ÒÑʧ°Ü." + +#: ../src/msw/dde.cpp:1000 +msgid "a memory allocation failed." +msgstr "ÄÚ´æ·ÖÅäʧ°Ü." + +#: ../src/msw/dde.cpp:994 +msgid "a parameter failed to be validated by the DDEML." +msgstr "DDEML²ÎÊýÑé֤ʧ°Ü." + +#: ../src/msw/dde.cpp:976 +msgid "a request for a synchronous advise transaction has timed out." +msgstr "ͬ²½adviseÊÂÎñÇëÇóÒѳ¬Ê±." + +#: ../src/msw/dde.cpp:982 +msgid "a request for a synchronous data transaction has timed out." +msgstr "ͬ²½dataÊÂÎñÇëÇóÒѳ¬Ê±." + +#: ../src/msw/dde.cpp:991 +msgid "a request for a synchronous execute transaction has timed out." +msgstr "ͬ²½executeÊÂÎñÇëÇóÒѳ¬Ê±." + +#: ../src/msw/dde.cpp:1009 +msgid "a request for a synchronous poke transaction has timed out." +msgstr "ͬ²½pokeÊÂÎñÇëÇóÒѳ¬Ê±." + +#: ../src/msw/dde.cpp:1024 +msgid "a request to end an advise transaction has timed out." +msgstr "ÖÕÖ¹½¨ÒéÊÂÎñµÄÇëÇóÒѳ¬Ê±." + +#: ../src/msw/dde.cpp:1018 +msgid "" +"a server-side transaction was attempted on a conversation\n" +"that was terminated by the client, or the server\n" +"terminated before completing a transaction." +msgstr "" +"·þÎñÆ÷¶ËÊÂÎñÊÓͼ´¦Àí\n" +"Òѱ»¿Í»§¶ËÖÕÖ¹µÄ»á»°, »ò·þÎñÆ÷\n" +"ÔÚÍê³ÉÊÂÎñǰÖÕÖ¹." + +#: ../src/msw/dde.cpp:1006 +msgid "a transaction failed." +msgstr "ÊÂÎñʧ°Ü." + +#: ../src/common/utilscmn.cpp:466 +msgid "alt" +msgstr "alt" + +#: ../src/msw/dde.cpp:988 +msgid "" +"an application initialized as APPCLASS_MONITOR has\n" +"attempted to perform a DDE transaction,\n" +"or an application initialized as APPCMD_CLIENTONLY has \n" +"attempted to perform server transactions." +msgstr "" +"³õʼ»¯ÎªAPPCLASS_MONITORµÄÓ¦ÓóÌÐò\n" +"ÊÔͼִÐÐDDEÊÂÎñ,\n" +"»ò³õʼ»¯ÎªAPPCMD_CLIENTONLYµÄÓ¦ÓóÌÐò\n" +"ÊÓͼִÐзþÎñÆ÷ÊÂÎñ." + +#: ../src/msw/dde.cpp:1012 +msgid "an internal call to the PostMessage function has failed. " +msgstr "ÄÚ²¿µ÷ÓÃPostMessageʧ°Ü. " + +#: ../src/msw/dde.cpp:1021 +msgid "an internal error has occurred in the DDEML." +msgstr "ÔÚDDEMLÖз¢ÉúÄÚ²¿´íÎó." + +#: ../src/msw/dde.cpp:1027 +msgid "" +"an invalid transaction identifier was passed to a DDEML function.\n" +"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n" +"the transaction identifier for that callback is no longer valid." +msgstr "" +"´«¸øDDEMLº¯ÊýµÄÊÇÎÞЧµÄÊÂÎñ±êʶ·û.\n" +"Ò»µ©Ó¦ÓóÌÐò´ÓXTYP_XACT_COMPLETE»Øµ÷º¯Êý·µ»Ø,\n" +"»Øµ÷º¯ÊýÊÂÎñ±êʶ·û¾Í²»ÔÙÓÐЧ." + +#: ../src/common/fileconf.cpp:1449 +#, c-format +msgid "attempt to change immutable key '%s' ignored." +msgstr "ºöÂÔ¶ÔÖ»¶Á¼ü '%s'µÄÐÞ¸Ä." + +#: ../src/common/ffile.cpp:101 +#, c-format +msgid "can't close file '%s'" +msgstr "²»ÄܹرÕÎļþ '%s'" + +#: ../src/common/file.cpp:257 +#, c-format +msgid "can't close file descriptor %d" +msgstr "²»ÄܹرÕÎļþÃèÊö×Ó %d" + +#: ../src/common/file.cpp:557 ../src/common/file.cpp:567 +#, c-format +msgid "can't commit changes to file '%s'" +msgstr "²»ÄܰÑÐÞ¸ÄÌá½»¸øÎļþ '%s'" + +#: ../src/common/file.cpp:200 +#, c-format +msgid "can't create file '%s'" +msgstr "²»ÄÜ´´½¨Îļþ '%s'" + +#: ../src/common/fileconf.cpp:919 +#, c-format +msgid "can't delete user configuration file '%s'" +msgstr "²»ÄÜɾ³ýÓû§ÅäÖÃÎļþ '%s'" + +#: ../src/common/file.cpp:438 +#, c-format +msgid "can't determine if the end of file is reached on descriptor %d" +msgstr "²»ÄÜÈ·¶¨ÊÇ·ñÒÑ´ïÎļþ %d µÄβ²¿" + +#: ../src/common/file.cpp:404 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "²»ÄÜ»ñµÃÎļþÃèÊö×Ó %dµÄÎļþµÄ³¤¶È" + +#: ../src/msw/utils.cpp:378 +msgid "can't find user's HOME, using current directory." +msgstr "ÕÒ²»µ½Óû§Ä¿Â¼HOME, ʹÓõ±Ç°Ä¿Â¼." + +#: ../src/common/file.cpp:319 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "²»ÄÜË¢ÐÂÎļþÃèÊö×Ó %d" + +#: ../src/common/file.cpp:373 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "²»ÄÜ»ñµÃÎļþÃèÊö×Ó %dµÄÖ¸ÕëλÖÃ" + +#: ../src/common/fontmap.cpp:646 +msgid "can't load any font, aborting" +msgstr "²»ÄÜ×°ÔØÈκÎ×ÖÌå, ÕýÔÚÖÐÖ¹" + +#: ../src/common/ffile.cpp:85 ../src/common/file.cpp:243 +#, c-format +msgid "can't open file '%s'" +msgstr "²»ÄÜ´ò¿ªÎļþ '%s'" + +#: ../src/common/fileconf.cpp:318 +#, c-format +msgid "can't open global configuration file '%s'." +msgstr "²»ÄÜ´ò¿ªÈ«¾ÖÅäÖÃÎļþ '%s'." + +#: ../src/common/fileconf.cpp:330 +#, c-format +msgid "can't open user configuration file '%s'." +msgstr "²»ÄÜ´ò¿ªÓû§ÅäÖÃÎļþ '%s'." + +#: ../src/common/fileconf.cpp:799 +msgid "can't open user configuration file." +msgstr "²»ÄÜ´ò¿ªÓû§ÅäÖÃÎļþ." + +#: ../src/common/file.cpp:285 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "²»ÄÜ´ÓÎļþÃèÊö×Ó %dÖжÁ" + +#: ../src/common/file.cpp:552 ../src/common/file.cpp:562 +#, c-format +msgid "can't remove file '%s'" +msgstr "²»ÄÜɾ³ýÎļþ '%s'" + +#: ../src/common/file.cpp:580 ../src/common/file.cpp:583 +#, c-format +msgid "can't remove temporary file '%s'" +msgstr "²»ÄÜɾ³ýÁÙʱÎļþ '%s'" + +#: ../src/common/file.cpp:359 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "²»Äܶ¨Î»ÎļþÃèÊö×Ó %d" + +#: ../src/common/textfile.cpp:359 +#, c-format +msgid "can't write file '%s' to disk." +msgstr "²»ÄܰÑÎļþ '%s'дµ½´ÅÅÌ." + +#: ../src/common/file.cpp:304 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "²»ÄÜдµ½ÎļþÃèÊö×Ó %d" + +#: ../src/common/fileconf.cpp:806 +msgid "can't write user configuration file." +msgstr "²»ÄÜдÓû§ÅäÖÃÎļþ." + +#: ../src/common/intl.cpp:374 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "ÕÒ²»µ½Óò '%s'µÄĿ¼Îļþ." + +#: ../src/common/utilscmn.cpp:464 +msgid "ctrl" +msgstr "ctrl" + +#: ../src/common/cmdline.cpp:912 +msgid "date" +msgstr "ÈÕÆÚ" + +#: ../src/common/datetime.cpp:3172 +msgid "eighteenth" +msgstr "µÚÊ®°Ë" + +#: ../src/common/datetime.cpp:3162 +msgid "eighth" +msgstr "µÚ°Ë" + +#: ../src/common/datetime.cpp:3165 +msgid "eleventh" +msgstr "µÚʮһ" + +#: ../src/common/fileconf.cpp:1436 +#, c-format +msgid "entry '%s' appears more than once in group '%s'" +msgstr "ÌõÄ¿ '%s' ÔÚ×é '%s'ÖÐÒѳöÏÖÒ»´ÎÒÔÉÏ" + +#: ../src/msw/dialup.cpp:861 +msgid "establish" +msgstr "½¨Á¢" + +#: ../src/common/ffile.cpp:182 +#, c-format +msgid "failed to flush the file '%s'" +msgstr "Ë¢ÐÂÎļþ '%s'ʧ°Ü" + +#: ../src/common/datetime.cpp:3169 +msgid "fifteenth" +msgstr "µÚÊ®Îå" + +#: ../src/common/datetime.cpp:3159 +msgid "fifth" +msgstr "µÚÎå" + +#: ../src/common/fileconf.cpp:480 +#, c-format +msgid "file '%s', line %d: '%s' ignored after group header." +msgstr "Îļþ '%s', ÐÐ %d: '%s' ×éÍ·ºó±¸ºöÂÔ." + +#: ../src/common/fileconf.cpp:509 +#, c-format +msgid "file '%s', line %d: '=' expected." +msgstr "Îļþ '%s', ÐÐ %d: ÆÚÍû '='." + +#: ../src/common/fileconf.cpp:535 +#, c-format +msgid "file '%s', line %d: key '%s' was first found at line %d." +msgstr "Îļþ '%s', ÐÐ %d: ¼ü '%s' µÚÒ»´Î³öÏÖÔÚÐÐ %d." + +#: ../src/common/fileconf.cpp:525 +#, c-format +msgid "file '%s', line %d: value for immutable key '%s' ignored." +msgstr "Îļþ '%s', ÐÐ %d: ºöÂÔ²»ÄÜÐ޸ļü '%s'µÄÖµ." + +#: ../src/common/fileconf.cpp:448 +#, c-format +msgid "file '%s': unexpected character %c at line %d." +msgstr "Îļþ '%s': ·ÇÔ¤ÆÚµÄ×Ö·û %c ´æÔÚÓÚÐÐ %d.ÖÐ" + +#: ../src/common/datetime.cpp:3155 +msgid "first" +msgstr "µÚÒ»" + +#: ../src/common/datetime.cpp:3168 +msgid "fourteenth" +msgstr "µÚÊ®ËÄ" + +#: ../src/common/datetime.cpp:3158 +msgid "fourth" +msgstr "µÚËÄ" + +#: ../src/common/timercmn.cpp:240 +msgid "gmtime() failed" +msgstr "gmtime() ʧ°Ü" + +#: ../src/msw/dialup.cpp:861 +msgid "initiate" +msgstr "³õʼ»¯" + +#: ../src/common/file.cpp:442 +msgid "invalid eof() return value." +msgstr "ÎÞЧµÄeof()·µ»ØÖµ." + +#: ../src/generic/logg.cpp:1037 +msgid "invalid message box return value" +msgstr "ÏûÏ¢¿ò·µ»ØÎÞЧµÄÖµ" + +#: ../src/html/helpfrm.cpp:874 +msgid "large" +msgstr "´ó" + +#: ../src/common/intl.cpp:575 +#, c-format +msgid "locale '%s' can not be set." +msgstr "²»ÄÜÉèÖÃÏÖ³¡locale '%s'." + +#: ../src/common/intl.cpp:369 +#, c-format +msgid "looking for catalog '%s' in path '%s'." +msgstr "²éÕÒĿ¼ '%s' ÔÚ·¾¶ '%s'ÏÂ." + +#: ../src/html/helpfrm.cpp:874 +msgid "medium" +msgstr "ÖÐ" + +#: ../src/common/datetime.cpp:3319 +msgid "midnight" +msgstr "ÎçÒ¹" + +#: ../src/common/timercmn.cpp:236 +msgid "mktime() failed" +msgstr "mktime()ʧ°Ü" + +#: ../src/common/datetime.cpp:3173 +msgid "nineteenth" +msgstr "µÚÊ®¾Å" + +#: ../src/common/datetime.cpp:3163 +msgid "ninth" +msgstr "µÚ¾Å" + +#: ../src/msw/dde.cpp:972 +msgid "no DDE error." +msgstr "ûÓÐDDE´íÎó" + +#: ../src/html/helpdata.cpp:644 +msgid "noname" +msgstr "δÃû" + +#: ../src/common/datetime.cpp:3318 +msgid "noon" +msgstr "ÖÐÎç" + +#: ../src/common/cmdline.cpp:911 +msgid "num" +msgstr "num" + +#: ../src/msw/dde.cpp:1015 +msgid "reentrancy problem." +msgstr "ÖØÈëÎÊÌâ" + +#: ../src/common/datetime.cpp:3156 +msgid "second" +msgstr "µÚ¶þ" + +#: ../src/common/datetime.cpp:3171 +msgid "seventeenth" +msgstr "µÚÊ®Æß" + +#: ../src/common/datetime.cpp:3161 +msgid "seventh" +msgstr "µÚÆß" + +#: ../src/common/utilscmn.cpp:468 +msgid "shift" +msgstr "shift" + +#: ../src/common/datetime.cpp:3170 +msgid "sixteenth" +msgstr "µÚÊ®Áù" + +#: ../src/common/datetime.cpp:3160 +msgid "sixth" +msgstr "µÚÁù" + +#: ../src/html/helpfrm.cpp:874 +msgid "small" +msgstr "С" + +#: ../src/common/cmdline.cpp:910 +msgid "str" +msgstr "str" + +#: ../src/common/datetime.cpp:3164 +msgid "tenth" +msgstr "µÚÊ®" + +#: ../src/msw/dde.cpp:979 +msgid "the response to the transaction caused the DDE_FBUSY bit to be set." +msgstr "¶ÔʼþµÄÏìÓ¦µ¼ÖÂDDE_FBUSYλ±»ÉèÖÃ." + +#: ../src/common/datetime.cpp:3157 +msgid "third" +msgstr "µÚÈý" + +#: ../src/common/datetime.cpp:3167 +msgid "thirteenth" +msgstr "µÚÊ®Èý" + +#: ../src/common/datetime.cpp:3012 +msgid "today" +msgstr "½ñÌì" + +#: ../src/common/datetime.cpp:3014 +msgid "tomorrow" +msgstr "Ã÷Ìì" + +#: ../src/common/datetime.cpp:3166 +msgid "twelfth" +msgstr "µÚÊ®¶þ" + +#: ../src/common/datetime.cpp:3174 +msgid "twentieth" +msgstr "µÚ¶þÊ®" + +#: ../src/common/fileconf.cpp:1556 +#, c-format +msgid "unexpected \" at position %d in '%s'." +msgstr "ÀýÍâµÄ \" ÔÚλÖà %d in '%s'." + +#: ../src/generic/progdlgg.cpp:241 +msgid "unknown" +msgstr "δ֪" + +#: ../src/msw/dialup.cpp:466 +#, c-format +msgid "unknown error (error code %08x)." +msgstr "δ֪´íÎó(´íÎóºÅ %08x)." + +#: ../src/common/textfile.cpp:237 +#, fuzzy +msgid "unknown line terminator" +msgstr "δ֪ËÑË÷Ô­µã" + +#: ../src/common/file.cpp:342 +msgid "unknown seek origin" +msgstr "δ֪ËÑË÷Ô­µã" + +#: ../src/common/fontmap.cpp:354 +#, c-format +msgid "unknown-%d" +msgstr "δ֪-%d" + +#: ../src/common/docview.cpp:406 +msgid "unnamed" +msgstr "unnamed" + +#: ../src/common/docview.cpp:1188 +#, c-format +msgid "unnamed%d" +msgstr "unnamed%d" + +#: ../src/common/intl.cpp:379 +#, c-format +msgid "using catalog '%s' from '%s'." +msgstr "ʹÓÃĿ¼ '%s' ´Ó '%s'." + +#: ../src/html/helpfrm.cpp:874 +msgid "very large" +msgstr "·Ç³£´ó" + +#: ../src/html/helpfrm.cpp:874 +msgid "very small" +msgstr "·Ç³£Ð¡" + +#: ../src/common/timercmn.cpp:267 +msgid "wxGetTimeOfDay failed." +msgstr "wxGetTimeOfDay ʧ°Ü." + +#: ../src/common/socket.cpp:347 ../src/common/socket.cpp:401 +msgid "wxSocket: invalid signature in ReadMsg." +msgstr "wxSocket: ReadMsgÖÐÎÞЧµÄÇ©Ãû." + +#: ../src/common/socket.cpp:921 +msgid "wxSocket: unknown event!." +msgstr "wxSocket: δ֪ʼþ!." + +#: ../src/motif/app.cpp:591 +#, c-format +msgid "wxWindows could not open display for '%s': exiting." +msgstr "wxWindows ²»ÄÜΪ '%s' ´ò¿ªÏÔʾÉ豸: ÒѾ­´æÔÚ." + +#: ../src/common/filefn.cpp:1237 +msgid "wxWindows: error finding temporary file name.\n" +msgstr "wxWindows: ²éѯÁÙʱÎļþÃûʱ³ö´í.\n" + +#: ../src/common/datetime.cpp:3013 +msgid "yesterday" +msgstr "×òÌì" + +#, fuzzy +#~ msgid "..." +#~ msgstr ".." + +#~ msgid "Cyrillic (Latin 5)" +#~ msgstr "˹À­·òÓï (Latin 5)" + +#, fuzzy +#~ msgid "Computer" +#~ msgstr "¼ÆËã»ú" diff --git a/make-deb b/make-deb index bd77ba1282..c0ca095349 100755 --- a/make-deb +++ b/make-deb @@ -12,11 +12,15 @@ cd .. && rm -r ${TEMPDIR} echo "done." echo " " -echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo " If this is a new release version" echo " remember to update the changelog" echo " before building the package." echo " " -echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +echo " Also remember to create debian/control" +echo " ( it needs to be in the source package" +echo " for NMU build deps to work )" +echo " " +echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo " " diff --git a/misc/afm/Zapf.afm b/misc/afm/Zapf.afm new file mode 100644 index 0000000000..d3ad8d0aba --- /dev/null +++ b/misc/afm/Zapf.afm @@ -0,0 +1,1341 @@ +StartFontMetrics 3.0 +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. +FontName URWChanceryL-MediItal +FullName URW Chancery L Medium Italic +FamilyName URW Chancery L +Weight Medium +ItalicAngle -14.0 +IsFixedPitch false +UnderlinePosition -120 +UnderlineThickness 50 +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development +EncodingScheme AdobeStandardEncoding +FontBBox -133 -290 1078 913 +CapHeight 573 +XHeight 391 +Descender -248 +Ascender 677 +StartCharMetrics 316 +C 32 ; WX 220 ; N space ; B 0 0 0 0 ; +C 33 ; WX 280 ; N exclam ; B 109 -9 347 587 ; +C 34 ; WX 220 ; N quotedbl ; B 170 405 333 591 ; +C 35 ; WX 440 ; N numbersign ; B 63 -1 596 575 ; +C 36 ; WX 440 ; N dollar ; B 60 -144 461 675 ; +C 37 ; WX 680 ; N percent ; B 162 -7 701 584 ; +C 38 ; WX 780 ; N ampersand ; B 121 -17 855 557 ; +C 39 ; WX 240 ; N quoteright ; B 228 358 358 578 ; +C 40 ; WX 260 ; N parenleft ; B 116 -165 412 668 ; +C 41 ; WX 220 ; N parenright ; B 17 -166 313 667 ; +C 42 ; WX 420 ; N asterisk ; B 220 377 512 677 ; +C 43 ; WX 520 ; N plus ; B 103 14 513 424 ; +C 44 ; WX 220 ; N comma ; B 30 -98 215 173 ; +C 45 ; WX 280 ; N hyphen ; B 115 173 300 237 ; +C 46 ; WX 220 ; N period ; B 107 -9 228 128 ; +C 47 ; WX 340 ; N slash ; B -6 -170 535 679 ; +C 48 ; WX 440 ; N zero ; B 94 -7 489 576 ; +C 49 ; WX 440 ; N one ; B 82 0 434 582 ; +C 50 ; WX 440 ; N two ; B 47 -17 469 572 ; +C 51 ; WX 440 ; N three ; B 36 -6 458 575 ; +C 52 ; WX 440 ; N four ; B 69 -25 455 585 ; +C 53 ; WX 440 ; N five ; B 67 -8 565 640 ; +C 54 ; WX 440 ; N six ; B 95 -8 532 585 ; +C 55 ; WX 440 ; N seven ; B 165 -18 541 611 ; +C 56 ; WX 440 ; N eight ; B 75 -10 494 572 ; +C 57 ; WX 440 ; N nine ; B 42 -8 480 576 ; +C 58 ; WX 260 ; N colon ; B 98 -9 289 408 ; +C 59 ; WX 240 ; N semicolon ; B 29 -98 277 408 ; +C 60 ; WX 520 ; N less ; B 120 2 557 449 ; +C 61 ; WX 520 ; N equal ; B 108 108 518 330 ; +C 62 ; WX 520 ; N greater ; B 119 2 556 449 ; +C 63 ; WX 380 ; N question ; B 130 -9 497 582 ; +C 64 ; WX 700 ; N at ; B 102 -31 765 592 ; +C 65 ; WX 620 ; N A ; B 23 -13 687 594 ; +C 66 ; WX 600 ; N B ; B 75 -2 642 616 ; +C 67 ; WX 520 ; N C ; B 88 -73 635 591 ; +C 68 ; WX 700 ; N D ; B 86 0 759 614 ; +C 69 ; WX 620 ; N E ; B 76 -8 668 586 ; +C 70 ; WX 580 ; N F ; B 60 -114 733 620 ; +C 71 ; WX 620 ; N G ; B 118 -236 670 591 ; +C 72 ; WX 680 ; N H ; B 33 -11 908 678 ; +C 73 ; WX 380 ; N I ; B 81 0 481 573 ; +C 74 ; WX 400 ; N J ; B 1 -122 491 572 ; +C 75 ; WX 660 ; N K ; B 88 -147 851 577 ; +C 76 ; WX 580 ; N L ; B 33 -6 631 577 ; +C 77 ; WX 840 ; N M ; B 58 -13 1009 670 ; +C 78 ; WX 700 ; N N ; B 40 -163 915 677 ; +C 79 ; WX 600 ; N O ; B 104 -13 652 591 ; +C 80 ; WX 540 ; N P ; B 37 1 645 601 ; +C 81 ; WX 600 ; N Q ; B 104 -191 851 591 ; +C 82 ; WX 600 ; N R ; B 38 -156 826 611 ; +C 83 ; WX 460 ; N S ; B 0 -71 517 586 ; +C 84 ; WX 500 ; N T ; B 58 0 718 649 ; +C 85 ; WX 740 ; N U ; B 116 -14 778 578 ; +C 86 ; WX 640 ; N V ; B 104 -12 809 685 ; +C 87 ; WX 880 ; N W ; B 104 -17 1035 677 ; +C 88 ; WX 560 ; N X ; B 0 -13 671 580 ; +C 89 ; WX 560 ; N Y ; B 31 -152 763 608 ; +C 90 ; WX 620 ; N Z ; B 62 -18 676 597 ; +C 91 ; WX 240 ; N bracketleft ; B 47 -165 404 665 ; +C 92 ; WX 480 ; N backslash ; B 185 0 484 579 ; +C 93 ; WX 320 ; N bracketright ; B 23 -165 381 665 ; +C 94 ; WX 520 ; N asciicircum ; B 212 447 472 681 ; +C 95 ; WX 500 ; N underscore ; B 0 -145 500 -95 ; +C 96 ; WX 240 ; N quoteleft ; B 229 435 384 676 ; +C 97 ; WX 420 ; N a ; B 87 -13 492 411 ; +C 98 ; WX 420 ; N b ; B 87 -17 466 677 ; +C 99 ; WX 340 ; N c ; B 87 -13 383 411 ; +C 100 ; WX 440 ; N d ; B 87 -13 629 677 ; +C 101 ; WX 340 ; N e ; B 87 -13 380 411 ; +C 102 ; WX 320 ; N f ; B -99 -246 541 680 ; +C 103 ; WX 400 ; N g ; B -78 -247 481 410 ; +C 104 ; WX 440 ; N h ; B 75 -15 506 678 ; +C 105 ; WX 240 ; N i ; B 81 -13 311 616 ; +C 106 ; WX 220 ; N j ; B -133 -247 303 616 ; +C 107 ; WX 440 ; N k ; B 87 -153 655 675 ; +C 108 ; WX 240 ; N l ; B 87 -13 434 678 ; +C 109 ; WX 620 ; N m ; B 81 -10 693 411 ; +C 110 ; WX 460 ; N n ; B 81 -16 520 411 ; +C 111 ; WX 400 ; N o ; B 87 -13 449 411 ; +C 112 ; WX 440 ; N p ; B -8 -248 482 411 ; +C 113 ; WX 400 ; N q ; B 87 -249 485 479 ; +C 114 ; WX 300 ; N r ; B 81 -10 409 411 ; +C 115 ; WX 320 ; N s ; B 41 -13 377 411 ; +C 116 ; WX 320 ; N t ; B 96 -13 392 503 ; +C 117 ; WX 460 ; N u ; B 82 -13 518 415 ; +C 118 ; WX 440 ; N v ; B 87 -13 510 437 ; +C 119 ; WX 680 ; N w ; B 87 -13 757 444 ; +C 120 ; WX 420 ; N x ; B 70 -160 583 411 ; +C 121 ; WX 400 ; N y ; B 11 -248 473 415 ; +C 122 ; WX 440 ; N z ; B 46 -13 475 426 ; +C 123 ; WX 240 ; N braceleft ; B 105 -165 405 661 ; +C 124 ; WX 520 ; N bar ; B 314 0 363 722 ; +C 125 ; WX 240 ; N braceright ; B 10 -166 308 661 ; +C 126 ; WX 520 ; N asciitilde ; B 86 165 526 278 ; +C 161 ; WX 280 ; N exclamdown ; B 57 -186 295 409 ; +C 162 ; WX 440 ; N cent ; B 127 -76 453 651 ; +C 163 ; WX 440 ; N sterling ; B 4 -53 436 578 ; +C 164 ; WX 60 ; N fraction ; B -115 -5 280 585 ; +C 165 ; WX 440 ; N yen ; B -11 -152 623 608 ; +C 166 ; WX 440 ; N florin ; B -49 -246 587 682 ; +C 167 ; WX 420 ; N section ; B 63 -164 464 576 ; +C 168 ; WX 440 ; N currency ; B 50 72 480 500 ; +C 169 ; WX 160 ; N quotesingle ; B 170 405 259 591 ; +C 170 ; WX 340 ; N quotedblleft ; B 229 435 500 676 ; +C 171 ; WX 340 ; N guillemotleft ; B 98 -9 404 413 ; +C 172 ; WX 240 ; N guilsinglleft ; B 98 -9 285 413 ; +C 173 ; WX 260 ; N guilsinglright ; B 86 -3 284 423 ; +C 174 ; WX 520 ; N fi ; B -104 -247 606 681 ; +C 175 ; WX 520 ; N fl ; B -105 -246 710 688 ; +C 177 ; WX 500 ; N endash ; B 31 173 578 237 ; +C 178 ; WX 460 ; N dagger ; B 98 -138 529 606 ; +C 179 ; WX 480 ; N daggerdbl ; B 98 -137 529 607 ; +C 180 ; WX 220 ; N periodcentered ; B 108 156 229 277 ; +C 182 ; WX 500 ; N paragraph ; B 29 -247 650 586 ; +C 183 ; WX 600 ; N bullet ; B 228 217 568 557 ; +C 184 ; WX 180 ; N quotesinglbase ; B 40 -109 170 111 ; +C 185 ; WX 280 ; N quotedblbase ; B 41 -109 286 111 ; +C 186 ; WX 360 ; N quotedblright ; B 228 454 473 673 ; +C 187 ; WX 380 ; N guillemotright ; B 87 -3 407 423 ; +C 188 ; WX 1000 ; N ellipsis ; B 106 -9 893 128 ; +C 189 ; WX 960 ; N perthousand ; B 162 -7 975 584 ; +C 191 ; WX 400 ; N questiondown ; B 57 -181 425 409 ; +C 193 ; WX 220 ; N grave ; B 173 460 281 655 ; +C 194 ; WX 300 ; N acute ; B 205 460 388 655 ; +C 195 ; WX 340 ; N circumflex ; B 183 460 397 656 ; +C 196 ; WX 440 ; N tilde ; B 183 494 513 604 ; +C 197 ; WX 440 ; N macron ; B 183 520 515 568 ; +C 198 ; WX 440 ; N breve ; B 183 488 516 623 ; +C 199 ; WX 220 ; N dotaccent ; B 206 489 309 612 ; +C 200 ; WX 360 ; N dieresis ; B 183 489 419 612 ; +C 202 ; WX 300 ; N ring ; B 228 461 409 640 ; +C 203 ; WX 300 ; N cedilla ; B 41 -212 216 0 ; +C 205 ; WX 400 ; N hungarumlaut ; B 183 460 463 655 ; +C 206 ; WX 280 ; N ogonek ; B 58 -153 216 0 ; +C 207 ; WX 340 ; N caron ; B 234 458 447 655 ; +C 208 ; WX 1000 ; N emdash ; B 31 172 1078 236 ; +C 225 ; WX 740 ; N AE ; B 32 -4 798 571 ; +C 227 ; WX 260 ; N ordfeminine ; B 81 253 324 576 ; +C 232 ; WX 580 ; N Lslash ; B 33 -6 631 577 ; +C 233 ; WX 660 ; N Oslash ; B 110 -132 707 690 ; +C 234 ; WX 820 ; N OE ; B 104 -13 870 588 ; +C 235 ; WX 260 ; N ordmasculine ; B 98 253 323 578 ; +C 241 ; WX 540 ; N ae ; B 87 -13 588 440 ; +C 245 ; WX 240 ; N dotlessi ; B 81 -13 311 411 ; +C 248 ; WX 300 ; N lslash ; B 87 -13 491 678 ; +C 249 ; WX 440 ; N oslash ; B 92 -148 467 547 ; +C 250 ; WX 560 ; N oe ; B 88 -13 602 411 ; +C 251 ; WX 420 ; N germandbls ; B -127 -248 506 680 ; +C -1 ; WX 740 ; N Udieresis ; B 116 -14 778 773 ; +C -1 ; WX 740 ; N Uacute ; B 116 -14 778 820 ; +C -1 ; WX 460 ; N Scedilla ; B 0 -266 517 586 ; +C -1 ; WX 500 ; N Tcaron ; B 58 0 718 821 ; +C -1 ; WX 460 ; N Scaron ; B 0 -71 607 821 ; +C -1 ; WX 600 ; N Rcaron ; B 38 -156 826 821 ; +C -1 ; WX 600 ; N Racute ; B 38 -156 826 820 ; +C -1 ; WX 460 ; N Sacute ; B 0 -71 517 820 ; +C -1 ; WX 600 ; N Otilde ; B 104 -13 678 765 ; +C -1 ; WX 460 ; N ucircumflex ; B 82 -13 518 656 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 104 -13 652 820 ; +C -1 ; WX 740 ; N Uhungarumlaut ; B 116 -14 816 820 ; +C -1 ; WX 560 ; N Yacute ; B 31 -152 763 820 ; +C -1 ; WX 700 ; N Eth ; B 86 0 759 615 ; +C -1 ; WX 700 ; N Dcroat ; B 86 0 759 615 ; +C -1 ; WX 620 ; N Zacute ; B 62 -18 676 820 ; +C -1 ; WX 740 ; N Uring ; B 116 -14 778 802 ; +C -1 ; WX 400 ; N gbreve ; B -78 -247 496 623 ; +C -1 ; WX 340 ; N eogonek ; B 87 -153 380 411 ; +C -1 ; WX 340 ; N edotaccent ; B 87 -13 380 612 ; +C -1 ; WX 340 ; N ecaron ; B 87 -13 487 655 ; +C -1 ; WX 740 ; N Ugrave ; B 116 -14 778 820 ; +C -1 ; WX 540 ; N Thorn ; B 37 1 619 585 ; +C -1 ; WX 340 ; N eacute ; B 87 -13 408 655 ; +C -1 ; WX 340 ; N edieresis ; B 87 -13 409 612 ; +C -1 ; WX 497 ; N dcaron ; B 87 -13 697 678 ; +C -1 ; WX 340 ; N ccedilla ; B 61 -212 383 411 ; +C -1 ; WX 340 ; N ccaron ; B 87 -13 467 655 ; +C -1 ; WX 340 ; N cacute ; B 87 -13 441 655 ; +C -1 ; WX 420 ; N aogonek ; B 87 -153 492 411 ; +C -1 ; WX 420 ; N aring ; B 87 -13 492 640 ; +C -1 ; WX 420 ; N atilde ; B 87 -13 513 604 ; +C -1 ; WX 420 ; N abreve ; B 87 -13 526 623 ; +C -1 ; WX 340 ; N egrave ; B 87 -13 380 655 ; +C -1 ; WX 420 ; N agrave ; B 87 -13 492 655 ; +C -1 ; WX 420 ; N aacute ; B 87 -13 492 655 ; +C -1 ; WX 420 ; N adieresis ; B 87 -13 492 612 ; +C -1 ; WX 740 ; N Uogonek ; B 116 -153 778 578 ; +C -1 ; WX 460 ; N ugrave ; B 82 -13 518 655 ; +C -1 ; WX 460 ; N uacute ; B 82 -13 518 655 ; +C -1 ; WX 460 ; N udieresis ; B 82 -13 518 612 ; +C -1 ; WX 320 ; N tcaron ; B 96 -13 480 678 ; +C -1 ; WX 320 ; N scommaaccent ; B 41 -270 377 411 ; +C -1 ; WX 620 ; N Zcaron ; B 62 -18 676 821 ; +C -1 ; WX 340 ; N ecircumflex ; B 87 -13 397 656 ; +C -1 ; WX 740 ; N Ucircumflex ; B 116 -14 778 821 ; +C -1 ; WX 420 ; N acircumflex ; B 87 -13 492 656 ; +C -1 ; WX 620 ; N Zdotaccent ; B 62 -18 676 773 ; +C -1 ; WX 320 ; N scaron ; B 41 -13 477 655 ; +C -1 ; WX 620 ; N Amacron ; B 23 -13 760 729 ; +C -1 ; WX 320 ; N sacute ; B 41 -13 440 655 ; +C -1 ; WX 500 ; N Tcommaaccent ; B 58 -270 718 649 ; +C -1 ; WX 560 ; N Ydieresis ; B 31 -152 763 773 ; +C -1 ; WX 440 ; N thorn ; B -8 -248 482 680 ; +C -1 ; WX 620 ; N Emacron ; B 76 -8 668 729 ; +C -1 ; WX 600 ; N Ograve ; B 104 -13 652 820 ; +C -1 ; WX 600 ; N Oacute ; B 104 -13 652 820 ; +C -1 ; WX 600 ; N Odieresis ; B 104 -13 652 773 ; +C -1 ; WX 700 ; N Ntilde ; B 40 -163 915 765 ; +C -1 ; WX 700 ; N Ncaron ; B 40 -163 915 821 ; +C -1 ; WX 700 ; N Nacute ; B 40 -163 915 820 ; +C -1 ; WX 580 ; N Lcaron ; B 33 -6 700 591 ; +C -1 ; WX 580 ; N Lacute ; B 33 -6 631 820 ; +C -1 ; WX 380 ; N Idotaccent ; B 81 0 481 773 ; +C -1 ; WX 300 ; N racute ; B 81 -10 428 655 ; +C -1 ; WX 380 ; N Icircumflex ; B 81 0 487 821 ; +C -1 ; WX 400 ; N ohungarumlaut ; B 87 -13 543 655 ; +C -1 ; WX 400 ; N otilde ; B 87 -13 493 604 ; +C -1 ; WX 440 ; N Euro ; B -28 -73 528 591 ; +C -1 ; WX 400 ; N ocircumflex ; B 87 -13 449 656 ; +C -1 ; WX 264 ; N onesuperior ; B 86 217 314 568 ; +C -1 ; WX 264 ; N twosuperior ; B 80 206 354 562 ; +C -1 ; WX 264 ; N threesuperior ; B 69 212 343 561 ; +C -1 ; WX 380 ; N Igrave ; B 81 0 481 820 ; +C -1 ; WX 380 ; N Iacute ; B 81 0 481 820 ; +C -1 ; WX 380 ; N Imacron ; B 81 0 548 729 ; +C -1 ; WX 380 ; N Iogonek ; B 81 -153 481 573 ; +C -1 ; WX 380 ; N Idieresis ; B 81 0 481 773 ; +C -1 ; WX 620 ; N Gbreve ; B 118 -236 670 784 ; +C -1 ; WX 740 ; N Umacron ; B 116 -14 788 729 ; +C -1 ; WX 660 ; N Kcommaaccent ; B 88 -270 851 577 ; +C -1 ; WX 400 ; N ograve ; B 87 -13 449 655 ; +C -1 ; WX 460 ; N Scommaaccent ; B 0 -290 517 586 ; +C -1 ; WX 620 ; N Eogonek ; B 76 -153 668 586 ; +C -1 ; WX 400 ; N oacute ; B 87 -13 449 655 ; +C -1 ; WX 620 ; N Edotaccent ; B 76 -8 668 773 ; +C -1 ; WX 240 ; N iogonek ; B 65 -153 311 616 ; +C -1 ; WX 400 ; N gcommaaccent ; B -78 -247 481 668 ; +C -1 ; WX 400 ; N odieresis ; B 87 -13 449 612 ; +C -1 ; WX 460 ; N ntilde ; B 81 -16 523 604 ; +C -1 ; WX 460 ; N ncaron ; B 81 -16 520 655 ; +C -1 ; WX 620 ; N Ecaron ; B 76 -8 668 821 ; +C -1 ; WX 620 ; N Ecircumflex ; B 76 -8 668 821 ; +C -1 ; WX 320 ; N scedilla ; B -9 -213 377 411 ; +C -1 ; WX 300 ; N rcaron ; B 81 -10 467 655 ; +C -1 ; WX 620 ; N Egrave ; B 76 -8 668 820 ; +C -1 ; WX 620 ; N Eacute ; B 76 -8 668 820 ; +C -1 ; WX 620 ; N Gcommaaccent ; B 120 -270 672 590 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 38 -270 826 611 ; +C -1 ; WX 620 ; N Edieresis ; B 76 -8 668 773 ; +C -1 ; WX 460 ; N nacute ; B 81 -16 520 655 ; +C -1 ; WX 460 ; N uogonek ; B 82 -153 518 415 ; +C -1 ; WX 460 ; N umacron ; B 82 -13 525 568 ; +C -1 ; WX 700 ; N Dcaron ; B 86 0 759 821 ; +C -1 ; WX 293 ; N lcaron ; B 87 -13 493 678 ; +C -1 ; WX 520 ; N Ccaron ; B 88 -73 680 821 ; +C -1 ; WX 520 ; N Cacute ; B 88 -73 635 820 ; +C -1 ; WX 520 ; N Ccedilla ; B 88 -266 635 591 ; +C -1 ; WX 400 ; N degree ; B 190 330 430 576 ; +C -1 ; WX 620 ; N Aogonek ; B 23 -153 687 594 ; +C -1 ; WX 520 ; N minus ; B 55 192 559 246 ; +C -1 ; WX 520 ; N multiply ; B 103 14 513 424 ; +C -1 ; WX 520 ; N divide ; B 103 -4 513 443 ; +C -1 ; WX 620 ; N Aring ; B 23 -13 687 802 ; +C -1 ; WX 1000 ; N trademark ; B 165 210 1050 580 ; +C -1 ; WX 300 ; N rcommaaccent ; B 38 -270 409 411 ; +C -1 ; WX 240 ; N lacute ; B 87 -13 454 860 ; +C -1 ; WX 400 ; N omacron ; B 87 -13 495 568 ; +C -1 ; WX 620 ; N Atilde ; B 23 -13 753 765 ; +C -1 ; WX 240 ; N icircumflex ; B 81 -13 347 656 ; +C -1 ; WX 240 ; N igrave ; B 81 -13 311 655 ; +C -1 ; WX 460 ; N ncommaaccent ; B 81 -270 520 411 ; +C -1 ; WX 240 ; N lcommaaccent ; B 8 -270 434 678 ; +C -1 ; WX 520 ; N plusminus ; B 103 0 513 508 ; +C -1 ; WX 660 ; N onehalf ; B 96 -10 659 585 ; +C -1 ; WX 660 ; N onequarter ; B 96 -15 653 585 ; +C -1 ; WX 660 ; N threequarters ; B 79 -15 663 585 ; +C -1 ; WX 240 ; N iacute ; B 81 -13 358 655 ; +C -1 ; WX 620 ; N Abreve ; B 23 -13 740 784 ; +C -1 ; WX 440 ; N kcommaaccent ; B 87 -270 655 675 ; +C -1 ; WX 600 ; N Omacron ; B 104 -13 652 729 ; +C -1 ; WX 240 ; N imacron ; B 81 -13 415 568 ; +C -1 ; WX 340 ; N emacron ; B 87 -13 465 568 ; +C -1 ; WX 420 ; N amacron ; B 87 -13 505 568 ; +C -1 ; WX 320 ; N tcommaaccent ; B 48 -270 392 503 ; +C -1 ; WX 400 ; N ydieresis ; B 11 -248 473 612 ; +C -1 ; WX 440 ; N zdotaccent ; B 46 -13 475 612 ; +C -1 ; WX 440 ; N zcaron ; B 46 -13 527 655 ; +C -1 ; WX 440 ; N zacute ; B 46 -13 498 655 ; +C -1 ; WX 400 ; N yacute ; B 11 -248 478 655 ; +C -1 ; WX 460 ; N uhungarumlaut ; B 82 -13 533 655 ; +C -1 ; WX 400 ; N eth ; B 87 -13 557 689 ; +C -1 ; WX 460 ; N uring ; B 82 -13 518 640 ; +C -1 ; WX 600 ; N Ocircumflex ; B 104 -13 652 821 ; +C -1 ; WX 300 ; N commaaccent ; B 38 -270 165 -60 ; +C -1 ; WX 740 ; N copyright ; B 136 -26 830 668 ; +C -1 ; WX 740 ; N registered ; B 135 -26 828 668 ; +C -1 ; WX 620 ; N Acircumflex ; B 23 -13 687 821 ; +C -1 ; WX 240 ; N idieresis ; B 81 -13 359 612 ; +C -1 ; WX 494 ; N lozenge ; B 18 0 466 740 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 520 ; N notequal ; B 108 5 518 433 ; +C -1 ; WX 549 ; N radical ; B 10 -35 515 913 ; +C -1 ; WX 620 ; N Agrave ; B 23 -13 687 820 ; +C -1 ; WX 620 ; N Aacute ; B 23 -13 687 820 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 639 ; +C -1 ; WX 549 ; N greaterequal ; B 29 0 526 639 ; +C -1 ; WX 520 ; N logicalnot ; B 55 25 559 314 ; +C -1 ; WX 713 ; N summation ; B 14 -123 695 752 ; +C -1 ; WX 494 ; N partialdiff ; B 26 -10 462 753 ; +C -1 ; WX 700 ; N Ncommaaccent ; B 40 -270 915 677 ; +C -1 ; WX 440 ; N dcroat ; B 87 -13 629 677 ; +C -1 ; WX 520 ; N brokenbar ; B 314 0 363 722 ; +C -1 ; WX 580 ; N Lcommaaccent ; B 33 -270 631 577 ; +C -1 ; WX 620 ; N Adieresis ; B 23 -13 699 773 ; +C -1 ; WX 460 ; N mu ; B 15 -218 518 415 ; +C -1 ; WX 220 ; N .notdef ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 998 +KPX A C 13 +KPX A Ccedilla 12 +KPX A G -12 +KPX A O -10 +KPX A Odieresis -10 +KPX A Q -11 +KPX A T -14 +KPX A U -22 +KPX A Uacute -24 +KPX A Ucircumflex -24 +KPX A Udieresis -24 +KPX A Ugrave -24 +KPX A V -19 +KPX A W -19 +KPX A Y -1 +KPX A a 11 +KPX A b 7 +KPX A c 10 +KPX A ccedilla 10 +KPX A comma 2 +KPX A d 11 +KPX A e 9 +KPX A g 9 +KPX A guillemotleft -10 +KPX A guilsinglleft -9 +KPX A hyphen -10 +KPX A o 8 +KPX A period 6 +KPX A q 11 +KPX A quotedblright -47 +KPX A quoteright -58 +KPX A t -12 +KPX A u 1 +KPX A v -13 +KPX A w -18 +KPX A y 5 +KPX Aacute C 13 +KPX Aacute G -12 +KPX Aacute O -10 +KPX Aacute Q -11 +KPX Aacute T -14 +KPX Aacute U -22 +KPX Aacute V -27 +KPX Aacute W -26 +KPX Aacute Y -3 +KPX Aacute a 11 +KPX Aacute b 7 +KPX Aacute c 10 +KPX Aacute comma 2 +KPX Aacute d 11 +KPX Aacute e 9 +KPX Aacute g 9 +KPX Aacute guillemotleft -10 +KPX Aacute guilsinglleft -9 +KPX Aacute hyphen -10 +KPX Aacute o 8 +KPX Aacute period 6 +KPX Aacute q 11 +KPX Aacute quoteright -58 +KPX Aacute t -12 +KPX Aacute u 1 +KPX Aacute v -13 +KPX Aacute w -18 +KPX Aacute y 5 +KPX Acircumflex C 13 +KPX Acircumflex G -12 +KPX Acircumflex O -10 +KPX Acircumflex Q -11 +KPX Acircumflex T -14 +KPX Acircumflex U -22 +KPX Acircumflex V -25 +KPX Acircumflex W -24 +KPX Acircumflex Y -3 +KPX Acircumflex comma 2 +KPX Acircumflex period 6 +KPX Adieresis C 13 +KPX Adieresis G -12 +KPX Adieresis O -11 +KPX Adieresis Q -11 +KPX Adieresis T -14 +KPX Adieresis U -23 +KPX Adieresis V -26 +KPX Adieresis W -26 +KPX Adieresis Y -3 +KPX Adieresis a 11 +KPX Adieresis b 7 +KPX Adieresis c 10 +KPX Adieresis comma 2 +KPX Adieresis d 11 +KPX Adieresis g 9 +KPX Adieresis guillemotleft -10 +KPX Adieresis guilsinglleft -9 +KPX Adieresis hyphen -10 +KPX Adieresis o 8 +KPX Adieresis period 6 +KPX Adieresis q 11 +KPX Adieresis quotedblright -53 +KPX Adieresis quoteright -58 +KPX Adieresis t -12 +KPX Adieresis u 1 +KPX Adieresis v -13 +KPX Adieresis w -18 +KPX Adieresis y 5 +KPX Agrave C 13 +KPX Agrave G -12 +KPX Agrave O -10 +KPX Agrave Q -11 +KPX Agrave T -14 +KPX Agrave U -22 +KPX Agrave V -27 +KPX Agrave W -26 +KPX Agrave Y -3 +KPX Agrave comma 2 +KPX Agrave period 6 +KPX Aring C 13 +KPX Aring G -12 +KPX Aring O -10 +KPX Aring Q -11 +KPX Aring T -14 +KPX Aring U -22 +KPX Aring V -25 +KPX Aring W -25 +KPX Aring Y -3 +KPX Aring a 11 +KPX Aring b 7 +KPX Aring c 10 +KPX Aring comma 2 +KPX Aring d 11 +KPX Aring e 9 +KPX Aring g 9 +KPX Aring guillemotleft -10 +KPX Aring guilsinglleft -9 +KPX Aring hyphen -10 +KPX Aring o 8 +KPX Aring period 6 +KPX Aring q 11 +KPX Aring quotedblright -52 +KPX Aring quoteright -58 +KPX Aring t -12 +KPX Aring u 1 +KPX Aring v -13 +KPX Aring w -18 +KPX Aring y 5 +KPX Atilde C 13 +KPX Atilde G -12 +KPX Atilde O -10 +KPX Atilde Q -10 +KPX Atilde T -13 +KPX Atilde U -22 +KPX Atilde V -26 +KPX Atilde W -26 +KPX Atilde Y -2 +KPX Atilde comma 3 +KPX Atilde period 7 +KPX B A -26 +KPX B AE -31 +KPX B Aacute -26 +KPX B Acircumflex -26 +KPX B Adieresis -26 +KPX B Aring -26 +KPX B Atilde -26 +KPX B O 0 +KPX B OE -3 +KPX B Oacute -2 +KPX B Ocircumflex -2 +KPX B Odieresis -2 +KPX B Ograve -2 +KPX B Oslash -18 +KPX B V -8 +KPX B W -8 +KPX B Y 8 +KPX C A 12 +KPX C AE 10 +KPX C Aacute 12 +KPX C Adieresis 12 +KPX C Aring 12 +KPX C H 2 +KPX C K -6 +KPX C O -25 +KPX C Oacute -25 +KPX C Odieresis -25 +KPX Ccedilla A 9 +KPX D A -29 +KPX D Aacute -32 +KPX D Acircumflex -32 +KPX D Adieresis -32 +KPX D Agrave -32 +KPX D Aring -32 +KPX D Atilde -32 +KPX D J -31 +KPX D T 26 +KPX D V 3 +KPX D W 3 +KPX D X -23 +KPX D Y 19 +KPX F A -55 +KPX F Aacute -54 +KPX F Acircumflex -54 +KPX F Adieresis -54 +KPX F Agrave -54 +KPX F Aring -54 +KPX F Atilde -54 +KPX F J -55 +KPX F O -25 +KPX F Odieresis -25 +KPX F a -41 +KPX F aacute -41 +KPX F adieresis -39 +KPX F ae -40 +KPX F aring -41 +KPX F comma -82 +KPX F e -37 +KPX F eacute -37 +KPX F hyphen -24 +KPX F i -11 +KPX F j -9 +KPX F o -41 +KPX F oacute -41 +KPX F odieresis -19 +KPX F oe -40 +KPX F oslash -47 +KPX F period -70 +KPX F r -24 +KPX F u -21 +KPX G A -33 +KPX G AE -36 +KPX G Aacute -33 +KPX G Acircumflex -33 +KPX G Adieresis -33 +KPX G Agrave -33 +KPX G Aring -33 +KPX G Atilde -33 +KPX G T 2 +KPX G V -18 +KPX G W -19 +KPX G Y 3 +KPX J A -28 +KPX J AE -35 +KPX J Adieresis -28 +KPX J Aring -28 +KPX K C 48 +KPX K G 16 +KPX K O -6 +KPX K OE -10 +KPX K Oacute -6 +KPX K Odieresis -6 +KPX K S 102 +KPX K T 42 +KPX K a -38 +KPX K adieresis -18 +KPX K ae -38 +KPX K aring -32 +KPX K e -36 +KPX K hyphen -40 +KPX K o -41 +KPX K oacute -41 +KPX K odieresis 2 +KPX K u -38 +KPX K udieresis -13 +KPX K y -16 +KPX L A 6 +KPX L AE 4 +KPX L Aacute 6 +KPX L Adieresis 6 +KPX L Aring 6 +KPX L C 5 +KPX L Ccedilla 6 +KPX L G -7 +KPX L O 0 +KPX L Oacute 0 +KPX L Ocircumflex 0 +KPX L Odieresis 0 +KPX L Ograve 0 +KPX L Otilde 0 +KPX L S 18 +KPX L T -17 +KPX L U -28 +KPX L Udieresis -28 +KPX L V -24 +KPX L W -25 +KPX L Y -4 +KPX L hyphen 30 +KPX L quotedblright -93 +KPX L quoteright -94 +KPX L u -7 +KPX L udieresis -7 +KPX L y -4 +KPX N A -24 +KPX N AE -30 +KPX N Aacute -24 +KPX N Adieresis -24 +KPX N Aring -24 +KPX N C 55 +KPX N Ccedilla 53 +KPX N G 23 +KPX N O -11 +KPX N Oacute -13 +KPX N Odieresis -12 +KPX N a -26 +KPX N aacute -26 +KPX N adieresis -26 +KPX N ae -26 +KPX N aring -26 +KPX N comma 111 +KPX N e -24 +KPX N eacute -24 +KPX N o -29 +KPX N oacute -29 +KPX N odieresis -29 +KPX N oslash 80 +KPX N period -20 +KPX N u -27 +KPX N udieresis -27 +KPX O A -28 +KPX O AE -41 +KPX O Aacute -28 +KPX O Adieresis -28 +KPX O Aring -28 +KPX O T 23 +KPX O V 2 +KPX O W 2 +KPX O X -21 +KPX O Y 16 +KPX Oacute A -28 +KPX Oacute T 23 +KPX Oacute V 0 +KPX Oacute W 0 +KPX Oacute Y 16 +KPX Ocircumflex T 23 +KPX Ocircumflex V 0 +KPX Ocircumflex Y 16 +KPX Odieresis A -28 +KPX Odieresis T 23 +KPX Odieresis V 0 +KPX Odieresis W 0 +KPX Odieresis X -21 +KPX Odieresis Y 16 +KPX Ograve T 23 +KPX Ograve V 0 +KPX Ograve Y 16 +KPX Oslash A -42 +KPX Otilde T 23 +KPX Otilde V 0 +KPX Otilde Y 17 +KPX P A -28 +KPX P AE -32 +KPX P Aacute -28 +KPX P Adieresis -28 +KPX P Aring -28 +KPX P J -13 +KPX P a -36 +KPX P aacute -36 +KPX P adieresis -36 +KPX P ae -37 +KPX P aring -36 +KPX P comma -63 +KPX P e -32 +KPX P eacute -32 +KPX P hyphen -36 +KPX P o -40 +KPX P oacute -40 +KPX P odieresis -40 +KPX P oe -39 +KPX P oslash -45 +KPX P period -59 +KPX R C 51 +KPX R Ccedilla 52 +KPX R G 22 +KPX R O -27 +KPX R OE -31 +KPX R Oacute -29 +KPX R Odieresis -29 +KPX R T 2 +KPX R U -30 +KPX R Udieresis -30 +KPX R V -20 +KPX R W -18 +KPX R Y 115 +KPX R a -44 +KPX R aacute -44 +KPX R adieresis -44 +KPX R ae -44 +KPX R aring -44 +KPX R e -42 +KPX R eacute -42 +KPX R hyphen -44 +KPX R o -47 +KPX R oacute -47 +KPX R odieresis -47 +KPX R oe -46 +KPX R u -44 +KPX R uacute -44 +KPX R udieresis -44 +KPX R y -3 +KPX S A -22 +KPX S AE -27 +KPX S Aacute -22 +KPX S Adieresis -22 +KPX S Aring -22 +KPX S T 0 +KPX S V -19 +KPX S W -19 +KPX S Y -13 +KPX S t -41 +KPX T A 7 +KPX T AE 4 +KPX T Aacute 7 +KPX T Acircumflex 7 +KPX T Adieresis 7 +KPX T Agrave 7 +KPX T Aring 7 +KPX T Atilde 7 +KPX T C -20 +KPX T G -38 +KPX T J -7 +KPX T O -16 +KPX T OE -23 +KPX T Oacute -16 +KPX T Ocircumflex -16 +KPX T Odieresis -16 +KPX T Ograve -16 +KPX T Oslash -31 +KPX T Otilde -16 +KPX T S 17 +KPX T V 24 +KPX T W 24 +KPX T Y 25 +KPX T a -22 +KPX T ae -22 +KPX T c -23 +KPX T colon -26 +KPX T comma -33 +KPX T e -23 +KPX T g -23 +KPX T guillemotleft -43 +KPX T guilsinglleft -42 +KPX T hyphen -36 +KPX T i 21 +KPX T j 22 +KPX T o -23 +KPX T oslash -27 +KPX T period -27 +KPX T r -29 +KPX T s 1 +KPX T semicolon -34 +KPX T u -33 +KPX T v -47 +KPX T w -52 +KPX T y -28 +KPX U A 26 +KPX U AE 23 +KPX U Aacute 26 +KPX U Acircumflex 26 +KPX U Adieresis 26 +KPX U Aring 26 +KPX U Atilde 26 +KPX U comma -13 +KPX U m -13 +KPX U n -12 +KPX U p -23 +KPX U period -10 +KPX U r -12 +KPX Uacute A 26 +KPX Uacute comma -13 +KPX Uacute m -13 +KPX Uacute n -12 +KPX Uacute p -23 +KPX Uacute period -10 +KPX Uacute r -12 +KPX Ucircumflex A 26 +KPX Udieresis A 26 +KPX Udieresis b -11 +KPX Udieresis comma -13 +KPX Udieresis m -13 +KPX Udieresis n -12 +KPX Udieresis p -23 +KPX Udieresis period -10 +KPX Udieresis r -12 +KPX Ugrave A 26 +KPX V A -31 +KPX V AE -68 +KPX V Aacute -31 +KPX V Acircumflex -31 +KPX V Adieresis -31 +KPX V Agrave -31 +KPX V Aring -31 +KPX V Atilde -31 +KPX V C -28 +KPX V G -33 +KPX V O -14 +KPX V Oacute -14 +KPX V Ocircumflex -14 +KPX V Odieresis -14 +KPX V Ograve -14 +KPX V Oslash -30 +KPX V Otilde -14 +KPX V S -32 +KPX V T 38 +KPX V a -57 +KPX V ae -58 +KPX V colon -43 +KPX V comma -93 +KPX V e -53 +KPX V g -59 +KPX V guillemotleft -55 +KPX V guilsinglleft -55 +KPX V hyphen -45 +KPX V i 1 +KPX V o -63 +KPX V oslash -68 +KPX V period -90 +KPX V r -12 +KPX V semicolon -38 +KPX V u -17 +KPX V y -12 +KPX W A -26 +KPX W AE -46 +KPX W Aacute -26 +KPX W Acircumflex -26 +KPX W Adieresis -26 +KPX W Agrave -26 +KPX W Aring -26 +KPX W Atilde -26 +KPX W C -9 +KPX W G -15 +KPX W O 0 +KPX W Oacute -4 +KPX W Ocircumflex -2 +KPX W Odieresis -3 +KPX W Ograve -4 +KPX W Oslash -20 +KPX W Otilde -3 +KPX W S -12 +KPX W T 44 +KPX W a -33 +KPX W ae -33 +KPX W colon -29 +KPX W comma -57 +KPX W e -31 +KPX W g -35 +KPX W guillemotleft -27 +KPX W guilsinglleft -27 +KPX W hyphen -16 +KPX W i 1 +KPX W o -36 +KPX W oslash -41 +KPX W period -53 +KPX W r 3 +KPX W semicolon -24 +KPX W u 0 +KPX W y 4 +KPX X C 2 +KPX X O -21 +KPX X Odieresis -21 +KPX X Q -21 +KPX X a 1 +KPX X e -1 +KPX X hyphen -51 +KPX X o -2 +KPX X u -9 +KPX X y -5 +KPX Y A -24 +KPX Y AE -60 +KPX Y Aacute -24 +KPX Y Acircumflex -24 +KPX Y Adieresis -24 +KPX Y Agrave -24 +KPX Y Aring -24 +KPX Y Atilde -24 +KPX Y C -28 +KPX Y G -35 +KPX Y O -13 +KPX Y Oacute -12 +KPX Y Ocircumflex -12 +KPX Y Odieresis -12 +KPX Y Ograve -12 +KPX Y Oslash -29 +KPX Y Otilde -12 +KPX Y S -25 +KPX Y T 44 +KPX Y a -53 +KPX Y ae -53 +KPX Y colon -58 +KPX Y comma -68 +KPX Y e -51 +KPX Y g -55 +KPX Y guillemotleft -48 +KPX Y guilsinglleft -47 +KPX Y hyphen -37 +KPX Y i 17 +KPX Y o -56 +KPX Y oslash -61 +KPX Y p -43 +KPX Y period -62 +KPX Y semicolon -55 +KPX Y u -39 +KPX Y v -42 +KPX Z v 4 +KPX Z y 5 +KPX a j -2 +KPX a quoteright -55 +KPX a v -13 +KPX a w -14 +KPX a y 0 +KPX aacute v -13 +KPX aacute w -14 +KPX aacute y 0 +KPX adieresis v -13 +KPX adieresis w -14 +KPX adieresis y 0 +KPX ae v -15 +KPX ae w -17 +KPX ae y -1 +KPX agrave v -13 +KPX agrave w -14 +KPX agrave y 0 +KPX aring v -13 +KPX aring w -14 +KPX aring y 0 +KPX b v -11 +KPX b w -12 +KPX b y -1 +KPX c h -10 +KPX c k -15 +KPX comma one -40 +KPX comma quotedblright -53 +KPX comma quoteright -58 +KPX e quoteright -54 +KPX e t -16 +KPX e v -21 +KPX e w -22 +KPX e x -15 +KPX e y -7 +KPX eacute v -21 +KPX eacute w -23 +KPX eacute y -7 +KPX ecircumflex v -21 +KPX ecircumflex w -23 +KPX ecircumflex y -7 +KPX eight four -12 +KPX eight one -41 +KPX eight seven -38 +KPX f a -20 +KPX f aacute -20 +KPX f adieresis -20 +KPX f ae -21 +KPX f aring -20 +KPX f e -16 +KPX f eacute -16 +KPX f f 16 +KPX f i 21 +KPX f j 21 +KPX f l -9 +KPX f o -26 +KPX f oacute -26 +KPX f odieresis -26 +KPX f oe -24 +KPX f oslash -32 +KPX f quoteright -47 +KPX f s -20 +KPX f t 7 +KPX five four -18 +KPX five one -56 +KPX five seven -30 +KPX four four -11 +KPX four one -57 +KPX four seven -50 +KPX g a -18 +KPX g adieresis -18 +KPX g ae -18 +KPX g aring -18 +KPX g e -16 +KPX g eacute -16 +KPX g l -13 +KPX g oacute -21 +KPX g odieresis -21 +KPX g r -9 +KPX guillemotright A -33 +KPX guillemotright AE -33 +KPX guillemotright Aacute -33 +KPX guillemotright Adieresis -33 +KPX guillemotright Aring -33 +KPX guillemotright T -6 +KPX guillemotright V -19 +KPX guillemotright W -20 +KPX guillemotright Y 4 +KPX guilsinglright A -34 +KPX guilsinglright AE -34 +KPX guilsinglright Aacute -34 +KPX guilsinglright Adieresis -34 +KPX guilsinglright Aring -34 +KPX guilsinglright T -6 +KPX guilsinglright V -20 +KPX guilsinglright W -21 +KPX guilsinglright Y 3 +KPX h quoteright -65 +KPX h y -3 +KPX hyphen A -44 +KPX hyphen AE -10 +KPX hyphen Aacute -44 +KPX hyphen Adieresis -44 +KPX hyphen Aring -44 +KPX hyphen T -1 +KPX hyphen V -5 +KPX hyphen W -7 +KPX hyphen Y 25 +KPX i T -1 +KPX i j -2 +KPX k a -50 +KPX k aacute -50 +KPX k adieresis -50 +KPX k ae -50 +KPX k aring -50 +KPX k comma 111 +KPX k e -49 +KPX k eacute -49 +KPX k g 148 +KPX k hyphen -78 +KPX k o -56 +KPX k oacute -56 +KPX k odieresis -56 +KPX k period -48 +KPX k s -29 +KPX k u -13 +KPX k udieresis -13 +KPX l v -18 +KPX l y -2 +KPX m p -12 +KPX m v -13 +KPX m w -14 +KPX m y 1 +KPX n T -5 +KPX n p -20 +KPX n quoteright -68 +KPX n v -22 +KPX n w -24 +KPX n y -6 +KPX nine four -24 +KPX nine one -46 +KPX nine seven -41 +KPX o T 17 +KPX o quoteright -41 +KPX o t -4 +KPX o v -4 +KPX o w -5 +KPX o x -11 +KPX o y 4 +KPX oacute v -4 +KPX oacute w -5 +KPX oacute y 4 +KPX ocircumflex t -4 +KPX odieresis t -4 +KPX odieresis v -4 +KPX odieresis w -5 +KPX odieresis x -11 +KPX odieresis y 4 +KPX ograve v -4 +KPX ograve w -5 +KPX ograve y 4 +KPX one comma -31 +KPX one eight -20 +KPX one five -12 +KPX one four -46 +KPX one nine 1 +KPX one one -25 +KPX one period -29 +KPX one seven -59 +KPX one six -37 +KPX one three 5 +KPX one two -1 +KPX one zero -30 +KPX p t -8 +KPX p y 1 +KPX period one -25 +KPX period quotedblright -43 +KPX period quoteright -48 +KPX q c -15 +KPX q u -9 +KPX quotedblbase A 15 +KPX quotedblbase AE 34 +KPX quotedblbase T -57 +KPX quotedblbase V -32 +KPX quotedblbase W -35 +KPX quotedblbase Y -11 +KPX quotedblleft A -10 +KPX quotedblleft AE -72 +KPX quotedblleft Aacute -20 +KPX quotedblleft Adieresis -20 +KPX quotedblleft Aring -20 +KPX quotedblleft T 22 +KPX quotedblleft V 30 +KPX quotedblleft W 31 +KPX quotedblleft Y 41 +KPX quotedblright A -20 +KPX quotedblright AE -81 +KPX quotedblright Aacute -32 +KPX quotedblright Adieresis -32 +KPX quotedblright Aring -32 +KPX quotedblright T 12 +KPX quotedblright V 18 +KPX quotedblright W 19 +KPX quotedblright Y 30 +KPX quoteleft A -18 +KPX quoteleft AE -80 +KPX quoteleft Aacute -28 +KPX quoteleft Adieresis -28 +KPX quoteleft Aring -28 +KPX quoteleft T 14 +KPX quoteleft V 22 +KPX quoteleft W 23 +KPX quoteleft Y 33 +KPX quoteright A 0 +KPX quoteright AE -60 +KPX quoteright Aacute 0 +KPX quoteright Adieresis 0 +KPX quoteright Aring 0 +KPX quoteright comma -38 +KPX quoteright d -27 +KPX quoteright o -29 +KPX quoteright period -38 +KPX quoteright r 1 +KPX quoteright s -21 +KPX quoteright t -9 +KPX quoteright v -1 +KPX quoteright w 0 +KPX quoteright y 4 +KPX r a -17 +KPX r aacute -17 +KPX r acircumflex -17 +KPX r adieresis -17 +KPX r ae -18 +KPX r agrave -17 +KPX r aring -17 +KPX r c -14 +KPX r ccedilla -16 +KPX r colon -14 +KPX r comma -73 +KPX r d -21 +KPX r e -13 +KPX r eacute -13 +KPX r ecircumflex -13 +KPX r egrave -13 +KPX r f 22 +KPX r g -19 +KPX r h -10 +KPX r hyphen -55 +KPX r i 20 +KPX r j 19 +KPX r k -15 +KPX r l -7 +KPX r m 18 +KPX r n 19 +KPX r o -21 +KPX r oacute -21 +KPX r ocircumflex -21 +KPX r odieresis -21 +KPX r oe -20 +KPX r ograve -21 +KPX r oslash -27 +KPX r p 15 +KPX r period -69 +KPX r q -19 +KPX r quoteright -31 +KPX r r 21 +KPX r s -19 +KPX r semicolon -9 +KPX r t 13 +KPX r u 18 +KPX r v 5 +KPX r w 3 +KPX r x 9 +KPX r y 22 +KPX r z -23 +KPX s quoteright -61 +KPX s t -22 +KPX seven colon -73 +KPX seven comma -78 +KPX seven eight -44 +KPX seven five -54 +KPX seven four -62 +KPX seven one -44 +KPX seven period -75 +KPX seven seven -27 +KPX seven six -40 +KPX seven three -53 +KPX seven two -36 +KPX six four -2 +KPX six one -47 +KPX six seven -36 +KPX t S 22 +KPX t a -5 +KPX t aacute -5 +KPX t adieresis -5 +KPX t ae -4 +KPX t aring -5 +KPX t colon -22 +KPX t e -3 +KPX t eacute -3 +KPX t h -10 +KPX t o -3 +KPX t oacute -3 +KPX t odieresis -3 +KPX t quoteright -56 +KPX t semicolon -20 +KPX three four -19 +KPX three one -54 +KPX three seven -47 +KPX two four 6 +KPX two one -42 +KPX two seven -34 +KPX u quoteright -69 +KPX v a -21 +KPX v aacute -21 +KPX v acircumflex -21 +KPX v adieresis -21 +KPX v ae -21 +KPX v agrave -21 +KPX v aring -21 +KPX v atilde -21 +KPX v c -20 +KPX v colon -27 +KPX v comma -49 +KPX v e -18 +KPX v eacute -18 +KPX v ecircumflex -18 +KPX v egrave -18 +KPX v g -24 +KPX v hyphen -8 +KPX v l -15 +KPX v o -23 +KPX v oacute -23 +KPX v odieresis -23 +KPX v ograve -23 +KPX v oslash -29 +KPX v period -50 +KPX v s -22 +KPX v semicolon -22 +KPX w a -20 +KPX w aacute -20 +KPX w acircumflex -20 +KPX w adieresis -20 +KPX w ae -20 +KPX w agrave -20 +KPX w aring -20 +KPX w atilde -20 +KPX w c -19 +KPX w colon -24 +KPX w comma -50 +KPX w e -18 +KPX w eacute -18 +KPX w ecircumflex -18 +KPX w egrave -18 +KPX w g -23 +KPX w hyphen -8 +KPX w l -14 +KPX w o -23 +KPX w oacute -23 +KPX w odieresis -23 +KPX w ograve -23 +KPX w oslash -28 +KPX w period -51 +KPX w s -22 +KPX w semicolon -19 +KPX x a -25 +KPX x c -24 +KPX x e -21 +KPX x eacute -21 +KPX x o -31 +KPX x q -27 +KPX y a -8 +KPX y aacute -8 +KPX y acircumflex -8 +KPX y adieresis -8 +KPX y ae -8 +KPX y agrave -8 +KPX y aring -8 +KPX y atilde -8 +KPX y c -7 +KPX y colon -26 +KPX y comma -18 +KPX y e -6 +KPX y eacute -6 +KPX y ecircumflex -6 +KPX y egrave -6 +KPX y g 7 +KPX y hyphen -4 +KPX y l -3 +KPX y o -10 +KPX y oacute -10 +KPX y odieresis -10 +KPX y ograve -10 +KPX y oslash -15 +KPX y period -14 +KPX y s -8 +KPX y semicolon -18 +KPX zero four -12 +KPX zero one -36 +KPX zero seven -31 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/misc/gs_afm/Cour.afm b/misc/gs_afm/Cour.afm index 2ccfea4b0f..2ebe8d247b 100644 --- a/misc/gs_afm/Cour.afm +++ b/misc/gs_afm/Cour.afm @@ -1,7 +1,7 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/19/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. FontName NimbusMonL-Regu FullName Nimbus Mono L Regular FamilyName Nimbus Mono L @@ -10,15 +10,15 @@ ItalicAngle 0.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -12 -216 612 811 +FontBBox -12 -237 650 811 CapHeight 563 XHeight 417 Descender -186 Ascender 604 -StartCharMetrics 232 +StartCharMetrics 316 C 32 ; WX 600 ; N space ; B 295 0 295 0 ; C 33 ; WX 600 ; N exclam ; B 240 -15 360 618 ; C 34 ; WX 600 ; N quotedbl ; B 146 315 454 604 ; @@ -117,7 +117,7 @@ C 126 ; WX 600 ; N asciitilde ; B 92 212 508 348 ; C 161 ; WX 600 ; N exclamdown ; B 240 -216 360 417 ; C 162 ; WX 600 ; N cent ; B 113 -13 469 630 ; C 163 ; WX 600 ; N sterling ; B 63 0 520 578 ; -C 164 ; WX 600 ; N fraction ; B 50 139 549 470 ; +C 164 ; WX 600 ; N fraction ; B 50 138 549 470 ; C 165 ; WX 600 ; N yen ; B 51 0 549 563 ; C 166 ; WX 600 ; N florin ; B 87 -93 518 618 ; C 167 ; WX 600 ; N section ; B 66 -62 534 603 ; @@ -168,88 +168,1174 @@ C 248 ; WX 600 ; N lslash ; B 92 0 508 604 ; C 249 ; WX 600 ; N oslash ; B 53 -43 543 458 ; C 250 ; WX 600 ; N oe ; B 12 -16 578 431 ; C 251 ; WX 600 ; N germandbls ; B 43 -16 499 604 ; -C -1 ; WX 600 ; N Yacute ; B 51 0 549 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 40 -16 560 789 ; -C -1 ; WX 600 ; N Ugrave ; B 40 -16 560 789 ; -C -1 ; WX 600 ; N Zcaron ; B 103 0 497 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 51 0 549 761 ; -C -1 ; WX 600 ; N threesuperior ; B 181 251 416 612 ; -C -1 ; WX 600 ; N Uacute ; B 40 -16 560 789 ; -C -1 ; WX 600 ; N twosuperior ; B 175 259 405 612 ; C -1 ; WX 600 ; N Udieresis ; B 40 -16 560 761 ; -C -1 ; WX 600 ; N middot ; B 226 217 374 348 ; -C -1 ; WX 600 ; N onesuperior ; B 191 259 410 612 ; -C -1 ; WX 600 ; N aacute ; B 72 -16 541 639 ; -C -1 ; WX 600 ; N agrave ; B 72 -16 541 639 ; -C -1 ; WX 600 ; N acircumflex ; B 72 -16 541 639 ; +C -1 ; WX 600 ; N Uacute ; B 40 -16 560 789 ; +C -1 ; WX 600 ; N Scedilla ; B 92 -173 508 576 ; +C -1 ; WX 600 ; N Tcaron ; B 72 0 528 789 ; C -1 ; WX 600 ; N Scaron ; B 92 -16 508 789 ; +C -1 ; WX 600 ; N Rcaron ; B 43 0 589 789 ; +C -1 ; WX 600 ; N Racute ; B 43 0 589 789 ; +C -1 ; WX 600 ; N Sacute ; B 92 -16 508 789 ; C -1 ; WX 600 ; N Otilde ; B 51 -16 549 755 ; -C -1 ; WX 600 ; N sfthyphen ; B 72 258 528 299 ; -C -1 ; WX 600 ; N atilde ; B 72 -16 541 605 ; +C -1 ; WX 600 ; N ucircumflex ; B 43 -16 541 639 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 51 -16 549 783 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 40 -16 560 783 ; +C -1 ; WX 600 ; N Yacute ; B 51 0 549 789 ; +C -1 ; WX 600 ; N Eth ; B 0 0 520 563 ; +C -1 ; WX 600 ; N Dcroat ; B 0 0 520 563 ; +C -1 ; WX 600 ; N Zacute ; B 103 0 497 789 ; +C -1 ; WX 600 ; N Uring ; B 40 -16 560 811 ; +C -1 ; WX 600 ; N gbreve ; B 63 -186 562 620 ; +C -1 ; WX 600 ; N eogonek ; B 63 -155 520 431 ; +C -1 ; WX 600 ; N edotaccent ; B 63 -16 520 611 ; +C -1 ; WX 600 ; N ecaron ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N Ugrave ; B 40 -16 560 789 ; +C -1 ; WX 600 ; N Thorn ; B 43 0 499 563 ; +C -1 ; WX 600 ; N eacute ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N edieresis ; B 63 -16 520 611 ; +C -1 ; WX 600 ; N dcaron ; B 63 -16 650 616 ; +C -1 ; WX 600 ; N ccedilla ; B 84 -173 535 431 ; +C -1 ; WX 600 ; N ccaron ; B 84 -16 535 639 ; +C -1 ; WX 600 ; N cacute ; B 84 -16 535 639 ; +C -1 ; WX 600 ; N aogonek ; B 72 -155 556 431 ; C -1 ; WX 600 ; N aring ; B 72 -16 541 661 ; +C -1 ; WX 600 ; N atilde ; B 72 -16 541 605 ; +C -1 ; WX 600 ; N abreve ; B 72 -16 541 620 ; +C -1 ; WX 600 ; N egrave ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N agrave ; B 72 -16 541 639 ; +C -1 ; WX 600 ; N aacute ; B 72 -16 541 639 ; C -1 ; WX 600 ; N adieresis ; B 72 -16 541 611 ; +C -1 ; WX 600 ; N Uogonek ; B 40 -155 560 563 ; +C -1 ; WX 600 ; N ugrave ; B 43 -16 541 639 ; +C -1 ; WX 600 ; N uacute ; B 43 -16 541 639 ; +C -1 ; WX 600 ; N udieresis ; B 43 -16 541 611 ; +C -1 ; WX 600 ; N tcaron ; B 43 -16 508 616 ; +C -1 ; WX 600 ; N scommaaccent ; B 103 -237 497 431 ; +C -1 ; WX 600 ; N Zcaron ; B 103 0 497 789 ; +C -1 ; WX 600 ; N ecircumflex ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N Ucircumflex ; B 40 -16 560 789 ; +C -1 ; WX 600 ; N acircumflex ; B 72 -16 541 639 ; +C -1 ; WX 600 ; N Zdotaccent ; B 103 0 497 761 ; +C -1 ; WX 600 ; N scaron ; B 103 -16 497 639 ; +C -1 ; WX 600 ; N Amacron ; B 9 0 591 726 ; +C -1 ; WX 600 ; N sacute ; B 103 -16 497 639 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 72 -237 528 563 ; +C -1 ; WX 600 ; N Ydieresis ; B 51 0 549 761 ; +C -1 ; WX 600 ; N thorn ; B 22 -186 541 590 ; +C -1 ; WX 600 ; N Emacron ; B 43 0 520 726 ; C -1 ; WX 600 ; N Ograve ; B 51 -16 549 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 51 -16 549 789 ; +C -1 ; WX 600 ; N Oacute ; B 51 -16 549 789 ; C -1 ; WX 600 ; N Odieresis ; B 51 -16 549 761 ; C -1 ; WX 600 ; N Ntilde ; B 22 0 562 755 ; -C -1 ; WX 600 ; N edieresis ; B 63 -16 520 611 ; -C -1 ; WX 600 ; N eacute ; B 63 -16 520 639 ; -C -1 ; WX 600 ; N egrave ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N Ncaron ; B 22 0 562 789 ; +C -1 ; WX 600 ; N Nacute ; B 22 0 562 789 ; +C -1 ; WX 600 ; N Lcaron ; B 63 0 541 566 ; +C -1 ; WX 600 ; N Lacute ; B 63 0 541 789 ; +C -1 ; WX 600 ; N Idotaccent ; B 113 0 487 761 ; +C -1 ; WX 600 ; N racute ; B 84 0 541 639 ; C -1 ; WX 600 ; N Icircumflex ; B 113 0 487 789 ; -C -1 ; WX 600 ; N ecircumflex ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 72 -16 528 633 ; +C -1 ; WX 600 ; N otilde ; B 72 -16 528 605 ; +C -1 ; WX 600 ; N Euro ; B 11 -16 534 576 ; +C -1 ; WX 600 ; N ocircumflex ; B 72 -16 528 639 ; +C -1 ; WX 600 ; N onesuperior ; B 191 259 410 612 ; +C -1 ; WX 600 ; N twosuperior ; B 175 259 405 612 ; +C -1 ; WX 600 ; N threesuperior ; B 181 251 416 612 ; C -1 ; WX 600 ; N Igrave ; B 113 0 487 789 ; C -1 ; WX 600 ; N Iacute ; B 113 0 487 789 ; +C -1 ; WX 600 ; N Imacron ; B 113 0 487 726 ; +C -1 ; WX 600 ; N Iogonek ; B 113 -155 500 563 ; C -1 ; WX 600 ; N Idieresis ; B 113 0 487 761 ; -C -1 ; WX 600 ; N degree ; B 155 346 445 636 ; +C -1 ; WX 600 ; N Gbreve ; B 63 -16 562 770 ; +C -1 ; WX 600 ; N Umacron ; B 40 -16 560 726 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 43 -237 572 563 ; +C -1 ; WX 600 ; N ograve ; B 72 -16 528 639 ; +C -1 ; WX 600 ; N Scommaaccent ; B 92 -237 508 576 ; +C -1 ; WX 600 ; N Eogonek ; B 43 -155 549 563 ; +C -1 ; WX 600 ; N oacute ; B 72 -16 528 639 ; +C -1 ; WX 600 ; N Edotaccent ; B 43 0 520 761 ; +C -1 ; WX 600 ; N iogonek ; B 92 -155 520 624 ; +C -1 ; WX 600 ; N gcommaaccent ; B 63 -186 562 666 ; +C -1 ; WX 600 ; N odieresis ; B 72 -16 528 611 ; +C -1 ; WX 600 ; N ntilde ; B 53 0 541 605 ; +C -1 ; WX 600 ; N ncaron ; B 53 0 541 639 ; +C -1 ; WX 600 ; N Ecaron ; B 43 0 520 789 ; C -1 ; WX 600 ; N Ecircumflex ; B 43 0 520 789 ; +C -1 ; WX 600 ; N scedilla ; B 103 -173 497 431 ; +C -1 ; WX 600 ; N rcaron ; B 84 0 541 639 ; +C -1 ; WX 600 ; N Egrave ; B 43 0 520 789 ; +C -1 ; WX 600 ; N Eacute ; B 43 0 520 789 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 63 -237 562 576 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 43 -237 589 563 ; +C -1 ; WX 600 ; N Edieresis ; B 43 0 520 761 ; +C -1 ; WX 600 ; N nacute ; B 53 0 541 639 ; +C -1 ; WX 600 ; N uogonek ; B 43 -155 556 417 ; +C -1 ; WX 600 ; N umacron ; B 43 -16 541 576 ; +C -1 ; WX 600 ; N Dcaron ; B 43 0 520 789 ; +C -1 ; WX 600 ; N lcaron ; B 92 0 508 616 ; +C -1 ; WX 600 ; N Ccaron ; B 63 -16 534 789 ; +C -1 ; WX 600 ; N Cacute ; B 63 -16 534 789 ; +C -1 ; WX 600 ; N Ccedilla ; B 63 -173 534 576 ; +C -1 ; WX 600 ; N degree ; B 155 346 445 636 ; +C -1 ; WX 600 ; N Aogonek ; B 9 -155 600 563 ; C -1 ; WX 600 ; N minus ; B 72 261 528 302 ; C -1 ; WX 600 ; N multiply ; B 118 100 482 464 ; C -1 ; WX 600 ; N divide ; B 72 25 528 540 ; -C -1 ; WX 600 ; N Egrave ; B 43 0 520 789 ; +C -1 ; WX 600 ; N Aring ; B 9 0 591 811 ; C -1 ; WX 600 ; N trademark ; B 4 243 598 563 ; -C -1 ; WX 600 ; N Oacute ; B 51 -16 549 789 ; -C -1 ; WX 600 ; N thorn ; B 22 -186 541 590 ; -C -1 ; WX 600 ; N eth ; B 72 -17 528 620 ; -C -1 ; WX 600 ; N Eacute ; B 43 0 520 789 ; -C -1 ; WX 600 ; N ccedilla ; B 84 -173 535 431 ; -C -1 ; WX 600 ; N idieresis ; B 92 0 508 611 ; -C -1 ; WX 600 ; N iacute ; B 92 0 508 639 ; +C -1 ; WX 600 ; N rcommaaccent ; B 84 -237 541 427 ; +C -1 ; WX 600 ; N lacute ; B 92 0 508 789 ; +C -1 ; WX 600 ; N omacron ; B 72 -16 528 576 ; +C -1 ; WX 600 ; N Atilde ; B 9 0 591 755 ; +C -1 ; WX 600 ; N icircumflex ; B 92 0 508 639 ; C -1 ; WX 600 ; N igrave ; B 92 0 508 639 ; +C -1 ; WX 600 ; N ncommaaccent ; B 53 -237 541 431 ; +C -1 ; WX 600 ; N lcommaaccent ; B 92 -237 508 604 ; C -1 ; WX 600 ; N plusminus ; B 72 0 528 529 ; C -1 ; WX 600 ; N onehalf ; B 23 0 573 612 ; C -1 ; WX 600 ; N onequarter ; B 16 0 580 612 ; C -1 ; WX 600 ; N threequarters ; B 6 0 580 612 ; -C -1 ; WX 600 ; N icircumflex ; B 92 0 508 639 ; -C -1 ; WX 600 ; N Edieresis ; B 43 0 520 761 ; -C -1 ; WX 600 ; N ntilde ; B 53 0 541 605 ; -C -1 ; WX 600 ; N Aring ; B 9 0 591 811 ; -C -1 ; WX 600 ; N odieresis ; B 72 -16 528 611 ; -C -1 ; WX 600 ; N oacute ; B 72 -16 528 639 ; -C -1 ; WX 600 ; N ograve ; B 72 -16 528 639 ; -C -1 ; WX 600 ; N ocircumflex ; B 72 -16 528 639 ; -C -1 ; WX 600 ; N otilde ; B 72 -16 528 605 ; -C -1 ; WX 600 ; N scaron ; B 103 -16 497 639 ; -C -1 ; WX 600 ; N udieresis ; B 43 -16 541 611 ; -C -1 ; WX 600 ; N uacute ; B 43 -16 541 639 ; -C -1 ; WX 600 ; N ugrave ; B 43 -16 541 639 ; -C -1 ; WX 600 ; N ucircumflex ; B 43 -16 541 639 ; -C -1 ; WX 600 ; N yacute ; B 51 -186 549 639 ; -C -1 ; WX 600 ; N zcaron ; B 115 0 489 639 ; +C -1 ; WX 600 ; N iacute ; B 92 0 508 639 ; +C -1 ; WX 600 ; N Abreve ; B 9 0 591 770 ; +C -1 ; WX 600 ; N kcommaaccent ; B 63 -237 541 604 ; +C -1 ; WX 600 ; N Omacron ; B 51 -16 549 726 ; +C -1 ; WX 600 ; N imacron ; B 92 0 508 576 ; +C -1 ; WX 600 ; N emacron ; B 63 -16 520 576 ; +C -1 ; WX 600 ; N amacron ; B 72 -16 541 576 ; +C -1 ; WX 600 ; N tcommaaccent ; B 43 -237 499 563 ; C -1 ; WX 600 ; N ydieresis ; B 51 -186 549 611 ; +C -1 ; WX 600 ; N zdotaccent ; B 115 0 489 611 ; +C -1 ; WX 600 ; N zcaron ; B 115 0 489 639 ; +C -1 ; WX 600 ; N zacute ; B 115 0 489 639 ; +C -1 ; WX 600 ; N yacute ; B 51 -186 549 639 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 43 -16 541 633 ; +C -1 ; WX 600 ; N eth ; B 72 -17 528 620 ; +C -1 ; WX 600 ; N uring ; B 43 -16 541 661 ; +C -1 ; WX 600 ; N Ocircumflex ; B 51 -16 549 789 ; +C -1 ; WX 600 ; N commaaccent ; B 234 -237 367 -60 ; C -1 ; WX 600 ; N copyright ; B 3 -15 596 578 ; C -1 ; WX 600 ; N registered ; B 3 -15 596 578 ; -C -1 ; WX 600 ; N Atilde ; B 9 0 591 755 ; -C -1 ; WX 600 ; N nbspace ; B 295 0 295 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 63 -173 534 576 ; C -1 ; WX 600 ; N Acircumflex ; B 9 0 591 789 ; +C -1 ; WX 600 ; N idieresis ; B 92 0 508 611 ; +C -1 ; WX 600 ; N lozenge ; B 89 -11 511 575 ; +C -1 ; WX 600 ; N Delta ; B 43 0 557 563 ; +C -1 ; WX 600 ; N notequal ; B 51 94 549 464 ; +C -1 ; WX 600 ; N radical ; B 27 0 628 699 ; C -1 ; WX 600 ; N Agrave ; B 9 0 591 789 ; -C -1 ; WX 600 ; N logicalnot ; B 72 168 528 438 ; C -1 ; WX 600 ; N Aacute ; B 9 0 591 789 ; -C -1 ; WX 600 ; N Eth ; B 0 0 520 563 ; +C -1 ; WX 600 ; N lessequal ; B 53 0 525 535 ; +C -1 ; WX 600 ; N greaterequal ; B 59 0 531 535 ; +C -1 ; WX 600 ; N logicalnot ; B 72 168 528 438 ; +C -1 ; WX 600 ; N summation ; B 113 -127 507 563 ; +C -1 ; WX 600 ; N partialdiff ; B 71 -17 529 582 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 22 -237 562 563 ; +C -1 ; WX 600 ; N dcroat ; B 63 -16 583 604 ; C -1 ; WX 600 ; N brokenbar ; B 280 -124 320 604 ; -C -1 ; WX 600 ; N Thorn ; B 43 0 499 563 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 63 -237 541 563 ; C -1 ; WX 600 ; N Adieresis ; B 9 0 591 761 ; C -1 ; WX 600 ; N mu ; B 43 -200 541 417 ; C -1 ; WX 600 ; N .notdef ; B 295 0 295 0 ; EndCharMetrics +StartKernData +StartKernPairs 998 +KPX A C -33 +KPX A Ccedilla -30 +KPX A G -27 +KPX A O -27 +KPX A Odieresis -27 +KPX A Q -28 +KPX A T -27 +KPX A U -32 +KPX A Uacute -32 +KPX A Ucircumflex -32 +KPX A Udieresis -32 +KPX A Ugrave -32 +KPX A V -74 +KPX A W -12 +KPX A Y -28 +KPX A a 8 +KPX A b 46 +KPX A c -19 +KPX A ccedilla -15 +KPX A comma -39 +KPX A d -10 +KPX A e -14 +KPX A g -23 +KPX A guillemotleft -49 +KPX A guilsinglleft -49 +KPX A hyphen -30 +KPX A o -16 +KPX A period -67 +KPX A q -24 +KPX A quotedblright -78 +KPX A quoteright -98 +KPX A t -26 +KPX A u -15 +KPX A v -55 +KPX A w -19 +KPX A y -60 +KPX Aacute C -33 +KPX Aacute G -27 +KPX Aacute O -27 +KPX Aacute Q -28 +KPX Aacute T -27 +KPX Aacute U -32 +KPX Aacute V -74 +KPX Aacute W -12 +KPX Aacute Y -28 +KPX Aacute a 8 +KPX Aacute b 46 +KPX Aacute c -19 +KPX Aacute comma -39 +KPX Aacute d -10 +KPX Aacute e -14 +KPX Aacute g -23 +KPX Aacute guillemotleft -49 +KPX Aacute guilsinglleft -49 +KPX Aacute hyphen -30 +KPX Aacute o -16 +KPX Aacute period -67 +KPX Aacute q -24 +KPX Aacute quoteright -98 +KPX Aacute t -26 +KPX Aacute u -15 +KPX Aacute v -55 +KPX Aacute w -19 +KPX Aacute y -60 +KPX Acircumflex C -33 +KPX Acircumflex G -27 +KPX Acircumflex O -27 +KPX Acircumflex Q -28 +KPX Acircumflex T -27 +KPX Acircumflex U -32 +KPX Acircumflex V -74 +KPX Acircumflex W -12 +KPX Acircumflex Y -28 +KPX Acircumflex comma -39 +KPX Acircumflex period -67 +KPX Adieresis C -33 +KPX Adieresis G -27 +KPX Adieresis O -27 +KPX Adieresis Q -28 +KPX Adieresis T -27 +KPX Adieresis U -32 +KPX Adieresis V -74 +KPX Adieresis W -12 +KPX Adieresis Y -28 +KPX Adieresis a 8 +KPX Adieresis b 46 +KPX Adieresis c -19 +KPX Adieresis comma -39 +KPX Adieresis d -10 +KPX Adieresis g -23 +KPX Adieresis guillemotleft -49 +KPX Adieresis guilsinglleft -49 +KPX Adieresis hyphen -30 +KPX Adieresis o -16 +KPX Adieresis period -67 +KPX Adieresis q -24 +KPX Adieresis quotedblright -78 +KPX Adieresis quoteright -98 +KPX Adieresis t -26 +KPX Adieresis u -15 +KPX Adieresis v -55 +KPX Adieresis w -19 +KPX Adieresis y -60 +KPX Agrave C -33 +KPX Agrave G -27 +KPX Agrave O -27 +KPX Agrave Q -28 +KPX Agrave T -27 +KPX Agrave U -32 +KPX Agrave V -74 +KPX Agrave W -12 +KPX Agrave Y -28 +KPX Agrave comma -39 +KPX Agrave period -67 +KPX Aring C -33 +KPX Aring G -27 +KPX Aring O -27 +KPX Aring Q -28 +KPX Aring T -27 +KPX Aring U -32 +KPX Aring V -74 +KPX Aring W -12 +KPX Aring Y -28 +KPX Aring a 8 +KPX Aring b 46 +KPX Aring c -19 +KPX Aring comma -39 +KPX Aring d -10 +KPX Aring e -14 +KPX Aring g -23 +KPX Aring guillemotleft -49 +KPX Aring guilsinglleft -49 +KPX Aring hyphen -30 +KPX Aring o -16 +KPX Aring period -67 +KPX Aring q -24 +KPX Aring quotedblright -78 +KPX Aring quoteright -98 +KPX Aring t -26 +KPX Aring u -15 +KPX Aring v -55 +KPX Aring w -19 +KPX Aring y -60 +KPX Atilde C -33 +KPX Atilde G -27 +KPX Atilde O -27 +KPX Atilde Q -28 +KPX Atilde T -27 +KPX Atilde U -32 +KPX Atilde V -74 +KPX Atilde W -12 +KPX Atilde Y -28 +KPX Atilde comma -39 +KPX Atilde period -67 +KPX B A -9 +KPX B AE -9 +KPX B Aacute -9 +KPX B Acircumflex -9 +KPX B Adieresis -9 +KPX B Aring -9 +KPX B Atilde -9 +KPX B O -10 +KPX B OE 10 +KPX B Oacute -10 +KPX B Ocircumflex -10 +KPX B Odieresis -10 +KPX B Ograve -10 +KPX B Oslash -8 +KPX B V -29 +KPX B W -12 +KPX B Y -50 +KPX C A -9 +KPX C AE -9 +KPX C Aacute -9 +KPX C Adieresis -9 +KPX C Aring -9 +KPX C H -26 +KPX C K -11 +KPX C O -21 +KPX C Oacute -21 +KPX C Odieresis -21 +KPX Ccedilla A -5 +KPX D A -42 +KPX D Aacute -42 +KPX D Acircumflex -42 +KPX D Adieresis -42 +KPX D Agrave -42 +KPX D Aring -42 +KPX D Atilde -42 +KPX D J -31 +KPX D T -40 +KPX D V -42 +KPX D W -17 +KPX D X -55 +KPX D Y -63 +KPX F A -38 +KPX F Aacute -38 +KPX F Acircumflex -38 +KPX F Adieresis -38 +KPX F Agrave -38 +KPX F Aring -38 +KPX F Atilde -38 +KPX F J -95 +KPX F O -27 +KPX F Odieresis -27 +KPX F a -47 +KPX F aacute -47 +KPX F adieresis -43 +KPX F ae -20 +KPX F aring -47 +KPX F comma -168 +KPX F e -56 +KPX F eacute -56 +KPX F hyphen -67 +KPX F i -47 +KPX F j -54 +KPX F o -63 +KPX F oacute -63 +KPX F odieresis -48 +KPX F oe -21 +KPX F oslash -63 +KPX F period -193 +KPX F r -32 +KPX F u -1 +KPX G A 6 +KPX G AE 5 +KPX G Aacute 6 +KPX G Acircumflex 6 +KPX G Adieresis 6 +KPX G Agrave 6 +KPX G Aring 6 +KPX G Atilde 6 +KPX G T -25 +KPX G V 6 +KPX G W 1 +KPX G Y -14 +KPX J A -7 +KPX J AE -16 +KPX J Adieresis -7 +KPX J Aring -7 +KPX K C -42 +KPX K G -36 +KPX K O -37 +KPX K OE -19 +KPX K Oacute -37 +KPX K Odieresis -37 +KPX K S -9 +KPX K T -12 +KPX K a -1 +KPX K adieresis -1 +KPX K ae 26 +KPX K aring -1 +KPX K e -24 +KPX K hyphen -61 +KPX K o -25 +KPX K oacute -25 +KPX K odieresis -25 +KPX K u -25 +KPX K udieresis -25 +KPX K y -67 +KPX L A 17 +KPX L AE 16 +KPX L Aacute 17 +KPX L Adieresis 17 +KPX L Aring 17 +KPX L C -11 +KPX L Ccedilla -10 +KPX L G -10 +KPX L O -6 +KPX L Oacute -6 +KPX L Ocircumflex -6 +KPX L Odieresis -6 +KPX L Ograve -6 +KPX L Otilde -6 +KPX L S -24 +KPX L T -52 +KPX L U -29 +KPX L Udieresis -29 +KPX L V -66 +KPX L W -27 +KPX L Y -53 +KPX L hyphen 3 +KPX L quotedblright -66 +KPX L quoteright -73 +KPX L u -16 +KPX L udieresis -16 +KPX L y -45 +KPX N A -3 +KPX N AE -3 +KPX N Aacute -3 +KPX N Adieresis -3 +KPX N Aring -3 +KPX N C -12 +KPX N Ccedilla -12 +KPX N G -11 +KPX N O -9 +KPX N Oacute -9 +KPX N Odieresis -9 +KPX N a -19 +KPX N aacute -19 +KPX N adieresis -19 +KPX N ae 11 +KPX N aring -19 +KPX N comma -58 +KPX N e -6 +KPX N eacute -6 +KPX N o -10 +KPX N oacute -10 +KPX N odieresis -10 +KPX N oslash -7 +KPX N period -83 +KPX N u -9 +KPX N udieresis -9 +KPX O A -27 +KPX O AE -26 +KPX O Aacute -27 +KPX O Adieresis -27 +KPX O Aring -27 +KPX O T -30 +KPX O V -31 +KPX O W -5 +KPX O X -43 +KPX O Y -52 +KPX Oacute A -27 +KPX Oacute T -30 +KPX Oacute V -31 +KPX Oacute W -5 +KPX Oacute Y -52 +KPX Ocircumflex T -30 +KPX Ocircumflex V -31 +KPX Ocircumflex Y -52 +KPX Odieresis A -27 +KPX Odieresis T -30 +KPX Odieresis V -31 +KPX Odieresis W -5 +KPX Odieresis X -43 +KPX Odieresis Y -52 +KPX Ograve T -30 +KPX Ograve V -31 +KPX Ograve Y -52 +KPX Oslash A -26 +KPX Otilde T -30 +KPX Otilde V -31 +KPX Otilde Y -52 +KPX P A -79 +KPX P AE -76 +KPX P Aacute -79 +KPX P Adieresis -79 +KPX P Aring -79 +KPX P J -82 +KPX P a -52 +KPX P aacute -52 +KPX P adieresis -52 +KPX P ae -25 +KPX P aring -52 +KPX P comma -156 +KPX P e -42 +KPX P eacute -42 +KPX P hyphen -46 +KPX P o -48 +KPX P oacute -48 +KPX P odieresis -48 +KPX P oe -13 +KPX P oslash -48 +KPX P period -181 +KPX R C -27 +KPX R Ccedilla -28 +KPX R G -26 +KPX R O -25 +KPX R OE -4 +KPX R Oacute -25 +KPX R Odieresis -25 +KPX R T -28 +KPX R U -32 +KPX R Udieresis -32 +KPX R V -33 +KPX R W -13 +KPX R Y -29 +KPX R a 7 +KPX R aacute 7 +KPX R adieresis 7 +KPX R ae 35 +KPX R aring 7 +KPX R e -15 +KPX R eacute -15 +KPX R hyphen -48 +KPX R o -17 +KPX R oacute -17 +KPX R odieresis -17 +KPX R oe 22 +KPX R u -11 +KPX R uacute -11 +KPX R udieresis -11 +KPX R y -15 +KPX S A -22 +KPX S AE -22 +KPX S Aacute -22 +KPX S Adieresis -22 +KPX S Aring -22 +KPX S T -42 +KPX S V -10 +KPX S W -16 +KPX S Y -31 +KPX S t -18 +KPX T A -27 +KPX T AE -27 +KPX T Aacute -27 +KPX T Acircumflex -27 +KPX T Adieresis -27 +KPX T Agrave -27 +KPX T Aring -27 +KPX T Atilde -27 +KPX T C -29 +KPX T G -30 +KPX T J -79 +KPX T O -29 +KPX T OE -7 +KPX T Oacute -29 +KPX T Ocircumflex -29 +KPX T Odieresis -29 +KPX T Ograve -29 +KPX T Oslash -29 +KPX T Otilde -29 +KPX T S -43 +KPX T V 10 +KPX T W 5 +KPX T Y -10 +KPX T a -60 +KPX T ae -33 +KPX T c -88 +KPX T colon -136 +KPX T comma -108 +KPX T e -83 +KPX T g -92 +KPX T guillemotleft -122 +KPX T guilsinglleft -122 +KPX T hyphen -94 +KPX T i -58 +KPX T j -80 +KPX T o -85 +KPX T oslash -54 +KPX T period -136 +KPX T r -54 +KPX T s -63 +KPX T semicolon -111 +KPX T u -84 +KPX T v -93 +KPX T w -88 +KPX T y -103 +KPX U A -18 +KPX U AE -27 +KPX U Aacute -18 +KPX U Acircumflex -18 +KPX U Adieresis -18 +KPX U Aring -18 +KPX U Atilde -18 +KPX U comma -76 +KPX U m 6 +KPX U n -19 +KPX U p 0 +KPX U period -101 +KPX U r -41 +KPX Uacute A -18 +KPX Uacute comma -76 +KPX Uacute m 6 +KPX Uacute n -19 +KPX Uacute p 0 +KPX Uacute period -101 +KPX Uacute r -41 +KPX Ucircumflex A -18 +KPX Udieresis A -18 +KPX Udieresis b 25 +KPX Udieresis comma -76 +KPX Udieresis m 6 +KPX Udieresis n -19 +KPX Udieresis p 0 +KPX Udieresis period -101 +KPX Udieresis r -41 +KPX Ugrave A -18 +KPX V A -3 +KPX V AE -12 +KPX V Aacute -3 +KPX V Acircumflex -3 +KPX V Adieresis -3 +KPX V Agrave -3 +KPX V Aring -3 +KPX V Atilde -3 +KPX V C -29 +KPX V G -31 +KPX V O -31 +KPX V Oacute -31 +KPX V Ocircumflex -31 +KPX V Odieresis -31 +KPX V Ograve -31 +KPX V Oslash -31 +KPX V Otilde -31 +KPX V S -34 +KPX V T 10 +KPX V a -60 +KPX V ae -33 +KPX V colon -124 +KPX V comma -129 +KPX V e -52 +KPX V g -53 +KPX V guillemotleft -75 +KPX V guilsinglleft -75 +KPX V hyphen -43 +KPX V i -60 +KPX V o -56 +KPX V oslash -53 +KPX V period -154 +KPX V r -46 +KPX V semicolon -114 +KPX V u -15 +KPX V y -19 +KPX W A -8 +KPX W AE -14 +KPX W Aacute -8 +KPX W Acircumflex -8 +KPX W Adieresis -8 +KPX W Agrave -8 +KPX W Aring -8 +KPX W Atilde -8 +KPX W C -8 +KPX W G -7 +KPX W O -5 +KPX W Oacute -5 +KPX W Ocircumflex -5 +KPX W Odieresis -5 +KPX W Ograve -5 +KPX W Oslash -2 +KPX W Otilde -5 +KPX W S -24 +KPX W T 5 +KPX W a -20 +KPX W ae 10 +KPX W colon -88 +KPX W comma -66 +KPX W e -6 +KPX W g -7 +KPX W guillemotleft -31 +KPX W guilsinglleft -31 +KPX W hyphen -2 +KPX W i -43 +KPX W o -10 +KPX W oslash -7 +KPX W period -90 +KPX W r -29 +KPX W semicolon -69 +KPX W u 2 +KPX W y -2 +KPX X C -46 +KPX X O -43 +KPX X Odieresis -43 +KPX X Q -44 +KPX X a -7 +KPX X e -30 +KPX X hyphen -75 +KPX X o -31 +KPX X u -31 +KPX X y -53 +KPX Y A -24 +KPX Y AE -27 +KPX Y Aacute -24 +KPX Y Acircumflex -24 +KPX Y Adieresis -24 +KPX Y Agrave -24 +KPX Y Aring -24 +KPX Y Atilde -24 +KPX Y C -51 +KPX Y G -52 +KPX Y O -53 +KPX Y Oacute -53 +KPX Y Ocircumflex -53 +KPX Y Odieresis -53 +KPX Y Ograve -53 +KPX Y Oslash -53 +KPX Y Otilde -53 +KPX Y S -55 +KPX Y T -10 +KPX Y a -60 +KPX Y ae -32 +KPX Y colon -135 +KPX Y comma -107 +KPX Y e -78 +KPX Y g -81 +KPX Y guillemotleft -115 +KPX Y guilsinglleft -115 +KPX Y hyphen -91 +KPX Y i -57 +KPX Y o -83 +KPX Y oslash -54 +KPX Y p -35 +KPX Y period -135 +KPX Y semicolon -110 +KPX Y u -46 +KPX Y v -39 +KPX Z v -50 +KPX Z y -61 +KPX a j -87 +KPX a quoteright -56 +KPX a v -28 +KPX a w -21 +KPX a y -38 +KPX aacute v -28 +KPX aacute w -21 +KPX aacute y -38 +KPX adieresis v -28 +KPX adieresis w -21 +KPX adieresis y -38 +KPX ae v 21 +KPX ae w 21 +KPX ae y 10 +KPX agrave v -28 +KPX agrave w -21 +KPX agrave y -38 +KPX aring v -28 +KPX aring w -21 +KPX aring y -38 +KPX b v -12 +KPX b w 1 +KPX b y -22 +KPX c h -3 +KPX c k -9 +KPX comma one -144 +KPX comma quotedblright -119 +KPX comma quoteright -136 +KPX e quoteright -41 +KPX e t -29 +KPX e v -22 +KPX e w -19 +KPX e x -2 +KPX e y -33 +KPX eacute v -22 +KPX eacute w -19 +KPX eacute y -33 +KPX ecircumflex v -22 +KPX ecircumflex w -19 +KPX ecircumflex y -33 +KPX eight four -58 +KPX eight one -75 +KPX eight seven -68 +KPX f a -38 +KPX f aacute -38 +KPX f adieresis -22 +KPX f ae -11 +KPX f aring -38 +KPX f e -55 +KPX f eacute -55 +KPX f f -42 +KPX f i -36 +KPX f j -59 +KPX f l -25 +KPX f o -62 +KPX f oacute -62 +KPX f odieresis -27 +KPX f oe -20 +KPX f oslash -32 +KPX f quoteright -56 +KPX f s -41 +KPX f t -6 +KPX five four -52 +KPX five one -86 +KPX five seven -72 +KPX four four -62 +KPX four one -66 +KPX four seven -93 +KPX g a -10 +KPX g adieresis -10 +KPX g ae 16 +KPX g aring -10 +KPX g e -4 +KPX g eacute -4 +KPX g l -33 +KPX g oacute -8 +KPX g odieresis -8 +KPX g r 0 +KPX guillemotright A -43 +KPX guillemotright AE -39 +KPX guillemotright Aacute -43 +KPX guillemotright Adieresis -43 +KPX guillemotright Aring -43 +KPX guillemotright T -121 +KPX guillemotright V -71 +KPX guillemotright W -29 +KPX guillemotright Y -114 +KPX guilsinglright A -43 +KPX guilsinglright AE -39 +KPX guilsinglright Aacute -43 +KPX guilsinglright Adieresis -43 +KPX guilsinglright Aring -43 +KPX guilsinglright T -121 +KPX guilsinglright V -71 +KPX guilsinglright W -29 +KPX guilsinglright Y -114 +KPX h quoteright -49 +KPX h y -32 +KPX hyphen A -26 +KPX hyphen AE -20 +KPX hyphen Aacute -26 +KPX hyphen Adieresis -26 +KPX hyphen Aring -26 +KPX hyphen T -95 +KPX hyphen V -41 +KPX hyphen W -1 +KPX hyphen Y -92 +KPX i T -58 +KPX i j -142 +KPX k a -6 +KPX k aacute -6 +KPX k adieresis -6 +KPX k ae 21 +KPX k aring -6 +KPX k comma -53 +KPX k e -29 +KPX k eacute -29 +KPX k g -38 +KPX k hyphen -99 +KPX k o -30 +KPX k oacute -30 +KPX k odieresis -30 +KPX k period -81 +KPX k s -9 +KPX k u -3 +KPX k udieresis -3 +KPX l v -83 +KPX l y -93 +KPX m p 22 +KPX m v 14 +KPX m w 15 +KPX m y 3 +KPX n T -42 +KPX n p -5 +KPX n quoteright -47 +KPX n v -21 +KPX n w -12 +KPX n y -31 +KPX nine four -51 +KPX nine one -75 +KPX nine seven -66 +KPX o T -85 +KPX o quoteright -39 +KPX o t -22 +KPX o v -21 +KPX o w -6 +KPX o x -26 +KPX o y -31 +KPX oacute v -21 +KPX oacute w -6 +KPX oacute y -31 +KPX ocircumflex t -22 +KPX odieresis t -22 +KPX odieresis v -21 +KPX odieresis w -6 +KPX odieresis x -26 +KPX odieresis y -31 +KPX ograve v -21 +KPX ograve w -6 +KPX ograve y -31 +KPX one comma -91 +KPX one eight -86 +KPX one five -67 +KPX one four -119 +KPX one nine -75 +KPX one one -62 +KPX one period -119 +KPX one seven -141 +KPX one six -111 +KPX one three -61 +KPX one two -47 +KPX one zero -94 +KPX p t -15 +KPX p y -19 +KPX period one -119 +KPX period quotedblright -108 +KPX period quoteright -125 +KPX q c -2 +KPX q u 42 +KPX quotedblbase A -3 +KPX quotedblbase AE -3 +KPX quotedblbase T -78 +KPX quotedblbase V -83 +KPX quotedblbase W -23 +KPX quotedblbase Y -79 +KPX quotedblleft A -59 +KPX quotedblleft AE -52 +KPX quotedblleft Aacute -59 +KPX quotedblleft Adieresis -59 +KPX quotedblleft Aring -59 +KPX quotedblleft T -37 +KPX quotedblleft V -14 +KPX quotedblleft W -3 +KPX quotedblleft Y -35 +KPX quotedblright A -59 +KPX quotedblright AE -68 +KPX quotedblright Aacute -59 +KPX quotedblright Adieresis -59 +KPX quotedblright Aring -59 +KPX quotedblright T -45 +KPX quotedblright V -14 +KPX quotedblright W -20 +KPX quotedblright Y -35 +KPX quoteleft A -80 +KPX quoteleft AE -73 +KPX quoteleft Aacute -80 +KPX quoteleft Adieresis -80 +KPX quoteleft Aring -80 +KPX quoteleft T -59 +KPX quoteleft V -36 +KPX quoteleft W -24 +KPX quoteleft Y -56 +KPX quoteright A -140 +KPX quoteright AE -149 +KPX quoteright Aacute -140 +KPX quoteright Adieresis -140 +KPX quoteright Aring -140 +KPX quoteright comma -196 +KPX quoteright d -126 +KPX quoteright o -131 +KPX quoteright period -220 +KPX quoteright r -145 +KPX quoteright s -140 +KPX quoteright t -114 +KPX quoteright v -108 +KPX quoteright w -105 +KPX quoteright y -118 +KPX r a -20 +KPX r aacute -20 +KPX r acircumflex -20 +KPX r adieresis -20 +KPX r ae 7 +KPX r agrave -20 +KPX r aring -20 +KPX r c -24 +KPX r ccedilla -28 +KPX r colon -81 +KPX r comma -97 +KPX r d -14 +KPX r e -12 +KPX r eacute -12 +KPX r ecircumflex -12 +KPX r egrave -12 +KPX r f -18 +KPX r g -11 +KPX r h -19 +KPX r hyphen -120 +KPX r i -28 +KPX r j -35 +KPX r k -29 +KPX r l -47 +KPX r m 33 +KPX r n 6 +KPX r o -19 +KPX r oacute -19 +KPX r ocircumflex -19 +KPX r odieresis -19 +KPX r oe 18 +KPX r ograve -19 +KPX r oslash -19 +KPX r p 28 +KPX r period -125 +KPX r q -11 +KPX r quoteright -37 +KPX r r -13 +KPX r s -24 +KPX r semicolon -69 +KPX r t 17 +KPX r u 17 +KPX r v 24 +KPX r w 24 +KPX r x 2 +KPX r y 13 +KPX r z -19 +KPX s quoteright -48 +KPX s t -13 +KPX seven colon -148 +KPX seven comma -140 +KPX seven eight -79 +KPX seven five -84 +KPX seven four -111 +KPX seven one -67 +KPX seven period -165 +KPX seven seven -62 +KPX seven six -99 +KPX seven three -72 +KPX seven two -69 +KPX six four -46 +KPX six one -61 +KPX six seven -48 +KPX t S -35 +KPX t a -20 +KPX t aacute -20 +KPX t adieresis -20 +KPX t ae 8 +KPX t aring -20 +KPX t colon -102 +KPX t e -37 +KPX t eacute -37 +KPX t h -7 +KPX t o -39 +KPX t oacute -39 +KPX t odieresis -39 +KPX t quoteright -94 +KPX t semicolon -80 +KPX three four -52 +KPX three one -74 +KPX three seven -67 +KPX two four -92 +KPX two one -66 +KPX two seven -71 +KPX u quoteright -38 +KPX v a -6 +KPX v aacute -6 +KPX v acircumflex -6 +KPX v adieresis -6 +KPX v ae 20 +KPX v agrave -6 +KPX v aring -6 +KPX v atilde -6 +KPX v c -25 +KPX v colon -71 +KPX v comma -113 +KPX v e -13 +KPX v eacute -13 +KPX v ecircumflex -13 +KPX v egrave -13 +KPX v g -11 +KPX v hyphen -24 +KPX v l -82 +KPX v o -21 +KPX v oacute -21 +KPX v odieresis -21 +KPX v ograve -21 +KPX v oslash -21 +KPX v period -139 +KPX v s -19 +KPX v semicolon -62 +KPX w a -6 +KPX w aacute -6 +KPX w acircumflex -6 +KPX w adieresis -6 +KPX w ae 20 +KPX w agrave -6 +KPX w aring -6 +KPX w atilde -6 +KPX w c -10 +KPX w colon -71 +KPX w comma -70 +KPX w e -1 +KPX w eacute -1 +KPX w ecircumflex -1 +KPX w egrave -1 +KPX w g -3 +KPX w hyphen 1 +KPX w l -50 +KPX w o -6 +KPX w oacute -6 +KPX w odieresis -6 +KPX w ograve -6 +KPX w oslash -3 +KPX w period -95 +KPX w s -18 +KPX w semicolon -62 +KPX x a -2 +KPX x c -29 +KPX x e -25 +KPX x eacute -25 +KPX x o -26 +KPX x q -30 +KPX y a -17 +KPX y aacute -17 +KPX y acircumflex -17 +KPX y adieresis -17 +KPX y ae 10 +KPX y agrave -17 +KPX y aring -17 +KPX y atilde -17 +KPX y c -35 +KPX y colon -81 +KPX y comma -117 +KPX y e -24 +KPX y eacute -24 +KPX y ecircumflex -24 +KPX y egrave -24 +KPX y g -21 +KPX y hyphen -24 +KPX y l -93 +KPX y o -31 +KPX y oacute -31 +KPX y odieresis -31 +KPX y ograve -31 +KPX y oslash -31 +KPX y period -144 +KPX y s -30 +KPX y semicolon -72 +KPX zero four -58 +KPX zero one -81 +KPX zero seven -73 +EndKernPairs +EndKernData EndFontMetrics diff --git a/misc/gs_afm/CourBo.afm b/misc/gs_afm/CourBo.afm index 2ea312d1fb..0bafed51b8 100644 --- a/misc/gs_afm/CourBo.afm +++ b/misc/gs_afm/CourBo.afm @@ -1,7 +1,7 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. FontName NimbusMonL-Bold FullName Nimbus Mono L Bold FamilyName Nimbus Mono L @@ -10,15 +10,15 @@ ItalicAngle 0.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -43 -229 630 871 +FontBBox -43 -278 681 871 CapHeight 583 XHeight 437 Descender -205 Ascender 624 -StartCharMetrics 232 +StartCharMetrics 316 C 32 ; WX 600 ; N space ; B 375 0 375 0 ; C 33 ; WX 600 ; N exclam ; B 220 -15 381 638 ; C 34 ; WX 600 ; N quotedbl ; B 136 312 464 602 ; @@ -51,7 +51,7 @@ C 60 ; WX 600 ; N less ; B 42 54 544 501 ; C 61 ; WX 600 ; N equal ; B 42 138 558 422 ; C 62 ; WX 600 ; N greater ; B 56 53 558 500 ; C 63 ; WX 600 ; N question ; B 104 -15 517 598 ; -C 64 ; WX 600 ; N at ; B 76 -151 509 620 ; +C 64 ; WX 600 ; N at ; B 76 -152 509 620 ; C 65 ; WX 600 ; N A ; B -21 0 621 583 ; C 66 ; WX 600 ; N B ; B 13 0 571 583 ; C 67 ; WX 600 ; N C ; B 33 -14 564 597 ; @@ -62,7 +62,7 @@ C 71 ; WX 600 ; N G ; B 33 -14 592 597 ; C 72 ; WX 600 ; N H ; B 23 0 581 583 ; C 73 ; WX 600 ; N I ; B 83 0 517 583 ; C 74 ; WX 600 ; N J ; B 54 -14 613 583 ; -C 75 ; WX 600 ; N K ; B 13 0 602 584 ; +C 75 ; WX 600 ; N K ; B 13 0 602 583 ; C 76 ; WX 600 ; N L ; B 33 0 571 583 ; C 77 ; WX 600 ; N M ; B -19 0 623 584 ; C 78 ; WX 600 ; N N ; B -8 0 592 583 ; @@ -75,8 +75,8 @@ C 84 ; WX 600 ; N T ; B 42 0 558 583 ; C 85 ; WX 600 ; N U ; B 10 -14 590 583 ; C 86 ; WX 600 ; N V ; B -21 0 621 583 ; C 87 ; WX 600 ; N W ; B -10 0 610 583 ; -C 88 ; WX 600 ; N X ; B 10 0 590 584 ; -C 89 ; WX 600 ; N Y ; B 21 0 579 584 ; +C 88 ; WX 600 ; N X ; B 10 0 590 583 ; +C 89 ; WX 600 ; N Y ; B 21 0 579 583 ; C 90 ; WX 600 ; N Z ; B 73 0 527 583 ; C 91 ; WX 600 ; N bracketleft ; B 250 -148 475 627 ; C 92 ; WX 600 ; N backslash ; B 83 -113 517 695 ; @@ -168,88 +168,1174 @@ C 248 ; WX 600 ; N lslash ; B 62 0 538 624 ; C 249 ; WX 600 ; N oslash ; B 23 -70 573 494 ; C 250 ; WX 600 ; N oe ; B -11 -16 613 450 ; C 251 ; WX 600 ; N germandbls ; B 13 -16 529 623 ; -C -1 ; WX 600 ; N Yacute ; B 21 0 579 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B 10 -14 590 839 ; -C -1 ; WX 600 ; N Ugrave ; B 10 -14 590 839 ; -C -1 ; WX 600 ; N Zcaron ; B 73 0 527 839 ; -C -1 ; WX 600 ; N Ydieresis ; B 21 0 579 798 ; -C -1 ; WX 600 ; N threesuperior ; B 157 238 442 637 ; -C -1 ; WX 600 ; N Uacute ; B 10 -14 590 839 ; -C -1 ; WX 600 ; N twosuperior ; B 149 247 429 637 ; C -1 ; WX 600 ; N Udieresis ; B 10 -14 590 798 ; -C -1 ; WX 600 ; N middot ; B 225 214 375 346 ; -C -1 ; WX 600 ; N onesuperior ; B 166 247 434 638 ; -C -1 ; WX 600 ; N aacute ; B 42 -16 571 696 ; -C -1 ; WX 600 ; N agrave ; B 42 -16 571 696 ; -C -1 ; WX 600 ; N acircumflex ; B 42 -16 571 696 ; +C -1 ; WX 600 ; N Uacute ; B 10 -14 590 839 ; +C -1 ; WX 600 ; N Scedilla ; B 62 -229 538 597 ; +C -1 ; WX 600 ; N Tcaron ; B 42 0 558 839 ; C -1 ; WX 600 ; N Scaron ; B 62 -14 538 839 ; +C -1 ; WX 600 ; N Rcaron ; B 13 0 619 839 ; +C -1 ; WX 600 ; N Racute ; B 13 0 619 839 ; +C -1 ; WX 600 ; N Sacute ; B 62 -14 538 839 ; C -1 ; WX 600 ; N Otilde ; B 21 -14 579 799 ; -C -1 ; WX 600 ; N sfthyphen ; B 42 229 558 329 ; -C -1 ; WX 600 ; N atilde ; B 42 -16 571 656 ; +C -1 ; WX 600 ; N ucircumflex ; B 13 -13 571 696 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 21 -14 579 838 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 10 -14 590 838 ; +C -1 ; WX 600 ; N Yacute ; B 21 0 579 839 ; +C -1 ; WX 600 ; N Eth ; B 0 0 550 583 ; +C -1 ; WX 600 ; N Dcroat ; B 0 0 550 583 ; +C -1 ; WX 600 ; N Zacute ; B 73 0 527 839 ; +C -1 ; WX 600 ; N Uring ; B 10 -14 590 871 ; +C -1 ; WX 600 ; N gbreve ; B 33 -205 592 687 ; +C -1 ; WX 600 ; N eogonek ; B 33 -208 550 450 ; +C -1 ; WX 600 ; N edotaccent ; B 33 -16 550 654 ; +C -1 ; WX 600 ; N ecaron ; B 33 -16 550 696 ; +C -1 ; WX 600 ; N Ugrave ; B 10 -14 590 839 ; +C -1 ; WX 600 ; N Thorn ; B 14 0 523 583 ; +C -1 ; WX 600 ; N eacute ; B 33 -16 550 696 ; +C -1 ; WX 600 ; N edieresis ; B 33 -16 550 654 ; +C -1 ; WX 600 ; N dcaron ; B 33 -14 681 637 ; +C -1 ; WX 600 ; N ccedilla ; B 54 -229 565 450 ; +C -1 ; WX 600 ; N ccaron ; B 54 -16 565 696 ; +C -1 ; WX 600 ; N cacute ; B 54 -16 565 696 ; +C -1 ; WX 600 ; N aogonek ; B 42 -208 580 450 ; C -1 ; WX 600 ; N aring ; B 42 -16 571 727 ; +C -1 ; WX 600 ; N atilde ; B 42 -16 571 656 ; +C -1 ; WX 600 ; N abreve ; B 42 -16 571 687 ; +C -1 ; WX 600 ; N egrave ; B 33 -16 550 696 ; +C -1 ; WX 600 ; N agrave ; B 42 -16 571 696 ; +C -1 ; WX 600 ; N aacute ; B 42 -16 571 696 ; C -1 ; WX 600 ; N adieresis ; B 42 -16 571 654 ; +C -1 ; WX 600 ; N Uogonek ; B 10 -208 590 583 ; +C -1 ; WX 600 ; N ugrave ; B 13 -13 571 696 ; +C -1 ; WX 600 ; N uacute ; B 13 -13 571 696 ; +C -1 ; WX 600 ; N udieresis ; B 13 -13 571 654 ; +C -1 ; WX 600 ; N tcaron ; B 13 -16 530 637 ; +C -1 ; WX 600 ; N scommaaccent ; B 73 -278 527 450 ; +C -1 ; WX 600 ; N Zcaron ; B 73 0 527 839 ; +C -1 ; WX 600 ; N ecircumflex ; B 33 -16 550 696 ; +C -1 ; WX 600 ; N Ucircumflex ; B 10 -14 590 839 ; +C -1 ; WX 600 ; N acircumflex ; B 42 -16 571 696 ; +C -1 ; WX 600 ; N Zdotaccent ; B 73 0 527 798 ; +C -1 ; WX 600 ; N scaron ; B 73 -16 527 696 ; +C -1 ; WX 600 ; N Amacron ; B -21 0 621 769 ; +C -1 ; WX 600 ; N sacute ; B 73 -16 527 696 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 42 -278 558 583 ; +C -1 ; WX 600 ; N Ydieresis ; B 21 0 579 798 ; +C -1 ; WX 600 ; N thorn ; B -8 -205 571 624 ; +C -1 ; WX 600 ; N Emacron ; B 13 0 550 769 ; C -1 ; WX 600 ; N Ograve ; B 21 -14 579 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B 21 -14 579 839 ; +C -1 ; WX 600 ; N Oacute ; B 21 -14 579 839 ; C -1 ; WX 600 ; N Odieresis ; B 21 -14 579 798 ; C -1 ; WX 600 ; N Ntilde ; B -8 0 592 799 ; -C -1 ; WX 600 ; N edieresis ; B 33 -16 550 654 ; -C -1 ; WX 600 ; N eacute ; B 33 -16 550 696 ; -C -1 ; WX 600 ; N egrave ; B 33 -16 550 696 ; +C -1 ; WX 600 ; N Ncaron ; B -8 0 592 839 ; +C -1 ; WX 600 ; N Nacute ; B -8 0 592 839 ; +C -1 ; WX 600 ; N Lcaron ; B 33 0 571 598 ; +C -1 ; WX 600 ; N Lacute ; B 33 0 571 839 ; +C -1 ; WX 600 ; N Idotaccent ; B 83 0 517 798 ; +C -1 ; WX 600 ; N racute ; B 54 0 571 696 ; C -1 ; WX 600 ; N Icircumflex ; B 83 0 517 839 ; -C -1 ; WX 600 ; N ecircumflex ; B 33 -16 550 696 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 42 -16 558 694 ; +C -1 ; WX 600 ; N otilde ; B 42 -16 558 656 ; +C -1 ; WX 600 ; N Euro ; B 4 -14 538 597 ; +C -1 ; WX 600 ; N ocircumflex ; B 42 -16 558 696 ; +C -1 ; WX 600 ; N onesuperior ; B 166 247 434 638 ; +C -1 ; WX 600 ; N twosuperior ; B 149 247 429 637 ; +C -1 ; WX 600 ; N threesuperior ; B 157 238 442 637 ; C -1 ; WX 600 ; N Igrave ; B 83 0 517 839 ; C -1 ; WX 600 ; N Iacute ; B 83 0 517 839 ; +C -1 ; WX 600 ; N Imacron ; B 83 0 517 769 ; +C -1 ; WX 600 ; N Iogonek ; B 83 -208 517 583 ; C -1 ; WX 600 ; N Idieresis ; B 83 0 517 798 ; -C -1 ; WX 600 ; N degree ; B 125 243 475 596 ; +C -1 ; WX 600 ; N Gbreve ; B 33 -14 592 831 ; +C -1 ; WX 600 ; N Umacron ; B 10 -14 590 769 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 13 -278 602 583 ; +C -1 ; WX 600 ; N ograve ; B 42 -16 558 696 ; +C -1 ; WX 600 ; N Scommaaccent ; B 62 -278 538 597 ; +C -1 ; WX 600 ; N Eogonek ; B 13 -208 587 583 ; +C -1 ; WX 600 ; N oacute ; B 42 -16 558 696 ; +C -1 ; WX 600 ; N Edotaccent ; B 13 0 550 798 ; +C -1 ; WX 600 ; N iogonek ; B 62 -208 540 623 ; +C -1 ; WX 600 ; N gcommaaccent ; B 33 -205 592 721 ; +C -1 ; WX 600 ; N odieresis ; B 42 -16 558 654 ; +C -1 ; WX 600 ; N ntilde ; B 23 0 571 656 ; +C -1 ; WX 600 ; N ncaron ; B 23 0 571 696 ; +C -1 ; WX 600 ; N Ecaron ; B 13 0 550 839 ; C -1 ; WX 600 ; N Ecircumflex ; B 13 0 550 839 ; +C -1 ; WX 600 ; N scedilla ; B 73 -229 527 450 ; +C -1 ; WX 600 ; N rcaron ; B 54 0 571 696 ; +C -1 ; WX 600 ; N Egrave ; B 13 0 550 839 ; +C -1 ; WX 600 ; N Eacute ; B 13 0 550 839 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 33 -278 592 597 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 13 -278 619 583 ; +C -1 ; WX 600 ; N Edieresis ; B 13 0 550 798 ; +C -1 ; WX 600 ; N nacute ; B 23 0 571 696 ; +C -1 ; WX 600 ; N uogonek ; B 13 -208 571 437 ; +C -1 ; WX 600 ; N umacron ; B 13 -13 571 626 ; +C -1 ; WX 600 ; N Dcaron ; B 13 0 550 839 ; +C -1 ; WX 600 ; N lcaron ; B 62 0 538 637 ; +C -1 ; WX 600 ; N Ccaron ; B 33 -14 564 839 ; +C -1 ; WX 600 ; N Cacute ; B 33 -14 564 839 ; +C -1 ; WX 600 ; N Ccedilla ; B 33 -229 564 597 ; +C -1 ; WX 600 ; N degree ; B 125 243 475 596 ; +C -1 ; WX 600 ; N Aogonek ; B -21 -208 621 583 ; C -1 ; WX 600 ; N minus ; B 42 230 558 330 ; C -1 ; WX 600 ; N multiply ; B 100 80 500 480 ; -C -1 ; WX 600 ; N divide ; B 42 28 558 533 ; -C -1 ; WX 600 ; N Egrave ; B 13 0 550 839 ; +C -1 ; WX 600 ; N divide ; B 42 28 558 532 ; +C -1 ; WX 600 ; N Aring ; B -21 0 621 871 ; C -1 ; WX 600 ; N trademark ; B -33 220 620 583 ; -C -1 ; WX 600 ; N Oacute ; B 21 -14 579 839 ; -C -1 ; WX 600 ; N thorn ; B -8 -205 571 624 ; -C -1 ; WX 600 ; N eth ; B 42 -16 558 646 ; -C -1 ; WX 600 ; N Eacute ; B 13 0 550 839 ; -C -1 ; WX 600 ; N ccedilla ; B 54 -229 565 450 ; -C -1 ; WX 600 ; N idieresis ; B 62 0 538 654 ; -C -1 ; WX 600 ; N iacute ; B 62 0 538 696 ; +C -1 ; WX 600 ; N rcommaaccent ; B 54 -278 571 449 ; +C -1 ; WX 600 ; N lacute ; B 62 0 538 840 ; +C -1 ; WX 600 ; N omacron ; B 42 -16 558 626 ; +C -1 ; WX 600 ; N Atilde ; B -21 0 621 799 ; +C -1 ; WX 600 ; N icircumflex ; B 62 0 538 696 ; C -1 ; WX 600 ; N igrave ; B 62 0 538 696 ; +C -1 ; WX 600 ; N ncommaaccent ; B 23 -278 571 450 ; +C -1 ; WX 600 ; N lcommaaccent ; B 62 -278 538 624 ; C -1 ; WX 600 ; N plusminus ; B 42 0 558 624 ; C -1 ; WX 600 ; N onehalf ; B -34 0 629 638 ; C -1 ; WX 600 ; N onequarter ; B -34 0 629 638 ; C -1 ; WX 600 ; N threequarters ; B -43 0 630 637 ; -C -1 ; WX 600 ; N icircumflex ; B 62 0 538 696 ; -C -1 ; WX 600 ; N Edieresis ; B 13 0 550 798 ; -C -1 ; WX 600 ; N ntilde ; B 23 0 571 656 ; -C -1 ; WX 600 ; N Aring ; B -21 0 621 871 ; -C -1 ; WX 600 ; N odieresis ; B 42 -16 558 654 ; -C -1 ; WX 600 ; N oacute ; B 42 -16 558 696 ; -C -1 ; WX 600 ; N ograve ; B 42 -16 558 696 ; -C -1 ; WX 600 ; N ocircumflex ; B 42 -16 558 696 ; -C -1 ; WX 600 ; N otilde ; B 42 -16 558 656 ; -C -1 ; WX 600 ; N scaron ; B 73 -16 527 696 ; -C -1 ; WX 600 ; N udieresis ; B 13 -13 571 654 ; -C -1 ; WX 600 ; N uacute ; B 13 -13 571 696 ; -C -1 ; WX 600 ; N ugrave ; B 13 -13 571 696 ; -C -1 ; WX 600 ; N ucircumflex ; B 13 -13 571 696 ; -C -1 ; WX 600 ; N yacute ; B 21 -205 579 696 ; -C -1 ; WX 600 ; N zcaron ; B 85 0 519 696 ; +C -1 ; WX 600 ; N iacute ; B 62 0 538 696 ; +C -1 ; WX 600 ; N Abreve ; B -21 0 621 831 ; +C -1 ; WX 600 ; N kcommaaccent ; B 33 -278 571 624 ; +C -1 ; WX 600 ; N Omacron ; B 21 -14 579 769 ; +C -1 ; WX 600 ; N imacron ; B 62 0 538 626 ; +C -1 ; WX 600 ; N emacron ; B 33 -16 550 626 ; +C -1 ; WX 600 ; N amacron ; B 42 -16 571 626 ; +C -1 ; WX 600 ; N tcommaaccent ; B 13 -278 529 591 ; C -1 ; WX 600 ; N ydieresis ; B 21 -205 579 654 ; +C -1 ; WX 600 ; N zdotaccent ; B 85 0 519 654 ; +C -1 ; WX 600 ; N zcaron ; B 85 0 519 696 ; +C -1 ; WX 600 ; N zacute ; B 85 0 519 696 ; +C -1 ; WX 600 ; N yacute ; B 21 -205 579 696 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 13 -13 571 694 ; +C -1 ; WX 600 ; N eth ; B 42 -16 558 646 ; +C -1 ; WX 600 ; N uring ; B 13 -13 571 727 ; +C -1 ; WX 600 ; N Ocircumflex ; B 21 -14 579 839 ; +C -1 ; WX 600 ; N commaaccent ; B 183 -278 351 -59 ; C -1 ; WX 600 ; N copyright ; B -7 -15 606 598 ; C -1 ; WX 600 ; N registered ; B -7 -15 606 598 ; -C -1 ; WX 600 ; N Atilde ; B -21 0 621 799 ; -C -1 ; WX 600 ; N nbspace ; B 375 0 375 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 33 -229 564 597 ; C -1 ; WX 600 ; N Acircumflex ; B -21 0 621 839 ; +C -1 ; WX 600 ; N idieresis ; B 62 0 538 654 ; +C -1 ; WX 600 ; N lozenge ; B 72 -19 529 593 ; +C -1 ; WX 600 ; N Delta ; B 15 0 585 583 ; +C -1 ; WX 600 ; N notequal ; B 42 22 558 525 ; +C -1 ; WX 600 ; N radical ; B 12 -60 642 697 ; C -1 ; WX 600 ; N Agrave ; B -21 0 621 839 ; -C -1 ; WX 600 ; N logicalnot ; B 42 115 465 445 ; C -1 ; WX 600 ; N Aacute ; B -21 0 621 839 ; -C -1 ; WX 600 ; N Eth ; B 0 0 550 583 ; -C -1 ; WX 600 ; N brokenbar ; B 250 -153 354 622 ; -C -1 ; WX 600 ; N Thorn ; B 14 0 523 583 ; +C -1 ; WX 600 ; N lessequal ; B 3 0 549 591 ; +C -1 ; WX 600 ; N greaterequal ; B 35 0 582 591 ; +C -1 ; WX 600 ; N logicalnot ; B 42 115 465 445 ; +C -1 ; WX 600 ; N summation ; B 45 -97 538 671 ; +C -1 ; WX 600 ; N partialdiff ; B 102 -16 524 590 ; +C -1 ; WX 600 ; N Ncommaaccent ; B -8 -278 592 583 ; +C -1 ; WX 600 ; N dcroat ; B 33 -16 613 624 ; +C -1 ; WX 600 ; N brokenbar ; B 250 -153 350 622 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 33 -278 571 583 ; C -1 ; WX 600 ; N Adieresis ; B -21 0 621 798 ; C -1 ; WX 600 ; N mu ; B 13 -153 571 437 ; C -1 ; WX 600 ; N .notdef ; B 375 0 375 0 ; EndCharMetrics +StartKernData +StartKernPairs 998 +KPX A C -14 +KPX A Ccedilla -22 +KPX A G -10 +KPX A O -15 +KPX A Odieresis -15 +KPX A Q -16 +KPX A T -27 +KPX A U -23 +KPX A Uacute -23 +KPX A Ucircumflex -23 +KPX A Udieresis -23 +KPX A Ugrave -23 +KPX A V -59 +KPX A W -13 +KPX A Y -27 +KPX A a 15 +KPX A b 45 +KPX A c -4 +KPX A ccedilla -8 +KPX A comma -47 +KPX A d 4 +KPX A e 2 +KPX A g 0 +KPX A guillemotleft -40 +KPX A guilsinglleft -40 +KPX A hyphen -19 +KPX A o -3 +KPX A period -62 +KPX A q -4 +KPX A quotedblright -84 +KPX A quoteright -113 +KPX A t -20 +KPX A u -12 +KPX A v -39 +KPX A w -13 +KPX A y -39 +KPX Aacute C -14 +KPX Aacute G -10 +KPX Aacute O -15 +KPX Aacute Q -16 +KPX Aacute T -27 +KPX Aacute U -23 +KPX Aacute V -59 +KPX Aacute W -13 +KPX Aacute Y -27 +KPX Aacute a 15 +KPX Aacute b 45 +KPX Aacute c -4 +KPX Aacute comma -47 +KPX Aacute d 4 +KPX Aacute e 2 +KPX Aacute g 0 +KPX Aacute guillemotleft -40 +KPX Aacute guilsinglleft -40 +KPX Aacute hyphen -19 +KPX Aacute o -3 +KPX Aacute period -62 +KPX Aacute q -4 +KPX Aacute quoteright -113 +KPX Aacute t -20 +KPX Aacute u -12 +KPX Aacute v -39 +KPX Aacute w -13 +KPX Aacute y -39 +KPX Acircumflex C -14 +KPX Acircumflex G -10 +KPX Acircumflex O -15 +KPX Acircumflex Q -16 +KPX Acircumflex T -27 +KPX Acircumflex U -23 +KPX Acircumflex V -59 +KPX Acircumflex W -13 +KPX Acircumflex Y -27 +KPX Acircumflex comma -47 +KPX Acircumflex period -62 +KPX Adieresis C -14 +KPX Adieresis G -10 +KPX Adieresis O -15 +KPX Adieresis Q -16 +KPX Adieresis T -27 +KPX Adieresis U -23 +KPX Adieresis V -59 +KPX Adieresis W -13 +KPX Adieresis Y -27 +KPX Adieresis a 15 +KPX Adieresis b 45 +KPX Adieresis c -4 +KPX Adieresis comma -47 +KPX Adieresis d 4 +KPX Adieresis g 0 +KPX Adieresis guillemotleft -40 +KPX Adieresis guilsinglleft -40 +KPX Adieresis hyphen -19 +KPX Adieresis o -3 +KPX Adieresis period -62 +KPX Adieresis q -4 +KPX Adieresis quotedblright -84 +KPX Adieresis quoteright -113 +KPX Adieresis t -20 +KPX Adieresis u -12 +KPX Adieresis v -39 +KPX Adieresis w -13 +KPX Adieresis y -39 +KPX Agrave C -14 +KPX Agrave G -10 +KPX Agrave O -15 +KPX Agrave Q -16 +KPX Agrave T -27 +KPX Agrave U -23 +KPX Agrave V -59 +KPX Agrave W -13 +KPX Agrave Y -27 +KPX Agrave comma -47 +KPX Agrave period -62 +KPX Aring C -14 +KPX Aring G -10 +KPX Aring O -15 +KPX Aring Q -16 +KPX Aring T -27 +KPX Aring U -23 +KPX Aring V -59 +KPX Aring W -13 +KPX Aring Y -27 +KPX Aring a 15 +KPX Aring b 45 +KPX Aring c -4 +KPX Aring comma -47 +KPX Aring d 4 +KPX Aring e 2 +KPX Aring g 0 +KPX Aring guillemotleft -40 +KPX Aring guilsinglleft -40 +KPX Aring hyphen -19 +KPX Aring o -3 +KPX Aring period -62 +KPX Aring q -4 +KPX Aring quotedblright -84 +KPX Aring quoteright -113 +KPX Aring t -20 +KPX Aring u -12 +KPX Aring v -39 +KPX Aring w -13 +KPX Aring y -39 +KPX Atilde C -14 +KPX Atilde G -10 +KPX Atilde O -15 +KPX Atilde Q -16 +KPX Atilde T -27 +KPX Atilde U -23 +KPX Atilde V -59 +KPX Atilde W -13 +KPX Atilde Y -27 +KPX Atilde comma -47 +KPX Atilde period -62 +KPX B A 4 +KPX B AE 3 +KPX B Aacute 4 +KPX B Acircumflex 4 +KPX B Adieresis 4 +KPX B Aring 4 +KPX B Atilde 4 +KPX B O -9 +KPX B OE 11 +KPX B Oacute -9 +KPX B Ocircumflex -9 +KPX B Odieresis -9 +KPX B Ograve -9 +KPX B Oslash -5 +KPX B V -18 +KPX B W -6 +KPX B Y -39 +KPX C A 8 +KPX C AE 7 +KPX C Aacute 8 +KPX C Adieresis 8 +KPX C Aring 8 +KPX C H -13 +KPX C K -8 +KPX C O -14 +KPX C Oacute -14 +KPX C Odieresis -14 +KPX Ccedilla A 3 +KPX D A -25 +KPX D Aacute -25 +KPX D Acircumflex -25 +KPX D Adieresis -25 +KPX D Agrave -25 +KPX D Aring -25 +KPX D Atilde -25 +KPX D J -32 +KPX D T -27 +KPX D V -30 +KPX D W -13 +KPX D X -37 +KPX D Y -51 +KPX F A -39 +KPX F Aacute -39 +KPX F Acircumflex -39 +KPX F Adieresis -39 +KPX F Agrave -39 +KPX F Aring -39 +KPX F Atilde -39 +KPX F J -78 +KPX F O -24 +KPX F Odieresis -24 +KPX F a -40 +KPX F aacute -40 +KPX F adieresis -40 +KPX F ae -18 +KPX F aring -40 +KPX F comma -168 +KPX F e -47 +KPX F eacute -47 +KPX F hyphen -55 +KPX F i -46 +KPX F j -54 +KPX F o -51 +KPX F oacute -51 +KPX F odieresis -51 +KPX F oe -16 +KPX F oslash -51 +KPX F period -187 +KPX F r -32 +KPX F u -1 +KPX G A 6 +KPX G AE 5 +KPX G Aacute 6 +KPX G Acircumflex 6 +KPX G Adieresis 6 +KPX G Agrave 6 +KPX G Aring 6 +KPX G Atilde 6 +KPX G T -25 +KPX G V 6 +KPX G W 6 +KPX G Y -14 +KPX J A -8 +KPX J AE -16 +KPX J Adieresis -8 +KPX J Aring -8 +KPX K C -24 +KPX K G -19 +KPX K O -25 +KPX K OE -4 +KPX K Oacute -25 +KPX K Odieresis -25 +KPX K S -9 +KPX K T -13 +KPX K a 6 +KPX K adieresis 6 +KPX K ae 31 +KPX K aring 6 +KPX K e -6 +KPX K hyphen -44 +KPX K o -12 +KPX K oacute -12 +KPX K odieresis -12 +KPX K u -22 +KPX K udieresis -22 +KPX K y -50 +KPX L A 16 +KPX L AE 16 +KPX L Aacute 16 +KPX L Adieresis 16 +KPX L Aring 16 +KPX L C -10 +KPX L Ccedilla -11 +KPX L G -10 +KPX L O -7 +KPX L Oacute -7 +KPX L Ocircumflex -7 +KPX L Odieresis -7 +KPX L Ograve -7 +KPX L Otilde -7 +KPX L S -24 +KPX L T -52 +KPX L U -29 +KPX L Udieresis -29 +KPX L V -57 +KPX L W -22 +KPX L Y -52 +KPX L hyphen 9 +KPX L quotedblright -72 +KPX L quoteright -99 +KPX L u -10 +KPX L udieresis -11 +KPX L y -33 +KPX N A -3 +KPX N AE -3 +KPX N Aacute -3 +KPX N Adieresis -3 +KPX N Aring -3 +KPX N C -7 +KPX N Ccedilla -6 +KPX N G -6 +KPX N O -5 +KPX N Oacute -5 +KPX N Odieresis -5 +KPX N a -11 +KPX N aacute -11 +KPX N adieresis -11 +KPX N ae 18 +KPX N aring -11 +KPX N comma -75 +KPX N e -3 +KPX N eacute -3 +KPX N o -8 +KPX N oacute -8 +KPX N odieresis -8 +KPX N oslash -3 +KPX N period -93 +KPX N u -8 +KPX N udieresis -8 +KPX O A -14 +KPX O AE -14 +KPX O Aacute -14 +KPX O Adieresis -14 +KPX O Aring -14 +KPX O T -15 +KPX O V -23 +KPX O W -2 +KPX O X -26 +KPX O Y -43 +KPX Oacute A -14 +KPX Oacute T -15 +KPX Oacute V -23 +KPX Oacute W -2 +KPX Oacute Y -43 +KPX Ocircumflex T -15 +KPX Ocircumflex V -23 +KPX Ocircumflex Y -43 +KPX Odieresis A -14 +KPX Odieresis T -15 +KPX Odieresis V -23 +KPX Odieresis W -2 +KPX Odieresis X -26 +KPX Odieresis Y -43 +KPX Ograve T -15 +KPX Ograve V -23 +KPX Ograve Y -43 +KPX Oslash A -10 +KPX Otilde T -15 +KPX Otilde V -23 +KPX Otilde Y -43 +KPX P A -61 +KPX P AE -59 +KPX P Aacute -61 +KPX P Adieresis -61 +KPX P Aring -61 +KPX P J -73 +KPX P a -49 +KPX P aacute -49 +KPX P adieresis -49 +KPX P ae -27 +KPX P aring -49 +KPX P comma -160 +KPX P e -38 +KPX P eacute -38 +KPX P hyphen -33 +KPX P o -42 +KPX P oacute -42 +KPX P odieresis -42 +KPX P oe -13 +KPX P oslash -42 +KPX P period -178 +KPX R C -14 +KPX R Ccedilla -17 +KPX R G -10 +KPX R O -14 +KPX R OE 5 +KPX R Oacute -14 +KPX R Odieresis -14 +KPX R T -28 +KPX R U -16 +KPX R Udieresis -17 +KPX R V -24 +KPX R W -8 +KPX R Y -28 +KPX R a 14 +KPX R aacute 14 +KPX R adieresis 14 +KPX R ae 40 +KPX R aring 14 +KPX R e 2 +KPX R eacute 2 +KPX R hyphen -25 +KPX R o -3 +KPX R oacute -3 +KPX R odieresis -3 +KPX R oe 29 +KPX R u -7 +KPX R uacute -8 +KPX R udieresis -8 +KPX R y -18 +KPX S A -10 +KPX S AE -10 +KPX S Aacute -10 +KPX S Adieresis -10 +KPX S Aring -10 +KPX S T -41 +KPX S V -10 +KPX S W -12 +KPX S Y -31 +KPX S t -17 +KPX T A -28 +KPX T AE -28 +KPX T Aacute -28 +KPX T Acircumflex -28 +KPX T Adieresis -28 +KPX T Agrave -28 +KPX T Aring -28 +KPX T Atilde -28 +KPX T C -19 +KPX T G -19 +KPX T J -65 +KPX T O -14 +KPX T OE 6 +KPX T Oacute -14 +KPX T Ocircumflex -14 +KPX T Odieresis -14 +KPX T Ograve -14 +KPX T Oslash -14 +KPX T Otilde -14 +KPX T S -41 +KPX T V 10 +KPX T W 4 +KPX T Y -10 +KPX T a -34 +KPX T ae -12 +KPX T c -37 +KPX T colon -112 +KPX T comma -130 +KPX T e -26 +KPX T g -24 +KPX T guillemotleft -73 +KPX T guilsinglleft -73 +KPX T hyphen -91 +KPX T i -42 +KPX T j -49 +KPX T o -31 +KPX T oslash -31 +KPX T period -148 +KPX T r -28 +KPX T s -39 +KPX T semicolon -100 +KPX T u 4 +KPX T v 10 +KPX T w 10 +KPX T y 0 +KPX U A -19 +KPX U AE -18 +KPX U Aacute -19 +KPX U Acircumflex -19 +KPX U Adieresis -19 +KPX U Aring -19 +KPX U Atilde -19 +KPX U comma -95 +KPX U m 16 +KPX U n -8 +KPX U p 0 +KPX U period -114 +KPX U r -34 +KPX Uacute A -19 +KPX Uacute comma -95 +KPX Uacute m 16 +KPX Uacute n -8 +KPX Uacute p 0 +KPX Uacute period -114 +KPX Uacute r -34 +KPX Ucircumflex A -19 +KPX Udieresis A -19 +KPX Udieresis b 27 +KPX Udieresis comma -95 +KPX Udieresis m 16 +KPX Udieresis n -8 +KPX Udieresis p 0 +KPX Udieresis period -114 +KPX Udieresis r -34 +KPX Ugrave A -19 +KPX V A -4 +KPX V AE -12 +KPX V Aacute -4 +KPX V Acircumflex -4 +KPX V Adieresis -4 +KPX V Agrave -4 +KPX V Aring -4 +KPX V Atilde -4 +KPX V C -24 +KPX V G -24 +KPX V O -23 +KPX V Oacute -23 +KPX V Ocircumflex -23 +KPX V Odieresis -23 +KPX V Ograve -23 +KPX V Oslash -23 +KPX V Otilde -23 +KPX V S -27 +KPX V T 10 +KPX V a -54 +KPX V ae -27 +KPX V colon -132 +KPX V comma -146 +KPX V e -47 +KPX V g -46 +KPX V guillemotleft -75 +KPX V guilsinglleft -75 +KPX V hyphen -39 +KPX V i -59 +KPX V o -52 +KPX V oslash -48 +KPX V period -164 +KPX V r -45 +KPX V semicolon -120 +KPX V u -15 +KPX V y -17 +KPX W A -9 +KPX W AE -9 +KPX W Aacute -9 +KPX W Acircumflex -9 +KPX W Adieresis -9 +KPX W Agrave -9 +KPX W Aring -9 +KPX W Atilde -9 +KPX W C -4 +KPX W G -3 +KPX W O -2 +KPX W Oacute -2 +KPX W Ocircumflex -2 +KPX W Odieresis -2 +KPX W Ograve -2 +KPX W Oslash 2 +KPX W Otilde -2 +KPX W S -17 +KPX W T 4 +KPX W a -11 +KPX W ae 17 +KPX W colon -99 +KPX W comma -83 +KPX W e -3 +KPX W g -3 +KPX W guillemotleft -31 +KPX W guilsinglleft -31 +KPX W hyphen 1 +KPX W i -38 +KPX W o -8 +KPX W oslash -4 +KPX W period -101 +KPX W r -25 +KPX W semicolon -82 +KPX W u 1 +KPX W y -2 +KPX X C -28 +KPX X O -26 +KPX X Odieresis -26 +KPX X Q -26 +KPX X a 0 +KPX X e -12 +KPX X hyphen -50 +KPX X o -18 +KPX X u -28 +KPX X y -43 +KPX Y A -25 +KPX Y AE -28 +KPX Y Aacute -25 +KPX Y Acircumflex -25 +KPX Y Adieresis -25 +KPX Y Agrave -25 +KPX Y Aring -25 +KPX Y Atilde -25 +KPX Y C -45 +KPX Y G -45 +KPX Y O -44 +KPX Y Oacute -44 +KPX Y Ocircumflex -44 +KPX Y Odieresis -44 +KPX Y Ograve -44 +KPX Y Oslash -43 +KPX Y Otilde -44 +KPX Y S -48 +KPX Y T -10 +KPX Y a -53 +KPX Y ae -28 +KPX Y colon -150 +KPX Y comma -118 +KPX Y e -59 +KPX Y g -59 +KPX Y guillemotleft -94 +KPX Y guilsinglleft -94 +KPX Y hyphen -81 +KPX Y i -58 +KPX Y o -64 +KPX Y oslash -51 +KPX Y p -30 +KPX Y period -136 +KPX Y semicolon -133 +KPX Y u -43 +KPX Y v -33 +KPX Z v -41 +KPX Z y -52 +KPX a j -81 +KPX a quoteright -78 +KPX a v -21 +KPX a w -12 +KPX a y -31 +KPX aacute v -21 +KPX aacute w -12 +KPX aacute y -31 +KPX adieresis v -21 +KPX adieresis w -12 +KPX adieresis y -31 +KPX ae v 28 +KPX ae w 32 +KPX ae y 18 +KPX agrave v -21 +KPX agrave w -12 +KPX agrave y -31 +KPX aring v -21 +KPX aring w -12 +KPX aring y -31 +KPX b v 0 +KPX b w 4 +KPX b y -10 +KPX c h 11 +KPX c k 6 +KPX comma one -128 +KPX comma quotedblright -137 +KPX comma quoteright -166 +KPX e quoteright -65 +KPX e t -16 +KPX e v -9 +KPX e w -3 +KPX e x 6 +KPX e y -20 +KPX eacute v -9 +KPX eacute w -3 +KPX eacute y -20 +KPX ecircumflex v -9 +KPX ecircumflex w -3 +KPX ecircumflex y -20 +KPX eight four -58 +KPX eight one -72 +KPX eight seven -65 +KPX f a -32 +KPX f aacute -32 +KPX f adieresis -32 +KPX f ae -7 +KPX f aring -32 +KPX f e -43 +KPX f eacute -43 +KPX f f -43 +KPX f i -37 +KPX f j -60 +KPX f l -25 +KPX f o -47 +KPX f oacute -47 +KPX f odieresis -42 +KPX f oe -15 +KPX f oslash -29 +KPX f quoteright -73 +KPX f s -42 +KPX f t -6 +KPX five four -52 +KPX five one -73 +KPX five seven -73 +KPX four four -62 +KPX four one -66 +KPX four seven -93 +KPX g a -4 +KPX g adieresis -4 +KPX g ae 23 +KPX g aring -4 +KPX g e 1 +KPX g eacute 1 +KPX g l -34 +KPX g oacute -3 +KPX g odieresis -3 +KPX g r 0 +KPX guillemotright A -37 +KPX guillemotright AE -34 +KPX guillemotright Aacute -37 +KPX guillemotright Adieresis -37 +KPX guillemotright Aring -37 +KPX guillemotright T -71 +KPX guillemotright V -72 +KPX guillemotright W -29 +KPX guillemotright Y -92 +KPX guilsinglright A -37 +KPX guilsinglright AE -34 +KPX guilsinglright Aacute -37 +KPX guilsinglright Adieresis -37 +KPX guilsinglright Aring -37 +KPX guilsinglright T -71 +KPX guilsinglright V -72 +KPX guilsinglright W -29 +KPX guilsinglright Y -92 +KPX h quoteright -69 +KPX h y -23 +KPX hyphen A -18 +KPX hyphen AE -14 +KPX hyphen Aacute -18 +KPX hyphen Adieresis -18 +KPX hyphen Aring -18 +KPX hyphen T -90 +KPX hyphen V -38 +KPX hyphen W 1 +KPX hyphen Y -81 +KPX i T -58 +KPX i j -143 +KPX k a 1 +KPX k aacute 1 +KPX k adieresis 1 +KPX k ae 26 +KPX k aring 1 +KPX k comma -63 +KPX k e -11 +KPX k eacute -11 +KPX k g -14 +KPX k hyphen -50 +KPX k o -17 +KPX k oacute -17 +KPX k odieresis -17 +KPX k period -75 +KPX k s -9 +KPX k u -3 +KPX k udieresis -3 +KPX l v -77 +KPX l y -77 +KPX m p 32 +KPX m v 18 +KPX m w 22 +KPX m y 8 +KPX n T -40 +KPX n p 4 +KPX n quoteright -68 +KPX n v -12 +KPX n w -5 +KPX n y -22 +KPX nine four -53 +KPX nine one -66 +KPX nine seven -57 +KPX o T -31 +KPX o quoteright -62 +KPX o t -13 +KPX o v -6 +KPX o w -3 +KPX o x -10 +KPX o y -17 +KPX oacute v -6 +KPX oacute w -3 +KPX oacute y -17 +KPX ocircumflex t -13 +KPX odieresis t -13 +KPX odieresis v -6 +KPX odieresis w -3 +KPX odieresis x -10 +KPX odieresis y -17 +KPX ograve v -6 +KPX ograve w -3 +KPX ograve y -17 +KPX one comma -99 +KPX one eight -74 +KPX one five -55 +KPX one four -87 +KPX one nine -73 +KPX one one -62 +KPX one period -114 +KPX one seven -141 +KPX one six -98 +KPX one three -53 +KPX one two -47 +KPX one zero -86 +KPX p t -3 +KPX p y -6 +KPX period one -113 +KPX period quotedblright -131 +KPX period quoteright -161 +KPX q c 2 +KPX q u 41 +KPX quotedblbase A -6 +KPX quotedblbase AE -7 +KPX quotedblbase T -90 +KPX quotedblbase V -104 +KPX quotedblbase W -43 +KPX quotedblbase Y -78 +KPX quotedblleft A -62 +KPX quotedblleft AE -60 +KPX quotedblleft Aacute -62 +KPX quotedblleft Adieresis -62 +KPX quotedblleft Aring -62 +KPX quotedblleft T -24 +KPX quotedblleft V -22 +KPX quotedblleft W -13 +KPX quotedblleft Y -49 +KPX quotedblright A -76 +KPX quotedblright AE -75 +KPX quotedblright Aacute -76 +KPX quotedblright Adieresis -76 +KPX quotedblright Aring -76 +KPX quotedblright T -39 +KPX quotedblright V -30 +KPX quotedblright W -26 +KPX quotedblright Y -51 +KPX quoteleft A -87 +KPX quoteleft AE -85 +KPX quoteleft Aacute -87 +KPX quoteleft Adieresis -87 +KPX quoteleft Aring -87 +KPX quoteleft T -49 +KPX quoteleft V -46 +KPX quoteleft W -38 +KPX quoteleft Y -73 +KPX quoteright A -154 +KPX quoteright AE -153 +KPX quoteright Aacute -154 +KPX quoteright Adieresis -154 +KPX quoteright Aring -154 +KPX quoteright comma -227 +KPX quoteright d -140 +KPX quoteright o -143 +KPX quoteright period -244 +KPX quoteright r -149 +KPX quoteright s -150 +KPX quoteright t -117 +KPX quoteright v -110 +KPX quoteright w -105 +KPX quoteright y -116 +KPX r a -17 +KPX r aacute -17 +KPX r acircumflex -17 +KPX r adieresis -17 +KPX r ae 4 +KPX r agrave -17 +KPX r aring -17 +KPX r c -18 +KPX r ccedilla -15 +KPX r colon -95 +KPX r comma -108 +KPX r d -8 +KPX r e -7 +KPX r eacute -7 +KPX r ecircumflex -7 +KPX r egrave -7 +KPX r f -16 +KPX r g -5 +KPX r h -20 +KPX r hyphen -41 +KPX r i -25 +KPX r j -33 +KPX r k -30 +KPX r l -47 +KPX r m 36 +KPX r n 10 +KPX r o -12 +KPX r oacute -12 +KPX r ocircumflex -12 +KPX r odieresis -12 +KPX r oe 18 +KPX r ograve -12 +KPX r oslash -12 +KPX r p 30 +KPX r period -122 +KPX r q -4 +KPX r quoteright -41 +KPX r r -11 +KPX r s -21 +KPX r semicolon -83 +KPX r t 20 +KPX r u 20 +KPX r v 26 +KPX r w 26 +KPX r x 7 +KPX r y 16 +KPX r z -21 +KPX s quoteright -60 +KPX s t -11 +KPX seven colon -156 +KPX seven comma -157 +KPX seven eight -74 +KPX seven five -82 +KPX seven four -101 +KPX seven one -67 +KPX seven period -176 +KPX seven seven -62 +KPX seven six -93 +KPX seven three -72 +KPX seven two -64 +KPX six four -49 +KPX six one -54 +KPX six seven -46 +KPX t S -35 +KPX t a -16 +KPX t aacute -16 +KPX t adieresis -16 +KPX t ae 9 +KPX t aring -16 +KPX t colon -117 +KPX t e -24 +KPX t eacute -24 +KPX t h -5 +KPX t o -30 +KPX t oacute -30 +KPX t odieresis -30 +KPX t quoteright -102 +KPX t semicolon -103 +KPX three four -52 +KPX three one -71 +KPX three seven -64 +KPX two four -67 +KPX two one -66 +KPX two seven -68 +KPX u quoteright -56 +KPX v a -3 +KPX v aacute -3 +KPX v acircumflex -3 +KPX v adieresis -3 +KPX v ae 18 +KPX v agrave -3 +KPX v aring -3 +KPX v atilde -3 +KPX v c -11 +KPX v colon -81 +KPX v comma -136 +KPX v e 0 +KPX v eacute 0 +KPX v ecircumflex 0 +KPX v egrave 0 +KPX v g 1 +KPX v hyphen -23 +KPX v l -77 +KPX v o -5 +KPX v oacute -5 +KPX v odieresis -5 +KPX v ograve -5 +KPX v oslash -5 +KPX v period -156 +KPX v s -11 +KPX v semicolon -69 +KPX w a -3 +KPX w aacute -3 +KPX w acircumflex -3 +KPX w adieresis -3 +KPX w ae 23 +KPX w agrave -3 +KPX w aring -3 +KPX w atilde -3 +KPX w c -6 +KPX w colon -81 +KPX w comma -90 +KPX w e 2 +KPX w eacute 2 +KPX w ecircumflex 2 +KPX w egrave 2 +KPX w g 3 +KPX w hyphen 3 +KPX w l -48 +KPX w o -2 +KPX w oacute -2 +KPX w odieresis -2 +KPX w ograve -2 +KPX w oslash 2 +KPX w period -109 +KPX w s -11 +KPX w semicolon -69 +KPX x a 5 +KPX x c -14 +KPX x e -5 +KPX x eacute -5 +KPX x o -10 +KPX x q -8 +KPX y a -13 +KPX y aacute -13 +KPX y acircumflex -13 +KPX y adieresis -13 +KPX y ae 8 +KPX y agrave -13 +KPX y aring -13 +KPX y atilde -13 +KPX y c -21 +KPX y colon -91 +KPX y comma -134 +KPX y e -11 +KPX y eacute -11 +KPX y ecircumflex -11 +KPX y egrave -11 +KPX y g -9 +KPX y hyphen -19 +KPX y l -78 +KPX y o -15 +KPX y oacute -15 +KPX y odieresis -15 +KPX y ograve -15 +KPX y oslash -15 +KPX y period -155 +KPX y s -21 +KPX y semicolon -79 +KPX zero four -59 +KPX zero one -76 +KPX zero seven -68 +EndKernPairs +EndKernData EndFontMetrics diff --git a/misc/gs_afm/CourBoO.afm b/misc/gs_afm/CourBoO.afm index 6b37f99b2a..8e614b89be 100644 --- a/misc/gs_afm/CourBoO.afm +++ b/misc/gs_afm/CourBoO.afm @@ -1,7 +1,7 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. FontName NimbusMonL-BoldObli FullName Nimbus Mono L Bold Oblique FamilyName Nimbus Mono L @@ -10,15 +10,15 @@ ItalicAngle -12.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -61 -229 735 871 +FontBBox -61 -278 840 871 CapHeight 583 XHeight 437 Descender -205 Ascender 624 -StartCharMetrics 232 +StartCharMetrics 316 C 32 ; WX 600 ; N space ; B 386 0 386 0 ; C 33 ; WX 600 ; N exclam ; B 234 -15 501 638 ; C 34 ; WX 600 ; N quotedbl ; B 243 312 592 602 ; @@ -51,7 +51,7 @@ C 60 ; WX 600 ; N less ; B 102 54 642 501 ; C 61 ; WX 600 ; N equal ; B 81 138 638 422 ; C 62 ; WX 600 ; N greater ; B 76 53 616 500 ; C 63 ; WX 600 ; N question ; B 197 -15 608 598 ; -C 64 ; WX 600 ; N at ; B 98 -151 582 620 ; +C 64 ; WX 600 ; N at ; B 98 -152 582 620 ; C 65 ; WX 600 ; N A ; B -11 0 633 583 ; C 66 ; WX 600 ; N B ; B 22 0 620 583 ; C 67 ; WX 600 ; N C ; B 80 -14 663 597 ; @@ -148,8 +148,8 @@ C 195 ; WX 600 ; N circumflex ; B 237 497 590 696 ; C 196 ; WX 600 ; N tilde ; B 233 523 619 656 ; C 197 ; WX 600 ; N macron ; B 249 546 600 626 ; C 198 ; WX 600 ; N breve ; B 261 503 614 687 ; -C 199 ; WX 600 ; N dotaccent ; B 365 534 487 656 ; -C 200 ; WX 600 ; N dieresis ; B 261 534 590 655 ; +C 199 ; WX 600 ; N dotaccent ; B 365 534 488 654 ; +C 200 ; WX 600 ; N dieresis ; B 261 534 592 654 ; C 202 ; WX 600 ; N ring ; B 303 486 554 727 ; C 203 ; WX 600 ; N cedilla ; B 143 -229 381 0 ; C 205 ; WX 600 ; N hungarumlaut ; B 237 496 616 694 ; @@ -168,88 +168,1174 @@ C 248 ; WX 600 ; N lslash ; B 72 0 557 624 ; C 249 ; WX 600 ; N oslash ; B 17 -70 669 494 ; C 250 ; WX 600 ; N oe ; B 28 -16 666 450 ; C 251 ; WX 600 ; N germandbls ; B 22 -16 569 623 ; -C -1 ; WX 600 ; N Yacute ; B 128 0 694 839 ; -C -1 ; WX 600 ; N Ucircumflex ; B 110 -14 705 839 ; -C -1 ; WX 600 ; N Ugrave ; B 110 -14 705 839 ; -C -1 ; WX 600 ; N Zcaron ; B 73 0 644 839 ; -C -1 ; WX 600 ; N Ydieresis ; B 128 0 694 800 ; -C -1 ; WX 600 ; N threesuperior ; B 218 238 543 637 ; -C -1 ; WX 600 ; N Uacute ; B 110 -14 705 839 ; -C -1 ; WX 600 ; N twosuperior ; B 202 247 538 637 ; C -1 ; WX 600 ; N Udieresis ; B 110 -14 705 800 ; -C -1 ; WX 600 ; N middot ; B 283 214 436 346 ; -C -1 ; WX 600 ; N onesuperior ; B 224 247 494 638 ; -C -1 ; WX 600 ; N aacute ; B 66 -16 584 696 ; -C -1 ; WX 600 ; N agrave ; B 65 -16 583 696 ; -C -1 ; WX 600 ; N acircumflex ; B 65 -16 583 696 ; +C -1 ; WX 600 ; N Uacute ; B 110 -14 705 839 ; +C -1 ; WX 600 ; N Scedilla ; B 72 -229 634 597 ; +C -1 ; WX 600 ; N Tcaron ; B 121 0 682 839 ; C -1 ; WX 600 ; N Scaron ; B 72 -14 657 839 ; +C -1 ; WX 600 ; N Rcaron ; B 23 0 631 839 ; +C -1 ; WX 600 ; N Racute ; B 23 0 631 839 ; +C -1 ; WX 600 ; N Sacute ; B 72 -14 634 839 ; C -1 ; WX 600 ; N Otilde ; B 75 -14 656 799 ; -C -1 ; WX 600 ; N sfthyphen ; B 101 229 619 329 ; -C -1 ; WX 600 ; N atilde ; B 65 -16 612 656 ; +C -1 ; WX 600 ; N ucircumflex ; B 94 -13 603 696 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 75 -14 680 837 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 110 -14 705 837 ; +C -1 ; WX 600 ; N Yacute ; B 128 0 694 839 ; +C -1 ; WX 600 ; N Eth ; B 23 0 622 583 ; +C -1 ; WX 600 ; N Dcroat ; B 23 0 622 583 ; +C -1 ; WX 600 ; N Zacute ; B 73 0 628 839 ; +C -1 ; WX 600 ; N Uring ; B 110 -14 705 871 ; +C -1 ; WX 600 ; N gbreve ; B 73 -205 675 687 ; +C -1 ; WX 600 ; N eogonek ; B 74 -208 600 450 ; +C -1 ; WX 600 ; N edotaccent ; B 74 -16 600 654 ; +C -1 ; WX 600 ; N ecaron ; B 74 -16 617 696 ; +C -1 ; WX 600 ; N Ugrave ; B 110 -14 705 839 ; +C -1 ; WX 600 ; N Thorn ; B 23 0 588 583 ; +C -1 ; WX 600 ; N eacute ; B 74 -16 600 696 ; +C -1 ; WX 600 ; N edieresis ; B 74 -16 600 654 ; +C -1 ; WX 740 ; N dcaron ; B 74 -14 840 639 ; +C -1 ; WX 600 ; N ccedilla ; B 92 -229 626 450 ; +C -1 ; WX 600 ; N ccaron ; B 93 -16 627 696 ; +C -1 ; WX 600 ; N cacute ; B 93 -16 626 696 ; +C -1 ; WX 600 ; N aogonek ; B 65 -208 583 450 ; C -1 ; WX 600 ; N aring ; B 65 -16 583 727 ; -C -1 ; WX 600 ; N adieresis ; B 65 -16 583 655 ; +C -1 ; WX 600 ; N atilde ; B 65 -16 612 656 ; +C -1 ; WX 600 ; N abreve ; B 65 -16 614 687 ; +C -1 ; WX 600 ; N egrave ; B 74 -16 600 696 ; +C -1 ; WX 600 ; N agrave ; B 65 -16 583 696 ; +C -1 ; WX 600 ; N aacute ; B 66 -16 584 696 ; +C -1 ; WX 600 ; N adieresis ; B 65 -16 583 654 ; +C -1 ; WX 600 ; N Uogonek ; B 110 -208 705 583 ; +C -1 ; WX 600 ; N ugrave ; B 94 -13 603 696 ; +C -1 ; WX 600 ; N uacute ; B 94 -13 603 696 ; +C -1 ; WX 600 ; N udieresis ; B 94 -13 603 654 ; +C -1 ; WX 600 ; N tcaron ; B 94 -16 700 639 ; +C -1 ; WX 600 ; N scommaaccent ; B 83 -278 592 450 ; +C -1 ; WX 600 ; N Zcaron ; B 73 0 644 839 ; +C -1 ; WX 600 ; N ecircumflex ; B 74 -16 600 696 ; +C -1 ; WX 600 ; N Ucircumflex ; B 110 -14 705 839 ; +C -1 ; WX 600 ; N acircumflex ; B 65 -16 583 696 ; +C -1 ; WX 600 ; N Zdotaccent ; B 73 0 628 793 ; +C -1 ; WX 600 ; N scaron ; B 83 -16 627 696 ; +C -1 ; WX 600 ; N Amacron ; B -11 0 633 776 ; +C -1 ; WX 600 ; N sacute ; B 83 -16 616 696 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 121 -278 682 583 ; +C -1 ; WX 600 ; N Ydieresis ; B 128 0 694 800 ; +C -1 ; WX 600 ; N thorn ; B -42 -205 623 624 ; +C -1 ; WX 600 ; N Emacron ; B 23 0 652 776 ; C -1 ; WX 600 ; N Ograve ; B 75 -14 649 839 ; -C -1 ; WX 600 ; N Ocircumflex ; B 75 -14 649 839 ; +C -1 ; WX 600 ; N Oacute ; B 75 -14 649 839 ; C -1 ; WX 600 ; N Odieresis ; B 75 -14 649 800 ; C -1 ; WX 600 ; N Ntilde ; B 21 0 706 799 ; -C -1 ; WX 600 ; N edieresis ; B 74 -16 600 655 ; -C -1 ; WX 600 ; N eacute ; B 74 -16 600 696 ; -C -1 ; WX 600 ; N egrave ; B 74 -16 600 696 ; +C -1 ; WX 600 ; N Ncaron ; B 21 0 706 839 ; +C -1 ; WX 600 ; N Nacute ; B 21 0 706 839 ; +C -1 ; WX 600 ; N Lcaron ; B 42 0 680 598 ; +C -1 ; WX 600 ; N Lacute ; B 42 0 616 839 ; +C -1 ; WX 600 ; N Idotaccent ; B 93 0 632 793 ; +C -1 ; WX 600 ; N racute ; B 64 0 650 696 ; C -1 ; WX 600 ; N Icircumflex ; B 93 0 632 839 ; -C -1 ; WX 600 ; N ecircumflex ; B 74 -16 600 696 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 84 -16 616 694 ; +C -1 ; WX 600 ; N otilde ; B 84 -16 626 656 ; +C -1 ; WX 600 ; N Euro ; B 54 -14 639 597 ; +C -1 ; WX 600 ; N ocircumflex ; B 84 -16 609 696 ; +C -1 ; WX 600 ; N onesuperior ; B 224 247 494 638 ; +C -1 ; WX 600 ; N twosuperior ; B 202 247 538 637 ; +C -1 ; WX 600 ; N threesuperior ; B 218 238 543 637 ; C -1 ; WX 600 ; N Igrave ; B 93 0 632 839 ; C -1 ; WX 600 ; N Iacute ; B 93 0 632 839 ; +C -1 ; WX 600 ; N Imacron ; B 93 0 632 776 ; +C -1 ; WX 600 ; N Iogonek ; B 93 -208 632 583 ; C -1 ; WX 600 ; N Idieresis ; B 93 0 632 800 ; -C -1 ; WX 600 ; N degree ; B 210 243 568 596 ; +C -1 ; WX 600 ; N Gbreve ; B 79 -14 667 831 ; +C -1 ; WX 600 ; N Umacron ; B 110 -14 705 776 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 22 -278 687 583 ; +C -1 ; WX 600 ; N ograve ; B 84 -16 609 696 ; +C -1 ; WX 600 ; N Scommaaccent ; B 72 -278 634 597 ; +C -1 ; WX 600 ; N Eogonek ; B 23 -208 652 583 ; +C -1 ; WX 600 ; N oacute ; B 84 -16 609 696 ; +C -1 ; WX 600 ; N Edotaccent ; B 23 0 652 793 ; +C -1 ; WX 600 ; N iogonek ; B 72 -208 550 623 ; +C -1 ; WX 600 ; N gcommaaccent ; B 73 -205 675 722 ; +C -1 ; WX 600 ; N odieresis ; B 84 -16 609 654 ; +C -1 ; WX 600 ; N ntilde ; B 33 0 613 656 ; +C -1 ; WX 600 ; N ncaron ; B 33 0 617 696 ; +C -1 ; WX 600 ; N Ecaron ; B 23 0 652 839 ; C -1 ; WX 600 ; N Ecircumflex ; B 23 0 652 839 ; +C -1 ; WX 600 ; N scedilla ; B 83 -229 592 450 ; +C -1 ; WX 600 ; N rcaron ; B 64 0 650 696 ; +C -1 ; WX 600 ; N Egrave ; B 23 0 652 839 ; +C -1 ; WX 600 ; N Eacute ; B 23 0 652 839 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 79 -278 667 597 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 23 -278 631 583 ; +C -1 ; WX 600 ; N Edieresis ; B 23 0 652 800 ; +C -1 ; WX 600 ; N nacute ; B 33 0 616 696 ; +C -1 ; WX 600 ; N uogonek ; B 94 -208 603 437 ; +C -1 ; WX 600 ; N umacron ; B 94 -13 603 626 ; +C -1 ; WX 600 ; N Dcaron ; B 23 0 622 839 ; +C -1 ; WX 600 ; N lcaron ; B 72 0 700 639 ; +C -1 ; WX 600 ; N Ccaron ; B 80 -14 663 839 ; +C -1 ; WX 600 ; N Cacute ; B 80 -14 663 839 ; +C -1 ; WX 600 ; N Ccedilla ; B 80 -229 663 597 ; +C -1 ; WX 600 ; N degree ; B 210 243 568 596 ; +C -1 ; WX 600 ; N Aogonek ; B -11 -208 633 583 ; C -1 ; WX 600 ; N minus ; B 101 230 619 330 ; C -1 ; WX 600 ; N multiply ; B 126 80 592 480 ; -C -1 ; WX 600 ; N divide ; B 101 28 619 533 ; -C -1 ; WX 600 ; N Egrave ; B 23 0 652 839 ; +C -1 ; WX 600 ; N divide ; B 101 28 619 532 ; +C -1 ; WX 600 ; N Aring ; B -11 0 633 871 ; C -1 ; WX 600 ; N trademark ; B 60 220 732 583 ; -C -1 ; WX 600 ; N Oacute ; B 75 -14 649 839 ; -C -1 ; WX 600 ; N thorn ; B -42 -205 623 624 ; -C -1 ; WX 600 ; N eth ; B 83 -16 617 646 ; -C -1 ; WX 600 ; N Eacute ; B 23 0 652 839 ; -C -1 ; WX 600 ; N ccedilla ; B 92 -229 626 450 ; -C -1 ; WX 600 ; N idieresis ; B 72 0 575 656 ; -C -1 ; WX 600 ; N iacute ; B 71 0 574 696 ; +C -1 ; WX 600 ; N rcommaaccent ; B 64 -278 650 449 ; +C -1 ; WX 600 ; N lacute ; B 72 0 600 839 ; +C -1 ; WX 600 ; N omacron ; B 84 -16 609 626 ; +C -1 ; WX 600 ; N Atilde ; B -11 0 633 799 ; +C -1 ; WX 600 ; N icircumflex ; B 72 0 573 696 ; C -1 ; WX 600 ; N igrave ; B 72 0 550 696 ; +C -1 ; WX 600 ; N ncommaaccent ; B 33 -278 583 450 ; +C -1 ; WX 600 ; N lcommaaccent ; B 72 -278 550 624 ; C -1 ; WX 600 ; N plusminus ; B 52 0 640 624 ; C -1 ; WX 600 ; N onehalf ; B 25 0 685 638 ; C -1 ; WX 600 ; N onequarter ; B 25 0 673 638 ; C -1 ; WX 600 ; N threequarters ; B 18 0 673 637 ; -C -1 ; WX 600 ; N icircumflex ; B 72 0 573 696 ; -C -1 ; WX 600 ; N Edieresis ; B 23 0 652 800 ; -C -1 ; WX 600 ; N ntilde ; B 33 0 613 656 ; -C -1 ; WX 600 ; N Aring ; B -11 0 633 871 ; -C -1 ; WX 600 ; N odieresis ; B 84 -16 609 655 ; -C -1 ; WX 600 ; N oacute ; B 84 -16 609 696 ; -C -1 ; WX 600 ; N ograve ; B 84 -16 609 696 ; -C -1 ; WX 600 ; N ocircumflex ; B 84 -16 609 696 ; -C -1 ; WX 600 ; N otilde ; B 84 -16 626 656 ; -C -1 ; WX 600 ; N scaron ; B 83 -16 627 696 ; -C -1 ; WX 600 ; N udieresis ; B 94 -13 603 655 ; -C -1 ; WX 600 ; N uacute ; B 94 -13 603 696 ; -C -1 ; WX 600 ; N ugrave ; B 94 -13 603 696 ; -C -1 ; WX 600 ; N ucircumflex ; B 94 -13 603 696 ; -C -1 ; WX 600 ; N yacute ; B -13 -205 662 696 ; +C -1 ; WX 600 ; N iacute ; B 71 0 574 696 ; +C -1 ; WX 600 ; N Abreve ; B -11 0 633 831 ; +C -1 ; WX 600 ; N kcommaaccent ; B 42 -278 606 624 ; +C -1 ; WX 600 ; N Omacron ; B 75 -14 649 776 ; +C -1 ; WX 600 ; N imacron ; B 72 0 600 626 ; +C -1 ; WX 600 ; N emacron ; B 74 -16 600 626 ; +C -1 ; WX 600 ; N amacron ; B 65 -16 600 626 ; +C -1 ; WX 600 ; N tcommaaccent ; B 94 -278 547 591 ; +C -1 ; WX 600 ; N ydieresis ; B -13 -205 662 654 ; +C -1 ; WX 600 ; N zdotaccent ; B 85 0 599 654 ; C -1 ; WX 600 ; N zcaron ; B 85 0 619 696 ; -C -1 ; WX 600 ; N ydieresis ; B -13 -205 662 655 ; +C -1 ; WX 600 ; N zacute ; B 85 0 616 696 ; +C -1 ; WX 600 ; N yacute ; B -13 -205 662 696 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 94 -13 616 694 ; +C -1 ; WX 600 ; N eth ; B 83 -16 617 646 ; +C -1 ; WX 600 ; N uring ; B 94 -13 603 727 ; +C -1 ; WX 600 ; N Ocircumflex ; B 75 -14 649 839 ; +C -1 ; WX 600 ; N commaaccent ; B 147 -278 342 -59 ; C -1 ; WX 600 ; N copyright ; B 48 -15 675 598 ; C -1 ; WX 600 ; N registered ; B 48 -15 675 598 ; -C -1 ; WX 600 ; N Atilde ; B -11 0 633 799 ; -C -1 ; WX 600 ; N nbspace ; B 386 0 386 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 80 -229 663 597 ; C -1 ; WX 600 ; N Acircumflex ; B -11 0 633 839 ; +C -1 ; WX 600 ; N idieresis ; B 72 0 575 656 ; +C -1 ; WX 600 ; N lozenge ; B 133 -19 590 593 ; +C -1 ; WX 600 ; N Delta ; B 15 0 585 583 ; +C -1 ; WX 600 ; N notequal ; B 81 22 638 525 ; +C -1 ; WX 600 ; N radical ; B 74 -60 782 697 ; C -1 ; WX 600 ; N Agrave ; B -11 0 633 839 ; -C -1 ; WX 600 ; N logicalnot ; B 125 115 560 445 ; C -1 ; WX 600 ; N Aacute ; B -11 0 633 839 ; -C -1 ; WX 600 ; N Eth ; B 23 0 622 583 ; +C -1 ; WX 600 ; N lessequal ; B 50 0 666 591 ; +C -1 ; WX 600 ; N greaterequal ; B 52 0 660 591 ; +C -1 ; WX 600 ; N logicalnot ; B 125 115 560 445 ; +C -1 ; WX 600 ; N summation ; B 32 -97 668 671 ; +C -1 ; WX 600 ; N partialdiff ; B 138 -16 579 590 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 21 -278 706 583 ; +C -1 ; WX 600 ; N dcroat ; B 74 -14 712 624 ; C -1 ; WX 600 ; N brokenbar ; B 227 -153 472 622 ; -C -1 ; WX 600 ; N Thorn ; B 23 0 588 583 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 42 -278 616 583 ; C -1 ; WX 600 ; N Adieresis ; B -11 0 633 800 ; C -1 ; WX 600 ; N mu ; B 72 -153 603 440 ; C -1 ; WX 600 ; N .notdef ; B 386 0 386 0 ; EndCharMetrics +StartKernData +StartKernPairs 998 +KPX A C -24 +KPX A Ccedilla -30 +KPX A G -20 +KPX A O -26 +KPX A Odieresis -26 +KPX A Q -25 +KPX A T -35 +KPX A U -33 +KPX A Uacute -33 +KPX A Ucircumflex -33 +KPX A Udieresis -33 +KPX A Ugrave -33 +KPX A V -63 +KPX A W -21 +KPX A Y -34 +KPX A a 8 +KPX A b 39 +KPX A c -12 +KPX A ccedilla -15 +KPX A comma -52 +KPX A d -4 +KPX A e -5 +KPX A g -5 +KPX A guillemotleft -44 +KPX A guilsinglleft -44 +KPX A hyphen -23 +KPX A o -11 +KPX A period -67 +KPX A q -10 +KPX A quotedblright -89 +KPX A quoteright -116 +KPX A t -25 +KPX A u -18 +KPX A v -41 +KPX A w -15 +KPX A y -41 +KPX Aacute C -24 +KPX Aacute G -20 +KPX Aacute O -26 +KPX Aacute Q -25 +KPX Aacute T -35 +KPX Aacute U -33 +KPX Aacute V -63 +KPX Aacute W -21 +KPX Aacute Y -34 +KPX Aacute a 8 +KPX Aacute b 39 +KPX Aacute c -12 +KPX Aacute comma -52 +KPX Aacute d -4 +KPX Aacute e -5 +KPX Aacute g -5 +KPX Aacute guillemotleft -44 +KPX Aacute guilsinglleft -44 +KPX Aacute hyphen -23 +KPX Aacute o -11 +KPX Aacute period -67 +KPX Aacute q -10 +KPX Aacute quoteright -116 +KPX Aacute t -25 +KPX Aacute u -18 +KPX Aacute v -41 +KPX Aacute w -15 +KPX Aacute y -41 +KPX Acircumflex C -24 +KPX Acircumflex G -20 +KPX Acircumflex O -26 +KPX Acircumflex Q -25 +KPX Acircumflex T -35 +KPX Acircumflex U -33 +KPX Acircumflex V -63 +KPX Acircumflex W -21 +KPX Acircumflex Y -34 +KPX Acircumflex comma -52 +KPX Acircumflex period -67 +KPX Adieresis C -24 +KPX Adieresis G -20 +KPX Adieresis O -26 +KPX Adieresis Q -25 +KPX Adieresis T -35 +KPX Adieresis U -33 +KPX Adieresis V -63 +KPX Adieresis W -21 +KPX Adieresis Y -34 +KPX Adieresis a 8 +KPX Adieresis b 39 +KPX Adieresis c -12 +KPX Adieresis comma -52 +KPX Adieresis d -4 +KPX Adieresis g -5 +KPX Adieresis guillemotleft -44 +KPX Adieresis guilsinglleft -44 +KPX Adieresis hyphen -23 +KPX Adieresis o -11 +KPX Adieresis period -67 +KPX Adieresis q -10 +KPX Adieresis quotedblright -89 +KPX Adieresis quoteright -116 +KPX Adieresis t -25 +KPX Adieresis u -18 +KPX Adieresis v -41 +KPX Adieresis w -15 +KPX Adieresis y -41 +KPX Agrave C -24 +KPX Agrave G -20 +KPX Agrave O -26 +KPX Agrave Q -25 +KPX Agrave T -35 +KPX Agrave U -33 +KPX Agrave V -63 +KPX Agrave W -21 +KPX Agrave Y -34 +KPX Agrave comma -52 +KPX Agrave period -67 +KPX Aring C -24 +KPX Aring G -20 +KPX Aring O -26 +KPX Aring Q -25 +KPX Aring T -35 +KPX Aring U -33 +KPX Aring V -63 +KPX Aring W -21 +KPX Aring Y -34 +KPX Aring a 8 +KPX Aring b 39 +KPX Aring c -12 +KPX Aring comma -52 +KPX Aring d -4 +KPX Aring e -5 +KPX Aring g -5 +KPX Aring guillemotleft -44 +KPX Aring guilsinglleft -44 +KPX Aring hyphen -23 +KPX Aring o -11 +KPX Aring period -67 +KPX Aring q -10 +KPX Aring quotedblright -89 +KPX Aring quoteright -116 +KPX Aring t -25 +KPX Aring u -18 +KPX Aring v -41 +KPX Aring w -15 +KPX Aring y -41 +KPX Atilde C -24 +KPX Atilde G -20 +KPX Atilde O -26 +KPX Atilde Q -25 +KPX Atilde T -35 +KPX Atilde U -33 +KPX Atilde V -63 +KPX Atilde W -21 +KPX Atilde Y -34 +KPX Atilde comma -52 +KPX Atilde period -67 +KPX B A -2 +KPX B AE -3 +KPX B Aacute -2 +KPX B Acircumflex -2 +KPX B Adieresis -2 +KPX B Aring -2 +KPX B Atilde -2 +KPX B O -14 +KPX B OE 7 +KPX B Oacute -14 +KPX B Ocircumflex -14 +KPX B Odieresis -14 +KPX B Ograve -14 +KPX B Oslash -12 +KPX B V -29 +KPX B W -10 +KPX B Y -50 +KPX C A 2 +KPX C AE 2 +KPX C Aacute 2 +KPX C Adieresis 2 +KPX C Aring 2 +KPX C H -18 +KPX C K -13 +KPX C O -19 +KPX C Oacute -19 +KPX C Odieresis -19 +KPX Ccedilla A -5 +KPX D A -32 +KPX D Aacute -32 +KPX D Acircumflex -32 +KPX D Adieresis -32 +KPX D Agrave -32 +KPX D Aring -32 +KPX D Atilde -32 +KPX D J -38 +KPX D T -36 +KPX D V -40 +KPX D W -16 +KPX D X -40 +KPX D Y -61 +KPX F A -47 +KPX F Aacute -47 +KPX F Acircumflex -47 +KPX F Adieresis -47 +KPX F Agrave -47 +KPX F Aring -47 +KPX F Atilde -47 +KPX F J -83 +KPX F O -32 +KPX F Odieresis -32 +KPX F a -44 +KPX F aacute -45 +KPX F adieresis -44 +KPX F ae -22 +KPX F aring -44 +KPX F comma -172 +KPX F e -51 +KPX F eacute -51 +KPX F hyphen -61 +KPX F i -50 +KPX F j -58 +KPX F o -55 +KPX F oacute -55 +KPX F odieresis -55 +KPX F oe -20 +KPX F oslash -55 +KPX F period -191 +KPX F r -37 +KPX F u -6 +KPX G A 0 +KPX G AE 0 +KPX G Aacute 0 +KPX G Acircumflex 0 +KPX G Adieresis 0 +KPX G Agrave 0 +KPX G Aring 0 +KPX G Atilde 0 +KPX G T -30 +KPX G V 1 +KPX G W 5 +KPX G Y -20 +KPX J A -15 +KPX J AE -24 +KPX J Adieresis -15 +KPX J Aring -15 +KPX K C -32 +KPX K G -30 +KPX K O -31 +KPX K OE -9 +KPX K Oacute -31 +KPX K Odieresis -31 +KPX K S -17 +KPX K T -20 +KPX K a -1 +KPX K adieresis -1 +KPX K ae 23 +KPX K aring -1 +KPX K e -14 +KPX K hyphen -50 +KPX K o -20 +KPX K oacute -20 +KPX K odieresis -20 +KPX K u -30 +KPX K udieresis -30 +KPX K y -56 +KPX L A 9 +KPX L AE 9 +KPX L Aacute 9 +KPX L Adieresis 9 +KPX L Aring 9 +KPX L C -19 +KPX L Ccedilla -19 +KPX L G -19 +KPX L O -16 +KPX L Oacute -16 +KPX L Ocircumflex -16 +KPX L Odieresis -16 +KPX L Ograve -16 +KPX L Otilde -16 +KPX L S -32 +KPX L T -60 +KPX L U -31 +KPX L Udieresis -31 +KPX L V -61 +KPX L W -23 +KPX L Y -59 +KPX L hyphen 5 +KPX L quotedblright -82 +KPX L quoteright -107 +KPX L u -13 +KPX L udieresis -14 +KPX L y -36 +KPX N A -10 +KPX N AE -11 +KPX N Aacute -10 +KPX N Adieresis -10 +KPX N Aring -10 +KPX N C -13 +KPX N Ccedilla -10 +KPX N G -12 +KPX N O -10 +KPX N Oacute -10 +KPX N Odieresis -10 +KPX N a -14 +KPX N aacute -15 +KPX N adieresis -14 +KPX N ae 14 +KPX N aring -14 +KPX N comma -79 +KPX N e -7 +KPX N eacute -7 +KPX N o -12 +KPX N oacute -12 +KPX N odieresis -12 +KPX N oslash -6 +KPX N period -98 +KPX N u -12 +KPX N udieresis -12 +KPX O A -21 +KPX O AE -20 +KPX O Aacute -21 +KPX O Adieresis -21 +KPX O Aring -21 +KPX O T -23 +KPX O V -32 +KPX O W -4 +KPX O X -28 +KPX O Y -51 +KPX Oacute A -21 +KPX Oacute T -23 +KPX Oacute V -32 +KPX Oacute W -4 +KPX Oacute Y -51 +KPX Ocircumflex T -23 +KPX Ocircumflex V -32 +KPX Ocircumflex Y -51 +KPX Odieresis A -21 +KPX Odieresis T -23 +KPX Odieresis V -32 +KPX Odieresis W -4 +KPX Odieresis X -28 +KPX Odieresis Y -51 +KPX Ograve T -23 +KPX Ograve V -32 +KPX Ograve Y -51 +KPX Oslash A -13 +KPX Otilde T -23 +KPX Otilde V -32 +KPX Otilde Y -51 +KPX P A -65 +KPX P AE -63 +KPX P Aacute -65 +KPX P Adieresis -65 +KPX P Aring -65 +KPX P J -80 +KPX P a -54 +KPX P aacute -54 +KPX P adieresis -54 +KPX P ae -31 +KPX P aring -54 +KPX P comma -164 +KPX P e -43 +KPX P eacute -43 +KPX P hyphen -39 +KPX P o -47 +KPX P oacute -47 +KPX P odieresis -47 +KPX P oe -18 +KPX P oslash -46 +KPX P period -183 +KPX R C -19 +KPX R Ccedilla -18 +KPX R G -18 +KPX R O -18 +KPX R OE 3 +KPX R Oacute -18 +KPX R Odieresis -18 +KPX R T -36 +KPX R U -20 +KPX R Udieresis -21 +KPX R V -34 +KPX R W -10 +KPX R Y -35 +KPX R a 7 +KPX R aacute 6 +KPX R adieresis 7 +KPX R ae 32 +KPX R aring 7 +KPX R e -4 +KPX R eacute -4 +KPX R hyphen -30 +KPX R o -9 +KPX R oacute -9 +KPX R odieresis -9 +KPX R oe 24 +KPX R u -9 +KPX R uacute -9 +KPX R udieresis -9 +KPX R y -22 +KPX S A -16 +KPX S AE -16 +KPX S Aacute -16 +KPX S Adieresis -16 +KPX S Aring -16 +KPX S T -47 +KPX S V -16 +KPX S W -15 +KPX S Y -37 +KPX S t -20 +KPX T A -35 +KPX T AE -35 +KPX T Aacute -35 +KPX T Acircumflex -35 +KPX T Adieresis -35 +KPX T Agrave -35 +KPX T Aring -35 +KPX T Atilde -35 +KPX T C -27 +KPX T G -27 +KPX T J -72 +KPX T O -22 +KPX T OE 0 +KPX T Oacute -22 +KPX T Ocircumflex -22 +KPX T Odieresis -22 +KPX T Ograve -22 +KPX T Oslash -23 +KPX T Otilde -22 +KPX T S -49 +KPX T V 4 +KPX T W -2 +KPX T Y -17 +KPX T a -39 +KPX T ae -17 +KPX T c -42 +KPX T colon -119 +KPX T comma -136 +KPX T e -31 +KPX T g -28 +KPX T guillemotleft -81 +KPX T guilsinglleft -81 +KPX T hyphen -96 +KPX T i -46 +KPX T j -53 +KPX T o -36 +KPX T oslash -36 +KPX T period -154 +KPX T r -33 +KPX T s -43 +KPX T semicolon -106 +KPX T u -1 +KPX T v 6 +KPX T w 5 +KPX T y -4 +KPX U A -23 +KPX U AE -22 +KPX U Aacute -23 +KPX U Acircumflex -23 +KPX U Adieresis -23 +KPX U Aring -23 +KPX U Atilde -23 +KPX U comma -98 +KPX U m 14 +KPX U n -10 +KPX U p -3 +KPX U period -118 +KPX U r -36 +KPX Uacute A -23 +KPX Uacute comma -98 +KPX Uacute m 14 +KPX Uacute n -10 +KPX Uacute p -3 +KPX Uacute period -118 +KPX Uacute r -36 +KPX Ucircumflex A -23 +KPX Udieresis A -23 +KPX Udieresis b 20 +KPX Udieresis comma -98 +KPX Udieresis m 14 +KPX Udieresis n -10 +KPX Udieresis p -3 +KPX Udieresis period -118 +KPX Udieresis r -36 +KPX Ugrave A -23 +KPX V A -12 +KPX V AE -21 +KPX V Aacute -12 +KPX V Acircumflex -12 +KPX V Adieresis -12 +KPX V Agrave -12 +KPX V Aring -12 +KPX V Atilde -12 +KPX V C -34 +KPX V G -34 +KPX V O -32 +KPX V Oacute -32 +KPX V Ocircumflex -32 +KPX V Odieresis -32 +KPX V Ograve -32 +KPX V Oslash -32 +KPX V Otilde -32 +KPX V S -35 +KPX V T 3 +KPX V a -59 +KPX V ae -30 +KPX V colon -139 +KPX V comma -150 +KPX V e -51 +KPX V g -50 +KPX V guillemotleft -83 +KPX V guilsinglleft -83 +KPX V hyphen -45 +KPX V i -64 +KPX V o -56 +KPX V oslash -51 +KPX V period -169 +KPX V r -51 +KPX V semicolon -127 +KPX V u -21 +KPX V y -22 +KPX W A -15 +KPX W AE -14 +KPX W Aacute -15 +KPX W Acircumflex -15 +KPX W Adieresis -15 +KPX W Agrave -15 +KPX W Aring -15 +KPX W Atilde -15 +KPX W C -9 +KPX W G -8 +KPX W O -7 +KPX W Oacute -7 +KPX W Ocircumflex -7 +KPX W Odieresis -7 +KPX W Ograve -7 +KPX W Oslash -3 +KPX W Otilde -7 +KPX W S -21 +KPX W T -1 +KPX W a -14 +KPX W ae 15 +KPX W colon -103 +KPX W comma -86 +KPX W e -6 +KPX W g -5 +KPX W guillemotleft -38 +KPX W guilsinglleft -38 +KPX W hyphen -3 +KPX W i -40 +KPX W o -11 +KPX W oslash -6 +KPX W period -105 +KPX W r -28 +KPX W semicolon -86 +KPX W u -3 +KPX W y -6 +KPX X C -33 +KPX X O -31 +KPX X Odieresis -31 +KPX X Q -30 +KPX X a -7 +KPX X e -20 +KPX X hyphen -55 +KPX X o -26 +KPX X u -36 +KPX X y -49 +KPX Y A -32 +KPX Y AE -35 +KPX Y Aacute -32 +KPX Y Acircumflex -32 +KPX Y Adieresis -32 +KPX Y Agrave -32 +KPX Y Aring -32 +KPX Y Atilde -32 +KPX Y C -54 +KPX Y G -54 +KPX Y O -52 +KPX Y Oacute -52 +KPX Y Ocircumflex -52 +KPX Y Odieresis -52 +KPX Y Ograve -52 +KPX Y Oslash -50 +KPX Y Otilde -52 +KPX Y S -55 +KPX Y T -17 +KPX Y a -61 +KPX Y ae -36 +KPX Y colon -157 +KPX Y comma -123 +KPX Y e -63 +KPX Y g -62 +KPX Y guillemotleft -99 +KPX Y guilsinglleft -99 +KPX Y hyphen -87 +KPX Y i -63 +KPX Y o -68 +KPX Y oslash -56 +KPX Y p -34 +KPX Y period -141 +KPX Y semicolon -139 +KPX Y u -48 +KPX Y v -38 +KPX Z v -47 +KPX Z y -55 +KPX a j -85 +KPX a quoteright -79 +KPX a v -25 +KPX a w -13 +KPX a y -36 +KPX aacute v -25 +KPX aacute w -13 +KPX aacute y -36 +KPX adieresis v -25 +KPX adieresis w -13 +KPX adieresis y -36 +KPX ae v 24 +KPX ae w 31 +KPX ae y 13 +KPX agrave v -25 +KPX agrave w -13 +KPX agrave y -36 +KPX aring v -25 +KPX aring w -13 +KPX aring y -36 +KPX b v -4 +KPX b w 3 +KPX b y -15 +KPX c h 8 +KPX c k 3 +KPX comma one -133 +KPX comma quotedblright -142 +KPX comma quoteright -170 +KPX e quoteright -64 +KPX e t -16 +KPX e v -14 +KPX e w -4 +KPX e x 3 +KPX e y -25 +KPX eacute v -14 +KPX eacute w -4 +KPX eacute y -25 +KPX ecircumflex v -14 +KPX ecircumflex w -4 +KPX ecircumflex y -25 +KPX eight four -63 +KPX eight one -80 +KPX eight seven -75 +KPX f a -38 +KPX f aacute -38 +KPX f adieresis -38 +KPX f ae -13 +KPX f aring -38 +KPX f e -46 +KPX f eacute -46 +KPX f f -46 +KPX f i -40 +KPX f j -63 +KPX f l -30 +KPX f o -51 +KPX f oacute -51 +KPX f odieresis -48 +KPX f oe -17 +KPX f oslash -34 +KPX f quoteright -78 +KPX f s -46 +KPX f t -10 +KPX five four -58 +KPX five one -80 +KPX five seven -80 +KPX four four -68 +KPX four one -72 +KPX four seven -100 +KPX g a -7 +KPX g adieresis -7 +KPX g ae 21 +KPX g aring -7 +KPX g e -1 +KPX g eacute -1 +KPX g l -38 +KPX g oacute -6 +KPX g odieresis -6 +KPX g r -5 +KPX guillemotright A -42 +KPX guillemotright AE -39 +KPX guillemotright Aacute -42 +KPX guillemotright Adieresis -42 +KPX guillemotright Aring -42 +KPX guillemotright T -81 +KPX guillemotright V -80 +KPX guillemotright W -35 +KPX guillemotright Y -96 +KPX guilsinglright A -42 +KPX guilsinglright AE -39 +KPX guilsinglright Aacute -42 +KPX guilsinglright Adieresis -42 +KPX guilsinglright Aring -42 +KPX guilsinglright T -81 +KPX guilsinglright V -80 +KPX guilsinglright W -35 +KPX guilsinglright Y -96 +KPX h quoteright -71 +KPX h y -29 +KPX hyphen A -21 +KPX hyphen AE -17 +KPX hyphen Aacute -21 +KPX hyphen Adieresis -21 +KPX hyphen Aring -21 +KPX hyphen T -93 +KPX hyphen V -41 +KPX hyphen W -1 +KPX hyphen Y -84 +KPX i T -64 +KPX i j -145 +KPX k a -5 +KPX k aacute -5 +KPX k adieresis -5 +KPX k ae 20 +KPX k aring -5 +KPX k comma -67 +KPX k e -17 +KPX k eacute -17 +KPX k g -16 +KPX k hyphen -53 +KPX k o -22 +KPX k oacute -22 +KPX k odieresis -22 +KPX k period -80 +KPX k s -13 +KPX k u -7 +KPX k udieresis -7 +KPX l v -77 +KPX l y -78 +KPX m p 31 +KPX m v 13 +KPX m w 22 +KPX m y 2 +KPX n T -47 +KPX n p 2 +KPX n quoteright -69 +KPX n v -17 +KPX n w -6 +KPX n y -28 +KPX nine four -59 +KPX nine one -76 +KPX nine seven -68 +KPX o T -39 +KPX o quoteright -61 +KPX o t -16 +KPX o v -10 +KPX o w -3 +KPX o x -10 +KPX o y -21 +KPX oacute v -10 +KPX oacute w -3 +KPX oacute y -21 +KPX ocircumflex t -16 +KPX odieresis t -16 +KPX odieresis v -10 +KPX odieresis w -3 +KPX odieresis x -10 +KPX odieresis y -21 +KPX ograve v -10 +KPX ograve w -3 +KPX ograve y -21 +KPX one comma -104 +KPX one eight -83 +KPX one five -63 +KPX one four -95 +KPX one nine -80 +KPX one one -68 +KPX one period -119 +KPX one seven -146 +KPX one six -107 +KPX one three -62 +KPX one two -53 +KPX one zero -95 +KPX p t -7 +KPX p y -12 +KPX period one -118 +KPX period quotedblright -137 +KPX period quoteright -165 +KPX q c 0 +KPX q u 37 +KPX quotedblbase A -10 +KPX quotedblbase AE -11 +KPX quotedblbase T -92 +KPX quotedblbase V -108 +KPX quotedblbase W -46 +KPX quotedblbase Y -80 +KPX quotedblleft A -66 +KPX quotedblleft AE -64 +KPX quotedblleft Aacute -66 +KPX quotedblleft Adieresis -66 +KPX quotedblleft Aring -66 +KPX quotedblleft T -28 +KPX quotedblleft V -20 +KPX quotedblleft W -15 +KPX quotedblleft Y -50 +KPX quotedblright A -81 +KPX quotedblright AE -79 +KPX quotedblright Aacute -81 +KPX quotedblright Adieresis -81 +KPX quotedblright Aring -81 +KPX quotedblright T -45 +KPX quotedblright V -35 +KPX quotedblright W -30 +KPX quotedblright Y -57 +KPX quoteleft A -90 +KPX quoteleft AE -88 +KPX quoteleft Aacute -90 +KPX quoteleft Adieresis -90 +KPX quoteleft Aring -90 +KPX quoteleft T -52 +KPX quoteleft V -45 +KPX quoteleft W -40 +KPX quoteleft Y -74 +KPX quoteright A -160 +KPX quoteright AE -158 +KPX quoteright Aacute -160 +KPX quoteright Adieresis -160 +KPX quoteright Aring -160 +KPX quoteright comma -234 +KPX quoteright d -146 +KPX quoteright o -148 +KPX quoteright period -251 +KPX quoteright r -155 +KPX quoteright s -154 +KPX quoteright t -121 +KPX quoteright v -114 +KPX quoteright w -109 +KPX quoteright y -120 +KPX r a -22 +KPX r aacute -22 +KPX r acircumflex -22 +KPX r adieresis -22 +KPX r ae 0 +KPX r agrave -22 +KPX r aring -22 +KPX r c -23 +KPX r ccedilla -18 +KPX r colon -100 +KPX r comma -112 +KPX r d -13 +KPX r e -11 +KPX r eacute -11 +KPX r ecircumflex -11 +KPX r egrave -11 +KPX r f -20 +KPX r g -9 +KPX r h -23 +KPX r hyphen -48 +KPX r i -30 +KPX r j -38 +KPX r k -33 +KPX r l -50 +KPX r m 31 +KPX r n 5 +KPX r o -16 +KPX r oacute -16 +KPX r ocircumflex -16 +KPX r odieresis -16 +KPX r oe 15 +KPX r ograve -16 +KPX r oslash -16 +KPX r p 25 +KPX r period -126 +KPX r q -8 +KPX r quoteright -45 +KPX r r -17 +KPX r s -25 +KPX r semicolon -88 +KPX r t 15 +KPX r u 15 +KPX r v 22 +KPX r w 21 +KPX r x 2 +KPX r y 10 +KPX r z -24 +KPX s quoteright -62 +KPX s t -14 +KPX seven colon -162 +KPX seven comma -160 +KPX seven eight -79 +KPX seven five -87 +KPX seven four -105 +KPX seven one -72 +KPX seven period -179 +KPX seven seven -69 +KPX seven six -98 +KPX seven three -78 +KPX seven two -70 +KPX six four -54 +KPX six one -60 +KPX six seven -55 +KPX t S -40 +KPX t a -21 +KPX t aacute -21 +KPX t adieresis -21 +KPX t ae 4 +KPX t aring -21 +KPX t colon -121 +KPX t e -30 +KPX t eacute -30 +KPX t h -8 +KPX t o -36 +KPX t oacute -36 +KPX t odieresis -36 +KPX t quoteright -102 +KPX t semicolon -107 +KPX three four -58 +KPX three one -79 +KPX three seven -74 +KPX two four -75 +KPX two one -73 +KPX two seven -78 +KPX u quoteright -58 +KPX v a -7 +KPX v aacute -7 +KPX v acircumflex -7 +KPX v adieresis -7 +KPX v ae 15 +KPX v agrave -7 +KPX v aring -7 +KPX v atilde -7 +KPX v c -17 +KPX v colon -86 +KPX v comma -139 +KPX v e -6 +KPX v eacute -6 +KPX v ecircumflex -6 +KPX v egrave -6 +KPX v g -2 +KPX v hyphen -28 +KPX v l -79 +KPX v o -11 +KPX v oacute -11 +KPX v odieresis -11 +KPX v ograve -11 +KPX v oslash -10 +KPX v period -159 +KPX v s -15 +KPX v semicolon -74 +KPX w a -6 +KPX w aacute -7 +KPX w acircumflex -6 +KPX w adieresis -6 +KPX w ae 22 +KPX w agrave -6 +KPX w aring -6 +KPX w atilde -6 +KPX w c -8 +KPX w colon -86 +KPX w comma -93 +KPX w e 0 +KPX w eacute 0 +KPX w ecircumflex 0 +KPX w egrave 0 +KPX w g 2 +KPX w hyphen -1 +KPX w l -51 +KPX w o -4 +KPX w oacute -4 +KPX w odieresis -4 +KPX w ograve -4 +KPX w oslash 0 +KPX w period -112 +KPX w s -13 +KPX w semicolon -74 +KPX x a -1 +KPX x c -16 +KPX x e -7 +KPX x eacute -7 +KPX x o -12 +KPX x q -9 +KPX y a -17 +KPX y aacute -18 +KPX y acircumflex -17 +KPX y adieresis -17 +KPX y ae 4 +KPX y agrave -17 +KPX y aring -17 +KPX y atilde -17 +KPX y c -25 +KPX y colon -96 +KPX y comma -137 +KPX y e -14 +KPX y eacute -14 +KPX y ecircumflex -14 +KPX y egrave -14 +KPX y g -11 +KPX y hyphen -23 +KPX y l -79 +KPX y o -20 +KPX y oacute -20 +KPX y odieresis -20 +KPX y ograve -20 +KPX y oslash -19 +KPX y period -158 +KPX y s -24 +KPX y semicolon -84 +KPX zero four -65 +KPX zero one -81 +KPX zero seven -79 +EndKernPairs +EndKernData EndFontMetrics diff --git a/misc/gs_afm/CourO.afm b/misc/gs_afm/CourO.afm index 51e4ee6b81..718ec5de05 100644 --- a/misc/gs_afm/CourO.afm +++ b/misc/gs_afm/CourO.afm @@ -1,7 +1,7 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/19/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. FontName NimbusMonL-ReguObli FullName Nimbus Mono L Regular Oblique FamilyName Nimbus Mono L @@ -10,15 +10,15 @@ ItalicAngle -12.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -61 -216 710 811 +FontBBox -61 -237 774 811 CapHeight 563 XHeight 417 Descender -186 Ascender 604 -StartCharMetrics 232 +StartCharMetrics 316 C 32 ; WX 600 ; N space ; B 319 0 319 0 ; C 33 ; WX 600 ; N exclam ; B 246 -15 463 618 ; C 34 ; WX 600 ; N quotedbl ; B 254 315 582 604 ; @@ -70,7 +70,7 @@ C 79 ; WX 600 ; N O ; B 102 -16 616 576 ; C 80 ; WX 600 ; N P ; B 47 0 587 563 ; C 81 ; WX 600 ; N Q ; B 102 -115 616 576 ; C 82 ; WX 600 ; N R ; B 47 0 594 563 ; -C 83 ; WX 600 ; N S ; B 96 -16 602 576 ; +C 83 ; WX 600 ; N S ; B 96 -17 602 577 ; C 84 ; WX 600 ; N T ; B 152 0 648 563 ; C 85 ; WX 600 ; N U ; B 136 -16 676 563 ; C 86 ; WX 600 ; N V ; B 124 0 707 563 ; @@ -86,7 +86,7 @@ C 95 ; WX 600 ; N underscore ; B -61 -125 564 -75 ; C 96 ; WX 600 ; N quoteleft ; B 388 343 544 604 ; C 97 ; WX 600 ; N a ; B 93 -16 546 431 ; C 98 ; WX 600 ; N b ; B 26 -16 591 604 ; -C 99 ; WX 600 ; N c ; B 122 -16 596 431 ; +C 99 ; WX 600 ; N c ; B 121 -17 596 432 ; C 100 ; WX 600 ; N d ; B 102 -16 630 604 ; C 101 ; WX 600 ; N e ; B 104 -16 570 431 ; C 102 ; WX 600 ; N f ; B 109 0 663 604 ; @@ -102,7 +102,7 @@ C 111 ; WX 600 ; N o ; B 111 -16 577 431 ; C 112 ; WX 600 ; N p ; B -13 -186 593 431 ; C 113 ; WX 600 ; N q ; B 105 -186 668 431 ; C 114 ; WX 600 ; N r ; B 88 0 619 427 ; -C 115 ; WX 600 ; N s ; B 108 -16 558 431 ; +C 115 ; WX 600 ; N s ; B 108 -17 558 431 ; C 116 ; WX 600 ; N t ; B 127 -16 518 563 ; C 117 ; WX 600 ; N u ; B 127 -16 569 417 ; C 118 ; WX 600 ; N v ; B 114 0 655 417 ; @@ -117,7 +117,7 @@ C 126 ; WX 600 ; N asciitilde ; B 145 212 575 348 ; C 161 ; WX 600 ; N exclamdown ; B 222 -216 439 417 ; C 162 ; WX 600 ; N cent ; B 175 -13 563 630 ; C 163 ; WX 600 ; N sterling ; B 90 0 541 578 ; -C 164 ; WX 600 ; N fraction ; B 84 139 645 470 ; +C 164 ; WX 600 ; N fraction ; B 84 138 645 470 ; C 165 ; WX 600 ; N yen ; B 161 0 665 563 ; C 166 ; WX 600 ; N florin ; B 74 -93 643 618 ; C 167 ; WX 600 ; N section ; B 91 -62 624 603 ; @@ -139,7 +139,7 @@ C 184 ; WX 600 ; N quotesinglbase ; B 110 -145 371 145 ; C 185 ; WX 600 ; N quotedblbase ; B 73 -116 538 145 ; C 186 ; WX 600 ; N quotedblright ; B 170 343 635 604 ; C 187 ; WX 600 ; N guillemotright ; B 67 0 585 417 ; -C 188 ; WX 600 ; N ellipsis ; B 57 -15 556 85 ; +C 188 ; WX 600 ; N ellipsis ; B 57 -15 557 84 ; C 189 ; WX 600 ; N perthousand ; B 91 -9 598 614 ; C 191 ; WX 600 ; N questiondown ; B 105 -175 455 417 ; C 193 ; WX 600 ; N grave ; B 286 490 429 639 ; @@ -147,9 +147,9 @@ C 194 ; WX 600 ; N acute ; B 388 490 577 639 ; C 195 ; WX 600 ; N circumflex ; B 263 490 554 639 ; C 196 ; WX 600 ; N tilde ; B 258 516 579 605 ; C 197 ; WX 600 ; N macron ; B 273 536 564 576 ; -C 198 ; WX 600 ; N breve ; B 281 490 573 620 ; -C 199 ; WX 600 ; N dotaccent ; B 368 511 469 612 ; -C 200 ; WX 600 ; N dieresis ; B 258 511 580 612 ; +C 198 ; WX 600 ; N breve ; B 280 489 574 621 ; +C 199 ; WX 600 ; N dotaccent ; B 368 511 470 611 ; +C 200 ; WX 600 ; N dieresis ; B 258 511 581 611 ; C 202 ; WX 600 ; N ring ; B 326 480 516 661 ; C 203 ; WX 600 ; N cedilla ; B 181 -173 356 0 ; C 205 ; WX 600 ; N hungarumlaut ; B 263 490 576 633 ; @@ -168,88 +168,1174 @@ C 248 ; WX 600 ; N lslash ; B 96 0 524 604 ; C 249 ; WX 600 ; N oslash ; B 47 -43 637 458 ; C 250 ; WX 600 ; N oe ; B 50 -16 630 431 ; C 251 ; WX 600 ; N germandbls ; B 47 -16 539 604 ; -C -1 ; WX 600 ; N Yacute ; B 153 0 665 789 ; -C -1 ; WX 600 ; N Ucircumflex ; B 136 -16 676 789 ; -C -1 ; WX 600 ; N Ugrave ; B 136 -16 676 789 ; -C -1 ; WX 600 ; N Zcaron ; B 103 0 605 789 ; -C -1 ; WX 600 ; N Ydieresis ; B 153 0 665 762 ; -C -1 ; WX 600 ; N threesuperior ; B 245 251 516 612 ; -C -1 ; WX 600 ; N Uacute ; B 136 -16 676 789 ; -C -1 ; WX 600 ; N twosuperior ; B 230 259 514 612 ; C -1 ; WX 600 ; N Udieresis ; B 136 -16 676 762 ; -C -1 ; WX 600 ; N middot ; B 285 217 436 348 ; -C -1 ; WX 600 ; N onesuperior ; B 249 259 469 612 ; -C -1 ; WX 600 ; N aacute ; B 93 -16 546 639 ; -C -1 ; WX 600 ; N agrave ; B 93 -16 546 639 ; -C -1 ; WX 600 ; N acircumflex ; B 93 -16 546 639 ; -C -1 ; WX 600 ; N Scaron ; B 96 -16 618 789 ; +C -1 ; WX 600 ; N Uacute ; B 136 -16 676 789 ; +C -1 ; WX 600 ; N Scedilla ; B 96 -179 602 577 ; +C -1 ; WX 600 ; N Tcaron ; B 152 0 648 789 ; +C -1 ; WX 600 ; N Scaron ; B 96 -17 618 789 ; +C -1 ; WX 600 ; N Rcaron ; B 47 0 594 789 ; +C -1 ; WX 600 ; N Racute ; B 47 0 594 789 ; +C -1 ; WX 600 ; N Sacute ; B 96 -17 602 789 ; C -1 ; WX 600 ; N Otilde ; B 103 -16 618 755 ; -C -1 ; WX 600 ; N sfthyphen ; B 131 258 588 299 ; -C -1 ; WX 600 ; N atilde ; B 93 -16 570 605 ; +C -1 ; WX 600 ; N ucircumflex ; B 127 -16 569 639 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 102 -16 672 787 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 136 -16 676 787 ; +C -1 ; WX 600 ; N Yacute ; B 153 0 665 789 ; +C -1 ; WX 600 ; N Eth ; B 47 0 592 563 ; +C -1 ; WX 600 ; N Dcroat ; B 47 0 592 563 ; +C -1 ; WX 600 ; N Zacute ; B 103 0 590 789 ; +C -1 ; WX 600 ; N Uring ; B 136 -16 676 807 ; +C -1 ; WX 600 ; N gbreve ; B 105 -186 647 621 ; +C -1 ; WX 600 ; N eogonek ; B 104 -155 570 431 ; +C -1 ; WX 600 ; N edotaccent ; B 104 -16 570 611 ; +C -1 ; WX 600 ; N ecaron ; B 104 -16 577 639 ; +C -1 ; WX 600 ; N Ugrave ; B 136 -16 676 789 ; +C -1 ; WX 600 ; N Thorn ; B 47 0 566 563 ; +C -1 ; WX 600 ; N eacute ; B 104 -16 570 639 ; +C -1 ; WX 600 ; N edieresis ; B 104 -16 586 611 ; +C -1 ; WX 600 ; N dcaron ; B 102 -16 774 618 ; +C -1 ; WX 600 ; N ccedilla ; B 122 -173 596 431 ; +C -1 ; WX 600 ; N ccaron ; B 121 -17 596 639 ; +C -1 ; WX 600 ; N cacute ; B 121 -17 596 639 ; +C -1 ; WX 600 ; N aogonek ; B 93 -155 546 431 ; C -1 ; WX 600 ; N aring ; B 93 -16 546 661 ; -C -1 ; WX 600 ; N adieresis ; B 93 -16 570 612 ; +C -1 ; WX 600 ; N atilde ; B 93 -16 570 605 ; +C -1 ; WX 600 ; N abreve ; B 93 -16 574 621 ; +C -1 ; WX 600 ; N egrave ; B 104 -16 570 639 ; +C -1 ; WX 600 ; N agrave ; B 93 -16 546 639 ; +C -1 ; WX 600 ; N aacute ; B 93 -16 546 639 ; +C -1 ; WX 600 ; N adieresis ; B 93 -16 571 611 ; +C -1 ; WX 600 ; N Uogonek ; B 136 -155 676 563 ; +C -1 ; WX 600 ; N ugrave ; B 127 -16 569 639 ; +C -1 ; WX 600 ; N uacute ; B 127 -16 569 639 ; +C -1 ; WX 600 ; N udieresis ; B 127 -16 573 611 ; +C -1 ; WX 600 ; N tcaron ; B 127 -16 593 618 ; +C -1 ; WX 600 ; N scommaaccent ; B 108 -237 558 431 ; +C -1 ; WX 600 ; N Zcaron ; B 103 0 604 789 ; +C -1 ; WX 600 ; N ecircumflex ; B 104 -16 570 639 ; +C -1 ; WX 600 ; N Ucircumflex ; B 136 -16 676 789 ; +C -1 ; WX 600 ; N acircumflex ; B 93 -16 546 639 ; +C -1 ; WX 600 ; N Zdotaccent ; B 103 0 590 762 ; +C -1 ; WX 600 ; N scaron ; B 107 -17 584 639 ; +C -1 ; WX 600 ; N Amacron ; B 13 0 596 723 ; +C -1 ; WX 600 ; N sacute ; B 108 -17 577 639 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 152 -237 648 563 ; +C -1 ; WX 600 ; N Ydieresis ; B 153 0 665 762 ; +C -1 ; WX 600 ; N thorn ; B -13 -186 593 590 ; +C -1 ; WX 600 ; N Emacron ; B 47 0 619 723 ; C -1 ; WX 600 ; N Ograve ; B 102 -16 616 789 ; -C -1 ; WX 600 ; N Ocircumflex ; B 102 -16 616 789 ; +C -1 ; WX 600 ; N Oacute ; B 102 -16 616 789 ; C -1 ; WX 600 ; N Odieresis ; B 102 -16 616 762 ; C -1 ; WX 600 ; N Ntilde ; B 46 0 678 755 ; -C -1 ; WX 600 ; N edieresis ; B 104 -16 585 612 ; -C -1 ; WX 600 ; N eacute ; B 104 -16 570 639 ; -C -1 ; WX 600 ; N egrave ; B 104 -16 570 639 ; +C -1 ; WX 600 ; N Ncaron ; B 46 0 678 789 ; +C -1 ; WX 600 ; N Nacute ; B 46 0 678 789 ; +C -1 ; WX 600 ; N Lcaron ; B 67 0 638 576 ; +C -1 ; WX 600 ; N Lacute ; B 67 0 585 789 ; +C -1 ; WX 600 ; N Idotaccent ; B 117 0 603 762 ; +C -1 ; WX 600 ; N racute ; B 88 0 619 639 ; C -1 ; WX 600 ; N Icircumflex ; B 117 0 603 789 ; -C -1 ; WX 600 ; N ecircumflex ; B 104 -16 570 639 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 111 -16 616 633 ; +C -1 ; WX 600 ; N otilde ; B 111 -16 586 605 ; +C -1 ; WX 600 ; N Euro ; B 60 -16 634 576 ; +C -1 ; WX 600 ; N ocircumflex ; B 111 -16 577 639 ; +C -1 ; WX 600 ; N onesuperior ; B 249 259 469 612 ; +C -1 ; WX 600 ; N twosuperior ; B 230 259 514 612 ; +C -1 ; WX 600 ; N threesuperior ; B 245 251 516 612 ; C -1 ; WX 600 ; N Igrave ; B 117 0 603 789 ; C -1 ; WX 600 ; N Iacute ; B 117 0 603 789 ; +C -1 ; WX 600 ; N Imacron ; B 117 0 603 723 ; +C -1 ; WX 600 ; N Iogonek ; B 117 -155 603 563 ; C -1 ; WX 600 ; N Idieresis ; B 117 0 611 762 ; -C -1 ; WX 600 ; N degree ; B 257 346 553 636 ; +C -1 ; WX 600 ; N Gbreve ; B 108 -16 656 777 ; +C -1 ; WX 600 ; N Umacron ; B 136 -16 676 723 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 47 -237 662 563 ; +C -1 ; WX 600 ; N ograve ; B 111 -16 577 639 ; +C -1 ; WX 600 ; N Scommaaccent ; B 96 -237 602 577 ; +C -1 ; WX 600 ; N Eogonek ; B 47 -155 619 563 ; +C -1 ; WX 600 ; N oacute ; B 111 -16 577 639 ; +C -1 ; WX 600 ; N Edotaccent ; B 47 0 619 762 ; +C -1 ; WX 600 ; N iogonek ; B 96 -155 513 624 ; +C -1 ; WX 600 ; N gcommaaccent ; B 105 -186 647 668 ; +C -1 ; WX 600 ; N odieresis ; B 111 -16 581 611 ; +C -1 ; WX 600 ; N ntilde ; B 57 0 570 605 ; +C -1 ; WX 600 ; N ncaron ; B 57 0 577 639 ; +C -1 ; WX 600 ; N Ecaron ; B 47 0 619 789 ; C -1 ; WX 600 ; N Ecircumflex ; B 47 0 619 789 ; +C -1 ; WX 600 ; N scedilla ; B 108 -173 558 431 ; +C -1 ; WX 600 ; N rcaron ; B 88 0 619 639 ; +C -1 ; WX 600 ; N Egrave ; B 47 0 619 789 ; +C -1 ; WX 600 ; N Eacute ; B 47 0 619 789 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 108 -237 636 576 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 47 -237 594 563 ; +C -1 ; WX 600 ; N Edieresis ; B 47 0 619 762 ; +C -1 ; WX 600 ; N nacute ; B 57 0 577 639 ; +C -1 ; WX 600 ; N uogonek ; B 127 -155 569 417 ; +C -1 ; WX 600 ; N umacron ; B 127 -16 569 576 ; +C -1 ; WX 600 ; N Dcaron ; B 47 0 592 789 ; +C -1 ; WX 600 ; N lcaron ; B 96 0 593 618 ; +C -1 ; WX 600 ; N Ccaron ; B 110 -16 635 789 ; +C -1 ; WX 600 ; N Cacute ; B 110 -16 635 789 ; +C -1 ; WX 600 ; N Ccedilla ; B 110 -173 635 576 ; +C -1 ; WX 600 ; N degree ; B 257 346 553 636 ; +C -1 ; WX 600 ; N Aogonek ; B 13 -155 596 563 ; C -1 ; WX 600 ; N minus ; B 131 261 588 302 ; C -1 ; WX 600 ; N multiply ; B 143 100 577 464 ; -C -1 ; WX 600 ; N divide ; B 131 25 588 541 ; -C -1 ; WX 600 ; N Egrave ; B 47 0 619 789 ; +C -1 ; WX 600 ; N divide ; B 131 25 588 540 ; +C -1 ; WX 600 ; N Aring ; B 13 0 596 811 ; C -1 ; WX 600 ; N trademark ; B 90 243 710 563 ; -C -1 ; WX 600 ; N Oacute ; B 102 -16 616 789 ; -C -1 ; WX 600 ; N thorn ; B -13 -186 593 590 ; -C -1 ; WX 600 ; N eth ; B 111 -17 582 620 ; -C -1 ; WX 600 ; N Eacute ; B 47 0 619 789 ; -C -1 ; WX 600 ; N ccedilla ; B 122 -173 596 431 ; -C -1 ; WX 600 ; N idieresis ; B 96 0 567 612 ; -C -1 ; WX 600 ; N iacute ; B 96 0 535 639 ; +C -1 ; WX 600 ; N rcommaaccent ; B 88 -237 619 427 ; +C -1 ; WX 600 ; N lacute ; B 96 0 572 789 ; +C -1 ; WX 600 ; N omacron ; B 111 -16 577 576 ; +C -1 ; WX 600 ; N Atilde ; B 13 0 596 755 ; +C -1 ; WX 600 ; N icircumflex ; B 95 0 536 639 ; C -1 ; WX 600 ; N igrave ; B 96 0 513 639 ; +C -1 ; WX 600 ; N ncommaaccent ; B 57 -237 546 431 ; +C -1 ; WX 600 ; N lcommaaccent ; B 96 -237 513 604 ; C -1 ; WX 600 ; N plusminus ; B 76 0 597 529 ; C -1 ; WX 600 ; N onehalf ; B 82 0 627 612 ; C -1 ; WX 600 ; N onequarter ; B 74 0 619 612 ; C -1 ; WX 600 ; N threequarters ; B 70 0 619 612 ; -C -1 ; WX 600 ; N icircumflex ; B 95 0 536 639 ; -C -1 ; WX 600 ; N Edieresis ; B 47 0 619 762 ; -C -1 ; WX 600 ; N ntilde ; B 57 0 570 605 ; -C -1 ; WX 600 ; N Aring ; B 13 0 596 811 ; -C -1 ; WX 600 ; N odieresis ; B 111 -16 580 612 ; -C -1 ; WX 600 ; N oacute ; B 111 -16 577 639 ; -C -1 ; WX 600 ; N ograve ; B 111 -16 577 639 ; -C -1 ; WX 600 ; N ocircumflex ; B 111 -16 577 639 ; -C -1 ; WX 600 ; N otilde ; B 111 -16 586 605 ; -C -1 ; WX 600 ; N scaron ; B 107 -16 584 639 ; -C -1 ; WX 600 ; N udieresis ; B 127 -16 572 612 ; -C -1 ; WX 600 ; N uacute ; B 127 -16 569 639 ; -C -1 ; WX 600 ; N ugrave ; B 127 -16 569 639 ; -C -1 ; WX 600 ; N ucircumflex ; B 127 -16 569 639 ; -C -1 ; WX 600 ; N yacute ; B 22 -186 634 639 ; +C -1 ; WX 600 ; N iacute ; B 96 0 535 639 ; +C -1 ; WX 600 ; N Abreve ; B 13 0 596 777 ; +C -1 ; WX 600 ; N kcommaaccent ; B 67 -237 578 604 ; +C -1 ; WX 600 ; N Omacron ; B 102 -16 616 723 ; +C -1 ; WX 600 ; N imacron ; B 96 0 564 576 ; +C -1 ; WX 600 ; N emacron ; B 104 -16 570 576 ; +C -1 ; WX 600 ; N amacron ; B 93 -16 564 576 ; +C -1 ; WX 600 ; N tcommaaccent ; B 127 -237 518 563 ; +C -1 ; WX 600 ; N ydieresis ; B 22 -186 634 611 ; +C -1 ; WX 600 ; N zdotaccent ; B 115 0 563 611 ; C -1 ; WX 600 ; N zcaron ; B 115 0 576 639 ; -C -1 ; WX 600 ; N ydieresis ; B 22 -186 634 612 ; +C -1 ; WX 600 ; N zacute ; B 115 0 577 639 ; +C -1 ; WX 600 ; N yacute ; B 22 -186 634 639 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 127 -16 576 633 ; +C -1 ; WX 600 ; N eth ; B 111 -17 582 620 ; +C -1 ; WX 600 ; N uring ; B 127 -16 569 661 ; +C -1 ; WX 600 ; N Ocircumflex ; B 102 -16 616 789 ; +C -1 ; WX 600 ; N commaaccent ; B 159 -237 322 -60 ; C -1 ; WX 600 ; N copyright ; B 57 -15 663 578 ; C -1 ; WX 600 ; N registered ; B 57 -15 663 578 ; -C -1 ; WX 600 ; N Atilde ; B 13 0 596 755 ; -C -1 ; WX 600 ; N nbspace ; B 319 0 319 0 ; -C -1 ; WX 600 ; N Ccedilla ; B 110 -173 635 576 ; C -1 ; WX 600 ; N Acircumflex ; B 13 0 596 789 ; +C -1 ; WX 600 ; N idieresis ; B 96 0 568 611 ; +C -1 ; WX 600 ; N lozenge ; B 149 -11 571 575 ; +C -1 ; WX 600 ; N Delta ; B 43 0 557 563 ; +C -1 ; WX 600 ; N notequal ; B 96 94 625 464 ; +C -1 ; WX 600 ; N radical ; B 88 0 773 699 ; C -1 ; WX 600 ; N Agrave ; B 13 0 596 789 ; -C -1 ; WX 600 ; N logicalnot ; B 160 168 621 438 ; C -1 ; WX 600 ; N Aacute ; B 13 0 596 789 ; -C -1 ; WX 600 ; N Eth ; B 47 0 592 563 ; +C -1 ; WX 600 ; N lessequal ; B 56 0 635 535 ; +C -1 ; WX 600 ; N greaterequal ; B 71 0 600 535 ; +C -1 ; WX 600 ; N logicalnot ; B 160 168 621 438 ; +C -1 ; WX 600 ; N summation ; B 90 -127 616 563 ; +C -1 ; WX 600 ; N partialdiff ; B 111 -16 580 581 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 46 -237 678 563 ; +C -1 ; WX 600 ; N dcroat ; B 102 -16 690 604 ; C -1 ; WX 600 ; N brokenbar ; B 257 -124 444 604 ; -C -1 ; WX 600 ; N Thorn ; B 47 0 566 563 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 67 -237 585 563 ; C -1 ; WX 600 ; N Adieresis ; B 13 0 596 762 ; C -1 ; WX 600 ; N mu ; B 86 -200 569 417 ; C -1 ; WX 600 ; N .notdef ; B 319 0 319 0 ; EndCharMetrics +StartKernData +StartKernPairs 998 +KPX A C -41 +KPX A Ccedilla -39 +KPX A G -36 +KPX A O -35 +KPX A Odieresis -35 +KPX A Q -37 +KPX A T -34 +KPX A U -41 +KPX A Uacute -41 +KPX A Ucircumflex -41 +KPX A Udieresis -41 +KPX A Ugrave -41 +KPX A V -78 +KPX A W -20 +KPX A Y -35 +KPX A a 1 +KPX A b 40 +KPX A c -26 +KPX A ccedilla -23 +KPX A comma -47 +KPX A d -17 +KPX A e -21 +KPX A g -27 +KPX A guillemotleft -57 +KPX A guilsinglleft -57 +KPX A hyphen -35 +KPX A o -22 +KPX A period -70 +KPX A q -27 +KPX A quotedblright -82 +KPX A quoteright -102 +KPX A t -33 +KPX A u -23 +KPX A v -59 +KPX A w -27 +KPX A y -63 +KPX Aacute C -41 +KPX Aacute G -36 +KPX Aacute O -35 +KPX Aacute Q -37 +KPX Aacute T -34 +KPX Aacute U -41 +KPX Aacute V -78 +KPX Aacute W -20 +KPX Aacute Y -35 +KPX Aacute a 1 +KPX Aacute b 40 +KPX Aacute c -26 +KPX Aacute comma -47 +KPX Aacute d -17 +KPX Aacute e -21 +KPX Aacute g -27 +KPX Aacute guillemotleft -57 +KPX Aacute guilsinglleft -57 +KPX Aacute hyphen -35 +KPX Aacute o -22 +KPX Aacute period -70 +KPX Aacute q -27 +KPX Aacute quoteright -102 +KPX Aacute t -33 +KPX Aacute u -23 +KPX Aacute v -59 +KPX Aacute w -27 +KPX Aacute y -63 +KPX Acircumflex C -41 +KPX Acircumflex G -36 +KPX Acircumflex O -35 +KPX Acircumflex Q -37 +KPX Acircumflex T -34 +KPX Acircumflex U -41 +KPX Acircumflex V -78 +KPX Acircumflex W -20 +KPX Acircumflex Y -35 +KPX Acircumflex comma -47 +KPX Acircumflex period -70 +KPX Adieresis C -41 +KPX Adieresis G -36 +KPX Adieresis O -35 +KPX Adieresis Q -37 +KPX Adieresis T -34 +KPX Adieresis U -41 +KPX Adieresis V -78 +KPX Adieresis W -20 +KPX Adieresis Y -35 +KPX Adieresis a 1 +KPX Adieresis b 40 +KPX Adieresis c -26 +KPX Adieresis comma -47 +KPX Adieresis d -17 +KPX Adieresis g -27 +KPX Adieresis guillemotleft -57 +KPX Adieresis guilsinglleft -57 +KPX Adieresis hyphen -35 +KPX Adieresis o -22 +KPX Adieresis period -70 +KPX Adieresis q -27 +KPX Adieresis quotedblright -82 +KPX Adieresis quoteright -102 +KPX Adieresis t -33 +KPX Adieresis u -23 +KPX Adieresis v -59 +KPX Adieresis w -27 +KPX Adieresis y -63 +KPX Agrave C -41 +KPX Agrave G -36 +KPX Agrave O -35 +KPX Agrave Q -37 +KPX Agrave T -34 +KPX Agrave U -41 +KPX Agrave V -78 +KPX Agrave W -20 +KPX Agrave Y -35 +KPX Agrave comma -47 +KPX Agrave period -70 +KPX Aring C -41 +KPX Aring G -36 +KPX Aring O -35 +KPX Aring Q -37 +KPX Aring T -34 +KPX Aring U -41 +KPX Aring V -78 +KPX Aring W -20 +KPX Aring Y -35 +KPX Aring a 1 +KPX Aring b 40 +KPX Aring c -26 +KPX Aring comma -47 +KPX Aring d -17 +KPX Aring e -21 +KPX Aring g -27 +KPX Aring guillemotleft -57 +KPX Aring guilsinglleft -57 +KPX Aring hyphen -35 +KPX Aring o -22 +KPX Aring period -70 +KPX Aring q -27 +KPX Aring quotedblright -82 +KPX Aring quoteright -102 +KPX Aring t -33 +KPX Aring u -23 +KPX Aring v -59 +KPX Aring w -27 +KPX Aring y -63 +KPX Atilde C -41 +KPX Atilde G -36 +KPX Atilde O -35 +KPX Atilde Q -37 +KPX Atilde T -34 +KPX Atilde U -41 +KPX Atilde V -78 +KPX Atilde W -20 +KPX Atilde Y -35 +KPX Atilde comma -47 +KPX Atilde period -70 +KPX B A -15 +KPX B AE -16 +KPX B Aacute -15 +KPX B Acircumflex -15 +KPX B Adieresis -15 +KPX B Aring -15 +KPX B Atilde -15 +KPX B O -15 +KPX B OE 5 +KPX B Oacute -15 +KPX B Ocircumflex -15 +KPX B Odieresis -15 +KPX B Ograve -15 +KPX B Oslash -14 +KPX B V -37 +KPX B W -15 +KPX B Y -58 +KPX C A -14 +KPX C AE -14 +KPX C Aacute -14 +KPX C Adieresis -14 +KPX C Aring -14 +KPX C H -34 +KPX C K -19 +KPX C O -24 +KPX C Oacute -24 +KPX C Odieresis -24 +KPX Ccedilla A -8 +KPX D A -47 +KPX D Aacute -47 +KPX D Acircumflex -47 +KPX D Adieresis -47 +KPX D Agrave -47 +KPX D Aring -47 +KPX D Atilde -47 +KPX D J -38 +KPX D T -47 +KPX D V -50 +KPX D W -20 +KPX D X -60 +KPX D Y -71 +KPX F A -45 +KPX F Aacute -45 +KPX F Acircumflex -45 +KPX F Adieresis -45 +KPX F Agrave -45 +KPX F Aring -45 +KPX F Atilde -45 +KPX F J -100 +KPX F O -34 +KPX F Odieresis -34 +KPX F a -52 +KPX F aacute -52 +KPX F adieresis -49 +KPX F ae -25 +KPX F aring -52 +KPX F comma -172 +KPX F e -61 +KPX F eacute -61 +KPX F hyphen -72 +KPX F i -51 +KPX F j -59 +KPX F o -68 +KPX F oacute -68 +KPX F odieresis -54 +KPX F oe -26 +KPX F oslash -68 +KPX F period -196 +KPX F r -37 +KPX F u -6 +KPX G A 0 +KPX G AE 0 +KPX G Aacute 0 +KPX G Acircumflex 0 +KPX G Adieresis 0 +KPX G Agrave 0 +KPX G Aring 0 +KPX G Atilde 0 +KPX G T -31 +KPX G V -1 +KPX G W -4 +KPX G Y -22 +KPX J A -14 +KPX J AE -23 +KPX J Adieresis -14 +KPX J Aring -14 +KPX K C -50 +KPX K G -46 +KPX K O -45 +KPX K OE -28 +KPX K Oacute -45 +KPX K Odieresis -45 +KPX K S -16 +KPX K T -18 +KPX K a -8 +KPX K adieresis -8 +KPX K ae 19 +KPX K aring -8 +KPX K e -30 +KPX K hyphen -66 +KPX K o -32 +KPX K oacute -32 +KPX K odieresis -32 +KPX K u -33 +KPX K udieresis -33 +KPX K y -72 +KPX L A 9 +KPX L AE 9 +KPX L Aacute 9 +KPX L Adieresis 9 +KPX L Aring 9 +KPX L C -19 +KPX L Ccedilla -19 +KPX L G -18 +KPX L O -15 +KPX L Oacute -15 +KPX L Ocircumflex -15 +KPX L Odieresis -15 +KPX L Ograve -15 +KPX L Otilde -15 +KPX L S -31 +KPX L T -59 +KPX L U -36 +KPX L Udieresis -36 +KPX L V -71 +KPX L W -31 +KPX L Y -60 +KPX L hyphen -1 +KPX L quotedblright -76 +KPX L quoteright -84 +KPX L u -20 +KPX L udieresis -20 +KPX L y -50 +KPX N A -10 +KPX N AE -10 +KPX N Aacute -10 +KPX N Adieresis -10 +KPX N Aring -10 +KPX N C -18 +KPX N Ccedilla -18 +KPX N G -16 +KPX N O -14 +KPX N Oacute -14 +KPX N Odieresis -14 +KPX N a -23 +KPX N aacute -23 +KPX N adieresis -23 +KPX N ae 7 +KPX N aring -23 +KPX N comma -64 +KPX N e -10 +KPX N eacute -10 +KPX N o -14 +KPX N oacute -14 +KPX N odieresis -14 +KPX N oslash -11 +KPX N period -87 +KPX N u -14 +KPX N udieresis -14 +KPX O A -33 +KPX O AE -30 +KPX O Aacute -33 +KPX O Adieresis -33 +KPX O Aring -33 +KPX O T -37 +KPX O V -40 +KPX O W -8 +KPX O X -47 +KPX O Y -61 +KPX Oacute A -33 +KPX Oacute T -37 +KPX Oacute V -40 +KPX Oacute W -8 +KPX Oacute Y -61 +KPX Ocircumflex T -37 +KPX Ocircumflex V -40 +KPX Ocircumflex Y -61 +KPX Odieresis A -33 +KPX Odieresis T -37 +KPX Odieresis V -40 +KPX Odieresis W -8 +KPX Odieresis X -47 +KPX Odieresis Y -61 +KPX Ograve T -37 +KPX Ograve V -40 +KPX Ograve Y -61 +KPX Oslash A -31 +KPX Otilde T -36 +KPX Otilde V -39 +KPX Otilde Y -60 +KPX P A -87 +KPX P AE -81 +KPX P Aacute -87 +KPX P Adieresis -87 +KPX P Aring -87 +KPX P J -90 +KPX P a -57 +KPX P aacute -57 +KPX P adieresis -57 +KPX P ae -29 +KPX P aring -57 +KPX P comma -161 +KPX P e -47 +KPX P eacute -47 +KPX P hyphen -52 +KPX P o -53 +KPX P oacute -53 +KPX P odieresis -53 +KPX P oe -18 +KPX P oslash -53 +KPX P period -185 +KPX R C -32 +KPX R Ccedilla -33 +KPX R G -31 +KPX R O -29 +KPX R OE -8 +KPX R Oacute -29 +KPX R Odieresis -29 +KPX R T -35 +KPX R U -36 +KPX R Udieresis -36 +KPX R V -42 +KPX R W -21 +KPX R Y -36 +KPX R a 0 +KPX R aacute 0 +KPX R adieresis 0 +KPX R ae 27 +KPX R aring 0 +KPX R e -22 +KPX R eacute -22 +KPX R hyphen -53 +KPX R o -23 +KPX R oacute -23 +KPX R odieresis -23 +KPX R oe 15 +KPX R u -16 +KPX R uacute -16 +KPX R udieresis -16 +KPX R y -20 +KPX S A -28 +KPX S AE -28 +KPX S Aacute -28 +KPX S Adieresis -28 +KPX S Aring -28 +KPX S T -48 +KPX S V -18 +KPX S W -23 +KPX S Y -39 +KPX S t -25 +KPX T A -34 +KPX T AE -35 +KPX T Aacute -34 +KPX T Acircumflex -34 +KPX T Adieresis -34 +KPX T Agrave -34 +KPX T Aring -34 +KPX T Atilde -34 +KPX T C -36 +KPX T G -35 +KPX T J -88 +KPX T O -34 +KPX T OE -12 +KPX T Oacute -34 +KPX T Ocircumflex -34 +KPX T Odieresis -34 +KPX T Ograve -34 +KPX T Oslash -34 +KPX T Otilde -34 +KPX T S -50 +KPX T V 4 +KPX T W -1 +KPX T Y -17 +KPX T a -68 +KPX T ae -38 +KPX T c -83 +KPX T colon -145 +KPX T comma -116 +KPX T e -83 +KPX T g -76 +KPX T guillemotleft -129 +KPX T guilsinglleft -129 +KPX T hyphen -99 +KPX T i -51 +KPX T j -59 +KPX T o -87 +KPX T oslash -60 +KPX T period -145 +KPX T r -37 +KPX T s -70 +KPX T semicolon -119 +KPX T u -92 +KPX T v -98 +KPX T w -96 +KPX T y -108 +KPX U A -26 +KPX U AE -35 +KPX U Aacute -26 +KPX U Acircumflex -26 +KPX U Adieresis -26 +KPX U Aring -26 +KPX U Atilde -26 +KPX U comma -80 +KPX U m 3 +KPX U n -22 +KPX U p -5 +KPX U period -105 +KPX U r -47 +KPX Uacute A -26 +KPX Uacute comma -80 +KPX Uacute m 3 +KPX Uacute n -22 +KPX Uacute p -5 +KPX Uacute period -105 +KPX Uacute r -47 +KPX Ucircumflex A -26 +KPX Udieresis A -26 +KPX Udieresis b 17 +KPX Udieresis comma -80 +KPX Udieresis m 3 +KPX Udieresis n -22 +KPX Udieresis p -5 +KPX Udieresis period -105 +KPX Udieresis r -47 +KPX Ugrave A -26 +KPX V A -10 +KPX V AE -19 +KPX V Aacute -10 +KPX V Acircumflex -10 +KPX V Adieresis -10 +KPX V Agrave -10 +KPX V Aring -10 +KPX V Atilde -10 +KPX V C -39 +KPX V G -38 +KPX V O -37 +KPX V Oacute -37 +KPX V Ocircumflex -37 +KPX V Odieresis -37 +KPX V Ograve -37 +KPX V Oslash -38 +KPX V Otilde -38 +KPX V S -41 +KPX V T 4 +KPX V a -65 +KPX V ae -37 +KPX V colon -130 +KPX V comma -134 +KPX V e -56 +KPX V g -57 +KPX V guillemotleft -83 +KPX V guilsinglleft -83 +KPX V hyphen -49 +KPX V i -65 +KPX V o -60 +KPX V oslash -57 +KPX V period -158 +KPX V r -51 +KPX V semicolon -121 +KPX V u -20 +KPX V y -24 +KPX W A -16 +KPX W AE -21 +KPX W Aacute -16 +KPX W Acircumflex -16 +KPX W Adieresis -16 +KPX W Agrave -16 +KPX W Aring -16 +KPX W Atilde -16 +KPX W C -14 +KPX W G -12 +KPX W O -10 +KPX W Oacute -10 +KPX W Ocircumflex -10 +KPX W Odieresis -10 +KPX W Ograve -10 +KPX W Oslash -7 +KPX W Otilde -10 +KPX W S -29 +KPX W T -2 +KPX W a -24 +KPX W ae 6 +KPX W colon -93 +KPX W comma -71 +KPX W e -10 +KPX W g -11 +KPX W guillemotleft -38 +KPX W guilsinglleft -38 +KPX W hyphen -7 +KPX W i -48 +KPX W o -14 +KPX W oslash -11 +KPX W period -95 +KPX W r -34 +KPX W semicolon -74 +KPX W u -2 +KPX W y -6 +KPX X C -52 +KPX X O -48 +KPX X Odieresis -48 +KPX X Q -48 +KPX X a -14 +KPX X e -36 +KPX X hyphen -81 +KPX X o -38 +KPX X u -39 +KPX X y -57 +KPX Y A -31 +KPX Y AE -34 +KPX Y Aacute -31 +KPX Y Acircumflex -31 +KPX Y Adieresis -31 +KPX Y Agrave -31 +KPX Y Aring -31 +KPX Y Atilde -31 +KPX Y C -60 +KPX Y G -60 +KPX Y O -59 +KPX Y Oacute -59 +KPX Y Ocircumflex -59 +KPX Y Odieresis -59 +KPX Y Ograve -59 +KPX Y Oslash -59 +KPX Y Otilde -59 +KPX Y S -62 +KPX Y T -17 +KPX Y a -67 +KPX Y ae -40 +KPX Y colon -145 +KPX Y comma -116 +KPX Y e -81 +KPX Y g -84 +KPX Y guillemotleft -119 +KPX Y guilsinglleft -119 +KPX Y hyphen -96 +KPX Y i -63 +KPX Y o -86 +KPX Y oslash -59 +KPX Y p -39 +KPX Y period -144 +KPX Y semicolon -119 +KPX Y u -50 +KPX Y v -44 +KPX Z v -54 +KPX Z y -64 +KPX a j -93 +KPX a quoteright -60 +KPX a v -33 +KPX a w -23 +KPX a y -44 +KPX aacute v -33 +KPX aacute w -23 +KPX aacute y -44 +KPX adieresis v -33 +KPX adieresis w -23 +KPX adieresis y -44 +KPX ae v 16 +KPX ae w 16 +KPX ae y 5 +KPX agrave v -33 +KPX agrave w -23 +KPX agrave y -44 +KPX aring v -33 +KPX aring w -23 +KPX aring y -44 +KPX b v -17 +KPX b w 0 +KPX b y -28 +KPX c h -6 +KPX c k -12 +KPX comma one -148 +KPX comma quotedblright -123 +KPX comma quoteright -142 +KPX e quoteright -43 +KPX e t -34 +KPX e v -28 +KPX e w -20 +KPX e x -5 +KPX e y -39 +KPX eacute v -28 +KPX eacute w -20 +KPX eacute y -39 +KPX ecircumflex v -28 +KPX ecircumflex w -20 +KPX ecircumflex y -39 +KPX eight four -65 +KPX eight one -85 +KPX eight seven -77 +KPX f a -44 +KPX f aacute -44 +KPX f adieresis -26 +KPX f ae -17 +KPX f aring -44 +KPX f e -58 +KPX f eacute -58 +KPX f f -46 +KPX f i -40 +KPX f j -63 +KPX f l -31 +KPX f o -65 +KPX f oacute -65 +KPX f odieresis -31 +KPX f oe -23 +KPX f oslash -36 +KPX f quoteright -62 +KPX f s -46 +KPX f t -10 +KPX five four -56 +KPX five one -90 +KPX five seven -78 +KPX four four -68 +KPX four one -73 +KPX four seven -99 +KPX g a -14 +KPX g adieresis -14 +KPX g ae 13 +KPX g aring -14 +KPX g e -7 +KPX g eacute -7 +KPX g l -37 +KPX g oacute -12 +KPX g odieresis -12 +KPX g r -4 +KPX guillemotright A -50 +KPX guillemotright AE -46 +KPX guillemotright Aacute -50 +KPX guillemotright Adieresis -50 +KPX guillemotright Aring -50 +KPX guillemotright T -128 +KPX guillemotright V -80 +KPX guillemotright W -37 +KPX guillemotright Y -119 +KPX guilsinglright A -50 +KPX guilsinglright AE -46 +KPX guilsinglright Aacute -50 +KPX guilsinglright Adieresis -50 +KPX guilsinglright Aring -50 +KPX guilsinglright T -128 +KPX guilsinglright V -80 +KPX guilsinglright W -37 +KPX guilsinglright Y -119 +KPX h quoteright -52 +KPX h y -37 +KPX hyphen A -29 +KPX hyphen AE -23 +KPX hyphen Aacute -29 +KPX hyphen Adieresis -29 +KPX hyphen Aring -29 +KPX hyphen T -98 +KPX hyphen V -44 +KPX hyphen W -4 +KPX hyphen Y -95 +KPX i T -64 +KPX i j -146 +KPX k a -12 +KPX k aacute -12 +KPX k adieresis -12 +KPX k ae 15 +KPX k aring -12 +KPX k comma -60 +KPX k e -34 +KPX k eacute -34 +KPX k g -43 +KPX k hyphen -104 +KPX k o -35 +KPX k oacute -35 +KPX k odieresis -35 +KPX k period -89 +KPX k s -14 +KPX k u -7 +KPX k udieresis -7 +KPX l v -86 +KPX l y -96 +KPX m p 19 +KPX m v 7 +KPX m w 13 +KPX m y -3 +KPX n T -48 +KPX n p -8 +KPX n quoteright -50 +KPX n v -25 +KPX n w -14 +KPX n y -36 +KPX nine four -58 +KPX nine one -84 +KPX nine seven -75 +KPX o T -89 +KPX o quoteright -41 +KPX o t -24 +KPX o v -25 +KPX o w -7 +KPX o x -28 +KPX o y -36 +KPX oacute v -25 +KPX oacute w -7 +KPX oacute y -36 +KPX ocircumflex t -24 +KPX odieresis t -24 +KPX odieresis v -25 +KPX odieresis w -7 +KPX odieresis x -28 +KPX odieresis y -36 +KPX ograve v -25 +KPX ograve w -7 +KPX ograve y -36 +KPX one comma -99 +KPX one eight -94 +KPX one five -76 +KPX one four -127 +KPX one nine -81 +KPX one one -69 +KPX one period -128 +KPX one seven -147 +KPX one six -119 +KPX one three -69 +KPX one two -54 +KPX one zero -102 +KPX p t -20 +KPX p y -25 +KPX period one -125 +KPX period quotedblright -114 +KPX period quoteright -133 +KPX q c -4 +KPX q u 37 +KPX quotedblbase A -6 +KPX quotedblbase AE -6 +KPX quotedblbase T -82 +KPX quotedblbase V -85 +KPX quotedblbase W -24 +KPX quotedblbase Y -83 +KPX quotedblleft A -66 +KPX quotedblleft AE -57 +KPX quotedblleft Aacute -66 +KPX quotedblleft Adieresis -66 +KPX quotedblleft Aring -66 +KPX quotedblleft T -46 +KPX quotedblleft V -18 +KPX quotedblleft W -8 +KPX quotedblleft Y -46 +KPX quotedblright A -67 +KPX quotedblright AE -76 +KPX quotedblright Aacute -66 +KPX quotedblright Adieresis -66 +KPX quotedblright Aring -66 +KPX quotedblright T -53 +KPX quotedblright V -22 +KPX quotedblright W -26 +KPX quotedblright Y -43 +KPX quoteleft A -87 +KPX quoteleft AE -78 +KPX quoteleft Aacute -87 +KPX quoteleft Adieresis -87 +KPX quoteleft Aring -87 +KPX quoteleft T -67 +KPX quoteleft V -39 +KPX quoteleft W -29 +KPX quoteleft Y -67 +KPX quoteright A -145 +KPX quoteright AE -154 +KPX quoteright Aacute -145 +KPX quoteright Adieresis -145 +KPX quoteright Aring -145 +KPX quoteright comma -201 +KPX quoteright d -129 +KPX quoteright o -135 +KPX quoteright period -224 +KPX quoteright r -150 +KPX quoteright s -144 +KPX quoteright t -118 +KPX quoteright v -112 +KPX quoteright w -108 +KPX quoteright y -122 +KPX r a -26 +KPX r aacute -26 +KPX r acircumflex -26 +KPX r adieresis -26 +KPX r ae 1 +KPX r agrave -26 +KPX r aring -26 +KPX r c -26 +KPX r ccedilla -34 +KPX r colon -86 +KPX r comma -104 +KPX r d -18 +KPX r e -17 +KPX r eacute -17 +KPX r ecircumflex -17 +KPX r egrave -17 +KPX r f -24 +KPX r g -15 +KPX r h -24 +KPX r hyphen -125 +KPX r i -34 +KPX r j -42 +KPX r k -34 +KPX r l -51 +KPX r m 27 +KPX r n 0 +KPX r o -24 +KPX r oacute -24 +KPX r ocircumflex -24 +KPX r odieresis -24 +KPX r oe 13 +KPX r ograve -24 +KPX r oslash -24 +KPX r p 21 +KPX r period -133 +KPX r q -16 +KPX r quoteright -44 +KPX r r -20 +KPX r s -29 +KPX r semicolon -75 +KPX r t 11 +KPX r u 11 +KPX r v 17 +KPX r w 17 +KPX r x -4 +KPX r y 6 +KPX r z -23 +KPX s quoteright -51 +KPX s t -17 +KPX seven colon -154 +KPX seven comma -146 +KPX seven eight -86 +KPX seven five -91 +KPX seven four -116 +KPX seven one -74 +KPX seven period -169 +KPX seven seven -69 +KPX seven six -104 +KPX seven three -79 +KPX seven two -76 +KPX six four -52 +KPX six one -68 +KPX six seven -55 +KPX t S -40 +KPX t a -25 +KPX t aacute -25 +KPX t adieresis -25 +KPX t ae 2 +KPX t aring -25 +KPX t colon -107 +KPX t e -43 +KPX t eacute -43 +KPX t h -8 +KPX t o -45 +KPX t oacute -45 +KPX t odieresis -45 +KPX t quoteright -100 +KPX t semicolon -86 +KPX three four -58 +KPX three one -82 +KPX three seven -75 +KPX two four -97 +KPX two one -73 +KPX two seven -79 +KPX u quoteright -43 +KPX v a -9 +KPX v aacute -9 +KPX v acircumflex -9 +KPX v adieresis -9 +KPX v ae 17 +KPX v agrave -9 +KPX v aring -9 +KPX v atilde -9 +KPX v c -22 +KPX v colon -75 +KPX v comma -118 +KPX v e -17 +KPX v eacute -17 +KPX v ecircumflex -17 +KPX v egrave -17 +KPX v g -14 +KPX v hyphen -30 +KPX v l -87 +KPX v o -23 +KPX v oacute -23 +KPX v odieresis -23 +KPX v ograve -23 +KPX v oslash -23 +KPX v period -143 +KPX v s -22 +KPX v semicolon -66 +KPX w a -9 +KPX w aacute -9 +KPX w acircumflex -9 +KPX w adieresis -9 +KPX w ae 17 +KPX w agrave -9 +KPX w aring -9 +KPX w atilde -9 +KPX w c -12 +KPX w colon -75 +KPX w comma -75 +KPX w e -4 +KPX w eacute -4 +KPX w ecircumflex -4 +KPX w egrave -4 +KPX w g -6 +KPX w hyphen -4 +KPX w l -53 +KPX w o -9 +KPX w oacute -9 +KPX w odieresis -9 +KPX w ograve -9 +KPX w oslash -6 +KPX w period -99 +KPX w s -22 +KPX w semicolon -66 +KPX x a -8 +KPX x c -35 +KPX x e -30 +KPX x eacute -30 +KPX x o -31 +KPX x q -33 +KPX y a -20 +KPX y aacute -20 +KPX y acircumflex -20 +KPX y adieresis -20 +KPX y ae 6 +KPX y agrave -20 +KPX y aring -20 +KPX y atilde -20 +KPX y c -33 +KPX y colon -86 +KPX y comma -122 +KPX y e -28 +KPX y eacute -28 +KPX y ecircumflex -28 +KPX y egrave -28 +KPX y g -25 +KPX y hyphen -29 +KPX y l -98 +KPX y o -34 +KPX y oacute -34 +KPX y odieresis -34 +KPX y ograve -34 +KPX y oslash -34 +KPX y period -148 +KPX y s -33 +KPX y semicolon -77 +KPX zero four -64 +KPX zero one -91 +KPX zero seven -82 +EndKernPairs +EndKernData EndFontMetrics diff --git a/misc/gs_afm/Helv.afm b/misc/gs_afm/Helv.afm index 56de4d61bb..36133a4290 100644 --- a/misc/gs_afm/Helv.afm +++ b/misc/gs_afm/Helv.afm @@ -1,1257 +1,1341 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-ReguCond -FullName Nimbus Sans L Regular Condensed +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. +FontName NimbusSanL-Regu +FullName Nimbus Sans L Regular FamilyName Nimbus Sans L Weight Regular ItalicAngle 0.0 IsFixedPitch false -UnderlinePosition -100 +UnderlinePosition -151 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -136 -225 820 944 -CapHeight 718 -XHeight 523 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 228 ; N exclam ; B 74 0 153 718 ; -C 34 ; WX 291 ; N quotedbl ; B 57 463 234 718 ; -C 35 ; WX 456 ; N numbersign ; B 23 0 434 688 ; -C 36 ; WX 456 ; N dollar ; B 26 -115 426 775 ; -C 37 ; WX 729 ; N percent ; B 32 -19 697 703 ; -C 38 ; WX 547 ; N ampersand ; B 36 -15 529 718 ; -C 39 ; WX 182 ; N quoteright ; B 43 462 129 718 ; -C 40 ; WX 273 ; N parenleft ; B 56 -207 245 733 ; -C 41 ; WX 273 ; N parenright ; B 28 -207 217 733 ; -C 42 ; WX 319 ; N asterisk ; B 32 431 286 718 ; -C 43 ; WX 479 ; N plus ; B 32 0 447 505 ; -C 44 ; WX 228 ; N comma ; B 71 -147 157 107 ; -C 45 ; WX 273 ; N hyphen ; B 36 232 237 322 ; -C 46 ; WX 228 ; N period ; B 71 0 157 107 ; -C 47 ; WX 228 ; N slash ; B -14 -19 242 737 ; -C 48 ; WX 456 ; N zero ; B 30 -19 426 703 ; -C 49 ; WX 456 ; N one ; B 83 0 294 703 ; -C 50 ; WX 456 ; N two ; B 21 0 416 703 ; -C 51 ; WX 456 ; N three ; B 28 -19 428 703 ; -C 52 ; WX 456 ; N four ; B 20 0 429 703 ; -C 53 ; WX 456 ; N five ; B 26 -19 421 688 ; -C 54 ; WX 456 ; N six ; B 31 -19 425 703 ; -C 55 ; WX 456 ; N seven ; B 30 0 429 688 ; -C 56 ; WX 456 ; N eight ; B 31 -19 424 703 ; -C 57 ; WX 456 ; N nine ; B 34 -19 421 703 ; -C 58 ; WX 228 ; N colon ; B 71 0 157 516 ; -C 59 ; WX 228 ; N semicolon ; B 71 -147 157 516 ; -C 60 ; WX 479 ; N less ; B 39 10 440 496 ; -C 61 ; WX 479 ; N equal ; B 32 115 447 390 ; -C 62 ; WX 479 ; N greater ; B 39 10 440 496 ; -C 63 ; WX 456 ; N question ; B 46 0 403 727 ; -C 64 ; WX 832 ; N at ; B 121 -19 712 737 ; -C 65 ; WX 547 ; N A ; B 11 0 536 718 ; -C 66 ; WX 547 ; N B ; B 61 0 514 718 ; -C 67 ; WX 592 ; N C ; B 36 -19 558 737 ; -C 68 ; WX 592 ; N D ; B 66 0 553 718 ; -C 69 ; WX 547 ; N E ; B 71 0 505 718 ; -C 70 ; WX 501 ; N F ; B 71 0 478 718 ; -C 71 ; WX 638 ; N G ; B 39 -19 577 737 ; -C 72 ; WX 592 ; N H ; B 63 0 530 718 ; -C 73 ; WX 228 ; N I ; B 75 0 154 718 ; -C 74 ; WX 410 ; N J ; B 14 -19 351 718 ; -C 75 ; WX 547 ; N K ; B 62 0 544 718 ; -C 76 ; WX 456 ; N L ; B 62 0 440 718 ; -C 77 ; WX 683 ; N M ; B 60 0 624 718 ; -C 78 ; WX 592 ; N N ; B 62 0 530 718 ; -C 79 ; WX 638 ; N O ; B 32 -19 606 737 ; -C 80 ; WX 547 ; N P ; B 71 0 510 718 ; -C 81 ; WX 638 ; N Q ; B 32 -56 606 737 ; -C 82 ; WX 592 ; N R ; B 72 0 561 718 ; -C 83 ; WX 547 ; N S ; B 40 -19 508 737 ; -C 84 ; WX 501 ; N T ; B 11 0 490 718 ; -C 85 ; WX 592 ; N U ; B 65 -19 528 718 ; -C 86 ; WX 547 ; N V ; B 16 0 531 718 ; -C 87 ; WX 774 ; N W ; B 13 0 761 718 ; -C 88 ; WX 547 ; N X ; B 16 0 531 718 ; -C 89 ; WX 547 ; N Y ; B 11 0 535 718 ; -C 90 ; WX 501 ; N Z ; B 19 0 482 718 ; -C 91 ; WX 228 ; N bracketleft ; B 52 -196 205 722 ; -C 92 ; WX 228 ; N backslash ; B -14 -19 242 737 ; -C 93 ; WX 228 ; N bracketright ; B 23 -196 176 722 ; -C 94 ; WX 385 ; N asciicircum ; B -11 264 396 688 ; -C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ; -C 96 ; WX 182 ; N quoteleft ; B 53 469 139 725 ; -C 97 ; WX 456 ; N a ; B 30 -15 435 538 ; -C 98 ; WX 456 ; N b ; B 48 -15 424 718 ; -C 99 ; WX 410 ; N c ; B 25 -15 391 538 ; -C 100 ; WX 456 ; N d ; B 29 -15 409 718 ; -C 101 ; WX 456 ; N e ; B 33 -15 423 538 ; -C 102 ; WX 228 ; N f ; B 11 0 215 728 ; -C 103 ; WX 456 ; N g ; B 33 -220 409 538 ; -C 104 ; WX 456 ; N h ; B 53 0 403 718 ; -C 105 ; WX 182 ; N i ; B 55 0 127 718 ; -C 106 ; WX 182 ; N j ; B -13 -210 127 718 ; -C 107 ; WX 410 ; N k ; B 55 0 411 718 ; -C 108 ; WX 182 ; N l ; B 55 0 127 718 ; -C 109 ; WX 683 ; N m ; B 53 0 631 538 ; -C 110 ; WX 456 ; N n ; B 53 0 403 538 ; -C 111 ; WX 456 ; N o ; B 29 -14 427 538 ; -C 112 ; WX 456 ; N p ; B 48 -207 424 538 ; -C 113 ; WX 456 ; N q ; B 29 -207 405 538 ; -C 114 ; WX 273 ; N r ; B 63 0 272 538 ; -C 115 ; WX 410 ; N s ; B 26 -15 380 538 ; -C 116 ; WX 228 ; N t ; B 11 -7 211 669 ; -C 117 ; WX 456 ; N u ; B 56 -15 401 523 ; -C 118 ; WX 410 ; N v ; B 7 0 403 523 ; -C 119 ; WX 592 ; N w ; B 11 0 581 523 ; -C 120 ; WX 410 ; N x ; B 9 0 402 523 ; -C 121 ; WX 410 ; N y ; B 9 -214 401 523 ; -C 122 ; WX 410 ; N z ; B 25 0 385 523 ; -C 123 ; WX 274 ; N braceleft ; B 34 -196 239 722 ; -C 124 ; WX 213 ; N bar ; B 77 -19 137 737 ; -C 125 ; WX 274 ; N braceright ; B 34 -196 239 722 ; -C 126 ; WX 479 ; N asciitilde ; B 50 181 429 322 ; -C 161 ; WX 273 ; N exclamdown ; B 97 -195 176 523 ; -C 162 ; WX 456 ; N cent ; B 42 -115 421 623 ; -C 163 ; WX 456 ; N sterling ; B 27 -16 442 718 ; -C 164 ; WX 137 ; N fraction ; B -136 -19 273 703 ; -C 165 ; WX 456 ; N yen ; B 2 0 453 688 ; -C 166 ; WX 456 ; N florin ; B -9 -207 411 737 ; -C 167 ; WX 456 ; N section ; B 35 -191 420 737 ; -C 168 ; WX 456 ; N currency ; B 23 99 433 603 ; -C 169 ; WX 157 ; N quotesingle ; B 48 463 108 718 ; -C 170 ; WX 273 ; N quotedblleft ; B 31 469 252 725 ; -C 171 ; WX 456 ; N guillemotleft ; B 80 108 376 446 ; -C 172 ; WX 273 ; N guilsinglleft ; B 72 108 201 446 ; -C 173 ; WX 273 ; N guilsinglright ; B 72 108 201 446 ; -C 174 ; WX 410 ; N fi ; B 11 0 356 728 ; -C 175 ; WX 410 ; N fl ; B 11 0 354 728 ; -C 177 ; WX 456 ; N endash ; B 0 240 456 313 ; -C 178 ; WX 456 ; N dagger ; B 35 -159 421 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 35 -159 421 718 ; -C 180 ; WX 228 ; N periodcentered ; B 63 190 166 315 ; -C 182 ; WX 440 ; N paragraph ; B 15 -173 408 718 ; -C 183 ; WX 287 ; N bullet ; B 15 202 273 517 ; -C 184 ; WX 182 ; N quotesinglbase ; B 43 -149 129 107 ; -C 185 ; WX 273 ; N quotedblbase ; B 21 -149 242 107 ; -C 186 ; WX 273 ; N quotedblright ; B 21 462 242 718 ; -C 187 ; WX 456 ; N guillemotright ; B 80 108 376 446 ; -C 188 ; WX 820 ; N ellipsis ; B 94 0 726 107 ; -C 189 ; WX 820 ; N perthousand ; B 6 -19 815 703 ; -C 191 ; WX 501 ; N questiondown ; B 75 -201 432 525 ; -C 193 ; WX 273 ; N grave ; B 11 593 173 734 ; -C 194 ; WX 273 ; N acute ; B 100 593 262 734 ; -C 195 ; WX 273 ; N circumflex ; B 17 593 256 734 ; -C 196 ; WX 273 ; N tilde ; B -3 606 276 722 ; -C 197 ; WX 273 ; N macron ; B 8 627 265 684 ; -C 198 ; WX 273 ; N breve ; B 11 595 263 731 ; -C 199 ; WX 273 ; N dotaccent ; B 99 604 174 706 ; -C 200 ; WX 273 ; N dieresis ; B 33 604 240 706 ; -C 202 ; WX 273 ; N ring ; B 61 572 212 756 ; -C 203 ; WX 273 ; N cedilla ; B 37 -225 212 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 25 593 335 734 ; -C 206 ; WX 273 ; N ogonek ; B 60 -225 235 0 ; -C 207 ; WX 273 ; N caron ; B 17 593 256 734 ; -C 208 ; WX 820 ; N emdash ; B 0 240 820 313 ; -C 225 ; WX 820 ; N AE ; B 7 0 780 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 20 304 284 737 ; -C 232 ; WX 456 ; N Lslash ; B -16 0 440 718 ; -C 233 ; WX 638 ; N Oslash ; B 32 -19 607 737 ; -C 234 ; WX 820 ; N OE ; B 30 -19 791 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 20 304 280 737 ; -C 241 ; WX 729 ; N ae ; B 30 -15 695 538 ; -C 245 ; WX 228 ; N dotlessi ; B 78 0 150 523 ; -C 248 ; WX 182 ; N lslash ; B -16 0 198 718 ; -C 249 ; WX 501 ; N oslash ; B 23 -22 440 545 ; -C 250 ; WX 774 ; N oe ; B 29 -15 740 538 ; -C 251 ; WX 501 ; N germandbls ; B 55 -15 468 728 ; -C -1 ; WX 547 ; N Yacute ; B 11 0 535 929 ; -C -1 ; WX 592 ; N Ucircumflex ; B 65 -19 528 929 ; -C -1 ; WX 592 ; N Ugrave ; B 65 -19 528 929 ; -C -1 ; WX 501 ; N Zcaron ; B 19 0 482 929 ; -C -1 ; WX 547 ; N Ydieresis ; B 11 0 535 901 ; -C -1 ; WX 273 ; N threesuperior ; B 4 270 266 714 ; -C -1 ; WX 592 ; N Uacute ; B 65 -19 528 929 ; -C -1 ; WX 273 ; N twosuperior ; B 3 280 265 714 ; -C -1 ; WX 592 ; N Udieresis ; B 65 -19 528 901 ; -C -1 ; WX 228 ; N middot ; B 63 190 166 315 ; -C -1 ; WX 273 ; N onesuperior ; B 35 281 182 703 ; -C -1 ; WX 456 ; N aacute ; B 30 -15 435 734 ; -C -1 ; WX 456 ; N agrave ; B 30 -15 435 734 ; -C -1 ; WX 456 ; N acircumflex ; B 30 -15 435 734 ; -C -1 ; WX 547 ; N Scaron ; B 40 -19 508 929 ; -C -1 ; WX 638 ; N Otilde ; B 32 -19 606 917 ; -C -1 ; WX 273 ; N sfthyphen ; B 36 232 237 322 ; -C -1 ; WX 456 ; N atilde ; B 30 -15 435 722 ; -C -1 ; WX 456 ; N aring ; B 30 -15 435 769 ; -C -1 ; WX 456 ; N adieresis ; B 30 -15 435 706 ; -C -1 ; WX 638 ; N Ograve ; B 32 -19 606 929 ; -C -1 ; WX 638 ; N Ocircumflex ; B 32 -19 606 929 ; -C -1 ; WX 638 ; N Odieresis ; B 32 -19 606 901 ; -C -1 ; WX 592 ; N Ntilde ; B 62 0 530 917 ; -C -1 ; WX 456 ; N edieresis ; B 33 -15 423 706 ; -C -1 ; WX 456 ; N eacute ; B 33 -15 423 734 ; -C -1 ; WX 456 ; N egrave ; B 33 -15 423 734 ; -C -1 ; WX 228 ; N Icircumflex ; B -5 0 234 929 ; -C -1 ; WX 456 ; N ecircumflex ; B 33 -15 423 734 ; -C -1 ; WX 228 ; N Igrave ; B -11 0 153 929 ; -C -1 ; WX 228 ; N Iacute ; B 75 0 240 903 ; -C -1 ; WX 228 ; N Idieresis ; B 11 0 218 901 ; -C -1 ; WX 328 ; N degree ; B 44 411 284 703 ; -C -1 ; WX 547 ; N Ecircumflex ; B 71 0 505 929 ; -C -1 ; WX 479 ; N minus ; B 32 216 447 289 ; -C -1 ; WX 479 ; N multiply ; B 32 0 447 506 ; -C -1 ; WX 479 ; N divide ; B 32 -19 447 524 ; -C -1 ; WX 547 ; N Egrave ; B 71 0 505 929 ; -C -1 ; WX 820 ; N trademark ; B 38 306 740 718 ; -C -1 ; WX 638 ; N Oacute ; B 32 -19 606 929 ; -C -1 ; WX 456 ; N thorn ; B 48 -207 424 718 ; -C -1 ; WX 456 ; N eth ; B 29 -15 428 737 ; -C -1 ; WX 547 ; N Eacute ; B 71 0 505 929 ; -C -1 ; WX 410 ; N ccedilla ; B 25 -225 391 538 ; -C -1 ; WX 228 ; N idieresis ; B 11 0 218 706 ; -C -1 ; WX 228 ; N iacute ; B 78 0 240 734 ; -C -1 ; WX 228 ; N igrave ; B -11 0 151 734 ; -C -1 ; WX 479 ; N plusminus ; B 32 0 447 561 ; -C -1 ; WX 684 ; N onehalf ; B 35 -19 634 703 ; -C -1 ; WX 684 ; N onequarter ; B 60 -19 620 703 ; -C -1 ; WX 684 ; N threequarters ; B 37 -19 664 714 ; -C -1 ; WX 228 ; N icircumflex ; B -5 0 234 734 ; -C -1 ; WX 547 ; N Edieresis ; B 71 0 505 901 ; -C -1 ; WX 456 ; N ntilde ; B 53 0 403 722 ; -C -1 ; WX 547 ; N Aring ; B 11 0 536 944 ; -C -1 ; WX 456 ; N odieresis ; B 29 -14 427 706 ; -C -1 ; WX 456 ; N oacute ; B 29 -14 427 734 ; -C -1 ; WX 456 ; N ograve ; B 29 -14 427 734 ; -C -1 ; WX 456 ; N ocircumflex ; B 29 -14 427 734 ; -C -1 ; WX 456 ; N otilde ; B 29 -14 427 722 ; -C -1 ; WX 410 ; N scaron ; B 26 -15 380 734 ; -C -1 ; WX 456 ; N udieresis ; B 56 -15 401 706 ; -C -1 ; WX 456 ; N uacute ; B 56 -15 401 734 ; -C -1 ; WX 456 ; N ugrave ; B 56 -15 401 734 ; -C -1 ; WX 456 ; N ucircumflex ; B 56 -15 401 734 ; -C -1 ; WX 410 ; N yacute ; B 9 -214 401 734 ; -C -1 ; WX 410 ; N zcaron ; B 25 0 385 734 ; -C -1 ; WX 410 ; N ydieresis ; B 9 -214 401 706 ; -C -1 ; WX 604 ; N copyright ; B -11 -19 617 737 ; -C -1 ; WX 604 ; N registered ; B -11 -19 617 737 ; -C -1 ; WX 547 ; N Atilde ; B 11 0 536 917 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 36 -225 558 737 ; -C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ; -C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ; -C -1 ; WX 479 ; N logicalnot ; B 32 108 447 390 ; -C -1 ; WX 547 ; N Aacute ; B 11 0 536 929 ; -C -1 ; WX 592 ; N Eth ; B 0 0 553 718 ; -C -1 ; WX 213 ; N brokenbar ; B 77 -19 137 737 ; -C -1 ; WX 547 ; N Thorn ; B 71 0 510 718 ; -C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ; -C -1 ; WX 456 ; N mu ; B 56 -207 401 523 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; +FontBBox -174 -285 1001 953 +CapHeight 729 +XHeight 524 +Descender -218 +Ascender 729 +StartCharMetrics 316 +C 32 ; WX 278 ; N space ; B 191 0 191 0 ; +C 33 ; WX 278 ; N exclam ; B 124 0 208 729 ; +C 34 ; WX 355 ; N quotedbl ; B 52 464 305 709 ; +C 35 ; WX 556 ; N numbersign ; B 14 -20 542 697 ; +C 36 ; WX 556 ; N dollar ; B 26 -126 518 770 ; +C 37 ; WX 889 ; N percent ; B 29 -20 859 709 ; +C 38 ; WX 667 ; N ampersand ; B 52 -23 637 709 ; +C 39 ; WX 221 ; N quoteright ; B 64 497 157 729 ; +C 40 ; WX 333 ; N parenleft ; B 73 -212 291 729 ; +C 41 ; WX 333 ; N parenright ; B 38 -212 256 729 ; +C 42 ; WX 389 ; N asterisk ; B 40 441 343 729 ; +C 43 ; WX 584 ; N plus ; B 50 -10 534 474 ; +C 44 ; WX 278 ; N comma ; B 87 -147 192 104 ; +C 45 ; WX 333 ; N hyphen ; B 46 240 284 312 ; +C 46 ; WX 278 ; N period ; B 87 0 191 104 ; +C 47 ; WX 278 ; N slash ; B -8 -20 284 729 ; +C 48 ; WX 556 ; N zero ; B 43 -23 507 709 ; +C 49 ; WX 556 ; N one ; B 102 0 347 709 ; +C 50 ; WX 556 ; N two ; B 34 0 511 709 ; +C 51 ; WX 556 ; N three ; B 32 -23 506 709 ; +C 52 ; WX 556 ; N four ; B 28 0 520 709 ; +C 53 ; WX 556 ; N five ; B 35 -23 513 709 ; +C 54 ; WX 556 ; N six ; B 43 -23 513 709 ; +C 55 ; WX 556 ; N seven ; B 46 0 520 709 ; +C 56 ; WX 556 ; N eight ; B 37 -23 513 709 ; +C 57 ; WX 556 ; N nine ; B 38 -23 509 709 ; +C 58 ; WX 278 ; N colon ; B 110 0 214 524 ; +C 59 ; WX 278 ; N semicolon ; B 110 -147 215 524 ; +C 60 ; WX 584 ; N less ; B 45 -9 534 474 ; +C 61 ; WX 584 ; N equal ; B 50 111 534 353 ; +C 62 ; WX 584 ; N greater ; B 50 -9 539 474 ; +C 63 ; WX 556 ; N question ; B 77 0 509 741 ; +C 64 ; WX 1015 ; N at ; B 34 -142 951 741 ; +C 65 ; WX 667 ; N A ; B 17 0 653 729 ; +C 66 ; WX 667 ; N B ; B 79 0 623 729 ; +C 67 ; WX 722 ; N C ; B 48 -23 677 741 ; +C 68 ; WX 722 ; N D ; B 89 0 667 729 ; +C 69 ; WX 667 ; N E ; B 90 0 613 729 ; +C 70 ; WX 611 ; N F ; B 90 0 579 729 ; +C 71 ; WX 778 ; N G ; B 44 -23 709 741 ; +C 72 ; WX 722 ; N H ; B 83 0 644 729 ; +C 73 ; WX 278 ; N I ; B 100 0 194 729 ; +C 74 ; WX 500 ; N J ; B 17 -23 426 729 ; +C 75 ; WX 667 ; N K ; B 79 0 658 729 ; +C 76 ; WX 556 ; N L ; B 80 0 533 729 ; +C 77 ; WX 833 ; N M ; B 75 0 761 729 ; +C 78 ; WX 722 ; N N ; B 76 0 646 729 ; +C 79 ; WX 778 ; N O ; B 38 -23 742 741 ; +C 80 ; WX 667 ; N P ; B 91 0 617 729 ; +C 81 ; WX 778 ; N Q ; B 38 -59 742 741 ; +C 82 ; WX 722 ; N R ; B 93 0 679 729 ; +C 83 ; WX 667 ; N S ; B 48 -23 621 741 ; +C 84 ; WX 611 ; N T ; B 21 0 593 729 ; +C 85 ; WX 722 ; N U ; B 85 -23 645 729 ; +C 86 ; WX 667 ; N V ; B 30 0 645 729 ; +C 87 ; WX 944 ; N W ; B 22 0 929 729 ; +C 88 ; WX 667 ; N X ; B 22 0 649 729 ; +C 89 ; WX 667 ; N Y ; B 13 0 661 729 ; +C 90 ; WX 611 ; N Z ; B 28 0 583 729 ; +C 91 ; WX 278 ; N bracketleft ; B 64 -212 250 729 ; +C 92 ; WX 278 ; N backslash ; B -8 -20 284 729 ; +C 93 ; WX 278 ; N bracketright ; B 23 -212 209 729 ; +C 94 ; WX 469 ; N asciicircum ; B 44 329 425 709 ; +C 95 ; WX 556 ; N underscore ; B -22 -176 578 -126 ; +C 96 ; WX 222 ; N quoteleft ; B 65 477 158 709 ; +C 97 ; WX 556 ; N a ; B 42 -23 535 539 ; +C 98 ; WX 556 ; N b ; B 54 -23 523 729 ; +C 99 ; WX 500 ; N c ; B 31 -23 477 539 ; +C 100 ; WX 556 ; N d ; B 26 -23 495 729 ; +C 101 ; WX 556 ; N e ; B 40 -23 513 539 ; +C 102 ; WX 278 ; N f ; B 18 0 258 732 ; +C 103 ; WX 556 ; N g ; B 29 -218 489 539 ; +C 104 ; WX 556 ; N h ; B 70 0 486 729 ; +C 105 ; WX 222 ; N i ; B 66 0 150 729 ; +C 106 ; WX 222 ; N j ; B -18 -218 153 729 ; +C 107 ; WX 500 ; N k ; B 58 0 502 729 ; +C 108 ; WX 222 ; N l ; B 68 0 152 729 ; +C 109 ; WX 833 ; N m ; B 70 0 762 539 ; +C 110 ; WX 556 ; N n ; B 70 0 487 539 ; +C 111 ; WX 556 ; N o ; B 36 -23 510 539 ; +C 112 ; WX 556 ; N p ; B 54 -218 523 539 ; +C 113 ; WX 556 ; N q ; B 26 -218 495 539 ; +C 114 ; WX 333 ; N r ; B 69 0 321 539 ; +C 115 ; WX 500 ; N s ; B 34 -23 459 539 ; +C 116 ; WX 278 ; N t ; B 14 -23 254 668 ; +C 117 ; WX 556 ; N u ; B 65 -23 482 524 ; +C 118 ; WX 500 ; N v ; B 10 0 486 524 ; +C 119 ; WX 722 ; N w ; B 6 0 708 524 ; +C 120 ; WX 500 ; N x ; B 17 0 473 524 ; +C 121 ; WX 500 ; N y ; B 20 -218 478 524 ; +C 122 ; WX 500 ; N z ; B 31 0 457 524 ; +C 123 ; WX 334 ; N braceleft ; B 43 -212 276 729 ; +C 124 ; WX 260 ; N bar ; B 100 -212 160 729 ; +C 125 ; WX 334 ; N braceright ; B 29 -212 262 729 ; +C 126 ; WX 584 ; N asciitilde ; B 75 268 508 438 ; +C 161 ; WX 333 ; N exclamdown ; B 121 -205 205 524 ; +C 162 ; WX 556 ; N cent ; B 52 -120 510 628 ; +C 163 ; WX 556 ; N sterling ; B 26 -23 535 729 ; +C 164 ; WX 167 ; N fraction ; B -174 -20 336 709 ; +C 165 ; WX 556 ; N yen ; B 11 0 545 709 ; +C 166 ; WX 556 ; N florin ; B 11 -212 542 738 ; +C 167 ; WX 556 ; N section ; B 43 -213 506 729 ; +C 168 ; WX 556 ; N currency ; B 67 133 489 551 ; +C 169 ; WX 191 ; N quotesingle ; B 48 464 142 709 ; +C 170 ; WX 333 ; N quotedblleft ; B 48 477 299 709 ; +C 171 ; WX 556 ; N guillemotleft ; B 98 106 455 438 ; +C 172 ; WX 333 ; N guilsinglleft ; B 91 106 243 438 ; +C 173 ; WX 333 ; N guilsinglright ; B 85 106 239 438 ; +C 174 ; WX 500 ; N fi ; B 12 0 436 732 ; +C 175 ; WX 500 ; N fl ; B 17 0 430 732 ; +C 177 ; WX 556 ; N endash ; B -5 240 561 312 ; +C 178 ; WX 556 ; N dagger ; B 38 -177 513 709 ; +C 179 ; WX 556 ; N daggerdbl ; B 38 -177 513 709 ; +C 180 ; WX 278 ; N periodcentered ; B 87 302 211 427 ; +C 182 ; WX 537 ; N paragraph ; B 48 -177 522 729 ; +C 183 ; WX 350 ; N bullet ; B 50 220 300 470 ; +C 184 ; WX 222 ; N quotesinglbase ; B 64 -128 158 104 ; +C 185 ; WX 333 ; N quotedblbase ; B 47 -128 300 104 ; +C 186 ; WX 333 ; N quotedblright ; B 49 477 302 709 ; +C 187 ; WX 556 ; N guillemotright ; B 98 106 451 438 ; +C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 104 ; +C 189 ; WX 1000 ; N perthousand ; B 9 -22 993 738 ; +C 191 ; WX 611 ; N questiondown ; B 95 -217 528 524 ; +C 193 ; WX 333 ; N grave ; B 22 592 231 740 ; +C 194 ; WX 333 ; N acute ; B 92 592 301 740 ; +C 195 ; WX 333 ; N circumflex ; B 20 591 307 741 ; +C 196 ; WX 333 ; N tilde ; B 5 613 319 717 ; +C 197 ; WX 333 ; N macron ; B 28 631 302 701 ; +C 198 ; WX 333 ; N breve ; B 15 597 316 732 ; +C 199 ; WX 333 ; N dotaccent ; B 115 612 219 716 ; +C 200 ; WX 333 ; N dieresis ; B 30 612 296 715 ; +C 202 ; WX 333 ; N ring ; B 79 579 255 754 ; +C 203 ; WX 333 ; N cedilla ; B 39 -214 287 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B -35 590 348 740 ; +C 206 ; WX 333 ; N ogonek ; B 57 -205 265 0 ; +C 207 ; WX 333 ; N caron ; B 19 591 306 741 ; +C 208 ; WX 1000 ; N emdash ; B -9 240 1001 312 ; +C 225 ; WX 1000 ; N AE ; B 11 0 950 729 ; +C 227 ; WX 370 ; N ordfeminine ; B 37 303 333 742 ; +C 232 ; WX 556 ; N Lslash ; B 0 0 552 729 ; +C 233 ; WX 778 ; N Oslash ; B 30 -23 744 755 ; +C 234 ; WX 1000 ; N OE ; B 43 -20 959 741 ; +C 235 ; WX 365 ; N ordmasculine ; B 40 303 324 742 ; +C 241 ; WX 889 ; N ae ; B 34 -23 845 539 ; +C 245 ; WX 278 ; N dotlessi ; B 94 0 178 524 ; +C 248 ; WX 222 ; N lslash ; B 0 0 212 729 ; +C 249 ; WX 611 ; N oslash ; B 18 -30 529 539 ; +C 250 ; WX 944 ; N oe ; B 40 -23 899 539 ; +C 251 ; WX 611 ; N germandbls ; B 126 -20 566 729 ; +C -1 ; WX 722 ; N Udieresis ; B 85 -23 645 914 ; +C -1 ; WX 722 ; N Uacute ; B 85 -23 645 939 ; +C -1 ; WX 667 ; N Scedilla ; B 45 -214 621 741 ; +C -1 ; WX 611 ; N Tcaron ; B 21 0 593 940 ; +C -1 ; WX 667 ; N Scaron ; B 48 -23 621 940 ; +C -1 ; WX 722 ; N Rcaron ; B 93 0 679 940 ; +C -1 ; WX 722 ; N Racute ; B 93 0 679 939 ; +C -1 ; WX 667 ; N Sacute ; B 48 -23 621 939 ; +C -1 ; WX 778 ; N Otilde ; B 38 -23 742 916 ; +C -1 ; WX 556 ; N ucircumflex ; B 65 -23 482 741 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 38 -23 742 939 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 85 -23 645 939 ; +C -1 ; WX 666 ; N Yacute ; B 13 0 661 939 ; +C -1 ; WX 722 ; N Eth ; B 20 0 667 729 ; +C -1 ; WX 722 ; N Dcroat ; B 20 0 667 729 ; +C -1 ; WX 611 ; N Zacute ; B 28 0 583 939 ; +C -1 ; WX 722 ; N Uring ; B 85 -23 645 953 ; +C -1 ; WX 556 ; N gbreve ; B 29 -218 489 732 ; +C -1 ; WX 556 ; N eogonek ; B 40 -204 514 539 ; +C -1 ; WX 556 ; N edotaccent ; B 40 -23 513 716 ; +C -1 ; WX 556 ; N ecaron ; B 40 -23 513 741 ; +C -1 ; WX 722 ; N Ugrave ; B 85 -23 645 939 ; +C -1 ; WX 666 ; N Thorn ; B 91 0 616 729 ; +C -1 ; WX 556 ; N eacute ; B 40 -23 513 740 ; +C -1 ; WX 556 ; N edieresis ; B 40 -23 513 715 ; +C -1 ; WX 635 ; N dcaron ; B 26 -23 648 729 ; +C -1 ; WX 500 ; N ccedilla ; B 31 -214 477 539 ; +C -1 ; WX 500 ; N ccaron ; B 31 -23 477 741 ; +C -1 ; WX 500 ; N cacute ; B 31 -23 477 740 ; +C -1 ; WX 556 ; N aogonek ; B 43 -205 596 539 ; +C -1 ; WX 556 ; N aring ; B 42 -23 535 754 ; +C -1 ; WX 556 ; N atilde ; B 42 -23 535 717 ; +C -1 ; WX 556 ; N abreve ; B 42 -23 535 732 ; +C -1 ; WX 556 ; N egrave ; B 40 -23 513 740 ; +C -1 ; WX 556 ; N agrave ; B 42 -23 535 740 ; +C -1 ; WX 556 ; N aacute ; B 42 -23 535 740 ; +C -1 ; WX 556 ; N adieresis ; B 42 -23 535 715 ; +C -1 ; WX 722 ; N Uogonek ; B 85 -205 645 729 ; +C -1 ; WX 556 ; N ugrave ; B 65 -23 482 740 ; +C -1 ; WX 556 ; N uacute ; B 65 -23 482 740 ; +C -1 ; WX 556 ; N udieresis ; B 65 -23 482 715 ; +C -1 ; WX 308 ; N tcaron ; B 14 -23 321 800 ; +C -1 ; WX 500 ; N scommaaccent ; B 34 -285 459 539 ; +C -1 ; WX 611 ; N Zcaron ; B 28 0 583 940 ; +C -1 ; WX 556 ; N ecircumflex ; B 40 -23 513 741 ; +C -1 ; WX 722 ; N Ucircumflex ; B 85 -23 645 940 ; +C -1 ; WX 556 ; N acircumflex ; B 42 -23 535 741 ; +C -1 ; WX 611 ; N Zdotaccent ; B 28 0 583 915 ; +C -1 ; WX 500 ; N scaron ; B 34 -23 459 741 ; +C -1 ; WX 667 ; N Amacron ; B 17 0 653 900 ; +C -1 ; WX 500 ; N sacute ; B 34 -23 459 740 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 21 -285 593 729 ; +C -1 ; WX 667 ; N Ydieresis ; B 13 0 661 914 ; +C -1 ; WX 555 ; N thorn ; B 54 -218 522 714 ; +C -1 ; WX 667 ; N Emacron ; B 90 0 613 900 ; +C -1 ; WX 778 ; N Ograve ; B 38 -23 742 939 ; +C -1 ; WX 778 ; N Oacute ; B 38 -23 742 939 ; +C -1 ; WX 778 ; N Odieresis ; B 38 -23 742 914 ; +C -1 ; WX 722 ; N Ntilde ; B 76 0 646 916 ; +C -1 ; WX 722 ; N Ncaron ; B 76 0 646 940 ; +C -1 ; WX 722 ; N Nacute ; B 76 0 646 939 ; +C -1 ; WX 556 ; N Lcaron ; B 80 0 533 729 ; +C -1 ; WX 556 ; N Lacute ; B 70 0 533 939 ; +C -1 ; WX 278 ; N Idotaccent ; B 92 0 196 915 ; +C -1 ; WX 333 ; N racute ; B 69 0 331 740 ; +C -1 ; WX 278 ; N Icircumflex ; B -1 0 286 940 ; +C -1 ; WX 556 ; N ohungarumlaut ; B 36 -23 526 740 ; +C -1 ; WX 556 ; N otilde ; B 36 -23 510 717 ; +C -1 ; WX 556 ; N Euro ; B 2 -23 543 709 ; +C -1 ; WX 556 ; N ocircumflex ; B 36 -23 510 741 ; +C -1 ; WX 351 ; N onesuperior ; B 61 284 222 709 ; +C -1 ; WX 351 ; N twosuperior ; B 19 284 326 709 ; +C -1 ; WX 351 ; N threesuperior ; B 16 270 322 709 ; +C -1 ; WX 278 ; N Igrave ; B 1 0 210 939 ; +C -1 ; WX 278 ; N Iacute ; B 71 0 280 939 ; +C -1 ; WX 278 ; N Imacron ; B 20 0 274 900 ; +C -1 ; WX 278 ; N Iogonek ; B 66 -204 234 729 ; +C -1 ; WX 278 ; N Idieresis ; B 9 0 275 907 ; +C -1 ; WX 778 ; N Gbreve ; B 44 -23 709 931 ; +C -1 ; WX 722 ; N Umacron ; B 85 -23 645 900 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 79 -285 658 729 ; +C -1 ; WX 556 ; N ograve ; B 36 -23 510 740 ; +C -1 ; WX 667 ; N Scommaaccent ; B 48 -285 621 741 ; +C -1 ; WX 667 ; N Eogonek ; B 90 -205 652 729 ; +C -1 ; WX 556 ; N oacute ; B 36 -23 510 740 ; +C -1 ; WX 667 ; N Edotaccent ; B 90 0 613 915 ; +C -1 ; WX 222 ; N iogonek ; B 25 -204 190 729 ; +C -1 ; WX 556 ; N gcommaaccent ; B 29 -218 489 817 ; +C -1 ; WX 556 ; N odieresis ; B 36 -23 510 715 ; +C -1 ; WX 556 ; N ntilde ; B 70 0 487 717 ; +C -1 ; WX 556 ; N ncaron ; B 70 0 487 741 ; +C -1 ; WX 667 ; N Ecaron ; B 90 0 613 940 ; +C -1 ; WX 667 ; N Ecircumflex ; B 90 0 613 940 ; +C -1 ; WX 500 ; N scedilla ; B 34 -214 459 539 ; +C -1 ; WX 333 ; N rcaron ; B 48 0 335 741 ; +C -1 ; WX 667 ; N Egrave ; B 90 0 613 939 ; +C -1 ; WX 667 ; N Eacute ; B 90 0 613 939 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 44 -285 709 741 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 93 -285 679 729 ; +C -1 ; WX 667 ; N Edieresis ; B 90 0 613 914 ; +C -1 ; WX 556 ; N nacute ; B 70 0 487 740 ; +C -1 ; WX 556 ; N uogonek ; B 65 -204 521 524 ; +C -1 ; WX 556 ; N umacron ; B 65 -23 482 701 ; +C -1 ; WX 722 ; N Dcaron ; B 89 0 667 940 ; +C -1 ; WX 292 ; N lcaron ; B 68 0 305 729 ; +C -1 ; WX 722 ; N Ccaron ; B 48 -23 677 940 ; +C -1 ; WX 722 ; N Cacute ; B 48 -23 677 939 ; +C -1 ; WX 722 ; N Ccedilla ; B 48 -214 677 741 ; +C -1 ; WX 606 ; N degree ; B 151 383 454 686 ; +C -1 ; WX 667 ; N Aogonek ; B 17 -205 692 729 ; +C -1 ; WX 584 ; N minus ; B 40 197 544 267 ; +C -1 ; WX 584 ; N multiply ; B 95 34 488 427 ; +C -1 ; WX 584 ; N divide ; B 50 0 534 472 ; +C -1 ; WX 667 ; N Aring ; B 17 0 653 953 ; +C -1 ; WX 1000 ; N trademark ; B 63 292 938 729 ; +C -1 ; WX 333 ; N rcommaaccent ; B 65 -285 321 539 ; +C -1 ; WX 222 ; N lacute ; B 63 0 272 939 ; +C -1 ; WX 556 ; N omacron ; B 36 -23 510 701 ; +C -1 ; WX 667 ; N Atilde ; B 17 0 653 916 ; +C -1 ; WX 278 ; N icircumflex ; B -7 0 280 741 ; +C -1 ; WX 278 ; N igrave ; B -5 0 204 740 ; +C -1 ; WX 556 ; N ncommaaccent ; B 70 -285 487 539 ; +C -1 ; WX 222 ; N lcommaaccent ; B 63 -285 163 729 ; +C -1 ; WX 584 ; N plusminus ; B 50 -11 534 623 ; +C -1 ; WX 869 ; N onehalf ; B 61 -20 844 709 ; +C -1 ; WX 869 ; N onequarter ; B 61 -20 849 709 ; +C -1 ; WX 869 ; N threequarters ; B 16 -20 849 709 ; +C -1 ; WX 278 ; N iacute ; B 65 0 274 740 ; +C -1 ; WX 667 ; N Abreve ; B 17 0 653 931 ; +C -1 ; WX 500 ; N kcommaaccent ; B 58 -285 502 729 ; +C -1 ; WX 778 ; N Omacron ; B 38 -23 742 900 ; +C -1 ; WX 222 ; N imacron ; B -16 0 231 701 ; +C -1 ; WX 556 ; N emacron ; B 40 -23 513 701 ; +C -1 ; WX 556 ; N amacron ; B 42 -23 535 701 ; +C -1 ; WX 278 ; N tcommaaccent ; B 14 -285 254 668 ; +C -1 ; WX 500 ; N ydieresis ; B 20 -218 478 715 ; +C -1 ; WX 500 ; N zdotaccent ; B 31 0 457 716 ; +C -1 ; WX 500 ; N zcaron ; B 31 0 457 741 ; +C -1 ; WX 500 ; N zacute ; B 31 0 457 740 ; +C -1 ; WX 500 ; N yacute ; B 20 -218 478 740 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 65 -23 530 740 ; +C -1 ; WX 556 ; N eth ; B 36 -23 510 743 ; +C -1 ; WX 556 ; N uring ; B 65 -23 482 754 ; +C -1 ; WX 778 ; N Ocircumflex ; B 38 -23 742 940 ; +C -1 ; WX 333 ; N commaaccent ; B 116 -285 216 -60 ; +C -1 ; WX 737 ; N copyright ; B -13 -22 751 742 ; +C -1 ; WX 737 ; N registered ; B -13 -22 751 742 ; +C -1 ; WX 667 ; N Acircumflex ; B 17 0 653 940 ; +C -1 ; WX 278 ; N idieresis ; B 3 0 269 708 ; +C -1 ; WX 489 ; N lozenge ; B 16 0 462 744 ; +C -1 ; WX 711 ; N Delta ; B 10 0 701 729 ; +C -1 ; WX 548 ; N notequal ; B 32 -25 516 486 ; +C -1 ; WX 542 ; N radical ; B 7 -36 512 913 ; +C -1 ; WX 667 ; N Agrave ; B 17 0 653 939 ; +C -1 ; WX 667 ; N Aacute ; B 17 0 653 939 ; +C -1 ; WX 584 ; N lessequal ; B 45 -11 534 639 ; +C -1 ; WX 584 ; N greaterequal ; B 45 -11 534 639 ; +C -1 ; WX 584 ; N logicalnot ; B 40 86 544 375 ; +C -1 ; WX 711 ; N summation ; B 17 -97 694 760 ; +C -1 ; WX 490 ; N partialdiff ; B 22 -15 458 750 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 76 -285 646 729 ; +C -1 ; WX 556 ; N dcroat ; B 26 -23 557 729 ; +C -1 ; WX 260 ; N brokenbar ; B 100 -212 160 729 ; +C -1 ; WX 556 ; N Lcommaaccent ; B 80 -285 533 729 ; +C -1 ; WX 667 ; N Adieresis ; B 17 0 653 914 ; +C -1 ; WX 556 ; N mu ; B 65 -220 544 524 ; +C -1 ; WX 278 ; N .notdef ; B 191 0 191 0 ; EndCharMetrics StartKernData StartKernPairs 998 -KPX A C -28 -KPX A Ccedilla -29 -KPX A G -30 -KPX A O -28 -KPX A Odieresis -28 -KPX A Q -28 -KPX A T -74 -KPX A U -29 -KPX A Uacute -29 -KPX A Ucircumflex -29 -KPX A Udieresis -29 -KPX A Ugrave -29 -KPX A V -56 -KPX A W -39 -KPX A Y -78 -KPX A a -3 -KPX A b 0 -KPX A c -10 -KPX A ccedilla -11 +KPX A C -36 +KPX A Ccedilla -36 +KPX A G -35 +KPX A O -33 +KPX A Odieresis -33 +KPX A Q -32 +KPX A T -93 +KPX A U -37 +KPX A Uacute -37 +KPX A Ucircumflex -37 +KPX A Udieresis -37 +KPX A Ugrave -37 +KPX A V -75 +KPX A W -51 +KPX A Y -99 +KPX A a -4 +KPX A b 4 +KPX A c -11 +KPX A ccedilla -10 KPX A comma 5 -KPX A d -11 -KPX A e -14 -KPX A g -14 -KPX A guillemotleft -40 -KPX A guilsinglleft -36 -KPX A hyphen -2 -KPX A o -14 +KPX A d -8 +KPX A e -16 +KPX A g -10 +KPX A guillemotleft -44 +KPX A guilsinglleft -40 +KPX A hyphen -3 +KPX A o -13 KPX A period 5 -KPX A q -11 -KPX A quotedblright -37 -KPX A quoteright -48 -KPX A t -15 +KPX A q -8 +KPX A quotedblright -56 +KPX A quoteright -65 +KPX A t -16 KPX A u -12 -KPX A v -27 +KPX A v -31 KPX A w -21 -KPX A y -28 -KPX Aacute C -28 -KPX Aacute G -30 -KPX Aacute O -28 -KPX Aacute Q -28 -KPX Aacute T -74 -KPX Aacute U -29 -KPX Aacute V -56 -KPX Aacute W -39 -KPX Aacute Y -78 -KPX Aacute a -3 -KPX Aacute b 0 -KPX Aacute c -10 +KPX A y -34 +KPX Aacute C -36 +KPX Aacute G -35 +KPX Aacute O -33 +KPX Aacute Q -32 +KPX Aacute T -93 +KPX Aacute U -37 +KPX Aacute V -75 +KPX Aacute W -51 +KPX Aacute Y -99 +KPX Aacute a -4 +KPX Aacute b 4 +KPX Aacute c -11 KPX Aacute comma 5 -KPX Aacute d -11 -KPX Aacute e -14 -KPX Aacute g -14 -KPX Aacute guillemotleft -40 -KPX Aacute guilsinglleft -36 -KPX Aacute hyphen -2 -KPX Aacute o -14 +KPX Aacute d -8 +KPX Aacute e -16 +KPX Aacute g -10 +KPX Aacute guillemotleft -44 +KPX Aacute guilsinglleft -40 +KPX Aacute hyphen -3 +KPX Aacute o -13 KPX Aacute period 5 -KPX Aacute q -11 -KPX Aacute quoteright -48 -KPX Aacute t -15 +KPX Aacute q -8 +KPX Aacute quoteright -65 +KPX Aacute t -16 KPX Aacute u -12 -KPX Aacute v -27 +KPX Aacute v -31 KPX Aacute w -21 -KPX Aacute y -28 -KPX Acircumflex C -28 -KPX Acircumflex G -30 -KPX Acircumflex O -28 -KPX Acircumflex Q -28 -KPX Acircumflex T -74 -KPX Acircumflex U -29 -KPX Acircumflex V -56 -KPX Acircumflex W -39 -KPX Acircumflex Y -78 +KPX Aacute y -34 +KPX Acircumflex C -36 +KPX Acircumflex G -35 +KPX Acircumflex O -33 +KPX Acircumflex Q -32 +KPX Acircumflex T -93 +KPX Acircumflex U -37 +KPX Acircumflex V -75 +KPX Acircumflex W -51 +KPX Acircumflex Y -99 KPX Acircumflex comma 5 KPX Acircumflex period 5 -KPX Adieresis C -28 -KPX Adieresis G -30 -KPX Adieresis O -28 -KPX Adieresis Q -28 -KPX Adieresis T -74 -KPX Adieresis U -29 -KPX Adieresis V -56 -KPX Adieresis W -39 -KPX Adieresis Y -78 -KPX Adieresis a -3 -KPX Adieresis b 0 -KPX Adieresis c -10 +KPX Adieresis C -36 +KPX Adieresis G -35 +KPX Adieresis O -33 +KPX Adieresis Q -32 +KPX Adieresis T -93 +KPX Adieresis U -37 +KPX Adieresis V -75 +KPX Adieresis W -51 +KPX Adieresis Y -99 +KPX Adieresis a -4 +KPX Adieresis b 4 +KPX Adieresis c -11 KPX Adieresis comma 5 -KPX Adieresis d -11 -KPX Adieresis g -14 -KPX Adieresis guillemotleft -40 -KPX Adieresis guilsinglleft -36 -KPX Adieresis hyphen -2 -KPX Adieresis o -14 +KPX Adieresis d -8 +KPX Adieresis g -10 +KPX Adieresis guillemotleft -44 +KPX Adieresis guilsinglleft -40 +KPX Adieresis hyphen -3 +KPX Adieresis o -13 KPX Adieresis period 5 -KPX Adieresis q -11 -KPX Adieresis quotedblright -37 -KPX Adieresis quoteright -48 -KPX Adieresis t -15 +KPX Adieresis q -8 +KPX Adieresis quotedblright -56 +KPX Adieresis quoteright -65 +KPX Adieresis t -16 KPX Adieresis u -12 -KPX Adieresis v -27 +KPX Adieresis v -31 KPX Adieresis w -21 -KPX Adieresis y -28 -KPX Agrave C -28 -KPX Agrave G -30 -KPX Agrave O -28 -KPX Agrave Q -28 -KPX Agrave T -74 -KPX Agrave U -29 -KPX Agrave V -56 -KPX Agrave W -39 -KPX Agrave Y -78 +KPX Adieresis y -34 +KPX Agrave C -36 +KPX Agrave G -35 +KPX Agrave O -33 +KPX Agrave Q -32 +KPX Agrave T -93 +KPX Agrave U -37 +KPX Agrave V -75 +KPX Agrave W -51 +KPX Agrave Y -99 KPX Agrave comma 5 KPX Agrave period 5 -KPX Aring C -28 -KPX Aring G -30 -KPX Aring O -28 -KPX Aring Q -28 -KPX Aring T -74 -KPX Aring U -29 -KPX Aring V -56 -KPX Aring W -39 -KPX Aring Y -78 -KPX Aring a -3 -KPX Aring b 0 -KPX Aring c -10 +KPX Aring C -36 +KPX Aring G -35 +KPX Aring O -33 +KPX Aring Q -32 +KPX Aring T -93 +KPX Aring U -37 +KPX Aring V -75 +KPX Aring W -51 +KPX Aring Y -99 +KPX Aring a -4 +KPX Aring b 4 +KPX Aring c -11 KPX Aring comma 5 -KPX Aring d -11 -KPX Aring e -14 -KPX Aring g -14 -KPX Aring guillemotleft -40 -KPX Aring guilsinglleft -36 -KPX Aring hyphen -2 -KPX Aring o -14 +KPX Aring d -8 +KPX Aring e -16 +KPX Aring g -10 +KPX Aring guillemotleft -44 +KPX Aring guilsinglleft -40 +KPX Aring hyphen -3 +KPX Aring o -13 KPX Aring period 5 -KPX Aring q -11 -KPX Aring quotedblright -37 -KPX Aring quoteright -48 -KPX Aring t -15 +KPX Aring q -8 +KPX Aring quotedblright -56 +KPX Aring quoteright -65 +KPX Aring t -16 KPX Aring u -12 -KPX Aring v -27 +KPX Aring v -31 KPX Aring w -21 -KPX Aring y -28 -KPX Atilde C -28 -KPX Atilde G -30 -KPX Atilde O -28 -KPX Atilde Q -28 -KPX Atilde T -74 -KPX Atilde U -29 -KPX Atilde V -56 -KPX Atilde W -39 -KPX Atilde Y -78 +KPX Aring y -34 +KPX Atilde C -36 +KPX Atilde G -35 +KPX Atilde O -33 +KPX Atilde Q -32 +KPX Atilde T -93 +KPX Atilde U -37 +KPX Atilde V -75 +KPX Atilde W -51 +KPX Atilde Y -99 KPX Atilde comma 5 KPX Atilde period 5 -KPX B A -15 -KPX B AE -14 -KPX B Aacute -15 -KPX B Acircumflex -15 -KPX B Adieresis -15 -KPX B Aring -15 -KPX B Atilde -15 -KPX B O -3 -KPX B OE 0 -KPX B Oacute -3 -KPX B Ocircumflex -3 -KPX B Odieresis -3 -KPX B Ograve -3 -KPX B Oslash 0 -KPX B V -25 -KPX B W -15 -KPX B Y -31 -KPX C A -25 -KPX C AE -24 -KPX C Aacute -25 -KPX C Adieresis -25 -KPX C Aring -25 -KPX C H -6 -KPX C K -5 -KPX C O -4 -KPX C Oacute -4 -KPX C Odieresis -4 -KPX Ccedilla A -28 -KPX D A -33 -KPX D Aacute -33 -KPX D Acircumflex -33 -KPX D Adieresis -33 -KPX D Agrave -33 -KPX D Aring -33 -KPX D Atilde -33 -KPX D J -1 -KPX D T -30 -KPX D V -32 -KPX D W -18 -KPX D X -38 -KPX D Y -44 -KPX F A -55 -KPX F Aacute -55 -KPX F Acircumflex -55 -KPX F Adieresis -55 -KPX F Agrave -55 -KPX F Aring -55 -KPX F Atilde -55 -KPX F J -50 -KPX F O -15 -KPX F Odieresis -15 -KPX F a -26 -KPX F aacute -26 -KPX F adieresis -26 -KPX F ae -26 -KPX F aring -26 -KPX F comma -102 -KPX F e -19 -KPX F eacute -19 -KPX F hyphen -12 -KPX F i -8 -KPX F j -8 -KPX F o -17 -KPX F oacute -17 -KPX F odieresis -17 -KPX F oe -17 -KPX F oslash -17 -KPX F period -102 -KPX F r -32 -KPX F u -28 -KPX G A -4 -KPX G AE -2 -KPX G Aacute -4 -KPX G Acircumflex -4 -KPX G Adieresis -4 -KPX G Agrave -4 -KPX G Aring -4 -KPX G Atilde -4 -KPX G T -31 -KPX G V -36 -KPX G W -20 -KPX G Y -47 -KPX J A -22 -KPX J AE -21 -KPX J Adieresis -22 -KPX J Aring -22 -KPX K C -37 -KPX K G -40 -KPX K O -37 -KPX K OE -33 -KPX K Oacute -37 -KPX K Odieresis -37 -KPX K S -27 -KPX K T 22 -KPX K a -6 -KPX K adieresis -6 -KPX K ae -6 -KPX K aring -6 -KPX K e -26 -KPX K hyphen -38 -KPX K o -26 -KPX K oacute -26 -KPX K odieresis -26 -KPX K u -21 -KPX K udieresis -21 -KPX K y -52 -KPX L A 18 +KPX B A -21 +KPX B AE -21 +KPX B Aacute -21 +KPX B Acircumflex -21 +KPX B Adieresis -21 +KPX B Aring -21 +KPX B Atilde -21 +KPX B O -7 +KPX B OE -5 +KPX B Oacute -7 +KPX B Ocircumflex -7 +KPX B Odieresis -7 +KPX B Ograve -7 +KPX B Oslash -1 +KPX B V -41 +KPX B W -25 +KPX B Y -44 +KPX C A -32 +KPX C AE -33 +KPX C Aacute -32 +KPX C Adieresis -32 +KPX C Aring -32 +KPX C H -12 +KPX C K -10 +KPX C O -8 +KPX C Oacute -8 +KPX C Odieresis -8 +KPX Ccedilla A -31 +KPX D A -42 +KPX D Aacute -42 +KPX D Acircumflex -42 +KPX D Adieresis -42 +KPX D Agrave -42 +KPX D Aring -42 +KPX D Atilde -42 +KPX D J -5 +KPX D T -45 +KPX D V -51 +KPX D W -29 +KPX D X -53 +KPX D Y -63 +KPX F A -69 +KPX F Aacute -69 +KPX F Acircumflex -69 +KPX F Adieresis -69 +KPX F Agrave -69 +KPX F Aring -69 +KPX F Atilde -69 +KPX F J -51 +KPX F O -22 +KPX F Odieresis -22 +KPX F a -33 +KPX F aacute -33 +KPX F adieresis -33 +KPX F ae -29 +KPX F aring -33 +KPX F comma -108 +KPX F e -24 +KPX F eacute -24 +KPX F hyphen -14 +KPX F i -10 +KPX F j -12 +KPX F o -21 +KPX F oacute -21 +KPX F odieresis -21 +KPX F oe -23 +KPX F oslash -21 +KPX F period -108 +KPX F r -35 +KPX F u -33 +KPX G A -6 +KPX G AE -3 +KPX G Aacute -6 +KPX G Acircumflex -6 +KPX G Adieresis -6 +KPX G Agrave -6 +KPX G Aring -6 +KPX G Atilde -6 +KPX G T -44 +KPX G V -50 +KPX G W -28 +KPX G Y -62 +KPX J A -32 +KPX J AE -31 +KPX J Adieresis -32 +KPX J Aring -32 +KPX K C -51 +KPX K G -51 +KPX K O -48 +KPX K OE -45 +KPX K Oacute -48 +KPX K Odieresis -48 +KPX K S -38 +KPX K T 20 +KPX K a -11 +KPX K adieresis -11 +KPX K ae -7 +KPX K aring -11 +KPX K e -32 +KPX K hyphen -47 +KPX K o -29 +KPX K oacute -29 +KPX K odieresis -29 +KPX K u -19 +KPX K udieresis -19 +KPX K y -62 +KPX L A 17 KPX L AE 20 -KPX L Aacute 18 -KPX L Adieresis 18 -KPX L Aring 18 -KPX L C -28 -KPX L Ccedilla -32 -KPX L G -31 -KPX L O -29 -KPX L Oacute -29 -KPX L Ocircumflex -29 -KPX L Odieresis -29 -KPX L Ograve -29 -KPX L Otilde -29 -KPX L S -11 -KPX L T -81 -KPX L U -25 -KPX L Udieresis -25 -KPX L V -78 -KPX L W -50 -KPX L Y -92 -KPX L hyphen -110 -KPX L quotedblright -105 -KPX L quoteright -116 -KPX L u -9 -KPX L udieresis -9 -KPX L y -47 -KPX N A -4 -KPX N AE -2 -KPX N Aacute -4 -KPX N Adieresis -4 -KPX N Aring -4 -KPX N C 1 -KPX N Ccedilla 0 -KPX N G -1 -KPX N O 1 -KPX N Oacute 1 -KPX N Odieresis 1 -KPX N a -1 -KPX N aacute -1 -KPX N adieresis -1 -KPX N ae -1 -KPX N aring -1 -KPX N comma -4 -KPX N e 1 -KPX N eacute 1 -KPX N o 1 -KPX N oacute 1 -KPX N odieresis 1 +KPX L Aacute 17 +KPX L Adieresis 17 +KPX L Aring 17 +KPX L C -41 +KPX L Ccedilla -37 +KPX L G -42 +KPX L O -41 +KPX L Oacute -41 +KPX L Ocircumflex -41 +KPX L Odieresis -41 +KPX L Ograve -41 +KPX L Otilde -41 +KPX L S -19 +KPX L T -105 +KPX L U -35 +KPX L Udieresis -35 +KPX L V -105 +KPX L W -68 +KPX L Y -121 +KPX L hyphen -125 +KPX L quotedblright -141 +KPX L quoteright -149 +KPX L u -7 +KPX L udieresis -7 +KPX L y -56 +KPX N A -9 +KPX N AE -6 +KPX N Aacute -9 +KPX N Adieresis -9 +KPX N Aring -9 +KPX N C -3 +KPX N Ccedilla -3 +KPX N G -2 +KPX N O 0 +KPX N Oacute 0 +KPX N Odieresis 0 +KPX N a -5 +KPX N aacute -5 +KPX N adieresis -5 +KPX N ae -2 +KPX N aring -5 +KPX N comma -7 +KPX N e 0 +KPX N eacute 0 +KPX N o 2 +KPX N oacute 2 +KPX N odieresis 2 KPX N oslash 4 -KPX N period -4 +KPX N period -7 KPX N u 0 KPX N udieresis 0 -KPX O A -29 -KPX O AE -29 -KPX O Aacute -29 -KPX O Adieresis -29 -KPX O Aring -29 -KPX O T -27 -KPX O V -30 -KPX O W -14 -KPX O X -34 -KPX O Y -42 -KPX Oacute A -29 -KPX Oacute T -27 -KPX Oacute V -30 -KPX Oacute W -14 -KPX Oacute Y -42 -KPX Ocircumflex T -27 -KPX Ocircumflex V -30 -KPX Ocircumflex Y -42 -KPX Odieresis A -29 -KPX Odieresis T -27 -KPX Odieresis V -30 -KPX Odieresis W -14 -KPX Odieresis X -34 -KPX Odieresis Y -42 -KPX Ograve T -27 -KPX Ograve V -30 -KPX Ograve Y -42 -KPX Oslash A -27 -KPX Otilde T -27 -KPX Otilde V -30 -KPX Otilde Y -42 -KPX P A -62 -KPX P AE -64 -KPX P Aacute -62 -KPX P Adieresis -62 -KPX P Aring -62 -KPX P J -70 -KPX P a -21 -KPX P aacute -21 -KPX P adieresis -21 -KPX P ae -21 -KPX P aring -21 -KPX P comma -123 -KPX P e -24 -KPX P eacute -24 -KPX P hyphen -28 -KPX P o -24 -KPX P oacute -24 -KPX P odieresis -24 -KPX P oe -22 -KPX P oslash -22 -KPX P period -123 -KPX R C -7 -KPX R Ccedilla -7 -KPX R G -9 -KPX R O -6 -KPX R OE -3 -KPX R Oacute -6 -KPX R Odieresis -6 -KPX R T -11 -KPX R U -8 -KPX R Udieresis -8 -KPX R V -22 -KPX R W -15 -KPX R Y -28 -KPX R a -6 -KPX R aacute -6 -KPX R adieresis -6 -KPX R ae -6 -KPX R aring -6 -KPX R e -5 -KPX R eacute -5 -KPX R hyphen 4 -KPX R o -5 -KPX R oacute -5 -KPX R odieresis -5 -KPX R oe -5 -KPX R u -4 -KPX R uacute -5 -KPX R udieresis -5 -KPX R y -1 -KPX S A -15 -KPX S AE -14 -KPX S Aacute -15 -KPX S Adieresis -15 -KPX S Aring -15 -KPX S T -14 -KPX S V -25 -KPX S W -17 -KPX S Y -31 -KPX S t -2 -KPX T A -78 -KPX T AE -76 -KPX T Aacute -78 -KPX T Acircumflex -78 -KPX T Adieresis -78 -KPX T Agrave -78 -KPX T Aring -78 -KPX T Atilde -78 -KPX T C -27 -KPX T G -31 -KPX T J -80 -KPX T O -26 -KPX T OE -21 -KPX T Oacute -26 -KPX T Ocircumflex -26 -KPX T Odieresis -26 -KPX T Ograve -26 -KPX T Oslash -27 -KPX T Otilde -26 -KPX T S -15 -KPX T V 17 -KPX T W 19 -KPX T Y 19 -KPX T a -79 -KPX T ae -79 -KPX T c -73 -KPX T colon -95 -KPX T comma -80 -KPX T e -77 -KPX T g -76 -KPX T guillemotleft -100 -KPX T guilsinglleft -96 -KPX T hyphen -60 -KPX T i -2 -KPX T j -2 -KPX T o -77 -KPX T oslash -72 -KPX T period -80 -KPX T r -77 -KPX T s -74 -KPX T semicolon -93 -KPX T u -75 -KPX T v -79 -KPX T w -80 -KPX T y -79 -KPX U A -32 -KPX U AE -32 -KPX U Aacute -32 -KPX U Acircumflex -32 -KPX U Adieresis -32 -KPX U Aring -32 -KPX U Atilde -32 -KPX U comma -24 -KPX U m -1 -KPX U n -1 -KPX U p 0 -KPX U period -22 -KPX U r -6 -KPX Uacute A -32 -KPX Uacute comma -24 -KPX Uacute m -1 -KPX Uacute n -1 -KPX Uacute p 0 -KPX Uacute period -22 -KPX Uacute r -6 -KPX Ucircumflex A -32 -KPX Udieresis A -32 -KPX Udieresis b 0 -KPX Udieresis comma -24 -KPX Udieresis m -1 -KPX Udieresis n -1 -KPX Udieresis p 0 -KPX Udieresis period -22 -KPX Udieresis r -6 -KPX Ugrave A -32 -KPX V A -58 -KPX V AE -60 -KPX V Aacute -58 -KPX V Acircumflex -58 -KPX V Adieresis -58 -KPX V Agrave -58 -KPX V Aring -58 -KPX V Atilde -58 -KPX V C -30 -KPX V G -34 -KPX V O -30 -KPX V Oacute -30 -KPX V Ocircumflex -30 -KPX V Odieresis -30 -KPX V Ograve -30 -KPX V Oslash -27 -KPX V Otilde -30 -KPX V S -26 -KPX V T 18 -KPX V a -47 -KPX V ae -47 -KPX V colon -41 -KPX V comma -73 -KPX V e -46 -KPX V g -44 -KPX V guillemotleft -68 -KPX V guilsinglleft -64 -KPX V hyphen -29 +KPX O A -35 +KPX O AE -39 +KPX O Aacute -35 +KPX O Adieresis -35 +KPX O Aring -35 +KPX O T -42 +KPX O V -45 +KPX O W -23 +KPX O X -46 +KPX O Y -59 +KPX Oacute A -35 +KPX Oacute T -42 +KPX Oacute V -45 +KPX Oacute W -23 +KPX Oacute Y -59 +KPX Ocircumflex T -42 +KPX Ocircumflex V -45 +KPX Ocircumflex Y -59 +KPX Odieresis A -35 +KPX Odieresis T -42 +KPX Odieresis V -45 +KPX Odieresis W -23 +KPX Odieresis X -46 +KPX Odieresis Y -59 +KPX Ograve T -42 +KPX Ograve V -45 +KPX Ograve Y -59 +KPX Oslash A -33 +KPX Otilde T -42 +KPX Otilde V -45 +KPX Otilde Y -59 +KPX P A -78 +KPX P AE -86 +KPX P Aacute -78 +KPX P Adieresis -78 +KPX P Aring -78 +KPX P J -78 +KPX P a -28 +KPX P aacute -28 +KPX P adieresis -28 +KPX P ae -24 +KPX P aring -28 +KPX P comma -135 +KPX P e -31 +KPX P eacute -31 +KPX P hyphen -40 +KPX P o -27 +KPX P oacute -27 +KPX P odieresis -27 +KPX P oe -28 +KPX P oslash -27 +KPX P period -135 +KPX R C -16 +KPX R Ccedilla -16 +KPX R G -15 +KPX R O -13 +KPX R OE -11 +KPX R Oacute -13 +KPX R Odieresis -13 +KPX R T -23 +KPX R U -17 +KPX R Udieresis -17 +KPX R V -39 +KPX R W -27 +KPX R Y -43 +KPX R a -15 +KPX R aacute -15 +KPX R adieresis -15 +KPX R ae -12 +KPX R aring -15 +KPX R e -12 +KPX R eacute -12 +KPX R hyphen -2 +KPX R o -9 +KPX R oacute -9 +KPX R odieresis -9 +KPX R oe -11 +KPX R u -9 +KPX R uacute -9 +KPX R udieresis -9 +KPX R y -8 +KPX S A -22 +KPX S AE -22 +KPX S Aacute -22 +KPX S Adieresis -22 +KPX S Aring -22 +KPX S T -28 +KPX S V -42 +KPX S W -28 +KPX S Y -48 +KPX S t -3 +KPX T A -95 +KPX T AE -97 +KPX T Aacute -95 +KPX T Acircumflex -95 +KPX T Adieresis -95 +KPX T Agrave -95 +KPX T Aring -95 +KPX T Atilde -95 +KPX T C -44 +KPX T G -45 +KPX T J -100 +KPX T O -42 +KPX T OE -35 +KPX T Oacute -42 +KPX T Ocircumflex -42 +KPX T Odieresis -42 +KPX T Ograve -42 +KPX T Oslash -41 +KPX T Otilde -42 +KPX T S -24 +KPX T V 12 +KPX T W 16 +KPX T Y 20 +KPX T a -100 +KPX T ae -97 +KPX T c -90 +KPX T colon -133 +KPX T comma -100 +KPX T e -95 +KPX T g -89 +KPX T guillemotleft -121 +KPX T guilsinglleft -117 +KPX T hyphen -77 +KPX T i -3 +KPX T j -5 +KPX T o -92 +KPX T oslash -87 +KPX T period -100 +KPX T r -92 +KPX T s -92 +KPX T semicolon -129 +KPX T u -91 +KPX T v -95 +KPX T w -93 +KPX T y -100 +KPX U A -36 +KPX U AE -39 +KPX U Aacute -36 +KPX U Acircumflex -36 +KPX U Adieresis -36 +KPX U Aring -36 +KPX U Atilde -36 +KPX U comma -27 +KPX U m -4 +KPX U n -4 +KPX U p 3 +KPX U period -25 +KPX U r -4 +KPX Uacute A -36 +KPX Uacute comma -27 +KPX Uacute m -4 +KPX Uacute n -4 +KPX Uacute p 3 +KPX Uacute period -25 +KPX Uacute r -4 +KPX Ucircumflex A -36 +KPX Udieresis A -36 +KPX Udieresis b 3 +KPX Udieresis comma -27 +KPX Udieresis m -4 +KPX Udieresis n -4 +KPX Udieresis p 3 +KPX Udieresis period -25 +KPX Udieresis r -4 +KPX Ugrave A -36 +KPX V A -71 +KPX V AE -78 +KPX V Aacute -71 +KPX V Acircumflex -71 +KPX V Adieresis -71 +KPX V Agrave -71 +KPX V Aring -71 +KPX V Atilde -71 +KPX V C -43 +KPX V G -42 +KPX V O -40 +KPX V Oacute -40 +KPX V Ocircumflex -40 +KPX V Odieresis -40 +KPX V Ograve -40 +KPX V Oslash -33 +KPX V Otilde -40 +KPX V S -35 +KPX V T 15 +KPX V a -59 +KPX V ae -55 +KPX V colon -66 +KPX V comma -89 +KPX V e -57 +KPX V g -50 +KPX V guillemotleft -83 +KPX V guilsinglleft -80 +KPX V hyphen -38 KPX V i -5 -KPX V o -46 -KPX V oslash -41 -KPX V period -73 -KPX V r -37 -KPX V semicolon -41 -KPX V u -35 -KPX V y -12 -KPX W A -42 -KPX W AE -43 -KPX W Aacute -42 -KPX W Acircumflex -42 -KPX W Adieresis -42 -KPX W Agrave -42 -KPX W Aring -42 -KPX W Atilde -42 -KPX W C -15 -KPX W G -18 -KPX W O -15 -KPX W Oacute -15 -KPX W Ocircumflex -15 -KPX W Odieresis -15 -KPX W Ograve -15 -KPX W Oslash -12 -KPX W Otilde -15 -KPX W S -19 -KPX W T 20 -KPX W a -29 -KPX W ae -29 -KPX W colon -31 -KPX W comma -46 -KPX W e -26 -KPX W g -24 -KPX W guillemotleft -48 -KPX W guilsinglleft -44 -KPX W hyphen -9 -KPX W i -3 -KPX W o -26 -KPX W oslash -21 -KPX W period -46 -KPX W r -26 -KPX W semicolon -31 -KPX W u -24 -KPX W y -2 -KPX X C -33 -KPX X O -33 -KPX X Odieresis -33 -KPX X Q -33 -KPX X a -12 -KPX X e -31 -KPX X hyphen -40 -KPX X o -31 -KPX X u -27 -KPX X y -42 -KPX Y A -80 -KPX Y AE -82 -KPX Y Aacute -80 -KPX Y Acircumflex -80 -KPX Y Adieresis -80 -KPX Y Agrave -80 -KPX Y Aring -80 -KPX Y Atilde -80 -KPX Y C -42 -KPX Y G -47 -KPX Y O -43 -KPX Y Oacute -43 -KPX Y Ocircumflex -43 -KPX Y Odieresis -43 -KPX Y Ograve -43 -KPX Y Oslash -44 -KPX Y Otilde -43 -KPX Y S -33 -KPX Y T 20 -KPX Y a -73 -KPX Y ae -73 -KPX Y colon -60 -KPX Y comma -92 -KPX Y e -74 -KPX Y g -73 -KPX Y guillemotleft -103 -KPX Y guilsinglleft -99 -KPX Y hyphen -68 -KPX Y i -3 -KPX Y o -74 -KPX Y oslash -69 -KPX Y p -48 -KPX Y period -92 -KPX Y semicolon -60 -KPX Y u -54 -KPX Y v -31 -KPX Z v -24 -KPX Z y -25 -KPX a j -6 -KPX a quoteright -10 -KPX a v -19 -KPX a w -14 -KPX a y -20 -KPX aacute v -19 -KPX aacute w -14 -KPX aacute y -20 -KPX adieresis v -19 -KPX adieresis w -14 -KPX adieresis y -20 -KPX ae v -17 -KPX ae w -11 -KPX ae y -19 -KPX agrave v -19 -KPX agrave w -14 -KPX agrave y -20 -KPX aring v -19 -KPX aring w -14 -KPX aring y -20 -KPX b v -13 -KPX b w -8 +KPX V o -54 +KPX V oslash -50 +KPX V period -89 +KPX V r -42 +KPX V semicolon -66 +KPX V u -41 +KPX V y -20 +KPX W A -50 +KPX W AE -56 +KPX W Aacute -50 +KPX W Acircumflex -50 +KPX W Adieresis -50 +KPX W Agrave -50 +KPX W Aring -50 +KPX W Atilde -50 +KPX W C -23 +KPX W G -22 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Oslash -13 +KPX W Otilde -20 +KPX W S -24 +KPX W T 19 +KPX W a -38 +KPX W ae -34 +KPX W colon -52 +KPX W comma -56 +KPX W e -32 +KPX W g -25 +KPX W guillemotleft -58 +KPX W guilsinglleft -54 +KPX W hyphen -13 +KPX W i -1 +KPX W o -29 +KPX W oslash -25 +KPX W period -56 +KPX W r -28 +KPX W semicolon -53 +KPX W u -28 +KPX W y -6 +KPX X C -48 +KPX X O -45 +KPX X Odieresis -45 +KPX X Q -44 +KPX X a -15 +KPX X e -36 +KPX X hyphen -51 +KPX X o -33 +KPX X u -24 +KPX X y -61 +KPX Y A -96 +KPX Y AE -103 +KPX Y Aacute -96 +KPX Y Acircumflex -96 +KPX Y Adieresis -96 +KPX Y Agrave -96 +KPX Y Aring -96 +KPX Y Atilde -96 +KPX Y C -58 +KPX Y G -58 +KPX Y O -56 +KPX Y Oacute -56 +KPX Y Ocircumflex -56 +KPX Y Odieresis -56 +KPX Y Ograve -56 +KPX Y Oslash -54 +KPX Y Otilde -56 +KPX Y S -41 +KPX Y T 23 +KPX Y a -88 +KPX Y ae -84 +KPX Y colon -87 +KPX Y comma -111 +KPX Y e -89 +KPX Y g -83 +KPX Y guillemotleft -123 +KPX Y guilsinglleft -119 +KPX Y hyphen -84 +KPX Y i 3 +KPX Y o -86 +KPX Y oslash -82 +KPX Y p -54 +KPX Y period -111 +KPX Y semicolon -88 +KPX Y u -63 +KPX Y v -36 +KPX Z v -33 +KPX Z y -38 +KPX a j -4 +KPX a quoteright -23 +KPX a v -21 +KPX a w -13 +KPX a y -26 +KPX aacute v -21 +KPX aacute w -13 +KPX aacute y -26 +KPX adieresis v -21 +KPX adieresis w -13 +KPX adieresis y -26 +KPX ae v -16 +KPX ae w -10 +KPX ae y -20 +KPX agrave v -21 +KPX agrave w -13 +KPX agrave y -26 +KPX aring v -21 +KPX aring w -13 +KPX aring y -26 +KPX b v -11 +KPX b w -3 KPX b y -15 -KPX c h 2 -KPX c k 1 -KPX comma one -83 -KPX comma quotedblright -22 -KPX comma quoteright -33 -KPX e quoteright -5 -KPX e t -9 -KPX e v -16 -KPX e w -11 -KPX e x -19 -KPX e y -18 -KPX eacute v -16 -KPX eacute w -11 -KPX eacute y -18 -KPX ecircumflex v -16 -KPX ecircumflex w -11 -KPX ecircumflex y -18 -KPX eight four 6 -KPX eight one -36 -KPX eight seven -16 +KPX c h 1 +KPX c k 7 +KPX comma one -100 +KPX comma quotedblright -41 +KPX comma quoteright -50 +KPX e quoteright -18 +KPX e t -10 +KPX e v -15 +KPX e w -9 +KPX e x -27 +KPX e y -19 +KPX eacute v -15 +KPX eacute w -9 +KPX eacute y -19 +KPX ecircumflex v -15 +KPX ecircumflex w -9 +KPX ecircumflex y -19 +KPX eight four 1 +KPX eight one -48 +KPX eight seven -33 KPX f a -9 KPX f aacute -9 KPX f adieresis -9 -KPX f ae -9 +KPX f ae -5 KPX f aring -9 -KPX f e -13 -KPX f eacute -13 -KPX f f 17 -KPX f i -5 -KPX f j -5 -KPX f l -5 -KPX f o -12 -KPX f oacute -12 -KPX f odieresis -12 +KPX f e -15 +KPX f eacute -15 +KPX f f 22 +KPX f i -2 +KPX f j -4 +KPX f l -3 +KPX f o -10 +KPX f oacute -10 +KPX f odieresis -10 KPX f oe -12 -KPX f oslash -8 -KPX f quoteright 12 -KPX f s -4 -KPX f t 17 -KPX five four 4 -KPX five one -56 -KPX five seven -16 -KPX four four 8 -KPX four one -65 -KPX four seven -39 -KPX g a 1 -KPX g adieresis 1 -KPX g ae 1 -KPX g aring 1 -KPX g e 4 -KPX g eacute 4 -KPX g l 4 -KPX g oacute 4 -KPX g odieresis 4 +KPX f oslash -9 +KPX f quoteright 0 +KPX f s 0 +KPX f t 24 +KPX five four 1 +KPX five one -76 +KPX five seven -26 +KPX four four 5 +KPX four one -84 +KPX four seven -56 +KPX g a -5 +KPX g adieresis -5 +KPX g ae -1 +KPX g aring -5 +KPX g e 0 +KPX g eacute 0 +KPX g l 0 +KPX g oacute 3 +KPX g odieresis 3 KPX g r 0 -KPX guillemotright A -42 -KPX guillemotright AE -43 -KPX guillemotright Aacute -42 -KPX guillemotright Adieresis -42 -KPX guillemotright Aring -42 -KPX guillemotright T -101 -KPX guillemotright V -68 -KPX guillemotright W -48 -KPX guillemotright Y -102 -KPX guilsinglright A -38 -KPX guilsinglright AE -39 -KPX guilsinglright Aacute -38 -KPX guilsinglright Adieresis -38 -KPX guilsinglright Aring -38 -KPX guilsinglright T -96 -KPX guilsinglright V -64 -KPX guilsinglright W -44 -KPX guilsinglright Y -98 -KPX h quoteright -3 -KPX h y -14 -KPX hyphen A -3 -KPX hyphen AE -4 -KPX hyphen Aacute -3 -KPX hyphen Adieresis -3 -KPX hyphen Aring -3 -KPX hyphen T -61 -KPX hyphen V -29 -KPX hyphen W -9 -KPX hyphen Y -67 -KPX i T -2 -KPX i j 0 -KPX k a -5 -KPX k aacute -5 -KPX k adieresis -5 -KPX k ae -5 -KPX k aring -5 -KPX k comma 1 -KPX k e -19 -KPX k eacute -19 -KPX k g -18 -KPX k hyphen -31 +KPX guillemotright A -50 +KPX guillemotright AE -54 +KPX guillemotright Aacute -50 +KPX guillemotright Adieresis -50 +KPX guillemotright Aring -50 +KPX guillemotright T -126 +KPX guillemotright V -93 +KPX guillemotright W -66 +KPX guillemotright Y -133 +KPX guilsinglright A -44 +KPX guilsinglright AE -48 +KPX guilsinglright Aacute -44 +KPX guilsinglright Adieresis -44 +KPX guilsinglright Aring -44 +KPX guilsinglright T -121 +KPX guilsinglright V -88 +KPX guilsinglright W -60 +KPX guilsinglright Y -128 +KPX h quoteright -15 +KPX h y -18 +KPX hyphen A -7 +KPX hyphen AE -11 +KPX hyphen Aacute -7 +KPX hyphen Adieresis -7 +KPX hyphen Aring -7 +KPX hyphen T -80 +KPX hyphen V -46 +KPX hyphen W -19 +KPX hyphen Y -92 +KPX i T -7 +KPX i j -3 +KPX k a -2 +KPX k aacute -2 +KPX k adieresis -2 +KPX k ae 2 +KPX k aring -2 +KPX k comma 0 +KPX k e -21 +KPX k eacute -21 +KPX k g -16 +KPX k hyphen -41 KPX k o -19 KPX k oacute -19 KPX k odieresis -19 -KPX k period 1 -KPX k s -9 -KPX k u -3 -KPX k udieresis -3 -KPX l v -3 -KPX l y -3 -KPX m p 4 +KPX k period 0 +KPX k s -3 +KPX k u -11 +KPX k udieresis -6 +KPX l v 0 +KPX l y -5 +KPX m p 5 KPX m v -13 KPX m w -7 -KPX m y -14 -KPX n T -75 -KPX n p 4 -KPX n quoteright -3 -KPX n v -14 -KPX n w -8 -KPX n y -14 -KPX nine four 1 -KPX nine one -31 -KPX nine seven -19 -KPX o T -77 -KPX o quoteright -8 -KPX o t -7 -KPX o v -15 -KPX o w -9 -KPX o x -18 -KPX o y -17 -KPX oacute v -15 -KPX oacute w -9 -KPX oacute y -17 -KPX ocircumflex t -7 -KPX odieresis t -7 -KPX odieresis v -15 -KPX odieresis w -9 -KPX odieresis x -18 -KPX odieresis y -17 -KPX ograve v -15 -KPX ograve w -9 -KPX ograve y -17 -KPX one comma -54 -KPX one eight -46 -KPX one five -49 -KPX one four -59 -KPX one nine -47 -KPX one one -90 -KPX one period -54 -KPX one seven -64 -KPX one six -44 -KPX one three -51 -KPX one two -50 -KPX one zero -43 -KPX p t -6 -KPX p y -15 -KPX period one -83 -KPX period quotedblright -22 -KPX period quoteright -33 -KPX q c 5 -KPX q u 1 -KPX quotedblbase A 24 -KPX quotedblbase AE 25 -KPX quotedblbase T -60 -KPX quotedblbase V -53 -KPX quotedblbase W -25 -KPX quotedblbase Y -71 -KPX quotedblleft A -41 -KPX quotedblleft AE -45 -KPX quotedblleft Aacute -41 -KPX quotedblleft Adieresis -41 -KPX quotedblleft Aring -41 -KPX quotedblleft T 16 -KPX quotedblleft V 24 -KPX quotedblleft W 31 -KPX quotedblleft Y 14 -KPX quotedblright A -49 -KPX quotedblright AE -52 -KPX quotedblright Aacute -49 -KPX quotedblright Adieresis -49 -KPX quotedblright Aring -49 +KPX m y -18 +KPX n T -96 +KPX n p 5 +KPX n quoteright -14 +KPX n v -13 +KPX n w -7 +KPX n y -18 +KPX nine four -3 +KPX nine one -43 +KPX nine seven -37 +KPX o T -99 +KPX o quoteright -21 +KPX o t -10 +KPX o v -18 +KPX o w -10 +KPX o x -27 +KPX o y -22 +KPX oacute v -18 +KPX oacute w -10 +KPX oacute y -22 +KPX ocircumflex t -10 +KPX odieresis t -10 +KPX odieresis v -18 +KPX odieresis w -10 +KPX odieresis x -27 +KPX odieresis y -22 +KPX ograve v -18 +KPX ograve w -10 +KPX ograve y -22 +KPX one comma -74 +KPX one eight -65 +KPX one five -67 +KPX one four -81 +KPX one nine -65 +KPX one one -118 +KPX one period -74 +KPX one seven -90 +KPX one six -62 +KPX one three -67 +KPX one two -69 +KPX one zero -62 +KPX p t -4 +KPX p y -16 +KPX period one -101 +KPX period quotedblright -41 +KPX period quoteright -51 +KPX q c 8 +KPX q u 4 +KPX quotedblbase A 30 +KPX quotedblbase AE 30 +KPX quotedblbase T -75 +KPX quotedblbase V -69 +KPX quotedblbase W -34 +KPX quotedblbase Y -91 +KPX quotedblleft A -52 +KPX quotedblleft AE -64 +KPX quotedblleft Aacute -52 +KPX quotedblleft Adieresis -52 +KPX quotedblleft Aring -52 +KPX quotedblleft T 9 +KPX quotedblleft V 15 +KPX quotedblleft W 27 +KPX quotedblleft Y 5 +KPX quotedblright A -53 +KPX quotedblright AE -66 +KPX quotedblright Aacute -53 +KPX quotedblright Adieresis -53 +KPX quotedblright Aring -53 KPX quotedblright T 11 -KPX quotedblright V 16 -KPX quotedblright W 23 -KPX quotedblright Y 9 -KPX quoteleft A -52 -KPX quoteleft AE -56 -KPX quoteleft Aacute -52 -KPX quoteleft Adieresis -52 -KPX quoteleft Aring -52 -KPX quoteleft T 5 -KPX quoteleft V 13 -KPX quoteleft W 20 -KPX quoteleft Y 3 -KPX quoteright A -60 -KPX quoteright AE -63 -KPX quoteright Aacute -60 -KPX quoteright Adieresis -60 -KPX quoteright Aring -60 -KPX quoteright comma -48 -KPX quoteright d -16 -KPX quoteright o -24 -KPX quoteright period -48 -KPX quoteright r -15 -KPX quoteright s -13 -KPX quoteright t -3 -KPX quoteright v 0 -KPX quoteright w 1 -KPX quoteright y 0 -KPX r a -3 -KPX r aacute -3 -KPX r acircumflex -3 -KPX r adieresis -3 -KPX r ae -3 -KPX r agrave -3 -KPX r aring -3 +KPX quotedblright V 15 +KPX quotedblright W 26 +KPX quotedblright Y 7 +KPX quoteleft A -67 +KPX quoteleft AE -79 +KPX quoteleft Aacute -67 +KPX quoteleft Adieresis -67 +KPX quoteleft Aring -67 +KPX quoteleft T -5 +KPX quoteleft V 0 +KPX quoteleft W 12 +KPX quoteleft Y -9 +KPX quoteright A -72 +KPX quoteright AE -85 +KPX quoteright Aacute -72 +KPX quoteright Adieresis -72 +KPX quoteright Aring -72 +KPX quoteright comma -60 +KPX quoteright d -20 +KPX quoteright o -26 +KPX quoteright period -60 +KPX quoteright r -18 +KPX quoteright s -18 +KPX quoteright t -7 +KPX quoteright v -2 +KPX quoteright w 2 +KPX quoteright y -6 +KPX r a -5 +KPX r aacute -5 +KPX r acircumflex -5 +KPX r adieresis -5 +KPX r ae -1 +KPX r agrave -5 +KPX r aring -5 KPX r c -6 -KPX r ccedilla -3 -KPX r colon -5 -KPX r comma -48 -KPX r d -3 -KPX r e -10 -KPX r eacute -10 -KPX r ecircumflex -10 -KPX r egrave -10 -KPX r f 23 +KPX r ccedilla -9 +KPX r colon -22 +KPX r comma -69 +KPX r d -1 +KPX r e -11 +KPX r eacute -11 +KPX r ecircumflex -11 +KPX r egrave -11 +KPX r f 26 KPX r g -4 -KPX r h 2 -KPX r hyphen -30 +KPX r h 0 +KPX r hyphen -47 KPX r i 1 KPX r j 0 -KPX r k 1 +KPX r k 6 KPX r l 1 -KPX r m 2 -KPX r n 2 -KPX r o -11 -KPX r oacute -11 -KPX r ocircumflex -11 -KPX r odieresis -11 -KPX r oe -7 -KPX r ograve -11 -KPX r oslash -7 -KPX r p 4 -KPX r period -48 -KPX r q -4 -KPX r quoteright 13 -KPX r r -3 -KPX r s 2 -KPX r semicolon -5 -KPX r t 23 -KPX r u 0 -KPX r v 24 -KPX r w 22 -KPX r x 19 -KPX r y 23 -KPX r z 6 -KPX s quoteright -5 -KPX s t -5 -KPX seven colon -47 -KPX seven comma -95 -KPX seven eight -15 -KPX seven five -22 -KPX seven four -72 -KPX seven one -34 -KPX seven period -95 -KPX seven seven 3 -KPX seven six -24 -KPX seven three -14 -KPX seven two -13 -KPX six four 6 -KPX six one -31 -KPX six seven -13 +KPX r m 0 +KPX r n 0 +KPX r o -6 +KPX r oacute -6 +KPX r ocircumflex -6 +KPX r odieresis -6 +KPX r oe -8 +KPX r ograve -6 +KPX r oslash -6 +KPX r p 8 +KPX r period -69 +KPX r q -3 +KPX r quoteright 1 +KPX r r 0 +KPX r s 4 +KPX r semicolon -22 +KPX r t 28 +KPX r u 2 +KPX r v 29 +KPX r w 31 +KPX r x 20 +KPX r y 24 +KPX r z 9 +KPX s quoteright -22 +KPX s t -3 +KPX seven colon -77 +KPX seven comma -119 +KPX seven eight -28 +KPX seven five -30 +KPX seven four -93 +KPX seven one -53 +KPX seven period -119 +KPX seven seven -4 +KPX seven six -40 +KPX seven three -23 +KPX seven two -28 +KPX six four 1 +KPX six one -43 +KPX six seven -30 KPX t S -8 -KPX t a 1 -KPX t aacute 1 -KPX t adieresis 1 -KPX t ae 1 -KPX t aring 1 -KPX t colon -13 -KPX t e -10 -KPX t eacute -10 -KPX t h 1 -KPX t o -10 -KPX t oacute -10 -KPX t odieresis -10 -KPX t quoteright 10 -KPX t semicolon -13 -KPX three four 8 -KPX three one -34 -KPX three seven -15 -KPX two four -38 -KPX two one -29 -KPX two seven -13 -KPX u quoteright 5 -KPX v a -16 -KPX v aacute -16 -KPX v acircumflex -16 -KPX v adieresis -16 -KPX v ae -16 -KPX v agrave -16 -KPX v aring -16 -KPX v atilde -16 -KPX v c -12 -KPX v colon -8 -KPX v comma -51 -KPX v e -16 -KPX v eacute -16 -KPX v ecircumflex -16 -KPX v egrave -16 -KPX v g -15 -KPX v hyphen -3 -KPX v l -2 -KPX v o -16 -KPX v oacute -16 -KPX v odieresis -16 -KPX v ograve -16 -KPX v oslash -12 -KPX v period -51 -KPX v s -10 -KPX v semicolon -8 -KPX w a -13 -KPX w aacute -13 -KPX w acircumflex -13 -KPX w adieresis -13 -KPX w ae -13 -KPX w agrave -13 -KPX w aring -13 -KPX w atilde -13 -KPX w c -5 -KPX w colon -10 -KPX w comma -37 -KPX w e -9 -KPX w eacute -9 -KPX w ecircumflex -9 -KPX w egrave -9 -KPX w g -8 -KPX w hyphen 3 -KPX w l -4 +KPX t a -1 +KPX t aacute -1 +KPX t adieresis -1 +KPX t ae 2 +KPX t aring -1 +KPX t colon -28 +KPX t e -14 +KPX t eacute -14 +KPX t h -3 +KPX t o -12 +KPX t oacute -12 +KPX t odieresis -12 +KPX t quoteright -1 +KPX t semicolon -28 +KPX three four -2 +KPX three one -49 +KPX three seven -33 +KPX two four -37 +KPX two one -36 +KPX two seven -25 +KPX u quoteright -8 +KPX v a -18 +KPX v aacute -18 +KPX v acircumflex -18 +KPX v adieresis -18 +KPX v ae -14 +KPX v agrave -18 +KPX v aring -18 +KPX v atilde -18 +KPX v c -16 +KPX v colon -23 +KPX v comma -69 +KPX v e -21 +KPX v eacute -21 +KPX v ecircumflex -21 +KPX v egrave -21 +KPX v g -14 +KPX v hyphen -12 +KPX v l 0 +KPX v o -17 +KPX v oacute -17 +KPX v odieresis -17 +KPX v ograve -17 +KPX v oslash -17 +KPX v period -69 +KPX v s -9 +KPX v semicolon -23 +KPX w a -15 +KPX w aacute -15 +KPX w acircumflex -15 +KPX w adieresis -15 +KPX w ae -11 +KPX w agrave -15 +KPX w aring -15 +KPX w atilde -15 +KPX w c -7 +KPX w colon -23 +KPX w comma -50 +KPX w e -12 +KPX w eacute -12 +KPX w ecircumflex -12 +KPX w egrave -12 +KPX w g -6 +KPX w hyphen -1 +KPX w l 0 KPX w o -9 KPX w oacute -9 KPX w odieresis -9 KPX w ograve -9 -KPX w oslash -5 -KPX w period -37 -KPX w s -7 -KPX w semicolon -10 -KPX x a -10 -KPX x c -13 -KPX x e -17 -KPX x eacute -17 -KPX x o -17 -KPX x q -14 -KPX y a -16 -KPX y aacute -16 -KPX y acircumflex -16 -KPX y adieresis -16 -KPX y ae -16 -KPX y agrave -16 -KPX y aring -16 -KPX y atilde -16 -KPX y c -13 -KPX y colon -9 -KPX y comma -50 -KPX y e -17 -KPX y eacute -17 -KPX y ecircumflex -17 -KPX y egrave -17 -KPX y g -15 -KPX y hyphen -2 -KPX y l -3 -KPX y o -17 -KPX y oacute -17 -KPX y odieresis -17 -KPX y ograve -17 -KPX y oslash -12 -KPX y period -49 -KPX y s -11 -KPX y semicolon -9 -KPX zero four 5 -KPX zero one -31 -KPX zero seven -21 +KPX w oslash -6 +KPX w period -50 +KPX w s -5 +KPX w semicolon -23 +KPX x a -17 +KPX x c -23 +KPX x e -28 +KPX x eacute -28 +KPX x o -25 +KPX x q -20 +KPX y a -22 +KPX y aacute -22 +KPX y acircumflex -22 +KPX y adieresis -22 +KPX y ae -18 +KPX y agrave -22 +KPX y aring -22 +KPX y atilde -22 +KPX y c -19 +KPX y colon -27 +KPX y comma -70 +KPX y e -24 +KPX y eacute -24 +KPX y ecircumflex -24 +KPX y egrave -24 +KPX y g -17 +KPX y hyphen -14 +KPX y l -4 +KPX y o -20 +KPX y oacute -20 +KPX y odieresis -20 +KPX y ograve -20 +KPX y oslash -19 +KPX y period -70 +KPX y s -12 +KPX y semicolon -27 +KPX zero four -2 +KPX zero one -46 +KPX zero seven -39 EndKernPairs EndKernData EndFontMetrics diff --git a/misc/gs_afm/HelvBo.afm b/misc/gs_afm/HelvBo.afm index a1100ae8d8..fe41636b63 100644 --- a/misc/gs_afm/HelvBo.afm +++ b/misc/gs_afm/HelvBo.afm @@ -1,1196 +1,1280 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-BoldCond -FullName Nimbus Sans L Bold Condensed +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. +FontName NimbusSanL-Bold +FullName Nimbus Sans L Bold FamilyName Nimbus Sans L Weight Bold ItalicAngle 0.0 IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +UnderlinePosition -155 +UnderlineThickness 69 +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -139 -228 822 975 -CapHeight 718 -XHeight 532 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 273 ; N exclam ; B 74 0 200 718 ; -C 34 ; WX 389 ; N quotedbl ; B 80 447 308 718 ; -C 35 ; WX 456 ; N numbersign ; B 15 0 441 698 ; -C 36 ; WX 456 ; N dollar ; B 24 -115 429 775 ; -C 37 ; WX 729 ; N percent ; B 23 -19 706 710 ; -C 38 ; WX 592 ; N ampersand ; B 44 -19 575 718 ; -C 39 ; WX 228 ; N quoteright ; B 57 445 171 718 ; -C 40 ; WX 273 ; N parenleft ; B 29 -207 257 734 ; -C 41 ; WX 273 ; N parenright ; B 16 -207 244 734 ; -C 42 ; WX 319 ; N asterisk ; B 22 387 297 718 ; -C 43 ; WX 479 ; N plus ; B 33 0 446 506 ; -C 44 ; WX 228 ; N comma ; B 52 -168 175 147 ; -C 45 ; WX 273 ; N hyphen ; B 22 215 251 345 ; -C 46 ; WX 228 ; N period ; B 52 0 175 147 ; -C 47 ; WX 228 ; N slash ; B -27 -19 255 737 ; -C 48 ; WX 456 ; N zero ; B 26 -19 430 710 ; -C 49 ; WX 456 ; N one ; B 57 0 310 710 ; -C 50 ; WX 456 ; N two ; B 21 0 419 710 ; -C 51 ; WX 456 ; N three ; B 22 -19 423 710 ; -C 52 ; WX 456 ; N four ; B 22 0 431 710 ; -C 53 ; WX 456 ; N five ; B 22 -19 423 698 ; -C 54 ; WX 456 ; N six ; B 25 -19 426 710 ; -C 55 ; WX 456 ; N seven ; B 20 0 433 698 ; -C 56 ; WX 456 ; N eight ; B 26 -19 430 710 ; -C 57 ; WX 456 ; N nine ; B 25 -19 428 710 ; -C 58 ; WX 273 ; N colon ; B 75 0 198 512 ; -C 59 ; WX 273 ; N semicolon ; B 75 -168 198 512 ; -C 60 ; WX 479 ; N less ; B 31 -15 448 521 ; -C 61 ; WX 479 ; N equal ; B 33 87 446 419 ; -C 62 ; WX 479 ; N greater ; B 31 -15 448 521 ; -C 63 ; WX 501 ; N question ; B 49 0 456 727 ; -C 64 ; WX 800 ; N at ; B 97 -19 702 737 ; -C 65 ; WX 592 ; N A ; B 16 0 576 718 ; -C 66 ; WX 592 ; N B ; B 62 0 549 718 ; -C 67 ; WX 592 ; N C ; B 36 -19 561 737 ; -C 68 ; WX 592 ; N D ; B 62 0 562 718 ; -C 69 ; WX 547 ; N E ; B 62 0 509 718 ; -C 70 ; WX 501 ; N F ; B 62 0 481 718 ; -C 71 ; WX 638 ; N G ; B 36 -19 585 737 ; -C 72 ; WX 592 ; N H ; B 58 0 534 718 ; -C 73 ; WX 228 ; N I ; B 52 0 175 718 ; -C 74 ; WX 456 ; N J ; B 18 -18 397 718 ; -C 75 ; WX 592 ; N K ; B 71 0 592 718 ; -C 76 ; WX 501 ; N L ; B 62 0 478 718 ; -C 77 ; WX 683 ; N M ; B 57 0 627 718 ; -C 78 ; WX 592 ; N N ; B 57 0 536 718 ; -C 79 ; WX 638 ; N O ; B 36 -19 602 737 ; -C 80 ; WX 547 ; N P ; B 62 0 514 718 ; -C 81 ; WX 638 ; N Q ; B 36 -52 604 737 ; -C 82 ; WX 592 ; N R ; B 62 0 555 718 ; -C 83 ; WX 547 ; N S ; B 32 -19 516 737 ; -C 84 ; WX 501 ; N T ; B 11 0 490 718 ; -C 85 ; WX 592 ; N U ; B 59 -19 534 718 ; -C 86 ; WX 547 ; N V ; B 16 0 531 718 ; -C 87 ; WX 774 ; N W ; B 13 0 762 718 ; -C 88 ; WX 547 ; N X ; B 11 0 535 718 ; -C 89 ; WX 547 ; N Y ; B 12 0 535 718 ; -C 90 ; WX 501 ; N Z ; B 20 0 481 718 ; -C 91 ; WX 273 ; N bracketleft ; B 52 -196 253 722 ; -C 92 ; WX 228 ; N backslash ; B -27 -19 255 737 ; -C 93 ; WX 273 ; N bracketright ; B 20 -196 221 722 ; -C 94 ; WX 479 ; N asciicircum ; B 51 323 428 698 ; -C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ; -C 96 ; WX 228 ; N quoteleft ; B 57 454 171 727 ; -C 97 ; WX 456 ; N a ; B 24 -14 432 546 ; -C 98 ; WX 501 ; N b ; B 50 -14 474 718 ; -C 99 ; WX 456 ; N c ; B 28 -14 430 546 ; -C 100 ; WX 501 ; N d ; B 28 -14 452 718 ; -C 101 ; WX 456 ; N e ; B 19 -14 433 546 ; -C 102 ; WX 273 ; N f ; B 8 0 261 727 ; -C 103 ; WX 501 ; N g ; B 33 -217 453 546 ; -C 104 ; WX 501 ; N h ; B 53 0 448 718 ; -C 105 ; WX 228 ; N i ; B 57 0 171 725 ; -C 106 ; WX 228 ; N j ; B 2 -214 171 725 ; -C 107 ; WX 456 ; N k ; B 57 0 461 718 ; -C 108 ; WX 228 ; N l ; B 57 0 171 718 ; -C 109 ; WX 729 ; N m ; B 52 0 677 546 ; -C 110 ; WX 501 ; N n ; B 53 0 448 546 ; -C 111 ; WX 501 ; N o ; B 28 -14 474 546 ; -C 112 ; WX 501 ; N p ; B 51 -207 474 546 ; -C 113 ; WX 501 ; N q ; B 28 -207 453 546 ; -C 114 ; WX 319 ; N r ; B 52 0 306 546 ; -C 115 ; WX 456 ; N s ; B 25 -14 426 546 ; -C 116 ; WX 273 ; N t ; B 8 -6 253 676 ; -C 117 ; WX 501 ; N u ; B 54 -14 447 532 ; -C 118 ; WX 456 ; N v ; B 11 0 445 532 ; -C 119 ; WX 638 ; N w ; B 8 0 631 532 ; -C 120 ; WX 456 ; N x ; B 12 0 444 532 ; -C 121 ; WX 456 ; N y ; B 8 -214 442 532 ; -C 122 ; WX 410 ; N z ; B 16 0 394 532 ; -C 123 ; WX 319 ; N braceleft ; B 39 -196 299 722 ; -C 124 ; WX 230 ; N bar ; B 69 -19 161 737 ; -C 125 ; WX 319 ; N braceright ; B 20 -196 280 722 ; -C 126 ; WX 479 ; N asciitilde ; B 50 173 429 336 ; -C 161 ; WX 273 ; N exclamdown ; B 74 -186 200 532 ; -C 162 ; WX 456 ; N cent ; B 28 -118 430 628 ; -C 163 ; WX 456 ; N sterling ; B 23 -16 444 718 ; -C 164 ; WX 137 ; N fraction ; B -139 -19 276 710 ; -C 165 ; WX 456 ; N yen ; B -7 0 463 698 ; -C 166 ; WX 456 ; N florin ; B -8 -210 423 737 ; -C 167 ; WX 456 ; N section ; B 28 -184 428 727 ; -C 168 ; WX 456 ; N currency ; B -2 76 458 636 ; -C 169 ; WX 195 ; N quotesingle ; B 57 447 138 718 ; -C 170 ; WX 410 ; N quotedblleft ; B 52 454 358 727 ; -C 171 ; WX 456 ; N guillemotleft ; B 72 76 384 484 ; -C 172 ; WX 273 ; N guilsinglleft ; B 68 76 205 484 ; -C 173 ; WX 273 ; N guilsinglright ; B 68 76 205 484 ; -C 174 ; WX 501 ; N fi ; B 8 0 444 727 ; -C 175 ; WX 501 ; N fl ; B 8 0 444 727 ; -C 177 ; WX 456 ; N endash ; B 0 226 456 333 ; -C 178 ; WX 456 ; N dagger ; B 30 -171 426 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 30 -171 426 718 ; -C 180 ; WX 228 ; N periodcentered ; B 48 172 180 334 ; -C 182 ; WX 456 ; N paragraph ; B -7 -191 442 700 ; -C 183 ; WX 287 ; N bullet ; B 8 194 279 524 ; -C 184 ; WX 228 ; N quotesinglbase ; B 57 -146 171 127 ; -C 185 ; WX 410 ; N quotedblbase ; B 52 -146 358 127 ; -C 186 ; WX 410 ; N quotedblright ; B 52 445 358 718 ; -C 187 ; WX 456 ; N guillemotright ; B 72 76 384 484 ; -C 188 ; WX 820 ; N ellipsis ; B 75 0 745 147 ; -C 189 ; WX 820 ; N perthousand ; B -2 -19 822 710 ; -C 191 ; WX 501 ; N questiondown ; B 45 -195 452 532 ; -C 193 ; WX 273 ; N grave ; B -19 604 184 750 ; -C 194 ; WX 273 ; N acute ; B 89 604 292 750 ; -C 195 ; WX 273 ; N circumflex ; B -8 604 281 750 ; -C 196 ; WX 273 ; N tilde ; B -14 610 287 737 ; -C 197 ; WX 273 ; N macron ; B -5 605 278 678 ; -C 198 ; WX 273 ; N breve ; B -2 604 275 750 ; -C 199 ; WX 273 ; N dotaccent ; B 85 614 189 729 ; -C 200 ; WX 273 ; N dieresis ; B 5 614 268 729 ; -C 202 ; WX 273 ; N ring ; B 48 568 225 776 ; -C 203 ; WX 273 ; N cedilla ; B 5 -228 201 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 7 604 399 750 ; -C 206 ; WX 273 ; N ogonek ; B 58 -228 249 0 ; -C 207 ; WX 273 ; N caron ; B -8 604 281 750 ; -C 208 ; WX 820 ; N emdash ; B 0 226 820 333 ; -C 225 ; WX 820 ; N AE ; B 4 0 782 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 18 276 285 737 ; -C 232 ; WX 501 ; N Lslash ; B -16 0 478 718 ; -C 233 ; WX 638 ; N Oslash ; B 27 -27 610 745 ; -C 234 ; WX 820 ; N OE ; B 30 -19 788 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 5 276 295 737 ; -C 241 ; WX 729 ; N ae ; B 24 -14 704 546 ; -C 245 ; WX 228 ; N dotlessi ; B 57 0 171 532 ; -C 248 ; WX 228 ; N lslash ; B -15 0 243 718 ; -C 249 ; WX 501 ; N oslash ; B 18 -29 483 560 ; -C 250 ; WX 774 ; N oe ; B 28 -14 748 546 ; -C 251 ; WX 501 ; N germandbls ; B 57 -14 475 731 ; -C -1 ; WX 547 ; N Yacute ; B 12 0 535 936 ; -C -1 ; WX 592 ; N Ucircumflex ; B 59 -19 534 936 ; -C -1 ; WX 592 ; N Ugrave ; B 59 -19 534 936 ; -C -1 ; WX 501 ; N Zcaron ; B 20 0 481 936 ; -C -1 ; WX 547 ; N Ydieresis ; B 12 0 535 915 ; -C -1 ; WX 273 ; N threesuperior ; B 7 271 267 722 ; -C -1 ; WX 592 ; N Uacute ; B 59 -19 534 936 ; -C -1 ; WX 273 ; N twosuperior ; B 7 283 266 722 ; -C -1 ; WX 592 ; N Udieresis ; B 59 -19 534 915 ; -C -1 ; WX 228 ; N middot ; B 48 172 180 334 ; -C -1 ; WX 273 ; N onesuperior ; B 21 283 194 710 ; -C -1 ; WX 456 ; N aacute ; B 24 -14 432 750 ; -C -1 ; WX 456 ; N agrave ; B 24 -14 432 750 ; -C -1 ; WX 456 ; N acircumflex ; B 24 -14 432 750 ; -C -1 ; WX 547 ; N Scaron ; B 32 -19 516 936 ; -C -1 ; WX 638 ; N Otilde ; B 36 -19 602 923 ; -C -1 ; WX 273 ; N sfthyphen ; B 22 215 251 345 ; -C -1 ; WX 456 ; N atilde ; B 24 -14 432 737 ; -C -1 ; WX 456 ; N aring ; B 24 -14 432 803 ; -C -1 ; WX 456 ; N adieresis ; B 24 -14 432 729 ; -C -1 ; WX 638 ; N Ograve ; B 36 -19 602 936 ; -C -1 ; WX 638 ; N Ocircumflex ; B 36 -19 602 936 ; -C -1 ; WX 638 ; N Odieresis ; B 36 -19 602 915 ; -C -1 ; WX 592 ; N Ntilde ; B 57 0 536 923 ; -C -1 ; WX 456 ; N edieresis ; B 19 -14 433 729 ; -C -1 ; WX 456 ; N eacute ; B 19 -14 433 750 ; -C -1 ; WX 456 ; N egrave ; B 19 -14 433 750 ; -C -1 ; WX 228 ; N Icircumflex ; B -30 0 259 936 ; -C -1 ; WX 456 ; N ecircumflex ; B 19 -14 433 750 ; -C -1 ; WX 228 ; N Igrave ; B -41 0 175 936 ; -C -1 ; WX 228 ; N Iacute ; B 52 0 270 936 ; -C -1 ; WX 228 ; N Idieresis ; B -17 0 246 915 ; -C -1 ; WX 328 ; N degree ; B 47 426 281 712 ; -C -1 ; WX 547 ; N Ecircumflex ; B 62 0 509 936 ; -C -1 ; WX 479 ; N minus ; B 33 197 446 309 ; -C -1 ; WX 479 ; N multiply ; B 33 1 447 505 ; -C -1 ; WX 479 ; N divide ; B 33 -42 446 548 ; -C -1 ; WX 547 ; N Egrave ; B 62 0 509 936 ; -C -1 ; WX 820 ; N trademark ; B 36 306 784 718 ; -C -1 ; WX 638 ; N Oacute ; B 36 -19 602 936 ; -C -1 ; WX 501 ; N thorn ; B 51 -207 474 718 ; -C -1 ; WX 501 ; N eth ; B 28 -14 474 737 ; -C -1 ; WX 547 ; N Eacute ; B 62 0 509 936 ; -C -1 ; WX 456 ; N ccedilla ; B 28 -228 430 546 ; -C -1 ; WX 228 ; N idieresis ; B -17 0 246 729 ; -C -1 ; WX 228 ; N iacute ; B 57 0 270 750 ; -C -1 ; WX 228 ; N igrave ; B -41 0 171 750 ; -C -1 ; WX 479 ; N plusminus ; B 33 0 446 578 ; -C -1 ; WX 684 ; N onehalf ; B 21 -19 651 710 ; -C -1 ; WX 684 ; N onequarter ; B 21 -19 628 710 ; -C -1 ; WX 684 ; N threequarters ; B 13 -19 655 722 ; -C -1 ; WX 228 ; N icircumflex ; B -30 0 259 750 ; -C -1 ; WX 547 ; N Edieresis ; B 62 0 509 915 ; -C -1 ; WX 501 ; N ntilde ; B 53 0 448 737 ; -C -1 ; WX 592 ; N Aring ; B 16 0 576 975 ; -C -1 ; WX 501 ; N odieresis ; B 28 -14 474 729 ; -C -1 ; WX 501 ; N oacute ; B 28 -14 474 750 ; -C -1 ; WX 501 ; N ograve ; B 28 -14 474 750 ; -C -1 ; WX 501 ; N ocircumflex ; B 28 -14 474 750 ; -C -1 ; WX 501 ; N otilde ; B 28 -14 474 737 ; -C -1 ; WX 456 ; N scaron ; B 25 -14 426 750 ; -C -1 ; WX 501 ; N udieresis ; B 54 -14 447 729 ; -C -1 ; WX 501 ; N uacute ; B 54 -14 447 750 ; -C -1 ; WX 501 ; N ugrave ; B 54 -14 447 750 ; -C -1 ; WX 501 ; N ucircumflex ; B 54 -14 447 750 ; -C -1 ; WX 456 ; N yacute ; B 8 -214 442 750 ; -C -1 ; WX 410 ; N zcaron ; B 16 0 394 750 ; -C -1 ; WX 456 ; N ydieresis ; B 8 -214 442 729 ; -C -1 ; WX 604 ; N copyright ; B -9 -19 614 737 ; -C -1 ; WX 604 ; N registered ; B -9 -19 613 737 ; -C -1 ; WX 592 ; N Atilde ; B 16 0 576 923 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 36 -228 561 737 ; -C -1 ; WX 592 ; N Acircumflex ; B 16 0 576 936 ; -C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ; -C -1 ; WX 479 ; N logicalnot ; B 33 108 446 419 ; -C -1 ; WX 592 ; N Aacute ; B 16 0 576 936 ; -C -1 ; WX 592 ; N Eth ; B -4 0 562 718 ; -C -1 ; WX 230 ; N brokenbar ; B 69 -19 161 737 ; -C -1 ; WX 547 ; N Thorn ; B 62 0 514 718 ; -C -1 ; WX 592 ; N Adieresis ; B 16 0 576 915 ; -C -1 ; WX 501 ; N mu ; B 54 -207 447 532 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; +FontBBox -173 -307 1003 949 +CapHeight 729 +XHeight 540 +Descender -217 +Ascender 729 +StartCharMetrics 316 +C 32 ; WX 278 ; N space ; B 214 0 214 0 ; +C 33 ; WX 333 ; N exclam ; B 112 0 262 726 ; +C 34 ; WX 474 ; N quotedbl ; B 50 470 424 729 ; +C 35 ; WX 556 ; N numbersign ; B 3 -32 553 697 ; +C 36 ; WX 556 ; N dollar ; B 22 -126 527 763 ; +C 37 ; WX 889 ; N percent ; B 22 -20 863 709 ; +C 38 ; WX 722 ; N ampersand ; B 55 -23 694 723 ; +C 39 ; WX 278 ; N quoteright ; B 66 469 201 729 ; +C 40 ; WX 333 ; N parenleft ; B 40 -200 303 729 ; +C 41 ; WX 333 ; N parenright ; B 22 -200 285 729 ; +C 42 ; WX 389 ; N asterisk ; B 23 407 357 729 ; +C 43 ; WX 584 ; N plus ; B 50 -10 533 473 ; +C 44 ; WX 278 ; N comma ; B 64 -174 214 146 ; +C 45 ; WX 333 ; N hyphen ; B 26 207 298 342 ; +C 46 ; WX 278 ; N period ; B 64 0 214 146 ; +C 47 ; WX 278 ; N slash ; B 2 -14 275 714 ; +C 48 ; WX 556 ; N zero ; B 29 -23 517 724 ; +C 49 ; WX 556 ; N one ; B 68 0 378 709 ; +C 50 ; WX 556 ; N two ; B 30 0 515 724 ; +C 51 ; WX 556 ; N three ; B 29 -23 516 724 ; +C 52 ; WX 556 ; N four ; B 24 0 522 709 ; +C 53 ; WX 556 ; N five ; B 27 -23 517 709 ; +C 54 ; WX 556 ; N six ; B 32 -23 519 724 ; +C 55 ; WX 556 ; N seven ; B 29 0 528 709 ; +C 56 ; WX 556 ; N eight ; B 22 -23 525 724 ; +C 57 ; WX 556 ; N nine ; B 28 -24 516 724 ; +C 58 ; WX 333 ; N colon ; B 113 0 263 520 ; +C 59 ; WX 333 ; N semicolon ; B 113 -174 263 520 ; +C 60 ; WX 584 ; N less ; B 40 -10 529 474 ; +C 61 ; WX 584 ; N equal ; B 50 52 534 411 ; +C 62 ; WX 584 ; N greater ; B 40 -10 529 474 ; +C 63 ; WX 611 ; N question ; B 64 0 556 744 ; +C 64 ; WX 975 ; N at ; B 27 -138 947 745 ; +C 65 ; WX 722 ; N A ; B 26 0 703 729 ; +C 66 ; WX 722 ; N B ; B 82 0 666 729 ; +C 67 ; WX 722 ; N C ; B 44 -23 685 741 ; +C 68 ; WX 722 ; N D ; B 77 0 681 729 ; +C 69 ; WX 667 ; N E ; B 79 0 624 729 ; +C 70 ; WX 611 ; N F ; B 74 0 586 729 ; +C 71 ; WX 778 ; N G ; B 42 -23 711 741 ; +C 72 ; WX 722 ; N H ; B 68 0 657 729 ; +C 73 ; WX 278 ; N I ; B 63 0 213 729 ; +C 74 ; WX 556 ; N J ; B 24 -23 486 729 ; +C 75 ; WX 722 ; N K ; B 74 0 717 729 ; +C 76 ; WX 611 ; N L ; B 80 0 579 729 ; +C 77 ; WX 833 ; N M ; B 66 0 776 729 ; +C 78 ; WX 722 ; N N ; B 68 0 661 729 ; +C 79 ; WX 778 ; N O ; B 40 -23 742 741 ; +C 80 ; WX 667 ; N P ; B 76 0 633 729 ; +C 81 ; WX 778 ; N Q ; B 43 -54 745 741 ; +C 82 ; WX 722 ; N R ; B 80 0 677 729 ; +C 83 ; WX 667 ; N S ; B 32 -23 633 741 ; +C 84 ; WX 611 ; N T ; B 14 0 598 729 ; +C 85 ; WX 722 ; N U ; B 76 -23 654 729 ; +C 86 ; WX 667 ; N V ; B 24 0 647 729 ; +C 87 ; WX 944 ; N W ; B 13 0 932 729 ; +C 88 ; WX 667 ; N X ; B 22 0 653 729 ; +C 89 ; WX 667 ; N Y ; B 27 0 650 729 ; +C 90 ; WX 611 ; N Z ; B 30 0 578 729 ; +C 91 ; WX 333 ; N bracketleft ; B 66 -200 308 729 ; +C 92 ; WX 278 ; N backslash ; B -12 -14 289 714 ; +C 93 ; WX 333 ; N bracketright ; B 18 -200 260 729 ; +C 94 ; WX 584 ; N asciicircum ; B 61 270 522 695 ; +C 95 ; WX 556 ; N underscore ; B -22 -189 578 -120 ; +C 96 ; WX 278 ; N quoteleft ; B 67 469 202 729 ; +C 97 ; WX 556 ; N a ; B 28 -23 524 549 ; +C 98 ; WX 611 ; N b ; B 59 -23 575 729 ; +C 99 ; WX 556 ; N c ; B 34 -23 522 549 ; +C 100 ; WX 611 ; N d ; B 29 -23 545 729 ; +C 101 ; WX 556 ; N e ; B 22 -23 525 549 ; +C 102 ; WX 333 ; N f ; B 14 0 313 729 ; +C 103 ; WX 611 ; N g ; B 34 -218 541 549 ; +C 104 ; WX 611 ; N h ; B 67 0 541 729 ; +C 105 ; WX 278 ; N i ; B 67 0 207 729 ; +C 106 ; WX 278 ; N j ; B 4 -218 210 729 ; +C 107 ; WX 556 ; N k ; B 59 0 548 729 ; +C 108 ; WX 278 ; N l ; B 67 0 207 729 ; +C 109 ; WX 889 ; N m ; B 60 0 824 549 ; +C 110 ; WX 611 ; N n ; B 63 0 546 549 ; +C 111 ; WX 611 ; N o ; B 35 -23 569 549 ; +C 112 ; WX 611 ; N p ; B 58 -218 574 549 ; +C 113 ; WX 611 ; N q ; B 28 -218 544 549 ; +C 114 ; WX 389 ; N r ; B 63 0 370 549 ; +C 115 ; WX 556 ; N s ; B 29 -23 520 549 ; +C 116 ; WX 333 ; N t ; B 14 -23 301 674 ; +C 117 ; WX 611 ; N u ; B 58 -23 541 540 ; +C 118 ; WX 556 ; N v ; B 14 0 536 540 ; +C 119 ; WX 778 ; N w ; B 5 0 766 540 ; +C 120 ; WX 556 ; N x ; B 16 0 535 540 ; +C 121 ; WX 556 ; N y ; B 9 -219 538 540 ; +C 122 ; WX 500 ; N z ; B 21 0 468 540 ; +C 123 ; WX 389 ; N braceleft ; B 37 -200 317 729 ; +C 124 ; WX 280 ; N bar ; B 100 -200 180 729 ; +C 125 ; WX 389 ; N braceright ; B 72 -200 352 729 ; +C 126 ; WX 584 ; N asciitilde ; B 60 142 519 314 ; +C 161 ; WX 333 ; N exclamdown ; B 66 -186 216 540 ; +C 162 ; WX 556 ; N cent ; B 36 -124 522 634 ; +C 163 ; WX 556 ; N sterling ; B 31 -23 537 715 ; +C 164 ; WX 167 ; N fraction ; B -173 -20 337 715 ; +C 165 ; WX 556 ; N yen ; B 5 0 552 704 ; +C 166 ; WX 556 ; N florin ; B 21 -220 535 744 ; +C 167 ; WX 556 ; N section ; B 33 -201 518 723 ; +C 168 ; WX 556 ; N currency ; B 26 100 530 604 ; +C 169 ; WX 238 ; N quotesingle ; B 50 470 188 729 ; +C 170 ; WX 500 ; N quotedblleft ; B 71 469 433 729 ; +C 171 ; WX 556 ; N guillemotleft ; B 88 72 468 481 ; +C 172 ; WX 333 ; N guilsinglleft ; B 83 72 250 481 ; +C 173 ; WX 333 ; N guilsinglright ; B 80 72 247 481 ; +C 174 ; WX 611 ; N fi ; B 9 0 548 729 ; +C 175 ; WX 611 ; N fl ; B 12 0 546 729 ; +C 177 ; WX 556 ; N endash ; B -9 207 557 311 ; +C 178 ; WX 556 ; N dagger ; B 31 -194 523 709 ; +C 179 ; WX 556 ; N daggerdbl ; B 28 -194 520 709 ; +C 180 ; WX 278 ; N periodcentered ; B 64 169 188 292 ; +C 182 ; WX 556 ; N paragraph ; B 19 -191 529 729 ; +C 183 ; WX 350 ; N bullet ; B 50 175 300 425 ; +C 184 ; WX 278 ; N quotesinglbase ; B 66 -135 201 125 ; +C 185 ; WX 500 ; N quotedblbase ; B 72 -135 432 125 ; +C 186 ; WX 500 ; N quotedblright ; B 73 469 440 729 ; +C 187 ; WX 556 ; N guillemotright ; B 88 72 462 481 ; +C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ; +C 189 ; WX 1000 ; N perthousand ; B 11 -22 990 739 ; +C 191 ; WX 611 ; N questiondown ; B 51 -204 544 540 ; +C 193 ; WX 333 ; N grave ; B 17 607 213 757 ; +C 194 ; WX 333 ; N acute ; B 121 607 317 757 ; +C 195 ; WX 333 ; N circumflex ; B 8 607 326 757 ; +C 196 ; WX 333 ; N tilde ; B -9 621 345 749 ; +C 197 ; WX 333 ; N macron ; B 16 640 315 719 ; +C 198 ; WX 333 ; N breve ; B 35 605 299 748 ; +C 199 ; WX 333 ; N dotaccent ; B 112 621 222 743 ; +C 200 ; WX 333 ; N dieresis ; B 18 621 314 743 ; +C 202 ; WX 333 ; N ring ; B 77 590 257 770 ; +C 203 ; WX 333 ; N cedilla ; B 27 -220 294 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B -44 610 340 757 ; +C 206 ; WX 333 ; N ogonek ; B 45 -234 268 0 ; +C 207 ; WX 333 ; N caron ; B 9 607 327 757 ; +C 208 ; WX 1000 ; N emdash ; B -7 207 1003 311 ; +C 225 ; WX 1000 ; N AE ; B 1 0 966 729 ; +C 227 ; WX 370 ; N ordfeminine ; B 31 262 329 729 ; +C 232 ; WX 611 ; N Lslash ; B 0 0 597 729 ; +C 233 ; WX 778 ; N Oslash ; B 31 -39 755 749 ; +C 234 ; WX 1000 ; N OE ; B 28 -23 970 741 ; +C 235 ; WX 365 ; N ordmasculine ; B 23 262 343 729 ; +C 241 ; WX 889 ; N ae ; B 27 -24 857 549 ; +C 245 ; WX 278 ; N dotlessi ; B 67 0 207 540 ; +C 248 ; WX 278 ; N lslash ; B 0 0 252 729 ; +C 249 ; WX 611 ; N oslash ; B 11 -38 598 557 ; +C 250 ; WX 944 ; N oe ; B 23 -23 920 549 ; +C 251 ; WX 611 ; N germandbls ; B 67 -17 575 729 ; +C -1 ; WX 722 ; N Udieresis ; B 76 -23 654 922 ; +C -1 ; WX 722 ; N Uacute ; B 76 -23 654 936 ; +C -1 ; WX 667 ; N Scedilla ; B 32 -220 633 741 ; +C -1 ; WX 611 ; N Tcaron ; B 14 0 598 936 ; +C -1 ; WX 667 ; N Scaron ; B 32 -23 633 936 ; +C -1 ; WX 722 ; N Rcaron ; B 80 0 677 936 ; +C -1 ; WX 722 ; N Racute ; B 80 0 677 936 ; +C -1 ; WX 667 ; N Sacute ; B 32 -23 633 936 ; +C -1 ; WX 778 ; N Otilde ; B 40 -23 742 928 ; +C -1 ; WX 611 ; N ucircumflex ; B 58 -23 541 757 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 40 -23 742 936 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 76 -23 654 936 ; +C -1 ; WX 667 ; N Yacute ; B 27 0 650 936 ; +C -1 ; WX 722 ; N Eth ; B 0 0 681 729 ; +C -1 ; WX 722 ; N Dcroat ; B 0 0 681 729 ; +C -1 ; WX 611 ; N Zacute ; B 30 0 578 936 ; +C -1 ; WX 722 ; N Uring ; B 76 -23 654 949 ; +C -1 ; WX 611 ; N gbreve ; B 34 -218 541 748 ; +C -1 ; WX 556 ; N eogonek ; B 21 -234 525 549 ; +C -1 ; WX 556 ; N edotaccent ; B 22 -23 525 743 ; +C -1 ; WX 556 ; N ecaron ; B 22 -23 525 757 ; +C -1 ; WX 722 ; N Ugrave ; B 76 -23 654 936 ; +C -1 ; WX 667 ; N Thorn ; B 76 0 633 729 ; +C -1 ; WX 556 ; N eacute ; B 22 -23 525 757 ; +C -1 ; WX 556 ; N edieresis ; B 22 -23 525 743 ; +C -1 ; WX 707 ; N dcaron ; B 29 -23 720 729 ; +C -1 ; WX 556 ; N ccedilla ; B 34 -220 522 549 ; +C -1 ; WX 556 ; N ccaron ; B 34 -23 522 757 ; +C -1 ; WX 556 ; N cacute ; B 34 -23 522 757 ; +C -1 ; WX 556 ; N aogonek ; B 28 -233 548 549 ; +C -1 ; WX 556 ; N aring ; B 28 -23 524 770 ; +C -1 ; WX 556 ; N atilde ; B 28 -23 524 749 ; +C -1 ; WX 556 ; N abreve ; B 28 -23 524 748 ; +C -1 ; WX 556 ; N egrave ; B 22 -23 525 757 ; +C -1 ; WX 556 ; N agrave ; B 28 -23 524 757 ; +C -1 ; WX 556 ; N aacute ; B 28 -23 524 757 ; +C -1 ; WX 556 ; N adieresis ; B 28 -23 524 743 ; +C -1 ; WX 722 ; N Uogonek ; B 76 -234 654 729 ; +C -1 ; WX 611 ; N ugrave ; B 58 -23 541 757 ; +C -1 ; WX 611 ; N uacute ; B 58 -23 541 757 ; +C -1 ; WX 611 ; N udieresis ; B 58 -23 541 743 ; +C -1 ; WX 385 ; N tcaron ; B 14 -23 398 829 ; +C -1 ; WX 556 ; N scommaaccent ; B 29 -307 520 549 ; +C -1 ; WX 611 ; N Zcaron ; B 30 0 578 936 ; +C -1 ; WX 556 ; N ecircumflex ; B 22 -23 525 757 ; +C -1 ; WX 722 ; N Ucircumflex ; B 76 -23 654 936 ; +C -1 ; WX 556 ; N acircumflex ; B 28 -23 524 757 ; +C -1 ; WX 611 ; N Zdotaccent ; B 30 0 578 922 ; +C -1 ; WX 556 ; N scaron ; B 29 -23 520 757 ; +C -1 ; WX 722 ; N Amacron ; B 26 0 703 898 ; +C -1 ; WX 556 ; N sacute ; B 29 -23 520 757 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 14 -307 598 729 ; +C -1 ; WX 667 ; N Ydieresis ; B 27 0 650 922 ; +C -1 ; WX 611 ; N thorn ; B 58 -218 574 729 ; +C -1 ; WX 667 ; N Emacron ; B 79 0 624 898 ; +C -1 ; WX 778 ; N Ograve ; B 40 -23 742 936 ; +C -1 ; WX 778 ; N Oacute ; B 40 -23 742 936 ; +C -1 ; WX 778 ; N Odieresis ; B 40 -23 742 922 ; +C -1 ; WX 722 ; N Ntilde ; B 68 0 661 928 ; +C -1 ; WX 722 ; N Ncaron ; B 68 0 661 936 ; +C -1 ; WX 722 ; N Nacute ; B 68 0 661 936 ; +C -1 ; WX 611 ; N Lcaron ; B 80 0 579 729 ; +C -1 ; WX 611 ; N Lacute ; B 80 0 579 936 ; +C -1 ; WX 278 ; N Idotaccent ; B 63 0 213 922 ; +C -1 ; WX 389 ; N racute ; B 63 0 370 757 ; +C -1 ; WX 278 ; N Icircumflex ; B -19 0 299 936 ; +C -1 ; WX 611 ; N ohungarumlaut ; B 35 -23 569 757 ; +C -1 ; WX 611 ; N otilde ; B 35 -23 569 749 ; +C -1 ; WX 556 ; N Euro ; B 6 -23 546 724 ; +C -1 ; WX 611 ; N ocircumflex ; B 35 -23 569 757 ; +C -1 ; WX 351 ; N onesuperior ; B 40 284 242 709 ; +C -1 ; WX 351 ; N twosuperior ; B 16 284 328 718 ; +C -1 ; WX 351 ; N threesuperior ; B 15 271 329 718 ; +C -1 ; WX 278 ; N Igrave ; B -10 0 213 936 ; +C -1 ; WX 278 ; N Iacute ; B 63 0 290 936 ; +C -1 ; WX 278 ; N Imacron ; B 2 0 274 898 ; +C -1 ; WX 278 ; N Iogonek ; B 34 -233 237 729 ; +C -1 ; WX 278 ; N Idieresis ; B -9 0 287 922 ; +C -1 ; WX 778 ; N Gbreve ; B 42 -23 711 927 ; +C -1 ; WX 722 ; N Umacron ; B 76 -23 654 898 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 74 -307 717 729 ; +C -1 ; WX 611 ; N ograve ; B 35 -23 569 757 ; +C -1 ; WX 667 ; N Scommaaccent ; B 32 -307 633 741 ; +C -1 ; WX 667 ; N Eogonek ; B 79 -233 648 729 ; +C -1 ; WX 611 ; N oacute ; B 35 -23 569 757 ; +C -1 ; WX 667 ; N Edotaccent ; B 79 0 624 922 ; +C -1 ; WX 278 ; N iogonek ; B 34 -233 231 729 ; +C -1 ; WX 611 ; N gcommaaccent ; B 34 -218 541 853 ; +C -1 ; WX 611 ; N odieresis ; B 35 -23 569 743 ; +C -1 ; WX 611 ; N ntilde ; B 63 0 546 749 ; +C -1 ; WX 611 ; N ncaron ; B 63 0 546 757 ; +C -1 ; WX 667 ; N Ecaron ; B 79 0 624 936 ; +C -1 ; WX 667 ; N Ecircumflex ; B 79 0 624 936 ; +C -1 ; WX 556 ; N scedilla ; B 29 -220 520 549 ; +C -1 ; WX 389 ; N rcaron ; B 54 0 372 757 ; +C -1 ; WX 667 ; N Egrave ; B 79 0 624 936 ; +C -1 ; WX 667 ; N Eacute ; B 79 0 624 936 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 42 -307 711 741 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 80 -307 677 729 ; +C -1 ; WX 667 ; N Edieresis ; B 79 0 624 922 ; +C -1 ; WX 611 ; N nacute ; B 63 0 546 757 ; +C -1 ; WX 611 ; N uogonek ; B 58 -233 564 540 ; +C -1 ; WX 611 ; N umacron ; B 58 -23 541 719 ; +C -1 ; WX 722 ; N Dcaron ; B 77 0 681 936 ; +C -1 ; WX 369 ; N lcaron ; B 67 0 382 729 ; +C -1 ; WX 722 ; N Ccaron ; B 44 -23 685 936 ; +C -1 ; WX 722 ; N Cacute ; B 44 -23 685 936 ; +C -1 ; WX 722 ; N Ccedilla ; B 44 -220 685 741 ; +C -1 ; WX 606 ; N degree ; B 151 383 454 686 ; +C -1 ; WX 722 ; N Aogonek ; B 26 -233 723 729 ; +C -1 ; WX 584 ; N minus ; B 40 172 544 291 ; +C -1 ; WX 584 ; N multiply ; B 79 18 505 444 ; +C -1 ; WX 584 ; N divide ; B 50 -11 534 474 ; +C -1 ; WX 722 ; N Aring ; B 26 0 703 949 ; +C -1 ; WX 1000 ; N trademark ; B 71 273 929 729 ; +C -1 ; WX 389 ; N rcommaaccent ; B 63 -307 370 549 ; +C -1 ; WX 278 ; N lacute ; B 67 0 278 936 ; +C -1 ; WX 611 ; N omacron ; B 35 -23 569 719 ; +C -1 ; WX 722 ; N Atilde ; B 26 0 703 928 ; +C -1 ; WX 278 ; N icircumflex ; B -19 0 299 757 ; +C -1 ; WX 278 ; N igrave ; B -10 0 207 757 ; +C -1 ; WX 611 ; N ncommaaccent ; B 63 -307 546 549 ; +C -1 ; WX 278 ; N lcommaaccent ; B 67 -307 207 729 ; +C -1 ; WX 584 ; N plusminus ; B 56 -16 527 608 ; +C -1 ; WX 869 ; N onehalf ; B 40 -20 846 715 ; +C -1 ; WX 869 ; N onequarter ; B 40 -20 850 715 ; +C -1 ; WX 869 ; N threequarters ; B 15 -20 850 718 ; +C -1 ; WX 278 ; N iacute ; B 67 0 290 757 ; +C -1 ; WX 722 ; N Abreve ; B 26 0 703 927 ; +C -1 ; WX 556 ; N kcommaaccent ; B 59 -307 548 729 ; +C -1 ; WX 778 ; N Omacron ; B 40 -23 742 898 ; +C -1 ; WX 278 ; N imacron ; B 7 0 266 719 ; +C -1 ; WX 556 ; N emacron ; B 22 -23 525 719 ; +C -1 ; WX 556 ; N amacron ; B 28 -23 524 719 ; +C -1 ; WX 333 ; N tcommaaccent ; B 14 -307 301 674 ; +C -1 ; WX 556 ; N ydieresis ; B 9 -219 538 743 ; +C -1 ; WX 500 ; N zdotaccent ; B 21 0 468 743 ; +C -1 ; WX 500 ; N zcaron ; B 21 0 468 757 ; +C -1 ; WX 500 ; N zacute ; B 21 0 468 757 ; +C -1 ; WX 556 ; N yacute ; B 9 -219 538 757 ; +C -1 ; WX 611 ; N uhungarumlaut ; B 58 -23 559 757 ; +C -1 ; WX 611 ; N eth ; B 35 -23 569 744 ; +C -1 ; WX 611 ; N uring ; B 58 -23 541 770 ; +C -1 ; WX 778 ; N Ocircumflex ; B 40 -23 742 936 ; +C -1 ; WX 333 ; N commaaccent ; B 112 -307 234 -60 ; +C -1 ; WX 737 ; N copyright ; B -14 -22 751 743 ; +C -1 ; WX 737 ; N registered ; B -14 -22 751 743 ; +C -1 ; WX 722 ; N Acircumflex ; B 26 0 703 936 ; +C -1 ; WX 278 ; N idieresis ; B -9 0 287 743 ; +C -1 ; WX 489 ; N lozenge ; B 16 0 462 744 ; +C -1 ; WX 729 ; N Delta ; B 8 0 721 729 ; +C -1 ; WX 548 ; N notequal ; B 50 -69 534 528 ; +C -1 ; WX 542 ; N radical ; B 7 -36 512 913 ; +C -1 ; WX 722 ; N Agrave ; B 26 0 703 936 ; +C -1 ; WX 722 ; N Aacute ; B 26 0 703 936 ; +C -1 ; WX 584 ; N lessequal ; B 45 -10 534 639 ; +C -1 ; WX 584 ; N greaterequal ; B 45 -10 534 639 ; +C -1 ; WX 584 ; N logicalnot ; B 40 86 544 375 ; +C -1 ; WX 711 ; N summation ; B 17 -96 694 760 ; +C -1 ; WX 490 ; N partialdiff ; B 22 -15 458 750 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 68 -307 661 729 ; +C -1 ; WX 611 ; N dcroat ; B 29 -23 605 729 ; +C -1 ; WX 280 ; N brokenbar ; B 100 -200 180 729 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 80 -307 579 729 ; +C -1 ; WX 722 ; N Adieresis ; B 26 0 703 922 ; +C -1 ; WX 611 ; N mu ; B 58 -220 573 540 ; +C -1 ; WX 278 ; N .notdef ; B 214 0 214 0 ; EndCharMetrics StartKernData StartKernPairs 998 -KPX A C -26 -KPX A Ccedilla -26 -KPX A G -27 -KPX A O -27 -KPX A Odieresis -27 -KPX A Q -27 -KPX A T -62 -KPX A U -24 -KPX A Uacute -24 -KPX A Ucircumflex -24 -KPX A Udieresis -24 -KPX A Ugrave -24 -KPX A V -50 -KPX A W -41 -KPX A Y -69 +KPX A C -33 +KPX A Ccedilla -33 +KPX A G -35 +KPX A O -34 +KPX A Odieresis -34 +KPX A Q -35 +KPX A T -81 +KPX A U -32 +KPX A Uacute -32 +KPX A Ucircumflex -32 +KPX A Udieresis -32 +KPX A Ugrave -32 +KPX A V -66 +KPX A W -51 +KPX A Y -90 KPX A a -1 KPX A b -1 -KPX A c -11 -KPX A ccedilla -11 -KPX A comma 17 -KPX A d -11 -KPX A e -7 -KPX A g -16 -KPX A guillemotleft -35 -KPX A guilsinglleft -33 +KPX A c -14 +KPX A ccedilla -14 +KPX A comma 19 +KPX A d -13 +KPX A e -9 +KPX A g -14 +KPX A guillemotleft -43 +KPX A guilsinglleft -40 KPX A hyphen 7 -KPX A o -14 -KPX A period 17 +KPX A o -16 +KPX A period 19 KPX A q -12 -KPX A quotedblright -48 -KPX A quoteright -50 -KPX A t -13 +KPX A quotedblright -65 +KPX A quoteright -61 +KPX A t -18 KPX A u -12 -KPX A v -29 -KPX A w -19 -KPX A y -27 -KPX Aacute C -26 -KPX Aacute G -27 -KPX Aacute O -27 -KPX Aacute Q -27 -KPX Aacute T -62 -KPX Aacute U -24 -KPX Aacute V -50 -KPX Aacute W -41 -KPX Aacute Y -69 +KPX A v -37 +KPX A w -23 +KPX A y -35 +KPX Aacute C -33 +KPX Aacute G -35 +KPX Aacute O -34 +KPX Aacute Q -35 +KPX Aacute T -81 +KPX Aacute U -32 +KPX Aacute V -66 +KPX Aacute W -51 +KPX Aacute Y -90 KPX Aacute a -1 KPX Aacute b -1 -KPX Aacute c -11 -KPX Aacute comma 17 -KPX Aacute d -11 -KPX Aacute e -7 -KPX Aacute g -16 -KPX Aacute guillemotleft -35 -KPX Aacute guilsinglleft -33 +KPX Aacute c -14 +KPX Aacute comma 19 +KPX Aacute d -13 +KPX Aacute e -9 +KPX Aacute g -14 +KPX Aacute guillemotleft -43 +KPX Aacute guilsinglleft -40 KPX Aacute hyphen 7 -KPX Aacute o -14 -KPX Aacute period 17 +KPX Aacute o -16 +KPX Aacute period 19 KPX Aacute q -12 -KPX Aacute quoteright -50 -KPX Aacute t -13 +KPX Aacute quoteright -61 +KPX Aacute t -18 KPX Aacute u -12 -KPX Aacute v -29 -KPX Aacute w -19 -KPX Aacute y -27 -KPX Acircumflex C -26 -KPX Acircumflex G -27 -KPX Acircumflex O -27 -KPX Acircumflex Q -27 -KPX Acircumflex T -62 -KPX Acircumflex U -24 -KPX Acircumflex V -50 -KPX Acircumflex W -41 -KPX Acircumflex Y -69 -KPX Acircumflex comma 17 -KPX Acircumflex period 17 -KPX Adieresis C -26 -KPX Adieresis G -27 -KPX Adieresis O -27 -KPX Adieresis Q -27 -KPX Adieresis T -62 -KPX Adieresis U -24 -KPX Adieresis V -50 -KPX Adieresis W -41 -KPX Adieresis Y -69 +KPX Aacute v -37 +KPX Aacute w -23 +KPX Aacute y -35 +KPX Acircumflex C -33 +KPX Acircumflex G -35 +KPX Acircumflex O -34 +KPX Acircumflex Q -35 +KPX Acircumflex T -81 +KPX Acircumflex U -32 +KPX Acircumflex V -66 +KPX Acircumflex W -51 +KPX Acircumflex Y -90 +KPX Acircumflex comma 19 +KPX Acircumflex period 19 +KPX Adieresis C -33 +KPX Adieresis G -35 +KPX Adieresis O -34 +KPX Adieresis Q -35 +KPX Adieresis T -81 +KPX Adieresis U -32 +KPX Adieresis V -66 +KPX Adieresis W -51 +KPX Adieresis Y -90 KPX Adieresis a -1 KPX Adieresis b -1 -KPX Adieresis c -11 -KPX Adieresis comma 17 -KPX Adieresis d -11 -KPX Adieresis g -16 -KPX Adieresis guillemotleft -35 -KPX Adieresis guilsinglleft -33 +KPX Adieresis c -14 +KPX Adieresis comma 19 +KPX Adieresis d -13 +KPX Adieresis g -14 +KPX Adieresis guillemotleft -43 +KPX Adieresis guilsinglleft -40 KPX Adieresis hyphen 7 -KPX Adieresis o -14 -KPX Adieresis period 17 +KPX Adieresis o -16 +KPX Adieresis period 19 KPX Adieresis q -12 -KPX Adieresis quotedblright -48 -KPX Adieresis quoteright -50 -KPX Adieresis t -13 +KPX Adieresis quotedblright -65 +KPX Adieresis quoteright -61 +KPX Adieresis t -18 KPX Adieresis u -12 -KPX Adieresis v -29 -KPX Adieresis w -19 -KPX Adieresis y -27 -KPX Agrave C -26 -KPX Agrave G -27 -KPX Agrave O -27 -KPX Agrave Q -27 -KPX Agrave T -62 -KPX Agrave U -24 -KPX Agrave V -50 -KPX Agrave W -41 -KPX Agrave Y -69 -KPX Agrave comma 17 -KPX Agrave period 17 -KPX Aring C -26 -KPX Aring G -27 -KPX Aring O -27 -KPX Aring Q -27 -KPX Aring T -62 -KPX Aring U -24 -KPX Aring V -50 -KPX Aring W -41 -KPX Aring Y -69 +KPX Adieresis v -37 +KPX Adieresis w -23 +KPX Adieresis y -35 +KPX Agrave C -33 +KPX Agrave G -35 +KPX Agrave O -34 +KPX Agrave Q -35 +KPX Agrave T -81 +KPX Agrave U -32 +KPX Agrave V -66 +KPX Agrave W -51 +KPX Agrave Y -90 +KPX Agrave comma 19 +KPX Agrave period 19 +KPX Aring C -33 +KPX Aring G -35 +KPX Aring O -34 +KPX Aring Q -35 +KPX Aring T -81 +KPX Aring U -32 +KPX Aring V -66 +KPX Aring W -51 +KPX Aring Y -90 KPX Aring a -1 KPX Aring b -1 -KPX Aring c -11 -KPX Aring comma 17 -KPX Aring d -11 -KPX Aring e -7 -KPX Aring g -16 -KPX Aring guillemotleft -35 -KPX Aring guilsinglleft -33 +KPX Aring c -14 +KPX Aring comma 19 +KPX Aring d -13 +KPX Aring e -9 +KPX Aring g -14 +KPX Aring guillemotleft -43 +KPX Aring guilsinglleft -40 KPX Aring hyphen 7 -KPX Aring o -14 -KPX Aring period 17 +KPX Aring o -16 +KPX Aring period 19 KPX Aring q -12 -KPX Aring quotedblright -48 -KPX Aring quoteright -50 -KPX Aring t -13 +KPX Aring quotedblright -65 +KPX Aring quoteright -61 +KPX Aring t -18 KPX Aring u -12 -KPX Aring v -29 -KPX Aring w -19 -KPX Aring y -27 -KPX Atilde C -26 -KPX Atilde G -27 -KPX Atilde O -27 -KPX Atilde Q -27 -KPX Atilde T -62 -KPX Atilde U -24 -KPX Atilde V -50 -KPX Atilde W -41 -KPX Atilde Y -69 -KPX Atilde comma 17 -KPX Atilde period 17 -KPX B A -17 -KPX B AE -11 -KPX B Aacute -17 -KPX B Acircumflex -17 -KPX B Adieresis -17 -KPX B Aring -17 -KPX B Atilde -17 -KPX B O -4 -KPX B OE 1 -KPX B Oacute -4 -KPX B Ocircumflex -4 -KPX B Odieresis -4 -KPX B Ograve -4 -KPX B Oslash 0 -KPX B V -22 -KPX B W -17 -KPX B Y -29 -KPX C A -19 -KPX C AE -14 -KPX C Aacute -19 -KPX C Adieresis -19 -KPX C Aring -19 -KPX C H 1 -KPX C K -5 -KPX C O -2 -KPX C Oacute -2 -KPX C Odieresis -2 -KPX Ccedilla A -21 -KPX D A -24 -KPX D Aacute -24 -KPX D Acircumflex -24 -KPX D Adieresis -24 -KPX D Agrave -24 -KPX D Aring -24 -KPX D Atilde -24 -KPX D J 8 -KPX D T -3 -KPX D V -20 -KPX D W -13 -KPX D X -22 -KPX D Y -31 -KPX F A -43 -KPX F Aacute -43 -KPX F Acircumflex -43 -KPX F Adieresis -43 -KPX F Agrave -43 -KPX F Aring -43 -KPX F Atilde -43 -KPX F J -14 -KPX F O -10 -KPX F Odieresis -10 +KPX Aring v -37 +KPX Aring w -23 +KPX Aring y -35 +KPX Atilde C -33 +KPX Atilde G -35 +KPX Atilde O -34 +KPX Atilde Q -35 +KPX Atilde T -81 +KPX Atilde U -32 +KPX Atilde V -66 +KPX Atilde W -51 +KPX Atilde Y -90 +KPX Atilde comma 19 +KPX Atilde period 19 +KPX B A -32 +KPX B AE -20 +KPX B Aacute -32 +KPX B Acircumflex -32 +KPX B Adieresis -32 +KPX B Aring -32 +KPX B Atilde -32 +KPX B O -11 +KPX B OE -2 +KPX B Oacute -11 +KPX B Ocircumflex -11 +KPX B Odieresis -11 +KPX B Ograve -11 +KPX B Oslash -5 +KPX B V -39 +KPX B W -27 +KPX B Y -51 +KPX C A -29 +KPX C AE -17 +KPX C Aacute -29 +KPX C Adieresis -29 +KPX C Aring -29 +KPX C H 5 +KPX C K 2 +KPX C O -6 +KPX C Oacute -6 +KPX C Odieresis -6 +KPX Ccedilla A -28 +KPX D A -37 +KPX D Aacute -37 +KPX D Acircumflex -37 +KPX D Adieresis -37 +KPX D Agrave -37 +KPX D Aring -37 +KPX D Atilde -37 +KPX D J 2 +KPX D T -17 +KPX D V -35 +KPX D W -20 +KPX D X -35 +KPX D Y -56 +KPX F A -63 +KPX F Aacute -63 +KPX F Acircumflex -63 +KPX F Adieresis -63 +KPX F Agrave -63 +KPX F Aring -63 +KPX F Atilde -63 +KPX F J -25 +KPX F O -16 +KPX F Odieresis -16 KPX F a -15 KPX F aacute -15 KPX F adieresis -15 -KPX F ae -16 +KPX F ae -17 KPX F aring -15 -KPX F comma -71 -KPX F e -6 -KPX F eacute -6 -KPX F hyphen 8 -KPX F i -6 -KPX F j -6 -KPX F o -11 -KPX F oacute -11 -KPX F odieresis -11 -KPX F oe -11 -KPX F oslash -11 -KPX F period -71 -KPX F r -22 -KPX F u -23 -KPX G A 1 -KPX G AE 7 -KPX G Aacute 1 -KPX G Acircumflex 1 -KPX G Adieresis 1 -KPX G Agrave 1 -KPX G Aring 1 -KPX G Atilde 1 -KPX G T -7 -KPX G V -24 -KPX G W -15 -KPX G Y -35 -KPX J A -21 -KPX J AE -15 -KPX J Adieresis -21 -KPX J Aring -21 -KPX K C -35 -KPX K G -36 -KPX K O -36 -KPX K OE -30 -KPX K Oacute -36 -KPX K Odieresis -36 -KPX K S -18 -KPX K T 23 -KPX K a 0 -KPX K adieresis 0 -KPX K ae -1 -KPX K aring 0 -KPX K e -17 -KPX K hyphen -26 -KPX K o -25 -KPX K oacute -25 -KPX K odieresis -25 -KPX K u -19 -KPX K udieresis -19 -KPX K y -48 -KPX L A 16 -KPX L AE 22 -KPX L Aacute 16 -KPX L Adieresis 16 -KPX L Aring 16 -KPX L C -13 -KPX L Ccedilla -16 -KPX L G -15 -KPX L O -16 -KPX L Oacute -16 -KPX L Ocircumflex -16 -KPX L Odieresis -16 -KPX L Ograve -16 -KPX L Otilde -16 -KPX L S 3 -KPX L T -70 -KPX L U -12 -KPX L Udieresis -12 -KPX L V -64 -KPX L W -50 -KPX L Y -83 -KPX L hyphen -8 -KPX L quotedblright -116 -KPX L quoteright -118 +KPX F comma -76 +KPX F e -7 +KPX F eacute -7 +KPX F hyphen 11 +KPX F i -7 +KPX F j -9 +KPX F o -14 +KPX F oacute -14 +KPX F odieresis -14 +KPX F oe -8 +KPX F oslash -15 +KPX F period -75 +KPX F r -27 +KPX F u -24 +KPX G A -8 +KPX G AE 4 +KPX G Aacute -8 +KPX G Acircumflex -8 +KPX G Adieresis -8 +KPX G Agrave -8 +KPX G Aring -8 +KPX G Atilde -8 +KPX G T -17 +KPX G V -36 +KPX G W -20 +KPX G Y -56 +KPX J A -32 +KPX J AE -20 +KPX J Adieresis -32 +KPX J Aring -32 +KPX K C -53 +KPX K G -55 +KPX K O -54 +KPX K OE -44 +KPX K Oacute -54 +KPX K Odieresis -54 +KPX K S -30 +KPX K T 13 +KPX K a -3 +KPX K adieresis -3 +KPX K ae 0 +KPX K aring -3 +KPX K e -25 +KPX K hyphen -44 +KPX K o -33 +KPX K oacute -33 +KPX K odieresis -33 +KPX K u -23 +KPX K udieresis -23 +KPX K y -65 +KPX L A 9 +KPX L AE 21 +KPX L Aacute 9 +KPX L Adieresis 9 +KPX L Aring 9 +KPX L C -26 +KPX L Ccedilla -26 +KPX L G -30 +KPX L O -29 +KPX L Oacute -29 +KPX L Ocircumflex -29 +KPX L Odieresis -29 +KPX L Ograve -29 +KPX L Otilde -29 +KPX L S -2 +KPX L T -95 +KPX L U -24 +KPX L Udieresis -24 +KPX L V -90 +KPX L W -68 +KPX L Y -112 +KPX L hyphen -12 +KPX L quotedblright -141 +KPX L quoteright -138 KPX L u -7 KPX L udieresis -7 -KPX L y -41 -KPX N A 0 -KPX N AE 6 -KPX N Aacute 0 -KPX N Adieresis 0 -KPX N Aring 0 -KPX N C 6 -KPX N Ccedilla 6 -KPX N G 5 -KPX N O 6 -KPX N Oacute 6 -KPX N Odieresis 6 -KPX N a 7 -KPX N aacute 7 -KPX N adieresis 7 -KPX N ae 6 -KPX N aring 7 -KPX N comma 12 -KPX N e 12 -KPX N eacute 12 -KPX N o 5 -KPX N oacute 5 -KPX N odieresis 5 -KPX N oslash 7 -KPX N period 12 -KPX N u 5 -KPX N udieresis 5 -KPX O A -27 -KPX O AE -22 -KPX O Aacute -27 -KPX O Adieresis -27 -KPX O Aring -27 -KPX O T -9 -KPX O V -26 -KPX O W -17 -KPX O X -26 -KPX O Y -38 -KPX Oacute A -27 -KPX Oacute T -9 -KPX Oacute V -26 -KPX Oacute W -17 -KPX Oacute Y -38 -KPX Ocircumflex T -9 -KPX Ocircumflex V -26 -KPX Ocircumflex Y -38 -KPX Odieresis A -27 -KPX Odieresis T -9 -KPX Odieresis V -26 -KPX Odieresis W -17 -KPX Odieresis X -26 -KPX Odieresis Y -38 -KPX Ograve T -9 -KPX Ograve V -26 -KPX Ograve Y -38 -KPX Oslash A -24 -KPX Otilde T -9 -KPX Otilde V -26 -KPX Otilde Y -38 -KPX P A -51 -KPX P AE -47 -KPX P Aacute -51 -KPX P Adieresis -51 -KPX P Aring -51 -KPX P J -36 -KPX P a -12 -KPX P aacute -12 -KPX P adieresis -12 -KPX P ae -13 -KPX P aring -12 -KPX P comma -92 -KPX P e -10 -KPX P eacute -10 -KPX P hyphen -3 -KPX P o -16 -KPX P oacute -16 -KPX P odieresis -16 -KPX P oe -16 -KPX P oslash -16 -KPX P period -92 -KPX R C -2 -KPX R Ccedilla -2 -KPX R G -3 -KPX R O -3 -KPX R OE 1 -KPX R Oacute -3 -KPX R Odieresis -3 -KPX R T 3 -KPX R U -1 -KPX R Udieresis -1 -KPX R V -16 -KPX R W -12 -KPX R Y -24 +KPX L y -55 +KPX N A -5 +KPX N AE 7 +KPX N Aacute -5 +KPX N Adieresis -5 +KPX N Aring -5 +KPX N C 9 +KPX N Ccedilla 9 +KPX N G 8 +KPX N O 8 +KPX N Oacute 8 +KPX N Odieresis 8 +KPX N a 13 +KPX N aacute 13 +KPX N adieresis 13 +KPX N ae 13 +KPX N aring 13 +KPX N comma 15 +KPX N e 18 +KPX N eacute 18 +KPX N o 11 +KPX N oacute 11 +KPX N odieresis 11 +KPX N oslash 11 +KPX N period 16 +KPX N u 12 +KPX N udieresis 12 +KPX O A -37 +KPX O AE -26 +KPX O Aacute -37 +KPX O Adieresis -37 +KPX O Aring -37 +KPX O T -20 +KPX O V -36 +KPX O W -21 +KPX O X -36 +KPX O Y -59 +KPX Oacute A -37 +KPX Oacute T -20 +KPX Oacute V -36 +KPX Oacute W -21 +KPX Oacute Y -59 +KPX Ocircumflex T -20 +KPX Ocircumflex V -36 +KPX Ocircumflex Y -59 +KPX Odieresis A -37 +KPX Odieresis T -20 +KPX Odieresis V -36 +KPX Odieresis W -21 +KPX Odieresis X -36 +KPX Odieresis Y -59 +KPX Ograve T -20 +KPX Ograve V -36 +KPX Ograve Y -59 +KPX Oslash A -32 +KPX Otilde T -20 +KPX Otilde V -36 +KPX Otilde Y -59 +KPX P A -65 +KPX P AE -54 +KPX P Aacute -65 +KPX P Adieresis -65 +KPX P Aring -65 +KPX P J -44 +KPX P a -7 +KPX P aacute -7 +KPX P adieresis -7 +KPX P ae -8 +KPX P aring -7 +KPX P comma -94 +KPX P e -8 +KPX P eacute -8 +KPX P hyphen 0 +KPX P o -14 +KPX P oacute -14 +KPX P odieresis -14 +KPX P oe -8 +KPX P oslash -17 +KPX P period -94 +KPX R C -5 +KPX R Ccedilla -5 +KPX R G -6 +KPX R O -6 +KPX R OE 3 +KPX R Oacute -6 +KPX R Odieresis -6 +KPX R T 0 +KPX R U -4 +KPX R Udieresis -4 +KPX R V -26 +KPX R W -17 +KPX R Y -37 KPX R a 0 KPX R aacute 0 KPX R adieresis 0 -KPX R ae -1 +KPX R ae 0 KPX R aring 0 KPX R e 2 KPX R eacute 2 -KPX R hyphen 14 +KPX R hyphen 15 KPX R o -4 KPX R oacute -4 KPX R odieresis -4 -KPX R oe -4 -KPX R u -1 -KPX R uacute -2 -KPX R udieresis -2 -KPX R y 3 -KPX S A -10 -KPX S AE -5 -KPX S Aacute -10 -KPX S Adieresis -10 -KPX S Aring -10 -KPX S T 0 -KPX S V -20 -KPX S W -15 -KPX S Y -27 -KPX S t 2 -KPX T A -63 -KPX T AE -59 -KPX T Aacute -63 -KPX T Acircumflex -63 -KPX T Adieresis -63 -KPX T Agrave -63 -KPX T Aring -63 -KPX T Atilde -63 -KPX T C -8 -KPX T G -10 -KPX T J -67 -KPX T O -9 -KPX T OE -3 -KPX T Oacute -9 -KPX T Ocircumflex -9 -KPX T Odieresis -9 -KPX T Ograve -9 -KPX T Oslash -9 -KPX T Otilde -9 -KPX T S 6 -KPX T V 22 -KPX T W 23 -KPX T Y 23 -KPX T a -62 -KPX T ae -63 -KPX T c -62 -KPX T colon -73 -KPX T comma -55 -KPX T e -58 -KPX T g -65 -KPX T guillemotleft -84 -KPX T guilsinglleft -82 -KPX T hyphen -40 -KPX T i -2 -KPX T j -2 -KPX T o -65 -KPX T oslash -61 -KPX T period -55 -KPX T r -59 -KPX T s -63 -KPX T semicolon -73 -KPX T u -63 -KPX T v -68 -KPX T w -67 -KPX T y -67 -KPX U A -24 -KPX U AE -20 -KPX U Aacute -24 -KPX U Acircumflex -24 -KPX U Adieresis -24 -KPX U Aring -24 -KPX U Atilde -24 -KPX U comma -6 -KPX U m 4 -KPX U n 3 -KPX U p 4 -KPX U period -3 -KPX U r 4 -KPX Uacute A -24 -KPX Uacute comma -6 -KPX Uacute m 4 -KPX Uacute n 3 -KPX Uacute p 4 -KPX Uacute period -3 -KPX Uacute r 4 -KPX Ucircumflex A -24 -KPX Udieresis A -24 -KPX Udieresis b 4 -KPX Udieresis comma -6 -KPX Udieresis m 4 -KPX Udieresis n 3 -KPX Udieresis p 4 -KPX Udieresis period -3 -KPX Udieresis r 4 -KPX Ugrave A -24 -KPX V A -51 -KPX V AE -46 -KPX V Aacute -51 -KPX V Acircumflex -51 -KPX V Adieresis -51 -KPX V Agrave -51 -KPX V Aring -51 -KPX V Atilde -51 -KPX V C -25 -KPX V G -26 -KPX V O -26 -KPX V Oacute -26 -KPX V Ocircumflex -26 -KPX V Odieresis -26 -KPX V Ograve -26 -KPX V Oslash -22 -KPX V Otilde -26 -KPX V S -13 -KPX V T 22 -KPX V a -38 -KPX V ae -39 -KPX V colon -38 -KPX V comma -52 -KPX V e -34 -KPX V g -40 -KPX V guillemotleft -59 -KPX V guilsinglleft -57 -KPX V hyphen -14 -KPX V i -4 -KPX V o -41 -KPX V oslash -37 -KPX V period -52 -KPX V r -27 -KPX V semicolon -38 -KPX V u -31 -KPX V y -7 -KPX W A -40 -KPX W AE -36 -KPX W Aacute -40 -KPX W Acircumflex -40 -KPX W Adieresis -40 -KPX W Agrave -40 -KPX W Aring -40 -KPX W Atilde -40 -KPX W C -15 -KPX W G -16 -KPX W O -16 -KPX W Oacute -16 -KPX W Ocircumflex -16 -KPX W Odieresis -16 -KPX W Ograve -16 -KPX W Oslash -12 -KPX W Otilde -16 -KPX W S -8 -KPX W T 24 -KPX W a -26 -KPX W ae -27 -KPX W colon -31 -KPX W comma -36 -KPX W e -21 -KPX W g -28 -KPX W guillemotleft -47 -KPX W guilsinglleft -45 -KPX W hyphen -2 -KPX W i -2 -KPX W o -28 -KPX W oslash -25 -KPX W period -36 -KPX W r -21 -KPX W semicolon -31 -KPX W u -24 -KPX W y -1 -KPX X C -26 -KPX X O -27 -KPX X Odieresis -27 -KPX X Q -27 +KPX R oe 1 +KPX R u 0 +KPX R uacute 0 +KPX R udieresis 0 +KPX R y 5 +KPX S A -20 +KPX S AE -8 +KPX S Aacute -20 +KPX S Adieresis -20 +KPX S Aring -20 +KPX S T -5 +KPX S V -31 +KPX S W -17 +KPX S Y -43 +KPX S t 1 +KPX T A -87 +KPX T AE -75 +KPX T Aacute -87 +KPX T Acircumflex -87 +KPX T Adieresis -87 +KPX T Agrave -87 +KPX T Aring -87 +KPX T Atilde -87 +KPX T C -20 +KPX T G -22 +KPX T J -87 +KPX T O -22 +KPX T OE -11 +KPX T Oacute -22 +KPX T Ocircumflex -22 +KPX T Odieresis -22 +KPX T Ograve -22 +KPX T Oslash -23 +KPX T Otilde -22 +KPX T S 3 +KPX T V 18 +KPX T W 24 +KPX T Y 16 +KPX T a -73 +KPX T ae -73 +KPX T c -74 +KPX T colon -97 +KPX T comma -67 +KPX T e -69 +KPX T g -75 +KPX T guillemotleft -101 +KPX T guilsinglleft -98 +KPX T hyphen -48 +KPX T i -1 +KPX T j -3 +KPX T o -76 +KPX T oslash -73 +KPX T period -67 +KPX T r -71 +KPX T s -74 +KPX T semicolon -98 +KPX T u -72 +KPX T v -82 +KPX T w -77 +KPX T y -80 +KPX U A -34 +KPX U AE -22 +KPX U Aacute -34 +KPX U Acircumflex -34 +KPX U Adieresis -34 +KPX U Aring -34 +KPX U Atilde -34 +KPX U comma -7 +KPX U m 6 +KPX U n 5 +KPX U p 7 +KPX U period -4 +KPX U r 5 +KPX Uacute A -34 +KPX Uacute comma -7 +KPX Uacute m 6 +KPX Uacute n 5 +KPX Uacute p 7 +KPX Uacute period -4 +KPX Uacute r 5 +KPX Ucircumflex A -34 +KPX Udieresis A -34 +KPX Udieresis b 6 +KPX Udieresis comma -7 +KPX Udieresis m 6 +KPX Udieresis n 5 +KPX Udieresis p 7 +KPX Udieresis period -4 +KPX Udieresis r 5 +KPX Ugrave A -34 +KPX V A -71 +KPX V AE -59 +KPX V Aacute -71 +KPX V Acircumflex -71 +KPX V Adieresis -71 +KPX V Agrave -71 +KPX V Aring -71 +KPX V Atilde -71 +KPX V C -36 +KPX V G -38 +KPX V O -37 +KPX V Oacute -37 +KPX V Ocircumflex -37 +KPX V Odieresis -37 +KPX V Ograve -37 +KPX V Oslash -31 +KPX V Otilde -37 +KPX V S -21 +KPX V T 21 +KPX V a -47 +KPX V ae -48 +KPX V colon -65 +KPX V comma -69 +KPX V e -43 +KPX V g -49 +KPX V guillemotleft -74 +KPX V guilsinglleft -72 +KPX V hyphen -21 +KPX V i -5 +KPX V o -50 +KPX V oslash -48 +KPX V period -69 +KPX V r -34 +KPX V semicolon -67 +KPX V u -34 +KPX V y -10 +KPX W A -54 +KPX W AE -43 +KPX W Aacute -54 +KPX W Acircumflex -54 +KPX W Adieresis -54 +KPX W Agrave -54 +KPX W Aring -54 +KPX W Atilde -54 +KPX W C -20 +KPX W G -22 +KPX W O -21 +KPX W Oacute -21 +KPX W Ocircumflex -21 +KPX W Odieresis -21 +KPX W Ograve -21 +KPX W Oslash -15 +KPX W Otilde -21 +KPX W S -12 +KPX W T 25 +KPX W a -29 +KPX W ae -29 +KPX W colon -53 +KPX W comma -45 +KPX W e -24 +KPX W g -30 +KPX W guillemotleft -55 +KPX W guilsinglleft -53 +KPX W hyphen -3 +KPX W i -1 +KPX W o -31 +KPX W oslash -29 +KPX W period -45 +KPX W r -24 +KPX W semicolon -54 +KPX W u -23 +KPX W y 0 +KPX X C -34 +KPX X O -35 +KPX X Odieresis -35 +KPX X Q -37 KPX X a -5 -KPX X e -20 -KPX X hyphen -21 -KPX X o -27 -KPX X u -24 -KPX X y -35 -KPX Y A -67 -KPX Y AE -62 -KPX Y Aacute -67 -KPX Y Acircumflex -67 -KPX Y Adieresis -67 -KPX Y Agrave -67 -KPX Y Aring -67 -KPX Y Atilde -67 -KPX Y C -36 -KPX Y G -38 -KPX Y O -37 -KPX Y Oacute -37 -KPX Y Ocircumflex -37 -KPX Y Odieresis -37 -KPX Y Ograve -37 -KPX Y Oslash -37 -KPX Y Otilde -37 -KPX Y S -19 -KPX Y T 24 -KPX Y a -58 -KPX Y ae -59 -KPX Y colon -52 -KPX Y comma -65 -KPX Y e -54 -KPX Y g -61 -KPX Y guillemotleft -83 -KPX Y guilsinglleft -81 -KPX Y hyphen -42 -KPX Y i -2 -KPX Y o -61 -KPX Y oslash -57 -KPX Y p -39 -KPX Y period -65 -KPX Y semicolon -52 -KPX Y u -45 -KPX Y v -22 -KPX Z v -9 -KPX Z y -8 -KPX a j 0 -KPX a quoteright -7 -KPX a v -15 +KPX X e -25 +KPX X hyphen -27 +KPX X o -32 +KPX X u -25 +KPX X y -40 +KPX Y A -86 +KPX Y AE -74 +KPX Y Aacute -86 +KPX Y Acircumflex -86 +KPX Y Adieresis -86 +KPX Y Agrave -86 +KPX Y Aring -86 +KPX Y Atilde -86 +KPX Y C -52 +KPX Y G -54 +KPX Y O -54 +KPX Y Oacute -54 +KPX Y Ocircumflex -54 +KPX Y Odieresis -54 +KPX Y Ograve -54 +KPX Y Oslash -47 +KPX Y Otilde -54 +KPX Y S -29 +KPX Y T 22 +KPX Y a -66 +KPX Y ae -67 +KPX Y colon -81 +KPX Y comma -78 +KPX Y e -63 +KPX Y g -68 +KPX Y guillemotleft -98 +KPX Y guilsinglleft -96 +KPX Y hyphen -50 +KPX Y i -3 +KPX Y o -70 +KPX Y oslash -67 +KPX Y p -45 +KPX Y period -78 +KPX Y semicolon -83 +KPX Y u -48 +KPX Y v -27 +KPX Z v -11 +KPX Z y -9 +KPX a j -1 +KPX a quoteright -11 +KPX a v -19 KPX a w -5 -KPX a y -13 -KPX aacute v -15 +KPX a y -17 +KPX aacute v -19 KPX aacute w -5 -KPX aacute y -13 -KPX adieresis v -15 +KPX aacute y -17 +KPX adieresis v -19 KPX adieresis w -5 -KPX adieresis y -13 -KPX ae v -16 -KPX ae w -6 -KPX ae y -15 -KPX agrave v -15 +KPX adieresis y -17 +KPX ae v -21 +KPX ae w -7 +KPX ae y -19 +KPX agrave v -19 KPX agrave w -5 -KPX agrave y -13 -KPX aring v -15 +KPX agrave y -17 +KPX aring v -19 KPX aring w -5 -KPX aring y -13 -KPX b v -15 -KPX b w -5 -KPX b y -14 +KPX aring y -17 +KPX b v -20 +KPX b w -7 +KPX b y -20 KPX c h 0 -KPX c k -2 -KPX comma one -59 -KPX comma quotedblright -18 -KPX comma quoteright -20 -KPX e quoteright -8 -KPX e t -2 -KPX e v -15 +KPX c k 3 +KPX comma one -73 +KPX comma quotedblright -33 +KPX comma quoteright -30 +KPX e quoteright -12 +KPX e t -4 +KPX e v -19 KPX e w -6 -KPX e x -16 -KPX e y -14 -KPX eacute v -15 +KPX e x -21 +KPX e y -17 +KPX eacute v -19 KPX eacute w -6 -KPX eacute y -14 -KPX ecircumflex v -15 +KPX eacute y -17 +KPX ecircumflex v -19 KPX ecircumflex w -6 -KPX ecircumflex y -14 -KPX eight four 12 -KPX eight one -15 -KPX eight seven 0 -KPX f a -4 -KPX f aacute -4 -KPX f adieresis -4 -KPX f ae -6 -KPX f aring -4 -KPX f e -5 -KPX f eacute -5 -KPX f f 17 +KPX ecircumflex y -17 +KPX eight four 10 +KPX eight one -23 +KPX eight seven -6 +KPX f a 1 +KPX f aacute 1 +KPX f adieresis 1 +KPX f ae 0 +KPX f aring 1 +KPX f e -3 +KPX f eacute -3 +KPX f f 21 KPX f i -3 -KPX f j -7 +KPX f j -6 KPX f l -3 -KPX f o -12 -KPX f oacute -12 -KPX f odieresis -12 -KPX f oe -12 +KPX f o -9 +KPX f oacute -9 +KPX f odieresis -9 +KPX f oe -3 KPX f oslash -9 -KPX f quoteright 11 -KPX f s -5 -KPX f t 17 -KPX five four 8 -KPX five one -20 -KPX five seven -2 -KPX four four 12 -KPX four one -37 -KPX four seven -19 -KPX g a 5 -KPX g adieresis 5 -KPX g ae 4 -KPX g aring 5 -KPX g e 10 -KPX g eacute 10 -KPX g l 3 -KPX g oacute 4 -KPX g odieresis 4 -KPX g r 6 -KPX guillemotright A -36 -KPX guillemotright AE -31 -KPX guillemotright Aacute -36 -KPX guillemotright Adieresis -36 -KPX guillemotright Aring -36 -KPX guillemotright T -84 -KPX guillemotright V -59 -KPX guillemotright W -48 -KPX guillemotright Y -86 -KPX guilsinglright A -33 -KPX guilsinglright AE -28 -KPX guilsinglright Aacute -33 -KPX guilsinglright Adieresis -33 -KPX guilsinglright Aring -33 -KPX guilsinglright T -82 -KPX guilsinglright V -57 -KPX guilsinglright W -45 -KPX guilsinglright Y -84 -KPX h quoteright -7 -KPX h y -14 -KPX hyphen A 6 -KPX hyphen AE 12 -KPX hyphen Aacute 6 -KPX hyphen Adieresis 6 -KPX hyphen Aring 6 -KPX hyphen T -40 -KPX hyphen V -14 -KPX hyphen W -3 -KPX hyphen Y -45 -KPX i T -2 -KPX i j -1 -KPX k a 0 -KPX k aacute 0 -KPX k adieresis 0 -KPX k ae 0 -KPX k aring 0 -KPX k comma 15 -KPX k e -6 -KPX k eacute -6 -KPX k g -14 -KPX k hyphen -10 -KPX k o -13 -KPX k oacute -13 -KPX k odieresis -13 -KPX k period 15 -KPX k s -8 -KPX k u -4 -KPX k udieresis 0 -KPX l v -7 -KPX l y -5 -KPX m p 3 -KPX m v -16 -KPX m w -7 -KPX m y -14 -KPX n T -63 -KPX n p 3 -KPX n quoteright -7 -KPX n v -16 +KPX f quoteright 10 +KPX f s -1 +KPX f t 21 +KPX five four 6 +KPX five one -29 +KPX five seven -10 +KPX four four 9 +KPX four one -50 +KPX four seven -28 +KPX g a 3 +KPX g adieresis 3 +KPX g ae 3 +KPX g aring 3 +KPX g e 8 +KPX g eacute 8 +KPX g l 0 +KPX g oacute 1 +KPX g odieresis 1 +KPX g r 1 +KPX guillemotright A -51 +KPX guillemotright AE -39 +KPX guillemotright Aacute -51 +KPX guillemotright Adieresis -51 +KPX guillemotright Aring -51 +KPX guillemotright T -108 +KPX guillemotright V -78 +KPX guillemotright W -60 +KPX guillemotright Y -111 +KPX guilsinglright A -46 +KPX guilsinglright AE -35 +KPX guilsinglright Aacute -46 +KPX guilsinglright Adieresis -46 +KPX guilsinglright Aring -46 +KPX guilsinglright T -104 +KPX guilsinglright V -74 +KPX guilsinglright W -56 +KPX guilsinglright Y -107 +KPX h quoteright -14 +KPX h y -21 +KPX hyphen A -1 +KPX hyphen AE 10 +KPX hyphen Aacute -1 +KPX hyphen Adieresis -1 +KPX hyphen Aring -1 +KPX hyphen T -57 +KPX hyphen V -27 +KPX hyphen W -9 +KPX hyphen Y -64 +KPX i T -4 +KPX i j -2 +KPX k a -2 +KPX k aacute -2 +KPX k adieresis -2 +KPX k ae 1 +KPX k aring -2 +KPX k comma 7 +KPX k e -15 +KPX k eacute -15 +KPX k g -21 +KPX k hyphen -25 +KPX k o -22 +KPX k oacute -22 +KPX k odieresis -22 +KPX k period 6 +KPX k s -10 +KPX k u -1 +KPX k udieresis -1 +KPX l v -5 +KPX l y -2 +KPX m p 6 +KPX m v -19 +KPX m w -6 +KPX m y -18 +KPX n T -80 +KPX n p 5 +KPX n quoteright -12 +KPX n v -20 KPX n w -7 -KPX n y -14 -KPX nine four 10 -KPX nine one -11 -KPX nine seven -4 -KPX o T -64 -KPX o quoteright -13 -KPX o t -5 -KPX o v -18 -KPX o w -8 -KPX o x -20 -KPX o y -17 -KPX oacute v -18 -KPX oacute w -8 -KPX oacute y -17 -KPX ocircumflex t -5 -KPX odieresis t -5 -KPX odieresis v -18 -KPX odieresis w -8 -KPX odieresis x -20 -KPX odieresis y -17 -KPX ograve v -18 -KPX ograve w -8 -KPX ograve y -17 -KPX one comma -32 -KPX one eight -32 -KPX one five -33 -KPX one four -47 -KPX one nine -32 -KPX one one -65 -KPX one period -32 -KPX one seven -47 -KPX one six -28 -KPX one three -36 -KPX one two -37 -KPX one zero -28 -KPX p t -1 -KPX p y -14 -KPX period one -59 -KPX period quotedblright -18 -KPX period quoteright -20 -KPX q c 6 +KPX n y -19 +KPX nine four 4 +KPX nine one -21 +KPX nine seven -17 +KPX o T -84 +KPX o quoteright -17 +KPX o t -8 +KPX o v -23 +KPX o w -10 +KPX o x -25 +KPX o y -22 +KPX oacute v -23 +KPX oacute w -10 +KPX oacute y -22 +KPX ocircumflex t -8 +KPX odieresis t -8 +KPX odieresis v -23 +KPX odieresis w -10 +KPX odieresis x -25 +KPX odieresis y -22 +KPX ograve v -23 +KPX ograve w -10 +KPX ograve y -22 +KPX one comma -42 +KPX one eight -37 +KPX one five -43 +KPX one four -56 +KPX one nine -39 +KPX one one -85 +KPX one period -42 +KPX one seven -65 +KPX one six -37 +KPX one three -44 +KPX one two -47 +KPX one zero -34 +KPX p t -5 +KPX p y -20 +KPX period one -73 +KPX period quotedblright -32 +KPX period quoteright -29 +KPX q c 4 KPX q u 4 -KPX quotedblbase A 16 -KPX quotedblbase AE 21 -KPX quotedblbase T -56 -KPX quotedblbase V -53 -KPX quotedblbase W -38 -KPX quotedblbase Y -69 -KPX quotedblleft A -49 -KPX quotedblleft AE -45 -KPX quotedblleft Aacute -49 -KPX quotedblleft Adieresis -49 -KPX quotedblleft Aring -49 -KPX quotedblleft T 3 -KPX quotedblleft V 10 -KPX quotedblleft W 15 -KPX quotedblleft Y 2 -KPX quotedblright A -52 -KPX quotedblright AE -48 -KPX quotedblright Aacute -52 -KPX quotedblright Adieresis -52 -KPX quotedblright Aring -52 -KPX quotedblright T 4 +KPX quotedblbase A 12 +KPX quotedblbase AE 24 +KPX quotedblbase T -75 +KPX quotedblbase V -73 +KPX quotedblbase W -51 +KPX quotedblbase Y -92 +KPX quotedblleft A -68 +KPX quotedblleft AE -57 +KPX quotedblleft Aacute -68 +KPX quotedblleft Adieresis -68 +KPX quotedblleft Aring -68 +KPX quotedblleft T -2 +KPX quotedblleft V 6 +KPX quotedblleft W 16 +KPX quotedblleft Y -9 +KPX quotedblright A -69 +KPX quotedblright AE -57 +KPX quotedblright Aacute -69 +KPX quotedblright Adieresis -69 +KPX quotedblright Aring -69 +KPX quotedblright T 1 KPX quotedblright V 7 -KPX quotedblright W 12 -KPX quotedblright Y 0 -KPX quoteleft A -51 -KPX quoteleft AE -47 -KPX quoteleft Aacute -51 -KPX quoteleft Adieresis -51 -KPX quoteleft Aring -51 -KPX quoteleft T 1 -KPX quoteleft V 7 -KPX quoteleft W 12 -KPX quoteleft Y 0 -KPX quoteright A -55 -KPX quoteright AE -51 -KPX quoteright Aacute -55 -KPX quoteright Adieresis -55 -KPX quoteright Aring -55 -KPX quoteright comma -31 -KPX quoteright d -18 -KPX quoteright o -24 -KPX quoteright period -31 -KPX quoteright r -7 -KPX quoteright s -15 -KPX quoteright t 4 -KPX quoteright v 0 -KPX quoteright w 5 -KPX quoteright y 2 -KPX r a -1 -KPX r aacute -1 -KPX r acircumflex -1 -KPX r adieresis -1 -KPX r ae -2 -KPX r agrave -1 -KPX r aring -1 -KPX r c -4 -KPX r ccedilla -1 -KPX r colon -12 -KPX r comma -42 -KPX r d -2 -KPX r e 0 -KPX r eacute 0 -KPX r ecircumflex 0 -KPX r egrave 0 -KPX r f 17 +KPX quotedblright W 17 +KPX quotedblright Y -7 +KPX quoteleft A -73 +KPX quoteleft AE -62 +KPX quoteleft Aacute -73 +KPX quoteleft Adieresis -73 +KPX quoteleft Aring -73 +KPX quoteleft T -7 +KPX quoteleft V 2 +KPX quoteleft W 11 +KPX quoteleft Y -13 +KPX quoteright A -77 +KPX quoteright AE -66 +KPX quoteright Aacute -77 +KPX quoteright Adieresis -77 +KPX quoteright Aring -77 +KPX quoteright comma -46 +KPX quoteright d -27 +KPX quoteright o -30 +KPX quoteright period -45 +KPX quoteright r -15 +KPX quoteright s -22 +KPX quoteright t -4 +KPX quoteright v -5 +KPX quoteright w 1 +KPX quoteright y -3 +KPX r a 6 +KPX r aacute 6 +KPX r acircumflex 6 +KPX r adieresis 6 +KPX r ae 4 +KPX r agrave 6 +KPX r aring 6 +KPX r c 0 +KPX r ccedilla 0 +KPX r colon -27 +KPX r comma -57 +KPX r d 0 +KPX r e 4 +KPX r eacute 4 +KPX r ecircumflex 4 +KPX r egrave 4 +KPX r f 22 KPX r g -2 -KPX r h -5 -KPX r hyphen -25 -KPX r i -7 -KPX r j -7 -KPX r k -7 -KPX r l -7 -KPX r m -5 -KPX r n -5 -KPX r o -6 -KPX r oacute -6 -KPX r ocircumflex -6 -KPX r odieresis -6 -KPX r oe -6 -KPX r ograve -6 -KPX r oslash -6 -KPX r p -4 -KPX r period -42 -KPX r q -3 -KPX r quoteright 13 -KPX r r -5 -KPX r s -1 -KPX r semicolon -12 -KPX r t 17 -KPX r u -6 -KPX r v 15 -KPX r w 16 -KPX r x 10 -KPX r y 16 -KPX r z 5 -KPX s quoteright -11 -KPX s t -5 -KPX seven colon -40 -KPX seven comma -71 -KPX seven eight -2 -KPX seven five -9 -KPX seven four -53 -KPX seven one -4 -KPX seven period -71 -KPX seven seven 14 -KPX seven six -6 -KPX seven three 1 -KPX seven two 1 -KPX six four 10 -KPX six one -13 -KPX six seven 1 -KPX t S 1 -KPX t a 4 -KPX t aacute 4 -KPX t adieresis 4 -KPX t ae 4 -KPX t aring 4 -KPX t colon -5 -KPX t e -1 -KPX t eacute -1 -KPX t h 5 -KPX t o -8 -KPX t oacute -8 -KPX t odieresis -8 -KPX t quoteright 7 -KPX t semicolon -4 -KPX three four 8 -KPX three one -18 -KPX three seven -3 -KPX two four -11 -KPX two one -11 -KPX two seven 0 -KPX u quoteright 1 -KPX v a -17 -KPX v aacute -17 -KPX v acircumflex -17 -KPX v adieresis -17 -KPX v ae -18 -KPX v agrave -17 -KPX v aring -17 -KPX v atilde -17 -KPX v c -16 -KPX v colon -13 -KPX v comma -35 -KPX v e -12 -KPX v eacute -12 -KPX v ecircumflex -12 -KPX v egrave -12 -KPX v g -18 -KPX v hyphen 5 -KPX v l -7 -KPX v o -19 -KPX v oacute -19 -KPX v odieresis -19 -KPX v ograve -19 -KPX v oslash -16 -KPX v period -35 +KPX r h -4 +KPX r hyphen -35 +KPX r i -4 +KPX r j -6 +KPX r k 0 +KPX r l -4 +KPX r m -1 +KPX r n -2 +KPX r o -1 +KPX r oacute -1 +KPX r ocircumflex -1 +KPX r odieresis -1 +KPX r oe 5 +KPX r ograve -1 +KPX r oslash -4 +KPX r p 0 +KPX r period -57 +KPX r q 1 +KPX r quoteright 14 +KPX r r -2 +KPX r s 3 +KPX r semicolon -27 +KPX r t 22 +KPX r u 0 +KPX r v 21 +KPX r w 26 +KPX r x 17 +KPX r y 23 +KPX r z 9 +KPX s quoteright -12 +KPX s t -1 +KPX seven colon -63 +KPX seven comma -88 +KPX seven eight -3 +KPX seven five -21 +KPX seven four -62 +KPX seven one -14 +KPX seven period -87 +KPX seven seven 9 +KPX seven six -13 +KPX seven three 0 +KPX seven two -4 +KPX six four 7 +KPX six one -21 +KPX six seven -3 +KPX t S 0 +KPX t a 6 +KPX t aacute 6 +KPX t adieresis 6 +KPX t ae 7 +KPX t aring 6 +KPX t colon -25 +KPX t e -3 +KPX t eacute -3 +KPX t h 2 +KPX t o -10 +KPX t oacute -10 +KPX t odieresis -10 +KPX t quoteright 4 +KPX t semicolon -25 +KPX three four 6 +KPX three one -27 +KPX three seven -10 +KPX two four -9 +KPX two one -16 +KPX two seven -3 +KPX u quoteright -2 +KPX v a -15 +KPX v aacute -15 +KPX v acircumflex -15 +KPX v adieresis -15 +KPX v ae -16 +KPX v agrave -15 +KPX v aring -15 +KPX v atilde -15 +KPX v c -20 +KPX v colon -32 +KPX v comma -51 +KPX v e -15 +KPX v eacute -15 +KPX v ecircumflex -15 +KPX v egrave -15 +KPX v g -21 +KPX v hyphen 0 +KPX v l -5 +KPX v o -22 +KPX v oacute -22 +KPX v odieresis -22 +KPX v ograve -22 +KPX v oslash -20 +KPX v period -50 KPX v s -17 -KPX v semicolon -13 +KPX v semicolon -34 KPX w a -7 KPX w aacute -7 KPX w acircumflex -7 @@ -1199,59 +1283,59 @@ KPX w ae -8 KPX w agrave -7 KPX w aring -7 KPX w atilde -7 -KPX w c -6 -KPX w colon -10 -KPX w comma -20 -KPX w e -2 -KPX w eacute -2 -KPX w ecircumflex -2 -KPX w egrave -2 -KPX w g -8 -KPX w hyphen 14 -KPX w l -3 -KPX w o -9 -KPX w oacute -9 -KPX w odieresis -9 -KPX w ograve -9 -KPX w oslash -6 -KPX w period -20 -KPX w s -8 -KPX w semicolon -10 -KPX x a -10 -KPX x c -17 -KPX x e -13 -KPX x eacute -13 -KPX x o -20 -KPX x q -17 -KPX y a -18 -KPX y aacute -18 -KPX y acircumflex -18 -KPX y adieresis -18 -KPX y ae -19 -KPX y agrave -18 -KPX y aring -18 -KPX y atilde -18 -KPX y c -18 -KPX y colon -14 -KPX y comma -36 -KPX y e -14 -KPX y eacute -14 -KPX y ecircumflex -14 -KPX y egrave -14 -KPX y g -20 -KPX y hyphen 4 -KPX y l -8 -KPX y o -20 -KPX y oacute -20 -KPX y odieresis -20 -KPX y ograve -20 -KPX y oslash -17 -KPX y period -35 -KPX y s -19 -KPX y semicolon -14 -KPX zero four 11 -KPX zero one -10 -KPX zero seven -1 +KPX w c -8 +KPX w colon -27 +KPX w comma -33 +KPX w e -3 +KPX w eacute -3 +KPX w ecircumflex -3 +KPX w egrave -3 +KPX w g -9 +KPX w hyphen 11 +KPX w l -1 +KPX w o -10 +KPX w oacute -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w oslash -8 +KPX w period -32 +KPX w s -9 +KPX w semicolon -29 +KPX x a -9 +KPX x c -22 +KPX x e -17 +KPX x eacute -17 +KPX x o -24 +KPX x q -20 +KPX y a -14 +KPX y aacute -14 +KPX y acircumflex -14 +KPX y adieresis -14 +KPX y ae -15 +KPX y agrave -14 +KPX y aring -14 +KPX y atilde -14 +KPX y c -21 +KPX y colon -31 +KPX y comma -51 +KPX y e -16 +KPX y eacute -16 +KPX y ecircumflex -16 +KPX y egrave -16 +KPX y g -21 +KPX y hyphen 0 +KPX y l -4 +KPX y o -22 +KPX y oacute -22 +KPX y odieresis -22 +KPX y ograve -22 +KPX y oslash -20 +KPX y period -50 +KPX y s -16 +KPX y semicolon -33 +KPX zero four 5 +KPX zero one -19 +KPX zero seven -10 EndKernPairs EndKernData EndFontMetrics diff --git a/misc/gs_afm/HelvBoO.afm b/misc/gs_afm/HelvBoO.afm index 37efe8a3b8..9433a322e2 100644 --- a/misc/gs_afm/HelvBoO.afm +++ b/misc/gs_afm/HelvBoO.afm @@ -1,1257 +1,1341 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-BoldCondItal -FullName Nimbus Sans L Bold Condensed Italic +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. +FontName NimbusSanL-BoldItal +FullName Nimbus Sans L Bold Italic FamilyName Nimbus Sans L Weight Bold -ItalicAngle -9.0 +ItalicAngle -12.0 IsFixedPitch false -UnderlinePosition -100 -UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +UnderlinePosition -111 +UnderlineThickness 69 +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -143 -228 913 989 -CapHeight 718 -XHeight 532 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 273 ; N exclam ; B 77 0 325 718 ; -C 34 ; WX 389 ; N quotedbl ; B 158 447 433 718 ; -C 35 ; WX 456 ; N numbersign ; B 49 0 528 698 ; -C 36 ; WX 456 ; N dollar ; B 55 -115 510 775 ; -C 37 ; WX 729 ; N percent ; B 112 -19 739 710 ; -C 38 ; WX 592 ; N ampersand ; B 73 -19 600 718 ; -C 39 ; WX 228 ; N quoteright ; B 137 445 297 718 ; -C 40 ; WX 273 ; N parenleft ; B 62 -207 385 734 ; -C 41 ; WX 273 ; N parenright ; B -21 -207 302 734 ; -C 42 ; WX 319 ; N asterisk ; B 120 387 394 718 ; -C 43 ; WX 479 ; N plus ; B 67 0 500 506 ; -C 44 ; WX 228 ; N comma ; B 23 -168 201 146 ; -C 45 ; WX 273 ; N hyphen ; B 60 215 311 345 ; -C 46 ; WX 228 ; N period ; B 52 0 201 146 ; -C 47 ; WX 228 ; N slash ; B -30 -19 383 737 ; -C 48 ; WX 456 ; N zero ; B 71 -19 506 710 ; -C 49 ; WX 456 ; N one ; B 142 0 434 710 ; -C 50 ; WX 456 ; N two ; B 21 0 508 710 ; -C 51 ; WX 456 ; N three ; B 54 -19 499 710 ; -C 52 ; WX 456 ; N four ; B 50 0 490 710 ; -C 53 ; WX 456 ; N five ; B 53 -19 522 698 ; -C 54 ; WX 456 ; N six ; B 70 -19 507 710 ; -C 55 ; WX 456 ; N seven ; B 102 0 555 698 ; -C 56 ; WX 456 ; N eight ; B 57 -19 505 710 ; -C 57 ; WX 456 ; N nine ; B 64 -19 504 710 ; -C 58 ; WX 273 ; N colon ; B 75 0 288 512 ; -C 59 ; WX 273 ; N semicolon ; B 46 -168 288 512 ; -C 60 ; WX 479 ; N less ; B 67 -15 537 521 ; -C 61 ; WX 479 ; N equal ; B 48 87 519 419 ; -C 62 ; WX 479 ; N greater ; B 30 -15 500 521 ; -C 63 ; WX 501 ; N question ; B 135 0 550 727 ; -C 64 ; WX 800 ; N at ; B 152 -19 782 737 ; -C 65 ; WX 592 ; N A ; B 16 0 576 718 ; -C 66 ; WX 592 ; N B ; B 62 0 626 718 ; -C 67 ; WX 592 ; N C ; B 88 -19 647 737 ; -C 68 ; WX 592 ; N D ; B 62 0 637 718 ; -C 69 ; WX 547 ; N E ; B 62 0 620 718 ; -C 70 ; WX 501 ; N F ; B 62 0 606 718 ; -C 71 ; WX 638 ; N G ; B 89 -19 670 737 ; -C 72 ; WX 592 ; N H ; B 58 0 659 718 ; -C 73 ; WX 228 ; N I ; B 52 0 301 718 ; -C 74 ; WX 456 ; N J ; B 49 -18 522 718 ; -C 75 ; WX 592 ; N K ; B 71 0 703 718 ; -C 76 ; WX 501 ; N L ; B 62 0 501 718 ; -C 77 ; WX 683 ; N M ; B 57 0 752 718 ; -C 78 ; WX 592 ; N N ; B 57 0 661 718 ; -C 79 ; WX 638 ; N O ; B 88 -19 675 737 ; -C 80 ; WX 547 ; N P ; B 62 0 605 718 ; -C 81 ; WX 638 ; N Q ; B 88 -52 675 737 ; -C 82 ; WX 592 ; N R ; B 62 0 638 718 ; -C 83 ; WX 547 ; N S ; B 66 -19 588 737 ; -C 84 ; WX 501 ; N T ; B 114 0 615 718 ; -C 85 ; WX 592 ; N U ; B 96 -19 659 718 ; -C 86 ; WX 547 ; N V ; B 141 0 656 718 ; -C 87 ; WX 774 ; N W ; B 138 0 887 718 ; -C 88 ; WX 547 ; N X ; B 11 0 648 718 ; -C 89 ; WX 547 ; N Y ; B 137 0 661 718 ; -C 90 ; WX 501 ; N Z ; B 20 0 604 718 ; -C 91 ; WX 273 ; N bracketleft ; B 17 -196 379 722 ; -C 92 ; WX 228 ; N backslash ; B 101 -19 252 737 ; -C 93 ; WX 273 ; N bracketright ; B -14 -196 347 722 ; -C 94 ; WX 479 ; N asciicircum ; B 107 323 484 698 ; -C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ; -C 96 ; WX 228 ; N quoteleft ; B 136 454 296 727 ; -C 97 ; WX 456 ; N a ; B 45 -14 478 546 ; -C 98 ; WX 501 ; N b ; B 50 -14 529 718 ; -C 99 ; WX 456 ; N c ; B 65 -14 491 546 ; -C 100 ; WX 501 ; N d ; B 67 -14 577 718 ; -C 101 ; WX 456 ; N e ; B 58 -14 486 546 ; -C 102 ; WX 273 ; N f ; B 71 0 385 727 ; -C 103 ; WX 501 ; N g ; B 31 -217 546 546 ; -C 104 ; WX 501 ; N h ; B 53 0 516 718 ; -C 105 ; WX 228 ; N i ; B 57 0 298 725 ; -C 106 ; WX 228 ; N j ; B -35 -214 298 725 ; -C 107 ; WX 456 ; N k ; B 57 0 549 718 ; -C 108 ; WX 228 ; N l ; B 57 0 297 718 ; -C 109 ; WX 729 ; N m ; B 52 0 746 546 ; -C 110 ; WX 501 ; N n ; B 53 0 516 546 ; -C 111 ; WX 501 ; N o ; B 67 -14 527 546 ; -C 112 ; WX 501 ; N p ; B 15 -207 529 546 ; -C 113 ; WX 501 ; N q ; B 66 -207 545 546 ; -C 114 ; WX 319 ; N r ; B 52 0 401 546 ; -C 115 ; WX 456 ; N s ; B 52 -14 479 546 ; -C 116 ; WX 273 ; N t ; B 82 -6 346 676 ; -C 117 ; WX 501 ; N u ; B 80 -14 540 532 ; -C 118 ; WX 456 ; N v ; B 103 0 538 532 ; -C 119 ; WX 638 ; N w ; B 101 0 723 532 ; -C 120 ; WX 456 ; N x ; B 12 0 531 532 ; -C 121 ; WX 456 ; N y ; B 34 -214 535 532 ; -C 122 ; WX 410 ; N z ; B 16 0 478 532 ; -C 123 ; WX 319 ; N braceleft ; B 77 -196 425 722 ; -C 124 ; WX 230 ; N bar ; B 66 -19 289 737 ; -C 125 ; WX 319 ; N braceright ; B -14 -196 333 722 ; -C 126 ; WX 479 ; N asciitilde ; B 94 173 473 336 ; -C 161 ; WX 273 ; N exclamdown ; B 41 -186 290 532 ; -C 162 ; WX 456 ; N cent ; B 65 -118 491 628 ; -C 163 ; WX 456 ; N sterling ; B 41 -16 520 718 ; -C 164 ; WX 137 ; N fraction ; B -143 -19 399 710 ; -C 165 ; WX 456 ; N yen ; B 49 0 585 698 ; -C 166 ; WX 456 ; N florin ; B -41 -210 548 737 ; -C 167 ; WX 456 ; N section ; B 50 -184 491 727 ; -C 168 ; WX 456 ; N currency ; B 22 76 558 636 ; -C 169 ; WX 195 ; N quotesingle ; B 135 447 263 718 ; -C 170 ; WX 410 ; N quotedblleft ; B 132 454 482 727 ; -C 171 ; WX 456 ; N guillemotleft ; B 111 76 468 484 ; -C 172 ; WX 273 ; N guilsinglleft ; B 106 76 289 484 ; -C 173 ; WX 273 ; N guilsinglright ; B 81 76 264 484 ; -C 174 ; WX 501 ; N fi ; B 71 0 571 727 ; -C 175 ; WX 501 ; N fl ; B 71 0 570 727 ; -C 177 ; WX 456 ; N endash ; B 40 227 514 333 ; -C 178 ; WX 456 ; N dagger ; B 97 -171 513 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 38 -171 515 718 ; -C 180 ; WX 228 ; N periodcentered ; B 90 172 226 334 ; -C 182 ; WX 456 ; N paragraph ; B 80 -191 564 700 ; -C 183 ; WX 287 ; N bullet ; B 68 194 345 524 ; -C 184 ; WX 228 ; N quotesinglbase ; B 34 -146 194 127 ; -C 185 ; WX 410 ; N quotedblbase ; B 29 -146 380 127 ; -C 186 ; WX 410 ; N quotedblright ; B 132 445 483 718 ; -C 187 ; WX 456 ; N guillemotright ; B 85 76 443 484 ; -C 188 ; WX 820 ; N ellipsis ; B 75 0 770 146 ; -C 189 ; WX 820 ; N perthousand ; B 62 -19 851 710 ; -C 191 ; WX 501 ; N questiondown ; B 44 -195 459 532 ; -C 193 ; WX 273 ; N grave ; B 112 604 290 750 ; -C 194 ; WX 273 ; N acute ; B 194 604 423 750 ; -C 195 ; WX 273 ; N circumflex ; B 97 604 387 750 ; -C 196 ; WX 273 ; N tilde ; B 92 610 415 737 ; -C 197 ; WX 273 ; N macron ; B 100 604 396 678 ; -C 198 ; WX 273 ; N breve ; B 128 604 405 750 ; -C 199 ; WX 273 ; N dotaccent ; B 192 614 316 729 ; -C 200 ; WX 273 ; N dieresis ; B 112 614 395 729 ; -C 202 ; WX 273 ; N ring ; B 164 568 344 776 ; -C 203 ; WX 273 ; N cedilla ; B -30 -228 180 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 113 604 529 750 ; -C 206 ; WX 273 ; N ogonek ; B 33 -228 216 0 ; -C 207 ; WX 273 ; N caron ; B 123 604 412 750 ; -C 208 ; WX 820 ; N emdash ; B 40 227 878 333 ; -C 225 ; WX 820 ; N AE ; B 4 0 902 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 75 276 381 737 ; -C 232 ; WX 501 ; N Lslash ; B 28 0 501 718 ; -C 233 ; WX 638 ; N Oslash ; B 29 -27 733 745 ; -C 234 ; WX 820 ; N OE ; B 81 -19 913 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 75 276 398 737 ; -C 241 ; WX 729 ; N ae ; B 46 -14 757 546 ; -C 245 ; WX 228 ; N dotlessi ; B 57 0 264 532 ; -C 248 ; WX 228 ; N lslash ; B 33 0 334 718 ; -C 249 ; WX 501 ; N oslash ; B 18 -29 575 560 ; -C 250 ; WX 774 ; N oe ; B 67 -14 801 546 ; -C 251 ; WX 501 ; N germandbls ; B 57 -14 539 731 ; -C -1 ; WX 547 ; N Yacute ; B 137 0 661 936 ; -C -1 ; WX 592 ; N Ucircumflex ; B 96 -19 659 936 ; -C -1 ; WX 592 ; N Ugrave ; B 96 -19 659 936 ; -C -1 ; WX 501 ; N Zcaron ; B 20 0 604 936 ; -C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 915 ; -C -1 ; WX 273 ; N threesuperior ; B 75 271 361 722 ; -C -1 ; WX 592 ; N Uacute ; B 96 -19 659 936 ; -C -1 ; WX 273 ; N twosuperior ; B 57 283 368 722 ; -C -1 ; WX 592 ; N Udieresis ; B 96 -19 659 915 ; -C -1 ; WX 228 ; N middot ; B 90 172 226 334 ; -C -1 ; WX 273 ; N onesuperior ; B 121 283 318 710 ; -C -1 ; WX 456 ; N aacute ; B 45 -14 514 750 ; -C -1 ; WX 456 ; N agrave ; B 45 -14 478 750 ; -C -1 ; WX 456 ; N acircumflex ; B 45 -14 478 750 ; -C -1 ; WX 547 ; N Scaron ; B 66 -19 588 936 ; -C -1 ; WX 638 ; N Otilde ; B 88 -19 675 923 ; -C -1 ; WX 273 ; N sfthyphen ; B 60 215 311 345 ; -C -1 ; WX 456 ; N atilde ; B 45 -14 507 737 ; -C -1 ; WX 456 ; N aring ; B 45 -14 478 803 ; -C -1 ; WX 456 ; N adieresis ; B 45 -14 487 729 ; -C -1 ; WX 638 ; N Ograve ; B 88 -19 675 936 ; -C -1 ; WX 638 ; N Ocircumflex ; B 88 -19 675 936 ; -C -1 ; WX 638 ; N Odieresis ; B 88 -19 675 915 ; -C -1 ; WX 592 ; N Ntilde ; B 57 0 661 923 ; -C -1 ; WX 456 ; N edieresis ; B 58 -14 488 729 ; -C -1 ; WX 456 ; N eacute ; B 58 -14 515 750 ; -C -1 ; WX 456 ; N egrave ; B 58 -14 486 750 ; -C -1 ; WX 228 ; N Icircumflex ; B 52 0 397 936 ; -C -1 ; WX 456 ; N ecircumflex ; B 58 -14 486 750 ; -C -1 ; WX 228 ; N Igrave ; B 52 0 301 936 ; -C -1 ; WX 228 ; N Iacute ; B 52 0 433 936 ; -C -1 ; WX 228 ; N Idieresis ; B 52 0 405 915 ; -C -1 ; WX 328 ; N degree ; B 143 426 383 712 ; -C -1 ; WX 547 ; N Ecircumflex ; B 62 0 620 936 ; -C -1 ; WX 479 ; N minus ; B 67 197 500 309 ; -C -1 ; WX 479 ; N multiply ; B 47 1 520 505 ; -C -1 ; WX 479 ; N divide ; B 67 -42 500 548 ; -C -1 ; WX 547 ; N Egrave ; B 62 0 620 936 ; -C -1 ; WX 820 ; N trademark ; B 146 306 909 718 ; -C -1 ; WX 638 ; N Oacute ; B 88 -19 675 936 ; -C -1 ; WX 501 ; N thorn ; B 15 -207 529 718 ; -C -1 ; WX 501 ; N eth ; B 67 -14 549 737 ; -C -1 ; WX 547 ; N Eacute ; B 62 0 620 936 ; -C -1 ; WX 456 ; N ccedilla ; B 65 -228 491 546 ; -C -1 ; WX 228 ; N idieresis ; B 57 0 373 729 ; -C -1 ; WX 228 ; N iacute ; B 57 0 401 750 ; -C -1 ; WX 228 ; N igrave ; B 57 0 268 750 ; -C -1 ; WX 479 ; N plusminus ; B 33 0 512 578 ; -C -1 ; WX 684 ; N onehalf ; B 108 -19 704 710 ; -C -1 ; WX 684 ; N onequarter ; B 108 -19 661 710 ; -C -1 ; WX 684 ; N threequarters ; B 82 -19 688 722 ; -C -1 ; WX 228 ; N icircumflex ; B 57 0 365 750 ; -C -1 ; WX 547 ; N Edieresis ; B 62 0 620 915 ; -C -1 ; WX 501 ; N ntilde ; B 53 0 529 737 ; -C -1 ; WX 592 ; N Aring ; B 16 0 576 989 ; -C -1 ; WX 501 ; N odieresis ; B 67 -14 527 729 ; -C -1 ; WX 501 ; N oacute ; B 67 -14 537 750 ; -C -1 ; WX 501 ; N ograve ; B 67 -14 527 750 ; -C -1 ; WX 501 ; N ocircumflex ; B 67 -14 527 750 ; -C -1 ; WX 501 ; N otilde ; B 67 -14 529 737 ; -C -1 ; WX 456 ; N scaron ; B 52 -14 503 750 ; -C -1 ; WX 501 ; N udieresis ; B 80 -14 540 729 ; -C -1 ; WX 501 ; N uacute ; B 80 -14 540 750 ; -C -1 ; WX 501 ; N ugrave ; B 80 -14 540 750 ; -C -1 ; WX 501 ; N ucircumflex ; B 80 -14 540 750 ; -C -1 ; WX 456 ; N yacute ; B 34 -214 535 750 ; -C -1 ; WX 410 ; N zcaron ; B 16 0 480 750 ; -C -1 ; WX 456 ; N ydieresis ; B 34 -214 535 729 ; -C -1 ; WX 604 ; N copyright ; B 46 -19 685 737 ; -C -1 ; WX 604 ; N registered ; B 45 -19 684 737 ; -C -1 ; WX 592 ; N Atilde ; B 16 0 607 923 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 88 -228 647 737 ; -C -1 ; WX 592 ; N Acircumflex ; B 16 0 579 936 ; -C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ; -C -1 ; WX 479 ; N logicalnot ; B 86 108 519 419 ; -C -1 ; WX 592 ; N Aacute ; B 16 0 615 936 ; -C -1 ; WX 592 ; N Eth ; B 51 0 637 718 ; -C -1 ; WX 230 ; N brokenbar ; B 66 -19 289 737 ; -C -1 ; WX 547 ; N Thorn ; B 62 0 588 718 ; -C -1 ; WX 592 ; N Adieresis ; B 16 0 587 915 ; -C -1 ; WX 501 ; N mu ; B 18 -207 540 532 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; +FontBBox -177 -309 1107 953 +CapHeight 729 +XHeight 540 +Descender -217 +Ascender 729 +StartCharMetrics 316 +C 32 ; WX 278 ; N space ; B 245 0 245 0 ; +C 33 ; WX 333 ; N exclam ; B 112 0 417 726 ; +C 34 ; WX 474 ; N quotedbl ; B 177 470 579 729 ; +C 35 ; WX 556 ; N numbersign ; B 33 -32 660 697 ; +C 36 ; WX 556 ; N dollar ; B 59 -126 628 763 ; +C 37 ; WX 889 ; N percent ; B 129 -20 903 709 ; +C 38 ; WX 722 ; N ampersand ; B 89 -23 720 723 ; +C 39 ; WX 278 ; N quoteright ; B 165 469 356 729 ; +C 40 ; WX 333 ; N parenleft ; B 84 -200 458 729 ; +C 41 ; WX 333 ; N parenright ; B -21 -200 356 729 ; +C 42 ; WX 389 ; N asterisk ; B 145 407 478 729 ; +C 43 ; WX 584 ; N plus ; B 87 -10 596 473 ; +C 44 ; WX 278 ; N comma ; B 27 -174 245 146 ; +C 45 ; WX 333 ; N hyphen ; B 70 207 371 342 ; +C 46 ; WX 278 ; N period ; B 64 0 245 146 ; +C 47 ; WX 278 ; N slash ; B -1 -14 427 714 ; +C 48 ; WX 556 ; N zero ; B 81 -23 614 724 ; +C 49 ; WX 556 ; N one ; B 172 0 529 709 ; +C 50 ; WX 556 ; N two ; B 30 0 628 724 ; +C 51 ; WX 556 ; N three ; B 67 -23 613 724 ; +C 52 ; WX 556 ; N four ; B 57 0 599 709 ; +C 53 ; WX 556 ; N five ; B 59 -23 641 709 ; +C 54 ; WX 556 ; N six ; B 85 -23 625 724 ; +C 55 ; WX 556 ; N seven ; B 131 0 679 709 ; +C 56 ; WX 556 ; N eight ; B 60 -23 620 724 ; +C 57 ; WX 556 ; N nine ; B 68 -23 611 724 ; +C 58 ; WX 333 ; N colon ; B 113 0 374 520 ; +C 59 ; WX 333 ; N semicolon ; B 76 -174 374 520 ; +C 60 ; WX 584 ; N less ; B 77 -10 630 474 ; +C 61 ; WX 584 ; N equal ; B 61 52 622 412 ; +C 62 ; WX 584 ; N greater ; B 38 -10 591 474 ; +C 63 ; WX 611 ; N question ; B 168 0 672 744 ; +C 64 ; WX 975 ; N at ; B 73 -137 1032 745 ; +C 65 ; WX 722 ; N A ; B 26 0 703 729 ; +C 66 ; WX 722 ; N B ; B 82 0 762 729 ; +C 67 ; WX 722 ; N C ; B 107 -23 793 741 ; +C 68 ; WX 722 ; N D ; B 77 0 776 729 ; +C 69 ; WX 667 ; N E ; B 79 0 762 729 ; +C 70 ; WX 611 ; N F ; B 74 0 741 729 ; +C 71 ; WX 778 ; N G ; B 107 -23 819 741 ; +C 72 ; WX 722 ; N H ; B 68 0 812 729 ; +C 73 ; WX 278 ; N I ; B 63 0 368 729 ; +C 74 ; WX 556 ; N J ; B 59 -23 641 729 ; +C 75 ; WX 722 ; N K ; B 74 0 843 729 ; +C 76 ; WX 611 ; N L ; B 80 0 606 729 ; +C 77 ; WX 833 ; N M ; B 66 0 931 729 ; +C 78 ; WX 722 ; N N ; B 68 0 816 729 ; +C 79 ; WX 778 ; N O ; B 106 -23 828 741 ; +C 80 ; WX 667 ; N P ; B 76 0 747 729 ; +C 81 ; WX 778 ; N Q ; B 109 -54 831 741 ; +C 82 ; WX 722 ; N R ; B 80 0 785 729 ; +C 83 ; WX 667 ; N S ; B 76 -23 725 741 ; +C 84 ; WX 611 ; N T ; B 142 0 753 729 ; +C 85 ; WX 722 ; N U ; B 119 -23 809 729 ; +C 86 ; WX 667 ; N V ; B 179 0 802 729 ; +C 87 ; WX 944 ; N W ; B 168 0 1087 729 ; +C 88 ; WX 667 ; N X ; B 22 0 802 729 ; +C 89 ; WX 667 ; N Y ; B 182 0 805 729 ; +C 90 ; WX 611 ; N Z ; B 30 0 733 729 ; +C 91 ; WX 333 ; N bracketleft ; B 23 -200 463 729 ; +C 92 ; WX 278 ; N backslash ; B 138 -23 285 709 ; +C 93 ; WX 333 ; N bracketright ; B -25 -200 415 729 ; +C 94 ; WX 584 ; N asciicircum ; B 119 270 580 695 ; +C 95 ; WX 556 ; N underscore ; B -65 -145 550 -76 ; +C 96 ; WX 278 ; N quoteleft ; B 167 469 357 729 ; +C 97 ; WX 556 ; N a ; B 50 -23 578 549 ; +C 98 ; WX 611 ; N b ; B 59 -23 640 729 ; +C 99 ; WX 556 ; N c ; B 77 -23 597 549 ; +C 100 ; WX 611 ; N d ; B 79 -23 700 729 ; +C 101 ; WX 556 ; N e ; B 64 -23 591 549 ; +C 102 ; WX 333 ; N f ; B 90 0 464 729 ; +C 103 ; WX 611 ; N g ; B 26 -218 656 549 ; +C 104 ; WX 611 ; N h ; B 67 0 629 729 ; +C 105 ; WX 278 ; N i ; B 67 0 362 729 ; +C 106 ; WX 278 ; N j ; B -43 -218 365 729 ; +C 107 ; WX 556 ; N k ; B 59 0 651 729 ; +C 108 ; WX 278 ; N l ; B 67 0 362 729 ; +C 109 ; WX 889 ; N m ; B 60 0 911 549 ; +C 110 ; WX 611 ; N n ; B 63 0 629 549 ; +C 111 ; WX 611 ; N o ; B 82 -23 634 549 ; +C 112 ; WX 611 ; N p ; B 11 -218 637 549 ; +C 113 ; WX 611 ; N q ; B 72 -218 659 549 ; +C 114 ; WX 389 ; N r ; B 63 0 487 549 ; +C 115 ; WX 556 ; N s ; B 60 -23 589 549 ; +C 116 ; WX 333 ; N t ; B 101 -23 414 674 ; +C 117 ; WX 611 ; N u ; B 88 -23 656 540 ; +C 118 ; WX 556 ; N v ; B 129 0 651 540 ; +C 119 ; WX 778 ; N w ; B 120 0 881 540 ; +C 120 ; WX 556 ; N x ; B 16 0 648 540 ; +C 121 ; WX 556 ; N y ; B 37 -219 653 540 ; +C 122 ; WX 500 ; N z ; B 21 0 575 540 ; +C 123 ; WX 389 ; N braceleft ; B 84 -200 472 729 ; +C 124 ; WX 280 ; N bar ; B 57 -200 335 729 ; +C 125 ; WX 389 ; N braceright ; B 29 -200 419 729 ; +C 126 ; WX 584 ; N asciitilde ; B 97 142 581 314 ; +C 161 ; WX 333 ; N exclamdown ; B 26 -186 331 540 ; +C 162 ; WX 556 ; N cent ; B 79 -124 598 634 ; +C 163 ; WX 556 ; N sterling ; B 49 -23 629 715 ; +C 164 ; WX 167 ; N fraction ; B -177 -20 489 715 ; +C 165 ; WX 556 ; N yen ; B 107 0 702 704 ; +C 166 ; WX 556 ; N florin ; B -21 -220 690 744 ; +C 167 ; WX 556 ; N section ; B 56 -201 596 723 ; +C 168 ; WX 556 ; N currency ; B 66 100 644 604 ; +C 169 ; WX 238 ; N quotesingle ; B 177 470 343 729 ; +C 170 ; WX 500 ; N quotedblleft ; B 171 469 588 729 ; +C 171 ; WX 556 ; N guillemotleft ; B 135 72 571 481 ; +C 172 ; WX 333 ; N guilsinglleft ; B 128 72 351 481 ; +C 173 ; WX 333 ; N guilsinglright ; B 96 72 319 481 ; +C 174 ; WX 611 ; N fi ; B 85 0 703 729 ; +C 175 ; WX 611 ; N fl ; B 88 0 701 729 ; +C 177 ; WX 556 ; N endash ; B 35 207 624 311 ; +C 178 ; WX 556 ; N dagger ; B 109 -194 626 709 ; +C 179 ; WX 556 ; N daggerdbl ; B 35 -194 623 709 ; +C 180 ; WX 278 ; N periodcentered ; B 143 182 270 282 ; +C 182 ; WX 556 ; N paragraph ; B 121 -191 684 729 ; +C 183 ; WX 350 ; N bullet ; B 111 175 367 425 ; +C 184 ; WX 278 ; N quotesinglbase ; B 37 -135 228 125 ; +C 185 ; WX 500 ; N quotedblbase ; B 37 -135 462 125 ; +C 186 ; WX 500 ; N quotedblright ; B 173 469 595 729 ; +C 187 ; WX 556 ; N guillemotright ; B 103 72 533 481 ; +C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ; +C 189 ; WX 1000 ; N perthousand ; B 72 -21 1021 739 ; +C 191 ; WX 611 ; N questiondown ; B 52 -204 556 540 ; +C 193 ; WX 333 ; N grave ; B 175 607 339 757 ; +C 194 ; WX 333 ; N acute ; B 247 607 475 757 ; +C 195 ; WX 333 ; N circumflex ; B 135 610 453 757 ; +C 196 ; WX 333 ; N tilde ; B 117 622 500 744 ; +C 197 ; WX 333 ; N macron ; B 150 642 467 722 ; +C 198 ; WX 333 ; N breve ; B 188 611 455 754 ; +C 199 ; WX 333 ; N dotaccent ; B 241 621 377 741 ; +C 200 ; WX 333 ; N dieresis ; B 147 621 469 741 ; +C 202 ; WX 333 ; N ring ; B 214 593 398 773 ; +C 203 ; WX 333 ; N cedilla ; B -13 -220 270 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 82 610 498 757 ; +C 206 ; WX 333 ; N ogonek ; B 23 -233 248 0 ; +C 207 ; WX 333 ; N caron ; B 167 610 485 757 ; +C 208 ; WX 1000 ; N emdash ; B 37 207 1070 311 ; +C 225 ; WX 1000 ; N AE ; B 1 0 1104 729 ; +C 227 ; WX 370 ; N ordfeminine ; B 96 262 451 729 ; +C 232 ; WX 611 ; N Lslash ; B 54 0 624 729 ; +C 233 ; WX 778 ; N Oslash ; B 34 -39 906 749 ; +C 234 ; WX 1000 ; N OE ; B 90 -23 1107 741 ; +C 235 ; WX 365 ; N ordmasculine ; B 92 262 471 729 ; +C 241 ; WX 889 ; N ae ; B 54 -23 927 549 ; +C 245 ; WX 278 ; N dotlessi ; B 67 0 322 540 ; +C 248 ; WX 278 ; N lslash ; B 50 0 372 729 ; +C 249 ; WX 611 ; N oslash ; B 12 -38 709 557 ; +C 250 ; WX 944 ; N oe ; B 71 -23 986 549 ; +C 251 ; WX 611 ; N germandbls ; B 67 -23 654 729 ; +C -1 ; WX 722 ; N Udieresis ; B 119 -23 809 920 ; +C -1 ; WX 722 ; N Uacute ; B 119 -23 809 936 ; +C -1 ; WX 667 ; N Scedilla ; B 76 -220 725 741 ; +C -1 ; WX 611 ; N Tcaron ; B 142 0 753 936 ; +C -1 ; WX 667 ; N Scaron ; B 76 -23 725 936 ; +C -1 ; WX 722 ; N Rcaron ; B 80 0 785 936 ; +C -1 ; WX 722 ; N Racute ; B 80 0 785 936 ; +C -1 ; WX 667 ; N Sacute ; B 76 -23 725 936 ; +C -1 ; WX 778 ; N Otilde ; B 106 -23 828 923 ; +C -1 ; WX 611 ; N ucircumflex ; B 88 -23 656 757 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 106 -23 841 936 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 119 -23 809 936 ; +C -1 ; WX 667 ; N Yacute ; B 182 0 805 936 ; +C -1 ; WX 722 ; N Eth ; B 73 0 776 729 ; +C -1 ; WX 722 ; N Dcroat ; B 73 0 776 729 ; +C -1 ; WX 611 ; N Zacute ; B 30 0 733 936 ; +C -1 ; WX 722 ; N Uring ; B 119 -23 809 953 ; +C -1 ; WX 611 ; N gbreve ; B 26 -218 656 754 ; +C -1 ; WX 556 ; N eogonek ; B 64 -233 591 549 ; +C -1 ; WX 556 ; N edotaccent ; B 64 -23 591 741 ; +C -1 ; WX 556 ; N ecaron ; B 64 -23 593 757 ; +C -1 ; WX 722 ; N Ugrave ; B 119 -23 809 936 ; +C -1 ; WX 667 ; N Thorn ; B 76 0 721 729 ; +C -1 ; WX 556 ; N eacute ; B 64 -23 591 757 ; +C -1 ; WX 556 ; N edieresis ; B 64 -23 591 741 ; +C -1 ; WX 722 ; N dcaron ; B 79 -23 882 729 ; +C -1 ; WX 556 ; N ccedilla ; B 77 -220 597 549 ; +C -1 ; WX 556 ; N ccaron ; B 77 -23 607 757 ; +C -1 ; WX 556 ; N cacute ; B 77 -23 597 757 ; +C -1 ; WX 556 ; N aogonek ; B 50 -233 578 549 ; +C -1 ; WX 556 ; N aring ; B 50 -23 578 773 ; +C -1 ; WX 556 ; N atilde ; B 50 -23 612 744 ; +C -1 ; WX 556 ; N abreve ; B 50 -23 578 754 ; +C -1 ; WX 556 ; N egrave ; B 64 -23 591 757 ; +C -1 ; WX 556 ; N agrave ; B 50 -23 578 757 ; +C -1 ; WX 556 ; N aacute ; B 50 -23 587 757 ; +C -1 ; WX 556 ; N adieresis ; B 50 -23 581 741 ; +C -1 ; WX 722 ; N Uogonek ; B 119 -233 809 729 ; +C -1 ; WX 611 ; N ugrave ; B 88 -23 656 757 ; +C -1 ; WX 611 ; N uacute ; B 88 -23 656 757 ; +C -1 ; WX 611 ; N udieresis ; B 88 -23 656 741 ; +C -1 ; WX 404 ; N tcaron ; B 101 -23 578 829 ; +C -1 ; WX 556 ; N scommaaccent ; B 60 -307 589 549 ; +C -1 ; WX 611 ; N Zcaron ; B 30 0 733 936 ; +C -1 ; WX 556 ; N ecircumflex ; B 64 -23 591 757 ; +C -1 ; WX 722 ; N Ucircumflex ; B 119 -23 809 936 ; +C -1 ; WX 556 ; N acircumflex ; B 50 -23 578 757 ; +C -1 ; WX 611 ; N Zdotaccent ; B 30 0 733 918 ; +C -1 ; WX 556 ; N scaron ; B 60 -23 597 757 ; +C -1 ; WX 722 ; N Amacron ; B 26 0 706 901 ; +C -1 ; WX 556 ; N sacute ; B 60 -23 589 757 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 142 -307 753 729 ; +C -1 ; WX 667 ; N Ydieresis ; B 182 0 805 920 ; +C -1 ; WX 611 ; N thorn ; B 11 -218 637 729 ; +C -1 ; WX 667 ; N Emacron ; B 79 0 762 901 ; +C -1 ; WX 778 ; N Ograve ; B 106 -23 828 936 ; +C -1 ; WX 778 ; N Oacute ; B 106 -23 828 936 ; +C -1 ; WX 778 ; N Odieresis ; B 106 -23 828 920 ; +C -1 ; WX 722 ; N Ntilde ; B 68 0 816 923 ; +C -1 ; WX 722 ; N Ncaron ; B 68 0 816 936 ; +C -1 ; WX 722 ; N Nacute ; B 68 0 816 936 ; +C -1 ; WX 611 ; N Lcaron ; B 80 0 607 729 ; +C -1 ; WX 611 ; N Lacute ; B 80 0 606 936 ; +C -1 ; WX 278 ; N Idotaccent ; B 63 0 388 918 ; +C -1 ; WX 389 ; N racute ; B 63 0 500 757 ; +C -1 ; WX 278 ; N Icircumflex ; B 63 0 467 936 ; +C -1 ; WX 611 ; N ohungarumlaut ; B 82 -23 710 757 ; +C -1 ; WX 611 ; N otilde ; B 82 -23 639 744 ; +C -1 ; WX 556 ; N Euro ; B 21 -23 648 724 ; +C -1 ; WX 611 ; N ocircumflex ; B 82 -23 634 757 ; +C -1 ; WX 444 ; N onesuperior ; B 210 284 438 709 ; +C -1 ; WX 444 ; N twosuperior ; B 124 284 499 718 ; +C -1 ; WX 444 ; N threesuperior ; B 147 271 490 718 ; +C -1 ; WX 278 ; N Igrave ; B 63 0 368 936 ; +C -1 ; WX 278 ; N Iacute ; B 63 0 489 936 ; +C -1 ; WX 278 ; N Imacron ; B 63 0 466 901 ; +C -1 ; WX 278 ; N Iogonek ; B 7 -233 368 729 ; +C -1 ; WX 278 ; N Idieresis ; B 63 0 483 920 ; +C -1 ; WX 778 ; N Gbreve ; B 107 -23 819 934 ; +C -1 ; WX 722 ; N Umacron ; B 119 -23 809 901 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 74 -307 843 729 ; +C -1 ; WX 611 ; N ograve ; B 82 -23 634 757 ; +C -1 ; WX 667 ; N Scommaaccent ; B 76 -307 725 741 ; +C -1 ; WX 667 ; N Eogonek ; B 79 -233 762 729 ; +C -1 ; WX 611 ; N oacute ; B 82 -23 634 757 ; +C -1 ; WX 667 ; N Edotaccent ; B 79 0 762 918 ; +C -1 ; WX 268 ; N iogonek ; B 0 -233 351 729 ; +C -1 ; WX 611 ; N gcommaaccent ; B 26 -218 656 854 ; +C -1 ; WX 611 ; N odieresis ; B 82 -23 634 741 ; +C -1 ; WX 611 ; N ntilde ; B 63 0 646 744 ; +C -1 ; WX 611 ; N ncaron ; B 63 0 629 757 ; +C -1 ; WX 667 ; N Ecaron ; B 79 0 762 936 ; +C -1 ; WX 667 ; N Ecircumflex ; B 79 0 762 936 ; +C -1 ; WX 556 ; N scedilla ; B 60 -220 589 549 ; +C -1 ; WX 389 ; N rcaron ; B 63 0 533 757 ; +C -1 ; WX 667 ; N Egrave ; B 79 0 762 936 ; +C -1 ; WX 667 ; N Eacute ; B 79 0 762 936 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 107 -307 819 741 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 80 -307 785 729 ; +C -1 ; WX 667 ; N Edieresis ; B 79 0 762 920 ; +C -1 ; WX 611 ; N nacute ; B 63 0 629 757 ; +C -1 ; WX 611 ; N uogonek ; B 88 -233 656 540 ; +C -1 ; WX 611 ; N umacron ; B 88 -23 656 722 ; +C -1 ; WX 722 ; N Dcaron ; B 77 0 776 936 ; +C -1 ; WX 384 ; N lcaron ; B 67 0 544 729 ; +C -1 ; WX 722 ; N Ccaron ; B 107 -23 793 936 ; +C -1 ; WX 722 ; N Cacute ; B 107 -23 793 936 ; +C -1 ; WX 722 ; N Ccedilla ; B 107 -220 793 741 ; +C -1 ; WX 606 ; N degree ; B 240 383 543 686 ; +C -1 ; WX 722 ; N Aogonek ; B 26 -233 703 729 ; +C -1 ; WX 584 ; N minus ; B 77 172 606 292 ; +C -1 ; WX 584 ; N multiply ; B 102 18 582 444 ; +C -1 ; WX 584 ; N divide ; B 77 0 606 462 ; +C -1 ; WX 722 ; N Aring ; B 26 0 703 953 ; +C -1 ; WX 1000 ; N trademark ; B 213 273 1087 729 ; +C -1 ; WX 389 ; N rcommaaccent ; B 8 -307 487 549 ; +C -1 ; WX 278 ; N lacute ; B 67 0 474 936 ; +C -1 ; WX 611 ; N omacron ; B 82 -23 634 722 ; +C -1 ; WX 722 ; N Atilde ; B 26 0 739 923 ; +C -1 ; WX 278 ; N icircumflex ; B 67 0 426 757 ; +C -1 ; WX 278 ; N igrave ; B 67 0 322 757 ; +C -1 ; WX 611 ; N ncommaaccent ; B 63 -307 629 549 ; +C -1 ; WX 278 ; N lcommaaccent ; B 11 -307 362 729 ; +C -1 ; WX 584 ; N plusminus ; B 50 0 630 633 ; +C -1 ; WX 1055 ; N onehalf ; B 210 -20 1050 715 ; +C -1 ; WX 1055 ; N onequarter ; B 210 -20 1032 715 ; +C -1 ; WX 1055 ; N threequarters ; B 147 -20 1032 718 ; +C -1 ; WX 278 ; N iacute ; B 67 0 448 757 ; +C -1 ; WX 722 ; N Abreve ; B 26 0 703 934 ; +C -1 ; WX 556 ; N kcommaaccent ; B 59 -307 651 729 ; +C -1 ; WX 778 ; N Omacron ; B 106 -23 828 901 ; +C -1 ; WX 278 ; N imacron ; B 67 0 424 722 ; +C -1 ; WX 556 ; N emacron ; B 64 -23 591 722 ; +C -1 ; WX 556 ; N amacron ; B 50 -23 579 722 ; +C -1 ; WX 333 ; N tcommaaccent ; B 62 -307 414 674 ; +C -1 ; WX 556 ; N ydieresis ; B 37 -219 653 741 ; +C -1 ; WX 500 ; N zdotaccent ; B 21 0 575 741 ; +C -1 ; WX 500 ; N zcaron ; B 21 0 575 757 ; +C -1 ; WX 500 ; N zacute ; B 21 0 575 757 ; +C -1 ; WX 556 ; N yacute ; B 37 -219 653 757 ; +C -1 ; WX 611 ; N uhungarumlaut ; B 88 -23 697 757 ; +C -1 ; WX 611 ; N eth ; B 83 -23 633 744 ; +C -1 ; WX 611 ; N uring ; B 88 -23 656 773 ; +C -1 ; WX 778 ; N Ocircumflex ; B 106 -23 828 936 ; +C -1 ; WX 333 ; N commaaccent ; B 43 -307 217 -60 ; +C -1 ; WX 737 ; N copyright ; B 54 -22 837 743 ; +C -1 ; WX 737 ; N registered ; B 55 -22 837 743 ; +C -1 ; WX 722 ; N Acircumflex ; B 26 0 703 936 ; +C -1 ; WX 278 ; N idieresis ; B 67 0 442 741 ; +C -1 ; WX 489 ; N lozenge ; B 95 0 541 744 ; +C -1 ; WX 729 ; N Delta ; B 8 0 721 729 ; +C -1 ; WX 584 ; N notequal ; B 61 -74 622 544 ; +C -1 ; WX 542 ; N radical ; B 102 -36 705 913 ; +C -1 ; WX 722 ; N Agrave ; B 26 0 703 936 ; +C -1 ; WX 722 ; N Aacute ; B 26 0 714 936 ; +C -1 ; WX 584 ; N lessequal ; B 35 0 657 624 ; +C -1 ; WX 584 ; N greaterequal ; B 44 0 627 624 ; +C -1 ; WX 584 ; N logicalnot ; B 103 86 632 376 ; +C -1 ; WX 711 ; N summation ; B -18 -97 760 760 ; +C -1 ; WX 490 ; N partialdiff ; B 22 -15 458 750 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 68 -307 816 729 ; +C -1 ; WX 611 ; N dcroat ; B 79 -23 746 729 ; +C -1 ; WX 280 ; N brokenbar ; B 57 -200 335 729 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 80 -309 606 729 ; +C -1 ; WX 722 ; N Adieresis ; B 26 0 708 920 ; +C -1 ; WX 611 ; N mu ; B 11 -220 655 540 ; +C -1 ; WX 278 ; N .notdef ; B 245 0 245 0 ; EndCharMetrics StartKernData StartKernPairs 998 -KPX A C -30 -KPX A Ccedilla -29 -KPX A G -31 -KPX A O -31 -KPX A Odieresis -31 -KPX A Q -30 -KPX A T -72 -KPX A U -29 -KPX A Uacute -29 -KPX A Ucircumflex -29 -KPX A Udieresis -29 -KPX A Ugrave -29 -KPX A V -56 -KPX A W -46 -KPX A Y -74 +KPX A C -36 +KPX A Ccedilla -36 +KPX A G -38 +KPX A O -37 +KPX A Odieresis -37 +KPX A Q -39 +KPX A T -91 +KPX A U -37 +KPX A Uacute -37 +KPX A Ucircumflex -37 +KPX A Udieresis -37 +KPX A Ugrave -37 +KPX A V -74 +KPX A W -57 +KPX A Y -96 KPX A a -11 -KPX A b -11 -KPX A c -15 -KPX A ccedilla -14 +KPX A b -10 +KPX A c -17 +KPX A ccedilla -17 KPX A comma 9 -KPX A d -14 -KPX A e -11 -KPX A g -19 -KPX A guillemotleft -41 -KPX A guilsinglleft -39 -KPX A hyphen 1 -KPX A o -17 -KPX A period 11 -KPX A q -14 -KPX A quotedblright -54 -KPX A quoteright -56 -KPX A t -16 -KPX A u -16 -KPX A v -34 -KPX A w -24 -KPX A y -32 -KPX Aacute C -31 -KPX Aacute G -32 -KPX Aacute O -32 -KPX Aacute Q -32 -KPX Aacute T -72 -KPX Aacute U -30 -KPX Aacute V -56 -KPX Aacute W -46 -KPX Aacute Y -74 +KPX A d -17 +KPX A e -10 +KPX A g -20 +KPX A guillemotleft -48 +KPX A guilsinglleft -44 +KPX A hyphen 2 +KPX A o -19 +KPX A period 13 +KPX A q -13 +KPX A quotedblright -71 +KPX A quoteright -67 +KPX A t -21 +KPX A u -17 +KPX A v -42 +KPX A w -28 +KPX A y -41 +KPX Aacute C -37 +KPX Aacute G -38 +KPX Aacute O -38 +KPX Aacute Q -40 +KPX Aacute T -91 +KPX Aacute U -38 +KPX Aacute V -74 +KPX Aacute W -57 +KPX Aacute Y -96 KPX Aacute a -11 -KPX Aacute b -11 -KPX Aacute c -16 +KPX Aacute b -10 +KPX Aacute c -17 KPX Aacute comma 9 -KPX Aacute d -15 -KPX Aacute e -12 -KPX Aacute g -19 -KPX Aacute guillemotleft -42 -KPX Aacute guilsinglleft -39 -KPX Aacute hyphen 1 -KPX Aacute o -19 -KPX Aacute period 10 -KPX Aacute q -15 -KPX Aacute quoteright -56 -KPX Aacute t -17 -KPX Aacute u -17 -KPX Aacute v -33 -KPX Aacute w -24 -KPX Aacute y -32 -KPX Acircumflex C -29 -KPX Acircumflex G -30 -KPX Acircumflex O -30 -KPX Acircumflex Q -30 -KPX Acircumflex T -72 -KPX Acircumflex U -29 -KPX Acircumflex V -56 -KPX Acircumflex W -46 -KPX Acircumflex Y -74 -KPX Acircumflex comma 10 -KPX Acircumflex period 11 -KPX Adieresis C -30 -KPX Adieresis G -31 -KPX Adieresis O -31 -KPX Adieresis Q -31 -KPX Adieresis T -72 -KPX Adieresis U -30 -KPX Adieresis V -56 -KPX Adieresis W -46 -KPX Adieresis Y -74 +KPX Aacute d -17 +KPX Aacute e -11 +KPX Aacute g -20 +KPX Aacute guillemotleft -48 +KPX Aacute guilsinglleft -45 +KPX Aacute hyphen 2 +KPX Aacute o -20 +KPX Aacute period 12 +KPX Aacute q -14 +KPX Aacute quoteright -67 +KPX Aacute t -22 +KPX Aacute u -18 +KPX Aacute v -42 +KPX Aacute w -29 +KPX Aacute y -41 +KPX Acircumflex C -36 +KPX Acircumflex G -38 +KPX Acircumflex O -37 +KPX Acircumflex Q -39 +KPX Acircumflex T -91 +KPX Acircumflex U -37 +KPX Acircumflex V -74 +KPX Acircumflex W -57 +KPX Acircumflex Y -96 +KPX Acircumflex comma 9 +KPX Acircumflex period 13 +KPX Adieresis C -37 +KPX Adieresis G -38 +KPX Adieresis O -38 +KPX Adieresis Q -39 +KPX Adieresis T -91 +KPX Adieresis U -38 +KPX Adieresis V -74 +KPX Adieresis W -57 +KPX Adieresis Y -96 KPX Adieresis a -11 -KPX Adieresis b -11 -KPX Adieresis c -15 +KPX Adieresis b -10 +KPX Adieresis c -17 KPX Adieresis comma 9 -KPX Adieresis d -15 -KPX Adieresis g -19 -KPX Adieresis guillemotleft -42 -KPX Adieresis guilsinglleft -39 -KPX Adieresis hyphen 1 -KPX Adieresis o -18 -KPX Adieresis period 10 -KPX Adieresis q -15 -KPX Adieresis quotedblright -54 -KPX Adieresis quoteright -56 -KPX Adieresis t -16 -KPX Adieresis u -16 -KPX Adieresis v -34 -KPX Adieresis w -24 -KPX Adieresis y -32 -KPX Agrave C -30 -KPX Agrave G -31 -KPX Agrave O -31 -KPX Agrave Q -30 -KPX Agrave T -72 -KPX Agrave U -29 -KPX Agrave V -56 -KPX Agrave W -46 -KPX Agrave Y -74 +KPX Adieresis d -17 +KPX Adieresis g -20 +KPX Adieresis guillemotleft -48 +KPX Adieresis guilsinglleft -44 +KPX Adieresis hyphen 2 +KPX Adieresis o -20 +KPX Adieresis period 12 +KPX Adieresis q -13 +KPX Adieresis quotedblright -71 +KPX Adieresis quoteright -67 +KPX Adieresis t -22 +KPX Adieresis u -17 +KPX Adieresis v -42 +KPX Adieresis w -28 +KPX Adieresis y -41 +KPX Agrave C -36 +KPX Agrave G -38 +KPX Agrave O -37 +KPX Agrave Q -39 +KPX Agrave T -91 +KPX Agrave U -37 +KPX Agrave V -74 +KPX Agrave W -57 +KPX Agrave Y -96 KPX Agrave comma 9 -KPX Agrave period 11 -KPX Aring C -30 -KPX Aring G -31 -KPX Aring O -31 -KPX Aring Q -30 -KPX Aring T -72 -KPX Aring U -29 -KPX Aring V -56 -KPX Aring W -46 -KPX Aring Y -74 +KPX Agrave period 13 +KPX Aring C -36 +KPX Aring G -38 +KPX Aring O -37 +KPX Aring Q -39 +KPX Aring T -91 +KPX Aring U -37 +KPX Aring V -74 +KPX Aring W -57 +KPX Aring Y -96 KPX Aring a -11 -KPX Aring b -11 -KPX Aring c -15 +KPX Aring b -10 +KPX Aring c -17 KPX Aring comma 9 -KPX Aring d -14 -KPX Aring e -11 -KPX Aring g -19 -KPX Aring guillemotleft -41 -KPX Aring guilsinglleft -39 -KPX Aring hyphen 1 -KPX Aring o -17 -KPX Aring period 11 -KPX Aring q -14 -KPX Aring quotedblright -54 -KPX Aring quoteright -56 -KPX Aring t -16 -KPX Aring u -16 -KPX Aring v -34 -KPX Aring w -24 -KPX Aring y -32 -KPX Atilde C -31 -KPX Atilde G -32 -KPX Atilde O -32 -KPX Atilde Q -32 -KPX Atilde T -73 -KPX Atilde U -31 -KPX Atilde V -56 -KPX Atilde W -46 -KPX Atilde Y -74 +KPX Aring d -17 +KPX Aring e -10 +KPX Aring g -20 +KPX Aring guillemotleft -48 +KPX Aring guilsinglleft -44 +KPX Aring hyphen 2 +KPX Aring o -19 +KPX Aring period 13 +KPX Aring q -13 +KPX Aring quotedblright -71 +KPX Aring quoteright -67 +KPX Aring t -21 +KPX Aring u -17 +KPX Aring v -42 +KPX Aring w -28 +KPX Aring y -41 +KPX Atilde C -38 +KPX Atilde G -40 +KPX Atilde O -39 +KPX Atilde Q -41 +KPX Atilde T -92 +KPX Atilde U -39 +KPX Atilde V -74 +KPX Atilde W -57 +KPX Atilde Y -96 KPX Atilde comma 9 -KPX Atilde period 9 -KPX B A -26 -KPX B AE -21 -KPX B Aacute -26 -KPX B Acircumflex -26 -KPX B Adieresis -26 -KPX B Aring -26 -KPX B Atilde -26 -KPX B O -12 -KPX B OE -6 -KPX B Oacute -12 -KPX B Ocircumflex -12 -KPX B Odieresis -12 -KPX B Ograve -12 -KPX B Oslash -8 -KPX B V -30 -KPX B W -21 -KPX B Y -40 -KPX C A -29 +KPX Atilde period 11 +KPX B A -41 +KPX B AE -30 +KPX B Aacute -41 +KPX B Acircumflex -41 +KPX B Adieresis -41 +KPX B Aring -41 +KPX B Atilde -41 +KPX B O -18 +KPX B OE -9 +KPX B Oacute -18 +KPX B Ocircumflex -18 +KPX B Odieresis -18 +KPX B Ograve -18 +KPX B Oslash -17 +KPX B V -46 +KPX B W -30 +KPX B Y -63 +KPX C A -34 KPX C AE -23 -KPX C Aacute -29 -KPX C Adieresis -29 -KPX C Aring -29 -KPX C H -7 -KPX C K -13 +KPX C Aacute -34 +KPX C Adieresis -34 +KPX C Aring -34 +KPX C H -1 +KPX C K -4 KPX C O -12 KPX C Oacute -12 KPX C Odieresis -12 -KPX Ccedilla A -31 -KPX D A -31 -KPX D Aacute -31 -KPX D Acircumflex -31 -KPX D Adieresis -31 -KPX D Agrave -31 -KPX D Aring -31 -KPX D Atilde -31 -KPX D J -1 -KPX D T -14 -KPX D V -25 -KPX D W -15 -KPX D X -28 -KPX D Y -43 -KPX F A -53 -KPX F Aacute -53 -KPX F Acircumflex -53 -KPX F Adieresis -53 -KPX F Agrave -53 -KPX F Aring -53 -KPX F Atilde -53 -KPX F J -24 -KPX F O -19 -KPX F Odieresis -19 -KPX F a -24 -KPX F aacute -24 -KPX F adieresis -24 -KPX F ae -24 -KPX F aring -24 -KPX F comma -77 -KPX F e -15 -KPX F eacute -15 -KPX F hyphen 0 -KPX F i -14 -KPX F j -13 -KPX F o -20 -KPX F oacute -20 -KPX F odieresis -20 -KPX F oe -19 -KPX F oslash -20 -KPX F period -77 -KPX F r -30 -KPX F u -31 -KPX G A -8 -KPX G AE -2 -KPX G Aacute -8 -KPX G Acircumflex -8 -KPX G Adieresis -8 -KPX G Agrave -8 -KPX G Aring -8 -KPX G Atilde -8 -KPX G T -18 -KPX G V -29 -KPX G W -20 -KPX G Y -47 -KPX J A -30 -KPX J AE -25 -KPX J Adieresis -30 -KPX J Aring -30 -KPX K C -41 -KPX K G -43 -KPX K O -42 -KPX K OE -36 -KPX K Oacute -42 -KPX K Odieresis -42 -KPX K S -30 -KPX K T 14 -KPX K a -10 -KPX K adieresis -10 -KPX K ae -11 -KPX K aring -10 -KPX K e -27 -KPX K hyphen -34 -KPX K o -35 -KPX K oacute -35 -KPX K odieresis -35 -KPX K u -30 -KPX K udieresis -30 -KPX K y -57 -KPX L A 6 +KPX Ccedilla A -34 +KPX D A -40 +KPX D Aacute -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D J -4 +KPX D T -24 +KPX D V -37 +KPX D W -20 +KPX D X -40 +KPX D Y -62 +KPX F A -68 +KPX F Aacute -68 +KPX F Acircumflex -68 +KPX F Adieresis -68 +KPX F Agrave -68 +KPX F Aring -68 +KPX F Atilde -68 +KPX F J -33 +KPX F O -24 +KPX F Odieresis -24 +KPX F a -23 +KPX F aacute -23 +KPX F adieresis -23 +KPX F ae -26 +KPX F aring -23 +KPX F comma -84 +KPX F e -12 +KPX F eacute -12 +KPX F hyphen 4 +KPX F i -15 +KPX F j -17 +KPX F o -21 +KPX F oacute -21 +KPX F odieresis -21 +KPX F oe -16 +KPX F oslash -24 +KPX F period -82 +KPX F r -35 +KPX F u -32 +KPX G A -17 +KPX G AE -5 +KPX G Aacute -17 +KPX G Acircumflex -17 +KPX G Adieresis -17 +KPX G Agrave -17 +KPX G Aring -17 +KPX G Atilde -17 +KPX G T -28 +KPX G V -41 +KPX G W -25 +KPX G Y -65 +KPX J A -38 +KPX J AE -29 +KPX J Adieresis -38 +KPX J Aring -38 +KPX K C -59 +KPX K G -61 +KPX K O -60 +KPX K OE -51 +KPX K Oacute -60 +KPX K Odieresis -60 +KPX K S -45 +KPX K T 5 +KPX K a -17 +KPX K adieresis -17 +KPX K ae -17 +KPX K aring -17 +KPX K e -38 +KPX K hyphen -52 +KPX K o -45 +KPX K oacute -45 +KPX K odieresis -45 +KPX K u -35 +KPX K udieresis -35 +KPX K y -74 +KPX L A 0 KPX L AE 12 -KPX L Aacute 6 -KPX L Adieresis 6 -KPX L Aring 6 -KPX L C -25 -KPX L Ccedilla -26 -KPX L G -27 -KPX L O -26 -KPX L Oacute -26 -KPX L Ocircumflex -26 -KPX L Odieresis -26 -KPX L Ograve -26 -KPX L Otilde -26 -KPX L S -8 -KPX L T -79 -KPX L U -23 -KPX L Udieresis -23 -KPX L V -75 -KPX L W -60 -KPX L Y -92 -KPX L hyphen -19 -KPX L quotedblright -123 -KPX L quoteright -125 +KPX L Aacute 0 +KPX L Adieresis 0 +KPX L Aring 0 +KPX L C -35 +KPX L Ccedilla -36 +KPX L G -40 +KPX L O -39 +KPX L Oacute -39 +KPX L Ocircumflex -39 +KPX L Odieresis -39 +KPX L Ograve -39 +KPX L Otilde -39 +KPX L S -14 +KPX L T -104 +KPX L U -35 +KPX L Udieresis -35 +KPX L V -102 +KPX L W -79 +KPX L Y -121 +KPX L hyphen -20 +KPX L quotedblright -147 +KPX L quoteright -143 KPX L u -17 KPX L udieresis -17 -KPX L y -50 -KPX N A -10 -KPX N AE -4 -KPX N Aacute -10 -KPX N Adieresis -10 -KPX N Aring -10 -KPX N C -3 -KPX N Ccedilla -2 -KPX N G -4 -KPX N O -4 -KPX N Oacute -4 -KPX N Odieresis -4 -KPX N a -1 -KPX N aacute -1 -KPX N adieresis -1 -KPX N ae -2 -KPX N aring -1 -KPX N comma 5 -KPX N e 2 -KPX N eacute 2 -KPX N o -3 -KPX N oacute -3 -KPX N odieresis -3 -KPX N oslash 0 -KPX N period 5 -KPX N u -2 -KPX N udieresis -2 -KPX O A -35 -KPX O AE -29 -KPX O Aacute -35 -KPX O Adieresis -35 -KPX O Aring -35 -KPX O T -21 -KPX O V -29 -KPX O W -20 -KPX O X -32 -KPX O Y -50 -KPX Oacute A -35 -KPX Oacute T -21 -KPX Oacute V -29 -KPX Oacute W -20 -KPX Oacute Y -50 -KPX Ocircumflex T -21 -KPX Ocircumflex V -29 -KPX Ocircumflex Y -50 -KPX Odieresis A -35 -KPX Odieresis T -21 -KPX Odieresis V -29 -KPX Odieresis W -20 -KPX Odieresis X -32 -KPX Odieresis Y -50 -KPX Ograve T -21 -KPX Ograve V -29 -KPX Ograve Y -50 -KPX Oslash A -31 -KPX Otilde T -21 -KPX Otilde V -29 -KPX Otilde Y -50 -KPX P A -61 -KPX P AE -56 -KPX P Aacute -61 -KPX P Adieresis -61 -KPX P Aring -61 -KPX P J -45 -KPX P a -22 -KPX P aacute -22 -KPX P adieresis -22 -KPX P ae -22 -KPX P aring -22 -KPX P comma -98 -KPX P e -20 -KPX P eacute -20 -KPX P hyphen -13 -KPX P o -25 -KPX P oacute -25 -KPX P odieresis -25 -KPX P oe -25 -KPX P oslash -25 -KPX P period -98 -KPX R C -9 -KPX R Ccedilla -8 -KPX R G -10 -KPX R O -10 -KPX R OE -4 -KPX R Oacute -10 -KPX R Odieresis -10 -KPX R T -9 -KPX R U -8 -KPX R Udieresis -8 -KPX R V -27 -KPX R W -18 -KPX R Y -36 -KPX R a -6 -KPX R aacute -6 -KPX R adieresis -6 -KPX R ae -7 -KPX R aring -6 -KPX R e -3 -KPX R eacute -3 -KPX R hyphen 7 +KPX L y -64 +KPX N A -15 +KPX N AE -2 +KPX N Aacute -15 +KPX N Adieresis -15 +KPX N Aring -15 +KPX N C -1 +KPX N Ccedilla -1 +KPX N G -2 +KPX N O -2 +KPX N Oacute -2 +KPX N Odieresis -2 +KPX N a 5 +KPX N aacute 5 +KPX N adieresis 5 +KPX N ae 4 +KPX N aring 5 +KPX N comma 7 +KPX N e 10 +KPX N eacute 10 +KPX N o 1 +KPX N oacute 1 +KPX N odieresis 1 +KPX N oslash 2 +KPX N period 8 +KPX N u 4 +KPX N udieresis 4 +KPX O A -42 +KPX O AE -33 +KPX O Aacute -42 +KPX O Adieresis -42 +KPX O Aring -42 +KPX O T -32 +KPX O V -40 +KPX O W -24 +KPX O X -43 +KPX O Y -65 +KPX Oacute A -42 +KPX Oacute T -32 +KPX Oacute V -40 +KPX Oacute W -24 +KPX Oacute Y -65 +KPX Ocircumflex T -32 +KPX Ocircumflex V -40 +KPX Ocircumflex Y -65 +KPX Odieresis A -42 +KPX Odieresis T -32 +KPX Odieresis V -40 +KPX Odieresis W -24 +KPX Odieresis X -43 +KPX Odieresis Y -65 +KPX Ograve T -32 +KPX Ograve V -40 +KPX Ograve Y -65 +KPX Oslash A -34 +KPX Otilde T -32 +KPX Otilde V -40 +KPX Otilde Y -65 +KPX P A -71 +KPX P AE -62 +KPX P Aacute -71 +KPX P Adieresis -71 +KPX P Aring -71 +KPX P J -52 +KPX P a -14 +KPX P aacute -14 +KPX P adieresis -14 +KPX P ae -15 +KPX P aring -14 +KPX P comma -103 +KPX P e -13 +KPX P eacute -13 +KPX P hyphen -7 +KPX P o -22 +KPX P oacute -22 +KPX P odieresis -22 +KPX P oe -17 +KPX P oslash -26 +KPX P period -101 +KPX R C -12 +KPX R Ccedilla -12 +KPX R G -13 +KPX R O -13 +KPX R OE -3 +KPX R Oacute -13 +KPX R Odieresis -13 +KPX R T -12 +KPX R U -12 +KPX R Udieresis -12 +KPX R V -38 +KPX R W -22 +KPX R Y -50 +KPX R a -4 +KPX R aacute -4 +KPX R adieresis -4 +KPX R ae -5 +KPX R aring -4 +KPX R e 0 +KPX R eacute 0 +KPX R hyphen 10 KPX R o -9 KPX R oacute -9 KPX R odieresis -9 -KPX R oe -9 -KPX R u -7 -KPX R uacute -7 -KPX R udieresis -7 -KPX R y -6 -KPX S A -20 +KPX R oe -4 +KPX R u -6 +KPX R uacute -6 +KPX R udieresis -6 +KPX R y -4 +KPX S A -26 KPX S AE -14 -KPX S Aacute -20 -KPX S Adieresis -20 -KPX S Aring -20 -KPX S T -12 -KPX S V -29 -KPX S W -19 -KPX S Y -39 -KPX S t -5 -KPX T A -72 -KPX T AE -68 -KPX T Aacute -72 -KPX T Acircumflex -72 -KPX T Adieresis -72 -KPX T Agrave -72 -KPX T Aring -72 -KPX T Atilde -72 -KPX T C -17 -KPX T G -18 -KPX T J -77 -KPX T O -19 -KPX T OE -12 -KPX T Oacute -19 -KPX T Ocircumflex -19 -KPX T Odieresis -19 -KPX T Ograve -19 -KPX T Oslash -19 -KPX T Otilde -19 -KPX T S -2 -KPX T V 11 -KPX T W 13 -KPX T Y 13 -KPX T a -68 -KPX T ae -69 -KPX T c -68 -KPX T colon -78 -KPX T comma -61 -KPX T e -64 -KPX T g -69 -KPX T guillemotleft -92 -KPX T guilsinglleft -89 -KPX T hyphen -46 +KPX S Aacute -26 +KPX S Adieresis -26 +KPX S Aring -26 +KPX S T -15 +KPX S V -36 +KPX S W -20 +KPX S Y -54 +KPX S t -4 +KPX T A -93 +KPX T AE -85 +KPX T Aacute -93 +KPX T Acircumflex -93 +KPX T Adieresis -93 +KPX T Agrave -93 +KPX T Aring -93 +KPX T Atilde -93 +KPX T C -29 +KPX T G -30 +KPX T J -95 +KPX T O -30 +KPX T OE -20 +KPX T Oacute -30 +KPX T Ocircumflex -30 +KPX T Odieresis -30 +KPX T Ograve -30 +KPX T Oslash -36 +KPX T Otilde -30 +KPX T S -7 +KPX T V 9 +KPX T W 15 +KPX T Y 7 +KPX T a -77 +KPX T ae -78 +KPX T c -79 +KPX T colon -104 +KPX T comma -75 +KPX T e -72 +KPX T g -79 +KPX T guillemotleft -107 +KPX T guilsinglleft -103 +KPX T hyphen -53 KPX T i -9 -KPX T j -9 -KPX T o -71 -KPX T oslash -67 -KPX T period -61 -KPX T r -64 -KPX T s -69 -KPX T semicolon -79 -KPX T u -68 -KPX T v -77 -KPX T w -72 -KPX T y -76 -KPX U A -32 -KPX U AE -27 -KPX U Aacute -32 -KPX U Acircumflex -32 -KPX U Adieresis -32 -KPX U Aring -32 -KPX U Atilde -32 -KPX U comma -14 -KPX U m -5 +KPX T j -11 +KPX T o -81 +KPX T oslash -80 +KPX T period -73 +KPX T r -76 +KPX T s -81 +KPX T semicolon -105 +KPX T u -78 +KPX T v -91 +KPX T w -85 +KPX T y -89 +KPX U A -40 +KPX U AE -30 +KPX U Aacute -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX U comma -17 +KPX U m -3 KPX U n -5 -KPX U p -5 -KPX U period -11 +KPX U p -3 +KPX U period -12 KPX U r -5 -KPX Uacute A -32 -KPX Uacute comma -14 -KPX Uacute m -5 +KPX Uacute A -40 +KPX Uacute comma -17 +KPX Uacute m -3 KPX Uacute n -5 -KPX Uacute p -5 -KPX Uacute period -11 +KPX Uacute p -3 +KPX Uacute period -12 KPX Uacute r -5 -KPX Ucircumflex A -32 -KPX Udieresis A -32 -KPX Udieresis b -5 -KPX Udieresis comma -14 -KPX Udieresis m -5 +KPX Ucircumflex A -40 +KPX Udieresis A -40 +KPX Udieresis b -4 +KPX Udieresis comma -17 +KPX Udieresis m -3 KPX Udieresis n -5 -KPX Udieresis p -5 -KPX Udieresis period -11 +KPX Udieresis p -3 +KPX Udieresis period -12 KPX Udieresis r -5 -KPX Ugrave A -32 -KPX V A -57 -KPX V AE -52 -KPX V Aacute -57 -KPX V Acircumflex -57 -KPX V Adieresis -57 -KPX V Agrave -57 -KPX V Aring -57 -KPX V Atilde -57 -KPX V C -32 -KPX V G -33 -KPX V O -33 -KPX V Oacute -33 -KPX V Ocircumflex -33 -KPX V Odieresis -33 -KPX V Ograve -33 -KPX V Oslash -29 -KPX V Otilde -33 -KPX V S -22 -KPX V T 13 -KPX V a -45 -KPX V ae -46 -KPX V colon -47 -KPX V comma -58 -KPX V e -41 -KPX V g -45 -KPX V guillemotleft -67 -KPX V guilsinglleft -65 -KPX V hyphen -21 -KPX V i -12 -KPX V o -47 -KPX V oslash -44 -KPX V period -58 -KPX V r -36 -KPX V semicolon -47 -KPX V u -40 -KPX V y -17 -KPX W A -47 -KPX W AE -42 -KPX W Aacute -47 -KPX W Acircumflex -47 -KPX W Adieresis -47 -KPX W Agrave -47 -KPX W Aring -47 -KPX W Atilde -47 -KPX W C -22 -KPX W G -23 -KPX W O -23 -KPX W Oacute -23 -KPX W Ocircumflex -23 -KPX W Odieresis -23 -KPX W Ograve -23 -KPX W Oslash -19 -KPX W Otilde -23 -KPX W S -17 -KPX W T 15 -KPX W a -32 -KPX W ae -33 -KPX W colon -40 -KPX W comma -42 +KPX Ugrave A -40 +KPX V A -75 +KPX V AE -65 +KPX V Aacute -75 +KPX V Acircumflex -75 +KPX V Adieresis -75 +KPX V Agrave -75 +KPX V Aring -75 +KPX V Atilde -75 +KPX V C -43 +KPX V G -44 +KPX V O -44 +KPX V Oacute -44 +KPX V Ocircumflex -44 +KPX V Odieresis -44 +KPX V Ograve -44 +KPX V Oslash -42 +KPX V Otilde -44 +KPX V S -31 +KPX V T 12 +KPX V a -51 +KPX V ae -52 +KPX V colon -74 +KPX V comma -76 +KPX V e -46 +KPX V g -54 +KPX V guillemotleft -81 +KPX V guilsinglleft -77 +KPX V hyphen -26 +KPX V i -13 +KPX V o -56 +KPX V oslash -55 +KPX V period -74 +KPX V r -43 +KPX V semicolon -77 +KPX V u -42 +KPX V y -19 +KPX W A -59 +KPX W AE -50 +KPX W Aacute -59 +KPX W Acircumflex -59 +KPX W Adieresis -59 +KPX W Agrave -59 +KPX W Aring -59 +KPX W Atilde -59 +KPX W C -28 +KPX W G -29 +KPX W O -29 +KPX W Oacute -29 +KPX W Ocircumflex -29 +KPX W Odieresis -29 +KPX W Ograve -29 +KPX W Oslash -27 +KPX W Otilde -29 +KPX W S -22 +KPX W T 16 +KPX W a -34 +KPX W ae -34 +KPX W colon -61 +KPX W comma -53 KPX W e -28 -KPX W g -32 -KPX W guillemotleft -55 -KPX W guilsinglleft -52 +KPX W g -36 +KPX W guillemotleft -63 +KPX W guilsinglleft -59 KPX W hyphen -9 -KPX W i -10 -KPX W o -34 -KPX W oslash -31 -KPX W period -42 -KPX W r -27 -KPX W semicolon -41 +KPX W i -9 +KPX W o -38 +KPX W oslash -37 +KPX W period -51 +KPX W r -33 +KPX W semicolon -63 KPX W u -32 -KPX W y -11 -KPX X C -32 -KPX X O -33 -KPX X Odieresis -33 -KPX X Q -33 -KPX X a -15 -KPX X e -31 -KPX X hyphen -27 -KPX X o -37 -KPX X u -34 -KPX X y -44 -KPX Y A -73 -KPX Y AE -68 -KPX Y Aacute -73 -KPX Y Acircumflex -73 -KPX Y Adieresis -73 -KPX Y Agrave -73 -KPX Y Aring -73 -KPX Y Atilde -73 -KPX Y C -45 -KPX Y G -46 -KPX Y O -46 -KPX Y Oacute -46 -KPX Y Ocircumflex -46 -KPX Y Odieresis -46 -KPX Y Ograve -46 -KPX Y Oslash -45 -KPX Y Otilde -46 -KPX Y S -27 -KPX Y T 16 -KPX Y a -64 -KPX Y ae -65 -KPX Y colon -61 -KPX Y comma -70 -KPX Y e -60 -KPX Y g -64 -KPX Y guillemotleft -91 -KPX Y guilsinglleft -88 -KPX Y hyphen -49 -KPX Y i -9 -KPX Y o -66 -KPX Y oslash -63 -KPX Y p -48 -KPX Y period -70 -KPX Y semicolon -61 -KPX Y u -54 -KPX Y v -31 -KPX Z v -19 -KPX Z y -18 -KPX a j -2 -KPX a quoteright -11 -KPX a v -16 -KPX a w -7 -KPX a y -17 -KPX aacute v -17 -KPX aacute w -8 -KPX aacute y -17 -KPX adieresis v -17 -KPX adieresis w -8 -KPX adieresis y -17 -KPX ae v -17 +KPX W y -9 +KPX X C -39 +KPX X O -40 +KPX X Odieresis -40 +KPX X Q -43 +KPX X a -17 +KPX X e -33 +KPX X hyphen -33 +KPX X o -43 +KPX X u -35 +KPX X y -48 +KPX Y A -91 +KPX Y AE -81 +KPX Y Aacute -91 +KPX Y Acircumflex -91 +KPX Y Adieresis -91 +KPX Y Agrave -91 +KPX Y Aring -91 +KPX Y Atilde -91 +KPX Y C -60 +KPX Y G -61 +KPX Y O -61 +KPX Y Oacute -61 +KPX Y Ocircumflex -61 +KPX Y Odieresis -61 +KPX Y Ograve -61 +KPX Y Oslash -58 +KPX Y Otilde -61 +KPX Y S -39 +KPX Y T 14 +KPX Y a -71 +KPX Y ae -71 +KPX Y colon -90 +KPX Y comma -85 +KPX Y e -66 +KPX Y g -73 +KPX Y guillemotleft -105 +KPX Y guilsinglleft -101 +KPX Y hyphen -55 +KPX Y i -11 +KPX Y o -76 +KPX Y oslash -74 +KPX Y p -53 +KPX Y period -84 +KPX Y semicolon -93 +KPX Y u -57 +KPX Y v -36 +KPX Z v -21 +KPX Z y -19 +KPX a j -7 +KPX a quoteright -14 +KPX a v -23 +KPX a w -10 +KPX a y -24 +KPX aacute v -23 +KPX aacute w -10 +KPX aacute y -24 +KPX adieresis v -23 +KPX adieresis w -10 +KPX adieresis y -24 +KPX ae v -21 KPX ae w -7 -KPX ae y -19 -KPX agrave v -16 -KPX agrave w -7 -KPX agrave y -17 -KPX aring v -16 -KPX aring w -7 -KPX aring y -17 -KPX b v -16 -KPX b w -6 -KPX b y -17 -KPX c h -6 -KPX c k -8 -KPX comma one -64 -KPX comma quotedblright -27 -KPX comma quoteright -29 -KPX e quoteright -12 -KPX e t -4 -KPX e v -16 -KPX e w -6 -KPX e x -19 -KPX e y -18 -KPX eacute v -17 -KPX eacute w -8 -KPX eacute y -18 -KPX ecircumflex v -16 -KPX ecircumflex w -6 -KPX ecircumflex y -18 +KPX ae y -23 +KPX agrave v -23 +KPX agrave w -10 +KPX agrave y -24 +KPX aring v -23 +KPX aring w -10 +KPX aring y -24 +KPX b v -23 +KPX b w -9 +KPX b y -25 +KPX c h -9 +KPX c k -5 +KPX comma one -79 +KPX comma quotedblright -39 +KPX comma quoteright -35 +KPX e quoteright -13 +KPX e t -9 +KPX e v -22 +KPX e w -9 +KPX e x -25 +KPX e y -25 +KPX eacute v -22 +KPX eacute w -9 +KPX eacute y -25 +KPX ecircumflex v -22 +KPX ecircumflex w -9 +KPX ecircumflex y -25 KPX eight four 2 -KPX eight one -24 -KPX eight seven -10 -KPX f a -12 -KPX f aacute -12 -KPX f adieresis -12 -KPX f ae -13 -KPX f aring -12 -KPX f e -10 -KPX f eacute -10 -KPX f f 12 -KPX f i -11 -KPX f j -11 -KPX f l -11 +KPX eight one -32 +KPX eight seven -15 +KPX f a -6 +KPX f aacute -6 +KPX f adieresis -6 +KPX f ae -6 +KPX f aring -6 +KPX f e -6 +KPX f eacute -6 +KPX f f 14 +KPX f i -13 +KPX f j -15 +KPX f l -13 KPX f o -16 KPX f oacute -16 KPX f odieresis -16 -KPX f oe -16 -KPX f oslash -13 +KPX f oe -11 +KPX f oslash -16 KPX f quoteright 0 -KPX f s -13 -KPX f t 12 -KPX five four 0 -KPX five one -30 -KPX five seven -10 -KPX four four 3 -KPX four one -46 -KPX four seven -27 -KPX g a -2 -KPX g adieresis -2 -KPX g ae -3 -KPX g aring -2 +KPX f s -10 +KPX f t 14 +KPX five four -3 +KPX five one -37 +KPX five seven -17 +KPX four four 0 +KPX four one -55 +KPX four seven -33 +KPX g a -3 +KPX g adieresis -3 +KPX g ae -4 +KPX g aring -3 KPX g e 1 KPX g eacute 1 -KPX g l 0 -KPX g oacute -5 -KPX g odieresis -5 -KPX g r 1 -KPX guillemotright A -41 -KPX guillemotright AE -36 -KPX guillemotright Aacute -41 -KPX guillemotright Adieresis -41 -KPX guillemotright Aring -41 -KPX guillemotright T -89 -KPX guillemotright V -63 -KPX guillemotright W -51 -KPX guillemotright Y -91 -KPX guilsinglright A -40 -KPX guilsinglright AE -34 -KPX guilsinglright Aacute -40 -KPX guilsinglright Adieresis -40 -KPX guilsinglright Aring -40 -KPX guilsinglright T -87 -KPX guilsinglright V -61 -KPX guilsinglright W -49 -KPX guilsinglright Y -89 -KPX h quoteright -13 -KPX h y -19 -KPX hyphen A 1 -KPX hyphen AE 6 -KPX hyphen Aacute 1 -KPX hyphen Adieresis 1 -KPX hyphen Aring 1 -KPX hyphen T -45 -KPX hyphen V -19 -KPX hyphen W -8 -KPX hyphen Y -51 -KPX i T -9 -KPX i j -3 -KPX k a -9 -KPX k aacute -9 -KPX k adieresis -9 -KPX k ae -9 -KPX k aring -9 -KPX k comma 6 -KPX k e -12 -KPX k eacute -12 -KPX k g -17 -KPX k hyphen -16 -KPX k o -18 -KPX k oacute -18 -KPX k odieresis -18 -KPX k period 7 -KPX k s -16 -KPX k u -12 -KPX k udieresis -6 +KPX g l -5 +KPX g oacute -8 +KPX g odieresis -8 +KPX g r -3 +KPX guillemotright A -56 +KPX guillemotright AE -46 +KPX guillemotright Aacute -56 +KPX guillemotright Adieresis -56 +KPX guillemotright Aring -56 +KPX guillemotright T -115 +KPX guillemotright V -84 +KPX guillemotright W -65 +KPX guillemotright Y -117 +KPX guilsinglright A -52 +KPX guilsinglright AE -42 +KPX guilsinglright Aacute -52 +KPX guilsinglright Adieresis -52 +KPX guilsinglright Aring -52 +KPX guilsinglright T -110 +KPX guilsinglright V -79 +KPX guilsinglright W -60 +KPX guilsinglright Y -113 +KPX h quoteright -15 +KPX h y -25 +KPX hyphen A -7 +KPX hyphen AE 2 +KPX hyphen Aacute -7 +KPX hyphen Adieresis -7 +KPX hyphen Aring -7 +KPX hyphen T -64 +KPX hyphen V -34 +KPX hyphen W -15 +KPX hyphen Y -71 +KPX i T -12 +KPX i j -7 +KPX k a -13 +KPX k aacute -13 +KPX k adieresis -13 +KPX k ae -15 +KPX k aring -13 +KPX k comma -3 +KPX k e -19 +KPX k eacute -19 +KPX k g -26 +KPX k hyphen -31 +KPX k o -28 +KPX k oacute -28 +KPX k odieresis -28 +KPX k period -3 +KPX k s -23 +KPX k u -8 +KPX k udieresis -8 KPX l v -14 -KPX l y -13 -KPX m p -2 -KPX m v -17 -KPX m w -8 -KPX m y -18 -KPX n T -67 -KPX n p -3 -KPX n quoteright -13 -KPX n v -18 -KPX n w -9 -KPX n y -19 -KPX nine four 0 -KPX nine one -21 -KPX nine seven -14 -KPX o T -68 -KPX o quoteright -17 -KPX o t -7 -KPX o v -19 -KPX o w -9 -KPX o x -23 -KPX o y -21 -KPX oacute v -19 -KPX oacute w -9 -KPX oacute y -21 -KPX ocircumflex t -7 -KPX odieresis t -7 -KPX odieresis v -19 -KPX odieresis w -9 -KPX odieresis x -23 -KPX odieresis y -21 -KPX ograve v -19 -KPX ograve w -9 -KPX ograve y -21 -KPX one comma -39 -KPX one eight -41 -KPX one five -40 -KPX one four -57 -KPX one nine -41 -KPX one one -74 -KPX one period -39 -KPX one seven -55 -KPX one six -39 -KPX one three -46 -KPX one two -47 -KPX one zero -38 -KPX p t -4 -KPX p y -18 -KPX period one -64 -KPX period quotedblright -27 -KPX period quoteright -29 -KPX q c -2 -KPX q u -2 -KPX quotedblbase A 9 -KPX quotedblbase AE 15 -KPX quotedblbase T -61 -KPX quotedblbase V -58 -KPX quotedblbase W -43 -KPX quotedblbase Y -74 -KPX quotedblleft A -55 -KPX quotedblleft AE -50 -KPX quotedblleft Aacute -55 -KPX quotedblleft Adieresis -55 -KPX quotedblleft Aring -55 -KPX quotedblleft T -6 -KPX quotedblleft V 4 +KPX l y -11 +KPX m p -1 +KPX m v -23 +KPX m w -9 +KPX m y -23 +KPX n T -87 +KPX n p -2 +KPX n quoteright -15 +KPX n v -24 +KPX n w -11 +KPX n y -25 +KPX nine four -6 +KPX nine one -30 +KPX nine seven -23 +KPX o T -90 +KPX o quoteright -19 +KPX o t -13 +KPX o v -27 +KPX o w -13 +KPX o x -30 +KPX o y -29 +KPX oacute v -27 +KPX oacute w -13 +KPX oacute y -29 +KPX ocircumflex t -13 +KPX odieresis t -13 +KPX odieresis v -27 +KPX odieresis w -13 +KPX odieresis x -30 +KPX odieresis y -29 +KPX ograve v -27 +KPX ograve w -13 +KPX ograve y -29 +KPX one comma -51 +KPX one eight -47 +KPX one five -50 +KPX one four -70 +KPX one nine -47 +KPX one one -92 +KPX one period -49 +KPX one seven -72 +KPX one six -48 +KPX one three -53 +KPX one two -56 +KPX one zero -44 +KPX p t -10 +KPX p y -25 +KPX period one -80 +KPX period quotedblright -39 +KPX period quoteright -35 +KPX q c -3 +KPX q u -3 +KPX quotedblbase A 7 +KPX quotedblbase AE 19 +KPX quotedblbase T -79 +KPX quotedblbase V -77 +KPX quotedblbase W -54 +KPX quotedblbase Y -96 +KPX quotedblleft A -72 +KPX quotedblleft AE -64 +KPX quotedblleft Aacute -72 +KPX quotedblleft Adieresis -72 +KPX quotedblleft Aring -72 +KPX quotedblleft T -11 +KPX quotedblleft V 0 KPX quotedblleft W 9 -KPX quotedblleft Y -6 -KPX quotedblright A -57 -KPX quotedblright AE -53 -KPX quotedblright Aacute -57 -KPX quotedblright Adieresis -57 -KPX quotedblright Aring -57 -KPX quotedblright T -4 -KPX quotedblright V 2 -KPX quotedblright W 8 -KPX quotedblright Y -8 -KPX quoteleft A -57 -KPX quoteleft AE -52 -KPX quoteleft Aacute -57 -KPX quoteleft Adieresis -57 -KPX quoteleft Aring -57 -KPX quoteleft T -8 -KPX quoteleft V 2 -KPX quoteleft W 7 -KPX quoteleft Y -8 -KPX quoteright A -59 -KPX quoteright AE -55 -KPX quoteright Aacute -59 -KPX quoteright Adieresis -59 -KPX quoteright Aring -59 -KPX quoteright comma -35 -KPX quoteright d -23 -KPX quoteright o -29 -KPX quoteright period -35 -KPX quoteright r -11 -KPX quoteright s -21 -KPX quoteright t -1 -KPX quoteright v -3 -KPX quoteright w 0 -KPX quoteright y -2 -KPX r a -9 -KPX r aacute -9 -KPX r acircumflex -9 -KPX r adieresis -9 -KPX r ae -9 -KPX r agrave -9 -KPX r aring -9 -KPX r c -12 -KPX r ccedilla -7 -KPX r colon -19 -KPX r comma -47 -KPX r d -9 -KPX r e -8 -KPX r eacute -8 -KPX r ecircumflex -8 -KPX r egrave -8 -KPX r f 12 -KPX r g -6 -KPX r h -10 -KPX r hyphen -30 -KPX r i -13 -KPX r j -12 -KPX r k -12 +KPX quotedblleft Y -15 +KPX quotedblright A -72 +KPX quotedblright AE -64 +KPX quotedblright Aacute -72 +KPX quotedblright Adieresis -72 +KPX quotedblright Aring -72 +KPX quotedblright T -7 +KPX quotedblright V 1 +KPX quotedblright W 11 +KPX quotedblright Y -14 +KPX quoteleft A -76 +KPX quoteleft AE -69 +KPX quoteleft Aacute -76 +KPX quoteleft Adieresis -76 +KPX quoteleft Aring -76 +KPX quoteleft T -15 +KPX quoteleft V -4 +KPX quoteleft W 5 +KPX quoteleft Y -20 +KPX quoteright A -80 +KPX quoteright AE -72 +KPX quoteright Aacute -80 +KPX quoteright Adieresis -80 +KPX quoteright Aring -80 +KPX quoteright comma -53 +KPX quoteright d -30 +KPX quoteright o -34 +KPX quoteright period -51 +KPX quoteright r -20 +KPX quoteright s -27 +KPX quoteright t -11 +KPX quoteright v -11 +KPX quoteright w -4 +KPX quoteright y -9 +KPX r a -1 +KPX r aacute -1 +KPX r acircumflex -1 +KPX r adieresis -1 +KPX r ae -2 +KPX r agrave -1 +KPX r aring -1 +KPX r c -6 +KPX r ccedilla -6 +KPX r colon -36 +KPX r comma -64 +KPX r d -5 +KPX r e 2 +KPX r eacute 2 +KPX r ecircumflex 2 +KPX r egrave 2 +KPX r f 15 +KPX r g -7 +KPX r h -12 +KPX r hyphen -40 +KPX r i -12 +KPX r j -13 +KPX r k -8 KPX r l -12 -KPX r m -10 -KPX r n -11 -KPX r o -13 -KPX r oacute -13 -KPX r ocircumflex -13 -KPX r odieresis -13 -KPX r oe -12 -KPX r ograve -13 +KPX r m -8 +KPX r n -10 +KPX r o -7 +KPX r oacute -7 +KPX r ocircumflex -7 +KPX r odieresis -7 +KPX r oe -2 +KPX r ograve -7 KPX r oslash -12 -KPX r p -10 -KPX r period -47 -KPX r q -8 +KPX r p -7 +KPX r period -63 +KPX r q -2 KPX r quoteright 4 KPX r r -10 -KPX r s -8 -KPX r semicolon -19 -KPX r t 12 -KPX r u -12 -KPX r v 8 -KPX r w 10 -KPX r x 4 -KPX r y 9 -KPX r z 0 +KPX r s -4 +KPX r semicolon -37 +KPX r t 15 +KPX r u -8 +KPX r v 12 +KPX r w 17 +KPX r x 7 +KPX r y 14 +KPX r z 2 KPX s quoteright -12 -KPX s t -8 -KPX seven colon -48 -KPX seven comma -77 -KPX seven eight -11 -KPX seven five -20 -KPX seven four -59 -KPX seven one -14 -KPX seven period -77 -KPX seven seven 5 -KPX seven six -16 -KPX seven three -8 -KPX seven two -8 -KPX six four 0 -KPX six one -23 -KPX six seven -9 -KPX t S -5 +KPX s t -9 +KPX seven colon -71 +KPX seven comma -95 +KPX seven eight -10 +KPX seven five -28 +KPX seven four -70 +KPX seven one -21 +KPX seven period -94 +KPX seven seven 2 +KPX seven six -21 +KPX seven three -7 +KPX seven two -11 +KPX six four -1 +KPX six one -29 +KPX six seven -13 +KPX t S -9 KPX t a -3 KPX t aacute -3 KPX t adieresis -3 -KPX t ae -3 +KPX t ae -5 KPX t aring -3 -KPX t colon -19 -KPX t e -6 -KPX t eacute -6 -KPX t h -4 -KPX t o -12 -KPX t oacute -12 -KPX t odieresis -12 -KPX t quoteright -1 -KPX t semicolon -19 -KPX three four 0 -KPX three one -27 -KPX three seven -13 -KPX two four -21 -KPX two one -21 -KPX two seven -10 -KPX u quoteright -4 +KPX t colon -41 +KPX t e -5 +KPX t eacute -5 +KPX t h -9 +KPX t o -15 +KPX t oacute -15 +KPX t odieresis -15 +KPX t quoteright -3 +KPX t semicolon -42 +KPX three four -2 +KPX three one -34 +KPX three seven -19 +KPX two four -16 +KPX two one -24 +KPX two seven -12 +KPX u quoteright -8 KPX v a -21 KPX v aacute -21 KPX v acircumflex -21 KPX v adieresis -21 -KPX v ae -22 +KPX v ae -21 KPX v agrave -21 KPX v aring -21 KPX v atilde -21 -KPX v c -21 -KPX v colon -20 -KPX v comma -40 -KPX v e -17 -KPX v eacute -17 -KPX v ecircumflex -17 -KPX v egrave -17 -KPX v g -21 -KPX v hyphen 0 +KPX v c -25 +KPX v colon -41 +KPX v comma -57 +KPX v e -18 +KPX v eacute -18 +KPX v ecircumflex -18 +KPX v egrave -18 +KPX v g -26 +KPX v hyphen -5 KPX v l -12 -KPX v o -23 -KPX v oacute -23 -KPX v odieresis -23 -KPX v ograve -23 -KPX v oslash -20 -KPX v period -40 -KPX v s -22 -KPX v semicolon -20 -KPX w a -12 -KPX w aacute -12 -KPX w acircumflex -12 -KPX w adieresis -12 -KPX w ae -13 -KPX w agrave -12 -KPX w aring -12 -KPX w atilde -12 -KPX w c -11 -KPX w colon -18 -KPX w comma -25 -KPX w e -8 -KPX w eacute -8 -KPX w ecircumflex -8 -KPX w egrave -8 -KPX w g -12 -KPX w hyphen 8 -KPX w l -9 -KPX w o -14 -KPX w oacute -14 -KPX w odieresis -14 -KPX w ograve -14 -KPX w oslash -11 -KPX w period -25 -KPX w s -13 -KPX w semicolon -18 -KPX x a -19 -KPX x c -22 -KPX x e -18 -KPX x eacute -18 -KPX x o -25 -KPX x q -21 -KPX y a -23 -KPX y aacute -23 -KPX y acircumflex -23 -KPX y adieresis -23 -KPX y ae -24 -KPX y agrave -23 -KPX y aring -23 -KPX y atilde -23 -KPX y c -23 -KPX y colon -21 -KPX y comma -41 +KPX v o -28 +KPX v oacute -28 +KPX v odieresis -28 +KPX v ograve -28 +KPX v oslash -28 +KPX v period -55 +KPX v s -25 +KPX v semicolon -43 +KPX w a -11 +KPX w aacute -11 +KPX w acircumflex -11 +KPX w adieresis -11 +KPX w ae -12 +KPX w agrave -11 +KPX w aring -11 +KPX w atilde -11 +KPX w c -12 +KPX w colon -36 +KPX w comma -38 +KPX w e -5 +KPX w eacute -5 +KPX w ecircumflex -5 +KPX w egrave -5 +KPX w g -13 +KPX w hyphen 7 +KPX w l -8 +KPX w o -15 +KPX w oacute -15 +KPX w odieresis -15 +KPX w ograve -15 +KPX w oslash -14 +KPX w period -36 +KPX w s -15 +KPX w semicolon -38 +KPX x a -22 +KPX x c -27 +KPX x e -20 +KPX x eacute -20 +KPX x o -30 +KPX x q -23 +KPX y a -20 +KPX y aacute -20 +KPX y acircumflex -20 +KPX y adieresis -20 +KPX y ae -20 +KPX y agrave -20 +KPX y aring -20 +KPX y atilde -20 +KPX y c -26 +KPX y colon -40 +KPX y comma -58 KPX y e -19 KPX y eacute -19 KPX y ecircumflex -19 KPX y egrave -19 -KPX y g -24 -KPX y hyphen 0 -KPX y l -14 -KPX y o -25 -KPX y oacute -25 -KPX y odieresis -25 -KPX y ograve -25 -KPX y oslash -21 -KPX y period -40 +KPX y g -27 +KPX y hyphen -4 +KPX y l -11 +KPX y o -28 +KPX y oacute -28 +KPX y odieresis -28 +KPX y ograve -28 +KPX y oslash -27 +KPX y period -55 KPX y s -24 -KPX y semicolon -22 -KPX zero four 2 -KPX zero one -20 -KPX zero seven -12 +KPX y semicolon -43 +KPX zero four -3 +KPX zero one -29 +KPX zero seven -21 EndKernPairs EndKernData EndFontMetrics diff --git a/misc/gs_afm/HelvO.afm b/misc/gs_afm/HelvO.afm index 4bb7bf2079..0172d80828 100644 --- a/misc/gs_afm/HelvO.afm +++ b/misc/gs_afm/HelvO.afm @@ -1,1257 +1,1341 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 8/3/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusSanL-ReguCondItal -FullName Nimbus Sans L Regular Condensed Italic +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. +FontName NimbusSanL-ReguItal +FullName Nimbus Sans L Regular Italic FamilyName Nimbus Sans L Weight Regular -ItalicAngle -9.0 +ItalicAngle -12.0 IsFixedPitch false -UnderlinePosition -100 +UnderlinePosition -151 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -139 -225 915 944 -CapHeight 718 -XHeight 523 -Descender -207 -Ascender 718 -StartCharMetrics 232 -C 32 ; WX 228 ; N space ; B 21 0 21 0 ; -C 33 ; WX 228 ; N exclam ; B 74 0 278 718 ; -C 34 ; WX 291 ; N quotedbl ; B 138 463 359 718 ; -C 35 ; WX 456 ; N numbersign ; B 60 0 517 688 ; -C 36 ; WX 456 ; N dollar ; B 57 -115 506 775 ; -C 37 ; WX 729 ; N percent ; B 120 -19 729 703 ; -C 38 ; WX 547 ; N ampersand ; B 63 -15 530 718 ; -C 39 ; WX 182 ; N quoteright ; B 124 463 254 718 ; -C 40 ; WX 273 ; N parenleft ; B 89 -207 372 733 ; -C 41 ; WX 273 ; N parenright ; B -7 -207 276 733 ; -C 42 ; WX 319 ; N asterisk ; B 135 431 389 718 ; -C 43 ; WX 479 ; N plus ; B 70 0 497 505 ; -C 44 ; WX 228 ; N comma ; B 46 -147 175 106 ; -C 45 ; WX 273 ; N hyphen ; B 77 232 293 322 ; -C 46 ; WX 228 ; N period ; B 71 0 175 106 ; -C 47 ; WX 228 ; N slash ; B -17 -19 370 737 ; -C 48 ; WX 456 ; N zero ; B 77 -19 499 703 ; -C 49 ; WX 456 ; N one ; B 170 0 417 703 ; -C 50 ; WX 456 ; N two ; B 21 0 506 703 ; -C 51 ; WX 456 ; N three ; B 61 -19 500 703 ; -C 52 ; WX 456 ; N four ; B 50 0 472 703 ; -C 53 ; WX 456 ; N five ; B 55 -19 509 688 ; -C 54 ; WX 456 ; N six ; B 74 -19 504 703 ; -C 55 ; WX 456 ; N seven ; B 112 0 549 688 ; -C 56 ; WX 456 ; N eight ; B 60 -19 497 703 ; -C 57 ; WX 456 ; N nine ; B 67 -19 499 703 ; -C 58 ; WX 228 ; N colon ; B 71 0 247 516 ; -C 59 ; WX 228 ; N semicolon ; B 46 -147 247 516 ; -C 60 ; WX 479 ; N less ; B 77 10 526 496 ; -C 61 ; WX 479 ; N equal ; B 52 115 515 390 ; -C 62 ; WX 479 ; N greater ; B 41 10 490 496 ; -C 63 ; WX 456 ; N question ; B 132 0 500 727 ; -C 64 ; WX 832 ; N at ; B 176 -19 791 737 ; -C 65 ; WX 547 ; N A ; B 11 0 536 718 ; -C 66 ; WX 547 ; N B ; B 61 0 583 718 ; -C 67 ; WX 592 ; N C ; B 88 -19 640 737 ; -C 68 ; WX 592 ; N D ; B 66 0 626 718 ; -C 69 ; WX 547 ; N E ; B 71 0 625 718 ; -C 70 ; WX 501 ; N F ; B 71 0 603 718 ; -C 71 ; WX 638 ; N G ; B 91 -19 655 737 ; -C 72 ; WX 592 ; N H ; B 63 0 655 718 ; -C 73 ; WX 228 ; N I ; B 75 0 279 718 ; -C 74 ; WX 410 ; N J ; B 39 -19 476 718 ; -C 75 ; WX 547 ; N K ; B 62 0 662 718 ; -C 76 ; WX 456 ; N L ; B 62 0 455 718 ; -C 77 ; WX 683 ; N M ; B 60 0 749 718 ; -C 78 ; WX 592 ; N N ; B 62 0 655 718 ; -C 79 ; WX 638 ; N O ; B 86 -19 677 737 ; -C 80 ; WX 547 ; N P ; B 71 0 604 718 ; -C 81 ; WX 638 ; N Q ; B 86 -56 677 737 ; -C 82 ; WX 592 ; N R ; B 72 0 634 718 ; -C 83 ; WX 547 ; N S ; B 74 -19 584 737 ; -C 84 ; WX 501 ; N T ; B 122 0 615 718 ; -C 85 ; WX 592 ; N U ; B 101 -19 653 718 ; -C 86 ; WX 547 ; N V ; B 142 0 656 718 ; -C 87 ; WX 774 ; N W ; B 138 0 886 718 ; -C 88 ; WX 547 ; N X ; B 16 0 647 718 ; -C 89 ; WX 547 ; N Y ; B 137 0 661 718 ; -C 90 ; WX 501 ; N Z ; B 19 0 607 718 ; -C 91 ; WX 228 ; N bracketleft ; B 17 -196 331 722 ; -C 92 ; WX 228 ; N backslash ; B 115 -19 239 737 ; -C 93 ; WX 228 ; N bracketright ; B -11 -196 302 722 ; -C 94 ; WX 385 ; N asciicircum ; B 35 264 442 688 ; -C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ; -C 96 ; WX 182 ; N quoteleft ; B 135 470 265 725 ; -C 97 ; WX 456 ; N a ; B 50 -15 458 538 ; -C 98 ; WX 456 ; N b ; B 48 -15 479 718 ; -C 99 ; WX 410 ; N c ; B 61 -15 454 538 ; -C 100 ; WX 456 ; N d ; B 69 -15 534 718 ; -C 101 ; WX 456 ; N e ; B 69 -15 474 538 ; -C 102 ; WX 228 ; N f ; B 71 0 341 728 ; -C 103 ; WX 456 ; N g ; B 34 -220 500 538 ; -C 104 ; WX 456 ; N h ; B 53 0 470 718 ; -C 105 ; WX 182 ; N i ; B 55 0 252 718 ; -C 106 ; WX 182 ; N j ; B -49 -210 252 718 ; -C 107 ; WX 410 ; N k ; B 55 0 492 718 ; -C 108 ; WX 182 ; N l ; B 55 0 252 718 ; -C 109 ; WX 683 ; N m ; B 53 0 699 538 ; -C 110 ; WX 456 ; N n ; B 53 0 470 538 ; -C 111 ; WX 456 ; N o ; B 68 -14 479 538 ; -C 112 ; WX 456 ; N p ; B 11 -207 479 538 ; -C 113 ; WX 456 ; N q ; B 69 -207 496 538 ; -C 114 ; WX 273 ; N r ; B 63 0 365 538 ; -C 115 ; WX 410 ; N s ; B 52 -15 434 538 ; -C 116 ; WX 228 ; N t ; B 84 -7 302 669 ; -C 117 ; WX 456 ; N u ; B 77 -15 492 523 ; -C 118 ; WX 410 ; N v ; B 98 0 495 523 ; -C 119 ; WX 592 ; N w ; B 103 0 673 523 ; -C 120 ; WX 410 ; N x ; B 9 0 487 523 ; -C 121 ; WX 410 ; N y ; B 12 -214 492 523 ; -C 122 ; WX 410 ; N z ; B 25 0 468 523 ; -C 123 ; WX 274 ; N braceleft ; B 75 -196 365 722 ; -C 124 ; WX 213 ; N bar ; B 74 -19 265 737 ; -C 125 ; WX 274 ; N braceright ; B 0 -196 291 722 ; -C 126 ; WX 479 ; N asciitilde ; B 91 181 476 322 ; -C 161 ; WX 273 ; N exclamdown ; B 63 -195 267 523 ; -C 162 ; WX 456 ; N cent ; B 78 -115 479 623 ; -C 163 ; WX 456 ; N sterling ; B 40 -16 520 718 ; -C 164 ; WX 137 ; N fraction ; B -139 -19 396 703 ; -C 165 ; WX 456 ; N yen ; B 67 0 573 688 ; -C 166 ; WX 456 ; N florin ; B -43 -207 537 737 ; -C 167 ; WX 456 ; N section ; B 63 -191 479 737 ; -C 168 ; WX 456 ; N currency ; B 49 99 530 603 ; -C 169 ; WX 157 ; N quotesingle ; B 129 463 233 718 ; -C 170 ; WX 273 ; N quotedblleft ; B 113 470 378 725 ; -C 171 ; WX 456 ; N guillemotleft ; B 120 108 454 446 ; -C 172 ; WX 273 ; N guilsinglleft ; B 112 108 279 446 ; -C 173 ; WX 273 ; N guilsinglright ; B 91 108 257 446 ; -C 174 ; WX 410 ; N fi ; B 71 0 481 728 ; -C 175 ; WX 410 ; N fl ; B 71 0 479 728 ; -C 177 ; WX 456 ; N endash ; B 42 240 510 313 ; -C 178 ; WX 456 ; N dagger ; B 110 -159 510 718 ; -C 179 ; WX 456 ; N daggerdbl ; B 43 -159 511 718 ; -C 180 ; WX 228 ; N periodcentered ; B 106 190 211 315 ; -C 182 ; WX 440 ; N paragraph ; B 103 -173 533 718 ; -C 183 ; WX 287 ; N bullet ; B 74 202 339 517 ; -C 184 ; WX 182 ; N quotesinglbase ; B 17 -149 147 106 ; -C 185 ; WX 273 ; N quotedblbase ; B -5 -149 260 106 ; -C 186 ; WX 273 ; N quotedblright ; B 102 463 367 718 ; -C 187 ; WX 456 ; N guillemotright ; B 98 108 433 446 ; -C 188 ; WX 820 ; N ellipsis ; B 94 0 744 106 ; -C 189 ; WX 820 ; N perthousand ; B 72 -19 844 703 ; -C 191 ; WX 501 ; N questiondown ; B 70 -201 438 525 ; -C 193 ; WX 273 ; N grave ; B 139 593 276 734 ; -C 194 ; WX 273 ; N acute ; B 203 593 390 734 ; -C 195 ; WX 273 ; N circumflex ; B 121 593 359 734 ; -C 196 ; WX 273 ; N tilde ; B 102 606 402 722 ; -C 197 ; WX 273 ; N macron ; B 117 627 384 684 ; -C 198 ; WX 273 ; N breve ; B 137 595 391 731 ; -C 199 ; WX 273 ; N dotaccent ; B 204 604 297 706 ; -C 200 ; WX 273 ; N dieresis ; B 138 604 363 706 ; -C 202 ; WX 273 ; N ring ; B 175 572 330 756 ; -C 203 ; WX 273 ; N cedilla ; B 2 -225 191 0 ; -C 205 ; WX 273 ; N hungarumlaut ; B 129 593 463 734 ; -C 206 ; WX 273 ; N ogonek ; B 35 -225 204 0 ; -C 207 ; WX 273 ; N caron ; B 145 593 384 734 ; -C 208 ; WX 820 ; N emdash ; B 42 240 875 313 ; -C 225 ; WX 820 ; N AE ; B 7 0 899 718 ; -C 227 ; WX 303 ; N ordfeminine ; B 82 304 368 737 ; -C 232 ; WX 456 ; N Lslash ; B 34 0 455 718 ; -C 233 ; WX 638 ; N Oslash ; B 35 -19 730 737 ; -C 234 ; WX 820 ; N OE ; B 80 -19 915 737 ; -C 235 ; WX 299 ; N ordmasculine ; B 82 304 384 737 ; -C 241 ; WX 729 ; N ae ; B 50 -15 746 538 ; -C 245 ; WX 228 ; N dotlessi ; B 78 0 241 523 ; -C 248 ; WX 182 ; N lslash ; B 34 0 284 718 ; -C 249 ; WX 501 ; N oslash ; B 24 -22 531 545 ; -C 250 ; WX 774 ; N oe ; B 68 -15 791 538 ; -C 251 ; WX 501 ; N germandbls ; B 55 -15 539 728 ; -C -1 ; WX 547 ; N Yacute ; B 137 0 661 929 ; -C -1 ; WX 592 ; N Ucircumflex ; B 101 -19 653 929 ; -C -1 ; WX 592 ; N Ugrave ; B 101 -19 653 929 ; -C -1 ; WX 501 ; N Zcaron ; B 19 0 607 929 ; -C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 901 ; -C -1 ; WX 273 ; N threesuperior ; B 74 270 358 714 ; -C -1 ; WX 592 ; N Uacute ; B 101 -19 653 929 ; -C -1 ; WX 273 ; N twosuperior ; B 52 281 368 714 ; -C -1 ; WX 592 ; N Udieresis ; B 101 -19 653 901 ; -C -1 ; WX 228 ; N middot ; B 106 190 211 315 ; -C -1 ; WX 273 ; N onesuperior ; B 136 281 305 703 ; -C -1 ; WX 456 ; N aacute ; B 50 -15 482 734 ; -C -1 ; WX 456 ; N agrave ; B 50 -15 458 734 ; -C -1 ; WX 456 ; N acircumflex ; B 50 -15 458 734 ; -C -1 ; WX 547 ; N Scaron ; B 74 -19 584 929 ; -C -1 ; WX 638 ; N Otilde ; B 86 -19 677 917 ; -C -1 ; WX 273 ; N sfthyphen ; B 77 232 293 322 ; -C -1 ; WX 456 ; N atilde ; B 50 -15 486 722 ; -C -1 ; WX 456 ; N aring ; B 50 -15 458 769 ; -C -1 ; WX 456 ; N adieresis ; B 50 -15 458 706 ; -C -1 ; WX 638 ; N Ograve ; B 86 -19 677 929 ; -C -1 ; WX 638 ; N Ocircumflex ; B 86 -19 677 929 ; -C -1 ; WX 638 ; N Odieresis ; B 86 -19 677 901 ; -C -1 ; WX 592 ; N Ntilde ; B 62 0 655 917 ; -C -1 ; WX 456 ; N edieresis ; B 69 -15 474 706 ; -C -1 ; WX 456 ; N eacute ; B 69 -15 482 734 ; -C -1 ; WX 456 ; N egrave ; B 69 -15 474 734 ; -C -1 ; WX 228 ; N Icircumflex ; B 75 0 370 929 ; -C -1 ; WX 456 ; N ecircumflex ; B 69 -15 474 734 ; -C -1 ; WX 228 ; N Igrave ; B 75 0 288 929 ; -C -1 ; WX 228 ; N Iacute ; B 75 0 401 929 ; -C -1 ; WX 228 ; N Idieresis ; B 75 0 375 901 ; -C -1 ; WX 328 ; N degree ; B 138 411 384 703 ; -C -1 ; WX 547 ; N Ecircumflex ; B 71 0 625 929 ; -C -1 ; WX 479 ; N minus ; B 70 216 497 289 ; -C -1 ; WX 479 ; N multiply ; B 41 0 526 506 ; -C -1 ; WX 479 ; N divide ; B 70 -19 497 524 ; -C -1 ; WX 547 ; N Egrave ; B 71 0 625 929 ; -C -1 ; WX 820 ; N trademark ; B 152 306 866 718 ; -C -1 ; WX 638 ; N Oacute ; B 86 -19 677 929 ; -C -1 ; WX 456 ; N thorn ; B 11 -207 479 718 ; -C -1 ; WX 456 ; N eth ; B 67 -15 506 737 ; -C -1 ; WX 547 ; N Eacute ; B 71 0 625 929 ; -C -1 ; WX 410 ; N ccedilla ; B 61 -225 454 538 ; -C -1 ; WX 228 ; N idieresis ; B 78 0 341 706 ; -C -1 ; WX 228 ; N iacute ; B 78 0 368 734 ; -C -1 ; WX 228 ; N igrave ; B 78 0 254 734 ; -C -1 ; WX 479 ; N plusminus ; B 32 0 507 561 ; -C -1 ; WX 684 ; N onehalf ; B 93 -19 688 703 ; -C -1 ; WX 684 ; N onequarter ; B 123 -19 658 703 ; -C -1 ; WX 684 ; N threequarters ; B 106 -19 706 714 ; -C -1 ; WX 228 ; N icircumflex ; B 78 0 336 734 ; -C -1 ; WX 547 ; N Edieresis ; B 71 0 625 901 ; -C -1 ; WX 456 ; N ntilde ; B 53 0 486 722 ; -C -1 ; WX 547 ; N Aring ; B 11 0 536 944 ; -C -1 ; WX 456 ; N odieresis ; B 68 -14 479 706 ; -C -1 ; WX 456 ; N oacute ; B 68 -14 482 734 ; -C -1 ; WX 456 ; N ograve ; B 68 -14 479 734 ; -C -1 ; WX 456 ; N ocircumflex ; B 68 -14 479 734 ; -C -1 ; WX 456 ; N otilde ; B 68 -14 494 722 ; -C -1 ; WX 410 ; N scaron ; B 52 -15 453 734 ; -C -1 ; WX 456 ; N udieresis ; B 77 -15 492 706 ; -C -1 ; WX 456 ; N uacute ; B 77 -15 492 734 ; -C -1 ; WX 456 ; N ugrave ; B 77 -15 492 734 ; -C -1 ; WX 456 ; N ucircumflex ; B 77 -15 492 734 ; -C -1 ; WX 410 ; N yacute ; B 12 -214 492 734 ; -C -1 ; WX 410 ; N zcaron ; B 25 0 468 734 ; -C -1 ; WX 410 ; N ydieresis ; B 12 -214 492 706 ; -C -1 ; WX 604 ; N copyright ; B 44 -19 687 737 ; -C -1 ; WX 604 ; N registered ; B 44 -19 687 737 ; -C -1 ; WX 547 ; N Atilde ; B 11 0 573 917 ; -C -1 ; WX 228 ; N nbspace ; B 21 0 21 0 ; -C -1 ; WX 592 ; N Ccedilla ; B 88 -225 640 737 ; -C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ; -C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ; -C -1 ; WX 479 ; N logicalnot ; B 87 108 515 390 ; -C -1 ; WX 547 ; N Aacute ; B 11 0 561 929 ; -C -1 ; WX 592 ; N Eth ; B 57 0 626 718 ; -C -1 ; WX 213 ; N brokenbar ; B 74 -19 265 737 ; -C -1 ; WX 547 ; N Thorn ; B 71 0 584 718 ; -C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ; -C -1 ; WX 456 ; N mu ; B 20 -207 492 523 ; -C -1 ; WX 228 ; N .notdef ; B 21 0 21 0 ; +FontBBox -178 -284 1108 953 +CapHeight 729 +XHeight 524 +Descender -213 +Ascender 729 +StartCharMetrics 316 +C 32 ; WX 278 ; N space ; B 213 0 213 0 ; +C 33 ; WX 278 ; N exclam ; B 124 0 363 729 ; +C 34 ; WX 355 ; N quotedbl ; B 177 464 455 709 ; +C 35 ; WX 556 ; N numbersign ; B 54 -20 649 697 ; +C 36 ; WX 556 ; N dollar ; B 69 -126 613 770 ; +C 37 ; WX 889 ; N percent ; B 134 -20 895 709 ; +C 38 ; WX 667 ; N ampersand ; B 83 -23 644 709 ; +C 39 ; WX 222 ; N quoteright ; B 166 477 309 708 ; +C 40 ; WX 333 ; N parenleft ; B 113 -213 446 729 ; +C 41 ; WX 333 ; N parenright ; B -7 -213 325 729 ; +C 42 ; WX 389 ; N asterisk ; B 169 438 471 729 ; +C 43 ; WX 584 ; N plus ; B 92 -11 591 473 ; +C 44 ; WX 278 ; N comma ; B 55 -150 214 103 ; +C 45 ; WX 333 ; N hyphen ; B 97 240 351 312 ; +C 46 ; WX 278 ; N period ; B 87 0 213 103 ; +C 47 ; WX 278 ; N slash ; B -12 -20 434 729 ; +C 48 ; WX 556 ; N zero ; B 98 -23 598 709 ; +C 49 ; WX 556 ; N one ; B 208 0 498 709 ; +C 50 ; WX 556 ; N two ; B 34 0 620 709 ; +C 51 ; WX 556 ; N three ; B 71 -23 599 709 ; +C 52 ; WX 556 ; N four ; B 63 0 573 709 ; +C 53 ; WX 556 ; N five ; B 70 -23 629 709 ; +C 54 ; WX 556 ; N six ; B 93 -23 611 709 ; +C 55 ; WX 556 ; N seven ; B 137 0 671 709 ; +C 56 ; WX 556 ; N eight ; B 74 -23 604 709 ; +C 57 ; WX 556 ; N nine ; B 83 -23 599 709 ; +C 58 ; WX 278 ; N colon ; B 110 0 326 524 ; +C 59 ; WX 278 ; N semicolon ; B 78 -150 325 524 ; +C 60 ; WX 584 ; N less ; B 87 -9 635 474 ; +C 61 ; WX 584 ; N equal ; B 74 111 609 355 ; +C 62 ; WX 584 ; N greater ; B 48 -9 596 474 ; +C 63 ; WX 556 ; N question ; B 184 0 630 741 ; +C 64 ; WX 1015 ; N at ; B 80 -142 1036 741 ; +C 65 ; WX 667 ; N A ; B 17 0 653 729 ; +C 66 ; WX 667 ; N B ; B 79 0 711 729 ; +C 67 ; WX 722 ; N C ; B 112 -23 770 741 ; +C 68 ; WX 722 ; N D ; B 89 0 759 729 ; +C 69 ; WX 667 ; N E ; B 90 0 751 729 ; +C 70 ; WX 611 ; N F ; B 90 0 734 729 ; +C 71 ; WX 778 ; N G ; B 109 -23 809 741 ; +C 72 ; WX 722 ; N H ; B 83 0 799 729 ; +C 73 ; WX 278 ; N I ; B 100 0 349 729 ; +C 74 ; WX 500 ; N J ; B 47 -23 581 729 ; +C 75 ; WX 667 ; N K ; B 79 0 813 729 ; +C 76 ; WX 556 ; N L ; B 80 0 551 729 ; +C 77 ; WX 833 ; N M ; B 75 0 916 729 ; +C 78 ; WX 722 ; N N ; B 76 0 801 729 ; +C 79 ; WX 778 ; N O ; B 104 -23 828 741 ; +C 80 ; WX 667 ; N P ; B 91 0 733 729 ; +C 81 ; WX 778 ; N Q ; B 104 -59 828 741 ; +C 82 ; WX 722 ; N R ; B 93 0 770 729 ; +C 83 ; WX 667 ; N S ; B 89 -23 714 741 ; +C 84 ; WX 611 ; N T ; B 158 0 748 729 ; +C 85 ; WX 722 ; N U ; B 124 -23 800 729 ; +C 86 ; WX 667 ; N V ; B 185 0 800 729 ; +C 87 ; WX 944 ; N W ; B 177 0 1084 729 ; +C 88 ; WX 667 ; N X ; B 22 0 794 729 ; +C 89 ; WX 667 ; N Y ; B 168 0 816 729 ; +C 90 ; WX 611 ; N Z ; B 28 0 737 729 ; +C 91 ; WX 278 ; N bracketleft ; B 19 -213 405 729 ; +C 92 ; WX 278 ; N backslash ; B 147 -20 280 729 ; +C 93 ; WX 278 ; N bracketright ; B -23 -213 364 729 ; +C 94 ; WX 469 ; N asciicircum ; B 115 329 496 709 ; +C 95 ; WX 556 ; N underscore ; B -59 -176 551 -126 ; +C 96 ; WX 222 ; N quoteleft ; B 163 477 308 709 ; +C 97 ; WX 556 ; N a ; B 65 -23 568 539 ; +C 98 ; WX 556 ; N b ; B 54 -23 588 729 ; +C 99 ; WX 500 ; N c ; B 76 -23 554 539 ; +C 100 ; WX 556 ; N d ; B 73 -23 650 729 ; +C 101 ; WX 556 ; N e ; B 84 -23 580 539 ; +C 102 ; WX 278 ; N f ; B 89 0 413 732 ; +C 103 ; WX 556 ; N g ; B 32 -218 601 539 ; +C 104 ; WX 556 ; N h ; B 70 0 574 729 ; +C 105 ; WX 222 ; N i ; B 66 0 305 729 ; +C 106 ; WX 222 ; N j ; B -65 -218 308 729 ; +C 107 ; WX 500 ; N k ; B 58 0 584 729 ; +C 108 ; WX 222 ; N l ; B 68 0 307 729 ; +C 109 ; WX 833 ; N m ; B 71 0 852 539 ; +C 110 ; WX 556 ; N n ; B 70 0 574 539 ; +C 111 ; WX 556 ; N o ; B 80 -23 576 539 ; +C 112 ; WX 556 ; N p ; B 7 -213 586 539 ; +C 113 ; WX 556 ; N q ; B 71 -213 607 539 ; +C 114 ; WX 333 ; N r ; B 69 0 436 539 ; +C 115 ; WX 500 ; N s ; B 61 -23 520 539 ; +C 116 ; WX 278 ; N t ; B 97 -23 366 668 ; +C 117 ; WX 556 ; N u ; B 88 -23 594 524 ; +C 118 ; WX 500 ; N v ; B 122 0 598 524 ; +C 119 ; WX 722 ; N w ; B 118 0 820 524 ; +C 120 ; WX 500 ; N x ; B 17 0 583 524 ; +C 121 ; WX 500 ; N y ; B 8 -218 590 524 ; +C 122 ; WX 500 ; N z ; B 31 0 557 524 ; +C 123 ; WX 334 ; N braceleft ; B 91 -213 431 729 ; +C 124 ; WX 260 ; N bar ; B 54 -212 315 729 ; +C 125 ; WX 334 ; N braceright ; B -16 -213 324 729 ; +C 126 ; WX 584 ; N asciitilde ; B 137 268 594 438 ; +C 161 ; WX 333 ; N exclamdown ; B 76 -205 317 524 ; +C 162 ; WX 556 ; N cent ; B 96 -120 585 628 ; +C 163 ; WX 556 ; N sterling ; B 44 -23 628 729 ; +C 164 ; WX 167 ; N fraction ; B -178 -20 486 709 ; +C 165 ; WX 556 ; N yen ; B 100 0 696 709 ; +C 166 ; WX 556 ; N florin ; B -32 -212 696 738 ; +C 167 ; WX 556 ; N section ; B 63 -213 589 729 ; +C 168 ; WX 556 ; N currency ; B 110 133 593 556 ; +C 169 ; WX 191 ; N quotesingle ; B 173 464 292 709 ; +C 170 ; WX 333 ; N quotedblleft ; B 146 477 449 709 ; +C 171 ; WX 556 ; N guillemotleft ; B 147 106 548 438 ; +C 172 ; WX 333 ; N guilsinglleft ; B 140 106 336 438 ; +C 173 ; WX 333 ; N guilsinglright ; B 109 106 307 438 ; +C 174 ; WX 500 ; N fi ; B 83 0 591 732 ; +C 175 ; WX 500 ; N fl ; B 88 0 585 732 ; +C 177 ; WX 556 ; N endash ; B 46 240 628 312 ; +C 178 ; WX 556 ; N dagger ; B 127 -177 620 709 ; +C 179 ; WX 556 ; N daggerdbl ; B 51 -177 620 709 ; +C 180 ; WX 278 ; N periodcentered ; B 166 192 293 295 ; +C 182 ; WX 537 ; N paragraph ; B 145 -178 677 729 ; +C 183 ; WX 350 ; N bullet ; B 120 220 376 470 ; +C 184 ; WX 222 ; N quotesinglbase ; B 37 -128 180 103 ; +C 185 ; WX 333 ; N quotedblbase ; B 20 -128 322 103 ; +C 186 ; WX 333 ; N quotedblright ; B 150 477 452 708 ; +C 187 ; WX 556 ; N guillemotright ; B 121 106 518 438 ; +C 188 ; WX 1000 ; N ellipsis ; B 115 0 907 103 ; +C 189 ; WX 1000 ; N perthousand ; B 93 -20 1024 738 ; +C 191 ; WX 611 ; N questiondown ; B 86 -217 531 524 ; +C 193 ; WX 333 ; N grave ; B 179 592 357 740 ; +C 194 ; WX 333 ; N acute ; B 218 592 458 740 ; +C 195 ; WX 333 ; N circumflex ; B 146 591 433 741 ; +C 196 ; WX 333 ; N tilde ; B 130 611 471 719 ; +C 197 ; WX 333 ; N macron ; B 160 627 450 696 ; +C 198 ; WX 333 ; N breve ; B 165 594 471 729 ; +C 199 ; WX 333 ; N dotaccent ; B 244 612 370 715 ; +C 200 ; WX 333 ; N dieresis ; B 159 612 446 715 ; +C 202 ; WX 333 ; N ring ; B 216 579 396 754 ; +C 203 ; WX 333 ; N cedilla ; B 1 -214 264 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 91 590 505 740 ; +C 206 ; WX 333 ; N ogonek ; B 35 -205 246 0 ; +C 207 ; WX 333 ; N caron ; B 176 592 463 740 ; +C 208 ; WX 1000 ; N emdash ; B 42 240 1068 312 ; +C 225 ; WX 1000 ; N AE ; B 11 0 1087 729 ; +C 227 ; WX 370 ; N ordfeminine ; B 107 303 441 742 ; +C 232 ; WX 556 ; N Lslash ; B 75 0 570 729 ; +C 233 ; WX 778 ; N Oslash ; B 32 -24 867 741 ; +C 234 ; WX 1000 ; N OE ; B 101 -23 1108 741 ; +C 235 ; WX 365 ; N ordmasculine ; B 114 303 452 742 ; +C 241 ; WX 889 ; N ae ; B 59 -23 915 539 ; +C 245 ; WX 278 ; N dotlessi ; B 94 0 290 527 ; +C 248 ; WX 222 ; N lslash ; B 62 0 312 729 ; +C 249 ; WX 611 ; N oslash ; B 19 -30 639 541 ; +C 250 ; WX 944 ; N oe ; B 85 -23 966 539 ; +C 251 ; WX 611 ; N germandbls ; B 126 -23 655 729 ; +C -1 ; WX 722 ; N Udieresis ; B 124 -23 800 914 ; +C -1 ; WX 722 ; N Uacute ; B 124 -23 800 939 ; +C -1 ; WX 667 ; N Scedilla ; B 89 -214 714 741 ; +C -1 ; WX 611 ; N Tcaron ; B 158 0 748 939 ; +C -1 ; WX 667 ; N Scaron ; B 89 -23 714 939 ; +C -1 ; WX 722 ; N Rcaron ; B 93 0 770 939 ; +C -1 ; WX 722 ; N Racute ; B 93 0 770 939 ; +C -1 ; WX 667 ; N Sacute ; B 89 -23 714 939 ; +C -1 ; WX 778 ; N Otilde ; B 104 -23 828 918 ; +C -1 ; WX 556 ; N ucircumflex ; B 88 -23 594 741 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 104 -23 841 939 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 124 -23 806 939 ; +C -1 ; WX 667 ; N Yacute ; B 168 0 816 939 ; +C -1 ; WX 722 ; N Eth ; B 89 0 759 729 ; +C -1 ; WX 722 ; N Dcroat ; B 89 0 759 729 ; +C -1 ; WX 611 ; N Zacute ; B 28 0 737 939 ; +C -1 ; WX 722 ; N Uring ; B 124 -23 800 953 ; +C -1 ; WX 556 ; N gbreve ; B 32 -218 601 729 ; +C -1 ; WX 556 ; N eogonek ; B 84 -205 580 539 ; +C -1 ; WX 556 ; N edotaccent ; B 84 -23 580 715 ; +C -1 ; WX 556 ; N ecaron ; B 84 -23 580 740 ; +C -1 ; WX 722 ; N Ugrave ; B 124 -23 800 939 ; +C -1 ; WX 667 ; N Thorn ; B 91 0 708 729 ; +C -1 ; WX 556 ; N eacute ; B 84 -23 580 740 ; +C -1 ; WX 556 ; N edieresis ; B 84 -23 580 715 ; +C -1 ; WX 650 ; N dcaron ; B 73 -23 810 729 ; +C -1 ; WX 500 ; N ccedilla ; B 76 -214 554 539 ; +C -1 ; WX 500 ; N ccaron ; B 76 -23 563 740 ; +C -1 ; WX 500 ; N cacute ; B 76 -23 575 740 ; +C -1 ; WX 556 ; N aogonek ; B 65 -205 571 539 ; +C -1 ; WX 556 ; N aring ; B 65 -23 568 754 ; +C -1 ; WX 556 ; N atilde ; B 65 -23 583 719 ; +C -1 ; WX 556 ; N abreve ; B 65 -23 582 729 ; +C -1 ; WX 556 ; N egrave ; B 84 -23 580 740 ; +C -1 ; WX 556 ; N agrave ; B 65 -23 568 740 ; +C -1 ; WX 556 ; N aacute ; B 65 -23 570 740 ; +C -1 ; WX 556 ; N adieresis ; B 65 -23 568 715 ; +C -1 ; WX 722 ; N Uogonek ; B 124 -205 800 729 ; +C -1 ; WX 556 ; N ugrave ; B 88 -23 594 740 ; +C -1 ; WX 556 ; N uacute ; B 88 -23 594 740 ; +C -1 ; WX 556 ; N udieresis ; B 88 -23 594 715 ; +C -1 ; WX 319 ; N tcaron ; B 97 -23 492 801 ; +C -1 ; WX 500 ; N scommaaccent ; B 61 -284 520 539 ; +C -1 ; WX 611 ; N Zcaron ; B 28 0 737 939 ; +C -1 ; WX 556 ; N ecircumflex ; B 84 -23 580 741 ; +C -1 ; WX 722 ; N Ucircumflex ; B 124 -23 800 940 ; +C -1 ; WX 556 ; N acircumflex ; B 65 -23 568 741 ; +C -1 ; WX 611 ; N Zdotaccent ; B 28 0 737 914 ; +C -1 ; WX 500 ; N scaron ; B 61 -23 547 740 ; +C -1 ; WX 667 ; N Amacron ; B 17 0 663 895 ; +C -1 ; WX 500 ; N sacute ; B 61 -23 545 740 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 158 -284 748 729 ; +C -1 ; WX 667 ; N Ydieresis ; B 168 0 816 914 ; +C -1 ; WX 556 ; N thorn ; B 7 -213 586 729 ; +C -1 ; WX 667 ; N Emacron ; B 90 0 751 895 ; +C -1 ; WX 778 ; N Ograve ; B 104 -23 828 939 ; +C -1 ; WX 778 ; N Oacute ; B 104 -23 828 939 ; +C -1 ; WX 778 ; N Odieresis ; B 104 -23 828 914 ; +C -1 ; WX 722 ; N Ntilde ; B 76 0 801 918 ; +C -1 ; WX 722 ; N Ncaron ; B 76 0 801 939 ; +C -1 ; WX 722 ; N Nacute ; B 76 0 801 939 ; +C -1 ; WX 556 ; N Lcaron ; B 80 0 551 729 ; +C -1 ; WX 556 ; N Lacute ; B 80 0 551 939 ; +C -1 ; WX 278 ; N Idotaccent ; B 100 0 389 914 ; +C -1 ; WX 333 ; N racute ; B 69 0 498 740 ; +C -1 ; WX 278 ; N Icircumflex ; B 100 0 454 940 ; +C -1 ; WX 556 ; N ohungarumlaut ; B 80 -23 683 740 ; +C -1 ; WX 556 ; N otilde ; B 80 -23 583 719 ; +C -1 ; WX 556 ; N Euro ; B 12 -22 636 709 ; +C -1 ; WX 556 ; N ocircumflex ; B 80 -23 576 741 ; +C -1 ; WX 390 ; N onesuperior ; B 205 284 393 709 ; +C -1 ; WX 390 ; N twosuperior ; B 100 284 468 709 ; +C -1 ; WX 390 ; N threesuperior ; B 123 270 455 709 ; +C -1 ; WX 278 ; N Igrave ; B 100 0 378 939 ; +C -1 ; WX 278 ; N Iacute ; B 100 0 479 939 ; +C -1 ; WX 278 ; N Imacron ; B 100 0 458 895 ; +C -1 ; WX 278 ; N Iogonek ; B 28 -205 349 729 ; +C -1 ; WX 278 ; N Idieresis ; B 100 0 467 907 ; +C -1 ; WX 778 ; N Gbreve ; B 109 -23 809 928 ; +C -1 ; WX 722 ; N Umacron ; B 124 -23 800 895 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 79 -284 813 729 ; +C -1 ; WX 556 ; N ograve ; B 80 -23 576 740 ; +C -1 ; WX 667 ; N Scommaaccent ; B 89 -284 714 741 ; +C -1 ; WX 667 ; N Eogonek ; B 90 -205 751 729 ; +C -1 ; WX 556 ; N oacute ; B 80 -23 576 740 ; +C -1 ; WX 667 ; N Edotaccent ; B 90 0 751 914 ; +C -1 ; WX 222 ; N iogonek ; B 0 -205 305 729 ; +C -1 ; WX 527 ; N gcommaaccent ; B 3 -218 572 813 ; +C -1 ; WX 556 ; N odieresis ; B 80 -23 576 715 ; +C -1 ; WX 556 ; N ntilde ; B 70 0 589 719 ; +C -1 ; WX 556 ; N ncaron ; B 70 0 578 740 ; +C -1 ; WX 667 ; N Ecaron ; B 90 0 751 939 ; +C -1 ; WX 667 ; N Ecircumflex ; B 90 0 751 940 ; +C -1 ; WX 500 ; N scedilla ; B 61 -214 521 539 ; +C -1 ; WX 333 ; N rcaron ; B 69 0 486 740 ; +C -1 ; WX 667 ; N Egrave ; B 90 0 751 939 ; +C -1 ; WX 667 ; N Eacute ; B 90 0 751 939 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 109 -284 809 741 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 93 -284 770 729 ; +C -1 ; WX 667 ; N Edieresis ; B 90 0 751 914 ; +C -1 ; WX 556 ; N nacute ; B 70 0 580 740 ; +C -1 ; WX 556 ; N uogonek ; B 88 -205 594 524 ; +C -1 ; WX 556 ; N umacron ; B 88 -23 594 696 ; +C -1 ; WX 722 ; N Dcaron ; B 89 0 759 939 ; +C -1 ; WX 307 ; N lcaron ; B 68 0 467 729 ; +C -1 ; WX 722 ; N Ccaron ; B 112 -23 770 939 ; +C -1 ; WX 722 ; N Cacute ; B 112 -23 770 939 ; +C -1 ; WX 722 ; N Ccedilla ; B 112 -214 770 741 ; +C -1 ; WX 606 ; N degree ; B 291 383 594 686 ; +C -1 ; WX 667 ; N Aogonek ; B 17 -205 663 729 ; +C -1 ; WX 584 ; N minus ; B 81 197 601 269 ; +C -1 ; WX 584 ; N multiply ; B 113 34 568 427 ; +C -1 ; WX 584 ; N divide ; B 92 0 591 462 ; +C -1 ; WX 667 ; N Aring ; B 17 0 653 953 ; +C -1 ; WX 1000 ; N trademark ; B 208 292 1096 729 ; +C -1 ; WX 333 ; N rcommaaccent ; B 5 -284 436 539 ; +C -1 ; WX 222 ; N lacute ; B 68 0 463 939 ; +C -1 ; WX 556 ; N omacron ; B 80 -23 576 696 ; +C -1 ; WX 667 ; N Atilde ; B 17 0 680 918 ; +C -1 ; WX 278 ; N icircumflex ; B 94 0 406 741 ; +C -1 ; WX 278 ; N igrave ; B 94 0 330 740 ; +C -1 ; WX 556 ; N ncommaaccent ; B 70 -284 574 539 ; +C -1 ; WX 222 ; N lcommaaccent ; B -1 -284 307 729 ; +C -1 ; WX 584 ; N plusminus ; B 50 0 625 633 ; +C -1 ; WX 947 ; N onehalf ; B 202 -20 965 709 ; +C -1 ; WX 947 ; N onequarter ; B 205 -20 938 709 ; +C -1 ; WX 947 ; N threequarters ; B 123 -20 938 709 ; +C -1 ; WX 278 ; N iacute ; B 94 0 431 740 ; +C -1 ; WX 667 ; N Abreve ; B 17 0 683 928 ; +C -1 ; WX 500 ; N kcommaaccent ; B 58 -284 584 729 ; +C -1 ; WX 778 ; N Omacron ; B 104 -23 828 895 ; +C -1 ; WX 222 ; N imacron ; B 66 0 373 696 ; +C -1 ; WX 556 ; N emacron ; B 84 -23 580 696 ; +C -1 ; WX 556 ; N amacron ; B 65 -23 568 696 ; +C -1 ; WX 278 ; N tcommaaccent ; B 55 -284 366 668 ; +C -1 ; WX 500 ; N ydieresis ; B 8 -218 590 715 ; +C -1 ; WX 500 ; N zdotaccent ; B 31 0 557 715 ; +C -1 ; WX 500 ; N zcaron ; B 31 0 557 740 ; +C -1 ; WX 500 ; N zacute ; B 31 0 557 740 ; +C -1 ; WX 500 ; N yacute ; B 8 -218 590 740 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 88 -23 683 740 ; +C -1 ; WX 556 ; N eth ; B 80 -23 576 743 ; +C -1 ; WX 556 ; N uring ; B 88 -23 594 754 ; +C -1 ; WX 778 ; N Ocircumflex ; B 104 -23 828 940 ; +C -1 ; WX 333 ; N commaaccent ; B 57 -284 205 -60 ; +C -1 ; WX 737 ; N copyright ; B 55 -22 836 742 ; +C -1 ; WX 737 ; N registered ; B 55 -22 836 742 ; +C -1 ; WX 667 ; N Acircumflex ; B 17 0 653 940 ; +C -1 ; WX 278 ; N idieresis ; B 94 0 419 708 ; +C -1 ; WX 489 ; N lozenge ; B 16 0 462 744 ; +C -1 ; WX 712 ; N Delta ; B 10 0 701 729 ; +C -1 ; WX 584 ; N notequal ; B 74 2 609 480 ; +C -1 ; WX 542 ; N radical ; B 102 -36 705 913 ; +C -1 ; WX 667 ; N Agrave ; B 17 0 653 939 ; +C -1 ; WX 667 ; N Aacute ; B 17 0 667 939 ; +C -1 ; WX 584 ; N lessequal ; B 45 0 659 584 ; +C -1 ; WX 584 ; N greaterequal ; B 56 0 626 584 ; +C -1 ; WX 584 ; N logicalnot ; B 99 86 619 377 ; +C -1 ; WX 711 ; N summation ; B -18 -97 760 762 ; +C -1 ; WX 490 ; N partialdiff ; B 22 -15 458 750 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 76 -284 801 729 ; +C -1 ; WX 556 ; N dcroat ; B 73 -23 695 729 ; +C -1 ; WX 260 ; N brokenbar ; B 54 -212 315 729 ; +C -1 ; WX 556 ; N Lcommaaccent ; B 80 -284 551 729 ; +C -1 ; WX 667 ; N Adieresis ; B 17 0 662 914 ; +C -1 ; WX 556 ; N mu ; B 18 -220 593 524 ; +C -1 ; WX 278 ; N .notdef ; B 213 0 213 0 ; EndCharMetrics StartKernData StartKernPairs 998 -KPX A C -30 -KPX A Ccedilla -30 -KPX A G -33 -KPX A O -30 -KPX A Odieresis -30 -KPX A Q -30 -KPX A T -81 -KPX A U -32 -KPX A Uacute -32 -KPX A Ucircumflex -32 -KPX A Udieresis -32 -KPX A Ugrave -32 -KPX A V -61 -KPX A W -43 -KPX A Y -82 -KPX A a -11 -KPX A b -6 -KPX A c -11 -KPX A ccedilla -11 -KPX A comma 0 -KPX A d -13 -KPX A e -15 -KPX A g -16 -KPX A guillemotleft -43 -KPX A guilsinglleft -39 -KPX A hyphen -6 -KPX A o -16 -KPX A period 1 -KPX A q -13 -KPX A quotedblright -40 -KPX A quoteright -51 -KPX A t -17 -KPX A u -15 -KPX A v -30 -KPX A w -25 -KPX A y -31 -KPX Aacute C -31 -KPX Aacute G -34 -KPX Aacute O -31 -KPX Aacute Q -31 -KPX Aacute T -81 -KPX Aacute U -33 -KPX Aacute V -61 -KPX Aacute W -43 -KPX Aacute Y -82 -KPX Aacute a -12 +KPX A C -41 +KPX A Ccedilla -41 +KPX A G -41 +KPX A O -37 +KPX A Odieresis -37 +KPX A Q -38 +KPX A T -103 +KPX A U -42 +KPX A Uacute -42 +KPX A Ucircumflex -42 +KPX A Udieresis -42 +KPX A Ugrave -42 +KPX A V -81 +KPX A W -57 +KPX A Y -104 +KPX A a -16 +KPX A b -5 +KPX A c -16 +KPX A ccedilla -16 +KPX A comma -4 +KPX A d -14 +KPX A e -22 +KPX A g -17 +KPX A guillemotleft -51 +KPX A guilsinglleft -47 +KPX A hyphen -8 +KPX A o -19 +KPX A period -2 +KPX A q -15 +KPX A quotedblright -60 +KPX A quoteright -68 +KPX A t -22 +KPX A u -18 +KPX A v -40 +KPX A w -29 +KPX A y -44 +KPX Aacute C -42 +KPX Aacute G -42 +KPX Aacute O -38 +KPX Aacute Q -39 +KPX Aacute T -103 +KPX Aacute U -43 +KPX Aacute V -81 +KPX Aacute W -57 +KPX Aacute Y -104 +KPX Aacute a -16 KPX Aacute b -6 -KPX Aacute c -12 -KPX Aacute comma 0 -KPX Aacute d -14 -KPX Aacute e -16 -KPX Aacute g -16 -KPX Aacute guillemotleft -44 -KPX Aacute guilsinglleft -40 -KPX Aacute hyphen -6 -KPX Aacute o -17 -KPX Aacute period 0 -KPX Aacute q -14 -KPX Aacute quoteright -52 -KPX Aacute t -18 -KPX Aacute u -16 -KPX Aacute v -31 -KPX Aacute w -25 -KPX Aacute y -31 -KPX Acircumflex C -30 -KPX Acircumflex G -33 -KPX Acircumflex O -30 -KPX Acircumflex Q -30 -KPX Acircumflex T -81 -KPX Acircumflex U -32 -KPX Acircumflex V -61 -KPX Acircumflex W -43 -KPX Acircumflex Y -82 -KPX Acircumflex comma 0 -KPX Acircumflex period 1 -KPX Adieresis C -30 -KPX Adieresis G -33 -KPX Adieresis O -30 -KPX Adieresis Q -30 -KPX Adieresis T -81 -KPX Adieresis U -32 -KPX Adieresis V -61 -KPX Adieresis W -43 -KPX Adieresis Y -82 -KPX Adieresis a -11 -KPX Adieresis b -6 -KPX Adieresis c -11 -KPX Adieresis comma 0 -KPX Adieresis d -13 -KPX Adieresis g -16 -KPX Adieresis guillemotleft -43 -KPX Adieresis guilsinglleft -39 -KPX Adieresis hyphen -6 -KPX Adieresis o -16 -KPX Adieresis period 1 -KPX Adieresis q -13 -KPX Adieresis quotedblright -40 -KPX Adieresis quoteright -51 -KPX Adieresis t -17 -KPX Adieresis u -15 -KPX Adieresis v -30 -KPX Adieresis w -25 -KPX Adieresis y -31 -KPX Agrave C -30 -KPX Agrave G -33 -KPX Agrave O -30 -KPX Agrave Q -30 -KPX Agrave T -81 -KPX Agrave U -32 -KPX Agrave V -61 -KPX Agrave W -43 -KPX Agrave Y -82 -KPX Agrave comma 0 -KPX Agrave period 1 -KPX Aring C -30 -KPX Aring G -33 -KPX Aring O -30 -KPX Aring Q -30 -KPX Aring T -81 -KPX Aring U -32 -KPX Aring V -61 -KPX Aring W -43 -KPX Aring Y -82 -KPX Aring a -11 -KPX Aring b -6 -KPX Aring c -11 -KPX Aring comma 0 -KPX Aring d -13 -KPX Aring e -15 -KPX Aring g -16 -KPX Aring guillemotleft -43 -KPX Aring guilsinglleft -39 -KPX Aring hyphen -6 -KPX Aring o -16 -KPX Aring period 1 -KPX Aring q -13 -KPX Aring quotedblright -40 -KPX Aring quoteright -51 -KPX Aring t -17 -KPX Aring u -15 -KPX Aring v -30 -KPX Aring w -25 -KPX Aring y -31 -KPX Atilde C -31 -KPX Atilde G -35 -KPX Atilde O -31 -KPX Atilde Q -31 -KPX Atilde T -81 -KPX Atilde U -34 -KPX Atilde V -61 -KPX Atilde W -43 -KPX Atilde Y -82 -KPX Atilde comma -1 -KPX Atilde period 0 -KPX B A -22 -KPX B AE -21 -KPX B Aacute -22 -KPX B Acircumflex -22 -KPX B Adieresis -22 -KPX B Aring -22 -KPX B Atilde -22 -KPX B O -9 -KPX B OE -5 -KPX B Oacute -9 -KPX B Ocircumflex -9 -KPX B Odieresis -9 -KPX B Ograve -9 -KPX B Oslash -7 -KPX B V -34 -KPX B W -17 -KPX B Y -42 -KPX C A -33 -KPX C AE -32 -KPX C Aacute -33 -KPX C Adieresis -33 -KPX C Aring -33 -KPX C H -13 -KPX C K -13 -KPX C O -13 -KPX C Oacute -13 -KPX C Odieresis -13 -KPX Ccedilla A -37 -KPX D A -40 -KPX D Aacute -40 -KPX D Acircumflex -40 -KPX D Adieresis -40 -KPX D Agrave -40 -KPX D Aring -40 -KPX D Atilde -40 -KPX D J -9 -KPX D T -36 -KPX D V -37 -KPX D W -19 -KPX D X -43 -KPX D Y -55 -KPX F A -64 -KPX F Aacute -64 -KPX F Acircumflex -64 -KPX F Adieresis -64 -KPX F Agrave -64 -KPX F Aring -64 -KPX F Atilde -64 +KPX Aacute c -17 +KPX Aacute comma -4 +KPX Aacute d -15 +KPX Aacute e -23 +KPX Aacute g -17 +KPX Aacute guillemotleft -51 +KPX Aacute guilsinglleft -48 +KPX Aacute hyphen -9 +KPX Aacute o -20 +KPX Aacute period -3 +KPX Aacute q -16 +KPX Aacute quoteright -68 +KPX Aacute t -23 +KPX Aacute u -20 +KPX Aacute v -40 +KPX Aacute w -29 +KPX Aacute y -44 +KPX Acircumflex C -41 +KPX Acircumflex G -41 +KPX Acircumflex O -37 +KPX Acircumflex Q -38 +KPX Acircumflex T -103 +KPX Acircumflex U -42 +KPX Acircumflex V -81 +KPX Acircumflex W -57 +KPX Acircumflex Y -104 +KPX Acircumflex comma -4 +KPX Acircumflex period -2 +KPX Adieresis C -42 +KPX Adieresis G -41 +KPX Adieresis O -38 +KPX Adieresis Q -39 +KPX Adieresis T -103 +KPX Adieresis U -43 +KPX Adieresis V -81 +KPX Adieresis W -57 +KPX Adieresis Y -104 +KPX Adieresis a -16 +KPX Adieresis b -5 +KPX Adieresis c -17 +KPX Adieresis comma -4 +KPX Adieresis d -14 +KPX Adieresis g -17 +KPX Adieresis guillemotleft -51 +KPX Adieresis guilsinglleft -48 +KPX Adieresis hyphen -8 +KPX Adieresis o -19 +KPX Adieresis period -3 +KPX Adieresis q -15 +KPX Adieresis quotedblright -60 +KPX Adieresis quoteright -68 +KPX Adieresis t -22 +KPX Adieresis u -19 +KPX Adieresis v -40 +KPX Adieresis w -29 +KPX Adieresis y -44 +KPX Agrave C -41 +KPX Agrave G -41 +KPX Agrave O -37 +KPX Agrave Q -38 +KPX Agrave T -103 +KPX Agrave U -42 +KPX Agrave V -81 +KPX Agrave W -57 +KPX Agrave Y -104 +KPX Agrave comma -4 +KPX Agrave period -2 +KPX Aring C -41 +KPX Aring G -41 +KPX Aring O -37 +KPX Aring Q -38 +KPX Aring T -103 +KPX Aring U -42 +KPX Aring V -81 +KPX Aring W -57 +KPX Aring Y -104 +KPX Aring a -16 +KPX Aring b -5 +KPX Aring c -16 +KPX Aring comma -4 +KPX Aring d -14 +KPX Aring e -22 +KPX Aring g -17 +KPX Aring guillemotleft -51 +KPX Aring guilsinglleft -47 +KPX Aring hyphen -8 +KPX Aring o -19 +KPX Aring period -2 +KPX Aring q -15 +KPX Aring quotedblright -60 +KPX Aring quoteright -68 +KPX Aring t -22 +KPX Aring u -18 +KPX Aring v -40 +KPX Aring w -29 +KPX Aring y -44 +KPX Atilde C -43 +KPX Atilde G -42 +KPX Atilde O -39 +KPX Atilde Q -40 +KPX Atilde T -103 +KPX Atilde U -44 +KPX Atilde V -81 +KPX Atilde W -57 +KPX Atilde Y -104 +KPX Atilde comma -4 +KPX Atilde period -4 +KPX B A -28 +KPX B AE -29 +KPX B Aacute -28 +KPX B Acircumflex -28 +KPX B Adieresis -28 +KPX B Aring -28 +KPX B Atilde -28 +KPX B O -14 +KPX B OE -11 +KPX B Oacute -14 +KPX B Ocircumflex -14 +KPX B Odieresis -14 +KPX B Ograve -14 +KPX B Oslash -2 +KPX B V -49 +KPX B W -27 +KPX B Y -56 +KPX C A -43 +KPX C AE -44 +KPX C Aacute -43 +KPX C Adieresis -43 +KPX C Aring -43 +KPX C H -22 +KPX C K -20 +KPX C O -18 +KPX C Oacute -18 +KPX C Odieresis -18 +KPX Ccedilla A -44 +KPX D A -50 +KPX D Aacute -50 +KPX D Acircumflex -50 +KPX D Adieresis -50 +KPX D Agrave -50 +KPX D Aring -50 +KPX D Atilde -50 +KPX D J -13 +KPX D T -56 +KPX D V -54 +KPX D W -31 +KPX D X -58 +KPX D Y -74 +KPX F A -78 +KPX F Aacute -78 +KPX F Acircumflex -78 +KPX F Adieresis -78 +KPX F Agrave -78 +KPX F Aring -78 +KPX F Atilde -78 KPX F J -59 -KPX F O -22 -KPX F Odieresis -22 -KPX F a -32 -KPX F aacute -32 -KPX F adieresis -32 -KPX F ae -32 -KPX F aring -32 -KPX F comma -107 -KPX F e -26 -KPX F eacute -26 -KPX F hyphen -18 -KPX F i -15 -KPX F j -15 -KPX F o -26 -KPX F oacute -26 -KPX F odieresis -26 -KPX F oe -24 -KPX F oslash -24 -KPX F period -107 -KPX F r -38 -KPX F u -34 -KPX G A -11 -KPX G AE -9 -KPX G Aacute -11 -KPX G Acircumflex -11 -KPX G Adieresis -11 -KPX G Agrave -11 -KPX G Aring -11 -KPX G Atilde -11 -KPX G T -38 -KPX G V -40 -KPX G W -23 -KPX G Y -58 -KPX J A -30 -KPX J AE -29 -KPX J Adieresis -30 -KPX J Aring -30 -KPX K C -41 -KPX K G -45 -KPX K O -41 -KPX K OE -37 -KPX K Oacute -41 -KPX K Odieresis -41 -KPX K S -37 -KPX K T 15 -KPX K a -15 -KPX K adieresis -15 -KPX K ae -15 -KPX K aring -15 -KPX K e -35 -KPX K hyphen -43 -KPX K o -36 -KPX K oacute -36 -KPX K odieresis -36 -KPX K u -29 -KPX K udieresis -29 -KPX K y -59 -KPX L A 10 -KPX L AE 12 -KPX L Aacute 10 -KPX L Adieresis 10 -KPX L Aring 10 -KPX L C -36 -KPX L Ccedilla -39 -KPX L G -40 -KPX L O -38 -KPX L Oacute -38 -KPX L Ocircumflex -38 -KPX L Odieresis -38 -KPX L Ograve -38 -KPX L Otilde -38 -KPX L S -20 -KPX L T -87 -KPX L U -34 -KPX L Udieresis -34 -KPX L V -87 -KPX L W -58 -KPX L Y -99 -KPX L hyphen -114 -KPX L quotedblright -108 -KPX L quoteright -120 -KPX L u -16 -KPX L udieresis -16 -KPX L y -53 -KPX N A -12 -KPX N AE -10 -KPX N Aacute -12 -KPX N Adieresis -12 -KPX N Aring -12 -KPX N C -6 -KPX N Ccedilla -5 -KPX N G -10 -KPX N O -6 -KPX N Oacute -6 -KPX N Odieresis -6 -KPX N a -8 -KPX N aacute -8 -KPX N adieresis -8 -KPX N ae -8 -KPX N aring -8 -KPX N comma -10 -KPX N e -5 -KPX N eacute -5 -KPX N o -6 -KPX N oacute -6 -KPX N odieresis -6 -KPX N oslash -1 -KPX N period -10 -KPX N u -5 -KPX N udieresis -5 -KPX O A -36 -KPX O AE -36 -KPX O Aacute -36 -KPX O Adieresis -36 -KPX O Aring -36 -KPX O T -34 -KPX O V -34 -KPX O W -16 -KPX O X -39 -KPX O Y -53 -KPX Oacute A -36 -KPX Oacute T -34 -KPX Oacute V -34 -KPX Oacute W -16 -KPX Oacute Y -53 -KPX Ocircumflex T -34 -KPX Ocircumflex V -34 -KPX Ocircumflex Y -53 -KPX Odieresis A -36 -KPX Odieresis T -34 -KPX Odieresis V -34 -KPX Odieresis W -16 -KPX Odieresis X -39 -KPX Odieresis Y -53 -KPX Ograve T -34 -KPX Ograve V -34 -KPX Ograve Y -53 -KPX Oslash A -33 -KPX Otilde T -34 -KPX Otilde V -34 -KPX Otilde Y -53 -KPX P A -70 -KPX P AE -72 -KPX P Aacute -70 -KPX P Adieresis -70 -KPX P Aring -70 -KPX P J -78 -KPX P a -27 -KPX P aacute -27 -KPX P adieresis -27 -KPX P ae -27 -KPX P aring -27 -KPX P comma -126 -KPX P e -30 -KPX P eacute -30 -KPX P hyphen -35 -KPX P o -31 -KPX P oacute -31 -KPX P odieresis -31 -KPX P oe -29 -KPX P oslash -29 -KPX P period -126 -KPX R C -11 -KPX R Ccedilla -10 -KPX R G -15 -KPX R O -11 -KPX R OE -7 -KPX R Oacute -11 -KPX R Odieresis -11 -KPX R T -19 -KPX R U -13 -KPX R Udieresis -13 -KPX R V -33 -KPX R W -17 -KPX R Y -39 -KPX R a -11 -KPX R aacute -11 -KPX R adieresis -11 -KPX R ae -11 -KPX R aring -11 -KPX R e -9 -KPX R eacute -9 -KPX R hyphen 0 -KPX R o -10 -KPX R oacute -10 -KPX R odieresis -10 -KPX R oe -9 -KPX R u -8 -KPX R uacute -9 -KPX R udieresis -9 -KPX R y -10 -KPX S A -22 -KPX S AE -21 -KPX S Aacute -22 -KPX S Adieresis -22 -KPX S Aring -22 -KPX S T -22 -KPX S V -36 -KPX S W -20 -KPX S Y -42 -KPX S t -10 -KPX T A -86 -KPX T AE -84 -KPX T Aacute -86 -KPX T Acircumflex -86 -KPX T Adieresis -86 -KPX T Agrave -86 -KPX T Aring -86 -KPX T Atilde -86 -KPX T C -33 -KPX T G -39 -KPX T J -88 -KPX T O -34 -KPX T OE -28 -KPX T Oacute -34 -KPX T Ocircumflex -34 -KPX T Odieresis -34 -KPX T Ograve -34 -KPX T Oslash -35 -KPX T Otilde -34 -KPX T S -23 -KPX T V 7 -KPX T W 10 -KPX T Y 9 -KPX T a -83 -KPX T ae -83 -KPX T c -76 -KPX T colon -106 -KPX T comma -84 -KPX T e -80 -KPX T g -78 -KPX T guillemotleft -104 -KPX T guilsinglleft -100 -KPX T hyphen -65 -KPX T i -9 -KPX T j -9 -KPX T o -81 -KPX T oslash -76 -KPX T period -84 -KPX T r -81 -KPX T s -78 -KPX T semicolon -102 -KPX T u -79 -KPX T v -87 -KPX T w -85 -KPX T y -88 -KPX U A -37 -KPX U AE -38 -KPX U Aacute -37 -KPX U Acircumflex -37 -KPX U Adieresis -37 -KPX U Aring -37 -KPX U Atilde -37 -KPX U comma -30 -KPX U m -9 -KPX U n -9 -KPX U p -7 -KPX U period -27 -KPX U r -14 -KPX Uacute A -37 -KPX Uacute comma -30 -KPX Uacute m -9 -KPX Uacute n -9 -KPX Uacute p -7 -KPX Uacute period -27 -KPX Uacute r -14 -KPX Ucircumflex A -37 -KPX Udieresis A -37 -KPX Udieresis b -7 -KPX Udieresis comma -30 -KPX Udieresis m -9 -KPX Udieresis n -9 -KPX Udieresis p -7 -KPX Udieresis period -27 -KPX Udieresis r -14 -KPX Ugrave A -37 -KPX V A -63 -KPX V AE -64 -KPX V Aacute -63 -KPX V Acircumflex -63 -KPX V Adieresis -63 -KPX V Agrave -63 -KPX V Aring -63 -KPX V Atilde -63 -KPX V C -36 -KPX V G -39 -KPX V O -35 -KPX V Oacute -35 -KPX V Ocircumflex -35 -KPX V Odieresis -35 -KPX V Ograve -35 -KPX V Oslash -33 -KPX V Otilde -35 -KPX V S -33 -KPX V T 12 -KPX V a -52 -KPX V ae -52 -KPX V colon -48 -KPX V comma -77 -KPX V e -49 -KPX V g -47 -KPX V guillemotleft -72 -KPX V guilsinglleft -68 -KPX V hyphen -34 -KPX V i -10 -KPX V o -51 -KPX V oslash -45 -KPX V period -77 -KPX V r -43 -KPX V semicolon -48 -KPX V u -40 -KPX V y -19 -KPX W A -46 -KPX W AE -47 -KPX W Aacute -46 -KPX W Acircumflex -46 -KPX W Adieresis -46 -KPX W Agrave -46 -KPX W Aring -46 -KPX W Atilde -46 -KPX W C -20 -KPX W G -23 -KPX W O -20 -KPX W Oacute -20 -KPX W Ocircumflex -20 -KPX W Odieresis -20 -KPX W Ograve -20 -KPX W Oslash -17 -KPX W Otilde -20 -KPX W S -25 -KPX W T 13 -KPX W a -32 -KPX W ae -32 -KPX W colon -38 -KPX W comma -50 -KPX W e -29 -KPX W g -27 -KPX W guillemotleft -52 -KPX W guilsinglleft -48 -KPX W hyphen -14 -KPX W i -9 -KPX W o -31 -KPX W oslash -25 -KPX W period -50 -KPX W r -30 -KPX W semicolon -38 -KPX W u -28 -KPX W y -10 -KPX X C -37 -KPX X O -37 -KPX X Odieresis -37 -KPX X Q -37 -KPX X a -20 -KPX X e -40 -KPX X hyphen -45 -KPX X o -41 -KPX X u -35 -KPX X y -50 -KPX Y A -85 -KPX Y AE -86 -KPX Y Aacute -85 -KPX Y Acircumflex -85 -KPX Y Adieresis -85 -KPX Y Agrave -85 -KPX Y Aring -85 -KPX Y Atilde -85 -KPX Y C -48 -KPX Y G -53 -KPX Y O -48 -KPX Y Oacute -48 -KPX Y Ocircumflex -48 -KPX Y Odieresis -48 -KPX Y Ograve -48 -KPX Y Oslash -50 -KPX Y Otilde -48 -KPX Y S -39 -KPX Y T 14 -KPX Y a -78 -KPX Y ae -79 -KPX Y colon -67 -KPX Y comma -95 -KPX Y e -77 -KPX Y g -75 -KPX Y guillemotleft -106 -KPX Y guilsinglleft -102 -KPX Y hyphen -72 -KPX Y i -8 -KPX Y o -78 -KPX Y oslash -72 -KPX Y p -53 -KPX Y period -95 -KPX Y semicolon -67 -KPX Y u -60 -KPX Y v -38 -KPX Z v -32 -KPX Z y -33 -KPX a j -9 -KPX a quoteright -13 -KPX a v -21 +KPX F O -30 +KPX F Odieresis -30 +KPX F a -45 +KPX F aacute -45 +KPX F adieresis -45 +KPX F ae -41 +KPX F aring -45 +KPX F comma -113 +KPX F e -33 +KPX F eacute -33 +KPX F hyphen -20 +KPX F i -19 +KPX F j -19 +KPX F o -30 +KPX F oacute -30 +KPX F odieresis -30 +KPX F oe -33 +KPX F oslash -30 +KPX F period -113 +KPX F r -44 +KPX F u -42 +KPX G A -14 +KPX G AE -11 +KPX G Aacute -14 +KPX G Acircumflex -14 +KPX G Adieresis -14 +KPX G Agrave -14 +KPX G Aring -14 +KPX G Atilde -14 +KPX G T -53 +KPX G V -53 +KPX G W -31 +KPX G Y -72 +KPX J A -39 +KPX J AE -39 +KPX J Adieresis -39 +KPX J Aring -39 +KPX K C -56 +KPX K G -57 +KPX K O -53 +KPX K OE -49 +KPX K Oacute -53 +KPX K Odieresis -53 +KPX K S -48 +KPX K T 14 +KPX K a -23 +KPX K adieresis -23 +KPX K ae -20 +KPX K aring -23 +KPX K e -46 +KPX K hyphen -53 +KPX K o -42 +KPX K oacute -42 +KPX K odieresis -42 +KPX K u -32 +KPX K udieresis -32 +KPX K y -76 +KPX L A 8 +KPX L AE 11 +KPX L Aacute 8 +KPX L Adieresis 8 +KPX L Aring 8 +KPX L C -52 +KPX L Ccedilla -51 +KPX L G -53 +KPX L O -51 +KPX L Oacute -51 +KPX L Ocircumflex -51 +KPX L Odieresis -51 +KPX L Ograve -51 +KPX L Otilde -51 +KPX L S -28 +KPX L T -112 +KPX L U -46 +KPX L Udieresis -46 +KPX L V -115 +KPX L W -77 +KPX L Y -128 +KPX L hyphen -140 +KPX L quotedblright -145 +KPX L quoteright -153 +KPX L u -17 +KPX L udieresis -17 +KPX L y -68 +KPX N A -19 +KPX N AE -16 +KPX N Aacute -19 +KPX N Adieresis -19 +KPX N Aring -19 +KPX N C -15 +KPX N Ccedilla -14 +KPX N G -14 +KPX N O -11 +KPX N Oacute -11 +KPX N Odieresis -11 +KPX N a -17 +KPX N aacute -17 +KPX N adieresis -17 +KPX N ae -13 +KPX N aring -17 +KPX N comma -15 +KPX N e -11 +KPX N eacute -11 +KPX N o -8 +KPX N oacute -8 +KPX N odieresis -8 +KPX N oslash -4 +KPX N period -15 +KPX N u -8 +KPX N udieresis -9 +KPX O A -43 +KPX O AE -47 +KPX O Aacute -43 +KPX O Adieresis -43 +KPX O Aring -43 +KPX O T -54 +KPX O V -48 +KPX O W -25 +KPX O X -52 +KPX O Y -71 +KPX Oacute A -43 +KPX Oacute T -54 +KPX Oacute V -48 +KPX Oacute W -25 +KPX Oacute Y -71 +KPX Ocircumflex T -54 +KPX Ocircumflex V -48 +KPX Ocircumflex Y -71 +KPX Odieresis A -43 +KPX Odieresis T -54 +KPX Odieresis V -48 +KPX Odieresis W -25 +KPX Odieresis X -52 +KPX Odieresis Y -71 +KPX Ograve T -54 +KPX Ograve V -48 +KPX Ograve Y -71 +KPX Oslash A -47 +KPX Otilde T -54 +KPX Otilde V -48 +KPX Otilde Y -71 +KPX P A -86 +KPX P AE -93 +KPX P Aacute -86 +KPX P Adieresis -86 +KPX P Aring -86 +KPX P J -85 +KPX P a -39 +KPX P aacute -39 +KPX P adieresis -39 +KPX P ae -35 +KPX P aring -39 +KPX P comma -138 +KPX P e -38 +KPX P eacute -38 +KPX P hyphen -45 +KPX P o -34 +KPX P oacute -34 +KPX P odieresis -34 +KPX P oe -38 +KPX P oslash -35 +KPX P period -138 +KPX R C -21 +KPX R Ccedilla -21 +KPX R G -21 +KPX R O -17 +KPX R OE -14 +KPX R Oacute -17 +KPX R Odieresis -17 +KPX R T -33 +KPX R U -21 +KPX R Udieresis -21 +KPX R V -49 +KPX R W -27 +KPX R Y -54 +KPX R a -21 +KPX R aacute -21 +KPX R adieresis -21 +KPX R ae -17 +KPX R aring -21 +KPX R e -16 +KPX R eacute -16 +KPX R hyphen -4 +KPX R o -13 +KPX R oacute -13 +KPX R odieresis -13 +KPX R oe -16 +KPX R u -13 +KPX R uacute -14 +KPX R udieresis -14 +KPX R y -16 +KPX S A -31 +KPX S AE -31 +KPX S Aacute -31 +KPX S Adieresis -31 +KPX S Aring -31 +KPX S T -38 +KPX S V -52 +KPX S W -31 +KPX S Y -58 +KPX S t -11 +KPX T A -104 +KPX T AE -106 +KPX T Aacute -104 +KPX T Acircumflex -104 +KPX T Adieresis -104 +KPX T Agrave -104 +KPX T Aring -104 +KPX T Atilde -104 +KPX T C -53 +KPX T G -55 +KPX T J -108 +KPX T O -50 +KPX T OE -44 +KPX T Oacute -50 +KPX T Ocircumflex -50 +KPX T Odieresis -50 +KPX T Ograve -50 +KPX T Oslash -42 +KPX T Otilde -50 +KPX T S -32 +KPX T V 2 +KPX T W 7 +KPX T Y 10 +KPX T a -107 +KPX T ae -104 +KPX T c -96 +KPX T colon -152 +KPX T comma -105 +KPX T e -102 +KPX T g -94 +KPX T guillemotleft -126 +KPX T guilsinglleft -123 +KPX T hyphen -82 +KPX T i -12 +KPX T j -12 +KPX T o -99 +KPX T oslash -94 +KPX T period -105 +KPX T r -98 +KPX T s -98 +KPX T semicolon -140 +KPX T u -98 +KPX T v -106 +KPX T w -103 +KPX T y -110 +KPX U A -45 +KPX U AE -48 +KPX U Aacute -45 +KPX U Acircumflex -45 +KPX U Adieresis -45 +KPX U Aring -45 +KPX U Atilde -45 +KPX U comma -35 +KPX U m -17 +KPX U n -16 +KPX U p -8 +KPX U period -32 +KPX U r -16 +KPX Uacute A -45 +KPX Uacute comma -35 +KPX Uacute m -17 +KPX Uacute n -16 +KPX Uacute p -8 +KPX Uacute period -32 +KPX Uacute r -16 +KPX Ucircumflex A -45 +KPX Udieresis A -44 +KPX Udieresis b -8 +KPX Udieresis comma -35 +KPX Udieresis m -17 +KPX Udieresis n -16 +KPX Udieresis p -8 +KPX Udieresis period -32 +KPX Udieresis r -16 +KPX Ugrave A -45 +KPX V A -77 +KPX V AE -84 +KPX V Aacute -77 +KPX V Acircumflex -77 +KPX V Adieresis -77 +KPX V Agrave -77 +KPX V Aring -77 +KPX V Atilde -77 +KPX V C -50 +KPX V G -50 +KPX V O -46 +KPX V Oacute -46 +KPX V Ocircumflex -46 +KPX V Odieresis -46 +KPX V Ograve -46 +KPX V Oslash -34 +KPX V Otilde -46 +KPX V S -44 +KPX V T 7 +KPX V a -71 +KPX V ae -66 +KPX V colon -76 +KPX V comma -94 +KPX V e -64 +KPX V g -57 +KPX V guillemotleft -88 +KPX V guilsinglleft -84 +KPX V hyphen -44 +KPX V i -14 +KPX V o -61 +KPX V oslash -57 +KPX V period -94 +KPX V r -51 +KPX V semicolon -75 +KPX V u -52 +KPX V y -28 +KPX W A -56 +KPX W AE -62 +KPX W Aacute -56 +KPX W Acircumflex -56 +KPX W Adieresis -56 +KPX W Agrave -56 +KPX W Aring -56 +KPX W Atilde -56 +KPX W C -30 +KPX W G -30 +KPX W O -26 +KPX W Oacute -26 +KPX W Ocircumflex -26 +KPX W Odieresis -26 +KPX W Ograve -26 +KPX W Oslash -14 +KPX W Otilde -26 +KPX W S -31 +KPX W T 11 +KPX W a -46 +KPX W ae -42 +KPX W colon -62 +KPX W comma -62 +KPX W e -39 +KPX W g -32 +KPX W guillemotleft -63 +KPX W guilsinglleft -60 +KPX W hyphen -19 +KPX W i -10 +KPX W o -36 +KPX W oslash -32 +KPX W period -62 +KPX W r -36 +KPX W semicolon -62 +KPX W u -36 +KPX W y -15 +KPX X C -53 +KPX X O -50 +KPX X Odieresis -50 +KPX X Q -51 +KPX X a -27 +KPX X e -51 +KPX X hyphen -57 +KPX X o -46 +KPX X u -36 +KPX X y -67 +KPX Y A -102 +KPX Y AE -108 +KPX Y Aacute -102 +KPX Y Acircumflex -102 +KPX Y Adieresis -102 +KPX Y Agrave -102 +KPX Y Aring -102 +KPX Y Atilde -102 +KPX Y C -68 +KPX Y G -69 +KPX Y O -64 +KPX Y Oacute -64 +KPX Y Ocircumflex -64 +KPX Y Odieresis -64 +KPX Y Ograve -64 +KPX Y Oslash -55 +KPX Y Otilde -64 +KPX Y S -49 +KPX Y T 15 +KPX Y a -100 +KPX Y ae -95 +KPX Y colon -97 +KPX Y comma -117 +KPX Y e -97 +KPX Y g -89 +KPX Y guillemotleft -128 +KPX Y guilsinglleft -124 +KPX Y hyphen -89 +KPX Y i -6 +KPX Y o -93 +KPX Y oslash -89 +KPX Y p -63 +KPX Y period -117 +KPX Y semicolon -97 +KPX Y u -73 +KPX Y v -48 +KPX Z v -44 +KPX Z y -44 +KPX a j -10 +KPX a quoteright -23 +KPX a v -26 KPX a w -16 -KPX a y -24 -KPX aacute v -22 -KPX aacute w -17 -KPX aacute y -24 -KPX adieresis v -21 +KPX a y -33 +KPX aacute v -26 +KPX aacute w -16 +KPX aacute y -33 +KPX adieresis v -26 KPX adieresis w -16 -KPX adieresis y -24 -KPX ae v -18 -KPX ae w -13 -KPX ae y -23 -KPX agrave v -21 +KPX adieresis y -33 +KPX ae v -26 +KPX ae w -15 +KPX ae y -32 +KPX agrave v -26 KPX agrave w -16 -KPX agrave y -24 -KPX aring v -21 +KPX agrave y -33 +KPX aring v -26 KPX aring w -16 -KPX aring y -24 -KPX b v -15 -KPX b w -9 -KPX b y -19 -KPX c h -3 -KPX c k -4 -KPX comma one -88 -KPX comma quotedblright -27 -KPX comma quoteright -38 -KPX e quoteright -8 -KPX e t -12 -KPX e v -18 -KPX e w -12 -KPX e x -22 -KPX e y -22 -KPX eacute v -18 -KPX eacute w -13 -KPX eacute y -22 -KPX ecircumflex v -18 -KPX ecircumflex w -12 -KPX ecircumflex y -22 -KPX eight four -1 -KPX eight one -43 -KPX eight seven -24 -KPX f a -14 -KPX f aacute -14 -KPX f adieresis -14 -KPX f ae -14 -KPX f aring -14 -KPX f e -16 -KPX f eacute -16 -KPX f f 11 +KPX aring y -33 +KPX b v -21 +KPX b w -10 +KPX b y -28 +KPX c h -7 +KPX c k -1 +KPX comma one -105 +KPX comma quotedblright -47 +KPX comma quoteright -55 +KPX e quoteright -20 +KPX e t -16 +KPX e v -26 +KPX e w -16 +KPX e x -35 +KPX e y -33 +KPX eacute v -26 +KPX eacute w -16 +KPX eacute y -33 +KPX ecircumflex v -26 +KPX ecircumflex w -16 +KPX ecircumflex y -33 +KPX eight four -6 +KPX eight one -55 +KPX eight seven -43 +KPX f a -20 +KPX f aacute -20 +KPX f adieresis -20 +KPX f ae -15 +KPX f aring -20 +KPX f e -21 +KPX f eacute -21 +KPX f f 12 KPX f i -10 -KPX f j -10 -KPX f l -10 -KPX f o -17 -KPX f oacute -17 -KPX f odieresis -17 -KPX f oe -15 -KPX f oslash -11 -KPX f quoteright 1 -KPX f s -10 -KPX f t 11 -KPX five four -3 -KPX five one -63 -KPX five seven -23 -KPX four four 1 -KPX four one -72 -KPX four seven -47 -KPX g a -5 -KPX g adieresis -5 -KPX g ae -5 -KPX g aring -5 -KPX g e -3 -KPX g eacute -3 -KPX g l 0 -KPX g oacute -3 -KPX g odieresis -3 -KPX g r -3 -KPX guillemotright A -47 -KPX guillemotright AE -47 -KPX guillemotright Aacute -47 -KPX guillemotright Adieresis -47 -KPX guillemotright Aring -47 -KPX guillemotright T -104 -KPX guillemotright V -72 -KPX guillemotright W -50 -KPX guillemotright Y -107 -KPX guilsinglright A -43 -KPX guilsinglright AE -44 -KPX guilsinglright Aacute -43 -KPX guilsinglright Adieresis -43 -KPX guilsinglright Aring -43 -KPX guilsinglright T -100 -KPX guilsinglright V -68 -KPX guilsinglright W -46 -KPX guilsinglright Y -103 -KPX h quoteright -7 -KPX h y -18 -KPX hyphen A -8 -KPX hyphen AE -8 -KPX hyphen Aacute -8 -KPX hyphen Adieresis -8 -KPX hyphen Aring -8 -KPX hyphen T -65 -KPX hyphen V -34 -KPX hyphen W -13 -KPX hyphen Y -72 -KPX i T -9 -KPX i j -3 -KPX k a -12 -KPX k aacute -12 -KPX k adieresis -12 +KPX f j -11 +KPX f l -12 +KPX f o -18 +KPX f oacute -18 +KPX f odieresis -18 +KPX f oe -20 +KPX f oslash -16 +KPX f quoteright -8 +KPX f s -8 +KPX f t 16 +KPX five four -7 +KPX five one -83 +KPX five seven -32 +KPX four four -3 +KPX four one -88 +KPX four seven -65 +KPX g a -17 +KPX g adieresis -17 +KPX g ae -13 +KPX g aring -17 +KPX g e -11 +KPX g eacute -11 +KPX g l -8 +KPX g oacute -8 +KPX g odieresis -8 +KPX g r -9 +KPX guillemotright A -58 +KPX guillemotright AE -62 +KPX guillemotright Aacute -58 +KPX guillemotright Adieresis -58 +KPX guillemotright Aring -58 +KPX guillemotright T -132 +KPX guillemotright V -96 +KPX guillemotright W -68 +KPX guillemotright Y -137 +KPX guilsinglright A -52 +KPX guilsinglright AE -56 +KPX guilsinglright Aacute -52 +KPX guilsinglright Adieresis -52 +KPX guilsinglright Aring -52 +KPX guilsinglright T -126 +KPX guilsinglright V -90 +KPX guilsinglright W -62 +KPX guilsinglright Y -131 +KPX h quoteright -19 +KPX h y -31 +KPX hyphen A -12 +KPX hyphen AE -17 +KPX hyphen Aacute -12 +KPX hyphen Adieresis -12 +KPX hyphen Aring -12 +KPX hyphen T -86 +KPX hyphen V -51 +KPX hyphen W -24 +KPX hyphen Y -97 +KPX i T -16 +KPX i j -10 +KPX k a -14 +KPX k aacute -14 +KPX k adieresis -14 KPX k ae -12 -KPX k aring -12 -KPX k comma -5 -KPX k e -21 -KPX k eacute -21 -KPX k g -20 -KPX k hyphen -35 -KPX k o -23 -KPX k oacute -23 -KPX k odieresis -23 -KPX k period -4 -KPX k s -16 -KPX k u -8 -KPX k udieresis -8 -KPX l v -9 -KPX l y -10 -KPX m p 0 -KPX m v -15 -KPX m w -10 -KPX m y -18 -KPX n T -79 -KPX n p -1 -KPX n quoteright -7 -KPX n v -16 -KPX n w -11 -KPX n y -18 -KPX nine four -6 -KPX nine one -40 -KPX nine seven -27 -KPX o T -80 -KPX o quoteright -10 -KPX o t -10 -KPX o v -16 -KPX o w -10 -KPX o x -20 -KPX o y -20 -KPX oacute v -16 -KPX oacute w -10 -KPX oacute y -20 -KPX ocircumflex t -10 -KPX odieresis t -10 -KPX odieresis v -16 -KPX odieresis w -10 -KPX odieresis x -20 -KPX odieresis y -20 -KPX ograve v -16 -KPX ograve w -10 -KPX ograve y -20 -KPX one comma -59 -KPX one eight -53 -KPX one five -53 -KPX one four -65 -KPX one nine -54 -KPX one one -96 -KPX one period -59 -KPX one seven -71 -KPX one six -51 -KPX one three -57 -KPX one two -57 -KPX one zero -51 -KPX p t -9 -KPX p y -19 -KPX period one -88 -KPX period quotedblright -28 -KPX period quoteright -39 -KPX q c 0 -KPX q u -3 -KPX quotedblbase A 18 -KPX quotedblbase AE 19 -KPX quotedblbase T -65 -KPX quotedblbase V -58 -KPX quotedblbase W -30 -KPX quotedblbase Y -76 -KPX quotedblleft A -46 -KPX quotedblleft AE -49 -KPX quotedblleft Aacute -46 -KPX quotedblleft Adieresis -46 -KPX quotedblleft Aring -46 -KPX quotedblleft T 9 -KPX quotedblleft V 18 -KPX quotedblleft W 26 -KPX quotedblleft Y 7 -KPX quotedblright A -54 -KPX quotedblright AE -56 -KPX quotedblright Aacute -54 -KPX quotedblright Adieresis -54 -KPX quotedblright Aring -54 -KPX quotedblright T 3 -KPX quotedblright V 11 -KPX quotedblright W 18 -KPX quotedblright Y 0 -KPX quoteleft A -57 -KPX quoteleft AE -60 -KPX quoteleft Aacute -57 -KPX quoteleft Adieresis -57 -KPX quoteleft Aring -57 -KPX quoteleft T -2 -KPX quoteleft V 7 -KPX quoteleft W 15 -KPX quoteleft Y -4 -KPX quoteright A -65 -KPX quoteright AE -67 -KPX quoteright Aacute -65 -KPX quoteright Adieresis -65 -KPX quoteright Aring -65 -KPX quoteright comma -52 -KPX quoteright d -20 -KPX quoteright o -29 -KPX quoteright period -52 -KPX quoteright r -19 -KPX quoteright s -17 -KPX quoteright t -9 -KPX quoteright v -3 -KPX quoteright w -3 -KPX quoteright y -4 -KPX r a -9 -KPX r aacute -9 -KPX r acircumflex -9 -KPX r adieresis -9 -KPX r ae -9 -KPX r agrave -9 -KPX r aring -9 +KPX k aring -14 +KPX k comma -13 +KPX k e -33 +KPX k eacute -33 +KPX k g -26 +KPX k hyphen -49 +KPX k o -30 +KPX k oacute -30 +KPX k odieresis -30 +KPX k period -13 +KPX k s -14 +KPX k u -22 +KPX k udieresis -16 +KPX l v -11 +KPX l y -15 +KPX m p -3 +KPX m v -24 +KPX m w -14 +KPX m y -30 +KPX n T -103 +KPX n p -3 +KPX n quoteright -19 +KPX n v -24 +KPX n w -14 +KPX n y -31 +KPX nine four -12 +KPX nine one -55 +KPX nine seven -50 +KPX o T -106 +KPX o quoteright -23 +KPX o t -17 +KPX o v -27 +KPX o w -16 +KPX o x -35 +KPX o y -34 +KPX oacute v -27 +KPX oacute w -16 +KPX oacute y -34 +KPX ocircumflex t -17 +KPX odieresis t -17 +KPX odieresis v -27 +KPX odieresis w -16 +KPX odieresis x -35 +KPX odieresis y -34 +KPX ograve v -27 +KPX ograve w -16 +KPX ograve y -34 +KPX one comma -82 +KPX one eight -73 +KPX one five -72 +KPX one four -88 +KPX one nine -71 +KPX one one -125 +KPX one period -82 +KPX one seven -98 +KPX one six -71 +KPX one three -75 +KPX one two -78 +KPX one zero -71 +KPX p t -10 +KPX p y -28 +KPX period one -106 +KPX period quotedblright -48 +KPX period quoteright -56 +KPX q c -2 +KPX q u -5 +KPX quotedblbase A 21 +KPX quotedblbase AE 21 +KPX quotedblbase T -80 +KPX quotedblbase V -74 +KPX quotedblbase W -39 +KPX quotedblbase Y -96 +KPX quotedblleft A -58 +KPX quotedblleft AE -70 +KPX quotedblleft Aacute -58 +KPX quotedblleft Adieresis -58 +KPX quotedblleft Aring -58 +KPX quotedblleft T 1 +KPX quotedblleft V 10 +KPX quotedblleft W 22 +KPX quotedblleft Y -1 +KPX quotedblright A -60 +KPX quotedblright AE -72 +KPX quotedblright Aacute -60 +KPX quotedblright Adieresis -60 +KPX quotedblright Aring -60 +KPX quotedblright T 2 +KPX quotedblright V 9 +KPX quotedblright W 21 +KPX quotedblright Y -2 +KPX quoteleft A -74 +KPX quoteleft AE -86 +KPX quoteleft Aacute -74 +KPX quoteleft Adieresis -74 +KPX quoteleft Aring -74 +KPX quoteleft T -14 +KPX quoteleft V -5 +KPX quoteleft W 6 +KPX quoteleft Y -17 +KPX quoteright A -76 +KPX quoteright AE -88 +KPX quoteright Aacute -76 +KPX quoteright Adieresis -76 +KPX quoteright Aring -76 +KPX quoteright comma -68 +KPX quoteright d -25 +KPX quoteright o -31 +KPX quoteright period -68 +KPX quoteright r -24 +KPX quoteright s -23 +KPX quoteright t -14 +KPX quoteright v -10 +KPX quoteright w -5 +KPX quoteright y -14 +KPX r a -16 +KPX r aacute -16 +KPX r acircumflex -16 +KPX r adieresis -16 +KPX r ae -11 +KPX r agrave -16 +KPX r aring -16 KPX r c -11 -KPX r ccedilla -8 -KPX r colon -12 -KPX r comma -52 -KPX r d -9 -KPX r e -15 -KPX r eacute -15 -KPX r ecircumflex -15 -KPX r egrave -15 +KPX r ccedilla -11 +KPX r colon -31 +KPX r comma -77 +KPX r d -8 +KPX r e -17 +KPX r eacute -17 +KPX r ecircumflex -17 +KPX r egrave -17 KPX r f 17 KPX r g -8 -KPX r h -4 -KPX r hyphen -34 -KPX r i -5 -KPX r j -5 -KPX r k -5 -KPX r l -5 -KPX r m -4 -KPX r n -4 -KPX r o -18 -KPX r oacute -18 -KPX r ocircumflex -18 -KPX r odieresis -18 -KPX r oe -15 -KPX r ograve -18 -KPX r oslash -15 -KPX r p -1 -KPX r period -52 -KPX r q -9 -KPX r quoteright 3 -KPX r r -9 +KPX r h -8 +KPX r hyphen -54 +KPX r i -6 +KPX r j -6 +KPX r k -2 +KPX r l -7 +KPX r m -9 +KPX r n -8 +KPX r o -14 +KPX r oacute -14 +KPX r ocircumflex -14 +KPX r odieresis -14 +KPX r oe -16 +KPX r ograve -14 +KPX r oslash -14 +KPX r p 0 +KPX r period -77 +KPX r q -10 +KPX r quoteright -6 +KPX r r -8 KPX r s -4 -KPX r semicolon -12 -KPX r t 17 -KPX r u -5 -KPX r v 17 -KPX r w 15 -KPX r x 12 -KPX r y 16 +KPX r semicolon -30 +KPX r t 21 +KPX r u -7 +KPX r v 18 +KPX r w 21 +KPX r x 9 +KPX r y 15 KPX r z 0 -KPX s quoteright -6 -KPX s t -11 -KPX seven colon -55 -KPX seven comma -99 -KPX seven eight -24 -KPX seven five -30 -KPX seven four -77 -KPX seven one -42 -KPX seven period -99 -KPX seven seven -3 -KPX seven six -32 -KPX seven three -22 -KPX seven two -22 -KPX six four -1 -KPX six one -39 -KPX six seven -21 -KPX t S -14 -KPX t a -5 -KPX t aacute -5 -KPX t adieresis -5 -KPX t ae -5 -KPX t aring -5 -KPX t colon -19 -KPX t e -12 -KPX t eacute -12 -KPX t h -6 -KPX t o -13 -KPX t oacute -13 -KPX t odieresis -13 -KPX t quoteright 2 -KPX t semicolon -19 -KPX three four 0 -KPX three one -41 -KPX three seven -23 -KPX two four -46 -KPX two one -37 -KPX two seven -21 -KPX u quoteright 0 -KPX v a -20 -KPX v aacute -20 -KPX v acircumflex -20 -KPX v adieresis -20 -KPX v ae -20 -KPX v agrave -20 -KPX v aring -20 -KPX v atilde -20 -KPX v c -15 -KPX v colon -14 -KPX v comma -54 -KPX v e -19 -KPX v eacute -19 -KPX v ecircumflex -19 -KPX v egrave -19 -KPX v g -17 -KPX v hyphen -7 -KPX v l -7 -KPX v o -20 -KPX v oacute -20 -KPX v odieresis -20 -KPX v ograve -20 -KPX v oslash -16 -KPX v period -54 -KPX v s -15 -KPX v semicolon -14 -KPX w a -16 -KPX w aacute -16 -KPX w acircumflex -16 -KPX w adieresis -16 -KPX w ae -16 -KPX w agrave -16 -KPX w aring -16 -KPX w atilde -16 -KPX w c -8 -KPX w colon -16 -KPX w comma -40 -KPX w e -12 -KPX w eacute -12 -KPX w ecircumflex -12 -KPX w egrave -12 -KPX w g -10 -KPX w hyphen 0 -KPX w l -9 -KPX w o -13 -KPX w oacute -13 -KPX w odieresis -13 -KPX w ograve -13 -KPX w oslash -8 -KPX w period -40 -KPX w s -11 -KPX w semicolon -16 -KPX x a -17 -KPX x c -16 -KPX x e -20 -KPX x eacute -20 -KPX x o -21 -KPX x q -17 -KPX y a -21 -KPX y aacute -21 -KPX y acircumflex -21 -KPX y adieresis -21 -KPX y ae -21 -KPX y agrave -21 -KPX y aring -21 -KPX y atilde -21 -KPX y c -16 -KPX y colon -15 -KPX y comma -54 -KPX y e -20 -KPX y eacute -20 -KPX y ecircumflex -20 -KPX y egrave -20 -KPX y g -18 -KPX y hyphen -6 -KPX y l -8 -KPX y o -21 -KPX y oacute -21 -KPX y odieresis -21 -KPX y ograve -21 -KPX y oslash -16 -KPX y period -53 -KPX y s -16 -KPX y semicolon -15 -KPX zero four -2 -KPX zero one -40 -KPX zero seven -28 +KPX s quoteright -24 +KPX s t -15 +KPX seven colon -84 +KPX seven comma -123 +KPX seven eight -34 +KPX seven five -37 +KPX seven four -95 +KPX seven one -58 +KPX seven period -123 +KPX seven seven -11 +KPX seven six -44 +KPX seven three -29 +KPX seven two -31 +KPX six four -7 +KPX six one -52 +KPX six seven -40 +KPX t S -17 +KPX t a -10 +KPX t aacute -10 +KPX t adieresis -10 +KPX t ae -7 +KPX t aring -10 +KPX t colon -37 +KPX t e -22 +KPX t eacute -22 +KPX t h -14 +KPX t o -19 +KPX t oacute -19 +KPX t odieresis -19 +KPX t quoteright -7 +KPX t semicolon -36 +KPX three four -9 +KPX three one -57 +KPX three seven -45 +KPX two four -43 +KPX two one -45 +KPX two seven -38 +KPX u quoteright -14 +KPX v a -30 +KPX v aacute -30 +KPX v acircumflex -30 +KPX v adieresis -30 +KPX v ae -25 +KPX v agrave -30 +KPX v aring -30 +KPX v atilde -30 +KPX v c -22 +KPX v colon -32 +KPX v comma -76 +KPX v e -29 +KPX v eacute -29 +KPX v ecircumflex -29 +KPX v egrave -29 +KPX v g -20 +KPX v hyphen -19 +KPX v l -8 +KPX v o -25 +KPX v oacute -25 +KPX v odieresis -25 +KPX v ograve -25 +KPX v oslash -25 +KPX v period -76 +KPX v s -17 +KPX v semicolon -31 +KPX w a -26 +KPX w aacute -26 +KPX w acircumflex -26 +KPX w adieresis -26 +KPX w ae -22 +KPX w agrave -26 +KPX w aring -26 +KPX w atilde -26 +KPX w c -14 +KPX w colon -32 +KPX w comma -57 +KPX w e -20 +KPX w eacute -20 +KPX w ecircumflex -20 +KPX w egrave -20 +KPX w g -13 +KPX w hyphen -8 +KPX w l -8 +KPX w o -17 +KPX w oacute -17 +KPX w odieresis -17 +KPX w ograve -17 +KPX w oslash -14 +KPX w period -57 +KPX w s -14 +KPX w semicolon -31 +KPX x a -30 +KPX x c -30 +KPX x e -36 +KPX x eacute -36 +KPX x o -33 +KPX x q -28 +KPX y a -36 +KPX y aacute -36 +KPX y acircumflex -36 +KPX y adieresis -36 +KPX y ae -31 +KPX y agrave -36 +KPX y aring -36 +KPX y atilde -36 +KPX y c -28 +KPX y colon -40 +KPX y comma -80 +KPX y e -35 +KPX y eacute -35 +KPX y ecircumflex -35 +KPX y egrave -35 +KPX y g -26 +KPX y hyphen -24 +KPX y l -14 +KPX y o -31 +KPX y oacute -31 +KPX y odieresis -31 +KPX y ograve -31 +KPX y oslash -30 +KPX y period -80 +KPX y s -23 +KPX y semicolon -40 +KPX zero four -11 +KPX zero one -56 +KPX zero seven -50 EndKernPairs EndKernData EndFontMetrics diff --git a/misc/gs_afm/TimesBo.afm b/misc/gs_afm/TimesBo.afm index 1947d3ab1d..8931279b60 100644 --- a/misc/gs_afm/TimesBo.afm +++ b/misc/gs_afm/TimesBo.afm @@ -1,7 +1,7 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 11/17/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. FontName NimbusRomNo9L-Medi FullName Nimbus Roman No9 L Medium FamilyName Nimbus Roman No9 L @@ -10,15 +10,15 @@ ItalicAngle 0.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -168 -218 1000 948 +FontBBox -168 -341 1000 960 CapHeight 676 XHeight 461 Descender -205 Ascender 676 -StartCharMetrics 232 +StartCharMetrics 316 C 32 ; WX 250 ; N space ; B 125 0 125 0 ; C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ; C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ; @@ -168,86 +168,170 @@ C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ; C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ; C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ; C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ; -C -1 ; WX 722 ; N Yacute ; B 15 0 699 923 ; -C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ; -C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ; -C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ; -C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 876 ; -C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ; -C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ; -C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ; C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 876 ; -C -1 ; WX 250 ; N middot ; B 41 248 210 417 ; -C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ; -C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ; -C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ; -C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ; +C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ; +C -1 ; WX 556 ; N Scedilla ; B 35 -218 513 692 ; +C -1 ; WX 667 ; N Tcaron ; B 31 0 636 914 ; C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ; +C -1 ; WX 722 ; N Rcaron ; B 26 0 715 914 ; +C -1 ; WX 722 ; N Racute ; B 26 0 715 923 ; +C -1 ; WX 556 ; N Sacute ; B 35 -19 513 923 ; C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ; -C -1 ; WX 333 ; N sfthyphen ; B 44 171 287 287 ; -C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ; +C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 35 -19 743 923 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 16 -19 701 923 ; +C -1 ; WX 722 ; N Yacute ; B 15 0 699 923 ; +C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ; +C -1 ; WX 722 ; N Dcroat ; B 6 0 690 676 ; +C -1 ; WX 667 ; N Zacute ; B 28 0 634 923 ; +C -1 ; WX 722 ; N Uring ; B 16 -19 701 960 ; +C -1 ; WX 500 ; N gbreve ; B 28 -206 483 691 ; +C -1 ; WX 444 ; N eogonek ; B 25 -173 444 473 ; +C -1 ; WX 444 ; N edotaccent ; B 25 -14 426 666 ; +C -1 ; WX 444 ; N ecaron ; B 25 -14 426 704 ; +C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ; +C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ; +C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ; +C -1 ; WX 444 ; N edieresis ; B 25 -14 426 666 ; +C -1 ; WX 665 ; N dcaron ; B 25 -14 665 691 ; +C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ; +C -1 ; WX 444 ; N ccaron ; B 25 -14 430 704 ; +C -1 ; WX 444 ; N cacute ; B 25 -14 430 713 ; +C -1 ; WX 500 ; N aogonek ; B 25 -173 500 473 ; C -1 ; WX 500 ; N aring ; B 25 -14 488 750 ; +C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ; +C -1 ; WX 500 ; N abreve ; B 25 -14 488 691 ; +C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ; +C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ; +C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ; C -1 ; WX 500 ; N adieresis ; B 25 -14 488 666 ; +C -1 ; WX 722 ; N Uogonek ; B 16 -173 701 676 ; +C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ; +C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ; +C -1 ; WX 556 ; N udieresis ; B 16 -14 537 666 ; +C -1 ; WX 400 ; N tcaron ; B 20 -12 400 691 ; +C -1 ; WX 389 ; N scommaaccent ; B 25 -341 361 473 ; +C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ; +C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ; +C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ; +C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ; +C -1 ; WX 667 ; N Zdotaccent ; B 28 0 634 876 ; +C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ; +C -1 ; WX 722 ; N Amacron ; B 9 0 689 847 ; +C -1 ; WX 389 ; N sacute ; B 25 -14 361 713 ; +C -1 ; WX 667 ; N Tcommaaccent ; B 31 -341 636 676 ; +C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 876 ; +C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ; +C -1 ; WX 667 ; N Emacron ; B 16 0 641 847 ; C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ; -C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ; +C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ; C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 876 ; C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ; -C -1 ; WX 444 ; N edieresis ; B 25 -14 426 666 ; -C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ; -C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ; +C -1 ; WX 722 ; N Ncaron ; B 16 -18 701 914 ; +C -1 ; WX 722 ; N Nacute ; B 16 -18 701 923 ; +C -1 ; WX 667 ; N Lcaron ; B 19 0 638 691 ; +C -1 ; WX 667 ; N Lacute ; B 19 0 638 923 ; +C -1 ; WX 389 ; N Idotaccent ; B 20 0 370 876 ; +C -1 ; WX 444 ; N racute ; B 29 0 434 713 ; C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 25 -14 509 713 ; +C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ; +C -1 ; WX 500 ; N Euro ; B -36 -24 478 671 ; +C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ; +C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ; +C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ; +C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ; C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ; C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ; +C -1 ; WX 389 ; N Imacron ; B 20 0 370 847 ; +C -1 ; WX 389 ; N Iogonek ; B 20 -173 505 676 ; C -1 ; WX 389 ; N Idieresis ; B 20 0 370 876 ; -C -1 ; WX 400 ; N degree ; B 57 402 343 688 ; +C -1 ; WX 778 ; N Gbreve ; B 37 -19 755 901 ; +C -1 ; WX 722 ; N Umacron ; B 16 -19 701 847 ; +C -1 ; WX 778 ; N Kcommaaccent ; B 30 -341 769 676 ; +C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ; +C -1 ; WX 556 ; N Scommaaccent ; B 35 -341 513 692 ; +C -1 ; WX 667 ; N Eogonek ; B 16 -173 737 676 ; +C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ; +C -1 ; WX 667 ; N Edotaccent ; B 16 0 641 876 ; +C -1 ; WX 278 ; N iogonek ; B 16 -173 388 691 ; +C -1 ; WX 500 ; N gcommaaccent ; B 28 -206 483 811 ; +C -1 ; WX 500 ; N odieresis ; B 25 -14 476 666 ; +C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ; +C -1 ; WX 556 ; N ncaron ; B 21 0 539 704 ; +C -1 ; WX 667 ; N Ecaron ; B 16 0 641 914 ; C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ; +C -1 ; WX 389 ; N scedilla ; B 25 -218 361 473 ; +C -1 ; WX 444 ; N rcaron ; B 29 0 434 704 ; +C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ; +C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 37 -341 755 691 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 26 -341 715 676 ; +C -1 ; WX 667 ; N Edieresis ; B 16 0 641 876 ; +C -1 ; WX 556 ; N nacute ; B 21 0 539 713 ; +C -1 ; WX 556 ; N uogonek ; B 16 -173 556 461 ; +C -1 ; WX 556 ; N umacron ; B 16 -14 537 637 ; +C -1 ; WX 722 ; N Dcaron ; B 14 0 690 914 ; +C -1 ; WX 396 ; N lcaron ; B 16 0 396 691 ; +C -1 ; WX 722 ; N Ccaron ; B 49 -19 687 914 ; +C -1 ; WX 722 ; N Cacute ; B 49 -19 687 923 ; +C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ; +C -1 ; WX 400 ; N degree ; B 57 402 343 688 ; +C -1 ; WX 722 ; N Aogonek ; B 9 -173 822 690 ; C -1 ; WX 570 ; N minus ; B 33 209 537 297 ; C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ; -C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ; +C -1 ; WX 722 ; N Aring ; B 9 0 689 948 ; C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ; -C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ; -C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ; -C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ; -C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ; -C -1 ; WX 278 ; N idieresis ; B -36 0 303 666 ; -C -1 ; WX 278 ; N iacute ; B 16 0 290 713 ; +C -1 ; WX 444 ; N rcommaaccent ; B 29 -341 434 473 ; +C -1 ; WX 278 ; N lacute ; B 16 0 297 923 ; +C -1 ; WX 500 ; N omacron ; B 25 -14 476 637 ; +C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ; +C -1 ; WX 278 ; N icircumflex ; B -36 0 301 704 ; C -1 ; WX 278 ; N igrave ; B -26 0 255 713 ; +C -1 ; WX 556 ; N ncommaaccent ; B 21 -341 539 473 ; +C -1 ; WX 278 ; N lcommaaccent ; B 16 -341 255 676 ; C -1 ; WX 570 ; N plusminus ; B 33 0 537 568 ; C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ; C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ; C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ; -C -1 ; WX 278 ; N icircumflex ; B -36 0 301 704 ; -C -1 ; WX 667 ; N Edieresis ; B 16 0 641 876 ; -C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ; -C -1 ; WX 722 ; N Aring ; B 9 0 689 948 ; -C -1 ; WX 500 ; N odieresis ; B 25 -14 476 666 ; -C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ; -C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ; -C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ; -C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ; -C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ; -C -1 ; WX 556 ; N udieresis ; B 16 -14 537 666 ; -C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ; -C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ; -C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ; -C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ; -C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ; +C -1 ; WX 278 ; N iacute ; B 16 0 290 713 ; +C -1 ; WX 722 ; N Abreve ; B 9 0 689 901 ; +C -1 ; WX 556 ; N kcommaaccent ; B 22 -341 543 676 ; +C -1 ; WX 778 ; N Omacron ; B 35 -19 743 847 ; +C -1 ; WX 278 ; N imacron ; B -27 0 303 637 ; +C -1 ; WX 444 ; N emacron ; B 25 -14 426 637 ; +C -1 ; WX 500 ; N amacron ; B 25 -14 488 637 ; +C -1 ; WX 333 ; N tcommaaccent ; B 20 -341 332 630 ; C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 666 ; +C -1 ; WX 444 ; N zdotaccent ; B 21 0 420 666 ; +C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ; +C -1 ; WX 444 ; N zacute ; B 21 0 420 713 ; +C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 16 -14 537 713 ; +C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ; +C -1 ; WX 556 ; N uring ; B 16 -14 537 750 ; +C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ; +C -1 ; WX 333 ; N commaaccent ; B 84 -341 249 -40 ; C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ; C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ; -C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ; C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ; +C -1 ; WX 278 ; N idieresis ; B -36 0 303 666 ; +C -1 ; WX 494 ; N lozenge ; B 18 0 466 740 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 570 ; N notequal ; B 33 -13 537 519 ; +C -1 ; WX 549 ; N radical ; B -17 -35 535 916 ; C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ; -C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ; C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ; -C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ; +C -1 ; WX 570 ; N lessequal ; B 31 0 539 642 ; +C -1 ; WX 570 ; N greaterequal ; B 31 0 539 642 ; +C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ; +C -1 ; WX 713 ; N summation ; B 14 -123 695 752 ; +C -1 ; WX 494 ; N partialdiff ; B 16 -20 472 743 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 16 -341 701 676 ; +C -1 ; WX 556 ; N dcroat ; B 25 -14 534 676 ; C -1 ; WX 220 ; N brokenbar ; B 66 -19 154 691 ; -C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ; +C -1 ; WX 667 ; N Lcommaaccent ; B 19 -341 638 676 ; C -1 ; WX 722 ; N Adieresis ; B 9 0 689 876 ; C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ; C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; @@ -255,7 +339,7 @@ EndCharMetrics StartKernData StartKernPairs 998 KPX A C -73 -KPX A Ccedilla -78 +KPX A Ccedilla -77 KPX A G -68 KPX A O -68 KPX A Odieresis -68 @@ -271,7 +355,7 @@ KPX A W -116 KPX A Y -74 KPX A a -5 KPX A b -22 -KPX A c -34 +KPX A c -35 KPX A ccedilla -43 KPX A comma 1 KPX A d -28 @@ -280,7 +364,7 @@ KPX A g -7 KPX A guillemotleft -53 KPX A guilsinglleft -67 KPX A hyphen -30 -KPX A o -36 +KPX A o -37 KPX A period 0 KPX A q -38 KPX A quotedblright -76 @@ -288,8 +372,8 @@ KPX A quoteright -108 KPX A t -27 KPX A u -30 KPX A v -84 -KPX A w -80 -KPX A y -84 +KPX A w -79 +KPX A y -83 KPX Aacute C -73 KPX Aacute G -68 KPX Aacute O -68 @@ -301,7 +385,7 @@ KPX Aacute W -116 KPX Aacute Y -74 KPX Aacute a -5 KPX Aacute b -22 -KPX Aacute c -34 +KPX Aacute c -35 KPX Aacute comma 1 KPX Aacute d -28 KPX Aacute e -32 @@ -309,15 +393,15 @@ KPX Aacute g -7 KPX Aacute guillemotleft -53 KPX Aacute guilsinglleft -67 KPX Aacute hyphen -30 -KPX Aacute o -36 +KPX Aacute o -37 KPX Aacute period 0 KPX Aacute q -38 KPX Aacute quoteright -108 KPX Aacute t -27 KPX Aacute u -30 KPX Aacute v -84 -KPX Aacute w -80 -KPX Aacute y -84 +KPX Aacute w -79 +KPX Aacute y -83 KPX Acircumflex C -73 KPX Acircumflex G -68 KPX Acircumflex O -68 @@ -340,14 +424,14 @@ KPX Adieresis W -116 KPX Adieresis Y -74 KPX Adieresis a -5 KPX Adieresis b -22 -KPX Adieresis c -34 +KPX Adieresis c -35 KPX Adieresis comma 1 KPX Adieresis d -28 KPX Adieresis g -7 KPX Adieresis guillemotleft -53 KPX Adieresis guilsinglleft -67 KPX Adieresis hyphen -30 -KPX Adieresis o -36 +KPX Adieresis o -37 KPX Adieresis period 0 KPX Adieresis q -38 KPX Adieresis quotedblright -76 @@ -355,8 +439,8 @@ KPX Adieresis quoteright -108 KPX Adieresis t -27 KPX Adieresis u -30 KPX Adieresis v -84 -KPX Adieresis w -80 -KPX Adieresis y -84 +KPX Adieresis w -79 +KPX Adieresis y -83 KPX Agrave C -73 KPX Agrave G -68 KPX Agrave O -68 @@ -379,7 +463,7 @@ KPX Aring W -116 KPX Aring Y -74 KPX Aring a -5 KPX Aring b -22 -KPX Aring c -34 +KPX Aring c -35 KPX Aring comma 1 KPX Aring d -28 KPX Aring e -32 @@ -387,7 +471,7 @@ KPX Aring g -7 KPX Aring guillemotleft -53 KPX Aring guilsinglleft -67 KPX Aring hyphen -30 -KPX Aring o -36 +KPX Aring o -37 KPX Aring period 0 KPX Aring q -38 KPX Aring quotedblright -76 @@ -395,8 +479,8 @@ KPX Aring quoteright -108 KPX Aring t -27 KPX Aring u -30 KPX Aring v -84 -KPX Aring w -80 -KPX Aring y -84 +KPX Aring w -79 +KPX Aring y -83 KPX Atilde C -73 KPX Atilde G -68 KPX Atilde O -68 @@ -443,19 +527,19 @@ KPX D Adieresis -55 KPX D Agrave -55 KPX D Aring -55 KPX D Atilde -55 -KPX D J -38 -KPX D T -6 +KPX D J -40 +KPX D T -7 KPX D V -60 KPX D W -50 -KPX D X -50 +KPX D X -51 KPX D Y -59 -KPX F A -80 -KPX F Aacute -80 -KPX F Acircumflex -80 -KPX F Adieresis -80 -KPX F Agrave -80 -KPX F Aring -80 -KPX F Atilde -80 +KPX F A -79 +KPX F Aacute -79 +KPX F Acircumflex -79 +KPX F Adieresis -79 +KPX F Agrave -79 +KPX F Aring -79 +KPX F Atilde -79 KPX F J -42 KPX F O -7 KPX F Odieresis -7 @@ -472,8 +556,8 @@ KPX F i -1 KPX F j -26 KPX F o -54 KPX F oacute -54 -KPX F odieresis -25 -KPX F oe -52 +KPX F odieresis -24 +KPX F oe -51 KPX F oslash -53 KPX F period -60 KPX F r -7 @@ -497,7 +581,7 @@ KPX J Aring -30 KPX K C -61 KPX K G -56 KPX K O -56 -KPX K OE -45 +KPX K OE -46 KPX K Oacute -56 KPX K Odieresis -56 KPX K S 13 @@ -508,9 +592,9 @@ KPX K ae 3 KPX K aring 6 KPX K e -20 KPX K hyphen -47 -KPX K o -24 -KPX K oacute -24 -KPX K odieresis -24 +KPX K o -25 +KPX K oacute -25 +KPX K odieresis -25 KPX K u -18 KPX K udieresis -18 KPX K y -83 @@ -539,7 +623,7 @@ KPX L hyphen 24 KPX L quotedblright -37 KPX L quoteright -69 KPX L u -11 -KPX L udieresis -13 +KPX L udieresis -12 KPX L y -49 KPX N A -19 KPX N AE -16 @@ -555,11 +639,11 @@ KPX N Odieresis -15 KPX N a -16 KPX N aacute -16 KPX N adieresis -16 -KPX N ae -19 +KPX N ae -18 KPX N aring -16 KPX N comma 1 -KPX N e -14 -KPX N eacute -14 +KPX N e -13 +KPX N eacute -13 KPX N o -16 KPX N oacute -16 KPX N odieresis -16 @@ -567,17 +651,17 @@ KPX N oslash -15 KPX N period 0 KPX N u -17 KPX N udieresis -17 -KPX O A -56 +KPX O A -55 KPX O AE -54 -KPX O Aacute -56 -KPX O Adieresis -56 -KPX O Aring -56 +KPX O Aacute -55 +KPX O Adieresis -55 +KPX O Aring -55 KPX O T -9 KPX O V -60 KPX O W -54 KPX O X -51 KPX O Y -59 -KPX Oacute A -56 +KPX Oacute A -55 KPX Oacute T -9 KPX Oacute V -60 KPX Oacute W -54 @@ -585,7 +669,7 @@ KPX Oacute Y -59 KPX Ocircumflex T -9 KPX Ocircumflex V -60 KPX Ocircumflex Y -59 -KPX Odieresis A -56 +KPX Odieresis A -55 KPX Odieresis T -9 KPX Odieresis V -60 KPX Odieresis W -54 @@ -598,27 +682,27 @@ KPX Oslash A -52 KPX Otilde T -9 KPX Otilde V -60 KPX Otilde Y -59 -KPX P A -82 +KPX P A -81 KPX P AE -94 -KPX P Aacute -82 -KPX P Adieresis -82 -KPX P Aring -82 +KPX P Aacute -81 +KPX P Adieresis -81 +KPX P Aring -81 KPX P J -68 -KPX P a -20 -KPX P aacute -20 +KPX P a -19 +KPX P aacute -19 KPX P adieresis -19 -KPX P ae -23 -KPX P aring -20 -KPX P comma -86 -KPX P e -30 -KPX P eacute -30 +KPX P ae -22 +KPX P aring -19 +KPX P comma -85 +KPX P e -29 +KPX P eacute -29 KPX P hyphen -39 KPX P o -33 KPX P oacute -33 KPX P odieresis -22 -KPX P oe -31 -KPX P oslash -34 -KPX P period -87 +KPX P oe -30 +KPX P oslash -33 +KPX P period -86 KPX R C -36 KPX R Ccedilla -37 KPX R G -30 @@ -630,8 +714,8 @@ KPX R T -26 KPX R U -37 KPX R Udieresis -37 KPX R V -53 -KPX R W -54 -KPX R Y -52 +KPX R W -55 +KPX R Y -53 KPX R a 7 KPX R aacute 7 KPX R adieresis 7 @@ -640,9 +724,9 @@ KPX R aring 7 KPX R e -19 KPX R eacute -19 KPX R hyphen -30 -KPX R o -23 -KPX R oacute -23 -KPX R odieresis -23 +KPX R o -24 +KPX R oacute -24 +KPX R odieresis -24 KPX R oe -21 KPX R u -17 KPX R uacute -17 @@ -686,7 +770,7 @@ KPX T ae -69 KPX T c -88 KPX T colon -85 KPX T comma -63 -KPX T e -86 +KPX T e -85 KPX T g -68 KPX T guillemotleft -99 KPX T guilsinglleft -113 @@ -703,28 +787,28 @@ KPX T u -89 KPX T v -106 KPX T w -107 KPX T y -104 -KPX U A -55 +KPX U A -54 KPX U AE -52 -KPX U Aacute -55 -KPX U Acircumflex -55 -KPX U Adieresis -55 -KPX U Aring -55 -KPX U Atilde -55 +KPX U Aacute -54 +KPX U Acircumflex -54 +KPX U Adieresis -54 +KPX U Aring -54 +KPX U Atilde -54 KPX U comma -17 KPX U m -23 KPX U n -25 KPX U p -28 KPX U period -18 KPX U r -29 -KPX Uacute A -55 +KPX Uacute A -54 KPX Uacute comma -17 KPX Uacute m -23 KPX Uacute n -25 KPX Uacute p -28 KPX Uacute period -18 KPX Uacute r -29 -KPX Ucircumflex A -55 -KPX Udieresis A -55 +KPX Ucircumflex A -54 +KPX Udieresis A -54 KPX Udieresis b 10 KPX Udieresis comma -17 KPX Udieresis m -23 @@ -732,15 +816,15 @@ KPX Udieresis n -25 KPX Udieresis p -28 KPX Udieresis period -18 KPX Udieresis r -29 -KPX Ugrave A -55 -KPX V A -114 +KPX Ugrave A -54 +KPX V A -113 KPX V AE -113 -KPX V Aacute -114 -KPX V Acircumflex -114 -KPX V Adieresis -114 -KPX V Agrave -114 -KPX V Aring -114 -KPX V Atilde -114 +KPX V Aacute -113 +KPX V Acircumflex -113 +KPX V Adieresis -113 +KPX V Agrave -113 +KPX V Aring -113 +KPX V Atilde -113 KPX V C -70 KPX V G -64 KPX V O -63 @@ -757,11 +841,11 @@ KPX V ae -90 KPX V colon -94 KPX V comma -94 KPX V e -86 -KPX V g -87 +KPX V g -86 KPX V guillemotleft -98 KPX V guilsinglleft -112 KPX V hyphen -68 -KPX V i -12 +KPX V i -13 KPX V o -89 KPX V oslash -87 KPX V period -95 @@ -769,14 +853,14 @@ KPX V r -60 KPX V semicolon -94 KPX V u -58 KPX V y -56 -KPX W A -99 +KPX W A -98 KPX W AE -102 -KPX W Aacute -99 -KPX W Acircumflex -99 -KPX W Adieresis -99 -KPX W Agrave -99 -KPX W Aring -99 -KPX W Atilde -99 +KPX W Aacute -98 +KPX W Acircumflex -98 +KPX W Adieresis -98 +KPX W Agrave -98 +KPX W Aring -98 +KPX W Atilde -98 KPX W C -58 KPX W G -52 KPX W O -51 @@ -790,14 +874,14 @@ KPX W S -24 KPX W T 9 KPX W a -70 KPX W ae -73 -KPX W colon -80 +KPX W colon -81 KPX W comma -72 -KPX W e -68 +KPX W e -67 KPX W g -70 KPX W guillemotleft -79 KPX W guilsinglleft -93 KPX W hyphen -49 -KPX W i -11 +KPX W i -12 KPX W o -70 KPX W oslash -69 KPX W period -73 @@ -812,7 +896,7 @@ KPX X Q -57 KPX X a 0 KPX X e -27 KPX X hyphen -43 -KPX X o -31 +KPX X o -32 KPX X u -25 KPX X y -90 KPX Y A -64 @@ -843,7 +927,7 @@ KPX Y g -86 KPX Y guillemotleft -111 KPX Y guilsinglleft -125 KPX Y hyphen -87 -KPX Y i -13 +KPX Y i -14 KPX Y o -96 KPX Y oslash -95 KPX Y p -72 @@ -852,7 +936,7 @@ KPX Y semicolon -103 KPX Y u -76 KPX Y v -78 KPX Z v -45 -KPX Z y -45 +KPX Z y -44 KPX a j -39 KPX a quoteright -34 KPX a v -39 @@ -864,8 +948,8 @@ KPX aacute y -44 KPX adieresis v -39 KPX adieresis w -40 KPX adieresis y -44 -KPX ae v -33 -KPX ae w -34 +KPX ae v -34 +KPX ae w -35 KPX ae y -37 KPX agrave v -39 KPX agrave w -40 @@ -881,26 +965,26 @@ KPX c k -18 KPX comma one -12 KPX comma quotedblright 9 KPX comma quoteright -23 -KPX e quoteright -20 -KPX e t -11 -KPX e v -30 -KPX e w -31 +KPX e quoteright -19 +KPX e t -10 +KPX e v -29 +KPX e w -30 KPX e x -19 -KPX e y -32 -KPX eacute v -30 -KPX eacute w -31 -KPX eacute y -32 -KPX ecircumflex v -30 -KPX ecircumflex w -31 -KPX ecircumflex y -32 +KPX e y -31 +KPX eacute v -29 +KPX eacute w -30 +KPX eacute y -31 +KPX ecircumflex v -29 +KPX ecircumflex w -30 +KPX ecircumflex y -31 KPX eight four 11 KPX eight one -19 KPX eight seven 0 KPX f a -17 KPX f aacute -17 KPX f adieresis 14 -KPX f ae -20 -KPX f aring -14 +KPX f ae -21 +KPX f aring -15 KPX f e -29 KPX f eacute -29 KPX f f 12 @@ -910,7 +994,7 @@ KPX f l 33 KPX f o -32 KPX f oacute -32 KPX f odieresis 11 -KPX f oe -30 +KPX f oe -29 KPX f oslash -31 KPX f quoteright 18 KPX f s -8 @@ -931,20 +1015,20 @@ KPX g l 0 KPX g oacute -20 KPX g odieresis -20 KPX g r 1 -KPX guillemotright A -41 +KPX guillemotright A -40 KPX guillemotright AE -46 -KPX guillemotright Aacute -41 -KPX guillemotright Adieresis -41 -KPX guillemotright Aring -41 +KPX guillemotright Aacute -40 +KPX guillemotright Adieresis -40 +KPX guillemotright Aring -40 KPX guillemotright T -100 KPX guillemotright V -102 KPX guillemotright W -84 KPX guillemotright Y -106 -KPX guilsinglright A -55 +KPX guilsinglright A -54 KPX guilsinglright AE -60 -KPX guilsinglright Aacute -55 -KPX guilsinglright Adieresis -55 -KPX guilsinglright Aring -55 +KPX guilsinglright Aacute -54 +KPX guilsinglright Adieresis -54 +KPX guilsinglright Aring -54 KPX guilsinglright T -114 KPX guilsinglright V -116 KPX guilsinglright W -98 @@ -965,7 +1049,7 @@ KPX i j -36 KPX k a -3 KPX k aacute -3 KPX k adieresis -3 -KPX k ae -6 +KPX k ae -7 KPX k aring -3 KPX k comma 0 KPX k e -33 @@ -986,7 +1070,7 @@ KPX m v -32 KPX m w -33 KPX m y -33 KPX n T -56 -KPX n p -15 +KPX n p -14 KPX n quoteright -28 KPX n v -31 KPX n w -32 @@ -995,24 +1079,24 @@ KPX nine four 2 KPX nine one -26 KPX nine seven 10 KPX o T -88 -KPX o quoteright -28 -KPX o t -11 +KPX o quoteright -27 +KPX o t -10 KPX o v -42 KPX o w -38 KPX o x -29 -KPX o y -43 +KPX o y -42 KPX oacute v -42 KPX oacute w -38 -KPX oacute y -43 -KPX ocircumflex t -11 -KPX odieresis t -11 +KPX oacute y -42 +KPX ocircumflex t -10 +KPX odieresis t -10 KPX odieresis v -42 KPX odieresis w -38 KPX odieresis x -29 -KPX odieresis y -43 +KPX odieresis y -42 KPX ograve v -42 KPX ograve w -38 -KPX ograve y -43 +KPX ograve y -42 KPX one comma -16 KPX one eight -34 KPX one five -16 @@ -1022,17 +1106,17 @@ KPX one one -27 KPX one period -17 KPX one seven -56 KPX one six -47 -KPX one three -9 +KPX one three -10 KPX one two -2 KPX one zero -35 KPX p t -11 -KPX p y -33 +KPX p y -34 KPX period one -21 -KPX period quotedblright 4 +KPX period quotedblright 5 KPX period quoteright -27 -KPX q c -14 +KPX q c -13 KPX q u -15 -KPX quotedblbase A 18 +KPX quotedblbase A 19 KPX quotedblbase AE 20 KPX quotedblbase T -59 KPX quotedblbase V -98 @@ -1074,7 +1158,7 @@ KPX quoteright comma -34 KPX quoteright d -31 KPX quoteright o -34 KPX quoteright period -35 -KPX quoteright r -27 +KPX quoteright r -26 KPX quoteright s -17 KPX quoteright t -19 KPX quoteright v -25 @@ -1105,7 +1189,7 @@ KPX r j -12 KPX r k -15 KPX r l -14 KPX r m 6 -KPX r n 3 +KPX r n 4 KPX r o -14 KPX r oacute -14 KPX r ocircumflex -14 @@ -1113,7 +1197,7 @@ KPX r odieresis -14 KPX r oe -12 KPX r ograve -14 KPX r oslash -14 -KPX r p 3 +KPX r p 4 KPX r period -68 KPX r q -15 KPX r quoteright -8 @@ -1121,11 +1205,11 @@ KPX r r 0 KPX r s 0 KPX r semicolon -16 KPX r t 9 -KPX r u 8 +KPX r u 9 KPX r v 8 KPX r w 7 -KPX r x 10 -KPX r y 8 +KPX r x 11 +KPX r y 9 KPX r z -1 KPX s quoteright -17 KPX s t -7 @@ -1137,7 +1221,7 @@ KPX seven four -54 KPX seven one -25 KPX seven period -58 KPX seven seven -6 -KPX seven six -36 +KPX seven six -37 KPX seven three -20 KPX seven two -21 KPX six four 13 @@ -1153,9 +1237,9 @@ KPX t colon -12 KPX t e -1 KPX t eacute -1 KPX t h -4 -KPX t o -3 -KPX t oacute -3 -KPX t odieresis -3 +KPX t o -4 +KPX t oacute -4 +KPX t odieresis -4 KPX t quoteright -31 KPX t semicolon -12 KPX three four 9 @@ -1180,8 +1264,8 @@ KPX v e -35 KPX v eacute -35 KPX v ecircumflex -35 KPX v egrave -35 -KPX v g -23 -KPX v hyphen -28 +KPX v g -22 +KPX v hyphen -27 KPX v l -16 KPX v o -40 KPX v oacute -40 @@ -1201,12 +1285,12 @@ KPX w aring -23 KPX w atilde -23 KPX w c -36 KPX w colon -23 -KPX w comma -51 -KPX w e -34 -KPX w eacute -34 -KPX w ecircumflex -34 -KPX w egrave -34 -KPX w g -23 +KPX w comma -50 +KPX w e -33 +KPX w eacute -33 +KPX w ecircumflex -33 +KPX w egrave -33 +KPX w g -22 KPX w hyphen -23 KPX w l -16 KPX w o -36 @@ -1214,13 +1298,13 @@ KPX w oacute -36 KPX w odieresis -36 KPX w ograve -36 KPX w oslash -35 -KPX w period -52 +KPX w period -51 KPX w s -16 KPX w semicolon -23 KPX x a -2 KPX x c -30 -KPX x e -28 -KPX x eacute -28 +KPX x e -27 +KPX x eacute -27 KPX x o -30 KPX x q -32 KPX y a -32 @@ -1231,7 +1315,7 @@ KPX y ae -34 KPX y agrave -32 KPX y aring -32 KPX y atilde -32 -KPX y c -43 +KPX y c -42 KPX y colon -28 KPX y comma -56 KPX y e -40 @@ -1241,11 +1325,11 @@ KPX y egrave -40 KPX y g -31 KPX y hyphen -29 KPX y l -19 -KPX y o -43 -KPX y oacute -43 -KPX y odieresis -43 -KPX y ograve -43 -KPX y oslash -42 +KPX y o -42 +KPX y oacute -42 +KPX y odieresis -42 +KPX y ograve -42 +KPX y oslash -41 KPX y period -57 KPX y s -24 KPX y semicolon -28 diff --git a/misc/gs_afm/TimesBoO.afm b/misc/gs_afm/TimesBoO.afm index a31acdadc5..0833e4f046 100644 --- a/misc/gs_afm/TimesBoO.afm +++ b/misc/gs_afm/TimesBoO.afm @@ -1,7 +1,7 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 2/11/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. FontName NimbusRomNo9L-MediItal FullName Nimbus Roman No9 L Medium Italic FamilyName Nimbus Roman No9 L @@ -10,15 +10,15 @@ ItalicAngle -15.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -200 -218 996 949 +FontBBox -200 -324 996 964 CapHeight 669 XHeight 449 Descender -205 Ascender 699 -StartCharMetrics 232 +StartCharMetrics 316 C 32 ; WX 250 ; N space ; B 125 0 125 0 ; C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ; C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ; @@ -92,7 +92,7 @@ C 101 ; WX 444 ; N e ; B 5 -13 398 462 ; C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; C 103 ; WX 500 ; N g ; B -52 -203 478 462 ; C 104 ; WX 556 ; N h ; B -13 -9 498 699 ; -C 105 ; WX 278 ; N i ; B 2 -9 262 684 ; +C 105 ; WX 278 ; N i ; B 2 -9 263 685 ; C 106 ; WX 278 ; N j ; B -189 -207 279 685 ; C 107 ; WX 500 ; N k ; B -23 -8 483 699 ; C 108 ; WX 278 ; N l ; B 2 -9 290 699 ; @@ -150,7 +150,7 @@ C 197 ; WX 333 ; N macron ; B 51 553 393 623 ; C 198 ; WX 333 ; N breve ; B 71 516 387 678 ; C 199 ; WX 333 ; N dotaccent ; B 163 525 293 655 ; C 200 ; WX 333 ; N dieresis ; B 55 525 397 655 ; -C 202 ; WX 333 ; N ring ; B 127 541 340 754 ; +C 202 ; WX 333 ; N ring ; B 127 540 340 754 ; C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ; C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ; C 206 ; WX 333 ; N ogonek ; B -40 -173 189 44 ; @@ -160,7 +160,7 @@ C 225 ; WX 944 ; N AE ; B -64 0 918 669 ; C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ; C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ; C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ; -C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ; +C 234 ; WX 944 ; N OE ; B 23 -9 946 677 ; C 235 ; WX 300 ; N ordmasculine ; B 56 400 350 685 ; C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ; C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ; @@ -168,265 +168,349 @@ C 248 ; WX 278 ; N lslash ; B -13 -9 301 699 ; C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ; C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ; C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ; -C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ; -C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ; -C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ; -C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ; -C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ; -C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ; -C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ; -C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ; C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ; -C -1 ; WX 250 ; N middot ; B 51 257 199 405 ; -C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ; -C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ; -C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ; -C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ; +C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ; +C -1 ; WX 556 ; N Scedilla ; B 2 -218 526 685 ; +C -1 ; WX 611 ; N Tcaron ; B 50 0 650 900 ; C -1 ; WX 556 ; N Scaron ; B 2 -18 526 897 ; +C -1 ; WX 667 ; N Rcaron ; B -29 0 623 900 ; +C -1 ; WX 667 ; N Racute ; B -29 0 623 907 ; +C -1 ; WX 556 ; N Sacute ; B 2 -18 526 907 ; C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ; -C -1 ; WX 333 ; N sfthyphen ; B 2 166 271 282 ; -C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ; +C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 27 -18 693 907 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 67 -18 744 907 ; +C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ; +C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ; +C -1 ; WX 722 ; N Dcroat ; B -31 0 700 669 ; +C -1 ; WX 611 ; N Zacute ; B -11 0 590 907 ; +C -1 ; WX 722 ; N Uring ; B 67 -18 744 964 ; +C -1 ; WX 500 ; N gbreve ; B -52 -203 478 678 ; +C -1 ; WX 444 ; N eogonek ; B 5 -173 404 462 ; +C -1 ; WX 444 ; N edotaccent ; B 5 -13 398 655 ; +C -1 ; WX 444 ; N ecaron ; B 5 -13 467 690 ; +C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ; +C -1 ; WX 611 ; N Thorn ; B -27 0 574 669 ; +C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ; +C -1 ; WX 444 ; N edieresis ; B 5 -13 443 655 ; +C -1 ; WX 600 ; N dcaron ; B -21 -13 664 699 ; +C -1 ; WX 444 ; N ccedilla ; B -24 -218 392 462 ; +C -1 ; WX 444 ; N ccaron ; B -5 -13 468 690 ; +C -1 ; WX 444 ; N cacute ; B -5 -13 444 697 ; +C -1 ; WX 500 ; N aogonek ; B -21 -173 500 462 ; C -1 ; WX 500 ; N aring ; B -21 -14 455 754 ; +C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ; +C -1 ; WX 500 ; N abreve ; B -21 -14 470 678 ; +C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ; +C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ; +C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ; C -1 ; WX 500 ; N adieresis ; B -21 -14 471 655 ; +C -1 ; WX 722 ; N Uogonek ; B 67 -173 744 669 ; +C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ; +C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ; +C -1 ; WX 556 ; N udieresis ; B 15 -9 494 655 ; +C -1 ; WX 345 ; N tcaron ; B -11 -9 409 685 ; +C -1 ; WX 389 ; N scommaaccent ; B -26 -324 333 462 ; +C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ; +C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ; +C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ; +C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ; +C -1 ; WX 611 ; N Zdotaccent ; B -11 0 590 865 ; +C -1 ; WX 389 ; N scaron ; B -19 -13 439 690 ; +C -1 ; WX 667 ; N Amacron ; B -67 0 593 833 ; +C -1 ; WX 389 ; N sacute ; B -19 -13 407 697 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 50 -324 650 669 ; +C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ; +C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ; +C -1 ; WX 667 ; N Emacron ; B -27 0 653 833 ; C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ; -C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ; +C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ; C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ; C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ; -C -1 ; WX 444 ; N edieresis ; B 5 -13 443 655 ; -C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ; -C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ; +C -1 ; WX 722 ; N Ncaron ; B -27 -15 748 900 ; +C -1 ; WX 722 ; N Nacute ; B -27 -15 748 907 ; +C -1 ; WX 611 ; N Lcaron ; B -22 0 651 685 ; +C -1 ; WX 611 ; N Lacute ; B -22 0 590 907 ; +C -1 ; WX 389 ; N Idotaccent ; B -32 0 406 865 ; +C -1 ; WX 389 ; N racute ; B -21 0 407 697 ; C -1 ; WX 389 ; N Icircumflex ; B -32 0 420 897 ; -C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ; +C -1 ; WX 500 ; N ohungarumlaut ; B -3 -13 582 697 ; +C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ; +C -1 ; WX 500 ; N Euro ; B 53 -5 666 689 ; +C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ; +C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ; +C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ; +C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ; C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ; C -1 ; WX 389 ; N Iacute ; B -32 0 407 907 ; +C -1 ; WX 389 ; N Imacron ; B -32 0 461 833 ; +C -1 ; WX 389 ; N Iogonek ; B -32 -173 406 669 ; C -1 ; WX 389 ; N Idieresis ; B -32 0 445 862 ; -C -1 ; WX 400 ; N degree ; B 83 397 369 683 ; +C -1 ; WX 722 ; N Gbreve ; B 21 -18 706 888 ; +C -1 ; WX 722 ; N Umacron ; B 67 -18 744 833 ; +C -1 ; WX 667 ; N Kcommaaccent ; B -21 -324 702 669 ; +C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ; +C -1 ; WX 556 ; N Scommaaccent ; B 2 -324 526 685 ; +C -1 ; WX 667 ; N Eogonek ; B -27 -173 667 669 ; +C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ; +C -1 ; WX 667 ; N Edotaccent ; B -27 0 653 865 ; +C -1 ; WX 278 ; N iogonek ; B 2 -173 278 685 ; +C -1 ; WX 500 ; N gcommaaccent ; B -52 -203 478 765 ; +C -1 ; WX 500 ; N odieresis ; B -3 -13 466 655 ; +C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ; +C -1 ; WX 556 ; N ncaron ; B -6 -9 523 690 ; +C -1 ; WX 667 ; N Ecaron ; B -27 0 653 900 ; C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ; +C -1 ; WX 389 ; N scedilla ; B -40 -218 333 462 ; +C -1 ; WX 389 ; N rcaron ; B -21 0 439 690 ; +C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ; +C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 21 -324 706 685 ; +C -1 ; WX 667 ; N Rcommaaccent ; B -29 -324 623 669 ; +C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ; +C -1 ; WX 556 ; N nacute ; B -6 -9 493 697 ; +C -1 ; WX 556 ; N uogonek ; B 15 -173 556 462 ; +C -1 ; WX 556 ; N umacron ; B 15 -9 505 623 ; +C -1 ; WX 722 ; N Dcaron ; B -46 0 685 900 ; +C -1 ; WX 382 ; N lcaron ; B 2 -9 446 699 ; +C -1 ; WX 667 ; N Ccaron ; B 32 -18 677 900 ; +C -1 ; WX 667 ; N Cacute ; B 32 -18 677 907 ; +C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ; +C -1 ; WX 400 ; N degree ; B 83 397 369 683 ; +C -1 ; WX 667 ; N Aogonek ; B -67 -173 729 683 ; C -1 ; WX 606 ; N minus ; B 51 209 555 297 ; C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ; -C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ; +C -1 ; WX 667 ; N Aring ; B -67 0 593 950 ; C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ; -C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ; -C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ; -C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ; -C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ; -C -1 ; WX 444 ; N ccedilla ; B -24 -218 392 462 ; -C -1 ; WX 278 ; N idieresis ; B 2 -9 360 655 ; -C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ; +C -1 ; WX 389 ; N rcommaaccent ; B -80 -324 389 462 ; +C -1 ; WX 278 ; N lacute ; B 2 -9 392 907 ; +C -1 ; WX 500 ; N omacron ; B -3 -13 477 623 ; +C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ; +C -1 ; WX 278 ; N icircumflex ; B -2 -9 325 690 ; C -1 ; WX 278 ; N igrave ; B 2 -9 260 697 ; +C -1 ; WX 556 ; N ncommaaccent ; B -6 -324 493 462 ; +C -1 ; WX 278 ; N lcommaaccent ; B -81 -324 290 699 ; C -1 ; WX 570 ; N plusminus ; B 33 0 537 568 ; C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ; C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ; C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ; -C -1 ; WX 278 ; N icircumflex ; B -2 -9 325 690 ; -C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ; -C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ; -C -1 ; WX 667 ; N Aring ; B -67 0 593 949 ; -C -1 ; WX 500 ; N odieresis ; B -3 -13 466 655 ; -C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ; -C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ; -C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ; -C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ; -C -1 ; WX 389 ; N scaron ; B -19 -13 439 690 ; -C -1 ; WX 556 ; N udieresis ; B 15 -9 494 655 ; -C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ; -C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ; -C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ; -C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ; -C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ; +C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ; +C -1 ; WX 667 ; N Abreve ; B -67 0 593 888 ; +C -1 ; WX 500 ; N kcommaaccent ; B -23 -324 483 699 ; +C -1 ; WX 722 ; N Omacron ; B 27 -18 691 833 ; +C -1 ; WX 278 ; N imacron ; B 2 -9 366 623 ; +C -1 ; WX 444 ; N emacron ; B 5 -13 449 623 ; +C -1 ; WX 500 ; N amacron ; B -21 -14 477 623 ; +C -1 ; WX 278 ; N tcommaaccent ; B -81 -324 281 594 ; C -1 ; WX 444 ; N ydieresis ; B -94 -205 438 655 ; +C -1 ; WX 389 ; N zdotaccent ; B -43 -78 368 655 ; +C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ; +C -1 ; WX 389 ; N zacute ; B -43 -78 407 697 ; +C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 15 -9 610 697 ; +C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ; +C -1 ; WX 556 ; N uring ; B 15 -9 492 754 ; +C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ; +C -1 ; WX 333 ; N commaaccent ; B -54 -324 130 -40 ; C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ; C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ; -C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ; C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ; +C -1 ; WX 278 ; N idieresis ; B 2 -9 360 655 ; +C -1 ; WX 494 ; N lozenge ; B 18 0 466 740 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 570 ; N notequal ; B 33 -13 537 519 ; +C -1 ; WX 549 ; N radical ; B -17 -35 535 916 ; C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ; -C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ; C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ; -C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ; +C -1 ; WX 570 ; N lessequal ; B 31 0 539 642 ; +C -1 ; WX 570 ; N greaterequal ; B 31 0 539 642 ; +C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ; +C -1 ; WX 713 ; N summation ; B 14 -123 695 752 ; +C -1 ; WX 494 ; N partialdiff ; B 16 -20 472 743 ; +C -1 ; WX 722 ; N Ncommaaccent ; B -27 -324 748 669 ; +C -1 ; WX 500 ; N dcroat ; B -21 -13 540 699 ; C -1 ; WX 220 ; N brokenbar ; B 66 -18 154 685 ; -C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ; +C -1 ; WX 611 ; N Lcommaaccent ; B -22 -324 590 669 ; C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ; C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ; C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; EndCharMetrics StartKernData -StartKernPairs 994 +StartKernPairs 998 KPX A C -61 KPX A Ccedilla -63 KPX A G -59 KPX A O -53 KPX A Odieresis -53 -KPX A Q -55 +KPX A Q -54 KPX A T -33 KPX A U -61 KPX A Uacute -61 KPX A Ucircumflex -61 KPX A Udieresis -61 KPX A Ugrave -61 -KPX A V -109 +KPX A V -110 KPX A W -107 KPX A Y -44 -KPX A a -6 +KPX A a -5 KPX A b -1 KPX A c -20 KPX A ccedilla -29 KPX A comma 0 KPX A d -5 KPX A e -25 -KPX A g -21 +KPX A g -20 KPX A guillemotleft -58 KPX A guilsinglleft -68 -KPX A hyphen -22 +KPX A hyphen -23 KPX A o -23 -KPX A period 2 +KPX A period 1 KPX A q -18 KPX A quotedblright -78 KPX A quoteright -101 KPX A t -4 -KPX A u -17 +KPX A u -18 KPX A v -51 KPX A w -56 KPX A y -67 KPX Aacute C -61 KPX Aacute G -59 KPX Aacute O -53 -KPX Aacute Q -55 +KPX Aacute Q -54 KPX Aacute T -33 KPX Aacute U -61 -KPX Aacute V -109 +KPX Aacute V -110 KPX Aacute W -107 KPX Aacute Y -44 -KPX Aacute a -6 +KPX Aacute a -5 KPX Aacute b -1 KPX Aacute c -20 KPX Aacute comma 0 KPX Aacute d -5 KPX Aacute e -25 -KPX Aacute g -21 +KPX Aacute g -20 KPX Aacute guillemotleft -58 KPX Aacute guilsinglleft -68 -KPX Aacute hyphen -22 +KPX Aacute hyphen -23 KPX Aacute o -23 -KPX Aacute period 2 +KPX Aacute period 1 KPX Aacute q -18 KPX Aacute quoteright -101 KPX Aacute t -4 -KPX Aacute u -17 +KPX Aacute u -18 KPX Aacute v -51 KPX Aacute w -56 KPX Aacute y -67 KPX Acircumflex C -61 KPX Acircumflex G -59 KPX Acircumflex O -53 -KPX Acircumflex Q -55 +KPX Acircumflex Q -54 KPX Acircumflex T -33 KPX Acircumflex U -61 -KPX Acircumflex V -109 +KPX Acircumflex V -110 KPX Acircumflex W -107 KPX Acircumflex Y -44 KPX Acircumflex comma 0 -KPX Acircumflex period 2 +KPX Acircumflex period 1 KPX Adieresis C -61 KPX Adieresis G -59 KPX Adieresis O -53 -KPX Adieresis Q -55 +KPX Adieresis Q -54 KPX Adieresis T -33 KPX Adieresis U -61 -KPX Adieresis V -109 +KPX Adieresis V -110 KPX Adieresis W -107 KPX Adieresis Y -44 -KPX Adieresis a -6 +KPX Adieresis a -5 KPX Adieresis b -1 KPX Adieresis c -20 KPX Adieresis comma 0 KPX Adieresis d -5 -KPX Adieresis g -21 +KPX Adieresis g -20 KPX Adieresis guillemotleft -58 KPX Adieresis guilsinglleft -68 -KPX Adieresis hyphen -22 +KPX Adieresis hyphen -23 KPX Adieresis o -23 -KPX Adieresis period 2 +KPX Adieresis period 1 KPX Adieresis q -18 KPX Adieresis quotedblright -78 KPX Adieresis quoteright -101 KPX Adieresis t -4 -KPX Adieresis u -17 +KPX Adieresis u -18 KPX Adieresis v -51 KPX Adieresis w -56 KPX Adieresis y -67 KPX Agrave C -61 KPX Agrave G -59 KPX Agrave O -53 -KPX Agrave Q -55 +KPX Agrave Q -54 KPX Agrave T -33 KPX Agrave U -61 -KPX Agrave V -109 +KPX Agrave V -110 KPX Agrave W -107 KPX Agrave Y -44 KPX Agrave comma 0 -KPX Agrave period 2 +KPX Agrave period 1 KPX Aring C -61 KPX Aring G -59 KPX Aring O -53 -KPX Aring Q -55 +KPX Aring Q -54 KPX Aring T -33 KPX Aring U -61 -KPX Aring V -109 +KPX Aring V -110 KPX Aring W -107 KPX Aring Y -44 -KPX Aring a -6 +KPX Aring a -5 KPX Aring b -1 KPX Aring c -20 KPX Aring comma 0 KPX Aring d -5 KPX Aring e -25 -KPX Aring g -21 +KPX Aring g -20 KPX Aring guillemotleft -58 KPX Aring guilsinglleft -68 -KPX Aring hyphen -22 +KPX Aring hyphen -23 KPX Aring o -23 -KPX Aring period 2 +KPX Aring period 1 KPX Aring q -18 KPX Aring quotedblright -78 KPX Aring quoteright -101 KPX Aring t -4 -KPX Aring u -17 +KPX Aring u -18 KPX Aring v -51 KPX Aring w -56 KPX Aring y -67 KPX Atilde C -61 KPX Atilde G -59 KPX Atilde O -53 -KPX Atilde Q -55 +KPX Atilde Q -54 KPX Atilde T -33 KPX Atilde U -61 -KPX Atilde V -109 +KPX Atilde V -110 KPX Atilde W -107 KPX Atilde Y -44 KPX Atilde comma 0 -KPX Atilde period 2 -KPX B A -33 -KPX B AE -34 -KPX B Aacute -33 -KPX B Acircumflex -33 -KPX B Adieresis -33 -KPX B Aring -33 -KPX B Atilde -33 +KPX Atilde period 1 +KPX B A -34 +KPX B AE -40 +KPX B Aacute -34 +KPX B Acircumflex -34 +KPX B Adieresis -34 +KPX B Aring -34 +KPX B Atilde -34 KPX B O -22 -KPX B OE -19 +KPX B OE -20 KPX B Oacute -22 KPX B Ocircumflex -22 KPX B Odieresis -22 KPX B Ograve -22 -KPX B Oslash -22 -KPX B V -48 -KPX B W -51 -KPX B Y -52 +KPX B Oslash -23 +KPX B V -46 +KPX B W -46 +KPX B Y -50 KPX C A -24 -KPX C AE -26 +KPX C AE -31 KPX C Aacute -24 KPX C Adieresis -24 KPX C Aring -24 @@ -436,36 +520,36 @@ KPX C O -25 KPX C Oacute -25 KPX C Odieresis -25 KPX Ccedilla A -30 -KPX D A -52 -KPX D Aacute -52 -KPX D Acircumflex -52 -KPX D Adieresis -52 -KPX D Agrave -52 -KPX D Aring -52 -KPX D Atilde -52 -KPX D J -66 +KPX D A -54 +KPX D Aacute -54 +KPX D Acircumflex -54 +KPX D Adieresis -54 +KPX D Agrave -54 +KPX D Aring -54 +KPX D Atilde -54 +KPX D J -67 KPX D T -27 KPX D V -60 KPX D W -58 -KPX D X -63 -KPX D Y -63 -KPX F A -99 -KPX F Aacute -99 -KPX F Acircumflex -99 -KPX F Adieresis -99 -KPX F Agrave -99 -KPX F Aring -99 -KPX F Atilde -99 +KPX D X -64 +KPX D Y -64 +KPX F A -101 +KPX F Aacute -101 +KPX F Acircumflex -101 +KPX F Adieresis -101 +KPX F Agrave -101 +KPX F Aring -101 +KPX F Atilde -101 KPX F J -88 KPX F O -48 KPX F Odieresis -48 -KPX F a -74 +KPX F a -75 KPX F aacute -75 KPX F adieresis -48 KPX F ae -83 KPX F aring -75 KPX F comma -96 -KPX F e -85 +KPX F e -86 KPX F eacute -86 KPX F hyphen -54 KPX F i -29 @@ -474,12 +558,12 @@ KPX F o -81 KPX F oacute -82 KPX F odieresis -45 KPX F oe -86 -KPX F oslash -82 -KPX F period -97 -KPX F r -32 -KPX F u -36 +KPX F oslash -79 +KPX F period -98 +KPX F r -38 +KPX F u -42 KPX G A -14 -KPX G AE -15 +KPX G AE -20 KPX G Aacute -14 KPX G Acircumflex -14 KPX G Adieresis -14 @@ -491,22 +575,22 @@ KPX G V -27 KPX G W -27 KPX G Y -31 KPX J A -39 -KPX J AE -41 +KPX J AE -42 KPX J Adieresis -39 KPX J Aring -39 -KPX K C -49 -KPX K G -45 -KPX K O -44 -KPX K OE -43 -KPX K Oacute -44 -KPX K Odieresis -44 +KPX K C -51 +KPX K G -46 +KPX K O -43 +KPX K OE -42 +KPX K Oacute -43 +KPX K Odieresis -43 KPX K S -1 KPX K T 0 KPX K a 3 KPX K adieresis 3 KPX K ae -4 KPX K aring 3 -KPX K e -15 +KPX K e -16 KPX K hyphen -30 KPX K o -13 KPX K oacute -13 @@ -515,13 +599,13 @@ KPX K u -8 KPX K udieresis -8 KPX K y -68 KPX L A 28 -KPX L AE 26 +KPX L AE 25 KPX L Aacute 28 KPX L Adieresis 28 KPX L Aring 28 KPX L C 0 KPX L Ccedilla 0 -KPX L G 5 +KPX L G 4 KPX L O 4 KPX L Oacute 4 KPX L Ocircumflex 4 @@ -533,68 +617,68 @@ KPX L T -30 KPX L U -17 KPX L Udieresis -17 KPX L V -77 -KPX L W -75 +KPX L W -74 KPX L Y -41 KPX L hyphen 41 -KPX L quotedblright -46 -KPX L quoteright -68 -KPX L u 6 -KPX L udieresis 6 +KPX L quotedblright -45 +KPX L quoteright -67 +KPX L u 5 +KPX L udieresis 5 KPX L y -23 KPX N A -39 -KPX N AE -40 +KPX N AE -42 KPX N Aacute -39 KPX N Adieresis -39 KPX N Aring -39 -KPX N C -31 +KPX N C -32 KPX N Ccedilla -30 -KPX N G -27 +KPX N G -26 KPX N O -32 KPX N Oacute -32 KPX N Odieresis -32 KPX N a -25 -KPX N aacute -26 -KPX N adieresis -26 -KPX N ae -33 -KPX N aring -26 +KPX N aacute -27 +KPX N adieresis -27 +KPX N ae -34 +KPX N aring -27 KPX N comma -24 -KPX N e -36 +KPX N e -37 KPX N eacute -38 KPX N o -32 KPX N oacute -34 KPX N odieresis -34 -KPX N oslash -34 -KPX N period -25 -KPX N u -32 -KPX N udieresis -32 -KPX O A -56 -KPX O AE -65 -KPX O Aacute -56 -KPX O Adieresis -56 -KPX O Aring -56 +KPX N oslash -32 +KPX N period -26 +KPX N u -33 +KPX N udieresis -33 +KPX O A -57 +KPX O AE -67 +KPX O Aacute -57 +KPX O Adieresis -57 +KPX O Aring -57 KPX O T -18 KPX O V -52 -KPX O W -55 -KPX O X -61 +KPX O W -52 +KPX O X -63 KPX O Y -56 -KPX Oacute A -56 +KPX Oacute A -57 KPX Oacute T -18 KPX Oacute V -52 -KPX Oacute W -55 +KPX Oacute W -52 KPX Oacute Y -56 KPX Ocircumflex T -18 KPX Ocircumflex V -52 KPX Ocircumflex Y -56 -KPX Odieresis A -56 +KPX Odieresis A -57 KPX Odieresis T -18 KPX Odieresis V -52 -KPX Odieresis W -55 -KPX Odieresis X -61 +KPX Odieresis W -52 +KPX Odieresis X -63 KPX Odieresis Y -56 KPX Ograve T -18 KPX Ograve V -52 KPX Ograve Y -56 -KPX Oslash A -56 +KPX Oslash A -57 KPX Otilde T -18 KPX Otilde V -52 KPX Otilde Y -56 @@ -604,41 +688,41 @@ KPX P Aacute -89 KPX P Adieresis -89 KPX P Aring -89 KPX P J -105 -KPX P a -53 -KPX P aacute -53 +KPX P a -50 +KPX P aacute -50 KPX P adieresis -38 -KPX P ae -61 -KPX P aring -53 -KPX P comma -108 -KPX P e -60 -KPX P eacute -60 -KPX P hyphen -57 -KPX P o -55 -KPX P oacute -55 +KPX P ae -58 +KPX P aring -50 +KPX P comma -107 +KPX P e -57 +KPX P eacute -57 +KPX P hyphen -54 +KPX P o -52 +KPX P oacute -52 KPX P odieresis -35 -KPX P oe -60 -KPX P oslash -55 +KPX P oe -57 +KPX P oslash -47 KPX P period -109 KPX R C -33 KPX R Ccedilla -32 KPX R G -28 -KPX R O -33 -KPX R OE -31 -KPX R Oacute -33 -KPX R Odieresis -33 +KPX R O -34 +KPX R OE -32 +KPX R Oacute -34 +KPX R Odieresis -34 KPX R T -24 -KPX R U -43 -KPX R Udieresis -43 +KPX R U -44 +KPX R Udieresis -44 KPX R V -46 -KPX R W -49 +KPX R W -46 KPX R Y -40 KPX R a -1 KPX R aacute -1 KPX R adieresis -1 KPX R ae -9 KPX R aring -1 -KPX R e -20 -KPX R eacute -20 +KPX R e -21 +KPX R eacute -21 KPX R hyphen -30 KPX R o -18 KPX R oacute -18 @@ -649,11 +733,11 @@ KPX R uacute -13 KPX R udieresis -13 KPX R y -12 KPX S A -11 -KPX S AE -12 +KPX S AE -17 KPX S Aacute -11 KPX S Adieresis -11 KPX S Aring -11 -KPX S T -33 +KPX S T -34 KPX S V -20 KPX S W -20 KPX S Y -24 @@ -666,18 +750,18 @@ KPX T Adieresis -52 KPX T Agrave -52 KPX T Aring -52 KPX T Atilde -52 -KPX T C -16 -KPX T G -10 +KPX T C -15 +KPX T G -9 KPX T J -63 -KPX T O -21 +KPX T O -22 KPX T OE -18 -KPX T Oacute -21 -KPX T Ocircumflex -21 -KPX T Odieresis -21 -KPX T Ograve -21 +KPX T Oacute -22 +KPX T Ocircumflex -22 +KPX T Odieresis -22 +KPX T Ograve -22 KPX T Oslash -22 -KPX T Otilde -21 -KPX T S -17 +KPX T Otilde -22 +KPX T S -16 KPX T V 15 KPX T W 15 KPX T Y 11 @@ -694,124 +778,124 @@ KPX T hyphen -74 KPX T i -19 KPX T j -27 KPX T o -90 -KPX T oslash -92 -KPX T period -78 +KPX T oslash -90 +KPX T period -79 KPX T r -76 KPX T s -78 KPX T semicolon -98 -KPX T u -90 +KPX T u -91 KPX T v -89 KPX T w -89 KPX T y -86 KPX U A -65 -KPX U AE -66 +KPX U AE -71 KPX U Aacute -65 KPX U Acircumflex -65 KPX U Adieresis -65 KPX U Aring -65 KPX U Atilde -65 -KPX U comma -39 -KPX U m -34 -KPX U n -38 -KPX U p -28 -KPX U period -40 -KPX U r -30 +KPX U comma -40 +KPX U m -35 +KPX U n -39 +KPX U p -30 +KPX U period -41 +KPX U r -32 KPX Uacute A -65 -KPX Uacute comma -39 -KPX Uacute m -34 -KPX Uacute n -38 -KPX Uacute p -28 -KPX Uacute period -40 -KPX Uacute r -30 +KPX Uacute comma -40 +KPX Uacute m -35 +KPX Uacute n -39 +KPX Uacute p -30 +KPX Uacute period -41 +KPX Uacute r -32 KPX Ucircumflex A -65 KPX Udieresis A -65 KPX Udieresis b 1 -KPX Udieresis comma -39 -KPX Udieresis m -34 -KPX Udieresis n -38 -KPX Udieresis p -28 -KPX Udieresis period -40 -KPX Udieresis r -30 +KPX Udieresis comma -40 +KPX Udieresis m -35 +KPX Udieresis n -39 +KPX Udieresis p -30 +KPX Udieresis period -41 +KPX Udieresis r -32 KPX Ugrave A -65 -KPX V A -98 +KPX V A -100 KPX V AE -111 -KPX V Aacute -98 -KPX V Acircumflex -98 -KPX V Adieresis -98 -KPX V Agrave -98 -KPX V Aring -98 -KPX V Atilde -98 -KPX V C -59 -KPX V G -54 -KPX V O -63 -KPX V Oacute -63 -KPX V Ocircumflex -63 -KPX V Odieresis -63 -KPX V Ograve -63 -KPX V Oslash -63 -KPX V Otilde -63 -KPX V S -28 +KPX V Aacute -100 +KPX V Acircumflex -100 +KPX V Adieresis -100 +KPX V Agrave -100 +KPX V Aring -100 +KPX V Atilde -100 +KPX V C -60 +KPX V G -53 +KPX V O -64 +KPX V Oacute -64 +KPX V Ocircumflex -64 +KPX V Odieresis -64 +KPX V Ograve -64 +KPX V Oslash -64 +KPX V Otilde -64 +KPX V S -25 KPX V T 7 -KPX V a -75 +KPX V a -76 KPX V ae -84 -KPX V colon -95 -KPX V comma -95 -KPX V e -86 -KPX V g -82 -KPX V guillemotleft -98 -KPX V guilsinglleft -108 -KPX V hyphen -61 +KPX V colon -96 +KPX V comma -96 +KPX V e -87 +KPX V g -83 +KPX V guillemotleft -99 +KPX V guilsinglleft -109 +KPX V hyphen -62 KPX V i -12 -KPX V o -82 -KPX V oslash -83 +KPX V o -83 +KPX V oslash -81 KPX V period -97 -KPX V r -39 -KPX V semicolon -95 -KPX V u -43 -KPX V y -33 -KPX W A -82 -KPX W AE -85 -KPX W Aacute -82 -KPX W Acircumflex -82 -KPX W Adieresis -82 -KPX W Agrave -82 -KPX W Aring -82 -KPX W Atilde -82 -KPX W C -47 -KPX W G -42 -KPX W O -48 -KPX W Oacute -48 -KPX W Ocircumflex -48 -KPX W Odieresis -48 -KPX W Ograve -48 +KPX V r -44 +KPX V semicolon -96 +KPX V u -47 +KPX V y -34 +KPX W A -83 +KPX W AE -87 +KPX W Aacute -83 +KPX W Acircumflex -83 +KPX W Adieresis -83 +KPX W Agrave -83 +KPX W Aring -83 +KPX W Atilde -83 +KPX W C -46 +KPX W G -41 +KPX W O -47 +KPX W Oacute -47 +KPX W Ocircumflex -47 +KPX W Odieresis -47 +KPX W Ograve -47 KPX W Oslash -48 -KPX W Otilde -48 -KPX W S -32 -KPX W T 7 +KPX W Otilde -47 +KPX W S -24 +KPX W T 8 KPX W a -51 KPX W ae -60 KPX W colon -78 KPX W comma -62 -KPX W e -63 +KPX W e -62 KPX W g -63 KPX W guillemotleft -74 KPX W guilsinglleft -84 KPX W hyphen -37 -KPX W i -12 +KPX W i -11 KPX W o -58 -KPX W oslash -60 -KPX W period -63 -KPX W r -32 +KPX W oslash -57 +KPX W period -64 +KPX W r -34 KPX W semicolon -79 -KPX W u -36 -KPX W y -26 -KPX X C -56 -KPX X O -57 -KPX X Odieresis -57 -KPX X Q -57 +KPX W u -38 +KPX W y -25 +KPX X C -58 +KPX X O -56 +KPX X Odieresis -56 +KPX X Q -58 KPX X a -9 -KPX X e -28 -KPX X hyphen -45 +KPX X e -29 +KPX X hyphen -46 KPX X o -26 KPX X u -21 KPX X y -81 @@ -824,15 +908,15 @@ KPX Y Agrave -45 KPX Y Aring -45 KPX Y Atilde -45 KPX Y C -59 -KPX Y G -55 -KPX Y O -60 -KPX Y Oacute -60 -KPX Y Ocircumflex -60 -KPX Y Odieresis -60 -KPX Y Ograve -60 -KPX Y Oslash -60 -KPX Y Otilde -60 -KPX Y S -28 +KPX Y G -54 +KPX Y O -61 +KPX Y Oacute -61 +KPX Y Ocircumflex -61 +KPX Y Odieresis -61 +KPX Y Ograve -61 +KPX Y Oslash -61 +KPX Y Otilde -61 +KPX Y S -25 KPX Y T 7 KPX Y a -69 KPX Y ae -77 @@ -842,17 +926,17 @@ KPX Y e -80 KPX Y g -81 KPX Y guillemotleft -97 KPX Y guilsinglleft -107 -KPX Y hyphen -64 +KPX Y hyphen -63 KPX Y i -12 KPX Y o -76 -KPX Y oslash -77 -KPX Y p -50 +KPX Y oslash -75 +KPX Y p -54 KPX Y period -69 KPX Y semicolon -91 -KPX Y u -56 +KPX Y u -59 KPX Y v -54 -KPX Z v -27 -KPX Z y -38 +KPX Z v -29 +KPX Z y -39 KPX a j -2 KPX a quoteright -22 KPX a v -5 @@ -879,9 +963,9 @@ KPX b y -17 KPX c h -20 KPX c k -16 KPX comma one -26 -KPX comma quotedblright -3 -KPX comma quoteright -25 -KPX e quoteright -13 +KPX comma quotedblright -1 +KPX comma quoteright -23 +KPX e quoteright -12 KPX e t -3 KPX e v -3 KPX e w -3 @@ -899,8 +983,8 @@ KPX eight seven -13 KPX f a -23 KPX f aacute -24 KPX f adieresis 17 -KPX f ae -31 -KPX f aring -21 +KPX f ae -32 +KPX f aring -20 KPX f e -35 KPX f eacute -36 KPX f f 2 @@ -911,7 +995,7 @@ KPX f o -30 KPX f oacute -31 KPX f odieresis 20 KPX f oe -35 -KPX f oslash -31 +KPX f oslash -29 KPX f quoteright 12 KPX f s -14 KPX f t 9 @@ -931,36 +1015,36 @@ KPX g l -21 KPX g oacute -27 KPX g odieresis -27 KPX g r 3 -KPX guillemotright A -28 -KPX guillemotright AE -37 -KPX guillemotright Aacute -28 -KPX guillemotright Adieresis -28 -KPX guillemotright Aring -28 -KPX guillemotright T -75 +KPX guillemotright A -30 +KPX guillemotright AE -39 +KPX guillemotright Aacute -30 +KPX guillemotright Adieresis -30 +KPX guillemotright Aring -30 +KPX guillemotright T -76 KPX guillemotright V -79 KPX guillemotright W -75 -KPX guillemotright Y -82 -KPX guilsinglright A -38 -KPX guilsinglright AE -47 -KPX guilsinglright Aacute -38 -KPX guilsinglright Adieresis -38 -KPX guilsinglright Aring -38 -KPX guilsinglright T -85 +KPX guillemotright Y -83 +KPX guilsinglright A -40 +KPX guilsinglright AE -49 +KPX guilsinglright Aacute -40 +KPX guilsinglright Adieresis -40 +KPX guilsinglright Aring -40 +KPX guilsinglright T -86 KPX guilsinglright V -89 KPX guilsinglright W -85 -KPX guilsinglright Y -92 -KPX h quoteright -33 +KPX guilsinglright Y -93 +KPX h quoteright -32 KPX h y -20 -KPX hyphen A -11 -KPX hyphen AE -20 -KPX hyphen Aacute -11 -KPX hyphen Adieresis -11 -KPX hyphen Aring -11 +KPX hyphen A -13 +KPX hyphen AE -22 +KPX hyphen Aacute -13 +KPX hyphen Adieresis -13 +KPX hyphen Aring -13 KPX hyphen T -59 KPX hyphen V -62 KPX hyphen W -59 KPX hyphen Y -69 -KPX i T -21 +KPX i T -20 KPX i j -5 KPX k a 10 KPX k aacute 10 @@ -970,8 +1054,8 @@ KPX k aring 10 KPX k comma 19 KPX k e -2 KPX k eacute -2 -KPX k g -13 -KPX k hyphen 0 +KPX k g -14 +KPX k hyphen 1 KPX k o 1 KPX k oacute 1 KPX k odieresis 1 @@ -981,13 +1065,13 @@ KPX k u 2 KPX k udieresis 2 KPX l v -12 KPX l y -8 -KPX m p 0 +KPX m p -1 KPX m v -16 KPX m w -16 KPX m y -16 -KPX n T -57 -KPX n p -3 -KPX n quoteright -33 +KPX n T -59 +KPX n p -4 +KPX n quoteright -32 KPX n v -20 KPX n w -20 KPX n y -20 @@ -1000,23 +1084,23 @@ KPX o t -2 KPX o v -21 KPX o w -21 KPX o x -26 -KPX o y -28 +KPX o y -29 KPX oacute v -21 KPX oacute w -21 -KPX oacute y -28 +KPX oacute y -29 KPX ocircumflex t -4 KPX odieresis t -4 KPX odieresis v -21 KPX odieresis w -21 KPX odieresis x -26 -KPX odieresis y -28 +KPX odieresis y -29 KPX ograve v -21 KPX ograve w -21 -KPX ograve y -28 +KPX ograve y -29 KPX one comma -38 -KPX one eight -55 +KPX one eight -56 KPX one five -45 -KPX one four -74 +KPX one four -75 KPX one nine -40 KPX one one -48 KPX one period -39 @@ -1025,61 +1109,61 @@ KPX one six -62 KPX one three -43 KPX one two -32 KPX one zero -48 -KPX p t -3 -KPX p y -12 +KPX p t -2 +KPX p y -13 KPX period one -32 -KPX period quotedblright -7 -KPX period quoteright -29 +KPX period quotedblright -5 +KPX period quoteright -27 KPX q c -6 -KPX q u -3 -KPX quotedblbase A 25 -KPX quotedblbase AE 23 -KPX quotedblbase T -38 +KPX q u -5 +KPX quotedblbase A 24 +KPX quotedblbase AE 19 +KPX quotedblbase T -37 KPX quotedblbase V -79 -KPX quotedblbase W -75 +KPX quotedblbase W -74 KPX quotedblbase Y -48 -KPX quotedblleft A -75 +KPX quotedblleft A -76 KPX quotedblleft AE -98 -KPX quotedblleft Aacute -75 -KPX quotedblleft Adieresis -75 -KPX quotedblleft Aring -75 +KPX quotedblleft Aacute -76 +KPX quotedblleft Adieresis -76 +KPX quotedblleft Aring -76 KPX quotedblleft T -11 KPX quotedblleft V 3 KPX quotedblleft W 3 KPX quotedblleft Y 0 -KPX quotedblright A -71 +KPX quotedblright A -72 KPX quotedblright AE -94 -KPX quotedblright Aacute -71 -KPX quotedblright Adieresis -71 -KPX quotedblright Aring -71 +KPX quotedblright Aacute -72 +KPX quotedblright Adieresis -72 +KPX quotedblright Aring -72 KPX quotedblright T -1 KPX quotedblright V 6 KPX quotedblright W 6 KPX quotedblright Y 2 -KPX quoteleft A -82 +KPX quoteleft A -83 KPX quoteleft AE -105 -KPX quoteleft Aacute -82 -KPX quoteleft Adieresis -82 -KPX quoteleft Aring -82 +KPX quoteleft Aacute -83 +KPX quoteleft Adieresis -83 +KPX quoteleft Aring -83 KPX quoteleft T -18 KPX quoteleft V -3 KPX quoteleft W -3 KPX quoteleft Y -7 -KPX quoteright A -93 -KPX quoteright AE -115 -KPX quoteright Aacute -93 -KPX quoteright Adieresis -93 -KPX quoteright Aring -93 -KPX quoteright comma -55 +KPX quoteright A -94 +KPX quoteright AE -116 +KPX quoteright Aacute -94 +KPX quoteright Adieresis -94 +KPX quoteright Aring -94 +KPX quoteright comma -57 KPX quoteright d -50 -KPX quoteright o -49 -KPX quoteright period -57 -KPX quoteright r -24 -KPX quoteright s -25 +KPX quoteright o -50 +KPX quoteright period -59 +KPX quoteright r -26 +KPX quoteright s -26 KPX quoteright t -19 KPX quoteright v -23 KPX quoteright w -23 -KPX quoteright y -17 +KPX quoteright y -18 KPX r a -13 KPX r aacute -13 KPX r acircumflex -13 @@ -1090,7 +1174,7 @@ KPX r aring -13 KPX r c -15 KPX r ccedilla -8 KPX r colon -30 -KPX r comma -68 +KPX r comma -67 KPX r d -14 KPX r e -20 KPX r eacute -20 @@ -1102,8 +1186,8 @@ KPX r h -16 KPX r hyphen -13 KPX r i 17 KPX r j 12 -KPX r k -12 -KPX r l -13 +KPX r k -11 +KPX r l -12 KPX r m 10 KPX r n 6 KPX r o -15 @@ -1112,7 +1196,7 @@ KPX r ocircumflex -15 KPX r odieresis -15 KPX r oe -19 KPX r ograve -15 -KPX r oslash -15 +KPX r oslash -12 KPX r p 16 KPX r period -69 KPX r q -19 @@ -1121,7 +1205,7 @@ KPX r r 14 KPX r s 1 KPX r semicolon -30 KPX r t 12 -KPX r u 10 +KPX r u 11 KPX r v 20 KPX r w 20 KPX r x 7 @@ -1130,12 +1214,16 @@ KPX r z 10 KPX s quoteright -22 KPX s t -6 KPX seven colon -90 -KPX seven comma -79 +KPX seven comma -80 +KPX seven eight -46 +KPX seven five -60 KPX seven four -79 KPX seven one -43 KPX seven period -81 KPX seven seven -27 -KPX seven six -59 +KPX seven six -60 +KPX seven three -42 +KPX seven two -30 KPX six four 2 KPX six one -52 KPX six seven -32 @@ -1160,7 +1248,7 @@ KPX three seven -27 KPX two four -8 KPX two one -48 KPX two seven -27 -KPX u quoteright -34 +KPX u quoteright -33 KPX v a -20 KPX v aacute -20 KPX v acircumflex -20 @@ -1183,9 +1271,9 @@ KPX v o -24 KPX v oacute -24 KPX v odieresis -24 KPX v ograve -24 -KPX v oslash -24 +KPX v oslash -22 KPX v period -51 -KPX v s -18 +KPX v s -19 KPX v semicolon -51 KPX w a -24 KPX w aacute -24 @@ -1204,21 +1292,21 @@ KPX w ecircumflex -34 KPX w egrave -34 KPX w g -26 KPX w hyphen -7 -KPX w l -29 +KPX w l -28 KPX w o -30 KPX w oacute -30 KPX w odieresis -30 KPX w ograve -30 -KPX w oslash -30 +KPX w oslash -28 KPX w period -53 KPX w s -24 KPX w semicolon -56 KPX x a -1 -KPX x c -9 -KPX x e -13 -KPX x eacute -13 -KPX x o -10 -KPX x q -11 +KPX x c -10 +KPX x e -14 +KPX x eacute -14 +KPX x o -11 +KPX x q -12 KPX y a -11 KPX y aacute -12 KPX y acircumflex -12 @@ -1241,7 +1329,7 @@ KPX y o -17 KPX y oacute -19 KPX y odieresis -19 KPX y ograve -19 -KPX y oslash -19 +KPX y oslash -17 KPX y period -26 KPX y s -13 KPX y semicolon -44 diff --git a/misc/gs_afm/TimesO.afm b/misc/gs_afm/TimesO.afm index b643994a97..2ebe8d247b 100644 --- a/misc/gs_afm/TimesO.afm +++ b/misc/gs_afm/TimesO.afm @@ -1,1253 +1,1341 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 2/11/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. -FontName NimbusRomNo9L-ReguItal -FullName Nimbus Roman No9 L Regular Italic -FamilyName Nimbus Roman No9 L +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. +FontName NimbusMonL-Regu +FullName Nimbus Mono L Regular +FamilyName Nimbus Mono L Weight Regular -ItalicAngle -15.0 +ItalicAngle 0.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -169 -217 1010 904 -CapHeight 653 -XHeight 432 -Descender -205 -Ascender 683 -StartCharMetrics 232 -C 32 ; WX 250 ; N space ; B 125 0 125 0 ; -C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ; -C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ; -C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ; -C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ; -C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ; -C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ; -C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ; -C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ; -C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ; -C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ; -C 43 ; WX 675 ; N plus ; B 86 0 590 506 ; -C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ; -C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ; -C 46 ; WX 250 ; N period ; B 27 -11 138 100 ; -C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ; -C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ; -C 49 ; WX 500 ; N one ; B 49 0 409 676 ; -C 50 ; WX 500 ; N two ; B 12 0 452 676 ; -C 51 ; WX 500 ; N three ; B 15 -7 465 676 ; -C 52 ; WX 500 ; N four ; B 1 0 479 676 ; -C 53 ; WX 500 ; N five ; B 15 -7 491 666 ; -C 54 ; WX 500 ; N six ; B 30 -7 521 686 ; -C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ; -C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ; -C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ; -C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ; -C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ; -C 60 ; WX 675 ; N less ; B 84 -10 592 516 ; -C 61 ; WX 675 ; N equal ; B 86 120 590 386 ; -C 62 ; WX 675 ; N greater ; B 84 -10 592 516 ; -C 63 ; WX 500 ; N question ; B 132 -12 472 664 ; -C 64 ; WX 920 ; N at ; B 118 -18 806 666 ; -C 65 ; WX 611 ; N A ; B -51 0 564 668 ; -C 66 ; WX 611 ; N B ; B -8 0 588 653 ; -C 67 ; WX 667 ; N C ; B 66 -18 689 666 ; -C 68 ; WX 722 ; N D ; B -8 0 700 653 ; -C 69 ; WX 611 ; N E ; B -1 0 634 653 ; -C 70 ; WX 611 ; N F ; B 8 0 645 653 ; -C 71 ; WX 722 ; N G ; B 52 -18 722 666 ; -C 72 ; WX 722 ; N H ; B -8 0 767 653 ; -C 73 ; WX 333 ; N I ; B -8 0 384 653 ; -C 74 ; WX 444 ; N J ; B -6 -18 491 653 ; -C 75 ; WX 667 ; N K ; B 7 0 722 653 ; -C 76 ; WX 556 ; N L ; B -8 0 559 653 ; -C 77 ; WX 833 ; N M ; B -18 0 873 653 ; -C 78 ; WX 667 ; N N ; B -20 -15 727 653 ; -C 79 ; WX 722 ; N O ; B 60 -18 706 666 ; -C 80 ; WX 611 ; N P ; B 0 0 605 653 ; -C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ; -C 82 ; WX 611 ; N R ; B -13 0 588 653 ; -C 83 ; WX 500 ; N S ; B 17 -18 508 667 ; -C 84 ; WX 556 ; N T ; B 59 0 633 653 ; -C 85 ; WX 722 ; N U ; B 102 -18 765 653 ; -C 86 ; WX 611 ; N V ; B 76 -18 688 653 ; -C 87 ; WX 833 ; N W ; B 71 -18 906 653 ; -C 88 ; WX 611 ; N X ; B -29 0 655 653 ; -C 89 ; WX 556 ; N Y ; B 78 0 633 653 ; -C 90 ; WX 556 ; N Z ; B -6 0 606 653 ; -C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ; -C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ; -C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ; -C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ; -C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; -C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ; -C 97 ; WX 500 ; N a ; B 17 -11 476 441 ; -C 98 ; WX 500 ; N b ; B 23 -11 473 683 ; -C 99 ; WX 444 ; N c ; B 30 -11 425 441 ; -C 100 ; WX 500 ; N d ; B 15 -13 527 683 ; -C 101 ; WX 444 ; N e ; B 31 -11 412 441 ; -C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; -C 103 ; WX 500 ; N g ; B 8 -206 472 441 ; -C 104 ; WX 500 ; N h ; B 19 -9 478 683 ; -C 105 ; WX 278 ; N i ; B 49 -11 264 654 ; -C 106 ; WX 278 ; N j ; B -124 -207 276 654 ; -C 107 ; WX 444 ; N k ; B 14 -11 461 683 ; -C 108 ; WX 278 ; N l ; B 41 -11 279 683 ; -C 109 ; WX 722 ; N m ; B 12 -9 704 441 ; -C 110 ; WX 500 ; N n ; B 14 -9 474 441 ; -C 111 ; WX 500 ; N o ; B 27 -11 468 441 ; -C 112 ; WX 500 ; N p ; B -75 -205 469 441 ; -C 113 ; WX 500 ; N q ; B 25 -209 483 441 ; -C 114 ; WX 389 ; N r ; B 45 0 412 441 ; -C 115 ; WX 389 ; N s ; B 16 -13 366 442 ; -C 116 ; WX 278 ; N t ; B 37 -11 296 546 ; -C 117 ; WX 500 ; N u ; B 42 -11 475 441 ; -C 118 ; WX 444 ; N v ; B 21 -18 426 441 ; -C 119 ; WX 667 ; N w ; B 16 -18 648 441 ; -C 120 ; WX 444 ; N x ; B -27 -11 447 441 ; -C 121 ; WX 444 ; N y ; B -24 -206 426 441 ; -C 122 ; WX 389 ; N z ; B -2 -81 380 428 ; -C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ; -C 124 ; WX 275 ; N bar ; B 105 -18 171 666 ; -C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ; -C 126 ; WX 541 ; N asciitilde ; B 40 186 502 320 ; -C 161 ; WX 389 ; N exclamdown ; B 59 -205 321 474 ; -C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ; -C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ; -C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ; -C 165 ; WX 500 ; N yen ; B 27 0 603 653 ; -C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ; -C 167 ; WX 500 ; N section ; B 53 -162 461 666 ; -C 168 ; WX 500 ; N currency ; B -22 53 522 597 ; -C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ; -C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ; -C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ; -C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ; -C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ; -C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ; -C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ; -C 177 ; WX 500 ; N endash ; B -6 197 505 243 ; -C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ; -C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ; -C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; -C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ; -C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ; -C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ; -C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ; -C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ; -C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ; -C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ; -C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ; -C 191 ; WX 500 ; N questiondown ; B 28 -205 367 473 ; -C 193 ; WX 333 ; N grave ; B 121 492 311 664 ; -C 194 ; WX 333 ; N acute ; B 180 494 403 664 ; -C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ; -C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ; -C 197 ; WX 333 ; N macron ; B 99 532 411 583 ; -C 198 ; WX 333 ; N breve ; B 117 492 418 650 ; -C 199 ; WX 333 ; N dotaccent ; B 207 508 305 606 ; -C 200 ; WX 333 ; N dieresis ; B 107 508 405 606 ; -C 202 ; WX 333 ; N ring ; B 155 508 355 707 ; -C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ; -C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ; -C 206 ; WX 333 ; N ogonek ; B -20 -169 200 40 ; -C 207 ; WX 333 ; N caron ; B 121 492 426 661 ; -C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ; -C 225 ; WX 889 ; N AE ; B -27 0 911 653 ; -C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ; -C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ; -C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ; -C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ; -C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ; -C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ; -C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ; -C 248 ; WX 278 ; N lslash ; B 37 -11 307 683 ; -C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ; -C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ; -C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ; -C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ; -C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ; -C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ; -C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ; -C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ; -C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ; -C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ; -C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ; -C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ; -C -1 ; WX 250 ; N middot ; B 70 199 181 310 ; -C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ; -C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ; -C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ; -C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ; -C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ; -C -1 ; WX 722 ; N Otilde ; B 60 -18 706 836 ; -C -1 ; WX 333 ; N sfthyphen ; B 49 192 282 255 ; -C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ; -C -1 ; WX 500 ; N aring ; B 17 -11 476 707 ; -C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ; -C -1 ; WX 722 ; N Ograve ; B 60 -18 706 876 ; -C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 706 873 ; -C -1 ; WX 722 ; N Odieresis ; B 60 -18 706 818 ; -C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ; -C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ; -C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ; -C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ; -C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ; -C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ; -C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ; -C -1 ; WX 333 ; N Iacute ; B -8 0 403 876 ; -C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ; -C -1 ; WX 400 ; N degree ; B 101 390 387 676 ; -C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ; -C -1 ; WX 675 ; N minus ; B 86 220 590 286 ; -C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ; -C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ; -C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ; -C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ; -C -1 ; WX 722 ; N Oacute ; B 60 -18 706 876 ; -C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ; -C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ; -C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ; -C -1 ; WX 444 ; N ccedilla ; B 26 -217 425 441 ; -C -1 ; WX 278 ; N idieresis ; B 49 -11 353 606 ; -C -1 ; WX 278 ; N iacute ; B 49 -11 356 664 ; -C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ; -C -1 ; WX 675 ; N plusminus ; B 86 0 590 568 ; -C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ; -C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ; -C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ; -C -1 ; WX 278 ; N icircumflex ; B 34 -11 328 661 ; -C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ; -C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ; -C -1 ; WX 611 ; N Aring ; B -51 0 564 904 ; -C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ; -C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ; -C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ; -C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ; -C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ; -C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ; -C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ; -C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ; -C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ; -C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ; -C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ; -C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ; -C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ; -C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ; -C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ; -C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ; -C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ; -C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ; -C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ; -C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ; -C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ; -C -1 ; WX 275 ; N brokenbar ; B 105 -18 171 666 ; -C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ; -C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ; -C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ; -C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; +FontBBox -12 -237 650 811 +CapHeight 563 +XHeight 417 +Descender -186 +Ascender 604 +StartCharMetrics 316 +C 32 ; WX 600 ; N space ; B 295 0 295 0 ; +C 33 ; WX 600 ; N exclam ; B 240 -15 360 618 ; +C 34 ; WX 600 ; N quotedbl ; B 146 315 454 604 ; +C 35 ; WX 600 ; N numbersign ; B 92 -62 508 647 ; +C 36 ; WX 600 ; N dollar ; B 113 -92 487 655 ; +C 37 ; WX 600 ; N percent ; B 87 -12 513 611 ; +C 38 ; WX 600 ; N ampersand ; B 105 -16 478 519 ; +C 39 ; WX 600 ; N quoteright ; B 135 314 340 604 ; +C 40 ; WX 600 ; N parenleft ; B 294 -124 458 604 ; +C 41 ; WX 600 ; N parenright ; B 147 -124 311 604 ; +C 42 ; WX 600 ; N asterisk ; B 113 250 487 604 ; +C 43 ; WX 600 ; N plus ; B 72 32 528 530 ; +C 44 ; WX 600 ; N comma ; B 135 -145 340 145 ; +C 45 ; WX 600 ; N hyphen ; B 72 258 528 299 ; +C 46 ; WX 600 ; N period ; B 226 -15 374 116 ; +C 47 ; WX 600 ; N slash ; B 113 -81 487 668 ; +C 48 ; WX 600 ; N zero ; B 113 -15 487 618 ; +C 49 ; WX 600 ; N one ; B 113 0 487 612 ; +C 50 ; WX 600 ; N two ; B 84 0 478 618 ; +C 51 ; WX 600 ; N three ; B 96 -15 499 618 ; +C 52 ; WX 600 ; N four ; B 105 0 478 604 ; +C 53 ; WX 600 ; N five ; B 96 -15 499 604 ; +C 54 ; WX 600 ; N six ; B 136 -15 510 618 ; +C 55 ; WX 600 ; N seven ; B 105 -1 478 604 ; +C 56 ; WX 600 ; N eight ; B 113 -15 487 618 ; +C 57 ; WX 600 ; N nine ; B 136 -15 510 618 ; +C 58 ; WX 600 ; N colon ; B 226 -15 374 417 ; +C 59 ; WX 600 ; N semicolon ; B 139 -145 350 417 ; +C 60 ; WX 600 ; N less ; B 72 44 522 518 ; +C 61 ; WX 600 ; N equal ; B 51 190 549 375 ; +C 62 ; WX 600 ; N greater ; B 78 44 528 518 ; +C 63 ; WX 600 ; N question ; B 134 -15 487 577 ; +C 64 ; WX 600 ; N at ; B 105 -62 478 624 ; +C 65 ; WX 600 ; N A ; B 9 0 591 563 ; +C 66 ; WX 600 ; N B ; B 43 0 541 563 ; +C 67 ; WX 600 ; N C ; B 63 -16 534 576 ; +C 68 ; WX 600 ; N D ; B 43 0 520 563 ; +C 69 ; WX 600 ; N E ; B 43 0 520 563 ; +C 70 ; WX 600 ; N F ; B 43 0 520 563 ; +C 71 ; WX 600 ; N G ; B 63 -16 562 576 ; +C 72 ; WX 600 ; N H ; B 53 0 551 563 ; +C 73 ; WX 600 ; N I ; B 113 0 487 563 ; +C 74 ; WX 600 ; N J ; B 84 -16 583 563 ; +C 75 ; WX 600 ; N K ; B 43 0 572 563 ; +C 76 ; WX 600 ; N L ; B 63 0 541 563 ; +C 77 ; WX 600 ; N M ; B 11 0 593 563 ; +C 78 ; WX 600 ; N N ; B 22 0 562 563 ; +C 79 ; WX 600 ; N O ; B 51 -16 549 576 ; +C 80 ; WX 600 ; N P ; B 43 0 499 563 ; +C 81 ; WX 600 ; N Q ; B 51 -115 549 576 ; +C 82 ; WX 600 ; N R ; B 43 0 589 563 ; +C 83 ; WX 600 ; N S ; B 92 -16 508 576 ; +C 84 ; WX 600 ; N T ; B 72 0 528 563 ; +C 85 ; WX 600 ; N U ; B 40 -16 560 563 ; +C 86 ; WX 600 ; N V ; B 9 0 591 563 ; +C 87 ; WX 600 ; N W ; B 20 0 580 563 ; +C 88 ; WX 600 ; N X ; B 40 0 560 563 ; +C 89 ; WX 600 ; N Y ; B 51 0 549 563 ; +C 90 ; WX 600 ; N Z ; B 103 0 497 563 ; +C 91 ; WX 600 ; N bracketleft ; B 280 -124 445 604 ; +C 92 ; WX 600 ; N backslash ; B 113 -81 487 668 ; +C 93 ; WX 600 ; N bracketright ; B 155 -124 320 604 ; +C 94 ; WX 600 ; N asciicircum ; B 113 354 487 615 ; +C 95 ; WX 600 ; N underscore ; B -12 -125 612 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 260 343 465 604 ; +C 97 ; WX 600 ; N a ; B 72 -16 541 431 ; +C 98 ; WX 600 ; N b ; B 22 -16 541 604 ; +C 99 ; WX 600 ; N c ; B 84 -16 535 431 ; +C 100 ; WX 600 ; N d ; B 63 -16 583 604 ; +C 101 ; WX 600 ; N e ; B 63 -16 520 431 ; +C 102 ; WX 600 ; N f ; B 105 0 541 604 ; +C 103 ; WX 600 ; N g ; B 63 -186 562 431 ; +C 104 ; WX 600 ; N h ; B 43 0 551 604 ; +C 105 ; WX 600 ; N i ; B 92 0 508 624 ; +C 106 ; WX 600 ; N j ; B 147 -186 458 624 ; +C 107 ; WX 600 ; N k ; B 63 0 541 604 ; +C 108 ; WX 600 ; N l ; B 92 0 508 604 ; +C 109 ; WX 600 ; N m ; B 11 0 593 431 ; +C 110 ; WX 600 ; N n ; B 53 0 541 431 ; +C 111 ; WX 600 ; N o ; B 72 -16 528 431 ; +C 112 ; WX 600 ; N p ; B 22 -186 541 431 ; +C 113 ; WX 600 ; N q ; B 63 -186 583 431 ; +C 114 ; WX 600 ; N r ; B 84 0 541 427 ; +C 115 ; WX 600 ; N s ; B 103 -16 497 431 ; +C 116 ; WX 600 ; N t ; B 43 -16 499 563 ; +C 117 ; WX 600 ; N u ; B 43 -16 541 417 ; +C 118 ; WX 600 ; N v ; B 30 0 570 417 ; +C 119 ; WX 600 ; N w ; B 30 0 570 417 ; +C 120 ; WX 600 ; N x ; B 51 0 549 417 ; +C 121 ; WX 600 ; N y ; B 51 -186 549 417 ; +C 122 ; WX 600 ; N z ; B 115 0 489 417 ; +C 123 ; WX 600 ; N braceleft ; B 197 -124 403 604 ; +C 124 ; WX 600 ; N bar ; B 280 -124 320 604 ; +C 125 ; WX 600 ; N braceright ; B 197 -124 403 604 ; +C 126 ; WX 600 ; N asciitilde ; B 92 212 508 348 ; +C 161 ; WX 600 ; N exclamdown ; B 240 -216 360 417 ; +C 162 ; WX 600 ; N cent ; B 113 -13 469 630 ; +C 163 ; WX 600 ; N sterling ; B 63 0 520 578 ; +C 164 ; WX 600 ; N fraction ; B 50 138 549 470 ; +C 165 ; WX 600 ; N yen ; B 51 0 549 563 ; +C 166 ; WX 600 ; N florin ; B 87 -93 518 618 ; +C 167 ; WX 600 ; N section ; B 66 -62 534 603 ; +C 168 ; WX 600 ; N currency ; B 103 95 497 489 ; +C 169 ; WX 600 ; N quotesingle ; B 236 315 364 604 ; +C 170 ; WX 600 ; N quotedblleft ; B 93 343 507 604 ; +C 171 ; WX 600 ; N guillemotleft ; B 63 0 541 417 ; +C 172 ; WX 600 ; N guilsinglleft ; B 63 0 312 417 ; +C 173 ; WX 600 ; N guilsinglright ; B 293 0 541 417 ; +C 174 ; WX 600 ; N fi ; B 10 0 585 624 ; +C 175 ; WX 600 ; N fl ; B 10 0 587 604 ; +C 177 ; WX 600 ; N endash ; B 72 261 528 302 ; +C 178 ; WX 600 ; N dagger ; B 124 -63 476 604 ; +C 179 ; WX 600 ; N daggerdbl ; B 124 -62 476 604 ; +C 180 ; WX 600 ; N periodcentered ; B 226 217 374 348 ; +C 182 ; WX 600 ; N paragraph ; B 79 -62 525 604 ; +C 183 ; WX 600 ; N bullet ; B 202 141 398 337 ; +C 184 ; WX 600 ; N quotesinglbase ; B 135 -145 340 145 ; +C 185 ; WX 600 ; N quotedblbase ; B 93 -116 507 145 ; +C 186 ; WX 600 ; N quotedblright ; B 93 343 507 604 ; +C 187 ; WX 600 ; N guillemotright ; B 63 0 541 417 ; +C 188 ; WX 600 ; N ellipsis ; B 51 -15 549 84 ; +C 189 ; WX 600 ; N perthousand ; B 34 -9 564 614 ; +C 191 ; WX 600 ; N questiondown ; B 113 -175 466 417 ; +C 193 ; WX 600 ; N grave ; B 155 490 320 639 ; +C 194 ; WX 600 ; N acute ; B 280 490 445 639 ; +C 195 ; WX 600 ; N circumflex ; B 155 490 445 639 ; +C 196 ; WX 600 ; N tilde ; B 145 516 455 605 ; +C 197 ; WX 600 ; N macron ; B 155 536 445 576 ; +C 198 ; WX 600 ; N breve ; B 155 490 445 620 ; +C 199 ; WX 600 ; N dotaccent ; B 250 511 350 611 ; +C 200 ; WX 600 ; N dieresis ; B 140 511 461 611 ; +C 202 ; WX 600 ; N ring ; B 207 480 393 661 ; +C 203 ; WX 600 ; N cedilla ; B 210 -173 377 0 ; +C 205 ; WX 600 ; N hungarumlaut ; B 155 490 445 633 ; +C 206 ; WX 600 ; N ogonek ; B 280 -155 433 0 ; +C 207 ; WX 600 ; N caron ; B 155 490 445 639 ; +C 208 ; WX 600 ; N emdash ; B 1 261 599 302 ; +C 225 ; WX 600 ; N AE ; B 10 0 590 563 ; +C 227 ; WX 600 ; N ordfeminine ; B 155 279 447 574 ; +C 232 ; WX 600 ; N Lslash ; B 43 0 541 563 ; +C 233 ; WX 600 ; N Oslash ; B 40 -43 560 605 ; +C 234 ; WX 600 ; N OE ; B 10 0 590 563 ; +C 235 ; WX 600 ; N ordmasculine ; B 154 284 448 577 ; +C 241 ; WX 600 ; N ae ; B 12 -16 578 431 ; +C 245 ; WX 600 ; N dotlessi ; B 92 0 508 417 ; +C 248 ; WX 600 ; N lslash ; B 92 0 508 604 ; +C 249 ; WX 600 ; N oslash ; B 53 -43 543 458 ; +C 250 ; WX 600 ; N oe ; B 12 -16 578 431 ; +C 251 ; WX 600 ; N germandbls ; B 43 -16 499 604 ; +C -1 ; WX 600 ; N Udieresis ; B 40 -16 560 761 ; +C -1 ; WX 600 ; N Uacute ; B 40 -16 560 789 ; +C -1 ; WX 600 ; N Scedilla ; B 92 -173 508 576 ; +C -1 ; WX 600 ; N Tcaron ; B 72 0 528 789 ; +C -1 ; WX 600 ; N Scaron ; B 92 -16 508 789 ; +C -1 ; WX 600 ; N Rcaron ; B 43 0 589 789 ; +C -1 ; WX 600 ; N Racute ; B 43 0 589 789 ; +C -1 ; WX 600 ; N Sacute ; B 92 -16 508 789 ; +C -1 ; WX 600 ; N Otilde ; B 51 -16 549 755 ; +C -1 ; WX 600 ; N ucircumflex ; B 43 -16 541 639 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 51 -16 549 783 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 40 -16 560 783 ; +C -1 ; WX 600 ; N Yacute ; B 51 0 549 789 ; +C -1 ; WX 600 ; N Eth ; B 0 0 520 563 ; +C -1 ; WX 600 ; N Dcroat ; B 0 0 520 563 ; +C -1 ; WX 600 ; N Zacute ; B 103 0 497 789 ; +C -1 ; WX 600 ; N Uring ; B 40 -16 560 811 ; +C -1 ; WX 600 ; N gbreve ; B 63 -186 562 620 ; +C -1 ; WX 600 ; N eogonek ; B 63 -155 520 431 ; +C -1 ; WX 600 ; N edotaccent ; B 63 -16 520 611 ; +C -1 ; WX 600 ; N ecaron ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N Ugrave ; B 40 -16 560 789 ; +C -1 ; WX 600 ; N Thorn ; B 43 0 499 563 ; +C -1 ; WX 600 ; N eacute ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N edieresis ; B 63 -16 520 611 ; +C -1 ; WX 600 ; N dcaron ; B 63 -16 650 616 ; +C -1 ; WX 600 ; N ccedilla ; B 84 -173 535 431 ; +C -1 ; WX 600 ; N ccaron ; B 84 -16 535 639 ; +C -1 ; WX 600 ; N cacute ; B 84 -16 535 639 ; +C -1 ; WX 600 ; N aogonek ; B 72 -155 556 431 ; +C -1 ; WX 600 ; N aring ; B 72 -16 541 661 ; +C -1 ; WX 600 ; N atilde ; B 72 -16 541 605 ; +C -1 ; WX 600 ; N abreve ; B 72 -16 541 620 ; +C -1 ; WX 600 ; N egrave ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N agrave ; B 72 -16 541 639 ; +C -1 ; WX 600 ; N aacute ; B 72 -16 541 639 ; +C -1 ; WX 600 ; N adieresis ; B 72 -16 541 611 ; +C -1 ; WX 600 ; N Uogonek ; B 40 -155 560 563 ; +C -1 ; WX 600 ; N ugrave ; B 43 -16 541 639 ; +C -1 ; WX 600 ; N uacute ; B 43 -16 541 639 ; +C -1 ; WX 600 ; N udieresis ; B 43 -16 541 611 ; +C -1 ; WX 600 ; N tcaron ; B 43 -16 508 616 ; +C -1 ; WX 600 ; N scommaaccent ; B 103 -237 497 431 ; +C -1 ; WX 600 ; N Zcaron ; B 103 0 497 789 ; +C -1 ; WX 600 ; N ecircumflex ; B 63 -16 520 639 ; +C -1 ; WX 600 ; N Ucircumflex ; B 40 -16 560 789 ; +C -1 ; WX 600 ; N acircumflex ; B 72 -16 541 639 ; +C -1 ; WX 600 ; N Zdotaccent ; B 103 0 497 761 ; +C -1 ; WX 600 ; N scaron ; B 103 -16 497 639 ; +C -1 ; WX 600 ; N Amacron ; B 9 0 591 726 ; +C -1 ; WX 600 ; N sacute ; B 103 -16 497 639 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 72 -237 528 563 ; +C -1 ; WX 600 ; N Ydieresis ; B 51 0 549 761 ; +C -1 ; WX 600 ; N thorn ; B 22 -186 541 590 ; +C -1 ; WX 600 ; N Emacron ; B 43 0 520 726 ; +C -1 ; WX 600 ; N Ograve ; B 51 -16 549 789 ; +C -1 ; WX 600 ; N Oacute ; B 51 -16 549 789 ; +C -1 ; WX 600 ; N Odieresis ; B 51 -16 549 761 ; +C -1 ; WX 600 ; N Ntilde ; B 22 0 562 755 ; +C -1 ; WX 600 ; N Ncaron ; B 22 0 562 789 ; +C -1 ; WX 600 ; N Nacute ; B 22 0 562 789 ; +C -1 ; WX 600 ; N Lcaron ; B 63 0 541 566 ; +C -1 ; WX 600 ; N Lacute ; B 63 0 541 789 ; +C -1 ; WX 600 ; N Idotaccent ; B 113 0 487 761 ; +C -1 ; WX 600 ; N racute ; B 84 0 541 639 ; +C -1 ; WX 600 ; N Icircumflex ; B 113 0 487 789 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 72 -16 528 633 ; +C -1 ; WX 600 ; N otilde ; B 72 -16 528 605 ; +C -1 ; WX 600 ; N Euro ; B 11 -16 534 576 ; +C -1 ; WX 600 ; N ocircumflex ; B 72 -16 528 639 ; +C -1 ; WX 600 ; N onesuperior ; B 191 259 410 612 ; +C -1 ; WX 600 ; N twosuperior ; B 175 259 405 612 ; +C -1 ; WX 600 ; N threesuperior ; B 181 251 416 612 ; +C -1 ; WX 600 ; N Igrave ; B 113 0 487 789 ; +C -1 ; WX 600 ; N Iacute ; B 113 0 487 789 ; +C -1 ; WX 600 ; N Imacron ; B 113 0 487 726 ; +C -1 ; WX 600 ; N Iogonek ; B 113 -155 500 563 ; +C -1 ; WX 600 ; N Idieresis ; B 113 0 487 761 ; +C -1 ; WX 600 ; N Gbreve ; B 63 -16 562 770 ; +C -1 ; WX 600 ; N Umacron ; B 40 -16 560 726 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 43 -237 572 563 ; +C -1 ; WX 600 ; N ograve ; B 72 -16 528 639 ; +C -1 ; WX 600 ; N Scommaaccent ; B 92 -237 508 576 ; +C -1 ; WX 600 ; N Eogonek ; B 43 -155 549 563 ; +C -1 ; WX 600 ; N oacute ; B 72 -16 528 639 ; +C -1 ; WX 600 ; N Edotaccent ; B 43 0 520 761 ; +C -1 ; WX 600 ; N iogonek ; B 92 -155 520 624 ; +C -1 ; WX 600 ; N gcommaaccent ; B 63 -186 562 666 ; +C -1 ; WX 600 ; N odieresis ; B 72 -16 528 611 ; +C -1 ; WX 600 ; N ntilde ; B 53 0 541 605 ; +C -1 ; WX 600 ; N ncaron ; B 53 0 541 639 ; +C -1 ; WX 600 ; N Ecaron ; B 43 0 520 789 ; +C -1 ; WX 600 ; N Ecircumflex ; B 43 0 520 789 ; +C -1 ; WX 600 ; N scedilla ; B 103 -173 497 431 ; +C -1 ; WX 600 ; N rcaron ; B 84 0 541 639 ; +C -1 ; WX 600 ; N Egrave ; B 43 0 520 789 ; +C -1 ; WX 600 ; N Eacute ; B 43 0 520 789 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 63 -237 562 576 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 43 -237 589 563 ; +C -1 ; WX 600 ; N Edieresis ; B 43 0 520 761 ; +C -1 ; WX 600 ; N nacute ; B 53 0 541 639 ; +C -1 ; WX 600 ; N uogonek ; B 43 -155 556 417 ; +C -1 ; WX 600 ; N umacron ; B 43 -16 541 576 ; +C -1 ; WX 600 ; N Dcaron ; B 43 0 520 789 ; +C -1 ; WX 600 ; N lcaron ; B 92 0 508 616 ; +C -1 ; WX 600 ; N Ccaron ; B 63 -16 534 789 ; +C -1 ; WX 600 ; N Cacute ; B 63 -16 534 789 ; +C -1 ; WX 600 ; N Ccedilla ; B 63 -173 534 576 ; +C -1 ; WX 600 ; N degree ; B 155 346 445 636 ; +C -1 ; WX 600 ; N Aogonek ; B 9 -155 600 563 ; +C -1 ; WX 600 ; N minus ; B 72 261 528 302 ; +C -1 ; WX 600 ; N multiply ; B 118 100 482 464 ; +C -1 ; WX 600 ; N divide ; B 72 25 528 540 ; +C -1 ; WX 600 ; N Aring ; B 9 0 591 811 ; +C -1 ; WX 600 ; N trademark ; B 4 243 598 563 ; +C -1 ; WX 600 ; N rcommaaccent ; B 84 -237 541 427 ; +C -1 ; WX 600 ; N lacute ; B 92 0 508 789 ; +C -1 ; WX 600 ; N omacron ; B 72 -16 528 576 ; +C -1 ; WX 600 ; N Atilde ; B 9 0 591 755 ; +C -1 ; WX 600 ; N icircumflex ; B 92 0 508 639 ; +C -1 ; WX 600 ; N igrave ; B 92 0 508 639 ; +C -1 ; WX 600 ; N ncommaaccent ; B 53 -237 541 431 ; +C -1 ; WX 600 ; N lcommaaccent ; B 92 -237 508 604 ; +C -1 ; WX 600 ; N plusminus ; B 72 0 528 529 ; +C -1 ; WX 600 ; N onehalf ; B 23 0 573 612 ; +C -1 ; WX 600 ; N onequarter ; B 16 0 580 612 ; +C -1 ; WX 600 ; N threequarters ; B 6 0 580 612 ; +C -1 ; WX 600 ; N iacute ; B 92 0 508 639 ; +C -1 ; WX 600 ; N Abreve ; B 9 0 591 770 ; +C -1 ; WX 600 ; N kcommaaccent ; B 63 -237 541 604 ; +C -1 ; WX 600 ; N Omacron ; B 51 -16 549 726 ; +C -1 ; WX 600 ; N imacron ; B 92 0 508 576 ; +C -1 ; WX 600 ; N emacron ; B 63 -16 520 576 ; +C -1 ; WX 600 ; N amacron ; B 72 -16 541 576 ; +C -1 ; WX 600 ; N tcommaaccent ; B 43 -237 499 563 ; +C -1 ; WX 600 ; N ydieresis ; B 51 -186 549 611 ; +C -1 ; WX 600 ; N zdotaccent ; B 115 0 489 611 ; +C -1 ; WX 600 ; N zcaron ; B 115 0 489 639 ; +C -1 ; WX 600 ; N zacute ; B 115 0 489 639 ; +C -1 ; WX 600 ; N yacute ; B 51 -186 549 639 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 43 -16 541 633 ; +C -1 ; WX 600 ; N eth ; B 72 -17 528 620 ; +C -1 ; WX 600 ; N uring ; B 43 -16 541 661 ; +C -1 ; WX 600 ; N Ocircumflex ; B 51 -16 549 789 ; +C -1 ; WX 600 ; N commaaccent ; B 234 -237 367 -60 ; +C -1 ; WX 600 ; N copyright ; B 3 -15 596 578 ; +C -1 ; WX 600 ; N registered ; B 3 -15 596 578 ; +C -1 ; WX 600 ; N Acircumflex ; B 9 0 591 789 ; +C -1 ; WX 600 ; N idieresis ; B 92 0 508 611 ; +C -1 ; WX 600 ; N lozenge ; B 89 -11 511 575 ; +C -1 ; WX 600 ; N Delta ; B 43 0 557 563 ; +C -1 ; WX 600 ; N notequal ; B 51 94 549 464 ; +C -1 ; WX 600 ; N radical ; B 27 0 628 699 ; +C -1 ; WX 600 ; N Agrave ; B 9 0 591 789 ; +C -1 ; WX 600 ; N Aacute ; B 9 0 591 789 ; +C -1 ; WX 600 ; N lessequal ; B 53 0 525 535 ; +C -1 ; WX 600 ; N greaterequal ; B 59 0 531 535 ; +C -1 ; WX 600 ; N logicalnot ; B 72 168 528 438 ; +C -1 ; WX 600 ; N summation ; B 113 -127 507 563 ; +C -1 ; WX 600 ; N partialdiff ; B 71 -17 529 582 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 22 -237 562 563 ; +C -1 ; WX 600 ; N dcroat ; B 63 -16 583 604 ; +C -1 ; WX 600 ; N brokenbar ; B 280 -124 320 604 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 63 -237 541 563 ; +C -1 ; WX 600 ; N Adieresis ; B 9 0 591 761 ; +C -1 ; WX 600 ; N mu ; B 43 -200 541 417 ; +C -1 ; WX 600 ; N .notdef ; B 295 0 295 0 ; EndCharMetrics StartKernData -StartKernPairs 994 -KPX A C -50 -KPX A Ccedilla -49 -KPX A G -44 -KPX A O -45 -KPX A Odieresis -45 -KPX A Q -43 -KPX A T -14 -KPX A U -56 -KPX A Uacute -56 -KPX A Ucircumflex -56 -KPX A Udieresis -56 -KPX A Ugrave -56 -KPX A V -81 -KPX A W -74 -KPX A Y -21 -KPX A a -3 -KPX A b 0 -KPX A c -18 -KPX A ccedilla -28 -KPX A comma 8 -KPX A d -3 -KPX A e -17 -KPX A g -25 -KPX A guillemotleft -44 -KPX A guilsinglleft -43 -KPX A hyphen -12 -KPX A o -17 -KPX A period 9 -KPX A q -12 -KPX A quotedblright -92 -KPX A quoteright -92 -KPX A t -6 -KPX A u -9 -KPX A v -50 -KPX A w -43 -KPX A y -57 -KPX Aacute C -50 -KPX Aacute G -44 -KPX Aacute O -45 -KPX Aacute Q -43 -KPX Aacute T -14 -KPX Aacute U -56 -KPX Aacute V -81 -KPX Aacute W -74 -KPX Aacute Y -21 -KPX Aacute a -3 -KPX Aacute b 0 -KPX Aacute c -18 -KPX Aacute comma 8 -KPX Aacute d -3 -KPX Aacute e -17 -KPX Aacute g -25 -KPX Aacute guillemotleft -44 -KPX Aacute guilsinglleft -43 -KPX Aacute hyphen -12 -KPX Aacute o -17 -KPX Aacute period 9 -KPX Aacute q -12 -KPX Aacute quoteright -92 -KPX Aacute t -6 -KPX Aacute u -9 -KPX Aacute v -50 -KPX Aacute w -43 -KPX Aacute y -57 -KPX Acircumflex C -50 -KPX Acircumflex G -44 -KPX Acircumflex O -45 -KPX Acircumflex Q -43 -KPX Acircumflex T -14 -KPX Acircumflex U -56 -KPX Acircumflex V -81 -KPX Acircumflex W -74 -KPX Acircumflex Y -21 -KPX Acircumflex comma 8 -KPX Acircumflex period 9 -KPX Adieresis C -50 -KPX Adieresis G -44 -KPX Adieresis O -45 -KPX Adieresis Q -43 -KPX Adieresis T -14 -KPX Adieresis U -56 -KPX Adieresis V -81 -KPX Adieresis W -74 -KPX Adieresis Y -21 -KPX Adieresis a -3 -KPX Adieresis b 0 -KPX Adieresis c -18 -KPX Adieresis comma 8 -KPX Adieresis d -3 -KPX Adieresis g -25 -KPX Adieresis guillemotleft -44 -KPX Adieresis guilsinglleft -43 -KPX Adieresis hyphen -12 -KPX Adieresis o -17 -KPX Adieresis period 9 -KPX Adieresis q -12 -KPX Adieresis quotedblright -92 -KPX Adieresis quoteright -92 -KPX Adieresis t -6 -KPX Adieresis u -9 -KPX Adieresis v -50 -KPX Adieresis w -43 -KPX Adieresis y -57 -KPX Agrave C -50 -KPX Agrave G -44 -KPX Agrave O -45 -KPX Agrave Q -43 -KPX Agrave T -14 -KPX Agrave U -56 -KPX Agrave V -81 -KPX Agrave W -74 -KPX Agrave Y -21 -KPX Agrave comma 8 -KPX Agrave period 9 -KPX Aring C -50 -KPX Aring G -44 -KPX Aring O -45 -KPX Aring Q -43 -KPX Aring T -14 -KPX Aring U -56 -KPX Aring V -81 -KPX Aring W -74 -KPX Aring Y -21 -KPX Aring a -3 -KPX Aring b 0 -KPX Aring c -18 -KPX Aring comma 8 -KPX Aring d -3 -KPX Aring e -17 -KPX Aring g -25 -KPX Aring guillemotleft -44 -KPX Aring guilsinglleft -43 -KPX Aring hyphen -12 -KPX Aring o -17 -KPX Aring period 9 -KPX Aring q -12 -KPX Aring quotedblright -92 -KPX Aring quoteright -92 -KPX Aring t -6 -KPX Aring u -9 -KPX Aring v -50 -KPX Aring w -43 -KPX Aring y -57 -KPX Atilde C -50 -KPX Atilde G -44 -KPX Atilde O -45 -KPX Atilde Q -43 -KPX Atilde T -14 -KPX Atilde U -56 -KPX Atilde V -81 -KPX Atilde W -74 -KPX Atilde Y -21 -KPX Atilde comma 8 -KPX Atilde period 8 -KPX B A -22 -KPX B AE -34 -KPX B Aacute -22 -KPX B Acircumflex -22 -KPX B Adieresis -22 -KPX B Aring -22 -KPX B Atilde -22 -KPX B O -13 -KPX B OE -5 -KPX B Oacute -13 -KPX B Ocircumflex -13 -KPX B Odieresis -13 -KPX B Ograve -13 -KPX B Oslash -13 -KPX B V -32 -KPX B W -29 -KPX B Y -39 -KPX C A -13 -KPX C AE -28 -KPX C Aacute -13 -KPX C Adieresis -13 -KPX C Aring -13 -KPX C H -13 -KPX C K -21 -KPX C O -19 -KPX C Oacute -19 -KPX C Odieresis -19 -KPX Ccedilla A -16 -KPX D A -35 -KPX D Aacute -35 -KPX D Acircumflex -35 -KPX D Adieresis -35 -KPX D Agrave -35 -KPX D Aring -35 -KPX D Atilde -35 -KPX D J -32 -KPX D T -9 -KPX D V -41 -KPX D W -35 -KPX D X -39 -KPX D Y -49 -KPX F A -72 -KPX F Aacute -72 -KPX F Acircumflex -72 -KPX F Adieresis -72 -KPX F Agrave -72 -KPX F Aring -72 -KPX F Atilde -72 -KPX F J -60 -KPX F O -40 -KPX F Odieresis -40 -KPX F a -76 -KPX F aacute -77 -KPX F adieresis -52 -KPX F ae -81 -KPX F aring -70 -KPX F comma -95 -KPX F e -82 -KPX F eacute -83 -KPX F hyphen -45 -KPX F i -36 -KPX F j -41 -KPX F o -79 -KPX F oacute -80 -KPX F odieresis -52 -KPX F oe -74 -KPX F oslash -80 -KPX F period -98 -KPX F r -52 -KPX F u -50 -KPX G A -17 -KPX G AE -29 -KPX G Aacute -17 -KPX G Acircumflex -17 -KPX G Adieresis -17 -KPX G Agrave -17 -KPX G Aring -17 -KPX G Atilde -17 -KPX G T -13 -KPX G V -5 -KPX G W -2 -KPX G Y -12 -KPX J A -40 -KPX J AE -52 -KPX J Adieresis -40 -KPX J Aring -40 -KPX K C -55 -KPX K G -53 -KPX K O -46 -KPX K OE -45 -KPX K Oacute -46 -KPX K Odieresis -46 -KPX K S 6 -KPX K T 21 -KPX K a -4 -KPX K adieresis -4 -KPX K ae -5 -KPX K aring -4 -KPX K e -18 -KPX K hyphen -57 -KPX K o -18 -KPX K oacute -18 -KPX K odieresis -18 -KPX K u -10 -KPX K udieresis -10 -KPX K y -87 -KPX L A 44 -KPX L AE 32 -KPX L Aacute 44 -KPX L Adieresis 44 -KPX L Aring 44 -KPX L C 6 -KPX L Ccedilla 4 -KPX L G 11 -KPX L O 10 -KPX L Oacute 10 -KPX L Ocircumflex 10 -KPX L Odieresis 10 -KPX L Ograve 10 -KPX L Otilde 10 -KPX L S 20 -KPX L T -13 -KPX L U -8 -KPX L Udieresis -8 -KPX L V -55 -KPX L W -48 -KPX L Y -20 -KPX L hyphen 47 -KPX L quotedblright -92 -KPX L quoteright -92 -KPX L u 12 -KPX L udieresis 10 -KPX L y -29 -KPX N A -20 -KPX N AE -32 -KPX N Aacute -20 -KPX N Adieresis -20 -KPX N Aring -20 -KPX N C -20 -KPX N Ccedilla -19 -KPX N G -14 -KPX N O -20 -KPX N Oacute -20 -KPX N Odieresis -20 -KPX N a -22 -KPX N aacute -23 -KPX N adieresis -23 -KPX N ae -26 -KPX N aring -23 -KPX N comma -13 -KPX N e -28 -KPX N eacute -30 -KPX N o -25 -KPX N oacute -26 -KPX N odieresis -26 -KPX N oslash -27 -KPX N period -16 -KPX N u -24 -KPX N udieresis -25 -KPX O A -37 -KPX O AE -68 -KPX O Aacute -37 -KPX O Adieresis -37 -KPX O Aring -37 -KPX O T -3 -KPX O V -45 -KPX O W -39 -KPX O X -40 -KPX O Y -50 -KPX Oacute A -37 -KPX Oacute T -3 -KPX Oacute V -45 -KPX Oacute W -39 -KPX Oacute Y -50 -KPX Ocircumflex T -3 -KPX Ocircumflex V -45 -KPX Ocircumflex Y -50 -KPX Odieresis A -37 -KPX Odieresis T -3 -KPX Odieresis V -45 -KPX Odieresis W -39 -KPX Odieresis X -40 -KPX Odieresis Y -50 -KPX Ograve T -3 -KPX Ograve V -45 -KPX Ograve Y -50 -KPX Oslash A -37 -KPX Otilde T -3 -KPX Otilde V -45 -KPX Otilde Y -50 -KPX P A -78 -KPX P AE -115 -KPX P Aacute -78 -KPX P Adieresis -78 -KPX P Aring -78 -KPX P J -89 -KPX P a -73 -KPX P aacute -73 -KPX P adieresis -64 -KPX P ae -79 -KPX P aring -73 -KPX P comma -117 -KPX P e -78 -KPX P eacute -78 -KPX P hyphen -64 -KPX P o -72 -KPX P oacute -72 -KPX P odieresis -64 -KPX P oe -66 -KPX P oslash -73 -KPX P period -120 -KPX R C -25 -KPX R Ccedilla -24 -KPX R G -19 -KPX R O -26 -KPX R OE -17 -KPX R Oacute -26 -KPX R Odieresis -26 -KPX R T 0 -KPX R U -35 -KPX R Udieresis -35 -KPX R V -31 -KPX R W -28 -KPX R Y -19 -KPX R a -2 -KPX R aacute -2 -KPX R adieresis -2 -KPX R ae -3 -KPX R aring -2 +StartKernPairs 998 +KPX A C -33 +KPX A Ccedilla -30 +KPX A G -27 +KPX A O -27 +KPX A Odieresis -27 +KPX A Q -28 +KPX A T -27 +KPX A U -32 +KPX A Uacute -32 +KPX A Ucircumflex -32 +KPX A Udieresis -32 +KPX A Ugrave -32 +KPX A V -74 +KPX A W -12 +KPX A Y -28 +KPX A a 8 +KPX A b 46 +KPX A c -19 +KPX A ccedilla -15 +KPX A comma -39 +KPX A d -10 +KPX A e -14 +KPX A g -23 +KPX A guillemotleft -49 +KPX A guilsinglleft -49 +KPX A hyphen -30 +KPX A o -16 +KPX A period -67 +KPX A q -24 +KPX A quotedblright -78 +KPX A quoteright -98 +KPX A t -26 +KPX A u -15 +KPX A v -55 +KPX A w -19 +KPX A y -60 +KPX Aacute C -33 +KPX Aacute G -27 +KPX Aacute O -27 +KPX Aacute Q -28 +KPX Aacute T -27 +KPX Aacute U -32 +KPX Aacute V -74 +KPX Aacute W -12 +KPX Aacute Y -28 +KPX Aacute a 8 +KPX Aacute b 46 +KPX Aacute c -19 +KPX Aacute comma -39 +KPX Aacute d -10 +KPX Aacute e -14 +KPX Aacute g -23 +KPX Aacute guillemotleft -49 +KPX Aacute guilsinglleft -49 +KPX Aacute hyphen -30 +KPX Aacute o -16 +KPX Aacute period -67 +KPX Aacute q -24 +KPX Aacute quoteright -98 +KPX Aacute t -26 +KPX Aacute u -15 +KPX Aacute v -55 +KPX Aacute w -19 +KPX Aacute y -60 +KPX Acircumflex C -33 +KPX Acircumflex G -27 +KPX Acircumflex O -27 +KPX Acircumflex Q -28 +KPX Acircumflex T -27 +KPX Acircumflex U -32 +KPX Acircumflex V -74 +KPX Acircumflex W -12 +KPX Acircumflex Y -28 +KPX Acircumflex comma -39 +KPX Acircumflex period -67 +KPX Adieresis C -33 +KPX Adieresis G -27 +KPX Adieresis O -27 +KPX Adieresis Q -28 +KPX Adieresis T -27 +KPX Adieresis U -32 +KPX Adieresis V -74 +KPX Adieresis W -12 +KPX Adieresis Y -28 +KPX Adieresis a 8 +KPX Adieresis b 46 +KPX Adieresis c -19 +KPX Adieresis comma -39 +KPX Adieresis d -10 +KPX Adieresis g -23 +KPX Adieresis guillemotleft -49 +KPX Adieresis guilsinglleft -49 +KPX Adieresis hyphen -30 +KPX Adieresis o -16 +KPX Adieresis period -67 +KPX Adieresis q -24 +KPX Adieresis quotedblright -78 +KPX Adieresis quoteright -98 +KPX Adieresis t -26 +KPX Adieresis u -15 +KPX Adieresis v -55 +KPX Adieresis w -19 +KPX Adieresis y -60 +KPX Agrave C -33 +KPX Agrave G -27 +KPX Agrave O -27 +KPX Agrave Q -28 +KPX Agrave T -27 +KPX Agrave U -32 +KPX Agrave V -74 +KPX Agrave W -12 +KPX Agrave Y -28 +KPX Agrave comma -39 +KPX Agrave period -67 +KPX Aring C -33 +KPX Aring G -27 +KPX Aring O -27 +KPX Aring Q -28 +KPX Aring T -27 +KPX Aring U -32 +KPX Aring V -74 +KPX Aring W -12 +KPX Aring Y -28 +KPX Aring a 8 +KPX Aring b 46 +KPX Aring c -19 +KPX Aring comma -39 +KPX Aring d -10 +KPX Aring e -14 +KPX Aring g -23 +KPX Aring guillemotleft -49 +KPX Aring guilsinglleft -49 +KPX Aring hyphen -30 +KPX Aring o -16 +KPX Aring period -67 +KPX Aring q -24 +KPX Aring quotedblright -78 +KPX Aring quoteright -98 +KPX Aring t -26 +KPX Aring u -15 +KPX Aring v -55 +KPX Aring w -19 +KPX Aring y -60 +KPX Atilde C -33 +KPX Atilde G -27 +KPX Atilde O -27 +KPX Atilde Q -28 +KPX Atilde T -27 +KPX Atilde U -32 +KPX Atilde V -74 +KPX Atilde W -12 +KPX Atilde Y -28 +KPX Atilde comma -39 +KPX Atilde period -67 +KPX B A -9 +KPX B AE -9 +KPX B Aacute -9 +KPX B Acircumflex -9 +KPX B Adieresis -9 +KPX B Aring -9 +KPX B Atilde -9 +KPX B O -10 +KPX B OE 10 +KPX B Oacute -10 +KPX B Ocircumflex -10 +KPX B Odieresis -10 +KPX B Ograve -10 +KPX B Oslash -8 +KPX B V -29 +KPX B W -12 +KPX B Y -50 +KPX C A -9 +KPX C AE -9 +KPX C Aacute -9 +KPX C Adieresis -9 +KPX C Aring -9 +KPX C H -26 +KPX C K -11 +KPX C O -21 +KPX C Oacute -21 +KPX C Odieresis -21 +KPX Ccedilla A -5 +KPX D A -42 +KPX D Aacute -42 +KPX D Acircumflex -42 +KPX D Adieresis -42 +KPX D Agrave -42 +KPX D Aring -42 +KPX D Atilde -42 +KPX D J -31 +KPX D T -40 +KPX D V -42 +KPX D W -17 +KPX D X -55 +KPX D Y -63 +KPX F A -38 +KPX F Aacute -38 +KPX F Acircumflex -38 +KPX F Adieresis -38 +KPX F Agrave -38 +KPX F Aring -38 +KPX F Atilde -38 +KPX F J -95 +KPX F O -27 +KPX F Odieresis -27 +KPX F a -47 +KPX F aacute -47 +KPX F adieresis -43 +KPX F ae -20 +KPX F aring -47 +KPX F comma -168 +KPX F e -56 +KPX F eacute -56 +KPX F hyphen -67 +KPX F i -47 +KPX F j -54 +KPX F o -63 +KPX F oacute -63 +KPX F odieresis -48 +KPX F oe -21 +KPX F oslash -63 +KPX F period -193 +KPX F r -32 +KPX F u -1 +KPX G A 6 +KPX G AE 5 +KPX G Aacute 6 +KPX G Acircumflex 6 +KPX G Adieresis 6 +KPX G Agrave 6 +KPX G Aring 6 +KPX G Atilde 6 +KPX G T -25 +KPX G V 6 +KPX G W 1 +KPX G Y -14 +KPX J A -7 +KPX J AE -16 +KPX J Adieresis -7 +KPX J Aring -7 +KPX K C -42 +KPX K G -36 +KPX K O -37 +KPX K OE -19 +KPX K Oacute -37 +KPX K Odieresis -37 +KPX K S -9 +KPX K T -12 +KPX K a -1 +KPX K adieresis -1 +KPX K ae 26 +KPX K aring -1 +KPX K e -24 +KPX K hyphen -61 +KPX K o -25 +KPX K oacute -25 +KPX K odieresis -25 +KPX K u -25 +KPX K udieresis -25 +KPX K y -67 +KPX L A 17 +KPX L AE 16 +KPX L Aacute 17 +KPX L Adieresis 17 +KPX L Aring 17 +KPX L C -11 +KPX L Ccedilla -10 +KPX L G -10 +KPX L O -6 +KPX L Oacute -6 +KPX L Ocircumflex -6 +KPX L Odieresis -6 +KPX L Ograve -6 +KPX L Otilde -6 +KPX L S -24 +KPX L T -52 +KPX L U -29 +KPX L Udieresis -29 +KPX L V -66 +KPX L W -27 +KPX L Y -53 +KPX L hyphen 3 +KPX L quotedblright -66 +KPX L quoteright -73 +KPX L u -16 +KPX L udieresis -16 +KPX L y -45 +KPX N A -3 +KPX N AE -3 +KPX N Aacute -3 +KPX N Adieresis -3 +KPX N Aring -3 +KPX N C -12 +KPX N Ccedilla -12 +KPX N G -11 +KPX N O -9 +KPX N Oacute -9 +KPX N Odieresis -9 +KPX N a -19 +KPX N aacute -19 +KPX N adieresis -19 +KPX N ae 11 +KPX N aring -19 +KPX N comma -58 +KPX N e -6 +KPX N eacute -6 +KPX N o -10 +KPX N oacute -10 +KPX N odieresis -10 +KPX N oslash -7 +KPX N period -83 +KPX N u -9 +KPX N udieresis -9 +KPX O A -27 +KPX O AE -26 +KPX O Aacute -27 +KPX O Adieresis -27 +KPX O Aring -27 +KPX O T -30 +KPX O V -31 +KPX O W -5 +KPX O X -43 +KPX O Y -52 +KPX Oacute A -27 +KPX Oacute T -30 +KPX Oacute V -31 +KPX Oacute W -5 +KPX Oacute Y -52 +KPX Ocircumflex T -30 +KPX Ocircumflex V -31 +KPX Ocircumflex Y -52 +KPX Odieresis A -27 +KPX Odieresis T -30 +KPX Odieresis V -31 +KPX Odieresis W -5 +KPX Odieresis X -43 +KPX Odieresis Y -52 +KPX Ograve T -30 +KPX Ograve V -31 +KPX Ograve Y -52 +KPX Oslash A -26 +KPX Otilde T -30 +KPX Otilde V -31 +KPX Otilde Y -52 +KPX P A -79 +KPX P AE -76 +KPX P Aacute -79 +KPX P Adieresis -79 +KPX P Aring -79 +KPX P J -82 +KPX P a -52 +KPX P aacute -52 +KPX P adieresis -52 +KPX P ae -25 +KPX P aring -52 +KPX P comma -156 +KPX P e -42 +KPX P eacute -42 +KPX P hyphen -46 +KPX P o -48 +KPX P oacute -48 +KPX P odieresis -48 +KPX P oe -13 +KPX P oslash -48 +KPX P period -181 +KPX R C -27 +KPX R Ccedilla -28 +KPX R G -26 +KPX R O -25 +KPX R OE -4 +KPX R Oacute -25 +KPX R Odieresis -25 +KPX R T -28 +KPX R U -32 +KPX R Udieresis -32 +KPX R V -33 +KPX R W -13 +KPX R Y -29 +KPX R a 7 +KPX R aacute 7 +KPX R adieresis 7 +KPX R ae 35 +KPX R aring 7 KPX R e -15 KPX R eacute -15 -KPX R hyphen -29 -KPX R o -15 -KPX R oacute -15 -KPX R odieresis -15 -KPX R oe -15 -KPX R u -7 -KPX R uacute -7 -KPX R udieresis -7 -KPX R y 3 -KPX S A -2 -KPX S AE -14 -KPX S Aacute -2 -KPX S Adieresis -2 -KPX S Aring -2 -KPX S T 1 -KPX S V 5 -KPX S W 8 -KPX S Y -1 -KPX S t -13 -KPX T A -33 -KPX T AE -45 -KPX T Aacute -33 -KPX T Acircumflex -33 -KPX T Adieresis -33 -KPX T Agrave -33 -KPX T Aring -33 -KPX T Atilde -33 -KPX T C -14 -KPX T G -7 -KPX T J -39 -KPX T O -21 -KPX T OE -8 -KPX T Oacute -21 -KPX T Ocircumflex -21 -KPX T Odieresis -21 -KPX T Ograve -21 -KPX T Oslash -21 -KPX T Otilde -21 -KPX T S -2 -KPX T V 41 -KPX T W 43 -KPX T Y 33 -KPX T a -80 -KPX T ae -81 -KPX T c -87 -KPX T colon -84 -KPX T comma -70 -KPX T e -90 -KPX T g -102 -KPX T guillemotleft -103 -KPX T guilsinglleft -102 -KPX T hyphen -68 -KPX T i -16 -KPX T j -20 -KPX T o -87 -KPX T oslash -89 -KPX T period -71 -KPX T r -87 -KPX T s -74 -KPX T semicolon -92 -KPX T u -86 -KPX T v -73 -KPX T w -69 -KPX T y -69 -KPX U A -49 -KPX U AE -69 -KPX U Aacute -49 -KPX U Acircumflex -49 -KPX U Adieresis -49 -KPX U Aring -49 -KPX U Atilde -49 -KPX U comma -35 -KPX U m -28 -KPX U n -29 -KPX U p -32 -KPX U period -39 +KPX R hyphen -48 +KPX R o -17 +KPX R oacute -17 +KPX R odieresis -17 +KPX R oe 22 +KPX R u -11 +KPX R uacute -11 +KPX R udieresis -11 +KPX R y -15 +KPX S A -22 +KPX S AE -22 +KPX S Aacute -22 +KPX S Adieresis -22 +KPX S Aring -22 +KPX S T -42 +KPX S V -10 +KPX S W -16 +KPX S Y -31 +KPX S t -18 +KPX T A -27 +KPX T AE -27 +KPX T Aacute -27 +KPX T Acircumflex -27 +KPX T Adieresis -27 +KPX T Agrave -27 +KPX T Aring -27 +KPX T Atilde -27 +KPX T C -29 +KPX T G -30 +KPX T J -79 +KPX T O -29 +KPX T OE -7 +KPX T Oacute -29 +KPX T Ocircumflex -29 +KPX T Odieresis -29 +KPX T Ograve -29 +KPX T Oslash -29 +KPX T Otilde -29 +KPX T S -43 +KPX T V 10 +KPX T W 5 +KPX T Y -10 +KPX T a -60 +KPX T ae -33 +KPX T c -88 +KPX T colon -136 +KPX T comma -108 +KPX T e -83 +KPX T g -92 +KPX T guillemotleft -122 +KPX T guilsinglleft -122 +KPX T hyphen -94 +KPX T i -58 +KPX T j -80 +KPX T o -85 +KPX T oslash -54 +KPX T period -136 +KPX T r -54 +KPX T s -63 +KPX T semicolon -111 +KPX T u -84 +KPX T v -93 +KPX T w -88 +KPX T y -103 +KPX U A -18 +KPX U AE -27 +KPX U Aacute -18 +KPX U Acircumflex -18 +KPX U Adieresis -18 +KPX U Aring -18 +KPX U Atilde -18 +KPX U comma -76 +KPX U m 6 +KPX U n -19 +KPX U p 0 +KPX U period -101 KPX U r -41 -KPX Uacute A -49 -KPX Uacute comma -35 -KPX Uacute m -28 -KPX Uacute n -29 -KPX Uacute p -32 -KPX Uacute period -39 +KPX Uacute A -18 +KPX Uacute comma -76 +KPX Uacute m 6 +KPX Uacute n -19 +KPX Uacute p 0 +KPX Uacute period -101 KPX Uacute r -41 -KPX Ucircumflex A -49 -KPX Udieresis A -49 -KPX Udieresis b 1 -KPX Udieresis comma -35 -KPX Udieresis m -28 -KPX Udieresis n -29 -KPX Udieresis p -32 -KPX Udieresis period -39 +KPX Ucircumflex A -18 +KPX Udieresis A -18 +KPX Udieresis b 25 +KPX Udieresis comma -76 +KPX Udieresis m 6 +KPX Udieresis n -19 +KPX Udieresis p 0 +KPX Udieresis period -101 KPX Udieresis r -41 -KPX Ugrave A -49 -KPX V A -65 -KPX V AE -101 -KPX V Aacute -65 -KPX V Acircumflex -65 -KPX V Adieresis -65 -KPX V Agrave -65 -KPX V Aring -65 -KPX V Atilde -65 -KPX V C -47 -KPX V G -41 -KPX V O -47 -KPX V Oacute -47 -KPX V Ocircumflex -47 -KPX V Odieresis -47 -KPX V Ograve -47 -KPX V Oslash -47 -KPX V Otilde -47 -KPX V S -15 -KPX V T 32 -KPX V a -66 -KPX V ae -71 -KPX V colon -81 -KPX V comma -76 -KPX V e -73 -KPX V g -83 -KPX V guillemotleft -81 -KPX V guilsinglleft -80 -KPX V hyphen -44 -KPX V i -16 -KPX V o -69 -KPX V oslash -71 -KPX V period -80 -KPX V r -44 -KPX V semicolon -78 -KPX V u -39 -KPX V y -12 -KPX W A -56 -KPX W AE -85 -KPX W Aacute -56 -KPX W Acircumflex -56 -KPX W Adieresis -56 -KPX W Agrave -56 -KPX W Aring -56 -KPX W Atilde -56 -KPX W C -38 -KPX W G -32 -KPX W O -39 -KPX W Oacute -39 -KPX W Ocircumflex -39 -KPX W Odieresis -39 -KPX W Ograve -39 -KPX W Oslash -39 -KPX W Otilde -39 -KPX W S -17 -KPX W T 30 -KPX W a -53 -KPX W ae -58 -KPX W colon -76 -KPX W comma -58 -KPX W e -59 -KPX W g -74 -KPX W guillemotleft -68 -KPX W guilsinglleft -67 -KPX W hyphen -31 -KPX W i -18 -KPX W o -56 -KPX W oslash -58 -KPX W period -61 -KPX W r -39 -KPX W semicolon -73 -KPX W u -34 -KPX W y -7 -KPX X C -48 -KPX X O -44 -KPX X Odieresis -44 -KPX X Q -42 -KPX X a -2 -KPX X e -15 -KPX X hyphen -41 -KPX X o -15 -KPX X u -7 -KPX X y -62 -KPX Y A -27 -KPX Y AE -39 -KPX Y Aacute -27 -KPX Y Acircumflex -27 -KPX Y Adieresis -27 -KPX Y Agrave -27 -KPX Y Aring -27 -KPX Y Atilde -27 +KPX Ugrave A -18 +KPX V A -3 +KPX V AE -12 +KPX V Aacute -3 +KPX V Acircumflex -3 +KPX V Adieresis -3 +KPX V Agrave -3 +KPX V Aring -3 +KPX V Atilde -3 +KPX V C -29 +KPX V G -31 +KPX V O -31 +KPX V Oacute -31 +KPX V Ocircumflex -31 +KPX V Odieresis -31 +KPX V Ograve -31 +KPX V Oslash -31 +KPX V Otilde -31 +KPX V S -34 +KPX V T 10 +KPX V a -60 +KPX V ae -33 +KPX V colon -124 +KPX V comma -129 +KPX V e -52 +KPX V g -53 +KPX V guillemotleft -75 +KPX V guilsinglleft -75 +KPX V hyphen -43 +KPX V i -60 +KPX V o -56 +KPX V oslash -53 +KPX V period -154 +KPX V r -46 +KPX V semicolon -114 +KPX V u -15 +KPX V y -19 +KPX W A -8 +KPX W AE -14 +KPX W Aacute -8 +KPX W Acircumflex -8 +KPX W Adieresis -8 +KPX W Agrave -8 +KPX W Aring -8 +KPX W Atilde -8 +KPX W C -8 +KPX W G -7 +KPX W O -5 +KPX W Oacute -5 +KPX W Ocircumflex -5 +KPX W Odieresis -5 +KPX W Ograve -5 +KPX W Oslash -2 +KPX W Otilde -5 +KPX W S -24 +KPX W T 5 +KPX W a -20 +KPX W ae 10 +KPX W colon -88 +KPX W comma -66 +KPX W e -6 +KPX W g -7 +KPX W guillemotleft -31 +KPX W guilsinglleft -31 +KPX W hyphen -2 +KPX W i -43 +KPX W o -10 +KPX W oslash -7 +KPX W period -90 +KPX W r -29 +KPX W semicolon -69 +KPX W u 2 +KPX W y -2 +KPX X C -46 +KPX X O -43 +KPX X Odieresis -43 +KPX X Q -44 +KPX X a -7 +KPX X e -30 +KPX X hyphen -75 +KPX X o -31 +KPX X u -31 +KPX X y -53 +KPX Y A -24 +KPX Y AE -27 +KPX Y Aacute -24 +KPX Y Acircumflex -24 +KPX Y Adieresis -24 +KPX Y Agrave -24 +KPX Y Aring -24 +KPX Y Atilde -24 KPX Y C -51 -KPX Y G -45 -KPX Y O -52 -KPX Y Oacute -52 -KPX Y Ocircumflex -52 -KPX Y Odieresis -52 -KPX Y Ograve -52 -KPX Y Oslash -51 -KPX Y Otilde -52 -KPX Y S -15 -KPX Y T 32 -KPX Y a -72 -KPX Y ae -75 -KPX Y colon -78 -KPX Y comma -64 +KPX Y G -52 +KPX Y O -53 +KPX Y Oacute -53 +KPX Y Ocircumflex -53 +KPX Y Odieresis -53 +KPX Y Ograve -53 +KPX Y Oslash -53 +KPX Y Otilde -53 +KPX Y S -55 +KPX Y T -10 +KPX Y a -60 +KPX Y ae -32 +KPX Y colon -135 +KPX Y comma -107 KPX Y e -78 -KPX Y g -94 -KPX Y guillemotleft -93 -KPX Y guilsinglleft -92 -KPX Y hyphen -60 -KPX Y i -16 -KPX Y o -75 -KPX Y oslash -77 -KPX Y p -52 -KPX Y period -65 -KPX Y semicolon -86 -KPX Y u -58 -KPX Y v -35 -KPX Z v -12 -KPX Z y -30 -KPX a j -22 -KPX a quoteright -29 -KPX a v 0 -KPX a w 4 -KPX a y 4 -KPX aacute v 0 -KPX aacute w 4 -KPX aacute y 4 -KPX adieresis v 0 -KPX adieresis w 4 -KPX adieresis y 4 -KPX ae v 2 -KPX ae w 5 -KPX ae y 5 -KPX agrave v 0 -KPX agrave w 4 -KPX agrave y 4 -KPX aring v 0 -KPX aring w 4 -KPX aring y 4 -KPX b v -10 -KPX b w -7 -KPX b y -7 -KPX c h -30 -KPX c k -29 -KPX comma one -42 -KPX comma quotedblright -40 -KPX comma quoteright -40 -KPX e quoteright -21 -KPX e t -16 -KPX e v 0 -KPX e w 2 -KPX e x -10 -KPX e y 2 -KPX eacute v 0 -KPX eacute w 2 -KPX eacute y 2 -KPX ecircumflex v 0 -KPX ecircumflex w 2 -KPX ecircumflex y 2 -KPX eight four 13 -KPX eight one -58 -KPX eight seven -1 -KPX f a -26 -KPX f aacute -27 -KPX f adieresis -2 -KPX f ae -30 -KPX f aring -17 -KPX f e -32 -KPX f eacute -33 -KPX f f 30 -KPX f i 17 -KPX f j 13 -KPX f l 42 -KPX f o -29 -KPX f oacute -30 -KPX f odieresis -2 -KPX f oe -25 -KPX f oslash -31 -KPX f quoteright 18 -KPX f s -20 -KPX f t 18 -KPX five four -5 -KPX five one -71 -KPX five seven -28 -KPX four four 12 -KPX four one -71 -KPX four seven -27 -KPX g a -41 -KPX g adieresis -42 -KPX g ae -46 -KPX g aring -42 -KPX g e -45 -KPX g eacute -45 -KPX g l -46 -KPX g oacute -41 -KPX g odieresis -41 -KPX g r -21 -KPX guillemotright A -24 -KPX guillemotright AE -49 -KPX guillemotright Aacute -24 -KPX guillemotright Adieresis -24 -KPX guillemotright Aring -24 -KPX guillemotright T -76 -KPX guillemotright V -75 -KPX guillemotright W -66 -KPX guillemotright Y -80 -KPX guilsinglright A -23 -KPX guilsinglright AE -48 -KPX guilsinglright Aacute -23 -KPX guilsinglright Adieresis -23 -KPX guilsinglright Aring -23 -KPX guilsinglright T -75 -KPX guilsinglright V -74 -KPX guilsinglright W -65 -KPX guilsinglright Y -79 -KPX h quoteright -31 -KPX h y -5 -KPX hyphen A 3 -KPX hyphen AE -22 -KPX hyphen Aacute 3 -KPX hyphen Adieresis 3 -KPX hyphen Aring 3 -KPX hyphen T -45 -KPX hyphen V -43 -KPX hyphen W -34 -KPX hyphen Y -53 -KPX i T -10 -KPX i j -31 -KPX k a 12 -KPX k aacute 12 -KPX k adieresis 12 -KPX k ae 9 -KPX k aring 12 -KPX k comma 27 -KPX k e 5 -KPX k eacute 5 -KPX k g -27 -KPX k hyphen -27 -KPX k o 6 -KPX k oacute 6 -KPX k odieresis 6 -KPX k period 26 -KPX k s 7 -KPX k u 8 -KPX k udieresis 8 -KPX l v -13 -KPX l y -9 -KPX m p -4 -KPX m v -6 -KPX m w -4 -KPX m y -3 -KPX n T -40 -KPX n p -7 -KPX n quoteright -34 -KPX n v -10 -KPX n w -7 -KPX n y -7 -KPX nine four 1 -KPX nine one -65 -KPX nine seven -5 -KPX o T -62 -KPX o quoteright -24 -KPX o t -14 -KPX o v -18 -KPX o w -15 -KPX o x -32 -KPX o y -15 -KPX oacute v -18 -KPX oacute w -15 -KPX oacute y -15 -KPX ocircumflex t -16 -KPX odieresis t -16 -KPX odieresis v -18 -KPX odieresis w -15 -KPX odieresis x -32 -KPX odieresis y -15 -KPX ograve v -18 -KPX ograve w -15 -KPX ograve y -15 -KPX one comma -52 -KPX one eight -57 -KPX one five -55 -KPX one four -69 -KPX one nine -61 -KPX one one -69 -KPX one period -56 -KPX one seven -61 -KPX one six -50 -KPX one three -55 -KPX one two -50 -KPX one zero -42 -KPX p t -14 -KPX p y -7 -KPX period one -43 -KPX period quotedblright -39 -KPX period quoteright -39 -KPX q c -13 -KPX q u -11 -KPX quotedblbase A 3 -KPX quotedblbase AE -11 -KPX quotedblbase T -62 -KPX quotedblbase V -96 -KPX quotedblbase W -84 -KPX quotedblbase Y -68 -KPX quotedblleft A -87 -KPX quotedblleft AE -141 -KPX quotedblleft Aacute -87 -KPX quotedblleft Adieresis -87 -KPX quotedblleft Aring -87 -KPX quotedblleft T -18 -KPX quotedblleft V -17 -KPX quotedblleft W -15 -KPX quotedblleft Y -25 -KPX quotedblright A -94 -KPX quotedblright AE -148 -KPX quotedblright Aacute -94 -KPX quotedblright Adieresis -94 -KPX quotedblright Aring -94 -KPX quotedblright T -21 -KPX quotedblright V -21 -KPX quotedblright W -18 -KPX quotedblright Y -30 -KPX quoteleft A -78 -KPX quoteleft AE -132 -KPX quoteleft Aacute -78 -KPX quoteleft Adieresis -78 -KPX quoteleft Aring -78 -KPX quoteleft T -9 -KPX quoteleft V -8 -KPX quoteleft W -5 -KPX quoteleft Y -15 -KPX quoteright A -87 -KPX quoteright AE -141 -KPX quoteright Aacute -87 -KPX quoteright Adieresis -87 -KPX quoteright Aring -87 -KPX quoteright comma -74 -KPX quoteright d -80 -KPX quoteright o -78 -KPX quoteright period -78 -KPX quoteright r -57 -KPX quoteright s -63 -KPX quoteright t -49 -KPX quoteright v -31 -KPX quoteright w -26 -KPX quoteright y -25 -KPX r a -27 -KPX r aacute -27 -KPX r acircumflex -27 -KPX r adieresis -27 -KPX r ae -34 -KPX r agrave -27 -KPX r aring -27 +KPX Y g -81 +KPX Y guillemotleft -115 +KPX Y guilsinglleft -115 +KPX Y hyphen -91 +KPX Y i -57 +KPX Y o -83 +KPX Y oslash -54 +KPX Y p -35 +KPX Y period -135 +KPX Y semicolon -110 +KPX Y u -46 +KPX Y v -39 +KPX Z v -50 +KPX Z y -61 +KPX a j -87 +KPX a quoteright -56 +KPX a v -28 +KPX a w -21 +KPX a y -38 +KPX aacute v -28 +KPX aacute w -21 +KPX aacute y -38 +KPX adieresis v -28 +KPX adieresis w -21 +KPX adieresis y -38 +KPX ae v 21 +KPX ae w 21 +KPX ae y 10 +KPX agrave v -28 +KPX agrave w -21 +KPX agrave y -38 +KPX aring v -28 +KPX aring w -21 +KPX aring y -38 +KPX b v -12 +KPX b w 1 +KPX b y -22 +KPX c h -3 +KPX c k -9 +KPX comma one -144 +KPX comma quotedblright -119 +KPX comma quoteright -136 +KPX e quoteright -41 +KPX e t -29 +KPX e v -22 +KPX e w -19 +KPX e x -2 +KPX e y -33 +KPX eacute v -22 +KPX eacute w -19 +KPX eacute y -33 +KPX ecircumflex v -22 +KPX ecircumflex w -19 +KPX ecircumflex y -33 +KPX eight four -58 +KPX eight one -75 +KPX eight seven -68 +KPX f a -38 +KPX f aacute -38 +KPX f adieresis -22 +KPX f ae -11 +KPX f aring -38 +KPX f e -55 +KPX f eacute -55 +KPX f f -42 +KPX f i -36 +KPX f j -59 +KPX f l -25 +KPX f o -62 +KPX f oacute -62 +KPX f odieresis -27 +KPX f oe -20 +KPX f oslash -32 +KPX f quoteright -56 +KPX f s -41 +KPX f t -6 +KPX five four -52 +KPX five one -86 +KPX five seven -72 +KPX four four -62 +KPX four one -66 +KPX four seven -93 +KPX g a -10 +KPX g adieresis -10 +KPX g ae 16 +KPX g aring -10 +KPX g e -4 +KPX g eacute -4 +KPX g l -33 +KPX g oacute -8 +KPX g odieresis -8 +KPX g r 0 +KPX guillemotright A -43 +KPX guillemotright AE -39 +KPX guillemotright Aacute -43 +KPX guillemotright Adieresis -43 +KPX guillemotright Aring -43 +KPX guillemotright T -121 +KPX guillemotright V -71 +KPX guillemotright W -29 +KPX guillemotright Y -114 +KPX guilsinglright A -43 +KPX guilsinglright AE -39 +KPX guilsinglright Aacute -43 +KPX guilsinglright Adieresis -43 +KPX guilsinglright Aring -43 +KPX guilsinglright T -121 +KPX guilsinglright V -71 +KPX guilsinglright W -29 +KPX guilsinglright Y -114 +KPX h quoteright -49 +KPX h y -32 +KPX hyphen A -26 +KPX hyphen AE -20 +KPX hyphen Aacute -26 +KPX hyphen Adieresis -26 +KPX hyphen Aring -26 +KPX hyphen T -95 +KPX hyphen V -41 +KPX hyphen W -1 +KPX hyphen Y -92 +KPX i T -58 +KPX i j -142 +KPX k a -6 +KPX k aacute -6 +KPX k adieresis -6 +KPX k ae 21 +KPX k aring -6 +KPX k comma -53 +KPX k e -29 +KPX k eacute -29 +KPX k g -38 +KPX k hyphen -99 +KPX k o -30 +KPX k oacute -30 +KPX k odieresis -30 +KPX k period -81 +KPX k s -9 +KPX k u -3 +KPX k udieresis -3 +KPX l v -83 +KPX l y -93 +KPX m p 22 +KPX m v 14 +KPX m w 15 +KPX m y 3 +KPX n T -42 +KPX n p -5 +KPX n quoteright -47 +KPX n v -21 +KPX n w -12 +KPX n y -31 +KPX nine four -51 +KPX nine one -75 +KPX nine seven -66 +KPX o T -85 +KPX o quoteright -39 +KPX o t -22 +KPX o v -21 +KPX o w -6 +KPX o x -26 +KPX o y -31 +KPX oacute v -21 +KPX oacute w -6 +KPX oacute y -31 +KPX ocircumflex t -22 +KPX odieresis t -22 +KPX odieresis v -21 +KPX odieresis w -6 +KPX odieresis x -26 +KPX odieresis y -31 +KPX ograve v -21 +KPX ograve w -6 +KPX ograve y -31 +KPX one comma -91 +KPX one eight -86 +KPX one five -67 +KPX one four -119 +KPX one nine -75 +KPX one one -62 +KPX one period -119 +KPX one seven -141 +KPX one six -111 +KPX one three -61 +KPX one two -47 +KPX one zero -94 +KPX p t -15 +KPX p y -19 +KPX period one -119 +KPX period quotedblright -108 +KPX period quoteright -125 +KPX q c -2 +KPX q u 42 +KPX quotedblbase A -3 +KPX quotedblbase AE -3 +KPX quotedblbase T -78 +KPX quotedblbase V -83 +KPX quotedblbase W -23 +KPX quotedblbase Y -79 +KPX quotedblleft A -59 +KPX quotedblleft AE -52 +KPX quotedblleft Aacute -59 +KPX quotedblleft Adieresis -59 +KPX quotedblleft Aring -59 +KPX quotedblleft T -37 +KPX quotedblleft V -14 +KPX quotedblleft W -3 +KPX quotedblleft Y -35 +KPX quotedblright A -59 +KPX quotedblright AE -68 +KPX quotedblright Aacute -59 +KPX quotedblright Adieresis -59 +KPX quotedblright Aring -59 +KPX quotedblright T -45 +KPX quotedblright V -14 +KPX quotedblright W -20 +KPX quotedblright Y -35 +KPX quoteleft A -80 +KPX quoteleft AE -73 +KPX quoteleft Aacute -80 +KPX quoteleft Adieresis -80 +KPX quoteleft Aring -80 +KPX quoteleft T -59 +KPX quoteleft V -36 +KPX quoteleft W -24 +KPX quoteleft Y -56 +KPX quoteright A -140 +KPX quoteright AE -149 +KPX quoteright Aacute -140 +KPX quoteright Adieresis -140 +KPX quoteright Aring -140 +KPX quoteright comma -196 +KPX quoteright d -126 +KPX quoteright o -131 +KPX quoteright period -220 +KPX quoteright r -145 +KPX quoteright s -140 +KPX quoteright t -114 +KPX quoteright v -108 +KPX quoteright w -105 +KPX quoteright y -118 +KPX r a -20 +KPX r aacute -20 +KPX r acircumflex -20 +KPX r adieresis -20 +KPX r ae 7 +KPX r agrave -20 +KPX r aring -20 KPX r c -24 -KPX r ccedilla -15 -KPX r colon -28 -KPX r comma -68 -KPX r d -30 -KPX r e -32 -KPX r eacute -32 -KPX r ecircumflex -32 -KPX r egrave -32 -KPX r f 23 -KPX r g -19 -KPX r h -16 -KPX r hyphen -51 -KPX r i 8 -KPX r j 3 -KPX r k -15 -KPX r l -21 -KPX r m 17 -KPX r n 16 -KPX r o -26 -KPX r oacute -26 -KPX r ocircumflex -26 -KPX r odieresis -26 -KPX r oe -21 -KPX r ograve -26 -KPX r oslash -27 -KPX r p 13 -KPX r period -72 -KPX r q -29 -KPX r quoteright -4 -KPX r r 4 -KPX r s -16 -KPX r semicolon -28 -KPX r t 12 -KPX r u 11 -KPX r v 29 -KPX r w 32 -KPX r x 8 -KPX r y 32 -KPX r z 0 -KPX s quoteright -21 -KPX s t -12 -KPX seven colon -88 -KPX seven comma -79 -KPX seven four -64 -KPX seven one -47 -KPX seven period -82 -KPX seven seven -11 -KPX seven six -37 -KPX six four 17 -KPX six one -70 -KPX six seven -37 -KPX t S -9 -KPX t a -6 -KPX t aacute -6 -KPX t adieresis -6 -KPX t ae -10 -KPX t aring -6 -KPX t colon -29 -KPX t e -13 -KPX t eacute -13 -KPX t h -12 -KPX t o -11 -KPX t oacute -11 -KPX t odieresis -11 -KPX t quoteright -21 -KPX t semicolon -26 -KPX three four -9 -KPX three one -77 -KPX three seven -15 -KPX two four -12 -KPX two one -48 -KPX two seven -22 -KPX u quoteright -32 -KPX v a -24 -KPX v aacute -26 -KPX v acircumflex -26 -KPX v adieresis -26 -KPX v ae -29 -KPX v agrave -26 -KPX v aring -26 -KPX v atilde -26 -KPX v c -26 -KPX v colon -48 -KPX v comma -47 -KPX v e -30 -KPX v eacute -32 -KPX v ecircumflex -32 -KPX v egrave -32 -KPX v g -36 -KPX v hyphen 0 -KPX v l -29 -KPX v o -26 -KPX v oacute -28 -KPX v odieresis -28 -KPX v ograve -28 -KPX v oslash -29 -KPX v period -51 -KPX v s -30 -KPX v semicolon -48 -KPX w a -26 -KPX w aacute -27 -KPX w acircumflex -27 -KPX w adieresis -27 -KPX w ae -31 -KPX w agrave -27 -KPX w aring -27 -KPX w atilde -27 -KPX w c -28 -KPX w colon -49 -KPX w comma -46 -KPX w e -32 -KPX w eacute -33 -KPX w ecircumflex -33 -KPX w egrave -33 -KPX w g -38 -KPX w hyphen -3 -KPX w l -30 -KPX w o -28 -KPX w oacute -30 -KPX w odieresis -30 -KPX w ograve -30 -KPX w oslash -30 -KPX w period -51 -KPX w s -32 -KPX w semicolon -49 -KPX x a 5 -KPX x c -2 -KPX x e -2 -KPX x eacute -2 -KPX x o 0 -KPX x q 1 -KPX y a -14 -KPX y aacute -16 -KPX y acircumflex -16 -KPX y adieresis -16 -KPX y ae -19 -KPX y agrave -16 -KPX y aring -16 -KPX y atilde -16 -KPX y c -16 -KPX y colon -48 -KPX y comma -23 -KPX y e -20 -KPX y eacute -22 -KPX y ecircumflex -22 -KPX y egrave -22 -KPX y g -36 -KPX y hyphen 5 -KPX y l -20 -KPX y o -16 -KPX y oacute -18 -KPX y odieresis -18 -KPX y ograve -18 -KPX y oslash -19 -KPX y period -27 -KPX y s -20 -KPX y semicolon -46 -KPX zero four 14 -KPX zero one -51 -KPX zero seven -3 +KPX r ccedilla -28 +KPX r colon -81 +KPX r comma -97 +KPX r d -14 +KPX r e -12 +KPX r eacute -12 +KPX r ecircumflex -12 +KPX r egrave -12 +KPX r f -18 +KPX r g -11 +KPX r h -19 +KPX r hyphen -120 +KPX r i -28 +KPX r j -35 +KPX r k -29 +KPX r l -47 +KPX r m 33 +KPX r n 6 +KPX r o -19 +KPX r oacute -19 +KPX r ocircumflex -19 +KPX r odieresis -19 +KPX r oe 18 +KPX r ograve -19 +KPX r oslash -19 +KPX r p 28 +KPX r period -125 +KPX r q -11 +KPX r quoteright -37 +KPX r r -13 +KPX r s -24 +KPX r semicolon -69 +KPX r t 17 +KPX r u 17 +KPX r v 24 +KPX r w 24 +KPX r x 2 +KPX r y 13 +KPX r z -19 +KPX s quoteright -48 +KPX s t -13 +KPX seven colon -148 +KPX seven comma -140 +KPX seven eight -79 +KPX seven five -84 +KPX seven four -111 +KPX seven one -67 +KPX seven period -165 +KPX seven seven -62 +KPX seven six -99 +KPX seven three -72 +KPX seven two -69 +KPX six four -46 +KPX six one -61 +KPX six seven -48 +KPX t S -35 +KPX t a -20 +KPX t aacute -20 +KPX t adieresis -20 +KPX t ae 8 +KPX t aring -20 +KPX t colon -102 +KPX t e -37 +KPX t eacute -37 +KPX t h -7 +KPX t o -39 +KPX t oacute -39 +KPX t odieresis -39 +KPX t quoteright -94 +KPX t semicolon -80 +KPX three four -52 +KPX three one -74 +KPX three seven -67 +KPX two four -92 +KPX two one -66 +KPX two seven -71 +KPX u quoteright -38 +KPX v a -6 +KPX v aacute -6 +KPX v acircumflex -6 +KPX v adieresis -6 +KPX v ae 20 +KPX v agrave -6 +KPX v aring -6 +KPX v atilde -6 +KPX v c -25 +KPX v colon -71 +KPX v comma -113 +KPX v e -13 +KPX v eacute -13 +KPX v ecircumflex -13 +KPX v egrave -13 +KPX v g -11 +KPX v hyphen -24 +KPX v l -82 +KPX v o -21 +KPX v oacute -21 +KPX v odieresis -21 +KPX v ograve -21 +KPX v oslash -21 +KPX v period -139 +KPX v s -19 +KPX v semicolon -62 +KPX w a -6 +KPX w aacute -6 +KPX w acircumflex -6 +KPX w adieresis -6 +KPX w ae 20 +KPX w agrave -6 +KPX w aring -6 +KPX w atilde -6 +KPX w c -10 +KPX w colon -71 +KPX w comma -70 +KPX w e -1 +KPX w eacute -1 +KPX w ecircumflex -1 +KPX w egrave -1 +KPX w g -3 +KPX w hyphen 1 +KPX w l -50 +KPX w o -6 +KPX w oacute -6 +KPX w odieresis -6 +KPX w ograve -6 +KPX w oslash -3 +KPX w period -95 +KPX w s -18 +KPX w semicolon -62 +KPX x a -2 +KPX x c -29 +KPX x e -25 +KPX x eacute -25 +KPX x o -26 +KPX x q -30 +KPX y a -17 +KPX y aacute -17 +KPX y acircumflex -17 +KPX y adieresis -17 +KPX y ae 10 +KPX y agrave -17 +KPX y aring -17 +KPX y atilde -17 +KPX y c -35 +KPX y colon -81 +KPX y comma -117 +KPX y e -24 +KPX y eacute -24 +KPX y ecircumflex -24 +KPX y egrave -24 +KPX y g -21 +KPX y hyphen -24 +KPX y l -93 +KPX y o -31 +KPX y oacute -31 +KPX y odieresis -31 +KPX y ograve -31 +KPX y oslash -31 +KPX y period -144 +KPX y s -30 +KPX y semicolon -72 +KPX zero four -58 +KPX zero one -81 +KPX zero seven -73 EndKernPairs EndKernData EndFontMetrics diff --git a/misc/gs_afm/TimesRo.afm b/misc/gs_afm/TimesRo.afm index a272b449b5..95759a53b0 100644 --- a/misc/gs_afm/TimesRo.afm +++ b/misc/gs_afm/TimesRo.afm @@ -1,7 +1,7 @@ StartFontMetrics 3.0 -Comment Copyright URW Software, Copyright 1994 by URW -Comment Creation Date: 11/17/1994 -Comment See the file PUBLIC (Aladdin Free Public License) for license conditions. +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. FontName NimbusRomNo9L-Regu FullName Nimbus Roman No9 L Regular FamilyName Nimbus Roman No9 L @@ -10,17 +10,17 @@ ItalicAngle 0.0 IsFixedPitch false UnderlinePosition -100 UnderlineThickness 50 -Version 001.005 -Notice URW Software, Copyright 1994 by URW +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development EncodingScheme AdobeStandardEncoding -FontBBox -168 -218 1000 915 +FontBBox -168 -281 1000 924 CapHeight 662 XHeight 450 Descender -217 Ascender 683 -StartCharMetrics 232 +StartCharMetrics 316 C 32 ; WX 250 ; N space ; B 125 0 125 0 ; -C 33 ; WX 333 ; N exclam ; B 130 -9 236 676 ; +C 33 ; WX 333 ; N exclam ; B 130 -9 237 676 ; C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ; C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ; C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ; @@ -38,7 +38,7 @@ C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ; C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; C 49 ; WX 500 ; N one ; B 111 0 394 676 ; C 50 ; WX 500 ; N two ; B 30 0 475 676 ; -C 51 ; WX 500 ; N three ; B 43 -14 431 676 ; +C 51 ; WX 500 ; N three ; B 43 -14 432 676 ; C 52 ; WX 500 ; N four ; B 12 0 472 676 ; C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; C 54 ; WX 500 ; N six ; B 34 -14 468 684 ; @@ -114,7 +114,7 @@ C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ; C 124 ; WX 200 ; N bar ; B 67 -14 133 676 ; C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ; C 126 ; WX 541 ; N asciitilde ; B 40 186 502 320 ; -C 161 ; WX 333 ; N exclamdown ; B 97 -218 203 468 ; +C 161 ; WX 333 ; N exclamdown ; B 97 -218 204 469 ; C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ; C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ; @@ -130,7 +130,7 @@ C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ; C 174 ; WX 556 ; N fi ; B 31 0 521 683 ; C 175 ; WX 556 ; N fl ; B 32 0 521 683 ; C 177 ; WX 500 ; N endash ; B 0 201 500 250 ; -C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ; +C 178 ; WX 500 ; N dagger ; B 59 -149 443 676 ; C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ; C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ; @@ -141,7 +141,7 @@ C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ; C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ; C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ; C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ; -C 191 ; WX 444 ; N questiondown ; B 30 -218 376 467 ; +C 191 ; WX 444 ; N questiondown ; B 30 -218 376 468 ; C 193 ; WX 333 ; N grave ; B 19 507 242 678 ; C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ; @@ -168,97 +168,181 @@ C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ; C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ; C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ; C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ; -C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ; -C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ; -C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ; -C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ; -C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 834 ; -C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ; -C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ; -C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ; C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 834 ; -C -1 ; WX 250 ; N middot ; B 70 199 181 310 ; -C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ; -C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; -C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; +C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ; +C -1 ; WX 556 ; N Scedilla ; B 42 -215 491 676 ; +C -1 ; WX 611 ; N Tcaron ; B 17 0 593 886 ; C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ; +C -1 ; WX 667 ; N Rcaron ; B 17 0 659 886 ; +C -1 ; WX 667 ; N Racute ; B 17 0 659 890 ; +C -1 ; WX 556 ; N Sacute ; B 42 -14 491 890 ; C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ; -C -1 ; WX 333 ; N sfthyphen ; B 39 194 285 257 ; +C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 34 -14 688 890 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 14 -14 705 890 ; +C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ; +C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ; +C -1 ; WX 722 ; N Dcroat ; B 16 0 685 662 ; +C -1 ; WX 611 ; N Zacute ; B 9 0 597 890 ; +C -1 ; WX 722 ; N Uring ; B 14 -14 705 923 ; +C -1 ; WX 500 ; N gbreve ; B 28 -218 470 664 ; +C -1 ; WX 444 ; N eogonek ; B 25 -165 424 460 ; +C -1 ; WX 444 ; N edotaccent ; B 25 -10 424 622 ; +C -1 ; WX 444 ; N ecaron ; B 25 -10 424 674 ; +C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ; +C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ; +C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ; +C -1 ; WX 444 ; N edieresis ; B 25 -10 424 622 ; +C -1 ; WX 600 ; N dcaron ; B 27 -10 599 683 ; +C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ; +C -1 ; WX 444 ; N ccaron ; B 25 -10 412 674 ; +C -1 ; WX 444 ; N cacute ; B 25 -10 412 678 ; +C -1 ; WX 444 ; N aogonek ; B 37 -165 444 460 ; +C -1 ; WX 444 ; N aring ; B 37 -10 442 721 ; C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; -C -1 ; WX 444 ; N aring ; B 37 -10 442 722 ; +C -1 ; WX 444 ; N abreve ; B 37 -10 442 664 ; +C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ; +C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; +C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; C -1 ; WX 444 ; N adieresis ; B 37 -10 442 622 ; +C -1 ; WX 722 ; N Uogonek ; B 14 -165 705 662 ; +C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; +C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; +C -1 ; WX 500 ; N udieresis ; B 9 -10 479 622 ; +C -1 ; WX 278 ; N tcaron ; B 13 -10 300 676 ; +C -1 ; WX 389 ; N scommaaccent ; B 51 -281 348 459 ; +C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ; +C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ; +C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ; +C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; +C -1 ; WX 611 ; N Zdotaccent ; B 9 0 597 834 ; +C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ; +C -1 ; WX 722 ; N Amacron ; B 15 0 706 813 ; +C -1 ; WX 389 ; N sacute ; B 51 -10 365 678 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 17 -281 593 662 ; +C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 834 ; +C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ; +C -1 ; WX 611 ; N Emacron ; B 12 0 597 813 ; C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ; -C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ; +C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ; C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 834 ; C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ; -C -1 ; WX 444 ; N edieresis ; B 25 -10 424 622 ; -C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ; -C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ; +C -1 ; WX 722 ; N Ncaron ; B 12 -11 707 886 ; +C -1 ; WX 722 ; N Nacute ; B 12 -11 707 890 ; +C -1 ; WX 611 ; N Lcaron ; B 12 0 598 676 ; +C -1 ; WX 611 ; N Lacute ; B 12 0 598 890 ; +C -1 ; WX 333 ; N Idotaccent ; B 18 0 315 834 ; +C -1 ; WX 333 ; N racute ; B 5 0 335 678 ; C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ; -C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 29 -10 470 678 ; +C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ; +C -1 ; WX 500 ; N Euro ; B -16 -14 477 674 ; +C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ; +C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ; +C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ; +C -1 ; WX 300 ; N threesuperior ; B 14 262 291 676 ; C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ; C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ; +C -1 ; WX 333 ; N Imacron ; B 11 0 322 813 ; +C -1 ; WX 333 ; N Iogonek ; B 18 -165 397 662 ; C -1 ; WX 333 ; N Idieresis ; B 18 0 316 834 ; -C -1 ; WX 400 ; N degree ; B 57 390 343 676 ; +C -1 ; WX 722 ; N Gbreve ; B 32 -14 709 876 ; +C -1 ; WX 722 ; N Umacron ; B 14 -14 705 813 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 34 -281 723 662 ; +C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ; +C -1 ; WX 556 ; N Scommaaccent ; B 42 -281 491 676 ; +C -1 ; WX 611 ; N Eogonek ; B 12 -165 611 662 ; +C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ; +C -1 ; WX 611 ; N Edotaccent ; B 12 0 597 834 ; +C -1 ; WX 278 ; N iogonek ; B 16 -165 278 683 ; +C -1 ; WX 500 ; N gcommaaccent ; B 28 -218 470 736 ; +C -1 ; WX 500 ; N odieresis ; B 29 -10 470 622 ; +C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ; +C -1 ; WX 500 ; N ncaron ; B 16 0 485 674 ; +C -1 ; WX 611 ; N Ecaron ; B 12 0 597 886 ; C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ; +C -1 ; WX 389 ; N scedilla ; B 51 -215 348 459 ; +C -1 ; WX 333 ; N rcaron ; B 5 0 335 674 ; +C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ; +C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 32 -281 709 676 ; +C -1 ; WX 667 ; N Rcommaaccent ; B 17 -281 659 662 ; +C -1 ; WX 611 ; N Edieresis ; B 12 0 597 834 ; +C -1 ; WX 500 ; N nacute ; B 16 0 485 678 ; +C -1 ; WX 500 ; N uogonek ; B 9 -165 500 450 ; +C -1 ; WX 500 ; N umacron ; B 9 -10 479 601 ; +C -1 ; WX 722 ; N Dcaron ; B 16 0 685 886 ; +C -1 ; WX 348 ; N lcaron ; B 19 0 348 683 ; +C -1 ; WX 667 ; N Ccaron ; B 28 -14 633 886 ; +C -1 ; WX 667 ; N Cacute ; B 28 -14 633 890 ; +C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ; +C -1 ; WX 400 ; N degree ; B 57 390 343 676 ; +C -1 ; WX 722 ; N Aogonek ; B 15 -165 786 674 ; C -1 ; WX 564 ; N minus ; B 30 220 534 286 ; C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ; C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ; -C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ; +C -1 ; WX 722 ; N Aring ; B 15 0 706 915 ; C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ; -C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ; -C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ; -C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ; -C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ; -C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ; -C -1 ; WX 278 ; N idieresis ; B 11 0 269 622 ; -C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ; +C -1 ; WX 333 ; N rcommaaccent ; B 5 -281 335 460 ; +C -1 ; WX 278 ; N lacute ; B 19 0 290 890 ; +C -1 ; WX 500 ; N omacron ; B 29 -10 470 601 ; +C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ; +C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ; C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ; +C -1 ; WX 500 ; N ncommaaccent ; B 16 -281 485 460 ; +C -1 ; WX 278 ; N lcommaaccent ; B 19 -281 257 683 ; C -1 ; WX 564 ; N plusminus ; B 30 0 534 568 ; C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ; C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ; C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ; -C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ; -C -1 ; WX 611 ; N Edieresis ; B 12 0 597 834 ; -C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ; -C -1 ; WX 722 ; N Aring ; B 15 0 706 915 ; -C -1 ; WX 500 ; N odieresis ; B 29 -10 470 622 ; -C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ; -C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ; -C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ; -C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ; -C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ; -C -1 ; WX 500 ; N udieresis ; B 9 -10 479 622 ; -C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; -C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; -C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ; -C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ; +C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ; +C -1 ; WX 722 ; N Abreve ; B 15 0 706 876 ; +C -1 ; WX 500 ; N kcommaaccent ; B 7 -281 505 683 ; +C -1 ; WX 722 ; N Omacron ; B 34 -14 688 813 ; +C -1 ; WX 278 ; N imacron ; B -16 0 292 601 ; +C -1 ; WX 444 ; N emacron ; B 25 -10 424 601 ; +C -1 ; WX 444 ; N amacron ; B 37 -10 442 601 ; +C -1 ; WX 278 ; N tcommaaccent ; B 13 -281 279 579 ; C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 622 ; +C -1 ; WX 444 ; N zdotaccent ; B 27 0 418 622 ; +C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ; +C -1 ; WX 444 ; N zacute ; B 27 0 418 678 ; +C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ; +C -1 ; WX 500 ; N uhungarumlaut ; B 9 -10 479 678 ; +C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ; +C -1 ; WX 500 ; N uring ; B 9 -10 479 711 ; +C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ; +C -1 ; WX 333 ; N commaaccent ; B 97 -281 236 -38 ; C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ; C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ; -C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ; -C -1 ; WX 250 ; N nbspace ; B 125 0 125 0 ; -C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ; C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ; +C -1 ; WX 278 ; N idieresis ; B 11 0 269 622 ; +C -1 ; WX 494 ; N lozenge ; B 18 0 466 740 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 564 ; N notequal ; B 30 -3 534 509 ; +C -1 ; WX 549 ; N radical ; B -2 -65 526 924 ; C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ; -C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ; C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ; -C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ; +C -1 ; WX 564 ; N lessequal ; B 28 0 536 628 ; +C -1 ; WX 564 ; N greaterequal ; B 28 0 536 628 ; +C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ; +C -1 ; WX 713 ; N summation ; B 14 -123 695 752 ; +C -1 ; WX 494 ; N partialdiff ; B 26 -10 462 753 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 12 -281 707 662 ; +C -1 ; WX 500 ; N dcroat ; B 27 -10 500 683 ; C -1 ; WX 200 ; N brokenbar ; B 67 -14 133 676 ; -C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 12 -281 598 662 ; C -1 ; WX 722 ; N Adieresis ; B 15 0 706 834 ; C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ; C -1 ; WX 250 ; N .notdef ; B 125 0 125 0 ; EndCharMetrics StartKernData StartKernPairs 998 -KPX A C -53 +KPX A C -51 KPX A Ccedilla -57 KPX A G -57 -KPX A O -58 -KPX A Odieresis -58 +KPX A O -60 +KPX A Odieresis -60 KPX A Q -60 KPX A T -54 KPX A U -62 @@ -266,17 +350,17 @@ KPX A Uacute -62 KPX A Ucircumflex -62 KPX A Udieresis -62 KPX A Ugrave -62 -KPX A V -132 +KPX A V -131 KPX A W -113 KPX A Y -81 KPX A a -6 -KPX A b -19 +KPX A b -20 KPX A c -29 KPX A ccedilla -29 KPX A comma -3 KPX A d -28 KPX A e -27 -KPX A g -19 +KPX A g -20 KPX A guillemotleft -64 KPX A guilsinglleft -74 KPX A hyphen -23 @@ -287,25 +371,25 @@ KPX A quotedblright -91 KPX A quoteright -116 KPX A t -20 KPX A u -28 -KPX A v -82 +KPX A v -81 KPX A w -73 KPX A y -83 -KPX Aacute C -53 +KPX Aacute C -51 KPX Aacute G -57 -KPX Aacute O -58 +KPX Aacute O -60 KPX Aacute Q -60 KPX Aacute T -54 KPX Aacute U -62 -KPX Aacute V -132 +KPX Aacute V -131 KPX Aacute W -113 KPX Aacute Y -81 KPX Aacute a -6 -KPX Aacute b -19 +KPX Aacute b -20 KPX Aacute c -29 KPX Aacute comma -3 KPX Aacute d -28 KPX Aacute e -27 -KPX Aacute g -19 +KPX Aacute g -20 KPX Aacute guillemotleft -64 KPX Aacute guilsinglleft -74 KPX Aacute hyphen -23 @@ -315,35 +399,35 @@ KPX Aacute q -21 KPX Aacute quoteright -116 KPX Aacute t -20 KPX Aacute u -28 -KPX Aacute v -82 +KPX Aacute v -81 KPX Aacute w -73 KPX Aacute y -83 -KPX Acircumflex C -53 +KPX Acircumflex C -51 KPX Acircumflex G -57 -KPX Acircumflex O -58 +KPX Acircumflex O -60 KPX Acircumflex Q -60 KPX Acircumflex T -54 KPX Acircumflex U -62 -KPX Acircumflex V -132 +KPX Acircumflex V -131 KPX Acircumflex W -113 KPX Acircumflex Y -81 KPX Acircumflex comma -3 KPX Acircumflex period -10 -KPX Adieresis C -53 +KPX Adieresis C -51 KPX Adieresis G -57 -KPX Adieresis O -58 +KPX Adieresis O -60 KPX Adieresis Q -60 KPX Adieresis T -54 KPX Adieresis U -62 -KPX Adieresis V -132 +KPX Adieresis V -131 KPX Adieresis W -113 KPX Adieresis Y -81 KPX Adieresis a -6 -KPX Adieresis b -19 +KPX Adieresis b -20 KPX Adieresis c -29 KPX Adieresis comma -3 KPX Adieresis d -28 -KPX Adieresis g -19 +KPX Adieresis g -20 KPX Adieresis guillemotleft -64 KPX Adieresis guilsinglleft -74 KPX Adieresis hyphen -23 @@ -354,36 +438,36 @@ KPX Adieresis quotedblright -91 KPX Adieresis quoteright -116 KPX Adieresis t -20 KPX Adieresis u -28 -KPX Adieresis v -82 +KPX Adieresis v -81 KPX Adieresis w -73 KPX Adieresis y -83 -KPX Agrave C -53 +KPX Agrave C -51 KPX Agrave G -57 -KPX Agrave O -58 +KPX Agrave O -60 KPX Agrave Q -60 KPX Agrave T -54 KPX Agrave U -62 -KPX Agrave V -132 +KPX Agrave V -131 KPX Agrave W -113 KPX Agrave Y -81 KPX Agrave comma -3 KPX Agrave period -10 -KPX Aring C -53 +KPX Aring C -51 KPX Aring G -57 -KPX Aring O -58 +KPX Aring O -60 KPX Aring Q -60 KPX Aring T -54 KPX Aring U -62 -KPX Aring V -132 +KPX Aring V -131 KPX Aring W -113 KPX Aring Y -81 KPX Aring a -6 -KPX Aring b -19 +KPX Aring b -20 KPX Aring c -29 KPX Aring comma -3 KPX Aring d -28 KPX Aring e -27 -KPX Aring g -19 +KPX Aring g -20 KPX Aring guillemotleft -64 KPX Aring guilsinglleft -74 KPX Aring hyphen -23 @@ -394,29 +478,29 @@ KPX Aring quotedblright -91 KPX Aring quoteright -116 KPX Aring t -20 KPX Aring u -28 -KPX Aring v -82 +KPX Aring v -81 KPX Aring w -73 KPX Aring y -83 -KPX Atilde C -53 +KPX Atilde C -51 KPX Atilde G -57 -KPX Atilde O -58 +KPX Atilde O -60 KPX Atilde Q -60 KPX Atilde T -54 KPX Atilde U -62 -KPX Atilde V -132 +KPX Atilde V -131 KPX Atilde W -113 KPX Atilde Y -81 KPX Atilde comma -3 KPX Atilde period -10 KPX B A -51 -KPX B AE -43 +KPX B AE -44 KPX B Aacute -51 KPX B Acircumflex -51 KPX B Adieresis -51 KPX B Aring -51 KPX B Atilde -51 KPX B O -24 -KPX B OE -19 +KPX B OE -18 KPX B Oacute -24 KPX B Ocircumflex -24 KPX B Odieresis -24 @@ -444,11 +528,11 @@ KPX D Agrave -67 KPX D Aring -67 KPX D Atilde -67 KPX D J -41 -KPX D T -9 -KPX D V -70 +KPX D T -10 +KPX D V -71 KPX D W -57 KPX D X -64 -KPX D Y -73 +KPX D Y -74 KPX F A -71 KPX F Aacute -71 KPX F Acircumflex -71 @@ -494,12 +578,12 @@ KPX J A -53 KPX J AE -46 KPX J Adieresis -53 KPX J Aring -53 -KPX K C -44 +KPX K C -43 KPX K G -49 -KPX K O -50 +KPX K O -51 KPX K OE -44 -KPX K Oacute -50 -KPX K Odieresis -50 +KPX K Oacute -51 +KPX K Odieresis -51 KPX K S 1 KPX K T 0 KPX K a 2 @@ -513,13 +597,13 @@ KPX K oacute -31 KPX K odieresis -31 KPX K u -19 KPX K udieresis -19 -KPX K y -87 +KPX K y -86 KPX L A 0 KPX L AE 6 KPX L Aacute 0 KPX L Adieresis 0 KPX L Aring 0 -KPX L C 1 +KPX L C 2 KPX L Ccedilla 0 KPX L G 0 KPX L O -3 @@ -540,15 +624,15 @@ KPX L quotedblright -100 KPX L quoteright -125 KPX L u -10 KPX L udieresis -10 -KPX L y -57 +KPX L y -56 KPX N A -28 KPX N AE -21 KPX N Aacute -28 KPX N Adieresis -28 KPX N Aring -28 -KPX N C -17 -KPX N Ccedilla -17 -KPX N G -20 +KPX N C -16 +KPX N Ccedilla -16 +KPX N G -19 KPX N O -20 KPX N Oacute -20 KPX N Odieresis -20 @@ -568,19 +652,19 @@ KPX N period -21 KPX N u -25 KPX N udieresis -25 KPX O A -58 -KPX O AE -51 +KPX O AE -50 KPX O Aacute -58 KPX O Adieresis -58 KPX O Aring -58 KPX O T -9 KPX O V -69 -KPX O W -55 -KPX O X -56 +KPX O W -54 +KPX O X -55 KPX O Y -72 KPX Oacute A -58 KPX Oacute T -9 KPX Oacute V -69 -KPX Oacute W -55 +KPX Oacute W -54 KPX Oacute Y -72 KPX Ocircumflex T -9 KPX Ocircumflex V -69 @@ -588,8 +672,8 @@ KPX Ocircumflex Y -72 KPX Odieresis A -58 KPX Odieresis T -9 KPX Odieresis V -69 -KPX Odieresis W -55 -KPX Odieresis X -56 +KPX Odieresis W -54 +KPX Odieresis X -55 KPX Odieresis Y -72 KPX Ograve T -9 KPX Ograve V -69 @@ -603,34 +687,34 @@ KPX P AE -91 KPX P Aacute -90 KPX P Adieresis -90 KPX P Aring -90 -KPX P J -51 -KPX P a -18 -KPX P aacute -18 -KPX P adieresis -18 +KPX P J -52 +KPX P a -17 +KPX P aacute -17 +KPX P adieresis -17 KPX P ae -18 -KPX P aring -18 +KPX P aring -17 KPX P comma -94 KPX P e -23 KPX P eacute -23 -KPX P hyphen -38 +KPX P hyphen -37 KPX P o -25 KPX P oacute -25 KPX P odieresis -25 KPX P oe -25 KPX P oslash -25 KPX P period -101 -KPX R C -42 -KPX R Ccedilla -42 +KPX R C -41 +KPX R Ccedilla -41 KPX R G -44 KPX R O -45 -KPX R OE -40 +KPX R OE -39 KPX R Oacute -45 KPX R Odieresis -45 KPX R T -34 KPX R U -56 -KPX R Udieresis -56 +KPX R Udieresis -55 KPX R V -73 -KPX R W -68 +KPX R W -67 KPX R Y -76 KPX R a -2 KPX R aacute -2 @@ -647,7 +731,7 @@ KPX R oe -31 KPX R u -24 KPX R uacute -24 KPX R udieresis -24 -KPX R y -36 +KPX R y -37 KPX S A -37 KPX S AE -30 KPX S Aacute -37 @@ -667,10 +751,10 @@ KPX T Agrave -53 KPX T Aring -53 KPX T Atilde -53 KPX T C -8 -KPX T G -10 +KPX T G -11 KPX T J -18 KPX T O -10 -KPX T OE -3 +KPX T OE -4 KPX T Oacute -10 KPX T Ocircumflex -10 KPX T Odieresis -10 @@ -684,11 +768,11 @@ KPX T Y 11 KPX T a -77 KPX T ae -80 KPX T c -87 -KPX T colon -88 +KPX T colon -87 KPX T comma -74 KPX T e -86 KPX T g -91 -KPX T guillemotleft -115 +KPX T guillemotleft -114 KPX T guilsinglleft -125 KPX T hyphen -73 KPX T i -18 @@ -710,14 +794,14 @@ KPX U Acircumflex -65 KPX U Adieresis -65 KPX U Aring -65 KPX U Atilde -65 -KPX U comma -32 +KPX U comma -31 KPX U m -33 KPX U n -31 KPX U p -28 KPX U period -37 KPX U r -27 KPX Uacute A -65 -KPX Uacute comma -32 +KPX Uacute comma -31 KPX Uacute m -33 KPX Uacute n -31 KPX Uacute p -28 @@ -726,7 +810,7 @@ KPX Uacute r -27 KPX Ucircumflex A -65 KPX Udieresis A -65 KPX Udieresis b 21 -KPX Udieresis comma -32 +KPX Udieresis comma -31 KPX Udieresis m -33 KPX Udieresis n -31 KPX Udieresis p -28 @@ -741,20 +825,20 @@ KPX V Adieresis -124 KPX V Agrave -124 KPX V Aring -124 KPX V Atilde -124 -KPX V C -64 -KPX V G -67 +KPX V C -63 +KPX V G -66 KPX V O -67 KPX V Oacute -67 KPX V Ocircumflex -67 KPX V Odieresis -67 KPX V Ograve -67 -KPX V Oslash -66 +KPX V Oslash -65 KPX V Otilde -67 KPX V S -47 KPX V T 10 -KPX V a -89 +KPX V a -88 KPX V ae -89 -KPX V colon -89 +KPX V colon -90 KPX V comma -105 KPX V e -85 KPX V g -101 @@ -796,7 +880,7 @@ KPX W e -72 KPX W g -91 KPX W guillemotleft -97 KPX W guilsinglleft -107 -KPX W hyphen -57 +KPX W hyphen -56 KPX W i -13 KPX W o -76 KPX W oslash -75 @@ -805,13 +889,13 @@ KPX W r -47 KPX W semicolon -81 KPX W u -43 KPX W y -45 -KPX X C -54 -KPX X O -59 -KPX X Odieresis -59 +KPX X C -52 +KPX X O -61 +KPX X Odieresis -61 KPX X Q -61 KPX X a -7 KPX X e -28 -KPX X hyphen -55 +KPX X hyphen -54 KPX X o -41 KPX X u -29 KPX X y -96 @@ -839,7 +923,7 @@ KPX Y ae -102 KPX Y colon -109 KPX Y comma -96 KPX Y e -103 -KPX Y g -112 +KPX Y g -113 KPX Y guillemotleft -135 KPX Y guilsinglleft -145 KPX Y hyphen -98 @@ -873,11 +957,11 @@ KPX agrave y -32 KPX aring v -30 KPX aring w -31 KPX aring y -32 -KPX b v -27 -KPX b w -28 +KPX b v -29 +KPX b w -30 KPX b y -32 KPX c h -15 -KPX c k -20 +KPX c k -19 KPX comma one -52 KPX comma quotedblright -29 KPX comma quoteright -53 @@ -894,13 +978,13 @@ KPX ecircumflex v -27 KPX ecircumflex w -28 KPX ecircumflex y -30 KPX eight four 0 -KPX eight one -63 +KPX eight one -64 KPX eight seven -15 -KPX f a -24 -KPX f aacute -24 +KPX f a -25 +KPX f aacute -25 KPX f adieresis 12 KPX f ae -25 -KPX f aring -7 +KPX f aring -6 KPX f e -34 KPX f eacute -34 KPX f f 6 @@ -910,23 +994,23 @@ KPX f l 44 KPX f o -38 KPX f oacute -38 KPX f odieresis -1 -KPX f oe -37 -KPX f oslash -38 +KPX f oe -36 +KPX f oslash -37 KPX f quoteright 17 KPX f s -21 KPX f t 10 -KPX five four -9 +KPX five four -8 KPX five one -70 KPX five seven -36 KPX four four 14 KPX four one -75 KPX four seven -42 -KPX g a -18 -KPX g adieresis -18 +KPX g a -17 +KPX g adieresis -17 KPX g ae -18 -KPX g aring -18 -KPX g e -24 -KPX g eacute -24 +KPX g aring -17 +KPX g e -25 +KPX g eacute -25 KPX g l -7 KPX g oacute -26 KPX g odieresis -26 @@ -951,11 +1035,11 @@ KPX guilsinglright W -105 KPX guilsinglright Y -149 KPX h quoteright -38 KPX h y -30 -KPX hyphen A -27 +KPX hyphen A -26 KPX hyphen AE -25 -KPX hyphen Aacute -27 -KPX hyphen Adieresis -27 -KPX hyphen Aring -27 +KPX hyphen Aacute -26 +KPX hyphen Adieresis -26 +KPX hyphen Aring -26 KPX hyphen T -77 KPX hyphen V -82 KPX hyphen W -59 @@ -970,8 +1054,8 @@ KPX k aring 1 KPX k comma 4 KPX k e -19 KPX k eacute -19 -KPX k g -11 -KPX k hyphen -64 +KPX k g -12 +KPX k hyphen -65 KPX k o -32 KPX k oacute -32 KPX k odieresis -32 @@ -987,7 +1071,7 @@ KPX m w -31 KPX m y -31 KPX n T -55 KPX n p -13 -KPX n quoteright -40 +KPX n quoteright -39 KPX n v -30 KPX n w -31 KPX n y -31 @@ -1000,19 +1084,19 @@ KPX o t -9 KPX o v -36 KPX o w -36 KPX o x -36 -KPX o y -39 +KPX o y -41 KPX oacute v -36 KPX oacute w -36 -KPX oacute y -39 +KPX oacute y -41 KPX ocircumflex t -9 KPX odieresis t -9 KPX odieresis v -36 KPX odieresis w -36 KPX odieresis x -36 -KPX odieresis y -39 +KPX odieresis y -41 KPX ograve v -36 KPX ograve w -36 -KPX ograve y -39 +KPX ograve y -41 KPX one comma -48 KPX one eight -68 KPX one five -37 @@ -1028,14 +1112,14 @@ KPX one zero -54 KPX p t -6 KPX p y -28 KPX period one -61 -KPX period quotedblright -34 +KPX period quotedblright -33 KPX period quoteright -58 -KPX q c -8 +KPX q c -7 KPX q u -12 KPX quotedblbase A 12 KPX quotedblbase AE 19 KPX quotedblbase T -60 -KPX quotedblbase V -105 +KPX quotedblbase V -104 KPX quotedblbase W -76 KPX quotedblbase Y -87 KPX quotedblleft A -86 @@ -1056,11 +1140,11 @@ KPX quotedblright T 11 KPX quotedblright V 0 KPX quotedblright W 6 KPX quotedblright Y -2 -KPX quoteleft A -111 +KPX quoteleft A -110 KPX quoteleft AE -115 -KPX quoteleft Aacute -111 -KPX quoteleft Adieresis -111 -KPX quoteleft Aring -111 +KPX quoteleft Aacute -110 +KPX quoteleft Adieresis -110 +KPX quoteleft Aring -110 KPX quoteleft T -9 KPX quoteleft V -23 KPX quoteleft W -17 @@ -1071,31 +1155,31 @@ KPX quoteright Aacute -130 KPX quoteright Adieresis -130 KPX quoteright Aring -130 KPX quoteright comma -71 -KPX quoteright d -57 +KPX quoteright d -56 KPX quoteright o -54 KPX quoteright period -78 KPX quoteright r -44 KPX quoteright s -47 -KPX quoteright t -44 +KPX quoteright t -43 KPX quoteright v -47 KPX quoteright w -47 KPX quoteright y -45 -KPX r a -2 -KPX r aacute -2 -KPX r acircumflex -2 -KPX r adieresis -2 +KPX r a -1 +KPX r aacute -1 +KPX r acircumflex -1 +KPX r adieresis -1 KPX r ae -3 -KPX r agrave -2 -KPX r aring -2 -KPX r c -9 +KPX r agrave -1 +KPX r aring -1 +KPX r c -8 KPX r ccedilla -8 KPX r colon -7 KPX r comma -41 KPX r d -10 -KPX r e -5 -KPX r eacute -5 -KPX r ecircumflex -5 -KPX r egrave -5 +KPX r e -6 +KPX r eacute -6 +KPX r ecircumflex -6 +KPX r egrave -6 KPX r f 19 KPX r g -15 KPX r h -6 @@ -1159,8 +1243,8 @@ KPX t odieresis -8 KPX t quoteright -29 KPX t semicolon -8 KPX three four -6 -KPX three one -76 -KPX three seven -29 +KPX three one -75 +KPX three seven -28 KPX two four 0 KPX two one -60 KPX two seven -16 @@ -1176,29 +1260,29 @@ KPX v atilde -24 KPX v c -37 KPX v colon -20 KPX v comma -69 -KPX v e -35 -KPX v eacute -35 -KPX v ecircumflex -35 -KPX v egrave -35 +KPX v e -36 +KPX v eacute -36 +KPX v ecircumflex -36 +KPX v egrave -36 KPX v g -41 KPX v hyphen -28 KPX v l -31 -KPX v o -37 -KPX v oacute -37 -KPX v odieresis -37 -KPX v ograve -37 +KPX v o -38 +KPX v oacute -38 +KPX v odieresis -38 +KPX v ograve -38 KPX v oslash -38 KPX v period -76 -KPX v s -20 +KPX v s -21 KPX v semicolon -20 -KPX w a -26 -KPX w aacute -26 -KPX w acircumflex -26 -KPX w adieresis -26 +KPX w a -27 +KPX w aacute -27 +KPX w acircumflex -27 +KPX w adieresis -27 KPX w ae -27 -KPX w agrave -26 -KPX w aring -26 -KPX w atilde -26 +KPX w agrave -27 +KPX w aring -27 +KPX w atilde -27 KPX w c -33 KPX w colon -23 KPX w comma -64 @@ -1209,10 +1293,10 @@ KPX w egrave -31 KPX w g -43 KPX w hyphen -24 KPX w l -33 -KPX w o -36 -KPX w oacute -36 -KPX w odieresis -36 -KPX w ograve -36 +KPX w o -35 +KPX w oacute -35 +KPX w odieresis -35 +KPX w ograve -35 KPX w oslash -34 KPX w period -71 KPX w s -23 @@ -1223,14 +1307,14 @@ KPX x e -32 KPX x eacute -32 KPX x o -45 KPX x q -26 -KPX y a -30 -KPX y aacute -30 -KPX y acircumflex -30 -KPX y adieresis -30 +KPX y a -32 +KPX y aacute -32 +KPX y acircumflex -32 +KPX y adieresis -32 KPX y ae -31 -KPX y agrave -30 -KPX y aring -30 -KPX y atilde -30 +KPX y agrave -32 +KPX y aring -32 +KPX y atilde -32 KPX y c -37 KPX y colon -23 KPX y comma -66 diff --git a/misc/gs_afm/Zapf.afm b/misc/gs_afm/Zapf.afm new file mode 100644 index 0000000000..d3ad8d0aba --- /dev/null +++ b/misc/gs_afm/Zapf.afm @@ -0,0 +1,1341 @@ +StartFontMetrics 3.0 +Comment Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development +Comment Creation Date: 12/22/1999 +Comment See the file COPYING (GNU General Public License) for license conditions. +FontName URWChanceryL-MediItal +FullName URW Chancery L Medium Italic +FamilyName URW Chancery L +Weight Medium +ItalicAngle -14.0 +IsFixedPitch false +UnderlinePosition -120 +UnderlineThickness 50 +Version 1.05 +Notice (URW)++,Copyright 1999 by (URW)++ Design & Development +EncodingScheme AdobeStandardEncoding +FontBBox -133 -290 1078 913 +CapHeight 573 +XHeight 391 +Descender -248 +Ascender 677 +StartCharMetrics 316 +C 32 ; WX 220 ; N space ; B 0 0 0 0 ; +C 33 ; WX 280 ; N exclam ; B 109 -9 347 587 ; +C 34 ; WX 220 ; N quotedbl ; B 170 405 333 591 ; +C 35 ; WX 440 ; N numbersign ; B 63 -1 596 575 ; +C 36 ; WX 440 ; N dollar ; B 60 -144 461 675 ; +C 37 ; WX 680 ; N percent ; B 162 -7 701 584 ; +C 38 ; WX 780 ; N ampersand ; B 121 -17 855 557 ; +C 39 ; WX 240 ; N quoteright ; B 228 358 358 578 ; +C 40 ; WX 260 ; N parenleft ; B 116 -165 412 668 ; +C 41 ; WX 220 ; N parenright ; B 17 -166 313 667 ; +C 42 ; WX 420 ; N asterisk ; B 220 377 512 677 ; +C 43 ; WX 520 ; N plus ; B 103 14 513 424 ; +C 44 ; WX 220 ; N comma ; B 30 -98 215 173 ; +C 45 ; WX 280 ; N hyphen ; B 115 173 300 237 ; +C 46 ; WX 220 ; N period ; B 107 -9 228 128 ; +C 47 ; WX 340 ; N slash ; B -6 -170 535 679 ; +C 48 ; WX 440 ; N zero ; B 94 -7 489 576 ; +C 49 ; WX 440 ; N one ; B 82 0 434 582 ; +C 50 ; WX 440 ; N two ; B 47 -17 469 572 ; +C 51 ; WX 440 ; N three ; B 36 -6 458 575 ; +C 52 ; WX 440 ; N four ; B 69 -25 455 585 ; +C 53 ; WX 440 ; N five ; B 67 -8 565 640 ; +C 54 ; WX 440 ; N six ; B 95 -8 532 585 ; +C 55 ; WX 440 ; N seven ; B 165 -18 541 611 ; +C 56 ; WX 440 ; N eight ; B 75 -10 494 572 ; +C 57 ; WX 440 ; N nine ; B 42 -8 480 576 ; +C 58 ; WX 260 ; N colon ; B 98 -9 289 408 ; +C 59 ; WX 240 ; N semicolon ; B 29 -98 277 408 ; +C 60 ; WX 520 ; N less ; B 120 2 557 449 ; +C 61 ; WX 520 ; N equal ; B 108 108 518 330 ; +C 62 ; WX 520 ; N greater ; B 119 2 556 449 ; +C 63 ; WX 380 ; N question ; B 130 -9 497 582 ; +C 64 ; WX 700 ; N at ; B 102 -31 765 592 ; +C 65 ; WX 620 ; N A ; B 23 -13 687 594 ; +C 66 ; WX 600 ; N B ; B 75 -2 642 616 ; +C 67 ; WX 520 ; N C ; B 88 -73 635 591 ; +C 68 ; WX 700 ; N D ; B 86 0 759 614 ; +C 69 ; WX 620 ; N E ; B 76 -8 668 586 ; +C 70 ; WX 580 ; N F ; B 60 -114 733 620 ; +C 71 ; WX 620 ; N G ; B 118 -236 670 591 ; +C 72 ; WX 680 ; N H ; B 33 -11 908 678 ; +C 73 ; WX 380 ; N I ; B 81 0 481 573 ; +C 74 ; WX 400 ; N J ; B 1 -122 491 572 ; +C 75 ; WX 660 ; N K ; B 88 -147 851 577 ; +C 76 ; WX 580 ; N L ; B 33 -6 631 577 ; +C 77 ; WX 840 ; N M ; B 58 -13 1009 670 ; +C 78 ; WX 700 ; N N ; B 40 -163 915 677 ; +C 79 ; WX 600 ; N O ; B 104 -13 652 591 ; +C 80 ; WX 540 ; N P ; B 37 1 645 601 ; +C 81 ; WX 600 ; N Q ; B 104 -191 851 591 ; +C 82 ; WX 600 ; N R ; B 38 -156 826 611 ; +C 83 ; WX 460 ; N S ; B 0 -71 517 586 ; +C 84 ; WX 500 ; N T ; B 58 0 718 649 ; +C 85 ; WX 740 ; N U ; B 116 -14 778 578 ; +C 86 ; WX 640 ; N V ; B 104 -12 809 685 ; +C 87 ; WX 880 ; N W ; B 104 -17 1035 677 ; +C 88 ; WX 560 ; N X ; B 0 -13 671 580 ; +C 89 ; WX 560 ; N Y ; B 31 -152 763 608 ; +C 90 ; WX 620 ; N Z ; B 62 -18 676 597 ; +C 91 ; WX 240 ; N bracketleft ; B 47 -165 404 665 ; +C 92 ; WX 480 ; N backslash ; B 185 0 484 579 ; +C 93 ; WX 320 ; N bracketright ; B 23 -165 381 665 ; +C 94 ; WX 520 ; N asciicircum ; B 212 447 472 681 ; +C 95 ; WX 500 ; N underscore ; B 0 -145 500 -95 ; +C 96 ; WX 240 ; N quoteleft ; B 229 435 384 676 ; +C 97 ; WX 420 ; N a ; B 87 -13 492 411 ; +C 98 ; WX 420 ; N b ; B 87 -17 466 677 ; +C 99 ; WX 340 ; N c ; B 87 -13 383 411 ; +C 100 ; WX 440 ; N d ; B 87 -13 629 677 ; +C 101 ; WX 340 ; N e ; B 87 -13 380 411 ; +C 102 ; WX 320 ; N f ; B -99 -246 541 680 ; +C 103 ; WX 400 ; N g ; B -78 -247 481 410 ; +C 104 ; WX 440 ; N h ; B 75 -15 506 678 ; +C 105 ; WX 240 ; N i ; B 81 -13 311 616 ; +C 106 ; WX 220 ; N j ; B -133 -247 303 616 ; +C 107 ; WX 440 ; N k ; B 87 -153 655 675 ; +C 108 ; WX 240 ; N l ; B 87 -13 434 678 ; +C 109 ; WX 620 ; N m ; B 81 -10 693 411 ; +C 110 ; WX 460 ; N n ; B 81 -16 520 411 ; +C 111 ; WX 400 ; N o ; B 87 -13 449 411 ; +C 112 ; WX 440 ; N p ; B -8 -248 482 411 ; +C 113 ; WX 400 ; N q ; B 87 -249 485 479 ; +C 114 ; WX 300 ; N r ; B 81 -10 409 411 ; +C 115 ; WX 320 ; N s ; B 41 -13 377 411 ; +C 116 ; WX 320 ; N t ; B 96 -13 392 503 ; +C 117 ; WX 460 ; N u ; B 82 -13 518 415 ; +C 118 ; WX 440 ; N v ; B 87 -13 510 437 ; +C 119 ; WX 680 ; N w ; B 87 -13 757 444 ; +C 120 ; WX 420 ; N x ; B 70 -160 583 411 ; +C 121 ; WX 400 ; N y ; B 11 -248 473 415 ; +C 122 ; WX 440 ; N z ; B 46 -13 475 426 ; +C 123 ; WX 240 ; N braceleft ; B 105 -165 405 661 ; +C 124 ; WX 520 ; N bar ; B 314 0 363 722 ; +C 125 ; WX 240 ; N braceright ; B 10 -166 308 661 ; +C 126 ; WX 520 ; N asciitilde ; B 86 165 526 278 ; +C 161 ; WX 280 ; N exclamdown ; B 57 -186 295 409 ; +C 162 ; WX 440 ; N cent ; B 127 -76 453 651 ; +C 163 ; WX 440 ; N sterling ; B 4 -53 436 578 ; +C 164 ; WX 60 ; N fraction ; B -115 -5 280 585 ; +C 165 ; WX 440 ; N yen ; B -11 -152 623 608 ; +C 166 ; WX 440 ; N florin ; B -49 -246 587 682 ; +C 167 ; WX 420 ; N section ; B 63 -164 464 576 ; +C 168 ; WX 440 ; N currency ; B 50 72 480 500 ; +C 169 ; WX 160 ; N quotesingle ; B 170 405 259 591 ; +C 170 ; WX 340 ; N quotedblleft ; B 229 435 500 676 ; +C 171 ; WX 340 ; N guillemotleft ; B 98 -9 404 413 ; +C 172 ; WX 240 ; N guilsinglleft ; B 98 -9 285 413 ; +C 173 ; WX 260 ; N guilsinglright ; B 86 -3 284 423 ; +C 174 ; WX 520 ; N fi ; B -104 -247 606 681 ; +C 175 ; WX 520 ; N fl ; B -105 -246 710 688 ; +C 177 ; WX 500 ; N endash ; B 31 173 578 237 ; +C 178 ; WX 460 ; N dagger ; B 98 -138 529 606 ; +C 179 ; WX 480 ; N daggerdbl ; B 98 -137 529 607 ; +C 180 ; WX 220 ; N periodcentered ; B 108 156 229 277 ; +C 182 ; WX 500 ; N paragraph ; B 29 -247 650 586 ; +C 183 ; WX 600 ; N bullet ; B 228 217 568 557 ; +C 184 ; WX 180 ; N quotesinglbase ; B 40 -109 170 111 ; +C 185 ; WX 280 ; N quotedblbase ; B 41 -109 286 111 ; +C 186 ; WX 360 ; N quotedblright ; B 228 454 473 673 ; +C 187 ; WX 380 ; N guillemotright ; B 87 -3 407 423 ; +C 188 ; WX 1000 ; N ellipsis ; B 106 -9 893 128 ; +C 189 ; WX 960 ; N perthousand ; B 162 -7 975 584 ; +C 191 ; WX 400 ; N questiondown ; B 57 -181 425 409 ; +C 193 ; WX 220 ; N grave ; B 173 460 281 655 ; +C 194 ; WX 300 ; N acute ; B 205 460 388 655 ; +C 195 ; WX 340 ; N circumflex ; B 183 460 397 656 ; +C 196 ; WX 440 ; N tilde ; B 183 494 513 604 ; +C 197 ; WX 440 ; N macron ; B 183 520 515 568 ; +C 198 ; WX 440 ; N breve ; B 183 488 516 623 ; +C 199 ; WX 220 ; N dotaccent ; B 206 489 309 612 ; +C 200 ; WX 360 ; N dieresis ; B 183 489 419 612 ; +C 202 ; WX 300 ; N ring ; B 228 461 409 640 ; +C 203 ; WX 300 ; N cedilla ; B 41 -212 216 0 ; +C 205 ; WX 400 ; N hungarumlaut ; B 183 460 463 655 ; +C 206 ; WX 280 ; N ogonek ; B 58 -153 216 0 ; +C 207 ; WX 340 ; N caron ; B 234 458 447 655 ; +C 208 ; WX 1000 ; N emdash ; B 31 172 1078 236 ; +C 225 ; WX 740 ; N AE ; B 32 -4 798 571 ; +C 227 ; WX 260 ; N ordfeminine ; B 81 253 324 576 ; +C 232 ; WX 580 ; N Lslash ; B 33 -6 631 577 ; +C 233 ; WX 660 ; N Oslash ; B 110 -132 707 690 ; +C 234 ; WX 820 ; N OE ; B 104 -13 870 588 ; +C 235 ; WX 260 ; N ordmasculine ; B 98 253 323 578 ; +C 241 ; WX 540 ; N ae ; B 87 -13 588 440 ; +C 245 ; WX 240 ; N dotlessi ; B 81 -13 311 411 ; +C 248 ; WX 300 ; N lslash ; B 87 -13 491 678 ; +C 249 ; WX 440 ; N oslash ; B 92 -148 467 547 ; +C 250 ; WX 560 ; N oe ; B 88 -13 602 411 ; +C 251 ; WX 420 ; N germandbls ; B -127 -248 506 680 ; +C -1 ; WX 740 ; N Udieresis ; B 116 -14 778 773 ; +C -1 ; WX 740 ; N Uacute ; B 116 -14 778 820 ; +C -1 ; WX 460 ; N Scedilla ; B 0 -266 517 586 ; +C -1 ; WX 500 ; N Tcaron ; B 58 0 718 821 ; +C -1 ; WX 460 ; N Scaron ; B 0 -71 607 821 ; +C -1 ; WX 600 ; N Rcaron ; B 38 -156 826 821 ; +C -1 ; WX 600 ; N Racute ; B 38 -156 826 820 ; +C -1 ; WX 460 ; N Sacute ; B 0 -71 517 820 ; +C -1 ; WX 600 ; N Otilde ; B 104 -13 678 765 ; +C -1 ; WX 460 ; N ucircumflex ; B 82 -13 518 656 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 104 -13 652 820 ; +C -1 ; WX 740 ; N Uhungarumlaut ; B 116 -14 816 820 ; +C -1 ; WX 560 ; N Yacute ; B 31 -152 763 820 ; +C -1 ; WX 700 ; N Eth ; B 86 0 759 615 ; +C -1 ; WX 700 ; N Dcroat ; B 86 0 759 615 ; +C -1 ; WX 620 ; N Zacute ; B 62 -18 676 820 ; +C -1 ; WX 740 ; N Uring ; B 116 -14 778 802 ; +C -1 ; WX 400 ; N gbreve ; B -78 -247 496 623 ; +C -1 ; WX 340 ; N eogonek ; B 87 -153 380 411 ; +C -1 ; WX 340 ; N edotaccent ; B 87 -13 380 612 ; +C -1 ; WX 340 ; N ecaron ; B 87 -13 487 655 ; +C -1 ; WX 740 ; N Ugrave ; B 116 -14 778 820 ; +C -1 ; WX 540 ; N Thorn ; B 37 1 619 585 ; +C -1 ; WX 340 ; N eacute ; B 87 -13 408 655 ; +C -1 ; WX 340 ; N edieresis ; B 87 -13 409 612 ; +C -1 ; WX 497 ; N dcaron ; B 87 -13 697 678 ; +C -1 ; WX 340 ; N ccedilla ; B 61 -212 383 411 ; +C -1 ; WX 340 ; N ccaron ; B 87 -13 467 655 ; +C -1 ; WX 340 ; N cacute ; B 87 -13 441 655 ; +C -1 ; WX 420 ; N aogonek ; B 87 -153 492 411 ; +C -1 ; WX 420 ; N aring ; B 87 -13 492 640 ; +C -1 ; WX 420 ; N atilde ; B 87 -13 513 604 ; +C -1 ; WX 420 ; N abreve ; B 87 -13 526 623 ; +C -1 ; WX 340 ; N egrave ; B 87 -13 380 655 ; +C -1 ; WX 420 ; N agrave ; B 87 -13 492 655 ; +C -1 ; WX 420 ; N aacute ; B 87 -13 492 655 ; +C -1 ; WX 420 ; N adieresis ; B 87 -13 492 612 ; +C -1 ; WX 740 ; N Uogonek ; B 116 -153 778 578 ; +C -1 ; WX 460 ; N ugrave ; B 82 -13 518 655 ; +C -1 ; WX 460 ; N uacute ; B 82 -13 518 655 ; +C -1 ; WX 460 ; N udieresis ; B 82 -13 518 612 ; +C -1 ; WX 320 ; N tcaron ; B 96 -13 480 678 ; +C -1 ; WX 320 ; N scommaaccent ; B 41 -270 377 411 ; +C -1 ; WX 620 ; N Zcaron ; B 62 -18 676 821 ; +C -1 ; WX 340 ; N ecircumflex ; B 87 -13 397 656 ; +C -1 ; WX 740 ; N Ucircumflex ; B 116 -14 778 821 ; +C -1 ; WX 420 ; N acircumflex ; B 87 -13 492 656 ; +C -1 ; WX 620 ; N Zdotaccent ; B 62 -18 676 773 ; +C -1 ; WX 320 ; N scaron ; B 41 -13 477 655 ; +C -1 ; WX 620 ; N Amacron ; B 23 -13 760 729 ; +C -1 ; WX 320 ; N sacute ; B 41 -13 440 655 ; +C -1 ; WX 500 ; N Tcommaaccent ; B 58 -270 718 649 ; +C -1 ; WX 560 ; N Ydieresis ; B 31 -152 763 773 ; +C -1 ; WX 440 ; N thorn ; B -8 -248 482 680 ; +C -1 ; WX 620 ; N Emacron ; B 76 -8 668 729 ; +C -1 ; WX 600 ; N Ograve ; B 104 -13 652 820 ; +C -1 ; WX 600 ; N Oacute ; B 104 -13 652 820 ; +C -1 ; WX 600 ; N Odieresis ; B 104 -13 652 773 ; +C -1 ; WX 700 ; N Ntilde ; B 40 -163 915 765 ; +C -1 ; WX 700 ; N Ncaron ; B 40 -163 915 821 ; +C -1 ; WX 700 ; N Nacute ; B 40 -163 915 820 ; +C -1 ; WX 580 ; N Lcaron ; B 33 -6 700 591 ; +C -1 ; WX 580 ; N Lacute ; B 33 -6 631 820 ; +C -1 ; WX 380 ; N Idotaccent ; B 81 0 481 773 ; +C -1 ; WX 300 ; N racute ; B 81 -10 428 655 ; +C -1 ; WX 380 ; N Icircumflex ; B 81 0 487 821 ; +C -1 ; WX 400 ; N ohungarumlaut ; B 87 -13 543 655 ; +C -1 ; WX 400 ; N otilde ; B 87 -13 493 604 ; +C -1 ; WX 440 ; N Euro ; B -28 -73 528 591 ; +C -1 ; WX 400 ; N ocircumflex ; B 87 -13 449 656 ; +C -1 ; WX 264 ; N onesuperior ; B 86 217 314 568 ; +C -1 ; WX 264 ; N twosuperior ; B 80 206 354 562 ; +C -1 ; WX 264 ; N threesuperior ; B 69 212 343 561 ; +C -1 ; WX 380 ; N Igrave ; B 81 0 481 820 ; +C -1 ; WX 380 ; N Iacute ; B 81 0 481 820 ; +C -1 ; WX 380 ; N Imacron ; B 81 0 548 729 ; +C -1 ; WX 380 ; N Iogonek ; B 81 -153 481 573 ; +C -1 ; WX 380 ; N Idieresis ; B 81 0 481 773 ; +C -1 ; WX 620 ; N Gbreve ; B 118 -236 670 784 ; +C -1 ; WX 740 ; N Umacron ; B 116 -14 788 729 ; +C -1 ; WX 660 ; N Kcommaaccent ; B 88 -270 851 577 ; +C -1 ; WX 400 ; N ograve ; B 87 -13 449 655 ; +C -1 ; WX 460 ; N Scommaaccent ; B 0 -290 517 586 ; +C -1 ; WX 620 ; N Eogonek ; B 76 -153 668 586 ; +C -1 ; WX 400 ; N oacute ; B 87 -13 449 655 ; +C -1 ; WX 620 ; N Edotaccent ; B 76 -8 668 773 ; +C -1 ; WX 240 ; N iogonek ; B 65 -153 311 616 ; +C -1 ; WX 400 ; N gcommaaccent ; B -78 -247 481 668 ; +C -1 ; WX 400 ; N odieresis ; B 87 -13 449 612 ; +C -1 ; WX 460 ; N ntilde ; B 81 -16 523 604 ; +C -1 ; WX 460 ; N ncaron ; B 81 -16 520 655 ; +C -1 ; WX 620 ; N Ecaron ; B 76 -8 668 821 ; +C -1 ; WX 620 ; N Ecircumflex ; B 76 -8 668 821 ; +C -1 ; WX 320 ; N scedilla ; B -9 -213 377 411 ; +C -1 ; WX 300 ; N rcaron ; B 81 -10 467 655 ; +C -1 ; WX 620 ; N Egrave ; B 76 -8 668 820 ; +C -1 ; WX 620 ; N Eacute ; B 76 -8 668 820 ; +C -1 ; WX 620 ; N Gcommaaccent ; B 120 -270 672 590 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 38 -270 826 611 ; +C -1 ; WX 620 ; N Edieresis ; B 76 -8 668 773 ; +C -1 ; WX 460 ; N nacute ; B 81 -16 520 655 ; +C -1 ; WX 460 ; N uogonek ; B 82 -153 518 415 ; +C -1 ; WX 460 ; N umacron ; B 82 -13 525 568 ; +C -1 ; WX 700 ; N Dcaron ; B 86 0 759 821 ; +C -1 ; WX 293 ; N lcaron ; B 87 -13 493 678 ; +C -1 ; WX 520 ; N Ccaron ; B 88 -73 680 821 ; +C -1 ; WX 520 ; N Cacute ; B 88 -73 635 820 ; +C -1 ; WX 520 ; N Ccedilla ; B 88 -266 635 591 ; +C -1 ; WX 400 ; N degree ; B 190 330 430 576 ; +C -1 ; WX 620 ; N Aogonek ; B 23 -153 687 594 ; +C -1 ; WX 520 ; N minus ; B 55 192 559 246 ; +C -1 ; WX 520 ; N multiply ; B 103 14 513 424 ; +C -1 ; WX 520 ; N divide ; B 103 -4 513 443 ; +C -1 ; WX 620 ; N Aring ; B 23 -13 687 802 ; +C -1 ; WX 1000 ; N trademark ; B 165 210 1050 580 ; +C -1 ; WX 300 ; N rcommaaccent ; B 38 -270 409 411 ; +C -1 ; WX 240 ; N lacute ; B 87 -13 454 860 ; +C -1 ; WX 400 ; N omacron ; B 87 -13 495 568 ; +C -1 ; WX 620 ; N Atilde ; B 23 -13 753 765 ; +C -1 ; WX 240 ; N icircumflex ; B 81 -13 347 656 ; +C -1 ; WX 240 ; N igrave ; B 81 -13 311 655 ; +C -1 ; WX 460 ; N ncommaaccent ; B 81 -270 520 411 ; +C -1 ; WX 240 ; N lcommaaccent ; B 8 -270 434 678 ; +C -1 ; WX 520 ; N plusminus ; B 103 0 513 508 ; +C -1 ; WX 660 ; N onehalf ; B 96 -10 659 585 ; +C -1 ; WX 660 ; N onequarter ; B 96 -15 653 585 ; +C -1 ; WX 660 ; N threequarters ; B 79 -15 663 585 ; +C -1 ; WX 240 ; N iacute ; B 81 -13 358 655 ; +C -1 ; WX 620 ; N Abreve ; B 23 -13 740 784 ; +C -1 ; WX 440 ; N kcommaaccent ; B 87 -270 655 675 ; +C -1 ; WX 600 ; N Omacron ; B 104 -13 652 729 ; +C -1 ; WX 240 ; N imacron ; B 81 -13 415 568 ; +C -1 ; WX 340 ; N emacron ; B 87 -13 465 568 ; +C -1 ; WX 420 ; N amacron ; B 87 -13 505 568 ; +C -1 ; WX 320 ; N tcommaaccent ; B 48 -270 392 503 ; +C -1 ; WX 400 ; N ydieresis ; B 11 -248 473 612 ; +C -1 ; WX 440 ; N zdotaccent ; B 46 -13 475 612 ; +C -1 ; WX 440 ; N zcaron ; B 46 -13 527 655 ; +C -1 ; WX 440 ; N zacute ; B 46 -13 498 655 ; +C -1 ; WX 400 ; N yacute ; B 11 -248 478 655 ; +C -1 ; WX 460 ; N uhungarumlaut ; B 82 -13 533 655 ; +C -1 ; WX 400 ; N eth ; B 87 -13 557 689 ; +C -1 ; WX 460 ; N uring ; B 82 -13 518 640 ; +C -1 ; WX 600 ; N Ocircumflex ; B 104 -13 652 821 ; +C -1 ; WX 300 ; N commaaccent ; B 38 -270 165 -60 ; +C -1 ; WX 740 ; N copyright ; B 136 -26 830 668 ; +C -1 ; WX 740 ; N registered ; B 135 -26 828 668 ; +C -1 ; WX 620 ; N Acircumflex ; B 23 -13 687 821 ; +C -1 ; WX 240 ; N idieresis ; B 81 -13 359 612 ; +C -1 ; WX 494 ; N lozenge ; B 18 0 466 740 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 520 ; N notequal ; B 108 5 518 433 ; +C -1 ; WX 549 ; N radical ; B 10 -35 515 913 ; +C -1 ; WX 620 ; N Agrave ; B 23 -13 687 820 ; +C -1 ; WX 620 ; N Aacute ; B 23 -13 687 820 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 639 ; +C -1 ; WX 549 ; N greaterequal ; B 29 0 526 639 ; +C -1 ; WX 520 ; N logicalnot ; B 55 25 559 314 ; +C -1 ; WX 713 ; N summation ; B 14 -123 695 752 ; +C -1 ; WX 494 ; N partialdiff ; B 26 -10 462 753 ; +C -1 ; WX 700 ; N Ncommaaccent ; B 40 -270 915 677 ; +C -1 ; WX 440 ; N dcroat ; B 87 -13 629 677 ; +C -1 ; WX 520 ; N brokenbar ; B 314 0 363 722 ; +C -1 ; WX 580 ; N Lcommaaccent ; B 33 -270 631 577 ; +C -1 ; WX 620 ; N Adieresis ; B 23 -13 699 773 ; +C -1 ; WX 460 ; N mu ; B 15 -218 518 415 ; +C -1 ; WX 220 ; N .notdef ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 998 +KPX A C 13 +KPX A Ccedilla 12 +KPX A G -12 +KPX A O -10 +KPX A Odieresis -10 +KPX A Q -11 +KPX A T -14 +KPX A U -22 +KPX A Uacute -24 +KPX A Ucircumflex -24 +KPX A Udieresis -24 +KPX A Ugrave -24 +KPX A V -19 +KPX A W -19 +KPX A Y -1 +KPX A a 11 +KPX A b 7 +KPX A c 10 +KPX A ccedilla 10 +KPX A comma 2 +KPX A d 11 +KPX A e 9 +KPX A g 9 +KPX A guillemotleft -10 +KPX A guilsinglleft -9 +KPX A hyphen -10 +KPX A o 8 +KPX A period 6 +KPX A q 11 +KPX A quotedblright -47 +KPX A quoteright -58 +KPX A t -12 +KPX A u 1 +KPX A v -13 +KPX A w -18 +KPX A y 5 +KPX Aacute C 13 +KPX Aacute G -12 +KPX Aacute O -10 +KPX Aacute Q -11 +KPX Aacute T -14 +KPX Aacute U -22 +KPX Aacute V -27 +KPX Aacute W -26 +KPX Aacute Y -3 +KPX Aacute a 11 +KPX Aacute b 7 +KPX Aacute c 10 +KPX Aacute comma 2 +KPX Aacute d 11 +KPX Aacute e 9 +KPX Aacute g 9 +KPX Aacute guillemotleft -10 +KPX Aacute guilsinglleft -9 +KPX Aacute hyphen -10 +KPX Aacute o 8 +KPX Aacute period 6 +KPX Aacute q 11 +KPX Aacute quoteright -58 +KPX Aacute t -12 +KPX Aacute u 1 +KPX Aacute v -13 +KPX Aacute w -18 +KPX Aacute y 5 +KPX Acircumflex C 13 +KPX Acircumflex G -12 +KPX Acircumflex O -10 +KPX Acircumflex Q -11 +KPX Acircumflex T -14 +KPX Acircumflex U -22 +KPX Acircumflex V -25 +KPX Acircumflex W -24 +KPX Acircumflex Y -3 +KPX Acircumflex comma 2 +KPX Acircumflex period 6 +KPX Adieresis C 13 +KPX Adieresis G -12 +KPX Adieresis O -11 +KPX Adieresis Q -11 +KPX Adieresis T -14 +KPX Adieresis U -23 +KPX Adieresis V -26 +KPX Adieresis W -26 +KPX Adieresis Y -3 +KPX Adieresis a 11 +KPX Adieresis b 7 +KPX Adieresis c 10 +KPX Adieresis comma 2 +KPX Adieresis d 11 +KPX Adieresis g 9 +KPX Adieresis guillemotleft -10 +KPX Adieresis guilsinglleft -9 +KPX Adieresis hyphen -10 +KPX Adieresis o 8 +KPX Adieresis period 6 +KPX Adieresis q 11 +KPX Adieresis quotedblright -53 +KPX Adieresis quoteright -58 +KPX Adieresis t -12 +KPX Adieresis u 1 +KPX Adieresis v -13 +KPX Adieresis w -18 +KPX Adieresis y 5 +KPX Agrave C 13 +KPX Agrave G -12 +KPX Agrave O -10 +KPX Agrave Q -11 +KPX Agrave T -14 +KPX Agrave U -22 +KPX Agrave V -27 +KPX Agrave W -26 +KPX Agrave Y -3 +KPX Agrave comma 2 +KPX Agrave period 6 +KPX Aring C 13 +KPX Aring G -12 +KPX Aring O -10 +KPX Aring Q -11 +KPX Aring T -14 +KPX Aring U -22 +KPX Aring V -25 +KPX Aring W -25 +KPX Aring Y -3 +KPX Aring a 11 +KPX Aring b 7 +KPX Aring c 10 +KPX Aring comma 2 +KPX Aring d 11 +KPX Aring e 9 +KPX Aring g 9 +KPX Aring guillemotleft -10 +KPX Aring guilsinglleft -9 +KPX Aring hyphen -10 +KPX Aring o 8 +KPX Aring period 6 +KPX Aring q 11 +KPX Aring quotedblright -52 +KPX Aring quoteright -58 +KPX Aring t -12 +KPX Aring u 1 +KPX Aring v -13 +KPX Aring w -18 +KPX Aring y 5 +KPX Atilde C 13 +KPX Atilde G -12 +KPX Atilde O -10 +KPX Atilde Q -10 +KPX Atilde T -13 +KPX Atilde U -22 +KPX Atilde V -26 +KPX Atilde W -26 +KPX Atilde Y -2 +KPX Atilde comma 3 +KPX Atilde period 7 +KPX B A -26 +KPX B AE -31 +KPX B Aacute -26 +KPX B Acircumflex -26 +KPX B Adieresis -26 +KPX B Aring -26 +KPX B Atilde -26 +KPX B O 0 +KPX B OE -3 +KPX B Oacute -2 +KPX B Ocircumflex -2 +KPX B Odieresis -2 +KPX B Ograve -2 +KPX B Oslash -18 +KPX B V -8 +KPX B W -8 +KPX B Y 8 +KPX C A 12 +KPX C AE 10 +KPX C Aacute 12 +KPX C Adieresis 12 +KPX C Aring 12 +KPX C H 2 +KPX C K -6 +KPX C O -25 +KPX C Oacute -25 +KPX C Odieresis -25 +KPX Ccedilla A 9 +KPX D A -29 +KPX D Aacute -32 +KPX D Acircumflex -32 +KPX D Adieresis -32 +KPX D Agrave -32 +KPX D Aring -32 +KPX D Atilde -32 +KPX D J -31 +KPX D T 26 +KPX D V 3 +KPX D W 3 +KPX D X -23 +KPX D Y 19 +KPX F A -55 +KPX F Aacute -54 +KPX F Acircumflex -54 +KPX F Adieresis -54 +KPX F Agrave -54 +KPX F Aring -54 +KPX F Atilde -54 +KPX F J -55 +KPX F O -25 +KPX F Odieresis -25 +KPX F a -41 +KPX F aacute -41 +KPX F adieresis -39 +KPX F ae -40 +KPX F aring -41 +KPX F comma -82 +KPX F e -37 +KPX F eacute -37 +KPX F hyphen -24 +KPX F i -11 +KPX F j -9 +KPX F o -41 +KPX F oacute -41 +KPX F odieresis -19 +KPX F oe -40 +KPX F oslash -47 +KPX F period -70 +KPX F r -24 +KPX F u -21 +KPX G A -33 +KPX G AE -36 +KPX G Aacute -33 +KPX G Acircumflex -33 +KPX G Adieresis -33 +KPX G Agrave -33 +KPX G Aring -33 +KPX G Atilde -33 +KPX G T 2 +KPX G V -18 +KPX G W -19 +KPX G Y 3 +KPX J A -28 +KPX J AE -35 +KPX J Adieresis -28 +KPX J Aring -28 +KPX K C 48 +KPX K G 16 +KPX K O -6 +KPX K OE -10 +KPX K Oacute -6 +KPX K Odieresis -6 +KPX K S 102 +KPX K T 42 +KPX K a -38 +KPX K adieresis -18 +KPX K ae -38 +KPX K aring -32 +KPX K e -36 +KPX K hyphen -40 +KPX K o -41 +KPX K oacute -41 +KPX K odieresis 2 +KPX K u -38 +KPX K udieresis -13 +KPX K y -16 +KPX L A 6 +KPX L AE 4 +KPX L Aacute 6 +KPX L Adieresis 6 +KPX L Aring 6 +KPX L C 5 +KPX L Ccedilla 6 +KPX L G -7 +KPX L O 0 +KPX L Oacute 0 +KPX L Ocircumflex 0 +KPX L Odieresis 0 +KPX L Ograve 0 +KPX L Otilde 0 +KPX L S 18 +KPX L T -17 +KPX L U -28 +KPX L Udieresis -28 +KPX L V -24 +KPX L W -25 +KPX L Y -4 +KPX L hyphen 30 +KPX L quotedblright -93 +KPX L quoteright -94 +KPX L u -7 +KPX L udieresis -7 +KPX L y -4 +KPX N A -24 +KPX N AE -30 +KPX N Aacute -24 +KPX N Adieresis -24 +KPX N Aring -24 +KPX N C 55 +KPX N Ccedilla 53 +KPX N G 23 +KPX N O -11 +KPX N Oacute -13 +KPX N Odieresis -12 +KPX N a -26 +KPX N aacute -26 +KPX N adieresis -26 +KPX N ae -26 +KPX N aring -26 +KPX N comma 111 +KPX N e -24 +KPX N eacute -24 +KPX N o -29 +KPX N oacute -29 +KPX N odieresis -29 +KPX N oslash 80 +KPX N period -20 +KPX N u -27 +KPX N udieresis -27 +KPX O A -28 +KPX O AE -41 +KPX O Aacute -28 +KPX O Adieresis -28 +KPX O Aring -28 +KPX O T 23 +KPX O V 2 +KPX O W 2 +KPX O X -21 +KPX O Y 16 +KPX Oacute A -28 +KPX Oacute T 23 +KPX Oacute V 0 +KPX Oacute W 0 +KPX Oacute Y 16 +KPX Ocircumflex T 23 +KPX Ocircumflex V 0 +KPX Ocircumflex Y 16 +KPX Odieresis A -28 +KPX Odieresis T 23 +KPX Odieresis V 0 +KPX Odieresis W 0 +KPX Odieresis X -21 +KPX Odieresis Y 16 +KPX Ograve T 23 +KPX Ograve V 0 +KPX Ograve Y 16 +KPX Oslash A -42 +KPX Otilde T 23 +KPX Otilde V 0 +KPX Otilde Y 17 +KPX P A -28 +KPX P AE -32 +KPX P Aacute -28 +KPX P Adieresis -28 +KPX P Aring -28 +KPX P J -13 +KPX P a -36 +KPX P aacute -36 +KPX P adieresis -36 +KPX P ae -37 +KPX P aring -36 +KPX P comma -63 +KPX P e -32 +KPX P eacute -32 +KPX P hyphen -36 +KPX P o -40 +KPX P oacute -40 +KPX P odieresis -40 +KPX P oe -39 +KPX P oslash -45 +KPX P period -59 +KPX R C 51 +KPX R Ccedilla 52 +KPX R G 22 +KPX R O -27 +KPX R OE -31 +KPX R Oacute -29 +KPX R Odieresis -29 +KPX R T 2 +KPX R U -30 +KPX R Udieresis -30 +KPX R V -20 +KPX R W -18 +KPX R Y 115 +KPX R a -44 +KPX R aacute -44 +KPX R adieresis -44 +KPX R ae -44 +KPX R aring -44 +KPX R e -42 +KPX R eacute -42 +KPX R hyphen -44 +KPX R o -47 +KPX R oacute -47 +KPX R odieresis -47 +KPX R oe -46 +KPX R u -44 +KPX R uacute -44 +KPX R udieresis -44 +KPX R y -3 +KPX S A -22 +KPX S AE -27 +KPX S Aacute -22 +KPX S Adieresis -22 +KPX S Aring -22 +KPX S T 0 +KPX S V -19 +KPX S W -19 +KPX S Y -13 +KPX S t -41 +KPX T A 7 +KPX T AE 4 +KPX T Aacute 7 +KPX T Acircumflex 7 +KPX T Adieresis 7 +KPX T Agrave 7 +KPX T Aring 7 +KPX T Atilde 7 +KPX T C -20 +KPX T G -38 +KPX T J -7 +KPX T O -16 +KPX T OE -23 +KPX T Oacute -16 +KPX T Ocircumflex -16 +KPX T Odieresis -16 +KPX T Ograve -16 +KPX T Oslash -31 +KPX T Otilde -16 +KPX T S 17 +KPX T V 24 +KPX T W 24 +KPX T Y 25 +KPX T a -22 +KPX T ae -22 +KPX T c -23 +KPX T colon -26 +KPX T comma -33 +KPX T e -23 +KPX T g -23 +KPX T guillemotleft -43 +KPX T guilsinglleft -42 +KPX T hyphen -36 +KPX T i 21 +KPX T j 22 +KPX T o -23 +KPX T oslash -27 +KPX T period -27 +KPX T r -29 +KPX T s 1 +KPX T semicolon -34 +KPX T u -33 +KPX T v -47 +KPX T w -52 +KPX T y -28 +KPX U A 26 +KPX U AE 23 +KPX U Aacute 26 +KPX U Acircumflex 26 +KPX U Adieresis 26 +KPX U Aring 26 +KPX U Atilde 26 +KPX U comma -13 +KPX U m -13 +KPX U n -12 +KPX U p -23 +KPX U period -10 +KPX U r -12 +KPX Uacute A 26 +KPX Uacute comma -13 +KPX Uacute m -13 +KPX Uacute n -12 +KPX Uacute p -23 +KPX Uacute period -10 +KPX Uacute r -12 +KPX Ucircumflex A 26 +KPX Udieresis A 26 +KPX Udieresis b -11 +KPX Udieresis comma -13 +KPX Udieresis m -13 +KPX Udieresis n -12 +KPX Udieresis p -23 +KPX Udieresis period -10 +KPX Udieresis r -12 +KPX Ugrave A 26 +KPX V A -31 +KPX V AE -68 +KPX V Aacute -31 +KPX V Acircumflex -31 +KPX V Adieresis -31 +KPX V Agrave -31 +KPX V Aring -31 +KPX V Atilde -31 +KPX V C -28 +KPX V G -33 +KPX V O -14 +KPX V Oacute -14 +KPX V Ocircumflex -14 +KPX V Odieresis -14 +KPX V Ograve -14 +KPX V Oslash -30 +KPX V Otilde -14 +KPX V S -32 +KPX V T 38 +KPX V a -57 +KPX V ae -58 +KPX V colon -43 +KPX V comma -93 +KPX V e -53 +KPX V g -59 +KPX V guillemotleft -55 +KPX V guilsinglleft -55 +KPX V hyphen -45 +KPX V i 1 +KPX V o -63 +KPX V oslash -68 +KPX V period -90 +KPX V r -12 +KPX V semicolon -38 +KPX V u -17 +KPX V y -12 +KPX W A -26 +KPX W AE -46 +KPX W Aacute -26 +KPX W Acircumflex -26 +KPX W Adieresis -26 +KPX W Agrave -26 +KPX W Aring -26 +KPX W Atilde -26 +KPX W C -9 +KPX W G -15 +KPX W O 0 +KPX W Oacute -4 +KPX W Ocircumflex -2 +KPX W Odieresis -3 +KPX W Ograve -4 +KPX W Oslash -20 +KPX W Otilde -3 +KPX W S -12 +KPX W T 44 +KPX W a -33 +KPX W ae -33 +KPX W colon -29 +KPX W comma -57 +KPX W e -31 +KPX W g -35 +KPX W guillemotleft -27 +KPX W guilsinglleft -27 +KPX W hyphen -16 +KPX W i 1 +KPX W o -36 +KPX W oslash -41 +KPX W period -53 +KPX W r 3 +KPX W semicolon -24 +KPX W u 0 +KPX W y 4 +KPX X C 2 +KPX X O -21 +KPX X Odieresis -21 +KPX X Q -21 +KPX X a 1 +KPX X e -1 +KPX X hyphen -51 +KPX X o -2 +KPX X u -9 +KPX X y -5 +KPX Y A -24 +KPX Y AE -60 +KPX Y Aacute -24 +KPX Y Acircumflex -24 +KPX Y Adieresis -24 +KPX Y Agrave -24 +KPX Y Aring -24 +KPX Y Atilde -24 +KPX Y C -28 +KPX Y G -35 +KPX Y O -13 +KPX Y Oacute -12 +KPX Y Ocircumflex -12 +KPX Y Odieresis -12 +KPX Y Ograve -12 +KPX Y Oslash -29 +KPX Y Otilde -12 +KPX Y S -25 +KPX Y T 44 +KPX Y a -53 +KPX Y ae -53 +KPX Y colon -58 +KPX Y comma -68 +KPX Y e -51 +KPX Y g -55 +KPX Y guillemotleft -48 +KPX Y guilsinglleft -47 +KPX Y hyphen -37 +KPX Y i 17 +KPX Y o -56 +KPX Y oslash -61 +KPX Y p -43 +KPX Y period -62 +KPX Y semicolon -55 +KPX Y u -39 +KPX Y v -42 +KPX Z v 4 +KPX Z y 5 +KPX a j -2 +KPX a quoteright -55 +KPX a v -13 +KPX a w -14 +KPX a y 0 +KPX aacute v -13 +KPX aacute w -14 +KPX aacute y 0 +KPX adieresis v -13 +KPX adieresis w -14 +KPX adieresis y 0 +KPX ae v -15 +KPX ae w -17 +KPX ae y -1 +KPX agrave v -13 +KPX agrave w -14 +KPX agrave y 0 +KPX aring v -13 +KPX aring w -14 +KPX aring y 0 +KPX b v -11 +KPX b w -12 +KPX b y -1 +KPX c h -10 +KPX c k -15 +KPX comma one -40 +KPX comma quotedblright -53 +KPX comma quoteright -58 +KPX e quoteright -54 +KPX e t -16 +KPX e v -21 +KPX e w -22 +KPX e x -15 +KPX e y -7 +KPX eacute v -21 +KPX eacute w -23 +KPX eacute y -7 +KPX ecircumflex v -21 +KPX ecircumflex w -23 +KPX ecircumflex y -7 +KPX eight four -12 +KPX eight one -41 +KPX eight seven -38 +KPX f a -20 +KPX f aacute -20 +KPX f adieresis -20 +KPX f ae -21 +KPX f aring -20 +KPX f e -16 +KPX f eacute -16 +KPX f f 16 +KPX f i 21 +KPX f j 21 +KPX f l -9 +KPX f o -26 +KPX f oacute -26 +KPX f odieresis -26 +KPX f oe -24 +KPX f oslash -32 +KPX f quoteright -47 +KPX f s -20 +KPX f t 7 +KPX five four -18 +KPX five one -56 +KPX five seven -30 +KPX four four -11 +KPX four one -57 +KPX four seven -50 +KPX g a -18 +KPX g adieresis -18 +KPX g ae -18 +KPX g aring -18 +KPX g e -16 +KPX g eacute -16 +KPX g l -13 +KPX g oacute -21 +KPX g odieresis -21 +KPX g r -9 +KPX guillemotright A -33 +KPX guillemotright AE -33 +KPX guillemotright Aacute -33 +KPX guillemotright Adieresis -33 +KPX guillemotright Aring -33 +KPX guillemotright T -6 +KPX guillemotright V -19 +KPX guillemotright W -20 +KPX guillemotright Y 4 +KPX guilsinglright A -34 +KPX guilsinglright AE -34 +KPX guilsinglright Aacute -34 +KPX guilsinglright Adieresis -34 +KPX guilsinglright Aring -34 +KPX guilsinglright T -6 +KPX guilsinglright V -20 +KPX guilsinglright W -21 +KPX guilsinglright Y 3 +KPX h quoteright -65 +KPX h y -3 +KPX hyphen A -44 +KPX hyphen AE -10 +KPX hyphen Aacute -44 +KPX hyphen Adieresis -44 +KPX hyphen Aring -44 +KPX hyphen T -1 +KPX hyphen V -5 +KPX hyphen W -7 +KPX hyphen Y 25 +KPX i T -1 +KPX i j -2 +KPX k a -50 +KPX k aacute -50 +KPX k adieresis -50 +KPX k ae -50 +KPX k aring -50 +KPX k comma 111 +KPX k e -49 +KPX k eacute -49 +KPX k g 148 +KPX k hyphen -78 +KPX k o -56 +KPX k oacute -56 +KPX k odieresis -56 +KPX k period -48 +KPX k s -29 +KPX k u -13 +KPX k udieresis -13 +KPX l v -18 +KPX l y -2 +KPX m p -12 +KPX m v -13 +KPX m w -14 +KPX m y 1 +KPX n T -5 +KPX n p -20 +KPX n quoteright -68 +KPX n v -22 +KPX n w -24 +KPX n y -6 +KPX nine four -24 +KPX nine one -46 +KPX nine seven -41 +KPX o T 17 +KPX o quoteright -41 +KPX o t -4 +KPX o v -4 +KPX o w -5 +KPX o x -11 +KPX o y 4 +KPX oacute v -4 +KPX oacute w -5 +KPX oacute y 4 +KPX ocircumflex t -4 +KPX odieresis t -4 +KPX odieresis v -4 +KPX odieresis w -5 +KPX odieresis x -11 +KPX odieresis y 4 +KPX ograve v -4 +KPX ograve w -5 +KPX ograve y 4 +KPX one comma -31 +KPX one eight -20 +KPX one five -12 +KPX one four -46 +KPX one nine 1 +KPX one one -25 +KPX one period -29 +KPX one seven -59 +KPX one six -37 +KPX one three 5 +KPX one two -1 +KPX one zero -30 +KPX p t -8 +KPX p y 1 +KPX period one -25 +KPX period quotedblright -43 +KPX period quoteright -48 +KPX q c -15 +KPX q u -9 +KPX quotedblbase A 15 +KPX quotedblbase AE 34 +KPX quotedblbase T -57 +KPX quotedblbase V -32 +KPX quotedblbase W -35 +KPX quotedblbase Y -11 +KPX quotedblleft A -10 +KPX quotedblleft AE -72 +KPX quotedblleft Aacute -20 +KPX quotedblleft Adieresis -20 +KPX quotedblleft Aring -20 +KPX quotedblleft T 22 +KPX quotedblleft V 30 +KPX quotedblleft W 31 +KPX quotedblleft Y 41 +KPX quotedblright A -20 +KPX quotedblright AE -81 +KPX quotedblright Aacute -32 +KPX quotedblright Adieresis -32 +KPX quotedblright Aring -32 +KPX quotedblright T 12 +KPX quotedblright V 18 +KPX quotedblright W 19 +KPX quotedblright Y 30 +KPX quoteleft A -18 +KPX quoteleft AE -80 +KPX quoteleft Aacute -28 +KPX quoteleft Adieresis -28 +KPX quoteleft Aring -28 +KPX quoteleft T 14 +KPX quoteleft V 22 +KPX quoteleft W 23 +KPX quoteleft Y 33 +KPX quoteright A 0 +KPX quoteright AE -60 +KPX quoteright Aacute 0 +KPX quoteright Adieresis 0 +KPX quoteright Aring 0 +KPX quoteright comma -38 +KPX quoteright d -27 +KPX quoteright o -29 +KPX quoteright period -38 +KPX quoteright r 1 +KPX quoteright s -21 +KPX quoteright t -9 +KPX quoteright v -1 +KPX quoteright w 0 +KPX quoteright y 4 +KPX r a -17 +KPX r aacute -17 +KPX r acircumflex -17 +KPX r adieresis -17 +KPX r ae -18 +KPX r agrave -17 +KPX r aring -17 +KPX r c -14 +KPX r ccedilla -16 +KPX r colon -14 +KPX r comma -73 +KPX r d -21 +KPX r e -13 +KPX r eacute -13 +KPX r ecircumflex -13 +KPX r egrave -13 +KPX r f 22 +KPX r g -19 +KPX r h -10 +KPX r hyphen -55 +KPX r i 20 +KPX r j 19 +KPX r k -15 +KPX r l -7 +KPX r m 18 +KPX r n 19 +KPX r o -21 +KPX r oacute -21 +KPX r ocircumflex -21 +KPX r odieresis -21 +KPX r oe -20 +KPX r ograve -21 +KPX r oslash -27 +KPX r p 15 +KPX r period -69 +KPX r q -19 +KPX r quoteright -31 +KPX r r 21 +KPX r s -19 +KPX r semicolon -9 +KPX r t 13 +KPX r u 18 +KPX r v 5 +KPX r w 3 +KPX r x 9 +KPX r y 22 +KPX r z -23 +KPX s quoteright -61 +KPX s t -22 +KPX seven colon -73 +KPX seven comma -78 +KPX seven eight -44 +KPX seven five -54 +KPX seven four -62 +KPX seven one -44 +KPX seven period -75 +KPX seven seven -27 +KPX seven six -40 +KPX seven three -53 +KPX seven two -36 +KPX six four -2 +KPX six one -47 +KPX six seven -36 +KPX t S 22 +KPX t a -5 +KPX t aacute -5 +KPX t adieresis -5 +KPX t ae -4 +KPX t aring -5 +KPX t colon -22 +KPX t e -3 +KPX t eacute -3 +KPX t h -10 +KPX t o -3 +KPX t oacute -3 +KPX t odieresis -3 +KPX t quoteright -56 +KPX t semicolon -20 +KPX three four -19 +KPX three one -54 +KPX three seven -47 +KPX two four 6 +KPX two one -42 +KPX two seven -34 +KPX u quoteright -69 +KPX v a -21 +KPX v aacute -21 +KPX v acircumflex -21 +KPX v adieresis -21 +KPX v ae -21 +KPX v agrave -21 +KPX v aring -21 +KPX v atilde -21 +KPX v c -20 +KPX v colon -27 +KPX v comma -49 +KPX v e -18 +KPX v eacute -18 +KPX v ecircumflex -18 +KPX v egrave -18 +KPX v g -24 +KPX v hyphen -8 +KPX v l -15 +KPX v o -23 +KPX v oacute -23 +KPX v odieresis -23 +KPX v ograve -23 +KPX v oslash -29 +KPX v period -50 +KPX v s -22 +KPX v semicolon -22 +KPX w a -20 +KPX w aacute -20 +KPX w acircumflex -20 +KPX w adieresis -20 +KPX w ae -20 +KPX w agrave -20 +KPX w aring -20 +KPX w atilde -20 +KPX w c -19 +KPX w colon -24 +KPX w comma -50 +KPX w e -18 +KPX w eacute -18 +KPX w ecircumflex -18 +KPX w egrave -18 +KPX w g -23 +KPX w hyphen -8 +KPX w l -14 +KPX w o -23 +KPX w oacute -23 +KPX w odieresis -23 +KPX w ograve -23 +KPX w oslash -28 +KPX w period -51 +KPX w s -22 +KPX w semicolon -19 +KPX x a -25 +KPX x c -24 +KPX x e -21 +KPX x eacute -21 +KPX x o -31 +KPX x q -27 +KPX y a -8 +KPX y aacute -8 +KPX y acircumflex -8 +KPX y adieresis -8 +KPX y ae -8 +KPX y agrave -8 +KPX y aring -8 +KPX y atilde -8 +KPX y c -7 +KPX y colon -26 +KPX y comma -18 +KPX y e -6 +KPX y eacute -6 +KPX y ecircumflex -6 +KPX y egrave -6 +KPX y g 7 +KPX y hyphen -4 +KPX y l -3 +KPX y o -10 +KPX y oacute -10 +KPX y odieresis -10 +KPX y ograve -10 +KPX y oslash -15 +KPX y period -14 +KPX y s -8 +KPX y semicolon -18 +KPX zero four -12 +KPX zero one -36 +KPX zero seven -31 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/modules b/modules index d448d1d0c1..6f2ba417ce 100644 --- a/modules +++ b/modules @@ -105,15 +105,5 @@ wxOS2 -a wxWindows wxWindows/docs !wxWindows/docs/latex !wxWindows/docs/motif \ wxWindows/lib wxWindows/samples wxWindows/misc !wxWindows/misc/implib \ wxWindows/testconf -wxPython -a wxWindows wxWindows/utils wxWindows/utils/wxPython \ - !wxWindows/docs \ - !wxWindows/distrib !wxWindows/include !wxWindows/lib !wxWindows/locale \ - !wxWindows/misc !wxWindows/samples !wxWindows/src !wxWindows/tests \ - !wxWindows/user !wxWindows/utils/HelpGen !wxWindows/utils/HelpHTML \ - !wxWindows/utils/dialoged !wxWindows/utils/framelayout \ - !wxWindows/utils/nplugin !wxWindows/utils/projgen !wxWindows/utils/serialize \ - !wxWindows/utils/tex2rtf !wxWindows/utils/wxMMedia2 \ - !wxWindows/utils/wxOLE !wxWindows/utils/wxtree - diff --git a/samples/SamplesVC.dsw b/samples/SamplesVC.dsw new file mode 100644 index 0000000000..d07f3504b1 --- /dev/null +++ b/samples/SamplesVC.dsw @@ -0,0 +1,737 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CalendarVC"=.\calendar\CalendarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CaretVC"=.\caret\CaretVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CheckLstVC"=.\checklst\CheckLstVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ClientVC"=.\sockets\ClientVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ConfigVC"=.\config\ConfigVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ControlsVC"=.\controls\ControlsVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DbVC"=.\db\DbVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DialogsVC"=.\dialogs\DialogsVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DialupVC"=.\dialup\DialupVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DndVC"=.\dnd\DndVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DocViewVC"=.\docview\DocViewVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DocVwMDIVC"=.\docvwmdi\DocVwMDIVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DragimagVC"=.\dragimag\DragimagVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DrawingVC"=.\drawing\DrawingVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "DynamicVC"=.\dynamic\DynamicVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ExecVC"=.\exec\ExecVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "FontVC"=.\font\FontVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "GridVC"=.\grid\GridVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "HelpVC"=.\help\HelpVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ImageVC"=.\image\ImageVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "InternatVC"=.\internat\InternatVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "JoytestVC"=.\joytest\JoytestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "LayoutVC"=.\layout\LayoutVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ListctrlVC"=.\listctrl\ListctrlVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MdiVC"=.\mdi\MdiVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MemcheckVC"=.\memcheck\MemcheckVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MenuVC"=.\menu\MenuVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MfcVC"=.\mfc\MfcVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MiniframVC"=.\minifram\MiniframVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "MinimalVC"=.\minimal\MinimalVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NativdlgVC"=.\nativdlg\NativdlgVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NewGridVC"=.\newgrid\NewGridVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NotebookVC"=.\notebook\NotebookVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "OleautoVC"=.\oleauto\OleautoVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "OwnerdrwVC"=.\ownerdrw\OwnerdrwVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PlotVC"=.\plot\PlotVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PngVC"=.\png\PngVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PrintingVC"=.\printing\PrintingVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ProplistVC"=.\proplist\ProplistVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "PropsizeVC"=.\propsize\PropsizeVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RegtestVC"=.\regtest\RegtestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ResourceVC"=.\resource\ResourceVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RichEditVC"=.\richedit\RichEditVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "RotateVC"=.\rotate\RotateVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SashtestVC"=.\sashtest\SashtestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ScrollVC"=.\scroll\ScrollVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ScrollsubVC"=.\scrollsub\ScrollsubVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ServerVC"=.\sockets\ServerVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "SplitterVC"=.\splitter\SplitterVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "StatbarVC"=.\statbar\StatbarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TabVC"=.\tab\TabVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TaskbarVC"=.\taskbar\TaskbarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TextVC"=.\text\TextVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ThreadVC"=.\thread\ThreadVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ToolbarVC"=.\toolbar\ToolbarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TreectrlVC"=.\treectrl\TreectrlVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TreelayVC"=.\treelay\TreelayVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TypetestVC"=.\typetest\TypetestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ValidateVC"=.\validate\ValidateVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "WizardVC"=.\wizard\WizardVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/calendar/CalendarVC.dsp b/samples/calendar/CalendarVC.dsp new file mode 100644 index 0000000000..410a856dea --- /dev/null +++ b/samples/calendar/CalendarVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="CalendarVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CalendarVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CalendarVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CalendarVC.mak" CFG="CalendarVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CalendarVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CalendarVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CalendarVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "CalendarVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CalendarVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/calendar.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CalendarVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/calendar.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CalendarVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/calendar.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CalendarVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/calendar.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "CalendarVC - Win32 Release" +# Name "CalendarVC - Win32 Debug" +# Name "CalendarVC - Win32 Debug DLL" +# Name "CalendarVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\calendar.cpp + +!IF "$(CFG)" == "CalendarVC - Win32 Release" + +!ELSEIF "$(CFG)" == "CalendarVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "CalendarVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "CalendarVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\calendar.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/calendar/CalendarVC.dsw b/samples/calendar/CalendarVC.dsw new file mode 100644 index 0000000000..7f3966d2d3 --- /dev/null +++ b/samples/calendar/CalendarVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CalendarVC"=.\CalendarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/calendar/calendar.cpp b/samples/calendar/calendar.cpp index d029c165fd..496c33b432 100644 --- a/samples/calendar/calendar.cpp +++ b/samples/calendar/calendar.cpp @@ -259,30 +259,30 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnCalMonday(wxCommandEvent& event) { - m_panel->StartWithMonday(GetMenuBar()->IsChecked(event.GetInt())); + m_panel->StartWithMonday(GetMenuBar()->IsChecked(event.GetId())); } void MyFrame::OnCalHolidays(wxCommandEvent& event) { - bool enable = GetMenuBar()->IsChecked(event.GetInt()); + bool enable = GetMenuBar()->IsChecked(event.GetId()); m_panel->GetCal()->EnableHolidayDisplay(enable); } void MyFrame::OnCalSpecial(wxCommandEvent& event) { - m_panel->HighlightSpecial(GetMenuBar()->IsChecked(event.GetInt())); + m_panel->HighlightSpecial(GetMenuBar()->IsChecked(event.GetId())); } void MyFrame::OnCalAllowMonth(wxCommandEvent& event) { - bool allow = GetMenuBar()->IsChecked(event.GetInt()); + bool allow = GetMenuBar()->IsChecked(event.GetId()); m_panel->GetCal()->EnableMonthChange(allow); } void MyFrame::OnCalAllowYear(wxCommandEvent& event) { - bool allow = GetMenuBar()->IsChecked(event.GetInt()); + bool allow = GetMenuBar()->IsChecked(event.GetId()); m_panel->GetCal()->EnableYearChange(allow); } diff --git a/samples/caret/CaretVC.dsp b/samples/caret/CaretVC.dsp new file mode 100644 index 0000000000..2afaa1f148 --- /dev/null +++ b/samples/caret/CaretVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="CaretVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CaretVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CaretVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CaretVC.mak" CFG="CaretVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CaretVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CaretVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CaretVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "CaretVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CaretVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/caret.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CaretVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/caret.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CaretVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/caret.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CaretVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/caret.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "CaretVC - Win32 Release" +# Name "CaretVC - Win32 Debug" +# Name "CaretVC - Win32 Debug DLL" +# Name "CaretVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\caret.cpp + +!IF "$(CFG)" == "CaretVC - Win32 Release" + +!ELSEIF "$(CFG)" == "CaretVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "CaretVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "CaretVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\caret.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/caret/CaretVC.dsw b/samples/caret/CaretVC.dsw new file mode 100644 index 0000000000..3d1a972995 --- /dev/null +++ b/samples/caret/CaretVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CaretVC"=.\CaretVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/caret/caret.cpp b/samples/caret/caret.cpp index 36801972fc..b3f8ca5fe7 100644 --- a/samples/caret/caret.cpp +++ b/samples/caret/caret.cpp @@ -61,6 +61,7 @@ public: // event handlers (these functions should _not_ be virtual) void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); + void OnSetBlinkTime(wxCommandEvent& event); private: // any class wishing to process wxWindows events must use this macro @@ -124,8 +125,7 @@ enum // menu items Caret_Quit = 1, Caret_About, - Caret_Test1, - Caret_Test2, + Caret_SetBlinkTime, // controls start here (the numbers are, of course, arbitrary) Caret_Text = 1000 @@ -141,6 +141,7 @@ enum BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Caret_Quit, MyFrame::OnQuit) EVT_MENU(Caret_About, MyFrame::OnAbout) + EVT_MENU(Caret_SetBlinkTime, MyFrame::OnSetBlinkTime) END_EVENT_TABLE() // Create a new application object: this macro will allow wxWindows to create @@ -190,6 +191,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) // create a menu bar wxMenu *menuFile = new wxMenu; + menuFile->Append(Caret_SetBlinkTime, "&Blink time...\tCtrl-B"); + menuFile->AppendSeparator(); menuFile->Append(Caret_About, "&About...\tCtrl-A", "Show about dialog"); menuFile->AppendSeparator(); menuFile->Append(Caret_Quit, "E&xit\tAlt-X", "Quit this program"); @@ -219,9 +222,26 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - wxMessageBox(_T("This is the about dialog of caret sample."), "About Caret", wxOK | wxICON_INFORMATION, this); + wxMessageBox(_T("The caret wxWindows sample.\n© 1999 Vadim Zeitlin"), + _T("About Caret"), wxOK | wxICON_INFORMATION, this); } +void MyFrame::OnSetBlinkTime(wxCommandEvent& WXUNUSED(event)) +{ + long blinkTime = wxGetNumberFromUser + ( + _T("The caret blink time is the time between two blinks"), + _T("Time in milliseconds:"), + _T("wxCaret sample"), + wxCaret::GetBlinkTime(), 0, 10000, + this + ); + if ( blinkTime != -1 ) + { + wxCaret::SetBlinkTime((int)blinkTime); + wxLogStatus(this, _T("Blink time set to %ld milliseconds."), blinkTime); + } +} // ---------------------------------------------------------------------------- // MyCanvas @@ -292,10 +312,15 @@ void MyCanvas::OnSize( wxSizeEvent &event ) event.Skip(); } +// NB: this method is horrible inefficient especially because the caret +// needs to be redrawn often and in this case we only have to redraw +// the caret location and not the entire window - in a real program we +// would use GetUpdateRegion() and iterate over rectangles it contains void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) { wxPaintDC dc( this ); PrepareDC( dc ); + dc.Clear(); dc.SetFont( m_font ); diff --git a/samples/checklst/CheckLstVC.dsp b/samples/checklst/CheckLstVC.dsp new file mode 100644 index 0000000000..a42bc622ba --- /dev/null +++ b/samples/checklst/CheckLstVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="CheckLstVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CheckLstVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CheckLstVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CheckLstVC.mak" CFG="CheckLstVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CheckLstVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "CheckLstVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CheckLstVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "CheckLstVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CheckLstVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/checklst.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CheckLstVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/checklst.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CheckLstVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/checklst.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "CheckLstVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/checklst.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "CheckLstVC - Win32 Release" +# Name "CheckLstVC - Win32 Debug" +# Name "CheckLstVC - Win32 Debug DLL" +# Name "CheckLstVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\checklst.cpp + +!IF "$(CFG)" == "CheckLstVC - Win32 Release" + +!ELSEIF "$(CFG)" == "CheckLstVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "CheckLstVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "CheckLstVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\checklst.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/checklst/CheckLstVC.dsw b/samples/checklst/CheckLstVC.dsw new file mode 100644 index 0000000000..faa4fac80b --- /dev/null +++ b/samples/checklst/CheckLstVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CheckLstVC"=.\CheckLstVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/config/ConfigVC.dsp b/samples/config/ConfigVC.dsp new file mode 100644 index 0000000000..e3c76c7c75 --- /dev/null +++ b/samples/config/ConfigVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ConfigVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ConfigVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ConfigVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ConfigVC.mak" CFG="ConfigVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ConfigVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ConfigVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ConfigVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ConfigVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ConfigVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/conftest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ConfigVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/conftest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ConfigVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/conftest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ConfigVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/conftest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ConfigVC - Win32 Release" +# Name "ConfigVC - Win32 Debug" +# Name "ConfigVC - Win32 Debug DLL" +# Name "ConfigVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\conftest.cpp + +!IF "$(CFG)" == "ConfigVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ConfigVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ConfigVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ConfigVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\conftest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/config/ConfigVC.dsw b/samples/config/ConfigVC.dsw new file mode 100644 index 0000000000..55bb3bf0d3 --- /dev/null +++ b/samples/config/ConfigVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ConfigVC"=.\ConfigVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/configure b/samples/configure index 839a611c85..8bb87eb335 100755 --- a/samples/configure +++ b/samples/configure @@ -662,6 +662,7 @@ trap 'rm -fr `echo " dnd/Makefile dragimag/Makefile drawing/Makefile + dynamic/Makefile exec/Makefile font/Makefile grid/Makefile @@ -678,7 +679,6 @@ trap 'rm -fr `echo " minimal/Makefile newgrid/Makefile notebook/Makefile - plot/Makefile png/Makefile printing/Makefile proplist/Makefile @@ -805,6 +805,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile dnd/Makefile dragimag/Makefile drawing/Makefile + dynamic/Makefile exec/Makefile font/Makefile grid/Makefile @@ -821,7 +822,6 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile minimal/Makefile newgrid/Makefile notebook/Makefile - plot/Makefile png/Makefile printing/Makefile proplist/Makefile diff --git a/samples/configure.in b/samples/configure.in index ee2ae94fdb..7ee4f5a0a8 100644 --- a/samples/configure.in +++ b/samples/configure.in @@ -30,6 +30,7 @@ AC_OUTPUT([ dnd/Makefile dragimag/Makefile drawing/Makefile + dynamic/Makefile exec/Makefile font/Makefile grid/Makefile @@ -46,7 +47,6 @@ AC_OUTPUT([ minimal/Makefile newgrid/Makefile notebook/Makefile - plot/Makefile png/Makefile printing/Makefile proplist/Makefile diff --git a/samples/console/console.cpp b/samples/console/console.cpp index 0c1a371415..f883869d2f 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -35,21 +35,54 @@ // what to test (in alphabetic order)? -//#define TEST_ARRAYS -//#define TEST_CMDLINE -//#define TEST_DATETIME -//#define TEST_DIR -//#define TEST_EXECUTE -//#define TEST_FILECONF -//#define TEST_HASH -//#define TEST_LOG -//#define TEST_LONGLONG -//#define TEST_MIME +#define TEST_ARRAYS +#define TEST_CMDLINE +#define TEST_DATETIME +#define TEST_DIR +#define TEST_DLLLOADER +#define TEST_EXECUTE +#define TEST_FILE +#define TEST_FILECONF +#define TEST_HASH +#define TEST_LIST +#define TEST_LOG +#define TEST_LONGLONG +#define TEST_MIME #define TEST_INFO_FUNCTIONS -//#define TEST_SOCKETS -//#define TEST_STRINGS -//#define TEST_THREADS -//#define TEST_TIMER +#define TEST_SOCKETS +#define TEST_STRINGS +#define TEST_THREADS +#define TEST_TIMER +//#define TEST_VCARD -- don't enable this (VZ) +#define TEST_WCHAR +#define TEST_ZIP +#define TEST_ZLIB + +// ---------------------------------------------------------------------------- +// test class for container objects +// ---------------------------------------------------------------------------- + +#if defined(TEST_ARRAYS) || defined(TEST_LIST) + +class Bar // Foo is already taken in the hash test +{ +public: + Bar(const wxString& name) : m_name(name) { ms_bars++; } + ~Bar() { ms_bars--; } + + static size_t GetNumber() { return ms_bars; } + + const char *GetName() const { return m_name; } + +private: + wxString m_name; + + static size_t ms_bars; +}; + +size_t Bar::ms_bars = 0; + +#endif // defined(TEST_ARRAYS) || defined(TEST_LIST) // ============================================================================ // implementation @@ -108,6 +141,8 @@ static void ShowCmdLine(const wxCmdLineParser& parser) s << "Size:\t" << lVal << '\n'; if ( parser.Found("d", &dt) ) s << "Date:\t" << dt.FormatISODate() << '\n'; + if ( parser.Found("project_name", &strVal) ) + s << "Project:\t" << strVal << '\n'; wxLogMessage(s); } @@ -191,6 +226,61 @@ static void TestDirEnum() #endif // TEST_DIR +// ---------------------------------------------------------------------------- +// wxDllLoader +// ---------------------------------------------------------------------------- + +#ifdef TEST_DLLLOADER + +#include + +static void TestDllLoad() +{ +#if defined(__WXMSW__) + static const wxChar *LIB_NAME = _T("kernel32.dll"); + static const wxChar *FUNC_NAME = _T("lstrlenA"); +#elif defined(__UNIX__) + // weird: using just libc.so does *not* work! + static const wxChar *LIB_NAME = _T("/lib/libc-2.0.7.so"); + static const wxChar *FUNC_NAME = _T("strlen"); +#else + #error "don't know how to test wxDllLoader on this platform" +#endif + + puts("*** testing wxDllLoader ***\n"); + + wxDllType dllHandle = wxDllLoader::LoadLibrary(LIB_NAME); + if ( !dllHandle ) + { + wxPrintf(_T("ERROR: failed to load '%s'.\n"), LIB_NAME); + } + else + { + typedef int (*strlenType)(const char *); + strlenType pfnStrlen = (strlenType)wxDllLoader::GetSymbol(dllHandle, FUNC_NAME); + if ( !pfnStrlen ) + { + wxPrintf(_T("ERROR: function '%s' wasn't found in '%s'.\n"), + FUNC_NAME, LIB_NAME); + } + else + { + if ( pfnStrlen("foo") != 3 ) + { + wxPrintf(_T("ERROR: loaded function is not strlen()!\n")); + } + else + { + puts("... ok"); + } + } + + wxDllLoader::UnloadLibrary(dllHandle); + } +} + +#endif // TEST_DLLLOADER + // ---------------------------------------------------------------------------- // wxExecute // ---------------------------------------------------------------------------- @@ -258,6 +348,91 @@ static void TestExecute() #endif // TEST_EXECUTE +// ---------------------------------------------------------------------------- +// file +// ---------------------------------------------------------------------------- + +#ifdef TEST_FILE + +#include +#include + +static void TestFileRead() +{ + puts("*** wxFile read test ***"); + + wxFile file(_T("testdata.fc")); + if ( file.IsOpened() ) + { + printf("File length: %lu\n", file.Length()); + + puts("File dump:\n----------"); + + static const off_t len = 1024; + char buf[len]; + for ( ;; ) + { + off_t nRead = file.Read(buf, len); + if ( nRead == wxInvalidOffset ) + { + printf("Failed to read the file."); + break; + } + + fwrite(buf, nRead, 1, stdout); + + if ( nRead < len ) + break; + } + + puts("----------"); + } + else + { + printf("ERROR: can't open test file.\n"); + } + + puts(""); +} + +static void TestTextFileRead() +{ + puts("*** wxTextFile read test ***"); + + wxTextFile file(_T("testdata.fc")); + if ( file.Open() ) + { + printf("Number of lines: %u\n", file.GetLineCount()); + printf("Last line: '%s'\n", file.GetLastLine().c_str()); + + wxString s; + + puts("\nDumping the entire file:"); + for ( s = file.GetFirstLine(); !file.Eof(); s = file.GetNextLine() ) + { + printf("%6u: %s\n", file.GetCurrentLine() + 1, s.c_str()); + } + printf("%6u: %s\n", file.GetCurrentLine() + 1, s.c_str()); + + puts("\nAnd now backwards:"); + for ( s = file.GetLastLine(); + file.GetCurrentLine() != 0; + s = file.GetPrevLine() ) + { + printf("%6u: %s\n", file.GetCurrentLine() + 1, s.c_str()); + } + printf("%6u: %s\n", file.GetCurrentLine() + 1, s.c_str()); + } + else + { + printf("ERROR: can't open '%s'\n", file.GetName()); + } + + puts(""); +} + +#endif // TEST_FILE + // ---------------------------------------------------------------------------- // wxFileConfig // ---------------------------------------------------------------------------- @@ -278,6 +453,39 @@ static const struct FileConfTestData { _T("novalue"), _T("default") }, }; +static void DumpFileConfGroup(wxFileConfig& fileconf, + const wxString& indent) +{ + long dummy; + wxString name; + bool cont; + + printf("%s[%s]\n", indent.c_str(), + fileconf.GetPath().AfterLast(_T('/')).c_str()); + + // dump the subgroups + cont = fileconf.GetFirstGroup(name, dummy); + while ( cont ) + { + fileconf.SetPath(name); + DumpFileConfGroup(fileconf, indent + _T(" ")); + fileconf.SetPath(_T("..")); + + cont = fileconf.GetNextGroup(name, dummy); + } + + // and now the entries + cont = fileconf.GetFirstEntry(name, dummy); + while ( cont ) + { + printf("\t%s = %s\n", + name.c_str(), + fileconf.Read(name.c_str(), _T("ERROR")).c_str()); + + cont = fileconf.GetNextEntry(name, dummy); + } +} + static void TestFileConfRead() { puts("*** testing wxFileConfig loading/reading ***"); @@ -305,18 +513,9 @@ static void TestFileConfRead() } // test enumerating the entries - puts("\nEnumerating all root entries:"); - long dummy; - wxString name; - bool cont = fileconf.GetFirstEntry(name, dummy); - while ( cont ) - { - printf("\t%s = %s\n", - name.c_str(), - fileconf.Read(name.c_str(), _T("ERROR")).c_str()); + puts("\nEnumerating all entries:"); - cont = fileconf.GetNextEntry(name, dummy); - } + DumpFileConfGroup(fileconf, _T("")); } #endif // TEST_FILECONF @@ -407,6 +606,44 @@ static void TestHash() #endif // TEST_HASH +// ---------------------------------------------------------------------------- +// wxList +// ---------------------------------------------------------------------------- + +#ifdef TEST_LIST + +#include + +WX_DECLARE_LIST(Bar, wxListBars); +#include +WX_DEFINE_LIST(wxListBars); + +static void TestListCtor() +{ + puts("*** Testing wxList construction ***\n"); + + { + wxListBars list1; + list1.Append(new Bar(_T("first"))); + list1.Append(new Bar(_T("second"))); + + printf("After 1st list creation: %u objects in the list, %u objects total.\n", + list1.GetCount(), Bar::GetNumber()); + + wxListBars list2; + list2 = list1; + + printf("After 2nd list creation: %u and %u objects in the lists, %u objects total.\n", + list1.GetCount(), list2.GetCount(), Bar::GetNumber()); + + list1.DeleteContents(TRUE); + } + + printf("After list destruction: %u objects left.\n", Bar::GetNumber()); +} + +#endif // TEST_LIST + // ---------------------------------------------------------------------------- // MIME types // ---------------------------------------------------------------------------- @@ -415,12 +652,13 @@ static void TestHash() #include +static wxMimeTypesManager g_mimeManager; + static void TestMimeEnum() { - wxMimeTypesManager mimeTM; wxArrayString mimetypes; - size_t count = mimeTM.EnumAllFileTypes(mimetypes); + size_t count = g_mimeManager.EnumAllFileTypes(mimetypes); printf("*** All %u known filetypes: ***\n", count); @@ -429,7 +667,7 @@ static void TestMimeEnum() for ( size_t n = 0; n < count; n++ ) { - wxFileType *filetype = mimeTM.GetFileTypeFromMimeType(mimetypes[n]); + wxFileType *filetype = g_mimeManager.GetFileTypeFromMimeType(mimetypes[n]); if ( !filetype ) { printf("nothing known about the filetype '%s'!\n", @@ -455,6 +693,60 @@ static void TestMimeEnum() } } +static void TestMimeOverride() +{ + wxPuts(_T("*** Testing wxMimeTypesManager additional files loading ***\n")); + + wxString mailcap = _T("/tmp/mailcap"), + mimetypes = _T("/tmp/mime.types"); + + wxPrintf(_T("Loading mailcap from '%s': %s\n"), + mailcap.c_str(), + g_mimeManager.ReadMailcap(mailcap) ? _T("ok") : _T("ERROR")); + wxPrintf(_T("Loading mime.types from '%s': %s\n"), + mimetypes.c_str(), + g_mimeManager.ReadMimeTypes(mimetypes) ? _T("ok") : _T("ERROR")); +} + +static void TestMimeFilename() +{ + wxPuts(_T("*** Testing MIME type from filename query ***\n")); + + static const wxChar *filenames[] = + { + _T("readme.txt"), + _T("document.pdf"), + _T("image.gif"), + }; + + for ( size_t n = 0; n < WXSIZEOF(filenames); n++ ) + { + const wxString fname = filenames[n]; + wxString ext = fname.AfterLast(_T('.')); + wxFileType *ft = g_mimeManager.GetFileTypeFromExtension(ext); + if ( !ft ) + { + wxPrintf(_T("WARNING: extension '%s' is unknown.\n"), ext.c_str()); + } + else + { + wxString desc; + if ( !ft->GetDescription(&desc) ) + desc = _T(""); + + wxString cmd; + if ( !ft->GetOpenCommand(&cmd, + wxFileType::MessageParameters(fname, _T(""))) ) + cmd = _T(""); + + wxPrintf(_T("To open %s (%s) do '%s'.\n"), + fname.c_str(), desc.c_str(), cmd.c_str()); + + delete ft; + } + } +} + #endif // TEST_MIME // ---------------------------------------------------------------------------- @@ -703,28 +995,16 @@ static void TestBitOperations() { puts("*** Testing wxLongLong bit operation ***\n"); - wxLongLong a, c; + wxLongLong ll; size_t nTested = 0; for ( size_t n = 0; n < 100000; n++ ) { - a = RAND_LL(); + ll = RAND_LL(); #if wxUSE_LONGLONG_NATIVE for ( size_t n = 0; n < 33; n++ ) { - wxLongLongNative b(a.GetHi(), a.GetLo()); - - b >>= n; - c = a >> n; - - wxASSERT_MSG( b == c, "bit shift failure" ); - - b = wxLongLongNative(a.GetHi(), a.GetLo()) << n; - c = a << n; - - wxASSERT_MSG( b == c, "bit shift failure" ); } - #else // !wxUSE_LONGLONG_NATIVE puts("Can't do it without native long long type, test skipped."); @@ -743,6 +1023,55 @@ static void TestBitOperations() puts(" done!"); } +static void TestLongLongComparison() +{ + puts("*** Testing wxLongLong comparison ***\n"); + + static const long testLongs[] = + { + 0, + 1, + -1, + LONG_MAX, + LONG_MIN, + 0x1234, + -0x1234 + }; + + static const long ls[2] = + { + 0x1234, + -0x1234, + }; + + wxLongLong lls[2]; + lls[0] = ls[0]; + lls[1] = ls[1]; + + for ( size_t n = 0; n < WXSIZEOF(testLongs); n++ ) + { + bool res; + + for ( size_t m = 0; m < WXSIZEOF(lls); m++ ) + { + res = lls[m] > testLongs[n]; + printf("0x%lx > 0x%lx is %s (%s)\n", + ls[m], testLongs[n], res ? "true" : "false", + res == (ls[m] > testLongs[n]) ? "ok" : "ERROR"); + + res = lls[m] < testLongs[n]; + printf("0x%lx < 0x%lx is %s (%s)\n", + ls[m], testLongs[n], res ? "true" : "false", + res == (ls[m] < testLongs[n]) ? "ok" : "ERROR"); + + res = lls[m] == testLongs[n]; + printf("0x%lx == 0x%lx is %s (%s)\n", + ls[m], testLongs[n], res ? "true" : "false", + res == (ls[m] == testLongs[n]) ? "ok" : "ERROR"); + } + } +} + #undef MAKE_LL #undef RAND_LL @@ -881,7 +1210,7 @@ static void TestSocketClient() static void TestProtocolFtp() { - puts("*** Testing wxFTP ***\n"); + puts("*** Testing wxFTP download ***\n"); wxLog::AddTraceMask(_T("ftp")); @@ -951,6 +1280,94 @@ static void TestProtocolFtp() } } +static void TestProtocolFtpUpload() +{ + puts("*** Testing wxFTP uploading ***\n"); + + wxLog::AddTraceMask(_T("ftp")); + + static const char *hostname = "localhost"; + + printf("--- Attempting to connect to %s:21...\n", hostname); + + wxFTP ftp; + ftp.SetUser("zeitlin"); + ftp.SetPassword("insert your password here"); + if ( !ftp.Connect(hostname) ) + { + printf("ERROR: failed to connect to %s\n", hostname); + } + else + { + printf("--- Connected to %s, current directory is '%s'\n", + hostname, ftp.Pwd().c_str()); + + // upload a file + static const char *file1 = "test1"; + static const char *file2 = "test2"; + wxOutputStream *out = ftp.GetOutputStream(file1); + if ( out ) + { + printf("--- Uploading to %s ---\n", file1); + out->Write("First hello", 11); + delete out; + } + + out = ftp.GetOutputStream(file2); + if ( out ) + { + printf("--- Uploading to %s ---\n", file1); + out->Write("Second hello", 12); + delete out; + } + } +} + +static void TestProtocolHttp() +{ + puts("*** Testing wxHTTP ***\n"); + + wxLog::AddTraceMask(_T("http")); + + static const char *hostname = "www.wxwindows.org"; + + printf("--- Attempting to connect to %s:80...\n", hostname); + + wxHTTP http; + if ( !http.Connect(hostname) ) + { + printf("ERROR: failed to connect to %s\n", hostname); + } + else + { + static const char *filename = "docs.htm"; + wxInputStream *in = http.GetInputStream(filename); + if ( !in ) + { + printf("ERROR: couldn't retrieve '%s'\n", filename); + } + else + { + size_t size = in->StreamSize(); + printf("Reading file %s of type %s (%u bytes)...", + filename, http.GetContentType().c_str(), size); + + char *data = new char[size]; + if ( !in->Read(data, size) ) + { + puts("ERROR: read error"); + } + else + { + printf("\nContents of %s:\n%s\n", filename, data); + } + + delete [] data; + delete in; + } + } +} + #endif // TEST_SOCKETS // ---------------------------------------------------------------------------- @@ -1003,6 +1420,373 @@ static void TestStopWatch() #endif // TEST_TIMER +// ---------------------------------------------------------------------------- +// vCard support +// ---------------------------------------------------------------------------- + +#ifdef TEST_VCARD + +#include + +static void DumpVObject(size_t level, const wxVCardObject& vcard) +{ + void *cookie; + wxVCardObject *vcObj = vcard.GetFirstProp(&cookie); + while ( vcObj ) + { + printf("%s%s", + wxString(_T('\t'), level).c_str(), + vcObj->GetName().c_str()); + + wxString value; + switch ( vcObj->GetType() ) + { + case wxVCardObject::String: + case wxVCardObject::UString: + { + wxString val; + vcObj->GetValue(&val); + value << _T('"') << val << _T('"'); + } + break; + + case wxVCardObject::Int: + { + unsigned int i; + vcObj->GetValue(&i); + value.Printf(_T("%u"), i); + } + break; + + case wxVCardObject::Long: + { + unsigned long l; + vcObj->GetValue(&l); + value.Printf(_T("%lu"), l); + } + break; + + case wxVCardObject::None: + break; + + case wxVCardObject::Object: + value = _T(""); + break; + + default: + value = _T(""); + } + + if ( !!value ) + printf(" = %s", value.c_str()); + putchar('\n'); + + DumpVObject(level + 1, *vcObj); + + delete vcObj; + vcObj = vcard.GetNextProp(&cookie); + } +} + +static void DumpVCardAddresses(const wxVCard& vcard) +{ + puts("\nShowing all addresses from vCard:\n"); + + size_t nAdr = 0; + void *cookie; + wxVCardAddress *addr = vcard.GetFirstAddress(&cookie); + while ( addr ) + { + wxString flagsStr; + int flags = addr->GetFlags(); + if ( flags & wxVCardAddress::Domestic ) + { + flagsStr << _T("domestic "); + } + if ( flags & wxVCardAddress::Intl ) + { + flagsStr << _T("international "); + } + if ( flags & wxVCardAddress::Postal ) + { + flagsStr << _T("postal "); + } + if ( flags & wxVCardAddress::Parcel ) + { + flagsStr << _T("parcel "); + } + if ( flags & wxVCardAddress::Home ) + { + flagsStr << _T("home "); + } + if ( flags & wxVCardAddress::Work ) + { + flagsStr << _T("work "); + } + + printf("Address %u:\n" + "\tflags = %s\n" + "\tvalue = %s;%s;%s;%s;%s;%s;%s\n", + ++nAdr, + flagsStr.c_str(), + addr->GetPostOffice().c_str(), + addr->GetExtAddress().c_str(), + addr->GetStreet().c_str(), + addr->GetLocality().c_str(), + addr->GetRegion().c_str(), + addr->GetPostalCode().c_str(), + addr->GetCountry().c_str() + ); + + delete addr; + addr = vcard.GetNextAddress(&cookie); + } +} + +static void DumpVCardPhoneNumbers(const wxVCard& vcard) +{ + puts("\nShowing all phone numbers from vCard:\n"); + + size_t nPhone = 0; + void *cookie; + wxVCardPhoneNumber *phone = vcard.GetFirstPhoneNumber(&cookie); + while ( phone ) + { + wxString flagsStr; + int flags = phone->GetFlags(); + if ( flags & wxVCardPhoneNumber::Voice ) + { + flagsStr << _T("voice "); + } + if ( flags & wxVCardPhoneNumber::Fax ) + { + flagsStr << _T("fax "); + } + if ( flags & wxVCardPhoneNumber::Cellular ) + { + flagsStr << _T("cellular "); + } + if ( flags & wxVCardPhoneNumber::Modem ) + { + flagsStr << _T("modem "); + } + if ( flags & wxVCardPhoneNumber::Home ) + { + flagsStr << _T("home "); + } + if ( flags & wxVCardPhoneNumber::Work ) + { + flagsStr << _T("work "); + } + + printf("Phone number %u:\n" + "\tflags = %s\n" + "\tvalue = %s\n", + ++nPhone, + flagsStr.c_str(), + phone->GetNumber().c_str() + ); + + delete phone; + phone = vcard.GetNextPhoneNumber(&cookie); + } +} + +static void TestVCardRead() +{ + puts("*** Testing wxVCard reading ***\n"); + + wxVCard vcard(_T("vcard.vcf")); + if ( !vcard.IsOk() ) + { + puts("ERROR: couldn't load vCard."); + } + else + { + // read individual vCard properties + wxVCardObject *vcObj = vcard.GetProperty("FN"); + wxString value; + if ( vcObj ) + { + vcObj->GetValue(&value); + delete vcObj; + } + else + { + value = _T(""); + } + + printf("Full name retrieved directly: %s\n", value.c_str()); + + + if ( !vcard.GetFullName(&value) ) + { + value = _T(""); + } + + printf("Full name from wxVCard API: %s\n", value.c_str()); + + // now show how to deal with multiply occuring properties + DumpVCardAddresses(vcard); + DumpVCardPhoneNumbers(vcard); + + // and finally show all + puts("\nNow dumping the entire vCard:\n" + "-----------------------------\n"); + + DumpVObject(0, vcard); + } +} + +static void TestVCardWrite() +{ + puts("*** Testing wxVCard writing ***\n"); + + wxVCard vcard; + if ( !vcard.IsOk() ) + { + puts("ERROR: couldn't create vCard."); + } + else + { + // set some fields + vcard.SetName("Zeitlin", "Vadim"); + vcard.SetFullName("Vadim Zeitlin"); + vcard.SetOrganization("wxWindows", "R&D"); + + // just dump the vCard back + puts("Entire vCard follows:\n"); + puts(vcard.Write()); + } +} + +#endif // TEST_VCARD + +// ---------------------------------------------------------------------------- +// wide char (Unicode) support +// ---------------------------------------------------------------------------- + +#ifdef TEST_WCHAR + +#include +#include + +static void TestUtf8() +{ + puts("*** Testing UTF8 support ***\n"); + + wxString testString = "français"; +#if 0 +"************ French - Français ****************" +"Juste un petit exemple pour dire que les français aussi" +"ont à cÅ“ur de pouvoir utiliser tous leurs caractères ! :)"; +#endif + +#if wxUSE_WCHAR_T + wxWCharBuffer wchBuf = testString.wc_str(wxConvUTF8); + const wchar_t *pwz = (const wchar_t *)wchBuf; + wxString testString2(pwz, wxConvLocal); + + printf("Decoding '%s' => '%s'\n", testString.c_str(), testString2.c_str()); + + char *psz = "fran" "\xe7" "ais"; + size_t len = strlen(psz); + wchar_t *pwz2 = new wchar_t[len + 1]; + for ( size_t n = 0; n <= len; n++ ) + { + pwz2[n] = (wchar_t)(unsigned char)psz[n]; + } + + wxString testString3(pwz2, wxConvUTF8); + delete [] pwz2; + + printf("Encoding '%s' -> '%s'\n", psz, testString3.c_str()); +#else + puts("WARNING: not compiled in."); +#endif // wxUSE_WCHAR_T +} + +#endif // TEST_WCHAR + +// ---------------------------------------------------------------------------- +// ZIP stream +// ---------------------------------------------------------------------------- + +#ifdef TEST_ZIP + +#include "wx/zipstrm.h" + +static void TestZipStreamRead() +{ + puts("*** Testing ZIP reading ***\n"); + + wxZipInputStream istr(_T("idx.zip"), _T("IDX.txt")); + printf("Archive size: %u\n", istr.GetSize()); + + puts("Dumping the file:"); + while ( !istr.Eof() ) + { + putchar(istr.GetC()); + fflush(stdout); + } + + puts("\n----- done ------"); +} + +#endif // TEST_ZIP + +// ---------------------------------------------------------------------------- +// ZLIB stream +// ---------------------------------------------------------------------------- + +#ifdef TEST_ZLIB + +#include +#include + +static const wxChar *FILENAME_GZ = _T("test.gz"); +static const char *TEST_DATA = "hello and hello again"; + +static void TestZlibStreamWrite() +{ + puts("*** Testing Zlib stream reading ***\n"); + + wxFileOutputStream fileOutStream(FILENAME_GZ); + wxZlibOutputStream ostr(fileOutStream, 0); + printf("Compressing the test string... "); + ostr.Write(TEST_DATA, sizeof(TEST_DATA)); + if ( !ostr ) + { + puts("(ERROR: failed)"); + } + else + { + puts("(ok)"); + } + + puts("\n----- done ------"); +} + +static void TestZlibStreamRead() +{ + puts("*** Testing Zlib stream reading ***\n"); + + wxFileInputStream fileInStream(FILENAME_GZ); + wxZlibInputStream istr(fileInStream); + printf("Archive size: %u\n", istr.GetSize()); + + puts("Dumping the file:"); + while ( !istr.Eof() ) + { + putchar(istr.GetC()); + fflush(stdout); + } + + puts("\n----- done ------"); +} + +#endif // TEST_ZLIB + // ---------------------------------------------------------------------------- // date time // ---------------------------------------------------------------------------- @@ -1662,6 +2446,7 @@ static void TestTimeFormat() { CompareBoth, "Date is %x, time is %X" }, { CompareTime, "Time is %H:%M:%S or %I:%M:%S %p" }, { CompareNone, "The day of year: %j, the week of year: %W" }, + { CompareDate, "ISO date without separators: %4Y%2m%2d" }, }; static const Date formatTestDates[] = @@ -1807,16 +2592,24 @@ static void TestInteractive() if ( !fgets(buf, WXSIZEOF(buf), stdin) ) break; + // kill the last '\n' + buf[strlen(buf) - 1] = 0; + wxDateTime dt; - if ( !dt.ParseDate(buf) ) + const char *p = dt.ParseDate(buf); + if ( !p ) { - puts("failed to parse the date"); + printf("ERROR: failed to parse the date '%s'.\n", buf); continue; } + else if ( *p ) + { + printf("WARNING: parsed only first %u characters.\n", p - buf); + } printf("%s: day %u, week of month %u/%u, week of year %u\n", - dt.FormatISODate().c_str(), + dt.Format("%b %d, %Y").c_str(), dt.GetDayOfYear(), dt.GetWeekOfMonth(wxDateTime::Monday_First), dt.GetWeekOfMonth(wxDateTime::Sunday_First), @@ -1826,21 +2619,59 @@ static void TestInteractive() puts("\n*** done ***"); } +// for sqrt() below +#include + +static void TestTimeMS() +{ + puts("*** testing millisecond-resolution support in wxDateTime ***"); + + wxDateTime dt1 = wxDateTime::Now(), + dt2 = wxDateTime::UNow(); + + printf("Now = %s\n", dt1.Format("%H:%M:%S:%l").c_str()); + printf("UNow = %s\n", dt2.Format("%H:%M:%S:%l").c_str()); + printf("Dummy loop: "); + for ( int i = 0; i < 6000; i++ ) + { + //for ( int j = 0; j < 10; j++ ) + { + wxString s; + s.Printf("%g", sqrt(i)); + } + + if ( !(i % 100) ) + putchar('.'); + } + puts(", done"); + + dt1 = dt2; + dt2 = wxDateTime::UNow(); + printf("UNow = %s\n", dt2.Format("%H:%M:%S:%l").c_str()); + + printf("Loop executed in %s ms\n", (dt2 - dt1).Format("%l").c_str()); + + puts("\n*** done ***"); +} + static void TestTimeArithmetics() { puts("\n*** testing arithmetic operations on wxDateTime ***"); - static const struct + static const struct ArithmData { + ArithmData(const wxDateSpan& sp, const char *nam) + : span(sp), name(nam) { } + wxDateSpan span; const char *name; } testArithmData[] = { - { wxDateSpan::Day(), "day" }, - { wxDateSpan::Week(), "week" }, - { wxDateSpan::Month(), "month" }, - { wxDateSpan::Year(), "year" }, - { wxDateSpan(1, 2, 3, 4), "year, 2 months, 3 weeks, 4 days" }, + ArithmData(wxDateSpan::Day(), "day"), + ArithmData(wxDateSpan::Week(), "week"), + ArithmData(wxDateSpan::Month(), "month"), + ArithmData(wxDateSpan::Year(), "year"), + ArithmData(wxDateSpan(1, 2, 3, 4), "year, 2 months, 3 weeks, 4 days"), }; wxDateTime dt(29, wxDateTime::Dec, 1999), dt1, dt2; @@ -1915,6 +2746,23 @@ static void TestTimeHolidays() puts(""); } +static void TestTimeZoneBug() +{ + puts("\n*** testing for DST/timezone bug ***\n"); + + wxDateTime date = wxDateTime(1, wxDateTime::Mar, 2000); + for ( int i = 0; i < 31; i++ ) + { + printf("Date %s: week day %s.\n", + date.Format(_T("%d-%m-%Y")).c_str(), + date.GetWeekDayName(date.GetWeekDay()).c_str()); + + date += wxDateSpan::Day(); + } + + puts(""); +} + #if 0 // test compatibility with the old wxDate/wxTime classes @@ -2191,7 +3039,7 @@ void TestThreadDelete() #ifdef TEST_ARRAYS -void PrintArray(const char* name, const wxArrayString& array) +static void PrintArray(const char* name, const wxArrayString& array) { printf("Dump of the array '%s'\n", name); @@ -2202,6 +3050,44 @@ void PrintArray(const char* name, const wxArrayString& array) } } +static int StringLenCompare(const wxString& first, const wxString& second) +{ + return first.length() - second.length(); +} + +#include "wx/dynarray.h" + +WX_DECLARE_OBJARRAY(Bar, ArrayBars); +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(ArrayBars); + +static void TestArrayOfObjects() +{ + puts("*** Testing wxObjArray ***\n"); + + { + ArrayBars bars; + Bar bar("second bar"); + + printf("Initially: %u objects in the array, %u objects total.\n", + bars.GetCount(), Bar::GetNumber()); + + bars.Add(new Bar("first bar")); + bars.Add(bar); + + printf("Now: %u objects in the array, %u objects total.\n", + bars.GetCount(), Bar::GetNumber()); + + bars.Empty(); + + printf("After Empty(): %u objects in the array, %u objects total.\n", + bars.GetCount(), Bar::GetNumber()); + } + + printf("Finally: no more objects in the array, %u objects total.\n", + Bar::GetNumber()); +} + #endif // TEST_ARRAYS // ---------------------------------------------------------------------------- @@ -2306,6 +3192,32 @@ static void TestStringSub() printf("substr(3, 5) = '%s'\n", s.substr(3, 5).c_str()); printf("substr(3) = '%s'\n", s.substr(3).c_str()); + static const wxChar *prefixes[] = + { + _T("Hello"), + _T("Hello, "), + _T("Hello, world!"), + _T("Hello, world!!!"), + _T(""), + _T("Goodbye"), + _T("Hi"), + }; + + for ( size_t n = 0; n < WXSIZEOF(prefixes); n++ ) + { + wxString prefix = prefixes[n], rest; + bool rc = s.StartsWith(prefix, &rest); + printf("StartsWith('%s') = %s", prefix.c_str(), rc ? "TRUE" : "FALSE"); + if ( rc ) + { + printf(" (the rest is '%s')\n", rest.c_str()); + } + else + { + putchar('\n'); + } + } + puts(""); } @@ -2429,7 +3341,7 @@ static void TestStringTokenizer() } // if we emulate strtok(), check that we do it correctly - wxChar *buf, *s, *last; + wxChar *buf, *s = NULL, *last; if ( tkz.GetMode() == wxTOKEN_STRTOK ) { @@ -2484,6 +3396,49 @@ static void TestStringTokenizer() puts(""); } +static void TestStringReplace() +{ + puts("*** Testing wxString::replace ***"); + + static const struct StringReplaceTestData + { + const wxChar *original; // original test string + size_t start, len; // the part to replace + const wxChar *replacement; // the replacement string + const wxChar *result; // and the expected result + } stringReplaceTestData[] = + { + { _T("012-AWORD-XYZ"), 4, 5, _T("BWORD"), _T("012-BWORD-XYZ") }, + { _T("increase"), 0, 2, _T("de"), _T("decrease") }, + { _T("wxWindow"), 8, 0, _T("s"), _T("wxWindows") }, + { _T("foobar"), 3, 0, _T("-"), _T("foo-bar") }, + { _T("barfoo"), 0, 6, _T("foobar"), _T("foobar") }, + }; + + for ( size_t n = 0; n < WXSIZEOF(stringReplaceTestData); n++ ) + { + const StringReplaceTestData data = stringReplaceTestData[n]; + + wxString original = data.original; + original.replace(data.start, data.len, data.replacement); + + wxPrintf(_T("wxString(\"%s\").replace(%u, %u, %s) = %s "), + data.original, data.start, data.len, data.replacement, + original.c_str()); + + if ( original == data.result ) + { + puts("(ok)"); + } + else + { + wxPrintf(_T("(ERROR: should be '%s')\n"), data.result); + } + } + + puts(""); +} + #endif // TEST_STRINGS // ---------------------------------------------------------------------------- @@ -2521,6 +3476,10 @@ int main(int argc, char **argv) wxCmdLineParser parser(cmdLineDesc, argc, argv); + parser.AddOption("project_name", "", "full path to project file", + wxCMD_LINE_VAL_STRING, + wxCMD_LINE_OPTION_MANDATORY | wxCMD_LINE_NEEDS_SEPARATOR); + switch ( parser.Parse() ) { case -1: @@ -2543,13 +3502,14 @@ int main(int argc, char **argv) TestPChar(); TestString(); } + TestStringSub(); if ( 0 ) { TestStringConstruction(); - TestStringSub(); TestStringFormat(); TestStringFind(); TestStringTokenizer(); + TestStringReplace(); } #endif // TEST_STRINGS @@ -2583,12 +3543,30 @@ int main(int argc, char **argv) a3 = a2 = a1; PrintArray("a2", a2); PrintArray("a3", a3); + + puts("*** After sorting a1"); + a1.Sort(); + PrintArray("a1", a1); + + puts("*** After sorting a1 in reverse order"); + a1.Sort(TRUE); + PrintArray("a1", a1); + + puts("*** After sorting a1 by the string length"); + a1.Sort(StringLenCompare); + PrintArray("a1", a1); + + TestArrayOfObjects(); #endif // TEST_ARRAYS #ifdef TEST_DIR TestDirEnum(); #endif // TEST_DIR +#ifdef TEST_DLLLOADER + TestDllLoad(); +#endif // TEST_DLLLOADER + #ifdef TEST_EXECUTE TestExecute(); #endif // TEST_EXECUTE @@ -2597,6 +3575,10 @@ int main(int argc, char **argv) TestFileConfRead(); #endif // TEST_FILECONF +#ifdef TEST_LIST + TestListCtor(); +#endif // TEST_LIST + #ifdef TEST_LOG wxString s; for ( size_t n = 0; n < 8000; n++ ) @@ -2616,6 +3598,12 @@ int main(int argc, char **argv) wxLogMessage("A very very long message 2: '%s', the end!", s.c_str()); #endif // TEST_LOG +#ifdef TEST_FILE + if ( 0 ) + TestFileRead(); + TestTextFileRead(); +#endif // TEST_FILE + #ifdef TEST_THREADS int nCPUs = wxThread::GetCPUCount(); printf("This system has %d CPUs\n", nCPUs); @@ -2644,14 +3632,15 @@ int main(int argc, char **argv) { TestSpeed(); } - TestMultiplication(); if ( 0 ) { + TestMultiplication(); TestDivision(); TestAddition(); TestLongLongConversion(); TestBitOperations(); } + TestLongLongComparison(); #endif // TEST_LONGLONG #ifdef TEST_HASH @@ -2659,7 +3648,11 @@ int main(int argc, char **argv) #endif // TEST_HASH #ifdef TEST_MIME - TestMimeEnum(); + wxLog::AddTraceMask(_T("mime")); + if ( 0 ) + TestMimeEnum(); + TestMimeOverride(); + TestMimeFilename(); #endif // TEST_MIME #ifdef TEST_INFO_FUNCTIONS @@ -2668,13 +3661,14 @@ int main(int argc, char **argv) #endif // TEST_INFO_FUNCTIONS #ifdef TEST_SOCKETS - if ( 1 ) - TestSocketServer(); if ( 0 ) { + TestSocketServer(); TestSocketClient(); TestProtocolFtp(); + TestProtocolFtpUpload(); } + TestProtocolHttp(); #endif // TEST_SOCKETS #ifdef TEST_TIMER @@ -2694,15 +3688,39 @@ int main(int argc, char **argv) TestTimeWDays(); TestTimeWNumber(); TestTimeParse(); - TestTimeFormat(); TestTimeArithmetics(); + TestTimeHolidays(); + TestTimeFormat(); + TestTimeMS(); + + TestTimeZoneBug(); } - TestTimeHolidays(); - if ( 0 ) + if ( 1 ) TestInteractive(); #endif // TEST_DATETIME +#ifdef TEST_VCARD + if ( 0 ) + TestVCardRead(); + TestVCardWrite(); +#endif // TEST_VCARD + +#ifdef TEST_WCHAR + TestUtf8(); +#endif // TEST_WCHAR + +#ifdef TEST_ZIP + TestZipStreamRead(); +#endif // TEST_ZIP + +#ifdef TEST_ZLIB + if ( 0 ) + TestZlibStreamWrite(); + TestZlibStreamRead(); +#endif // TEST_ZLIB + wxUninitialize(); return 0; } + diff --git a/samples/controls/ControlsVC.dsp b/samples/controls/ControlsVC.dsp new file mode 100644 index 0000000000..7d00ef86e4 --- /dev/null +++ b/samples/controls/ControlsVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ControlsVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ControlsVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ControlsVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ControlsVC.mak" CFG="ControlsVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ControlsVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ControlsVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ControlsVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ControlsVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ControlsVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/controls.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ControlsVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/controls.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ControlsVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/controls.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ControlsVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/controls.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ControlsVC - Win32 Release" +# Name "ControlsVC - Win32 Debug" +# Name "ControlsVC - Win32 Debug DLL" +# Name "ControlsVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\controls.cpp + +!IF "$(CFG)" == "ControlsVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ControlsVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ControlsVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ControlsVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\controls.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/controls/ControlsVC.dsw b/samples/controls/ControlsVC.dsw new file mode 100644 index 0000000000..4c9a885bdc --- /dev/null +++ b/samples/controls/ControlsVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ControlsVC"=.\ControlsVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 7255bc38bc..5c0a5d6c80 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -88,6 +88,8 @@ public: void OnChoice( wxCommandEvent &event ); void OnChoiceButtons( wxCommandEvent &event ); void OnCombo( wxCommandEvent &event ); + void OnComboTextChanged( wxCommandEvent &event ); + void OnComboTextEnter( wxCommandEvent &event ); void OnComboButtons( wxCommandEvent &event ); void OnRadio( wxCommandEvent &event ); void OnRadioButtons( wxCommandEvent &event ); @@ -106,6 +108,7 @@ public: #if wxUSE_SPINCTRL void OnSpinCtrl(wxSpinEvent& event); + void OnSpinCtrlSetValue(wxCommandEvent& event); #endif // wxUSE_SPINCTRL void OnEnableAll(wxCommandEvent& event); @@ -183,6 +186,103 @@ private: DECLARE_EVENT_TABLE() }; +// a button which intercepts double clicks (for testing...) +class MyButton : public wxButton +{ +public: + MyButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize) + : wxButton(parent, id, label, pos, size) + { + } + + void OnDClick(wxMouseEvent& event) + { + wxLogMessage(_T("MyButton::OnDClick")); + + event.Skip(); + } + + void OnButton(wxCommandEvent& event) + { + wxLogMessage(_T("MyButton::OnButton")); + + event.Skip(); + } + +private: + DECLARE_EVENT_TABLE() +}; + +// a combo which intercepts chars (to test Windows behaviour) +class MyComboBox : public wxComboBox +{ +public: + MyComboBox(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + : wxComboBox(parent, id, value, pos, size, n, choices, style, + validator, name) { } + +protected: + void OnChar(wxKeyEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnKeyUp(wxKeyEvent& event); + void OnFocusGot(wxFocusEvent& event) + { + wxLogMessage(_T("MyComboBox::OnFocusGot")); + + event.Skip(); + } + +private: + DECLARE_EVENT_TABLE() +}; + +// a radiobox which handles focus set/kill (for testing) +class MyRadioBox : public wxRadioBox +{ +public: + MyRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 1, + long style = wxRA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + : wxRadioBox(parent, id, title, pos, size, n, choices, majorDim, + style, validator, name) { } + +protected: + void OnFocusGot(wxFocusEvent& event) + { + wxLogMessage(_T("MyRadioBox::OnFocusGot")); + + event.Skip(); + } + + void OnFocusLost(wxFocusEvent& event) + { + wxLogMessage(_T("MyRadioBox::OnFocusLost")); + + event.Skip(); + } + +private: + DECLARE_EVENT_TABLE() +}; + //---------------------------------------------------------------------- // other //---------------------------------------------------------------------- @@ -216,7 +316,7 @@ bool MyApp::OnInit() // parse the cmd line int x = 50, y = 50; - if ( argc == 2 ) + if ( argc == 3 ) { wxSscanf(argv[1], "%d", &x); wxSscanf(argv[2], "%d", &y); @@ -287,6 +387,8 @@ const int ID_LISTBOX_DELETE = 135; const int ID_LISTBOX_FONT = 136; const int ID_LISTBOX_ENABLE = 137; const int ID_LISTBOX_SORTED = 138; +const int ID_LISTBOX_TOGGLE = 139; +const int ID_LISTBOX_SETFIRST = 140; const int ID_CHOICE = 120; const int ID_CHOICE_SEL_NUM = 121; @@ -325,6 +427,7 @@ const int ID_SPIN = 182; const int ID_BTNPROGRESS = 183; const int ID_BUTTON_LABEL = 184; const int ID_SPINCTRL = 185; +const int ID_SPINCTRL_VALUE = 186; const int ID_BUTTON_TEST1 = 190; const int ID_BUTTON_TEST2 = 191; @@ -345,6 +448,8 @@ EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons) EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons) EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons) EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons) +EVT_BUTTON (ID_LISTBOX_TOGGLE, MyPanel::OnListBoxButtons) +EVT_BUTTON (ID_LISTBOX_SETFIRST, MyPanel::OnListBoxButtons) EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons) EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice) EVT_CHOICE (ID_CHOICE_SORTED, MyPanel::OnChoice) @@ -356,6 +461,8 @@ EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons) EVT_BUTTON (ID_CHOICE_FONT, MyPanel::OnChoiceButtons) EVT_CHECKBOX (ID_CHOICE_ENABLE, MyPanel::OnChoiceButtons) EVT_COMBOBOX (ID_COMBO, MyPanel::OnCombo) +EVT_TEXT (ID_COMBO, MyPanel::OnComboTextChanged) +EVT_TEXT_ENTER(ID_COMBO, MyPanel::OnComboTextEnter) EVT_BUTTON (ID_COMBO_SEL_NUM, MyPanel::OnComboButtons) EVT_BUTTON (ID_COMBO_SEL_STR, MyPanel::OnComboButtons) EVT_BUTTON (ID_COMBO_CLEAR, MyPanel::OnComboButtons) @@ -379,6 +486,7 @@ EVT_BUTTON (ID_BTNPROGRESS, MyPanel::OnShowProgress) #endif // wxUSE_SPINBTN #if wxUSE_SPINCTRL EVT_SPINCTRL (ID_SPINCTRL, MyPanel::OnSpinCtrl) +EVT_BUTTON (ID_SPINCTRL_VALUE, MyPanel::OnSpinCtrlSetValue) #endif // wxUSE_SPINCTRL EVT_BUTTON (ID_BUTTON_LABEL, MyPanel::OnUpdateLabel) EVT_CHECKBOX (ID_CHANGE_COLOUR, MyPanel::OnChangeColour) @@ -387,6 +495,28 @@ EVT_BUTTON (ID_BUTTON_TEST2, MyPanel::OnTestButton) EVT_BUTTON (ID_BITMAP_BTN, MyPanel::OnBmpButton) END_EVENT_TABLE() +BEGIN_EVENT_TABLE(MyButton, wxButton) + EVT_LEFT_DCLICK(MyButton::OnDClick) + EVT_BUTTON(-1, MyButton::OnButton) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(MyComboBox, wxComboBox) + EVT_CHAR(MyComboBox::OnChar) + EVT_KEY_DOWN(MyComboBox::OnKeyDown) + EVT_KEY_UP(MyComboBox::OnKeyUp) + + EVT_SET_FOCUS(MyComboBox::OnFocusGot) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(MyRadioBox, wxRadioBox) + EVT_SET_FOCUS(MyRadioBox::OnFocusGot) + EVT_KILL_FOCUS(MyRadioBox::OnFocusLost) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) : wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) ), m_text(NULL), m_notebook(NULL) @@ -468,11 +598,12 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) wxPanel *panel = new wxPanel(m_notebook); m_listbox = new wxListBox( panel, ID_LISTBOX, - wxPoint(10,10), wxSize(120,70), - 5, choices, wxLB_ALWAYS_SB ); + wxPoint(10,10), wxSize(120,50), + 5, choices, wxLB_MULTIPLE); + m_listbox->SetFirstItem( 1 ); m_listboxSorted = new wxListBox( panel, ID_LISTBOX_SORTED, - wxPoint(10,90), wxSize(120,70), - 5, choices, wxLB_SORT ); + wxPoint(10,90), wxSize(120,50), + 5, choices, wxLB_SORT); SetControlClientData("listbox", m_listbox); SetControlClientData("listbox", m_listboxSorted); @@ -485,9 +616,11 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_lbSelectNum = new wxButton( panel, ID_LISTBOX_SEL_NUM, "Select #&2", wxPoint(180,30), wxSize(140,30) ); m_lbSelectThis = new wxButton( panel, ID_LISTBOX_SEL_STR, "&Select 'This'", wxPoint(340,30), wxSize(140,30) ); (void)new wxButton( panel, ID_LISTBOX_CLEAR, "&Clear", wxPoint(180,80), wxSize(140,30) ); - (void)new wxButton( panel, ID_LISTBOX_APPEND, "&Append 'Hi!'", wxPoint(340,80), wxSize(140,30) ); + (void)new MyButton( panel, ID_LISTBOX_APPEND, "&Append 'Hi!'", wxPoint(340,80), wxSize(140,30) ); (void)new wxButton( panel, ID_LISTBOX_DELETE, "D&elete selected item", wxPoint(180,130), wxSize(140,30) ); - wxButton *button = new wxButton( panel, ID_LISTBOX_FONT, "Set &Italic font", wxPoint(340,130), wxSize(140,30) ); + wxButton *button = new MyButton( panel, ID_LISTBOX_FONT, "Set &Italic font", wxPoint(340,130), wxSize(140,30) ); + (void)new wxButton( panel, ID_LISTBOX_SETFIRST, "#2 SetFirstItem", wxPoint(180,180), wxSize(140,30) ); + (void)new wxButton( panel, ID_LISTBOX_TOGGLE, "Toggle checkbox", wxPoint(340,180), wxSize(140,30) ); button->SetDefault(); @@ -512,10 +645,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1), 5, choices, wxCB_SORT ); -#ifndef __WXMOTIF__ SetControlClientData("choice", m_choice); SetControlClientData("choice", m_choiceSorted); -#endif m_choice->SetSelection(2); m_choice->SetBackgroundColour( "red" ); @@ -532,7 +663,11 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) panel = new wxPanel(m_notebook); (void)new wxStaticBox( panel, -1, "&Box around combobox", wxPoint(5, 5), wxSize(150, 100)); - m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(20,25), wxSize(120,-1), 5, choices, wxCB_READONLY ); + m_combo = new MyComboBox( panel, ID_COMBO, "This", + wxPoint(20,25), wxSize(120, -1), + 5, choices, + /* wxCB_READONLY | */ wxPROCESS_ENTER); + (void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #&2", wxPoint(180,30), wxSize(140,30) ); (void)new wxButton( panel, ID_COMBO_SEL_STR, "&Select 'This'", wxPoint(340,30), wxSize(140,30) ); (void)new wxButton( panel, ID_COMBO_CLEAR, "&Clear", wxPoint(180,80), wxSize(140,30) ); @@ -542,19 +677,28 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) (void)new wxCheckBox( panel, ID_COMBO_ENABLE, "&Disable", wxPoint(20,130), wxSize(140,30) ); m_notebook->AddPage(panel, "wxComboBox", FALSE, Image_Combo); - wxString choices2[] = + static const wxString choices2[] = { "First", "Second", - /* "Third", - "Fourth", "Fifth", "Sixth", - "Seventh", "Eighth", "Nineth", "Tenth" */ + }; + + static const wxString choices10[] = + { + "First", "Second", "Third", "Fourth", "Fifth", + "Sixth", "Seventh", "Eighth", "Nineth", "Tenth" }; panel = new wxPanel(m_notebook); - (void)new wxRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS ); m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS ); + (void)new MyRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS ); + + wxRadioBox *radio2 = new wxRadioBox(panel, -1, "And another one with very very long title", + wxPoint(165, 115), wxDefaultSize, + WXSIZEOF(choices10), choices10, + 3, wxRA_SPECIFY_COLS); #if wxUSE_TOOLTIPS + radio2->SetToolTip("Test tooltip"); m_combo->SetToolTip("This is a natural\ncombobox - can you believe me?"); m_radio->SetToolTip("Ever seen a radiobox?"); #endif // wxUSE_TOOLTIPS @@ -563,15 +707,18 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) (void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "&Select 'This'", wxPoint(180,80), wxSize(140,30) ); m_fontButton = new wxButton( panel, ID_SET_FONT, "Set &more Italic font", wxPoint(340,30), wxSize(140,30) ); (void)new wxButton( panel, ID_RADIOBOX_FONT, "Set &Italic font", wxPoint(340,80), wxSize(140,30) ); - (void)new wxCheckBox( panel, ID_RADIOBOX_ENABLE, "&Disable", wxPoint(340,130), wxDefaultSize ); - wxRadioButton *rb = new wxRadioButton( panel, ID_RADIOBUTTON_1, "Radiobutton1", wxPoint(210,170), wxDefaultSize, wxRB_GROUP ); - rb->SetValue( FALSE ); - (void)new wxRadioButton( panel, ID_RADIOBUTTON_2, "&Radiobutton2", wxPoint(340,170), wxDefaultSize ); + (void)new wxCheckBox( panel, ID_RADIOBOX_ENABLE, "&Disable", wxPoint(400,130), wxDefaultSize ); + wxRadioButton *rb = new wxRadioButton( panel, ID_RADIOBUTTON_1, "Radio&1", + wxPoint(400,170), wxDefaultSize, wxRB_GROUP ); + rb->SetValue( TRUE ); + (void)new wxRadioButton( panel, ID_RADIOBUTTON_2, "Radio&2", wxPoint(460,170), wxDefaultSize ); m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio); panel = new wxPanel(m_notebook); (void)new wxStaticBox( panel, -1, "&wxGauge and wxSlider", wxPoint(10,10), wxSize(200,130) ); - m_gauge = new wxGauge( panel, -1, 200, wxPoint(18,50), wxSize(155, 30) ); + m_gauge = new wxGauge( panel, -1, 200, wxPoint(18,50), wxSize(155, 30), wxGA_HORIZONTAL|wxNO_BORDER ); + m_gauge->SetBackgroundColour(*wxGREEN); + m_gauge->SetForegroundColour(*wxRED); m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1), wxSL_LABELS ); (void)new wxStaticBox( panel, -1, "&Explanation", wxPoint(220,10), wxSize(270,130) ); #ifdef __WXMOTIF__ @@ -603,11 +750,13 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_spinbutton->SetValue(initialSpinValue); m_btnProgress = new wxButton( panel, ID_BTNPROGRESS, "&Show progress dialog", - wxPoint(300, 160) ); + wxPoint(330, 160) ); #endif // wxUSE_SPINBTN #if wxUSE_SPINCTRL - m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, "", wxPoint(200, 160), wxSize(80, -1) ); + (void)new wxButton ( panel, ID_SPINCTRL_VALUE, "SetValue", wxPoint(140,160) ); + + m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, "", wxPoint(240, 160), wxSize(80, -1) ); m_spinctrl->SetRange(10,30); m_spinctrl->SetValue(15); #endif // wxUSE_SPINCTRL @@ -662,7 +811,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) (void)new wxButton(panel, ID_BUTTON_LABEL, "&Toggle label", wxPoint(250, 20)); m_label = new wxStaticText(panel, -1, "Label with some long text", wxPoint(250, 60), wxDefaultSize, - wxALIGN_RIGHT | wxST_NO_AUTORESIZE); + wxALIGN_RIGHT /*| wxST_NO_AUTORESIZE*/); m_label->SetForegroundColour( *wxBLUE ); m_notebook->AddPage(panel, "wxBitmapXXX"); @@ -727,7 +876,7 @@ void MyPanel::OnPageChanging( wxNotebookEvent &event ) "page change from taking place - if you select\n" "[No] the current page will stay the third one\n", "Control sample", - wxICON_QUESTION | wxYES_NO) != wxYES ) + wxICON_QUESTION | wxYES_NO, this) != wxYES ) { event.Veto(); @@ -875,9 +1024,11 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event ) { int idx; idx = m_listbox->GetSelection(); - m_listbox->Delete( idx ); + if ( idx != wxNOT_FOUND ) + m_listbox->Delete( idx ); idx = m_listboxSorted->GetSelection(); - m_listboxSorted->Delete( idx ); + if ( idx != wxNOT_FOUND ) + m_listboxSorted->Delete( idx ); break; } case ID_LISTBOX_FONT: @@ -887,6 +1038,16 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event ) m_checkbox->SetFont( *wxITALIC_FONT ); break; } + case ID_LISTBOX_TOGGLE: + { + m_checkbox->SetValue( !m_checkbox->GetValue() ); + break; + } + case ID_LISTBOX_SETFIRST: + { + m_listbox->SetFirstItem( 2 ); + break; + } } } @@ -958,9 +1119,11 @@ void MyPanel::OnChoiceButtons( wxCommandEvent &event ) case ID_CHOICE_DELETE: { int idx = m_choice->GetSelection(); - m_choice->Delete( idx ); + if ( idx != wxNOT_FOUND ) + m_choice->Delete( idx ); idx = m_choiceSorted->GetSelection(); - m_choiceSorted->Delete( idx ); + if ( idx != wxNOT_FOUND ) + m_choiceSorted->Delete( idx ); break; } case ID_CHOICE_FONT: @@ -982,6 +1145,18 @@ void MyPanel::OnCombo( wxCommandEvent &event ) m_text->AppendText( "\n" ); } +void MyPanel::OnComboTextChanged(wxCommandEvent& WXUNUSED(event)) +{ + wxLogMessage(_T("Text in the combobox changed: now is '%s'."), + m_combo->GetValue().c_str()); +} + +void MyPanel::OnComboTextEnter(wxCommandEvent& WXUNUSED(event)) +{ + wxLogMessage(_T("Enter pressed in the combobox: value is '%s'."), + m_combo->GetValue().c_str()); +} + void MyPanel::OnComboButtons( wxCommandEvent &event ) { switch (event.GetId()) @@ -1070,7 +1245,7 @@ void MyPanel::OnUpdateLabel( wxCommandEvent &WXUNUSED(event) ) static bool s_long = TRUE; s_long = !s_long; - m_label->SetLabel(s_long ? "very very very long text" : "shorter text"); + m_label->SetLabel(s_long ? "Very very very very very long text." : "Shorter text."); } void MyPanel::OnSliderUpdate( wxCommandEvent &WXUNUSED(event) ) @@ -1088,6 +1263,11 @@ void MyPanel::OnSpinCtrl(wxSpinEvent& event) m_text->AppendText(s); } +void MyPanel::OnSpinCtrlSetValue(wxCommandEvent& event) +{ + m_spinctrl->SetValue( 12 ); +} + #endif // wxUSE_SPINCTRL #if wxUSE_SPINBTN @@ -1323,6 +1503,33 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) ) } } +void MyComboBox::OnChar(wxKeyEvent& event) +{ + wxLogMessage(_T("MyComboBox::OnChar")); + + if ( event.KeyCode() == 'w' ) + wxLogMessage(_T("MyComboBox: 'w' will be ignored.")); + else + event.Skip(); +} + +void MyComboBox::OnKeyDown(wxKeyEvent& event) +{ + wxLogMessage(_T("MyComboBox::OnKeyDown")); + + if ( event.KeyCode() == 'w' ) + wxLogMessage(_T("MyComboBox: 'w' will be ignored.")); + else + event.Skip(); +} + +void MyComboBox::OnKeyUp(wxKeyEvent& event) +{ + wxLogMessage(_T("MyComboBox::OnKeyUp")); + + event.Skip(); +} + static void SetControlClientData(const char *name, wxControlWithItems *control) { diff --git a/samples/db/DbVC.dsp b/samples/db/DbVC.dsp new file mode 100644 index 0000000000..1ee1a86312 --- /dev/null +++ b/samples/db/DbVC.dsp @@ -0,0 +1,203 @@ +# Microsoft Developer Studio Project File - Name="DbVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DbVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DbVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DbVC.mak" CFG="DbVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DbVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DbVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DbVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DbVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DbVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dbtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DbVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dbtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DbVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dbtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DbVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dbtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DbVC - Win32 Release" +# Name "DbVC - Win32 Debug" +# Name "DbVC - Win32 Debug DLL" +# Name "DbVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\dbtest.cpp + +!IF "$(CFG)" == "DbVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dbtest.h +# End Source File +# Begin Source File + +SOURCE=.\dbtest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\listdb.cpp + +!IF "$(CFG)" == "DbVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DbVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DbVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\listdb.h +# End Source File +# End Target +# End Project diff --git a/samples/db/DbVC.dsw b/samples/db/DbVC.dsw new file mode 100644 index 0000000000..9d3a571a53 --- /dev/null +++ b/samples/db/DbVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DbVC"=.\DbVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/db/dbtest.cpp b/samples/db/dbtest.cpp index f9cb9c0835..16a1d663fa 100644 --- a/samples/db/dbtest.cpp +++ b/samples/db/dbtest.cpp @@ -16,7 +16,7 @@ donated by the development team at Remstar International. The table this sample is based on is developer contact table, and shows - some of the simple uses of the database classes wxDB and wxTable. + some of the simple uses of the database classes wxDb and wxDbTable. * SYNOPSIS END */ @@ -42,7 +42,7 @@ #include /* Included strictly for reading the text file with the database parameters */ #include /* Required in the file which will get the data source connection */ -#include /* Has the wxTable object from which all data objects will inherit their data table functionality */ +#include /* Has the wxDbTable object from which all data objects will inherit their data table functionality */ extern wxDbList WXDLLEXPORT *PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */ @@ -54,6 +54,10 @@ IMPLEMENT_APP(DatabaseDemoApp) extern char ListDB_Selection[]; /* Used to return the first column value for the selected line from the listDB routines */ extern char ListDB_Selection2[]; /* Used to return the second column value for the selected line from the listDB routines */ +#if !wxUSE_ODBC + #error Sample cannot be compiled unless setup.h has wxUSE_ODBC set to 1 +#endif + DatabaseDemoFrame *DemoFrame; /* Pointer to the main frame */ /* Pointer to the main database connection used in the program. This @@ -61,28 +65,29 @@ DatabaseDemoFrame *DemoFrame; /* Pointer to the main frame */ * for user login names and passwords, getting workstation settings, etc. * ---> IMPORTANT <--- * - * For each database object created which uses this wxDB pointer + * For each database object created which uses this wxDb pointer * connection to the database, when a CommitTrans() or RollBackTrans() - * will commit or rollback EVERY object which uses this wxDB pointer. + * will commit or rollback EVERY object which uses this wxDb pointer. * - * To allow each table object (those derived from wxTable) to be + * To allow each table object (those derived from wxDbTable) to be * individually committed or rolled back, you MUST use a different - * instance of wxDB in the constructor of the table. Doing so creates + * instance of wxDb in the constructor of the table. Doing so creates * more overhead, and will use more database connections (some DBs have * connection limits...), so use connections sparringly. * * It is recommended that one "main" database connection be created for * the entire program to use for READ-ONLY database accesses, but for each * table object which will do a CommitTrans() or RollbackTrans() that a - * new wxDB object be created and used for it. + * new wxDb object be created and used for it. */ -wxDB *READONLY_DB; +wxDb *READONLY_DB; /* * This function will return the exact string(s) from the database engine * indicating all error conditions which have just occured during the - * last call to the database engine. + * last call to the database engine for the database connection pointed + * to by pDb. * * This demo uses the returned string by displaying it in a wxMessageBox. The * formatting therefore is not the greatest, but this is just a demo, not a @@ -91,9 +96,10 @@ wxDB *READONLY_DB; * NOTE: The value returned by this function is for temporary use only and * should be copied for long term use */ -char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine) +const char *GetExtendedDBErrorMsg(wxDb *pDb, char *ErrFile, int ErrLine) { static wxString msg; + msg = ""; wxString tStr; @@ -103,36 +109,30 @@ char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine) msg += ErrFile; msg += " Line: "; tStr.Printf("%d",ErrLine); - msg += tStr.GetData(); + msg += tStr.c_str(); msg += "\n"; } msg.Append ("\nODBC errors:\n"); msg += "\n"; - /* Scan through each database connection displaying - * any ODBC errors that have occured. */ - wxDbList *pDbList; - for (pDbList = PtrBegDbList; pDbList; pDbList = pDbList->PtrNext) + // Display errors for this connection + int i; + for (i = 0; i < DB_MAX_ERROR_HISTORY; i++) { - // Skip over any free connections - if (pDbList->Free) - continue; - // Display errors for this connection - int i; - for (i = 0; i < DB_MAX_ERROR_HISTORY; i++) + if (pDb->errorList[i]) { - if (pDbList->PtrDb->errorList[i]) - { - msg.Append(pDbList->PtrDb->errorList[i]); - if (strcmp(pDbList->PtrDb->errorList[i],"") != 0) - msg.Append("\n"); - } + msg.Append(pDb->errorList[i]); + if (wxStrcmp(pDb->errorList[i],"") != 0) + msg.Append("\n"); + // Clear the errmsg buffer so the next error will not + // end up showing the previous error that have occurred + wxStrcpy(pDb->errorList[i],""); } } msg += "\n"; - return (char*) (const char*) msg; + return msg.c_str(); } // GetExtendedDBErrorMsg @@ -146,7 +146,9 @@ bool DatabaseDemoApp::OnInit() // Make a menubar wxMenu *file_menu = new wxMenu; - file_menu->Append(FILE_CREATE, "&Create contact table"); + file_menu->Append(FILE_CREATE, "&Create CONTACT table"); + file_menu->Append(FILE_RECREATE_TABLE, "&Recreate CONTACT table"); + file_menu->Append(FILE_RECREATE_INDEXES, "&Recreate CONTACT indexes"); file_menu->Append(FILE_EXIT, "E&xit"); wxMenu *edit_menu = new wxMenu; @@ -173,6 +175,9 @@ bool DatabaseDemoApp::OnInit() params.Password[0] = 0; params.DirPath[0] = 0; + // Show the frame + DemoFrame->Show(TRUE); + FILE *paramFile; if ((paramFile = fopen(paramFilename, "r")) == NULL) { @@ -187,37 +192,37 @@ bool DatabaseDemoApp::OnInit() char buffer[1000+1]; fgets(buffer, sizeof(params.ODBCSource), paramFile); - buffer[strlen(buffer)-1] = '\0'; - strcpy(params.ODBCSource,buffer); + buffer[wxStrlen(buffer)-1] = '\0'; + wxStrcpy(params.ODBCSource,buffer); fgets(buffer, sizeof(params.UserName), paramFile); - buffer[strlen(buffer)-1] = '\0'; - strcpy(params.UserName,buffer); + buffer[wxStrlen(buffer)-1] = '\0'; + wxStrcpy(params.UserName,buffer); fgets(buffer, sizeof(params.Password), paramFile); - buffer[strlen(buffer)-1] = '\0'; - strcpy(params.Password,buffer); + buffer[wxStrlen(buffer)-1] = '\0'; + wxStrcpy(params.Password,buffer); fgets(buffer, sizeof(params.DirPath), paramFile); - buffer[strlen(buffer)-1] = '\0'; - strcpy(params.DirPath,buffer); + buffer[wxStrlen(buffer)-1] = '\0'; + wxStrcpy(params.DirPath,buffer); fclose(paramFile); // Connect to datasource - strcpy(DbConnectInf.Dsn, params.ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT) - strcpy(DbConnectInf.Uid, params.UserName); // database username - must already exist in the data source - strcpy(DbConnectInf.AuthStr, params.Password); // password database username - strcpy(DbConnectInf.defaultDir, params.DirPath); // path where the table exists (needed for dBase) + wxStrcpy(DbConnectInf.Dsn, params.ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT) + wxStrcpy(DbConnectInf.Uid, params.UserName); // database username - must already exist in the data source + wxStrcpy(DbConnectInf.AuthStr, params.Password); // password database username + wxStrcpy(DbConnectInf.defaultDir, params.DirPath); // path where the table exists (needed for dBase) READONLY_DB = wxDbGetConnection(&DbConnectInf); if (READONLY_DB == 0) { wxMessageBox("Unable to connect to the data source.\n\nCheck the name of your data source to verify it has been correctly entered/spelled.\n\nWith some databases, the user name and password must\nbe created with full rights to the CONTACT table prior to making a connection\n(using tools provided by the database manufacturer)", "DB CONNECTION ERROR...",wxOK | wxICON_EXCLAMATION); DemoFrame->BuildParameterDialog(NULL); - strcpy(DbConnectInf.Dsn, ""); - strcpy(DbConnectInf.Uid, ""); - strcpy(DbConnectInf.AuthStr, ""); + wxStrcpy(DbConnectInf.Dsn, ""); + wxStrcpy(DbConnectInf.Uid, ""); + wxStrcpy(DbConnectInf.AuthStr, ""); wxMessageBox("Now exiting program.\n\nRestart program to try any new settings.","Notice...",wxOK | wxICON_INFORMATION); return(FALSE); } @@ -225,36 +230,77 @@ bool DatabaseDemoApp::OnInit() DemoFrame->BuildEditorDialog(); // Show the frame - DemoFrame->Show(TRUE); + DemoFrame->Refresh(); return TRUE; } // DatabaseDemoApp::OnInit() + BEGIN_EVENT_TABLE(DatabaseDemoFrame, wxFrame) EVT_MENU(FILE_CREATE, DatabaseDemoFrame::OnCreate) + EVT_MENU(FILE_RECREATE_TABLE, DatabaseDemoFrame::OnRecreateTable) + EVT_MENU(FILE_RECREATE_INDEXES, DatabaseDemoFrame::OnRecreateIndexes) EVT_MENU(FILE_EXIT, DatabaseDemoFrame::OnExit) EVT_MENU(EDIT_PARAMETERS, DatabaseDemoFrame::OnEditParameters) EVT_MENU(ABOUT_DEMO, DatabaseDemoFrame::OnAbout) EVT_CLOSE(DatabaseDemoFrame::OnCloseWindow) END_EVENT_TABLE() + // DatabaseDemoFrame constructor DatabaseDemoFrame::DatabaseDemoFrame(wxFrame *frame, const wxString& title, - const wxPoint& pos, const wxSize& size): - wxFrame(frame, -1, title, pos, size) + const wxPoint& pos, const wxSize& size): + wxFrame(frame, -1, title, pos, size) { -// Put any code in necessary for initializing the main frame here -} + // Put any code in necessary for initializing the main frame here + pEditorDlg = NULL; + pParamDlg = NULL; +} // DatabaseDemoFrame constructor + void DatabaseDemoFrame::OnCreate(wxCommandEvent& event) { - CreateDataTable(); -} + CreateDataTable(FALSE); +} // DatabaseDemoFrame::OnCreate() + + +void DatabaseDemoFrame::OnRecreateTable(wxCommandEvent& event) +{ + CreateDataTable(TRUE); +} // DatabaseDemoFrame::OnRecreate() + + +void DatabaseDemoFrame::OnRecreateIndexes(wxCommandEvent& event) +{ + // Using a new connection to the database so as not to disturb + // the current cursors on the table in use in the editor dialog + Ccontact *Contact = new Ccontact(); + + if (!Contact) + { + wxEndBusyCursor(); + wxMessageBox("Error allocating memory for 'Ccontact'object.\n\nTable could not be opened.","Error...",wxOK | wxICON_EXCLAMATION); + return; + } + + if (!Contact->CreateIndexes()) + { + wxEndBusyCursor(); + wxString tStr; + tStr = "Error creating CONTACTS indexes.\nNew indexes will be unavailable.\n\n"; + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); + wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); + } + + delete Contact; + Contact = NULL; +} // DatabaseDemoFrame::OnRecreateIndexes() void DatabaseDemoFrame::OnExit(wxCommandEvent& event) { Close(); -} +} // DatabaseDemoFrame::OnExit() + void DatabaseDemoFrame::OnEditParameters(wxCommandEvent& event) { @@ -262,12 +308,14 @@ void DatabaseDemoFrame::OnEditParameters(wxCommandEvent& event) BuildParameterDialog(this); else wxMessageBox("Cannot change database parameters while creating or editing a record","Notice...",wxOK | wxICON_INFORMATION); -} +} // DatabaseDemoFrame::OnEditParameters() + void DatabaseDemoFrame::OnAbout(wxCommandEvent& event) { wxMessageBox("wxWindows sample program for database classes\n\nContributed on 27 July 1998","About...",wxOK | wxICON_INFORMATION); -} +} // DatabaseDemoFrame::OnAbout() + void DatabaseDemoFrame::OnCloseWindow(wxCloseEvent& event) { @@ -275,19 +323,34 @@ void DatabaseDemoFrame::OnCloseWindow(wxCloseEvent& event) // to close the program here that is not done elsewhere // Clean up time - if (pEditorDlg->Close()) + if (pEditorDlg && pEditorDlg->Close()) pEditorDlg = NULL; else - event.Veto(); + { + if (pEditorDlg) + { + event.Veto(); + return; + } + } + + // This function will close all the connections to the database that have been + // previously cached. + wxDbCloseConnections(); + + // Cleans up the environment space allocated for the SQL/ODBC connection handle + SQLFreeEnv(DbConnectInf.Henv); this->Destroy(); } // DatabaseDemoFrame::OnCloseWindow() -void DatabaseDemoFrame::CreateDataTable() +void DatabaseDemoFrame::CreateDataTable(bool recreate) { - bool Ok = (wxMessageBox("Any data currently residing in the table will be erased.\n\nAre you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); + bool Ok = TRUE; + if (recreate) + Ok = (wxMessageBox("Any data currently residing in the table will be erased.\n\nAre you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); if (!Ok) return; @@ -304,23 +367,23 @@ void DatabaseDemoFrame::CreateDataTable() return; } - if (!Contact->CreateTable(FALSE)) + if (!Contact->CreateTable(recreate)) { wxEndBusyCursor(); wxString tStr; tStr = "Error creating CONTACTS table.\nTable was not created.\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); success = FALSE; } - else + else { if (!Contact->CreateIndexes()) { wxEndBusyCursor(); wxString tStr; tStr = "Error creating CONTACTS indexes.\nIndexes will be unavailable.\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); success = FALSE; } @@ -329,6 +392,7 @@ void DatabaseDemoFrame::CreateDataTable() wxEndBusyCursor(); delete Contact; + Contact = NULL; if (success) wxMessageBox("Table and index(es) were successfully created.","Notice...",wxOK | wxICON_INFORMATION); @@ -337,9 +401,24 @@ void DatabaseDemoFrame::CreateDataTable() void DatabaseDemoFrame::BuildEditorDialog() { + pEditorDlg = NULL; pEditorDlg = new CeditorDlg(this); - if (!pEditorDlg) + if (pEditorDlg) + { + pEditorDlg->Initialize(); + if (!pEditorDlg->initialized) + { + pEditorDlg->Close(); + delete pEditorDlg; + wxMessageBox("Unable to initialize the editor dialog for some reason","Error...",wxOK | wxICON_EXCLAMATION); + DemoFrame->Close(); + } + } + else + { wxMessageBox("Unable to create the editor dialog for some reason","Error...",wxOK | wxICON_EXCLAMATION); + DemoFrame->Close(); + } } // DatabaseDemoFrame::BuildEditorDialog() @@ -353,24 +432,24 @@ void DatabaseDemoFrame::BuildParameterDialog(wxWindow *parent) /* - * Constructor note: If no wxDB object is passed in, a new connection to the database + * Constructor note: If no wxDb object is passed in, a new connection to the database * is created for this instance of Ccontact. This can be a slow process depending * on the database engine being used, and some database engines have a limit on the * number of connections (either hard limits, or license restricted) so care should * be used to use as few connections as is necessary. * - * IMPORTANT: Objects which share a wxDB pointer are ALL acted upon whenever a member + * IMPORTANT: Objects which share a wxDb pointer are ALL acted upon whenever a member * function of pDb is called (i.e. CommitTrans() or RollbackTrans(), so if modifying * or creating a table objects which use the same pDb, know that all the objects * will be committed or rolled back when any of the objects has this function call made. */ -Ccontact::Ccontact (wxDB *pwxDB) : wxTable(pwxDB ? pwxDB : wxDbGetConnection(&DbConnectInf),CONTACT_TABLE_NAME,CONTACT_NO_COLS,NULL,!QUERY_ONLY,DbConnectInf.defaultDir) +Ccontact::Ccontact (wxDb *pwxDb) : wxDbTable(pwxDb ? pwxDb : wxDbGetConnection(&DbConnectInf),CONTACT_TABLE_NAME,CONTACT_NO_COLS,NULL,!wxDB_QUERY_ONLY,DbConnectInf.defaultDir) { // This is used to represent whether the database connection should be released // when this instance of the object is deleted. If using the same connection // for multiple instance of database objects, then the connection should only be // released when the last database instance using the connection is deleted - freeDbConn = !pwxDB; + freeDbConn = !pwxDb; SetupColumns(); @@ -404,11 +483,11 @@ Ccontact::~Ccontact() { if (freeDbConn) { - if (!wxDbFreeConnection(pDb)) + if (!wxDbFreeConnection(GetDb())) { wxString tStr; tStr = "Unable to Free the Ccontact data table handle\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); } } @@ -416,7 +495,7 @@ Ccontact::~Ccontact() /* - * Handles setting up all the connections for the interface from the wxTable + * Handles setting up all the connections for the interface from the wxDbTable * functions to interface to the data structure used to store records in * memory, and for all the column definitions that define the table structure */ @@ -444,19 +523,19 @@ bool Ccontact::CreateIndexes(void) // This index could easily be accomplished with an "orderBy" clause, // but is done to show how to construct a non-primary index. wxString indexName; - CidxDef idxDef[2]; + wxDbIdxDef idxDef[2]; bool Ok = TRUE; - strcpy(idxDef[0].ColName, "IS_DEV"); + wxStrcpy(idxDef[0].ColName, "IS_DEV"); idxDef[0].Ascending = TRUE; - strcpy(idxDef[1].ColName, "NAME"); + wxStrcpy(idxDef[1].ColName, "NAME"); idxDef[1].Ascending = TRUE; - indexName = CONTACT_TABLE_NAME; + indexName = GetTableName(); indexName += "_IDX1"; - Ok = CreateIndex((char*) (const char*) indexName, TRUE, 2, idxDef); + Ok = CreateIndex(indexName.c_str(), TRUE, 2, idxDef); return Ok; } // Ccontact::CreateIndexes() @@ -470,8 +549,8 @@ bool Ccontact::CreateIndexes(void) bool Ccontact::FetchByName(char *name) { whereStr.Printf("NAME = '%s'",name); - where = (char*) (const char*) this->whereStr; - orderBy = 0; + SetWhereClause(whereStr.c_str()); + SetOrderByClause(""); if (!Query()) return(FALSE); @@ -503,13 +582,311 @@ BEGIN_EVENT_TABLE(CeditorDlg, wxPanel) EVT_CLOSE(CeditorDlg::OnCloseWindow) END_EVENT_TABLE() -CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455) +CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 0, 0, 537, 480) { // Since the ::OnCommand() function is overridden, this prevents the widget // detection in ::OnCommand() until all widgets have been initialized to prevent // uninitialized pointers from crashing the program widgetPtrsSet = FALSE; + initialized = FALSE; + + Contact = NULL; + + Show(FALSE); +} // CeditorDlg constructor + + +void CeditorDlg::OnCloseWindow(wxCloseEvent& event) +{ + // Clean up time + if ((mode != mCreate) && (mode != mEdit)) + { + if (Contact) + { + delete Contact; + Contact = NULL; + } + this->Destroy(); + } + else + { + wxMessageBox("Must finish processing the current record being created/modified before exiting","Notice...",wxOK | wxICON_INFORMATION); + event.Veto(); + } +} // CeditorDlg::OnCloseWindow() + + +void CeditorDlg::OnButton(wxCommandEvent &event) +{ + wxWindow *win = (wxWindow*) event.GetEventObject(); + OnCommand( *win, event ); +} // CeditorDlg::OnButton() + + +void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& event) +{ + wxString widgetName; + + widgetName = win.GetName(); + + if (!widgetPtrsSet) + return; + + if (widgetName == pCreateBtn->GetName()) + { + Contact->Initialize(); + PutData(); + SetMode( mCreate ); + pNameTxt->SetValue(""); + pNameTxt->SetFocus(); + return; + } + + if (widgetName == pEditBtn->GetName()) + { + saveName = Contact->Name; + SetMode( mEdit ); + pNameTxt->SetFocus(); + return; + } + + if (widgetName == pCopyBtn->GetName()) + { + SetMode(mCreate); + pNameTxt->SetValue(""); + pNameTxt->SetFocus(); + + return; + } + + if (widgetName == pDeleteBtn->GetName()) + { + bool Ok = (wxMessageBox("Are you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); + + if (!Ok) + return; + + if (Ok && Contact->Delete()) + { + // NOTE: Deletions are not finalized until a CommitTrans() is performed. + // If the commit were not performed, the program will continue to + // show the table contents as if they were deleted until this instance + // of Ccontact is deleted. If the Commit wasn't performed, the + // database will automatically Rollback the changes when the database + // connection is terminated + Contact->GetDb()->CommitTrans(); + + // Try to get the row that followed the just deleted row in the orderBy sequence + if (!GetNextRec()) + { + // There was now row (in sequence) after the just deleted row, so get the + // row which preceded the just deleted row + if (!GetPrevRec()) + { + // There are now no rows remaining, so clear the dialog widgets + Contact->Initialize(); + PutData(); + } + } + SetMode(mode); // force reset of button enable/disable + } + else + // Delete failed + Contact->GetDb()->RollbackTrans(); + + SetMode(mView); + return; + } + + if (widgetName == pSaveBtn->GetName()) + { + Save(); + return; + } + + if (widgetName == pCancelBtn->GetName()) + { + bool Ok = (wxMessageBox("Are you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); + + if (!Ok) + return; + + if (!wxStrcmp((const char*) saveName,"")) + { + Contact->Initialize(); + PutData(); + SetMode(mView); + return; + } + else + { + // Requery previous record + if (Contact->FetchByName((char*) (const char*) saveName)) + { + PutData(); + SetMode(mView); + return; + } + } + + // Previous record not available, retrieve first record in table + if (Contact->GetDb()->Dbms() != dbmsPOSTGRES && Contact->GetDb()->Dbms() != dbmsMY_SQL) + { + Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; + Contact->whereStr += Contact->GetTableName(); + Contact->whereStr += ")"; + Contact->SetWhereClause(Contact->whereStr.c_str()); + } + else + Contact->SetWhereClause(""); + + if (!Contact->Query()) + { + wxString tStr; + tStr = "ODBC error during Query()\n\n"; + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); + wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); + SetMode(mView); + return; + } + if (Contact->GetNext()) // Successfully read first record + { + PutData(); + SetMode(mView); + return; + } + // No contacts are available, clear dialog + Contact->Initialize(); + PutData(); + SetMode(mView); + return; + } // Cancel Button + + if (widgetName == pPrevBtn->GetName()) + { + if (!GetPrevRec()) + wxBell(); + return; + } // Prev Button + + if (widgetName == pNextBtn->GetName()) + { + if (!GetNextRec()) + wxBell(); + return; + } // Next Button + + if (widgetName == pQueryBtn->GetName()) + { + // Display the query dialog box + char qryWhere[DB_MAX_WHERE_CLAUSE_LEN+1]; + wxStrcpy(qryWhere, (const char*) Contact->qryWhereStr); + char *tblName[] = {(char *)CONTACT_TABLE_NAME, 0}; + new CqueryDlg(GetParent(), Contact->GetDb(), tblName, qryWhere); + + // Query the first record in the new record set and + // display it, if the query string has changed. + if (wxStrcmp(qryWhere, (const char*) Contact->qryWhereStr)) + { + Contact->whereStr = ""; + Contact->SetOrderByClause("NAME"); + + if (Contact->GetDb()->Dbms() != dbmsPOSTGRES && Contact->GetDb()->Dbms() != dbmsMY_SQL) + { + Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; + Contact->whereStr += CONTACT_TABLE_NAME; + } + + // Append the query where string (if there is one) + Contact->qryWhereStr = qryWhere; + if (wxStrlen(qryWhere)) + { + Contact->whereStr += " WHERE "; + Contact->whereStr += Contact->qryWhereStr; + } + // Close the expression with a right paren + Contact->whereStr += ")"; + // Requery the table + Contact->SetWhereClause(Contact->whereStr.c_str()); + if (!Contact->Query()) + { + wxString tStr; + tStr = "ODBC error during Query()\n\n"; + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); + wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); + return; + } + // Display the first record from the query set + if (!Contact->GetNext()) + Contact->Initialize(); + PutData(); + } + + // Enable/Disable the reset button + pResetBtn->Enable(!Contact->qryWhereStr.IsEmpty()); + + return; + } // Query button + + + if (widgetName == pResetBtn->GetName()) + { + // Clear the additional where criteria established by the query feature + Contact->qryWhereStr = ""; + Contact->SetOrderByClause("NAME"); + + if (Contact->GetDb()->Dbms() != dbmsPOSTGRES && Contact->GetDb()->Dbms() != dbmsMY_SQL) + { + Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; + Contact->whereStr += CONTACT_TABLE_NAME; + Contact->whereStr += ")"; + } + + Contact->SetWhereClause(Contact->whereStr.c_str()); + if (!Contact->Query()) + { + wxString tStr; + tStr = "ODBC error during Query()\n\n"; + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); + wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); + return; + } + if (!Contact->GetNext()) + Contact->Initialize(); + PutData(); + pResetBtn->Enable(FALSE); + + return; + } // Reset button + + + if (widgetName == pNameListBtn->GetName()) + { + new ClookUpDlg(/* wxWindow *parent */ this, + /* char *windowTitle */ "Select contact name", + /* char *tableName */ (char *) CONTACT_TABLE_NAME, + /* char *dispCol1 */ "NAME", + /* char *dispCol2 */ "JOINDATE", + /* char *where */ "", + /* char *orderBy */ "NAME", + /* bool distinctValues */ TRUE); + + if (ListDB_Selection && wxStrlen(ListDB_Selection)) + { + wxString w = "NAME = '"; + w += ListDB_Selection; + w += "'"; + GetRec((char*) (const char*) w); + } + + return; + } +} // CeditorDlg::OnCommand() + + +bool CeditorDlg::Initialize() +{ // Create the data structure and a new database connection. // (As there is not a pDb being passed in the constructor, a new database // connection is created) @@ -518,48 +895,58 @@ CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455) if (!Contact) { wxMessageBox("Unable to instantiate an instance of Ccontact","Error...",wxOK | wxICON_EXCLAMATION); - return; + return FALSE; } // Check if the table exists or not. If it doesn't, ask the user if they want to // create the table. Continue trying to create the table until it exists, or user aborts - while (!Contact->pDb->TableExists((char *)CONTACT_TABLE_NAME,DbConnectInf.Uid,DbConnectInf.defaultDir)) + while (!Contact->GetDb()->TableExists((char *)CONTACT_TABLE_NAME,DbConnectInf.Uid,DbConnectInf.defaultDir)) { wxString tStr; tStr.Printf("Unable to open the table '%s'.\n\nTable may need to be created...?\n\n",CONTACT_TABLE_NAME); - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); bool createTable = (wxMessageBox("Do you wish to try to create/clear the CONTACTS table?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); if (!createTable) { - delete Contact; - Close(); - DemoFrame->Close(); - return; +// Close(); + return FALSE; } else - DemoFrame->CreateDataTable(); + DemoFrame->CreateDataTable(TRUE); } // Tables must be "opened" before anything other than creating/deleting table can be done if (!Contact->Open()) { - // Table does exist, there was some problem opening it. Currently this should - // never fail, except in the case of the table not exisiting. Open() basically - // only sets up variable/pointer values, other than checking for table existence. - if (Contact->pDb->TableExists((char *)CONTACT_TABLE_NAME)) + // Table does exist, or there was some problem opening it. Currently this should + // never fail, except in the case of the table not exisiting or the current + // user has insufficent privileges to access the table +#if 0 +// This code is experimenting with a new function that will hopefully be available +// in the 2.4 release. This check will determine whether the open failing was due +// to the table not existing, or the users privileges being insufficient to +// open the table. + if (!Contact->GetDb()->TablePrivileges(CONTACT_TABLE_NAME,"SELECT",Contact->GetDb()->GetUsername(),DbConnectInf.defaultDir)) { wxString tStr; tStr.Printf("Unable to open the table '%s'.\n\n",CONTACT_TABLE_NAME); - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); - delete Contact; - Close(); - DemoFrame->Close(); - return; } + else +#endif + if (Contact->GetDb()->TableExists(CONTACT_TABLE_NAME,Contact->GetDb()->GetUsername(),DbConnectInf.defaultDir)) + { + wxString tStr; + tStr.Printf("Unable to open the table '%s'.\n\n",CONTACT_TABLE_NAME); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); + wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); + } + + return FALSE; } // Build the dialog @@ -622,24 +1009,24 @@ CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455) // as there will only be one record being shown on the dialog at a time, this optimizes // network traffic by only returning a one row result - Contact->orderBy = "NAME"; // field name to sort by + Contact->SetOrderByClause("NAME"); // field name to sort by - // The wxString "whereStr" is not a member of the wxTable object, it is a member variable + // The wxString "whereStr" is not a member of the wxDbTable object, it is a member variable // specifically in the Ccontact class. It is used here for simpler construction of a varying - // length string, and then after the string is built, the wxTable member variable "where" is + // length string, and then after the string is built, the wxDbTable member variable "where" is // assigned the pointer to the constructed string. // // The constructed where clause below has a sub-query within it "SELECT MIN(NAME) FROM %s" // to achieve a single row (in this case the first name in alphabetical order). - if (Contact->pDb->Dbms() != dbmsPOSTGRES) + if (Contact->GetDb()->Dbms() != dbmsPOSTGRES && Contact->GetDb()->Dbms() != dbmsMY_SQL) { - Contact->whereStr.sprintf("NAME = (SELECT MIN(NAME) FROM %s)",Contact->tableName); + Contact->whereStr.sprintf("NAME = (SELECT MIN(NAME) FROM %s)",Contact->GetTableName()); // NOTE: (const char*) returns a pointer which may not be valid later, so this is short term use only - Contact->where = (char*) (const char*) Contact->whereStr; + Contact->SetWhereClause(Contact->whereStr.c_str()); } else - Contact->where = 0; + Contact->SetWhereClause(""); // Perform the Query to get the result set. // NOTE: If there are no rows returned, that is a valid result, so Query() would return TRUE. @@ -648,10 +1035,10 @@ CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455) { wxString tStr; tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); - GetParent()->Close(); - return; +// GetParent()->Close(); + return FALSE; } // Since Query succeeded, now get the row that was returned @@ -665,294 +1052,10 @@ CeditorDlg::CeditorDlg(wxWindow *parent) : wxPanel (parent, 1, 1, 460, 455) PutData(); Show(TRUE); -} // CeditorDlg constructor - -void CeditorDlg::OnCloseWindow(wxCloseEvent& event) -{ - // Clean up time - if ((mode != mCreate) && (mode != mEdit)) - { - if (Contact) - delete Contact; - this->Destroy(); - } - else - { - wxMessageBox("Must finish processing the current record being created/modified before exiting","Notice...",wxOK | wxICON_INFORMATION); - event.Veto(); - } -} // CeditorDlg::OnCloseWindow() - - -void CeditorDlg::OnButton( wxCommandEvent &event ) -{ - wxWindow *win = (wxWindow*) event.GetEventObject(); - OnCommand( *win, event ); -} - - -void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - wxString widgetName; - - widgetName = win.GetName(); - - if (!widgetPtrsSet) - return; - - if (widgetName == pCreateBtn->GetName()) - { - Contact->Initialize(); - PutData(); - SetMode( mCreate ); - pNameTxt->SetValue(""); - pNameTxt->SetFocus(); - return; - } - - if (widgetName == pEditBtn->GetName()) - { - saveName = Contact->Name; - SetMode( mEdit ); - pNameTxt->SetFocus(); - return; - } - - if (widgetName == pCopyBtn->GetName()) - { - SetMode(mCreate); - pNameTxt->SetValue(""); - pNameTxt->SetFocus(); - - return; - } - - if (widgetName == pDeleteBtn->GetName()) - { - bool Ok = (wxMessageBox("Are you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (!Ok) - return; - - if (Ok && Contact->Delete()) - { - // NOTE: Deletions are not finalized until a CommitTrans() is performed. - // If the commit were not performed, the program will continue to - // show the table contents as if they were deleted until this instance - // of Ccontact is deleted. If the Commit wasn't performed, the - // database will automatically Rollback the changes when the database - // connection is terminated - Contact->pDb->CommitTrans(); - - // Try to get the row that followed the just deleted row in the orderBy sequence - if (!GetNextRec()) - { - // There was now row (in sequence) after the just deleted row, so get the - // row which preceded the just deleted row - if (!GetPrevRec()) - { - // There are now no rows remaining, so clear the dialog widgets - Contact->Initialize(); - PutData(); - } - } - SetMode(mode); // force reset of button enable/disable - } - else - // Delete failed - Contact->pDb->RollbackTrans(); - - SetMode(mView); - return; - } - - if (widgetName == pSaveBtn->GetName()) - { - Save(); - return; - } - - if (widgetName == pCancelBtn->GetName()) - { - bool Ok = (wxMessageBox("Are you sure?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - - if (!Ok) - return; - - if (!strcmp((const char*) saveName,"")) - { - Contact->Initialize(); - PutData(); - SetMode(mView); - return; - } - else - { - // Requery previous record - if (Contact->FetchByName((char*) (const char*) saveName)) - { - PutData(); - SetMode(mView); - return; - } - } - - // Previous record not available, retrieve first record in table - if (Contact->pDb->Dbms() != dbmsPOSTGRES) - { - Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; - Contact->whereStr += Contact->tableName; - Contact->whereStr += ")"; - Contact->where = (char*) (const char*) Contact->whereStr; - } - else - Contact->where = 0; - - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); - SetMode(mView); - return; - } - if (Contact->GetNext()) // Successfully read first record - { - PutData(); - SetMode(mView); - return; - } - // No contacts are available, clear dialog - Contact->Initialize(); - PutData(); - SetMode(mView); - return; - } // Cancel Button - - if (widgetName == pPrevBtn->GetName()) - { - if (!GetPrevRec()) - wxBell(); - return; - } // Prev Button - - if (widgetName == pNextBtn->GetName()) - { - if (!GetNextRec()) - wxBell(); - return; - } // Next Button - - if (widgetName == pQueryBtn->GetName()) - { - // Display the query dialog box - char qryWhere[DB_MAX_WHERE_CLAUSE_LEN+1]; - strcpy(qryWhere, (const char*) Contact->qryWhereStr); - char *tblName[] = {(char *)CONTACT_TABLE_NAME, 0}; - new CqueryDlg(GetParent(), Contact->pDb, tblName, qryWhere); - - // Query the first record in the new record set and - // display it, if the query string has changed. - if (strcmp(qryWhere, (const char*) Contact->qryWhereStr)) - { - - Contact->whereStr = ""; - Contact->orderBy = "NAME"; - - if (Contact->pDb->Dbms() != dbmsPOSTGRES) - { - Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; - Contact->whereStr += CONTACT_TABLE_NAME; - } - - // Append the query where string (if there is one) - Contact->qryWhereStr = qryWhere; - if (strlen(qryWhere)) - { - Contact->whereStr += " WHERE "; - Contact->whereStr += Contact->qryWhereStr; - } - // Close the expression with a right paren - Contact->whereStr += ")"; - // Requery the table - Contact->where = (char*) (const char*) Contact->whereStr; - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); - return; - } - // Display the first record from the query set - if (!Contact->GetNext()) - Contact->Initialize(); - PutData(); - } - - // Enable/Disable the reset button - pResetBtn->Enable(!Contact->qryWhereStr.IsEmpty()); - - return; - } // Query button - - - if (widgetName == pResetBtn->GetName()) - { - // Clear the additional where criteria established by the query feature - Contact->qryWhereStr = ""; - Contact->orderBy = "NAME"; - - if (Contact->pDb->Dbms() != dbmsPOSTGRES) - { - Contact->whereStr = "NAME = (SELECT MIN(NAME) FROM "; - Contact->whereStr += CONTACT_TABLE_NAME; - Contact->whereStr += ")"; - } - - Contact->where = (char*) (const char*) Contact->whereStr; - if (!Contact->Query()) - { - wxString tStr; - tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); - wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); - return; - } - if (!Contact->GetNext()) - Contact->Initialize(); - PutData(); - pResetBtn->Enable(FALSE); - - return; - } // Reset button - - - if (widgetName == pNameListBtn->GetName()) - { - new ClookUpDlg(/* wxWindow *parent */ this, - /* char *windowTitle */ "Select contact name", - /* char *tableName */ (char *) CONTACT_TABLE_NAME, - /* char *dispCol1 */ "NAME", - /* char *dispCol2 */ "JOINDATE", - /* char *where */ "", - /* char *orderBy */ "NAME", - /* bool distinctValues */ TRUE); - - if (ListDB_Selection && strlen(ListDB_Selection)) - { - wxString w = "NAME = '"; - w += ListDB_Selection; - w += "'"; - GetRec((char*) (const char*) w); - } - - return; - } - -} // CeditorDlg::OnCommand() + initialized = TRUE; + return TRUE; +} // CeditorDlg::Initialize() void CeditorDlg::FieldsEditable() @@ -976,7 +1079,7 @@ void CeditorDlg::FieldsEditable() void CeditorDlg::SetMode(enum DialogModes m) { - bool edit = FALSE; + bool edit = FALSE; mode = m; switch (mode) @@ -996,9 +1099,9 @@ void CeditorDlg::SetMode(enum DialogModes m) if (widgetPtrsSet) { pCreateBtn->Enable( !edit ); - pEditBtn->Enable( !edit && (strcmp(Contact->Name,"")!=0) ); - pDeleteBtn->Enable( !edit && (strcmp(Contact->Name,"")!=0) ); - pCopyBtn->Enable( !edit && (strcmp(Contact->Name,"")!=0) ); + pEditBtn->Enable( !edit && (wxStrcmp(Contact->Name,"")!=0) ); + pDeleteBtn->Enable( !edit && (wxStrcmp(Contact->Name,"")!=0) ); + pCopyBtn->Enable( !edit && (wxStrcmp(Contact->Name,"")!=0) ); pSaveBtn->Enable( edit ); pCancelBtn->Enable( edit ); pPrevBtn->Enable( !edit ); @@ -1055,7 +1158,7 @@ bool CeditorDlg::GetData() wxString tStr; tStr = pNameTxt->GetValue(); - if (!strcmp((const char*) tStr,"")) + if (!wxStrcmp((const char*) tStr,"")) { wxMessageBox("A name is required for entry into the contact table","Notice...",wxOK | wxICON_INFORMATION); return FALSE; @@ -1127,13 +1230,13 @@ bool CeditorDlg::GetData() } tStr = pNameTxt->GetValue(); - strcpy(Contact->Name,(const char*) tStr); - strcpy(Contact->Addr1,pAddress1Txt->GetValue()); - strcpy(Contact->Addr2,pAddress2Txt->GetValue()); - strcpy(Contact->City,pCityTxt->GetValue()); - strcpy(Contact->State,pStateTxt->GetValue()); - strcpy(Contact->Country,pCountryTxt->GetValue()); - strcpy(Contact->PostalCode,pPostalCodeTxt->GetValue()); + wxStrcpy(Contact->Name,(const char*) tStr); + wxStrcpy(Contact->Addr1,pAddress1Txt->GetValue()); + wxStrcpy(Contact->Addr2,pAddress2Txt->GetValue()); + wxStrcpy(Contact->City,pCityTxt->GetValue()); + wxStrcpy(Contact->State,pStateTxt->GetValue()); + wxStrcpy(Contact->Country,pCountryTxt->GetValue()); + wxStrcpy(Contact->PostalCode,pPostalCodeTxt->GetValue()); Contact->Contributions = atoi(pContribTxt->GetValue()); Contact->LinesOfCode = atol(pLinesTxt->GetValue()); @@ -1180,7 +1283,7 @@ bool CeditorDlg::Save() { wxString tStr; tStr = "A duplicate key value already exists in the table.\nUnable to save record\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); } else @@ -1188,7 +1291,7 @@ bool CeditorDlg::Save() // Some other unexpexted error occurred wxString tStr; tStr = "Database insert failed\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); } } @@ -1199,7 +1302,7 @@ bool CeditorDlg::Save() { wxString tStr; tStr = "Database update failed\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); failed = TRUE; } @@ -1207,11 +1310,11 @@ bool CeditorDlg::Save() if (!failed) { - Contact->pDb->CommitTrans(); + Contact->GetDb()->CommitTrans(); SetMode(mView); // Sets the dialog mode back to viewing after save is successful } else - Contact->pDb->RollbackTrans(); + Contact->GetDb()->RollbackTrans(); wxEndBusyCursor(); } @@ -1229,10 +1332,10 @@ bool CeditorDlg::GetNextRec() { wxString w; - if (Contact->pDb->Dbms() != dbmsPOSTGRES) + if (Contact->GetDb()->Dbms() != dbmsPOSTGRES && Contact->GetDb()->Dbms() != dbmsMY_SQL) { w = "NAME = (SELECT MIN(NAME) FROM "; - w += Contact->tableName; + w += Contact->GetTableName(); w += " WHERE NAME > '"; } else @@ -1264,10 +1367,10 @@ bool CeditorDlg::GetPrevRec() { wxString w; - if (Contact->pDb->Dbms() != dbmsPOSTGRES) + if (Contact->GetDb()->Dbms() != dbmsPOSTGRES && Contact->GetDb()->Dbms() != dbmsMY_SQL) { w = "NAME = (SELECT MAX(NAME) FROM "; - w += Contact->tableName; + w += Contact->GetTableName(); w += " WHERE NAME < '"; } else @@ -1297,14 +1400,14 @@ bool CeditorDlg::GetPrevRec() */ bool CeditorDlg::GetRec(char *whereStr) { - Contact->where = whereStr; - Contact->orderBy = "NAME"; + Contact->SetWhereClause(whereStr); + Contact->SetOrderByClause("NAME"); if (!Contact->Query()) { wxString tStr; tStr = "ODBC error during Query()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(Contact->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); return(FALSE); @@ -1369,21 +1472,27 @@ void CparameterDlg::OnCloseWindow(wxCloseEvent& event) if (!saved) { bool Ok = (wxMessageBox("No changes have been saved.\n\nAre you sure you wish exit the parameter screen?","Confirm",wxYES_NO|wxICON_QUESTION) == wxYES); - + if (!Ok) { event.Veto(); return; } - + wxGetApp().params = savedParamSettings; } if (GetParent() != NULL) GetParent()->SetFocus(); - this->Destroy(); -} // Cparameter::OnCloseWindow() + while (wxIsBusy()) + wxEndBusyCursor(); + + Show(FALSE); + SetReturnCode(0); // added so BoundsChecker would not report use of uninitialized variable + + this->Destroy(); +} // CparameterDlg::OnCloseWindow() void CparameterDlg::OnButton( wxCommandEvent &event ) @@ -1392,6 +1501,7 @@ void CparameterDlg::OnButton( wxCommandEvent &event ) OnCommand( *win, event ); } + void CparameterDlg::OnCommand(wxWindow& win, wxCommandEvent& event) { wxString widgetName; @@ -1452,7 +1562,7 @@ bool CparameterDlg::GetData() wxMessageBox(errmsg,"Internal program error...",wxOK | wxICON_EXCLAMATION); return FALSE; } - strcpy(wxGetApp().params.ODBCSource, tStr); + wxStrcpy(wxGetApp().params.ODBCSource, tStr); } else return FALSE; @@ -1465,7 +1575,7 @@ bool CparameterDlg::GetData() wxMessageBox(errmsg,"Internal program error...",wxOK | wxICON_EXCLAMATION); return FALSE; } - strcpy(wxGetApp().params.UserName, tStr); + wxStrcpy(wxGetApp().params.UserName, tStr); tStr = pParamPasswordTxt->GetValue(); if (tStr.Length() > (sizeof(wxGetApp().params.Password)-1)) @@ -1475,7 +1585,7 @@ bool CparameterDlg::GetData() wxMessageBox(errmsg,"Internal program error...",wxOK | wxICON_EXCLAMATION); return FALSE; } - strcpy(wxGetApp().params.Password,tStr); + wxStrcpy(wxGetApp().params.Password,tStr); tStr = pParamDirPathTxt->GetValue(); tStr.Replace("\\","/"); @@ -1486,7 +1596,7 @@ bool CparameterDlg::GetData() wxMessageBox(errmsg,"Internal program error...",wxOK | wxICON_EXCLAMATION); return FALSE; } - strcpy(wxGetApp().params.DirPath,tStr); + wxStrcpy(wxGetApp().params.DirPath,tStr); return TRUE; } // CparameterDlg::GetData() @@ -1537,8 +1647,10 @@ void CparameterDlg::FillDataSourceList() char **p = strList.ListToArray(); int i; - for (i = 0; strlen(p[i]); i++) + for (i = 0; wxStrlen(p[i]); i++) pParamODBCSourceList->Append(p[i]); + + delete [] p; } // CparameterDlg::CparameterDlg::FillDataSourceList() @@ -1546,9 +1658,10 @@ BEGIN_EVENT_TABLE(CqueryDlg, wxDialog) EVT_BUTTON(-1, CqueryDlg::OnButton) EVT_CLOSE(CqueryDlg::OnCloseWindow) END_EVENT_TABLE() + // CqueryDlg() constructor -CqueryDlg::CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereArg) : wxDialog (parent, QUERY_DIALOG, "Query", wxPoint(-1, -1), wxSize(480, 360)) +CqueryDlg::CqueryDlg(wxWindow *parent, wxDb *pDb, char *tblName[], char *pWhereArg) : wxDialog (parent, QUERY_DIALOG, "Query", wxPoint(-1, -1), wxSize(480, 360)) { wxBeginBusyCursor(); @@ -1560,7 +1673,7 @@ CqueryDlg::CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereA // Initialize the WHERE clause from the string passed in pWhere = pWhereArg; // Save a pointer to the output buffer - if (strlen(pWhere) > DB_MAX_WHERE_CLAUSE_LEN) // Check the length of the buffer passed in + if (wxStrlen(pWhere) > (unsigned int)DB_MAX_WHERE_CLAUSE_LEN) // Check the length of the buffer passed in { wxString s; s.Printf("Maximum where clause length exceeded.\nLength must be less than %d", DB_MAX_WHERE_CLAUSE_LEN+1); @@ -1593,7 +1706,7 @@ CqueryDlg::CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereA pQuerySqlWhereMtxt = new wxTextCtrl(this, QUERY_DIALOG_WHERE_TEXT, "", wxPoint( 10, 159), wxSize(377, 134), wxTE_MULTILINE, wxDefaultValidator, "QuerySqlWhereMtxt"); pQueryAddBtn = new wxButton(this, QUERY_DIALOG_ADD, "&Add", wxPoint(406, 24), wxSize( 56, 26), 0, wxDefaultValidator, "QueryAddBtn"); pQueryAndBtn = new wxButton(this, QUERY_DIALOG_AND, "A&nd", wxPoint(406, 58), wxSize( 56, 26), 0, wxDefaultValidator, "QueryAndBtn"); - pQueryOrBtn = new wxButton(this, QUERY_DIALOG_OR, "&Or", wxPoint(406, 92), wxSize( 56, 26), 0, wxDefaultValidator, "QueryOrBtn"); + pQueryOrBtn = new wxButton(this, QUERY_DIALOG_OR, "&Or", wxPoint(406, 92), wxSize( 56, 26), 0, wxDefaultValidator, "QueryOrBtn"); pQueryLParenBtn = new wxButton(this, QUERY_DIALOG_LPAREN, "(", wxPoint(406, 126), wxSize( 26, 26), 0, wxDefaultValidator, "QueryLParenBtn"); pQueryRParenBtn = new wxButton(this, QUERY_DIALOG_RPAREN, ")", wxPoint(436, 126), wxSize( 26, 26), 0, wxDefaultValidator, "QueryRParenBtn"); pQueryDoneBtn = new wxButton(this, QUERY_DIALOG_DONE, "&Done", wxPoint(406, 185), wxSize( 56, 26), 0, wxDefaultValidator, "QueryDoneBtn"); @@ -1617,17 +1730,17 @@ CqueryDlg::CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereA wxEndBusyCursor(); wxString tStr; tStr = "ODBC error during GetColumns()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(pDb,__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); return; } int i; - for (i = 0; colInf[i].colName && strlen(colInf[i].colName); i++) + for (i = 0; colInf[i].colName && wxStrlen(colInf[i].colName); i++) { // If there is more than one table being queried, qualify // the column names with the table name prefix. - if (tblName[1] && strlen(tblName[1])) + if (tblName[1] && wxStrlen(tblName[1])) { qualName.Printf("%s.%s", colInf[i].tableName, colInf[i].colName); pQueryCol1Choice->Append(qualName); @@ -1656,7 +1769,6 @@ CqueryDlg::CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereA // Display the dialog window Centre(wxBOTH); ShowModal(); - } // CqueryDlg() constructor @@ -1665,11 +1777,12 @@ CqueryDlg::~CqueryDlg() } // CqueryDlg::~CqueryDlg() destructor -void CqueryDlg::OnButton( wxCommandEvent &event ) +void CqueryDlg::OnButton(wxCommandEvent &event) { wxWindow *win = (wxWindow*) event.GetEventObject(); OnCommand( *win, event ); -} +} // CqueryDlg::OnButton() + void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) { @@ -1687,33 +1800,33 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) // Set the help text switch((qryOp) pQueryOperatorChoice->GetSelection()) { - case qryOpEQ: - pQueryHintMsg->SetLabel(langQRY_EQ); - break; - case qryOpLT: - pQueryHintMsg->SetLabel(langQRY_LT); - break; - case qryOpGT: - pQueryHintMsg->SetLabel(langQRY_GT); - break; - case qryOpLE: - pQueryHintMsg->SetLabel(langQRY_LE); - break; - case qryOpGE: - pQueryHintMsg->SetLabel(langQRY_GE); - break; - case qryOpBEGINS: - pQueryHintMsg->SetLabel(langQRY_BEGINS); - break; - case qryOpCONTAINS: - pQueryHintMsg->SetLabel(langQRY_CONTAINS); - break; - case qryOpLIKE: - pQueryHintMsg->SetLabel(langQRY_LIKE); - break; - case qryOpBETWEEN: - pQueryHintMsg->SetLabel(langQRY_BETWEEN); - break; + case qryOpEQ: + pQueryHintMsg->SetLabel(langQRY_EQ); + break; + case qryOpLT: + pQueryHintMsg->SetLabel(langQRY_LT); + break; + case qryOpGT: + pQueryHintMsg->SetLabel(langQRY_GT); + break; + case qryOpLE: + pQueryHintMsg->SetLabel(langQRY_LE); + break; + case qryOpGE: + pQueryHintMsg->SetLabel(langQRY_GE); + break; + case qryOpBEGINS: + pQueryHintMsg->SetLabel(langQRY_BEGINS); + break; + case qryOpCONTAINS: + pQueryHintMsg->SetLabel(langQRY_CONTAINS); + break; + case qryOpLIKE: + pQueryHintMsg->SetLabel(langQRY_LIKE); + break; + case qryOpBETWEEN: + pQueryHintMsg->SetLabel(langQRY_BETWEEN); + break; } // Hide the value2 widget @@ -1723,57 +1836,57 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) // Disable the NOT operator for <, <=, >, >= switch((qryOp) pQueryOperatorChoice->GetSelection()) { - case qryOpLT: - case qryOpGT: - case qryOpLE: - case qryOpGE: - pQueryNotCheck->SetValue(0); - pQueryNotCheck->Enable(FALSE); - break; - default: - pQueryNotCheck->Enable(TRUE); - break; + case qryOpLT: + case qryOpGT: + case qryOpLE: + case qryOpGE: + pQueryNotCheck->SetValue(0); + pQueryNotCheck->Enable(FALSE); + break; + default: + pQueryNotCheck->Enable(TRUE); + break; } // Manipulate the dialog to handle the selected operator switch((qryOp) pQueryOperatorChoice->GetSelection()) { - case qryOpEQ: - case qryOpLT: - case qryOpGT: - case qryOpLE: - case qryOpGE: - pQueryCol2Choice->Enable(TRUE); - if (pQueryCol2Choice->GetSelection()) // Column name is highlighted - { - pQueryValue1Msg->Show(FALSE); - pQueryValue1Txt->Show(FALSE); - } - else // "Value" is highlighted - { + case qryOpEQ: + case qryOpLT: + case qryOpGT: + case qryOpLE: + case qryOpGE: + pQueryCol2Choice->Enable(TRUE); + if (pQueryCol2Choice->GetSelection()) // Column name is highlighted + { + pQueryValue1Msg->Show(FALSE); + pQueryValue1Txt->Show(FALSE); + } + else // "Value" is highlighted + { + pQueryValue1Msg->Show(TRUE); + pQueryValue1Txt->Show(TRUE); + pQueryValue1Txt->SetFocus(); + } + break; + case qryOpBEGINS: + case qryOpCONTAINS: + case qryOpLIKE: + pQueryCol2Choice->SetSelection(0); + pQueryCol2Choice->Enable(FALSE); pQueryValue1Msg->Show(TRUE); pQueryValue1Txt->Show(TRUE); pQueryValue1Txt->SetFocus(); - } - break; - case qryOpBEGINS: - case qryOpCONTAINS: - case qryOpLIKE: - pQueryCol2Choice->SetSelection(0); - pQueryCol2Choice->Enable(FALSE); - pQueryValue1Msg->Show(TRUE); - pQueryValue1Txt->Show(TRUE); - pQueryValue1Txt->SetFocus(); - break; - case qryOpBETWEEN: - pQueryCol2Choice->SetSelection(0); - pQueryCol2Choice->Enable(FALSE); - pQueryValue2Msg->Show(TRUE); - pQueryValue2Txt->Show(TRUE); - pQueryValue1Msg->Show(TRUE); - pQueryValue1Txt->Show(TRUE); - pQueryValue1Txt->SetFocus(); - break; + break; + case qryOpBETWEEN: + pQueryCol2Choice->SetSelection(0); + pQueryCol2Choice->Enable(FALSE); + pQueryValue2Msg->Show(TRUE); + pQueryValue2Txt->Show(TRUE); + pQueryValue1Msg->Show(TRUE); + pQueryValue1Txt->Show(TRUE); + pQueryValue1Txt->SetFocus(); + break; } return; @@ -1795,7 +1908,6 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) pQueryValue1Txt->SetFocus(); } return; - } // Column 2 choice // Add button @@ -1803,7 +1915,6 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) { ProcessAddBtn(); return; - } // Add button // And button @@ -1811,7 +1922,6 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) { AppendToWhere(" AND\n"); return; - } // And button // Or button @@ -1819,7 +1929,6 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) { AppendToWhere(" OR\n"); return; - } // Or button // Left Paren button @@ -1827,7 +1936,6 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) { AppendToWhere("("); return; - } // Left Paren button // Right paren button @@ -1835,14 +1943,13 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) { AppendToWhere(")"); return; - } // Right Paren button // Done button if (widgetName == pQueryDoneBtn->GetName()) { // Be sure the where clause will not overflow the output buffer - if (strlen(pQuerySqlWhereMtxt->GetValue()) > DB_MAX_WHERE_CLAUSE_LEN) + if (wxStrlen(pQuerySqlWhereMtxt->GetValue()) > (unsigned int)DB_MAX_WHERE_CLAUSE_LEN) { wxString s; s.Printf("Maximum where clause length exceeded.\nLength must be less than %d", DB_MAX_WHERE_CLAUSE_LEN+1); @@ -1853,10 +1960,9 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) if (!ValidateWhereClause()) return; // Copy the where clause to the output buffer and exit - strcpy(pWhere, pQuerySqlWhereMtxt->GetValue()); + wxStrcpy(pWhere, pQuerySqlWhereMtxt->GetValue()); Close(); return; - } // Done button // Clear button @@ -1867,7 +1973,6 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) if (Ok) pQuerySqlWhereMtxt->SetValue(""); return; - } // Clear button // Count button @@ -1877,7 +1982,6 @@ void CqueryDlg::OnCommand(wxWindow& win, wxCommandEvent& event) ProcessCountBtn(); wxEndBusyCursor(); return; - } // Count button } // CqueryDlg::OnCommand @@ -1902,18 +2006,18 @@ void CqueryDlg::OnCloseWindow(wxCloseEvent& event) while (wxIsBusy()) wxEndBusyCursor(); - Show(FALSE); - this->Destroy(); + Show(FALSE); + SetReturnCode(1); // added so BoundsChecker would not report use of uninitialized variable + this->Destroy(); } // CqueryDlg::OnCloseWindow() void CqueryDlg::AppendToWhere(char *s) { - wxString whereStr = pQuerySqlWhereMtxt->GetValue(); - whereStr += s; - pQuerySqlWhereMtxt->SetValue(whereStr); - + wxString whereStr = pQuerySqlWhereMtxt->GetValue(); + whereStr += s; + pQuerySqlWhereMtxt->SetValue(whereStr); } // CqueryDlg::AppendToWhere() @@ -1925,7 +2029,7 @@ void CqueryDlg::ProcessAddBtn() if (pQueryCol2Choice->GetSelection() == 0) // "Value" is selected { // Verify that value 1 is filled in - if (strlen(pQueryValue1Txt->GetValue()) == 0) + if (wxStrlen(pQueryValue1Txt->GetValue()) == 0) { wxBell(); pQueryValue1Txt->SetFocus(); @@ -1933,7 +2037,7 @@ void CqueryDlg::ProcessAddBtn() } // For the BETWEEN operator, value 2 must be filled in as well if (oper == qryOpBETWEEN && - strlen(pQueryValue2Txt->GetValue()) == 0) + wxStrlen(pQueryValue2Txt->GetValue()) == 0) { wxBell(); pQueryValue2Txt->SetFocus(); @@ -2023,32 +2127,32 @@ void CqueryDlg::ProcessCountBtn() if (!ValidateWhereClause()) return; - if (dbTable == 0) // wxTable object needs to be created and opened + if (dbTable == 0) // wxDbTable object needs to be created and opened { - if (!(dbTable = new wxTable(pDB, masterTableName, 0, NULL, !QUERY_ONLY, DbConnectInf.defaultDir))) + if (!(dbTable = new wxDbTable(pDB, masterTableName, 0, NULL, !wxDB_QUERY_ONLY, DbConnectInf.defaultDir))) { - wxMessageBox("Memory allocation failed creating a wxTable object.","Error...",wxOK | wxICON_EXCLAMATION); + wxMessageBox("Memory allocation failed creating a wxDbTable object.","Error...",wxOK | wxICON_EXCLAMATION); return; } if (!dbTable->Open()) { wxString tStr; tStr = "ODBC error during Open()\n\n"; - tStr += GetExtendedDBErrorMsg(__FILE__,__LINE__); + tStr += GetExtendedDBErrorMsg(dbTable->GetDb(),__FILE__,__LINE__); wxMessageBox(tStr,"ODBC Error...",wxOK | wxICON_EXCLAMATION); return; } } // Count() with WHERE clause - wxString whereStr; + wxString whereStr; whereStr = pQuerySqlWhereMtxt->GetValue(); - dbTable->where = (char *)whereStr.GetData(); + dbTable->SetWhereClause(whereStr.c_str()); ULONG whereCnt = dbTable->Count(); // Count() of all records in the table - dbTable->where = 0; + dbTable->SetWhereClause(""); ULONG totalCnt = dbTable->Count(); if (whereCnt > 0 || totalCnt == 0) @@ -2108,7 +2212,7 @@ bool CqueryDlg::ValidateWhereClause() SQLInstallerError(1,&retcode,errMsg,500,&cb); - wxMessageBox("FAILED creating data source","FAILED"); + wxMessageBox("FAILED creating data source","FAILED"); } else wxMessageBox("SUCCEEDED creating data source","SUCCESS"); diff --git a/samples/db/dbtest.h b/samples/db/dbtest.h index ae5bdc21e6..ed36a3a411 100644 --- a/samples/db/dbtest.h +++ b/samples/db/dbtest.h @@ -20,9 +20,11 @@ enum DialogModes {mView,mCreate,mEdit,mSearch}; // ID for the menu quit command -#define FILE_CREATE 100 -#define FILE_EXIT 199 -#define EDIT_PARAMETERS 200 +#define FILE_CREATE 100 +#define FILE_RECREATE_TABLE 110 +#define FILE_RECREATE_INDEXES 120 +#define FILE_EXIT 199 +#define EDIT_PARAMETERS 200 #define ABOUT_DEMO 300 // this seems to be missing, Robert Roebling (?) @@ -74,9 +76,9 @@ class CstructContact : public wxObject // -// NOTE: Ccontact inherits wxTable, which gives access to all the database functionality +// NOTE: Ccontact inherits wxDbTable, which gives access to all the database functionality // -class Ccontact : public wxTable, public CstructContact +class Ccontact : public wxDbTable, public CstructContact { private: bool freeDbConn; @@ -86,7 +88,7 @@ class Ccontact : public wxTable, public CstructContact wxString whereStr; wxString qryWhereStr; // Where string returned from the query dialog - Ccontact(wxDB *pwxDB=NULL); + Ccontact(wxDb *pwxDb=NULL); ~Ccontact(); void Initialize(); @@ -129,11 +131,13 @@ class DatabaseDemoFrame: public wxFrame void OnCloseWindow(wxCloseEvent& event); void OnCreate(wxCommandEvent& event); + void OnRecreateTable(wxCommandEvent& event); + void OnRecreateIndexes(wxCommandEvent& event); void OnExit(wxCommandEvent& event); void OnEditParameters(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); - void CreateDataTable(); + void CreateDataTable(bool recreate); void BuildEditorDialog(); void BuildParameterDialog(wxWindow *parent); @@ -147,8 +151,8 @@ DECLARE_EVENT_TABLE() class CeditorDlg : public wxPanel { private: - bool widgetPtrsSet; - wxString saveName; + bool widgetPtrsSet; + wxString saveName; // Pointers to all widgets on the dialog wxButton *pCreateBtn, *pEditBtn, *pDeleteBtn, *pCopyBtn, *pSaveBtn, *pCancelBtn; @@ -163,8 +167,9 @@ class CeditorDlg : public wxPanel wxStaticText *pNativeLangMsg; public: - enum DialogModes mode; - Ccontact *Contact; // this is the table object that will be being manipulated + bool initialized; + enum DialogModes mode; + Ccontact *Contact; // this is the table object that will be being manipulated CeditorDlg(wxWindow *parent); @@ -173,6 +178,7 @@ class CeditorDlg : public wxPanel void OnCommand(wxWindow& win, wxCommandEvent& event); void OnActivate(bool) {}; // necessary for hot keys + bool Initialize(); void FieldsEditable(); void SetMode(enum DialogModes m); bool PutData(); @@ -307,11 +313,11 @@ char * const langQRY_BETWEEN = "column BETWEEN value AND value"; class CqueryDlg : public wxDialog { private: - wxColInf *colInf; // Column inf. returned by db->GetColumns() - wxTable *dbTable; + wxDbColInf *colInf; // Column inf. returned by db->GetColumns() + wxDbTable *dbTable; char *masterTableName; char *pWhere; // A pointer to the storage for the resulting where clause - wxDB *pDB; + wxDb *pDB; public: bool widgetPtrsSet; @@ -343,9 +349,9 @@ class CqueryDlg : public wxDialog wxStaticBox *pQueryHintGrp; wxStaticText *pQueryHintMsg; - wxTextCtrl *pFocusTxt; + wxTextCtrl *pFocusTxt; - CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereArg); + CqueryDlg(wxWindow *parent, wxDb *pDb, char *tblName[], char *pWhereArg); ~CqueryDlg(); void OnButton( wxCommandEvent &event ); diff --git a/samples/db/listdb.cpp b/samples/db/listdb.cpp index 6cc5dbf358..e00f3c8740 100644 --- a/samples/db/listdb.cpp +++ b/samples/db/listdb.cpp @@ -30,7 +30,7 @@ data table/object for building the list. The data table record access is all handled through the routines - in this module, interfacing with the methods defined in wxTable. + in this module, interfacing with the methods defined in wxDbTable. All objects which use data table access must be initialized and have opened the table prior to passing them in the dialog @@ -64,7 +64,7 @@ extern wxDbList WXDLLEXPORT *PtrBegDbList; /* from db.cpp, used in getting ba extern wxDbConnectInf DbConnectInf; // Global database connection -extern wxDB *READONLY_DB; +extern wxDb *READONLY_DB; // Used for passing the selected listbox selection back to the calling @@ -93,9 +93,10 @@ const int LISTDB_NO_SPACES_BETWEEN_COLS = 3; * NOTE: The value returned by this function is for temporary use only and * should be copied for long term use */ -char *GetExtendedDBErrorMsg2(char *ErrFile, int ErrLine) +const char *GetExtendedDBErrorMsg2(char *ErrFile, int ErrLine) { static wxString msg; + msg = ""; wxString tStr; @@ -105,7 +106,7 @@ char *GetExtendedDBErrorMsg2(char *ErrFile, int ErrLine) msg += ErrFile; msg += " Line: "; tStr.Printf("%d",ErrLine); - msg += tStr.GetData(); + msg += tStr.c_str(); msg += "\n"; } @@ -126,20 +127,23 @@ char *GetExtendedDBErrorMsg2(char *ErrFile, int ErrLine) if (pDbList->PtrDb->errorList[i]) { msg.Append(pDbList->PtrDb->errorList[i]); - if (strcmp(pDbList->PtrDb->errorList[i],"") != 0) + if (wxStrcmp(pDbList->PtrDb->errorList[i],"") != 0) msg.Append("\n"); + // Clear the errmsg buffer so the next error will not + // end up showing the previous error that have occurred + wxStrcpy(pDbList->PtrDb->errorList[i],""); } } } msg += "\n"; - return (char*) (const char*) msg; + return /*(char*) (const char*) msg*/msg.c_str(); } // GetExtendedDBErrorMsg // Clookup constructor -Clookup::Clookup(char *tblName, char *colName) : wxTable(READONLY_DB, tblName, 1, NULL, !QUERY_ONLY, DbConnectInf.defaultDir) +Clookup::Clookup(char *tblName, char *colName) : wxDbTable(READONLY_DB, tblName, 1, NULL, !wxDB_QUERY_ONLY, DbConnectInf.defaultDir) { SetColDefs (0, colName, DB_DATA_TYPE_VARCHAR, lookupCol, SQL_C_CHAR, LOOKUP_COL_LEN+1, FALSE, FALSE); @@ -148,14 +152,14 @@ Clookup::Clookup(char *tblName, char *colName) : wxTable(READONLY_DB, tblName, 1 // Clookup2 constructor -Clookup2::Clookup2(char *tblName, char *colName1, char *colName2, wxDB *pDb) - : wxTable(pDb, tblName, (1 + (strlen(colName2) > 0)), NULL, !QUERY_ONLY, DbConnectInf.defaultDir) +Clookup2::Clookup2(char *tblName, char *colName1, char *colName2, wxDb *pDb) + : wxDbTable(pDb, tblName, (1 + (wxStrlen(colName2) > 0)), NULL, !wxDB_QUERY_ONLY, DbConnectInf.defaultDir) { int i = 0; SetColDefs (i, colName1, DB_DATA_TYPE_VARCHAR, lookupCol1, SQL_C_CHAR, LOOKUP_COL_LEN+1, FALSE, FALSE); - if (strlen(colName2) > 0) + if (wxStrlen(colName2) > 0) SetColDefs (++i, colName2, DB_DATA_TYPE_VARCHAR, lookupCol2, SQL_C_CHAR, LOOKUP_COL_LEN+1, FALSE, FALSE); } // Clookup2() @@ -174,7 +178,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, cha { wxBeginBusyCursor(); - strcpy(ListDB_Selection,""); + wxStrcpy(ListDB_Selection,""); widgetPtrsSet = FALSE; lookup = 0; lookup2 = 0; @@ -204,8 +208,8 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, cha return; } - lookup->orderBy = orderBy; - lookup->where = where; + lookup->SetOrderByClause(orderBy); + lookup->SetWhereClause(where); if (!lookup->Query()) { wxMessageBox("ODBC error during Query()","ODBC Error..."); @@ -264,16 +268,16 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, cha // ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, char *dispCol1, char *dispCol2, char *where, char *orderBy, bool distinctValues, - char *selectStmt, int maxLenCol1, wxDB *pDb, bool allowOk) : wxDialog (parent, LOOKUP_DIALOG, "Select...", wxPoint(-1, -1), wxSize(400, 290)) + char *selectStmt, int maxLenCol1, wxDb *pDb, bool allowOk) : wxDialog (parent, LOOKUP_DIALOG, "Select...", wxPoint(-1, -1), wxSize(400, 290)) { wxBeginBusyCursor(); - strcpy(ListDB_Selection,""); - strcpy(ListDB_Selection2,""); + wxStrcpy(ListDB_Selection,""); + wxStrcpy(ListDB_Selection2,""); widgetPtrsSet = FALSE; lookup = 0; lookup2 = 0; - noDisplayCols = (strlen(dispCol2) ? 2 : 1); + noDisplayCols = (wxStrlen(dispCol2) ? 2 : 1); col1Len = 0; wxFont fixedFont(12,wxMODERN,wxNORMAL,wxNORMAL); @@ -314,14 +318,14 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, else { maxColLen = LOOKUP_COL_LEN; - if (strlen(dispCol2)) + if (wxStrlen(dispCol2)) { wxString q = "SELECT MAX({fn LENGTH("; q += dispCol1; q += ")}), NULL"; q += " FROM "; q += tableName; - if (strlen(where)) + if (wxStrlen(where)) { q += " WHERE "; q += where; @@ -340,7 +344,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, } // Query the actual record set - if (selectStmt && strlen(selectStmt)) // Query by sql stmt passed in + if (selectStmt && wxStrlen(selectStmt)) // Query by sql stmt passed in { if (!lookup2->QueryBySqlStmt(selectStmt)) { @@ -351,8 +355,8 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, } else // Query using where and order by clauses { - lookup2->orderBy = orderBy; - lookup2->where = where; + lookup2->SetOrderByClause(orderBy); + lookup2->SetWhereClause(where); if (!lookup2->Query(FALSE, distinctValues)) { wxMessageBox("ODBC error during Query()","ODBC Error..."); @@ -366,9 +370,9 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, while (lookup2->GetNext()) { s = lookup2->lookupCol1; - if (strlen(dispCol2)) // Append the optional column 2 + if (wxStrlen(dispCol2)) // Append the optional column 2 { - s.Append(' ', (maxColLen + LISTDB_NO_SPACES_BETWEEN_COLS - strlen(lookup2->lookupCol1))); + s.Append(' ', (maxColLen + LISTDB_NO_SPACES_BETWEEN_COLS - wxStrlen(lookup2->lookupCol1))); s.Append(lookup2->lookupCol2); } pLookUpSelectList->Append(s); @@ -407,8 +411,10 @@ void ClookUpDlg::OnClose(wxCloseEvent& event) if (lookup2) delete lookup2; + SetReturnCode(1); + while (wxIsBusy()) wxEndBusyCursor(); - event.Skip(); + event.Skip(); // return TRUE; @@ -434,25 +440,25 @@ void ClookUpDlg::OnCommand(wxWindow& win, wxCommandEvent& event) if (pLookUpSelectList->GetSelection() != -1) { if (noDisplayCols == 1) - strcpy (ListDB_Selection, pLookUpSelectList->GetStringSelection()); + wxStrcpy (ListDB_Selection, pLookUpSelectList->GetStringSelection()); else // 2 display columns { wxString s = pLookUpSelectList->GetStringSelection(); // Column 1 s = s.SubString(0, col1Len-1); s = s.Strip(); - strcpy(ListDB_Selection, s); + wxStrcpy(ListDB_Selection, s); // Column 2 s = pLookUpSelectList->GetStringSelection(); s = s.Mid(col1Len + LISTDB_NO_SPACES_BETWEEN_COLS); s = s.Strip(); - strcpy(ListDB_Selection2, s); + wxStrcpy(ListDB_Selection2, s); } } else { - strcpy(ListDB_Selection,""); - strcpy(ListDB_Selection2,""); + wxStrcpy(ListDB_Selection,""); + wxStrcpy(ListDB_Selection2,""); } Close(); } // OK Button @@ -460,8 +466,8 @@ void ClookUpDlg::OnCommand(wxWindow& win, wxCommandEvent& event) // Cancel Button if (widgetName == pLookUpCancelBtn->GetName()) { - strcpy (ListDB_Selection,""); - strcpy (ListDB_Selection2,""); + wxStrcpy (ListDB_Selection,""); + wxStrcpy (ListDB_Selection2,""); Close(); } // Cancel Button } diff --git a/samples/db/listdb.h b/samples/db/listdb.h index 9aac867020..0f84b82e03 100644 --- a/samples/db/listdb.h +++ b/samples/db/listdb.h @@ -26,10 +26,10 @@ const int LOOKUP_COL_LEN = 250; // Global database connection -extern wxDB *READONLY_DB; +extern wxDb *READONLY_DB; // Clookup class -class Clookup : public wxTable +class Clookup : public wxDbTable { public: @@ -40,14 +40,14 @@ class Clookup : public wxTable }; // Clookup // Clookup2 class -class Clookup2 : public wxTable +class Clookup2 : public wxDbTable { public: char lookupCol1[LOOKUP_COL_LEN+1]; char lookupCol2[LOOKUP_COL_LEN+1]; - Clookup2(char *tblName, char *colName1, char *colName2, wxDB *pDb); + Clookup2(char *tblName, char *colName1, char *colName2, wxDb *pDb); }; // Clookup2 @@ -109,7 +109,7 @@ class ClookUpDlg : public wxDialog bool distinctValues, // e.g. SELECT DISTINCT ... char *selectStmt = 0, // If you wish to query by SQLstmt (complicated lookups) int maxLenCol1 = 0, // Mandatory if querying by SQLstmt - wxDB *pDb = READONLY_DB, // Database connection pointer + wxDb *pDb = READONLY_DB, // Database connection pointer bool allowOk = TRUE); // is the OK button enabled void OnButton( wxCommandEvent &event ); diff --git a/samples/dialogs/DialogsVC.dsp b/samples/dialogs/DialogsVC.dsp new file mode 100644 index 0000000000..47ebed6c9b --- /dev/null +++ b/samples/dialogs/DialogsVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="DialogsVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DialogsVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DialogsVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DialogsVC.mak" CFG="DialogsVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DialogsVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DialogsVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DialogsVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DialogsVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DialogsVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dialogs.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialogsVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dialogs.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialogsVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dialogs.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialogsVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dialogs.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DialogsVC - Win32 Release" +# Name "DialogsVC - Win32 Debug" +# Name "DialogsVC - Win32 Debug DLL" +# Name "DialogsVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\dialogs.cpp + +!IF "$(CFG)" == "DialogsVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogsVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogsVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogsVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dialogs.h +# End Source File +# Begin Source File + +SOURCE=.\dialogs.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/dialogs/DialogsVC.dsw b/samples/dialogs/DialogsVC.dsw new file mode 100644 index 0000000000..e014285153 --- /dev/null +++ b/samples/dialogs/DialogsVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DialogsVC"=.\DialogsVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 2f194b38be..eed6a2b578 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -61,6 +61,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(DIALOGS_FILES_OPEN, MyFrame::FilesOpen) EVT_MENU(DIALOGS_FILE_SAVE, MyFrame::FileSave) EVT_MENU(DIALOGS_DIR_CHOOSE, MyFrame::DirChoose) + EVT_MENU(DIALOGS_MODAL, MyFrame::ModalDlg) EVT_MENU(DIALOGS_MODELESS, MyFrame::ModelessDlg) EVT_MENU(DIALOGS_TIP, MyFrame::ShowTip) #if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW @@ -75,6 +76,10 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_BUTTON(DIALOGS_MODELESS_BTN, MyFrame::OnButton) END_EVENT_TABLE() +BEGIN_EVENT_TABLE(MyModalDialog, wxDialog) + EVT_BUTTON(-1, MyModalDialog::OnButton) +END_EVENT_TABLE() + BEGIN_EVENT_TABLE(MyModelessDialog, wxDialog) EVT_CLOSE(MyModelessDialog::OnClose) END_EVENT_TABLE() @@ -124,10 +129,11 @@ bool MyApp::OnInit() file_menu->Append(DIALOGS_FILES_OPEN, "Open &files\tCtrl-Q"); file_menu->Append(DIALOGS_FILE_SAVE, "Sa&ve file\tCtrl-S"); file_menu->Append(DIALOGS_DIR_CHOOSE, "&Choose a directory\tCtrl-D"); - file_menu->AppendSeparator(); #if wxUSE_PROGRESSDLG file_menu->Append(DIALOGS_PROGRESS, "Pro&gress dialog\tCtrl-G"); #endif // wxUSE_PROGRESSDLG + file_menu->AppendSeparator(); + file_menu->Append(DIALOGS_MODAL, "Mo&dal dialog\tCtrl-F"); file_menu->Append(DIALOGS_MODELESS, "Modeless &dialog\tCtrl-Z", "", TRUE); file_menu->AppendSeparator(); file_menu->Append(wxID_EXIT, "E&xit\tAlt-X"); @@ -160,25 +166,25 @@ MyFrame::MyFrame(wxWindow *parent, void MyFrame::ChooseColour(wxCommandEvent& WXUNUSED(event) ) { - wxColourData data; - data.SetChooseFull(TRUE); - for (int i = 0; i < 16; i++) - { + wxColourData data; + data.SetChooseFull(TRUE); + for (int i = 0; i < 16; i++) + { wxColour colour(i*16, i*16, i*16); data.SetCustomColour(i, colour); - } + } - wxColourDialog *dialog = new wxColourDialog(this, &data); - if (dialog->ShowModal() == wxID_OK) - { + wxColourDialog *dialog = new wxColourDialog(this, &data); + dialog->SetTitle("Choose the background colour"); + if (dialog->ShowModal() == wxID_OK) + { wxColourData retData = dialog->GetColourData(); wxColour col = retData.GetColour(); -// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID); myCanvas->SetBackgroundColour(col); myCanvas->Clear(); myCanvas->Refresh(); - } - dialog->Destroy(); + } + dialog->Destroy(); } void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) ) @@ -261,7 +267,7 @@ void MyFrame::LogDialog(wxCommandEvent& event) void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) ) { - wxMessageDialog dialog( this, "This is a message box\nA long, long string to test out the message box properly", + wxMessageDialog dialog( NULL, "This is a message box\nA long, long string to test out the message box properly", "Message box text", wxYES_NO|wxCANCEL|wxICON_INFORMATION); dialog.ShowModal(); @@ -293,7 +299,7 @@ void MyFrame::NumericEntry(wxCommandEvent& WXUNUSED(event) ) void MyFrame::PasswordEntry(wxCommandEvent& WXUNUSED(event)) { wxString pwd = wxGetPasswordFromUser("Enter password:", - "Passowrd entry dialog", + "Password entry dialog", "", this); if ( !!pwd ) @@ -412,9 +418,15 @@ void MyFrame::DirChoose(wxCommandEvent& WXUNUSED(event) ) } } +void MyFrame::ModalDlg(wxCommandEvent& WXUNUSED(event)) +{ + MyModalDialog dlg(this); + dlg.ShowModal(); +} + void MyFrame::ModelessDlg(wxCommandEvent& event) { - bool show = GetMenuBar()->IsChecked(event.GetInt()); + bool show = GetMenuBar()->IsChecked(event.GetId()); if ( show ) { @@ -565,3 +577,46 @@ void MyModelessDialog::OnClose(wxCloseEvent& event) } } +// ---------------------------------------------------------------------------- +// MyModalDialog +// ---------------------------------------------------------------------------- + +MyModalDialog::MyModalDialog(wxWindow *parent) + : wxDialog(parent, -1, wxString("Modal dialog")) +{ + wxBoxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL); + + m_btnFocused = new wxButton(this, -1, "Default button"); + m_btnDelete = new wxButton(this, -1, "&Delete button"); + sizerTop->Add(m_btnFocused, 0, wxALIGN_CENTER | wxALL, 5); + sizerTop->Add(m_btnDelete, 0, wxALIGN_CENTER | wxALL, 5); + + SetAutoLayout(TRUE); + SetSizer(sizerTop); + + sizerTop->SetSizeHints(this); + sizerTop->Fit(this); + + m_btnFocused->SetFocus(); + m_btnFocused->SetDefault(); +} + +void MyModalDialog::OnButton(wxCommandEvent& event) +{ + if ( event.GetEventObject() == m_btnDelete ) + { + delete m_btnFocused; + m_btnFocused = NULL; + + m_btnDelete->Disable(); + } + else if ( event.GetEventObject() == m_btnFocused ) + { + wxGetTextFromUser("Dummy prompt", "Modal dialog called from dialog", + "", this); + } + else + { + event.Skip(); + } +} diff --git a/samples/dialogs/dialogs.h b/samples/dialogs/dialogs.h index d0e114f6b9..d8e4665ab9 100644 --- a/samples/dialogs/dialogs.h +++ b/samples/dialogs/dialogs.h @@ -22,7 +22,7 @@ public: wxColour m_canvasTextColour; }; -// A modeless dialog +// A custom modeless dialog class MyModelessDialog : public wxDialog { public: @@ -34,6 +34,21 @@ private: DECLARE_EVENT_TABLE() }; +// A custom modal dialog +class MyModalDialog : public wxDialog +{ +public: + MyModalDialog(wxWindow *parent); + + void OnButton(wxCommandEvent& event); + +private: + wxButton *m_btnFocused; + wxButton *m_btnDelete; + + DECLARE_EVENT_TABLE() +}; + // Define a new frame type class MyFrame: public wxFrame { @@ -54,6 +69,7 @@ public: void FileSave(wxCommandEvent& event); void DirChoose(wxCommandEvent& event); void ShowTip(wxCommandEvent& event); + void ModalDlg(wxCommandEvent& event); void ModelessDlg(wxCommandEvent& event); void ShowProgress(wxCommandEvent& event); @@ -101,6 +117,7 @@ enum DIALOGS_TIP, DIALOGS_NUM_ENTRY, DIALOGS_LOG_DIALOG, + DIALOGS_MODAL, DIALOGS_MODELESS, DIALOGS_MODELESS_BTN, DIALOGS_PROGRESS diff --git a/samples/dialup/DialupVC.dsp b/samples/dialup/DialupVC.dsp new file mode 100644 index 0000000000..feafc253eb --- /dev/null +++ b/samples/dialup/DialupVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="DialupVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DialupVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DialupVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DialupVC.mak" CFG="DialupVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DialupVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DialupVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DialupVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DialupVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DialupVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/nettest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialupVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/nettest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialupVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/nettest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialupVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/nettest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DialupVC - Win32 Release" +# Name "DialupVC - Win32 Debug" +# Name "DialupVC - Win32 Debug DLL" +# Name "DialupVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\nettest.cpp + +!IF "$(CFG)" == "DialupVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialupVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialupVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialupVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\nettest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/dialup/DialupVC.dsw b/samples/dialup/DialupVC.dsw new file mode 100644 index 0000000000..7fc70ed199 --- /dev/null +++ b/samples/dialup/DialupVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DialupVC"=.\DialupVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/dnd/DndVC.dsp b/samples/dnd/DndVC.dsp new file mode 100644 index 0000000000..49ea66a221 --- /dev/null +++ b/samples/dnd/DndVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="DndVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DndVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DndVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DndVC.mak" CFG="DndVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DndVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DndVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DndVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DndVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DndVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dnd.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DndVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dnd.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DndVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dnd.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DndVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dnd.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DndVC - Win32 Release" +# Name "DndVC - Win32 Debug" +# Name "DndVC - Win32 Debug DLL" +# Name "DndVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\dnd.cpp + +!IF "$(CFG)" == "DndVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DndVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DndVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DndVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dnd.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/dnd/DndVC.dsw b/samples/dnd/DndVC.dsw new file mode 100644 index 0000000000..fbf1286233 --- /dev/null +++ b/samples/dnd/DndVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DndVC"=.\DndVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 6ba0420bb3..96b14ad477 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -46,6 +46,10 @@ #if defined(__WXGTK__) || defined(__WXMOTIF__) #include "mondrian.xpm" + + #include "dnd_copy.xpm" + #include "dnd_move.xpm" + #include "dnd_none.xpm" #endif // ---------------------------------------------------------------------------- @@ -1065,14 +1069,10 @@ void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) ) textData.AddFile( "/file1.txt" ); textData.AddFile( "/file2.txt" ); */ - wxDropSource source(textData, this - -#ifdef __WXMSW__ - ,wxCURSOR_PENCIL, // for copy - wxCURSOR_SPRAYCAN, // for move - wxCURSOR_QUESTION_ARROW // for nothing -#endif - ); + wxDropSource source(textData, this, + wxDROP_ICON(dnd_copy), + wxDROP_ICON(dnd_move), + wxDROP_ICON(dnd_none)); const char *pc; @@ -1511,19 +1511,19 @@ DnDShapeFrame::DnDShapeFrame(wxFrame *parent) SetDropTarget(new DnDShapeDropTarget(this)); m_shape = NULL; - + SetBackgroundColour(*wxWHITE); } DnDShapeFrame::~DnDShapeFrame() { - if (m_shape) + if (m_shape) delete m_shape; } void DnDShapeFrame::SetShape(DnDShape *shape) { - if (m_shape) + if (m_shape) delete m_shape; m_shape = shape; Refresh(); diff --git a/samples/dnd/dnd.rc b/samples/dnd/dnd.rc index 7655c62a4c..21cba3bc3c 100644 --- a/samples/dnd/dnd.rc +++ b/samples/dnd/dnd.rc @@ -1,3 +1,6 @@ mondrian ICON "mondrian.ico" #include "wx/msw/wx.rc" +dnd_copy CURSOR "dnd_copy.cur" +dnd_move CURSOR "dnd_move.cur" +dnd_none CURSOR "dnd_none.cur" diff --git a/samples/dnd/dnd_copy.cur b/samples/dnd/dnd_copy.cur new file mode 100644 index 0000000000000000000000000000000000000000..ce349aa3324a9dee883052b92064b2d63300ede7 GIT binary patch literal 326 zcmaLRu?@m75QX92Ae4e49YUfYB_$h>Q5b+7V3Vw3i9tw5o01~R%X5enBm!rB_W3ON z4i*H80@kcJ2G{@xbBWS|*AV0JzD&EM>GCVfYDn@1_AfXkEnH14;bE2Y-DPx!E#F+4 n3(xRBnp{fiOo~hCmIO~8)S0^vy3)0n_&rwA-QRwC&bR3S<|=*2 literal 0 HcmV?d00001 diff --git a/samples/dnd/dnd_copy.xpm b/samples/dnd/dnd_copy.xpm new file mode 100644 index 0000000000..7144747bb9 --- /dev/null +++ b/samples/dnd/dnd_copy.xpm @@ -0,0 +1,45 @@ +/* XPM */ +static char * dnd_copy_xpm[] = { +/* width height ncolors chars_per_pixel */ +"32 32 6 1", +/* colors */ +" s None c None", +". c black", +"X c wheat", +"o c tan", +"O c #6699FF", +"r c red", +/* pixels */ +" ................... r ", +" .XXXXXXXXXXXXXXXXX.. r ", +" .XXXXXXXXXXXXXXXXX.o.rrrrrrr", +" .XXXXXXXXXXXXXXXXX.oo. r ", +" .XXXXXXXXXXXXXXXXX.ooo. r ", +" .XXXXXXXXXXXXXXXXX.oooo. ", +" .XXXXXXXXXXXXXXXXX....... ", +" .XXXXXOOOOOOOOOOXXXooooo. ", +" .XXXXXXXXXXXXXXXXXXooooo. ", +" .XXXXXOOOOOOOOOOXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXOOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXOOOOOOOOOOXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXOOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXOOOOOOOOOOXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXOOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXOOOOOOOXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" ......................... "}; + diff --git a/samples/dnd/dnd_move.cur b/samples/dnd/dnd_move.cur new file mode 100644 index 0000000000000000000000000000000000000000..ce349aa3324a9dee883052b92064b2d63300ede7 GIT binary patch literal 326 zcmaLRu?@m75QX92Ae4e49YUfYB_$h>Q5b+7V3Vw3i9tw5o01~R%X5enBm!rB_W3ON z4i*H80@kcJ2G{@xbBWS|*AV0JzD&EM>GCVfYDn@1_AfXkEnH14;bE2Y-DPx!E#F+4 n3(xRBnp{fiOo~hCmIO~8)S0^vy3)0n_&rwA-QRwC&bR3S<|=*2 literal 0 HcmV?d00001 diff --git a/samples/dnd/dnd_move.xpm b/samples/dnd/dnd_move.xpm new file mode 100644 index 0000000000..9a0eaf4dcc --- /dev/null +++ b/samples/dnd/dnd_move.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char * dnd_move_xpm[] = { +/* width height ncolors chars_per_pixel */ +"32 32 5 1", +/* colors */ +" s None c None", +". c black", +"X c wheat", +"o c tan", +"O c #6699FF", +/* pixels */ +" ................... ", +" .XXXXXXXXXXXXXXXXX.. ", +" .XXXXXXXXXXXXXXXXX.o. ", +" .XXXXXXXXXXXXXXXXX.oo. ", +" .XXXXXXXXXXXXXXXXX.ooo. ", +" .XXXXXXXXXXXXXXXXX.oooo. ", +" .XXXXXXXXXXXXXXXXX....... ", +" .XXXXXOOOOOOOOOOXXXooooo. ", +" .XXXXXXXXXXXXXXXXXXooooo. ", +" .XXXXXOOOOOOOOOOXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXOOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXOOOOOOOOOOXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXOOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXOOOOOOOOOOXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXOOOOOOOOOOXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXOOOOOOOXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" ......................... "}; + diff --git a/samples/dnd/dnd_none.cur b/samples/dnd/dnd_none.cur new file mode 100644 index 0000000000000000000000000000000000000000..ce349aa3324a9dee883052b92064b2d63300ede7 GIT binary patch literal 326 zcmaLRu?@m75QX92Ae4e49YUfYB_$h>Q5b+7V3Vw3i9tw5o01~R%X5enBm!rB_W3ON z4i*H80@kcJ2G{@xbBWS|*AV0JzD&EM>GCVfYDn@1_AfXkEnH14;bE2Y-DPx!E#F+4 n3(xRBnp{fiOo~hCmIO~8)S0^vy3)0n_&rwA-QRwC&bR3S<|=*2 literal 0 HcmV?d00001 diff --git a/samples/dnd/dnd_none.xpm b/samples/dnd/dnd_none.xpm new file mode 100644 index 0000000000..dfd7f0cdad --- /dev/null +++ b/samples/dnd/dnd_none.xpm @@ -0,0 +1,45 @@ +/* XPM */ +static char * dnd_none_xpm[] = { +/* width height ncolors chars_per_pixel */ +"32 32 6 1", +/* colors */ +" s None c None", +". c black", +"X c wheat", +"o c tan", +"O c #6699FF", +"r c red", +/* pixels */ +" ................... ", +" .XXXXXXXXXXXXXXXXX.. ", +" .XXXXXXXXXXXXXXXXX.o. ", +" .XXXXXXXXXXXXXXXXX.oo. ", +" .XXXXXXXXXXXXXXXXX.ooo. ", +" .XXXXXXXXXXXXXXXXX.oooo. ", +" .XXXXXXXXXXXXXXXXX....... ", +" .rXXXXOOOOOOOOOOXXXoooor. ", +" .XrXXXXXXXXXXXXXXXXoooro. ", +" .XXrXXOOOOOOOOOOXXXXXrXX. ", +" .XXXrXXXXXXXXXXXXXXXrXXX. ", +" .XXXXrXXOOOOOOOOOXXrXXXX. ", +" .XXXXXrXXXXXXXXXXXrXXXXX. ", +" .XXXXXXrOOOOOOOOOrXXXXXX. ", +" .XXXXXXXrXXXXXXXrXXXXXXX. ", +" .XXXXXOOOrOOOOOrXXXXXXXX. ", +" .XXXXXXXXXrXXXrXXXXXXXXX. ", +" .XXXXXXXOOOrOrOOOXXXXXXX. ", +" .XXXXXXXXXXXrXXXXXXXXXXX. ", +" .XXXXXXOOOOrOrOOOXXXXXXX. ", +" .XXXXXXXXXrXXXrXXXXXXXXX. ", +" .XXXXXOOOrOOOOOrXXXXXXXX. ", +" .XXXXXXXrXXXXXXXrXXXXXXX. ", +" .XXXXXXrOOOOOOOOOrXXXXXX. ", +" .XXXXXrXXXXXXXXXXXrXXXXX. ", +" .XXXXrOOOOOOOXXXXXXrXXXX. ", +" .XXXrXXXXXXXXXXXXXXXrXXX. ", +" .XXrXXXXXXXXXXXXXXXXXrXX. ", +" .XrXXXXXXXXXXXXXXXXXXXrX. ", +" .rXXXXXXXXXXXXXXXXXXXXXr. ", +" .XXXXXXXXXXXXXXXXXXXXXXX. ", +" ......................... "}; + diff --git a/samples/docview/DocViewVC.dsp b/samples/docview/DocViewVC.dsp new file mode 100644 index 0000000000..fab80fe54e --- /dev/null +++ b/samples/docview/DocViewVC.dsp @@ -0,0 +1,227 @@ +# Microsoft Developer Studio Project File - Name="DocViewVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DocViewVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DocViewVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DocViewVC.mak" CFG="DocViewVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DocViewVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DocViewVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DocViewVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DocViewVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DocViewVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/docview.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/docview.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/docview.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/docview.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DocViewVC - Win32 Release" +# Name "DocViewVC - Win32 Debug" +# Name "DocViewVC - Win32 Debug DLL" +# Name "DocViewVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\doc.cpp + +!IF "$(CFG)" == "DocViewVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\doc.h +# End Source File +# Begin Source File + +SOURCE=.\docview.cpp + +!IF "$(CFG)" == "DocViewVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\docview.h +# End Source File +# Begin Source File + +SOURCE=.\docview.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\view.cpp + +!IF "$(CFG)" == "DocViewVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocViewVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\view.h +# End Source File +# End Target +# End Project diff --git a/samples/docview/DocViewVC.dsw b/samples/docview/DocViewVC.dsw new file mode 100644 index 0000000000..1fcfb5375c --- /dev/null +++ b/samples/docview/DocViewVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DocViewVC"=.\DocViewVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/docview/doc.cpp b/samples/docview/doc.cpp index d679a53221..864981f878 100644 --- a/samples/docview/doc.cpp +++ b/samples/docview/doc.cpp @@ -40,88 +40,88 @@ DrawingDocument::DrawingDocument(void) DrawingDocument::~DrawingDocument(void) { - doodleSegments.DeleteContents(TRUE); + doodleSegments.DeleteContents(TRUE); } #if wxUSE_STD_IOSTREAM ostream& DrawingDocument::SaveObject(ostream& stream) { - wxDocument::SaveObject(stream); - - wxInt32 n = doodleSegments.Number(); - stream << n << '\n'; - - wxNode *node = doodleSegments.First(); - while (node) - { - DoodleSegment *segment = (DoodleSegment *)node->Data(); - segment->SaveObject(stream); - stream << '\n'; + wxDocument::SaveObject(stream); - node = node->Next(); - } - - return stream; + wxInt32 n = doodleSegments.Number(); + stream << n << '\n'; + + wxNode *node = doodleSegments.First(); + while (node) + { + DoodleSegment *segment = (DoodleSegment *)node->Data(); + segment->SaveObject(stream); + stream << '\n'; + + node = node->Next(); + } + + return stream; } #else wxOutputStream& DrawingDocument::SaveObject(wxOutputStream& stream) { - wxDocument::SaveObject(stream); - - wxTextOutputStream text_stream( stream ); - - wxInt32 n = doodleSegments.Number(); - text_stream << n << '\n'; - - wxNode *node = doodleSegments.First(); - while (node) - { - DoodleSegment *segment = (DoodleSegment *)node->Data(); - segment->SaveObject(stream); - text_stream << '\n'; + wxDocument::SaveObject(stream); - node = node->Next(); - } - - return stream; + wxTextOutputStream text_stream( stream ); + + wxInt32 n = doodleSegments.Number(); + text_stream << n << '\n'; + + wxNode *node = doodleSegments.First(); + while (node) + { + DoodleSegment *segment = (DoodleSegment *)node->Data(); + segment->SaveObject(stream); + text_stream << '\n'; + + node = node->Next(); + } + + return stream; } #endif #if wxUSE_STD_IOSTREAM istream& DrawingDocument::LoadObject(istream& stream) { - wxDocument::LoadObject(stream); - - wxInt32 n = 0; - stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleSegment *segment = new DoodleSegment; - segment->LoadObject(stream); - doodleSegments.Append(segment); - } - - return stream; + wxDocument::LoadObject(stream); + + wxInt32 n = 0; + stream >> n; + + for (int i = 0; i < n; i++) + { + DoodleSegment *segment = new DoodleSegment; + segment->LoadObject(stream); + doodleSegments.Append(segment); + } + + return stream; } #else wxInputStream& DrawingDocument::LoadObject(wxInputStream& stream) { - wxDocument::LoadObject(stream); - - wxTextInputStream text_stream( stream ); - - wxInt32 n = 0; - text_stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleSegment *segment = new DoodleSegment; - segment->LoadObject(stream); - doodleSegments.Append(segment); - } - - return stream; + wxDocument::LoadObject(stream); + + wxTextInputStream text_stream( stream ); + + wxInt32 n = 0; + text_stream >> n; + + for (int i = 0; i < n; i++) + { + DoodleSegment *segment = new DoodleSegment; + segment->LoadObject(stream); + doodleSegments.Append(segment); + } + + return stream; } #endif @@ -131,204 +131,204 @@ DoodleSegment::DoodleSegment(void) DoodleSegment::DoodleSegment(DoodleSegment& seg) { - wxNode *node = seg.lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - DoodleLine *newLine = new DoodleLine; - newLine->x1 = line->x1; - newLine->y1 = line->y1; - newLine->x2 = line->x2; - newLine->y2 = line->y2; - - lines.Append(newLine); - - node = node->Next(); - } + wxNode *node = seg.lines.First(); + while (node) + { + DoodleLine *line = (DoodleLine *)node->Data(); + DoodleLine *newLine = new DoodleLine; + newLine->x1 = line->x1; + newLine->y1 = line->y1; + newLine->x2 = line->x2; + newLine->y2 = line->y2; + + lines.Append(newLine); + + node = node->Next(); + } } DoodleSegment::~DoodleSegment(void) { - lines.DeleteContents(TRUE); + lines.DeleteContents(TRUE); } #if wxUSE_STD_IOSTREAM ostream& DoodleSegment::SaveObject(ostream& stream) { - wxInt32 n = lines.Number(); - stream << n << '\n'; - - wxNode *node = lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - stream << line->x1 << " " << - line->y1 << " " << - line->x2 << " " << - line->y2 << "\n"; - node = node->Next(); - } - - return stream; + wxInt32 n = lines.Number(); + stream << n << '\n'; + + wxNode *node = lines.First(); + while (node) + { + DoodleLine *line = (DoodleLine *)node->Data(); + stream << line->x1 << " " << + line->y1 << " " << + line->x2 << " " << + line->y2 << "\n"; + node = node->Next(); + } + + return stream; } #else wxOutputStream &DoodleSegment::SaveObject(wxOutputStream& stream) { - wxTextOutputStream text_stream( stream ); - - wxInt32 n = lines.Number(); - text_stream << n << '\n'; - - wxNode *node = lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - text_stream << line->x1 << " " << - line->y1 << " " << - line->x2 << " " << - line->y2 << "\n"; - node = node->Next(); - } - - return stream; + wxTextOutputStream text_stream( stream ); + + wxInt32 n = lines.Number(); + text_stream << n << '\n'; + + wxNode *node = lines.First(); + while (node) + { + DoodleLine *line = (DoodleLine *)node->Data(); + text_stream << line->x1 << " " << + line->y1 << " " << + line->x2 << " " << + line->y2 << "\n"; + node = node->Next(); + } + + return stream; } #endif #if wxUSE_STD_IOSTREAM istream& DoodleSegment::LoadObject(istream& stream) { - wxInt32 n = 0; - stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleLine *line = new DoodleLine; - stream >> line->x1 >> - line->y1 >> - line->x2 >> - line->y2; - lines.Append(line); - } - - return stream; + wxInt32 n = 0; + stream >> n; + + for (int i = 0; i < n; i++) + { + DoodleLine *line = new DoodleLine; + stream >> line->x1 >> + line->y1 >> + line->x2 >> + line->y2; + lines.Append(line); + } + + return stream; } #else wxInputStream &DoodleSegment::LoadObject(wxInputStream& stream) { - wxTextInputStream text_stream( stream ); - - wxInt32 n = 0; - text_stream >> n; - - for (int i = 0; i < n; i++) - { - DoodleLine *line = new DoodleLine; - text_stream >> line->x1 >> - line->y1 >> - line->x2 >> - line->y2; - lines.Append(line); - } - - return stream; + wxTextInputStream text_stream( stream ); + + wxInt32 n = 0; + text_stream >> n; + + for (int i = 0; i < n; i++) + { + DoodleLine *line = new DoodleLine; + text_stream >> line->x1 >> + line->y1 >> + line->x2 >> + line->y2; + lines.Append(line); + } + + return stream; } #endif void DoodleSegment::Draw(wxDC *dc) { - wxNode *node = lines.First(); - while (node) - { - DoodleLine *line = (DoodleLine *)node->Data(); - dc->DrawLine(line->x1, line->y1, line->x2, line->y2); - node = node->Next(); - } + wxNode *node = lines.First(); + while (node) + { + DoodleLine *line = (DoodleLine *)node->Data(); + dc->DrawLine(line->x1, line->y1, line->x2, line->y2); + node = node->Next(); + } } /* - * Implementation of drawing command - */ +* Implementation of drawing command +*/ DrawingCommand::DrawingCommand(const wxString& name, int command, DrawingDocument *ddoc, DoodleSegment *seg): - wxCommand(TRUE, name) +wxCommand(TRUE, name) { - doc = ddoc; - segment = seg; - cmd = command; + doc = ddoc; + segment = seg; + cmd = command; } DrawingCommand::~DrawingCommand(void) { - if (segment) - delete segment; + if (segment) + delete segment; } bool DrawingCommand::Do(void) { - switch (cmd) - { + switch (cmd) + { case DOODLE_CUT: - { - // Cut the last segment - if (doc->GetDoodleSegments().Number() > 0) - { - wxNode *node = doc->GetDoodleSegments().Last(); - if (segment) - delete segment; - - segment = (DoodleSegment *)node->Data(); - delete node; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } - break; - } + { + // Cut the last segment + if (doc->GetDoodleSegments().Number() > 0) + { + wxNode *node = doc->GetDoodleSegments().Last(); + if (segment) + delete segment; + + segment = (DoodleSegment *)node->Data(); + delete node; + + doc->Modify(TRUE); + doc->UpdateAllViews(); + } + break; + } case DOODLE_ADD: - { - doc->GetDoodleSegments().Append(new DoodleSegment(*segment)); - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; + { + doc->GetDoodleSegments().Append(new DoodleSegment(*segment)); + doc->Modify(TRUE); + doc->UpdateAllViews(); + break; + } } - } - return TRUE; + return TRUE; } bool DrawingCommand::Undo(void) { - switch (cmd) - { + switch (cmd) + { case DOODLE_CUT: - { - // Paste the segment - if (segment) - { - doc->GetDoodleSegments().Append(segment); - doc->Modify(TRUE); - doc->UpdateAllViews(); - segment = (DoodleSegment *) NULL; - } - doc->Modify(TRUE); - doc->UpdateAllViews(); - break; - } + { + // Paste the segment + if (segment) + { + doc->GetDoodleSegments().Append(segment); + doc->Modify(TRUE); + doc->UpdateAllViews(); + segment = (DoodleSegment *) NULL; + } + doc->Modify(TRUE); + doc->UpdateAllViews(); + break; + } case DOODLE_ADD: - { - // Cut the last segment - if (doc->GetDoodleSegments().Number() > 0) - { - wxNode *node = doc->GetDoodleSegments().Last(); - DoodleSegment *seg = (DoodleSegment *)node->Data(); - delete seg; - delete node; - - doc->Modify(TRUE); - doc->UpdateAllViews(); - } + { + // Cut the last segment + if (doc->GetDoodleSegments().Number() > 0) + { + wxNode *node = doc->GetDoodleSegments().Last(); + DoodleSegment *seg = (DoodleSegment *)node->Data(); + delete seg; + delete node; + + doc->Modify(TRUE); + doc->UpdateAllViews(); + } + } } - } - return TRUE; + return TRUE; } IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument) @@ -338,7 +338,7 @@ IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument) bool TextEditDocument::OnSaveDocument(const wxString& filename) { TextEditView *view = (TextEditView *)GetFirstView(); - + if (!view->textsw->SaveFile(filename)) return FALSE; Modify(FALSE); @@ -350,7 +350,7 @@ bool TextEditDocument::OnOpenDocument(const wxString& filename) TextEditView *view = (TextEditView *)GetFirstView(); if (!view->textsw->LoadFile(filename)) return FALSE; - + SetFilename(filename, TRUE); Modify(FALSE); UpdateAllViews(); @@ -359,21 +359,21 @@ bool TextEditDocument::OnOpenDocument(const wxString& filename) bool TextEditDocument::IsModified(void) const { - TextEditView *view = (TextEditView *)GetFirstView(); - if (view) - { - return (wxDocument::IsModified() || view->textsw->IsModified()); - } - else - return wxDocument::IsModified(); + TextEditView *view = (TextEditView *)GetFirstView(); + if (view) + { + return (wxDocument::IsModified() || view->textsw->IsModified()); + } + else + return wxDocument::IsModified(); } void TextEditDocument::Modify(bool mod) { - TextEditView *view = (TextEditView *)GetFirstView(); - - wxDocument::Modify(mod); - - if (!mod && view && view->textsw) - view->textsw->DiscardEdits(); + TextEditView *view = (TextEditView *)GetFirstView(); + + wxDocument::Modify(mod); + + if (!mod && view && view->textsw) + view->textsw->DiscardEdits(); } diff --git a/samples/docview/doc.h b/samples/docview/doc.h index 2842a32315..06ec872828 100644 --- a/samples/docview/doc.h +++ b/samples/docview/doc.h @@ -21,53 +21,53 @@ // Plots a line from one point to the other class DoodleLine: public wxObject { - public: - wxInt32 x1; - wxInt32 y1; - wxInt32 x2; - wxInt32 y2; +public: + wxInt32 x1; + wxInt32 y1; + wxInt32 x2; + wxInt32 y2; }; // Contains a list of lines: represents a mouse-down doodle class DoodleSegment: public wxObject { - public: - wxList lines; - - DoodleSegment(void); - DoodleSegment(DoodleSegment& seg); - ~DoodleSegment(void); - - void Draw(wxDC *dc); +public: + wxList lines; + + DoodleSegment(void); + DoodleSegment(DoodleSegment& seg); + ~DoodleSegment(void); + + void Draw(wxDC *dc); #if wxUSE_STD_IOSTREAM - ostream& SaveObject(ostream& text_stream); - istream& LoadObject(istream& text_stream); + ostream& SaveObject(ostream& text_stream); + istream& LoadObject(istream& text_stream); #else - wxOutputStream& SaveObject(wxOutputStream& stream); - wxInputStream& LoadObject(wxInputStream& stream); + wxOutputStream& SaveObject(wxOutputStream& stream); + wxInputStream& LoadObject(wxInputStream& stream); #endif - + }; class DrawingDocument: public wxDocument { - DECLARE_DYNAMIC_CLASS(DrawingDocument) - private: - public: - wxList doodleSegments; - - DrawingDocument(void); - ~DrawingDocument(void); - + DECLARE_DYNAMIC_CLASS(DrawingDocument) +private: +public: + wxList doodleSegments; + + DrawingDocument(void); + ~DrawingDocument(void); + #if wxUSE_STD_IOSTREAM - ostream& SaveObject(ostream& text_stream); - istream& LoadObject(istream& text_stream); + ostream& SaveObject(ostream& text_stream); + istream& LoadObject(istream& text_stream); #else - wxOutputStream& SaveObject(wxOutputStream& stream); - wxInputStream& LoadObject(wxInputStream& stream); + wxOutputStream& SaveObject(wxOutputStream& stream); + wxInputStream& LoadObject(wxInputStream& stream); #endif - - inline wxList& GetDoodleSegments(void) const { return (wxList&) doodleSegments; }; + + inline wxList& GetDoodleSegments(void) const { return (wxList&) doodleSegments; }; }; #define DOODLE_CUT 1 @@ -75,34 +75,34 @@ class DrawingDocument: public wxDocument class DrawingCommand: public wxCommand { - protected: - DoodleSegment *segment; - DrawingDocument *doc; - int cmd; - public: - DrawingCommand(const wxString& name, int cmd, DrawingDocument *ddoc, DoodleSegment *seg); - ~DrawingCommand(void); - - bool Do(void); - bool Undo(void); +protected: + DoodleSegment *segment; + DrawingDocument *doc; + int cmd; +public: + DrawingCommand(const wxString& name, int cmd, DrawingDocument *ddoc, DoodleSegment *seg); + ~DrawingCommand(void); + + bool Do(void); + bool Undo(void); }; class TextEditDocument: public wxDocument { - DECLARE_DYNAMIC_CLASS(TextEditDocument) - private: - public: + DECLARE_DYNAMIC_CLASS(TextEditDocument) +private: +public: /* - ostream& SaveObject(ostream& stream); - istream& LoadObject(istream& stream); -*/ - virtual bool OnSaveDocument(const wxString& filename); - virtual bool OnOpenDocument(const wxString& filename); - virtual bool IsModified(void) const; - virtual void Modify(bool mod); - - TextEditDocument(void) {} - ~TextEditDocument(void) {} +ostream& SaveObject(ostream& stream); +istream& LoadObject(istream& stream); + */ + virtual bool OnSaveDocument(const wxString& filename); + virtual bool OnOpenDocument(const wxString& filename); + virtual bool IsModified(void) const; + virtual void Modify(bool mod); + + TextEditDocument(void) {} + ~TextEditDocument(void) {} }; diff --git a/samples/docview/docview.cpp b/samples/docview/docview.cpp index b142b5f843..977e9dde6f 100644 --- a/samples/docview/docview.cpp +++ b/samples/docview/docview.cpp @@ -14,10 +14,10 @@ #endif /* - * Purpose: Document/view architecture demo for wxWindows class library - * Run with no arguments for multiple top-level windows, -single - * for a single window. - */ +* Purpose: Document/view architecture demo for wxWindows class library +* Run with no arguments for multiple top-level windows, -single +* for a single window. +*/ // For compilers that support precompilation, includes "wx/wx.h". @@ -56,98 +56,98 @@ MyApp::MyApp(void) bool MyApp::OnInit(void) { - //// Find out if we're: - //// SDI : multiple windows and documents but not MDI - //// MDI : multiple windows and documents with containing frame - MSW only) - /// single window : (one document at a time, only one frame, as in Windows Write) - if (argc > 1) - { - if (wxStrcmp(argv[1], _T("-single")) == 0) + //// Find out if we're: + //// multiple window: multiple windows, each view in a separate frame + //// single window: one view (within the main frame) and one document at a time, as in Windows Write. + //// In single window mode, we only allow one document type + if (argc > 1) { - singleWindowMode = TRUE; + if (wxStrcmp(argv[1], _T("-single")) == 0) + { + singleWindowMode = TRUE; + } } - } - - //// Create a document manager - m_docManager = new wxDocManager; - - //// Create a template relating drawing documents to their views - (void) new wxDocTemplate(m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View", - CLASSINFO(DrawingDocument), CLASSINFO(DrawingView)); - - if (singleWindowMode) - { - // If we've only got one window, we only get to edit - // one document at a time. Therefore no text editing, just - // doodling. - m_docManager->SetMaxDocsOpen(1); - } - else - //// Create a template relating text documents to their views - (void) new wxDocTemplate(m_docManager, "Text", "*.txt", "", "txt", "Text Doc", "Text View", - CLASSINFO(TextEditDocument), CLASSINFO(TextEditView)); - - //// Create the main frame window - frame = new MyFrame(m_docManager, (wxFrame *) NULL, -1, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); - - //// Give it an icon (this is ignored in MDI mode: uses resources) + + //// Create a document manager + m_docManager = new wxDocManager; + + //// Create a template relating drawing documents to their views + (void) new wxDocTemplate(m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View", + CLASSINFO(DrawingDocument), CLASSINFO(DrawingView)); + + if (singleWindowMode) + { + // If we've only got one window, we only get to edit + // one document at a time. Therefore no text editing, just + // doodling. + m_docManager->SetMaxDocsOpen(1); + } + else + //// Create a template relating text documents to their views + (void) new wxDocTemplate(m_docManager, "Text", "*.txt", "", "txt", "Text Doc", "Text View", + CLASSINFO(TextEditDocument), CLASSINFO(TextEditView)); + + //// Create the main frame window + frame = new MyFrame(m_docManager, (wxFrame *) NULL, -1, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); + + //// Give it an icon (this is ignored in MDI mode: uses resources) #ifdef __WXMSW__ - frame->SetIcon(wxIcon("doc_icn")); + frame->SetIcon(wxIcon("doc_icn")); #endif - - //// Make a menubar - wxMenu *file_menu = new wxMenu; - wxMenu *edit_menu = (wxMenu *) NULL; - - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); - - if (singleWindowMode) - { - file_menu->Append(wxID_CLOSE, "&Close"); - file_menu->Append(wxID_SAVE, "&Save"); - file_menu->Append(wxID_SAVEAS, "Save &As..."); + + //// Make a menubar + wxMenu *file_menu = new wxMenu; + wxMenu *edit_menu = (wxMenu *) NULL; + + file_menu->Append(wxID_NEW, "&New..."); + file_menu->Append(wxID_OPEN, "&Open..."); + + if (singleWindowMode) + { + file_menu->Append(wxID_CLOSE, "&Close"); + file_menu->Append(wxID_SAVE, "&Save"); + file_menu->Append(wxID_SAVEAS, "Save &As..."); + file_menu->AppendSeparator(); + file_menu->Append(wxID_PRINT, "&Print..."); + file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); + file_menu->Append(wxID_PREVIEW, "Print Pre&view"); + + edit_menu = new wxMenu; + edit_menu->Append(wxID_UNDO, "&Undo"); + edit_menu->Append(wxID_REDO, "&Redo"); + edit_menu->AppendSeparator(); + edit_menu->Append(DOCVIEW_CUT, "&Cut last segment"); + + frame->editMenu = edit_menu; + } + file_menu->AppendSeparator(); - file_menu->Append(wxID_PRINT, "&Print..."); - file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); - file_menu->Append(wxID_PREVIEW, "Print Pre&view"); - - edit_menu = new wxMenu; - edit_menu->Append(wxID_UNDO, "&Undo"); - edit_menu->Append(wxID_REDO, "&Redo"); - edit_menu->AppendSeparator(); - edit_menu->Append(DOCVIEW_CUT, "&Cut last segment"); - - frame->editMenu = edit_menu; - } - - file_menu->AppendSeparator(); - file_menu->Append(wxID_EXIT, "E&xit"); - - // A nice touch: a history of files visited. Use this menu. - m_docManager->FileHistoryUseMenu(file_menu); - - wxMenu *help_menu = new wxMenu; - help_menu->Append(DOCVIEW_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - if (edit_menu) - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(help_menu, "&Help"); - - if (singleWindowMode) - frame->canvas = frame->CreateCanvas((wxView *) NULL, frame); - - //// Associate the menu bar with the frame - frame->SetMenuBar(menu_bar); - - frame->Centre(wxBOTH); - frame->Show(TRUE); - - SetTopWindow(frame); - return TRUE; + file_menu->Append(wxID_EXIT, "E&xit"); + + // A nice touch: a history of files visited. Use this menu. + m_docManager->FileHistoryUseMenu(file_menu); + + wxMenu *help_menu = new wxMenu; + help_menu->Append(DOCVIEW_ABOUT, "&About"); + + wxMenuBar *menu_bar = new wxMenuBar; + + menu_bar->Append(file_menu, "&File"); + if (edit_menu) + menu_bar->Append(edit_menu, "&Edit"); + menu_bar->Append(help_menu, "&Help"); + + if (singleWindowMode) + frame->canvas = frame->CreateCanvas((wxView *) NULL, frame); + + //// Associate the menu bar with the frame + frame->SetMenuBar(menu_bar); + + frame->Centre(wxBOTH); + frame->Show(TRUE); + + SetTopWindow(frame); + return TRUE; } int MyApp::OnExit(void) @@ -157,85 +157,85 @@ int MyApp::OnExit(void) } /* - * Centralised code for creating a document frame. - * Called from view.cpp, when a view is created, but not used at all - * in 'single window' mode. - */ - +* Centralised code for creating a document frame. +* Called from view.cpp, when a view is created, but not used at all +* in 'single window' mode. +*/ + wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas) { - //// Make a child frame - wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), -1, "Child Frame", + //// Make a child frame + wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), -1, "Child Frame", wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE); - + #ifdef __WXMSW__ - subframe->SetIcon(wxString(isCanvas ? "chrt_icn" : "notepad_icn")); + subframe->SetIcon(wxString(isCanvas ? "chrt_icn" : "notepad_icn")); #endif - - //// Make a menubar - wxMenu *file_menu = new wxMenu; - - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); - file_menu->Append(wxID_CLOSE, "&Close"); - file_menu->Append(wxID_SAVE, "&Save"); - file_menu->Append(wxID_SAVEAS, "Save &As..."); - - if (isCanvas) - { - file_menu->AppendSeparator(); - file_menu->Append(wxID_PRINT, "&Print..."); - file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); - file_menu->Append(wxID_PREVIEW, "Print Pre&view"); - } - - wxMenu *edit_menu = (wxMenu *) NULL; - - if (isCanvas) - { - edit_menu = new wxMenu; - edit_menu->Append(wxID_UNDO, "&Undo"); - edit_menu->Append(wxID_REDO, "&Redo"); - edit_menu->AppendSeparator(); - edit_menu->Append(DOCVIEW_CUT, "&Cut last segment"); - - doc->GetCommandProcessor()->SetEditMenu(edit_menu); - } - - wxMenu *help_menu = new wxMenu; - help_menu->Append(DOCVIEW_ABOUT, "&About"); - - wxMenuBar *menu_bar = new wxMenuBar; - - menu_bar->Append(file_menu, "&File"); - if (isCanvas) - menu_bar->Append(edit_menu, "&Edit"); - menu_bar->Append(help_menu, "&Help"); - - //// Associate the menu bar with the frame - subframe->SetMenuBar(menu_bar); - - subframe->Centre(wxBOTH); - - return subframe; + + //// Make a menubar + wxMenu *file_menu = new wxMenu; + + file_menu->Append(wxID_NEW, "&New..."); + file_menu->Append(wxID_OPEN, "&Open..."); + file_menu->Append(wxID_CLOSE, "&Close"); + file_menu->Append(wxID_SAVE, "&Save"); + file_menu->Append(wxID_SAVEAS, "Save &As..."); + + if (isCanvas) + { + file_menu->AppendSeparator(); + file_menu->Append(wxID_PRINT, "&Print..."); + file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); + file_menu->Append(wxID_PREVIEW, "Print Pre&view"); + } + + wxMenu *edit_menu = (wxMenu *) NULL; + + if (isCanvas) + { + edit_menu = new wxMenu; + edit_menu->Append(wxID_UNDO, "&Undo"); + edit_menu->Append(wxID_REDO, "&Redo"); + edit_menu->AppendSeparator(); + edit_menu->Append(DOCVIEW_CUT, "&Cut last segment"); + + doc->GetCommandProcessor()->SetEditMenu(edit_menu); + } + + wxMenu *help_menu = new wxMenu; + help_menu->Append(DOCVIEW_ABOUT, "&About"); + + wxMenuBar *menu_bar = new wxMenuBar; + + menu_bar->Append(file_menu, "&File"); + if (isCanvas) + menu_bar->Append(edit_menu, "&Edit"); + menu_bar->Append(help_menu, "&Help"); + + //// Associate the menu bar with the frame + subframe->SetMenuBar(menu_bar); + + subframe->Centre(wxBOTH); + + return subframe; } /* - * This is the top-level window of the application. - */ - +* This is the top-level window of the application. +*/ + IMPLEMENT_CLASS(MyFrame, wxDocParentFrame) BEGIN_EVENT_TABLE(MyFrame, wxDocParentFrame) EVT_MENU(DOCVIEW_ABOUT, MyFrame::OnAbout) END_EVENT_TABLE() MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, const long type): - wxDocParentFrame(manager, frame, id, title, pos, size, type) + const wxPoint& pos, const wxSize& size, const long type): +wxDocParentFrame(manager, frame, id, title, pos, size, type) { - // This pointer only needed if in single window mode - canvas = (MyCanvas *) NULL; - editMenu = (wxMenu *) NULL; + // This pointer only needed if in single window mode + canvas = (MyCanvas *) NULL; + editMenu = (wxMenu *) NULL; } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) @@ -248,23 +248,23 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) // if in 'single window' mode. MyCanvas *MyFrame::CreateCanvas(wxView *view, wxFrame *parent) { - int width, height; - parent->GetClientSize(&width, &height); - - // Non-retained canvas - MyCanvas *canvas = new MyCanvas(view, parent, wxPoint(0, 0), wxSize(width, height), 0); - canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); - - // Give it scrollbars - canvas->SetScrollbars(20, 20, 50, 50); - canvas->SetBackgroundColour(*wxWHITE); - canvas->Clear(); - - return canvas; + int width, height; + parent->GetClientSize(&width, &height); + + // Non-retained canvas + MyCanvas *canvas = new MyCanvas(view, parent, wxPoint(0, 0), wxSize(width, height), 0); + canvas->SetCursor(wxCursor(wxCURSOR_PENCIL)); + + // Give it scrollbars + canvas->SetScrollbars(20, 20, 50, 50); + canvas->SetBackgroundColour(*wxWHITE); + canvas->Clear(); + + return canvas; } MyFrame *GetMainFrame(void) { - return frame; + return frame; } diff --git a/samples/docview/docview.h b/samples/docview/docview.h index fb9201406f..473e8b526e 100644 --- a/samples/docview/docview.h +++ b/samples/docview/docview.h @@ -23,14 +23,14 @@ class wxDocManager; // Define a new application class MyApp: public wxApp { - public: +public: MyApp(void); bool OnInit(void); int OnExit(void); - + wxFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas); - - protected: + +protected: wxDocManager* m_docManager; }; @@ -40,20 +40,20 @@ DECLARE_APP(MyApp) class MyCanvas; class MyFrame: public wxDocParentFrame { - DECLARE_CLASS(MyFrame) - public: - wxMenu *editMenu; - - // This pointer only needed if in single window mode - MyCanvas *canvas; - - MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, - const long type); - - void OnAbout(wxCommandEvent& event); - MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); - -DECLARE_EVENT_TABLE() + DECLARE_CLASS(MyFrame) +public: + wxMenu *editMenu; + + // This pointer only needed if in single window mode + MyCanvas *canvas; + + MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, + const long type); + + void OnAbout(wxCommandEvent& event); + MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); + + DECLARE_EVENT_TABLE() }; extern MyFrame *GetMainFrame(void); diff --git a/samples/docview/view.cpp b/samples/docview/view.cpp index 61cec41421..06e35d3a84 100644 --- a/samples/docview/view.cpp +++ b/samples/docview/view.cpp @@ -46,74 +46,74 @@ END_EVENT_TABLE() // windows for displaying the view. bool DrawingView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) { - if (!singleWindowMode) - { - // Multiple windows - frame = wxGetApp().CreateChildFrame(doc, this, TRUE); - frame->SetTitle("DrawingView"); - - canvas = GetMainFrame()->CreateCanvas(this, frame); + if (!singleWindowMode) + { + // Multiple windows + frame = wxGetApp().CreateChildFrame(doc, this, TRUE); + frame->SetTitle("DrawingView"); + + canvas = GetMainFrame()->CreateCanvas(this, frame); #ifdef __X__ - // X seems to require a forced resize - int x, y; - frame->GetSize(&x, &y); - frame->SetSize(-1, -1, x, y); + // X seems to require a forced resize + int x, y; + frame->GetSize(&x, &y); + frame->SetSize(-1, -1, x, y); #endif - frame->Show(TRUE); - } - else - { - // Single-window mode - frame = GetMainFrame(); - canvas = GetMainFrame()->canvas; - canvas->view = this; - - // Associate the appropriate frame with this view. - SetFrame(frame); - - // Make sure the document manager knows that this is the - // current view. - Activate(TRUE); - - // Initialize the edit menu Undo and Redo items - doc->GetCommandProcessor()->SetEditMenu(((MyFrame *)frame)->editMenu); - doc->GetCommandProcessor()->Initialize(); - } - - return TRUE; + frame->Show(TRUE); + } + else + { + // Single-window mode + frame = GetMainFrame(); + canvas = GetMainFrame()->canvas; + canvas->view = this; + + // Associate the appropriate frame with this view. + SetFrame(frame); + + // Make sure the document manager knows that this is the + // current view. + Activate(TRUE); + + // Initialize the edit menu Undo and Redo items + doc->GetCommandProcessor()->SetEditMenu(((MyFrame *)frame)->editMenu); + doc->GetCommandProcessor()->Initialize(); + } + + return TRUE; } // Sneakily gets used for default print/preview // as well as drawing on the screen. void DrawingView::OnDraw(wxDC *dc) { - dc->SetFont(*wxNORMAL_FONT); - dc->SetPen(*wxBLACK_PEN); - - wxNode *node = ((DrawingDocument *)GetDocument())->GetDoodleSegments().First(); - while (node) - { - DoodleSegment *seg = (DoodleSegment *)node->Data(); - seg->Draw(dc); - node = node->Next(); - } + dc->SetFont(*wxNORMAL_FONT); + dc->SetPen(*wxBLACK_PEN); + + wxNode *node = ((DrawingDocument *)GetDocument())->GetDoodleSegments().First(); + while (node) + { + DoodleSegment *seg = (DoodleSegment *)node->Data(); + seg->Draw(dc); + node = node->Next(); + } } void DrawingView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint)) { - if (canvas) - canvas->Refresh(); - + if (canvas) + canvas->Refresh(); + /* Is the following necessary? #ifdef __WXMSW__ - if (canvas) - canvas->Refresh(); + if (canvas) + canvas->Refresh(); #else - if (canvas) + if (canvas) { - wxClientDC dc(canvas); - dc.Clear(); - OnDraw(& dc); + wxClientDC dc(canvas); + dc.Clear(); + OnDraw(& dc); } #endif */ @@ -122,29 +122,29 @@ void DrawingView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint)) // Clean up windows used for displaying the view. bool DrawingView::OnClose(bool deleteWindow) { - if (!GetDocument()->Close()) - return FALSE; - - // Clear the canvas in case we're in single-window mode, - // and the canvas stays. - canvas->Clear(); - canvas->view = (wxView *) NULL; - canvas = (MyCanvas *) NULL; - - wxString s(wxTheApp->GetAppName()); - if (frame) - frame->SetTitle(s); - - SetFrame((wxFrame *) NULL); - - Activate(FALSE); - - if (deleteWindow && !singleWindowMode) - { - delete frame; + if (!GetDocument()->Close()) + return FALSE; + + // Clear the canvas in case we're in single-window mode, + // and the canvas stays. + canvas->Clear(); + canvas->view = (wxView *) NULL; + canvas = (MyCanvas *) NULL; + + wxString s(wxTheApp->GetAppName()); + if (frame) + frame->SetTitle(s); + + SetFrame((wxFrame *) NULL); + + Activate(FALSE); + + if (deleteWindow && !singleWindowMode) + { + delete frame; + return TRUE; + } return TRUE; - } - return TRUE; } void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) ) @@ -157,24 +157,24 @@ IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView) bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) { - frame = wxGetApp().CreateChildFrame(doc, this, FALSE); - - int width, height; - frame->GetClientSize(&width, &height); - textsw = new MyTextWindow(this, frame, wxPoint(0, 0), wxSize(width, height), wxTE_MULTILINE); - frame->SetTitle("TextEditView"); - + frame = wxGetApp().CreateChildFrame(doc, this, FALSE); + + int width, height; + frame->GetClientSize(&width, &height); + textsw = new MyTextWindow(this, frame, wxPoint(0, 0), wxSize(width, height), wxTE_MULTILINE); + frame->SetTitle("TextEditView"); + #ifdef __X__ - // X seems to require a forced resize - int x, y; - frame->GetSize(&x, &y); - frame->SetSize(-1, -1, x, y); + // X seems to require a forced resize + int x, y; + frame->GetSize(&x, &y); + frame->SetSize(-1, -1, x, y); #endif - - frame->Show(TRUE); - Activate(TRUE); - - return TRUE; + + frame->Show(TRUE); + Activate(TRUE); + + return TRUE; } // Handled by wxTextWindow @@ -188,22 +188,22 @@ void TextEditView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) bool TextEditView::OnClose(bool deleteWindow) { - if (!GetDocument()->Close()) - return FALSE; + if (!GetDocument()->Close()) + return FALSE; - Activate(FALSE); - - if (deleteWindow) - { - delete frame; + Activate(FALSE); + + if (deleteWindow) + { + delete frame; + return TRUE; + } return TRUE; - } - return TRUE; } /* - * Window implementations - */ +* Window implementations +*/ BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent) @@ -211,76 +211,76 @@ END_EVENT_TABLE() // Define a constructor for my canvas MyCanvas::MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): - wxScrolledWindow(frame, -1, pos, size, style) + wxScrolledWindow(frame, -1, pos, size, style) { - view = v; + view = v; } // Define the repainting behaviour void MyCanvas::OnDraw(wxDC& dc) { - if (view) - view->OnDraw(& dc); + if (view) + view->OnDraw(& dc); } // This implements a tiny doodling program. Drag the mouse using // the left button. void MyCanvas::OnMouseEvent(wxMouseEvent& event) { - if (!view) - return; + if (!view) + return; - static DoodleSegment *currentSegment = (DoodleSegment *) NULL; - - wxClientDC dc(this); - PrepareDC(dc); - - dc.SetPen(*wxBLACK_PEN); - - wxPoint pt(event.GetLogicalPosition(dc)); - - if (currentSegment && event.LeftUp()) - { - if (currentSegment->lines.Number() == 0) - { - delete currentSegment; - currentSegment = (DoodleSegment *) NULL; - } - else - { - // We've got a valid segment on mouse left up, so store it. - DrawingDocument *doc = (DrawingDocument *)view->GetDocument(); - - doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment)); - - view->GetDocument()->Modify(TRUE); - currentSegment = (DoodleSegment *) NULL; - } - } - - if (xpos > -1 && ypos > -1 && event.Dragging()) - { - if (!currentSegment) - currentSegment = new DoodleSegment; - - DoodleLine *newLine = new DoodleLine; - newLine->x1 = (long)xpos; - newLine->y1 = (long)ypos; - newLine->x2 = pt.x; - newLine->y2 = pt.y; - currentSegment->lines.Append(newLine); + static DoodleSegment *currentSegment = (DoodleSegment *) NULL; - dc.DrawLine( (long)xpos, (long)ypos, pt.x, pt.y); - } - xpos = pt.x; - ypos = pt.y; + wxClientDC dc(this); + PrepareDC(dc); + + dc.SetPen(*wxBLACK_PEN); + + wxPoint pt(event.GetLogicalPosition(dc)); + + if (currentSegment && event.LeftUp()) + { + if (currentSegment->lines.Number() == 0) + { + delete currentSegment; + currentSegment = (DoodleSegment *) NULL; + } + else + { + // We've got a valid segment on mouse left up, so store it. + DrawingDocument *doc = (DrawingDocument *)view->GetDocument(); + + doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment)); + + view->GetDocument()->Modify(TRUE); + currentSegment = (DoodleSegment *) NULL; + } + } + + if (xpos > -1 && ypos > -1 && event.Dragging()) + { + if (!currentSegment) + currentSegment = new DoodleSegment; + + DoodleLine *newLine = new DoodleLine; + newLine->x1 = (long)xpos; + newLine->y1 = (long)ypos; + newLine->x2 = pt.x; + newLine->y2 = pt.y; + currentSegment->lines.Append(newLine); + + dc.DrawLine( (long)xpos, (long)ypos, pt.x, pt.y); + } + xpos = pt.x; + ypos = pt.y; } // Define a constructor for my text subwindow MyTextWindow::MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style): - wxTextCtrl(frame, -1, "", pos, size, style) + wxTextCtrl(frame, -1, "", pos, size, style) { - view = v; + view = v; } diff --git a/samples/docview/view.h b/samples/docview/view.h index d69cef8fec..950d8b6dcd 100644 --- a/samples/docview/view.h +++ b/samples/docview/view.h @@ -20,19 +20,19 @@ class MyCanvas: public wxScrolledWindow { - public: +public: wxView *view; MyCanvas(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style); virtual void OnDraw(wxDC& dc); void OnMouseEvent(wxMouseEvent& event); - -DECLARE_EVENT_TABLE() + + DECLARE_EVENT_TABLE() }; class MyTextWindow: public wxTextCtrl { - public: +public: wxView *view; MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style); @@ -40,40 +40,40 @@ class MyTextWindow: public wxTextCtrl class DrawingView: public wxView { - DECLARE_DYNAMIC_CLASS(DrawingView) - private: - public: - wxFrame *frame; - MyCanvas *canvas; - - DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; }; - ~DrawingView(void) {}; - - bool OnCreate(wxDocument *doc, long flags); - void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); - bool OnClose(bool deleteWindow = TRUE); - - void OnCut(wxCommandEvent& event); - -DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(DrawingView) +private: +public: + wxFrame *frame; + MyCanvas *canvas; + + DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; }; + ~DrawingView(void) {}; + + bool OnCreate(wxDocument *doc, long flags); + void OnDraw(wxDC *dc); + void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); + bool OnClose(bool deleteWindow = TRUE); + + void OnCut(wxCommandEvent& event); + + DECLARE_EVENT_TABLE() }; class TextEditView: public wxView { - DECLARE_DYNAMIC_CLASS(TextEditView) - private: - public: - wxFrame *frame; - MyTextWindow *textsw; - - TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } - ~TextEditView(void) {} - - bool OnCreate(wxDocument *doc, long flags); - void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); - bool OnClose(bool deleteWindow = TRUE); + DECLARE_DYNAMIC_CLASS(TextEditView) +private: +public: + wxFrame *frame; + MyTextWindow *textsw; + + TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } + ~TextEditView(void) {} + + bool OnCreate(wxDocument *doc, long flags); + void OnDraw(wxDC *dc); + void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); + bool OnClose(bool deleteWindow = TRUE); }; #endif diff --git a/samples/docvwmdi/DocVwMDIVC.dsp b/samples/docvwmdi/DocVwMDIVC.dsp new file mode 100644 index 0000000000..81155c105f --- /dev/null +++ b/samples/docvwmdi/DocVwMDIVC.dsp @@ -0,0 +1,227 @@ +# Microsoft Developer Studio Project File - Name="DocVwMDIVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DocVwMDIVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DocVwMDIVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DocVwMDIVC.mak" CFG="DocVwMDIVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DocVwMDIVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DocVwMDIVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DocVwMDIVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DocVwMDIVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DocVwMDIVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/docview.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/docview.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/docview.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/docview.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DocVwMDIVC - Win32 Release" +# Name "DocVwMDIVC - Win32 Debug" +# Name "DocVwMDIVC - Win32 Debug DLL" +# Name "DocVwMDIVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\doc.cpp + +!IF "$(CFG)" == "DocVwMDIVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\doc.h +# End Source File +# Begin Source File + +SOURCE=.\docview.cpp + +!IF "$(CFG)" == "DocVwMDIVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\docview.h +# End Source File +# Begin Source File + +SOURCE=.\docview.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\view.cpp + +!IF "$(CFG)" == "DocVwMDIVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DocVwMDIVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\view.h +# End Source File +# End Target +# End Project diff --git a/samples/docvwmdi/DocVwMDIVC.dsw b/samples/docvwmdi/DocVwMDIVC.dsw new file mode 100644 index 0000000000..d8aef2bba8 --- /dev/null +++ b/samples/docvwmdi/DocVwMDIVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DocVwMDIVC"=.\DocVwMDIVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/docvwmdi/docview.cpp b/samples/docvwmdi/docview.cpp index 9889a2f146..9be2d6edab 100644 --- a/samples/docvwmdi/docview.cpp +++ b/samples/docvwmdi/docview.cpp @@ -78,17 +78,17 @@ bool MyApp::OnInit(void) wxMenu *file_menu = new wxMenu; wxMenu *edit_menu = (wxMenu *) NULL; - file_menu->Append(wxID_NEW, "&New..."); - file_menu->Append(wxID_OPEN, "&Open..."); + file_menu->Append(wxID_NEW, "&New...\tCtrl-N"); + file_menu->Append(wxID_OPEN, "&Open...\tCtrl-X"); file_menu->AppendSeparator(); - file_menu->Append(wxID_EXIT, "E&xit"); + file_menu->Append(wxID_EXIT, "E&xit\tAlt-X"); // A nice touch: a history of files visited. Use this menu. m_docManager->FileHistoryUseMenu(file_menu); wxMenu *help_menu = new wxMenu; - help_menu->Append(DOCVIEW_ABOUT, "&About"); + help_menu->Append(DOCVIEW_ABOUT, "&About\tF1"); wxMenuBar *menu_bar = new wxMenuBar; diff --git a/samples/dragimag/DragimagVC.dsp b/samples/dragimag/DragimagVC.dsp new file mode 100644 index 0000000000..3d46eeac63 --- /dev/null +++ b/samples/dragimag/DragimagVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="DragimagVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DragimagVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DragimagVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DragimagVC.mak" CFG="DragimagVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DragimagVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DragimagVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DragimagVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DragimagVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DragimagVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dragimag.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DragimagVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dragimag.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DragimagVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dragimag.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DragimagVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dragimag.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DragimagVC - Win32 Release" +# Name "DragimagVC - Win32 Debug" +# Name "DragimagVC - Win32 Debug DLL" +# Name "DragimagVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\dragimag.cpp + +!IF "$(CFG)" == "DragimagVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DragimagVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DragimagVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DragimagVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dragimag.h +# End Source File +# Begin Source File + +SOURCE=.\dragimag.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/dragimag/DragimagVC.dsw b/samples/dragimag/DragimagVC.dsw new file mode 100644 index 0000000000..a132eba261 --- /dev/null +++ b/samples/dragimag/DragimagVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DragimagVC"=.\DragimagVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/dragimag/Makefile.in b/samples/dragimag/Makefile.in index 1e8c6416bf..5fac7499b9 100644 --- a/samples/dragimag/Makefile.in +++ b/samples/dragimag/Makefile.in @@ -6,6 +6,7 @@ top_builddir = ../.. program_dir = samples/dragimag PROGRAM=dragimag +DATAFILES=backgrnd.png shape01.png shape02.png shape03.png OBJECTS=$(PROGRAM).o diff --git a/samples/dragimag/makefile.g95 b/samples/dragimag/makefile.g95 index dd6a09ce52..6ffd3941ba 100644 --- a/samples/dragimag/makefile.g95 +++ b/samples/dragimag/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=dragimag OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/drawing/DrawingVC.dsp b/samples/drawing/DrawingVC.dsp new file mode 100644 index 0000000000..073954dab8 --- /dev/null +++ b/samples/drawing/DrawingVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="DrawingVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DrawingVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DrawingVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DrawingVC.mak" CFG="DrawingVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DrawingVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DrawingVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DrawingVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DrawingVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DrawingVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/drawing.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DrawingVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/drawing.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DrawingVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/drawing.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DrawingVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/drawing.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DrawingVC - Win32 Release" +# Name "DrawingVC - Win32 Debug" +# Name "DrawingVC - Win32 Debug DLL" +# Name "DrawingVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\drawing.cpp + +!IF "$(CFG)" == "DrawingVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DrawingVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DrawingVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DrawingVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\drawing.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/drawing/DrawingVC.dsw b/samples/drawing/DrawingVC.dsw new file mode 100644 index 0000000000..ca284093c0 --- /dev/null +++ b/samples/drawing/DrawingVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DrawingVC"=.\DrawingVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index c0bd806ac8..5377d044c8 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -61,20 +61,21 @@ enum ScreenToShow Show_Polygons, Show_Mask, Show_Ops, - Show_Regions + Show_Regions, + Show_Circles }; // ---------------------------------------------------------------------------- // global variables // ---------------------------------------------------------------------------- -static wxBitmap gs_bmpNoMask, - gs_bmpWithColMask, - gs_bmpMask, - gs_bmpWithMask, - gs_bmp4, - gs_bmp4_mono, - gs_bmp36; +static wxBitmap *gs_bmpNoMask = NULL, + *gs_bmpWithColMask = NULL, + *gs_bmpMask = NULL, + *gs_bmpWithMask = NULL, + *gs_bmp4 = NULL, + *gs_bmp4_mono = NULL, + *gs_bmp36 = NULL; // ---------------------------------------------------------------------------- // private classes @@ -92,7 +93,11 @@ public: // return: if OnInit() returns false, the application terminates) virtual bool OnInit(); + virtual int OnExit() { DeleteBitmaps(); return 0; } + protected: + void DeleteBitmaps(); + bool LoadImages(); }; @@ -151,6 +156,7 @@ protected: void DrawImages(wxDC& dc); void DrawWithLogicalOps(wxDC& dc); void DrawRegions(wxDC& dc); + void DrawCircles(wxDC& dc); void DrawDefault(wxDC& dc); private: @@ -182,7 +188,8 @@ enum File_ShowMask, File_ShowOps, File_ShowRegions, - MenuShow_Last = File_ShowRegions, + File_ShowCircles, + MenuShow_Last = File_ShowCircles, MenuOption_First, @@ -237,6 +244,14 @@ IMPLEMENT_APP(MyApp) bool MyApp::LoadImages() { + gs_bmpNoMask = new wxBitmap; + gs_bmpWithColMask = new wxBitmap; + gs_bmpMask = new wxBitmap; + gs_bmpWithMask = new wxBitmap; + gs_bmp4 = new wxBitmap; + gs_bmp4_mono = new wxBitmap; + gs_bmp36 = new wxBitmap; + wxPathList pathList; pathList.Add("."); pathList.Add(".."); @@ -244,41 +259,38 @@ bool MyApp::LoadImages() wxString path = pathList.FindValidPath("pat4.bmp"); if ( !path ) return FALSE; + /* 4 colour bitmap */ - gs_bmp4.LoadFile(path, wxBITMAP_TYPE_BMP); + gs_bmp4->LoadFile(path, wxBITMAP_TYPE_BMP); /* turn into mono-bitmap */ - gs_bmp4_mono.LoadFile(path, wxBITMAP_TYPE_BMP); - wxMask* mask4 = new wxMask(gs_bmp4_mono, *wxBLACK); - gs_bmp4_mono.SetMask(mask4); + gs_bmp4_mono->LoadFile(path, wxBITMAP_TYPE_BMP); + wxMask* mask4 = new wxMask(*gs_bmp4_mono, *wxBLACK); + gs_bmp4_mono->SetMask(mask4); path = pathList.FindValidPath("pat36.bmp"); if ( !path ) return FALSE; - gs_bmp36.LoadFile(path, wxBITMAP_TYPE_BMP); - wxMask* mask36 = new wxMask(gs_bmp36, *wxBLACK); - gs_bmp36.SetMask(mask36); + gs_bmp36->LoadFile(path, wxBITMAP_TYPE_BMP); + wxMask* mask36 = new wxMask(*gs_bmp36, *wxBLACK); + gs_bmp36->SetMask(mask36); path = pathList.FindValidPath("image.bmp"); if ( !path ) return FALSE; - gs_bmpNoMask.LoadFile(path, wxBITMAP_TYPE_BMP); - gs_bmpWithMask.LoadFile(path, wxBITMAP_TYPE_BMP); - gs_bmpWithColMask.LoadFile(path, wxBITMAP_TYPE_BMP); + gs_bmpNoMask->LoadFile(path, wxBITMAP_TYPE_BMP); + gs_bmpWithMask->LoadFile(path, wxBITMAP_TYPE_BMP); + gs_bmpWithColMask->LoadFile(path, wxBITMAP_TYPE_BMP); path = pathList.FindValidPath("mask.bmp"); if ( !path ) return FALSE; - gs_bmpMask.LoadFile(path, wxBITMAP_TYPE_BMP); + gs_bmpMask->LoadFile(path, wxBITMAP_TYPE_BMP); -// This is so wrong, it hurts. -// gs_bmpMask.SetDepth(1); -// wxMask *mask = new wxMask(gs_bmpMask); + wxMask *mask = new wxMask(*gs_bmpMask, *wxBLACK); + gs_bmpWithMask->SetMask(mask); - wxMask *mask = new wxMask(gs_bmpMask, *wxBLACK); - gs_bmpWithMask.SetMask(mask); - - mask = new wxMask(gs_bmpWithColMask, *wxWHITE); - gs_bmpWithColMask.SetMask(mask); + mask = new wxMask(*gs_bmpWithColMask, *wxWHITE); + gs_bmpWithColMask->SetMask(mask); return TRUE; } @@ -301,6 +313,8 @@ bool MyApp::OnInit() "there."); // stop here + DeleteBitmaps(); + return FALSE; } @@ -308,6 +322,17 @@ bool MyApp::OnInit() return TRUE; } +void MyApp::DeleteBitmaps() +{ + delete gs_bmpNoMask; + delete gs_bmpWithColMask; + delete gs_bmpMask; + delete gs_bmpWithMask; + delete gs_bmp4; + delete gs_bmp4_mono; + delete gs_bmp36; +} + // ---------------------------------------------------------------------------- // MyCanvas // ---------------------------------------------------------------------------- @@ -321,7 +346,8 @@ END_EVENT_TABLE() #include "../image/smile.xpm" -MyCanvas::MyCanvas( MyFrame *parent ) : wxScrolledWindow( parent ) +MyCanvas::MyCanvas( MyFrame *parent ) : + wxScrolledWindow( parent, -1, wxDefaultPosition, wxDefaultSize, wxNO_FULL_REPAINT_ON_RESIZE ) { m_owner = parent; m_show = Show_Default; @@ -342,9 +368,10 @@ MyCanvas::MyCanvas( MyFrame *parent ) : wxScrolledWindow( parent ) void MyCanvas::DrawTestPoly( int x, int y,wxDC &dc,int transparent ) { - wxBrush* brush4 = new wxBrush(gs_bmp4); - wxBrush* brush4_mono = new wxBrush(gs_bmp4_mono); - wxBrush* brush36 = new wxBrush(gs_bmp36); +// wxBrush* brush4 = new wxBrush(*gs_bmp4); + wxBrush* brush4 = new wxBrush(*wxBLACK,wxFDIAGONAL_HATCH); + wxBrush* brush4_mono = new wxBrush(*gs_bmp4_mono); + wxBrush* brush36 = new wxBrush(*gs_bmp36); wxPoint todraw[5]; todraw[0].x=(long)x+100; @@ -542,8 +569,10 @@ void MyCanvas::DrawTestLines( int x, int y, int width, wxDC &dc ) { dc.SetPen( wxPen( "black", width, wxSOLID) ); dc.SetBrush( *wxRED_BRUSH ); + dc.DrawText(wxString::Format("Testing lines of width %d", width), x + 10, y - 10); dc.DrawRectangle( x+10, y+10, 100, 190 ); + dc.DrawText("Solid/dot/short dash/long dash/dot dash", x + 150, y + 10); dc.SetPen( wxPen( "black", width, wxSOLID) ); dc.DrawLine( x+20, y+20, 100, y+20 ); dc.SetPen( wxPen( "black", width, wxDOT) ); @@ -555,6 +584,7 @@ void MyCanvas::DrawTestLines( int x, int y, int width, wxDC &dc ) dc.SetPen( wxPen( "black", width, wxDOT_DASH) ); dc.DrawLine( x+20, y+60, 100, y+60 ); + dc.DrawText("Misc hatches", x + 150, y + 70); dc.SetPen( wxPen( "black", width, wxBDIAGONAL_HATCH) ); dc.DrawLine( x+20, y+70, 100, y+70 ); dc.SetPen( wxPen( "black", width, wxCROSSDIAG_HATCH) ); @@ -568,6 +598,7 @@ void MyCanvas::DrawTestLines( int x, int y, int width, wxDC &dc ) dc.SetPen( wxPen( "black", width, wxVERTICAL_HATCH) ); dc.DrawLine( x+20, y+120, 100, y+120 ); + dc.DrawText("User dash", x + 150, y + 140); wxPen ud( "black", width, wxUSER_DASH ); wxDash dash1[1]; dash1[0] = 0; @@ -579,7 +610,7 @@ void MyCanvas::DrawTestLines( int x, int y, int width, wxDC &dc ) dash1[0] = 2; ud.SetDashes( 1, dash1 ); dc.DrawLine( x+20, y+160, 100, y+160 ); - dash1[0] = 0xFF; + dash1[0] = 0x7F; ud.SetDashes( 1, dash1 ); dc.DrawLine( x+20, y+170, 100, y+170 ); } @@ -793,7 +824,7 @@ void MyCanvas::DrawText(wxDC& dc) dc.SetFont( *wxNORMAL_FONT ); wxString text; - dc. SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxTRANSPARENT); for ( int n = -180; n < 180; n += 30 ) { @@ -816,6 +847,24 @@ void MyCanvas::DrawText(wxDC& dc) dc.DrawText( text, 110, 120 ); dc.DrawRectangle( 100, 40, 4, height ); + + // test the logical function effect + wxCoord y = 150; + dc.SetLogicalFunction(wxINVERT); + dc.DrawText( "There should be no text below", 110, 150 ); + dc.DrawRectangle( 110, y, 100, height ); + + // twice drawn inverted should result in invisible + y += height; + dc.DrawText( "Invisible text", 110, y ); + dc.DrawRectangle( 110, y, 100, height ); + dc.DrawText( "Invisible text", 110, y ); + dc.DrawRectangle( 110, y, 100, height ); + dc.SetLogicalFunction(wxCOPY); + + y += height; + dc.DrawRectangle( 110, y, 100, height ); + dc.DrawText( "Visible text", 110, y ); } static const struct @@ -844,16 +893,16 @@ static const struct void MyCanvas::DrawImages(wxDC& dc) { dc.DrawText("original image", 0, 0); - dc.DrawBitmap(gs_bmpNoMask, 0, 20, 0); + dc.DrawBitmap(*gs_bmpNoMask, 0, 20, 0); dc.DrawText("with colour mask", 0, 100); - dc.DrawBitmap(gs_bmpWithColMask, 0, 120, TRUE); + dc.DrawBitmap(*gs_bmpWithColMask, 0, 120, TRUE); dc.DrawText("the mask image", 0, 200); - dc.DrawBitmap(gs_bmpMask, 0, 220, 0); + dc.DrawBitmap(*gs_bmpMask, 0, 220, 0); dc.DrawText("masked image", 0, 300); - dc.DrawBitmap(gs_bmpWithMask, 0, 320, TRUE); + dc.DrawBitmap(*gs_bmpWithMask, 0, 320, TRUE); - int cx = gs_bmpWithColMask.GetWidth(), - cy = gs_bmpWithColMask.GetHeight(); + int cx = gs_bmpWithColMask->GetWidth(), + cy = gs_bmpWithColMask->GetHeight(); wxMemoryDC memDC; for ( size_t n = 0; n < WXSIZEOF(rasterOperations); n++ ) @@ -862,7 +911,7 @@ void MyCanvas::DrawImages(wxDC& dc) y = 20 + 100*(n/4); dc.DrawText(rasterOperations[n].name, x, y - 20); - memDC.SelectObject(gs_bmpWithColMask); + memDC.SelectObject(*gs_bmpWithColMask); dc.Blit(x, y, cx, cy, &memDC, 0, 0, rasterOperations[n].rop, TRUE); } } @@ -903,6 +952,36 @@ void MyCanvas::DrawWithLogicalOps(wxDC& dc) } } +void MyCanvas::DrawCircles(wxDC& dc) +{ + int x = 100, + y = 100, + r = 20; + + dc.DrawText("Some circles", 0, y); + dc.DrawCircle(x, y, r); + dc.DrawCircle(x + 2*r, y, r); + dc.DrawCircle(x + 4*r, y, r); + + y += 2*r; + dc.DrawText("And ellipses", 0, y); + dc.DrawEllipse(x - r, y, 2*r, r); + dc.DrawEllipse(x + r, y, 2*r, r); + dc.DrawEllipse(x + 3*r, y, 2*r, r); + + y += 2*r; + dc.DrawText("And arcs", 0, y); + dc.DrawArc(x - r, y, x + r, y, x, y); + dc.DrawArc(x + 4*r, y, x + 2*r, y, x + 3*r, y); + dc.DrawArc(x + 5*r, y, x + 5*r, y, x + 6*r, y); + + y += 2*r; + dc.DrawEllipticArc(x - r, y, 2*r, r, 0, 90); + dc.DrawEllipticArc(x + r, y, 2*r, r, 90, 180); + dc.DrawEllipticArc(x + 3*r, y, 2*r, r, 180, 270); + dc.DrawEllipticArc(x + 5*r, y, 2*r, r, 270, 360); +} + void MyCanvas::DrawRegions(wxDC& dc) { dc.SetBrush( *wxWHITE_BRUSH ); @@ -938,6 +1017,7 @@ void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event)) { wxPaintDC dc(this); PrepareDC(dc); + m_owner->PrepareDC(dc); dc.SetBackgroundMode( m_owner->m_backgroundMode ); @@ -969,6 +1049,10 @@ void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event)) DrawDefault(dc); break; + case Show_Circles: + DrawCircles(dc); + break; + case Show_Regions: DrawRegions(dc); break; @@ -979,9 +1063,9 @@ void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event)) case Show_Lines: DrawTestLines( 0, 100, 0, dc ); - DrawTestLines( 0, 300, 1, dc ); - DrawTestLines( 0, 500, 2, dc ); - DrawTestLines( 0, 700, 6, dc ); + DrawTestLines( 0, 320, 1, dc ); + DrawTestLines( 0, 540, 2, dc ); + DrawTestLines( 0, 760, 6, dc ); break; case Show_Polygons: @@ -999,6 +1083,13 @@ void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event)) case Show_Ops: DrawWithLogicalOps(dc); break; + + default: + { + dc.SetPen( *wxBLACK_PEN ); + dc.DrawLine( 0,0,100,100 ); + } + } } @@ -1046,7 +1137,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(File_ShowPolygons, "&Polygons screen\tF4"); menuFile->Append(File_ShowMask, "wx&Mask screen\tF5"); menuFile->Append(File_ShowOps, "&ROP screen\tF6"); - menuFile->Append(File_ShowRegions, "Re&gions screen\tF6"); + menuFile->Append(File_ShowRegions, "Re&gions screen\tF7"); + menuFile->Append(File_ShowCircles, "&Circles screen\tF8"); menuFile->AppendSeparator(); menuFile->Append(File_About, "&About...\tCtrl-A", "Show about dialog"); menuFile->AppendSeparator(); @@ -1138,12 +1230,12 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnShow(wxCommandEvent& event) { - m_canvas->Show((ScreenToShow)(event.GetInt() - MenuShow_First)); + m_canvas->Show((ScreenToShow)(event.GetId() - MenuShow_First)); } void MyFrame::OnOption(wxCommandEvent& event) { - switch (event.GetInt()) + switch (event.GetId()) { case MapMode_Text: m_mapMode = wxMM_TEXT; diff --git a/samples/dynamic/DynamicVC.dsp b/samples/dynamic/DynamicVC.dsp new file mode 100644 index 0000000000..d636d30398 --- /dev/null +++ b/samples/dynamic/DynamicVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="DynamicVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DynamicVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DynamicVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DynamicVC.mak" CFG="DynamicVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DynamicVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DynamicVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DynamicVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DynamicVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DynamicVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dynamic.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DynamicVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dynamic.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DynamicVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dynamic.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "DynamicVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dynamic.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DynamicVC - Win32 Release" +# Name "DynamicVC - Win32 Debug" +# Name "DynamicVC - Win32 Debug DLL" +# Name "DynamicVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\dynamic.cpp + +!IF "$(CFG)" == "DynamicVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DynamicVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DynamicVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DynamicVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dynamic.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/dynamic/DynamicVC.dsw b/samples/dynamic/DynamicVC.dsw new file mode 100644 index 0000000000..d80defeeb1 --- /dev/null +++ b/samples/dynamic/DynamicVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DynamicVC"=.\DynamicVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/exec/ExecVC.dsp b/samples/exec/ExecVC.dsp new file mode 100644 index 0000000000..bdc0e852d9 --- /dev/null +++ b/samples/exec/ExecVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ExecVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ExecVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ExecVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ExecVC.mak" CFG="ExecVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ExecVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ExecVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ExecVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ExecVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ExecVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/exec.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ExecVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/exec.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ExecVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/exec.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ExecVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/exec.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ExecVC - Win32 Release" +# Name "ExecVC - Win32 Debug" +# Name "ExecVC - Win32 Debug DLL" +# Name "ExecVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\exec.cpp + +!IF "$(CFG)" == "ExecVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ExecVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ExecVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ExecVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\exec.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/exec/ExecVC.dsw b/samples/exec/ExecVC.dsw new file mode 100644 index 0000000000..e680968b99 --- /dev/null +++ b/samples/exec/ExecVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ExecVC"=.\ExecVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp index 06e51aa59d..524b515477 100644 --- a/samples/exec/exec.cpp +++ b/samples/exec/exec.cpp @@ -86,7 +86,7 @@ public: void OnAsyncExec(wxCommandEvent& event); void OnShell(wxCommandEvent& event); void OnExecWithRedirect(wxCommandEvent& event); - void OnDDEExec(wxCommandEvent& event); + void OnExecWithPipe(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); @@ -94,13 +94,29 @@ public: void OnIdle(wxIdleEvent& event); // for MyPipedProcess - void OnProcessTerminated(MyPipedProcess *process) - { m_running.Remove(process); } + void OnProcessTerminated(MyPipedProcess *process); wxListBox *GetLogListBox() const { return m_lbox; } private: + void ShowOutput(const wxString& cmd, + const wxArrayString& output, + const wxString& title); + + // last command we executed wxString m_cmdLast; +#ifdef __WINDOWS__ + void OnDDEExec(wxCommandEvent& event); + void OnDDERequest(wxCommandEvent& event); + + bool GetDDEServer(); + + // last params of a DDE transaction + wxString m_server, + m_topic, + m_cmdDde; +#endif // __WINDOWS__ + wxListBox *m_lbox; MyProcessesArray m_running; @@ -141,7 +157,23 @@ public: virtual void OnTerminate(int pid, int status); - bool HasInput(); + virtual bool HasInput(); +}; + +// A version of MyPipedProcess which also sends input to the stdin of the +// child process +class MyPipedProcess2 : public MyPipedProcess +{ +public: + MyPipedProcess2(MyFrame *parent, const wxString& cmd, const wxString& input) + : MyPipedProcess(parent, cmd), m_input(input) + { + } + + virtual bool HasInput(); + +private: + wxString m_input; }; // ---------------------------------------------------------------------------- @@ -158,7 +190,9 @@ enum Exec_AsyncExec, Exec_Shell, Exec_DDEExec, + Exec_DDERequest, Exec_Redirect, + Exec_Pipe, Exec_About = 300 }; @@ -179,8 +213,13 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Exec_AsyncExec, MyFrame::OnAsyncExec) EVT_MENU(Exec_Shell, MyFrame::OnShell) EVT_MENU(Exec_Redirect, MyFrame::OnExecWithRedirect) - EVT_MENU(Exec_DDEExec, MyFrame::OnDDEExec) + EVT_MENU(Exec_Pipe, MyFrame::OnExecWithPipe) +#ifdef __WINDOWS__ + EVT_MENU(Exec_DDEExec, MyFrame::OnDDEExec) + EVT_MENU(Exec_DDERequest, MyFrame::OnDDERequest) +#endif // __WINDOWS__ + EVT_MENU(Exec_About, MyFrame::OnAbout) EVT_IDLE(MyFrame::OnIdle) @@ -232,11 +271,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) wxApp::s_macAboutMenuItemId = Exec_About; #endif - // set the frame icon -#ifndef __WXGTK__ - SetIcon(wxICON(mondrian)); -#endif - // create a menu bar wxMenu *menuFile = new wxMenu(_T(""), wxMENU_TEAROFF); menuFile->Append(Exec_ClearLog, _T("&Clear log\tCtrl-C"), @@ -251,12 +285,16 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) _T("Launch a program and return immediately")); execMenu->Append(Exec_Shell, _T("Execute &shell command...\tCtrl-S"), _T("Launch a shell and execute a command in it")); + execMenu->AppendSeparator(); execMenu->Append(Exec_Redirect, _T("Capture command &output...\tCtrl-O"), _T("Launch a program and capture its output")); + execMenu->Append(Exec_Pipe, _T("&Pipe through command...\tCtrl-P"), + _T("Pipe a string through a filter")); #ifdef __WINDOWS__ execMenu->AppendSeparator(); execMenu->Append(Exec_DDEExec, _T("Execute command via &DDE...\tCtrl-D")); + execMenu->Append(Exec_DDERequest, _T("Send DDE &request...\tCtrl-R")); #endif wxMenu *helpMenu = new wxMenu(_T(""), wxMENU_TEAROFF); @@ -387,21 +425,15 @@ void MyFrame::OnExecWithRedirect(wxCommandEvent& WXUNUSED(event)) if ( sync ) { - wxArrayString output; - int code = wxExecute(cmd, output); + wxArrayString output, errors; + int code = wxExecute(cmd, output, errors); wxLogStatus(_T("command '%s' terminated with exit code %d."), cmd.c_str(), code); if ( code != -1 ) { - m_lbox->Append(wxString::Format(_T("--- Output of '%s' ---"), - cmd.c_str())); - - size_t count = output.GetCount(); - for ( size_t n = 0; n < count; n++ ) - { - m_lbox->Append(output[n]); - } + ShowOutput(cmd, output, _T("Output")); + ShowOutput(cmd, errors, _T("Errors")); } } else // async exec @@ -422,48 +454,122 @@ void MyFrame::OnExecWithRedirect(wxCommandEvent& WXUNUSED(event)) m_cmdLast = cmd; } -void MyFrame::OnDDEExec(wxCommandEvent& WXUNUSED(event)) +void MyFrame::OnExecWithPipe(wxCommandEvent& WXUNUSED(event)) { -#ifdef __WINDOWS__ - wxString server = wxGetTextFromUser(_T("Server to connect to:"), - DIALOG_TITLE, _T("IExplore")); - if ( !server ) - return; + if ( !m_cmdLast ) + m_cmdLast = _T("tr [a-z] [A-Z]"); - wxString topic = wxGetTextFromUser(_T("DDE topic:"), - DIALOG_TITLE, _T("WWW_OpenURL")); - if ( !topic ) - return; - - wxString cmd = wxGetTextFromUser(_T("DDE command:"), + wxString cmd = wxGetTextFromUser(_T("Enter the command: "), DIALOG_TITLE, - _T("\"file:F:\\wxWindows\\samples\\" - "image\\horse.gif\",,-1,,,,,")); + m_cmdLast); + if ( !cmd ) return; - wxDDEClient client; - wxConnectionBase *conn = client.MakeConnection("", server, topic); - if ( !conn ) + wxString input = wxGetTextFromUser(_T("Enter the string to send to it: "), + DIALOG_TITLE); + if ( !input ) + return; + + // always execute the filter asynchronously + MyPipedProcess2 *process = new MyPipedProcess2(this, cmd, input); + int pid = wxExecute(cmd, FALSE /* async */, process); + if ( pid ) { - wxLogError(_T("Failed to connect to the DDE server '%s'."), - server.c_str()); + wxLogStatus(_T("Process %ld (%s) launched."), pid, cmd.c_str()); + + m_running.Add(process); } else { - if ( !conn->Execute(cmd) ) + wxLogError(_T("Execution of '%s' failed."), cmd.c_str()); + + delete process; + } + + m_cmdLast = cmd; +} + +#ifdef __WINDOWS__ + +bool MyFrame::GetDDEServer() +{ + wxString server = wxGetTextFromUser(_T("Server to connect to:"), + DIALOG_TITLE, m_server); + if ( !server ) + return FALSE; + + m_server = server; + + wxString topic = wxGetTextFromUser(_T("DDE topic:"), DIALOG_TITLE, m_topic); + if ( !topic ) + return FALSE; + + m_topic = topic; + + wxString cmd = wxGetTextFromUser(_T("DDE command:"), DIALOG_TITLE, m_cmdDde); + if ( !cmd ) + return FALSE; + + m_cmdDde = cmd; + + return TRUE; +} + +void MyFrame::OnDDEExec(wxCommandEvent& WXUNUSED(event)) +{ + if ( !GetDDEServer() ) + return; + + wxDDEClient client; + wxConnectionBase *conn = client.MakeConnection("", m_server, m_topic); + if ( !conn ) + { + wxLogError(_T("Failed to connect to the DDE server '%s'."), + m_server.c_str()); + } + else + { + if ( !conn->Execute(m_cmdDde) ) { wxLogError(_T("Failed to execute command '%s' via DDE."), - cmd.c_str()); + m_cmdDde.c_str()); } else { wxLogStatus(_T("Successfully executed DDE command")); } } -#endif // __WINDOWS__ } +void MyFrame::OnDDERequest(wxCommandEvent& WXUNUSED(event)) +{ + if ( !GetDDEServer() ) + return; + + wxDDEClient client; + wxConnectionBase *conn = client.MakeConnection("", m_server, m_topic); + if ( !conn ) + { + wxLogError(_T("Failed to connect to the DDE server '%s'."), + m_server.c_str()); + } + else + { + if ( !conn->Request(m_cmdDde) ) + { + wxLogError(_T("Failed to send request '%s' via DDE."), + m_cmdDde.c_str()); + } + else + { + wxLogStatus(_T("Successfully sent DDE request.")); + } + } +} + +#endif // __WINDOWS__ + // input polling void MyFrame::OnIdle(wxIdleEvent& event) { @@ -477,6 +583,31 @@ void MyFrame::OnIdle(wxIdleEvent& event) } } +void MyFrame::OnProcessTerminated(MyPipedProcess *process) +{ + m_running.Remove(process); +} + + +void MyFrame::ShowOutput(const wxString& cmd, + const wxArrayString& output, + const wxString& title) +{ + size_t count = output.GetCount(); + if ( !count ) + return; + + m_lbox->Append(wxString::Format(_T("--- %s of '%s' ---"), + title.c_str(), cmd.c_str())); + + for ( size_t n = 0; n < count; n++ ) + { + m_lbox->Append(output[n]); + } + + m_lbox->Append(_T("--- End of output ---")); +} + // ---------------------------------------------------------------------------- // MyProcess // ---------------------------------------------------------------------------- @@ -496,6 +627,8 @@ void MyProcess::OnTerminate(int pid, int status) bool MyPipedProcess::HasInput() { + bool hasInput = FALSE; + wxInputStream& is = *GetInputStream(); if ( !is.Eof() ) { @@ -503,16 +636,28 @@ bool MyPipedProcess::HasInput() // this assumes that the output is always line buffered wxString msg; - msg << m_cmd << _T(": ") << tis.ReadLine(); + msg << m_cmd << _T(" (stdout): ") << tis.ReadLine(); m_parent->GetLogListBox()->Append(msg); - return TRUE; + hasInput = TRUE; } - else + + wxInputStream& es = *GetErrorStream(); + if ( !es.Eof() ) { - return FALSE; + wxTextInputStream tis(es); + + // this assumes that the output is always line buffered + wxString msg; + msg << m_cmd << _T(" (stderr): ") << tis.ReadLine(); + + m_parent->GetLogListBox()->Append(msg); + + hasInput = TRUE; } + + return hasInput; } void MyPipedProcess::OnTerminate(int pid, int status) @@ -525,3 +670,24 @@ void MyPipedProcess::OnTerminate(int pid, int status) MyProcess::OnTerminate(pid, status); } + +// ---------------------------------------------------------------------------- +// MyPipedProcess2 +// ---------------------------------------------------------------------------- + +bool MyPipedProcess2::HasInput() +{ + if ( !!m_input ) + { + wxTextOutputStream os(*GetOutputStream()); + os.WriteString(m_input); + + CloseOutput(); + m_input.clear(); + + // call us once again - may be we'll have output + return TRUE; + } + + return MyPipedProcess::HasInput(); +} diff --git a/samples/exec/makefile.g95 b/samples/exec/makefile.g95 index 6292100f68..13bcf455d2 100644 --- a/samples/exec/makefile.g95 +++ b/samples/exec/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=exec OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/font/FontVC.dsp b/samples/font/FontVC.dsp new file mode 100644 index 0000000000..ec328f358e --- /dev/null +++ b/samples/font/FontVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="FontVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=FontVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FontVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FontVC.mak" CFG="FontVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FontVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "FontVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "FontVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "FontVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FontVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/font.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FontVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/font.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FontVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/font.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "FontVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/font.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "FontVC - Win32 Release" +# Name "FontVC - Win32 Debug" +# Name "FontVC - Win32 Debug DLL" +# Name "FontVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\font.cpp + +!IF "$(CFG)" == "FontVC - Win32 Release" + +!ELSEIF "$(CFG)" == "FontVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FontVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "FontVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\font.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/font/FontVC.dsw b/samples/font/FontVC.dsw new file mode 100644 index 0000000000..3a9b4aedb9 --- /dev/null +++ b/samples/font/FontVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "FontVC"=.\FontVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/font/font.cpp b/samples/font/font.cpp index 8c1a0b630a..1888461b92 100644 --- a/samples/font/font.cpp +++ b/samples/font/font.cpp @@ -84,6 +84,9 @@ public: // event handlers (these functions should _not_ be virtual) void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); + void OnIncFont(wxCommandEvent& event) { DoResizeFont(+2); } + void OnDecFont(wxCommandEvent& event) { DoResizeFont(-2); } + void OnViewMsg(wxCommandEvent& event); void OnSelectFont(wxCommandEvent& event); void OnEnumerateFamiliesForEncoding(wxCommandEvent& event); @@ -100,10 +103,13 @@ protected: wxFontEncoding encoding = wxFONTENCODING_SYSTEM, bool silent = FALSE); + void DoResizeFont(int diff); void DoChangeFont(const wxFont& font, const wxColour& col = wxNullColour); void Resize(const wxSize& size, const wxFont& font = wxNullFont); + size_t m_fontSize; // in points + wxTextCtrl *m_textctrl; MyCanvas *m_canvas; @@ -123,6 +129,8 @@ enum Font_Quit = 1, Font_About, Font_ViewMsg, + Font_IncSize, + Font_DecSize, Font_Choose = 100, Font_EnumFamiliesForEncoding, Font_EnumFamilies, @@ -141,6 +149,8 @@ enum BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Font_Quit, MyFrame::OnQuit) EVT_MENU(Font_About, MyFrame::OnAbout) + EVT_MENU(Font_IncSize, MyFrame::OnIncFont) + EVT_MENU(Font_DecSize, MyFrame::OnDecFont) EVT_MENU(Font_ViewMsg, MyFrame::OnViewMsg) EVT_MENU(Font_Choose, MyFrame::OnSelectFont) EVT_MENU(Font_EnumFamiliesForEncoding, MyFrame::OnEnumerateFamiliesForEncoding) @@ -191,6 +201,8 @@ bool MyApp::OnInit() MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame((wxFrame *)NULL, -1, title, pos, size), m_textctrl(NULL) { + m_fontSize = 12; + // create a menu bar wxMenu *menuFile = new wxMenu; @@ -202,12 +214,15 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(Font_Quit, "E&xit\tAlt-X", "Quit this program"); wxMenu *menuFont = new wxMenu; + menuFont->Append(Font_IncSize, "&Increase font size by 2 points\tCtrl-I"); + menuFont->Append(Font_DecSize, "&Decrease font size by 2 points\tCtrl-D"); + menuFont->AppendSeparator(); menuFont->Append(Font_Choose, "&Select font...\tCtrl-S", "Select a standard font"); menuFont->AppendSeparator(); menuFont->Append(Font_EnumFamilies, "Enumerate font &families\tCtrl-F"); menuFont->Append(Font_EnumFixedFamilies, - "Enumerate f&ixed font families\tCtrl-I"); + "Enumerate fi&xed font families\tCtrl-X"); menuFont->Append(Font_EnumEncodings, "Enumerate &encodings\tCtrl-E"); menuFont->Append(Font_EnumFamiliesForEncoding, @@ -369,15 +384,15 @@ void MyFrame::OnEnumerateFamiliesForEncoding(wxCommandEvent& WXUNUSED(event)) static const char *encodingNames[] = { - "West European (Latin 1)", - "Central European (Latin 2)", - "Cyrillic (Latin 5)", - "Greek (Latin 7)", - "West European new (Latin 0)", + "Western European (ISO-8859-1)", + "Central European (ISO-8859-2)", + "Cyrillic (ISO-8859-5)", + "Greek (ISO-8859-7)", + "Western European with Euro (ISO-8859-15)", "KOI8-R", - "Windows Latin 2", - "Windows Cyrillic", - "Windows Latin 1", + "Windows Central European (CP 1250)", + "Windows Cyrillic (CP 1251)", + "Windows Western European (CP 1252)", }; int n = wxGetSingleChoiceIndex("Choose an encoding", "Font demo", @@ -391,6 +406,23 @@ void MyFrame::OnEnumerateFamiliesForEncoding(wxCommandEvent& WXUNUSED(event)) } } +void MyFrame::DoResizeFont(int diff) +{ + wxFont fontOld = m_canvas->GetTextFont(); + + DoChangeFont( + wxFont( + fontOld.GetPointSize() + diff, + fontOld.GetFamily(), + fontOld.GetStyle(), + fontOld.GetWeight(), + fontOld.GetUnderlined(), + fontOld.GetFaceName(), + fontOld.GetEncoding() + ) + ); +} + void MyFrame::DoChangeFont(const wxFont& font, const wxColour& col) { Resize(GetSize(), font); @@ -610,7 +642,8 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) // output the font name/info wxString fontInfo; - fontInfo.Printf("Font family is '%s', style '%s', weight '%s'", + fontInfo.Printf("Font size is %d points, family is %s, style %s, weight %s", + m_font.GetPointSize(), m_font.GetFamilyString().c_str(), m_font.GetStyleString().c_str(), m_font.GetWeightString().c_str()); diff --git a/samples/grid/GridVC.dsp b/samples/grid/GridVC.dsp new file mode 100644 index 0000000000..0d63ee14de --- /dev/null +++ b/samples/grid/GridVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="GridVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=GridVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GridVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GridVC.mak" CFG="GridVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GridVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "GridVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "GridVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "GridVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GridVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/grid.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "GridVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/grid.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "GridVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/grid.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "GridVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/grid.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "GridVC - Win32 Release" +# Name "GridVC - Win32 Debug" +# Name "GridVC - Win32 Debug DLL" +# Name "GridVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\grid.cpp + +!IF "$(CFG)" == "GridVC - Win32 Release" + +!ELSEIF "$(CFG)" == "GridVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "GridVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "GridVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\grid.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/grid/GridVC.dsw b/samples/grid/GridVC.dsw new file mode 100644 index 0000000000..98c0f0ec04 --- /dev/null +++ b/samples/grid/GridVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "GridVC"=.\GridVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/grid/grid.cpp b/samples/grid/grid.cpp index ed7ad8001a..8aa405111d 100644 --- a/samples/grid/grid.cpp +++ b/samples/grid/grid.cpp @@ -9,11 +9,6 @@ static const char sccsid[] = "%W% %G%"; -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" diff --git a/samples/grid/makefile.g95 b/samples/grid/makefile.g95 index ae8121341f..e2f55732d5 100644 --- a/samples/grid/makefile.g95 +++ b/samples/grid/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=grid OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/help/HelpVC.dsp b/samples/help/HelpVC.dsp new file mode 100644 index 0000000000..946f8bd552 --- /dev/null +++ b/samples/help/HelpVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="HelpVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=HelpVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "HelpVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "HelpVC.mak" CFG="HelpVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "HelpVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "HelpVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "HelpVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "HelpVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "HelpVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib htmlhelp.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/demo.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib htmlhelp.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/demo.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/demo.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/demo.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "HelpVC - Win32 Release" +# Name "HelpVC - Win32 Debug" +# Name "HelpVC - Win32 Debug DLL" +# Name "HelpVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\demo.cpp + +!IF "$(CFG)" == "HelpVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\demo.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/help/HelpVC.dsw b/samples/help/HelpVC.dsw new file mode 100644 index 0000000000..0fee37493b --- /dev/null +++ b/samples/help/HelpVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "HelpVC"=.\HelpVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/help/Makefile.in b/samples/help/Makefile.in index 2828c680d8..573fd03007 100644 --- a/samples/help/Makefile.in +++ b/samples/help/Makefile.in @@ -17,7 +17,28 @@ PROGRAM=help OBJECTS=demo.o -DATAFILES=doc.cnt doc.hlp doc.hpj doc.tex doc.zip back.gif forward.gif books.gif contents.gif +DATADIRS=doc +DATAFILES=doc.cnt doc.hlp doc.hpj doc.tex doc.zip \ +back.gif forward.gif books.gif contents.gif \ +doc/ClassGraph.class \ +doc/ClassGraphPanel.class \ +doc/ClassLayout.class \ +doc/HIER.html \ +doc/HIERjava.html \ +doc/NavigatorButton.class \ +doc/USE_HELP.html \ +doc/aindex.html \ +doc/down.gif \ +doc/dxxgifs.tex \ +doc/icon1.gif \ +doc/icon2.gif \ +doc/index.html \ +doc/logo.gif \ +doc/wx.htm \ +doc/wx204.htm \ +doc/wx34.htm \ +doc/wxExtHelpController.html \ +doc/wxhelp.map include ../../src/makeprog.env diff --git a/samples/help/back.gif b/samples/help/back.gif index 8a61076d3ba74bdedc1d24f60c3d1f5a361a6cee..88a3740f9134d7a569b56a9f76e6aa552672993e 100644 GIT binary patch literal 978 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7H6AG;jlf>Rey!M3TUK6P?i!m{q7|$j(iU2nb+j@t;aY#t_B`I%AGL2Z zO6>3Q?Jm>3v>|kImhI|mtHW1|tWDEBQI>amZ`s68xzaas@2+e3%;$D{>W3T0V&ot1 Q_1d}V>FF7|>?{n{02fm-00000 literal 225 zcmV<703QEGNk%v~VLt#E0Pz3-zrVld=jU&4Z(9HWEC2ui06zd20008IjE||y?GK}z zNf>~$-n{z{YJwGn=81mem9{RpmcUHc_KoNIPRH~B4DyD9p%LJl6@Sa4^Epcbno6kk zD5XxT&EQg7>t<(Iwfoo diff --git a/samples/help/contents.gif b/samples/help/contents.gif index 3dddfa3dd5f0c652e8b27cd6c29e1fdd49ced5a8..723174f81d04d16e94016186ac0322dcddb603c7 100644 GIT binary patch literal 996 zcmZ?wbhEHbbYM_m_|5kxA zV8N1xh6Z3tW&ovR5Cxe34SwPCqkp^L+21?)C@%eigo zjb6XYK{ltit-ZayK=RQZsqlw)b_u-S7xTMFKYoAy)o)vOlz%vRFz5Xto6e7mgSU6F l8>#t(=cJr!`K{OHv%&EGv6=dhWPNvSd3kw-DjN%fH2`phKPvzL literal 231 zcmVG0Pz3-zrVld=jU&4Z(9HWEC2ui06_p40008OjE||y?GK}z zO&EZ)-n{z{a)K3v=81;mmA0S4Fj_r^UyThZDG{h6k9m zHI_(7spd!5_$SH6m{ #include +#if USE_OLD_HTML_HELP #include "wx/generic/helpwxht.h" +#endif + #include "wx/html/helpctrl.h" #endif +#if wxUSE_MS_HTML_HELP +#include "wx/msw/helpchm.h" +#endif + // ---------------------------------------------------------------------------- // ressources // ---------------------------------------------------------------------------- @@ -88,15 +97,21 @@ public: wxHelpController& GetHelpController() { return m_help; } #if USE_HTML_HELP +#if USE_OLD_HTML_HELP wxHelpControllerHtml& GetHtmlHelpController() { return m_htmlHelp; } +#endif wxHtmlHelpController& GetAdvancedHtmlHelpController() { return m_advancedHtmlHelp; } #endif +#if wxUSE_MS_HTML_HELP + wxCHMHelpController& GetMSHtmlHelpController() { return m_msHtmlHelp; } +#endif // event handlers (these functions should _not_ be virtual) void OnQuit(wxCommandEvent& event); void OnHelp(wxCommandEvent& event); void OnHtmlHelp(wxCommandEvent& event); void OnAdvancedHtmlHelp(wxCommandEvent& event); + void OnMSHtmlHelp(wxCommandEvent& event); void ShowHelp(int commandId, wxHelpControllerBase& helpController); @@ -104,10 +119,16 @@ private: wxHelpController m_help; #if USE_HTML_HELP +#if USE_OLD_HTML_HELP wxHelpControllerHtml m_htmlHelp; +#endif wxHtmlHelpController m_advancedHtmlHelp; #endif +#if wxUSE_MS_HTML_HELP + wxCHMHelpController m_msHtmlHelp; +#endif + // any class wishing to process wxWindows events must use this macro DECLARE_EVENT_TABLE() }; @@ -139,6 +160,12 @@ enum HelpDemo_Advanced_Html_Help_Help, HelpDemo_Advanced_Html_Help_Search, + HelpDemo_MS_Html_Help_Index, + HelpDemo_MS_Html_Help_Classes, + HelpDemo_MS_Html_Help_Functions, + HelpDemo_MS_Html_Help_Help, + HelpDemo_MS_Html_Help_Search, + HelpDemo_Help_KDE, HelpDemo_Help_GNOME, HelpDemo_Help_Netscape, @@ -173,6 +200,12 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(HelpDemo_Advanced_Html_Help_Help, MyFrame::OnAdvancedHtmlHelp) EVT_MENU(HelpDemo_Advanced_Html_Help_Search, MyFrame::OnAdvancedHtmlHelp) + EVT_MENU(HelpDemo_MS_Html_Help_Index, MyFrame::OnMSHtmlHelp) + EVT_MENU(HelpDemo_MS_Html_Help_Classes, MyFrame::OnMSHtmlHelp) + EVT_MENU(HelpDemo_MS_Html_Help_Functions, MyFrame::OnMSHtmlHelp) + EVT_MENU(HelpDemo_MS_Html_Help_Help, MyFrame::OnMSHtmlHelp) + EVT_MENU(HelpDemo_MS_Html_Help_Search, MyFrame::OnMSHtmlHelp) + EVT_MENU(HelpDemo_Help_KDE, MyFrame::OnHelp) EVT_MENU(HelpDemo_Help_GNOME, MyFrame::OnHelp) EVT_MENU(HelpDemo_Help_Netscape, MyFrame::OnHelp) @@ -229,12 +262,14 @@ bool MyApp::OnInit() #if USE_HTML_HELP // initialise the standard HTML help system: this means that the HTML docs are in the // subdirectory doc for platforms using HTML help +#if USE_OLD_HTML_HELP if ( !frame->GetHtmlHelpController().Initialize("doc") ) { wxLogError("Cannot initialize the HTML help system, aborting."); return FALSE; } +#endif // initialise the advanced HTML help system: this means that the HTML docs are in .htb // (zipped) form @@ -246,6 +281,15 @@ bool MyApp::OnInit() } #endif +#if wxUSE_MS_HTML_HELP + if ( !frame->GetMSHtmlHelpController().Initialize("doc") ) + { + wxLogError("Cannot initialize the MS HTML help system, aborting."); + + return FALSE; + } +#endif + return TRUE; } @@ -269,12 +313,14 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(HelpDemo_Help_Help, "&About Help Demo..."); menuFile->Append(HelpDemo_Help_Search, "&Search help..."); #if USE_HTML_HELP +#if USE_OLD_HTML_HELP menuFile->AppendSeparator(); menuFile->Append(HelpDemo_Html_Help_Index, "HTML &Help Index..."); menuFile->Append(HelpDemo_Html_Help_Classes, "HTML &Help on Classes..."); menuFile->Append(HelpDemo_Html_Help_Functions, "HTML &Help on Functions..."); menuFile->Append(HelpDemo_Html_Help_Help, "HTML &About Help Demo..."); menuFile->Append(HelpDemo_Html_Help_Search, "HTML &Search help..."); +#endif menuFile->AppendSeparator(); menuFile->Append(HelpDemo_Advanced_Html_Help_Index, "Advanced HTML &Help Index..."); menuFile->Append(HelpDemo_Advanced_Html_Help_Classes, "Advanced HTML &Help on Classes..."); @@ -283,6 +329,15 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuFile->Append(HelpDemo_Advanced_Html_Help_Search, "Advanced HTML &Search help..."); #endif +#if wxUSE_MS_HTML_HELP + menuFile->AppendSeparator(); + menuFile->Append(HelpDemo_MS_Html_Help_Index, "MS HTML &Help Index..."); + menuFile->Append(HelpDemo_MS_Html_Help_Classes, "MS HTML &Help on Classes..."); + menuFile->Append(HelpDemo_MS_Html_Help_Functions, "MS HTML &Help on Functions..."); + menuFile->Append(HelpDemo_MS_Html_Help_Help, "MS HTML &About Help Demo..."); + menuFile->Append(HelpDemo_MS_Html_Help_Search, "MS HTML &Search help..."); +#endif + #ifndef __WXMSW__ #if !wxUSE_HTML menuFile->AppendSeparator(); @@ -331,7 +386,7 @@ void MyFrame::OnHelp(wxCommandEvent& event) void MyFrame::OnHtmlHelp(wxCommandEvent& event) { -#if USE_HTML_HELP +#if USE_HTML_HELP && USE_OLD_HTML_HELP ShowHelp(event.GetId(), m_htmlHelp); #endif } @@ -343,38 +398,111 @@ void MyFrame::OnAdvancedHtmlHelp(wxCommandEvent& event) #endif } +void MyFrame::OnMSHtmlHelp(wxCommandEvent& event) +{ +#if wxUSE_MS_HTML_HELP + ShowHelp(event.GetId(), m_msHtmlHelp); +#endif +} + +/* + Notes: ShowHelp uses section ids for displaying particular topics, + but you might want to use a unique keyword to display a topic, instead. + + Section ids are specified as follows for the different formats. + + WinHelp + + The [MAP] section specifies the topic to integer id mapping, e.g. + + [MAP] + #define intro 100 + #define functions 1 + #define classes 2 + #define about 3 + + The identifier name corresponds to the label used for that topic. + You could also put these in a .h file and #include it in both the MAP + section and your C++ source. + + Note that Tex2RTF doesn't currently generate the MAP section automatically. + + MS HTML Help + + The [MAP] section specifies the HTML filename root to integer id mapping, e.g. + + [MAP] + #define doc1 100 + #define doc3 1 + #define doc2 2 + #define doc4 3 + + The identifier name corresponds to the HTML filename used for that topic. + You could also put these in a .h file and #include it in both the MAP + section and your C++ source. + + Note that Tex2RTF doesn't currently generate the MAP section automatically. + + Simple wxHTML Help and External HTML Help + + A wxhelp.map file is used, for example: + + 0 wx.htm ; wxWindows: Help index; additional keywords like overview + 1 wx204.htm ; wxWindows Function Reference + 2 wx34.htm ; wxWindows Class Reference + + Note that Tex2RTF doesn't currently generate the MAP section automatically. + + Advanced HTML Help + + An extension to the .hhc file format is used, specifying a new parameter + with name="ID": + + + + + + + + Again, this is not generated automatically by Tex2RTF, though it could + be added quite easily. + + Unfortunately adding the ID parameters appears to interfere with MS HTML Help, + so you should not try to compile a .chm file from a .hhc file with + this extension, or the contents will be messed up. + */ + void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController) { switch(commandId) { - - // Note: For WinHelp, these ids are specified in the map session, mapping - // topic names to numbers. - // For HTML and external help, a wxhelp.map file is used. - case HelpDemo_Help_Classes: case HelpDemo_Html_Help_Classes: case HelpDemo_Advanced_Html_Help_Classes: + case HelpDemo_MS_Html_Help_Classes: helpController.DisplaySection(2); - - // if (helpController.IsKindOf(CLASSINFO(wxHtmlHelpController))) - // ((wxHtmlHelpController&)helpController).Display("Classes"); // An alternative form for this controller + //helpController.DisplaySection("Classes"); // An alternative form for most controllers break; case HelpDemo_Help_Functions: case HelpDemo_Html_Help_Functions: case HelpDemo_Advanced_Html_Help_Functions: + case HelpDemo_MS_Html_Help_Functions: helpController.DisplaySection(1); + //helpController.DisplaySection("Functions"); // An alternative form for most controllers break; case HelpDemo_Help_Help: case HelpDemo_Html_Help_Help: case HelpDemo_Advanced_Html_Help_Help: + case HelpDemo_MS_Html_Help_Help: helpController.DisplaySection(3); + //helpController.DisplaySection("About"); // An alternative form for most controllers break; case HelpDemo_Help_Search: case HelpDemo_Html_Help_Search: case HelpDemo_Advanced_Html_Help_Search: + case HelpDemo_MS_Html_Help_Search: { wxString key = wxGetTextFromUser("Search for?", "Search help for keyword", @@ -388,6 +516,7 @@ void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController) case HelpDemo_Help_Index: case HelpDemo_Html_Help_Index: case HelpDemo_Advanced_Html_Help_Index: + case HelpDemo_MS_Html_Help_Index: helpController.DisplayContents(); break; diff --git a/samples/help/doc.chm b/samples/help/doc.chm new file mode 100644 index 0000000000000000000000000000000000000000..77ff9c01ebe621591a54592ad3b0ace5855d1b17 GIT binary patch literal 8845 zcmeI2Urbw79LImBW6+i^8_S#+=F*MAWYFHWloiN~p)HKE7O?j+U{m4J-a-exx88dN z8FQwHDf3|(;<7El1<`02zLB_x&Y8?eockm3O)+r~YBB@zpgw4(c+M@If0&s*nD}sh zH@Cm@{rx%j+)w(_U+U-Bh7ADFjc zK*<|SatGe3-QVnMX=l-Akz^pBu{8LjYAnddM3fxeJ5yy~EG?cUe>2OW<;|yy9$+l( z?RAPGg=4%L8x#UDv0otvfB2q>R#{32vO0{G^K%MF#X(_sNRlIW+qSO@dN^4S&?5Ir zKzr7o8hpIUqa}0Qwsl=WK7p2a<3sBbcTcd?Z#FPJe7N7%8;hck*;Hr~6P83(5LHDB zr46Zwo{30dTVG!o&DzIpS=Eo`o=TOkDK(B>?i^JNq|#yQ!*U{!vT4$($#ciXoSLlE zTvk*%Hwof?e;pm zx5iOl<8^zVWBj6`@?uyZZ$Q41vH$oHAwdyTj_(-|VE%+1Kad(FKnYL+lmI0_2~Yx* z03|>PPyzsHUB2!;^fdYr#-J8TVJDs-n4k?r2!jN1NPr9iDEJZ}f`OSJ2rPK-nHvE& zG~k>Qs-Xs4UP{67h7UYiBzwSQ#n5{9Y(y5QZ_!IdkE zr$4`1GXIHpX55j>78T8R6b>DkOQ)|zm&GsQH*Z{iVru2m^&fVRAKvNud%>Vw|^UOf + + + + + + + + +

      +
    • + + + +
    • + + + +
      • + + + +
      • + + + +
      • + + + +
    • + + + +
    diff --git a/samples/help/doc.hhk b/samples/help/doc.hhk new file mode 100644 index 0000000000..6a8020524f --- /dev/null +++ b/samples/help/doc.hhk @@ -0,0 +1,31 @@ + + + + + + + + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    diff --git a/samples/help/doc.hhp b/samples/help/doc.hhp new file mode 100644 index 0000000000..ef2d0ac236 --- /dev/null +++ b/samples/help/doc.hhp @@ -0,0 +1,27 @@ +[OPTIONS] +Compatibility=1.1 +Full-text search=Yes +Contents file=doc.hhc +Compiled file=doc.chm +Default Window=docHelp +Default topic=doc.htm +Index file=doc.hhk +Title=Help Demo + +[WINDOWS] +docHelp=,"doc.hhc","doc.hhk","doc.htm",,,,,,0x2420,,0x380e,,,,,0,,, + +[FILES] +doc.htm +doc1.htm +doc2.htm +doc3.htm +doc4.htm +doc5.htm + +[MAP] +#define doc1 100 +#define doc3 1 +#define doc2 2 +#define doc4 3 + diff --git a/samples/help/doc.zip b/samples/help/doc.zip index 72bec9f9c4825c87aeb88f65ab1509a3d709752a..f907771079285737de6408286b75f67b158b3b3f 100644 GIT binary patch delta 1511 zcmbQBaYt)|IZwR^0|NsG!=8{Hjb%0laq^4|49}Pu7}$WKr3HHFnQ6t}OEz!tDM<)O z_;HSbi8tX6!!oG@YnUAho*&p0EdP(0k@@idKm)Eey&r!Q4>qat^70;-a^}PQhxRjm z@ux91KJpiHV`Ix>lMV1=c*@DvcbMmqjFFtQm`u(yfools8|xDvJ}hHQU2iETEh;JD z(z`c8%)(&TSFH~5y_JbOj%<#+Sv<@4>2i1X-(TLCKP?c`w?4gUPSyF8w2i-BR+dd| z_fm15a^~;k&~WmK2g5$dd&JuPwR?*nn%T2eoegk^lMY~l6_m3}WqIC$3oPoKITTul{X;z*q{QTGe8E^xW;lLD3rBK;u^tkR*DIE^m@rlI{@$A8pBq_OxidQ_t}|>y zl}B_&;m+lbP>#m&ki> z_ofQlKlQqQV(;#C4~^&Fe!EgWPo{ff{hsUD&zCJE-FIfUuGU-oAYOXfZP8s8IbjF#7H^+( zd)mDhUw6x-6j$B8b^A8AihTXsiCpy+>C+GVt~K1>{pIoZ=kb5HmAe0IpUhr-Pkz(O zKRYZcs>OFtoaJBPcWULd`&GGi(me0wXRrM4ajpFNwCU5sS8Upd8n)|!VHq=3VDfih z814s#B{z^x%P%TVEK0!)%6f`(wk56Th+Gx-I*OrYKqn+ebo|MssBnm{q^_kqw{WU`t+&jafNAk z_oeCX($1BabJ98WcJ7;X`*q;ywHI1WoRzGeTai9{Z|995gZim&a~EC@l=hw{uYGmb zD&dWW@2#fKIp4?2&;QxT*btcdHlG)eWfH+w?oAR_aKN3Ffx!m^3P4=Oi^$jk-i%Bl z3=mzPfQfl>g0NKmaz3Df{QPWinnhNDEq#Mbg_ygMA2qcj>%o+!m2!SIoRVgLU9 z&!0cf&(Du$V9)_7VE~CUFeUZ$uROgrsbS8RD20R_f1cfFy|lek(UNysRn|+bMMB;e z=kVP4Z1+WE-RZLtW(qz(q;{5xCgmpO7%jh8uRdwloVeO>pRyBATlXpi21N4BJ*oQn zZT6-IkBWSs^__qHv2pKz{Qw3A>i}_1OnO(Qmj`+dsAN(lS1qRWyB1@9FJV(ysl^JO258 z)c!SBC$psox3hl_cb8x*nLKrIhww5n$;>o!i|5-lHNQVUCi&}zWY){h9chl1Rl*h9 zPF&&G{amXwl{>V0we^(Uue&e**6ulGl;a~~uxQVjJ8%B*$iAJU6PsJB8w(8x5wN!_ zCvmAR-pa=ajm1VFH;~`>(Q}|A2=f4Oa(-S(YF&vGxpDWW})W5_qX^KW#eQ;|`Q^~Qpd6Gxc7_YsV`upgg z9l@Gm9%i$*A1S*e=371`ujH$)|8>_w^{U=**R9K!A3Z*)U3kZeHuf1?Os9ExtbFEv z{fGL=V>7~k{^-yYTYl8#>vH$wnb*bG6mAN0GjRuGS9i}|z5Dd--(Ihzb!^snd)M^D z@XR@LM#h*)R@b)P7Z^6VvJHFB-n|P8AwNZ; wbH-jL-q~hvBDNIFUuAn+=ylY_lIO=twXW(!Y|OjPCFiqa!^6Y8%uEc{09+_1fB*mh literal 164 zcmV;V09*e@Nk%v~VI=?<0Pz3-zrVld=jU&4Z(9HWEC2ui03`qz0007gjE||y?Z1Qp zwAzdF6*A}#V%!v#-{_g@)>Q-cu3}3Ku`2^Nfa3dZ+VyHW%gtsZ`jV7k@%j8Ij}~W) zc{NUP6)X3OWa^|{8nl?rh|gZ1@{(qofnsWu+nmFHSnaq>lB41zSVC9`a)_v*xHx0L S5h*!IS!o$ynW>ps0028gDN7ju diff --git a/samples/help/makefile.b32 b/samples/help/makefile.b32 index 98bc1c286f..18009827b4 100644 --- a/samples/help/makefile.b32 +++ b/samples/help/makefile.b32 @@ -10,6 +10,7 @@ WXDIR = $(WXWIN) TARGET=demo +#EXTRALIBS=htmlhelp.lib OBJECTS = $(TARGET).obj !include $(WXDIR)\src\makeprog.b32 diff --git a/samples/help/makefile.vc b/samples/help/makefile.vc index 3cbe3b33c2..723b606f7e 100644 --- a/samples/help/makefile.vc +++ b/samples/help/makefile.vc @@ -12,6 +12,7 @@ WXDIR = $(WXWIN) PROGRAM=demo +EXTRALIBS=htmlhelp.lib OBJECTS = $(PROGRAM).obj !include $(WXDIR)\src\makeprog.vc diff --git a/samples/help/up.gif b/samples/help/up.gif index 316d0d2a14b571bea2eb874efd04bfe509f53b34..870c89e80a826e3b225cc8fe9a30edf9c5a66c22 100644 GIT binary patch literal 998 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7p%TfE%gtCeAWZlgxpoy|ZDMRPr_m>p rx}08pS4?)u<%PW +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=AboutVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "AboutVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "AboutVC.mak" CFG="AboutVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AboutVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "AboutVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "AboutVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "AboutVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AboutVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/about.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "AboutVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/about.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "AboutVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/about.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "AboutVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/about.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "AboutVC - Win32 Release" +# Name "AboutVC - Win32 Debug" +# Name "AboutVC - Win32 Debug DLL" +# Name "AboutVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\about.cpp + +!IF "$(CFG)" == "AboutVC - Win32 Release" + +!ELSEIF "$(CFG)" == "AboutVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "AboutVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "AboutVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\about.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/about/AboutVC.dsw b/samples/html/about/AboutVC.dsw new file mode 100644 index 0000000000..19e7cc3977 --- /dev/null +++ b/samples/html/about/AboutVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "AboutVC"=.\AboutVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/html/help/HelpVC.dsp b/samples/html/help/HelpVC.dsp new file mode 100644 index 0000000000..7921a9bb71 --- /dev/null +++ b/samples/html/help/HelpVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="HelpVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=HelpVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "HelpVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "HelpVC.mak" CFG="HelpVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "HelpVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "HelpVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "HelpVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "HelpVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "HelpVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/help.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/help.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/help.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/help.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "HelpVC - Win32 Release" +# Name "HelpVC - Win32 Debug" +# Name "HelpVC - Win32 Debug DLL" +# Name "HelpVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\help.cpp + +!IF "$(CFG)" == "HelpVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\help.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/help/HelpVC.dsw b/samples/html/help/HelpVC.dsw new file mode 100644 index 0000000000..0fee37493b --- /dev/null +++ b/samples/html/help/HelpVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "HelpVC"=.\HelpVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/html/helpview/HelpViewVC.dsp b/samples/html/helpview/HelpViewVC.dsp new file mode 100644 index 0000000000..30b1b1f5af --- /dev/null +++ b/samples/html/helpview/HelpViewVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="HelpViewVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=HelpViewVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "HelpViewVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "HelpViewVC.mak" CFG="HelpViewVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "HelpViewVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "HelpViewVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "HelpViewVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "HelpViewVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "HelpViewVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/helpview.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpViewVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/helpview.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpViewVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/helpview.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpViewVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/helpview.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "HelpViewVC - Win32 Release" +# Name "HelpViewVC - Win32 Debug" +# Name "HelpViewVC - Win32 Debug DLL" +# Name "HelpViewVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\helpview.cpp + +!IF "$(CFG)" == "HelpViewVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpViewVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpViewVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpViewVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\helpview.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/helpview/HelpViewVC.dsw b/samples/html/helpview/HelpViewVC.dsw new file mode 100644 index 0000000000..7066834e46 --- /dev/null +++ b/samples/html/helpview/HelpViewVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "HelpViewVC"=.\HelpViewVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/html/printing/PrintingVC.dsp b/samples/html/printing/PrintingVC.dsp new file mode 100644 index 0000000000..2ed7502bd2 --- /dev/null +++ b/samples/html/printing/PrintingVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="PrintingVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PrintingVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PrintingVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PrintingVC.mak" CFG="PrintingVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PrintingVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PrintingVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PrintingVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "PrintingVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PrintingVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/printing.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/printing.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/printing.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/printing.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "PrintingVC - Win32 Release" +# Name "PrintingVC - Win32 Debug" +# Name "PrintingVC - Win32 Debug DLL" +# Name "PrintingVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\printing.cpp + +!IF "$(CFG)" == "PrintingVC - Win32 Release" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\printing.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/printing/PrintingVC.dsw b/samples/html/printing/PrintingVC.dsw new file mode 100644 index 0000000000..b2096fcce9 --- /dev/null +++ b/samples/html/printing/PrintingVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PrintingVC"=.\PrintingVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/html/test/TestVC.dsp b/samples/html/test/TestVC.dsp new file mode 100644 index 0000000000..96ef5c8221 --- /dev/null +++ b/samples/html/test/TestVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="TestVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TestVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TestVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TestVC.mak" CFG="TestVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TestVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TestVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TestVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "TestVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TestVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/test.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "TestVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/test.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "TestVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/test.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "TestVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/test.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "TestVC - Win32 Release" +# Name "TestVC - Win32 Debug" +# Name "TestVC - Win32 Debug DLL" +# Name "TestVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\test.cpp + +!IF "$(CFG)" == "TestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "TestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TestVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\test.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/test/TestVC.dsw b/samples/html/test/TestVC.dsw new file mode 100644 index 0000000000..a6f2c1c809 --- /dev/null +++ b/samples/html/test/TestVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TestVC"=.\TestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/html/virtual/VirtualVC.dsp b/samples/html/virtual/VirtualVC.dsp new file mode 100644 index 0000000000..938803b806 --- /dev/null +++ b/samples/html/virtual/VirtualVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="VirtualVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=VirtualVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "VirtualVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "VirtualVC.mak" CFG="VirtualVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "VirtualVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "VirtualVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "VirtualVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "VirtualVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "VirtualVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/virtual.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "VirtualVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/virtual.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "VirtualVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/virtual.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "VirtualVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/virtual.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "VirtualVC - Win32 Release" +# Name "VirtualVC - Win32 Debug" +# Name "VirtualVC - Win32 Debug DLL" +# Name "VirtualVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\virtual.cpp + +!IF "$(CFG)" == "VirtualVC - Win32 Release" + +!ELSEIF "$(CFG)" == "VirtualVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "VirtualVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "VirtualVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\virtual.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/virtual/VirtualVC.dsw b/samples/html/virtual/VirtualVC.dsw new file mode 100644 index 0000000000..268b9d5f84 --- /dev/null +++ b/samples/html/virtual/VirtualVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "VirtualVC"=.\VirtualVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/html/widget/WidgetVC.dsp b/samples/html/widget/WidgetVC.dsp new file mode 100644 index 0000000000..226e53426d --- /dev/null +++ b/samples/html/widget/WidgetVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="WidgetVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=WidgetVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "WidgetVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "WidgetVC.mak" CFG="WidgetVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "WidgetVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "WidgetVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "WidgetVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "WidgetVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "WidgetVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/widget.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "WidgetVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/widget.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "WidgetVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/widget.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "WidgetVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/widget.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "WidgetVC - Win32 Release" +# Name "WidgetVC - Win32 Debug" +# Name "WidgetVC - Win32 Debug DLL" +# Name "WidgetVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\widget.cpp + +!IF "$(CFG)" == "WidgetVC - Win32 Release" + +!ELSEIF "$(CFG)" == "WidgetVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "WidgetVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "WidgetVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\widget.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/widget/WidgetVC.dsw b/samples/html/widget/WidgetVC.dsw new file mode 100644 index 0000000000..3f52fd3f55 --- /dev/null +++ b/samples/html/widget/WidgetVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "WidgetVC"=.\WidgetVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/html/zip/ZipVC.dsp b/samples/html/zip/ZipVC.dsp new file mode 100644 index 0000000000..a7d36f3c47 --- /dev/null +++ b/samples/html/zip/ZipVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ZipVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ZipVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ZipVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ZipVC.mak" CFG="ZipVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ZipVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ZipVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ZipVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ZipVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ZipVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/zip.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "ZipVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/zip.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "ZipVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/zip.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "ZipVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/zip.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ZipVC - Win32 Release" +# Name "ZipVC - Win32 Debug" +# Name "ZipVC - Win32 Debug DLL" +# Name "ZipVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\zip.cpp + +!IF "$(CFG)" == "ZipVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ZipVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ZipVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ZipVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\zip.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/html/zip/ZipVC.dsw b/samples/html/zip/ZipVC.dsw new file mode 100644 index 0000000000..36beff1f35 --- /dev/null +++ b/samples/html/zip/ZipVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ZipVC"=.\ZipVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/image/ImageVC.dsp b/samples/image/ImageVC.dsp new file mode 100644 index 0000000000..4deba5d7c4 --- /dev/null +++ b/samples/image/ImageVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ImageVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ImageVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ImageVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ImageVC.mak" CFG="ImageVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ImageVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ImageVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ImageVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ImageVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ImageVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/image.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ImageVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/image.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ImageVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/image.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ImageVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/image.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ImageVC - Win32 Release" +# Name "ImageVC - Win32 Debug" +# Name "ImageVC - Win32 Debug DLL" +# Name "ImageVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\image.cpp + +!IF "$(CFG)" == "ImageVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ImageVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ImageVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ImageVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\image.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/image/ImageVC.dsw b/samples/image/ImageVC.dsw new file mode 100644 index 0000000000..622fa0fb0d --- /dev/null +++ b/samples/image/ImageVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ImageVC"=.\ImageVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/image/image.cpp b/samples/image/image.cpp index 7898661a03..749470bee7 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -6,7 +6,6 @@ * Copyright: (C) 1998, Robert Roebling * */ - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -84,7 +83,7 @@ public: MyImageFrame(wxFrame *parent, const wxBitmap& bitmap) : wxFrame(parent, -1, _T("Frame with image"), wxDefaultPosition, wxDefaultSize, - wxCAPTION), + wxCAPTION | wxSYSTEM_MENU), m_bitmap(bitmap) { SetClientSize(bitmap.GetWidth(), bitmap.GetHeight()); @@ -172,12 +171,12 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, #if wxUSE_LIBPNG if ( !image.SaveFile( dir + wxString("test.png"), wxBITMAP_TYPE_PNG )) wxLogError("Can't save file"); - + image.Destroy(); image.LoadFile( dir + wxString("test.png") ); my_square = new wxBitmap( image.ConvertToBitmap() ); - + image.Destroy(); if ( !image.LoadFile( dir + wxString("horse.png")) ) @@ -340,7 +339,8 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) dc.SetTextForeground( "BLACK" ); } - + // Doesn't work for wxMotif yet +#ifndef __WXMOTIF__ wxBitmap mono( 60,50,1 ); wxMemoryDC memdc; memdc.SelectObject( mono ); @@ -376,6 +376,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) dc.DrawBitmap( i.ConvertToBitmap(), 150, 1900, TRUE ); dc.SetTextForeground( "BLACK" ); } +#endif dc.DrawText("XPM bitmap", 30, 2000); if ( m_bmpSmileXpm.Ok() ) @@ -458,7 +459,7 @@ MyFrame::MyFrame() wxPoint(20,20), wxSize(470,360) ) { wxMenu *file_menu = new wxMenu(); - file_menu->Append( ID_NEW, "&New frame"); + file_menu->Append( ID_NEW, "&Show image..."); file_menu->AppendSeparator(); file_menu->Append( ID_ABOUT, "&About..."); file_menu->AppendSeparator(); @@ -493,7 +494,19 @@ void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) void MyFrame::OnNewFrame( wxCommandEvent &WXUNUSED(event) ) { - (new MyImageFrame(this, *m_canvas->my_horse_bmp))->Show(); + wxString filename = wxFileSelector(_T("Select image file")); + if ( !filename ) + return; + + wxImage image; + if ( !image.LoadFile(filename) ) + { + wxLogError(_T("Couldn't load image from '%s'."), filename.c_str()); + + return; + } + + (new MyImageFrame(this, image.ConvertToBitmap()))->Show(); } //----------------------------------------------------------------------------- diff --git a/samples/internat/InternatVC.dsp b/samples/internat/InternatVC.dsp new file mode 100644 index 0000000000..67c7a8213a --- /dev/null +++ b/samples/internat/InternatVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="InternatVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=InternatVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "InternatVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "InternatVC.mak" CFG="InternatVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "InternatVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "InternatVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "InternatVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "InternatVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "InternatVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/internat.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "InternatVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/internat.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "InternatVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/internat.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "InternatVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/internat.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "InternatVC - Win32 Release" +# Name "InternatVC - Win32 Debug" +# Name "InternatVC - Win32 Debug DLL" +# Name "InternatVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\internat.cpp + +!IF "$(CFG)" == "InternatVC - Win32 Release" + +!ELSEIF "$(CFG)" == "InternatVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "InternatVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "InternatVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\internat.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/internat/InternatVC.dsw b/samples/internat/InternatVC.dsw new file mode 100644 index 0000000000..4d52eb6c9a --- /dev/null +++ b/samples/internat/InternatVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "InternatVC"=.\InternatVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/internat/Makefile.in b/samples/internat/Makefile.in index 0143f6d797..0b9b80827a 100644 --- a/samples/internat/Makefile.in +++ b/samples/internat/Makefile.in @@ -13,12 +13,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../.. program_dir = samples/internat -DATAFILES=fr/internat.po fr/internat.mo \ - de/internat.po de/internat.mo \ - fr/wxstd.po fr/wxstd.mo \ - de/wxstd.po de/wxstd.mo +DATAFILES=\ + fr/internat.mo fr/wxstd.mo \ + de/internat.mo de/wxstd.mo \ + ru/internat.mo ru/wxstd.mo -DATADIRS=fr de +DATADIRS=fr de ru PROGRAM=internat diff --git a/samples/internat/internat.cpp b/samples/internat/internat.cpp index 5bbfb76410..9e3377df7e 100644 --- a/samples/internat/internat.cpp +++ b/samples/internat/internat.cpp @@ -28,6 +28,7 @@ #include "wx/intl.h" #include "wx/file.h" #include "wx/log.h" +#include "wx/fontmap.h" #if defined(__WXGTK__) || defined(__WXMOTIF__) #include "mondrian.xpm" @@ -49,12 +50,14 @@ class MyFrame: public wxFrame public: MyFrame(wxFrame *frame, const char *title, int x, int y, int w, int h); -public: +protected: void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); void OnPlay(wxCommandEvent& event); void OnOpen(wxCommandEvent& event); + void OnPaint(wxPaintEvent& event); +private: DECLARE_EVENT_TABLE() }; @@ -73,6 +76,8 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(MINIMAL_ABOUT, MyFrame::OnAbout) EVT_MENU(MINIMAL_TEST, MyFrame::OnPlay) EVT_MENU(MINIMAL_OPEN, MyFrame::OnOpen) + + EVT_PAINT(MyFrame::OnPaint) END_EVENT_TABLE() IMPLEMENT_APP(MyApp) @@ -86,8 +91,14 @@ bool MyApp::OnInit() const char *langid = NULL; switch ( argc ) { - default: - // ignore the other args, fall through + case 4: + { + wxFontEncoding enc = wxTheFontMapper->CharsetToEncoding(argv[3]); + if ( enc != wxFONTENCODING_SYSTEM ) + wxFont::SetDefaultEncoding(enc); + } + + // fall through case 3: language = argv[1]; @@ -104,7 +115,14 @@ bool MyApp::OnInit() }; // there are very few systems right now which support locales other than "C" - m_locale.Init(language, langid, "C"); + m_locale.Init(NULL, "de", ""); +// m_locale.Init(language, langid, "C"); + // note that under GTK starting from version 1.2.8 if + // you set locale to "C" and then use ASCII characters above + // #128 in GUI elements, they will be truncated (it seems GTK + // replaces them by \0). You should use either "" (checks + // the value of LC_ALL etc. environment variables) or the form + // accepted by glibc, e.g cs_CZ. // Initialize the catalogs we'll be using /* not needed any more, done in wxLocale ctor @@ -197,3 +215,11 @@ void MyFrame::OnOpen(wxCommandEvent&) // got wxstd.mo somewhere in the search path wxFile file("NOTEXIST.ING"); } + +void MyFrame::OnPaint(wxPaintEvent&) +{ + wxPaintDC dc(this); + wxFont font(12, wxDEFAULT, wxNORMAL, wxNORMAL); + dc.SetFont(font); + dc.DrawText(_("International wxWindows App"), 10, 10); +} diff --git a/samples/internat/ru/internat.mo b/samples/internat/ru/internat.mo new file mode 100644 index 0000000000000000000000000000000000000000..504fce0a19f01ddf31a6acfaacbc0afa4fe7d76e GIT binary patch literal 1618 zcmaKrL2MgE6ov;VP)sSP7eIh`Ip8ANUF=A$lBHCQN}z#OiHg+%C&u=~nX;a>cE_>J z?a>n_PFxTd!~t>Wl@kXHHIZAVrXe9|geoB+L@!WLBm^h^S#OgnNUSyc?R)d)z5l&k zU*EUuLxJlNtS7NP#(LB}--R2lHuwP80q+IRgD&=ca1Z!V=Kl=b3;P0i82mEx-val+ z{u>OyJ$DQ71o#SgA6Nlhy>sAm;Cq>U0X%^-J@9e(_wE|$couvN_Bi+y_*&-I;KQ&J z@D1=h_#pTr_%!%y=HHDbreI6Z>G~8L2fxVtH^4mX0}zMuY43o@VL?iIx&B?R2u*uP zowz-Obq|)C3(9R>PM6c-uKTfeyNCQ#Ici$p_eK6?9V(HZZ74(KsMbtqK6T86vO|(; zvX0%7N~}na(2TJvHqwgYk*USfHbZH3WRfxJM9uw+idvEJ>4b_E>4fZpqPnc<3N;pD znW#Wa=iAzfX_v*Fh{-hTWfccvrZ{0Jk@ZHXavyxcpHp#ia^j%7PtqA#)pdGHX&Y)o z(p2fyW~im1*XuI2;Yc3Wn0Rv} zx)DcZSq?j-oG?{I4bo;&hPs-C`l2F@i7ZuOC9T4g<|BIhnPk71i=%U@V!fHFcSgkt zLNL=cRc-rxBb3^_KqwI>%D(tc zq$j+1JJ4mHSFty3Dp6INT0j$JZF3^ezY~AQD?H>S+`GJtUoZVg`4^a%c;I4ql`mua z8n{9H?bgOkoa<*N)2(&N>@^(wlY9IJ8Ctv+8*^InE^)roPkH@O=SN+Jg|uX11DaUF3Nxla(`GV};1 z`!EJP3`U~*u3KJ7zn1^}1CXKX&hs+yKL~SqA&IY`N8+FP2VP6A~5DxUK(?;6LEpOtWtwQ+G7NVfLQB#>OSWZ7G$9 zUH49wcQiOA_&4mk5jY(~LRdOp=NS-OZZ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows 2.0 i18n sample\n" +"POT-Creation-Date: 2000-08-10 15:56+0200\n" +"PO-Revision-Date: 2000-08-10 15:56+0200\n" +"Last-Translator: Vadim Zeitlin \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=koi8-r\n" +"Content-Transfer-Encoding: 8bit\n" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:128 +msgid "International wxWindows App" +msgstr "éÎÔÅÒÎÁÃÉÏÎÁÌØÎÏÅ ÐÒÉÌÏÖÅÎÉÅ wxWindows" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:136 +msgid "&About..." +msgstr "&ï ÐÒÏÇÒÁÍÍÅ..." + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:138 +msgid "E&xit" +msgstr "&÷ÙÊÔÉ" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:141 +msgid "&Open bogus file" +msgstr "&ïÔËÒÙÔØ ÆÁÊÌ" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:142 +msgid "&Play a game" +msgstr "&ðÏÉÇÒÁÔØ × ÉÇÒÕ" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:145 +msgid "&File" +msgstr "&æÁÊÌ" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:146 +msgid "&Test" +msgstr "&ôÅÓÔ" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:169 +msgid "" +"I18n sample\n" +"¡© 1998, 1999 Vadim Zeitlin and Julian Smart" +msgstr "" +"ðÒÉÍÅÒ i18n\n" +"¡© 1998, 1999 ÷ÁÄÉÍ úÅÊÔÌÉÎ É äÖÕÌÉÁÎ óÍÁÒÔ" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:171 +msgid "About Internat" +msgstr "ðÒÏ Internat" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:176 +msgid "Enter your number:" +msgstr "÷×ÅÄÉ Ó×ÏÅ ÞÉÓÌÏ:" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:177 +msgid "Try to guess my number!" +msgstr "ðÏÐÒÏÂÕÊ ÕÇÁÄÁÔØ ÍÏÅ ÞÉÓÌÏ!" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:185 +msgid "You've probably entered an invalid number." +msgstr "îÁ×ÅÒÎÏ ÔÙ ××ÅÌ ÎÅÄÏÐÕÓÔÉÍÏÅ ÞÉÓÌÏ." + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:193 +msgid "Congratulations! you've won. Here is the magic phrase:" +msgstr "ðÏÚÄÒÁ×ÌÑÀ! ÷Ù ×ÙÉÇÒÁÌÉ. á ×ÏÔ ÍÁÇÉÞÅÓËÁÑ ÆÒÁÚÁ: " + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:194 +#, c-format +msgid "cannot create fifo `%s'" +msgstr "ÎÅ ÍÏÇÕ ÓÏÚÄÁÔØ fifo `%s'" + +#: /home/harms.user1/rolinsky/wxGTK-2.2.0/samples/internat/internat.cpp:197 +msgid "Result" +msgstr "òÅÚÕÌØÔÁÔ" + +#~ msgid "Bad luck! try again..." +#~ msgstr "îÅ ×ÅÚÅÔ! ðÏÐÒÏÂÕÊ ÓÎÏ×Á..." diff --git a/samples/internat/ru/wxstd.mo b/samples/internat/ru/wxstd.mo new file mode 100644 index 0000000000000000000000000000000000000000..7b2436560e48313d7d56288f5e7bb579399706cd GIT binary patch literal 2461 zcma)+Ymd}q6vrPGFAR7CuV~2evMfYfW-)8l0SSalBtjqtAu-1I?DUzT?o2zjU1rsn z`Uy;o#`qzOFZG3VnL@fVJDr{BFtUb?iHV7t2qx-V{hzkW4#;k3=IO7~p3DE7^R!Ew z)_o>$Jcac%)?Zj7Sgkv7!tw5%LOcXY@OjVyp94P!?*YF9?*(Tw&Vl#ie;340{DjlP z;LqTC@NaM{_%HYvxb-d}c7o#|-&ddpegZxMegi%WUIYpJ4SWXNuuh0kPy<=}o8UI^ zeeiMc3ve9#8svI@0XKsi?-t@U)J7odGEoG9AAy|bD-b{NJx;9m0(c+T0a?#w5YojT zAm{lLKj6Sjd{KrdQ_~~u1ZrF$}Ku(&11#J@?%Fy zFMH1Fv)d)pGN_`gvUi5;QtEDJN^cdWRGD_qte&N;JaUzqqMGfRo{30n1+!}^OEshj zIt?m0c6IeENrtro*BukJdiJeDB;!dRmCz!?u1X9i87a@RWKUa$E-H3WVqD2>bT}FH zq(XHbKeMOMdzd=Q<4z3`rzX)#_R@uA-@GX>ch?iH=dkyU8F_;YOX1i<8uZn@Zm^oR zrYyT|rBkpSvus+tdEQe+Pdj30r(ShO z^_hBFiEcaPy}4sYjvZPlb4<_Y4%n8bEJ*mEhFUx|XdCxXwHfu zM=vQyJ7g7YBYDXtCQUCVXnXWyINS7Z`Vh2(LC|eqo};E8`>p6A^`dC@O3)7Hba6Fx zkmu63h} zU4MSwr>GbE?P$n)5ELD{bG(X$0=L_F;D-ERlf_UAAwU9_TRkTsle8zT#1n&o-*uTNMPoha-zmv>nf zWI&yM9A;mfHoSTeg^iVEjRq^b5o5^``perd`34PARY9sMm6Ar+S9eLxQXe)87YAq` PzXeg;TY`>6tS|lpk%NU# literal 0 HcmV?d00001 diff --git a/samples/internat/ru/wxstd.po b/samples/internat/ru/wxstd.po new file mode 100644 index 0000000000..0383d18a57 --- /dev/null +++ b/samples/internat/ru/wxstd.po @@ -0,0 +1,127 @@ +msgid "" +msgstr "" +"Project-Id-Version: wxWindows 2.0 i18n sample\n" +"POT-Creation-Date: 2000-08-10 15:56+0200\n" +"PO-Revision-Date: 2000-08-10 15:56+0200\n" +"Last-Translator: Vadim Zeitlin \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=koi8-r\n" +"Content-Transfer-Encoding: 8bit\n" + +#: file.cpp:182 hello.cpp:38 +#, c-format +msgid "can't create file '%s'" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÆÁÊÌ '%s'" + +#: file.cpp:213 +#, c-format +msgid "can't open file '%s'" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ '%s'" + +#: file.cpp:227 +#, c-format +msgid "can't close file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁËÒÙÔØ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ %d" + +#: file.cpp:244 +#, c-format +msgid "can't read from file descriptor %d" +msgstr "ÏÛÉÂËÁ ÞÔÅÎÉÑ ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#: file.cpp:258 +#, c-format +msgid "can't write to file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ × ÆÁÊÌ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#: file.cpp:271 +#, c-format +msgid "can't flush file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÓÌÉÔØ ÆÁÊÌ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#: file.cpp:308 +#, c-format +msgid "can't seek on file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÍÅÓÔÉÔØÓÑ ÐÏ ÆÁÊÌÕ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#: file.cpp:322 +#, c-format +msgid "can't get seek position on file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÔÅËÕÝÕÀ ÐÏÚÉÃÉÀ ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#: file.cpp:355 +#, c-format +msgid "can't find length of file on file descriptor %d" +msgstr "ÎÅ×ÏÚÍÏÖÎÏ ÏÐÒÅÄÅÌÉÔØ ÄÌÉÎÕ ÆÁÊÌÁ Ó ÄÅÓËÒÉÐÔÏÒÏÍ %d" + +#: intl.cpp:139 +#, c-format +msgid "catalog file for domain '%s' not found." +msgstr "ÆÁÊÌ ËÁÔÁÌÏÇÁ ÄÌÑ ÄÏÍÅÎÁ '%s' ÎÅ ÎÁÊÄÅÎ." + +#: intl.cpp:177 +#, c-format +msgid "'%s' is not a valid message catalog." +msgstr "'%s' ÎÅ×ÅÒÎÙÊ ËÁÔÁÌÏÇ ÓÏÏÂÝÅÎÉÊ." + +#: intl.cpp:330 intl.cpp:334 +#, c-format +msgid "locale '%s' can not be set." +msgstr "ÌÏËÅÊÌ '%s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÕÓÔÁÎÏ×ÌÅÎ." + +#: intl.cpp:431 intl.cpp:435 +#, c-format +msgid "string '%s' not found in domain '%s' for locale '%s'." +msgstr "ÎÅ ÎÁÊÄÅÎÁ ÓÔÒÏËÁ '%s' × ÄÏÍÅÎÅ '%s' ÌÏËÅÊÌÁ '%s'." + +#: intl.cpp:434 intl.cpp:438 +#, c-format +msgid "string '%s' not found in locale '%s'." +msgstr "ÎÅ ÎÁÊÄÅÎÁ ÓÔÒÏËÁ '%s' × ÌÏËÅÊÌÅ '%s'." + +#: log.cpp:104 +#, c-format +msgid " (error %ld: %s)" +msgstr " (ÏÛÉÂËÁ %ld: %s)" + +#: log.cpp:165 +msgid "Debug: " +msgstr "ïÔÌÁÄËÁ: " + +#: log.cpp:171 +msgid "Fatal error: " +msgstr "ëÒÉÔÉÞÅÓËÁÑ ÏÛÉÂËÁ: " + +#: log.cpp:172 +msgid "Program aborted.\n" +msgstr "ðÒÏÇÒÁÍÍÁ ÏÓÔÁÎÏ×ÌÅÎÁ.\n" + +#: log.cpp:177 +msgid "Error: " +msgstr "ïÛÉÂËÁ: " + +#: log.cpp:181 +msgid "Warning: " +msgstr "ðÒÅÄÕÐÒÅÖÄÅÎÉÅ: " + +#: log.cpp:268 +#, c-format +msgid "Assert failed in file %s at line %d" +msgstr "ïÛÉÂËÁ assert × ÆÁÊÌÅ %s ÓÔÒÏËÁ %d" + +#: file.cpp:303 +msgid "unknown seek origin" +msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ ÏÔÓÞÅÔ ÐÏÉÓËÁ" + +msgid "looking for catalog '%s' in path '%s'." +msgstr "ÐÏÉÓË ËÁÔÁÌÏÇÁ '%s' × ÐÕÔÉ '%s'." + +#: intl.cpp:378 +msgid "no message catalog list" +msgstr "ÎÅÔ ÓÐÉÓËÁ ËÁÔÁÌÏÇÏ× ÓÏÏÂÝÅÎÉÊ" + +msgid "OK" +msgstr "OK" + +msgid "Cancel" +msgstr "ïÔÍÅÎÁ" diff --git a/samples/ipc/ClientVC.dsp b/samples/ipc/ClientVC.dsp new file mode 100644 index 0000000000..524591fdb1 --- /dev/null +++ b/samples/ipc/ClientVC.dsp @@ -0,0 +1,183 @@ +# Microsoft Developer Studio Project File - Name="ClientVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ClientVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ClientVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ClientVC.mak" CFG="ClientVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ClientVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ClientVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ClientVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ClientVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ClientVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/client.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/client.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/client.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/client.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ClientVC - Win32 Release" +# Name "ClientVC - Win32 Debug" +# Name "ClientVC - Win32 Debug DLL" +# Name "ClientVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\client.cpp + +!IF "$(CFG)" == "ClientVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\client.h +# End Source File +# Begin Source File + +SOURCE=.\client.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\ddesetup.h +# End Source File +# End Target +# End Project diff --git a/samples/ipc/ClientVC.dsw b/samples/ipc/ClientVC.dsw new file mode 100644 index 0000000000..048e935c16 --- /dev/null +++ b/samples/ipc/ClientVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ClientVC"=.\ClientVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/ipc/Makefile.in b/samples/ipc/Makefile.in index 67673da923..9789fc0116 100644 --- a/samples/ipc/Makefile.in +++ b/samples/ipc/Makefile.in @@ -21,7 +21,7 @@ VPATH = @PATH_IFS@$(top_srcdir)/samples/ipc # ':' for autoconf .SUFFIXES: .o .cpp .c .cxx .cpp.o : - $(CC) -c $(CPPFLAGS) -o $@ $< + $(CXX) -c $(CXXFLAGS) -o $@ $< # Set defaults from configure include ../../src/make.env @@ -29,10 +29,10 @@ include ../../src/make.env all: client server client: client.o ../../lib/@WX_TARGET_LIBRARY@ - $(CC) $(LDFLAGS) -o client client.o $(LDLIBS) + $(CXX) $(LDFLAGS) -o client client.o $(LDLIBS) server: server.o ../../lib/@WX_TARGET_LIBRARY@ - $(CC) $(LDFLAGS) -o server server.o $(LDLIBS) + $(CXX) $(LDFLAGS) -o server server.o $(LDLIBS) clean: rm -f $(OBJECTS) $(PROGRAM) core diff --git a/samples/ipc/ServerVC.dsp b/samples/ipc/ServerVC.dsp new file mode 100644 index 0000000000..6be1df00fa --- /dev/null +++ b/samples/ipc/ServerVC.dsp @@ -0,0 +1,183 @@ +# Microsoft Developer Studio Project File - Name="ServerVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ServerVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ServerVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ServerVC.mak" CFG="ServerVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ServerVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ServerVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ServerVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ServerVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ServerVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/server.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/server.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/server.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/server.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ServerVC - Win32 Release" +# Name "ServerVC - Win32 Debug" +# Name "ServerVC - Win32 Debug DLL" +# Name "ServerVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\ddesetup.h +# End Source File +# Begin Source File + +SOURCE=.\server.cpp + +!IF "$(CFG)" == "ServerVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\server.h +# End Source File +# Begin Source File + +SOURCE=.\server.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/ipc/ServerVC.dsw b/samples/ipc/ServerVC.dsw new file mode 100644 index 0000000000..44073be3f3 --- /dev/null +++ b/samples/ipc/ServerVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ServerVC"=.\ServerVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/ipc/client.cpp b/samples/ipc/client.cpp index 4cabdc42cb..9b694cc696 100644 --- a/samples/ipc/client.cpp +++ b/samples/ipc/client.cpp @@ -74,11 +74,14 @@ MyClient *my_client ; // main frame bool MyApp::OnInit() { - wxString server = "4242"; - wxString hostName = wxGetHostName(); + // service name (DDE classes) or port number (TCP/IP based classes) + wxString service = "4242"; + + // ignored under DDE, host name in TCP/IP based classes + wxString hostName = "localhost"; if (argc > 1) - server = argv[1]; + service = argv[1]; if (argc > 2) hostName = argv[2]; @@ -88,7 +91,7 @@ bool MyApp::OnInit() // suppress the log messages from MakeConnection() { wxLogNull nolog; - the_connection = (MyConnection *)my_client->MakeConnection(hostName, server, "IPC TEST"); + the_connection = (MyConnection *)my_client->MakeConnection(hostName, service, "IPC TEST"); while ( !the_connection ) { @@ -100,7 +103,7 @@ bool MyApp::OnInit() return FALSE; } - the_connection = (MyConnection *)my_client->MakeConnection(hostName, server, "IPC TEST"); + the_connection = (MyConnection *)my_client->MakeConnection(hostName, service, "IPC TEST"); } } diff --git a/samples/ipc/server.cpp b/samples/ipc/server.cpp index 820bdefc8a..92b727abb5 100644 --- a/samples/ipc/server.cpp +++ b/samples/ipc/server.cpp @@ -45,6 +45,7 @@ IMPLEMENT_APP(MyApp) BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU (SERVER_EXIT, MyFrame::OnExit) EVT_LISTBOX(SERVER_LISTBOX, MyFrame::OnListBoxClick) END_EVENT_TABLE() @@ -72,14 +73,15 @@ bool MyApp::OnInit() // Create the main frame window (new MyFrame(NULL, "Server"))->Show(TRUE); - // create the server object - wxString server_name = "4242"; + // service name (DDE classes) or port number (TCP/IP based classes) + wxString service = "4242"; + if (argc > 1) - server_name = argv[1]; + service = argv[1]; // Create a new server m_server = new MyServer; - m_server->Create(server_name); + m_server->Create(service); return TRUE; } @@ -109,7 +111,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title) // Make a menubar wxMenu *file_menu = new wxMenu; - file_menu->Append(SERVER_QUIT, "&Exit"); + file_menu->Append(SERVER_EXIT, "&Exit"); wxMenuBar *menu_bar = new wxMenuBar; @@ -132,7 +134,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title) } // Set the client process's listbox to this item -void MyFrame::OnListBoxClick(wxCommandEvent& event) +void MyFrame::OnListBoxClick(wxCommandEvent& WXUNUSED(event)) { wxListBox* listBox = (wxListBox*) panel->FindWindow(SERVER_LISTBOX); if (listBox) @@ -145,6 +147,11 @@ void MyFrame::OnListBoxClick(wxCommandEvent& event) } } +void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event)) +{ + Close(TRUE); +} + // ---------------------------------------------------------------------------- // IPCDialogBox // ---------------------------------------------------------------------------- diff --git a/samples/ipc/server.h b/samples/ipc/server.h index 03b358b1f4..ac85cd4b0d 100644 --- a/samples/ipc/server.h +++ b/samples/ipc/server.h @@ -30,6 +30,7 @@ public: MyFrame(wxFrame *frame, const wxString& title); void OnListBoxClick(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); private: wxPanel *panel; @@ -76,6 +77,6 @@ private: DECLARE_EVENT_TABLE() }; -#define SERVER_QUIT wxID_EXIT +#define SERVER_EXIT wxID_EXIT #define SERVER_LISTBOX 500 #define SERVER_QUIT_BUTTON 501 diff --git a/samples/joytest/JoytestVC.dsp b/samples/joytest/JoytestVC.dsp new file mode 100644 index 0000000000..ba3703fb62 --- /dev/null +++ b/samples/joytest/JoytestVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="JoytestVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=JoytestVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "JoytestVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "JoytestVC.mak" CFG="JoytestVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "JoytestVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "JoytestVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "JoytestVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "JoytestVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "JoytestVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/joytest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "JoytestVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/joytest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "JoytestVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/joytest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "JoytestVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/joytest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "JoytestVC - Win32 Release" +# Name "JoytestVC - Win32 Debug" +# Name "JoytestVC - Win32 Debug DLL" +# Name "JoytestVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\joytest.cpp + +!IF "$(CFG)" == "JoytestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "JoytestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "JoytestVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "JoytestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\joytest.h +# End Source File +# Begin Source File + +SOURCE=.\joytest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/joytest/JoytestVC.dsw b/samples/joytest/JoytestVC.dsw new file mode 100644 index 0000000000..d6acaab3a8 --- /dev/null +++ b/samples/joytest/JoytestVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "JoytestVC"=.\JoytestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/joytest/Makefile.in b/samples/joytest/Makefile.in index ffb1d9c7e1..7cf10698fb 100644 --- a/samples/joytest/Makefile.in +++ b/samples/joytest/Makefile.in @@ -1,18 +1,12 @@ -# -# File: makefile.unx -# Author: Julian Smart -# Created: 1998 -# Updated: -# Copyright: (c) 1998 Julian Smart -# -# "%W% %G%" -# -# Makefile for joytest example (UNIX). +# Purpose: makefile for joytest example (UNIX). +# Created: 2000-03-14 top_srcdir = @top_srcdir@/.. top_builddir = ../.. program_dir = samples/joytest +DATAFILES=gun.wav + PROGRAM=joytest OBJECTS=$(PROGRAM).o diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp index 900fe3b686..5fe4889958 100644 --- a/samples/joytest/joytest.cpp +++ b/samples/joytest/joytest.cpp @@ -44,7 +44,9 @@ bool MyApp::OnInit(void) wxMessageBox("No joystick detected!"); return FALSE; } +#if wxUSE_WAVE m_fire.Create("gun.wav"); +#endif // wxUSE_WAVE m_maxX = stick.GetXMax(); m_maxY = stick.GetYMax(); @@ -128,15 +130,17 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event) char buf[100]; if (event.ButtonDown()) - sprintf(buf, "Joystick (%ld, %ld) Fire!", pt.x, pt.y); + sprintf(buf, "Joystick (%d, %d) Fire!", pt.x, pt.y); else - sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y); + sprintf(buf, "Joystick (%d, %d)", pt.x, pt.y); frame->SetStatusText(buf); +#if wxUSE_WAVE if (event.ButtonDown() && wxGetApp().m_fire.IsOk()) { wxGetApp().m_fire.Play(); } +#endif // wxUSE_WAVE } BEGIN_EVENT_TABLE(MyFrame, wxFrame) diff --git a/samples/joytest/joytest.h b/samples/joytest/joytest.h index afa8a21a86..18a8a75e3c 100644 --- a/samples/joytest/joytest.h +++ b/samples/joytest/joytest.h @@ -19,7 +19,9 @@ class MyApp: public wxApp int m_maxX; int m_maxY; +#if wxUSE_WAVE wxWave m_fire; +#endif // wxUSE_WAVE }; DECLARE_APP(MyApp) diff --git a/samples/joytest/makefile.g95 b/samples/joytest/makefile.g95 index 67132e46c5..334bd4ad49 100644 --- a/samples/joytest/makefile.g95 +++ b/samples/joytest/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=joytest OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/layout/LayoutVC.dsp b/samples/layout/LayoutVC.dsp new file mode 100644 index 0000000000..7c9d45d7a7 --- /dev/null +++ b/samples/layout/LayoutVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="LayoutVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=LayoutVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "LayoutVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "LayoutVC.mak" CFG="LayoutVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "LayoutVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "LayoutVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "LayoutVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "LayoutVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "LayoutVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/layout.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "LayoutVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/layout.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "LayoutVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/layout.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "LayoutVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/layout.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "LayoutVC - Win32 Release" +# Name "LayoutVC - Win32 Debug" +# Name "LayoutVC - Win32 Debug DLL" +# Name "LayoutVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\layout.cpp + +!IF "$(CFG)" == "LayoutVC - Win32 Release" + +!ELSEIF "$(CFG)" == "LayoutVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LayoutVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "LayoutVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\layout.h +# End Source File +# Begin Source File + +SOURCE=.\layout.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/layout/LayoutVC.dsw b/samples/layout/LayoutVC.dsw new file mode 100644 index 0000000000..ed6e938853 --- /dev/null +++ b/samples/layout/LayoutVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "LayoutVC"=.\LayoutVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp index 1b5fa69511..fbec3d7dc0 100644 --- a/samples/layout/layout.cpp +++ b/samples/layout/layout.cpp @@ -227,7 +227,7 @@ void MyFrame::TestNotebookSizers(wxCommandEvent& WXUNUSED(event) ) wxPanel *panel = new wxPanel( notebook, -1 ); notebook->AddPage( panel, "Page Two" ); - wxBoxSizer *panelsizer = new wxBoxSizer( wxVERTICAL ); + wxSizer *panelsizer = new wxBoxSizer( wxVERTICAL ); wxTextCtrl *text = new wxTextCtrl( panel, -1, "TextLine 1.", wxDefaultPosition, wxSize(250,-1) ); panelsizer->Add( text, 0, wxGROW|wxALL, 30 ); @@ -350,6 +350,22 @@ MySizerFrame::MySizerFrame(wxFrame *frame, char *title, int x, int y ): 30); topsizer->Add(statsizer, 1, wxEXPAND | wxALL, 10); + // 2.7) And a test of wxGridSizer + wxGridSizer *gridsizer = new wxGridSizer(2, 5, 5); + gridsizer->Add(new wxStaticText(this, -1, "Label"), 0, + wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + gridsizer->Add(new wxTextCtrl(this, -1, "Grid sizer demo"), 1, + wxGROW | wxALIGN_CENTER_VERTICAL); + gridsizer->Add(new wxStaticText(this, -1, "Another label"), 0, + wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + gridsizer->Add(new wxTextCtrl(this, -1, "More text"), 1, + wxGROW | wxALIGN_CENTER_VERTICAL); + gridsizer->Add(new wxStaticText(this, -1, "Final label"), 0, + wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + gridsizer->Add(new wxTextCtrl(this, -1, "And yet more text"), 1, + wxGROW | wxALIGN_CENTER_VERTICAL); + topsizer->Add(gridsizer, 1, wxGROW | wxALL, 10); + // 3) middle: create wxStaticLine with minimum size (3x3) topsizer->Add( diff --git a/samples/listctrl/ListctrlVC.dsp b/samples/listctrl/ListctrlVC.dsp new file mode 100644 index 0000000000..52fb5171bf --- /dev/null +++ b/samples/listctrl/ListctrlVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="ListctrlVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ListctrlVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ListctrlVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ListctrlVC.mak" CFG="ListctrlVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ListctrlVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ListctrlVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ListctrlVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ListctrlVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ListctrlVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/listtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ListctrlVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/listtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ListctrlVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/listtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ListctrlVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/listtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ListctrlVC - Win32 Release" +# Name "ListctrlVC - Win32 Debug" +# Name "ListctrlVC - Win32 Debug DLL" +# Name "ListctrlVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\listtest.cpp + +!IF "$(CFG)" == "ListctrlVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ListctrlVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ListctrlVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ListctrlVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\listtest.h +# End Source File +# Begin Source File + +SOURCE=.\listtest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/listctrl/ListctrlVC.dsw b/samples/listctrl/ListctrlVC.dsw new file mode 100644 index 0000000000..250266d5b3 --- /dev/null +++ b/samples/listctrl/ListctrlVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ListctrlVC"=.\ListctrlVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 68bdf84300..5ebd4f6568 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -66,6 +66,8 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(LIST_SET_FG_COL, MyFrame::OnSetFgColour) EVT_MENU(LIST_SET_BG_COL, MyFrame::OnSetBgColour) EVT_MENU(LIST_TOGGLE_MULTI_SEL, MyFrame::OnToggleMultiSel) + EVT_MENU(LIST_SHOW_COL_INFO, MyFrame::OnShowColInfo) + EVT_UPDATE_UI(LIST_SHOW_COL_INFO, MyFrame::OnUpdateShowColInfo) END_EVENT_TABLE() BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl) @@ -82,6 +84,8 @@ BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl) EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown) EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated) EVT_LIST_COL_CLICK(LIST_CTRL, MyListCtrl::OnColClick) + + EVT_CHAR(MyListCtrl::OnChar) END_EVENT_TABLE() IMPLEMENT_APP(MyApp) @@ -170,6 +174,7 @@ MyFrame::MyFrame(const wxChar *title, int x, int y, int w, int h) menuList->Append(LIST_TOGGLE_FIRST, "&Toggle first item\tCtrl-T"); menuList->Append(LIST_DESELECT_ALL, "&Deselect All\tCtrl-D"); menuList->Append(LIST_SELECT_ALL, "S&elect All\tCtrl-A"); + menuList->Append(LIST_SHOW_COL_INFO, "Show &column info\tCtrl-C"); menuList->AppendSeparator(); menuList->Append(LIST_SORT, "&Sort\tCtrl-S"); menuList->AppendSeparator(); @@ -316,7 +321,7 @@ void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event)) wxStopWatch sw; wxString buf; - static const int NUM_ITEMS = 3000; + static const int NUM_ITEMS = 30;//00; for ( int i = 0; i < NUM_ITEMS; i++ ) { buf.Printf(_T("This is item %d"), i); @@ -430,6 +435,22 @@ void MyFrame::OnSort(wxCommandEvent& WXUNUSED(event)) sw.Time())); } +void MyFrame::OnShowColInfo(wxCommandEvent& event) +{ + int count = m_listCtrl->GetColumnCount(); + wxLogMessage("%d columns:", count); + for ( int c = 0; c < count; c++ ) + { + wxLogMessage("\tcolumn %d has width %d", c, + m_listCtrl->GetColumnWidth(c)); + } +} + +void MyFrame::OnUpdateShowColInfo(wxUpdateUIEvent& event) +{ + event.Enable( (m_listCtrl->GetWindowStyleFlag() & wxLC_REPORT) != 0 ); +} + void MyFrame::OnToggleMultiSel(wxCommandEvent& WXUNUSED(event)) { m_logWindow->WriteText("Current selection mode: "); @@ -579,11 +600,21 @@ void MyListCtrl::OnActivated(wxListEvent& event) void MyListCtrl::OnListKeyDown(wxListEvent& event) { LogEvent(event, _T("OnListKeyDown")); + + event.Skip(); +} + +void MyListCtrl::OnChar(wxKeyEvent& event) +{ + wxLogMessage(_T("Got char event.")); + + event.Skip(); } void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName) { - wxLogMessage(_T("Item %ld: %s (item data = %ld)"), - event.GetIndex(), eventName, event.GetData()); + wxLogMessage(_T("Item %ld: %s (item text = %s, data = %ld)"), + event.GetIndex(), eventName, + event.GetText().c_str(), event.GetData()); } diff --git a/samples/listctrl/listtest.h b/samples/listctrl/listtest.h index a79c15066c..e0ca2f31f7 100644 --- a/samples/listctrl/listtest.h +++ b/samples/listctrl/listtest.h @@ -74,6 +74,8 @@ public: void OnSetFgColour(wxCommandEvent& event); void OnSetBgColour(wxCommandEvent& event); void OnToggleMultiSel(wxCommandEvent& event); + void OnShowColInfo(wxCommandEvent& event); + void OnUpdateShowColInfo(wxUpdateUIEvent& event); void BusyOn(wxCommandEvent& event); void BusyOff(wxCommandEvent& event); @@ -109,6 +111,7 @@ enum LIST_SET_BG_COL, LIST_TOGGLE_MULTI_SEL, LIST_TOGGLE_FIRST, + LIST_SHOW_COL_INFO, LIST_CTRL = 1000 }; diff --git a/samples/makefile.g95 b/samples/makefile.g95 index 8fec5a178c..808042db39 100644 --- a/samples/makefile.g95 +++ b/samples/makefile.g95 @@ -20,41 +20,41 @@ MAKEFILE=makefile.g95 # Mingw make may not have a shell to use, so can't use a loop here. Sigh. # Please add new sample directories alphabetically to make it easier to # keep track. + all clean: -$(MAKE) -C calendar -f $(MAKEFILE) $@ -$(MAKE) -C caret -f $(MAKEFILE) $@ -$(MAKE) -C checklst -f $(MAKEFILE) $@ -$(MAKE) -C config -f $(MAKEFILE) $@ - -$(MAKE) -C console -f $(MAKEFILE) $@ -$(MAKE) -C controls -f $(MAKEFILE) $@ - -$(MAKE) -C db -f $(MAKEFILE) $@ - -$(MAKE) -C ipc -f $(MAKEFILE) $@ -$(MAKE) -C dialogs -f $(MAKEFILE) $@ -$(MAKE) -C dnd -f $(MAKEFILE) $@ -$(MAKE) -C docview -f $(MAKEFILE) $@ -$(MAKE) -C docvwmdi -f $(MAKEFILE) $@ + -$(MAKE) -C dragimag -f $(MAKEFILE) $@ -$(MAKE) -C drawing -f $(MAKEFILE) $@ -$(MAKE) -C dynamic -f $(MAKEFILE) $@ + -$(MAKE) -C exec -f $(MAKEFILE) $@ -$(MAKE) -C font -f $(MAKEFILE) $@ -$(MAKE) -C grid -f $(MAKEFILE) $@ -$(MAKE) -C help -f $(MAKEFILE) $@ -$(MAKE) -C html -f $(MAKEFILE) $@ -$(MAKE) -C image -f $(MAKEFILE) $@ -$(MAKE) -C internat -f $(MAKEFILE) $@ + -$(MAKE) -C ipc -f $(MAKEFILE) $@ -$(MAKE) -C joytest -f $(MAKEFILE) $@ -$(MAKE) -C layout -f $(MAKEFILE) $@ -$(MAKE) -C listctrl -f $(MAKEFILE) $@ -$(MAKE) -C mdi -f $(MAKEFILE) $@ - -$(MAKE) -C memcheck -f $(MAKEFILE) $@ -$(MAKE) -C menu -f $(MAKEFILE) $@ -$(MAKE) -C minifram -f $(MAKEFILE) $@ -$(MAKE) -C minimal -f $(MAKEFILE) $@ -$(MAKE) -C nativdlg -f $(MAKEFILE) $@ - -$(MAKE) -C dialup -f $(MAKEFILE) $@ -$(MAKE) -C newgrid -f $(MAKEFILE) $@ -$(MAKE) -C notebook -f $(MAKEFILE) $@ -$(MAKE) -C oleauto -f $(MAKEFILE) $@ -$(MAKE) -C ownerdrw -f $(MAKEFILE) $@ + -$(MAKE) -C plot -f $(MAKEFILE) $@ -$(MAKE) -C png -f $(MAKEFILE) $@ -$(MAKE) -C printing -f $(MAKEFILE) $@ -$(MAKE) -C proplist -f $(MAKEFILE) $@ @@ -66,20 +66,37 @@ all clean: -$(MAKE) -C sashtest -f $(MAKEFILE) $@ -$(MAKE) -C scroll -f $(MAKEFILE) $@ -$(MAKE) -C scrollsub -f $(MAKEFILE) $@ + -$(MAKE) -C sockets -f $(MAKEFILE) $@ -$(MAKE) -C splitter -f $(MAKEFILE) $@ - -$(MAKE) -C tab -f $(MAKEFILE) $@ + -$(MAKE) -C statbar -f $(MAKEFILE) $@ -$(MAKE) -C taskbar -f $(MAKEFILE) $@ -$(MAKE) -C text -f $(MAKEFILE) $@ -$(MAKE) -C thread -f $(MAKEFILE) $@ -$(MAKE) -C toolbar -f $(MAKEFILE) $@ -$(MAKE) -C treectrl -f $(MAKEFILE) $@ + -$(MAKE) -C treelay -f $(MAKEFILE) $@ -$(MAKE) -C typetest -f $(MAKEFILE) $@ -$(MAKE) -C validate -f $(MAKEFILE) $@ -$(MAKE) -C wizard -f $(MAKEFILE) $@ - -$(MAKE) -C sockets -f $(MAKEFILE) $@ -# MFC still not available for mingw32 +# Don't compile or don't link +# -$(MAKE) -C dialup -f $(MAKEFILE) $@ +# -$(MAKE) -C db -f $(MAKEFILE) $@ +# -$(MAKE) -C tab -f $(MAKEFILE) $@ + +# Samples untested +# +# -$(MAKE) -C opengl -f $(MAKEFILE) $@ + +# Missing makefile, sample untested +# +# -$(MAKE) -C console -f $(MAKEFILE) $@ + +# MFC still not available for cygwin/mingw # # -$(MAKE) -C mfc -f $(MAKEFILE) $@ +# Memcheck does not work under cygwin/mingw +# +# -$(MAKE) -C memcheck -f $(MAKEFILE) $@ diff --git a/samples/makefile.vc b/samples/makefile.vc index ca4931f5c3..61942eb0ff 100644 --- a/samples/makefile.vc +++ b/samples/makefile.vc @@ -235,7 +235,7 @@ clean: cd $(WXDIR)\samples\png nmake -f makefile.vc clean cd $(WXDIR)\samples\plot - nmake -f makefile.vc FINAL=$(FINAL) + nmake -f makefile.vc clean cd $(WXDIR)\samples\printing nmake -f makefile.vc clean cd $(WXDIR)\samples\proplist diff --git a/samples/mdi/MdiVC.dsp b/samples/mdi/MdiVC.dsp new file mode 100644 index 0000000000..6d15d0b5af --- /dev/null +++ b/samples/mdi/MdiVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="MdiVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MdiVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MdiVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MdiVC.mak" CFG="MdiVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MdiVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MdiVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MdiVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "MdiVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MdiVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/mdi.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MdiVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/mdi.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MdiVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/mdi.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MdiVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/mdi.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "MdiVC - Win32 Release" +# Name "MdiVC - Win32 Debug" +# Name "MdiVC - Win32 Debug DLL" +# Name "MdiVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\mdi.cpp + +!IF "$(CFG)" == "MdiVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MdiVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MdiVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MdiVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\mdi.h +# End Source File +# Begin Source File + +SOURCE=.\mdi.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/mdi/MdiVC.dsw b/samples/mdi/MdiVC.dsw new file mode 100644 index 0000000000..6dd27360df --- /dev/null +++ b/samples/mdi/MdiVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MdiVC"=.\MdiVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 892bdd5537..a04f83402e 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -80,6 +80,14 @@ END_EVENT_TABLE() BEGIN_EVENT_TABLE(MyChild, wxMDIChildFrame) EVT_MENU(MDI_CHILD_QUIT, MyChild::OnQuit) EVT_MENU(MDI_REFRESH, MyChild::OnRefresh) + EVT_MENU(MDI_CHANGE_TITLE, MyChild::OnChangeTitle) + EVT_MENU(MDI_CHANGE_POSITION, MyChild::OnChangePosition) + EVT_MENU(MDI_CHANGE_SIZE, MyChild::OnChangeSize) + + EVT_UPDATE_UI(MDI_REFRESH, MyChild::OnUpdateRefresh) + + EVT_SIZE(MyChild::OnSize) + EVT_MOVE(MyChild::OnMove) EVT_CLOSE(MyChild::OnClose) END_EVENT_TABLE() @@ -123,11 +131,11 @@ bool MyApp::OnInit() // Make a menubar wxMenu *file_menu = new wxMenu; - file_menu->Append(MDI_NEW_WINDOW, "&New window", "Create a new child window"); - file_menu->Append(MDI_QUIT, "&Exit", "Quit the program"); + file_menu->Append(MDI_NEW_WINDOW, "&New window\tCtrl-N", "Create a new child window"); + file_menu->Append(MDI_QUIT, "&Exit\tAlt-X", "Quit the program"); wxMenu *help_menu = new wxMenu; - help_menu->Append(MDI_ABOUT, "&About"); + help_menu->Append(MDI_ABOUT, "&About\tF1"); wxMenuBar *menu_bar = new wxMenuBar; @@ -233,8 +241,11 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) wxMenu *option_menu = new wxMenu; - // Dummy option option_menu->Append(MDI_REFRESH, "&Refresh picture"); + option_menu->Append(MDI_CHANGE_TITLE, "Change &title...\tCtrl-T"); + option_menu->AppendSeparator(); + option_menu->Append(MDI_CHANGE_POSITION, "Move frame\tCtrl-M"); + option_menu->Append(MDI_CHANGE_SIZE, "Resize frame\tCtrl-S"); wxMenu *help_menu = new wxMenu; help_menu->Append(MDI_ABOUT, "&About"); @@ -242,7 +253,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, "&File"); - menu_bar->Append(option_menu, "&Options"); + menu_bar->Append(option_menu, "&Child"); menu_bar->Append(help_menu, "&Help"); // Associate the menu bar with the frame @@ -415,9 +426,40 @@ void MyChild::OnQuit(wxCommandEvent& WXUNUSED(event)) Close(TRUE); } -void MyChild::OnRefresh(wxCommandEvent& event) +void MyChild::OnUpdateRefresh(wxUpdateUIEvent& event) { - Refresh(); + event.Enable( canvas && canvas->IsDirty() ); +} + +void MyChild::OnRefresh(wxCommandEvent& WXUNUSED(event)) +{ + if ( canvas ) + canvas->Refresh(); +} + +void MyChild::OnChangePosition(wxCommandEvent& WXUNUSED(event)) +{ + Move(10, 10); +} + +void MyChild::OnChangeSize(wxCommandEvent& WXUNUSED(event)) +{ + SetClientSize(100, 100); +} + +void MyChild::OnChangeTitle(wxCommandEvent& WXUNUSED(event)) +{ + static wxString s_title = _T("Canvas Frame"); + + wxString title = wxGetTextFromUser(_T("Enter the new title for MDI child"), + _T("MDI sample question"), + s_title, + GetParent()->GetParent()); + if ( !title ) + return; + + s_title = title; + SetTitle(s_title); } void MyChild::OnActivate(wxActivateEvent& event) @@ -426,6 +468,33 @@ void MyChild::OnActivate(wxActivateEvent& event) canvas->SetFocus(); } +void MyChild::OnMove(wxMoveEvent& event) +{ + // VZ: here everything is totally wrong under MSW, the positions are + // different and both wrong (pos2 is off by 2 pixels for me which seems + // to be the width of the MDI canvas border) + wxPoint pos1 = event.GetPosition(), + pos2 = GetPosition(); + wxLogStatus("position from event: (%d, %d), from frame (%d, %d)", + pos1.x, pos1.y, pos2.x, pos2.y); + + event.Skip(); +} + +void MyChild::OnSize(wxSizeEvent& event) +{ + // VZ: under MSW the size event carries the client size (quite + // unexpectedly) *except* for the very first one which has the full + // size... what should it really be? TODO: check under wxGTK + wxSize size1 = event.GetSize(), + size2 = GetSize(), + size3 = GetClientSize(); + wxLogStatus("size from event: %dx%d, from frame %dx%d, client %dx%d", + size1.x, size1.y, size2.x, size2.y, size3.x, size3.y); + + event.Skip(); +} + void MyChild::OnClose(wxCloseEvent& event) { if ( canvas && canvas->IsDirty() ) diff --git a/samples/mdi/mdi.h b/samples/mdi/mdi.h index 6efb5b61ad..e49b01a387 100644 --- a/samples/mdi/mdi.h +++ b/samples/mdi/mdi.h @@ -64,9 +64,16 @@ public: void OnActivate(wxActivateEvent& event); void OnRefresh(wxCommandEvent& event); + void OnChangeTitle(wxCommandEvent& event); + void OnChangePosition(wxCommandEvent& event); + void OnChangeSize(wxCommandEvent& event); void OnQuit(wxCommandEvent& event); + void OnSize(wxSizeEvent& event); + void OnMove(wxMoveEvent& event); void OnClose(wxCloseEvent& event); + void OnUpdateRefresh(wxUpdateUIEvent& event); + DECLARE_EVENT_TABLE() }; @@ -76,6 +83,9 @@ enum MDI_QUIT = 100, MDI_NEW_WINDOW, MDI_REFRESH, + MDI_CHANGE_TITLE, + MDI_CHANGE_POSITION, + MDI_CHANGE_SIZE, MDI_CHILD_QUIT, MDI_ABOUT }; diff --git a/samples/memcheck/MemcheckVC.dsp b/samples/memcheck/MemcheckVC.dsp new file mode 100644 index 0000000000..c0755f0550 --- /dev/null +++ b/samples/memcheck/MemcheckVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="MemcheckVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MemcheckVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MemcheckVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MemcheckVC.mak" CFG="MemcheckVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MemcheckVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MemcheckVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MemcheckVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "MemcheckVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MemcheckVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/memcheck.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MemcheckVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/memcheck.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MemcheckVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/memcheck.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MemcheckVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/memcheck.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "MemcheckVC - Win32 Release" +# Name "MemcheckVC - Win32 Debug" +# Name "MemcheckVC - Win32 Debug DLL" +# Name "MemcheckVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\memcheck.cpp + +!IF "$(CFG)" == "MemcheckVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MemcheckVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MemcheckVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MemcheckVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\memcheck.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/memcheck/MemcheckVC.dsw b/samples/memcheck/MemcheckVC.dsw new file mode 100644 index 0000000000..616f6667cd --- /dev/null +++ b/samples/memcheck/MemcheckVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MemcheckVC"=.\MemcheckVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/menu/MenuVC.dsp b/samples/menu/MenuVC.dsp new file mode 100644 index 0000000000..36d6633b4a --- /dev/null +++ b/samples/menu/MenuVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="MenuVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MenuVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MenuVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MenuVC.mak" CFG="MenuVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MenuVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MenuVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MenuVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "MenuVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MenuVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/menu.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MenuVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/menu.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MenuVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/menu.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MenuVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/menu.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "MenuVC - Win32 Release" +# Name "MenuVC - Win32 Debug" +# Name "MenuVC - Win32 Debug DLL" +# Name "MenuVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\menu.cpp + +!IF "$(CFG)" == "MenuVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MenuVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MenuVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MenuVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\menu.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/menu/MenuVC.dsw b/samples/menu/MenuVC.dsw new file mode 100644 index 0000000000..057e66e493 --- /dev/null +++ b/samples/menu/MenuVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MenuVC"=.\MenuVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index 1b098b2f39..6ef699f100 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -47,7 +47,9 @@ class MyFrame: public wxFrame public: MyFrame(); - virtual ~MyFrame() { delete m_menu; } + virtual ~MyFrame(); + + void LogMenuEvent(const wxCommandEvent& event); void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); @@ -75,6 +77,7 @@ public: void OnRightDown(wxMouseEvent& event); void OnUpdateCheckMenuItemUI(wxUpdateUIEvent& event); + void OnUpdatePopup(wxUpdateUIEvent& event) { event.Enable(FALSE); } private: wxMenu *CreateDummyMenu(wxString *title); @@ -88,6 +91,36 @@ private: DECLARE_EVENT_TABLE() }; +// A small helper class which intercepts all menu events and logs them +class MyEvtHandler : public wxEvtHandler +{ +public: + MyEvtHandler(MyFrame *frame) { m_frame = frame; } + + void OnMenuEvent(wxCommandEvent& event) + { + m_frame->LogMenuEvent(event); + + event.Skip(); + } + +private: + MyFrame *m_frame; + + DECLARE_EVENT_TABLE() +}; + +class MyPopupMenu : public wxMenu +{ +public: + MyPopupMenu(const wxString& title) : wxMenu(title) { } + + void OnUpdateUI(wxUpdateUIEvent& event) { event.Enable(FALSE); } + +private: + DECLARE_EVENT_TABLE() +}; + // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -124,6 +157,8 @@ enum Menu_Popup_ToBeDeleted = 2000, Menu_Popup_ToBeGreyed, + Menu_Popup_ToBeGreyed2, + Menu_Popup_ToBeGreyed3, Menu_Popup_ToBeChecked, Menu_Popup_Submenu, @@ -161,9 +196,19 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_UPDATE_UI(Menu_Menu_Check, MyFrame::OnUpdateCheckMenuItemUI) + EVT_UPDATE_UI(Menu_Popup_ToBeGreyed3, MyFrame::OnUpdatePopup) + EVT_RIGHT_DOWN(MyFrame::OnRightDown) END_EVENT_TABLE() +BEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler) + EVT_MENU(-1, MyEvtHandler::OnMenuEvent) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(MyPopupMenu, wxMenu) + EVT_UPDATE_UI(Menu_Popup_ToBeGreyed2, MyPopupMenu::OnUpdateUI) +END_EVENT_TABLE() + // ============================================================================ // implementation // ============================================================================ @@ -202,7 +247,7 @@ MyFrame::MyFrame() m_menu = NULL; m_countDummy = 0; - CreateStatusBar(); + CreateStatusBar(2); // create the menubar wxMenu *fileMenu = new wxMenu; @@ -267,6 +312,17 @@ MyFrame::MyFrame() // associate the menu bar with the frame SetMenuBar(menuBar); + + // intercept all menu events and log them in this custom event handler + PushEventHandler(new MyEvtHandler(this)); +} + +MyFrame::~MyFrame() +{ + delete m_menu; + + // delete the event handler installed in ctor + PopEventHandler(TRUE); } wxMenu *MyFrame::CreateDummyMenu(wxString *title) @@ -302,6 +358,25 @@ wxMenuItem *MyFrame::GetLastMenuItem() const } } +void MyFrame::LogMenuEvent(const wxCommandEvent& event) +{ + int id = event.GetId(); + if (!GetMenuBar()->FindItem(id)) + return; + wxString msg = wxString::Format("Menu command %d", id); + if ( GetMenuBar()->FindItem(id)->IsCheckable() ) + { + msg += wxString::Format(" (the item is currently %schecked)", + event.IsChecked() ? "" : "not "); + } + + SetStatusText(msg, 1); +} + +// ---------------------------------------------------------------------------- +// menu callbacks +// ---------------------------------------------------------------------------- + void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close(TRUE); @@ -408,11 +483,11 @@ void MyFrame::OnAppendMenuItem(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAppendSubMenu(wxCommandEvent& WXUNUSED(event)) { wxMenuBar *menubar = GetMenuBar(); - + wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 1); - - menu->Append(Menu_Dummy_Last, "Dummy sub menu\tCtrl-F2", - CreateDummyMenu(NULL)); + + menu->Append(Menu_Dummy_Last, "Dummy sub menu", + CreateDummyMenu(NULL), "Dummy sub menu help"); } void MyFrame::OnDeleteMenuItem(wxCommandEvent& WXUNUSED(event)) @@ -498,7 +573,7 @@ void MyFrame::OnGetMenuItemInfo(wxCommandEvent& WXUNUSED(event)) msg << "The item is " << (item->IsEnabled() ? "enabled" : "disabled") << '\n'; - + if ( item->IsCheckable() ) { msg << "It is checkable and " << (item->IsChecked() ? "" : "un") @@ -565,7 +640,7 @@ void MyFrame::OnGetMenuItemInfo(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnRightDown(wxMouseEvent &event ) { - wxMenu menu("Test popup"); + MyPopupMenu menu("Test popup"); menu.Append(Menu_Help_About, "&About"); menu.Append(Menu_Popup_Submenu, "Submenu", CreateDummyMenu(NULL)); @@ -573,11 +648,22 @@ void MyFrame::OnRightDown(wxMouseEvent &event ) menu.Append(Menu_Popup_ToBeChecked, "To be checked", "", TRUE); menu.Append(Menu_Popup_ToBeGreyed, "To be greyed"); menu.AppendSeparator(); + // VZ: don't search for the word autogreyed in the dictionary... + menu.Append(Menu_Popup_ToBeGreyed2, "To be autogreyed"); + menu.Append(Menu_Popup_ToBeGreyed3, "This one too"); + menu.AppendSeparator(); menu.Append(Menu_File_Quit, "E&xit"); - //menu.Delete(Menu_Popup_ToBeDeleted); + menu.Delete(Menu_Popup_ToBeDeleted); menu.Check(Menu_Popup_ToBeChecked, TRUE); menu.Enable(Menu_Popup_ToBeGreyed, FALSE); PopupMenu( &menu, event.GetX(), event.GetY() ); + + // test for destroying items in popup menus +#if 0 + menu.Destroy(Menu_Popup_Submenu); + + PopupMenu( &menu, event.GetX(), event.GetY() ); +#endif // 0 } diff --git a/samples/mfc/MfcVC.dsp b/samples/mfc/MfcVC.dsp new file mode 100644 index 0000000000..f26a11eec8 --- /dev/null +++ b/samples/mfc/MfcVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="MfcVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MfcVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MfcVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MfcVC.mak" CFG="MfcVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MfcVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MfcVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MfcVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "MfcVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MfcVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "_AFXDLL" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib opengl32.lib glu32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/mfctest.exe" /libpath:"../../lib" + +!ELSEIF "$(CFG)" == "MfcVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "_AFXDLL" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib opengl32.lib glu32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/mfctest.exe" /pdbtype:sept /libpath:"../../lib" + +!ELSEIF "$(CFG)" == "MfcVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /D "_AFXDLL" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib opengl32.lib glu32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/mfctest.exe" /pdbtype:sept /libpath:"../../lib" + +!ELSEIF "$(CFG)" == "MfcVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /D "_AFXDLL" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib opengl32.lib glu32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/mfctest.exe" /libpath:"../../lib" + +!ENDIF + +# Begin Target + +# Name "MfcVC - Win32 Release" +# Name "MfcVC - Win32 Debug" +# Name "MfcVC - Win32 Debug DLL" +# Name "MfcVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\mfctest.cpp + +!IF "$(CFG)" == "MfcVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MfcVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MfcVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MfcVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\mfctest.h +# End Source File +# Begin Source File + +SOURCE=.\mfctest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" +# End Source File +# End Target +# End Project diff --git a/src/xpm/xpm.dsw b/samples/mfc/MfcVC.dsw similarity index 90% rename from src/xpm/xpm.dsw rename to samples/mfc/MfcVC.dsw index f87f390374..03f2df88b0 100644 --- a/src/xpm/xpm.dsw +++ b/samples/mfc/MfcVC.dsw @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "xpm"=.\xpm.dsp - Package Owner=<4> +Project: "MfcVC"=.\MfcVC.dsp - Package Owner=<4> Package=<5> {{{ diff --git a/samples/mfc/mfctest.cpp b/samples/mfc/mfctest.cpp index ab1e42de2e..d50d963470 100644 --- a/samples/mfc/mfctest.cpp +++ b/samples/mfc/mfctest.cpp @@ -46,6 +46,9 @@ // version. Perhaps someone else is a wizard at working out the required settings // in the wxWin library and the sample; then debugging the assert problem may be // easier. +// +// (4) Compiling wxWindows in DLL mode currently includes windows.h, so you must only +// try linking wxWindows statically. // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -56,8 +59,8 @@ #include "wx/wx.h" -#ifdef _WINDOWS_ -#error Sorry, you need to edit include/wx/wxprec.h, comment out the windows.h inclusion, and recompile. +#if defined(_WINDOWS_) || !wxUSE_MFC +#error Sorry, you need to edit include/wx/msw/setup.h, set wxUSE_MFC to 1, and recompile. #endif #ifdef new diff --git a/samples/minifram/MiniframVC.dsp b/samples/minifram/MiniframVC.dsp new file mode 100644 index 0000000000..2e3fc2b376 --- /dev/null +++ b/samples/minifram/MiniframVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="MiniframVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MiniframVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MiniframVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MiniframVC.mak" CFG="MiniframVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MiniframVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MiniframVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MiniframVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "MiniframVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MiniframVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/minifram.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MiniframVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/minifram.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MiniframVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/minifram.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MiniframVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/minifram.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "MiniframVC - Win32 Release" +# Name "MiniframVC - Win32 Debug" +# Name "MiniframVC - Win32 Debug DLL" +# Name "MiniframVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\minifram.cpp + +!IF "$(CFG)" == "MiniframVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MiniframVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MiniframVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MiniframVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\minifram.h +# End Source File +# Begin Source File + +SOURCE=.\minifram.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/minifram/MiniframVC.dsw b/samples/minifram/MiniframVC.dsw new file mode 100644 index 0000000000..db8f6aa356 --- /dev/null +++ b/samples/minifram/MiniframVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MiniframVC"=.\MiniframVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/minifram/makefile.g95 b/samples/minifram/makefile.g95 index 413fb4a6b0..3a7ba816f8 100644 --- a/samples/minifram/makefile.g95 +++ b/samples/minifram/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=minifram OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/minimal/MinimalVC.dsp b/samples/minimal/MinimalVC.dsp new file mode 100644 index 0000000000..17c3df07dc --- /dev/null +++ b/samples/minimal/MinimalVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="MinimalVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=MinimalVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "MinimalVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "MinimalVC.mak" CFG="MinimalVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "MinimalVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "MinimalVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "MinimalVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "MinimalVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "MinimalVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MinimalVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/minimal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MinimalVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/minimal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "MinimalVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "MinimalVC - Win32 Release" +# Name "MinimalVC - Win32 Debug" +# Name "MinimalVC - Win32 Debug DLL" +# Name "MinimalVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\minimal.cpp + +!IF "$(CFG)" == "MinimalVC - Win32 Release" + +!ELSEIF "$(CFG)" == "MinimalVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MinimalVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "MinimalVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\minimal.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/minimal/MinimalVC.dsw b/samples/minimal/MinimalVC.dsw new file mode 100644 index 0000000000..1779a37a5d --- /dev/null +++ b/samples/minimal/MinimalVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "MinimalVC"=.\MinimalVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/minimal/makefile.va b/samples/minimal/makefile.va index ba7f61ed13..071998e327 100644 --- a/samples/minimal/makefile.va +++ b/samples/minimal/makefile.va @@ -11,11 +11,11 @@ # Set WXDIR for your system WXDIR = $(WXWIN) -WXUSINGDLL=0 +# WXUSINGDLL=0 !include $(WXDIR)\src\makeva.env -PROGRAM=$D\minimal +PROGRAM=minimal OBJECTS = $(PROGRAM).obj !if [md $D] diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 6a093c743e..300c169a78 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -29,13 +29,13 @@ #endif // for all others, include the necessary headers (this file is usually all you -// need because it includes almost all "standard" wxWindows headers +// need because it includes almost all "standard" wxWindows headers) #ifndef WX_PRECOMP #include "wx/wx.h" #endif // ---------------------------------------------------------------------------- -// ressources +// resources // ---------------------------------------------------------------------------- // the application icon #if defined(__WXGTK__) || defined(__WXMOTIF__) @@ -114,7 +114,7 @@ IMPLEMENT_APP(MyApp) // the application class // ---------------------------------------------------------------------------- -// `Main program' equivalent: the program execution "starts" here +// 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { // create the main application window diff --git a/samples/minimal/minimal.rc4 b/samples/minimal/minimal.rc4 new file mode 100644 index 0000000000..fc50aa7d7f --- /dev/null +++ b/samples/minimal/minimal.rc4 @@ -0,0 +1,6 @@ +ICON 1 PRELOAD "..\\samples\\minimal\\mondros2.ico" +#include "H:\DEV\WX22\WXWINDOWS\include\wx\os2\wx.rc" + +#define MINIMAL_QUIT 1 +#define MINIMAL_ABOUT 102 + diff --git a/samples/nativdlg/NativdlgVC.dsp b/samples/nativdlg/NativdlgVC.dsp new file mode 100644 index 0000000000..5b7578b4ba --- /dev/null +++ b/samples/nativdlg/NativdlgVC.dsp @@ -0,0 +1,183 @@ +# Microsoft Developer Studio Project File - Name="NativdlgVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=NativdlgVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NativdlgVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NativdlgVC.mak" CFG="NativdlgVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NativdlgVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "NativdlgVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "NativdlgVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "NativdlgVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NativdlgVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/nativdlg.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "NativdlgVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/nativdlg.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "NativdlgVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/nativdlg.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "NativdlgVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/nativdlg.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "NativdlgVC - Win32 Release" +# Name "NativdlgVC - Win32 Debug" +# Name "NativdlgVC - Win32 Debug DLL" +# Name "NativdlgVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\nativdlg.cpp + +!IF "$(CFG)" == "NativdlgVC - Win32 Release" + +!ELSEIF "$(CFG)" == "NativdlgVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "NativdlgVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "NativdlgVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\nativdlg.h +# End Source File +# Begin Source File + +SOURCE=.\nativdlg.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# End Target +# End Project diff --git a/samples/nativdlg/NativdlgVC.dsw b/samples/nativdlg/NativdlgVC.dsw new file mode 100644 index 0000000000..4711016f2e --- /dev/null +++ b/samples/nativdlg/NativdlgVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "NativdlgVC"=.\NativdlgVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/nativdlg/dialog1.rc b/samples/nativdlg/dialog1.rc index 54c00b55a9..2d708852be 100644 --- a/samples/nativdlg/dialog1.rc +++ b/samples/nativdlg/dialog1.rc @@ -13,6 +13,10 @@ #define __WIN95__ #endif +//#ifdef _MSC_VER +#define __VISUALC__ _MSC_VER +//#endif + #ifdef __GNUWIN32__ #define wxID_OK 5100 #define wxID_CANCEL 5101 diff --git a/samples/newgrid/griddemo.cpp b/samples/newgrid/griddemo.cpp index 15b56fe752..5f34c1c833 100644 --- a/samples/newgrid/griddemo.cpp +++ b/samples/newgrid/griddemo.cpp @@ -71,6 +71,8 @@ BEGIN_EVENT_TABLE( GridFrame, wxFrame ) EVT_MENU( ID_TOGGLEROWSIZING, GridFrame::ToggleRowSizing ) EVT_MENU( ID_TOGGLECOLSIZING, GridFrame::ToggleColSizing ) EVT_MENU( ID_TOGGLEGRIDSIZING, GridFrame::ToggleGridSizing ) + EVT_MENU( ID_TOGGLEGRIDLINES, GridFrame::ToggleGridLines ) + EVT_MENU( ID_AUTOSIZECOLS, GridFrame::AutoSizeCols ) EVT_MENU( ID_SETLABELCOLOUR, GridFrame::SetLabelColour ) EVT_MENU( ID_SETLABELTEXTCOLOUR, GridFrame::SetLabelTextColour ) EVT_MENU( ID_ROWLABELHORIZALIGN, GridFrame::SetRowLabelHorizAlignment ) @@ -129,6 +131,8 @@ GridFrame::GridFrame() viewMenu->Append( ID_TOGGLEROWSIZING, "Ro&w drag-resize", "", TRUE ); viewMenu->Append( ID_TOGGLECOLSIZING, "C&ol drag-resize", "", TRUE ); viewMenu->Append( ID_TOGGLEGRIDSIZING, "&Grid drag-resize", "", TRUE ); + viewMenu->Append( ID_TOGGLEGRIDLINES, "&Grid Lines", "", TRUE ); + viewMenu->Append( ID_AUTOSIZECOLS, "&Auto-size cols" ); wxMenu *rowLabelMenu = new wxMenu; @@ -288,6 +292,7 @@ void GridFrame::SetDefaults() GetMenuBar()->Check( ID_TOGGLEROWSIZING, TRUE ); GetMenuBar()->Check( ID_TOGGLECOLSIZING, TRUE ); GetMenuBar()->Check( ID_TOGGLEGRIDSIZING, TRUE ); + GetMenuBar()->Check( ID_TOGGLEGRIDLINES, TRUE ); } @@ -344,6 +349,20 @@ void GridFrame::ToggleGridSizing( wxCommandEvent& WXUNUSED(ev) ) } +void GridFrame::ToggleGridLines( wxCommandEvent& WXUNUSED(ev) ) +{ + grid->EnableGridLines( + GetMenuBar()->IsChecked( ID_TOGGLEGRIDLINES ) ); +} + + +void GridFrame::AutoSizeCols( wxCommandEvent& WXUNUSED(ev) ) +{ + grid->AutoSizeColumns(); + grid->Refresh(); +} + + void GridFrame::SetLabelColour( wxCommandEvent& WXUNUSED(ev) ) { wxColourDialog dlg( NULL ); @@ -497,9 +516,13 @@ void GridFrame::DeleteSelectedRows( wxCommandEvent& WXUNUSED(ev) ) { if ( grid->IsSelection() ) { - for ( int n = 0; n < grid->GetNumberRows(); n++ ) + grid->BeginBatch(); + for ( int n = 0; n < grid->GetNumberRows(); ) if ( grid->IsInSelection( n , 0 ) ) grid->DeleteRows( n, 1 ); + else + n++; + grid->EndBatch(); } } @@ -508,9 +531,13 @@ void GridFrame::DeleteSelectedCols( wxCommandEvent& WXUNUSED(ev) ) { if ( grid->IsSelection() ) { - for ( int n = 0; n < grid->GetNumberCols(); n++ ) + grid->BeginBatch(); + for ( int n = 0; n < grid->GetNumberCols(); ) if ( grid->IsInSelection( 0 , n ) ) grid->DeleteCols( n, 1 ); + else + n++; + grid->EndBatch(); } } @@ -847,7 +874,7 @@ enum Severity Sev_Max }; -static const wxChar* severities[] = +static const wxString severities[] = { _T("wishlist"), _T("minor"), diff --git a/samples/newgrid/griddemo.h b/samples/newgrid/griddemo.h index 5140bfbbb4..29f1bca2df 100644 --- a/samples/newgrid/griddemo.h +++ b/samples/newgrid/griddemo.h @@ -40,6 +40,8 @@ class GridFrame : public wxFrame void ToggleRowSizing( wxCommandEvent& ); void ToggleColSizing( wxCommandEvent& ); void ToggleGridSizing( wxCommandEvent& ); + void ToggleGridLines( wxCommandEvent& ); + void AutoSizeCols( wxCommandEvent& ); void SetLabelColour( wxCommandEvent& ); void SetLabelTextColour( wxCommandEvent& ); void SetRowLabelHorizAlignment( wxCommandEvent& ); @@ -88,6 +90,8 @@ public: ID_TOGGLEROWSIZING, ID_TOGGLECOLSIZING, ID_TOGGLEGRIDSIZING, + ID_TOGGLEGRIDLINES, + ID_AUTOSIZECOLS, ID_SETLABELCOLOUR, ID_SETLABELTEXTCOLOUR, ID_ROWLABELALIGN, diff --git a/samples/notebook/makefile.g95 b/samples/notebook/makefile.g95 index b87471f38d..c610092a4c 100644 --- a/samples/notebook/makefile.g95 +++ b/samples/notebook/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=notebook OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index 7ffa097f23..b69850bd96 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -67,7 +67,6 @@ void MyApp::InitTabView(wxNotebook* notebook, wxPanel* window) m_okButton->SetDefault(); wxLayoutConstraints *c; - c = new wxLayoutConstraints; c->right.SameAs(window, wxRight, 4); c->bottom.SameAs(window, wxBottom, 4); @@ -242,9 +241,25 @@ void MyFrame::OnInsertPage(wxCommandEvent& WXUNUSED(event)) m_notebook->SetSelection(0); } +wxWindow *test = NULL; + void MyFrame::OnDeletePage(wxCommandEvent& WXUNUSED(event)) { - m_notebook->DeletePage( m_notebook->GetPageCount()-1 ); + if (m_notebook->GetPageCount() > 0) + m_notebook->DeletePage( m_notebook->GetPageCount()-1 ); + +/* + if (test) + { + m_notebook->AddPage( test, "Readded" ); + test = NULL; + } + else + { + test = m_notebook->GetPage( m_notebook->GetPageCount()-1 ); + m_notebook->RemovePage( m_notebook->GetPageCount()-1 ); + } +*/ } void MyFrame::OnNextPage(wxCommandEvent& WXUNUSED(event)) diff --git a/samples/oleauto/oleauto.cpp b/samples/oleauto/oleauto.cpp index b4021b93ae..d50c7ecd4b 100644 --- a/samples/oleauto/oleauto.cpp +++ b/samples/oleauto/oleauto.cpp @@ -40,6 +40,10 @@ #error "Sorry, this sample works under Windows only." #endif +#ifdef __WATCOMC__ +#error "Sorry, Watcom C++ does not support wxAutomationObject." +#endif + // ---------------------------------------------------------------------------- // ressources // ---------------------------------------------------------------------------- diff --git a/samples/opengl/Makefile.in b/samples/opengl/Makefile.in index afef44caeb..07dd0ddf17 100644 --- a/samples/opengl/Makefile.in +++ b/samples/opengl/Makefile.in @@ -3,13 +3,13 @@ # all: - cd penguin && make - cd cube && make - cd isosurf && make + cd penguin && $(MAKE) + cd cube && $(MAKE) + cd isosurf && $(MAKE) clean: - cd penguin && make clean - cd cube && make clean - cd isosurf && make clean + cd penguin && $(MAKE) clean + cd cube && $(MAKE) clean + cd isosurf && $(MAKE) clean diff --git a/samples/opengl/cube/Makefile.in b/samples/opengl/cube/Makefile.in index 04a390497b..311847e12e 100644 --- a/samples/opengl/cube/Makefile.in +++ b/samples/opengl/cube/Makefile.in @@ -15,7 +15,7 @@ program_dir = samples/opengl/cube PROGRAM=cube -LIBRARIES=-lMesaGL -lMesaGLU ../../../lib/libwx_gtk_gl.so +LIBRARIES=$(OPENGLLIBS) ../../../lib/libwx_gtk_gl.so OBJECTS=$(PROGRAM).o diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp index 38c9d0f48a..997b37131b 100644 --- a/samples/opengl/cube/cube.cpp +++ b/samples/opengl/cube/cube.cpp @@ -427,7 +427,7 @@ void MyFrame::OnNewWindow() MyFrame *frame = new MyFrame(NULL, "Cube OpenGL Demo Clone", wxPoint(50, 50), wxSize(400, 300)); // Give it an icon -#ifdef wx_msw +#ifdef __WXMSW__ frame->SetIcon(wxIcon("mondrian")); #endif diff --git a/samples/opengl/isosurf/Makefile.in b/samples/opengl/isosurf/Makefile.in index 0dc1538282..4c4867009d 100644 --- a/samples/opengl/isosurf/Makefile.in +++ b/samples/opengl/isosurf/Makefile.in @@ -17,7 +17,7 @@ DATAFILES = isosurf.dat.gz PROGRAM=isosurf -LIBRARIES=-lMesaGL -lMesaGLU ../../../lib/libwx_gtk_gl.so +LIBRARIES=$(OPENGLLIBS) ../../../lib/libwx_gtk_gl.so OBJECTS=$(PROGRAM).o diff --git a/samples/opengl/penguin/Makefile.in b/samples/opengl/penguin/Makefile.in index ad3f1f37da..f65cb0ebb2 100644 --- a/samples/opengl/penguin/Makefile.in +++ b/samples/opengl/penguin/Makefile.in @@ -17,7 +17,7 @@ DATAFILES = penguin.lwo PROGRAM=penguin -LIBRARIES=-lMesaGL -lMesaGLU ../../../lib/libwx_gtk_gl.so +LIBRARIES=$(OPENGLLIBS) ../../../lib/libwx_gtk_gl.so OBJECTS=$(PROGRAM).o lw.o trackball.o diff --git a/samples/ownerdrw/OwnerdrwVC.dsp b/samples/ownerdrw/OwnerdrwVC.dsp new file mode 100644 index 0000000000..14ee89f225 --- /dev/null +++ b/samples/ownerdrw/OwnerdrwVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="OwnerdrwVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=OwnerdrwVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "OwnerdrwVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "OwnerdrwVC.mak" CFG="OwnerdrwVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "OwnerdrwVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "OwnerdrwVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "OwnerdrwVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "OwnerdrwVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "OwnerdrwVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/ownerdrw.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "OwnerdrwVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/ownerdrw.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "OwnerdrwVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/ownerdrw.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "OwnerdrwVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/ownerdrw.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "OwnerdrwVC - Win32 Release" +# Name "OwnerdrwVC - Win32 Debug" +# Name "OwnerdrwVC - Win32 Debug DLL" +# Name "OwnerdrwVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\ownerdrw.cpp + +!IF "$(CFG)" == "OwnerdrwVC - Win32 Release" + +!ELSEIF "$(CFG)" == "OwnerdrwVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OwnerdrwVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "OwnerdrwVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\ownerdrw.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/ownerdrw/OwnerdrwVC.dsw b/samples/ownerdrw/OwnerdrwVC.dsw new file mode 100644 index 0000000000..163d2feecd --- /dev/null +++ b/samples/ownerdrw/OwnerdrwVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "OwnerdrwVC"=.\OwnerdrwVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/plot/PlotVC.dsp b/samples/plot/PlotVC.dsp new file mode 100644 index 0000000000..70af8682a0 --- /dev/null +++ b/samples/plot/PlotVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="PlotVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PlotVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PlotVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PlotVC.mak" CFG="PlotVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PlotVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PlotVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PlotVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "PlotVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PlotVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/plot.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PlotVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/plot.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PlotVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/plot.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PlotVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/plot.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "PlotVC - Win32 Release" +# Name "PlotVC - Win32 Debug" +# Name "PlotVC - Win32 Debug DLL" +# Name "PlotVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\plot.cpp + +!IF "$(CFG)" == "PlotVC - Win32 Release" + +!ELSEIF "$(CFG)" == "PlotVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PlotVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PlotVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\plot.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/plot/PlotVC.dsw b/samples/plot/PlotVC.dsw new file mode 100644 index 0000000000..75fce85a48 --- /dev/null +++ b/samples/plot/PlotVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PlotVC"=.\PlotVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/png/PngVC.dsp b/samples/png/PngVC.dsp new file mode 100644 index 0000000000..72fd633d19 --- /dev/null +++ b/samples/png/PngVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="PngVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PngVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PngVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PngVC.mak" CFG="PngVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PngVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PngVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PngVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "PngVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PngVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/pngdemo.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PngVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/pngdemo.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PngVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/pngdemo.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PngVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/pngdemo.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "PngVC - Win32 Release" +# Name "PngVC - Win32 Debug" +# Name "PngVC - Win32 Debug DLL" +# Name "PngVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\pngdemo.cpp + +!IF "$(CFG)" == "PngVC - Win32 Release" + +!ELSEIF "$(CFG)" == "PngVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PngVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PngVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\pngdemo.h +# End Source File +# Begin Source File + +SOURCE=.\pngdemo.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/png/PngVC.dsw b/samples/png/PngVC.dsw new file mode 100644 index 0000000000..209b5f2c47 --- /dev/null +++ b/samples/png/PngVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PngVC"=.\PngVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/printing/PrintingVC.dsp b/samples/printing/PrintingVC.dsp new file mode 100644 index 0000000000..bb35648dc8 --- /dev/null +++ b/samples/printing/PrintingVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="PrintingVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PrintingVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PrintingVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PrintingVC.mak" CFG="PrintingVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PrintingVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PrintingVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PrintingVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "PrintingVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PrintingVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/printing.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/printing.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/printing.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/printing.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "PrintingVC - Win32 Release" +# Name "PrintingVC - Win32 Debug" +# Name "PrintingVC - Win32 Debug DLL" +# Name "PrintingVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\printing.cpp + +!IF "$(CFG)" == "PrintingVC - Win32 Release" + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PrintingVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\printing.h +# End Source File +# Begin Source File + +SOURCE=.\printing.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/printing/PrintingVC.dsw b/samples/printing/PrintingVC.dsw new file mode 100644 index 0000000000..b2096fcce9 --- /dev/null +++ b/samples/printing/PrintingVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PrintingVC"=.\PrintingVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp index bdc779878e..9e1d59da4d 100644 --- a/samples/printing/printing.cpp +++ b/samples/printing/printing.cpp @@ -192,7 +192,12 @@ void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event)) wxPrinter printer(& printDialogData); MyPrintout printout("My printout"); if (!printer.Print(this, &printout, TRUE)) - wxMessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wxOK); + { + if (wxPrinter::GetLastError() == wxPRINTER_ERROR) + wxMessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wxOK); + else + wxMessageBox("You canceled printing", "Printing", wxOK); + } else { (*g_printData) = printer.GetPrintDialogData().GetPrintData(); @@ -484,13 +489,13 @@ void MyPrintout::DrawPageTwo(wxDC *dc) dc->DrawText("Some test text", 200, 200 ); { // GetTextExtent demo: - wxString words[7] = {"This ", "is ", "GetTextExtent ", "testing ", "string. ", "Enjoy ", "it!"}; + wxString words[8] = {"This ", "is ", "a very long string for testing:"," GetTextExtent", " testing", "string. ", "Enjoy ", "it!"}; long w, h; long x = 200, y= 250; - wxFont fnt(15, wxSWISS, wxNORMAL, wxNORMAL); + wxFont fnt(15, wxTELETYPE, wxNORMAL, wxBOLD); dc->SetFont(fnt); - for (int i = 0; i < 7; i++) { + for (int i = 0; i < 8; i++) { dc->GetTextExtent(words[i], &w, &h); dc->DrawRectangle(x, y, w, h); dc->DrawText(words[i], x, y); diff --git a/samples/proplist/ProplistVC.dsp b/samples/proplist/ProplistVC.dsp new file mode 100644 index 0000000000..6b11cce2df --- /dev/null +++ b/samples/proplist/ProplistVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="ProplistVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ProplistVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ProplistVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ProplistVC.mak" CFG="ProplistVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ProplistVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ProplistVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ProplistVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ProplistVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ProplistVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/proplist.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ProplistVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/proplist.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ProplistVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/proplist.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ProplistVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/proplist.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ProplistVC - Win32 Release" +# Name "ProplistVC - Win32 Debug" +# Name "ProplistVC - Win32 Debug DLL" +# Name "ProplistVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\proplist.cpp + +!IF "$(CFG)" == "ProplistVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ProplistVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ProplistVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ProplistVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\proplist.h +# End Source File +# Begin Source File + +SOURCE=.\proplist.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/proplist/ProplistVC.dsw b/samples/proplist/ProplistVC.dsw new file mode 100644 index 0000000000..ccdd90b59b --- /dev/null +++ b/samples/proplist/ProplistVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ProplistVC"=.\ProplistVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/proplist/makefile.g95 b/samples/proplist/makefile.g95 index 5489c858c7..7fa5bd6868 100644 --- a/samples/proplist/makefile.g95 +++ b/samples/proplist/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=proplist OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/proplist/proplist.cpp b/samples/proplist/proplist.cpp index 85bbfc9298..21a4040319 100644 --- a/samples/proplist/proplist.cpp +++ b/samples/proplist/proplist.cpp @@ -10,7 +10,8 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation "proplist.h" +// watch out for conflict with wxWindows code +#pragma implementation "sample_proplist.h" #endif // For compilers that support precompilation, includes "wx/wx.h". diff --git a/samples/proplist/proplist.h b/samples/proplist/proplist.h index 356681fab9..0aca5b55b7 100644 --- a/samples/proplist/proplist.h +++ b/samples/proplist/proplist.h @@ -10,7 +10,8 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma interface "proplist.h" +// watch out for conflict with wxWindows code +#pragma interface "sample_proplist.h" #endif #ifndef _PROPTEST_H_ diff --git a/samples/propsize/PropsizeVC.dsp b/samples/propsize/PropsizeVC.dsp new file mode 100644 index 0000000000..45ba1e45cf --- /dev/null +++ b/samples/propsize/PropsizeVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="PropsizeVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=PropsizeVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "PropsizeVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "PropsizeVC.mak" CFG="PropsizeVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "PropsizeVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "PropsizeVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "PropsizeVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "PropsizeVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "PropsizeVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/propsize.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PropsizeVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/propsize.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PropsizeVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/propsize.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "PropsizeVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/propsize.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "PropsizeVC - Win32 Release" +# Name "PropsizeVC - Win32 Debug" +# Name "PropsizeVC - Win32 Debug DLL" +# Name "PropsizeVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\propsize.cpp + +!IF "$(CFG)" == "PropsizeVC - Win32 Release" + +!ELSEIF "$(CFG)" == "PropsizeVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PropsizeVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "PropsizeVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\propsize.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/propsize/PropsizeVC.dsw b/samples/propsize/PropsizeVC.dsw new file mode 100644 index 0000000000..570c4a4ccd --- /dev/null +++ b/samples/propsize/PropsizeVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "PropsizeVC"=.\PropsizeVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/propsize/makefile.g95 b/samples/propsize/makefile.g95 index 7c38b8a26a..ed32b82b54 100644 --- a/samples/propsize/makefile.g95 +++ b/samples/propsize/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=propsize OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/regtest/RegtestVC.dsp b/samples/regtest/RegtestVC.dsp new file mode 100644 index 0000000000..f1664ebe2e --- /dev/null +++ b/samples/regtest/RegtestVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="RegtestVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RegtestVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RegtestVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RegtestVC.mak" CFG="RegtestVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RegtestVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RegtestVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RegtestVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "RegtestVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RegtestVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/regtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RegtestVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/regtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RegtestVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/regtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RegtestVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/regtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "RegtestVC - Win32 Release" +# Name "RegtestVC - Win32 Debug" +# Name "RegtestVC - Win32 Debug DLL" +# Name "RegtestVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\regtest.cpp + +!IF "$(CFG)" == "RegtestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "RegtestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RegtestVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RegtestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\regtest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/regtest/RegtestVC.dsw b/samples/regtest/RegtestVC.dsw new file mode 100644 index 0000000000..73d4e0955f --- /dev/null +++ b/samples/regtest/RegtestVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RegtestVC"=.\RegtestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index f1960608af..2e8b20c303 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -162,7 +162,7 @@ public: void AddStdKeys(); private: - DECLARE_EVENT_TABLE(); + DECLARE_EVENT_TABLE() }; // ---------------------------------------------------------------------------- @@ -194,7 +194,7 @@ public: void OnInfo (wxCommandEvent& event); - DECLARE_EVENT_TABLE(); + DECLARE_EVENT_TABLE() private: RegTreeCtrl *m_treeCtrl; @@ -913,10 +913,11 @@ bool RegTreeCtrl::TreeNode::OnExpand() if ( isEmpty ) { // this is for the case when our last child was just deleted - m_pTree->Collapse(Id()); + wxTreeItemId theId(Id()); // Temp variable seems necessary for BC++ + m_pTree->Collapse(theId); // we won't be expanded any more - m_pTree->SetItemHasChildren(Id(), FALSE); + m_pTree->SetItemHasChildren(theId, FALSE); } return TRUE; @@ -935,14 +936,15 @@ void RegTreeCtrl::TreeNode::Refresh() if ( !IsKey() ) return; - bool wasExpanded = m_pTree->IsExpanded(Id()); + wxTreeItemId theId(Id()); // Temp variable seems necessary for BC++ + bool wasExpanded = m_pTree->IsExpanded(theId); if ( wasExpanded ) - m_pTree->Collapse(Id()); + m_pTree->Collapse(theId); OnCollapse(); - m_pTree->SetItemHasChildren(Id()); + m_pTree->SetItemHasChildren(theId); if ( wasExpanded ) { - m_pTree->Expand(Id()); + m_pTree->Expand(theId); OnExpand(); } } @@ -967,7 +969,8 @@ bool RegTreeCtrl::TreeNode::DeleteChild(TreeNode *child) } if ( ok ) { - m_pTree->Delete(child->Id()); + wxTreeItemId theId(child->Id()); // Temp variable seems necessary for BC++ + m_pTree->Delete(theId); Refresh(); } @@ -983,7 +986,8 @@ void RegTreeCtrl::TreeNode::DestroyChildren() long lId = m_aChildren[n]->Id(); // no, wxTreeCtrl will do it //delete m_aChildren[n]; - m_pTree->Delete(lId); + wxTreeItemId theId(lId); // Temp variable seems necessary for BC++ + m_pTree->Delete(theId); } m_aChildren.Empty(); diff --git a/samples/resource/ResourceVC.dsp b/samples/resource/ResourceVC.dsp new file mode 100644 index 0000000000..16b455c6c8 --- /dev/null +++ b/samples/resource/ResourceVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="ResourceVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ResourceVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ResourceVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ResourceVC.mak" CFG="ResourceVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ResourceVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ResourceVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ResourceVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ResourceVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ResourceVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/resource.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ResourceVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/resource.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ResourceVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/resource.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ResourceVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/resource.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ResourceVC - Win32 Release" +# Name "ResourceVC - Win32 Debug" +# Name "ResourceVC - Win32 Debug DLL" +# Name "ResourceVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\resource.cpp + +!IF "$(CFG)" == "ResourceVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ResourceVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ResourceVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ResourceVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# Begin Source File + +SOURCE=.\resource.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/resource/ResourceVC.dsw b/samples/resource/ResourceVC.dsw new file mode 100644 index 0000000000..1c7875936c --- /dev/null +++ b/samples/resource/ResourceVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ResourceVC"=.\ResourceVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/resource/dialog1.wxr b/samples/resource/dialog1.wxr index 6823b00437..4a48e75a46 100644 --- a/samples/resource/dialog1.wxr +++ b/samples/resource/dialog1.wxr @@ -2,25 +2,25 @@ static char *dialog1 = "dialog(name = 'dialog1',\ style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ title = 'Test dialog box',\ id = 100,\ - x = 10, y = 10, width = 197, height = 146,\ + x = 10, y = 10, width = 210, height = 145,\ background_colour = 'D6D6D6',\ use_dialog_units = 1,\ use_system_defaults = 1,\ font = [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\ - control = [101, wxStaticBox, 'wxStaticBox', '0', 'group6', 5, 7, 184, 103,\ + control = [101, wxStaticBox, 'wxStaticBox', '0', 'group6', 5, 7, 200, 103,\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [102, wxRadioBox, 'Radiobox', 'wxRA_SPECIFY_COLS', 'radiobox2', 13, 24, 40, 72, ['One', 'Two', 'Three', 'Four', 'One more'], 1,\ + control = [102, wxRadioBox, 'Radiobox', 'wxRA_SPECIFY_COLS', 'radiobox2', 13, 24, 60, 72, ['One', 'Two', 'Three', 'Four', 'One more'], 1,\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [104, wxTextCtrl, '', 'wxTE_MULTILINE', 'multitext3', 62, 24, 67, 33, 'wxWindows rules!',\ + control = [104, wxTextCtrl, '', 'wxTE_MULTILINE', 'multitext3', 80, 24, 67, 33, 'wxWindows rules!',\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [105, wxListBox, '', '0', 'listbox4', 62, 66, 67, 33, ['Apples', 'Bananas', 'Pears', 'Kiwis'],\ + control = [105, wxListBox, '', '0', 'listbox4', 80, 66, 67, 33, ['Apples', 'Bananas', 'Pears', 'Kiwis'],\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [106, wxCheckBox, 'Checkbox', '0', 'checkbox9', 141, 26, 36, 14, 0,\ + control = [106, wxCheckBox, 'Checkbox', '0', 'checkbox9', 150, 26, 50, 14, 0,\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [107, wxStaticText, 'My Message', '0', 'message10', 143, 57, 39, 12, '',\ + control = [107, wxStaticText, 'My Message', '0', 'message10', 150, 57, 50, 12, '',\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [108, wxButton, 'Press me', '0', 'button7', 141, 81, 36, 13, '',\ + control = [108, wxButton, 'Press me', '0', 'button7', 150, 81, 50, 13, '',\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ - control = [109, wxButton, 'Cancel', '0', 'button8', 62, 119, 55, 17, '',\ + control = [109, wxButton, 'Cancel', '0', 'button8', 80, 119, 55, 17, '',\ [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]])."; diff --git a/samples/resource/resource.cpp b/samples/resource/resource.cpp index 588b3873ff..ab0405be9b 100644 --- a/samples/resource/resource.cpp +++ b/samples/resource/resource.cpp @@ -113,8 +113,10 @@ bool MyApp::OnInit(void) MyApp::~MyApp() { +#if defined(__WXMSW__) delete dialog1; delete menu1; +#endif } BEGIN_EVENT_TABLE(MyPanel, wxPanel) diff --git a/samples/richedit/README b/samples/richedit/README index 5539268bc7..48f7aeff7c 100644 --- a/samples/richedit/README +++ b/samples/richedit/README @@ -10,6 +10,14 @@ by Karsten Ballueder . This is still work in progress, so if you want to make any significant changes, please get in touch with me before. + +*** THIS SOURCE IS USUALLY OUTDATED AND FOR DEMONSTRATION ONLY *** +*** GET THE VERY LATEST VERSION OF THE WXLAYOUT CLASSES FROM *** +*** THE SOURCE OF THE MAHOGANY MAIL/NEWS CLIENT, AVAILABLE FROM *** +*** http://www.wxwindows.org/Mahogany/ *** + + + There are three building blocks for rich text editing: wxllist : diff --git a/samples/richedit/RichEditVC.dsp b/samples/richedit/RichEditVC.dsp new file mode 100644 index 0000000000..0f4eee7092 --- /dev/null +++ b/samples/richedit/RichEditVC.dsp @@ -0,0 +1,255 @@ +# Microsoft Developer Studio Project File - Name="RichEditVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RichEditVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RichEditVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RichEditVC.mak" CFG="RichEditVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RichEditVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RichEditVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RichEditVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "RichEditVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RichEditVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wxLayout.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/wxLayout.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxLayout.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxLayout.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "RichEditVC - Win32 Release" +# Name "RichEditVC - Win32 Debug" +# Name "RichEditVC - Win32 Debug DLL" +# Name "RichEditVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\kbList.cpp + +!IF "$(CFG)" == "RichEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wxLayout.cpp + +!IF "$(CFG)" == "RichEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wxLayout.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\wxllist.cpp + +!IF "$(CFG)" == "RichEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wxlparser.cpp + +!IF "$(CFG)" == "RichEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wxlwindow.cpp + +!IF "$(CFG)" == "RichEditVC - Win32 Release" + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RichEditVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/samples/richedit/RichEditVC.dsw b/samples/richedit/RichEditVC.dsw new file mode 100644 index 0000000000..3105ab68ca --- /dev/null +++ b/samples/richedit/RichEditVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RichEditVC"=.\RichEditVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/richedit/wxllist.cpp b/samples/richedit/wxllist.cpp index 3a8e75082e..3a6cdd1b64 100644 --- a/samples/richedit/wxllist.cpp +++ b/samples/richedit/wxllist.cpp @@ -1,7 +1,7 @@ /*-*- c++ -*-******************************************************** * wxllist: wxLayoutList, a layout engine for text and graphics * * * - * (C) 1998-1999 by Karsten Ballüder (Ballueder@usa.net) * + * (C) 1998-2000 by Karsten Ballüder (Ballueder@gmx.net) * * * * $Id$ *******************************************************************/ @@ -60,6 +60,7 @@ #include + /// This should never really get created #define WXLLIST_TEMPFILE "__wxllist.tmp" @@ -72,16 +73,19 @@ { "invalid", "text", "cmd", "icon" }; - void - wxLayoutObject::Debug(void) + wxString + wxLayoutObject::DebugDump(void) const { - WXLO_DEBUG(("%s",g_aTypeStrings[GetType()])); + wxString str; + str.Printf("%s",g_aTypeStrings[GetType()]); + return str; } #else -# define TypeString(t) "" -# define WXLO_DEBUG(x) +# define TypeString(t) "" +# define WXLO_DEBUG(x) #endif + // FIXME under MSW, this constant is needed to make the thing properly redraw // itself - I don't know where the size calculation error is and I can't // waste time looking for it right now. Search for occurences of @@ -165,6 +169,7 @@ bool Contains(const wxRect &r, const wxPoint &p) //@} +static void ReadString(wxString &to, wxString &from) { to = ""; @@ -187,7 +192,7 @@ wxLayoutObject::Read(wxString &istr) { wxString tmp; ReadString(tmp, istr); - int type = -1; + int type = WXLO_TYPE_INVALID; sscanf(tmp.c_str(),"%d", &type); switch(type) @@ -370,11 +375,14 @@ wxLayoutObjectText::Layout(wxDC &dc, class wxLayoutList *llist) #ifdef WXLAYOUT_DEBUG -void -wxLayoutObjectText::Debug(void) +wxString +wxLayoutObjectText::DebugDump(void) const { - wxLayoutObject::Debug(); - WXLO_DEBUG((" `%s`", m_Text.c_str())); + wxString str; + str = wxLayoutObject::DebugDump(); + wxString str2; + str2.Printf(" `%s`", m_Text.c_str()); + return str+str2; } #endif @@ -412,7 +420,7 @@ wxLayoutObjectIcon::Write(wxString &ostr) wxString file = wxGetTempFileName("wxloexport"); - ostr << WXLO_TYPE_ICON << '\n' + ostr << (int) WXLO_TYPE_ICON << '\n' << file << '\n'; m_Icon->SaveFile(file, WXLO_BITMAP_FORMAT); } @@ -449,11 +457,7 @@ wxLayoutObjectIcon::wxLayoutObjectIcon(wxBitmap *icon) { m_Icon = icon; if(! m_Icon) -#if wxICON_IS_BITMAP - m_Icon = new wxIcon; -#else m_Icon = new wxBitmap; -#endif } void @@ -557,25 +561,25 @@ wxLayoutObjectCmd::Copy(void) void wxLayoutObjectCmd::Write(wxString &ostr) { - ostr << WXLO_TYPE_CMD << '\n' - << m_StyleInfo->family << '\n' - << m_StyleInfo->size << '\n' - << m_StyleInfo->style << '\n' - << m_StyleInfo->weight << '\n' - << m_StyleInfo->underline << '\n' - << m_StyleInfo->m_fg_valid << '\n' - << m_StyleInfo->m_bg_valid << '\n'; + ostr << (int) WXLO_TYPE_CMD << '\n' + << (int) m_StyleInfo->family << '\n' + << (int) m_StyleInfo->size << '\n' + << (int) m_StyleInfo->style << '\n' + << (int) m_StyleInfo->weight << '\n' + << (int) m_StyleInfo->underline << '\n' + << (int) m_StyleInfo->m_fg_valid << '\n' + << (int) m_StyleInfo->m_bg_valid << '\n'; if(m_StyleInfo->m_fg_valid) { - ostr << m_StyleInfo->m_fg.Red() << '\n' - << m_StyleInfo->m_fg.Green() << '\n' - << m_StyleInfo->m_fg.Blue() << '\n'; + ostr << (int) m_StyleInfo->m_fg.Red() << '\n' + << (int) m_StyleInfo->m_fg.Green() << '\n' + << (int) m_StyleInfo->m_fg.Blue() << '\n'; } if(m_StyleInfo->m_bg_valid) { - ostr << m_StyleInfo->m_bg.Red() << '\n' - << m_StyleInfo->m_bg.Green() << '\n' - << m_StyleInfo->m_bg.Blue() << '\n'; + ostr << (int) m_StyleInfo->m_bg.Red() << '\n' + << (int) m_StyleInfo->m_bg.Green() << '\n' + << (int) m_StyleInfo->m_bg.Blue() << '\n'; } } /* static */ @@ -665,10 +669,9 @@ wxLayoutLine::wxLayoutLine(wxLayoutLine *prev, wxLayoutList *llist) m_Length = 0; m_updateLeft = -1; - MarkDirty(0); - m_Previous = prev; m_Next = NULL; + MarkDirty(0); m_LineNumber = 0; RecalculatePosition(llist); @@ -1273,7 +1276,9 @@ wxLayoutLine::Break(CoordType xpos, wxLayoutList *llist) wxLayoutLine *newLine = new wxLayoutLine(this, llist); // split object at i: - if((**i).GetType() == WXLO_TYPE_TEXT && offset != 0) + if((**i).GetType() == WXLO_TYPE_TEXT + && offset != 0 + && offset != (**i).GetLength() ) { wxString left, right; wxLayoutObjectText *tobj = (wxLayoutObjectText *) *i; @@ -1304,6 +1309,130 @@ wxLayoutLine::Break(CoordType xpos, wxLayoutList *llist) return newLine; } +bool +wxLayoutLine::Wrap(CoordType wrapmargin, wxLayoutList *llist) +{ + if(GetLength() < wrapmargin) + return FALSE; // nothing to do + + // find the object which covers the wrapmargin: + CoordType offset; + wxLOiterator i = FindObject(wrapmargin, &offset); + wxCHECK_MSG( i != NULLIT, FALSE, "Cannot find object covering wrapmargin."); + + // from this object on, the rest of the line must be copied to the + // next one: + wxLOiterator copyObject = NULLIT; + // if we split a text-object, we must pre-pend some text to the + // next line later on, remember it here: + wxString prependText = ""; + // we might need to adjust the cursor position later, so remember it + size_t xpos = llist->GetCursorPos().x; + // by how much did we shorten the current line: + size_t shorter = 0; + // remember cursor location of object + size_t objectCursorPos = 0; + + size_t breakpos = offset; + + if( (**i).GetType() != WXLO_TYPE_TEXT ) + { + // break before a non-text object + copyObject = i; + } + else + { + bool foundSpace = FALSE; + do + { +// while(i != NULLIT && (**i).GetType() != WXLO_TYPE_TEXT) +// i--; + // try to find a suitable place to split the object: + wxLayoutObjectText *tobj = (wxLayoutObjectText *)*i; + if((**i).GetType() == WXLO_TYPE_TEXT + && tobj->GetText().Length() >= breakpos) + { + do + { + foundSpace = isspace(tobj->GetText()[breakpos]) != 0; + if ( foundSpace ) + break; + } + while ( breakpos-- > 0 ); + } + else + { + breakpos = 0; + } + + if(! foundSpace) // breakpos == 0! + { + if(i == m_ObjectList.begin()) + return FALSE; // could not break line + else + { + i--; + while(i != m_ObjectList.begin() + && (**i).GetType() != WXLO_TYPE_TEXT ) + { + i--; + } + breakpos = (**i).GetLength(); + } + } + }while(! foundSpace); + // before we actually break the object, we need to know at which + // cursorposition it starts, so we can restore the cursor if needed: + if( this == llist->GetCursorLine() && xpos >= breakpos ) + { + for(wxLOiterator j = m_ObjectList.begin(); + j != NULLIT && j != i; j++) + objectCursorPos += (**j).GetLength(); + } + // now we know where to break it: + wxLayoutObjectText *tobj = (wxLayoutObjectText *)*i; + shorter = tobj->GetLength() - breakpos; + // remember text to copy from this object + prependText = tobj->GetText().Mid(breakpos+1); + tobj->SetText(tobj->GetText().Left(breakpos)); + // copy every following object: + copyObject = i; copyObject ++; + } + + // make sure there is an empty m_Next line: + (void) new wxLayoutLine(this, llist); + wxASSERT(m_Next); + // We need to move this and all following objects to the next + // line. Starting from the end of line, to keep the order right. + if(copyObject != NULLIT) + { + wxLOiterator j; + for(j = m_ObjectList.tail(); j != copyObject; j--) + m_Next->Prepend(*j); + m_Next->Prepend(*copyObject); + // and now remove them from this list: + while( copyObject != m_ObjectList.end() ) + { + shorter += (**copyObject).GetLength(); + m_ObjectList.remove(copyObject); // remove without deleting it + } + } + m_Length -= shorter; + + if(prependText.Length() > 0) + m_Next->Insert(0, prependText); + + // do we need to adjust the cursor position? + if( this == llist->GetCursorLine() && xpos >= breakpos) + { + xpos = objectCursorPos + (xpos - objectCursorPos - breakpos - + ((xpos > breakpos) ? 1 : 0 )); + wxASSERT(xpos >= 0); + llist->MoveCursorTo( wxPoint( xpos, m_Next->GetLineNumber()) ); + } + return TRUE; // we wrapped the line +} + void wxLayoutLine::ReNumber(void) { @@ -1389,7 +1518,7 @@ wxLayoutLine::GetWrapPosition(CoordType column) { do { - if( isspace(((wxLayoutObjectText*)*i)->GetText().c_str()[(size_t)offset])) + if(isspace(((wxLayoutObjectText*)*i)->GetText().c_str()[(size_t)offset])) return column; else { @@ -1418,25 +1547,23 @@ wxLayoutLine::GetWrapPosition(CoordType column) i++; } if(i == NULLIT) return -1; //why should this happen? + + // now we are behind the one long text object and need to find the + // first space in it + for(offset = 0; offset < (**i).GetLength(); offset++) + if( isspace(((wxLayoutObjectText*)*i)->GetText().c_str()[(size_t)offset])) + { + return pos+offset; + } pos += (**i).GetLength(); - i++; - while(i != NULLIT && (**i).GetType() != WXLO_TYPE_TEXT) - { - pos += (**i).GetLength(); - i++; - } - if(i == NULLIT) return -1; //this is possible, if there is only one text object - // now we are at the second text object: - pos -= (**i).GetLength(); - return pos; // in front of it + return pos; } #ifdef WXLAYOUT_DEBUG void -wxLayoutLine::Debug(void) +wxLayoutLine::Debug(void) const { - wxString tmp; wxPoint pos = GetPosition(); WXLO_DEBUG(("Line %ld, Pos (%ld,%ld), Height %ld, BL %ld, Font: %d", (long int) GetLineNumber(), @@ -1445,7 +1572,9 @@ wxLayoutLine::Debug(void) (long int) m_BaseLine, (int) m_StyleInfo.family)); if(m_ObjectList.begin() != NULLIT) - (**m_ObjectList.begin()).Debug(); + { + WXLO_DEBUG(((**m_ObjectList.begin()).DebugDump().c_str())); + } } #endif @@ -1592,9 +1721,22 @@ wxLayoutList::Read(wxString &istr) while(istr.Length()) { - wxLayoutObject *obj = wxLayoutObject::Read(istr); - if(obj) - Insert(obj); + // check for a linebreak: + wxString tmp; + tmp = istr.BeforeFirst('\n'); + int type = WXLO_TYPE_INVALID; + sscanf(tmp.c_str(),"%d", &type); + if(type == WXLO_TYPE_LINEBREAK) + { + LineBreak(); + istr = istr.AfterFirst('\n'); + } + else + { + wxLayoutObject *obj = wxLayoutObject::Read(istr); + if(obj) + Insert(obj); + } } /* Now we use the current_si to restore our last font settings: */ Insert(new wxLayoutObjectCmd(current_si)); @@ -1746,6 +1888,7 @@ wxLayoutList::MoveCursorVertically(int n) { n--; m_CursorPos.y ++; + last = m_CursorLine; m_CursorLine = m_CursorLine->GetNextLine(); } if(! m_CursorLine) @@ -1983,9 +2126,10 @@ wxLayoutList::Insert(wxString const &text) AddCursorPosToUpdateRect(); + wxASSERT(m_CursorLine->GetLength() >= m_CursorPos.x); + if ( !m_CursorLine->Insert(m_CursorPos.x, text) ) return false; - m_CursorPos.x += text.Length(); m_movedCursor = true; @@ -2076,29 +2220,22 @@ wxLayoutList::LineBreak(void) bool wxLayoutList::WrapLine(CoordType column) { - if(m_CursorPos.x <= column || column < 1) - return false; // do nothing yet - else + return m_CursorLine->Wrap(column, this); +} + +bool +wxLayoutList::WrapAll(CoordType column) +{ + wxLayoutLine *line = m_FirstLine; + if(! line) + return FALSE; + bool rc = TRUE; + while(line && rc) { - CoordType xpos = m_CursorLine->GetWrapPosition(column); - if(xpos == -1) - return false; // cannot break line - //else: - CoordType newpos = m_CursorPos.x - xpos - 1; - m_CursorPos.x = xpos; - - AddCursorPosToUpdateRect(); - - LineBreak(); - Delete(1); // delete the space - m_CursorPos.x = newpos; - - m_CursorLine->MarkDirty(); - - m_movedCursor = true; - - return true; + rc &= line->Wrap(column, this); + line = line->GetNextLine(); } + return rc; } bool @@ -2262,6 +2399,9 @@ wxLayoutList::Layout(wxDC &dc, CoordType bottom, bool forceAll, // If one line was dirty, we need to re-calculate all // following lines, too. bool wasDirty = forceAll; + // we need to layout until we reach at least the cursor line, + // otherwise we won't be able to scroll to it + bool cursorReached = false; wxLayoutLine *line = m_FirstLine; while(line) { @@ -2271,6 +2411,8 @@ wxLayoutList::Layout(wxDC &dc, CoordType bottom, bool forceAll, // if any previous line was dirty, we need to layout all // following lines: wasDirty + // go on until we find the cursorline + || ! cursorReached // layout dirty lines: || line->IsDirty() // always layout the cursor line toupdate the cursor @@ -2278,6 +2420,9 @@ wxLayoutList::Layout(wxDC &dc, CoordType bottom, bool forceAll, || line == m_CursorLine // or if it's the line we are asked to look for: || (cpos && line->GetLineNumber() == cpos->y) + // layout at least the desired region: + || (bottom == -1 ) + || (line->GetPosition().y <= bottom) ) { if(line->IsDirty()) @@ -2299,17 +2444,20 @@ wxLayoutList::Layout(wxDC &dc, CoordType bottom, bool forceAll, if ( csize ) *csize = m_CursorSize; } + cursorReached = TRUE; } else + { if(cpos && line->GetLineNumber() == cpos->y) + { line->Layout(dc, this, cpos, csize, NULL, cpos->x); - else - line->Layout(dc, this); - // little condition to speed up redrawing: - if(bottom != -1 && line->GetPosition().y > bottom) - break; + cursorReached = TRUE; + } + else + line->Layout(dc, this); + } } line = line->GetNextLine(); } @@ -2385,7 +2533,7 @@ wxLayoutList::Draw(wxDC &dc, } InvalidateUpdateRect(); - WXLO_DEBUG(("Selection is %s : l%d,%ld/%ld,%ld", + WXLO_DEBUG(("Selection is %s : %ld,%ld/%ld,%ld", m_Selection.m_valid ? "valid" : "invalid", m_Selection.m_CursorA.x, m_Selection.m_CursorA.y, m_Selection.m_CursorB.x, m_Selection.m_CursorB.y)); @@ -2500,7 +2648,7 @@ wxLayoutList::DrawCursor(wxDC &dc, bool active, wxPoint const &translate) #ifdef WXLAYOUT_DEBUG WXLO_DEBUG(("Drawing cursor (%ld,%ld) at %ld,%ld, size %ld,%ld, line: %ld, len %ld", (long)m_CursorPos.x, (long)m_CursorPos.y, - (long)coords.x, (long)coords.y, + (long)coords.x, (long)coords.y, (long)m_CursorSize.x, (long)m_CursorSize.y, (long)m_CursorLine->GetLineNumber(), (long)m_CursorLine->GetLength())); @@ -2522,7 +2670,8 @@ wxLayoutList::DrawCursor(wxDC &dc, bool active, wxPoint const &translate) dc.DrawRectangle(coords.x, coords.y, m_CursorSize.x, m_CursorSize.y); SetUpdateRect(coords.x, coords.y); - SetUpdateRect(coords.x+m_CursorSize.x, coords.y+m_CursorSize.y); + SetUpdateRect(coords.x+m_CursorSize.x, + coords.y+m_CursorSize.y); } else { @@ -2883,7 +3032,7 @@ wxLayoutList::GetSelection(wxLayoutDataObject *wxlo, bool invalidate) while((exp = wxLayoutExport( &status, WXLO_EXPORT_AS_OBJECTS)) != NULL) { if(exp->type == WXLO_EXPORT_EMPTYLINE) - ; //FIXME missing support for linebreaks in string format + string << (int) WXLO_TYPE_LINEBREAK << '\n'; else exp->content.object->Write(string); delete exp; diff --git a/samples/richedit/wxllist.h b/samples/richedit/wxllist.h index 71e7d381ae..0669c25804 100644 --- a/samples/richedit/wxllist.h +++ b/samples/richedit/wxllist.h @@ -1,7 +1,7 @@ /*-*- c++ -*-******************************************************** * wxLayoutList.h - a formatted text rendering engine for wxWindows * * * - * (C) 1999 by Karsten Ballüder (ballueder@gmx.net) * + * (C) 1999-2000 by Karsten Ballüder (ballueder@gmx.net) * * * * $Id$ *******************************************************************/ @@ -38,17 +38,38 @@ # define WXLAYOUT_USE_CARET 1 #endif // __WXMSW__ -// do not enable debug mode within Mahogany -#if defined(__WXDEBUG__) && ! defined(M_BASEDIR) +// do not enable debug mode within Mahogany unless in debug mode +#if defined(__WXDEBUG__) && (( ! defined(M_BASEDIR) )|| defined(DEBUG)) # define WXLAYOUT_DEBUG #endif #ifdef WXLAYOUT_DEBUG # define WXLO_TRACE(x) wxLogDebug(x) +// activate profiling: # define WXLO_PROFILE #else # define WXLO_TRACE(x) #endif +/* Some profiling code: */ +#if defined (WXLO_PROFILE) +#include +#include + +# define WXLO_TIMER_DEFINE(x) static struct timeval x +# define WXLO_TIMER_START(x) gettimeofday(&x,NULL) +# define WXLO_TIMER_STOP(x) { struct timeval y; \ + gettimeofday(&y,NULL); \ + x.tv_sec -= y.tv_sec; x.tv_usec -= y.tv_usec; } +# define WXLO_TIMER_PRINT(x) wxLogDebug("Timer " #x " elapsed: %ld", \ + (long)(x.tv_sec * -1000 - x.tv_usec)); +#else +# define WXLO_TIMER_DEFINE(x) +# define WXLO_TIMER_START(x) +# define WXLO_TIMER_STOP(x) +# define WXLO_TIMER_PRINT(x) +#endif + + #define WXLO_DEBUG_URECT 0 #ifndef WXLO_DEFAULTFONTSIZE @@ -71,7 +92,9 @@ enum wxLayoutObjectType /// command object, containing font or colour changes WXLO_TYPE_CMD, /// icon object, any kind of image - WXLO_TYPE_ICON + WXLO_TYPE_ICON, + /// a linebreak, does not exist as an object + WXLO_TYPE_LINEBREAK }; /// Type used for coordinates in drawing. Must be signed. @@ -171,7 +194,7 @@ public: virtual ~wxLayoutObject() { if(m_UserData) m_UserData->DecRef(); } #ifdef WXLAYOUT_DEBUG - virtual void Debug(void); + virtual wxString DebugDump(void) const; #endif /** Tells the object about some user data. This data is associated @@ -266,7 +289,7 @@ public: static wxLayoutObjectText *Read(wxString &istr); #ifdef WXLAYOUT_DEBUG - virtual void Debug(void); + virtual wxString DebugDump(void) const; #endif virtual CoordType GetLength(void) const { return strlen(m_Text.c_str()); } @@ -475,11 +498,18 @@ public: void Append(wxLayoutObject * obj) { wxASSERT(obj); - m_ObjectList.push_back(obj); m_Length += obj->GetLength(); } + /** This function prepends an object to the line. */ + void Prepend(wxLayoutObject * obj) + { + wxASSERT(obj); + m_ObjectList.push_front(obj); + m_Length += obj->GetLength(); + } + /** This function appens the next line to this, i.e. joins the two lines into one. */ @@ -498,6 +528,13 @@ public: */ wxLayoutLine *Break(CoordType xpos, wxLayoutList *llist); + /** This function wraps the line: breaks it at a suitable point + and merges it with the next. + @param wrapmargin + @return TRUE if broken + */ + bool Wrap(CoordType wrapmargin, wxLayoutList *llist); + /** Deletes the next word from this position, including leading whitespace. This function does not delete over font changes, i.e. a word @@ -662,7 +699,7 @@ public: CoordType to = -1); #ifdef WXLAYOUT_DEBUG - void Debug(void); + void Debug(void) const; #endif wxLayoutStyleInfo const & GetStyleInfo() const { return m_StyleInfo; } @@ -680,6 +717,7 @@ public: } m_Dirty = true; + if(m_Next) m_Next->MarkDirty(); } /// Reset the dirty flag void MarkClean() { m_Dirty = false; m_updateLeft = -1; } @@ -815,7 +853,8 @@ public: /// Returns current cursor position. const wxPoint &GetCursorPos(wxDC &dc) const { return m_CursorPos; } const wxPoint &GetCursorPos() const { return m_CursorPos; } - + wxLayoutLine * GetCursorLine(void) { return m_CursorLine; } + /// move cursor to the end of text void MoveCursorToEnd(void) { @@ -845,6 +884,12 @@ public: @return true if line got broken */ bool WrapLine(CoordType column); + + /** Wraps the complete buffer. + @param column the break position for the line, maximum length + @return true if line got broken + */ + bool WrapAll(CoordType column); /** This function deletes npos cursor positions. @param npos how many positions @return true if everything got deleted @@ -1142,7 +1187,8 @@ public: /// get the line by number wxLayoutLine *GetLine(CoordType index) const; - /** Reads objects from a string and inserts them. + /** Reads objects from a string and inserts them. Returns NULL if + string is empty or a linebreak was found. @param istr stream to read from, will bee changed */ void Read(wxString &istr); diff --git a/samples/richedit/wxlwindow.cpp b/samples/richedit/wxlwindow.cpp index 0993e2ca99..125790f178 100644 --- a/samples/richedit/wxlwindow.cpp +++ b/samples/richedit/wxlwindow.cpp @@ -1,7 +1,7 @@ /*-*- c++ -*-******************************************************** * wxLwindow.h : a scrolled Window for displaying/entering rich text* * * - * (C) 1998, 1999 by Karsten Ballüder (karsten@phy.hw.ac.uk) * + * (C) 1998-2000 by Karsten Ballüder (ballueder@gmx.net) * * * * $Id$ *******************************************************************/ @@ -56,6 +56,7 @@ #include + // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- @@ -66,6 +67,13 @@ # define WXLO_DEBUG(x) #endif +// for profiling in debug mode: +WXLO_TIMER_DEFINE(UpdateTimer); +WXLO_TIMER_DEFINE(BlitTimer); +WXLO_TIMER_DEFINE(LayoutTimer); +WXLO_TIMER_DEFINE(TmpTimer); +WXLO_TIMER_DEFINE(DrawTimer); + // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -160,6 +168,7 @@ wxLayoutWindow::wxLayoutWindow(wxWindow *parent) #ifndef __WXMSW__ m_FocusFollowMode = false; #endif + SetWordWrap(false); SetWrapMargin(0); // no scrollbars initially @@ -230,10 +239,11 @@ wxLayoutWindow::OnMouse(int eventId, wxMouseEvent& event) { wxClientDC dc( this ); PrepareDC( dc ); - if ( eventId != WXLOWIN_MENU_MOUSEMOVE + if ( (eventId != WXLOWIN_MENU_MOUSEMOVE #ifndef __WXMSW__ || m_FocusFollowMode #endif + ) && (wxWindow::FindFocus() != this) ) SetFocus(); @@ -479,6 +489,7 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) bool deletedSelection = false; // pressing any non-arrow key optionally replaces the selection: if(m_AutoDeleteSelection + && IsEditable() && !m_Selecting && m_llist->HasSelection() && ! IsDirectionKey(keyCode) @@ -635,10 +646,21 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) case 'x': Cut(); break; + case 'w': + if(m_WrapMargin > 0) + m_llist->WrapLine(m_WrapMargin); + break; + case 'q': + if(m_WrapMargin > 0) + m_llist->WrapAll(m_WrapMargin); + break; #ifdef WXLAYOUT_DEBUG case WXK_F1: m_llist->SetFont(-1,-1,-1,-1,true); // underlined break; + case 'l': + Refresh(TRUE); + break; #endif default: // we don't handle it, maybe an accelerator? @@ -688,7 +710,9 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) } break; case WXK_RETURN: - if(m_WrapMargin > 0) + if(m_DoWordWrap && + m_WrapMargin > 0 + && m_llist->GetCursorPos().x > m_WrapMargin) m_llist->WrapLine(m_WrapMargin); m_llist->LineBreak(); SetDirty(); @@ -706,23 +730,19 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) SetDirty(); } break; - + default: if((!(event.ControlDown() || event.AltDown() )) && (keyCode < 256 && keyCode >= 32) ) { - if(m_WrapMargin > 0 && isspace(keyCode)) - { - bool wrapped = m_llist->WrapLine(m_WrapMargin); - // don´t insert space as first thing in line - // after wrapping: - if(! wrapped || m_llist->GetCursorPos().x != 0) - m_llist->Insert((char)keyCode); - } - else - m_llist->Insert((char)keyCode); + if(m_DoWordWrap + && m_WrapMargin > 0 + && m_llist->GetCursorPos().x > m_WrapMargin + && isspace(keyCode)) + m_llist->WrapLine(m_WrapMargin); + m_llist->Insert((char)keyCode); SetDirty(); } else @@ -765,7 +785,10 @@ wxLayoutWindow::ScrollToCursor(void) { //is always needed to make sure we know where the cursor is //if(IsDirty()) - RequestUpdate(m_llist->GetUpdateRect()); + //RequestUpdate(m_llist->GetUpdateRect()); + + + ResizeScrollbars(); int x0,y0,x1,y1, dx, dy; @@ -802,7 +825,7 @@ wxLayoutWindow::ScrollToCursor(void) ny = 0; } - if ( nx != -1 || ny != -1 ) + if( nx != -1 || ny != -1 ) { // set new view start Scroll(nx == -1 ? -1 : (nx+dx-1)/dx, ny == -1 ? -1 : (ny+dy-1)/dy); @@ -836,6 +859,7 @@ wxLayoutWindow::RequestUpdate(const wxRect *updateRect) void wxLayoutWindow::InternalPaint(const wxRect *updateRect) { + wxPaintDC dc( this ); PrepareDC( dc ); @@ -864,9 +888,9 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect) updateRect->y+updateRect->height)); } - ResizeScrollbars(); + ResizeScrollbars(true); - + WXLO_TIMER_START(TmpTimer); /* Check whether the window has grown, if so, we need to reallocate the bitmap to be larger. */ if(x1 > m_bitmapSize.x || y1 > m_bitmapSize.y) @@ -887,7 +911,8 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect) 0,wxTRANSPARENT)); m_memDC->SetLogicalFunction(wxCOPY); m_memDC->Clear(); - + WXLO_TIMER_STOP(TmpTimer); + // fill the background with the background bitmap if(m_BGbitmap) { @@ -922,7 +947,7 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect) // update rectangle (although they are drawn on the memDC, this is // needed to erase it): m_llist->InvalidateUpdateRect(); - if(m_CursorVisibility != 0) + if(m_CursorVisibility == 1) { // draw a thick cursor for editable windows with focus m_llist->DrawCursor(*m_memDC, @@ -930,6 +955,7 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect) offset); } + WXLO_TIMER_START(BlitTimer); // Now copy everything to the screen: #if 0 // This somehow doesn't work, but even the following bit with the @@ -955,6 +981,8 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect) // y1 += WXLO_YOFFSET; //FIXME might not be needed dc.Blit(x0,y0,x1,y1,m_memDC,0,0,wxCOPY,FALSE); } + WXLO_TIMER_STOP(BlitTimer); + #ifdef WXLAYOUT_USE_CARET // show the caret back after everything is redrawn @@ -979,6 +1007,10 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect) m_StatusBar->SetStatusText(label, m_StatusFieldCursor); } } + + WXLO_TIMER_PRINT(LayoutTimer); + WXLO_TIMER_PRINT(BlitTimer); + WXLO_TIMER_PRINT(TmpTimer); } void @@ -999,14 +1031,20 @@ as needed. void wxLayoutWindow::ResizeScrollbars(bool exact) { - - if(! IsDirty()) - return; - wxClientDC dc( this ); PrepareDC( dc ); -// m_llist->ForceTotalLayout(); - m_llist->Layout(dc); +// m_llist->ForceTotalLayout(); + + if(! IsDirty()) + { + // we are laying out just the minimum, but always up to the + // cursor line, so the cursor position is updated. + m_llist->Layout(dc, 0); + return; + } + WXLO_TIMER_START(LayoutTimer); + m_llist->Layout(dc, -1); + WXLO_TIMER_STOP(LayoutTimer); ResetDirty(); wxPoint max = m_llist->GetSize(); @@ -1025,8 +1063,8 @@ wxLayoutWindow::ResizeScrollbars(bool exact) // TODO why do we set both at once? they're independent... if( max.x > m_maxx - WXLO_ROFFSET || max.y > m_maxy - WXLO_BOFFSET - || max.x < m_maxx - X_SCROLL_PAGE - || max.y < m_maxy - Y_SCROLL_PAGE + || (max.x < m_maxx - X_SCROLL_PAGE) + || (max.y < m_maxy - Y_SCROLL_PAGE) || exact ) { // text became too large @@ -1038,31 +1076,36 @@ wxLayoutWindow::ResizeScrollbars(bool exact) } bool done = FALSE; - if(max.x < X_SCROLL_PAGE) + if(max.x < X_SCROLL_PAGE && m_hasHScrollbar) { SetScrollbars(0,-1,0,-1,0,-1,true); m_hasHScrollbar = FALSE; done = TRUE; } - if(max.y < Y_SCROLL_PAGE) + if(max.y < Y_SCROLL_PAGE && m_hasVScrollbar) { SetScrollbars(-1,0,-1,0,-1,0,true); m_hasVScrollbar = FALSE; done = TRUE; } - if(! done) + if(! done && +// (max.x > X_SCROLL_PAGE || max.y > Y_SCROLL_PAGE) + (max.x > size.x - X_SCROLL_PAGE|| max.y > size.y - Y_SCROLL_PAGE) + ) { ViewStart(&m_ViewStartX, &m_ViewStartY); SetScrollbars(X_SCROLL_PAGE, Y_SCROLL_PAGE, - max.x / X_SCROLL_PAGE + 1, - max.y / Y_SCROLL_PAGE + 1, - m_ViewStartX, m_ViewStartY, + max.x / X_SCROLL_PAGE + 2, + max.y / Y_SCROLL_PAGE + 2, + m_ViewStartX, + m_ViewStartY, true); m_hasHScrollbar = m_hasVScrollbar = true; +// ScrollToCursor(); } - + m_maxx = max.x + X_SCROLL_PAGE; m_maxy = max.y + Y_SCROLL_PAGE; } diff --git a/samples/richedit/wxlwindow.h b/samples/richedit/wxlwindow.h index fa0ba4b291..8958e62fab 100644 --- a/samples/richedit/wxlwindow.h +++ b/samples/richedit/wxlwindow.h @@ -1,7 +1,7 @@ /*-*- c++ -*-******************************************************** * wxLwindow.h : a scrolled Window for displaying/entering rich text* * * - * (C) 1998-1999 by Karsten Ballüder (karsten@phy.hw.ac.uk) * + * (C) 1998-2000 by Karsten Ballüder (ballueder@gmx.net) * * * * $Id$ *******************************************************************/ @@ -118,6 +118,11 @@ public: */ void SetWrapMargin(CoordType margin) { m_WrapMargin = margin; } + /** Toggle wordwrap as we type. + @param on true to activate word wrap + */ + void SetWordWrap(bool on = true) { m_DoWordWrap = on; } + /** Redraws the window. Internally, this stores the parameter and calls a refresh on wxMSW, draws directly on wxGTK. @@ -230,6 +235,10 @@ protected: int m_maxx; int m_maxy; int m_lineHeight; + /// do we want automatic word wrap? + bool m_DoWordWrap; + /// wrap margin + CoordType m_WrapMargin; /// do we have the corresponding scrollbar? bool m_hasHScrollbar, @@ -253,8 +262,6 @@ private: bool m_Editable; /// Are we currently building a selection with the keyboard? bool m_Selecting; - /// wrap margin - CoordType m_WrapMargin; /// Has list changed since last redraw, e.g. in size? bool m_Dirty; /// Has the list ever been modified? diff --git a/samples/rotate/RotateVC.dsp b/samples/rotate/RotateVC.dsp new file mode 100644 index 0000000000..388121362e --- /dev/null +++ b/samples/rotate/RotateVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="RotateVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RotateVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RotateVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RotateVC.mak" CFG="RotateVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RotateVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RotateVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "RotateVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "RotateVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RotateVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/rotate.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RotateVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/rotate.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RotateVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/rotate.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "RotateVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/rotate.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "RotateVC - Win32 Release" +# Name "RotateVC - Win32 Debug" +# Name "RotateVC - Win32 Debug DLL" +# Name "RotateVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\rotate.cpp + +!IF "$(CFG)" == "RotateVC - Win32 Release" + +!ELSEIF "$(CFG)" == "RotateVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RotateVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "RotateVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\rotate.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/rotate/RotateVC.dsw b/samples/rotate/RotateVC.dsw new file mode 100644 index 0000000000..0ed8c886c7 --- /dev/null +++ b/samples/rotate/RotateVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "RotateVC"=.\RotateVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/rotate/rotate.cpp b/samples/rotate/rotate.cpp index 5ab6b68b92..89c7a0d299 100644 --- a/samples/rotate/rotate.cpp +++ b/samples/rotate/rotate.cpp @@ -43,6 +43,19 @@ private: }; +class MyCanvas: public wxScrolledWindow +{ +public: + MyCanvas(wxWindow* parent); + + void OnMouseLeftUp (wxMouseEvent & event); + void OnMouseRightUp (wxMouseEvent & event); + +private: + + DECLARE_EVENT_TABLE() +}; + class MyFrame: public wxFrame { public: @@ -50,10 +63,7 @@ public: void OnQuit (wxCommandEvent &); void OnAngle(wxCommandEvent &); - void OnMouseLeftUp (wxMouseEvent & event); - void OnMouseRightUp (wxMouseEvent & event); -private: double m_angle; DECLARE_EVENT_TABLE() @@ -65,16 +75,18 @@ enum ID_Angle }; +BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) + EVT_LEFT_UP (MyCanvas::OnMouseLeftUp) + EVT_RIGHT_UP (MyCanvas::OnMouseRightUp) +END_EVENT_TABLE() + BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU (ID_Quit, MyFrame::OnQuit) EVT_MENU (ID_Angle, MyFrame::OnAngle) - EVT_LEFT_UP (MyFrame::OnMouseLeftUp) - EVT_RIGHT_UP (MyFrame::OnMouseRightUp) END_EVENT_TABLE() IMPLEMENT_APP(MyApp) - bool MyApp::OnInit() { m_image = wxImage("kclub.bmp", wxBITMAP_TYPE_BMP); @@ -92,8 +104,6 @@ bool MyApp::OnInit() MyFrame *frame = new MyFrame ("wxWindows rotate sample", wxPoint(20,20), wxSize(600,450)); - frame->SetBackgroundColour (wxColour (0,80,60)); - frame->Clear(); frame->Show (TRUE); SetTopWindow (frame); return TRUE; @@ -104,6 +114,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) { m_angle = 0.1; + new MyCanvas(this); + wxMenu *menuFile = new wxMenu; menuFile->Append (ID_Angle, "Set &angle\tCtrl-A"); menuFile->AppendSeparator(); @@ -124,7 +136,8 @@ void MyFrame::OnAngle (wxCommandEvent &) degrees, -180, +180, this); - m_angle = (degrees * M_PI) / 180.0; + if ( degrees != -1 ) + m_angle = (degrees * M_PI) / 180.0; } void MyFrame::OnQuit (wxCommandEvent &) @@ -132,13 +145,21 @@ void MyFrame::OnQuit (wxCommandEvent &) Close (TRUE); } +MyCanvas::MyCanvas(wxWindow* parent): + wxScrolledWindow(parent, -1) +{ + SetBackgroundColour (wxColour (0,80,60)); + Clear(); +} // Rotate with interpolation and with offset correction -void MyFrame::OnMouseLeftUp (wxMouseEvent & event) +void MyCanvas::OnMouseLeftUp (wxMouseEvent & event) { + MyFrame* frame = (MyFrame*) GetParent(); + wxPoint offset; const wxImage& img = wxGetApp().GetImage(); - wxImage img2 = img.Rotate(m_angle, wxPoint(img.GetWidth()/2, img.GetHeight()/2), TRUE, &offset); + wxImage img2 = img.Rotate(frame->m_angle, wxPoint(img.GetWidth()/2, img.GetHeight()/2), TRUE, &offset); wxBitmap bmp = img2.ConvertToBitmap (); @@ -147,10 +168,12 @@ void MyFrame::OnMouseLeftUp (wxMouseEvent & event) } // without interpolation, and without offset correction -void MyFrame::OnMouseRightUp (wxMouseEvent & event) +void MyCanvas::OnMouseRightUp (wxMouseEvent & event) { + MyFrame* frame = (MyFrame*) GetParent(); + const wxImage& img = wxGetApp().GetImage(); - wxImage img2 = img.Rotate(m_angle, wxPoint(img.GetWidth()/2, img.GetHeight()/2), FALSE); + wxImage img2 = img.Rotate(frame->m_angle, wxPoint(img.GetWidth()/2, img.GetHeight()/2), FALSE); wxBitmap bmp = img2.ConvertToBitmap (); diff --git a/samples/sashtest/SashtestVC.dsp b/samples/sashtest/SashtestVC.dsp new file mode 100644 index 0000000000..de1df531f8 --- /dev/null +++ b/samples/sashtest/SashtestVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="SashtestVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SashtestVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SashtestVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SashtestVC.mak" CFG="SashtestVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SashtestVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SashtestVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SashtestVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "SashtestVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SashtestVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/sashtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "SashtestVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/sashtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "SashtestVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/sashtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "SashtestVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/sashtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "SashtestVC - Win32 Release" +# Name "SashtestVC - Win32 Debug" +# Name "SashtestVC - Win32 Debug DLL" +# Name "SashtestVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\sashtest.cpp + +!IF "$(CFG)" == "SashtestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "SashtestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "SashtestVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "SashtestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\sashtest.h +# End Source File +# Begin Source File + +SOURCE=.\sashtest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/sashtest/SashtestVC.dsw b/samples/sashtest/SashtestVC.dsw new file mode 100644 index 0000000000..2cd1093808 --- /dev/null +++ b/samples/sashtest/SashtestVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SashtestVC"=.\SashtestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/sashtest/makefile.g95 b/samples/sashtest/makefile.g95 index 9e76f66b10..fe93070c07 100644 --- a/samples/sashtest/makefile.g95 +++ b/samples/sashtest/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=sashtest OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/sashtest/sashtest.cpp b/samples/sashtest/sashtest.cpp index 128f20e495..9ae3762560 100644 --- a/samples/sashtest/sashtest.cpp +++ b/samples/sashtest/sashtest.cpp @@ -43,7 +43,7 @@ bool MyApp::OnInit(void) // Create the main frame window frame = new MyFrame(NULL, -1, "Sash Demo", wxPoint(0, 0), wxSize(500, 400), - wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL); + wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL); // Give it an icon (this is ignored in MDI mode: uses resources) #ifdef __WXMSW__ @@ -266,6 +266,7 @@ END_EVENT_TABLE() MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): wxScrolledWindow(parent, -1, pos, size, wxSUNKEN_BORDER) { + SetBackgroundColour(* wxWHITE); } // Define the repainting behaviour diff --git a/samples/scroll/ScrollVC.dsp b/samples/scroll/ScrollVC.dsp new file mode 100644 index 0000000000..3864146119 --- /dev/null +++ b/samples/scroll/ScrollVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ScrollVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ScrollVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ScrollVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ScrollVC.mak" CFG="ScrollVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ScrollVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ScrollVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ScrollVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ScrollVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ScrollVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/scroll.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ScrollVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/scroll.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ScrollVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/scroll.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ScrollVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/scroll.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ScrollVC - Win32 Release" +# Name "ScrollVC - Win32 Debug" +# Name "ScrollVC - Win32 Debug DLL" +# Name "ScrollVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\scroll.cpp + +!IF "$(CFG)" == "ScrollVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ScrollVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ScrollVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ScrollVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\scroll.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/scroll/ScrollVC.dsw b/samples/scroll/ScrollVC.dsw new file mode 100644 index 0000000000..b89c2b539d --- /dev/null +++ b/samples/scroll/ScrollVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ScrollVC"=.\ScrollVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index c16f08b042..b190de4637 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -188,12 +188,9 @@ void MyCanvas::OnMouseDown( wxMouseEvent &event ) int x,y; CalcUnscrolledPosition( pt.x, pt.y, &x, &y ); wxLogMessage( "Mouse down event at: %d %d, scrolled: %d %d", pt.x, pt.y, x, y ); - } - - if (event.LeftIsDown() && - event.LeftDown()) - { - wxLogMessage( "Error: both LeftDown() and LeftIsDown() are TRUE!" ); + + if ( !event.LeftIsDown() ) + wxLogMessage( "Error: LeftIsDown() should be TRUE if for LeftDown()" ); } } diff --git a/samples/scrollsub/ScrollsubVC.dsp b/samples/scrollsub/ScrollsubVC.dsp new file mode 100644 index 0000000000..f1640072aa --- /dev/null +++ b/samples/scrollsub/ScrollsubVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ScrollsubVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ScrollsubVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ScrollsubVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ScrollsubVC.mak" CFG="ScrollsubVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ScrollsubVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ScrollsubVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ScrollsubVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ScrollsubVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ScrollsubVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/scrollsub.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ScrollsubVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/scrollsub.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ScrollsubVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/scrollsub.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ScrollsubVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/scrollsub.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ScrollsubVC - Win32 Release" +# Name "ScrollsubVC - Win32 Debug" +# Name "ScrollsubVC - Win32 Debug DLL" +# Name "ScrollsubVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\scrollsub.cpp + +!IF "$(CFG)" == "ScrollsubVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ScrollsubVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ScrollsubVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ScrollsubVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\scrollsub.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/scrollsub/ScrollsubVC.dsw b/samples/scrollsub/ScrollsubVC.dsw new file mode 100644 index 0000000000..45b9037170 --- /dev/null +++ b/samples/scrollsub/ScrollsubVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ScrollsubVC"=.\ScrollsubVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/scrollsub/scrollsub.cpp b/samples/scrollsub/scrollsub.cpp index 9f649a562a..384550643a 100644 --- a/samples/scrollsub/scrollsub.cpp +++ b/samples/scrollsub/scrollsub.cpp @@ -112,6 +112,7 @@ public: void OnAbout( wxCommandEvent &event ); void OnQuit( wxCommandEvent &event ); + void OnFullScreen( wxCommandEvent &event ); wxScrolledWindow *m_scrolled; wxTextCtrl *m_log; @@ -340,13 +341,15 @@ void MyCanvas::ScrollWindow( int dx, int dy, const wxRect *rect ) // MyFrame const int ID_QUIT = 108; -const int ID_ABOUT = 109; +const int ID_FULL = 109; +const int ID_ABOUT = 110; IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) BEGIN_EVENT_TABLE(MyFrame,wxFrame) EVT_MENU (ID_ABOUT, MyFrame::OnAbout) EVT_MENU (ID_QUIT, MyFrame::OnQuit) + EVT_MENU (ID_FULL, MyFrame::OnFullScreen) END_EVENT_TABLE() MyFrame::MyFrame() @@ -355,6 +358,7 @@ MyFrame::MyFrame() { wxMenu *file_menu = new wxMenu(); file_menu->Append( ID_ABOUT, "&About.."); + file_menu->Append( ID_FULL, "&Full screen.."); file_menu->Append( ID_QUIT, "E&xit\tAlt-X"); wxMenuBar *menu_bar = new wxMenuBar(); @@ -386,6 +390,13 @@ void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) ) Close( TRUE ); } +void MyFrame::OnFullScreen( wxCommandEvent &WXUNUSED(event) ) +{ +#ifdef __MSW__ + ShowFullScreen( TRUE, wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION ); +#endif +} + void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) { (void)wxMessageBox( "wxScroll demo II\n" diff --git a/samples/sockets/ClientVC.dsp b/samples/sockets/ClientVC.dsp new file mode 100644 index 0000000000..bc9d1c5e20 --- /dev/null +++ b/samples/sockets/ClientVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ClientVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ClientVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ClientVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ClientVC.mak" CFG="ClientVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ClientVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ClientVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ClientVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ClientVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ClientVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/client.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/client.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/client.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/client.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ClientVC - Win32 Release" +# Name "ClientVC - Win32 Debug" +# Name "ClientVC - Win32 Debug DLL" +# Name "ClientVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\client.cpp + +!IF "$(CFG)" == "ClientVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ClientVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\client.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/sockets/ClientVC.dsw b/samples/sockets/ClientVC.dsw new file mode 100644 index 0000000000..048e935c16 --- /dev/null +++ b/samples/sockets/ClientVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ClientVC"=.\ClientVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/sockets/Makefile.in b/samples/sockets/Makefile.in index 1a2e1fd3cc..69604510ce 100644 --- a/samples/sockets/Makefile.in +++ b/samples/sockets/Makefile.in @@ -21,7 +21,7 @@ VPATH = @PATH_IFS@$(top_srcdir)/samples/sockets # ':' for autoconf .SUFFIXES: .o .cpp .c .cxx .cpp.o : - $(CC) -c $(CPPFLAGS) -o $@ $< + $(CXX) -c $(CXXFLAGS) -o $@ $< # Set defaults from configure include ../../src/make.env @@ -29,10 +29,10 @@ include ../../src/make.env all: client@PROGRAM_EXT@ server@PROGRAM_EXT@ client@PROGRAM_EXT@: client.o ../../lib/@WX_TARGET_LIBRARY@ - $(CC) $(LDFLAGS) -o client@PROGRAM_EXT@ client.o $(LDLIBS) + $(CXX) $(LDFLAGS) -o client@PROGRAM_EXT@ client.o $(LDLIBS) server@PROGRAM_EXT@: server.o ../../lib/@WX_TARGET_LIBRARY@ - $(CC) $(LDFLAGS) -o server@PROGRAM_EXT@ server.o $(LDLIBS) + $(CXX) $(LDFLAGS) -o server@PROGRAM_EXT@ server.o $(LDLIBS) clean: rm -f client@PROGRAM_EXT@ server@PROGRAM_EXT@ client.o server.o core diff --git a/samples/sockets/ServerVC.dsp b/samples/sockets/ServerVC.dsp new file mode 100644 index 0000000000..8bb8cef285 --- /dev/null +++ b/samples/sockets/ServerVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ServerVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ServerVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ServerVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ServerVC.mak" CFG="ServerVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ServerVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ServerVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ServerVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ServerVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ServerVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/server.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/server.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/server.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/server.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ServerVC - Win32 Release" +# Name "ServerVC - Win32 Debug" +# Name "ServerVC - Win32 Debug DLL" +# Name "ServerVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\server.cpp + +!IF "$(CFG)" == "ServerVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ServerVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\server.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/sockets/ServerVC.dsw b/samples/sockets/ServerVC.dsw new file mode 100644 index 0000000000..44073be3f3 --- /dev/null +++ b/samples/sockets/ServerVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ServerVC"=.\ServerVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/splitter/SplitterVC.dsp b/samples/splitter/SplitterVC.dsp new file mode 100644 index 0000000000..2510617492 --- /dev/null +++ b/samples/splitter/SplitterVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="SplitterVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=SplitterVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SplitterVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SplitterVC.mak" CFG="SplitterVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SplitterVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "SplitterVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "SplitterVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "SplitterVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SplitterVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/splitter.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "SplitterVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/splitter.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "SplitterVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/splitter.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "SplitterVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/splitter.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "SplitterVC - Win32 Release" +# Name "SplitterVC - Win32 Debug" +# Name "SplitterVC - Win32 Debug DLL" +# Name "SplitterVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\splitter.cpp + +!IF "$(CFG)" == "SplitterVC - Win32 Release" + +!ELSEIF "$(CFG)" == "SplitterVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "SplitterVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "SplitterVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\splitter.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/splitter/SplitterVC.dsw b/samples/splitter/SplitterVC.dsw new file mode 100644 index 0000000000..ea1bdcce90 --- /dev/null +++ b/samples/splitter/SplitterVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SplitterVC"=.\SplitterVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/splitter/makefile.g95 b/samples/splitter/makefile.g95 index fc4af58f1d..2766d0e106 100644 --- a/samples/splitter/makefile.g95 +++ b/samples/splitter/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=splitter OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/splitter/splitter.cpp b/samples/splitter/splitter.cpp index 054e799a9c..c28422a5a8 100644 --- a/samples/splitter/splitter.cpp +++ b/samples/splitter/splitter.cpp @@ -90,7 +90,7 @@ DECLARE_EVENT_TABLE() class MyCanvas: public wxScrolledWindow { public: - MyCanvas(wxWindow* parent, wxWindowID id, int x, int y, int w, int h, const wxString &name); + MyCanvas(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = ""); virtual ~MyCanvas(); virtual void OnDraw(wxDC& dc); @@ -170,12 +170,12 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, cons wxSize sz( m_splitter->GetSize() ); wxLogMessage( "Initial splitter size: %d %d\n", (int)sz.x, (int)sz.y ); - m_leftCanvas = new MyCanvas(m_splitter, CANVAS1, 0, 0, 400, 400, "Test1" ); + m_leftCanvas = new MyCanvas(m_splitter, CANVAS1, wxPoint(0, 0), wxSize(400, 400), "Test1" ); m_leftCanvas->SetBackgroundColour(*wxRED); m_leftCanvas->SetScrollbars(20, 20, 50, 50); m_leftCanvas->SetCursor(wxCursor(wxCURSOR_MAGNIFIER)); - m_rightCanvas = new MyCanvas(m_splitter, CANVAS2, 0, 0, 400, 400, "Test2" ); + m_rightCanvas = new MyCanvas(m_splitter, CANVAS2, wxPoint(0, 0), wxSize(400, 400), "Test2" ); m_rightCanvas->SetBackgroundColour(*wxCYAN); m_rightCanvas->SetScrollbars(20, 20, 50, 50); m_rightCanvas->Show(FALSE); @@ -256,8 +256,8 @@ void MyFrame::UpdatePosition() SetStatusText(str); } -MyCanvas::MyCanvas(wxWindow* parent, wxWindowID id, int x, int y, int w, int h, const wxString &name ) : - wxScrolledWindow(parent, id, wxPoint(x, y), wxSize(w, h), 0, name ) +MyCanvas::MyCanvas(wxWindow* parent, wxWindowID id, const wxPoint& point, const wxSize& size, const wxString &name ) : + wxScrolledWindow(parent, id, point, size, 0, name ) { } diff --git a/samples/statbar/StatbarVC.dsp b/samples/statbar/StatbarVC.dsp new file mode 100644 index 0000000000..5fbc60bb05 --- /dev/null +++ b/samples/statbar/StatbarVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="StatbarVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=StatbarVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "StatbarVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "StatbarVC.mak" CFG="StatbarVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "StatbarVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "StatbarVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "StatbarVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "StatbarVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "StatbarVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/statbar.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "StatbarVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/statbar.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "StatbarVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/statbar.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "StatbarVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/statbar.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "StatbarVC - Win32 Release" +# Name "StatbarVC - Win32 Debug" +# Name "StatbarVC - Win32 Debug DLL" +# Name "StatbarVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\statbar.cpp + +!IF "$(CFG)" == "StatbarVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StatbarVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StatbarVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StatbarVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\statbar.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/statbar/StatbarVC.dsw b/samples/statbar/StatbarVC.dsw new file mode 100644 index 0000000000..3143dbb949 --- /dev/null +++ b/samples/statbar/StatbarVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "StatbarVC"=.\StatbarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/statbar/makefile.g95 b/samples/statbar/makefile.g95 index e641b5144a..af0dfc16c8 100644 --- a/samples/statbar/makefile.g95 +++ b/samples/statbar/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=statbar OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp index 158b31403b..588d97b2f5 100644 --- a/samples/statbar/statbar.cpp +++ b/samples/statbar/statbar.cpp @@ -46,16 +46,26 @@ #include "wx/textdlg.h" #include "wx/sizer.h" #include "wx/stattext.h" + #include "wx/bmpbuttn.h" + #include "wx/dcmemory.h" #endif #include "wx/datetime.h" +// define this for the platforms which don't support wxBitmapButton (such as +// Motif), else a wxBitmapButton will be used +#ifdef __WXMOTIF__ + #define USE_STATIC_BITMAP +#endif + // ---------------------------------------------------------------------------- // resources // ---------------------------------------------------------------------------- -#include "green.xpm" -#include "red.xpm" +#ifdef USE_STATIC_BITMAP + #include "green.xpm" + #include "red.xpm" +#endif // USE_STATIC_BITMAP // ---------------------------------------------------------------------------- // private classes @@ -87,8 +97,14 @@ public: void OnTimer(wxTimerEvent& event) { UpdateClock(); } void OnSize(wxSizeEvent& event); void OnToggleClock(wxCommandEvent& event); + void OnButton(wxCommandEvent& event); private: + // toggle the state of the status bar controls + void DoToggle(); + + wxBitmap CreateBitmapForButton(bool on = FALSE); + enum { Field_Text, @@ -101,7 +117,11 @@ private: wxTimer m_timer; wxCheckBox *m_checkbox; +#ifdef USE_STATIC_BITMAP wxStaticBitmap *m_statbmp; +#else + wxBitmapButton *m_statbmp; +#endif DECLARE_EVENT_TABLE() }; @@ -180,6 +200,7 @@ END_EVENT_TABLE() BEGIN_EVENT_TABLE(MyStatusBar, wxStatusBar) EVT_SIZE(MyStatusBar::OnSize) EVT_CHECKBOX(StatusBar_Checkbox, MyStatusBar::OnToggleClock) + EVT_BUTTON(-1, MyStatusBar::OnButton) EVT_TIMER(-1, MyStatusBar::OnTimer) END_EVENT_TABLE() @@ -295,8 +316,8 @@ void MyFrame::DoCreateStatusBar(MyFrame::StatBarKind kind) wxFAIL_MSG("unknown stat bar kind"); } - PositionStatusBar(); GetStatusBar()->Show(); + PositionStatusBar(); m_statbarKind = kind; } @@ -412,7 +433,7 @@ MyAboutDialog::MyAboutDialog(wxWindow *parent) #endif MyStatusBar::MyStatusBar(wxWindow *parent) - : wxStatusBar(parent, -1), m_timer(this) + : wxStatusBar(parent, -1), m_timer(this), m_checkbox(NULL) { static const int widths[Field_Max] = { -1, 150, BITMAP_SIZE_X, 100 }; @@ -422,7 +443,11 @@ MyStatusBar::MyStatusBar(wxWindow *parent) m_checkbox = new wxCheckBox(this, StatusBar_Checkbox, _T("&Toggle clock")); m_checkbox->SetValue(TRUE); +#ifdef USE_STATIC_BITMAP m_statbmp = new wxStaticBitmap(this, -1, wxIcon(green_xpm)); +#else + m_statbmp = new wxBitmapButton(this, -1, CreateBitmapForButton()); +#endif m_timer.Start(1000); @@ -443,27 +468,70 @@ MyStatusBar::~MyStatusBar() } } +wxBitmap MyStatusBar::CreateBitmapForButton(bool on) +{ + static const int BMP_BUTTON_SIZE_X = 10; + static const int BMP_BUTTON_SIZE_Y = 9; + + wxBitmap bitmap(BMP_BUTTON_SIZE_X, BMP_BUTTON_SIZE_Y); + wxMemoryDC dc; + dc.SelectObject(bitmap); + dc.SetBrush(on ? *wxGREEN_BRUSH : *wxRED_BRUSH); + dc.SetBackground(*wxLIGHT_GREY_BRUSH); + dc.Clear(); + dc.DrawEllipse(0, 0, BMP_BUTTON_SIZE_X, BMP_BUTTON_SIZE_Y); + dc.SelectObject(wxNullBitmap); + + return bitmap; +} + void MyStatusBar::OnSize(wxSizeEvent& event) { + if ( !m_checkbox ) + return; + wxRect rect; GetFieldRect(Field_Checkbox, rect); m_checkbox->SetSize(rect.x + 2, rect.y + 2, rect.width - 4, rect.height - 4); GetFieldRect(Field_Bitmap, rect); - m_statbmp->Move(rect.x + (rect.width - BITMAP_SIZE_X) / 2, - rect.y + (rect.height - BITMAP_SIZE_Y) / 2); +#ifdef USE_BUTTON_FOR_BITMAP + wxSize size(BITMAP_SIZE_X, BITMAP_SIZE_Y); +#else + wxSize size = m_statbmp->GetSize(); +#endif + + m_statbmp->Move(rect.x + (rect.width - size.x) / 2, + rect.y + (rect.height - size.y) / 2); event.Skip(); } -void MyStatusBar::OnToggleClock(wxCommandEvent& event) +void MyStatusBar::OnButton(wxCommandEvent& WXUNUSED(event)) +{ + m_checkbox->SetValue(!m_checkbox->GetValue()); + + DoToggle(); +} + +void MyStatusBar::OnToggleClock(wxCommandEvent& WXUNUSED(event)) +{ + DoToggle(); +} + +void MyStatusBar::DoToggle() { if ( m_checkbox->GetValue() ) { m_timer.Start(1000); +#ifdef USE_STATIC_BITMAP m_statbmp->SetIcon(wxIcon(green_xpm)); +#else + m_statbmp->SetBitmapLabel(CreateBitmapForButton(FALSE)); + m_statbmp->Refresh(); +#endif UpdateClock(); } @@ -471,7 +539,12 @@ void MyStatusBar::OnToggleClock(wxCommandEvent& event) { m_timer.Stop(); +#ifdef USE_STATIC_BITMAP m_statbmp->SetIcon(wxIcon(red_xpm)); +#else + m_statbmp->SetBitmapLabel(CreateBitmapForButton(TRUE)); + m_statbmp->Refresh(); +#endif SetStatusText("", Field_Clock); } diff --git a/samples/stc/Makefile.in b/samples/stc/Makefile.in index 39b2292d0d..cffdcc78d7 100644 --- a/samples/stc/Makefile.in +++ b/samples/stc/Makefile.in @@ -13,9 +13,9 @@ PROGRAM=stctest OBJECTS=$(PROGRAM).o -APPEXTRALIBS=$(top_builddir)/contrib/src/stc/libstc.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/libstc.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include DATAFILES=stctest.cpp -include ../../../src/makeprog.env +include $(top_builddir)/src/makeprog.env diff --git a/samples/stc/StcTestVC.dsp b/samples/stc/StcTestVC.dsp new file mode 100644 index 0000000000..05bb9197ed --- /dev/null +++ b/samples/stc/StcTestVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="StcTestVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# (Actually, generated by MakeProject, (c) Julian Smart, 1998) +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=StcTestVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "StcTestVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "StcTestVC.mak" CFG="StcTestVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "StcTestVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "StcTestVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "StcTestVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "StcTestVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "StcTestVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "StcTestVC - Win32 Release" +# Name "StcTestVC - Win32 Debug" +# Name "StcTestVC - Win32 Debug DLL" +# Name "StcTestVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\stctest.cpp + +!IF "$(CFG)" == "StcTestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\stctest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/stc/StcTestVC.dsw b/samples/stc/StcTestVC.dsw new file mode 100644 index 0000000000..22af0485e9 --- /dev/null +++ b/samples/stc/StcTestVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "StcTestVC"=.\StcTestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index fe337aadb3..bb581a99ab 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -165,7 +165,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) ed->EmptyUndoBuffer(); ed->SetLexer(wxSTC_LEX_CPP); - ed->SetKeywords(0, + ed->SetKeyWords(0, "asm auto bool break case catch char class const " "const_cast continue default delete do double " "dynamic_cast else enum explicit export extern " diff --git a/samples/tab/TabVC.dsp b/samples/tab/TabVC.dsp new file mode 100644 index 0000000000..e38a2d92d8 --- /dev/null +++ b/samples/tab/TabVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="TabVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TabVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TabVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TabVC.mak" CFG="TabVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TabVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TabVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TabVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "TabVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TabVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/tab.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TabVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/tab.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TabVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/tab.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TabVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/tab.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "TabVC - Win32 Release" +# Name "TabVC - Win32 Debug" +# Name "TabVC - Win32 Debug DLL" +# Name "TabVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\tab.cpp + +!IF "$(CFG)" == "TabVC - Win32 Release" + +!ELSEIF "$(CFG)" == "TabVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TabVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TabVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\tab.h +# End Source File +# Begin Source File + +SOURCE=.\tab.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/tab/TabVC.dsw b/samples/tab/TabVC.dsw new file mode 100644 index 0000000000..d0ac37bd02 --- /dev/null +++ b/samples/tab/TabVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TabVC"=.\TabVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/tab/makefile.g95 b/samples/tab/makefile.g95 index 22604cb9ca..6415ef0c17 100644 --- a/samples/tab/makefile.g95 +++ b/samples/tab/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=tab OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/taskbar/TaskbarVC.dsp b/samples/taskbar/TaskbarVC.dsp new file mode 100644 index 0000000000..1384eba797 --- /dev/null +++ b/samples/taskbar/TaskbarVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="TaskbarVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TaskbarVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TaskbarVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TaskbarVC.mak" CFG="TaskbarVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TaskbarVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TaskbarVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TaskbarVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "TaskbarVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TaskbarVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/tbtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TaskbarVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/tbtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TaskbarVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/tbtest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TaskbarVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/tbtest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "TaskbarVC - Win32 Release" +# Name "TaskbarVC - Win32 Debug" +# Name "TaskbarVC - Win32 Debug DLL" +# Name "TaskbarVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\tbtest.cpp + +!IF "$(CFG)" == "TaskbarVC - Win32 Release" + +!ELSEIF "$(CFG)" == "TaskbarVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TaskbarVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TaskbarVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\tbtest.h +# End Source File +# Begin Source File + +SOURCE=.\tbtest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/taskbar/TaskbarVC.dsw b/samples/taskbar/TaskbarVC.dsw new file mode 100644 index 0000000000..4e37d472e6 --- /dev/null +++ b/samples/taskbar/TaskbarVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TaskbarVC"=.\TaskbarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp index 98c0658536..45896485f1 100644 --- a/samples/taskbar/tbtest.cpp +++ b/samples/taskbar/tbtest.cpp @@ -111,6 +111,11 @@ void MyTaskBarIcon::OnMenuRestore(wxCommandEvent& ) void MyTaskBarIcon::OnMenuExit(wxCommandEvent& ) { dialog->Close(TRUE); + + // Nudge wxWindows into destroying the dialog, since + // with a hidden window no messages will get sent to put + // it into idle processing. + wxGetApp().ProcessIdle(); } diff --git a/samples/text/TextVC.dsp b/samples/text/TextVC.dsp new file mode 100644 index 0000000000..99cf2637a7 --- /dev/null +++ b/samples/text/TextVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="TextVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TextVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TextVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TextVC.mak" CFG="TextVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TextVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TextVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TextVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "TextVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TextVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/text.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TextVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/text.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TextVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/text.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TextVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/text.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "TextVC - Win32 Release" +# Name "TextVC - Win32 Debug" +# Name "TextVC - Win32 Debug DLL" +# Name "TextVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\text.cpp + +!IF "$(CFG)" == "TextVC - Win32 Release" + +!ELSEIF "$(CFG)" == "TextVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TextVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TextVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\text.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/text/TextVC.dsw b/samples/text/TextVC.dsw new file mode 100644 index 0000000000..51eda7857f --- /dev/null +++ b/samples/text/TextVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TextVC"=.\TextVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/text/makefile.b32 b/samples/text/makefile.b32 index 8accc1bcfd..0c85385358 100644 --- a/samples/text/makefile.b32 +++ b/samples/text/makefile.b32 @@ -9,8 +9,17 @@ WXDIR = $(WXWIN) -TARGET=controls +TARGET=texttst OBJECTS = $(TARGET).obj +# We have to copy to a different root name, +# since BC++ doesn't seem to like the name 'text' +# when linking +all: copyfiles $(TARGET).exe $(EXTRATARGETS) + !include $(WXDIR)\src\makeprog.b32 +copyfiles: + copy text.cpp texttst.cpp + copy text.rc texttst.rc + diff --git a/samples/text/makefile.bcc b/samples/text/makefile.bcc index 400c6539d2..2577cf9245 100644 --- a/samples/text/makefile.bcc +++ b/samples/text/makefile.bcc @@ -12,7 +12,7 @@ WXDIR = $(WXWIN) -TARGET=controls +TARGET=text OBJECTS=$(TARGET).obj !include $(WXDIR)\src\makeprog.bcc diff --git a/samples/text/makefile.wat b/samples/text/makefile.wat index db1d6cc5b6..6ba2275933 100644 --- a/samples/text/makefile.wat +++ b/samples/text/makefile.wat @@ -7,7 +7,7 @@ WXDIR = $(%WXWIN) -PROGRAM = controls +PROGRAM = text OBJECTS = $(PROGRAM).obj !include $(WXDIR)\src\makeprog.wat diff --git a/samples/text/text.cpp b/samples/text/text.cpp index 2f6c1a5de8..c8dd57f6bd 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -70,7 +70,7 @@ public: void OnText(wxCommandEvent& event); void OnMouseEvent(wxMouseEvent& event); - bool m_hasCapture; + bool m_hasCapture; private: static inline wxChar GetChar(bool on, wxChar c) { return on ? c : _T('-'); } @@ -139,6 +139,10 @@ public: void OnFileSave(wxCommandEvent& event); void OnFileLoad(wxCommandEvent& event); + void OnSetEditable(wxCommandEvent& event); + void OnSetEnabled(wxCommandEvent& event); + void OnClear(wxCommandEvent& event); + void OnIdle( wxIdleEvent& event ); private: @@ -163,7 +167,7 @@ enum TEXT_ABOUT, TEXT_LOAD, TEXT_SAVE, - TEXT_CLEAR, + TEXT_CLEAR_LOG, // clipboard menu TEXT_CLIPBOARD_COPY = 200, @@ -173,9 +177,12 @@ enum TEXT_TOOLTIPS_SETDELAY = 300, TEXT_TOOLTIPS_ENABLE, - // move menu + // text menu TEXT_MOVE_ENDTEXT = 400, - TEXT_MOVE_ENDENTRY + TEXT_MOVE_ENDENTRY, + TEXT_SET_EDITABLE, + TEXT_SET_ENABLED, + TEXT_CLEAR }; bool MyApp::OnInit() @@ -186,7 +193,7 @@ bool MyApp::OnInit() frame->SetSizeHints( 500, 400 ); wxMenu *file_menu = new wxMenu; - file_menu->Append(TEXT_CLEAR, "&Clear the log\tCtrl-C", + file_menu->Append(TEXT_CLEAR_LOG, "&Clear the log\tCtrl-C", "Clear the log window contents"); file_menu->Append(TEXT_SAVE, "&Save file\tCtrl-S", "Save the text control contents to file"); @@ -219,10 +226,15 @@ bool MyApp::OnInit() menu_bar->Append(menuClipboard, "&Clipboard"); #endif // wxUSE_CLIPBOARD - wxMenu *menuMove = new wxMenu; - menuMove->Append(TEXT_MOVE_ENDTEXT, "To the end of &text"); - menuMove->Append(TEXT_MOVE_ENDENTRY, "To the end of &entry"); - menu_bar->Append(menuMove, "&Move"); + wxMenu *menuText = new wxMenu; + menuText->Append(TEXT_MOVE_ENDTEXT, "Move cursor to the end of &text"); + menuText->Append(TEXT_MOVE_ENDENTRY, "Move cursor to the end of &entry"); + menuText->Append(TEXT_SET_EDITABLE, "Toggle &editable state", "", TRUE); + menuText->Append(TEXT_SET_ENABLED, "Toggle e&nabled state", "", TRUE); + menuText->Append(TEXT_CLEAR, "&Clear text"); + menuText->Check(TEXT_SET_EDITABLE, TRUE); + menuText->Check(TEXT_SET_ENABLED, TRUE); + menu_bar->Append(menuText, "&Text"); frame->SetMenuBar(menu_bar); @@ -447,6 +459,10 @@ void MyTextCtrl::OnText(wxCommandEvent& event) { wxLogMessage(_T("Text changed in control '%s'"), data); } + else + { + wxLogMessage(_T("Text changed in some control")); + } } void MyTextCtrl::OnChar(wxKeyEvent& event) @@ -488,11 +504,12 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event) "Current line, column: (%ld, %ld)\n" "Number of lines: %ld\n" "Current line length: %ld\n" - "Total text length: %ld"), + "Total text length: %u (%ld)"), pos, line, column, GetNumberOfLines(), GetLineLength(line), + GetValue().length(), GetLastPosition()); } break; @@ -527,10 +544,17 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event) WriteText("\n"); break; - default: - LogEvent( wxT("Key down"), event); + case WXK_F6: + SetValue("F6 was just pressed."); + break; + + case WXK_F7: + ShowPosition(10); + break; } + LogEvent( wxT("Key down"), event); + event.Skip(); } @@ -554,7 +578,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) // single line text controls m_text = new MyTextCtrl( this, -1, "Single line.", - wxPoint(10,10), wxSize(140,-1), 0); + wxPoint(10,10), wxSize(140,-1), + wxTE_PROCESS_ENTER); m_text->SetForegroundColour(*wxBLUE); m_text->SetBackgroundColour(*wxLIGHT_GREY); (*m_text) << " Appended."; @@ -569,18 +594,42 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) // multi line text controls - m_horizontal = new MyTextCtrl( this, -1, "Multiline text control with a horizontal scrollbar.", + m_horizontal = new MyTextCtrl( this, -1, "", wxPoint(10,170), wxSize(140,70), wxTE_MULTILINE | wxHSCROLL ); - m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL, - FALSE, "", wxFONTENCODING_ISO8859_2)); //wxFONTENCODING_KOI8)); - //m_horizontal->SetValue("ËÁÖÅÔÓÑ ÕÄÁÞÎÙÍ"); - m_horizontal->SetValue("®lu»ouèký kùò zbìsile èe¹tina «»"); + + // a little hack to use the command line argument for encoding testing + if ( wxTheApp->argc == 2 ) + { + switch ( wxTheApp->argv[1][0] ) + { + case '2': + m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL, + FALSE, "", + wxFONTENCODING_ISO8859_2)); + m_horizontal->SetValue("®lu»ouèký kùò zbìsile èe¹tina «»"); + break; + + default: + m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL, + FALSE, "", + wxFONTENCODING_KOI8)); + m_horizontal->SetValue("ËÁÖÅÔÓÑ ÕÄÁÞÎÙÍ"); + } + } + else + { + m_horizontal->SetValue("Text in default encoding:\n" + "Multiline text control with a horizontal scrollbar."); + } m_multitext = new MyTextCtrl( this, -1, "Multi line.", wxPoint(180,10), wxSize(240,70), wxTE_MULTILINE ); + m_multitext->SetFont(*wxITALIC_FONT); (*m_multitext) << " Appended."; m_multitext->SetInsertionPoint(0); m_multitext->WriteText( "Prepended. " ); + m_multitext->SetForegroundColour(*wxRED); + m_multitext->SetBackgroundColour(*wxLIGHT_GREY); #if wxUSE_TOOLTIPS m_multitext->SetToolTip("Press F1 here for statitics, F4 for capture and uncapture mouse."); @@ -595,9 +644,14 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_enter->SetClientData((void *)_T("enter")); m_textrich = new MyTextCtrl(this, -1, "Allows more than 30Kb of text\n" - "(even under broken Win9x)", + "(even under broken Win9x)\n" + "and a very very very very very " + "very very very long line to test" + "wxHSCROLL style", wxPoint(450, 10), wxSize(200, 230), - wxTE_RICH | wxTE_MULTILINE); + wxTE_RICH | wxTE_MULTILINE | wxHSCROLL); + m_textrich->SetForegroundColour(wxColour(0, 255, 255)); + m_textrich->SetBackgroundColour(*wxBLUE); } void MyPanel::OnSize( wxSizeEvent &event ) @@ -713,11 +767,11 @@ void MyPanel::DoMoveToEndOfEntry() //---------------------------------------------------------------------- BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(TEXT_QUIT, MyFrame::OnQuit) - EVT_MENU(TEXT_ABOUT, MyFrame::OnAbout) - EVT_MENU(TEXT_SAVE, MyFrame::OnFileSave) - EVT_MENU(TEXT_LOAD, MyFrame::OnFileLoad) - EVT_MENU(TEXT_CLEAR, MyFrame::OnLogClear) + EVT_MENU(TEXT_QUIT, MyFrame::OnQuit) + EVT_MENU(TEXT_ABOUT, MyFrame::OnAbout) + EVT_MENU(TEXT_SAVE, MyFrame::OnFileSave) + EVT_MENU(TEXT_LOAD, MyFrame::OnFileLoad) + EVT_MENU(TEXT_CLEAR_LOG,MyFrame::OnLogClear) #if wxUSE_TOOLTIPS EVT_MENU(TEXT_TOOLTIPS_SETDELAY, MyFrame::OnSetTooltipDelay) @@ -732,6 +786,10 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(TEXT_MOVE_ENDTEXT, MyFrame::OnMoveToEndOfText) EVT_MENU(TEXT_MOVE_ENDENTRY, MyFrame::OnMoveToEndOfEntry) + EVT_MENU(TEXT_SET_EDITABLE, MyFrame::OnSetEditable) + EVT_MENU(TEXT_SET_ENABLED, MyFrame::OnSetEnabled) + EVT_MENU(TEXT_CLEAR, MyFrame::OnClear) + EVT_IDLE(MyFrame::OnIdle) END_EVENT_TABLE() @@ -805,6 +863,38 @@ void MyFrame::OnLogClear(wxCommandEvent& WXUNUSED(event)) m_panel->m_log->Clear(); } +void MyFrame::OnSetEditable(wxCommandEvent& WXUNUSED(event)) +{ + static bool s_editable = TRUE; + + s_editable = !s_editable; + m_panel->m_text->SetEditable(s_editable); + m_panel->m_password->SetEditable(s_editable); + m_panel->m_multitext->SetEditable(s_editable); + m_panel->m_textrich->SetEditable(s_editable); +} + +void MyFrame::OnSetEnabled(wxCommandEvent& WXUNUSED(event)) +{ + bool enabled = m_panel->m_text->IsEnabled(); + enabled = !enabled; + + m_panel->m_text->Enable(enabled); + m_panel->m_password->Enable(enabled); + m_panel->m_multitext->Enable(enabled); + m_panel->m_readonly->Enable(enabled); + m_panel->m_textrich->Enable(enabled); +} + +void MyFrame::OnClear(wxCommandEvent& WXUNUSED(event)) +{ + m_panel->m_text->Clear(); + m_panel->m_password->Clear(); + m_panel->m_multitext->Clear(); + m_panel->m_readonly->Clear(); + m_panel->m_textrich->Clear(); +} + void MyFrame::OnFileSave(wxCommandEvent& event) { if ( m_panel->m_textrich->SaveFile("dummy.txt") ) diff --git a/samples/thread/ThreadVC.dsp b/samples/thread/ThreadVC.dsp new file mode 100644 index 0000000000..5662487792 --- /dev/null +++ b/samples/thread/ThreadVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ThreadVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ThreadVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ThreadVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ThreadVC.mak" CFG="ThreadVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ThreadVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ThreadVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ThreadVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ThreadVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ThreadVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/thread.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ThreadVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/thread.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ThreadVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/thread.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ThreadVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/thread.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ThreadVC - Win32 Release" +# Name "ThreadVC - Win32 Debug" +# Name "ThreadVC - Win32 Debug DLL" +# Name "ThreadVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\thread.cpp + +!IF "$(CFG)" == "ThreadVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ThreadVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ThreadVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ThreadVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\thread.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/thread/ThreadVC.dsw b/samples/thread/ThreadVC.dsw new file mode 100644 index 0000000000..5bc10ba49a --- /dev/null +++ b/samples/thread/ThreadVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ThreadVC"=.\ThreadVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/thread/makefile.g95 b/samples/thread/makefile.g95 index bc6829768c..76f6cae37f 100644 --- a/samples/thread/makefile.g95 +++ b/samples/thread/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=thread OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/thread/thread.cpp b/samples/thread/thread.cpp index d53bbca802..19a99c2d6c 100644 --- a/samples/thread/thread.cpp +++ b/samples/thread/thread.cpp @@ -14,11 +14,6 @@ messages - it will be more visual */ -#ifdef __GNUG__ - #pragma implementation "thread.cpp" - #pragma interface "thread.cpp" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" diff --git a/samples/toolbar/ToolbarVC.dsp b/samples/toolbar/ToolbarVC.dsp new file mode 100644 index 0000000000..42606410d9 --- /dev/null +++ b/samples/toolbar/ToolbarVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="ToolbarVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ToolbarVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ToolbarVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ToolbarVC.mak" CFG="ToolbarVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ToolbarVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ToolbarVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ToolbarVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ToolbarVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ToolbarVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/toolbar.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ToolbarVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/toolbar.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ToolbarVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/toolbar.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ToolbarVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/toolbar.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ToolbarVC - Win32 Release" +# Name "ToolbarVC - Win32 Debug" +# Name "ToolbarVC - Win32 Debug DLL" +# Name "ToolbarVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\toolbar.cpp + +!IF "$(CFG)" == "ToolbarVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ToolbarVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ToolbarVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ToolbarVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\toolbar.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/toolbar/ToolbarVC.dsw b/samples/toolbar/ToolbarVC.dsw new file mode 100644 index 0000000000..37a469560f --- /dev/null +++ b/samples/toolbar/ToolbarVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ToolbarVC"=.\ToolbarVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/toolbar/makefile.g95 b/samples/toolbar/makefile.g95 index 25bcc5b88a..75d00f416f 100644 --- a/samples/toolbar/makefile.g95 +++ b/samples/toolbar/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=toolbar OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index 2394247175..ce30338920 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -35,6 +35,13 @@ // define this to 1 to use wxToolBarSimple instead of the native one #define USE_GENERIC_TBAR 0 +// define this to use XPMs everywhere (by default, BMPs are used under Win) +#ifdef __WXMSW__ + #define USE_XPM_BITMAPS 0 +#else + #define USE_XPM_BITMAPS 1 +#endif + #if USE_GENERIC_TBAR #if !wxUSE_TOOLBAR_SIMPLE #error wxToolBarSimple is not compiled in, set wxUSE_TOOLBAR_SIMPLE \ @@ -44,11 +51,15 @@ #endif #endif // USE_GENERIC_TBAR +#if USE_XPM_BITMAPS && defined(__WXMSW__) && !wxUSE_XPM_IN_MSW + #error You need to enable XPM support to use XPM bitmaps with toolbar! +#endif // USE_XPM_BITMAPS + // ---------------------------------------------------------------------------- // resources // ---------------------------------------------------------------------------- -#if defined(__WXGTK__) || defined(__WXMOTIF__) +#if USE_XPM_BITMAPS #include "mondrian.xpm" #include "bitmaps/new.xpm" #include "bitmaps/open.xpm" @@ -58,7 +69,7 @@ #include "bitmaps/preview.xpm" // paste XPM #include "bitmaps/print.xpm" #include "bitmaps/help.xpm" -#endif // GTK or Motif +#endif // USE_XPM_BITMAPS // ---------------------------------------------------------------------------- // classes @@ -87,6 +98,10 @@ public: void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); + void OnSize(wxSizeEvent& event); + + void OnToggleAnotherToolbar(wxCommandEvent& event); + void OnToggleToolbarSize(wxCommandEvent& event); void OnToggleToolbarOrient(wxCommandEvent& event); void OnToggleToolbarRows(wxCommandEvent& event); @@ -116,11 +131,15 @@ private: void DoDeletePrint(); void DoToggleHelp(); + void LayoutChildren(); + bool m_smallToolbar, m_horzToolbar; size_t m_rows; // 1 or 2 only - wxTextCtrl* m_textWindow; + wxTextCtrl *m_textWindow; + + wxToolBar *m_tbar; DECLARE_EVENT_TABLE() }; @@ -141,6 +160,7 @@ enum IDM_TOOLBAR_INSERTPRINT, IDM_TOOLBAR_TOGGLEHELP, IDM_TOOLBAR_TOGGLEFULLSCREEN, + IDM_TOOLBAR_TOGGLE_ANOTHER_TOOLBAR, ID_COMBO = 1000 }; @@ -153,9 +173,13 @@ enum // help button. BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_SIZE(MyFrame::OnSize) + EVT_MENU(wxID_EXIT, MyFrame::OnQuit) EVT_MENU(wxID_HELP, MyFrame::OnAbout) + EVT_MENU(IDM_TOOLBAR_TOGGLE_ANOTHER_TOOLBAR, MyFrame::OnToggleAnotherToolbar) + EVT_MENU(IDM_TOOLBAR_TOGGLETOOLBARSIZE, MyFrame::OnToggleToolbarSize) EVT_MENU(IDM_TOOLBAR_TOGGLETOOLBARORIENT, MyFrame::OnToggleToolbarOrient) EVT_MENU(IDM_TOOLBAR_TOGGLETOOLBARROWS, MyFrame::OnToggleToolbarRows) @@ -221,6 +245,16 @@ void MyFrame::RecreateToolbar() // Set up toolbar wxBitmap toolBarBitmaps[8]; +#if USE_XPM_BITMAPS + toolBarBitmaps[0] = wxBitmap(new_xpm); + toolBarBitmaps[1] = wxBitmap(open_xpm); + toolBarBitmaps[2] = wxBitmap(save_xpm); + toolBarBitmaps[3] = wxBitmap(copy_xpm); + toolBarBitmaps[4] = wxBitmap(cut_xpm); + toolBarBitmaps[5] = wxBitmap(paste_xpm); + toolBarBitmaps[6] = wxBitmap(print_xpm); + toolBarBitmaps[7] = wxBitmap(help_xpm); +#else // !USE_XPM_BITMAPS toolBarBitmaps[0] = wxBITMAP(new); toolBarBitmaps[1] = wxBITMAP(open); toolBarBitmaps[2] = wxBITMAP(save); @@ -229,6 +263,7 @@ void MyFrame::RecreateToolbar() toolBarBitmaps[5] = wxBITMAP(paste); toolBarBitmaps[6] = wxBITMAP(print); toolBarBitmaps[7] = wxBITMAP(help); +#endif // USE_XPM_BITMAPS/!USE_XPM_BITMAPS if ( !m_smallToolbar ) { @@ -304,6 +339,7 @@ MyFrame::MyFrame(wxFrame* parent, long style) : wxFrame(parent, id, title, pos, size, style) { + m_tbar = NULL; m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE); m_smallToolbar = TRUE; @@ -318,6 +354,11 @@ MyFrame::MyFrame(wxFrame* parent, // Make a menubar wxMenu *tbarMenu = new wxMenu; + tbarMenu->Append(IDM_TOOLBAR_TOGGLE_ANOTHER_TOOLBAR, + "Toggle &another toolbar\tCtrl-A", + "Show/hide another test toolbar", + TRUE); + tbarMenu->Append(IDM_TOOLBAR_TOGGLETOOLBARSIZE, "&Toggle toolbar size\tCtrl-S", "Toggle between big/small toolbar", @@ -375,6 +416,61 @@ wxToolBar* MyFrame::OnCreateToolBar(long style, #endif // USE_GENERIC_TBAR +void MyFrame::LayoutChildren() +{ + wxSize size = GetClientSize(); + + int offset; + if ( m_tbar ) + { + m_tbar->SetSize(-1, size.y); + m_tbar->Move(0, 0); + + offset = m_tbar->GetSize().x; + } + else + { + offset = 0; + } + + m_textWindow->SetSize(offset, 0, size.x - offset, size.y); +} + +void MyFrame::OnSize(wxSizeEvent& event) +{ + if ( m_tbar ) + { + LayoutChildren(); + } + else + { + event.Skip(); + } +} + +void MyFrame::OnToggleAnotherToolbar(wxCommandEvent& WXUNUSED(event)) +{ + if ( m_tbar ) + { + delete m_tbar; + m_tbar = NULL; + } + else + { + m_tbar = new wxToolBar(this, -1, + wxDefaultPosition, wxDefaultSize, + wxTB_VERTICAL); + m_tbar->AddTool(wxID_HELP, wxBITMAP(help), + wxNullBitmap, FALSE, + NULL, + "This is the help button", + "This is the long help for the help button"); + m_tbar->Realize(); + } + + LayoutChildren(); +} + void MyFrame::OnToggleToolbarSize(wxCommandEvent& WXUNUSED(event)) { m_smallToolbar = !m_smallToolbar; diff --git a/samples/treectrl/TreectrlVC.dsp b/samples/treectrl/TreectrlVC.dsp new file mode 100644 index 0000000000..51862e1220 --- /dev/null +++ b/samples/treectrl/TreectrlVC.dsp @@ -0,0 +1,197 @@ +# Microsoft Developer Studio Project File - Name="TreectrlVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TreectrlVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TreectrlVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TreectrlVC.mak" CFG="TreectrlVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TreectrlVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TreectrlVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TreectrlVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "TreectrlVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TreectrlVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/treetest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/treetest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/treetest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/treetest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "TreectrlVC - Win32 Release" +# Name "TreectrlVC - Win32 Debug" +# Name "TreectrlVC - Win32 Debug DLL" +# Name "TreectrlVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\treectrl.cpp + +!IF "$(CFG)" == "TreectrlVC - Win32 Release" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\treectrl.h +# End Source File +# Begin Source File + +SOURCE=.\treectrl.rc + +!IF "$(CFG)" == "TreectrlVC - Win32 Release" + +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug" + +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 /i "../../include" /i "../../contrib/include" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Debug DLL" + +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" + +!ELSEIF "$(CFG)" == "TreectrlVC - Win32 Release DLL" + +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/samples/treectrl/TreectrlVC.dsw b/samples/treectrl/TreectrlVC.dsw new file mode 100644 index 0000000000..c0515aaca2 --- /dev/null +++ b/samples/treectrl/TreectrlVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TreectrlVC"=.\TreectrlVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/treectrl/makefile.g95 b/samples/treectrl/makefile.g95 index 431577814b..dac77c45d0 100644 --- a/samples/treectrl/makefile.g95 +++ b/samples/treectrl/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=treectrl OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/treectrl/treectrl.cpp b/samples/treectrl/treectrl.cpp index 15a8cb2a6d..0ae0d46847 100644 --- a/samples/treectrl/treectrl.cpp +++ b/samples/treectrl/treectrl.cpp @@ -9,9 +9,12 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +// important: the #pragma argument must be different from treectrl.cpp, +// otherwise gcc gets confused (as there is also treectrl.cpp in the library +// which has identical #pragma) and the sample crashes on startup! #ifdef __GNUG__ - #pragma implementation - #pragma interface + #pragma interface "treetest.cpp" + #pragma implementation "treetest.cpp" #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -428,7 +431,18 @@ void MyFrame::OnSetImageSize(wxCommandEvent& event) void MyFrame::OnToggleImages(wxCommandEvent& event) { - wxGetApp().SetShowImages(!wxGetApp().ShowImages()); + if ( wxGetApp().ShowImages() ) + { + m_treeCtrl->CreateImageList(-1); + + wxGetApp().SetShowImages(FALSE); + } + else + { + m_treeCtrl->CreateImageList(); + + wxGetApp().SetShowImages(TRUE); + } OnRecreate(event); } @@ -522,42 +536,42 @@ void MyTreeCtrl::CreateImageList(int size) if ( size == -1 ) { m_imageListNormal = NULL; - - return; } - - // Make an image list containing small icons - m_imageListNormal = new wxImageList(size, size, TRUE); - - // should correspond to TreeCtrlIcon_xxx enum -#if defined(__WXMSW__) && defined(__WIN16__) - m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE)); - m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE)); - m_imageListNormal->Add(wxBitmap("bitmap3", wxBITMAP_TYPE_BMP_RESOURCE)); - m_imageListNormal->Add(wxBitmap("bitmap4", wxBITMAP_TYPE_BMP_RESOURCE)); - m_imageListNormal->Add(wxBitmap("bitmap5", wxBITMAP_TYPE_BMP_RESOURCE)); -#else - wxIcon icons[5]; - icons[0] = wxICON(icon1); - icons[1] = wxICON(icon2); - icons[2] = wxICON(icon3); - icons[3] = wxICON(icon4); - icons[4] = wxICON(icon5); - - int sizeOrig = icons[0].GetWidth(); - for ( size_t i = 0; i < WXSIZEOF(icons); i++ ) + else { - if ( size == sizeOrig ) + // Make an image list containing small icons + m_imageListNormal = new wxImageList(size, size, TRUE); + + // should correspond to TreeCtrlIcon_xxx enum +#if defined(__WXMSW__) && defined(__WIN16__) + m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE)); + m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE)); + m_imageListNormal->Add(wxBitmap("bitmap3", wxBITMAP_TYPE_BMP_RESOURCE)); + m_imageListNormal->Add(wxBitmap("bitmap4", wxBITMAP_TYPE_BMP_RESOURCE)); + m_imageListNormal->Add(wxBitmap("bitmap5", wxBITMAP_TYPE_BMP_RESOURCE)); +#else // !MSW + wxIcon icons[5]; + icons[0] = wxICON(icon1); + icons[1] = wxICON(icon2); + icons[2] = wxICON(icon3); + icons[3] = wxICON(icon4); + icons[4] = wxICON(icon5); + + int sizeOrig = icons[0].GetWidth(); + for ( size_t i = 0; i < WXSIZEOF(icons); i++ ) { - m_imageListNormal->Add(icons[i]); - } - else - { - m_imageListNormal->Add(wxImage(icons[i]).Rescale(size, size). - ConvertToBitmap()); + if ( size == sizeOrig ) + { + m_imageListNormal->Add(icons[i]); + } + else + { + m_imageListNormal->Add(wxImage(icons[i]).Rescale(size, size). + ConvertToBitmap()); + } } +#endif // MSW/!MSW } -#endif SetImageList(m_imageListNormal); } diff --git a/samples/treelay/TreelayVC.dsp b/samples/treelay/TreelayVC.dsp new file mode 100644 index 0000000000..b8f818897e --- /dev/null +++ b/samples/treelay/TreelayVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="TreelayVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TreelayVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TreelayVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TreelayVC.mak" CFG="TreelayVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TreelayVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TreelayVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TreelayVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "TreelayVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TreelayVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/treelay.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TreelayVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/treelay.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TreelayVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/treelay.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TreelayVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/treelay.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "TreelayVC - Win32 Release" +# Name "TreelayVC - Win32 Debug" +# Name "TreelayVC - Win32 Debug DLL" +# Name "TreelayVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\treelay.cpp + +!IF "$(CFG)" == "TreelayVC - Win32 Release" + +!ELSEIF "$(CFG)" == "TreelayVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TreelayVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TreelayVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\treelay.h +# End Source File +# Begin Source File + +SOURCE=.\treelay.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/treelay/TreelayVC.dsw b/samples/treelay/TreelayVC.dsw new file mode 100644 index 0000000000..df96e47df8 --- /dev/null +++ b/samples/treelay/TreelayVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TreelayVC"=.\TreelayVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/treelay/makefile.g95 b/samples/treelay/makefile.g95 index f4c08f1b0c..f31905199d 100644 --- a/samples/treelay/makefile.g95 +++ b/samples/treelay/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=treelay OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/typetest/TypetestVC.dsp b/samples/typetest/TypetestVC.dsp new file mode 100644 index 0000000000..a9d71660b9 --- /dev/null +++ b/samples/typetest/TypetestVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="TypetestVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=TypetestVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TypetestVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TypetestVC.mak" CFG="TypetestVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TypetestVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "TypetestVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "TypetestVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "TypetestVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TypetestVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/typetest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TypetestVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/typetest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TypetestVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/typetest.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "TypetestVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/typetest.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "TypetestVC - Win32 Release" +# Name "TypetestVC - Win32 Debug" +# Name "TypetestVC - Win32 Debug DLL" +# Name "TypetestVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\typetest.cpp + +!IF "$(CFG)" == "TypetestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "TypetestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TypetestVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "TypetestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\typetest.h +# End Source File +# Begin Source File + +SOURCE=.\typetest.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/typetest/TypetestVC.dsw b/samples/typetest/TypetestVC.dsw new file mode 100644 index 0000000000..ed2739bf41 --- /dev/null +++ b/samples/typetest/TypetestVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TypetestVC"=.\TypetestVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/typetest/makefile.g95 b/samples/typetest/makefile.g95 index 1fa426f499..5ec0fa7169 100644 --- a/samples/typetest/makefile.g95 +++ b/samples/typetest/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=typetest OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/typetest/typetest.cpp b/samples/typetest/typetest.cpp index fd0c99b1e9..26cf4051df 100644 --- a/samples/typetest/typetest.cpp +++ b/samples/typetest/typetest.cpp @@ -46,6 +46,7 @@ #include "wx/wfstream.h" #include "wx/datstrm.h" #include "wx/txtstrm.h" +#include "wx/mstream.h" // Create a new application object IMPLEMENT_APP (MyApp) @@ -64,6 +65,7 @@ BEGIN_EVENT_TABLE(MyApp, wxApp) EVT_MENU(TYPES_STREAM2, MyApp::DoStreamDemo2) EVT_MENU(TYPES_STREAM3, MyApp::DoStreamDemo3) EVT_MENU(TYPES_STREAM4, MyApp::DoStreamDemo4) + EVT_MENU(TYPES_STREAM5, MyApp::DoStreamDemo5) EVT_MENU(TYPES_MIME, MyApp::DoMIMEDemo) END_EVENT_TABLE() @@ -95,6 +97,7 @@ bool MyApp::OnInit() test_menu->Append(TYPES_STREAM2, "&Stream seek test"); test_menu->Append(TYPES_STREAM3, "&Stream error test"); test_menu->Append(TYPES_STREAM4, "&Stream buffer test"); + test_menu->Append(TYPES_STREAM5, "&Stream peek test"); test_menu->AppendSeparator(); test_menu->Append(TYPES_MIME, "&MIME database test"); @@ -157,7 +160,7 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event)) textCtrl.WriteText( tmp ); text_output << str << "\n"; std_file_output << str.c_str() << "\n"; - + textCtrl.WriteText( "\nReading from ifstream:\n" ); ifstream std_file_input( "test_std.dat" ); @@ -178,10 +181,11 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event)) tmp.Printf( _T("Float: %f\n"), f ); textCtrl.WriteText( tmp ); - // This doesn't compile (at least with VC++ 4) + // Why doesn't this work? #if 0 - std_file_input >> str; - tmp.Printf( _T("String: %s\n"), str.c_str() ); + char std_buf[200]; + std_file_input >> std_buf; + tmp.Printf( _T("String: %s\n"), std_buf ); textCtrl.WriteText( tmp ); #endif @@ -214,6 +218,7 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event)) textCtrl.WriteText( tmp ); + textCtrl << "\nTest for wxDataStream:\n\n"; textCtrl.WriteText( "Writing to wxDataOutputStream:\n" ); @@ -286,7 +291,7 @@ void MyApp::DoStreamDemo2(wxCommandEvent& WXUNUSED(event)) for (ch2 = 0; ch2 < 10; ch2++) { file_input.Read( &ch, 1 ); - textCtrl.WriteText( (char)(ch + '0') ); + textCtrl.WriteText( (char)(ch + '0') ); } textCtrl.WriteText( "\n\n\n" ); @@ -306,7 +311,7 @@ void MyApp::DoStreamDemo2(wxCommandEvent& WXUNUSED(event)) for (ch2 = 0; ch2 < 10; ch2++) { file_input2.Read( &ch, 1 ); - textCtrl.WriteText( (char)(ch + '0') ); + textCtrl.WriteText( (char)(ch + '0') ); } textCtrl.WriteText( "\n\n\n" ); @@ -325,7 +330,7 @@ void MyApp::DoStreamDemo2(wxCommandEvent& WXUNUSED(event)) for (ch2 = 0; ch2 < 10; ch2++) { buf_input3.Read( &ch, 1 ); - textCtrl.WriteText( (char)(ch + '0') ); + textCtrl.WriteText( (char)(ch + '0') ); } for (int j = 0; j < 2000; j++) buf_input3.Read( &ch, 1 ); @@ -360,17 +365,17 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) for (ch2 = 0; ch2 < 11; ch2++) { file_input.Read( &ch, 1 ); - textCtrl.WriteText( "Value read: " ); - textCtrl.WriteText( (char)(ch + '0') ); - textCtrl.WriteText( "; stream.LastError() returns: " ); - switch (file_input.LastError()) - { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; - } + textCtrl.WriteText( "Value read: " ); + textCtrl.WriteText( (char)(ch + '0') ); + textCtrl.WriteText( "; stream.LastError() returns: " ); + switch (file_input.LastError()) + { + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; + } } textCtrl.WriteText( "\n" ); @@ -378,11 +383,11 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) file_input.SeekI( 0 ); switch (file_input.LastError()) { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } textCtrl.WriteText( "\n" ); @@ -392,11 +397,11 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) textCtrl.WriteText( "; stream.LastError() returns: " ); switch (file_input.LastError()) { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } textCtrl.WriteText( "\n\n" ); @@ -409,17 +414,17 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) for (ch2 = 0; ch2 < 11; ch2++) { ffile_input.Read( &ch, 1 ); - textCtrl.WriteText( "Value read: " ); - textCtrl.WriteText( (char)(ch + '0') ); - textCtrl.WriteText( "; stream.LastError() returns: " ); - switch (ffile_input.LastError()) - { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; - } + textCtrl.WriteText( "Value read: " ); + textCtrl.WriteText( (char)(ch + '0') ); + textCtrl.WriteText( "; stream.LastError() returns: " ); + switch (ffile_input.LastError()) + { + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; + } } textCtrl.WriteText( "\n" ); @@ -427,11 +432,11 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) ffile_input.SeekI( 0 ); switch (ffile_input.LastError()) { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } textCtrl.WriteText( "\n" ); @@ -441,11 +446,11 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) textCtrl.WriteText( "; stream.LastError() returns: " ); switch (ffile_input.LastError()) { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } textCtrl.WriteText( "\n\n" ); @@ -458,17 +463,17 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) for (ch2 = 0; ch2 < 11; ch2++) { buf_input.Read( &ch, 1 ); - textCtrl.WriteText( "Value read: " ); - textCtrl.WriteText( (char)(ch + '0') ); - textCtrl.WriteText( "; stream.LastError() returns: " ); - switch (buf_input.LastError()) - { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; - } + textCtrl.WriteText( "Value read: " ); + textCtrl.WriteText( (char)(ch + '0') ); + textCtrl.WriteText( "; stream.LastError() returns: " ); + switch (buf_input.LastError()) + { + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; + } } textCtrl.WriteText( "\n" ); @@ -476,11 +481,11 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) buf_input.SeekI( 0 ); switch (buf_input.LastError()) { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } textCtrl.WriteText( "\n" ); @@ -490,11 +495,11 @@ void MyApp::DoStreamDemo3(wxCommandEvent& WXUNUSED(event)) textCtrl.WriteText( "; stream.LastError() returns: " ); switch (buf_input.LastError()) { - case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } } @@ -526,10 +531,10 @@ void MyApp::DoStreamDemo4(wxCommandEvent& WXUNUSED(event)) switch (buf_input.LastError()) { case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } msg.Printf( "wxBufferedInputStream.LastRead() returns: %d\n", (int)buf_input.LastRead() ); textCtrl.WriteText( msg ); @@ -546,10 +551,10 @@ void MyApp::DoStreamDemo4(wxCommandEvent& WXUNUSED(event)) switch (buf_input.LastError()) { case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } msg.Printf( "wxBufferedInputStream.LastRead() returns: %d\n", (int)buf_input.LastRead() ); textCtrl.WriteText( msg ); @@ -568,10 +573,10 @@ void MyApp::DoStreamDemo4(wxCommandEvent& WXUNUSED(event)) switch (buf_input.LastError()) { case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } msg.Printf( "wxBufferedInputStream.LastRead() returns: %d\n", (int)buf_input.LastRead() ); textCtrl.WriteText( msg ); @@ -587,10 +592,10 @@ void MyApp::DoStreamDemo4(wxCommandEvent& WXUNUSED(event)) switch (buf_input.LastError()) { case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } msg.Printf( "wxBufferedInputStream.LastRead() returns: %d\n", (int)buf_input.LastRead() ); textCtrl.WriteText( msg ); @@ -606,10 +611,10 @@ void MyApp::DoStreamDemo4(wxCommandEvent& WXUNUSED(event)) switch (buf_input.LastError()) { case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } msg.Printf( "wxBufferedInputStream.LastRead() returns: %d\n", (int)buf_input.LastRead() ); textCtrl.WriteText( msg ); @@ -625,10 +630,10 @@ void MyApp::DoStreamDemo4(wxCommandEvent& WXUNUSED(event)) switch (buf_input.LastError()) { case wxSTREAM_NOERROR: textCtrl.WriteText( "wxSTREAM_NOERROR\n" ); break; - case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; - case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; - case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; - default: textCtrl.WriteText( "Huh?\n" ); break; + case wxSTREAM_EOF: textCtrl.WriteText( "wxSTREAM_EOF\n" ); break; + case wxSTREAM_READ_ERROR: textCtrl.WriteText( "wxSTREAM_READ_ERROR\n" ); break; + case wxSTREAM_WRITE_ERROR: textCtrl.WriteText( "wxSTREAM_WRITE_ERROR\n" ); break; + default: textCtrl.WriteText( "Huh?\n" ); break; } msg.Printf( "wxBufferedInputStream.LastRead() returns: %d\n", (int)buf_input.LastRead() ); textCtrl.WriteText( msg ); @@ -637,6 +642,81 @@ void MyApp::DoStreamDemo4(wxCommandEvent& WXUNUSED(event)) textCtrl.WriteText( "\n\n" ); } +void MyApp::DoStreamDemo5(wxCommandEvent& WXUNUSED(event)) +{ + wxTextCtrl& textCtrl = * GetTextCtrl(); + + textCtrl.Clear(); + textCtrl << "\nTesting wxFileInputStream's Peek():\n\n"; + + char ch; + wxString str; + + textCtrl.WriteText( "Writing number 0 to 9 to wxFileOutputStream:\n\n" ); + + wxFileOutputStream file_output( wxString("test_wx.dat") ); + for (ch = 0; ch < 10; ch++) + file_output.Write( &ch, 1 ); + + file_output.Sync(); + + wxFileInputStream file_input( wxString("test_wx.dat") ); + + ch = file_input.Peek(); + str.Printf( "First char peeked: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = file_input.GetC(); + str.Printf( "First char read: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = file_input.Peek(); + str.Printf( "Second char peeked: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = file_input.GetC(); + str.Printf( "Second char read: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = file_input.Peek(); + str.Printf( "Third char peeked: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = file_input.GetC(); + str.Printf( "Third char read: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + + textCtrl << "\n\n\nTesting wxMemoryInputStream's Peek():\n\n"; + + char buf[] = { 0,1,2,3,4,5,6,7,8,9,10 }; + wxMemoryInputStream input( buf, 10 ); + + ch = input.Peek(); + str.Printf( "First char peeked: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = input.GetC(); + str.Printf( "First char read: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = input.Peek(); + str.Printf( "Second char peeked: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = input.GetC(); + str.Printf( "Second char read: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = input.Peek(); + str.Printf( "Third char peeked: %d\n", (int) ch ); + textCtrl.WriteText( str ); + + ch = input.GetC(); + str.Printf( "Third char read: %d\n", (int) ch ); + textCtrl.WriteText( str ); +} + #if wxUSE_UNICODE void MyApp::DoUnicodeDemo(wxCommandEvent& WXUNUSED(event)) { diff --git a/samples/typetest/typetest.h b/samples/typetest/typetest.h index 481b26ff34..90c4e153bb 100644 --- a/samples/typetest/typetest.h +++ b/samples/typetest/typetest.h @@ -33,6 +33,7 @@ public: void DoStreamDemo2(wxCommandEvent& event); void DoStreamDemo3(wxCommandEvent& event); void DoStreamDemo4(wxCommandEvent& event); + void DoStreamDemo5(wxCommandEvent& event); #if wxUSE_UNICODE void DoUnicodeDemo(wxCommandEvent& event); #endif @@ -80,6 +81,7 @@ enum TYPES_STREAM2, TYPES_STREAM3, TYPES_STREAM4, + TYPES_STREAM5, TYPES_MIME }; diff --git a/samples/validate/ValidateVC.dsp b/samples/validate/ValidateVC.dsp new file mode 100644 index 0000000000..2a5ad8b88c --- /dev/null +++ b/samples/validate/ValidateVC.dsp @@ -0,0 +1,179 @@ +# Microsoft Developer Studio Project File - Name="ValidateVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=ValidateVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ValidateVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ValidateVC.mak" CFG="ValidateVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ValidateVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "ValidateVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "ValidateVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "ValidateVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ValidateVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/validate.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ValidateVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/validate.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ValidateVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/validate.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "ValidateVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/validate.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "ValidateVC - Win32 Release" +# Name "ValidateVC - Win32 Debug" +# Name "ValidateVC - Win32 Debug DLL" +# Name "ValidateVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\validate.cpp + +!IF "$(CFG)" == "ValidateVC - Win32 Release" + +!ELSEIF "$(CFG)" == "ValidateVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ValidateVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "ValidateVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\validate.h +# End Source File +# Begin Source File + +SOURCE=.\validate.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/samples/validate/ValidateVC.dsw b/samples/validate/ValidateVC.dsw new file mode 100644 index 0000000000..f98fa0b4d2 --- /dev/null +++ b/samples/validate/ValidateVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ValidateVC"=.\ValidateVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/validate/makefile.g95 b/samples/validate/makefile.g95 index 0b00e7e4f0..d9e8c085ba 100644 --- a/samples/validate/makefile.g95 +++ b/samples/validate/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=validate OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/wizard/WizardVC.dsp b/samples/wizard/WizardVC.dsp new file mode 100644 index 0000000000..24529efe22 --- /dev/null +++ b/samples/wizard/WizardVC.dsp @@ -0,0 +1,174 @@ +# Microsoft Developer Studio Project File - Name="WizardVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=WizardVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "WizardVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "WizardVC.mak" CFG="WizardVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "WizardVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "WizardVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "WizardVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "WizardVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "WizardVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wizard.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "WizardVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/wizard.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "WizardVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wizardexe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "WizardVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wizard.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "WizardVC - Win32 Release" +# Name "WizardVC - Win32 Debug" +# Name "WizardVC - Win32 Debug DLL" +# Name "WizardVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\wizard.cpp + +!IF "$(CFG)" == "WizardVC - Win32 Release" + +!ELSEIF "$(CFG)" == "WizardVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "WizardVC - Win32 Debug DLL" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "WizardVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wizard.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" +# End Source File +# End Target +# End Project diff --git a/samples/wizard/WizardVC.dsw b/samples/wizard/WizardVC.dsw new file mode 100644 index 0000000000..7c0ae14eb8 --- /dev/null +++ b/samples/wizard/WizardVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "WizardVC"=.\WizardVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/samples/wizard/makefile.g95 b/samples/wizard/makefile.g95 index 2cee3f0c2f..08d6e90f0f 100644 --- a/samples/wizard/makefile.g95 +++ b/samples/wizard/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=wizard OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/samples/wizard/wizard.cpp b/samples/wizard/wizard.cpp index 52cd493983..c405271857 100644 --- a/samples/wizard/wizard.cpp +++ b/samples/wizard/wizard.cpp @@ -319,12 +319,12 @@ void MyFrame::OnRunWizard(wxCommandEvent& WXUNUSED(event)) // a wizard page may be either an object of predefined class wxWizardPageSimple *page1 = new wxWizardPageSimple(wizard); - (void)new wxStaticText(page1, -1, - "This wizard doesn't help you to do anything at " - "all.\n" - "\n" - "The next pages will present you with more useless " - "controls."); + wxStaticText *text = new wxStaticText(page1, -1, + "This wizard doesn't help you to do anything at all.\n" + "\n" + "The next pages will present you with more useless controls." + ); + wxSize size = text->GetBestSize(); // ... or a derived class wxRadioboxPage *page3 = new wxRadioboxPage(wizard); @@ -340,6 +340,7 @@ void MyFrame::OnRunWizard(wxCommandEvent& WXUNUSED(event)) page1->SetNext(page2); page3->SetPrev(page2); + wizard->SetPageSize(size); if ( wizard->RunWizard(page1) ) { wxMessageBox("The wizard successfully completed", "That's all", diff --git a/setup.h.in b/setup.h.in index 527664b360..44728fd17b 100644 --- a/setup.h.in +++ b/setup.h.in @@ -61,6 +61,9 @@ /* Define this if your version of GTK+ is greater than 1.2 */ #undef __WXGTK12__ +/* Define this if your version of GTK+ is greater than 1.2.7 */ +#undef __WXGTK127__ + /* Define this if your version of GTK+ is greater than 1.3 */ #undef __WXGTK13__ @@ -80,22 +83,30 @@ #undef __SOLARIS__ #undef __SUNOS__ #undef __ALPHA__ +#undef __IA64__ #undef __OSF__ #undef __BSD__ #undef __FREEBSD__ +#undef __DARWIN__ +#undef __NETBSD__ #undef __VMS__ #undef __ULTRIX__ #undef __DATA_GENERAL__ #undef __EMX__ #undef _GNU_SOURCE +/* PowerPC Darwin & Mac OS X */ +#undef __POWERPC__ + /* Stupid hack; __WINDOWS__ clashes with wx/defs.h */ #ifndef __WINDOWS__ #undef __WINDOWS__ #endif #undef __WIN95__ +#ifndef __WIN32__ #undef __WIN32__ +#endif #undef __GNUWIN32__ #undef STRICT #undef WINVER @@ -138,6 +149,7 @@ */ #define wxUSE_ODBC 0 #define wxODBC_FWD_ONLY_CURSORS 1 +#define wxODBC_BACKWARD_COMPATABILITY 0 /* * Use Threads */ @@ -345,6 +357,11 @@ #endif #endif +/* + * Use wxTreeLayout class + */ +#define wxUSE_TREELAYOUT 0 + /* * Use this control */ @@ -425,20 +442,15 @@ #define wxUSE_POSTSCRIPT 0 /* - * Compile wxString with some Unicode support? + * Compile wxString with some Unicode (wide character) support? */ #define wxUSE_WCHAR_T 0 /* - * Compile wxString in wide character (Unicode) mode? + * Compile wxWindows in Unicode mode (Win32 only for now)? */ #define wxUSE_UNICODE 0 -/* - * Compile wxString with (limited) multibyte char support? - */ -#define wxUSE_MULTIBYTE 0 - /* * Work around a bug in GNU libc 5.x wcstombs() implementation. * @@ -567,6 +579,7 @@ * Support for metafiles */ #define wxUSE_METAFILE 0 +#define wxUSE_ENH_METAFILE 0 /* * wxMiniFrame @@ -633,6 +646,9 @@ /* The type of 3rd argument to getsockname() - usually size_t or int */ #undef SOCKLEN_T +/* The signal handler prototype */ +#undef wxTYPE_SA_HANDLER + /* gettimeofday() usually takes 2 arguments, but some really old systems might * have only one, in which case define WX_GETTIMEOFDAY_NO_TZ */ #undef WX_GETTIMEOFDAY_NO_TZ @@ -715,9 +731,18 @@ /* The number of bytes in a short. */ #undef SIZEOF_SHORT +/* Define if size_t on your machine is the same type as unsigned int. */ +#undef wxSIZE_T_IS_UINT + +/* Define if size_t on your machine is the same type as unsigned long. */ +#undef wxSIZE_T_IS_ULONG + /* Define if you have the dlopen function. */ #undef HAVE_DLOPEN +/* Define if you have the dlerror function. */ +#undef HAVE_DLERROR + /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME diff --git a/setup.h_vms b/setup.h_vms index 20faff8f5f..ecda510f73 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -70,6 +70,9 @@ /* Define this if your version of GTK+ is greater than 1.2 */ #define __WXGTK12__ 1 +/* Define this if your version of GTK+ is greater than 1.2.7 */ +#define __WXGTK127__ 1 + /* Define this if your version of GTK+ is greater than 1.3 */ #undef __WXGTK13__ @@ -138,6 +141,7 @@ */ #define wxUSE_ODBC 0 #define wxODBC_FWD_ONLY_CURSORS 1 +#define wxODBC_BACKWARD_COMPATABILITY 0 /* * Use Threads */ diff --git a/src/Wxwindll.icc b/src/Wxwindll.icc index 9474d9d524..b7ada619e5 100644 --- a/src/Wxwindll.icc +++ b/src/Wxwindll.icc @@ -9,7 +9,7 @@ option ProjectOptions = lang(longlong, "yes"), gen(manglelinkagekeywordonlyfunc link(defaultlibsname, "..\\lib\\os2xpm.lib"), link(defaultlibsname, "..\\lib\\os2jpeg.lib"), link(defaultlibsname, "..\\lib\\os2zlib.lib"), - link(defaultlibsname, "..\\lib\\os2tifd.lib"), + link(defaultlibsname, "..\\lib\\os2tiff.lib"), link(defaultlibsname, "NETAPI32.LIB"), link(defaultlibsname, "UPM32.LIB"), link(defaultlibsname, "TCP32DLL.LIB"), @@ -32,6 +32,8 @@ option ProjectOptions = lang(longlong, "yes"), gen(manglelinkagekeywordonlyfunc { run before '-mkdir ' '..\\src\\common\\dbgos240dll' run before '-mkdir ' '..\\samples\\minimal\\dbgos240dll' + run before 'copy ' '..\\src\common\\dosyacc.c ' '..\\src\\common\\y_tab.c' + run before 'copy ' '..\\src\common\\doslex.c ' '..\\src\\common\\lex_yy.c' } target type("dll") "..\\lib\\Wxwindll.dll" { @@ -284,6 +286,6 @@ option ProjectOptions = lang(longlong, "yes"), gen(manglelinkagekeywordonlyfunc target "..\\samples\\minimal\\dbgos240dll\\Minimal.exe" { source type(cpp) "..\\SAMPLES\\MINIMAL\\MINIMAL.CPP" - source type(rc) "..\\SAMPLES\\MINIMAL\\MINIMAL.RCO" + source type(rc) "..\\SAMPLES\\MINIMAL\\MINIMAL.RC4" } } diff --git a/src/common/base.rc b/src/common/base.rc new file mode 100644 index 0000000000..1fdf32aa0b --- /dev/null +++ b/src/common/base.rc @@ -0,0 +1,49 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/base/base.rc +// Purpose: contains version info resource for wxBase DLL build +// Author: Vadim Zeitlin +// Modified by: +// Created: 09.07.00 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/version.h" + +#ifdef _DEBUG + #define DLL_FLAGS 0x1L + #define DLL_SUFFIX "d" +#else + #define DLL_FLAGS 0x0L + #define DLL_SUFFIX "" +#endif + +1 VERSIONINFO + FILEVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER + PRODUCTVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER + FILEFLAGSMASK 0x3fL + FILEFLAGS DLL_FLAGS + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "wxBase (part of Windows) cross-platform framework\0" + VALUE "CompanyName", "wxWindows development team\0" + VALUE "FileDescription", "wxBase is a non GUI part of wxWindows\0" + VALUE "FileVersion", "2.2.1\0" + VALUE "InternalName", "wxBase\0" + VALUE "LegalCopyright", "Copyright © 1993, 2000 wxWindows development team\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "wxbase221" DLL_SUFFIX ".dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "wxWindows\0" + VALUE "ProductVersion", "2.2.1\0" + VALUE "SpecialBuild", "\0" + END + END +END diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 40700df5af..79623411c0 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -155,7 +155,7 @@ struct wxCmdLineParserData // methods wxCmdLineParserData(); - void SetArguments(int argc, char **argv); + void SetArguments(int argc, wxChar **argv); void SetArguments(const wxString& cmdline); int FindOption(const wxString& name); @@ -180,7 +180,7 @@ wxCmdLineParserData::wxCmdLineParserData() #endif } -void wxCmdLineParserData::SetArguments(int argc, char **argv) +void wxCmdLineParserData::SetArguments(int argc, wxChar **argv) { m_arguments.Empty(); @@ -237,7 +237,7 @@ void wxCmdLineParser::Init() m_data = new wxCmdLineParserData; } -void wxCmdLineParser::SetCmdLine(int argc, char **argv) +void wxCmdLineParser::SetCmdLine(int argc, wxChar **argv) { m_data->SetArguments(argc, argv); } @@ -348,14 +348,12 @@ void wxCmdLineParser::AddParam(const wxString& desc, wxCmdLineParam& param = m_data->m_paramDesc.Last(); wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_MULTIPLE), - _T("all parameters after the one with " - "wxCMD_LINE_PARAM_MULTIPLE style will be ignored") ); + _T("all parameters after the one with wxCMD_LINE_PARAM_MULTIPLE style will be ignored") ); if ( !(flags & wxCMD_LINE_PARAM_OPTIONAL) ) { wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_OPTIONAL), - _T("a required parameter can't follow an " - "optional one") ); + _T("a required parameter can't follow an optional one") ); } } #endif // Debug @@ -487,7 +485,7 @@ int wxCmdLineParser::Parse() isLong = TRUE; const wxChar *p = arg.c_str() + 2; - while ( wxIsalpha(*p) || (*p == _T('-')) ) + while ( wxIsalnum(*p) || (*p == _T('_')) || (*p == _T('-')) ) { name += *p++; } @@ -505,7 +503,7 @@ int wxCmdLineParser::Parse() // a short one: as they can be cumulated, we try to find the // longest substring which is a valid option const wxChar *p = arg.c_str() + 1; - while ( wxIsalpha(*p) ) + while ( wxIsalnum(*p) || (*p == _T('_')) ) { name += *p++; } @@ -589,8 +587,7 @@ int wxCmdLineParser::Parse() if ( *p++ != _T('=') ) { - wxLogError(_("Option '%s' requires a value, '=' " - "expected."), name.c_str()); + wxLogError(_("Option '%s' requires a value, '=' expected."), name.c_str()); ok = FALSE; } @@ -599,6 +596,7 @@ int wxCmdLineParser::Parse() { switch ( *p ) { + case _T('='): case _T(':'): // the value follows p++; @@ -622,8 +620,15 @@ int wxCmdLineParser::Parse() break; default: - // the value is right here - ; + // the value is right here: this may be legal or + // not depending on the option style + if ( opt.flags & wxCMD_LINE_NEEDS_SEPARATOR ) + { + wxLogError(_("Separator expected after the option '%s'."), + name.c_str()); + + ok = FALSE; + } } } @@ -649,9 +654,7 @@ int wxCmdLineParser::Parse() } else { - wxLogError(_("'%s' is not a correct " - "numeric value for option " - "'%s'."), + wxLogError(_("'%s' is not a correct numeric value for option '%s'."), value.c_str(), name.c_str()); ok = FALSE; @@ -665,8 +668,7 @@ int wxCmdLineParser::Parse() const wxChar *res = dt.ParseDate(value); if ( !res || *res ) { - wxLogError(_("Option '%s': '%s' cannot " - "be converted to a date."), + wxLogError(_("Option '%s': '%s' cannot be converted to a date."), name.c_str(), value.c_str()); ok = FALSE; @@ -699,9 +701,7 @@ int wxCmdLineParser::Parse() else { wxASSERT_MSG( currentParam == countParam - 1, - _T("all parameters after the one with " - "wxCMD_LINE_PARAM_MULTIPLE style " - "are ignored") ); + _T("all parameters after the one with wxCMD_LINE_PARAM_MULTIPLE style are ignored") ); // remember that we did have this last repeatable parameter hadRepeatableParam = TRUE; @@ -789,9 +789,18 @@ void wxCmdLineParser::Usage() wxStripExtension(appname); } - wxString brief, detailed; + // we construct the brief cmd line desc on the fly, but not the detailed + // help message below because we want to align the options descriptions + // and for this we must first know the longest one of them + wxString brief; + wxArrayString namesOptions, descOptions; brief.Printf(_("Usage: %s"), appname.c_str()); + // the switch char is usually '-' but this can be changed with + // SetSwitchChars() and then the first one of possible chars is used + wxChar chSwitch = !m_data->m_switchChars ? _T('-') + : m_data->m_switchChars[0u]; + size_t n, count = m_data->m_options.GetCount(); for ( n = 0; n < count; n++ ) { @@ -803,11 +812,13 @@ void wxCmdLineParser::Usage() brief << _T('['); } - brief << _T('-') << opt.shortName; - detailed << _T(" -") << opt.shortName; + brief << chSwitch << opt.shortName; + + wxString option; + option << _T(" ") << chSwitch << opt.shortName; if ( !!opt.longName ) { - detailed << _T(" --") << opt.longName; + option << _T(" --") << opt.longName; } if ( opt.kind != wxCMD_LINE_SWITCH ) @@ -815,7 +826,7 @@ void wxCmdLineParser::Usage() wxString val; val << _T('<') << GetTypeName(opt.type) << _T('>'); brief << _T(' ') << val; - detailed << (!opt.longName ? _T(':') : _T('=')) << val; + option << (!opt.longName ? _T(':') : _T('=')) << val; } if ( !(opt.flags & wxCMD_LINE_OPTION_MANDATORY) ) @@ -823,7 +834,8 @@ void wxCmdLineParser::Usage() brief << _T(']'); } - detailed << _T('\t') << opt.description << _T('\n'); + namesOptions.Add(option); + descOptions.Add(opt.description); } count = m_data->m_paramDesc.GetCount(); @@ -850,13 +862,36 @@ void wxCmdLineParser::Usage() } } + wxString fullmsg; if ( !!m_data->m_logo ) { - wxLogMessage(m_data->m_logo); + fullmsg << m_data->m_logo << _T('\n'); } - wxLogMessage(brief); - wxLogMessage(detailed); + fullmsg << brief << _T('\n'); + + // now construct the detailed help message + size_t len, lenMax = 0; + count = namesOptions.GetCount(); + for ( n = 0; n < count; n++ ) + { + len = namesOptions[n].length(); + if ( len > lenMax ) + lenMax = len; + } + + wxString detailed; + for ( n = 0; n < count; n++ ) + { + len = namesOptions[n].length(); + detailed << namesOptions[n] + << wxString(_T(' '), lenMax - len) << _T('\t') + << descOptions[n] + << _T('\n'); + } + + fullmsg << detailed; + wxLogMessage(fullmsg); } // ---------------------------------------------------------------------------- diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 2e612f6ad5..c27ab747ea 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -475,7 +475,7 @@ void wxPrintData::ConvertToNative() } // TODO: I hope it's OK to pass some empty strings to DEVNAMES. - hDevNames = wxCreateDevNames("", m_printerName, ""); + m_devNames = (void*) (long) wxCreateDevNames("", m_printerName, ""); } void wxPrintData::ConvertFromNative() @@ -548,7 +548,11 @@ void wxPrintData::ConvertFromNative() #ifndef __WXWINE__ //// Paper size - if (devMode->dmFields & DM_PAPERSIZE) + // We don't know size of user defined paper and some buggy drivers + // set both DM_PAPERSIZE and DM_PAPERWIDTH & DM_PAPERLENGTH. Since + // dmPaperSize >= DMPAPER_USER wouldn't be in wxWin's database, this + // code wouldn't set m_paperSize correctly. + if ((devMode->dmFields & DM_PAPERSIZE) && (devMode->dmPaperSize < DMPAPER_USER)) { if (wxThePrintPaperDatabase) { @@ -668,7 +672,7 @@ void wxPrintData::ConvertFromNative() // Not sure if we should check for this mismatch // wxASSERT_MSG( (m_printerName == "" || (devName == m_printerName)), "Printer name obtained from DEVMODE and DEVNAMES were different!"); - if (printerName != "") + if (printerName != wxT("")) m_printerName = printerName; GlobalUnlock(hDevNames); @@ -913,7 +917,7 @@ void wxPrintDialogData::ConvertToNative() if ( m_printAllPages ) pd->Flags |= PD_ALLPAGES; - if ( m_printAllPages ) + if ( m_printSelection ) pd->Flags |= PD_SELECTION; if ( m_printCollate ) pd->Flags |= PD_COLLATE; @@ -1435,8 +1439,7 @@ void wxPageSetupDialogData::SetPaperSize(wxPaperSize id) void wxPageSetupDialogData::CalculateIdFromPaperSize() { wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), - wxT("wxThePrintPaperDatabase should not be NULL. " - "Do not create global print dialog data objects.") ); + wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); wxSize sz = GetPaperSize(); @@ -1451,8 +1454,7 @@ void wxPageSetupDialogData::CalculateIdFromPaperSize() void wxPageSetupDialogData::CalculatePaperSizeFromId() { wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), - wxT("wxThePrintPaperDatabase should not be NULL. " - "Do not create global print dialog data objects.") ); + wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId()); diff --git a/src/common/config.cpp b/src/common/config.cpp index 6ad9263693..feccd99ab0 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -42,7 +42,7 @@ #include #include -#include // for isalnum() +#include // ---------------------------------------------------------------------------- // global and class static variables @@ -59,15 +59,22 @@ bool wxConfigBase::ms_bAutoCreate = TRUE; // wxConfigBase // ---------------------------------------------------------------------------- -// Not all args will always be used by derived classes, but -// including them all in each class ensures compatibility. -wxConfigBase::wxConfigBase(const wxString& appName, const wxString& vendorName, - const wxString& WXUNUSED(localFilename), const wxString& WXUNUSED(globalFilename), long style): - m_appName(appName), m_vendorName(vendorName), m_style(style) +// Not all args will always be used by derived classes, but including them all +// in each class ensures compatibility. +wxConfigBase::wxConfigBase(const wxString& appName, + const wxString& vendorName, + const wxString& WXUNUSED(localFilename), + const wxString& WXUNUSED(globalFilename), + long style) + : m_appName(appName), m_vendorName(vendorName), m_style(style) { m_bExpandEnvVars = TRUE; m_bRecordDefaults = FALSE; } +wxConfigBase::~wxConfigBase() +{ +} + wxConfigBase *wxConfigBase::Set(wxConfigBase *pConfig) { wxConfigBase *pOld = ms_pConfig; @@ -130,8 +137,8 @@ bool wxConfigBase::Read(const wxString& key, double* val) const *val = wxAtof(str); return TRUE; } - else - return FALSE; + + return FALSE; } bool wxConfigBase::Read(const wxString& key, double* val, double defVal) const @@ -285,13 +292,13 @@ wxString wxExpandEnvVars(const wxString& str) for ( size_t n = 0; n < str.Len(); n++ ) { switch ( str[n] ) { #ifdef __WXMSW__ - case '%': + case wxT('%'): #endif //WINDOWS - case '$': + case wxT('$'): { Bracket bracket; #ifdef __WXMSW__ - if ( str[n] == '%' ) + if ( str[n] == wxT('%') ) bracket = Bracket_Windows; else #endif //WINDOWS @@ -300,12 +307,12 @@ wxString wxExpandEnvVars(const wxString& str) } else { switch ( str[n + 1] ) { - case '(': + case wxT('('): bracket = Bracket_Normal; n++; // skip the bracket break; - case '{': + case wxT('{'): bracket = Bracket_Curly; n++; // skip the bracket break; @@ -317,7 +324,7 @@ wxString wxExpandEnvVars(const wxString& str) m = n + 1; - while ( m < str.Len() && (isalnum(str[m]) || str[m] == '_') ) + while ( m < str.Len() && (wxIsalnum(str[m]) || str[m] == wxT('_')) ) m++; wxString strVarName(str.c_str() + n + 1, m - n - 1); @@ -339,8 +346,7 @@ wxString wxExpandEnvVars(const wxString& str) // check the closing bracket if ( bracket != Bracket_None ) { if ( m == str.Len() || str[m] != (char)bracket ) { - wxLogWarning(_("Environment variables expansion failed: " - "missing '%c' at position %d in '%s'."), + wxLogWarning(_("Environment variables expansion failed: missing '%c' at position %d in '%s'."), (char)bracket, m + 1, str.c_str()); } else { @@ -357,7 +363,7 @@ wxString wxExpandEnvVars(const wxString& str) case '\\': // backslash can be used to suppress special meaning of % and $ - if ( n != str.Len() && (str[n + 1] == '%' || str[n + 1] == '$') ) { + if ( n != str.Len() && (str[n + 1] == wxT('%') || str[n + 1] == wxT('$')) ) { strResult += str[++n]; break; @@ -401,7 +407,7 @@ void wxSplitPath(wxArrayString& aParts, const wxChar *sz) // could log an error here, but we prefer to ignore extra '/' if ( *pc == wxT('\0') ) - return; + break; } else strCurrent += *pc; diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 61ac755d79..31356cbdc3 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -78,6 +78,7 @@ #include #include "wx/datetime.h" +#include "wx/timer.h" // for wxGetLocalTimeMillis() // ---------------------------------------------------------------------------- // conditional compilation @@ -98,8 +99,8 @@ #if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__) #define WX_TIMEZONE _timezone #elif defined(__MWERKS__) - long wxmw_timezone = 28800; - #define WX_TIMEZONE wxmw_timezone ; + long wxmw_timezone = 28800; + #define WX_TIMEZONE wxmw_timezone; #else // unknown platform - try timezone #define WX_TIMEZONE timezone #endif @@ -390,13 +391,17 @@ static wxDateTime::WeekDay GetWeekDayFromName(const wxString& name, int flags) return wd; } -// scans all digits and returns the resulting number -static bool GetNumericToken(const wxChar*& p, unsigned long *number) +// scans all digits (but no more than len) and returns the resulting number +static bool GetNumericToken(size_t len, const wxChar*& p, unsigned long *number) { + size_t n = 1; wxString s; while ( wxIsdigit(*p) ) { s += *p++; + + if ( len && ++n > len ) + break; } return !!s && s.ToULong(number); @@ -1032,11 +1037,15 @@ wxDateTime wxDateTime::GetEndDST(int year, Country country) // constructors and assignment operators // ---------------------------------------------------------------------------- +// return the current time with ms precision +/* static */ wxDateTime wxDateTime::UNow() +{ + return wxDateTime(wxGetLocalTimeMillis()); +} + // the values in the tm structure contain the local time wxDateTime& wxDateTime::Set(const struct tm& tm) { - wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") ); - struct tm tm2(tm); time_t timet = mktime(&tm2); @@ -1073,8 +1082,6 @@ wxDateTime& wxDateTime::Set(wxDateTime_t hour, wxDateTime_t second, wxDateTime_t millisec) { - wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") ); - // we allow seconds to be 61 to account for the leap seconds, even if we // don't use them really wxCHECK_MSG( hour < 24 && second < 62 && minute < 60 && millisec < 1000, @@ -1105,8 +1112,6 @@ wxDateTime& wxDateTime::Set(wxDateTime_t day, wxDateTime_t second, wxDateTime_t millisec) { - wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") ); - wxCHECK_MSG( hour < 24 && second < 62 && minute < 60 && millisec < 1000, wxInvalidDateTime, _T("Invalid time in wxDateTime::Set()") ); @@ -1207,7 +1212,7 @@ wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const tm = localtime(&time); // should never happen - wxCHECK_MSG( tm, Tm(), _T("gmtime() failed") ); + wxCHECK_MSG( tm, Tm(), _T("localtime() failed") ); } else { @@ -1232,7 +1237,11 @@ wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const if ( tm ) { - return Tm(*tm, tz); + // adjust the milliseconds + Tm tm2(*tm, tz); + long timeOnly = (m_time % MILLISECONDS_PER_DAY).ToLong(); + tm2.msec = (wxDateTime_t)(timeOnly % 1000); + return tm2; } //else: use generic code below } @@ -1474,7 +1483,7 @@ wxDateTime& wxDateTime::SetToWeekDayInSameWeek(WeekDay weekday) } else if ( weekday < wdayThis ) { - return Substract(wxDateSpan::Days(wdayThis - weekday)); + return Subtract(wxDateSpan::Days(wdayThis - weekday)); } else // weekday > wdayThis { @@ -1527,7 +1536,7 @@ wxDateTime& wxDateTime::SetToPrevWeekDay(WeekDay weekday) diff = wdayThis - weekday; } - return Substract(wxDateSpan::Days(diff)); + return Subtract(wxDateSpan::Days(diff)); } bool wxDateTime::SetToWeekDay(WeekDay weekday, @@ -1745,7 +1754,7 @@ wxDateTime& wxDateTime::MakeTimezone(const TimeZone& tz, bool noDST) secDiff -= 3600; } - return Substract(wxTimeSpan::Seconds(secDiff)); + return Subtract(wxTimeSpan::Seconds(secDiff)); } // ---------------------------------------------------------------------------- @@ -1756,8 +1765,10 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const { wxCHECK_MSG( format, _T(""), _T("NULL format in wxDateTime::Format") ); + // we have to use our own implementation if the date is out of range of + // strftime() or if we use non standard specificators time_t time = GetTicks(); - if ( time != (time_t)-1 ) + if ( (time != (time_t)-1) && !wxStrstr(format, _T("%l")) ) { // use strftime() tm *tm; @@ -1799,7 +1810,8 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const } // we only parse ANSI C format specifications here, no POSIX 2 - // complications, no GNU extensions + // complications, no GNU extensions but we do add support for a "%l" format + // specifier allowing to get the number of milliseconds Tm tm = GetTm(tz); // used for calls to strftime() when we only deal with time @@ -1833,6 +1845,7 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const break; case _T('j'): // day of year has 3 digits + case _T('l'): // milliseconds have 3 digits fmt = _T("%03d"); break; @@ -2019,6 +2032,10 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const res += wxString::Format(fmt, GetDayOfYear(tz)); break; + case _T('l'): // milliseconds (NOT STANDARD) + res += wxString::Format(fmt, GetMillisecond(tz)); + break; + case _T('m'): // month as a number (01-12) res += wxString::Format(fmt, tm.mon + 1); break; @@ -2466,7 +2483,17 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, } // start of a format specification - switch ( *++fmt ) + + // parse the optional width + size_t width = 0; + while ( isdigit(*++fmt) ) + { + width *= 10; + width += *fmt - _T('0'); + } + + // then the format itself + switch ( *fmt ) { case _T('a'): // a weekday name case _T('A'): @@ -2539,7 +2566,8 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('d'): // day of a month (01-31) - if ( !GetNumericToken(input, &num) || (num > 31) || (num < 1) ) + if ( !GetNumericToken(width, input, &num) || + (num > 31) || (num < 1) ) { // no match return (wxChar *)NULL; @@ -2552,7 +2580,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('H'): // hour in 24h format (00-23) - if ( !GetNumericToken(input, &num) || (num > 23) ) + if ( !GetNumericToken(width, input, &num) || (num > 23) ) { // no match return (wxChar *)NULL; @@ -2563,7 +2591,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('I'): // hour in 12h format (01-12) - if ( !GetNumericToken(input, &num) || !num || (num > 12) ) + if ( !GetNumericToken(width, input, &num) || !num || (num > 12) ) { // no match return (wxChar *)NULL; @@ -2575,7 +2603,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('j'): // day of the year - if ( !GetNumericToken(input, &num) || !num || (num > 366) ) + if ( !GetNumericToken(width, input, &num) || !num || (num > 366) ) { // no match return (wxChar *)NULL; @@ -2586,7 +2614,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('m'): // month as a number (01-12) - if ( !GetNumericToken(input, &num) || !num || (num > 12) ) + if ( !GetNumericToken(width, input, &num) || !num || (num > 12) ) { // no match return (wxChar *)NULL; @@ -2597,7 +2625,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('M'): // minute as a decimal number (00-59) - if ( !GetNumericToken(input, &num) || (num > 59) ) + if ( !GetNumericToken(width, input, &num) || (num > 59) ) { // no match return (wxChar *)NULL; @@ -2661,7 +2689,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, } case _T('S'): // second as a decimal number (00-61) - if ( !GetNumericToken(input, &num) || (num > 61) ) + if ( !GetNumericToken(width, input, &num) || (num > 61) ) { // no match return (wxChar *)NULL; @@ -2691,7 +2719,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('w'): // weekday as a number (0-6), Sunday = 0 - if ( !GetNumericToken(input, &num) || (wday > 6) ) + if ( !GetNumericToken(width, input, &num) || (wday > 6) ) { // no match return (wxChar *)NULL; @@ -2820,18 +2848,21 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, break; case _T('y'): // year without century (00-99) - if ( !GetNumericToken(input, &num) || (num > 99) ) + if ( !GetNumericToken(width, input, &num) || (num > 99) ) { // no match return (wxChar *)NULL; } haveYear = TRUE; - year = 1900 + (wxDateTime_t)num; + + // TODO should have an option for roll over date instead of + // hard coding it here + year = (num > 30 ? 1900 : 2000) + (wxDateTime_t)num; break; case _T('Y'): // year with century - if ( !GetNumericToken(input, &num) ) + if ( !GetNumericToken(width, input, &num) ) { // no match return (wxChar *)NULL; @@ -2870,7 +2901,7 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date, // take this date as default tmDef = dateDef.GetTm(); } - else if ( m_time != 0 ) + else if ( IsValid() ) { // if this date is valid, don't change it tmDef = GetTm(); @@ -3003,6 +3034,11 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) } } + // We try to guess what we have here: for each new (numeric) token, we + // determine if it can be a month, day or a year. Of course, there is an + // ambiguity as some numbers may be days as well as months, so we also + // have the ability to back track. + // what do we have? bool haveDay = FALSE, // the months day? haveWDay = FALSE, // the day of week? @@ -3016,10 +3052,14 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) int year = 0; // tokenize the string - wxStringTokenizer tok(p, _T(",/-\t\n ")); + size_t nPosCur = 0; + static const wxChar *dateDelimiters = _T(".,/-\t\n "); + wxStringTokenizer tok(p, dateDelimiters); while ( tok.HasMoreTokens() ) { wxString token = tok.GetNextToken(); + if ( !token ) + continue; // is it a number? unsigned long val; @@ -3029,115 +3069,60 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) bool isDay = FALSE, isMonth = FALSE, - // only years are counted from 0 - isYear = (val == 0) || (val > 31); - if ( !isYear ) + isYear = FALSE; + + if ( !haveMon && val > 0 && val <= 12 ) { - // may be the month or month day or the year, assume the - // month day by default and fallback to month if the range - // allow it or to the year if our assumption doesn't work - if ( haveDay ) + // assume it is month + isMonth = TRUE; + } + else // not the month + { + wxDateTime_t maxDays = haveMon + ? GetNumOfDaysInMonth(haveYear ? year : Inv_Year, mon) + : 31; + + // can it be day? + if ( (val == 0) || (val > maxDays) ) { - // we already have the day, so may only be a month or year - if ( val > 12 ) - { - isYear = TRUE; - } - else - { - isMonth = TRUE; - } + isYear = TRUE; } - else // it may be day + else { isDay = TRUE; - - // check the range - if ( haveMon ) - { - if ( val > GetNumOfDaysInMonth(haveYear ? year - : Inv_Year, - mon) ) - { - // oops, it can't be a day finally - isDay = FALSE; - - if ( val > 12 ) - { - isYear = TRUE; - } - else - { - isMonth = TRUE; - } - } - } } } - // remember that we have this and stop the scan if it's the second - // time we find this, except for the day logic (see there) if ( isYear ) { if ( haveYear ) - { break; - } haveYear = TRUE; - // no roll over - 99 means 99, not 1999 for us year = (wxDateTime_t)val; } - else if ( isMonth ) + else if ( isDay ) { - if ( haveMon ) - { - break; - } - - haveMon = TRUE; - - mon = (wxDateTime::Month)val; - } - else - { - wxASSERT_MSG( isDay, _T("logic error") ); - if ( haveDay ) - { - // may be were mistaken when we found it for the first - // time? may be it was a month or year instead? - // - // this ability to "backtrack" allows us to correctly parse - // both things like 01/13 and 13/01 - but, of course, we - // still can't resolve the ambiguity in 01/02 (it will be - // Feb 1 for us, not Jan 2 as americans might expect!) - if ( (day <= 12) && !haveMon ) - { - // exchange day and month - mon = (wxDateTime::Month)day; - - haveMon = TRUE; - } - else if ( !haveYear ) - { - // exchange day and year - year = day; - - haveYear = TRUE; - } - } + break; haveDay = TRUE; day = (wxDateTime_t)val; } + else if ( isMonth ) + { + haveMon = TRUE; + + mon = (Month)(val - 1); + } } else // not a number { - mon = GetMonthFromName(token, Name_Full | Name_Abbr); - if ( mon != Inv_Month ) + // be careful not to overwrite the current mon value + Month mon2 = GetMonthFromName(token, Name_Full | Name_Abbr); + if ( mon2 != Inv_Month ) { // it's a month if ( haveMon ) @@ -3145,6 +3130,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) break; } + mon = mon2; + haveMon = TRUE; } else @@ -3219,19 +3206,21 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) } } } + + nPosCur = tok.GetPosition(); } // either no more tokens or the scan was stopped by something we couldn't // parse - in any case, see if we can construct a date from what we have if ( !haveDay && !haveWDay ) { - wxLogDebug(_T("no day, no weekday hence no date.")); + wxLogDebug(_T("ParseDate: no day, no weekday hence no date.")); return (wxChar *)NULL; } if ( haveWDay && (haveMon || haveYear || haveDay) && - !(haveMon && haveMon && haveYear) ) + !(haveDay && haveMon && haveYear) ) { // without adjectives (which we don't support here) the week day only // makes sense completely separately or with the full date @@ -3239,6 +3228,37 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) return (wxChar *)NULL; } + if ( !haveWDay && haveYear && !(haveDay && haveMon) ) + { + // may be we have month and day instead of day and year? + if ( haveDay && !haveMon ) + { + if ( day <= 12 ) + { + // exchange day and month + mon = (wxDateTime::Month)(day - 1); + + // we're in the current year then + if ( year <= GetNumOfDaysInMonth(Inv_Year, mon) ) + { + day = year; + + haveMon = TRUE; + haveYear = FALSE; + } + //else: no, can't exchange, leave haveMon == FALSE + } + } + + if ( !haveMon ) + { + // if we give the year, month and day must be given too + wxLogDebug(_T("ParseDate: day and month should be specified if year is.")); + + return (wxChar *)NULL; + } + } + if ( !haveMon ) { mon = GetCurrentMonth(); @@ -3259,6 +3279,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) if ( GetWeekDay() != wday ) { // inconsistency detected + wxLogDebug(_T("ParseDate: inconsistent day/weekday.")); + return (wxChar *)NULL; } } @@ -3270,8 +3292,16 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) SetToWeekDayInSameWeek(wday); } - // return the pointer to the next char - return p + wxStrlen(p) - wxStrlen(tok.GetString()); + // return the pointer to the first unparsed char + p += nPosCur; + if ( nPosCur && wxStrchr(dateDelimiters, *(p - 1)) ) + { + // if we couldn't parse the token after the delimiter, put back the + // delimiter as well + p--; + } + + return p; } const wxChar *wxDateTime::ParseTime(const wxChar *time) @@ -3381,46 +3411,46 @@ wxString wxTimeSpan::Format(const wxChar *format) const wxString str; str.Alloc(wxStrlen(format)); - for ( const wxChar *pch = format; pch; pch++ ) + for ( const wxChar *pch = format; *pch; pch++ ) { wxChar ch = *pch; - if ( ch == '%' ) + if ( ch == _T('%') ) { wxString tmp; - ch = *pch++; + ch = *++pch; // get the format spec char switch ( ch ) { default: wxFAIL_MSG( _T("invalid format character") ); // fall through - case '%': + case _T('%'): // will get to str << ch below break; - case 'D': + case _T('D'): tmp.Printf(_T("%d"), GetDays()); break; - case 'E': + case _T('E'): tmp.Printf(_T("%d"), GetWeeks()); break; - case 'H': + case _T('H'): tmp.Printf(_T("%02d"), GetHours()); break; - case 'l': + case _T('l'): tmp.Printf(_T("%03ld"), GetMilliseconds().ToLong()); break; - case 'M': + case _T('M'): tmp.Printf(_T("%02d"), GetMinutes()); break; - case 'S': + case _T('S'): tmp.Printf(_T("%02ld"), GetSeconds().ToLong()); break; } @@ -3446,7 +3476,7 @@ wxString wxTimeSpan::Format(const wxChar *format) const #include "wx/arrimpl.cpp" -WX_DEFINE_OBJARRAY(wxDateTimeArray) +WX_DEFINE_OBJARRAY(wxDateTimeArray); static int wxCMPFUNC_CONV wxDateTimeCompareFunc(wxDateTime **first, wxDateTime **second) diff --git a/src/common/db.cpp b/src/common/db.cpp index 4b23ad4a04..fb6aaab436 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// // Name: db.cpp -// Purpose: Implementation of the wxDB class. The wxDB class represents a connection -// to an ODBC data source. The wxDB class allows operations on the data +// Purpose: Implementation of the wxDb class. The wxDb class represents a connection +// to an ODBC data source. The wxDb class allows operations on the data // source such as opening and closing the data source. // Author: Doug Card // Modified by: George Tasker +// Bart Jourquin +// Mark Johnson // Mods: Dec, 1998: // -Added support for SQL statement logging and database cataloging // Mods: April, 1999 @@ -35,6 +37,7 @@ #include "wx/wxprec.h" + // Use this line for wxWindows v1.x //#include "wx_ver.h" // Use this line for wxWindows v2.x @@ -42,7 +45,7 @@ #if wxMAJOR_VERSION == 2 #ifdef __GNUG__ - #pragma implementation "db.h" + #pragma implementation "db.h" #endif #endif @@ -67,6 +70,7 @@ #include "wx/wxchar.h" #endif + #if wxMAJOR_VERSION == 1 # if defined(wx_msw) || defined(wx_x) # ifdef WX_PRECOMP @@ -94,6 +98,7 @@ WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList = 0; + char const *SQL_LOG_FILENAME = "sqllog.txt"; char const *SQL_CATALOG_FILENAME = "catalog.txt"; @@ -102,61 +107,155 @@ char const *SQL_CATALOG_FILENAME = "catalog.txt"; #endif // SQL Log defaults to be used by GetDbConnection -wxSqlLogState SQLLOGstate = sqlLogOFF; +wxDbSqlLogState SQLLOGstate = sqlLogOFF; -//char SQLLOGfn[DB_PATH_MAX+1] = SQL_LOG_FILENAME; -char *SQLLOGfn = (char*) SQL_LOG_FILENAME; +//char SQLLOGfn[wxDB_PATH_MAX+1] = SQL_LOG_FILENAME; +//wxChar *SQLLOGfn = (wxChar*) SQL_LOG_FILENAME; +static wxString SQLLOGfn = SQL_LOG_FILENAME; -// The wxDB::errorList is copied to this variable when the wxDB object +// The wxDb::errorList is copied to this variable when the wxDb object // is closed. This way, the error list is still available after the // database object is closed. This is necessary if the database // connection fails so the calling application can show the operator -// why the connection failed. Note: as each wxDB object is closed, it -// will overwrite the errors of the previously destroyed wxDB object in -// this variable. +// why the connection failed. Note: as each wxDb object is closed, it +// will overwrite the errors of the previously destroyed wxDb object in +// this variable. NOTE: This occurs during a CLOSE, not a FREEing of the +// connection char DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; - -/********** wxColFor Constructor **********/ -wxColFor::wxColFor() +#if EXPERIMENTAL_WXDB_FUNCTIONS // will be added in 2.4 +// This type defines the return row-struct form +// SQLTablePrivileges, and is used by wxDB::TablePrivileges. +typedef struct { - i_Nation = 0; // 0=EU, 1=UK, 2=International, 3=US - s_Field = ""; + char tableQual[129]; + char tableOwner[129]; + char tableName[129]; + char grantor[129]; + char grantee[129]; + char privilege[129]; + char grantable[4]; +} wxDbTablePrivilegeInfo; +#endif + + +/********** wxDbColFor Constructor **********/ +wxDbColFor::wxDbColFor() +{ + s_Field = ""; int i; for (i=0;i<7;i++) { s_Format[i] = ""; - s_Menge[i] = ""; - i_Menge[i] = 0; + s_Amount[i] = ""; + i_Amount[i] = 0; } - Format(1,DB_DATA_TYPE_VARCHAR,0,0,0); // the Function that does the work -} // wxColFor::wxColFor() + i_Nation = 0; // 0=EU, 1=UK, 2=International, 3=US + i_dbDataType = 0; + i_sqlDataType = 0; + Format(1,DB_DATA_TYPE_VARCHAR,0,0,0); // the Function that does the work +} // wxDbColFor::wxDbColFor() -wxColFor::~wxColFor() +wxDbColFor::~wxDbColFor() { -} // wxColFor::~wxColFor() +} // wxDbColFor::~wxDbColFor() -int wxColFor::Format(int Nation,int dbDataType,SWORD sqlDataType,short columnSize,short decimalDigits) +/********** wxDbColInf Con / Destructor **********/ +wxDbColInf::wxDbColInf() +{ + catalog[0] = 0; + schema[0] = 0; + tableName[0] = 0; + colName[0] = 0; + sqlDataType = 0; + typeName[0] = 0; + columnSize = 0; + bufferLength = 0; + decimalDigits = 0; + numPrecRadix = 0; + nullable = 0; + remarks[0] = 0; + dbDataType = 0; + PkCol = 0; + PkTableName[0] = 0; + FkCol = 0; + FkTableName[0] = 0; + pColFor = NULL; +} // wxDbColInf::wxDbColFor() + + +wxDbColInf::~wxDbColInf() +{ + if (pColFor) + delete pColFor; + pColFor = NULL; +} // wxDbColInf::~wxDbColInf() + + +/********** wxDbTableInf Constructor ********/ +wxDbTableInf::wxDbTableInf() +{ + tableName[0] = 0; + tableType[0] = 0; + tableRemarks[0] = 0; + numCols = 0; + pColInf = NULL; +} // wxDbTableInf::wxDbTableFor() + + +/********** wxDbTableInf Constructor ********/ +wxDbTableInf::~wxDbTableInf() +{ + if (pColInf) + delete [] pColInf; + pColInf = NULL; +} // wxDbTableInf::~wxDbTableInf() + + +/********** wxDbInf Constructor *************/ +wxDbInf::wxDbInf() +{ + catalog[0] = 0; + schema[0] = 0; + numTables = 0; + pTableInf = NULL; +} // wxDbInf::wxDbFor() + + +/********** wxDbInf Destructor *************/ +wxDbInf::~wxDbInf() +{ + if (pTableInf) + delete [] pTableInf; + pTableInf = NULL; +} // wxDbInf::~wxDbInf() + + +/*************************************************/ + + +int wxDbColFor::Format(int Nation,int dbDataType,SWORD sqlDataType,short columnSize,short decimalDigits) { // ---------------------------------------------------------------------------------------- // -- 19991224 : mj10777@gmx.net : Create // There is still a lot of work to do here, but it is a start // It handles all the basic data-types that I have run into up to now - // The main work will have be with Dates and float Formatting (US 1,000.00 ; EU 1.000,00) - // There are wxWindow plans for locale support and the new wxDateTime. - // - if they define some constants (wxEUROPEAN) that can be gloably used, + // The main work will have be with Dates and float Formatting + // (US 1,000.00 ; EU 1.000,00) + // There are wxWindow plans for locale support and the new wxDateTime. If + // they define some constants (wxEUROPEAN) that can be gloably used, // they should be used here. // ---------------------------------------------------------------------------------------- - // There should also be a Function to scan in a string to fill the variable + // There should also be a function to scan in a string to fill the variable // ---------------------------------------------------------------------------------------- wxString Temp0; - i_Nation = Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US + i_Nation = Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US i_dbDataType = dbDataType; i_sqlDataType = sqlDataType; - s_Field.Printf("%s%d",s_Menge[1].c_str(),i_Menge[1]); // OK for VARCHAR, INTEGER and FLOAT - if (i_dbDataType == 0) // Filter unsupported dbDataTypes + s_Field.Printf(wxT("%s%d"),s_Amount[1].c_str(),i_Amount[1]); // OK for VARCHAR, INTEGER and FLOAT + if (i_dbDataType == 0) // Filter unsupported dbDataTypes { if ((i_sqlDataType == SQL_VARCHAR) || (i_sqlDataType == SQL_LONGVARCHAR)) i_dbDataType = DB_DATA_TYPE_VARCHAR; @@ -176,17 +275,17 @@ int wxColFor::Format(int Nation,int dbDataType,SWORD sqlDataType,short columnSiz switch(i_dbDataType) // -A-> Still a lot of proper formatting to do { case DB_DATA_TYPE_VARCHAR: - s_Field = "%s"; // + s_Field = "%s"; break; case DB_DATA_TYPE_INTEGER: - s_Field = "%d"; // + s_Field = "%d"; break; case DB_DATA_TYPE_FLOAT: if (decimalDigits == 0) decimalDigits = 2; Temp0 = "%"; - Temp0.Printf("%s%d.%d",Temp0.c_str(),columnSize,decimalDigits); - s_Field.Printf("%sf",Temp0.c_str()); // + Temp0.Printf(wxT("%s%d.%d"),Temp0.c_str(),columnSize,decimalDigits); + s_Field.Printf(wxT("%sf"),Temp0.c_str()); break; case DB_DATA_TYPE_DATE: if (i_Nation == 0) // timestamp YYYY-MM-DD HH:MM:SS.SSS (tested for SYBASE) @@ -211,15 +310,15 @@ int wxColFor::Format(int Nation,int dbDataType,SWORD sqlDataType,short columnSiz } break; default: - s_Field.Printf("-E-> unknown Format(%d)-sql(%d)",dbDataType,sqlDataType); // + s_Field.Printf(wxT("Unknown Format(%d)-SQL(%d)"),dbDataType,sqlDataType); // break; }; return TRUE; -} // wxColFor::Format() +} // wxDbColFor::Format() -/********** wxDB Constructor **********/ -wxDB::wxDB(HENV &aHenv, bool FwdOnlyCursors) +/********** wxDb Constructor **********/ +wxDb::wxDb(HENV &aHenv, bool FwdOnlyCursors) { int i; @@ -227,32 +326,32 @@ wxDB::wxDB(HENV &aHenv, bool FwdOnlyCursors) sqlLogState = sqlLogOFF; // By default, logging is turned off nTables = 0; - wxStrcpy(sqlState,""); - wxStrcpy(errorMsg,""); + wxStrcpy(sqlState,wxT("")); + wxStrcpy(errorMsg,wxT("")); nativeError = cbErrorMsg = 0; for (i = 0; i < DB_MAX_ERROR_HISTORY; i++) - wxStrcpy(errorList[i], ""); + wxStrcpy(errorList[i], wxT("")); // Init typeInf structures - wxStrcpy(typeInfVarchar.TypeName,""); + wxStrcpy(typeInfVarchar.TypeName,wxT("")); typeInfVarchar.FsqlType = 0; typeInfVarchar.Precision = 0; typeInfVarchar.CaseSensitive = 0; typeInfVarchar.MaximumScale = 0; - wxStrcpy(typeInfInteger.TypeName,""); + wxStrcpy(typeInfInteger.TypeName,wxT("")); typeInfInteger.FsqlType = 0; typeInfInteger.Precision = 0; typeInfInteger.CaseSensitive = 0; typeInfInteger.MaximumScale = 0; - wxStrcpy(typeInfFloat.TypeName,""); + wxStrcpy(typeInfFloat.TypeName,wxT("")); typeInfFloat.FsqlType = 0; typeInfFloat.Precision = 0; typeInfFloat.CaseSensitive = 0; typeInfFloat.MaximumScale = 0; - wxStrcpy(typeInfDate.TypeName,""); + wxStrcpy(typeInfDate.TypeName,wxT("")); typeInfDate.FsqlType = 0; typeInfDate.Precision = 0; typeInfDate.CaseSensitive = 0; @@ -275,11 +374,11 @@ wxDB::wxDB(HENV &aHenv, bool FwdOnlyCursors) // Mark database as not open as of yet dbIsOpen = FALSE; -} // wxDB::wxDB() +} // wxDb::wxDb() -/********** wxDB::Open() **********/ -bool wxDB::Open(char *Dsn, char *Uid, char *AuthStr) +/********** wxDb::Open() **********/ +bool wxDb::Open(char *Dsn, char *Uid, char *AuthStr) { assert(Dsn && wxStrlen(Dsn)); dsn = Dsn; @@ -306,6 +405,7 @@ bool wxDB::Open(char *Dsn, char *Uid, char *AuthStr) retcode = SQLConnect(hdbc, (UCHAR FAR *) Dsn, SQL_NTS, (UCHAR FAR *) Uid, SQL_NTS, (UCHAR FAR *) AuthStr,SQL_NTS); + if (retcode == SQL_SUCCESS_WITH_INFO) DispAllErrors(henv, hdbc); else if (retcode != SQL_SUCCESS) @@ -376,8 +476,8 @@ bool wxDB::Open(char *Dsn, char *Uid, char *AuthStr) // SQL_INTEGER type name = 'LONG', Precision = 10 // VARCHAR = Variable length character string - if (! getDataTypeInfo(SQL_VARCHAR, typeInfVarchar)) - if (! getDataTypeInfo(SQL_CHAR, typeInfVarchar)) + if (!getDataTypeInfo(SQL_VARCHAR, typeInfVarchar)) + if (!getDataTypeInfo(SQL_CHAR, typeInfVarchar)) return(FALSE); else typeInfVarchar.FsqlType = SQL_CHAR; @@ -385,11 +485,12 @@ bool wxDB::Open(char *Dsn, char *Uid, char *AuthStr) typeInfVarchar.FsqlType = SQL_VARCHAR; // Float - if (! getDataTypeInfo(SQL_DOUBLE, typeInfFloat)) - if (! getDataTypeInfo(SQL_REAL, typeInfFloat)) - if (! getDataTypeInfo(SQL_FLOAT, typeInfFloat)) - if (! getDataTypeInfo(SQL_DECIMAL, typeInfFloat)) - if (! getDataTypeInfo(SQL_NUMERIC, typeInfFloat)) + if (!getDataTypeInfo(SQL_DOUBLE,typeInfFloat)) + + if (!getDataTypeInfo(SQL_REAL,typeInfFloat)) + if (!getDataTypeInfo(SQL_FLOAT,typeInfFloat)) + if (!getDataTypeInfo(SQL_DECIMAL,typeInfFloat)) + if (!getDataTypeInfo(SQL_NUMERIC,typeInfFloat)) return(FALSE); else typeInfFloat.FsqlType = SQL_NUMERIC; @@ -402,28 +503,31 @@ bool wxDB::Open(char *Dsn, char *Uid, char *AuthStr) else typeInfFloat.FsqlType = SQL_DOUBLE; + // Integer - if (! getDataTypeInfo(SQL_INTEGER, typeInfInteger)) + if (!getDataTypeInfo(SQL_INTEGER, typeInfInteger)) + { // If SQL_INTEGER is not supported, use the floating point // data type to store integers as well as floats - if (! getDataTypeInfo(typeInfFloat.FsqlType, typeInfInteger)) + if (!getDataTypeInfo(typeInfFloat.FsqlType, typeInfInteger)) return(FALSE); else typeInfInteger.FsqlType = typeInfFloat.FsqlType; + } else typeInfInteger.FsqlType = SQL_INTEGER; // Date/Time if (Dbms() != dbmsDBASE) - { - if (! getDataTypeInfo(SQL_TIMESTAMP, typeInfDate)) + { + if (! getDataTypeInfo(SQL_TIMESTAMP,typeInfDate)) return(FALSE); else typeInfDate.FsqlType = SQL_TIMESTAMP; } else { - if (! getDataTypeInfo(SQL_DATE, typeInfDate)) + if (!getDataTypeInfo(SQL_DATE,typeInfDate)) return(FALSE); else typeInfDate.FsqlType = SQL_DATE; @@ -440,11 +544,11 @@ bool wxDB::Open(char *Dsn, char *Uid, char *AuthStr) // Completed Successfully return(TRUE); -} // wxDB::Open() +} // wxDb::Open() -/********** wxDB::setConnectionOptions() **********/ -bool wxDB::setConnectionOptions(void) +/********** wxDb::setConnectionOptions() **********/ +bool wxDb::setConnectionOptions(void) /* * NOTE: The Intersolv/Oracle 7 driver was "Not Capable" of setting the login timeout. */ @@ -488,11 +592,11 @@ bool wxDB::setConnectionOptions(void) // Completed Successfully return(TRUE); -} // wxDB::setConnectionOptions() +} // wxDb::setConnectionOptions() -/********** wxDB::getDbInfo() **********/ -bool wxDB::getDbInfo(void) +/********** wxDb::getDbInfo() **********/ +bool wxDb::getDbInfo(void) { SWORD cb; RETCODE retcode; @@ -547,7 +651,10 @@ bool wxDB::getDbInfo(void) if (SQLGetInfo(hdbc, SQL_PROCEDURES, (UCHAR*) dbInf.procedureSupport, 2, &cb) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc)); - +#if EXPERIMENTAL_WXDB_FUNCTIONS // will be added in 2.4 + if (SQLGetInfo(hdbc, SQL_ACCESSIBLE_TABLES, (UCHAR*) dbInf.accessibleTables, 2, &cb) != SQL_SUCCESS) + return(DispAllErrors(henv, hdbc)); +#endif if (SQLGetInfo(hdbc, SQL_CURSOR_COMMIT_BEHAVIOR, (UCHAR*) &dbInf.cursorCommitBehavior, sizeof(dbInf.cursorCommitBehavior), &cb) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc)); @@ -619,16 +726,18 @@ bool wxDB::getDbInfo(void) cout << "SQL Conf. Level: "; switch(dbInf.sqlConfLvl) { - case SQL_OSC_MINIMUM: cout << "Minimum Grammer"; break; - case SQL_OSC_CORE: cout << "Core Grammer"; break; - case SQL_OSC_EXTENDED: cout << "Extended Grammer"; break; + case SQL_OSC_MINIMUM: cout << "Minimum Grammar"; break; + case SQL_OSC_CORE: cout << "Core Grammar"; break; + case SQL_OSC_EXTENDED: cout << "Extended Grammar"; break; } cout << endl; cout << "Max. Connections: " << dbInf.maxConnections << endl; cout << "Outer Joins: " << dbInf.outerJoins << endl; cout << "Support for Procedures: " << dbInf.procedureSupport << endl; - +#if EXPERIMENTAL_WXDB_FUNCTIONS // will be added in 2.4 + cout << "All tables accessible : " << dbInf.accessibleTables << endl; +#endif cout << "Cursor COMMIT Behavior: "; switch(dbInf.cursorCommitBehavior) { @@ -791,21 +900,21 @@ bool wxDB::getDbInfo(void) // Completed Successfully return(TRUE); -} // wxDB::getDbInfo() +} // wxDb::getDbInfo() -/********** wxDB::getDataTypeInfo() **********/ -bool wxDB::getDataTypeInfo(SWORD fSqlType, wxSqlTypeInfo &structSQLTypeInfo) +/********** wxDb::getDataTypeInfo() **********/ +bool wxDb::getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo) { /* * fSqlType will be something like SQL_VARCHAR. This parameter determines * the data type inf. is gathered for. * - * wxSqlTypeInfo is a structure that is filled in with data type information, + * wxDbSqlTypeInfo is a structure that is filled in with data type information, */ RETCODE retcode; - SDWORD cbRet; - + SDWORD cbRet; + // Get information about the data type specified if (SQLGetTypeInfo(hstmt, fSqlType) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc, hstmt)); @@ -823,17 +932,29 @@ bool wxDB::getDataTypeInfo(SWORD fSqlType, wxSqlTypeInfo &structSQLTypeInfo) // Obtain columns from the record if (SQLGetData(hstmt, 1, SQL_C_CHAR, (UCHAR*) structSQLTypeInfo.TypeName, DB_TYPE_NAME_LEN, &cbRet) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc, hstmt)); + + // BJO 20000503: no more needed with new GetColumns... +#if OLD_GETCOLUMNS // BJO 991209 if (Dbms() == dbmsMY_SQL) { - if (!strcmp(structSQLTypeInfo.TypeName, "middleint")) strcpy(structSQLTypeInfo.TypeName, "mediumint"); - if (!strcmp(structSQLTypeInfo.TypeName, "middleint unsigned")) strcpy(structSQLTypeInfo.TypeName, "mediumint unsigned"); - if (!strcmp(structSQLTypeInfo.TypeName, "integer")) strcpy(structSQLTypeInfo.TypeName, "int"); - if (!strcmp(structSQLTypeInfo.TypeName, "integer unsigned")) strcpy(structSQLTypeInfo.TypeName, "int unsigned"); - if (!strcmp(structSQLTypeInfo.TypeName, "middleint")) strcpy(structSQLTypeInfo.TypeName, "mediumint"); - if (!strcmp(structSQLTypeInfo.TypeName, "varchar")) strcpy(structSQLTypeInfo.TypeName, "char"); + if (!wxStrcmp(structSQLTypeInfo.TypeName, "middleint")) wxStrcpy(structSQLTypeInfo.TypeName, "mediumint"); + if (!wxStrcmp(structSQLTypeInfo.TypeName, "middleint unsigned")) wxStrcpy(structSQLTypeInfo.TypeName, "mediumint unsigned"); + if (!wxStrcmp(structSQLTypeInfo.TypeName, "integer")) wxStrcpy(structSQLTypeInfo.TypeName, "int"); + if (!wxStrcmp(structSQLTypeInfo.TypeName, "integer unsigned")) wxStrcpy(structSQLTypeInfo.TypeName, "int unsigned"); + if (!wxStrcmp(structSQLTypeInfo.TypeName, "middleint")) wxStrcpy(structSQLTypeInfo.TypeName, "mediumint"); + if (!wxStrcmp(structSQLTypeInfo.TypeName, "varchar")) wxStrcpy(structSQLTypeInfo.TypeName, "char"); } + + // BJO 20000427 : OpenLink driver + if (!wxStrncmp(dbInf.driverName, "oplodbc", 7) || + !wxStrncmp(dbInf.driverName, "OLOD", 4)) + { + if (!wxStrcmp(structSQLTypeInfo.TypeName, "double precision")) + wxStrcpy(structSQLTypeInfo.TypeName, "real"); + } +#endif if (SQLGetData(hstmt, 3, SQL_C_LONG, (UCHAR*) &structSQLTypeInfo.Precision, 0, &cbRet) != SQL_SUCCESS) return(DispAllErrors(henv, hdbc, hstmt)); @@ -855,11 +976,11 @@ bool wxDB::getDataTypeInfo(SWORD fSqlType, wxSqlTypeInfo &structSQLTypeInfo) // Completed Successfully return(TRUE); -} // wxDB::getDataTypeInfo() +} // wxDb::getDataTypeInfo() -/********** wxDB::Close() **********/ -void wxDB::Close(void) +/********** wxDb::Close() **********/ +void wxDb::Close(void) { // Close the Sql Log file if (fpSqlLog) @@ -896,8 +1017,8 @@ void wxDB::Close(void) tiu = (wxTablesInUse *)pNode->Data(); if (tiu->pDb == this) { - s.sprintf("(%-20s) tableID:[%6lu] pDb:[%p]", tiu->tableName,tiu->tableID,tiu->pDb); - s2.sprintf("Orphaned found using pDb:[%p]",this); + s.sprintf(wxT("(%-20s) tableID:[%6lu] pDb:[%p]"), tiu->tableName,tiu->tableID,tiu->pDb); + s2.sprintf(wxT("Orphaned found using pDb:[%p]"),this); wxLogDebug (s.c_str(),s2.c_str()); } pNode = pNode->Next(); @@ -909,11 +1030,11 @@ void wxDB::Close(void) for (i = 0; i < DB_MAX_ERROR_HISTORY; i++) wxStrcpy(DBerrorList[i],errorList[i]); -} // wxDB::Close() +} // wxDb::Close() -/********** wxDB::CommitTrans() **********/ -bool wxDB::CommitTrans(void) +/********** wxDb::CommitTrans() **********/ +bool wxDb::CommitTrans(void) { if (this) { @@ -925,11 +1046,11 @@ bool wxDB::CommitTrans(void) // Completed successfully return(TRUE); -} // wxDB::CommitTrans() +} // wxDb::CommitTrans() -/********** wxDB::RollbackTrans() **********/ -bool wxDB::RollbackTrans(void) +/********** wxDb::RollbackTrans() **********/ +bool wxDb::RollbackTrans(void) { // Rollback the transaction if (SQLTransact(henv, hdbc, SQL_ROLLBACK) != SQL_SUCCESS) @@ -938,11 +1059,11 @@ bool wxDB::RollbackTrans(void) // Completed successfully return(TRUE); -} // wxDB::RollbackTrans() +} // wxDb::RollbackTrans() -/********** wxDB::DispAllErrors() **********/ -bool wxDB::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) +/********** wxDb::DispAllErrors() **********/ +bool wxDb::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) { // char odbcErrMsg[DB_MAX_ERROR_MSG_LEN]; wxString odbcErrMsg; @@ -950,62 +1071,65 @@ bool wxDB::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) while (SQLError(aHenv, aHdbc, aHstmt, (UCHAR FAR *) sqlState, &nativeError, (UCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS) { odbcErrMsg.sprintf("SQL State = %s\nNative Error Code = %li\nError Message = %s\n", sqlState, nativeError, errorMsg); - logError(odbcErrMsg.GetData(), sqlState); + logError(odbcErrMsg.c_str(), sqlState); if (!silent) { #ifdef DBDEBUG_CONSOLE // When run in console mode, use standard out to display errors. - cout << odbcErrMsg.GetData() << endl; + cout << odbcErrMsg.c_str() << endl; cout << "Press any key to continue..." << endl; getchar(); #endif - } #ifdef __WXDEBUG__ - wxLogDebug(odbcErrMsg.GetData(),"DEBUG MESSAGE from DispAllErrors()"); + wxLogDebug(odbcErrMsg.c_str(),wxT("ODBC DEBUG MESSAGE from DispAllErrors()")); #endif + } } return(FALSE); // This function always returns false. -} // wxDB::DispAllErrors() +} // wxDb::DispAllErrors() -/********** wxDB::GetNextError() **********/ -bool wxDB::GetNextError(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) +/********** wxDb::GetNextError() **********/ +bool wxDb::GetNextError(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) { if (SQLError(aHenv, aHdbc, aHstmt, (UCHAR FAR *) sqlState, &nativeError, (UCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS) return(TRUE); else return(FALSE); -} // wxDB::GetNextError() +} // wxDb::GetNextError() -/********** wxDB::DispNextError() **********/ -void wxDB::DispNextError(void) +/********** wxDb::DispNextError() **********/ +void wxDb::DispNextError(void) { -// char odbcErrMsg[DB_MAX_ERROR_MSG_LEN]; wxString odbcErrMsg; odbcErrMsg.sprintf("SQL State = %s\nNative Error Code = %li\nError Message = %s\n", sqlState, nativeError, errorMsg); - logError(odbcErrMsg.GetData(), sqlState); + logError(odbcErrMsg.c_str(), sqlState); if (silent) return; #ifdef DBDEBUG_CONSOLE // When run in console mode, use standard out to display errors. - cout << odbcErrMsg.GetData() << endl; + cout << odbcErrMsg.c_str() << endl; cout << "Press any key to continue..." << endl; getchar(); #endif -} // wxDB::DispNextError() +#ifdef __WXDEBUG__ + wxLogDebug(odbcErrMsg,wxT("ODBC DEBUG MESSAGE")); +#endif // __WXDEBUG__ + +} // wxDb::DispNextError() -/********** wxDB::logError() **********/ -void wxDB::logError(const char *errMsg, const char *SQLState) +/********** wxDb::logError() **********/ +void wxDb::logError(const char *errMsg, const char *SQLState) { assert(errMsg && wxStrlen(errMsg)); @@ -1029,201 +1153,200 @@ void wxDB::logError(const char *errMsg, const char *SQLState) // Add the errmsg to the sql log WriteSqlLog(errMsg); -} // wxDB::logError() +} // wxDb::logError() -/**********wxDB::TranslateSqlState() **********/ -int wxDB::TranslateSqlState(const char *SQLState) +/**********wxDb::TranslateSqlState() **********/ +int wxDb::TranslateSqlState(const wxChar *SQLState) { - if (!wxStrcmp(SQLState, "01000")) + if (!wxStrcmp(SQLState, wxT("01000"))) return(DB_ERR_GENERAL_WARNING); - if (!wxStrcmp(SQLState, "01002")) + if (!wxStrcmp(SQLState, wxT("01002"))) return(DB_ERR_DISCONNECT_ERROR); - if (!wxStrcmp(SQLState, "01004")) + if (!wxStrcmp(SQLState, wxT("01004"))) return(DB_ERR_DATA_TRUNCATED); - if (!wxStrcmp(SQLState, "01006")) + if (!wxStrcmp(SQLState, wxT("01006"))) return(DB_ERR_PRIV_NOT_REVOKED); - if (!wxStrcmp(SQLState, "01S00")) + if (!wxStrcmp(SQLState, wxT("01S00"))) return(DB_ERR_INVALID_CONN_STR_ATTR); - if (!wxStrcmp(SQLState, "01S01")) + if (!wxStrcmp(SQLState, wxT("01S01"))) return(DB_ERR_ERROR_IN_ROW); - if (!wxStrcmp(SQLState, "01S02")) + if (!wxStrcmp(SQLState, wxT("01S02"))) return(DB_ERR_OPTION_VALUE_CHANGED); - if (!wxStrcmp(SQLState, "01S03")) + if (!wxStrcmp(SQLState, wxT("01S03"))) return(DB_ERR_NO_ROWS_UPD_OR_DEL); - if (!wxStrcmp(SQLState, "01S04")) + if (!wxStrcmp(SQLState, wxT("01S04"))) return(DB_ERR_MULTI_ROWS_UPD_OR_DEL); - if (!wxStrcmp(SQLState, "07001")) + if (!wxStrcmp(SQLState, wxT("07001"))) return(DB_ERR_WRONG_NO_OF_PARAMS); - if (!wxStrcmp(SQLState, "07006")) + if (!wxStrcmp(SQLState, wxT("07006"))) return(DB_ERR_DATA_TYPE_ATTR_VIOL); - if (!wxStrcmp(SQLState, "08001")) + if (!wxStrcmp(SQLState, wxT("08001"))) return(DB_ERR_UNABLE_TO_CONNECT); - if (!wxStrcmp(SQLState, "08002")) + if (!wxStrcmp(SQLState, wxT("08002"))) return(DB_ERR_CONNECTION_IN_USE); - if (!wxStrcmp(SQLState, "08003")) + if (!wxStrcmp(SQLState, wxT("08003"))) return(DB_ERR_CONNECTION_NOT_OPEN); - if (!wxStrcmp(SQLState, "08004")) + if (!wxStrcmp(SQLState, wxT("08004"))) return(DB_ERR_REJECTED_CONNECTION); - if (!wxStrcmp(SQLState, "08007")) + if (!wxStrcmp(SQLState, wxT("08007"))) return(DB_ERR_CONN_FAIL_IN_TRANS); - if (!wxStrcmp(SQLState, "08S01")) + if (!wxStrcmp(SQLState, wxT("08S01"))) return(DB_ERR_COMM_LINK_FAILURE); - if (!wxStrcmp(SQLState, "21S01")) + if (!wxStrcmp(SQLState, wxT("21S01"))) return(DB_ERR_INSERT_VALUE_LIST_MISMATCH); - if (!wxStrcmp(SQLState, "21S02")) + if (!wxStrcmp(SQLState, wxT("21S02"))) return(DB_ERR_DERIVED_TABLE_MISMATCH); - if (!wxStrcmp(SQLState, "22001")) + if (!wxStrcmp(SQLState, wxT("22001"))) return(DB_ERR_STRING_RIGHT_TRUNC); - if (!wxStrcmp(SQLState, "22003")) + if (!wxStrcmp(SQLState, wxT("22003"))) return(DB_ERR_NUMERIC_VALUE_OUT_OF_RNG); - if (!wxStrcmp(SQLState, "22005")) + if (!wxStrcmp(SQLState, wxT("22005"))) return(DB_ERR_ERROR_IN_ASSIGNMENT); - if (!wxStrcmp(SQLState, "22008")) + if (!wxStrcmp(SQLState, wxT("22008"))) return(DB_ERR_DATETIME_FLD_OVERFLOW); - if (!wxStrcmp(SQLState, "22012")) + if (!wxStrcmp(SQLState, wxT("22012"))) return(DB_ERR_DIVIDE_BY_ZERO); - if (!wxStrcmp(SQLState, "22026")) + if (!wxStrcmp(SQLState, wxT("22026"))) return(DB_ERR_STR_DATA_LENGTH_MISMATCH); - if (!wxStrcmp(SQLState, "23000")) + if (!wxStrcmp(SQLState, wxT("23000"))) return(DB_ERR_INTEGRITY_CONSTRAINT_VIOL); - if (!wxStrcmp(SQLState, "24000")) + if (!wxStrcmp(SQLState, wxT("24000"))) return(DB_ERR_INVALID_CURSOR_STATE); - if (!wxStrcmp(SQLState, "25000")) + if (!wxStrcmp(SQLState, wxT("25000"))) return(DB_ERR_INVALID_TRANS_STATE); - if (!wxStrcmp(SQLState, "28000")) + if (!wxStrcmp(SQLState, wxT("28000"))) return(DB_ERR_INVALID_AUTH_SPEC); - if (!wxStrcmp(SQLState, "34000")) + if (!wxStrcmp(SQLState, wxT("34000"))) return(DB_ERR_INVALID_CURSOR_NAME); - if (!wxStrcmp(SQLState, "37000")) + if (!wxStrcmp(SQLState, wxT("37000"))) return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL); - if (!wxStrcmp(SQLState, "3C000")) + if (!wxStrcmp(SQLState, wxT("3C000"))) return(DB_ERR_DUPLICATE_CURSOR_NAME); - if (!wxStrcmp(SQLState, "40001")) + if (!wxStrcmp(SQLState, wxT("40001"))) return(DB_ERR_SERIALIZATION_FAILURE); - if (!wxStrcmp(SQLState, "42000")) + if (!wxStrcmp(SQLState, wxT("42000"))) return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2); - if (!wxStrcmp(SQLState, "70100")) + if (!wxStrcmp(SQLState, wxT("70100"))) return(DB_ERR_OPERATION_ABORTED); - if (!wxStrcmp(SQLState, "IM001")) + if (!wxStrcmp(SQLState, wxT("IM001"))) return(DB_ERR_UNSUPPORTED_FUNCTION); - if (!wxStrcmp(SQLState, "IM002")) + if (!wxStrcmp(SQLState, wxT("IM002"))) return(DB_ERR_NO_DATA_SOURCE); - if (!wxStrcmp(SQLState, "IM003")) + if (!wxStrcmp(SQLState, wxT("IM003"))) return(DB_ERR_DRIVER_LOAD_ERROR); - if (!wxStrcmp(SQLState, "IM004")) + if (!wxStrcmp(SQLState, wxT("IM004"))) return(DB_ERR_SQLALLOCENV_FAILED); - if (!wxStrcmp(SQLState, "IM005")) + if (!wxStrcmp(SQLState, wxT("IM005"))) return(DB_ERR_SQLALLOCCONNECT_FAILED); - if (!wxStrcmp(SQLState, "IM006")) + if (!wxStrcmp(SQLState, wxT("IM006"))) return(DB_ERR_SQLSETCONNECTOPTION_FAILED); - if (!wxStrcmp(SQLState, "IM007")) + if (!wxStrcmp(SQLState, wxT("IM007"))) return(DB_ERR_NO_DATA_SOURCE_DLG_PROHIB); - if (!wxStrcmp(SQLState, "IM008")) + if (!wxStrcmp(SQLState, wxT("IM008"))) return(DB_ERR_DIALOG_FAILED); - if (!wxStrcmp(SQLState, "IM009")) + if (!wxStrcmp(SQLState, wxT("IM009"))) return(DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL); - if (!wxStrcmp(SQLState, "IM010")) + if (!wxStrcmp(SQLState, wxT("IM010"))) return(DB_ERR_DATA_SOURCE_NAME_TOO_LONG); - if (!wxStrcmp(SQLState, "IM011")) + if (!wxStrcmp(SQLState, wxT("IM011"))) return(DB_ERR_DRIVER_NAME_TOO_LONG); - if (!wxStrcmp(SQLState, "IM012")) + if (!wxStrcmp(SQLState, wxT("IM012"))) return(DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR); - if (!wxStrcmp(SQLState, "IM013")) + if (!wxStrcmp(SQLState, wxT("IM013"))) return(DB_ERR_TRACE_FILE_ERROR); - if (!wxStrcmp(SQLState, "S0001")) + if (!wxStrcmp(SQLState, wxT("S0001"))) return(DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS); - if (!wxStrcmp(SQLState, "S0002")) + if (!wxStrcmp(SQLState, wxT("S0002"))) return(DB_ERR_TABLE_NOT_FOUND); - if (!wxStrcmp(SQLState, "S0011")) + if (!wxStrcmp(SQLState, wxT("S0011"))) return(DB_ERR_INDEX_ALREADY_EXISTS); - if (!wxStrcmp(SQLState, "S0012")) + if (!wxStrcmp(SQLState, wxT("S0012"))) return(DB_ERR_INDEX_NOT_FOUND); - if (!wxStrcmp(SQLState, "S0021")) + if (!wxStrcmp(SQLState, wxT("S0021"))) return(DB_ERR_COLUMN_ALREADY_EXISTS); - if (!wxStrcmp(SQLState, "S0022")) + if (!wxStrcmp(SQLState, wxT("S0022"))) return(DB_ERR_COLUMN_NOT_FOUND); - if (!wxStrcmp(SQLState, "S0023")) + if (!wxStrcmp(SQLState, wxT("S0023"))) return(DB_ERR_NO_DEFAULT_FOR_COLUMN); - if (!wxStrcmp(SQLState, "S1000")) + if (!wxStrcmp(SQLState, wxT("S1000"))) return(DB_ERR_GENERAL_ERROR); - if (!wxStrcmp(SQLState, "S1001")) + if (!wxStrcmp(SQLState, wxT("S1001"))) return(DB_ERR_MEMORY_ALLOCATION_FAILURE); - if (!wxStrcmp(SQLState, "S1002")) + if (!wxStrcmp(SQLState, wxT("S1002"))) return(DB_ERR_INVALID_COLUMN_NUMBER); - if (!wxStrcmp(SQLState, "S1003")) + if (!wxStrcmp(SQLState, wxT("S1003"))) return(DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1004")) + if (!wxStrcmp(SQLState, wxT("S1004"))) return(DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1008")) + if (!wxStrcmp(SQLState, wxT("S1008"))) return(DB_ERR_OPERATION_CANCELLED); - if (!wxStrcmp(SQLState, "S1009")) + if (!wxStrcmp(SQLState, wxT("S1009"))) return(DB_ERR_INVALID_ARGUMENT_VALUE); - if (!wxStrcmp(SQLState, "S1010")) + if (!wxStrcmp(SQLState, wxT("S1010"))) return(DB_ERR_FUNCTION_SEQUENCE_ERROR); - if (!wxStrcmp(SQLState, "S1011")) + if (!wxStrcmp(SQLState, wxT("S1011"))) return(DB_ERR_OPERATION_INVALID_AT_THIS_TIME); - if (!wxStrcmp(SQLState, "S1012")) + if (!wxStrcmp(SQLState, wxT("S1012"))) return(DB_ERR_INVALID_TRANS_OPERATION_CODE); - if (!wxStrcmp(SQLState, "S1015")) + if (!wxStrcmp(SQLState, wxT("S1015"))) return(DB_ERR_NO_CURSOR_NAME_AVAIL); - if (!wxStrcmp(SQLState, "S1090")) + if (!wxStrcmp(SQLState, wxT("S1090"))) return(DB_ERR_INVALID_STR_OR_BUF_LEN); - if (!wxStrcmp(SQLState, "S1091")) + if (!wxStrcmp(SQLState, wxT("S1091"))) return(DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1092")) + if (!wxStrcmp(SQLState, wxT("S1092"))) return(DB_ERR_OPTION_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1093")) + if (!wxStrcmp(SQLState, wxT("S1093"))) return(DB_ERR_INVALID_PARAM_NO); - if (!wxStrcmp(SQLState, "S1094")) + if (!wxStrcmp(SQLState, wxT("S1094"))) return(DB_ERR_INVALID_SCALE_VALUE); - if (!wxStrcmp(SQLState, "S1095")) + if (!wxStrcmp(SQLState, wxT("S1095"))) return(DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1096")) + if (!wxStrcmp(SQLState, wxT("S1096"))) return(DB_ERR_INF_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1097")) + if (!wxStrcmp(SQLState, wxT("S1097"))) return(DB_ERR_COLUMN_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1098")) + if (!wxStrcmp(SQLState, wxT("S1098"))) return(DB_ERR_SCOPE_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1099")) + if (!wxStrcmp(SQLState, wxT("S1099"))) return(DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1100")) + if (!wxStrcmp(SQLState, wxT("S1100"))) return(DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1101")) + if (!wxStrcmp(SQLState, wxT("S1101"))) return(DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1103")) + if (!wxStrcmp(SQLState, wxT("S1103"))) return(DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1104")) + if (!wxStrcmp(SQLState, wxT("S1104"))) return(DB_ERR_INVALID_PRECISION_VALUE); - if (!wxStrcmp(SQLState, "S1105")) + if (!wxStrcmp(SQLState, wxT("S1105"))) return(DB_ERR_INVALID_PARAM_TYPE); - if (!wxStrcmp(SQLState, "S1106")) + if (!wxStrcmp(SQLState, wxT("S1106"))) return(DB_ERR_FETCH_TYPE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1107")) + if (!wxStrcmp(SQLState, wxT("S1107"))) return(DB_ERR_ROW_VALUE_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1108")) + if (!wxStrcmp(SQLState, wxT("S1108"))) return(DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE); - if (!wxStrcmp(SQLState, "S1109")) + if (!wxStrcmp(SQLState, wxT("S1109"))) return(DB_ERR_INVALID_CURSOR_POSITION); - if (!wxStrcmp(SQLState, "S1110")) + if (!wxStrcmp(SQLState, wxT("S1110"))) return(DB_ERR_INVALID_DRIVER_COMPLETION); - if (!wxStrcmp(SQLState, "S1111")) + if (!wxStrcmp(SQLState, wxT("S1111"))) return(DB_ERR_INVALID_BOOKMARK_VALUE); - if (!wxStrcmp(SQLState, "S1C00")) + if (!wxStrcmp(SQLState, wxT("S1C00"))) return(DB_ERR_DRIVER_NOT_CAPABLE); - if (!wxStrcmp(SQLState, "S1T00")) + if (!wxStrcmp(SQLState, wxT("S1T00"))) return(DB_ERR_TIMEOUT_EXPIRED); // No match return(0); -} // wxDB::TranslateSqlState() +} // wxDb::TranslateSqlState() -/********** wxDB::Grant() **********/ -bool wxDB::Grant(int privileges, const char *tableName, const char *userList) +/********** wxDb::Grant() **********/ +bool wxDb::Grant(int privileges, const char *tableName, const char *userList) { -// char sqlStmt[DB_MAX_STATEMENT_LEN]; wxString sqlStmt; // Build the grant statement @@ -1264,20 +1387,19 @@ bool wxDB::Grant(int privileges, const char *tableName, const char *userList) sqlStmt += userList; #ifdef DBDEBUG_CONSOLE - cout << endl << sqlStmt.GetData() << endl; + cout << endl << sqlStmt.c_str() << endl; #endif - WriteSqlLog(sqlStmt.GetData()); + WriteSqlLog(sqlStmt.c_str()); - return(ExecSql(sqlStmt.GetData())); + return(ExecSql(sqlStmt.c_str())); -} // wxDB::Grant() +} // wxDb::Grant() -/********** wxDB::CreateView() **********/ -bool wxDB::CreateView(const char *viewName, const char *colList, const char *pSqlStmt, bool attemptDrop) +/********** wxDb::CreateView() **********/ +bool wxDb::CreateView(const char *viewName, const char *colList, const char *pSqlStmt, bool attemptDrop) { -// char sqlStmt[DB_MAX_STATEMENT_LEN]; wxString sqlStmt; // Drop the view first @@ -1298,19 +1420,19 @@ bool wxDB::CreateView(const char *viewName, const char *colList, const char *pSq sqlStmt += " AS "; sqlStmt += pSqlStmt; - WriteSqlLog(sqlStmt.GetData()); + WriteSqlLog(sqlStmt.c_str()); #ifdef DBDEBUG_CONSOLE - cout << sqlStmt.GetData() << endl; + cout << sqlStmt.c_str() << endl; #endif - return(ExecSql(sqlStmt.GetData())); + return(ExecSql(sqlStmt.c_str())); -} // wxDB::CreateView() +} // wxDb::CreateView() -/********** wxDB::DropView() **********/ -bool wxDB::DropView(const char *viewName) +/********** wxDb::DropView() **********/ +bool wxDb::DropView(const char *viewName) { /* * NOTE: This function returns TRUE if the View does not exist, but @@ -1323,20 +1445,20 @@ bool wxDB::DropView(const char *viewName) sqlStmt.sprintf("DROP VIEW %s", viewName); - WriteSqlLog(sqlStmt.GetData()); + WriteSqlLog(sqlStmt.c_str()); #ifdef DBDEBUG_CONSOLE - cout << endl << sqlStmt.GetData() << endl; + cout << endl << sqlStmt.c_str() << endl; #endif - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.GetData(), SQL_NTS) != SQL_SUCCESS) + if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS) { // Check for "Base table not found" error and ignore GetNextError(henv, hdbc, hstmt); - if (wxStrcmp(sqlState,"S0002")) // "Base table not found" + if (wxStrcmp(sqlState,wxT("S0002"))) // "Base table not found" { // Check for product specific error codes - if (!((Dbms() == dbmsSYBASE_ASA && !wxStrcmp(sqlState,"42000")))) // 5.x (and lower?) + if (!((Dbms() == dbmsSYBASE_ASA && !wxStrcmp(sqlState,wxT("42000"))))) // 5.x (and lower?) { DispNextError(); DispAllErrors(henv, hdbc, hstmt); @@ -1352,11 +1474,11 @@ bool wxDB::DropView(const char *viewName) return TRUE; -} // wxDB::DropView() +} // wxDb::DropView() -/********** wxDB::ExecSql() **********/ -bool wxDB::ExecSql(const char *pSqlStmt) +/********** wxDb::ExecSql() **********/ +bool wxDb::ExecSql(const char *pSqlStmt) { SQLFreeStmt(hstmt, SQL_CLOSE); if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_NTS) == SQL_SUCCESS) @@ -1367,11 +1489,11 @@ bool wxDB::ExecSql(const char *pSqlStmt) return(FALSE); } -} // wxDB::ExecSql() +} // wxDb::ExecSql() -/********** wxDB::GetNext() **********/ -bool wxDB::GetNext(void) +/********** wxDb::GetNext() **********/ +bool wxDb::GetNext(void) { if (SQLFetch(hstmt) == SQL_SUCCESS) return(TRUE); @@ -1381,11 +1503,11 @@ bool wxDB::GetNext(void) return(FALSE); } -} // wxDB::GetNext() +} // wxDb::GetNext() -/********** wxDB::GetData() **********/ -bool wxDB::GetData(UWORD colNo, SWORD cType, PTR pData, SDWORD maxLen, SDWORD FAR *cbReturned) +/********** wxDb::GetData() **********/ +bool wxDb::GetData(UWORD colNo, SWORD cType, PTR pData, SDWORD maxLen, SDWORD FAR *cbReturned) { assert(pData); assert(cbReturned); @@ -1398,11 +1520,11 @@ bool wxDB::GetData(UWORD colNo, SWORD cType, PTR pData, SDWORD maxLen, SDWORD FA return(FALSE); } -} // wxDB::GetData() +} // wxDb::GetData() -/********** wxDB::GetKeyFields() **********/ -int wxDB::GetKeyFields(char *tableName, wxColInf* colInf,int noCols) +/********** wxDb::GetKeyFields() **********/ +int wxDb::GetKeyFields(char *tableName, wxDbColInf* colInf, int noCols) { char szPkTable[DB_MAX_TABLE_NAME_LEN+1]; /* Primary key table name */ char szFkTable[DB_MAX_TABLE_NAME_LEN+1]; /* Foreign key table name */ @@ -1450,8 +1572,8 @@ int wxDB::GetKeyFields(char *tableName, wxColInf* colInf,int noCols) for (i=0;iGetColumns(tableList, userID); + * wxDbColInf *colInf = pDb->GetColumns(tableList, userID); * if (colInf) * { * // Use the column inf @@ -1560,14 +1685,14 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID) * userID == "" ... UserID set equal to 'this->uid' * userID != "" ... UserID set equal to 'userID' * - * NOTE: ALL column bindings associated with this wxDB instance are unbound - * by this function. This function should use its own wxDB instance + * NOTE: ALL column bindings associated with this wxDb instance are unbound + * by this function. This function should use its own wxDb instance * to avoid undesired unbinding of columns. */ { int noCols = 0; int colNo = 0; - wxColInf *colInf = 0; + wxDbColInf *colInf = 0; RETCODE retcode; SDWORD cb; @@ -1595,7 +1720,7 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID) UserID = UserID.Upper(); // Pass 1 - Determine how many columns there are. - // Pass 2 - Allocate the wxColInf array and fill in + // Pass 2 - Allocate the wxDbColInf array and fill in // the array with the column information. int pass; for (pass = 1; pass <= 2; pass++) @@ -1604,13 +1729,13 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID) { if (noCols == 0) // Probably a bogus table name(s) break; - // Allocate n wxColInf objects to hold the column information - colInf = new wxColInf[noCols+1]; + // Allocate n wxDbColInf objects to hold the column information + colInf = new wxDbColInf[noCols+1]; if (!colInf) break; // Mark the end of the array - wxStrcpy(colInf[noCols].tableName, ""); - wxStrcpy(colInf[noCols].colName, ""); + wxStrcpy(colInf[noCols].tableName, wxT("")); + wxStrcpy(colInf[noCols].colName, wxT("")); colInf[noCols].sqlDataType = 0; } // Loop through each table name @@ -1627,14 +1752,14 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID) // MySQL and Access cannot accept a user name when looking up column names, so we // use the call below that leaves out the user name - if (wxStrcmp(UserID.GetData(),"") && + if (wxStrcmp(UserID.c_str(),wxT("")) && Dbms() != dbmsMY_SQL && Dbms() != dbmsACCESS) { retcode = SQLColumns(hstmt, NULL, 0, // All qualifiers - (UCHAR *) UserID.GetData(), SQL_NTS, // Owner - (UCHAR *) TableName.GetData(), SQL_NTS, + (UCHAR *) UserID.c_str(), SQL_NTS, // Owner + (UCHAR *) TableName.c_str(), SQL_NTS, NULL, 0); // All columns } else @@ -1642,7 +1767,7 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID) retcode = SQLColumns(hstmt, NULL, 0, // All qualifiers NULL, 0, // Owner - (UCHAR *) TableName.GetData(), SQL_NTS, + (UCHAR *) TableName.c_str(), SQL_NTS, NULL, 0); // All columns } if (retcode != SQL_SUCCESS) @@ -1675,8 +1800,8 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID) GetData(10, SQL_C_SSHORT, (UCHAR*) &colInf[colNo].numPrecRadix, 0, &cb); GetData(11, SQL_C_SSHORT, (UCHAR*) &colInf[colNo].nullable, 0, &cb); GetData(12, SQL_C_CHAR, (UCHAR*) colInf[colNo].remarks, 254+1, &cb); - - // Determine the wxDB data type that is used to represent the native data type of this data source + + // Determine the wxDb data type that is used to represent the native data type of this data source colInf[colNo].dbDataType = 0; if (!wxStricmp(typeInfVarchar.TypeName,colInf[colNo].typeName)) { @@ -1713,29 +1838,30 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID) SQLFreeStmt(hstmt, SQL_CLOSE); return colInf; -} // wxDB::GetColumns() +} // wxDb::GetColumns() -/********** wxDB::GetColumns() **********/ -wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) -/* - * Same as the above GetColumns() function except this one gets columns - * only for a single table, and if 'numCols' is not NULL, the number of - * columns stored in the returned wxColInf is set in '*numCols' - * - * userID is evaluated in the following manner: - * userID == NULL ... UserID is ignored - * userID == "" ... UserID set equal to 'this->uid' - * userID != "" ... UserID set equal to 'userID' - * - * NOTE: ALL column bindings associated with this wxDB instance are unbound - * by this function. This function should use its own wxDB instance - * to avoid undesired unbinding of columns. - */ +/********** wxDb::GetColumns() **********/ + +wxDbColInf *wxDb::GetColumns(char *tableName, int *numCols, const char *userID) +// +// Same as the above GetColumns() function except this one gets columns +// only for a single table, and if 'numCols' is not NULL, the number of +// columns stored in the returned wxDbColInf is set in '*numCols' +// +// userID is evaluated in the following manner: +// userID == NULL ... UserID is ignored +// userID == "" ... UserID set equal to 'this->uid' +// userID != "" ... UserID set equal to 'userID' +// +// NOTE: ALL column bindings associated with this wxDb instance are unbound +// by this function. This function should use its own wxDb instance +// to avoid undesired unbinding of columns. + { int noCols = 0; int colNo = 0; - wxColInf *colInf = 0; + wxDbColInf *colInf = 0; RETCODE retcode; SDWORD cb; @@ -1763,7 +1889,7 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) UserID = UserID.Upper(); // Pass 1 - Determine how many columns there are. - // Pass 2 - Allocate the wxColInf array and fill in + // Pass 2 - Allocate the wxDbColInf array and fill in // the array with the column information. int pass; for (pass = 1; pass <= 2; pass++) @@ -1772,13 +1898,13 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) { if (noCols == 0) // Probably a bogus table name(s) break; - // Allocate n wxColInf objects to hold the column information - colInf = new wxColInf[noCols+1]; + // Allocate n wxDbColInf objects to hold the column information + colInf = new wxDbColInf[noCols+1]; if (!colInf) break; // Mark the end of the array - wxStrcpy(colInf[noCols].tableName, ""); - wxStrcpy(colInf[noCols].colName, ""); + wxStrcpy(colInf[noCols].tableName, wxT("")); + wxStrcpy(colInf[noCols].colName, wxT("")); colInf[noCols].sqlDataType = 0; } @@ -1792,14 +1918,14 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) // MySQL and Access cannot accept a user name when looking up column names, so we // use the call below that leaves out the user name - if (wxStrcmp(UserID.GetData(),"") && + if (wxStrcmp(UserID.c_str(),wxT("")) && Dbms() != dbmsMY_SQL && Dbms() != dbmsACCESS) { retcode = SQLColumns(hstmt, NULL, 0, // All qualifiers - (UCHAR *) UserID.GetData(), SQL_NTS, // Owner - (UCHAR *) TableName.GetData(), SQL_NTS, + (UCHAR *) UserID.c_str(), SQL_NTS, // Owner + (UCHAR *) TableName.c_str(), SQL_NTS, NULL, 0); // All columns } else @@ -1807,7 +1933,7 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) retcode = SQLColumns(hstmt, NULL, 0, // All qualifiers NULL, 0, // Owner - (UCHAR *) TableName.GetData(), SQL_NTS, + (UCHAR *) TableName.c_str(), SQL_NTS, NULL, 0); // All columns } if (retcode != SQL_SUCCESS) @@ -1849,15 +1975,23 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) colInf[colNo].FkCol = 0; // Foreign key column 0=No; 1= First Key, 2 = Second Key etc. colInf[colNo].FkTableName[0] = 0; // Foreign key table name - // Determine the wxDB data type that is used to represent the native data type of this data source + // BJO 20000428 : Virtuoso returns type names with upper cases! + if (Dbms() == dbmsVIRTUOSO) + { + wxString s = colInf[colNo].typeName; + s = s.MakeLower(); + wxStrcmp(colInf[colNo].typeName, s.c_str()); + } + + // Determine the wxDb data type that is used to represent the native data type of this data source colInf[colNo].dbDataType = 0; if (!wxStricmp(typeInfVarchar.TypeName,colInf[colNo].typeName)) { if (colInf[colNo].columnSize < 1) { - // IODBC does not return a correct columnSize, so we set - // columnSize = bufferLength if no column size was returned - colInf[colNo].columnSize = colInf[colNo].bufferLength; + // IODBC does not return a correct columnSize, so we set + // columnSize = bufferLength if no column size was returned + colInf[colNo].columnSize = colInf[colNo].bufferLength; } colInf[colNo].dbDataType = DB_DATA_TYPE_VARCHAR; } @@ -1866,8 +2000,8 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) else if (!wxStricmp(typeInfFloat.TypeName,colInf[colNo].typeName)) colInf[colNo].dbDataType = DB_DATA_TYPE_FLOAT; else if (!wxStricmp(typeInfDate.TypeName,colInf[colNo].typeName)) - colInf[colNo].dbDataType = DB_DATA_TYPE_DATE; - + colInf[colNo].dbDataType = DB_DATA_TYPE_DATE; + colNo++; } } @@ -1893,11 +2027,355 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID) *numCols = noCols; return colInf; -} // wxDB::GetColumns() +} // wxDb::GetColumns() -/********** wxDB::GetColumnCount() **********/ -int wxDB::GetColumnCount(char *tableName, const char *userID) +#else // New GetColumns + + +/* + BJO 20000503 + These are tentative new GetColumns members which should be more database + independant and which always returns the columns in the order they were + created. + + - The first one (wxDbColInf *wxDb::GetColumns(char *tableName[], const + char* userID)) calls the second implementation for each separate table + before merging the results. This makes the code easier to maintain as + only one member (the second) makes the real work + - wxDbColInf *wxDb::GetColumns(char *tableName, int *numCols, const + char *userID) is a little bit improved + - It doesn't anymore rely on the type-name to find out which database-type + each column has + - It ends by sorting the columns, so that they are returned in the same + order they were created +*/ + +typedef struct +{ + int noCols; + wxDbColInf *colInf; +} _TableColumns; + + +wxDbColInf *wxDb::GetColumns(char *tableName[], const char* userID) +{ + int i, j; + // The last array element of the tableName[] argument must be zero (null). + // This is how the end of the array is detected. + + int noCols = 0; + + // How many tables ? + int tbl; + for (tbl = 0 ; tableName[tbl]; tbl++); + + // Create a table to maintain the columns for each separate table + _TableColumns *TableColumns = new _TableColumns[tbl]; + + // Fill the table + for (i = 0 ; i < tbl ; i++) + + { + TableColumns[i].colInf = GetColumns(tableName[i], &TableColumns[i].noCols, userID); + if (TableColumns[i].colInf == NULL) + return NULL; + noCols += TableColumns[i].noCols; + } + + // Now merge all the separate table infos + wxDbColInf *colInf = new wxDbColInf[noCols+1]; + + // Mark the end of the array + wxStrcpy(colInf[noCols].tableName, wxT("")); + wxStrcpy(colInf[noCols].colName, wxT("")); + colInf[noCols].sqlDataType = 0; + + // Merge ... + int offset = 0; + + for (i = 0 ; i < tbl ; i++) + { + for (j = 0 ; j < TableColumns[i].noCols ; j++) + { + colInf[offset++] = TableColumns[i].colInf[j]; + } + } + + delete [] TableColumns; + + return colInf; +} // wxDb::GetColumns() -- NEW + + +wxDbColInf *wxDb::GetColumns(char *tableName, int *numCols, const char *userID) +// +// Same as the above GetColumns() function except this one gets columns +// only for a single table, and if 'numCols' is not NULL, the number of +// columns stored in the returned wxDbColInf is set in '*numCols' +// +// userID is evaluated in the following manner: +// userID == NULL ... UserID is ignored +// userID == "" ... UserID set equal to 'this->uid' +// userID != "" ... UserID set equal to 'userID' +// +// NOTE: ALL column bindings associated with this wxDb instance are unbound +// by this function. This function should use its own wxDb instance +// to avoid undesired unbinding of columns. +{ + SWORD noCols = 0; + int colNo = 0; + wxDbColInf *colInf = 0; + + RETCODE retcode; + SDWORD cb; + + wxString UserID; + wxString TableName; + + if (userID) + { + if (!wxStrlen(userID)) + UserID = uid; + else + UserID = userID; + } + else + UserID = ""; + + // dBase does not use user names, and some drivers fail if you try to pass one + if (Dbms() == dbmsDBASE) + UserID = ""; + + // Oracle user names may only be in uppercase, so force + // the name to uppercase + if (Dbms() == dbmsORACLE) + UserID = UserID.Upper(); + + // Pass 1 - Determine how many columns there are. + // Pass 2 - Allocate the wxDbColInf array and fill in + // the array with the column information. + int pass; + for (pass = 1; pass <= 2; pass++) + { + if (pass == 2) + { + if (noCols == 0) // Probably a bogus table name(s) + break; + // Allocate n wxDbColInf objects to hold the column information + colInf = new wxDbColInf[noCols+1]; + if (!colInf) + break; + // Mark the end of the array + wxStrcpy(colInf[noCols].tableName, wxT("")); + wxStrcpy(colInf[noCols].colName, wxT("")); + colInf[noCols].sqlDataType = 0; + } + + TableName = tableName; + // Oracle table names are uppercase only, so force + // the name to uppercase just in case programmer forgot to do this + if (Dbms() == dbmsORACLE) + TableName = TableName.Upper(); + + SQLFreeStmt(hstmt, SQL_CLOSE); + + // MySQL and Access cannot accept a user name when looking up column names, so we + // use the call below that leaves out the user name + if (wxStrcmp(UserID.c_str(),wxT("")) && + Dbms() != dbmsMY_SQL && + Dbms() != dbmsACCESS) + { + retcode = SQLColumns(hstmt, + NULL, 0, // All qualifiers + (UCHAR *) UserID.c_str(), SQL_NTS, // Owner + (UCHAR *) TableName.c_str(), SQL_NTS, + NULL, 0); // All columns + } + else + { + retcode = SQLColumns(hstmt, + NULL, 0, // All qualifiers + NULL, 0, // Owner + (UCHAR *) TableName.c_str(), SQL_NTS, + NULL, 0); // All columns + } + if (retcode != SQL_SUCCESS) + { // Error occured, abort + DispAllErrors(henv, hdbc, hstmt); + if (colInf) + delete [] colInf; + SQLFreeStmt(hstmt, SQL_CLOSE); + if (numCols) + *numCols = 0; + return(0); + } + + while ((retcode = SQLFetch(hstmt)) == SQL_SUCCESS) + { + if (pass == 1) // First pass, just add up the number of columns + noCols++; + else // Pass 2; Fill in the array of structures + { + if (colNo < noCols) // Some extra error checking to prevent memory overwrites + { + // NOTE: Only the ODBC 1.x fields are retrieved + GetData( 1, SQL_C_CHAR, (UCHAR*) colInf[colNo].catalog, 128+1, &cb); + GetData( 2, SQL_C_CHAR, (UCHAR*) colInf[colNo].schema, 128+1, &cb); + GetData( 3, SQL_C_CHAR, (UCHAR*) colInf[colNo].tableName, DB_MAX_TABLE_NAME_LEN+1, &cb); + GetData( 4, SQL_C_CHAR, (UCHAR*) colInf[colNo].colName, DB_MAX_COLUMN_NAME_LEN+1, &cb); + GetData( 5, SQL_C_SSHORT, (UCHAR*) &colInf[colNo].sqlDataType, 0, &cb); + GetData( 6, SQL_C_CHAR, (UCHAR*) colInf[colNo].typeName, 128+1, &cb); + GetData( 7, SQL_C_SLONG, (UCHAR*) &colInf[colNo].columnSize, 0, &cb); + GetData( 8, SQL_C_SSHORT, (UCHAR*) &colInf[colNo].bufferLength, 0, &cb); + GetData( 9, SQL_C_SSHORT, (UCHAR*) &colInf[colNo].decimalDigits,0, &cb); + GetData(10, SQL_C_SSHORT, (UCHAR*) &colInf[colNo].numPrecRadix, 0, &cb); + GetData(11, SQL_C_SSHORT, (UCHAR*) &colInf[colNo].nullable, 0, &cb); + GetData(12, SQL_C_CHAR, (UCHAR*) colInf[colNo].remarks, 254+1, &cb); + // Start Values for Primary/Foriegn Key (=No) + colInf[colNo].PkCol = 0; // Primary key column 0=No; 1= First Key, 2 = Second Key etc. + colInf[colNo].PkTableName[0] = 0; // Tablenames where Primary Key is used as a Foreign Key + colInf[colNo].FkCol = 0; // Foreign key column 0=No; 1= First Key, 2 = Second Key etc. + colInf[colNo].FkTableName[0] = 0; // Foreign key table name + +#ifdef _IODBC_ + // IODBC returns the columnSize in bufferLength.. (bug) + colInf[colNo].columnSize = colInf[colNo].bufferLength; +#endif + + // Determine the wxDb data type that is used to represent the native data type of this data source + colInf[colNo].dbDataType = 0; + // Get the intern datatype + switch (colInf[colNo].sqlDataType) + { + case SQL_VARCHAR: + case SQL_CHAR: + colInf[colNo].dbDataType = DB_DATA_TYPE_VARCHAR; + break; + + case SQL_TINYINT: + case SQL_SMALLINT: + case SQL_INTEGER: + colInf[colNo].dbDataType = DB_DATA_TYPE_INTEGER; + break; + case SQL_DOUBLE: + case SQL_DECIMAL: + case SQL_NUMERIC: + case SQL_FLOAT: + case SQL_REAL: + colInf[colNo].dbDataType = DB_DATA_TYPE_FLOAT; + break; + case SQL_DATE: + colInf[colNo].dbDataType = DB_DATA_TYPE_DATE; + break; +#ifdef __WXDEBUG__ + default: + wxString errMsg; + errMsg.sprintf("SQL Data type %d currently not supported by wxWindows", colInf[colNo].sqlDataType); + wxLogDebug(errMsg,wxT("ODBC DEBUG MESSAGE")); +#endif + } + colNo++; + } + } + } + if (retcode != SQL_NO_DATA_FOUND) + { // Error occured, abort + DispAllErrors(henv, hdbc, hstmt); + if (colInf) + delete [] colInf; + SQLFreeStmt(hstmt, SQL_CLOSE); + if (numCols) + *numCols = 0; + return(0); + } + } + + SQLFreeStmt(hstmt, SQL_CLOSE); + + // Store Primary and Foreign Keys + GetKeyFields(tableName,colInf,noCols); + + /////////////////////////////////////////////////////////////////////////// + // Now sort the the columns in order to make them appear in the right order + /////////////////////////////////////////////////////////////////////////// + + // Build a generic SELECT statement which returns 0 rows + wxString Stmt; + + Stmt.sprintf("select * from %s where 0=1", tableName); + + // Execute query + if (SQLExecDirect(hstmt, (UCHAR FAR *) Stmt.c_str(), SQL_NTS) != SQL_SUCCESS) + { + DispAllErrors(henv, hdbc, hstmt); + return NULL; + } + + // Get the number of result columns + if (SQLNumResultCols (hstmt, &noCols) != SQL_SUCCESS) + { + DispAllErrors(henv, hdbc, hstmt); + return NULL; + } + + if (noCols == 0) // Probably a bogus table name + return NULL; + + // Get the name + int i; + short colNum; + UCHAR name[100]; + SWORD Sword; + SDWORD Sdword; + for (colNum = 0; colNum < noCols; colNum++) + { + if (SQLColAttributes(hstmt,colNum+1, SQL_COLUMN_NAME, + name, sizeof(name), + &Sword, &Sdword) != SQL_SUCCESS) + { + DispAllErrors(henv, hdbc, hstmt); + return NULL; + } + + wxString Name1 = name; + Name1 = Name1.Upper(); + + // Where is this name in the array ? + for (i = colNum ; i < noCols ; i++) + { + wxString Name2 = colInf[i].colName; + Name2 = Name2.Upper(); + if (Name2 == Name1) + { + if (colNum != i) // swap to sort + { + wxDbColInf tmpColInf = colInf[colNum]; + colInf[colNum] = colInf[i]; + colInf[i] = tmpColInf; + } + break; + } + } + } + SQLFreeStmt(hstmt, SQL_CLOSE); + + /////////////////////////////////////////////////////////////////////////// + // End sorting + /////////////////////////////////////////////////////////////////////////// + + if (numCols) + *numCols = noCols; + return colInf; + +} // wxDb::GetColumns() + + +#endif // #else OLD_GETCOLUMNS + + +/********** wxDb::GetColumnCount() **********/ +int wxDb::GetColumnCount(char *tableName, const char *userID) /* * Returns a count of how many columns are in a table. * If an error occurs in computing the number of columns @@ -1908,8 +2386,8 @@ int wxDB::GetColumnCount(char *tableName, const char *userID) * userID == "" ... UserID set equal to 'this->uid' * userID != "" ... UserID set equal to 'userID' * - * NOTE: ALL column bindings associated with this wxDB instance are unbound - * by this function. This function should use its own wxDB instance + * NOTE: ALL column bindings associated with this wxDb instance are unbound + * by this function. This function should use its own wxDb instance * to avoid undesired unbinding of columns. */ { @@ -1928,11 +2406,11 @@ int wxDB::GetColumnCount(char *tableName, const char *userID) UserID = userID; } else - UserID = ""; + UserID = wxT(""); // dBase does not use user names, and some drivers fail if you try to pass one if (Dbms() == dbmsDBASE) - UserID = ""; + UserID = wxT(""); // Oracle user names may only be in uppercase, so force // the name to uppercase @@ -1952,14 +2430,14 @@ int wxDB::GetColumnCount(char *tableName, const char *userID) // MySQL and Access cannot accept a user name when looking up column names, so we // use the call below that leaves out the user name - if (wxStrcmp(UserID.GetData(),"") && + if (wxStrcmp(UserID.c_str(),wxT("")) && Dbms() != dbmsMY_SQL && Dbms() != dbmsACCESS) { retcode = SQLColumns(hstmt, NULL, 0, // All qualifiers - (UCHAR *) UserID.GetData(), SQL_NTS, // Owner - (UCHAR *) TableName.GetData(), SQL_NTS, + (UCHAR *) UserID.c_str(), SQL_NTS, // Owner + (UCHAR *) TableName.c_str(), SQL_NTS, NULL, 0); // All columns } else @@ -1967,7 +2445,7 @@ int wxDB::GetColumnCount(char *tableName, const char *userID) retcode = SQLColumns(hstmt, NULL, 0, // All qualifiers NULL, 0, // Owner - (UCHAR *) TableName.GetData(), SQL_NTS, + (UCHAR *) TableName.c_str(), SQL_NTS, NULL, 0); // All columns } if (retcode != SQL_SUCCESS) @@ -1993,11 +2471,11 @@ int wxDB::GetColumnCount(char *tableName, const char *userID) SQLFreeStmt(hstmt, SQL_CLOSE); return noCols; -} // wxDB::GetColumnCount() +} // wxDb::GetColumnCount() -/********** wxDB::GetCatalog() *******/ -wxDbInf *wxDB::GetCatalog(char *userID) +/********** wxDb::GetCatalog() *******/ +wxDbInf *wxDb::GetCatalog(char *userID) /* * --------------------------------------------------------------------- * -- 19991203 : mj10777@gmx.net : Create ------ @@ -2015,8 +2493,8 @@ wxDbInf *wxDB::GetCatalog(char *userID) * userID == "" ... UserID set equal to 'this->uid' * userID != "" ... UserID set equal to 'userID' * - * NOTE: ALL column bindings associated with this wxDB instance are unbound - * by this function. This function should use its own wxDB instance + * NOTE: ALL column bindings associated with this wxDb instance are unbound + * by this function. This function should use its own wxDb instance * to avoid undesired unbinding of columns. */ { @@ -2025,7 +2503,6 @@ wxDbInf *wxDB::GetCatalog(char *userID) int pass; RETCODE retcode; SDWORD cb; -// char tblNameSave[DB_MAX_TABLE_NAME_LEN+1]; wxString tblNameSave; wxString UserID; @@ -2038,11 +2515,11 @@ wxDbInf *wxDB::GetCatalog(char *userID) UserID = userID; } else - UserID = ""; + UserID = wxT(""); // dBase does not use user names, and some drivers fail if you try to pass one if (Dbms() == dbmsDBASE) - UserID = ""; + UserID = wxT(""); // Oracle user names may only be in uppercase, so force // the name to uppercase @@ -2051,28 +2528,25 @@ wxDbInf *wxDB::GetCatalog(char *userID) //------------------------------------------------------------- pDbInf = new wxDbInf; // Create the Database Arrray - pDbInf->catalog[0] = 0; - pDbInf->schema[0] = 0; - pDbInf->numTables = 0; // Counter for Tables - pDbInf->pTableInf = NULL; // Array of Tables //------------------------------------------------------------- // Table Information // Pass 1 - Determine how many Tables there are. // Pass 2 - Create the Table array and fill it // - Create the Cols array = NULL //------------------------------------------------------------- + for (pass = 1; pass <= 2; pass++) { SQLFreeStmt(hstmt, SQL_CLOSE); // Close if Open - tblNameSave = ""; + tblNameSave = wxT(""); - if (wxStrcmp(UserID.GetData(),"") && - Dbms() != dbmsMY_SQL && - Dbms() != dbmsACCESS) + if (wxStrcmp(UserID.c_str(),wxT("")) && + Dbms() != dbmsMY_SQL && + Dbms() != dbmsACCESS) { retcode = SQLTables(hstmt, NULL, 0, // All qualifiers - (UCHAR *) UserID.GetData(), SQL_NTS, // User specified + (UCHAR *) UserID.c_str(), SQL_NTS, // User specified NULL, 0, // All tables NULL, 0); // All columns } @@ -2084,6 +2558,7 @@ wxDbInf *wxDB::GetCatalog(char *userID) NULL, 0, // All tables NULL, 0); // All columns } + if (retcode != SQL_SUCCESS) { DispAllErrors(henv, hdbc, hstmt); @@ -2091,7 +2566,7 @@ wxDbInf *wxDB::GetCatalog(char *userID) SQLFreeStmt(hstmt, SQL_CLOSE); return pDbInf; } - + while ((retcode = SQLFetch(hstmt)) == SQL_SUCCESS) // Table Information { if (pass == 1) // First pass, just count the Tables @@ -2107,24 +2582,18 @@ wxDbInf *wxDB::GetCatalog(char *userID) { if (pDbInf->pTableInf == NULL) // Has the Table Array been created { // no, then create the Array - pDbInf->pTableInf = new wxTableInf[pDbInf->numTables]; - for (noTab=0;noTabnumTables;noTab++) - { - (pDbInf->pTableInf+noTab)->tableName[0] = 0; - (pDbInf->pTableInf+noTab)->tableType[0] = 0; - (pDbInf->pTableInf+noTab)->tableRemarks[0] = 0; - (pDbInf->pTableInf+noTab)->numCols = 0; - (pDbInf->pTableInf+noTab)->pColInf = NULL; - } + pDbInf->pTableInf = new wxDbTableInf[pDbInf->numTables]; noTab = 0; - } // if (pDbInf->pTableInf == NULL) // Has the Table Array been created + } // if (pDbInf->pTableInf == NULL) // Has the Table Array been created + GetData( 3, SQL_C_CHAR, (UCHAR*) (pDbInf->pTableInf+noTab)->tableName, DB_MAX_TABLE_NAME_LEN+1, &cb); GetData( 4, SQL_C_CHAR, (UCHAR*) (pDbInf->pTableInf+noTab)->tableType, 30+1, &cb); GetData( 5, SQL_C_CHAR, (UCHAR*) (pDbInf->pTableInf+noTab)->tableRemarks, 254+1, &cb); + noTab++; - } // if (pass == 2) We now know the amount of Tables - } // while ((retcode = SQLFetch(hstmt)) == SQL_SUCCESS) - } // for (pass = 1; pass <= 2; pass++) + } // if + } // while + } // for SQLFreeStmt(hstmt, SQL_CLOSE); // Query how many columns are in each table @@ -2132,12 +2601,14 @@ wxDbInf *wxDB::GetCatalog(char *userID) { (pDbInf->pTableInf+noTab)->numCols = GetColumnCount((pDbInf->pTableInf+noTab)->tableName,UserID); } + return pDbInf; -} // wxDB::GetCatalog() + +} // wxDb::GetCatalog() -/********** wxDB::Catalog() **********/ -bool wxDB::Catalog(const char *userID, const char *fileName) +/********** wxDb::Catalog() **********/ +bool wxDb::Catalog(const char *userID, const char *fileName) /* * Creates the text file specified in 'filename' which will contain * a minimal data dictionary of all tables accessible by the user specified @@ -2148,8 +2619,8 @@ bool wxDB::Catalog(const char *userID, const char *fileName) * userID == "" ... UserID set equal to 'this->uid' * userID != "" ... UserID set equal to 'userID' * - * NOTE: ALL column bindings associated with this wxDB instance are unbound - * by this function. This function should use its own wxDB instance + * NOTE: ALL column bindings associated with this wxDb instance are unbound + * by this function. This function should use its own wxDb instance * to avoid undesired unbinding of columns. */ { @@ -2180,24 +2651,24 @@ bool wxDB::Catalog(const char *userID, const char *fileName) UserID = userID; } else - UserID = ""; + UserID = wxT(""); // dBase does not use user names, and some drivers fail if you try to pass one if (Dbms() == dbmsDBASE) - UserID = ""; + UserID = wxT(""); // Oracle user names may only be in uppercase, so force // the name to uppercase if (Dbms() == dbmsORACLE) UserID = UserID.Upper(); - if (wxStrcmp(UserID.GetData(),"") && + if (wxStrcmp(UserID.c_str(),wxT("")) && Dbms() != dbmsMY_SQL && Dbms() != dbmsACCESS) { retcode = SQLColumns(hstmt, NULL, 0, // All qualifiers - (UCHAR *) UserID.GetData(), SQL_NTS, // User specified + (UCHAR *) UserID.c_str(), SQL_NTS, // User specified NULL, 0, // All tables NULL, 0); // All columns } @@ -2217,12 +2688,12 @@ bool wxDB::Catalog(const char *userID, const char *fileName) } wxString outStr; - tblNameSave = ""; + tblNameSave = wxT(""); int cnt = 0; while ((retcode = SQLFetch(hstmt)) == SQL_SUCCESS) { - if (wxStrcmp(tblName,tblNameSave.GetData())) + if (wxStrcmp(tblName,tblNameSave.c_str())) { if (cnt) fputs("\n", fp); @@ -2231,9 +2702,9 @@ bool wxDB::Catalog(const char *userID, const char *fileName) fputs("===================== ", fp); fputs("========= ", fp); fputs("=========\n", fp); - outStr.sprintf("%-32s %-32s %-21s %9s %9s\n", - "TABLE NAME", "COLUMN NAME", "DATA TYPE", "PRECISION", "LENGTH"); - fputs(outStr.GetData(), fp); + outStr.sprintf(wxT("%-32s %-32s %-21s %9s %9s\n"), + wxT("TABLE NAME"), wxT("COLUMN NAME"), wxT("DATA TYPE"), wxT("PRECISION"), wxT("LENGTH")); + fputs(outStr.c_str(), fp); fputs("================================ ", fp); fputs("================================ ", fp); fputs("===================== ", fp); @@ -2251,7 +2722,7 @@ bool wxDB::Catalog(const char *userID, const char *fileName) outStr.sprintf("%-32s %-32s (%04d)%-15s %9d %9d\n", tblName, colName, sqlDataType, typeName, precision, length); - if (fputs(outStr.GetData(), fp) == EOF) + if (fputs(outStr.c_str(), fp) == EOF) { SQLFreeStmt(hstmt, SQL_CLOSE); fclose(fp); @@ -2268,10 +2739,10 @@ bool wxDB::Catalog(const char *userID, const char *fileName) fclose(fp); return(retcode == SQL_NO_DATA_FOUND); -} // wxDB::Catalog() +} // wxDb::Catalog() -bool wxDB::TableExists(const char *tableName, const char *userID, const char *tablePath) +bool wxDb::TableExists(const char *tableName, const char *userID, const char *tablePath) /* * Table name can refer to a table, view, alias or synonym. Returns true * if the object exists in the database. This function does not indicate @@ -2286,22 +2757,22 @@ bool wxDB::TableExists(const char *tableName, const char *userID, const char *ta { wxString UserID; wxString TableName; - + assert(tableName && wxStrlen(tableName)); - - if (Dbms() == dbmsDBASE) + + if (Dbms() == dbmsDBASE) { wxString dbName; if (tablePath && wxStrlen(tablePath)) - dbName.sprintf("%s/%s.dbf",tablePath,tableName); + dbName.sprintf("%s\\%s.dbf",tablePath,tableName); else dbName.sprintf("%s.dbf",tableName); - + bool exists; - exists = wxFileExists(dbName.GetData()); + exists = wxFileExists(dbName.c_str()); return exists; } - + if (userID) { if (!wxStrlen(userID)) @@ -2311,59 +2782,152 @@ bool wxDB::TableExists(const char *tableName, const char *userID, const char *ta } else UserID = ""; - + // Oracle user names may only be in uppercase, so force // the name to uppercase if (Dbms() == dbmsORACLE) UserID = UserID.Upper(); - + TableName = tableName; // Oracle table names are uppercase only, so force // the name to uppercase just in case programmer forgot to do this if (Dbms() == dbmsORACLE) TableName = TableName.Upper(); - + SQLFreeStmt(hstmt, SQL_CLOSE); RETCODE retcode; - + // MySQL and Access cannot accept a user name when looking up table names, so we // use the call below that leaves out the user name if (wxStrcmp(UserID,"") && - Dbms() != dbmsMY_SQL && - Dbms() != dbmsACCESS) + Dbms() != dbmsMY_SQL && + Dbms() != dbmsACCESS) { retcode = SQLTables(hstmt, - NULL, 0, // All qualifiers - (UCHAR *) UserID.GetData(), SQL_NTS, // All owners - (UCHAR FAR *)TableName.GetData(), SQL_NTS, - NULL, 0); // All table types + NULL, 0, // All qualifiers + (UCHAR *) UserID.c_str(), SQL_NTS, // All owners + (UCHAR FAR *)TableName.c_str(), SQL_NTS, + NULL, 0); // All table types } else { retcode = SQLTables(hstmt, - NULL, 0, // All qualifiers - NULL, 0, // All owners - (UCHAR FAR *)TableName.GetData(), SQL_NTS, - NULL, 0); // All table types + NULL, 0, // All qualifiers + NULL, 0, // All owners + (UCHAR FAR *)TableName.c_str(), SQL_NTS, + NULL, 0); // All table types } if (retcode != SQL_SUCCESS) return(DispAllErrors(henv, hdbc, hstmt)); - + retcode = SQLFetch(hstmt); if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) { SQLFreeStmt(hstmt, SQL_CLOSE); return(DispAllErrors(henv, hdbc, hstmt)); } - + SQLFreeStmt(hstmt, SQL_CLOSE); + return(TRUE); - -} // wxDB::TableExists() + +} // wxDb::TableExists() -/********** wxDB::SqlLog() **********/ -bool wxDB::SqlLog(wxSqlLogState state, const char *filename, bool append) +#if EXPERIMENTAL_WXDB_FUNCTIONS // will be added in 2.4 +/********** wxDB::TablePrivileges() **********/ +bool wxDB::TablePrivileges(const char *tableName, const char* priv, + const char *userID, const char *tablePath) +{ + wxDbTablePrivilegeInfo result; + SDWORD cbRetVal; + RETCODE retcode; + + //We probably need to be able to dynamically set this based on + //the driver type, and state. + char curRole[]="public"; + + //Prologue here similar to db::TableExists() + wxString UserID; + wxString TableName; + + assert(tableName && wxStrlen(tableName)); + + if (userID) + { + if (!wxStrlen(userID)) + UserID = uid; + else + UserID = userID; + } + else + UserID = ""; + + // Oracle user names may only be in uppercase, so force + // the name to uppercase + if (Dbms() == dbmsORACLE) + UserID = UserID.Upper(); + + TableName = tableName; + // Oracle table names are uppercase only, so force + // the name to uppercase just in case programmer forgot to do this + if (Dbms() == dbmsORACLE) + TableName = TableName.Upper(); + + SQLFreeStmt(hstmt, SQL_CLOSE); + + retcode = SQLTablePrivileges(hstmt, + NULL, 0, // All qualifiers + NULL, 0, // All owners + (UCHAR FAR *)TableName.GetData(), SQL_NTS); + +#ifdef DBDEBUG_CONSOLE + fprintf(stderr ,"SQLTablePrivileges() returned %i \n",retcode); +#endif + retcode = SQLBindCol (hstmt, 1, SQL_C_CHAR , &result.tableQual, 128, &cbRetVal); + + retcode = SQLBindCol (hstmt, 2, SQL_C_CHAR , &result.tableOwner, 128, &cbRetVal); + + retcode = SQLBindCol (hstmt, 3, SQL_C_CHAR , &result.tableName, 128, &cbRetVal); + + retcode = SQLBindCol (hstmt, 4, SQL_C_CHAR , &result.grantor, 128, &cbRetVal); + + retcode = SQLBindCol (hstmt, 5, SQL_C_CHAR , &result.grantee, 128, &cbRetVal); + + retcode = SQLBindCol (hstmt, 6, SQL_C_CHAR , &result.privilege, 128, &cbRetVal); + + retcode = SQLBindCol (hstmt, 7, SQL_C_CHAR , &result.grantable, 3, &cbRetVal); + + retcode = SQLFetch(hstmt); + while (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) + { +#ifdef DBDEBUG_CONSOLE + fprintf(stderr,"Scanning %s privilege on table %s.%s granted by %s to %s\n", + result.privilege,result.tabowner,result.tabname, + result.grantor, result.grantee); +#endif + if (UserID.IsSameAs(result.tableOwner,false) ) + return TRUE; + + if (UserID.IsSameAs(result.grantee,false) && + !strcmp(result.privilege,priv)) + return TRUE; + + if (!strcmp(result.grantee,curRole) && + !strcmp(result.privilege,priv)) + return TRUE; + + retcode = SQLFetch(hstmt); + } + + return FALSE; + +} // wxDB::TablePrivileges +#endif + + +/********** wxDb::SetSqlLogging() **********/ +bool wxDb::SetSqlLogging(wxDbSqlLogState state, const char *filename, bool append) { assert(state == sqlLogON || state == sqlLogOFF); assert(state == sqlLogOFF || filename); @@ -2390,11 +2954,11 @@ bool wxDB::SqlLog(wxSqlLogState state, const char *filename, bool append) sqlLogState = state; return(TRUE); -} // wxDB::SqlLog() +} // wxDb::SetSqlLogging() -/********** wxDB::WriteSqlLog() **********/ -bool wxDB::WriteSqlLog(const char *logMsg) +/********** wxDb::WriteSqlLog() **********/ +bool wxDb::WriteSqlLog(const wxChar *logMsg) { assert(logMsg); @@ -2407,18 +2971,18 @@ bool wxDB::WriteSqlLog(const char *logMsg) return(TRUE); -} // wxDB::WriteSqlLog() +} // wxDb::WriteSqlLog() -/********** wxDB::Dbms() **********/ -wxDBMS wxDB::Dbms(void) +/********** wxDb::Dbms() **********/ +wxDBMS wxDb::Dbms(void) /* * Be aware that not all database engines use the exact same syntax, and not * every ODBC compliant database is compliant to the same level of compliancy. * Some manufacturers support the minimum Level 1 compliancy, and others up * through Level 3. Others support subsets of features for levels above 1. * - * If you find an inconsistency between the wxDB class and a specific database + * If you find an inconsistency between the wxDb class and a specific database * engine, and an identifier to this section, and special handle the database in * the area where behavior is non-conforming with the other databases. * @@ -2445,24 +3009,45 @@ wxDBMS wxDB::Dbms(void) * * SYBASE (Enterprise) * - If a column is part of the Primary Key, the column cannot be NULL + * - Maximum row size is somewhere in the neighborhood of 1920 bytes * * MY_SQL * - If a column is part of the Primary Key, the column cannot be NULL * - Cannot support selecting for update [::CanSelectForUpdate()]. Always returns FALSE + * - Columns that are part of primary or secondary keys must be defined as being NOT NULL + * when they are created. Some code is added in ::CreateIndex to try to adjust the + * column definition if it is not defined correctly, but it is experimental + * - Does not support sub-queries in SQL statements * * POSTGRES * - Does not support the keywords 'ASC' or 'DESC' as of release v6.5.0 - * + * - Does not support sub-queries in SQL statements * */ { wxChar baseName[25+1]; - wxStrncpy(baseName,dbInf.dbmsName,25); + baseName[25] = 0; + + // BJO 20000428 : add support for Virtuoso + if (!wxStricmp(dbInf.dbmsName,"OpenLink Virtuoso VDBMS")) + return(dbmsVIRTUOSO); + + if (!wxStricmp(dbInf.dbmsName,"Adaptive Server Anywhere")) return(dbmsSYBASE_ASA); - if (!wxStricmp(dbInf.dbmsName,"SQL Server")) // Sybase Adaptive Server - return(dbmsSYBASE_ASE); + + // BJO 20000427 : The "SQL Server" string is also returned by SQLServer when + // connected through an OpenLink driver. + // Is it also returned by Sybase Adapatitve server? + // OpenLink driver name is OLOD3032.DLL for msw and oplodbc.so for unix + if (!wxStricmp(dbInf.dbmsName,"SQL Server")) + { + if (!wxStrncmp(dbInf.driverName, "oplodbc", 7) || + !wxStrncmp(dbInf.driverName, "OLOD", 4)) + return dbmsMS_SQL_SERVER; else return dbmsSYBASE_ASE; + } + if (!wxStricmp(dbInf.dbmsName,"Microsoft SQL Server")) return(dbmsMS_SQL_SERVER); if (!wxStricmp(dbInf.dbmsName,"MySQL")) @@ -2481,17 +3066,20 @@ wxDBMS wxDB::Dbms(void) return(dbmsACCESS); if (!wxStricmp(dbInf.dbmsName,"MySQL")) return(dbmsMY_SQL); + if (!wxStricmp(baseName,"Sybase")) + return(dbmsSYBASE_ASE); baseName[5] = 0; if (!wxStricmp(baseName,"DBASE")) return(dbmsDBASE); return(dbmsUNIDENTIFIED); -} // wxDB::Dbms() + +} // wxDb::Dbms() /********** wxDbGetConnection() **********/ -wxDB WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors) +wxDb WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors) { wxDbList *pList; @@ -2501,7 +3089,9 @@ wxDB WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCurso { // The database connection must be for the same datasource // name and must currently not be in use. - if (pList->Free && (! wxStrcmp(pDbConfig->Dsn, pList->Dsn))) // Found a free connection + if (pList->Free && + (pList->PtrDb->FwdOnlyCursors() == FwdOnlyCursors) && + (!wxStrcmp(pDbConfig->Dsn, pList->Dsn))) // Found a free connection { pList->Free = FALSE; return(pList->PtrDb); @@ -2519,7 +3109,7 @@ wxDB WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCurso pList->PtrNext->PtrPrev = pList; pList = pList->PtrNext; } - else // Empty list + else // Empty list { // Create the first node on the list pList = PtrBegDbList = new wxDbList; @@ -2530,12 +3120,12 @@ wxDB WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCurso pList->PtrNext = 0; pList->Free = FALSE; wxStrcpy(pList->Dsn, pDbConfig->Dsn); - pList->PtrDb = new wxDB(pDbConfig->Henv,FwdOnlyCursors); + pList->PtrDb = new wxDb(pDbConfig->Henv,FwdOnlyCursors); // Connect to the datasource if (pList->PtrDb->Open(pDbConfig->Dsn, pDbConfig->Uid, pDbConfig->AuthStr)) { - pList->PtrDb->SqlLog(SQLLOGstate,SQLLOGfn,TRUE); + pList->PtrDb->SetSqlLogging(SQLLOGstate,SQLLOGfn,TRUE); return(pList->PtrDb); } else // Unable to connect, destroy list item @@ -2544,9 +3134,9 @@ wxDB WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCurso pList->PtrPrev->PtrNext = 0; else PtrBegDbList = 0; // Empty list again - pList->PtrDb->CommitTrans(); // Commit any open transactions on wxDB object - pList->PtrDb->Close(); // Close the wxDB object - delete pList->PtrDb; // Deletes the wxDB object + pList->PtrDb->CommitTrans(); // Commit any open transactions on wxDb object + pList->PtrDb->Close(); // Close the wxDb object + delete pList->PtrDb; // Deletes the wxDb object delete pList; // Deletes the linked list object return(0); } @@ -2555,15 +3145,15 @@ wxDB WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCurso /********** wxDbFreeConnection() **********/ -bool WXDLLEXPORT wxDbFreeConnection(wxDB *pDb) +bool WXDLLEXPORT wxDbFreeConnection(wxDb *pDb) { wxDbList *pList; // Scan the linked list searching for the database connection for (pList = PtrBegDbList; pList; pList = pList->PtrNext) { - if (pList->PtrDb == pDb) // Found it!!! - return(pList->Free = TRUE); + if (pList->PtrDb == pDb) // Found it, now free it!!! + return (pList->Free = TRUE); } // Never found the database object, return failure @@ -2581,9 +3171,9 @@ void WXDLLEXPORT wxDbCloseConnections(void) for (pList = PtrBegDbList; pList; pList = pNext) { pNext = pList->PtrNext; // Save the pointer to next - pList->PtrDb->CommitTrans(); // Commit any open transactions on wxDB object - pList->PtrDb->Close(); // Close the wxDB object - delete pList->PtrDb; // Deletes the wxDB object + pList->PtrDb->CommitTrans(); // Commit any open transactions on wxDb object + pList->PtrDb->Close(); // Close the wxDb object + delete pList->PtrDb; // Deletes the wxDb object delete pList; // Deletes the linked list object } @@ -2612,27 +3202,27 @@ int WXDLLEXPORT wxDbConnectionsInUse(void) /********** wxDbSqlLog() **********/ -bool wxDbSqlLog(wxSqlLogState state, char *filename) +bool wxDbSqlLog(wxDbSqlLogState state, const wxChar *filename) { bool append = FALSE; wxDbList *pList; for (pList = PtrBegDbList; pList; pList = pList->PtrNext) { - if (!pList->PtrDb->SqlLog(state,filename,append)) + if (!pList->PtrDb->SetSqlLogging(state,filename,append)) return(FALSE); append = TRUE; } SQLLOGstate = state; - wxStrcpy(SQLLOGfn,filename); + SQLLOGfn = filename; return(TRUE); } // wxDbSqlLog() -#if 0 +#if EXPERIMENTAL_WXDB_FUNCTIONS // will be added in 2.4 /********** wxDbCreateDataSource() **********/ int wxDbCreateDataSource(const char *driverName, const char *dsn, const char *description, bool sysDSN, const char *defDir, wxWindow *parent) @@ -2669,7 +3259,7 @@ int wxDbCreateDataSource(const char *driverName, const char *dsn, const char *de while (k != wxNOT_FOUND); result = SQLConfigDataSource((HWND)parent->GetHWND(), dsnLocation, - driverName, setupStr.GetData()); + driverName, setupStr.c_str()); if (!result) { @@ -2682,26 +3272,25 @@ int wxDbCreateDataSource(const char *driverName, const char *dsn, const char *de SQLInstallerError(1,&retcode,errMsg,500,&cb); if (retcode) { -// logError(errMsg, sqlState); -// if (!silent) -// { + if (!silent) + { #ifdef DBDEBUG_CONSOLE - // When run in console mode, use standard out to display errors. - cout << errMsg << endl; - cout << "Press any key to continue..." << endl; - getchar(); + // When run in console mode, use standard out to display errors. + cout << errMsg << endl; + cout << "Press any key to continue..." << endl; + getchar(); #endif // DBDEBUG_CONSOLE -// } #ifdef __WXDEBUG__ - wxLogDebug(errMsg,"DEBUG MESSAGE"); + wxLogDebug(errMsg,wxT("ODBC DEBUG MESSAGE")); #endif // __WXDEBUG__ + } } } else result = TRUE; -#else // __WXMSW__ +#else // using iODBC, so this function is not supported #ifdef __WXDEBUG__ wxLogDebug("wxDbCreateDataSource() not available except under MSW","DEBUG MESSAGE"); #endif @@ -2733,7 +3322,7 @@ bool wxDbGetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD D // Change this to 0 to remove use of all deprecated functions -#if 1 +#if wxODBC_BACKWARD_COMPATABILITY /******************************************************************** ******************************************************************** * @@ -2742,9 +3331,9 @@ bool wxDbGetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD D * ******************************************************************** ********************************************************************/ -bool SqlLog(sqlLog state, char *filename) +bool SqlLog(sqlLog state, const wxChar *filename) { - return wxDbSqlLog((enum wxSqlLogState)state, filename); + return wxDbSqlLog((enum wxDbSqlLogState)state, filename); } /***** DEPRECATED: use wxGetDataSource() *****/ bool GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax, @@ -2753,12 +3342,12 @@ bool GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDes return wxDbGetDataSource(henv, Dsn, DsnMax, DsDesc, DsDescMax, direction); } /***** DEPRECATED: use wxDbGetConnection() *****/ -wxDB WXDLLEXPORT *GetDbConnection(DbStuff *pDbStuff, bool FwdOnlyCursors) +wxDb WXDLLEXPORT *GetDbConnection(DbStuff *pDbStuff, bool FwdOnlyCursors) { return wxDbGetConnection((wxDbConnectInf *)pDbStuff, FwdOnlyCursors); } /***** DEPRECATED: use wxDbFreeConnection() *****/ -bool WXDLLEXPORT FreeDbConnection(wxDB *pDb) +bool WXDLLEXPORT FreeDbConnection(wxDb *pDb) { return wxDbFreeConnection(pDb); } @@ -2775,8 +3364,5 @@ int WXDLLEXPORT NumberDbConnectionsInUse(void) #endif - - - #endif // wxUSE_ODBC diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 817c5332bf..b7bfd8eb4c 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -1,13 +1,10 @@ /////////////////////////////////////////////////////////////////////////////// // Name: dbtable.cpp -// Purpose: Implementation of the wxTable class. +// Purpose: Implementation of the wxDbTable class. // Author: Doug Card // Modified by: George Tasker -// Mods: April 1999 -// -Dynamic cursor support - Only one predefined cursor, as many others as -// you need may be created on demand -// -Reduced number of active cursors significantly -// -Query-Only wxTable objects +// Bart Jourquin +// Mark Johnson // Created: 9.96 // RCS-ID: $Id$ // Copyright: (c) 1996 Remstar International, Inc. @@ -31,19 +28,20 @@ // Use this line for wxWindows v1.x //#include "wx_ver.h" // Use this line for wxWindows v2.x -#include "wx/version.h" #include "wx/wxprec.h" +#include "wx/version.h" #if wxMAJOR_VERSION == 2 -# ifdef __GNUG__ -# pragma implementation "dbtable.h" -# endif + #ifdef __GNUG__ + #pragma implementation "dbtable.h" + #endif #endif #ifdef DBDEBUG_CONSOLE #include "wx/ioswrap.h" #endif + #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ @@ -71,6 +69,7 @@ # define wxUSE_ODBC 1 #endif + #if wxUSE_ODBC #include @@ -103,11 +102,11 @@ ULONG lastTableID = 0; #endif -/********** wxTable::wxTable() **********/ -wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, +/********** wxDbTable::wxDbTable() **********/ +wxDbTable::wxDbTable(wxDb *pwxDb, const char *tblName, const int nCols, const char *qryTblName, bool qryOnly, const char *tblPath) { - pDb = pwxDB; // Pointer to the wxDB object + pDb = pwxDb; // Pointer to the wxDb object henv = 0; hdbc = 0; hstmt = 0; @@ -120,32 +119,33 @@ wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, colDefs = 0; tableID = 0; noCols = nCols; // No. of cols in the table - where = 0; // Where clause - orderBy = 0; // Order By clause - from = 0; // From clause + where = ""; // Where clause + orderBy = ""; // Order By clause + from = ""; // From clause selectForUpdate = FALSE; // SELECT ... FOR UPDATE; Indicates whether to include the FOR UPDATE phrase queryOnly = qryOnly; + insertable = TRUE; assert (tblName); wxStrcpy(tableName, tblName); // Table Name if (tblPath) wxStrcpy(tablePath, tblPath); // Table Path - used for dBase files - + if (qryTblName) // Name of the table/view to query wxStrcpy(queryTableName, qryTblName); else wxStrcpy(queryTableName, tblName); - + if (!pDb) return; - - pDb->nTables++; - + + pDb->incrementTableCount(); + wxString s; tableID = ++lastTableID; - s.sprintf("wxTable constructor (%-20s) tableID:[%6lu] pDb:[%p]", tblName,tableID,pDb); - + s.sprintf("wxDbTable constructor (%-20s) tableID:[%6lu] pDb:[%p]", tblName,tableID,pDb); + #ifdef __WXDEBUG__ wxTablesInUse *tableInUse; tableInUse = new wxTablesInUse(); @@ -154,17 +154,17 @@ wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, tableInUse->pDb = pDb; TablesInUse.Append(tableInUse); #endif - - pDb->WriteSqlLog(s.GetData()); - - // Grab the HENV and HDBC from the wxDB object - henv = pDb->henv; - hdbc = pDb->hdbc; - + + pDb->WriteSqlLog(s.c_str()); + + // Grab the HENV and HDBC from the wxDb object + henv = pDb->GetHENV(); + hdbc = pDb->GetHDBC(); + // Allocate space for column definitions if (noCols) - colDefs = new wxColDef[noCols]; // Points to the first column defintion - + colDefs = new wxDbColDef[noCols]; // Points to the first column defintion + // Allocate statement handles for the table if (!queryOnly) { @@ -181,11 +181,12 @@ wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, // Allocate a separate statement handle for internal use if (SQLAllocStmt(hdbc, &hstmtInternal) != SQL_SUCCESS) pDb->DispAllErrors(henv, hdbc); - + // Set the cursor type for the statement handles cursorType = SQL_CURSOR_STATIC; + if (SQLSetStmtOption(hstmtInternal, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) - { + { // Check to see if cursor type is supported pDb->GetNextError(henv, hdbc, hstmtInternal); if (! wxStrcmp(pDb->sqlState, "01S02")) // Option Value Changed @@ -200,16 +201,32 @@ wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, switch(cursorType) { case SQL_CURSOR_FORWARD_ONLY: - cout << "Forward Only"; break; + cout << "Forward Only"; + break; case SQL_CURSOR_STATIC: - cout << "Static"; break; + cout << "Static"; + break; case SQL_CURSOR_KEYSET_DRIVEN: - cout << "Keyset Driven"; break; + cout << "Keyset Driven"; + break; case SQL_CURSOR_DYNAMIC: - cout << "Dynamic"; break; + cout << "Dynamic"; + break; } cout << endl << endl; #endif + // BJO20000425 + if (pDb->FwdOnlyCursors() && cursorType != SQL_CURSOR_FORWARD_ONLY) + { + // Force the use of a forward only cursor... + cursorType = SQL_CURSOR_FORWARD_ONLY; + if (SQLSetStmtOption(hstmtInternal, SQL_CURSOR_TYPE, cursorType) != SQL_SUCCESS) + { + // Should never happen + pDb->GetNextError(henv, hdbc, hstmtInternal); + return; + } + } } else { @@ -221,7 +238,7 @@ wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, else cout << "Cursor Type set to STATIC" << endl << endl; #endif - + if (!queryOnly) { // Set the cursor type for the INSERT statement handle @@ -234,23 +251,23 @@ wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, if (SQLSetStmtOption(hstmtUpdate, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY) != SQL_SUCCESS) pDb->DispAllErrors(henv, hdbc, hstmtUpdate); } - + // Make the default cursor the active cursor - hstmtDefault = NewCursor(FALSE,FALSE); + hstmtDefault = GetNewCursor(FALSE,FALSE); assert(hstmtDefault); hstmt = *hstmtDefault; - -} // wxTable::wxTable() + +} // wxDbTable::wxDbTable() -/********** wxTable::~wxTable() **********/ -wxTable::~wxTable() +/********** wxDbTable::~wxDbTable() **********/ +wxDbTable::~wxDbTable() { wxString s; if (pDb) { - s.sprintf("wxTable destructor (%-20s) tableID:[%6lu] pDb:[%p]", tableName,tableID,pDb); - pDb->WriteSqlLog(s.GetData()); + s.sprintf("wxDbTable destructor (%-20s) tableID:[%6lu] pDb:[%p]", tableName,tableID,pDb); + pDb->WriteSqlLog(s.c_str()); } #ifdef __WXDEBUG__ @@ -267,7 +284,7 @@ wxTable::~wxTable() { found = TRUE; if (!TablesInUse.DeleteNode(pNode)) - wxLogDebug (s.GetData(),"Unable to delete node!"); + wxLogDebug (s.c_str(),wxT("Unable to delete node!")); } else pNode = pNode->Next(); @@ -275,17 +292,15 @@ wxTable::~wxTable() if (!found) { wxString msg; - msg.sprintf("Unable to find the tableID in the linked\nlist of tables in use.\n\n%s",s.GetData()); - wxLogDebug (msg.GetData(),"NOTICE..."); + msg.sprintf(wxT("Unable to find the tableID in the linked\nlist of tables in use.\n\n%s"),s.c_str()); + wxLogDebug (msg.c_str(),wxT("NOTICE...")); } } #endif - - - // Decrement the wxDB table count + // Decrement the wxDb table count if (pDb) - pDb->nTables--; + pDb->decrementTableCount(); // Delete memory allocated for column definitions if (colDefs) @@ -300,12 +315,13 @@ wxTable::~wxTable() if (hstmtDelete) if (SQLFreeStmt(hstmtDelete, SQL_DROP) != SQL_SUCCESS) + pDb->DispAllErrors(henv, hdbc); if (hstmtUpdate) if (SQLFreeStmt(hstmtUpdate, SQL_DROP) != SQL_SUCCESS) pDb->DispAllErrors(henv, hdbc); - } + if (hstmtInternal) if (SQLFreeStmt(hstmtInternal, SQL_DROP) != SQL_SUCCESS) pDb->DispAllErrors(henv, hdbc); @@ -317,8 +333,7 @@ wxTable::~wxTable() if (hstmtCount) DeleteCursor(hstmtCount); - -} // wxTable::~wxTable() +} // wxDbTable::~wxDbTable() @@ -326,8 +341,8 @@ wxTable::~wxTable() -/********** wxTable::bindInsertParams() **********/ -bool wxTable::bindInsertParams(void) +/********** wxDbTable::bindInsertParams() **********/ +bool wxDbTable::bindInsertParams(void) { assert(!queryOnly); if (queryOnly) @@ -345,35 +360,35 @@ bool wxTable::bindInsertParams(void) continue; switch(colDefs[i].DbDataType) { - case DB_DATA_TYPE_VARCHAR: - fSqlType = pDb->typeInfVarchar.FsqlType; - precision = colDefs[i].SzDataObj; - scale = 0; - colDefs[i].CbValue = SQL_NTS; - break; - case DB_DATA_TYPE_INTEGER: - fSqlType = pDb->typeInfInteger.FsqlType; - precision = pDb->typeInfInteger.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_FLOAT: - fSqlType = pDb->typeInfFloat.FsqlType; - precision = pDb->typeInfFloat.Precision; - scale = pDb->typeInfFloat.MaximumScale; - // SQL Sybase Anywhere v5.5 returned a negative number for the - // MaxScale. This caused ODBC to kick out an error on ibscale. - // I check for this here and set the scale = precision. - //if (scale < 0) - // scale = (short) precision; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_DATE: - fSqlType = pDb->typeInfDate.FsqlType; - precision = pDb->typeInfDate.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; + case DB_DATA_TYPE_VARCHAR: + fSqlType = pDb->GetTypeInfVarchar().FsqlType; + precision = colDefs[i].SzDataObj; + scale = 0; + colDefs[i].CbValue = SQL_NTS; + break; + case DB_DATA_TYPE_INTEGER: + fSqlType = pDb->GetTypeInfInteger().FsqlType; + precision = pDb->GetTypeInfInteger().Precision; + scale = 0; + colDefs[i].CbValue = 0; + break; + case DB_DATA_TYPE_FLOAT: + fSqlType = pDb->GetTypeInfFloat().FsqlType; + precision = pDb->GetTypeInfFloat().Precision; + scale = pDb->GetTypeInfFloat().MaximumScale; + // SQL Sybase Anywhere v5.5 returned a negative number for the + // MaxScale. This caused ODBC to kick out an error on ibscale. + // I check for this here and set the scale = precision. + //if (scale < 0) + // scale = (short) precision; + colDefs[i].CbValue = 0; + break; + case DB_DATA_TYPE_DATE: + fSqlType = pDb->GetTypeInfDate().FsqlType; + precision = pDb->GetTypeInfDate().Precision; + scale = 0; + colDefs[i].CbValue = 0; + break; } // Null values if (colDefs[i].Null) @@ -381,25 +396,28 @@ bool wxTable::bindInsertParams(void) colDefs[i].CbValue = SQL_NULL_DATA; colDefs[i].Null = FALSE; } + if (SQLBindParameter(hstmtInsert, colNo++, SQL_PARAM_INPUT, colDefs[i].SqlCtype, - fSqlType, precision, scale, (UCHAR*) colDefs[i].PtrDataObj, - precision+1,&colDefs[i].CbValue) != SQL_SUCCESS) + fSqlType, precision, scale, (UCHAR*) colDefs[i].PtrDataObj, + precision+1,&colDefs[i].CbValue) != SQL_SUCCESS) + { return(pDb->DispAllErrors(henv, hdbc, hstmtInsert)); + } } // Completed successfully return(TRUE); -} // wxTable::bindInsertParams() +} // wxDbTable::bindInsertParams() -/********** wxTable::bindUpdateParams() **********/ -bool wxTable::bindUpdateParams(void) +/********** wxDbTable::bindUpdateParams() **********/ +bool wxDbTable::bindUpdateParams(void) { assert(!queryOnly); if (queryOnly) return(FALSE); - + SWORD fSqlType = 0; UDWORD precision = 0; SWORD scale = 0; @@ -412,50 +430,53 @@ bool wxTable::bindUpdateParams(void) continue; switch(colDefs[i].DbDataType) { - case DB_DATA_TYPE_VARCHAR: - fSqlType = pDb->typeInfVarchar.FsqlType; - precision = colDefs[i].SzDataObj; - scale = 0; - colDefs[i].CbValue = SQL_NTS; - break; - case DB_DATA_TYPE_INTEGER: - fSqlType = pDb->typeInfInteger.FsqlType; - precision = pDb->typeInfInteger.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_FLOAT: - fSqlType = pDb->typeInfFloat.FsqlType; - precision = pDb->typeInfFloat.Precision; - scale = pDb->typeInfFloat.MaximumScale; - // SQL Sybase Anywhere v5.5 returned a negative number for the - // MaxScale. This caused ODBC to kick out an error on ibscale. - // I check for this here and set the scale = precision. - //if (scale < 0) - // scale = (short) precision; - colDefs[i].CbValue = 0; - break; - case DB_DATA_TYPE_DATE: - fSqlType = pDb->typeInfDate.FsqlType; - precision = pDb->typeInfDate.Precision; - scale = 0; - colDefs[i].CbValue = 0; - break; + case DB_DATA_TYPE_VARCHAR: + fSqlType = pDb->GetTypeInfVarchar().FsqlType; + precision = colDefs[i].SzDataObj; + scale = 0; + colDefs[i].CbValue = SQL_NTS; + break; + case DB_DATA_TYPE_INTEGER: + fSqlType = pDb->GetTypeInfInteger().FsqlType; + precision = pDb->GetTypeInfInteger().Precision; + scale = 0; + colDefs[i].CbValue = 0; + break; + case DB_DATA_TYPE_FLOAT: + fSqlType = pDb->GetTypeInfFloat().FsqlType; + precision = pDb->GetTypeInfFloat().Precision; + scale = pDb->GetTypeInfFloat().MaximumScale; + // SQL Sybase Anywhere v5.5 returned a negative number for the + // MaxScale. This caused ODBC to kick out an error on ibscale. + // I check for this here and set the scale = precision. + //if (scale < 0) + // scale = (short) precision; + colDefs[i].CbValue = 0; + break; + case DB_DATA_TYPE_DATE: + fSqlType = pDb->GetTypeInfDate().FsqlType; + precision = pDb->GetTypeInfDate().Precision; + scale = 0; + colDefs[i].CbValue = 0; + break; } + if (SQLBindParameter(hstmtUpdate, colNo++, SQL_PARAM_INPUT, colDefs[i].SqlCtype, fSqlType, precision, scale, (UCHAR*) colDefs[i].PtrDataObj, precision+1, &colDefs[i].CbValue) != SQL_SUCCESS) + { return(pDb->DispAllErrors(henv, hdbc, hstmtUpdate)); + } } - + // Completed successfully return(TRUE); -} // wxTable::bindUpdateParams() +} // wxDbTable::bindUpdateParams() -/********** wxTable::bindCols() **********/ -bool wxTable::bindCols(HSTMT cursor) +/********** wxDbTable::bindCols() **********/ +bool wxDbTable::bindCols(HSTMT cursor) { static SDWORD cb; @@ -464,18 +485,20 @@ bool wxTable::bindCols(HSTMT cursor) for (i = 0; i < noCols; i++) { if (SQLBindCol(cursor, i+1, colDefs[i].SqlCtype, (UCHAR*) colDefs[i].PtrDataObj, - colDefs[i].SzDataObj, &cb) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, cursor)); + colDefs[i].SzDataObj, &cb) != SQL_SUCCESS) + { + return (pDb->DispAllErrors(henv, hdbc, cursor)); + } } // Completed successfully return(TRUE); -} // wxTable::bindCols() +} // wxDbTable::bindCols() -/********** wxTable::getRec() **********/ -bool wxTable::getRec(UWORD fetchType) +/********** wxDbTable::getRec() **********/ +bool wxDbTable::getRec(UWORD fetchType) { RETCODE retcode; @@ -487,10 +510,12 @@ bool wxTable::getRec(UWORD fetchType) retcode = SQLExtendedFetch(hstmt, fetchType, 0, &cRowsFetched, &rowStatus); if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) + { if (retcode == SQL_NO_DATA_FOUND) return(FALSE); else return(pDb->DispAllErrors(henv, hdbc, hstmt)); + } } else { @@ -508,11 +533,11 @@ bool wxTable::getRec(UWORD fetchType) // Completed successfully return(TRUE); -} // wxTable::getRec() +} // wxDbTable::getRec() -/********** wxTable::execDelete() **********/ -bool wxTable::execDelete(const char *pSqlStmt) +/********** wxDbTable::execDelete() **********/ +bool wxDbTable::execDelete(const char *pSqlStmt) { // Execute the DELETE statement if (SQLExecDirect(hstmtDelete, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS) @@ -521,11 +546,11 @@ bool wxTable::execDelete(const char *pSqlStmt) // Record deleted successfully return(TRUE); -} // wxTable::execDelete() +} // wxDbTable::execDelete() -/********** wxTable::execUpdate() **********/ -bool wxTable::execUpdate(const char *pSqlStmt) +/********** wxDbTable::execUpdate() **********/ +bool wxDbTable::execUpdate(const char *pSqlStmt) { // Execute the UPDATE statement if (SQLExecDirect(hstmtUpdate, (UCHAR FAR *) pSqlStmt, SQL_NTS) != SQL_SUCCESS) @@ -534,11 +559,11 @@ bool wxTable::execUpdate(const char *pSqlStmt) // Record deleted successfully return(TRUE); -} // wxTable::execUpdate() +} // wxDbTable::execUpdate() -/********** wxTable::query() **********/ -bool wxTable::query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt) +/********** wxDbTable::query() **********/ +bool wxDbTable::query(int queryType, bool forUpdate, bool distinct, const char *pSqlStmt) { char sqlStmt[DB_MAX_STATEMENT_LEN]; @@ -551,36 +576,46 @@ bool wxTable::query(int queryType, bool forUpdate, bool distinct, char *pSqlStmt // Set the SQL SELECT string if (queryType != DB_SELECT_STATEMENT) // A select statement was not passed in, - { // so generate a select statement. - GetSelectStmt(sqlStmt, queryType, distinct); + { // so generate a select statement. + BuildSelectStmt(sqlStmt, queryType, distinct); pDb->WriteSqlLog(sqlStmt); } + else + wxStrcpy(sqlStmt, pSqlStmt); + + SQLFreeStmt(hstmt, SQL_CLOSE); + if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt, SQL_NTS) == SQL_SUCCESS) + return(TRUE); + else + { + pDb->DispAllErrors(henv, hdbc, hstmt); + return(FALSE); + } // Make sure the cursor is closed first if (! CloseCursor(hstmt)) return(FALSE); // Execute the SQL SELECT statement - int retcode; - - retcode = SQLExecDirect(hstmt, (UCHAR FAR *) (queryType == DB_SELECT_STATEMENT ? pSqlStmt : sqlStmt), SQL_NTS); + int retcode; + retcode = SQLExecDirect(hstmt, (UCHAR FAR *) (queryType == DB_SELECT_STATEMENT ? pSqlStmt : sqlStmt), SQL_NTS); if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) return(pDb->DispAllErrors(henv, hdbc, hstmt)); // Completed successfully return(TRUE); -} // wxTable::query() +} // wxDbTable::query() /***************************** PUBLIC FUNCTIONS *****************************/ -/********** wxTable::Open() **********/ -bool wxTable::Open(void) +/********** wxDbTable::Open() **********/ +bool wxDbTable::Open(void) { if (!pDb) - return FALSE; + return FALSE; int i; wxString sqlStmt; @@ -590,30 +625,34 @@ bool wxTable::Open(void) { wxString s; if (wxStrcmp(tablePath,"")) - s.sprintf("Error opening '%s/%s'.\n",tablePath,tableName); + s.sprintf(wxT("Error opening '%s/%s'.\n"),tablePath,tableName); else - s.sprintf("Error opening '%s'.\n", tableName); + s.sprintf(wxT("Error opening '%s'.\n"), tableName); if (!pDb->TableExists(tableName,NULL,tablePath)) - s += "Table/view does not exist in the database.\n"; + s += wxT("Table/view does not exist in the database.\n"); else - s += "Current logged in user does not have sufficient privileges to access this table.\n"; - pDb->LogError(s.GetData()); + s += wxT("Current logged in user does not have sufficient privileges to access this table.\n"); + pDb->LogError(s.c_str()); return(FALSE); } // Bind the member variables for field exchange between - // the wxTable object and the ODBC record. + // the wxDbTable object and the ODBC record. if (!queryOnly) { if (!bindInsertParams()) // Inserts return(FALSE); + if (!bindUpdateParams()) // Updates return(FALSE); } + if (!bindCols(*hstmtDefault)) // Selects return(FALSE); + if (!bindCols(hstmtInternal)) // Internal use only return(FALSE); + /* * Do NOT bind the hstmtCount cursor!!! */ @@ -634,6 +673,9 @@ bool wxTable::Open(void) } needComma = FALSE; sqlStmt += ") VALUES ("; + + int insertableCount = 0; + for (i = 0; i < noCols; i++) { if (! colDefs[i].InsertAllowed) @@ -642,113 +684,121 @@ bool wxTable::Open(void) sqlStmt += ","; sqlStmt += "?"; needComma = TRUE; + insertableCount++; } sqlStmt += ")"; - -// pDb->WriteSqlLog(sqlStmt); - + // Prepare the insert statement for execution - if (SQLPrepare(hstmtInsert, (UCHAR FAR *) sqlStmt.GetData(), SQL_NTS) != SQL_SUCCESS) - return(pDb->DispAllErrors(henv, hdbc, hstmtInsert)); + if (insertableCount) + { + if (SQLPrepare(hstmtInsert, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS) + return(pDb->DispAllErrors(henv, hdbc, hstmtInsert)); + } + else + insertable= FALSE; } // Completed successfully return(TRUE); -} // wxTable::Open() +} // wxDbTable::Open() -/********** wxTable::Query() **********/ -bool wxTable::Query(bool forUpdate, bool distinct) +/********** wxDbTable::Query() **********/ +bool wxDbTable::Query(bool forUpdate, bool distinct) { return(query(DB_SELECT_WHERE, forUpdate, distinct)); -} // wxTable::Query() +} // wxDbTable::Query() -/********** wxTable::QueryBySqlStmt() **********/ -bool wxTable::QueryBySqlStmt(char *pSqlStmt) +/********** wxDbTable::QueryBySqlStmt() **********/ +bool wxDbTable::QueryBySqlStmt(const char *pSqlStmt) { pDb->WriteSqlLog(pSqlStmt); return(query(DB_SELECT_STATEMENT, FALSE, FALSE, pSqlStmt)); -} // wxTable::QueryBySqlStmt() +} // wxDbTable::QueryBySqlStmt() -/********** wxTable::QueryMatching() **********/ -bool wxTable::QueryMatching(bool forUpdate, bool distinct) +/********** wxDbTable::QueryMatching() **********/ +bool wxDbTable::QueryMatching(bool forUpdate, bool distinct) { return(query(DB_SELECT_MATCHING, forUpdate, distinct)); -} // wxTable::QueryMatching() +} // wxDbTable::QueryMatching() -/********** wxTable::QueryOnKeyFields() **********/ -bool wxTable::QueryOnKeyFields(bool forUpdate, bool distinct) +/********** wxDbTable::QueryOnKeyFields() **********/ +bool wxDbTable::QueryOnKeyFields(bool forUpdate, bool distinct) { return(query(DB_SELECT_KEYFIELDS, forUpdate, distinct)); -} // wxTable::QueryOnKeyFields() +} // wxDbTable::QueryOnKeyFields() -/********** wxTable::GetPrev() **********/ -bool wxTable::GetPrev(void) +/********** wxDbTable::GetPrev() **********/ +bool wxDbTable::GetPrev(void) { if (pDb->FwdOnlyCursors()) { - wxFAIL_MSG(wxT("GetPrev()::Backward scrolling cursors are not enabled for this instance of wxTable")); + wxFAIL_MSG(wxT("GetPrev()::Backward scrolling cursors are not enabled for this instance of wxDbTable")); return FALSE; } else return(getRec(SQL_FETCH_PRIOR)); -} // wxTable::GetPrev() + +} // wxDbTable::GetPrev() -/********** wxTable::operator-- **********/ -bool wxTable::operator--(int) +/********** wxDbTable::operator-- **********/ +bool wxDbTable::operator--(int) { if (pDb->FwdOnlyCursors()) { - wxFAIL_MSG(wxT("operator--:Backward scrolling cursors are not enabled for this instance of wxTable")); + wxFAIL_MSG(wxT("operator--:Backward scrolling cursors are not enabled for this instance of wxDbTable")); return FALSE; } else return(getRec(SQL_FETCH_PRIOR)); -} // wxTable::operator-- + +} // wxDbTable::operator-- -/********** wxTable::GetFirst() **********/ -bool wxTable::GetFirst(void) +/********** wxDbTable::GetFirst() **********/ +bool wxDbTable::GetFirst(void) { if (pDb->FwdOnlyCursors()) { - wxFAIL_MSG(wxT("GetFirst():Backward scrolling cursors are not enabled for this instance of wxTable")); + wxFAIL_MSG(wxT("GetFirst():Backward scrolling cursors are not enabled for this instance of wxDbTable")); return FALSE; } else return(getRec(SQL_FETCH_FIRST)); -} // wxTable::GetFirst() + +} // wxDbTable::GetFirst() -/********** wxTable::GetLast() **********/ -bool wxTable::GetLast(void) +/********** wxDbTable::GetLast() **********/ +bool wxDbTable::GetLast(void) { if (pDb->FwdOnlyCursors()) { - wxFAIL_MSG(wxT("GetLast()::Backward scrolling cursors are not enabled for this instance of wxTable")); + wxFAIL_MSG(wxT("GetLast()::Backward scrolling cursors are not enabled for this instance of wxDbTable")); return FALSE; } else return(getRec(SQL_FETCH_LAST)); -} // wxTable::GetLast() + +} // wxDbTable::GetLast() -/********** wxTable::GetSelectStmt() **********/ -void wxTable::GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct) +/********** wxDbTable::BuildSelectStmt() **********/ +void wxDbTable::BuildSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct) { char whereClause[DB_MAX_WHERE_CLAUSE_LEN]; @@ -764,8 +814,13 @@ void wxTable::GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct) // Was a FROM clause specified to join tables to the base table? // Available for ::Query() only!!! bool appendFromClause = FALSE; +#if wxODBC_BACKWARD_COMPATABILITY if (typeOfSelect == DB_SELECT_WHERE && from && wxStrlen(from)) appendFromClause = TRUE; +#else + if (typeOfSelect == DB_SELECT_WHERE && from.Length()) + appendFromClause = TRUE; +#endif // Add the column list int i; @@ -816,33 +871,41 @@ void wxTable::GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct) // or build a where clause. The typeOfSelect determines this. switch(typeOfSelect) { - case DB_SELECT_WHERE: - if (where && wxStrlen(where)) // May not want a where clause!!! - { - wxStrcat(pSqlStmt, " WHERE "); - wxStrcat(pSqlStmt, where); - } - break; - case DB_SELECT_KEYFIELDS: - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS); - if (wxStrlen(whereClause)) - { - wxStrcat(pSqlStmt, " WHERE "); - wxStrcat(pSqlStmt, whereClause); - } - break; - case DB_SELECT_MATCHING: - GetWhereClause(whereClause, DB_WHERE_MATCHING); - if (wxStrlen(whereClause)) - { - wxStrcat(pSqlStmt, " WHERE "); - wxStrcat(pSqlStmt, whereClause); - } - break; + case DB_SELECT_WHERE: +#if wxODBC_BACKWARD_COMPATABILITY + if (where && wxStrlen(where)) // May not want a where clause!!! +#else + if (where.Length()) // May not want a where clause!!! +#endif + { + wxStrcat(pSqlStmt, " WHERE "); + wxStrcat(pSqlStmt, where); + } + break; + case DB_SELECT_KEYFIELDS: + BuildWhereClause(whereClause, DB_WHERE_KEYFIELDS); + if (wxStrlen(whereClause)) + { + wxStrcat(pSqlStmt, " WHERE "); + wxStrcat(pSqlStmt, whereClause); + } + break; + case DB_SELECT_MATCHING: + BuildWhereClause(whereClause, DB_WHERE_MATCHING); + if (wxStrlen(whereClause)) + { + wxStrcat(pSqlStmt, " WHERE "); + wxStrcat(pSqlStmt, whereClause); + } + break; } // Append the ORDER BY clause +#if wxODBC_BACKWARD_COMPATABILITY if (orderBy && wxStrlen(orderBy)) +#else + if (orderBy.Length()) +#endif { wxStrcat(pSqlStmt, " ORDER BY "); wxStrcat(pSqlStmt, orderBy); @@ -854,11 +917,11 @@ void wxTable::GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct) if (selectForUpdate && CanSelectForUpdate()) wxStrcat(pSqlStmt, " FOR UPDATE"); -} // wxTable::GetSelectStmt() +} // wxDbTable::BuildSelectStmt() -/********** wxTable::GetRowNum() **********/ -UWORD wxTable::GetRowNum(void) +/********** wxDbTable::GetRowNum() **********/ +UWORD wxDbTable::GetRowNum(void) { UDWORD rowNum; @@ -871,11 +934,11 @@ UWORD wxTable::GetRowNum(void) // Completed successfully return((UWORD) rowNum); -} // wxTable::GetRowNum() +} // wxDbTable::GetRowNum() -/********** wxTable::CloseCursor() **********/ -bool wxTable::CloseCursor(HSTMT cursor) +/********** wxDbTable::CloseCursor() **********/ +bool wxDbTable::CloseCursor(HSTMT cursor) { if (SQLFreeStmt(cursor, SQL_CLOSE) != SQL_SUCCESS) return(pDb->DispAllErrors(henv, hdbc, cursor)); @@ -883,17 +946,16 @@ bool wxTable::CloseCursor(HSTMT cursor) // Completed successfully return(TRUE); -} // wxTable::CloseCursor() +} // wxDbTable::CloseCursor() -/********** wxTable::CreateTable() **********/ -bool wxTable::CreateTable(bool attemptDrop) +/********** wxDbTable::CreateTable() **********/ +bool wxDbTable::CreateTable(bool attemptDrop) { if (!pDb) return FALSE; int i, j; -// char sqlStmt[DB_MAX_STATEMENT_LEN]; wxString sqlStmt; #ifdef DBDEBUG_CONSOLE @@ -942,7 +1004,7 @@ bool wxTable::CreateTable(bool attemptDrop) continue; // Comma Delimiter if (needComma) - sqlStmt += ","; + sqlStmt += ","; // Column Name sqlStmt += colDefs[i].ColName; sqlStmt += " "; @@ -950,13 +1012,17 @@ bool wxTable::CreateTable(bool attemptDrop) switch(colDefs[i].DbDataType) { case DB_DATA_TYPE_VARCHAR: - sqlStmt += pDb->typeInfVarchar.TypeName; break; + sqlStmt += pDb->GetTypeInfVarchar().TypeName; + break; case DB_DATA_TYPE_INTEGER: - sqlStmt += pDb->typeInfInteger.TypeName; break; + sqlStmt += pDb->GetTypeInfInteger().TypeName; + break; case DB_DATA_TYPE_FLOAT: - sqlStmt += pDb->typeInfFloat.TypeName; break; + sqlStmt += pDb->GetTypeInfFloat().TypeName; + break; case DB_DATA_TYPE_DATE: - sqlStmt += pDb->typeInfDate.TypeName; break; + sqlStmt += pDb->GetTypeInfDate().TypeName; + break; } // For varchars, append the size of the string if (colDefs[i].DbDataType == DB_DATA_TYPE_VARCHAR) @@ -966,7 +1032,7 @@ bool wxTable::CreateTable(bool attemptDrop) // wxStrcat(sqlStmt, itoa(colDefs[i].SzDataObj, s, 10)); // wxStrcat(sqlStmt, ")"); s.sprintf("(%d)", colDefs[i].SzDataObj); - sqlStmt += s.GetData(); + sqlStmt += s.c_str(); } if (pDb->Dbms() == dbmsSYBASE_ASE || pDb->Dbms() == dbmsMY_SQL) @@ -1017,14 +1083,14 @@ bool wxTable::CreateTable(bool attemptDrop) // Append the closing parentheses for the create table statement sqlStmt += ")"; - pDb->WriteSqlLog(sqlStmt.GetData()); + pDb->WriteSqlLog(sqlStmt.c_str()); #ifdef DBDEBUG_CONSOLE - cout << endl << sqlStmt.GetData() << endl; + cout << endl << sqlStmt.c_str() << endl; #endif // Execute the CREATE TABLE statement - RETCODE retcode = SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.GetData(), SQL_NTS); + RETCODE retcode = SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS); if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) { pDb->DispAllErrors(henv, hdbc, hstmt); @@ -1034,19 +1100,19 @@ bool wxTable::CreateTable(bool attemptDrop) } // Commit the transaction and close the cursor - if (! pDb->CommitTrans()) + if (!pDb->CommitTrans()) return(FALSE); - if (! CloseCursor(hstmt)) + if (!CloseCursor(hstmt)) return(FALSE); // Database table created successfully return(TRUE); -} // wxTable::CreateTable() +} // wxDbTable::CreateTable() -/********** wxTable::DropTable() **********/ -bool wxTable::DropTable() +/********** wxDbTable::DropTable() **********/ +bool wxDbTable::DropTable() { // NOTE: This function returns TRUE if the Table does not exist, but // only for identified databases. Code will need to be added @@ -1057,22 +1123,22 @@ bool wxTable::DropTable() sqlStmt.sprintf("DROP TABLE %s", tableName); - pDb->WriteSqlLog(sqlStmt.GetData()); + pDb->WriteSqlLog(sqlStmt.c_str()); #ifdef DBDEBUG_CONSOLE - cout << endl << sqlStmt.GetData() << endl; + cout << endl << sqlStmt.c_str() << endl; #endif - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.GetData(), SQL_NTS) != SQL_SUCCESS) + if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS) { // Check for "Base table not found" error and ignore - pDb->GetNextError(henv, hdbc, hstmt); - if (wxStrcmp(pDb->sqlState,"S0002")) // "Base table not found" - { + pDb->GetNextError(henv, hdbc, hstmt); + if (wxStrcmp(pDb->sqlState,"S0002") && wxStrcmp(pDb->sqlState, "S1000")) // "Base table not found" + { // Check for product specific error codes - if (!((pDb->Dbms() == dbmsSYBASE_ASA && !wxStrcmp(pDb->sqlState,"42000")) || // 5.x (and lower?) - (pDb->Dbms() == dbmsMY_SQL && !wxStrcmp(pDb->sqlState,"S1000")) || // untested - (pDb->Dbms() == dbmsPOSTGRES && !wxStrcmp(pDb->sqlState,"08S01")))) // untested + if (!((pDb->Dbms() == dbmsSYBASE_ASA && !wxStrcmp(pDb->sqlState,"42000")) || // 5.x (and lower?) + (pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,"37000")) || + (pDb->Dbms() == dbmsPOSTGRES && !wxStrcmp(pDb->sqlState,"08S01")))) { pDb->DispNextError(); pDb->DispAllErrors(henv, hdbc, hstmt); @@ -1090,30 +1156,110 @@ bool wxTable::DropTable() return(FALSE); return(TRUE); -} // wxTable::DropTable() +} // wxDbTable::DropTable() -/********** wxTable::CreateIndex() **********/ -bool wxTable::CreateIndex(const char * idxName, bool unique, int noIdxCols, wxIdxDef *pIdxDefs, bool attemptDrop) +/********** wxDbTable::CreateIndex() **********/ +bool wxDbTable::CreateIndex(const char * idxName, bool unique, int noIdxCols, wxDbIdxDef *pIdxDefs, bool attemptDrop) { -// char sqlStmt[DB_MAX_STATEMENT_LEN]; wxString sqlStmt; // Drop the index first if (attemptDrop && !DropIndex(idxName)) return (FALSE); + // MySQL (and possibly Sybase ASE?? - gt) require that any columns which are used as portions + // of an index have the columns defined as "NOT NULL". During initial table creation though, + // it may not be known which columns are necessarily going to be part of an index (e.g. the + // table was created, then months later you determine that an additional index while + // give better performance, so you want to add an index). + // + // The following block of code will modify the column definition to make the column be + // defined with the "NOT NULL" qualifier. + if (pDb->Dbms() == dbmsMY_SQL) + { + wxString sqlStmt; + int i; + bool ok = TRUE; + for (i = 0; i < noIdxCols && ok; i++) + { + int j = 0; + bool found = FALSE; + // Find the column definition that has the ColName that matches the + // index column name. We need to do this to get the DB_DATA_TYPE of + // the index column, as MySQL's syntax for the ALTER column requires + // this information + while (!found && (j < this->noCols)) + { + if (wxStrcmp(colDefs[j].ColName,pIdxDefs[i].ColName) == 0) + found = TRUE; + if (!found) + j++; + } + + if (found) + { + wxString typeNameAndSize; + + switch(colDefs[j].DbDataType) + { + case DB_DATA_TYPE_VARCHAR: + typeNameAndSize = pDb->GetTypeInfVarchar().TypeName; + break; + case DB_DATA_TYPE_INTEGER: + typeNameAndSize = pDb->GetTypeInfInteger().TypeName; + break; + case DB_DATA_TYPE_FLOAT: + typeNameAndSize = pDb->GetTypeInfFloat().TypeName; + break; + case DB_DATA_TYPE_DATE: + typeNameAndSize = pDb->GetTypeInfDate().TypeName; + break; + } + + // For varchars, append the size of the string + if (colDefs[j].DbDataType == DB_DATA_TYPE_VARCHAR) + { + wxString s; + s.sprintf("(%d)", colDefs[i].SzDataObj); + typeNameAndSize += s.c_str(); + } + + sqlStmt.sprintf("ALTER TABLE %s MODIFY %s %s NOT NULL",tableName,pIdxDefs[i].ColName,typeNameAndSize.c_str()); + ok = pDb->ExecSql(sqlStmt.c_str()); + + if (!ok) + { + wxODBC_ERRORS retcode; + // Oracle returns a DB_ERR_GENERAL_ERROR if the column is already + // defined to be NOT NULL, but reportedly MySQL doesn't mind. + // This line is just here for debug checking of the value + retcode = (wxODBC_ERRORS)pDb->DB_STATUS; + } + } + else + ok = FALSE; + } + if (ok) + pDb->CommitTrans(); + else + { + pDb->RollbackTrans(); + return(FALSE); + } + } + // Build a CREATE INDEX statement sqlStmt = "CREATE "; if (unique) sqlStmt += "UNIQUE "; - + sqlStmt += "INDEX "; sqlStmt += idxName; sqlStmt += " ON "; sqlStmt += tableName; sqlStmt += " ("; - + // Append list of columns making up index int i; for (i = 0; i < noIdxCols; i++) @@ -1135,14 +1281,14 @@ bool wxTable::CreateIndex(const char * idxName, bool unique, int noIdxCols, wxId // Append closing parentheses sqlStmt += ")"; - pDb->WriteSqlLog(sqlStmt.GetData()); + pDb->WriteSqlLog(sqlStmt.c_str()); #ifdef DBDEBUG_CONSOLE - cout << endl << sqlStmt.GetData() << endl << endl; + cout << endl << sqlStmt.c_str() << endl << endl; #endif // Execute the CREATE INDEX statement - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.GetData(), SQL_NTS) != SQL_SUCCESS) + if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS) { pDb->DispAllErrors(henv, hdbc, hstmt); pDb->RollbackTrans(); @@ -1159,11 +1305,11 @@ bool wxTable::CreateIndex(const char * idxName, bool unique, int noIdxCols, wxId // Index Created Successfully return(TRUE); -} // wxTable::CreateIndex() +} // wxDbTable::CreateIndex() -/********** wxTable::DropIndex() **********/ -bool wxTable::DropIndex(const char * idxName) +/********** wxDbTable::DropIndex() **********/ +bool wxDbTable::DropIndex(const char * idxName) { // NOTE: This function returns TRUE if the Index does not exist, but // only for identified databases. Code will need to be added @@ -1172,30 +1318,33 @@ bool wxTable::DropIndex(const char * idxName) wxString sqlStmt; - if (pDb->Dbms() == dbmsACCESS) + if (pDb->Dbms() == dbmsACCESS || pDb->Dbms() == dbmsMY_SQL) sqlStmt.sprintf("DROP INDEX %s ON %s",idxName,tableName); else if (pDb->Dbms() == dbmsSYBASE_ASE) sqlStmt.sprintf("DROP INDEX %s.%s",tableName,idxName); else sqlStmt.sprintf("DROP INDEX %s",idxName); - pDb->WriteSqlLog(sqlStmt.GetData()); + pDb->WriteSqlLog(sqlStmt.c_str()); #ifdef DBDEBUG_CONSOLE - cout << endl << sqlStmt.GetData() << endl; + cout << endl << sqlStmt.c_str() << endl; #endif - if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.GetData(), SQL_NTS) != SQL_SUCCESS) + if (SQLExecDirect(hstmt, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS) { // Check for "Index not found" error and ignore pDb->GetNextError(henv, hdbc, hstmt); if (wxStrcmp(pDb->sqlState,"S0012")) // "Index not found" { // Check for product specific error codes - if (!((pDb->Dbms() == dbmsSYBASE_ASA && !wxStrcmp(pDb->sqlState,"42000")) || // v5.x (and lower?) - (pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,"S0002")) || // Base table not found - (pDb->Dbms() == dbmsMY_SQL && !wxStrcmp(pDb->sqlState,"42S02")) // untested - )) + if (!((pDb->Dbms() == dbmsSYBASE_ASA && !wxStrcmp(pDb->sqlState,"42000")) || // v5.x (and lower?) + (pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,"37000")) || + (pDb->Dbms() == dbmsMS_SQL_SERVER && !wxStrcmp(pDb->sqlState,"S1000")) || + (pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,"S0002")) || // Base table not found + (pDb->Dbms() == dbmsMY_SQL && !wxStrcmp(pDb->sqlState,"42S12")) || // tested by Christopher Ludwik Marino-Cebulski using v3.23.21beta + (pDb->Dbms() == dbmsPOSTGRES && !wxStrcmp(pDb->sqlState,"08S01")) + )) { pDb->DispNextError(); pDb->DispAllErrors(henv, hdbc, hstmt); @@ -1213,14 +1362,14 @@ bool wxTable::DropIndex(const char * idxName) return(FALSE); return(TRUE); -} // wxTable::DropIndex() +} // wxDbTable::DropIndex() -/********** wxTable::Insert() **********/ -int wxTable::Insert(void) +/********** wxDbTable::Insert() **********/ +int wxDbTable::Insert(void) { assert(!queryOnly); - if (queryOnly) + if (queryOnly || !insertable) return(DB_FAILURE); bindInsertParams(); @@ -1245,11 +1394,11 @@ int wxTable::Insert(void) // Record inserted into the datasource successfully return(DB_SUCCESS); -} // wxTable::Insert() +} // wxDbTable::Insert() -/********** wxTable::Update() **********/ -bool wxTable::Update(void) +/********** wxDbTable::Update() **********/ +bool wxDbTable::Update(void) { assert(!queryOnly); if (queryOnly) @@ -1258,7 +1407,7 @@ bool wxTable::Update(void) char sqlStmt[DB_MAX_STATEMENT_LEN]; // Build the SQL UPDATE statement - GetUpdateStmt(sqlStmt, DB_UPD_KEYFIELDS); + BuildUpdateStmt(sqlStmt, DB_UPD_KEYFIELDS); pDb->WriteSqlLog(sqlStmt); @@ -1269,11 +1418,11 @@ bool wxTable::Update(void) // Execute the SQL UPDATE statement return(execUpdate(sqlStmt)); -} // wxTable::Update() +} // wxDbTable::Update() -/********** wxTable::Update(pSqlStmt) **********/ -bool wxTable::Update(const char *pSqlStmt) +/********** wxDbTable::Update(pSqlStmt) **********/ +bool wxDbTable::Update(const char *pSqlStmt) { assert(!queryOnly); if (queryOnly) @@ -1283,11 +1432,11 @@ bool wxTable::Update(const char *pSqlStmt) return(execUpdate(pSqlStmt)); -} // wxTable::Update(pSqlStmt) +} // wxDbTable::Update(pSqlStmt) -/********** wxTable::UpdateWhere() **********/ -bool wxTable::UpdateWhere(const char *pWhereClause) +/********** wxDbTable::UpdateWhere() **********/ +bool wxDbTable::UpdateWhere(const char *pWhereClause) { assert(!queryOnly); if (queryOnly) @@ -1296,7 +1445,7 @@ bool wxTable::UpdateWhere(const char *pWhereClause) char sqlStmt[DB_MAX_STATEMENT_LEN]; // Build the SQL UPDATE statement - GetUpdateStmt(sqlStmt, DB_UPD_WHERE, pWhereClause); + BuildUpdateStmt(sqlStmt, DB_UPD_WHERE, pWhereClause); pDb->WriteSqlLog(sqlStmt); @@ -1307,11 +1456,11 @@ bool wxTable::UpdateWhere(const char *pWhereClause) // Execute the SQL UPDATE statement return(execUpdate(sqlStmt)); -} // wxTable::UpdateWhere() +} // wxDbTable::UpdateWhere() -/********** wxTable::Delete() **********/ -bool wxTable::Delete(void) +/********** wxDbTable::Delete() **********/ +bool wxDbTable::Delete(void) { assert(!queryOnly); if (queryOnly) @@ -1320,18 +1469,18 @@ bool wxTable::Delete(void) char sqlStmt[DB_MAX_STATEMENT_LEN]; // Build the SQL DELETE statement - GetDeleteStmt(sqlStmt, DB_DEL_KEYFIELDS); + BuildDeleteStmt(sqlStmt, DB_DEL_KEYFIELDS); pDb->WriteSqlLog(sqlStmt); // Execute the SQL DELETE statement return(execDelete(sqlStmt)); -} // wxTable::Delete() +} // wxDbTable::Delete() -/********** wxTable::DeleteWhere() **********/ -bool wxTable::DeleteWhere(const char *pWhereClause) +/********** wxDbTable::DeleteWhere() **********/ +bool wxDbTable::DeleteWhere(const char *pWhereClause) { assert(!queryOnly); if (queryOnly) @@ -1340,18 +1489,18 @@ bool wxTable::DeleteWhere(const char *pWhereClause) char sqlStmt[DB_MAX_STATEMENT_LEN]; // Build the SQL DELETE statement - GetDeleteStmt(sqlStmt, DB_DEL_WHERE, pWhereClause); + BuildDeleteStmt(sqlStmt, DB_DEL_WHERE, pWhereClause); pDb->WriteSqlLog(sqlStmt); // Execute the SQL DELETE statement return(execDelete(sqlStmt)); -} // wxTable::DeleteWhere() +} // wxDbTable::DeleteWhere() -/********** wxTable::DeleteMatching() **********/ -bool wxTable::DeleteMatching(void) +/********** wxDbTable::DeleteMatching() **********/ +bool wxDbTable::DeleteMatching(void) { assert(!queryOnly); if (queryOnly) @@ -1360,18 +1509,18 @@ bool wxTable::DeleteMatching(void) char sqlStmt[DB_MAX_STATEMENT_LEN]; // Build the SQL DELETE statement - GetDeleteStmt(sqlStmt, DB_DEL_MATCHING); + BuildDeleteStmt(sqlStmt, DB_DEL_MATCHING); pDb->WriteSqlLog(sqlStmt); // Execute the SQL DELETE statement return(execDelete(sqlStmt)); -} // wxTable::DeleteMatching() +} // wxDbTable::DeleteMatching() -/********** wxTable::GetUpdateStmt() **********/ -void wxTable::GetUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereClause) +/********** wxDbTable::BuildUpdateStmt() **********/ +void wxDbTable::BuildUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereClause) { assert(!queryOnly); if (queryOnly) @@ -1403,40 +1552,40 @@ void wxTable::GetUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereCla wxStrcat(pSqlStmt, " WHERE "); switch(typeOfUpd) { - case DB_UPD_KEYFIELDS: - // If the datasource supports the ROWID column, build - // the where on ROWID for efficiency purposes. - // e.g. UPDATE PARTS SET Col1 = ?, Col2 = ? WHERE ROWID = '111.222.333' - if (CanUpdByROWID()) - { - SDWORD cb; - char rowid[ROWID_LEN]; - - // Get the ROWID value. If not successful retreiving the ROWID, - // simply fall down through the code and build the WHERE clause - // based on the key fields. - if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, (UCHAR*) rowid, ROWID_LEN, &cb) == SQL_SUCCESS) + case DB_UPD_KEYFIELDS: + // If the datasource supports the ROWID column, build + // the where on ROWID for efficiency purposes. + // e.g. UPDATE PARTS SET Col1 = ?, Col2 = ? WHERE ROWID = '111.222.333' + if (CanUpdByROWID()) { - wxStrcat(pSqlStmt, "ROWID = '"); - wxStrcat(pSqlStmt, rowid); - wxStrcat(pSqlStmt, "'"); - break; + SDWORD cb; + char rowid[wxDB_ROWID_LEN]; + + // Get the ROWID value. If not successful retreiving the ROWID, + // simply fall down through the code and build the WHERE clause + // based on the key fields. + if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, (UCHAR*) rowid, wxDB_ROWID_LEN, &cb) == SQL_SUCCESS) + { + wxStrcat(pSqlStmt, "ROWID = '"); + wxStrcat(pSqlStmt, rowid); + wxStrcat(pSqlStmt, "'"); + break; + } } - } - // Unable to delete by ROWID, so build a WHERE - // clause based on the keyfields. - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS); - wxStrcat(pSqlStmt, whereClause); - break; - case DB_UPD_WHERE: - wxStrcat(pSqlStmt, pWhereClause); - break; + // Unable to delete by ROWID, so build a WHERE + // clause based on the keyfields. + BuildWhereClause(whereClause, DB_WHERE_KEYFIELDS); + wxStrcat(pSqlStmt, whereClause); + break; + case DB_UPD_WHERE: + wxStrcat(pSqlStmt, pWhereClause); + break; } -} // GetUpdateStmt() +} // BuildUpdateStmt() -/********** wxTable::GetDeleteStmt() **********/ -void wxTable::GetDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause) +/********** wxDbTable::BuildDeleteStmt() **********/ +void wxDbTable::BuildDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause) { assert(!queryOnly); if (queryOnly) @@ -1459,48 +1608,48 @@ void wxTable::GetDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereCla // Append the WHERE clause to the SQL DELETE statement switch(typeOfDel) { - case DB_DEL_KEYFIELDS: - // If the datasource supports the ROWID column, build - // the where on ROWID for efficiency purposes. - // e.g. DELETE FROM PARTS WHERE ROWID = '111.222.333' - if (CanUpdByROWID()) - { - SDWORD cb; - char rowid[ROWID_LEN]; - - // Get the ROWID value. If not successful retreiving the ROWID, - // simply fall down through the code and build the WHERE clause - // based on the key fields. - if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, (UCHAR*) rowid, ROWID_LEN, &cb) == SQL_SUCCESS) + case DB_DEL_KEYFIELDS: + // If the datasource supports the ROWID column, build + // the where on ROWID for efficiency purposes. + // e.g. DELETE FROM PARTS WHERE ROWID = '111.222.333' + if (CanUpdByROWID()) { - wxStrcat(pSqlStmt, "ROWID = '"); - wxStrcat(pSqlStmt, rowid); - wxStrcat(pSqlStmt, "'"); - break; + SDWORD cb; + char rowid[wxDB_ROWID_LEN]; + + // Get the ROWID value. If not successful retreiving the ROWID, + // simply fall down through the code and build the WHERE clause + // based on the key fields. + if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, (UCHAR*) rowid, wxDB_ROWID_LEN, &cb) == SQL_SUCCESS) + { + wxStrcat(pSqlStmt, "ROWID = '"); + wxStrcat(pSqlStmt, rowid); + wxStrcat(pSqlStmt, "'"); + break; + } } - } - // Unable to delete by ROWID, so build a WHERE - // clause based on the keyfields. - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS); - wxStrcat(pSqlStmt, whereClause); - break; - case DB_DEL_WHERE: - wxStrcat(pSqlStmt, pWhereClause); - break; - case DB_DEL_MATCHING: - GetWhereClause(whereClause, DB_WHERE_MATCHING); - wxStrcat(pSqlStmt, whereClause); - break; + // Unable to delete by ROWID, so build a WHERE + // clause based on the keyfields. + BuildWhereClause(whereClause, DB_WHERE_KEYFIELDS); + wxStrcat(pSqlStmt, whereClause); + break; + case DB_DEL_WHERE: + wxStrcat(pSqlStmt, pWhereClause); + break; + case DB_DEL_MATCHING: + BuildWhereClause(whereClause, DB_WHERE_MATCHING); + wxStrcat(pSqlStmt, whereClause); + break; } -} // GetDeleteStmt() +} // BuildDeleteStmt() -/********** wxTable::GetWhereClause() **********/ -void wxTable::GetWhereClause(char *pWhereClause, int typeOfWhere, - const char *qualTableName, bool useLikeComparison) +/********** wxDbTable::BuildWhereClause() **********/ +void wxDbTable::BuildWhereClause(char *pWhereClause, int typeOfWhere, + const char *qualTableName, bool useLikeComparison) /* - * Note: GetWhereClause() currently ignores timestamp columns. + * Note: BuildWhereClause() currently ignores timestamp columns. * They are not included as part of the where clause. */ { @@ -1536,68 +1685,68 @@ void wxTable::GetWhereClause(char *pWhereClause, int typeOfWhere, wxStrcat(pWhereClause, " = "); switch(colDefs[i].SqlCtype) { - case SQL_C_CHAR: - sprintf(colValue, "'%s'", (UCHAR FAR *) colDefs[i].PtrDataObj); - break; - case SQL_C_SSHORT: - sprintf(colValue, "%hi", *((SWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_USHORT: - sprintf(colValue, "%hu", *((UWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_SLONG: - sprintf(colValue, "%li", *((SDWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_ULONG: - sprintf(colValue, "%lu", *((UDWORD *) colDefs[i].PtrDataObj)); - break; - case SQL_C_FLOAT: - sprintf(colValue, "%.6f", *((SFLOAT *) colDefs[i].PtrDataObj)); - break; - case SQL_C_DOUBLE: - sprintf(colValue, "%.6f", *((SDOUBLE *) colDefs[i].PtrDataObj)); - break; + case SQL_C_CHAR: + sprintf(colValue, "'%s'", (UCHAR FAR *) colDefs[i].PtrDataObj); + break; + case SQL_C_SSHORT: + sprintf(colValue, "%hi", *((SWORD *) colDefs[i].PtrDataObj)); + break; + case SQL_C_USHORT: + sprintf(colValue, "%hu", *((UWORD *) colDefs[i].PtrDataObj)); + break; + case SQL_C_SLONG: + sprintf(colValue, "%li", *((SDWORD *) colDefs[i].PtrDataObj)); + break; + case SQL_C_ULONG: + sprintf(colValue, "%lu", *((UDWORD *) colDefs[i].PtrDataObj)); + break; + case SQL_C_FLOAT: + sprintf(colValue, "%.6f", *((SFLOAT *) colDefs[i].PtrDataObj)); + break; + case SQL_C_DOUBLE: + sprintf(colValue, "%.6f", *((SDOUBLE *) colDefs[i].PtrDataObj)); + break; } wxStrcat(pWhereClause, colValue); } } -} // wxTable::GetWhereClause() +} // wxDbTable::BuildWhereClause() -/********** wxTable::IsColNull() **********/ -bool wxTable::IsColNull(int colNo) +/********** wxDbTable::IsColNull() **********/ +bool wxDbTable::IsColNull(int colNo) { switch(colDefs[colNo].SqlCtype) { - case SQL_C_CHAR: - return(((UCHAR FAR *) colDefs[colNo].PtrDataObj)[0] == 0); - case SQL_C_SSHORT: - return(( *((SWORD *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_USHORT: - return(( *((UWORD*) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_SLONG: - return(( *((SDWORD *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_ULONG: - return(( *((UDWORD *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_FLOAT: - return(( *((SFLOAT *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_DOUBLE: - return((*((SDOUBLE *) colDefs[colNo].PtrDataObj)) == 0); - case SQL_C_TIMESTAMP: - TIMESTAMP_STRUCT *pDt; - pDt = (TIMESTAMP_STRUCT *) colDefs[colNo].PtrDataObj; - if (pDt->year == 0 && pDt->month == 0 && pDt->day == 0) + case SQL_C_CHAR: + return(((UCHAR FAR *) colDefs[colNo].PtrDataObj)[0] == 0); + case SQL_C_SSHORT: + return(( *((SWORD *) colDefs[colNo].PtrDataObj)) == 0); + case SQL_C_USHORT: + return(( *((UWORD*) colDefs[colNo].PtrDataObj)) == 0); + case SQL_C_SLONG: + return(( *((SDWORD *) colDefs[colNo].PtrDataObj)) == 0); + case SQL_C_ULONG: + return(( *((UDWORD *) colDefs[colNo].PtrDataObj)) == 0); + case SQL_C_FLOAT: + return(( *((SFLOAT *) colDefs[colNo].PtrDataObj)) == 0); + case SQL_C_DOUBLE: + return((*((SDOUBLE *) colDefs[colNo].PtrDataObj)) == 0); + case SQL_C_TIMESTAMP: + TIMESTAMP_STRUCT *pDt; + pDt = (TIMESTAMP_STRUCT *) colDefs[colNo].PtrDataObj; + if (pDt->year == 0 && pDt->month == 0 && pDt->day == 0) + return(TRUE); + else + return(FALSE); + default: return(TRUE); - else - return(FALSE); - default: - return(TRUE); } -} // wxTable::IsColNull() +} // wxDbTable::IsColNull() -/********** wxTable::CanSelectForUpdate() **********/ -bool wxTable::CanSelectForUpdate(void) +/********** wxDbTable::CanSelectForUpdate() **********/ +bool wxDbTable::CanSelectForUpdate(void) { if (pDb->Dbms() == dbmsMY_SQL) return FALSE; @@ -1607,11 +1756,11 @@ bool wxTable::CanSelectForUpdate(void) else return(FALSE); -} // wxTable::CanSelectForUpdate() +} // wxDbTable::CanSelectForUpdate() -/********** wxTable::CanUpdByROWID() **********/ -bool wxTable::CanUpdByROWID(void) +/********** wxDbTable::CanUpdByROWID() **********/ +bool wxDbTable::CanUpdByROWID(void) { /* * NOTE: Returning FALSE for now until this can be debugged, @@ -1624,22 +1773,22 @@ bool wxTable::CanUpdByROWID(void) else return(FALSE); -} // wxTable::CanUpdByROWID() +} // wxDbTable::CanUpdByROWID() -/********** wxTable::IsCursorClosedOnCommit() **********/ -bool wxTable::IsCursorClosedOnCommit(void) +/********** wxDbTable::IsCursorClosedOnCommit() **********/ +bool wxDbTable::IsCursorClosedOnCommit(void) { if (pDb->dbInf.cursorCommitBehavior == SQL_CB_PRESERVE) return(FALSE); else return(TRUE); -} // wxTable::IsCursorClosedOnCommit() +} // wxDbTable::IsCursorClosedOnCommit() -/********** wxTable::ClearMemberVars() **********/ -void wxTable::ClearMemberVars(void) +/********** wxDbTable::ClearMemberVars() **********/ +void wxDbTable::ClearMemberVars(void) { // Loop through the columns setting each member variable to zero int i; @@ -1647,47 +1796,46 @@ void wxTable::ClearMemberVars(void) { switch(colDefs[i].SqlCtype) { - case SQL_C_CHAR: - ((UCHAR FAR *) colDefs[i].PtrDataObj)[0] = 0; - break; - case SQL_C_SSHORT: - *((SWORD *) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_USHORT: - *((UWORD*) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_SLONG: - *((SDWORD *) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_ULONG: - *((UDWORD *) colDefs[i].PtrDataObj) = 0; - break; - case SQL_C_FLOAT: - *((SFLOAT *) colDefs[i].PtrDataObj) = 0.0f; - break; - case SQL_C_DOUBLE: - *((SDOUBLE *) colDefs[i].PtrDataObj) = 0.0f; - break; - case SQL_C_TIMESTAMP: - TIMESTAMP_STRUCT *pDt; - pDt = (TIMESTAMP_STRUCT *) colDefs[i].PtrDataObj; - pDt->year = 0; - pDt->month = 0; - pDt->day = 0; - pDt->hour = 0; - pDt->minute = 0; - pDt->second = 0; - pDt->fraction = 0; - break; - + case SQL_C_CHAR: + ((UCHAR FAR *) colDefs[i].PtrDataObj)[0] = 0; + break; + case SQL_C_SSHORT: + *((SWORD *) colDefs[i].PtrDataObj) = 0; + break; + case SQL_C_USHORT: + *((UWORD*) colDefs[i].PtrDataObj) = 0; + break; + case SQL_C_SLONG: + *((SDWORD *) colDefs[i].PtrDataObj) = 0; + break; + case SQL_C_ULONG: + *((UDWORD *) colDefs[i].PtrDataObj) = 0; + break; + case SQL_C_FLOAT: + *((SFLOAT *) colDefs[i].PtrDataObj) = 0.0f; + break; + case SQL_C_DOUBLE: + *((SDOUBLE *) colDefs[i].PtrDataObj) = 0.0f; + break; + case SQL_C_TIMESTAMP: + TIMESTAMP_STRUCT *pDt; + pDt = (TIMESTAMP_STRUCT *) colDefs[i].PtrDataObj; + pDt->year = 0; + pDt->month = 0; + pDt->day = 0; + pDt->hour = 0; + pDt->minute = 0; + pDt->second = 0; + pDt->fraction = 0; + break; } } -} // wxTable::ClearMemberVars() +} // wxDbTable::ClearMemberVars() -/********** wxTable::SetQueryTimeout() **********/ -bool wxTable::SetQueryTimeout(UDWORD nSeconds) +/********** wxDbTable::SetQueryTimeout() **********/ +bool wxDbTable::SetQueryTimeout(UDWORD nSeconds) { if (SQLSetStmtOption(hstmtInsert, SQL_QUERY_TIMEOUT, nSeconds) != SQL_SUCCESS) return(pDb->DispAllErrors(henv, hdbc, hstmtInsert)); @@ -1701,13 +1849,13 @@ bool wxTable::SetQueryTimeout(UDWORD nSeconds) // Completed Successfully return(TRUE); -} // wxTable::SetQueryTimeout() +} // wxDbTable::SetQueryTimeout() -/********** wxTable::SetColDefs() **********/ -void wxTable::SetColDefs (int index, const char *fieldName, int dataType, void *pData, - int cType, int size, bool keyField, bool upd, - bool insAllow, bool derivedCol) +/********** wxDbTable::SetColDefs() **********/ +void wxDbTable::SetColDefs (int index, const char *fieldName, int dataType, void *pData, + int cType, int size, bool keyField, bool upd, + bool insAllow, bool derivedCol) { if (!colDefs) // May happen if the database connection fails return; @@ -1740,21 +1888,20 @@ void wxTable::SetColDefs (int index, const char *fieldName, int dataType, void * colDefs[index].Null = FALSE; -} // wxTable::SetColDefs() +} // wxDbTable::SetColDefs() -/********** wxTable::SetColDef() **********/ -wxColDataPtr* wxTable::SetColDefs (wxColInf *pColInfs, ULONG numCols) +/********** wxDbTable::SetColDef() **********/ +wxDbColDataPtr* wxDbTable::SetColDefs (wxDbColInf *pColInfs, ULONG numCols) { assert(pColInfs); - wxColDataPtr *pColDataPtrs = NULL; + wxDbColDataPtr *pColDataPtrs = NULL; if (pColInfs) { ULONG index; - - pColDataPtrs = new wxColDataPtr[numCols+1]; + pColDataPtrs = new wxDbColDataPtr[numCols+1]; for (index = 0; index < numCols; index++) { @@ -1762,14 +1909,11 @@ wxColDataPtr* wxTable::SetColDefs (wxColInf *pColInfs, ULONG numCols) switch (pColInfs[index].dbDataType) { case DB_DATA_TYPE_VARCHAR: - { pColDataPtrs[index].PtrDataObj = new char[pColInfs[index].bufferLength+1]; pColDataPtrs[index].SzDataObj = pColInfs[index].columnSize; pColDataPtrs[index].SqlCtype = SQL_C_CHAR; break; - } case DB_DATA_TYPE_INTEGER: - { // Can be long or short if (pColInfs[index].bufferLength == sizeof(long)) { @@ -1784,9 +1928,7 @@ wxColDataPtr* wxTable::SetColDefs (wxColInf *pColInfs, ULONG numCols) pColDataPtrs[index].SqlCtype = SQL_C_SSHORT; } break; - } case DB_DATA_TYPE_FLOAT: - { // Can be float or double if (pColInfs[index].bufferLength == sizeof(float)) { @@ -1801,38 +1943,36 @@ wxColDataPtr* wxTable::SetColDefs (wxColInf *pColInfs, ULONG numCols) pColDataPtrs[index].SqlCtype = SQL_C_DOUBLE; } break; - } case DB_DATA_TYPE_DATE: - { pColDataPtrs[index].PtrDataObj = new TIMESTAMP_STRUCT; pColDataPtrs[index].SzDataObj = sizeof(TIMESTAMP_STRUCT); pColDataPtrs[index].SqlCtype = SQL_C_TIMESTAMP; break; - } } - - SetColDefs (index,pColInfs[index].colName,pColInfs[index].dbDataType, pColDataPtrs[index].PtrDataObj, pColDataPtrs[index].SqlCtype, pColDataPtrs[index].SzDataObj); + SetColDefs (index,pColInfs[index].colName,pColInfs[index].dbDataType, pColDataPtrs[index].PtrDataObj, pColDataPtrs[index].SqlCtype, pColDataPtrs[index].SzDataObj); } } + return (pColDataPtrs); -} // wxTable::SetColDef() + +} // wxDbTable::SetColDef() -/********** wxTable::SetCursor() **********/ -void wxTable::SetCursor(HSTMT *hstmtActivate) +/********** wxDbTable::SetCursor() **********/ +void wxDbTable::SetCursor(HSTMT *hstmtActivate) { - if (hstmtActivate == DEFAULT_CURSOR) + if (hstmtActivate == wxDB_DEFAULT_CURSOR) hstmt = *hstmtDefault; else hstmt = *hstmtActivate; -} // wxTable::SetCursor() +} // wxDbTable::SetCursor() -/********** wxTable::Count(const char *) **********/ -ULONG wxTable::Count(const char *args) +/********** wxDbTable::Count(const char *) **********/ +ULONG wxDbTable::Count(const char *args) { - ULONG l; + ULONG count; wxString sqlStmt; SDWORD cb; @@ -1841,30 +1981,37 @@ ULONG wxTable::Count(const char *args) sqlStmt += args; sqlStmt += ") FROM "; sqlStmt += queryTableName; - +#if wxODBC_BACKWARD_COMPATABILITY if (from && wxStrlen(from)) +#else + if (from.Length()) +#endif sqlStmt += from; // Add the where clause if one is provided +#if wxODBC_BACKWARD_COMPATABILITY if (where && wxStrlen(where)) +#else + if (where.Length()) +#endif { sqlStmt += " WHERE "; sqlStmt += where; } - pDb->WriteSqlLog(sqlStmt.GetData()); + pDb->WriteSqlLog(sqlStmt.c_str()); // Initialize the Count cursor if it's not already initialized if (!hstmtCount) { - hstmtCount = NewCursor(FALSE,FALSE); + hstmtCount = GetNewCursor(FALSE,FALSE); assert(hstmtCount); if (!hstmtCount) return(0); } // Execute the SQL statement - if (SQLExecDirect(*hstmtCount, (UCHAR FAR *) sqlStmt.GetData(), SQL_NTS) != SQL_SUCCESS) + if (SQLExecDirect(*hstmtCount, (UCHAR FAR *) sqlStmt.c_str(), SQL_NTS) != SQL_SUCCESS) { pDb->DispAllErrors(henv, hdbc, *hstmtCount); return(0); @@ -1878,7 +2025,7 @@ ULONG wxTable::Count(const char *args) } // Obtain the result - if (SQLGetData(*hstmtCount, 1, SQL_C_ULONG, &l, sizeof(l), &cb) != SQL_SUCCESS) + if (SQLGetData(*hstmtCount, 1, SQL_C_ULONG, &count, sizeof(count), &cb) != SQL_SUCCESS) { pDb->DispAllErrors(henv, hdbc, *hstmtCount); return(0); @@ -1889,24 +2036,27 @@ ULONG wxTable::Count(const char *args) pDb->DispAllErrors(henv, hdbc, *hstmtCount); // Return the record count - return(l); + return(count); -} // wxTable::Count() +} // wxDbTable::Count() -/********** wxTable::Refresh() **********/ -bool wxTable::Refresh(void) +/********** wxDbTable::Refresh() **********/ +bool wxDbTable::Refresh(void) { bool result = TRUE; // Switch to the internal cursor so any active cursors are not corrupted HSTMT currCursor = GetCursor(); hstmt = hstmtInternal; - +#if wxODBC_BACKWARD_COMPATABILITY // Save the where and order by clauses char *saveWhere = where; char *saveOrderBy = orderBy; - +#else + wxString saveWhere = where; + wxString saveOrderBy = orderBy; +#endif // Build a where clause to refetch the record with. Try and use the // ROWID if it's available, ow use the key fields. char whereClause[DB_MAX_WHERE_CLAUSE_LEN+1]; @@ -1914,12 +2064,12 @@ bool wxTable::Refresh(void) if (CanUpdByROWID()) { SDWORD cb; - char rowid[ROWID_LEN+1]; + char rowid[wxDB_ROWID_LEN+1]; // Get the ROWID value. If not successful retreiving the ROWID, // simply fall down through the code and build the WHERE clause // based on the key fields. - if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, (UCHAR*) rowid, ROWID_LEN, &cb) == SQL_SUCCESS) + if (SQLGetData(hstmt, noCols+1, SQL_C_CHAR, (UCHAR*) rowid, wxDB_ROWID_LEN, &cb) == SQL_SUCCESS) { wxStrcat(whereClause, queryTableName); wxStrcat(whereClause, ".ROWID = '"); @@ -1930,11 +2080,11 @@ bool wxTable::Refresh(void) // If unable to use the ROWID, build a where clause from the keyfields if (wxStrlen(whereClause) == 0) - GetWhereClause(whereClause, DB_WHERE_KEYFIELDS, queryTableName); + BuildWhereClause(whereClause, DB_WHERE_KEYFIELDS, queryTableName); // Requery the record where = whereClause; - orderBy = 0; + orderBy = ""; if (!Query()) result = FALSE; @@ -1954,22 +2104,22 @@ bool wxTable::Refresh(void) return(result); -} // wxTable::Refresh() +} // wxDbTable::Refresh() -/********** wxTable::SetNull(int colNo) **********/ -bool wxTable::SetNull(int colNo) +/********** wxDbTable::SetNull(int colNo) **********/ +bool wxDbTable::SetNull(int colNo) { if (colNo < noCols) return(colDefs[colNo].Null = TRUE); else return(FALSE); -} // wxTable::SetNull(int colNo) +} // wxDbTable::SetNull(int colNo) -/********** wxTable::SetNull(char *colName) **********/ -bool wxTable::SetNull(const char *colName) +/********** wxDbTable::SetNull(char *colName) **********/ +bool wxDbTable::SetNull(const char *colName) { int i; for (i = 0; i < noCols; i++) @@ -1983,11 +2133,11 @@ bool wxTable::SetNull(const char *colName) else return(FALSE); -} // wxTable::SetNull(char *colName) +} // wxDbTable::SetNull(char *colName) -/********** wxTable::NewCursor() **********/ -HSTMT *wxTable::NewCursor(bool setCursor, bool bindColumns) +/********** wxDbTable::GetNewCursor() **********/ +HSTMT *wxDbTable::GetNewCursor(bool setCursor, bool bindColumns) { HSTMT *newHSTMT = new HSTMT; assert(newHSTMT); @@ -2022,11 +2172,11 @@ HSTMT *wxTable::NewCursor(bool setCursor, bool bindColumns) return(newHSTMT); -} // wxTable::NewCursor() +} // wxDbTable::GetNewCursor() -/********** wxTable::DeleteCursor() **********/ -bool wxTable::DeleteCursor(HSTMT *hstmtDel) +/********** wxDbTable::DeleteCursor() **********/ +bool wxDbTable::DeleteCursor(HSTMT *hstmtDel) { bool result = TRUE; @@ -2043,7 +2193,7 @@ bool wxTable::DeleteCursor(HSTMT *hstmtDel) return(result); -} // wxTable::DeleteCursor() +} // wxDbTable::DeleteCursor() #endif // wxUSE_ODBC diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index 82fe581edb..d16c32fd0f 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -29,12 +29,14 @@ #endif #ifndef WX_PRECOMP + #include "wx/button.h" #include "wx/dialog.h" #include "wx/dcclient.h" #include "wx/intl.h" #include "wx/settings.h" #include "wx/stattext.h" #include "wx/sizer.h" + #include "wx/button.h" #endif //-------------------------------------------------------------------------- diff --git a/src/common/docmdi.cpp b/src/common/docmdi.cpp index dc622fc6f5..4b128fe4ee 100644 --- a/src/common/docmdi.cpp +++ b/src/common/docmdi.cpp @@ -50,8 +50,8 @@ void wxDocMDIParentFrame::OnExit(wxCommandEvent& WXUNUSED(event)) void wxDocMDIParentFrame::OnMRUFile(wxCommandEvent& event) { - wxString f(m_docManager->GetHistoryFile(event.GetSelection() - wxID_FILE1)); - if (f != wxT("")) + wxString f(m_docManager->GetHistoryFile(event.GetId() - wxID_FILE1)); + if ( !f.empty() ) (void)m_docManager->CreateDocument(f, wxDOC_SILENT); } @@ -99,22 +99,22 @@ wxDocMDIChildFrame::wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParen wxDocMDIChildFrame::~wxDocMDIChildFrame(void) { - m_childView = (wxView *) NULL; + m_childView = (wxView *) NULL; } // Extend event processing to search the view's event table bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event) { - if ( !m_childView || ! m_childView->ProcessEvent(event) ) + if ( !m_childView || ! m_childView->ProcessEvent(event) ) { // Only hand up to the parent if it's a menu command if (!event.IsKindOf(CLASSINFO(wxCommandEvent)) || !GetParent() || !GetParent()->ProcessEvent(event)) - return wxEvtHandler::ProcessEvent(event); + return wxEvtHandler::ProcessEvent(event); else return TRUE; } - else - return TRUE; + else + return TRUE; } void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 538bb871f4..4bf127d7ac 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -130,6 +130,7 @@ wxDocument::wxDocument(wxDocument *parent) m_documentModified = FALSE; m_documentParent = parent; m_documentTemplate = (wxDocTemplate *) NULL; + m_commandProcessor = (wxCommandProcessor*) NULL; m_savedYet = FALSE; } @@ -145,7 +146,8 @@ wxDocument::~wxDocument() if (m_commandProcessor) delete m_commandProcessor; - GetDocumentManager()->RemoveDocument(this); + if (GetDocumentManager()) + GetDocumentManager()->RemoveDocument(this); // Not safe to do here, since it'll invoke virtual view functions // expecting to see valid derived objects: and by the time we get here, @@ -172,6 +174,8 @@ bool wxDocument::OnCloseDocument() // deleted. bool wxDocument::DeleteAllViews() { + wxDocManager* manager = GetDocumentManager(); + wxNode *node = m_documentViews.First(); while (node) { @@ -184,6 +188,11 @@ bool wxDocument::DeleteAllViews() delete view; // Deletes node implicitly node = next; } + // If we haven't yet deleted the document (for example + // if there were no views) then delete it. + if (manager && manager->GetDocuments().Member(this)) + delete this; + return TRUE; } @@ -196,7 +205,7 @@ wxView *wxDocument::GetFirstView() const wxDocManager *wxDocument::GetDocumentManager() const { - return m_documentTemplate->GetDocumentManager(); + return (m_documentTemplate ? m_documentTemplate->GetDocumentManager() : (wxDocManager*) NULL); } bool wxDocument::OnNewDocument() @@ -221,7 +230,7 @@ bool wxDocument::Save() { bool ret = FALSE; - if (!IsModified()) return TRUE; + if (!IsModified() && m_savedYet) return TRUE; if (m_documentFile == wxT("") || !m_savedYet) ret = SaveAs(); else @@ -239,7 +248,7 @@ bool wxDocument::SaveAs() wxString tmp = wxFileSelector(_("Save as"), docTemplate->GetDirectory(), - GetFilename(), + wxFileNameFromPath(GetFilename()), docTemplate->GetDefaultExtension(), docTemplate->GetFileFilter(), wxSAVE | wxOVERWRITE_PROMPT, @@ -287,7 +296,7 @@ bool wxDocument::OnSaveDocument(const wxString& file) msgTitle = wxString(_("File error")); #if wxUSE_STD_IOSTREAM - ofstream store(wxString(file.fn_str())); + ofstream store(wxString(file.fn_str()).mb_str()); if (store.fail() || store.bad()) #else wxFileOutputStream store(wxString(file.fn_str())); @@ -323,7 +332,7 @@ bool wxDocument::OnOpenDocument(const wxString& file) msgTitle = wxString(_("File error")); #if wxUSE_STD_IOSTREAM - ifstream store(wxString(file.fn_str())); + ifstream store(wxString(file.fn_str()).mb_str()); if (store.fail() || store.bad()) #else wxFileInputStream store(wxString(file.fn_str())); @@ -655,7 +664,8 @@ wxDocument *wxDocTemplate::CreateDocument(const wxString& path, long flags) return doc; else { - delete doc; + if (GetDocumentManager()->GetDocuments().Member(doc)) + doc->DeleteAllViews(); return (wxDocument *) NULL; } } @@ -1096,15 +1106,16 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags) newDoc->SetDocumentTemplate(temp); if (!newDoc->OnOpenDocument(path2)) { - delete newDoc; + newDoc->DeleteAllViews(); + // delete newDoc; // Implicitly deleted by DeleteAllViews return (wxDocument *) NULL; } AddFileToHistory(path2); } return newDoc; } - else - return (wxDocument *) NULL; + + return (wxDocument *) NULL; } wxView *wxDocManager::CreateView(wxDocument *doc, long flags) @@ -1294,6 +1305,28 @@ wxDocTemplate *wxDocManager::FindTemplateForPath(const wxString& path) return theTemplate; } +// Try to get a more suitable parent frame than the top window, +// for selection dialogs. Otherwise you may get an unexpected +// window being activated when a dialog is shown. +static wxWindow* wxFindSuitableParent() +{ + wxWindow* parent = wxTheApp->GetTopWindow(); + + wxWindow* focusWindow = wxWindow::FindFocus(); + if (focusWindow) + { + while (focusWindow && + !focusWindow->IsKindOf(CLASSINFO(wxDialog)) && + !focusWindow->IsKindOf(CLASSINFO(wxFrame))) + + focusWindow = focusWindow->GetParent(); + + if (focusWindow) + parent = focusWindow; + } + return parent; +} + // Prompts user to open a file, using file specs in templates. // How to implement in wxWindows? Must extend the file selector // dialog or implement own; OR match the extension to the @@ -1331,36 +1364,53 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, wxString descrBuf = wxT("*.*"); #endif - int FilterIndex = 0; + int FilterIndex = -1; + + wxWindow* parent = wxFindSuitableParent(); + wxString pathTmp = wxFileSelectorEx(_("Select a file"), m_lastDirectory, wxT(""), &FilterIndex, descrBuf, 0, - wxTheApp->GetTopWindow()); + parent); + wxDocTemplate *theTemplate = (wxDocTemplate *)NULL; if (!pathTmp.IsEmpty()) { + if (!wxFileExists(pathTmp)) + { + wxString msgTitle; + if (!wxTheApp->GetAppName().IsEmpty()) + msgTitle = wxTheApp->GetAppName(); + else + msgTitle = wxString(_("File error")); + + (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK | wxICON_EXCLAMATION, + parent); + + path = wxT(""); + return (wxDocTemplate *) NULL; + } m_lastDirectory = wxPathOnly(pathTmp); path = pathTmp; - // This is dodgy in that we're selecting the template on the - // basis of the file extension, which may not be a standard - // one. We really want to know exactly which template was - // chosen by using a more advanced file selector. - wxDocTemplate *theTemplate = FindTemplateForPath(path); - if ( !theTemplate ) + // first choose the template using the extension, if this fails (i.e. + // wxFileSelectorEx() didn't fill it), then use the path + if ( FilterIndex != -1 ) theTemplate = templates[FilterIndex]; - - return theTemplate; + if ( !theTemplate ) + theTemplate = FindTemplateForPath(path); } else { path = wxT(""); - return (wxDocTemplate *) NULL; } + + return theTemplate; + #if 0 // In all other windowing systems, until we have more advanced // file selectors, we must select the document type (template) first, and @@ -1414,8 +1464,10 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates, return temp; } + wxWindow* parent = wxFindSuitableParent(); + wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document template"), _("Templates"), n, - strings, (void **)data); + strings, (void **)data, parent); delete[] strings; delete[] data; return theTemplate; @@ -1437,8 +1489,10 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates, n ++; } } + wxWindow* parent = wxFindSuitableParent(); + wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document view"), _("Views"), n, - strings, (void **)data); + strings, (void **)data, parent); delete[] strings; delete[] data; return theTemplate; @@ -1603,7 +1657,7 @@ void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event)) void wxDocParentFrame::OnMRUFile(wxCommandEvent& event) { - int n = event.GetSelection() - wxID_FILE1; // the index in MRU list + int n = event.GetId() - wxID_FILE1; // the index in MRU list wxString filename(m_docManager->GetHistoryFile(n)); if ( !filename.IsEmpty() ) { @@ -1619,8 +1673,7 @@ void wxDocParentFrame::OnMRUFile(wxCommandEvent& event) // about it m_docManager->RemoveFileFromHistory(n); - wxLogError(_("The file '%s' doesn't exist and couldn't be opened.\n" - "It has been also removed from the MRU files list."), + wxLogError(_("The file '%s' doesn't exist and couldn't be opened.\nIt has been also removed from the MRU files list."), filename.c_str()); } } @@ -2165,7 +2218,7 @@ bool wxTransferFileToStream(const wxString& filename, ostream& stream) FILE *fd1; int ch; - if ((fd1 = fopen (filename.fn_str(), "rb")) == NULL) + if ((fd1 = wxFopen (filename.fn_str(), _T("rb"))) == NULL) return FALSE; while ((ch = getc (fd1)) != EOF) @@ -2180,7 +2233,7 @@ bool wxTransferStreamToFile(istream& stream, const wxString& filename) FILE *fd1; int ch; - if ((fd1 = fopen (filename.fn_str(), "wb")) == NULL) + if ((fd1 = wxFopen (filename.fn_str(), _T("wb"))) == NULL) { return FALSE; } @@ -2200,7 +2253,7 @@ bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream) FILE *fd1; int ch; - if ((fd1 = fopen (filename.fn_str(), "rb")) == NULL) + if ((fd1 = wxFopen (filename, wxT("rb"))) == NULL) return FALSE; while ((ch = getc (fd1)) != EOF) @@ -2215,7 +2268,7 @@ bool wxTransferStreamToFile(wxInputStream& stream, const wxString& filename) FILE *fd1; char ch; - if ((fd1 = fopen (filename.fn_str(), "wb")) == NULL) + if ((fd1 = wxFopen (filename, wxT("wb"))) == NULL) { return FALSE; } diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index bbf54265c4..5b4d11e9b9 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -141,8 +141,6 @@ void wxBaseArray::Clear() // pre-allocates memory (frees the previous data!) void wxBaseArray::Alloc(size_t nSize) { - wxASSERT( nSize > 0 ); - // only if old buffer was not big enough if ( nSize > m_nSize ) { wxDELETEA(m_pItems); diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index f75c99e93f..ca16df0daa 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -22,15 +22,17 @@ #endif #include "wx/wxprec.h" -#if defined(__WINDOWS__) -#include "wx/msw/private.h" -#endif #ifdef __BORLANDC__ #pragma hdrstop #endif + #if wxUSE_DYNLIB_CLASS +#if defined(__WINDOWS__) + #include "wx/msw/private.h" +#endif + #include "wx/dynlib.h" #include "wx/filefn.h" #include "wx/intl.h" @@ -48,12 +50,16 @@ # define wxDllGetSymbol(handle, modaddr) DosQueryProcAddr(handle, 1L, NULL, (PFN*)modaddr) # define wxDllClose(handle) DosFreeModule(handle) #elif defined(HAVE_DLOPEN) -# define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_NOW/*RTLD_LAZY*/) -# define wxDllGetSymbol(handle, name) dlsym(handle, name.mb_str()) + // note about dlopen() flags: we use RTLD_NOW to have more Windows-like + // behaviour (Win won't let you load a library with missing symbols) and + // RTLD_GLOBAL because it is needed sometimes and probably doesn't hurt + // otherwise +# define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY | RTLD_GLOBAL) +# define wxDllGetSymbol(handle, name) dlsym(handle, name) # define wxDllClose dlclose #elif defined(HAVE_SHL_LOAD) # define wxDllOpen(lib) shl_load(lib.fn_str(), BIND_DEFERRED, 0) -# define wxDllClose shl_unload +# define wxDllClose shl_unload static inline void *wxDllGetSymbol(shl_t handle, const wxString& name) { @@ -66,7 +72,11 @@ #elif defined(__WINDOWS__) // using LoadLibraryEx under Win32 to avoid name clash with LoadLibrary # ifdef __WIN32__ -# define wxDllOpen(lib) ::LoadLibraryEx(lib, 0, 0) +#ifdef _UNICODE +# define wxDllOpen(lib) ::LoadLibraryExW(lib, 0, 0) +#else +# define wxDllOpen(lib) ::LoadLibraryExA(lib, 0, 0) +#endif # else // Win16 # define wxDllOpen(lib) ::LoadLibrary(lib) # endif // Win32/16 @@ -82,34 +92,20 @@ wxLibraries wxTheLibraries; -// ---------------------------------------------------------------------------- -// private functions -// ---------------------------------------------------------------------------- +// ============================================================================ +// implementation +// ============================================================================ // construct the full name from the base shared object name: adds a .dll // suffix under Windows or .so under Unix static wxString ConstructLibraryName(const wxString& basename) { - wxString fullname(basename); - -#if defined(__WINDOWS__) || defined(__WXPM__) || defined(__EMX__) - fullname << ".dll"; -#elif defined(__UNIX__) -# if defined(__HPUX__) - fullname << ".sl"; -# else //__HPUX__ - fullname << ".so"; -# endif //__HPUX__ -#endif + wxString fullname; + fullname << basename << wxDllLoader::GetDllExt(); return fullname; } -// ============================================================================ -// implementation -// ============================================================================ - - // --------------------------------------------------------------------------- // wxLibrary (one instance per dynamic library) // --------------------------------------------------------------------------- @@ -178,6 +174,24 @@ void *wxLibrary::GetSymbol(const wxString& symbname) // wxDllLoader // --------------------------------------------------------------------------- +/* static */ +wxString wxDllLoader::GetDllExt() +{ + wxString ext; + +#if defined(__WINDOWS__) || defined(__WXPM__) || defined(__EMX__) + ext = _T(".dll"); +#elif defined(__UNIX__) +# if defined(__HPUX__) + ext = _T(".sl"); +# else //__HPUX__ + ext = _T(".so"); +# endif //__HPUX__ +#endif + + return ext; +} + /* static */ wxDllType wxDllLoader::GetProgramHandle(void) @@ -202,8 +216,8 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success) #if defined(__WXMAC__) FSSpec myFSSpec ; - Ptr myMainAddr ; - Str255 myErrName ; + Ptr myMainAddr ; + Str255 myErrName ; wxMacPathToFSSpec( libname , &myFSSpec ) ; if (GetDiskFragment( &myFSSpec , 0 , kCFragGoesToEOF , "\p" , kPrivateCFragCopy , &handle , &myMainAddr , @@ -214,7 +228,7 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success) return NULL ; } #elif defined(__WXPM__) || defined(__EMX__) - char zError[256] = ""; + char zError[256] = ""; wxDllOpen(zError, libname, handle); #else // !Mac handle = wxDllOpen(libname); @@ -222,7 +236,33 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success) if ( !handle ) { - wxLogSysError(_("Failed to load shared library '%s'"), libname.c_str()); + wxString msg(_("Failed to load shared library '%s'")); + +#ifdef HAVE_DLERROR + const char *errmsg = dlerror(); + if ( errmsg ) + { + // the error string format is "libname: ...", but we already have + // libname, so cut it off + const char *p = strchr(errmsg, ':'); + if ( p ) + { + if ( *++p == ' ' ) + p++; + } + else + { + p = errmsg; + } + + msg += _T(" (%s)"); + wxLogError(msg, libname.c_str(), p); + } + else +#endif // HAVE_DLERROR + { + wxLogSysError(msg, libname.c_str()); + } } if ( success ) @@ -250,7 +290,7 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name) #if defined( __WXMAC__ ) Ptr symAddress ; CFragSymbolClass symClass ; - Str255 symName ; + Str255 symName ; strcpy( (char*) symName , name ) ; c2pstr( (char*) symName ) ; @@ -260,7 +300,8 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name) #elif defined( __WXPM__ ) || defined(__EMX__) wxDllGetSymbol(dllHandle, symbol); #else - symbol = wxDllGetSymbol(dllHandle, name); + // mb_str() is necessary in Unicode build + symbol = wxDllGetSymbol(dllHandle, name.mb_str()); #endif if ( !symbol ) diff --git a/src/common/encconv.cpp b/src/common/encconv.cpp index 3a5ce7faba..d4f8aebebe 100644 --- a/src/common/encconv.cpp +++ b/src/common/encconv.cpp @@ -26,15 +26,20 @@ #ifdef __BORLANDC__ #include "../common/unictabl.inc" #else -#include "unictabl.inc" +#include "unictabl.inc" #endif +#if wxUSE_WCHAR_T +typedef wchar_t tchar; +#else +typedef char tchar; +#endif static wxUint16* LINKAGEMODE GetEncTable(wxFontEncoding enc) { for (int i = 0; encodings_list[i].table != NULL; i++) { - if (encodings_list[i].encoding == enc) + if (encodings_list[i].encoding == enc) return encodings_list[i].table; } return NULL; @@ -56,12 +61,12 @@ static int LINKAGEMODE CompareCharsetItems(const void *i1, const void *i2) static CharsetItem* LINKAGEMODE BuildReverseTable(wxUint16 *tbl) { CharsetItem *rev = new CharsetItem[128]; - + for (int i = 0; i < 128; i++) rev[i].c = 128 + i, rev[i].u = tbl[i]; qsort(rev, 128, sizeof(CharsetItem), CompareCharsetItems); - + return rev; } @@ -83,37 +88,37 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e if (m_Table) {delete[] m_Table; m_Table = NULL;} -#if !wxUSE_UNICODE +#if !wxUSE_WCHAR_T if (input_enc == wxFONTENCODING_UNICODE || output_enc == wxFONTENCODING_UNICODE) return FALSE; #endif if (input_enc == output_enc) {m_JustCopy = TRUE; return TRUE;} - + m_UnicodeOutput = (output_enc == wxFONTENCODING_UNICODE); m_JustCopy = FALSE; - + if (input_enc == wxFONTENCODING_UNICODE) { if ((out_tbl = GetEncTable(output_enc)) == NULL) return FALSE; - m_Table = new wxChar[65536]; - for (i = 0; i < 128; i++) m_Table[i] = (wxChar)i; // 7bit ASCII - for (i = 128; i < 65536; i++) m_Table[i] = (wxChar)'?'; + m_Table = new tchar[65536]; + for (i = 0; i < 128; i++) m_Table[i] = (tchar)i; // 7bit ASCII + for (i = 128; i < 65536; i++) m_Table[i] = (tchar)'?'; // FIXME - this should be character that means `unicode to charset' impossible, not '?' if (method == wxCONVERT_SUBSTITUTE) { for (i = 0; i < encoding_unicode_fallback_count; i++) - m_Table[encoding_unicode_fallback[i].c] = (wxChar) encoding_unicode_fallback[i].s; + m_Table[encoding_unicode_fallback[i].c] = (tchar) encoding_unicode_fallback[i].s; } for (i = 0; i < 128; i++) - m_Table[out_tbl[i]] = (wxChar)(128 + i); + m_Table[out_tbl[i]] = (tchar)(128 + i); m_UnicodeInput = TRUE; return TRUE; } - + else { if ((in_tbl = GetEncTable(input_enc)) == NULL) return FALSE; @@ -121,33 +126,33 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e if ((out_tbl = GetEncTable(output_enc)) == NULL) return FALSE; m_UnicodeInput = FALSE; - - m_Table = new wxChar[256]; - for (i = 0; i < 128; i++) m_Table[i] = (wxChar)i; // 7bit ASCII - + + m_Table = new tchar[256]; + for (i = 0; i < 128; i++) m_Table[i] = (tchar)i; // 7bit ASCII + if (output_enc == wxFONTENCODING_UNICODE) { - for (i = 0; i < 128; i++) m_Table[128 + i] = (wxChar)in_tbl[i]; // wxChar is 2byte now + for (i = 0; i < 128; i++) m_Table[128 + i] = (tchar)in_tbl[i]; return TRUE; } - else + else { CharsetItem *rev = BuildReverseTable(out_tbl); CharsetItem *item, key; - - for (i = 0; i < 128; i++) + + for (i = 0; i < 128; i++) { key.u = in_tbl[i]; item = (CharsetItem*) bsearch(&key, rev, 128, sizeof(CharsetItem), CompareCharsetItems); if (item == NULL && method == wxCONVERT_SUBSTITUTE) - item = (CharsetItem*) bsearch(&key, encoding_unicode_fallback, + item = (CharsetItem*) bsearch(&key, encoding_unicode_fallback, encoding_unicode_fallback_count, sizeof(CharsetItem), CompareCharsetItems); if (item) - m_Table[128 + i] = (wxChar)item -> c; + m_Table[128 + i] = (tchar)item -> c; else m_Table[128 + i] = 128 + i; // don't know => don't touch } - + delete[] rev; return TRUE; } @@ -156,83 +161,6 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e -void wxEncodingConverter::Convert(const wxChar* input, wxChar* output) -{ - if (m_JustCopy) - { - wxStrcpy(output, input); - return; - } - - wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); - - const wxChar *i; - wxChar *o; - - if (m_UnicodeInput) - for (i = input, o = output; *i != 0; i++, o++) - *o = (wxChar)(m_Table[(wxUint16)*i]); - else - for (i = input, o = output; *i != 0; i++, o++) - *o = (wxChar)(m_Table[(wxUint8)*i]); - *o = 0; -} - - -#if wxUSE_UNICODE // otherwise wxChar === char - -void wxEncodingConverter::Convert(const char* input, wxChar* output) -{ - wxASSERT_MSG(!m_UnicodeInput, wxT("You cannot convert from unicode if input is const char*!")); - - const char *i; - wxChar *o; - - if (m_JustCopy) - { - for (i = input, o = output; *i != 0;) - *(o++) = (wxChar)(*(i++)); - *o = 0; - return; - } - - wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); - - for (i = input, o = output; *i != 0;) - *(o++) = (wxChar)(m_Table[(wxUint8)*(i++)]); - *o = 0; -} - - - -void wxEncodingConverter::Convert(const wxChar* input, char* output) -{ - wxASSERT_MSG(!m_UnicodeOutput, wxT("You cannot convert to unicode if output is const char*!")); - - const wxChar *i; - char *o; - - if (m_JustCopy) - { - for (i = input, o = output; *i != 0;) - *(o++) = (char)(*(i++)); - *o = 0; - return; - } - - wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); - - if (m_UnicodeInput) - for (i = input, o = output; *i != 0; i++, o++) - *o = (char)(m_Table[(wxUint16)*i]); - else - for (i = input, o = output; *i != 0; i++, o++) - *o = (char)(m_Table[(wxUint8)*i]); - *o = 0; -} - - - void wxEncodingConverter::Convert(const char* input, char* output) { wxASSERT_MSG(!m_UnicodeOutput, wxT("You cannot convert to unicode if output is const char*!")); @@ -246,26 +174,103 @@ void wxEncodingConverter::Convert(const char* input, char* output) strcpy(output, input); return; } - + wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); - + for (i = input, o = output; *i != 0;) *(o++) = (char)(m_Table[(wxUint8)*(i++)]); *o = 0; } -#endif // wxUSE_UNICODE + +#if wxUSE_WCHAR_T + +void wxEncodingConverter::Convert(const char* input, wchar_t* output) +{ + wxASSERT_MSG(m_UnicodeOutput, wxT("You cannot convert to 8-bit if output is const wchar_t*!")); + wxASSERT_MSG(!m_UnicodeInput, wxT("You cannot convert from unicode if input is const char*!")); + + const char *i; + wchar_t *o; + + if (m_JustCopy) + { + for (i = input, o = output; *i != 0;) + *(o++) = (wchar_t)(*(i++)); + *o = 0; + return; + } + + wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); + + for (i = input, o = output; *i != 0;) + *(o++) = (wchar_t)(m_Table[(wxUint8)*(i++)]); + *o = 0; +} + + + +void wxEncodingConverter::Convert(const wchar_t* input, char* output) +{ + wxASSERT_MSG(!m_UnicodeOutput, wxT("You cannot convert to unicode if output is const char*!")); + wxASSERT_MSG(m_UnicodeInput, wxT("You cannot convert from 8-bit if input is const wchar_t*!")); + + const wchar_t *i; + char *o; + + if (m_JustCopy) + { + for (i = input, o = output; *i != 0;) + *(o++) = (char)(*(i++)); + *o = 0; + return; + } + + wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); + + for (i = input, o = output; *i != 0;) + *(o++) = (char)(m_Table[(wxUint16)*(i++)]); + *o = 0; +} + + + +void wxEncodingConverter::Convert(const wchar_t* input, wchar_t* output) +{ + wxASSERT_MSG(m_UnicodeOutput, wxT("You cannot convert to 8-bit if output is const wchar_t*!")); + wxASSERT_MSG(m_UnicodeInput, wxT("You cannot convert from 8-bit if input is const wchar_t*!")); + + const wchar_t *i; + wchar_t *o; + + if (m_JustCopy) + { + // wcscpy() is not guaranteed to exist + for (i = input, o = output; *i != 0;) + *(o++) = (*(i++)); + *o = 0; + return; + } + + wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); + + for (i = input, o = output; *i != 0;) + *(o++) = (wchar_t)(m_Table[(wxUint8)*(i++)]); + *o = 0; +} + +#endif // wxUSE_WCHAR_T wxString wxEncodingConverter::Convert(const wxString& input) { if (m_JustCopy) return input; - + wxString s; const wxChar *i; - + wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!")); - + if (m_UnicodeInput) for (i = input.c_str(); *i != 0; i++) s << (wxChar)(m_Table[(wxUint16)*i]); @@ -282,7 +287,7 @@ wxString wxEncodingConverter::Convert(const wxString& input) // Following tables describe classes of encoding equivalence. -// +// #define STOP wxFONTENCODING_SYSTEM @@ -291,17 +296,17 @@ wxString wxEncodingConverter::Convert(const wxString& input) // max no. of encodings for one language used on one platform // Anybody thinks 5 is not enough? ;-) -static wxFontEncoding +static wxFontEncoding EquivalentEncodings[][NUM_OF_PLATFORMS][ENC_PER_PLATFORM+1] = { // *** Please put more common encodings as first! *** - // West European + // Western European { /* unix */ {wxFONTENCODING_ISO8859_1, wxFONTENCODING_ISO8859_15, STOP}, /* windows */ {wxFONTENCODING_CP1252, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, // Central European @@ -309,15 +314,15 @@ static wxFontEncoding /* unix */ {wxFONTENCODING_ISO8859_2, STOP}, /* windows */ {wxFONTENCODING_CP1250, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, - + // Baltic { - /* unix */ {wxFONTENCODING_ISO8859_13, STOP}, + /* unix */ {wxFONTENCODING_ISO8859_13, wxFONTENCODING_ISO8859_4, STOP}, /* windows */ {wxFONTENCODING_CP1257, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, // Hebrew @@ -325,7 +330,7 @@ static wxFontEncoding /* unix */ {wxFONTENCODING_ISO8859_8, STOP}, /* windows */ {wxFONTENCODING_CP1255, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, // Greek @@ -333,7 +338,7 @@ static wxFontEncoding /* unix */ {wxFONTENCODING_ISO8859_7, STOP}, /* windows */ {wxFONTENCODING_CP1253, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, // Arabic @@ -341,7 +346,7 @@ static wxFontEncoding /* unix */ {wxFONTENCODING_ISO8859_6, STOP}, /* windows */ {wxFONTENCODING_CP1256, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, // Turkish @@ -349,24 +354,15 @@ static wxFontEncoding /* unix */ {wxFONTENCODING_ISO8859_9, STOP}, /* windows */ {wxFONTENCODING_CP1254, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, // Cyrillic - { - /* unix */ {wxFONTENCODING_ISO8859_13, wxFONTENCODING_ISO8859_4, - wxFONTENCODING_ISO8859_15, wxFONTENCODING_ISO8859_1, STOP}, - /* windows */ {wxFONTENCODING_CP1257, wxFONTENCODING_CP1252, STOP}, - /* os2 */ {STOP}, - /* mac */ {STOP} - }, - - // Russia and other KOI-8 users: { /* unix */ {wxFONTENCODING_KOI8, wxFONTENCODING_ISO8859_5, STOP}, /* windows */ {wxFONTENCODING_CP1251, STOP}, /* os2 */ {STOP}, - /* mac */ {STOP} + /* mac */ {STOP} }, {{STOP},{STOP},{STOP},{STOP}} /* Terminator */ @@ -390,7 +386,7 @@ wxFontEncodingArray wxEncodingConverter::GetPlatformEquivalents(wxFontEncoding e platform = wxPLATFORM_MAC; #endif } - + int i, clas, e ; wxFontEncoding *f; wxFontEncodingArray arr; @@ -406,11 +402,11 @@ wxFontEncodingArray wxEncodingConverter::GetPlatformEquivalents(wxFontEncoding e if (*f == enc) arr.Add(enc); for (f = EquivalentEncodings[clas][platform]; *f != STOP; f++) if (arr.Index(*f) == wxNOT_FOUND) arr.Add(*f); - i = NUM_OF_PLATFORMS/*hack*/; break; + i = NUM_OF_PLATFORMS/*hack*/; break; } clas++; } - + return arr; } @@ -421,7 +417,7 @@ wxFontEncodingArray wxEncodingConverter::GetAllEquivalents(wxFontEncoding enc) int i, clas, e, j ; wxFontEncoding *f; wxFontEncodingArray arr; - + arr = GetPlatformEquivalents(enc); // we want them to be first items in array clas = 0; @@ -432,12 +428,12 @@ wxFontEncodingArray wxEncodingConverter::GetAllEquivalents(wxFontEncoding enc) if (EquivalentEncodings[clas][i][e] == enc) { for (j = 0; j < NUM_OF_PLATFORMS; j++) - for (f = EquivalentEncodings[clas][j]; *f != STOP; f++) - if (arr.Index(*f) == wxNOT_FOUND) arr.Add(*f); - i = NUM_OF_PLATFORMS/*hack*/; break; + for (f = EquivalentEncodings[clas][j]; *f != STOP; f++) + if (arr.Index(*f) == wxNOT_FOUND) arr.Add(*f); + i = NUM_OF_PLATFORMS/*hack*/; break; } clas++; } - + return arr; } diff --git a/src/common/event.cpp b/src/common/event.cpp index 646b0b89c4..f422cb5dbf 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -397,7 +397,7 @@ void wxKeyEvent::CopyObject(wxObject& obj_d) const obj->m_x = m_x; obj->m_y = m_y; obj->m_keyCode = m_keyCode; - + obj->m_shiftDown = m_shiftDown; obj->m_controlDown = m_controlDown; obj->m_metaDown = m_metaDown; @@ -524,14 +524,12 @@ void wxQueryNewPaletteEvent::CopyObject(wxObject& obj_d) const } wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win) - : wxEvent() { SetEventType(wxEVT_CREATE); SetEventObject(win); } wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win) - : wxEvent() { SetEventType(wxEVT_DESTROY); SetEventObject(win); @@ -645,7 +643,7 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event) wxPendingEvents->Append(this); wxLEAVE_CRIT_SECT(*wxPendingEventsLocker); - + // 3) Inform the system that new pending events are somwehere, // and that these should be processed in idle time. wxWakeUpIdle(); @@ -704,7 +702,7 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event) // An event handler can be enabled or disabled if ( GetEvtHandlerEnabled() ) { - + #if 0 /* What is this? When using GUI threads, a non main @@ -767,12 +765,13 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event) } #if wxUSE_GUI - // Carry on up the parent-child hierarchy, - // but only if event is a command event: it wouldn't - // make sense for a parent to receive a child's size event, for example + // Carry on up the parent-child hierarchy, but only if event is a command + // event: it wouldn't make sense for a parent to receive a child's size + // event, for example if ( m_isWindow && event.IsCommandEvent() ) { wxWindow *win = (wxWindow *)this; + wxWindow *parent = win->GetParent(); if (parent && !parent->IsBeingDeleted()) return parent->GetEventHandler()->ProcessEvent(event); diff --git a/src/common/file.cpp b/src/common/file.cpp index 93598c8bb0..16c4d426c3 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -62,7 +62,6 @@ #endif #elif (defined(__WXPM__)) #include - #include #define W_OK 2 #define R_OK 4 #elif (defined(__WXSTUBS__)) @@ -87,36 +86,6 @@ #include // stat #endif -// Microsoft compiler loves underscores, feed them to it -#ifdef __VISUALC__ - // functions - #define open _open - #define close _close - #define read _read - #define write _write - #define lseek _lseek - #define fsync _commit - #define access _access - #define eof _eof - - // types - #define stat _stat - - // constants - - #define O_RDONLY _O_RDONLY - #define O_WRONLY _O_WRONLY - #define O_RDWR _O_RDWR - #define O_EXCL _O_EXCL - #define O_CREAT _O_CREAT - #define O_BINARY _O_BINARY - - #define S_IFDIR _S_IFDIR - #define S_IFREG _S_IFREG -#else - #define tell(fd) lseek(fd, 0, SEEK_CUR) -#endif // VC++ - #if defined(__BORLANDC__) || defined(_MSC_VER) #define W_OK 2 #define R_OK 4 @@ -132,12 +101,6 @@ #include #endif -// wxWindows -#include "wx/string.h" -#include "wx/intl.h" -#include "wx/file.h" -#include "wx/log.h" - #ifndef MAX_PATH #define MAX_PATH 512 #endif @@ -150,6 +113,12 @@ #define ACCESS(access) , (access) #endif // Salford C +// wxWindows +#include "wx/string.h" +#include "wx/intl.h" +#include "wx/file.h" +#include "wx/log.h" + // ============================================================================ // implementation of wxFile // ============================================================================ @@ -159,23 +128,23 @@ // ---------------------------------------------------------------------------- bool wxFile::Exists(const wxChar *name) { - struct stat st; + wxStructStat st; #if wxUSE_UNICODE && wxMBFILES wxCharBuffer fname = wxConvFile.cWC2MB(name); #ifdef __WXMAC__ return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG); #else - return !access(fname, 0) && - !stat(wxMBSTRINGCAST fname, &st) && + return !wxAccess(fname, 0) && + !wxStat(wxMBSTRINGCAST fname, &st) && (st.st_mode & S_IFREG); #endif #else #ifdef __WXMAC__ return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG); #else - return !access(name, 0) && - !stat((wxChar*) name, &st) && + return !wxAccess(name, 0) && + !wxStat(name, &st) && (st.st_mode & S_IFREG); #endif #endif @@ -198,7 +167,7 @@ bool wxFile::Access(const wxChar *name, OpenMode mode) wxFAIL_MSG(wxT("bad wxFile::Access mode parameter.")); } - return access(wxFNCONV(name), how) == 0; + return wxAccess(wxFNCONV(name), how) == 0; } // ---------------------------------------------------------------------------- @@ -222,10 +191,10 @@ bool wxFile::Create(const wxChar *szFileName, bool bOverwrite, int accessMode) #ifdef __WXMAC__ int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access); #else - int fd = open(wxFNCONV(szFileName), - O_BINARY | O_WRONLY | O_CREAT | - (bOverwrite ? O_TRUNC : O_EXCL) - ACCESS(accessMode)); + int fd = wxOpen(wxFNCONV(szFileName), + O_BINARY | O_WRONLY | O_CREAT | + (bOverwrite ? O_TRUNC : O_EXCL) + ACCESS(accessMode)); #endif if ( fd == -1 ) { wxLogSysError(_("can't create file '%s'"), szFileName); @@ -247,14 +216,19 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode) flags |= O_RDONLY; break; + case write_append: + if ( wxFile::Exists(szFileName) ) + { + flags |= O_WRONLY | O_APPEND; + break; + } + //else: fall through as write_append is the same as write if the + // file doesn't exist + case write: flags |= O_WRONLY | O_CREAT | O_TRUNC; break; - case write_append: - flags |= O_WRONLY | O_APPEND; - break; - case read_write: flags |= O_RDWR; break; @@ -263,7 +237,7 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode) #ifdef __WXMAC__ int fd = open(wxUnix2MacFilename( szFileName ), flags, access); #else - int fd = open(wxFNCONV(szFileName), flags ACCESS(accessMode)); + int fd = wxOpen(wxFNCONV(szFileName), flags ACCESS(accessMode)); #endif if ( fd == -1 ) { wxLogSysError(_("can't open file '%s'"), szFileName); @@ -279,7 +253,7 @@ bool wxFile::Open(const wxChar *szFileName, OpenMode mode, int accessMode) bool wxFile::Close() { if ( IsOpened() ) { - if ( close(m_fd) == -1 ) { + if ( wxClose(m_fd) == -1 ) { wxLogSysError(_("can't close file descriptor %d"), m_fd); m_fd = fd_invalid; return FALSE; @@ -300,10 +274,12 @@ off_t wxFile::Read(void *pBuf, off_t nCount) { wxCHECK( (pBuf != NULL) && IsOpened(), 0 ); + // note: we have to use scope resolution operator because there is also an + // enum value "read" #ifdef __MWERKS__ - int iRc = ::read(m_fd, (char*) pBuf, nCount); + int iRc = ::read(m_fd, (char *) pBuf, nCount); #else - int iRc = ::read(m_fd, pBuf, nCount); + int iRc = ::wxRead(m_fd, pBuf, nCount); #endif if ( iRc == -1 ) { wxLogSysError(_("can't read from file descriptor %d"), m_fd); @@ -318,10 +294,11 @@ size_t wxFile::Write(const void *pBuf, size_t nCount) { wxCHECK( (pBuf != NULL) && IsOpened(), 0 ); + // have to use scope resolution for the same reason as above #ifdef __MWERKS__ - int iRc = ::write(m_fd, (const char*) pBuf, nCount); + int iRc = ::write(m_fd, (const char *) pBuf, nCount); #else - int iRc = ::write(m_fd, pBuf, nCount); + int iRc = ::wxWrite(m_fd, pBuf, nCount); #endif if ( iRc == -1 ) { wxLogSysError(_("can't write to file descriptor %d"), m_fd); @@ -337,7 +314,7 @@ bool wxFile::Flush() { if ( IsOpened() ) { #if defined(__VISUALC__) || wxHAVE_FSYNC - if ( fsync(m_fd) == -1 ) + if ( wxFsync(m_fd) == -1 ) { wxLogSysError(_("can't flush file descriptor %d"), m_fd); return FALSE; @@ -377,7 +354,7 @@ off_t wxFile::Seek(off_t ofs, wxSeekMode mode) break; } - int iRc = lseek(m_fd, ofs, origin); + int iRc = wxLseek(m_fd, ofs, origin); if ( iRc == -1 ) { wxLogSysError(_("can't seek on file descriptor %d"), m_fd); return wxInvalidOffset; @@ -391,7 +368,7 @@ off_t wxFile::Tell() const { wxASSERT( IsOpened() ); - int iRc = tell(m_fd); + int iRc = wxTell(m_fd); if ( iRc == -1 ) { wxLogSysError(_("can't get seek position on file descriptor %d"), m_fd); return wxInvalidOffset; @@ -408,10 +385,9 @@ off_t wxFile::Length() const #ifdef __VISUALC__ int iRc = _filelength(m_fd); #else // !VC++ - int iRc = tell(m_fd); + int iRc = wxTell(m_fd); if ( iRc != -1 ) { - // @ have to use const_cast :-( - int iLen = ((wxFile *)this)->SeekEnd(); + int iLen = ((wxFile *)this)->SeekEnd(); // const_cast if ( iLen != -1 ) { // restore old position if ( ((wxFile *)this)->Seek(iRc) == -1 ) { @@ -440,7 +416,7 @@ bool wxFile::Eof() const int iRc; #if defined(__UNIX__) || defined(__GNUWIN32__) || defined( __MWERKS__ ) || defined(__SALFORDC__) - // @@ this doesn't work, of course, on unseekable file descriptors + // FIXME this doesn't work, of course, on unseekable file descriptors off_t ofsCur = Tell(), ofsMax = Length(); if ( ofsCur == wxInvalidOffset || ofsMax == wxInvalidOffset ) @@ -448,7 +424,7 @@ bool wxFile::Eof() const else iRc = ofsCur == ofsMax; #else // Windows and "native" compiler - iRc = eof(m_fd); + iRc = wxEof(m_fd); #endif // Windows/Unix switch ( iRc ) { @@ -500,7 +476,7 @@ bool wxTempFile::Open(const wxString& strName) // OS/2 supports that have them (HPFS, FAT32) and security (HPFS386) static const wxChar *szMktempSuffix = wxT("XXX"); m_strTemp << strName << szMktempSuffix; - mkdir(m_strTemp.GetWriteBuf(MAX_PATH)); + ::DosCreateDir(m_strTemp.GetWriteBuf(MAX_PATH), NULL); #else // Windows wxString strPath; wxSplitPath(strName, &strPath, NULL, NULL); @@ -522,7 +498,7 @@ bool wxTempFile::Open(const wxString& strName) mode_t umaskOld = 0; // just to suppress compiler warning bool changedUmask; - struct stat st; + wxStructStat st; if ( stat(strName.fn_str(), &st) == 0 ) { // this assumes that only lower bits of st_mode contain the access @@ -572,12 +548,12 @@ bool wxTempFile::Commit() m_file.Close(); #ifndef __WXMAC__ - if ( wxFile::Exists(m_strName) && remove(m_strName.fn_str()) != 0 ) { + if ( wxFile::Exists(m_strName) && wxRemove(m_strName) != 0 ) { wxLogSysError(_("can't remove file '%s'"), m_strName.c_str()); return FALSE; } - if ( rename(m_strTemp.fn_str(), m_strName.fn_str()) != 0 ) { + if ( wxRename(m_strTemp, m_strName) != 0 ) { wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str()); return FALSE; } @@ -600,7 +576,7 @@ void wxTempFile::Discard() { m_file.Close(); #ifndef __WXMAC__ - if ( remove(m_strTemp.fn_str()) != 0 ) + if ( wxRemove(m_strTemp) != 0 ) wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str()); #else if ( remove( wxUnix2MacFilename(m_strTemp.fn_str())) != 0 ) diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index d9ab373bdb..c7ea843aac 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -41,11 +41,10 @@ #include "wx/utils.h" // for wxGetHomeDir -// _WINDOWS_ is defined when windows.h is included, -// __WXMSW__ is defined for MS Windows compilation -#if defined(__WXMSW__) && !defined(_WINDOWS_) +#if defined(__WXMSW__) #include #endif //windows.h + #if defined(__WXPM__) #define INCL_DOS #include @@ -54,14 +53,23 @@ #include #include +// headers needed for umask() +#ifdef __UNIX__ + #include + #include +#endif // __UNIX__ + // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- + +// const_cast<> replacement #define CONST_CAST ((wxFileConfig *)this)-> // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- + #ifndef MAX_PATH #define MAX_PATH 512 #endif @@ -371,6 +379,8 @@ wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName, } } + SetUmask(-1); + Init(); } @@ -423,8 +433,15 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal) pEnd = pStart; while ( *++pEnd != wxT(']') ) { - if ( *pEnd == wxT('\n') || *pEnd == wxT('\0') ) + if ( *pEnd == wxT('\\') ) { + // the next char is escaped, so skip it even if it is ']' + pEnd++; + } + + if ( *pEnd == wxT('\n') || *pEnd == wxT('\0') ) { + // we reached the end of line, break out of the loop break; + } } if ( *pEnd != wxT(']') ) { @@ -460,8 +477,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal) break; default: - wxLogWarning(_("file '%s', line %d: '%s' " - "ignored after group header."), + wxLogWarning(_("file '%s', line %d: '%s' ignored after group header."), file.GetName(), n + 1, pEnd); bCont = FALSE; } @@ -486,7 +502,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal) wxString strKey(FilterInEntryName(wxString(pStart, pEnd))); // skip whitespace - while ( isspace(*pEnd) ) + while ( wxIsspace(*pEnd) ) pEnd++; if ( *pEnd++ != wxT('=') ) { @@ -506,8 +522,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal) else { if ( bLocal && pEntry->IsImmutable() ) { // immutable keys can't be changed by user - wxLogWarning(_("file '%s', line %d: value for " - "immutable key '%s' ignored."), + wxLogWarning(_("file '%s', line %d: value for immutable key '%s' ignored."), file.GetName(), n + 1, strKey.c_str()); continue; } @@ -517,8 +532,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal) // (c) key from global file now found in local one // which is exactly what we want. else if ( !bLocal || pEntry->IsLocal() ) { - wxLogWarning(_("file '%s', line %d: key '%s' was first " - "found at line %d."), + wxLogWarning(_("file '%s', line %d: key '%s' was first found at line %d."), file.GetName(), n + 1, strKey.c_str(), pEntry->Line()); if ( bLocal ) @@ -684,10 +698,9 @@ bool wxFileConfig::Read(const wxString& key, if (pEntry == NULL) { return FALSE; } - else { - *pStr = ExpandEnvVars(pEntry->Value()); - return TRUE; - } + + *pStr = ExpandEnvVars(pEntry->Value()); + return TRUE; } bool wxFileConfig::Read(const wxString& key, @@ -696,28 +709,31 @@ bool wxFileConfig::Read(const wxString& key, wxConfigPathChanger path(this, key); ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name()); + bool ok; if (pEntry == NULL) { if( IsRecordingDefaults() ) ((wxFileConfig *)this)->Write(key,defVal); *pStr = ExpandEnvVars(defVal); - return FALSE; + ok = FALSE; } else { *pStr = ExpandEnvVars(pEntry->Value()); - return TRUE; + ok = TRUE; } + + return ok; } bool wxFileConfig::Read(const wxString& key, long *pl) const { wxString str; - if ( Read(key, & str) ) { - *pl = wxAtol(str); - return TRUE; - } - else { + if ( !Read(key, & str) ) + { return FALSE; } + + *pl = wxAtol(str); + return TRUE; } bool wxFileConfig::Write(const wxString& key, const wxString& szValue) @@ -768,6 +784,15 @@ bool wxFileConfig::Flush(bool /* bCurrentOnly */) if ( LineListIsEmpty() || !m_pRootGroup->IsDirty() || !m_strLocalFile ) return TRUE; +#ifdef __UNIX__ + // set the umask if needed + mode_t umaskOld = 0; + if ( m_umask != -1 ) + { + umaskOld = umask((mode_t)m_umask); + } +#endif // __UNIX__ + wxTempFile file(m_strLocalFile); if ( !file.IsOpened() ) { @@ -783,10 +808,9 @@ bool wxFileConfig::Flush(bool /* bCurrentOnly */) } } -#ifndef __WXMAC__ - return file.Commit(); -#else bool ret = file.Commit(); + +#ifdef __WXMAC__ if ( ret ) { FSSpec spec ; @@ -800,8 +824,17 @@ bool wxFileConfig::Flush(bool /* bCurrentOnly */) FSpSetFInfo( &spec , &finfo ) ; } } - return ret ; -#endif +#endif // __WXMAC__ + +#ifdef __UNIX__ + // restore the old umask if we changed it + if ( m_umask != -1 ) + { + (void)umask(umaskOld); + } +#endif // __UNIX__ + + return ret; } // ---------------------------------------------------------------------------- @@ -882,7 +915,7 @@ bool wxFileConfig::DeleteAll() { CleanUp(); - if ( remove(m_strLocalFile.fn_str()) == -1 ) + if ( wxRemove(m_strLocalFile) == -1 ) wxLogSysError(_("can't delete user configuration file '%s'"), m_strLocalFile.c_str()); m_strLocalFile = m_strGlobalFile = wxT(""); diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 2a1694b0a7..928423ae07 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -29,10 +29,6 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP - #include "wx/defs.h" -#endif - #include "wx/utils.h" #include "wx/intl.h" @@ -66,9 +62,9 @@ #include #endif -#ifdef __OS2__ - #include +#ifdef __WXPM__ #include + #include "wx/os2/private.h" #endif #ifdef __WINDOWS__ #if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__) @@ -265,11 +261,11 @@ wxString wxPathList::FindAbsoluteValidPath (const wxString& file) bool wxFileExists (const wxString& filename) { -#ifdef __GNUWIN32__ // (fix a B20 bug) - if (GetFileAttributes(filename) == 0xFFFFFFFF) - return FALSE; - else - return TRUE; +#ifdef __WINDOWS__ + // GetFileAttributes can copy with network paths + DWORD ret = GetFileAttributes(filename); + DWORD isDir = (ret & FILE_ATTRIBUTE_DIRECTORY); + return ((ret != 0xffffffff) && (isDir == 0)); #elif defined(__WXMAC__) struct stat stbuf; if (filename && stat (wxUnix2MacFilename(filename), &stbuf) == 0 ) @@ -277,14 +273,10 @@ wxFileExists (const wxString& filename) return FALSE ; #else -#ifdef __SALFORDC__ - struct _stat stbuf; -#else - struct stat stbuf; -#endif - - if ((filename != wxT("")) && stat (wxFNSTRINGCAST filename.fn_str(), &stbuf) == 0) + wxStructStat stbuf; + if ((filename != wxT("")) && wxStat (wxFNSTRINGCAST filename.fn_str(), &stbuf) == 0) return TRUE; + return FALSE; #endif } @@ -570,7 +562,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name) /* prefix ~ */ if (nm[1] == SEP || nm[1] == 0) { /* ~/filename */ - // FIXME: wxGetUserHome could return temporary storage in Unicode mode + // FIXME: wxGetUserHome could return temporary storage in Unicode mode if ((s = WXSTRINGCAST wxGetUserHome(wxT(""))) != NULL) { if (*++nm) nm++; @@ -584,7 +576,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name) was_sep = (*s == SEP); nnm = *s ? s + 1 : s; *s = 0; - // FIXME: wxGetUserHome could return temporary storage in Unicode mode + // FIXME: wxGetUserHome could return temporary storage in Unicode mode if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) { if (was_sep) /* replace only if it was there: */ *s = SEP; @@ -836,8 +828,8 @@ static char sMacFileNameConversion[ 1000 ] ; wxString wxMac2UnixFilename (const char *str) { - char *s = sMacFileNameConversion ; - strcpy( s , str ) ; + char *s = sMacFileNameConversion ; + strcpy( s , str ) ; if (s) { memmove( s+1 , s ,strlen( s ) + 1) ; @@ -860,8 +852,8 @@ wxString wxMac2UnixFilename (const char *str) wxString wxUnix2MacFilename (const char *str) { - char *s = sMacFileNameConversion ; - strcpy( s , str ) ; + char *s = sMacFileNameConversion ; + strcpy( s , str ) ; if (s) { if ( *s == '.' ) @@ -882,13 +874,13 @@ wxString wxUnix2MacFilename (const char *str) { if (*s == '/' || *s == '\\') { - // convert any back-directory situations - if ( *(s+1) == '.' && *(s+2) == '.' && ( (*(s+3) == '/' || *(s+3) == '\\') ) ) - { + // convert any back-directory situations + if ( *(s+1) == '.' && *(s+2) == '.' && ( (*(s+3) == '/' || *(s+3) == '\\') ) ) + { *s = ':'; - memmove( s+1 , s+3 ,strlen( s+3 ) + 1 ) ; - } - else + memmove( s+1 , s+3 ,strlen( s+3 ) + 1 ) ; + } + else *s = ':'; } @@ -900,36 +892,36 @@ wxString wxUnix2MacFilename (const char *str) wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) { - Handle myPath ; - short length ; - - FSpGetFullPath( spec , &length , &myPath ) ; - ::SetHandleSize( myPath , length + 1 ) ; - ::HLock( myPath ) ; - (*myPath)[length] = 0 ; - if ( length > 0 && (*myPath)[length-1] ==':' ) - (*myPath)[length-1] = 0 ; - - wxString result( (char*) *myPath ) ; - ::HUnlock( myPath ) ; - ::DisposeHandle( myPath ) ; - return result ; + Handle myPath ; + short length ; + + FSpGetFullPath( spec , &length , &myPath ) ; + ::SetHandleSize( myPath , length + 1 ) ; + ::HLock( myPath ) ; + (*myPath)[length] = 0 ; + if ( length > 0 && (*myPath)[length-1] ==':' ) + (*myPath)[length-1] = 0 ; + + wxString result( (char*) *myPath ) ; + ::HUnlock( myPath ) ; + ::DisposeHandle( myPath ) ; + return result ; } wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) { - return wxMac2UnixFilename( wxMacFSSpec2MacFilename( spec) ) ; + return wxMac2UnixFilename( wxMacFSSpec2MacFilename( spec) ) ; } void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) { - FSpLocationFromFullPath( strlen(path ) , path , spec ) ; + FSpLocationFromFullPath( strlen(path ) , path , spec ) ; } void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) { - wxString var = wxUnix2MacFilename( path ) ; - wxMacFilename2FSSpec( var , spec ) ; + wxString var = wxUnix2MacFilename( path ) ; + wxMacFilename2FSSpec( var , spec ) ; } #endif @@ -1050,7 +1042,7 @@ wxRenameFile (const wxString& file1, const wxString& file2) return TRUE; #else // Normal system call - if (0 == rename (wxFNSTRINGCAST file1.fn_str(), wxFNSTRINGCAST file2.fn_str())) + if (0 == wxRename (wxCSTRINGCAST file1, wxCSTRINGCAST file2)) return TRUE; #endif // Try to copy @@ -1065,7 +1057,7 @@ wxRenameFile (const wxString& file1, const wxString& file2) bool wxRemoveFile(const wxString& file) { #if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) - int flag = remove(wxFNSTRINGCAST file.fn_str()); + int flag = wxRemove(file); #elif defined( __WXMAC__ ) int flag = unlink(wxUnix2MacFilename( file )); #else @@ -1081,12 +1073,13 @@ bool wxMkdir(const wxString& dir, int perm) #else // !Mac const wxChar *dirname = dir.c_str(); - // assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too - // for the GNU compiler -#if (!(defined(__WXMSW__) || defined(__OS2__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) + // assume mkdir() has 2 args on non Windows-OS/2 platforms +#if defined(__WXPM__) + if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's?? +#elif !defined(__WXMSW__) || defined(__WXWINE__) || defined(__CYGWIN__) if ( mkdir(wxFNCONV(dirname), perm) != 0 ) #else // !MSW and !OS/2 VAC++ - if ( mkdir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 ) + if ( wxMkDir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 ) #endif // !MSW/MSW { wxLogSysError(_("Directory '%s' couldn't be created"), dirname); @@ -1104,12 +1097,14 @@ bool wxRmdir(const wxString& dir, int WXUNUSED(flags)) return FALSE; //to be changed since rmdir exists in VMS7.x #elif defined( __WXMAC__ ) return (rmdir(wxUnix2MacFilename( dir )) == 0); +#elif defined(__WXPM__) + return (::DosDeleteDir((PSZ)dir.c_str()) == 0); #else #ifdef __SALFORDC__ return FALSE; // What to do? #else - return (rmdir(wxFNSTRINGCAST dir.fn_str()) == 0); + return (wxRmDir(wxFNSTRINGCAST dir.fn_str()) == 0); #endif #endif @@ -1164,19 +1159,39 @@ bool wxDirExists(const wxString& dir) // does the path exists? (may have or not '/' or '\\' at the end) bool wxPathExists(const wxChar *pszPathName) { - /* Windows API returns -1 from stat for "c:\dir\" if "c:\dir" exists - * OTOH, we should change "d:" to "d:\" and leave "\" as is. */ - wxString strPath(pszPathName); - if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != wxT('\0') ) - strPath.Last() = wxT('\0'); + wxString strPath(pszPathName); +#ifdef __WINDOWS__ + // Windows fails to find directory named "c:\dir\" even if "c:\dir" exists, + // so remove all trailing backslashes from the path - but don't do this for + // the pathes "d:\" (which are different from "d:") nor for just "\" + while ( wxEndsWithPathSeparator(strPath) ) + { + size_t len = strPath.length(); + if ( len == 1 || strPath[len - 1] == _T(':') ) + break; -#ifdef __SALFORDC__ - struct _stat st; + strPath.Truncate(len - 1); + } +#endif // __WINDOWS__ + +#ifdef __WINDOWS__ + // Stat can't cope with network paths + DWORD ret = GetFileAttributes(strPath.c_str()); + DWORD isDir = (ret & FILE_ATTRIBUTE_DIRECTORY); + return ((ret != 0xffffffff) && (isDir != 0)); #else - struct stat st; + + wxStructStat st; +#ifndef __VISAGECPP__ + return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && + ((st.st_mode & S_IFMT) == S_IFDIR); +#else + // S_IFMT not supported in VA compilers.. st_mode is a 2byte value only + return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && + (st.st_mode == S_IFDIR); #endif - return stat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && (st.st_mode & S_IFDIR); +#endif } // Get a temporary filename, opening and closing the file. @@ -1311,8 +1326,8 @@ wxString wxFindNextFile() nextDir = readdir(gs_dirStream) ) { if (wxMatchWild(name, nextDir->d_name, FALSE) && // RR: added FALSE to find hidden files - strcmp(nextDir->d_name, ".") && - strcmp(nextDir->d_name, "..") ) + strcmp(nextDir->d_name, ".") && + strcmp(nextDir->d_name, "..") ) { result.Empty(); if ( !path.IsEmpty() ) @@ -1360,10 +1375,10 @@ wxString wxFindNextFile() struct MacDirectoryIterator { - CInfoPBRec m_CPB ; - wxInt16 m_index ; - long m_dirId ; - Str255 m_name ; + CInfoPBRec m_CPB ; + wxInt16 m_index ; + long m_dirId ; + Str255 m_name ; } ; static int g_iter_flags ; @@ -1381,57 +1396,57 @@ wxString wxFindFirstFile(const wxChar *spec, int flags) if ( !path.IsEmpty() ) result << path << wxT('\\'); - FSSpec fsspec ; + FSSpec fsspec ; - wxUnixFilename2FSSpec( result , &fsspec ) ; - g_iter.m_CPB.hFileInfo.ioVRefNum = fsspec.vRefNum ; - g_iter.m_CPB.hFileInfo.ioNamePtr = g_iter.m_name ; - g_iter.m_index = 0 ; - - Boolean isDir ; - FSpGetDirectoryID( &fsspec , &g_iter.m_dirId , &isDir ) ; - if ( !isDir ) - return wxEmptyString ; - - return wxFindNextFile( ) ; + wxUnixFilename2FSSpec( result , &fsspec ) ; + g_iter.m_CPB.hFileInfo.ioVRefNum = fsspec.vRefNum ; + g_iter.m_CPB.hFileInfo.ioNamePtr = g_iter.m_name ; + g_iter.m_index = 0 ; + + Boolean isDir ; + FSpGetDirectoryID( &fsspec , &g_iter.m_dirId , &isDir ) ; + if ( !isDir ) + return wxEmptyString ; + + return wxFindNextFile( ) ; } wxString wxFindNextFile() { wxString result; - short err = noErr ; - - while ( err == noErr ) - { - g_iter.m_index++ ; - g_iter.m_CPB.dirInfo.ioFDirIndex = g_iter.m_index; - g_iter.m_CPB.dirInfo.ioDrDirID = g_iter.m_dirId; /* we need to do this every time */ - err = PBGetCatInfoSync((CInfoPBPtr)&g_iter.m_CPB); - if ( err != noErr ) - break ; - - if ( ( g_iter.m_CPB.dirInfo.ioFlAttrib & ioDirMask) != 0 && (g_iter_flags & wxDIR) ) // we have a directory - break ; - - if ( ( g_iter.m_CPB.dirInfo.ioFlAttrib & ioDirMask) == 0 && !(g_iter_flags & wxFILE ) ) - continue ; - - // hit ! - break ; - } - if ( err != noErr ) - { - return wxEmptyString ; - } - FSSpec spec ; - - FSMakeFSSpecCompat(g_iter.m_CPB.hFileInfo.ioVRefNum, - g_iter.m_dirId, - g_iter.m_name, - &spec) ; - - return wxMacFSSpec2UnixFilename( &spec ) ; + short err = noErr ; + + while ( err == noErr ) + { + g_iter.m_index++ ; + g_iter.m_CPB.dirInfo.ioFDirIndex = g_iter.m_index; + g_iter.m_CPB.dirInfo.ioDrDirID = g_iter.m_dirId; /* we need to do this every time */ + err = PBGetCatInfoSync((CInfoPBPtr)&g_iter.m_CPB); + if ( err != noErr ) + break ; + + if ( ( g_iter.m_CPB.dirInfo.ioFlAttrib & ioDirMask) != 0 && (g_iter_flags & wxDIR) ) // we have a directory + break ; + + if ( ( g_iter.m_CPB.dirInfo.ioFlAttrib & ioDirMask) == 0 && !(g_iter_flags & wxFILE ) ) + continue ; + + // hit ! + break ; + } + if ( err != noErr ) + { + return wxEmptyString ; + } + FSSpec spec ; + + FSMakeFSSpecCompat(g_iter.m_CPB.hFileInfo.ioVRefNum, + g_iter.m_dirId, + g_iter.m_name, + &spec) ; + + return wxMacFSSpec2UnixFilename( &spec ) ; } #elif defined(__WXMSW__) @@ -1485,9 +1500,9 @@ wxString wxFindFirstFile(const wxChar *spec, int flags) result += gs_findDataStruct.cFileName; return result; -#else +#else // !Win32 int flag = _A_NORMAL; - if (flags & wxDIR) /* MATTHEW: [5] Use & */ + if (flags & wxDIR) flag = _A_SUBDIR; #ifdef __BORLANDC__ @@ -1496,7 +1511,6 @@ wxString wxFindFirstFile(const wxChar *spec, int flags) if (_dos_findfirst(WXSTRINGCAST spec, flag, &gs_findDataStruct) == 0) #endif { - /* MATTHEW: [5] Check directory flag */ char attrib; #ifdef __BORLANDC__ @@ -1519,9 +1533,9 @@ wxString wxFindFirstFile(const wxChar *spec, int flags) #endif ; } -#endif // __WIN32__ return result; +#endif // __WIN32__ } @@ -1591,9 +1605,9 @@ try_again: #endif ; } -#endif // Win32/16 return result; +#endif // Win32/16 } #elif defined(__WXPM__) @@ -1654,16 +1668,16 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) #ifdef _MSC_VER if (_getcwd(cbuf, sz) == NULL) { #elif defined( __WXMAC__) - enum - { - SFSaveDisk = 0x214, CurDirStore = 0x398 - }; - FSSpec cwdSpec ; - - FSMakeFSSpec( - *(short *) SFSaveDisk , *(long *) CurDirStore , NULL , &cwdSpec ) ; - wxString res = wxMacFSSpec2UnixFilename( &cwdSpec ) ; - strcpy( buf , res ) ; - if (0) { + enum + { + SFSaveDisk = 0x214, CurDirStore = 0x398 + }; + FSSpec cwdSpec ; + + FSMakeFSSpec( - *(short *) SFSaveDisk , *(long *) CurDirStore , NULL , &cwdSpec ) ; + wxString res = wxMacFSSpec2UnixFilename( &cwdSpec ) ; + strcpy( buf , res ) ; + if (0) { #else if (getcwd(cbuf, sz) == NULL) { #endif @@ -1672,16 +1686,23 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) #ifdef _MSC_VER if (_getcwd(buf, sz) == NULL) { #elif defined( __WXMAC__) - enum - { - SFSaveDisk = 0x214, CurDirStore = 0x398 - }; - FSSpec cwdSpec ; - - FSMakeFSSpec( - *(short *) SFSaveDisk , *(long *) CurDirStore , NULL , &cwdSpec ) ; - wxString res = wxMacFSSpec2UnixFilename( &cwdSpec ) ; - strcpy( buf , res ) ; - if (0) { + enum + { + SFSaveDisk = 0x214, CurDirStore = 0x398 + }; + FSSpec cwdSpec ; + + FSMakeFSSpec( - *(short *) SFSaveDisk , *(long *) CurDirStore , NULL , &cwdSpec ) ; + wxString res = wxMacFSSpec2UnixFilename( &cwdSpec ) ; + strcpy( buf , res ) ; + if (0) { +#elif(__VISAGECPP__) + APIRET rc; + rc = ::DosQueryCurrentDir( 0 // current drive + ,buf + ,(PULONG)&sz + ); + if (rc != 0) { #else if (getcwd(buf, sz) == NULL) { #endif @@ -1711,8 +1732,10 @@ wxString wxGetCwd() bool wxSetWorkingDirectory(const wxString& d) { -#if defined( __UNIX__ ) || defined( __WXMAC__ ) || defined(__WXPM__) +#if defined( __UNIX__ ) || defined( __WXMAC__ ) return (chdir(wxFNSTRINGCAST d.fn_str()) == 0); +#elif defined(__WXPM__) + return (::DosSetCurrentDir((PSZ)d.c_str()) == 0); #elif defined(__WINDOWS__) #ifdef __WIN32__ @@ -1771,7 +1794,7 @@ bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFi { // we assume that it's not empty wxCHECK_MSG( !wxIsEmpty(pszFile), FALSE, - _("empty file name in wxFindFileInPath")); + _T("empty file name in wxFindFileInPath")); // skip path separator in the beginning of the file name if present if ( wxIsPathSeparator(*pszFile) ) @@ -1868,13 +1891,11 @@ void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName, } } - - time_t WXDLLEXPORT wxFileModificationTime(const wxString& filename) { - struct stat buf; + wxStructStat buf; - stat(filename.fn_str(), &buf); + wxStat(filename.fn_str(), &buf); return buf.st_mtime; } diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index ea9f907982..197fec8941 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -89,14 +89,13 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location) } ft = wxTheMimeTypesManager -> GetFileTypeFromExtension(ext); - if (ft && (ft -> GetMimeType(&mime))) { - delete ft; - return mime; - } - else { - delete ft; - return wxEmptyString; + if ( !ft || !ft -> GetMimeType(&mime) ) { + mime = wxEmptyString; } + + delete ft; + + return mime; } @@ -186,13 +185,15 @@ bool wxLocalFSHandler::CanOpen(const wxString& location) wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location) { wxString right = GetRightLocation(location); - if (wxFileExists(right)) - return new wxFSFile(new wxFileInputStream(right), - right, - GetMimeTypeFromExt(location), - GetAnchor(location), - wxDateTime(wxFileModificationTime(right))); - else return (wxFSFile*) NULL; + if (!wxFileExists(right)) + return (wxFSFile*) NULL; + + return new wxFSFile(new wxFileInputStream(right), + right, + GetMimeTypeFromExt(location), + GetAnchor(location), + wxDateTime(wxFileModificationTime(right))); + } wxString wxLocalFSHandler::FindFirst(const wxString& spec, int flags) diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index 8a5e31d4dd..6ef8c0281c 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -62,15 +62,25 @@ wxFont& wxFont::operator=(const wxFont& font) return (wxFont &)*this; } -// VZ: is it correct to compare pointers and not the contents? (FIXME) bool wxFontBase::operator==(const wxFont& font) const { - return GetFontData() == font.GetFontData(); + // either it is the same font, i.e. they share the same common data or they + // have different ref datas but still describe the same font + return GetFontData() == font.GetFontData() || + ( + Ok() == font.Ok() && + GetPointSize() == font.GetPointSize() && + GetFamily() == font.GetFamily() && + GetStyle() == font.GetStyle() && + GetUnderlined() == font.GetUnderlined() && + GetFaceName() == font.GetFaceName() && + GetEncoding() == font.GetEncoding() + ); } bool wxFontBase::operator!=(const wxFont& font) const { - return GetFontData() != font.GetFontData(); + return !(*this == font); } wxString wxFontBase::GetFamilyString() const diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 116565bbcf..63357315ed 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -35,12 +35,18 @@ #endif // PCH #include "wx/fontmap.h" -#include "wx/config.h" -#include "wx/memconf.h" -#include "wx/msgdlg.h" -#include "wx/fontdlg.h" -#include "wx/choicdlg.h" +#if wxUSE_CONFIG + #include "wx/config.h" + #include "wx/memconf.h" +#endif + +#if wxUSE_GUI + #include "wx/msgdlg.h" + #include "wx/fontdlg.h" + #include "wx/choicdlg.h" +#endif // wxUSE_GUI + #include "wx/encconv.h" // ---------------------------------------------------------------------------- @@ -48,10 +54,15 @@ // ---------------------------------------------------------------------------- // the config paths we use -static const wxChar* FONTMAPPER_ROOT_PATH = wxT("wxWindows/FontMapper"); +static const wxChar* FONTMAPPER_ROOT_PATH = wxT("/wxWindows/FontMapper"); static const wxChar* FONTMAPPER_CHARSET_PATH = wxT("Charsets"); static const wxChar* FONTMAPPER_CHARSET_ALIAS_PATH = wxT("Aliases"); -static const wxChar* FONTMAPPER_FONT_FROM_ENCODING_PATH = wxT("Encodings"); + +// we only ask questions in GUI mode +#if wxUSE_GUI + static const wxChar* FONTMAPPER_FONT_FROM_ENCODING_PATH = wxT("Encodings"); + static const wxChar* FONTMAPPER_FONT_DONT_ASK = wxT("none"); +#endif // wxUSE_GUI // encodings supported by GetEncodingDescription static wxFontEncoding gs_encodings[] = @@ -80,35 +91,37 @@ static wxFontEncoding gs_encodings[] = wxFONTENCODING_CP1255, wxFONTENCODING_CP1256, wxFONTENCODING_CP1257, + wxFONTENCODING_CP437, }; // the descriptions for them static const wxChar* gs_encodingDescs[] = { - wxTRANSLATE( "West European (ISO-8859-1/Latin 1)" ), - wxTRANSLATE( "Central European (ISO-8859-2/Latin 2)" ), + wxTRANSLATE( "Western European (ISO-8859-1)" ), + wxTRANSLATE( "Central European (ISO-8859-2)" ), wxTRANSLATE( "Esperanto (ISO-8859-3)" ), - wxTRANSLATE( "Baltic (ISO-8859-4)" ), - wxTRANSLATE( "Cyrillic (Latin 5)" ), + wxTRANSLATE( "Baltic (old) (ISO-8859-4)" ), + wxTRANSLATE( "Cyrillic (ISO-8859-5)" ), wxTRANSLATE( "Arabic (ISO-8859-6)" ), wxTRANSLATE( "Greek (ISO-8859-7)" ), wxTRANSLATE( "Hebrew (ISO-8859-8)" ), wxTRANSLATE( "Turkish (ISO-8859-9)" ), - wxTRANSLATE( "Baltic II (ISO-8859-10)" ), + wxTRANSLATE( "Nordic (ISO-8859-10)" ), wxTRANSLATE( "Thai (ISO-8859-11)" ), - wxTRANSLATE( "ISO-8859-12" ), - wxTRANSLATE( "ISO-8859-13" ), - wxTRANSLATE( "ISO-8859-14" ), - wxTRANSLATE( "West European new (ISO-8859-15/Latin 0)" ), + wxTRANSLATE( "Indian (ISO-8859-12)" ), + wxTRANSLATE( "Baltic (ISO-8859-13)" ), + wxTRANSLATE( "Celtic (ISO-8859-14)" ), + wxTRANSLATE( "Western European with Euro (ISO-8859-15)" ), wxTRANSLATE( "KOI8-R" ), - wxTRANSLATE( "Windows Latin 2 (CP 1250)" ), + wxTRANSLATE( "Windows Central European (CP 1250)" ), wxTRANSLATE( "Windows Cyrillic (CP 1251)" ), - wxTRANSLATE( "Windows Latin 1 (CP 1252)" ), + wxTRANSLATE( "Windows Western European (CP 1252)" ), wxTRANSLATE( "Windows Greek (CP 1253)" ), wxTRANSLATE( "Windows Turkish (CP 1254)" ), wxTRANSLATE( "Windows Hebrew (CP 1255)" ), wxTRANSLATE( "Windows Arabic (CP 1256)" ), wxTRANSLATE( "Windows Baltic (CP 1257)" ), + wxTRANSLATE( "Windows/DOS OEM (CP 437)" ), }; // and the internal names @@ -130,14 +143,15 @@ static const wxChar* gs_encodingNames[] = wxT( "iso8859-14" ), wxT( "iso8859-15" ), wxT( "koi8-r" ), - wxT( "windows1250" ), - wxT( "windows1251" ), - wxT( "windows1252" ), - wxT( "windows1253" ), - wxT( "windows1254" ), - wxT( "windows1255" ), - wxT( "windows1256" ), - wxT( "windows1257" ), + wxT( "windows-1250" ), + wxT( "windows-1251" ), + wxT( "windows-1252" ), + wxT( "windows-1253" ), + wxT( "windows-1254" ), + wxT( "windows-1255" ), + wxT( "windows-1256" ), + wxT( "windows-1257" ), + wxT( "windows-437" ), }; // ---------------------------------------------------------------------------- @@ -188,8 +202,13 @@ private: wxFontMapper::wxFontMapper() { +#if wxUSE_CONFIG m_config = NULL; +#endif // wxUSE_CONFIG + +#if wxUSE_GUI m_windowParent = NULL; +#endif // wxUSE_GUI } wxFontMapper::~wxFontMapper() @@ -200,6 +219,8 @@ wxFontMapper::~wxFontMapper() // customisation // ---------------------------------------------------------------------------- +#if wxUSE_CONFIG + /* static */ const wxChar *wxFontMapper::GetDefaultConfigPath() { return FONTMAPPER_ROOT_PATH; @@ -208,13 +229,11 @@ wxFontMapper::~wxFontMapper() void wxFontMapper::SetConfigPath(const wxString& prefix) { wxCHECK_RET( !prefix.IsEmpty() && prefix[0] == wxCONFIG_PATH_SEPARATOR, - wxT("an absolute path should be given to " - "wxFontMapper::SetConfigPath()") ); + wxT("an absolute path should be given to wxFontMapper::SetConfigPath()") ); m_configRootPath = prefix; } - // ---------------------------------------------------------------------------- // get config object and path for it // ---------------------------------------------------------------------------- @@ -251,9 +270,11 @@ const wxString& wxFontMapper::GetConfigPath() return m_configRootPath; } +#endif bool wxFontMapper::ChangePath(const wxString& pathNew, wxString *pathOld) { +#if wxUSE_CONFIG wxConfigBase *config = GetConfig(); if ( !config ) return FALSE; @@ -274,11 +295,17 @@ bool wxFontMapper::ChangePath(const wxString& pathNew, wxString *pathOld) config->SetPath(path); return TRUE; +#else + return FALSE; +#endif } void wxFontMapper::RestorePath(const wxString& pathOld) { +#if wxUSE_CONFIG GetConfig()->SetPath(pathOld); +#else +#endif } // ---------------------------------------------------------------------------- @@ -291,8 +318,7 @@ wxString wxFontMapper::GetEncodingDescription(wxFontEncoding encoding) size_t count = WXSIZEOF(gs_encodingDescs); wxASSERT_MSG( count == WXSIZEOF(gs_encodings), - wxT("inconsitency detected - forgot to update one of " - "the arrays?") ); + wxT("inconsitency detected - forgot to update one of the arrays?") ); for ( size_t i = 0; i < count; i++ ) { @@ -314,8 +340,7 @@ wxString wxFontMapper::GetEncodingName(wxFontEncoding encoding) size_t count = WXSIZEOF(gs_encodingNames); wxASSERT_MSG( count == WXSIZEOF(gs_encodings), - wxT("inconsitency detected - forgot to update one of " - "the arrays?") ); + wxT("inconsistency detected - forgot to update one of the arrays?") ); for ( size_t i = 0; i < count; i++ ) { @@ -339,6 +364,7 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, // we're going to modify it, make a copy wxString cs = charset; +#if wxUSE_CONFIG // first try the user-defined settings wxString pathOld; if ( ChangePath(FONTMAPPER_CHARSET_PATH, &pathOld) ) @@ -355,8 +381,7 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, } else { - wxLogDebug(wxT("corrupted config data: invalid encoding %ld " - "for charset '%s' ignored"), + wxLogDebug(wxT("corrupted config data: invalid encoding %ld for charset '%s' ignored"), value, charset.c_str()); } } @@ -376,16 +401,35 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, RestorePath(pathOld); } +#endif - // if didn't find it there, try to reckognise it ourselves + // if didn't find it there, try to recognize it ourselves if ( encoding == wxFONTENCODING_SYSTEM ) { + // discard the optional quotes + if ( !!cs ) + { + if ( cs[0u] == _T('"') && cs.Last() == _T('"') ) + { + cs = wxString(cs.c_str(), cs.length() - 1); + } + } + cs.MakeUpper(); if ( !cs || cs == wxT("US-ASCII") ) + { encoding = wxFONTENCODING_DEFAULT; - else if ( cs == wxT("KOI8-R") || cs == wxT("KOI8-U") ) + } + else if ( cs == wxT("KOI8-R") || + cs == wxT("KOI8-U") || + cs == wxT("KOI8-RU") ) + { + // although koi8-ru is not strictly speaking the same as koi8-r, + // they are similar enough to make mapping it to koi8 better than + // not reckognizing it at all encoding = wxFONTENCODING_KOI8; + } else if ( cs.Left(3) == wxT("ISO") ) { // the dash is optional (or, to be exact, it is not, but @@ -397,29 +441,53 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, unsigned int value; if ( wxSscanf(p, wxT("8859-%u"), &value) == 1 ) { - if ( value < wxFONTENCODING_ISO8859_MAX - - wxFONTENCODING_ISO8859_1 ) + // make it 0 based and check that it is strictly positive in + // the process (no such thing as iso8859-0 encoding) + if ( (value-- > 0) && + (value < wxFONTENCODING_ISO8859_MAX - + wxFONTENCODING_ISO8859_1) ) { // it's a valid ISO8859 encoding - value += wxFONTENCODING_ISO8859_1 - 1; + value += wxFONTENCODING_ISO8859_1; encoding = (wxFontEncoding)value; } } } - else if ( cs.Left(8) == wxT("WINDOWS-") ) + else // check for Windows charsets { - int value; - if ( wxSscanf(cs.c_str() + 8, wxT("%u"), &value) == 1 ) + size_t len; + if ( cs.Left(7) == wxT("WINDOWS") ) { - if ( value >= 1250 ) + len = 7; + } + else if ( cs.Left(2) == wxT("CP") ) + { + len = 2; + } + else // not a Windows encoding + { + len = 0; + } + + if ( len ) + { + const wxChar *p = cs.c_str() + len; + if ( *p == wxT('-') ) + p++; + + int value; + if ( wxSscanf(p, wxT("%u"), &value) == 1 ) { - value -= 1250; - if ( value < wxFONTENCODING_CP12_MAX - - wxFONTENCODING_CP1250 - 1 ) + if ( value >= 1250 ) { - // a valid Windows code page - value += wxFONTENCODING_CP1250; - encoding = (wxFontEncoding)value; + value -= 1250; + if ( value < wxFONTENCODING_CP12_MAX - + wxFONTENCODING_CP1250 ) + { + // a valid Windows code page + value += wxFONTENCODING_CP1250; + encoding = (wxFontEncoding)value; + } } } } @@ -427,6 +495,7 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, //else: unknown } +#if wxUSE_GUI // if still no luck, ask the user - unless disabled if ( (encoding == wxFONTENCODING_SYSTEM) && interactive ) { @@ -439,16 +508,13 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, // the message wxString msg; - msg.Printf(_("The charset '%s' is unknown. You may select\n" - "another charset to replace it with or choose\n" - "[Cancel] if it cannot be replaced"), charset.c_str()); + msg.Printf(_("The charset '%s' is unknown. You may select\nanother charset to replace it with or choose\n[Cancel] if it cannot be replaced"), charset.c_str()); // the list of choices size_t count = WXSIZEOF(gs_encodingDescs); wxASSERT_MSG( count == WXSIZEOF(gs_encodings), - wxT("inconsitency detected - forgot to update one of " - "the arrays?") ); + wxT("inconsitency detected - forgot to update one of the arrays?") ); wxString *encodingNamesTranslated = new wxString[count]; @@ -474,7 +540,8 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, { encoding = gs_encodings[n]; - // save the result in the config now +#if wxUSE_CONFIG + // save the result in the config now if ( ChangePath(FONTMAPPER_CHARSET_PATH, &pathOld) ) { wxConfigBase *config = GetConfig(); @@ -482,15 +549,16 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, // remember the alt encoding for this charset if ( !config->Write(charset, (long)encoding) ) { - wxLogError(_("Failed to remember the encoding " - "for the charset '%s'."), charset.c_str()); + wxLogError(_("Failed to remember the encoding for the charset '%s'."), charset.c_str()); } RestorePath(pathOld); } +#endif // wxUSE_CONFIG } //else: cancelled } +#endif // wxUSE_GUI return encoding; } @@ -501,6 +569,8 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, // correspond to which is used by GetFontForEncoding() function // ---------------------------------------------------------------------------- +#if wxUSE_GUI + bool wxFontMapper::TestAltEncoding(const wxString& configEntry, wxFontEncoding encReplacement, wxNativeEncodingInfo *info) @@ -508,6 +578,7 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry, if ( wxGetNativeFontEncoding(encReplacement, info) && wxTestFontEncoding(*info) ) { +#if wxUSE_CONFIG // remember the mapping in the config wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH); @@ -515,18 +586,48 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry, { GetConfig()->Write(configEntry, info->ToString()); } - +#endif // wxUSE_CONFIG return TRUE; } return FALSE; } +#if wxUSE_GUI +class ReentrancyBlocker +{ +public: + ReentrancyBlocker(bool& b) : m_b(b) { m_b = TRUE; } + ~ReentrancyBlocker() { m_b = FALSE; } + +private: + bool& m_b; +}; +#endif + bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, wxNativeEncodingInfo *info, const wxString& facename, bool interactive) { +#if wxUSE_GUI + // we need a flag to prevent infinite recursion which happens, for + // example, when GetAltForEncoding() is called from an OnPaint() handler: + // in this case, wxYield() which is called from wxMessageBox() we use here + // will lead to another call of OnPaint() and hence to another call of + // GetAltForEncoding() - and it is impossible to catch this from the user + // code because we are called from wxFont ctor implicitly. + + // assume we're always called from the main thread, so that it is safe to + // use a static var + static bool s_inGetAltForEncoding = FALSE; + + if ( interactive && s_inGetAltForEncoding ) + return FALSE; + + ReentrancyBlocker blocker(s_inGetAltForEncoding); +#endif // wxUSE_GUI + wxCHECK_MSG( info, FALSE, wxT("bad pointer in GetAltForEncoding") ); info->facename = facename; @@ -554,6 +655,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, } configEntry += encName; +#if wxUSE_CONFIG // do we have a font spec for this encoding? wxString pathOld; if ( ChangePath(FONTMAPPER_FONT_FROM_ENCODING_PATH, &pathOld) ) @@ -564,31 +666,43 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, RestorePath(pathOld); - if ( !!fontinfo && !!facename ) + // this special value means that we don't know of fonts for this + // encoding but, moreover, have already asked the user as well and he + // didn't specify any font neither + if ( fontinfo == FONTMAPPER_FONT_DONT_ASK ) { - // we tried to find a match with facename - now try without it - fontinfo = config->Read(encName); + interactive = FALSE; } + else // use the info entered the last time + { + if ( !!fontinfo && !!facename ) + { + // we tried to find a match with facename - now try without it + fontinfo = config->Read(encName); + } - if ( !!fontinfo ) - { - if ( info->FromString(fontinfo) ) + if ( !!fontinfo ) { - if ( wxTestFontEncoding(*info) ) + if ( info->FromString(fontinfo) ) { - // ok, got something - return TRUE; + if ( wxTestFontEncoding(*info) ) + { + // ok, got something + return TRUE; + } + //else: no such fonts, look for something else + // (should we erase the outdated value?) + } + else + { + wxLogDebug(wxT("corrupted config data: string '%s' is not a valid font encoding info"), + fontinfo.c_str()); } - //else: no such fonts, look for something else - } - else - { - wxLogDebug(wxT("corrupted config data: string '%s' is not " - "a valid font encoding info"), fontinfo.c_str()); } + //else: there is no information in config about this encoding } - //else: there is no information in config about this encoding } +#endif // wxUSE_CONFIG // ask the user if ( interactive ) @@ -599,11 +713,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, // the message wxString msg; - msg.Printf(_("The encoding '%s' is unknown.\n" - "Would you like to select a font to be used for this " - "encoding\n" - "(otherwise the text in this encoding will not be " - "shown correctly)?"), + msg.Printf(_("No font for displaying text in encoding '%s' found.\nWould you like to select a font to be used for this encoding\n(otherwise the text in this encoding will not be shown correctly)?"), GetEncodingDescription(encoding).c_str()); wxWindow *parent = m_windowParent; @@ -625,6 +735,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, *info = retData.EncodingInfo(); info -> encoding = retData.GetEncoding(); +#if wxUSE_CONFIG // remember this in the config if ( ChangePath(FONTMAPPER_FONT_FROM_ENCODING_PATH, &pathOld) ) { @@ -632,30 +743,43 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, RestorePath(pathOld); } +#endif // wxUSE_CONFIG return TRUE; } //else: the user canceled the font selection dialog } - //else: the user doesn't want to select a font + else + { + // the user doesn't want to select a font for this encoding, + // remember it to avoid asking the same question again later +#if wxUSE_CONFIG + if ( ChangePath(FONTMAPPER_FONT_FROM_ENCODING_PATH, &pathOld) ) + { + GetConfig()->Write(configEntry, FONTMAPPER_FONT_DONT_ASK); + + RestorePath(pathOld); + } +#endif // wxUSE_CONFIG + } } //else: we're in non-interactive mode - // now try the default mappings: wxFontEncodingArray equiv = wxEncodingConverter::GetAllEquivalents(encoding); size_t count = equiv.GetCount(); - for ( size_t i = (equiv[0] == encoding) ? 1 : 0; i < count; i++ ) + if ( count ) { - if ( TestAltEncoding(configEntry, equiv[i], info) ) - return TRUE; + for ( size_t i = (equiv[0] == encoding) ? 1 : 0; i < count; i++ ) + { + if ( TestAltEncoding(configEntry, equiv[i], info) ) + return TRUE; + } } return FALSE; } - - bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, wxFontEncoding *alt_encoding, const wxString& facename, @@ -667,8 +791,6 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, return r; } - - bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding, const wxString& facename) { @@ -679,6 +801,8 @@ bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding, info.facename = facename; return wxTestFontEncoding(info); } - else - return FALSE; + + return FALSE; } + +#endif // wxUSE_GUI diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index ef3ab1defc..c7678d5b5f 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -196,15 +196,17 @@ bool wxFrameBase::ProcessCommand(int id) if ( !bar ) return FALSE; + wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id); + commandEvent.SetEventObject(this); + wxMenuItem *item = bar->FindItem(id); if ( item && item->IsCheckable() ) { item->Toggle(); - } - wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id); - commandEvent.SetInt(id); - commandEvent.SetEventObject(this); + // use the new value + commandEvent.SetInt(item->IsChecked()); + } return GetEventHandler()->ProcessEvent(commandEvent); } @@ -284,29 +286,7 @@ void wxFrameBase::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) void wxFrameBase::OnMenuHighlight(wxMenuEvent& event) { #if wxUSE_STATUSBAR - if ( GetStatusBar() ) - { - // if no help string found, we will clear the status bar text - wxString helpString; - - int menuId = event.GetMenuId(); - if ( menuId != wxID_SEPARATOR && menuId != -2 /* wxID_TITLE */ ) - { - wxMenuBar *menuBar = GetMenuBar(); - if ( menuBar ) - { - // it's ok if we don't find the item because it might belong - // to the popup menu - wxMenuItem *item = menuBar->FindItem(menuId); - if ( item ) - helpString = item->GetHelp(); - } - } - - // set status text even if the string is empty - this will at least - // remove the string from the item which was previously selected - SetStatusText(helpString); - } + (void)ShowMenuHelp(GetStatusBar(), event.GetMenuId()); #endif // wxUSE_STATUSBAR } @@ -372,6 +352,34 @@ void wxFrameBase::SetStatusWidths(int n, const int widths_field[] ) PositionStatusBar(); } +bool wxFrameBase::ShowMenuHelp(wxStatusBar *statbar, int menuId) +{ + if ( !statbar ) + return FALSE; + + // if no help string found, we will clear the status bar text + wxString helpString; + + if ( menuId != wxID_SEPARATOR && menuId != -2 /* wxID_TITLE */ ) + { + wxMenuBar *menuBar = GetMenuBar(); + if ( menuBar ) + { + // it's ok if we don't find the item because it might belong + // to the popup menu + wxMenuItem *item = menuBar->FindItem(menuId); + if ( item ) + helpString = item->GetHelp(); + } + } + + // set status text even if the string is empty - this will at least + // remove the string from the item which was previously selected + statbar->SetStatusText(helpString); + + return !helpString.IsEmpty(); +} + #endif // wxUSE_STATUSBAR // ---------------------------------------------------------------------------- diff --git a/src/common/fs_inet.cpp b/src/common/fs_inet.cpp index d3b94f258d..31e26d60e9 100644 --- a/src/common/fs_inet.cpp +++ b/src/common/fs_inet.cpp @@ -20,7 +20,7 @@ limitation) */ #ifdef __GNUG__ -#pragma implementation +#pragma implementation "fs_inet.h" #endif #include "wx/wxprec.h" @@ -94,8 +94,8 @@ bool wxInternetFSHandler::CanOpen(const wxString& location) wxURL url(p + wxT(":") + StripProtocolAnchor(location)); return (url.GetError() == wxURL_NOERR); } - else - return FALSE; + + return FALSE; } @@ -140,15 +140,14 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxStri // Load item from cache: s = new wxFileInputStream(info->GetTemp()); - if (s) - { - return new wxFSFile(s, - right, - info->GetMime(), - GetAnchor(location), - wxDateTime::Now()); - } - else return (wxFSFile*) NULL; + if (!s) + return (wxFSFile*) NULL; + + return new wxFSFile(s, + right, + info->GetMime(), + GetAnchor(location), + wxDateTime::Now()); } diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index bc089b0990..97075de32a 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -8,7 +8,7 @@ #ifdef __GNUG__ -#pragma implementation +#pragma implementation "fs_mem.h" #endif #include "wx/wxprec.h" @@ -159,13 +159,13 @@ bool wxMemoryFSHandler::CheckHash(const wxString& filename) wxMemoryOutputStream mems; - if (image.Ok() && image.SaveFile(mems, type)) + if (image.Ok() && image.SaveFile(mems, (int)type)) m_Hash -> Put(filename, new MemFSHashObj(mems)); else { wxString s; s.Printf(_("Failed to store image '%s' to memory VFS!"), filename.c_str()); - printf("'%s'\n", s.c_str()); + wxPrintf(wxT("'%s'\n"), s.c_str()); wxLogError(s); } } diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index 438a20a2b2..74c38df52c 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -8,7 +8,7 @@ #ifdef __GNUG__ -#pragma implementation +#pragma implementation "fs_zip.h" #endif #include "wx/wxprec.h" @@ -61,7 +61,7 @@ wxZipFSHandler::~wxZipFSHandler() bool wxZipFSHandler::CanOpen(const wxString& location) { wxString p = GetProtocol(location); - return (p == wxT("zip") ); + return (p == wxT("zip")); } @@ -73,19 +73,23 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l wxString left = GetLeftLocation(location); wxInputStream *s; - if (GetProtocol(left) != wxT("file")) { + if (GetProtocol(left) != wxT("file")) + { return NULL; } s = new wxZipInputStream(left, right); - if (s && (s -> LastError() == wxStream_NOERROR)) { + if (s && (s->LastError() == wxStream_NOERROR)) + { return new wxFSFile(s, left + wxT("#zip:") + right, GetMimeTypeFromExt(location), GetAnchor(location), wxDateTime(wxFileModificationTime(left))); } - else return NULL; + + delete s; + return NULL; } @@ -97,33 +101,40 @@ wxString wxZipFSHandler::FindFirst(const wxString& spec, int flags) if (right.Last() == wxT('/')) right.RemoveLast(); - if (m_Archive) { + if (m_Archive) + { unzClose((unzFile)m_Archive); m_Archive = NULL; } - if (GetProtocol(left) != wxT("file")) { + if (GetProtocol(left) != wxT("file")) return wxEmptyString; - } - switch (flags) { - case wxFILE : m_AllowDirs = FALSE, m_AllowFiles = TRUE; break; - case wxDIR : m_AllowDirs = TRUE, m_AllowFiles = FALSE; break; - default : m_AllowDirs = m_AllowFiles = TRUE; break; + switch (flags) + { + case wxFILE: + m_AllowDirs = FALSE, m_AllowFiles = TRUE; break; + case wxDIR: + m_AllowDirs = TRUE, m_AllowFiles = FALSE; break; + default: + m_AllowDirs = m_AllowFiles = TRUE; break; } m_ZipFile = left; - m_Archive = (void*) unzOpen(m_ZipFile.fn_str()); + m_Archive = (void*) unzOpen(m_ZipFile.mb_str()); m_Pattern = right.AfterLast(wxT('/')); m_BaseDir = right.BeforeLast(wxT('/')); - if (m_Archive) { - if (unzGoToFirstFile((unzFile)m_Archive) != UNZ_OK) { + if (m_Archive) + { + if (unzGoToFirstFile((unzFile)m_Archive) != UNZ_OK) + { unzClose((unzFile)m_Archive); m_Archive = NULL; } + else return DoFind(); } - return DoFind(); + return wxEmptyString; } @@ -149,7 +160,8 @@ wxString wxZipFSHandler::DoFind() unzGetCurrentFileInfo((unzFile)m_Archive, NULL, namebuf, 1024, NULL, 0, NULL, 0); for (c = namebuf; *c; c++) if (*c == wxT('\\')) *c = wxT('/'); fn = namebuf; - if (fn.Last() == wxT('/')) { + if (fn.Length() > 0 && fn.Last() == wxT('/')) + { fn.RemoveLast(); wasdir = TRUE; } @@ -158,14 +170,16 @@ wxString wxZipFSHandler::DoFind() name = fn.AfterLast(wxT('/')); dir = fn.BeforeLast(wxT('/')); - if (dir == m_BaseDir) { + if (dir == m_BaseDir) + { if (m_AllowFiles && !wasdir && wxMatchWild(m_Pattern, name, FALSE)) match = m_ZipFile + wxT("#zip:") + fn; if (m_AllowDirs && wasdir && wxMatchWild(m_Pattern, name, FALSE)) match = m_ZipFile + wxT("#zip:") + fn; } - if (unzGoToNextFile((unzFile)m_Archive) != UNZ_OK) { + if (unzGoToNextFile((unzFile)m_Archive) != UNZ_OK) + { unzClose((unzFile)m_Archive); m_Archive = NULL; break; diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index e9db032f8e..1d5e801965 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -20,7 +20,9 @@ #pragma hdrstop #endif -#if wxUSE_SOCKETS +#include "wx/setup.h" + +#if wxUSE_SOCKETS && wxUSE_STREAMS #ifndef __MWERKS__ #include @@ -398,11 +400,23 @@ public: : wxSocketOutputStream(*sock), m_ftp(ftp_clt) {} virtual ~wxOutputFTPStream(void) { - if (LastError() != wxStream_NOERROR) - m_ftp->GetResult('2'); - else - m_ftp->Abort(); - delete m_o_socket; + if ( IsOk() ) + { + // close data connection first, this will generate "transfer + // completed" reply + delete m_o_socket; + + // read this reply + m_ftp->GetResult('2'); + } + else + { + // abort data connection first + m_ftp->Abort(); + + // and close it after + delete m_o_socket; + } } }; diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 472650c95c..6a242f6f35 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -63,8 +63,8 @@ wxRect::wxRect(const wxPoint& topLeft, const wxPoint& bottomRight) { x = topLeft.x; y = topLeft.y; - width = bottomRight.x - topLeft.x; - height = bottomRight.y - topLeft.y; + width = bottomRight.x - topLeft.x + 1; + height = bottomRight.y - topLeft.y + 1; if (width < 0) { @@ -136,106 +136,95 @@ wxColourDatabase::~wxColourDatabase () // Colour database stuff void wxColourDatabase::Initialize () { - // Don't initialize for X: colours are found - // in FindColour below. - // Added: Not all + static const struct wxColourDesc + { + const wxChar *name; + int r,g,b; + } + wxColourTable[] = + { + {wxT("AQUAMARINE"),112, 219, 147}, + {wxT("BLACK"),0, 0, 0}, + {wxT("BLUE"), 0, 0, 255}, + {wxT("BLUE VIOLET"), 159, 95, 159}, + {wxT("BROWN"), 165, 42, 42}, + {wxT("CADET BLUE"), 95, 159, 159}, + {wxT("CORAL"), 255, 127, 0}, + {wxT("CORNFLOWER BLUE"), 66, 66, 111}, + {wxT("CYAN"), 0, 255, 255}, + {wxT("DARK GREY"), 47, 47, 47}, // ? - struct cdef { - wxChar *name; - int r,g,b; - }; - cdef cc; - static cdef table[]={ - -// #ifdef __WXMSW__ - {wxT("AQUAMARINE"),112, 219, 147}, - {wxT("BLACK"),0, 0, 0}, - {wxT("BLUE"), 0, 0, 255}, - {wxT("BLUE VIOLET"), 159, 95, 159}, - {wxT("BROWN"), 165, 42, 42}, - {wxT("CADET BLUE"), 95, 159, 159}, - {wxT("CORAL"), 255, 127, 0}, - {wxT("CORNFLOWER BLUE"), 66, 66, 111}, - {wxT("CYAN"), 0, 255, 255}, - {wxT("DARK GREY"), 47, 47, 47}, // ? - - {wxT("DARK GREEN"), 47, 79, 47}, - {wxT("DARK OLIVE GREEN"), 79, 79, 47}, - {wxT("DARK ORCHID"), 153, 50, 204}, - {wxT("DARK SLATE BLUE"), 107, 35, 142}, - {wxT("DARK SLATE GREY"), 47, 79, 79}, - {wxT("DARK TURQUOISE"), 112, 147, 219}, - {wxT("DIM GREY"), 84, 84, 84}, - {wxT("FIREBRICK"), 142, 35, 35}, - {wxT("FOREST GREEN"), 35, 142, 35}, - {wxT("GOLD"), 204, 127, 50}, - {wxT("GOLDENROD"), 219, 219, 112}, - {wxT("GREY"), 128, 128, 128}, - {wxT("GREEN"), 0, 255, 0}, - {wxT("GREEN YELLOW"), 147, 219, 112}, - {wxT("INDIAN RED"), 79, 47, 47}, - {wxT("KHAKI"), 159, 159, 95}, - {wxT("LIGHT BLUE"), 191, 216, 216}, - {wxT("LIGHT GREY"), 192, 192, 192}, - {wxT("LIGHT STEEL BLUE"), 143, 143, 188}, - {wxT("LIME GREEN"), 50, 204, 50}, - {wxT("LIGHT MAGENTA"), 255, 0, 255}, - {wxT("MAGENTA"), 255, 0, 255}, - {wxT("MAROON"), 142, 35, 107}, - {wxT("MEDIUM AQUAMARINE"), 50, 204, 153}, - {wxT("MEDIUM GREY"), 100, 100, 100}, - {wxT("MEDIUM BLUE"), 50, 50, 204}, - {wxT("MEDIUM FOREST GREEN"), 107, 142, 35}, - {wxT("MEDIUM GOLDENROD"), 234, 234, 173}, - {wxT("MEDIUM ORCHID"), 147, 112, 219}, - {wxT("MEDIUM SEA GREEN"), 66, 111, 66}, - {wxT("MEDIUM SLATE BLUE"), 127, 0, 255}, - {wxT("MEDIUM SPRING GREEN"), 127, 255, 0}, - {wxT("MEDIUM TURQUOISE"), 112, 219, 219}, - {wxT("MEDIUM VIOLET RED"), 219, 112, 147}, - {wxT("MIDNIGHT BLUE"), 47, 47, 79}, - {wxT("NAVY"), 35, 35, 142}, - {wxT("ORANGE"), 204, 50, 50}, - {wxT("ORANGE RED"), 255, 0, 127}, - {wxT("ORCHID"), 219, 112, 219}, - {wxT("PALE GREEN"), 143, 188, 143}, - {wxT("PINK"), 188, 143, 234}, - {wxT("PLUM"), 234, 173, 234}, - {wxT("PURPLE"), 176, 0, 255}, - {wxT("RED"), 255, 0, 0}, - {wxT("SALMON"), 111, 66, 66}, - {wxT("SEA GREEN"), 35, 142, 107}, - {wxT("SIENNA"), 142, 107, 35}, - {wxT("SKY BLUE"), 50, 153, 204}, - {wxT("SLATE BLUE"), 0, 127, 255}, - {wxT("SPRING GREEN"), 0, 255, 127}, - {wxT("STEEL BLUE"), 35, 107, 142}, - {wxT("TAN"), 219, 147, 112}, - {wxT("THISTLE"), 216, 191, 216}, - {wxT("TURQUOISE"), 173, 234, 234}, - {wxT("VIOLET"), 79, 47, 79}, - {wxT("VIOLET RED"), 204, 50, 153}, - {wxT("WHEAT"), 216, 216, 191}, - {wxT("WHITE"), 255, 255, 255}, - {wxT("YELLOW"), 255, 255, 0}, - {wxT("YELLOW GREEN"), 153, 204, 50}, -// #endif - -#if defined(__WXGTK__) || defined(__X__) - {wxT("MEDIUM GOLDENROD"), 234, 234, 173}, - {wxT("MEDIUM FOREST GREEN"), 107, 142, 35}, - {wxT("LIGHT MAGENTA"), 255, 0, 255}, - {wxT("MEDIUM GREY"), 100, 100, 100}, -#endif - - {0,0,0,0} - }; - int i; - for (i=0;cc=table[i],cc.name!=0;i++) - { - Append(cc.name,new wxColour(cc.r,cc.g,cc.b)); - } + {wxT("DARK GREEN"), 47, 79, 47}, + {wxT("DARK OLIVE GREEN"), 79, 79, 47}, + {wxT("DARK ORCHID"), 153, 50, 204}, + {wxT("DARK SLATE BLUE"), 107, 35, 142}, + {wxT("DARK SLATE GREY"), 47, 79, 79}, + {wxT("DARK TURQUOISE"), 112, 147, 219}, + {wxT("DIM GREY"), 84, 84, 84}, + {wxT("FIREBRICK"), 142, 35, 35}, + {wxT("FOREST GREEN"), 35, 142, 35}, + {wxT("GOLD"), 204, 127, 50}, + {wxT("GOLDENROD"), 219, 219, 112}, + {wxT("GREY"), 128, 128, 128}, + {wxT("GREEN"), 0, 255, 0}, + {wxT("GREEN YELLOW"), 147, 219, 112}, + {wxT("INDIAN RED"), 79, 47, 47}, + {wxT("KHAKI"), 159, 159, 95}, + {wxT("LIGHT BLUE"), 191, 216, 216}, + {wxT("LIGHT GREY"), 192, 192, 192}, + {wxT("LIGHT STEEL BLUE"), 143, 143, 188}, + {wxT("LIME GREEN"), 50, 204, 50}, + {wxT("LIGHT MAGENTA"), 255, 0, 255}, + {wxT("MAGENTA"), 255, 0, 255}, + {wxT("MAROON"), 142, 35, 107}, + {wxT("MEDIUM AQUAMARINE"), 50, 204, 153}, + {wxT("MEDIUM GREY"), 100, 100, 100}, + {wxT("MEDIUM BLUE"), 50, 50, 204}, + {wxT("MEDIUM FOREST GREEN"), 107, 142, 35}, + {wxT("MEDIUM GOLDENROD"), 234, 234, 173}, + {wxT("MEDIUM ORCHID"), 147, 112, 219}, + {wxT("MEDIUM SEA GREEN"), 66, 111, 66}, + {wxT("MEDIUM SLATE BLUE"), 127, 0, 255}, + {wxT("MEDIUM SPRING GREEN"), 127, 255, 0}, + {wxT("MEDIUM TURQUOISE"), 112, 219, 219}, + {wxT("MEDIUM VIOLET RED"), 219, 112, 147}, + {wxT("MIDNIGHT BLUE"), 47, 47, 79}, + {wxT("NAVY"), 35, 35, 142}, + {wxT("ORANGE"), 204, 50, 50}, + {wxT("ORANGE RED"), 255, 0, 127}, + {wxT("ORCHID"), 219, 112, 219}, + {wxT("PALE GREEN"), 143, 188, 143}, + {wxT("PINK"), 188, 143, 234}, + {wxT("PLUM"), 234, 173, 234}, + {wxT("PURPLE"), 176, 0, 255}, + {wxT("RED"), 255, 0, 0}, + {wxT("SALMON"), 111, 66, 66}, + {wxT("SEA GREEN"), 35, 142, 107}, + {wxT("SIENNA"), 142, 107, 35}, + {wxT("SKY BLUE"), 50, 153, 204}, + {wxT("SLATE BLUE"), 0, 127, 255}, + {wxT("SPRING GREEN"), 0, 255, 127}, + {wxT("STEEL BLUE"), 35, 107, 142}, + {wxT("TAN"), 219, 147, 112}, + {wxT("THISTLE"), 216, 191, 216}, + {wxT("TURQUOISE"), 173, 234, 234}, + {wxT("VIOLET"), 79, 47, 79}, + {wxT("VIOLET RED"), 204, 50, 153}, + {wxT("WHEAT"), 216, 216, 191}, + {wxT("WHITE"), 255, 255, 255}, + {wxT("YELLOW"), 255, 255, 0}, + {wxT("YELLOW GREEN"), 153, 204, 50}, + {wxT("MEDIUM GOLDENROD"), 234, 234, 173}, + {wxT("MEDIUM FOREST GREEN"), 107, 142, 35}, + {wxT("LIGHT MAGENTA"), 255, 0, 255}, + {wxT("MEDIUM GREY"), 100, 100, 100}, + }; + for ( size_t n = 0; n < WXSIZEOF(wxColourTable); n++ ) + { + const wxColourDesc& cc = wxColourTable[n]; + Append(cc.name, new wxColour(cc.r,cc.g,cc.b)); + } } /* @@ -249,45 +238,54 @@ void wxColourDatabase::Initialize () wxColour *wxColourDatabase::FindColour(const wxString& colour) { - // VZ: make the comparaison case insensitive - wxString str = colour; - str.MakeUpper(); + // VZ: make the comparaison case insensitive and also match both grey and + // gray + wxString colName = colour; + colName.MakeUpper(); + wxString colName2 = colName; + if ( !colName2.Replace(_T("GRAY"), _T("GREY")) ) + colName2.clear(); - wxNode *node = Find(str); - if (node) - return (wxColour *)node->Data(); + wxNode *node = First(); + while ( node ) + { + const wxChar *key = node->GetKeyString(); + if ( colName == key || colName2 == key ) + { + return (wxColour *)node->Data(); + } + + node = node->Next(); + } #ifdef __WXMSW__ - else return NULL; + return NULL; #endif #ifdef __WXPM__ - else return NULL; + return NULL; #endif // TODO for other implementations. This should really go into // platform-specific directories. #ifdef __WXMAC__ - else return NULL; + return NULL; #endif #ifdef __WXSTUBS__ - else return NULL; + return NULL; #endif #ifdef __WXGTK__ - else { - wxColour *col = new wxColour( colour ); + wxColour *col = new wxColour( colour ); - if (!(col->Ok())) { + if (!(col->Ok())) { delete col; return (wxColour *) NULL; - } - Append( colour, col ); - return col; } + Append( colour, col ); + return col; #endif #ifdef __X__ - else { XColor xcolour; #ifdef __WXMOTIF__ @@ -311,8 +309,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) Append(colour, col); return col; - } -#endif +#endif // __X__ } wxString wxColourDatabase::FindName (const wxColour& colour) const @@ -398,6 +395,23 @@ void wxInitializeStockObjects () wxBLUE = new wxColour ("BLUE"); wxGREEN = new wxColour ("GREEN"); wxCYAN = new wxColour ("CYAN"); + + // VZ: Here is why this colour is treated specially: normally, wxLIGHT_GREY + // is the window background colour and it is also used as the + // "transparent" colour in the bitmaps - for example, for the toolbar + // bitmaps. In particular, the mask creation code in tbar95.cpp assumes + // this - but it fails under Win2K where the system 3D colour is not + // 0xc0c0c0 (usual light grey) but 0xc6c3c6. To make everything work as + // expected there we have to define wxLIGHT_GREY accordingly - another + // solution would be to hack wxMask::Create()... +#ifdef __WIN32__ + int majOs, minOs; + if ( wxGetOsVersion(&majOs, &minOs) == wxWINDOWS_NT && (majOs == 5) ) + { + wxLIGHT_GREY = new wxColour(0xc6c3c6); + } + else +#endif // MSW wxLIGHT_GREY = new wxColour ("LIGHT GREY"); wxSTANDARD_CURSOR = new wxCursor (wxCURSOR_ARROW); @@ -595,34 +609,76 @@ void wxFontList::RemoveFont (wxFont * font) DeleteObject (font); } -wxFont *wxFontList:: - FindOrCreateFont (int PointSize, int FamilyOrFontId, int Style, int Weight, bool underline, const wxString& Face, wxFontEncoding encoding) +wxFont *wxFontList::FindOrCreateFont(int pointSize, + int family, + int style, + int weight, + bool underline, + const wxString& facename, + wxFontEncoding encoding) { - for (wxNode * node = First (); node; node = node->Next ()) + wxFont *font = (wxFont *)NULL; + wxNode *node; + for ( node = First(); node; node = node->Next() ) { - wxFont *each_font = (wxFont *) node->Data (); - if (each_font && - each_font->GetVisible() && - each_font->Ok() && - each_font->GetPointSize () == PointSize && - each_font->GetStyle () == Style && - each_font->GetWeight () == Weight && - each_font->GetUnderlined () == underline && + font = (wxFont *)node->Data(); + if ( font->GetVisible() && + font->Ok() && + font->GetPointSize () == pointSize && + font->GetStyle () == style && + font->GetWeight () == weight && + font->GetUnderlined () == underline ) + { + int fontFamily = font->GetFamily(); + #if defined(__WXGTK__) - (each_font->GetFamily() == FamilyOrFontId || - (each_font->GetFamily() == wxSWISS && FamilyOrFontId == wxDEFAULT)) && -#else - each_font->GetFamily() == FamilyOrFontId && -#endif - ((each_font->GetFaceName() == wxT("")) || each_font->GetFaceName() == Face) && - (encoding == wxFONTENCODING_DEFAULT || each_font->GetEncoding() == encoding)) - return each_font; + // under GTK the default family is wxSWISS, so looking for a font + // with wxDEFAULT family should return a wxSWISS one instead of + // creating a new one + bool same = (fontFamily == family) || + (fontFamily == wxSWISS && family == wxDEFAULT); +#else // !GTK + // VZ: but why elsewhere do we require an exact match? mystery... + bool same = fontFamily == family; +#endif // GTK/!GTK + + // empty facename matches anything at all: this is bad because + // depending on which fonts are already created, we might get back + // a different font if we create it with empty facename, but it is + // still better than never matching anything in the cache at all + // in this case + if ( same && !!facename ) + { + const wxString& fontFace = font->GetFaceName(); + + // empty facename matches everything + same = !fontFace || fontFace == facename; + } + + if ( same && (encoding != wxFONTENCODING_DEFAULT) ) + { + // have to match the encoding too + same = font->GetEncoding() == encoding; + } + + if ( same ) + { + return font; + } + } } - wxFont *font = new wxFont (PointSize, FamilyOrFontId, Style, Weight, underline, Face, encoding); - font->SetVisible(TRUE); + if ( !node ) + { + // font not found, create the new one + font = new wxFont(pointSize, family, style, weight, + underline, facename, encoding); - return font; + // and mark it as being cacheable + font->SetVisible(TRUE); + } + + return font; } void wxBitmapList::AddBitmap(wxBitmap *bitmap) @@ -644,31 +700,12 @@ wxSize wxGetDisplaySize() wxResourceCache::~wxResourceCache () { - wxNode *node = First (); - while (node) { - wxGDIObject *item = (wxGDIObject *)node->Data(); - if (item->IsKindOf(CLASSINFO(wxBrush))) { - wxBrush *brush = (wxBrush *)item; - delete brush; - } + wxNode *node = First (); + while (node) { + wxObject *item = (wxObject *)node->Data(); + delete item; - if (item->IsKindOf(CLASSINFO(wxFont))) { - wxFont *font = (wxFont *)item; - delete font; + node = node->Next (); } - - if (item->IsKindOf(CLASSINFO(wxBitmap))) { - wxBitmap *bitmap = (wxBitmap *)item; - delete bitmap; - } - - if (item->IsKindOf(CLASSINFO(wxColour))) { - wxColour *colour = (wxColour *)item; - delete colour; - } - - wxNode *next = node->Next (); - node = next; - } } diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index 923685e552..4936609deb 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -476,7 +476,7 @@ int wxGIFDecoder::ReadGIF() int ncolors, bits, interl, transparent, disposal, i; long size; long delay; - unsigned char type; + unsigned char type = 0; unsigned char pal[768]; unsigned char buf[16]; GIFImage **ppimg, *pimg, *pprev; diff --git a/src/common/hash.cpp b/src/common/hash.cpp index 5ec47a519b..db1e0aec25 100644 --- a/src/common/hash.cpp +++ b/src/common/hash.cpp @@ -104,7 +104,7 @@ void wxHashTableBase::DeleteContents(bool flag) wxNodeBase *wxHashTableBase::GetNode(long key, long value) const { - size_t slot = (size_t)abs(key % (long)m_hashSize); + size_t slot = (size_t)abs((int)(key % (long)m_hashSize)); wxNodeBase *node; if ( m_hashTable[slot] ) @@ -161,7 +161,7 @@ void wxHashTableLong::Put(long key, long value) { wxCHECK_RET( m_hashSize, _T("must call Create() first") ); - size_t slot = (size_t)abs(key % (long)m_hashSize); + size_t slot = (size_t)abs((int)(key % (long)m_hashSize)); if ( !m_keys[slot] ) { @@ -179,7 +179,7 @@ long wxHashTableLong::Get(long key) const { wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") ); - size_t slot = (size_t)abs(key % (long)m_hashSize); + size_t slot = (size_t)abs((int)(key % (long)m_hashSize)); wxArrayLong *keys = m_keys[slot]; if ( keys ) @@ -201,7 +201,7 @@ long wxHashTableLong::Delete(long key) { wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") ); - size_t slot = (size_t)abs(key % (long)m_hashSize); + size_t slot = (size_t)abs((int)(key % (long)m_hashSize)); wxArrayLong *keys = m_keys[slot]; if ( keys ) @@ -329,7 +329,7 @@ void wxHashTable::Put (long key, const wxChar *value, wxObject * object) if (!hash_table[position]) { - hash_table[position] = new wxList (wxKEY_INTEGER); + hash_table[position] = new wxList (wxKEY_STRING); if (m_deleteContents) hash_table[position]->DeleteContents(TRUE); } @@ -597,12 +597,15 @@ void wxHashTable::DeleteContents (bool flag) void wxHashTable::Clear () { - int i; - for (i = 0; i < n; i++) + if ( hash_table ) { - if (hash_table[i]) - hash_table[i]->Clear (); + for ( int i = 0; i < n; i++ ) + { + if ( hash_table[i] ) + hash_table[i]->Clear(); + } } - m_count = 0; + + m_count = 0; } diff --git a/src/common/http.cpp b/src/common/http.cpp index 606bc340ec..fe9b785f74 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -20,7 +20,7 @@ #pragma hdrstop #endif -#if wxUSE_SOCKETS +#if wxUSE_SOCKETS && wxUSE_STREAMS #include #include @@ -299,7 +299,8 @@ bool wxHTTP::Abort(void) wxInputStream *wxHTTP::GetInputStream(const wxString& path) { - wxHTTPStream *inp_stream = new wxHTTPStream(this); + wxHTTPStream *inp_stream; + wxString new_path; m_perr = wxPROTO_CONNERR; @@ -313,6 +314,8 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path) if (!BuildRequest(path, wxHTTP_GET)) return NULL; + inp_stream = new wxHTTPStream(this); + if (!GetHeader(wxT("Content-Length")).IsEmpty()) inp_stream->m_httpsize = wxAtoi(WXSTRINGCAST GetHeader(wxT("Content-Length"))); else diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 45169259e1..fd8a0ead6e 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -47,8 +47,123 @@ IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler) + #if wxUSE_STREAMS + +bool wxBMPHandler::SaveFile(wxImage *image, + wxOutputStream& stream, + bool verbose) +{ + wxCHECK_MSG( image, FALSE, _T("invalid pointer in wxBMPHandler::SaveFile") ); + + if (!image->Ok()) + { + if (verbose) wxLogError(_("BMP: Couldn't save invalid image.")); + return FALSE; + } + + unsigned width = image->GetWidth(); + unsigned row_width = width * 3 + + (((width % 4) == 0) ? 0 : (4 - (width * 3) % 4)); + // each row must be aligned to dwords + struct + { + // BitmapHeader: + wxUint16 magic; // format magic, always 'BM' + wxUint32 filesize; // total file size, inc. headers + wxUint32 reserved; // for future use + wxUint32 data_offset; // image data offset in the file + + // BitmapInfoHeader: + wxUint32 bih_size; // 2nd part's size + wxUint32 width, height; // bitmap's dimensions + wxUint16 planes; // num of planes + wxUint16 bpp; // bits per pixel + wxUint32 compression; // compression method + wxUint32 size_of_bmp; // size of the bitmap + wxUint32 h_res, v_res; // image resolution in dpi + wxUint32 num_clrs; // number of colors used + wxUint32 num_signif_clrs;// number of significant colors + } hdr; + wxUint32 hdr_size = 14/*BitmapHeader*/ + 40/*BitmapInfoHeader*/; + + hdr.magic = wxUINT16_SWAP_ON_BE(0x4D42/*'BM'*/); + hdr.filesize = wxUINT32_SWAP_ON_BE( + hdr_size + + row_width * image->GetHeight() + ); + hdr.reserved = 0; + hdr.data_offset = wxUINT32_SWAP_ON_BE(hdr_size); + + hdr.bih_size = wxUINT32_SWAP_ON_BE(hdr_size - 14); + hdr.width = wxUINT32_SWAP_ON_BE(image->GetWidth()); + hdr.height = wxUINT32_SWAP_ON_BE(image->GetHeight()); + hdr.planes = wxUINT16_SWAP_ON_BE(1); // always 1 plane + hdr.bpp = wxUINT16_SWAP_ON_BE(24); // always TrueColor + hdr.compression = 0; // RGB uncompressed + hdr.size_of_bmp = wxUINT32_SWAP_ON_BE(row_width * image->GetHeight()); + hdr.h_res = hdr.v_res = wxUINT32_SWAP_ON_BE(72); // 72dpi is standard + hdr.num_clrs = 0; // maximal possible = 2^24 + hdr.num_signif_clrs = 0; // all colors are significant + + if (// VS: looks ugly but compilers tend to do ugly things with structs, + // like aligning hdr.filesize's ofset to dword :( + // VZ: we should add padding then... + !stream.Write(&hdr.magic, 2) || + !stream.Write(&hdr.filesize, 4) || + !stream.Write(&hdr.reserved, 4) || + !stream.Write(&hdr.data_offset, 4) || + !stream.Write(&hdr.bih_size, 4) || + !stream.Write(&hdr.width, 4) || + !stream.Write(&hdr.height, 4) || + !stream.Write(&hdr.planes, 2) || + !stream.Write(&hdr.bpp, 2) || + !stream.Write(&hdr.compression, 4) || + !stream.Write(&hdr.size_of_bmp, 4) || + !stream.Write(&hdr.h_res, 4) || + !stream.Write(&hdr.v_res, 4) || + !stream.Write(&hdr.num_clrs, 4) || + !stream.Write(&hdr.num_signif_clrs, 4) + ) + { + if (verbose) + wxLogError(_("BMP: Couldn't write the file header.")); + return FALSE; + } + + wxUint8 *data = (wxUint8*) image->GetData(); + wxUint8 *buffer = new wxUint8[row_width]; + wxUint8 tmpvar; + memset(buffer, 0, row_width); + int y; unsigned x; + + for (y = image->GetHeight() -1 ; y >= 0; y--) + { + memcpy(buffer, data + y * 3 * width, 3 * width); + for (x = 0; x < width; x++) + { + tmpvar = buffer[3 * x + 0]; + buffer[3 * x + 0] = buffer[3 * x + 2]; + buffer[3 * x + 2] = tmpvar; + } + + if (!stream.Write(buffer, row_width)) + { + if (verbose) + wxLogError(_("BMP: Couldn't write data.")); + delete[] buffer; + return FALSE; + } + } + delete[] buffer; + + return TRUE; +} + + + + #ifndef BI_RGB #define BI_RGB 0 #define BI_RLE8 1 @@ -74,6 +189,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose } *cmap = NULL; off_t start_offset = stream.TellI(); + if (start_offset == wxInvalidOffset) start_offset = 0; image->Destroy(); @@ -254,7 +370,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose if (bpp == 1) { int bit = 0; - for (bit = 0; bit < 8; bit++) + for (bit = 0; bit < 8 && column < width; bit++) { index = ((aByte & (0x80 >> bit)) ? 1 : 0); ptr[poffset] = cmap[index].r; @@ -276,7 +392,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose else { int nibble = 0; - for (nibble = 0; nibble < 2; nibble++) + for (nibble = 0; nibble < 2 && column < width; nibble++) { index = ((aByte & (0xF0 >> nibble * 4)) >> (!nibble * 4)); if (index >= 16) @@ -332,7 +448,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose } else { - for (int l = 0; l < first; l++) + for (int l = 0; l < first && column < width; l++) { ptr[poffset ] = cmap[aByte].r; ptr[poffset + 1] = cmap[aByte].g; diff --git a/src/common/image.cpp b/src/common/image.cpp index 5f61154db2..1aa5903ad4 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -56,6 +56,7 @@ public: bool m_hasMask; unsigned char m_maskRed,m_maskGreen,m_maskBlue; bool m_ok; + bool m_static; }; wxImageRefData::wxImageRefData() @@ -68,11 +69,12 @@ wxImageRefData::wxImageRefData() m_maskGreen = 0; m_maskBlue = 0; m_hasMask = FALSE; + m_static = FALSE; } wxImageRefData::~wxImageRefData() { - if (m_data) + if (m_data && !m_static) free( m_data ); } @@ -93,6 +95,11 @@ wxImage::wxImage( int width, int height ) Create( width, height ); } +wxImage::wxImage( int width, int height, unsigned char* data, bool static_data ) +{ + Create( width, height, data, static_data ); +} + wxImage::wxImage( const wxString& name, long type ) { LoadFile( name, type ); @@ -146,11 +153,51 @@ void wxImage::Create( int width, int height ) } } +void wxImage::Create( int width, int height, unsigned char* data, bool static_data ) +{ + UnRef(); + + m_refData = new wxImageRefData(); + + M_IMGDATA->m_data = data; + if (M_IMGDATA->m_data) + { + M_IMGDATA->m_width = width; + M_IMGDATA->m_height = height; + M_IMGDATA->m_ok = TRUE; + M_IMGDATA->m_static = static_data; + } + else + { + UnRef(); + } +} + void wxImage::Destroy() { UnRef(); } +wxImage wxImage::Copy() const +{ + wxImage image; + + wxCHECK_MSG( Ok(), image, wxT("invalid image") ); + + image.Create( M_IMGDATA->m_width, M_IMGDATA->m_height ); + + char unsigned *data = image.GetData(); + + wxCHECK_MSG( data, image, wxT("unable to create image") ); + + if (M_IMGDATA->m_hasMask) + image.SetMaskColour( M_IMGDATA->m_maskRed, M_IMGDATA->m_maskGreen, M_IMGDATA->m_maskBlue ); + + memcpy( data, GetData(), M_IMGDATA->m_width*M_IMGDATA->m_height*3 ); + + return image; +} + wxImage wxImage::Scale( int width, int height ) const { wxImage image; @@ -190,6 +237,91 @@ wxImage wxImage::Scale( int width, int height ) const return image; } +wxImage wxImage::Rotate90( bool clockwise ) const +{ + wxImage image; + + wxCHECK_MSG( Ok(), image, wxT("invalid image") ); + + image.Create( M_IMGDATA->m_height, M_IMGDATA->m_width ); + + char unsigned *data = image.GetData(); + + wxCHECK_MSG( data, image, wxT("unable to create image") ); + + if (M_IMGDATA->m_hasMask) + image.SetMaskColour( M_IMGDATA->m_maskRed, M_IMGDATA->m_maskGreen, M_IMGDATA->m_maskBlue ); + + long height = M_IMGDATA->m_height; + long width = M_IMGDATA->m_width; + + char unsigned *source_data = M_IMGDATA->m_data; + char unsigned *target_data; + + for (long j = 0; j < height; j++) + { + for (long i = 0; i < width; i++) + { + if (clockwise) + target_data = data + (((i+1)*height) - j - 1)*3; + else + target_data = data + ((height*(width-1)) + j - (i*height))*3; + memcpy( target_data, source_data, 3 ); + source_data += 3; + } + } + + return image; +} + +wxImage wxImage::Mirror( bool horizontally ) const +{ + wxImage image; + + wxCHECK_MSG( Ok(), image, wxT("invalid image") ); + + image.Create( M_IMGDATA->m_width, M_IMGDATA->m_height ); + + char unsigned *data = image.GetData(); + + wxCHECK_MSG( data, image, wxT("unable to create image") ); + + if (M_IMGDATA->m_hasMask) + image.SetMaskColour( M_IMGDATA->m_maskRed, M_IMGDATA->m_maskGreen, M_IMGDATA->m_maskBlue ); + + long height = M_IMGDATA->m_height; + long width = M_IMGDATA->m_width; + + char unsigned *source_data = M_IMGDATA->m_data; + char unsigned *target_data; + + if (horizontally) + { + for (long j = 0; j < height; j++) + { + data += width*3; + target_data = data-3; + for (long i = 0; i < width; i++) + { + memcpy( target_data, source_data, 3 ); + source_data += 3; + target_data -= 3; + } + } + } + else + { + for (long i = 0; i < height; i++) + { + target_data = data + 3*width*(height-1-i); + memcpy( target_data, source_data, (size_t)3*width ); + source_data += 3*width; + } + } + + return image; +} + wxImage wxImage::GetSubImage( const wxRect &rect ) const { wxImage image; @@ -227,6 +359,86 @@ wxImage wxImage::GetSubImage( const wxRect &rect ) const return image; } +void wxImage::Paste( const wxImage &image, int x, int y ) +{ + wxCHECK_RET( Ok(), wxT("invalid image") ); + wxCHECK_RET( image.Ok(), wxT("invalid image") ); + + int xx = 0; + int yy = 0; + int width = image.GetWidth(); + int height = image.GetHeight(); + + if (x < 0) + { + xx = -x; + width += x; + } + if (y < 0) + { + yy = -y; + height += y; + } + + if ((x+xx)+width > M_IMGDATA->m_width) + width = M_IMGDATA->m_width - (x+xx); + if ((y+yy)+height > M_IMGDATA->m_height) + height = M_IMGDATA->m_height - (y+yy); + + if (width < 1) return; + if (height < 1) return; + + if ((!HasMask() && !image.HasMask()) || + ((HasMask() && image.HasMask() && + (GetMaskRed()==image.GetMaskRed()) && + (GetMaskGreen()==image.GetMaskGreen()) && + (GetMaskBlue()==image.GetMaskBlue())))) + { + width *= 3; + unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth(); + int source_step = image.GetWidth()*3; + + unsigned char* target_data = GetData() + (x+xx)*3 + (y+yy)*3*M_IMGDATA->m_width; + int target_step = M_IMGDATA->m_width*3; + for (int j = 0; j < height; j++) + { + memcpy( target_data, source_data, width ); + source_data += source_step; + target_data += target_step; + } + return; + } + + if (!HasMask() && image.HasMask()) + { + unsigned char r = image.GetMaskRed(); + unsigned char g = image.GetMaskGreen(); + unsigned char b = image.GetMaskBlue(); + + width *= 3; + unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth(); + int source_step = image.GetWidth()*3; + + unsigned char* target_data = GetData() + (x+xx)*3 + (y+yy)*3*M_IMGDATA->m_width; + int target_step = M_IMGDATA->m_width*3; + + for (int j = 0; j < height; j++) + { + for (int i = 0; i < width; i+=3) + { + if ((source_data[i] != r) && + (source_data[i+1] != g) && + (source_data[i+2] != b)) + { + memcpy( target_data+i, source_data+i, 3 ); + } + } + source_data += source_step; + target_data += target_step; + } + } +} + void wxImage::Replace( unsigned char r1, unsigned char g1, unsigned char b1, unsigned char r2, unsigned char g2, unsigned char b2 ) { @@ -266,7 +478,7 @@ void wxImage::SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned c M_IMGDATA->m_data[ pos+2 ] = b; } -unsigned char wxImage::GetRed( int x, int y ) +unsigned char wxImage::GetRed( int x, int y ) const { wxCHECK_MSG( Ok(), 0, wxT("invalid image") ); @@ -280,7 +492,7 @@ unsigned char wxImage::GetRed( int x, int y ) return M_IMGDATA->m_data[pos]; } -unsigned char wxImage::GetGreen( int x, int y ) +unsigned char wxImage::GetGreen( int x, int y ) const { wxCHECK_MSG( Ok(), 0, wxT("invalid image") ); @@ -294,7 +506,7 @@ unsigned char wxImage::GetGreen( int x, int y ) return M_IMGDATA->m_data[pos+1]; } -unsigned char wxImage::GetBlue( int x, int y ) +unsigned char wxImage::GetBlue( int x, int y ) const { wxCHECK_MSG( Ok(), 0, wxT("invalid image") ); @@ -340,6 +552,34 @@ void wxImage::SetData( char unsigned *data ) m_refData = newRefData; } +void wxImage::SetData( char unsigned *data, int new_width, int new_height ) +{ + wxImageRefData *newRefData = new wxImageRefData(); + + if (m_refData) + { + newRefData->m_width = new_width; + newRefData->m_height = new_height; + newRefData->m_data = data; + newRefData->m_ok = TRUE; + newRefData->m_maskRed = M_IMGDATA->m_maskRed; + newRefData->m_maskGreen = M_IMGDATA->m_maskGreen; + newRefData->m_maskBlue = M_IMGDATA->m_maskBlue; + newRefData->m_hasMask = M_IMGDATA->m_hasMask; + } + else + { + newRefData->m_width = new_width; + newRefData->m_height = new_height; + newRefData->m_data = data; + newRefData->m_ok = TRUE; + } + + UnRef(); + + m_refData = newRefData; +} + void wxImage::SetMaskColour( unsigned char r, unsigned char g, unsigned char b ) { wxCHECK_RET( Ok(), wxT("invalid image") ); @@ -449,9 +689,9 @@ bool wxImage::SaveFile( const wxString& filename, int type ) wxBufferedOutputStream bstream( stream ); return SaveFile(bstream, type); } - else #endif // wxUSE_STREAMS - return FALSE; + + return FALSE; } bool wxImage::SaveFile( const wxString& filename, const wxString& mimetype ) @@ -464,9 +704,9 @@ bool wxImage::SaveFile( const wxString& filename, const wxString& mimetype ) wxBufferedOutputStream bstream( stream ); return SaveFile(bstream, mimetype); } - else #endif // wxUSE_STREAMS - return FALSE; + + return FALSE; } bool wxImage::CanRead( const wxString &name ) diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index 3078d70528..a89ea7ebb8 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -29,6 +29,9 @@ #include "wx/app.h" extern "C" { +#ifdef __WATCOMC__ + #define HAVE_BOOLEAN +#endif #include "jpeglib.h" } #include "wx/filefn.h" @@ -114,7 +117,7 @@ METHODDEF(void) my_term_source ( j_decompress_ptr cinfo ) my_src_ptr src = (my_src_ptr) cinfo->src; if (src->pub.bytes_in_buffer > 0) - src->stream->SeekI(-src->pub.bytes_in_buffer, wxFromCurrent); + src->stream->SeekI(-(long)src->pub.bytes_in_buffer, wxFromCurrent); delete[] src->buffer; } @@ -170,7 +173,11 @@ my_error_exit (j_common_ptr cinfo) longjmp(myerr->setjmp_buffer, 1); } - +// temporarily disable the warning C4611 (interaction between '_setjmp' and +// C++ object destruction is non-portable) - I don't see any dtors here +#ifdef __VISUALC__ + #pragma warning(disable:4611) +#endif /* VC++ */ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) ) { @@ -193,6 +200,7 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos */ if (verbose) wxLogError(_("JPEG: Couldn't load - file is probably corrupted.")); + (cinfo.src->term_source)(&cinfo); jpeg_destroy_decompress(&cinfo); if (image->Ok()) image->Destroy(); return FALSE; @@ -226,10 +234,6 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos return TRUE; } - - - - typedef struct { struct jpeg_destination_mgr pub; @@ -336,6 +340,9 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo return TRUE; } +#ifdef __VISUALC__ + #pragma warning(default:4611) +#endif /* VC++ */ bool wxJPEGHandler::DoCanRead( wxInputStream& stream ) { diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index f869ffedee..8272a0d383 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -93,6 +93,12 @@ LINKAGEMODE png_silent_warning(png_structp WXUNUSED(png_ptr), png_const_charp WX { } +// temporarily disable the warning C4611 (interaction between '_setjmp' and +// C++ object destruction is non-portable) - I don't see any dtors here +#ifdef __VISUALC__ + #pragma warning(disable:4611) +#endif /* VC++ */ + bool wxPNGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) ) { // VZ: as this function uses setjmp() the only fool proof error handling @@ -267,7 +273,6 @@ bool wxPNGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose return FALSE; } - bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose ) { { @@ -346,6 +351,10 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos return TRUE; } +#ifdef __VISUALC__ + #pragma warning(default:4611) +#endif /* VC++ */ + bool wxPNGHandler::DoCanRead( wxInputStream& stream ) { unsigned char hdr[4]; diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index 2bbfa1071a..ec1a1bc534 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -43,6 +43,14 @@ extern "C" IMPLEMENT_DYNAMIC_CLASS(wxTIFFHandler,wxImageHandler) +static tsize_t +_tiffNullProc(thandle_t WXUNUSED(handle), + tdata_t WXUNUSED(buf), + tsize_t WXUNUSED(size)) +{ + return (tsize_t) -1; +} + static tsize_t _tiffReadProc(thandle_t handle, tdata_t buf, tsize_t size) { @@ -60,7 +68,7 @@ _tiffWriteProc(thandle_t handle, tdata_t buf, tsize_t size) } static toff_t -_tiffSeekProc(thandle_t handle, toff_t off, int whence) +_tiffSeekIProc(thandle_t handle, toff_t off, int whence) { wxInputStream *stream = (wxInputStream*) handle; wxSeekMode mode; @@ -75,6 +83,22 @@ _tiffSeekProc(thandle_t handle, toff_t off, int whence) return (toff_t)stream->SeekI( (off_t)off, mode ); } +static toff_t +_tiffSeekOProc(thandle_t handle, toff_t off, int whence) +{ + wxOutputStream *stream = (wxOutputStream*) handle; + wxSeekMode mode; + switch (whence) + { + case SEEK_SET: mode = wxFromStart; break; + case SEEK_CUR: mode = wxFromCurrent; break; + case SEEK_END: mode = wxFromEnd; break; + default: mode = wxFromCurrent; break; + } + + return (toff_t)stream->SeekO( (off_t)off, mode ); +} + static int _tiffCloseProc(thandle_t WXUNUSED(handle)) { @@ -84,7 +108,7 @@ _tiffCloseProc(thandle_t WXUNUSED(handle)) static toff_t _tiffSizeProc(thandle_t handle) { - wxInputStream *stream = (wxInputStream*) handle; + wxStreamBase *stream = (wxStreamBase*) handle; return (toff_t) stream->GetSize(); } @@ -108,13 +132,24 @@ TIFFwxOpen(wxInputStream &stream, const char* name, const char* mode) { TIFF* tif = TIFFClientOpen(name, mode, (thandle_t) &stream, - _tiffReadProc, _tiffWriteProc, - _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, + _tiffReadProc, _tiffNullProc, + _tiffSeekIProc, _tiffCloseProc, _tiffSizeProc, _tiffMapProc, _tiffUnmapProc); return tif; } +TIFF* +TIFFwxOpen(wxOutputStream &stream, const char* name, const char* mode) +{ + TIFF* tif = TIFFClientOpen(name, mode, + (thandle_t) &stream, + _tiffNullProc, _tiffWriteProc, + _tiffSeekOProc, _tiffCloseProc, _tiffSizeProc, + _tiffMapProc, _tiffUnmapProc); + + return tif; +} bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index ) { @@ -155,6 +190,8 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos { if (verbose) wxLogError( _("TIFF: Couldn't allocate memory.") ); + + TIFFClose( tif ); return FALSE; } @@ -166,6 +203,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos wxLogError( _("TIFF: Couldn't allocate memory.") ); _TIFFfree( raster ); + TIFFClose( tif ); return FALSE; } @@ -177,6 +215,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos _TIFFfree( raster ); image->Destroy(); + TIFFClose( tif ); return FALSE; } @@ -242,9 +281,77 @@ int wxTIFFHandler::GetImageCount( wxInputStream& stream ) return dircount; } -bool wxTIFFHandler::SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose) ) +bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose ) { - return FALSE; + TIFF *tif = TIFFwxOpen( stream, "image", "w" ); + + if (!tif) + { + if (verbose) + wxLogError( _("TIFF: Error saving image.") ); + + return FALSE; + } + + TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32)image->GetWidth()); + TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32)image->GetHeight()); + TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); + TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3); + TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); + TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); + TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_LZW); + + tsize_t linebytes = (tsize_t)image->GetWidth() * 3; + unsigned char *buf; + + if (TIFFScanlineSize(tif) > linebytes) + { + buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif)); + if (!buf) + { + if (verbose) + wxLogError( _("TIFF: Couldn't allocate memory.") ); + + TIFFClose( tif ); + + return FALSE; + } + } + else + { + buf = NULL; + } + + TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, + TIFFDefaultStripSize(tif, (uint32) -1)); + + unsigned char *ptr = image->GetData(); + for (int row = 0; row < image->GetHeight(); row++) + { + if (buf) + memcpy(buf, ptr, image->GetWidth()); + + if (TIFFWriteScanline(tif, buf ? buf : ptr, (uint32)row, 0) < 0) + { + if (verbose) + wxLogError( _("TIFF: Error writing image.") ); + + TIFFClose( tif ); + if (buf) + _TIFFfree(buf); + + return FALSE; + } + ptr += image->GetWidth()*3; + } + + (void) TIFFClose(tif); + + if (buf) + _TIFFfree(buf); + + return TRUE; } bool wxTIFFHandler::DoCanRead( wxInputStream& stream ) @@ -263,7 +370,3 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream ) // wxUSE_LIBTIFF - - - - diff --git a/src/common/init.cpp b/src/common/init.cpp index 70c9dafcdb..390dced3de 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -35,7 +35,7 @@ // global vars // ---------------------------------------------------------------------------- -wxApp * WXDLLEXPORT wxTheApp = NULL; +WXDLLEXPORT wxApp *wxTheApp = NULL; wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction)NULL; diff --git a/src/common/intl.cpp b/src/common/intl.cpp index b32d28e5d5..2791914799 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -103,17 +103,33 @@ const size_t32 MSGCATALOG_MAGIC_SW = 0xde120495; // global functions // ---------------------------------------------------------------------------- -// suppress further error messages about missing translations -// (if you don't have one catalog file, you wouldn't like to see the -// error message for each string in it, so normally it's given only -// once) -void wxSuppressTransErrors(); +#ifdef __WXDEBUG__ -// restore the logging -void wxRestoreTransErrors(); +// small class to suppress the translation erros until exit from current scope +class NoTransErr +{ +public: + NoTransErr() { ms_suppressCount++; } + ~NoTransErr() { ms_suppressCount--; } -// get the current state -bool wxIsLoggingTransErrors(); + static bool Suppress() { return ms_suppressCount > 0; } + +private: + static size_t ms_suppressCount; +}; + +size_t NoTransErr::ms_suppressCount = 0; + +#else // !Debug + +class NoTransErr +{ +public: + NoTransErr() { } + ~NoTransErr() { } +}; + +#endif // Debug/!Debug static wxLocale *wxSetLocale(wxLocale *pLocale); @@ -184,7 +200,7 @@ private: // utility functions // calculate the hash value of given string - static inline size_t32 GetHash(const char *sz); + static size_t32 GetHash(const char *sz); // big<->little endian inline size_t32 Swap(size_t32 ui) const; @@ -253,14 +269,6 @@ wxMsgCatalog::~wxMsgCatalog() wxDELETEA(m_pszName); } -// small class to suppress the translation erros until exit from current scope -class NoTransErr -{ -public: - NoTransErr() { wxSuppressTransErrors(); } - ~NoTransErr() { wxRestoreTransErrors(); } -}; - // return all directories to search for given prefix static wxString GetAllMsgCatalogSubdirs(const wxChar *prefix, const wxChar *lang) @@ -292,19 +300,21 @@ static wxString GetFullSearchPath(const wxChar *lang) // LC_PATH is a standard env var containing the search path for the .mo // files - const wxChar *pszLcPath = wxGetenv("LC_PATH"); + const wxChar *pszLcPath = wxGetenv(wxT("LC_PATH")); if ( pszLcPath != NULL ) searchPath << GetAllMsgCatalogSubdirs(pszLcPath, lang); // then take the current directory // FIXME it should be the directory of the executable - searchPath << GetAllMsgCatalogSubdirs(wxT("."), lang) << wxPATH_SEP; + searchPath << GetAllMsgCatalogSubdirs(wxT("."), lang); +#ifdef __UNIX_LIKE__ // and finally add some standard ones searchPath << GetAllMsgCatalogSubdirs(wxT("/usr/share/locale"), lang) << GetAllMsgCatalogSubdirs(wxT("/usr/lib/locale"), lang) << GetAllMsgCatalogSubdirs(wxT("/usr/local/share/locale"), lang); +#endif // __UNIX_LIKE__ return searchPath; } @@ -321,6 +331,21 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName0, bool b szName = szName.Left(szName.Find(wxT('.'))); wxString searchPath = GetFullSearchPath(szDirPrefix); + +#ifdef __UNIX_LIKE__ + if ( szName == "wxstd" ) + { + // WXDIR is the env var holding the installation directory of wxWindows + const wxChar *pszWxDir = wxGetenv(wxT("WXDIR")); + if ( pszWxDir ) + { + wxString strWxLoc; + strWxLoc << pszWxDir << wxFILE_SEP_PATH << wxT("share/locale"); + searchPath << GetAllMsgCatalogSubdirs(strWxLoc, szDirPrefix); + } + } +#endif // __UNIX_LIKE__ + const wxChar *sublocale = wxStrchr(szDirPrefix, wxT('_')); if ( sublocale ) { @@ -422,19 +447,17 @@ const char *wxMsgCatalog::GetString(const char *szOrig) const size_t32 nIncr = 1 + (nHashVal % (m_nHashSize - 2)); -#if defined(__VISAGECPP__) -// VA just can't stand while(1) or while(TRUE) - bool bOs2var = TRUE; - while(bOs2var) { -#else - while (1) { -#endif + for ( ;; ) { size_t32 nStr = Swap(m_pHashTable[nIndex]); if ( nStr == 0 ) return NULL; - if ( strcmp(szOrig, StringAtOfs(m_pOrigTable, nStr - 1)) == 0 ) - return StringAtOfs(m_pTransTable, nStr - 1); + if ( strcmp(szOrig, StringAtOfs(m_pOrigTable, nStr - 1)) == 0 ) { + // work around for BC++ 5.5 bug: without a temp var, the optimizer + // breaks the code and the return value is incorrect + const char *tmp = StringAtOfs(m_pTransTable, nStr - 1); + return tmp; + } if ( nIndex >= m_nHashSize - nIncr) nIndex -= m_nHashSize - nIncr; @@ -453,8 +476,11 @@ const char *wxMsgCatalog::GetString(const char *szOrig) const top = current; else if ( res > 0 ) bottom = current + 1; - else // found! - return StringAtOfs(m_pTransTable, current); + else { // found! + // work around the same BC++ 5.5 bug as above + const char *tmp = StringAtOfs(m_pTransTable, current); + return tmp; + } } } @@ -475,11 +501,16 @@ void wxMsgCatalog::ConvertEncoding() // first, find encoding header: const char *hdr = StringAtOfs(m_pOrigTable, 0); - if (hdr == NULL) return; // not supported by this catalog, does not have non-fuzzy header - if (hdr[0] != 0) return; // ditto + if ( hdr == NULL || hdr[0] != 0 ) { + // not supported by this catalog, does not have non-fuzzy header + return; + } - /* we support catalogs with header (msgid "") that is _not_ marked as "#, fuzzy" (otherwise - the string would not be included into compiled catalog) */ + /* + we support catalogs with header (msgid "") that is _not_ marked as "#, + fuzzy" (otherwise the string would not be included into compiled + catalog) + */ wxString header(StringAtOfs(m_pTransTable, 0)); wxString charset; int pos = header.Find(wxT("Content-Type: text/plain; charset=")); @@ -505,7 +536,7 @@ void wxMsgCatalog::ConvertEncoding() converter.Init(enc, a[0]); for (size_t i = 0; i < m_numStrings; i++) converter.Convert((char*)StringAtOfs(m_pTransTable, i)); -#endif +#endif // wxUSE_GUI } @@ -538,7 +569,11 @@ bool wxLocale::Init(const wxChar *szName, } m_pszOldLocale = wxSetlocale(LC_ALL, szLocale); if ( m_pszOldLocale == NULL ) - wxLogError(_("locale '%s' can not be set."), szLocale); + { + // this is not an error as most systems don't support anything but "C" + // anyhow + wxLogVerbose(_("locale '%s' can not be set."), szLocale); + } // the short name will be used to look for catalog files as well, // so we need something here @@ -617,37 +652,28 @@ const wxMB2WXbuf wxLocale::GetString(const wxChar *szOrigString, } if ( pszTrans == NULL ) { - if ( wxIsLoggingTransErrors() ) { - // suppress further error messages if we're not debugging: this avoids - // flooding the user with messages about each and every missing string if, - // for example, a whole catalog file is missing. - - // do it before calling LogWarning to prevent infinite recursion! #ifdef __WXDEBUG__ + if ( !NoTransErr::Suppress() ) { NoTransErr noTransErr; -#else // !debug - wxSuppressTransErrors(); -#endif // debug/!debug if ( szDomain != NULL ) { - wxLogWarning(_("string '%s' not found in domain '%s' for locale '%s'."), + wxLogDebug(_T("string '%s' not found in domain '%s' for locale '%s'."), szOrigString, szDomain, m_strLocale.c_str()); } else { - wxLogWarning(_("string '%s' not found in locale '%s'."), - szOrigString, m_strLocale.c_str()); + wxLogDebug(_T("string '%s' not found in locale '%s'."), + szOrigString, m_strLocale.c_str()); } } +#endif // __WXDEBUG__ return (wxMB2WXbuf)(szOrigString); } - else - { - return wxConvertMB2WX(pszTrans); // or preferably wxCSConv(charset).cMB2WX(pszTrans) or something, - // a macro similar to wxConvertMB2WX could be written for that - } + + return wxConvertMB2WX(pszTrans); // or preferably wxCSConv(charset).cMB2WX(pszTrans) or something, + // a macro similar to wxConvertMB2WX could be written for that #undef szOrgString } @@ -655,7 +681,7 @@ const wxMB2WXbuf wxLocale::GetString(const wxChar *szOrigString, // find catalog by name in a linked list, return NULL if !found wxMsgCatalog *wxLocale::FindCatalog(const wxChar *szDomain) const { -// linear search in the linked list + // linear search in the linked list wxMsgCatalog *pMsgCat; for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) { if ( wxStricmp(pMsgCat->GetName(), szDomain) == 0 ) @@ -696,26 +722,6 @@ bool wxLocale::AddCatalog(const wxChar *szDomain) // global functions and variables // ---------------------------------------------------------------------------- -// translation errors logging -// -------------------------- - -static bool gs_bGiveTransErrors = TRUE; - -void wxSuppressTransErrors() -{ - gs_bGiveTransErrors = FALSE; -} - -void wxRestoreTransErrors() -{ - gs_bGiveTransErrors = TRUE; -} - -bool wxIsLoggingTransErrors() -{ - return gs_bGiveTransErrors; -} - // retrieve/change current locale // ------------------------------ diff --git a/src/common/layout.cpp b/src/common/layout.cpp index 678e8bd1c1..61c81b8acc 100644 --- a/src/common/layout.cpp +++ b/src/common/layout.cpp @@ -66,11 +66,20 @@ wxIndividualLayoutConstraint::~wxIndividualLayoutConstraint() void wxIndividualLayoutConstraint::Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val, int marg) { - relationship = rel; - otherWin = otherW; - otherEdge = otherE; - value = val; - margin = marg; + relationship = rel; + otherWin = otherW; + otherEdge = otherE; + + if ( rel == wxPercentOf ) + { + percent = val; + } + else + { + value = val; + } + + margin = marg; } void wxIndividualLayoutConstraint::LeftOf(wxWindowBase *sibling, int marg) @@ -98,18 +107,13 @@ void wxIndividualLayoutConstraint::Below(wxWindowBase *sibling, int marg) // void wxIndividualLayoutConstraint::SameAs(wxWindowBase *otherW, wxEdge edge, int marg) { - Set(wxPercentOf, otherW, edge, 0, marg); - percent = 100; + Set(wxPercentOf, otherW, edge, 100, marg); } // The edge is a percentage of the other window's edge void wxIndividualLayoutConstraint::PercentOf(wxWindowBase *otherW, wxEdge wh, int per) { - otherWin = otherW; - relationship = wxPercentOf; - percent = per; - - otherEdge = wh; + Set(wxPercentOf, otherW, wh, per); } // diff --git a/src/common/list.cpp b/src/common/list.cpp index 971dca379c..0e326ee1f5 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -165,7 +165,6 @@ void wxListBase::DoCopy(const wxListBase& list) wxASSERT_MSG( !list.m_destroy, wxT("copying list which owns it's elements is a bad idea") ); - m_count = list.m_count; m_destroy = list.m_destroy; m_keyType = list.m_keyType; m_nodeFirst = @@ -204,6 +203,8 @@ void wxListBase::DoCopy(const wxListBase& list) break; } } + + wxASSERT_MSG( m_count == list.m_count, _T("logic error in wxList::DoCopy") ); } wxListBase::~wxListBase() diff --git a/src/common/log.cpp b/src/common/log.cpp index 0a44516706..0b546c2fac 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -94,6 +94,12 @@ static wxCriticalSection gs_csLogBuf; #endif // wxUSE_THREADS +// return true if we have a non NULL non disabled log target +static inline bool IsLoggingEnabled() +{ + return wxLog::IsEnabled() && (wxLog::GetActiveTarget() != NULL); +} + // ---------------------------------------------------------------------------- // implementation of Log functions // @@ -104,31 +110,31 @@ static wxCriticalSection gs_csLogBuf; // generic log function void wxLogGeneric(wxLogLevel level, const wxChar *szFormat, ...) { - if ( wxLog::GetActiveTarget() != NULL ) { - wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); + if ( IsLoggingEnabled() ) { + wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); - va_list argptr; - va_start(argptr, szFormat); - wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); - va_end(argptr); + va_list argptr; + va_start(argptr, szFormat); + wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); + va_end(argptr); - wxLog::OnLog(level, s_szBuf, time(NULL)); - } + wxLog::OnLog(level, s_szBuf, time(NULL)); + } } -#define IMPLEMENT_LOG_FUNCTION(level) \ - void wxLog##level(const wxChar *szFormat, ...) \ - { \ - if ( wxLog::GetActiveTarget() != NULL ) { \ - wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \ - \ - va_list argptr; \ - va_start(argptr, szFormat); \ - wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); \ - va_end(argptr); \ - \ - wxLog::OnLog(wxLOG_##level, s_szBuf, time(NULL)); \ - } \ +#define IMPLEMENT_LOG_FUNCTION(level) \ + void wxLog##level(const wxChar *szFormat, ...) \ + { \ + if ( IsLoggingEnabled() ) { \ + wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \ + \ + va_list argptr; \ + va_start(argptr, szFormat); \ + wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); \ + va_end(argptr); \ + \ + wxLog::OnLog(wxLOG_##level, s_szBuf, time(NULL)); \ + } \ } IMPLEMENT_LOG_FUNCTION(FatalError) @@ -141,54 +147,54 @@ IMPLEMENT_LOG_FUNCTION(Status) // same as info, but only if 'verbose' mode is on void wxLogVerbose(const wxChar *szFormat, ...) { - wxLog *pLog = wxLog::GetActiveTarget(); - if ( pLog != NULL && pLog->GetVerbose() ) { - wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); + if ( IsLoggingEnabled() ) { + wxLog *pLog = wxLog::GetActiveTarget(); + if ( pLog != NULL && pLog->GetVerbose() ) { + wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); - va_list argptr; - va_start(argptr, szFormat); - wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); - va_end(argptr); + va_list argptr; + va_start(argptr, szFormat); + wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); + va_end(argptr); - wxLog::OnLog(wxLOG_Info, s_szBuf, time(NULL)); - } + wxLog::OnLog(wxLOG_Info, s_szBuf, time(NULL)); + } + } } // debug functions #ifdef __WXDEBUG__ -#define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \ - void wxLog##level(const wxChar *szFormat, ...) \ - { \ - if ( wxLog::GetActiveTarget() != NULL ) { \ - wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \ - \ - va_list argptr; \ - va_start(argptr, szFormat); \ - wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); \ - va_end(argptr); \ - \ - wxLog::OnLog(wxLOG_##level, s_szBuf, time(NULL)); \ - } \ +#define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \ + void wxLog##level(const wxChar *szFormat, ...) \ + { \ + if ( IsLoggingEnabled() ) { \ + wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \ + \ + va_list argptr; \ + va_start(argptr, szFormat); \ + wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); \ + va_end(argptr); \ + \ + wxLog::OnLog(wxLOG_##level, s_szBuf, time(NULL)); \ + } \ } void wxLogTrace(const wxChar *mask, const wxChar *szFormat, ...) { - wxLog *pLog = wxLog::GetActiveTarget(); - - if ( pLog != NULL && wxLog::IsAllowedTraceMask(mask) ) { + if ( IsLoggingEnabled() && wxLog::IsAllowedTraceMask(mask) ) { wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); wxChar *p = s_szBuf; size_t len = WXSIZEOF(s_szBuf); - strncpy(s_szBuf, _T("("), len); + wxStrncpy(s_szBuf, _T("("), len); len -= 1; // strlen("(") p += 1; - strncat(p, mask, len); + wxStrncat(p, mask, len); size_t lenMask = wxStrlen(mask); len -= lenMask; p += lenMask; - strncat(p, _T(") "), len); + wxStrncat(p, _T(") "), len); len -= 2; p += 2; @@ -203,12 +209,10 @@ void wxLogVerbose(const wxChar *szFormat, ...) void wxLogTrace(wxTraceMask mask, const wxChar *szFormat, ...) { - wxLog *pLog = wxLog::GetActiveTarget(); - // we check that all of mask bits are set in the current mask, so // that wxLogTrace(wxTraceRefCount | wxTraceOle) will only do something // if both bits are set. - if ( pLog != NULL && ((pLog->GetTraceMask() & mask) == mask) ) { + if ( IsLoggingEnabled() && ((wxLog::GetTraceMask() & mask) == mask) ) { wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); va_list argptr; @@ -243,26 +247,30 @@ void wxLogSysErrorHelper(long lErrCode) void WXDLLEXPORT wxLogSysError(const wxChar *szFormat, ...) { - wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); + if ( IsLoggingEnabled() ) { + wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); - va_list argptr; - va_start(argptr, szFormat); - wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); - va_end(argptr); + va_list argptr; + va_start(argptr, szFormat); + wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); + va_end(argptr); - wxLogSysErrorHelper(wxSysErrorCode()); + wxLogSysErrorHelper(wxSysErrorCode()); + } } void WXDLLEXPORT wxLogSysError(long lErrCode, const wxChar *szFormat, ...) { - wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); + if ( IsLoggingEnabled() ) { + wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); - va_list argptr; - va_start(argptr, szFormat); - wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); - va_end(argptr); + va_list argptr; + va_start(argptr, szFormat); + wxVsnprintf(s_szBuf, WXSIZEOF(s_szBuf), szFormat, argptr); + va_end(argptr); - wxLogSysErrorHelper(lErrCode); + wxLogSysErrorHelper(lErrCode); + } } // ---------------------------------------------------------------------------- @@ -415,7 +423,8 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) // under Windows, programs usually don't have stderr at all, so show the // messages also under debugger - unless it's a console program #if defined(__WXMSW__) && wxUSE_GUI - OutputDebugString(str + wxT("\r\n")); + str += wxT("\r\n") ; + OutputDebugString(str.c_str()); #endif // MSW #if defined(__WXMAC__) && wxUSE_GUI debugstr(str + wxT("\r\n")); @@ -638,12 +647,10 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg) #if wxUSE_GUI || defined(__WXMSW__) // this message is intentionally not translated - it is for // developpers only - wxStrcat(szBuf, wxT("\nDo you want to stop the program?" - "\nYou can also choose [Cancel] to suppress " - "further warnings.")); + wxStrcat(szBuf, wxT("\nDo you want to stop the program?\nYou can also choose [Cancel] to suppress further warnings.")); #if wxUSE_GUI - switch ( wxMessageBox(szBuf, "Debug", + switch ( wxMessageBox(szBuf, wxT("Debug"), wxYES_NO | wxCANCEL | wxICON_STOP ) ) { case wxYES: Trap(); @@ -656,7 +663,7 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg) //case wxNO: nothing to do } #else // !GUI, but MSW - switch ( ::MessageBox(NULL, szBuf, "Debug", + switch ( ::MessageBox(NULL, szBuf, _T("Debug"), MB_YESNOCANCEL | MB_ICONSTOP ) ) { case IDYES: Trap(); diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 9730edb82d..902a88a2f2 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -519,7 +519,7 @@ void wxDebugContext::SetStream(ostream *str, streambuf *buf) bool wxDebugContext::SetFile(const wxString& file) { - ofstream *str = new ofstream(file.fn_str()); + ofstream *str = new ofstream(file.mb_str()); if (str->bad()) { @@ -1026,7 +1026,7 @@ void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */) wxDebugFree(pData, FALSE); } // New operator 21/11/1998 -void operator delete[](void* pData, char* /* fileName */, int /* lineNum */) +void operator delete[](void* pData, wxChar* /* fileName */, int /* lineNum */) { wxDebugFree(pData, TRUE); } @@ -1146,7 +1146,10 @@ void wxDebugFree(void * buf, bool WXUNUSED(isVect) ) // Trace: send output to the current debugging stream void wxTrace(const wxChar *fmt ...) { - va_list ap; +#if 1 + wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead.")); +#else + va_list ap; static wxChar buffer[512]; va_start(ap, fmt); @@ -1174,11 +1177,15 @@ void wxTrace(const wxChar *fmt ...) #else fprintf(stderr, buffer); #endif +#endif } // Trace with level void wxTraceLevel(int level, const wxChar *fmt ...) { +#if 1 + wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead.")); +#else if (wxDebugContext::GetLevel() < level) return; @@ -1188,7 +1195,7 @@ void wxTraceLevel(int level, const wxChar *fmt ...) va_start(ap, fmt); #ifdef __WXMSW__ - wvsprintf(buffer,fmt,ap) ; + wxWvsprintf(buffer,fmt,ap) ; #else vsprintf(buffer,fmt,ap) ; #endif @@ -1210,6 +1217,7 @@ void wxTraceLevel(int level, const wxChar *fmt ...) #else fprintf(stderr, buffer); #endif +#endif } #else // wxUSE_MEMORY_TRACING && defined(__WXDEBUG__) diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index fd1cc38a1e..30b873a131 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -266,7 +266,10 @@ int wxMenuBase::FindItem(const wxString& text) const if ( rc != wxNOT_FOUND ) return rc; } - else if ( !item->IsSeparator() ) + + // we execute this code for submenus as well to alllow finding them by + // name just like the ordinary items + if ( !item->IsSeparator() ) { if ( item->GetLabel() == label ) return item->GetId(); @@ -346,10 +349,10 @@ void wxMenuBase::UpdateUI(wxEvtHandler* source) { if ( !source && GetInvokingWindow() ) source = GetInvokingWindow()->GetEventHandler(); + + wxEvtHandler *self = GetEventHandler(); if ( !source ) - source = GetEventHandler(); - if ( !source ) - source = this; + source = self; wxMenuItemList::Node* node = GetMenuItems().GetFirst(); while ( node ) @@ -361,7 +364,16 @@ void wxMenuBase::UpdateUI(wxEvtHandler* source) wxUpdateUIEvent event(id); event.SetEventObject( source ); - if ( source->ProcessEvent(event) ) + // let the invoking window process the event and fall back to the + // menu itself if it didn't + bool processed = source->ProcessEvent(event); + if ( !processed && source != self ) + { + event.SetEventObject( self ); + processed = self->ProcessEvent(event); + } + + if ( processed ) { // if anything changed, update the chanegd attribute if (event.GetSetText()) diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp index 25a0eedb28..7a773543f0 100644 --- a/src/common/mimecmn.cpp +++ b/src/common/mimecmn.cpp @@ -158,8 +158,7 @@ wxString wxFileType::ExpandCommand(const wxString& command, const wxChar *pEnd = wxStrchr(pc, wxT('}')); if ( pEnd == NULL ) { wxString mimetype; - wxLogWarning(_("Unmatched '{' in an entry for " - "mime type %s."), + wxLogWarning(_("Unmatched '{' in an entry for mime type %s."), params.GetMimeType().c_str()); str << wxT("%{"); } @@ -190,8 +189,16 @@ wxString wxFileType::ExpandCommand(const wxString& command, } // metamail(1) man page states that if the mailcap entry doesn't have '%s' - // the program will accept the data on stdin: so give it to it! - if ( !hasFilename && !str.IsEmpty() ) { + // the program will accept the data on stdin so normally we should append + // "< %s" to the end of the command in such case, but not all commands + // behave like this, in particular a common test is 'test -n "$DISPLAY"' + // and appending "< %s" to this command makes the test fail... I don't + // know of the correct solution, try to guess what we have to do. + if ( !hasFilename && !str.IsEmpty() +#ifdef __UNIX__ + && !str.StartsWith(_T("test ")) +#endif // Unix + ) { str << wxT(" < '") << params.GetFileName() << wxT('\''); } diff --git a/src/common/object.cpp b/src/common/object.cpp index ab59919f01..b81454d2ab 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -48,6 +48,11 @@ wxClassInfo wxObject::sm_classwxObject((wxChar *) wxT("wxObject"), (wxChar *) NU wxClassInfo* wxClassInfo::sm_first = (wxClassInfo *) NULL; wxHashTable* wxClassInfo::sm_classTable = (wxHashTable*) NULL; +// These are here so we can avoid 'always true/false' warnings +// by referring to these instead of TRUE/FALSE +const bool wxTrue = TRUE; +const bool wxFalse = FALSE; + /* * wxWindows root object. */ @@ -129,7 +134,7 @@ void wxObject::operator delete (void * buf) // VC++ 6.0 #if defined(__VISUALC__) && (__VISUALC__ >= 1200) -void wxObject::operator delete(void* pData, char* /* fileName */, int /* lineNum */) +void wxObject::operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */) { ::operator delete(pData); } @@ -197,16 +202,6 @@ bool wxClassInfo::IsKindOf(wxClassInfo *info) const if (info == NULL) return FALSE; - // For some reason, when making/using a DLL, static data has to be included - // in both the DLL and the application. This can lead to duplicate - // wxClassInfo objects, so we have to test the name instead of the pointers. - // PROBABLY NO LONGER TRUE now I've done DLL creation right. - /* -#if WXMAKINGDLL -if (GetClassName() && info->GetClassName() && (wxStrcmp(GetClassName(), info->GetClassName()) == 0)) -return TRUE; -#else - */ if (this == info) return TRUE; @@ -243,9 +238,7 @@ void wxClassInfo::InitializeClasses() if (info->m_className) { wxASSERT_MSG( ++nClass < nMaxClasses, - _T("an infinite loop detected - have you used " - "IMPLEMENT_DYNAMIC_CLASS() twice (may be by " - "linking some object module(s) twice)?") ); + _T("an infinite loop detected - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)?") ); sm_classTable->Put(info->m_className, (wxObject *)info); } @@ -391,8 +384,3 @@ wxObjectRefData::wxObjectRefData(void) : m_count(1) wxObjectRefData::~wxObjectRefData() { } - -// These are here so we can avoid 'always true/false' warnings -// by referring to these instead of TRUE/FALSE -const bool wxTrue = TRUE; -const bool wxFalse = FALSE; diff --git a/src/common/paper.cpp b/src/common/paper.cpp index 653309aafa..d8775f2c62 100644 --- a/src/common/paper.cpp +++ b/src/common/paper.cpp @@ -93,53 +93,53 @@ wxPrintPaperDatabase::wxPrintPaperDatabase():wxList(wxKEY_STRING) void wxPrintPaperDatabase::CreateDatabase() { /* - AddPaperType(_("A4 210 x 297 mm"), 210, 297); - AddPaperType(_("A3 297 x 420 mm"), 297, 420); - AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279); - AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356); + AddPaperType(wxTRANSLATE("A4 210 x 297 mm"), 210, 297); + AddPaperType(wxTRANSLATE("A3 297 x 420 mm"), 297, 420); + AddPaperType(wxTRANSLATE("Letter 8 1/2 x 11 in"), 216, 279); + AddPaperType(wxTRANSLATE("Legal 8 1/2 x 14 in"), 216, 356); */ - WXADDPAPER(wxPAPER_LETTER, DMPAPER_LETTER, "Letter, 8 1/2 x 11 in", 2159, 2794); - WXADDPAPER(wxPAPER_LEGAL, DMPAPER_LEGAL, "Legal, 8 1/2 x 14 in", 2159, 3556); - WXADDPAPER(wxPAPER_A4, DMPAPER_A4, "A4 sheet, 210 x 297 mm", 2100, 2970); - WXADDPAPER(wxPAPER_CSHEET, DMPAPER_CSHEET, "C sheet, 17 x 22 in", 4318, 5588); - WXADDPAPER(wxPAPER_DSHEET, DMPAPER_DSHEET, "D sheet, 22 x 34 in", 5588, 8636); - WXADDPAPER(wxPAPER_ESHEET, DMPAPER_ESHEET, "E sheet, 34 x 44 in", 8636, 11176); - WXADDPAPER(wxPAPER_LETTERSMALL, DMPAPER_LETTERSMALL, "Letter Small, 8 1/2 x 11 in", 2159, 2794); - WXADDPAPER(wxPAPER_TABLOID, DMPAPER_TABLOID, "Tabloid, 11 x 17 in", 2794, 4318); - WXADDPAPER(wxPAPER_LEDGER, DMPAPER_LEDGER, "Ledger, 17 x 11 in", 4318, 2794); - WXADDPAPER(wxPAPER_STATEMENT, DMPAPER_STATEMENT, "Statement, 5 1/2 x 8 1/2 in", 1397, 2159); - WXADDPAPER(wxPAPER_EXECUTIVE, DMPAPER_EXECUTIVE, "Executive, 7 1/4 x 10 1/2 in", 1842, 2667); - WXADDPAPER(wxPAPER_A3, DMPAPER_A3, "A3 sheet, 297 x 420 mm", 2970, 4200); - WXADDPAPER(wxPAPER_A4SMALL, DMPAPER_A4SMALL, "A4 small sheet, 210 x 297 mm", 2100, 2970); - WXADDPAPER(wxPAPER_A5, DMPAPER_A5, "A5 sheet, 148 x 210 mm", 1480, 2100); - WXADDPAPER(wxPAPER_B4, DMPAPER_B4, "B4 sheet, 250 x 354 mm", 2500, 3540); - WXADDPAPER(wxPAPER_B5, DMPAPER_B5, "B5 sheet, 182 x 257 millimeter", 1820, 2570); - WXADDPAPER(wxPAPER_FOLIO, DMPAPER_FOLIO, "Folio, 8 1/2 x 13 in", 2159, 3302); - WXADDPAPER(wxPAPER_QUARTO, DMPAPER_QUARTO, "Quarto, 215 x 275 mm", 2150, 2750); - WXADDPAPER(wxPAPER_10X14, DMPAPER_10X14, "10 x 14 in", 2540, 3556); - WXADDPAPER(wxPAPER_11X17, DMPAPER_11X17, "11 x 17 in", 2794, 4318); - WXADDPAPER(wxPAPER_NOTE, DMPAPER_NOTE, "Note, 8 1/2 x 11 in", 2159, 2794); - WXADDPAPER(wxPAPER_ENV_9, DMPAPER_ENV_9, "#9 Envelope, 3 7/8 x 8 7/8 in", 984, 2254); - WXADDPAPER(wxPAPER_ENV_10, DMPAPER_ENV_10, "#10 Envelope, 4 1/8 x 9 1/2 in", 1048, 2413); - WXADDPAPER(wxPAPER_ENV_11, DMPAPER_ENV_11, "#11 Envelope, 4 1/2 x 10 3/8 in", 1143, 2635); - WXADDPAPER(wxPAPER_ENV_12, DMPAPER_ENV_12, "#12 Envelope, 4 3/4 x 11 in", 1206, 2794); - WXADDPAPER(wxPAPER_ENV_14, DMPAPER_ENV_14, "#14 Envelope, 5 x 11 1/2 in", 1270, 2921); - WXADDPAPER(wxPAPER_ENV_DL, DMPAPER_ENV_DL, "DL Envelope, 110 x 220 mm", 1100, 2200); - WXADDPAPER(wxPAPER_ENV_C5, DMPAPER_ENV_C5, "C5 Envelope, 162 x 229 mm", 1620, 2290); - WXADDPAPER(wxPAPER_ENV_C3, DMPAPER_ENV_C3, "C3 Envelope, 324 x 458 mm", 3240, 4580); - WXADDPAPER(wxPAPER_ENV_C4, DMPAPER_ENV_C4, "C4 Envelope, 229 x 324 mm", 2290, 3240); - WXADDPAPER(wxPAPER_ENV_C6, DMPAPER_ENV_C6, "C6 Envelope, 114 x 162 mm", 1140, 1620); - WXADDPAPER(wxPAPER_ENV_C65, DMPAPER_ENV_C65, "C65 Envelope, 114 x 229 mm", 1140, 2290); - WXADDPAPER(wxPAPER_ENV_B4, DMPAPER_ENV_B4, "B4 Envelope, 250 x 353 mm", 2500, 3530); - WXADDPAPER(wxPAPER_ENV_B5, DMPAPER_ENV_B5, "B5 Envelope, 176 x 250 mm", 1760, 2500); - WXADDPAPER(wxPAPER_ENV_B6, DMPAPER_ENV_B6, "B6 Envelope, 176 x 125 mm", 1760, 1250); - WXADDPAPER(wxPAPER_ENV_ITALY, DMPAPER_ENV_ITALY, "Italy Envelope, 110 x 230 mm", 1100, 2300); - WXADDPAPER(wxPAPER_ENV_MONARCH, DMPAPER_ENV_MONARCH, "Monarch Envelope, 3 7/8 x 7 1/2 in", 984, 1905); - WXADDPAPER(wxPAPER_ENV_PERSONAL, DMPAPER_ENV_PERSONAL, "6 3/4 Envelope, 3 5/8 x 6 1/2 in", 921, 1651); - WXADDPAPER(wxPAPER_FANFOLD_US, DMPAPER_FANFOLD_US, "US Std Fanfold, 14 7/8 x 11 in", 3778, 2794); - WXADDPAPER(wxPAPER_FANFOLD_STD_GERMAN, DMPAPER_FANFOLD_STD_GERMAN, "German Std Fanfold, 8 1/2 x 12 in", 2159, 3048); - WXADDPAPER(wxPAPER_FANFOLD_LGL_GERMAN, DMPAPER_FANFOLD_LGL_GERMAN, "German Legal Fanfold, 8 1/2 x 13 in", 2159, 3302); + WXADDPAPER(wxPAPER_LETTER, DMPAPER_LETTER, wxTRANSLATE("Letter, 8 1/2 x 11 in"), 2159, 2794); + WXADDPAPER(wxPAPER_LEGAL, DMPAPER_LEGAL, wxTRANSLATE("Legal, 8 1/2 x 14 in"), 2159, 3556); + WXADDPAPER(wxPAPER_A4, DMPAPER_A4, wxTRANSLATE("A4 sheet, 210 x 297 mm"), 2100, 2970); + WXADDPAPER(wxPAPER_CSHEET, DMPAPER_CSHEET, wxTRANSLATE("C sheet, 17 x 22 in"), 4318, 5588); + WXADDPAPER(wxPAPER_DSHEET, DMPAPER_DSHEET, wxTRANSLATE("D sheet, 22 x 34 in"), 5588, 8636); + WXADDPAPER(wxPAPER_ESHEET, DMPAPER_ESHEET, wxTRANSLATE("E sheet, 34 x 44 in"), 8636, 11176); + WXADDPAPER(wxPAPER_LETTERSMALL, DMPAPER_LETTERSMALL, wxTRANSLATE("Letter Small, 8 1/2 x 11 in"), 2159, 2794); + WXADDPAPER(wxPAPER_TABLOID, DMPAPER_TABLOID, wxTRANSLATE("Tabloid, 11 x 17 in"), 2794, 4318); + WXADDPAPER(wxPAPER_LEDGER, DMPAPER_LEDGER, wxTRANSLATE("Ledger, 17 x 11 in"), 4318, 2794); + WXADDPAPER(wxPAPER_STATEMENT, DMPAPER_STATEMENT, wxTRANSLATE("Statement, 5 1/2 x 8 1/2 in"), 1397, 2159); + WXADDPAPER(wxPAPER_EXECUTIVE, DMPAPER_EXECUTIVE, wxTRANSLATE("Executive, 7 1/4 x 10 1/2 in"), 1842, 2667); + WXADDPAPER(wxPAPER_A3, DMPAPER_A3, wxTRANSLATE("A3 sheet, 297 x 420 mm"), 2970, 4200); + WXADDPAPER(wxPAPER_A4SMALL, DMPAPER_A4SMALL, wxTRANSLATE("A4 small sheet, 210 x 297 mm"), 2100, 2970); + WXADDPAPER(wxPAPER_A5, DMPAPER_A5, wxTRANSLATE("A5 sheet, 148 x 210 mm"), 1480, 2100); + WXADDPAPER(wxPAPER_B4, DMPAPER_B4, wxTRANSLATE("B4 sheet, 250 x 354 mm"), 2500, 3540); + WXADDPAPER(wxPAPER_B5, DMPAPER_B5, wxTRANSLATE("B5 sheet, 182 x 257 millimeter"), 1820, 2570); + WXADDPAPER(wxPAPER_FOLIO, DMPAPER_FOLIO, wxTRANSLATE("Folio, 8 1/2 x 13 in"), 2159, 3302); + WXADDPAPER(wxPAPER_QUARTO, DMPAPER_QUARTO, wxTRANSLATE("Quarto, 215 x 275 mm"), 2150, 2750); + WXADDPAPER(wxPAPER_10X14, DMPAPER_10X14, wxTRANSLATE("10 x 14 in"), 2540, 3556); + WXADDPAPER(wxPAPER_11X17, DMPAPER_11X17, wxTRANSLATE("11 x 17 in"), 2794, 4318); + WXADDPAPER(wxPAPER_NOTE, DMPAPER_NOTE, wxTRANSLATE("Note, 8 1/2 x 11 in"), 2159, 2794); + WXADDPAPER(wxPAPER_ENV_9, DMPAPER_ENV_9, wxTRANSLATE("#9 Envelope, 3 7/8 x 8 7/8 in"), 984, 2254); + WXADDPAPER(wxPAPER_ENV_10, DMPAPER_ENV_10, wxTRANSLATE("#10 Envelope, 4 1/8 x 9 1/2 in"), 1048, 2413); + WXADDPAPER(wxPAPER_ENV_11, DMPAPER_ENV_11, wxTRANSLATE("#11 Envelope, 4 1/2 x 10 3/8 in"), 1143, 2635); + WXADDPAPER(wxPAPER_ENV_12, DMPAPER_ENV_12, wxTRANSLATE("#12 Envelope, 4 3/4 x 11 in"), 1206, 2794); + WXADDPAPER(wxPAPER_ENV_14, DMPAPER_ENV_14, wxTRANSLATE("#14 Envelope, 5 x 11 1/2 in"), 1270, 2921); + WXADDPAPER(wxPAPER_ENV_DL, DMPAPER_ENV_DL, wxTRANSLATE("DL Envelope, 110 x 220 mm"), 1100, 2200); + WXADDPAPER(wxPAPER_ENV_C5, DMPAPER_ENV_C5, wxTRANSLATE("C5 Envelope, 162 x 229 mm"), 1620, 2290); + WXADDPAPER(wxPAPER_ENV_C3, DMPAPER_ENV_C3, wxTRANSLATE("C3 Envelope, 324 x 458 mm"), 3240, 4580); + WXADDPAPER(wxPAPER_ENV_C4, DMPAPER_ENV_C4, wxTRANSLATE("C4 Envelope, 229 x 324 mm"), 2290, 3240); + WXADDPAPER(wxPAPER_ENV_C6, DMPAPER_ENV_C6, wxTRANSLATE("C6 Envelope, 114 x 162 mm"), 1140, 1620); + WXADDPAPER(wxPAPER_ENV_C65, DMPAPER_ENV_C65, wxTRANSLATE("C65 Envelope, 114 x 229 mm"), 1140, 2290); + WXADDPAPER(wxPAPER_ENV_B4, DMPAPER_ENV_B4, wxTRANSLATE("B4 Envelope, 250 x 353 mm"), 2500, 3530); + WXADDPAPER(wxPAPER_ENV_B5, DMPAPER_ENV_B5, wxTRANSLATE("B5 Envelope, 176 x 250 mm"), 1760, 2500); + WXADDPAPER(wxPAPER_ENV_B6, DMPAPER_ENV_B6, wxTRANSLATE("B6 Envelope, 176 x 125 mm"), 1760, 1250); + WXADDPAPER(wxPAPER_ENV_ITALY, DMPAPER_ENV_ITALY, wxTRANSLATE("Italy Envelope, 110 x 230 mm"), 1100, 2300); + WXADDPAPER(wxPAPER_ENV_MONARCH, DMPAPER_ENV_MONARCH, wxTRANSLATE("Monarch Envelope, 3 7/8 x 7 1/2 in"), 984, 1905); + WXADDPAPER(wxPAPER_ENV_PERSONAL, DMPAPER_ENV_PERSONAL, wxTRANSLATE("6 3/4 Envelope, 3 5/8 x 6 1/2 in"), 921, 1651); + WXADDPAPER(wxPAPER_FANFOLD_US, DMPAPER_FANFOLD_US, wxTRANSLATE("US Std Fanfold, 14 7/8 x 11 in"), 3778, 2794); + WXADDPAPER(wxPAPER_FANFOLD_STD_GERMAN, DMPAPER_FANFOLD_STD_GERMAN, wxTRANSLATE("German Std Fanfold, 8 1/2 x 12 in"), 2159, 3048); + WXADDPAPER(wxPAPER_FANFOLD_LGL_GERMAN, DMPAPER_FANFOLD_LGL_GERMAN, wxTRANSLATE("German Legal Fanfold, 8 1/2 x 13 in"), 2159, 3302); /* Another time! #ifdef __WIN95__ diff --git a/src/common/parser.y b/src/common/parser.y index 141a6280f4..28723c6bb0 100644 --- a/src/common/parser.y +++ b/src/common/parser.y @@ -156,10 +156,15 @@ void yyerror(char *s) * the UNIX flex expects a proper function. */ -/* Not sure if __SC__ is the appropriate thing - * to test +/* At least on alphaev6-dec-osf4.0e yywrap() must be #define'd. + * RL: ... but on Debian/Alpha(linux) it must not, so hopefully + * testing for __OSF__ here is what we really want. */ - +#ifdef __OSF__ +#ifndef yywrap +#define yywrap() 1 +#endif +#else /* HH: Added test for __WX_SETUP_H__ for gnuwin builds * using configure */ #if !defined(__SC__) && !defined(__GNUWIN32__) @@ -175,3 +180,5 @@ int yywrap() { return 1; } #elif defined(__WX_SETUP_H__) int yywrap() { return 1; } #endif +#endif + diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 03182d5c25..a233f0f206 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -82,10 +82,12 @@ wxPrinterBase::wxPrinterBase(wxPrintDialogData *data) sm_abortIt = FALSE; if (data) m_printDialogData = (*data); + sm_lastError = wxPRINTER_NO_ERROR; } wxWindow *wxPrinterBase::sm_abortWindow = (wxWindow *) NULL; bool wxPrinterBase::sm_abortIt = FALSE; +wxPrinterError wxPrinterBase::sm_lastError = wxPRINTER_NO_ERROR; wxPrinterBase::~wxPrinterBase() { @@ -653,13 +655,13 @@ bool wxPrintPreviewBase::PaintPage(wxWindow *canvas, wxDC& dc) bool wxPrintPreviewBase::RenderPage(int pageNum) { + wxBusyCursor busy; + int canvasWidth, canvasHeight; if (!m_previewCanvas) { - wxFAIL_MSG(_T("wxPrintPreviewBase::RenderPage: must use " - "wxPrintPreviewBase::SetCanvas to let me " - "know about the canvas!")); + wxFAIL_MSG(_T("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!")); return FALSE; } diff --git a/src/common/process.cpp b/src/common/process.cpp index dd80b31466..5a3f23843a 100644 --- a/src/common/process.cpp +++ b/src/common/process.cpp @@ -36,14 +36,21 @@ void wxProcess::Init(wxEvtHandler *parent, int id, bool redirect) m_id = id; m_redirect = redirect; + +#if wxUSE_STREAMS m_inputStream = NULL; + m_errorStream = NULL; m_outputStream = NULL; +#endif // wxUSE_STREAMS } wxProcess::~wxProcess() { +#if wxUSE_STREAMS delete m_inputStream; + delete m_errorStream; delete m_outputStream; +#endif // wxUSE_STREAMS } void wxProcess::OnTerminate(int pid, int status) @@ -61,9 +68,15 @@ void wxProcess::Detach() SetNextHandler(NULL); } -void wxProcess::SetPipeStreams(wxInputStream *in_stream, wxOutputStream *out_stream) +#if wxUSE_STREAMS + +void wxProcess::SetPipeStreams(wxInputStream *inputSstream, + wxOutputStream *outputStream, + wxInputStream *errorStream) { - m_inputStream = in_stream; - m_outputStream = out_stream; + m_inputStream = inputSstream; + m_errorStream = errorStream; + m_outputStream = outputStream; } +#endif // wxUSE_STREAMS diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 27305db69a..e80276a71e 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -23,7 +23,7 @@ #if wxUSE_WX_RESOURCES #ifdef __VISUALC__ - #pragma warning(disable:4706) // assignment within conditional expression +#pragma warning(disable:4706) // assignment within conditional expression #endif // VC++ #ifndef WX_PRECOMP @@ -118,7 +118,7 @@ void wxCleanUpResourceSystem() void wxLogWarning(char *msg) { - wxMessageBox(msg, _("Warning"), wxOK); + wxMessageBox(msg, _("Warning"), wxOK); } IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) @@ -126,32 +126,32 @@ IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) wxItemResource::wxItemResource() { - m_itemType = ""; - m_title = ""; - m_name = ""; - m_windowStyle = 0; - m_x = m_y = m_width = m_height = 0; - m_value1 = m_value2 = m_value3 = m_value5 = 0; - m_value4 = ""; - m_windowId = 0; - m_exStyle = 0; + m_itemType = ""; + m_title = ""; + m_name = ""; + m_windowStyle = 0; + m_x = m_y = m_width = m_height = 0; + m_value1 = m_value2 = m_value3 = m_value5 = 0; + m_value4 = ""; + m_windowId = 0; + m_exStyle = 0; } wxItemResource::~wxItemResource() { - wxNode *node = m_children.First(); - while (node) - { - wxItemResource *item = (wxItemResource *)node->Data(); - delete item; - delete node; - node = m_children.First(); - } + wxNode *node = m_children.First(); + while (node) + { + wxItemResource *item = (wxItemResource *)node->Data(); + delete item; + delete node; + node = m_children.First(); + } } /* - * Resource table - */ +* Resource table +*/ wxResourceTable::wxResourceTable():wxHashTable(wxKEY_STRING), identifiers(wxKEY_STRING) { @@ -159,3067 +159,3075 @@ wxResourceTable::wxResourceTable():wxHashTable(wxKEY_STRING), identifiers(wxKEY_ wxResourceTable::~wxResourceTable() { - ClearTable(); + ClearTable(); } wxItemResource *wxResourceTable::FindResource(const wxString& name) const { - wxItemResource *item = (wxItemResource *)Get(WXSTRINGCAST name); - return item; + wxItemResource *item = (wxItemResource *)Get(WXSTRINGCAST name); + return item; } void wxResourceTable::AddResource(wxItemResource *item) { - wxString name = item->GetName(); - if (name == wxT("")) - name = item->GetTitle(); - if (name == wxT("")) - name = wxT("no name"); - - // Delete existing resource, if any. - Delete(name); - - Put(name, item); + wxString name = item->GetName(); + if (name == wxT("")) + name = item->GetTitle(); + if (name == wxT("")) + name = wxT("no name"); + + // Delete existing resource, if any. + Delete(name); + + Put(name, item); } bool wxResourceTable::DeleteResource(const wxString& name) { - wxItemResource *item = (wxItemResource *)Delete(WXSTRINGCAST name); - if (item) - { - // See if any resource has this as its child; if so, delete from - // parent's child list. - BeginFind(); - wxNode *node = (wxNode *) NULL; - node = Next(); - while (node != NULL) + wxItemResource *item = (wxItemResource *)Delete(WXSTRINGCAST name); + if (item) { - wxItemResource *parent = (wxItemResource *)node->Data(); - if (parent->GetChildren().Member(item)) - { - parent->GetChildren().DeleteObject(item); - break; - } - node = Next(); + // See if any resource has this as its child; if so, delete from + // parent's child list. + BeginFind(); + wxNode *node = (wxNode *) NULL; + node = Next(); + while (node != NULL) + { + wxItemResource *parent = (wxItemResource *)node->Data(); + if (parent->GetChildren().Member(item)) + { + parent->GetChildren().DeleteObject(item); + break; + } + node = Next(); + } + + delete item; + return TRUE; } - - delete item; - return TRUE; - } - else - return FALSE; + else + return FALSE; } bool wxResourceTable::ParseResourceFile( wxInputStream *is ) { - wxExprDatabase db; - int len = is->StreamSize() ; - - bool eof = FALSE; - while ( is->TellI() + 10 < len) // it's a hack because the streams dont support EOF - { - wxResourceReadOneResource(is, db, &eof, this) ; - } - return wxResourceInterpretResources(*this, db); + wxExprDatabase db; + int len = is->StreamSize() ; + + bool eof = FALSE; + while ( is->TellI() + 10 < len) // it's a hack because the streams dont support EOF + { + wxResourceReadOneResource(is, db, &eof, this) ; + } + return wxResourceInterpretResources(*this, db); } bool wxResourceTable::ParseResourceFile(const wxString& filename) { - wxExprDatabase db; - + wxExprDatabase db; + #ifdef __WXMAC__ - FILE *fd = fopen(wxUnix2MacFilename(filename.fn_str()), "r"); + FILE *fd = fopen(wxUnix2MacFilename(filename.fn_str()), "r"); #else - FILE *fd = fopen(filename.fn_str(), "r"); + FILE *fd = wxFopen(filename, _T("r")); #endif - if (!fd) - return FALSE; - bool eof = FALSE; - while (wxResourceReadOneResource(fd, db, &eof, this) && !eof) - { - // Loop - } - fclose(fd); - return wxResourceInterpretResources(*this, db); + if (!fd) + return FALSE; + bool eof = FALSE; + while (wxResourceReadOneResource(fd, db, &eof, this) && !eof) + { + // Loop + } + fclose(fd); + return wxResourceInterpretResources(*this, db); } bool wxResourceTable::ParseResourceData(const wxString& data) { - wxExprDatabase db; - if (!db.ReadFromString(data)) - { - wxLogWarning(_("Ill-formed resource file syntax.")); - return FALSE; - } - - return wxResourceInterpretResources(*this, db); + wxExprDatabase db; + if (!db.ReadFromString(data)) + { + wxLogWarning(_("Ill-formed resource file syntax.")); + return FALSE; + } + + return wxResourceInterpretResources(*this, db); } bool wxResourceTable::RegisterResourceBitmapData(const wxString& name, char bits[], int width, int height) { - // Register pre-loaded bitmap data - wxItemResource *item = new wxItemResource; -// item->SetType(wxRESOURCE_TYPE_XBM_DATA); - item->SetType(wxT("wxXBMData")); - item->SetName(name); - item->SetValue1((long)bits); - item->SetValue2((long)width); - item->SetValue3((long)height); - AddResource(item); - return TRUE; + // Register pre-loaded bitmap data + wxItemResource *item = new wxItemResource; + // item->SetType(wxRESOURCE_TYPE_XBM_DATA); + item->SetType(wxT("wxXBMData")); + item->SetName(name); + item->SetValue1((long)bits); + item->SetValue2((long)width); + item->SetValue3((long)height); + AddResource(item); + return TRUE; } bool wxResourceTable::RegisterResourceBitmapData(const wxString& name, char **data) { - // Register pre-loaded bitmap data - wxItemResource *item = new wxItemResource; -// item->SetType(wxRESOURCE_TYPE_XPM_DATA); - item->SetType(wxT("wxXPMData")); - item->SetName(name); - item->SetValue1((long)data); - AddResource(item); - return TRUE; + // Register pre-loaded bitmap data + wxItemResource *item = new wxItemResource; + // item->SetType(wxRESOURCE_TYPE_XPM_DATA); + item->SetType(wxT("wxXPMData")); + item->SetName(name); + item->SetValue1((long)data); + AddResource(item); + return TRUE; } bool wxResourceTable::SaveResource(const wxString& WXUNUSED(filename)) { - return FALSE; + return FALSE; } void wxResourceTable::ClearTable() { - BeginFind(); - wxNode *node = Next(); - while (node) - { - wxNode *next = Next(); - wxItemResource *item = (wxItemResource *)node->Data(); - delete item; - delete node; - node = next; - } + BeginFind(); + wxNode *node = Next(); + while (node) + { + wxNode *next = Next(); + wxItemResource *item = (wxItemResource *)node->Data(); + delete item; + delete node; + node = next; + } } wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* childResource, const wxItemResource* parentResource) const { - int id = childResource->GetId(); - if ( id == 0 ) - id = -1; - - bool dlgUnits = ((parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0); - - wxControl *control = (wxControl *) NULL; - wxString itemType(childResource->GetType()); - - wxPoint pos; - wxSize size; - if (dlgUnits) - { - pos = parent->ConvertDialogToPixels(wxPoint(childResource->GetX(), childResource->GetY())); - size = parent->ConvertDialogToPixels(wxSize(childResource->GetWidth(), childResource->GetHeight())); - } - else - { - pos = wxPoint(childResource->GetX(), childResource->GetY()); - size = wxSize(childResource->GetWidth(), childResource->GetHeight()); - } - - if (itemType == wxString(wxT("wxButton")) || itemType == wxString(wxT("wxBitmapButton"))) - { + int id = childResource->GetId(); + if ( id == 0 ) + id = -1; + + bool dlgUnits = ((parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0); + + wxControl *control = (wxControl *) NULL; + wxString itemType(childResource->GetType()); + + wxPoint pos; + wxSize size; + if (dlgUnits) + { + pos = parent->ConvertDialogToPixels(wxPoint(childResource->GetX(), childResource->GetY())); + size = parent->ConvertDialogToPixels(wxSize(childResource->GetWidth(), childResource->GetHeight())); + } + else + { + pos = wxPoint(childResource->GetX(), childResource->GetY()); + size = wxSize(childResource->GetWidth(), childResource->GetHeight()); + } + + if (itemType == wxString(wxT("wxButton")) || itemType == wxString(wxT("wxBitmapButton"))) + { if (childResource->GetValue4() != wxT("")) { - // Bitmap button - wxBitmap bitmap = childResource->GetBitmap(); - if (!bitmap.Ok()) - { - bitmap = wxResourceCreateBitmap(childResource->GetValue4(), (wxResourceTable *)this); - ((wxItemResource*) childResource)->SetBitmap(bitmap); - } - if (bitmap.Ok()) - control = new wxBitmapButton(parent, id, bitmap, pos, size, - childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName()); + // Bitmap button + wxBitmap bitmap = childResource->GetBitmap(); + if (!bitmap.Ok()) + { + bitmap = wxResourceCreateBitmap(childResource->GetValue4(), (wxResourceTable *)this); + ((wxItemResource*) childResource)->SetBitmap(bitmap); + } + if (!bitmap.Ok()) + bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE); + control = new wxBitmapButton(parent, id, bitmap, pos, size, + childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName()); } else - // Normal, text button - control = new wxButton(parent, id, childResource->GetTitle(), pos, size, - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } - else if (itemType == wxString(wxT("wxMessage")) || itemType == wxString(wxT("wxStaticText")) || - itemType == wxString(wxT("wxStaticBitmap"))) - { + // Normal, text button + control = new wxButton(parent, id, childResource->GetTitle(), pos, size, + childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + } + else if (itemType == wxString(wxT("wxMessage")) || itemType == wxString(wxT("wxStaticText")) || + itemType == wxString(wxT("wxStaticBitmap"))) + { if (childResource->GetValue4() != wxT("") || itemType == wxString(wxT("wxStaticBitmap")) ) { - // Bitmap message - wxBitmap bitmap = childResource->GetBitmap(); - if (!bitmap.Ok()) - { - bitmap = wxResourceCreateBitmap(childResource->GetValue4(), (wxResourceTable *)this); - ((wxItemResource*) childResource)->SetBitmap(bitmap); - } + // Bitmap message + wxBitmap bitmap = childResource->GetBitmap(); + if (!bitmap.Ok()) + { + bitmap = wxResourceCreateBitmap(childResource->GetValue4(), (wxResourceTable *)this); + ((wxItemResource*) childResource)->SetBitmap(bitmap); + } #if wxUSE_BITMAP_MESSAGE #ifdef __WXMSW__ - // Use a default bitmap - if (!bitmap.Ok()) - bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE); + // Use a default bitmap + if (!bitmap.Ok()) + bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE); #endif - - if (bitmap.Ok()) - control = new wxStaticBitmap(parent, id, bitmap, pos, size, - childResource->GetStyle(), childResource->GetName()); + + if (bitmap.Ok()) + control = new wxStaticBitmap(parent, id, bitmap, pos, size, + childResource->GetStyle(), childResource->GetName()); #endif } else { - control = new wxStaticText(parent, id, childResource->GetTitle(), pos, size, - childResource->GetStyle(), childResource->GetName()); + control = new wxStaticText(parent, id, childResource->GetTitle(), pos, size, + childResource->GetStyle(), childResource->GetName()); } - } - else if (itemType == wxString(wxT("wxText")) || itemType == wxString(wxT("wxTextCtrl")) || itemType == wxString(wxT("wxMultiText"))) - { + } + else if (itemType == wxString(wxT("wxText")) || itemType == wxString(wxT("wxTextCtrl")) || itemType == wxString(wxT("wxMultiText"))) + { control = new wxTextCtrl(parent, id, childResource->GetValue4(), pos, size, - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } - else if (itemType == wxString(wxT("wxCheckBox"))) - { + childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + } + else if (itemType == wxString(wxT("wxCheckBox"))) + { control = new wxCheckBox(parent, id, childResource->GetTitle(), pos, size, - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - + childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + ((wxCheckBox *)control)->SetValue((childResource->GetValue1() != 0)); - } + } #if wxUSE_GAUGE - else if (itemType == wxString(wxT("wxGauge"))) - { + else if (itemType == wxString(wxT("wxGauge"))) + { control = new wxGauge(parent, id, (int)childResource->GetValue2(), pos, size, - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - + childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + ((wxGauge *)control)->SetValue((int)childResource->GetValue1()); - } + } #endif #if wxUSE_RADIOBTN - else if (itemType == wxString(wxT("wxRadioButton"))) - { + else if (itemType == wxString(wxT("wxRadioButton"))) + { control = new wxRadioButton(parent, id, childResource->GetTitle(), // (int)childResource->GetValue1(), - pos, size, - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } + pos, size, + childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + } #endif #if wxUSE_SCROLLBAR - else if (itemType == wxString(wxT("wxScrollBar"))) - { + else if (itemType == wxString(wxT("wxScrollBar"))) + { control = new wxScrollBar(parent, id, pos, size, - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); -/* - ((wxScrollBar *)control)->SetValue((int)childResource->GetValue1()); - ((wxScrollBar *)control)->SetPageSize((int)childResource->GetValue2()); - ((wxScrollBar *)control)->SetObjectLength((int)childResource->GetValue3()); - ((wxScrollBar *)control)->SetViewLength((int)(long)childResource->GetValue5()); -*/ - ((wxScrollBar *)control)->SetScrollbar((int)childResource->GetValue1(),(int)childResource->GetValue2(), - (int)childResource->GetValue3(),(int)(long)childResource->GetValue5(),FALSE); - - } + childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + /* + ((wxScrollBar *)control)->SetValue((int)childResource->GetValue1()); + ((wxScrollBar *)control)->SetPageSize((int)childResource->GetValue2()); + ((wxScrollBar *)control)->SetObjectLength((int)childResource->GetValue3()); + ((wxScrollBar *)control)->SetViewLength((int)(long)childResource->GetValue5()); + */ + ((wxScrollBar *)control)->SetScrollbar((int)childResource->GetValue1(),(int)childResource->GetValue2(), + (int)childResource->GetValue3(),(int)(long)childResource->GetValue5(),FALSE); + + } #endif - else if (itemType == wxString(wxT("wxSlider"))) - { + else if (itemType == wxString(wxT("wxSlider"))) + { control = new wxSlider(parent, id, (int)childResource->GetValue1(), - (int)childResource->GetValue2(), (int)childResource->GetValue3(), pos, size, - childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - } - else if (itemType == wxString(wxT("wxGroupBox")) || itemType == wxString(wxT("wxStaticBox"))) - { + (int)childResource->GetValue2(), (int)childResource->GetValue3(), pos, size, + childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + } + else if (itemType == wxString(wxT("wxGroupBox")) || itemType == wxString(wxT("wxStaticBox"))) + { control = new wxStaticBox(parent, id, childResource->GetTitle(), pos, size, - childResource->GetStyle(), childResource->GetName()); - } - else if (itemType == wxString(wxT("wxListBox"))) - { + childResource->GetStyle(), childResource->GetName()); + } + else if (itemType == wxString(wxT("wxListBox"))) + { wxStringList& stringList = childResource->GetStringValues(); wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList.Number() > 0) { - noStrings = stringList.Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList.First(); - int i = 0; - while (node) - { - strings[i] = (wxChar *)node->Data(); - i ++; - node = node->Next(); - } + noStrings = stringList.Number(); + strings = new wxString[noStrings]; + wxNode *node = stringList.First(); + int i = 0; + while (node) + { + strings[i] = (wxChar *)node->Data(); + i ++; + node = node->Next(); + } } control = new wxListBox(parent, id, pos, size, - noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - + noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + if (strings) - delete[] strings; - } - else if (itemType == wxString(wxT("wxChoice"))) - { + delete[] strings; + } + else if (itemType == wxString(wxT("wxChoice"))) + { wxStringList& stringList = childResource->GetStringValues(); wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList.Number() > 0) { - noStrings = stringList.Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList.First(); - int i = 0; - while (node) - { - strings[i] = (wxChar *)node->Data(); - i ++; - node = node->Next(); - } + noStrings = stringList.Number(); + strings = new wxString[noStrings]; + wxNode *node = stringList.First(); + int i = 0; + while (node) + { + strings[i] = (wxChar *)node->Data(); + i ++; + node = node->Next(); + } } control = new wxChoice(parent, id, pos, size, - noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - + noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + if (strings) - delete[] strings; - } + delete[] strings; + } #if wxUSE_COMBOBOX - else if (itemType == wxString(wxT("wxComboBox"))) - { + else if (itemType == wxString(wxT("wxComboBox"))) + { wxStringList& stringList = childResource->GetStringValues(); wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList.Number() > 0) { - noStrings = stringList.Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList.First(); - int i = 0; - while (node) - { - strings[i] = (wxChar *)node->Data(); - i ++; - node = node->Next(); - } + noStrings = stringList.Number(); + strings = new wxString[noStrings]; + wxNode *node = stringList.First(); + int i = 0; + while (node) + { + strings[i] = (wxChar *)node->Data(); + i ++; + node = node->Next(); + } } control = new wxComboBox(parent, id, childResource->GetValue4(), pos, size, - noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); - + noStrings, strings, childResource->GetStyle(), wxDefaultValidator, childResource->GetName()); + if (strings) - delete[] strings; - } + delete[] strings; + } #endif - else if (itemType == wxString(wxT("wxRadioBox"))) - { + else if (itemType == wxString(wxT("wxRadioBox"))) + { wxStringList& stringList = childResource->GetStringValues(); wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList.Number() > 0) { - noStrings = stringList.Number(); - strings = new wxString[noStrings]; - wxNode *node = stringList.First(); - int i = 0; - while (node) - { - strings[i] = (wxChar *)node->Data(); - i ++; - node = node->Next(); - } + noStrings = stringList.Number(); + strings = new wxString[noStrings]; + wxNode *node = stringList.First(); + int i = 0; + while (node) + { + strings[i] = (wxChar *)node->Data(); + i ++; + node = node->Next(); + } } control = new wxRadioBox(parent, (wxWindowID) id, wxString(childResource->GetTitle()), pos, size, - noStrings, strings, (int)childResource->GetValue1(), childResource->GetStyle(), wxDefaultValidator, - childResource->GetName()); - + noStrings, strings, (int)childResource->GetValue1(), childResource->GetStyle(), wxDefaultValidator, + childResource->GetName()); + if (strings) - delete[] strings; - } - - if ((parentResource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0) - { - // Don't set font; will be inherited from parent. - } - else - { - if (control && childResource->GetFont().Ok()) - { - control->SetFont(childResource->GetFont()); - -#ifdef __WXMSW__ - // Force the layout algorithm since the size changes the layout - if (control->IsKindOf(CLASSINFO(wxRadioBox))) - { - control->SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT); - } -#endif + delete[] strings; } - } - return control; + + if ((parentResource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0) + { + // Don't set font; will be inherited from parent. + } + else + { + if (control && childResource->GetFont().Ok()) + { + control->SetFont(childResource->GetFont()); + +#ifdef __WXMSW__ + // Force the layout algorithm since the size changes the layout + if (control->IsKindOf(CLASSINFO(wxRadioBox))) + { + control->SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT); + } +#endif + } + } + return control; } /* - * Interpret database as a series of resources - */ +* Interpret database as a series of resources +*/ bool wxResourceInterpretResources(wxResourceTable& table, wxExprDatabase& db) { - wxNode *node = db.First(); - while (node) - { - wxExpr *clause = (wxExpr *)node->Data(); - wxString functor(clause->Functor()); - - wxItemResource *item = (wxItemResource *) NULL; - if (functor == wxT("dialog")) - item = wxResourceInterpretDialog(table, clause); - else if (functor == wxT("panel")) - item = wxResourceInterpretDialog(table, clause, TRUE); - else if (functor == wxT("menubar")) - item = wxResourceInterpretMenuBar(table, clause); - else if (functor == wxT("menu")) - item = wxResourceInterpretMenu(table, clause); - else if (functor == wxT("string")) - item = wxResourceInterpretString(table, clause); - else if (functor == wxT("bitmap")) - item = wxResourceInterpretBitmap(table, clause); - else if (functor == wxT("icon")) - item = wxResourceInterpretIcon(table, clause); - - if (item) + wxNode *node = db.First(); + while (node) { - // Remove any existing resource of same name - if (item->GetName() != wxT("")) - table.DeleteResource(item->GetName()); - table.AddResource(item); + wxExpr *clause = (wxExpr *)node->Data(); + wxString functor(clause->Functor()); + + wxItemResource *item = (wxItemResource *) NULL; + if (functor == wxT("dialog")) + item = wxResourceInterpretDialog(table, clause); + else if (functor == wxT("panel")) + item = wxResourceInterpretDialog(table, clause, TRUE); + else if (functor == wxT("menubar")) + item = wxResourceInterpretMenuBar(table, clause); + else if (functor == wxT("menu")) + item = wxResourceInterpretMenu(table, clause); + else if (functor == wxT("string")) + item = wxResourceInterpretString(table, clause); + else if (functor == wxT("bitmap")) + item = wxResourceInterpretBitmap(table, clause); + else if (functor == wxT("icon")) + item = wxResourceInterpretIcon(table, clause); + + if (item) + { + // Remove any existing resource of same name + if (item->GetName() != wxT("")) + table.DeleteResource(item->GetName()); + table.AddResource(item); + } + node = node->Next(); } - node = node->Next(); - } - return TRUE; + return TRUE; } static const wxChar *g_ValidControlClasses[] = { wxT("wxButton"), - wxT("wxBitmapButton"), - wxT("wxMessage"), - wxT("wxStaticText"), - wxT("wxStaticBitmap"), - wxT("wxText"), - wxT("wxTextCtrl"), - wxT("wxMultiText"), - wxT("wxListBox"), - wxT("wxRadioBox"), - wxT("wxRadioButton"), - wxT("wxCheckBox"), - wxT("wxBitmapCheckBox"), - wxT("wxGroupBox"), - wxT("wxStaticBox"), - wxT("wxSlider"), - wxT("wxGauge"), - wxT("wxScrollBar"), - wxT("wxChoice"), - wxT("wxComboBox") + wxT("wxBitmapButton"), + wxT("wxMessage"), + wxT("wxStaticText"), + wxT("wxStaticBitmap"), + wxT("wxText"), + wxT("wxTextCtrl"), + wxT("wxMultiText"), + wxT("wxListBox"), + wxT("wxRadioBox"), + wxT("wxRadioButton"), + wxT("wxCheckBox"), + wxT("wxBitmapCheckBox"), + wxT("wxGroupBox"), + wxT("wxStaticBox"), + wxT("wxSlider"), + wxT("wxGauge"), + wxT("wxScrollBar"), + wxT("wxChoice"), + wxT("wxComboBox") }; static bool wxIsValidControlClass(const wxString& c) { - for ( size_t i = 0; i < WXSIZEOF(g_ValidControlClasses); i++ ) - { - if ( c == g_ValidControlClasses[i] ) - return TRUE; - } - return FALSE; + for ( size_t i = 0; i < WXSIZEOF(g_ValidControlClasses); i++ ) + { + if ( c == g_ValidControlClasses[i] ) + return TRUE; + } + return FALSE; } wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr, bool isPanel) { - wxItemResource *dialogItem = new wxItemResource; - if (isPanel) - dialogItem->SetType(wxT("wxPanel")); - else - dialogItem->SetType(wxT("wxDialog")); - wxString style = wxT(""); - wxString title = wxT(""); - wxString name = wxT(""); - wxString backColourHex = wxT(""); - wxString labelColourHex = wxT(""); - wxString buttonColourHex = wxT(""); - - long windowStyle = wxDEFAULT_DIALOG_STYLE; - if (isPanel) - windowStyle = 0; - - int x = 0; int y = 0; int width = -1; int height = -1; - int isModal = 0; - wxExpr *labelFontExpr = (wxExpr *) NULL; - wxExpr *buttonFontExpr = (wxExpr *) NULL; - wxExpr *fontExpr = (wxExpr *) NULL; - expr->GetAttributeValue(wxT("style"), style); - expr->GetAttributeValue(wxT("name"), name); - expr->GetAttributeValue(wxT("title"), title); - expr->GetAttributeValue(wxT("x"), x); - expr->GetAttributeValue(wxT("y"), y); - expr->GetAttributeValue(wxT("width"), width); - expr->GetAttributeValue(wxT("height"), height); - expr->GetAttributeValue(wxT("modal"), isModal); - expr->GetAttributeValue(wxT("label_font"), &labelFontExpr); - expr->GetAttributeValue(wxT("button_font"), &buttonFontExpr); - expr->GetAttributeValue(wxT("font"), &fontExpr); - expr->GetAttributeValue(wxT("background_colour"), backColourHex); - expr->GetAttributeValue(wxT("label_colour"), labelColourHex); - expr->GetAttributeValue(wxT("button_colour"), buttonColourHex); - - int useDialogUnits = 0; - expr->GetAttributeValue(wxT("use_dialog_units"), useDialogUnits); - if (useDialogUnits != 0) - dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_DIALOG_UNITS); - - int useDefaults = 0; - expr->GetAttributeValue(wxT("use_system_defaults"), useDefaults); - if (useDefaults != 0) - dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_USE_DEFAULTS); - - int id = 0; - expr->GetAttributeValue(wxT("id"), id); - dialogItem->SetId(id); - - if (style != wxT("")) - { - windowStyle = wxParseWindowStyle(style); - } - dialogItem->SetStyle(windowStyle); - dialogItem->SetValue1(isModal); - if (windowStyle & wxDIALOG_MODAL) // Uses style in wxWin 2 - dialogItem->SetValue1(TRUE); - - dialogItem->SetName(name); - dialogItem->SetTitle(title); - dialogItem->SetSize(x, y, width, height); - - if (backColourHex != wxT("")) - { - int r = 0; - int g = 0; - int b = 0; - r = wxHexToDec(backColourHex.Mid(0, 2)); - g = wxHexToDec(backColourHex.Mid(2, 2)); - b = wxHexToDec(backColourHex.Mid(4, 2)); - dialogItem->SetBackgroundColour(wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); - } - if (labelColourHex != wxT("")) - { - int r = 0; - int g = 0; - int b = 0; - r = wxHexToDec(labelColourHex.Mid(0, 2)); - g = wxHexToDec(labelColourHex.Mid(2, 2)); - b = wxHexToDec(labelColourHex.Mid(4, 2)); - dialogItem->SetLabelColour(wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); - } - if (buttonColourHex != wxT("")) - { - int r = 0; - int g = 0; - int b = 0; - r = wxHexToDec(buttonColourHex.Mid(0, 2)); - g = wxHexToDec(buttonColourHex.Mid(2, 2)); - b = wxHexToDec(buttonColourHex.Mid(4, 2)); - dialogItem->SetButtonColour(wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); - } - - if (fontExpr) - dialogItem->SetFont(wxResourceInterpretFontSpec(fontExpr)); - else if (buttonFontExpr) - dialogItem->SetFont(wxResourceInterpretFontSpec(buttonFontExpr)); - else if (labelFontExpr) - dialogItem->SetFont(wxResourceInterpretFontSpec(labelFontExpr)); - - // Now parse all controls - wxExpr *controlExpr = expr->GetFirst(); - while (controlExpr) - { - if (controlExpr->Number() == 3) + wxItemResource *dialogItem = new wxItemResource; + if (isPanel) + dialogItem->SetType(wxT("wxPanel")); + else + dialogItem->SetType(wxT("wxDialog")); + wxString style = wxT(""); + wxString title = wxT(""); + wxString name = wxT(""); + wxString backColourHex = wxT(""); + wxString labelColourHex = wxT(""); + wxString buttonColourHex = wxT(""); + + long windowStyle = wxDEFAULT_DIALOG_STYLE; + if (isPanel) + windowStyle = 0; + + int x = 0; int y = 0; int width = -1; int height = -1; + int isModal = 0; + wxExpr *labelFontExpr = (wxExpr *) NULL; + wxExpr *buttonFontExpr = (wxExpr *) NULL; + wxExpr *fontExpr = (wxExpr *) NULL; + expr->GetAttributeValue(wxT("style"), style); + expr->GetAttributeValue(wxT("name"), name); + expr->GetAttributeValue(wxT("title"), title); + expr->GetAttributeValue(wxT("x"), x); + expr->GetAttributeValue(wxT("y"), y); + expr->GetAttributeValue(wxT("width"), width); + expr->GetAttributeValue(wxT("height"), height); + expr->GetAttributeValue(wxT("modal"), isModal); + expr->GetAttributeValue(wxT("label_font"), &labelFontExpr); + expr->GetAttributeValue(wxT("button_font"), &buttonFontExpr); + expr->GetAttributeValue(wxT("font"), &fontExpr); + expr->GetAttributeValue(wxT("background_colour"), backColourHex); + expr->GetAttributeValue(wxT("label_colour"), labelColourHex); + expr->GetAttributeValue(wxT("button_colour"), buttonColourHex); + + int useDialogUnits = 0; + expr->GetAttributeValue(wxT("use_dialog_units"), useDialogUnits); + if (useDialogUnits != 0) + dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_DIALOG_UNITS); + + int useDefaults = 0; + expr->GetAttributeValue(wxT("use_system_defaults"), useDefaults); + if (useDefaults != 0) + dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_USE_DEFAULTS); + + int id = 0; + expr->GetAttributeValue(wxT("id"), id); + dialogItem->SetId(id); + + if (style != wxT("")) { - wxString controlKeyword(controlExpr->Nth(1)->StringValue()); - if (controlKeyword != wxT("") && controlKeyword == wxT("control")) - { - // The value part: always a list. - wxExpr *listExpr = controlExpr->Nth(2); - if (listExpr->Type() == PrologList) - { - wxItemResource *controlItem = wxResourceInterpretControl(table, listExpr); - if (controlItem) - { - dialogItem->GetChildren().Append(controlItem); - } - } - } + windowStyle = wxParseWindowStyle(style); } - controlExpr = controlExpr->GetNext(); - } - return dialogItem; + dialogItem->SetStyle(windowStyle); + dialogItem->SetValue1(isModal); + if (windowStyle & wxDIALOG_MODAL) // Uses style in wxWin 2 + dialogItem->SetValue1(TRUE); + + dialogItem->SetName(name); + dialogItem->SetTitle(title); + dialogItem->SetSize(x, y, width, height); + + // Check for wxWin 1.68-style specifications + if (style.Find(wxT("VERTICAL_LABEL")) != -1) + dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_VERTICAL_LABEL); + else if (style.Find(wxT("HORIZONTAL_LABEL")) != -1) + dialogItem->SetResourceStyle(dialogItem->GetResourceStyle() | wxRESOURCE_HORIZONTAL_LABEL); + + if (backColourHex != wxT("")) + { + int r = 0; + int g = 0; + int b = 0; + r = wxHexToDec(backColourHex.Mid(0, 2)); + g = wxHexToDec(backColourHex.Mid(2, 2)); + b = wxHexToDec(backColourHex.Mid(4, 2)); + dialogItem->SetBackgroundColour(wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); + } + if (labelColourHex != wxT("")) + { + int r = 0; + int g = 0; + int b = 0; + r = wxHexToDec(labelColourHex.Mid(0, 2)); + g = wxHexToDec(labelColourHex.Mid(2, 2)); + b = wxHexToDec(labelColourHex.Mid(4, 2)); + dialogItem->SetLabelColour(wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); + } + if (buttonColourHex != wxT("")) + { + int r = 0; + int g = 0; + int b = 0; + r = wxHexToDec(buttonColourHex.Mid(0, 2)); + g = wxHexToDec(buttonColourHex.Mid(2, 2)); + b = wxHexToDec(buttonColourHex.Mid(4, 2)); + dialogItem->SetButtonColour(wxColour((unsigned char)r,(unsigned char)g,(unsigned char)b)); + } + + if (fontExpr) + dialogItem->SetFont(wxResourceInterpretFontSpec(fontExpr)); + else if (buttonFontExpr) + dialogItem->SetFont(wxResourceInterpretFontSpec(buttonFontExpr)); + else if (labelFontExpr) + dialogItem->SetFont(wxResourceInterpretFontSpec(labelFontExpr)); + + // Now parse all controls + wxExpr *controlExpr = expr->GetFirst(); + while (controlExpr) + { + if (controlExpr->Number() == 3) + { + wxString controlKeyword(controlExpr->Nth(1)->StringValue()); + if (controlKeyword != wxT("") && controlKeyword == wxT("control")) + { + // The value part: always a list. + wxExpr *listExpr = controlExpr->Nth(2); + if (listExpr->Type() == PrologList) + { + wxItemResource *controlItem = wxResourceInterpretControl(table, listExpr); + if (controlItem) + { + dialogItem->GetChildren().Append(controlItem); + } + } + } + } + controlExpr = controlExpr->GetNext(); + } + return dialogItem; } wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) { - wxItemResource *controlItem = new wxItemResource; - - // First, find the standard features of a control definition: - // [optional integer/string id], control name, title, style, name, x, y, width, height - - wxString controlType; - wxString style; - wxString title; - wxString name; - int id = 0; - long windowStyle = 0; - int x = 0; int y = 0; int width = -1; int height = -1; - int count = 0; - - wxExpr *expr1 = expr->Nth(0); - - if ( expr1->Type() == PrologString || expr1->Type() == PrologWord ) - { - if ( wxIsValidControlClass(expr1->StringValue()) ) - { - count = 1; - controlType = expr1->StringValue(); - } - else - { - wxString str(expr1->StringValue()); - id = wxResourceGetIdentifier(str, &table); - if (id == 0) + wxItemResource *controlItem = new wxItemResource; + + // First, find the standard features of a control definition: + // [optional integer/string id], control name, title, style, name, x, y, width, height + + wxString controlType; + wxString style; + wxString title; + wxString name; + int id = 0; + long windowStyle = 0; + int x = 0; int y = 0; int width = -1; int height = -1; + int count = 0; + + wxExpr *expr1 = expr->Nth(0); + + if ( expr1->Type() == PrologString || expr1->Type() == PrologWord ) + { + if ( wxIsValidControlClass(expr1->StringValue()) ) { - wxLogWarning(_("Could not resolve control class or id '%s'. " - "Use (non-zero) integer instead\n or provide #define " - "(see manual for caveats)"), - (const wxChar*) expr1->StringValue()); - delete controlItem; - return (wxItemResource *) NULL; + count = 1; + controlType = expr1->StringValue(); } - else - { - // Success - we have an id, so the 2nd element must be the control class. - controlType = expr->Nth(1)->StringValue(); - count = 2; - } - } - } - else if (expr1->Type() == PrologInteger) - { + else + { + wxString str(expr1->StringValue()); + id = wxResourceGetIdentifier(str, &table); + if (id == 0) + { + wxLogWarning(_("Could not resolve control class or id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)"), + (const wxChar*) expr1->StringValue()); + delete controlItem; + return (wxItemResource *) NULL; + } + else + { + // Success - we have an id, so the 2nd element must be the control class. + controlType = expr->Nth(1)->StringValue(); + count = 2; + } + } + } + else if (expr1->Type() == PrologInteger) + { id = (int)expr1->IntegerValue(); - // Success - we have an id, so the 2nd element must be the control class. - controlType = expr->Nth(1)->StringValue(); - count = 2; - } - - expr1 = expr->Nth(count); - count ++; - if ( expr1 ) - title = expr1->StringValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - { - style = expr1->StringValue(); - windowStyle = wxParseWindowStyle(style); - } - - expr1 = expr->Nth(count); - count ++; - if (expr1) - name = expr1->StringValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - x = (int)expr1->IntegerValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - y = (int)expr1->IntegerValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - width = (int)expr1->IntegerValue(); - - expr1 = expr->Nth(count); - count ++; - if (expr1) - height = (int)expr1->IntegerValue(); - - controlItem->SetStyle(windowStyle); - controlItem->SetName(name); - controlItem->SetTitle(title); - controlItem->SetSize(x, y, width, height); - controlItem->SetType(controlType); - controlItem->SetId(id); - - if (controlType == wxT("wxButton")) - { - // Check for bitmap resource name (in case loading old-style resource file) - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) + // Success - we have an id, so the 2nd element must be the control class. + controlType = expr->Nth(1)->StringValue(); + count = 2; + } + + expr1 = expr->Nth(count); + count ++; + if ( expr1 ) + title = expr1->StringValue(); + + expr1 = expr->Nth(count); + count ++; + if (expr1) { - wxString str(expr->Nth(count)->StringValue()); - count ++; + style = expr1->StringValue(); + windowStyle = wxParseWindowStyle(style); + } + + expr1 = expr->Nth(count); + count ++; + if (expr1) + name = expr1->StringValue(); + + expr1 = expr->Nth(count); + count ++; + if (expr1) + x = (int)expr1->IntegerValue(); + + expr1 = expr->Nth(count); + count ++; + if (expr1) + y = (int)expr1->IntegerValue(); + + expr1 = expr->Nth(count); + count ++; + if (expr1) + width = (int)expr1->IntegerValue(); + + expr1 = expr->Nth(count); + count ++; + if (expr1) + height = (int)expr1->IntegerValue(); + + controlItem->SetStyle(windowStyle); + controlItem->SetName(name); + controlItem->SetTitle(title); + controlItem->SetSize(x, y, width, height); + controlItem->SetType(controlType); + controlItem->SetId(id); - if (str != wxT("")) + // Check for wxWin 1.68-style specifications + if (style.Find(wxT("VERTICAL_LABEL")) != -1) + controlItem->SetResourceStyle(controlItem->GetResourceStyle() | wxRESOURCE_VERTICAL_LABEL); + else if (style.Find(wxT("HORIZONTAL_LABEL")) != -1) + controlItem->SetResourceStyle(controlItem->GetResourceStyle() | wxRESOURCE_HORIZONTAL_LABEL); + + if (controlType == wxT("wxButton")) + { + // Check for bitmap resource name (in case loading old-style resource file) + if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) { + wxString str(expr->Nth(count)->StringValue()); + count ++; + + if (str != wxT("")) + { + controlItem->SetValue4(str); + controlItem->SetType(wxT("wxBitmapButton")); + } + } + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + else if (controlType == wxT("wxBitmapButton")) + { + // Check for bitmap resource name + if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) + { + wxString str(expr->Nth(count)->StringValue()); controlItem->SetValue4(str); - controlItem->SetType(wxT("wxBitmapButton")); - } - } - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - else if (controlType == wxT("wxBitmapButton")) - { - // Check for bitmap resource name - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) - { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(str); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - else if (controlType == wxT("wxCheckBox")) - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } -#if wxUSE_RADIOBTN - else if (controlType == wxT("wxRadioButton")) - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } -#endif - else if (controlType == wxT("wxText") || controlType == wxT("wxTextCtrl") || controlType == wxT("wxMultiText")) - { - // Check for default value - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) - { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(str); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - // Skip past the obsolete label font spec if there are two consecutive specs - if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) - count ++; - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - else if (controlType == wxT("wxMessage") || controlType == wxT("wxStaticText")) - { - // Check for bitmap resource name (in case it's an old-style .wxr file) - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) - { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(str); - count ++; - controlItem->SetType(wxT("wxStaticText")); - } - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - else if (controlType == wxT("wxStaticBitmap")) - { - // Check for bitmap resource name - if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) - { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(str); - count ++; - } - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - else if (controlType == wxT("wxGroupBox") || controlType == wxT("wxStaticBox")) - { - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - else if (controlType == wxT("wxGauge")) - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - - // Check for range - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue2(expr->Nth(count)->IntegerValue()); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // Skip past the obsolete label font spec if there are two consecutive specs - if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) - count ++; - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - } - else if (controlType == wxT("wxSlider")) - { - // Check for default value - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - - // Check for min - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue2(expr->Nth(count)->IntegerValue()); - count ++; - - // Check for max - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue3(expr->Nth(count)->IntegerValue()); - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); - // do nothing - count ++; - + count ++; if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); } - } - } - } - } - else if (controlType == wxT("wxScrollBar")) - { - // DEFAULT VALUE - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - - // PAGE LENGTH - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue2(expr->Nth(count)->IntegerValue()); - count ++; - - // OBJECT LENGTH + } + else if (controlType == wxT("wxCheckBox")) + { + // Check for default value if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue3(expr->Nth(count)->IntegerValue()); - count ++; - - // VIEW LENGTH - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - controlItem->SetValue5(expr->Nth(count)->IntegerValue()); - } - } - } - } - else if (controlType == wxT("wxListBox")) - { - wxExpr *valueList = (wxExpr *) NULL; - - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) - { - wxStringList stringList; - wxExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) - { - stringList.Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); - } - controlItem->SetStringValues(stringList); - count ++; -// This is now obsolete: it's in the window style. - // Check for wxSINGLE/wxMULTIPLE - wxExpr *mult = (wxExpr *) NULL; -/* - controlItem->SetValue1(wxLB_SINGLE); -*/ - if ((mult = expr->Nth(count)) && ((mult->Type() == PrologString)||(mult->Type() == PrologWord))) - { -/* - wxString m(mult->StringValue()); - if (m == "wxLB_MULTIPLE") - controlItem->SetValue1(wxLB_MULTIPLE); - else if (m == "wxLB_EXTENDED") - controlItem->SetValue1(wxLB_EXTENDED); -*/ - // Ignore the value - count ++; - } - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // Skip past the obsolete label font spec if there are two consecutive specs - if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) - count ++; - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - else if (controlType == wxT("wxChoice")) - { - wxExpr *valueList = (wxExpr *) NULL; - // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) - { - wxStringList stringList; - wxExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) - { - stringList.Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); - } - controlItem->SetStringValues(stringList); - - count ++; - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // Skip past the obsolete label font spec if there are two consecutive specs - if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) - count ++; - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } -#if wxUSE_COMBOBOX - else if (controlType == wxT("wxComboBox")) - { - wxExpr *textValue = expr->Nth(count); - if (textValue && (textValue->Type() == PrologString || textValue->Type() == PrologWord)) - { - wxString str(textValue->StringValue()); - controlItem->SetValue4(str); - - count ++; - - wxExpr *valueList = (wxExpr *) NULL; - // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) - { - wxStringList stringList; - wxExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) { - stringList.Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); + controlItem->SetValue1(expr->Nth(count)->IntegerValue()); + count ++; + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } +#if wxUSE_RADIOBTN + else if (controlType == wxT("wxRadioButton")) + { + // Check for default value + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue1(expr->Nth(count)->IntegerValue()); + count ++; + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } +#endif + else if (controlType == wxT("wxText") || controlType == wxT("wxTextCtrl") || controlType == wxT("wxMultiText")) + { + // Check for default value + if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) + { + wxString str(expr->Nth(count)->StringValue()); + controlItem->SetValue4(str); + count ++; + + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + { + // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); + // Skip past the obsolete label font spec if there are two consecutive specs + if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) + count ++; + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } + } + else if (controlType == wxT("wxMessage") || controlType == wxT("wxStaticText")) + { + // Check for bitmap resource name (in case it's an old-style .wxr file) + if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) + { + wxString str(expr->Nth(count)->StringValue()); + controlItem->SetValue4(str); + count ++; + controlItem->SetType(wxT("wxStaticText")); } - controlItem->SetStringValues(stringList); - - count ++; - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // Skip past the obsolete label font spec if there are two consecutive specs - if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) - count ++; - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } - } + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + else if (controlType == wxT("wxStaticBitmap")) + { + // Check for bitmap resource name + if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) + { + wxString str(expr->Nth(count)->StringValue()); + controlItem->SetValue4(str); + count ++; + } + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + else if (controlType == wxT("wxGroupBox") || controlType == wxT("wxStaticBox")) + { + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + else if (controlType == wxT("wxGauge")) + { + // Check for default value + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue1(expr->Nth(count)->IntegerValue()); + count ++; + + // Check for range + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue2(expr->Nth(count)->IntegerValue()); + count ++; + + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + { + // Skip past the obsolete label font spec if there are two consecutive specs + if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) + count ++; + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } + } + } + else if (controlType == wxT("wxSlider")) + { + // Check for default value + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue1(expr->Nth(count)->IntegerValue()); + count ++; + + // Check for min + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue2(expr->Nth(count)->IntegerValue()); + count ++; + + // Check for max + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue3(expr->Nth(count)->IntegerValue()); + count ++; + + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + { + // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count))); + // do nothing + count ++; + + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } + } + } + } + else if (controlType == wxT("wxScrollBar")) + { + // DEFAULT VALUE + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue1(expr->Nth(count)->IntegerValue()); + count ++; + + // PAGE LENGTH + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue2(expr->Nth(count)->IntegerValue()); + count ++; + + // OBJECT LENGTH + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue3(expr->Nth(count)->IntegerValue()); + count ++; + + // VIEW LENGTH + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + controlItem->SetValue5(expr->Nth(count)->IntegerValue()); + } + } + } + } + else if (controlType == wxT("wxListBox")) + { + wxExpr *valueList = (wxExpr *) NULL; + + if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + { + wxStringList stringList; + wxExpr *stringExpr = valueList->GetFirst(); + while (stringExpr) + { + stringList.Add(stringExpr->StringValue()); + stringExpr = stringExpr->GetNext(); + } + controlItem->SetStringValues(stringList); + count ++; + // This is now obsolete: it's in the window style. + // Check for wxSINGLE/wxMULTIPLE + wxExpr *mult = (wxExpr *) NULL; + /* + controlItem->SetValue1(wxLB_SINGLE); + */ + if ((mult = expr->Nth(count)) && ((mult->Type() == PrologString)||(mult->Type() == PrologWord))) + { + /* + wxString m(mult->StringValue()); + if (m == "wxLB_MULTIPLE") + controlItem->SetValue1(wxLB_MULTIPLE); + else if (m == "wxLB_EXTENDED") + controlItem->SetValue1(wxLB_EXTENDED); + */ + // Ignore the value + count ++; + } + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + { + // Skip past the obsolete label font spec if there are two consecutive specs + if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) + count ++; + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } + } + else if (controlType == wxT("wxChoice")) + { + wxExpr *valueList = (wxExpr *) NULL; + // Check for default value list + if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + { + wxStringList stringList; + wxExpr *stringExpr = valueList->GetFirst(); + while (stringExpr) + { + stringList.Add(stringExpr->StringValue()); + stringExpr = stringExpr->GetNext(); + } + controlItem->SetStringValues(stringList); + + count ++; + + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + { + // Skip past the obsolete label font spec if there are two consecutive specs + if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) + count ++; + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } + } +#if wxUSE_COMBOBOX + else if (controlType == wxT("wxComboBox")) + { + wxExpr *textValue = expr->Nth(count); + if (textValue && (textValue->Type() == PrologString || textValue->Type() == PrologWord)) + { + wxString str(textValue->StringValue()); + controlItem->SetValue4(str); + + count ++; + + wxExpr *valueList = (wxExpr *) NULL; + // Check for default value list + if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + { + wxStringList stringList; + wxExpr *stringExpr = valueList->GetFirst(); + while (stringExpr) + { + stringList.Add(stringExpr->StringValue()); + stringExpr = stringExpr->GetNext(); + } + controlItem->SetStringValues(stringList); + + count ++; + + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + { + // Skip past the obsolete label font spec if there are two consecutive specs + if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) + count ++; + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } + } + } #endif #if 1 - else if (controlType == wxT("wxRadioBox")) - { - wxExpr *valueList = (wxExpr *) NULL; - // Check for default value list - if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + else if (controlType == wxT("wxRadioBox")) { - wxStringList stringList; - wxExpr *stringExpr = valueList->GetFirst(); - while (stringExpr) - { - stringList.Add(stringExpr->StringValue()); - stringExpr = stringExpr->GetNext(); - } - controlItem->SetStringValues(stringList); - count ++; - - // majorDim (number of rows or cols) - if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) - { - controlItem->SetValue1(expr->Nth(count)->IntegerValue()); - count ++; - } - else - controlItem->SetValue1(0); - - if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) - { - // Skip past the obsolete label font spec if there are two consecutive specs - if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) - count ++; - controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); - } - } - } + wxExpr *valueList = (wxExpr *) NULL; + // Check for default value list + if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) + { + wxStringList stringList; + wxExpr *stringExpr = valueList->GetFirst(); + while (stringExpr) + { + stringList.Add(stringExpr->StringValue()); + stringExpr = stringExpr->GetNext(); + } + controlItem->SetStringValues(stringList); + count ++; + + // majorDim (number of rows or cols) + if (expr->Nth(count) && (expr->Nth(count)->Type() == PrologInteger)) + { + controlItem->SetValue1(expr->Nth(count)->IntegerValue()); + count ++; + } + else + controlItem->SetValue1(0); + + if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) + { + // Skip past the obsolete label font spec if there are two consecutive specs + if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList) + count ++; + controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); + } + } + } #endif - else - { - delete controlItem; - return (wxItemResource *) NULL; - } - return controlItem; + else + { + delete controlItem; + return (wxItemResource *) NULL; + } + return controlItem; } // Forward declaration wxItemResource *wxResourceInterpretMenu1(wxResourceTable& table, wxExpr *expr); /* - * Interpet a menu item - */ +* Interpet a menu item +*/ wxItemResource *wxResourceInterpretMenuItem(wxResourceTable& table, wxExpr *expr) { - wxItemResource *item = new wxItemResource; - - wxExpr *labelExpr = expr->Nth(0); - wxExpr *idExpr = expr->Nth(1); - wxExpr *helpExpr = expr->Nth(2); - wxExpr *checkableExpr = expr->Nth(3); - - // Further keywords/attributes to follow sometime... - if (expr->Number() == 0) - { -// item->SetType(wxRESOURCE_TYPE_SEPARATOR); - item->SetType(wxT("wxMenuSeparator")); - return item; - } - else - { -// item->SetType(wxTYPE_MENU); // Well, menu item, but doesn't matter. - item->SetType(wxT("wxMenu")); // Well, menu item, but doesn't matter. - if (labelExpr) + wxItemResource *item = new wxItemResource; + + wxExpr *labelExpr = expr->Nth(0); + wxExpr *idExpr = expr->Nth(1); + wxExpr *helpExpr = expr->Nth(2); + wxExpr *checkableExpr = expr->Nth(3); + + // Further keywords/attributes to follow sometime... + if (expr->Number() == 0) { - wxString str(labelExpr->StringValue()); - item->SetTitle(str); + // item->SetType(wxRESOURCE_TYPE_SEPARATOR); + item->SetType(wxT("wxMenuSeparator")); + return item; } - if (idExpr) + else { - int id = 0; - // If a string or word, must look up in identifier table. - if ((idExpr->Type() == PrologString) || (idExpr->Type() == PrologWord)) - { - wxString str(idExpr->StringValue()); - id = wxResourceGetIdentifier(str, &table); - if (id == 0) + // item->SetType(wxTYPE_MENU); // Well, menu item, but doesn't matter. + item->SetType(wxT("wxMenu")); // Well, menu item, but doesn't matter. + if (labelExpr) { - wxLogWarning(_("Could not resolve menu id '%s'. " - "Use (non-zero) integer instead\n" - "or provide #define (see manual for caveats)"), - (const wxChar*) idExpr->StringValue()); + wxString str(labelExpr->StringValue()); + item->SetTitle(str); + } + if (idExpr) + { + int id = 0; + // If a string or word, must look up in identifier table. + if ((idExpr->Type() == PrologString) || (idExpr->Type() == PrologWord)) + { + wxString str(idExpr->StringValue()); + id = wxResourceGetIdentifier(str, &table); + if (id == 0) + { + wxLogWarning(_("Could not resolve menu id '%s'. Use (non-zero) integer instead\nor provide #define (see manual for caveats)"), + (const wxChar*) idExpr->StringValue()); + } + } + else if (idExpr->Type() == PrologInteger) + id = (int)idExpr->IntegerValue(); + item->SetValue1(id); + } + if (helpExpr) + { + wxString str(helpExpr->StringValue()); + item->SetValue4(str); + } + if (checkableExpr) + item->SetValue2(checkableExpr->IntegerValue()); + + // Find the first expression that's a list, for submenu + wxExpr *subMenuExpr = expr->GetFirst(); + while (subMenuExpr && (subMenuExpr->Type() != PrologList)) + subMenuExpr = subMenuExpr->GetNext(); + + while (subMenuExpr) + { + wxItemResource *child = wxResourceInterpretMenuItem(table, subMenuExpr); + item->GetChildren().Append(child); + subMenuExpr = subMenuExpr->GetNext(); } - } - else if (idExpr->Type() == PrologInteger) - id = (int)idExpr->IntegerValue(); - item->SetValue1(id); } - if (helpExpr) - { - wxString str(helpExpr->StringValue()); - item->SetValue4(str); - } - if (checkableExpr) - item->SetValue2(checkableExpr->IntegerValue()); - - // Find the first expression that's a list, for submenu - wxExpr *subMenuExpr = expr->GetFirst(); - while (subMenuExpr && (subMenuExpr->Type() != PrologList)) - subMenuExpr = subMenuExpr->GetNext(); - - while (subMenuExpr) - { - wxItemResource *child = wxResourceInterpretMenuItem(table, subMenuExpr); - item->GetChildren().Append(child); - subMenuExpr = subMenuExpr->GetNext(); - } - } - return item; + return item; } /* - * Interpret a nested list as a menu - */ +* Interpret a nested list as a menu +*/ /* wxItemResource *wxResourceInterpretMenu1(wxResourceTable& table, wxExpr *expr) { - wxItemResource *menu = new wxItemResource; +wxItemResource *menu = new wxItemResource; // menu->SetType(wxTYPE_MENU); - menu->SetType("wxMenu"); - wxExpr *element = expr->GetFirst(); - while (element) - { - wxItemResource *item = wxResourceInterpretMenuItem(table, element); - if (item) - menu->GetChildren().Append(item); - element = element->GetNext(); - } - return menu; +menu->SetType("wxMenu"); +wxExpr *element = expr->GetFirst(); +while (element) +{ +wxItemResource *item = wxResourceInterpretMenuItem(table, element); +if (item) +menu->GetChildren().Append(item); +element = element->GetNext(); +} +return menu; } */ wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, wxExpr *expr) { - wxExpr *listExpr = (wxExpr *) NULL; - expr->GetAttributeValue(wxT("menu"), &listExpr); - if (!listExpr) - return (wxItemResource *) NULL; - - wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr); - - if (!menuResource) - return (wxItemResource *) NULL; - - wxString name; - if (expr->GetAttributeValue(wxT("name"), name)) - { - menuResource->SetName(name); - } - - return menuResource; + wxExpr *listExpr = (wxExpr *) NULL; + expr->GetAttributeValue(wxT("menu"), &listExpr); + if (!listExpr) + return (wxItemResource *) NULL; + + wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr); + + if (!menuResource) + return (wxItemResource *) NULL; + + wxString name; + if (expr->GetAttributeValue(wxT("name"), name)) + { + menuResource->SetName(name); + } + + return menuResource; } wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, wxExpr *expr) { - wxExpr *listExpr = (wxExpr *) NULL; - expr->GetAttributeValue(wxT("menu"), &listExpr); - if (!listExpr) - return (wxItemResource *) NULL; - - wxItemResource *resource = new wxItemResource; - resource->SetType(wxT("wxMenu")); -// resource->SetType(wxTYPE_MENU); - - wxExpr *element = listExpr->GetFirst(); - while (element) - { - wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr); - resource->GetChildren().Append(menuResource); - element = element->GetNext(); - } - - wxString name; - if (expr->GetAttributeValue(wxT("name"), name)) - { - resource->SetName(name); - } - - return resource; + wxExpr *listExpr = (wxExpr *) NULL; + expr->GetAttributeValue(wxT("menu"), &listExpr); + if (!listExpr) + return (wxItemResource *) NULL; + + wxItemResource *resource = new wxItemResource; + resource->SetType(wxT("wxMenu")); + // resource->SetType(wxTYPE_MENU); + + wxExpr *element = listExpr->GetFirst(); + while (element) + { + wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr); + resource->GetChildren().Append(menuResource); + element = element->GetNext(); + } + + wxString name; + if (expr->GetAttributeValue(wxT("name"), name)) + { + resource->SetName(name); + } + + return resource; } wxItemResource *wxResourceInterpretString(wxResourceTable& WXUNUSED(table), wxExpr *WXUNUSED(expr)) { - return (wxItemResource *) NULL; + return (wxItemResource *) NULL; } wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), wxExpr *expr) { - wxItemResource *bitmapItem = new wxItemResource; -// bitmapItem->SetType(wxTYPE_BITMAP); - bitmapItem->SetType(wxT("wxBitmap")); - wxString name; - if (expr->GetAttributeValue(wxT("name"), name)) - { - bitmapItem->SetName(name); - } - // Now parse all bitmap specifications - wxExpr *bitmapExpr = expr->GetFirst(); - while (bitmapExpr) - { - if (bitmapExpr->Number() == 3) + wxItemResource *bitmapItem = new wxItemResource; + // bitmapItem->SetType(wxTYPE_BITMAP); + bitmapItem->SetType(wxT("wxBitmap")); + wxString name; + if (expr->GetAttributeValue(wxT("name"), name)) { - wxString bitmapKeyword(bitmapExpr->Nth(1)->StringValue()); - if (bitmapKeyword == wxT("bitmap") || bitmapKeyword == wxT("icon")) - { - // The value part: always a list. - wxExpr *listExpr = bitmapExpr->Nth(2); - if (listExpr->Type() == PrologList) - { - wxItemResource *bitmapSpec = new wxItemResource; -// bitmapSpec->SetType(wxTYPE_BITMAP); - bitmapSpec->SetType(wxT("wxBitmap")); - - // List is of form: [filename, bitmaptype, platform, colours, xresolution, yresolution] - // where everything after 'filename' is optional. - wxExpr *nameExpr = listExpr->Nth(0); - wxExpr *typeExpr = listExpr->Nth(1); - wxExpr *platformExpr = listExpr->Nth(2); - wxExpr *coloursExpr = listExpr->Nth(3); - wxExpr *xresExpr = listExpr->Nth(4); - wxExpr *yresExpr = listExpr->Nth(5); - if (nameExpr && nameExpr->StringValue() != wxT("")) - { - bitmapSpec->SetName(nameExpr->StringValue()); - } - if (typeExpr && typeExpr->StringValue() != wxT("")) - { - bitmapSpec->SetValue1(wxParseWindowStyle(typeExpr->StringValue())); - } - else - bitmapSpec->SetValue1(0); - - if (platformExpr && platformExpr->StringValue() != wxT("")) - { - wxString plat(platformExpr->StringValue()); - if (plat == wxT("windows") || plat == wxT("WINDOWS")) - bitmapSpec->SetValue2(RESOURCE_PLATFORM_WINDOWS); - else if (plat == wxT("x") || plat == wxT("X")) - bitmapSpec->SetValue2(RESOURCE_PLATFORM_X); - else if (plat == wxT("mac") || plat == wxT("MAC")) - bitmapSpec->SetValue2(RESOURCE_PLATFORM_MAC); - else - bitmapSpec->SetValue2(RESOURCE_PLATFORM_ANY); - } - else - bitmapSpec->SetValue2(RESOURCE_PLATFORM_ANY); - - if (coloursExpr) - bitmapSpec->SetValue3(coloursExpr->IntegerValue()); - int xres = 0; - int yres = 0; - if (xresExpr) - xres = (int)xresExpr->IntegerValue(); - if (yresExpr) - yres = (int)yresExpr->IntegerValue(); - bitmapSpec->SetSize(0, 0, xres, yres); - - bitmapItem->GetChildren().Append(bitmapSpec); - } - } + bitmapItem->SetName(name); } - bitmapExpr = bitmapExpr->GetNext(); - } - - return bitmapItem; + // Now parse all bitmap specifications + wxExpr *bitmapExpr = expr->GetFirst(); + while (bitmapExpr) + { + if (bitmapExpr->Number() == 3) + { + wxString bitmapKeyword(bitmapExpr->Nth(1)->StringValue()); + if (bitmapKeyword == wxT("bitmap") || bitmapKeyword == wxT("icon")) + { + // The value part: always a list. + wxExpr *listExpr = bitmapExpr->Nth(2); + if (listExpr->Type() == PrologList) + { + wxItemResource *bitmapSpec = new wxItemResource; + // bitmapSpec->SetType(wxTYPE_BITMAP); + bitmapSpec->SetType(wxT("wxBitmap")); + + // List is of form: [filename, bitmaptype, platform, colours, xresolution, yresolution] + // where everything after 'filename' is optional. + wxExpr *nameExpr = listExpr->Nth(0); + wxExpr *typeExpr = listExpr->Nth(1); + wxExpr *platformExpr = listExpr->Nth(2); + wxExpr *coloursExpr = listExpr->Nth(3); + wxExpr *xresExpr = listExpr->Nth(4); + wxExpr *yresExpr = listExpr->Nth(5); + if (nameExpr && nameExpr->StringValue() != wxT("")) + { + bitmapSpec->SetName(nameExpr->StringValue()); + } + if (typeExpr && typeExpr->StringValue() != wxT("")) + { + bitmapSpec->SetValue1(wxParseWindowStyle(typeExpr->StringValue())); + } + else + bitmapSpec->SetValue1(0); + + if (platformExpr && platformExpr->StringValue() != wxT("")) + { + wxString plat(platformExpr->StringValue()); + if (plat == wxT("windows") || plat == wxT("WINDOWS")) + bitmapSpec->SetValue2(RESOURCE_PLATFORM_WINDOWS); + else if (plat == wxT("x") || plat == wxT("X")) + bitmapSpec->SetValue2(RESOURCE_PLATFORM_X); + else if (plat == wxT("mac") || plat == wxT("MAC")) + bitmapSpec->SetValue2(RESOURCE_PLATFORM_MAC); + else + bitmapSpec->SetValue2(RESOURCE_PLATFORM_ANY); + } + else + bitmapSpec->SetValue2(RESOURCE_PLATFORM_ANY); + + if (coloursExpr) + bitmapSpec->SetValue3(coloursExpr->IntegerValue()); + int xres = 0; + int yres = 0; + if (xresExpr) + xres = (int)xresExpr->IntegerValue(); + if (yresExpr) + yres = (int)yresExpr->IntegerValue(); + bitmapSpec->SetSize(0, 0, xres, yres); + + bitmapItem->GetChildren().Append(bitmapSpec); + } + } + } + bitmapExpr = bitmapExpr->GetNext(); + } + + return bitmapItem; } wxItemResource *wxResourceInterpretIcon(wxResourceTable& table, wxExpr *expr) { - wxItemResource *item = wxResourceInterpretBitmap(table, expr); - if (item) - { -// item->SetType(wxTYPE_ICON); - item->SetType(wxT("wxIcon")); - return item; - } - else - return (wxItemResource *) NULL; + wxItemResource *item = wxResourceInterpretBitmap(table, expr); + if (item) + { + // item->SetType(wxTYPE_ICON); + item->SetType(wxT("wxIcon")); + return item; + } + else + return (wxItemResource *) NULL; } // Interpret list expression as a font wxFont wxResourceInterpretFontSpec(wxExpr *expr) { - if (expr->Type() != PrologList) - return wxNullFont; - - int point = 10; - int family = wxSWISS; - int style = wxNORMAL; - int weight = wxNORMAL; - int underline = 0; - wxString faceName(wxT("")); - - wxExpr *pointExpr = expr->Nth(0); - wxExpr *familyExpr = expr->Nth(1); - wxExpr *styleExpr = expr->Nth(2); - wxExpr *weightExpr = expr->Nth(3); - wxExpr *underlineExpr = expr->Nth(4); - wxExpr *faceNameExpr = expr->Nth(5); - if (pointExpr) - point = (int)pointExpr->IntegerValue(); - - wxString str; - if (familyExpr) - { - str = familyExpr->StringValue(); - family = (int)wxParseWindowStyle(str); - } - if (styleExpr) - { - str = styleExpr->StringValue(); - style = (int)wxParseWindowStyle(str); - } - if (weightExpr) - { - str = weightExpr->StringValue(); - weight = (int)wxParseWindowStyle(str); - } - if (underlineExpr) - underline = (int)underlineExpr->IntegerValue(); - if (faceNameExpr) - faceName = faceNameExpr->StringValue(); - - wxFont font(point, family, style, weight, (underline != 0), faceName); - return font; + if (expr->Type() != PrologList) + return wxNullFont; + + int point = 10; + int family = wxSWISS; + int style = wxNORMAL; + int weight = wxNORMAL; + int underline = 0; + wxString faceName(wxT("")); + + wxExpr *pointExpr = expr->Nth(0); + wxExpr *familyExpr = expr->Nth(1); + wxExpr *styleExpr = expr->Nth(2); + wxExpr *weightExpr = expr->Nth(3); + wxExpr *underlineExpr = expr->Nth(4); + wxExpr *faceNameExpr = expr->Nth(5); + if (pointExpr) + point = (int)pointExpr->IntegerValue(); + + wxString str; + if (familyExpr) + { + str = familyExpr->StringValue(); + family = (int)wxParseWindowStyle(str); + } + if (styleExpr) + { + str = styleExpr->StringValue(); + style = (int)wxParseWindowStyle(str); + } + if (weightExpr) + { + str = weightExpr->StringValue(); + weight = (int)wxParseWindowStyle(str); + } + if (underlineExpr) + underline = (int)underlineExpr->IntegerValue(); + if (faceNameExpr) + faceName = faceNameExpr->StringValue(); + + wxFont font(point, family, style, weight, (underline != 0), faceName); + return font; } // Separate file for the remainder of this, for BC++/Win16 #if !((defined(__BORLANDC__) || defined(__SC__)) && defined(__WIN16__)) /* - * (Re)allocate buffer for reading in from resource file - */ +* (Re)allocate buffer for reading in from resource file +*/ bool wxReallocateResourceBuffer() { - if (!wxResourceBuffer) - { - wxResourceBufferSize = 1000; - wxResourceBuffer = new char[wxResourceBufferSize]; + if (!wxResourceBuffer) + { + wxResourceBufferSize = 1000; + wxResourceBuffer = new char[wxResourceBufferSize]; + return TRUE; + } + if (wxResourceBuffer) + { + long newSize = wxResourceBufferSize + 1000; + char *tmp = new char[(int)newSize]; + strncpy(tmp, wxResourceBuffer, (int)wxResourceBufferCount); + delete[] wxResourceBuffer; + wxResourceBuffer = tmp; + wxResourceBufferSize = newSize; + } return TRUE; - } - if (wxResourceBuffer) - { - long newSize = wxResourceBufferSize + 1000; - char *tmp = new char[(int)newSize]; - strncpy(tmp, wxResourceBuffer, (int)wxResourceBufferCount); - delete[] wxResourceBuffer; - wxResourceBuffer = tmp; - wxResourceBufferSize = newSize; - } - return TRUE; } static bool wxEatWhiteSpace(FILE *fd) { - int ch = 0; - - while ((ch = getc(fd)) != EOF) - { - switch (ch) - { - case ' ': - case 0x0a: - case 0x0d: - case 0x09: + int ch = 0; + + while ((ch = getc(fd)) != EOF) + { + switch (ch) + { + case ' ': + case 0x0a: + case 0x0d: + case 0x09: break; - case '/': + case '/': { - int prev_ch = ch; - ch = getc(fd); - if (ch == EOF) - { - ungetc(prev_ch, fd); - return TRUE; - } - - if (ch == '*') - { - // Eat C comment - prev_ch = 0; - while ((ch = getc(fd)) != EOF) - { - if (ch == '/' && prev_ch == '*') - break; - prev_ch = ch; - } - } - else if (ch == '/') - { - // Eat C++ comment - static char buffer[255]; - fgets(buffer, 255, fd); - } - else - { - ungetc(prev_ch, fd); - ungetc(ch, fd); - return TRUE; - } + int prev_ch = ch; + ch = getc(fd); + if (ch == EOF) + { + ungetc(prev_ch, fd); + return TRUE; + } + + if (ch == '*') + { + // Eat C comment + prev_ch = 0; + while ((ch = getc(fd)) != EOF) + { + if (ch == '/' && prev_ch == '*') + break; + prev_ch = ch; + } + } + else if (ch == '/') + { + // Eat C++ comment + static char buffer[255]; + fgets(buffer, 255, fd); + } + else + { + ungetc(prev_ch, fd); + ungetc(ch, fd); + return TRUE; + } } break; - default: + default: ungetc(ch, fd); return TRUE; - - } - } - return FALSE; + + } + } + return FALSE; } static bool wxEatWhiteSpace(wxInputStream *is) { - int ch = is->GetC() ; - if ((ch != ' ') && (ch != '/') && (ch != ' ') && (ch != 10) && (ch != 13) && (ch != 9)) - { - is->Ungetch(ch); - return TRUE; - } - - // Eat whitespace - while (ch == ' ' || ch == 10 || ch == 13 || ch == 9) - ch = is->GetC(); - // Check for comment - if (ch == '/') - { - ch = is->GetC(); - if (ch == '*') + int ch = is->GetC() ; + if ((ch != ' ') && (ch != '/') && (ch != ' ') && (ch != 10) && (ch != 13) && (ch != 9)) + { + is->Ungetch(ch); + return TRUE; + } + + // Eat whitespace + while (ch == ' ' || ch == 10 || ch == 13 || ch == 9) + ch = is->GetC(); + // Check for comment + if (ch == '/') { - bool finished = FALSE; - while (!finished) - { ch = is->GetC(); - if (ch == EOF) - return FALSE; if (ch == '*') { - int newCh = is->GetC(); - if (newCh == '/') - finished = TRUE; - else - { - is->Ungetch(ch); - } + bool finished = FALSE; + while (!finished) + { + ch = is->GetC(); + if (ch == EOF) + return FALSE; + if (ch == '*') + { + int newCh = is->GetC(); + if (newCh == '/') + finished = TRUE; + else + { + is->Ungetch(ch); + } + } + } } - } + else // False alarm + return FALSE; } - else // False alarm - return FALSE; - } - else - is->Ungetch(ch); - return wxEatWhiteSpace(is); + else + is->Ungetch(ch); + return wxEatWhiteSpace(is); } bool wxGetResourceToken(FILE *fd) { - if (!wxResourceBuffer) - wxReallocateResourceBuffer(); - wxResourceBuffer[0] = 0; - wxEatWhiteSpace(fd); - - int ch = getc(fd); - if (ch == '"') - { - // Get string - wxResourceBufferCount = 0; - ch = getc(fd); - while (ch != '"') + if (!wxResourceBuffer) + wxReallocateResourceBuffer(); + wxResourceBuffer[0] = 0; + wxEatWhiteSpace(fd); + + int ch = getc(fd); + if (ch == '"') { - int actualCh = ch; - if (ch == EOF) - { - wxResourceBuffer[wxResourceBufferCount] = 0; - return FALSE; - } - // Escaped characters - else if (ch == '\\') - { - int newCh = getc(fd); - if (newCh == '"') - actualCh = '"'; - else if (newCh == 10) - actualCh = 10; - else + // Get string + wxResourceBufferCount = 0; + ch = getc(fd); + while (ch != '"') { - ungetc(newCh, fd); + int actualCh = ch; + if (ch == EOF) + { + wxResourceBuffer[wxResourceBufferCount] = 0; + return FALSE; + } + // Escaped characters + else if (ch == '\\') + { + int newCh = getc(fd); + if (newCh == '"') + actualCh = '"'; + else if (newCh == 10) + actualCh = 10; + else + { + ungetc(newCh, fd); + } + } + + if (wxResourceBufferCount >= wxResourceBufferSize-1) + wxReallocateResourceBuffer(); + wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; + wxResourceBufferCount ++; + ch = getc(fd); } - } - - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; - wxResourceBufferCount ++; - ch = getc(fd); + wxResourceBuffer[wxResourceBufferCount] = 0; } - wxResourceBuffer[wxResourceBufferCount] = 0; - } - else - { - wxResourceBufferCount = 0; - // Any other token - while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) + else { - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)ch; - wxResourceBufferCount ++; - - ch = getc(fd); + wxResourceBufferCount = 0; + // Any other token + while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) + { + if (wxResourceBufferCount >= wxResourceBufferSize-1) + wxReallocateResourceBuffer(); + wxResourceBuffer[wxResourceBufferCount] = (char)ch; + wxResourceBufferCount ++; + + ch = getc(fd); + } + wxResourceBuffer[wxResourceBufferCount] = 0; + if (ch == EOF) + return FALSE; } - wxResourceBuffer[wxResourceBufferCount] = 0; - if (ch == EOF) - return FALSE; - } - return TRUE; + return TRUE; } bool wxGetResourceToken(wxInputStream *is) { - if (!wxResourceBuffer) - wxReallocateResourceBuffer(); - wxResourceBuffer[0] = 0; - wxEatWhiteSpace(is); - - int ch = is->GetC() ; - if (ch == '"') - { - // Get string - wxResourceBufferCount = 0; - ch = is->GetC(); - while (ch != '"') + if (!wxResourceBuffer) + wxReallocateResourceBuffer(); + wxResourceBuffer[0] = 0; + wxEatWhiteSpace(is); + + int ch = is->GetC() ; + if (ch == '"') { - int actualCh = ch; - if (ch == EOF) - { - wxResourceBuffer[wxResourceBufferCount] = 0; - return FALSE; - } - // Escaped characters - else if (ch == '\\') - { - int newCh = is->GetC(); - if (newCh == '"') - actualCh = '"'; - else if (newCh == 10) - actualCh = 10; - else if (newCh == 13) // mac - actualCh = 10; - else + // Get string + wxResourceBufferCount = 0; + ch = is->GetC(); + while (ch != '"') { - is->Ungetch(newCh); + int actualCh = ch; + if (ch == EOF) + { + wxResourceBuffer[wxResourceBufferCount] = 0; + return FALSE; + } + // Escaped characters + else if (ch == '\\') + { + int newCh = is->GetC(); + if (newCh == '"') + actualCh = '"'; + else if (newCh == 10) + actualCh = 10; + else if (newCh == 13) // mac + actualCh = 10; + else + { + is->Ungetch(newCh); + } + } + + if (wxResourceBufferCount >= wxResourceBufferSize-1) + wxReallocateResourceBuffer(); + wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; + wxResourceBufferCount ++; + ch = is->GetC(); } - } - - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; - wxResourceBufferCount ++; - ch = is->GetC(); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - } - else - { - wxResourceBufferCount = 0; - // Any other token - while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) - { - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)ch; - wxResourceBufferCount ++; - - ch = is->GetC(); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - if (ch == EOF) - return FALSE; - } - return TRUE; -} - -/* - * Files are in form: - static char *name = "...."; - with possible comments. - */ - -bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - // static or #define - if (!wxGetResourceToken(fd)) - { - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "#define") == 0) - { - wxGetResourceToken(fd); - wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); - wxGetResourceToken(fd); - wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); - if (wxIsdigit(value[0])) - { - int val = (int)wxAtol(value); - wxResourceAddIdentifier(name, val, table); + wxResourceBuffer[wxResourceBufferCount] = 0; } else { - wxLogWarning(_("#define %s must be an integer."), name); - delete[] name; - delete[] value; - return FALSE; + wxResourceBufferCount = 0; + // Any other token + while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) + { + if (wxResourceBufferCount >= wxResourceBufferSize-1) + wxReallocateResourceBuffer(); + wxResourceBuffer[wxResourceBufferCount] = (char)ch; + wxResourceBufferCount ++; + + ch = is->GetC(); + } + wxResourceBuffer[wxResourceBufferCount] = 0; + if (ch == EOF) + return FALSE; } - delete[] name; - delete[] value; - return TRUE; - } - else if (strcmp(wxResourceBuffer, "#include") == 0) - { - wxGetResourceToken(fd); - wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); - wxChar *actualName = name; - if (name[0] == wxT('"')) - actualName = name + 1; - int len = wxStrlen(name); - if ((len > 0) && (name[len-1] == wxT('"'))) - name[len-1] = 0; - if (!wxResourceParseIncludeFile(actualName, table)) +} + +/* +* Files are in form: +static char *name = "...."; +with possible comments. +*/ + +bool wxResourceReadOneResource(FILE *fd, wxExprDatabase& db, bool *eof, wxResourceTable *table) +{ + if (!table) + table = wxDefaultResourceTable; + + // static or #define + if (!wxGetResourceToken(fd)) { - wxLogWarning(_("Could not find resource include file %s."), actualName); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "#define") == 0) + { + wxGetResourceToken(fd); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); + wxGetResourceToken(fd); + wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); + if (wxIsdigit(value[0])) + { + int val = (int)wxAtol(value); + wxResourceAddIdentifier(name, val, table); + } + else + { + wxLogWarning(_("#define %s must be an integer."), name); + delete[] name; + delete[] value; + return FALSE; + } + delete[] name; + delete[] value; + + return TRUE; + } + else if (strcmp(wxResourceBuffer, "#include") == 0) + { + wxGetResourceToken(fd); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); + wxChar *actualName = name; + if (name[0] == wxT('"')) + actualName = name + 1; + int len = wxStrlen(name); + if ((len > 0) && (name[len-1] == wxT('"'))) + name[len-1] = 0; + if (!wxResourceParseIncludeFile(actualName, table)) + { + wxLogWarning(_("Could not find resource include file %s."), actualName); + } + delete[] name; + return TRUE; + } + else if (strcmp(wxResourceBuffer, "static") != 0) + { + wxChar buf[300]; + wxStrcpy(buf, _("Found ")); + wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30); + wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); + wxLogWarning(buf); + return FALSE; + } + + // char + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "char") != 0) + { + wxLogWarning(_("Expected 'char' whilst parsing resource.")); + return FALSE; + } + + // *name + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (wxResourceBuffer[0] != '*') + { + wxLogWarning(_("Expected '*' whilst parsing resource.")); + return FALSE; + } + wxChar nameBuf[100]; + wxMB2WX(nameBuf, wxResourceBuffer+1, 99); + nameBuf[99] = 0; + + // = + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "=") != 0) + { + wxLogWarning(_("Expected '=' whilst parsing resource.")); + return FALSE; + } + + // String + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + else + { + if (!db.ReadPrologFromString(wxResourceBuffer)) + { + wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); + return FALSE; + } + } + // Semicolon + if (!wxGetResourceToken(fd)) + { + *eof = TRUE; } - delete[] name; return TRUE; - } - else if (strcmp(wxResourceBuffer, "static") != 0) - { - wxChar buf[300]; - wxStrcpy(buf, _("Found ")); - wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30); - wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); - wxLogWarning(buf); - return FALSE; - } - - // char - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "char") != 0) - { - wxLogWarning(_("Expected 'char' whilst parsing resource.")); - return FALSE; - } - - // *name - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (wxResourceBuffer[0] != '*') - { - wxLogWarning(_("Expected '*' whilst parsing resource.")); - return FALSE; - } - wxChar nameBuf[100]; - wxMB2WX(nameBuf, wxResourceBuffer+1, 99); - nameBuf[99] = 0; - - // = - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "=") != 0) - { - wxLogWarning(_("Expected '=' whilst parsing resource.")); - return FALSE; - } - - // String - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - else - { - if (!db.ReadPrologFromString(wxResourceBuffer)) - { - wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); - return FALSE; - } - } - // Semicolon - if (!wxGetResourceToken(fd)) - { - *eof = TRUE; - } - return TRUE; } bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - // static or #define - if (!wxGetResourceToken(fd)) - { - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "#define") == 0) - { - wxGetResourceToken(fd); - char *name = copystring(wxResourceBuffer); - wxGetResourceToken(fd); - char *value = copystring(wxResourceBuffer); - if (isalpha(value[0])) + if (!table) + table = wxDefaultResourceTable; + + // static or #define + if (!wxGetResourceToken(fd)) { - int val = (int)atol(value); - wxResourceAddIdentifier(name, val, table); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "#define") == 0) + { + wxGetResourceToken(fd); + wxChar *name = copystring(wxConvLibc.cMB2WX(wxResourceBuffer)); + wxGetResourceToken(fd); + wxChar *value = copystring(wxConvLibc.cMB2WX(wxResourceBuffer)); + if (wxIsalpha(value[0])) + { + int val = (int)wxAtol(value); + wxResourceAddIdentifier(name, val, table); + } + else + { + wxLogWarning(_("#define %s must be an integer."), name); + delete[] name; + delete[] value; + return FALSE; + } + delete[] name; + delete[] value; + + return TRUE; + } + else if (strcmp(wxResourceBuffer, "#include") == 0) + { + wxGetResourceToken(fd); + wxChar *name = copystring(wxConvLibc.cMB2WX(wxResourceBuffer)); + wxChar *actualName = name; + if (name[0] == wxT('"')) + actualName = name + 1; + int len = wxStrlen(name); + if ((len > 0) && (name[len-1] == wxT('"'))) + name[len-1] = 0; + if (!wxResourceParseIncludeFile(actualName, table)) + { + wxLogWarning(_("Could not find resource include file %s."), actualName); + } + delete[] name; + return TRUE; + } + else if (strcmp(wxResourceBuffer, "static") != 0) + { + wxChar buf[300]; + wxStrcpy(buf, _("Found ")); + wxStrncat(buf, wxConvLibc.cMB2WX(wxResourceBuffer), 30); + wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); + wxLogWarning(buf); + return FALSE; + } + + // char + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "char") != 0) + { + wxLogWarning(_("Expected 'char' whilst parsing resource.")); + return FALSE; + } + + // *name + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (wxResourceBuffer[0] != '*') + { + wxLogWarning(_("Expected '*' whilst parsing resource.")); + return FALSE; + } + char nameBuf[100]; + strncpy(nameBuf, wxResourceBuffer+1, 99); + + // = + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "=") != 0) + { + wxLogWarning(_("Expected '=' whilst parsing resource.")); + return FALSE; + } + + // String + if (!wxGetResourceToken(fd)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; } else { - wxLogWarning(_("#define %s must be an integer."), name); - delete[] name; - delete[] value; - return FALSE; + if (!db.ReadPrologFromString(wxResourceBuffer)) + { + wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); + return FALSE; + } } - delete[] name; - delete[] value; - - return TRUE; - } - else if (strcmp(wxResourceBuffer, "#include") == 0) - { - wxGetResourceToken(fd); - char *name = copystring(wxResourceBuffer); - char *actualName = name; - if (name[0] == '"') - actualName = name + 1; - int len = strlen(name); - if ((len > 0) && (name[len-1] == '"')) - name[len-1] = 0; - if (!wxResourceParseIncludeFile(actualName, table)) + // Semicolon + if (!wxGetResourceToken(fd)) { - wxLogWarning(_("Could not find resource include file %s."), actualName); + *eof = TRUE; } - delete[] name; return TRUE; - } - else if (strcmp(wxResourceBuffer, "static") != 0) - { - char buf[300]; - strcpy(buf, _("Found ")); - strncat(buf, wxResourceBuffer, 30); - strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); - wxLogWarning(buf); - return FALSE; - } - - // char - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "char") != 0) - { - wxLogWarning(_("Expected 'char' whilst parsing resource.")); - return FALSE; - } - - // *name - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (wxResourceBuffer[0] != '*') - { - wxLogWarning(_("Expected '*' whilst parsing resource.")); - return FALSE; - } - char nameBuf[100]; - strncpy(nameBuf, wxResourceBuffer+1, 99); - - // = - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "=") != 0) - { - wxLogWarning(_("Expected '=' whilst parsing resource.")); - return FALSE; - } - - // String - if (!wxGetResourceToken(fd)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - else - { - if (!db.ReadPrologFromString(wxResourceBuffer)) - { - wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); - return FALSE; - } - } - // Semicolon - if (!wxGetResourceToken(fd)) - { - *eof = TRUE; - } - return TRUE; } /* - * Parses string window style into integer window style - */ +* Parses string window style into integer window style +*/ /* - * Style flag parsing, e.g. - * "wxSYSTEM_MENU | wxBORDER" -> integer - */ +* Style flag parsing, e.g. +* "wxSYSTEM_MENU | wxBORDER" -> integer +*/ wxChar* wxResourceParseWord(wxChar*s, int *i) { - if (!s) - return (wxChar*) NULL; - - static wxChar buf[150]; - int len = wxStrlen(s); - int j = 0; - int ii = *i; - while ((ii < len) && (wxIsalpha(s[ii]) || (s[ii] == wxT('_')))) - { - buf[j] = s[ii]; - j ++; - ii ++; - } - buf[j] = 0; - - // Eat whitespace and conjunction characters - while ((ii < len) && - ((s[ii] == wxT(' ')) || (s[ii] == wxT('|')) || (s[ii] == wxT(',')))) - { - ii ++; - } - *i = ii; - if (j == 0) - return (wxChar*) NULL; - else - return buf; + if (!s) + return (wxChar*) NULL; + + static wxChar buf[150]; + int len = wxStrlen(s); + int j = 0; + int ii = *i; + while ((ii < len) && (wxIsalpha(s[ii]) || (s[ii] == wxT('_')))) + { + buf[j] = s[ii]; + j ++; + ii ++; + } + buf[j] = 0; + + // Eat whitespace and conjunction characters + while ((ii < len) && + ((s[ii] == wxT(' ')) || (s[ii] == wxT('|')) || (s[ii] == wxT(',')))) + { + ii ++; + } + *i = ii; + if (j == 0) + return (wxChar*) NULL; + else + return buf; } struct wxResourceBitListStruct { - wxChar *word; - long bits; + wxChar *word; + long bits; }; static wxResourceBitListStruct wxResourceBitListTable[] = { - /* wxListBox */ - { wxT("wxSINGLE"), wxLB_SINGLE }, - { wxT("wxMULTIPLE"), wxLB_MULTIPLE }, - { wxT("wxEXTENDED"), wxLB_EXTENDED }, - { wxT("wxLB_SINGLE"), wxLB_SINGLE }, - { wxT("wxLB_MULTIPLE"), wxLB_MULTIPLE }, - { wxT("wxLB_EXTENDED"), wxLB_EXTENDED }, - { wxT("wxLB_NEEDED_SB"), wxLB_NEEDED_SB }, - { wxT("wxLB_ALWAYS_SB"), wxLB_ALWAYS_SB }, - { wxT("wxLB_SORT"), wxLB_SORT }, - { wxT("wxLB_OWNERDRAW"), wxLB_OWNERDRAW }, - { wxT("wxLB_HSCROLL"), wxLB_HSCROLL }, - - /* wxComboxBox */ - { wxT("wxCB_SIMPLE"), wxCB_SIMPLE }, - { wxT("wxCB_DROPDOWN"), wxCB_DROPDOWN }, - { wxT("wxCB_READONLY"), wxCB_READONLY }, - { wxT("wxCB_SORT"), wxCB_SORT }, - - /* wxGauge */ - { wxT("wxGA_PROGRESSBAR"), wxGA_PROGRESSBAR }, - { wxT("wxGA_HORIZONTAL"), wxGA_HORIZONTAL }, - { wxT("wxGA_VERTICAL"), wxGA_VERTICAL }, - - /* wxTextCtrl */ - { wxT("wxPASSWORD"), wxPASSWORD}, - { wxT("wxPROCESS_ENTER"), wxPROCESS_ENTER}, - { wxT("wxTE_PASSWORD"), wxTE_PASSWORD}, - { wxT("wxTE_READONLY"), wxTE_READONLY}, - { wxT("wxTE_PROCESS_ENTER"), wxTE_PROCESS_ENTER}, - { wxT("wxTE_MULTILINE"), wxTE_MULTILINE}, - { wxT("wxTE_NO_VSCROLL"), wxTE_NO_VSCROLL}, - - /* wxRadioBox/wxRadioButton */ - { wxT("wxRB_GROUP"), wxRB_GROUP }, - { wxT("wxRA_SPECIFY_COLS"), wxRA_SPECIFY_COLS }, - { wxT("wxRA_SPECIFY_ROWS"), wxRA_SPECIFY_ROWS }, - { wxT("wxRA_HORIZONTAL"), wxRA_HORIZONTAL }, - { wxT("wxRA_VERTICAL"), wxRA_VERTICAL }, - - /* wxSlider */ - { wxT("wxSL_HORIZONTAL"), wxSL_HORIZONTAL }, - { wxT("wxSL_VERTICAL"), wxSL_VERTICAL }, - { wxT("wxSL_AUTOTICKS"), wxSL_AUTOTICKS }, - { wxT("wxSL_LABELS"), wxSL_LABELS }, - { wxT("wxSL_LEFT"), wxSL_LEFT }, - { wxT("wxSL_TOP"), wxSL_TOP }, - { wxT("wxSL_RIGHT"), wxSL_RIGHT }, - { wxT("wxSL_BOTTOM"), wxSL_BOTTOM }, - { wxT("wxSL_BOTH"), wxSL_BOTH }, - { wxT("wxSL_SELRANGE"), wxSL_SELRANGE }, - - /* wxScrollBar */ - { wxT("wxSB_HORIZONTAL"), wxSB_HORIZONTAL }, - { wxT("wxSB_VERTICAL"), wxSB_VERTICAL }, - - /* wxButton */ - { wxT("wxBU_AUTODRAW"), wxBU_AUTODRAW }, - { wxT("wxBU_NOAUTODRAW"), wxBU_NOAUTODRAW }, - - /* wxTreeCtrl */ - { wxT("wxTR_HAS_BUTTONS"), wxTR_HAS_BUTTONS }, - { wxT("wxTR_EDIT_LABELS"), wxTR_EDIT_LABELS }, - { wxT("wxTR_LINES_AT_ROOT"), wxTR_LINES_AT_ROOT }, - - /* wxListCtrl */ - { wxT("wxLC_ICON"), wxLC_ICON }, - { wxT("wxLC_SMALL_ICON"), wxLC_SMALL_ICON }, - { wxT("wxLC_LIST"), wxLC_LIST }, - { wxT("wxLC_REPORT"), wxLC_REPORT }, - { wxT("wxLC_ALIGN_TOP"), wxLC_ALIGN_TOP }, - { wxT("wxLC_ALIGN_LEFT"), wxLC_ALIGN_LEFT }, - { wxT("wxLC_AUTOARRANGE"), wxLC_AUTOARRANGE }, - { wxT("wxLC_USER_TEXT"), wxLC_USER_TEXT }, - { wxT("wxLC_EDIT_LABELS"), wxLC_EDIT_LABELS }, - { wxT("wxLC_NO_HEADER"), wxLC_NO_HEADER }, - { wxT("wxLC_NO_SORT_HEADER"), wxLC_NO_SORT_HEADER }, - { wxT("wxLC_SINGLE_SEL"), wxLC_SINGLE_SEL }, - { wxT("wxLC_SORT_ASCENDING"), wxLC_SORT_ASCENDING }, - { wxT("wxLC_SORT_DESCENDING"), wxLC_SORT_DESCENDING }, - - /* wxSpinButton */ - { wxT("wxSP_VERTICAL"), wxSP_VERTICAL}, - { wxT("wxSP_HORIZONTAL"), wxSP_HORIZONTAL}, - { wxT("wxSP_ARROW_KEYS"), wxSP_ARROW_KEYS}, - { wxT("wxSP_WRAP"), wxSP_WRAP}, - - /* wxSplitterWnd */ - { wxT("wxSP_NOBORDER"), wxSP_NOBORDER}, - { wxT("wxSP_3D"), wxSP_3D}, - { wxT("wxSP_BORDER"), wxSP_BORDER}, - - /* wxTabCtrl */ - { wxT("wxTC_MULTILINE"), wxTC_MULTILINE}, - { wxT("wxTC_RIGHTJUSTIFY"), wxTC_RIGHTJUSTIFY}, - { wxT("wxTC_FIXEDWIDTH"), wxTC_FIXEDWIDTH}, - { wxT("wxTC_OWNERDRAW"), wxTC_OWNERDRAW}, - - /* wxStatusBar95 */ - { wxT("wxST_SIZEGRIP"), wxST_SIZEGRIP}, - - /* wxControl */ - { wxT("wxFIXED_LENGTH"), wxFIXED_LENGTH}, - { wxT("wxALIGN_LEFT"), wxALIGN_LEFT}, - { wxT("wxALIGN_CENTER"), wxALIGN_CENTER}, - { wxT("wxALIGN_CENTRE"), wxALIGN_CENTRE}, - { wxT("wxALIGN_RIGHT"), wxALIGN_RIGHT}, - { wxT("wxCOLOURED"), wxCOLOURED}, - - /* wxToolBar */ - { wxT("wxTB_3DBUTTONS"), wxTB_3DBUTTONS}, - { wxT("wxTB_HORIZONTAL"), wxTB_HORIZONTAL}, - { wxT("wxTB_VERTICAL"), wxTB_VERTICAL}, - { wxT("wxTB_FLAT"), wxTB_FLAT}, - - /* wxDialog */ - { wxT("wxDIALOG_MODAL"), wxDIALOG_MODAL }, - - /* Generic */ - { wxT("wxVSCROLL"), wxVSCROLL }, - { wxT("wxHSCROLL"), wxHSCROLL }, - { wxT("wxCAPTION"), wxCAPTION }, - { wxT("wxSTAY_ON_TOP"), wxSTAY_ON_TOP}, - { wxT("wxICONIZE"), wxICONIZE}, - { wxT("wxMINIMIZE"), wxICONIZE}, - { wxT("wxMAXIMIZE"), wxMAXIMIZE}, - { wxT("wxSDI"), 0}, - { wxT("wxMDI_PARENT"), 0}, - { wxT("wxMDI_CHILD"), 0}, - { wxT("wxTHICK_FRAME"), wxTHICK_FRAME}, - { wxT("wxRESIZE_BORDER"), wxRESIZE_BORDER}, - { wxT("wxSYSTEM_MENU"), wxSYSTEM_MENU}, - { wxT("wxMINIMIZE_BOX"), wxMINIMIZE_BOX}, - { wxT("wxMAXIMIZE_BOX"), wxMAXIMIZE_BOX}, - { wxT("wxRESIZE_BOX"), wxRESIZE_BOX}, - { wxT("wxDEFAULT_FRAME_STYLE"), wxDEFAULT_FRAME_STYLE}, - { wxT("wxDEFAULT_FRAME"), wxDEFAULT_FRAME_STYLE}, - { wxT("wxDEFAULT_DIALOG_STYLE"), wxDEFAULT_DIALOG_STYLE}, - { wxT("wxBORDER"), wxBORDER}, - { wxT("wxRETAINED"), wxRETAINED}, - { wxT("wxNATIVE_IMPL"), 0}, - { wxT("wxEXTENDED_IMPL"), 0}, - { wxT("wxBACKINGSTORE"), wxBACKINGSTORE}, -// { wxT("wxFLAT"), wxFLAT}, -// { wxT("wxMOTIF_RESIZE"), wxMOTIF_RESIZE}, - { wxT("wxFIXED_LENGTH"), 0}, - { wxT("wxDOUBLE_BORDER"), wxDOUBLE_BORDER}, - { wxT("wxSUNKEN_BORDER"), wxSUNKEN_BORDER}, - { wxT("wxRAISED_BORDER"), wxRAISED_BORDER}, - { wxT("wxSIMPLE_BORDER"), wxSIMPLE_BORDER}, - { wxT("wxSTATIC_BORDER"), wxSTATIC_BORDER}, - { wxT("wxTRANSPARENT_WINDOW"), wxTRANSPARENT_WINDOW}, - { wxT("wxNO_BORDER"), wxNO_BORDER}, - { wxT("wxCLIP_CHILDREN"), wxCLIP_CHILDREN}, - { wxT("wxTAB_TRAVERSAL"), 0}, // Compatibility only - - { wxT("wxTINY_CAPTION_HORIZ"), wxTINY_CAPTION_HORIZ}, - { wxT("wxTINY_CAPTION_VERT"), wxTINY_CAPTION_VERT}, - - // Text font families - { wxT("wxDEFAULT"), wxDEFAULT}, - { wxT("wxDECORATIVE"), wxDECORATIVE}, - { wxT("wxROMAN"), wxROMAN}, - { wxT("wxSCRIPT"), wxSCRIPT}, - { wxT("wxSWISS"), wxSWISS}, - { wxT("wxMODERN"), wxMODERN}, - { wxT("wxTELETYPE"), wxTELETYPE}, - { wxT("wxVARIABLE"), wxVARIABLE}, - { wxT("wxFIXED"), wxFIXED}, - { wxT("wxNORMAL"), wxNORMAL}, - { wxT("wxLIGHT"), wxLIGHT}, - { wxT("wxBOLD"), wxBOLD}, - { wxT("wxITALIC"), wxITALIC}, - { wxT("wxSLANT"), wxSLANT}, - { wxT("wxSOLID"), wxSOLID}, - { wxT("wxDOT"), wxDOT}, - { wxT("wxLONG_DASH"), wxLONG_DASH}, - { wxT("wxSHORT_DASH"), wxSHORT_DASH}, - { wxT("wxDOT_DASH"), wxDOT_DASH}, - { wxT("wxUSER_DASH"), wxUSER_DASH}, - { wxT("wxTRANSPARENT"), wxTRANSPARENT}, - { wxT("wxSTIPPLE"), wxSTIPPLE}, - { wxT("wxBDIAGONAL_HATCH"), wxBDIAGONAL_HATCH}, - { wxT("wxCROSSDIAG_HATCH"), wxCROSSDIAG_HATCH}, - { wxT("wxFDIAGONAL_HATCH"), wxFDIAGONAL_HATCH}, - { wxT("wxCROSS_HATCH"), wxCROSS_HATCH}, - { wxT("wxHORIZONTAL_HATCH"), wxHORIZONTAL_HATCH}, - { wxT("wxVERTICAL_HATCH"), wxVERTICAL_HATCH}, - { wxT("wxJOIN_BEVEL"), wxJOIN_BEVEL}, - { wxT("wxJOIN_MITER"), wxJOIN_MITER}, - { wxT("wxJOIN_ROUND"), wxJOIN_ROUND}, - { wxT("wxCAP_ROUND"), wxCAP_ROUND}, - { wxT("wxCAP_PROJECTING"), wxCAP_PROJECTING}, - { wxT("wxCAP_BUTT"), wxCAP_BUTT}, - - // Logical ops - { wxT("wxCLEAR"), wxCLEAR}, - { wxT("wxXOR"), wxXOR}, - { wxT("wxINVERT"), wxINVERT}, - { wxT("wxOR_REVERSE"), wxOR_REVERSE}, - { wxT("wxAND_REVERSE"), wxAND_REVERSE}, - { wxT("wxCOPY"), wxCOPY}, - { wxT("wxAND"), wxAND}, - { wxT("wxAND_INVERT"), wxAND_INVERT}, - { wxT("wxNO_OP"), wxNO_OP}, - { wxT("wxNOR"), wxNOR}, - { wxT("wxEQUIV"), wxEQUIV}, - { wxT("wxSRC_INVERT"), wxSRC_INVERT}, - { wxT("wxOR_INVERT"), wxOR_INVERT}, - { wxT("wxNAND"), wxNAND}, - { wxT("wxOR"), wxOR}, - { wxT("wxSET"), wxSET}, - - { wxT("wxFLOOD_SURFACE"), wxFLOOD_SURFACE}, - { wxT("wxFLOOD_BORDER"), wxFLOOD_BORDER}, - { wxT("wxODDEVEN_RULE"), wxODDEVEN_RULE}, - { wxT("wxWINDING_RULE"), wxWINDING_RULE}, - { wxT("wxHORIZONTAL"), wxHORIZONTAL}, - { wxT("wxVERTICAL"), wxVERTICAL}, - { wxT("wxBOTH"), wxBOTH}, - { wxT("wxCENTER_FRAME"), wxCENTER_FRAME}, - { wxT("wxOK"), wxOK}, - { wxT("wxYES_NO"), wxYES_NO}, - { wxT("wxCANCEL"), wxCANCEL}, - { wxT("wxYES"), wxYES}, - { wxT("wxNO"), wxNO}, - { wxT("wxICON_EXCLAMATION"), wxICON_EXCLAMATION}, - { wxT("wxICON_HAND"), wxICON_HAND}, - { wxT("wxICON_QUESTION"), wxICON_QUESTION}, - { wxT("wxICON_INFORMATION"), wxICON_INFORMATION}, - { wxT("wxICON_STOP"), wxICON_STOP}, - { wxT("wxICON_ASTERISK"), wxICON_ASTERISK}, - { wxT("wxICON_MASK"), wxICON_MASK}, - { wxT("wxCENTRE"), wxCENTRE}, - { wxT("wxCENTER"), wxCENTRE}, - { wxT("wxUSER_COLOURS"), wxUSER_COLOURS}, - { wxT("wxVERTICAL_LABEL"), 0}, - { wxT("wxHORIZONTAL_LABEL"), 0}, - - // Bitmap types (not strictly styles) - { wxT("wxBITMAP_TYPE_XPM"), wxBITMAP_TYPE_XPM}, - { wxT("wxBITMAP_TYPE_XBM"), wxBITMAP_TYPE_XBM}, - { wxT("wxBITMAP_TYPE_BMP"), wxBITMAP_TYPE_BMP}, - { wxT("wxBITMAP_TYPE_RESOURCE"), wxBITMAP_TYPE_BMP_RESOURCE}, - { wxT("wxBITMAP_TYPE_BMP_RESOURCE"), wxBITMAP_TYPE_BMP_RESOURCE}, - { wxT("wxBITMAP_TYPE_GIF"), wxBITMAP_TYPE_GIF}, - { wxT("wxBITMAP_TYPE_TIF"), wxBITMAP_TYPE_TIF}, - { wxT("wxBITMAP_TYPE_ICO"), wxBITMAP_TYPE_ICO}, - { wxT("wxBITMAP_TYPE_ICO_RESOURCE"), wxBITMAP_TYPE_ICO_RESOURCE}, - { wxT("wxBITMAP_TYPE_CUR"), wxBITMAP_TYPE_CUR}, - { wxT("wxBITMAP_TYPE_CUR_RESOURCE"), wxBITMAP_TYPE_CUR_RESOURCE}, - { wxT("wxBITMAP_TYPE_XBM_DATA"), wxBITMAP_TYPE_XBM_DATA}, - { wxT("wxBITMAP_TYPE_XPM_DATA"), wxBITMAP_TYPE_XPM_DATA}, - { wxT("wxBITMAP_TYPE_ANY"), wxBITMAP_TYPE_ANY} + /* wxListBox */ + { wxT("wxSINGLE"), wxLB_SINGLE }, + { wxT("wxMULTIPLE"), wxLB_MULTIPLE }, + { wxT("wxEXTENDED"), wxLB_EXTENDED }, + { wxT("wxLB_SINGLE"), wxLB_SINGLE }, + { wxT("wxLB_MULTIPLE"), wxLB_MULTIPLE }, + { wxT("wxLB_EXTENDED"), wxLB_EXTENDED }, + { wxT("wxLB_NEEDED_SB"), wxLB_NEEDED_SB }, + { wxT("wxLB_ALWAYS_SB"), wxLB_ALWAYS_SB }, + { wxT("wxLB_SORT"), wxLB_SORT }, + { wxT("wxLB_OWNERDRAW"), wxLB_OWNERDRAW }, + { wxT("wxLB_HSCROLL"), wxLB_HSCROLL }, + + /* wxComboxBox */ + { wxT("wxCB_SIMPLE"), wxCB_SIMPLE }, + { wxT("wxCB_DROPDOWN"), wxCB_DROPDOWN }, + { wxT("wxCB_READONLY"), wxCB_READONLY }, + { wxT("wxCB_SORT"), wxCB_SORT }, + + /* wxGauge */ + { wxT("wxGA_PROGRESSBAR"), wxGA_PROGRESSBAR }, + { wxT("wxGA_HORIZONTAL"), wxGA_HORIZONTAL }, + { wxT("wxGA_VERTICAL"), wxGA_VERTICAL }, + + /* wxTextCtrl */ + { wxT("wxPASSWORD"), wxPASSWORD}, + { wxT("wxPROCESS_ENTER"), wxPROCESS_ENTER}, + { wxT("wxTE_PASSWORD"), wxTE_PASSWORD}, + { wxT("wxTE_READONLY"), wxTE_READONLY}, + { wxT("wxTE_PROCESS_ENTER"), wxTE_PROCESS_ENTER}, + { wxT("wxTE_MULTILINE"), wxTE_MULTILINE}, + { wxT("wxTE_NO_VSCROLL"), wxTE_NO_VSCROLL}, + + /* wxRadioBox/wxRadioButton */ + { wxT("wxRB_GROUP"), wxRB_GROUP }, + { wxT("wxRA_SPECIFY_COLS"), wxRA_SPECIFY_COLS }, + { wxT("wxRA_SPECIFY_ROWS"), wxRA_SPECIFY_ROWS }, + { wxT("wxRA_HORIZONTAL"), wxRA_HORIZONTAL }, + { wxT("wxRA_VERTICAL"), wxRA_VERTICAL }, + + /* wxSlider */ + { wxT("wxSL_HORIZONTAL"), wxSL_HORIZONTAL }, + { wxT("wxSL_VERTICAL"), wxSL_VERTICAL }, + { wxT("wxSL_AUTOTICKS"), wxSL_AUTOTICKS }, + { wxT("wxSL_LABELS"), wxSL_LABELS }, + { wxT("wxSL_LEFT"), wxSL_LEFT }, + { wxT("wxSL_TOP"), wxSL_TOP }, + { wxT("wxSL_RIGHT"), wxSL_RIGHT }, + { wxT("wxSL_BOTTOM"), wxSL_BOTTOM }, + { wxT("wxSL_BOTH"), wxSL_BOTH }, + { wxT("wxSL_SELRANGE"), wxSL_SELRANGE }, + + /* wxScrollBar */ + { wxT("wxSB_HORIZONTAL"), wxSB_HORIZONTAL }, + { wxT("wxSB_VERTICAL"), wxSB_VERTICAL }, + + /* wxButton */ + { wxT("wxBU_AUTODRAW"), wxBU_AUTODRAW }, + { wxT("wxBU_NOAUTODRAW"), wxBU_NOAUTODRAW }, + + /* wxTreeCtrl */ + { wxT("wxTR_HAS_BUTTONS"), wxTR_HAS_BUTTONS }, + { wxT("wxTR_EDIT_LABELS"), wxTR_EDIT_LABELS }, + { wxT("wxTR_LINES_AT_ROOT"), wxTR_LINES_AT_ROOT }, + + /* wxListCtrl */ + { wxT("wxLC_ICON"), wxLC_ICON }, + { wxT("wxLC_SMALL_ICON"), wxLC_SMALL_ICON }, + { wxT("wxLC_LIST"), wxLC_LIST }, + { wxT("wxLC_REPORT"), wxLC_REPORT }, + { wxT("wxLC_ALIGN_TOP"), wxLC_ALIGN_TOP }, + { wxT("wxLC_ALIGN_LEFT"), wxLC_ALIGN_LEFT }, + { wxT("wxLC_AUTOARRANGE"), wxLC_AUTOARRANGE }, + { wxT("wxLC_USER_TEXT"), wxLC_USER_TEXT }, + { wxT("wxLC_EDIT_LABELS"), wxLC_EDIT_LABELS }, + { wxT("wxLC_NO_HEADER"), wxLC_NO_HEADER }, + { wxT("wxLC_NO_SORT_HEADER"), wxLC_NO_SORT_HEADER }, + { wxT("wxLC_SINGLE_SEL"), wxLC_SINGLE_SEL }, + { wxT("wxLC_SORT_ASCENDING"), wxLC_SORT_ASCENDING }, + { wxT("wxLC_SORT_DESCENDING"), wxLC_SORT_DESCENDING }, + + /* wxSpinButton */ + { wxT("wxSP_VERTICAL"), wxSP_VERTICAL}, + { wxT("wxSP_HORIZONTAL"), wxSP_HORIZONTAL}, + { wxT("wxSP_ARROW_KEYS"), wxSP_ARROW_KEYS}, + { wxT("wxSP_WRAP"), wxSP_WRAP}, + + /* wxSplitterWnd */ + { wxT("wxSP_NOBORDER"), wxSP_NOBORDER}, + { wxT("wxSP_3D"), wxSP_3D}, + { wxT("wxSP_BORDER"), wxSP_BORDER}, + + /* wxTabCtrl */ + { wxT("wxTC_MULTILINE"), wxTC_MULTILINE}, + { wxT("wxTC_RIGHTJUSTIFY"), wxTC_RIGHTJUSTIFY}, + { wxT("wxTC_FIXEDWIDTH"), wxTC_FIXEDWIDTH}, + { wxT("wxTC_OWNERDRAW"), wxTC_OWNERDRAW}, + + /* wxStatusBar95 */ + { wxT("wxST_SIZEGRIP"), wxST_SIZEGRIP}, + + /* wxControl */ + { wxT("wxFIXED_LENGTH"), wxFIXED_LENGTH}, + { wxT("wxALIGN_LEFT"), wxALIGN_LEFT}, + { wxT("wxALIGN_CENTER"), wxALIGN_CENTER}, + { wxT("wxALIGN_CENTRE"), wxALIGN_CENTRE}, + { wxT("wxALIGN_RIGHT"), wxALIGN_RIGHT}, + { wxT("wxCOLOURED"), wxCOLOURED}, + + /* wxToolBar */ + { wxT("wxTB_3DBUTTONS"), wxTB_3DBUTTONS}, + { wxT("wxTB_HORIZONTAL"), wxTB_HORIZONTAL}, + { wxT("wxTB_VERTICAL"), wxTB_VERTICAL}, + { wxT("wxTB_FLAT"), wxTB_FLAT}, + + /* wxDialog */ + { wxT("wxDIALOG_MODAL"), wxDIALOG_MODAL }, + + /* Generic */ + { wxT("wxVSCROLL"), wxVSCROLL }, + { wxT("wxHSCROLL"), wxHSCROLL }, + { wxT("wxCAPTION"), wxCAPTION }, + { wxT("wxSTAY_ON_TOP"), wxSTAY_ON_TOP}, + { wxT("wxICONIZE"), wxICONIZE}, + { wxT("wxMINIMIZE"), wxICONIZE}, + { wxT("wxMAXIMIZE"), wxMAXIMIZE}, + { wxT("wxSDI"), 0}, + { wxT("wxMDI_PARENT"), 0}, + { wxT("wxMDI_CHILD"), 0}, + { wxT("wxTHICK_FRAME"), wxTHICK_FRAME}, + { wxT("wxRESIZE_BORDER"), wxRESIZE_BORDER}, + { wxT("wxSYSTEM_MENU"), wxSYSTEM_MENU}, + { wxT("wxMINIMIZE_BOX"), wxMINIMIZE_BOX}, + { wxT("wxMAXIMIZE_BOX"), wxMAXIMIZE_BOX}, + { wxT("wxRESIZE_BOX"), wxRESIZE_BOX}, + { wxT("wxDEFAULT_FRAME_STYLE"), wxDEFAULT_FRAME_STYLE}, + { wxT("wxDEFAULT_FRAME"), wxDEFAULT_FRAME_STYLE}, + { wxT("wxDEFAULT_DIALOG_STYLE"), wxDEFAULT_DIALOG_STYLE}, + { wxT("wxBORDER"), wxBORDER}, + { wxT("wxRETAINED"), wxRETAINED}, + { wxT("wxNATIVE_IMPL"), 0}, + { wxT("wxEXTENDED_IMPL"), 0}, + { wxT("wxBACKINGSTORE"), wxBACKINGSTORE}, + // { wxT("wxFLAT"), wxFLAT}, + // { wxT("wxMOTIF_RESIZE"), wxMOTIF_RESIZE}, + { wxT("wxFIXED_LENGTH"), 0}, + { wxT("wxDOUBLE_BORDER"), wxDOUBLE_BORDER}, + { wxT("wxSUNKEN_BORDER"), wxSUNKEN_BORDER}, + { wxT("wxRAISED_BORDER"), wxRAISED_BORDER}, + { wxT("wxSIMPLE_BORDER"), wxSIMPLE_BORDER}, + { wxT("wxSTATIC_BORDER"), wxSTATIC_BORDER}, + { wxT("wxTRANSPARENT_WINDOW"), wxTRANSPARENT_WINDOW}, + { wxT("wxNO_BORDER"), wxNO_BORDER}, + { wxT("wxCLIP_CHILDREN"), wxCLIP_CHILDREN}, + { wxT("wxTAB_TRAVERSAL"), 0}, // Compatibility only + + { wxT("wxTINY_CAPTION_HORIZ"), wxTINY_CAPTION_HORIZ}, + { wxT("wxTINY_CAPTION_VERT"), wxTINY_CAPTION_VERT}, + + // Text font families + { wxT("wxDEFAULT"), wxDEFAULT}, + { wxT("wxDECORATIVE"), wxDECORATIVE}, + { wxT("wxROMAN"), wxROMAN}, + { wxT("wxSCRIPT"), wxSCRIPT}, + { wxT("wxSWISS"), wxSWISS}, + { wxT("wxMODERN"), wxMODERN}, + { wxT("wxTELETYPE"), wxTELETYPE}, + { wxT("wxVARIABLE"), wxVARIABLE}, + { wxT("wxFIXED"), wxFIXED}, + { wxT("wxNORMAL"), wxNORMAL}, + { wxT("wxLIGHT"), wxLIGHT}, + { wxT("wxBOLD"), wxBOLD}, + { wxT("wxITALIC"), wxITALIC}, + { wxT("wxSLANT"), wxSLANT}, + { wxT("wxSOLID"), wxSOLID}, + { wxT("wxDOT"), wxDOT}, + { wxT("wxLONG_DASH"), wxLONG_DASH}, + { wxT("wxSHORT_DASH"), wxSHORT_DASH}, + { wxT("wxDOT_DASH"), wxDOT_DASH}, + { wxT("wxUSER_DASH"), wxUSER_DASH}, + { wxT("wxTRANSPARENT"), wxTRANSPARENT}, + { wxT("wxSTIPPLE"), wxSTIPPLE}, + { wxT("wxBDIAGONAL_HATCH"), wxBDIAGONAL_HATCH}, + { wxT("wxCROSSDIAG_HATCH"), wxCROSSDIAG_HATCH}, + { wxT("wxFDIAGONAL_HATCH"), wxFDIAGONAL_HATCH}, + { wxT("wxCROSS_HATCH"), wxCROSS_HATCH}, + { wxT("wxHORIZONTAL_HATCH"), wxHORIZONTAL_HATCH}, + { wxT("wxVERTICAL_HATCH"), wxVERTICAL_HATCH}, + { wxT("wxJOIN_BEVEL"), wxJOIN_BEVEL}, + { wxT("wxJOIN_MITER"), wxJOIN_MITER}, + { wxT("wxJOIN_ROUND"), wxJOIN_ROUND}, + { wxT("wxCAP_ROUND"), wxCAP_ROUND}, + { wxT("wxCAP_PROJECTING"), wxCAP_PROJECTING}, + { wxT("wxCAP_BUTT"), wxCAP_BUTT}, + + // Logical ops + { wxT("wxCLEAR"), wxCLEAR}, + { wxT("wxXOR"), wxXOR}, + { wxT("wxINVERT"), wxINVERT}, + { wxT("wxOR_REVERSE"), wxOR_REVERSE}, + { wxT("wxAND_REVERSE"), wxAND_REVERSE}, + { wxT("wxCOPY"), wxCOPY}, + { wxT("wxAND"), wxAND}, + { wxT("wxAND_INVERT"), wxAND_INVERT}, + { wxT("wxNO_OP"), wxNO_OP}, + { wxT("wxNOR"), wxNOR}, + { wxT("wxEQUIV"), wxEQUIV}, + { wxT("wxSRC_INVERT"), wxSRC_INVERT}, + { wxT("wxOR_INVERT"), wxOR_INVERT}, + { wxT("wxNAND"), wxNAND}, + { wxT("wxOR"), wxOR}, + { wxT("wxSET"), wxSET}, + + { wxT("wxFLOOD_SURFACE"), wxFLOOD_SURFACE}, + { wxT("wxFLOOD_BORDER"), wxFLOOD_BORDER}, + { wxT("wxODDEVEN_RULE"), wxODDEVEN_RULE}, + { wxT("wxWINDING_RULE"), wxWINDING_RULE}, + { wxT("wxHORIZONTAL"), wxHORIZONTAL}, + { wxT("wxVERTICAL"), wxVERTICAL}, + { wxT("wxBOTH"), wxBOTH}, + { wxT("wxCENTER_FRAME"), wxCENTER_FRAME}, + { wxT("wxOK"), wxOK}, + { wxT("wxYES_NO"), wxYES_NO}, + { wxT("wxCANCEL"), wxCANCEL}, + { wxT("wxYES"), wxYES}, + { wxT("wxNO"), wxNO}, + { wxT("wxICON_EXCLAMATION"), wxICON_EXCLAMATION}, + { wxT("wxICON_HAND"), wxICON_HAND}, + { wxT("wxICON_QUESTION"), wxICON_QUESTION}, + { wxT("wxICON_INFORMATION"), wxICON_INFORMATION}, + { wxT("wxICON_STOP"), wxICON_STOP}, + { wxT("wxICON_ASTERISK"), wxICON_ASTERISK}, + { wxT("wxICON_MASK"), wxICON_MASK}, + { wxT("wxCENTRE"), wxCENTRE}, + { wxT("wxCENTER"), wxCENTRE}, + { wxT("wxUSER_COLOURS"), wxUSER_COLOURS}, + { wxT("wxVERTICAL_LABEL"), 0}, + { wxT("wxHORIZONTAL_LABEL"), 0}, + + // Bitmap types (not strictly styles) + { wxT("wxBITMAP_TYPE_XPM"), wxBITMAP_TYPE_XPM}, + { wxT("wxBITMAP_TYPE_XBM"), wxBITMAP_TYPE_XBM}, + { wxT("wxBITMAP_TYPE_BMP"), wxBITMAP_TYPE_BMP}, + { wxT("wxBITMAP_TYPE_RESOURCE"), wxBITMAP_TYPE_BMP_RESOURCE}, + { wxT("wxBITMAP_TYPE_BMP_RESOURCE"), wxBITMAP_TYPE_BMP_RESOURCE}, + { wxT("wxBITMAP_TYPE_GIF"), wxBITMAP_TYPE_GIF}, + { wxT("wxBITMAP_TYPE_TIF"), wxBITMAP_TYPE_TIF}, + { wxT("wxBITMAP_TYPE_ICO"), wxBITMAP_TYPE_ICO}, + { wxT("wxBITMAP_TYPE_ICO_RESOURCE"), wxBITMAP_TYPE_ICO_RESOURCE}, + { wxT("wxBITMAP_TYPE_CUR"), wxBITMAP_TYPE_CUR}, + { wxT("wxBITMAP_TYPE_CUR_RESOURCE"), wxBITMAP_TYPE_CUR_RESOURCE}, + { wxT("wxBITMAP_TYPE_XBM_DATA"), wxBITMAP_TYPE_XBM_DATA}, + { wxT("wxBITMAP_TYPE_XPM_DATA"), wxBITMAP_TYPE_XPM_DATA}, + { wxT("wxBITMAP_TYPE_ANY"), wxBITMAP_TYPE_ANY} }; static int wxResourceBitListCount = (sizeof(wxResourceBitListTable)/sizeof(wxResourceBitListStruct)); long wxParseWindowStyle(const wxString& bitListString) { - int i = 0; - wxChar *word; - long bitList = 0; - word = wxResourceParseWord(WXSTRINGCAST bitListString, &i); - while (word != NULL) - { - bool found = FALSE; - int j; - for (j = 0; j < wxResourceBitListCount; j++) - if (wxStrcmp(wxResourceBitListTable[j].word, word) == 0) - { - bitList |= wxResourceBitListTable[j].bits; - found = TRUE; - break; - } - if (!found) - { - wxLogWarning(_("Unrecognized style %s whilst parsing resource."), word); - return 0; - } + int i = 0; + wxChar *word; + long bitList = 0; word = wxResourceParseWord(WXSTRINGCAST bitListString, &i); - } - return bitList; + while (word != NULL) + { + bool found = FALSE; + int j; + for (j = 0; j < wxResourceBitListCount; j++) + if (wxStrcmp(wxResourceBitListTable[j].word, word) == 0) + { + bitList |= wxResourceBitListTable[j].bits; + found = TRUE; + break; + } + if (!found) + { + wxLogWarning(_("Unrecognized style %s whilst parsing resource."), word); + return 0; + } + word = wxResourceParseWord(WXSTRINGCAST bitListString, &i); + } + return bitList; } /* - * Load a bitmap from a wxWindows resource, choosing an optimum - * depth and appropriate type. - */ +* Load a bitmap from a wxWindows resource, choosing an optimum +* depth and appropriate type. +*/ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *item = table->FindResource(resource); - if (item) - { - if ((item->GetType() == wxT("")) || (item->GetType() != wxT("wxBitmap"))) + if (!table) + table = wxDefaultResourceTable; + + wxItemResource *item = table->FindResource(resource); + if (item) { - wxLogWarning(_("%s not a bitmap resource specification."), (const wxChar*) resource); - return wxNullBitmap; - } - int thisDepth = wxDisplayDepth(); - long thisNoColours = (long)pow(2.0, (double)thisDepth); - - wxItemResource *optResource = (wxItemResource *) NULL; - - // Try to find optimum bitmap for this platform/colour depth - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - int platform = (int)child->GetValue2(); - int noColours = (int)child->GetValue3(); -/* - char *name = child->GetName(); - int bitmapType = (int)child->GetValue1(); - int xRes = child->GetWidth(); - int yRes = child->GetHeight(); -*/ - - switch (platform) - { - case RESOURCE_PLATFORM_ANY: + if ((item->GetType() == wxT("")) || (item->GetType() != wxT("wxBitmap"))) { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours. - // If noColours is zero (unspecified), then assume this - // is the right one. - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; + wxLogWarning(_("%s not a bitmap resource specification."), (const wxChar*) resource); + return wxNullBitmap; } + int thisDepth = wxDisplayDepth(); + long thisNoColours = (long)pow(2.0, (double)thisDepth); + + wxItemResource *optResource = (wxItemResource *) NULL; + + // Try to find optimum bitmap for this platform/colour depth + wxNode *node = item->GetChildren().First(); + while (node) + { + wxItemResource *child = (wxItemResource *)node->Data(); + int platform = (int)child->GetValue2(); + int noColours = (int)child->GetValue3(); + /* + char *name = child->GetName(); + int bitmapType = (int)child->GetValue1(); + int xRes = child->GetWidth(); + int yRes = child->GetHeight(); + */ + + switch (platform) + { + case RESOURCE_PLATFORM_ANY: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours. + // If noColours is zero (unspecified), then assume this + // is the right one. + if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #ifdef __WXMSW__ - case RESOURCE_PLATFORM_WINDOWS: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours > 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } + case RESOURCE_PLATFORM_WINDOWS: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours + if ((noColours > 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #endif #ifdef __WXGTK__ - case RESOURCE_PLATFORM_X: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } + case RESOURCE_PLATFORM_X: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours + if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #endif #ifdef wx_max - case RESOURCE_PLATFORM_MAC: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } + case RESOURCE_PLATFORM_MAC: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours + if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #endif - default: - break; - } - node = node->Next(); - } - // If no matching resource, fail. - if (!optResource) - return wxNullBitmap; - - wxString name = optResource->GetName(); - int bitmapType = (int)optResource->GetValue1(); - switch (bitmapType) - { - case wxBITMAP_TYPE_XBM_DATA: - { + default: + break; + } + node = node->Next(); + } + // If no matching resource, fail. + if (!optResource) + return wxNullBitmap; + + wxString name = optResource->GetName(); + int bitmapType = (int)optResource->GetValue1(); + switch (bitmapType) + { + case wxBITMAP_TYPE_XBM_DATA: + { #ifdef __WXGTK__ - wxItemResource *item = table->FindResource(name); - if (!item) - { - wxLogWarning(_("Failed to find XBM resource %s.\n" - "Forgot to use wxResourceLoadBitmapData?"), (const wxChar*) name); - return wxNullBitmap; - } - return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ; + wxItemResource *item = table->FindResource(name); + if (!item) + { + wxLogWarning(_("Failed to find XBM resource %s.\n" + "Forgot to use wxResourceLoadBitmapData?"), (const wxChar*) name); + return wxNullBitmap; + } + return wxBitmap(item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()) ; #else - wxLogWarning(_("No XBM facility available!")); - break; + wxLogWarning(_("No XBM facility available!")); + break; #endif - } - case wxBITMAP_TYPE_XPM_DATA: - { + } + case wxBITMAP_TYPE_XPM_DATA: + { #if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW) - wxItemResource *item = table->FindResource(name); - if (!item) - { - wxLogWarning(_("Failed to find XPM resource %s.\n" - "Forgot to use wxResourceLoadBitmapData?"), (const wxChar*) name); - return wxNullBitmap; - } - return wxBitmap((char **)item->GetValue1()); + wxItemResource *item = table->FindResource(name); + if (!item) + { + wxLogWarning(_("Failed to find XPM resource %s.\nForgot to use wxResourceLoadBitmapData?"), (const wxChar*) name); + return wxNullBitmap; + } + return wxBitmap((char **)item->GetValue1()); #else - wxLogWarning(_("No XPM facility available!")); - break; + wxLogWarning(_("No XPM facility available!")); + break; #endif - } - default: - { - return wxBitmap(name, bitmapType); - } - } + } + default: + { + return wxBitmap(name, bitmapType); + } + } #ifndef __WXGTK__ - return wxNullBitmap; + return wxNullBitmap; #endif } else { - wxLogWarning(_("Bitmap resource specification %s not found."), (const wxChar*) resource); - return wxNullBitmap; + wxLogWarning(_("Bitmap resource specification %s not found."), (const wxChar*) resource); + return wxNullBitmap; } } /* - * Load an icon from a wxWindows resource, choosing an optimum - * depth and appropriate type. - */ +* Load an icon from a wxWindows resource, choosing an optimum +* depth and appropriate type. +*/ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *item = table->FindResource(resource); - if (item) - { - if ((item->GetType() == wxT("")) || wxStrcmp(item->GetType(), wxT("wxIcon")) != 0) + if (!table) + table = wxDefaultResourceTable; + + wxItemResource *item = table->FindResource(resource); + if (item) { - wxLogWarning(_("%s not an icon resource specification."), (const wxChar*) resource); - return wxNullIcon; - } - int thisDepth = wxDisplayDepth(); - long thisNoColours = (long)pow(2.0, (double)thisDepth); - - wxItemResource *optResource = (wxItemResource *) NULL; - - // Try to find optimum icon for this platform/colour depth - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - int platform = (int)child->GetValue2(); - int noColours = (int)child->GetValue3(); -/* - char *name = child->GetName(); - int bitmapType = (int)child->GetValue1(); - int xRes = child->GetWidth(); - int yRes = child->GetHeight(); -*/ - - switch (platform) - { - case RESOURCE_PLATFORM_ANY: + if ((item->GetType() == wxT("")) || wxStrcmp(item->GetType(), wxT("wxIcon")) != 0) { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours. - // If noColours is zero (unspecified), then assume this - // is the right one. - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; + wxLogWarning(_("%s not an icon resource specification."), (const wxChar*) resource); + return wxNullIcon; } + int thisDepth = wxDisplayDepth(); + long thisNoColours = (long)pow(2.0, (double)thisDepth); + + wxItemResource *optResource = (wxItemResource *) NULL; + + // Try to find optimum icon for this platform/colour depth + wxNode *node = item->GetChildren().First(); + while (node) + { + wxItemResource *child = (wxItemResource *)node->Data(); + int platform = (int)child->GetValue2(); + int noColours = (int)child->GetValue3(); + /* + char *name = child->GetName(); + int bitmapType = (int)child->GetValue1(); + int xRes = child->GetWidth(); + int yRes = child->GetHeight(); + */ + + switch (platform) + { + case RESOURCE_PLATFORM_ANY: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours. + // If noColours is zero (unspecified), then assume this + // is the right one. + if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #ifdef __WXMSW__ - case RESOURCE_PLATFORM_WINDOWS: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours > 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } + case RESOURCE_PLATFORM_WINDOWS: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours + if ((noColours > 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #endif #ifdef __WXGTK__ - case RESOURCE_PLATFORM_X: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } + case RESOURCE_PLATFORM_X: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours + if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #endif #ifdef wx_max - case RESOURCE_PLATFORM_MAC: - { - if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) - optResource = child; - else - { - // Maximise the number of colours - if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) - optResource = child; - } - break; - } + case RESOURCE_PLATFORM_MAC: + { + if (!optResource && ((noColours == 0) || (noColours <= thisNoColours))) + optResource = child; + else + { + // Maximise the number of colours + if ((noColours == 0) || ((noColours <= thisNoColours) && (noColours > optResource->GetValue3()))) + optResource = child; + } + break; + } #endif + default: + break; + } + node = node->Next(); + } + // If no matching resource, fail. + if (!optResource) + return wxNullIcon; + + wxString name = optResource->GetName(); + int bitmapType = (int)optResource->GetValue1(); + switch (bitmapType) + { + case wxBITMAP_TYPE_XBM_DATA: + { +#ifdef __WXGTK__ + wxItemResource *item = table->FindResource(name); + if (!item) + { + wxLogWarning(_("Failed to find XBM resource %s.\n" + "Forgot to use wxResourceLoadIconData?"), (const wxChar*) name); + return wxNullIcon; + } + return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); +#else + wxLogWarning(_("No XBM facility available!")); + break; +#endif + } + case wxBITMAP_TYPE_XPM_DATA: + { + // *** XPM ICON NOT YET IMPLEMENTED IN WXWINDOWS *** + /* + #if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW) + wxItemResource *item = table->FindResource(name); + if (!item) + { + char buf[400]; + sprintf(buf, _("Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?"), name); + wxLogWarning(buf); + return NULL; + } + return wxIcon((char **)item->GetValue1()); + #else + wxLogWarning(_("No XPM facility available!")); + #endif + */ + wxLogWarning(_("No XPM icon facility available!")); + break; + } default: - break; - } - node = node->Next(); - } - // If no matching resource, fail. - if (!optResource) - return wxNullIcon; - - wxString name = optResource->GetName(); - int bitmapType = (int)optResource->GetValue1(); - switch (bitmapType) - { - case wxBITMAP_TYPE_XBM_DATA: - { + { #ifdef __WXGTK__ - wxItemResource *item = table->FindResource(name); - if (!item) - { - wxLogWarning(_("Failed to find XBM resource %s.\n" - "Forgot to use wxResourceLoadIconData?"), (const wxChar*) name); - return wxNullIcon; + wxLogWarning(_("Icon resource specification %s not found."), (const wxChar*) resource); +#else + return wxIcon(name, bitmapType); +#endif + break; + } } - return wxIcon((const char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); -#else - wxLogWarning(_("No XBM facility available!")); - break; -#endif - } - case wxBITMAP_TYPE_XPM_DATA: - { - // *** XPM ICON NOT YET IMPLEMENTED IN WXWINDOWS *** -/* -#if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW) - wxItemResource *item = table->FindResource(name); - if (!item) - { - char buf[400]; - sprintf(buf, _("Failed to find XPM resource %s.\nForgot to use wxResourceLoadIconData?"), name); - wxLogWarning(buf); - return NULL; - } - return wxIcon((char **)item->GetValue1()); -#else - wxLogWarning(_("No XPM facility available!")); -#endif -*/ - wxLogWarning(_("No XPM icon facility available!")); - break; - } - default: - { -#ifdef __WXGTK__ - wxLogWarning(_("Icon resource specification %s not found."), (const wxChar*) resource); -#else - return wxIcon(name, bitmapType); -#endif - break; - } - } - return wxNullIcon; + return wxNullIcon; } else { - wxLogWarning(_("Icon resource specification %s not found."), (const wxChar*) resource); - return wxNullIcon; + wxLogWarning(_("Icon resource specification %s not found."), (const wxChar*) resource); + return wxNullIcon; } } wxMenu *wxResourceCreateMenu(wxItemResource *item) { - wxMenu *menu = new wxMenu; - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - if ((child->GetType() != wxT("")) && (child->GetType() == wxT("wxMenuSeparator"))) - menu->AppendSeparator(); - else if (child->GetChildren().Number() > 0) + wxMenu *menu = new wxMenu; + wxNode *node = item->GetChildren().First(); + while (node) { - wxMenu *subMenu = wxResourceCreateMenu(child); - if (subMenu) - menu->Append((int)child->GetValue1(), child->GetTitle(), subMenu, child->GetValue4()); + wxItemResource *child = (wxItemResource *)node->Data(); + if ((child->GetType() != wxT("")) && (child->GetType() == wxT("wxMenuSeparator"))) + menu->AppendSeparator(); + else if (child->GetChildren().Number() > 0) + { + wxMenu *subMenu = wxResourceCreateMenu(child); + if (subMenu) + menu->Append((int)child->GetValue1(), child->GetTitle(), subMenu, child->GetValue4()); + } + else + { + menu->Append((int)child->GetValue1(), child->GetTitle(), child->GetValue4(), (child->GetValue2() != 0)); + } + node = node->Next(); } - else - { - menu->Append((int)child->GetValue1(), child->GetTitle(), child->GetValue4(), (child->GetValue2() != 0)); - } - node = node->Next(); - } - return menu; + return menu; } wxMenuBar *wxResourceCreateMenuBar(const wxString& resource, wxResourceTable *table, wxMenuBar *menuBar) { - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *menuResource = table->FindResource(resource); - if (menuResource && (menuResource->GetType() != wxT("")) && (menuResource->GetType() == wxT("wxMenu"))) - { - if (!menuBar) - menuBar = new wxMenuBar; - wxNode *node = menuResource->GetChildren().First(); - while (node) + if (!table) + table = wxDefaultResourceTable; + + wxItemResource *menuResource = table->FindResource(resource); + if (menuResource && (menuResource->GetType() != wxT("")) && (menuResource->GetType() == wxT("wxMenu"))) { - wxItemResource *child = (wxItemResource *)node->Data(); - wxMenu *menu = wxResourceCreateMenu(child); - if (menu) - menuBar->Append(menu, child->GetTitle()); - node = node->Next(); + if (!menuBar) + menuBar = new wxMenuBar; + wxNode *node = menuResource->GetChildren().First(); + while (node) + { + wxItemResource *child = (wxItemResource *)node->Data(); + wxMenu *menu = wxResourceCreateMenu(child); + if (menu) + menuBar->Append(menu, child->GetTitle()); + node = node->Next(); + } + return menuBar; } - return menuBar; - } - return (wxMenuBar *) NULL; + return (wxMenuBar *) NULL; } wxMenu *wxResourceCreateMenu(const wxString& resource, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *menuResource = table->FindResource(resource); - if (menuResource && (menuResource->GetType() != wxT("")) && (menuResource->GetType() == wxT("wxMenu"))) -// if (menuResource && (menuResource->GetType() == wxTYPE_MENU)) - return wxResourceCreateMenu(menuResource); - return (wxMenu *) NULL; + if (!table) + table = wxDefaultResourceTable; + + wxItemResource *menuResource = table->FindResource(resource); + if (menuResource && (menuResource->GetType() != wxT("")) && (menuResource->GetType() == wxT("wxMenu"))) + // if (menuResource && (menuResource->GetType() == wxTYPE_MENU)) + return wxResourceCreateMenu(menuResource); + return (wxMenu *) NULL; } // Global equivalents (so don't have to refer to default table explicitly) bool wxResourceParseData(const wxString& resource, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - return table->ParseResourceData(resource); + if (!table) + table = wxDefaultResourceTable; + + return table->ParseResourceData(resource); } bool wxResourceParseFile(const wxString& filename, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - return table->ParseResourceFile(filename); + if (!table) + table = wxDefaultResourceTable; + + return table->ParseResourceFile(filename); } // Register XBM/XPM data bool wxResourceRegisterBitmapData(const wxString& name, char bits[], int width, int height, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - return table->RegisterResourceBitmapData(name, bits, width, height); + if (!table) + table = wxDefaultResourceTable; + + return table->RegisterResourceBitmapData(name, bits, width, height); } bool wxResourceRegisterBitmapData(const wxString& name, char **data, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - return table->RegisterResourceBitmapData(name, data); + if (!table) + table = wxDefaultResourceTable; + + return table->RegisterResourceBitmapData(name, data); } void wxResourceClear(wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - table->ClearTable(); + if (!table) + table = wxDefaultResourceTable; + + table->ClearTable(); } /* - * Identifiers - */ +* Identifiers +*/ bool wxResourceAddIdentifier(const wxString& name, int value, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - table->identifiers.Put(name, (wxObject *)(long)value); - return TRUE; + if (!table) + table = wxDefaultResourceTable; + + table->identifiers.Put(name, (wxObject *)(long)value); + return TRUE; } int wxResourceGetIdentifier(const wxString& name, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - return (int)(long)table->identifiers.Get(name); + if (!table) + table = wxDefaultResourceTable; + + return (int)(long)table->identifiers.Get(name); } /* - * Parse #include file for #defines (only) - */ +* Parse #include file for #defines (only) +*/ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - FILE *fd = fopen(f.fn_str(), "r"); - if (!fd) - { - return FALSE; - } - while (wxGetResourceToken(fd)) - { - if (strcmp(wxResourceBuffer, "#define") == 0) + if (!table) + table = wxDefaultResourceTable; + + FILE *fd = wxFopen(f, _T("r")); + if (!fd) { - wxGetResourceToken(fd); - wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); - wxGetResourceToken(fd); - wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); - if (wxIsdigit(value[0])) - { - int val = (int)wxAtol(value); - wxResourceAddIdentifier(name, val, table); - } - delete[] name; - delete[] value; + return FALSE; } - } - fclose(fd); - return TRUE; + while (wxGetResourceToken(fd)) + { + if (strcmp(wxResourceBuffer, "#define") == 0) + { + wxGetResourceToken(fd); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); + wxGetResourceToken(fd); + wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); + if (wxIsdigit(value[0])) + { + int val = (int)wxAtol(value); + wxResourceAddIdentifier(name, val, table); + } + delete[] name; + delete[] value; + } + } + fclose(fd); + return TRUE; } /* - * Reading strings as if they were .wxr files - */ +* Reading strings as if they were .wxr files +*/ static int getc_string(char *s) { - int ch = s[wxResourceStringPtr]; - if (ch == 0) - return EOF; - else - { - wxResourceStringPtr ++; - return ch; - } + int ch = s[wxResourceStringPtr]; + if (ch == 0) + return EOF; + else + { + wxResourceStringPtr ++; + return ch; + } } static int ungetc_string() { - wxResourceStringPtr --; - return 0; + wxResourceStringPtr --; + return 0; } bool wxEatWhiteSpaceString(char *s) { - int ch = 0; - - while ((ch = getc_string(s)) != EOF) - { - switch (ch) - { - case ' ': - case 0x0a: - case 0x0d: - case 0x09: + int ch = 0; + + while ((ch = getc_string(s)) != EOF) + { + switch (ch) + { + case ' ': + case 0x0a: + case 0x0d: + case 0x09: break; - case '/': + case '/': { - int prev_ch = ch; - ch = getc_string(s); - if (ch == EOF) - { - ungetc_string(); - return TRUE; - } - - if (ch == '*') - { - // Eat C comment - prev_ch = 0; - while ((ch = getc_string(s)) != EOF) - { - if (ch == '/' && prev_ch == '*') - break; - prev_ch = ch; - } - } - else - { - ungetc_string(); - ungetc_string(); - return TRUE; - } + int prev_ch = ch; + ch = getc_string(s); + if (ch == EOF) + { + ungetc_string(); + return TRUE; + } + + if (ch == '*') + { + // Eat C comment + prev_ch = 0; + while ((ch = getc_string(s)) != EOF) + { + if (ch == '/' && prev_ch == '*') + break; + prev_ch = ch; + } + } + else + { + ungetc_string(); + ungetc_string(); + return TRUE; + } } break; - default: + default: ungetc_string(); return TRUE; - - } - } - return FALSE; + + } + } + return FALSE; } bool wxGetResourceTokenString(char *s) { - if (!wxResourceBuffer) - wxReallocateResourceBuffer(); - wxResourceBuffer[0] = 0; - wxEatWhiteSpaceString(s); - - int ch = getc_string(s); - if (ch == '"') - { - // Get string - wxResourceBufferCount = 0; - ch = getc_string(s); - while (ch != '"') + if (!wxResourceBuffer) + wxReallocateResourceBuffer(); + wxResourceBuffer[0] = 0; + wxEatWhiteSpaceString(s); + + int ch = getc_string(s); + if (ch == '"') { - int actualCh = ch; - if (ch == EOF) - { - wxResourceBuffer[wxResourceBufferCount] = 0; - return FALSE; - } - // Escaped characters - else if (ch == '\\') - { - int newCh = getc_string(s); - if (newCh == '"') - actualCh = '"'; - else if (newCh == 10) - actualCh = 10; - else + // Get string + wxResourceBufferCount = 0; + ch = getc_string(s); + while (ch != '"') { - ungetc_string(); + int actualCh = ch; + if (ch == EOF) + { + wxResourceBuffer[wxResourceBufferCount] = 0; + return FALSE; + } + // Escaped characters + else if (ch == '\\') + { + int newCh = getc_string(s); + if (newCh == '"') + actualCh = '"'; + else if (newCh == 10) + actualCh = 10; + else + { + ungetc_string(); + } + } + + if (wxResourceBufferCount >= wxResourceBufferSize-1) + wxReallocateResourceBuffer(); + wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; + wxResourceBufferCount ++; + ch = getc_string(s); } - } - - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)actualCh; - wxResourceBufferCount ++; - ch = getc_string(s); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - } - else - { - wxResourceBufferCount = 0; - // Any other token - while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) - { - if (wxResourceBufferCount >= wxResourceBufferSize-1) - wxReallocateResourceBuffer(); - wxResourceBuffer[wxResourceBufferCount] = (char)ch; - wxResourceBufferCount ++; - - ch = getc_string(s); - } - wxResourceBuffer[wxResourceBufferCount] = 0; - if (ch == EOF) - return FALSE; - } - return TRUE; -} - -/* - * Files are in form: - static char *name = "...."; - with possible comments. - */ - -bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxResourceTable *table) -{ - if (!table) - table = wxDefaultResourceTable; - - // static or #define - if (!wxGetResourceTokenString(s)) - { - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "#define") == 0) - { - wxGetResourceTokenString(s); - wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); - wxGetResourceTokenString(s); - wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); - if (wxIsdigit(value[0])) - { - int val = (int)wxAtol(value); - wxResourceAddIdentifier(name, val, table); + wxResourceBuffer[wxResourceBufferCount] = 0; } else { - wxLogWarning(_("#define %s must be an integer."), name); - delete[] name; - delete[] value; - return FALSE; + wxResourceBufferCount = 0; + // Any other token + while (ch != ' ' && ch != EOF && ch != ' ' && ch != 13 && ch != 9 && ch != 10) + { + if (wxResourceBufferCount >= wxResourceBufferSize-1) + wxReallocateResourceBuffer(); + wxResourceBuffer[wxResourceBufferCount] = (char)ch; + wxResourceBufferCount ++; + + ch = getc_string(s); + } + wxResourceBuffer[wxResourceBufferCount] = 0; + if (ch == EOF) + return FALSE; } - delete[] name; - delete[] value; - return TRUE; - } +} + /* - else if (strcmp(wxResourceBuffer, "#include") == 0) - { +* Files are in form: +static char *name = "...."; +with possible comments. +*/ + +bool wxResourceReadOneResourceString(char *s, wxExprDatabase& db, bool *eof, wxResourceTable *table) +{ + if (!table) + table = wxDefaultResourceTable; + + // static or #define + if (!wxGetResourceTokenString(s)) + { + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "#define") == 0) + { + wxGetResourceTokenString(s); + wxChar *name = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); + wxGetResourceTokenString(s); + wxChar *value = copystring(wxConvCurrent->cMB2WX(wxResourceBuffer)); + if (wxIsdigit(value[0])) + { + int val = (int)wxAtol(value); + wxResourceAddIdentifier(name, val, table); + } + else + { + wxLogWarning(_("#define %s must be an integer."), name); + delete[] name; + delete[] value; + return FALSE; + } + delete[] name; + delete[] value; + + return TRUE; + } + /* + else if (strcmp(wxResourceBuffer, "#include") == 0) + { wxGetResourceTokenString(s); char *name = copystring(wxResourceBuffer); char *actualName = name; if (name[0] == '"') - actualName = name + 1; + actualName = name + 1; int len = strlen(name); if ((len > 0) && (name[len-1] == '"')) - name[len-1] = 0; + name[len-1] = 0; if (!wxResourceParseIncludeFile(actualName, table)) { - char buf[400]; - sprintf(buf, _("Could not find resource include file %s."), actualName); - wxLogWarning(buf); + char buf[400]; + sprintf(buf, _("Could not find resource include file %s."), actualName); + wxLogWarning(buf); } delete[] name; return TRUE; - } -*/ - else if (strcmp(wxResourceBuffer, "static") != 0) - { - wxChar buf[300]; - wxStrcpy(buf, _("Found ")); - wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30); - wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); - wxLogWarning(buf); - return FALSE; - } - - // char - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "char") != 0) - { - wxLogWarning(_("Expected 'char' whilst parsing resource.")); - return FALSE; - } - - // *name - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (wxResourceBuffer[0] != '*') - { - wxLogWarning(_("Expected '*' whilst parsing resource.")); - return FALSE; - } - wxChar nameBuf[100]; - wxMB2WX(nameBuf, wxResourceBuffer+1, 99); - nameBuf[99] = 0; - - // = - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - - if (strcmp(wxResourceBuffer, "=") != 0) - { - wxLogWarning(_("Expected '=' whilst parsing resource.")); - return FALSE; - } - - // String - if (!wxGetResourceTokenString(s)) - { - wxLogWarning(_("Unexpected end of file whilst parsing resource.")); - *eof = TRUE; - return FALSE; - } - else - { - if (!db.ReadPrologFromString(wxResourceBuffer)) - { - wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); - return FALSE; } - } - // Semicolon - if (!wxGetResourceTokenString(s)) - { - *eof = TRUE; - } - return TRUE; + */ + else if (strcmp(wxResourceBuffer, "static") != 0) + { + wxChar buf[300]; + wxStrcpy(buf, _("Found ")); + wxStrncat(buf, wxConvCurrent->cMB2WX(wxResourceBuffer), 30); + wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource.")); + wxLogWarning(buf); + return FALSE; + } + + // char + if (!wxGetResourceTokenString(s)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "char") != 0) + { + wxLogWarning(_("Expected 'char' whilst parsing resource.")); + return FALSE; + } + + // *name + if (!wxGetResourceTokenString(s)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (wxResourceBuffer[0] != '*') + { + wxLogWarning(_("Expected '*' whilst parsing resource.")); + return FALSE; + } + wxChar nameBuf[100]; + wxMB2WX(nameBuf, wxResourceBuffer+1, 99); + nameBuf[99] = 0; + + // = + if (!wxGetResourceTokenString(s)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + + if (strcmp(wxResourceBuffer, "=") != 0) + { + wxLogWarning(_("Expected '=' whilst parsing resource.")); + return FALSE; + } + + // String + if (!wxGetResourceTokenString(s)) + { + wxLogWarning(_("Unexpected end of file whilst parsing resource.")); + *eof = TRUE; + return FALSE; + } + else + { + if (!db.ReadPrologFromString(wxResourceBuffer)) + { + wxLogWarning(_("%s: ill-formed resource file syntax."), nameBuf); + return FALSE; + } + } + // Semicolon + if (!wxGetResourceTokenString(s)) + { + *eof = TRUE; + } + return TRUE; } bool wxResourceParseString(char *s, wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - if (!s) - return FALSE; - - // Turn backslashes into spaces - if (s) - { - int len = strlen(s); - int i; - for (i = 0; i < len; i++) - if (s[i] == 92 && s[i+1] == 13) - { - s[i] = ' '; - s[i+1] = ' '; - } - } - - wxExprDatabase db; - wxResourceStringPtr = 0; - - bool eof = FALSE; - while (wxResourceReadOneResourceString(s, db, &eof, table) && !eof) - { - // Loop - } - return wxResourceInterpretResources(*table, db); + if (!table) + table = wxDefaultResourceTable; + + if (!s) + return FALSE; + + // Turn backslashes into spaces + if (s) + { + int len = strlen(s); + int i; + for (i = 0; i < len; i++) + if (s[i] == 92 && s[i+1] == 13) + { + s[i] = ' '; + s[i+1] = ' '; + } + } + + wxExprDatabase db; + wxResourceStringPtr = 0; + + bool eof = FALSE; + while (wxResourceReadOneResourceString(s, db, &eof, table) && !eof) + { + // Loop + } + return wxResourceInterpretResources(*table, db); } /* - * resource loading facility - */ +* resource loading facility +*/ bool wxWindowBase::LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - - wxItemResource *resource = table->FindResource((const wxChar *)resourceName); -// if (!resource || (resource->GetType() != wxTYPE_DIALOG_BOX)) - if (!resource || (resource->GetType() == wxT("")) || - ! ((resource->GetType() == wxT("wxDialog")) || (resource->GetType() == wxT("wxPanel")))) - return FALSE; - - wxString title(resource->GetTitle()); - long theWindowStyle = resource->GetStyle(); - bool isModal = (resource->GetValue1() != 0); - int x = resource->GetX(); - int y = resource->GetY(); - int width = resource->GetWidth(); - int height = resource->GetHeight(); - wxString name = resource->GetName(); - - if (IsKindOf(CLASSINFO(wxDialog))) - { - wxDialog *dialogBox = (wxDialog *)this; - long modalStyle = isModal ? wxDIALOG_MODAL : 0; - if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name)) - return FALSE; - - // Only reset the client size if we know we're not going to do it again below. - if ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == 0) - dialogBox->SetClientSize(width, height); - } - else if (IsKindOf(CLASSINFO(wxPanel))) - { - wxPanel* panel = (wxPanel *)this; - if (!panel->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle | wxTAB_TRAVERSAL, name)) - return FALSE; - } - else - { - if (!((wxWindow *)this)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name)) - return FALSE; - } - - if ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0) - { - // No need to do this since it's done in wxPanel or wxDialog constructor. - // SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); - } - else - { - if (resource->GetFont().Ok()) - SetFont(resource->GetFont()); - if (resource->GetBackgroundColour().Ok()) - SetBackgroundColour(resource->GetBackgroundColour()); - } - - // Should have some kind of font at this point - if (!GetFont().Ok()) - SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); - if (!GetBackgroundColour().Ok()) - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - - // Only when we've created the window and set the font can we set the correct size, - // if based on dialog units. - if ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) - { - wxSize sz = ConvertDialogToPixels(wxSize(width, height)); - SetClientSize(sz.x, sz.y); - - wxPoint pt = ConvertDialogToPixels(wxPoint(x, y)); - Move(pt.x, pt.y); - } - - // Now create children - wxNode *node = resource->GetChildren().First(); - while (node) - { - wxItemResource *childResource = (wxItemResource *)node->Data(); - - (void) CreateItem(childResource, resource, table); - - node = node->Next(); - } - return TRUE; + if (!table) + table = wxDefaultResourceTable; + + wxItemResource *resource = table->FindResource((const wxChar *)resourceName); + // if (!resource || (resource->GetType() != wxTYPE_DIALOG_BOX)) + if (!resource || (resource->GetType() == wxT("")) || + ! ((resource->GetType() == wxT("wxDialog")) || (resource->GetType() == wxT("wxPanel")))) + return FALSE; + + wxString title(resource->GetTitle()); + long theWindowStyle = resource->GetStyle(); + bool isModal = (resource->GetValue1() != 0) ; + int x = resource->GetX(); + int y = resource->GetY(); + int width = resource->GetWidth(); + int height = resource->GetHeight(); + wxString name = resource->GetName(); + + if (IsKindOf(CLASSINFO(wxDialog))) + { + wxDialog *dialogBox = (wxDialog *)this; + long modalStyle = isModal ? wxDIALOG_MODAL : 0; + if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name)) + return FALSE; + + // Only reset the client size if we know we're not going to do it again below. + if ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == 0) + dialogBox->SetClientSize(width, height); + } + else if (IsKindOf(CLASSINFO(wxPanel))) + { + wxPanel* panel = (wxPanel *)this; + if (!panel->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle | wxTAB_TRAVERSAL, name)) + return FALSE; + } + else + { + if (!((wxWindow *)this)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name)) + return FALSE; + } + + if ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0) + { + // No need to do this since it's done in wxPanel or wxDialog constructor. + // SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + } + else + { + if (resource->GetFont().Ok()) + SetFont(resource->GetFont()); + if (resource->GetBackgroundColour().Ok()) + SetBackgroundColour(resource->GetBackgroundColour()); + } + + // Should have some kind of font at this point + if (!GetFont().Ok()) + SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + if (!GetBackgroundColour().Ok()) + SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); + + // Only when we've created the window and set the font can we set the correct size, + // if based on dialog units. + if ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) + { + wxSize sz = ConvertDialogToPixels(wxSize(width, height)); + SetClientSize(sz.x, sz.y); + + wxPoint pt = ConvertDialogToPixels(wxPoint(x, y)); + Move(pt.x, pt.y); + } + + // Now create children + wxNode *node = resource->GetChildren().First(); + while (node) + { + wxItemResource *childResource = (wxItemResource *)node->Data(); + + (void) CreateItem(childResource, resource, table); + + node = node->Next(); + } + return TRUE; } wxControl *wxWindowBase::CreateItem(const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table) { - if (!table) - table = wxDefaultResourceTable; - return table->CreateItem((wxWindow *)this, resource, parentResource); + if (!table) + table = wxDefaultResourceTable; + return table->CreateItem((wxWindow *)this, resource, parentResource); } #ifdef __VISUALC__ - #pragma warning(default:4706) // assignment within conditional expression +#pragma warning(default:4706) // assignment within conditional expression #endif // VC++ #endif - // BC++/Win16 +// BC++/Win16 #endif // wxUSE_WX_RESOURCES diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index 8131c0427a..7924cee54f 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -108,7 +108,7 @@ bool wxIPV4address::Hostname(const wxString& name) return FALSE; } - return (GAddress_INET_SetHostName(m_address, name.fn_str()) == GSOCK_NOERROR); + return (GAddress_INET_SetHostName(m_address, name.mb_str()) == GSOCK_NOERROR); } bool wxIPV4address::Hostname(unsigned long addr) @@ -118,7 +118,7 @@ bool wxIPV4address::Hostname(unsigned long addr) bool wxIPV4address::Service(const wxString& name) { - return (GAddress_INET_SetPortName(m_address, name.fn_str(), "tcp") == GSOCK_NOERROR); + return (GAddress_INET_SetPortName(m_address, name.mb_str(), "tcp") == GSOCK_NOERROR); } bool wxIPV4address::Service(unsigned short port) diff --git a/src/common/sckfile.cpp b/src/common/sckfile.cpp index 220f95294c..e48f33693f 100644 --- a/src/common/sckfile.cpp +++ b/src/common/sckfile.cpp @@ -23,6 +23,8 @@ #include "wx/defs.h" #endif +#if wxUSE_STREAMS + #include #include "wx/wfstream.h" #include "wx/protocol/file.h" @@ -44,3 +46,5 @@ wxInputStream *wxFileProto::GetInputStream(const wxString& path) return new wxFileInputStream(path); } +#endif + diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index 16406abe08..3fea37e1ec 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -36,7 +36,7 @@ #include "wx/defs.h" #endif -#if wxUSE_SOCKETS && wxUSE_IPC +#if wxUSE_SOCKETS && wxUSE_IPC && wxUSE_STREAMS #include #include @@ -200,28 +200,49 @@ wxConnectionBase *wxTCPClient::OnMakeConnection() wxTCPServer::wxTCPServer () : wxServerBase() { + m_server = NULL; } -bool wxTCPServer::Create(const wxString& server_name) +bool wxTCPServer::Create(const wxString& serverName) { - wxSocketServer *server; + // Destroy previous server, if any + if (m_server) + { + m_server->SetClientData(NULL); + m_server->Destroy(); + m_server = NULL; + } // wxIPV4address defaults to INADDR_ANY:0 wxIPV4address addr; - addr.Service(server_name); + addr.Service(serverName); - // Create a socket listening on specified port - server = new wxSocketServer(addr, SCKIPC_FLAGS); - server->SetEventHandler(*gs_handler, _SERVER_ONREQUEST_ID); - server->SetClientData(this); - server->SetNotify(wxSOCKET_CONNECTION_FLAG); - server->Notify(TRUE); + // Create a socket listening on the specified port + m_server = new wxSocketServer(addr, SCKIPC_FLAGS); + + if (!m_server->Ok()) + { + m_server->Destroy(); + m_server = NULL; + + return FALSE; + } + + m_server->SetEventHandler(*gs_handler, _SERVER_ONREQUEST_ID); + m_server->SetClientData(this); + m_server->SetNotify(wxSOCKET_CONNECTION_FLAG); + m_server->Notify(TRUE); return TRUE; } wxTCPServer::~wxTCPServer() { + if (m_server) + { + m_server->SetClientData(NULL); + m_server->Destroy(); + } } wxConnectionBase *wxTCPServer::OnAcceptConnection( const wxString& WXUNUSED(topic) ) @@ -284,7 +305,7 @@ bool wxTCPConnection::Execute(const wxChar *data, int size, wxIPCFormat format) m_codeco->Write8(format); if (size < 0) - size = strlen(data) + 1; // includes final NUL + size = wxStrlen(data) + 1; // includes final NUL m_codeco->Write32(size); m_sockstrm->Write(data, size); @@ -332,7 +353,7 @@ bool wxTCPConnection::Poke (const wxString& item, wxChar *data, int size, wxIPCF m_codeco->Write8(format); if (size < 0) - size = strlen(data) + 1; // includes final NUL + size = wxStrlen(data) + 1; // includes final NUL m_codeco->Write32(size); m_sockstrm->Write(data, size); @@ -388,7 +409,7 @@ bool wxTCPConnection::Advise (const wxString& item, m_codeco->Write8(format); if (size < 0) - size = strlen(data) + 1; // includes final NUL + size = wxStrlen(data) + 1; // includes final NUL m_codeco->Write32(size); m_sockstrm->Write(data, size); @@ -555,7 +576,7 @@ void wxTCPEventHandler::Client_OnRequest(wxSocketEvent &event) void wxTCPEventHandler::Server_OnRequest(wxSocketEvent &event) { wxSocketServer *server = (wxSocketServer *) event.GetSocket(); - wxTCPServer *ipcserv = (wxTCPServer *) event.GetClientData(); + wxTCPServer *ipcserv = (wxTCPServer *) server->GetClientData(); // This socket is being deleted; skip this event if (!ipcserv) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 1acfd70e61..dd539aef67 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -29,6 +29,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxSizerItem, wxObject); IMPLEMENT_ABSTRACT_CLASS(wxSizer, wxObject); +IMPLEMENT_ABSTRACT_CLASS(wxGridSizer, wxSizer); +IMPLEMENT_ABSTRACT_CLASS(wxFlexGridSizer, wxGridSizer); IMPLEMENT_ABSTRACT_CLASS(wxBoxSizer, wxSizer); IMPLEMENT_ABSTRACT_CLASS(wxStaticBoxSizer, wxBoxSizer); #if wxUSE_NOTEBOOK @@ -130,7 +132,7 @@ wxSize wxSizerItem::CalcMin() wxSize ret; if (IsSizer()) { - ret = m_sizer->CalcMin(); + ret = m_sizer->GetMinSize(); // if we have to preserve aspect ratio _AND_ this is // the first-time calculation, consider ret to be initial size if ((m_flag & wxSHAPED) && !m_ratio) SetRatio(ret); @@ -161,6 +163,38 @@ wxSize wxSizerItem::CalcMin() void wxSizerItem::SetDimension( wxPoint pos, wxSize size ) { + if (m_flag & wxSHAPED) + { + // adjust aspect ratio + int rwidth = (int) (size.y * m_ratio); + if (rwidth > size.x) + { + // fit horizontally + int rheight = (int) (size.x / m_ratio); + // add vertical space + if (m_flag & wxALIGN_CENTER_VERTICAL) + pos.y += (size.y - rheight) / 2; + else if (m_flag & wxALIGN_BOTTOM) + pos.y += (size.y - rheight); + // use reduced dimensions + size.y =rheight; + } + else if (rwidth < size.x) + { + // add horizontal space + if (m_flag & wxALIGN_CENTER_HORIZONTAL) + pos.x += (size.x - rwidth) / 2; + else if (m_flag & wxALIGN_RIGHT) + pos.x += (size.x - rwidth); + size.x = rwidth; + } + } + + // This is what GetPosition() returns. Since we calculate + // borders afterwards, GetPosition() will be the left/top + // corner of the surrounding border. + m_pos = pos; + if (m_flag & wxWEST) { pos.x += m_border; @@ -179,28 +213,6 @@ void wxSizerItem::SetDimension( wxPoint pos, wxSize size ) { size.y -= m_border; } - if (m_flag & wxSHAPED) { - // adjust aspect ratio - int rwidth = (int) (size.y * m_ratio); - if (rwidth > size.x) { - // fit horizontally - int rheight = (int) (size.x / m_ratio); - // add vertical space - if (m_flag & wxALIGN_CENTER_VERTICAL) - pos.y += (size.y - rheight) / 2; - else if (m_flag & wxALIGN_BOTTOM) - pos.y += (size.y - rheight); - // use reduced dimensions - size.y =rheight; - } else if (rwidth < size.x) { - // add horizontal space - if (m_flag & wxALIGN_CENTER_HORIZONTAL) - pos.x += (size.x - rwidth) / 2; - else if (m_flag & wxALIGN_RIGHT) - pos.x += (size.x - rwidth); - size.x = rwidth; - } - } if (IsSizer()) m_sizer->SetDimension( pos.x, pos.y, size.x, size.y ); @@ -233,6 +245,8 @@ bool wxSizerItem::IsSpacer() wxSizer::wxSizer() { m_children.DeleteContents( TRUE ); + m_minSize.x = 0; + m_minSize.y = 0; } wxSizer::~wxSizer() @@ -292,11 +306,11 @@ bool wxSizer::Remove( wxWindow *window ) while (node) { wxSizerItem *item = (wxSizerItem*)node->Data(); - if (item->GetWindow() == window) - { + if (item->GetWindow() == window) + { m_children.DeleteNode( node ); - return TRUE; - } + return TRUE; + } node = node->Next(); } @@ -311,11 +325,11 @@ bool wxSizer::Remove( wxSizer *sizer ) while (node) { wxSizerItem *item = (wxSizerItem*)node->Data(); - if (item->GetSizer() == sizer) - { + if (item->GetSizer() == sizer) + { m_children.DeleteNode( node ); - return TRUE; - } + return TRUE; + } node = node->Next(); } @@ -368,6 +382,416 @@ void wxSizer::SetDimension( int x, int y, int width, int height ) RecalcSizes(); } +wxSize wxSizer::GetMinSize() +{ + wxSize ret( CalcMin() ); + if (ret.x < m_minSize.x) ret.x = m_minSize.x; + if (ret.y < m_minSize.y) ret.y = m_minSize.y; + return ret; +} + +void wxSizer::DoSetMinSize( int width, int height ) +{ + m_minSize.x = width; + m_minSize.y = height; +} + +bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height ) +{ + wxASSERT( window ); + + wxNode *node = m_children.First(); + while (node) + { + wxSizerItem *item = (wxSizerItem*)node->Data(); + if (item->GetWindow() == window) + { + item->SetInitSize( width, height ); + return TRUE; + } + node = node->Next(); + } + + node = m_children.First(); + while (node) + { + wxSizerItem *item = (wxSizerItem*)node->Data(); + if (item->GetSizer()) + { + /* It's a sizer, so lets search recursively. */ + if (item->GetSizer()->DoSetItemMinSize( window, width, height )) + { + /* A child sizer found the requested windw, exit. */ + return TRUE; + } + } + node = node->Next(); + } + + return FALSE; +} + +bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height ) +{ + wxASSERT( sizer ); + + wxNode *node = m_children.First(); + while (node) + { + wxSizerItem *item = (wxSizerItem*)node->Data(); + if (item->GetSizer() == sizer) + { + item->GetSizer()->DoSetMinSize( width, height ); + return TRUE; + } + node = node->Next(); + } + + node = m_children.First(); + while (node) + { + wxSizerItem *item = (wxSizerItem*)node->Data(); + if (item->GetSizer()) + { + /* It's a sizer, so lets search recursively. */ + if (item->GetSizer()->DoSetItemMinSize( sizer, width, height )) + { + /* A child sizer found the requested windw, exit. */ + return TRUE; + } + } + node = node->Next(); + } + + return FALSE; +} + +bool wxSizer::DoSetItemMinSize( int pos, int width, int height ) +{ + wxNode *node = m_children.Nth( pos ); + if (!node) return FALSE; + + wxSizerItem *item = (wxSizerItem*) node->Data(); + if (item->GetSizer()) + { + /* Sizers contains the minimal size in them, if not calculated ... */ + item->GetSizer()->DoSetMinSize( width, height ); + } + else + { + /* ... whereas the minimal size of spacers and windows in stored + in the item */ + item->SetInitSize( width, height ); + } + + return TRUE; +} + +//--------------------------------------------------------------------------- +// wxGridSizer +//--------------------------------------------------------------------------- + +wxGridSizer::wxGridSizer( int rows, int cols, int vgap, int hgap ) +{ + m_rows = rows; + m_cols = cols; + m_vgap = vgap; + m_hgap = hgap; +} + +wxGridSizer::wxGridSizer( int cols, int vgap, int hgap ) +{ + m_rows = 0; + m_cols = cols; + m_vgap = vgap; + m_hgap = hgap; +} + +void wxGridSizer::RecalcSizes() +{ + if (m_children.GetCount() == 0) + return; + + int nitems = m_children.GetCount(); + int nrows = m_rows; + int ncols = m_cols; + + if (ncols > 0) + nrows = (nitems + ncols-1) / ncols; + else + ncols = (nitems + nrows-1) / nrows; + + wxSize sz( GetSize() ); + wxPoint pt( GetPosition() ); + + int w = (sz.x - (ncols - 1) * m_hgap) / ncols; + int h = (sz.y - (nrows - 1) * m_vgap) / nrows; + + int x = pt.x; + for (int c = 0; c < ncols; c++) + { + int y = pt.y; + for (int r = 0; r < nrows; r++) + { + int i = r * ncols + c; + if (i < nitems) + { + wxNode *node = m_children.Nth( i ); + wxASSERT( node ); + + SetItemBounds( (wxSizerItem*) node->Data(), x, y, w, h); + } + y = y + h + m_vgap; + } + x = x + w + m_hgap; + } +} + +wxSize wxGridSizer::CalcMin() +{ + if (m_children.GetCount() == 0) + return wxSize(10,10); + + int nitems = m_children.GetCount(); + int nrows = m_rows; + int ncols = m_cols; + + if (ncols > 0) + nrows = (nitems + ncols-1) / ncols; + else + ncols = (nitems + nrows-1) / nrows; + + /* Find the max width and height for any component */ + int w = 0; + int h = 0; + + wxNode *node = m_children.First(); + while (node) + { + wxSizerItem *item = (wxSizerItem*)node->Data(); + wxSize sz( item->CalcMin() ); + w = wxMax( w, sz.x ); + h = wxMax( h, sz.y ); + + node = node->Next(); + } + + return wxSize(ncols * w + (ncols-1) * m_hgap, + nrows * h + (nrows-1) * m_vgap); +} + +void wxGridSizer::SetItemBounds( wxSizerItem *item, int x, int y, int w, int h ) +{ + wxPoint pt( x,y ); + wxSize sz( item->CalcMin() ); + int flag = item->GetFlag(); + + if ((flag & wxEXPAND) || (flag & wxSHAPED)) + { + sz = wxSize(w, h); + } + else + { + if (flag & wxALIGN_CENTER_HORIZONTAL) + { + pt.x = x + (w - sz.x) / 2; + } + else if (flag & wxALIGN_RIGHT) + { + pt.x = x + (w - sz.x); + } + + if (flag & wxALIGN_CENTER_VERTICAL) + { + pt.y = y + (h - sz.y) / 2; + } + else if (flag & wxALIGN_BOTTOM) + { + pt.y = y + (h - sz.y); + } + } + + item->SetDimension(pt, sz); +} + +//--------------------------------------------------------------------------- +// wxFlexGridSizer +//--------------------------------------------------------------------------- + +wxFlexGridSizer::wxFlexGridSizer( int rows, int cols, int vgap, int hgap ) + : wxGridSizer( rows, cols, vgap, hgap ) +{ + m_rowHeights = (int*) NULL; + m_colWidths = (int*) NULL; +} + +wxFlexGridSizer::wxFlexGridSizer( int cols, int vgap, int hgap ) + : wxGridSizer( cols, vgap, hgap ) +{ + m_rowHeights = (int*) NULL; + m_colWidths = (int*) NULL; +} + +wxFlexGridSizer::~wxFlexGridSizer() +{ + if (m_rowHeights) + delete[] m_rowHeights; + if (m_colWidths) + delete[] m_colWidths; +} + +void wxFlexGridSizer::CreateArrays() +{ + if (m_rowHeights) + delete[] m_rowHeights; + if (m_colWidths) + delete[] m_colWidths; + + if (m_children.GetCount() == 0) + return; + + int nitems = m_children.GetCount(); + int nrows = m_rows; + int ncols = m_cols; + + if (ncols > 0) + nrows = (nitems + ncols-1) / ncols; + else + ncols = (nitems + nrows-1) / nrows; + + m_rowHeights = new int[nrows]; + m_colWidths = new int[ncols]; + + for (int col = 0; col < ncols; col++) + m_colWidths[ col ] = 0; + for (int row = 0; row < nrows; row++) + m_rowHeights[ row ] = 0; +} + +void wxFlexGridSizer::RecalcSizes() +{ + if (m_children.GetCount() == 0) + return; + + int nitems = m_children.GetCount(); + int nrows = m_rows; + int ncols = m_cols; + + if (ncols > 0) + nrows = (nitems + ncols-1) / ncols; + else + ncols = (nitems + nrows-1) / nrows; + + wxSize sz( GetSize() ); + wxSize minsz( CalcMin() ); + wxPoint pt( GetPosition() ); + int delta; + size_t idx; + + if ((m_growableRows.GetCount() > 0) && (sz.y > minsz.y)) + { + delta = (sz.y - minsz.y) / m_growableRows.GetCount(); + for (idx = 0; idx < m_growableRows.GetCount(); idx++) + m_rowHeights[ m_growableRows[idx] ] += delta; + } + + if ((m_growableCols.GetCount() > 0) && (sz.x > minsz.x)) + { + delta = (sz.x - minsz.x) / m_growableCols.GetCount(); + for (idx = 0; idx < m_growableCols.GetCount(); idx++) + m_colWidths[ m_growableCols[idx] ] += delta; + } + + sz = wxSize( pt.x + sz.x, pt.y + sz.y ); + + int x = pt.x; + for (int c = 0; c < ncols; c++) + { + int y = pt.y; + for (int r = 0; r < nrows; r++) + { + int i = r * ncols + c; + if (i < nitems) + { + wxNode *node = m_children.Nth( i ); + wxASSERT( node ); + + int w = wxMax( 0, wxMin( m_colWidths[c], sz.x - x ) ); + int h = wxMax( 0, wxMin( m_rowHeights[r], sz.y - y ) ); + + SetItemBounds( (wxSizerItem*) node->Data(), x, y, w, h); + } + y = y + m_rowHeights[r] + m_vgap; + } + x = x + m_colWidths[c] + m_hgap; + } +} + +wxSize wxFlexGridSizer::CalcMin() +{ + if (m_children.GetCount() == 0) + return wxSize(10,10); + + int nitems = m_children.GetCount(); + int nrows = m_rows; + int ncols = m_cols; + + if (ncols > 0) + nrows = (nitems + ncols-1) / ncols; + else + ncols = (nitems + nrows-1) / nrows; + + CreateArrays(); + + int col; + int row; + + int i = 0; + wxNode *node = m_children.First(); + while (node) + { + wxSizerItem *item = (wxSizerItem*)node->Data(); + wxSize sz( item->CalcMin() ); + row = i / ncols; + col = i % ncols; + m_rowHeights[ row ] = wxMax( sz.y, m_rowHeights[ row ] ); + + m_colWidths[ col ] = wxMax( sz.x, m_colWidths[ col ] ); + + node = node->Next(); + i++; + } + + int width = 0; + for (col = 0; col < ncols; col++) + width += m_colWidths[ col ]; + + int height = 0; + for (row = 0; row < nrows; row++) + height += m_rowHeights[ row ]; + + return wxSize( width + (ncols-1) * m_hgap, + height + (nrows-1) * m_vgap); +} + +void wxFlexGridSizer::AddGrowableRow( size_t idx ) +{ + m_growableRows.Add( idx ); +} + +void wxFlexGridSizer::RemoveGrowableRow( size_t WXUNUSED(idx) ) +{ +} + +void wxFlexGridSizer::AddGrowableCol( size_t idx ) +{ + m_growableCols.Add( idx ); +} + +void wxFlexGridSizer::RemoveGrowableCol( size_t WXUNUSED(idx) ) +{ +} + //--------------------------------------------------------------------------- // wxBoxSizer //--------------------------------------------------------------------------- @@ -390,12 +814,12 @@ void wxBoxSizer::RecalcSizes() { delta = (m_size.x - m_fixedWidth) / m_stretchable; extra = (m_size.x - m_fixedWidth) % m_stretchable; - } - else - { + } + else + { delta = (m_size.y - m_fixedHeight) / m_stretchable; extra = (m_size.y - m_fixedHeight) % m_stretchable; - } + } } wxPoint pt( m_position ); @@ -405,64 +829,64 @@ void wxBoxSizer::RecalcSizes() { wxSizerItem *item = (wxSizerItem*) node->Data(); - int weight = 1; - if (item->GetOption()) - weight = item->GetOption(); + int weight = 1; + if (item->GetOption()) + weight = item->GetOption(); - wxSize size( item->CalcMin() ); + wxSize size( item->CalcMin() ); - if (m_orient == wxVERTICAL) - { - wxCoord height = size.y; - if (item->GetOption()) - { - height = (delta * weight) + extra; - extra = 0; // only the first item will get the remainder as extra size - } + if (m_orient == wxVERTICAL) + { + wxCoord height = size.y; + if (item->GetOption()) + { + height = (delta * weight) + extra; + extra = 0; // only the first item will get the remainder as extra size + } - wxPoint child_pos( pt ); - wxSize child_size( wxSize( size.x, height) ); + wxPoint child_pos( pt ); + wxSize child_size( wxSize( size.x, height) ); - if (item->GetFlag() & (wxEXPAND | wxSHAPED)) - child_size.x = m_size.x; - else if (item->GetFlag() & wxALIGN_RIGHT) - child_pos.x += m_size.x - size.x; - else if (item->GetFlag() & (wxCENTER | wxALIGN_CENTER_HORIZONTAL)) - // XXX wxCENTER is added for backward compatibility; - // wxALIGN_CENTER should be used in new code - child_pos.x += (m_size.x - size.x) / 2; + if (item->GetFlag() & (wxEXPAND | wxSHAPED)) + child_size.x = m_size.x; + else if (item->GetFlag() & wxALIGN_RIGHT) + child_pos.x += m_size.x - size.x; + else if (item->GetFlag() & (wxCENTER | wxALIGN_CENTER_HORIZONTAL)) + // XXX wxCENTER is added for backward compatibility; + // wxALIGN_CENTER should be used in new code + child_pos.x += (m_size.x - size.x) / 2; - item->SetDimension( child_pos, child_size ); + item->SetDimension( child_pos, child_size ); - pt.y += height; - } - else - { - wxCoord width = size.x; - if (item->GetOption()) - { - width = (delta * weight) + extra; - extra = 0; // only the first item will get the remainder as extra size - } + pt.y += height; + } + else + { + wxCoord width = size.x; + if (item->GetOption()) + { + width = (delta * weight) + extra; + extra = 0; // only the first item will get the remainder as extra size + } - wxPoint child_pos( pt ); - wxSize child_size( wxSize(width, size.y) ); + wxPoint child_pos( pt ); + wxSize child_size( wxSize(width, size.y) ); - if (item->GetFlag() & (wxEXPAND | wxSHAPED)) - child_size.y = m_size.y; - else if (item->GetFlag() & wxALIGN_BOTTOM) - child_pos.y += m_size.y - size.y; - else if (item->GetFlag() & (wxCENTER | wxALIGN_CENTER_VERTICAL)) - // XXX wxCENTER is added for backward compatibility; - // wxALIGN_CENTER should be used in new code - child_pos.y += (m_size.y - size.y) / 2; + if (item->GetFlag() & (wxEXPAND | wxSHAPED)) + child_size.y = m_size.y; + else if (item->GetFlag() & wxALIGN_BOTTOM) + child_pos.y += m_size.y - size.y; + else if (item->GetFlag() & (wxCENTER | wxALIGN_CENTER_VERTICAL)) + // XXX wxCENTER is added for backward compatibility; + // wxALIGN_CENTER should be used in new code + child_pos.y += (m_size.y - size.y) / 2; - item->SetDimension( child_pos, child_size ); + item->SetDimension( child_pos, child_size ); - pt.x += width; - } + pt.x += width; + } - node = node->Next(); + node = node->Next(); } } @@ -482,42 +906,36 @@ wxSize wxBoxSizer::CalcMin() { wxSizerItem *item = (wxSizerItem*) node->Data(); - int weight = 1; - if (item->GetOption()) - weight = item->GetOption(); + m_stretchable += item->GetOption(); + + wxSize size( item->CalcMin() ); - wxSize size( item->CalcMin() ); + if (m_orient == wxHORIZONTAL) + { + m_minWidth += size.x; + m_minHeight = wxMax( m_minHeight, size.y ); + } + else + { + m_minHeight += size.y; + m_minWidth = wxMax( m_minWidth, size.x ); + } - if (m_orient == wxHORIZONTAL) - { - m_minWidth += (size.x * weight); - m_minHeight = wxMax( m_minHeight, size.y ); - } - else - { - m_minHeight += (size.y * weight); - m_minWidth = wxMax( m_minWidth, size.x ); - } + if (item->GetOption() == 0) + { + if (m_orient == wxVERTICAL) + { + m_fixedHeight += size.y; + m_fixedWidth = wxMax( m_fixedWidth, size.x ); + } + else + { + m_fixedWidth += size.x; + m_fixedHeight = wxMax( m_fixedHeight, size.y ); + } + } - if (item->GetOption()) - { - m_stretchable += weight; - } - else - { - if (m_orient == wxVERTICAL) - { - m_fixedHeight += size.y; - m_fixedWidth = wxMax( m_fixedWidth, size.x ); - } - else - { - m_fixedWidth += size.x; - m_fixedHeight = wxMax( m_fixedHeight, size.y ); - } - } - - node = node->Next(); + node = node->Next(); } return wxSize( m_minWidth, m_minHeight ); @@ -564,7 +982,7 @@ wxSize wxStaticBoxSizer::CalcMin() // This will have to be done platform by platform // as there is no way to guess the thickness of // a wxStaticBox border. - + int top_border = 15; if (m_staticBox->GetLabel().IsEmpty()) top_border = 5; int other_border = 5; @@ -585,7 +1003,7 @@ wxSize wxStaticBoxSizer::CalcMin() wxNotebookSizer::wxNotebookSizer( wxNotebook *nb ) { wxASSERT_MSG( nb, wxT("wxNotebookSizer needs a notebook") ); - + m_notebook = nb; } @@ -599,19 +1017,19 @@ wxSize wxNotebookSizer::CalcMin() // This will have to be done platform by platform // as there is no way to guess the thickness of // the wxNotebook tabs and border. - + int borderX = 5; int borderY = 5; if ((m_notebook->HasFlag(wxNB_RIGHT)) || (m_notebook->HasFlag(wxNB_LEFT))) { - borderX += 70; // improvements later.. + borderX += 90; // improvements later.. } else { - borderY += 35; // improvements later.. + borderY += 40; // improvements later.. } - + if (m_notebook->GetChildren().GetCount() == 0) return wxSize(borderX + 10, borderY + 10); @@ -622,17 +1040,17 @@ wxSize wxNotebookSizer::CalcMin() while (node) { wxWindow *item = node->GetData(); - wxSizer *itemsizer = item->GetSizer(); - - if (itemsizer) - { - wxSize subsize( itemsizer->CalcMin() ); - - if (subsize.x > maxX) maxX = subsize.x; - if (subsize.y > maxY) maxY = subsize.y; - } + wxSizer *itemsizer = item->GetSizer(); - node = node->GetNext(); + if (itemsizer) + { + wxSize subsize( itemsizer->CalcMin() ); + + if (subsize.x > maxX) maxX = subsize.x; + if (subsize.y > maxY) maxY = subsize.y; + } + + node = node->GetNext(); } return wxSize( borderX + maxX, borderY + maxY ); diff --git a/src/common/socket.cpp b/src/common/socket.cpp index b2947da8e8..bf00bc63f1 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -51,12 +51,30 @@ // discard buffer #define MAX_DISCARD_SIZE (10 * 1024) -// what to do within waits +// what to do within waits: in wxBase we don't do anything as we don't have +// the event loop anyhow (for now). In GUI apps we have 2 cases: from the main +// thread itself we have to call wxYield() to let the events (including the +// GUI events and the low-level (not wxWindows) events from GSocket) be +// processed. From another thread it is enough to just call wxThread::Yield() +// which will give away the rest of our time slice: the explanation is that +// the events will be processed by the main thread anyhow, without calling +// wxYield(), but we don't want to eat the CPU time uselessly while sitting +// in the loop waiting for the data #if wxUSE_GUI - #define PROCESS_EVENTS() wxYield() -#else - #define PROCESS_EVENTS() -#endif + #if wxUSE_THREADS + #define PROCESS_EVENTS() \ + { \ + if ( wxThread::IsMain() ) \ + wxYield(); \ + else \ + wxThread::Yield(); \ + } + #else // !wxUSE_THREADS + #define PROCESS_EVENTS() wxYield() + #endif // wxUSE_THREADS/!wxUSE_THREADS +#else // !wxUSE_GUI + #define PROCESS_EVENTS() +#endif // wxUSE_GUI/!wxUSE_GUI // -------------------------------------------------------------------------- // wxWin macros @@ -1070,7 +1088,10 @@ wxSocketBase *wxSocketServer::Accept(bool wait) sock->SetFlags(m_flags); if (!AcceptWith(*sock, wait)) - return NULL; + { + sock->Destroy(); + sock = NULL; + } return sock; } diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index d2b1144af8..997899e769 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -9,6 +9,14 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #ifdef __GNUG__ #pragma implementation "strconv.h" #endif @@ -31,24 +39,21 @@ #include "wx/debug.h" #include "wx/strconv.h" -//---------------------------------------------------------------------------- -// wxConvCurrent -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// globals +// ---------------------------------------------------------------------------- WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc; -#if !wxUSE_WCHAR_T -//---------------------------------------------------------------------------- -// stand-ins in absence of wchar_t -//---------------------------------------------------------------------------- +// ============================================================================ +// implementation +// ============================================================================ -WXDLLEXPORT_DATA(wxMBConv) wxConvLibc, wxConvFile; +#if wxUSE_WCHAR_T -#else - -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // wxMBConv -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- WXDLLEXPORT_DATA(wxMBConv) wxConvLibc; @@ -64,33 +69,37 @@ size_t wxMBConv::WC2MB(char *buf, const wchar_t *psz, size_t n) const const wxWCharBuffer wxMBConv::cMB2WC(const char *psz) const { - if (psz) + if (psz) { size_t nLen = MB2WC((wchar_t *) NULL, psz, 0); + if (nLen == (size_t)-1) + return wxWCharBuffer((wchar_t *) NULL); wxWCharBuffer buf(nLen); MB2WC((wchar_t *)(const wchar_t *) buf, psz, nLen); return buf; - } - else + } + else return wxWCharBuffer((wchar_t *) NULL); } const wxCharBuffer wxMBConv::cWC2MB(const wchar_t *psz) const { - if (psz) + if (psz) { size_t nLen = WC2MB((char *) NULL, psz, 0); + if (nLen == (size_t)-1) + return wxCharBuffer((char *) NULL); wxCharBuffer buf(nLen); WC2MB((char *)(const char *) buf, psz, nLen); return buf; - } - else + } + else return wxCharBuffer((char *) NULL); } -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // standard file conversion -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- WXDLLEXPORT_DATA(wxMBConvFile) wxConvFile; @@ -105,11 +114,11 @@ size_t wxMBConvFile::WC2MB(char *buf, const wchar_t *psz, size_t n) const return wxWC2MB(buf, psz, n); } -#ifdef __WXGTK12__ - -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // standard gdk conversion -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +#ifdef __WXGTK12__ WXDLLEXPORT_DATA(wxMBConvGdk) wxConvGdk; @@ -138,6 +147,7 @@ size_t wxMBConvGdk::WC2MB(char *buf, const wchar_t *psz, size_t n) const } return len; } + #endif // GTK > 1.0 // ---------------------------------------------------------------------------- @@ -171,9 +181,9 @@ size_t wxMBConvUTF7::WC2MB(char * WXUNUSED(buf), return 0; } -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // UTF-8 -//---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- WXDLLEXPORT_DATA(wxMBConvUTF8) wxConvUTF8; @@ -249,122 +259,34 @@ size_t wxMBConvUTF8::WC2MB(char *buf, const wchar_t *psz, size_t n) const // specified character set // ---------------------------------------------------------------------------- -#ifndef WX_PRECOMP - #include "wx/dynarray.h" - #include "wx/filefn.h" - #include "wx/textfile.h" - #include "wx/tokenzr.h" - #include "wx/utils.h" -#endif +WXDLLEXPORT_DATA(wxCSConv) wxConvLocal((const wxChar *)NULL); + +#include "wx/encconv.h" +#include "wx/fontmap.h" class wxCharacterSet { public: - wxArrayString names; - wchar_t *data; + // temporarily just use wxEncodingConverter stuff, + // so that it works while a better implementation is built + wxFontEncoding enc; + wxEncodingConverter m2w, w2m; + wxCharacterSet(wxFontEncoding e) : enc(e) + { + m2w.Init(enc, wxFONTENCODING_UNICODE); + w2m.Init(wxFONTENCODING_UNICODE, enc); + } }; -WX_DECLARE_OBJARRAY(wxCharacterSet, wxCSArray); -#include "wx/arrimpl.cpp" -WX_DEFINE_OBJARRAY(wxCSArray); - -static wxCSArray wxCharsets; - -static void wxLoadCharacterSets(void) +static wxCharacterSet *wxGetCharacterSet(const wxChar *name) { - static bool already_loaded = FALSE; - - if (already_loaded) return; - - already_loaded = TRUE; -#if defined(__UNIX__) && wxUSE_TEXTFILE - // search through files in /usr/share/i18n/charmaps - wxString fname; - for (fname = ::wxFindFirstFile(wxT("/usr/share/i18n/charmaps/*")); - !fname.IsEmpty(); - fname = ::wxFindNextFile()) { - wxTextFile cmap(fname); - if (cmap.Open()) { - wxCharacterSet *cset = new wxCharacterSet; - wxString comchar,escchar; - bool in_charset = FALSE; - - // wxFprintf(stderr,wxT("Loaded: %s\n"),fname.c_str()); - - wxString line; - for (line = cmap.GetFirstLine(); - !cmap.Eof(); - line = cmap.GetNextLine()) { - // wxFprintf(stderr,wxT("line contents: %s\n"),line.c_str()); - wxStringTokenizer token(line); - wxString cmd = token.GetNextToken(); - if (cmd == comchar) { - if (token.GetNextToken() == wxT("alias")) - cset->names.Add(token.GetNextToken()); - } - else if (cmd == wxT("")) - cset->names.Add(token.GetNextToken()); - else if (cmd == wxT("")) - comchar = token.GetNextToken(); - else if (cmd == wxT("")) - escchar = token.GetNextToken(); - else if (cmd == wxT("")) { - delete cset; - cset = (wxCharacterSet *) NULL; - break; // we don't support multibyte charsets ourselves (yet) - } - else if (cmd == wxT("CHARMAP")) { - cset->data = (wchar_t *)calloc(256, sizeof(wchar_t)); - in_charset = TRUE; - } - else if (cmd == wxT("END")) { - if (token.GetNextToken() == wxT("CHARMAP")) - in_charset = FALSE; - } - else if (in_charset) { - // format: /x00 NULL (NUL) - // /x41 LATIN CAPITAL LETTER A - wxString hex = token.GetNextToken(); - // skip whitespace (why doesn't wxStringTokenizer do this?) - while (wxIsEmpty(hex) && token.HasMoreTokens()) hex = token.GetNextToken(); - wxString uni = token.GetNextToken(); - // skip whitespace again - while (wxIsEmpty(uni) && token.HasMoreTokens()) uni = token.GetNextToken(); - if ((hex.Len() > 2) && (wxString(hex.GetChar(0)) == escchar) && (hex.GetChar(1) == wxT('x')) && - (uni.Left(2) == wxT("=0) { - unsigned long uni1 = ::wxHexToDec(uni.Mid(2,2)); - unsigned long uni2 = ::wxHexToDec(uni.Mid(4,2)); - cset->data[pos] = (uni1 << 16) | uni2; - // wxFprintf(stderr,wxT("char %02x mapped to %04x (%c)\n"),pos,cset->data[pos],cset->data[pos]); - } - } - } - } - if (cset) { - cset->names.Shrink(); - wxCharsets.Add(cset); - } - } - } -#endif - wxCharsets.Shrink(); + wxFontEncoding enc = name ? wxTheFontMapper->CharsetToEncoding(name, FALSE) + : wxFONTENCODING_SYSTEM; + wxCharacterSet *cset = (enc != wxFONTENCODING_SYSTEM) ? new wxCharacterSet(enc) + : (wxCharacterSet *)NULL; + return cset; } -static wxCharacterSet *wxFindCharacterSet(const wxChar *charset) -{ - if (!charset) return (wxCharacterSet *)NULL; - wxLoadCharacterSets(); - for (size_t n=0; n4) { - if (wxString(charset,4) == wxT("8859")) { - codeset << wxT("8859-"); - if (*charset == wxT('-')) charset++; - } - } - } - codeset << charset; - codeset.MakeUpper(); - m_name = wxStrdup(codeset.c_str()); + m_name = wxStrdup(charset); m_deferred = TRUE; -#endif } } @@ -410,12 +315,13 @@ void wxCSConv::LoadNow() if (m_deferred) { if (!m_name) { #ifdef __UNIX__ - wxChar *lang = wxGetenv(wxT("LANG")); + wxChar *lang = wxGetenv(wxT("LC_ALL")); + if (!lang) lang = wxGetenv(wxT("LANG")); wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL; if (dot) SetName(dot+1); #endif } - m_cset = wxFindCharacterSet(m_name); + m_cset = wxGetCharacterSet(m_name); m_deferred = FALSE; } } @@ -425,8 +331,7 @@ size_t wxCSConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const ((wxCSConv *)this)->LoadNow(); // discard constness if (buf) { if (m_cset) { - for (size_t c=0; cdata[(unsigned char)(psz[c])]; + m_cset->m2w.Convert(psz, buf); } else { // latin-1 (direct) for (size_t c=0; cLoadNow(); // discard constness if (buf) { if (m_cset) { - for (size_t c=0; cdata[n] != psz[c]); n++); - buf[c] = (n>0xff) ? '?' : n; - } + m_cset->w2m.Convert(psz, buf); } else { // latin-1 (direct) for (size_t c=0; c len ) + { + *this += wxString(ch, nSize - len); + } + //else: we have exactly the specified length, nothing to do +} + +void wxString::swap(wxString& str) +{ + // this is slightly less efficient than fiddling with m_pchData directly, + // but it is still quite efficient as we don't copy the string here because + // ref count always stays positive + wxString tmp = str; + str = *this; + *this = str; +} + wxString& wxString::insert(size_t nPos, const wxString& str) { wxASSERT( str.GetStringData()->IsValid() ); @@ -1558,7 +1615,7 @@ size_t wxString::find(wxChar ch, size_t nStart) const size_t wxString::rfind(const wxString& str, size_t nStart) const { wxASSERT( str.GetStringData()->IsValid() ); - wxASSERT( nStart <= Len() ); + wxASSERT( nStart == npos || nStart <= Len() ); // TODO could be made much quicker than that const wxChar *p = c_str() + (nStart == npos ? Len() : nStart); @@ -1575,7 +1632,7 @@ size_t wxString::rfind(const wxString& str, size_t nStart) const #if !defined(__VISUALC__) || defined(__WIN32__) size_t wxString::rfind(const wxChar* sz, size_t nStart, size_t n) const { - return rfind(wxString(sz, n == npos ? 0 : n), nStart); + return rfind(wxString(sz, n == npos ? wxSTRING_MAXLEN : n), nStart); } size_t wxString::rfind(wxChar ch, size_t nStart) const @@ -1715,13 +1772,15 @@ wxString& wxString::erase(size_t nStart, size_t nLen) wxString& wxString::replace(size_t nStart, size_t nLen, const wxChar *sz) { - wxASSERT( nStart + nLen <= wxStrlen(sz) ); + wxASSERT_MSG( nStart + nLen <= Len(), + _T("index out of bounds in wxString::replace") ); wxString strTmp; + strTmp.Alloc(Len()); // micro optimisation to avoid multiple mem allocs + if ( nStart != 0 ) strTmp.append(c_str(), nStart); - strTmp += sz; - strTmp.append(c_str() + nStart + nLen); + strTmp << sz << c_str() + nStart + nLen; *this = strTmp; return *this; @@ -2014,9 +2073,9 @@ void wxArrayString::Insert(const wxString& str, size_t nIndex) } // removes item from array (by index) -void wxArrayString::Remove(size_t nIndex) +void wxArrayString::RemoveAt(size_t nIndex) { - wxCHECK_RET( nIndex <= m_nCount, wxT("bad index in wxArrayString::Remove") ); + wxCHECK_RET( nIndex <= m_nCount, wxT("bad index in wxArrayString::RemoveAt") ); // release our lock Item(nIndex).GetStringData()->Unlock(); @@ -2026,6 +2085,12 @@ void wxArrayString::Remove(size_t nIndex) m_nCount--; } +void wxArrayString::Remove(size_t nIndex) +{ + RemoveAt( nIndex ); +} + + // removes item from array (by value) void wxArrayString::Remove(const wxChar *sz) { @@ -2095,6 +2160,9 @@ void wxArrayString::Sort(CompareFunction compareFunction) DoSort(); + // reset it to NULL so that Sort(bool) will work the next time + gs_compareFunction = NULL; + END_SORT(); } @@ -2119,3 +2187,17 @@ void wxArrayString::DoSort() qsort(m_pItems, m_nCount, sizeof(wxChar *), wxStringCompareFunction); } +bool wxArrayString::operator==(const wxArrayString& a) const +{ + if ( m_nCount != a.m_nCount ) + return FALSE; + + for ( size_t n = 0; n < m_nCount; n++ ) + { + if ( Item(n) != a[n] ) + return FALSE; + } + + return TRUE; +} + diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index 0ce243a141..fb1f6be6a7 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -64,7 +64,7 @@ wxTextCtrlBase::~wxTextCtrlBase() { #ifndef NO_TEXT_WINDOW_STREAM #if !wxUSE_IOSTREAMH - delete m_streambuf; + delete[] m_streambuf; #endif #endif } diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index 89a8e94033..b675fcd71d 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -67,10 +67,10 @@ const wxChar *wxTextFile::GetEOL(wxTextFileType type) wxFAIL_MSG(wxT("bad file type in wxTextFile::GetEOL.")); // fall through nevertheless - we must return something... - case wxTextFileType_None: return wxT(_T("")); - case wxTextFileType_Unix: return wxT(_T("\n")); - case wxTextFileType_Dos: return wxT(_T("\r\n")); - case wxTextFileType_Mac: return wxT(_T("\r")); + case wxTextFileType_None: return wxT(""); + case wxTextFileType_Unix: return wxT("\n"); + case wxTextFileType_Dos: return wxT("\r\n"); + case wxTextFileType_Mac: return wxT("\r"); } } @@ -118,6 +118,10 @@ wxString wxTextFile::Translate(const wxString& text, wxTextFileType type) if ( chLast == _T('\r') ) { // Mac line termination result += eol; + + // reset chLast to avoid inserting another eol before the + // next character + chLast = 0; } // add to the current line @@ -213,8 +217,7 @@ bool wxTextFile::Open() // if it fails, it assumes the native type for our platform. wxTextFileType wxTextFile::GuessType() const { - // file should be opened and we must be in it's beginning - wxASSERT( m_file.IsOpened() && m_file.Tell() == 0 ); + wxASSERT( IsOpened() ); // scan the file lines size_t nUnix = 0, // number of '\n's alone @@ -279,10 +282,12 @@ bool wxTextFile::Read() wxASSERT( m_file.IsOpened() && m_file.Tell() == 0 ); wxString str; + str.reserve(1024); + char ch, chLast = '\0'; char buf[1024]; int n, nRead; - while ( !m_file.Eof() ) { + do { nRead = m_file.Read(buf, WXSIZEOF(buf)); if ( nRead == wxInvalidOffset ) { // read error (error message already given in wxFile::Read) @@ -325,7 +330,7 @@ bool wxTextFile::Read() } } } - } + } while ( nRead == WXSIZEOF(buf) ); // anything in the last line? if ( !str.IsEmpty() ) { diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index 67cec8530c..f1173ff163 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -53,6 +53,13 @@ #define HAVE_FTIME #endif +#if defined(__VISAGECPP__) && !defined(HAVE_FTIME) + #define HAVE_FTIME +# if __IBMCPP__ >= 400 + # define ftime(x) _ftime(x) +# endif +#endif + #include #ifndef __WXMAC__ #include // for time_t @@ -88,12 +95,6 @@ #endif #endif // HAVE_GETTIMEOFDAY -// ---------------------------------------------------------------------------- -// prototypes -// ---------------------------------------------------------------------------- - -wxLongLong wxGetLocalTimeMillis(); - // ============================================================================ // implementation // ============================================================================ @@ -274,7 +275,7 @@ wxLongLong wxGetLocalTimeMillis() (void)ftime(&tp); val *= tp.time; return (val + tp.millitm); -#else +#else // no gettimeofday() nor ftime() // We use wxGetLocalTime() to get the seconds since // 00:00:00 Jan 1st 1970 and then whatever is available // to get millisecond resolution. @@ -285,22 +286,31 @@ wxLongLong wxGetLocalTimeMillis() val *= wxGetLocalTime(); -#if defined(__VISAGECPP__) - DATETIME dt; - ::DosGetDateTime(&dt); - val += (dt.hundredths*10); -#elif defined (__WIN32__) -#warning "Possible clock skew bug in wxStopWatch!" +// GRG: This will go soon as all WIN32 seem to have ftime +#if defined (__WIN32__) + // If your platform/compiler needs to use two different functions + // to get ms resolution, please do NOT just shut off these warnings, + // drop me a line instead at + #warning "Possible clock skew bug in wxGetLocalTimeMillis()!" + SYSTEMTIME st; ::GetLocalTime(&st); val += st.wMilliseconds; -#else -#if !defined(__VISUALC__) && !defined(__BORLANDC__) -#warning "wxStopWatch will be up to second resolution!" -#endif +#else // !Win32 + // If your platform/compiler does not support ms resolution please + // do NOT just shut off these warnings, drop me a line instead at + // + + #if defined(__VISUALC__) + #pragma message("wxStopWatch will be up to second resolution!") + #elif defined(__BORLANDC__) + #pragma message "wxStopWatch will be up to second resolution!" + #else + #warning "wxStopWatch will be up to second resolution!" + #endif // compiler #endif return val; -#endif +#endif // time functions } diff --git a/src/common/txtstrm.cpp b/src/common/txtstrm.cpp index ae71ae5d21..8fd6ffaaaf 100644 --- a/src/common/txtstrm.cpp +++ b/src/common/txtstrm.cpp @@ -63,20 +63,20 @@ wxChar wxTextInputStream::NextNonSeparators() } -inline bool wxTextInputStream::EatEOL(const wxChar &c) +bool wxTextInputStream::EatEOL(const wxChar &c) { - if (c == wxT('\n')) return TRUE; // eat on UNIX + if (c == wxT('\n')) return TRUE; // eat on UNIX - if (c == wxT('\r')) // eat on both Mac and DOS + if (c == wxT('\r')) // eat on both Mac and DOS { - if (!m_input) return TRUE; - wxChar c2 = m_input.GetC(); + if (!m_input) return TRUE; + wxChar c2 = m_input.GetC(); - if (c2 != wxT('\n')) m_input.Ungetch( c2 ); // Don't eat on Mac - return TRUE; + if (c2 != wxT('\n')) m_input.Ungetch( c2 ); // Don't eat on Mac + return TRUE; } - return FALSE; + return FALSE; } void wxTextInputStream::SkipIfEndOfLine( wxChar c ) @@ -143,12 +143,16 @@ wxUint8 wxTextInputStream::Read8() double wxTextInputStream::ReadDouble() { - /* I only implemented a simple float parser */ - // VZ: what about using strtod()?? (TODO) - double f; - int sign; + /* I only implemented a simple float parser + * VZ: what about using strtod()?? (TODO) + */ + + double f; + int theSign; + + if (!m_input) + return 0; - if (!m_input) return 0; int c = NextNonSeparators(); if (c==(wxChar)0) return 0; @@ -156,22 +160,22 @@ double wxTextInputStream::ReadDouble() if (! (c == wxT('.') || c == wxT(',') || c == wxT('-') || c == wxT('+') || isdigit(c)) ) { m_input.Ungetch(c); - return 0.0; + return 0; } if (c == wxT('-')) { - sign = -1; + theSign = -1; c = m_input.GetC(); } else if (c == wxT('+')) { - sign = 1; + theSign = 1; c = m_input.GetC(); } else { - sign = 1; + theSign = 1; } while (isdigit(c)) @@ -219,8 +223,7 @@ double wxTextInputStream::ReadDouble() m_input.Ungetch(c); } - f *= sign; - + f *= theSign; return f; } @@ -237,6 +240,7 @@ wxString wxTextInputStream::ReadLine() while ( !m_input.Eof() ) { c = m_input.GetC(); + if ( !m_input ) break; @@ -260,8 +264,15 @@ wxString wxTextInputStream::ReadWord() if ( !c ) return word; + word += c; + while ( !m_input.Eof() ) { + c = m_input.GetC(); + + if (!m_input) + break; + if (m_separators.Contains(c)) break; @@ -269,10 +280,6 @@ wxString wxTextInputStream::ReadWord() break; word += c; - - c = m_input.GetC(); - if (!m_input) - break; } return word; @@ -284,17 +291,19 @@ wxTextInputStream& wxTextInputStream::operator>>(wxString& word) return *this; } -wxTextInputStream& wxTextInputStream::operator>>(wxChar& c) +wxTextInputStream& wxTextInputStream::operator>>(char& c) { if (!m_input) { - c = (wxChar) 0; + c = 0; return *this; } c = m_input.GetC(); - if (EatEOL(c)) c=wxT('\n'); + if (EatEOL(c)) + c = '\n'; + return *this; } @@ -444,9 +453,14 @@ wxTextOutputStream& wxTextOutputStream::operator<<(const wxString& string) return *this; } -wxTextOutputStream& wxTextOutputStream::operator<<(wxChar c) +wxTextOutputStream& wxTextOutputStream::operator<<(char c) { - WriteString( wxString(c) ); + // these strange manipulations are needed in Unicode mode + char buf[2]; + buf[0] = c; + buf[1] = 0; + + WriteString( wxString(buf) ); return *this; } diff --git a/src/common/unzip.c b/src/common/unzip.c index c78982488c..be48958cfb 100644 --- a/src/common/unzip.c +++ b/src/common/unzip.c @@ -149,6 +149,11 @@ typedef struct int unzlocal_CheckCurrentFileCoherencyHeader (unz_s*, uInt*, uLong*, uInt*); #endif +/* disable warnings about K&R declarations until the end of file */ +#ifdef _MSC_VER +#pragma warning(disable:4131) +#endif /* VC++ */ + /* =========================================================================== Read a byte from a gz_stream; update next_in and avail_in. Return EOF for end of file. @@ -606,10 +611,12 @@ local int unzlocal_GetCurrentFileInfoInternal (file, /* we check the magic */ if (err==UNZ_OK) + { if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x02014b50) err=UNZ_BADZIPFILE; + } if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK) err=UNZ_ERRNO; @@ -686,10 +693,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file, uSizeRead = extraFieldBufferSize; if (lSeek!=0) + { if (fseek(s->file,lSeek,SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; + } + if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) if (fread(extraField,(uInt)uSizeRead,1,s->file)!=1) err=UNZ_ERRNO; @@ -711,10 +721,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file, uSizeRead = commentBufferSize; if (lSeek!=0) + { if (fseek(s->file,lSeek,SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; + } + if ((file_info.size_file_comment>0) && (commentBufferSize>0)) if (fread(szComment,(uInt)uSizeRead,1,s->file)!=1) err=UNZ_ERRNO; @@ -902,10 +915,12 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, if (err==UNZ_OK) + { if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x04034b50) err=UNZ_BADZIPFILE; + } if (unzlocal_getShort(s->file,&uData) != UNZ_OK) err=UNZ_ERRNO; @@ -1344,7 +1359,6 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) char *szComment; uLong uSizeBuf; { - int err=UNZ_OK; unz_s* s; uLong uReadThis ; if (file==NULL) diff --git a/src/common/url.cpp b/src/common/url.cpp index cce9ae5701..c2e863f0b4 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -35,7 +35,13 @@ IMPLEMENT_CLASS(wxURL, wxObject) // Protocols list wxProtoInfo *wxURL::ms_protocols = NULL; +// Enforce linking of protocol classes: +USE_PROTOCOL(wxFileProto) + #if wxUSE_SOCKETS +USE_PROTOCOL(wxHTTP) +USE_PROTOCOL(wxFTP) + wxHTTP *wxURL::ms_proxyDefault = NULL; bool wxURL::ms_useDefaultProxy = FALSE; #endif @@ -77,35 +83,40 @@ bool wxURL::ParseURL() { wxString last_url = m_url; - // If the URL was already parsed (so m_protocol != NULL), we pass this section. - if (!m_protocol) { - + // If the URL was already parsed (m_protocol != NULL), pass this section. + if (!m_protocol) + { // Clean up CleanData(); // Extract protocol name - if (!PrepProto(last_url)) { + if (!PrepProto(last_url)) + { m_error = wxURL_SNTXERR; return FALSE; } // Find and create the protocol object - if (!FetchProtocol()) { + if (!FetchProtocol()) + { m_error = wxURL_NOPROTO; return FALSE; } // Do we need a host name ? - if (m_protoinfo->m_needhost) { + if (m_protoinfo->m_needhost) + { // Extract it - if (!PrepHost(last_url)) { + if (!PrepHost(last_url)) + { m_error = wxURL_SNTXERR; return FALSE; } } // Extract full path - if (!PrepPath(last_url)) { + if (!PrepPath(last_url)) + { m_error = wxURL_NOPATH; return FALSE; } @@ -113,7 +124,8 @@ bool wxURL::ParseURL() // URL parse finished. #if wxUSE_SOCKETS - if (m_useProxy) { + if (m_useProxy) + { // We destroy the newly created protocol. CleanData(); @@ -192,7 +204,8 @@ bool wxURL::PrepHost(wxString& url) // Retrieve service number pos2 = temp_url.Find(wxT(':'), TRUE); - if (pos2 != -1 && pos2 < pos) { + if (pos2 != -1 && pos2 < pos) + { m_servname = temp_url(pos2+1, pos); if (!m_servname.IsNumber()) return FALSE; @@ -235,8 +248,10 @@ bool wxURL::FetchProtocol() { wxProtoInfo *info = ms_protocols; - while (info) { - if (m_protoname == info->m_protoname) { + while (info) + { + if (m_protoname == info->m_protoname) + { if (m_servname.IsNull()) m_servname = info->m_servname; @@ -257,13 +272,15 @@ wxInputStream *wxURL::GetInputStream() { wxInputStream *the_i_stream = NULL; - if (!m_protocol) { + if (!m_protocol) + { m_error = wxURL_NOPROTO; return NULL; } m_error = wxURL_NOERR; - if (m_user != wxT("")) { + if (m_user != wxT("")) + { m_protocol->SetUser(m_user); m_protocol->SetPassword(m_password); } @@ -272,8 +289,10 @@ wxInputStream *wxURL::GetInputStream() wxIPV4address addr; // m_protoinfo is NULL when we use a proxy - if (!m_useProxy && m_protoinfo->m_needhost) { - if (!addr.Hostname(m_hostname)) { + if (!m_useProxy && m_protoinfo->m_needhost) + { + if (!addr.Hostname(m_hostname)) + { m_error = wxURL_NOHOST; return NULL; } @@ -294,7 +313,8 @@ wxInputStream *wxURL::GetInputStream() else the_i_stream = m_protocol->GetInputStream(m_path); - if (!the_i_stream) { + if (!the_i_stream) + { m_error = wxURL_PROTOERR; return NULL; } @@ -384,23 +404,45 @@ void wxURL::SetProxy(const wxString& url_proxy) } #endif // wxUSE_SOCKETS -wxString wxURL::ConvertToValidURI(const wxString& uri) +wxString wxURL::ConvertToValidURI(const wxString& uri, const wxChar* delims) { wxString out_str; wxString hexa_code; size_t i; - for (i=0;i= wxT('A') && uri[i] <= wxT('F')) code = (uri[i] - wxT('A') + 10) * 16; else code = (uri[i] - wxT('0')) * 16; + i++; if (uri[i] >= wxT('A') && uri[i] <= wxT('F')) code += (uri[i] - wxT('A')) + 10; else code += (uri[i] - wxT('0')); + i++; new_uri += (wxChar)code; continue; @@ -459,6 +505,7 @@ bool wxURLModule::OnInit() // set, but don't try to create this proxy right now because it will slow // down the program startup (especially if there is no DNS server // available, in which case it may take up to 1 minute) + if ( getenv("HTTP_PROXY") ) { wxURL::ms_useDefaultProxy = TRUE; diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 0eb8453bd6..49c15f3284 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -498,23 +498,32 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label) keyCode = WXK_F1 + n - 1; } else { -#if 0 // this is not supported by GTK+, apparently // several special cases current.MakeUpper(); if ( current == wxT("DEL") ) { - keyCode = VK_DELETE; + keyCode = WXK_DELETE; } + else if ( current == wxT("DELETE") ) { + keyCode = WXK_DELETE; + } + else if ( current == wxT("INS") ) { + keyCode = WXK_INSERT; + } + else if ( current == wxT("INSERT") ) { + keyCode = WXK_INSERT; + } +#if 0 else if ( current == wxT("PGUP") ) { keyCode = VK_PRIOR; } else if ( current == wxT("PGDN") ) { keyCode = VK_NEXT; } +#endif else -#endif // 0 { - wxLogDebug(wxT("Unrecognized accel key '%s', accel " - "string ignored."), current.c_str()); + wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."), + current.c_str()); } } } @@ -878,10 +887,13 @@ int wxMessageBox(const wxString& message, const wxString& caption, long style, return wxYES; case wxID_NO: return wxNO; - default: case wxID_CANCEL: return wxCANCEL; } + + wxFAIL_MSG( _T("unexpected return code from wxMessageDialog") ); + + return wxCANCEL; } #if wxUSE_TEXTDLG @@ -1025,7 +1037,7 @@ wxWindowDisabler::~wxWindowDisabler() { if ( !::SetForegroundWindow(GetHwndOf(m_winTop)) ) { - wxLogLastError("SetForegroundWindow"); + wxLogLastError(wxT("SetForegroundWindow")); } } #else @@ -1208,31 +1220,89 @@ wxString wxGetCurrentDir() // wxExecute // ---------------------------------------------------------------------------- -long wxExecute(const wxString& command, wxArrayString& output) +// this is a private function because it hasn't a clean interface: the first +// array is passed by reference, the second by pointer - instead we have 2 +// public versions of wxExecute() below +static long wxDoExecuteWithCapture(const wxString& command, + wxArrayString& output, + wxArrayString* error) { #ifdef __WIN16__ wxFAIL_MSG("Sorry, this version of wxExecute not implemented on WIN16."); + return 0; -#else +#else // !Win16 // create a wxProcess which will capture the output wxProcess *process = new wxProcess; process->Redirect(); long rc = wxExecute(command, TRUE /* sync */, process); + +#if wxUSE_STREAMS if ( rc != -1 ) { - wxInputStream& is = *process->GetInputStream(); - wxTextInputStream tis(is); - while ( !is.Eof() && is.IsOk() ) - { - wxString line = tis.ReadLine(); - if ( is.LastError() ) - break; + wxInputStream* is = process->GetInputStream(); + wxCHECK_MSG( is, -1, _T("if wxExecute() succeded, stream can't be NULL") ); + wxTextInputStream tis(*is); - output.Add(line); + wxTextInputStream *tes = NULL; + wxInputStream *es = NULL; + if ( error ) + { + es = process->GetErrorStream(); + + wxCHECK_MSG( es, -1, _T("stderr can't be NULL") ); + + tes = new wxTextInputStream(*es); } + + bool cont; + do + { + cont = FALSE; + + if ( !is->Eof() && is->IsOk() ) + { + wxString line = tis.ReadLine(); + if ( is->LastError() ) + break; + + cont = TRUE; + + output.Add(line); + } + + if ( error && !es->Eof() && es->IsOk() ) + { + wxString line = tes->ReadLine(); + if ( es->LastError() ) + break; + + cont = TRUE; + + error->Add(line); + } + } + while ( cont ); + + delete tes; } +#endif // wxUSE_STREAMS + + delete process; return rc; -#endif +#endif // IO redirection supoprted +} + +long wxExecute(const wxString& command, wxArrayString& output) +{ + return wxDoExecuteWithCapture(command, output, NULL); +} + +long wxExecute(const wxString& command, + wxArrayString& output, + wxArrayString& error) +{ + return wxDoExecuteWithCapture(command, output, &error); } diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp index 05134307bc..3871697226 100644 --- a/src/common/valgen.cpp +++ b/src/common/valgen.cpp @@ -6,7 +6,7 @@ // Created: Jan 22 1999 // RCS-ID: // Copyright: (c) 1999 Kevin Smith -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -44,8 +44,13 @@ #include "wx/slider.h" #endif -#ifndef __WIN16__ +#if wxUSE_SPINCTRL && !defined(__WIN16__) + #include "wx/spinctrl.h" +#endif +#if wxUSE_SPINBTN && !defined(__WIN16__) #include "wx/spinbutt.h" +#endif +#if wxUSE_CHECKLISTBOX && !defined(__WIN16__) #include "wx/checklst.h" #endif @@ -108,21 +113,21 @@ bool wxGenericValidator::TransferToWindow(void) { wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow; if (m_pBool) - { - pControl->SetValue(*m_pBool); - return TRUE; - } + { + pControl->SetValue(*m_pBool); + return TRUE; + } } else #endif #if wxUSE_RADIOBTN if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) ) { wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow; - if (m_pBool) - { - pControl->SetValue(*m_pBool) ; - return TRUE; - } + if (m_pBool) + { + pControl->SetValue(*m_pBool) ; + return TRUE; + } } else #endif @@ -131,121 +136,150 @@ bool wxGenericValidator::TransferToWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) ) { wxGauge* pControl = (wxGauge*) m_validatorWindow; - if (m_pInt) - { - pControl->SetValue(*m_pInt); - return TRUE; - } + if (m_pInt) + { + pControl->SetValue(*m_pInt); + return TRUE; + } } else #endif #if wxUSE_RADIOBOX if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) ) { wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow; - if (m_pInt) - { - pControl->SetSelection(*m_pInt) ; - return TRUE; - } + if (m_pInt) + { + pControl->SetSelection(*m_pInt) ; + return TRUE; + } } else #endif #if wxUSE_SCROLLBAR if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) ) { wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow; - if (m_pInt) - { - pControl->SetThumbPosition(*m_pInt) ; - return TRUE; - } + if (m_pInt) + { + pControl->SetThumbPosition(*m_pInt) ; + return TRUE; + } } else #endif -#if wxUSE_SPINBTN -#ifndef __WIN16__ +#if wxUSE_SPINCTRL && !defined(__WIN16__) && !defined(__WXMOTIF__) + if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) ) + { + wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow; + if (m_pInt) + { + pControl->SetValue(*m_pInt); + return TRUE; + } + } else +#endif +#if wxUSE_SPINBTN && !defined(__WIN16__) if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) ) { wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow; - if (m_pInt) - { - pControl->SetValue(*m_pInt) ; - return TRUE; - } + if (m_pInt) + { + pControl->SetValue(*m_pInt) ; + return TRUE; + } } else #endif -#endif #if wxUSE_SLIDER if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) ) { wxSlider* pControl = (wxSlider*) m_validatorWindow; if (m_pInt) { - pControl->SetValue(*m_pInt) ; - return TRUE; - } + pControl->SetValue(*m_pInt) ; + return TRUE; + } } else #endif - // string controls -#if 1 + // string controls if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) ) { wxButton* pControl = (wxButton*) m_validatorWindow; - if (m_pString) - { - pControl->SetLabel(*m_pString) ; - return TRUE; - } + if (m_pString) + { + pControl->SetLabel(*m_pString) ; + return TRUE; + } } else -#endif #if wxUSE_COMBOBOX if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) ) { wxComboBox* pControl = (wxComboBox*) m_validatorWindow; - if (m_pString) - { - pControl->SetValue(*m_pString) ; - return TRUE; - } + if (m_pInt) + { + pControl->SetSelection(*m_pInt) ; + return TRUE; + } + else if (m_pString) + { + if (pControl->FindString(* m_pString) > -1) + { + pControl->SetStringSelection(* m_pString); + } + return TRUE; + } } else #endif #if wxUSE_CHOICE if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) ) { wxChoice* pControl = (wxChoice*) m_validatorWindow; - if (m_pInt) - { - pControl->SetSelection(*m_pInt) ; - return TRUE; - } + if (m_pInt) + { + pControl->SetSelection(*m_pInt) ; + return TRUE; + } + else if (m_pString) + { + if (pControl->FindString(* m_pString) > -1) + { + pControl->SetStringSelection(* m_pString); + } + return TRUE; + } } else #endif if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) ) { wxStaticText* pControl = (wxStaticText*) m_validatorWindow; - if (m_pString) - { - pControl->SetLabel(*m_pString) ; - return TRUE; - } - } else + if (m_pString) + { + pControl->SetLabel(*m_pString) ; + return TRUE; + } + } else if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) ) { wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow; - if (m_pString) - { - pControl->SetValue(*m_pString) ; - return TRUE; - } + if (m_pString) + { + pControl->SetValue(*m_pString) ; + return TRUE; + } + else if (m_pInt) + { + wxString str; + str.Printf(wxT("%d"), *m_pInt); + pControl->SetValue(str); + return TRUE; + } } else -#if wxUSE_CHECKLISTBOX -#ifndef __WIN16__ +#if wxUSE_CHECKLISTBOX && !defined(__WIN16__) // array controls // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox // MUST come first: if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) ) { wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow; - if (m_pArrayInt) + if (m_pArrayInt) { // clear all selections int i; @@ -257,32 +291,31 @@ bool wxGenericValidator::TransferToWindow(void) pControl->Check(m_pArrayInt->Item(u)); return TRUE; } - else - return FALSE; + else + return FALSE; } else #endif -#endif #if wxUSE_LISTBOX if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) ) { wxListBox* pControl = (wxListBox*) m_validatorWindow; - if (m_pArrayInt) - { - // clear all selections - int i; - for (i = 0 ; i < pControl->Number(); ++i) - pControl->Deselect(i); - // select each item in our array - unsigned u; - for (u = 0; u < m_pArrayInt->Count(); ++u) - pControl->SetSelection(m_pArrayInt->Item(u)); - return TRUE; - } + if (m_pArrayInt) + { + // clear all selections + int i; + for (i = 0 ; i < pControl->Number(); ++i) + pControl->Deselect(i); + // select each item in our array + unsigned u; + for (u = 0; u < m_pArrayInt->Count(); ++u) + pControl->SetSelection(m_pArrayInt->Item(u)); + return TRUE; + } } else #endif + ; // to match the last 'else' above // unrecognized control, or bad pointer - return FALSE; return FALSE; } @@ -297,7 +330,7 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) ) { wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow; - if (m_pBool) + if (m_pBool) { *m_pBool = pControl->GetValue() ; return TRUE; @@ -308,7 +341,7 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) ) { wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow; - if (m_pBool) + if (m_pBool) { *m_pBool = pControl->GetValue() ; return TRUE; @@ -320,7 +353,7 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) ) { wxGauge* pControl = (wxGauge*) m_validatorWindow; - if (m_pInt) + if (m_pInt) { *m_pInt = pControl->GetValue() ; return TRUE; @@ -331,7 +364,7 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) ) { wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow; - if (m_pInt) + if (m_pInt) { *m_pInt = pControl->GetSelection() ; return TRUE; @@ -342,33 +375,42 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) ) { wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow; - if (m_pInt) + if (m_pInt) { *m_pInt = pControl->GetThumbPosition() ; return TRUE; } } else #endif -#if wxUSE_SPINBTN -#ifndef __WIN16__ +#if wxUSE_SPINCTRL && !defined(__WIN16__) && !defined(__WXMOTIF__) + if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) ) + { + wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow; + if (m_pInt) + { + *m_pInt=pControl->GetValue(); + return TRUE; + } + } else +#endif +#if wxUSE_SPINBTN && !defined(__WIN16__) if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) ) { wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow; - if (m_pInt) + if (m_pInt) { *m_pInt = pControl->GetValue() ; return TRUE; } } else #endif -#endif #if wxUSE_SLIDER if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) ) { wxSlider* pControl = (wxSlider*) m_validatorWindow; if (m_pInt) { - pControl->SetValue(*m_pInt) ; + *m_pInt = pControl->GetValue() ; return TRUE; } } else @@ -377,7 +419,7 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) ) { wxButton* pControl = (wxButton*) m_validatorWindow; - if (m_pString) + if (m_pString) { *m_pString = pControl->GetLabel() ; return TRUE; @@ -388,28 +430,38 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) ) { wxComboBox* pControl = (wxComboBox*) m_validatorWindow; - if (m_pString) + if (m_pInt) { - *m_pString = pControl->GetValue() ; + *m_pInt = pControl->GetSelection() ; return TRUE; } + else if (m_pString) + { + *m_pString = pControl->GetStringSelection(); + return TRUE; + } } else #endif #if wxUSE_CHOICE if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) ) { wxChoice* pControl = (wxChoice*) m_validatorWindow; - if (m_pInt) + if (m_pInt) { *m_pInt = pControl->GetSelection() ; return TRUE; } + else if (m_pString) + { + *m_pString = pControl->GetStringSelection(); + return TRUE; + } } else #endif if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) ) { wxStaticText* pControl = (wxStaticText*) m_validatorWindow; - if (m_pString) + if (m_pString) { *m_pString = pControl->GetLabel() ; return TRUE; @@ -418,11 +470,16 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) ) { wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow; - if (m_pString) + if (m_pString) { *m_pString = pControl->GetValue() ; return TRUE; } + else if (m_pInt) + { + *m_pInt = wxAtoi(pControl->GetValue()); + return TRUE; + } } else #if wxUSE_CHECKLISTBOX #ifndef __WIN16__ @@ -432,7 +489,7 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) ) { wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow; - if (m_pArrayInt) + if (m_pArrayInt) { // clear our array m_pArrayInt->Clear(); @@ -443,8 +500,8 @@ bool wxGenericValidator::TransferFromWindow(void) m_pArrayInt->Add(i); return TRUE; } - else - return FALSE; + else + return FALSE; } else #endif #endif @@ -452,7 +509,7 @@ bool wxGenericValidator::TransferFromWindow(void) if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) ) { wxListBox* pControl = (wxListBox*) m_validatorWindow; - if (m_pArrayInt) + if (m_pArrayInt) { // clear our array m_pArrayInt->Clear(); @@ -473,6 +530,7 @@ bool wxGenericValidator::TransferFromWindow(void) /* Called by constructors to initialize ALL data members + Last change: JAC 21 Jul 100 4:58 pm */ void wxGenericValidator::Initialize() { diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 27e3d04cd6..9e7599571b 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -98,7 +98,7 @@ static bool wxIsAlpha(const wxString& val) int i; for ( i = 0; i < (int)val.Length(); i++) { - if (!isalpha(val[i])) + if (!wxIsalpha(val[i])) return FALSE; } return TRUE; @@ -109,7 +109,7 @@ static bool wxIsAlphaNumeric(const wxString& val) int i; for ( i = 0; i < (int)val.Length(); i++) { - if (!isalnum(val[i])) + if (!wxIsalnum(val[i])) return FALSE; } return TRUE; @@ -276,9 +276,9 @@ void wxTextValidator::OnChar(wxKeyEvent& event) !(keyCode < WXK_SPACE || keyCode == WXK_DELETE || keyCode > WXK_START) && ( ((m_validatorStyle & wxFILTER_ASCII) && !isascii(keyCode)) || - ((m_validatorStyle & wxFILTER_ALPHA) && !isalpha(keyCode)) || - ((m_validatorStyle & wxFILTER_ALPHANUMERIC) && !isalnum(keyCode)) || - ((m_validatorStyle & wxFILTER_NUMERIC) && !isdigit(keyCode) + ((m_validatorStyle & wxFILTER_ALPHA) && !wxIsalpha(keyCode)) || + ((m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsalnum(keyCode)) || + ((m_validatorStyle & wxFILTER_NUMERIC) && !wxIsdigit(keyCode) && keyCode != '.' && keyCode != ',' && keyCode != '-') ) ) diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 491cf8c470..26e623c1b5 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -38,11 +38,13 @@ #include "wx/string.h" #include "wx/variant.h" +#if wxUSE_TIMEDATE IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) wxTime::tFormat wxTime::ms_Format = wxTime::wx12h; wxTime::tPrecision wxTime::ms_Precision = wxTime::wxStdMinSec; +#endif IMPLEMENT_ABSTRACT_CLASS(wxVariantData, wxObject) @@ -1350,8 +1352,8 @@ bool wxVariant::operator== (const wxString& value) const wxString thisValue; if (!Convert(&thisValue)) return FALSE; - else - return (value == thisValue); + + return value == thisValue; } bool wxVariant::operator!= (const wxString& value) const @@ -1448,8 +1450,8 @@ bool wxVariant::operator== (const wxTime& value) const wxTime thisValue; if (!Convert(&thisValue)) return FALSE; - else - return (value == thisValue); + + return value == thisValue; } bool wxVariant::operator!= (const wxTime& value) const @@ -1476,8 +1478,8 @@ bool wxVariant::operator== (const wxDate& value) const wxDate thisValue; if (!Convert(&thisValue)) return FALSE; - else - return (value == thisValue); + + return (value == thisValue); } bool wxVariant::operator!= (const wxDate& value) const @@ -1507,7 +1509,7 @@ bool wxVariant::operator== (void* value) const bool wxVariant::operator!= (void* value) const { - return (!((*this) == value)); + return (!((*this) == (void*) value)); } void wxVariant::operator= (void* value) @@ -1666,13 +1668,12 @@ bool wxVariant::GetBool() const wxString wxVariant::GetString() const { wxString value; - if (Convert(& value)) - return value; - else + if (!Convert(& value)) { wxFAIL_MSG(wxT("Could not convert to a string")); - return wxString(""); } + + return value; } // For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled @@ -1680,27 +1681,25 @@ wxString wxVariant::GetString() const wxTime wxVariant::GetTime() const { wxTime value; - if (Convert(& value)) - return value; - else + if (!Convert(& value)) { wxFAIL_MSG(wxT("Could not convert to a time")); - return wxTime(); } + + return value; } wxDate wxVariant::GetDate() const { wxDate value; - if (Convert(& value)) - return value; - else + if (!Convert(& value)) { wxFAIL_MSG(wxT("Could not convert to a date")); - return wxDate(); } + + return value; } -#endif +#endif // wxUSE_TIMEDATE void* wxVariant::GetVoidPtr() const { diff --git a/src/common/wfstream.cpp b/src/common/wfstream.cpp index 3e1970a3ff..3605e2a707 100644 --- a/src/common/wfstream.cpp +++ b/src/common/wfstream.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 11/07/98 // RCS-ID: $Id$ -// Copyright: (c) Guilhem Lavaux +// Copyright: (c) Guilhem Lavaux // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -33,65 +33,66 @@ wxFileInputStream::wxFileInputStream(const wxString& fileName) : wxInputStream() { - m_file = new wxFile(fileName, wxFile::read); - m_file_destroy = TRUE; + m_file = new wxFile(fileName, wxFile::read); + m_file_destroy = TRUE; } wxFileInputStream::wxFileInputStream() : wxInputStream() { - m_file_destroy = FALSE; - m_file = NULL; + m_file_destroy = FALSE; + m_file = NULL; } wxFileInputStream::wxFileInputStream(wxFile& file) { - m_file = &file; - m_file_destroy = FALSE; + m_file = &file; + m_file_destroy = FALSE; } wxFileInputStream::wxFileInputStream(int fd) { - m_file = new wxFile(fd); - m_file_destroy = TRUE; + m_file = new wxFile(fd); + m_file_destroy = TRUE; } wxFileInputStream::~wxFileInputStream() { - if (m_file_destroy) - delete m_file; + if (m_file_destroy) + delete m_file; } size_t wxFileInputStream::GetSize() const { - return m_file->Length(); + return m_file->Length(); } size_t wxFileInputStream::OnSysRead(void *buffer, size_t size) { - off_t ret; + off_t ret; - ret = m_file->Read(buffer, size); + ret = m_file->Read(buffer, size); - m_lasterror = wxStream_NOERROR; - if (m_file->Eof()) - m_lasterror = wxStream_EOF; - if (ret == wxInvalidOffset) { - m_lasterror = wxStream_READ_ERR; - ret = 0; - } + m_lasterror = wxStream_NOERROR; + if (m_file->Eof()) + m_lasterror = wxStream_EOF; + if (ret == wxInvalidOffset) + { + m_lasterror = wxStream_READ_ERR; + ret = 0; + } - return ret; + return ret; } off_t wxFileInputStream::OnSysSeek(off_t pos, wxSeekMode mode) { - return m_file->Seek(pos, mode); + return m_file->Seek(pos, mode); } off_t wxFileInputStream::OnSysTell() const { - return m_file->Tell(); + return m_file->Tell(); } // ---------------------------------------------------------------------------- @@ -100,74 +101,87 @@ off_t wxFileInputStream::OnSysTell() const wxFileOutputStream::wxFileOutputStream(const wxString& fileName) { - m_file = new wxFile(fileName, wxFile::write); - m_file_destroy = TRUE; + m_file = new wxFile(fileName, wxFile::write); + m_file_destroy = TRUE; + + if (!m_file->IsOpened()) + { + m_lasterror = wxSTREAM_WRITE_ERROR; + } + else + { + if (m_file->Error()) + m_lasterror = wxSTREAM_WRITE_ERROR; + } } wxFileOutputStream::wxFileOutputStream(wxFile& file) { - m_file = &file; - m_file_destroy = FALSE; + m_file = &file; + m_file_destroy = FALSE; } wxFileOutputStream::wxFileOutputStream() : wxOutputStream() { - m_file_destroy = FALSE; - m_file = NULL; + m_file_destroy = FALSE; + m_file = NULL; } wxFileOutputStream::wxFileOutputStream(int fd) { - m_file = new wxFile(fd); - m_file_destroy = TRUE; + m_file = new wxFile(fd); + m_file_destroy = TRUE; } wxFileOutputStream::~wxFileOutputStream() { - if (m_file_destroy) { - Sync(); - delete m_file; - } + if (m_file_destroy) + { + Sync(); + delete m_file; + } } size_t wxFileOutputStream::OnSysWrite(const void *buffer, size_t size) { - size_t ret = m_file->Write(buffer, size); - if (m_file->Error()) - m_lasterror = wxStream_WRITE_ERR; - else - m_lasterror = wxStream_NOERROR; - return ret; + size_t ret = m_file->Write(buffer, size); + if (m_file->Error()) + m_lasterror = wxStream_WRITE_ERR; + else + m_lasterror = wxStream_NOERROR; + return ret; } off_t wxFileOutputStream::OnSysTell() const { - return m_file->Tell(); + return m_file->Tell(); } off_t wxFileOutputStream::OnSysSeek(off_t pos, wxSeekMode mode) { - return m_file->Seek(pos, mode); + return m_file->Seek(pos, mode); } void wxFileOutputStream::Sync() { - wxOutputStream::Sync(); - m_file->Flush(); + wxOutputStream::Sync(); + m_file->Flush(); } size_t wxFileOutputStream::GetSize() const { - return m_file->Length(); + return m_file->Length(); } // ---------------------------------------------------------------------------- // wxFileStream // ---------------------------------------------------------------------------- + wxFileStream::wxFileStream(const wxString& fileName) - : wxFileInputStream(fileName), wxFileOutputStream(*wxFileInputStream::m_file) + : wxFileInputStream(fileName) { + wxFileOutputStream::m_file = wxFileInputStream::m_file; } // ---------------------------------------------------------------------------- @@ -177,64 +191,65 @@ wxFileStream::wxFileStream(const wxString& fileName) wxFFileInputStream::wxFFileInputStream(const wxString& fileName) : wxInputStream() { - m_file = new wxFFile(fileName, "r"); - m_file_destroy = TRUE; + m_file = new wxFFile(fileName, "rb"); + m_file_destroy = TRUE; } wxFFileInputStream::wxFFileInputStream() : wxInputStream() { - m_file_destroy = FALSE; - m_file = NULL; + m_file_destroy = FALSE; + m_file = NULL; } wxFFileInputStream::wxFFileInputStream(wxFFile& file) { - m_file = &file; - m_file_destroy = FALSE; + m_file = &file; + m_file_destroy = FALSE; } wxFFileInputStream::wxFFileInputStream(FILE *file) { - m_file = new wxFFile(file); - m_file_destroy = TRUE; + m_file = new wxFFile(file); + m_file_destroy = TRUE; } wxFFileInputStream::~wxFFileInputStream() { - if (m_file_destroy) - delete m_file; + if (m_file_destroy) + delete m_file; } size_t wxFFileInputStream::GetSize() const { - return m_file->Length(); + return m_file->Length(); } size_t wxFFileInputStream::OnSysRead(void *buffer, size_t size) { - off_t ret; + off_t ret; - ret = m_file->Read(buffer, size); + ret = m_file->Read(buffer, size); - if (m_file->Eof()) - m_lasterror = wxStream_EOF; - if (ret == wxInvalidOffset) { - m_lasterror = wxStream_READ_ERR; - ret = 0; - } + if (m_file->Eof()) + m_lasterror = wxStream_EOF; + if (ret == wxInvalidOffset) + { + m_lasterror = wxStream_READ_ERR; + ret = 0; + } - return ret; + return ret; } off_t wxFFileInputStream::OnSysSeek(off_t pos, wxSeekMode mode) { - return m_file->Seek(pos, mode); + return m_file->Seek(pos, mode); } off_t wxFFileInputStream::OnSysTell() const { - return m_file->Tell(); + return m_file->Tell(); } // ---------------------------------------------------------------------------- @@ -243,75 +258,89 @@ off_t wxFFileInputStream::OnSysTell() const wxFFileOutputStream::wxFFileOutputStream(const wxString& fileName) { - m_file = new wxFFile(fileName, "w+"); - m_file_destroy = TRUE; + m_file = new wxFFile(fileName, "w+b"); + m_file_destroy = TRUE; + + if (!m_file->IsOpened()) + { + m_lasterror = wxSTREAM_WRITE_ERROR; + } + else + { + if (m_file->Error()) + m_lasterror = wxSTREAM_WRITE_ERROR; + } } wxFFileOutputStream::wxFFileOutputStream(wxFFile& file) { - m_file = &file; - m_file_destroy = FALSE; + m_file = &file; + m_file_destroy = FALSE; } wxFFileOutputStream::wxFFileOutputStream() : wxOutputStream() { - m_file_destroy = FALSE; - m_file = NULL; + m_file_destroy = FALSE; + m_file = NULL; } wxFFileOutputStream::wxFFileOutputStream(FILE *file) { - m_file = new wxFFile(file); - m_file_destroy = TRUE; + m_file = new wxFFile(file); + m_file_destroy = TRUE; } wxFFileOutputStream::~wxFFileOutputStream() { - if (m_file_destroy) { - Sync(); - delete m_file; - } + if (m_file_destroy) + { + Sync(); + delete m_file; + } } size_t wxFFileOutputStream::OnSysWrite(const void *buffer, size_t size) { - size_t ret = m_file->Write(buffer, size); - if (m_file->Error()) - m_lasterror = wxStream_WRITE_ERR; - else - m_lasterror = wxStream_NOERROR; - return ret; + size_t ret = m_file->Write(buffer, size); + if (m_file->Error()) + m_lasterror = wxStream_WRITE_ERR; + else + m_lasterror = wxStream_NOERROR; + return ret; } off_t wxFFileOutputStream::OnSysTell() const { - return m_file->Tell(); + return m_file->Tell(); } off_t wxFFileOutputStream::OnSysSeek(off_t pos, wxSeekMode mode) { - return m_file->Seek(pos, mode); + return m_file->Seek(pos, mode); } void wxFFileOutputStream::Sync() { - wxOutputStream::Sync(); - m_file->Flush(); + wxOutputStream::Sync(); + m_file->Flush(); } size_t wxFFileOutputStream::GetSize() const { - return m_file->Length(); + return m_file->Length(); } // ---------------------------------------------------------------------------- // wxFFileStream // ---------------------------------------------------------------------------- + wxFFileStream::wxFFileStream(const wxString& fileName) - : wxFFileInputStream(fileName), wxFFileOutputStream(*wxFFileInputStream::m_file) + : wxFFileInputStream(fileName) { + wxFFileOutputStream::m_file = wxFFileInputStream::m_file; } + #endif // wxUSE_STREAMS && wxUSE_FILE diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index b1862f8a2e..52ed10b2c5 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -118,19 +118,16 @@ void wxWindowBase::InitBase() #endif // wxUSE_VALIDATORS // use the system default colours - wxSystemSettings settings; - - m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_BTNFACE); - // m_foregroundColour = *wxBLACK; // TODO take this from sys settings too? + m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE); m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT); - // GRG, changed Mar/2000 -#if defined(__VISAGECPP__) && __IBMCPP__ < 0x400 - // For now VisualAge 3.0 needs it this way - m_font = *wxSWISS_FONT; // and this? -#else - m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT); -#endif + // don't set the font here for wxMSW as we don't call WM_SETFONT here and + // so the font is *not* really set - but calls to SetFont() later won't do + // anything because m_font appears to be already set! +#ifndef __WXMSW__ + m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); +#endif // __WXMSW__ + // no style bits m_exStyle = m_windowStyle = 0; @@ -321,13 +318,32 @@ bool wxWindowBase::DestroyChildren() // centre the window with respect to its parent in either (or both) directions void wxWindowBase::Centre(int direction) { + // the position/size of the parent window or of the entire screen + wxPoint posParent; int widthParent, heightParent; - wxWindow *parent = GetParent(); - if ( !parent ) + wxWindow *parent = NULL; + + if ( !(direction & wxCENTRE_ON_SCREEN) ) { - // no other choice - direction |= wxCENTRE_ON_SCREEN; + // find the parent to centre this window on: it should be the + // immediate parent for the controls but the top level parent for the + // top level windows (like dialogs) + parent = GetParent(); + if ( IsTopLevel() ) + { + while ( parent && !parent->IsTopLevel() ) + { + parent = parent->GetParent(); + } + } + + // did we find the parent? + if ( !parent ) + { + // no other choice + direction |= wxCENTRE_ON_SCREEN; + } } if ( direction & wxCENTRE_ON_SCREEN ) @@ -337,8 +353,19 @@ void wxWindowBase::Centre(int direction) } else { - // centre inside the parents rectangle - parent->GetClientSize(&widthParent, &heightParent); + if ( IsTopLevel() ) + { + // centre on the parent + parent->GetSize(&widthParent, &heightParent); + + // adjust to the parents position + posParent = parent->GetPosition(); + } + else + { + // centre inside the parents client rectangle + parent->GetClientSize(&widthParent, &heightParent); + } } int width, height; @@ -353,20 +380,8 @@ void wxWindowBase::Centre(int direction) if ( direction & wxVERTICAL ) yNew = (heightParent - height)/2; - // controls are always centered on their parent because it doesn't make - // sense to centre them on the screen - if ( !(direction & wxCENTRE_ON_SCREEN) || !IsTopLevel() ) - { - // the only chance to get this is to have a not top level window - // without parent which shouldn't happen - wxCHECK_RET( parent, wxT("this window must have a parent") ); - - // adjust to the parents client area origin - wxPoint posParent = parent->ClientToScreen(wxPoint(0, 0)); - - xNew += posParent.x; - yNew += posParent.y; - } + xNew += posParent.x; + yNew += posParent.y; // move the centre of this window to this position Move(xNew, yNew); @@ -491,6 +506,11 @@ void wxWindowBase::AddChild(wxWindowBase *child) { wxCHECK_RET( child, wxT("can't add a NULL child") ); + // this should never happen and it will lead to a crash later if it does + // because RemoveChild() will remove only one node from the children list + // and the other(s) one(s) will be left with dangling pointers in them + wxASSERT_MSG( !GetChildren().Find(child), _T("AddChild() called twice") ); + GetChildren().Append(child); child->SetParent(this); } @@ -607,7 +627,7 @@ bool wxWindowBase::SetFont(const wxFont& font) // don't try to set invalid font, always fall back to the default const wxFont& fontOk = font.Ok() ? font : *wxSWISS_FONT; - if ( (wxFont&)fontOk == m_font ) + if ( fontOk == m_font ) { // no change return FALSE; @@ -1416,16 +1436,19 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) wxMessageBox(wxString::Format( _T( - " wxWindows Library (%s port)\n" - "Version %u.%u.%u, compiled at %s %s\n" - " Copyright (c) 1995-2000 wxWindows team" + " wxWindows Library (%s port)\nVersion %u.%u.%u%s, compiled at %s %s\n Copyright (c) 1995-2001 wxWindows team" ), port.c_str(), wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER, - __DATE__, - __TIME__ +#if wxUSE_UNICODE + L" (Unicode)", +#else + "", +#endif + __TDATE__, + __TTIME__ ), _T("wxWindows information"), wxICON_INFORMATION | wxOK, diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index c2deb9b203..f9e73aed8a 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -97,13 +97,13 @@ size_t WXDLLEXPORT wxWC2MB(char *buf, const wchar_t *pwz, size_t n) bool WXDLLEXPORT wxOKlibc() { #if wxUSE_WCHAR_T && defined(__UNIX__) && defined(__GLIBC__) - // GNU libc uses UTF-8 even when it shouldn't - wchar_t res; + // glibc 2.0 uses UTF-8 even when it shouldn't + wchar_t res = 0; if ((MB_CUR_MAX == 2) && - (wxMB2WC(&res, "\xdd\xa5", 1)>0) && + (wxMB2WC(&res, "\xdd\xa5", 1) == 1) && (res==0x765)) { // this is UTF-8 allright, check whether that's what we want - char *cur_locale = setlocale(LC_ALL, NULL); + char *cur_locale = setlocale(LC_CTYPE, NULL); if ((strlen(cur_locale) < 4) || (strcasecmp(cur_locale + strlen(cur_locale) - 4, "utf8"))) { // nope, don't use libc conversion @@ -354,6 +354,16 @@ WXDLLEXPORT FILE * wxFreopen(const wxChar *path, const wxChar *mode, FILE *strea return freopen(wxConvFile.cWX2MB(path), wxConvLibc.cWX2MB(mode), stream); } +WXDLLEXPORT int wxRemove(const wxChar *path) +{ + return remove(wxConvFile.cWX2MB(path)); +} + +WXDLLEXPORT int wxRename(const wxChar *oldpath, const wxChar *newpath) +{ + return rename(wxConvFile.cWX2MB(oldpath), wxConvFile.cWX2MB(newpath)); +} + int WXDLLEXPORT wxPrintf(const wxChar *fmt, ...) { va_list argptr; diff --git a/src/common/wxexpr.cpp b/src/common/wxexpr.cpp index bbfce13288..2abeffce01 100644 --- a/src/common/wxexpr.cpp +++ b/src/common/wxexpr.cpp @@ -719,17 +719,17 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression case wxExprString: { fprintf( stream, "\"" ); - int i; + size_t i; const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.string); - int len = strlen(val); + size_t len = strlen(val); for (i = 0; i < len; i++) { char ch = val[i]; if (ch == '"' || ch == '\\') - fprintf( stream, "\\" ); - char tmp[2]; - tmp[0] = ch; - tmp[1] = 0; + fprintf( stream, "\\" ); + char tmp[2]; + tmp[0] = ch; + tmp[1] = 0; fprintf( stream, tmp ); } fprintf( stream, "\"" ); @@ -739,12 +739,12 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression { bool quote_it = FALSE; const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.word); - int len = strlen(val); - if ((len == 0) || (len > 0 && (val[0] > 64 && val[0] < 91))) + size_t len = strlen(val); + if ((len == 0) || (len > 0 && (val[(size_t) 0] > 64 && val[(size_t) 0] < 91))) quote_it = TRUE; else { - int i; + size_t i; for (i = 0; i < len; i++) if ((!isalpha(val[i])) && (!isdigit(val[i])) && (val[i] != '_')) @@ -754,7 +754,7 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression if (quote_it) fprintf( stream ,"'" ); - fprintf( stream, (const char*) val ); + fprintf( stream, val ); if (quote_it) fprintf( stream, "'" ); @@ -785,7 +785,7 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression expr->WriteExpr(stream); expr = expr->next; if (expr) - fprintf( stream, ", " ); + fprintf( stream, ", " ); } fprintf( stream, "]" ); } @@ -992,7 +992,7 @@ bool wxExprDatabase::Read(const wxString& filename) { noErrors = 0; - FILE *f = fopen(filename.fn_str(), "r"); + FILE *f = wxFopen(filename, _T("r")); if (f) { thewxExprDatabase = this; @@ -1024,7 +1024,7 @@ bool wxExprDatabase::ReadFromString(const wxString& buffer) bool wxExprDatabase::Write(const wxString& fileName) { - FILE *stream = fopen( fileName.fn_str(), "w+" ); + FILE *stream = wxFopen( fileName, _T("w+")); if (!stream) return FALSE; @@ -1130,7 +1130,7 @@ char *wxmake_word(char *str) char *wxmake_string(char *str) { wxChar *s, *t; - int len, i; + size_t len, i; const wxMB2WXbuf sbuf = wxConvLibc.cMB2WX(str); // str++; /* skip leading quote */ diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index 54cb0c8638..fb191d35c3 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -39,13 +39,13 @@ wxZipInputStream::wxZipInputStream(const wxString& archive, const wxString& file m_Pos = 0; m_Size = 0; - m_Archive = (void*) unzOpen(archive.fn_str()); + m_Archive = (void*) unzOpen(archive.mb_str()); if (m_Archive == NULL) { m_lasterror = wxStream_READ_ERR; return; } - if (unzLocateFile((unzFile)m_Archive, file.fn_str(), 0) != UNZ_OK) + if (unzLocateFile((unzFile)m_Archive, file.mb_str(), 0) != UNZ_OK) { m_lasterror = wxStream_READ_ERR; return; @@ -73,13 +73,32 @@ wxZipInputStream::~wxZipInputStream() } } +bool wxZipInputStream::Eof() const +{ + wxASSERT_MSG( m_Pos <= (off_t)m_Size, + _T("wxZipInputStream: invalid current position") ); + + return m_Pos >= (off_t)m_Size; +} size_t wxZipInputStream::OnSysRead(void *buffer, size_t bufsize) { - if (m_Pos + bufsize > m_Size) bufsize = m_Size - m_Pos; + wxASSERT_MSG( m_Pos <= (off_t)m_Size, + _T("wxZipInputStream: invalid current position") ); + + if ( m_Pos >= (off_t)m_Size ) + { + m_lasterror = wxStream_EOF; + return 0; + } + + if (m_Pos + bufsize > m_Size) + bufsize = m_Size - m_Pos; + unzReadCurrentFile((unzFile)m_Archive, buffer, bufsize); m_Pos += bufsize; + return bufsize; } diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index 7ca4e3bac4..e0285c9db1 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -27,14 +27,14 @@ #include "wx/intl.h" #include "wx/log.h" -// When using configure, the path must be "zlib.h" I don't know -// what other ports (wxMac, wxMotif without configure) need here. -// If we are building with configure (defines __WX_SETUP_H__), -// we trust the zlib path is given as a -I option. -#if defined(__WXMSW__) && !defined(__WX_SETUP_H__) +// normally, the compiler options should contain -I../zlib, but it is +// apparently not the case for all MSW makefiles and so, unless we use +// configure (which defines __WX_SETUP_H__) or it is explicitly overridden by +// the user (who can define wxUSE_ZLIB_H_IN_PATH), we hardcode the path here +#if defined(__WXMSW__) && !defined(__WX_SETUP_H__) && !defined(wxUSE_ZLIB_H_IN_PATH) #include "../zlib/zlib.h" #else - #include "zlib.h" + #include #endif #define ZSTREAM_BUFFER_SIZE 1024 @@ -85,7 +85,7 @@ size_t wxZlibInputStream::OnSysRead(void *buffer, size_t size) while (m_inflate->avail_out > 0) { if (m_inflate->avail_in == 0) { - m_parent_i_stream->Read(m_z_buffer, m_z_size); + m_parent_i_stream->Read(m_z_buffer, wxMin(m_z_size, size)); m_inflate->next_in = m_z_buffer; m_inflate->avail_in = m_parent_i_stream->LastRead(); @@ -95,6 +95,13 @@ size_t wxZlibInputStream::OnSysRead(void *buffer, size_t size) m_lasterror = m_parent_i_stream->LastError(); return 0; // failed to read anything } + + if ( m_inflate->avail_in == 0 ) + { + // EOF + m_lasterror = wxStream_EOF; + break; + } } err = inflate(m_inflate, Z_FINISH); if (err == Z_STREAM_END) diff --git a/src/files.lst b/src/files.lst index f6fc2a3323..11eccffb62 100644 --- a/src/files.lst +++ b/src/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 19:26, 2000/03/20 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T! ALL_SOURCES = \ common/init.cpp \ @@ -9,6 +9,7 @@ ALL_SOURCES = \ common/datstrm.cpp \ common/dynarray.cpp \ common/dynlib.cpp \ + common/encconv.cpp \ common/event.cpp \ common/extended.c \ common/ffile.cpp \ @@ -16,6 +17,7 @@ ALL_SOURCES = \ common/fileconf.cpp \ common/filefn.cpp \ common/filesys.cpp \ + common/fontmap.cpp \ common/fs_inet.cpp \ common/fs_mem.cpp \ common/fs_zip.cpp \ @@ -59,7 +61,18 @@ ALL_SOURCES = \ unix/gsocket.c \ unix/mimetype.cpp \ unix/threadpsx.cpp \ - unix/utilsunx.cpp + unix/utilsunx.cpp \ + msw/dde.cpp \ + msw/dir.cpp \ + msw/gsocket.c \ + msw/gsockmsw.c \ + msw/main.cpp \ + msw/mimetype.cpp \ + msw/regconf.cpp \ + msw/registry.cpp \ + msw/thread.cpp \ + msw/utils.cpp \ + msw/utilsexc.cpp ALL_HEADERS = \ app.h \ @@ -78,12 +91,16 @@ ALL_HEADERS = \ dir.h \ dynarray.h \ dynlib.h \ + encconv.h \ event.h \ ffile.h \ file.h \ fileconf.h \ filefn.h \ filesys.h \ + fontenc.h \ + fontmap.h \ + fontutil.h \ fs_inet.h \ fs_mem.h \ fs_zip.h \ @@ -108,7 +125,6 @@ ALL_HEADERS = \ sckipc.h \ sckstrm.h \ serbase.h \ - setup.h \ socket.h \ strconv.h \ stream.h \ @@ -131,6 +147,8 @@ ALL_HEADERS = \ zstream.h \ unix/gsockunx.h \ unix/mimetype.h \ + msw/dde.h \ + msw/mimetype.h \ protocol/file.h \ protocol/ftp.h \ protocol/http.h \ @@ -145,6 +163,7 @@ BASE_OBJS = \ datstrm.o \ dynarray.o \ dynlib.o \ + encconv.o \ event.o \ extended.o \ ffile.o \ @@ -152,6 +171,7 @@ BASE_OBJS = \ fileconf.o \ filefn.o \ filesys.o \ + fontmap.o \ fs_inet.o \ fs_mem.o \ fs_zip.o \ @@ -201,6 +221,7 @@ BASE_DEPS = \ datstrm.d \ dynarray.d \ dynlib.d \ + encconv.d \ event.d \ extended.d \ ffile.d \ @@ -208,6 +229,7 @@ BASE_DEPS = \ fileconf.d \ filefn.d \ filesys.d \ + fontmap.d \ fs_inet.d \ fs_mem.d \ fs_zip.d \ @@ -255,58 +277,36 @@ BASE_UNIX_OBJS = \ threadpsx.o \ utilsunx.o -BASE_DEPS = \ - init.d \ - appcmn.d \ - cmdline.d \ - config.d \ - datetime.d \ - datstrm.d \ - dynarray.d \ - dynlib.d \ - event.d \ - extended.d \ - ffile.d \ - file.d \ - fileconf.d \ - filefn.d \ - filesys.d \ - fs_inet.d \ - fs_mem.d \ - fs_zip.d \ - ftp.d \ - hash.d \ - http.d \ - intl.d \ - ipcbase.d \ - list.d \ - log.d \ - longlong.d \ - mimecmn.d \ - module.d \ - mstream.d \ - object.d \ - objstrm.d \ - process.d \ - protocol.d \ - sckaddr.d \ - sckfile.d \ - sckipc.d \ - sckstrm.d \ - serbase.d \ - socket.d \ - strconv.d \ - stream.d \ - string.d \ - textfile.d \ - timercmn.d \ - tokenzr.d \ - txtstrm.d \ - unzip.d \ - url.d \ - utilscmn.d \ - variant.d \ - wfstream.d \ - wxchar.d \ - zipstrm.d \ - zstream.d +BASE_UNIX_DEPS = \ + dir.d \ + gsocket.d \ + mimetype.d \ + threadpsx.d \ + utilsunx.d + +BASE_MSW_OBJS = \ + dde.o \ + dir.o \ + gsocket.o \ + gsockmsw.o \ + main.o \ + mimetype.o \ + regconf.o \ + registry.o \ + thread.o \ + utils.o \ + utilsexc.o + +BASE_MSW_DEPS = \ + dde.d \ + dir.d \ + gsocket.d \ + gsockmsw.d \ + main.d \ + mimetype.d \ + regconf.d \ + registry.d \ + thread.d \ + utils.d \ + utilsexc.d + diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index 34c346e4c7..f2ecd265a1 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -95,6 +95,7 @@ BEGIN_EVENT_TABLE(wxYearSpinCtrl, wxSpinCtrl) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxCommandEvent) // ============================================================================ // implementation @@ -121,6 +122,7 @@ wxMonthComboBox::wxMonthComboBox(wxCalendarCtrl *cal) } SetSelection(m_cal->GetDate().GetMonth()); + SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT); } wxYearSpinCtrl::wxYearSpinCtrl(wxCalendarCtrl *cal) @@ -562,7 +564,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) RecalcGeometry(); #if DEBUG_PAINT - printf("--- starting to paint, selection: %s, week %u\n", + wxLogDebug("--- starting to paint, selection: %s, week %u\n", m_date.Format("%a %d-%m-%Y %H:%M:%S").c_str(), GetWeek(m_date)); #endif @@ -571,7 +573,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) if ( IsExposed(0, 0, 7*m_widthCol, m_heightRow) ) { #if DEBUG_PAINT - puts("painting the header"); + wxLogDebug("painting the header"); #endif dc.SetBackgroundMode(wxTRANSPARENT); @@ -601,7 +603,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) wxDateTime date = GetStartDate(); #if DEBUG_PAINT - printf("starting calendar from %s\n", + wxLogDebug("starting calendar from %s\n", date.Format("%a %d-%m-%Y %H:%M:%S").c_str()); #endif @@ -617,7 +619,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) } #if DEBUG_PAINT - printf("painting week %d at y = %d\n", nWeek, y); + wxLogDebug("painting week %d at y = %d\n", nWeek, y); #endif for ( size_t wd = 0; wd < 7; wd++ ) @@ -730,7 +732,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) } } #if DEBUG_PAINT - puts("+++ finished painting"); + wxLogDebug("+++ finished painting"); #endif } @@ -748,8 +750,17 @@ void wxCalendarCtrl::RefreshDate(const wxDateTime& date) rect.width = 7*m_widthCol; rect.height = m_heightRow; +#ifdef __WXMSW__ + // VZ: for some reason, the selected date seems to occupy more space under + // MSW - this is probably some bug in the font size calculations, but I + // don't know where exactly. This fix is ugly and leads to more + // refreshes than really needed, but without it the selected days + // leaves even more ugly underscores on screen. + rect.Inflate(0, 1); +#endif // MSW + #if DEBUG_PAINT - printf("*** refreshing week %d at (%d, %d)-(%d, %d)\n", + wxLogDebug("*** refreshing week %d at (%d, %d)-(%d, %d)\n", GetWeek(date), rect.x, rect.y, rect.x + rect.width, rect.y + rect.height); diff --git a/src/generic/caret.cpp b/src/generic/caret.cpp index 2620630941..3371a270cd 100644 --- a/src/generic/caret.cpp +++ b/src/generic/caret.cpp @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: generic/caret.h -// Purpose: generic wxCaret class +// Name: generic/caret.cpp +// Purpose: generic wxCaret class implementation // Author: Vadim Zeitlin (original code by Robert Roebling) // Modified by: // Created: 25.05.99 @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- #ifdef __GNUG__ -#pragma implementation "caret.h" + #pragma implementation "caret.h" #endif // For compilers that support precompilation, includes "wx.h". @@ -46,6 +46,10 @@ static int gs_blinkTime = 500; // in milliseconds // implementation // ============================================================================ +// ---------------------------------------------------------------------------- +// timer stuff +// ---------------------------------------------------------------------------- + wxCaretTimer::wxCaretTimer(wxCaret *caret) { m_caret = caret; @@ -53,14 +57,20 @@ wxCaretTimer::wxCaretTimer(wxCaret *caret) void wxCaretTimer::Notify() { - m_caret->Blink(); + m_caret->OnTimer(); +} + +void wxCaret::OnTimer() +{ + // don't blink the caret when we don't have the focus + if ( m_hasFocus ) + Blink(); } // ---------------------------------------------------------------------------- // wxCaret static functions and data // ---------------------------------------------------------------------------- - int wxCaretBase::GetBlinkTime() { return gs_blinkTime; @@ -77,6 +87,8 @@ void wxCaretBase::SetBlinkTime(int milliseconds) void wxCaret::InitGeneric() { + m_hasFocus = TRUE; + m_blinkedOut = FALSE; } wxCaret::~wxCaret() @@ -119,6 +131,32 @@ void wxCaret::DoMove() //else: will be shown at the correct location next time it blinks } +// ---------------------------------------------------------------------------- +// handling the focus +// ---------------------------------------------------------------------------- + +void wxCaret::OnSetFocus() +{ + m_hasFocus = TRUE; + + Refresh(); +} + +void wxCaret::OnKillFocus() +{ + m_hasFocus = FALSE; + + if ( IsVisible() ) + { + // the caret must be shown - otherwise, if it is hidden now, it will + // stay so until the focus doesn't return because it won't blink any + // more + m_blinkedOut = FALSE; + } + + Refresh(); +} + // ---------------------------------------------------------------------------- // drawing the caret // ---------------------------------------------------------------------------- @@ -127,14 +165,23 @@ void wxCaret::Blink() { m_blinkedOut = !m_blinkedOut; - wxClientDC dc(GetWindow()); + Refresh(); +} + +void wxCaret::Refresh() +{ if ( !m_blinkedOut ) { + wxClientDC dc(GetWindow()); DoDraw(&dc); } else { - // FIXME can't be less efficient than this... (+1 needed!) + // FIXME can't be less efficient than this... we probably should use + // backing store for the caret instead of leaving all the burden + // of correct refresh logic handling to the user code + + // NB: +1 is needed! wxRect rect(m_x, m_y, m_width + 1, m_height + 1); GetWindow()->Refresh(FALSE, &rect); } @@ -143,8 +190,18 @@ void wxCaret::Blink() void wxCaret::DoDraw(wxDC *dc) { dc->SetPen( *wxBLACK_PEN ); + + // VZ: Robert's code for I-shaped caret - this is nice but doesn't look + // at all the same as the MSW version and I don't know how to indicate + // that the window has focus or not with such caret +#if 0 dc->DrawLine( m_x, m_y, m_x+m_width, m_y ); dc->DrawLine( m_x, m_y+m_height, m_x+m_width, m_y+m_height ); dc->DrawLine( m_x+(m_width/2), m_y, m_x+(m_width/2), m_y+m_height ); // dc->DrawLine( m_x+(m_width/2)+1, m_y, m_x+(m_width/2)+1, m_y+m_height ); +#else // 1 + if ( m_hasFocus ) + dc->SetBrush( *wxBLACK_BRUSH ); + dc->DrawRectangle( m_x, m_y, m_width, m_height ); +#endif // 0/1 } diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index ec8857fa4d..f2c529666a 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -45,10 +45,11 @@ wxString wxGetSingleChoice( const wxString& message, const wxString& caption, in int WXUNUSED(width), int WXUNUSED(height) ) { wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + wxString choice; if ( dialog.ShowModal() == wxID_OK ) - return dialog.GetStringSelection(); - else - return wxT(""); + choice = dialog.GetStringSelection(); + + return choice; } // Overloaded for backward compatibility @@ -75,10 +76,13 @@ int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, in int WXUNUSED(width), int WXUNUSED(height) ) { wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + int choice; if ( dialog.ShowModal() == wxID_OK ) - return dialog.GetSelection(); + choice = dialog.GetSelection(); else - return -1; + choice = -1; + + return choice; } // Overloaded for backward compatibility @@ -102,10 +106,13 @@ void *wxGetSingleChoiceData( const wxString& message, const wxString& caption, i int WXUNUSED(width), int WXUNUSED(height) ) { wxSingleChoiceDialog dialog(parent, message, caption, n, choices, (char **)client_data); + void *data; if ( dialog.ShowModal() == wxID_OK ) - return dialog.GetSelectionClientData(); + data = dialog.GetSelectionClientData(); else - return NULL; + data = NULL; + + return data; } // Overloaded for backward compatibility diff --git a/src/generic/colrdlgg.cpp b/src/generic/colrdlgg.cpp index 4049e421fe..4cc5493335 100644 --- a/src/generic/colrdlgg.cpp +++ b/src/generic/colrdlgg.cpp @@ -121,8 +121,8 @@ wxGenericColourDialog::wxGenericColourDialog() colourSelection = 0; } -wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent, wxColourData *data): - wxDialog(parent, -1, wxT("Colour"), wxPoint(0, 0), wxSize(900, 900), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) +wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent, + wxColourData *data) { whichKind = 1; colourSelection = 0; @@ -140,16 +140,21 @@ void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data) { - dialogParent = parent; + if ( !wxDialog::Create(parent, -1, wxT("Colour"), + wxPoint(0, 0), wxSize(900, 900), + wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL) ) + return FALSE; - if (data) - colourData = *data; + dialogParent = parent; - InitializeColours(); - CalculateMeasurements(); - CreateWidgets(); + if (data) + colourData = *data; - return TRUE; + InitializeColours(); + CalculateMeasurements(); + CreateWidgets(); + + return TRUE; } int wxGenericColourDialog::ShowModal() diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 96b05d4f7c..f1cab3f3b1 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -233,6 +233,20 @@ static char wxPostScriptHeaderReencodeISO2[] = // wxPostScriptDC //------------------------------------------------------------------------------- +float wxPostScriptDC::ms_PSScaleFactor = 10.0; + +void wxPostScriptDC::SetResolution(int ppi) +{ + ms_PSScaleFactor = (float)ppi / 72.0; +} + +int wxPostScriptDC::GetResolution() +{ + return (int)(ms_PSScaleFactor * 72.0); +} + + + wxPostScriptDC::wxPostScriptDC () { m_pstream = (FILE*) NULL; @@ -650,7 +664,8 @@ void wxPostScriptDC::DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset, wx CalcBoundingBox( points[i].x + xoffset, points[i].y + yoffset); } - fprintf( m_pstream, "fill\n" ); + fprintf( m_pstream, "closepath\n" ); + fprintf( m_pstream, "stroke\n" ); } } @@ -824,7 +839,7 @@ void wxPostScriptDC::DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord "%d %d %d %d 0 360 ellipse\n" "fill\n", XLOG2DEV(x + width / 2), YLOG2DEV(y + height / 2), - XLOG2DEV(width / 2), YLOG2DEVREL(height / 2) ); + XLOG2DEVREL(width / 2), YLOG2DEVREL(height / 2) ); CalcBoundingBox( x - width, y - height ); CalcBoundingBox( x + width, y + height ); @@ -839,7 +854,7 @@ void wxPostScriptDC::DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord "%d %d %d %d 0 360 ellipse\n" "stroke\n", XLOG2DEV(x + width / 2), YLOG2DEV(y + height / 2), - XLOG2DEV(width / 2), YLOG2DEVREL(height / 2) ); + XLOG2DEVREL(width / 2), YLOG2DEVREL(height / 2) ); CalcBoundingBox( x - width, y - height ); CalcBoundingBox( x + width, y + height ); @@ -872,13 +887,12 @@ void wxPostScriptDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, if (!image.Ok()) return; + wxCoord w = image.GetWidth(); + wxCoord h = image.GetHeight(); + wxCoord ww = XLOG2DEVREL(image.GetWidth()); wxCoord hh = YLOG2DEVREL(image.GetHeight()); - image = image.Scale( ww, hh ); - - if (!image.Ok()) return; - wxCoord xx = XLOG2DEV(x); wxCoord yy = YLOG2DEV(y + bitmap.GetHeight()); @@ -895,11 +909,12 @@ void wxPostScriptDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, "[%d 0 0 %d 0 %d]\n" "{currentfile pix readhexstring pop}\n" "false 3 colorimage\n", - ww, ww, xx, yy, ww, hh, ww, hh, ww, -hh, hh ); + w, w, xx, yy, ww, hh, w, h, w, -h, h ); - for (int j = 0; j < hh; j++) + + for (int j = 0; j < h; j++) { - for (int i = 0; i < ww; i++) + for (int i = 0; i < w; i++) { char buffer[5]; LocalDecToHex( image.GetRed(i,j), buffer ); @@ -924,91 +939,90 @@ void wxPostScriptDC::SetFont( const wxFont& font ) m_font = font; - const char *name; - const char *style = ""; int Style = m_font.GetStyle(); int Weight = m_font.GetWeight(); + const char *name; switch (m_font.GetFamily()) { case wxTELETYPE: case wxMODERN: - name = "/Courier"; - break; - case wxSWISS: - name = "/Helvetica"; + { + if (Style == wxITALIC) + { + if (Weight == wxBOLD) + name = "/Courier-BoldOblique"; + else + name = "/Courier-Oblique"; + } + else + { + if (Weight == wxBOLD) + name = "/Courier-Bold"; + else + name = "/Courier"; + } break; + } case wxROMAN: -// name = "/Times-Roman"; - name = "/Times"; // Altered by EDZ + { + if (Style == wxITALIC) + { + if (Weight == wxBOLD) + name = "/Times-BoldItalic"; + else + name = "/Times-Italic"; + } + else + { + if (Weight == wxBOLD) + name = "/Times-Bold"; + else + name = "/Times-Roman"; + } break; + } case wxSCRIPT: - name = "/Zapf-Chancery-MediumItalic"; + { + name = "/ZapfChancery-MediumItalic"; Style = wxNORMAL; Weight = wxNORMAL; break; + } + case wxSWISS: default: - case wxDEFAULT: // Sans Serif Font - name = "/LucidaSans"; + { + if (Style == wxITALIC) + { + if (Weight == wxBOLD) + name = "/Helvetica-BoldOblique"; + else + name = "/Helvetica-Oblique"; + } + else + { + if (Weight == wxBOLD) + name = "/Helvetica-Bold"; + else + name = "/Helvetica"; + } + break; + } } - if (Style == wxNORMAL && (Weight == wxNORMAL || Weight == wxLIGHT)) - { - if (m_font.GetFamily () == wxROMAN) - style = "-Roman"; - else - style = ""; - } - else if (Style == wxNORMAL && Weight == wxBOLD) - { - style = "-Bold"; - } - else if (Style == wxITALIC && (Weight == wxNORMAL || Weight == wxLIGHT)) - { - if (m_font.GetFamily () == wxROMAN) - style = "-Italic"; - else - style = "-Oblique"; - } - else if (Style == wxITALIC && Weight == wxBOLD) - { - if (m_font.GetFamily () == wxROMAN) - style = "-BoldItalic"; - else - style = "-BoldOblique"; - } - else if (Style == wxSLANT && (Weight == wxNORMAL || Weight == wxLIGHT)) - { - if (m_font.GetFamily () == wxROMAN) - style = "-Italic"; - else - style = "-Oblique"; - } - else if (Style == wxSLANT && Weight == wxBOLD) - { - if (m_font.GetFamily () == wxROMAN) - style = "-BoldItalic"; - else - style = "-BoldOblique"; - } - else - { - style = ""; - } - - char buffer[100]; - strcpy( buffer, name ); - strcat( buffer, style ); - - fprintf( m_pstream, buffer ); + fprintf( m_pstream, name ); fprintf( m_pstream, " reencodeISO def\n" ); - fprintf( m_pstream, buffer ); + fprintf( m_pstream, name ); fprintf( m_pstream, " findfont\n" ); - fprintf( m_pstream, "%f scalefont setfont\n", YLOG2DEVREL(m_font.GetPointSize() * 1000) / 1000.0F); + char buffer[100]; + sprintf( buffer, "%f scalefont setfont\n", YLOG2DEVREL(m_font.GetPointSize() * 1000) / 1000.0F); // this is a hack - we must scale font size (in pts) according to m_scaleY but // YLOG2DEVREL works with wxCoord type (int or longint). Se we first convert font size // to 1/1000th of pt and then back. + for (int i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); } void wxPostScriptDC::SetPen( const wxPen& pen ) @@ -1021,11 +1035,18 @@ void wxPostScriptDC::SetPen( const wxPen& pen ) m_pen = pen; - #ifdef __WXMSW__ - fprintf( m_pstream, "%d setlinewidth\n", XLOG2DEVREL(m_pen.GetWidth()) ); - #else - fprintf( m_pstream, "%d setlinewidth\n", XLOG2DEVREL(m_pen.GetWidth()) ); - #endif + { + char buffer[100]; + #ifdef __WXMSW__ + sprintf( buffer, "%f setlinewidth\n", XLOG2DEVREL(1000 * m_pen.GetWidth()) / 1000.0f ); + #else + sprintf( buffer, "%f setlinewidth\n", XLOG2DEVREL(1000 * m_pen.GetWidth()) / 1000.0f ); + #endif + for (int i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); + } + /* Line style - WRONG: 2nd arg is OFFSET @@ -1086,9 +1107,13 @@ void wxPostScriptDC::SetPen( const wxPen& pen ) double bluePS = (double)(blue) / 255.0; double greenPS = (double)(green) / 255.0; - fprintf( m_pstream, + char buffer[100]; + sprintf( buffer, "%.8f %.8f %.8f setrgbcolor\n", redPS, greenPS, bluePS ); + for (int i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); m_currentRed = red; m_currentBlue = blue; @@ -1129,9 +1154,13 @@ void wxPostScriptDC::SetBrush( const wxBrush& brush ) double bluePS = (double)(blue) / 255.0; double greenPS = (double)(green) / 255.0; - fprintf( m_pstream, + char buffer[100]; + sprintf( buffer, "%.8f %.8f %.8f setrgbcolor\n", redPS, greenPS, bluePS ); + for (int i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); m_currentRed = red; m_currentBlue = blue; @@ -1175,9 +1204,13 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y ) double bluePS = (double)(blue) / 255.0; double greenPS = (double)(green) / 255.0; - fprintf( m_pstream, - "%.8f %.8f %.8f setrgbcolor\n", - redPS, greenPS, bluePS ); + char buffer[100]; + sprintf( buffer, + "%.8f %.8f %.8f setrgbcolor\n", + redPS, greenPS, bluePS ); + for (int i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); m_currentRed = red; m_currentBlue = blue; @@ -1193,10 +1226,6 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y ) wxCoord by = y + size - text_descent; // baseline fprintf( m_pstream, "%d %d moveto\n", XLOG2DEV(x), YLOG2DEV(by) ); - /* I don't know how to write char to a stream, so I use a mini string */ - char tmpbuf[2]; - tmpbuf[1] = 0; - fprintf( m_pstream, "(" ); const wxWX2MBbuf textbuf = text.mb_str(); int len = strlen(textbuf); @@ -1208,8 +1237,7 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y ) { /* Cope with special characters */ fprintf( m_pstream, "\\" ); - tmpbuf[0] = (char) c; - fprintf( m_pstream, tmpbuf ); + fputc(c, m_pstream); } else if ( c >= 128 ) { @@ -1218,8 +1246,7 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y ) } else { - tmpbuf[0] = (char) c; - fprintf( m_pstream, tmpbuf ); + fputc(c, m_pstream); } } @@ -1228,17 +1255,21 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y ) if (m_font.GetUnderlined()) { wxCoord uy = (wxCoord)(y + size - m_underlinePosition); + char buffer[100]; - fprintf( m_pstream, + sprintf( buffer, "gsave\n" "%d %d moveto\n" - "%d setlinewidth\n" + "%f setlinewidth\n" "%d %d lineto\n" "stroke\n" "grestore\n", XLOG2DEV(x), YLOG2DEV(uy), - (wxCoord)m_underlineThickness, + m_underlineThickness, XLOG2DEV(x + text_w), YLOG2DEV(uy) ); + for (i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); } CalcBoundingBox( x, y ); @@ -1283,9 +1314,13 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord double bluePS = (double)(blue) / 255.0; double greenPS = (double)(green) / 255.0; - fprintf( m_pstream, - "%.8f %.8f %.8f setrgbcolor\n", - redPS, greenPS, bluePS ); + char buffer[100]; + sprintf( buffer, + "%.8f %.8f %.8f setrgbcolor\n", + redPS, greenPS, bluePS ); + for (int i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); m_currentRed = red; m_currentBlue = blue; @@ -1299,17 +1334,18 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord // FIXME only correct for 90 degrees fprintf(m_pstream, "%d %d moveto\n", - XLOG2DEV((wxCoord)(x + size)), YLOG2DEV(by) ); - fprintf(m_pstream, "%.8f rotate\n", angle); + XLOG2DEV((wxCoord)(x + size)), YLOG2DEV((wxCoord)by) ); - /* I don't know how to write char to a stream, so I use a mini string */ - char tmpbuf[2]; - tmpbuf[1] = 0; + char buffer[100]; + sprintf(buffer, "%.8f rotate\n", angle); + int i; + for (i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf(m_pstream, buffer); fprintf( m_pstream, "(" ); const wxWX2MBbuf textbuf = text.mb_str(); int len = strlen(textbuf); - int i; for (i = 0; i < len; i++) { int c = (unsigned char) textbuf[i]; @@ -1317,8 +1353,7 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord { /* Cope with special characters */ fprintf( m_pstream, "\\" ); - tmpbuf[0] = (char) c; - fprintf( m_pstream, tmpbuf ); + fputc(c, m_pstream); } else if ( c >= 128 ) { @@ -1327,30 +1362,37 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord } else { - tmpbuf[0] = (char) c; - fprintf( m_pstream, tmpbuf ); + fputc(c, m_pstream); } } fprintf( m_pstream, ") show\n" ); - fprintf( m_pstream, "%.8f rotate\n", -angle ); + + sprintf( buffer, "%.8f rotate\n", -angle ); + for (i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); if (m_font.GetUnderlined()) { wxCoord uy = (wxCoord)(y + size - m_underlinePosition); wxCoord w, h; + char buffer[100]; GetTextExtent(text, &w, &h); - fprintf( m_pstream, + sprintf( buffer, "gsave\n" "%d %d moveto\n" - "%ld setlinewidth\n" + "%f setlinewidth\n" "%d %d lineto\n" "stroke\n" "grestore\n", XLOG2DEV(x), YLOG2DEV(uy), - (long)m_underlineThickness, + m_underlineThickness, XLOG2DEV(x + w), YLOG2DEV(uy) ); + for (i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); } CalcBoundingBox( x, y ); @@ -1486,8 +1528,8 @@ void wxPostScriptDC::DoGetSize(int* width, int* height) const h = tmp; } - if (width) *width = w; - if (height) *height = h; + if (width) *width = (int)(w * ms_PSScaleFactor); + if (height) *height = (int)(h * ms_PSScaleFactor); } void wxPostScriptDC::DoGetSizeMM(int *width, int *height) const @@ -1520,7 +1562,8 @@ void wxPostScriptDC::DoGetSizeMM(int *width, int *height) const // Resolution in pixels per logical inch wxSize wxPostScriptDC::GetPPI(void) const { - return wxSize(72, 72); + return wxSize((int)(72 * ms_PSScaleFactor), + (int)(72 * ms_PSScaleFactor)); } @@ -1538,7 +1581,7 @@ bool wxPostScriptDC::StartDoc( const wxString& message ) if (!m_pstream) { - wxMessageBox( _("Cannot open file for PostScript printing!"), _("Error"), wxOK ); + wxLogError( _("Cannot open file for PostScript printing!")); m_ok = FALSE; return FALSE; } @@ -1623,10 +1666,26 @@ void wxPostScriptDC::EndDoc () // Compute the bounding box. Note that it is in the default user // coordinate system, thus we have to convert the values. - wxCoord llx = (wxCoord) ((XLOG2DEV(m_minX)+wx_printer_translate_x)*wx_printer_scale_x); - wxCoord lly = (wxCoord) ((YLOG2DEV(m_minY)+wx_printer_translate_y)*wx_printer_scale_y); - wxCoord urx = (wxCoord) ((XLOG2DEV(m_maxX)+wx_printer_translate_x)*wx_printer_scale_x); - wxCoord ury = (wxCoord) ((YLOG2DEV(m_maxY)+wx_printer_translate_y)*wx_printer_scale_y); + wxCoord minX = (wxCoord) XLOG2DEV(m_minX); + wxCoord minY = (wxCoord) YLOG2DEV(m_minY); + wxCoord maxX = (wxCoord) XLOG2DEV(m_maxX); + wxCoord maxY = (wxCoord) YLOG2DEV(m_maxY); + + // LOG2DEV may have changed the minimum to maximum vice versa + if ( minX > maxX ) { wxCoord tmp = minX; minX = maxX; maxX = tmp; } + if ( minY > maxY ) { wxCoord tmp = minY; minY = maxY; maxY = tmp; } + + // account for used scaling (boundingbox is before scaling in ps-file) + double scale_x = m_printData.GetPrinterScaleX() / ms_PSScaleFactor; + double scale_y = m_printData.GetPrinterScaleY() / ms_PSScaleFactor; + + wxCoord llx, lly, urx, ury; + llx = (wxCoord) ((minX+wx_printer_translate_x)*scale_x); + lly = (wxCoord) ((minY+wx_printer_translate_y)*scale_y); + urx = (wxCoord) ((maxX+wx_printer_translate_x)*scale_x); + ury = (wxCoord) ((maxY+wx_printer_translate_y)*scale_y); + // (end of bounding box computation) + // If we're landscape, our sense of "x" and "y" is reversed. if (m_printData.GetOrientation() == wxLANDSCAPE) @@ -1755,7 +1814,13 @@ void wxPostScriptDC::StartPage() // fprintf( m_pstream, "90 rotate llx neg ury nef translate\n" ); } - fprintf( m_pstream, "%.8f %.8f scale\n", scale_x, scale_y ); + char buffer[100]; + sprintf( buffer, "%.8f %.8f scale\n", scale_x / ms_PSScaleFactor, + scale_y / ms_PSScaleFactor); + for (int i = 0; i < 100; i++) + if (buffer[i] == ',') buffer[i] = '.'; + fprintf( m_pstream, buffer ); + fprintf( m_pstream, "%d %d translate\n", translate_x, translate_y ); } @@ -1792,7 +1857,7 @@ bool wxPostScriptDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord wxPostScriptDC::GetCharHeight() const { if (m_font.Ok()) - return m_font.GetPointSize(); + return m_font.GetPointSize(); else return 12; } @@ -1807,8 +1872,6 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, if (!fontToUse) fontToUse = (wxFont*) &m_font; wxCHECK_RET( fontToUse, wxT("GetTextExtent: no font defined") ); - wxCHECK_RET( x, wxT("GetTextExtent: x == NULL") ); - wxCHECK_RET( y, wxT("GetTextExtent: y == NULL") ); const wxWX2MBbuf strbuf = string.mb_str(); @@ -1880,10 +1943,10 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, double UnderlineThickness = 0.0; /* get actual parameters */ - const int Family = fontToUse->GetFamily(); - const int Size = fontToUse->GetPointSize(); - const int Style = fontToUse->GetStyle(); - const int Weight = fontToUse->GetWeight(); + int Family = fontToUse->GetFamily(); + int Size = fontToUse->GetPointSize(); + int Style = fontToUse->GetStyle(); + int Weight = fontToUse->GetWeight(); /* if we have another font, read the font-metrics */ if (Family!=lastFamily || Size!=lastSize || Style!=lastStyle || Weight!=lastWeight) @@ -1899,29 +1962,37 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, switch (Family) { case wxMODERN: - { - if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "CourBoO"; - else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "CourBo"; - else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "CourO"; - else name = "Cour"; - } + case wxTELETYPE: + { + if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "CourBoO.afm"; + else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "CourBo.afm"; + else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "CourO.afm"; + else name = "Cour.afm"; break; + } case wxROMAN: - { - if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "TimesBoO"; - else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "TimesBo"; - else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "TimesO"; - else name = "TimesRo"; - } + { + if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "TimesBoO.afm"; + else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "TimesBo.afm"; + else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "TimesO.afm"; + else name = "TimesRo.afm"; break; + } + case wxSCRIPT: + { + name = "Zapf.afm"; + Style = wxNORMAL; + Weight = wxNORMAL; + } + case wxSWISS: default: - { - if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "HelvBoO"; - else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "HelvBo"; - else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "HelvO"; - else name = "Helv"; - } + { + if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "HelvBoO.afm"; + else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "HelvBo.afm"; + else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "HelvO.afm"; + else name = "Helv.afm"; break; + } } /* get the directory of the AFM files */ @@ -1947,17 +2018,17 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, /* new elements JC Sun Aug 25 23:21:44 MET DST 1996 */ - afmName << name << wxT(".afm"); + afmName << name; FILE *afmFile = wxFopen(afmName,wxT("r")); + if (afmFile==NULL) { afmName = wxThePrintSetupData->GetAFMPath(); - afmName << wxFILE_SEP_PATH << name << wxT(".afm"); + afmName << wxFILE_SEP_PATH << name; afmFile = wxFopen(afmName,wxT("r")); } -#ifdef __UNIX__ -#ifndef __VMS__ +#if defined(__UNIX__) && !defined(__VMS__) if (afmFile==NULL) /* please do NOT change the line above to "else if (afmFile==NULL)" - - afmFile = fopen() may fail and in that case the next if branch @@ -1967,17 +2038,20 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, afmName << wxFILE_SEP_PATH << wxT("share") << wxFILE_SEP_PATH << wxT("wx") << wxFILE_SEP_PATH +#if defined(__LINUX__) || defined(__FREEBSD__) + << wxT("gs_afm") << wxFILE_SEP_PATH +#else << wxT("afm") << wxFILE_SEP_PATH - << name << wxT(".afm"); +#endif + << name; afmFile = wxFopen(afmName,wxT("r")); } -#endif #endif if (afmFile==NULL) { - wxLogDebug( wxT("GetTextExtent: can't open AFM file '%hs'\n"), afmName.c_str() ); - wxLogDebug( wxT(" using approximate values\n")); + wxLogDebug( wxT("GetTextExtent: can't open AFM file '%hs'"), afmName.c_str() ); + wxLogDebug( wxT(" using approximate values")); for (int i=0; i<256; i++) lastWidths[i] = 500; /* an approximate value */ lastDescender = -150; /* dito. */ } @@ -1999,7 +2073,7 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, if ((sscanf(line,"%s%d",descString,&lastDescender)!=2) || (strcmp(descString,"Descender")!=0)) { - wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad descender)\n"), afmName.c_str(),line ); + wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad descender)"), afmName.c_str(),line ); } } /* JC 1.) check for UnderlinePosition */ @@ -2008,7 +2082,7 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, if ((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2) || (strcmp(upString,"UnderlinePosition")!=0)) { - wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlinePosition)\n"), afmName.c_str(), line ); + wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlinePosition)"), afmName.c_str(), line ); } } /* JC 2.) check for UnderlineThickness */ @@ -2017,7 +2091,7 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, if ((sscanf(line,"%s%lf",utString,&UnderlineThickness)!=2) || (strcmp(utString,"UnderlineThickness")!=0)) { - wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlineThickness)\n"), afmName.c_str(), line ); + wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad UnderlineThickness)"), afmName.c_str(), line ); } } /* JC 3.) check for EncodingScheme */ @@ -2026,11 +2100,11 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, if ((sscanf(line,"%s%s",utString,encString)!=2) || (strcmp(utString,"EncodingScheme")!=0)) { - wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad EncodingScheme)\n"), afmName.c_str(), line ); + wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (bad EncodingScheme)"), afmName.c_str(), line ); } else if (strncmp(encString, "AdobeStandardEncoding", 21)) { - wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (unsupported EncodingScheme %hs)\n"), + wxLogDebug( wxT("AFM-file '%hs': line '%hs' has error (unsupported EncodingScheme %hs)"), afmName.c_str(),line, encString); } } @@ -2039,11 +2113,11 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, { if (sscanf(line,"%s%d%s%s%d",cString,&ascii,semiString,WXString,&cWidth)!=5) { - wxLogDebug(wxT("AFM-file '%hs': line '%hs' has an error (bad character width)\n"),afmName.c_str(),line); + wxLogDebug(wxT("AFM-file '%hs': line '%hs' has an error (bad character width)"),afmName.c_str(),line); } if(strcmp(cString,"C")!=0 || strcmp(semiString,";")!=0 || strcmp(WXString,"WX")!=0) { - wxLogDebug(wxT("AFM-file '%hs': line '%hs' has a format error\n"),afmName.c_str(),line); + wxLogDebug(wxT("AFM-file '%hs': line '%hs' has a format error"),afmName.c_str(),line); } /* printf(" char '%c'=%d has width '%d'\n",ascii,ascii,cWidth); */ if (ascii>=0 && ascii<256) @@ -2053,7 +2127,7 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, else { /* MATTHEW: this happens a lot; don't print an error */ - /* wxLogDebug("AFM-file '%s': ASCII value %d out of range\n",afmName.c_str(),ascii); */ + /* wxLogDebug("AFM-file '%s': ASCII value %d out of range",afmName.c_str(),ascii); */ } } /* C.) ignore other entries. */ @@ -2071,38 +2145,43 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, lastWidths[220] = lastWidths['U']; // Ü lastWidths[252] = lastWidths['u']; // ü lastWidths[223] = lastWidths[251]; // ß - } - /* JC: calculate UnderlineThickness/UnderlinePosition */ - { + /* JC: calculate UnderlineThickness/UnderlinePosition */ + // VS: dirty, but is there any better solution? double *pt; pt = (double*) &m_underlinePosition; - *pt = UnderlinePosition * fontToUse->GetPointSize() / 1000.0f; + *pt = YLOG2DEVREL((wxCoord)(UnderlinePosition * fontToUse->GetPointSize())) / 1000.0f; pt = (double*) &m_underlineThickness; - *pt = UnderlineThickness * fontToUse->GetPointSize() / 1000.0f * m_scaleFactor; + *pt = YLOG2DEVREL((wxCoord)(UnderlineThickness * fontToUse->GetPointSize())) / 1000.0f; + } + /* 3. now the font metrics are read in, calc size this / is done by adding the widths of the characters in the / string. they are given in 1/1000 of the size! */ - double widthSum=0; + long sum=0; wxCoord height=Size; /* by default */ unsigned char *p; for(p=(unsigned char *)wxMBSTRINGCAST strbuf; *p; p++) { if(lastWidths[*p]== INT_MIN) { - wxLogDebug(wxT("GetTextExtent: undefined width for character '%hc' (%d)\n"), *p,*p); - widthSum += (lastWidths[' ']/1000.0F * Size); /* assume space */ + wxLogDebug(wxT("GetTextExtent: undefined width for character '%hc' (%d)"), *p,*p); + sum += lastWidths[' ']; /* assume space */ } else { - widthSum += ((lastWidths[*p]/1000.0F)*Size); + sum += lastWidths[*p]; } } + double widthSum = sum; + widthSum *= Size; + widthSum /= 1000.0F; + /* add descender to height (it is usually a negative value) */ //if (lastDescender != INT_MIN) //{ @@ -2445,7 +2524,8 @@ void wxPrintSetupData::operator=(const wxPrintData& data) SetPrinterCommand(data.GetPrinterCommand()); SetPrintPreviewCommand(data.GetPreviewCommand()); SetPrinterOptions(data.GetPrinterOptions()); - SetPrinterTranslation(data.GetPrinterTranslateX(), data.GetPrinterTranslateY()); + SetPrinterTranslation((wxCoord)data.GetPrinterTranslateX(), + (wxCoord)data.GetPrinterTranslateY()); SetPrinterScaling(data.GetPrinterScaleX(), data.GetPrinterScaleY()); SetPrinterOrientation(data.GetOrientation()); SetPrinterMode((int) data.GetPrintMode()); diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index ba118204be..e16a675082 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -38,6 +38,7 @@ #include "wx/icon.h" #include "wx/log.h" #include "wx/sizer.h" +#include "wx/tokenzr.h" #if wxUSE_STATLINE #include "wx/statline.h" @@ -170,18 +171,21 @@ wxDirCtrl::wxDirCtrl(void) m_showHidden = FALSE; } -wxDirCtrl::wxDirCtrl(wxWindow *parent, const wxWindowID id, const wxString &WXUNUSED(dir), - const wxPoint& pos, const wxSize& size, - const long style, const wxString& name ) - : - wxTreeCtrl( parent, id, pos, size, style, wxDefaultValidator, name ) +wxDirCtrl::wxDirCtrl(wxWindow *parent, + const wxWindowID id, + const wxString &WXUNUSED(dir), + const wxPoint& pos, + const wxSize& size, + const long style, + const wxString& name ) + : wxTreeCtrl( parent, id, pos, size, style, wxDefaultValidator, name ) { - #ifndef __WXMSW__ +#ifndef __WXMSW__ m_imageListNormal = new wxImageList(16, 16, TRUE); m_imageListNormal->Add(wxICON(icon1)); m_imageListNormal->Add(wxICON(icon2)); SetImageList(m_imageListNormal); - #endif +#endif // !MSW m_showHidden = FALSE; m_rootId = AddRoot( _("Sections") ); @@ -207,8 +211,8 @@ void wxDirCtrl::SetupSections() wxGetHomeDir(&home); ADD_SECTION(home, _("My Home") ) ADD_SECTION(wxT("/mnt"), _("Mounted Devices") ) - ADD_SECTION(wxT("/usr"), _("User") ) ADD_SECTION(wxT("/usr/local"), _("User Local") ) + ADD_SECTION(wxT("/usr"), _("User") ) ADD_SECTION(wxT("/var"), _("Variables") ) ADD_SECTION(wxT("/etc"), _("Etcetera") ) ADD_SECTION(wxT("/tmp"), _("Temporary") ) @@ -223,14 +227,15 @@ void wxDirCtrl::CreateItems(const wxTreeItemId &parent) // wxASSERT(m_paths.Count() == m_names.Count()); ? - for (unsigned int i=0; im_hasSubDirs) SetItemHasChildren(id); } @@ -258,12 +263,12 @@ void wxDirCtrl::OnEndEditItem(wxTreeEvent &event) if ((event.GetLabel().IsEmpty()) || (event.GetLabel() == _(".")) || (event.GetLabel() == _("..")) || - (event.GetLabel().First( wxT("/") ) != wxNOT_FOUND)) + (event.GetLabel().First( wxT("/") ) != wxNOT_FOUND)) { wxMessageDialog dialog(this, _("Illegal directory name."), _("Error"), wxOK | wxICON_ERROR ); - dialog.ShowModal(); + dialog.ShowModal(); event.Veto(); - return; + return; } wxTreeItemId id = event.GetItem(); @@ -279,7 +284,7 @@ void wxDirCtrl::OnEndEditItem(wxTreeEvent &event) if (wxFileExists(new_name)) { wxMessageDialog dialog(this, _("File name exists already."), _("Error"), wxOK | wxICON_ERROR ); - dialog.ShowModal(); + dialog.ShowModal(); event.Veto(); } @@ -290,7 +295,7 @@ void wxDirCtrl::OnEndEditItem(wxTreeEvent &event) else { wxMessageDialog dialog(this, _("Operation not permitted."), _("Error"), wxOK | wxICON_ERROR ); - dialog.ShowModal(); + dialog.ShowModal(); event.Veto(); } } @@ -315,9 +320,9 @@ void wxDirCtrl::OnExpandItem(wxTreeEvent &event) m_paths.Clear(); m_names.Clear(); #ifdef __WXMSW__ - search = data->m_path + "\\*.*"; + search = data->m_path + _T("\\*.*"); #else - search = data->m_path + "/*"; + search = data->m_path + _T("/*"); #endif for (path = wxFindFirstFile( search, wxDIR ); !path.IsNull(); path=wxFindNextFile() ) @@ -326,7 +331,8 @@ void wxDirCtrl::OnExpandItem(wxTreeEvent &event) /* Don't add "." and ".." to the tree. I think wxFindNextFile * also checks this, but I don't quite understand what happens * there. Also wxFindNextFile seems to swallow hidden dirs */ - if ((filename != ".") && (filename != "..")) + if ( (filename != _T(".")) && (filename != _T("..")) + && (filename[0u] != _T('.'))) { m_paths.Add(path); m_names.Add(filename); @@ -373,11 +379,13 @@ BEGIN_EVENT_TABLE( wxDirDialog, wxDialog ) // EVT_CHECKBOX (ID_CHECK, wxDirDialog::OnCheck) END_EVENT_TABLE() -wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, - const wxString& defaultPath, long style, - const wxPoint& pos) : - wxDialog(parent, -1, message, pos, wxSize(300,300), - wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) +wxDirDialog::wxDirDialog(wxWindow *parent, + const wxString& message, + const wxString& defaultPath, + long style, + const wxPoint& pos) + : wxDialog(parent, -1, message, pos, wxSize(300,300), + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { m_message = message; m_dialogStyle = style; @@ -390,8 +398,12 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); // 1) dir ctrl - m_dir = new wxDirCtrl( this, ID_DIRCTRL, "/", wxDefaultPosition, wxSize(200,200), - wxTR_HAS_BUTTONS | wxSUNKEN_BORDER | wxTR_EDIT_LABELS); + m_dir = new wxDirCtrl( this, ID_DIRCTRL, _T("/"), + wxDefaultPosition, + wxSize(200,200), + wxTR_HAS_BUTTONS | + wxSUNKEN_BORDER | + wxTR_EDIT_LABELS ); topsizer->Add( m_dir, 1, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, 10 ); // 2) text ctrl @@ -428,6 +440,66 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, Centre( wxBOTH ); + if (m_path == wxT("~")) + wxGetHomeDir( &m_path ); + + // choose the directory corresponding to defaultPath in the tree + // VZ: using wxStringTokenizer is probably unsafe here (escaped slashes + // will not be processed correctly...) + wxStringTokenizer tk(m_path, wxFILE_SEP_PATH, wxTOKEN_STRTOK); + + wxString path; + + long cookie = 0; + // default to root dir + wxTreeItemId item = m_dir->GetFirstChild(m_dir->GetRootItem(), cookie); + + if (!m_path.IsEmpty() && (m_path != wxT("/")) && (m_dir->m_paths.Count() > 1)) + { + size_t count = m_dir->m_paths.GetCount(); + for ( size_t i=1; im_paths[i] ) == 0) + { + path = m_dir->m_paths[i]; + + for (size_t j = 0; j < i; j++) + item = m_dir->GetNextChild(m_dir->GetRootItem(), cookie); + + wxStringTokenizer tk2(path, wxFILE_SEP_PATH, wxTOKEN_STRTOK); + for (size_t h = 0; h < tk2.CountTokens(); h++) + tk.GetNextToken(); + + break; + } + } + } + while ( tk.HasMoreTokens() && item.IsOk() ) + { + path << wxFILE_SEP_PATH << tk.GetNextToken(); + + m_dir->Expand(item); + + wxTreeItemId child = m_dir->GetFirstChild(item, cookie); + while ( child.IsOk() ) + { + wxDirItemData *data = (wxDirItemData*)m_dir->GetItemData(child); + if ( data->m_path == path ) + break; + + child = m_dir->GetNextChild(item, cookie); + } + + item = child; + } + + if ( item.IsOk() ) + { + m_dir->Expand(item); + m_dir->SelectItem(item); + m_dir->EnsureVisible(item); + } + wxEndBusyCursor(); } @@ -514,24 +586,24 @@ void wxDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) { // try NewName0, NewName1 etc. int i = 0; - do { + do { new_name = wxT("NewName"); - wxString num; - num.Printf( wxT("%d"), i ); - new_name += num; + wxString num; + num.Printf( wxT("%d"), i ); + new_name += num; path = data->m_path; path += wxT("/"); path += new_name; - i++; - } while (wxFileExists(path)); + i++; + } while (wxFileExists(path)); } wxLogNull log; if (!wxMkdir(path)) { wxMessageDialog dialog(this, _("Operation not permitted."), _("Error"), wxOK | wxICON_ERROR ); - dialog.ShowModal(); + dialog.ShowModal(); return; } @@ -548,4 +620,4 @@ void wxDirDialog::OnCheck( wxCommandEvent& WXUNUSED(event) ) } */ -#endif +#endif // wxUSE_DIRDLG diff --git a/src/generic/dragimgg.cpp b/src/generic/dragimgg.cpp index dc79dc7d74..37071c5a03 100644 --- a/src/generic/dragimgg.cpp +++ b/src/generic/dragimgg.cpp @@ -68,11 +68,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxGenericDragImage, wxObject) // wxGenericDragImage ctors/dtor // ---------------------------------------------------------------------------- -wxGenericDragImage::wxGenericDragImage() -{ - Init(); -} - wxGenericDragImage::~wxGenericDragImage() { if (m_windowDC) @@ -88,6 +83,7 @@ void wxGenericDragImage::Init() m_windowDC = (wxDC*) NULL; m_window = (wxWindow*) NULL; m_fullScreen = FALSE; + m_pBackingBitmap = (wxBitmap*) NULL; } // Attributes @@ -97,6 +93,15 @@ void wxGenericDragImage::Init() // Operations //////////////////////////////////////////////////////////////////////////// +// Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect) +bool wxGenericDragImage::Create(const wxCursor& cursor, const wxPoint& hotspot) +{ + m_cursor = cursor; + m_hotspot = hotspot; + + return TRUE; +} + // Create a drag image from a bitmap and optional cursor bool wxGenericDragImage::Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& hotspot) { @@ -183,13 +188,15 @@ bool wxGenericDragImage::Create(const wxListCtrl& listCtrl, long id) } // Begin drag -bool wxGenericDragImage::BeginDrag(const wxPoint& WXUNUSED(hotspot), +bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen, wxRect* rect) { wxASSERT_MSG( (window != 0), wxT("Window must not be null in BeginDrag.")); + // The image should be offset by this amount + m_offset = hotspot; m_window = window; m_fullScreen = fullScreen; @@ -238,8 +245,10 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& WXUNUSED(hotspot), } } - if (!m_backingBitmap.Ok() || (m_backingBitmap.GetWidth() < clientSize.x || m_backingBitmap.GetHeight() < clientSize.y)) - m_backingBitmap = wxBitmap(clientSize.x, clientSize.y); + wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap); + + if (!backing->Ok() || (backing->GetWidth() < clientSize.x || backing->GetHeight() < clientSize.y)) + (*backing) = wxBitmap(clientSize.x, clientSize.y); if (!m_fullScreen) m_windowDC = new wxClientDC(window); @@ -308,7 +317,7 @@ bool wxGenericDragImage::EndDrag() // is non-NULL, or in screen coordinates if NULL. bool wxGenericDragImage::Move(const wxPoint& pt) { - wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), "No window DC in wxGenericDragImage::Move()" ); + wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Move()") ); // Erase at old position, then show at the current position wxPoint oldPos = m_position; @@ -316,7 +325,7 @@ bool wxGenericDragImage::Move(const wxPoint& pt) bool eraseOldImage = (m_isDirty && m_isShown); if (m_isShown) - RedrawImage(oldPos, pt, eraseOldImage, TRUE); + RedrawImage(oldPos - m_offset, pt - m_offset, eraseOldImage, TRUE); m_position = pt; @@ -328,7 +337,7 @@ bool wxGenericDragImage::Move(const wxPoint& pt) bool wxGenericDragImage::Show() { - wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), "No window DC in wxGenericDragImage::Show()" ); + wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Show()") ); // Show at the current position @@ -337,12 +346,16 @@ bool wxGenericDragImage::Show() // This is where we restore the backing bitmap, in case // something has changed on the window. + wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap); wxMemoryDC memDC; - memDC.SelectObject(m_backingBitmap); - memDC.Blit(0, 0, m_boundingRect.width, m_boundingRect.height, m_windowDC, m_boundingRect.x, m_boundingRect.y); + memDC.SelectObject(* backing); + + UpdateBackingFromWindow(* m_windowDC, memDC, m_boundingRect, wxRect(0, 0, m_boundingRect.width, m_boundingRect.height)); + + //memDC.Blit(0, 0, m_boundingRect.width, m_boundingRect.height, m_windowDC, m_boundingRect.x, m_boundingRect.y); memDC.SelectObject(wxNullBitmap); - RedrawImage(m_position, m_position, FALSE, TRUE); + RedrawImage(m_position - m_offset, m_position - m_offset, FALSE, TRUE); } m_isShown = TRUE; @@ -351,15 +364,21 @@ bool wxGenericDragImage::Show() return TRUE; } +bool wxGenericDragImage::UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC, + const wxRect& sourceRect, const wxRect& destRect) const +{ + return destDC.Blit(destRect.x, destRect.y, destRect.width, destRect.height, & windowDC, sourceRect.x, sourceRect.y); +} + bool wxGenericDragImage::Hide() { - wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), "No window DC in wxGenericDragImage::Hide()" ); + wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Hide()") ); // Repair the old position if (m_isShown && m_isDirty) { - RedrawImage(m_position, m_position, TRUE, FALSE); + RedrawImage(m_position - m_offset, m_position - m_offset, TRUE, FALSE); } m_isShown = FALSE; @@ -375,7 +394,8 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, const wxPoint& newPo if (!m_windowDC) return FALSE; - if (!m_backingBitmap.Ok()) + wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap); + if (!backing->Ok()) return FALSE; wxRect oldRect(GetImageRect(oldPos)); @@ -413,7 +433,7 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, const wxPoint& newPo } wxMemoryDC memDC; - memDC.SelectObject(m_backingBitmap); + memDC.SelectObject(* backing); wxMemoryDC memDCTemp; memDCTemp.SelectObject(m_repairBitmap); @@ -429,12 +449,8 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, const wxPoint& newPo // If drawing, draw the image onto the mem DC if (drawNew) { - int x = newPos.x - fullRect.x; - int y = newPos.y - fullRect.y; - if (m_bitmap.Ok()) - memDCTemp.DrawBitmap(m_bitmap, x, y, (m_bitmap.GetMask() != 0)); - else if (m_icon.Ok()) - memDCTemp.DrawIcon(m_icon, x, y); + wxPoint pos(newPos.x - fullRect.x, newPos.y - fullRect.y) ; + DoDrawImage(memDCTemp, pos); } // Now blit to the window @@ -447,6 +463,24 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, const wxPoint& newPo return TRUE; } +// Override this if you are using a virtual image (drawing your own image) +bool wxGenericDragImage::DoDrawImage(wxDC& dc, const wxPoint& pos) const +{ + if (m_bitmap.Ok()) + { + dc.DrawBitmap(m_bitmap, pos.x, pos.y, (m_bitmap.GetMask() != 0)); + return TRUE; + } + else if (m_icon.Ok()) + { + dc.DrawIcon(m_icon, pos.x, pos.y); + return TRUE; + } + else + return FALSE; +} + +// Override this if you are using a virtual image (drawing your own image) wxRect wxGenericDragImage::GetImageRect(const wxPoint& pos) const { if (m_bitmap.Ok()) diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index ed7c974c9b..07044e5f23 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -534,7 +534,7 @@ void wxFileCtrl::Update() InsertColumn( 1, _("Size"), wxLIST_FORMAT_LEFT, 60 ); InsertColumn( 2, _("Date"), wxLIST_FORMAT_LEFT, 65 ); InsertColumn( 3, _("Time"), wxLIST_FORMAT_LEFT, 50 ); - InsertColumn( 4, _("Permissions"), wxLIST_FORMAT_LEFT, 120 ); + InsertColumn( 4, _("Permissions"), wxLIST_FORMAT_LEFT, 110 ); } wxFileData *fd = (wxFileData *) NULL; wxListItem item; @@ -557,7 +557,7 @@ void wxFileCtrl::Update() res = wxFileNameFromPath( f ); fd = new wxFileData( res, f ); wxString s = fd->GetName(); - if (m_showHidden || (s[0] != wxT('.'))) + if (m_showHidden || (s[0u] != wxT('.'))) { Add( fd, item ); item.m_itemId++; @@ -572,7 +572,7 @@ void wxFileCtrl::Update() res = wxFileNameFromPath( f ); fd = new wxFileData( res, f ); wxString s = fd->GetName(); - if (m_showHidden || (s[0] != wxT('.'))) + if (m_showHidden || (s[0u] != wxT('.'))) { Add( fd, item ); item.m_itemId++; @@ -582,9 +582,12 @@ void wxFileCtrl::Update() SortItems( ListCompare, 0 ); - SetColumnWidth( 1, wxLIST_AUTOSIZE ); - SetColumnWidth( 2, wxLIST_AUTOSIZE ); - SetColumnWidth( 3, wxLIST_AUTOSIZE ); + if (my_style & wxLC_REPORT) + { + SetColumnWidth( 1, wxLIST_AUTOSIZE ); + SetColumnWidth( 2, wxLIST_AUTOSIZE ); + SetColumnWidth( 3, wxLIST_AUTOSIZE ); + } } void wxFileCtrl::SetWild( const wxString &wild ) @@ -891,10 +894,10 @@ wxFileDialog::wxFileDialog(wxWindow *parent, if (m_dialogStyle & wxMULTIPLE) m_list = new wxFileCtrl( this, ID_LIST_CTRL, m_dir, firstWild, wxDefaultPosition, - wxSize(440,180), s_lastViewStyle | wxSUNKEN_BORDER ); + wxSize(510,180), s_lastViewStyle | wxSUNKEN_BORDER ); else m_list = new wxFileCtrl( this, ID_LIST_CTRL, m_dir, firstWild, wxDefaultPosition, - wxSize(440,180), s_lastViewStyle | wxSUNKEN_BORDER | wxLC_SINGLE_SEL ); + wxSize(510,180), s_lastViewStyle | wxSUNKEN_BORDER | wxLC_SINGLE_SEL ); m_list -> ShowHidden(s_lastShowHidden); mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 ); @@ -1023,7 +1026,7 @@ void wxFileDialog::HandleAction( const wxString &fn ) return; } - if (filename[0] == wxT('~')) + if (filename[0u] == wxT('~')) { filename.Remove( 0, 1 ); wxString tmp( wxGetUserHome() ); @@ -1045,7 +1048,7 @@ void wxFileDialog::HandleAction( const wxString &fn ) } if (dir != wxT("/")) dir += wxT("/"); - if (filename[0] != wxT('/')) + if (filename[0u] != wxT('/')) { dir += filename; filename = dir; diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 2a8075f226..e2dfefc12e 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -21,7 +21,7 @@ #pragma implementation "grid.h" #endif -// For compilers that support precompilation, includes "wx/wx.h". +// For compilers that support precompilatixon, includes "wx/wx.h". #include "wx/wxprec.h" #include "wx/defs.h" @@ -71,7 +71,7 @@ // array classes // ---------------------------------------------------------------------------- -WX_DEFINE_ARRAY(wxGridCellAttr *, wxArrayAttrs); +WX_DEFINE_EXPORTED_ARRAY(wxGridCellAttr *, wxArrayAttrs); struct wxGridCellWithAttr { @@ -89,7 +89,7 @@ struct wxGridCellWithAttr wxGridCellAttr *attr; }; -WX_DECLARE_OBJARRAY(wxGridCellWithAttr, wxGridCellWithAttrArray); +WX_DECLARE_EXPORTED_OBJARRAY(wxGridCellWithAttr, wxGridCellWithAttrArray); #include "wx/arrimpl.cpp" @@ -113,6 +113,7 @@ private: void OnPaint( wxPaintEvent& event ); void OnMouseEvent( wxMouseEvent& event ); void OnKeyDown( wxKeyEvent& event ); + void OnKeyUp( wxKeyEvent& ); DECLARE_DYNAMIC_CLASS(wxGridRowLabelWindow) DECLARE_EVENT_TABLE() @@ -132,6 +133,7 @@ private: void OnPaint( wxPaintEvent &event ); void OnMouseEvent( wxMouseEvent& event ); void OnKeyDown( wxKeyEvent& event ); + void OnKeyUp( wxKeyEvent& ); DECLARE_DYNAMIC_CLASS(wxGridColLabelWindow) DECLARE_EVENT_TABLE() @@ -150,6 +152,7 @@ private: void OnMouseEvent( wxMouseEvent& event ); void OnKeyDown( wxKeyEvent& event ); + void OnKeyUp( wxKeyEvent& ); void OnPaint( wxPaintEvent& event ); DECLARE_DYNAMIC_CLASS(wxGridCornerLabelWindow) @@ -182,6 +185,7 @@ private: void OnPaint( wxPaintEvent &event ); void OnMouseEvent( wxMouseEvent& event ); void OnKeyDown( wxKeyEvent& ); + void OnKeyUp( wxKeyEvent& ); void OnEraseBackground( wxEraseEvent& ); @@ -292,7 +296,7 @@ struct wxGridDataTypeInfo }; -WX_DEFINE_ARRAY(wxGridDataTypeInfo*, wxGridDataTypeInfoArray); +WX_DEFINE_EXPORTED_ARRAY(wxGridDataTypeInfo*, wxGridDataTypeInfoArray); class WXDLLEXPORT wxGridTypeRegistry @@ -350,8 +354,10 @@ wxGridCellCoords wxGridNoCellCoords( -1, -1 ); wxRect wxGridNoCellRect( -1, -1, -1, -1 ); // scroll line size -// TODO: fixed so far - make configurable later (and also different for x/y) -static const size_t GRID_SCROLL_LINE = 10; +// TODO: this doesn't work at all, grid cells have different sizes and approx +// calculations don't work as because of the size mismatch scrollbars +// sometimes fail to be shown when they should be or vice versa +static const size_t GRID_SCROLL_LINE = 1; // the size of hash tables used a bit everywhere (the max number of elements // in these hash tables is the number of rows/columns) @@ -467,6 +473,11 @@ void wxGridCellEditor::HandleReturn(wxKeyEvent& event) event.Skip(); } +bool wxGridCellEditor::IsAcceptedKey(wxKeyEvent& event) +{ + // accept the simple key presses, not anything with Ctrl/Alt/Meta + return !(event.ControlDown() || event.AltDown()); +} void wxGridCellEditor::StartingKey(wxKeyEvent& event) { @@ -493,7 +504,8 @@ void wxGridCellTextEditor::Create(wxWindow* parent, m_control = new wxTextCtrl(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize #if defined(__WXMSW__) - , wxTE_MULTILINE | wxTE_NO_VSCROLL // necessary ??? + , wxTE_PROCESS_TAB | wxTE_MULTILINE | + wxTE_NO_VSCROLL | wxTE_AUTO_SCROLL #endif ); @@ -529,7 +541,15 @@ void wxGridCellTextEditor::SetSize(const wxRect& rectOrig) } #else // !GTK int extra_x = ( rect.x > 2 )? 2 : 1; + +// MB: treat MSW separately here otherwise the caret doesn't show +// when the editor is in the first row. +#if defined(__WXMSW__) + int extra_y = 2; +#else int extra_y = ( rect.y > 2 )? 2 : 1; +#endif // MSW + #if defined(__WXMOTIF__) extra_x *= 2; extra_y *= 2; @@ -595,28 +615,117 @@ void wxGridCellTextEditor::DoReset(const wxString& startValue) Text()->SetInsertionPointEnd(); } -void wxGridCellTextEditor::StartingKey(wxKeyEvent& event) +bool wxGridCellTextEditor::IsAcceptedKey(wxKeyEvent& event) { - if ( !event.AltDown() && !event.MetaDown() && !event.ControlDown() ) + if ( wxGridCellEditor::IsAcceptedKey(event) ) { - // insert the key in the control - int keycode = (int)event.KeyCode(); - if ( isprint(keycode) ) + int keycode = event.GetKeyCode(); + switch ( keycode ) { - // FIXME this is not going to work for non letters... - if ( !event.ShiftDown() ) - { - keycode = tolower(keycode); - } + case WXK_NUMPAD0: + case WXK_NUMPAD1: + case WXK_NUMPAD2: + case WXK_NUMPAD3: + case WXK_NUMPAD4: + case WXK_NUMPAD5: + case WXK_NUMPAD6: + case WXK_NUMPAD7: + case WXK_NUMPAD8: + case WXK_NUMPAD9: + case WXK_MULTIPLY: + case WXK_NUMPAD_MULTIPLY: + case WXK_ADD: + case WXK_NUMPAD_ADD: + case WXK_SUBTRACT: + case WXK_NUMPAD_SUBTRACT: + case WXK_DECIMAL: + case WXK_NUMPAD_DECIMAL: + case WXK_DIVIDE: + case WXK_NUMPAD_DIVIDE: + return TRUE; - Text()->AppendText((wxChar)keycode); - - return; + default: + // accept 8 bit chars too if isprint() agrees + if ( (keycode < 255) && (isprint(keycode)) ) + return TRUE; } - } - event.Skip(); + return FALSE; +} + +void wxGridCellTextEditor::StartingKey(wxKeyEvent& event) +{ + // we don't check for !HasModifiers() because IsAcceptedKey() did it + + // insert the key in the control + wxChar ch; + int keycode = event.GetKeyCode(); + switch ( keycode ) + { + case WXK_NUMPAD0: + case WXK_NUMPAD1: + case WXK_NUMPAD2: + case WXK_NUMPAD3: + case WXK_NUMPAD4: + case WXK_NUMPAD5: + case WXK_NUMPAD6: + case WXK_NUMPAD7: + case WXK_NUMPAD8: + case WXK_NUMPAD9: + ch = _T('0') + keycode - WXK_NUMPAD0; + break; + + case WXK_MULTIPLY: + case WXK_NUMPAD_MULTIPLY: + ch = _T('*'); + break; + + case WXK_ADD: + case WXK_NUMPAD_ADD: + ch = _T('+'); + break; + + case WXK_SUBTRACT: + case WXK_NUMPAD_SUBTRACT: + ch = _T('-'); + break; + + case WXK_DECIMAL: + case WXK_NUMPAD_DECIMAL: + ch = _T('.'); + break; + + case WXK_DIVIDE: + case WXK_NUMPAD_DIVIDE: + ch = _T('/'); + break; + + default: + if ( keycode < 256 && keycode >= 0 && isprint(keycode) ) + { + // FIXME this is not going to work for non letters... + if ( !event.ShiftDown() ) + { + keycode = tolower(keycode); + } + + ch = (wxChar)keycode; + } + else + { + ch = _T('\0'); + } + } + + if ( ch ) + { + Text()->AppendText(ch); + } + else + { + event.Skip(); + } } void wxGridCellTextEditor::HandleReturn( wxKeyEvent& @@ -648,8 +757,7 @@ void wxGridCellTextEditor::SetParameters(const wxString& params) long tmp; if ( !params.ToLong(&tmp) ) { - wxLogDebug(_T("Invalid wxGridCellTextEditor parameter string " - "'%s' ignored"), params.c_str()); + wxLogDebug(_T("Invalid wxGridCellTextEditor parameter string '%s' ignored"), params.c_str()); } else { @@ -714,6 +822,7 @@ void wxGridCellNumberEditor::BeginEdit(int row, int col, wxGrid* grid) if ( HasRange() ) { Spin()->SetValue((int)m_valueOld); + Spin()->SetFocus(); } else { @@ -742,7 +851,7 @@ bool wxGridCellNumberEditor::EndEdit(int row, int col, if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER)) grid->GetTable()->SetValueAsLong(row, col, value); else - grid->GetTable()->SetValue(row, col, wxString::Format("%ld", value)); + grid->GetTable()->SetValue(row, col, wxString::Format(wxT("%ld"), value)); } return changed; @@ -760,6 +869,40 @@ void wxGridCellNumberEditor::Reset() } } +bool wxGridCellNumberEditor::IsAcceptedKey(wxKeyEvent& event) +{ + if ( wxGridCellEditor::IsAcceptedKey(event) ) + { + int keycode = event.GetKeyCode(); + switch ( keycode ) + { + case WXK_NUMPAD0: + case WXK_NUMPAD1: + case WXK_NUMPAD2: + case WXK_NUMPAD3: + case WXK_NUMPAD4: + case WXK_NUMPAD5: + case WXK_NUMPAD6: + case WXK_NUMPAD7: + case WXK_NUMPAD8: + case WXK_NUMPAD9: + case WXK_ADD: + case WXK_NUMPAD_ADD: + case WXK_SUBTRACT: + case WXK_NUMPAD_SUBTRACT: + case WXK_UP: + case WXK_DOWN: + return TRUE; + + default: + if ( (keycode < 128) && isdigit(keycode) ) + return TRUE; + } + } + + return FALSE; +} + void wxGridCellNumberEditor::StartingKey(wxKeyEvent& event) { if ( !HasRange() ) @@ -801,8 +944,7 @@ void wxGridCellNumberEditor::SetParameters(const wxString& params) } } - wxLogDebug(_T("Invalid wxGridCellNumberEditor parameter string " - "'%s' ignored"), params.c_str()); + wxLogDebug(_T("Invalid wxGridCellNumberEditor parameter string '%s' ignored"), params.c_str()); } } @@ -810,6 +952,12 @@ void wxGridCellNumberEditor::SetParameters(const wxString& params) // wxGridCellFloatEditor // ---------------------------------------------------------------------------- +wxGridCellFloatEditor::wxGridCellFloatEditor(int width, int precision) +{ + m_width = width; + m_precision = precision; +} + void wxGridCellFloatEditor::Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) @@ -851,7 +999,7 @@ bool wxGridCellFloatEditor::EndEdit(int row, int col, if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT)) grid->GetTable()->SetValueAsDouble(row, col, value); else - grid->GetTable()->SetValue(row, col, wxString::Format("%f", value)); + grid->GetTable()->SetValue(row, col, wxString::Format(wxT("%f"), value)); return TRUE; } @@ -881,6 +1029,91 @@ void wxGridCellFloatEditor::StartingKey(wxKeyEvent& event) event.Skip(); } +void wxGridCellFloatEditor::SetParameters(const wxString& params) +{ + if ( !params ) + { + // reset to default + m_width = + m_precision = -1; + } + else + { + long tmp; + if ( params.BeforeFirst(_T(',')).ToLong(&tmp) ) + { + m_width = (int)tmp; + + if ( params.AfterFirst(_T(',')).ToLong(&tmp) ) + { + m_precision = (int)tmp; + + // skip the error message below + return; + } + } + + wxLogDebug(_T("Invalid wxGridCellFloatEditor parameter string '%s' ignored"), params.c_str()); + } +} + +wxString wxGridCellFloatEditor::GetString() const +{ + wxString fmt; + if ( m_width == -1 ) + { + // default width/precision + fmt = _T("%g"); + } + else if ( m_precision == -1 ) + { + // default precision + fmt.Printf(_T("%%%d.g"), m_width); + } + else + { + fmt.Printf(_T("%%%d.%dg"), m_width, m_precision); + } + + return wxString::Format(fmt, m_valueOld); +} + +bool wxGridCellFloatEditor::IsAcceptedKey(wxKeyEvent& event) +{ + if ( wxGridCellEditor::IsAcceptedKey(event) ) + { + int keycode = event.GetKeyCode(); + switch ( keycode ) + { + case WXK_NUMPAD0: + case WXK_NUMPAD1: + case WXK_NUMPAD2: + case WXK_NUMPAD3: + case WXK_NUMPAD4: + case WXK_NUMPAD5: + case WXK_NUMPAD6: + case WXK_NUMPAD7: + case WXK_NUMPAD8: + case WXK_NUMPAD9: + case WXK_ADD: + case WXK_NUMPAD_ADD: + case WXK_SUBTRACT: + case WXK_NUMPAD_SUBTRACT: + case WXK_DECIMAL: + case WXK_NUMPAD_DECIMAL: + return TRUE; + + default: + // additionally accept 'e' as in '1e+6' + if ( (keycode < 128) && + (isdigit(keycode) || tolower(keycode) == 'e') ) + return TRUE; + } + } + + return FALSE; +} + // ---------------------------------------------------------------------------- // wxGridCellBoolEditor // ---------------------------------------------------------------------------- @@ -959,7 +1192,10 @@ void wxGridCellBoolEditor::BeginEdit(int row, int col, wxGrid* grid) if (grid->GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL)) m_startValue = grid->GetTable()->GetValueAsBool(row, col); else - m_startValue = !!grid->GetTable()->GetValue(row, col); + { + wxString cellval( grid->GetTable()->GetValue(row, col) ); + m_startValue = !( !cellval || (cellval == "0") ); + } CBox()->SetValue(m_startValue); CBox()->SetFocus(); } @@ -999,12 +1235,35 @@ void wxGridCellBoolEditor::StartingClick() CBox()->SetValue(!CBox()->GetValue()); } +bool wxGridCellBoolEditor::IsAcceptedKey(wxKeyEvent& event) +{ + if ( wxGridCellEditor::IsAcceptedKey(event) ) + { + int keycode = event.GetKeyCode(); + switch ( keycode ) + { + case WXK_MULTIPLY: + case WXK_NUMPAD_MULTIPLY: + case WXK_ADD: + case WXK_NUMPAD_ADD: + case WXK_SUBTRACT: + case WXK_NUMPAD_SUBTRACT: + case WXK_SPACE: + case '+': + case '-': + return TRUE; + } + } + + return FALSE; +} + // ---------------------------------------------------------------------------- // wxGridCellChoiceEditor // ---------------------------------------------------------------------------- wxGridCellChoiceEditor::wxGridCellChoiceEditor(size_t count, - const wxChar* choices[], + const wxString choices[], bool allowOthers) : m_allowOthers(allowOthers) { @@ -1133,11 +1392,12 @@ void wxGridCellEditorEvtHandler::OnKeyDown(wxKeyEvent& event) break; case WXK_TAB: - event.Skip( m_grid->ProcessEvent( event ) ); + event.Skip( m_grid->GetEventHandler()->ProcessEvent( event ) ); break; case WXK_RETURN: - if (!m_grid->ProcessEvent(event)) + case WXK_NUMPAD_ENTER: + if (!m_grid->GetEventHandler()->ProcessEvent(event)) m_editor->HandleReturn(event); break; @@ -1154,6 +1414,7 @@ void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event) case WXK_ESCAPE: case WXK_TAB: case WXK_RETURN: + case WXK_NUMPAD_ENTER: break; default: @@ -1236,11 +1497,18 @@ wxSize wxGridCellStringRenderer::DoGetBestSize(wxGridCellAttr& attr, wxDC& dc, const wxString& text) { - wxCoord x, y; + wxCoord x = 0, y = 0, max_x = 0; dc.SetFont(attr.GetFont()); - dc.GetTextExtent(text, &x, &y); + wxStringTokenizer tk(text, _T('\n')); + while ( tk.HasMoreTokens() ) + { + dc.GetTextExtent(tk.GetNextToken(), &x, &y); + max_x = wxMax(max_x, x); + } - return wxSize(x, y); + y *= 1 + text.Freq(wxT('\n')); // multiply by the number of lines. + + return wxSize(max_x, y); } wxSize wxGridCellStringRenderer::GetBestSize(wxGrid& grid, @@ -1460,8 +1728,7 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params) if ( !ok ) { - wxLogDebug(_T("Invalid wxGridCellFloatRenderer parameter string " - "'%s ignored"), params.c_str()); + wxLogDebug(_T("Invalid wxGridCellFloatRenderer parameter string '%s ignored"), params.c_str()); } } } @@ -1536,7 +1803,10 @@ void wxGridCellBoolRenderer::Draw(wxGrid& grid, if ( grid.GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL) ) value = grid.GetTable()->GetValueAsBool(row, col); else - value = !!grid.GetTable()->GetValue(row, col); + { + wxString cellval( grid.GetTable()->GetValue(row, col) ); + value = !( !cellval || (cellval == "0") ); + } if ( value ) { @@ -2152,14 +2422,16 @@ int wxGridTypeRegistry::FindOrCloneDataType(const wxString& typeName) wxGridCellRenderer* wxGridTypeRegistry::GetRenderer(int index) { wxGridCellRenderer* renderer = m_typeinfo[index]->m_renderer; - renderer->IncRef(); + if (renderer) + renderer->IncRef(); return renderer; } wxGridCellEditor* wxGridTypeRegistry::GetEditor(int index) { wxGridCellEditor* editor = m_typeinfo[index]->m_editor; - editor->IncRef(); + if (editor) + editor->IncRef(); return editor; } @@ -2247,35 +2519,17 @@ void wxGridTableBase::SetColAttr(wxGridCellAttr *attr, int col) } } -void wxGridTableBase::UpdateAttrRows( size_t pos, int numRows ) -{ - if ( m_attrProvider ) - { - m_attrProvider->UpdateAttrRows( pos, numRows ); - } -} - -void wxGridTableBase::UpdateAttrCols( size_t pos, int numCols ) -{ - if ( m_attrProvider ) - { - m_attrProvider->UpdateAttrCols( pos, numCols ); - } -} - bool wxGridTableBase::InsertRows( size_t WXUNUSED(pos), size_t WXUNUSED(numRows) ) { - wxFAIL_MSG( wxT("Called grid table class function InsertRows\n" - "but your derived table class does not override this function") ); + wxFAIL_MSG( wxT("Called grid table class function InsertRows\nbut your derived table class does not override this function") ); return FALSE; } bool wxGridTableBase::AppendRows( size_t WXUNUSED(numRows) ) { - wxFAIL_MSG( wxT("Called grid table class function AppendRows\n" - "but your derived table class does not override this function")); + wxFAIL_MSG( wxT("Called grid table class function AppendRows\nbut your derived table class does not override this function")); return FALSE; } @@ -2283,8 +2537,7 @@ bool wxGridTableBase::AppendRows( size_t WXUNUSED(numRows) ) bool wxGridTableBase::DeleteRows( size_t WXUNUSED(pos), size_t WXUNUSED(numRows) ) { - wxFAIL_MSG( wxT("Called grid table class function DeleteRows\n" - "but your derived table class does not override this function")); + wxFAIL_MSG( wxT("Called grid table class function DeleteRows\nbut your derived table class does not override this function")); return FALSE; } @@ -2292,16 +2545,14 @@ bool wxGridTableBase::DeleteRows( size_t WXUNUSED(pos), bool wxGridTableBase::InsertCols( size_t WXUNUSED(pos), size_t WXUNUSED(numCols) ) { - wxFAIL_MSG( wxT("Called grid table class function InsertCols\n" - "but your derived table class does not override this function")); + wxFAIL_MSG( wxT("Called grid table class function InsertCols\nbut your derived table class does not override this function")); return FALSE; } bool wxGridTableBase::AppendCols( size_t WXUNUSED(numCols) ) { - wxFAIL_MSG(wxT("Called grid table class function AppendCols\n" - "but your derived table class does not override this function")); + wxFAIL_MSG(wxT("Called grid table class function AppendCols\nbut your derived table class does not override this function")); return FALSE; } @@ -2309,8 +2560,7 @@ bool wxGridTableBase::AppendCols( size_t WXUNUSED(numCols) ) bool wxGridTableBase::DeleteCols( size_t WXUNUSED(pos), size_t WXUNUSED(numCols) ) { - wxFAIL_MSG( wxT("Called grid table class function DeleteCols\n" - "but your derived table class does not override this function")); + wxFAIL_MSG( wxT("Called grid table class function DeleteCols\nbut your derived table class does not override this function")); return FALSE; } @@ -2537,7 +2787,8 @@ bool wxGridStringTable::InsertRows( size_t pos, size_t numRows ) size_t row, col; size_t curNumRows = m_data.GetCount(); - size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : 0 ); + size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : + ( GetView() ? GetView()->GetNumberCols() : 0 ) ); if ( pos >= curNumRows ) { @@ -2555,7 +2806,6 @@ bool wxGridStringTable::InsertRows( size_t pos, size_t numRows ) { m_data.Insert( sa, row ); } - UpdateAttrRows( pos, numRows ); if ( GetView() ) { wxGridTableMessage msg( this, @@ -2574,7 +2824,8 @@ bool wxGridStringTable::AppendRows( size_t numRows ) size_t row, col; size_t curNumRows = m_data.GetCount(); - size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : 0 ); + size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : + ( GetView() ? GetView()->GetNumberCols() : 0 ) ); wxArrayString sa; if ( curNumCols > 0 ) @@ -2612,10 +2863,9 @@ bool wxGridStringTable::DeleteRows( size_t pos, size_t numRows ) if ( pos >= curNumRows ) { wxString errmsg; - errmsg.Printf("Called wxGridStringTable::DeleteRows(pos=%d, N=%d)\n" - "Pos value is invalid for present table with %d rows", + errmsg.Printf(wxT("Called wxGridStringTable::DeleteRows(pos=%d, N=%d)\nPos value is invalid for present table with %d rows"), pos, numRows, curNumRows ); - wxFAIL_MSG( wxT(errmsg) ); + wxFAIL_MSG( errmsg ); return FALSE; } @@ -2635,7 +2885,6 @@ bool wxGridStringTable::DeleteRows( size_t pos, size_t numRows ) m_data.Remove( pos ); } } - UpdateAttrRows( pos, -((int)numRows) ); if ( GetView() ) { wxGridTableMessage msg( this, @@ -2654,7 +2903,8 @@ bool wxGridStringTable::InsertCols( size_t pos, size_t numCols ) size_t row, col; size_t curNumRows = m_data.GetCount(); - size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : 0 ); + size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : + ( GetView() ? GetView()->GetNumberCols() : 0 ) ); if ( pos >= curNumCols ) { @@ -2668,7 +2918,6 @@ bool wxGridStringTable::InsertCols( size_t pos, size_t numCols ) m_data[row].Insert( wxEmptyString, col ); } } - UpdateAttrCols( pos, numCols ); if ( GetView() ) { wxGridTableMessage msg( this, @@ -2687,14 +2936,15 @@ bool wxGridStringTable::AppendCols( size_t numCols ) size_t row, n; size_t curNumRows = m_data.GetCount(); +#if 0 if ( !curNumRows ) { // TODO: something better than this ? // - wxFAIL_MSG( wxT("Unable to append cols to a grid table with no rows.\n" - "Call AppendRows() first") ); + wxFAIL_MSG( wxT("Unable to append cols to a grid table with no rows.\nCall AppendRows() first") ); return FALSE; } +#endif for ( row = 0; row < curNumRows; row++ ) { @@ -2721,15 +2971,15 @@ bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols ) size_t row, n; size_t curNumRows = m_data.GetCount(); - size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : 0 ); + size_t curNumCols = ( curNumRows > 0 ? m_data[0].GetCount() : + ( GetView() ? GetView()->GetNumberCols() : 0 ) ); if ( pos >= curNumCols ) { wxString errmsg; - errmsg.Printf( "Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\n" - "Pos value is invalid for present table with %d cols", + errmsg.Printf( wxT("Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\nPos value is invalid for present table with %d cols"), pos, numCols, curNumCols ); - wxFAIL_MSG( wxT( errmsg ) ); + wxFAIL_MSG( errmsg ); return FALSE; } @@ -2752,7 +3002,6 @@ bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols ) } } } - UpdateAttrCols( pos, -((int)numCols) ); if ( GetView() ) { wxGridTableMessage msg( this, @@ -2835,6 +3084,7 @@ BEGIN_EVENT_TABLE( wxGridRowLabelWindow, wxWindow ) EVT_PAINT( wxGridRowLabelWindow::OnPaint ) EVT_MOUSE_EVENTS( wxGridRowLabelWindow::OnMouseEvent ) EVT_KEY_DOWN( wxGridRowLabelWindow::OnKeyDown ) + EVT_KEY_UP( wxGridRowLabelWindow::OnKeyUp ) END_EVENT_TABLE() wxGridRowLabelWindow::wxGridRowLabelWindow( wxGrid *parent, @@ -2875,7 +3125,12 @@ void wxGridRowLabelWindow::OnMouseEvent( wxMouseEvent& event ) // void wxGridRowLabelWindow::OnKeyDown( wxKeyEvent& event ) { - if ( !m_owner->ProcessEvent( event ) ) event.Skip(); + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); +} + +void wxGridRowLabelWindow::OnKeyUp( wxKeyEvent& event ) +{ + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); } @@ -2888,6 +3143,7 @@ BEGIN_EVENT_TABLE( wxGridColLabelWindow, wxWindow ) EVT_PAINT( wxGridColLabelWindow::OnPaint ) EVT_MOUSE_EVENTS( wxGridColLabelWindow::OnMouseEvent ) EVT_KEY_DOWN( wxGridColLabelWindow::OnKeyDown ) + EVT_KEY_UP( wxGridColLabelWindow::OnKeyUp ) END_EVENT_TABLE() wxGridColLabelWindow::wxGridColLabelWindow( wxGrid *parent, @@ -2928,7 +3184,12 @@ void wxGridColLabelWindow::OnMouseEvent( wxMouseEvent& event ) // void wxGridColLabelWindow::OnKeyDown( wxKeyEvent& event ) { - if ( !m_owner->ProcessEvent( event ) ) event.Skip(); + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); +} + +void wxGridColLabelWindow::OnKeyUp( wxKeyEvent& event ) +{ + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); } @@ -2941,6 +3202,7 @@ BEGIN_EVENT_TABLE( wxGridCornerLabelWindow, wxWindow ) EVT_MOUSE_EVENTS( wxGridCornerLabelWindow::OnMouseEvent ) EVT_PAINT( wxGridCornerLabelWindow::OnPaint) EVT_KEY_DOWN( wxGridCornerLabelWindow::OnKeyDown ) + EVT_KEY_UP( wxGridCornerLabelWindow::OnKeyUp ) END_EVENT_TABLE() wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent, @@ -2980,7 +3242,12 @@ void wxGridCornerLabelWindow::OnMouseEvent( wxMouseEvent& event ) // void wxGridCornerLabelWindow::OnKeyDown( wxKeyEvent& event ) { - if ( !m_owner->ProcessEvent( event ) ) event.Skip(); + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); +} + +void wxGridCornerLabelWindow::OnKeyUp( wxKeyEvent& event ) +{ + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); } @@ -2993,6 +3260,7 @@ BEGIN_EVENT_TABLE( wxGridWindow, wxPanel ) EVT_PAINT( wxGridWindow::OnPaint ) EVT_MOUSE_EVENTS( wxGridWindow::OnMouseEvent ) EVT_KEY_DOWN( wxGridWindow::OnKeyDown ) + EVT_KEY_UP( wxGridWindow::OnKeyUp ) EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground ) END_EVENT_TABLE() @@ -3043,14 +3311,18 @@ void wxGridWindow::OnMouseEvent( wxMouseEvent& event ) } -// This seems to be required for wxMotif otherwise the mouse +// This seems to be required for wxMotif/wxGTK otherwise the mouse // cursor must be in the cell edit control to get key events // void wxGridWindow::OnKeyDown( wxKeyEvent& event ) { - if ( !m_owner->ProcessEvent( event ) ) event.Skip(); + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); } +void wxGridWindow::OnKeyUp( wxKeyEvent& event ) +{ + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) event.Skip(); +} void wxGridWindow::OnEraseBackground( wxEraseEvent& WXUNUSED(event) ) { @@ -3066,6 +3338,7 @@ BEGIN_EVENT_TABLE( wxGrid, wxScrolledWindow ) EVT_PAINT( wxGrid::OnPaint ) EVT_SIZE( wxGrid::OnSize ) EVT_KEY_DOWN( wxGrid::OnKeyDown ) + EVT_KEY_UP( wxGrid::OnKeyUp ) EVT_ERASE_BACKGROUND( wxGrid::OnEraseBackground ) END_EVENT_TABLE() @@ -3171,23 +3444,20 @@ void wxGrid::Create() bool wxGrid::CreateGrid( int numRows, int numCols, wxGrid::wxGridSelectionModes selmode ) { - if ( m_created ) - { - wxFAIL_MSG( wxT("wxGrid::CreateGrid or wxGrid::SetTable called more than once") ); - return FALSE; - } - else - { - m_numRows = numRows; - m_numCols = numCols; + wxCHECK_MSG( !m_created, + FALSE, + wxT("wxGrid::CreateGrid or wxGrid::SetTable called more than once") ); + + m_numRows = numRows; + m_numCols = numCols; + + m_table = new wxGridStringTable( m_numRows, m_numCols ); + m_table->SetView( this ); + m_ownTable = TRUE; + m_selection = new wxGridSelection( this, selmode ); + Init(); + m_created = TRUE; - m_table = new wxGridStringTable( m_numRows, m_numCols ); - m_table->SetView( this ); - m_ownTable = TRUE; - Init(); - m_selection = new wxGridSelection( this, selmode ); - m_created = TRUE; - } return m_created; } @@ -3224,8 +3494,8 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership, m_table->SetView( this ); if (takeOwnership) m_ownTable = TRUE; - Init(); m_selection = new wxGridSelection( this, selmode ); + Init(); m_created = TRUE; } @@ -3235,12 +3505,6 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership, void wxGrid::Init() { - if ( m_numRows <= 0 ) - m_numRows = WXGRID_DEFAULT_NUMBER_ROWS; - - if ( m_numCols <= 0 ) - m_numCols = WXGRID_DEFAULT_NUMBER_COLS; - m_rowLabelWidth = WXGRID_DEFAULT_ROW_LABEL_WIDTH; m_colLabelHeight = WXGRID_DEFAULT_COL_LABEL_HEIGHT; @@ -3260,8 +3524,12 @@ void wxGrid::Init() // TODO: something better than this ? // +#ifdef __WXGTK__ + m_labelFont = wxFont( wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ) ); +#else m_labelFont = this->GetFont(); m_labelFont.SetWeight( m_labelFont.GetWeight() + 2 ); +#endif m_rowLabelHorizAlign = wxLEFT; m_rowLabelVertAlign = wxCENTRE; @@ -3280,6 +3548,7 @@ void wxGrid::Init() m_gridLineColour = wxColour( 128, 128, 255 ); m_gridLinesEnabled = TRUE; + m_cellHighlightColour = m_gridLineColour; m_cursorMode = WXGRID_CURSOR_SELECT_CELL; m_winCapture = (wxWindow *)NULL; @@ -3393,22 +3662,48 @@ int wxGrid::GetRowBottom(int row) const void wxGrid::CalcDimensions() { + // available client size int cw, ch; GetClientSize( &cw, &ch ); - if ( m_numRows > 0 && m_numCols > 0 ) - { - int right = GetColRight( m_numCols-1 ) + m_extraWidth; - int bottom = GetRowBottom( m_numRows-1 ) + m_extraHeight; + if ( m_colLabelWin->IsShown() ) + cw -= m_rowLabelWidth; + if ( m_rowLabelWin->IsShown() ) + ch -= m_colLabelHeight; - // TODO: restore the scroll position that we had before sizing - // - int x, y; - GetViewStart( &x, &y ); - SetScrollbars( GRID_SCROLL_LINE, GRID_SCROLL_LINE, - right/GRID_SCROLL_LINE, bottom/GRID_SCROLL_LINE, - x, y ); + // grid total size + int w = m_numCols > 0 ? GetColRight(m_numCols - 1) + m_extraWidth + 1 : 0; + int h = m_numRows > 0 ? GetRowBottom(m_numRows - 1) + m_extraHeight + 1 : 0; + + // preserve (more or less) the previous position + int x, y; + GetViewStart( &x, &y ); + // maybe we don't need scrollbars at all? and if we do, transform w and h + // from pixels into logical units + if ( w <= cw ) + { + w = 0; x= 0; } + else + { + w = (w + GRID_SCROLL_LINE - 1)/GRID_SCROLL_LINE; + if ( x >= w ) + x = w - 1; + } + if ( h <= ch ) + { + h = 0; y = 0; + } + else + { + h = (h + GRID_SCROLL_LINE - 1)/GRID_SCROLL_LINE; + if ( y >= h ) + y = h - 1; + } + + // do set scrollbar parameters + SetScrollbars( GRID_SCROLL_LINE, GRID_SCROLL_LINE, + w, h, x, y, GetBatchCount() != 0 ); } @@ -3437,7 +3732,9 @@ void wxGrid::CalcWindowSizes() bool wxGrid::Redimension( wxGridTableMessage& msg ) { int i; + bool result = FALSE; +#if 0 // if we were using the default widths/heights so far, we must change them // now if ( m_colWidths.IsEmpty() ) @@ -3449,6 +3746,7 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) { InitRowHeights(); } +#endif switch ( msg.GetId() ) { @@ -3456,71 +3754,99 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) { size_t pos = msg.GetCommandInt(); int numRows = msg.GetCommandInt2(); - for ( i = 0; i < numRows; i++ ) - { - m_rowHeights.Insert( m_defaultRowHeight, pos ); - m_rowBottoms.Insert( 0, pos ); - } + m_numRows += numRows; - int bottom = 0; - if ( pos > 0 ) bottom = m_rowBottoms[pos-1]; - - for ( i = pos; i < m_numRows; i++ ) + if ( !m_rowHeights.IsEmpty() ) { - bottom += m_rowHeights[i]; - m_rowBottoms[i] = bottom; + for ( i = 0; i < numRows; i++ ) + { + m_rowHeights.Insert( m_defaultRowHeight, pos ); + m_rowBottoms.Insert( 0, pos ); + } + + int bottom = 0; + if ( pos > 0 ) bottom = m_rowBottoms[pos-1]; + + for ( i = pos; i < m_numRows; i++ ) + { + bottom += m_rowHeights[i]; + m_rowBottoms[i] = bottom; + } + } + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + m_selection->UpdateRows( pos, numRows ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) + attrProvider->UpdateAttrRows( pos, numRows ); + + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); } - CalcDimensions(); } - return TRUE; + result = TRUE; + break; case wxGRIDTABLE_NOTIFY_ROWS_APPENDED: { int numRows = msg.GetCommandInt(); - for ( i = 0; i < numRows; i++ ) - { - m_rowHeights.Add( m_defaultRowHeight ); - m_rowBottoms.Add( 0 ); - } - int oldNumRows = m_numRows; m_numRows += numRows; - int bottom = 0; - if ( oldNumRows > 0 ) bottom = m_rowBottoms[oldNumRows-1]; - - for ( i = oldNumRows; i < m_numRows; i++ ) + if ( !m_rowHeights.IsEmpty() ) { - bottom += m_rowHeights[i]; - m_rowBottoms[i] = bottom; + for ( i = 0; i < numRows; i++ ) + { + m_rowHeights.Add( m_defaultRowHeight ); + m_rowBottoms.Add( 0 ); + } + + int bottom = 0; + if ( oldNumRows > 0 ) bottom = m_rowBottoms[oldNumRows-1]; + + for ( i = oldNumRows; i < m_numRows; i++ ) + { + bottom += m_rowHeights[i]; + m_rowBottoms[i] = bottom; + } + } + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); } - CalcDimensions(); } - return TRUE; + result = TRUE; + break; case wxGRIDTABLE_NOTIFY_ROWS_DELETED: { size_t pos = msg.GetCommandInt(); int numRows = msg.GetCommandInt2(); - for ( i = 0; i < numRows; i++ ) - { - m_rowHeights.Remove( pos ); - m_rowBottoms.Remove( pos ); - } m_numRows -= numRows; - if ( !m_numRows ) + if ( !m_rowHeights.IsEmpty() ) { - m_numCols = 0; - m_colWidths.Clear(); - m_colRights.Clear(); - m_currentCellCoords = wxGridNoCellCoords; - } - else - { - if ( m_currentCellCoords.GetRow() >= m_numRows ) - m_currentCellCoords.Set( 0, 0 ); + for ( i = 0; i < numRows; i++ ) + { + m_rowHeights.Remove( pos ); + m_rowBottoms.Remove( pos ); + } int h = 0; for ( i = 0; i < m_numRows; i++ ) @@ -3529,82 +3855,134 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) m_rowBottoms[i] = h; } } - - CalcDimensions(); + if ( !m_numRows ) + { + m_currentCellCoords = wxGridNoCellCoords; + } + else + { + if ( m_currentCellCoords.GetRow() >= m_numRows ) + m_currentCellCoords.Set( 0, 0 ); + } + m_selection->UpdateRows( pos, -((int)numRows) ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) { + attrProvider->UpdateAttrRows( pos, -((int)numRows) ); +// ifdef'd out following patch from Paul Gammans +#if 0 + // No need to touch column attributes, unless we + // removed _all_ rows, in this case, we remove + // all column attributes. + // I hate to do this here, but the + // needed data is not available inside UpdateAttrRows. + if ( !GetNumberRows() ) + attrProvider->UpdateAttrCols( 0, -GetNumberCols() ); +#endif + } + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + } } - return TRUE; + result = TRUE; + break; case wxGRIDTABLE_NOTIFY_COLS_INSERTED: { size_t pos = msg.GetCommandInt(); int numCols = msg.GetCommandInt2(); - for ( i = 0; i < numCols; i++ ) - { - m_colWidths.Insert( m_defaultColWidth, pos ); - m_colRights.Insert( 0, pos ); - } m_numCols += numCols; - int right = 0; - if ( pos > 0 ) right = m_colRights[pos-1]; - - for ( i = pos; i < m_numCols; i++ ) + if ( !m_colWidths.IsEmpty() ) { - right += m_colWidths[i]; - m_colRights[i] = right; + for ( i = 0; i < numCols; i++ ) + { + m_colWidths.Insert( m_defaultColWidth, pos ); + m_colRights.Insert( 0, pos ); + } + + int right = 0; + if ( pos > 0 ) right = m_colRights[pos-1]; + + for ( i = pos; i < m_numCols; i++ ) + { + right += m_colWidths[i]; + m_colRights[i] = right; + } } - CalcDimensions(); + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + m_selection->UpdateCols( pos, numCols ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) + attrProvider->UpdateAttrCols( pos, numCols ); + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_colLabelWin->Refresh(); + } + } - return TRUE; + result = TRUE; + break; case wxGRIDTABLE_NOTIFY_COLS_APPENDED: { int numCols = msg.GetCommandInt(); - for ( i = 0; i < numCols; i++ ) - { - m_colWidths.Add( m_defaultColWidth ); - m_colRights.Add( 0 ); - } - int oldNumCols = m_numCols; m_numCols += numCols; - - int right = 0; - if ( oldNumCols > 0 ) right = m_colRights[oldNumCols-1]; - - for ( i = oldNumCols; i < m_numCols; i++ ) + if ( !m_colWidths.IsEmpty() ) { - right += m_colWidths[i]; - m_colRights[i] = right; + for ( i = 0; i < numCols; i++ ) + { + m_colWidths.Add( m_defaultColWidth ); + m_colRights.Add( 0 ); + } + + int right = 0; + if ( oldNumCols > 0 ) right = m_colRights[oldNumCols-1]; + + for ( i = oldNumCols; i < m_numCols; i++ ) + { + right += m_colWidths[i]; + m_colRights[i] = right; + } + } + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_colLabelWin->Refresh(); } - CalcDimensions(); } - return TRUE; + result = TRUE; + break; case wxGRIDTABLE_NOTIFY_COLS_DELETED: { size_t pos = msg.GetCommandInt(); int numCols = msg.GetCommandInt2(); - for ( i = 0; i < numCols; i++ ) - { - m_colWidths.Remove( pos ); - m_colRights.Remove( pos ); - } m_numCols -= numCols; - if ( !m_numCols ) + if ( !m_colWidths.IsEmpty() ) { -#if 0 // leave the row alone here so that AppendCols will work subsequently - m_numRows = 0; - m_rowHeights.Clear(); - m_rowBottoms.Clear(); -#endif - m_currentCellCoords = wxGridNoCellCoords; - } - else - { - if ( m_currentCellCoords.GetCol() >= m_numCols ) - m_currentCellCoords.Set( 0, 0 ); + for ( i = 0; i < numCols; i++ ) + { + m_colWidths.Remove( pos ); + m_colRights.Remove( pos ); + } int w = 0; for ( i = 0; i < m_numCols; i++ ) @@ -3613,16 +3991,47 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) m_colRights[i] = w; } } - CalcDimensions(); + if ( !m_numCols ) + { + m_currentCellCoords = wxGridNoCellCoords; + } + else + { + if ( m_currentCellCoords.GetCol() >= m_numCols ) + m_currentCellCoords.Set( 0, 0 ); + } + m_selection->UpdateCols( pos, -((int)numCols) ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) { + attrProvider->UpdateAttrCols( pos, -((int)numCols) ); +// ifdef'd out following patch from Paul Gammans +#if 0 + // No need to touch row attributes, unless we + // removed _all_ columns, in this case, we remove + // all row attributes. + // I hate to do this here, but the + // needed data is not available inside UpdateAttrCols. + if ( !GetNumberCols() ) + attrProvider->UpdateAttrRows( 0, -GetNumberRows() ); +#endif + } + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_colLabelWin->Refresh(); + } } - return TRUE; + result = TRUE; + break; } - return FALSE; + if (result && !GetBatchCount() ) + m_gridWin->Refresh(); + return result; } -void wxGrid::CalcRowLabelsExposed( wxRegion& reg ) +void wxGrid::CalcRowLabelsExposed( const wxRegion& reg ) { wxRegionIterator iter( reg ); wxRect r; @@ -3671,7 +4080,7 @@ void wxGrid::CalcRowLabelsExposed( wxRegion& reg ) } -void wxGrid::CalcColLabelsExposed( wxRegion& reg ) +void wxGrid::CalcColLabelsExposed( const wxRegion& reg ) { wxRegionIterator iter( reg ); wxRect r; @@ -3720,7 +4129,7 @@ void wxGrid::CalcColLabelsExposed( wxRegion& reg ) } -void wxGrid::CalcCellsExposed( wxRegion& reg ) +void wxGrid::CalcCellsExposed( const wxRegion& reg ) { wxRegionIterator iter( reg ); wxRect r; @@ -4213,7 +4622,9 @@ void wxGrid::ChangeCursorMode(CursorMode mode, cursorModes[m_cursorMode], cursorModes[mode]); #endif // __WXDEBUG__ - if ( mode == m_cursorMode ) + if ( mode == m_cursorMode && + win == m_winCapture && + captureMouse == (m_winCapture != NULL)) return; if ( !win ) @@ -4286,7 +4697,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) { // Hide the edit control, so it // won't interfer with drag-shrinking. - if ( IsCellEditControlEnabled() ) + if ( IsCellEditControlShown() ) { HideCellEditControl(); SaveEditControlValue(); @@ -4305,17 +4716,17 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) { if ( m_selectingKeyboard == wxGridNoCellCoords) m_selectingKeyboard = coords; - SelectBlock ( m_selectingKeyboard, coords ); + HighlightBlock ( m_selectingKeyboard, coords ); } else { if ( !IsSelection() ) { - SelectBlock( coords, coords ); + HighlightBlock( coords, coords ); } else { - SelectBlock( m_currentCellCoords, coords ); + HighlightBlock( m_currentCellCoords, coords ); } } @@ -4386,26 +4797,26 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) // if ( event.LeftDown() && coords != wxGridNoCellCoords ) { - if ( !event.ShiftDown() && !event.ControlDown() ) - ClearSelection(); - if ( event.ShiftDown() ) + if ( !SendEvent( wxEVT_GRID_CELL_LEFT_CLICK, + coords.GetRow(), + coords.GetCol(), + event ) ) { - m_selection->SelectBlock( m_currentCellCoords.GetRow(), - m_currentCellCoords.GetCol(), - coords.GetRow(), - coords.GetCol(), - event.ControlDown(), - event.ShiftDown(), - event.AltDown(), - event.MetaDown() ); - } - else if ( XToEdgeOfCol(x) < 0 && - YToEdgeOfRow(y) < 0 ) - { - if ( !SendEvent( wxEVT_GRID_CELL_LEFT_CLICK, - coords.GetRow(), - coords.GetCol(), - event ) ) + if ( !event.ControlDown() ) + ClearSelection(); + if ( event.ShiftDown() ) + { + m_selection->SelectBlock( m_currentCellCoords.GetRow(), + m_currentCellCoords.GetCol(), + coords.GetRow(), + coords.GetCol(), + event.ControlDown(), + event.ShiftDown(), + event.AltDown(), + event.MetaDown() ); + } + else if ( XToEdgeOfCol(x) < 0 && + YToEdgeOfRow(y) < 0 ) { DisableCellEditControl(); MakeCellVisible( coords ); @@ -4443,7 +4854,12 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) m_selectingKeyboard = coords; } else + { SetCurrentCell( coords ); + if ( m_selection->GetSelectionMode() + != wxGrid::wxGridSelectCells) + HighlightBlock( coords, coords ); + } m_waitForSlowClick = TRUE; } } @@ -4749,40 +5165,12 @@ bool wxGrid::InsertRows( int pos, int numRows, bool WXUNUSED(updateLabels) ) if (IsCellEditControlEnabled()) DisableCellEditControl(); - bool ok = m_table->InsertRows( pos, numRows ); + return m_table->InsertRows( pos, numRows ); // the table will have sent the results of the insert row // operation to this view object as a grid table message - // - if ( ok ) - { - if ( m_numCols == 0 ) - { - m_table->AppendCols( WXGRID_DEFAULT_NUMBER_COLS ); - // - // TODO: perhaps instead of appending the default number of cols - // we should remember what the last non-zero number of cols was ? - // - } - - if ( m_currentCellCoords == wxGridNoCellCoords ) - { - // if we have just inserted cols into an empty grid the current - // cell will be undefined... - // - SetCurrentCell( 0, 0 ); - } - - m_selection->UpdateRows( pos, numRows ); - if ( !GetBatchCount() ) Refresh(); - } - - return ok; - } - else - { - return FALSE; } + return FALSE; } @@ -4796,26 +5184,9 @@ bool wxGrid::AppendRows( int numRows, bool WXUNUSED(updateLabels) ) return FALSE; } - if ( m_table && m_table->AppendRows( numRows ) ) - { - if ( m_currentCellCoords == wxGridNoCellCoords ) - { - // if we have just inserted cols into an empty grid the current - // cell will be undefined... - // - SetCurrentCell( 0, 0 ); - } - - // the table will have sent the results of the append row - // operation to this view object as a grid table message - // - if ( !GetBatchCount() ) Refresh(); - return TRUE; - } - else - { - return FALSE; - } + return ( m_table && m_table->AppendRows( numRows ) ); + // the table will have sent the results of the append row + // operation to this view object as a grid table message } @@ -4834,16 +5205,9 @@ bool wxGrid::DeleteRows( int pos, int numRows, bool WXUNUSED(updateLabels) ) if (IsCellEditControlEnabled()) DisableCellEditControl(); - if (m_table->DeleteRows( pos, numRows )) - { - - // the table will have sent the results of the delete row - // operation to this view object as a grid table message - // - m_selection->UpdateRows( pos, -((int)numRows) ); - if ( !GetBatchCount() ) Refresh(); - return TRUE; - } + return (m_table->DeleteRows( pos, numRows )); + // the table will have sent the results of the delete row + // operation to this view object as a grid table message } return FALSE; } @@ -4864,31 +5228,11 @@ bool wxGrid::InsertCols( int pos, int numCols, bool WXUNUSED(updateLabels) ) if (IsCellEditControlEnabled()) DisableCellEditControl(); - bool ok = m_table->InsertCols( pos, numCols ); - + return m_table->InsertCols( pos, numCols ); // the table will have sent the results of the insert col // operation to this view object as a grid table message - // - if ( ok ) - { - if ( m_currentCellCoords == wxGridNoCellCoords ) - { - // if we have just inserted cols into an empty grid the current - // cell will be undefined... - // - SetCurrentCell( 0, 0 ); - } - - m_selection->UpdateCols( pos, numCols ); - if ( !GetBatchCount() ) Refresh(); - } - - return ok; - } - else - { - return FALSE; } + return FALSE; } @@ -4902,26 +5246,9 @@ bool wxGrid::AppendCols( int numCols, bool WXUNUSED(updateLabels) ) return FALSE; } - if ( m_table && m_table->AppendCols( numCols ) ) - { - // the table will have sent the results of the append col - // operation to this view object as a grid table message - // - if ( m_currentCellCoords == wxGridNoCellCoords ) - { - // if we have just inserted cols into an empty grid the current - // cell will be undefined... - // - SetCurrentCell( 0, 0 ); - } - - if ( !GetBatchCount() ) Refresh(); - return TRUE; - } - else - { - return FALSE; - } + return ( m_table && m_table->AppendCols( numCols ) ); + // the table will have sent the results of the append col + // operation to this view object as a grid table message } @@ -4940,15 +5267,9 @@ bool wxGrid::DeleteCols( int pos, int numCols, bool WXUNUSED(updateLabels) ) if (IsCellEditControlEnabled()) DisableCellEditControl(); - if ( m_table->DeleteCols( pos, numCols ) ) - { - // the table will have sent the results of the delete col - // operation to this view object as a grid table message - // - m_selection->UpdateCols( pos, -((int)numCols) ); - if ( !GetBatchCount() ) Refresh(); - return TRUE; - } + return ( m_table->DeleteCols( pos, numCols ) ); + // the table will have sent the results of the delete col + // operation to this view object as a grid table message } return FALSE; } @@ -4979,12 +5300,11 @@ bool wxGrid::SendEvent( const wxEventType type, mouseEv.ShiftDown(), mouseEv.AltDown(), mouseEv.MetaDown() ); - return GetEventHandler()->ProcessEvent(gridEvt); } else if ( type == wxEVT_GRID_RANGE_SELECT ) { - // Right now, it should _never_ end up here! + // Right now, it should _never_ end up here! wxGridRangeSelectEvent gridEvt( GetId(), type, this, @@ -5010,7 +5330,6 @@ bool wxGrid::SendEvent( const wxEventType type, mouseEv.ShiftDown(), mouseEv.AltDown(), mouseEv.MetaDown() ); - return GetEventHandler()->ProcessEvent(gridEvt); } } @@ -5047,7 +5366,7 @@ bool wxGrid::SendEvent( const wxEventType type, void wxGrid::OnPaint( wxPaintEvent& WXUNUSED(event) ) { - wxPaintDC dc( this ); + wxPaintDC dc(this); // needed to prevent zillions of paint events on MSW } @@ -5084,24 +5403,6 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) // try local handlers // - if ( !event.ShiftDown() && - m_selectingKeyboard != wxGridNoCellCoords ) - { - if ( m_selectingTopLeft != wxGridNoCellCoords && - m_selectingBottomRight != wxGridNoCellCoords ) - m_selection->SelectBlock( m_selectingTopLeft.GetRow(), - m_selectingTopLeft.GetCol(), - m_selectingBottomRight.GetRow(), - m_selectingBottomRight.GetCol(), - event.ControlDown(), - event.ShiftDown(), - event.AltDown(), - event.MetaDown() ); - m_selectingTopLeft = wxGridNoCellCoords; - m_selectingBottomRight = wxGridNoCellCoords; - m_selectingKeyboard = wxGridNoCellCoords; - } - switch ( event.KeyCode() ) { case WXK_UP: @@ -5149,13 +5450,23 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) break; case WXK_RETURN: + case WXK_NUMPAD_ENTER: if ( event.ControlDown() ) { event.Skip(); // to let the edit control have the return } else { - MoveCursorDown( event.ShiftDown() ); + if ( GetGridCursorRow() < GetNumberRows()-1 ) + { + MoveCursorDown( event.ShiftDown() ); + } + else + { + // at the bottom of a column + HideCellEditControl(); + SaveEditControlValue(); + } } break; @@ -5165,9 +5476,31 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) case WXK_TAB: if (event.ShiftDown()) - MoveCursorLeft( FALSE ); + { + if ( GetGridCursorCol() > 0 ) + { + MoveCursorLeft( FALSE ); + } + else + { + // at left of grid + HideCellEditControl(); + SaveEditControlValue(); + } + } else - MoveCursorRight( FALSE ); + { + if ( GetGridCursorCol() < GetNumberCols()-1 ) + { + MoveCursorRight( FALSE ); + } + else + { + // at right of grid + HideCellEditControl(); + SaveEditControlValue(); + } + } break; case WXK_HOME: @@ -5221,26 +5554,28 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) // Otherwise fall through to default default: - // alphanumeric keys or F2 (special key just for this) enable - // the cell edit control - // On just Shift/Control I get values for event.KeyCode() - // that are outside the range where isalnum's behaviour is - // well defined, so do an additional sanity check. - if ( !(event.AltDown() || - event.MetaDown() || - event.ControlDown()) && - ((isalnum((int)event.KeyCode()) && - (event.KeyCode() < 256 && event.KeyCode() >= 0)) || - event.KeyCode() == WXK_F2) && - !IsCellEditControlEnabled() && - CanEnableCellControl() ) + // is it possible to edit the current cell at all? + if ( !IsCellEditControlEnabled() && CanEnableCellControl() ) { - EnableCellEditControl(); + // yes, now check whether the cells editor accepts the key int row = m_currentCellCoords.GetRow(); int col = m_currentCellCoords.GetCol(); wxGridCellAttr* attr = GetCellAttr(row, col); wxGridCellEditor *editor = attr->GetEditor(this, row, col); - editor->StartingKey(event); + + // is special and will always start editing, for + // other keys - ask the editor itself + if ( (event.KeyCode() == WXK_F2 && !event.HasModifiers()) + || editor->IsAcceptedKey(event) ) + { + EnableCellEditControl(); + editor->StartingKey(event); + } + else + { + event.Skip(); + } + editor->DecRef(); attr->DecRef(); } @@ -5257,48 +5592,212 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) m_inOnKeyDown = FALSE; } +void wxGrid::OnKeyUp( wxKeyEvent& event ) +{ + // try local handlers + // + if ( event.KeyCode() == WXK_SHIFT ) + { + if ( m_selectingTopLeft != wxGridNoCellCoords && + m_selectingBottomRight != wxGridNoCellCoords ) + m_selection->SelectBlock( m_selectingTopLeft.GetRow(), + m_selectingTopLeft.GetCol(), + m_selectingBottomRight.GetRow(), + m_selectingBottomRight.GetCol(), + event.ControlDown(), + TRUE, + event.AltDown(), + event.MetaDown() ); + m_selectingTopLeft = wxGridNoCellCoords; + m_selectingBottomRight = wxGridNoCellCoords; + m_selectingKeyboard = wxGridNoCellCoords; + } +} + void wxGrid::OnEraseBackground(wxEraseEvent&) { } void wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) { + if ( SendEvent( wxEVT_GRID_SELECT_CELL, coords.GetRow(), coords.GetCol() ) ) + { + // the event has been intercepted - do nothing + return; + } + + wxClientDC dc(m_gridWin); + PrepareDC(dc); + if ( m_currentCellCoords != wxGridNoCellCoords ) { HideCellEditControl(); DisableCellEditControl(); - // Clear the old current cell highlight - wxRect r = BlockToDeviceRect(m_currentCellCoords, m_currentCellCoords); + if ( IsVisible( m_currentCellCoords, FALSE ) ) + { + wxRect r; + r = BlockToDeviceRect(m_currentCellCoords, m_currentCellCoords); + if ( !m_gridLinesEnabled ) + { + r.x--; + r.y--; + r.width++; + r.height++; + } - // Otherwise refresh redraws the highlight! - m_currentCellCoords = coords; + CalcCellsExposed( r ); - m_gridWin->Refresh( FALSE, &r ); + // Otherwise refresh redraws the highlight! + m_currentCellCoords = coords; + + DrawGridCellArea(dc); + DrawAllGridLines( dc, r ); + } } m_currentCellCoords = coords; - wxClientDC dc(m_gridWin); - PrepareDC(dc); - wxGridCellAttr* attr = GetCellAttr(coords); DrawCellHighlight(dc, attr); attr->DecRef(); - -#if 0 - // SN: For my extended selection code, automatic - // deselection is definitely not a good idea. - if ( IsSelection() ) - { - wxRect r( SelectionToDeviceRect() ); - ClearSelection(); - if ( !GetBatchCount() ) m_gridWin->Refresh( FALSE, &r ); - } -#endif } +void wxGrid::HighlightBlock( int topRow, int leftCol, int bottomRow, int rightCol ) +{ + int temp; + wxGridCellCoords updateTopLeft, updateBottomRight; + + if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectRows ) + { + leftCol = 0; + rightCol = GetNumberCols() - 1; + } + else if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectColumns ) + { + topRow = 0; + bottomRow = GetNumberRows() - 1; + } + if ( topRow > bottomRow ) + { + temp = topRow; + topRow = bottomRow; + bottomRow = temp; + } + + if ( leftCol > rightCol ) + { + temp = leftCol; + leftCol = rightCol; + rightCol = temp; + } + + updateTopLeft = wxGridCellCoords( topRow, leftCol ); + updateBottomRight = wxGridCellCoords( bottomRow, rightCol ); + + if ( m_selectingTopLeft != updateTopLeft || + m_selectingBottomRight != updateBottomRight ) + { + // Compute two optimal update rectangles: + // Either one rectangle is a real subset of the + // other, or they are (almost) disjoint! + wxRect rect[4]; + bool need_refresh[4]; + need_refresh[0] = + need_refresh[1] = + need_refresh[2] = + need_refresh[3] = FALSE; + int i; + + // Store intermediate values + wxCoord oldLeft = m_selectingTopLeft.GetCol(); + wxCoord oldTop = m_selectingTopLeft.GetRow(); + wxCoord oldRight = m_selectingBottomRight.GetCol(); + wxCoord oldBottom = m_selectingBottomRight.GetRow(); + + // Determine the outer/inner coordinates. + if (oldLeft > leftCol) + { + temp = oldLeft; + oldLeft = leftCol; + leftCol = temp; + } + if (oldTop > topRow ) + { + temp = oldTop; + oldTop = topRow; + topRow = temp; + } + if (oldRight < rightCol ) + { + temp = oldRight; + oldRight = rightCol; + rightCol = temp; + } + if (oldBottom < bottomRow) + { + temp = oldBottom; + oldBottom = bottomRow; + bottomRow = temp; + } + + // Now, either the stuff marked old is the outer + // rectangle or we don't have a situation where one + // is contained in the other. + + if ( oldLeft < leftCol ) + { + need_refresh[0] = TRUE; + rect[0] = BlockToDeviceRect( wxGridCellCoords ( oldTop, + oldLeft ), + wxGridCellCoords ( oldBottom, + leftCol - 1 ) ); + } + + if ( oldTop < topRow ) + { + need_refresh[1] = TRUE; + rect[1] = BlockToDeviceRect( wxGridCellCoords ( oldTop, + leftCol ), + wxGridCellCoords ( topRow - 1, + rightCol ) ); + } + + if ( oldRight > rightCol ) + { + need_refresh[2] = TRUE; + rect[2] = BlockToDeviceRect( wxGridCellCoords ( oldTop, + rightCol + 1 ), + wxGridCellCoords ( oldBottom, + oldRight ) ); + } + + if ( oldBottom > bottomRow ) + { + need_refresh[3] = TRUE; + rect[3] = BlockToDeviceRect( wxGridCellCoords ( bottomRow + 1, + leftCol ), + wxGridCellCoords ( oldBottom, + rightCol ) ); + } + + + // Change Selection + m_selectingTopLeft = updateTopLeft; + m_selectingBottomRight = updateBottomRight; + + // various Refresh() calls + for (i = 0; i < 4; i++ ) + if ( need_refresh[i] && rect[i] != wxGridNoCellRect ) + m_gridWin->Refresh( FALSE, &(rect[i]) ); + } + + // never generate an event as it will be generated from + // wxGridSelection::SelectBlock! + // (old comment from when this was the body of SelectBlock) +} + // // ------ functions to get/send data (see also public functions) // @@ -5359,32 +5858,33 @@ void wxGrid::DrawGridCellArea( wxDC& dc ) void wxGrid::DrawGridSpace( wxDC& dc ) { - if ( m_numRows && m_numCols ) - { - int cw, ch; - m_gridWin->GetClientSize( &cw, &ch ); + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); - int right, bottom; - CalcUnscrolledPosition( cw, ch, &right, &bottom ); + int right, bottom; + CalcUnscrolledPosition( cw, ch, &right, &bottom ); - if ( right > GetColRight(m_numCols-1) || - bottom > GetRowBottom(m_numRows-1) ) - { - int left, top; - CalcUnscrolledPosition( 0, 0, &left, &top ); + int rightCol = m_numCols > 0 ? GetColRight(m_numCols - 1) : 0; + int bottomRow = m_numRows > 0 ? GetRowBottom(m_numRows - 1) : 0 ; - dc.SetBrush( wxBrush(GetDefaultCellBackgroundColour(), wxSOLID) ); - dc.SetPen( *wxTRANSPARENT_PEN ); + if ( right > rightCol || bottom > bottomRow ) + { + int left, top; + CalcUnscrolledPosition( 0, 0, &left, &top ); - if ( right > GetColRight(m_numCols-1) ) - dc.DrawRectangle( GetColRight(m_numCols-1), top, - right - GetColRight(m_numCols-1), ch ); + dc.SetBrush( wxBrush(GetDefaultCellBackgroundColour(), wxSOLID) ); + dc.SetPen( *wxTRANSPARENT_PEN ); - if ( bottom > GetRowBottom(m_numRows-1) ) - dc.DrawRectangle( left, GetRowBottom(m_numRows-1), - cw, bottom - GetRowBottom(m_numRows-1) ); - } - } + if ( right > rightCol ) + { + dc.DrawRectangle( rightCol, top, right - rightCol, ch); + } + + if ( bottom > bottomRow ) + { + dc.DrawRectangle( left, bottomRow, cw, bottom - bottomRow); + } + } } @@ -5406,14 +5906,11 @@ void wxGrid::DrawCell( wxDC& dc, const wxGridCellCoords& coords ) bool isCurrent = coords == m_currentCellCoords; - wxRect rect; - rect.x = GetColLeft(col); - rect.y = GetRowTop(row); - rect.width = GetColWidth(col) - 1; - rect.height = GetRowHeight(row) - 1; + wxRect rect = CellToRect( row, col ); // if the editor is shown, we should use it and not the renderer - if ( isCurrent && IsCellEditControlEnabled() ) + // Note: However, only if it is really _shown_, i.e. not hidden! + if ( isCurrent && IsCellEditControlShown() ) { wxGridCellEditor *editor = attr->GetEditor(this, row, col); editor->PaintBackground(rect, attr); @@ -5439,16 +5936,12 @@ void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ) if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) return; - wxRect rect; - rect.x = GetColLeft(col); - rect.y = GetRowTop(row); - rect.width = GetColWidth(col) - 1; - rect.height = GetRowHeight(row) - 1; + wxRect rect = CellToRect(row, col); // hmmm... what could we do here to show that the cell is disabled? // for now, I just draw a thinner border than for the other ones, but // it doesn't look really good - dc.SetPen(wxPen(m_gridLineColour, attr->IsReadOnly() ? 1 : 3, wxSOLID)); + dc.SetPen(wxPen(m_cellHighlightColour, attr->IsReadOnly() ? 1 : 3, wxSOLID)); dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.DrawRectangle(rect); @@ -5507,7 +6000,7 @@ void wxGrid::DrawHighlight(wxDC& dc) m_currentCellCoords.Set(0, 0); } - if ( IsCellEditControlEnabled() ) + if ( IsCellEditControlShown() ) { // don't show highlight when the edit control is shown return; @@ -5541,7 +6034,7 @@ void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED_GTK(reg) ) int top, bottom, left, right; -#ifndef __WXGTK__ +#if 0 //#ifndef __WXGTK__ if (reg.IsEmpty()) { int cw, ch; @@ -5612,7 +6105,7 @@ void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED_GTK(reg) ) void wxGrid::DrawRowLabels( wxDC& dc ) { - if ( !m_numRows || !m_numCols ) return; + if ( !m_numRows ) return; size_t i; size_t numLabels = m_rowLabelsExposed.GetCount(); @@ -5660,7 +6153,7 @@ void wxGrid::DrawRowLabel( wxDC& dc, int row ) void wxGrid::DrawColLabels( wxDC& dc ) { - if ( !m_numRows || !m_numCols ) return; + if ( !m_numCols ) return; size_t i; size_t numLabels = m_colLabelsExposed.GetCount(); @@ -5695,10 +6188,6 @@ void wxGrid::DrawColLabel( wxDC& dc, int col ) dc.SetTextForeground( GetLabelTextColour() ); dc.SetFont( GetLabelFont() ); - dc.SetBackgroundMode( wxTRANSPARENT ); - dc.SetTextForeground( GetLabelTextColour() ); - dc.SetFont( GetLabelFont() ); - int hAlign, vAlign; GetColLabelAlignment( &hAlign, &vAlign ); @@ -5826,6 +6315,24 @@ void wxGrid::GetTextBoxSize( wxDC& dc, *height = h; } +// +// ------ Batch processing. +// +void wxGrid::EndBatch() +{ + if ( m_batchCount > 0 ) + { + m_batchCount--; + if ( !m_batchCount ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + m_colLabelWin->Refresh(); + m_cornerLabelWin->Refresh(); + m_gridWin->Refresh(); + } + } +} // // ------ Edit control functions @@ -5838,12 +6345,8 @@ void wxGrid::EnableEditing( bool edit ) // if ( edit != m_editable ) { + if(!edit) EnableCellEditControl(edit); m_editable = edit; - - // FIXME IMHO this won't disable the edit control if edit == FALSE - // because of the check in the beginning of - // EnableCellEditControl() just below (VZ) - EnableCellEditControl(m_editable); } } @@ -5905,12 +6408,39 @@ bool wxGrid::IsCellEditControlEnabled() const return m_cellEditCtrlEnabled ? !IsCurrentCellReadOnly() : FALSE; } +bool wxGrid::IsCellEditControlShown() const +{ + bool isShown = FALSE; + + if ( m_cellEditCtrlEnabled ) + { + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + wxGridCellAttr* attr = GetCellAttr(row, col); + wxGridCellEditor* editor = attr->GetEditor((wxGrid*) this, row, col); + attr->DecRef(); + + if ( editor ) + { + if ( editor->IsCreated() ) + { + isShown = editor->GetControl()->IsShown(); + } + + editor->DecRef(); + } + } + + return isShown; +} + void wxGrid::ShowCellEditControl() { if ( IsCellEditControlEnabled() ) { if ( !IsVisible( m_currentCellCoords ) ) { + m_cellEditCtrlEnabled = FALSE; return; } else @@ -5972,6 +6502,8 @@ void wxGrid::HideCellEditControl() editor->DecRef(); attr->DecRef(); m_gridWin->SetFocus(); + wxRect rect( CellToRect( row, col ) ); + m_gridWin->Refresh( FALSE, &rect ); } } @@ -6106,6 +6638,11 @@ wxRect wxGrid::CellToRect( int row, int col ) rect.height = GetRowHeight(row); } + // if grid lines are enabled, then the area of the cell is a bit smaller + if (m_gridLinesEnabled) { + rect.width -= 1; + rect.height -= 1; + } return rect; } @@ -6232,18 +6769,21 @@ void wxGrid::MakeCellVisible( int row, int col ) bool wxGrid::MoveCursorUp( bool expandSelection ) { if ( m_currentCellCoords != wxGridNoCellCoords && - m_currentCellCoords.GetRow() > 0 ) + m_currentCellCoords.GetRow() >= 0 ) { - if ( expandSelection ) + if ( expandSelection) { if ( m_selectingKeyboard == wxGridNoCellCoords ) m_selectingKeyboard = m_currentCellCoords; - m_selectingKeyboard.SetRow( m_selectingKeyboard.GetRow() - 1 ); - MakeCellVisible( m_selectingKeyboard.GetRow(), - m_selectingKeyboard.GetCol() ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + if ( m_selectingKeyboard.GetRow() > 0 ) + { + m_selectingKeyboard.SetRow( m_selectingKeyboard.GetRow() - 1 ); + MakeCellVisible( m_selectingKeyboard.GetRow(), + m_selectingKeyboard.GetCol() ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); + } } - else + else if ( m_currentCellCoords.GetRow() > 0 ) { ClearSelection(); MakeCellVisible( m_currentCellCoords.GetRow() - 1, @@ -6251,6 +6791,8 @@ bool wxGrid::MoveCursorUp( bool expandSelection ) SetCurrentCell( m_currentCellCoords.GetRow() - 1, m_currentCellCoords.GetCol() ); } + else + return FALSE; return TRUE; } @@ -6261,18 +6803,21 @@ bool wxGrid::MoveCursorUp( bool expandSelection ) bool wxGrid::MoveCursorDown( bool expandSelection ) { if ( m_currentCellCoords != wxGridNoCellCoords && - m_currentCellCoords.GetRow() < m_numRows-1 ) + m_currentCellCoords.GetRow() < m_numRows ) { if ( expandSelection ) { if ( m_selectingKeyboard == wxGridNoCellCoords ) m_selectingKeyboard = m_currentCellCoords; - m_selectingKeyboard.SetRow( m_selectingKeyboard.GetRow() + 1 ); - MakeCellVisible( m_selectingKeyboard.GetRow(), - m_selectingKeyboard.GetCol() ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + if ( m_selectingKeyboard.GetRow() < m_numRows-1 ) + { + m_selectingKeyboard.SetRow( m_selectingKeyboard.GetRow() + 1 ); + MakeCellVisible( m_selectingKeyboard.GetRow(), + m_selectingKeyboard.GetCol() ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); + } } - else + else if ( m_currentCellCoords.GetRow() < m_numRows - 1 ) { ClearSelection(); MakeCellVisible( m_currentCellCoords.GetRow() + 1, @@ -6280,6 +6825,8 @@ bool wxGrid::MoveCursorDown( bool expandSelection ) SetCurrentCell( m_currentCellCoords.GetRow() + 1, m_currentCellCoords.GetCol() ); } + else + return FALSE; return TRUE; } @@ -6290,18 +6837,21 @@ bool wxGrid::MoveCursorDown( bool expandSelection ) bool wxGrid::MoveCursorLeft( bool expandSelection ) { if ( m_currentCellCoords != wxGridNoCellCoords && - m_currentCellCoords.GetCol() > 0 ) + m_currentCellCoords.GetCol() >= 0 ) { if ( expandSelection ) { if ( m_selectingKeyboard == wxGridNoCellCoords ) m_selectingKeyboard = m_currentCellCoords; - m_selectingKeyboard.SetCol( m_selectingKeyboard.GetCol() - 1 ); - MakeCellVisible( m_selectingKeyboard.GetRow(), - m_selectingKeyboard.GetCol() ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + if ( m_selectingKeyboard.GetCol() > 0 ) + { + m_selectingKeyboard.SetCol( m_selectingKeyboard.GetCol() - 1 ); + MakeCellVisible( m_selectingKeyboard.GetRow(), + m_selectingKeyboard.GetCol() ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); + } } - else + else if ( m_currentCellCoords.GetCol() > 0 ) { ClearSelection(); MakeCellVisible( m_currentCellCoords.GetRow(), @@ -6309,6 +6859,8 @@ bool wxGrid::MoveCursorLeft( bool expandSelection ) SetCurrentCell( m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol() - 1 ); } + else + return FALSE; return TRUE; } @@ -6319,18 +6871,21 @@ bool wxGrid::MoveCursorLeft( bool expandSelection ) bool wxGrid::MoveCursorRight( bool expandSelection ) { if ( m_currentCellCoords != wxGridNoCellCoords && - m_currentCellCoords.GetCol() < m_numCols - 1 ) + m_currentCellCoords.GetCol() < m_numCols ) { if ( expandSelection ) { if ( m_selectingKeyboard == wxGridNoCellCoords ) m_selectingKeyboard = m_currentCellCoords; - m_selectingKeyboard.SetCol( m_selectingKeyboard.GetCol() + 1 ); - MakeCellVisible( m_selectingKeyboard.GetRow(), - m_selectingKeyboard.GetCol() ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + if ( m_selectingKeyboard.GetCol() < m_numCols - 1 ) + { + m_selectingKeyboard.SetCol( m_selectingKeyboard.GetCol() + 1 ); + MakeCellVisible( m_selectingKeyboard.GetRow(), + m_selectingKeyboard.GetCol() ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); + } } - else + else if ( m_currentCellCoords.GetCol() < m_numCols - 1 ) { ClearSelection(); MakeCellVisible( m_currentCellCoords.GetRow(), @@ -6338,6 +6893,8 @@ bool wxGrid::MoveCursorRight( bool expandSelection ) SetCurrentCell( m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol() + 1 ); } + else + return FALSE; return TRUE; } @@ -6455,7 +7012,7 @@ bool wxGrid::MoveCursorUpBlock( bool expandSelection ) if ( expandSelection ) { m_selectingKeyboard = wxGridCellCoords( row, col ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); } else { @@ -6518,7 +7075,7 @@ bool wxGrid::MoveCursorDownBlock( bool expandSelection ) if ( expandSelection ) { m_selectingKeyboard = wxGridCellCoords( row, col ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); } else { @@ -6582,7 +7139,7 @@ bool wxGrid::MoveCursorLeftBlock( bool expandSelection ) if ( expandSelection ) { m_selectingKeyboard = wxGridCellCoords( row, col ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); } else { @@ -6646,7 +7203,7 @@ bool wxGrid::MoveCursorRightBlock( bool expandSelection ) if ( expandSelection ) { m_selectingKeyboard = wxGridCellCoords( row, col ); - SelectBlock( m_currentCellCoords, m_selectingKeyboard ); + HighlightBlock( m_currentCellCoords, m_selectingKeyboard ); } else { @@ -6841,7 +7398,7 @@ void wxGrid::SetRowLabelValue( int row, const wxString& s ) if ( rect.height > 0 ) { CalcScrolledPosition(0, rect.y, &rect.x, &rect.y); - rect.x = m_left; + rect.x = 0; rect.width = m_rowLabelWidth; m_rowLabelWin->Refresh( TRUE, &rect ); } @@ -6860,7 +7417,7 @@ void wxGrid::SetColLabelValue( int col, const wxString& s ) if ( rect.width > 0 ) { CalcScrolledPosition(rect.x, 0, &rect.x, &rect.y); - rect.y = m_top; + rect.y = 0; rect.height = m_colLabelHeight; m_colLabelWin->Refresh( TRUE, &rect ); } @@ -6880,6 +7437,21 @@ void wxGrid::SetGridLineColour( const wxColour& colour ) } } + +void wxGrid::SetCellHighlightColour( const wxColour& colour ) +{ + if ( m_cellHighlightColour != colour ) + { + m_cellHighlightColour = colour; + + wxClientDC dc( m_gridWin ); + PrepareDC( dc ); + wxGridCellAttr* attr = GetCellAttr(m_currentCellCoords); + DrawCellHighlight(dc, attr); + attr->DecRef(); + } +} + void wxGrid::EnableGridLines( bool enable ) { if ( enable != m_gridLinesEnabled ) @@ -7147,8 +7719,7 @@ wxGridCellAttr *wxGrid::GetOrCreateCellAttr(int row, int col) const if ( !LookupAttr(row, col, &attr) || !attr ) { wxASSERT_MSG( m_table, - _T("we may only be called if CanHaveAttributes() " - "returned TRUE and then m_table should be !NULL") ); + _T("we may only be called if CanHaveAttributes() returned TRUE and then m_table should be !NULL") ); attr = m_table->GetAttr(row, col); if ( !attr ) @@ -7380,8 +7951,8 @@ void wxGrid::SetDefaultRowSize( int height, bool resizeExistingRows ) if ( resizeExistingRows ) { InitRowHeights(); - - CalcDimensions(); + if ( !GetBatchCount() ) + CalcDimensions(); } } @@ -7404,7 +7975,8 @@ void wxGrid::SetRowSize( int row, int height ) { m_rowBottoms[i] += diff; } - CalcDimensions(); + if ( !GetBatchCount() ) + CalcDimensions(); } void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols ) @@ -7414,8 +7986,8 @@ void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols ) if ( resizeExistingCols ) { InitColWidths(); - - CalcDimensions(); + if ( !GetBatchCount() ) + CalcDimensions(); } } @@ -7440,7 +8012,8 @@ void wxGrid::SetColSize( int col, int width ) { m_colRights[i] += diff; } - CalcDimensions(); + if ( !GetBatchCount() ) + CalcDimensions(); } @@ -7515,7 +8088,7 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column ) if ( column ) dc.GetTextExtent( GetColLabelValue(col), &w, &h ); else - dc.GetTextExtent( GetRowLabelValue(col), &w, &h ); + dc.GetTextExtent( GetRowLabelValue(row), &w, &h ); extent = column ? w : h; if ( extent > extentMax ) @@ -7536,13 +8109,42 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column ) // leave some space around text extentMax += 10; } + else + { + extentMax += 6; + } } if ( column ) + { SetColSize(col, extentMax); + if ( !GetBatchCount() ) + { + int cw, ch, dummy; + m_gridWin->GetClientSize( &cw, &ch ); + wxRect rect ( CellToRect( 0, col ) ); + rect.y = 0; + CalcScrolledPosition(rect.x, 0, &rect.x, &dummy); + rect.width = cw - rect.x; + rect.height = m_colLabelHeight; + m_colLabelWin->Refresh( TRUE, &rect ); + } + } else + { SetRowSize(row, extentMax); - + if ( !GetBatchCount() ) + { + int cw, ch, dummy; + m_gridWin->GetClientSize( &cw, &ch ); + wxRect rect ( CellToRect( row, 0 ) ); + rect.x = 0; + CalcScrolledPosition(0, rect.y, &dummy, &rect.y); + rect.width = m_rowLabelWidth; + rect.height = ch - rect.y; + m_rowLabelWin->Refresh( TRUE, &rect ); + } + } if ( setAsMin ) { if ( column ) @@ -7556,6 +8158,8 @@ int wxGrid::SetOrCalcColumnSizes(bool calcOnly, bool setAsMin) { int width = m_rowLabelWidth; + if ( !calcOnly ) + BeginBatch(); for ( int col = 0; col < m_numCols; col++ ) { if ( !calcOnly ) @@ -7565,7 +8169,8 @@ int wxGrid::SetOrCalcColumnSizes(bool calcOnly, bool setAsMin) width += GetColWidth(col); } - + if ( !calcOnly ) + EndBatch(); return width; } @@ -7573,6 +8178,8 @@ int wxGrid::SetOrCalcRowSizes(bool calcOnly, bool setAsMin) { int height = m_colLabelHeight; + if ( !calcOnly ) + BeginBatch(); for ( int row = 0; row < m_numRows; row++ ) { if ( !calcOnly ) @@ -7582,14 +8189,15 @@ int wxGrid::SetOrCalcRowSizes(bool calcOnly, bool setAsMin) height += GetRowHeight(row); } - + if ( !calcOnly ) + EndBatch(); return height; } void wxGrid::AutoSize() { // set the size too - SetSize(SetOrCalcColumnSizes(FALSE), SetOrCalcRowSizes(FALSE)); + SetClientSize(SetOrCalcColumnSizes(FALSE), SetOrCalcRowSizes(FALSE)); } wxSize wxGrid::DoGetBestSize() const @@ -7620,7 +8228,7 @@ void wxGrid::SetCellValue( int row, int col, const wxString& s ) { if ( m_table ) { - m_table->SetValue( row, col, s.c_str() ); + m_table->SetValue( row, col, s ); if ( !GetBatchCount() ) { wxClientDC dc( m_gridWin ); @@ -7630,7 +8238,10 @@ void wxGrid::SetCellValue( int row, int col, const wxString& s ) if ( m_currentCellCoords.GetRow() == row && m_currentCellCoords.GetCol() == col && - IsCellEditControlEnabled()) + IsCellEditControlShown()) + // Note: If we are using IsCellEditControlEnabled, + // this interacts badly with calling SetCellValue from + // an EVT_GRID_CELL_CHANGE handler. { HideCellEditControl(); ShowCellEditControl(); // will reread data from table @@ -7648,7 +8259,7 @@ void wxGrid::SelectRow( int row, bool addToSelected ) if ( IsSelection() && !addToSelected ) ClearSelection(); - m_selection->SelectRow( row ); + m_selection->SelectRow( row, FALSE, addToSelected ); } @@ -7657,146 +8268,25 @@ void wxGrid::SelectCol( int col, bool addToSelected ) if ( IsSelection() && !addToSelected ) ClearSelection(); - m_selection->SelectCol( col ); + m_selection->SelectCol( col, FALSE, addToSelected ); } -void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol ) +void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected ) { - int temp; - wxGridCellCoords updateTopLeft, updateBottomRight; - - if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectRows ) - { - leftCol = 0; - rightCol = GetNumberCols() - 1; - } - else if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectColumns ) - { - topRow = 0; - bottomRow = GetNumberRows() - 1; - } - if ( topRow > bottomRow ) - { - temp = topRow; - topRow = bottomRow; - bottomRow = temp; - } + if ( IsSelection() && !addToSelected ) + ClearSelection(); - if ( leftCol > rightCol ) - { - temp = leftCol; - leftCol = rightCol; - rightCol = temp; - } - - updateTopLeft = wxGridCellCoords( topRow, leftCol ); - updateBottomRight = wxGridCellCoords( bottomRow, rightCol ); - - if ( m_selectingTopLeft != updateTopLeft || - m_selectingBottomRight != updateBottomRight ) - { - // Compute two optimal update rectangles: - // Either one rectangle is a real subset of the - // other, or they are (almost) disjoint! - wxRect rect[4]; - bool need_refresh[4]; - need_refresh[0] = - need_refresh[1] = - need_refresh[2] = - need_refresh[3] = FALSE; - int i; - - // Store intermediate values - wxCoord oldLeft = m_selectingTopLeft.GetCol(); - wxCoord oldTop = m_selectingTopLeft.GetRow(); - wxCoord oldRight = m_selectingBottomRight.GetCol(); - wxCoord oldBottom = m_selectingBottomRight.GetRow(); - - // Determine the outer/inner coordinates. - if (oldLeft > leftCol) - { - temp = oldLeft; - oldLeft = leftCol; - leftCol = temp; - } - if (oldTop > topRow ) - { - temp = oldTop; - oldTop = topRow; - topRow = temp; - } - if (oldRight < rightCol ) - { - temp = oldRight; - oldRight = rightCol; - rightCol = temp; - } - if (oldBottom < bottomRow) - { - temp = oldBottom; - oldBottom = bottomRow; - bottomRow = temp; - } - - // Now, either the stuff marked old is the outer - // rectangle or we don't have a situation where one - // is contained in the other. - - if ( oldLeft < leftCol ) - { - need_refresh[0] = TRUE; - rect[0] = BlockToDeviceRect( wxGridCellCoords ( oldTop, - oldLeft ), - wxGridCellCoords ( oldBottom, - leftCol - 1 ) ); - } - - if ( oldTop < topRow ) - { - need_refresh[1] = TRUE; - rect[1] = BlockToDeviceRect( wxGridCellCoords ( oldTop, - leftCol ), - wxGridCellCoords ( topRow - 1, - rightCol ) ); - } - - if ( oldRight > rightCol ) - { - need_refresh[2] = TRUE; - rect[2] = BlockToDeviceRect( wxGridCellCoords ( oldTop, - rightCol + 1 ), - wxGridCellCoords ( oldBottom, - oldRight ) ); - } - - if ( oldBottom > bottomRow ) - { - need_refresh[3] = TRUE; - rect[3] = BlockToDeviceRect( wxGridCellCoords ( bottomRow + 1, - leftCol ), - wxGridCellCoords ( oldBottom, - rightCol ) ); - } - - - // Change Selection - m_selectingTopLeft = updateTopLeft; - m_selectingBottomRight = updateBottomRight; - - // various Refresh() calls - for (i = 0; i < 4; i++ ) - if ( need_refresh[i] && rect[i] != wxGridNoCellRect ) - m_gridWin->Refresh( FALSE, &(rect[i]) ); - } - - // never generate an event as it will be generated from - // wxGridSelection::SelectBlock! + m_selection->SelectBlock( topRow, leftCol, bottomRow, rightCol, + FALSE, addToSelected ); } + void wxGrid::SelectAll() { - m_selection->SelectBlock( 0, 0, m_numRows-1, m_numCols-1 ); + if ( m_numRows > 0 && m_numCols > 0 ) + m_selection->SelectBlock( 0, 0, m_numRows-1, m_numCols-1 ); } bool wxGrid::IsSelection() @@ -7861,6 +8351,9 @@ wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft, int cw, ch; m_gridWin->GetClientSize( &cw, &ch ); + if (right < 0 || bottom < 0 || left > cw || top > ch) + return wxRect( 0, 0, 0, 0); + rect.SetLeft( wxMax(0, left) ); rect.SetTop( wxMax(0, top) ); rect.SetRight( wxMin(cw, right) ); @@ -7937,3 +8430,5 @@ wxGridRangeSelectEvent::wxGridRangeSelectEvent(int id, wxEventType type, wxObjec #endif // ifndef wxUSE_NEW_GRID + +// vi:sts=4:sw=4:et diff --git a/src/generic/gridsel.cpp b/src/generic/gridsel.cpp index d3d2222a0d..f6e4b2ba71 100644 --- a/src/generic/gridsel.cpp +++ b/src/generic/gridsel.cpp @@ -517,12 +517,14 @@ void wxGridSelection::SelectCell( int row, int col, { if ( m_selectionMode == wxGrid::wxGridSelectRows ) { - SelectBlock(row, 0, row, m_grid->GetNumberCols() - 1 ); + SelectBlock(row, 0, row, m_grid->GetNumberCols() - 1, + ControlDown, ShiftDown, AltDown, MetaDown); return; } else if ( m_selectionMode == wxGrid::wxGridSelectColumns ) { - SelectBlock(0, col, m_grid->GetNumberRows() - 1, col ); + SelectBlock(0, col, m_grid->GetNumberRows() - 1, col, + ControlDown, ShiftDown, AltDown, MetaDown); return; } else if ( IsInSelection ( row, col ) ) @@ -538,14 +540,14 @@ void wxGridSelection::SelectCell( int row, int col, // Send event if (sendEvent) { - wxGridEvent gridEvt( m_grid->GetId(), - wxEVT_GRID_SELECT_CELL, - m_grid, - row, col, - -1, -1, - TRUE, - ControlDown, ShiftDown, - AltDown, MetaDown); + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( row, col ), + wxGridCellCoords( row, col ), + TRUE, + ControlDown, ShiftDown, + AltDown, MetaDown); m_grid->GetEventHandler()->ProcessEvent(gridEvt); } } @@ -588,12 +590,14 @@ void wxGridSelection::ToggleCellSelection( int row, int col, ((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r ); // Send event - wxGridEvent gridEvt( m_grid->GetId(), - wxEVT_GRID_SELECT_CELL, - m_grid, - row, col, -1, -1, FALSE, - ControlDown, ShiftDown, - AltDown, MetaDown ); + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( row, col ), + wxGridCellCoords( row, col ), + FALSE, + ControlDown, ShiftDown, + AltDown, MetaDown ); m_grid->GetEventHandler()->ProcessEvent(gridEvt); return; } @@ -712,12 +716,14 @@ void wxGridSelection::ToggleCellSelection( int row, int col, wxGridCellCoords( row, col ) ); if ( !m_grid->GetBatchCount() ) ((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r ); - wxGridEvent gridEvt( m_grid->GetId(), - wxEVT_GRID_SELECT_CELL, - m_grid, - row, col, -1, -1, FALSE, - ControlDown, ShiftDown, - AltDown, MetaDown ); + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( row, col ), + wxGridCellCoords( row, col ), + FALSE, + ControlDown, ShiftDown, + AltDown, MetaDown ); m_grid->GetEventHandler()->ProcessEvent(gridEvt); break; } @@ -760,7 +766,6 @@ void wxGridSelection::ToggleCellSelection( int row, int col, void wxGridSelection::ClearSelection() { - // Should this send deselection events? size_t n; // deselect all invidiual cells and update the screen @@ -823,6 +828,19 @@ void wxGridSelection::ClearSelection() ((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r ); } } + + // One deselection event, indicating deselection of _all_ cells. + // (No finer grained events for each of the smaller regions + // deselected above!) + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( 0, 0 ), + wxGridCellCoords( m_grid->GetNumberRows() - 1, + m_grid->GetNumberCols() - 1 ), + FALSE ); + + m_grid->GetEventHandler()->ProcessEvent(gridEvt); } @@ -926,6 +944,10 @@ void wxGridSelection::UpdateRows( size_t pos, int numRows ) } } } + // No need to touch selected columns, unless we removed _all_ + // rows, in this case, we remove all columns from the selection. + if ( !m_grid->GetNumberRows() ) + m_colSelection.Clear(); } void wxGridSelection::UpdateCols( size_t pos, int numCols ) @@ -1028,6 +1050,11 @@ void wxGridSelection::UpdateCols( size_t pos, int numCols ) } } } + + // No need to touch selected rows, unless we removed _all_ + // columns, in this case, we remove all rows from the selection. + if ( !m_grid->GetNumberCols() ) + m_rowSelection.Clear(); } int wxGridSelection::BlockContain( int topRow1, int leftCol1, diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index 838d373f04..8f6276fb25 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -81,7 +81,7 @@ void wxExtHelpController::SetViewer(const wxString& viewer, long flags) } bool -wxExtHelpController::DisplayHelp(wxString const &relativeURL) +wxExtHelpController::DisplayHelp(const wxString &relativeURL) { wxBusyCursor b; // display a busy cursor @@ -89,7 +89,7 @@ wxExtHelpController::DisplayHelp(wxString const &relativeURL) #if defined(__WXMSW__) wxString url; url << m_MapFile << '\\' << relativeURL.BeforeFirst('#'); - bool bOk = (int)ShellExecute(NULL, "open", url, + bool bOk = (int)ShellExecute(NULL, wxT("open"), url.c_str(), NULL, NULL, SW_SHOWNORMAL ) > 32; if ( !bOk ) { diff --git a/src/generic/helphtml.cpp b/src/generic/helphtml.cpp index f8731d8d17..1f3f59250f 100644 --- a/src/generic/helphtml.cpp +++ b/src/generic/helphtml.cpp @@ -166,7 +166,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile) m_MapList = new wxList; m_NumOfEntries = 0; - FILE *input = fopen(mapFile.fn_str(),"rt"); + FILE *input = wxFopen(mapFile,wxT("rt")); if(! input) return FALSE; do @@ -251,6 +251,16 @@ wxHTMLHelpControllerBase::DisplaySection(int sectionNo) return FALSE; } +bool wxHTMLHelpControllerBase::DisplaySection(const wxString& section) +{ + bool isFilename = (section.Find(wxT(".htm")) != -1); + + if (isFilename) + return DisplayHelp(section); + else + return KeywordSearch(section); +} + bool wxHTMLHelpControllerBase::DisplayBlock(long blockNo) { diff --git a/src/generic/helpwxht.cpp b/src/generic/helpwxht.cpp index 955dcd87e8..9218355067 100644 --- a/src/generic/helpwxht.cpp +++ b/src/generic/helpwxht.cpp @@ -19,15 +19,16 @@ # pragma hdrstop #endif -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifndef WX_PRECOMP -# include "wx/string.h" -# include "wx/utils.h" -# include "wx/list.h" -# include "wx/intl.h" -# include "wx/layout.h" -# include "wx/combobox.h" + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/list.h" + #include "wx/intl.h" + #include "wx/layout.h" + #include "wx/combobox.h" + #include "wx/button.h" #endif #include "wx/helpbase.h" @@ -266,7 +267,7 @@ wxHelpControllerHtml::~wxHelpControllerHtml(void) #endif bool -wxHelpControllerHtml::DisplayHelp(wxString const &relativeURL) +wxHelpControllerHtml::DisplayHelp(const wxString &relativeURL) { wxBusyCursor b; // display a busy cursor diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 92d7369c70..aa3a292208 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: imaglist.cpp +// Name: generic/imaglist.cpp // Purpose: // Author: Robert Roebling // Id: $id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -28,11 +28,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject) -wxImageList::wxImageList( int width, int height, bool WXUNUSED(mask), int WXUNUSED(initialCount) ) +wxImageList::wxImageList( int width, int height, bool mask, int initialCount ) { - m_width = width; - m_height = height; - Create(); + (void)Create(width, height, mask, initialCount); } wxImageList::~wxImageList() @@ -44,6 +42,14 @@ int wxImageList::GetImageCount() const return m_images.Number(); } +bool wxImageList::Create( int width, int height, bool WXUNUSED(mask), int WXUNUSED(initialCount) ) +{ + m_width = width; + m_height = height; + + return Create(); +} + bool wxImageList::Create() { m_images.DeleteContents( TRUE ); @@ -62,7 +68,8 @@ int wxImageList::Add( const wxBitmap &bitmap ) int wxImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask ) { wxBitmap bmp(bitmap); - bmp.SetMask(new wxMask(mask)); + if (mask.Ok()) + bmp.SetMask(new wxMask(mask)); return Add(bmp); } diff --git a/src/generic/laywin.cpp b/src/generic/laywin.cpp index 2c9afa2c7d..3e8df62f23 100644 --- a/src/generic/laywin.cpp +++ b/src/generic/laywin.cpp @@ -41,9 +41,13 @@ BEGIN_EVENT_TABLE(wxSashLayoutWindow, wxSashWindow) EVT_QUERY_LAYOUT_INFO(wxSashLayoutWindow::OnQueryLayoutInfo) END_EVENT_TABLE() -wxSashLayoutWindow::wxSashLayoutWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, long style, const wxString& name): - wxSashWindow(parent, id, pos, size, style, name) +bool wxSashLayoutWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) +{ + return wxSashWindow::Create(parent, id, pos, size, style, name); +} + +void wxSashLayoutWindow::Init() { m_orientation = wxLAYOUT_HORIZONTAL; m_alignment = wxLAYOUT_TOP; @@ -153,7 +157,15 @@ void wxSashLayoutWindow::OnCalculateLayout(wxCalculateLayoutEvent& event) { // If not in query mode, resize the window. // TODO: add wxRect& form to wxWindow::SetSize + wxSize sz = GetSize(); + wxPoint pos = GetPosition(); SetSize(thisRect.x, thisRect.y, thisRect.width, thisRect.height); + + // Make sure the sash is erased when the window is resized + if ((pos.x != thisRect.x || pos.y != thisRect.y || sz.x != thisRect.width || sz.y != thisRect.height) && + (GetSashVisible(wxSASH_TOP) || GetSashVisible(wxSASH_RIGHT) || GetSashVisible(wxSASH_BOTTOM) || GetSashVisible(wxSASH_LEFT))) + Refresh(TRUE); + } event.SetRect(clientSize); @@ -164,6 +176,8 @@ void wxSashLayoutWindow::OnCalculateLayout(wxCalculateLayoutEvent& event) * wxLayoutAlgorithm */ +#if wxUSE_MDI_ARCHITECTURE + // Lays out windows for an MDI frame. The MDI client area gets what's left // over. bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r) @@ -201,6 +215,8 @@ bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r) return TRUE; } +#endif // wxUSE_MDI_ARCHITECTURE + // Layout algorithm for any window. mainWindow gets what's left over. bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow) { @@ -242,11 +258,14 @@ bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow) { wxWindow* win = (wxWindow*) node->Data(); - event.SetId(win->GetId()); - event.SetEventObject(win); - event.SetFlags(0); // ?? + if (win != mainWindow) + { + event.SetId(win->GetId()); + event.SetEventObject(win); + event.SetFlags(0); // ?? - win->GetEventHandler()->ProcessEvent(event); + win->GetEventHandler()->ProcessEvent(event); + } node = node->Next(); } diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 693fd0e078..dd06abcefd 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -23,6 +23,12 @@ #include "wx/app.h" #include "wx/listctrl.h" #include "wx/generic/imaglist.h" +#include "wx/dynarray.h" + +#ifdef __WXGTK__ +#include +#include "wx/gtk/win_gtk.h" +#endif #ifndef wxUSE_GENERIC_LIST_EXTENSIONS #define wxUSE_GENERIC_LIST_EXTENSIONS 1 @@ -107,7 +113,7 @@ public: int GetImage() const; int GetWidth() const; int GetFormat() const; - + private: DECLARE_DYNAMIC_CLASS(wxListHeaderData); }; @@ -157,7 +163,7 @@ public: bool IsHilighted(); void AssignRect( wxRect &dest, int x, int y, int width, int height ); void AssignRect( wxRect &dest, const wxRect &source ); - + private: void SetAttributes(wxDC *dc, const wxListItemAttr *attr, @@ -167,6 +173,11 @@ private: DECLARE_DYNAMIC_CLASS(wxListLineData); }; + +WX_DECLARE_EXPORTED_OBJARRAY(wxListLineData, wxListLineDataArray); +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxListLineDataArray); + //----------------------------------------------------------------------------- // wxListHeaderWindow (internal) //----------------------------------------------------------------------------- @@ -178,22 +189,40 @@ protected: wxCursor *m_currentCursor; wxCursor *m_resizeCursor; bool m_isDragging; - int m_column; - int m_minX; - int m_currentX; + + // column being resized + int m_column; + + // divider line position in logical (unscrolled) coords + int m_currentX; + + // minimal position beyond which the divider line can't be dragged in + // logical coords + int m_minX; public: wxListHeaderWindow(); - ~wxListHeaderWindow(); - wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = 0, const wxString &name = "wxlistctrlcolumntitles" ); + virtual ~wxListHeaderWindow(); + + wxListHeaderWindow( wxWindow *win, + wxWindowID id, + wxListMainWindow *owner, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = "wxlistctrlcolumntitles" ); + void DoDrawRect( wxDC *dc, int x, int y, int w, int h ); - void OnPaint( wxPaintEvent &event ); void DrawCurrent(); + void AdjustDC(wxDC& dc); + + void OnPaint( wxPaintEvent &event ); void OnMouse( wxMouseEvent &event ); void OnSetFocus( wxFocusEvent &event ); + // needs refresh + bool m_dirty; + private: DECLARE_DYNAMIC_CLASS(wxListHeaderWindow) DECLARE_EVENT_TABLE() @@ -250,7 +279,7 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow { public: long m_mode; - wxList m_lines; + wxListLineDataArray m_lines; wxList m_columns; wxListLineData *m_current; wxListLineData *m_currentEdit; @@ -286,7 +315,9 @@ public: void RefreshLine( wxListLineData *line ); void OnPaint( wxPaintEvent &event ); void HilightAll( bool on ); - void SendNotify( wxListLineData *line, wxEventType command ); + void SendNotify( wxListLineData *line, + wxEventType command, + wxPoint point = wxDefaultPosition ); void FocusLine( wxListLineData *line ); void UnfocusLine( wxListLineData *line ); void SelectLine( wxListLineData *line ); @@ -307,7 +338,7 @@ public: void OnKillFocus( wxFocusEvent &event ); void OnSize( wxSizeEvent &event ); void OnScroll(wxScrollWinEvent& event) ; - + void DrawImage( int index, wxDC *dc, int x, int y ); void GetImageSize( int index, int &width, int &height ); int GetIndexOfLine( const wxListLineData *line ); @@ -631,12 +662,12 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) if (lh < 15) lh = 15; lw += 4; lh += 3; - + m_bound_all.height = m_spacing+lh; if (lw > m_spacing) m_bound_all.width = lw; m_bound_label.width = lw; m_bound_label.height = lh; - + if (item->HasImage()) { int w = 0; @@ -644,8 +675,13 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) m_owner->GetImageSize( item->GetImage(), w, h ); m_bound_icon.width = w + 8; m_bound_icon.height = h + 8; + + if ( m_bound_icon.width > m_bound_all.width ) + m_bound_all.width = m_bound_icon.width; + if ( h + lh > m_bound_all.height - 4 ) + m_bound_all.height = h + lh + 4; } - + if (!item->HasText()) { m_bound_hilight.width = m_bound_icon.width; @@ -665,7 +701,7 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) if (node) { wxListItemData *item = (wxListItemData*)node->Data(); - + wxString s = item->GetText(); if (s.IsEmpty()) s = wxT("H"); wxCoord lw,lh; @@ -675,10 +711,10 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) lh += 3; m_bound_label.width = lw; m_bound_label.height = lh; - + m_bound_all.width = lw; m_bound_all.height = lh; - + if (item->HasImage()) { int w = 0; @@ -686,11 +722,11 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) m_owner->GetImageSize( item->GetImage(), w, h ); m_bound_icon.width = w; m_bound_icon.height = h; - + m_bound_all.width += 4 + w; if (h > m_bound_all.height) m_bound_all.height = h; } - + m_bound_hilight.width = m_bound_all.width; m_bound_hilight.height = m_bound_all.height; } @@ -701,6 +737,23 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) m_bound_all.width = 0; m_bound_all.height = 0; wxNode *node = m_items.First(); + if (node) + { + wxListItemData *item = (wxListItemData*)node->Data(); + if (item->HasImage()) + { + int w = 0; + int h = 0; + m_owner->GetImageSize( item->GetImage(), w, h ); + m_bound_icon.width = w; + m_bound_icon.height = h; + } + else + { + m_bound_icon.width = 0; + m_bound_icon.height = 0; + } + } while (node) { wxListItemData *item = (wxListItemData*)node->Data(); @@ -711,12 +764,14 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) if (lh < 15) lh = 15; lw += 4; lh += 3; - + item->SetSize( item->GetWidth(), lh ); m_bound_all.width += lw; m_bound_all.height = lh; node = node->Next(); } + m_bound_label.width = m_bound_all.width; + m_bound_label.height = m_bound_all.height; break; } } @@ -737,7 +792,8 @@ void wxListLineData::SetPosition( wxDC * WXUNUSED(dc), wxListItemData *item = (wxListItemData*)node->Data(); if (item->HasImage()) { - m_bound_icon.x = m_bound_all.x + 4 + (m_spacing/2) - (m_bound_icon.width/2); + m_bound_icon.x = m_bound_all.x + 4 + + (m_spacing - m_bound_icon.width)/2; m_bound_icon.y = m_bound_all.y + 4; } if (item->HasText()) @@ -1131,6 +1187,8 @@ wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMain m_currentCursor = (wxCursor *) NULL; m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE ); m_isDragging = FALSE; + m_dirty = FALSE; + SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ) ); } @@ -1162,64 +1220,76 @@ void wxListHeaderWindow::DoDrawRect( wxDC *dc, int x, int y, int w, int h ) dc->DrawLine( x+w-1, y, x+w-1, y+1 ); } +// shift the DC origin to match the position of the main window horz +// scrollbar: this allows us to always use logical coords +void wxListHeaderWindow::AdjustDC(wxDC& dc) +{ +#if wxUSE_GENERIC_LIST_EXTENSIONS + int xpix; + m_owner->GetScrollPixelsPerUnit( &xpix, NULL ); + + int x; + m_owner->GetViewStart( &x, NULL ); + + // account for the horz scrollbar offset + dc.SetDeviceOrigin( -x * xpix, 0 ); +#endif // wxUSE_GENERIC_LIST_EXTENSIONS +} + void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) { wxPaintDC dc( this ); PrepareDC( dc ); -#if wxUSE_GENERIC_LIST_EXTENSIONS - if ( m_owner->GetMode() & wxLC_REPORT ) - { - int x , y ; - int xpix , ypix ; + AdjustDC( dc ); - m_owner->GetScrollPixelsPerUnit( &xpix , &ypix ) ; - m_owner->ViewStart( &x, &y ) ; - dc.SetDeviceOrigin( -x * xpix, 0 ); - } -#endif dc.BeginDrawing(); dc.SetFont( GetFont() ); - int w = 0; - int h = 0; - int x = 0; - int y = 0; + // width and height of the entire header window + int w, h; GetClientSize( &w, &h ); +#if wxUSE_GENERIC_LIST_EXTENSIONS + m_owner->CalcUnscrolledPosition(w, 0, &w, NULL); +#endif // wxUSE_GENERIC_LIST_EXTENSIONS dc.SetBackgroundMode(wxTRANSPARENT); - dc.SetTextForeground( *wxBLACK ); // do *not* use the listctrl colour for headers - one day we will have a // function to set it separately + //dc.SetTextForeground( *wxBLACK ); + dc.SetTextForeground(wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOWTEXT )); - x = 1; - y = 1; + int x = 1; // left of the header rect + const int y = 1; // top int numColumns = m_owner->GetColumnCount(); wxListItem item; for (int i = 0; i < numColumns; i++) { m_owner->GetColumn( i, item ); - int cw = item.m_width-2; -#if wxUSE_GENERIC_LIST_EXTENSIONS - if ((i+1 == numColumns) || ( dc.LogicalToDeviceX(x+item.m_width) > w-5)) - cw = dc.DeviceToLogicalX(w)-x-1; -#else - if ((i+1 == numColumns) || (x+item.m_width > w-5)) + int wCol = item.m_width; + int cw = wCol - 2; // the width of the rect to draw + + int xEnd = x + wCol; + + // VZ: no, draw it normally - this is better now as we allow resizing + // of the last column as well +#if 0 + // let the last column occupy all available space + if ( i == numColumns - 1 ) cw = w-x-1; -#endif +#endif // 0 + dc.SetPen( *wxWHITE_PEN ); DoDrawRect( &dc, x, y, cw, h-2 ); dc.SetClippingRegion( x, y, cw-5, h-4 ); dc.DrawText( item.m_text, x+4, y+3 ); dc.DestroyClippingRegion(); - x += item.m_width; -#if wxUSE_GENERIC_LIST_EXTENSIONS - if (dc.LogicalToDeviceX(x) > w+5) break; -#else - if (x > w+5) break; -#endif + x += wCol; + + if (xEnd > w+5) + break; } dc.EndDrawing(); } @@ -1228,11 +1298,11 @@ void wxListHeaderWindow::DrawCurrent() { int x1 = m_currentX; int y1 = 0; + ClientToScreen( &x1, &y1 ); + int x2 = m_currentX-1; int y2 = 0; - int dummy; - m_owner->GetClientSize( &dummy, &y2 ); - ClientToScreen( &x1, &y1 ); + m_owner->GetClientSize( NULL, &y2 ); m_owner->ClientToScreen( &x2, &y2 ); wxScreenDC dc; @@ -1240,6 +1310,8 @@ void wxListHeaderWindow::DrawCurrent() dc.SetPen( wxPen( *wxBLACK, 2, wxSOLID ) ); dc.SetBrush( *wxTRANSPARENT_BRUSH ); + AdjustDC(dc); + dc.DrawLine( x1, y1, x2, y2 ); dc.SetLogicalFunction( wxCOPY ); @@ -1250,82 +1322,114 @@ void wxListHeaderWindow::DrawCurrent() void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) { - wxCoord x = (wxCoord)event.GetX(); - wxCoord y = (wxCoord)event.GetY(); + // we want to work with logical coords +#if wxUSE_GENERIC_LIST_EXTENSIONS + int x; + m_owner->CalcUnscrolledPosition(event.GetX(), 0, &x, NULL); +#else // !wxUSE_GENERIC_LIST_EXTENSIONS + int x = event.GetX(); +#endif // wxUSE_GENERIC_LIST_EXTENSIONS + int y = event.GetY(); + if (m_isDragging) { - DrawCurrent(); + // we don't draw the line beyond our window, but we allow dragging it + // there + int w = 0; + GetClientSize( &w, NULL ); +#if wxUSE_GENERIC_LIST_EXTENSIONS + m_owner->CalcUnscrolledPosition(w, 0, &w, NULL); +#endif // wxUSE_GENERIC_LIST_EXTENSIONS + w -= 6; + + // erase the line if it was drawn + if ( m_currentX < w ) + DrawCurrent(); + if (event.ButtonUp()) { ReleaseMouse(); m_isDragging = FALSE; - m_owner->SetColumnWidth( m_column, m_currentX-m_minX ); + m_dirty = TRUE; + m_owner->SetColumnWidth( m_column, m_currentX - m_minX ); } else { - int size_x = 0; - int dummy; - GetClientSize( &size_x, & dummy ); - if (x > m_minX+7) + if (x > m_minX + 7) m_currentX = x; else - m_currentX = m_minX+7; - if (m_currentX > size_x-7) m_currentX = size_x-7; - DrawCurrent(); - } - return; - } + m_currentX = m_minX + 7; - m_minX = 0; - bool hit_border = FALSE; - int xpos = 0; - for (int j = 0; j < m_owner->GetColumnCount(); j++) - { - xpos += m_owner->GetColumnWidth( j ); - m_column = j; - if ((abs(x-xpos) < 3) && (y < 22) && (m_column < m_owner->GetColumnCount()-1)) - { - hit_border = TRUE; - break; - } - if (x-xpos < 0) - { - break; - } - m_minX = xpos; - } - - if (event.LeftDown()) - { - if (hit_border) - { - m_isDragging = TRUE; - m_currentX = x; - DrawCurrent(); - CaptureMouse(); - return; - } - else - { - wxListEvent le( wxEVT_COMMAND_LIST_COL_CLICK, GetParent()->GetId() ); - le.SetEventObject( GetParent() ); - le.m_col = m_column; - GetParent()->GetEventHandler()->ProcessEvent( le ); - return; + // draw in the new location + if ( m_currentX < w ) + DrawCurrent(); } } - - if (event.Moving()) + else // not dragging { - if (hit_border) + m_minX = 0; + bool hit_border = FALSE; + + // end of the current column + int xpos = 0; + + // find the column where this event occured + int countCol = m_owner->GetColumnCount(); + for (int j = 0; j < countCol; j++) { - if (m_currentCursor == wxSTANDARD_CURSOR) SetCursor( * m_resizeCursor ); - m_currentCursor = m_resizeCursor; + xpos += m_owner->GetColumnWidth( j ); + m_column = j; + + if ( (abs(x-xpos) < 3) && (y < 22) ) + { + // near the column border + hit_border = TRUE; + break; + } + + if ( x < xpos ) + { + // inside the column + break; + } + + m_minX = xpos; } - else + + if (event.LeftDown()) { - if (m_currentCursor != wxSTANDARD_CURSOR) SetCursor( * wxSTANDARD_CURSOR ); - m_currentCursor = wxSTANDARD_CURSOR; + if (hit_border) + { + m_isDragging = TRUE; + m_currentX = x; + DrawCurrent(); + CaptureMouse(); + } + else + { + wxWindow *parent = GetParent(); + wxListEvent le( wxEVT_COMMAND_LIST_COL_CLICK, parent->GetId() ); + le.SetEventObject( parent ); + le.m_col = m_column; + parent->GetEventHandler()->ProcessEvent( le ); + } + } + else if (event.Moving()) + { + bool setCursor; + if (hit_border) + { + setCursor = m_currentCursor == wxSTANDARD_CURSOR; + m_currentCursor = m_resizeCursor; + } + else + { + setCursor = m_currentCursor != wxSTANDARD_CURSOR; + m_currentCursor = wxSTANDARD_CURSOR; + } + + if ( setCursor ) + SetCursor(*m_currentCursor); } } } @@ -1387,26 +1491,26 @@ void wxListTextCtrl::OnChar( wxKeyEvent &event ) { (*m_accept) = TRUE; (*m_res) = GetValue(); - + if (!wxPendingDelete.Member(this)) wxPendingDelete.Append(this); if ((*m_accept) && ((*m_res) != m_startValue)) m_owner->OnRenameAccept(); - + return; } if (event.m_keyCode == WXK_ESCAPE) { (*m_accept) = FALSE; (*m_res) = ""; - + if (!wxPendingDelete.Member(this)) wxPendingDelete.Append(this); - + return; } - + event.Skip(); } @@ -1439,7 +1543,6 @@ END_EVENT_TABLE() wxListMainWindow::wxListMainWindow() { m_mode = 0; - m_lines.DeleteContents( TRUE ); m_columns.DeleteContents( TRUE ); m_current = (wxListLineData *) NULL; m_visibleLines = 0; @@ -1468,7 +1571,6 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id, wxScrolledWindow( parent, id, pos, size, style|wxHSCROLL|wxVSCROLL, name ) { m_mode = style; - m_lines.DeleteContents( TRUE ); m_columns.DeleteContents( TRUE ); m_current = (wxListLineData *) NULL; m_dirty = TRUE; @@ -1522,7 +1624,7 @@ void wxListMainWindow::RefreshLine( wxListLineData *line ) if (m_dirty) return; if (!line) return; - + int x = 0; int y = 0; int w = 0; @@ -1551,32 +1653,24 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) if (m_mode & wxLC_REPORT) { int lineSpacing = 0; - wxListLineData *line = (wxListLineData*)m_lines.First()->Data(); + wxListLineData *line = &m_lines[0]; int dummy = 0; line->GetSize( dummy, lineSpacing ); lineSpacing += 1; int y_s = m_yScroll*GetScrollPos( wxVERTICAL ); - wxNode *node = m_lines.Nth( y_s / lineSpacing ); - for (int i = 0; i < m_visibleLines+2; i++) + size_t i_to = y_s / lineSpacing + m_visibleLines+2; + if (i_to >= m_lines.GetCount()) i_to = m_lines.GetCount(); + for (size_t i = y_s / lineSpacing; i < i_to; i++) { - if (!node) break; - - line = (wxListLineData*)node->Data(); - line->Draw( &dc ); - node = node->Next(); + m_lines[i].Draw( &dc ); } } else { - wxNode *node = m_lines.First(); - while (node) - { - wxListLineData *line = (wxListLineData*)node->Data(); - line->Draw( &dc ); - node = node->Next(); - } + for (size_t i = 0; i < m_lines.GetCount(); i++) + m_lines[i].Draw( &dc ); } if (m_current) m_current->DrawRubberBand( &dc, m_hasFocus ); @@ -1586,25 +1680,30 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) void wxListMainWindow::HilightAll( bool on ) { - wxNode *node = m_lines.First(); - while (node) + for (size_t i = 0; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData *)node->Data(); + wxListLineData *line = &m_lines[i]; if (line->IsHilighted() != on) { line->Hilight( on ); RefreshLine( line ); } - node = node->Next(); } } -void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command ) +void wxListMainWindow::SendNotify( wxListLineData *line, + wxEventType command, + wxPoint point ) { wxListEvent le( command, GetParent()->GetId() ); le.SetEventObject( GetParent() ); le.m_itemIndex = GetIndexOfLine( line ); line->GetItem( 0, le.m_item ); + + // set only for events which have position + if ( point != wxDefaultPosition ) + le.m_pointDrag = point; + GetParent()->GetEventHandler()->ProcessEvent( le ); // GetParent()->GetEventHandler()->AddPendingEvent( le ); } @@ -1638,10 +1737,10 @@ void wxListMainWindow::DeleteLine( wxListLineData *line ) void wxListMainWindow::EditLabel( long item ) { - wxNode *node = m_lines.Nth( (size_t)item ); - wxCHECK_RET( node, wxT("wrong index in wxListCtrl::Edit()") ); + wxCHECK_RET( ((size_t)item < m_lines.GetCount()), + wxT("wrong index in wxListCtrl::Edit()") ); - m_currentEdit = (wxListLineData*) node->Data(); + m_currentEdit = &m_lines[(size_t)item]; wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() ); le.SetEventObject( GetParent() ); @@ -1655,7 +1754,7 @@ void wxListMainWindow::EditLabel( long item ) // We have to call this here because the label in // question might just have been added and no screen // update taken place. - if (m_dirty) wxYield(); + if (m_dirty) wxYieldIfNeeded(); wxString s; m_currentEdit->GetText( 0, s ); @@ -1679,7 +1778,7 @@ void wxListMainWindow::OnRenameTimer() { wxCHECK_RET( m_current, wxT("invalid m_current") ); - Edit( m_lines.IndexOf( m_current ) ); + Edit( m_lines.Index( *m_current ) ); } void wxListMainWindow::OnRenameAccept() @@ -1703,6 +1802,7 @@ void wxListMainWindow::OnRenameAccept() void wxListMainWindow::OnMouse( wxMouseEvent &event ) { + event.SetEventObject( GetParent() ); if (GetParent()->GetEventHandler()->ProcessEvent( event)) return; if (!m_current) return; @@ -1715,15 +1815,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) /* Did we actually hit an item ? */ long hitResult = 0; - wxNode *node = m_lines.First(); wxListLineData *line = (wxListLineData *) NULL; - while (node) + for (size_t i = 0; i < m_lines.GetCount(); i++) { - line = (wxListLineData*)node->Data(); + line = &m_lines[i]; hitResult = line->IsHit( x, y ); if (hitResult) break; line = (wxListLineData *) NULL; - node = node->Next(); } if (event.Dragging()) @@ -1735,8 +1833,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) if (m_dragCount != 3) return; - int command = wxEVT_COMMAND_LIST_BEGIN_DRAG; - if (event.RightIsDown()) command = wxEVT_COMMAND_LIST_BEGIN_RDRAG; + int command = event.RightIsDown() ? wxEVT_COMMAND_LIST_BEGIN_RDRAG + : wxEVT_COMMAND_LIST_BEGIN_DRAG; wxListEvent le( command, GetParent()->GetId() ); le.SetEventObject( GetParent() ); @@ -1789,7 +1887,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) if (event.RightDown()) { - SendNotify( line, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK ); + SendNotify( line, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, + event.GetPosition() ); return; } @@ -1823,26 +1922,25 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) } else if (event.ShiftDown()) { + size_t j; + m_current = line; int numOfCurrent = -1; - node = m_lines.First(); - while (node) + for (j = 0; j < m_lines.GetCount(); j++) { - wxListLineData *test_line = (wxListLineData*)node->Data(); + wxListLineData *test_line = &m_lines[j]; numOfCurrent++; if (test_line == oldCurrent) break; - node = node->Next(); } int numOfLine = -1; - node = m_lines.First(); - while (node) + + for (j = 0; j < m_lines.GetCount(); j++) { - wxListLineData *test_line = (wxListLineData*)node->Data(); + wxListLineData *test_line = &m_lines[j]; numOfLine++; if (test_line == line) break; - node = node->Next(); } if (numOfLine < numOfCurrent) @@ -1852,13 +1950,11 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) numOfCurrent = i; } - wxNode *node = m_lines.Nth( numOfCurrent ); for (int i = 0; i <= numOfLine-numOfCurrent; i++) { - wxListLineData *test_line= (wxListLineData*)node->Data(); + wxListLineData *test_line= &m_lines[numOfCurrent + i]; test_line->Hilight(TRUE); RefreshLine( test_line ); - node = node->Next(); } } else @@ -1896,22 +1992,22 @@ void wxListMainWindow::MoveToFocus() int client_w = 0; int client_h = 0; GetClientSize( &client_w, &client_h ); - + int view_x = m_xScroll*GetScrollPos( wxHORIZONTAL ); int view_y = m_yScroll*GetScrollPos( wxVERTICAL ); if (m_mode & wxLC_REPORT) { - if (item_y-5 < view_y ) - Scroll( -1, (item_y-5)/m_yScroll ); - if (item_y+item_h+5 > view_y+client_h) + if (item_y < view_y ) + Scroll( -1, (item_y)/m_yScroll ); + if (item_y+item_h+5 > view_y+client_h) Scroll( -1, (item_y+item_h-client_h+15)/m_yScroll ); } else { - if (item_x-view_x < 5) + if (item_x-view_x < 5) Scroll( (item_x-5)/m_xScroll, -1 ); - if (item_x+item_w-5 > view_x+client_w) + if (item_x+item_w-5 > view_x+client_w) Scroll( (item_x+item_w-client_w+15)/m_xScroll, -1 ); } } @@ -1953,10 +2049,15 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) wxWindow *parent = GetParent(); /* we send a list_key event up */ - wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() ); - le.m_code = (int)event.KeyCode(); - le.SetEventObject( parent ); - parent->GetEventHandler()->ProcessEvent( le ); + if ( m_current ) + { + wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() ); + le.m_itemIndex = GetIndexOfLine( m_current ); + m_current->GetItem( 0, le.m_item ); + le.m_code = (int)event.KeyCode(); + le.SetEventObject( parent ); + parent->GetEventHandler()->ProcessEvent( le ); + } /* we propagate the char event up */ wxKeyEvent ke( wxEVT_CHAR ); @@ -1991,72 +2092,83 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) { case WXK_UP: { - wxNode *node = m_lines.Member( m_current )->Previous(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); + int index = m_lines.Index(*m_current); + if (index != wxNOT_FOUND && index > 0) + OnArrowChar( &m_lines[index-1], event.ShiftDown() ); break; } case WXK_DOWN: { - wxNode *node = m_lines.Member( m_current )->Next(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); + int index = m_lines.Index(*m_current); + if (index != wxNOT_FOUND && (size_t)index < m_lines.GetCount()-1) + OnArrowChar( &m_lines[index+1], event.ShiftDown() ); break; } case WXK_END: { - wxNode *node = m_lines.Last(); - OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); + if (!m_lines.IsEmpty()) + OnArrowChar( &m_lines.Last(), event.ShiftDown() ); break; } case WXK_HOME: { - wxNode *node = m_lines.First(); - OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); + if (!m_lines.IsEmpty()) + OnArrowChar( &m_lines[0], event.ShiftDown() ); break; } case WXK_PRIOR: { int steps = 0; + int index = m_lines.Index(*m_current); if (m_mode & wxLC_REPORT) { steps = m_visibleLines-1; } else { - int pos = 0; - wxNode *node = m_lines.First(); - for (;;) { if (m_current == (wxListLineData*)node->Data()) break; pos++; node = node->Next(); } - steps = pos % m_visibleLines; + steps = index % m_visibleLines; + } + if (index != wxNOT_FOUND) + { + index -= steps; + if (index < 0) index = 0; + OnArrowChar( &m_lines[index], event.ShiftDown() ); } - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i < steps; i++) if (node->Previous()) node = node->Previous(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); break; } case WXK_NEXT: { int steps = 0; + int index = m_lines.Index(*m_current); if (m_mode & wxLC_REPORT) { steps = m_visibleLines-1; } else { - int pos = 0; wxNode *node = m_lines.First(); - for (;;) { if (m_current == (wxListLineData*)node->Data()) break; pos++; node = node->Next(); } - steps = m_visibleLines-(pos % m_visibleLines)-1; + steps = m_visibleLines-(index % m_visibleLines)-1; + } + + if (index != wxNOT_FOUND) + { + index += steps; + if ((size_t)index >= m_lines.GetCount()) + index = m_lines.GetCount()-1; + OnArrowChar( &m_lines[index], event.ShiftDown() ); } - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i < steps; i++) if (node->Next()) node = node->Next(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); break; } case WXK_LEFT: { if (!(m_mode & wxLC_REPORT)) { - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i Previous()) node = node->Previous(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); + int index = m_lines.Index(*m_current); + if (index != wxNOT_FOUND) + { + index -= m_visibleLines; + if (index < 0) index = 0; + OnArrowChar( &m_lines[index], event.ShiftDown() ); + } } break; } @@ -2064,9 +2176,14 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) { if (!(m_mode & wxLC_REPORT)) { - wxNode *node = m_lines.Member( m_current ); - for (int i = 0; i Next()) node = node->Next(); - if (node) OnArrowChar( (wxListLineData*)node->Data(), event.ShiftDown() ); + int index = m_lines.Index(*m_current); + if (index != wxNOT_FOUND) + { + index += m_visibleLines; + if ((size_t)index >= m_lines.GetCount()) + index = m_lines.GetCount()-1; + OnArrowChar( &m_lines[index], event.ShiftDown() ); + } } break; } @@ -2093,8 +2210,9 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) { wxListLineData *oldCurrent = m_current; m_current->ReverseHilight(); - wxNode *node = m_lines.Member( m_current )->Next(); - if (node) m_current = (wxListLineData*)node->Data(); + int index = m_lines.Index( *m_current ) + 1; + if ( (size_t)index < m_lines.GetCount() ) + m_current = &m_lines[index]; RefreshLine( oldCurrent ); RefreshLine( m_current ); UnfocusLine( oldCurrent ); @@ -2216,22 +2334,34 @@ int wxListMainWindow::GetTextLength( wxString &s ) int wxListMainWindow::GetIndexOfLine( const wxListLineData *line ) { - int i = 0; - wxNode *node = m_lines.First(); - while (node) - { - if (line == (wxListLineData*)node->Data()) return i; - i++; - node = node->Next(); - } - return -1; + int i = m_lines.Index(*line); + if (i == wxNOT_FOUND) return -1; + else return i; } void wxListMainWindow::SetImageList( wxImageList *imageList, int which ) { m_dirty = TRUE; - if (which == wxIMAGE_LIST_NORMAL) m_normal_image_list = imageList; - if (which == wxIMAGE_LIST_SMALL) m_small_image_list = imageList; + + // calc the spacing from the icon size + int width = 0, + height = 0; + if ((imageList) && (imageList->GetImageCount()) ) + { + imageList->GetSize(0, width, height); + } + + if (which == wxIMAGE_LIST_NORMAL) + { + m_normal_image_list = imageList; + m_normal_spacing = width + 8; + } + + if (which == wxIMAGE_LIST_SMALL) + { + m_small_image_list = imageList; + m_small_spacing = width + 14; + } } void wxListMainWindow::SetItemSpacing( int spacing, bool isSmall ) @@ -2249,7 +2379,7 @@ void wxListMainWindow::SetItemSpacing( int spacing, bool isSmall ) int wxListMainWindow::GetItemSpacing( bool isSmall ) { - if (isSmall) return m_small_spacing; else return m_normal_spacing; + return isSmall ? m_small_spacing : m_normal_spacing; } void wxListMainWindow::SetColumn( int col, wxListItem &item ) @@ -2262,28 +2392,35 @@ void wxListMainWindow::SetColumn( int col, wxListItem &item ) wxListHeaderData *column = (wxListHeaderData*)node->Data(); column->SetItem( item ); } - wxListCtrl *lc = (wxListCtrl*) GetParent(); - if (lc->m_headerWin) lc->m_headerWin->Refresh(); + + wxListHeaderWindow *headerWin = ((wxListCtrl*) GetParent())->m_headerWin; + if ( headerWin ) + headerWin->m_dirty = TRUE; } void wxListMainWindow::SetColumnWidth( int col, int width ) { - if (!(m_mode & wxLC_REPORT)) return; + wxCHECK_RET( m_mode & wxLC_REPORT, + _T("SetColumnWidth() can only be called in report mode.") ); m_dirty = TRUE; wxNode *node = (wxNode*) NULL; - if (width == wxLIST_AUTOSIZE_USEHEADER) width = 80; - if (width == wxLIST_AUTOSIZE) + if (width == wxLIST_AUTOSIZE_USEHEADER) + { + // TODO do use the header + width = 80; + } + else if (width == wxLIST_AUTOSIZE) { wxClientDC dc(this); dc.SetFont( GetFont() ); int max = 10; - node = m_lines.First(); - while (node) + + for (size_t i = 0; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[i]; wxNode *n = line->m_items.Nth( col ); if (n) { @@ -2304,7 +2441,6 @@ void wxListMainWindow::SetColumnWidth( int col, int width ) } if (current > max) max = current; } - node = node->Next(); } width = max+10; } @@ -2316,21 +2452,20 @@ void wxListMainWindow::SetColumnWidth( int col, int width ) column->SetWidth( width ); } - node = m_lines.First(); - while (node) + for (size_t i = 0; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[i]; wxNode *n = line->m_items.Nth( col ); if (n) { wxListItemData *item = (wxListItemData*)n->Data(); item->SetSize( width, -1 ); } - node = node->Next(); } - wxListCtrl *lc = (wxListCtrl*) GetParent(); - if (lc->m_headerWin) lc->m_headerWin->Refresh(); + wxListHeaderWindow *headerWin = ((wxListCtrl*) GetParent())->m_headerWin; + if ( headerWin ) + headerWin->m_dirty = TRUE; } void wxListMainWindow::GetColumn( int col, wxListItem &item ) @@ -2378,10 +2513,9 @@ int wxListMainWindow::GetCountPerPage() void wxListMainWindow::SetItem( wxListItem &item ) { m_dirty = TRUE; - wxNode *node = m_lines.Nth( (size_t)item.m_itemId ); - if (node) + if (item.m_itemId >= 0 && (size_t)item.m_itemId < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[(size_t)item.m_itemId]; if (m_mode & wxLC_REPORT) item.m_width = GetColumnWidth( item.m_col )-3; line->SetItem( item.m_col, item ); } @@ -2395,13 +2529,13 @@ void wxListMainWindow::SetItemState( long item, long state, long stateMask ) if (stateMask & wxLIST_STATE_FOCUSED) { - wxNode *node = m_lines.Nth( (size_t)item ); - if (node) + if (item >= 0 && (size_t)item < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[(size_t)item]; UnfocusLine( m_current ); m_current = line; FocusLine( m_current ); + if ((m_mode & wxLC_SINGLE_SEL) && oldCurrent) oldCurrent->Hilight( FALSE ); RefreshLine( m_current ); if (oldCurrent) RefreshLine( oldCurrent ); } @@ -2412,10 +2546,9 @@ void wxListMainWindow::SetItemState( long item, long state, long stateMask ) bool on = (state & wxLIST_STATE_SELECTED) != 0; if (!on && (m_mode & wxLC_SINGLE_SEL)) return; - wxNode *node = m_lines.Nth( (size_t)item ); - if (node) + if (item >= 0 && (size_t)item < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[(size_t)item]; if (m_mode & wxLC_SINGLE_SEL) { UnfocusLine( m_current ); @@ -2440,20 +2573,18 @@ int wxListMainWindow::GetItemState( long item, long stateMask ) int ret = wxLIST_STATE_DONTCARE; if (stateMask & wxLIST_STATE_FOCUSED) { - wxNode *node = m_lines.Nth( (size_t)item ); - if (node) + if (item >= 0 && (size_t)item < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[(size_t)item]; if (line == m_current) ret |= wxLIST_STATE_FOCUSED; } } if (stateMask & wxLIST_STATE_SELECTED) { - wxNode *node = m_lines.Nth( (size_t)item ); - if (node) + if (item >= 0 && (size_t)item < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); - if (line->IsHilighted()) ret |= wxLIST_STATE_FOCUSED; + wxListLineData *line = &m_lines[(size_t)item]; + if (line->IsHilighted()) ret |= wxLIST_STATE_SELECTED; } } return ret; @@ -2461,10 +2592,9 @@ int wxListMainWindow::GetItemState( long item, long stateMask ) void wxListMainWindow::GetItem( wxListItem &item ) { - wxNode *node = m_lines.Nth( (size_t)item.m_itemId ); - if (node) + if (item.m_itemId >= 0 && (size_t)item.m_itemId < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[(size_t)item.m_itemId]; line->GetItem( item.m_col, item ); } else @@ -2478,16 +2608,15 @@ void wxListMainWindow::GetItem( wxListItem &item ) int wxListMainWindow::GetItemCount() { - return m_lines.Number(); + return m_lines.GetCount(); } void wxListMainWindow::GetItemRect( long index, wxRect &rect ) { - wxNode *node = m_lines.Nth( (size_t)index ); - if (node) + if (index >= 0 && (size_t)index < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); - line->GetRect( rect ); + m_lines[(size_t)index].GetRect( rect ); + this->CalcScrolledPosition(rect.x,rect.y,&rect.x,&rect.y); } else { @@ -2500,32 +2629,18 @@ void wxListMainWindow::GetItemRect( long index, wxRect &rect ) bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos) { - wxNode *node = m_lines.Nth( (size_t)item ); - if (node) - { - wxRect rect; - wxListLineData *line = (wxListLineData*)node->Data(); - line->GetRect( rect ); - pos.x = rect.x; - pos.y = rect.y; - } - else - { - pos.x = 0; - pos.y = 0; - } + wxRect rect; + this->GetItemRect(item,rect); + pos.x=rect.x; pos.y=rect.y; return TRUE; } int wxListMainWindow::GetSelectedItemCount() { int ret = 0; - wxNode *node = m_lines.First(); - while (node) + for (size_t i = 0; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData*)node->Data(); - if (line->IsHilighted()) ret++; - node = node->Next(); + if (m_lines[i].IsHilighted()) ret++; } return ret; } @@ -2560,7 +2675,7 @@ long wxListMainWindow::GetMode() const void wxListMainWindow::CalculatePositions() { - if (!m_lines.First()) return; + if (m_lines.IsEmpty()) return; wxClientDC dc( this ); dc.SetFont( GetFont() ); @@ -2577,7 +2692,7 @@ void wxListMainWindow::CalculatePositions() int lineHeight = 0; int lineSpacing = 0; - wxListLineData *line = (wxListLineData*)m_lines.First()->Data(); + wxListLineData *line = &m_lines[0]; line->CalculateSize( &dc, iconSpacing ); int dummy = 0; line->GetSize( dummy, lineSpacing ); @@ -2588,22 +2703,24 @@ void wxListMainWindow::CalculatePositions() if (m_mode & wxLC_REPORT) { + // scroll one line per step + m_yScroll = lineSpacing; + int x = 4; int y = 1; - int entireHeight = m_lines.Number() * lineSpacing + 2; + int entireHeight = m_lines.GetCount() * lineSpacing + 2; int scroll_pos = GetScrollPos( wxVERTICAL ); #if wxUSE_GENERIC_LIST_EXTENSIONS int x_scroll_pos = GetScrollPos( wxHORIZONTAL ); #else - SetScrollbars( m_xScroll, m_yScroll, 0, (entireHeight+15) / m_yScroll, 0, scroll_pos, TRUE ); + SetScrollbars( m_xScroll, m_yScroll, 0, entireHeight/m_yScroll + 1, 0, scroll_pos, TRUE ); #endif GetClientSize( &clientWidth, &clientHeight ); - wxNode* node = m_lines.First(); int entireWidth = 0 ; - while (node) + for (size_t j = 0; j < m_lines.GetCount(); j++) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[j]; line->CalculateSize( &dc, iconSpacing ); line->SetPosition( &dc, x, y, clientWidth ); int col_x = 2; @@ -2617,11 +2734,10 @@ void wxListMainWindow::CalculatePositions() line->SetPosition( &dc, x, y, col_x ); #endif y += lineSpacing; // one pixel blank line between items - node = node->Next(); } - m_visibleLines = clientHeight / lineSpacing; + m_visibleLines = clientHeight / lineSpacing; #if wxUSE_GENERIC_LIST_EXTENSIONS - SetScrollbars( m_xScroll, m_yScroll, entireWidth / m_xScroll , (entireHeight+15) / m_yScroll, x_scroll_pos , scroll_pos, TRUE ); + SetScrollbars( m_xScroll, m_yScroll, entireWidth/m_xScroll+1 , entireHeight/m_yScroll+1, x_scroll_pos , scroll_pos, TRUE ); #endif } else @@ -2643,11 +2759,10 @@ void wxListMainWindow::CalculatePositions() int maxWidth = 0; m_visibleLines = 0; int m_currentVisibleLines = 0; - wxNode *node = m_lines.First(); - while (node) + for (size_t i = 0; i < m_lines.GetCount(); i++) { m_currentVisibleLines++; - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[i]; line->CalculateSize( &dc, iconSpacing ); line->SetPosition( &dc, x, y, clientWidth ); line->GetSize( lineWidth, lineHeight ); @@ -2663,8 +2778,7 @@ void wxListMainWindow::CalculatePositions() entireWidth += maxWidth+6; maxWidth = 0; } - node = node->Next(); - if (!node) entireWidth += maxWidth; + if (i == m_lines.GetCount()-1) entireWidth += maxWidth; if ((tries == 0) && (entireWidth > clientWidth)) { clientHeight -= 15; // scrollbar height @@ -2672,7 +2786,7 @@ void wxListMainWindow::CalculatePositions() m_currentVisibleLines = 0; break; } - if (!node) tries = 1; // everything fits, no second try required + if (i == m_lines.GetCount()-1) tries = 1; // everything fits, no second try required } } @@ -2681,17 +2795,19 @@ void wxListMainWindow::CalculatePositions() } } -void wxListMainWindow::RealizeChanges( void ) +void wxListMainWindow::RealizeChanges() { if (!m_current) { - wxNode *node = m_lines.First(); - if (node) m_current = (wxListLineData*)node->Data(); + if (!m_lines.IsEmpty()) + m_current = &m_lines[0]; } if (m_current) { FocusLine( m_current ); - if (m_mode & wxLC_SINGLE_SEL) m_current->Hilight( TRUE ); + // TODO: MSW doesn't automatically hilight the + // first item. + // if (m_mode & wxLC_SINGLE_SEL) m_current->Hilight( TRUE ); } } @@ -2715,10 +2831,9 @@ long wxListMainWindow::GetNextItem( long item, return -1; } - wxNode *node = m_lines.Nth( (size_t)ret ); - while (node) + for (size_t i = (size_t)ret; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[i]; if ((state & wxLIST_STATE_FOCUSED) && (line == m_current)) return ret; if ((state & wxLIST_STATE_SELECTED) && (line->IsHilighted())) @@ -2726,8 +2841,6 @@ long wxListMainWindow::GetNextItem( long item, if (!state) return ret; ret++; - - node = node->Next(); } return -1; @@ -2736,13 +2849,12 @@ long wxListMainWindow::GetNextItem( long item, void wxListMainWindow::DeleteItem( long index ) { m_dirty = TRUE; - wxNode *node = m_lines.Nth( (size_t)index ); - if (node) + if (index >= 0 && (size_t)index < m_lines.GetCount()) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[(size_t)index]; if (m_current == line) m_current = (wxListLineData *) NULL; DeleteLine( line ); - m_lines.DeleteNode( node ); + m_lines.RemoveAt( (size_t)index ); } } @@ -2775,7 +2887,7 @@ void wxListMainWindow::DeleteAllItems() void wxListMainWindow::DeleteEverything() { DeleteAllItems(); - + m_columns.Clear(); } @@ -2784,12 +2896,12 @@ void wxListMainWindow::EnsureVisible( long index ) // We have to call this here because the label in // question might just have been added and no screen // update taken place. - if (m_dirty) wxYield(); + if (m_dirty) wxYieldIfNeeded(); wxListLineData *oldCurrent = m_current; m_current = (wxListLineData *) NULL; - wxNode *node = m_lines.Nth( (size_t)index ); - if (node) m_current = (wxListLineData*)node->Data(); + if (index >= 0 && (size_t)index < m_lines.GetCount()) + m_current = &m_lines[(size_t)index]; if (m_current) MoveToFocus(); m_current = oldCurrent; } @@ -2799,14 +2911,12 @@ long wxListMainWindow::FindItem(long start, const wxString& str, bool WXUNUSED(p long pos = start; wxString tmp = str; if (pos < 0) pos = 0; - wxNode *node = m_lines.Nth( (size_t)pos ); - while (node) + for (size_t i = (size_t)pos; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[i]; wxString s = ""; line->GetText( 0, s ); if (s == tmp) return pos; - node = node->Next(); pos++; } return -1; @@ -2816,14 +2926,12 @@ long wxListMainWindow::FindItem(long start, long data) { long pos = start; if (pos < 0) pos = 0; - wxNode *node = m_lines.Nth( (size_t)pos ); - while (node) + for (size_t i = (size_t)pos; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[i]; wxListItem item; line->GetItem( 0, item ); if (item.m_data == data) return pos; - node = node->Next(); pos++; } return -1; @@ -2833,18 +2941,16 @@ long wxListMainWindow::HitTest( int x, int y, int &flags ) { CalcUnscrolledPosition( x, y, &x, &y ); - wxNode *node = m_lines.First(); int count = 0; - while (node) + for (size_t i = 0; i < m_lines.GetCount(); i++) { - wxListLineData *line = (wxListLineData*)node->Data(); + wxListLineData *line = &m_lines[i]; long ret = line->IsHit( x, y ); - if (ret & flags) + if (ret) // & flags) // No: flags is output-only so may be garbage at this point { flags = (int)ret; return count; } - node = node->Next(); count++; } return -1; @@ -2872,14 +2978,14 @@ void wxListMainWindow::InsertItem( wxListItem &item ) } line->SetItem( 0, item ); - if ((item.m_itemId >= 0) && (item.m_itemId < (int)m_lines.GetCount())) + if ((item.m_itemId >= 0) && ((size_t)item.m_itemId < m_lines.GetCount())) { - wxNode *node = m_lines.Nth( (size_t)item.m_itemId ); - if (node) m_lines.Insert( node, line ); + m_lines.Insert( line, (size_t)item.m_itemId ); } else { - m_lines.Append( line ); + m_lines.Add( line ); + item.m_itemId = m_lines.GetCount()-1; } } @@ -2906,10 +3012,10 @@ void wxListMainWindow::InsertColumn( long col, wxListItem &item ) wxListCtrlCompare list_ctrl_compare_func_2; long list_ctrl_compare_data; -int LINKAGEMODE list_ctrl_compare_func_1( const void *arg1, const void *arg2 ) +int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData **arg2 ) { - wxListLineData *line1 = *((wxListLineData**)arg1); - wxListLineData *line2 = *((wxListLineData**)arg2); + wxListLineData *line1 = *arg1; + wxListLineData *line2 = *arg2; wxListItem item; line1->GetItem( 0, item ); long data1 = item.m_data; @@ -3078,10 +3184,10 @@ bool wxListCtrl::Create(wxWindow *parent, { style = style | wxLC_LIST; } - + bool ret = wxControl::Create( parent, id, pos, size, style, validator, name ); - - + + if (style & wxSUNKEN_BORDER) style -= wxSUNKEN_BORDER; @@ -3098,8 +3204,6 @@ bool wxListCtrl::Create(wxWindow *parent, m_headerWin = (wxListHeaderWindow *) NULL; } - SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_LISTBOX ) ); - return ret; } @@ -3558,24 +3662,22 @@ void wxListCtrl::OnIdle( wxIdleEvent &WXUNUSED(event) ) m_mainWin->RealizeChanges(); m_mainWin->m_dirty = FALSE; m_mainWin->Refresh(); + + if ( m_headerWin && m_headerWin->m_dirty ) + { + m_headerWin->m_dirty = FALSE; + m_headerWin->Refresh(); + } } bool wxListCtrl::SetBackgroundColour( const wxColour &colour ) { - if ( !wxWindow::SetBackgroundColour( colour ) ) - return FALSE; - if (m_mainWin) { m_mainWin->SetBackgroundColour( colour ); m_mainWin->m_dirty = TRUE; } - if (m_headerWin) - { -// m_headerWin->SetBackgroundColour( colour ); - } - return TRUE; } diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 240ed7169b..0ff22a9536 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -33,6 +33,7 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/button.h" #include "wx/intl.h" #include "wx/log.h" #include "wx/menu.h" @@ -42,10 +43,12 @@ #include "wx/textctrl.h" #include "wx/sizer.h" #include "wx/statbmp.h" + #include "wx/button.h" #endif // WX_PRECOMP #include "wx/file.h" #include "wx/textfile.h" +#include "wx/statline.h" #ifdef __WXMSW__ // for OutputDebugString() @@ -85,9 +88,15 @@ public: // event handlers void OnOk(wxCommandEvent& event); void OnDetails(wxCommandEvent& event); +#if wxUSE_FILE + void OnSave(wxCommandEvent& event); +#endif // wxUSE_FILE void OnListSelect(wxListEvent& event); private: + // create controls needed for the details display + void CreateDetailsControls(); + // the data for the listctrl wxArrayString m_messages; wxArrayInt m_severity; @@ -97,8 +106,15 @@ private: wxButton *m_btnDetails; bool m_showingDetails; - // the listctrl (not shown initially) + // the controls which are not shown initially (but only when details + // button is pressed) wxListCtrl *m_listctrl; +#if wxUSE_STATLINE + wxStaticLine *m_statline; +#endif // wxUSE_STATLINE +#if wxUSE_FILE + wxButton *m_btnSave; +#endif // wxUSE_FILE // the translated "Details" string static wxString ms_details; @@ -107,13 +123,30 @@ private: }; BEGIN_EVENT_TABLE(wxLogDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxLogDialog::OnOk) + EVT_BUTTON(wxID_CANCEL, wxLogDialog::OnOk) EVT_BUTTON(wxID_MORE, wxLogDialog::OnDetails) +#if wxUSE_FILE + EVT_BUTTON(wxID_SAVE, wxLogDialog::OnSave) +#endif // wxUSE_FILE EVT_LIST_ITEM_SELECTED(-1, wxLogDialog::OnListSelect) END_EVENT_TABLE() #endif // wxUSE_LOG_DIALOG +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +#if wxUSE_FILE + +// pass an uninitialized file object, the function will ask the user for the +// filename and try to open it, returns TRUE on success (file was opened), +// FALSE if file couldn't be opened/created and -1 if the file selection +// dialog was cancelled +static int OpenLogFile(wxFile& file, wxString *filename = NULL); + +#endif // wxUSE_FILE + // ---------------------------------------------------------------------------- // global variables // ---------------------------------------------------------------------------- @@ -174,13 +207,6 @@ void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) wxLogGui::wxLogGui() { - // we must translate them here in the very beginning or we risk to have - // reentrancy problems when called from inside wxGetTranslation() leading - // to inifnite recursion - m_error = _("Error"); - m_warning = _("Warning"); - m_info = _("Information"); - Clear(); } @@ -203,26 +229,31 @@ void wxLogGui::Flush() // do it right now to block any new calls to Flush() while we're here m_bHasMessages = FALSE; - wxString title = wxTheApp->GetAppName(); - if ( !!title ) - { - title[0u] = wxToupper(title[0u]); - title += _T(' '); - } + wxString appName = wxTheApp->GetAppName(); + +#if 0 + // This skrews up names likes "wxDesigner" + if ( !!appName ) + appName[0u] = wxToupper(appName[0u]); +#endif long style; + wxString titleFormat; if ( m_bErrors ) { - title += m_error; + titleFormat = _("%s Error"); style = wxICON_STOP; } else if ( m_bWarnings ) { - title += m_warning; + titleFormat = _("%s Warning"); style = wxICON_EXCLAMATION; } else { - title += m_info; + titleFormat = _("%s Information"); style = wxICON_INFORMATION; } + + wxString title; + title.Printf(titleFormat, appName.c_str()); // this is the best we can do here wxWindow *parent = wxTheApp->GetTopWindow(); @@ -404,8 +435,8 @@ private: Menu_Clear = wxID_CLEAR }; - // instead of closing just hide the window to be able to Show() it later - void DoClose() { Show(FALSE); } + // common part of OnClose() and OnCloseWindow() + void DoClose(); wxTextCtrl *m_pTextCtrl; wxLogWindow *m_log; @@ -455,6 +486,16 @@ wxLogFrame::wxLogFrame(wxFrame *pParent, wxLogWindow *log, const wxChar *szTitle m_log->OnFrameCreate(this); } +void wxLogFrame::DoClose() +{ + if ( m_log->OnFrameClose(this) ) + { + // instead of closing just hide the window to be able to Show() it + // later + Show(FALSE); + } +} + void wxLogFrame::OnClose(wxCommandEvent& WXUNUSED(event)) { DoClose(); @@ -468,62 +509,23 @@ void wxLogFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) #if wxUSE_FILE void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) { - // get the file name - // ----------------- - const wxChar *szFileName = wxSaveFileSelector(wxT("log"), wxT("txt"), wxT("log.txt")); - if ( szFileName == NULL ) { + wxString filename; + wxFile file; + int rc = OpenLogFile(file, &filename); + if ( rc == -1 ) + { // cancelled return; } - // open file - // --------- - wxFile file; - bool bOk = FALSE; - if ( wxFile::Exists(szFileName) ) { - bool bAppend = FALSE; - wxString strMsg; - strMsg.Printf(_("Append log to file '%s' " - "(choosing [No] will overwrite it)?"), szFileName); - switch ( wxMessageBox(strMsg, _("Question"), wxYES_NO | wxCANCEL) ) { - case wxYES: - bAppend = TRUE; - break; - - case wxNO: - bAppend = FALSE; - break; - - case wxCANCEL: - return; - - default: - wxFAIL_MSG(_("invalid message box return value")); - } - - if ( bAppend ) { - bOk = file.Open(szFileName, wxFile::write_append); - } - else { - bOk = file.Create(szFileName, TRUE /* overwrite */); - } - } - else { - bOk = file.Create(szFileName); - } + bool bOk = rc != 0; // retrieve text and save it // ------------------------- int nLines = m_pTextCtrl->GetNumberOfLines(); for ( int nLine = 0; bOk && nLine < nLines; nLine++ ) { bOk = file.Write(m_pTextCtrl->GetLineText(nLine) + - // we're not going to pull in the whole wxTextFile if all we need is this... -#if wxUSE_TEXTFILE - wxTextFile::GetEOL() -#else // !wxUSE_TEXTFILE - '\n' -#endif // wxUSE_TEXTFILE - ); + wxTextFile::GetEOL()); } if ( bOk ) @@ -533,7 +535,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) wxLogError(_("Can't save log contents to file.")); } else { - wxLogStatus(this, _("Log saved to the file '%s'."), szFileName); + wxLogStatus(this, _("Log saved to the file '%s'."), filename.c_str()); } } #endif // wxUSE_FILE @@ -643,6 +645,12 @@ void wxLogWindow::OnFrameCreate(wxFrame * WXUNUSED(frame)) { } +bool wxLogWindow::OnFrameClose(wxFrame * WXUNUSED(frame)) +{ + // allow to close + return TRUE; +} + void wxLogWindow::OnFrameDelete(wxFrame * WXUNUSED(frame)) { m_pLogFrame = (wxLogFrame *)NULL; @@ -672,12 +680,13 @@ wxLogDialog::wxLogDialog(wxWindow *parent, const wxArrayLong& times, const wxString& caption, long style) - : wxDialog(parent, -1, caption ) + : wxDialog(parent, -1, caption) { if ( ms_details.IsEmpty() ) { - // ensure that we won't try to call wxGetTranslation() twice - ms_details = _T("&Details"); + // ensure that we won't loop here if wxGetTranslation() + // happens to pop up a Log message while translating this :-) + ms_details = wxTRANSLATE("&Details"); ms_details = wxGetTranslation(ms_details); } @@ -703,6 +712,14 @@ wxLogDialog::wxLogDialog(wxWindow *parent, m_showingDetails = FALSE; // not initially m_listctrl = (wxListCtrl *)NULL; +#if wxUSE_STATLINE + m_statline = (wxStaticLine *)NULL; +#endif // wxUSE_STATLINE + +#if wxUSE_FILE + m_btnSave = (wxButton *)NULL; +#endif // wxUSE_FILE + // create the controls which are always shown and layout them: we use // sizers even though our window is not resizeable to calculate the size of // the dialog properly @@ -710,15 +727,18 @@ wxLogDialog::wxLogDialog(wxWindow *parent, wxBoxSizer *sizerButtons = new wxBoxSizer(wxVERTICAL); wxBoxSizer *sizerAll = new wxBoxSizer(wxHORIZONTAL); - wxButton *btnOk = new wxButton(this, wxID_OK, _("OK")); - sizerButtons->Add(btnOk, 0, wxCENTRE|wxBOTTOM, MARGIN/2); + // this "Ok" button has wxID_CANCEL id - not very logical, but this allows + // to close the log dialog with which wouldn't work otherwise (as it + // translates into click on cancel button) + wxButton *btnOk = new wxButton(this, wxID_CANCEL, _("OK")); + sizerButtons->Add(btnOk, 0, wxGROW|wxBOTTOM, MARGIN/2); m_btnDetails = new wxButton(this, wxID_MORE, ms_details + _T(" >>")); - sizerButtons->Add(m_btnDetails, 0, wxCENTRE|wxTOP, MARGIN/2 - 1); + sizerButtons->Add(m_btnDetails, 0, wxGROW|wxTOP, MARGIN/2 - 1); #ifndef __WIN16__ wxIcon icon = wxTheApp->GetStdIcon((int)(style & wxICON_MASK)); sizerAll->Add(new wxStaticBitmap(this, -1, icon), 0, wxCENTRE); -#endif +#endif // !Win16 const wxString& message = messages.Last(); sizerAll->Add(CreateTextSizer(message), 0, wxCENTRE|wxLEFT|wxRIGHT, MARGIN); @@ -747,6 +767,118 @@ wxLogDialog::wxLogDialog(wxWindow *parent, Centre(); } +void wxLogDialog::CreateDetailsControls() +{ + // create the save button and separator line if possible +#if wxUSE_FILE + m_btnSave = new wxButton(this, wxID_SAVE, _("&Save...")); +#endif // wxUSE_FILE + +#if wxUSE_STATLINE + m_statline = new wxStaticLine(this, -1); +#endif // wxUSE_STATLINE + + // create the list ctrl now + m_listctrl = new wxListCtrl(this, -1, + wxDefaultPosition, wxDefaultSize, + wxSUNKEN_BORDER | + wxLC_REPORT | + wxLC_NO_HEADER | + wxLC_SINGLE_SEL); + + // no need to translate these strings as they're not shown to the + // user anyhow (we use wxLC_NO_HEADER style) + m_listctrl->InsertColumn(0, _T("Message")); + m_listctrl->InsertColumn(1, _T("Time")); + + // prepare the imagelist + static const int ICON_SIZE = 16; + wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE); + + // order should be the same as in the switch below! + static const int icons[] = + { + wxICON_ERROR, + wxICON_EXCLAMATION, + wxICON_INFORMATION + }; + + bool loadedIcons = TRUE; + +#ifndef __WIN16__ + for ( size_t icon = 0; icon < WXSIZEOF(icons); icon++ ) + { + wxBitmap bmp = wxTheApp->GetStdIcon(icons[icon]); + + // This may very well fail if there are insufficient + // colours available. Degrade gracefully. + + if (!bmp.Ok()) + loadedIcons = FALSE; + else + imageList->Add(wxImage(bmp). + Rescale(ICON_SIZE, ICON_SIZE). + ConvertToBitmap()); + } + + m_listctrl->SetImageList(imageList, wxIMAGE_LIST_SMALL); +#endif // !Win16 + + // and fill it + wxString fmt = wxLog::GetTimestamp(); + if ( !fmt ) + { + // default format + fmt = _T("%c"); + } + + size_t count = m_messages.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + int image = -1; +#ifndef __WIN16__ + switch ( m_severity[n] ) + { + case wxLOG_Error: + image = 0; + break; + + case wxLOG_Warning: + image = 1; + break; + + default: + image = 2; + } +#endif // !Win16 + + if (!loadedIcons) + image = -1; + + if (image > -1) + m_listctrl->InsertItem(n, m_messages[n], image); + else + m_listctrl->InsertItem(n, m_messages[n]); + + m_listctrl->SetItem(n, 1, + wxDateTime((time_t)m_times[n]).Format(fmt)); + } + + // let the columns size themselves + m_listctrl->SetColumnWidth(0, wxLIST_AUTOSIZE); + m_listctrl->SetColumnWidth(1, wxLIST_AUTOSIZE); + + // get the approx height of the listctrl + wxFont font = GetFont(); + if ( !font.Ok() ) + font = *wxSWISS_FONT; + + int y; + GetTextExtent(_T("H"), (int*)NULL, &y, (int*)NULL, (int*)NULL, &font); + int height = wxMax(y*(count + 3), 100); + m_listctrl->SetSize(-1, height); +} + void wxLogDialog::OnListSelect(wxListEvent& event) { // we can't just disable the control because this looks ugly under Windows @@ -760,6 +892,48 @@ void wxLogDialog::OnOk(wxCommandEvent& WXUNUSED(event)) EndModal(wxID_OK); } +#if wxUSE_FILE + +void wxLogDialog::OnSave(wxCommandEvent& WXUNUSED(event)) +{ + wxFile file; + int rc = OpenLogFile(file); + if ( rc == -1 ) + { + // cancelled + return; + } + + bool ok = rc != 0; + + wxString fmt = wxLog::GetTimestamp(); + if ( !fmt ) + { + // default format + fmt = _T("%c"); + } + + size_t count = m_messages.GetCount(); + for ( size_t n = 0; ok && (n < count); n++ ) + { + wxString line; + line << wxDateTime((time_t)m_times[n]).Format(fmt) + << _T(": ") + << m_messages[n] + << wxTextFile::GetEOL(); + + ok = file.Write(line); + } + + if ( ok ) + ok = file.Close(); + + if ( !ok ) + wxLogError(_("Can't save log contents to file.")); +} + +#endif // wxUSE_FILE + void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event)) { wxSizer *sizer = GetSizer(); @@ -769,6 +943,14 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event)) m_btnDetails->SetLabel(ms_details + _T(">>")); sizer->Remove(m_listctrl); + +#if wxUSE_STATLINE + sizer->Remove(m_statline); +#endif // wxUSE_STATLINE + +#if wxUSE_FILE + sizer->Remove(m_btnSave); +#endif // wxUSE_FILE } else // show details now { @@ -776,91 +958,18 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event)) if ( !m_listctrl ) { - // create it now - m_listctrl = new wxListCtrl(this, -1, - wxDefaultPosition, wxDefaultSize, - wxSUNKEN_BORDER | - wxLC_REPORT | - wxLC_NO_HEADER | - wxLC_SINGLE_SEL); - // no need to translate these strings as they're not shown to the - // user anyhow (we use wxLC_NO_HEADER style) - m_listctrl->InsertColumn(0, _T("Message")); - m_listctrl->InsertColumn(1, _T("Time")); - - // prepare the imagelist - static const int ICON_SIZE = 16; - wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE); - - // order should be the same as in the switch below! - static const int icons[] = - { - wxICON_ERROR, - wxICON_EXCLAMATION, - wxICON_INFORMATION - }; - -#ifndef __WIN16__ - for ( size_t icon = 0; icon < WXSIZEOF(icons); icon++ ) - { - wxBitmap bmp = wxTheApp->GetStdIcon(icons[icon]); - imageList->Add(wxImage(bmp). - Rescale(ICON_SIZE, ICON_SIZE). - ConvertToBitmap()); - } - - m_listctrl->SetImageList(imageList, wxIMAGE_LIST_SMALL); -#endif - - // and fill it - wxString fmt = wxLog::GetTimestamp(); - if ( !fmt ) - { - // default format - fmt = _T("%X"); - } - - size_t count = m_messages.GetCount(); - for ( size_t n = 0; n < count; n++ ) - { - int image = -1; -#ifndef __WIN16__ - switch ( m_severity[n] ) - { - case wxLOG_Error: - image = 0; - break; - - case wxLOG_Warning: - image = 1; - break; - - default: - image = 2; - } -#endif - - m_listctrl->InsertItem(n, m_messages[n], image); - m_listctrl->SetItem(n, 1, - wxDateTime((time_t)m_times[n]).Format(fmt)); - } - - // let the columns size themselves - m_listctrl->SetColumnWidth(0, wxLIST_AUTOSIZE); - m_listctrl->SetColumnWidth(1, wxLIST_AUTOSIZE); - - // get the approx height of the listctrl - wxFont font = GetFont(); - if ( !font.Ok() ) - font = *wxSWISS_FONT; - - int y; - GetTextExtent(_T("H"), (int*)NULL, &y, (int*)NULL, (int*)NULL, &font); - int height = wxMin(y*(count + 3), 100); - m_listctrl->SetSize(-1, height); + CreateDetailsControls(); } - sizer->Add(m_listctrl, 1, wxEXPAND|(wxALL & ~wxTOP), MARGIN); +#if wxUSE_STATLINE + sizer->Add(m_statline, 0, wxEXPAND | (wxALL & ~wxTOP), MARGIN); +#endif // wxUSE_STATLINE + + sizer->Add(m_listctrl, 1, wxEXPAND | (wxALL & ~wxTOP), MARGIN); + +#if wxUSE_FILE + sizer->Add(m_btnSave, 0, wxALIGN_RIGHT | (wxALL & ~wxTOP), MARGIN); +#endif // wxUSE_FILE } m_showingDetails = !m_showingDetails; @@ -868,6 +977,13 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event)) // in any case, our size changed - update sizer->SetSizeHints(this); sizer->Fit(this); + +#ifdef __WXGTK__ + // VS: this is neccessary in order to force frame redraw under + // WindowMaker or fvwm2 (and probably other broken WMs). + // Otherwise, detailed list wouldn't be displayed. + Show(TRUE); +#endif // wxGTK } wxLogDialog::~wxLogDialog() @@ -879,3 +995,64 @@ wxLogDialog::~wxLogDialog() } #endif // wxUSE_LOG_DIALOG + +#if wxUSE_FILE + +// pass an uninitialized file object, the function will ask the user for the +// filename and try to open it, returns TRUE on success (file was opened), +// FALSE if file couldn't be opened/created and -1 if the file selection +// dialog was cancelled +static int OpenLogFile(wxFile& file, wxString *pFilename) +{ + // get the file name + // ----------------- + wxString filename = wxSaveFileSelector(wxT("log"), wxT("txt"), wxT("log.txt")); + if ( !filename ) { + // cancelled + return -1; + } + + // open file + // --------- + bool bOk = FALSE; + if ( wxFile::Exists(filename) ) { + bool bAppend = FALSE; + wxString strMsg; + strMsg.Printf(_("Append log to file '%s' (choosing [No] will overwrite it)?"), + filename.c_str()); + switch ( wxMessageBox(strMsg, _("Question"), + wxICON_QUESTION | wxYES_NO | wxCANCEL) ) { + case wxYES: + bAppend = TRUE; + break; + + case wxNO: + bAppend = FALSE; + break; + + case wxCANCEL: + return -1; + + default: + wxFAIL_MSG(_("invalid message box return value")); + } + + if ( bAppend ) { + bOk = file.Open(filename, wxFile::write_append); + } + else { + bOk = file.Create(filename, TRUE /* overwrite */); + } + } + else { + bOk = file.Create(filename); + } + + if ( pFilename ) + *pFilename = filename; + + return bOk; +} + +#endif // wxUSE_FILE + diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index ec65ed52bf..f5abedfa17 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -63,8 +63,6 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, { m_dialogStyle = style; - wxBeginBusyCursor(); - wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL ); @@ -103,8 +101,6 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, } Centre( wxBOTH | wxCENTER_FRAME); - - wxEndBusyCursor(); } void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event)) diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index 926f404c0e..97019ea950 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -592,12 +592,12 @@ void wxNotebook::ChangePage(int nOldSel, int nSel) wxRect clientRect = GetAvailableClientSize(); pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height); + Refresh(); + pPage->Show(TRUE); pPage->Raise(); pPage->SetFocus(); - Refresh(); - m_nSelection = nSel; } diff --git a/src/generic/numdlgg.cpp b/src/generic/numdlgg.cpp index d40d36daad..95876e5d64 100644 --- a/src/generic/numdlgg.cpp +++ b/src/generic/numdlgg.cpp @@ -18,7 +18,6 @@ // ---------------------------------------------------------------------------- #ifdef __GNUG__ - #pragma interface "numdlgg.cpp" #pragma implementation "numdlgg.cpp" #endif @@ -45,7 +44,9 @@ #include "wx/statline.h" #endif +#if !defined(__WIN16__) && wxUSE_SPINCTRL #include "wx/spinctrl.h" +#endif // this is where wxGetNumberFromUser() is declared #include "wx/textdlg.h" @@ -129,7 +130,7 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, wxString valStr; valStr.Printf(wxT("%lu"), m_value); m_spinctrl = new wxSpinCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) ); -#ifndef __WIN16__ +#if !defined(__WIN16__) && wxUSE_SPINCTRL m_spinctrl->SetRange((int)m_min, (int)m_max); #endif inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 ); diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp index 9e8363baa9..3052aabd7b 100644 --- a/src/generic/panelg.cpp +++ b/src/generic/panelg.cpp @@ -36,6 +36,9 @@ #include "wx/log.h" #endif +#include "wx/toolbar.h" +#include "wx/statusbr.h" + #include "wx/generic/panelg.h" // ---------------------------------------------------------------------------- @@ -71,15 +74,7 @@ bool wxPanel::Create(wxWindow *parent, wxWindowID id, long style, const wxString& name) { - bool ret = wxWindow::Create(parent, id, pos, size, style, name); - - if ( ret ) - { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); - SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); - } - - return ret; + return wxWindow::Create(parent, id, pos, size, style, name); } // ---------------------------------------------------------------------------- @@ -340,39 +335,60 @@ void wxPanel::OnFocus(wxFocusEvent& event) bool wxPanel::SetFocusToChild() { - if ( m_winLastFocused ) + return wxSetFocusToChild(this, &m_winLastFocused); +} + +// ---------------------------------------------------------------------------- +// SetFocusToChild(): this function is used by wxPanel but also by wxFrame in +// wxMSW, this is why it is outside of wxPanel class +// ---------------------------------------------------------------------------- + +bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused) +{ + wxCHECK_MSG( win, FALSE, _T("wxSetFocusToChild(): invalid window") ); + + if ( *childLastFocused ) { // It might happen that the window got reparented or no longer accepts // the focus. - if ( (m_winLastFocused->GetParent() == this) && - m_winLastFocused->AcceptsFocus() ) + if ( (*childLastFocused)->GetParent() == win && + (*childLastFocused)->AcceptsFocus() ) { wxLogTrace(_T("focus"), _T("SetFocusToChild() => last child (0x%08x)."), - m_winLastFocused->GetHandle()); + (*childLastFocused)->GetHandle()); - m_winLastFocused->SetFocus(); + (*childLastFocused)->SetFocus(); return TRUE; } else { // it doesn't count as such any more - m_winLastFocused = (wxWindow *)NULL; + *childLastFocused = (wxWindow *)NULL; } } // set the focus to the first child who wants it - wxWindowList::Node *node = GetChildren().GetFirst(); + wxWindowList::Node *node = win->GetChildren().GetFirst(); while ( node ) { wxWindow *child = node->GetData(); - if ( child->AcceptsFocus() ) + + if ( child->AcceptsFocus() + && !child->IsTopLevel() +#if wxUSE_TOOLBAR + && !wxDynamicCast(child, wxToolBar) +#endif // wxUSE_TOOLBAR +#if wxUSE_STATUSBAR + && !wxDynamicCast(child, wxStatusBar) +#endif // wxUSE_STATUSBAR + ) { wxLogTrace(_T("focus"), _T("SetFocusToChild() => first child (0x%08x)."), child->GetHandle()); - m_winLastFocused = child; // should be redundant, but it is not + *childLastFocused = child; // should be redundant, but it is not child->SetFocus(); return TRUE; } diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index 0e994766b9..b05f6a59aa 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -80,7 +80,10 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro sm_abortWindow = (wxWindow *) NULL; if (!printout) + { + sm_lastError = wxPRINTER_ERROR; return FALSE; + } printout->SetIsPreview(FALSE); @@ -96,7 +99,10 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage); if (maxPage == 0) + { + sm_lastError = wxPRINTER_ERROR; return FALSE; + } m_printDialogData.SetMinPage(minPage); m_printDialogData.SetMaxPage(maxPage); @@ -131,13 +137,14 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro } else { - dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); + dc = new wxPostScriptDC(GetPrintDialogData().GetPrintData()); } // May have pressed cancel. if (!dc || !dc->Ok()) { if (dc) delete dc; + sm_lastError = wxPRINTER_ERROR; return FALSE; } @@ -146,8 +153,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro int logPPIPrinterX = 0; int logPPIPrinterY = 0; - logPPIScreenX = 100; - logPPIScreenY = 100; + logPPIScreenX = 75; + logPPIScreenY = 75; /* // Correct values for X/PostScript? @@ -155,8 +162,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro logPPIPrinterY = 100; */ - logPPIPrinterX = 72; - logPPIPrinterY = 72; + logPPIPrinterX = wxPostScriptDC::GetResolution(); + logPPIPrinterY = wxPostScriptDC::GetResolution(); printout->SetPPIScreen(logPPIScreenX, logPPIScreenY); printout->SetPPIPrinter(logPPIPrinterX, logPPIPrinterY); @@ -189,6 +196,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro printout->OnBeginPrinting(); + sm_lastError = wxPRINTER_NO_ERROR; + bool keepGoing = TRUE; int copyCount; @@ -197,11 +206,15 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro if (!printout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage())) { wxEndBusyCursor(); - wxMessageBox(_("Could not start printing."), _("Print Error"), wxOK, parent); + wxLogError(_("Could not start printing.")); + sm_lastError = wxPRINTER_ERROR; break; } if (sm_abortIt) + { + sm_lastError = wxPRINTER_CANCELLED; break; + } int pn; for (pn = m_printDialogData.GetFromPage(); keepGoing && (pn <= m_printDialogData.GetToPage()) && printout->HasPage(pn); @@ -210,6 +223,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro if (sm_abortIt) { keepGoing = FALSE; + sm_lastError = wxPRINTER_CANCELLED; break; } else @@ -225,6 +239,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro else { sm_abortIt = TRUE; + sm_lastError = wxPRINTER_CANCELLED; keepGoing = FALSE; } } @@ -240,7 +255,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro delete dc; - return TRUE; + return (sm_lastError == wxPRINTER_NO_ERROR); } wxDC* wxPostScriptPrinter::PrintDialog(wxWindow *parent) @@ -252,7 +267,14 @@ wxDC* wxPostScriptPrinter::PrintDialog(wxWindow *parent) { dc = dialog->GetPrintDC(); m_printDialogData = dialog->GetPrintDialogData(); + if (dc == NULL) + sm_lastError = wxPRINTER_ERROR; + else + sm_lastError = wxPRINTER_NO_ERROR; } + else + sm_lastError = wxPRINTER_CANCELLED; + dialog->Destroy(); return dc; @@ -326,11 +348,13 @@ void wxPostScriptPrintPreview::DetermineScaling() if (paper) { - m_previewPrintout->SetPPIScreen(100, 100); + m_previewPrintout->SetPPIScreen(75, 75); // m_previewPrintout->SetPPIPrinter(100, 100); - m_previewPrintout->SetPPIPrinter(72, 72); + m_previewPrintout->SetPPIPrinter(wxPostScriptDC::GetResolution(), wxPostScriptDC::GetResolution()); wxSize sizeDevUnits(paper->GetSizeDeviceUnits()); + sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxPostScriptDC::GetResolution() / 72.0); //VST + sizeDevUnits.y = (wxCoord)((float)sizeDevUnits.y * wxPostScriptDC::GetResolution() / 72.0); //VST wxSize sizeTenthsMM(paper->GetSize()); wxSize sizeMM(sizeTenthsMM.x / 10, sizeTenthsMM.y / 10); @@ -351,7 +375,7 @@ void wxPostScriptPrintPreview::DetermineScaling() } // At 100%, the page should look about page-size on the screen. - m_previewScale = (float)0.8; + m_previewScale = (float)0.8 * 72.0 / (float)wxPostScriptDC::GetResolution(); } } diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 90436f9340..3b250f8494 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -101,7 +101,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, wxLayoutConstraints *c; wxClientDC dc(this); - dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + dc.SetFont(GetFont()); long widthText; dc.GetTextExtent(message, &widthText, NULL, NULL, NULL, NULL); @@ -226,7 +226,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, Enable(TRUE); // enable this window // Update the display (especially on X, GTK) - wxYield(); + wxYieldIfNeeded(); #ifdef __WXMAC__ MacUpdateImmediately(); @@ -285,7 +285,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg) m_msg->SetLabel(newmsg); - wxYield(); + wxYieldIfNeeded(); } if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) ) @@ -317,14 +317,14 @@ wxProgressDialog::Update(int value, const wxString& newmsg) // to do m_state = Finished; - wxYield(); + wxYieldIfNeeded(); (void)ShowModal(); } else { // update the display - wxYield(); + wxYieldIfNeeded(); } #ifdef __WXMAC__ diff --git a/src/generic/prop.cpp b/src/generic/prop.cpp index ad6d3b521e..7175580382 100644 --- a/src/generic/prop.cpp +++ b/src/generic/prop.cpp @@ -179,7 +179,7 @@ wxPropertyValue::wxPropertyValue(wxStringList *the_list) wxNode *node = the_list->First(); while (node) { - char *s = (char *)node->Data(); + wxChar *s = (wxChar *)node->Data(); Append(new wxPropertyValue(s)); node = node->Next(); } diff --git a/src/generic/propform.cpp b/src/generic/propform.cpp index e8f651083c..c403aad691 100644 --- a/src/generic/propform.cpp +++ b/src/generic/propform.cpp @@ -33,31 +33,31 @@ /* - * Property view - */ +* Property view +*/ IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormView, wxPropertyView) BEGIN_EVENT_TABLE(wxPropertyFormView, wxPropertyView) - EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk) - EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel) - EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp) - EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert) - EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate) +EVT_BUTTON(wxID_OK, wxPropertyFormView::OnOk) +EVT_BUTTON(wxID_CANCEL, wxPropertyFormView::OnCancel) +EVT_BUTTON(wxID_HELP, wxPropertyFormView::OnHelp) +EVT_BUTTON(wxID_PROP_REVERT, wxPropertyFormView::OnRevert) +EVT_BUTTON(wxID_PROP_UPDATE, wxPropertyFormView::OnUpdate) END_EVENT_TABLE() bool wxPropertyFormView::sm_dialogCancelled = FALSE; wxPropertyFormView::wxPropertyFormView(wxWindow *propPanel, long flags):wxPropertyView(flags) { - m_propertyWindow = propPanel; - m_managedWindow = NULL; - - m_windowCloseButton = NULL; - m_windowCancelButton = NULL; - m_windowHelpButton = NULL; - - m_detailedEditing = FALSE; + m_propertyWindow = propPanel; + m_managedWindow = NULL; + + m_windowCloseButton = NULL; + m_windowCancelButton = NULL; + m_windowHelpButton = NULL; + + m_detailedEditing = FALSE; } wxPropertyFormView::~wxPropertyFormView(void) @@ -66,125 +66,129 @@ wxPropertyFormView::~wxPropertyFormView(void) void wxPropertyFormView::ShowView(wxPropertySheet *ps, wxWindow *panel) { - m_propertySheet = ps; - - AssociatePanel(panel); -// CreateControls(); -// UpdatePropertyList(); + m_propertySheet = ps; + + AssociatePanel(panel); + // CreateControls(); + // UpdatePropertyList(); } // Update this view of the viewed object, called e.g. by // the object itself. bool wxPropertyFormView::OnUpdateView(void) { - return TRUE; + return TRUE; } bool wxPropertyFormView::Check(void) { - if (!m_propertySheet) - return FALSE; - - wxNode *node = m_propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) - { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - if (!formValidator->OnCheckValue(prop, this, m_propertyWindow)) + if (!m_propertySheet) return FALSE; + + wxNode *node = m_propertySheet->GetProperties().First(); + while (node) + { + wxProperty *prop = (wxProperty *)node->Data(); + wxPropertyValidator *validator = FindPropertyValidator(prop); + if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + { + wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; + if (!formValidator->OnCheckValue(prop, this, m_propertyWindow)) + return FALSE; + } + node = node->Next(); } - node = node->Next(); - } - return TRUE; + return TRUE; } bool wxPropertyFormView::TransferToPropertySheet(void) { - if (!m_propertySheet) - return FALSE; + if (!m_propertySheet) + return FALSE; - wxNode *node = m_propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + wxNode *node = m_propertySheet->GetProperties().First(); + while (node) { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnRetrieveValue(prop, this, m_propertyWindow); + wxProperty *prop = (wxProperty *)node->Data(); + wxPropertyValidator *validator = FindPropertyValidator(prop); + if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + { + wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; + formValidator->OnRetrieveValue(prop, this, m_propertyWindow); + } + node = node->Next(); } - node = node->Next(); - } - return TRUE; + return TRUE; } bool wxPropertyFormView::TransferToDialog(void) { - if (!m_propertySheet) - return FALSE; + if (!m_propertySheet) + return FALSE; - wxNode *node = m_propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + wxNode *node = m_propertySheet->GetProperties().First(); + while (node) { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnDisplayValue(prop, this, m_propertyWindow); + wxProperty *prop = (wxProperty *)node->Data(); + wxPropertyValidator *validator = FindPropertyValidator(prop); + if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + { + wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; + formValidator->OnDisplayValue(prop, this, m_propertyWindow); + } + node = node->Next(); } - node = node->Next(); - } - return TRUE; + return TRUE; } bool wxPropertyFormView::AssociateNames(void) { - if (!m_propertySheet || !m_propertyWindow) - return FALSE; - - wxNode *node = m_propertyWindow->GetChildren().First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->GetName() != wxT("")) + if (!m_propertySheet || !m_propertyWindow) + return FALSE; + + wxNode *node = m_propertyWindow->GetChildren().First(); + while (node) { - wxProperty *prop = m_propertySheet->GetProperty(win->GetName()); - if (prop) - prop->SetWindow(win); + wxWindow *win = (wxWindow *)node->Data(); + if (win->GetName() != wxT("")) + { + wxProperty *prop = m_propertySheet->GetProperty(win->GetName()); + if (prop) + prop->SetWindow(win); + } + node = node->Next(); } - node = node->Next(); - } - return TRUE; + return TRUE; } bool wxPropertyFormView::OnClose(void) { - delete this; - return TRUE; + if (m_propertyWindow->IsKindOf(CLASSINFO(wxPropertyFormPanel))) + { + ((wxPropertyFormPanel*)m_propertyWindow)->SetView(NULL); + } + delete this; + return TRUE; } void wxPropertyFormView::OnOk(wxCommandEvent& WXUNUSED(event)) { - // Retrieve the value if any - if (!Check()) - return; - - sm_dialogCancelled = FALSE; - TransferToPropertySheet(); - - m_managedWindow->Close(TRUE); + // Retrieve the value if any + if (!Check()) + return; + + sm_dialogCancelled = FALSE; + TransferToPropertySheet(); + + m_managedWindow->Close(TRUE); } void wxPropertyFormView::OnCancel(wxCommandEvent& WXUNUSED(event)) { - sm_dialogCancelled = TRUE; - - m_managedWindow->Close(TRUE); + sm_dialogCancelled = TRUE; + + m_managedWindow->Close(TRUE); } void wxPropertyFormView::OnHelp(wxCommandEvent& WXUNUSED(event)) @@ -199,47 +203,47 @@ void wxPropertyFormView::OnUpdate(wxCommandEvent& WXUNUSED(event)) void wxPropertyFormView::OnRevert(wxCommandEvent& WXUNUSED(event)) { - TransferToDialog(); + TransferToDialog(); } void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event) { - if (!m_propertySheet) - return; + if (!m_propertySheet) + return; - if (win.GetName() == wxT("")) - return; - - if (wxStrcmp(win.GetName(), wxT("ok")) == 0) - OnOk(event); - else if (wxStrcmp(win.GetName(), wxT("cancel")) == 0) - OnCancel(event); - else if (wxStrcmp(win.GetName(), wxT("help")) == 0) - OnHelp(event); - else if (wxStrcmp(win.GetName(), wxT("update")) == 0) - OnUpdate(event); - else if (wxStrcmp(win.GetName(), wxT("revert")) == 0) - OnRevert(event); - else - { - // Find a validator to route the command to. - wxNode *node = m_propertySheet->GetProperties().First(); - while (node) + if (win.GetName() == wxT("")) + return; + + if (wxStrcmp(win.GetName(), wxT("ok")) == 0) + OnOk(event); + else if (wxStrcmp(win.GetName(), wxT("cancel")) == 0) + OnCancel(event); + else if (wxStrcmp(win.GetName(), wxT("help")) == 0) + OnHelp(event); + else if (wxStrcmp(win.GetName(), wxT("update")) == 0) + OnUpdate(event); + else if (wxStrcmp(win.GetName(), wxT("revert")) == 0) + OnRevert(event); + else { - wxProperty *prop = (wxProperty *)node->Data(); - if (prop->GetWindow() && (prop->GetWindow() == &win)) - { - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + // Find a validator to route the command to. + wxNode *node = m_propertySheet->GetProperties().First(); + while (node) { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnCommand(prop, this, m_propertyWindow, event); - return; + wxProperty *prop = (wxProperty *)node->Data(); + if (prop->GetWindow() && (prop->GetWindow() == &win)) + { + wxPropertyValidator *validator = FindPropertyValidator(prop); + if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + { + wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; + formValidator->OnCommand(prop, this, m_propertyWindow, event); + return; + } + } + node = node->Next(); } - } - node = node->Next(); } - } } // Extend event processing to call OnCommand @@ -258,152 +262,152 @@ bool wxPropertyFormView::ProcessEvent(wxEvent& event) void wxPropertyFormView::OnDoubleClick(wxControl *item) { - if (!m_propertySheet) - return; - - // Find a validator to route the command to. - wxNode *node = m_propertySheet->GetProperties().First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - if (prop->GetWindow() && ((wxControl *)prop->GetWindow() == item)) - { - wxPropertyValidator *validator = FindPropertyValidator(prop); - if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) - { - wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; - formValidator->OnDoubleClick(prop, this, m_propertyWindow); + if (!m_propertySheet) return; - } + + // Find a validator to route the command to. + wxNode *node = m_propertySheet->GetProperties().First(); + while (node) + { + wxProperty *prop = (wxProperty *)node->Data(); + if (prop->GetWindow() && ((wxControl *)prop->GetWindow() == item)) + { + wxPropertyValidator *validator = FindPropertyValidator(prop); + if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) + { + wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; + formValidator->OnDoubleClick(prop, this, m_propertyWindow); + return; + } + } + node = node->Next(); } - node = node->Next(); - } } /* - * Property form dialog box - */ - -IMPLEMENT_CLASS(wxPropertyFormDialog, wxDialog) +* Property form dialog box +*/ + +IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormDialog, wxDialog) BEGIN_EVENT_TABLE(wxPropertyFormDialog, wxDialog) - EVT_CLOSE(wxPropertyFormDialog::OnCloseWindow) +EVT_CLOSE(wxPropertyFormDialog::OnCloseWindow) END_EVENT_TABLE() wxPropertyFormDialog::wxPropertyFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxDialog(parent, -1, title, pos, size, style, name) + const wxPoint& pos, const wxSize& size, long style, const wxString& name): +wxDialog(parent, -1, title, pos, size, style, name) { - m_view = v; - m_view->AssociatePanel(this); - m_view->SetManagedWindow(this); -// SetAutoLayout(TRUE); + m_view = v; + m_view->AssociatePanel(this); + m_view->SetManagedWindow(this); + // SetAutoLayout(TRUE); } void wxPropertyFormDialog::OnCloseWindow(wxCloseEvent& event) { - if (m_view) - { - m_view->OnClose(); - m_view = NULL; - this->Destroy(); - } - else - event.Veto(); + if (m_view) + { + m_view->OnClose(); + m_view = NULL; + this->Destroy(); + } + else + event.Veto(); } void wxPropertyFormDialog::OnDefaultAction(wxControl *item) { - m_view->OnDoubleClick(item); + m_view->OnDoubleClick(item); } void wxPropertyFormDialog::OnCommand(wxWindow& win, wxCommandEvent& event) { - if ( m_view ) - m_view->OnCommand(win, event); + if ( m_view ) + m_view->OnCommand(win, event); } // Extend event processing to search the view's event table bool wxPropertyFormDialog::ProcessEvent(wxEvent& event) { - if ( !m_view || ! m_view->ProcessEvent(event) ) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; + if ( !m_view || ! m_view->ProcessEvent(event) ) + return wxEvtHandler::ProcessEvent(event); + else + return TRUE; } /* - * Property form panel - */ - -IMPLEMENT_CLASS(wxPropertyFormPanel, wxPanel) +* Property form panel +*/ + +IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormPanel, wxPanel) void wxPropertyFormPanel::OnDefaultAction(wxControl *item) { - m_view->OnDoubleClick(item); + m_view->OnDoubleClick(item); } void wxPropertyFormPanel::OnCommand(wxWindow& win, wxCommandEvent& event) { - m_view->OnCommand(win, event); + m_view->OnCommand(win, event); } // Extend event processing to search the view's event table bool wxPropertyFormPanel::ProcessEvent(wxEvent& event) { - if ( !m_view || ! m_view->ProcessEvent(event) ) - return wxEvtHandler::ProcessEvent(event); - else - return TRUE; + if ( !m_view || ! m_view->ProcessEvent(event) ) + return wxEvtHandler::ProcessEvent(event); + else + return TRUE; } /* - * Property frame - */ - -IMPLEMENT_CLASS(wxPropertyFormFrame, wxFrame) +* Property frame +*/ + +IMPLEMENT_DYNAMIC_CLASS(wxPropertyFormFrame, wxFrame) BEGIN_EVENT_TABLE(wxPropertyFormFrame, wxFrame) - EVT_CLOSE(wxPropertyFormFrame::OnCloseWindow) +EVT_CLOSE(wxPropertyFormFrame::OnCloseWindow) END_EVENT_TABLE() void wxPropertyFormFrame::OnCloseWindow(wxCloseEvent& event) { - if (m_view && m_view->OnClose()) - this->Destroy(); - else - event.Veto(); + if (m_view && m_view->OnClose()) + this->Destroy(); + else + event.Veto(); } wxPanel *wxPropertyFormFrame::OnCreatePanel(wxFrame *parent, wxPropertyFormView *v) { - return new wxPropertyFormPanel(v, parent); + return new wxPropertyFormPanel(v, parent); } bool wxPropertyFormFrame::Initialize(void) { - m_propertyPanel = OnCreatePanel(this, m_view); - if (m_propertyPanel) - { - m_view->AssociatePanel(m_propertyPanel); - m_view->SetManagedWindow(this); - return TRUE; - } - else - return FALSE; + m_propertyPanel = OnCreatePanel(this, m_view); + if (m_propertyPanel) + { + m_view->AssociatePanel(m_propertyPanel); + m_view->SetManagedWindow(this); + return TRUE; + } + else + return FALSE; } - /* - * Property form specific validator - */ - +/* +* Property form specific validator +*/ + IMPLEMENT_ABSTRACT_CLASS(wxPropertyFormValidator, wxPropertyValidator) /* - * Default validators - */ +* Default validators +*/ IMPLEMENT_DYNAMIC_CLASS(wxRealFormValidator, wxPropertyFormValidator) @@ -411,66 +415,66 @@ IMPLEMENT_DYNAMIC_CLASS(wxRealFormValidator, wxPropertyFormValidator) /// Real number form validator /// bool wxRealFormValidator::OnCheckValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *parentWindow) + wxWindow *parentWindow) { - if (m_realMin == 0.0 && m_realMax == 0.0) - return TRUE; + if (m_realMin == 0.0 && m_realMax == 0.0) + return TRUE; - // The item used for viewing the real number: should be a text item. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - return FALSE; - - wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); - - float val = 0.0; - if (!StringToFloat(WXSTRINGCAST value, &val)) - { - wxChar buf[200]; - wxSprintf(buf, wxT("Value %s is not a valid real number!"), (const wxChar *)value); - wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - - if (val < m_realMin || val > m_realMax) - { - wxChar buf[200]; - wxSprintf(buf, wxT("Value must be a real number between %.2f and %.2f!"), m_realMin, m_realMax); - wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; + // The item used for viewing the real number: should be a text item. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) + return FALSE; + + wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); + + float val = 0.0; + if (!StringToFloat(WXSTRINGCAST value, &val)) + { + wxChar buf[200]; + wxSprintf(buf, wxT("Value %s is not a valid real number!"), (const wxChar *)value); + wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); + return FALSE; + } + + if (val < m_realMin || val > m_realMax) + { + wxChar buf[200]; + wxSprintf(buf, wxT("Value must be a real number between %.2f and %.2f!"), m_realMin, m_realMax); + wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); + return FALSE; + } + return TRUE; } bool wxRealFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) + wxWindow *WXUNUSED(parentWindow) ) { - // The item used for viewing the real number: should be a text item. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - return FALSE; - - wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); - - if (value.Length() == 0) - return FALSE; + // The item used for viewing the real number: should be a text item. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) + return FALSE; - float f = (float)wxAtof((const wxChar *)value); - property->GetValue() = f; - return TRUE; + wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); + + if (value.Length() == 0) + return FALSE; + + float f = (float)wxAtof((const wxChar *)value); + property->GetValue() = f; + return TRUE; } bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) + wxWindow *WXUNUSED(parentWindow) ) { - // The item used for viewing the real number: should be a text item. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - return FALSE; - - wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow; - textItem->SetValue(FloatToString(property->GetValue().RealValue())); - return TRUE; + // The item used for viewing the real number: should be a text item. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) + return FALSE; + + wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow; + textItem->SetValue(FloatToString(property->GetValue().RealValue())); + return TRUE; } /// @@ -479,95 +483,95 @@ bool wxRealFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormVie IMPLEMENT_DYNAMIC_CLASS(wxIntegerFormValidator, wxPropertyFormValidator) bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *parentWindow) + wxWindow *parentWindow) { - if (m_integerMin == 0.0 && m_integerMax == 0.0) - return TRUE; + if (m_integerMin == 0.0 && m_integerMax == 0.0) + return TRUE; - // The item used for viewing the real number: should be a text item or a slider - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow) - return FALSE; - - long val = 0; - - if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); - - if (!StringToLong(WXSTRINGCAST value, &val)) + // The item used for viewing the real number: should be a text item or a slider + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow) + return FALSE; + + long val = 0; + + if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) { - wxChar buf[200]; - wxSprintf(buf, wxT("Value %s is not a valid integer!"), (const wxChar *)value); - wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; + wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); + + if (!StringToLong(WXSTRINGCAST value, &val)) + { + wxChar buf[200]; + wxSprintf(buf, wxT("Value %s is not a valid integer!"), (const wxChar *)value); + wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); + return FALSE; + } } - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxSlider))) - { - val = (long)((wxSlider *)m_propertyWindow)->GetValue(); - } - else - return FALSE; + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxSlider))) + { + val = (long)((wxSlider *)m_propertyWindow)->GetValue(); + } + else + return FALSE; - if (val < m_integerMin || val > m_integerMax) - { - char buf[200]; - sprintf(buf, "Value must be an integer between %ld and %ld!", m_integerMin, m_integerMax); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; - } - return TRUE; + if (val < m_integerMin || val > m_integerMax) + { + char buf[200]; + sprintf(buf, "Value must be an integer between %ld and %ld!", m_integerMin, m_integerMax); + wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); + return FALSE; + } + return TRUE; } bool wxIntegerFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) + wxWindow *WXUNUSED(parentWindow)) { - // The item used for viewing the real number: should be a text item or a slider - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow) - return FALSE; - - if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); - - if (value.Length() == 0) - return FALSE; + // The item used for viewing the real number: should be a text item or a slider + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow) + return FALSE; - long i = wxAtol((const wxChar *)value); - property->GetValue() = i; - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxSlider))) - { - property->GetValue() = (long)((wxSlider *)m_propertyWindow)->GetValue(); - } - else - return FALSE; + if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) + { + wxString value(((wxTextCtrl *)m_propertyWindow)->GetValue()); + + if (value.Length() == 0) + return FALSE; + + long i = wxAtol((const wxChar *)value); + property->GetValue() = i; + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxSlider))) + { + property->GetValue() = (long)((wxSlider *)m_propertyWindow)->GetValue(); + } + else + return FALSE; - return TRUE; + return TRUE; } bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) + wxWindow *WXUNUSED(parentWindow)) { - // The item used for viewing the real number: should be a text item or a slider - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow) - return FALSE; - - if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow; - textItem->SetValue(LongToString(property->GetValue().IntegerValue())); - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxSlider))) - { - ((wxSlider *)m_propertyWindow)->SetValue((int)property->GetValue().IntegerValue()); - } - else - return FALSE; - return TRUE; + // The item used for viewing the real number: should be a text item or a slider + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow) + return FALSE; + + if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) + { + wxTextCtrl *textItem = (wxTextCtrl *)m_propertyWindow; + textItem->SetValue(LongToString(property->GetValue().IntegerValue())); + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxSlider))) + { + ((wxSlider *)m_propertyWindow)->SetValue((int)property->GetValue().IntegerValue()); + } + else + return FALSE; + return TRUE; } /// @@ -576,41 +580,41 @@ bool wxIntegerFormValidator::OnDisplayValue( wxProperty *property, wxPropertyFor IMPLEMENT_DYNAMIC_CLASS(wxBoolFormValidator, wxPropertyFormValidator) bool wxBoolFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) + wxWindow *WXUNUSED(parentWindow)) { - // The item used for viewing the boolean: should be a checkbox - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) - return FALSE; - - return TRUE; + // The item used for viewing the boolean: should be a checkbox + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) + return FALSE; + + return TRUE; } bool wxBoolFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) + wxWindow *WXUNUSED(parentWindow) ) { - // The item used for viewing the boolean: should be a checkbox. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) - return FALSE; - - wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; - - property->GetValue() = (bool)checkBox->GetValue(); - return TRUE; + // The item used for viewing the boolean: should be a checkbox. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) + return FALSE; + + wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; + + property->GetValue() = (bool)checkBox->GetValue(); + return TRUE; } bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow)) + wxWindow *WXUNUSED(parentWindow)) { - // The item used for viewing the boolean: should be a checkbox. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) - return FALSE; - - wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; - checkBox->SetValue((bool)property->GetValue().BoolValue()); - return TRUE; + // The item used for viewing the boolean: should be a checkbox. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow || !m_propertyWindow->IsKindOf(CLASSINFO(wxCheckBox))) + return FALSE; + + wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; + checkBox->SetValue((bool)property->GetValue().BoolValue()); + return TRUE; } /// @@ -619,135 +623,135 @@ bool wxBoolFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormVie IMPLEMENT_DYNAMIC_CLASS(wxStringFormValidator, wxPropertyFormValidator) wxStringFormValidator::wxStringFormValidator(wxStringList *list, long flags): - wxPropertyFormValidator(flags) +wxPropertyFormValidator(flags) { - m_strings = list; + m_strings = list; } bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *parentWindow ) + wxWindow *parentWindow ) { - if (!m_strings) - return TRUE; - - // The item used for viewing the string: should be a text item, choice item or listbox. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow) - return FALSE; - if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; - if (!m_strings->Member(text->GetValue())) + if (!m_strings) + return TRUE; + + // The item used for viewing the string: should be a text item, choice item or listbox. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow) + return FALSE; + if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) { - wxString s("Value "); - s += text->GetValue(); - s += " is not valid."; - wxMessageBox(s, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); - return FALSE; + wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; + if (!m_strings->Member(text->GetValue())) + { + wxString s("Value "); + s += text->GetValue(); + s += " is not valid."; + wxMessageBox(s, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); + return FALSE; + } } - } - else - { - // Any other item constrains the string value, - // so we don't have to check it. - } - return TRUE; + else + { + // Any other item constrains the string value, + // so we don't have to check it. + } + return TRUE; } bool wxStringFormValidator::OnRetrieveValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) + wxWindow *WXUNUSED(parentWindow) ) { - // The item used for viewing the string: should be a text item, choice item or listbox. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow) - return FALSE; - if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; - property->GetValue() = text->GetValue(); - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxListBox))) - { - wxListBox *lbox = (wxListBox *)m_propertyWindow; - if (lbox->GetSelection() > -1) - property->GetValue() = lbox->GetStringSelection(); - } -/* - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxRadioBox))) - { + // The item used for viewing the string: should be a text item, choice item or listbox. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow) + return FALSE; + if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) + { + wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; + property->GetValue() = text->GetValue(); + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxListBox))) + { + wxListBox *lbox = (wxListBox *)m_propertyWindow; + if (lbox->GetSelection() > -1) + property->GetValue() = lbox->GetStringSelection(); + } + /* + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxRadioBox))) + { wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow; int n = 0; if ((n = rbox->GetSelection()) > -1) - property->GetValue() = rbox->GetString(n); - } -*/ - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice))) - { - wxChoice *choice = (wxChoice *)m_propertyWindow; - if (choice->GetSelection() > -1) - property->GetValue() = choice->GetStringSelection(); - } - else - return FALSE; - return TRUE; + property->GetValue() = rbox->GetString(n); + } + */ + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice))) + { + wxChoice *choice = (wxChoice *)m_propertyWindow; + if (choice->GetSelection() > -1) + property->GetValue() = choice->GetStringSelection(); + } + else + return FALSE; + return TRUE; } bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormView *WXUNUSED(view), - wxWindow *WXUNUSED(parentWindow) ) + wxWindow *WXUNUSED(parentWindow) ) { - // The item used for viewing the string: should be a text item, choice item or listbox. - wxWindow *m_propertyWindow = property->GetWindow(); - if (!m_propertyWindow) - return FALSE; - if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) - { - wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; - text->SetValue(property->GetValue().StringValue()); - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxListBox))) - { - wxListBox *lbox = (wxListBox *)m_propertyWindow; - if (lbox->Number() == 0 && m_strings) + // The item used for viewing the string: should be a text item, choice item or listbox. + wxWindow *m_propertyWindow = property->GetWindow(); + if (!m_propertyWindow) + return FALSE; + if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) { - // Try to initialize the listbox from 'strings' - wxNode *node = m_strings->First(); - while (node) - { - char *s = (char *)node->Data(); - lbox->Append(s); - node = node->Next(); - } + wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; + text->SetValue(property->GetValue().StringValue()); } - lbox->SetStringSelection(property->GetValue().StringValue()); - } -/* - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxRadioBox))) - { + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxListBox))) + { + wxListBox *lbox = (wxListBox *)m_propertyWindow; + if (lbox->Number() == 0 && m_strings) + { + // Try to initialize the listbox from 'strings' + wxNode *node = m_strings->First(); + while (node) + { + char *s = (char *)node->Data(); + lbox->Append(s); + node = node->Next(); + } + } + lbox->SetStringSelection(property->GetValue().StringValue()); + } + /* + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxRadioBox))) + { wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow; rbox->SetStringSelection(property->GetValue().StringValue()); - } -*/ - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice))) - { - wxChoice *choice = (wxChoice *)m_propertyWindow; -#ifndef __XVIEW__ - if (choice->Number() == 0 && m_strings) - { - // Try to initialize the choice item from 'strings' - // XView doesn't allow this kind of thing. - wxNode *node = m_strings->First(); - while (node) - { - char *s = (char *)node->Data(); - choice->Append(s); - node = node->Next(); - } } + */ + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice))) + { + wxChoice *choice = (wxChoice *)m_propertyWindow; +#ifndef __XVIEW__ + if (choice->Number() == 0 && m_strings) + { + // Try to initialize the choice item from 'strings' + // XView doesn't allow this kind of thing. + wxNode *node = m_strings->First(); + while (node) + { + char *s = (char *)node->Data(); + choice->Append(s); + node = node->Next(); + } + } #endif - choice->SetStringSelection(property->GetValue().StringValue()); - } - else - return FALSE; - return TRUE; + choice->SetStringSelection(property->GetValue().StringValue()); + } + else + return FALSE; + return TRUE; } diff --git a/src/generic/proplist.cpp b/src/generic/proplist.cpp index 60e51cadd6..d5f5dcd9c4 100644 --- a/src/generic/proplist.cpp +++ b/src/generic/proplist.cpp @@ -72,7 +72,7 @@ static wxBitmap *GetCrossBitmap(); // Property text edit control // ---------------------------------------------------------------------------- -IMPLEMENT_CLASS(wxPropertyTextEdit, wxTextCtrl) +IMPLEMENT_DYNAMIC_CLASS(wxPropertyTextEdit, wxTextCtrl) wxPropertyTextEdit::wxPropertyTextEdit(wxPropertyListView *v, wxWindow *parent, const wxWindowID id, const wxString& value, @@ -675,7 +675,7 @@ void wxPropertyListView::OnText(wxCommandEvent& event) // Property dialog box // ---------------------------------------------------------------------------- -IMPLEMENT_CLASS(wxPropertyListDialog, wxDialog) +IMPLEMENT_DYNAMIC_CLASS(wxPropertyListDialog, wxDialog) BEGIN_EVENT_TABLE(wxPropertyListDialog, wxDialog) EVT_BUTTON(wxID_CANCEL, wxPropertyListDialog::OnCancel) @@ -735,7 +735,7 @@ bool wxPropertyListDialog::ProcessEvent(wxEvent& event) // Property panel // ---------------------------------------------------------------------------- -IMPLEMENT_CLASS(wxPropertyListPanel, wxPanel) +IMPLEMENT_DYNAMIC_CLASS(wxPropertyListPanel, wxPanel) BEGIN_EVENT_TABLE(wxPropertyListPanel, wxPanel) EVT_SIZE(wxPropertyListPanel::OnSize) @@ -771,7 +771,7 @@ void wxPropertyListPanel::OnSize(wxSizeEvent& WXUNUSED(event)) // Property frame // ---------------------------------------------------------------------------- -IMPLEMENT_CLASS(wxPropertyListFrame, wxFrame) +IMPLEMENT_DYNAMIC_CLASS(wxPropertyListFrame, wxFrame) BEGIN_EVENT_TABLE(wxPropertyListFrame, wxFrame) EVT_CLOSE(wxPropertyListFrame::OnCloseWindow) diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index 160dcb158b..a808264d02 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -45,28 +45,19 @@ BEGIN_EVENT_TABLE(wxSashWindow, wxWindow) EVT_MOUSE_EVENTS(wxSashWindow::OnMouseEvent) END_EVENT_TABLE() -wxSashWindow::wxSashWindow() +bool wxSashWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) { - m_draggingEdge = wxSASH_NONE; - m_dragMode = wxSASH_DRAG_NONE; - m_oldX = 0; - m_oldY = 0; - m_firstX = 0; - m_firstY = 0; - m_borderSize = 3 ; - m_extraBorderSize = 0; - m_sashCursorWE = NULL; - m_sashCursorNS = NULL; - - m_minimumPaneSizeX = 0; - m_minimumPaneSizeY = 0; - m_maximumPaneSizeX = 10000; - m_maximumPaneSizeY = 10000; + return wxWindow::Create(parent, id, pos, size, style, name); } -wxSashWindow::wxSashWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, long style, const wxString& name) - :wxWindow(parent, id, pos, size, style, name) +wxSashWindow::~wxSashWindow() +{ + delete m_sashCursorWE; + delete m_sashCursorNS; +} + +void wxSashWindow::Init() { m_draggingEdge = wxSASH_NONE; m_dragMode = wxSASH_DRAG_NONE; @@ -87,12 +78,6 @@ wxSashWindow::wxSashWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, InitColours(); } -wxSashWindow::~wxSashWindow() -{ - delete m_sashCursorWE; - delete m_sashCursorNS; -} - void wxSashWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); @@ -415,7 +400,7 @@ void wxSashWindow::DrawBorders(wxDC& dc) wxPen lightShadowPen(m_lightShadowColour, 1, wxSOLID); wxPen hilightPen(m_hilightColour, 1, wxSOLID); - if ( GetWindowStyleFlag() & wxSW_3D ) + if ( GetWindowStyleFlag() & wxSW_3DBORDER ) { dc.SetPen(mediumShadowPen); dc.DrawLine(0, 0, w-1, 0); @@ -480,7 +465,7 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc) dc.SetBrush(faceBrush); dc.DrawRectangle(sashPosition, 0, GetEdgeMargin(edge), h); - if (GetWindowStyleFlag() & wxSW_3D) + if (GetWindowStyleFlag() & wxSW_3DSASH) { if (edge == wxSASH_LEFT) { @@ -491,9 +476,9 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc) } else { - // Draw a light grey line on the right to indicate that the + // Draw a highlight line on the right to indicate that the // sash is raised - dc.SetPen(lightShadowPen); + dc.SetPen(hilightPen); dc.DrawLine(w - GetEdgeMargin(edge), 0, w - GetEdgeMargin(edge), h); } } @@ -510,13 +495,13 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc) dc.SetBrush(faceBrush); dc.DrawRectangle(0, sashPosition, w, GetEdgeMargin(edge)); - if (GetWindowStyleFlag() & wxSW_3D) + if (GetWindowStyleFlag() & wxSW_3DSASH) { if (edge == wxSASH_BOTTOM) { - // Draw a light grey line on the bottom to indicate that the + // Draw a highlight line on the bottom to indicate that the // sash is raised - dc.SetPen(lightShadowPen); + dc.SetPen(hilightPen); dc.DrawLine(0, h - GetEdgeMargin(edge), w, h - GetEdgeMargin(edge)); } else diff --git a/src/generic/scrolwin.cpp b/src/generic/scrolwin.cpp index 1a8af01547..f73c8875c8 100644 --- a/src/generic/scrolwin.cpp +++ b/src/generic/scrolwin.cpp @@ -534,10 +534,10 @@ void wxScrolledWindow::Scroll( int x_pos, int y_pos ) m_xScrollPosition = wxMin( m_xScrollLines-noPagePositions, m_xScrollPosition ); m_xScrollPosition = wxMax( 0, m_xScrollPosition ); - if (old_x == m_xScrollPosition) return; - - m_targetWindow->SetScrollPos( wxHORIZONTAL, m_xScrollPosition, TRUE ); - m_targetWindow->ScrollWindow( (old_x-m_xScrollPosition)*m_xScrollPixelsPerLine, 0 ); + if (old_x != m_xScrollPosition) { + m_targetWindow->SetScrollPos( wxHORIZONTAL, m_xScrollPosition, TRUE ); + m_targetWindow->ScrollWindow( (old_x-m_xScrollPosition)*m_xScrollPixelsPerLine, 0 ); + } } if ((y_pos != -1) && (m_yScrollPixelsPerLine)) { @@ -554,10 +554,10 @@ void wxScrolledWindow::Scroll( int x_pos, int y_pos ) m_yScrollPosition = wxMin( m_yScrollLines-noPagePositions, m_yScrollPosition ); m_yScrollPosition = wxMax( 0, m_yScrollPosition ); - if (old_y == m_yScrollPosition) return; - - m_targetWindow->SetScrollPos( wxVERTICAL, m_yScrollPosition, TRUE ); - m_targetWindow->ScrollWindow( 0, (old_y-m_yScrollPosition)*m_yScrollPixelsPerLine ); + if (old_y != m_yScrollPosition) { + m_targetWindow->SetScrollPos( wxVERTICAL, m_yScrollPosition, TRUE ); + m_targetWindow->ScrollWindow( 0, (old_y-m_yScrollPosition)*m_yScrollPixelsPerLine ); + } } #ifdef __WXMAC__ diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 71eb3741c4..2ce26912cf 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -53,42 +53,36 @@ BEGIN_EVENT_TABLE(wxSplitterWindow, wxWindow) EVT_SPLITTER_UNSPLIT(-1, wxSplitterWindow::OnUnsplitEvent) END_EVENT_TABLE() -wxSplitterWindow::wxSplitterWindow() -{ - m_splitMode = wxSPLIT_VERTICAL; - m_permitUnsplitAlways = FALSE; - m_windowOne = (wxWindow *) NULL; - m_windowTwo = (wxWindow *) NULL; - m_dragMode = wxSPLIT_DRAG_NONE; - m_oldX = 0; - m_oldY = 0; - m_firstX = 0; - m_firstY = 0; - m_sashSize = 7; - m_borderSize = 2; - m_sashPosition = 0; - m_sashCursorWE = (wxCursor *) NULL; - m_sashCursorNS = (wxCursor *) NULL; - m_sashTrackerPen = (wxPen *) NULL; - m_lightShadowPen = (wxPen *) NULL; - m_mediumShadowPen = (wxPen *) NULL; - m_darkShadowPen = (wxPen *) NULL; - m_faceBrush = (wxBrush *) NULL; - m_facePen = (wxPen *) NULL; - m_hilightPen = (wxPen *) NULL; - m_minimumPaneSize = 0; - m_needUpdating = FALSE; -} - -wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, +bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) - : wxWindow(parent, id, pos, size, style, name) +{ + if (!wxWindow::Create(parent, id, pos, size, style, name)) + return FALSE; + + m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0; + + if ( style & wxSP_3DSASH ) + m_sashSize = 7; + else + m_sashSize = 3; + + if ( style & wxSP_3DBORDER ) + m_borderSize = 2; + else if ( style & wxSP_BORDER ) + m_borderSize = 1; + else + m_borderSize = 0; + + return TRUE; +} + +void wxSplitterWindow::Init() { m_splitMode = wxSPLIT_VERTICAL; - m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0; + m_permitUnsplitAlways = TRUE; m_windowOne = (wxWindow *) NULL; m_windowTwo = (wxWindow *) NULL; m_dragMode = wxSPLIT_DRAG_NONE; @@ -110,28 +104,11 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, m_facePen = (wxPen *) NULL; m_hilightPen = (wxPen *) NULL; - if ( style & wxSP_3D ) - { - m_borderSize = 2; - m_sashSize = 7; - } - else if ( style & wxSP_BORDER ) - { - m_borderSize = 1; - m_sashSize = 3; - } - else - { - m_borderSize = 0; - m_sashSize = 3; - } + m_borderSize = 0; + m_sashSize = 3; - // Eventually, we'll respond to colour change messages InitColours(); - // For debugging purposes, to see the background. -// SetBackground(wxBLUE_BRUSH); - m_needUpdating = FALSE; } @@ -157,10 +134,12 @@ void wxSplitterWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) DrawSash(dc); } -void wxSplitterWindow::OnIdle(wxIdleEvent& WXUNUSED(event)) +void wxSplitterWindow::OnIdle(wxIdleEvent& event) { if (m_needUpdating) SizeWindows(); + + event.Skip( TRUE ); } void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) @@ -176,6 +155,8 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) SetCursor(wxCursor()); #endif + if (GetWindowStyle() & wxSP_NOSASH) + return; if (event.LeftDown()) { @@ -328,7 +309,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) return; } } - + if (new_sash_position == m_sashPosition) return; @@ -459,7 +440,7 @@ void wxSplitterWindow::DrawBorders(wxDC& dc) int w, h; GetClientSize(&w, &h); - if ( GetWindowStyleFlag() & wxSP_3D ) + if ( GetWindowStyleFlag() & wxSP_3DBORDER ) { dc.SetPen(*m_facePen); @@ -502,11 +483,13 @@ void wxSplitterWindow::DrawSash(wxDC& dc) { if ( m_sashPosition == 0 || !m_windowTwo) return; + if (GetWindowStyle() & wxSP_NOSASH) + return; int w, h; GetClientSize(&w, &h); - if ( GetWindowStyleFlag() & wxSP_3D ) + if ( GetWindowStyleFlag() & wxSP_3DSASH ) { if ( m_splitMode == wxSPLIT_VERTICAL ) { @@ -517,7 +500,7 @@ void wxSplitterWindow::DrawSash(wxDC& dc) dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.SetPen(*m_lightShadowPen); - int xShadow = m_borderSize ? m_borderSize - 1 : 0 ; + int xShadow = m_borderSize ? m_borderSize - 1 : 0 ; dc.DrawLine(m_sashPosition, xShadow , m_sashPosition, h-m_borderSize); dc.SetPen(*m_hilightPen); @@ -529,6 +512,18 @@ void wxSplitterWindow::DrawSash(wxDC& dc) dc.SetPen(*m_darkShadowPen); dc.DrawLine(m_sashPosition+m_sashSize-1, m_borderSize, m_sashPosition+m_sashSize-1, h-m_borderSize ); + + // Draw the top and bottom edges of the sash, if requested + if (GetWindowStyle() & wxSP_FULLSASH) + { + // Top + dc.SetPen(*m_hilightPen); + dc.DrawLine(m_sashPosition+1, m_borderSize, m_sashPosition+m_sashSize-1, m_borderSize); + + // Bottom + dc.SetPen(*m_darkShadowPen); + dc.DrawLine(m_sashPosition+1, h-m_borderSize-1, m_sashPosition+m_sashSize-1, h-m_borderSize-1); + } } else { @@ -549,6 +544,18 @@ void wxSplitterWindow::DrawSash(wxDC& dc) dc.SetPen(*m_darkShadowPen); dc.DrawLine(m_borderSize, m_sashPosition+m_sashSize-1, w-m_borderSize, m_sashPosition+m_sashSize-1); + + // Draw the left and right edges of the sash, if requested + if (GetWindowStyle() & wxSP_FULLSASH) + { + // Left + dc.SetPen(*m_hilightPen); + dc.DrawLine(m_borderSize, m_sashPosition, m_borderSize, m_sashPosition+m_sashSize); + + // Right + dc.SetPen(*m_darkShadowPen); + dc.DrawLine(w-m_borderSize-1, m_sashPosition+1, w-m_borderSize-1, m_sashPosition+m_sashSize-1); + } } } else @@ -558,19 +565,28 @@ void wxSplitterWindow::DrawSash(wxDC& dc) dc.SetPen(*wxBLACK_PEN); dc.SetBrush(*wxBLACK_BRUSH); int h1 = h-1; - if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER ) + int y1 = 0; + if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER ) h1 += 1; // Not sure why this is necessary... - dc.DrawRectangle(m_sashPosition, 0, m_sashSize, h1); + if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER) + { + y1 = 2; h1 -= 3; + } + dc.DrawRectangle(m_sashPosition, y1, m_sashSize, h1); } else { dc.SetPen(*wxBLACK_PEN); dc.SetBrush(*wxBLACK_BRUSH); int w1 = w-1; - if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER ) + int x1 = 0; + if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER ) w1 ++; - - dc.DrawRectangle(0, m_sashPosition, w1, m_sashSize); + if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER) + { + x1 = 2; w1 -= 3; + } + dc.DrawRectangle(x1, m_sashPosition, w1, m_sashSize); } } @@ -643,44 +659,42 @@ void wxSplitterWindow::SizeWindows() int w, h; GetClientSize(&w, &h); - if ( m_windowOne && !m_windowTwo ) + if ( GetWindow1() && !GetWindow2() ) { - m_windowOne->SetSize(m_borderSize, m_borderSize, w - 2*m_borderSize, h - 2*m_borderSize); + GetWindow1()->SetSize(GetBorderSize(), GetBorderSize(), w - 2*GetBorderSize(), h - 2*GetBorderSize()); } - else if ( m_windowOne && m_windowTwo ) + else if ( GetWindow1() && GetWindow2() ) { - if (m_splitMode == wxSPLIT_VERTICAL) + if (GetSplitMode() == wxSPLIT_VERTICAL) { - int x1 = m_borderSize; - int y1 = m_borderSize; - int w1 = m_sashPosition - m_borderSize; - int h1 = h - 2*m_borderSize; + int x1 = GetBorderSize(); + int y1 = GetBorderSize(); + int w1 = GetSashPosition() - GetBorderSize(); + int h1 = h - 2*GetBorderSize(); - int x2 = m_sashPosition + m_sashSize; - int y2 = m_borderSize; - int w2 = w - 2*m_borderSize - m_sashSize - w1; - int h2 = h - 2*m_borderSize; - - m_windowOne->SetSize(x1, y1, w1, h1); - m_windowTwo->SetSize(x2, y2, w2, h2); + int x2 = GetSashPosition() + GetSashSize(); + int y2 = GetBorderSize(); + int w2 = w - 2*GetBorderSize() - GetSashSize() - w1; + int h2 = h - 2*GetBorderSize(); + GetWindow1()->SetSize(x1, y1, w1, h1); + GetWindow2()->SetSize(x2, y2, w2, h2); } else { - m_windowOne->SetSize(m_borderSize, m_borderSize, - w - 2*m_borderSize, m_sashPosition - m_borderSize); - m_windowTwo->SetSize(m_borderSize, m_sashPosition + m_sashSize, - w - 2*m_borderSize, h - 2*m_borderSize - m_sashSize - (m_sashPosition - m_borderSize)); - + GetWindow1()->SetSize(GetBorderSize(), GetBorderSize(), + w - 2*GetBorderSize(), GetSashPosition() - GetBorderSize()); + GetWindow2()->SetSize(GetBorderSize(), GetSashPosition() + GetSashSize(), + w - 2*GetBorderSize(), h - 2*GetBorderSize() - GetSashSize() - (GetSashPosition() - GetBorderSize())); } } wxClientDC dc(this); - if ( m_borderSize > 0 ) + if ( GetBorderSize() > 0 ) DrawBorders(dc); DrawSash(dc); - - m_needUpdating = FALSE; + + SetNeedUpdating(FALSE); } // Set pane for unsplit window @@ -708,7 +722,7 @@ bool wxSplitterWindow::SplitVertically(wxWindow *window1, wxWindow *window2, int if ( sashPosition > 0 ) m_sashPosition = sashPosition; else if ( sashPosition < 0 ) - m_sashPosition = w - sashPosition; + m_sashPosition = w + sashPosition; // It's negative so adding is subtracting else // default m_sashPosition = w/2; @@ -731,7 +745,7 @@ bool wxSplitterWindow::SplitHorizontally(wxWindow *window1, wxWindow *window2, i if ( sashPosition > 0 ) m_sashPosition = sashPosition; else if ( sashPosition < 0 ) - m_sashPosition = h - sashPosition; + m_sashPosition = h + sashPosition; // It's negative so adding is subtracting else // default m_sashPosition = h/2; diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 753ff1677b..82b90a180b 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -175,6 +175,13 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) ) { wxPaintDC dc(this); +#ifdef __WXPM__ + RECTL wrectl; + + ::WinQueryWindowRect(GetHWND(), &wrectl); + ::WinFillRect(dc.GetHDC(), &wrectl, CLR_BLACK); +#else + int i; if ( GetFont().Ok() ) dc.SetFont(GetFont()); @@ -186,6 +193,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) ) # ifdef __WXMSW__ dc.SetFont(wxNullFont); # endif // MSW +#endif } void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i) diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index b4bf898049..b0c66d6297 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -611,6 +611,7 @@ void wxTreeCtrl::Init() m_oldSelection = (wxGenericTreeItem *)NULL; m_renameTimer = new wxTreeRenameTimer( this ); + m_lastOnSame = FALSE; m_normalFont = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ); m_boldFont = wxFont( m_normalFont.GetPointSize(), @@ -802,7 +803,9 @@ bool wxTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const { wxCHECK_MSG( item.IsOk(), FALSE, wxT("invalid tree item") ); - return !item.m_pItem->GetChildren().IsEmpty(); + // return TRUE if SetItemHasChildren() had been called before (i.e. the + // item has a [+] button) + return item.m_pItem->HasPlus() || !item.m_pItem->GetChildren().IsEmpty(); } bool wxTreeCtrl::IsExpanded(const wxTreeItemId& item) const @@ -987,8 +990,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text, m_current->SetHilight( TRUE ); } - Refresh(); - AdjustMyScrollbars(); + m_dirty = TRUE; return m_anchor; } @@ -1126,6 +1128,8 @@ void wxTreeCtrl::Expand(const wxTreeItemId& itemId) { wxGenericTreeItem *item = itemId.m_pItem; + wxCHECK_RET( item, _T("invalid item in wxTreeCtrl::Expand") ); + if ( !item->HasPlus() ) return; @@ -1136,7 +1140,6 @@ void wxTreeCtrl::Expand(const wxTreeItemId& itemId) event.m_item = item; event.SetEventObject( this ); -// if ( ProcessEvent( event ) && event.m_code ) TODO: Was this a typo ? if ( ProcessEvent( event ) && !event.IsAllowed() ) { // cancelled by program @@ -1152,6 +1155,22 @@ void wxTreeCtrl::Expand(const wxTreeItemId& itemId) ProcessEvent( event ); } +void wxTreeCtrl::ExpandAll(const wxTreeItemId& item) +{ + Expand(item); + if ( IsExpanded(item) ) + { + long cookie; + wxTreeItemId child = GetFirstChild(item, cookie); + while ( child.IsOk() ) + { + ExpandAll(child); + + child = GetNextChild(item, cookie); + } + } +} + void wxTreeCtrl::Collapse(const wxTreeItemId& itemId) { wxGenericTreeItem *item = itemId.m_pItem; @@ -1343,6 +1362,17 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId, if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) return; + + wxTreeItemId parent = GetParent( itemId ); + while (parent.IsOk()) + { + if (!IsExpanded(parent)) + Expand( parent ); + + parent = GetParent( parent ); + } + + EnsureVisible( itemId ); // ctrl press if (unselect_others) @@ -1391,14 +1421,19 @@ void wxTreeCtrl::FillArray(wxGenericTreeItem *item, wxArrayGenericTreeItems& children = item->GetChildren(); size_t count = children.GetCount(); for ( size_t n = 0; n < count; ++n ) - FillArray(children[n],array); + FillArray(children[n], array); } } size_t wxTreeCtrl::GetSelections(wxArrayTreeItemIds &array) const { array.Empty(); - FillArray(GetRootItem().m_pItem, array); + wxTreeItemId idRoot = GetRootItem(); + if ( idRoot.IsOk() ) + { + FillArray(idRoot.m_pItem, array); + } + //else: the tree is empty, so no selections return array.Count(); } @@ -1429,7 +1464,7 @@ void wxTreeCtrl::ScrollTo(const wxTreeItemId &item) // We have to call this here because the label in // question might just have been added and no screen // update taken place. - if (m_dirty) wxYield(); + if (m_dirty) wxYieldIfNeeded(); wxGenericTreeItem *gitem = item.m_pItem; @@ -1638,8 +1673,10 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc) } dc.SetBackgroundMode(wxTRANSPARENT); - dc.DrawText( item->GetText(), image_w + item->GetX(), (wxCoord)item->GetY() - + ((total_h > text_h) ? (total_h - text_h)/2 : 0)); + long extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0; + dc.DrawText( item->GetText(), + (wxCoord)(image_w + item->GetX()), + (wxCoord)(item->GetY() + extraH)); // restore normal font dc.SetFont( m_normalFont ); @@ -1866,7 +1903,7 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event ) // + : Expand // - : Collaspe - // * : Toggle Expand/Collapse + // * : Expand all/Collapse all // ' ' | return : activate // up : go up (not last children!) // down : go down @@ -1884,6 +1921,16 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event ) } break; + case '*': + case WXK_MULTIPLY: + if ( !IsExpanded(m_current) ) + { + // expand all + ExpandAll(m_current); + break; + } + //else: fall through to Collapse() it + case '-': case WXK_SUBTRACT: if (IsExpanded(m_current)) @@ -1892,11 +1939,6 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event ) } break; - case '*': - case WXK_MULTIPLY: - Toggle(m_current); - break; - case ' ': case WXK_RETURN: { @@ -2046,7 +2088,7 @@ wxTreeItemId wxTreeCtrl::HitTest(const wxPoint& point, int& flags) // We have to call this here because the label in // question might just have been added and no screen // update taken place. - if (m_dirty) wxYield(); + if (m_dirty) wxYieldIfNeeded(); wxClientDC dc(this); PrepareDC(dc); @@ -2082,7 +2124,7 @@ void wxTreeCtrl::Edit( const wxTreeItemId& item ) // We have to call this here because the label in // question might just have been added and no screen // update taken place. - if (m_dirty) wxYield(); + if (m_dirty) wxYieldIfNeeded(); wxString s = m_currentEdit->GetText(); int x = m_currentEdit->GetX(); @@ -2144,7 +2186,8 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) // we process left mouse up event (enables in-place edit), right down // (pass to the user code), left dbl click (activate item) and // dragging/moving events for items drag-and-drop - if ( !(event.LeftUp() || + if ( !(event.LeftDown() || + event.LeftUp() || event.RightDown() || event.LeftDClick() || event.Dragging() || @@ -2163,8 +2206,6 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) int flags = 0; wxGenericTreeItem *item = m_anchor->HitTest( wxPoint(x,y), this, flags); - bool onButton = flags & wxTREE_HITTEST_ONITEMBUTTON; - if ( event.Dragging() && !m_isDragging ) { if (m_dragCount == 0) @@ -2225,8 +2266,6 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) // highlight the current drop target if any DrawDropEffect(m_dropTarget); - - wxYield(); } } else if ( (event.LeftUp() || event.RightUp()) && m_isDragging ) @@ -2234,6 +2273,13 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) // erase the highlighting DrawDropEffect(m_dropTarget); + if ( m_oldSelection ) + { + m_oldSelection->SetHilight(TRUE); + RefreshLine(m_oldSelection); + m_oldSelection = (wxGenericTreeItem *)NULL; + } + // generate the drag end event wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG, GetId()); @@ -2246,18 +2292,9 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) m_isDragging = FALSE; m_dropTarget = (wxGenericTreeItem *)NULL; - if ( m_oldSelection ) - { - m_oldSelection->SetHilight(TRUE); - RefreshLine(m_oldSelection); - m_oldSelection = (wxGenericTreeItem *)NULL; - } - ReleaseMouse(); SetCursor(m_oldCursor); - - wxYield(); } else { @@ -2272,17 +2309,49 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, GetId()); nevent.m_item = item; nevent.m_code = 0; + CalcScrolledPosition(x, y, + &nevent.m_pointDrag.x, + &nevent.m_pointDrag.y); nevent.SetEventObject(this); GetEventHandler()->ProcessEvent(nevent); } - else if ( event.LeftUp() && (item == m_current) && - (flags & wxTREE_HITTEST_ONITEMLABEL) && - HasFlag(wxTR_EDIT_LABELS) ) + else if ( event.LeftUp() ) { - m_renameTimer->Start( 100, TRUE ); + if ( m_lastOnSame ) + { + if ( (item == m_current) && + (flags & wxTREE_HITTEST_ONITEMLABEL) && + HasFlag(wxTR_EDIT_LABELS) ) + { + if ( m_renameTimer->IsRunning() ) + m_renameTimer->Stop(); + + m_renameTimer->Start( 100, TRUE ); + } + + m_lastOnSame = FALSE; + } } - else + else // !RightDown() && !LeftUp() ==> LeftDown() || LeftDClick() { + if ( event.LeftDown() ) + { + m_lastOnSame = item == m_current; + } + + if ( flags & wxTREE_HITTEST_ONITEMBUTTON ) + { + // only toggle the item for a single click, double click on + // the button doesn't do anything (it toggles the item twice) + if ( event.LeftDown() ) + { + Toggle( item ); + } + + // don't select the item if the button was clicked + return; + } + // how should the selection work for this event? bool is_multiple, extended_select, unselect_others; EventFlagsToSelType(GetWindowStyleFlag(), @@ -2290,20 +2359,20 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event ) event.ControlDown(), is_multiple, extended_select, unselect_others); - if ( onButton ) - { - Toggle( item ); - if ( is_multiple ) - return; - } - SelectItem(item, unselect_others, extended_select); if ( event.LeftDClick() ) { + // double clicking should not start editing the item label + m_renameTimer->Stop(); + m_lastOnSame = FALSE; + wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() ); nevent.m_item = item; nevent.m_code = 0; + CalcScrolledPosition(x, y, + &nevent.m_pointDrag.x, + &nevent.m_pointDrag.y); nevent.SetEventObject( this ); GetEventHandler()->ProcessEvent( nevent ); } diff --git a/src/generic/treelay.cpp b/src/generic/treelay.cpp index f75f813744..afcbdfa093 100644 --- a/src/generic/treelay.cpp +++ b/src/generic/treelay.cpp @@ -14,19 +14,19 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif #if wxUSE_TREELAYOUT -#include +#include "wx/treelay.h" /* * Abstract tree @@ -99,12 +99,12 @@ void wxTreeLayout::DrawBranches(wxDC& dc) void wxTreeLayout::DrawNode(long id, wxDC& dc) { - char buf[80]; + wxChar buf[80]; wxString name(GetNodeName(id)); - if (name != "") - sprintf(buf, "%s", (const char*) name); + if (name != wxT("")) + wxSprintf(buf, wxT("%s"), (const wxChar*) name); else - sprintf(buf, ""); + wxSprintf(buf, wxT("")); long x = 80; long y = 20; @@ -127,7 +127,7 @@ void wxTreeLayout::Initialize(void) void wxTreeLayout::GetNodeSize(long id, long *x, long *y, wxDC& dc) { wxString name(GetNodeName(id)); - if (name != "") + if (name != wxT("")) dc.GetTextExtent(name, x, y); else { @@ -283,7 +283,7 @@ long wxTreeLayoutStored::AddChild(const wxString& name, const wxString& parent) if (m_num < (m_maxNodes -1 )) { long i = -1; - if (parent != "") + if (parent != wxT("")) i = NameToId(parent); else m_parentNode = m_num; @@ -427,8 +427,6 @@ wxString wxTreeLayoutStored::HitTest(wxMouseEvent& event, wxDC& dc) int i; for (i = 0; i < m_maxNodes; i++) { - wxStoredNode* item = &m_nodes[i]; - long width, height; dc.GetTextExtent(m_nodes[i].m_name, &width, &height); diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index fdd9dc7a8c..cd776451c2 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -32,6 +32,7 @@ #include "wx/dynarray.h" #include "wx/intl.h" #include "wx/statbmp.h" + #include "wx/button.h" #endif //WX_PRECOMP #include "wx/statline.h" @@ -94,10 +95,24 @@ wxWizard::wxWizard(wxWindow *parent, int id, const wxString& title, const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size) - : m_bitmap(bitmap) + const wxPoint& pos) + : m_posWizard(pos), m_bitmap(bitmap) { + // just create the dialog itself here, the controls will be created in + // DoCreateControls() called later when we know our final size + m_page = (wxWizardPage *)NULL; + m_btnPrev = m_btnNext = NULL; + m_statbmp = NULL; + + (void)wxDialog::Create(parent, id, title, pos); +} + +void wxWizard::DoCreateControls() +{ + // do nothing if the controls were already created + if ( WasCreated() ) + return; + // constants defining the dialog layout // ------------------------------------ @@ -122,38 +137,41 @@ wxWizard::wxWizard(wxWindow *parent, static const int DEFAULT_PAGE_WIDTH = 270; static const int DEFAULT_PAGE_HEIGHT = 290; - // init members - // ------------ - - m_page = (wxWizardPage *)NULL; - // create controls // --------------- wxSize sizeBtn = wxButton::GetDefaultSize(); - (void)wxDialog::Create(parent, id, title, pos, size); - // the global dialog layout is: a row of buttons at the bottom (aligned to // the right), the static line above them, the bitmap (if any) on the left // of the upper part of the dialog and the panel in the remaining space m_x = X_MARGIN; m_y = Y_MARGIN; - if ( bitmap.Ok() ) - { - m_statbmp = new wxStaticBitmap(this, -1, bitmap, wxPoint(m_x, m_y)); - m_x += bitmap.GetWidth() + BITMAP_X_MARGIN; - m_height = bitmap.GetHeight(); + int defaultHeight; + if ( m_bitmap.Ok() ) + { + m_statbmp = new wxStaticBitmap(this, -1, m_bitmap, wxPoint(m_x, m_y)); + + m_x += m_bitmap.GetWidth() + BITMAP_X_MARGIN; + + defaultHeight = m_bitmap.GetHeight(); } else { m_statbmp = (wxStaticBitmap *)NULL; - m_height = DEFAULT_PAGE_HEIGHT; + defaultHeight = DEFAULT_PAGE_HEIGHT; } - m_width = DEFAULT_PAGE_WIDTH; + // use default size if none given and also make sure that the dialog is + // not less than the default size + m_height = m_sizePage.y == -1 ? defaultHeight : m_sizePage.y; + m_width = m_sizePage.x == -1 ? DEFAULT_PAGE_WIDTH : m_sizePage.x; + if ( m_height < defaultHeight ) + m_height = defaultHeight; + if ( m_width < DEFAULT_PAGE_WIDTH ) + m_width = DEFAULT_PAGE_WIDTH; int x = X_MARGIN; int y = m_y + m_height + BITMAP_Y_MARGIN; @@ -161,14 +179,14 @@ wxWizard::wxWizard(wxWindow *parent, #if wxUSE_STATLINE (void)new wxStaticLine(this, -1, wxPoint(x, y), wxSize(m_x + m_width - x, 2)); -#endif +#endif // wxUSE_STATLINE x = m_x + m_width - 3*sizeBtn.x - BUTTON_MARGIN; y += SEPARATOR_LINE_MARGIN; - m_btnPrev = new wxButton(this, -1, _("< &Back"), wxPoint(x, y), sizeBtn); + m_btnPrev = new wxButton(this, wxID_BACKWARD, _("< &Back"), wxPoint(x, y), sizeBtn); x += sizeBtn.x; - m_btnNext = new wxButton(this, -1, _("&Next >"), wxPoint(x, y), sizeBtn); + m_btnNext = new wxButton(this, wxID_FORWARD, _("&Next >"), wxPoint(x, y), sizeBtn); x += sizeBtn.x + BUTTON_MARGIN; (void)new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(x, y), sizeBtn); @@ -176,19 +194,24 @@ wxWizard::wxWizard(wxWindow *parent, // position and size the dialog // ---------------------------- - if ( size == wxDefaultSize ) - { - SetClientSize(m_x + m_width + X_MARGIN, - m_y + m_height + BITMAP_Y_MARGIN + - SEPARATOR_LINE_MARGIN + sizeBtn.y + Y_MARGIN); - } + SetClientSize(m_x + m_width + X_MARGIN, + m_y + m_height + BITMAP_Y_MARGIN + + SEPARATOR_LINE_MARGIN + sizeBtn.y + Y_MARGIN); - if ( pos == wxDefaultPosition ) + if ( m_posWizard == wxDefaultPosition ) { CentreOnScreen(); } } +void wxWizard::SetPageSize(const wxSize& size) +{ + // otherwise it will have no effect now as it's too late... + wxASSERT_MSG( !WasCreated(), _T("should be called before RunWizard()!") ); + + m_sizePage = size; +} + bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) { wxASSERT_MSG( page != m_page, wxT("this is useless") ); @@ -202,13 +225,6 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) if ( m_page ) { - // ask the current page first - if ( !m_page->TransferDataFromWindow() ) - { - // the page data is incorrect - return FALSE; - } - // send the event to the old page wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGING, GetId(), goingForward); if ( m_page->GetEventHandler()->ProcessEvent(event) && @@ -278,6 +294,8 @@ bool wxWizard::RunWizard(wxWizardPage *firstPage) { wxCHECK_MSG( firstPage, FALSE, wxT("can't run empty wizard") ); + DoCreateControls(); + // can't return FALSE here because there is no old page (void)ShowPage(firstPage, TRUE /* forward */); @@ -291,6 +309,10 @@ wxWizardPage *wxWizard::GetCurrentPage() const wxSize wxWizard::GetPageSize() const { + // make sure that the controls are created because otherwise m_width and + // m_height would be both still -1 + wxConstCast(this, wxWizard)->DoCreateControls(); + return wxSize(m_width, m_height); } @@ -315,6 +337,15 @@ void wxWizard::OnBackOrNext(wxCommandEvent& event) (event.GetEventObject() == m_btnPrev), wxT("unknown button") ); + // ask the current page first: notice that we do it before calling + // GetNext/Prev() because the data transfered from the controls of the page + // may change the value returned by these methods + if ( m_page && !m_page->TransferDataFromWindow() ) + { + // the page data is incorrect, don't do anything + return; + } + bool forward = event.GetEventObject() == m_btnNext; wxWizardPage *page; @@ -343,9 +374,9 @@ wxWizard *wxWizardBase::Create(wxWindow *parent, const wxString& title, const wxBitmap& bitmap, const wxPoint& pos, - const wxSize& size) + const wxSize& WXUNUSED(size)) { - return new wxWizard(parent, id, title, bitmap, pos, size); + return new wxWizard(parent, id, title, bitmap, pos); } // ---------------------------------------------------------------------------- diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 6369b7d3a7..bd48405b54 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -49,7 +49,8 @@ wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NUL extern bool g_isIdle; -bool g_mainThreadLocked = FALSE; +bool g_mainThreadLocked = FALSE; +gint g_pendingTag = 0; GtkWidget *wxRootWindow = (GtkWidget*) NULL; @@ -59,6 +60,7 @@ GtkWidget *wxRootWindow = (GtkWidget*) NULL; /* forward declaration */ gint wxapp_idle_callback( gpointer WXUNUSED(data) ); +gint wxapp_pending_callback( gpointer WXUNUSED(data) ); void wxapp_install_idle_handler(); #if wxUSE_THREADS @@ -78,27 +80,29 @@ void wxExit() // wxYield //----------------------------------------------------------------------------- +static bool gs_inYield = FALSE; + bool wxYield() { - bool has_idle = (wxTheApp->m_idleTag != 0); +#ifdef __WXDEBUG__ + if (gs_inYield) + wxFAIL_MSG( wxT("wxYield called recursively" ) ); +#endif + + gs_inYield = TRUE; - if (has_idle) + if (!g_isIdle) { - /* We need to temporarily remove idle callbacks or the loop will - never finish. */ + // We need to remove idle callbacks or the loop will + // never finish. gtk_idle_remove( wxTheApp->m_idleTag ); wxTheApp->m_idleTag = 0; + g_isIdle = TRUE; } while (gtk_events_pending()) gtk_main_iteration(); - if (has_idle) - { - /* re-add idle handler (very low priority) */ - wxTheApp->m_idleTag = gtk_idle_add_priority( 500, wxapp_idle_callback, (gpointer) NULL ); - } - // disable log flushing from here because a call to wxYield() shouldn't // normally result in message boxes popping up &c wxLog::Suspend(); @@ -106,15 +110,29 @@ bool wxYield() /* it's necessary to call ProcessIdle() to update the frames sizes which might have been changed (it also will update other things set from OnUpdateUI() which is a nice (and desired) side effect) */ - while (wxTheApp->ProcessIdle()) - ; + while (wxTheApp->ProcessIdle()) { } // let the logs be flashed again wxLog::Resume(); + gs_inYield = FALSE; + return TRUE; } +//----------------------------------------------------------------------------- +// wxYieldIfNeeded +// Like wxYield, but fails silently if the yield is recursive. +//----------------------------------------------------------------------------- + +bool wxYieldIfNeeded() +{ + if (gs_inYield) + return FALSE; + + return wxYield(); +} + //----------------------------------------------------------------------------- // wxWakeUpIdle //----------------------------------------------------------------------------- @@ -139,55 +157,89 @@ void wxWakeUpIdle() // local functions //----------------------------------------------------------------------------- -gint wxapp_idle_callback( gpointer WXUNUSED(data) ) +gint wxapp_pending_callback( gpointer WXUNUSED(data) ) { if (!wxTheApp) return TRUE; - + // when getting called from GDK's time-out handler // we are no longer within GDK's grab on the GUI // thread so we must lock it here ourselves gdk_threads_enter(); - /* we don't want any more idle events until the next event is - sent to wxGTK */ - gtk_idle_remove( wxTheApp->m_idleTag ); - wxTheApp->m_idleTag = 0; + // Sent idle event to all who request them + wxTheApp->ProcessPendingEvents(); - /* indicate that we are now in idle mode - even so deeply + g_pendingTag = 0; + + // flush the logged messages if any +#if wxUSE_LOG + wxLog::FlushActive(); +#endif // wxUSE_LOG + + // Release lock again + gdk_threads_leave(); + + // Return FALSE to indicate that no more idle events are + // to be sent (single shot instead of continuous stream) + return FALSE; +} + +gint wxapp_idle_callback( gpointer WXUNUSED(data) ) +{ + if (!wxTheApp) return TRUE; + + // when getting called from GDK's time-out handler + // we are no longer within GDK's grab on the GUI + // thread so we must lock it here ourselves + gdk_threads_enter(); + + /* Indicate that we are now in idle mode - even so deeply in idle mode that we don't get any idle events anymore. this is like wxMSW where an idle event is sent only once each time after the event queue has been completely emptied */ g_isIdle = TRUE; + wxTheApp->m_idleTag = 0; - /* sent idle event to all who request them */ + // Sent idle event to all who request them while (wxTheApp->ProcessIdle()) { } - // release lock again + // Release lock again gdk_threads_leave(); - return TRUE; + // Return FALSE to indicate that no more idle events are + // to be sent (single shot instead of continuous stream) + return FALSE; } void wxapp_install_idle_handler() { wxASSERT_MSG( wxTheApp->m_idleTag == 0, wxT("attempt to install idle handler twice") ); + g_isIdle = FALSE; + + if (g_pendingTag == 0) + g_pendingTag = gtk_idle_add_priority( 900, wxapp_pending_callback, (gpointer) NULL ); + /* This routine gets called by all event handlers indicating that the idle is over. It may also get called from other thread for sending events to the main thread (and processing these in idle time). Very low priority. */ - wxTheApp->m_idleTag = gtk_idle_add_priority( 500, wxapp_idle_callback, (gpointer) NULL ); - - g_isIdle = FALSE; + wxTheApp->m_idleTag = gtk_idle_add_priority( 1000, wxapp_idle_callback, (gpointer) NULL ); } #if wxUSE_THREADS +static int g_threadUninstallLevel = 0; + void wxapp_install_thread_wakeup() { + g_threadUninstallLevel++; + + if (g_threadUninstallLevel != 1) return; + if (wxTheApp->m_wakeUpTimerTag) return; wxTheApp->m_wakeUpTimerTag = gtk_timeout_add( 50, wxapp_wakeup_timerout_callback, (gpointer) NULL ); @@ -195,6 +247,10 @@ void wxapp_install_thread_wakeup() void wxapp_uninstall_thread_wakeup() { + g_threadUninstallLevel--; + + if (g_threadUninstallLevel != 0) return; + if (!wxTheApp->m_wakeUpTimerTag) return; gtk_timeout_remove( wxTheApp->m_wakeUpTimerTag ); @@ -250,7 +306,8 @@ wxApp::wxApp() m_topWindow = (wxWindow *) NULL; m_exitOnFrameDelete = TRUE; - m_idleTag = gtk_idle_add_priority( 500, wxapp_idle_callback, (gpointer) NULL ); + m_idleTag = 0; + wxapp_install_idle_handler(); #if wxUSE_THREADS m_wakeUpTimerTag = 0; @@ -365,31 +422,26 @@ void wxApp::OnIdle( wxIdleEvent &event ) { static bool s_inOnIdle = FALSE; - /* Avoid recursion (via ProcessEvent default case) */ + // Avoid recursion (via ProcessEvent default case) if (s_inOnIdle) return; s_inOnIdle = TRUE; - /* Resend in the main thread events which have been prepared in other - threads */ + // Resend in the main thread events which have been prepared in other + // threads ProcessPendingEvents(); - /* 'Garbage' collection of windows deleted with Close(). */ + // 'Garbage' collection of windows deleted with Close(). DeletePendingObjects(); - /* Send OnIdle events to all windows */ + // Send OnIdle events to all windows bool needMore = SendIdleEvents(); if (needMore) event.RequestMore(TRUE); s_inOnIdle = FALSE; - - /* flush the logged messages if any */ -#if wxUSE_LOG - wxLog::FlushActive(); -#endif // wxUSE_LOG } bool wxApp::SendIdleEvents() @@ -415,7 +467,7 @@ bool wxApp::SendIdleEvents( wxWindow* win ) wxIdleEvent event; event.SetEventObject(win); - win->ProcessEvent(event); + win->GetEventHandler()->ProcessEvent(event); win->OnInternalIdle(); diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 38d20c606c..ed3595f860 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -20,6 +20,16 @@ #include #include +extern void gdk_wx_draw_bitmap (GdkDrawable *drawable, + GdkGC *gc, + GdkDrawable *src, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height); + //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- @@ -100,14 +110,14 @@ bool wxMask::Create( const wxBitmap& bitmap, if (bpp == 15) { red = red & 0xf8; - blue = blue & 0xf8; green = green & 0xf8; + blue = blue & 0xf8; } if (bpp == 16) { red = red & 0xf8; - blue = blue & 0xfc; - green = green & 0xf8; + green = green & 0xfc; + blue = blue & 0xf8; } color.red = 0; @@ -180,7 +190,7 @@ bool wxMask::Create( const wxBitmap& bitmap ) GdkGC *gc = gdk_gc_new( m_bitmap ); - gdk_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() ); + gdk_wx_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() ); gdk_gc_unref( gc ); @@ -351,12 +361,12 @@ wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) return *this; } -bool wxBitmap::operator == ( const wxBitmap& bmp ) +bool wxBitmap::operator == ( const wxBitmap& bmp ) const { return m_refData == bmp.m_refData; } -bool wxBitmap::operator != ( const wxBitmap& bmp ) +bool wxBitmap::operator != ( const wxBitmap& bmp ) const { return m_refData != bmp.m_refData; } @@ -422,7 +432,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const else { GdkGC *gc = gdk_gc_new( ret.GetBitmap() ); - gdk_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height ); + gdk_wx_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height ); gdk_gc_destroy( gc ); } @@ -432,7 +442,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const mask->m_bitmap = gdk_pixmap_new( wxRootWindow->window, rect.width, rect.height, 1 ); GdkGC *gc = gdk_gc_new( mask->m_bitmap ); - gdk_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height ); + gdk_wx_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height ); gdk_gc_destroy( gc ); ret.SetMask( mask ); diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp index 32ac3f8575..3588771f0f 100644 --- a/src/gtk/bmpbuttn.cpp +++ b/src/gtk/bmpbuttn.cpp @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp +// Name: gtk/bmpbuttn.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -43,12 +43,12 @@ extern bool g_blockEventsOnDrag; static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitmapButton *button ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - + wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); event.SetEventObject(button); button->GetEventHandler()->ProcessEvent(event); @@ -63,7 +63,7 @@ static void gtk_bmpbutton_enter_callback( GtkWidget *WXUNUSED(widget), wxBitmapB if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->HasFocus(); + button->HasFocus(); } //----------------------------------------------------------------------------- @@ -75,7 +75,7 @@ static void gtk_bmpbutton_leave_callback( GtkWidget *WXUNUSED(widget), wxBitmapB if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->NotFocus(); + button->NotFocus(); } //----------------------------------------------------------------------------- @@ -87,7 +87,7 @@ static void gtk_bmpbutton_press_callback( GtkWidget *WXUNUSED(widget), wxBitmapB if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->StartSelect(); + button->StartSelect(); } //----------------------------------------------------------------------------- @@ -99,7 +99,7 @@ static void gtk_bmpbutton_release_callback( GtkWidget *WXUNUSED(widget), wxBitma if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->EndSelect(); + button->EndSelect(); } //----------------------------------------------------------------------------- @@ -113,29 +113,30 @@ wxBitmapButton::wxBitmapButton() } bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, + const wxPoint &pos, const wxSize &size, long style, const wxValidator& validator, const wxString &name ) { m_needParent = TRUE; m_acceptsFocus = TRUE; - + + m_marginX = + m_marginY = 0; + if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxBitmapButton creation failed") ); - return FALSE; + return FALSE; } m_bitmap = bitmap; m_disabled = bitmap; m_focus = bitmap; m_selected = bitmap; - - m_label = ""; - + m_widget = gtk_button_new(); -#if (GTK_MINOR_VERSION > 0) +#if (GTK_MINOR_VERSION > 0) if (style & wxNO_BORDER) gtk_button_set_relief( GTK_BUTTON(m_widget), GTK_RELIEF_NONE ); #endif @@ -143,49 +144,41 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi if (m_bitmap.Ok()) { wxSize newSize = size; - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); - - gtk_widget_show( pixmap ); - gtk_container_add( GTK_CONTAINER(m_widget), pixmap ); - - int border = 10; - if (style & wxNO_BORDER) border = 4; + int border = (style & wxNO_BORDER) ? 4 : 10; if (newSize.x == -1) newSize.x = m_bitmap.GetWidth()+border; if (newSize.y == -1) newSize.y = m_bitmap.GetHeight()+border; SetSize( newSize.x, newSize.y ); + SetBitmap(); } - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", + + gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", GTK_SIGNAL_FUNC(gtk_bmpbutton_clicked_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "enter", + gtk_signal_connect( GTK_OBJECT(m_widget), "enter", GTK_SIGNAL_FUNC(gtk_bmpbutton_enter_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "leave", + gtk_signal_connect( GTK_OBJECT(m_widget), "leave", GTK_SIGNAL_FUNC(gtk_bmpbutton_leave_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "pressed", + gtk_signal_connect( GTK_OBJECT(m_widget), "pressed", GTK_SIGNAL_FUNC(gtk_bmpbutton_press_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "released", + gtk_signal_connect( GTK_OBJECT(m_widget), "released", GTK_SIGNAL_FUNC(gtk_bmpbutton_release_callback), (gpointer*)this ); - + m_parent->DoAddChild( this ); - + PostCreation(); - + SetBackgroundColour( parent->GetBackgroundColour() ); Show( TRUE ); - + return TRUE; } - + void wxBitmapButton::SetDefault() { GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); gtk_widget_grab_default( m_widget ); - + SetSize( m_x, m_y, m_width, m_height ); } @@ -205,6 +198,9 @@ wxString wxBitmapButton::GetLabel() const void wxBitmapButton::ApplyWidgetStyle() { + if (GTK_BUTTON(m_widget)->child == NULL) return; + + wxButton::ApplyWidgetStyle(); } void wxBitmapButton::SetBitmap() @@ -212,51 +208,46 @@ void wxBitmapButton::SetBitmap() wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); wxBitmap the_one; - - if (!m_isEnabled) + if (!m_isEnabled) the_one = m_disabled; - else - { - if (m_isSelected) - { - the_one = m_selected; - } - else - { - if (m_hasFocus) - the_one = m_focus; - else - the_one = m_bitmap; - } - } + else if (m_isSelected) + the_one = m_selected; + else if (m_hasFocus) + the_one = m_focus; + else + the_one = m_bitmap; if (!the_one.Ok()) the_one = m_bitmap; if (!the_one.Ok()) return; - - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child ); - + GdkBitmap *mask = (GdkBitmap *) NULL; if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap(); - - gtk_pixmap_set( g_pixmap, the_one.GetPixmap(), mask ); + + GtkButton *bin = GTK_BUTTON(m_widget); + if (bin->child == NULL) + { // initial bitmap + GtkWidget *pixmap = gtk_pixmap_new(the_one.GetPixmap(), mask); + gtk_widget_show(pixmap); + gtk_container_add(GTK_CONTAINER(m_widget), pixmap); + } + else + { // subsequent bitmaps + GtkPixmap *g_pixmap = GTK_PIXMAP(bin->child); + gtk_pixmap_set(g_pixmap, the_one.GetPixmap(), mask); + } } -void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap ) +void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); + if (!bitmap.Ok()) return; + m_disabled = bitmap; - if ( ! m_disabled.Ok() ) return; - m_disabled = bitmap; - - SetBitmap(); + SetBitmap(); } -void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) +void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); - - if ( ! m_focus.Ok() ) return; + if (!bitmap.Ok()) return; m_focus = bitmap; SetBitmap(); @@ -264,19 +255,15 @@ void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); - - if (!m_bitmap.Ok()) return; + if (!bitmap.Ok()) return; m_bitmap = bitmap; - + SetBitmap(); } void wxBitmapButton::SetBitmapSelected( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); - - if ( ! m_selected.Ok() ) return; + if (!bitmap.Ok()) return; m_selected = bitmap; SetBitmap(); @@ -315,5 +302,6 @@ void wxBitmapButton::EndSelect() m_isSelected = FALSE; SetBitmap(); } -#endif + +#endif // wxUSE_BMPBUTTON diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index b58261b95c..70a2790e4a 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -96,12 +96,12 @@ wxBrush& wxBrush::operator = ( const wxBrush& brush ) return *this; } -bool wxBrush::operator == ( const wxBrush& brush ) +bool wxBrush::operator == ( const wxBrush& brush ) const { return m_refData == brush.m_refData; } -bool wxBrush::operator != ( const wxBrush& brush ) +bool wxBrush::operator != ( const wxBrush& brush ) const { return m_refData != brush.m_refData; } diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 4fd565e8dc..1621bbe03e 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -103,7 +103,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, */ m_widget = gtk_button_new_with_label(""); - + SetLabel( label ); #if (GTK_MINOR_VERSION > 0) @@ -182,6 +182,7 @@ void wxButton::ApplyWidgetStyle() wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); + ret.x += 6; if (ret.x < 80) ret.x = 80; return ret; } diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index bfd34502bd..3188efb475 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -212,7 +212,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event ) /* the clipboard is no longer in our hands. we can the delete clipboard data. */ if (wxTheClipboard->m_data) { - wxLogDebug( wxT("wxClipboard will get cleared" ) ); + wxLogTrace(TRACE_CLIPBOARD, wxT("wxClipboard will get cleared" )); delete wxTheClipboard->m_data; wxTheClipboard->m_data = (wxDataObject*) NULL; @@ -590,7 +590,8 @@ bool wxClipboard::GetData( wxDataObject& data ) m_waiting = TRUE; - wxLogDebug( wxT("wxClipboard::GetData: format found, start convert") ); + wxLogTrace( TRACE_CLIPBOARD, + wxT("wxClipboard::GetData: format found, start convert") ); gtk_selection_convert( m_clipboardWidget, m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY @@ -608,7 +609,8 @@ bool wxClipboard::GetData( wxDataObject& data ) return TRUE; } - wxLogDebug( wxT("wxClipboard::GetData: format not found") ); + wxLogTrace( TRACE_CLIPBOARD, + wxT("wxClipboard::GetData: format not found") ); /* return failure */ delete[] array; diff --git a/src/gtk/colour.cpp b/src/gtk/colour.cpp index db73e73343..60fec81d01 100644 --- a/src/gtk/colour.cpp +++ b/src/gtk/colour.cpp @@ -23,17 +23,39 @@ class wxColourRefData: public wxObjectRefData { - public: - +public: wxColourRefData(); ~wxColourRefData(); + void FreeColour(); + void AllocColour( GdkColormap* cmap ); + +private: + friend class wxColour; GdkColor m_color; GdkColormap *m_colormap; bool m_hasPixel; + + // reference counter for systems with <= 8-Bit display + static gushort colMapAllocCounter[ 256 ]; +}; - friend wxColour; +gushort wxColourRefData::colMapAllocCounter[ 256 ] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; wxColourRefData::wxColourRefData() @@ -53,7 +75,41 @@ wxColourRefData::~wxColourRefData() void wxColourRefData::FreeColour() { -// if (m_hasPixel) gdk_colors_free( m_colormap, &m_color, 1, 0 ); + if (m_colormap) + { + GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) m_colormap; + if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || + (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) + { + int idx = m_color.pixel; + colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] - 1; + + if (colMapAllocCounter[ idx ] == 0) + gdk_colormap_free_colors( m_colormap, &m_color, 1 ); + } + } +} + +void wxColourRefData::AllocColour( GdkColormap *cmap ) +{ + if (m_hasPixel && (m_colormap == cmap)) + return; + + FreeColour(); + + GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; + if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || + (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) + { + m_hasPixel = gdk_colormap_alloc_color( cmap, &m_color, FALSE, TRUE ); + int idx = m_color.pixel; + colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] + 1; + } + else + { + m_hasPixel = gdk_color_alloc( cmap, &m_color ); + } + m_colormap = cmap; } //----------------------------------------------------------------------------- @@ -133,7 +189,7 @@ bool wxColour::operator == ( const wxColour& col ) const bool wxColour::operator != ( const wxColour& col) const { - return m_refData != col.m_refData; + return !(*this == col); } void wxColour::Set( unsigned char red, unsigned char green, unsigned char blue ) @@ -176,36 +232,7 @@ void wxColour::CalcPixel( GdkColormap *cmap ) { if (!Ok()) return; - if ((M_COLDATA->m_hasPixel) && (M_COLDATA->m_colormap == cmap)) return; - - M_COLDATA->FreeColour(); - - GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; - if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || - (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) - { - GdkColor *colors = cmap->colors; - int max = 3 * (65536); - int index = -1; - - for (int i = 0; i < cmap->size; i++) - { - int rdiff = (M_COLDATA->m_color.red - colors[i].red); - int gdiff = (M_COLDATA->m_color.green - colors[i].green); - int bdiff = (M_COLDATA->m_color.blue - colors[i].blue); - int sum = ABS (rdiff) + ABS (gdiff) + ABS (bdiff); - if (sum < max) { index = i; max = sum; } - } - - M_COLDATA->m_hasPixel = TRUE; - M_COLDATA->m_color.pixel = index; - } - else - { - M_COLDATA->m_hasPixel = gdk_color_alloc( cmap, &M_COLDATA->m_color ); - } - - M_COLDATA->m_colormap = cmap; + M_COLDATA->AllocColour( cmap ); } int wxColour::GetPixel() const @@ -222,4 +249,3 @@ GdkColor *wxColour::GetColor() const return &M_COLDATA->m_color; } - diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 40e9370a10..55d5ee20e2 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -111,7 +111,11 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, m_widget = gtk_combo_new(); // make it more useable - gtk_combo_set_use_arrows_always(GTK_COMBO(m_widget), TRUE); + gtk_combo_set_use_arrows_always( GTK_COMBO(m_widget), TRUE ); + + // and case-sensitive + gtk_combo_set_case_sensitive( GTK_COMBO(m_widget), TRUE ); + GtkWidget *list = GTK_COMBO(m_widget)->list; @@ -157,7 +161,12 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, if (new_size.y > size_best.y) new_size.y = size_best.y; if ((new_size.x != size.x) || (new_size.y != size.y)) + { SetSize( new_size.x, new_size.y ); + + // This is required for tool bar support + gtk_widget_set_usize( m_widget, new_size.x, new_size.y ); + } SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOW ) ); SetForegroundColour( parent->GetForegroundColour() ); @@ -266,7 +275,7 @@ wxClientData* wxComboBox::GetClientObject( int n ) { wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") ); - wxNode *node = m_clientDataList.Nth( n ); + wxNode *node = m_clientObjectList.Nth( n ); if (!node) return (wxClientData*) NULL; return (wxClientData*) node->Data(); @@ -577,6 +586,7 @@ void wxComboBox::OnChar( wxKeyEvent &event ) if ( FindString(value) == wxNOT_FOUND ) { Append(value); + SetStringSelection(value); // and generate the selected event for it wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() ); diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 80f7c26d60..ab354921ed 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -14,6 +14,7 @@ #include "wx/cursor.h" #include "wx/utils.h" +#include "wx/app.h" #include @@ -155,6 +156,16 @@ extern wxCursor g_globalCursor; static wxCursor gs_savedCursor; static int gs_busyCount = 0; +const wxCursor &wxBusyCursor::GetStoredCursor() +{ + return gs_savedCursor; +} + +const wxCursor wxBusyCursor::GetBusyCursor() +{ + return wxCursor(wxCURSOR_WATCH); +} + void wxEndBusyCursor() { if (--gs_busyCount > 0) @@ -163,7 +174,8 @@ void wxEndBusyCursor() wxSetCursor( gs_savedCursor ); gs_savedCursor = wxNullCursor; - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) @@ -178,7 +190,8 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) wxSetCursor( wxCursor(wxCURSOR_WATCH) ); - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } bool wxIsBusy() diff --git a/src/gtk/data.cpp b/src/gtk/data.cpp index abf1e939c0..dc6b6523a8 100644 --- a/src/gtk/data.cpp +++ b/src/gtk/data.cpp @@ -54,12 +54,6 @@ bool g_isIdle = FALSE; /* Message Strings for Internationalization */ char **wx_msg_str = (char**)NULL; -/* Custom OS version, as optionally placed in wx.ini/.wxrc - * Currently this can be Win95, Windows, Win32s, WinNT. - * For some systems, you can't tell until run-time what services you - * have. See wxGetOsVersion, which uses this string if present. */ -char *wxOsVersion = (char *) NULL; - /* For printing several pages */ int wxPageNumber; diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index d96bfe8a6d..3e9e7584f9 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -42,6 +42,10 @@ #include "cross.xbm" #define num_hatches 6 +#define IS_15_PIX_HATCH(s) ((s)==wxCROSSDIAG_HATCH || (s)==wxHORIZONTAL_HATCH || (s)==wxVERTICAL_HATCH) +#define IS_16_PIX_HATCH(s) ((s)!=wxCROSSDIAG_HATCH && (s)!=wxHORIZONTAL_HATCH && (s)!=wxVERTICAL_HATCH) + + static GdkPixmap *hatches[num_hatches]; static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL; @@ -68,7 +72,7 @@ static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } #include "gdk/gdkprivate.h" -void gdk_draw_bitmap (GdkDrawable *drawable, +void gdk_wx_draw_bitmap (GdkDrawable *drawable, GdkGC *gc, GdkDrawable *src, gint xsrc, @@ -122,7 +126,11 @@ enum wxPoolGCType wxTEXT_COLOUR, wxBG_COLOUR, wxPEN_COLOUR, - wxBRUSH_COLOUR + wxBRUSH_COLOUR, + wxTEXT_SCREEN, + wxBG_SCREEN, + wxPEN_SCREEN, + wxBRUSH_SCREEN }; struct wxGC @@ -267,6 +275,14 @@ void wxWindowDC::SetUpDC() wxASSERT_MSG( !m_penGC, wxT("GCs already created") ); + if (m_isScreenDC) + { + m_penGC = wxGetPoolGC( m_window, wxPEN_SCREEN ); + m_brushGC = wxGetPoolGC( m_window, wxBRUSH_SCREEN ); + m_textGC = wxGetPoolGC( m_window, wxTEXT_SCREEN ); + m_bgGC = wxGetPoolGC( m_window, wxBG_SCREEN ); + } + else if (m_isMemDC && (((wxMemoryDC*)this)->m_selected.GetDepth() == 1)) { m_penGC = wxGetPoolGC( m_window, wxPEN_MONO ); @@ -445,6 +461,18 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, gdk_draw_arc( m_window, m_textGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, @@ -460,7 +488,12 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, } if (m_pen.GetStyle() != wxTRANSPARENT) + { gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); + + gdk_draw_line( m_window, m_penGC, xx1, yy1, xxc, yyc ); + gdk_draw_line( m_window, m_penGC, xxc, yyc, xx2, yy2 ); + } } CalcBoundingBox (x1, y1); @@ -483,7 +516,7 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord if (m_window) { wxCoord start = wxCoord(sa * 64.0); - wxCoord end = wxCoord(ea * 64.0); + wxCoord end = wxCoord((ea-sa) * 64.0); if (m_brush.GetStyle() != wxTRANSPARENT) { @@ -495,6 +528,18 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord gdk_draw_arc( m_window, m_textGC, TRUE, xx, yy, ww, hh, start, end ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, start, end ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, start, end ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, @@ -578,6 +623,18 @@ void wxWindowDC::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoor gdk_draw_polygon( m_window, m_textGC, TRUE, gdkpoints, n ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_polygon( m_window, m_brushGC, TRUE, gdkpoints, n ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_polygon( m_window, m_brushGC, TRUE, gdkpoints, n ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, @@ -635,8 +692,20 @@ void wxWindowDC::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord h m_deviceOriginY % m_brush.GetStipple()->GetHeight() ); gdk_draw_rectangle( m_window, m_textGC, TRUE, xx, yy, ww, hh ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); - } - else if (m_brush.GetStyle() == wxSTIPPLE) + } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -716,8 +785,30 @@ void wxWindowDC::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wx gdk_draw_arc( m_window, m_textGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); gdk_draw_arc( m_window, m_textGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); - } - else if (m_brush.GetStyle() == wxSTIPPLE) + } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx+rr, yy, ww-dd+1, hh ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy+rr, ww, hh-dd+1 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, dd, dd, 90*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx+rr, yy, ww-dd+1, hh ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy+rr, ww, hh-dd+1 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, dd, dd, 90*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -743,10 +834,10 @@ void wxWindowDC::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wx if (m_pen.GetStyle() != wxTRANSPARENT) { - gdk_draw_line( m_window, m_penGC, xx+rr, yy, xx+ww-rr, yy ); - gdk_draw_line( m_window, m_penGC, xx+rr, yy+hh, xx+ww-rr, yy+hh ); - gdk_draw_line( m_window, m_penGC, xx, yy+rr, xx, yy+hh-rr ); - gdk_draw_line( m_window, m_penGC, xx+ww, yy+rr, xx+ww, yy+hh-rr ); + gdk_draw_line( m_window, m_penGC, xx+rr+1, yy, xx+ww-rr, yy ); + gdk_draw_line( m_window, m_penGC, xx+rr+1, yy+hh, xx+ww-rr, yy+hh ); + gdk_draw_line( m_window, m_penGC, xx, yy+rr+1, xx, yy+hh-rr ); + gdk_draw_line( m_window, m_penGC, xx+ww, yy+rr+1, xx+ww, yy+hh-rr ); gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, dd, dd, 90*64, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); @@ -783,8 +874,20 @@ void wxWindowDC::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord hei m_deviceOriginY % m_brush.GetStipple()->GetHeight() ); gdk_draw_arc( m_window, m_textGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); - } - else if (m_brush.GetStyle() == wxSTIPPLE) + } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -912,7 +1015,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, /* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For drawing a mono-bitmap (XBitmap) we use the current text GC */ if (is_mono) - gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 ); + gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 ); else gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), 0, 0, xx, yy, -1, -1 ); @@ -1098,7 +1201,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he drawing a mono-bitmap (XBitmap) we use the current text GC */ if (is_mono) - gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh ); + gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh ); else gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), xsrc, ysrc, xx, yy, ww, hh ); @@ -1284,8 +1387,8 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, for ( wxCoord srcY = 0; srcY < h; srcY++ ) { // transform source coords to dest coords - double r = sqrt(srcX*srcX + srcY*srcY); - double angleOrig = atan2(srcY, srcX) - rad; + double r = sqrt((double)srcX*srcX + srcY*srcY); + double angleOrig = atan2((double)srcY, (double)srcX) - rad; wxCoord dstX = (wxCoord)(r*cos(angleOrig) + 0.5), dstY = (wxCoord)(r*sin(angleOrig) + 0.5); diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 33bceb74e8..25f2982814 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -126,7 +126,7 @@ gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *e so we do this directly after realization */ static gint -gtk_dialog_realized_callback( GtkWidget *widget, wxDialog *win ) +gtk_dialog_realized_callback( GtkWidget * WXUNUSED(widget), wxDialog *win ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -231,7 +231,6 @@ void wxDialog::Init() m_returnCode = 0; m_sizeSet = FALSE; m_modalShowing = FALSE; - m_isFrame = TRUE; } wxDialog::wxDialog( wxWindow *parent, @@ -293,7 +292,7 @@ bool wxDialog::Create( wxWindow *parent, if ((m_x != -1) || (m_y != -1)) gtk_widget_set_uposition( m_widget, m_x, m_y ); gtk_widget_set_usize( m_widget, m_width, m_height ); - + /* we cannot set MWM hints before the widget has been realized, so we do this directly after realization */ gtk_signal_connect( GTK_OBJECT(m_widget), "realize", @@ -315,14 +314,7 @@ bool wxDialog::Create( wxWindow *parent, wxDialog::~wxDialog() { - m_isBeingDeleted = TRUE; - - wxTopLevelWindows.DeleteObject( this ); - - if (wxTheApp->GetTopWindow() == this) - { - wxTheApp->SetTopWindow( (wxWindow*) NULL ); - } + CleanUp(); if ((wxTopLevelWindows.Number() == 0) && (wxTheApp->GetExitOnFrameDelete())) @@ -334,13 +326,12 @@ wxDialog::~wxDialog() void wxDialog::SetTitle( const wxString& title ) { m_title = title; - if (m_title.IsNull()) m_title = wxT(""); gtk_window_set_title( GTK_WINDOW(m_widget), m_title.mbc_str() ); } wxString wxDialog::GetTitle() const { - return (wxString&)m_title; + return m_title; } void wxDialog::OnApply( wxCommandEvent &WXUNUSED(event) ) @@ -372,7 +363,7 @@ void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) ) else { SetReturnCode(wxID_OK); - this->Show(FALSE); + Show(FALSE); } } } @@ -413,11 +404,31 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) bool wxDialog::Destroy() { - if (!wxPendingDelete.Member(this)) wxPendingDelete.Append(this); + // schedule the dialog for the deletion + if ( !wxPendingDelete.Member(this) ) + { + wxPendingDelete.Append(this); + } + + // don't leave a dangling pointer as the app top window, we can be deleted + // any moment at all now! + CleanUp(); return TRUE; } +void wxDialog::CleanUp() +{ + m_isBeingDeleted = TRUE; + + if ( wxTheApp->GetTopWindow() == this ) + { + wxTheApp->SetTopWindow( (wxWindow*) NULL ); + } + + wxTopLevelWindows.DeleteObject( this ); +} + void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) ) { wxASSERT_MSG( (m_widget != NULL), wxT("invalid dialog") ); @@ -457,7 +468,7 @@ void wxDialog::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width { wxFAIL_MSG( wxT("DoMoveWindow called for wxDialog") ); } - + void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { wxASSERT_MSG( (m_widget != NULL), wxT("invalid dialog") ); @@ -552,7 +563,7 @@ void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int heigh geom.min_height = m_minHeight; geom.max_width = m_maxWidth; geom.max_height = m_maxHeight; - gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), + gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), (GtkWidget*) NULL, &geom, (GdkWindowHints) flag ); @@ -620,6 +631,16 @@ int wxDialog::ShowModal() return GetReturnCode(); } + if ( !GetParent() ) + { + wxWindow *parent = wxTheApp->GetTopWindow(); + if ( parent && parent != this ) + { + m_parent = parent; + gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(parent->m_widget) ); + } + } + wxBusyCursorSuspender cs; // temporarily suppress the busy cursor Show( TRUE ); diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index 272530603b..636633b6ac 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -99,6 +99,13 @@ static char * page_xpm[] = { " ......................... "}; +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the trace mask we use with wxLogTrace() - call +// wxLog::AddTraceMask(TRACE_DND) to enable the trace messages from here +static const wxChar *TRACE_DND = _T("dnd"); // ---------------------------------------------------------------------------- // "drag_leave" @@ -226,11 +233,16 @@ static gboolean target_drag_drop( GtkWidget *widget, if (context->suggested_action == GDK_ACTION_COPY) result = wxDragCopy; */ + /* reset the block here as someone might very well + show a dialog as a reaction to a drop and this + wouldn't work without events */ + g_blockEventsOnDrag = FALSE; + bool ret = drop_target->OnDrop( x, y ); if (!ret) { - wxLogDebug( wxT( "Drop target: OnDrop returned FALSE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnDrop returned FALSE") ); /* cancel the whole thing */ gtk_drag_finish( context, @@ -240,7 +252,7 @@ static gboolean target_drag_drop( GtkWidget *widget, } else { - wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnDrop returned TRUE") ); #if wxUSE_THREADS /* disable GUI threads */ @@ -306,7 +318,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), return; } - wxLogDebug( wxT( "Drop target: data received event") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: data received event") ); /* inform the wxDropTarget about the current GtkSelectionData. this is only valid for the duration of this call */ @@ -320,14 +332,14 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), if ( wxIsDragResultOk( drop_target->OnData( x, y, result ) ) ) { - wxLogDebug( wxT( "Drop target: OnData returned TRUE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnData returned TRUE") ); /* tell GTK that data transfer was successfull */ gtk_drag_finish( context, TRUE, FALSE, time ); } else { - wxLogDebug( wxT( "Drop target: OnData returned FALSE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnData returned FALSE") ); /* tell GTK that data transfer was not successfull */ gtk_drag_finish( context, FALSE, FALSE, time ); @@ -401,7 +413,7 @@ GdkAtom wxDropTarget::GetMatchingPair() wxDataFormat format( formatAtom ); #ifdef __WXDEBUG__ - wxLogDebug( wxT("Drop target: drag has format: %s"), format.GetId().c_str() ); + wxLogTrace( TRACE_DND, wxT("Drop target: drag has format: %s"), format.GetId().c_str() ); #endif // Debug if (m_dataObject->IsSupportedFormat( format )) @@ -499,27 +511,27 @@ source_drag_data_get (GtkWidget *WXUNUSED(widget), wxDataFormat format( selection_data->target ); - wxLogDebug( wxT("Drop source: format requested: %s"), format.GetId().c_str() ); - + wxLogTrace( TRACE_DND, wxT("Drop source: format requested: %s"), format.GetId().c_str() ); + drop_source->m_retValue = wxDragCancel; wxDataObject *data = drop_source->GetDataObject(); - + if (!data) { - wxLogDebug( wxT("Drop source: no data object") ); + wxLogTrace( TRACE_DND, wxT("Drop source: no data object") ); return; } if (!data->IsSupportedFormat(format)) { - wxLogDebug( wxT("Drop source: unsupported format") ); + wxLogTrace( TRACE_DND, wxT("Drop source: unsupported format") ); return; } if (data->GetDataSize(format) == 0) { - wxLogDebug( wxT("Drop source: empty data") ); + wxLogTrace( TRACE_DND, wxT("Drop source: empty data") ); return; } @@ -562,7 +574,7 @@ static void source_drag_data_delete( GtkWidget *WXUNUSED(widget), GdkDragContext *WXUNUSED(context), wxDropSource *WXUNUSED(drop_source) ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); // printf( "Drag source: drag_data_delete\n" ); @@ -576,7 +588,7 @@ static void source_drag_begin( GtkWidget *WXUNUSED(widget), GdkDragContext *WXUNUSED(context), wxDropSource *WXUNUSED(drop_source) ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); // printf( "Drag source: drag_begin.\n" ); @@ -620,7 +632,10 @@ gtk_dnd_window_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigur // wxDropSource //--------------------------------------------------------------------------- -wxDropSource::wxDropSource( wxWindow *win, const wxIcon &icon ) +wxDropSource::wxDropSource(wxWindow *win, + const wxIcon &iconCopy, + const wxIcon &iconMove, + const wxIcon &iconNone) { m_waiting = TRUE; @@ -632,11 +647,14 @@ wxDropSource::wxDropSource( wxWindow *win, const wxIcon &icon ) m_retValue = wxDragCancel; - m_icon = icon; - if (wxNullIcon == icon) m_icon = wxIcon( page_xpm ); + SetIcons(iconCopy, iconMove, iconNone); } -wxDropSource::wxDropSource( wxDataObject& data, wxWindow *win, const wxIcon &icon ) +wxDropSource::wxDropSource(wxDataObject& data, + wxWindow *win, + const wxIcon &iconCopy, + const wxIcon &iconMove, + const wxIcon &iconNone) { m_waiting = TRUE; @@ -650,19 +668,47 @@ wxDropSource::wxDropSource( wxDataObject& data, wxWindow *win, const wxIcon &ico m_retValue = wxDragCancel; - m_icon = icon; - if (wxNullIcon == icon) m_icon = wxIcon( page_xpm ); + SetIcons(iconCopy, iconMove, iconNone); +} + +void wxDropSource::SetIcons(const wxIcon &iconCopy, + const wxIcon &iconMove, + const wxIcon &iconNone) +{ + m_iconCopy = iconCopy; + m_iconMove = iconMove; + m_iconNone = iconNone; + + if ( !m_iconCopy.Ok() ) + m_iconCopy = wxIcon(page_xpm); + if ( !m_iconMove.Ok() ) + m_iconMove = m_iconCopy; + if ( !m_iconNone.Ok() ) + m_iconNone = m_iconCopy; } wxDropSource::~wxDropSource() { } -void wxDropSource::PrepareIcon( int hot_x, int hot_y, GdkDragContext *context ) +void wxDropSource::PrepareIcon( int action, GdkDragContext *context ) { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_icon.GetMask()) mask = m_icon.GetMask()->GetBitmap(); - GdkPixmap *pixmap = m_icon.GetPixmap(); + // get the right icon to display + wxIcon *icon = NULL; + if ( action & GDK_ACTION_MOVE ) + icon = &m_iconMove; + else if ( action & GDK_ACTION_COPY ) + icon = &m_iconCopy; + else + icon = &m_iconNone; + + GdkBitmap *mask; + if ( icon->GetMask() ) + mask = icon->GetMask()->GetBitmap(); + else + mask = (GdkBitmap *)NULL; + + GdkPixmap *pixmap = icon->GetPixmap(); gint width,height; gdk_window_get_size (pixmap, &width, &height); @@ -689,7 +735,7 @@ void wxDropSource::PrepareIcon( int hot_x, int hot_y, GdkDragContext *context ) if (mask) gtk_widget_shape_combine_mask (m_iconWindow, mask, 0, 0); - gtk_drag_set_icon_widget( context, m_iconWindow, hot_x, hot_y ); + gtk_drag_set_icon_widget( context, m_iconWindow, 0, 0 ); } wxDragResult wxDropSource::DoDragDrop( bool allowMove ) @@ -702,6 +748,11 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) if (m_data->GetFormatCount() == 0) return (wxDragResult) wxDragNone; + // still in drag + if (g_blockEventsOnDrag) + return (wxDragResult) wxDragNone; + + // disabled for now g_blockEventsOnDrag = TRUE; RegisterWindow(); @@ -715,7 +766,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) for (size_t i = 0; i < m_data->GetFormatCount(); i++) { GdkAtom atom = array[i]; - wxLogDebug( wxT("Drop source: Supported atom %s"), gdk_atom_name( atom ) ); + wxLogTrace( TRACE_DND, wxT("Drop source: Supported atom %s"), gdk_atom_name( atom ) ); gtk_target_list_add( target_list, atom, 0, 0 ); } delete[] array; @@ -746,22 +797,22 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) if (button_number) { GdkDragAction action = GDK_ACTION_COPY; - if (allowMove) action = (GdkDragAction)(GDK_ACTION_MOVE|GDK_ACTION_COPY); + if (allowMove) action = (GdkDragAction)(GDK_ACTION_MOVE|GDK_ACTION_COPY); GdkDragContext *context = gtk_drag_begin( m_widget, - target_list, - action, - button_number, /* number of mouse button which started drag */ - (GdkEvent*) &event ); + target_list, + action, + button_number, /* number of mouse button which started drag */ + (GdkEvent*) &event ); m_dragContext = context; - PrepareIcon( 0, 0, context ); + PrepareIcon( action, context ); while (m_waiting) gtk_main_iteration(); - - if (context->action == GDK_ACTION_COPY) + + if (context->action == GDK_ACTION_COPY) m_retValue = wxDragCopy; - if (context->action == GDK_ACTION_MOVE) + if (context->action == GDK_ACTION_MOVE) m_retValue = wxDragMove; } @@ -771,7 +822,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) #endif g_blockEventsOnDrag = FALSE; - + UnregisterWindow(); return m_retValue; @@ -780,7 +831,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) void wxDropSource::RegisterWindow() { if (!m_widget) return; - + gtk_signal_connect( GTK_OBJECT(m_widget), "drag_data_get", GTK_SIGNAL_FUNC (source_drag_data_get), (gpointer) this); gtk_signal_connect (GTK_OBJECT(m_widget), "drag_data_delete", diff --git a/src/gtk/files.lst b/src/gtk/files.lst index 86cfa8625f..8c8114a700 100644 --- a/src/gtk/files.lst +++ b/src/gtk/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -167,6 +167,7 @@ ALL_SOURCES = \ gtk/gdiobj.cpp \ gtk/gsockgtk.c \ gtk/icon.cpp \ + gtk/joystick.cpp \ gtk/listbox.cpp \ gtk/main.cpp \ gtk/mdi.cpp \ @@ -289,6 +290,7 @@ ALL_HEADERS = \ filesys.h \ font.h \ fontdlg.h \ + fontenc.h \ fontenum.h \ fontmap.h \ fontutil.h \ @@ -376,7 +378,6 @@ ALL_HEADERS = \ scrolwin.h \ serbase.h \ settings.h \ - setup.h \ sizer.h \ slider.h \ socket.h \ @@ -860,6 +861,7 @@ GUIOBJS = \ gdiobj.o \ gsockgtk.o \ icon.o \ + joystick.o \ listbox.o \ main.o \ mdi.o \ @@ -920,6 +922,7 @@ GUIDEPS = \ gdiobj.d \ gsockgtk.d \ icon.d \ + joystick.d \ listbox.d \ main.d \ mdi.d \ diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index 26a9ba0dcb..83010c18da 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -71,7 +71,7 @@ private: wxString m_faceName; wxFontEncoding m_encoding; - friend wxFont; + friend class wxFont; }; // ============================================================================ @@ -397,7 +397,7 @@ void wxFont::SetEncoding(wxFontEncoding encoding) static GdkFont *g_systemDefaultGuiFont = (GdkFont*) NULL; -static GdkFont *GtkGetDefaultGuiFont() +GdkFont *GtkGetDefaultGuiFont() { if (!g_systemDefaultGuiFont) { diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index f4e2970ad0..0f54dc32b9 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -126,7 +126,6 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* win->m_width = alloc->width; win->m_height = alloc->height; - win->m_queuedFullRedraw = TRUE; win->GtkUpdateSize(); } } @@ -216,7 +215,7 @@ gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *ev if (!win->m_hasVMT) return FALSE; - + #if (GTK_MINOR_VERSION > 0) int x = 0; int y = 0; @@ -243,7 +242,7 @@ gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *ev so we do this directly after realization */ static gint -gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) +gtk_frame_realized_callback( GtkWidget * WXUNUSED(widget), wxFrame *win ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -283,7 +282,7 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) func |= GDK_FUNC_RESIZE; decor |= GDK_DECOR_RESIZEH; } - + gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor); gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func); } @@ -321,6 +320,33 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) return FALSE; } +//----------------------------------------------------------------------------- +// "expose_event" of m_client +//----------------------------------------------------------------------------- + +static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxWindow *win ) +{ + GtkPizza *pizza = GTK_PIZZA(widget); + + gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1); + + return TRUE; +} + +//----------------------------------------------------------------------------- +// "draw" of m_client +//----------------------------------------------------------------------------- + + +static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win ) +{ + GtkPizza *pizza = GTK_PIZZA(widget); + + gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1); +} + // ---------------------------------------------------------------------------- // wxFrame itself // ---------------------------------------------------------------------------- @@ -394,21 +420,32 @@ void wxFrame::Init() m_menuBarDetached = FALSE; m_toolBarDetached = FALSE; m_insertInClientArea = TRUE; - m_isFrame = FALSE; + m_isFrame = TRUE; } bool wxFrame::Create( wxWindow *parent, wxWindowID id, - const wxString &title, - const wxPoint &pos, - const wxSize &size, + const wxString& title, + const wxPoint& pos, + const wxSize& sizeOrig, long style, const wxString &name ) { + // always create a frame of some reasonable, even if arbitrary, size (at + // least for MSW compatibility) + wxSize size = sizeOrig; + if ( size.x == -1 || size.y == -1 ) + { + wxSize sizeDpy = wxGetDisplaySize(); + if ( size.x == -1 ) + size.x = sizeDpy.x / 3; + if ( size.y == -1 ) + size.y = sizeDpy.y / 5; + } + wxTopLevelWindows.Append( this ); m_needParent = FALSE; - m_isFrame = TRUE; if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) @@ -447,6 +484,13 @@ bool wxFrame::Create( wxWindow *parent, GTK_WIDGET_UNSET_FLAGS( m_mainWidget, GTK_CAN_FOCUS ); gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget ); + + /* for m_mainWidget themes */ + gtk_signal_connect( GTK_OBJECT(m_mainWidget), "expose_event", + GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); + gtk_signal_connect( GTK_OBJECT(m_mainWidget), "draw", + GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); + #ifdef __WXDEBUG__ debug_focus_in( m_mainWidget, wxT("wxFrame::m_mainWidget"), name ); #endif @@ -475,7 +519,7 @@ bool wxFrame::Create( wxWindow *parent, if ((m_x != -1) || (m_y != -1)) gtk_widget_set_uposition( m_widget, m_x, m_y ); gtk_widget_set_usize( m_widget, m_width, m_height ); - + /* we cannot set MWM hints and icons before the widget has been realized, so we do this directly after realization */ gtk_signal_connect( GTK_OBJECT(m_widget), "realize", @@ -535,7 +579,7 @@ void wxFrame::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width) { wxFAIL_MSG( wxT("DoMoveWindow called for wxFrame") ); } - + void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); @@ -738,23 +782,22 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth; if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight; - - /* set size hints */ - gint flag = 0; // GDK_HINT_POS; - if ((m_minWidth != -1) || (m_minHeight != -1)) flag |= GDK_HINT_MIN_SIZE; - if ((m_maxWidth != -1) || (m_maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE; - GdkGeometry geom; - geom.min_width = m_minWidth; - geom.min_height = m_minHeight; - geom.max_width = m_maxWidth; - geom.max_height = m_maxHeight; - gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), - (GtkWidget*) NULL, - &geom, - (GdkWindowHints) flag ); if (m_mainWidget) { + /* set size hints */ + gint flag = 0; // GDK_HINT_POS; + if ((m_minWidth != -1) || (m_minHeight != -1)) flag |= GDK_HINT_MIN_SIZE; + if ((m_maxWidth != -1) || (m_maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE; + GdkGeometry geom; + geom.min_width = m_minWidth; + geom.min_height = m_minHeight; + geom.max_width = m_maxWidth; + geom.max_height = m_maxHeight; + gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), + (GtkWidget*) NULL, + &geom, + (GdkWindowHints) flag ); /* I revert back to wxGTK's original behaviour. m_mainWidget holds the * menubar, the toolbar and the client area, which is represented by @@ -926,7 +969,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar ) gtk_signal_disconnect_by_func( GTK_OBJECT(m_frameMenuBar->m_widget), GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this ); } - + gtk_container_remove( GTK_CONTAINER(m_mainWidget), m_frameMenuBar->m_widget ); gtk_widget_ref( m_frameMenuBar->m_widget ); gtk_widget_unparent( m_frameMenuBar->m_widget ); @@ -971,9 +1014,6 @@ wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& na m_frameToolBar = wxFrameBase::CreateToolBar( style, id, name ); - if (m_frameToolBar) - GetChildren().DeleteObject( m_frameToolBar ); - m_insertInClientArea = TRUE; m_sizeSet = FALSE; @@ -1077,9 +1117,14 @@ void wxFrame::Iconize( bool iconize ) { if (iconize) { - XIconifyWindow( GDK_WINDOW_XDISPLAY( m_widget->window ), - GDK_WINDOW_XWINDOW( m_widget->window ), - DefaultScreen( GDK_DISPLAY() ) ); + GdkWindow *window = m_widget->window; + + // you should do it later, for example from OnCreate() handler + wxCHECK_RET( window, _T("frame not created yet - can't iconize") ); + + XIconifyWindow(GDK_WINDOW_XDISPLAY(window), + GDK_WINDOW_XWINDOW(window), + DefaultScreen(GDK_DISPLAY())); } } diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index 6cfcc74b0e..b85ec70964 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -42,6 +42,8 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, m_useProgressBar = TRUE; m_widget = gtk_progress_bar_new(); + if( style & wxGA_VERTICAL) + gtk_progress_bar_set_orientation( GTK_PROGRESS_BAR(m_widget) , GTK_PROGRESS_BOTTOM_TO_TOP ); m_parent->DoAddChild( this ); diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp index 16c1cabe06..f603c33244 100644 --- a/src/gtk/glcanvas.cpp +++ b/src/gtk/glcanvas.cpp @@ -369,6 +369,12 @@ bool wxGLCanvas::Create( wxWindow *parent, gtk_widget_pop_visual(); gtk_widget_pop_colormap(); + if (GTK_WIDGET_REALIZED(m_wxwindow)) + gtk_glwindow_realized_callback( m_wxwindow, this ); + + if (GTK_WIDGET_MAPPED(m_wxwindow)) + gtk_glwindow_map_callback( m_wxwindow, this ); + return TRUE; } diff --git a/src/gtk/joystick.cpp b/src/gtk/joystick.cpp index 3b80491d4c..334fefee34 100644 --- a/src/gtk/joystick.cpp +++ b/src/gtk/joystick.cpp @@ -13,6 +13,12 @@ #pragma implementation "joystick.h" #endif +#include "wx/defs.h" + +#if wxUSE_JOYSTICK + +#include "wx/joystick.h" + #include #include #include @@ -20,9 +26,9 @@ #include #include #include + #include "wx/event.h" #include "wx/window.h" -#include "wx/gtk/joystick.h" #define JOYSTICK_AXE_MAX 32767 #define JOYSTICK_AXE_MIN -32767 @@ -354,4 +360,5 @@ bool wxJoystick::ReleaseCapture(void) m_polling = 0; return TRUE; } +#endif // wxUSE_JOYSTICK diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 8ff7ab4cd1..2fa6512981 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -81,6 +81,33 @@ extern wxCursor g_globalCursor; static bool g_hasDoubleClicked = FALSE; +//----------------------------------------------------------------------------- +// idle callback for SetFirstItem +//----------------------------------------------------------------------------- + +struct wxlistbox_idle_struct +{ + wxListBox *m_listbox; + int m_item; + gint m_tag; +}; + +static gint wxlistbox_idle_callback( gpointer gdata ) +{ + wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata; + gdk_threads_enter(); + + gtk_idle_remove( data->m_tag ); + + data->m_listbox->SetFirstItem( data->m_item ); + + delete data; + + gdk_threads_leave(); + + return TRUE; +} + //----------------------------------------------------------------------------- // "button_release_event" //----------------------------------------------------------------------------- @@ -146,9 +173,19 @@ gtk_listbox_button_press_callback( GtkWidget *widget, if (g_blockEventsOnScroll) return FALSE; if (!listbox->m_hasVMT) return FALSE; - + int sel = listbox->GtkGetIndex( widget ); +/* + GtkWidget *item = gtk_get_event_widget ((GdkEvent*) gdk_event); + while (item && !GTK_IS_LIST_ITEM (item)) + item = item->parent; + + if (item) + listbox->m_list->last_focus_child = item; +*/ + + #if wxUSE_CHECKLISTBOX if ((listbox->m_hasCheckBoxes) && (gdk_event->x < 15) && (gdk_event->type != GDK_2BUTTON_PRESS)) { @@ -195,6 +232,12 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis ret = listbox->GetEventHandler()->ProcessEvent( new_event ); } + if ((gdk_event->keyval == GDK_Return) && (!ret)) + { + // eat return in all modes + ret = TRUE; + } + #if wxUSE_CHECKLISTBOX if ((gdk_event->keyval == ' ') && (listbox->m_hasCheckBoxes) && (!ret)) { @@ -224,14 +267,19 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis // "select" and "deselect" //----------------------------------------------------------------------------- -static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox *listbox ); +static void gtk_listitem_select_cb( GtkWidget *widget, wxListBox *listbox, bool is_selection ); + +static void gtk_listitem_select_callback( GtkWidget *widget, wxListBox *listbox ) +{ + gtk_listitem_select_cb( widget, listbox, TRUE ); +} static void gtk_listitem_deselect_callback( GtkWidget *widget, wxListBox *listbox ) { - gtk_listitem_select_callback( widget, listbox ); + gtk_listitem_select_cb( widget, listbox, FALSE ); } -static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox *listbox ) +static void gtk_listitem_select_cb( GtkWidget *WXUNUSED(widget), wxListBox *listbox, bool is_selection ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -240,6 +288,7 @@ static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() ); event.SetEventObject( listbox ); + event.SetExtraLong( (long) is_selection ); wxArrayInt aSelections; int n, count = listbox->GetSelections(aSelections); @@ -311,11 +360,21 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, m_list = GTK_LIST( gtk_list_new() ); - GtkSelectionMode mode = GTK_SELECTION_BROWSE; + GtkSelectionMode mode; if (style & wxLB_MULTIPLE) + { mode = GTK_SELECTION_MULTIPLE; + } else if (style & wxLB_EXTENDED) + { mode = GTK_SELECTION_EXTENDED; + } + else + { + // if style was 0 set single mode + m_windowStyle |= wxLB_SINGLE; + mode = GTK_SELECTION_BROWSE; + } gtk_list_set_selection_mode( GTK_LIST(m_list), mode ); @@ -366,6 +425,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, wxListBox::~wxListBox() { + m_hasVMT = FALSE; // prevent deselect events upon destrcution + Clear(); } @@ -388,24 +449,47 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos) wxCHECK_RET( pos <= length, wxT("invalid index in wxListBox::InsertItems") ); size_t nItems = items.GetCount(); + int index; - if (pos == length) + if (m_strings) { - for ( size_t n = 0; n < nItems; n++ ) + for (size_t n = 0; n < nItems; n++) { - GtkAddItem( items[n] ); - - m_clientList.Append((wxObject *)NULL); + index = m_strings->Add( items[n] ); + + if (index != GetCount()) + { + GtkAddItem( items[n], index ); + wxNode *node = m_clientList.Nth( index ); + m_clientList.Insert( node, (wxObject*) NULL ); + } + else + { + GtkAddItem( items[n] ); + m_clientList.Append( (wxObject*) NULL ); + } } } else { - wxNode *node = m_clientList.Nth( pos ); - for ( size_t n = 0; n < nItems; n++ ) + if (pos == length) { - GtkAddItem( items[n], pos+n ); + for ( size_t n = 0; n < nItems; n++ ) + { + GtkAddItem( items[n] ); - m_clientList.Insert( node, (wxObject *)NULL ); + m_clientList.Append((wxObject *)NULL); + } + } + else + { + wxNode *node = m_clientList.Nth( pos ); + for ( size_t n = 0; n < nItems; n++ ) + { + GtkAddItem( items[n], pos+n ); + + m_clientList.Insert( node, (wxObject *)NULL ); + } } } @@ -782,9 +866,41 @@ void wxListBox::SetSelection( int n, bool select ) GtkEnableEvents(); } -void wxListBox::DoSetFirstItem( int WXUNUSED(n) ) +void wxListBox::DoSetFirstItem( int n ) { - wxFAIL_MSG(wxT("wxListBox::SetFirstItem not implemented")); + wxCHECK_RET( m_list, wxT("invalid listbox") ); + + if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list)) + return; + + // terribly efficient + const gchar *vadjustment_key = "gtk-vadjustment"; + guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key); + + GtkAdjustment *adjustment = + (GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id); + wxCHECK_RET( adjustment, wxT("invalid listbox code") ); + + GList *target = g_list_nth( m_list->children, n ); + wxCHECK_RET( target, wxT("invalid listbox index") ); + + GtkWidget *item = GTK_WIDGET(target->data); + wxCHECK_RET( item, wxT("invalid listbox code") ); + + if (item->allocation.y == -1) + { + wxlistbox_idle_struct* data = new wxlistbox_idle_struct; + data->m_listbox = this; + data->m_item = n; + data->m_tag = gtk_idle_add_priority( 800, wxlistbox_idle_callback, (gpointer) data ); + + return; + } + + float y = item->allocation.y; + if (y > adjustment->upper - adjustment->page_size) + y = adjustment->upper - adjustment->page_size; + gtk_adjustment_set_value( adjustment, y ); } // ---------------------------------------------------------------------------- diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index 3fa7de98fd..c4a547333e 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -47,13 +47,13 @@ extern wxList wxPendingDelete; // "switch_page" //----------------------------------------------------------------------------- -static void +static void gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), GtkNotebookPage *page, - gint WXUNUSED(page_num), - wxMDIParentFrame *parent ) + gint WXUNUSED(page_num), + wxMDIParentFrame *parent ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); // send deactivate event to old child @@ -65,9 +65,9 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), event1.SetEventObject( child); child->GetEventHandler()->ProcessEvent( event1 ); } - + // send activate event to new child - + wxMDIClientWindow *client_window = parent->GetClientWindow(); if (!client_window) return; @@ -79,16 +79,16 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), { wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data(); if (child_frame->m_page == page) - { + { child = child_frame; - break; - } + break; + } node = node->Next(); } - + if (!child) return; - + wxActivateEvent event2( wxEVT_ACTIVATE, TRUE, child->GetId() ); event2.SetEventObject( child); child->GetEventHandler()->ProcessEvent( event2 ); @@ -100,33 +100,23 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame,wxFrame) -BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) -END_EVENT_TABLE() - -wxMDIParentFrame::wxMDIParentFrame() +void wxMDIParentFrame::Init() { m_justInserted = FALSE; m_clientWindow = (wxMDIClientWindow *) NULL; } -wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_justInserted = FALSE; - m_clientWindow = (wxMDIClientWindow *) NULL; - Create( parent, id, title, pos, size, style, name ); -} - wxMDIParentFrame::~wxMDIParentFrame() { } -bool wxMDIParentFrame::Create( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) +bool wxMDIParentFrame::Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name ) { wxFrame::Create( parent, id, title, pos, size, style, name ); @@ -150,8 +140,8 @@ void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height ) menu_bar->m_y = 0; menu_bar->m_width = m_width; menu_bar->m_height = wxMENU_HEIGHT; - gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), - menu_bar->m_widget, + gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), + menu_bar->m_widget, 0, 0, m_width, wxMENU_HEIGHT ); } @@ -179,31 +169,36 @@ void wxMDIParentFrame::OnInternalIdle() wxNode *node = m_clientWindow->GetChildren().First(); while (node) { - wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data(); - wxMenuBar *menu_bar = child_frame->m_menuBar; - if (child_frame->m_menuBar) + wxObject *child = node->Data(); + wxMDIChildFrame *child_frame = wxDynamicCast(child, wxMDIChildFrame); + if ( child_frame ) { - if (child_frame == active_child_frame) + wxMenuBar *menu_bar = child_frame->m_menuBar; + if ( menu_bar ) { - if (menu_bar->Show(TRUE)) - { - menu_bar->m_width = m_width; - menu_bar->m_height = wxMENU_HEIGHT; - gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), - menu_bar->m_widget, - 0, 0, m_width, wxMENU_HEIGHT ); - menu_bar->SetInvokingWindow( child_frame ); - } - visible_child_menu = TRUE; + if (child_frame == active_child_frame) + { + if (menu_bar->Show(TRUE)) + { + menu_bar->m_width = m_width; + menu_bar->m_height = wxMENU_HEIGHT; + gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), + menu_bar->m_widget, + 0, 0, m_width, wxMENU_HEIGHT ); + menu_bar->SetInvokingWindow( child_frame ); + } + visible_child_menu = TRUE; + } + else + { + if (menu_bar->Show(FALSE)) + { + menu_bar->UnsetInvokingWindow( child_frame ); + } + } } - else - { - if (menu_bar->Show(FALSE)) - { - menu_bar->UnsetInvokingWindow( child_frame ); - } - } } + node = node->Next(); } @@ -212,21 +207,21 @@ void wxMDIParentFrame::OnInternalIdle() (m_frameMenuBar->IsShown() == visible_child_menu)) { if (visible_child_menu) - { + { m_frameMenuBar->Show( FALSE ); - m_frameMenuBar->UnsetInvokingWindow( this ); - } - else - { + m_frameMenuBar->UnsetInvokingWindow( this ); + } + else + { m_frameMenuBar->Show( TRUE ); - m_frameMenuBar->SetInvokingWindow( this ); - - m_frameMenuBar->m_width = m_width; - m_frameMenuBar->m_height = wxMENU_HEIGHT; - gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), - m_frameMenuBar->m_widget, - 0, 0, m_width, wxMENU_HEIGHT ); - } + m_frameMenuBar->SetInvokingWindow( this ); + + m_frameMenuBar->m_width = m_width; + m_frameMenuBar->m_height = wxMENU_HEIGHT; + gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), + m_frameMenuBar->m_widget, + 0, 0, m_width, wxMENU_HEIGHT ); + } } } @@ -287,14 +282,6 @@ void wxMDIParentFrame::ActivatePrevious() gtk_notebook_prev_page( GTK_NOTEBOOK(m_clientWindow->m_widget) ); } -void wxMDIParentFrame::OnActivate( wxActivateEvent& WXUNUSED(event) ) -{ -} - -void wxMDIParentFrame::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(event) ) -{ -} - //----------------------------------------------------------------------------- // wxMDIChildFrame //----------------------------------------------------------------------------- @@ -303,12 +290,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame,wxFrame) BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame) EVT_ACTIVATE(wxMDIChildFrame::OnActivate) + EVT_MENU_HIGHLIGHT_ALL(wxMDIChildFrame::OnMenuHighlight) END_EVENT_TABLE() wxMDIChildFrame::wxMDIChildFrame() { m_menuBar = (wxMenuBar *) NULL; m_page = (GtkNotebookPage *) NULL; + m_isFrame = FALSE; } wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, @@ -318,6 +307,7 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, { m_menuBar = (wxMenuBar *) NULL; m_page = (GtkNotebookPage *) NULL; + m_isFrame = FALSE; Create( parent, id, title, wxDefaultPosition, size, style, name ); } @@ -360,8 +350,8 @@ void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar ) m_menuBar->SetParent( mdi_frame ); /* insert the invisible menu bar into the _parent_ mdi frame */ - gtk_pizza_put( GTK_PIZZA(mdi_frame->m_mainWidget), - m_menuBar->m_widget, + gtk_pizza_put( GTK_PIZZA(mdi_frame->m_mainWidget), + m_menuBar->m_widget, 0, 0, mdi_frame->m_width, wxMENU_HEIGHT ); } } @@ -380,16 +370,41 @@ void wxMDIChildFrame::Activate() gtk_notebook_set_page( notebook, pageno ); #else // the only way I can see to do this under gtk+ 1.0.X would - // be to keep track of page numbers, start at first and + // be to keep track of page numbers, start at first and // do "next" enough times to get to this page number - messy // - J. Russell Smyth #endif } -void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) ) +void wxMDIChildFrame::OnActivate( wxActivateEvent& WXUNUSED(event) ) { } +void wxMDIChildFrame::OnMenuHighlight( wxMenuEvent& event ) +{ +#if wxUSE_STATUSBAR + wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->GetParent(); + if ( !ShowMenuHelp(mdi_frame->GetStatusBar(), event.GetMenuId()) ) + { + // we don't have any help text for this item, but may be the MDI frame + // does? + mdi_frame->OnMenuHighlight(event); + } +#endif // wxUSE_STATUSBAR +} + +void wxMDIChildFrame::SetTitle( const wxString &title ) +{ + if ( title == m_title ) + return; + + m_title = title; + + wxMDIParentFrame* parent = (wxMDIParentFrame*) GetParent(); + GtkNotebook* notebook = GTK_NOTEBOOK(parent->m_widget); + gtk_notebook_set_tab_label_text(notebook, m_page->child, title.mbc_str()); +} + //----------------------------------------------------------------------------- // "size_allocate" //----------------------------------------------------------------------------- @@ -464,7 +479,7 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style ) !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("wxMDIClientWindow") )) { wxFAIL_MSG( wxT("wxMDIClientWindow creation failed") ); - return FALSE; + return FALSE; } m_widget = gtk_notebook_new(); diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 5c17e2c985..dfd1ceeace 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -35,6 +35,45 @@ extern bool g_isIdle; static wxString GetHotKey( const wxMenuItem& item ); #endif +//----------------------------------------------------------------------------- +// idle system +//----------------------------------------------------------------------------- + +static wxString wxReplaceUnderscore( const wxString& title ) +{ + const wxChar *pc; + + /* GTK 1.2 wants to have "_" instead of "&" for accelerators */ + wxString str; + for ( pc = title; *pc != wxT('\0'); pc++ ) + { + if (*pc == wxT('&')) + { +#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0) + str << wxT('_'); + } + else if (*pc == wxT('/')) + { + str << wxT('\\'); +#endif + } + else + { +#if __WXGTK12__ + if ( *pc == wxT('_') ) + { + // underscores must be doubled to prevent them from being + // interpreted as accelerator character prefix by GTK + str << *pc; + } +#endif // GTK+ 1.2 + + str << *pc; + } + } + return str; +} + //----------------------------------------------------------------------------- // wxMenuBar //----------------------------------------------------------------------------- @@ -221,36 +260,7 @@ bool wxMenuBar::Append( wxMenu *menu, const wxString &title ) bool wxMenuBar::GtkAppend(wxMenu *menu, const wxString& title) { - const wxChar *pc; - - /* GTK 1.2 wants to have "_" instead of "&" for accelerators */ - wxString str; - for ( pc = title; *pc != wxT('\0'); pc++ ) - { - if (*pc == wxT('&')) - { -#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0) - str << wxT('_'); - } - else if (*pc == wxT('/')) - { - str << wxT('\\'); -#endif - } - else - { -#if __WXGTK12__ - if ( *pc == wxT('_') ) - { - // underscores must be doubled to prevent them from being - // interpreted as accelerator character prefix by GTK - str << *pc; - } -#endif // GTK+ 1.2 - - str << *pc; - } - } + wxString str( wxReplaceUnderscore( title ) ); /* this doesn't have much effect right now */ menu->SetTitle( str ); @@ -275,6 +285,7 @@ bool wxMenuBar::GtkAppend(wxMenu *menu, const wxString& title) gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */ /* in order to get the pointer to the item we need the item text _without_ underscores */ wxString tmp = wxT("
    /"); + const wxChar *pc; for ( pc = str; *pc != wxT('\0'); pc++ ) { // contrary to the common sense, we must throw out _all_ underscores, @@ -379,7 +390,7 @@ wxMenu *wxMenuBar::Remove(size_t pos) static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString ) { - if (menu->GetTitle() == menuString) + if (wxMenuItem::GetLabelFromText(menu->GetTitle()) == wxMenuItem::GetLabelFromText(menuString)) { int res = menu->FindItem( itemString ); if (res != wxNOT_FOUND) @@ -472,7 +483,25 @@ wxString wxMenuBar::GetLabelTop( size_t pos ) const wxMenu* menu = node->GetData(); - return menu->GetTitle(); + wxString label; + wxString text( menu->GetTitle() ); +#if (GTK_MINOR_VERSION > 0) + for ( const wxChar *pc = text.c_str(); *pc; pc++ ) + { + if ( *pc == wxT('_') || *pc == wxT('&') ) + { + // '_' is the escape character for GTK+ and '&' is the one for + // wxWindows - skip both of them + continue; + } + + label += *pc; + } +#else // GTK+ 1.0 + label = text; +#endif // GTK+ 1.2/1.0 + + return label; } void wxMenuBar::SetLabelTop( size_t pos, const wxString& label ) @@ -483,7 +512,22 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label ) wxMenu* menu = node->GetData(); - menu->SetTitle( label ); + wxString str( wxReplaceUnderscore( label ) ); + + menu->SetTitle( str ); + + if (menu->m_owner) + { + GtkLabel *label = GTK_LABEL( GTK_BIN(menu->m_owner)->child ); + + /* set new text */ + gtk_label_set( label, str.mb_str()); + + /* reparse key accel */ + (void)gtk_label_parse_uline (GTK_LABEL(label), str.mb_str() ); + gtk_accel_label_refetch( GTK_ACCEL_LABEL(label) ); + } + } //----------------------------------------------------------------------------- @@ -523,7 +567,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, id ); event.SetEventObject( menu ); - event.SetInt(id ); + if (item->IsCheckable()) + event.SetInt( item->IsChecked() ); #if wxUSE_MENU_CALLBACK if (menu->GetCallback()) @@ -638,21 +683,25 @@ wxMenuItem::~wxMenuItem() wxString wxMenuItemBase::GetLabelFromText(const wxString& text) { wxString label; -#if (GTK_MINOR_VERSION > 0) + for ( const wxChar *pc = text.c_str(); *pc; pc++ ) { - if ( *pc == wxT('_') || *pc == wxT('&') ) + if ( *pc == wxT('_') ) { - // '_' is the escape character for GTK+ and '&' is the one for - // wxWindows - skip both of them + // wxGTK escapes "xxx_xxx" to "xxx__xxx" + pc++; + label += *pc; + continue; + } + + if ( *pc == wxT('&') ) + { + // wxMSW escapes & continue; } label += *pc; } -#else // GTK+ 1.0 - label = text; -#endif // GTK+ 1.2/1.0 return label; } @@ -763,11 +812,21 @@ bool wxMenuItem::IsChecked() const wxString wxMenuItem::GetFactoryPath() const { - /* in order to get the pointer to the item we need the item text _without_ - underscores */ + /* in order to get the pointer to the item we need the item text + _without_ underscores */ wxString path( wxT("
    /") ); - path += GetLabel(); + for ( const wxChar *pc = m_text.c_str(); *pc; pc++ ) + { + if ( *pc == wxT('_') || *pc == wxT('&') ) + { + // remove '_' and '&' unconditionally + continue; + } + + path += *pc; + } + return path; } @@ -904,8 +963,9 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) // due to an apparent bug in GTK+, we have to use a static buffer here - // otherwise GTK+ 1.2.2 manages to override the memory we pass to it // somehow! (VZ) - static char s_accel[32]; // must be big enough for F12 - strncpy(s_accel, GetHotKey(*mitem).mb_str(), WXSIZEOF(s_accel)); + static char s_accel[50]; // must be big enougg + wxString tmp( GetHotKey(*mitem) ); + strncpy(s_accel, tmp.mb_str(), WXSIZEOF(s_accel)); entry.accelerator = s_accel; #else // !wxUSE_ACCEL entry.accelerator = (char*) NULL; @@ -963,6 +1023,12 @@ bool wxMenu::DoInsert(size_t pos, wxMenuItem *item) if ( !GtkAppend(item) ) return FALSE; + if ( m_style & wxMENU_TEAROFF ) + { + // change the position as the first item is the tear-off marker + pos++; + } + GtkMenuShell *menu_shell = GTK_MENU_SHELL(m_factory->widget); gpointer data = g_list_last(menu_shell->children)->data; menu_shell->children = g_list_remove(menu_shell->children, data); @@ -1040,6 +1106,20 @@ static wxString GetHotKey( const wxMenuItem& item ) case WXK_F12: hotkey << wxT('F') << code - WXK_F1 + 1; break; + + // GTK seems to use XStringToKeySym here + case WXK_NUMPAD_INSERT: + hotkey << wxT("KP_Insert" ); + break; + case WXK_NUMPAD_DELETE: + hotkey << wxT("KP_Delete" ); + break; + case WXK_INSERT: + hotkey << wxT("Insert" ); + break; + case WXK_DELETE: + hotkey << wxT("Delete" ); + break; // if there are any other keys wxGetAccelFromString() may return, // we should process them here diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 4fbff0c3df..3626e86c46 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -521,7 +521,7 @@ bool wxNotebook::DeletePage( int page ) if (!nb_page) return FALSE; /* GTK sets GtkNotebook.cur_page to NULL before sending - the switvh page event */ + the switch page event */ m_lastSelection = GetSelection(); nb_page->m_client->Destroy(); @@ -536,8 +536,12 @@ bool wxNotebook::RemovePage( int page ) { wxGtkNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) return FALSE; + wxCHECK_MSG( nb_page, FALSE, _T("wxNotebook::RemovePage: invalid page") ); + gtk_widget_ref( nb_page->m_client->m_widget ); + gtk_widget_unrealize( nb_page->m_client->m_widget ); + gtk_widget_unparent( nb_page->m_client->m_widget ); + gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page ); m_pages.DeleteObject( nb_page ); diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index 90a54a25ee..8ac1097aa8 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -100,12 +100,12 @@ wxPen& wxPen::operator = ( const wxPen& pen ) return *this; } -bool wxPen::operator == ( const wxPen& pen ) +bool wxPen::operator == ( const wxPen& pen ) const { return m_refData == pen.m_refData; } -bool wxPen::operator != ( const wxPen& pen ) +bool wxPen::operator != ( const wxPen& pen ) const { return m_refData != pen.m_refData; } diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 10044f42a1..5be1d06dc3 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -114,14 +114,58 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_ return TRUE; } +static gint gtk_radiobutton_focus_in( GtkWidget *widget, + GdkEvent *WXUNUSED(event), + wxRadioBox *win ) +{ + if ( win->m_lostFocus ) + { + // no, we didn't really lose it + win->m_lostFocus = FALSE; + } + else if ( !win->m_hasFocus ) + { + win->m_hasFocus = TRUE; + + wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); + event.SetEventObject( win ); + + // never stop the signal emission, it seems to break the kbd handling + // inside the radiobox + (void)win->GetEventHandler()->ProcessEvent( event ); + } + + return FALSE; +} + +static gint gtk_radiobutton_focus_out( GtkWidget *widget, + GdkEvent *WXUNUSED(event), + wxRadioBox *win ) +{ + wxASSERT_MSG( win->m_hasFocus, _T("got focus out without any focus in?") ); + + // we might have lost the focus, but may be not - it may have just gone to + // another button in the same radiobox, so we'll check for it in the next + // idle iteration (leave m_hasFocus == TRUE for now) + win->m_lostFocus = TRUE; + + return FALSE; +} + //----------------------------------------------------------------------------- // wxRadioBox //----------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl) -wxRadioBox::wxRadioBox() +void wxRadioBox::Init() { + m_alreadySent = FALSE; + m_needParent = TRUE; + m_acceptsFocus = TRUE; + + m_hasFocus = + m_lostFocus = FALSE; } bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, @@ -130,10 +174,6 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, long style, const wxValidator& validator, const wxString &name ) { - m_alreadySent = FALSE; - m_needParent = TRUE; - m_acceptsFocus = TRUE; - if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator, name )) { @@ -143,7 +183,9 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, m_widget = gtk_frame_new( title.mbc_str() ); - m_majorDim = majorDim; + // majorDim may be 0 if all trailing parameters were omitted, so don't + // assert here but just use the correct value for it + m_majorDim = majorDim == 0 ? n : majorDim; GtkRadioButton *m_radio = (GtkRadioButton*) NULL; @@ -175,6 +217,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, gtk_signal_connect( GTK_OBJECT(m_radio), "clicked", GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); + gtk_signal_connect( GTK_OBJECT(m_radio), "focus_in_event", + GTK_SIGNAL_FUNC(gtk_radiobutton_focus_in), (gpointer)this ); + + gtk_signal_connect( GTK_OBJECT(m_radio), "focus_out_event", + GTK_SIGNAL_FUNC(gtk_radiobutton_focus_out), (gpointer)this ); + gtk_pizza_put( GTK_PIZZA(m_parent->m_wxwindow), GTK_WIDGET(m_radio), m_x+10, m_y+10+(i*24), 10, 10 ); @@ -665,4 +713,19 @@ bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window ) return FALSE; } -#endif +void wxRadioBox::OnInternalIdle() +{ + if ( m_lostFocus ) + { + m_hasFocus = FALSE; + m_lostFocus = FALSE; + + wxFocusEvent event( wxEVT_KILL_FOCUS, GetId() ); + event.SetEventObject( this ); + + (void)GetEventHandler()->ProcessEvent( event ); + } +} + +#endif // wxUSE_RADIOBOX + diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index fbb0a53ced..ad199768f7 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -38,13 +38,15 @@ extern wxCursor g_globalCursor; //----------------------------------------------------------------------------- static -void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRadioButton *rb ) +void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *rb ) { if (g_isIdle) wxapp_install_idle_handler(); if (!rb->m_hasVMT) return; if (g_blockEventsOnDrag) return; + + if (!button->active) return; wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId()); event.SetInt( rb->GetValue() ); @@ -70,7 +72,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxRadioButton creation failed") ); - return FALSE; + return FALSE; } if (HasFlag(wxRB_GROUP)) @@ -84,25 +86,25 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab wxRadioButton *chief = (wxRadioButton*) NULL; wxWindowList::Node *node = parent->GetChildren().GetLast(); while (node) - { - wxWindow *child = node->GetData(); - if (child->m_isRadioButton) - { - chief = (wxRadioButton*) child; - if (child->HasFlag(wxRB_GROUP)) break; - } - node = node->GetPrevious(); + { + wxWindow *child = node->GetData(); + if (child->m_isRadioButton) + { + chief = (wxRadioButton*) child; + if (child->HasFlag(wxRB_GROUP)) break; + } + node = node->GetPrevious(); } - if (chief) - { + if (chief) + { /* we are part of the group started by chief */ - m_radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); - } - else - { + m_radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); + } + else + { /* start a new group */ m_radioButtonGroup = (GSList*) NULL; - } + } } m_widget = gtk_radio_button_new_with_label( m_radioButtonGroup, label.mbc_str() ); @@ -148,7 +150,7 @@ void wxRadioButton::SetLabel( const wxString& label ) void wxRadioButton::SetValue( bool val ) { wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") ); - + if (val == GetValue()) return; @@ -162,8 +164,10 @@ void wxRadioButton::SetValue( bool val ) else { // should give an assert + // RL - No it shouldn't. A wxGenericValidator might try to set it + // as FALSE. Failing silently is probably TRTTD here. } - + gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); } @@ -205,11 +209,11 @@ void wxRadioButton::OnInternalIdle() if (GTK_TOGGLE_BUTTON(m_widget)->event_window && cursor.Ok()) { /* I now set the cursor the anew in every OnInternalIdle call - as setting the cursor in a parent window also effects the - windows above so that checking for the current cursor is - not possible. */ - - gdk_window_set_cursor( GTK_TOGGLE_BUTTON(m_widget)->event_window, cursor.GetCursor() ); + as setting the cursor in a parent window also effects the + windows above so that checking for the current cursor is + not possible. */ + + gdk_window_set_cursor( GTK_TOGGLE_BUTTON(m_widget)->event_window, cursor.GetCursor() ); } UpdateWindowUI(); diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 5b03e14703..d00bf0fafc 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -63,7 +63,8 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, wxScrollBar *win ) else if (range->scroll_type == GTK_SCROLL_PAGE_BACKWARD) command = wxEVT_SCROLL_PAGEUP; else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN; - int value = (int)ceil(adjust->value); + double dvalue = adjust->value; + int value = (int)(dvalue >= 0 ? dvalue - 0.5 : dvalue + 0.5); int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL; @@ -129,7 +130,7 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget), IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl) -wxScrollBar::~wxScrollBar(void) +wxScrollBar::~wxScrollBar() { } @@ -182,9 +183,10 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, return TRUE; } -int wxScrollBar::GetThumbPosition(void) const +int wxScrollBar::GetThumbPosition() const { - return (int)(m_adjust->value+0.5); + double val = m_adjust->value; + return (int)(val >= 0 ? val - 0.5 : val + 0.5); } int wxScrollBar::GetThumbSize() const @@ -252,7 +254,7 @@ void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int page } /* Backward compatibility */ -int wxScrollBar::GetValue(void) const +int wxScrollBar::GetValue() const { return GetThumbPosition(); } diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index 4a491823fa..7e5bd7e7db 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -21,6 +21,8 @@ #include #include +extern GdkFont *GtkGetDefaultGuiFont(); + /* #define wxSYS_COLOUR_SCROLLBAR 0 @@ -67,6 +69,7 @@ wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightTextColour = (wxColour *) NULL; wxColour *g_systemListBoxColour = (wxColour *) NULL; +wxColour *g_systemBtnTextColour = (wxColour *) NULL; wxFont *g_systemFont = (wxFont *) NULL; @@ -80,6 +83,7 @@ void wxSystemSettings::Done() delete g_systemHighlightTextColour; delete g_systemListBoxColour; delete g_systemFont; + delete g_systemBtnTextColour; } wxColour wxSystemSettings::GetSystemColour( int index ) @@ -95,7 +99,36 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_ACTIVEBORDER: case wxSYS_COLOUR_INACTIVEBORDER: case wxSYS_COLOUR_BTNFACE: + case wxSYS_COLOUR_3DLIGHT: { + if (!g_systemBtnFaceColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->bg[GTK_STATE_NORMAL].red; + int green = def->bg[GTK_STATE_NORMAL].green; + int blue = def->bg[GTK_STATE_NORMAL].blue; + g_systemBtnFaceColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnFaceColour = + new wxColour( 0 >> SHIFT, + 0 >> SHIFT, + 0x9c40 >> SHIFT ); + } + gtk_widget_destroy( widget ); + + } + return *g_systemBtnFaceColour; + /* if (!g_systemBtnFaceColour) { g_systemBtnFaceColour = @@ -104,14 +137,29 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xd6d6 >> SHIFT ); } return *g_systemBtnFaceColour; + */ } case wxSYS_COLOUR_WINDOW: { return *wxWHITE; } + case wxSYS_COLOUR_3DDKSHADOW: + { + return *wxBLACK; + } case wxSYS_COLOUR_GRAYTEXT: case wxSYS_COLOUR_BTNSHADOW: + //case wxSYS_COLOUR_3DSHADOW: { + if (!g_systemBtnShadowColour) + { + wxColour faceColour(GetSystemColour(wxSYS_COLOUR_3DFACE)); + g_systemBtnShadowColour = + new wxColour(faceColour.Red() * 0.666, + faceColour.Green() * 0.666, + faceColour.Blue() * 0.666); + } + /* if (!g_systemBtnShadowColour) { g_systemBtnShadowColour = @@ -119,10 +167,14 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0x7530 >> SHIFT, 0x7530 >> SHIFT ); } + */ return *g_systemBtnShadowColour; } - case wxSYS_COLOUR_BTNHIGHLIGHT: + case wxSYS_COLOUR_3DHIGHLIGHT: + //case wxSYS_COLOUR_BTNHIGHLIGHT: { + return * wxWHITE; +/* I think this should normally be white (JACS 8/2000) if (!g_systemBtnHighlightColour) { g_systemBtnHighlightColour = @@ -131,6 +183,7 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xea60 >> SHIFT ); } return *g_systemBtnHighlightColour; +*/ } case wxSYS_COLOUR_HIGHLIGHT: { @@ -193,7 +246,30 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_BTNTEXT: case wxSYS_COLOUR_INFOTEXT: { - return *wxBLACK; + if (!g_systemBtnTextColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->fg[GTK_STATE_NORMAL].red; + int green = def->fg[GTK_STATE_NORMAL].green; + int blue = def->fg[GTK_STATE_NORMAL].blue; + g_systemBtnTextColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnTextColour = + new wxColour(0, 0, 0); + } + gtk_widget_destroy( widget ); + } + return *g_systemBtnTextColour; } case wxSYS_COLOUR_HIGHLIGHTTEXT: { @@ -233,19 +309,8 @@ wxFont wxSystemSettings::GetSystemFont( int index ) { if (!g_systemFont) { - GdkFont *gdk_font = (GdkFont*) NULL; - GtkWidget *widget = gtk_button_new(); #if 0 - GtkStyle *def = gtk_rc_get_style( widget ); - if (def) - gdk_font = def->font; - else - { - def = gtk_widget_get_default_style(); - if (def) - gdk_font = def->font; - } -#endif + GdkFont *gdk_font = GtkGetDefaultGuiFont(); if (gdk_font) { GSList *font_list = ((GdkFontPrivate*)gdk_font)->names; @@ -254,12 +319,11 @@ wxFont wxSystemSettings::GetSystemFont( int index ) wxFontData font_data; g_systemFont = new wxFont( font_string, font_data ); } - else - { - g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL ); - } - gtk_widget_destroy( widget ); +#endif + + g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL ); + } return *g_systemFont; } diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index fba7a8b971..00a061af9e 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -61,7 +61,8 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) else if (range->scroll_type == GTK_SCROLL_PAGE_BACKWARD) command = wxEVT_SCROLL_PAGEUP; else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN; - int value = (int)ceil(adjust->value); + double dvalue = adjust->value; + int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5); int orient = wxHORIZONTAL; if ( (win->GetWindowStyleFlag() & wxSB_VERTICAL) == wxSB_VERTICAL) @@ -73,6 +74,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); cevent.SetEventObject( win ); + cevent.SetInt( value ); win->GetEventHandler()->ProcessEvent( cevent ); } @@ -94,7 +96,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxSlider creation failed") ); - return FALSE; + return FALSE; } m_oldPos = 0.0; @@ -107,7 +109,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, if (style & wxSL_LABELS) { gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE ); - gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 ); + gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 ); /* labels need more space and too small window will cause junk to appear on the dialog */ @@ -156,7 +158,10 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, int wxSlider::GetValue() const { - return (int)(m_adjust->value+0.5); + // we want to round to the nearest integer, i.e. 0.9 is rounded to 1 and + // -0.9 is rounded to -1 + double val = m_adjust->value; + return (int)(val < 0 ? val - 0.5 : val + 0.5); } void wxSlider::SetValue( int value ) diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index d5efca072e..dac62397eb 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -51,10 +51,37 @@ static void gtk_spinctrl_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win wxCommandEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, win->GetId()); event.SetEventObject( win ); + event.SetInt( win->GetValue() ); win->GetEventHandler()->ProcessEvent( event ); } +//----------------------------------------------------------------------------- +// "changed" +//----------------------------------------------------------------------------- + +static void +gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win ) +{ + if (!win->m_hasVMT) return; + + if (g_isIdle) + wxapp_install_idle_handler(); + + wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() ); + event.SetEventObject( win ); + + // note that we don't use wxSpinCtrl::GetValue() here because it would + // adjust the value to fit into the control range and this means that we + // would never be able to enter an "invalid" value in the control, even + // temporarily - and trying to enter 10 into the control which accepts the + // values in range 5..50 is then, ummm, quite challenging (hint: you can't + // enter 1!) (VZ) + event.SetInt( (int)ceil(win->m_adjust->value) ); + + win->GetEventHandler()->ProcessEvent( event ); +} + //----------------------------------------------------------------------------- // wxSpinCtrl //----------------------------------------------------------------------------- @@ -125,6 +152,9 @@ void wxSpinCtrl::GtkDisableEvents() GTK_SIGNAL_FUNC(gtk_spinctrl_callback), (gpointer) this ); + gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget), + GTK_SIGNAL_FUNC(gtk_spinctrl_text_changed_callback), + (gpointer) this ); } void wxSpinCtrl::GtkEnableEvents() @@ -133,6 +163,11 @@ void wxSpinCtrl::GtkEnableEvents() "value_changed", GTK_SIGNAL_FUNC(gtk_spinctrl_callback), (gpointer) this ); + + gtk_signal_connect( GTK_OBJECT(m_widget), + "changed", + GTK_SIGNAL_FUNC(gtk_spinctrl_text_changed_callback), + (gpointer)this); } int wxSpinCtrl::GetMin() const @@ -222,7 +257,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event ) if (event.KeyCode() == WXK_RETURN) { wxWindow *top_frame = m_parent; - while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame)) + while (top_frame->GetParent() && !(top_frame->GetParent()->IsTopLevel())) top_frame = top_frame->GetParent(); GtkWindow *window = GTK_WINDOW(top_frame->m_widget); diff --git a/src/gtk/statline.cpp b/src/gtk/statline.cpp index 60970765ed..4e8f0787cb 100644 --- a/src/gtk/statline.cpp +++ b/src/gtk/statline.cpp @@ -45,28 +45,28 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id, !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) { wxFAIL_MSG( wxT("wxStaticLine creation failed") ); - return FALSE; + return FALSE; } if ( IsVertical() ) { m_widget = gtk_vseparator_new(); - if (size.x == -1) - { - wxSize new_size( size ); - new_size.x = 4; - SetSize( new_size ); - } + if (size.x == -1) + { + wxSize new_size( size ); + new_size.x = 4; + SetSize( new_size ); + } } else { m_widget = gtk_hseparator_new(); - if (size.y == -1) - { - wxSize new_size( size ); - new_size.y = 4; - SetSize( new_size ); - } + if (size.y == -1) + { + wxSize new_size( size ); + new_size.y = 4; + SetSize( new_size ); + } } m_parent->DoAddChild( this ); diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 6e58b78a54..5021a9221a 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -33,6 +33,8 @@ #include "gdk/gdk.h" #include "gtk/gtk.h" +extern GdkFont *GtkGetDefaultGuiFont(); + // ---------------------------------------------------------------------------- // globals // ---------------------------------------------------------------------------- @@ -303,8 +305,9 @@ bool wxToolBar::Create( wxWindow *parent, GTK_TOOLBAR(m_toolbar)->tooltips->tip_window ) ); g_style->bg[GTK_STATE_NORMAL] = *m_bg; + gdk_font_unref( g_style->font ); + g_style->font = gdk_font_ref( GtkGetDefaultGuiFont() ); gtk_widget_set_style( GTK_TOOLBAR(m_toolbar)->tooltips->tip_window, g_style ); - m_parent->DoAddChild( this ); @@ -386,7 +389,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) break; case wxTOOL_STYLE_SEPARATOR: - gtk_toolbar_append_space( m_toolbar ); + gtk_toolbar_insert_space( m_toolbar, pos ); // skip the rest return TRUE; diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 0f8df9de99..cbb0f71805 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -15,6 +15,8 @@ #include "wx/utils.h" #include "wx/intl.h" #include "wx/settings.h" +#include "wx/panel.h" +#include "wx/caret.h" #include #include @@ -37,6 +39,8 @@ extern bool g_isIdle; extern bool g_blockEventsOnDrag; extern wxCursor g_globalCursor; +extern wxWindow *g_focusWindow; +extern int g_sendActivateEvent; //----------------------------------------------------------------------------- // "changed" @@ -73,6 +77,101 @@ gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win ) win->CalculateScrollbar(); } +//----------------------------------------------------------------------------- +// "focus_in_event" +//----------------------------------------------------------------------------- + +static gint gtk_text_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) +{ + if (g_isIdle) + wxapp_install_idle_handler(); + + if (!win->m_hasVMT) return FALSE; + if (g_blockEventsOnDrag) return FALSE; + + switch ( g_sendActivateEvent ) + { + case -1: + // we've got focus from outside, synthtize wxActivateEvent + g_sendActivateEvent = 1; + break; + + case 0: + // another our window just lost focus, it was already ours before + // - don't send any wxActivateAppEvent + g_sendActivateEvent = -1; + break; + } + + g_focusWindow = win; + + wxPanel *panel = wxDynamicCast(win->GetParent(), wxPanel); + if (panel) + { + panel->SetLastFocus(win); + } + +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnSetFocus(); + } +#endif // wxUSE_CARET + + wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); + event.SetEventObject( win ); + + if (win->GetEventHandler()->ProcessEvent( event )) + { + gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); + return TRUE; + } + + return FALSE; +} + +//----------------------------------------------------------------------------- +// "focus_out_event" +//----------------------------------------------------------------------------- + +static gint gtk_text_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) +{ + if (g_isIdle) + wxapp_install_idle_handler(); + + if (!win->m_hasVMT) return FALSE; + if (g_blockEventsOnDrag) return FALSE; + + // if the focus goes out of our app alltogether, OnIdle() will send + // wxActivateEvent, otherwise gtk_window_focus_in_callback() will reset + // g_sendActivateEvent to -1 + g_sendActivateEvent = 0; + + g_focusWindow = (wxWindow *)NULL; + +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnKillFocus(); + } +#endif // wxUSE_CARET + + wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() ); + event.SetEventObject( win ); + + if (win->GetEventHandler()->ProcessEvent( event )) + { + gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" ); + return TRUE; + } + + return FALSE; +} + //----------------------------------------------------------------------------- // wxTextCtrl //----------------------------------------------------------------------------- @@ -98,6 +197,8 @@ END_EVENT_TABLE() wxTextCtrl::wxTextCtrl() { m_modified = FALSE; + m_text = + m_vScrollbar = (GtkWidget *)NULL; } wxTextCtrl::wxTextCtrl( wxWindow *parent, @@ -210,14 +311,16 @@ bool wxTextCtrl::Create( wxWindow *parent, if (multi_line) gtk_widget_show(m_text); - /* we want to be notified about text changes */ - gtk_signal_connect( GTK_OBJECT(m_text), "changed", - GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this); - if (multi_line) { gtk_signal_connect(GTK_OBJECT(GTK_TEXT(m_text)->vadj), "changed", (GtkSignalFunc) gtk_scrollbar_changed_callback, (gpointer) this ); + + gtk_signal_connect( GTK_OBJECT(GTK_TEXT(m_text)), "focus_in_event", + GTK_SIGNAL_FUNC(gtk_text_focus_in_callback), (gpointer)this ); + + gtk_signal_connect( GTK_OBJECT(GTK_TEXT(m_text)), "focus_out_event", + GTK_SIGNAL_FUNC(gtk_text_focus_out_callback), (gpointer)this ); } if (!value.IsEmpty()) @@ -262,6 +365,10 @@ bool wxTextCtrl::Create( wxWindow *parent, gtk_text_set_editable( GTK_TEXT(m_text), 1 ); } + /* we want to be notified about text changes */ + gtk_signal_connect( GTK_OBJECT(m_text), "changed", + GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this); + SetBackgroundColour( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ); SetForegroundColour( parent->GetForegroundColour() ); @@ -337,6 +444,13 @@ void wxTextCtrl::SetValue( const wxString &value ) { gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() ); } + + // GRG, Jun/2000: Changed this after a lot of discussion in + // the lists. wxWindows 2.2 will have a set of flags to + // customize this behaviour. + SetInsertionPoint(0); + + m_modified = FALSE; } void wxTextCtrl::WriteText( const wxString &text ) @@ -614,7 +728,7 @@ bool wxTextCtrl::Enable( bool enable ) // nothing to do return FALSE; } - + if (m_windowStyle & wxTE_MULTILINE) { gtk_text_set_editable( GTK_TEXT(m_text), enable ); @@ -735,7 +849,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to) ; + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const @@ -778,8 +892,9 @@ void wxTextCtrl::GetSelection(long* from, long* to) const if (!(GTK_EDITABLE(m_text)->has_selection)) { - if (from) *from = 0; - if (to) *to = 0; + long i = GetInsertionPoint(); + if (from) *from = i; + if (to) *to = i; return; } @@ -812,6 +927,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); event.SetEventObject(this); + event.SetString(GetValue()); if (GetEventHandler()->ProcessEvent(event)) return; } diff --git a/src/gtk/threadpsx.cpp b/src/gtk/threadpsx.cpp deleted file mode 100644 index 99239908ef..0000000000 --- a/src/gtk/threadpsx.cpp +++ /dev/null @@ -1,758 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadpsx.cpp -// Purpose: wxThread (Posix) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997) -// Guilhem Lavaux (1998) -// Robert Roebling (1999) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ - #pragma implementation "thread.h" -#endif - -#include -#include -#include -#include - -#ifdef __linux__ - #include -#endif - -#ifdef __SUN__ -extern int usleep(unsigned int useconds); -#endif - - -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" -#include "wx/log.h" -#include "wx/intl.h" -#include "wx/dynarray.h" - -#include "gdk/gdk.h" -#include "gtk/gtk.h" - -enum thread_state -{ - STATE_NEW, // didn't start execution yet (=> RUNNING) - STATE_RUNNING, - STATE_PAUSED, - STATE_CANCELED, - STATE_EXITED -}; - -WX_DEFINE_ARRAY(wxThread *, wxArrayThread); - -// ----------------------------------------------------------------------------- -// global data -// ----------------------------------------------------------------------------- - -// we keep the list of all threads created by the application to be able to -// terminate them on exit if there are some left - otherwise the process would -// be left in memory -static wxArrayThread gs_allThreads; - -// the id of the main thread -static pthread_t gs_tidMain; - -// the key for the pointer to the associated wxThread object -static pthread_key_t gs_keySelf; - -// this mutex must be acquired before any call to a GUI function -static wxMutex *gs_mutexGui; - -//-------------------------------------------------------------------- -// common GUI thread code -//-------------------------------------------------------------------- - -#include "threadgui.inc" - -//-------------------------------------------------------------------- -// wxMutex (Posix implementation) -//-------------------------------------------------------------------- - -class wxMutexInternal -{ -public: - pthread_mutex_t p_mutex; -}; - -wxMutex::wxMutex() -{ - p_internal = new wxMutexInternal; - pthread_mutex_init( &(p_internal->p_mutex), (const pthread_mutexattr_t*) NULL ); - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxLogDebug("Freeing a locked mutex (%d locks)", m_locked); - - pthread_mutex_destroy( &(p_internal->p_mutex) ); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - int err = pthread_mutex_lock( &(p_internal->p_mutex) ); - if (err == EDEADLK) - { - wxLogDebug("Locking this mutex would lead to deadlock!"); - - return wxMUTEX_DEAD_LOCK; - } - - m_locked++; - - return wxMUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (m_locked) - { - return wxMUTEX_BUSY; - } - - int err = pthread_mutex_trylock( &(p_internal->p_mutex) ); - switch (err) - { - case EBUSY: return wxMUTEX_BUSY; - } - - m_locked++; - - return wxMUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked > 0) - { - m_locked--; - } - else - { - wxLogDebug("Unlocking not locked mutex."); - - return wxMUTEX_UNLOCKED; - } - - pthread_mutex_unlock( &(p_internal->p_mutex) ); - - return wxMUTEX_NO_ERROR; -} - -//-------------------------------------------------------------------- -// wxCondition (Posix implementation) -//-------------------------------------------------------------------- - -class wxConditionInternal -{ -public: - pthread_cond_t p_condition; -}; - -wxCondition::wxCondition() -{ - p_internal = new wxConditionInternal; - pthread_cond_init( &(p_internal->p_condition), (const pthread_condattr_t *) NULL ); -} - -wxCondition::~wxCondition() -{ - pthread_cond_destroy( &(p_internal->p_condition) ); - - delete p_internal; -} - -void wxCondition::Wait(wxMutex& mutex) -{ - pthread_cond_wait( &(p_internal->p_condition), &(mutex.p_internal->p_mutex) ); -} - -bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec) -{ - struct timespec tspec; - - tspec.tv_sec = time(0L)+sec; - tspec.tv_nsec = nsec; - return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); -} - -void wxCondition::Signal() -{ - pthread_cond_signal( &(p_internal->p_condition) ); -} - -void wxCondition::Broadcast() -{ - pthread_cond_broadcast( &(p_internal->p_condition) ); -} - -//-------------------------------------------------------------------- -// wxThread (Posix implementation) -//-------------------------------------------------------------------- - -class wxThreadInternal -{ -public: - wxThreadInternal(); - ~wxThreadInternal(); - - // thread entry function - static void *PthreadStart(void *ptr); - - // thread actions - // start the thread - wxThreadError Run(); - // ask the thread to terminate - void Cancel(); - // wake up threads waiting for our termination - void SignalExit(); - // go to sleep until Resume() is called - void Pause(); - // resume the thread - void Resume(); - - // accessors - // priority - int GetPriority() const { return m_prio; } - void SetPriority(int prio) { m_prio = prio; } - // state - thread_state GetState() const { return m_state; } - void SetState(thread_state state) { m_state = state; } - // id - pthread_t GetId() const { return thread_id; } - // "cancelled" flag - bool WasCancelled() const { return m_cancelled; } - -//private: -- should be! - pthread_t thread_id; - -private: - thread_state m_state; // see thread_state enum - int m_prio; // in wxWindows units: from 0 to 100 - - // set when the thread should terminate - bool m_cancelled; - - // this (mutex, cond) pair is used to synchronize the main thread and this - // thread in several situations: - // 1. The thread function blocks until condition is signaled by Run() when - // it's initially created - this allows create thread in "suspended" - // state - // 2. The Delete() function blocks until the condition is signaled when the - // thread exits. - wxMutex m_mutex; - wxCondition m_cond; - - // another (mutex, cond) pair for Pause()/Resume() usage - // - // VZ: it's possible that we might reuse the mutex and condition from above - // for this too, but as I'm not at all sure that it won't create subtle - // problems with race conditions between, say, Pause() and Delete() I - // prefer this may be a bit less efficient but much safer solution - wxMutex m_mutexSuspend; - wxCondition m_condSuspend; -}; - -void *wxThreadInternal::PthreadStart(void *ptr) -{ - wxThread *thread = (wxThread *)ptr; - wxThreadInternal *pthread = thread->p_internal; - - if ( pthread_setspecific(gs_keySelf, thread) != 0 ) - { - wxLogError(_("Can not start thread: error writing TLS.")); - - return (void *)-1; - } - - // wait for the condition to be signaled from Run() - // mutex state: currently locked by the thread which created us - pthread->m_cond.Wait(pthread->m_mutex); - - // mutex state: locked again on exit of Wait() - - // call the main entry - void* status = thread->Entry(); - - // terminate the thread - thread->Exit(status); - - wxFAIL_MSG("wxThread::Exit() can't return."); - - return NULL; -} - -wxThreadInternal::wxThreadInternal() -{ - m_state = STATE_NEW; - m_cancelled = FALSE; - - // this mutex is locked during almost all thread lifetime - it will only be - // unlocked in the very end - m_mutex.Lock(); - - // this mutex is used in Pause()/Resume() and is also locked all the time - // unless the thread is paused - m_mutexSuspend.Lock(); -} - -wxThreadInternal::~wxThreadInternal() -{ - m_mutexSuspend.Unlock(); - - // note that m_mutex will be unlocked by the thread which waits for our - // termination -} - -wxThreadError wxThreadInternal::Run() -{ - wxCHECK_MSG( GetState() == STATE_NEW, wxTHREAD_RUNNING, - "thread may only be started once after successful Create()" ); - - // the mutex was locked on Create(), so we will be able to lock it again - // only when the thread really starts executing and enters the wait - - // otherwise we might signal the condition before anybody is waiting for it - wxMutexLocker lock(m_mutex); - m_cond.Signal(); - - m_state = STATE_RUNNING; - - return wxTHREAD_NO_ERROR; - - // now the mutex is unlocked back - but just to allow Wait() function to - // terminate by relocking it, so the net result is that the worker thread - // starts executing and the mutex is still locked -} - -void wxThreadInternal::Cancel() -{ - // if the thread we're waiting for is waiting for the GUI mutex, we will - // deadlock so make sure we release it temporarily - if ( wxThread::IsMain() ) - wxMutexGuiLeave(); - - // nobody ever writes this variable so it's safe to not use any - // synchronization here - m_cancelled = TRUE; - - // entering Wait() releases the mutex thus allowing SignalExit() to acquire - // it and to signal us its termination - m_cond.Wait(m_mutex); - - // mutex is still in the locked state - relocked on exit from Wait(), so - // unlock it - we don't need it any more, the thread has already terminated - m_mutex.Unlock(); - - // reacquire GUI mutex - if ( wxThread::IsMain() ) - wxMutexGuiEnter(); -} - -void wxThreadInternal::SignalExit() -{ - // as mutex is currently locked, this will block until some other thread - // (normally the same which created this one) unlocks it by entering Wait() - m_mutex.Lock(); - - // wake up all the threads waiting for our termination - m_cond.Broadcast(); - - // after this call mutex will be finally unlocked - m_mutex.Unlock(); -} - -void wxThreadInternal::Pause() -{ - wxCHECK_RET( m_state == STATE_PAUSED, - "thread must first be paused with wxThread::Pause()." ); - - // wait until the condition is signaled from Resume() - m_condSuspend.Wait(m_mutexSuspend); -} - -void wxThreadInternal::Resume() -{ - wxCHECK_RET( m_state == STATE_PAUSED, - "can't resume thread which is not suspended." ); - - // we will be able to lock this mutex only when Pause() starts waiting - wxMutexLocker lock(m_mutexSuspend); - m_condSuspend.Signal(); - - SetState(STATE_RUNNING); -} - -// ----------------------------------------------------------------------------- -// static functions -// ----------------------------------------------------------------------------- - -wxThread *wxThread::This() -{ - return (wxThread *)pthread_getspecific(gs_keySelf); -} - -bool wxThread::IsMain() -{ - return (bool)pthread_equal(pthread_self(), gs_tidMain); -} - -void wxThread::Yield() -{ -#ifdef HAVE_SCHED_YIELD - sched_yield(); -#else // !HAVE_SCHED_YIELD - // may be it will have the desired effect? - Sleep(0); -#endif // HAVE_SCHED_YIELD -} - -void wxThread::Sleep(unsigned long milliseconds) -{ - wxUsleep(milliseconds); -} - -// ----------------------------------------------------------------------------- -// creating thread -// ----------------------------------------------------------------------------- - -wxThread::wxThread() -{ - // add this thread to the global list of all threads - gs_allThreads.Add(this); - - p_internal = new wxThreadInternal(); -} - -wxThreadError wxThread::Create() -{ - if (p_internal->GetState() != STATE_NEW) - return wxTHREAD_RUNNING; - - // set up the thread attribute: right now, we only set thread priority - pthread_attr_t attr; - pthread_attr_init(&attr); - -#ifdef HAVE_THREAD_PRIORITY_FUNCTIONS - int prio; - if ( pthread_attr_getschedpolicy(&attr, &prio) != 0 ) - { - wxLogError(_("Can not retrieve thread scheduling policy.")); - } - - int min_prio = sched_get_priority_min(prio), - max_prio = sched_get_priority_max(prio); - - if ( min_prio == -1 || max_prio == -1 ) - { - wxLogError(_("Can not get priority range for scheduling policy %d."), - prio); - } - else - { - struct sched_param sp; - pthread_attr_getschedparam(&attr, &sp); - sp.sched_priority = min_prio + - (p_internal->GetPriority()*(max_prio-min_prio))/100; - pthread_attr_setschedparam(&attr, &sp); - } -#endif // HAVE_THREAD_PRIORITY_FUNCTIONS - - // create the new OS thread object - int rc = pthread_create(&p_internal->thread_id, &attr, - wxThreadInternal::PthreadStart, (void *)this); - pthread_attr_destroy(&attr); - - if ( rc != 0 ) - { - p_internal->SetState(STATE_EXITED); - return wxTHREAD_NO_RESOURCE; - } - - return wxTHREAD_NO_ERROR; -} - -wxThreadError wxThread::Run() -{ - return p_internal->Run(); -} - -// ----------------------------------------------------------------------------- -// misc accessors -// ----------------------------------------------------------------------------- - -void wxThread::SetPriority(unsigned int prio) -{ - wxCHECK_RET( ((int)WXTHREAD_MIN_PRIORITY <= (int)prio) && - ((int)prio <= (int)WXTHREAD_MAX_PRIORITY), - "invalid thread priority" ); - - wxCriticalSectionLocker lock(m_critsect); - - switch ( p_internal->GetState() ) - { - case STATE_NEW: - // thread not yet started, priority will be set when it is - p_internal->SetPriority(prio); - break; - - case STATE_RUNNING: - case STATE_PAUSED: -#ifdef HAVE_THREAD_PRIORITY_FUNCTIONS - { - struct sched_param sparam; - sparam.sched_priority = prio; - - if ( pthread_setschedparam(p_internal->GetId(), - SCHED_OTHER, &sparam) != 0 ) - { - wxLogError(_("Failed to set thread priority %d."), prio); - } - } -#endif // HAVE_THREAD_PRIORITY_FUNCTIONS - break; - - case STATE_EXITED: - default: - wxFAIL_MSG("impossible to set thread priority in this state"); - } -} - -unsigned int wxThread::GetPriority() const -{ - wxCriticalSectionLocker lock((wxCriticalSection &)m_critsect); - - return p_internal->GetPriority(); -} - -unsigned long wxThread::GetID() const -{ - return (unsigned long)p_internal->thread_id; -} - -// ----------------------------------------------------------------------------- -// pause/resume -// ----------------------------------------------------------------------------- - -wxThreadError wxThread::Pause() -{ - wxCriticalSectionLocker lock(m_critsect); - - if ( p_internal->GetState() != STATE_RUNNING ) - { - wxLogDebug("Can't pause thread which is not running."); - - return wxTHREAD_NOT_RUNNING; - } - - p_internal->SetState(STATE_PAUSED); - - return wxTHREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - wxCriticalSectionLocker lock(m_critsect); - - if ( p_internal->GetState() == STATE_PAUSED ) - { - p_internal->Resume(); - - return wxTHREAD_NO_ERROR; - } - else - { - wxLogDebug("Attempt to resume a thread which is not paused."); - - return wxTHREAD_MISC_ERROR; - } -} - -// ----------------------------------------------------------------------------- -// exiting thread -// ----------------------------------------------------------------------------- - -wxThread::ExitCode wxThread::Delete() -{ - m_critsect.Enter(); - thread_state state = p_internal->GetState(); - m_critsect.Leave(); - - switch ( state ) - { - case STATE_NEW: - case STATE_EXITED: - // nothing to do - break; - - case STATE_PAUSED: - // resume the thread first - Resume(); - - // fall through - - default: - // set the flag telling to the thread to stop and wait - p_internal->Cancel(); - } - - return NULL; -} - -wxThreadError wxThread::Kill() -{ - switch ( p_internal->GetState() ) - { - case STATE_NEW: - case STATE_EXITED: - return wxTHREAD_NOT_RUNNING; - - default: -#ifdef HAVE_PTHREAD_CANCEL - if ( pthread_cancel(p_internal->GetId()) != 0 ) -#endif - { - wxLogError(_("Failed to terminate a thread.")); - - return wxTHREAD_MISC_ERROR; - } - - return wxTHREAD_NO_ERROR; - } -} - -void wxThread::Exit(void *status) -{ - // first call user-level clean up code - OnExit(); - - // next wake up the threads waiting for us (OTOH, this function won't return - // until someone waited for us!) - p_internal->SignalExit(); - - p_internal->SetState(STATE_EXITED); - - // delete both C++ thread object and terminate the OS thread object - delete this; - pthread_exit(status); -} - -// also test whether we were paused -bool wxThread::TestDestroy() -{ - wxCriticalSectionLocker lock((wxCriticalSection&)m_critsect); - - if ( p_internal->GetState() == STATE_PAUSED ) - { - // leave the crit section or the other threads will stop too if they try - // to call any of (seemingly harmless) IsXXX() functions while we sleep - m_critsect.Leave(); - - p_internal->Pause(); - - // enter it back before it's finally left in lock object dtor - m_critsect.Enter(); - } - - return p_internal->WasCancelled(); -} - -wxThread::~wxThread() -{ - // remove this thread from the global array - gs_allThreads.Remove(this); -} - -// ----------------------------------------------------------------------------- -// state tests -// ----------------------------------------------------------------------------- - -bool wxThread::IsRunning() const -{ - wxCriticalSectionLocker lock((wxCriticalSection &)m_critsect); - - return p_internal->GetState() == STATE_RUNNING; -} - -bool wxThread::IsAlive() const -{ - wxCriticalSectionLocker lock((wxCriticalSection&)m_critsect); - - switch ( p_internal->GetState() ) - { - case STATE_RUNNING: - case STATE_PAUSED: - return TRUE; - - default: - return FALSE; - } -} - -//-------------------------------------------------------------------- -// wxThreadModule -//-------------------------------------------------------------------- - -class wxThreadModule : public wxModule -{ -public: - virtual bool OnInit(); - virtual void OnExit(); - -private: - DECLARE_DYNAMIC_CLASS(wxThreadModule) -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) - -bool wxThreadModule::OnInit() -{ - if ( pthread_key_create(&gs_keySelf, NULL /* dtor function */) != 0 ) - { - wxLogError(_("Thread module initialization failed: " - "failed to create pthread key.")); - - return FALSE; - } - - gs_mutexGui = new wxMutex(); - wxThreadGuiInit(); - gs_tidMain = pthread_self(); - gs_mutexGui->Lock(); - - return TRUE; -} - -void wxThreadModule::OnExit() -{ - wxASSERT_MSG( wxThread::IsMain(), "only main thread can be here" ); - - // terminate any threads left - size_t count = gs_allThreads.GetCount(); - if ( count != 0u ) - wxLogDebug("Some threads were not terminated by the application."); - - for ( size_t n = 0u; n < count; n++ ) - { - gs_allThreads[n]->Delete(); - } - - // destroy GUI mutex - gs_mutexGui->Unlock(); - wxThreadGuiExit(); - delete gs_mutexGui; - - // and free TLD slot - (void)pthread_key_delete(gs_keySelf); -} diff --git a/src/gtk/tooltip.cpp b/src/gtk/tooltip.cpp index a80317beeb..109f4658a6 100644 --- a/src/gtk/tooltip.cpp +++ b/src/gtk/tooltip.cpp @@ -21,6 +21,8 @@ #include "gtk/gtk.h" #include "gdk/gdk.h" +extern GdkFont *GtkGetDefaultGuiFont(); + //----------------------------------------------------------------------------- // global data //----------------------------------------------------------------------------- @@ -72,7 +74,9 @@ void wxToolTip::Apply( wxWindow *win ) g_style->fg[GTK_STATE_NORMAL] = ss_fg; g_style->bg[GTK_STATE_NORMAL] = ss_bg; - + gdk_font_unref( g_style->font ); + g_style->font = gdk_font_ref( GtkGetDefaultGuiFont() ); + gtk_widget_set_style( ss_tooltips->tip_window, g_style ); #else gtk_tooltips_set_colors( ss_tooltips, &ss_bg, &ss_fg ); diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index e2b14c9404..f69ec2706c 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -76,6 +76,8 @@ static void gtk_pizza_adjust_allocations (GtkPizza *pizza, gint dy); +/* unused */ +#if 0 static void gtk_pizza_expose_area (GtkPizza *pizza, gint x, gint y, @@ -83,6 +85,8 @@ static void gtk_pizza_expose_area (GtkPizza *pizza, gint height); static void gtk_pizza_adjustment_changed (GtkAdjustment *adjustment, GtkPizza *pizza); +#endif + static GdkFilterReturn gtk_pizza_filter (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data); @@ -959,6 +963,8 @@ gtk_pizza_adjust_allocations (GtkPizza *pizza, /* Callbacks */ +/* unused */ +#if 0 /* Send a synthetic expose event to the widget */ static void @@ -984,6 +990,7 @@ gtk_pizza_expose_area (GtkPizza *pizza, gdk_window_unref (event.window); } } +#endif /* unused */ /* This function is used to find events to process while scrolling */ @@ -993,12 +1000,12 @@ gtk_pizza_expose_predicate (Display *display, XEvent *xevent, XPointer arg) { - if ((xevent->type == Expose) || - ((xevent->xany.window == *(Window *)arg) && + if ((xevent->type == Expose) || + ((xevent->xany.window == *(Window *)arg) && (xevent->type == ConfigureNotify))) - return True; - else - return False; + return True; + else + return False; } /* This is the main routine to do the scrolling. Scrolling is @@ -1016,40 +1023,40 @@ gtk_pizza_expose_predicate (Display *display, void gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) { - GtkWidget *widget; - XEvent xevent; + GtkWidget *widget; + XEvent xevent; - gint x,y,w,h,border; + gint x,y,w,h,border; - widget = GTK_WIDGET (pizza); + widget = GTK_WIDGET (pizza); - pizza->xoffset += dx; - pizza->yoffset += dy; + pizza->xoffset += dx; + pizza->yoffset += dy; - if (!GTK_WIDGET_MAPPED (pizza)) + if (!GTK_WIDGET_MAPPED (pizza)) { - gtk_pizza_position_children (pizza); - return; + gtk_pizza_position_children (pizza); + return; } - gtk_pizza_adjust_allocations (pizza, -dx, -dy); + gtk_pizza_adjust_allocations (pizza, -dx, -dy); - if (pizza->shadow_type == GTK_MYSHADOW_NONE) - border = 0; - else - if (pizza->shadow_type == GTK_MYSHADOW_THIN) - border = 1; - else - border = 2; + if (pizza->shadow_type == GTK_MYSHADOW_NONE) + border = 0; + else + if (pizza->shadow_type == GTK_MYSHADOW_THIN) + border = 1; + else + border = 2; - x = 0; - y = 0; - w = widget->allocation.width - 2*border; - h = widget->allocation.height - 2*border; + x = 0; + y = 0; + w = widget->allocation.width - 2*border; + h = widget->allocation.height - 2*border; - if (dx > 0) + if (dx > 0) { - if (gravity_works) + if (gravity_works) { gdk_window_resize (pizza->bin_window, w + dx, @@ -1057,20 +1064,14 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) gdk_window_move (pizza->bin_window, x-dx, y); gdk_window_move_resize (pizza->bin_window, x, y, w, h ); } - else + else { /* FIXME */ } - - gtk_pizza_expose_area (pizza, - MAX ((gint)w - dx, 0), - 0, - MIN (dx, w), - h); } - else if (dx < 0) + else if (dx < 0) { - if (gravity_works) + if (gravity_works) { gdk_window_move_resize (pizza->bin_window, x + dx, @@ -1080,102 +1081,73 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) gdk_window_move (pizza->bin_window, x, y); gdk_window_resize (pizza->bin_window, w, h ); } - else + else { /* FIXME */ } - - gtk_pizza_expose_area (pizza, - 0, - 0, - MIN (-dx, w), - h); } - if (dy > 0) + if (dy > 0) { - if (gravity_works) + if (gravity_works) { gdk_window_resize (pizza->bin_window, w, h + dy); gdk_window_move (pizza->bin_window, x, y-dy); gdk_window_move_resize (pizza->bin_window, x, y, w, h ); } - else + else { /* FIXME */ } - - gtk_pizza_expose_area (pizza, - 0, - MAX ((gint)h - dy, 0), - w, - MIN (dy, h)); } - else if (dy < 0) + else if (dy < 0) { - if (gravity_works) + if (gravity_works) { gdk_window_move_resize (pizza->bin_window, x, y+dy, w, h - dy ); gdk_window_move (pizza->bin_window, x, y); gdk_window_resize (pizza->bin_window, w, h ); } - else + else { /* FIXME */ } - gtk_pizza_expose_area (pizza, - 0, - 0, - w, - MIN (-dy, (gint)h)); } - gtk_pizza_position_children (pizza); + gtk_pizza_position_children (pizza); - /* We have to make sure that all exposes from this scroll get - * processed before we scroll again, or the expose events will - * have invalid coordinates. - * - * We also do expose events for other windows, since otherwise - * their updating will fall behind the scrolling - * - * This also avoids a problem in pre-1.0 GTK where filters don't - * have access to configure events that were compressed. - */ - - gdk_flush(); - while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window), - &xevent, - gtk_pizza_expose_predicate, - (XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window))) + gdk_flush(); + while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window), + &xevent, + gtk_pizza_expose_predicate, + (XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window))) { - GdkEvent event; - GtkWidget *event_widget; + GdkEvent event; + GtkWidget *event_widget; - if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) && - (gtk_pizza_filter (&xevent, &event, pizza) == GDK_FILTER_REMOVE)) - continue; + if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) ) + gtk_pizza_filter (&xevent, &event, pizza); - if (xevent.type == Expose) + if (xevent.type == Expose) { - event.expose.window = gdk_window_lookup (xevent.xany.window); - gdk_window_get_user_data (event.expose.window, + event.expose.window = gdk_window_lookup (xevent.xany.window); + gdk_window_get_user_data (event.expose.window, (gpointer *)&event_widget); - if (event_widget) + if (event_widget) { - event.expose.type = GDK_EXPOSE; - event.expose.area.x = xevent.xexpose.x; - event.expose.area.y = xevent.xexpose.y; - event.expose.area.width = xevent.xexpose.width; - event.expose.area.height = xevent.xexpose.height; - event.expose.count = xevent.xexpose.count; + event.expose.type = GDK_EXPOSE; + event.expose.area.x = xevent.xexpose.x; + event.expose.area.y = xevent.xexpose.y; + event.expose.area.width = xevent.xexpose.width; + event.expose.area.height = xevent.xexpose.height; + event.expose.count = xevent.xexpose.count; - gdk_window_ref (event.expose.window); - gtk_widget_event (event_widget, &event); - gdk_window_unref (event.expose.window); + gdk_window_ref (event.expose.window); + gtk_widget_event (event_widget, &event); + gdk_window_unref (event.expose.window); } } } @@ -1206,25 +1178,17 @@ gtk_pizza_filter (GdkXEvent *gdk_xevent, if (!pizza->use_filter) return GDK_FILTER_CONTINUE; - switch (xevent->type) + switch (xevent->type) { case Expose: if (xevent->xexpose.serial == pizza->configure_serial) { - if (pizza->visibility == GDK_VISIBILITY_UNOBSCURED) - return GDK_FILTER_REMOVE; - else - { - xevent->xexpose.x += pizza->scroll_x; - xevent->xexpose.y += pizza->scroll_y; - - break; - } + xevent->xexpose.x += pizza->scroll_x; + xevent->xexpose.y += pizza->scroll_y; } break; case ConfigureNotify: - if ((xevent->xconfigure.x != 0) || (xevent->xconfigure.y != 0)) { pizza->configure_serial = xevent->xconfigure.serial; pizza->scroll_x = xevent->xconfigure.x; @@ -1278,8 +1242,6 @@ gtk_pizza_main_filter (GdkXEvent *gdk_xevent, } - - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 80384e2535..7992d1e0bf 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: window.cpp +// Name: gtk/window.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -14,7 +14,7 @@ #include "wx/defs.h" #include "wx/window.h" -#include "wx/dc.h" +#include "wx/dcclient.h" #include "wx/frame.h" #include "wx/app.h" #include "wx/layout.h" @@ -30,6 +30,10 @@ #include "wx/tooltip.h" #endif +#if wxUSE_CARET + #include "wx/caret.h" +#endif // wxUSE_CARET + #include "wx/menu.h" #include "wx/statusbr.h" #include "wx/intl.h" @@ -193,13 +197,13 @@ extern bool g_blockEventsOnScroll; extern wxCursor g_globalCursor; static wxWindow *g_captureWindow = (wxWindow*) NULL; -/* extern */ wxWindow *g_focusWindow = (wxWindow*) NULL; +wxWindow *g_focusWindow = (wxWindow*) NULL; // if we detect that the app has got/lost the focus, we set this variable to // either TRUE or FALSE and an activate event will be sent during the next // OnIdle() call and it is reset to -1: this value means that we shouldn't // send any activate events at all -static int g_sendActivateEvent = -1; +int g_sendActivateEvent = -1; /* hack: we need something to pass to gtk_menu_popup, so we store the time of the last click here */ @@ -298,6 +302,28 @@ extern bool g_isIdle; // local code (see below) //----------------------------------------------------------------------------- +// returns the child of win which currently has focus or NULL if not found +static wxWindow *FindFocusedChild(wxWindow *win) +{ + wxWindow *winFocus = wxWindow::FindFocus(); + if ( !winFocus ) + return (wxWindow *)NULL; + + if ( winFocus == win ) + return win; + + for ( wxWindowList::Node *node = win->GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindow *child = FindFocusedChild(node->GetData()); + if ( child ) + return child; + } + + return (wxWindow *)NULL; +} + static void draw_frame( GtkWidget *widget, wxWindow *win ) { if (!win->m_hasVMT) @@ -387,9 +413,9 @@ static void draw_frame( GtkWidget *widget, wxWindow *win ) gint gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxWindow *win ) { if (gdk_event->count > 0) return FALSE; - + draw_frame( widget, win ); - + return TRUE; } @@ -406,8 +432,9 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU // key code mapping routines //----------------------------------------------------------------------------- -static long map_to_unmodified_wx_keysym( KeySym keysym ) +static long map_to_unmodified_wx_keysym( GdkEventKey *event ) { + KeySym keysym = event->keyval; guint key_code = 0; switch (keysym) @@ -503,7 +530,11 @@ static long map_to_unmodified_wx_keysym( KeySym keysym ) case GDK_F12: key_code = WXK_F12; break; default: { - if ((keysym & 0xF000) == 0) + if (event->length == 1) + { + key_code = toupper( (unsigned char)*event->string ); + } + else if ((keysym & 0xFF) == keysym) { guint upper = gdk_keyval_to_upper( (guint)keysym ); keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */ @@ -515,8 +546,9 @@ static long map_to_unmodified_wx_keysym( KeySym keysym ) return (key_code); } -static long map_to_wx_keysym( KeySym keysym ) +static long map_to_wx_keysym( GdkEventKey *event ) { + KeySym keysym = event->keyval; guint key_code = 0; switch (keysym) @@ -602,7 +634,11 @@ static long map_to_wx_keysym( KeySym keysym ) case GDK_F12: key_code = WXK_F12; break; default: { - if ((keysym & 0xF000) == 0) + if (event->length == 1) + { + key_code = (unsigned char)*event->string; + } + else if ((keysym & 0xFF) == keysym) { key_code = (guint)keysym; } @@ -622,7 +658,7 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev if (g_isIdle) wxapp_install_idle_handler(); - + /* if (win->GetName() == wxT("panel")) { @@ -635,35 +671,69 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev (int)gdk_event->area.height ); } */ - - if (!win->m_queuedFullRedraw) + + GtkPizza *pizza = GTK_PIZZA (widget); + + wxWindow *parent = win; + if (win->IsTopLevel()) { - - win->GetUpdateRegion().Union( gdk_event->area.x, - gdk_event->area.y, - gdk_event->area.width, - gdk_event->area.height ); - - if (gdk_event->count == 0) + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); + } + else + { + parent = win->GetParent(); + if (parent) { - wxEraseEvent eevent( win->GetId() ); - eevent.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent(eevent); - - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - - win->GetUpdateRegion().Clear(); + if (parent->m_isFrame) + { + wxFrame *frame = (wxFrame*) parent; + if (frame->GetStatusBar() == win) + { + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); + } + } + else + if (GTK_IS_NOTEBOOK(parent->m_widget)) + { + while (parent && !parent->IsTopLevel()) + parent = parent->GetParent(); + + if (!parent) parent = win; + + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); + } } + } + + win->GetUpdateRegion().Union( gdk_event->area.x, + gdk_event->area.y, + gdk_event->area.width, + gdk_event->area.height ); + + if (gdk_event->count == 0) + { + win->m_clipPaintRegion = TRUE; + wxEraseEvent eevent( win->GetId() ); + eevent.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent(eevent); + + wxPaintEvent event( win->GetId() ); + event.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event ); + + win->GetUpdateRegion().Clear(); + win->m_clipPaintRegion = FALSE; + } + /* The following code will result in all window-less widgets being redrawn if the wxWindows class is given a chance to paint *anything* because it will then be allowed to paint over the window-less widgets */ - - GtkPizza *pizza = GTK_PIZZA (widget); - + GList *children = pizza->children; while (children) { @@ -683,8 +753,7 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev gtk_widget_event (child->widget, (GdkEvent*) &child_event); } } - } - + return TRUE; } @@ -722,7 +791,7 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW if (g_isIdle) wxapp_install_idle_handler(); - + /* if (win->GetName() == wxT("panel")) { @@ -735,47 +804,49 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW (int)rect->height ); } */ - - GtkPizza *pizza = GTK_PIZZA (widget); - - if (!win->m_queuedFullRedraw) + + if ((win->HasFlag(wxNO_FULL_REPAINT_ON_RESIZE)) && + (win->GetChildren().GetCount() == 0)) { - - if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && - (pizza->clear_on_draw)) - { - gdk_window_clear_area( pizza->bin_window, + return; + } + + + GtkPizza *pizza = GTK_PIZZA (widget); + + if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && + (pizza->clear_on_draw)) + { + gdk_window_clear_area( pizza->bin_window, rect->x, rect->y, rect->width, rect->height); - } - - win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); + } - win->m_clipPaintRegion = TRUE; - - wxEraseEvent eevent( win->GetId() ); - eevent.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent(eevent); + win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); + win->m_clipPaintRegion = TRUE; - win->GetUpdateRegion().Clear(); - - win->m_clipPaintRegion = FALSE; - - - GList *children = pizza->children; - while (children) + wxEraseEvent eevent( win->GetId() ); + eevent.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent(eevent); + + wxPaintEvent event( win->GetId() ); + event.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event ); + + win->GetUpdateRegion().Clear(); + + win->m_clipPaintRegion = FALSE; + + GList *children = pizza->children; + while (children) + { + GtkPizzaChild *child = (GtkPizzaChild*) children->data; + children = children->next; + + GdkRectangle child_area; + if (gtk_widget_intersect (child->widget, rect, &child_area)) { - GtkPizzaChild *child = (GtkPizzaChild*) children->data; - children = children->next; - - GdkRectangle child_area; - if (gtk_widget_intersect (child->widget, rect, &child_area)) - { - gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); - } + gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); } } } @@ -809,7 +880,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e bool ret = FALSE; - long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval ); + long key_code = map_to_unmodified_wx_keysym( gdk_event ); /* sending unknown key events doesn't really make sense */ if (key_code == 0) return FALSE; @@ -839,7 +910,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e ret = ancestor->GetEventHandler()->ProcessEvent( command_event ); break; } - if (ancestor->m_isFrame) + if (ancestor->IsTopLevel()) break; ancestor = ancestor->GetParent(); } @@ -849,7 +920,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e /* wxMSW doesn't send char events with Alt pressed */ /* Only send wxEVT_CHAR event if not processed yet. Thus, ALT-x will only be sent if it is not in an accelerator table. */ - key_code = map_to_wx_keysym( gdk_event->keyval ); + key_code = map_to_wx_keysym( gdk_event ); if ( (!ret) && (key_code != 0)) @@ -871,7 +942,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e /* win is a control: tab can be propagated up */ if ( (!ret) && ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) && +// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here the control may +// have this style, yet choose not to process this particular TAB in which +// case TAB must still work as a navigational character +#if 0 (!win->HasFlag(wxTE_PROCESS_TAB)) && +#endif // 0 (win->GetParent()) && (win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) ) { @@ -962,7 +1038,7 @@ static gint gtk_window_key_release_callback( GtkWidget *widget, GdkEventKey *gdk printf( "\n" ); */ - long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval ); + long key_code = map_to_unmodified_wx_keysym( gdk_event ); /* sending unknown key events doesn't really make sense */ if (key_code == 0) return FALSE; @@ -1467,7 +1543,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED( case 0: // another our window just lost focus, it was already ours before - // - don't send any wxActivateEvent + // - don't send any wxActivateAppEvent g_sendActivateEvent = -1; break; } @@ -1494,13 +1570,32 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED( gdk_im_begin(win->m_ic, win->m_wxwindow->window); #endif +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnSetFocus(); + } +#endif // wxUSE_CARET + + + if (win->IsTopLevel()) + { + wxActivateEvent event( wxEVT_ACTIVATE, TRUE, win->GetId() ); + event.SetEventObject( win ); + + // ignore return value + win->GetEventHandler()->ProcessEvent( event ); + } + wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); event.SetEventObject( win ); if (win->GetEventHandler()->ProcessEvent( event )) { - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); - return TRUE; + gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); + return TRUE; } return FALSE; @@ -1525,6 +1620,10 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED // g_sendActivateEvent to -1 g_sendActivateEvent = 0; + wxWindow *winFocus = FindFocusedChild(win); + if ( winFocus ) + win = winFocus; + g_focusWindow = (wxWindow *)NULL; /* @@ -1539,6 +1638,24 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED gdk_im_end(); #endif +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnKillFocus(); + } +#endif // wxUSE_CARET + + if (win->IsTopLevel()) + { + wxActivateEvent event( wxEVT_ACTIVATE, FALSE, win->GetId() ); + event.SetEventObject( win ); + + // ignore return value + win->GetEventHandler()->ProcessEvent( event ); + } + wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() ); event.SetEventObject( win ); @@ -1817,7 +1934,7 @@ gtk_window_realized_callback( GtkWidget *WXUNUSED(m_widget), wxWindow *win ) wxWindowCreateEvent event( win ); event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( event ); - + return FALSE; } @@ -1914,22 +2031,22 @@ gtk_wxwindow_realized_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), GdkIMStyle style; GdkIMStyle supported_style = (GdkIMStyle) (GDK_IM_PREEDIT_NONE | - GDK_IM_PREEDIT_NOTHING | - GDK_IM_PREEDIT_POSITION | - GDK_IM_STATUS_NONE | - GDK_IM_STATUS_NOTHING); + GDK_IM_PREEDIT_NOTHING | + GDK_IM_PREEDIT_POSITION | + GDK_IM_STATUS_NONE | + GDK_IM_STATUS_NOTHING); if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) - supported_style = (GdkIMStyle)(supported_style & ~GDK_IM_PREEDIT_POSITION); + supported_style = (GdkIMStyle)(supported_style & ~GDK_IM_PREEDIT_POSITION); attr->style = style = gdk_im_decide_style (supported_style); attr->client_window = widget->window; if ((colormap = gtk_widget_get_colormap (widget)) != - gtk_widget_get_default_colormap ()) + gtk_widget_get_default_colormap ()) { - attrmask |= GDK_IC_PREEDIT_COLORMAP; - attr->preedit_colormap = colormap; + attrmask |= GDK_IC_PREEDIT_COLORMAP; + attr->preedit_colormap = colormap; } attrmask |= GDK_IC_PREEDIT_FOREGROUND; @@ -1939,40 +2056,40 @@ gtk_wxwindow_realized_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), switch (style & GDK_IM_PREEDIT_MASK) { - case GDK_IM_PREEDIT_POSITION: - if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) - { - g_warning ("over-the-spot style requires fontset"); - break; - } + case GDK_IM_PREEDIT_POSITION: + if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) + { + g_warning ("over-the-spot style requires fontset"); + break; + } - gdk_window_get_size (widget->window, &width, &height); + gdk_window_get_size (widget->window, &width, &height); - attrmask |= GDK_IC_PREEDIT_POSITION_REQ; - attr->spot_location.x = 0; - attr->spot_location.y = height; - attr->preedit_area.x = 0; - attr->preedit_area.y = 0; - attr->preedit_area.width = width; - attr->preedit_area.height = height; - attr->preedit_fontset = widget->style->font; + attrmask |= GDK_IC_PREEDIT_POSITION_REQ; + attr->spot_location.x = 0; + attr->spot_location.y = height; + attr->preedit_area.x = 0; + attr->preedit_area.y = 0; + attr->preedit_area.width = width; + attr->preedit_area.height = height; + attr->preedit_fontset = widget->style->font; - break; + break; } win->m_ic = gdk_ic_new (attr, (GdkICAttributesType)attrmask); if (win->m_ic == NULL) - g_warning ("Can't create input context."); + g_warning ("Can't create input context."); else - { - mask = gdk_window_get_events (widget->window); - mask = (GdkEventMask)(mask | gdk_ic_get_events (win->m_ic)); - gdk_window_set_events (widget->window, mask); + { + mask = gdk_window_get_events (widget->window); + mask = (GdkEventMask)(mask | gdk_ic_get_events (win->m_ic)); + gdk_window_set_events (widget->window, mask); - if (GTK_WIDGET_HAS_FOCUS(widget)) - gdk_im_begin (win->m_ic, widget->window); - } + if (GTK_WIDGET_HAS_FOCUS(widget)) + gdk_im_begin (win->m_ic, widget->window); + } #endif return FALSE; @@ -2062,10 +2179,12 @@ void wxWindow::Init() m_acceptsFocus = FALSE; m_clipPaintRegion = FALSE; - m_queuedFullRedraw = FALSE; m_cursor = *wxSTANDARD_CURSOR; + m_delayedForegroundColour = FALSE; + m_delayedBackgroundColour = FALSE; + #ifdef HAVE_XIM m_ic = (GdkIC*) NULL; m_icattr = (GdkICAttr*) NULL; @@ -2098,7 +2217,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, } m_insertCallback = wxInsertChildInWindow; - + m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); @@ -2216,6 +2335,9 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, wxWindow::~wxWindow() { + if (g_focusWindow == this) + g_focusWindow = NULL; + m_isBeingDeleted = TRUE; m_hasVMT = FALSE; @@ -2240,7 +2362,7 @@ wxWindow::~wxWindow() // don't delete if it's a pixmap theme style if (!m_widgetStyle->engine_data) gtk_style_unref( m_widgetStyle ); -#endif +#endif m_widgetStyle = (GtkStyle*) NULL; } @@ -2298,17 +2420,20 @@ void wxWindow::PostCreation() if (!m_noExpose) { /* these get reported to wxWindows -> wxPaintEvent */ - - gtk_pizza_set_external( GTK_PIZZA(m_wxwindow), TRUE ); - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "event", - GTK_SIGNAL_FUNC(gtk_window_event_event_callback), (gpointer)this ); + gtk_pizza_set_external( GTK_PIZZA(m_wxwindow), TRUE ); gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event", GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw", GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); + + if (HasFlag(wxNO_FULL_REPAINT_ON_RESIZE)) + { + gtk_signal_connect( GTK_OBJECT(m_wxwindow), "event", + GTK_SIGNAL_FUNC(gtk_window_event_event_callback), (gpointer)this ); + } } #if (GTK_MINOR_VERSION > 0) @@ -2332,7 +2457,7 @@ void wxWindow::PostCreation() else { // For dialogs and frames, we are interested mainly in - // m_widget's focus. + // m_widget's focus. gtk_signal_connect( GTK_OBJECT(m_widget), "focus_in_event", GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this ); @@ -2403,24 +2528,6 @@ bool wxWindow::Destroy() void wxWindow::DoMoveWindow(int x, int y, int width, int height) { - if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window) - { - /* Normally, GTK will send expose events only for the regions - which actually got exposed. Sadly, wxMSW invalidates - the whole window so we have to do that, too. We could - simply add a complete refresh, but we would then get - the normal GTK expose events in surplus, so we shut - off the expose events and schedule a full redraw to - be done in OnInternalIdle, where we restore the handling - of expose events. */ - - m_queuedFullRedraw = TRUE; - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask & ~GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height ); } @@ -2431,7 +2538,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) if (m_resizing) return; /* I don't like recursions */ m_resizing = TRUE; - + if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook */ { /* don't set the size for children of wxNotebook, just take the values. */ @@ -2492,7 +2599,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) if (m_hasScrolling) { - /* Sometimes the client area changes size without the + /* Sometimes the client area changes size without the whole windows's size changing, but if the whole windows's size doesn't change, no wxSizeEvent will normally be sent. Here we add an extra test if @@ -2527,7 +2634,7 @@ void wxWindow::OnInternalIdle() // do it only once g_sendActivateEvent = -1; - wxActivateEvent event(wxEVT_ACTIVATE, activate, GetId()); + wxActivateEvent event(wxEVT_ACTIVATE_APP, activate, GetId()); event.SetEventObject(this); (void)GetEventHandler()->ProcessEvent(event); @@ -2568,33 +2675,6 @@ void wxWindow::OnInternalIdle() } UpdateWindowUI(); - - if (m_queuedFullRedraw) - { - /* See also wxWindow::DoMoveWindow for explanation of this code. What - we test here is if the requested size of the window is the same as - the actual size of window, in which case all expose events that resulted - from resizing the window have been sent (and discarded) and we can - now do our full redraw and switch on expose event handling again. */ - - bool child_already_resized = FALSE; - if (m_isFrame) - child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow ); - else - child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget ); - - if (child_already_resized) - { - m_queuedFullRedraw = FALSE; - m_updateRegion.Clear(); - m_updateRegion.Union( 0,0,m_width,m_height ); - gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL ); - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask | GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - } } void wxWindow::DoGetSize( int *width, int *height ) const @@ -2986,7 +3066,16 @@ bool wxWindow::SetCursor( const wxCursor &cursor ) { wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") ); - return wxWindowBase::SetCursor( cursor ); + if (cursor == m_cursor) + return FALSE; + + if (g_isIdle) + wxapp_install_idle_handler(); + + if (cursor == wxNullCursor) + return wxWindowBase::SetCursor( *wxSTANDARD_CURSOR ); + else + return wxWindowBase::SetCursor( cursor ); } void wxWindow::WarpPointer( int x, int y ) @@ -3253,6 +3342,21 @@ void wxWindow::SetWidgetStyle() style->fg[GTK_STATE_PRELIGHT] = *m_foregroundColour.GetColor(); style->fg[GTK_STATE_ACTIVE] = *m_foregroundColour.GetColor(); } + else + { + // Try to restore the gtk default style. This is still a little + // oversimplified for what is probably really needed here for controls + // other than buttons, but is better than not being able to (re)set a + // control's foreground colour to *wxBLACK -- RL + GtkStyle *def = gtk_rc_get_style( m_widget ); + + if (!def) + def = gtk_widget_get_default_style(); + + style->fg[GTK_STATE_NORMAL] = def->fg[GTK_STATE_NORMAL]; + style->fg[GTK_STATE_PRELIGHT] = def->fg[GTK_STATE_PRELIGHT]; + style->fg[GTK_STATE_ACTIVE] = def->fg[GTK_STATE_ACTIVE]; + } } if (m_backgroundColour.Ok()) @@ -3268,7 +3372,29 @@ void wxWindow::SetWidgetStyle() style->base[GTK_STATE_ACTIVE] = *m_backgroundColour.GetColor(); style->bg[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor(); style->base[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor(); - } + } + else + { + // Try to restore the gtk default style. This is still a little + // oversimplified for what is probably really needed here for controls + // other than buttons, but is better than not being able to (re)set a + // control's background colour to default grey and means resetting a + // button to wxSYS_COLOUR_BTNFACE will restore its usual highlighting + // behavior -- RL + GtkStyle *def = gtk_rc_get_style( m_widget ); + + if (!def) + def = gtk_widget_get_default_style(); + + style->bg[GTK_STATE_NORMAL] = def->bg[GTK_STATE_NORMAL]; + style->base[GTK_STATE_NORMAL] = def->base[GTK_STATE_NORMAL]; + style->bg[GTK_STATE_PRELIGHT] = def->bg[GTK_STATE_PRELIGHT]; + style->base[GTK_STATE_PRELIGHT] = def->base[GTK_STATE_PRELIGHT]; + style->bg[GTK_STATE_ACTIVE] = def->bg[GTK_STATE_ACTIVE]; + style->base[GTK_STATE_ACTIVE] = def->base[GTK_STATE_ACTIVE]; + style->bg[GTK_STATE_INSENSITIVE] = def->bg[GTK_STATE_INSENSITIVE]; + style->base[GTK_STATE_INSENSITIVE] = def->base[GTK_STATE_INSENSITIVE]; + } } } @@ -3619,14 +3745,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") ); - + if ((dx == 0) && (dy == 0)) return; m_clipPaintRegion = TRUE; gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy ); m_clipPaintRegion = FALSE; - -/* + +/* if (m_children.GetCount() > 0) { gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy ); @@ -3634,10 +3760,10 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) else { GtkPizza *pizza = GTK_PIZZA(m_wxwindow); - + pizza->xoffset -= dx; pizza->yoffset -= dy; - + GdkGC *m_scrollGC = gdk_gc_new( pizza->bin_window ); gdk_gc_set_exposures( m_scrollGC, TRUE ); @@ -3650,7 +3776,7 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) if ((h < 0) || (w < 0)) { Refresh(); - } + } else { int s_x = 0; @@ -3673,7 +3799,7 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) Refresh( TRUE, &rect ); } - + gdk_gc_unref( m_scrollGC ); } */ diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 6369b7d3a7..bd48405b54 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -49,7 +49,8 @@ wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NUL extern bool g_isIdle; -bool g_mainThreadLocked = FALSE; +bool g_mainThreadLocked = FALSE; +gint g_pendingTag = 0; GtkWidget *wxRootWindow = (GtkWidget*) NULL; @@ -59,6 +60,7 @@ GtkWidget *wxRootWindow = (GtkWidget*) NULL; /* forward declaration */ gint wxapp_idle_callback( gpointer WXUNUSED(data) ); +gint wxapp_pending_callback( gpointer WXUNUSED(data) ); void wxapp_install_idle_handler(); #if wxUSE_THREADS @@ -78,27 +80,29 @@ void wxExit() // wxYield //----------------------------------------------------------------------------- +static bool gs_inYield = FALSE; + bool wxYield() { - bool has_idle = (wxTheApp->m_idleTag != 0); +#ifdef __WXDEBUG__ + if (gs_inYield) + wxFAIL_MSG( wxT("wxYield called recursively" ) ); +#endif + + gs_inYield = TRUE; - if (has_idle) + if (!g_isIdle) { - /* We need to temporarily remove idle callbacks or the loop will - never finish. */ + // We need to remove idle callbacks or the loop will + // never finish. gtk_idle_remove( wxTheApp->m_idleTag ); wxTheApp->m_idleTag = 0; + g_isIdle = TRUE; } while (gtk_events_pending()) gtk_main_iteration(); - if (has_idle) - { - /* re-add idle handler (very low priority) */ - wxTheApp->m_idleTag = gtk_idle_add_priority( 500, wxapp_idle_callback, (gpointer) NULL ); - } - // disable log flushing from here because a call to wxYield() shouldn't // normally result in message boxes popping up &c wxLog::Suspend(); @@ -106,15 +110,29 @@ bool wxYield() /* it's necessary to call ProcessIdle() to update the frames sizes which might have been changed (it also will update other things set from OnUpdateUI() which is a nice (and desired) side effect) */ - while (wxTheApp->ProcessIdle()) - ; + while (wxTheApp->ProcessIdle()) { } // let the logs be flashed again wxLog::Resume(); + gs_inYield = FALSE; + return TRUE; } +//----------------------------------------------------------------------------- +// wxYieldIfNeeded +// Like wxYield, but fails silently if the yield is recursive. +//----------------------------------------------------------------------------- + +bool wxYieldIfNeeded() +{ + if (gs_inYield) + return FALSE; + + return wxYield(); +} + //----------------------------------------------------------------------------- // wxWakeUpIdle //----------------------------------------------------------------------------- @@ -139,55 +157,89 @@ void wxWakeUpIdle() // local functions //----------------------------------------------------------------------------- -gint wxapp_idle_callback( gpointer WXUNUSED(data) ) +gint wxapp_pending_callback( gpointer WXUNUSED(data) ) { if (!wxTheApp) return TRUE; - + // when getting called from GDK's time-out handler // we are no longer within GDK's grab on the GUI // thread so we must lock it here ourselves gdk_threads_enter(); - /* we don't want any more idle events until the next event is - sent to wxGTK */ - gtk_idle_remove( wxTheApp->m_idleTag ); - wxTheApp->m_idleTag = 0; + // Sent idle event to all who request them + wxTheApp->ProcessPendingEvents(); - /* indicate that we are now in idle mode - even so deeply + g_pendingTag = 0; + + // flush the logged messages if any +#if wxUSE_LOG + wxLog::FlushActive(); +#endif // wxUSE_LOG + + // Release lock again + gdk_threads_leave(); + + // Return FALSE to indicate that no more idle events are + // to be sent (single shot instead of continuous stream) + return FALSE; +} + +gint wxapp_idle_callback( gpointer WXUNUSED(data) ) +{ + if (!wxTheApp) return TRUE; + + // when getting called from GDK's time-out handler + // we are no longer within GDK's grab on the GUI + // thread so we must lock it here ourselves + gdk_threads_enter(); + + /* Indicate that we are now in idle mode - even so deeply in idle mode that we don't get any idle events anymore. this is like wxMSW where an idle event is sent only once each time after the event queue has been completely emptied */ g_isIdle = TRUE; + wxTheApp->m_idleTag = 0; - /* sent idle event to all who request them */ + // Sent idle event to all who request them while (wxTheApp->ProcessIdle()) { } - // release lock again + // Release lock again gdk_threads_leave(); - return TRUE; + // Return FALSE to indicate that no more idle events are + // to be sent (single shot instead of continuous stream) + return FALSE; } void wxapp_install_idle_handler() { wxASSERT_MSG( wxTheApp->m_idleTag == 0, wxT("attempt to install idle handler twice") ); + g_isIdle = FALSE; + + if (g_pendingTag == 0) + g_pendingTag = gtk_idle_add_priority( 900, wxapp_pending_callback, (gpointer) NULL ); + /* This routine gets called by all event handlers indicating that the idle is over. It may also get called from other thread for sending events to the main thread (and processing these in idle time). Very low priority. */ - wxTheApp->m_idleTag = gtk_idle_add_priority( 500, wxapp_idle_callback, (gpointer) NULL ); - - g_isIdle = FALSE; + wxTheApp->m_idleTag = gtk_idle_add_priority( 1000, wxapp_idle_callback, (gpointer) NULL ); } #if wxUSE_THREADS +static int g_threadUninstallLevel = 0; + void wxapp_install_thread_wakeup() { + g_threadUninstallLevel++; + + if (g_threadUninstallLevel != 1) return; + if (wxTheApp->m_wakeUpTimerTag) return; wxTheApp->m_wakeUpTimerTag = gtk_timeout_add( 50, wxapp_wakeup_timerout_callback, (gpointer) NULL ); @@ -195,6 +247,10 @@ void wxapp_install_thread_wakeup() void wxapp_uninstall_thread_wakeup() { + g_threadUninstallLevel--; + + if (g_threadUninstallLevel != 0) return; + if (!wxTheApp->m_wakeUpTimerTag) return; gtk_timeout_remove( wxTheApp->m_wakeUpTimerTag ); @@ -250,7 +306,8 @@ wxApp::wxApp() m_topWindow = (wxWindow *) NULL; m_exitOnFrameDelete = TRUE; - m_idleTag = gtk_idle_add_priority( 500, wxapp_idle_callback, (gpointer) NULL ); + m_idleTag = 0; + wxapp_install_idle_handler(); #if wxUSE_THREADS m_wakeUpTimerTag = 0; @@ -365,31 +422,26 @@ void wxApp::OnIdle( wxIdleEvent &event ) { static bool s_inOnIdle = FALSE; - /* Avoid recursion (via ProcessEvent default case) */ + // Avoid recursion (via ProcessEvent default case) if (s_inOnIdle) return; s_inOnIdle = TRUE; - /* Resend in the main thread events which have been prepared in other - threads */ + // Resend in the main thread events which have been prepared in other + // threads ProcessPendingEvents(); - /* 'Garbage' collection of windows deleted with Close(). */ + // 'Garbage' collection of windows deleted with Close(). DeletePendingObjects(); - /* Send OnIdle events to all windows */ + // Send OnIdle events to all windows bool needMore = SendIdleEvents(); if (needMore) event.RequestMore(TRUE); s_inOnIdle = FALSE; - - /* flush the logged messages if any */ -#if wxUSE_LOG - wxLog::FlushActive(); -#endif // wxUSE_LOG } bool wxApp::SendIdleEvents() @@ -415,7 +467,7 @@ bool wxApp::SendIdleEvents( wxWindow* win ) wxIdleEvent event; event.SetEventObject(win); - win->ProcessEvent(event); + win->GetEventHandler()->ProcessEvent(event); win->OnInternalIdle(); diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 38d20c606c..ed3595f860 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -20,6 +20,16 @@ #include #include +extern void gdk_wx_draw_bitmap (GdkDrawable *drawable, + GdkGC *gc, + GdkDrawable *src, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height); + //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- @@ -100,14 +110,14 @@ bool wxMask::Create( const wxBitmap& bitmap, if (bpp == 15) { red = red & 0xf8; - blue = blue & 0xf8; green = green & 0xf8; + blue = blue & 0xf8; } if (bpp == 16) { red = red & 0xf8; - blue = blue & 0xfc; - green = green & 0xf8; + green = green & 0xfc; + blue = blue & 0xf8; } color.red = 0; @@ -180,7 +190,7 @@ bool wxMask::Create( const wxBitmap& bitmap ) GdkGC *gc = gdk_gc_new( m_bitmap ); - gdk_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() ); + gdk_wx_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() ); gdk_gc_unref( gc ); @@ -351,12 +361,12 @@ wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) return *this; } -bool wxBitmap::operator == ( const wxBitmap& bmp ) +bool wxBitmap::operator == ( const wxBitmap& bmp ) const { return m_refData == bmp.m_refData; } -bool wxBitmap::operator != ( const wxBitmap& bmp ) +bool wxBitmap::operator != ( const wxBitmap& bmp ) const { return m_refData != bmp.m_refData; } @@ -422,7 +432,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const else { GdkGC *gc = gdk_gc_new( ret.GetBitmap() ); - gdk_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height ); + gdk_wx_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height ); gdk_gc_destroy( gc ); } @@ -432,7 +442,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const mask->m_bitmap = gdk_pixmap_new( wxRootWindow->window, rect.width, rect.height, 1 ); GdkGC *gc = gdk_gc_new( mask->m_bitmap ); - gdk_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height ); + gdk_wx_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height ); gdk_gc_destroy( gc ); ret.SetMask( mask ); diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 32ac3f8575..3588771f0f 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: bmpbuttn.cpp +// Name: gtk/bmpbuttn.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -43,12 +43,12 @@ extern bool g_blockEventsOnDrag; static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitmapButton *button ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - + wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); event.SetEventObject(button); button->GetEventHandler()->ProcessEvent(event); @@ -63,7 +63,7 @@ static void gtk_bmpbutton_enter_callback( GtkWidget *WXUNUSED(widget), wxBitmapB if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->HasFocus(); + button->HasFocus(); } //----------------------------------------------------------------------------- @@ -75,7 +75,7 @@ static void gtk_bmpbutton_leave_callback( GtkWidget *WXUNUSED(widget), wxBitmapB if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->NotFocus(); + button->NotFocus(); } //----------------------------------------------------------------------------- @@ -87,7 +87,7 @@ static void gtk_bmpbutton_press_callback( GtkWidget *WXUNUSED(widget), wxBitmapB if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->StartSelect(); + button->StartSelect(); } //----------------------------------------------------------------------------- @@ -99,7 +99,7 @@ static void gtk_bmpbutton_release_callback( GtkWidget *WXUNUSED(widget), wxBitma if (!button->m_hasVMT) return; if (g_blockEventsOnDrag) return; - button->EndSelect(); + button->EndSelect(); } //----------------------------------------------------------------------------- @@ -113,29 +113,30 @@ wxBitmapButton::wxBitmapButton() } bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, - const wxPoint &pos, const wxSize &size, + const wxPoint &pos, const wxSize &size, long style, const wxValidator& validator, const wxString &name ) { m_needParent = TRUE; m_acceptsFocus = TRUE; - + + m_marginX = + m_marginY = 0; + if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxBitmapButton creation failed") ); - return FALSE; + return FALSE; } m_bitmap = bitmap; m_disabled = bitmap; m_focus = bitmap; m_selected = bitmap; - - m_label = ""; - + m_widget = gtk_button_new(); -#if (GTK_MINOR_VERSION > 0) +#if (GTK_MINOR_VERSION > 0) if (style & wxNO_BORDER) gtk_button_set_relief( GTK_BUTTON(m_widget), GTK_RELIEF_NONE ); #endif @@ -143,49 +144,41 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi if (m_bitmap.Ok()) { wxSize newSize = size; - - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); - GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); - - gtk_widget_show( pixmap ); - gtk_container_add( GTK_CONTAINER(m_widget), pixmap ); - - int border = 10; - if (style & wxNO_BORDER) border = 4; + int border = (style & wxNO_BORDER) ? 4 : 10; if (newSize.x == -1) newSize.x = m_bitmap.GetWidth()+border; if (newSize.y == -1) newSize.y = m_bitmap.GetHeight()+border; SetSize( newSize.x, newSize.y ); + SetBitmap(); } - - gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", + + gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", GTK_SIGNAL_FUNC(gtk_bmpbutton_clicked_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "enter", + gtk_signal_connect( GTK_OBJECT(m_widget), "enter", GTK_SIGNAL_FUNC(gtk_bmpbutton_enter_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "leave", + gtk_signal_connect( GTK_OBJECT(m_widget), "leave", GTK_SIGNAL_FUNC(gtk_bmpbutton_leave_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "pressed", + gtk_signal_connect( GTK_OBJECT(m_widget), "pressed", GTK_SIGNAL_FUNC(gtk_bmpbutton_press_callback), (gpointer*)this ); - gtk_signal_connect( GTK_OBJECT(m_widget), "released", + gtk_signal_connect( GTK_OBJECT(m_widget), "released", GTK_SIGNAL_FUNC(gtk_bmpbutton_release_callback), (gpointer*)this ); - + m_parent->DoAddChild( this ); - + PostCreation(); - + SetBackgroundColour( parent->GetBackgroundColour() ); Show( TRUE ); - + return TRUE; } - + void wxBitmapButton::SetDefault() { GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT ); gtk_widget_grab_default( m_widget ); - + SetSize( m_x, m_y, m_width, m_height ); } @@ -205,6 +198,9 @@ wxString wxBitmapButton::GetLabel() const void wxBitmapButton::ApplyWidgetStyle() { + if (GTK_BUTTON(m_widget)->child == NULL) return; + + wxButton::ApplyWidgetStyle(); } void wxBitmapButton::SetBitmap() @@ -212,51 +208,46 @@ void wxBitmapButton::SetBitmap() wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); wxBitmap the_one; - - if (!m_isEnabled) + if (!m_isEnabled) the_one = m_disabled; - else - { - if (m_isSelected) - { - the_one = m_selected; - } - else - { - if (m_hasFocus) - the_one = m_focus; - else - the_one = m_bitmap; - } - } + else if (m_isSelected) + the_one = m_selected; + else if (m_hasFocus) + the_one = m_focus; + else + the_one = m_bitmap; if (!the_one.Ok()) the_one = m_bitmap; if (!the_one.Ok()) return; - - GtkButton *bin = GTK_BUTTON( m_widget ); - GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child ); - + GdkBitmap *mask = (GdkBitmap *) NULL; if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap(); - - gtk_pixmap_set( g_pixmap, the_one.GetPixmap(), mask ); + + GtkButton *bin = GTK_BUTTON(m_widget); + if (bin->child == NULL) + { // initial bitmap + GtkWidget *pixmap = gtk_pixmap_new(the_one.GetPixmap(), mask); + gtk_widget_show(pixmap); + gtk_container_add(GTK_CONTAINER(m_widget), pixmap); + } + else + { // subsequent bitmaps + GtkPixmap *g_pixmap = GTK_PIXMAP(bin->child); + gtk_pixmap_set(g_pixmap, the_one.GetPixmap(), mask); + } } -void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap ) +void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); + if (!bitmap.Ok()) return; + m_disabled = bitmap; - if ( ! m_disabled.Ok() ) return; - m_disabled = bitmap; - - SetBitmap(); + SetBitmap(); } -void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) +void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); - - if ( ! m_focus.Ok() ) return; + if (!bitmap.Ok()) return; m_focus = bitmap; SetBitmap(); @@ -264,19 +255,15 @@ void wxBitmapButton::SetBitmapFocus( const wxBitmap& bitmap ) void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); - - if (!m_bitmap.Ok()) return; + if (!bitmap.Ok()) return; m_bitmap = bitmap; - + SetBitmap(); } void wxBitmapButton::SetBitmapSelected( const wxBitmap& bitmap ) { - wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); - - if ( ! m_selected.Ok() ) return; + if (!bitmap.Ok()) return; m_selected = bitmap; SetBitmap(); @@ -315,5 +302,6 @@ void wxBitmapButton::EndSelect() m_isSelected = FALSE; SetBitmap(); } -#endif + +#endif // wxUSE_BMPBUTTON diff --git a/src/gtk1/brush.cpp b/src/gtk1/brush.cpp index b58261b95c..70a2790e4a 100644 --- a/src/gtk1/brush.cpp +++ b/src/gtk1/brush.cpp @@ -96,12 +96,12 @@ wxBrush& wxBrush::operator = ( const wxBrush& brush ) return *this; } -bool wxBrush::operator == ( const wxBrush& brush ) +bool wxBrush::operator == ( const wxBrush& brush ) const { return m_refData == brush.m_refData; } -bool wxBrush::operator != ( const wxBrush& brush ) +bool wxBrush::operator != ( const wxBrush& brush ) const { return m_refData != brush.m_refData; } diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index 4fd565e8dc..1621bbe03e 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -103,7 +103,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, */ m_widget = gtk_button_new_with_label(""); - + SetLabel( label ); #if (GTK_MINOR_VERSION > 0) @@ -182,6 +182,7 @@ void wxButton::ApplyWidgetStyle() wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); + ret.x += 6; if (ret.x < 80) ret.x = 80; return ret; } diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index bfd34502bd..3188efb475 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -212,7 +212,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event ) /* the clipboard is no longer in our hands. we can the delete clipboard data. */ if (wxTheClipboard->m_data) { - wxLogDebug( wxT("wxClipboard will get cleared" ) ); + wxLogTrace(TRACE_CLIPBOARD, wxT("wxClipboard will get cleared" )); delete wxTheClipboard->m_data; wxTheClipboard->m_data = (wxDataObject*) NULL; @@ -590,7 +590,8 @@ bool wxClipboard::GetData( wxDataObject& data ) m_waiting = TRUE; - wxLogDebug( wxT("wxClipboard::GetData: format found, start convert") ); + wxLogTrace( TRACE_CLIPBOARD, + wxT("wxClipboard::GetData: format found, start convert") ); gtk_selection_convert( m_clipboardWidget, m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY @@ -608,7 +609,8 @@ bool wxClipboard::GetData( wxDataObject& data ) return TRUE; } - wxLogDebug( wxT("wxClipboard::GetData: format not found") ); + wxLogTrace( TRACE_CLIPBOARD, + wxT("wxClipboard::GetData: format not found") ); /* return failure */ delete[] array; diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index db73e73343..60fec81d01 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -23,17 +23,39 @@ class wxColourRefData: public wxObjectRefData { - public: - +public: wxColourRefData(); ~wxColourRefData(); + void FreeColour(); + void AllocColour( GdkColormap* cmap ); + +private: + friend class wxColour; GdkColor m_color; GdkColormap *m_colormap; bool m_hasPixel; + + // reference counter for systems with <= 8-Bit display + static gushort colMapAllocCounter[ 256 ]; +}; - friend wxColour; +gushort wxColourRefData::colMapAllocCounter[ 256 ] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; wxColourRefData::wxColourRefData() @@ -53,7 +75,41 @@ wxColourRefData::~wxColourRefData() void wxColourRefData::FreeColour() { -// if (m_hasPixel) gdk_colors_free( m_colormap, &m_color, 1, 0 ); + if (m_colormap) + { + GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) m_colormap; + if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || + (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) + { + int idx = m_color.pixel; + colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] - 1; + + if (colMapAllocCounter[ idx ] == 0) + gdk_colormap_free_colors( m_colormap, &m_color, 1 ); + } + } +} + +void wxColourRefData::AllocColour( GdkColormap *cmap ) +{ + if (m_hasPixel && (m_colormap == cmap)) + return; + + FreeColour(); + + GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; + if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || + (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) + { + m_hasPixel = gdk_colormap_alloc_color( cmap, &m_color, FALSE, TRUE ); + int idx = m_color.pixel; + colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] + 1; + } + else + { + m_hasPixel = gdk_color_alloc( cmap, &m_color ); + } + m_colormap = cmap; } //----------------------------------------------------------------------------- @@ -133,7 +189,7 @@ bool wxColour::operator == ( const wxColour& col ) const bool wxColour::operator != ( const wxColour& col) const { - return m_refData != col.m_refData; + return !(*this == col); } void wxColour::Set( unsigned char red, unsigned char green, unsigned char blue ) @@ -176,36 +232,7 @@ void wxColour::CalcPixel( GdkColormap *cmap ) { if (!Ok()) return; - if ((M_COLDATA->m_hasPixel) && (M_COLDATA->m_colormap == cmap)) return; - - M_COLDATA->FreeColour(); - - GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; - if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || - (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) - { - GdkColor *colors = cmap->colors; - int max = 3 * (65536); - int index = -1; - - for (int i = 0; i < cmap->size; i++) - { - int rdiff = (M_COLDATA->m_color.red - colors[i].red); - int gdiff = (M_COLDATA->m_color.green - colors[i].green); - int bdiff = (M_COLDATA->m_color.blue - colors[i].blue); - int sum = ABS (rdiff) + ABS (gdiff) + ABS (bdiff); - if (sum < max) { index = i; max = sum; } - } - - M_COLDATA->m_hasPixel = TRUE; - M_COLDATA->m_color.pixel = index; - } - else - { - M_COLDATA->m_hasPixel = gdk_color_alloc( cmap, &M_COLDATA->m_color ); - } - - M_COLDATA->m_colormap = cmap; + M_COLDATA->AllocColour( cmap ); } int wxColour::GetPixel() const @@ -222,4 +249,3 @@ GdkColor *wxColour::GetColor() const return &M_COLDATA->m_color; } - diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 40e9370a10..55d5ee20e2 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -111,7 +111,11 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, m_widget = gtk_combo_new(); // make it more useable - gtk_combo_set_use_arrows_always(GTK_COMBO(m_widget), TRUE); + gtk_combo_set_use_arrows_always( GTK_COMBO(m_widget), TRUE ); + + // and case-sensitive + gtk_combo_set_case_sensitive( GTK_COMBO(m_widget), TRUE ); + GtkWidget *list = GTK_COMBO(m_widget)->list; @@ -157,7 +161,12 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, if (new_size.y > size_best.y) new_size.y = size_best.y; if ((new_size.x != size.x) || (new_size.y != size.y)) + { SetSize( new_size.x, new_size.y ); + + // This is required for tool bar support + gtk_widget_set_usize( m_widget, new_size.x, new_size.y ); + } SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOW ) ); SetForegroundColour( parent->GetForegroundColour() ); @@ -266,7 +275,7 @@ wxClientData* wxComboBox::GetClientObject( int n ) { wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") ); - wxNode *node = m_clientDataList.Nth( n ); + wxNode *node = m_clientObjectList.Nth( n ); if (!node) return (wxClientData*) NULL; return (wxClientData*) node->Data(); @@ -577,6 +586,7 @@ void wxComboBox::OnChar( wxKeyEvent &event ) if ( FindString(value) == wxNOT_FOUND ) { Append(value); + SetStringSelection(value); // and generate the selected event for it wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() ); diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index 80f7c26d60..ab354921ed 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -14,6 +14,7 @@ #include "wx/cursor.h" #include "wx/utils.h" +#include "wx/app.h" #include @@ -155,6 +156,16 @@ extern wxCursor g_globalCursor; static wxCursor gs_savedCursor; static int gs_busyCount = 0; +const wxCursor &wxBusyCursor::GetStoredCursor() +{ + return gs_savedCursor; +} + +const wxCursor wxBusyCursor::GetBusyCursor() +{ + return wxCursor(wxCURSOR_WATCH); +} + void wxEndBusyCursor() { if (--gs_busyCount > 0) @@ -163,7 +174,8 @@ void wxEndBusyCursor() wxSetCursor( gs_savedCursor ); gs_savedCursor = wxNullCursor; - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) @@ -178,7 +190,8 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) wxSetCursor( wxCursor(wxCURSOR_WATCH) ); - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } bool wxIsBusy() diff --git a/src/gtk1/data.cpp b/src/gtk1/data.cpp index abf1e939c0..dc6b6523a8 100644 --- a/src/gtk1/data.cpp +++ b/src/gtk1/data.cpp @@ -54,12 +54,6 @@ bool g_isIdle = FALSE; /* Message Strings for Internationalization */ char **wx_msg_str = (char**)NULL; -/* Custom OS version, as optionally placed in wx.ini/.wxrc - * Currently this can be Win95, Windows, Win32s, WinNT. - * For some systems, you can't tell until run-time what services you - * have. See wxGetOsVersion, which uses this string if present. */ -char *wxOsVersion = (char *) NULL; - /* For printing several pages */ int wxPageNumber; diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index d96bfe8a6d..3e9e7584f9 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -42,6 +42,10 @@ #include "cross.xbm" #define num_hatches 6 +#define IS_15_PIX_HATCH(s) ((s)==wxCROSSDIAG_HATCH || (s)==wxHORIZONTAL_HATCH || (s)==wxVERTICAL_HATCH) +#define IS_16_PIX_HATCH(s) ((s)!=wxCROSSDIAG_HATCH && (s)!=wxHORIZONTAL_HATCH && (s)!=wxVERTICAL_HATCH) + + static GdkPixmap *hatches[num_hatches]; static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL; @@ -68,7 +72,7 @@ static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } #include "gdk/gdkprivate.h" -void gdk_draw_bitmap (GdkDrawable *drawable, +void gdk_wx_draw_bitmap (GdkDrawable *drawable, GdkGC *gc, GdkDrawable *src, gint xsrc, @@ -122,7 +126,11 @@ enum wxPoolGCType wxTEXT_COLOUR, wxBG_COLOUR, wxPEN_COLOUR, - wxBRUSH_COLOUR + wxBRUSH_COLOUR, + wxTEXT_SCREEN, + wxBG_SCREEN, + wxPEN_SCREEN, + wxBRUSH_SCREEN }; struct wxGC @@ -267,6 +275,14 @@ void wxWindowDC::SetUpDC() wxASSERT_MSG( !m_penGC, wxT("GCs already created") ); + if (m_isScreenDC) + { + m_penGC = wxGetPoolGC( m_window, wxPEN_SCREEN ); + m_brushGC = wxGetPoolGC( m_window, wxBRUSH_SCREEN ); + m_textGC = wxGetPoolGC( m_window, wxTEXT_SCREEN ); + m_bgGC = wxGetPoolGC( m_window, wxBG_SCREEN ); + } + else if (m_isMemDC && (((wxMemoryDC*)this)->m_selected.GetDepth() == 1)) { m_penGC = wxGetPoolGC( m_window, wxPEN_MONO ); @@ -445,6 +461,18 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, gdk_draw_arc( m_window, m_textGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, @@ -460,7 +488,12 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, } if (m_pen.GetStyle() != wxTRANSPARENT) + { gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); + + gdk_draw_line( m_window, m_penGC, xx1, yy1, xxc, yyc ); + gdk_draw_line( m_window, m_penGC, xxc, yyc, xx2, yy2 ); + } } CalcBoundingBox (x1, y1); @@ -483,7 +516,7 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord if (m_window) { wxCoord start = wxCoord(sa * 64.0); - wxCoord end = wxCoord(ea * 64.0); + wxCoord end = wxCoord((ea-sa) * 64.0); if (m_brush.GetStyle() != wxTRANSPARENT) { @@ -495,6 +528,18 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord gdk_draw_arc( m_window, m_textGC, TRUE, xx, yy, ww, hh, start, end ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, start, end ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, start, end ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, @@ -578,6 +623,18 @@ void wxWindowDC::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoor gdk_draw_polygon( m_window, m_textGC, TRUE, gdkpoints, n ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_polygon( m_window, m_brushGC, TRUE, gdkpoints, n ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_polygon( m_window, m_brushGC, TRUE, gdkpoints, n ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, @@ -635,8 +692,20 @@ void wxWindowDC::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord h m_deviceOriginY % m_brush.GetStipple()->GetHeight() ); gdk_draw_rectangle( m_window, m_textGC, TRUE, xx, yy, ww, hh ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); - } - else if (m_brush.GetStyle() == wxSTIPPLE) + } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -716,8 +785,30 @@ void wxWindowDC::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wx gdk_draw_arc( m_window, m_textGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); gdk_draw_arc( m_window, m_textGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); - } - else if (m_brush.GetStyle() == wxSTIPPLE) + } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx+rr, yy, ww-dd+1, hh ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy+rr, ww, hh-dd+1 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, dd, dd, 90*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx+rr, yy, ww-dd+1, hh ); + gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy+rr, ww, hh-dd+1 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, dd, dd, 90*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -743,10 +834,10 @@ void wxWindowDC::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wx if (m_pen.GetStyle() != wxTRANSPARENT) { - gdk_draw_line( m_window, m_penGC, xx+rr, yy, xx+ww-rr, yy ); - gdk_draw_line( m_window, m_penGC, xx+rr, yy+hh, xx+ww-rr, yy+hh ); - gdk_draw_line( m_window, m_penGC, xx, yy+rr, xx, yy+hh-rr ); - gdk_draw_line( m_window, m_penGC, xx+ww, yy+rr, xx+ww, yy+hh-rr ); + gdk_draw_line( m_window, m_penGC, xx+rr+1, yy, xx+ww-rr, yy ); + gdk_draw_line( m_window, m_penGC, xx+rr+1, yy+hh, xx+ww-rr, yy+hh ); + gdk_draw_line( m_window, m_penGC, xx, yy+rr+1, xx, yy+hh-rr ); + gdk_draw_line( m_window, m_penGC, xx+ww, yy+rr+1, xx+ww, yy+hh-rr ); gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, dd, dd, 90*64, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); @@ -783,8 +874,20 @@ void wxWindowDC::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord hei m_deviceOriginY % m_brush.GetStipple()->GetHeight() ); gdk_draw_arc( m_window, m_textGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); gdk_gc_set_ts_origin( m_textGC, 0, 0 ); - } - else if (m_brush.GetStyle() == wxSTIPPLE) + } else + if (IS_15_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 15, m_deviceOriginY % 15 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (IS_16_PIX_HATCH(m_brush.GetStyle())) + { + gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % 16, m_deviceOriginY % 16 ); + gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); + gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); + } else + if (m_brush.GetStyle() == wxSTIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -912,7 +1015,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, /* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For drawing a mono-bitmap (XBitmap) we use the current text GC */ if (is_mono) - gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 ); + gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 ); else gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), 0, 0, xx, yy, -1, -1 ); @@ -1098,7 +1201,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he drawing a mono-bitmap (XBitmap) we use the current text GC */ if (is_mono) - gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh ); + gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh ); else gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), xsrc, ysrc, xx, yy, ww, hh ); @@ -1284,8 +1387,8 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, for ( wxCoord srcY = 0; srcY < h; srcY++ ) { // transform source coords to dest coords - double r = sqrt(srcX*srcX + srcY*srcY); - double angleOrig = atan2(srcY, srcX) - rad; + double r = sqrt((double)srcX*srcX + srcY*srcY); + double angleOrig = atan2((double)srcY, (double)srcX) - rad; wxCoord dstX = (wxCoord)(r*cos(angleOrig) + 0.5), dstY = (wxCoord)(r*sin(angleOrig) + 0.5); diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 33bceb74e8..25f2982814 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -126,7 +126,7 @@ gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *e so we do this directly after realization */ static gint -gtk_dialog_realized_callback( GtkWidget *widget, wxDialog *win ) +gtk_dialog_realized_callback( GtkWidget * WXUNUSED(widget), wxDialog *win ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -231,7 +231,6 @@ void wxDialog::Init() m_returnCode = 0; m_sizeSet = FALSE; m_modalShowing = FALSE; - m_isFrame = TRUE; } wxDialog::wxDialog( wxWindow *parent, @@ -293,7 +292,7 @@ bool wxDialog::Create( wxWindow *parent, if ((m_x != -1) || (m_y != -1)) gtk_widget_set_uposition( m_widget, m_x, m_y ); gtk_widget_set_usize( m_widget, m_width, m_height ); - + /* we cannot set MWM hints before the widget has been realized, so we do this directly after realization */ gtk_signal_connect( GTK_OBJECT(m_widget), "realize", @@ -315,14 +314,7 @@ bool wxDialog::Create( wxWindow *parent, wxDialog::~wxDialog() { - m_isBeingDeleted = TRUE; - - wxTopLevelWindows.DeleteObject( this ); - - if (wxTheApp->GetTopWindow() == this) - { - wxTheApp->SetTopWindow( (wxWindow*) NULL ); - } + CleanUp(); if ((wxTopLevelWindows.Number() == 0) && (wxTheApp->GetExitOnFrameDelete())) @@ -334,13 +326,12 @@ wxDialog::~wxDialog() void wxDialog::SetTitle( const wxString& title ) { m_title = title; - if (m_title.IsNull()) m_title = wxT(""); gtk_window_set_title( GTK_WINDOW(m_widget), m_title.mbc_str() ); } wxString wxDialog::GetTitle() const { - return (wxString&)m_title; + return m_title; } void wxDialog::OnApply( wxCommandEvent &WXUNUSED(event) ) @@ -372,7 +363,7 @@ void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) ) else { SetReturnCode(wxID_OK); - this->Show(FALSE); + Show(FALSE); } } } @@ -413,11 +404,31 @@ void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) bool wxDialog::Destroy() { - if (!wxPendingDelete.Member(this)) wxPendingDelete.Append(this); + // schedule the dialog for the deletion + if ( !wxPendingDelete.Member(this) ) + { + wxPendingDelete.Append(this); + } + + // don't leave a dangling pointer as the app top window, we can be deleted + // any moment at all now! + CleanUp(); return TRUE; } +void wxDialog::CleanUp() +{ + m_isBeingDeleted = TRUE; + + if ( wxTheApp->GetTopWindow() == this ) + { + wxTheApp->SetTopWindow( (wxWindow*) NULL ); + } + + wxTopLevelWindows.DeleteObject( this ); +} + void wxDialog::OnSize( wxSizeEvent &WXUNUSED(event) ) { wxASSERT_MSG( (m_widget != NULL), wxT("invalid dialog") ); @@ -457,7 +468,7 @@ void wxDialog::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width { wxFAIL_MSG( wxT("DoMoveWindow called for wxDialog") ); } - + void wxDialog::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { wxASSERT_MSG( (m_widget != NULL), wxT("invalid dialog") ); @@ -552,7 +563,7 @@ void wxDialog::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int heigh geom.min_height = m_minHeight; geom.max_width = m_maxWidth; geom.max_height = m_maxHeight; - gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), + gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), (GtkWidget*) NULL, &geom, (GdkWindowHints) flag ); @@ -620,6 +631,16 @@ int wxDialog::ShowModal() return GetReturnCode(); } + if ( !GetParent() ) + { + wxWindow *parent = wxTheApp->GetTopWindow(); + if ( parent && parent != this ) + { + m_parent = parent; + gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(parent->m_widget) ); + } + } + wxBusyCursorSuspender cs; // temporarily suppress the busy cursor Show( TRUE ); diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index 272530603b..636633b6ac 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -99,6 +99,13 @@ static char * page_xpm[] = { " ......................... "}; +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the trace mask we use with wxLogTrace() - call +// wxLog::AddTraceMask(TRACE_DND) to enable the trace messages from here +static const wxChar *TRACE_DND = _T("dnd"); // ---------------------------------------------------------------------------- // "drag_leave" @@ -226,11 +233,16 @@ static gboolean target_drag_drop( GtkWidget *widget, if (context->suggested_action == GDK_ACTION_COPY) result = wxDragCopy; */ + /* reset the block here as someone might very well + show a dialog as a reaction to a drop and this + wouldn't work without events */ + g_blockEventsOnDrag = FALSE; + bool ret = drop_target->OnDrop( x, y ); if (!ret) { - wxLogDebug( wxT( "Drop target: OnDrop returned FALSE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnDrop returned FALSE") ); /* cancel the whole thing */ gtk_drag_finish( context, @@ -240,7 +252,7 @@ static gboolean target_drag_drop( GtkWidget *widget, } else { - wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnDrop returned TRUE") ); #if wxUSE_THREADS /* disable GUI threads */ @@ -306,7 +318,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), return; } - wxLogDebug( wxT( "Drop target: data received event") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: data received event") ); /* inform the wxDropTarget about the current GtkSelectionData. this is only valid for the duration of this call */ @@ -320,14 +332,14 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), if ( wxIsDragResultOk( drop_target->OnData( x, y, result ) ) ) { - wxLogDebug( wxT( "Drop target: OnData returned TRUE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnData returned TRUE") ); /* tell GTK that data transfer was successfull */ gtk_drag_finish( context, TRUE, FALSE, time ); } else { - wxLogDebug( wxT( "Drop target: OnData returned FALSE") ); + wxLogTrace( TRACE_DND, wxT( "Drop target: OnData returned FALSE") ); /* tell GTK that data transfer was not successfull */ gtk_drag_finish( context, FALSE, FALSE, time ); @@ -401,7 +413,7 @@ GdkAtom wxDropTarget::GetMatchingPair() wxDataFormat format( formatAtom ); #ifdef __WXDEBUG__ - wxLogDebug( wxT("Drop target: drag has format: %s"), format.GetId().c_str() ); + wxLogTrace( TRACE_DND, wxT("Drop target: drag has format: %s"), format.GetId().c_str() ); #endif // Debug if (m_dataObject->IsSupportedFormat( format )) @@ -499,27 +511,27 @@ source_drag_data_get (GtkWidget *WXUNUSED(widget), wxDataFormat format( selection_data->target ); - wxLogDebug( wxT("Drop source: format requested: %s"), format.GetId().c_str() ); - + wxLogTrace( TRACE_DND, wxT("Drop source: format requested: %s"), format.GetId().c_str() ); + drop_source->m_retValue = wxDragCancel; wxDataObject *data = drop_source->GetDataObject(); - + if (!data) { - wxLogDebug( wxT("Drop source: no data object") ); + wxLogTrace( TRACE_DND, wxT("Drop source: no data object") ); return; } if (!data->IsSupportedFormat(format)) { - wxLogDebug( wxT("Drop source: unsupported format") ); + wxLogTrace( TRACE_DND, wxT("Drop source: unsupported format") ); return; } if (data->GetDataSize(format) == 0) { - wxLogDebug( wxT("Drop source: empty data") ); + wxLogTrace( TRACE_DND, wxT("Drop source: empty data") ); return; } @@ -562,7 +574,7 @@ static void source_drag_data_delete( GtkWidget *WXUNUSED(widget), GdkDragContext *WXUNUSED(context), wxDropSource *WXUNUSED(drop_source) ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); // printf( "Drag source: drag_data_delete\n" ); @@ -576,7 +588,7 @@ static void source_drag_begin( GtkWidget *WXUNUSED(widget), GdkDragContext *WXUNUSED(context), wxDropSource *WXUNUSED(drop_source) ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); // printf( "Drag source: drag_begin.\n" ); @@ -620,7 +632,10 @@ gtk_dnd_window_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigur // wxDropSource //--------------------------------------------------------------------------- -wxDropSource::wxDropSource( wxWindow *win, const wxIcon &icon ) +wxDropSource::wxDropSource(wxWindow *win, + const wxIcon &iconCopy, + const wxIcon &iconMove, + const wxIcon &iconNone) { m_waiting = TRUE; @@ -632,11 +647,14 @@ wxDropSource::wxDropSource( wxWindow *win, const wxIcon &icon ) m_retValue = wxDragCancel; - m_icon = icon; - if (wxNullIcon == icon) m_icon = wxIcon( page_xpm ); + SetIcons(iconCopy, iconMove, iconNone); } -wxDropSource::wxDropSource( wxDataObject& data, wxWindow *win, const wxIcon &icon ) +wxDropSource::wxDropSource(wxDataObject& data, + wxWindow *win, + const wxIcon &iconCopy, + const wxIcon &iconMove, + const wxIcon &iconNone) { m_waiting = TRUE; @@ -650,19 +668,47 @@ wxDropSource::wxDropSource( wxDataObject& data, wxWindow *win, const wxIcon &ico m_retValue = wxDragCancel; - m_icon = icon; - if (wxNullIcon == icon) m_icon = wxIcon( page_xpm ); + SetIcons(iconCopy, iconMove, iconNone); +} + +void wxDropSource::SetIcons(const wxIcon &iconCopy, + const wxIcon &iconMove, + const wxIcon &iconNone) +{ + m_iconCopy = iconCopy; + m_iconMove = iconMove; + m_iconNone = iconNone; + + if ( !m_iconCopy.Ok() ) + m_iconCopy = wxIcon(page_xpm); + if ( !m_iconMove.Ok() ) + m_iconMove = m_iconCopy; + if ( !m_iconNone.Ok() ) + m_iconNone = m_iconCopy; } wxDropSource::~wxDropSource() { } -void wxDropSource::PrepareIcon( int hot_x, int hot_y, GdkDragContext *context ) +void wxDropSource::PrepareIcon( int action, GdkDragContext *context ) { - GdkBitmap *mask = (GdkBitmap *) NULL; - if (m_icon.GetMask()) mask = m_icon.GetMask()->GetBitmap(); - GdkPixmap *pixmap = m_icon.GetPixmap(); + // get the right icon to display + wxIcon *icon = NULL; + if ( action & GDK_ACTION_MOVE ) + icon = &m_iconMove; + else if ( action & GDK_ACTION_COPY ) + icon = &m_iconCopy; + else + icon = &m_iconNone; + + GdkBitmap *mask; + if ( icon->GetMask() ) + mask = icon->GetMask()->GetBitmap(); + else + mask = (GdkBitmap *)NULL; + + GdkPixmap *pixmap = icon->GetPixmap(); gint width,height; gdk_window_get_size (pixmap, &width, &height); @@ -689,7 +735,7 @@ void wxDropSource::PrepareIcon( int hot_x, int hot_y, GdkDragContext *context ) if (mask) gtk_widget_shape_combine_mask (m_iconWindow, mask, 0, 0); - gtk_drag_set_icon_widget( context, m_iconWindow, hot_x, hot_y ); + gtk_drag_set_icon_widget( context, m_iconWindow, 0, 0 ); } wxDragResult wxDropSource::DoDragDrop( bool allowMove ) @@ -702,6 +748,11 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) if (m_data->GetFormatCount() == 0) return (wxDragResult) wxDragNone; + // still in drag + if (g_blockEventsOnDrag) + return (wxDragResult) wxDragNone; + + // disabled for now g_blockEventsOnDrag = TRUE; RegisterWindow(); @@ -715,7 +766,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) for (size_t i = 0; i < m_data->GetFormatCount(); i++) { GdkAtom atom = array[i]; - wxLogDebug( wxT("Drop source: Supported atom %s"), gdk_atom_name( atom ) ); + wxLogTrace( TRACE_DND, wxT("Drop source: Supported atom %s"), gdk_atom_name( atom ) ); gtk_target_list_add( target_list, atom, 0, 0 ); } delete[] array; @@ -746,22 +797,22 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) if (button_number) { GdkDragAction action = GDK_ACTION_COPY; - if (allowMove) action = (GdkDragAction)(GDK_ACTION_MOVE|GDK_ACTION_COPY); + if (allowMove) action = (GdkDragAction)(GDK_ACTION_MOVE|GDK_ACTION_COPY); GdkDragContext *context = gtk_drag_begin( m_widget, - target_list, - action, - button_number, /* number of mouse button which started drag */ - (GdkEvent*) &event ); + target_list, + action, + button_number, /* number of mouse button which started drag */ + (GdkEvent*) &event ); m_dragContext = context; - PrepareIcon( 0, 0, context ); + PrepareIcon( action, context ); while (m_waiting) gtk_main_iteration(); - - if (context->action == GDK_ACTION_COPY) + + if (context->action == GDK_ACTION_COPY) m_retValue = wxDragCopy; - if (context->action == GDK_ACTION_MOVE) + if (context->action == GDK_ACTION_MOVE) m_retValue = wxDragMove; } @@ -771,7 +822,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) #endif g_blockEventsOnDrag = FALSE; - + UnregisterWindow(); return m_retValue; @@ -780,7 +831,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) void wxDropSource::RegisterWindow() { if (!m_widget) return; - + gtk_signal_connect( GTK_OBJECT(m_widget), "drag_data_get", GTK_SIGNAL_FUNC (source_drag_data_get), (gpointer) this); gtk_signal_connect (GTK_OBJECT(m_widget), "drag_data_delete", diff --git a/src/gtk1/files.lst b/src/gtk1/files.lst index 86cfa8625f..8c8114a700 100644 --- a/src/gtk1/files.lst +++ b/src/gtk1/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -167,6 +167,7 @@ ALL_SOURCES = \ gtk/gdiobj.cpp \ gtk/gsockgtk.c \ gtk/icon.cpp \ + gtk/joystick.cpp \ gtk/listbox.cpp \ gtk/main.cpp \ gtk/mdi.cpp \ @@ -289,6 +290,7 @@ ALL_HEADERS = \ filesys.h \ font.h \ fontdlg.h \ + fontenc.h \ fontenum.h \ fontmap.h \ fontutil.h \ @@ -376,7 +378,6 @@ ALL_HEADERS = \ scrolwin.h \ serbase.h \ settings.h \ - setup.h \ sizer.h \ slider.h \ socket.h \ @@ -860,6 +861,7 @@ GUIOBJS = \ gdiobj.o \ gsockgtk.o \ icon.o \ + joystick.o \ listbox.o \ main.o \ mdi.o \ @@ -920,6 +922,7 @@ GUIDEPS = \ gdiobj.d \ gsockgtk.d \ icon.d \ + joystick.d \ listbox.d \ main.d \ mdi.d \ diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index 26a9ba0dcb..83010c18da 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -71,7 +71,7 @@ private: wxString m_faceName; wxFontEncoding m_encoding; - friend wxFont; + friend class wxFont; }; // ============================================================================ @@ -397,7 +397,7 @@ void wxFont::SetEncoding(wxFontEncoding encoding) static GdkFont *g_systemDefaultGuiFont = (GdkFont*) NULL; -static GdkFont *GtkGetDefaultGuiFont() +GdkFont *GtkGetDefaultGuiFont() { if (!g_systemDefaultGuiFont) { diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index f4e2970ad0..0f54dc32b9 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -126,7 +126,6 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* win->m_width = alloc->width; win->m_height = alloc->height; - win->m_queuedFullRedraw = TRUE; win->GtkUpdateSize(); } } @@ -216,7 +215,7 @@ gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *ev if (!win->m_hasVMT) return FALSE; - + #if (GTK_MINOR_VERSION > 0) int x = 0; int y = 0; @@ -243,7 +242,7 @@ gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *ev so we do this directly after realization */ static gint -gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) +gtk_frame_realized_callback( GtkWidget * WXUNUSED(widget), wxFrame *win ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -283,7 +282,7 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) func |= GDK_FUNC_RESIZE; decor |= GDK_DECOR_RESIZEH; } - + gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor); gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func); } @@ -321,6 +320,33 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) return FALSE; } +//----------------------------------------------------------------------------- +// "expose_event" of m_client +//----------------------------------------------------------------------------- + +static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxWindow *win ) +{ + GtkPizza *pizza = GTK_PIZZA(widget); + + gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1); + + return TRUE; +} + +//----------------------------------------------------------------------------- +// "draw" of m_client +//----------------------------------------------------------------------------- + + +static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win ) +{ + GtkPizza *pizza = GTK_PIZZA(widget); + + gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1); +} + // ---------------------------------------------------------------------------- // wxFrame itself // ---------------------------------------------------------------------------- @@ -394,21 +420,32 @@ void wxFrame::Init() m_menuBarDetached = FALSE; m_toolBarDetached = FALSE; m_insertInClientArea = TRUE; - m_isFrame = FALSE; + m_isFrame = TRUE; } bool wxFrame::Create( wxWindow *parent, wxWindowID id, - const wxString &title, - const wxPoint &pos, - const wxSize &size, + const wxString& title, + const wxPoint& pos, + const wxSize& sizeOrig, long style, const wxString &name ) { + // always create a frame of some reasonable, even if arbitrary, size (at + // least for MSW compatibility) + wxSize size = sizeOrig; + if ( size.x == -1 || size.y == -1 ) + { + wxSize sizeDpy = wxGetDisplaySize(); + if ( size.x == -1 ) + size.x = sizeDpy.x / 3; + if ( size.y == -1 ) + size.y = sizeDpy.y / 5; + } + wxTopLevelWindows.Append( this ); m_needParent = FALSE; - m_isFrame = TRUE; if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) @@ -447,6 +484,13 @@ bool wxFrame::Create( wxWindow *parent, GTK_WIDGET_UNSET_FLAGS( m_mainWidget, GTK_CAN_FOCUS ); gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget ); + + /* for m_mainWidget themes */ + gtk_signal_connect( GTK_OBJECT(m_mainWidget), "expose_event", + GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); + gtk_signal_connect( GTK_OBJECT(m_mainWidget), "draw", + GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); + #ifdef __WXDEBUG__ debug_focus_in( m_mainWidget, wxT("wxFrame::m_mainWidget"), name ); #endif @@ -475,7 +519,7 @@ bool wxFrame::Create( wxWindow *parent, if ((m_x != -1) || (m_y != -1)) gtk_widget_set_uposition( m_widget, m_x, m_y ); gtk_widget_set_usize( m_widget, m_width, m_height ); - + /* we cannot set MWM hints and icons before the widget has been realized, so we do this directly after realization */ gtk_signal_connect( GTK_OBJECT(m_widget), "realize", @@ -535,7 +579,7 @@ void wxFrame::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width) { wxFAIL_MSG( wxT("DoMoveWindow called for wxFrame") ); } - + void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); @@ -738,23 +782,22 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight; if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth; if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight; - - /* set size hints */ - gint flag = 0; // GDK_HINT_POS; - if ((m_minWidth != -1) || (m_minHeight != -1)) flag |= GDK_HINT_MIN_SIZE; - if ((m_maxWidth != -1) || (m_maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE; - GdkGeometry geom; - geom.min_width = m_minWidth; - geom.min_height = m_minHeight; - geom.max_width = m_maxWidth; - geom.max_height = m_maxHeight; - gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), - (GtkWidget*) NULL, - &geom, - (GdkWindowHints) flag ); if (m_mainWidget) { + /* set size hints */ + gint flag = 0; // GDK_HINT_POS; + if ((m_minWidth != -1) || (m_minHeight != -1)) flag |= GDK_HINT_MIN_SIZE; + if ((m_maxWidth != -1) || (m_maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE; + GdkGeometry geom; + geom.min_width = m_minWidth; + geom.min_height = m_minHeight; + geom.max_width = m_maxWidth; + geom.max_height = m_maxHeight; + gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), + (GtkWidget*) NULL, + &geom, + (GdkWindowHints) flag ); /* I revert back to wxGTK's original behaviour. m_mainWidget holds the * menubar, the toolbar and the client area, which is represented by @@ -926,7 +969,7 @@ void wxFrame::SetMenuBar( wxMenuBar *menuBar ) gtk_signal_disconnect_by_func( GTK_OBJECT(m_frameMenuBar->m_widget), GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this ); } - + gtk_container_remove( GTK_CONTAINER(m_mainWidget), m_frameMenuBar->m_widget ); gtk_widget_ref( m_frameMenuBar->m_widget ); gtk_widget_unparent( m_frameMenuBar->m_widget ); @@ -971,9 +1014,6 @@ wxToolBar* wxFrame::CreateToolBar( long style, wxWindowID id, const wxString& na m_frameToolBar = wxFrameBase::CreateToolBar( style, id, name ); - if (m_frameToolBar) - GetChildren().DeleteObject( m_frameToolBar ); - m_insertInClientArea = TRUE; m_sizeSet = FALSE; @@ -1077,9 +1117,14 @@ void wxFrame::Iconize( bool iconize ) { if (iconize) { - XIconifyWindow( GDK_WINDOW_XDISPLAY( m_widget->window ), - GDK_WINDOW_XWINDOW( m_widget->window ), - DefaultScreen( GDK_DISPLAY() ) ); + GdkWindow *window = m_widget->window; + + // you should do it later, for example from OnCreate() handler + wxCHECK_RET( window, _T("frame not created yet - can't iconize") ); + + XIconifyWindow(GDK_WINDOW_XDISPLAY(window), + GDK_WINDOW_XWINDOW(window), + DefaultScreen(GDK_DISPLAY())); } } diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp index 6cfcc74b0e..b85ec70964 100644 --- a/src/gtk1/gauge.cpp +++ b/src/gtk1/gauge.cpp @@ -42,6 +42,8 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, m_useProgressBar = TRUE; m_widget = gtk_progress_bar_new(); + if( style & wxGA_VERTICAL) + gtk_progress_bar_set_orientation( GTK_PROGRESS_BAR(m_widget) , GTK_PROGRESS_BOTTOM_TO_TOP ); m_parent->DoAddChild( this ); diff --git a/src/gtk1/glcanvas.cpp b/src/gtk1/glcanvas.cpp index 16c1cabe06..f603c33244 100644 --- a/src/gtk1/glcanvas.cpp +++ b/src/gtk1/glcanvas.cpp @@ -369,6 +369,12 @@ bool wxGLCanvas::Create( wxWindow *parent, gtk_widget_pop_visual(); gtk_widget_pop_colormap(); + if (GTK_WIDGET_REALIZED(m_wxwindow)) + gtk_glwindow_realized_callback( m_wxwindow, this ); + + if (GTK_WIDGET_MAPPED(m_wxwindow)) + gtk_glwindow_map_callback( m_wxwindow, this ); + return TRUE; } diff --git a/src/gtk1/joystick.cpp b/src/gtk1/joystick.cpp index 3b80491d4c..334fefee34 100644 --- a/src/gtk1/joystick.cpp +++ b/src/gtk1/joystick.cpp @@ -13,6 +13,12 @@ #pragma implementation "joystick.h" #endif +#include "wx/defs.h" + +#if wxUSE_JOYSTICK + +#include "wx/joystick.h" + #include #include #include @@ -20,9 +26,9 @@ #include #include #include + #include "wx/event.h" #include "wx/window.h" -#include "wx/gtk/joystick.h" #define JOYSTICK_AXE_MAX 32767 #define JOYSTICK_AXE_MIN -32767 @@ -354,4 +360,5 @@ bool wxJoystick::ReleaseCapture(void) m_polling = 0; return TRUE; } +#endif // wxUSE_JOYSTICK diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 8ff7ab4cd1..2fa6512981 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -81,6 +81,33 @@ extern wxCursor g_globalCursor; static bool g_hasDoubleClicked = FALSE; +//----------------------------------------------------------------------------- +// idle callback for SetFirstItem +//----------------------------------------------------------------------------- + +struct wxlistbox_idle_struct +{ + wxListBox *m_listbox; + int m_item; + gint m_tag; +}; + +static gint wxlistbox_idle_callback( gpointer gdata ) +{ + wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata; + gdk_threads_enter(); + + gtk_idle_remove( data->m_tag ); + + data->m_listbox->SetFirstItem( data->m_item ); + + delete data; + + gdk_threads_leave(); + + return TRUE; +} + //----------------------------------------------------------------------------- // "button_release_event" //----------------------------------------------------------------------------- @@ -146,9 +173,19 @@ gtk_listbox_button_press_callback( GtkWidget *widget, if (g_blockEventsOnScroll) return FALSE; if (!listbox->m_hasVMT) return FALSE; - + int sel = listbox->GtkGetIndex( widget ); +/* + GtkWidget *item = gtk_get_event_widget ((GdkEvent*) gdk_event); + while (item && !GTK_IS_LIST_ITEM (item)) + item = item->parent; + + if (item) + listbox->m_list->last_focus_child = item; +*/ + + #if wxUSE_CHECKLISTBOX if ((listbox->m_hasCheckBoxes) && (gdk_event->x < 15) && (gdk_event->type != GDK_2BUTTON_PRESS)) { @@ -195,6 +232,12 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis ret = listbox->GetEventHandler()->ProcessEvent( new_event ); } + if ((gdk_event->keyval == GDK_Return) && (!ret)) + { + // eat return in all modes + ret = TRUE; + } + #if wxUSE_CHECKLISTBOX if ((gdk_event->keyval == ' ') && (listbox->m_hasCheckBoxes) && (!ret)) { @@ -224,14 +267,19 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis // "select" and "deselect" //----------------------------------------------------------------------------- -static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox *listbox ); +static void gtk_listitem_select_cb( GtkWidget *widget, wxListBox *listbox, bool is_selection ); + +static void gtk_listitem_select_callback( GtkWidget *widget, wxListBox *listbox ) +{ + gtk_listitem_select_cb( widget, listbox, TRUE ); +} static void gtk_listitem_deselect_callback( GtkWidget *widget, wxListBox *listbox ) { - gtk_listitem_select_callback( widget, listbox ); + gtk_listitem_select_cb( widget, listbox, FALSE ); } -static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox *listbox ) +static void gtk_listitem_select_cb( GtkWidget *WXUNUSED(widget), wxListBox *listbox, bool is_selection ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -240,6 +288,7 @@ static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() ); event.SetEventObject( listbox ); + event.SetExtraLong( (long) is_selection ); wxArrayInt aSelections; int n, count = listbox->GetSelections(aSelections); @@ -311,11 +360,21 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, m_list = GTK_LIST( gtk_list_new() ); - GtkSelectionMode mode = GTK_SELECTION_BROWSE; + GtkSelectionMode mode; if (style & wxLB_MULTIPLE) + { mode = GTK_SELECTION_MULTIPLE; + } else if (style & wxLB_EXTENDED) + { mode = GTK_SELECTION_EXTENDED; + } + else + { + // if style was 0 set single mode + m_windowStyle |= wxLB_SINGLE; + mode = GTK_SELECTION_BROWSE; + } gtk_list_set_selection_mode( GTK_LIST(m_list), mode ); @@ -366,6 +425,8 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, wxListBox::~wxListBox() { + m_hasVMT = FALSE; // prevent deselect events upon destrcution + Clear(); } @@ -388,24 +449,47 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos) wxCHECK_RET( pos <= length, wxT("invalid index in wxListBox::InsertItems") ); size_t nItems = items.GetCount(); + int index; - if (pos == length) + if (m_strings) { - for ( size_t n = 0; n < nItems; n++ ) + for (size_t n = 0; n < nItems; n++) { - GtkAddItem( items[n] ); - - m_clientList.Append((wxObject *)NULL); + index = m_strings->Add( items[n] ); + + if (index != GetCount()) + { + GtkAddItem( items[n], index ); + wxNode *node = m_clientList.Nth( index ); + m_clientList.Insert( node, (wxObject*) NULL ); + } + else + { + GtkAddItem( items[n] ); + m_clientList.Append( (wxObject*) NULL ); + } } } else { - wxNode *node = m_clientList.Nth( pos ); - for ( size_t n = 0; n < nItems; n++ ) + if (pos == length) { - GtkAddItem( items[n], pos+n ); + for ( size_t n = 0; n < nItems; n++ ) + { + GtkAddItem( items[n] ); - m_clientList.Insert( node, (wxObject *)NULL ); + m_clientList.Append((wxObject *)NULL); + } + } + else + { + wxNode *node = m_clientList.Nth( pos ); + for ( size_t n = 0; n < nItems; n++ ) + { + GtkAddItem( items[n], pos+n ); + + m_clientList.Insert( node, (wxObject *)NULL ); + } } } @@ -782,9 +866,41 @@ void wxListBox::SetSelection( int n, bool select ) GtkEnableEvents(); } -void wxListBox::DoSetFirstItem( int WXUNUSED(n) ) +void wxListBox::DoSetFirstItem( int n ) { - wxFAIL_MSG(wxT("wxListBox::SetFirstItem not implemented")); + wxCHECK_RET( m_list, wxT("invalid listbox") ); + + if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list)) + return; + + // terribly efficient + const gchar *vadjustment_key = "gtk-vadjustment"; + guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key); + + GtkAdjustment *adjustment = + (GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id); + wxCHECK_RET( adjustment, wxT("invalid listbox code") ); + + GList *target = g_list_nth( m_list->children, n ); + wxCHECK_RET( target, wxT("invalid listbox index") ); + + GtkWidget *item = GTK_WIDGET(target->data); + wxCHECK_RET( item, wxT("invalid listbox code") ); + + if (item->allocation.y == -1) + { + wxlistbox_idle_struct* data = new wxlistbox_idle_struct; + data->m_listbox = this; + data->m_item = n; + data->m_tag = gtk_idle_add_priority( 800, wxlistbox_idle_callback, (gpointer) data ); + + return; + } + + float y = item->allocation.y; + if (y > adjustment->upper - adjustment->page_size) + y = adjustment->upper - adjustment->page_size; + gtk_adjustment_set_value( adjustment, y ); } // ---------------------------------------------------------------------------- diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index 3fa7de98fd..c4a547333e 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -47,13 +47,13 @@ extern wxList wxPendingDelete; // "switch_page" //----------------------------------------------------------------------------- -static void +static void gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), GtkNotebookPage *page, - gint WXUNUSED(page_num), - wxMDIParentFrame *parent ) + gint WXUNUSED(page_num), + wxMDIParentFrame *parent ) { - if (g_isIdle) + if (g_isIdle) wxapp_install_idle_handler(); // send deactivate event to old child @@ -65,9 +65,9 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), event1.SetEventObject( child); child->GetEventHandler()->ProcessEvent( event1 ); } - + // send activate event to new child - + wxMDIClientWindow *client_window = parent->GetClientWindow(); if (!client_window) return; @@ -79,16 +79,16 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), { wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data(); if (child_frame->m_page == page) - { + { child = child_frame; - break; - } + break; + } node = node->Next(); } - + if (!child) return; - + wxActivateEvent event2( wxEVT_ACTIVATE, TRUE, child->GetId() ); event2.SetEventObject( child); child->GetEventHandler()->ProcessEvent( event2 ); @@ -100,33 +100,23 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame,wxFrame) -BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) -END_EVENT_TABLE() - -wxMDIParentFrame::wxMDIParentFrame() +void wxMDIParentFrame::Init() { m_justInserted = FALSE; m_clientWindow = (wxMDIClientWindow *) NULL; } -wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) -{ - m_justInserted = FALSE; - m_clientWindow = (wxMDIClientWindow *) NULL; - Create( parent, id, title, pos, size, style, name ); -} - wxMDIParentFrame::~wxMDIParentFrame() { } -bool wxMDIParentFrame::Create( wxWindow *parent, - wxWindowID id, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) +bool wxMDIParentFrame::Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name ) { wxFrame::Create( parent, id, title, pos, size, style, name ); @@ -150,8 +140,8 @@ void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height ) menu_bar->m_y = 0; menu_bar->m_width = m_width; menu_bar->m_height = wxMENU_HEIGHT; - gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), - menu_bar->m_widget, + gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), + menu_bar->m_widget, 0, 0, m_width, wxMENU_HEIGHT ); } @@ -179,31 +169,36 @@ void wxMDIParentFrame::OnInternalIdle() wxNode *node = m_clientWindow->GetChildren().First(); while (node) { - wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data(); - wxMenuBar *menu_bar = child_frame->m_menuBar; - if (child_frame->m_menuBar) + wxObject *child = node->Data(); + wxMDIChildFrame *child_frame = wxDynamicCast(child, wxMDIChildFrame); + if ( child_frame ) { - if (child_frame == active_child_frame) + wxMenuBar *menu_bar = child_frame->m_menuBar; + if ( menu_bar ) { - if (menu_bar->Show(TRUE)) - { - menu_bar->m_width = m_width; - menu_bar->m_height = wxMENU_HEIGHT; - gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), - menu_bar->m_widget, - 0, 0, m_width, wxMENU_HEIGHT ); - menu_bar->SetInvokingWindow( child_frame ); - } - visible_child_menu = TRUE; + if (child_frame == active_child_frame) + { + if (menu_bar->Show(TRUE)) + { + menu_bar->m_width = m_width; + menu_bar->m_height = wxMENU_HEIGHT; + gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), + menu_bar->m_widget, + 0, 0, m_width, wxMENU_HEIGHT ); + menu_bar->SetInvokingWindow( child_frame ); + } + visible_child_menu = TRUE; + } + else + { + if (menu_bar->Show(FALSE)) + { + menu_bar->UnsetInvokingWindow( child_frame ); + } + } } - else - { - if (menu_bar->Show(FALSE)) - { - menu_bar->UnsetInvokingWindow( child_frame ); - } - } } + node = node->Next(); } @@ -212,21 +207,21 @@ void wxMDIParentFrame::OnInternalIdle() (m_frameMenuBar->IsShown() == visible_child_menu)) { if (visible_child_menu) - { + { m_frameMenuBar->Show( FALSE ); - m_frameMenuBar->UnsetInvokingWindow( this ); - } - else - { + m_frameMenuBar->UnsetInvokingWindow( this ); + } + else + { m_frameMenuBar->Show( TRUE ); - m_frameMenuBar->SetInvokingWindow( this ); - - m_frameMenuBar->m_width = m_width; - m_frameMenuBar->m_height = wxMENU_HEIGHT; - gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), - m_frameMenuBar->m_widget, - 0, 0, m_width, wxMENU_HEIGHT ); - } + m_frameMenuBar->SetInvokingWindow( this ); + + m_frameMenuBar->m_width = m_width; + m_frameMenuBar->m_height = wxMENU_HEIGHT; + gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), + m_frameMenuBar->m_widget, + 0, 0, m_width, wxMENU_HEIGHT ); + } } } @@ -287,14 +282,6 @@ void wxMDIParentFrame::ActivatePrevious() gtk_notebook_prev_page( GTK_NOTEBOOK(m_clientWindow->m_widget) ); } -void wxMDIParentFrame::OnActivate( wxActivateEvent& WXUNUSED(event) ) -{ -} - -void wxMDIParentFrame::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(event) ) -{ -} - //----------------------------------------------------------------------------- // wxMDIChildFrame //----------------------------------------------------------------------------- @@ -303,12 +290,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame,wxFrame) BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame) EVT_ACTIVATE(wxMDIChildFrame::OnActivate) + EVT_MENU_HIGHLIGHT_ALL(wxMDIChildFrame::OnMenuHighlight) END_EVENT_TABLE() wxMDIChildFrame::wxMDIChildFrame() { m_menuBar = (wxMenuBar *) NULL; m_page = (GtkNotebookPage *) NULL; + m_isFrame = FALSE; } wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, @@ -318,6 +307,7 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, { m_menuBar = (wxMenuBar *) NULL; m_page = (GtkNotebookPage *) NULL; + m_isFrame = FALSE; Create( parent, id, title, wxDefaultPosition, size, style, name ); } @@ -360,8 +350,8 @@ void wxMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar ) m_menuBar->SetParent( mdi_frame ); /* insert the invisible menu bar into the _parent_ mdi frame */ - gtk_pizza_put( GTK_PIZZA(mdi_frame->m_mainWidget), - m_menuBar->m_widget, + gtk_pizza_put( GTK_PIZZA(mdi_frame->m_mainWidget), + m_menuBar->m_widget, 0, 0, mdi_frame->m_width, wxMENU_HEIGHT ); } } @@ -380,16 +370,41 @@ void wxMDIChildFrame::Activate() gtk_notebook_set_page( notebook, pageno ); #else // the only way I can see to do this under gtk+ 1.0.X would - // be to keep track of page numbers, start at first and + // be to keep track of page numbers, start at first and // do "next" enough times to get to this page number - messy // - J. Russell Smyth #endif } -void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) ) +void wxMDIChildFrame::OnActivate( wxActivateEvent& WXUNUSED(event) ) { } +void wxMDIChildFrame::OnMenuHighlight( wxMenuEvent& event ) +{ +#if wxUSE_STATUSBAR + wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->GetParent(); + if ( !ShowMenuHelp(mdi_frame->GetStatusBar(), event.GetMenuId()) ) + { + // we don't have any help text for this item, but may be the MDI frame + // does? + mdi_frame->OnMenuHighlight(event); + } +#endif // wxUSE_STATUSBAR +} + +void wxMDIChildFrame::SetTitle( const wxString &title ) +{ + if ( title == m_title ) + return; + + m_title = title; + + wxMDIParentFrame* parent = (wxMDIParentFrame*) GetParent(); + GtkNotebook* notebook = GTK_NOTEBOOK(parent->m_widget); + gtk_notebook_set_tab_label_text(notebook, m_page->child, title.mbc_str()); +} + //----------------------------------------------------------------------------- // "size_allocate" //----------------------------------------------------------------------------- @@ -464,7 +479,7 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style ) !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("wxMDIClientWindow") )) { wxFAIL_MSG( wxT("wxMDIClientWindow creation failed") ); - return FALSE; + return FALSE; } m_widget = gtk_notebook_new(); diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 5c17e2c985..dfd1ceeace 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -35,6 +35,45 @@ extern bool g_isIdle; static wxString GetHotKey( const wxMenuItem& item ); #endif +//----------------------------------------------------------------------------- +// idle system +//----------------------------------------------------------------------------- + +static wxString wxReplaceUnderscore( const wxString& title ) +{ + const wxChar *pc; + + /* GTK 1.2 wants to have "_" instead of "&" for accelerators */ + wxString str; + for ( pc = title; *pc != wxT('\0'); pc++ ) + { + if (*pc == wxT('&')) + { +#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0) + str << wxT('_'); + } + else if (*pc == wxT('/')) + { + str << wxT('\\'); +#endif + } + else + { +#if __WXGTK12__ + if ( *pc == wxT('_') ) + { + // underscores must be doubled to prevent them from being + // interpreted as accelerator character prefix by GTK + str << *pc; + } +#endif // GTK+ 1.2 + + str << *pc; + } + } + return str; +} + //----------------------------------------------------------------------------- // wxMenuBar //----------------------------------------------------------------------------- @@ -221,36 +260,7 @@ bool wxMenuBar::Append( wxMenu *menu, const wxString &title ) bool wxMenuBar::GtkAppend(wxMenu *menu, const wxString& title) { - const wxChar *pc; - - /* GTK 1.2 wants to have "_" instead of "&" for accelerators */ - wxString str; - for ( pc = title; *pc != wxT('\0'); pc++ ) - { - if (*pc == wxT('&')) - { -#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0) - str << wxT('_'); - } - else if (*pc == wxT('/')) - { - str << wxT('\\'); -#endif - } - else - { -#if __WXGTK12__ - if ( *pc == wxT('_') ) - { - // underscores must be doubled to prevent them from being - // interpreted as accelerator character prefix by GTK - str << *pc; - } -#endif // GTK+ 1.2 - - str << *pc; - } - } + wxString str( wxReplaceUnderscore( title ) ); /* this doesn't have much effect right now */ menu->SetTitle( str ); @@ -275,6 +285,7 @@ bool wxMenuBar::GtkAppend(wxMenu *menu, const wxString& title) gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */ /* in order to get the pointer to the item we need the item text _without_ underscores */ wxString tmp = wxT("
    /"); + const wxChar *pc; for ( pc = str; *pc != wxT('\0'); pc++ ) { // contrary to the common sense, we must throw out _all_ underscores, @@ -379,7 +390,7 @@ wxMenu *wxMenuBar::Remove(size_t pos) static int FindMenuItemRecursive( const wxMenu *menu, const wxString &menuString, const wxString &itemString ) { - if (menu->GetTitle() == menuString) + if (wxMenuItem::GetLabelFromText(menu->GetTitle()) == wxMenuItem::GetLabelFromText(menuString)) { int res = menu->FindItem( itemString ); if (res != wxNOT_FOUND) @@ -472,7 +483,25 @@ wxString wxMenuBar::GetLabelTop( size_t pos ) const wxMenu* menu = node->GetData(); - return menu->GetTitle(); + wxString label; + wxString text( menu->GetTitle() ); +#if (GTK_MINOR_VERSION > 0) + for ( const wxChar *pc = text.c_str(); *pc; pc++ ) + { + if ( *pc == wxT('_') || *pc == wxT('&') ) + { + // '_' is the escape character for GTK+ and '&' is the one for + // wxWindows - skip both of them + continue; + } + + label += *pc; + } +#else // GTK+ 1.0 + label = text; +#endif // GTK+ 1.2/1.0 + + return label; } void wxMenuBar::SetLabelTop( size_t pos, const wxString& label ) @@ -483,7 +512,22 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label ) wxMenu* menu = node->GetData(); - menu->SetTitle( label ); + wxString str( wxReplaceUnderscore( label ) ); + + menu->SetTitle( str ); + + if (menu->m_owner) + { + GtkLabel *label = GTK_LABEL( GTK_BIN(menu->m_owner)->child ); + + /* set new text */ + gtk_label_set( label, str.mb_str()); + + /* reparse key accel */ + (void)gtk_label_parse_uline (GTK_LABEL(label), str.mb_str() ); + gtk_accel_label_refetch( GTK_ACCEL_LABEL(label) ); + } + } //----------------------------------------------------------------------------- @@ -523,7 +567,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, id ); event.SetEventObject( menu ); - event.SetInt(id ); + if (item->IsCheckable()) + event.SetInt( item->IsChecked() ); #if wxUSE_MENU_CALLBACK if (menu->GetCallback()) @@ -638,21 +683,25 @@ wxMenuItem::~wxMenuItem() wxString wxMenuItemBase::GetLabelFromText(const wxString& text) { wxString label; -#if (GTK_MINOR_VERSION > 0) + for ( const wxChar *pc = text.c_str(); *pc; pc++ ) { - if ( *pc == wxT('_') || *pc == wxT('&') ) + if ( *pc == wxT('_') ) { - // '_' is the escape character for GTK+ and '&' is the one for - // wxWindows - skip both of them + // wxGTK escapes "xxx_xxx" to "xxx__xxx" + pc++; + label += *pc; + continue; + } + + if ( *pc == wxT('&') ) + { + // wxMSW escapes & continue; } label += *pc; } -#else // GTK+ 1.0 - label = text; -#endif // GTK+ 1.2/1.0 return label; } @@ -763,11 +812,21 @@ bool wxMenuItem::IsChecked() const wxString wxMenuItem::GetFactoryPath() const { - /* in order to get the pointer to the item we need the item text _without_ - underscores */ + /* in order to get the pointer to the item we need the item text + _without_ underscores */ wxString path( wxT("
    /") ); - path += GetLabel(); + for ( const wxChar *pc = m_text.c_str(); *pc; pc++ ) + { + if ( *pc == wxT('_') || *pc == wxT('&') ) + { + // remove '_' and '&' unconditionally + continue; + } + + path += *pc; + } + return path; } @@ -904,8 +963,9 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) // due to an apparent bug in GTK+, we have to use a static buffer here - // otherwise GTK+ 1.2.2 manages to override the memory we pass to it // somehow! (VZ) - static char s_accel[32]; // must be big enough for F12 - strncpy(s_accel, GetHotKey(*mitem).mb_str(), WXSIZEOF(s_accel)); + static char s_accel[50]; // must be big enougg + wxString tmp( GetHotKey(*mitem) ); + strncpy(s_accel, tmp.mb_str(), WXSIZEOF(s_accel)); entry.accelerator = s_accel; #else // !wxUSE_ACCEL entry.accelerator = (char*) NULL; @@ -963,6 +1023,12 @@ bool wxMenu::DoInsert(size_t pos, wxMenuItem *item) if ( !GtkAppend(item) ) return FALSE; + if ( m_style & wxMENU_TEAROFF ) + { + // change the position as the first item is the tear-off marker + pos++; + } + GtkMenuShell *menu_shell = GTK_MENU_SHELL(m_factory->widget); gpointer data = g_list_last(menu_shell->children)->data; menu_shell->children = g_list_remove(menu_shell->children, data); @@ -1040,6 +1106,20 @@ static wxString GetHotKey( const wxMenuItem& item ) case WXK_F12: hotkey << wxT('F') << code - WXK_F1 + 1; break; + + // GTK seems to use XStringToKeySym here + case WXK_NUMPAD_INSERT: + hotkey << wxT("KP_Insert" ); + break; + case WXK_NUMPAD_DELETE: + hotkey << wxT("KP_Delete" ); + break; + case WXK_INSERT: + hotkey << wxT("Insert" ); + break; + case WXK_DELETE: + hotkey << wxT("Delete" ); + break; // if there are any other keys wxGetAccelFromString() may return, // we should process them here diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index 4fbff0c3df..3626e86c46 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -521,7 +521,7 @@ bool wxNotebook::DeletePage( int page ) if (!nb_page) return FALSE; /* GTK sets GtkNotebook.cur_page to NULL before sending - the switvh page event */ + the switch page event */ m_lastSelection = GetSelection(); nb_page->m_client->Destroy(); @@ -536,8 +536,12 @@ bool wxNotebook::RemovePage( int page ) { wxGtkNotebookPage* nb_page = GetNotebookPage(page); - if (!nb_page) return FALSE; + wxCHECK_MSG( nb_page, FALSE, _T("wxNotebook::RemovePage: invalid page") ); + gtk_widget_ref( nb_page->m_client->m_widget ); + gtk_widget_unrealize( nb_page->m_client->m_widget ); + gtk_widget_unparent( nb_page->m_client->m_widget ); + gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page ); m_pages.DeleteObject( nb_page ); diff --git a/src/gtk1/pen.cpp b/src/gtk1/pen.cpp index 90a54a25ee..8ac1097aa8 100644 --- a/src/gtk1/pen.cpp +++ b/src/gtk1/pen.cpp @@ -100,12 +100,12 @@ wxPen& wxPen::operator = ( const wxPen& pen ) return *this; } -bool wxPen::operator == ( const wxPen& pen ) +bool wxPen::operator == ( const wxPen& pen ) const { return m_refData == pen.m_refData; } -bool wxPen::operator != ( const wxPen& pen ) +bool wxPen::operator != ( const wxPen& pen ) const { return m_refData != pen.m_refData; } diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 10044f42a1..5be1d06dc3 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -114,14 +114,58 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_ return TRUE; } +static gint gtk_radiobutton_focus_in( GtkWidget *widget, + GdkEvent *WXUNUSED(event), + wxRadioBox *win ) +{ + if ( win->m_lostFocus ) + { + // no, we didn't really lose it + win->m_lostFocus = FALSE; + } + else if ( !win->m_hasFocus ) + { + win->m_hasFocus = TRUE; + + wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); + event.SetEventObject( win ); + + // never stop the signal emission, it seems to break the kbd handling + // inside the radiobox + (void)win->GetEventHandler()->ProcessEvent( event ); + } + + return FALSE; +} + +static gint gtk_radiobutton_focus_out( GtkWidget *widget, + GdkEvent *WXUNUSED(event), + wxRadioBox *win ) +{ + wxASSERT_MSG( win->m_hasFocus, _T("got focus out without any focus in?") ); + + // we might have lost the focus, but may be not - it may have just gone to + // another button in the same radiobox, so we'll check for it in the next + // idle iteration (leave m_hasFocus == TRUE for now) + win->m_lostFocus = TRUE; + + return FALSE; +} + //----------------------------------------------------------------------------- // wxRadioBox //----------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl) -wxRadioBox::wxRadioBox() +void wxRadioBox::Init() { + m_alreadySent = FALSE; + m_needParent = TRUE; + m_acceptsFocus = TRUE; + + m_hasFocus = + m_lostFocus = FALSE; } bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, @@ -130,10 +174,6 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, long style, const wxValidator& validator, const wxString &name ) { - m_alreadySent = FALSE; - m_needParent = TRUE; - m_acceptsFocus = TRUE; - if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator, name )) { @@ -143,7 +183,9 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, m_widget = gtk_frame_new( title.mbc_str() ); - m_majorDim = majorDim; + // majorDim may be 0 if all trailing parameters were omitted, so don't + // assert here but just use the correct value for it + m_majorDim = majorDim == 0 ? n : majorDim; GtkRadioButton *m_radio = (GtkRadioButton*) NULL; @@ -175,6 +217,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, gtk_signal_connect( GTK_OBJECT(m_radio), "clicked", GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); + gtk_signal_connect( GTK_OBJECT(m_radio), "focus_in_event", + GTK_SIGNAL_FUNC(gtk_radiobutton_focus_in), (gpointer)this ); + + gtk_signal_connect( GTK_OBJECT(m_radio), "focus_out_event", + GTK_SIGNAL_FUNC(gtk_radiobutton_focus_out), (gpointer)this ); + gtk_pizza_put( GTK_PIZZA(m_parent->m_wxwindow), GTK_WIDGET(m_radio), m_x+10, m_y+10+(i*24), 10, 10 ); @@ -665,4 +713,19 @@ bool wxRadioBox::IsOwnGtkWindow( GdkWindow *window ) return FALSE; } -#endif +void wxRadioBox::OnInternalIdle() +{ + if ( m_lostFocus ) + { + m_hasFocus = FALSE; + m_lostFocus = FALSE; + + wxFocusEvent event( wxEVT_KILL_FOCUS, GetId() ); + event.SetEventObject( this ); + + (void)GetEventHandler()->ProcessEvent( event ); + } +} + +#endif // wxUSE_RADIOBOX + diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index fbb0a53ced..ad199768f7 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -38,13 +38,15 @@ extern wxCursor g_globalCursor; //----------------------------------------------------------------------------- static -void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRadioButton *rb ) +void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *rb ) { if (g_isIdle) wxapp_install_idle_handler(); if (!rb->m_hasVMT) return; if (g_blockEventsOnDrag) return; + + if (!button->active) return; wxCommandEvent event( wxEVT_COMMAND_RADIOBUTTON_SELECTED, rb->GetId()); event.SetInt( rb->GetValue() ); @@ -70,7 +72,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxRadioButton creation failed") ); - return FALSE; + return FALSE; } if (HasFlag(wxRB_GROUP)) @@ -84,25 +86,25 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab wxRadioButton *chief = (wxRadioButton*) NULL; wxWindowList::Node *node = parent->GetChildren().GetLast(); while (node) - { - wxWindow *child = node->GetData(); - if (child->m_isRadioButton) - { - chief = (wxRadioButton*) child; - if (child->HasFlag(wxRB_GROUP)) break; - } - node = node->GetPrevious(); + { + wxWindow *child = node->GetData(); + if (child->m_isRadioButton) + { + chief = (wxRadioButton*) child; + if (child->HasFlag(wxRB_GROUP)) break; + } + node = node->GetPrevious(); } - if (chief) - { + if (chief) + { /* we are part of the group started by chief */ - m_radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); - } - else - { + m_radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) ); + } + else + { /* start a new group */ m_radioButtonGroup = (GSList*) NULL; - } + } } m_widget = gtk_radio_button_new_with_label( m_radioButtonGroup, label.mbc_str() ); @@ -148,7 +150,7 @@ void wxRadioButton::SetLabel( const wxString& label ) void wxRadioButton::SetValue( bool val ) { wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") ); - + if (val == GetValue()) return; @@ -162,8 +164,10 @@ void wxRadioButton::SetValue( bool val ) else { // should give an assert + // RL - No it shouldn't. A wxGenericValidator might try to set it + // as FALSE. Failing silently is probably TRTTD here. } - + gtk_signal_connect( GTK_OBJECT(m_widget), "clicked", GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this ); } @@ -205,11 +209,11 @@ void wxRadioButton::OnInternalIdle() if (GTK_TOGGLE_BUTTON(m_widget)->event_window && cursor.Ok()) { /* I now set the cursor the anew in every OnInternalIdle call - as setting the cursor in a parent window also effects the - windows above so that checking for the current cursor is - not possible. */ - - gdk_window_set_cursor( GTK_TOGGLE_BUTTON(m_widget)->event_window, cursor.GetCursor() ); + as setting the cursor in a parent window also effects the + windows above so that checking for the current cursor is + not possible. */ + + gdk_window_set_cursor( GTK_TOGGLE_BUTTON(m_widget)->event_window, cursor.GetCursor() ); } UpdateWindowUI(); diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index 5b03e14703..d00bf0fafc 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -63,7 +63,8 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, wxScrollBar *win ) else if (range->scroll_type == GTK_SCROLL_PAGE_BACKWARD) command = wxEVT_SCROLL_PAGEUP; else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN; - int value = (int)ceil(adjust->value); + double dvalue = adjust->value; + int value = (int)(dvalue >= 0 ? dvalue - 0.5 : dvalue + 0.5); int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL; @@ -129,7 +130,7 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget), IMPLEMENT_DYNAMIC_CLASS(wxScrollBar,wxControl) -wxScrollBar::~wxScrollBar(void) +wxScrollBar::~wxScrollBar() { } @@ -182,9 +183,10 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, return TRUE; } -int wxScrollBar::GetThumbPosition(void) const +int wxScrollBar::GetThumbPosition() const { - return (int)(m_adjust->value+0.5); + double val = m_adjust->value; + return (int)(val >= 0 ? val - 0.5 : val + 0.5); } int wxScrollBar::GetThumbSize() const @@ -252,7 +254,7 @@ void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int page } /* Backward compatibility */ -int wxScrollBar::GetValue(void) const +int wxScrollBar::GetValue() const { return GetThumbPosition(); } diff --git a/src/gtk1/settings.cpp b/src/gtk1/settings.cpp index 4a491823fa..7e5bd7e7db 100644 --- a/src/gtk1/settings.cpp +++ b/src/gtk1/settings.cpp @@ -21,6 +21,8 @@ #include #include +extern GdkFont *GtkGetDefaultGuiFont(); + /* #define wxSYS_COLOUR_SCROLLBAR 0 @@ -67,6 +69,7 @@ wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightTextColour = (wxColour *) NULL; wxColour *g_systemListBoxColour = (wxColour *) NULL; +wxColour *g_systemBtnTextColour = (wxColour *) NULL; wxFont *g_systemFont = (wxFont *) NULL; @@ -80,6 +83,7 @@ void wxSystemSettings::Done() delete g_systemHighlightTextColour; delete g_systemListBoxColour; delete g_systemFont; + delete g_systemBtnTextColour; } wxColour wxSystemSettings::GetSystemColour( int index ) @@ -95,7 +99,36 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_ACTIVEBORDER: case wxSYS_COLOUR_INACTIVEBORDER: case wxSYS_COLOUR_BTNFACE: + case wxSYS_COLOUR_3DLIGHT: { + if (!g_systemBtnFaceColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->bg[GTK_STATE_NORMAL].red; + int green = def->bg[GTK_STATE_NORMAL].green; + int blue = def->bg[GTK_STATE_NORMAL].blue; + g_systemBtnFaceColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnFaceColour = + new wxColour( 0 >> SHIFT, + 0 >> SHIFT, + 0x9c40 >> SHIFT ); + } + gtk_widget_destroy( widget ); + + } + return *g_systemBtnFaceColour; + /* if (!g_systemBtnFaceColour) { g_systemBtnFaceColour = @@ -104,14 +137,29 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xd6d6 >> SHIFT ); } return *g_systemBtnFaceColour; + */ } case wxSYS_COLOUR_WINDOW: { return *wxWHITE; } + case wxSYS_COLOUR_3DDKSHADOW: + { + return *wxBLACK; + } case wxSYS_COLOUR_GRAYTEXT: case wxSYS_COLOUR_BTNSHADOW: + //case wxSYS_COLOUR_3DSHADOW: { + if (!g_systemBtnShadowColour) + { + wxColour faceColour(GetSystemColour(wxSYS_COLOUR_3DFACE)); + g_systemBtnShadowColour = + new wxColour(faceColour.Red() * 0.666, + faceColour.Green() * 0.666, + faceColour.Blue() * 0.666); + } + /* if (!g_systemBtnShadowColour) { g_systemBtnShadowColour = @@ -119,10 +167,14 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0x7530 >> SHIFT, 0x7530 >> SHIFT ); } + */ return *g_systemBtnShadowColour; } - case wxSYS_COLOUR_BTNHIGHLIGHT: + case wxSYS_COLOUR_3DHIGHLIGHT: + //case wxSYS_COLOUR_BTNHIGHLIGHT: { + return * wxWHITE; +/* I think this should normally be white (JACS 8/2000) if (!g_systemBtnHighlightColour) { g_systemBtnHighlightColour = @@ -131,6 +183,7 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xea60 >> SHIFT ); } return *g_systemBtnHighlightColour; +*/ } case wxSYS_COLOUR_HIGHLIGHT: { @@ -193,7 +246,30 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_BTNTEXT: case wxSYS_COLOUR_INFOTEXT: { - return *wxBLACK; + if (!g_systemBtnTextColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->fg[GTK_STATE_NORMAL].red; + int green = def->fg[GTK_STATE_NORMAL].green; + int blue = def->fg[GTK_STATE_NORMAL].blue; + g_systemBtnTextColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnTextColour = + new wxColour(0, 0, 0); + } + gtk_widget_destroy( widget ); + } + return *g_systemBtnTextColour; } case wxSYS_COLOUR_HIGHLIGHTTEXT: { @@ -233,19 +309,8 @@ wxFont wxSystemSettings::GetSystemFont( int index ) { if (!g_systemFont) { - GdkFont *gdk_font = (GdkFont*) NULL; - GtkWidget *widget = gtk_button_new(); #if 0 - GtkStyle *def = gtk_rc_get_style( widget ); - if (def) - gdk_font = def->font; - else - { - def = gtk_widget_get_default_style(); - if (def) - gdk_font = def->font; - } -#endif + GdkFont *gdk_font = GtkGetDefaultGuiFont(); if (gdk_font) { GSList *font_list = ((GdkFontPrivate*)gdk_font)->names; @@ -254,12 +319,11 @@ wxFont wxSystemSettings::GetSystemFont( int index ) wxFontData font_data; g_systemFont = new wxFont( font_string, font_data ); } - else - { - g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL ); - } - gtk_widget_destroy( widget ); +#endif + + g_systemFont = new wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL ); + } return *g_systemFont; } diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index fba7a8b971..00a061af9e 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -61,7 +61,8 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) else if (range->scroll_type == GTK_SCROLL_PAGE_BACKWARD) command = wxEVT_SCROLL_PAGEUP; else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN; - int value = (int)ceil(adjust->value); + double dvalue = adjust->value; + int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5); int orient = wxHORIZONTAL; if ( (win->GetWindowStyleFlag() & wxSB_VERTICAL) == wxSB_VERTICAL) @@ -73,6 +74,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); cevent.SetEventObject( win ); + cevent.SetInt( value ); win->GetEventHandler()->ProcessEvent( cevent ); } @@ -94,7 +96,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxSlider creation failed") ); - return FALSE; + return FALSE; } m_oldPos = 0.0; @@ -107,7 +109,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, if (style & wxSL_LABELS) { gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE ); - gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 ); + gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 ); /* labels need more space and too small window will cause junk to appear on the dialog */ @@ -156,7 +158,10 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, int wxSlider::GetValue() const { - return (int)(m_adjust->value+0.5); + // we want to round to the nearest integer, i.e. 0.9 is rounded to 1 and + // -0.9 is rounded to -1 + double val = m_adjust->value; + return (int)(val < 0 ? val - 0.5 : val + 0.5); } void wxSlider::SetValue( int value ) diff --git a/src/gtk1/spinctrl.cpp b/src/gtk1/spinctrl.cpp index d5efca072e..dac62397eb 100644 --- a/src/gtk1/spinctrl.cpp +++ b/src/gtk1/spinctrl.cpp @@ -51,10 +51,37 @@ static void gtk_spinctrl_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win wxCommandEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, win->GetId()); event.SetEventObject( win ); + event.SetInt( win->GetValue() ); win->GetEventHandler()->ProcessEvent( event ); } +//----------------------------------------------------------------------------- +// "changed" +//----------------------------------------------------------------------------- + +static void +gtk_spinctrl_text_changed_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win ) +{ + if (!win->m_hasVMT) return; + + if (g_isIdle) + wxapp_install_idle_handler(); + + wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() ); + event.SetEventObject( win ); + + // note that we don't use wxSpinCtrl::GetValue() here because it would + // adjust the value to fit into the control range and this means that we + // would never be able to enter an "invalid" value in the control, even + // temporarily - and trying to enter 10 into the control which accepts the + // values in range 5..50 is then, ummm, quite challenging (hint: you can't + // enter 1!) (VZ) + event.SetInt( (int)ceil(win->m_adjust->value) ); + + win->GetEventHandler()->ProcessEvent( event ); +} + //----------------------------------------------------------------------------- // wxSpinCtrl //----------------------------------------------------------------------------- @@ -125,6 +152,9 @@ void wxSpinCtrl::GtkDisableEvents() GTK_SIGNAL_FUNC(gtk_spinctrl_callback), (gpointer) this ); + gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget), + GTK_SIGNAL_FUNC(gtk_spinctrl_text_changed_callback), + (gpointer) this ); } void wxSpinCtrl::GtkEnableEvents() @@ -133,6 +163,11 @@ void wxSpinCtrl::GtkEnableEvents() "value_changed", GTK_SIGNAL_FUNC(gtk_spinctrl_callback), (gpointer) this ); + + gtk_signal_connect( GTK_OBJECT(m_widget), + "changed", + GTK_SIGNAL_FUNC(gtk_spinctrl_text_changed_callback), + (gpointer)this); } int wxSpinCtrl::GetMin() const @@ -222,7 +257,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event ) if (event.KeyCode() == WXK_RETURN) { wxWindow *top_frame = m_parent; - while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame)) + while (top_frame->GetParent() && !(top_frame->GetParent()->IsTopLevel())) top_frame = top_frame->GetParent(); GtkWindow *window = GTK_WINDOW(top_frame->m_widget); diff --git a/src/gtk1/statline.cpp b/src/gtk1/statline.cpp index 60970765ed..4e8f0787cb 100644 --- a/src/gtk1/statline.cpp +++ b/src/gtk1/statline.cpp @@ -45,28 +45,28 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id, !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) { wxFAIL_MSG( wxT("wxStaticLine creation failed") ); - return FALSE; + return FALSE; } if ( IsVertical() ) { m_widget = gtk_vseparator_new(); - if (size.x == -1) - { - wxSize new_size( size ); - new_size.x = 4; - SetSize( new_size ); - } + if (size.x == -1) + { + wxSize new_size( size ); + new_size.x = 4; + SetSize( new_size ); + } } else { m_widget = gtk_hseparator_new(); - if (size.y == -1) - { - wxSize new_size( size ); - new_size.y = 4; - SetSize( new_size ); - } + if (size.y == -1) + { + wxSize new_size( size ); + new_size.y = 4; + SetSize( new_size ); + } } m_parent->DoAddChild( this ); diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 6e58b78a54..5021a9221a 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -33,6 +33,8 @@ #include "gdk/gdk.h" #include "gtk/gtk.h" +extern GdkFont *GtkGetDefaultGuiFont(); + // ---------------------------------------------------------------------------- // globals // ---------------------------------------------------------------------------- @@ -303,8 +305,9 @@ bool wxToolBar::Create( wxWindow *parent, GTK_TOOLBAR(m_toolbar)->tooltips->tip_window ) ); g_style->bg[GTK_STATE_NORMAL] = *m_bg; + gdk_font_unref( g_style->font ); + g_style->font = gdk_font_ref( GtkGetDefaultGuiFont() ); gtk_widget_set_style( GTK_TOOLBAR(m_toolbar)->tooltips->tip_window, g_style ); - m_parent->DoAddChild( this ); @@ -386,7 +389,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) break; case wxTOOL_STYLE_SEPARATOR: - gtk_toolbar_append_space( m_toolbar ); + gtk_toolbar_insert_space( m_toolbar, pos ); // skip the rest return TRUE; diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 0f8df9de99..cbb0f71805 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -15,6 +15,8 @@ #include "wx/utils.h" #include "wx/intl.h" #include "wx/settings.h" +#include "wx/panel.h" +#include "wx/caret.h" #include #include @@ -37,6 +39,8 @@ extern bool g_isIdle; extern bool g_blockEventsOnDrag; extern wxCursor g_globalCursor; +extern wxWindow *g_focusWindow; +extern int g_sendActivateEvent; //----------------------------------------------------------------------------- // "changed" @@ -73,6 +77,101 @@ gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win ) win->CalculateScrollbar(); } +//----------------------------------------------------------------------------- +// "focus_in_event" +//----------------------------------------------------------------------------- + +static gint gtk_text_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) +{ + if (g_isIdle) + wxapp_install_idle_handler(); + + if (!win->m_hasVMT) return FALSE; + if (g_blockEventsOnDrag) return FALSE; + + switch ( g_sendActivateEvent ) + { + case -1: + // we've got focus from outside, synthtize wxActivateEvent + g_sendActivateEvent = 1; + break; + + case 0: + // another our window just lost focus, it was already ours before + // - don't send any wxActivateAppEvent + g_sendActivateEvent = -1; + break; + } + + g_focusWindow = win; + + wxPanel *panel = wxDynamicCast(win->GetParent(), wxPanel); + if (panel) + { + panel->SetLastFocus(win); + } + +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnSetFocus(); + } +#endif // wxUSE_CARET + + wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); + event.SetEventObject( win ); + + if (win->GetEventHandler()->ProcessEvent( event )) + { + gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); + return TRUE; + } + + return FALSE; +} + +//----------------------------------------------------------------------------- +// "focus_out_event" +//----------------------------------------------------------------------------- + +static gint gtk_text_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED(event), wxWindow *win ) +{ + if (g_isIdle) + wxapp_install_idle_handler(); + + if (!win->m_hasVMT) return FALSE; + if (g_blockEventsOnDrag) return FALSE; + + // if the focus goes out of our app alltogether, OnIdle() will send + // wxActivateEvent, otherwise gtk_window_focus_in_callback() will reset + // g_sendActivateEvent to -1 + g_sendActivateEvent = 0; + + g_focusWindow = (wxWindow *)NULL; + +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnKillFocus(); + } +#endif // wxUSE_CARET + + wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() ); + event.SetEventObject( win ); + + if (win->GetEventHandler()->ProcessEvent( event )) + { + gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" ); + return TRUE; + } + + return FALSE; +} + //----------------------------------------------------------------------------- // wxTextCtrl //----------------------------------------------------------------------------- @@ -98,6 +197,8 @@ END_EVENT_TABLE() wxTextCtrl::wxTextCtrl() { m_modified = FALSE; + m_text = + m_vScrollbar = (GtkWidget *)NULL; } wxTextCtrl::wxTextCtrl( wxWindow *parent, @@ -210,14 +311,16 @@ bool wxTextCtrl::Create( wxWindow *parent, if (multi_line) gtk_widget_show(m_text); - /* we want to be notified about text changes */ - gtk_signal_connect( GTK_OBJECT(m_text), "changed", - GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this); - if (multi_line) { gtk_signal_connect(GTK_OBJECT(GTK_TEXT(m_text)->vadj), "changed", (GtkSignalFunc) gtk_scrollbar_changed_callback, (gpointer) this ); + + gtk_signal_connect( GTK_OBJECT(GTK_TEXT(m_text)), "focus_in_event", + GTK_SIGNAL_FUNC(gtk_text_focus_in_callback), (gpointer)this ); + + gtk_signal_connect( GTK_OBJECT(GTK_TEXT(m_text)), "focus_out_event", + GTK_SIGNAL_FUNC(gtk_text_focus_out_callback), (gpointer)this ); } if (!value.IsEmpty()) @@ -262,6 +365,10 @@ bool wxTextCtrl::Create( wxWindow *parent, gtk_text_set_editable( GTK_TEXT(m_text), 1 ); } + /* we want to be notified about text changes */ + gtk_signal_connect( GTK_OBJECT(m_text), "changed", + GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this); + SetBackgroundColour( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW) ); SetForegroundColour( parent->GetForegroundColour() ); @@ -337,6 +444,13 @@ void wxTextCtrl::SetValue( const wxString &value ) { gtk_entry_set_text( GTK_ENTRY(m_text), tmp.mbc_str() ); } + + // GRG, Jun/2000: Changed this after a lot of discussion in + // the lists. wxWindows 2.2 will have a set of flags to + // customize this behaviour. + SetInsertionPoint(0); + + m_modified = FALSE; } void wxTextCtrl::WriteText( const wxString &text ) @@ -614,7 +728,7 @@ bool wxTextCtrl::Enable( bool enable ) // nothing to do return FALSE; } - + if (m_windowStyle & wxTE_MULTILINE) { gtk_text_set_editable( GTK_TEXT(m_text), enable ); @@ -735,7 +849,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to) ; + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const @@ -778,8 +892,9 @@ void wxTextCtrl::GetSelection(long* from, long* to) const if (!(GTK_EDITABLE(m_text)->has_selection)) { - if (from) *from = 0; - if (to) *to = 0; + long i = GetInsertionPoint(); + if (from) *from = i; + if (to) *to = i; return; } @@ -812,6 +927,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); event.SetEventObject(this); + event.SetString(GetValue()); if (GetEventHandler()->ProcessEvent(event)) return; } diff --git a/src/gtk1/threadpsx.cpp b/src/gtk1/threadpsx.cpp deleted file mode 100644 index 99239908ef..0000000000 --- a/src/gtk1/threadpsx.cpp +++ /dev/null @@ -1,758 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: threadpsx.cpp -// Purpose: wxThread (Posix) Implementation -// Author: Original from Wolfram Gloger/Guilhem Lavaux -// Modified by: -// Created: 04/22/98 -// RCS-ID: $Id$ -// Copyright: (c) Wolfram Gloger (1996, 1997) -// Guilhem Lavaux (1998) -// Robert Roebling (1999) -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ - #pragma implementation "thread.h" -#endif - -#include -#include -#include -#include - -#ifdef __linux__ - #include -#endif - -#ifdef __SUN__ -extern int usleep(unsigned int useconds); -#endif - - -#include "wx/thread.h" -#include "wx/module.h" -#include "wx/utils.h" -#include "wx/log.h" -#include "wx/intl.h" -#include "wx/dynarray.h" - -#include "gdk/gdk.h" -#include "gtk/gtk.h" - -enum thread_state -{ - STATE_NEW, // didn't start execution yet (=> RUNNING) - STATE_RUNNING, - STATE_PAUSED, - STATE_CANCELED, - STATE_EXITED -}; - -WX_DEFINE_ARRAY(wxThread *, wxArrayThread); - -// ----------------------------------------------------------------------------- -// global data -// ----------------------------------------------------------------------------- - -// we keep the list of all threads created by the application to be able to -// terminate them on exit if there are some left - otherwise the process would -// be left in memory -static wxArrayThread gs_allThreads; - -// the id of the main thread -static pthread_t gs_tidMain; - -// the key for the pointer to the associated wxThread object -static pthread_key_t gs_keySelf; - -// this mutex must be acquired before any call to a GUI function -static wxMutex *gs_mutexGui; - -//-------------------------------------------------------------------- -// common GUI thread code -//-------------------------------------------------------------------- - -#include "threadgui.inc" - -//-------------------------------------------------------------------- -// wxMutex (Posix implementation) -//-------------------------------------------------------------------- - -class wxMutexInternal -{ -public: - pthread_mutex_t p_mutex; -}; - -wxMutex::wxMutex() -{ - p_internal = new wxMutexInternal; - pthread_mutex_init( &(p_internal->p_mutex), (const pthread_mutexattr_t*) NULL ); - m_locked = 0; -} - -wxMutex::~wxMutex() -{ - if (m_locked > 0) - wxLogDebug("Freeing a locked mutex (%d locks)", m_locked); - - pthread_mutex_destroy( &(p_internal->p_mutex) ); - delete p_internal; -} - -wxMutexError wxMutex::Lock() -{ - int err = pthread_mutex_lock( &(p_internal->p_mutex) ); - if (err == EDEADLK) - { - wxLogDebug("Locking this mutex would lead to deadlock!"); - - return wxMUTEX_DEAD_LOCK; - } - - m_locked++; - - return wxMUTEX_NO_ERROR; -} - -wxMutexError wxMutex::TryLock() -{ - if (m_locked) - { - return wxMUTEX_BUSY; - } - - int err = pthread_mutex_trylock( &(p_internal->p_mutex) ); - switch (err) - { - case EBUSY: return wxMUTEX_BUSY; - } - - m_locked++; - - return wxMUTEX_NO_ERROR; -} - -wxMutexError wxMutex::Unlock() -{ - if (m_locked > 0) - { - m_locked--; - } - else - { - wxLogDebug("Unlocking not locked mutex."); - - return wxMUTEX_UNLOCKED; - } - - pthread_mutex_unlock( &(p_internal->p_mutex) ); - - return wxMUTEX_NO_ERROR; -} - -//-------------------------------------------------------------------- -// wxCondition (Posix implementation) -//-------------------------------------------------------------------- - -class wxConditionInternal -{ -public: - pthread_cond_t p_condition; -}; - -wxCondition::wxCondition() -{ - p_internal = new wxConditionInternal; - pthread_cond_init( &(p_internal->p_condition), (const pthread_condattr_t *) NULL ); -} - -wxCondition::~wxCondition() -{ - pthread_cond_destroy( &(p_internal->p_condition) ); - - delete p_internal; -} - -void wxCondition::Wait(wxMutex& mutex) -{ - pthread_cond_wait( &(p_internal->p_condition), &(mutex.p_internal->p_mutex) ); -} - -bool wxCondition::Wait(wxMutex& mutex, unsigned long sec, unsigned long nsec) -{ - struct timespec tspec; - - tspec.tv_sec = time(0L)+sec; - tspec.tv_nsec = nsec; - return (pthread_cond_timedwait(&(p_internal->p_condition), &(mutex.p_internal->p_mutex), &tspec) != ETIMEDOUT); -} - -void wxCondition::Signal() -{ - pthread_cond_signal( &(p_internal->p_condition) ); -} - -void wxCondition::Broadcast() -{ - pthread_cond_broadcast( &(p_internal->p_condition) ); -} - -//-------------------------------------------------------------------- -// wxThread (Posix implementation) -//-------------------------------------------------------------------- - -class wxThreadInternal -{ -public: - wxThreadInternal(); - ~wxThreadInternal(); - - // thread entry function - static void *PthreadStart(void *ptr); - - // thread actions - // start the thread - wxThreadError Run(); - // ask the thread to terminate - void Cancel(); - // wake up threads waiting for our termination - void SignalExit(); - // go to sleep until Resume() is called - void Pause(); - // resume the thread - void Resume(); - - // accessors - // priority - int GetPriority() const { return m_prio; } - void SetPriority(int prio) { m_prio = prio; } - // state - thread_state GetState() const { return m_state; } - void SetState(thread_state state) { m_state = state; } - // id - pthread_t GetId() const { return thread_id; } - // "cancelled" flag - bool WasCancelled() const { return m_cancelled; } - -//private: -- should be! - pthread_t thread_id; - -private: - thread_state m_state; // see thread_state enum - int m_prio; // in wxWindows units: from 0 to 100 - - // set when the thread should terminate - bool m_cancelled; - - // this (mutex, cond) pair is used to synchronize the main thread and this - // thread in several situations: - // 1. The thread function blocks until condition is signaled by Run() when - // it's initially created - this allows create thread in "suspended" - // state - // 2. The Delete() function blocks until the condition is signaled when the - // thread exits. - wxMutex m_mutex; - wxCondition m_cond; - - // another (mutex, cond) pair for Pause()/Resume() usage - // - // VZ: it's possible that we might reuse the mutex and condition from above - // for this too, but as I'm not at all sure that it won't create subtle - // problems with race conditions between, say, Pause() and Delete() I - // prefer this may be a bit less efficient but much safer solution - wxMutex m_mutexSuspend; - wxCondition m_condSuspend; -}; - -void *wxThreadInternal::PthreadStart(void *ptr) -{ - wxThread *thread = (wxThread *)ptr; - wxThreadInternal *pthread = thread->p_internal; - - if ( pthread_setspecific(gs_keySelf, thread) != 0 ) - { - wxLogError(_("Can not start thread: error writing TLS.")); - - return (void *)-1; - } - - // wait for the condition to be signaled from Run() - // mutex state: currently locked by the thread which created us - pthread->m_cond.Wait(pthread->m_mutex); - - // mutex state: locked again on exit of Wait() - - // call the main entry - void* status = thread->Entry(); - - // terminate the thread - thread->Exit(status); - - wxFAIL_MSG("wxThread::Exit() can't return."); - - return NULL; -} - -wxThreadInternal::wxThreadInternal() -{ - m_state = STATE_NEW; - m_cancelled = FALSE; - - // this mutex is locked during almost all thread lifetime - it will only be - // unlocked in the very end - m_mutex.Lock(); - - // this mutex is used in Pause()/Resume() and is also locked all the time - // unless the thread is paused - m_mutexSuspend.Lock(); -} - -wxThreadInternal::~wxThreadInternal() -{ - m_mutexSuspend.Unlock(); - - // note that m_mutex will be unlocked by the thread which waits for our - // termination -} - -wxThreadError wxThreadInternal::Run() -{ - wxCHECK_MSG( GetState() == STATE_NEW, wxTHREAD_RUNNING, - "thread may only be started once after successful Create()" ); - - // the mutex was locked on Create(), so we will be able to lock it again - // only when the thread really starts executing and enters the wait - - // otherwise we might signal the condition before anybody is waiting for it - wxMutexLocker lock(m_mutex); - m_cond.Signal(); - - m_state = STATE_RUNNING; - - return wxTHREAD_NO_ERROR; - - // now the mutex is unlocked back - but just to allow Wait() function to - // terminate by relocking it, so the net result is that the worker thread - // starts executing and the mutex is still locked -} - -void wxThreadInternal::Cancel() -{ - // if the thread we're waiting for is waiting for the GUI mutex, we will - // deadlock so make sure we release it temporarily - if ( wxThread::IsMain() ) - wxMutexGuiLeave(); - - // nobody ever writes this variable so it's safe to not use any - // synchronization here - m_cancelled = TRUE; - - // entering Wait() releases the mutex thus allowing SignalExit() to acquire - // it and to signal us its termination - m_cond.Wait(m_mutex); - - // mutex is still in the locked state - relocked on exit from Wait(), so - // unlock it - we don't need it any more, the thread has already terminated - m_mutex.Unlock(); - - // reacquire GUI mutex - if ( wxThread::IsMain() ) - wxMutexGuiEnter(); -} - -void wxThreadInternal::SignalExit() -{ - // as mutex is currently locked, this will block until some other thread - // (normally the same which created this one) unlocks it by entering Wait() - m_mutex.Lock(); - - // wake up all the threads waiting for our termination - m_cond.Broadcast(); - - // after this call mutex will be finally unlocked - m_mutex.Unlock(); -} - -void wxThreadInternal::Pause() -{ - wxCHECK_RET( m_state == STATE_PAUSED, - "thread must first be paused with wxThread::Pause()." ); - - // wait until the condition is signaled from Resume() - m_condSuspend.Wait(m_mutexSuspend); -} - -void wxThreadInternal::Resume() -{ - wxCHECK_RET( m_state == STATE_PAUSED, - "can't resume thread which is not suspended." ); - - // we will be able to lock this mutex only when Pause() starts waiting - wxMutexLocker lock(m_mutexSuspend); - m_condSuspend.Signal(); - - SetState(STATE_RUNNING); -} - -// ----------------------------------------------------------------------------- -// static functions -// ----------------------------------------------------------------------------- - -wxThread *wxThread::This() -{ - return (wxThread *)pthread_getspecific(gs_keySelf); -} - -bool wxThread::IsMain() -{ - return (bool)pthread_equal(pthread_self(), gs_tidMain); -} - -void wxThread::Yield() -{ -#ifdef HAVE_SCHED_YIELD - sched_yield(); -#else // !HAVE_SCHED_YIELD - // may be it will have the desired effect? - Sleep(0); -#endif // HAVE_SCHED_YIELD -} - -void wxThread::Sleep(unsigned long milliseconds) -{ - wxUsleep(milliseconds); -} - -// ----------------------------------------------------------------------------- -// creating thread -// ----------------------------------------------------------------------------- - -wxThread::wxThread() -{ - // add this thread to the global list of all threads - gs_allThreads.Add(this); - - p_internal = new wxThreadInternal(); -} - -wxThreadError wxThread::Create() -{ - if (p_internal->GetState() != STATE_NEW) - return wxTHREAD_RUNNING; - - // set up the thread attribute: right now, we only set thread priority - pthread_attr_t attr; - pthread_attr_init(&attr); - -#ifdef HAVE_THREAD_PRIORITY_FUNCTIONS - int prio; - if ( pthread_attr_getschedpolicy(&attr, &prio) != 0 ) - { - wxLogError(_("Can not retrieve thread scheduling policy.")); - } - - int min_prio = sched_get_priority_min(prio), - max_prio = sched_get_priority_max(prio); - - if ( min_prio == -1 || max_prio == -1 ) - { - wxLogError(_("Can not get priority range for scheduling policy %d."), - prio); - } - else - { - struct sched_param sp; - pthread_attr_getschedparam(&attr, &sp); - sp.sched_priority = min_prio + - (p_internal->GetPriority()*(max_prio-min_prio))/100; - pthread_attr_setschedparam(&attr, &sp); - } -#endif // HAVE_THREAD_PRIORITY_FUNCTIONS - - // create the new OS thread object - int rc = pthread_create(&p_internal->thread_id, &attr, - wxThreadInternal::PthreadStart, (void *)this); - pthread_attr_destroy(&attr); - - if ( rc != 0 ) - { - p_internal->SetState(STATE_EXITED); - return wxTHREAD_NO_RESOURCE; - } - - return wxTHREAD_NO_ERROR; -} - -wxThreadError wxThread::Run() -{ - return p_internal->Run(); -} - -// ----------------------------------------------------------------------------- -// misc accessors -// ----------------------------------------------------------------------------- - -void wxThread::SetPriority(unsigned int prio) -{ - wxCHECK_RET( ((int)WXTHREAD_MIN_PRIORITY <= (int)prio) && - ((int)prio <= (int)WXTHREAD_MAX_PRIORITY), - "invalid thread priority" ); - - wxCriticalSectionLocker lock(m_critsect); - - switch ( p_internal->GetState() ) - { - case STATE_NEW: - // thread not yet started, priority will be set when it is - p_internal->SetPriority(prio); - break; - - case STATE_RUNNING: - case STATE_PAUSED: -#ifdef HAVE_THREAD_PRIORITY_FUNCTIONS - { - struct sched_param sparam; - sparam.sched_priority = prio; - - if ( pthread_setschedparam(p_internal->GetId(), - SCHED_OTHER, &sparam) != 0 ) - { - wxLogError(_("Failed to set thread priority %d."), prio); - } - } -#endif // HAVE_THREAD_PRIORITY_FUNCTIONS - break; - - case STATE_EXITED: - default: - wxFAIL_MSG("impossible to set thread priority in this state"); - } -} - -unsigned int wxThread::GetPriority() const -{ - wxCriticalSectionLocker lock((wxCriticalSection &)m_critsect); - - return p_internal->GetPriority(); -} - -unsigned long wxThread::GetID() const -{ - return (unsigned long)p_internal->thread_id; -} - -// ----------------------------------------------------------------------------- -// pause/resume -// ----------------------------------------------------------------------------- - -wxThreadError wxThread::Pause() -{ - wxCriticalSectionLocker lock(m_critsect); - - if ( p_internal->GetState() != STATE_RUNNING ) - { - wxLogDebug("Can't pause thread which is not running."); - - return wxTHREAD_NOT_RUNNING; - } - - p_internal->SetState(STATE_PAUSED); - - return wxTHREAD_NO_ERROR; -} - -wxThreadError wxThread::Resume() -{ - wxCriticalSectionLocker lock(m_critsect); - - if ( p_internal->GetState() == STATE_PAUSED ) - { - p_internal->Resume(); - - return wxTHREAD_NO_ERROR; - } - else - { - wxLogDebug("Attempt to resume a thread which is not paused."); - - return wxTHREAD_MISC_ERROR; - } -} - -// ----------------------------------------------------------------------------- -// exiting thread -// ----------------------------------------------------------------------------- - -wxThread::ExitCode wxThread::Delete() -{ - m_critsect.Enter(); - thread_state state = p_internal->GetState(); - m_critsect.Leave(); - - switch ( state ) - { - case STATE_NEW: - case STATE_EXITED: - // nothing to do - break; - - case STATE_PAUSED: - // resume the thread first - Resume(); - - // fall through - - default: - // set the flag telling to the thread to stop and wait - p_internal->Cancel(); - } - - return NULL; -} - -wxThreadError wxThread::Kill() -{ - switch ( p_internal->GetState() ) - { - case STATE_NEW: - case STATE_EXITED: - return wxTHREAD_NOT_RUNNING; - - default: -#ifdef HAVE_PTHREAD_CANCEL - if ( pthread_cancel(p_internal->GetId()) != 0 ) -#endif - { - wxLogError(_("Failed to terminate a thread.")); - - return wxTHREAD_MISC_ERROR; - } - - return wxTHREAD_NO_ERROR; - } -} - -void wxThread::Exit(void *status) -{ - // first call user-level clean up code - OnExit(); - - // next wake up the threads waiting for us (OTOH, this function won't return - // until someone waited for us!) - p_internal->SignalExit(); - - p_internal->SetState(STATE_EXITED); - - // delete both C++ thread object and terminate the OS thread object - delete this; - pthread_exit(status); -} - -// also test whether we were paused -bool wxThread::TestDestroy() -{ - wxCriticalSectionLocker lock((wxCriticalSection&)m_critsect); - - if ( p_internal->GetState() == STATE_PAUSED ) - { - // leave the crit section or the other threads will stop too if they try - // to call any of (seemingly harmless) IsXXX() functions while we sleep - m_critsect.Leave(); - - p_internal->Pause(); - - // enter it back before it's finally left in lock object dtor - m_critsect.Enter(); - } - - return p_internal->WasCancelled(); -} - -wxThread::~wxThread() -{ - // remove this thread from the global array - gs_allThreads.Remove(this); -} - -// ----------------------------------------------------------------------------- -// state tests -// ----------------------------------------------------------------------------- - -bool wxThread::IsRunning() const -{ - wxCriticalSectionLocker lock((wxCriticalSection &)m_critsect); - - return p_internal->GetState() == STATE_RUNNING; -} - -bool wxThread::IsAlive() const -{ - wxCriticalSectionLocker lock((wxCriticalSection&)m_critsect); - - switch ( p_internal->GetState() ) - { - case STATE_RUNNING: - case STATE_PAUSED: - return TRUE; - - default: - return FALSE; - } -} - -//-------------------------------------------------------------------- -// wxThreadModule -//-------------------------------------------------------------------- - -class wxThreadModule : public wxModule -{ -public: - virtual bool OnInit(); - virtual void OnExit(); - -private: - DECLARE_DYNAMIC_CLASS(wxThreadModule) -}; - -IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) - -bool wxThreadModule::OnInit() -{ - if ( pthread_key_create(&gs_keySelf, NULL /* dtor function */) != 0 ) - { - wxLogError(_("Thread module initialization failed: " - "failed to create pthread key.")); - - return FALSE; - } - - gs_mutexGui = new wxMutex(); - wxThreadGuiInit(); - gs_tidMain = pthread_self(); - gs_mutexGui->Lock(); - - return TRUE; -} - -void wxThreadModule::OnExit() -{ - wxASSERT_MSG( wxThread::IsMain(), "only main thread can be here" ); - - // terminate any threads left - size_t count = gs_allThreads.GetCount(); - if ( count != 0u ) - wxLogDebug("Some threads were not terminated by the application."); - - for ( size_t n = 0u; n < count; n++ ) - { - gs_allThreads[n]->Delete(); - } - - // destroy GUI mutex - gs_mutexGui->Unlock(); - wxThreadGuiExit(); - delete gs_mutexGui; - - // and free TLD slot - (void)pthread_key_delete(gs_keySelf); -} diff --git a/src/gtk1/tooltip.cpp b/src/gtk1/tooltip.cpp index a80317beeb..109f4658a6 100644 --- a/src/gtk1/tooltip.cpp +++ b/src/gtk1/tooltip.cpp @@ -21,6 +21,8 @@ #include "gtk/gtk.h" #include "gdk/gdk.h" +extern GdkFont *GtkGetDefaultGuiFont(); + //----------------------------------------------------------------------------- // global data //----------------------------------------------------------------------------- @@ -72,7 +74,9 @@ void wxToolTip::Apply( wxWindow *win ) g_style->fg[GTK_STATE_NORMAL] = ss_fg; g_style->bg[GTK_STATE_NORMAL] = ss_bg; - + gdk_font_unref( g_style->font ); + g_style->font = gdk_font_ref( GtkGetDefaultGuiFont() ); + gtk_widget_set_style( ss_tooltips->tip_window, g_style ); #else gtk_tooltips_set_colors( ss_tooltips, &ss_bg, &ss_fg ); diff --git a/src/gtk1/win_gtk.c b/src/gtk1/win_gtk.c index e2b14c9404..f69ec2706c 100644 --- a/src/gtk1/win_gtk.c +++ b/src/gtk1/win_gtk.c @@ -76,6 +76,8 @@ static void gtk_pizza_adjust_allocations (GtkPizza *pizza, gint dy); +/* unused */ +#if 0 static void gtk_pizza_expose_area (GtkPizza *pizza, gint x, gint y, @@ -83,6 +85,8 @@ static void gtk_pizza_expose_area (GtkPizza *pizza, gint height); static void gtk_pizza_adjustment_changed (GtkAdjustment *adjustment, GtkPizza *pizza); +#endif + static GdkFilterReturn gtk_pizza_filter (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data); @@ -959,6 +963,8 @@ gtk_pizza_adjust_allocations (GtkPizza *pizza, /* Callbacks */ +/* unused */ +#if 0 /* Send a synthetic expose event to the widget */ static void @@ -984,6 +990,7 @@ gtk_pizza_expose_area (GtkPizza *pizza, gdk_window_unref (event.window); } } +#endif /* unused */ /* This function is used to find events to process while scrolling */ @@ -993,12 +1000,12 @@ gtk_pizza_expose_predicate (Display *display, XEvent *xevent, XPointer arg) { - if ((xevent->type == Expose) || - ((xevent->xany.window == *(Window *)arg) && + if ((xevent->type == Expose) || + ((xevent->xany.window == *(Window *)arg) && (xevent->type == ConfigureNotify))) - return True; - else - return False; + return True; + else + return False; } /* This is the main routine to do the scrolling. Scrolling is @@ -1016,40 +1023,40 @@ gtk_pizza_expose_predicate (Display *display, void gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) { - GtkWidget *widget; - XEvent xevent; + GtkWidget *widget; + XEvent xevent; - gint x,y,w,h,border; + gint x,y,w,h,border; - widget = GTK_WIDGET (pizza); + widget = GTK_WIDGET (pizza); - pizza->xoffset += dx; - pizza->yoffset += dy; + pizza->xoffset += dx; + pizza->yoffset += dy; - if (!GTK_WIDGET_MAPPED (pizza)) + if (!GTK_WIDGET_MAPPED (pizza)) { - gtk_pizza_position_children (pizza); - return; + gtk_pizza_position_children (pizza); + return; } - gtk_pizza_adjust_allocations (pizza, -dx, -dy); + gtk_pizza_adjust_allocations (pizza, -dx, -dy); - if (pizza->shadow_type == GTK_MYSHADOW_NONE) - border = 0; - else - if (pizza->shadow_type == GTK_MYSHADOW_THIN) - border = 1; - else - border = 2; + if (pizza->shadow_type == GTK_MYSHADOW_NONE) + border = 0; + else + if (pizza->shadow_type == GTK_MYSHADOW_THIN) + border = 1; + else + border = 2; - x = 0; - y = 0; - w = widget->allocation.width - 2*border; - h = widget->allocation.height - 2*border; + x = 0; + y = 0; + w = widget->allocation.width - 2*border; + h = widget->allocation.height - 2*border; - if (dx > 0) + if (dx > 0) { - if (gravity_works) + if (gravity_works) { gdk_window_resize (pizza->bin_window, w + dx, @@ -1057,20 +1064,14 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) gdk_window_move (pizza->bin_window, x-dx, y); gdk_window_move_resize (pizza->bin_window, x, y, w, h ); } - else + else { /* FIXME */ } - - gtk_pizza_expose_area (pizza, - MAX ((gint)w - dx, 0), - 0, - MIN (dx, w), - h); } - else if (dx < 0) + else if (dx < 0) { - if (gravity_works) + if (gravity_works) { gdk_window_move_resize (pizza->bin_window, x + dx, @@ -1080,102 +1081,73 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) gdk_window_move (pizza->bin_window, x, y); gdk_window_resize (pizza->bin_window, w, h ); } - else + else { /* FIXME */ } - - gtk_pizza_expose_area (pizza, - 0, - 0, - MIN (-dx, w), - h); } - if (dy > 0) + if (dy > 0) { - if (gravity_works) + if (gravity_works) { gdk_window_resize (pizza->bin_window, w, h + dy); gdk_window_move (pizza->bin_window, x, y-dy); gdk_window_move_resize (pizza->bin_window, x, y, w, h ); } - else + else { /* FIXME */ } - - gtk_pizza_expose_area (pizza, - 0, - MAX ((gint)h - dy, 0), - w, - MIN (dy, h)); } - else if (dy < 0) + else if (dy < 0) { - if (gravity_works) + if (gravity_works) { gdk_window_move_resize (pizza->bin_window, x, y+dy, w, h - dy ); gdk_window_move (pizza->bin_window, x, y); gdk_window_resize (pizza->bin_window, w, h ); } - else + else { /* FIXME */ } - gtk_pizza_expose_area (pizza, - 0, - 0, - w, - MIN (-dy, (gint)h)); } - gtk_pizza_position_children (pizza); + gtk_pizza_position_children (pizza); - /* We have to make sure that all exposes from this scroll get - * processed before we scroll again, or the expose events will - * have invalid coordinates. - * - * We also do expose events for other windows, since otherwise - * their updating will fall behind the scrolling - * - * This also avoids a problem in pre-1.0 GTK where filters don't - * have access to configure events that were compressed. - */ - - gdk_flush(); - while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window), - &xevent, - gtk_pizza_expose_predicate, - (XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window))) + gdk_flush(); + while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window), + &xevent, + gtk_pizza_expose_predicate, + (XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window))) { - GdkEvent event; - GtkWidget *event_widget; + GdkEvent event; + GtkWidget *event_widget; - if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) && - (gtk_pizza_filter (&xevent, &event, pizza) == GDK_FILTER_REMOVE)) - continue; + if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) ) + gtk_pizza_filter (&xevent, &event, pizza); - if (xevent.type == Expose) + if (xevent.type == Expose) { - event.expose.window = gdk_window_lookup (xevent.xany.window); - gdk_window_get_user_data (event.expose.window, + event.expose.window = gdk_window_lookup (xevent.xany.window); + gdk_window_get_user_data (event.expose.window, (gpointer *)&event_widget); - if (event_widget) + if (event_widget) { - event.expose.type = GDK_EXPOSE; - event.expose.area.x = xevent.xexpose.x; - event.expose.area.y = xevent.xexpose.y; - event.expose.area.width = xevent.xexpose.width; - event.expose.area.height = xevent.xexpose.height; - event.expose.count = xevent.xexpose.count; + event.expose.type = GDK_EXPOSE; + event.expose.area.x = xevent.xexpose.x; + event.expose.area.y = xevent.xexpose.y; + event.expose.area.width = xevent.xexpose.width; + event.expose.area.height = xevent.xexpose.height; + event.expose.count = xevent.xexpose.count; - gdk_window_ref (event.expose.window); - gtk_widget_event (event_widget, &event); - gdk_window_unref (event.expose.window); + gdk_window_ref (event.expose.window); + gtk_widget_event (event_widget, &event); + gdk_window_unref (event.expose.window); } } } @@ -1206,25 +1178,17 @@ gtk_pizza_filter (GdkXEvent *gdk_xevent, if (!pizza->use_filter) return GDK_FILTER_CONTINUE; - switch (xevent->type) + switch (xevent->type) { case Expose: if (xevent->xexpose.serial == pizza->configure_serial) { - if (pizza->visibility == GDK_VISIBILITY_UNOBSCURED) - return GDK_FILTER_REMOVE; - else - { - xevent->xexpose.x += pizza->scroll_x; - xevent->xexpose.y += pizza->scroll_y; - - break; - } + xevent->xexpose.x += pizza->scroll_x; + xevent->xexpose.y += pizza->scroll_y; } break; case ConfigureNotify: - if ((xevent->xconfigure.x != 0) || (xevent->xconfigure.y != 0)) { pizza->configure_serial = xevent->xconfigure.serial; pizza->scroll_x = xevent->xconfigure.x; @@ -1278,8 +1242,6 @@ gtk_pizza_main_filter (GdkXEvent *gdk_xevent, } - - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 80384e2535..7992d1e0bf 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: window.cpp +// Name: gtk/window.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -14,7 +14,7 @@ #include "wx/defs.h" #include "wx/window.h" -#include "wx/dc.h" +#include "wx/dcclient.h" #include "wx/frame.h" #include "wx/app.h" #include "wx/layout.h" @@ -30,6 +30,10 @@ #include "wx/tooltip.h" #endif +#if wxUSE_CARET + #include "wx/caret.h" +#endif // wxUSE_CARET + #include "wx/menu.h" #include "wx/statusbr.h" #include "wx/intl.h" @@ -193,13 +197,13 @@ extern bool g_blockEventsOnScroll; extern wxCursor g_globalCursor; static wxWindow *g_captureWindow = (wxWindow*) NULL; -/* extern */ wxWindow *g_focusWindow = (wxWindow*) NULL; +wxWindow *g_focusWindow = (wxWindow*) NULL; // if we detect that the app has got/lost the focus, we set this variable to // either TRUE or FALSE and an activate event will be sent during the next // OnIdle() call and it is reset to -1: this value means that we shouldn't // send any activate events at all -static int g_sendActivateEvent = -1; +int g_sendActivateEvent = -1; /* hack: we need something to pass to gtk_menu_popup, so we store the time of the last click here */ @@ -298,6 +302,28 @@ extern bool g_isIdle; // local code (see below) //----------------------------------------------------------------------------- +// returns the child of win which currently has focus or NULL if not found +static wxWindow *FindFocusedChild(wxWindow *win) +{ + wxWindow *winFocus = wxWindow::FindFocus(); + if ( !winFocus ) + return (wxWindow *)NULL; + + if ( winFocus == win ) + return win; + + for ( wxWindowList::Node *node = win->GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindow *child = FindFocusedChild(node->GetData()); + if ( child ) + return child; + } + + return (wxWindow *)NULL; +} + static void draw_frame( GtkWidget *widget, wxWindow *win ) { if (!win->m_hasVMT) @@ -387,9 +413,9 @@ static void draw_frame( GtkWidget *widget, wxWindow *win ) gint gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxWindow *win ) { if (gdk_event->count > 0) return FALSE; - + draw_frame( widget, win ); - + return TRUE; } @@ -406,8 +432,9 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU // key code mapping routines //----------------------------------------------------------------------------- -static long map_to_unmodified_wx_keysym( KeySym keysym ) +static long map_to_unmodified_wx_keysym( GdkEventKey *event ) { + KeySym keysym = event->keyval; guint key_code = 0; switch (keysym) @@ -503,7 +530,11 @@ static long map_to_unmodified_wx_keysym( KeySym keysym ) case GDK_F12: key_code = WXK_F12; break; default: { - if ((keysym & 0xF000) == 0) + if (event->length == 1) + { + key_code = toupper( (unsigned char)*event->string ); + } + else if ((keysym & 0xFF) == keysym) { guint upper = gdk_keyval_to_upper( (guint)keysym ); keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */ @@ -515,8 +546,9 @@ static long map_to_unmodified_wx_keysym( KeySym keysym ) return (key_code); } -static long map_to_wx_keysym( KeySym keysym ) +static long map_to_wx_keysym( GdkEventKey *event ) { + KeySym keysym = event->keyval; guint key_code = 0; switch (keysym) @@ -602,7 +634,11 @@ static long map_to_wx_keysym( KeySym keysym ) case GDK_F12: key_code = WXK_F12; break; default: { - if ((keysym & 0xF000) == 0) + if (event->length == 1) + { + key_code = (unsigned char)*event->string; + } + else if ((keysym & 0xFF) == keysym) { key_code = (guint)keysym; } @@ -622,7 +658,7 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev if (g_isIdle) wxapp_install_idle_handler(); - + /* if (win->GetName() == wxT("panel")) { @@ -635,35 +671,69 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev (int)gdk_event->area.height ); } */ - - if (!win->m_queuedFullRedraw) + + GtkPizza *pizza = GTK_PIZZA (widget); + + wxWindow *parent = win; + if (win->IsTopLevel()) { - - win->GetUpdateRegion().Union( gdk_event->area.x, - gdk_event->area.y, - gdk_event->area.width, - gdk_event->area.height ); - - if (gdk_event->count == 0) + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); + } + else + { + parent = win->GetParent(); + if (parent) { - wxEraseEvent eevent( win->GetId() ); - eevent.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent(eevent); - - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - - win->GetUpdateRegion().Clear(); + if (parent->m_isFrame) + { + wxFrame *frame = (wxFrame*) parent; + if (frame->GetStatusBar() == win) + { + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); + } + } + else + if (GTK_IS_NOTEBOOK(parent->m_widget)) + { + while (parent && !parent->IsTopLevel()) + parent = parent->GetParent(); + + if (!parent) parent = win; + + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); + } } + } + + win->GetUpdateRegion().Union( gdk_event->area.x, + gdk_event->area.y, + gdk_event->area.width, + gdk_event->area.height ); + + if (gdk_event->count == 0) + { + win->m_clipPaintRegion = TRUE; + wxEraseEvent eevent( win->GetId() ); + eevent.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent(eevent); + + wxPaintEvent event( win->GetId() ); + event.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event ); + + win->GetUpdateRegion().Clear(); + win->m_clipPaintRegion = FALSE; + } + /* The following code will result in all window-less widgets being redrawn if the wxWindows class is given a chance to paint *anything* because it will then be allowed to paint over the window-less widgets */ - - GtkPizza *pizza = GTK_PIZZA (widget); - + GList *children = pizza->children; while (children) { @@ -683,8 +753,7 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev gtk_widget_event (child->widget, (GdkEvent*) &child_event); } } - } - + return TRUE; } @@ -722,7 +791,7 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW if (g_isIdle) wxapp_install_idle_handler(); - + /* if (win->GetName() == wxT("panel")) { @@ -735,47 +804,49 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW (int)rect->height ); } */ - - GtkPizza *pizza = GTK_PIZZA (widget); - - if (!win->m_queuedFullRedraw) + + if ((win->HasFlag(wxNO_FULL_REPAINT_ON_RESIZE)) && + (win->GetChildren().GetCount() == 0)) { - - if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && - (pizza->clear_on_draw)) - { - gdk_window_clear_area( pizza->bin_window, + return; + } + + + GtkPizza *pizza = GTK_PIZZA (widget); + + if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && + (pizza->clear_on_draw)) + { + gdk_window_clear_area( pizza->bin_window, rect->x, rect->y, rect->width, rect->height); - } - - win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); + } - win->m_clipPaintRegion = TRUE; - - wxEraseEvent eevent( win->GetId() ); - eevent.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent(eevent); + win->GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height ); - wxPaintEvent event( win->GetId() ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); + win->m_clipPaintRegion = TRUE; - win->GetUpdateRegion().Clear(); - - win->m_clipPaintRegion = FALSE; - - - GList *children = pizza->children; - while (children) + wxEraseEvent eevent( win->GetId() ); + eevent.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent(eevent); + + wxPaintEvent event( win->GetId() ); + event.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event ); + + win->GetUpdateRegion().Clear(); + + win->m_clipPaintRegion = FALSE; + + GList *children = pizza->children; + while (children) + { + GtkPizzaChild *child = (GtkPizzaChild*) children->data; + children = children->next; + + GdkRectangle child_area; + if (gtk_widget_intersect (child->widget, rect, &child_area)) { - GtkPizzaChild *child = (GtkPizzaChild*) children->data; - children = children->next; - - GdkRectangle child_area; - if (gtk_widget_intersect (child->widget, rect, &child_area)) - { - gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); - } + gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); } } } @@ -809,7 +880,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e bool ret = FALSE; - long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval ); + long key_code = map_to_unmodified_wx_keysym( gdk_event ); /* sending unknown key events doesn't really make sense */ if (key_code == 0) return FALSE; @@ -839,7 +910,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e ret = ancestor->GetEventHandler()->ProcessEvent( command_event ); break; } - if (ancestor->m_isFrame) + if (ancestor->IsTopLevel()) break; ancestor = ancestor->GetParent(); } @@ -849,7 +920,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e /* wxMSW doesn't send char events with Alt pressed */ /* Only send wxEVT_CHAR event if not processed yet. Thus, ALT-x will only be sent if it is not in an accelerator table. */ - key_code = map_to_wx_keysym( gdk_event->keyval ); + key_code = map_to_wx_keysym( gdk_event ); if ( (!ret) && (key_code != 0)) @@ -871,7 +942,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e /* win is a control: tab can be propagated up */ if ( (!ret) && ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) && +// VZ: testing for wxTE_PROCESS_TAB shouldn't be done here the control may +// have this style, yet choose not to process this particular TAB in which +// case TAB must still work as a navigational character +#if 0 (!win->HasFlag(wxTE_PROCESS_TAB)) && +#endif // 0 (win->GetParent()) && (win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) ) { @@ -962,7 +1038,7 @@ static gint gtk_window_key_release_callback( GtkWidget *widget, GdkEventKey *gdk printf( "\n" ); */ - long key_code = map_to_unmodified_wx_keysym( gdk_event->keyval ); + long key_code = map_to_unmodified_wx_keysym( gdk_event ); /* sending unknown key events doesn't really make sense */ if (key_code == 0) return FALSE; @@ -1467,7 +1543,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED( case 0: // another our window just lost focus, it was already ours before - // - don't send any wxActivateEvent + // - don't send any wxActivateAppEvent g_sendActivateEvent = -1; break; } @@ -1494,13 +1570,32 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED( gdk_im_begin(win->m_ic, win->m_wxwindow->window); #endif +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnSetFocus(); + } +#endif // wxUSE_CARET + + + if (win->IsTopLevel()) + { + wxActivateEvent event( wxEVT_ACTIVATE, TRUE, win->GetId() ); + event.SetEventObject( win ); + + // ignore return value + win->GetEventHandler()->ProcessEvent( event ); + } + wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() ); event.SetEventObject( win ); if (win->GetEventHandler()->ProcessEvent( event )) { - gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); - return TRUE; + gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" ); + return TRUE; } return FALSE; @@ -1525,6 +1620,10 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED // g_sendActivateEvent to -1 g_sendActivateEvent = 0; + wxWindow *winFocus = FindFocusedChild(win); + if ( winFocus ) + win = winFocus; + g_focusWindow = (wxWindow *)NULL; /* @@ -1539,6 +1638,24 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED gdk_im_end(); #endif +#ifdef wxUSE_CARET + // caret needs to be informed about focus change + wxCaret *caret = win->GetCaret(); + if ( caret ) + { + caret->OnKillFocus(); + } +#endif // wxUSE_CARET + + if (win->IsTopLevel()) + { + wxActivateEvent event( wxEVT_ACTIVATE, FALSE, win->GetId() ); + event.SetEventObject( win ); + + // ignore return value + win->GetEventHandler()->ProcessEvent( event ); + } + wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() ); event.SetEventObject( win ); @@ -1817,7 +1934,7 @@ gtk_window_realized_callback( GtkWidget *WXUNUSED(m_widget), wxWindow *win ) wxWindowCreateEvent event( win ); event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( event ); - + return FALSE; } @@ -1914,22 +2031,22 @@ gtk_wxwindow_realized_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), GdkIMStyle style; GdkIMStyle supported_style = (GdkIMStyle) (GDK_IM_PREEDIT_NONE | - GDK_IM_PREEDIT_NOTHING | - GDK_IM_PREEDIT_POSITION | - GDK_IM_STATUS_NONE | - GDK_IM_STATUS_NOTHING); + GDK_IM_PREEDIT_NOTHING | + GDK_IM_PREEDIT_POSITION | + GDK_IM_STATUS_NONE | + GDK_IM_STATUS_NOTHING); if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) - supported_style = (GdkIMStyle)(supported_style & ~GDK_IM_PREEDIT_POSITION); + supported_style = (GdkIMStyle)(supported_style & ~GDK_IM_PREEDIT_POSITION); attr->style = style = gdk_im_decide_style (supported_style); attr->client_window = widget->window; if ((colormap = gtk_widget_get_colormap (widget)) != - gtk_widget_get_default_colormap ()) + gtk_widget_get_default_colormap ()) { - attrmask |= GDK_IC_PREEDIT_COLORMAP; - attr->preedit_colormap = colormap; + attrmask |= GDK_IC_PREEDIT_COLORMAP; + attr->preedit_colormap = colormap; } attrmask |= GDK_IC_PREEDIT_FOREGROUND; @@ -1939,40 +2056,40 @@ gtk_wxwindow_realized_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), switch (style & GDK_IM_PREEDIT_MASK) { - case GDK_IM_PREEDIT_POSITION: - if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) - { - g_warning ("over-the-spot style requires fontset"); - break; - } + case GDK_IM_PREEDIT_POSITION: + if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) + { + g_warning ("over-the-spot style requires fontset"); + break; + } - gdk_window_get_size (widget->window, &width, &height); + gdk_window_get_size (widget->window, &width, &height); - attrmask |= GDK_IC_PREEDIT_POSITION_REQ; - attr->spot_location.x = 0; - attr->spot_location.y = height; - attr->preedit_area.x = 0; - attr->preedit_area.y = 0; - attr->preedit_area.width = width; - attr->preedit_area.height = height; - attr->preedit_fontset = widget->style->font; + attrmask |= GDK_IC_PREEDIT_POSITION_REQ; + attr->spot_location.x = 0; + attr->spot_location.y = height; + attr->preedit_area.x = 0; + attr->preedit_area.y = 0; + attr->preedit_area.width = width; + attr->preedit_area.height = height; + attr->preedit_fontset = widget->style->font; - break; + break; } win->m_ic = gdk_ic_new (attr, (GdkICAttributesType)attrmask); if (win->m_ic == NULL) - g_warning ("Can't create input context."); + g_warning ("Can't create input context."); else - { - mask = gdk_window_get_events (widget->window); - mask = (GdkEventMask)(mask | gdk_ic_get_events (win->m_ic)); - gdk_window_set_events (widget->window, mask); + { + mask = gdk_window_get_events (widget->window); + mask = (GdkEventMask)(mask | gdk_ic_get_events (win->m_ic)); + gdk_window_set_events (widget->window, mask); - if (GTK_WIDGET_HAS_FOCUS(widget)) - gdk_im_begin (win->m_ic, widget->window); - } + if (GTK_WIDGET_HAS_FOCUS(widget)) + gdk_im_begin (win->m_ic, widget->window); + } #endif return FALSE; @@ -2062,10 +2179,12 @@ void wxWindow::Init() m_acceptsFocus = FALSE; m_clipPaintRegion = FALSE; - m_queuedFullRedraw = FALSE; m_cursor = *wxSTANDARD_CURSOR; + m_delayedForegroundColour = FALSE; + m_delayedBackgroundColour = FALSE; + #ifdef HAVE_XIM m_ic = (GdkIC*) NULL; m_icattr = (GdkICAttr*) NULL; @@ -2098,7 +2217,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, } m_insertCallback = wxInsertChildInWindow; - + m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); @@ -2216,6 +2335,9 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, wxWindow::~wxWindow() { + if (g_focusWindow == this) + g_focusWindow = NULL; + m_isBeingDeleted = TRUE; m_hasVMT = FALSE; @@ -2240,7 +2362,7 @@ wxWindow::~wxWindow() // don't delete if it's a pixmap theme style if (!m_widgetStyle->engine_data) gtk_style_unref( m_widgetStyle ); -#endif +#endif m_widgetStyle = (GtkStyle*) NULL; } @@ -2298,17 +2420,20 @@ void wxWindow::PostCreation() if (!m_noExpose) { /* these get reported to wxWindows -> wxPaintEvent */ - - gtk_pizza_set_external( GTK_PIZZA(m_wxwindow), TRUE ); - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "event", - GTK_SIGNAL_FUNC(gtk_window_event_event_callback), (gpointer)this ); + gtk_pizza_set_external( GTK_PIZZA(m_wxwindow), TRUE ); gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event", GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw", GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); + + if (HasFlag(wxNO_FULL_REPAINT_ON_RESIZE)) + { + gtk_signal_connect( GTK_OBJECT(m_wxwindow), "event", + GTK_SIGNAL_FUNC(gtk_window_event_event_callback), (gpointer)this ); + } } #if (GTK_MINOR_VERSION > 0) @@ -2332,7 +2457,7 @@ void wxWindow::PostCreation() else { // For dialogs and frames, we are interested mainly in - // m_widget's focus. + // m_widget's focus. gtk_signal_connect( GTK_OBJECT(m_widget), "focus_in_event", GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this ); @@ -2403,24 +2528,6 @@ bool wxWindow::Destroy() void wxWindow::DoMoveWindow(int x, int y, int width, int height) { - if (m_wxwindow && GTK_PIZZA(m_wxwindow)->bin_window) - { - /* Normally, GTK will send expose events only for the regions - which actually got exposed. Sadly, wxMSW invalidates - the whole window so we have to do that, too. We could - simply add a complete refresh, but we would then get - the normal GTK expose events in surplus, so we shut - off the expose events and schedule a full redraw to - be done in OnInternalIdle, where we restore the handling - of expose events. */ - - m_queuedFullRedraw = TRUE; - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask & ~GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), m_widget, x, y, width, height ); } @@ -2431,7 +2538,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) if (m_resizing) return; /* I don't like recursions */ m_resizing = TRUE; - + if (m_parent->m_wxwindow == NULL) /* i.e. wxNotebook */ { /* don't set the size for children of wxNotebook, just take the values. */ @@ -2492,7 +2599,7 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags ) if (m_hasScrolling) { - /* Sometimes the client area changes size without the + /* Sometimes the client area changes size without the whole windows's size changing, but if the whole windows's size doesn't change, no wxSizeEvent will normally be sent. Here we add an extra test if @@ -2527,7 +2634,7 @@ void wxWindow::OnInternalIdle() // do it only once g_sendActivateEvent = -1; - wxActivateEvent event(wxEVT_ACTIVATE, activate, GetId()); + wxActivateEvent event(wxEVT_ACTIVATE_APP, activate, GetId()); event.SetEventObject(this); (void)GetEventHandler()->ProcessEvent(event); @@ -2568,33 +2675,6 @@ void wxWindow::OnInternalIdle() } UpdateWindowUI(); - - if (m_queuedFullRedraw) - { - /* See also wxWindow::DoMoveWindow for explanation of this code. What - we test here is if the requested size of the window is the same as - the actual size of window, in which case all expose events that resulted - from resizing the window have been sent (and discarded) and we can - now do our full redraw and switch on expose event handling again. */ - - bool child_already_resized = FALSE; - if (m_isFrame) - child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow ); - else - child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget ); - - if (child_already_resized) - { - m_queuedFullRedraw = FALSE; - m_updateRegion.Clear(); - m_updateRegion.Union( 0,0,m_width,m_height ); - gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL ); - - GdkEventMask mask = gdk_window_get_events( GTK_PIZZA(m_wxwindow)->bin_window ); - mask = (GdkEventMask)(mask | GDK_EXPOSURE_MASK); - gdk_window_set_events( GTK_PIZZA(m_wxwindow)->bin_window, mask ); - } - } } void wxWindow::DoGetSize( int *width, int *height ) const @@ -2986,7 +3066,16 @@ bool wxWindow::SetCursor( const wxCursor &cursor ) { wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") ); - return wxWindowBase::SetCursor( cursor ); + if (cursor == m_cursor) + return FALSE; + + if (g_isIdle) + wxapp_install_idle_handler(); + + if (cursor == wxNullCursor) + return wxWindowBase::SetCursor( *wxSTANDARD_CURSOR ); + else + return wxWindowBase::SetCursor( cursor ); } void wxWindow::WarpPointer( int x, int y ) @@ -3253,6 +3342,21 @@ void wxWindow::SetWidgetStyle() style->fg[GTK_STATE_PRELIGHT] = *m_foregroundColour.GetColor(); style->fg[GTK_STATE_ACTIVE] = *m_foregroundColour.GetColor(); } + else + { + // Try to restore the gtk default style. This is still a little + // oversimplified for what is probably really needed here for controls + // other than buttons, but is better than not being able to (re)set a + // control's foreground colour to *wxBLACK -- RL + GtkStyle *def = gtk_rc_get_style( m_widget ); + + if (!def) + def = gtk_widget_get_default_style(); + + style->fg[GTK_STATE_NORMAL] = def->fg[GTK_STATE_NORMAL]; + style->fg[GTK_STATE_PRELIGHT] = def->fg[GTK_STATE_PRELIGHT]; + style->fg[GTK_STATE_ACTIVE] = def->fg[GTK_STATE_ACTIVE]; + } } if (m_backgroundColour.Ok()) @@ -3268,7 +3372,29 @@ void wxWindow::SetWidgetStyle() style->base[GTK_STATE_ACTIVE] = *m_backgroundColour.GetColor(); style->bg[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor(); style->base[GTK_STATE_INSENSITIVE] = *m_backgroundColour.GetColor(); - } + } + else + { + // Try to restore the gtk default style. This is still a little + // oversimplified for what is probably really needed here for controls + // other than buttons, but is better than not being able to (re)set a + // control's background colour to default grey and means resetting a + // button to wxSYS_COLOUR_BTNFACE will restore its usual highlighting + // behavior -- RL + GtkStyle *def = gtk_rc_get_style( m_widget ); + + if (!def) + def = gtk_widget_get_default_style(); + + style->bg[GTK_STATE_NORMAL] = def->bg[GTK_STATE_NORMAL]; + style->base[GTK_STATE_NORMAL] = def->base[GTK_STATE_NORMAL]; + style->bg[GTK_STATE_PRELIGHT] = def->bg[GTK_STATE_PRELIGHT]; + style->base[GTK_STATE_PRELIGHT] = def->base[GTK_STATE_PRELIGHT]; + style->bg[GTK_STATE_ACTIVE] = def->bg[GTK_STATE_ACTIVE]; + style->base[GTK_STATE_ACTIVE] = def->base[GTK_STATE_ACTIVE]; + style->bg[GTK_STATE_INSENSITIVE] = def->bg[GTK_STATE_INSENSITIVE]; + style->base[GTK_STATE_INSENSITIVE] = def->base[GTK_STATE_INSENSITIVE]; + } } } @@ -3619,14 +3745,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") ); - + if ((dx == 0) && (dy == 0)) return; m_clipPaintRegion = TRUE; gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy ); m_clipPaintRegion = FALSE; - -/* + +/* if (m_children.GetCount() > 0) { gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy ); @@ -3634,10 +3760,10 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) else { GtkPizza *pizza = GTK_PIZZA(m_wxwindow); - + pizza->xoffset -= dx; pizza->yoffset -= dy; - + GdkGC *m_scrollGC = gdk_gc_new( pizza->bin_window ); gdk_gc_set_exposures( m_scrollGC, TRUE ); @@ -3650,7 +3776,7 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) if ((h < 0) || (w < 0)) { Refresh(); - } + } else { int s_x = 0; @@ -3673,7 +3799,7 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) Refresh( TRUE, &rect ); } - + gdk_gc_unref( m_scrollGC ); } */ diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index af0ba923d8..c8287af50e 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -22,7 +22,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #include "wx/html/helpctrl.h" #include "wx/wx.h" @@ -30,12 +30,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxHelpControllerBase) -#if 0 -BEGIN_EVENT_TABLE(wxHtmlHelpController, wxEvtHandler) -EVT_CLOSE(wxHtmlHelpController::OnCloseFrame) -END_EVENT_TABLE() -#endif - wxHtmlHelpController::wxHtmlHelpController(int style) { m_helpFrame = NULL; @@ -47,7 +41,8 @@ wxHtmlHelpController::wxHtmlHelpController(int style) wxHtmlHelpController::~wxHtmlHelpController() { - WriteCustomization(m_Config, m_ConfigRoot); + if (m_Config) + WriteCustomization(m_Config, m_ConfigRoot); if (m_helpFrame) DestroyHelpWindow(); } @@ -121,7 +116,6 @@ void wxHtmlHelpController::CreateHelpWindow() m_helpFrame = CreateHelpFrame(&m_helpData); m_helpFrame->SetController(this); -// m_helpFrame->PushEventHandler(this); if (m_Config) m_helpFrame->UseConfig(m_Config, m_ConfigRoot); @@ -135,14 +129,14 @@ void wxHtmlHelpController::ReadCustomization(wxConfigBase* cfg, const wxString& { /* should not be called by the user; call UseConfig, and the controller * will do the rest */ - if (m_helpFrame) + if (m_helpFrame && cfg) m_helpFrame->ReadCustomization(cfg, path); } void wxHtmlHelpController::WriteCustomization(wxConfigBase* cfg, const wxString& path) { /* typically called by the controllers OnCloseFrame handler */ - if (m_helpFrame) + if (m_helpFrame && cfg) m_helpFrame->WriteCustomization(cfg, path); } diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index cb5eb0e862..4236e4b52c 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -22,7 +22,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifndef WXPRECOMP #include "wx/wx.h" @@ -148,7 +148,122 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag) return TRUE; } else { // "PARAM" - if (m_Name == wxEmptyString && tag.GetParam(wxT("NAME")) == wxT("Name")) m_Name = tag.GetParam(wxT("VALUE")); + if (m_Name == wxEmptyString && tag.GetParam(wxT("NAME")) == wxT("Name")) + { + m_Name = tag.GetParam(wxT("VALUE")); + if (m_Name.Find(wxT('&')) != -1) + { + #define ESCSEQ(escape, subst) \ + { _T("&") _T(escape) _T(";"), _T("&") _T(escape) _T(" "), _T(subst) } + static wxChar* substitutions[][3] = + { + ESCSEQ("quot", "\""), + ESCSEQ("lt", "<"), + ESCSEQ("gt", ">"), + + ESCSEQ("nbsp", " "), + ESCSEQ("iexcl", "!"), + ESCSEQ("cent", "\242"/* ¢ */), + + ESCSEQ("yen", " "), + ESCSEQ("brkbar", " "), + ESCSEQ("sect", " "), + ESCSEQ("uml", " "), + + ESCSEQ("copy", "(c)"), + ESCSEQ("ordf", " "), + ESCSEQ("laquo", " "), + ESCSEQ("not", " "), + + ESCSEQ("reg", "(r)"), + + ESCSEQ("deg", " "), + ESCSEQ("plusm", " "), + + ESCSEQ("acute", " "), + ESCSEQ("micro", " "), + ESCSEQ("para", " "), + + ESCSEQ("ordm", " "), + ESCSEQ("raquo", " "), + + ESCSEQ("iquest", " "), + ESCSEQ("Agrave", "\300"/* À */), + + ESCSEQ("Acirc", "\302"/* Â */), + ESCSEQ("Atilde", "\303"/* Ã */), + ESCSEQ("Auml", "\304"/* Ä */), + ESCSEQ("Aring", " "), + ESCSEQ("AElig", " "), + ESCSEQ("Ccedil", "\347"/* ç */), + ESCSEQ("Egrave", "\310"/* È */), + ESCSEQ("Eacute", "\311"/* É */), + ESCSEQ("Ecirc", "\312"/* Ê */), + ESCSEQ("Euml", "\313"/* Ë */), + ESCSEQ("Igrave", "\314"/* Ì */), + + ESCSEQ("Icirc", "\316"/* Î */), + ESCSEQ("Iuml", "\317"/* Ï */), + + ESCSEQ("Ntilde", "\321"/* Ñ */), + ESCSEQ("Ograve", "\322"/* Ò */), + + ESCSEQ("Ocirc", "\324"/* Ô */), + ESCSEQ("Otilde", "\325"/* Õ */), + ESCSEQ("Ouml", "\326"/* Ö */), + + ESCSEQ("Oslash", " "), + ESCSEQ("Ugrave", "\331"/* Ù */), + + ESCSEQ("Ucirc", " "), + ESCSEQ("Uuml", "\334"/* Ü */), + + ESCSEQ("szlig", "\247"/* § */), + ESCSEQ("agrave","\340"), + ESCSEQ("aacute", "\341"/* á */), + ESCSEQ("acirc", "\342"/* â */), + ESCSEQ("atilde", "\343"/* ã */), + ESCSEQ("auml", "\344"/* ä */), + ESCSEQ("aring", "a"), + ESCSEQ("aelig", "ae"), + ESCSEQ("ccedil", "\347"/* ç */), + ESCSEQ("egrave", "\350"/* è */), + ESCSEQ("eacute", "\351"/* é */), + ESCSEQ("ecirc", "\352"/* ê */), + ESCSEQ("euml", "\353"/* ë */), + ESCSEQ("igrave", "\354"/* ì */), + ESCSEQ("iacute", "\355"/* í */), + ESCSEQ("icirc", " "), + ESCSEQ("iuml", "\357"/* ï */), + ESCSEQ("eth", " "), + ESCSEQ("ntilde", "\361"/* ñ */), + ESCSEQ("ograve", "\362"/* ò */), + ESCSEQ("oacute", "\363"/* ó */), + ESCSEQ("ocirc", "\364"/* ô */), + ESCSEQ("otilde", "\365"/* õ */), + ESCSEQ("ouml", "\366"/* ö */), + ESCSEQ("divide", " "), + ESCSEQ("oslash", " "), + ESCSEQ("ugrave", "\371"/* ù */), + ESCSEQ("uacute", "\372"/* ú */), + ESCSEQ("ucirc", "\373"/* û */), + ESCSEQ("uuml", "\374"/* ü */), + + ESCSEQ("yuml", ""), + + /* this one should ALWAYS stay the last one!!! */ + ESCSEQ("amp", "&"), + + { NULL, NULL, NULL } + }; + + for (int i = 0; substitutions[i][0] != NULL; i++) + { + m_Name.Replace(substitutions[i][0], substitutions[i][2], TRUE); + m_Name.Replace(substitutions[i][1], substitutions[i][2], TRUE); + } + } + } if (tag.GetParam(wxT("NAME")) == wxT("Local")) m_Page = tag.GetParam(wxT("VALUE")); if (tag.GetParam(wxT("NAME")) == wxT("ID")) tag.ScanParam(wxT("VALUE"), wxT("%i"), &m_ID); return FALSE; @@ -235,7 +350,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, c delete[] buf; } else - wxLogError(_("Cannot open contents file: %s"), contentsfile.mb_str()); + wxLogError(_("Cannot open contents file: %s"), contentsfile.c_str()); f = ( indexfile.IsEmpty() ? (wxFSFile*) NULL : fsys.OpenFile(indexfile) ); if (f) { @@ -250,7 +365,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, c delete[] buf; } else if (!indexfile.IsEmpty()) - wxLogError(_("Cannot open index file: %s"), indexfile.mb_str()); + wxLogError(_("Cannot open index file: %s"), indexfile.c_str()); return TRUE; } @@ -538,10 +653,10 @@ bool wxHtmlHelpData::AddBook(const wxString& book) fi = fsys.OpenFile(bookFull); if (fi == NULL) - { - wxLogError(_("Cannot open HTML help book: %s"), bookFull.mb_str()); - return FALSE; - } + { + wxLogError(_("Cannot open HTML help book: %s"), bookFull.c_str()); + return FALSE; + } fsys.ChangePathTo(bookFull); s = fi -> GetStream(); sz = s -> GetSize(); diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index b36d1c62e6..25052abfe8 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -23,7 +23,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifndef WXPRECOMP #include "wx/wx.h" #endif @@ -93,7 +93,7 @@ class wxHtmlHelpHashData : public wxObject wxHtmlHelpHashData(int index, wxTreeItemId id) : wxObject() { m_Index = index; m_Id = id;} ~wxHtmlHelpHashData() {} - + int m_Index; wxTreeItemId m_Id; }; @@ -114,7 +114,7 @@ class wxHtmlHelpHtmlWindow : public wxHtmlWindow m_Frame -> NotifyPageChanged(); } - private: + private: wxHtmlHelpFrame *m_Frame; }; @@ -178,7 +178,7 @@ void wxHtmlHelpFrame::Init(wxHtmlHelpData* data) m_NormalFonts = m_FixedFonts = NULL; m_NormalFace = m_FixedFace = wxEmptyString; m_FontSize = 1; - + #if wxUSE_PRINTING_ARCHITECTURE m_Printer = NULL; #endif @@ -216,8 +216,10 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti CreateStatusBar(); // toolbar? - if (style & wxHF_TOOLBAR) { - wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_DOCKABLE); + if (style & (wxHF_TOOLBAR | wxHF_FLATTOOLBAR)) { + wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | + wxTB_DOCKABLE | + (style & wxHF_FLATTOOLBAR ? wxTB_FLAT : 0)); toolBar->SetMargins( 2, 2 ); AddToolbarButtons(toolBar, style); toolBar -> Realize(); @@ -433,7 +435,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti m_SearchPage = notebook_page++; } m_HtmlWin -> Show(TRUE); - + RefreshLists(); // showtime @@ -471,46 +473,64 @@ wxHtmlHelpFrame::~wxHtmlHelpFrame() void wxHtmlHelpFrame::AddToolbarButtons(wxToolBar *toolBar, int style) { - toolBar -> AddTool(wxID_HTML_PANEL, wxBITMAP(wpanel), wxNullBitmap, + wxBitmap wpanelBitmap = wxBITMAP(wpanel); + wxBitmap wbackBitmap = wxBITMAP(wback); + wxBitmap wforwardBitmap = wxBITMAP(wforward); + wxBitmap wupnodeBitmap = wxBITMAP(wupnode); + wxBitmap wupBitmap = wxBITMAP(wup); + wxBitmap wdownBitmap = wxBITMAP(wdown); + wxBitmap wopenBitmap = wxBITMAP(wopen); + wxBitmap wprintBitmap = wxBITMAP(wprint); + wxBitmap woptionsBitmap = wxBITMAP(woptions); + + wxASSERT_MSG( (wpanelBitmap.Ok() && wbackBitmap.Ok() && + wforwardBitmap.Ok() && wupnodeBitmap.Ok() && + wupBitmap.Ok() && wdownBitmap.Ok() && + wopenBitmap.Ok() && wprintBitmap.Ok() && + woptionsBitmap.Ok()), + wxT("One or more HTML help frame toolbar bitmap could not be loaded.")) ; + + + toolBar -> AddTool(wxID_HTML_PANEL, wpanelBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Show/hide navigation panel")); toolBar -> AddSeparator(); - toolBar -> AddTool(wxID_HTML_BACK, wxBITMAP(wback), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_BACK, wbackBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Go back")); - toolBar -> AddTool(wxID_HTML_FORWARD, wxBITMAP(wforward), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_FORWARD, wforwardBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Go forward")); toolBar -> AddSeparator(); - toolBar -> AddTool(wxID_HTML_UPNODE, wxBITMAP(wupnode), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_UPNODE, wupnodeBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Go one level up in document hierarchy")); - toolBar -> AddTool(wxID_HTML_UP, wxBITMAP(wup), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_UP, wupBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Previous page")); - toolBar -> AddTool(wxID_HTML_DOWN, wxBITMAP(wdown), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_DOWN, wdownBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Next page")); if ((style & wxHF_PRINT) || (style & wxHF_OPENFILES)) toolBar -> AddSeparator(); - + if (style & wxHF_OPENFILES) - toolBar -> AddTool(wxID_HTML_OPENFILE, wxBITMAP(wopen), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_OPENFILE, wopenBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Open HTML document")); #if wxUSE_PRINTING_ARCHITECTURE if (style & wxHF_PRINT) - toolBar -> AddTool(wxID_HTML_PRINT, wxBITMAP(wprint), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_PRINT, wprintBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Print this page")); #endif toolBar -> AddSeparator(); - toolBar -> AddTool(wxID_HTML_OPTIONS, wxBITMAP(woptions), wxNullBitmap, + toolBar -> AddTool(wxID_HTML_OPTIONS, woptionsBitmap, wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, _("Display options dialog")); } @@ -601,8 +621,8 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword) if (m_SearchChoice->GetSelection() != 0) book = m_SearchChoice->GetStringSelection(); - wxHtmlSearchStatus status(m_Data, keyword, - m_SearchCaseSensitive -> GetValue(), m_SearchWholeWords -> GetValue(), + wxHtmlSearchStatus status(m_Data, keyword, + m_SearchCaseSensitive -> GetValue(), m_SearchWholeWords -> GetValue(), book); wxProgressDialog progress(_("Searching..."), _("No matching page found yet"), @@ -625,7 +645,7 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword) m_SearchText -> SetFocus(); if (foundcnt) { wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_SearchList -> GetClientData(0); - if (it) + if (it) { m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page); NotifyPageChanged(); @@ -642,7 +662,7 @@ void wxHtmlHelpFrame::CreateContents() return ; m_ContentsBox->Clear(); - + if (m_PagesHash) delete m_PagesHash; m_PagesHash = new wxHashTable(wxKEY_STRING, 2 * m_Data -> GetContentsCnt()); m_PagesHash -> DeleteContents(TRUE); @@ -665,7 +685,7 @@ void wxHtmlHelpFrame::CreateContents() roots[it -> m_Level + 1] = m_ContentsBox -> AppendItem( roots[it -> m_Level], it -> m_Name, IMG_Page, -1, new wxHtmlHelpTreeItemData(i)); - m_PagesHash -> Put(it -> m_Book -> GetBasePath() + it -> m_Page, + m_PagesHash -> Put(it -> m_Book -> GetBasePath() + it -> m_Page, new wxHtmlHelpHashData(i, roots[it -> m_Level + 1])); if (it -> m_Level == 0) { @@ -693,16 +713,16 @@ void wxHtmlHelpFrame::CreateIndex() m_IndexList->Clear(); int cnt = m_Data->GetIndexCnt(); - + wxString cnttext; if (cnt > INDEX_IS_SMALL) cnttext.Printf(_("%i of %i"), 0, cnt); else cnttext.Printf(_("%i of %i"), cnt, cnt); m_IndexCountInfo -> SetLabel(cnttext); if (cnt > INDEX_IS_SMALL) return; - + wxHtmlContentsItem* index = m_Data->GetIndex(); - for (int i = 0; i < cnt; i++) + for (int i = 0; i < cnt; i++) m_IndexList -> Append(index[i].m_Name, (char*)(index + i)); } @@ -753,7 +773,7 @@ void wxHtmlHelpFrame::ReadCustomization(wxConfigBase *cfg, const wxString& path) int i; int cnt; wxString val, s; - + cnt = cfg -> Read(wxT("hcBookmarksCnt"), 0L); if (cnt != 0) { m_BookmarksNames.Clear(); @@ -762,7 +782,7 @@ void wxHtmlHelpFrame::ReadCustomization(wxConfigBase *cfg, const wxString& path) m_Bookmarks -> Clear(); m_Bookmarks -> Append(_("(bookmarks)")); } - + for (i = 0; i < cnt; i++) { val.Printf(wxT("hcBookmark_%i"), i); s = cfg -> Read(val); @@ -801,12 +821,12 @@ void wxHtmlHelpFrame::WriteCustomization(wxConfigBase *cfg, const wxString& path cfg -> Write(wxT("hcFixedFace"), m_FixedFace); cfg -> Write(wxT("hcNormalFace"), m_NormalFace); cfg -> Write(wxT("hcFontSize"), (long)m_FontSize); - + if (m_Bookmarks) { int i; int cnt = m_BookmarksNames.GetCount(); wxString val; - + cfg -> Write(wxT("hcBookmarksCnt"), (long)cnt); for (i = 0; i < cnt; i++) { val.Printf(wxT("hcBookmark_%i"), i); @@ -829,7 +849,7 @@ void wxHtmlHelpFrame::WriteCustomization(wxConfigBase *cfg, const wxString& path static void SetFontsToHtmlWin(wxHtmlWindow *win, wxString scalf, wxString fixf, int size) { - static int f_sizes[5][7] = + static int f_sizes[5][7] = { { 6, 7, 9, 12, 14, 16, 19}, { 8, 9, 12, 14, 16, 19, 22}, @@ -859,30 +879,30 @@ class wxHtmlHelpFrameOptionsDialog : public wxDialog sizer = new wxBoxSizer(wxHORIZONTAL); sizer2 = new wxStaticBoxSizer( new wxStaticBox(this, -1, _("Normal font:")), wxVERTICAL); - sizer2 -> Add(NormalFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition, - wxSize(200, 200), + sizer2 -> Add(NormalFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition, + wxSize(200, 200), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY), 1, wxEXPAND | wxLEFT | wxRIGHT, 10); sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10); sizer2 = new wxStaticBoxSizer( new wxStaticBox(this, -1, _("Fixed font:")), wxVERTICAL); - sizer2 -> Add(FixedFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition, - wxSize(200, 200), - 0, NULL, wxCB_DROPDOWN | wxCB_READONLY), + sizer2 -> Add(FixedFont = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition, + wxSize(200, 200), + 0, NULL, wxCB_DROPDOWN | wxCB_READONLY), 1, wxEXPAND | wxLEFT | wxRIGHT, 10); sizer -> Add(sizer2, 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10); topsizer -> Add(sizer); - topsizer -> Add(RadioBox = new wxRadioBox(this, -1, _("Font size:"), - wxDefaultPosition, wxDefaultSize, 5, choices, 5), + topsizer -> Add(RadioBox = new wxRadioBox(this, -1, _("Font size:"), + wxDefaultPosition, wxDefaultSize, 5, choices, 5), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10); - - topsizer -> Add(new wxStaticText(this, -1, _("Preview:")), + + topsizer -> Add(new wxStaticText(this, -1, _("Preview:")), 0, wxLEFT | wxTOP, 10); - topsizer -> Add(TestWin = new wxHtmlWindow(this, -1, wxDefaultPosition, wxSize(-1, 150)), + topsizer -> Add(TestWin = new wxHtmlWindow(this, -1, wxDefaultPosition, wxSize(-1, 150)), 1, wxEXPAND | wxLEFT|wxTOP|wxRIGHT, 10); sizer = new wxBoxSizer(wxHORIZONTAL); @@ -895,36 +915,38 @@ class wxHtmlHelpFrameOptionsDialog : public wxDialog topsizer -> Fit(this); Centre(wxBOTH); } - + void UpdateTestWin() { wxBusyCursor bcur; - SetFontsToHtmlWin(TestWin, + SetFontsToHtmlWin(TestWin, NormalFont -> GetStringSelection(), FixedFont -> GetStringSelection(), RadioBox -> GetSelection()); - TestWin -> SetPage(_("" - "Normal face
    (and underlined. Italic face. " - "Bold face. Bold italic face.
    " - "font size -2
    " - "font size -1
    " - "font size +0
    " - "font size +1
    " - "font size +2
    " - "font size +3
    " - "font size +4
    " - - "

    Fixed size face.
    bold italic " - "bold italic underlined
    " - "font size -2
    " - "font size -1
    " - "font size +0
    " - "font size +1
    " - "font size +2
    " - "font size +3
    " - "font size +4
    " - "")); + TestWin -> SetPage(_( +"\ +Normal face
    (and underlined. Italic face. \ +Bold face. Bold italic face.
    \ +font size -2
    \ +font size -1
    \ +font size +0
    \ +font size +1
    \ +font size +2
    \ +font size +3
    \ +font size +4
    \ +\ +

    Fixed size face.
    bold italic \ +bold italic underlined
    \ +font size -2
    \ +font size -1
    \ +font size +0
    \ +font size +1
    \ +font size +2
    \ +font size +3
    \ +font size +4
    \ +" + )); } void OnUpdate(wxCommandEvent& event) @@ -945,7 +967,7 @@ void wxHtmlHelpFrame::OptionsDialog() { wxHtmlHelpFrameOptionsDialog dlg(this); unsigned i; - + if (m_NormalFonts == NULL) { wxFontEnumerator enu; enu.EnumerateFacenames(); @@ -960,7 +982,7 @@ void wxHtmlHelpFrame::OptionsDialog() *m_FixedFonts = *enu.GetFacenames(); m_FixedFonts -> Sort(); } - + for (i = 0; i < m_NormalFonts -> GetCount(); i++) dlg.NormalFont -> Append((*m_NormalFonts)[i]); for (i = 0; i < m_FixedFonts -> GetCount(); i++) @@ -971,7 +993,7 @@ void wxHtmlHelpFrame::OptionsDialog() else dlg.FixedFont -> SetSelection(0); dlg.RadioBox -> SetSelection(m_FontSize); dlg.UpdateTestWin(); - + if (dlg.ShowModal() == wxID_OK) { m_NormalFace = dlg.NormalFont -> GetStringSelection(); m_FixedFace = dlg.FixedFont -> GetStringSelection(); @@ -1023,9 +1045,9 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) m_HtmlWin -> HistoryForward(); NotifyPageChanged(); break; - - case wxID_HTML_UP : - if (m_PagesHash) + + case wxID_HTML_UP : + if (m_PagesHash) { wxString an = m_HtmlWin -> GetOpenedAnchor(); wxHtmlHelpHashData *ha; @@ -1042,8 +1064,8 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) } break; - case wxID_HTML_UPNODE : - if (m_PagesHash) + case wxID_HTML_UPNODE : + if (m_PagesHash) { wxString an = m_HtmlWin -> GetOpenedAnchor(); wxHtmlHelpHashData *ha; @@ -1056,7 +1078,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) int level = m_Data -> GetContents()[ha -> m_Index].m_Level - 1; wxHtmlContentsItem *it; int ind = ha -> m_Index - 1; - + it = m_Data -> GetContents() + ind; while (ind >= 0 && it -> m_Level != level) ind--, it--; if (ind >= 0) @@ -1068,13 +1090,13 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) } break; - case wxID_HTML_DOWN : - if (m_PagesHash) + case wxID_HTML_DOWN : + if (m_PagesHash) { wxString an = m_HtmlWin -> GetOpenedAnchor(); wxString adr; wxHtmlHelpHashData *ha; - + if (an.IsEmpty()) adr = m_HtmlWin -> GetOpenedPage(); else adr = m_HtmlWin -> GetOpenedPage() + wxT("#") + an; @@ -1083,7 +1105,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) if (ha && ha -> m_Index < m_Data -> GetContentsCnt() - 1) { wxHtmlContentsItem *it = m_Data -> GetContents() + (ha -> m_Index + 1); - + while (it -> m_Book -> GetBasePath() + it -> m_Page == adr) it++; m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page); NotifyPageChanged(); @@ -1111,12 +1133,12 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) case wxID_HTML_OPTIONS : OptionsDialog(); break; - - case wxID_HTML_BOOKMARKSADD : + + case wxID_HTML_BOOKMARKSADD : { wxString item; wxString url; - + item = m_HtmlWin -> GetOpenedPageTitle(); url = m_HtmlWin -> GetOpenedPage(); if (item == wxEmptyString) item = url.AfterLast(wxT('/')); @@ -1127,12 +1149,12 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) } } break; - - case wxID_HTML_BOOKMARKSREMOVE : + + case wxID_HTML_BOOKMARKSREMOVE : { wxString item; int pos; - + item = m_Bookmarks -> GetStringSelection(); pos = m_BookmarksNames.Index(item); if (pos != wxNOT_FOUND) { @@ -1146,7 +1168,7 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) #if wxUSE_PRINTING_ARCHITECTURE case wxID_HTML_PRINT : { - if (m_Printer == NULL) + if (m_Printer == NULL) m_Printer = new wxHtmlEasyPrinting(_("Help Printing"), this); if (!m_HtmlWin -> GetOpenedPage()) wxLogWarning(_("Cannot print empty page.")); @@ -1158,12 +1180,18 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) case wxID_HTML_OPENFILE : { - wxString s = wxFileSelector(_("Open HTML document"), wxEmptyString, wxEmptyString, wxEmptyString, - wxT("HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|" - "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|" - "HTML Help Project (*.hhp)|*.hhp|" - "All files (*.*)|*"), - wxOPEN | wxFILE_MUST_EXIST, this); + wxString s = wxFileSelector(_("Open HTML document"), + wxEmptyString, + wxEmptyString, + wxEmptyString, + _( +"HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|\ +Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\ +HTML Help Project (*.hhp)|*.hhp|\ +All files (*.*)|*" + ), + wxOPEN | wxFILE_MUST_EXIST, + this); if (!s.IsEmpty()) { wxString ext = s.Right(4).Lower(); @@ -1189,8 +1217,8 @@ void wxHtmlHelpFrame::OnContentsSel(wxTreeEvent& event) wxHtmlContentsItem *it; pg = (wxHtmlHelpTreeItemData*) m_ContentsBox -> GetItemData(event.GetItem()); - - if (pg && m_UpdateContents) + + if (pg && m_UpdateContents) { it = m_Data -> GetContents() + (pg -> m_Id); m_UpdateContents = FALSE; @@ -1213,7 +1241,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event) { wxString sr = m_IndexText -> GetLineText(0); sr.MakeLower(); - if (sr == wxEmptyString) + if (sr == wxEmptyString) OnIndexAll(event); else { @@ -1221,7 +1249,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event) const wxChar *cstr = sr.c_str(); wxChar mybuff[512], *ptr; bool first = TRUE; - + m_IndexList->Clear(); int cnt = m_Data->GetIndexCnt(); wxHtmlContentsItem* index = m_Data->GetIndex(); @@ -1230,9 +1258,10 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event) for (int i = 0; i < cnt; i++) { wxStrncpy(mybuff, index[i].m_Name, 512); - mybuff[511] = 0; - for (ptr = mybuff; *ptr != 0; ptr++) - if (*ptr >= 'A' && *ptr <= 'Z') *ptr -= 'A' - 'a'; + mybuff[511] = _T('\0'); + for (ptr = mybuff; *ptr != 0; ptr++) + if (*ptr >= _T('A') && *ptr <= _T('Z')) + *ptr -= (wxChar)(_T('A') - _T('a')); if (wxStrstr(mybuff, cstr) != NULL) { m_IndexList -> Append(index[i].m_Name, (char*)(index + i)); displ++; @@ -1256,7 +1285,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event) void wxHtmlHelpFrame::OnIndexAll(wxCommandEvent& WXUNUSED(event)) { wxBusyCursor bcur; - + m_IndexList->Clear(); int cnt = m_Data->GetIndexCnt(); bool first = TRUE; @@ -1280,7 +1309,7 @@ void wxHtmlHelpFrame::OnIndexAll(wxCommandEvent& WXUNUSED(event)) void wxHtmlHelpFrame::OnSearchSel(wxCommandEvent& WXUNUSED(event)) { wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_SearchList -> GetClientData(m_SearchList -> GetSelection()); - if (it) + if (it) { m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page); NotifyPageChanged(); @@ -1336,7 +1365,7 @@ BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame) EVT_TEXT_ENTER(wxID_HTML_INDEXTEXT, wxHtmlHelpFrame::OnIndexFind) EVT_BUTTON(wxID_HTML_INDEXBUTTONALL, wxHtmlHelpFrame::OnIndexAll) EVT_COMBOBOX(wxID_HTML_BOOKMARKSLIST, wxHtmlHelpFrame::OnBookmarksSel) - EVT_CLOSE(wxHtmlHelpFrame::OnCloseWindow) + EVT_CLOSE(wxHtmlHelpFrame::OnCloseWindow) END_EVENT_TABLE() #endif diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 0ca4bb2524..dd25fd50de 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -14,7 +14,8 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML + +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -45,7 +46,6 @@ wxHtmlCell::wxHtmlCell() : wxObject() wxHtmlCell::~wxHtmlCell() { if (m_Link) delete m_Link; - if (m_Next) delete m_Next; } @@ -70,14 +70,9 @@ bool wxHtmlCell::AdjustPagebreak(int *pagebreak) const if ((!m_CanLiveOnPagebreak) && m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak) { *pagebreak = m_PosY; - if (m_Next != NULL) m_Next -> AdjustPagebreak(pagebreak); return TRUE; } - - else { - if (m_Next != NULL) return m_Next -> AdjustPagebreak(pagebreak); - else return FALSE; - } + return FALSE; } @@ -95,28 +90,24 @@ void wxHtmlCell::SetLink(const wxHtmlLinkInfo& link) void wxHtmlCell::Layout(int w) { SetPos(0, 0); - if (m_Next) m_Next -> Layout(w); } void wxHtmlCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) { - if (m_Next) m_Next -> Draw(dc, x, y, view_y1, view_y2); } void wxHtmlCell::DrawInvisible(wxDC& dc, int x, int y) { - if (m_Next) m_Next -> DrawInvisible(dc, x, y); } const wxHtmlCell* wxHtmlCell::Find(int condition, const void* param) const { - if (m_Next) return m_Next -> Find(condition, param); - else return NULL; + return NULL; } @@ -132,7 +123,7 @@ wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell() if (m_Word.Find(wxT('&')) != -1) { #define ESCSEQ(escape, subst) \ - { wxT("&"escape";"), wxT("&"escape" "), wxT(subst) } + { _T("&") _T(escape) _T(";"), _T("&") _T(escape) _T(" "), _T(subst) } static wxChar* substitutions[][3] = { ESCSEQ("quot", "\""), @@ -141,7 +132,7 @@ wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell() ESCSEQ("nbsp", " "), ESCSEQ("iexcl", "!"), - ESCSEQ("cent", "¢"), + ESCSEQ("cent", "\242"/* ¢ */), ESCSEQ("yen", " "), ESCSEQ("brkbar", " "), @@ -166,66 +157,66 @@ wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell() ESCSEQ("raquo", " "), ESCSEQ("iquest", " "), - ESCSEQ("Agrave", "À"), + ESCSEQ("Agrave", "\300"/* À */), - ESCSEQ("Acirc", "Â"), - ESCSEQ("Atilde", "Ã"), - ESCSEQ("Auml", "Ä"), + ESCSEQ("Acirc", "\302"/* Â */), + ESCSEQ("Atilde", "\303"/* Ã */), + ESCSEQ("Auml", "\304"/* Ä */), ESCSEQ("Aring", " "), ESCSEQ("AElig", " "), - ESCSEQ("Ccedil", "ç"), - ESCSEQ("Egrave", "È"), - ESCSEQ("Eacute", "É"), - ESCSEQ("Ecirc", "Ê"), - ESCSEQ("Euml", "Ë"), - ESCSEQ("Igrave", "Ì"), + ESCSEQ("Ccedil", "\347"/* ç */), + ESCSEQ("Egrave", "\310"/* È */), + ESCSEQ("Eacute", "\311"/* É */), + ESCSEQ("Ecirc", "\312"/* Ê */), + ESCSEQ("Euml", "\313"/* Ë */), + ESCSEQ("Igrave", "\314"/* Ì */), - ESCSEQ("Icirc", "Î"), - ESCSEQ("Iuml", "Ï"), + ESCSEQ("Icirc", "\316"/* Î */), + ESCSEQ("Iuml", "\317"/* Ï */), - ESCSEQ("Ntilde", "Ñ"), - ESCSEQ("Ograve", "Ò"), + ESCSEQ("Ntilde", "\321"/* Ñ */), + ESCSEQ("Ograve", "\322"/* Ò */), - ESCSEQ("Ocirc", "Ô"), - ESCSEQ("Otilde", "Õ"), - ESCSEQ("Ouml", "Ö"), + ESCSEQ("Ocirc", "\324"/* Ô */), + ESCSEQ("Otilde", "\325"/* Õ */), + ESCSEQ("Ouml", "\326"/* Ö */), ESCSEQ("Oslash", " "), - ESCSEQ("Ugrave", "Ù"), + ESCSEQ("Ugrave", "\331"/* Ù */), ESCSEQ("Ucirc", " "), - ESCSEQ("Uuml", "Ü"), + ESCSEQ("Uuml", "\334"/* Ü */), - ESCSEQ("szlig", "§"), - ESCSEQ("agrave;","à"), - ESCSEQ("aacute", "á"), - ESCSEQ("acirc", "â"), - ESCSEQ("atilde", "ã"), - ESCSEQ("auml", "ä"), + ESCSEQ("szlig", "\247"/* § */), + ESCSEQ("agrave","\340"), + ESCSEQ("aacute", "\341"/* á */), + ESCSEQ("acirc", "\342"/* â */), + ESCSEQ("atilde", "\343"/* ã */), + ESCSEQ("auml", "\344"/* ä */), ESCSEQ("aring", "a"), ESCSEQ("aelig", "ae"), - ESCSEQ("ccedil", "ç"), - ESCSEQ("egrave", "è"), - ESCSEQ("eacute", "é"), - ESCSEQ("ecirc", "ê"), - ESCSEQ("euml", "ë"), - ESCSEQ("igrave", "ì"), - ESCSEQ("iacute", "í"), + ESCSEQ("ccedil", "\347"/* ç */), + ESCSEQ("egrave", "\350"/* è */), + ESCSEQ("eacute", "\351"/* é */), + ESCSEQ("ecirc", "\352"/* ê */), + ESCSEQ("euml", "\353"/* ë */), + ESCSEQ("igrave", "\354"/* ì */), + ESCSEQ("iacute", "\355"/* í */), ESCSEQ("icirc", " "), - ESCSEQ("iuml", "ï"), + ESCSEQ("iuml", "\357"/* ï */), ESCSEQ("eth", " "), - ESCSEQ("ntilde", "ñ"), - ESCSEQ("ograve", "ò"), - ESCSEQ("oacute", "ó"), - ESCSEQ("ocirc", "ô"), - ESCSEQ("otilde", "õ"), - ESCSEQ("ouml", "ö"), + ESCSEQ("ntilde", "\361"/* ñ */), + ESCSEQ("ograve", "\362"/* ò */), + ESCSEQ("oacute", "\363"/* ó */), + ESCSEQ("ocirc", "\364"/* ô */), + ESCSEQ("otilde", "\365"/* õ */), + ESCSEQ("ouml", "\366"/* ö */), ESCSEQ("divide", " "), ESCSEQ("oslash", " "), - ESCSEQ("ugrave", "ù"), - ESCSEQ("uacute", "ú"), - ESCSEQ("ucirc", "û"), - ESCSEQ("uuml", "ü"), + ESCSEQ("ugrave", "\371"/* ù */), + ESCSEQ("uacute", "\372"/* ú */), + ESCSEQ("ucirc", "\373"/* û */), + ESCSEQ("uuml", "\374"/* ü */), ESCSEQ("yuml", ""), @@ -251,7 +242,6 @@ wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell() void wxHtmlWordCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) { dc.DrawText(m_Word, x + m_PosX, y + m_PosY); - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } @@ -279,7 +269,13 @@ wxHtmlContainerCell::wxHtmlContainerCell(wxHtmlContainerCell *parent) : wxHtmlCe wxHtmlContainerCell::~wxHtmlContainerCell() { - if (m_Cells) delete m_Cells; + wxHtmlCell *cell = m_Cells; + while ( cell ) + { + wxHtmlCell *cellNext = cell->GetNext(); + delete cell; + cell = cellNext; + } } @@ -376,7 +372,8 @@ void wxHtmlContainerCell::Layout(int w) if (m_Cells) { int l = (m_IndentLeft < 0) ? (-m_IndentLeft * m_Width / 100) : m_IndentLeft; int r = (m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight; - m_Cells -> Layout(m_Width - (l + r)); + for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext()) + cell->Layout(m_Width - (l + r)); } /* @@ -512,22 +509,31 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) dc.DrawLine(x + m_PosX, y + m_PosY + m_Height - 1, x + m_PosX + m_Width - 1, y + m_PosY + m_Height - 1); } - if (m_Cells) m_Cells -> Draw(dc, x + m_PosX, y + m_PosY, view_y1, view_y2); + if (m_Cells) + { + for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext()) + cell->Draw(dc, x + m_PosX, y + m_PosY, view_y1, view_y2); + } } // container invisible, just proceed font+color changing: else { - if (m_Cells) m_Cells -> DrawInvisible(dc, x + m_PosX, y + m_PosY); + if (m_Cells) + { + for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext()) + cell->DrawInvisible(dc, x + m_PosX, y + m_PosY); + } } - - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } void wxHtmlContainerCell::DrawInvisible(wxDC& dc, int x, int y) { - if (m_Cells) m_Cells -> DrawInvisible(dc, x + m_PosX, y + m_PosY); - wxHtmlCell::DrawInvisible(dc, x, y); + if (m_Cells) + { + for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext()) + cell->DrawInvisible(dc, x + m_PosX, y + m_PosY); + } } @@ -604,14 +610,17 @@ void wxHtmlContainerCell::SetWidthFloat(const wxHtmlTag& tag, double pixel_scale const wxHtmlCell* wxHtmlContainerCell::Find(int condition, const void* param) const { - const wxHtmlCell *r = NULL; + if (m_Cells) + { + const wxHtmlCell *r = NULL; - if (m_Cells) { - r = m_Cells -> Find(condition, param); - if (r) return r; + for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext()) + { + r = cell->Find(condition, param); + if (r) return r; + } } - - return wxHtmlCell::Find(condition, param); + return NULL; } @@ -649,7 +658,6 @@ void wxHtmlColourCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) dc.SetBackground(wxBrush(m_Colour, wxSOLID)); dc.SetTextBackground(m_Colour); } - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } void wxHtmlColourCell::DrawInvisible(wxDC& dc, int x, int y) @@ -660,7 +668,6 @@ void wxHtmlColourCell::DrawInvisible(wxDC& dc, int x, int y) dc.SetBackground(wxBrush(m_Colour, wxSOLID)); dc.SetTextBackground(m_Colour); } - wxHtmlCell::DrawInvisible(dc, x, y); } @@ -673,13 +680,11 @@ void wxHtmlColourCell::DrawInvisible(wxDC& dc, int x, int y) void wxHtmlFontCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) { dc.SetFont(m_Font); - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } void wxHtmlFontCell::DrawInvisible(wxDC& dc, int x, int y) { dc.SetFont(m_Font); - wxHtmlCell::DrawInvisible(dc, x, y); } @@ -716,8 +721,6 @@ void wxHtmlWidgetCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) ((wxScrolledWindow*)(m_Wnd -> GetParent())) -> ViewStart(&stx, &sty); m_Wnd -> SetSize(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty, m_Width, m_Height); - - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } @@ -735,8 +738,6 @@ void wxHtmlWidgetCell::DrawInvisible(wxDC& dc, int x, int y) ((wxScrolledWindow*)(m_Wnd -> GetParent())) -> ViewStart(&stx, &sty); m_Wnd -> SetSize(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty, m_Width, m_Height); - - wxHtmlCell::DrawInvisible(dc, x, y); } diff --git a/src/html/htmlfilt.cpp b/src/html/htmlfilt.cpp index 95f90552d1..874ccaf991 100644 --- a/src/html/htmlfilt.cpp +++ b/src/html/htmlfilt.cpp @@ -15,7 +15,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -143,7 +143,7 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const if (s == NULL) { - wxLogError(_("Cannot open HTML document: %s"), file.GetLocation().mb_str()); + wxLogError(_("Cannot open HTML document: %s"), file.GetLocation().c_str()); return wxEmptyString; } src = new char[s -> GetSize() + 1]; @@ -160,7 +160,7 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const return s; } - else return doc; + return doc; } diff --git a/src/html/htmlfilter.cpp b/src/html/htmlfilter.cpp deleted file mode 100644 index 683d6a62fc..0000000000 --- a/src/html/htmlfilter.cpp +++ /dev/null @@ -1,173 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: filter.cpp -// Purpose: wxHtmlFilter - input filter for translating into HTML format -// Author: Vaclav Slavik -// Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWindows Licence -///////////////////////////////////////////////////////////////////////////// - - -#ifdef __GNUG__ -#pragma implementation "htmlfilter.h" -#endif - -#include "wx/wxprec.h" - -#if wxUSE_HTML - -#ifdef __BORDLANDC__ -#pragma hdrstop -#endif - -#ifndef WXPRECOMP -#include "wx/wx.h" -#endif - -#include "wx/html/htmlfilter.h" -#include "wx/html/htmlwin.h" - - -/* - -There is code for several default filters: - -*/ - -IMPLEMENT_ABSTRACT_CLASS(wxHtmlFilter, wxObject) - -//-------------------------------------------------------------------------------- -// wxHtmlFilterPlainText -// filter for text/plain or uknown -//-------------------------------------------------------------------------------- - -IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterPlainText, wxHtmlFilter) - -bool wxHtmlFilterPlainText::CanRead(const wxFSFile& WXUNUSED(file)) const -{ - return TRUE; -} - - - -wxString wxHtmlFilterPlainText::ReadFile(const wxFSFile& file) const -{ - wxInputStream *s = file.GetStream(); - char *src; - wxString doc, doc2; - - if (s == NULL) return wxEmptyString; - src = new char[s -> GetSize()+1]; - src[s -> GetSize()] = 0; - s -> Read(src, s -> GetSize()); - doc = src; - delete [] src; - - doc.Replace(_T("<"), _T("<"), TRUE); - doc.Replace(_T(">"), _T(">"), TRUE); - doc2 = _T("

    \n") + doc + _T("\n
    "); - return doc2; -} - - - - - -//-------------------------------------------------------------------------------- -// wxHtmlFilterImage -// filter for image/* -//-------------------------------------------------------------------------------- - -class wxHtmlFilterImage : public wxHtmlFilter -{ - DECLARE_DYNAMIC_CLASS(wxHtmlFilterImage) - - public: - virtual bool CanRead(const wxFSFile& file) const; - virtual wxString ReadFile(const wxFSFile& file) const; -}; - -IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterImage, wxHtmlFilter) - - - -bool wxHtmlFilterImage::CanRead(const wxFSFile& file) const -{ - return (file.GetMimeType().Left(6) == "image/"); -} - - - -wxString wxHtmlFilterImage::ReadFile(const wxFSFile& file) const -{ - return (""); -} - - - - -//-------------------------------------------------------------------------------- -// wxHtmlFilterPlainText -// filter for text/plain or uknown -//-------------------------------------------------------------------------------- - -class wxHtmlFilterHTML : public wxHtmlFilter -{ - DECLARE_DYNAMIC_CLASS(wxHtmlFilterHTML) - - public: - virtual bool CanRead(const wxFSFile& file) const; - virtual wxString ReadFile(const wxFSFile& file) const; -}; - - -IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterHTML, wxHtmlFilter) - -bool wxHtmlFilterHTML::CanRead(const wxFSFile& file) const -{ -// return (file.GetMimeType() == "text/html"); -// This is true in most case but some page can return: -// "text/html; char-encoding=...." -// So we use Find instead - return (file.GetMimeType().Find(_T("text/html")) == 0); -} - - - -wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const -{ - wxInputStream *s = file.GetStream(); - char *src; - wxString doc; - - if (s == NULL) return wxEmptyString; - src = new char[s -> GetSize() + 1]; - src[s -> GetSize()] = 0; - s -> Read(src, s -> GetSize()); - doc = src; - delete[] src; - - return doc; -} - - - - -///// Module: - -class wxHtmlFilterModule : public wxModule -{ - DECLARE_DYNAMIC_CLASS(wxHtmlFilterModule) - - public: - virtual bool OnInit() - { - wxHtmlWindow::AddFilter(new wxHtmlFilterHTML); - wxHtmlWindow::AddFilter(new wxHtmlFilterImage); - return TRUE; - } - virtual void OnExit() {} -}; - -IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterModule, wxModule) - -#endif diff --git a/src/html/htmlhelp.cpp b/src/html/htmlhelp.cpp deleted file mode 100644 index 70f9a9a575..0000000000 --- a/src/html/htmlhelp.cpp +++ /dev/null @@ -1,835 +0,0 @@ -// Name: htmlhelp.cpp -// Purpose: Help controller -// Author: Vaclav Slavik -// Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWindows Licence -///////////////////////////////////////////////////////////////////////////// - -#error This file should not be compiled! Update your build system! \ -(configure users, rerun configure to get a new Makefile) \ -Instead of htmlhelp[_io], use helpdata, helpfrm and helpctrl. This \ -file is only left to point out the problem and will be removed r.s.n. - -#ifdef __GNUG__ -#pragma implementation "htmlhelp.h" -#endif - -#include "wx/wxprec.h" - -#if wxUSE_HTML - -#ifdef __BORDLANDC__ -#pragma hdrstop -#endif - -#ifndef WXPRECOMP -#include -#endif - - -#include -#include -#include -#include -#include -#include -#include -#include - -#if !((wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7))) -#include -#endif - - -// Bitmaps: - -#ifndef __WXMSW__ -#include "bitmaps/panel.xpm" -#include "bitmaps/back.xpm" -#include "bitmaps/forward.xpm" -#include "bitmaps/book.xpm" -#include "bitmaps/folder.xpm" -#include "bitmaps/page.xpm" -#endif - -#include "search.h" - - - - -#include -WX_DEFINE_OBJARRAY(HtmlBookRecArray) - - - - - - - - - -//----------------------------------------------------------------------------- -// wxHtmlHelpController -//----------------------------------------------------------------------------- - - -IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxEvtHandler) - - -wxHtmlHelpController::wxHtmlHelpController() : wxEvtHandler() -{ - m_Frame = NULL; - m_Config = NULL; - m_ConfigRoot = wxEmptyString; - m_TitleFormat = _("Help : %s"); - m_TempPath = wxEmptyString; - - m_Cfg.x = m_Cfg.y = 0; - m_Cfg.w = 700; m_Cfg.h = 480; - m_Cfg.sashpos = 240; - m_Cfg.navig_on = TRUE; - - m_ContentsImageList = new wxImageList(12, 12); - m_ContentsImageList -> Add(wxICON(book)); - m_ContentsImageList -> Add(wxICON(folder)); - m_ContentsImageList -> Add(wxICON(page)); - - m_Contents = NULL; - m_ContentsCnt = 0; - m_Index = NULL; - m_IndexCnt = 0; - - m_IndexBox = NULL; - m_ContentsBox = NULL; - m_SearchList = NULL; - m_SearchText = NULL; - m_SearchButton = NULL; - m_HtmlWin = NULL; - m_Splitter = NULL; - m_NavigPan = NULL; -} - - - -wxHtmlHelpController::~wxHtmlHelpController() -{ - int i; - - m_BookRecords.Empty(); - delete m_ContentsImageList; - if (m_Contents) { - for (i = 0; i < m_ContentsCnt; i++) { - delete[] m_Contents[i].m_Page; - delete[] m_Contents[i].m_Name; - } - free(m_Contents); - } - if (m_Index) { - for (i = 0; i < m_IndexCnt; i++) { - delete[] m_Index[i].m_Page; - delete[] m_Index[i].m_Name; - } - free(m_Index); - } -} - - - -void wxHtmlHelpController::SetTempDir(const wxString& path) -{ - if (path == wxEmptyString) m_TempPath = path; - else { - if (wxIsAbsolutePath(path)) m_TempPath = path; - else m_TempPath = wxGetCwd() + "/" + path; - - if (m_TempPath[m_TempPath.Length() - 1] != '/') - m_TempPath << "/"; - } -} - - - - -// Reads one line, stores it into buf and returns pointer to new line or NULL. -static char* ReadLine(char *line, char *buf) -{ - char *writeptr = buf, *readptr = line; - - while (*readptr != 0 && *readptr != '\r' && *readptr != '\n') *(writeptr++) = *(readptr++); - *writeptr = 0; - while (*readptr == '\r' || *readptr == '\n') readptr++; - if (*readptr == 0) return NULL; - else return readptr; -} - - -static wxString SafeFileName(const wxString& s) -{ - wxString res = s; - res.Replace(_T(":"), _T("_"), TRUE); - res.Replace(_T(" "), _T("_"), TRUE); - res.Replace(_T("/"), _T("_"), TRUE); - res.Replace(_T("\\"), _T("_"), TRUE); - res.Replace(_T("#"), _T("_"), TRUE); - res.Replace(_T("."), _T("_"), TRUE); - return res; -} - - -static int IndexCompareFunc(const void *a, const void *b) -{ - return strcmp(((HtmlContentsItem*)a) -> m_Name, ((HtmlContentsItem*)b) -> m_Name); -} - - - -bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg) -{ - wxFSFile *fi; - wxFileSystem fsys; - wxInputStream *s; - HtmlBookRecord *bookr; - wxString bookFull; - - int sz; - char *buff, *lineptr; - char linebuf[300]; - - wxString title = _("noname"), - safetitle, - start = wxEmptyString, - contents = wxEmptyString, index = wxEmptyString; - - if (wxIsAbsolutePath(book)) bookFull = book; - else bookFull = wxGetCwd() + "/" + book; - - fi = fsys.OpenFile(bookFull); - if (fi == NULL) return FALSE; - fsys.ChangePathTo(bookFull); - s = fi -> GetStream(); - sz = s -> GetSize(); - buff = new char[sz+1]; - buff[sz] = 0; - s -> Read(buff, sz); - lineptr = buff; - delete fi; - - while ((lineptr = ReadLine(lineptr, linebuf)) != NULL) { - if (strstr(linebuf, "Title=") == linebuf) - title = linebuf + strlen("Title="); - if (strstr(linebuf, "Default topic=") == linebuf) - start = linebuf + strlen("Default topic="); - if (strstr(linebuf, "Index file=") == linebuf) - index = linebuf + strlen("Index file="); - if (strstr(linebuf, "Contents file=") == linebuf) - contents = linebuf + strlen("Contents file="); - } - delete[] buff; - - bookr = new HtmlBookRecord(fsys.GetPath(), title, start); - - if (m_ContentsCnt % HTML_REALLOC_STEP == 0) - m_Contents = (HtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + HTML_REALLOC_STEP) * sizeof(HtmlContentsItem)); - m_Contents[m_ContentsCnt].m_Level = 0; - m_Contents[m_ContentsCnt].m_ID = 0; - m_Contents[m_ContentsCnt].m_Page = new char[start.Length() + 1]; - strcpy(m_Contents[m_ContentsCnt].m_Page, start.c_str()); - m_Contents[m_ContentsCnt].m_Name = new char [title.Length() + 1]; - strcpy(m_Contents[m_ContentsCnt].m_Name, title.c_str()); - m_Contents[m_ContentsCnt].m_Book = bookr; - m_ContentsCnt++; - - // Try to find cached binary versions: - safetitle = SafeFileName(title); - fi = fsys.OpenFile(safetitle + ".cached"); - if (fi == NULL) fi = fsys.OpenFile(m_TempPath + safetitle + ".cached"); - if ((fi == NULL) || (m_TempPath == wxEmptyString)) { - LoadMSProject(bookr, fsys, index, contents, show_wait_msg); - if (m_TempPath != wxEmptyString) { - wxFileOutputStream *outs = new wxFileOutputStream(m_TempPath + safetitle + ".cached"); - SaveCachedBook(bookr, outs); - delete outs; - } - } - else { - LoadCachedBook(bookr, fi -> GetStream()); - delete fi; - } - - m_BookRecords.Add(bookr); - if (m_IndexCnt > 0) - qsort(m_Index, m_IndexCnt, sizeof(HtmlContentsItem), IndexCompareFunc); - - return TRUE; -} - - - - -void wxHtmlHelpController::Display(const wxString& x) -{ - int cnt; - int i; - wxFileSystem fsys; - wxFSFile *f; - - CreateHelpWindow(); - - /* 1. try to open given file: */ - - cnt = m_BookRecords.GetCount(); - for (i = 0; i < cnt; i++) { - f = fsys.OpenFile(m_BookRecords[i].GetBasePath() + x); - if (f) { - m_HtmlWin -> LoadPage(m_BookRecords[i].GetBasePath() + x); - delete f; - return; - } - } - - - /* 2. try to find a book: */ - - for (i = 0; i < cnt; i++) { - if (m_BookRecords[i].GetTitle() == x) { - m_HtmlWin -> LoadPage(m_BookRecords[i].GetBasePath() + m_BookRecords[i].GetStart()); - return; - } - } - - /* 3. try to find in contents: */ - - cnt = m_ContentsCnt; - for (i = 0; i < cnt; i++) { - if (strcmp(m_Contents[i].m_Name, x) == 0) { - m_HtmlWin -> LoadPage(m_Contents[i].m_Book -> GetBasePath() + m_Contents[i].m_Page); - return; - } - } - - - /* 4. try to find in index: */ - - cnt = m_IndexCnt; - for (i = 0; i < cnt; i++) { - if (strcmp(m_Index[i].m_Name, x) == 0) { - m_HtmlWin -> LoadPage(m_Index[i].m_Book -> GetBasePath() + m_Index[i].m_Page); - return; - } - } - - - /* 5. if everything failed, search the documents: */ - - KeywordSearch(x); -} - - - -void wxHtmlHelpController::Display(const int id) -{ - CreateHelpWindow(); - - for (int i = 0; i < m_ContentsCnt; i++) { - if (m_Contents[i].m_ID == id) { - m_HtmlWin -> LoadPage(m_Contents[i].m_Book -> GetBasePath() + m_Contents[i].m_Page); - return; - } - } -} - - - -void wxHtmlHelpController::DisplayContents() -{ - CreateHelpWindow(); - m_Frame -> Raise(); - if (!m_Splitter -> IsSplit()) { - m_NavigPan -> Show(TRUE); - m_HtmlWin -> Show(TRUE); - m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); - } - m_NavigPan -> SetSelection(0); -} - - - -void wxHtmlHelpController::DisplayIndex() -{ - CreateHelpWindow(); - m_Frame -> Raise(); - if (!m_Splitter -> IsSplit()) { - m_NavigPan -> Show(TRUE); - m_HtmlWin -> Show(TRUE); - m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); - } - m_NavigPan -> SetSelection(1); -} - - - - -#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7)) - -class MyProgressDlg : public wxDialog -{ - public: - bool m_Canceled; - - MyProgressDlg(wxWindow *parent) : wxDialog(parent, -1, - _("Searching..."), - wxPoint(0, 0), -#ifdef __WXGTK__ - wxSize(300, 110)) -#else - wxSize(300, 130)) -#endif - {m_Canceled = FALSE;} - void OnCancel(wxCommandEvent& event) {m_Canceled = TRUE;} - DECLARE_EVENT_TABLE() -}; -BEGIN_EVENT_TABLE(MyProgressDlg, wxDialog) - EVT_BUTTON(wxID_CANCEL, MyProgressDlg::OnCancel) -END_EVENT_TABLE() - -#endif - - -bool wxHtmlHelpController::KeywordSearch(const wxString& keyword) -{ - int foundcnt = 0; - CreateHelpWindow(); - // if these are not set, we can't continue - if (! (m_SearchList && m_HtmlWin)) - return FALSE; - m_Frame -> Raise(); - if (m_Splitter && m_NavigPan && m_SearchButton) { - if (!m_Splitter -> IsSplit()) { - m_NavigPan -> Show(TRUE); - m_HtmlWin -> Show(TRUE); - m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); - } - m_NavigPan -> SetSelection(2); - m_SearchList -> Clear(); - m_SearchText -> SetValue(keyword); - m_SearchButton -> Enable(FALSE); - } - { - int cnt = m_ContentsCnt; - wxSearchEngine engine; - wxFileSystem fsys; - wxFSFile *file; - wxString lastpage = wxEmptyString; - wxString foundstr; - -#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7)) - MyProgressDlg progress(m_Frame); - - wxStaticText *prompt = new wxStaticText(&progress, -1, "", wxPoint(20, 50), wxSize(260, 25), wxALIGN_CENTER); - wxGauge *gauge = new wxGauge(&progress, -1, cnt, wxPoint(20, 20), wxSize(260, 25)); - wxButton *btn = new wxButton(&progress, wxID_CANCEL, _("Cancel"), wxPoint(110, 70), wxSize(80, 25)); - btn = btn; /* fool compiler :-) */ - prompt -> SetLabel(_("No matching page found yet")); - - progress.Centre(wxBOTH); - progress.Show(TRUE); -#else - wxProgressDialog progress(_("Searching..."), _("No matching page found yet"), cnt, m_Frame, wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE); -#endif - - engine.LookFor(keyword); - - for (int i = 0; i < cnt; i++) { -#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7)) - gauge -> SetValue(i); - if (progress.m_Canceled) break; -#else - if (progress.Update(i) == FALSE) break; -#endif - wxYield(); - - file = fsys.OpenFile(m_Contents[i].m_Book -> GetBasePath() + m_Contents[i].m_Page); - if (file) { - if (lastpage != file -> GetLocation()) { - lastpage = file -> GetLocation(); - if (engine.Scan(file -> GetStream())) { - foundstr.Printf(_("Found %i matches"), ++foundcnt); -#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7)) - prompt -> SetLabel(foundstr); -#else - progress.Update(i, foundstr); -#endif - wxYield(); - m_SearchList -> Append(m_Contents[i].m_Name, (char*)(m_Contents + i)); - } - } - delete file; - } - } - -#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7)) - progress.Close(TRUE); -#endif - } - if (m_SearchButton) - m_SearchButton -> Enable(TRUE); - if (m_SearchText) { - m_SearchText -> SetSelection(0, keyword.Length()); - m_SearchText -> SetFocus(); - } - if (foundcnt) { - HtmlContentsItem *it = (HtmlContentsItem*) m_SearchList -> GetClientData(0); - if (it) m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page); - } - return (foundcnt > 0); -} - - - - - - -void wxHtmlHelpController::CreateHelpWindow() -{ - wxBusyCursor cur; - wxString oldpath; - wxStatusBar *sbar; - - if (m_Frame) { - m_Frame -> Raise(); - m_Frame -> Show(TRUE); - return; - } - -#if wxUSE_BUSYINFO - wxBusyInfo busyinfo(_("Preparing help window...")); -#endif - - if (m_Config) ReadCustomization(m_Config, m_ConfigRoot); - - m_Frame = new wxFrame(NULL, -1, "", wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h)); - m_Frame -> PushEventHandler(this); - sbar = m_Frame -> CreateStatusBar(); - - { - wxToolBar *toolBar; - toolBar = m_Frame -> CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT | wxTB_DOCKABLE); - toolBar -> SetMargins(2, 2); - wxBitmap* toolBarBitmaps[3]; - -#ifdef __WXMSW__ - toolBarBitmaps[0] = new wxBitmap("panel"); - toolBarBitmaps[1] = new wxBitmap("back"); - toolBarBitmaps[2] = new wxBitmap("forward"); - int width = 24; -#else - toolBarBitmaps[0] = new wxBitmap(panel_xpm); - toolBarBitmaps[1] = new wxBitmap(back_xpm); - toolBarBitmaps[2] = new wxBitmap(forward_xpm); - int width = 16; -#endif - - int currentX = 5; - - toolBar -> AddTool(wxID_HTML_PANEL, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Show/hide navigation panel")); - currentX += width + 5; - toolBar -> AddSeparator(); - toolBar -> AddTool(wxID_HTML_BACK, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go back to the previous HTML page")); - currentX += width + 5; - toolBar -> AddTool(wxID_HTML_FORWARD, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go forward to the next HTML page")); - currentX += width + 5; - - toolBar -> Realize(); - - // Can delete the bitmaps since they're reference counted - for (int i = 0; i < 3; i++) delete toolBarBitmaps[i]; - } - - - { - m_Splitter = new wxSplitterWindow(m_Frame); - - m_HtmlWin = new wxHtmlWindow(m_Splitter); - m_HtmlWin -> SetRelatedFrame(m_Frame, m_TitleFormat); - m_HtmlWin -> SetRelatedStatusBar(0); - if (m_Config) m_HtmlWin -> ReadCustomization(m_Config, m_ConfigRoot); - - m_NavigPan = new wxNotebook(m_Splitter, wxID_HTML_NOTEBOOK, wxDefaultPosition, wxDefaultSize); - { - m_ContentsBox = new wxTreeCtrl(m_NavigPan, wxID_HTML_TREECTRL, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | wxSUNKEN_BORDER); - m_ContentsBox -> SetImageList(m_ContentsImageList); - m_NavigPan -> AddPage(m_ContentsBox, _("Contents")); - } - - { - wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_INDEXPAGE); - wxLayoutConstraints *b1 = new wxLayoutConstraints; - b1 -> top.SameAs (dummy, wxTop, 0); - b1 -> left.SameAs (dummy, wxLeft, 0); - b1 -> width.PercentOf (dummy, wxWidth, 100); - b1 -> bottom.SameAs (dummy, wxBottom, 0); - m_IndexBox = new wxListBox(dummy, wxID_HTML_INDEXLIST, wxDefaultPosition, wxDefaultSize, 0); - m_IndexBox -> SetConstraints(b1); - dummy -> SetAutoLayout(TRUE); - m_NavigPan -> AddPage(dummy, _("Index")); - } - - { - wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_SEARCHPAGE); - - wxLayoutConstraints *b1 = new wxLayoutConstraints; - m_SearchText = new wxTextCtrl(dummy, wxID_HTML_SEARCHTEXT); - b1 -> top.SameAs (dummy, wxTop, 0); - b1 -> left.SameAs (dummy, wxLeft, 0); - b1 -> right.SameAs (dummy, wxRight, 0); - b1 -> height.AsIs(); - m_SearchText -> SetConstraints(b1); - - wxLayoutConstraints *b2 = new wxLayoutConstraints; - m_SearchButton = new wxButton(dummy, wxID_HTML_SEARCHBUTTON, _("Search!")); - b2 -> top.Below (m_SearchText, 10); - b2 -> right.SameAs (dummy, wxRight, 10); - b2 -> width.AsIs(); - b2 -> height.AsIs(); - m_SearchButton -> SetConstraints(b2); - - wxLayoutConstraints *b3 = new wxLayoutConstraints; - m_SearchList = new wxListBox(dummy, wxID_HTML_SEARCHLIST, wxDefaultPosition, wxDefaultSize, 0); - b3 -> top.Below (m_SearchButton, 10); - b3 -> left.SameAs (dummy, wxLeft, 0); - b3 -> right.SameAs (dummy, wxRight, 0); - b3 -> bottom.SameAs (dummy, wxBottom, 0); - m_SearchList -> SetConstraints(b3); - - dummy -> SetAutoLayout(TRUE); - dummy -> Layout(); - m_NavigPan -> AddPage(dummy, _("Search")); - } - - RefreshLists(); - m_NavigPan -> Show(TRUE); - m_HtmlWin -> Show(TRUE); - m_Splitter -> SetMinimumPaneSize(20); - m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); - if (!m_Cfg.navig_on) m_Splitter -> Unsplit(m_NavigPan); - wxYield(); - } - - m_Frame -> Show(TRUE); - wxYield(); -} - - - -#define MAX_ROOTS 64 - -void wxHtmlHelpController::CreateContents() -{ - HtmlContentsItem *it; - wxTreeItemId roots[MAX_ROOTS]; - bool imaged[MAX_ROOTS]; - int count = m_ContentsCnt; - - m_ContentsBox -> DeleteAllItems(); - roots[0] = m_ContentsBox -> AddRoot(_("(Help)")); - imaged[0] = TRUE; - - for (int i = 0; i < count; i++) { - it = m_Contents + i; - roots[it -> m_Level + 1] = m_ContentsBox -> AppendItem(roots[it -> m_Level], it -> m_Name, IMG_Page, -1, new wxHtmlHelpTreeItemData(it)); - if (it -> m_Level == 0) { - m_ContentsBox -> SetItemBold(roots[1], TRUE); - m_ContentsBox -> SetItemImage(roots[1], IMG_Book); - m_ContentsBox -> SetItemSelectedImage(roots[1], IMG_Book); - imaged[1] = TRUE; - } - else imaged[it -> m_Level + 1] = FALSE; - - if (!imaged[it -> m_Level]) { - m_ContentsBox -> SetItemImage(roots[it -> m_Level], IMG_Folder); - m_ContentsBox -> SetItemSelectedImage(roots[it -> m_Level], IMG_Folder); - imaged[it -> m_Level] = TRUE; - } - } - - m_ContentsBox -> Expand(roots[0]); -} - - - - -void wxHtmlHelpController::CreateIndex() -{ - m_IndexBox -> Clear(); - - for (int i = 0; i < m_IndexCnt; i++) - m_IndexBox -> Append(m_Index[i].m_Name, (char*)(m_Index + i)); -} - - - -void wxHtmlHelpController::RefreshLists() -{ - if (m_Frame) { - CreateContents(); - CreateIndex(); - m_SearchList -> Clear(); - } -} - - - - - - - -void wxHtmlHelpController::ReadCustomization(wxConfigBase *cfg, wxString path) -{ - wxString oldpath; - wxString tmp; - - if (path != wxEmptyString) { - oldpath = cfg -> GetPath(); - cfg -> SetPath(path); - } - - m_Cfg.navig_on = cfg -> Read("hcNavigPanel", m_Cfg.navig_on) != 0; - m_Cfg.sashpos = cfg -> Read("hcSashPos", m_Cfg.sashpos); - m_Cfg.x = cfg -> Read("hcX", m_Cfg.x); - m_Cfg.y = cfg -> Read("hcY", m_Cfg.y); - m_Cfg.w = cfg -> Read("hcW", m_Cfg.w); - m_Cfg.h = cfg -> Read("hcH", m_Cfg.h); - - if (path != wxEmptyString) - cfg -> SetPath(oldpath); -} - - - -void wxHtmlHelpController::WriteCustomization(wxConfigBase *cfg, wxString path) -{ - wxString oldpath; - wxString tmp; - - if (path != wxEmptyString) { - oldpath = cfg -> GetPath(); - cfg -> SetPath(path); - } - - cfg -> Write("hcNavigPanel", m_Cfg.navig_on); - cfg -> Write("hcSashPos", (long)m_Cfg.sashpos); - cfg -> Write("hcX", (long)m_Cfg.x); - cfg -> Write("hcY", (long)m_Cfg.y); - cfg -> Write("hcW", (long)m_Cfg.w); - cfg -> Write("hcH", (long)m_Cfg.h); - - if (path != wxEmptyString) - cfg -> SetPath(oldpath); -} - - - - - -/* -EVENT HANDLING : -*/ - - -void wxHtmlHelpController::OnToolbar(wxCommandEvent& event) -{ - switch (event.GetId()) { - case wxID_HTML_BACK : - m_HtmlWin -> HistoryBack(); - break; - case wxID_HTML_FORWARD : - m_HtmlWin -> HistoryForward(); - break; - case wxID_HTML_PANEL : - if (m_Splitter -> IsSplit()) { - m_Cfg.sashpos = m_Splitter -> GetSashPosition(); - m_Splitter -> Unsplit(m_NavigPan); - } - else { - m_NavigPan -> Show(TRUE); - m_HtmlWin -> Show(TRUE); - m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); - } - break; - } -} - - - -void wxHtmlHelpController::OnContentsSel(wxTreeEvent& event) -{ - wxHtmlHelpTreeItemData *pg; - - pg = (wxHtmlHelpTreeItemData*) m_ContentsBox -> GetItemData(event.GetItem()); - if (pg) m_HtmlWin -> LoadPage(pg -> GetPage()); -} - - - -void wxHtmlHelpController::OnIndexSel(wxCommandEvent& event) -{ - HtmlContentsItem *it = (HtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection()); - if (it) m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page); -} - - - -void wxHtmlHelpController::OnSearchSel(wxCommandEvent& event) -{ - HtmlContentsItem *it = (HtmlContentsItem*) m_SearchList -> GetClientData(m_SearchList -> GetSelection()); - if (it) m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page); -} - - - -void wxHtmlHelpController::OnCloseWindow(wxCloseEvent& event) -{ - int a, b; - - m_Cfg.navig_on = m_Splitter -> IsSplit(); - if (m_Cfg.navig_on) - m_Cfg.sashpos = m_Splitter -> GetSashPosition(); - m_Frame -> GetPosition(&a, &b); - m_Cfg.x = a, m_Cfg.y = b; - m_Frame -> GetSize(&a, &b); - m_Cfg.w = a, m_Cfg.h = b; - - if (m_Config) { - WriteCustomization(m_Config, m_ConfigRoot); - m_HtmlWin -> WriteCustomization(m_Config, m_ConfigRoot); - } - m_Frame = NULL; - - event.Skip(); -} - - - -void wxHtmlHelpController::OnSearch(wxCommandEvent& event) -{ - wxString sr = m_SearchText -> GetLineText(0); - - if (sr != wxEmptyString) KeywordSearch(sr); -} - - - -BEGIN_EVENT_TABLE(wxHtmlHelpController, wxEvtHandler) - EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_FORWARD, wxHtmlHelpController::OnToolbar) - EVT_TREE_SEL_CHANGED(wxID_HTML_TREECTRL, wxHtmlHelpController::OnContentsSel) - EVT_LISTBOX(wxID_HTML_INDEXLIST, wxHtmlHelpController::OnIndexSel) - EVT_LISTBOX(wxID_HTML_SEARCHLIST, wxHtmlHelpController::OnSearchSel) - EVT_CLOSE(wxHtmlHelpController::OnCloseWindow) - EVT_BUTTON(wxID_HTML_SEARCHBUTTON, wxHtmlHelpController::OnSearch) - EVT_TEXT_ENTER(wxID_HTML_SEARCHTEXT, wxHtmlHelpController::OnSearch) -END_EVENT_TABLE() - - - -#endif - diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 4cec1c5cd1..65066aeddc 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -15,7 +15,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -69,11 +69,13 @@ void wxHtmlParser::DoneParser() -#define wxHTML_MAX_BUFLEN 1024 void wxHtmlParser::DoParsing(int begin_pos, int end_pos) { - char temp[wxHTML_BUFLEN], c; + if (end_pos <= begin_pos) return; + + char c; + char *temp = new char[end_pos - begin_pos + 1]; int i; int templen; @@ -86,11 +88,6 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos) // continue building word: if (c != '<') { temp[templen++] = c; - if (templen == wxHTML_BUFLEN-1) { - temp[templen] = 0; - AddText(temp); - templen = 0; - } i++; } @@ -112,6 +109,7 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos) temp[templen] = 0; AddText(temp); } + delete[] temp; } diff --git a/src/html/htmltag.cpp b/src/html/htmltag.cpp index 454ccafcaf..666e5e8997 100644 --- a/src/html/htmltag.cpp +++ b/src/html/htmltag.cpp @@ -59,7 +59,9 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source) tg = m_CacheSize++; m_Cache[tg].Key = stpos = pos++; dummy[0] = 0; i = 0; - while ((src[pos] != wxT('>')) && (src[pos] != wxT(' '))) { + while (src[pos] != wxT('>') && + src[pos] != wxT(' ') && src[pos] != wxT('\r') && + src[pos] != wxT('\n') && src[pos] != wxT('\t')) { dummy[i] = src[pos++]; if ((dummy[i] >= wxT('a')) && (dummy[i] <= wxT('z'))) dummy[i] -= (wxT('a') - wxT('A')); i++; @@ -125,30 +127,54 @@ wxHtmlTag::wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCac // fill-in name, params and begin pos: m_Name = m_Params = wxEmptyString; i = pos+1; - if (source[i] == '/') {m_Ending = TRUE; i++;} + if (source[i] == '/') { m_Ending = TRUE; i++; } else m_Ending = FALSE; - while ((i < end_pos) && ((c = source[i++]) != ' ') && (c != '>')) { + // find tag's name and convert it to uppercase: + while ((i < end_pos) && + ((c = source[i++]) != ' ' && c != '\r' && c != '\n' && c != '\t' && + c != '>')) + { if ((c >= 'a') && (c <= 'z')) c -= ('a' - 'A'); m_Name += c; } + // if the tag has parameters, read them and "normalize" them, + // i.e. convert to uppercase, replace whitespaces by spaces and + // remove whitespaces around '=': if (source[i-1] != '>') - while ((i < end_pos) && ((c = source[i++]) != '>')) { + while ((i < end_pos) && ((c = source[i++]) != '>')) + { if ((c >= 'a') && (c <= 'z')) c -= ('a' - 'A'); + if (c == '\r' || c == '\n' || c == '\t') c = ' '; // make future parsing a bit simpler m_Params += c; - if (c == '"') { + if (c == '"') + { + // remove spaces around the '=' character: + if (m_Params.Length() > 1 && + m_Params[m_Params.Length()-2] == ' ') + { + m_Params.RemoveLast(); + while (m_Params.Length() > 0 && m_Params.Last() == ' ') + m_Params.RemoveLast(); + m_Params += '"'; + } + while ((i < end_pos) && (source[i++] == ' ')) {} + if (i < end_pos) i--; + + // ...and copy the value to m_Params: while ((i < end_pos) && ((c = source[i++]) != '"')) m_Params += c; m_Params += c; } - else if (c == '\'') { + else if (c == '\'') + { while ((i < end_pos) && ((c = source[i++]) != '\'')) m_Params += c; m_Params += c; } } m_Begin = i; - cache -> QueryTag(pos, &m_End1, &m_End2); + cache->QueryTag(pos, &m_End1, &m_End2); if (m_End1 > end_pos) m_End1 = end_pos; if (m_End2 > end_pos) m_End2 = end_pos; } @@ -159,13 +185,14 @@ bool wxHtmlTag::HasParam(const wxString& par) const { const wxChar *st = m_Params, *p = par; const wxChar *st2, *p2; + const wxChar invalid = wxT(1); if (*st == 0) return FALSE; if (*p == 0) return FALSE; for (st2 = st, p2 = p; ; st2++) { - if (*p2 == 0) return TRUE; + if (*p2 == 0 && (*st2 == wxT('=') || *st2 == wxT(' '))) return TRUE; if (*st2 == 0) return FALSE; - if (*p2 != *st2) p2 = p; + if (*p2 != *st2) p2 = &invalid; if (*p2 == *st2) p2++; if (*st2 == ' ') p2 = p; else if (*st2 == '=') { @@ -188,27 +215,29 @@ wxString wxHtmlTag::GetParam(const wxString& par, bool with_commas) const { const wxChar *st = m_Params, *p = par; const wxChar *st2, *p2; + const wxChar invalid = wxT(1); bool comma; char comma_char; if (*st == 0) return ""; if (*p == 0) return ""; for (st2 = st, p2 = p; ; st2++) { - if (*p2 == 0) { // found + if (*p2 == 0 && (*st2 == wxT('=') || *st2 == wxT(' '))) { // found + if (*st2 == wxT(' ')) return wxEmptyString; wxString fnd = ""; st2++; // '=' character comma = FALSE; - comma_char = '\0'; + comma_char = '\0'; if (!with_commas && (*(st2) == '"')) { - st2++; - comma = TRUE; - comma_char = '"'; - } - else if (!with_commas && (*(st2) == '\'')) { - st2++; - comma = TRUE; - comma_char = '\''; - } + st2++; + comma = TRUE; + comma_char = '"'; + } + else if (!with_commas && (*(st2) == '\'')) { + st2++; + comma = TRUE; + comma_char = '\''; + } while (*st2 != 0) { if (comma && *st2 == comma_char) comma = FALSE; else if ((*st2 == ' ') && (!comma)) break; @@ -218,7 +247,7 @@ wxString wxHtmlTag::GetParam(const wxString& par, bool with_commas) const return fnd; } if (*st2 == 0) return ""; - if (*p2 != *st2) p2 = p; + if (*p2 != *st2) p2 = &invalid; if (*p2 == *st2) p2++; if (*st2 == ' ') p2 = p; else if (*st2 == '=') { diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index e8f244474f..a04bf5de74 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -15,7 +15,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -26,7 +26,6 @@ #endif #include "wx/html/htmlwin.h" -#include "wx/html/forcelnk.h" #include "wx/log.h" @@ -41,7 +40,7 @@ WX_DEFINE_OBJARRAY(HtmlHistoryArray) wxHtmlWindow::wxHtmlWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) : wxScrolledWindow(parent, id, pos, size, wxVSCROLL | wxHSCROLL, name) + long style, const wxString& name) : wxScrolledWindow(parent, id, pos, size, style | wxVSCROLL | wxHSCROLL, name) { m_tmpMouseMoved = FALSE; m_tmpLastLink = NULL; @@ -172,7 +171,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location) if (f == NULL) { wxString err; - wxLogError(_("Unable to open requested HTML document: %s"), location.mb_str()); + wxLogError(_("Unable to open requested HTML document: %s"), location.c_str()); m_tmpCanDrawLocks--; SetCursor(*wxSTANDARD_CURSOR); @@ -248,7 +247,7 @@ bool wxHtmlWindow::ScrollToAnchor(const wxString& anchor) const wxHtmlCell *c = m_Cell -> Find(wxHTML_COND_ISANCHOR, &anchor); if (!c) { - wxLogWarning(_("HTML anchor %s does not exist."), anchor.mb_str()); + wxLogWarning(_("HTML anchor %s does not exist."), anchor.c_str()); return FALSE; } else { @@ -282,7 +281,7 @@ void wxHtmlWindow::CreateLayout() if (!m_Cell) return; - if (m_Style == wxHW_SCROLLBAR_NEVER) { + if (m_Style & wxHW_SCROLLBAR_NEVER) { SetScrollbars(wxHTML_SCROLL_STEP, 1, m_Cell -> GetWidth() / wxHTML_SCROLL_STEP, 0); // always off GetClientSize(&ClientWidth, &ClientHeight); m_Cell -> Layout(ClientWidth); @@ -483,6 +482,7 @@ void wxHtmlWindow::OnSize(wxSizeEvent& event) { wxScrolledWindow::OnSize(event); CreateLayout(); + Refresh(); } @@ -571,20 +571,10 @@ public: IMPLEMENT_DYNAMIC_CLASS(wxHtmlWinModule, wxModule) - - -///// default mod handlers are forced there: - -FORCE_LINK(m_layout) -FORCE_LINK(m_fonts) -FORCE_LINK(m_image) -FORCE_LINK(m_list) -FORCE_LINK(m_dflist) -FORCE_LINK(m_pre) -FORCE_LINK(m_hline) -FORCE_LINK(m_links) -FORCE_LINK(m_tables) -FORCE_LINK(m_meta) +// This hack forces the linker to always link in m_* files +// (wxHTML doesn't work without handlers from these files) +#include "wx/html/forcelnk.h" +FORCE_WXHTML_MODULES() #endif diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index ed299f645d..d54d6404dd 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -26,7 +26,7 @@ #include "wx/wx.h" #endif -#if wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE +#if wxUSE_HTML && wxUSE_PRINTING_ARCHITECTURE && wxUSE_STREAMS #include "wx/print.h" #include "wx/printdlg.h" @@ -191,7 +191,7 @@ bool wxHtmlPrintout::OnBeginDocument(int startPage, int endPage) /* prepare headers/footers renderer: */ m_RendererHdr -> SetDC(GetDC(), (double)ppiPrinterY / (double)ppiScreenY); - m_RendererHdr -> SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginTop)), + m_RendererHdr -> SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginRight)), (int) (ppmm_v * (mm_h - m_MarginTop - m_MarginBottom))); if (m_Headers[0] != wxEmptyString) { m_RendererHdr -> SetHtmlText(TranslateHeader(m_Headers[0], 1)); @@ -212,7 +212,7 @@ bool wxHtmlPrintout::OnBeginDocument(int startPage, int endPage) /* prepare main renderer: */ m_Renderer -> SetDC(GetDC(), (double)ppiPrinterY / (double)ppiScreenY); - m_Renderer -> SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginTop)), + m_Renderer -> SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginRight)), (int) (ppmm_v * (mm_h - m_MarginTop - m_MarginBottom) - m_FooterHeight - m_HeaderHeight - ((m_HeaderHeight == 0) ? 0 : m_MarginSpace * ppmm_v) - @@ -436,77 +436,83 @@ wxHtmlEasyPrinting::~wxHtmlEasyPrinting() -void wxHtmlEasyPrinting::PreviewFile(const wxString &htmlfile) +bool wxHtmlEasyPrinting::PreviewFile(const wxString &htmlfile) { wxHtmlPrintout *p1 = CreatePrintout(); p1 -> SetHtmlFile(htmlfile); wxHtmlPrintout *p2 = CreatePrintout(); p2 -> SetHtmlFile(htmlfile); - DoPreview(p1, p2); + return DoPreview(p1, p2); } -void wxHtmlEasyPrinting::PreviewText(const wxString &htmltext, const wxString &basepath) +bool wxHtmlEasyPrinting::PreviewText(const wxString &htmltext, const wxString &basepath) { wxHtmlPrintout *p1 = CreatePrintout(); p1 -> SetHtmlText(htmltext, basepath, TRUE); wxHtmlPrintout *p2 = CreatePrintout(); p2 -> SetHtmlText(htmltext, basepath, TRUE); - DoPreview(p1, p2); + return DoPreview(p1, p2); } -void wxHtmlEasyPrinting::PrintFile(const wxString &htmlfile) +bool wxHtmlEasyPrinting::PrintFile(const wxString &htmlfile) { wxHtmlPrintout *p = CreatePrintout(); p -> SetHtmlFile(htmlfile); - DoPrint(p); + bool ret = DoPrint(p); + delete p; + return ret; } -void wxHtmlEasyPrinting::PrintText(const wxString &htmltext, const wxString &basepath) +bool wxHtmlEasyPrinting::PrintText(const wxString &htmltext, const wxString &basepath) { wxHtmlPrintout *p = CreatePrintout(); p -> SetHtmlText(htmltext, basepath, TRUE); - DoPrint(p); + bool ret = DoPrint(p); + delete p; + return ret; } -void wxHtmlEasyPrinting::DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2) +bool wxHtmlEasyPrinting::DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2) { // Pass two printout objects: for preview, and possible printing. wxPrintDialogData printDialogData(*m_PrintData); wxPrintPreview *preview = new wxPrintPreview(printout1, printout2, &printDialogData); if (!preview -> Ok()) { delete preview; - wxMessageBox(_("There was a problem previewing.\nPerhaps your current printer is not set correctly?"), _("Previewing"), wxOK); - } - - else { - wxPreviewFrame *frame = new wxPreviewFrame(preview, m_Frame, - m_Name + _(" Preview"), - wxPoint(100, 100), wxSize(650, 500)); - frame -> Centre(wxBOTH); - frame -> Initialize(); - frame -> Show(TRUE); + return FALSE; } + + wxPreviewFrame *frame = new wxPreviewFrame(preview, m_Frame, + m_Name + _(" Preview"), + wxPoint(100, 100), wxSize(650, 500)); + frame -> Centre(wxBOTH); + frame -> Initialize(); + frame -> Show(TRUE); + return TRUE; } -void wxHtmlEasyPrinting::DoPrint(wxHtmlPrintout *printout) +bool wxHtmlEasyPrinting::DoPrint(wxHtmlPrintout *printout) { wxPrintDialogData printDialogData(*m_PrintData); wxPrinter printer(&printDialogData); if (!printer.Print(m_Frame, printout, TRUE)) - wxMessageBox(_("There was a problem printing.\nPerhaps your current printer is not set correctly?"), _("Printing"), wxOK); - else - (*m_PrintData) = printer.GetPrintDialogData().GetPrintData(); + { + return FALSE; + } + + (*m_PrintData) = printer.GetPrintDialogData().GetPrintData(); + return TRUE; } @@ -574,6 +580,10 @@ wxHtmlPrintout *wxHtmlEasyPrinting::CreatePrintout() return p; } +// This hack forces the linker to always link in m_* files +// (wxHTML doesn't work without handlers from these files) +#include "wx/html/forcelnk.h" +FORCE_WXHTML_MODULES() #endif // wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE diff --git a/src/html/m_dflist.cpp b/src/html/m_dflist.cpp index fd13d8040a..3625e1adfb 100644 --- a/src/html/m_dflist.cpp +++ b/src/html/m_dflist.cpp @@ -15,7 +15,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop diff --git a/src/html/m_fonts.cpp b/src/html/m_fonts.cpp index 161cbd450c..4f7471622e 100644 --- a/src/html/m_fonts.cpp +++ b/src/html/m_fonts.cpp @@ -14,7 +14,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop diff --git a/src/html/m_hline.cpp b/src/html/m_hline.cpp index fdb5a1fa48..9ff0fd8831 100644 --- a/src/html/m_hline.cpp +++ b/src/html/m_hline.cpp @@ -15,7 +15,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop #endif @@ -43,7 +43,7 @@ class wxHtmlLineCell : public wxHtmlCell public: wxHtmlLineCell(int size) : wxHtmlCell() {m_Height = size;} void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2); - void Layout(int w) {m_Width = w; if (m_Next) m_Next -> Layout(w);} + void Layout(int w) {m_Width = w; wxHtmlCell::Layout(w);} }; @@ -54,7 +54,6 @@ void wxHtmlLineCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) dc.SetBrush(mybrush); dc.SetPen(mypen); dc.DrawRectangle(x + m_PosX, y + m_PosY, m_Width, m_Height); - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index 06a78d6b82..388a8b6303 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -14,7 +14,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -246,6 +246,7 @@ class wxHtmlImageCell : public wxHtmlCell { public: wxBitmap *m_Image; + double m_Scale; wxHtmlImageMapCell *m_ImageMap; wxString m_MapName; @@ -265,29 +266,33 @@ class wxHtmlImageCell : public wxHtmlCell wxHtmlImageCell::wxHtmlImageCell(wxFSFile *input, int w, int h, double scale, int align, wxString mapname) : wxHtmlCell() { wxImage *img; - int ww, hh; - wxInputStream *s = input -> GetStream(); - + int ww, hh, bw, bh; + wxInputStream *s = input->GetStream(); + + m_Scale = scale; img = new wxImage(*s, wxBITMAP_TYPE_ANY); - m_Image = NULL; - if (img && (img -> Ok())) { - ww = img -> GetWidth(); - hh = img -> GetHeight(); - if (w != -1) m_Width = w; else m_Width = ww; - if (h != -1) m_Height = h; else m_Height = hh; + if (img && (img->Ok())) + { + ww = img->GetWidth(); + hh = img->GetHeight(); + if (w != -1) bw = w; else bw = ww; + if (h != -1) bh = h; else bh = hh; - m_Width = (int)(scale * (double)m_Width); - m_Height = (int)(scale * (double)m_Height); + m_Width = (int)(scale * (double)bw); + m_Height = (int)(scale * (double)bh); - if ((m_Width != ww) || (m_Height != hh)) { - wxImage img2 = img -> Scale(m_Width, m_Height); + if ((bw != ww) || (bh != hh)) + { + wxImage img2 = img->Scale(bw, bh); m_Image = new wxBitmap(img2.ConvertToBitmap()); - } else - m_Image = new wxBitmap(img -> ConvertToBitmap()); + } + else + m_Image = new wxBitmap(img->ConvertToBitmap()); delete img; } - switch (align) { + switch (align) + { case wxHTML_ALIGN_TOP : m_Descent = m_Height; break; @@ -310,9 +315,16 @@ wxHtmlImageCell::wxHtmlImageCell(wxFSFile *input, int w, int h, double scale, in void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) { if (m_Image) -// dc.DrawBitmap(*m_Image, x + m_PosX, y + m_PosY, (m_Image->GetMask() != (wxMask*) 0)); - dc.DrawBitmap(*m_Image, x + m_PosX, y + m_PosY, TRUE); - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); + { + double us_x, us_y; + dc.GetUserScale(&us_x, &us_y); + dc.SetUserScale(us_x * m_Scale, us_y * m_Scale); + +// dc.DrawBitmap(*m_Image, x + m_PosX, y + m_PosY, (m_Image->GetMask() != (wxMask*) 0)); + dc.DrawBitmap(*m_Image, (x + m_PosX) / m_Scale, + (y + m_PosY) / m_Scale, TRUE); + dc.SetUserScale(us_x, us_y); + } } wxHtmlLinkInfo *wxHtmlImageCell::GetLink( int x, int y ) const diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp index df2615cf1d..08157beaba 100644 --- a/src/html/m_layout.cpp +++ b/src/html/m_layout.cpp @@ -14,7 +14,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop #endif diff --git a/src/html/m_links.cpp b/src/html/m_links.cpp index a20252dfd1..e21c9e2f69 100644 --- a/src/html/m_links.cpp +++ b/src/html/m_links.cpp @@ -14,7 +14,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop diff --git a/src/html/m_list.cpp b/src/html/m_list.cpp index 58425f35c2..10de5114f0 100644 --- a/src/html/m_list.cpp +++ b/src/html/m_list.cpp @@ -14,7 +14,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -59,7 +59,6 @@ void wxHtmlListmarkCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) { dc.SetBrush(m_Brush); dc.DrawEllipse(x + m_PosX + m_Width / 4, y + m_PosY + m_Height / 4, m_Width / 2, m_Width / 2); - wxHtmlCell::Draw(dc, x, y, view_y1, view_y2); } diff --git a/src/html/m_meta.cpp b/src/html/m_meta.cpp index 7c0c379b88..bcb95e5840 100644 --- a/src/html/m_meta.cpp +++ b/src/html/m_meta.cpp @@ -15,7 +15,7 @@ #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index b7f283a224..df51c4246a 100644 --- a/src/html/m_pre.cpp +++ b/src/html/m_pre.cpp @@ -14,7 +14,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop #endif diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp index 24a2d5c151..27be34a21b 100644 --- a/src/html/m_tables.cpp +++ b/src/html/m_tables.cpp @@ -14,7 +14,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop #endif @@ -141,7 +141,8 @@ wxHtmlTableCell::wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& t wxHtmlTableCell::~wxHtmlTableCell() { if (m_ColsInfo) free(m_ColsInfo); - if (m_CellInfo) { + if (m_CellInfo) + { for (int i = 0; i < m_NumRows; i++) free(m_CellInfo[i]); free(m_CellInfo); @@ -154,14 +155,16 @@ void wxHtmlTableCell::ReallocCols(int cols) { int i,j; - for (i = 0; i < m_NumRows; i++) { + for (i = 0; i < m_NumRows; i++) + { m_CellInfo[i] = (cellStruct*) realloc(m_CellInfo[i], sizeof(cellStruct) * cols); for (j = m_NumCols; j < cols; j++) m_CellInfo[i][j].flag = cellFree; } m_ColsInfo = (colStruct*) realloc(m_ColsInfo, sizeof(colStruct) * cols); - for (j = m_NumCols; j < cols; j++) { + for (j = m_NumCols; j < cols; j++) + { m_ColsInfo[j].width = 0; m_ColsInfo[j].units = wxHTML_UNITS_PERCENT; } @@ -206,9 +209,11 @@ void wxHtmlTableCell::AddRow(const wxHtmlTag& tag) void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag) { - do { + do + { m_ActualCol++; } while ((m_ActualCol < m_NumCols) && (m_CellInfo[m_ActualRow][m_ActualCol].flag != cellFree)); + if (m_ActualCol > m_NumCols - 1) ReallocCols(m_ActualCol + 1); @@ -225,14 +230,17 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag) // width: { - if (tag.HasParam("WIDTH")) { + if (tag.HasParam("WIDTH")) + { wxString wd = tag.GetParam("WIDTH"); - if (wd[wd.Length()-1] == '%') { + if (wd[wd.Length()-1] == '%') + { wxSscanf(wd.c_str(), wxT("%i%%"), &m_ColsInfo[c].width); m_ColsInfo[c].units = wxHTML_UNITS_PERCENT; } - else { + else + { wxSscanf(wd.c_str(), wxT("%i"), &m_ColsInfo[c].width); m_ColsInfo[c].width = (int)(m_PixelScale * (double)m_ColsInfo[c].width); m_ColsInfo[c].units = wxHTML_UNITS_PIXELS; @@ -245,7 +253,8 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag) { if (tag.HasParam(wxT("COLSPAN"))) tag.ScanParam(wxT("COLSPAN"), wxT("%i"), &m_CellInfo[r][c].colspan); if (tag.HasParam(wxT("ROWSPAN"))) tag.ScanParam(wxT("ROWSPAN"), wxT("%i"), &m_CellInfo[r][c].rowspan); - if ((m_CellInfo[r][c].colspan != 1) || (m_CellInfo[r][c].rowspan != 1)) { + if ((m_CellInfo[r][c].colspan != 1) || (m_CellInfo[r][c].rowspan != 1)) + { int i, j; if (r + m_CellInfo[r][c].rowspan > m_NumRows) ReallocRows(r + m_CellInfo[r][c].rowspan); @@ -261,13 +270,14 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag) { int bk = m_rBkg; if (tag.HasParam(wxT("BGCOLOR"))) tag.ScanParam(wxT("BGCOLOR"), wxT("#%lX"), &bk); - if (bk != -1) { + if (bk != -1) + { wxColour clr = wxColour((bk & 0xFF0000) >> 16 , (bk & 0x00FF00) >> 8, (bk & 0x0000FF)); - cell -> SetBackgroundColour(clr); + cell->SetBackgroundColour(clr); } } if (m_HasBorders) - cell -> SetBorder(TABLE_BORDER_CLR_2, TABLE_BORDER_CLR_1); + cell->SetBorder(TABLE_BORDER_CLR_2, TABLE_BORDER_CLR_1); // vertical alignment: { @@ -279,7 +289,7 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag) else m_CellInfo[r][c].valign = wxHTML_ALIGN_CENTER; } - cell -> SetIndent(m_Padding, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS); + cell->SetIndent(m_Padding, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS); } @@ -294,11 +304,13 @@ void wxHtmlTableCell::Layout(int w) */ - if (m_WidthFloatUnits == wxHTML_UNITS_PERCENT) { + if (m_WidthFloatUnits == wxHTML_UNITS_PERCENT) + { if (m_WidthFloat < 0) m_Width = (100 + m_WidthFloat) * w / 100; else m_Width = m_WidthFloat * w / 100; } - else { + else + { if (m_WidthFloat < 0) m_Width = w + m_WidthFloat; else m_Width = m_WidthFloat; } @@ -340,7 +352,8 @@ void wxHtmlTableCell::Layout(int w) /* 2. compute positions of columns: */ { int wpos = m_Spacing; - for (int i = 0; i < m_NumCols; i++) { + for (int i = 0; i < m_NumCols; i++) + { m_ColsInfo[i].leftpos = wpos; wpos += m_ColsInfo[i].pixwidth + m_Spacing; } @@ -354,10 +367,11 @@ void wxHtmlTableCell::Layout(int w) int fullwid; wxHtmlContainerCell *actcell; - for (actrow = 0; actrow <= m_NumRows; actrow++) ypos[actrow] = m_Spacing; - - for (actrow = 0; actrow < m_NumRows; actrow++) { - + ypos[0] = m_Spacing; + for (actrow = 1; actrow <= m_NumRows; actrow++) ypos[actrow] = -1; + for (actrow = 0; actrow < m_NumRows; actrow++) + { + if (ypos[actrow] == -1) ypos[actrow] = ypos[actrow-1]; // 3a. sub-layout and detect max height: for (actcol = 0; actcol < m_NumCols; actcol++) { @@ -367,34 +381,33 @@ void wxHtmlTableCell::Layout(int w) for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++) fullwid += m_ColsInfo[i].pixwidth; fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing; - actcell -> SetMinHeight(m_CellInfo[actrow][actcol].minheight, m_CellInfo[actrow][actcol].valign); - actcell -> Layout(fullwid); + actcell->SetMinHeight(m_CellInfo[actrow][actcol].minheight, m_CellInfo[actrow][actcol].valign); + actcell->Layout(fullwid); - if (ypos[actrow] + actcell -> GetHeight() + m_CellInfo[actrow][actcol].rowspan * m_Spacing > ypos[actrow + m_CellInfo[actrow][actcol].rowspan]) + if (ypos[actrow] + actcell->GetHeight() + m_CellInfo[actrow][actcol].rowspan * m_Spacing > ypos[actrow + m_CellInfo[actrow][actcol].rowspan]) ypos[actrow + m_CellInfo[actrow][actcol].rowspan] = - ypos[actrow] + actcell -> GetHeight() + m_CellInfo[actrow][actcol].rowspan * m_Spacing; + ypos[actrow] + actcell->GetHeight() + m_CellInfo[actrow][actcol].rowspan * m_Spacing; } } - - for (actrow = 0; actrow < m_NumRows; actrow++) { - + for (actrow = 0; actrow < m_NumRows; actrow++) + { // 3b. place cells in row & let'em all have same height: - for (actcol = 0; actcol < m_NumCols; actcol++) { + for (actcol = 0; actcol < m_NumCols; actcol++) + { if (m_CellInfo[actrow][actcol].flag != cellUsed) continue; actcell = m_CellInfo[actrow][actcol].cont; - actcell -> SetMinHeight( + actcell->SetMinHeight( ypos[actrow + m_CellInfo[actrow][actcol].rowspan] - ypos[actrow] - m_Spacing, m_CellInfo[actrow][actcol].valign); fullwid = 0; for (int i = actcol; i < m_CellInfo[actrow][actcol].colspan + actcol; i++) fullwid += m_ColsInfo[i].pixwidth; fullwid += (m_CellInfo[actrow][actcol].colspan - 1) * m_Spacing; - actcell -> Layout(fullwid); - actcell -> SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]); + actcell->Layout(fullwid); + actcell->SetPos(m_ColsInfo[actcol].leftpos, ypos[actrow]); } - } m_Height = ypos[m_NumRows]; delete[] ypos; @@ -431,47 +444,52 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") wxHtmlContainerCell *c; // new table started, backup upper-level table (if any) and create new: - if (tag.GetName() == wxT("TABLE")) { + if (tag.GetName() == wxT("TABLE")) + { wxHtmlTableCell *oldt = m_Table; wxHtmlContainerCell *oldcont; int m_OldAlign; - oldcont = c = m_WParser -> OpenContainer(); + oldcont = c = m_WParser->OpenContainer(); - c -> SetWidthFloat(tag, m_WParser -> GetPixelScale()); - m_Table = new wxHtmlTableCell(c, tag, m_WParser -> GetPixelScale()); - m_OldAlign = m_WParser -> GetAlign(); + c->SetWidthFloat(tag, m_WParser->GetPixelScale()); + m_Table = new wxHtmlTableCell(c, tag, m_WParser->GetPixelScale()); + m_OldAlign = m_WParser->GetAlign(); m_tAlign = wxEmptyString; if (tag.HasParam(wxT("ALIGN"))) m_tAlign = tag.GetParam(wxT("ALIGN")); ParseInner(tag); - m_WParser -> SetAlign(m_OldAlign); - m_WParser -> SetContainer(oldcont); - m_WParser -> CloseContainer(); + m_WParser->SetAlign(m_OldAlign); + m_WParser->SetContainer(oldcont); + m_WParser->CloseContainer(); m_Table = oldt; return TRUE; } - else if (m_Table && !tag.IsEnding()) { + else if (m_Table && !tag.IsEnding()) + { // new row in table - if (tag.GetName() == wxT("TR")) { - m_Table -> AddRow(tag); + if (tag.GetName() == wxT("TR")) + { + m_Table->AddRow(tag); m_rAlign = m_tAlign; if (tag.HasParam(wxT("ALIGN"))) m_rAlign = tag.GetParam(wxT("ALIGN")); } // new cell - else { - m_WParser -> SetAlign(m_OldAlign); - c = m_WParser -> SetContainer(new wxHtmlContainerCell(m_Table)); - m_Table -> AddCell(c, tag); + else + { + m_WParser->SetAlign(m_OldAlign); + c = m_WParser->SetContainer(new wxHtmlContainerCell(m_Table)); + m_Table->AddCell(c, tag); - m_WParser -> OpenContainer(); + m_WParser->OpenContainer(); - if (tag.GetName() == wxT("TH")) /*header style*/ { - m_WParser -> SetAlign(wxHTML_ALIGN_CENTER); + if (tag.GetName() == wxT("TH")) /*header style*/ + { + m_WParser->SetAlign(wxHTML_ALIGN_CENTER); } { @@ -480,10 +498,10 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") als = m_rAlign; if (tag.HasParam(wxT("ALIGN"))) als = tag.GetParam(wxT("ALIGN")); als.MakeUpper(); - if (als == wxT("RIGHT")) m_WParser -> SetAlign(wxHTML_ALIGN_RIGHT); - else if (als == wxT("CENTER")) m_WParser -> SetAlign(wxHTML_ALIGN_CENTER); + if (als == wxT("RIGHT")) m_WParser->SetAlign(wxHTML_ALIGN_RIGHT); + else if (als == wxT("CENTER")) m_WParser->SetAlign(wxHTML_ALIGN_CENTER); } - m_WParser -> OpenContainer(); + m_WParser->OpenContainer(); } } return FALSE; diff --git a/src/html/search.cpp b/src/html/search.cpp deleted file mode 100644 index bd7b156944..0000000000 --- a/src/html/search.cpp +++ /dev/null @@ -1,74 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: search.cpp -// Purpose: search engine -// Author: Vaclav Slavik -// RCS-ID: $Id$ -// Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWindows Licence -///////////////////////////////////////////////////////////////////////////// - - - -#ifdef __GNUG__ -#pragma implementation -#endif - -#include "wx/wxprec.h" - -#include "wx/defs.h" -#if wxUSE_HTML - -#ifdef __BORDLANDC__ -#pragma hdrstop -#endif - -#ifndef WXPRECOMP -#include -#endif - -#include "wx/html/helpdata.h" - - - -//-------------------------------------------------------------------------------- -// wxSearchEngine -//-------------------------------------------------------------------------------- - -void wxSearchEngine::LookFor(const wxString& keyword) -{ - if (m_Keyword) delete[] m_Keyword; - m_Keyword = new wxChar[keyword.Length() + 1]; - wxStrcpy(m_Keyword, keyword.c_str()); - for (int i = wxStrlen(m_Keyword) - 1; i >= 0; i--) - if ((m_Keyword[i] >= wxT('A')) && (m_Keyword[i] <= wxT('Z'))) - m_Keyword[i] += wxT('a') - wxT('A'); -} - - - -bool wxSearchEngine::Scan(wxInputStream *stream) -{ - wxASSERT_MSG(m_Keyword != NULL, _("wxSearchEngine::LookFor must be called before scanning!")); - - int i, j; - int lng = stream ->GetSize(); - int wrd = wxStrlen(m_Keyword); - bool found = FALSE; - char *buf = new char[lng + 1]; - stream -> Read(buf, lng); - buf[lng] = 0; - - for (i = 0; i < lng; i++) - if ((buf[i] >= 'A') && (buf[i] <= 'Z')) buf[i] += 'a' - 'A'; - - for (i = 0; i < lng - wrd; i++) { - j = 0; - while ((j < wrd) && (buf[i + j] == m_Keyword[j])) j++; - if (j == wrd) {found = TRUE; break;} - } - - delete[] buf; - return found; -} - -#endif diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index f358cf14c5..3a70715d98 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -15,7 +15,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -103,6 +103,13 @@ void wxHtmlWinParser::AddModule(wxHtmlTagsModule *module) +void wxHtmlWinParser::RemoveModule(wxHtmlTagsModule *module) +{ + m_Modules.DeleteObject(module); +} + + + void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) { int i, j, k, l, m; @@ -178,14 +185,25 @@ wxObject* wxHtmlWinParser::GetProduct() } +static char *gs_htmlBuf = NULL; +static int gs_htmlBufLen = 0; void wxHtmlWinParser::AddText(const char* txt) { wxHtmlCell *c; int i = 0, x, lng = strlen(txt); - char temp[wxHTML_BUFLEN]; + char *temp; register char d; int templen = 0; + + if (lng+1 > gs_htmlBufLen) + { + gs_htmlBufLen = wxMax(lng+1, wxHTML_BUFLEN); + if (gs_htmlBuf) + delete [] gs_htmlBuf; + gs_htmlBuf = new char[gs_htmlBufLen]; + } + temp = gs_htmlBuf; if (m_tmpLastWasSpace) { while ((i < lng) && ((txt[i] == '\n') || (txt[i] == '\r') || (txt[i] == ' ') || (txt[i] == '\t'))) i++; @@ -355,7 +373,7 @@ void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc) wxCONVERT_SUBSTITUTE)) { // total failture :-( wxLogError(_("Failed to display HTML document in %s encoding"), - wxFontMapper::GetEncodingName(enc).mb_str()); + wxFontMapper::GetEncodingName(enc).c_str()); m_InputEnc = m_OutputEnc = wxFONTENCODING_DEFAULT; delete m_EncConv; m_EncConv = NULL; @@ -392,6 +410,9 @@ bool wxHtmlTagsModule::OnInit() void wxHtmlTagsModule::OnExit() { + if (gs_htmlBuf) + delete [] gs_htmlBuf; + wxHtmlWinParser::RemoveModule(this); } #endif diff --git a/src/jpeg/jpeg.dsp b/src/jpeg/JpegVC.dsp similarity index 100% rename from src/jpeg/jpeg.dsp rename to src/jpeg/JpegVC.dsp diff --git a/src/jpeg/jpeg.dsw b/src/jpeg/JpegVC.dsw similarity index 90% rename from src/jpeg/jpeg.dsw rename to src/jpeg/JpegVC.dsw index eb703255ee..31caaf9876 100644 --- a/src/jpeg/jpeg.dsw +++ b/src/jpeg/JpegVC.dsw @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "jpeg"=.\jpeg.dsp - Package Owner=<4> +Project: "jpeg"=.\JpegVC.dsp - Package Owner=<4> Package=<5> {{{ diff --git a/src/jpeg/jconfig.h b/src/jpeg/jconfig.h index e3c94a1717..42d94427c6 100644 --- a/src/jpeg/jconfig.h +++ b/src/jpeg/jconfig.h @@ -56,6 +56,8 @@ /* #define INLINE __inline__ */ #if defined(__VISAGECPP__) && (__IBMCPP__ >= 400 || __IBMC__ >= 400) #define INLINE +#elif defined(__WATCOMC__) +#define INLINE #else #define INLINE inline #endif diff --git a/src/jpeg/jmorecfg.h b/src/jpeg/jmorecfg.h index 5e9510042d..2d86049094 100644 --- a/src/jpeg/jmorecfg.h +++ b/src/jpeg/jmorecfg.h @@ -155,17 +155,36 @@ typedef unsigned int UINT16; typedef short INT16; #endif +#if defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || defined( __CYGWIN__ ) +#include +#else +#undef wxCHECK_W32API_VERSION +#define wxCHECK_W32API_VERSION(maj, min) (0) +#endif + /* INT32 must hold at least signed 32-bit values. */ -/* Modified JACS 23/4/99. 1200 means VC++ 6 */ -#if !defined(XMD_H) && !(_MSC_VER >= 1200) && !(__BORLANDC__ >= 0x550) /* X11/xmd.h correctly defines INT32 */ +/* you may define INT32_DEFINED if it is already defined somewhere */ +#ifndef INT32_DEFINED +#ifdef XMD_H +/* X11/xmd.h correctly defines INT32 */ +#define INT32_DEFINED +#elif (_MSC_VER >= 1200) || (__BORLANDC__ >= 0x550) || \ + wxCHECK_W32API_VERSION( 0, 5 ) || \ + ((defined(__MINGW32__) || defined(__CYGWIN__)) \ + && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>95)))) + +/* INT32 is defined in windows.h for these compilers */ +#define INT32_DEFINED +#include +#endif +#endif /* !INT32_DEFINED */ + +#ifndef INT32_DEFINED typedef long INT32; #endif -/* Added JACS 23/4/99, to get INT32 definition */ -#if (_MSC_VER >= 1200) || (__BORLANDC__ >= 0x550) -#include -#endif +#undef INT32_DEFINED /* Datatype used for image dimensions. The JPEG standard only supports * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore diff --git a/src/jpeg/makefile.vc b/src/jpeg/makefile.vc index b1fcfcb025..d958b65e53 100644 --- a/src/jpeg/makefile.vc +++ b/src/jpeg/makefile.vc @@ -81,6 +81,8 @@ TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj !if "$(FINAL)" == "1" LIBTARGET=..\..\lib\jpeg.lib +!else if "$(FINAL)" == "hybrid" +LIBTARGET=..\..\lib\jpegh.lib !else LIBTARGET=..\..\lib\jpegd.lib !endif @@ -96,7 +98,7 @@ defaulttarget: clean: -erase $(LIBTARGET) -erase *.obj - + # Pull in standard variable definitions !include ..\makelib.vc diff --git a/src/jpeg/makefile.wat b/src/jpeg/makefile.wat index d953e466f8..d1f309c5b3 100644 --- a/src/jpeg/makefile.wat +++ b/src/jpeg/makefile.wat @@ -1,41 +1,22 @@ -# Makefile for Independent JPEG Group's software +#!/binb/wmake.exe +# +# File: makefile.wat +# Author: Julian Smart +# Created: 1998 +# +# Makefile : Builds JPEG library for Watcom C++, WIN32 -# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using -# dos4g extender), OS/2, and Windows NT console mode. -# Thanks to Janos Haide, jhaide@btrvtech.com. +WXDIR = ..\.. +EXTRACPPFLAGS=-i=..\zlib -# Read installation instructions before saying "wmake" !! +!include $(WXDIR)\src\makewat.env -# Uncomment line for desired system -SYSTEM=DOS -#SYSTEM=OS2 -#SYSTEM=NT +WXLIB = $(WXDIR)\lib -# The name of your C compiler: -CC= wcl386 +LIBTARGET = $(WXLIB)\jpeg.lib -# You may need to adjust these cc options: -CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM) -# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -!ifeq SYSTEM DOS -LDFLAGS= -zq -l=dos4g -!else ifeq SYSTEM OS2 -LDFLAGS= -zq -l=os2v2 -!else ifeq SYSTEM NT -LDFLAGS= -zq -l=nt -!endif - -# Put here the object file name for the correct system-dependent memory -# manager file. jmemnobs should work fine for dos4g or OS/2 environment. SYSDEPMEM= jmemnobs.obj -# End of configurable options. - - # source files: JPEG library proper LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c & jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c & @@ -87,147 +68,26 @@ DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj & jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj & jquant1.obj jquant2.obj jdmerge.obj # These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +OBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) # object files for sample applications (excluding library files) COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj & rdswitch.obj cdjpeg.obj DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj & rdcolmap.obj cdjpeg.obj TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj +all: $(OBJECTS) $(LIBTARGET) +$(LIBTARGET) : $(OBJECTS) + %create tmp.lbc + @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i + wlib /b /c /n /p=512 $^@ @tmp.lbc -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe +clean: .SYMBOLIC + -erase *.obj + -erase $(LIBTARGET) + -erase *.pch + -erase *.err + -erase *.lbc -libjpeg.lib: $(LIBOBJECTS) - - del libjpeg.lib - * wlib -n libjpeg.lib $(LIBOBJECTS) +cleanall: clean -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib - -rdjpgcom.exe: rdjpgcom.c - $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c - -wrjpgcom.exe: wrjpgcom.c - $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c - -.c.obj: - $(CC) $(CFLAGS) -c $< - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -clean: .SYMBOLIC - - del *.obj - - del libjpeg.lib - - del cjpeg.exe - - del djpeg.exe - - del jpegtran.exe - - del rdjpgcom.exe - - del wrjpgcom.exe - - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC - - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg -!ifeq SYSTEM DOS - fc /b testimg.ppm testout.ppm - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg -!else - echo n > n.tmp - comp testimg.ppm testout.ppm < n.tmp - comp testimg.bmp testout.bmp < n.tmp - comp testimg.jpg testout.jpg < n.tmp - comp testimg.ppm testoutp.ppm < n.tmp - comp testimgp.jpg testoutp.jpg < n.tmp - comp testorig.jpg testoutt.jpg < n.tmp - del n.tmp -!endif - - -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/src/mac/app.cpp b/src/mac/app.cpp index d5bb4c82d1..094665cdd7 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -751,13 +751,34 @@ void wxExit() } // Yield to other processes +static bool gs_inYield = FALSE; + bool wxYield() { +#ifdef __WXDEBUG__ + if (gs_inYield) + wxFAIL_MSG( wxT("wxYield called recursively" ) ); +#endif + + gs_inYield = TRUE; + // YieldToAnyThread() ; SystemTask() ; + + gs_inYield = FALSE; + return TRUE; } +// Yield to incoming messages; but fail silently if recursion is detected. +bool wxYieldIfNeeded() +{ + if (gs_inYield) + return FALSE; + + return wxYield(); +} + // platform specifics void wxApp::MacSuspend( bool convertClipboard ) diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index d5bb4c82d1..094665cdd7 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -751,13 +751,34 @@ void wxExit() } // Yield to other processes +static bool gs_inYield = FALSE; + bool wxYield() { +#ifdef __WXDEBUG__ + if (gs_inYield) + wxFAIL_MSG( wxT("wxYield called recursively" ) ); +#endif + + gs_inYield = TRUE; + // YieldToAnyThread() ; SystemTask() ; + + gs_inYield = FALSE; + return TRUE; } +// Yield to incoming messages; but fail silently if recursion is detected. +bool wxYieldIfNeeded() +{ + if (gs_inYield) + return FALSE; + + return wxYield(); +} + // platform specifics void wxApp::MacSuspend( bool convertClipboard ) diff --git a/src/make.env.in b/src/make.env.in index e727bacff9..ae8c1586f9 100644 --- a/src/make.env.in +++ b/src/make.env.in @@ -12,7 +12,8 @@ # see comment near LDFLAGS at the end of file EXTRALIBS = @LDFLAGS@ @EXTRA_LIBS@ -LDLIBS = ${top_builddir}/lib/@WX_TARGET_LIBRARY@ $(EXTRALIBS) $(APPEXTRALIBS) +OPENGLLIBS = @OPENGL_LIBS@ +LDLIBS = $(APPEXTRALIBS) ${top_builddir}/lib/@WX_TARGET_LIBRARY@ $(EXTRALIBS) TOOLKIT = @TOOLKIT@ TOOLKITDIR = @TOOLKIT_DIR@ @@ -20,7 +21,7 @@ TOOLKITDIR = @TOOLKIT_DIR@ WXLIB = @WX_LIBRARY_NAME_STATIC@ WXSHLIB = @WX_LIBRARY_NAME_SHARED@ -EXTRADEFS="-DwxINSTALL_PREFIX=\"@prefix@\"" $(APPEXTRADEFS) +EXTRADEFS="-DwxINSTALL_PREFIX=\"@prefix@\"" ########################### VERSION ################################# @@ -30,13 +31,8 @@ WX_RELEASE_NUMBER = @WX_RELEASE_NUMBER@ ########################### Programs ################################# -# C++ compiler -CC = @CXX@ -CCPP = @CXXCPP@ - -# C compiler -CCC = @CC@ -CCCPP = @CPP@ +CXX = @CXX@ +CC = @CC@ # Compiler for lex/yacc .c programs CCLEX = @CC@ @@ -49,7 +45,7 @@ NM = @NM@ LN_S = @LN_S@ STRIP = @STRIP@ MAKE = make -AROPTIONS = ruv +AROPTIONS = rcu RANLIB = @RANLIB@ LD = @LD@ MAKEINFO = @MAKEINFO@ @@ -62,15 +58,10 @@ DLLTOOL = @DLLTOOL@ ########################### Flags ################################# -# -# CPPFLAGS (gnu standard) is not C++ flags, but flags for the "cpp" -# preprocessor. Unfortunately whoever wrote this now uses CPPFLAGS for -# C++ like CFLAGS for C. :-( -# We *must* include CPPFLAGS in both of these, to make sure that all -# header files get found. (KB) - -CFLAGS = @TOOLKIT_DEF@ @CODE_GEN_FLAGS@ @WXDEBUG_DEFINE@ @CFLAGS@ @CPPFLAGS@ -CPPFLAGS = @TOOLKIT_DEF@ @CODE_GEN_FLAGS@ @WXDEBUG_DEFINE@ @CXXFLAGS@ @CPPFLAGS@ +CPPFLAGS = $(APPEXTRACPPFLAGS) @CPPFLAGS@ @TOOLCHAIN_DEFS@ @WXDEBUG_DEFINE@ +CFLAGS = $(APPEXTRACFLAGS) $(CPPFLAGS) @CODE_GEN_FLAGS@ @CFLAGS@ +CXXFLAGS = $(APPEXTRACXXFLAGS) $(CPPFLAGS) \ + @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@ @CXXFLAGS@ PICFLAGS = @PIC_FLAG@ # taking into account how SHARED_LD is defined, appending LDFLAGS to it diff --git a/src/makeb32.env b/src/makeb32.env index fec3d1afce..ef4fcac6c0 100644 --- a/src/makeb32.env +++ b/src/makeb32.env @@ -42,16 +42,16 @@ DLL=0 # !if "$(WXMAKINGDLL)" == "1" -DLL_FLAGS= -DWXMAKINGDLL=1 -D_WINDLL -WXLIB= $(WXLIBDIR)\wx200.lib +DLL_FLAGS= -DWXMAKINGDLL=1 -D_RTLDLL +WXLIB= $(WXLIBDIR)\wx229.lib !else LINK_FLAGS= /aa /c !if "$(WXUSINGDLL)" == "1" -DLL_FLAGS= -DWXUSINGDLL=1 -WXLIB= $(WXLIBDIR)\wx200.lib +DLL_FLAGS= -DWXUSINGDLL=1 -D_RTLDLL +WXLIB= $(WXLIBDIR)\wx229.lib !else DLL_FLAGS= WXLIB= $(WXLIBDIR)\wx32.lib @@ -60,7 +60,6 @@ WXLIB= $(WXLIBDIR)\wx32.lib !endif !if "$(WXBUILDDLL)" == "1" -DLL_FLAGS= $(DLL_FLAGS) -D_RTLDLL LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS) !endif diff --git a/src/makeenvs/linux.env b/src/makeenvs/linux.env deleted file mode 100644 index 7df2eca3cf..0000000000 --- a/src/makeenvs/linux.env +++ /dev/null @@ -1,122 +0,0 @@ -# generic.env -# Linux/generic -# -# Common makefile settings for wxWindows programs -# This file is included by all the other makefiles, thus changes -# made here take effect everywhere (except where overriden). -# RCS-ID: $Id$ -# -########################### Programs ################################# - -# Replace this with your own path if necessary -WXDIR = $(WXWIN) - -# C++ compiler -CC = g++ - -# C compiler -CCC = gcc - -# Compiler for lex/yacc .c programs -CCLEX = $(CCC) - -LEX = lex -YACC = yacc -# Note: if using bison, use -y option for yacc compatibility -# YACC = bison -y -MAKE = make -AROPTIONS = ruv -RANLIB = ranlib - -############################ Switches ################################# - -# Debug/trace mode. 1 or more for debugging. -DEBUG = 1 -GUI = -D__WXSTUBS__ -D__UNIX__ -GUISUFFIX = _stubs - -########################## Compiler flags ############################# - -# Misc options -OPTIONS = -D__LINUX__ -D__WXDEBUG__ -COPTIONS = -DEBUGFLAGS = -ggdb -INCLUDE = -WARN = -Wall -Wno-unused # -w -CWARN = -Wall -Wno-unused # -w -OPT = # -O2 - -############################ Includes ################################# - -# Compiler or system-specific include paths -COMPPATHS = -XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \ - -I/usr/include/X11/Xm -I/usr/include -XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib - -############################ Libraries ################################ - -COMPLIBS = -lstdc++ -GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm - -############################# Suffixes ################################ - -# Change cpp to c if you want to use main.c instead of main.cpp. -# Edit wx_setup.h accordingly (USE_C_MAIN=1) - -OBJSUFF =o -SRCSUFF =cpp -MAINSUFF =cpp - -####################### No changes below this line #################### - -WXINC = $(WXDIR)/include -WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a -INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) - -# Directory for object files -OBJDIR = objects$(GUISUFFIX) - -CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) -LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib -LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) - -# Clears all default suffixes -.SUFFIXES: .o .cpp .c - -.c.o : - $(CCC) -c $(CFLAGS) -o $@ $< - -.cpp.o : - $(CC) -c $(CPPFLAGS) -o $@ $< - -.C.o : - $(CC) -c $(CPPFLAGS) -o $@ $< - -####################### Targets to allow multiple GUIs #################### - -dummy: - echo Use a target: one of motif, stubs - -stubs: - make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -motif: - make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm' - -gtk: - make -f makefile.unx all GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lpng -lzlib -lX11 -lm -pthread' - -cleanstubs: - make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -cleanmotif: - make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -cleangtk: - make -f makefile.unx clean GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' - -$(OBJDIR): - mkdir $(OBJDIR) - diff --git a/src/makeenvs/sgi.env b/src/makeenvs/sgi.env deleted file mode 100644 index b16923a708..0000000000 --- a/src/makeenvs/sgi.env +++ /dev/null @@ -1,119 +0,0 @@ -# sgi.env -# SGI -# -# Common makefile settings for wxWindows programs -# This file is included by all the other makefiles, thus changes -# made here take effect everywhere (except where overriden). -# RCS-ID: $Id$ -# -########################### Programs ################################# - -# Replace this with your own path if necessary -WXWIN = /home/jds/wx2 -WXDIR = $(WXWIN) - -# C++ compiler -CC = CC - -# C compiler -CCC = cc - -# Compiler for lex/yacc .c programs -CCLEX = $(CCC) - -LEX = lex -YACC = yacc -# Note: if using bison, use -y option for yacc compatibility -# YACC = bison -y -MAKE = make -AROPTIONS = ruv -RANLIB = echo - -############################ Switches ################################# - -# Debug/trace mode. 1 or more for debugging. -DEBUG = 0 -GUI = -D__WXSTUBS__ -D__UNIX__ -GUISUFFIX = _stubs - -########################## Compiler flags ############################# - -# Misc options -OPTIONS = -32 -D__WXDEBUG__ -D__SGI__ -D__SGI_CC__ -COPTIONS = -32 -Xcpluscomm -D__SGI__ -D__SGI_CC__ -DEBUGFLAGS = -g3 -INCLUDE = -WARN = -w -CWARN = -w -OPT = - -############################ Includes ################################# - -# Compiler or system-specific include paths -COMPPATHS = -XINCLUDE = -I/usr/include/X11 -I/usr/include/Xm \ - -I/usr/include/X11/Xm -I/usr/include -XLIB = -L/usr/local/X11/lib -L/usr/X11/lib -L/usr/X11R6/lib - -############################ Libraries ################################ - -COMPLIBS = -#COMPLIBS = -lstdc++ -#COMPLIBS = -lPW -GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lXpm -lX11 -lm - -############################# Suffixes ################################ - -OBJSUFF =o -SRCSUFF =cpp -MAINSUFF =cpp - -####################### No changes below this line #################### - -WXINC = $(WXDIR)/include -WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a -INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) - -# Directory for object files -OBJDIR = objects$(GUISUFFIX) - -CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) -LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib -LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) - -# Clears all default suffixes -.SUFFIXES: .o .cpp .c - -.c.o : - $(CCC) -c $(CFLAGS) -o $@ $< - -.cpp.o : - $(CC) -c $(CPPFLAGS) -o $@ $< - -.C.o : - $(CC) -c $(CPPFLAGS) -o $@ $< - -####################### Targets to allow multiple GUIs #################### - -dummy: - echo Use a target: one of motif, stubs - -stubs: - make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -motif: - make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm' - -gtk: - make -f makefile.unx all GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lpng -lzlib -lX11 -lm -pthread' - -cleanstubs: - make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -cleanmotif: - make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -$(OBJDIR): - mkdir $(OBJDIR) - diff --git a/src/makeenvs/solaris.env b/src/makeenvs/solaris.env deleted file mode 100644 index 3cf01d57be..0000000000 --- a/src/makeenvs/solaris.env +++ /dev/null @@ -1,122 +0,0 @@ -# solaris.env -# Solaris -# -# Common makefile settings for wxWindows programs -# This file is included by all the other makefiles, thus changes -# made here take effect everywhere (except where overriden). -# RCS-ID: $Id$ -# -########################### Programs ################################# - -# Replace this with your own path if necessary -WXDIR = $(WXWIN) - -# C++ compiler -CC = CC - -# C compiler -CCC = cc - -# Compiler for lex/yacc .c programs -CCLEX = $(CCC) - -LEX = lex -YACC = yacc -# Note: if using bison, use -y option for yacc compatibility -# YACC = bison -y -MAKE = make -AROPTIONS = ruv -RANLIB = ranlib - -############################ Switches ################################# - -# Debug/trace mode. 1 or more for debugging. -DEBUG = 0 -GUI = -D__MOTIF__ -D__SOLARIS__ -D__UNIX__ -GUISUFFIX = _motif - -########################## Compiler flags ############################# - -# Misc options -OPTIONS = -DSYSV -DSVR4 -fast -COPTIONS = -DSYSV -xCC -DEBUGFLAGS = -INCLUDE = -WARN = -CWARN = -OPT = -O4 -lintl - -############################ Includes ################################# - -# Compiler or system-specific include paths -COMPPATHS = -XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \ - -I/usr/include/X11/Xm -I/usr/include -XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib - -############################ Libraries ################################ - -COMPLIBS = -lgen -ldl -lsocket -lnsl -GUILDLIBS = -lwx_motif $(COMPLIBS) -lpng -lzlib -lXpm -lXm -lXmu -lXt -lX11 -lm - -############################# Suffixes ################################ - -# Change cpp to c if you want to use main.c instead of main.cpp. -# Edit wx_setup.h accordingly (USE_C_MAIN=1) - -OBJSUFF =o -SRCSUFF =cpp -MAINSUFF =cpp - -####################### No changes below this line #################### - -WXINC = $(WXDIR)/include -WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a -INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS) - -# Directory for object files -OBJDIR = objects$(GUISUFFIX) - -CPPFLAGS = $(EXTRACPPFLAGS) $(INC) $(XINCLUDE) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) -CFLAGS = $(EXTRACFLAGS) $(INC) $(XINCLUDE) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT) -LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib -LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS) - -# Clears all default suffixes -.SUFFIXES: .o .cpp .c - -.c.o : - $(CCC) -c $(CFLAGS) -o $@ $< - -.cpp.o : - $(CC) -c $(CPPFLAGS) -o $@ $< - -.C.o : - $(CC) -c $(CPPFLAGS) -o $@ $< - -####################### Targets to allow multiple GUIs #################### - -dummy: - echo Use a target: one of motif, stubs - -stubs: - make -f makefile.unx all GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -motif: - make -f makefile.unx all GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lpng -lzlib -lXm -lXmu -lXt -lXpm -lX11 -lm' - -gtk: - make -f makefile.unx all GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' GUILDLIBS='-lwx_gtk2 $(COMPLIBS) -ldl -lgtk -lgdk -lglib -lpng -lzlib -lX11 -lm -pthread' - -cleanstubs: - make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -cleanmotif: - make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm' - -cleangtk: - make -f makefile.unx clean GUI='-D__WXGTK__ -D__UNIX__' GUISUFFIX='_gtk' - -$(OBJDIR): - mkdir $(OBJDIR) - diff --git a/src/makeg95.env b/src/makeg95.env index 79786db36c..840b64f81c 100644 --- a/src/makeg95.env +++ b/src/makeg95.env @@ -10,15 +10,15 @@ # CVS_ID: $Id$ # -# If using Cygwin, set this to 0. -# If using Mingw32, set this to 1. +# If using Cygwin beta, set this to 0. +# If using Mingw32 or Cygwin 1.0 or later, set this to 1. MINGW32=1 # Set to the version you have MINGW32VERSION=2.95 # If building DLL, the version -WXVERSION=21_11 +WXVERSION=22_9 # Say yes if you have a "modern" linker that supports --shared option. # Note that you're probably going to wait forever for dlltool/gcc/etc diff --git a/src/makelib.b32 b/src/makelib.b32 index 75b13ead1b..fdb8d19d09 100644 --- a/src/makelib.b32 +++ b/src/makelib.b32 @@ -18,7 +18,7 @@ lib: $(LIBTARGET) $(LIBTARGET): $(OBJECTS) -erase $(LIBTARGET) - tlib $(LIBTARGET) /P512 @&&! + tlib "$(LIBTARGET)" /P512 @&&! +$(OBJECTS:.obj =.obj +) ! diff --git a/src/makelib.env.in b/src/makelib.env.in index 7b6d8b1896..f1bd294804 100644 --- a/src/makelib.env.in +++ b/src/makelib.env.in @@ -3,13 +3,23 @@ # # Author: Ron Lee # Created: 19/3/2000 +# $Id$ # -# To use, set the following vars before including it. +# To use, set the following vars before including it: +# +# top_srcdir +# top_builddir +# libsrc_dir # # TARGET_LIBNAME # LIBVERSION_CURRENT # LIBVERSION_REVISION # LIBVERSION_AGE +# HEADER_PATH +# HEADER_SUBDIR +# +# HEADERS +# OBJECTS # # either a shared or static lib will be built according to the # option given to configure. @@ -17,71 +27,95 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ +includedir = @includedir@ libdir = @libdir@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ -TARGETLIB_STATIC=$(TARGET_LIBNAME).a -TARGETLIB_SHARED=$(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT).$(LIBVERSION_REVISION).$(LIBVERSION_AGE) -TARGETLIB_LINK1=$(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT) -TARGETLIB_LINK2=$(TARGET_LIBNAME).so +TARGETLIB_STATIC = $(TARGET_LIBNAME).a +TARGETLIB_SHARED = $(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT).$(LIBVERSION_REVISION).$(LIBVERSION_AGE) +TARGETLIB_LINK1 = $(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT) +TARGETLIB_LINK2 = $(TARGET_LIBNAME).so -# Clears all default suffixes -.SUFFIXES: .o .cpp .c .cxx +TARGETLIB_SONAME = @WX_TARGET_LIBRARY_SONAME@ -.c.o : - $(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $< +%.o : %.c + $(CC) -c $(CFLAGS) $(PICFLAGS) -o $@ $< -.cpp.o : - $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< +%.o : %.cpp + $(CXX) -c $(CXXFLAGS) $(PICFLAGS) -o $@ $< -.cxx.o : - $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< +%.o : %.cxx + $(CXX) -c $(CXXFLAGS) $(PICFLAGS) -o $@ $< + +# the comment at the end of the next line is needed because otherwise autoconf +# would remove this line completely - it contains a built-in hack to remove +# any VPATH assignment not containing ':' +VPATH = @PATH_IFS@$(top_srcdir)/$(libsrc_dir) # ':' for autoconf include $(top_builddir)/src/make.env -all: libtype_@WX_TARGET_LIBRARY_TYPE@ +all: libtype_@WX_TARGET_LIBRARY_TYPE@ -libtype_so: CREATE_LINKS +libtype_so: $(top_builddir)/lib/$(TARGETLIB_SHARED) -libtype_a: $(TARGETLIB_STATIC) +libtype_a: $(top_builddir)/lib/$(TARGETLIB_STATIC) -$(TARGETLIB_SHARED): $(OBJECTS) - $(SHARED_LD) $@ $(OBJECTS) +$(top_builddir)/lib/$(TARGETLIB_SHARED): $(OBJECTS) + @$(INSTALL) -d $(top_builddir)/lib + $(SHARED_LD) $@ $(TARGETLIB_SONAME) $(OBJECTS) + cd $(top_builddir)/lib \ + && $(RM) $(TARGETLIB_LINK1) $(TARGETLIB_LINK2) \ + && $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK1) \ + && $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK2) -CREATE_LINKS: $(TARGETLIB_SHARED) - @$(RM) $(TARGETLIB_LINK1) $(TARGETLIB_LINK2) - $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK1) - $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK2) - -$(TARGETLIB_STATIC): $(OBJECTS) +$(top_builddir)/lib/$(TARGETLIB_STATIC): $(OBJECTS) + @$(INSTALL) -d $(top_builddir)/lib ar $(AROPTIONS) $@ $(OBJECTS) $(RANLIB) $@ -install: install_@WX_TARGET_LIBRARY_TYPE@ +install: install_@WX_TARGET_LIBRARY_TYPE@ install_headers install_so: - $(INSTALL_PROGRAM) $(TARGETLIB_SHARED) $(libdir)/$(TARGETLIB_SHARED) + $(INSTALL_PROGRAM) $(top_builddir)/lib/$(TARGETLIB_SHARED) $(libdir)/$(TARGETLIB_SHARED) @$(RM) $(libdir)/$(TARGETLIB_LINK1) $(libdir)/$(TARGETLIB_LINK2) cd $(libdir) \ && $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK1) \ && $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK2) install_a: - $(INSTALL_PROGRAM) $(TARGETLIB_STATIC) $(libdir)/$(TARGETLIB_STATIC) + $(INSTALL_PROGRAM) $(top_builddir)/lib/$(TARGETLIB_STATIC) $(libdir)/$(TARGETLIB_STATIC) + +install_headers: + $(INSTALL) -d $(includedir)/wx/$(HEADER_SUBDIR) + @for h in $(HEADERS); do \ + $(INSTALL_DATA) $(HEADER_PATH)/$(HEADER_SUBDIR)/$$h $(includedir)/wx/$(HEADER_SUBDIR)/$$h; \ + echo "installing $(includedir)/wx/$(HEADER_SUBDIR)/$$h"; \ + done uninstall: $(RM) $(libdir)/$(TARGETLIB_STATIC) $(RM) $(libdir)/$(TARGETLIB_SHARED) $(RM) $(libdir)/$(TARGETLIB_LINK1) $(RM) $(libdir)/$(TARGETLIB_LINK2) + @echo "removing headers" + @for h in $(HEADERS); do \ + $(RM) $(includedir)/wx/$(HEADER_SUBDIR)/$$h; \ + done + @if test -d $(includedir)/wx/$(HEADER_SUBDIR); then \ + rmdir $(includedir)/wx/$(HEADER_SUBDIR); \ + fi + @-rmdir $(includedir)/wx clean: - $(RM) $(OBJECTS) $(TARGETLIB_SHARED) $(TARGETLIB_LINK1) \ - $(TARGETLIB_LINK2) $(TARGETLIB_STATIC) core + $(RM) $(OBJECTS) $(top_builddir)/lib/$(TARGETLIB_SHARED) \ + $(top_builddir)/lib/$(TARGETLIB_LINK1) \ + $(top_builddir)/lib/$(TARGETLIB_LINK2) \ + $(top_builddir)/lib/$(TARGETLIB_STATIC) core -.PHONY: all shared static clean install install_static install_shared uninstall +.PHONY: all libtype_so libtype_a install install_so install_a install_headers uninstall clean diff --git a/src/makelib.g95 b/src/makelib.g95 index 462cff120d..195fb22672 100644 --- a/src/makelib.g95 +++ b/src/makelib.g95 @@ -7,7 +7,7 @@ # # Include file for Cygwin/Mingw32 libraries -WXDIR = $(WXWIN) +# WXDIR = $(WXWIN) # All common UNIX compiler flags and options are now in # this central makefile. @@ -20,4 +20,7 @@ $(LIBTARGET): $(OBJECTS) $(RANLIB) $@ clean: - -$(RM) $(OBJECTS) $(LIBTARGET) core *.rsc *.res + -$(RM) $(OBJECTS) core *.rsc *.res + +cleanall: clean + -$(RM) $(LIBTARGET) \ No newline at end of file diff --git a/src/makelib.vc b/src/makelib.vc index afbc1456c0..67158bab05 100644 --- a/src/makelib.vc +++ b/src/makelib.vc @@ -14,7 +14,10 @@ WXDIR = $(WXWIN) !include $(WXDIR)\src\makevc.env -all: $(LIBTARGET) +all: $(EXTRATARGETS) $(LIBTARGET) + +$(D) : + mkdir $(D) wx: cd $(WXDIR)\src\msw diff --git a/src/makeprog.b32 b/src/makeprog.b32 index df95b0e0db..57d43f8396 100644 --- a/src/makeprog.b32 +++ b/src/makeprog.b32 @@ -13,7 +13,11 @@ WXDIR = $(WXWIN) !include $(WXDIR)\src\makeb32.env +!if "$(WXUSINGDLL)" == "1" +LIBS=$(WXLIB) $(EXTRALIBS) cw32mti import32 ole2w32 winpng zlib jpeg xpm tiff odbc32 +!else LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff odbc32 +!endif # Note: you may need to remove some libraries for earlier versions of BC++, as below #LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib xpm tiff @@ -30,7 +34,7 @@ OPT = -Od DEBUG_FLAGS = !endif -CPPFLAGS=$(DEBUG_FLAGS) $(EXTRACPPFLAGS) $(OPT) @$(CFG) +CPPFLAGS=$(CPPFLAGS) $(DEBUG_FLAGS) $(OPT) all: $(TARGET).exe $(EXTRATARGETS) diff --git a/src/makeprog.env.in b/src/makeprog.env.in index 8e64d3f9db..27225da2ae 100644 --- a/src/makeprog.env.in +++ b/src/makeprog.env.in @@ -1,22 +1,21 @@ # Make environment for making samples on Unix -# Clears all default suffixes -.SUFFIXES: .o .cpp .c .cxx - # The binary program extension, if any, including dots (e.g. '.exe') PROGRAM_EXT = @PROGRAM_EXT@ BIN_PROGRAM = $(PROGRAM)$(PROGRAM_EXT) -RES_PROGRAM = $(PROGRAM)_resources.o -RES_PROGRAM_OPT = @RESPROGRAM@ +RES_PROGRAM_OBJ = @RESPROGRAMOBJ@ -.c.o : - $(CCC) -c $(CFLAGS) -o $@ $< +%.o : %.c + $(CC) -c $(CFLAGS) $(APPEXTRADEFS) -o $@ $< -.cpp.o : - $(CC) -c $(CPPFLAGS) -o $@ $< +%.o : %.cpp + $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< -.cxx.o : - $(CC) -c $(CPPFLAGS) -o $@ $< +%.o : %.cxx + $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< + +%_resources.o : %.rc + $(RESCOMP) -i $< -o $@ $(RESFLAGS) # the comment at the end of the next line is needed because otherwise autoconf # would remove this line completely - it contains a built-in hack to remove @@ -28,11 +27,9 @@ include $(top_builddir)/src/make.env all: $(BIN_PROGRAM) install_dirs install_data -$(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OPT) - $(CC) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OPT) +$(BIN_PROGRAM): $(OBJECTS) $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(RES_PROGRAM_OBJ) + $(CXX) $(LDFLAGS) -o $(BIN_PROGRAM) $(OBJECTS) $(LDLIBS) $(LIBRARIES) $(RES_PROGRAM_OBJ) -$(RES_PROGRAM): $(PROGRAM).rc - $(RESCOMP) $(RCINPUTSWITCH) $(top_srcdir)/$(program_dir)/$(PROGRAM).rc $(RCOUTPUTSWITCH) $(PROGRAM)_resources.o $(RESFLAGS) install_dirs: @list='$(DATADIRS)'; for p in $$list; do \ @@ -47,4 +44,5 @@ install_data: done clean: - rm -f $(OBJECTS) $(BIN_PROGRAM) $(RES_PROGRAM) core + rm -f $(OBJECTS) $(BIN_PROGRAM) $(RES_PROGRAM_OBJ) core + diff --git a/src/makeprog.g95 b/src/makeprog.g95 index 4ded0d8261..2200451b60 100644 --- a/src/makeprog.g95 +++ b/src/makeprog.g95 @@ -22,7 +22,9 @@ $(TARGET)_resources.o: $(TARGET).rc clean: -$(RM) *.o -$(RM) $(TARGET)_resources.o - -$(RM) $(TARGET).exe -$(RM) core -$(RM) *.rsc -$(RM) *.res + +cleanall: clean + -$(RM) $(TARGET).exe diff --git a/src/makeprog.wat b/src/makeprog.wat index 431ecc5d3f..99b984842e 100644 --- a/src/makeprog.wat +++ b/src/makeprog.wat @@ -20,9 +20,9 @@ $(LNK) : makefile.wat @%append $(LNK) system $(LINKOPTION) @%append $(LNK) $(STACK) @%append $(LNK) name $(PROGRAM).exe - @for %i in ($(LIBS)) do @%append $(LNK) file %i - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i @for %i in ($(OBJECTS)) do @%append $(LNK) file %i + @for %i in ($(LIBS)) do @%append $(LNK) lib %i + @for %i in ($(EXTRALIBS)) do @%append $(LNK) lib %i # @%append $(LNK) $(MINDATA) # @%append $(LNK) $(MAXDATA) diff --git a/src/makeva.env b/src/makeva.env index 5809374bad..3c92b8ddc5 100644 --- a/src/makeva.env +++ b/src/makeva.env @@ -37,9 +37,9 @@ RC=rc #-------------------------------------------------------------------- # Normal application - - - wx.lib # -# wxWin as DLL Defined - Defined wx214.lib +# wxWin as DLL Defined - Defined wx22.lib # -# App using wxWin DLL - Defined - wx214.lib +# App using wxWin DLL - Defined - wx22.lib # # App built as one DLL Defined - - wx.lib # @@ -91,7 +91,7 @@ DLL=0 # wx200 (DLL release), wx200_d (DLL debug) !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" -WXLIBNAME=wx214 +WXLIBNAME=wx22 !else WXLIBNAME=wx !endif diff --git a/src/makevc.env b/src/makevc.env index 632816e59b..b8bcbc2399 100644 --- a/src/makevc.env +++ b/src/makevc.env @@ -8,7 +8,7 @@ # !include -WXVERSION=21_14 +WXVERSION=22_9 WIN95=1 !if "$(WIN95)" == "0" @@ -124,7 +124,14 @@ WXLIBNAME=$(NEW_WXLIBNAME) !if "$(FINAL)" == "1" D=Release +!else if "$(FINAL)" == "hybrid" +D=Hybrid +LIBEXT=h +WXLIBNAME=$(WXLIBNAME)$(LIBEXT) !else +guilibsdll= oldnames.lib kernel32.lib \ + ws2_32.lib mswsock.lib advapi32.lib user32.lib \ + gdi32.lib comdlg32.lib winspool.lib D=Debug LIBEXT=d WXLIBNAME=$(WXLIBNAME)$(LIBEXT) @@ -137,7 +144,12 @@ D=$(D)DLL WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib INC=-I$(WXINC) -I$(WXDIR)/contrib/include -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/tiff $(EXTRAINC) + +!if "$(WXUSINGDLL)" == "1" +LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) +!else LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib $(WXDIR)\lib\xpm$(LIBEXT).lib +!endif MAKEPRECOMP=/YcWX/WXPREC.H OPTIONS= @@ -148,6 +160,13 @@ OPT = /Od /Gy DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE _CRTFLAG=/MDd + +!else if "$(FINAL)" == "hybrid" +OPT = /Od /Gy +DEBUG_FLAGS= /Zi /D__WXDEBUG__ /D__NO_VC_CRTDBG__ +LINK_DEBUG_FLAGS=-debug:full -debugtype:cv +_CRTFLAG=/MD + !else # /O1 - smallest code # /O2 - fastest code @@ -157,6 +176,7 @@ LINK_DEBUG_FLAGS=/RELEASE _CRTFLAG=/MD !endif + !if "$(CRTFLAG)" == "" CRTFLAG=$(_CRTFLAG) !endif @@ -207,3 +227,9 @@ $(CPPFLAGS2) /Fo$@ /c $< $(CPPFLAGS2) /Fo$@ /c $< << +{}.cpp{$D}.obj: + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $< +<< + + diff --git a/src/makewat.env b/src/makewat.env index 11c5031607..6519f7472a 100644 --- a/src/makewat.env +++ b/src/makewat.env @@ -29,7 +29,7 @@ PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch !endif !ifeq WXDEBUG 1 -DEBUGFLAGS = /D__WXDEBUG__ +DEBUGFLAGS = /D__WXDEBUG__ /o1 DEBUGINFO = debug all !else DEBUGFLAGS = @@ -51,9 +51,9 @@ WATLIBDIR = $(WATCOMDIR)\lib386\nt MINDATA = MAXDATA = STACK = option stack=64k -LIBS = $(WXDIR)\lib\wx.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\xpm.lib & +LIBS = $(WXDIR)\lib\wx.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\tiff.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\xpm.lib & $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib & - $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib & + $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\opengl32.lib & $(WATLIBDIR)\uuid.lib $(WXDIR)\lib\watcom\odbc32.lib IFLAGS = -i=$(WXINC) -i=$(WXDIR)\contrib\include -i=$(%watcom)\h;$(%watcom)\h\nt;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff;$(WXDIR)\include\wx\msw\gnuwin32 RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include @@ -70,7 +70,7 @@ RESFLAGS2 = -R $(name) /i$(WXDIR)\include /i$(WXDIR)\contrib\include OPTFLAGS=/ox /5r # /d1 for line numbers only: anything else produces an enormous wx32.lib -CPPFLAGS = /bt=nt /w1 /DWIN32 /D__WIN32__ /D__WIN95__ /D__WINDOWS__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 $(DEBUGFLAGS) /d__WXMSW__ $(EXTRACPPFLAGS) # /d__WATCOMC__ +CPPFLAGS = /bt=nt /w1 /DWIN32 /D__WIN32__ /D__WIN95__ /D__WINDOWS__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) $(DEBUGFLAGS) /d__WXMSW__ $(EXTRACPPFLAGS) # /d__WATCOMC__ .cpp.obj: # $< # .AUTODEPEND *$(CCC) $(CPPFLAGS) $(IFLAGS) $< diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 1cba260bf5..8265a54036 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -731,8 +731,17 @@ void wxExit() } // Yield to other processes +static bool gs_inYield = FALSE; + bool wxYield() { +#ifdef __WXDEBUG__ + if (gs_inYield) + wxFAIL_MSG( wxT("wxYield called recursively" ) ); +#endif + + gs_inYield = TRUE; + while (wxTheApp && wxTheApp->Pending()) wxTheApp->Dispatch(); @@ -741,9 +750,20 @@ bool wxYield() XtAppProcessEvent((XtAppContext) wxTheApp->GetAppContext(), XtIMAll); #endif + gs_inYield = FALSE; + return TRUE; } +// Yield to incoming messages; but fail silently if recursion is detected. +bool wxYieldIfNeeded() +{ + if (gs_inYield) + return FALSE; + + return wxYield(); +} + // TODO use XmGetPixmap (?) to get the really standard icons! #include "wx/generic/info.xpm" diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 45a2430847..b805a5dabf 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -189,32 +189,37 @@ void wxChoice::Append(const wxString& item) for (i = 0; i < m_noStrings; i++) new_widgetList[i] = m_widgetList[i]; - new_widgetList[m_noStrings] = (WXWidget) w; + new_widgetList[m_noStrings] = (WXWidget) w; - if (m_widgetList) - delete[] m_widgetList; - m_widgetList = new_widgetList; + if (m_widgetList) + delete[] m_widgetList; + m_widgetList = new_widgetList; - char mnem = wxFindMnemonic ((char*) (const char*) item); - if (mnem != 0) - XtVaSetValues (w, XmNmnemonic, mnem, NULL); + char mnem = wxFindMnemonic ((char*) (const char*) item); + if (mnem != 0) + XtVaSetValues (w, XmNmnemonic, mnem, NULL); - XtAddCallback (w, XmNactivateCallback, (XtCallbackProc) wxChoiceCallback, (XtPointer) this); + XtAddCallback (w, XmNactivateCallback, (XtCallbackProc) wxChoiceCallback, (XtPointer) this); - if (m_noStrings == 0 && m_buttonWidget) - { - XtVaSetValues ((Widget) m_buttonWidget, XmNmenuHistory, w, NULL); - Widget label = XmOptionButtonGadget ((Widget) m_buttonWidget); - XmString text = XmStringCreateSimple ((char*) (const char*) item); - XtVaSetValues (label, - XmNlabelString, text, - NULL); - XmStringFree (text); - } - wxNode *node = m_stringList.Add (item); - XtVaSetValues (w, XmNuserData, node->Data (), NULL); + if (m_noStrings == 0 && m_buttonWidget) + { + XtVaSetValues ((Widget) m_buttonWidget, XmNmenuHistory, w, NULL); + Widget label = XmOptionButtonGadget ((Widget) m_buttonWidget); + XmString text = XmStringCreateSimple ((char*) (const char*) item); + XtVaSetValues (label, + XmNlabelString, text, + NULL); + XmStringFree (text); + } + wxNode *node = m_stringList.Add (item); + XtVaSetValues (w, XmNuserData, node->Data (), NULL); - m_noStrings ++; + if (m_noStrings == 0) + m_clientList.Append((wxObject*) NULL); + else + m_clientList.Insert( m_clientList.Item(m_noStrings-1), + (wxObject*) NULL ); + m_noStrings ++; } void wxChoice::Delete(int WXUNUSED(n)) @@ -243,6 +248,21 @@ void wxChoice::Clear() m_widgetList = (WXWidget*) NULL; if (m_buttonWidget) XtVaSetValues ((Widget) m_buttonWidget, XmNmenuHistory, (Widget) NULL, NULL); + + if ( HasClientObjectData() ) + { + // destroy the data (due to Robert's idea of using wxList + // and not wxList we can't just say + // m_clientList.DeleteContents(TRUE) - this would crash! + wxNode *node = m_clientList.First(); + while ( node ) + { + delete (wxClientData *)node->Data(); + node = node->Next(); + } + } + m_clientList.Clear(); + m_noStrings = 0; } @@ -524,26 +544,40 @@ void wxChoice::DoSetFirstItem(int WXUNUSED(n)) wxFAIL_MSG( wxT("wxChoice::DoSetFirstItem not implemented") ); } -void wxChoice::DoSetItemClientData(int WXUNUSED(n), void* WXUNUSED(clientData)) +void wxChoice::DoSetItemClientData(int n, void* clientData) { - wxFAIL_MSG( wxT("wxChoice::DoSetItemClientData not implemented") ); + wxNode *node = m_clientList.Nth( n ); + wxCHECK_RET( node, wxT("invalid index in wxChoice::DoSetItemClientData") ); + + node->SetData( (wxObject*) clientData ); } -void* wxChoice::DoGetItemClientData(int WXUNUSED(n)) const +void* wxChoice::DoGetItemClientData(int n) const { - wxFAIL_MSG( wxT("wxChoice::DoGetItemClientData not implemented") ); - return (void*) NULL; + wxNode *node = m_clientList.Nth( n ); + wxCHECK_MSG( node, NULL, wxT("invalid index in wxChoice::DoGetItemClientData") ); + + return node->Data(); } -void wxChoice::DoSetItemClientObject(int WXUNUSED(n), wxClientData* WXUNUSED(clientData)) +void wxChoice::DoSetItemClientObject(int n, wxClientData* clientData) { - wxFAIL_MSG( wxT("wxChoice::DoSetItemClientObject not implemented") ); + wxNode *node = m_clientList.Nth( n ); + wxCHECK_RET( node, wxT("invalid index in wxChoice::DoSetItemClientObject") ); + + wxClientData *cd = (wxClientData*) node->Data(); + delete cd; + + node->SetData( (wxObject*) clientData ); } -wxClientData* wxChoice::DoGetItemClientObject(int WXUNUSED(n)) const +wxClientData* wxChoice::DoGetItemClientObject(int n) const { - wxFAIL_MSG( wxT("wxChoice::DoGetItemClientObject not implemented") ); - return (wxClientData*) NULL; + wxNode *node = m_clientList.Nth( n ); + wxCHECK_MSG( node, (wxClientData *)NULL, + wxT("invalid index in wxChoice::DoGetItemClientObject") ); + + return (wxClientData*) node->Data(); } void wxChoice::Select(int n) diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 6794324428..d1c470999e 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -67,11 +67,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, XmNstaticList, ((style & wxCB_SIMPLE) == wxCB_SIMPLE), NULL); - XtAddCallback (buttonWidget, XmNselectionCallback, (XtCallbackProc) wxComboBoxCallback, - (XtPointer) this); - XtAddCallback (buttonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxComboBoxCallback, - (XtPointer) this); - int i; for (i = 0; i < n; i++) { @@ -91,6 +86,11 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, m_font = parent->GetFont(); ChangeFont(FALSE); + XtAddCallback (buttonWidget, XmNselectionCallback, (XtCallbackProc) wxComboBoxCallback, + (XtPointer) this); + XtAddCallback (buttonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxComboBoxCallback, + (XtPointer) this); + SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y); @@ -151,6 +151,16 @@ void wxComboBox::Delete(int n) delete[] (char *)node->Data(); delete node; } + node = m_clientList.Nth( n ); + if (node) + { + if ( HasClientObjectData() ) + { + delete (wxClientData *)node->Data(); + } + delete node; + } + m_noStrings--; } @@ -158,6 +168,21 @@ void wxComboBox::Clear() { XmComboBoxDeleteAllItems((Widget) m_mainWidget); m_stringList.Clear(); + + if ( HasClientObjectData() ) + { + // destroy the data (due to Robert's idea of using wxList + // and not wxList we can't just say + // m_clientList.DeleteContents(TRUE) - this would crash! + wxNode *node = m_clientList.First(); + while ( node ) + { + delete (wxClientData *)node->Data(); + node = node->Next(); + } + } + m_clientList.Clear(); + m_noStrings = 0; } void wxComboBox::SetSelection (int n) diff --git a/src/motif/control.cpp b/src/motif/control.cpp index 4a79908477..c31dec797f 100644 --- a/src/motif/control.cpp +++ b/src/motif/control.cpp @@ -67,7 +67,7 @@ wxControl::~wxControl() wxPanel *panel = wxDynamicCast(GetParent(), wxPanel); if (panel) { - if (panel->GetDefaultItem() == this) + if ( (wxControl *)panel->GetDefaultItem() == this) panel->SetDefaultItem((wxButton*) NULL); } } diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index 81df528083..9fcfc8730a 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -323,7 +323,7 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCo wxCoord dx = xx1 - xxc; wxCoord dy = yy1 - yyc; - double radius = sqrt (dx * dx + dy * dy); + double radius = sqrt ((double)(dx * dx + dy * dy)); wxCoord r = (wxCoord) radius; double radius1, radius2; diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index a9a097e096..cfd12bece7 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -499,6 +499,20 @@ int wxDialog::ShowModal() XtAppNextEvent((XtAppContext) wxTheApp->GetAppContext(), &event); wxTheApp->ProcessXEvent((WXEvent*) &event); + + if (XtAppPending( (XtAppContext) wxTheApp->GetAppContext() ) == 0) + { + if (!wxTheApp->ProcessIdle()) + { +#if wxUSE_THREADS + // leave the main loop to give other threads a chance to + // perform their GUI work + wxMutexGuiLeave(); + wxUsleep(20); + wxMutexGuiEnter(); +#endif + } + } } // Remove modal dialog flag from stack diff --git a/src/motif/files.lst b/src/motif/files.lst index 27980f1c4b..8edb0ac912 100644 --- a/src/motif/files.lst +++ b/src/motif/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 20:50, 2001/10/17 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -170,6 +170,7 @@ ALL_SOURCES = \ motif/glcanvas.cpp \ motif/gsockmot.c \ motif/icon.cpp \ + motif/joystick.cpp \ motif/listbox.cpp \ motif/main.cpp \ motif/mdi.cpp \ @@ -287,6 +288,7 @@ ALL_HEADERS = \ filesys.h \ font.h \ fontdlg.h \ + fontenc.h \ fontenum.h \ fontmap.h \ fontutil.h \ @@ -446,7 +448,6 @@ ALL_HEADERS = \ motif/cursor.h \ motif/dataform.h \ motif/dataobj.h \ - motif/dataobj2.h \ motif/dc.h \ motif/dcclient.h \ motif/dcmemory.h \ @@ -865,6 +866,7 @@ GUIOBJS = \ glcanvas.o \ gsockmot.o \ icon.o \ + joystick.o \ listbox.o \ main.o \ mdi.o \ @@ -920,6 +922,7 @@ GUIDEPS = \ glcanvas.d \ gsockmot.d \ icon.d \ + joystick.d \ listbox.d \ main.d \ mdi.d \ diff --git a/src/motif/glcanvas.cpp b/src/motif/glcanvas.cpp index 1d5e2936a3..0c1f9780d2 100644 --- a/src/motif/glcanvas.cpp +++ b/src/motif/glcanvas.cpp @@ -7,7 +7,7 @@ // Created: 1995, 1999 // RCS-ID: $Id$ // Copyright: (c) Julian Smart, Wolfram Gloger -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -31,8 +31,8 @@ static int bitcount( unsigned long n ) { int bits; for (bits=0; n>0;) { - if(n & 1) bits++; - n = n >> 1; + if(n & 1) bits++; + n = n >> 1; } return bits; } @@ -44,10 +44,14 @@ static int bitcount( unsigned long n ) IMPLEMENT_CLASS(wxGLCanvas, wxScrolledWindow) -wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos, - const wxSize& size, long style, - const wxString& name, int *attrib_list, const wxPalette& palette): - wxScrolledWindow(parent, id, pos, size, style, name) +wxGLCanvas::wxGLCanvas(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name, + int *attrib_list, const wxPalette& palette) + : wxScrolledWindow(parent, id, pos, size, style, name) { XVisualInfo *vi, vi_templ; XWindowAttributes xwa; @@ -58,53 +62,53 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos, glx_cx = 0; // Check for the presence of the GLX extension if(!glXQueryExtension(display, NULL, NULL)) { - wxDebugMsg("wxGLCanvas: GLX extension is missing\n"); - return; + wxDebugMsg("wxGLCanvas: GLX extension is missing\n"); + return; } if(attrib_list) { - // Get an appropriate visual - vi = glXChooseVisual(display, DefaultScreen(display), attrib_list); - if(!vi) return; + // Get an appropriate visual + vi = glXChooseVisual(display, DefaultScreen(display), attrib_list); + if(!vi) return; - // Here we should make sure that vi is the same visual as the - // one used by the xwindow drawable in wxCanvas. However, - // there is currently no mechanism for this in wx_canvs.cc. + // Here we should make sure that vi is the same visual as the + // one used by the xwindow drawable in wxCanvas. However, + // there is currently no mechanism for this in wx_canvs.cc. } else { - // By default, we use the visual of xwindow - XGetWindowAttributes(display, (Window) GetXWindow(), &xwa); - vi_templ.visualid = XVisualIDFromVisual(xwa.visual); - vi = XGetVisualInfo(display, VisualIDMask, &vi_templ, &n); - if(!vi) return; - glXGetConfig(display, vi, GLX_USE_GL, &val); - if(!val) return; - // Basically, this is it. It should be possible to use vi - // in glXCreateContext() below. But this fails with Mesa. - // I notified the Mesa author about it; there may be a fix. + // By default, we use the visual of xwindow + XGetWindowAttributes(display, (Window) GetXWindow(), &xwa); + vi_templ.visualid = XVisualIDFromVisual(xwa.visual); + vi = XGetVisualInfo(display, VisualIDMask, &vi_templ, &n); + if(!vi) return; + glXGetConfig(display, vi, GLX_USE_GL, &val); + if(!val) return; + // Basically, this is it. It should be possible to use vi + // in glXCreateContext() below. But this fails with Mesa. + // I notified the Mesa author about it; there may be a fix. #ifdef OLD_MESA - // Construct an attribute list matching the visual - int a_list[32]; - n = 0; - if(vi->c_class==TrueColor || vi->c_class==DirectColor) { // RGBA visual - a_list[n++] = GLX_RGBA; - a_list[n++] = GLX_RED_SIZE; - a_list[n++] = bitcount(vi->red_mask); - a_list[n++] = GLX_GREEN_SIZE; - a_list[n++] = bitcount(vi->green_mask); - a_list[n++] = GLX_BLUE_SIZE; - a_list[n++] = bitcount(vi->blue_mask); - glXGetConfig(display, vi, GLX_ALPHA_SIZE, &val); - a_list[n++] = GLX_ALPHA_SIZE; - a_list[n++] = val; - } else { // Color index visual - glXGetConfig(display, vi, GLX_BUFFER_SIZE, &val); - a_list[n++] = GLX_BUFFER_SIZE; - a_list[n++] = val; - } - a_list[n] = None; - XFree(vi); - vi = glXChooseVisual(display, DefaultScreen(display), a_list); - if(!vi) return; + // Construct an attribute list matching the visual + int a_list[32]; + n = 0; + if(vi->c_class==TrueColor || vi->c_class==DirectColor) { // RGBA visual + a_list[n++] = GLX_RGBA; + a_list[n++] = GLX_RED_SIZE; + a_list[n++] = bitcount(vi->red_mask); + a_list[n++] = GLX_GREEN_SIZE; + a_list[n++] = bitcount(vi->green_mask); + a_list[n++] = GLX_BLUE_SIZE; + a_list[n++] = bitcount(vi->blue_mask); + glXGetConfig(display, vi, GLX_ALPHA_SIZE, &val); + a_list[n++] = GLX_ALPHA_SIZE; + a_list[n++] = val; + } else { // Color index visual + glXGetConfig(display, vi, GLX_BUFFER_SIZE, &val); + a_list[n++] = GLX_BUFFER_SIZE; + a_list[n++] = val; + } + a_list[n] = None; + XFree(vi); + vi = glXChooseVisual(display, DefaultScreen(display), a_list); + if(!vi) return; #endif /* OLD_MESA */ } @@ -138,28 +142,28 @@ void wxGLCanvas::SetColour(const char *col) { wxColour *the_colour = wxTheColourDatabase->FindColour(col); if(the_colour) { - GLboolean b; - glGetBooleanv(GL_RGBA_MODE, &b); - if(b) { - glColor3ub(the_colour->Red(), - the_colour->Green(), - the_colour->Blue()); - } else { - GLint pix = (GLint)the_colour->m_pixel; - if(pix == -1) { - XColor exact_def; - exact_def.red = (unsigned short)the_colour->Red() << 8; - exact_def.green = (unsigned short)the_colour->Green() << 8; - exact_def.blue = (unsigned short)the_colour->Blue() << 8; - exact_def.flags = DoRed | DoGreen | DoBlue; - if(!XAllocColor((Display*) GetXDisplay(), (Colormap) wxTheApp->GetMainColormap(GetXDisplay()), &exact_def)) { - wxDebugMsg("wxGLCanvas: cannot allocate color\n"); - return; - } - pix = the_colour->m_pixel = exact_def.pixel; - } - glIndexi(pix); - } + GLboolean b; + glGetBooleanv(GL_RGBA_MODE, &b); + if(b) { + glColor3ub(the_colour->Red(), + the_colour->Green(), + the_colour->Blue()); + } else { + GLint pix = (GLint)the_colour->m_pixel; + if(pix == -1) { + XColor exact_def; + exact_def.red = (unsigned short)the_colour->Red() << 8; + exact_def.green = (unsigned short)the_colour->Green() << 8; + exact_def.blue = (unsigned short)the_colour->Blue() << 8; + exact_def.flags = DoRed | DoGreen | DoBlue; + if(!XAllocColor((Display*) GetXDisplay(), (Colormap) wxTheApp->GetMainColormap(GetXDisplay()), &exact_def)) { + wxDebugMsg("wxGLCanvas: cannot allocate color\n"); + return; + } + pix = the_colour->m_pixel = exact_def.pixel; + } + glIndexi(pix); + } } } diff --git a/src/motif/radiobox.cpp b/src/motif/radiobox.cpp index 0fbaa83a5e..00a81cb4bd 100644 --- a/src/motif/radiobox.cpp +++ b/src/motif/radiobox.cpp @@ -171,17 +171,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, #endif XmNfontList, fontList, NULL); -#ifdef __VMS__ -#pragma message disable voiincconext - // VMS gives here the compiler warning: - // conversion from pointer to function to void* permitted - // as an extension -#endif XtAddCallback ((Widget) m_radioButtons[i], XmNvalueChangedCallback, (XtCallbackProc) wxRadioBoxCallback, - (XtCallbackProc) this); -#ifdef __VMS__ -#pragma message enable voiincconext -#endif + (XtPointer) this); } SetSelection (0); diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 7e14e8d11c..f9c370b48c 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -83,17 +83,8 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, NULL); XmStringFree (text); -#ifdef __VMS__ -#pragma message disable voiincconext - // VMS gives here the compiler warning: - // conversion from pointer to function to void* permitted - // as an extension -#endif XtAddCallback (radioButtonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxRadioButtonCallback, - (XtCallbackProc) this); -#ifdef __VMS__ -#pragma message enable voiincconext -#endif + (XtPointer) this); m_mainWidget = (WXWidget) radioButtonWidget; diff --git a/src/motif/slider.cpp b/src/motif/slider.cpp index 3fa3e0bfc1..369cecc720 100644 --- a/src/motif/slider.cpp +++ b/src/motif/slider.cpp @@ -300,6 +300,7 @@ void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruc // Also send a wxCommandEvent for compatibility. wxCommandEvent event2(wxEVT_COMMAND_SLIDER_UPDATED, slider->GetId()); event2.SetEventObject(slider); + event2.SetInt( event.GetInt() ); slider->ProcessCommand(event2); break; } diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 07bd42afba..af16bc359e 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -300,7 +300,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to) ; + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 2a8e53ebab..dd24fa4ac9 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -747,11 +747,16 @@ bool wxWindow::SetCursor(const wxCursor& cursor) return FALSE; } - wxASSERT_MSG( m_cursor.Ok(), - wxT("cursor must be valid after call to the base version")); + // wxASSERT_MSG( m_cursor.Ok(), + // wxT("cursor must be valid after call to the base version")); + wxCursor* cursor2 = NULL; + if (m_cursor.Ok()) + cursor2 = & m_cursor; + else + cursor2 = wxSTANDARD_CURSOR; WXDisplay *dpy = GetXDisplay(); - WXCursor x_cursor = m_cursor.GetXCursor(dpy); + WXCursor x_cursor = cursor2->GetXCursor(dpy); Widget w = (Widget) GetMainWidget(); Window win = XtWindow(w); diff --git a/src/motif/xmcombo/xmcombo.c b/src/motif/xmcombo/xmcombo.c index f612df4e95..690da2b4b6 100644 --- a/src/motif/xmcombo/xmcombo.c +++ b/src/motif/xmcombo/xmcombo.c @@ -116,8 +116,10 @@ #include /* --- Systemspezifische Definitionen */ -#ifdef VMS +#if defined(VMS) #define strcasecmp(s1, s2) strcmp(s1, s2) +#elif defined(__EMX__) +#define strcasecmp stricmp #endif /* --- sonstiger Quark */ @@ -448,7 +450,7 @@ XmComboBoxClassRec xmComboBoxClassRec = { /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, - /* tm_table */ NULL, + /* tm_table */ XtInheritTranslations, /* Changed from NULL: Bug #406153 */ /* query_geometry */ (XtGeometryHandler) QueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp index e433443dd3..0e86f39c36 100644 --- a/src/msw/accel.cpp +++ b/src/msw/accel.cpp @@ -108,15 +108,25 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] { BYTE fVirt = 0; if (entries[i].m_flags & wxACCEL_ALT) + { fVirt |= FALT; + fVirt |= FVIRTKEY; + } if (entries[i].m_flags & wxACCEL_SHIFT) + { fVirt |= FSHIFT; + fVirt |= FVIRTKEY; + } if (entries[i].m_flags & wxACCEL_CTRL) + { fVirt |= FCONTROL; + fVirt |= FVIRTKEY; + } bool isVirtual; WORD key = wxCharCodeWXToMSW(entries[i].m_keyCode, & isVirtual); - fVirt |= FVIRTKEY; + if (isVirtual) + fVirt |= FVIRTKEY; WORD cmd = entries[i].m_command; @@ -162,7 +172,6 @@ WXHACCEL wxAcceleratorTable::GetHACCEL() const bool wxAcceleratorTable::Translate(wxWindow *window, WXMSG *wxmsg) const { MSG *msg = (MSG *)wxmsg; - return Ok() && ::TranslateAccelerator(GetHwndOf(window), GetHaccel(), msg); } diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 8010fbf6dc..aa524964e6 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -122,7 +122,6 @@ // --------------------------------------------------------------------------- extern wxChar *wxBuffer; -extern wxChar *wxOsVersion; extern wxList *wxWinHandleList; extern wxList WXDLLEXPORT wxPendingDelete; extern void wxSetKeyboardHook(bool doIt); @@ -158,7 +157,9 @@ LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM); // FIXME wxUSE_ON_FATAL_EXCEPTION is only supported for VC++ now because it // needs compiler support for Win32 SEH. Others (especially Borland) // probably have it too, but I'm not sure about how it works -#ifndef __VISUALC__ +// JACS: get 'Cannot use __try in functions that require unwinding +// in Unicode mode, so disabling. +#if !defined(__VISUALC__) || defined(__WIN16__) || defined(UNICODE) #undef wxUSE_ON_FATAL_EXCEPTION #define wxUSE_ON_FATAL_EXCEPTION 0 #endif // VC++ @@ -175,17 +176,38 @@ LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM); // wxApp // --------------------------------------------------------------------------- - IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) +IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) - BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) - EVT_END_SESSION(wxApp::OnEndSession) - EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession) - END_EVENT_TABLE() +BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) + EVT_IDLE(wxApp::OnIdle) + EVT_END_SESSION(wxApp::OnEndSession) + EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession) +END_EVENT_TABLE() //// Initialize bool wxApp::Initialize() { + // the first thing to do is to check if we're trying to run an Unicode + // program under Win9x - if so, abort right now as it has no chance to + // work +#if wxUSE_UNICODE + if ( wxGetOsVersion() != wxWINDOWS_NT ) + { + // note that we can use MessageBoxW() as it's implemented even under + // Win9x - OTOH, we can't use wxGetTranslation() because the file APIs + // used by wxLocale are not + ::MessageBox + ( + NULL, + _T("This program uses Unicode and requires Windows NT/2000.\nProgram aborted."), + _T("wxWindows Fatal Error"), + MB_ICONERROR | MB_OK + ); + + return FALSE; + } +#endif // wxUSE_UNICODE + // Some people may wish to use this, but // probably it shouldn't be here by default. #ifdef __WXDEBUG__ @@ -196,10 +218,6 @@ bool wxApp::Initialize() wxClassInfo::InitializeClasses(); -#if wxUSE_RESOURCES - wxGetResource(wxT("wxWindows"), wxT("OsVersion"), &wxOsVersion); -#endif - #if wxUSE_THREADS wxPendingEventsLocker = new wxCriticalSection; #endif @@ -319,7 +337,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(frame)"); + wxLogLastError(wxT("RegisterClass(frame)")); return FALSE; } @@ -330,7 +348,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(no redraw frame)"); + wxLogLastError(wxT("RegisterClass(no redraw frame)")); return FALSE; } @@ -342,7 +360,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(MDI parent)"); + wxLogLastError(wxT("RegisterClass(MDI parent)")); return FALSE; } @@ -353,7 +371,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(no redraw MDI parent frame)"); + wxLogLastError(wxT("RegisterClass(no redraw MDI parent frame)")); return FALSE; } @@ -365,7 +383,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(MDI child)"); + wxLogLastError(wxT("RegisterClass(MDI child)")); return FALSE; } @@ -376,7 +394,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(no redraw MDI child)"); + wxLogLastError(wxT("RegisterClass(no redraw MDI child)")); return FALSE; } @@ -388,7 +406,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(panel)"); + wxLogLastError(wxT("RegisterClass(panel)")); return FALSE; } @@ -399,7 +417,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(no redraw panel)"); + wxLogLastError(wxT("RegisterClass(no redraw panel)")); return FALSE; } @@ -410,7 +428,7 @@ bool wxApp::RegisterWindowClasses() if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(canvas)"); + wxLogLastError(wxT("RegisterClass(canvas)")); return FALSE; } @@ -419,7 +437,7 @@ bool wxApp::RegisterWindowClasses() wndclass.style = styleNoRedraw; if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(no redraw canvas)"); + wxLogLastError(wxT("RegisterClass(no redraw canvas)")); return FALSE; } @@ -615,12 +633,12 @@ void wxApp::CleanUp() // Entry point helpers, used by wxPython //---------------------------------------------------------------------- -int WXDLLEXPORT wxEntryStart( int WXUNUSED(argc), char** WXUNUSED(argv) ) +int WXDLLEXPORT wxEntryStart( int WXUNUSED(argc), char** WXUNUSED(argv) ) { return wxApp::Initialize(); } -int WXDLLEXPORT wxEntryInitGui() +int WXDLLEXPORT wxEntryInitGui() { wxTheApp->OnInitGui(); return 0; @@ -746,14 +764,10 @@ int wxEntry(WXHINSTANCE hInstance, __except ( gs_handleExceptions ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH ) { if ( wxTheApp ) + { + // give the user a chance to do something special about this wxTheApp->OnFatalException(); - - // using wxLog would be unsafe here - ::MessageBox(NULL, - _("Unrecoverable program error detected: " - " the application will terminate."), - _("Fatal Error"), - MB_APPLMODAL | MB_ICONSTOP | MB_OK); + } ::ExitProcess(3); // the same exit code as abort() @@ -866,7 +880,7 @@ bool wxApp::DoMessage() else if ( rc == -1 ) { // should never happen, but let's test for it nevertheless - wxLogLastError("GetMessage"); + wxLogLastError(wxT("GetMessage")); } else { @@ -933,6 +947,17 @@ bool wxApp::DoMessage() return TRUE; } + +void wxApp::DoMessage(WXMSG *pMsg) +{ + if ( !ProcessMessage(pMsg) ) + { + ::TranslateMessage((MSG *)pMsg); + ::DispatchMessage((MSG *)pMsg); + } +} + + /* * Keep trying to process messages until WM_QUIT * received. @@ -1025,6 +1050,12 @@ bool wxApp::ProcessMessage(WXMSG *wxmsg) { if ( wnd->MSWTranslateMessage(wxmsg) ) return TRUE; + + // stop at first top level window, i.e. don't try to process the key + // strokes originating in a dialog using the accelerators of the parent + // frame - this doesn't make much sense + if ( wnd->IsTopLevel() ) + break; } // Anyone for a non-translation message? Try youngest descendants first. @@ -1174,7 +1205,7 @@ int wxApp::GetComCtl32Version() // try to use DllGetVersion() if available in _headers_ #ifdef DLLVER_PLATFORM_WINDOWS // defined in shlwapi.h DLLGETVERSIONPROC pfnDllGetVersion = (DLLGETVERSIONPROC) - ::GetProcAddress(hModuleComCtl32, _T("DllGetVersion")); + ::GetProcAddress(hModuleComCtl32, "DllGetVersion"); if ( pfnDllGetVersion ) { DLLVERSIONINFO dvi; @@ -1203,11 +1234,7 @@ int wxApp::GetComCtl32Version() FARPROC theProc = ::GetProcAddress ( hModuleComCtl32, -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520) "InitCommonControlsEx" -#else - _T("InitCommonControlsEx") -#endif ); if ( !theProc ) @@ -1222,11 +1249,7 @@ int wxApp::GetComCtl32Version() theProc = ::GetProcAddress ( hModuleComCtl32, -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520) "InitializeFlatSB" -#else - _T("InitializeFlatSB") -#endif ); if ( !theProc ) { @@ -1254,6 +1277,8 @@ void wxExit() exit(0); } +static bool gs_inYield = FALSE; + // Yield to incoming messages bool wxYield() { @@ -1261,6 +1286,13 @@ bool wxYield() // normally result in message boxes popping up &c wxLog::Suspend(); +#ifdef __WXDEBUG__ + if (gs_inYield) + wxFAIL_MSG( wxT("wxYield called recursively" ) ); +#endif + + gs_inYield = TRUE; + // we don't want to process WM_QUIT from here - it should be processed in // the main event loop in order to stop it MSG msg; @@ -1282,9 +1314,20 @@ bool wxYield() // let the logs be flashed again wxLog::Resume(); + gs_inYield = FALSE; + return TRUE; } +// Yield to incoming messages; but fail silently if recursion is detected. +bool wxYieldIfNeeded() +{ + if (gs_inYield) + return FALSE; + + return wxYield(); +} + bool wxHandleFatalExceptions(bool doit) { #if wxUSE_ON_FATAL_EXCEPTION @@ -1315,7 +1358,7 @@ void wxWakeUpIdle() if ( !::PostMessage(GetHwndOf(topWindow), WM_NULL, 0, 0) ) { // should never happen - wxLogLastError("PostMessage(WM_NULL)"); + wxLogLastError(wxT("PostMessage(WM_NULL)")); } } } diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 33651b712f..29f76cc95d 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -86,7 +86,7 @@ void wxBitmapRefData::Free() { if ( !::DeleteObject((HBITMAP)m_hBitmap) ) { - wxLogLastError("DeleteObject(hbitmap)"); + wxLogLastError(wxT("DeleteObject(hbitmap)")); } } @@ -117,7 +117,7 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon) ICONINFO iconInfo; if ( !::GetIconInfo(hicon, &iconInfo) ) { - wxLogLastError("GetIconInfo"); + wxLogLastError(wxT("GetIconInfo")); return FALSE; } @@ -138,6 +138,10 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon) // wxWin convention refData->m_bitmapMask = new wxMask((WXHBITMAP) wxInvertMask(iconInfo.hbmMask, w, h)); + if ( !::DeleteObject(iconInfo.hbmMask) ) + { + wxLogLastError(_T("DeleteObject")); + } #if WXWIN_COMPATIBILITY_2 refData->m_ok = TRUE; @@ -233,9 +237,9 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) // we assume that it is in XBM format which is not quite the same as // the format CreateBitmap() wants because the order of bytes in the // line is inversed! - static const size_t bytesPerLine = (width + 7) / 8; - static const size_t padding = bytesPerLine % 2; - static const size_t len = height * ( padding + bytesPerLine ); + const size_t bytesPerLine = (width + 7) / 8; + const size_t padding = bytesPerLine % 2; + const size_t len = height * ( padding + bytesPerLine ); data = (char *)malloc(len); const char *src = bits; char *dst = data; @@ -269,7 +273,7 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) HBITMAP hbmp = ::CreateBitmap(width, height, 1, depth, data); if ( !hbmp ) { - wxLogLastError("CreateBitmap"); + wxLogLastError(wxT("CreateBitmap")); } if ( data != bits ) @@ -326,7 +330,7 @@ bool wxBitmap::Create(int w, int h, int d) hbmp = ::CreateBitmap(w, h, 1, d, NULL); if ( !hbmp ) { - wxLogLastError("CreateBitmap"); + wxLogLastError(wxT("CreateBitmap")); } } else @@ -335,7 +339,7 @@ bool wxBitmap::Create(int w, int h, int d) hbmp = ::CreateCompatibleBitmap(dc, w, h); if ( !hbmp ) { - wxLogLastError("CreateCompatibleBitmap"); + wxLogLastError(wxT("CreateCompatibleBitmap")); } GetBitmapData()->m_depth = wxDisplayDepth(); @@ -382,8 +386,7 @@ bool wxBitmap::Create(void *data, long type, int width, int height, int depth) if ( !handler ) { - wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for " - "type %d defined."), type); + wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %d defined."), type); return FALSE; } @@ -653,7 +656,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) HDC destDC = ::CreateCompatibleDC(NULL); if ( !srcDC || !destDC ) { - wxLogLastError("CreateCompatibleDC"); + wxLogLastError(wxT("CreateCompatibleDC")); } bool ok = TRUE; @@ -661,7 +664,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) HGDIOBJ hbmpSrcOld = ::SelectObject(srcDC, GetHbitmapOf(bitmap)); if ( !hbmpSrcOld ) { - wxLogLastError("SelectObject"); + wxLogLastError(wxT("SelectObject")); ok = FALSE; } @@ -669,7 +672,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) HGDIOBJ hbmpDstOld = ::SelectObject(destDC, (HBITMAP)m_maskBitmap); if ( !hbmpDstOld ) { - wxLogLastError("SelectObject"); + wxLogLastError(wxT("SelectObject")); ok = FALSE; } @@ -683,7 +686,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) COLORREF col = GetPixel(srcDC, w, h); if ( col == CLR_INVALID ) { - wxLogLastError("GetPixel"); + wxLogLastError(wxT("GetPixel")); // doesn't make sense to continue ok = FALSE; @@ -721,7 +724,7 @@ bool wxBitmapHandler::Create(wxGDIImage *image, { wxBitmap *bitmap = wxDynamicCast(image, wxBitmap); - return bitmap ? Create(bitmap, data, width, height, depth) : FALSE; + return bitmap ? Create(bitmap, data, flags, width, height, depth) : FALSE; } bool wxBitmapHandler::Load(wxGDIImage *image, @@ -843,13 +846,13 @@ extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h) HDC hdcDst = ::CreateCompatibleDC(NULL); if ( !hdcSrc || !hdcDst ) { - wxLogLastError("CreateCompatibleDC"); + wxLogLastError(wxT("CreateCompatibleDC")); } HBITMAP hbmpInvMask = ::CreateBitmap(w, h, 1, 1, 0); if ( !hbmpInvMask ) { - wxLogLastError("CreateBitmap"); + wxLogLastError(wxT("CreateBitmap")); } ::SelectObject(hdcSrc, hbmpMask); @@ -858,7 +861,7 @@ extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h) hdcSrc, 0, 0, NOTSRCCOPY) ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } ::DeleteDC(hdcSrc); diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 744c8a48b6..e5b40ea968 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -75,12 +75,25 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit if ( height == -1 && bitmap.Ok()) height = bitmap.GetHeight() + 2*m_marginY; + long msStyle = WS_VISIBLE | WS_TABSTOP | WS_CHILD | BS_OWNERDRAW ; + +#ifdef __WIN32__ + if(m_windowStyle & wxBU_LEFT) + msStyle |= BS_LEFT; + if(m_windowStyle & wxBU_RIGHT) + msStyle |= BS_RIGHT; + if(m_windowStyle & wxBU_TOP) + msStyle |= BS_TOP; + if(m_windowStyle & wxBU_BOTTOM) + msStyle |= BS_BOTTOM; +#endif + m_hWnd = (WXHWND)CreateWindowEx ( 0, wxT("BUTTON"), wxT(""), - WS_VISIBLE | WS_TABSTOP | WS_CHILD | BS_OWNERDRAW , + msStyle, 0, 0, 0, 0, GetWinHwnd(parent), (HMENU)m_windowId, @@ -103,6 +116,9 @@ void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap) m_buttonBitmap = bitmap; } +// VZ: should be at the very least less than wxDEFAULT_BUTTON_MARGIN +#define FOCUS_MARGIN 3 + bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item) { #if defined(__WIN95__) @@ -144,8 +160,22 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item) int height = lpDIS->rcItem.bottom - y; int wBmp = bitmap->GetWidth(); int hBmp = bitmap->GetHeight(); - int x1 = x + (width - wBmp) / 2; - int y1 = y + (height - hBmp) / 2; + + int x1,y1; + + if(m_windowStyle & wxBU_LEFT) + x1 = x + (FOCUS_MARGIN+1); + else if(m_windowStyle & wxBU_RIGHT) + x1 = x + (width - wBmp) - (FOCUS_MARGIN+1); + else + x1 = x + (width - wBmp) / 2; + + if(m_windowStyle & wxBU_TOP) + y1 = y + (FOCUS_MARGIN+1); + else if(m_windowStyle & wxBU_BOTTOM) + y1 = y + (height - hBmp) - (FOCUS_MARGIN+1); + else + y1 = y + (height - hBmp) / 2; if ( isSelected && autoDraw ) { @@ -308,9 +338,6 @@ void wxBitmapButton::DrawFace( WXHDC dc, int left, int top, int right, int botto #endif // defined(__WIN95__) -// VZ: should be at the very least less than wxDEFAULT_BUTTON_MARGIN -#define FOCUS_MARGIN 3 - void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel ) { RECT rect; diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 64e3c798a2..d58fda1ac6 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -74,13 +74,25 @@ bool wxButton::Create(wxWindow *parent, m_backgroundColour = parent->GetBackgroundColour(); m_foregroundColour = parent->GetForegroundColour(); + long msStyle = WS_VISIBLE | WS_TABSTOP | WS_CHILD /* | WS_CLIPSIBLINGS */ ; + +#ifdef __WIN32__ + if(m_windowStyle & wxBU_LEFT) + msStyle |= BS_LEFT; + if(m_windowStyle & wxBU_RIGHT) + msStyle |= BS_RIGHT; + if(m_windowStyle & wxBU_TOP) + msStyle |= BS_TOP; + if(m_windowStyle & wxBU_BOTTOM) + msStyle |= BS_BOTTOM; +#endif m_hWnd = (WXHWND)CreateWindowEx ( MakeExtendedStyle(m_windowStyle), wxT("BUTTON"), label, - WS_VISIBLE | WS_TABSTOP | WS_CHILD, + msStyle, 0, 0, 0, 0, GetWinHwnd(parent), (HMENU)m_windowId, @@ -88,6 +100,17 @@ bool wxButton::Create(wxWindow *parent, NULL ); + if (m_hWnd == 0) + { + wxString msg; +#ifdef __WIN16__ + msg.Printf(wxT("CreateWindowEx failed")); +#else + msg.Printf(wxT("CreateWindowEx failed with error number %ld"), (long) GetLastError()); +#endif + wxFAIL_MSG(msg); + } + // Subclass again for purposes of dialog editing mode SubclassWin(m_hWnd); @@ -259,8 +282,11 @@ long wxButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) } else if ( nMsg == WM_LBUTTONDBLCLK ) { - // trick the base class into thinking that this was just a click - nMsg = WM_LBUTTONDOWN; + // emulate a click event to force an owner-drawn button to change its + // appearance - without this, it won't do it + (void)wxControl::MSWWindowProc(WM_LBUTTONDOWN, wParam, lParam); + + // and conitnue with processing the message normally as well } // let the base class do all real processing diff --git a/src/msw/caret.cpp b/src/msw/caret.cpp index cacc6801f5..daf68049e9 100644 --- a/src/msw/caret.cpp +++ b/src/msw/caret.cpp @@ -46,7 +46,9 @@ #ifdef __WIN16__ #define CALL_CARET_API(api, args) api args #else // Win32 - #define CALL_CARET_API(api, args) if ( !api args ) wxLogLastError(#api) + #define CALL_CARET_API(api, args) \ + if ( !api args ) \ + wxLogLastError(_T(#api)) #endif // Win16/32 // =========================================================================== @@ -63,7 +65,7 @@ int wxCaretBase::GetBlinkTime() int blinkTime = ::GetCaretBlinkTime(); if ( !blinkTime ) { - wxLogLastError("GetCaretBlinkTime"); + wxLogLastError(wxT("GetCaretBlinkTime")); } return blinkTime; diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index a92fc1b2d6..c838a433cb 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -31,6 +31,8 @@ #ifndef WX_PRECOMP #include "wx/checkbox.h" #include "wx/brush.h" + #include "wx/dcscreen.h" + #include "wx/settings.h" #endif #include "wx/msw/private.h" @@ -142,29 +144,39 @@ bool wxCheckBox::Create(wxWindow *parent, void wxCheckBox::SetLabel(const wxString& label) { - SetWindowText(GetHwnd(), label); + SetWindowText(GetHwnd(), label); } -#define CHECK_SIZE 13 - wxSize wxCheckBox::DoGetBestSize() const { + static int s_checkSize = 0; + + if ( !s_checkSize ) + { + wxScreenDC dc; + dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + + // the height of a standard button in the dialog units is 8, + // translate this to pixels (as one dialog unit is precisely equal to + // 8 character heights, it's just the char height) + s_checkSize = dc.GetCharHeight(); + } + + wxString str = wxGetWindowText(GetHWND()); + int wCheckbox, hCheckbox; - - wxString str = wxGetWindowText(GetHWND()) + " "; - if ( !str.IsEmpty() ) { GetTextExtent(str, &wCheckbox, &hCheckbox); - wCheckbox += CHECK_SIZE; + wCheckbox += s_checkSize + GetCharWidth(); - if ( hCheckbox < CHECK_SIZE ) - hCheckbox = CHECK_SIZE; + if ( hCheckbox < s_checkSize ) + hCheckbox = s_checkSize; } else { - wCheckbox = CHECK_SIZE; - hCheckbox = CHECK_SIZE; + wCheckbox = s_checkSize; + hCheckbox = s_checkSize; } return wxSize(wCheckbox, hCheckbox); @@ -184,7 +196,7 @@ bool wxCheckBox::GetValue() const #ifdef __WIN32__ return (SendMessage(GetHwnd(), BM_GETCHECK, 0, 0) == BST_CHECKED); #else - return ((0x003 & SendMessage(GetHwnd(), BM_GETCHECK, 0, 0)) == 0x003); + return ((0x001 & SendMessage(GetHwnd(), BM_GETCHECK, 0, 0)) == 0x001); #endif } diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index a6144b1da2..a5d5ad8dfc 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -32,6 +32,7 @@ #include "wx/choice.h" #include "wx/utils.h" #include "wx/log.h" + #include "wx/brush.h" #include "wx/settings.h" #endif @@ -59,17 +60,19 @@ bool wxChoice::Create(wxWindow *parent, if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return FALSE; - long msStyle = WS_CHILD | CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; + long msStyle = WS_CHILD | CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | + WS_TABSTOP | WS_VISIBLE | + WS_HSCROLL | WS_VSCROLL /* | WS_CLIPSIBLINGS */; if ( style & wxCB_SORT ) msStyle |= CBS_SORT; - // the experience shows that wxChoice vs. wxComboBox distinction confuses + // Experience shows that wxChoice vs. wxComboBox distinction confuses // quite a few people - try to help them wxASSERT_MSG( !(style & wxCB_DROPDOWN) && !(style & wxCB_READONLY) && !(style & wxCB_SIMPLE), - wxT("this style flag is ignored by wxChoice, you " - "probably want to use a wxComboBox") ); + _T("this style flag is ignored by wxChoice, you ") + _T("probably want to use a wxComboBox") ); if ( !MSWCreateControl(wxT("COMBOBOX"), msStyle) ) return FALSE; @@ -102,7 +105,7 @@ int wxChoice::DoAppend(const wxString& item) int n = (int)SendMessage(GetHwnd(), CB_ADDSTRING, 0, (LONG)item.c_str()); if ( n == CB_ERR ) { - wxLogLastError("SendMessage(CB_ADDSTRING)"); + wxLogLastError(wxT("SendMessage(CB_ADDSTRING)")); } return n; @@ -201,7 +204,7 @@ wxString wxChoice::GetString(int n) const if (len) { if ( ::SendMessage(GetHwnd(), CB_GETLBTEXT, n, (LPARAM)str.GetWriteBuf(len)) == CB_ERR ) { - wxLogLastError("SendMessage(CB_GETLBTEXT)"); + wxLogLastError(wxT("SendMessage(CB_GETLBTEXT)")); } str.UngetWriteBuf(); } @@ -253,6 +256,14 @@ void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags) { + // this should be merged with the same fix in wxComboBox::DoMoveWindow() + // but it can't be done in 2.2 so we duplicate the check here (but see + // comments there) + // + // NB: we do allow width == -1 though + if ( width < -1 ) + return; + // Ignore height parameter because height doesn't mean 'initially // displayed' height, it refers to the drop-down menu as well. The // wxWindows interpretation is different; also, getting the size returns @@ -286,9 +297,8 @@ wxSize wxChoice::DoGetBestSize() const wChoice += 5*cx; - // Choice drop-down list depends on number of items (limited to 10) - size_t nStrings = nItems == 0 ? 10 : wxMin(10, nItems) + 1; - int hChoice = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)*nStrings; + // 10 items is arbitrary, of course, but choice will adjust itself + int hChoice = 11*EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy); return wxSize(wChoice, hChoice); } @@ -337,3 +347,36 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) return TRUE; } +WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam) +{ +#if wxUSE_CTL3D + if ( m_useCtl3D ) + { + HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); + return (WXHBRUSH) hbrush; + } +#endif // wxUSE_CTL3D + + HDC hdc = (HDC)pDC; + if (GetParent()->GetTransparentBackground()) + SetBkMode(hdc, TRANSPARENT); + else + SetBkMode(hdc, OPAQUE); + + wxColour colBack = GetBackgroundColour(); + + if (!IsEnabled()) + colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + + ::SetBkColor(hdc, wxColourToRGB(colBack)); + ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); + + wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); + + return (WXHBRUSH)brush->GetResourceHandle(); +} + + diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 37f71481b5..0b2451d447 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -472,7 +472,7 @@ void wxClipboard::Clear() #if wxUSE_OLE_CLIPBOARD if ( FAILED(OleSetClipboard(NULL)) ) { - wxLogLastError("OleSetClipboard(NULL)"); + wxLogLastError(wxT("OleSetClipboard(NULL)")); } #endif } @@ -482,7 +482,7 @@ bool wxClipboard::Flush() #if wxUSE_OLE_CLIPBOARD if ( FAILED(OleFlushClipboard()) ) { - wxLogLastError("OleFlushClipboard"); + wxLogLastError(wxT("OleFlushClipboard")); return FALSE; } @@ -815,14 +815,14 @@ bool wxClipboard::GetData( wxDataObject& data ) } #endif // wxUSE_METAFILE } -#else // !wxUSE_DATAOBJ - wxFAIL_MSG( wxT("no clipboard implementation") ); -#endif // wxUSE_OLE_CLIPBOARD/wxUSE_DATAOBJ return FALSE; +#else // !wxUSE_DATAOBJ + wxFAIL_MSG( wxT("no clipboard implementation") ); + + return FALSE; +#endif // wxUSE_OLE_CLIPBOARD/wxUSE_DATAOBJ } -#else - #error "Please turn wxUSE_CLIPBOARD on to compile this file." #endif // wxUSE_CLIPBOARD diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index 66e0a3ef73..8fc614cff7 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -1,43 +1,51 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: colordlg.cpp +// Name: src/msw/colordlg.cpp // Purpose: wxColourDialog class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #ifdef __GNUG__ -#pragma implementation "colordlg.h" + #pragma implementation "colordlg.h" #endif // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/bitmap.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/colour.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" -#include "wx/frame.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" + #include + #include "wx/defs.h" + #include "wx/bitmap.h" + #include "wx/pen.h" + #include "wx/brush.h" + #include "wx/colour.h" + #include "wx/gdicmn.h" + #include "wx/utils.h" + #include "wx/frame.h" + #include "wx/dialog.h" + #include "wx/msgdlg.h" #endif #include #if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__) -#include + #include #endif #include "wx/msw/private.h" @@ -48,35 +56,59 @@ #include #include -#define wxDIALOG_DEFAULT_X 300 -#define wxDIALOG_DEFAULT_Y 300 +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -/* - * wxColourDialog - */ +// ============================================================================ +// implementation +// ============================================================================ -wxColourDialog::wxColourDialog(void) +// ---------------------------------------------------------------------------- +// colour dialog hook proc +// ---------------------------------------------------------------------------- + +UINT CALLBACK wxColourDialogHookProc(HWND hwnd, + UINT uiMsg, + WPARAM wParam, + LPARAM lParam) +{ + if ( uiMsg == WM_INITDIALOG ) + { + CHOOSECOLOR *pCC = (CHOOSECOLOR *)lParam; + wxColourDialog *dialog = (wxColourDialog *)pCC->lCustData; + + ::SetWindowText(hwnd, dialog->GetTitle()); + } + + return 0; +} + +// ---------------------------------------------------------------------------- +// wxColourDialog +// ---------------------------------------------------------------------------- + +wxColourDialog::wxColourDialog() { - m_dialogParent = NULL; } wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data) { - Create(parent, data); + Create(parent, data); } bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) { - m_dialogParent = parent; + m_parent = parent; + if (data) + m_colourData = *data; - if (data) - m_colourData = *data; - return TRUE; + return TRUE; } -int wxColourDialog::ShowModal(void) +int wxColourDialog::ShowModal() { CHOOSECOLOR chooseColorStruct; COLORREF custColours[16]; @@ -84,20 +116,23 @@ int wxColourDialog::ShowModal(void) int i; for (i = 0; i < 16; i++) - custColours[i] = RGB(m_colourData.custColours[i].Red(), m_colourData.custColours[i].Green(), m_colourData.custColours[i].Blue()); + custColours[i] = wxColourToRGB(m_colourData.custColours[i]); chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR); - chooseColorStruct.hwndOwner = (HWND) (m_dialogParent ? (HWND) m_dialogParent->GetHWND() : (HWND) NULL); - chooseColorStruct.rgbResult = RGB(m_colourData.dataColour.Red(), m_colourData.dataColour.Green(), m_colourData.dataColour.Blue()); + if ( m_parent ) + chooseColorStruct.hwndOwner = GetHwndOf(m_parent); + chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.dataColour); chooseColorStruct.lpCustColors = custColours; - chooseColorStruct.Flags = CC_RGBINIT; + chooseColorStruct.Flags = CC_RGBINIT | CC_ENABLEHOOK; + chooseColorStruct.lCustData = (LPARAM)this; + chooseColorStruct.lpfnHook = wxColourDialogHookProc; - if (!m_colourData.GetChooseFull()) - chooseColorStruct.Flags |= CC_PREVENTFULLOPEN; + if (m_colourData.GetChooseFull()) + chooseColorStruct.Flags |= CC_FULLOPEN; // Do the modal dialog - bool success = (ChooseColor(&(chooseColorStruct)) != 0); + bool success = ::ChooseColor(&(chooseColorStruct)) != 0; // Try to highlight the correct window (the parent) HWND hWndParent = 0; @@ -112,13 +147,56 @@ int wxColourDialog::ShowModal(void) // Restore values for (i = 0; i < 16; i++) { - m_colourData.custColours[i].Set(GetRValue(custColours[i]), GetGValue(custColours[i]), - GetBValue(custColours[i])); + wxRGBToColour(m_colourData.custColours[i], custColours[i]); } - m_colourData.dataColour.Set(GetRValue(chooseColorStruct.rgbResult), GetGValue(chooseColorStruct.rgbResult), - GetBValue(chooseColorStruct.rgbResult)); + wxRGBToColour(m_colourData.dataColour, chooseColorStruct.rgbResult); return success ? wxID_OK : wxID_CANCEL; } +// ---------------------------------------------------------------------------- +// title +// ---------------------------------------------------------------------------- + +void wxColourDialog::SetTitle(const wxString& title) +{ + m_title = title; +} + +wxString wxColourDialog::GetTitle() +{ + return m_title; +} + +// ---------------------------------------------------------------------------- +// position/size +// ---------------------------------------------------------------------------- + +void wxColourDialog::DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags)) +{ + // ignore - we can't change the size of this standard dialog + return; +} + +// NB: of course, both of these functions are completely bogus, but it's better +// than nothing +void wxColourDialog::DoGetSize(int *width, int *height) const +{ + // the standard dialog size + if ( width ) + *width = 225; + if ( height ) + *height = 324; +} + +void wxColourDialog::DoGetClientSize(int *width, int *height) const +{ + // the standard dialog size + if ( width ) + *width = 219; + if ( height ) + *height = 299; +} diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index f00c1297c9..c02d5f87a5 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp +// Name: msw/combobox.cpp // Purpose: wxComboBox class // Author: Julian Smart // Modified by: @@ -9,6 +9,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #ifdef __GNUG__ #pragma implementation "combobox.h" #endif @@ -27,30 +35,200 @@ #endif #include "wx/combobox.h" +#include "wx/brush.h" #include "wx/clipbrd.h" #include "wx/msw/private.h" +#if wxUSE_TOOLTIPS + #ifndef __GNUWIN32_OLD__ + #include + #endif + #include "wx/tooltip.h" +#endif // wxUSE_TOOLTIPS + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) +// ---------------------------------------------------------------------------- +// function prototypes +// ---------------------------------------------------------------------------- + +LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd, + UINT message, + WPARAM wParam, + LPARAM lParam); + +// --------------------------------------------------------------------------- +// global vars +// --------------------------------------------------------------------------- + +// the pointer to standard radio button wnd proc +static WXFARPROC gs_wndprocEdit = (WXFARPROC)NULL; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wnd proc for subclassed edit control +// ---------------------------------------------------------------------------- + +LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd, + UINT message, + WPARAM wParam, + LPARAM lParam) +{ + HWND hwndCombo = ::GetParent(hWnd); + wxWindow *win = wxFindWinFromHandle((WXHWND)hwndCombo); + + switch ( message ) + { + // forward some messages to the combobox + case WM_KEYUP: + case WM_KEYDOWN: + case WM_CHAR: + { + wxComboBox *combo = wxDynamicCast(win, wxComboBox); + wxCHECK_MSG( combo, 0, _T("should have combo as parent") ); + + if ( combo->MSWProcessEditMsg(message, wParam, lParam) ) + return 0; + } + break; + +#if 1 + case WM_GETDLGCODE: + { + wxCHECK_MSG( win, 0, _T("should have a parent") ); + + if ( win->GetWindowStyle() & wxPROCESS_ENTER ) + { + // need to return a custom dlg code or we'll never get it + return DLGC_WANTMESSAGE; + } + } + break; +#endif // 0 + + // deal with tooltips here +#if wxUSE_TOOLTIPS + case WM_NOTIFY: + { + wxCHECK_MSG( win, 0, _T("should have a parent") ); + + NMHDR* hdr = (NMHDR *)lParam; + if ( (int)hdr->code == TTN_NEEDTEXT ) + { + wxToolTip *tooltip = win->GetToolTip(); + if ( tooltip ) + { + TOOLTIPTEXT *ttt = (TOOLTIPTEXT *)lParam; + ttt->lpszText = (wxChar *)tooltip->GetTip().c_str(); + } + + // processed + return 0; + } + } + break; +#endif // wxUSE_TOOLTIPS + } + + return ::CallWindowProc(CASTWNDPROC gs_wndprocEdit, hWnd, message, wParam, lParam); +} + +WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam) +{ +#if wxUSE_CTL3D + if ( m_useCtl3D ) + { + HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); + return (WXHBRUSH) hbrush; + } +#endif // wxUSE_CTL3D + + HDC hdc = (HDC)pDC; + if (GetParent()->GetTransparentBackground()) + SetBkMode(hdc, TRANSPARENT); + else + SetBkMode(hdc, OPAQUE); + + wxColour colBack = GetBackgroundColour(); + + if (!IsEnabled()) + colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + + ::SetBkColor(hdc, wxColourToRGB(colBack)); + ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); + + wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); + + return (WXHBRUSH)brush->GetResourceHandle(); +} + +// ---------------------------------------------------------------------------- +// wxComboBox +// ---------------------------------------------------------------------------- + +bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) +{ + switch ( msg ) + { + case WM_CHAR: + return HandleChar(wParam, lParam, TRUE /* isASCII */); + + case WM_KEYDOWN: + return HandleKeyDown(wParam, lParam); + + case WM_KEYUP: + return HandleKeyUp(wParam, lParam); + } + + return FALSE; +} + bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) { + wxString value; + int sel = -1; switch ( param ) { case CBN_SELCHANGE: - if (GetSelection() > -1) + sel = GetSelection(); + if ( sel > -1 ) { + value = GetString(sel); + wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId()); - event.SetInt(GetSelection()); + event.SetInt(sel); event.SetEventObject(this); - event.SetString(GetStringSelection()); + event.SetString(value); ProcessCommand(event); } - break; + else + { + break; + } + + // fall through: for compability with wxGTK, also send the text + // update event when the selection changes (this also seems more + // logical as the text does change) case CBN_EDITCHANGE: { wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId()); - event.SetString(GetValue()); + // if sel != -1, value was initialized above (and we can't use + // GetValue() here as it would return the old selection and we + // want the new one) + if ( sel == -1 ) + value = GetValue(); + event.SetString(value); event.SetEventObject(this); ProcessCommand(event); } @@ -62,6 +240,24 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) return FALSE; } +WXHWND wxComboBox::GetEditHWND() const +{ + // this function should not be called for wxCB_READONLY controls, it is + // the callers responsability to check this + wxASSERT_MSG( !(GetWindowStyle() & wxCB_READONLY), + _T("read-only combobox doesn't have any edit control") ); + + POINT pt; + pt.x = pt.y = 4; + HWND hwndEdit = ::ChildWindowFromPoint(GetHwnd(), pt); + if ( !hwndEdit || hwndEdit == GetHwnd() ) + { + wxFAIL_MSG(_T("not read only combobox without edit control?")); + } + + return (WXHWND)hwndEdit; +} + bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, @@ -71,90 +267,61 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - SetName(name); -#if wxUSE_VALIDATORS - SetValidator(validator); -#endif // wxUSE_VALIDATORS - if (parent) parent->AddChild(this); -// SetBackgroundColour(parent->GetBackgroundColour()) ; + // first create wxWin object + if ( !CreateControl(parent, id, pos, size, style, validator, name) ) + return FALSE; - // A choice/combobox normally has a white background (or other, depending - // on global settings) rather than inheriting the parent's background colour. - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + // get the right style + long msStyle = WS_TABSTOP | WS_VSCROLL | WS_HSCROLL | + CBS_AUTOHSCROLL | CBS_NOINTEGRALHEIGHT /* | WS_CLIPSIBLINGS */; + if ( style & wxCB_READONLY ) + msStyle |= CBS_DROPDOWNLIST; + else if ( style & wxCB_SIMPLE ) + msStyle |= CBS_SIMPLE; // A list (shown always) and edit control + else + msStyle |= CBS_DROPDOWN; - SetForegroundColour(parent->GetForegroundColour()) ; + if ( style & wxCB_SORT ) + msStyle |= CBS_SORT; - m_windowStyle = style; + // and now create the MSW control + if ( !MSWCreateControl(_T("COMBOBOX"), msStyle) ) + return FALSE; - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; + SetSize(pos.x, pos.y, size.x, size.y); - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; + // A choice/combobox normally has a white background (or other, depending + // on global settings) rather than inheriting the parent's background colour. + SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); - long msStyle = WS_CHILD | WS_TABSTOP | WS_VISIBLE | - WS_VSCROLL | WS_HSCROLL | CBS_AUTOHSCROLL | CBS_NOINTEGRALHEIGHT; + for ( int i = 0; i < n; i++ ) + { + Append(choices[i]); + } - if (m_windowStyle & wxCB_READONLY) - msStyle |= CBS_DROPDOWNLIST; - else if (m_windowStyle & wxCB_SIMPLE) - msStyle |= CBS_SIMPLE; // A list (shown always) and edit control - else - msStyle |= CBS_DROPDOWN; + if ( !value.IsEmpty() ) + { + SetValue(value); + } - if (m_windowStyle & wxCB_SORT) - msStyle |= CBS_SORT; + // a (not read only) combobox is, in fact, 2 controls: the combobox itself + // and an edit control inside it and if we want to catch events from this + // edit control, we must subclass it as well + if ( !(style & wxCB_READONLY) ) + { + gs_wndprocEdit = (WXFARPROC)::SetWindowLong + ( + (HWND)GetEditHWND(), + GWL_WNDPROC, + (LPARAM)wxComboEditWndProc + ); + } - bool want3D; - WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; - - // Even with extended styles, need to combine with WS_BORDER - // for them to look right. - if ( want3D || wxStyleHasBorder(m_windowStyle) ) - msStyle |= WS_BORDER; - - m_hWnd = (WXHWND)::CreateWindowEx(exStyle, wxT("COMBOBOX"), NULL, - msStyle, - 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, - wxGetInstance(), NULL); - - wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create combobox") ); - -/* -#if wxUSE_CTL3D - if (want3D) - { - Ctl3dSubclassCtl(wx_combo); - m_useCtl3D = TRUE; - } -#endif -*/ - - // Subclass again for purposes of dialog editing mode - SubclassWin(m_hWnd); - - SetFont(parent->GetFont()); - int i; - for (i = 0; i < n; i++) - { - Append(choices[i]); - } - - SetSelection(i); - - SetSize(x, y, width, height); - if ( !value.IsEmpty() ) - { - SetValue(value); - } - - return TRUE; + return TRUE; } +// TODO: update and clear all this horrible mess (VZ) + void wxComboBox::SetValue(const wxString& value) { // If newlines are denoted by just 10, must stick 13 in front. @@ -216,54 +383,52 @@ void wxComboBox::SetEditable(bool editable) void wxComboBox::SetInsertionPoint(long pos) { -/* - HWND hWnd = GetHwnd(); + if ( GetWindowStyle() & wxCB_READONLY ) + return; + #ifdef __WIN32__ - SendMessage(hWnd, EM_SETSEL, pos, pos); - SendMessage(hWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); -#else - SendMessage(hWnd, EM_SETSEL, 0, MAKELPARAM(pos, pos)); -#endif - char *nothing = ""; - SendMessage(hWnd, EM_REPLACESEL, 0, (LPARAM)nothing); -*/ + HWND hWnd = GetHwnd(); + ::SendMessage(hWnd, CB_SETEDITSEL, 0, MAKELPARAM(pos, pos)); + HWND hEditWnd = (HWND) GetEditHWND() ; + if ( hEditWnd ) + { + // Scroll insertion point into view + SendMessage(hEditWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); + // Why is this necessary? (Copied from wxTextCtrl::SetInsertionPoint) + SendMessage(hEditWnd, EM_REPLACESEL, 0, (LPARAM)_T("")); + } +#endif // __WIN32__ } void wxComboBox::SetInsertionPointEnd() { -/* - long pos = GetLastPosition(); - SetInsertionPoint(pos); -*/ + // setting insertion point doesn't make sense for read only comboboxes + if ( !(GetWindowStyle() & wxCB_READONLY) ) + { + long pos = GetLastPosition(); + SetInsertionPoint(pos); + } } long wxComboBox::GetInsertionPoint() const { -/* - DWORD Pos=(DWORD)SendMessage(GetHwnd(), EM_GETSEL, 0, 0L); - return Pos&0xFFFF; -*/ - return 0; +#ifdef __WIN32__ + DWORD Pos=(DWORD)SendMessage(GetHwnd(), CB_GETEDITSEL, 0, 0L); + return Pos&0xFFFF; +#else + return 0; +#endif } long wxComboBox::GetLastPosition() const { -/* - HWND hWnd = GetHwnd(); + HWND hEditWnd = (HWND) GetEditHWND(); - // Will always return a number > 0 (according to docs) - int noLines = (int)SendMessage(hWnd, EM_GETLINECOUNT, (WPARAM)0, (LPARAM)0L); - - // This gets the char index for the _beginning_ of the last line - int charIndex = (int)SendMessage(hWnd, EM_LINEINDEX, (WPARAM)(noLines-1), (LPARAM)0L); - - // Get number of characters in the last line. We'll add this to the character + // Get number of characters in the last (only) line. We'll add this to the character // index for the last line, 1st position. - int lineLength = (int)SendMessage(hWnd, EM_LINELENGTH, (WPARAM)charIndex, (LPARAM)0L); + int lineLength = (int)SendMessage(hEditWnd, EM_LINELENGTH, (WPARAM) 0, (LPARAM)0L); - return (long)(charIndex + lineLength); -*/ - return 0; + return (long)(lineLength); } void wxComboBox::Replace(long from, long to, const wxString& value) @@ -329,6 +494,19 @@ void wxComboBox::SetSelection(long from, long to) void wxComboBox::DoMoveWindow(int x, int y, int width, int height) { + // here is why this is necessary: if the width is negative, the combobox + // window proc makes the window of the size width*height instead of + // interpreting height in the usual manner (meaning the height of the drop + // down list - usually the height specified in the call to MoveWindow() + // will not change the height of combo box per se) + // + // this behaviour is not documented anywhere, but this is just how it is + // here (NT 4.4) and, anyhow, the check shouldn't hurt - however without + // the check, constraints/sizers using combos may break the height + // constraint will have not at all the same value as expected + if ( width < 0 ) + return; + int cx, cy; wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); @@ -336,12 +514,10 @@ void wxComboBox::DoMoveWindow(int x, int y, int width, int height) // default and also 10 items max (if we always use n, the list will never // have vertical scrollbar) int n = GetCount(); - if ( !n ) - n = 10; - else if ( n > 10 ) + if ( !n || (n > 10) ) n = 10; - height = n * EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy); + height = (n + 1)* EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy); wxControl::DoMoveWindow(x, y, width, height); } diff --git a/src/msw/control.cpp b/src/msw/control.cpp index ce7b2fca18..7fab4f0186 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -79,9 +79,11 @@ bool wxControl::MSWCreateControl(const wxChar *classname, const wxString& label, WXDWORD exstyle) { - // VZ: if someone could put a comment here explaining what exactly this is - // needed for, it would be nice... - bool want3D; + // want3D tells us whether or not the style specified a 3D border. + // If so, under WIN16 we can use Ctl3D to give it an appropriate style. + // Sometimes want3D is used to indicate that the non-extended style should have + // WS_BORDER. + bool want3D = TRUE; // if no extended style given, determine it ourselves if ( exstyle == (WXDWORD)-1 ) @@ -89,7 +91,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname, exstyle = GetExStyle(style, &want3D); } - // all controls have these childs (wxWindows creates all controls visible + // all controls have these styles (wxWindows creates all controls visible // by default) style |= WS_CHILD | WS_VISIBLE; @@ -109,9 +111,8 @@ bool wxControl::MSWCreateControl(const wxChar *classname, if ( !m_hWnd ) { -#ifdef __WXDEBUG__ - wxLogError(wxT("Failed to create a control of class '%s'"), classname); -#endif // DEBUG + wxLogDebug(wxT("Failed to create a control of class '%s'"), classname); + wxFAIL_MSG(_T("something is very wrong")); return FALSE; } @@ -240,7 +241,8 @@ WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, else SetBkMode(hdc, OPAQUE); - const wxColour& colBack = GetBackgroundColour(); + wxColour colBack = GetBackgroundColour(); + ::SetBkColor(hdc, wxColourToRGB(colBack)); ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); diff --git a/src/msw/curico.cpp b/src/msw/curico.cpp index 1629b21398..c8df51825e 100644 --- a/src/msw/curico.cpp +++ b/src/msw/curico.cpp @@ -99,7 +99,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H) nDirEntries = 0; // Open and read the .ICO file header and the first ICONFILERES - hFile = _lopen( wxFNCONV(szFileName), OF_READ); + hFile = _lopen( wxConvertWX2MB(szFileName), OF_READ); cbHead = _lread( hFile, (LPSTR)&iconFileHead, sizeof(ICONFILEHEADER)); cbRes = _lread( hFile, (LPSTR)&iconFileRes, sizeof(ICONFILERES)); ++nDirEntries; @@ -346,7 +346,7 @@ HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H) nDirEntries = 0; // Open and read the .ICO file header and the first ICONFILERES - hFile = _lopen( wxFNCONV(szFileName), OF_READ); + hFile = _lopen( wxConvertWX2MB(szFileName), OF_READ); cbHead = _lread( hFile, (LPSTR )&curFileHead, sizeof( CURFILEHEADER)); cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES)); ++nDirEntries; diff --git a/src/msw/data.cpp b/src/msw/data.cpp index 1b24fc3e3a..0a9c7286a2 100644 --- a/src/msw/data.cpp +++ b/src/msw/data.cpp @@ -37,20 +37,13 @@ wxWindowList wxTopLevelWindows; // List of windows pending deletion wxList WXDLLEXPORT wxPendingDelete; -// Custom OS version, as optionally placed in wx.ini/.wxrc -// Currently this can be Win95, Windows, Win32s, WinNT. -// For some systems, you can't tell until run-time what services you -// have. See wxGetOsVersion, which uses this string if present. -char *wxOsVersion = NULL; - int wxPageNumber; // GDI Object Lists -wxBrushList *wxTheBrushList = NULL; -wxPenList *wxThePenList = NULL; wxFontList *wxTheFontList = NULL; -wxBitmapList *wxTheBitmapList = NULL; - +wxPenList *wxThePenList = NULL; +wxBrushList *wxTheBrushList = NULL; +wxBitmapList *wxTheBitmapList = NULL; wxColourDatabase *wxTheColourDatabase = NULL; // Stock objects @@ -58,8 +51,8 @@ wxFont *wxNORMAL_FONT; wxFont *wxSMALL_FONT; wxFont *wxITALIC_FONT; wxFont *wxSWISS_FONT; -wxPen *wxRED_PEN; +wxPen *wxRED_PEN; wxPen *wxCYAN_PEN; wxPen *wxGREEN_PEN; wxPen *wxBLACK_PEN; @@ -95,14 +88,14 @@ wxCursor *wxCROSS_CURSOR = NULL; // 'Null' objects wxAcceleratorTable wxNullAcceleratorTable; -wxBitmap wxNullBitmap; -wxIcon wxNullIcon; -wxCursor wxNullCursor; -wxPen wxNullPen; -wxBrush wxNullBrush; +wxBitmap wxNullBitmap; +wxIcon wxNullIcon; +wxCursor wxNullCursor; +wxPen wxNullPen; +wxBrush wxNullBrush; wxPalette wxNullPalette; -wxFont wxNullFont; -wxColour wxNullColour; +wxFont wxNullFont; +wxColour wxNullColour; // Default window names const wxChar *wxControlNameStr = wxT("control"); diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 737f7235e6..9cafeb655b 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -82,10 +82,87 @@ static const int MM_METRIC = 10; // convert degrees to radians static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// instead of duplicating the same code which sets and then restores text +// colours in each wxDC method working with wxSTIPPLE_MASK_OPAQUE brushes, +// encapsulate this in a small helper class + +// wxColourChanger: changes the text colours in the ctor if required and +// restores them in the dtor +class wxColourChanger +{ +public: + wxColourChanger(wxDC& dc); + ~wxColourChanger(); + +private: + wxDC& m_dc; + + COLORREF m_colFgOld, m_colBgOld; + + bool m_changed; +}; + // =========================================================================== // implementation // =========================================================================== +// ---------------------------------------------------------------------------- +// wxColourChanger +// ---------------------------------------------------------------------------- + +wxColourChanger::wxColourChanger(wxDC& dc) : m_dc(dc) +{ + if ( dc.GetBrush().GetStyle() == wxSTIPPLE_MASK_OPAQUE ) + { + HDC hdc = GetHdcOf(dc); + m_colFgOld = ::GetTextColor(hdc); + m_colBgOld = ::GetBkColor(hdc); + + // note that Windows convention is opposite to wxWindows one, this is + // why text colour becomes the background one and vice versa + const wxColour& colFg = dc.GetTextForeground(); + if ( colFg.Ok() ) + { + ::SetBkColor(hdc, colFg.GetPixel()); + } + + const wxColour& colBg = dc.GetTextBackground(); + if ( colBg.Ok() ) + { + ::SetTextColor(hdc, colBg.GetPixel()); + } + + SetBkMode(hdc, + dc.GetBackgroundMode() == wxTRANSPARENT ? TRANSPARENT + : OPAQUE); + + // flag which telsl us to undo changes in the dtor + m_changed = TRUE; + } + else + { + // nothing done, nothing to undo + m_changed = FALSE; + } +} + +wxColourChanger::~wxColourChanger() +{ + if ( m_changed ) + { + // restore the colours we changed + HDC hdc = GetHdcOf(m_dc); + + ::SetBkMode(hdc, TRANSPARENT); + ::SetTextColor(hdc, m_colFgOld); + ::SetBkColor(hdc, m_colBgOld); + } +} + // --------------------------------------------------------------------------- // wxDC // --------------------------------------------------------------------------- @@ -303,7 +380,7 @@ void wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style) // * The point is outside the clipping region that is, it is not // visible on the device. // - wxLogLastError("ExtFloodFill"); + wxLogLastError(wxT("ExtFloodFill")); } CalcBoundingBox(x, y); @@ -311,31 +388,12 @@ void wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style) bool wxDC::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const { + wxCHECK_MSG( col, FALSE, _T("NULL colour parameter in wxDC::GetPixel") ); + // get the color of the pixel COLORREF pixelcolor = ::GetPixel(GetHdc(), XLOG2DEV(x), YLOG2DEV(y)); - // JACS: what was this for? -#if 0 - // get the color of the pen - COLORREF pencolor = 0x00ffffff; - if (m_pen.Ok()) - { - pencolor = m_pen.GetColour().GetPixel(); - } -#endif - - // return the color of the pixel - if( col ) - { - col->Set(GetRValue(pixelcolor), - GetGValue(pixelcolor), - GetBValue(pixelcolor)); - } - - // check, if color of the pixels is the same as the color of the current - // pen and return TRUE if it is, FALSE otherwise - // JACS, 24/02/2000: can't understand the reason for this, so returning TRUE instead. - // return pixelcolor == pencolor; + wxRGBToColour(*col, pixelcolor); return TRUE; } @@ -370,39 +428,23 @@ void wxDC::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) CalcBoundingBox(x2, y2); } -void wxDC::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2, wxCoord xc, wxCoord yc) +// Draws an arc of a circle, centred on (xc, yc), with starting point (x1, y1) +// and ending at (x2, y2) +void wxDC::DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc) { - COLORREF colFgOld = 0, - colBgOld = 0; + wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling - if (m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) + double dx = xc - x1; + double dy = yc - y1; + double radius = (double)sqrt(dx*dx+dy*dy); + wxCoord r = (wxCoord)radius; + + // treat the special case of full circle separately + if ( x1 == x2 && y1 == y2 ) { - colFgOld = ::GetTextColor(GetHdc()); - colBgOld = ::GetBkColor(GetHdc()); - - if (m_textForegroundColour.Ok()) - { //just the oposite from what is expected see help on pattern brush - // 1 in mask becomes bk color - ::SetBkColor(GetHdc(), m_textForegroundColour.GetPixel() ); - } - if (m_textBackgroundColour.Ok()) - { //just the oposite from what is expected - // 0 in mask becomes text color - ::SetTextColor(GetHdc(), m_textBackgroundColour.GetPixel() ); - } - - if (m_backgroundMode == wxTRANSPARENT) - SetBkMode(GetHdc(), TRANSPARENT); - else - SetBkMode(GetHdc(), OPAQUE); - } - - double dx = xc-x1; - double dy = yc-y1; - double radius = (double)sqrt(dx*dx+dy*dy) ;; - if (x1==x2 && x2==y2) - { - DrawEllipse(xc,yc,(wxCoord)(radius*2.0),(wxCoord)(radius*2.0)); + DrawEllipse(xc - r, yc - r, 2*r, 2*r); return; } @@ -414,35 +456,27 @@ void wxDC::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2, wxCoord xc, wx wxCoord yyc = YLOG2DEV(yc); wxCoord ray = (wxCoord) sqrt(double((xxc-xx1)*(xxc-xx1)+(yyc-yy1)*(yyc-yy1))); - (void)MoveToEx(GetHdc(), (int) xx1, (int) yy1, NULL); wxCoord xxx1 = (wxCoord) (xxc-ray); wxCoord yyy1 = (wxCoord) (yyc-ray); wxCoord xxx2 = (wxCoord) (xxc+ray); wxCoord yyy2 = (wxCoord) (yyc+ray); - if (m_brush.Ok() && m_brush.GetStyle() !=wxTRANSPARENT) + + if ( m_brush.Ok() && m_brush.GetStyle() != wxTRANSPARENT ) { // Have to add 1 to bottom-right corner of rectangle // to make semi-circles look right (crooked line otherwise). // Unfortunately this is not a reliable method, depends // on the size of shape. // TODO: figure out why this happens! - Pie(GetHdc(),xxx1,yyy1,xxx2+1,yyy2+1, - xx1,yy1,xx2,yy2); + Pie(GetHdc(),xxx1,yyy1,xxx2+1,yyy2+1, xx1,yy1,xx2,yy2); } else - Arc(GetHdc(),xxx1,yyy1,xxx2,yyy2, - xx1,yy1,xx2,yy2); - - CalcBoundingBox((wxCoord)(xc-radius), (wxCoord)(yc-radius)); - CalcBoundingBox((wxCoord)(xc+radius), (wxCoord)(yc+radius)); - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) { - // restore the colours we changed - ::SetBkMode(GetHdc(), TRANSPARENT); - ::SetTextColor(GetHdc(), colFgOld); - ::SetBkColor(GetHdc(), colBgOld); + Arc(GetHdc(),xxx1,yyy1,xxx2,yyy2, xx1,yy1,xx2,yy2); } + + CalcBoundingBox(xc - r, yc - r); + CalcBoundingBox(xc + r, yc + r); } void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1, @@ -495,30 +529,7 @@ void wxDC::DoDrawPoint(wxCoord x, wxCoord y) void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset,int fillStyle) { - COLORREF colFgOld = 0, - colBgOld = 0; - - if (m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) - { - colFgOld = ::GetTextColor(GetHdc()); - colBgOld = ::GetBkColor(GetHdc()); - - if (m_textForegroundColour.Ok()) - { //just the oposite from what is expected see help on pattern brush - // 1 in mask becomes bk color - ::SetBkColor(GetHdc(), m_textForegroundColour.GetPixel() ); - } - if (m_textBackgroundColour.Ok()) - { //just the oposite from what is expected - // 0 in mask becomes text color - ::SetTextColor(GetHdc(), m_textBackgroundColour.GetPixel() ); - } - - if (m_backgroundMode == wxTRANSPARENT) - SetBkMode(GetHdc(), TRANSPARENT); - else - SetBkMode(GetHdc(), OPAQUE); - } + wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling // Do things less efficiently if we have offsets if (xoffset != 0 || yoffset != 0) @@ -547,14 +558,6 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffs (void)Polygon(GetHdc(), (POINT*) points, n); SetPolyFillMode(GetHdc(),prev); } - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - // restore the colours we changed - ::SetBkMode(GetHdc(), TRANSPARENT); - ::SetTextColor(GetHdc(), colFgOld); - ::SetBkColor(GetHdc(), colBgOld); - } } void wxDC::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset) @@ -586,31 +589,7 @@ void wxDC::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { - COLORREF colFgOld = 0, - colBgOld = 0; - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - colFgOld = ::GetTextColor(GetHdc()); - colBgOld = ::GetBkColor(GetHdc()); - - if ( m_textForegroundColour.Ok() ) - { - // just the oposite from what is expected see help on pattern brush - // 1 in mask becomes bk color - ::SetBkColor(GetHdc(), m_textForegroundColour.GetPixel()); - } - - if ( m_textBackgroundColour.Ok() ) - { - // 0 in mask becomes text color - ::SetTextColor(GetHdc(), m_textBackgroundColour.GetPixel()); - } - - // VZ: IMHO this does strictly nothing here - SetBkMode(GetHdc(), m_backgroundMode == wxTRANSPARENT ? TRANSPARENT - : OPAQUE); - } + wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling wxCoord x2 = x + width; wxCoord y2 = y + height; @@ -628,7 +607,7 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { // Windows draws the filled rectangles without outline (i.e. drawn with a // transparent pen) one pixel smaller in both directions and we want them - // to have the same size regardless of which pen is used - adjust + // to have the same size regardless of which pen is used - adjust // I wonder if this shouldn´t be done after the LOG2DEV() conversions. RR. if ( m_pen.GetStyle() == wxTRANSPARENT ) @@ -637,49 +616,17 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) y2++; } - (void)Rectangle(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2)); + (void)Rectangle(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2)); } CalcBoundingBox(x, y); CalcBoundingBox(x2, y2); - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - // restore the colours we changed - ::SetBkMode(GetHdc(), TRANSPARENT); - ::SetTextColor(GetHdc(), colFgOld); - ::SetBkColor(GetHdc(), colBgOld); - } } void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius) { - COLORREF colFgOld = 0, - colBgOld = 0; - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - colFgOld = ::GetTextColor(GetHdc()); - colBgOld = ::GetBkColor(GetHdc()); - - if ( m_textForegroundColour.Ok() ) - { - // just the oposite from what is expected see help on pattern brush - // 1 in mask becomes bk color - ::SetBkColor(GetHdc(), m_textForegroundColour.GetPixel()); - } - - if ( m_textBackgroundColour.Ok() ) - { - // 0 in mask becomes text color - ::SetTextColor(GetHdc(), m_textBackgroundColour.GetPixel()); - } - - // VZ: IMHO this does strictly nothing here - SetBkMode(GetHdc(), m_backgroundMode == wxTRANSPARENT ? TRANSPARENT - : OPAQUE); - } + wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling // Now, a negative radius value is interpreted to mean // 'the proportion of the smallest X or Y dimension' @@ -711,43 +658,11 @@ void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h CalcBoundingBox(x, y); CalcBoundingBox(x2, y2); - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - // restore the colours we changed - ::SetBkMode(GetHdc(), TRANSPARENT); - ::SetTextColor(GetHdc(), colFgOld); - ::SetBkColor(GetHdc(), colBgOld); - } } void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { - COLORREF colFgOld = 0, - colBgOld = 0; - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - colFgOld = ::GetTextColor(GetHdc()); - colBgOld = ::GetBkColor(GetHdc()); - - if ( m_textForegroundColour.Ok() ) - { - // just the oposite from what is expected see help on pattern brush - // 1 in mask becomes bk color - ::SetBkColor(GetHdc(), m_textForegroundColour.GetPixel()); - } - - if ( m_textBackgroundColour.Ok() ) - { - // 0 in mask becomes text color - ::SetTextColor(GetHdc(), m_textBackgroundColour.GetPixel()); - } - - // VZ: IMHO this does strictly nothing here - SetBkMode(GetHdc(), m_backgroundMode == wxTRANSPARENT ? TRANSPARENT - : OPAQUE); - } + wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling wxCoord x2 = (x+width); wxCoord y2 = (y+height); @@ -756,47 +671,15 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) CalcBoundingBox(x, y); CalcBoundingBox(x2, y2); - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - // restore the colours we changed - ::SetBkMode(GetHdc(), TRANSPARENT); - ::SetTextColor(GetHdc(), colFgOld); - ::SetBkColor(GetHdc(), colBgOld); - } } // Chris Breeze 20/5/98: first implementation of DrawEllipticArc on Windows void wxDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) { - COLORREF colFgOld = 0, - colBgOld = 0; + wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - colFgOld = ::GetTextColor(GetHdc()); - colBgOld = ::GetBkColor(GetHdc()); - - if ( m_textForegroundColour.Ok() ) - { - // just the oposite from what is expected see help on pattern brush - // 1 in mask becomes bk color - ::SetBkColor(GetHdc(), m_textForegroundColour.GetPixel()); - } - - if ( m_textBackgroundColour.Ok() ) - { - // 0 in mask becomes text color - ::SetTextColor(GetHdc(), m_textBackgroundColour.GetPixel()); - } - - // VZ: IMHO this does strictly nothing here - SetBkMode(GetHdc(), m_backgroundMode == wxTRANSPARENT ? TRANSPARENT - : OPAQUE); - } - - wxCoord x2 = (x+w); - wxCoord y2 = (y+h); + wxCoord x2 = x + w; + wxCoord y2 = y + h; int rx1 = XLOG2DEV(x+w/2); int ry1 = YLOG2DEV(y+h/2); @@ -813,38 +696,36 @@ void wxDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,d // draw pie with NULL_PEN first and then outline otherwise a line is // drawn from the start and end points to the centre - HPEN orig_pen = (HPEN) ::SelectObject(GetHdc(), (HPEN) ::GetStockObject(NULL_PEN)); + HPEN hpenOld = (HPEN) ::SelectObject(GetHdc(), (HPEN) ::GetStockObject(NULL_PEN)); if (m_signY > 0) { (void)Pie(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2)+1, YLOG2DEV(y2)+1, - rx1, ry1, rx2, ry2); + rx1, ry1, rx2, ry2); } else { (void)Pie(GetHdc(), XLOG2DEV(x), YLOG2DEV(y)-1, XLOG2DEV(x2)+1, YLOG2DEV(y2), - rx1, ry1-1, rx2, ry2-1); + rx1, ry1-1, rx2, ry2-1); } - ::SelectObject(GetHdc(), orig_pen); + + ::SelectObject(GetHdc(), hpenOld); + (void)Arc(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2), - rx1, ry1, rx2, ry2); + rx1, ry1, rx2, ry2); CalcBoundingBox(x, y); CalcBoundingBox(x2, y2); - - if ( m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE ) - { - // restore the colours we changed - ::SetBkMode(GetHdc(), TRANSPARENT); - ::SetTextColor(GetHdc(), colFgOld); - ::SetBkColor(GetHdc(), colBgOld); - } } void wxDC::DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) { wxCHECK_RET( icon.Ok(), wxT("invalid icon in DrawIcon") ); +#ifdef __WIN32__ + ::DrawIconEx(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), GetHiconOf(icon), icon.GetWidth(), icon.GetHeight(), 0, NULL, DI_NORMAL); +#else ::DrawIcon(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), GetHiconOf(icon)); +#endif CalcBoundingBox(x, y); CalcBoundingBox(x + icon.GetWidth(), y + icon.GetHeight()); @@ -958,7 +839,7 @@ void wxDC::DrawAnyText(const wxString& text, wxCoord x, wxCoord y) if ( ::TextOut(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), text.c_str(), text.length()) == 0 ) { - wxLogLastError("TextOut"); + wxLogLastError(wxT("TextOut")); } // restore the old parameters (text foreground colour may be left because @@ -991,7 +872,7 @@ void wxDC::DoDrawRotatedText(const wxString& text, LOGFONT lf; if ( ::GetObject(hfont, sizeof(lf), &lf) == 0 ) { - wxLogLastError("GetObject(hfont)"); + wxLogLastError(wxT("GetObject(hfont)")); } // GDI wants the angle in tenth of degree @@ -1002,7 +883,7 @@ void wxDC::DoDrawRotatedText(const wxString& text, hfont = ::CreateFontIndirect(&lf); if ( !hfont ) { - wxLogLastError("CreateFont"); + wxLogLastError(wxT("CreateFont")); } else { @@ -1234,6 +1115,7 @@ void wxDC::SetBackgroundMode(int mode) ::SetBkMode(GetHdc(), TRANSPARENT); else ::SetBkMode(GetHdc(), OPAQUE); + Last change: AC 29 Jan 101 8:54 pm */ } @@ -1320,22 +1202,35 @@ wxCoord wxDC::GetCharWidth() const void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, wxCoord *descent, wxCoord *externalLeading, - wxFont *theFont) const + wxFont *font) const { - wxFont *fontToUse = (wxFont*) theFont; - if (!fontToUse) - fontToUse = (wxFont*) &m_font; + HFONT hfontOld; + if ( font ) + { + wxASSERT_MSG( font->Ok(), _T("invalid font in wxDC::GetTextExtent") ); + + hfontOld = (HFONT)::SelectObject(GetHdc(), GetHfontOf(*font)); + } + else // don't change the font + { + hfontOld = 0; + } SIZE sizeRect; TEXTMETRIC tm; - GetTextExtentPoint(GetHdc(), WXSTRINGCAST string, wxStrlen(WXSTRINGCAST string), &sizeRect); + GetTextExtentPoint(GetHdc(), string, string.length(), &sizeRect); GetTextMetrics(GetHdc(), &tm); if (x) *x = XDEV2LOGREL(sizeRect.cx); if (y) *y = YDEV2LOGREL(sizeRect.cy); if (descent) *descent = tm.tmDescent; if (externalLeading) *externalLeading = tm.tmExternalLeading; + + if ( hfontOld ) + { + ::SelectObject(GetHdc(), hfontOld); + } } void wxDC::SetMapMode(int mode) @@ -1452,7 +1347,9 @@ void wxDC::SetDeviceOrigin(wxCoord x, wxCoord y) wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const { - return (wxCoord) (((x) - m_deviceOriginX)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX) - m_logicalOriginX); + double xRel = x - m_deviceOriginX; + xRel /= m_logicalScaleX*m_userScaleX*m_signX*m_scaleX; + return (wxCoord)(xRel + m_logicalOriginX); } wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const @@ -1462,7 +1359,9 @@ wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const { - return (wxCoord) (((y) - m_deviceOriginY)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY) - m_logicalOriginY); + double yRel = y - m_deviceOriginY; + yRel /= m_logicalScaleY*m_userScaleY*m_signY*m_scaleY; + return (wxCoord)(yRel + m_logicalOriginY); } wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const @@ -1559,7 +1458,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, // of the mask which is also contrary to the Windows one) success = ::MaskBlt(GetHdc(), xdest, ydest, width, height, GetHdcOf(*source), xsrc, ysrc, - (HBITMAP)mask->GetMaskBitmap(), 0, 0, + (HBITMAP)mask->GetMaskBitmap(), xsrc, ysrc, MAKEROP4(dwRop, DSTCOPY)) != 0; if ( !success ) @@ -1578,14 +1477,14 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height, GetHdc(), xdest, ydest, SRCCOPY) ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } // copy src to buffer using selected raster op if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height, GetHdcOf(*source), xsrc, ysrc, dwRop) ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } // set masked area in buffer to BLACK (pixel value 0) @@ -1594,7 +1493,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height, dc_mask, xsrc, ysrc, SRCAND) ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } // set unmasked area in dest to BLACK @@ -1603,7 +1502,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, if ( !::BitBlt(GetHdc(), xdest, ydest, (int)width, (int)height, dc_mask, xsrc, ysrc, SRCAND) ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } ::SetBkColor(GetHdc(), prevBkCol); // restore colours to original values ::SetTextColor(GetHdc(), prevCol); @@ -1614,7 +1513,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, dc_buffer, 0, 0, SRCPAINT) != 0; if ( !success ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } // tidy up temporary DCs and bitmap @@ -1632,7 +1531,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, GetHdcOf(*source), xsrc, ysrc, dwRop) != 0; if ( !success ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } } ::SetTextColor(GetHdc(), old_textground); diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index ca1caadb27..483fd55376 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -110,7 +110,7 @@ wxWindowDC::~wxWindowDC() if ( !::ReleaseDC(GetWinHwnd(m_canvas), GetHdc()) ) { - wxLogLastError("ReleaseDC"); + wxLogLastError(wxT("ReleaseDC")); } m_hDC = 0; diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index a5f196584e..cb5a8a8abc 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -102,8 +102,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap) // check for whether the bitmap is already selected into a device context wxCHECK_RET( !bitmap.GetSelectedInto() || (bitmap.GetSelectedInto() == this), - wxT("Bitmap is selected in another wxMemoryDC, delete the " - "first wxMemoryDC or use SelectObject(NULL)") ); + wxT("Bitmap is selected in another wxMemoryDC, delete the first wxMemoryDC or use SelectObject(NULL)") ); m_selectedBitmap = bitmap; WXHBITMAP hBmp = m_selectedBitmap.GetHBITMAP(); @@ -115,7 +114,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap) if ( !hBmp ) { - wxLogLastError("SelectObject(memDC, bitmap)"); + wxLogLastError(wxT("SelectObject(memDC, bitmap)")); wxFAIL_MSG(wxT("Couldn't select a bitmap into wxMemoryDC")); } diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index c39d15dc3f..ca8832e650 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -35,6 +35,8 @@ #include "wx/dcmemory.h" #endif +#if wxUSE_PRINTING_ARCHITECTURE + #include "wx/msw/private.h" #include "wx/dcprint.h" #include "math.h" @@ -167,6 +169,12 @@ wxPrinterDC::wxPrinterDC(WXHDC theDC) wxPrinterDC::~wxPrinterDC() { + if ( m_hDC ) + { + ::DeleteDC(GetHdc()); + + m_hDC = 0; + } } // ---------------------------------------------------------------------------- @@ -456,7 +464,7 @@ void wxPrinterDC::DoDrawBitmap(const wxBitmap &bmp, bits, info, DIB_RGB_COLORS, SRCCOPY) == GDI_ERROR ) { - wxLogLastError("StretchDIBits"); + wxLogLastError(wxT("StretchDIBits")); } } @@ -538,7 +546,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest, if ( !::GetDIBits(display, GetHbitmapOf(bmp), 0, height, bits, info, DIB_RGB_COLORS) ) { - wxLogLastError("GetDIBits"); + wxLogLastError(wxT("GetDIBits")); success = FALSE; } @@ -554,7 +562,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest, SRCCOPY) != GDI_ERROR; if ( !success ) { - wxLogLastError("StretchDIBits"); + wxLogLastError(wxT("StretchDIBits")); } } @@ -593,3 +601,6 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest, return success; } + +#endif + // wxUSE_PRINTING_ARCHITECTURE diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp index de0a404346..745ccc4963 100644 --- a/src/msw/dde.cpp +++ b/src/msw/dde.cpp @@ -398,8 +398,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host), (PCONVCONTEXT)NULL); if ( !hConv ) { - DDELogError(wxString::Format(_("Failed to create connection to " - "server '%s' on topic '%s'"), + DDELogError(wxString::Format(_("Failed to create connection to server '%s' on topic '%s'"), server.c_str(), topic.c_str())); } else @@ -519,15 +518,26 @@ bool wxDDEConnection::Disconnect() bool wxDDEConnection::Execute(const wxChar *data, int size, wxIPCFormat format) { DWORD result; - if (size < 0) + if ( size < 0 ) { size = wxStrlen(data) + 1; } - bool ok = DdeClientTransaction((LPBYTE)data, size, + HDDEDATA hData = DdeCreateDataHandle(DDEIdInst, (LPBYTE)data, size, + 0, 0, format, 0); + if ( !hData ) + { + DDELogError(_T("Failed to create DDE data handle")); + + return FALSE; + } + + // size == -1 is special and means that we pass a DDE data handle + size = -1; + bool ok = DdeClientTransaction((LPBYTE)hData, size, GetHConv(), NULL, - format, + 0, //format, XTYP_EXECUTE, DDE_TIMEOUT, &result) != 0; @@ -761,7 +771,7 @@ _DDECallback(WORD wType, if (data) { if (user_size < 0) - user_size = wxStrlen(data) + 1; + user_size = wxStrlen((wxChar*)data) + 1; HDDEDATA handle = DdeCreateDataHandle(DDEIdInst, (LPBYTE)data, @@ -792,7 +802,7 @@ _DDECallback(WORD wType, connection->OnPoke(connection->m_topicName, item_name, - connection->m_bufPtr, + (wxChar*)connection->m_bufPtr, (int)len, (wxIPCFormat) wFmt); @@ -918,7 +928,7 @@ static HSZ DDEAtomFromString(const wxString& s) { wxASSERT_MSG( DDEIdInst, _T("DDE not initialized") ); - HSZ hsz = DdeCreateStringHandle(DDEIdInst, (char*) s.c_str(), DDE_CP); + HSZ hsz = DdeCreateStringHandle(DDEIdInst, (wxChar*) s.c_str(), DDE_CP); if ( !hsz ) { DDELogError(_("Failed to create DDE string")); diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 4a0102db14..2408756072 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -116,10 +116,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); SetName(name); - if (!parent) - wxTopLevelWindows.Append(this); - - // windowFont = wxTheFontList->FindOrCreateFont(11, wxSWISS, wxNORMAL, wxNORMAL); + wxTopLevelWindows.Append(this); if (parent) parent->AddChild(this); @@ -174,7 +171,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, if ( !hwnd ) { - wxLogError(_("Failed to create dialog.")); + wxFAIL_MSG(_("Failed to create dialog. You probably forgot to include wx/msw/wx.rc in your resources.")); return FALSE; } @@ -182,7 +179,6 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, SubclassWin(GetHWND()); SetWindowText(hwnd, title); - SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); return TRUE; } @@ -324,52 +320,62 @@ bool wxDialog::IsModalShowing() const void wxDialog::DoShowModal() { wxCHECK_RET( !IsModalShowing(), _T("DoShowModal() called twice") ); + wxCHECK_RET( IsModal(), _T("can't DoShowModal() modeless dialog") ); wxModalDialogs.Append(this); wxWindow *parent = GetParent(); - // remember where the focus was - if ( !m_oldFocus ) - { - m_oldFocus = parent; - } - if ( !m_oldFocus ) - { - m_oldFocus = wxTheApp->GetTopWindow(); - } + wxWindow* oldFocus = m_oldFocus; - // disable the parent window first - HWND hwndParent = parent ? GetHwndOf(parent) : (HWND)NULL; - if ( hwndParent ) - { - ::EnableWindow(hwndParent, FALSE); - } + // We have to remember the HWND because we need to check + // the HWND still exists (oldFocus can be garbage when the dialog + // exits, if it has been destroyed) + HWND hwndOldFocus = 0; + if (oldFocus) + hwndOldFocus = (HWND) oldFocus->GetHWND(); - // enter the modal loop - while ( IsModalShowing() ) + // inside this block, all app windows are disabled { + wxWindowDisabler wd(this); + + // remember where the focus was + if ( !oldFocus ) + { + oldFocus = parent; + if (parent) + hwndOldFocus = (HWND) parent->GetHWND(); + } + + // enter the modal loop + while ( IsModalShowing() ) + { #if wxUSE_THREADS - wxMutexGuiLeaveOrEnter(); + wxMutexGuiLeaveOrEnter(); #endif // wxUSE_THREADS - while ( !wxTheApp->Pending() && wxTheApp->ProcessIdle() ) - ; + while ( !wxTheApp->Pending() && wxTheApp->ProcessIdle() ) + ; - // a message came or no more idle processing to do - wxTheApp->DoMessage(); + // a message came or no more idle processing to do + wxTheApp->DoMessage(); + } } - // reenable the parent window if any - if ( hwndParent ) - { - ::EnableWindow(hwndParent, TRUE); - } +#ifdef __WIN32__ + if ( parent ) + ::SetActiveWindow(GetHwndOf(parent)); +#endif // __WIN32__ // and restore focus - if ( m_oldFocus && (m_oldFocus != this) ) + // Note that this code MUST NOT access the dialog object's data + // in case the object has been deleted (which will be the case + // for a modal dialog that has been destroyed before calling EndModal). + if ( oldFocus && (oldFocus != this) && ::IsWindow(hwndOldFocus)) { - m_oldFocus->SetFocus(); + // This is likely to prove that the object still exists + if (wxFindWinFromHandle((WXHWND) hwndOldFocus) == oldFocus) + oldFocus->SetFocus(); } } @@ -405,6 +411,17 @@ bool wxDialog::Show(bool show) { if ( show ) { + // modal dialog needs a parent window, so try to find one + if ( !GetParent() ) + { + wxWindow *parent = wxTheApp->GetTopWindow(); + if ( parent && parent != this && parent->IsShown() ) + { + // use it + m_parent = parent; + } + } + DoShowModal(); } else // end of modal dialog @@ -418,32 +435,16 @@ bool wxDialog::Show(bool show) return TRUE; } -// Replacement for Show(TRUE) for modal dialogs - returns return code +// a special version for Show(TRUE) for modal dialogs which returns return code int wxDialog::ShowModal() { - // modal dialog needs a parent window, so try to find one - if ( !GetParent() ) + if ( !IsModal() ) { - wxWindow *parent = wxTheApp->GetTopWindow(); - if ( parent && parent != this ) - { - // use it - m_parent = parent; - } + SetModal(TRUE); } - wxWindowDisabler *wd = (wxWindowDisabler *)NULL; - if ( !GetParent() ) - { - // still no parent? make the dialog app modal by disabling all windows - wd = new wxWindowDisabler(this); - } - - m_windowStyle |= wxDIALOG_MODAL; Show(TRUE); - delete wd; - return GetReturnCode(); } @@ -564,7 +565,7 @@ long wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) SWP_NOSIZE ) ) { - wxLogLastError("SetWindowPos(SWP_NOACTIVATE)"); + wxLogLastError(wxT("SetWindowPos(SWP_NOACTIVATE)")); } } // fall through to process it normally as well diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index bd42877ed3..a1eacacb75 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -38,6 +38,10 @@ #include "wx/event.h" #endif +#include "wx/timer.h" +#include "wx/app.h" +#include "wx/generic/choicdgg.h" + #include "wx/msw/private.h" // must be before #include "dynlib.h" #if !wxUSE_DYNLIB_CLASS @@ -102,7 +106,7 @@ typedef DWORD (APIENTRY * RASVALIDATEENTRYNAME)( LPCSTR, LPCSTR ); typedef DWORD (APIENTRY * RASCONNECTIONNOTIFICATION)( HRASCONN, HANDLE, DWORD ); - static const char gs_funcSuffix = 'A'; + static const wxChar gs_funcSuffix = _T('A'); #else // Unicode typedef DWORD (APIENTRY * RASDIAL)( LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW, DWORD, LPVOID, LPHRASCONN ); typedef DWORD (APIENTRY * RASENUMCONNECTIONS)( LPRASCONNW, LPDWORD, LPDWORD ); @@ -124,7 +128,7 @@ typedef DWORD (APIENTRY * RASVALIDATEENTRYNAME)( LPCWSTR, LPCWSTR ); typedef DWORD (APIENTRY * RASCONNECTIONNOTIFICATION)( HRASCONN, HANDLE, DWORD ); - static const char gs_funcSuffix = 'W'; + static const wxChar gs_funcSuffix = _T('W'); #endif // ASCII/Unicode // structure passed to the secondary thread @@ -347,9 +351,7 @@ wxDialUpManagerMSW::wxDialUpManagerMSW() ms_dllRas = wxDllLoader::LoadLibrary("RASAPI32"); if ( !ms_dllRas ) { - wxLogError(_("Dial up functions are unavailable because the " - "remote access service (RAS) is not installed " - "on this machine. Please install it.")); + wxLogError(_("Dial up functions are unavailable because the remote access service (RAS) is not installed on this machine. Please install it.")); } else { @@ -409,10 +411,12 @@ wxDialUpManagerMSW::wxDialUpManagerMSW() exit: if ( funcName ) { - wxLogError(_("The version of remote access service (RAS) " - "installed on this machine is too old, please " - "upgrade (the following required function is " - "missing: %s)."), funcName); + static const wxChar *msg = wxTRANSLATE( +"The version of remote access service (RAS) installed on this machine is too\ +old, please upgrade (the following required function is missing: %s)." + ); + + wxLogError(wxGetTranslation(msg), funcName); wxDllLoader::UnloadLibrary(ms_dllRas); ms_dllRas = 0; @@ -455,8 +459,8 @@ wxString wxDialUpManagerMSW::GetErrorString(DWORD error) default: { - wxLogSysError(dwRet, _("Failed to retrieve text of RAS " - "error message")); + wxLogSysError(dwRet, + _("Failed to retrieve text of RAS error message")); wxString msg; msg.Printf(_("unknown error (error code %08x)."), error); @@ -512,7 +516,7 @@ HRASCONN wxDialUpManagerMSW::FindActiveConnection() { // an error occured wxLogError(_("Cannot find active dialup connection: %s"), - GetErrorString(dwRet)); + GetErrorString(dwRet).c_str()); return 0; } } @@ -532,8 +536,7 @@ HRASCONN wxDialUpManagerMSW::FindActiveConnection() // connection) - the warning is really needed because this function // is used, for example, to select the connection to hang up and so // we may hang up the wrong connection here... - wxLogWarning(_("Several active dialup connections found, " - "choosing one randomly.")); + wxLogWarning(_("Several active dialup connections found, choosing one randomly.")); // fall through case 1: @@ -552,7 +555,7 @@ void wxDialUpManagerMSW::CleanUpThreadData() { if ( !SetEvent(m_data.hEventQuit) ) { - wxLogLastError("SetEvent(RasThreadQuit)"); + wxLogLastError(_T("SetEvent(RasThreadQuit)")); } CloseHandle(m_hThread); @@ -634,7 +637,7 @@ void wxDialUpManagerMSW::OnDialProgress(RASCONNSTATE rasconnstate, if ( dwError ) { wxLogError(_("Failed to establish dialup connection: %s"), - GetErrorString(dwError)); + GetErrorString(dwError).c_str()); // we should still call RasHangUp() if we got a non 0 connection if ( ms_hRasConnection ) @@ -693,7 +696,8 @@ size_t wxDialUpManagerMSW::GetISPNames(wxArrayString& names) const else if ( dwRet != 0 ) { // some other error - abort - wxLogError(_("Failed to get ISP names: %s"), GetErrorString(dwRet)); + wxLogError(_("Failed to get ISP names: %s"), + GetErrorString(dwRet).c_str()); free(rasEntries); @@ -761,8 +765,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, entryName = wxGetSingleChoice ( _("Choose ISP to dial"), - _("Please choose which ISP do you want to " - "connect to"), + _("Please choose which ISP do you want to connect to"), count, strings ); @@ -780,7 +783,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, RASDIALPARAMS rasDialParams; rasDialParams.dwSize = sizeof(rasDialParams); - strncpy(rasDialParams.szEntryName, entryName, RAS_MaxEntryName); + wxStrncpy(rasDialParams.szEntryName, entryName, RAS_MaxEntryName); // do we have the username and password? if ( !username || !password ) @@ -802,8 +805,8 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, } else { - strncpy(rasDialParams.szUserName, username, UNLEN); - strncpy(rasDialParams.szPassword, password, PWLEN); + wxStrncpy(rasDialParams.szUserName, username, UNLEN); + wxStrncpy(rasDialParams.szPassword, password, PWLEN); } // default values for other fields @@ -856,7 +859,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, { wxLogError(_("Failed to %s dialup connection: %s"), async ? _("initiate") : _("establish"), - GetErrorString(dwRet)); + GetErrorString(dwRet).c_str()); // we should still call RasHangUp() if we got a non 0 connection if ( ms_hRasConnection ) @@ -928,7 +931,7 @@ bool wxDialUpManagerMSW::HangUp() if ( dwRet != 0 ) { wxLogError(_("Failed to terminate the dialup connection: %s"), - GetErrorString(dwRet)); + GetErrorString(dwRet).c_str()); } ms_isConnected = FALSE; @@ -966,9 +969,6 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const // there is some connection to the net, see of which type ms_isAlwaysOnline = (flags & INTERNET_CONNECTION_LAN != 0) || (flags & INTERNET_CONNECTION_PROXY != 0); - - wxLogMessage("InternetGetConnectedState() returned TRUE, " - "flags = %08x", flags); } else { @@ -1047,7 +1047,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) dwSuspendCount = ResumeThread(m_hThread); if ( dwSuspendCount == (DWORD)-1 ) { - wxLogLastError("ResumeThread(RasThread)"); + wxLogLastError(wxT("ResumeThread(RasThread)")); ok = FALSE; } @@ -1075,7 +1075,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) ); if ( !m_data.hEventRas ) { - wxLogLastError("CreateEvent(RasStatus)"); + wxLogLastError(wxT("CreateEvent(RasStatus)")); ok = FALSE; } @@ -1087,7 +1087,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) m_data.hEventQuit = CreateEvent(NULL, FALSE, FALSE, NULL); if ( !m_data.hEventQuit ) { - wxLogLastError("CreateEvent(RasThreadQuit)"); + wxLogLastError(wxT("CreateEvent(RasThreadQuit)")); CleanUpThreadData(); @@ -1106,7 +1106,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) (HMENU)NULL, wxGetInstance(), 0); if ( !ms_hwndRas ) { - wxLogLastError("CreateWindow(RasHiddenWindow)"); + wxLogLastError(wxT("CreateWindow(RasHiddenWindow)")); CleanUpThreadData(); @@ -1143,7 +1143,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) if ( !m_hThread ) { - wxLogLastError("CreateThread(RasStatusThread)"); + wxLogLastError(wxT("CreateThread(RasStatusThread)")); CleanUpThreadData(); } @@ -1162,7 +1162,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) if ( dwRet != 0 ) { wxLogDebug(wxT("RasConnectionNotification() failed: %s"), - GetErrorString(dwRet)); + GetErrorString(dwRet).c_str()); CleanUpThreadData(); } @@ -1194,7 +1194,7 @@ void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus() // we have running secondary thread, it's just enough to suspend it if ( SuspendThread(m_hThread) == (DWORD)-1 ) { - wxLogLastError("SuspendThread(RasThread)"); + wxLogLastError(wxT("SuspendThread(RasThread)")); } } else @@ -1252,7 +1252,7 @@ static DWORD wxRasMonitorThread(wxRasThreadData *data) break; case WAIT_FAILED: - wxLogLastError("WaitForMultipleObjects(RasMonitor)"); + wxLogLastError(wxT("WaitForMultipleObjects(RasMonitor)")); break; } } diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 5952c60152..7340494bae 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -109,7 +109,7 @@ static BOOL WriteDIB(LPTSTR szFile, HANDLE hdib) if (!hdib) return FALSE; - fh = OpenFile(wxFNCONV(szFile), &of, OF_CREATE | OF_READWRITE); + fh = OpenFile(wxConvertWX2MB(szFile), &of, OF_CREATE | OF_READWRITE); if (fh == -1) return FALSE; @@ -429,7 +429,7 @@ BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette) /* Open the file and get a handle to it's BITMAPINFO */ - fh = OpenFile (wxFNCONV(lpFileName), &of, OF_READ); + fh = OpenFile (wxConvertWX2MB(lpFileName), &of, OF_READ); if (fh == -1) { wxLogError(_("Can't open file '%s'"), lpFileName); return (0); diff --git a/src/msw/dibutils.cpp b/src/msw/dibutils.cpp index c52aa3bfaa..8837d90751 100644 --- a/src/msw/dibutils.cpp +++ b/src/msw/dibutils.cpp @@ -167,7 +167,7 @@ int wxDibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi) bmf.bfReserved1 = 0; bmf.bfReserved2 = 0; bmf.bfOffBits = sizeof(bmf) + (char FAR*)(wxDibPtr(lpbi)) - (char FAR*)lpbi; -#if 1 // defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || defined(wxUSE_NORLANDER_HEADERS) +#if 1 // defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || wxUSE_NORLANDER_HEADERS #define HWRITE_2ND_ARG_TYPE LPCSTR #else // don't know who needs this... #define HWRITE_2ND_ARG_TYPE LPBYTE diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index f8de559fa2..eed2987eac 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -117,7 +117,7 @@ int wxDirDialog::ShowModal() if ( !ok ) { - wxLogLastError("SHGetPathFromIDList"); + wxLogLastError(wxT("SHGetPathFromIDList")); return wxID_CANCEL; } @@ -148,7 +148,14 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) TCHAR szDir[MAX_PATH]; if ( SHGetPathFromIDList((LPITEMIDLIST)lp, szDir) ) { - SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)szDir); + wxString strDir(szDir); + int maxChars = 40; // Have to truncate string else it displays incorrectly + if (strDir.Len() > (size_t) (maxChars - 3)) + { + strDir = strDir.Right(maxChars - 3); + strDir = wxString(wxT("...")) + strDir; + } + SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM) (const wxChar*) strDir); } } break; @@ -174,7 +181,7 @@ static void ItemListFree(LPITEMIDLIST pidl) } else { - wxLogLastError("SHGetMalloc"); + wxLogLastError(wxT("SHGetMalloc")); } } } diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index b5aca15c51..d60e69d885 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -324,7 +324,7 @@ bool wxDragImage::EndDrag() if ( !::ReleaseCapture() ) { - wxLogLastError("ReleaseCapture"); + wxLogLastError(wxT("ReleaseCapture")); } ::ShowCursor(TRUE); diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index b3f2a2999b..b64a9f842c 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: filedlg.cpp +// Name: src/msw/filedlg.cpp // Purpose: wxFileDialog // Author: Julian Smart // Modified by: @@ -9,13 +9,20 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #ifdef __GNUG__ #pragma implementation "filedlg.h" #endif // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/msw/private.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -28,10 +35,11 @@ #include "wx/filedlg.h" #include "wx/intl.h" #include "wx/log.h" - -// #include "wx/msw/private.h" + #include "wx/app.h" #endif +#include "wx/msw/private.h" + #if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__) #include #endif @@ -42,8 +50,34 @@ #include "wx/tokenzr.h" +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#ifdef __WIN32__ +# define wxMAXPATH 4096 +#else +# define wxMAXPATH 1024 +#endif + +# define wxMAXFILE 1024 + +# define wxMAXEXT 5 + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + IMPLEMENT_CLASS(wxFileDialog, wxDialog) +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + wxString wxFileSelector(const wxChar *title, const wxChar *defaultDir, const wxChar *defaultFileName, @@ -84,7 +118,7 @@ wxString wxFileSelector(const wxChar *title, flags, wxPoint(x, y)); if( wxStrlen(defaultExtension) != 0 ) { - int filterFind = 1, + int filterFind = 0, filterIndex = 0; for( unsigned int i = 0; i < filter2.Len(); i++ ) @@ -93,7 +127,6 @@ wxString wxFileSelector(const wxChar *title, { // save the start index of the new filter unsigned int is = i++; - filterIndex++; // find the end of the filter for( ; i < filter2.Len(); i++ ) @@ -105,47 +138,28 @@ wxString wxFileSelector(const wxChar *title, if( i-is-1 > 0 && is+1 < filter2.Len() ) { if( filter2.Mid(is+1,i-is-1).Contains(defaultExtension) ) -// if( filter2.Mid(is+1,i-is-1) == defaultExtension ) { filterFind = filterIndex; break; } } + + filterIndex++; } } fileDialog.SetFilterIndex(filterFind); } + wxString filename; if ( fileDialog.ShowModal() == wxID_OK ) { - wxStrcpy(wxBuffer, (const wxChar *)fileDialog.GetPath()); - return wxBuffer; + filename = fileDialog.GetPath(); } - else - return wxGetEmptyString(); + + return filename; } -# if __BORLANDC__ -# include // for MAXPATH etc. ( Borland 3.1 ) -# endif - -# ifndef MAXPATH -# define MAXPATH 400 -# endif - -# ifndef MAXDRIVE -# define MAXDRIVE 3 -# endif - -# ifndef MAXFILE -# define MAXFILE 9 -# endif - -# ifndef MAXEXT -# define MAXEXT 5 -# endif - wxString wxFileSelectorEx(const wxChar *title, const wxChar *defaultDir, @@ -158,17 +172,23 @@ wxString wxFileSelectorEx(const wxChar *title, int y) { - wxFileDialog fileDialog(parent, title ? title : wxT(""), defaultDir ? defaultDir : wxT(""), - defaultFileName ? defaultFileName : wxT(""), filter ? filter : wxT(""), flags, wxPoint(x, y)); + wxFileDialog fileDialog(parent, + title ? title : wxT(""), + defaultDir ? defaultDir : wxT(""), + defaultFileName ? defaultFileName : wxT(""), + filter ? filter : wxT(""), + flags, wxPoint(x, y)); + wxString filename; if ( fileDialog.ShowModal() == wxID_OK ) { - *defaultFilterIndex = fileDialog.GetFilterIndex(); - wxStrcpy(wxBuffer, (const wxChar *)fileDialog.GetPath()); - return wxBuffer; + if ( defaultFilterIndex ) + *defaultFilterIndex = fileDialog.GetFilterIndex(); + + filename = fileDialog.GetPath(); } - else - return wxGetEmptyString(); + + return filename; } wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, @@ -206,9 +226,11 @@ int wxFileDialog::ShowModal() { HWND hWnd = 0; if (m_parent) hWnd = (HWND) m_parent->GetHWND(); + if (!hWnd && wxTheApp->GetTopWindow()) + hWnd = (HWND) wxTheApp->GetTopWindow()->GetHWND(); - static wxChar fileNameBuffer [ MAXPATH ]; // the file-name - wxChar titleBuffer [ MAXFILE+1+MAXEXT ]; // the file-name, without path + static wxChar fileNameBuffer [ wxMAXPATH ]; // the file-name + wxChar titleBuffer [ wxMAXFILE+1+wxMAXEXT ]; // the file-name, without path *fileNameBuffer = wxT('\0'); *titleBuffer = wxT('\0'); @@ -226,22 +248,23 @@ int wxFileDialog::ShowModal() OFN_ALLOWMULTISELECT; OPENFILENAME of; - memset(&of, 0, sizeof(OPENFILENAME)); - - of.lpstrCustomFilter = NULL; // system should not save custom filter - of.nMaxCustFilter = 0L; - - of.nFileOffset = 0; // 0-based pointer to filname in lpstFile - of.nFileExtension = 0; // 0-based pointer to extension in lpstrFile - of.lpstrDefExt = NULL; // no default extension + wxZeroMemory(of); + // the OPENFILENAME struct has been extended in newer version of + // comcdlg32.dll, but as we don't use the extended fields anyhow, set + // the struct size to the old value - otherwise, the programs compiled + // with new headers will not work with the old libraries +#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500) + of.lStructSize = sizeof(OPENFILENAME) - + (sizeof(void *) + 2*sizeof(DWORD)); +#else // old headers of.lStructSize = sizeof(OPENFILENAME); +#endif + of.hwndOwner = hWnd; of.lpstrTitle = WXSTRINGCAST m_message; - - of.lpstrFileTitle = titleBuffer; - of.nMaxFileTitle = MAXFILE + 1 + MAXEXT; // Windows 3.0 and 3.1 + of.nMaxFileTitle = wxMAXFILE + 1 + wxMAXEXT; // Windows 3.0 and 3.1 // Convert forward slashes to backslashes (file selector doesn't like // forward slashes) @@ -298,17 +321,39 @@ int wxFileDialog::ShowModal() //=== Setting defaultFileName >>========================================= - wxStrncpy( fileNameBuffer, (const wxChar *)m_fileName, MAXPATH-1 ); - fileNameBuffer[ MAXPATH-1 ] = wxT('\0'); + wxStrncpy( fileNameBuffer, (const wxChar *)m_fileName, wxMAXPATH-1 ); + fileNameBuffer[ wxMAXPATH-1 ] = wxT('\0'); of.lpstrFile = fileNameBuffer; // holds returned filename - of.nMaxFile = MAXPATH; + of.nMaxFile = wxMAXPATH; //== Execute FileDialog >>================================================= bool success = (m_dialogStyle & wxSAVE) ? (GetSaveFileName(&of) != 0) : (GetOpenFileName(&of) != 0); + DWORD errCode = CommDlgExtendedError(); + +#ifdef __WIN32__ + if (!success && (errCode == CDERR_STRUCTSIZE)) + { + // The struct size has changed so try a smaller or bigger size + + int oldStructSize = of.lStructSize; + of.lStructSize = oldStructSize - (sizeof(void *) + 2*sizeof(DWORD)); + success = (m_dialogStyle & wxSAVE) ? (GetSaveFileName(&of) != 0) + : (GetOpenFileName(&of) != 0); + errCode = CommDlgExtendedError(); + + if (!success && (errCode == CDERR_STRUCTSIZE)) + { + of.lStructSize = oldStructSize + (sizeof(void *) + 2*sizeof(DWORD)); + success = (m_dialogStyle & wxSAVE) ? (GetSaveFileName(&of) != 0) + : (GetOpenFileName(&of) != 0); + } + } +#endif + if ( success ) { m_fileNames.Empty(); @@ -379,8 +424,8 @@ int wxFileDialog::ShowModal() m_fileName = wxString(fileNameBuffer) + extension; int len = wxStrlen( fileNameBuffer ); - wxStrncpy( fileNameBuffer + len, extension, MAXPATH - len ); - fileNameBuffer[ MAXPATH -1 ] = wxT('\0'); + wxStrncpy( fileNameBuffer + len, extension, wxMAXPATH - len ); + fileNameBuffer[ wxMAXPATH -1 ] = wxT('\0'); } } diff --git a/src/msw/files.lst b/src/msw/files.lst index 797f7ee036..26b4b3ba91 100644 --- a/src/msw/files.lst +++ b/src/msw/files.lst @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 17:48, 2000/03/09 +# This file was automatically generated by tmake at 20:37, 2001/09/30 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T! ALL_SOURCES = \ generic/busyinfo.cpp \ @@ -125,6 +125,7 @@ ALL_SOURCES = \ common/zstream.cpp \ msw/accel.cpp \ msw/app.cpp \ + msw/ole/automtn.cpp \ msw/bitmap.cpp \ msw/bmpbuttn.cpp \ msw/brush.cpp \ @@ -141,6 +142,7 @@ ALL_SOURCES = \ msw/curico.cpp \ msw/cursor.cpp \ msw/data.cpp \ + msw/ole/dataobj.cpp \ msw/dc.cpp \ msw/dcclient.cpp \ msw/dcmemory.cpp \ @@ -154,6 +156,8 @@ ALL_SOURCES = \ msw/dir.cpp \ msw/dirdlg.cpp \ msw/dragimag.cpp \ + msw/ole/dropsrc.cpp \ + msw/ole/droptgt.cpp \ msw/enhmeta.cpp \ msw/filedlg.cpp \ msw/font.cpp \ @@ -166,6 +170,8 @@ ALL_SOURCES = \ msw/gdiobj.cpp \ msw/glcanvas.cpp \ msw/gsocket.c \ + msw/gsockmsw.c \ + msw/helpchm.cpp \ msw/helpwin.cpp \ msw/icon.cpp \ msw/imaglist.cpp \ @@ -182,6 +188,7 @@ ALL_SOURCES = \ msw/msgdlg.cpp \ msw/nativdlg.cpp \ msw/notebook.cpp \ + msw/ole/oleutils.cpp \ msw/ownerdrw.cpp \ msw/palette.cpp \ msw/pen.cpp \ @@ -213,6 +220,7 @@ ALL_SOURCES = \ msw/treectrl.cpp \ msw/utils.cpp \ msw/utilsexc.cpp \ + msw/ole/uuid.cpp \ msw/wave.cpp \ msw/window.cpp \ msw/xpmhand.cpp \ @@ -301,6 +309,7 @@ ALL_HEADERS = \ filesys.h \ font.h \ fontdlg.h \ + fontenc.h \ fontenum.h \ fontmap.h \ fontutil.h \ @@ -483,6 +492,7 @@ ALL_HEADERS = \ msw/gdiimage.h \ msw/gdiobj.h \ msw/glcanvas.h \ + msw/helpchm.h \ msw/helpwin.h \ msw/icon.h \ msw/imaglist.h \ @@ -516,6 +526,7 @@ ALL_HEADERS = \ msw/slider95.h \ msw/slidrmsw.h \ msw/spinbutt.h \ + msw/spinctrl.h \ msw/statbmp.h \ msw/statbox.h \ msw/statbr95.h \ @@ -533,6 +544,14 @@ ALL_HEADERS = \ msw/window.h \ msw/winundef.h \ msw/xpmhand.h \ + msw/ole/automtn.h \ + msw/ole/dataform.h \ + msw/ole/dataobj.h \ + msw/ole/dataobj2.h \ + msw/ole/dropsrc.h \ + msw/ole/droptgt.h \ + msw/ole/oleutils.h \ + msw/ole/uuid.h \ generic/calctrl.h \ generic/caret.h \ generic/choicdgg.h \ @@ -886,6 +905,8 @@ GUIOBJS = \ gdiobj.o \ glcanvas.o \ gsocket.o \ + gsockmsw.o \ + helpchm.o \ helpwin.o \ icon.o \ imaglist.o \ @@ -981,6 +1002,8 @@ GUIDEPS = \ gdiobj.d \ glcanvas.d \ gsocket.d \ + gsockmsw.d \ + helpchm.d \ helpwin.d \ icon.d \ imaglist.d \ @@ -1080,6 +1103,22 @@ HTMLDEPS = \ m_tables.d \ winpars.d +OLEOBJS = \ + automtn.o \ + dataobj.o \ + dropsrc.o \ + droptgt.o \ + oleutils.o \ + uuid.o + +OLEDEPS = \ + automtn.d \ + dataobj.d \ + dropsrc.d \ + droptgt.d \ + oleutils.d \ + uuid.d + IODBCOBJS = \ IODBCDEPS = \ diff --git a/src/msw/font.cpp b/src/msw/font.cpp index e02b116efa..472b616884 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -41,6 +41,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the default font size in points +static const int wxDEFAULT_FONT_SIZE = 12; + // ---------------------------------------------------------------------------- // wxFontRefData - the internal description of the font // ---------------------------------------------------------------------------- @@ -52,7 +59,7 @@ friend class WXDLLEXPORT wxFont; public: wxFontRefData() { - Init(12, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, + Init(wxDEFAULT_FONT_SIZE, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, "", wxFONTENCODING_DEFAULT); } @@ -143,7 +150,7 @@ wxFontRefData::~wxFontRefData() { if ( !::DeleteObject((HFONT) m_hFont) ) { - wxLogLastError("DeleteObject(font)"); + wxLogLastError(wxT("DeleteObject(font)")); } } } @@ -170,6 +177,12 @@ bool wxFont::Create(int pointSize, wxFontEncoding encoding) { UnRef(); + + // wxDEFAULT is a valid value for the font size too so we must treat it + // specially here (otherwise the size would be 70 == wxDEFAULT value) + if ( pointSize == wxDEFAULT ) + pointSize = wxDEFAULT_FONT_SIZE; + m_refData = new wxFontRefData(pointSize, family, style, weight, underlined, faceName, encoding); @@ -203,7 +216,7 @@ bool wxFont::RealizeResource() M_FONTDATA->m_faceName = lf.lfFaceName; if ( !M_FONTDATA->m_hFont ) { - wxLogLastError("CreateFont"); + wxLogLastError(wxT("CreateFont")); return FALSE; } @@ -217,7 +230,7 @@ bool wxFont::FreeResource(bool force) { if ( !::DeleteObject((HFONT) M_FONTDATA->m_hFont) ) { - wxLogLastError("DeleteObject(font)"); + wxLogLastError(wxT("DeleteObject(font)")); } M_FONTDATA->m_hFont = 0; @@ -228,6 +241,11 @@ bool wxFont::FreeResource(bool force) } WXHANDLE wxFont::GetResourceHandle() +{ + return GetHFONT(); +} + +WXHFONT wxFont::GetHFONT() const { if ( !M_FONTDATA ) return 0; diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index f91b00c91f..b547ec12f4 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -41,15 +41,21 @@ // private classes // ---------------------------------------------------------------------------- +// the helper class which calls ::EnumFontFamilies() and whose OnFont() is +// called from the callback passed to this function and, in its turn, calls the +// appropariate wxFontEnumerator method class wxFontEnumeratorHelper { public: wxFontEnumeratorHelper(wxFontEnumerator *fontEnum); // control what exactly are we enumerating + // we enumerate fonts with given enocding bool SetEncoding(wxFontEncoding encoding); - void SetFixedOnly(bool fixedOnly) - { m_fixedOnly = fixedOnly; } + // we enumerate fixed-width fonts + void SetFixedOnly(bool fixedOnly) { m_fixedOnly = fixedOnly; } + // we enumerate the encodings available in this family + void SetFamily(const wxString& family); // call to start enumeration void DoEnumerate(); @@ -67,8 +73,17 @@ private: // if not empty, enum only the fonts with this facename wxString m_facename; + // if not empty, enum only the fonts in this family + wxString m_family; + // if TRUE, enum only fixed fonts bool m_fixedOnly; + + // if TRUE, we enumerate the encodings, not fonts + bool m_enumEncodings; + + // the list of charsets we already found while enumerating charsets + wxArrayInt m_charsets; }; // ---------------------------------------------------------------------------- @@ -89,8 +104,15 @@ int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm, wxFontEnumeratorHelper::wxFontEnumeratorHelper(wxFontEnumerator *fontEnum) { m_fontEnum = fontEnum; - m_charset = -1; + m_charset = DEFAULT_CHARSET; m_fixedOnly = FALSE; + m_enumEncodings = FALSE; +} + +void wxFontEnumeratorHelper::SetFamily(const wxString& family) +{ + m_enumEncodings = TRUE; + m_family = family; } bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) @@ -111,7 +133,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) } #if defined(__GNUWIN32__) - #if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) + #if wxUSE_NORLANDER_HEADERS #define wxFONTENUMPROC int(*)(const LOGFONTA *, const TEXTMETRICA *, long unsigned int, LPARAM) #else #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM) @@ -147,6 +169,25 @@ void wxFontEnumeratorHelper::DoEnumerate() bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf, const LPTEXTMETRIC tm) const { + if ( m_enumEncodings ) + { + // is this a new charset? + int cs = lf->lfCharSet; + if ( m_charsets.Index(cs) == wxNOT_FOUND ) + { + wxConstCast(this, wxFontEnumeratorHelper)->m_charsets.Add(cs); + + wxFontEncoding enc = wxGetFontEncFromCharSet(cs); + return m_fontEnum->OnFontEncoding(lf->lfFaceName, + wxFontMapper::GetEncodingName(enc)); + } + else + { + // continue enumeration + return TRUE; + } + } + if ( m_fixedOnly ) { // check that it's a fixed pitch font (there is *no* error here, the @@ -191,7 +232,9 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, bool wxFontEnumerator::EnumerateEncodings(const wxString& family) { - wxFAIL_MSG(wxT("TODO")); + wxFontEnumeratorHelper fe(this); + fe.SetFamily(family); + fe.DoEnumerate(); return TRUE; } diff --git a/src/msw/fontutil.cpp b/src/msw/fontutil.cpp index 04ad8a0548..a5b4de99d7 100644 --- a/src/msw/fontutil.cpp +++ b/src/msw/fontutil.cpp @@ -94,7 +94,7 @@ bool wxNativeEncodingInfo::FromString(const wxString& s) wxString wxNativeEncodingInfo::ToString() const { wxString s; - + s << (long)encoding << _T(';') << facename; if ( charset != ANSI_CHARSET ) { @@ -173,7 +173,7 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, } info->encoding = encoding; - + return TRUE; } @@ -198,6 +198,69 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info) return TRUE; } +// ---------------------------------------------------------------------------- +// wxFontEncoding <-> CHARSET_XXX +// ---------------------------------------------------------------------------- + +wxFontEncoding wxGetFontEncFromCharSet(int cs) +{ + wxFontEncoding fontEncoding; + + switch ( cs ) + { + default: + // JACS: Silently using ANSI_CHARSET + // apparently works for Chinese Windows. Assume it works + // for all/most other languages. + //wxFAIL_MSG(wxT("unsupported charset")); + // fall through + + case ANSI_CHARSET: + fontEncoding = wxFONTENCODING_CP1252; + break; + +#ifdef __WIN32__ + case EASTEUROPE_CHARSET: + fontEncoding = wxFONTENCODING_CP1250; + break; + + case BALTIC_CHARSET: + fontEncoding = wxFONTENCODING_CP1257; + break; + + case RUSSIAN_CHARSET: + fontEncoding = wxFONTENCODING_CP1251; + break; + + case ARABIC_CHARSET: + fontEncoding = wxFONTENCODING_CP1256; + break; + + case GREEK_CHARSET: + fontEncoding = wxFONTENCODING_CP1253; + break; + + case HEBREW_CHARSET: + fontEncoding = wxFONTENCODING_CP1255; + break; + + case TURKISH_CHARSET: + fontEncoding = wxFONTENCODING_CP1254; + break; + + case THAI_CHARSET: + fontEncoding = wxFONTENCODING_CP437; + break; +#endif // Win32 + + case OEM_CHARSET: + fontEncoding = wxFONTENCODING_CP437; + break; + } + + return fontEncoding; +} + // ---------------------------------------------------------------------------- // wxFont <-> LOGFONT conversion // ---------------------------------------------------------------------------- @@ -410,59 +473,8 @@ wxFont wxCreateFontFromLogFont(const LOGFONT *logFont) #endif int fontPoints = (int) (((72.0*((double)height))/(double) ppInch) + 0.5); - wxFontEncoding fontEncoding; - switch ( logFont->lfCharSet ) - { - default: - wxFAIL_MSG(wxT("unsupported charset")); - // fall through - - case ANSI_CHARSET: - fontEncoding = wxFONTENCODING_CP1252; - break; - -#ifdef __WIN32__ - case EASTEUROPE_CHARSET: - fontEncoding = wxFONTENCODING_CP1250; - break; - - case BALTIC_CHARSET: - fontEncoding = wxFONTENCODING_CP1257; - break; - - case RUSSIAN_CHARSET: - fontEncoding = wxFONTENCODING_CP1251; - break; - - case ARABIC_CHARSET: - fontEncoding = wxFONTENCODING_CP1256; - break; - - case GREEK_CHARSET: - fontEncoding = wxFONTENCODING_CP1253; - break; - - case HEBREW_CHARSET: - fontEncoding = wxFONTENCODING_CP1255; - break; - - case TURKISH_CHARSET: - fontEncoding = wxFONTENCODING_CP1254; - break; - - case THAI_CHARSET: - fontEncoding = wxFONTENCODING_CP437; - break; -#endif - - case OEM_CHARSET: - fontEncoding = wxFONTENCODING_CP437; - break; - } - return wxFont(fontPoints, fontFamily, fontStyle, fontWeight, fontUnderline, fontFace, - fontEncoding); + wxGetFontEncFromCharSet(logFont->lfCharSet)); } - diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index ac077260fa..9012102532 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -38,6 +38,7 @@ #include "wx/settings.h" #include "wx/dcclient.h" #include "wx/mdi.h" + #include "wx/panel.h" #endif // WX_PRECOMP #include "wx/msw/private.h" @@ -106,9 +107,14 @@ void wxFrame::Init() m_fsStatusBarFields = 0; m_fsStatusBarHeight = 0; m_fsToolBarHeight = 0; -// m_fsMenu = 0; +// m_fsMenu = 0; m_fsIsMaximized = FALSE; m_fsIsShowing = FALSE; + + m_winLastFocused = (wxWindow *)NULL; + + // unlike (almost?) all other windows, frames are created hidden + m_isShown = FALSE; } bool wxFrame::Create(wxWindow *parent, @@ -148,13 +154,13 @@ bool wxFrame::Create(wxWindow *parent, if ((m_windowStyle & wxFRAME_FLOAT_ON_PARENT) == 0) parent = NULL; - if (!parent) - wxTopLevelWindows.Append(this); + wxTopLevelWindows.Append(this); MSWCreate(m_windowId, parent, wxFrameClassName, this, title, x, y, width, height, style); wxModelessWindows.Append(this); + return TRUE; } @@ -163,6 +169,9 @@ wxFrame::~wxFrame() m_isBeingDeleted = TRUE; wxTopLevelWindows.DeleteObject(this); + // the ~wxToolBar() code relies on the previous line to be executed before + // this one, i.e. the frame should remove itself from wxTopLevelWindows + // before destorying its toolbar DeleteAllBars(); if (wxTheApp && (wxTopLevelWindows.Number() == 0)) @@ -240,8 +249,8 @@ void wxFrame::DoSetClientSize(int width, int height) #endif // wxUSE_STATUSBAR wxPoint pt(GetClientAreaOrigin()); - actual_width += pt.y; - actual_height += pt.x; + actual_width += pt.x; + actual_height += pt.y; POINT point; point.x = rect2.left; @@ -287,6 +296,10 @@ void wxFrame::DoShowWindow(int nShowCmd) bool wxFrame::Show(bool show) { + // don't use wxWindow version as we want to call DoShowWindow() + if ( !wxWindowBase::Show(show) ) + return FALSE; + DoShowWindow(show ? SW_SHOW : SW_HIDE); if ( show ) @@ -318,7 +331,15 @@ void wxFrame::Iconize(bool iconize) void wxFrame::Maximize(bool maximize) { - DoShowWindow(maximize ? SW_MAXIMIZE : SW_RESTORE); + // maximizing a hidden frame shows it - which is often much worse than not + // maximizing it at all + // + // the correct workaround for this bug breaks binary compatibility and so + // is only in 2.3 + if ( IsShown() ) + { + DoShowWindow(maximize ? SW_MAXIMIZE : SW_RESTORE); + } } void wxFrame::Restore() @@ -404,75 +425,57 @@ void wxFrame::PositionStatusBar() void wxFrame::DetachMenuBar() { - if (m_frameMenuBar) + if ( m_frameMenuBar ) { m_frameMenuBar->Detach(); m_frameMenuBar = NULL; } } -void wxFrame::SetMenuBar(wxMenuBar *menu_bar) +void wxFrame::SetMenuBar(wxMenuBar *menubar) { - if (!menu_bar) + if ( !menubar ) { DetachMenuBar(); - return; + + // actually remove the menu from the frame + m_hMenu = (WXHMENU)0; + InternalSetMenuBar(); } - - m_frameMenuBar = NULL; - - // Can set a menubar several times. - // TODO: how to prevent a memory leak if you have a currently-unattached - // menubar? wxWindows assumes that the frame will delete the menu (otherwise - // there are problems for MDI). - if (menu_bar->GetHMenu()) + else // set new non NULL menu bar { - m_hMenu = menu_bar->GetHMenu(); + m_frameMenuBar = NULL; + + // Can set a menubar several times. + // TODO: how to prevent a memory leak if you have a currently-unattached + // menubar? wxWindows assumes that the frame will delete the menu (otherwise + // there are problems for MDI). + if ( menubar->GetHMenu() ) + { + m_hMenu = menubar->GetHMenu(); + } + else + { + menubar->Detach(); + + m_hMenu = menubar->Create(); + + if ( !m_hMenu ) + return; + } + + InternalSetMenuBar(); + + m_frameMenuBar = menubar; + menubar->Attach(this); } - else - { - menu_bar->Detach(); - - m_hMenu = menu_bar->Create(); - - if ( !m_hMenu ) - return; - } - - InternalSetMenuBar(); - - m_frameMenuBar = menu_bar; - menu_bar->Attach(this); - -#if 0 // Old code that assumes only one call of SetMenuBar per frame. - if (!menu_bar) - { - DetachMenuBar(); - return; - } - - wxCHECK_RET( !menu_bar->GetFrame(), wxT("this menubar is already attached") ); - - if (m_frameMenuBar) - delete m_frameMenuBar; - - m_hMenu = menu_bar->Create(); - - if ( !m_hMenu ) - return; - - InternalSetMenuBar(); - - m_frameMenuBar = menu_bar; - menu_bar->Attach(this); -#endif } void wxFrame::InternalSetMenuBar() { if ( !::SetMenu(GetHwnd(), (HMENU)m_hMenu) ) { - wxLogLastError("SetMenu"); + wxLogLastError(wxT("SetMenu")); } } @@ -504,8 +507,8 @@ bool wxFrame::ShowFullScreen(bool show, long style) m_fsIsShowing = TRUE; m_fsStyle = style; - wxToolBar *theToolBar = GetToolBar(); - wxStatusBar *theStatusBar = GetStatusBar(); + wxToolBar *theToolBar = GetToolBar(); + wxStatusBar *theStatusBar = GetStatusBar(); int dummyWidth; @@ -528,9 +531,10 @@ bool wxFrame::ShowFullScreen(bool show, long style) // Save the number of fields in the statusbar if ((style & wxFULLSCREEN_NOSTATUSBAR) && theStatusBar) { - m_fsStatusBarFields = theStatusBar->GetFieldsCount(); - SetStatusBar((wxStatusBar*) NULL); - delete theStatusBar; + //m_fsStatusBarFields = theStatusBar->GetFieldsCount(); + //SetStatusBar((wxStatusBar*) NULL); + //delete theStatusBar; + theStatusBar->Show(FALSE); } else m_fsStatusBarFields = 0; @@ -540,11 +544,11 @@ bool wxFrame::ShowFullScreen(bool show, long style) // save the 'normal' window style m_fsOldWindowStyle = GetWindowLong((HWND)GetHWND(), GWL_STYLE); - // save the old position, width & height, maximize state + // save the old position, width & height, maximize state m_fsOldSize = GetRect(); - m_fsIsMaximized = IsMaximized(); + m_fsIsMaximized = IsMaximized(); - // decide which window style flags to turn off + // decide which window style flags to turn off LONG newStyle = m_fsOldWindowStyle; LONG offFlags = 0; @@ -592,10 +596,14 @@ bool wxFrame::ShowFullScreen(bool show, long style) theToolBar->Show(TRUE); } - if ((m_fsStyle & wxFULLSCREEN_NOSTATUSBAR) && (m_fsStatusBarFields > 0)) + if ((m_fsStyle & wxFULLSCREEN_NOSTATUSBAR)) // && (m_fsStatusBarFields > 0)) { - CreateStatusBar(m_fsStatusBarFields); - PositionStatusBar(); + //CreateStatusBar(m_fsStatusBarFields); + if (GetStatusBar()) + { + GetStatusBar()->Show(TRUE); + PositionStatusBar(); + } } if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && (m_hMenu != 0)) @@ -625,10 +633,17 @@ bool wxFrame::MSWCreate(int id, wxWindow *parent, const wxChar *wclass, wxWindow // could be the culprit. But without it, you can get a lot of flicker. DWORD msflags = 0; - if ((style & wxCAPTION) == wxCAPTION) - msflags = WS_OVERLAPPED; + if ( style & wxCAPTION ) + { + if ( style & wxFRAME_TOOL_WINDOW ) + msflags |= WS_POPUPWINDOW; + else + msflags |= WS_OVERLAPPED; + } else - msflags = WS_POPUP; + { + msflags |= WS_POPUP; + } if (style & wxMINIMIZE_BOX) msflags |= WS_MINIMIZEBOX; @@ -638,7 +653,7 @@ bool wxFrame::MSWCreate(int id, wxWindow *parent, const wxChar *wclass, wxWindow msflags |= WS_THICKFRAME; if (style & wxSYSTEM_MENU) msflags |= WS_SYSMENU; - if ((style & wxMINIMIZE) || (style & wxICONIZE)) + if ( style & wxMINIMIZE ) msflags |= WS_MINIMIZE; if (style & wxMAXIMIZE) msflags |= WS_MAXIMIZE; @@ -663,7 +678,7 @@ bool wxFrame::MSWCreate(int id, wxWindow *parent, const wxChar *wclass, wxWindow if ((style & wxTHICK_FRAME) == 0) msflags |= WS_BORDER; - WXDWORD extendedStyle = MakeExtendedStyle(style); + WXDWORD extendedStyle = MakeExtendedStyle(style, FALSE); #if !defined(__WIN16__) && !defined(__SC__) if (style & wxFRAME_TOOL_WINDOW) @@ -686,41 +701,61 @@ bool wxFrame::MSWCreate(int id, wxWindow *parent, const wxChar *wclass, wxWindow return TRUE; } +void wxFrame::RemoveChild(wxWindowBase *child) +{ + if ( child == m_winLastFocused ) + m_winLastFocused = NULL; + + wxFrameBase::RemoveChild(child); +} + // Default activation behaviour - set the focus for the first child // subwindow found. void wxFrame::OnActivate(wxActivateEvent& event) { - if ( !event.GetActive() ) + if ( event.GetActive() ) { - event.Skip(); + // restore focus to the child which was last focused + wxLogTrace(_T("focus"), _T("wxFrame %08x activated."), m_hWnd); - return; - } - - wxLogTrace(_T("focus"), _T("wxFrame %08x activated."), m_hWnd); - - for ( wxWindowList::Node *node = GetChildren().GetFirst(); - node; - node = node->GetNext() ) - { - // FIXME all this is totally bogus - we need to do the same as wxPanel, - // but how to do it without duplicating the code? - - // restore focus - wxWindow *child = node->GetData(); - - if ( !child->IsTopLevel() -#if wxUSE_TOOLBAR - && !wxDynamicCast(child, wxToolBar) -#endif // wxUSE_TOOLBAR -#if wxUSE_STATUSBAR - && !wxDynamicCast(child, wxStatusBar) -#endif // wxUSE_STATUSBAR - ) + wxWindow *parent = m_winLastFocused ? m_winLastFocused->GetParent() + : NULL; + if ( !parent ) { - child->SetFocus(); - break; + parent = this; } + + wxSetFocusToChild(parent, &m_winLastFocused); + } + else // deactivating + { + // remember the last focused child if it is our child + m_winLastFocused = FindFocus(); + + // so we NULL it out if it's a child from some other frame + wxWindow *win = m_winLastFocused; + while ( win ) + { + if ( win->IsTopLevel() ) + { + if ( win != this ) + { + m_winLastFocused = NULL; + } + + break; + } + + win = win->GetParent(); + } + + wxLogTrace(_T("focus"), + _T("wxFrame %08x deactivated, last focused: %08x."), + m_hWnd, + m_winLastFocused ? GetHwndOf(m_winLastFocused) + : NULL); + + event.Skip(); } } @@ -766,6 +801,8 @@ void wxFrame::PositionToolBar() else { tw = rect.right; + if ( GetToolBar()->HasFlag(wxTB_FLAT ) ) + th -= 3; } // Use the 'real' MSW position here @@ -789,6 +826,16 @@ void wxFrame::IconizeChildFrames(bool bIconize) { wxWindow *win = node->GetData(); + // iconizing the frames with this style under Win95 shell puts them at + // the bottom of the screen (as the MDI children) instead of making + // them appear in the taskbar because they are, by virtue of this + // style, not managed by the taskbar - instead leave Windows take care + // of them +#ifdef __WIN95__ + if ( win->GetWindowStyle() & wxFRAME_TOOL_WINDOW ) + continue; +#endif // Win95 + // the child MDI frames are a special case and should not be touched by // the parent frame - instead, they are managed by the user wxFrame *frame = wxDynamicCast(win, wxFrame); @@ -962,7 +1009,15 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu) else { // don't give hints for separators (doesn't make sense) nor for the - // items opening popup menus (they don't have them anyhow) + // items opening popup menus (they don't have them anyhow) but do clear + // the status line - otherwise, we would be left with the help message + // for the previous item which doesn't apply any more + wxStatusBar *statbar = GetStatusBar(); + if ( statbar ) + { + statbar->SetStatusText(wxEmptyString); + } + return FALSE; } diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index c43b527cb6..4f1bff7201 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -1,16 +1,24 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gauge95.cpp +// Name: src/msw/gauge95.cpp // Purpose: wxGauge95 class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #ifdef __GNUG__ -#pragma implementation "gauge95.h" + #pragma implementation "gauge95.h" #endif // For compilers that support precompilation, includes "wx.h". @@ -21,7 +29,7 @@ #endif #ifndef WX_PRECOMP -#include "wx/defs.h" + #include "wx/defs.h" #endif #if wxUSE_GAUGE && defined(__WIN95__) @@ -33,8 +41,37 @@ #include #endif +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// old commctrl.h (< 4.71) don't have those +#ifndef PBS_SMOOTH + #define PBS_SMOOTH 0x01 +#endif + +#ifndef PBS_VERTICAL + #define PBS_VERTICAL 0x04 +#endif + +#ifndef PBM_SETBARCOLOR + #define PBM_SETBARCOLOR (WM_USER+9) +#endif + +#ifndef PBM_SETBKCOLOR + #define PBM_SETBKCOLOR 0x2001 +#endif + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + IMPLEMENT_DYNAMIC_CLASS(wxGauge95, wxControl) +// ============================================================================ +// implementation +// ============================================================================ + bool wxGauge95::Create(wxWindow *parent, wxWindowID id, int range, const wxPoint& pos, @@ -52,8 +89,8 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id, m_rangeMax = range; m_gaugePos = 0; - SetBackgroundColour(parent->GetBackgroundColour()) ; - SetForegroundColour(parent->GetForegroundColour()) ; + SetBackgroundColour(parent->GetBackgroundColour()); + SetForegroundColour(parent->GetForegroundColour()); m_windowStyle = style; @@ -67,19 +104,11 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id, int width = size.x; int height = size.y; - long msFlags = WS_CHILD | WS_VISIBLE; - -#ifndef PBS_VERTICAL -#define PBS_VERTICAL 0x04 -#endif + long msFlags = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */; if (m_windowStyle & wxGA_VERTICAL) msFlags |= PBS_VERTICAL; -#ifndef PBS_SMOOTH -#define PBS_SMOOTH 0x01 -#endif - if (m_windowStyle & wxGA_SMOOTH) msFlags |= PBS_SMOOTH; @@ -130,22 +159,22 @@ void wxGauge95::SetValue(int pos) SendMessage((HWND) GetHWND(), PBM_SETPOS, pos, 0); } -int wxGauge95::GetShadowWidth(void) const +int wxGauge95::GetShadowWidth() const { return 0; } -int wxGauge95::GetBezelFace(void) const +int wxGauge95::GetBezelFace() const { return 0; } -int wxGauge95::GetRange(void) const +int wxGauge95::GetRange() const { return m_rangeMax; } -int wxGauge95::GetValue(void) const +int wxGauge95::GetValue() const { return m_gaugePos; } @@ -155,7 +184,7 @@ bool wxGauge95::SetForegroundColour(const wxColour& col) if ( !wxControl::SetForegroundColour(col) ) return FALSE; - m_foregroundColour = col ; + SendMessage(GetHwnd(), PBM_SETBARCOLOR, 0, (LPARAM)wxColourToRGB(col)); return TRUE; } @@ -165,7 +194,7 @@ bool wxGauge95::SetBackgroundColour(const wxColour& col) if ( !wxControl::SetBackgroundColour(col) ) return FALSE; - m_backgroundColour = col ; + SendMessage(GetHwnd(), PBM_SETBKCOLOR, 0, (LPARAM)wxColourToRGB(col)); return TRUE; } diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp index cb8c2b91d5..278fbfce57 100644 --- a/src/msw/gaugemsw.cpp +++ b/src/msw/gaugemsw.cpp @@ -104,7 +104,10 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id, int height = size.y; long msFlags = WS_CHILD | WS_VISIBLE | WS_TABSTOP; - msFlags |= ZYZGS_3D; + bool want3D; + WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D); + if (want3D) + msFlags |= ZYZGS_3D; HWND wx_button = CreateWindowEx(MakeExtendedStyle(m_windowStyle), wxT("zYzGauge"), NULL, msFlags, @@ -129,6 +132,9 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id, SendMessage(GetHwnd(), ZYZG_SETFGCOLOR, 0, RGB(GetForegroundColour().Red(), GetForegroundColour().Green(), GetForegroundColour().Blue())); SendMessage(GetHwnd(), ZYZG_SETBKCOLOR, 0, RGB(GetBackgroundColour().Red(), GetBackgroundColour().Green(), GetBackgroundColour().Blue())); + //SetBezelFace(1); + //SetShadowWidth(1); + SetFont(parent->GetFont()); if (width == -1) diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index bc4c53ec52..4dbeeff6a6 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -330,7 +330,7 @@ bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, BITMAP bm; if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(BITMAP), (LPSTR) &bm) ) { - wxLogLastError("GetObject(HBITMAP)"); + wxLogLastError(wxT("GetObject(HBITMAP)")); } data->m_width = bm.bmWidth; @@ -400,7 +400,53 @@ bool wxICOFileHandler::LoadIcon(wxIcon *icon, wxSize size; #ifdef __WIN32__ - HICON hicon = ::ExtractIcon(wxGetInstance(), name, 0 /* first */); + HICON hicon = NULL; + + // Parse the filename: it may be of the form + // filename;n in order to specify the nth icon in the file. + // For the moment, ignore the issue of possible semicolons in the filename. + int iconIndex = 0; + wxString name1(name); + wxString strIconIndex = name.AfterLast(wxT(';')); + if (strIconIndex != name) + { + iconIndex = wxAtoi(strIconIndex); + name1 = name.BeforeLast(wxT(';')); + } + + // were we asked for a large icon? + if ( desiredWidth == ::GetSystemMetrics(SM_CXICON) && + desiredHeight == ::GetSystemMetrics(SM_CYICON) ) + { + // get the specified large icon from file + if ( !::ExtractIconEx(name1, iconIndex, &hicon, NULL, 1) ) + { + // it is not an error, but it might still be useful to be informed + // about it optionally + wxLogTrace(_T("iconload"), + _T("No large icons found in the file '%s'."), + name.c_str()); + } + } + else if ( desiredWidth == ::GetSystemMetrics(SM_CXSMICON) && + desiredHeight == ::GetSystemMetrics(SM_CYSMICON) ) + { + // get the specified small icon from file + if ( !::ExtractIconEx(name1, iconIndex, NULL, &hicon, 1) ) + { + wxLogTrace(_T("iconload"), + _T("No small icons found in the file '%s'."), + name.c_str()); + } + } + //else: not standard size, load below + + if ( !hicon ) + { + // take any (the first one) icon from the file by default + hicon = ::ExtractIcon(wxGetInstance(), name1, 0 /* first */); + } + if ( !hicon ) { wxLogSysError(_T("Failed to load icon from the file '%s'"), @@ -419,11 +465,10 @@ bool wxICOFileHandler::LoadIcon(wxIcon *icon, if ( (desiredWidth != -1 && desiredWidth != size.x) || (desiredHeight != -1 && desiredHeight != size.y) ) { - wxLogDebug(_T("Returning FALSE from wxICOFileHandler::Load because " - "of the size mismatch: actual (%d, %d), " - "requested (%d, %d)"), - size.x, size.y, - desiredWidth, desiredHeight); + wxLogTrace(_T("iconload"), + _T("Returning FALSE from wxICOFileHandler::Load because of the size mismatch: actual (%d, %d), requested (%d, %d)"), + size.x, size.y, + desiredWidth, desiredHeight); ::DestroyIcon(hicon); @@ -488,7 +533,7 @@ static wxSize GetHiconSize(HICON hicon) ICONINFO info; if ( !::GetIconInfo(hicon, &info) ) { - wxLogLastError("GetIconInfo"); + wxLogLastError(wxT("GetIconInfo")); } else { diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index f415d6030a..78c1a4bd2d 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -49,7 +49,7 @@ wxGLContext::wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette) m_hDC = win->GetHDC(); m_glContext = wglCreateContext((HDC) m_hDC); - wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" ); + wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") ); wglMakeCurrent((HDC) m_hDC, m_glContext); } @@ -65,7 +65,7 @@ wxGLContext::wxGLContext( m_hDC = win->GetHDC(); m_glContext = wglCreateContext((HDC) m_hDC); - wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" ); + wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") ); if( other != 0 ) wglShareLists( other->m_glContext, m_glContext ); @@ -179,7 +179,7 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent, m_glContext = new wxGLContext(TRUE, this, palette, shared ); } -// Not very usefull for wxMSW, but this is to be wxGTK compliant +// Not very useful for wxMSW, but this is to be wxGTK compliant wxGLCanvas::wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name, @@ -218,6 +218,17 @@ wxGLCanvas::~wxGLCanvas() bool wxGLCanvas::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { +/* Suggestion from Kelly Brock (not yet implemented): + +OpenGL corruption fix is simple assuming it doesn't screw anything else +up. Add the following line to the top of the create function: + wxSize parentSize = GetClientSize(); + All locations within the function that use 'size' are changed to +'parentSize'. + The above corrects the initial display corruption with the GeForce and +TNT2, not sure about other NVidia cards yet. +*/ + static bool registeredGLCanvasClass = FALSE; // We have to register a special window class because we need @@ -262,7 +273,7 @@ bool wxGLCanvas::Create(wxWindow *parent, wxWindowID id, if ( !RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(wxGLCanvasClass)"); + wxLogLastError(wxT("RegisterClass(wxGLCanvasClass)")); return FALSE; } @@ -282,9 +293,17 @@ bool wxGLCanvas::Create(wxWindow *parent, wxWindowID id, if ( style & wxTHICK_FRAME ) msflags |= WS_THICKFRAME; - msflags |= WS_CHILD | WS_VISIBLE; - if ( style & wxCLIP_CHILDREN ) - msflags |= WS_CLIPCHILDREN; +/* + A general rule with OpenGL and Win32 is that any window that will have a + HGLRC built for it must have two flags: WS_CLIPCHILDREN & WS_CLIPSIBLINGS. + You can find references about this within the knowledge base and most OpenGL + books that contain the wgl function descriptions. +*/ + + msflags |= WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS; +// if ( style & wxCLIP_CHILDREN ) +// msflags |= WS_CLIPCHILDREN; + msflags |= WS_CLIPCHILDREN; bool want3D; WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D); @@ -340,13 +359,13 @@ void wxGLCanvas::SetupPixelFormat() // (HDC hDC) pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd); if (pixelFormat == 0) { - MessageBox(WindowFromDC((HDC) m_hDC), "ChoosePixelFormat failed.", "Error", + MessageBox(WindowFromDC((HDC) m_hDC), wxT("ChoosePixelFormat failed."), wxT("Error"), MB_ICONERROR | MB_OK); exit(1); } if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) { - MessageBox(WindowFromDC((HDC) m_hDC), "SetPixelFormat failed.", "Error", + MessageBox(WindowFromDC((HDC) m_hDC), wxT("SetPixelFormat failed."), wxT("Error"), MB_ICONERROR | MB_OK); exit(1); } diff --git a/src/msw/gsocket.c b/src/msw/gsocket.c index 47325c4320..19e66bda7d 100644 --- a/src/msw/gsocket.c +++ b/src/msw/gsocket.c @@ -97,7 +97,7 @@ GSocket *GSocket_new(void) if (!success) { free(socket); - return NULL; + socket = NULL; } return socket; @@ -1377,6 +1377,7 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf) * Translation unit shouldn't be empty, so include this typedef to make the * compiler (VC++ 6.0, for example) happy */ -typedef (*wxDummy)(); +typedef void (*wxDummy)(); #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */ + diff --git a/src/msw/gsockmsw.c b/src/msw/gsockmsw.c index d8ea3ae3c5..2ff0f7a2d1 100644 --- a/src/msw/gsockmsw.c +++ b/src/msw/gsockmsw.c @@ -58,8 +58,14 @@ # pragma warning(default:4115) /* named type definition in parentheses */ #endif +/* VZ: I don't know if _T() macro is always defined here? */ +#ifdef _UNICODE +#define CLASSNAME L"_GSocket_Internal_Window_Class" +#define WINDOWNAME L"_GSocket_Internal_Window_Name" +#else /* !Unicode */ #define CLASSNAME "_GSocket_Internal_Window_Class" #define WINDOWNAME "_GSocket_Internal_Window_Name" +#endif /* Unicode/!Unicode */ /* Maximum number of different GSocket objects at a given time. * This value can be modified at will, but it CANNOT be greater @@ -282,6 +288,7 @@ void _GSocket_Disable_Events(GSocket *socket) * Translation unit shouldn't be empty, so include this typedef to make the * compiler (VC++ 6.0, for example) happy */ -typedef (*wxDummy)(); +typedef void (*wxDummy)(); #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */ + diff --git a/src/msw/helpchm.cpp b/src/msw/helpchm.cpp new file mode 100644 index 0000000000..2fa6dd4495 --- /dev/null +++ b/src/msw/helpchm.cpp @@ -0,0 +1,152 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: helpchm.cpp +// Purpose: Help system: MS HTML Help implementation +// Author: Julian Smart +// Modified by: +// Created: 16/04/2000 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "helpchm.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/defs.h" +#endif + +#include "wx/filefn.h" + +#if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) +#include "wx/msw/helpchm.h" + +// This is found in the HTML Help Workshop installation, +// along with htmlhelp.lib. +#include + +#include + +#ifdef __WXMSW__ +#include "wx/msw/private.h" +#endif + +#include + +static HWND GetSuitableHWND() +{ + if (wxTheApp->GetTopWindow()) + return (HWND) wxTheApp->GetTopWindow()->GetHWND(); + else + return GetDesktopWindow(); +} + +IMPLEMENT_DYNAMIC_CLASS(wxCHMHelpController, wxHelpControllerBase) + +bool wxCHMHelpController::Initialize(const wxString& filename) +{ + m_helpFile = filename; + return TRUE; +} + +bool wxCHMHelpController::LoadFile(const wxString& file) +{ + if (!file.IsEmpty()) + m_helpFile = file; + return TRUE; +} + +bool wxCHMHelpController::DisplayContents() +{ + if (m_helpFile.IsEmpty()) return FALSE; + + wxString str = GetValidFilename(m_helpFile); + + HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_HELP_FINDER, 0L); + return TRUE; +} + +// Use topic or HTML filename +bool wxCHMHelpController::DisplaySection(const wxString& section) +{ + if (m_helpFile.IsEmpty()) return FALSE; + + wxString str = GetValidFilename(m_helpFile); + + // Is this an HTML file or a keyword? + bool isFilename = (section.Find(wxT(".htm")) != -1); + + if (isFilename) + HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_DISPLAY_TOPIC, (DWORD) (const wxChar*) section); + else + KeywordSearch(section); + return TRUE; +} + +// Use context number +bool wxCHMHelpController::DisplaySection(int section) +{ + if (m_helpFile.IsEmpty()) return FALSE; + + wxString str = GetValidFilename(m_helpFile); + + HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_HELP_CONTEXT, (DWORD)section); + return TRUE; +} + +bool wxCHMHelpController::DisplayBlock(long block) +{ + return DisplaySection(block); +} + +bool wxCHMHelpController::KeywordSearch(const wxString& k) +{ + if (m_helpFile.IsEmpty()) return FALSE; + + wxString str = GetValidFilename(m_helpFile); + + HH_AKLINK link; + link.cbStruct = sizeof(HH_AKLINK) ; + link.fReserved = FALSE ; + link.pszKeywords = k.c_str() ; + link.pszUrl = NULL ; + link.pszMsgText = NULL ; + link.pszMsgTitle = NULL ; + link.pszWindow = NULL ; + link.fIndexOnFail = TRUE ; + + HtmlHelp(GetSuitableHWND(), (const wxChar*) str, HH_KEYWORD_LOOKUP, (DWORD)& link); + return TRUE; +} + +bool wxCHMHelpController::Quit() +{ + HtmlHelp(GetSuitableHWND(), 0, HH_CLOSE_ALL, 0L); + return TRUE; +} + +// Append extension if necessary. +wxString wxCHMHelpController::GetValidFilename(const wxString& file) const +{ + wxString path, name, ext; + wxSplitPath(file, & path, & name, & ext); + + wxString fullName; + if (path.IsEmpty()) + fullName = name + wxT(".chm"); + else if (path.Last() == wxT('\\')) + fullName = path + name + wxT(".chm"); + else + fullName = path + wxT("\\") + name + wxT(".chm"); + return fullName; +} + +#endif // wxUSE_HELP diff --git a/src/msw/helpwin.cpp b/src/msw/helpwin.cpp index 66e868d54d..74d9160f7f 100644 --- a/src/msw/helpwin.cpp +++ b/src/msw/helpwin.cpp @@ -24,9 +24,11 @@ #include "wx/defs.h" #endif +#if wxUSE_HELP + +#include "wx/filefn.h" #include "wx/msw/helpwin.h" -#if wxUSE_HELP #include #ifdef __WXMSW__ @@ -35,124 +37,91 @@ #include -// MAX path length -#define _MAXPATHLEN 500 - -// MAX length of Help descriptor -#define _MAX_HELP_LEN 500 +static HWND GetSuitableHWND() +{ + if (wxTheApp->GetTopWindow()) + return (HWND) wxTheApp->GetTopWindow()->GetHWND(); + else + return GetDesktopWindow(); +} IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase) -wxWinHelpController::wxWinHelpController(void) -{ - m_helpFile = ""; -} - -wxWinHelpController::~wxWinHelpController(void) -{ -} - bool wxWinHelpController::Initialize(const wxString& filename) { - m_helpFile = filename; - return TRUE; + m_helpFile = filename; + return TRUE; } bool wxWinHelpController::LoadFile(const wxString& file) { - m_helpFile = file; - return TRUE; + if (!file.IsEmpty()) + m_helpFile = file; + return TRUE; } bool wxWinHelpController::DisplayContents(void) { - if (m_helpFile == wxT("")) return FALSE; - - wxString str = m_helpFile; - size_t len = str.Length(); - if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.'))) - str += wxT(".hlp"); - - if (wxTheApp->GetTopWindow()) - { + if (m_helpFile.IsEmpty()) return FALSE; + + wxString str = GetValidFilename(m_helpFile); + #if defined(__WIN95__) - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_FINDER, 0L); + WinHelp(GetSuitableHWND(), (const wxChar*) str, HELP_FINDER, 0L); #else - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTENTS, 0L); + WinHelp(GetSuitableHWND(), (const wxChar*) str, HELP_CONTENTS, 0L); #endif - return TRUE; - } - return FALSE; + return TRUE; } bool wxWinHelpController::DisplaySection(int section) { // Use context number - if (m_helpFile == wxT("")) return FALSE; + if (m_helpFile.IsEmpty()) return FALSE; + + wxString str = GetValidFilename(m_helpFile); - wxString str = m_helpFile; - size_t len = str.Length(); - if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.'))) - str += wxT(".hlp"); - - if (wxTheApp->GetTopWindow()) - { - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTEXT, (DWORD)section); - return TRUE; - } - return FALSE; + WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTEXT, (DWORD)section); + return TRUE; } bool wxWinHelpController::DisplayBlock(long block) { - // Use context number -- a very rough equivalent to block id! - if (m_helpFile == wxT("")) return FALSE; - - wxString str = m_helpFile; - size_t len = str.Length(); - if (!(str[(size_t)(len-1)] == 'p' && str[(size_t)(len-2)] == 'l' && str[(size_t)(len-3)] == 'h' && str[(size_t)(len-4)] == '.')) - str += wxT(".hlp"); - - if (wxTheApp->GetTopWindow()) - { - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTEXT, (DWORD)block); - return TRUE; - } - return FALSE; + DisplaySection(block); + return TRUE; } bool wxWinHelpController::KeywordSearch(const wxString& k) { - if (m_helpFile == wxT("")) return FALSE; - - wxString str = m_helpFile; - size_t len = str.Length(); - if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.'))) - str += wxT(".hlp"); - - if (wxTheApp->GetTopWindow()) - { - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k); - return TRUE; - } - return FALSE; + if (m_helpFile.IsEmpty()) return FALSE; + + wxString str = GetValidFilename(m_helpFile); + + WinHelp(GetSuitableHWND(), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k); + return TRUE; } // Can't close the help window explicitly in WinHelp bool wxWinHelpController::Quit(void) { - if (wxTheApp->GetTopWindow()) - { - WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), 0, HELP_QUIT, 0L); + WinHelp(GetSuitableHWND(), 0, HELP_QUIT, 0L); return TRUE; - } - else - return FALSE; } -// Don't get notified of WinHelp quitting -void wxWinHelpController::OnQuit(void) +// Append extension if necessary. +wxString wxWinHelpController::GetValidFilename(const wxString& file) const { + wxString path, name, ext; + wxSplitPath(file, & path, & name, & ext); + + wxString fullName; + if (path.IsEmpty()) + fullName = name + wxT(".hlp"); + else if (path.Last() == wxT('\\')) + fullName = path + name + wxT(".hlp"); + else + fullName = path + wxT("\\") + name + wxT(".hlp"); + return fullName; } #endif // wxUSE_HELP diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index 80fb47d876..1aaf15bf4c 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -113,20 +113,26 @@ void wxIcon::CopyFromBitmap(const wxBitmap& bmp) */ HDC dcSrc = ::CreateCompatibleDC(NULL); HDC dcDst = ::CreateCompatibleDC(NULL); - SelectObject(dcSrc, (HBITMAP)mask->GetMaskBitmap()); - SelectObject(dcDst, iconInfo.hbmColor); + HGDIOBJ hSrcOld = SelectObject(dcSrc, (HBITMAP)mask->GetMaskBitmap()), + hDstOld = SelectObject(dcDst, iconInfo.hbmColor); BitBlt(dcDst, 0, 0, bmp.GetWidth(), bmp.GetHeight(), dcSrc, 0, 0, SRCAND); - SelectObject(dcDst, NULL); - SelectObject(dcSrc, NULL); + SelectObject(dcDst, hSrcOld); + SelectObject(dcSrc, hDstOld); DeleteDC(dcDst); DeleteDC(dcSrc); HICON hicon = ::CreateIconIndirect(&iconInfo); + + if ( !::DeleteObject(iconInfo.hbmMask) ) + { + wxLogLastError(_T("DeleteObject")); + } + if ( !hicon ) { - wxLogLastError("CreateIconIndirect"); + wxLogLastError(wxT("CreateIconIndirect")); } else { diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp index 380f211450..f8a26cd036 100644 --- a/src/msw/imaglist.cpp +++ b/src/msw/imaglist.cpp @@ -64,7 +64,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject) // returns the mask if it's valid, otherwise the bitmap mask and, if it's not // valid neither, a "solid" mask (no transparent zones at all) -static wxBitmap GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask); +static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask); // ============================================================================ // implementation @@ -100,7 +100,7 @@ bool wxImageList::Create(int width, int height, bool mask, int initial) initial, 1); if ( !m_hImageList ) { - wxLogLastError("ImageList_Create()"); + wxLogLastError(wxT("ImageList_Create()")); } return m_hImageList != 0; @@ -127,6 +127,14 @@ int wxImageList::GetImageCount() const return ImageList_GetImageCount(GetHImageList()); } +// Returns the size (same for all images) of the images in the list +bool wxImageList::GetSize(int WXUNUSED(index), int &width, int &height) const +{ + wxASSERT_MSG( m_hImageList, _T("invalid image list") ); + + return ImageList_GetIconSize(GetHImageList(), &width, &height) != 0; +} + // ---------------------------------------------------------------------------- // wxImageList operations // ---------------------------------------------------------------------------- @@ -136,8 +144,7 @@ int wxImageList::GetImageCount() const // 'bitmap' and 'mask'. int wxImageList::Add(const wxBitmap& bitmap, const wxBitmap& mask) { - wxBitmap bmpMask = GetMaskForImage(bitmap, mask); - HBITMAP hbmpMask = wxInvertMask(GetHbitmapOf(bmpMask)); + HBITMAP hbmpMask = GetMaskForImage(bitmap, mask); int index = ImageList_Add(GetHImageList(), GetHbitmapOf(bitmap), hbmpMask); if ( index == -1 ) @@ -193,14 +200,13 @@ bool wxImageList::Replace(int index, wxFAIL_MSG(_T("ImageList_Replace not implemented in TWIN32")); return FALSE; #else - wxBitmap bmpMask = GetMaskForImage(bitmap, mask); - HBITMAP hbmpMask = wxInvertMask(GetHbitmapOf(bmpMask)); + HBITMAP hbmpMask = GetMaskForImage(bitmap, mask); bool ok = ImageList_Replace(GetHImageList(), index, GetHbitmapOf(bitmap), hbmpMask) != 0; if ( !ok ) { - wxLogLastError("ImageList_Add()"); + wxLogLastError(wxT("ImageList_Add()")); } ::DeleteObject(hbmpMask); @@ -215,7 +221,7 @@ bool wxImageList::Replace(int i, const wxIcon& icon) bool ok = ImageList_ReplaceIcon(GetHImageList(), i, GetHiconOf(icon)) != 0; if ( !ok ) { - wxLogLastError("ImageList_ReplaceIcon()"); + wxLogLastError(wxT("ImageList_ReplaceIcon()")); } return ok; @@ -231,7 +237,7 @@ bool wxImageList::Remove(int index) bool ok = ImageList_Remove(GetHImageList(), index) != 0; if ( !ok ) { - wxLogLastError("ImageList_Remove()"); + wxLogLastError(wxT("ImageList_Remove()")); } return ok; @@ -295,7 +301,7 @@ bool wxImageList::Draw(int index, bool ok = ImageList_Draw(GetHImageList(), index, hDC, x, y, style) != 0; if ( !ok ) { - wxLogLastError("ImageList_Draw()"); + wxLogLastError(wxT("ImageList_Draw()")); } return ok; @@ -306,36 +312,42 @@ bool wxImageList::Draw(int index, // helpers // ---------------------------------------------------------------------------- -static wxBitmap GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask) +static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask) { - wxBitmap bmpMask; + HBITMAP hbmpMask; + wxBitmap *bmpMask = NULL; if ( mask.Ok() ) { - bmpMask = mask; + hbmpMask = GetHbitmapOf(mask); } else { wxMask *pMask = bitmap.GetMask(); if ( pMask ) { - bmpMask.SetHBITMAP(pMask->GetMaskBitmap()); + hbmpMask = (HBITMAP)pMask->GetMaskBitmap(); + } + else + { + // create a non transparent mask - apparently, this is needed under + // Win9x (it doesn't behave correctly if it's passed 0 mask) + bmpMask = new wxBitmap(bitmap.GetWidth(), bitmap.GetHeight(), 1); + + wxMemoryDC dcMem; + dcMem.SelectObject(*bmpMask); + dcMem.Clear(); + dcMem.SelectObject(wxNullBitmap); + + hbmpMask = GetHbitmapOf(*bmpMask); } } - if ( !bmpMask.Ok() ) - { - // create a non transparent mask - apparently, this is needed under - // Win9x (it doesn't behave correctly if it's passed 0 mask) - bmpMask.Create(bitmap.GetWidth(), bitmap.GetHeight(), 1); + // windows mask convention is opposite to the wxWindows one + HBITMAP hbmpMaskInv = wxInvertMask(hbmpMask); + delete bmpMask; - wxMemoryDC dcMem; - dcMem.SelectObject(bmpMask); - dcMem.Clear(); - dcMem.SelectObject(wxNullBitmap); - } - - return bmpMask; + return hbmpMaskInv; } #endif // Win95 diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index cc177eab52..eca894e0db 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -28,6 +28,10 @@ #include "wx/utils.h" #endif //WX_PRECOMP +// Doesn't yet compile in Unicode mode + +#if wxUSE_CONFIG && !wxUSE_UNICODE + #include "wx/dynarray.h" #include "wx/log.h" #include "wx/config.h" @@ -79,19 +83,19 @@ wxIniConfig::wxIniConfig(const wxString& strAppName, m_strLocalFilename = localFilename; if (m_strLocalFilename.IsEmpty()) { - m_strLocalFilename = GetAppName() + ".ini"; + m_strLocalFilename = GetAppName() + wxT(".ini"); } // append the extension if none given and it's not an absolute file name // (otherwise we assume that they know what they're doing) if ( !wxIsPathSeparator(m_strLocalFilename[0u]) && - m_strLocalFilename.Find('.') == wxNOT_FOUND ) + m_strLocalFilename.Find(wxT('.')) == wxNOT_FOUND ) { - m_strLocalFilename << ".ini"; + m_strLocalFilename << wxT(".ini"); } // set root path - SetPath(""); + SetPath(wxT("")); } wxIniConfig::~wxIniConfig() @@ -380,7 +384,7 @@ bool wxIniConfig::Write(const wxString& szKey, const wxString& szValue) szValue, m_strLocalFilename) != 0; if ( !bOk ) - wxLogLastError("WritePrivateProfileString"); + wxLogLastError(wxT("WritePrivateProfileString")); return bOk; } @@ -424,7 +428,7 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso) NULL, m_strLocalFilename) != 0; if ( !bOk ) - wxLogLastError("WritePrivateProfileString"); + wxLogLastError(wxT("WritePrivateProfileString")); return bOk; } @@ -439,7 +443,7 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey) NULL, m_strLocalFilename) != 0; if ( !bOk ) - wxLogLastError("WritePrivateProfileString"); + wxLogLastError(wxT("WritePrivateProfileString")); return bOk; } @@ -458,11 +462,11 @@ bool wxIniConfig::DeleteAll() size_t nRc = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf)); if ( nRc == 0 ) { - wxLogLastError("GetWindowsDirectory"); + wxLogLastError(wxT("GetWindowsDirectory")); } else if ( nRc > WXSIZEOF(szBuf) ) { - wxFAIL_MSG("buffer is too small for Windows directory."); + wxFAIL_MSG(wxT("buffer is too small for Windows directory.")); } wxString strFile = szBuf; @@ -487,3 +491,6 @@ bool wxIniConfig::RenameGroup(const wxString& oldName, const wxString& newName) // Not implemented return FALSE; } + +#endif + // wxUSE_CONFIG && wxUSE_UNICODE diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 067fc11d90..d9b12e6970 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -156,7 +156,7 @@ bool wxListBox::Create(wxWindow *parent, m_windowStyle = style; DWORD wstyle = WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | - LBS_NOTIFY | LBS_HASSTRINGS; + LBS_NOTIFY | LBS_HASSTRINGS /* | WS_CLIPSIBLINGS */; if (m_windowStyle & wxLB_MULTIPLE) wstyle |= LBS_MULTIPLESEL; else if (m_windowStyle & wxLB_EXTENDED) @@ -221,8 +221,6 @@ bool wxListBox::Create(wxWindow *parent, SetSize(x, y, width, height); - Show(TRUE); - return TRUE; } @@ -237,6 +235,11 @@ void wxListBox::SetupColours() SetForegroundColour(GetParent()->GetForegroundColour()); } +bool wxListBox::HasMultipleSelection() const +{ + return (m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED); +} + // ---------------------------------------------------------------------------- // implementation of wxListBoxBase methods // ---------------------------------------------------------------------------- @@ -292,7 +295,12 @@ int wxListBox::DoAppend(const wxString& item) void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData) { - ShowWindow(GetHwnd(), SW_HIDE); + // avoid flicker - but don't need to do this for a hidden listbox + bool hideAndShow = IsShown(); + if ( hideAndShow ) + { + ShowWindow(GetHwnd(), SW_HIDE); + } ListBox_ResetContent(GetHwnd()); @@ -304,8 +312,12 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData) if ( clientData ) { #if wxUSE_OWNER_DRAWN - wxASSERT_MSG(clientData[i] == NULL, - wxT("Can't use client data with owner-drawn listboxes")); + if ( m_windowStyle & wxLB_OWNERDRAW ) + { + wxASSERT_MSG(clientData[i] == NULL, + wxT("Can't use client data with owner-drawn listboxes")); + } + ListBox_SetItemData(GetHwnd(), i, clientData[i]); #else // !wxUSE_OWNER_DRAWN ListBox_SetItemData(GetHwnd(), i, clientData[i]); #endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN @@ -333,7 +345,11 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData) SetHorizontalExtent(); - ShowWindow(GetHwnd(), SW_SHOW); + if ( hideAndShow ) + { + // show the listbox back if we hid it + ShowWindow(GetHwnd(), SW_SHOW); + } } int wxListBox::FindString(const wxString& s) const @@ -437,11 +453,6 @@ void wxListBox::DoSetItemClientData(int n, void *clientData) wxLogDebug(wxT("LB_SETITEMDATA failed")); } -bool wxListBox::HasMultipleSelection() const -{ - return (m_windowStyle & wxLB_MULTIPLE) || (m_windowStyle & wxLB_EXTENDED); -} - // Return number of selections and an array of selected integers int wxListBox::GetSelections(wxArrayInt& aSelections) const { @@ -467,9 +478,10 @@ int wxListBox::GetSelections(wxArrayInt& aSelections) const } else // single-selection listbox { - aSelections.Add(ListBox_GetCurSel(GetHwnd())); + if (ListBox_GetCurSel(GetHwnd()) > -1) + aSelections.Add(ListBox_GetCurSel(GetHwnd())); - return 1; + return aSelections.Count(); } } @@ -478,8 +490,7 @@ int wxListBox::GetSelection() const { wxCHECK_MSG( !HasMultipleSelection(), -1, - wxT("GetSelection() can't be used with multiple-selection " - "listboxes, use GetSelections() instead.") ); + wxT("GetSelection() can't be used with multiple-selection listboxes, use GetSelections() instead.") ); return ListBox_GetCurSel(GetHwnd()); } @@ -646,7 +657,10 @@ wxSize wxListBox::DoGetBestSize() const wListbox += 3*cx; - int hListbox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)*(wxMax(m_noItems, 7)); + // don't make the listbox too tall (limit height to 10 items) but don't + // make it too small neither + int hListbox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)* + wxMin(wxMax(m_noItems, 3), 10); return wxSize(wListbox, hListbox); } @@ -742,6 +756,11 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) wxCHECK( ((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), FALSE ); DRAWITEMSTRUCT *pStruct = (DRAWITEMSTRUCT *)item; + UINT itemID = pStruct->itemID; + + // the item may be -1 for an empty listbox + if ( itemID == (UINT)-1 ) + return FALSE; long data = ListBox_GetItemData(GetHwnd(), pStruct->itemID); @@ -752,7 +771,7 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) wxDC dc; dc.SetHDC((WXHDC)pStruct->hDC, FALSE); wxRect rect(wxPoint(pStruct->rcItem.left, pStruct->rcItem.top), - wxPoint(pStruct->rcItem.right, pStruct->rcItem.bottom)); + wxPoint(pStruct->rcItem.right, pStruct->rcItem.bottom)); return pItem->OnDrawItem(dc, rect, (wxOwnerDrawn::wxODAction)pStruct->itemAction, diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 2353ebb54d..63a76ef3fa 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -209,8 +209,7 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h) if ( !m_hWnd ) { - wxLogError(_("Can't create list control window, check " - "that comctl32.dll is installed.")); + wxLogError(_("Can't create list control window, check that comctl32.dll is installed.")); return FALSE; } @@ -255,6 +254,7 @@ void wxListCtrl::FreeAllAttrs(bool dontRecreate) { if ( m_hasAnyAttr ) { + m_attrs.BeginFind(); for ( wxNode *node = m_attrs.Next(); node; node = m_attrs.Next() ) { delete (wxListItemAttr *)node->Data(); @@ -600,6 +600,9 @@ bool wxListCtrl::GetItem(wxListItem& info) const if (info.m_mask & wxLIST_MASK_DATA) lvItem.mask |= LVIF_PARAM; + if (info.m_mask & wxLIST_MASK_IMAGE) + lvItem.mask |= LVIF_IMAGE; + if ( info.m_mask & wxLIST_MASK_STATE ) { lvItem.mask |= LVIF_STATE; @@ -630,23 +633,40 @@ bool wxListCtrl::SetItem(wxListItem& info) LV_ITEM item; wxConvertToMSWListItem(this, info, item); + item.cchTextMax = 0; + if ( !ListView_SetItem(GetHwnd(), &item) ) + { + wxLogDebug(_T("ListView_SetItem() failed")); + + return FALSE; + } + + // we need to update the item immediately to show the new image + bool updateNow = (info.m_mask & wxLIST_MASK_IMAGE) != 0; + // check whether it has any custom attributes if ( info.HasAttributes() ) { - m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes())); + wxListItemAttr *attr = (wxListItemAttr *)m_attrs.Get(item.iItem); + + if ( attr == NULL ) + m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes())); + else + *attr = *info.GetAttributes(); m_hasAnyAttr = TRUE; + + // if the colour has changed, we must redraw the item + updateNow = TRUE; } - item.cchTextMax = 0; - bool ok = ListView_SetItem(GetHwnd(), &item) != 0; - if ( ok && (info.m_mask & wxLIST_MASK_IMAGE) ) + if ( updateNow ) { - // make the change visible + // we need this to make the change visible right now ListView_Update(GetHwnd(), item.iItem); } - return ok; + return TRUE; } long wxListCtrl::SetItem(long index, int col, const wxString& label, int imageId) @@ -777,7 +797,7 @@ bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const rect.x = rect2.left; rect.y = rect2.top; rect.width = rect2.right - rect2.left; - rect.height = rect2.bottom - rect2.left; + rect.height = rect2.bottom - rect2.top; return success; } @@ -936,7 +956,35 @@ bool wxListCtrl::Arrange(int flag) // Deletes an item bool wxListCtrl::DeleteItem(long item) { - return (ListView_DeleteItem(GetHwnd(), (int) item) != 0); + if ( !ListView_DeleteItem(GetHwnd(), (int)item) ) + { + wxLogDebug(_T("ListView_DeleteItem() failed")); + + return FALSE; + } + + if ( m_hasAnyAttr ) + { + // first, delete the attribute associated with this item, if any + (void)m_attrs.Delete(item); + + // then, as in InsertItem(), we have to adjust the existing attributes + // keyed on item index + long count = GetItemCount(); + while ( item < count ) + { + wxObject *attr = m_attrs.Delete(item + 1); + if ( attr ) + { + // add it back with new key + m_attrs.Put(item, attr); + } + + item++; + } + } + + return TRUE; } // Deletes all items @@ -952,7 +1000,7 @@ bool wxListCtrl::DeleteAllColumns() { if ( ListView_DeleteColumn(GetHwnd(), 0) == 0 ) { - wxLogLastError("ListView_DeleteColumn"); + wxLogLastError(wxT("ListView_DeleteColumn")); return FALSE; } @@ -1040,10 +1088,13 @@ long wxListCtrl::FindItem(long start, const wxString& str, bool partial) findInfo.flags = LVFI_STRING; if ( partial ) - findInfo.flags |= LVFI_STRING; - findInfo.psz = WXSTRINGCAST str; + findInfo.flags |= LVFI_PARTIAL; + findInfo.psz = str; - return ListView_FindItem(GetHwnd(), (int) start, & findInfo); + // ListView_FindItem() excludes the first item from search and to look + // through all the items you need to start from -1 which is unnatural and + // inconsitent with the generic version - so we adjust the index + return ListView_FindItem(GetHwnd(), (int) start - 1, &findInfo); } // Find an item whose data matches this data, starting from the item after 'start' @@ -1119,15 +1170,50 @@ long wxListCtrl::InsertItem(wxListItem& info) LV_ITEM item; wxConvertToMSWListItem(this, info, item); + long lItem = ListView_InsertItem(GetHwnd(), &item); + if ( lItem == -1 ) + { + wxLogDebug(_T("ListView_InsertItem() failed")); + + return -1; + } + + if ( m_hasAnyAttr ) + { + // we have to offset all existing item attributes for the items + // following this one as the attrs are keyed on the position + // + // NB: it would be faster to traverse the hash table looking for all + // elements with keys > lItem, but wxHashTable doesn't seem to + // support and because of this the code below is, of course, + // horribly inefficient (FIXME) + + // we have to go in downwards direction to avoid overwriting the old + // attributes + for ( long n = GetItemCount() - 1; n > lItem; n-- ) + { + wxObject *attr = m_attrs.Delete(n - 1); + if ( attr ) + { + // add it back with new key + m_attrs.Put(n, attr); + } + } + } + // check whether it has any custom attributes if ( info.HasAttributes() ) { + // there can't be any attr for this id as the item was just inserted! + wxASSERT_MSG( !m_attrs.Get(item.iItem), + _T("error in wxListCtrl attributes handling code") ); + m_attrs.Put(item.iItem, (wxObject *)new wxListItemAttr(*info.GetAttributes())); m_hasAnyAttr = TRUE; } - return (long) ListView_InsertItem(GetHwnd(), & item); + return lItem; } long wxListCtrl::InsertItem(long index, const wxString& label) @@ -1257,11 +1343,73 @@ bool wxListCtrl::ScrollList(int dx, int dy) // The return value is a negative number if the first item should precede the second // item, a positive number of the second item should precede the first, // or zero if the two items are equivalent. - +// // data is arbitrary data to be passed to the sort function. + +// FIXME: this is horrible and MT-unsafe and everything else but I don't have +// time for anything better right now (VZ) +static long gs_sortData = 0; +static wxListCtrl *gs_sortCtrl = NULL; +static wxListCtrlCompare gs_sortFunction = NULL; + +int wxCMPFUNC_CONV wxListCtrlCompareFn(const void *arg1, const void *arg2) +{ + int n1 = *(const int *)arg1, + n2 = *(const int *)arg2; + + return gs_sortFunction(gs_sortCtrl->GetItemData(n1), + gs_sortCtrl->GetItemData(n2), + gs_sortData); +} + bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data) { - return (ListView_SortItems(GetHwnd(), (PFNLVCOMPARE) fn, data) != 0); + // sort the attributes too + if ( m_hasAnyAttr ) + { + int n, + count = GetItemCount(); + int *aItems = new int[count]; + for ( n = 0; n < count; n++ ) + { + aItems[n] = n; + } + + gs_sortData = data; + gs_sortCtrl = this; + gs_sortFunction = fn; + + qsort(aItems, count, sizeof(int), wxListCtrlCompareFn); + + gs_sortData = 0; + gs_sortCtrl = NULL; + gs_sortFunction = NULL; + + wxHashTable attrsNew(wxKEY_INTEGER, 1000); + for ( n = 0; n < count; n++ ) + { + wxObject *attr = m_attrs.Delete(n); + if ( attr ) + { + attrsNew.Put(aItems[n], attr); + } + } + + // FIXME: workaround for wxHashTable memory leak + m_attrs.Destroy(); + m_attrs = attrsNew; + + delete [] aItems; + } + + if ( !ListView_SortItems(GetHwnd(), (PFNLVCOMPARE)fn, data) ) + { + wxLogDebug(_T("ListView_SortItems() failed")); + + return FALSE; + } + + return TRUE; } // ---------------------------------------------------------------------------- @@ -1423,10 +1571,13 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); - // or activate the selected item if any - if ( lItem != -1 && (wVKey == VK_RETURN || wVKey == VK_SPACE) ) + // or activate the selected item if any (but + // not with Shift and/or Ctrl as then they have a predefined + // meaning for the list view) + if ( lItem != -1 && + (wVKey == VK_RETURN || wVKey == VK_SPACE) && + !(wxIsShiftDown() || wxIsCtrlDown()) ) { - // TODO this behaviour probably should be optional eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; event.m_itemIndex = lItem; } @@ -1436,7 +1587,12 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) event.m_code = wxCharCodeMSWToWX(wVKey); } - event.m_item.m_data = GetItemData(lItem); + if ( lItem != -1 ) + { + // fill the other fields too + event.m_item.m_text = GetItemText(lItem); + event.m_item.m_data = GetItemData(lItem); + } } break; @@ -1458,6 +1614,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; event.m_itemIndex = nmLV->iItem; + event.m_item.m_text = GetItemText(nmLV->iItem); event.m_item.m_data = GetItemData(nmLV->iItem); break; @@ -1487,6 +1644,8 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { eventType = wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK; event.m_itemIndex = lvhti.iItem; + event.m_pointDrag.x = lvhti.pt.x; + event.m_pointDrag.y = lvhti.pt.y; } } } diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index a221c0d91d..86d3c85a66 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! # @@ -51,12 +51,12 @@ PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET) !endif !if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXLIB)\xpm.lib $(PERIPH_LIBS) +PERIPH_LIBS=$(WXDIR)\lib\xpm.lib $(PERIPH_LIBS) PERIPH_TARGET=xpm $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) !endif -#PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(PERIPH_LIBS) +#PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(PERIPH_LIBS) PERIPH_LIBS= PERIPH_TARGET=zlib png jpeg tiff $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff $(PERIPH_CLEAN_TARGET) @@ -65,7 +65,7 @@ PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff $(PERIPH_CLEAN_TA DUMMY=dummy !else DUMMY=dummydll -LIBS= cw32 import32 ole2w32 +LIBS= cw32mti import32 ole2w32 odbc32 xpm zlib winpng jpeg tiff !endif LIBTARGET=$(WXLIB) @@ -218,6 +218,7 @@ COMMONOBJS = \ MSWOBJS = $(MSWDIR)\accel.obj \ $(MSWDIR)\app.obj \ + $(MSWDIR)\automtn.obj \ $(MSWDIR)\bitmap.obj \ $(MSWDIR)\bmpbuttn.obj \ $(MSWDIR)\brush.obj \ @@ -263,6 +264,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \ $(MSWDIR)\glcanvas.obj \ $(MSWDIR)\gsocket.obj \ $(MSWDIR)\gsockmsw.obj \ + $(MSWDIR)\helpchm.obj \ $(MSWDIR)\helpwin.obj \ $(MSWDIR)\icon.obj \ $(MSWDIR)\imaglist.obj \ @@ -349,7 +351,7 @@ all: all_libs all_execs $(LIBTARGET): $(DUMMY).obj $(OBJECTS) -erase $(LIBTARGET) - tlib $(LIBTARGET) /P1024 @&&! + tlib "$(LIBTARGET)" /P1024 @&&! +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) ! @@ -358,7 +360,7 @@ $(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(LIBTARGET): $(DUMMY).obj $(OBJECTS) -erase $(LIBTARGET) -erase $(WXLIBDIR)\wx.dll - tlink32 $(LINK_FLAGS) /v @&&! + $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&! c0d32.obj $(OBJECTS) $(WXLIBDIR)\wx nul @@ -390,6 +392,8 @@ $(MSWDIR)\accel.obj: $(MSWDIR)\accel.$(SRCSUFF) $(MSWDIR)\app.obj: $(MSWDIR)\app.$(SRCSUFF) +$(MSWDIR)\automtn.obj: $(OLEDIR)\automtn.$(SRCSUFF) + $(MSWDIR)\bitmap.obj: $(MSWDIR)\bitmap.$(SRCSUFF) $(MSWDIR)\bmpbuttn.obj: $(MSWDIR)\bmpbuttn.$(SRCSUFF) @@ -480,6 +484,8 @@ $(MSWDIR)\gsocket.obj: $(MSWDIR)\gsocket.c $(MSWDIR)\gsockmsw.obj: $(MSWDIR)\gsockmsw.c +$(MSWDIR)\helpchm.obj: $(MSWDIR)\helpchm.$(SRCSUFF) + $(MSWDIR)\helpwin.obj: $(MSWDIR)\helpwin.$(SRCSUFF) $(MSWDIR)\icon.obj: $(MSWDIR)\icon.$(SRCSUFF) @@ -966,6 +972,7 @@ clean_tiff: $(CFG): makefile.b32 copy &&! +-Hc -H=$(WXDIR)\src\msw\wx32.csm -3 -d @@ -991,13 +998,11 @@ $(DEBUG_FLAGS) $(WIN95FLAG) ! $(CFG) -#$(LNKCFG): makefile.b32 -# copy &&! -#-L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk -#! $(LNKCFG) - clean: $(PERIPH_CLEAN_TARGET) -erase $(LIBTARGET) + -erase $(WXLIBDIR)\wx.dll + -erase $(WXLIBDIR)\wx.tds + -erase $(WXLIBDIR)\wx.il? -erase *.obj -erase *.pch -erase *.csm diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc index 456a7e3de2..d5411c4d27 100644 --- a/src/msw/makefile.bcc +++ b/src/msw/makefile.bcc @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 16:08, 2000/03/20 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T! # diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index afd69682d1..1c5b4f6dd5 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T! # diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index 27a9d79c74..3a996a23d8 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T! # @@ -261,6 +261,7 @@ MSWOBJS = \ $(MSWDIR)/glcanvas.$(OBJSUFF) \ $(MSWDIR)/gsocket.$(OBJSUFF) \ $(MSWDIR)/gsockmsw.$(OBJSUFF) \ + $(MSWDIR)/helpchm.$(OBJSUFF) \ $(MSWDIR)/helpwin.$(OBJSUFF) \ $(MSWDIR)/icon.$(OBJSUFF) \ $(MSWDIR)/imaglist.$(OBJSUFF) \ @@ -403,25 +404,26 @@ JPEGOBJS = \ $(JPEGDIR)/jquant2.$(OBJSUFF) \ $(JPEGDIR)/jdmerge.$(OBJSUFF) -XPMOBJS = $(XPMDIR)/attrib.o\ - $(XPMDIR)/crbuffri.o\ - $(XPMDIR)/crdatfri.o\ +# NOTE: these filenames are case sensitive! +XPMOBJS = $(XPMDIR)/Attrib.o\ + $(XPMDIR)/CrBufFrI.o\ + $(XPMDIR)/CrDatFrI.o\ $(XPMDIR)/create.o\ - $(XPMDIR)/crifrbuf.o\ - $(XPMDIR)/crifrdat.o\ + $(XPMDIR)/CrIFrBuf.o\ + $(XPMDIR)/CrIFrDat.o\ $(XPMDIR)/data.o\ - $(XPMDIR)/image.o\ - $(XPMDIR)/info.o\ + $(XPMDIR)/Image.o\ + $(XPMDIR)/Info.o\ $(XPMDIR)/hashtab.o\ $(XPMDIR)/misc.o\ $(XPMDIR)/parse.o\ - $(XPMDIR)/rdftodat.o\ - $(XPMDIR)/rdftoi.o\ + $(XPMDIR)/RdFToDat.o\ + $(XPMDIR)/RdFToI.o\ $(XPMDIR)/rgb.o\ $(XPMDIR)/scan.o\ $(XPMDIR)/simx.o\ - $(XPMDIR)/wrffrdat.o\ - $(XPMDIR)/wrffri.o + $(XPMDIR)/WrFFrDat.o\ + $(XPMDIR)/WrFFrI.o TIFFOBJS = $(TIFFDIR)/tif_aux.o \ $(TIFFDIR)/tif_close.o \ @@ -608,6 +610,8 @@ clean: -$(RM) ../xpm/*.bak -$(RM) ../tiff/*.o -$(RM) ../tiff/*.bak + +cleanall: clean -$(RM) $(WXLIB) -$(RM) $(ZLIBLIB) -$(RM) $(PNGLIB) @@ -624,7 +628,3 @@ ifneq "$(strip $(LD_SUPPORTS_SHARED))" "yes" endif endif - -cleanall: clean - - diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc index cf69648015..38112cdbaf 100644 --- a/src/msw/makefile.sc +++ b/src/msw/makefile.sc @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T! # Symantec C++ makefile for the msw objects @@ -202,6 +202,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \ $(MSWDIR)\glcanvas.obj \ $(MSWDIR)\gsocket.obj \ $(MSWDIR)\gsockmsw.obj \ + $(MSWDIR)\helpchm.obj \ $(MSWDIR)\helpwin.obj \ $(MSWDIR)\icon.obj \ $(MSWDIR)\iniconf.obj \ diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index 6eadac6176..d47e0f019d 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 11:20, 2000/03/17 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T! # File: makefile.vc @@ -27,9 +27,6 @@ LIBTARGET=$(WXLIB) DUMMYOBJ=$D\dummy.obj !endif -# Please set these according to the settings in setup.h, so we can include -# the appropriate libraries in wx.lib - # This one overrides the others, to be consistent with the settings in setup.h MINIMAL_WXWINDOWS_SETUP=0 @@ -37,6 +34,9 @@ PERIPH_LIBS= PERIPH_TARGET= PERIPH_CLEAN_TARGET= +# Set to 0 if not using GLCanvas (only affects DLL build) +USE_GLCANVAS=1 + # These are absolute paths, so that the compiler # generates correct __FILE__ symbols for debugging. # Otherwise you don't be able to double-click on a memory @@ -280,6 +280,7 @@ MSWOBJS = ..\msw\$D\accel.obj \ ..\msw\$D\glcanvas.obj \ ..\msw\$D\gsocket.obj \ ..\msw\$D\gsockmsw.obj \ + ..\msw\$D\helpchm.obj \ ..\msw\$D\helpwin.obj \ ..\msw\$D\icon.obj \ ..\msw\$D\imaglist.obj \ @@ -440,6 +441,7 @@ $(WXDIR)\lib\$(WXLIBNAME).lib: $(DUMMYOBJ) $(OBJECTS) !if "$(USE_GLCANVAS)" == "1" GL_LIBS=opengl32.lib glu32.lib +# GL_LIBS_DELAY=/delayload:opengl32.dll !endif # Update the dynamic link library @@ -448,10 +450,15 @@ $(WXDIR)\lib\$(WXLIBNAME).dll: $(DUMMYOBJ) $(OBJECTS) $(LINKFLAGS) -out:$(WXDIR)\lib\$(WXLIBNAME).dll $(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\xpm$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib + delayimp.lib + /delayload:ws2_32.dll /delayload:advapi32.dll /delayload:user32.dll /delayload:gdi32.dll + /delayload:comdlg32.dll /delayload:shell32.dll /delayload:comctl32.dll /delayload:ole32.dll + /delayload:oleaut32.dll /delayload:rpcrt4.dll $(GL_LIBS_DELAY) << !endif +# /delayload:winmm.dll # Removed because it can cause a crash for some people ######################################################## # Windows-specific objects @@ -465,7 +472,7 @@ $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp << # Compile certain files with no optimization (some files cause a -# compiler crash for buggy versions of VC++, e.g. 4.0) +# compiler crash for buggy versions of VC++, e.g. 4.0). # Don't forget to put FINAL=1 on the command line. noopt: cl @<< @@ -653,7 +660,7 @@ clean: $(PERIPH_CLEAN_TARGET) # Making documents -docs: allhlp allhtml allpdfrtf +docs: allhlp allhtml allpdfrtf allhtb allhtmlhelp alldocs: docs hlp: wxhlp wxhlp: $(DOCDIR)/winhelp/wx.hlp @@ -662,8 +669,9 @@ rtf: $(DOCDIR)/winhelp/wx.rtf pdfrtf: $(DOCDIR)/pdf/wx.rtf refpdfrtf: $(DOCDIR)/pdf/techref.rtf html: wxhtml +htb: $(DOCDIR)\htb\wx.htb wxhtml: $(DOCDIR)\html\wx\wx.htm -htmlhelp: $(DOCDIR)\html\wx\wx.chm +htmlhelp: $(DOCDIR)\htmlhelp\wx.chm ps: wxps referencps wxps: $(WXDIR)\docs\ps\wx.ps referencps: $(WXDIR)\docs\ps\referenc.ps @@ -671,12 +679,12 @@ referencps: $(WXDIR)\docs\ps\referenc.ps allhlp: wxhlp cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc hlp + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc hlp cd $(THISDIR) # cd $(WXDIR)\utils\wxhelp\src # nmake -f makefile.vc hlp -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.vc hlp # cd $(WXDIR)\utils\wxgraph\src # nmake -f makefile.vc hlp # cd $(WXDIR)\utils\wxchart\src @@ -691,6 +699,22 @@ allhlp: wxhlp allhtml: wxhtml cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc html + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc html + cd $(THISDIR) + +allhtmlhelp: htmlhelp + cd $(WXDIR)\utils\dialoged\src + nmake -f makefile.vc htmlhelp + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc htmlhelp + cd $(THISDIR) + +allhtb: htb + cd $(WXDIR)\utils\dialoged\src + nmake -f makefile.vc htb + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc htb cd $(THISDIR) # nmake -f makefile.vc html @@ -700,8 +724,6 @@ allhtml: wxhtml # nmake -f makefile.vc html # cd $(WXDIR)\utils\wxhelp\src # nmake -f makefile.vc html -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.vc html # cd $(WXDIR)\utils\wxgraph\src # nmake -f makefile.vc html # cd $(WXDIR)\utils\wxchart\src @@ -712,11 +734,15 @@ allhtml: wxhtml allps: wxps referencps cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc ps + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc ps cd $(THISDIR) allpdfrtf: pdfrtf cd $(WXDIR)\utils\dialoged\src nmake -f makefile.vc pdfrtf + cd $(WXDIR)\utils\tex2rtf\src + nmake -f makefile.vc pdfrtf cd $(THISDIR) # cd $(WXDIR)\utils\wxhelp\src @@ -774,6 +800,7 @@ $(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex cd $(DOCDIR)\latex\wx -mkdir $(DOCDIR)\html\wx + copy *.gif $(DOCDIR)\html\wx -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html -erase $(DOCDIR)\html\wx\*.con -erase $(DOCDIR)\html\wx\*.ref @@ -781,9 +808,11 @@ $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex -erase $(DOCDIR)\latex\wx\*.ref cd $(THISDIR) -$(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp +$(DOCDIR)\htmlhelp\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp cd $(DOCDIR)\html\wx -hhc wx.hhp + -mkdir ..\..\htmlhelp + move wx.chm ..\..\htmlhelp cd $(THISDIR) $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex @@ -822,11 +851,12 @@ $(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi # files, renamed to htb. # This can then be used with e.g. helpview. # Optionally, a cached version of the .hhp file can be generated with hhp2cached. -htb: +$(DOCDIR)\htb\wx.htb: $(DOCDIR)\html\wx\wx.htm cd $(WXDIR)\docs\html\wx -erase /Y wx.zip wx.htb zip32 wx.zip *.htm *.gif *.hhp *.hhc *.hhk - ren wx.zip wx.htb + -mkdir $(DOCDIR)\htb + move wx.zip $(DOCDIR)\htb\wx.htb cd $(THISDIR) # In order to force document reprocessing @@ -835,6 +865,13 @@ touchmanual: updatedocs: touchmanual alldocs +cleandocs: + -erase /Y $(DOCDIR)\html\wx\wx.htm + -erase /Y $(DOCDIR)\pdf\wx.rtf + -erase /Y $(DOCDIR)\latex\wx\wx.rtf + -erase /Y $(DOCDIR)\htmlhelp\wx.chm + -erase /Y $(DOCDIR)\htb\wx.htb + # Start Word, running the GeneratePDF macro. MakeManual.dot should be in the # Office StartUp folder, and PDFMaker should be installed. updatepdf: # touchmanual pdfrtf diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index b342d6efad..8eb114442e 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -1,6 +1,6 @@ #!/binb/wmake.exe -# This file was automatically generated by tmake at 15:55, 2000/03/14 +# This file was automatically generated by tmake at 15:50, 2002/01/04 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # @@ -29,13 +29,16 @@ LIBTARGET = $(WXLIB)\wx.lib DUMMY=dummydll # ODBCLIB = ..\..\contrib\odbc\odbc32.lib -EXTRATARGETS = xpm png zlib -EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib +EXTRATARGETS = xpm png zlib jpeg tiff +EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib clean_jpeg clean_tiff GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common XPMDIR=$(WXDIR)\src\xpm +JPEGDIR=$(WXDIR)\src\jpeg +TIFFDIR=$(WXDIR)\src\tiff MSWDIR=$(WXDIR)\src\msw OLEDIR=$(MSWDIR)\ole +HTMLDIR=$(WXDIR)\src\html DOCDIR = $(WXDIR)\docs @@ -133,6 +136,7 @@ COMMONOBJS = & imagbmp.obj & image.obj & imaggif.obj & + imagjpeg.obj & imagpcx.obj & imagpng.obj & imagpnm.obj & @@ -236,6 +240,7 @@ MSWOBJS = accel.obj & glcanvas.obj & gsocket.obj & gsockmsw.obj & + helpchm.obj & helpwin.obj & icon.obj & imaglist.obj & @@ -292,10 +297,31 @@ MSWOBJS = accel.obj & window.obj & xpmhand.obj -# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) +HTMLOBJS = helpctrl.obj & + helpdata.obj & + helpfrm.obj & + htmlcell.obj & + htmlfilt.obj & + htmlpars.obj & + htmltag.obj & + htmlwin.obj & + htmprint.obj & + m_dflist.obj & + m_fonts.obj & + m_hline.obj & + m_image.obj & + m_layout.obj & + m_links.obj & + m_list.obj & + m_meta.obj & + m_pre.obj & + m_tables.obj & + winpars.obj -all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) +# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. +OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) + +all: $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC $(LIBTARGET) : $(OBJECTS) %create tmp.lbc @@ -464,6 +490,9 @@ gsocket.obj: $(MSWDIR)\gsocket.c gsockmsw.obj: $(MSWDIR)\gsockmsw.c *$(CC) $(CPPFLAGS) $(IFLAGS) $< +helpchm.obj: $(MSWDIR)\helpchm.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + helpwin.obj: $(MSWDIR)\helpwin.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -769,6 +798,9 @@ image.obj: $(COMMDIR)\image.cpp imaggif.obj: $(COMMDIR)\imaggif.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +imagjpeg.obj: $(COMMDIR)\imagjpeg.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + imagpcx.obj: $(COMMDIR)\imagpcx.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -1019,6 +1051,73 @@ wizard.obj: $(GENDIR)\wizard.cpp + +######################################################## +# HTML objects (always compiled) + +helpctrl.obj: $(HTMLDIR)\helpctrl.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +helpdata.obj: $(HTMLDIR)\helpdata.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +helpfrm.obj: $(HTMLDIR)\helpfrm.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +htmlcell.obj: $(HTMLDIR)\htmlcell.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +htmlfilt.obj: $(HTMLDIR)\htmlfilt.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +htmlpars.obj: $(HTMLDIR)\htmlpars.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +htmltag.obj: $(HTMLDIR)\htmltag.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +htmlwin.obj: $(HTMLDIR)\htmlwin.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +htmprint.obj: $(HTMLDIR)\htmprint.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_dflist.obj: $(HTMLDIR)\m_dflist.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_fonts.obj: $(HTMLDIR)\m_fonts.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_hline.obj: $(HTMLDIR)\m_hline.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_image.obj: $(HTMLDIR)\m_image.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_layout.obj: $(HTMLDIR)\m_layout.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_links.obj: $(HTMLDIR)\m_links.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_list.obj: $(HTMLDIR)\m_list.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_meta.obj: $(HTMLDIR)\m_meta.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_pre.obj: $(HTMLDIR)\m_pre.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +m_tables.obj: $(HTMLDIR)\m_tables.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + +winpars.obj: $(HTMLDIR)\winpars.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + + + + crbuffri.obj: $(XPMDIR)\crbuffri.c *$(CC) $(CPPFLAGS) $(IFLAGS) $< @@ -1165,6 +1264,26 @@ clean_zlib: .SYMBOLIC wmake -f makefile.wat clean cd $(WXDIR)\src\msw +jpeg: .SYMBOLIC + cd $(WXDIR)\src\jpeg + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_jpeg: .SYMBOLIC + cd $(WXDIR)\src\jpeg + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + +tiff: .SYMBOLIC + cd $(WXDIR)\src\tiff + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_tiff: .SYMBOLIC + cd $(WXDIR)\src\tiff + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + MFTYPE=wat self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t cd $(WXDIR)\distrib\msw\tmake diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 399272c58b..be382604d7 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -63,8 +63,10 @@ extern wxWindowList wxModelessWindows; // from dialog.cpp extern wxMenu *wxCurrentPopupMenu; -extern const wxChar *wxMDIFrameClassName; +extern const wxChar *wxMDIFrameClassName; // from app.cpp extern const wxChar *wxMDIChildFrameClassName; +extern const wxChar *wxMDIChildFrameClassNameNoRedraw; + extern wxWindow *wxWndHook; // from window.cpp extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win); @@ -132,6 +134,10 @@ BEGIN_EVENT_TABLE(wxMDIParentFrame, wxFrame) EVT_SYS_COLOUR_CHANGED(wxMDIParentFrame::OnSysColourChanged) END_EVENT_TABLE() +BEGIN_EVENT_TABLE(wxMDIChildFrame, wxFrame) + EVT_IDLE(wxMDIChildFrame::OnIdle) +END_EVENT_TABLE() + BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) EVT_SCROLL(wxMDIClientWindow::OnScroll) END_EVENT_TABLE() @@ -157,25 +163,29 @@ bool wxMDIParentFrame::Create(wxWindow *parent, long style, const wxString& name) { - m_defaultIcon = (WXHICON) (wxSTD_MDIPARENTFRAME_ICON ? wxSTD_MDIPARENTFRAME_ICON : wxDEFAULT_MDIPARENTFRAME_ICON); + m_defaultIcon = (WXHICON) (wxSTD_MDIPARENTFRAME_ICON + ? wxSTD_MDIPARENTFRAME_ICON + : wxDEFAULT_MDIPARENTFRAME_ICON); m_clientWindow = NULL; m_currentChild = NULL; - if (style & wxFRAME_NO_WINDOW_MENU) - m_windowMenu = (wxMenu*) NULL; - else + // this style can be used to prevent a window from having the standard MDI + // "Window" menu + if ( style & wxFRAME_NO_WINDOW_MENU ) + { + m_windowMenu = (wxMenu *)NULL; + } + else // normal case: we have the window menu, so construct it { - // m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), wxT("wxWindowMenu")); m_windowMenu = new wxMenu; - - m_windowMenu->Append(4002, wxT("&Cascade")); - m_windowMenu->Append(4001, wxT("Tile &Horizontally")); - m_windowMenu->Append(4005, wxT("Tile &Vertically")); + m_windowMenu->Append(IDM_WINDOWCASCADE, _("&Cascade")); + m_windowMenu->Append(IDM_WINDOWTILEHOR, _("Tile &Horizontally")); + m_windowMenu->Append(IDM_WINDOWTILEVERT, _("Tile &Vertically")); m_windowMenu->AppendSeparator(); - m_windowMenu->Append(4003, wxT("&Arrange Icons")); - m_windowMenu->Append(4004, wxT("&Next")); + m_windowMenu->Append(IDM_WINDOWICONS, _("&Arrange Icons")); + m_windowMenu->Append(IDM_WINDOWNEXT, _("&Next")); } m_parentFrameActive = TRUE; @@ -217,11 +227,22 @@ bool wxMDIParentFrame::Create(wxWindow *parent, if (style & wxCLIP_CHILDREN) msflags |= WS_CLIPCHILDREN; - wxWindow::MSWCreate(m_windowId, parent, wxMDIFrameClassName, this, title, x, y, width, height, - msflags); + if ( !wxWindow::MSWCreate(m_windowId, + parent, + wxMDIFrameClassName, + this, + title, + x, y, width, height, + msflags) ) + { + return FALSE; + } wxModelessWindows.Append(this); + // unlike (almost?) all other windows, frames are created hidden + m_isShown = FALSE; + return TRUE; } @@ -279,7 +300,10 @@ void wxMDIParentFrame::SetWindowMenu(wxMenu* menu) { m_windowMenu = menu; if (GetMenuBar()) - InsertWindowMenu(GetClientWindow(), m_hMenu, (HMENU) m_windowMenu->GetHMenu()); + { + InsertWindowMenu(GetClientWindow(), m_hMenu, + GetHmenuOf(m_windowMenu)); + } } } @@ -559,8 +583,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) { // this shouldn't happen because it means that our messages are being // lost (they're not sent to the parent frame nor to the children) - wxFAIL_MSG(wxT("MDI parent frame is not active, " - "yet there is no active MDI child?")); + wxFAIL_MSG(wxT("MDI parent frame is not active, yet there is no active MDI child?")); } return FALSE; @@ -583,17 +606,20 @@ bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg) { MSG *pMsg = (MSG *)msg; + // first let the current child get it if ( m_currentChild && m_currentChild->GetHWND() && m_currentChild->MSWTranslateMessage(msg) ) { return TRUE; } - if ( m_acceleratorTable.Translate(this, msg) ) + // then try out accel table (will also check the menu accels) + if ( wxFrame::MSWTranslateMessage(msg) ) { return TRUE; } + // finally, check for MDI specific built in accel keys if ( pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN ) { if ( ::TranslateMDISysAccel(GetWinHwnd(GetClientWindow()), pMsg)) @@ -607,8 +633,9 @@ bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg) // wxMDIChildFrame // =========================================================================== -wxMDIChildFrame::wxMDIChildFrame() +void wxMDIChildFrame::Init() { + m_needsResize = TRUE; } bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, @@ -643,7 +670,9 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, MDICREATESTRUCT mcs; - mcs.szClass = wxMDIChildFrameClassName; + mcs.szClass = style & wxNO_FULL_REPAINT_ON_RESIZE + ? wxMDIChildFrameClassNameNoRedraw + : wxMDIChildFrameClassName; mcs.szTitle = title; mcs.hOwner = wxGetInstance(); if (x > -1) @@ -686,12 +715,8 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, mcs.lParam = 0; - DWORD Return = SendMessage(GetWinHwnd(parent->GetClientWindow()), - WM_MDICREATE, 0, (LONG)(LPSTR)&mcs); - - //handle = (HWND)LOWORD(Return); - // Must be the DWORRD for WIN32. And in 16 bits, HIWORD=0 (says Microsoft) - m_hWnd = (WXHWND)Return; + m_hWnd = (WXHWND)::SendMessage(GetWinHwnd(parent->GetClientWindow()), + WM_MDICREATE, 0, (LONG)(LPSTR)&mcs); wxWndHook = NULL; wxAssociateWinWithHandle((HWND) GetHWND(), this); @@ -907,15 +932,17 @@ bool wxMDIChildFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) return TRUE; } + bool processed; if (GetMenuBar() && GetMenuBar()->FindItem(id)) { - ProcessCommand(id); - return TRUE; + processed = ProcessCommand(id); } else - return FALSE; + { + processed = FALSE; + } - return TRUE; + return processed; } bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate), @@ -1136,7 +1163,7 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style) (LPSTR)(LPCLIENTCREATESTRUCT)&ccs); if ( !m_hWnd ) { - wxLogLastError("CreateWindowEx(MDI client)"); + wxLogLastError(wxT("CreateWindowEx(MDI client)")); return FALSE; } @@ -1196,6 +1223,22 @@ void wxMDIClientWindow::DoSetSize(int x, int y, int width, int height, int sizeF } } +void wxMDIChildFrame::OnIdle(wxIdleEvent& event) +{ + // MDI child frames get their WM_SIZE when they're constructed but at this + // moment they don't have any children yet so all child windows will be + // positioned incorrectly when they are added later - to fix this, we + // generate an artificial size event here + if ( m_needsResize ) + { + m_needsResize = FALSE; // avoid any possibility of recursion + + SendSizeEvent(); + } + + event.Skip(); +} + // --------------------------------------------------------------------------- // non member functions // --------------------------------------------------------------------------- @@ -1204,10 +1247,11 @@ static void MDISetMenu(wxWindow *win, HMENU hmenuFrame, HMENU hmenuWindow) { ::SendMessage(GetWinHwnd(win), WM_MDISETMENU, #ifdef __WIN32__ - (WPARAM)hmenuFrame, (LPARAM)hmenuWindow); + (WPARAM)hmenuFrame, (LPARAM)hmenuWindow #else - 0, MAKELPARAM(hmenuFrame, hmenuWindow)); + 0, MAKELPARAM(hmenuFrame, hmenuWindow) #endif + ); // update menu bar of the parent window wxWindow *parent = win->GetParent(); @@ -1236,18 +1280,18 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu) continue; } - if ( wxStripMenuCodes(wxString(buf)).IsSameAs(wxT("Help")) ) + if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Help")) ) { success = TRUE; ::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING, - (UINT)subMenu, wxT("&Window")); + (UINT)subMenu, _("&Window")); break; } } if ( !success ) { - ::AppendMenu(hmenu, MF_POPUP, (UINT)subMenu, wxT("&Window")); + ::AppendMenu(hmenu, MF_POPUP, (UINT)subMenu, _("&Window")); } } @@ -1271,7 +1315,7 @@ static void RemoveWindowMenu(wxWindow *win, WXHMENU menu) continue; } - if ( wxStripMenuCodes(wxString(buf)).IsSameAs(wxT("Window")) ) + if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Window")) ) { success = TRUE; ::RemoveMenu(hmenu, i, MF_BYPOSITION); diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 783a2cd977..48b0b30706 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -82,7 +82,7 @@ void wxMenu::Init() m_hMenu = (WXHMENU)CreatePopupMenu(); if ( !m_hMenu ) { - wxLogLastError("CreatePopupMenu"); + wxLogLastError(wxT("CreatePopupMenu")); } // if we have a title, insert it in the beginning of the menu @@ -103,7 +103,7 @@ wxMenu::~wxMenu() { if ( !::DestroyMenu(GetHmenu()) ) { - wxLogLastError("DestroyMenu"); + wxLogLastError(wxT("DestroyMenu")); } } @@ -135,35 +135,50 @@ int wxMenu::FindAccel(int id) const void wxMenu::UpdateAccel(wxMenuItem *item) { - // find the (new) accel for this item - wxAcceleratorEntry *accel = wxGetAccelFromString(item->GetText()); - if ( accel ) - accel->m_command = item->GetId(); + if ( item->IsSubMenu() ) + { + wxMenu *submenu = item->GetSubMenu(); + wxMenuItemList::Node *node = submenu->GetMenuItems().GetFirst(); + while ( node ) + { + UpdateAccel(node->GetData()); - // find the old one - int n = FindAccel(item->GetId()); - if ( n == wxNOT_FOUND ) - { - // no old, add new if any - if ( accel ) - m_accels.Add(accel); - else - return; // skipping RebuildAccelTable() below + node = node->GetNext(); + } } - else + else if ( !item->IsSeparator() ) { - // replace old with new or just remove the old one if no new - delete m_accels[n]; + // find the (new) accel for this item + wxAcceleratorEntry *accel = wxGetAccelFromString(item->GetText()); if ( accel ) - m_accels[n] = accel; - else - m_accels.Remove(n); - } + accel->m_command = item->GetId(); - if ( IsAttached() ) - { - m_menuBar->RebuildAccelTable(); + // find the old one + int n = FindAccel(item->GetId()); + if ( n == wxNOT_FOUND ) + { + // no old, add new if any + if ( accel ) + m_accels.Add(accel); + else + return; // skipping RebuildAccelTable() below + } + else + { + // replace old with new or just remove the old one if no new + delete m_accels[n]; + if ( accel ) + m_accels[n] = accel; + else + m_accels.Remove(n); + } + + if ( IsAttached() ) + { + m_menuBar->RebuildAccelTable(); + } } + //else: it is a separator, they can't have accels, nothing to do } #endif // wxUSE_ACCEL @@ -234,7 +249,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) if ( !ok ) { - wxLogLastError("Insert or AppendMenu"); + wxLogLastError(wxT("Insert or AppendMenu")); return FALSE; } @@ -308,7 +323,7 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item) // remove the item from the menu if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) ) { - wxLogLastError("RemoveMenu"); + wxLogLastError(wxT("RemoveMenu")); } if ( IsAttached() ) @@ -361,7 +376,7 @@ void wxMenu::SetTitle(const wxString& label) (unsigned)idMenuTitle, m_title) || !::InsertMenu(hMenu, 1u, MF_BYPOSITION, (unsigned)-1, NULL) ) { - wxLogLastError("InsertMenu"); + wxLogLastError(wxT("InsertMenu")); } } } @@ -373,7 +388,7 @@ void wxMenu::SetTitle(const wxString& label) if ( !RemoveMenu(hMenu, 0, MF_BYPOSITION) || !RemoveMenu(hMenu, 0, MF_BYPOSITION) ) { - wxLogLastError("RemoveMenu"); + wxLogLastError(wxT("RemoveMenu")); } } else @@ -383,7 +398,7 @@ void wxMenu::SetTitle(const wxString& label) MF_BYPOSITION | MF_STRING, (unsigned)idMenuTitle, m_title) ) { - wxLogLastError("ModifyMenu"); + wxLogLastError(wxT("ModifyMenu")); } } } @@ -399,7 +414,7 @@ void wxMenu::SetTitle(const wxString& label) if ( !SetMenuItemInfo(hMenu, (unsigned)idMenuTitle, FALSE, &mii) ) { - wxLogLastError("SetMenuItemInfo"); + wxLogLastError(wxT("SetMenuItemInfo")); } } #endif // Win32 @@ -419,7 +434,13 @@ bool wxMenu::MSWCommand(WXUINT WXUNUSED(param), WXWORD id) wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED); event.SetEventObject( this ); event.SetId( id ); - event.SetInt( id ); + + // VZ: previosuly, the command int was set to id too which was quite + // useless anyhow (as it could be retrieved using GetId()) and + // uncompatible with wxGTK, so now we use the command int instead + // to pass the checked status + event.SetInt(::GetMenuState(GetHmenu(), id, MF_BYCOMMAND) & MF_CHECKED); + ProcessCommand(event); } @@ -537,16 +558,14 @@ void wxMenuBar::Refresh() WXHMENU wxMenuBar::Create() { - if (m_hMenu != 0 ) + if ( m_hMenu != 0 ) return m_hMenu; - wxCHECK_MSG( !m_hMenu, TRUE, wxT("menubar already created") ); - m_hMenu = (WXHMENU)::CreateMenu(); if ( !m_hMenu ) { - wxLogLastError("CreateMenu"); + wxLogLastError(wxT("CreateMenu")); } else { @@ -557,7 +576,7 @@ WXHMENU wxMenuBar::Create() (UINT)m_menus[i]->GetHMenu(), m_titles[i]) ) { - wxLogLastError("AppendMenu"); + wxLogLastError(wxT("AppendMenu")); } } } @@ -618,7 +637,7 @@ void wxMenuBar::SetLabelTop(size_t pos, const wxString& label) if ( ::ModifyMenu(GetHmenu(), pos, MF_BYPOSITION | MF_STRING | flagsOld, id, label) == (int)0xFFFFFFFF ) { - wxLogLastError("ModifyMenu"); + wxLogLastError(wxT("ModifyMenu")); } Refresh(); @@ -648,14 +667,14 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title) // can't use ModifyMenu() because it deletes the submenu it replaces if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) ) { - wxLogLastError("RemoveMenu"); + wxLogLastError(wxT("RemoveMenu")); } if ( !::InsertMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT)GetHmenuOf(menu), title) ) { - wxLogLastError("InsertMenu"); + wxLogLastError(wxT("InsertMenu")); } #if wxUSE_ACCEL @@ -687,7 +706,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT)GetHmenuOf(menu), title) ) { - wxLogLastError("InsertMenu"); + wxLogLastError(wxT("InsertMenu")); } #if wxUSE_ACCEL @@ -748,7 +767,7 @@ wxMenu *wxMenuBar::Remove(size_t pos) { if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) ) { - wxLogLastError("RemoveMenu"); + wxLogLastError(wxT("RemoveMenu")); } menu->Detach(); @@ -831,7 +850,7 @@ int wxMenuBar::FindMenuItem(const wxString& menuString, for ( size_t i = 0; i < count; i++ ) { wxString title = wxStripMenuCodes(m_titles[i]); - if ( menuString == title ) + if ( menuLabel == title ) return m_menus[i]->FindItem(itemString); } diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index f64f57eb17..e281013c2d 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -173,7 +173,7 @@ void wxMenuItem::Enable(bool enable) (enable ? MF_ENABLED : MF_GRAYED)); if ( rc == -1 ) { - wxLogLastError("EnableMenuItem"); + wxLogLastError(wxT("EnableMenuItem")); } wxMenuItemBase::Enable(enable); @@ -192,7 +192,7 @@ void wxMenuItem::Check(bool check) (check ? MF_CHECKED : MF_UNCHECKED)); if ( rc == -1 ) { - wxLogLastError("CheckMenuItem"); + wxLogLastError(wxT("CheckMenuItem")); } wxMenuItemBase::Check(check); @@ -218,7 +218,7 @@ void wxMenuItem::SetText(const wxString& text) UINT flagsOld = ::GetMenuState(hMenu, id, MF_BYCOMMAND); if ( flagsOld == 0xFFFFFFFF ) { - wxLogLastError("GetMenuState"); + wxLogLastError(wxT("GetMenuState")); } else { diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp index f8bea1184f..ce2568c2c2 100644 --- a/src/msw/metafile.cpp +++ b/src/msw/metafile.cpp @@ -104,6 +104,9 @@ wxMetafile::~wxMetafile() bool wxMetafile::SetClipboard(int width, int height) { +#if !wxUSE_CLIPBOARD + return FALSE; +#else if (!m_refData) return FALSE; @@ -119,6 +122,7 @@ bool wxMetafile::SetClipboard(int width, int height) wxCloseClipboard(); return success; +#endif } bool wxMetafile::Play(wxDC *dc) @@ -375,12 +379,12 @@ bool wxMakeMetafilePlaceable(const wxString& filename, int x1, int y1, int x2, i p < (WORD *)&pMFHead ->checksum; ++p) pMFHead ->checksum ^= *p; - FILE *fd = fopen(filename.fn_str(), "rb"); + FILE *fd = wxFopen(filename.fn_str(), "rb"); if (!fd) return FALSE; wxChar tempFileBuf[256]; wxGetTempFileName(wxT("mf"), tempFileBuf); - FILE *fHandle = fopen(wxConvFile.cWX2MB(tempFileBuf), "wb"); + FILE *fHandle = wxFopen(wxConvFile.cWX2MB(tempFileBuf), "wb"); if (!fHandle) return FALSE; fwrite((void *)&header, sizeof(unsigned char), sizeof(mfPLACEABLEHEADER), fHandle); diff --git a/src/msw/mimetype.cpp b/src/msw/mimetype.cpp index e78a77cac0..4ca0315ec2 100644 --- a/src/msw/mimetype.cpp +++ b/src/msw/mimetype.cpp @@ -117,7 +117,7 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *verb) const } } -#if wxUSE_DDE +#if wxUSE_IPC // look whether we must issue some DDE requests to the application // (and not just launch it) strKey += _T("\\DDEExec"); @@ -141,7 +141,7 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *verb) const << _T('#') << ddeCommand; } else -#endif // wxUSE_DDE +#endif // wxUSE_IPC if ( !foundFilename ) { // we didn't find any '%1' - the application doesn't know which // file to open (note that we only do it if there is no DDEExec @@ -227,27 +227,23 @@ bool wxFileTypeImpl::GetMimeType(wxString *mimeType) const // suppress possible error messages wxLogNull nolog; wxRegKey key(wxRegKey::HKCR, wxT(".") + m_ext); - if ( key.Open() && key.QueryValue(wxT("Content Type"), *mimeType) ) { - return TRUE; - } - else { - return FALSE; - } + + return key.Open() && key.QueryValue(wxT("Content Type"), *mimeType); } bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const { wxString s; - - if (GetMimeType(&s)) + + if ( !GetMimeType(&s) ) { - mimeTypes.Clear(); - mimeTypes.Add(s); - return TRUE; - } - else return FALSE; + } + + mimeTypes.Clear(); + mimeTypes.Add(s); + return TRUE; } @@ -378,18 +374,16 @@ wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& ext) } } - if ( knownExtension ) - { - wxFileType *fileType = new wxFileType; - fileType->m_impl->Init(wxEmptyString, ext); - - return fileType; - } - else + if ( !knownExtension ) { // unknown extension return NULL; } + + wxFileType *fileType = new wxFileType; + fileType->m_impl->Init(wxEmptyString, ext); + + return fileType; } // MIME type -> extension -> file type diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp index ce9a5db6b8..5eef575db7 100644 --- a/src/msw/nativdlg.cpp +++ b/src/msw/nativdlg.cpp @@ -239,7 +239,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) { win = new wxScrollBar; } -#if defined(__WIN95__) && !defined(__TWIN32__) +#if defined(__WIN95__) && !defined(__TWIN32__) && wxUSE_SPINBTN else if (str == wxT("MSCTLS_UPDOWN32")) { win = new wxSpinButton; @@ -282,11 +282,9 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) win->SubclassWin(hWnd); win->AdoptAttributesFromHWND(); win->SetupColours(); - - return win; } - else - return NULL; + + return win; } // Make sure the window style (etc.) reflects the HWND style (roughly) diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index e29b9ab51e..a5c49e721b 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -20,18 +20,19 @@ #pragma hdrstop #endif +#include "wx/defs.h" + +// Watcom C++ gives a linker error if this is compiled in. +// With Borland C++, all samples crash if this is compiled in. +#if !defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) + #include "wx/log.h" +#include "wx/msw/ole/automtn.h" +#include "wx/msw/private.h" #include #include -// Watcom C++ gives a linker error if this is compiled in. -#ifndef __WATCOMC__ - -#include "wx/msw/ole/automtn.h" - -#include "wx/msw/private.h" - #include #include #include @@ -434,13 +435,9 @@ WXIDISPATCH* wxAutomationObject::GetDispatchProperty(const wxString& property, i { return (WXIDISPATCH*) retVariant.GetVoidPtr(); } - else - { - return (WXIDISPATCH*) NULL; - } } - else - return (WXIDISPATCH*) NULL; + + return (WXIDISPATCH*) NULL; } // A way of initialising another wxAutomationObject with a dispatch object @@ -650,7 +647,8 @@ bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) } case VT_DATE: { - struct tm tmTemp; +#if wxUSE_TIMEDATE + struct tm tmTemp; if (!TmFromOleDate(oleVariant.date, tmTemp)) return FALSE; @@ -658,7 +656,9 @@ bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) wxTime time(date, tmTemp.tm_hour, tmTemp.tm_min, tmTemp.tm_sec); variant = time; - break; +#endif + + break; } case VT_I4: { @@ -679,8 +679,12 @@ bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) #else variant = (bool) (oleVariant.bool != 0); #endif +#else +#ifndef HAVE_BOOL // Can't use bool operator if no native bool type + variant = (long) (oleVariant.boolVal != 0); #else variant = (bool) (oleVariant.boolVal != 0); +#endif #endif break; } diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 59ca12f9a4..0b29b19dc5 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -39,7 +39,7 @@ #include "wx/msw/private.h" // includes -#ifdef wxUSE_NORLANDER_HEADERS +#if wxUSE_NORLANDER_HEADERS #include #endif #include @@ -317,7 +317,7 @@ STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium) pmedium->hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, sizeof(METAFILEPICT)); if ( !pmedium->hGlobal ) { - wxLogLastError("GlobalAlloc"); + wxLogLastError(wxT("GlobalAlloc")); return E_OUTOFMEMORY; } pmedium->tymed = TYMED_MFPICT; @@ -341,7 +341,7 @@ STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium) HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, size); if ( hGlobal == NULL ) { - wxLogLastError("GlobalAlloc"); + wxLogLastError(wxT("GlobalAlloc")); return E_OUTOFMEMORY; } @@ -457,7 +457,7 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc, // copy data void *pBuf = GlobalLock(pmedium->hGlobal); if ( pBuf == NULL ) { - wxLogLastError("GlobalLock"); + wxLogLastError(wxT("GlobalLock")); return E_OUTOFMEMORY; } @@ -506,6 +506,10 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc, size_t *p = (size_t *)pBuf; size = *p++; pBuf = p; + if (! format.IsStandard() ) { + // see GetData for coresponding increment + size -= sizeof(size_t); + } } } @@ -691,37 +695,37 @@ void wxDataObject::SetAutoDelete() #ifdef __WXDEBUG__ -const char *wxDataObject::GetFormatName(wxDataFormat format) +const wxChar *wxDataObject::GetFormatName(wxDataFormat format) { // case 'xxx' is not a valid value for switch of enum 'wxDataFormat' #ifdef __VISUALC__ #pragma warning(disable:4063) #endif // VC++ - static char s_szBuf[256]; + static wxChar s_szBuf[256]; switch ( format ) { - case CF_TEXT: return "CF_TEXT"; - case CF_BITMAP: return "CF_BITMAP"; - case CF_METAFILEPICT: return "CF_METAFILEPICT"; - case CF_SYLK: return "CF_SYLK"; - case CF_DIF: return "CF_DIF"; - case CF_TIFF: return "CF_TIFF"; - case CF_OEMTEXT: return "CF_OEMTEXT"; - case CF_DIB: return "CF_DIB"; - case CF_PALETTE: return "CF_PALETTE"; - case CF_PENDATA: return "CF_PENDATA"; - case CF_RIFF: return "CF_RIFF"; - case CF_WAVE: return "CF_WAVE"; - case CF_UNICODETEXT: return "CF_UNICODETEXT"; - case CF_ENHMETAFILE: return "CF_ENHMETAFILE"; - case CF_HDROP: return "CF_HDROP"; - case CF_LOCALE: return "CF_LOCALE"; + case CF_TEXT: return wxT("CF_TEXT"); + case CF_BITMAP: return wxT("CF_BITMAP"); + case CF_METAFILEPICT: return wxT("CF_METAFILEPICT"); + case CF_SYLK: return wxT("CF_SYLK"); + case CF_DIF: return wxT("CF_DIF"); + case CF_TIFF: return wxT("CF_TIFF"); + case CF_OEMTEXT: return wxT("CF_OEMTEXT"); + case CF_DIB: return wxT("CF_DIB"); + case CF_PALETTE: return wxT("CF_PALETTE"); + case CF_PENDATA: return wxT("CF_PENDATA"); + case CF_RIFF: return wxT("CF_RIFF"); + case CF_WAVE: return wxT("CF_WAVE"); + case CF_UNICODETEXT: return wxT("CF_UNICODETEXT"); + case CF_ENHMETAFILE: return wxT("CF_ENHMETAFILE"); + case CF_HDROP: return wxT("CF_HDROP"); + case CF_LOCALE: return wxT("CF_LOCALE"); default: if ( !::GetClipboardFormatName(format, s_szBuf, WXSIZEOF(s_szBuf)) ) { // it must be a new predefined format we don't know the name of - sprintf(s_szBuf, "unknown CF (0x%04x)", format.GetFormatId()); + wxSprintf(s_szBuf, wxT("unknown CF (0x%04x)"), format.GetFormatId()); } return s_szBuf; @@ -792,7 +796,7 @@ bool wxBitmapDataObject2::SetData(size_t WXUNUSED(len), const void *pBuf) BITMAP bmp; if ( !GetObject(hbmp, sizeof(BITMAP), &bmp) ) { - wxLogLastError("GetObject(HBITMAP)"); + wxLogLastError(wxT("GetObject(HBITMAP)")); } wxBitmap bitmap(bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes); @@ -827,7 +831,7 @@ size_t wxBitmapDataObject::GetDataSize(const wxDataFormat& format) const if ( !GetDIBits(hdc, (HBITMAP)m_bitmap.GetHBITMAP(), 0, 0, NULL, &bi, DIB_RGB_COLORS) ) { - wxLogLastError("GetDIBits(NULL)"); + wxLogLastError(wxT("GetDIBits(NULL)")); return 0; } @@ -860,7 +864,7 @@ bool wxBitmapDataObject::GetDataHere(const wxDataFormat& format, BITMAPINFO *pbi = (BITMAPINFO *)pBuf; if ( !GetDIBits(hdc, hbmp, 0, 0, NULL, pbi, DIB_RGB_COLORS) ) { - wxLogLastError("GetDIBits(NULL)"); + wxLogLastError(wxT("GetDIBits(NULL)")); return 0; } @@ -869,7 +873,7 @@ bool wxBitmapDataObject::GetDataHere(const wxDataFormat& format, if ( !GetDIBits(hdc, hbmp, 0, pbi->bmiHeader.biHeight, pbi + 1, pbi, DIB_RGB_COLORS) ) { - wxLogLastError("GetDIBits"); + wxLogLastError(wxT("GetDIBits")); return FALSE; } @@ -899,7 +903,7 @@ bool wxBitmapDataObject::SetData(const wxDataFormat& format, pbmi + 1, pbmi, DIB_RGB_COLORS); if ( !hbmp ) { - wxLogLastError("CreateDIBitmap"); + wxLogLastError(wxT("CreateDIBitmap")); } m_bitmap.SetWidth(pbmih->biWidth); @@ -913,7 +917,7 @@ bool wxBitmapDataObject::SetData(const wxDataFormat& format, BITMAP bmp; if ( !GetObject(hbmp, sizeof(BITMAP), &bmp) ) { - wxLogLastError("GetObject(HBITMAP)"); + wxLogLastError(wxT("GetObject(HBITMAP)")); } m_bitmap.SetWidth(bmp.bmWidth); @@ -963,8 +967,8 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *pData) m_filenames.Add(str); if ( len2 != len - 1 ) { - wxLogDebug(wxT("In wxFileDropTarget::OnDrop DragQueryFile returned" - " %d characters, %d expected."), len2, len - 1); + wxLogDebug(wxT("In wxFileDropTarget::OnDrop DragQueryFile returned\ + %d characters, %d expected."), len2, len - 1); } } @@ -1087,7 +1091,7 @@ size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap) HBITMAP hbmp = (HBITMAP)bitmap.GetHBITMAP(); if ( !GetObject(hbmp, sizeof(bm), &bm) ) { - wxLogLastError("GetObject(bitmap)"); + wxLogLastError(wxT("GetObject(bitmap)")); return 0; } @@ -1125,7 +1129,7 @@ size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap) ScreenHDC hdc; if ( !GetDIBits(hdc, hbmp, 0, bi.biHeight, NULL, pbi, DIB_RGB_COLORS) ) { - wxLogLastError("GetDIBits(NULL)"); + wxLogLastError(wxT("GetDIBits(NULL)")); return 0; } @@ -1140,7 +1144,7 @@ size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap) void *image = (char *)pbi + dwLen; if ( !GetDIBits(hdc, hbmp, 0, bi.biHeight, image, pbi, DIB_RGB_COLORS) ) { - wxLogLastError("GetDIBits"); + wxLogLastError(wxT("GetDIBits")); return 0; } @@ -1154,8 +1158,15 @@ wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbmi) // BITMAPINFO starts with BITMAPINFOHEADER followed by colour info const BITMAPINFOHEADER *pbmih = &pbmi->bmiHeader; + // biClrUsed has the number of colors, unless it's 0 + int numColors = pbmih->biClrUsed; + if (numColors==0) + { + numColors = wxGetNumOfBitmapColors(pbmih->biBitCount); + } + // offset of image from the beginning of the header - DWORD ofs = wxGetNumOfBitmapColors(pbmih->biBitCount) * sizeof(RGBQUAD); + DWORD ofs = numColors * sizeof(RGBQUAD); void *image = (char *)pbmih + sizeof(BITMAPINFOHEADER) + ofs; ScreenHDC hdc; @@ -1163,7 +1174,7 @@ wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbmi) image, pbmi, DIB_RGB_COLORS); if ( !hbmp ) { - wxLogLastError("CreateDIBitmap"); + wxLogLastError(wxT("CreateDIBitmap")); } wxBitmap bitmap(pbmih->biWidth, pbmih->biHeight, pbmih->biBitCount); diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp index e71864e064..1f93d9b8be 100644 --- a/src/msw/ole/dropsrc.cpp +++ b/src/msw/ole/dropsrc.cpp @@ -40,7 +40,7 @@ #include -#ifdef wxUSE_NORLANDER_HEADERS +#if wxUSE_NORLANDER_HEADERS #include #endif @@ -222,8 +222,7 @@ wxDragResult wxDropSource::DoDragDrop(bool bAllowMove) } else { if ( FAILED(hr) ) { - wxLogApiError("DoDragDrop", hr); - wxLogError(wxT("Drag & drop operation failed.")); + wxLogSysError(wxT("Drag & drop operation failed.")); } else { wxLogDebug(wxT("Unexpected success return code %08lx from DoDragDrop."), diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index c133b3d9b4..cd051b33ec 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -35,7 +35,7 @@ #include "wx/log.h" #ifdef __WIN32__ - #ifndef __GNUWIN32__ + #if !defined(__GNUWIN32__) || wxUSE_NORLANDER_HEADERS #include // for DROPFILES structure #endif #else @@ -161,7 +161,7 @@ STDMETHODIMP wxIDropTarget::DragEnter(IDataObject *pIDataSource, // we need client coordinates to pass to wxWin functions if ( !ScreenToClient(m_hwnd, (POINT *)&pt) ) { - wxLogLastError("ScreenToClient"); + wxLogLastError(wxT("ScreenToClient")); } // give some visual feedback @@ -201,7 +201,7 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState, // we need client coordinates to pass to wxWin functions if ( !ScreenToClient(m_hwnd, (POINT *)&pt) ) { - wxLogLastError("ScreenToClient"); + wxLogLastError(wxT("ScreenToClient")); } *pdwEffect = ConvertDragResultToEffect( @@ -254,7 +254,7 @@ STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource, // we need client coordinates to pass to wxWin functions if ( !ScreenToClient(m_hwnd, (POINT *)&pt) ) { - wxLogLastError("ScreenToClient"); + wxLogLastError(wxT("ScreenToClient")); } // first ask the drop target if it wants data @@ -309,7 +309,7 @@ bool wxDropTarget::Register(WXHWND hwnd) { HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE); if ( FAILED(hr) ) { - wxLogApiError("CoLockObjectExternal", hr); + wxLogApiError(_T("CoLockObjectExternal"), hr); return FALSE; } @@ -317,7 +317,7 @@ bool wxDropTarget::Register(WXHWND hwnd) if ( FAILED(hr) ) { ::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE); - wxLogApiError("RegisterDragDrop", hr); + wxLogApiError(_T("RegisterDragDrop"), hr); return FALSE; } @@ -332,7 +332,7 @@ void wxDropTarget::Revoke(WXHWND hwnd) HRESULT hr = ::RevokeDragDrop((HWND) hwnd); if ( FAILED(hr) ) { - wxLogApiError("RevokeDragDrop", hr); + wxLogApiError(_T("RevokeDragDrop"), hr); } ::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE); @@ -381,11 +381,11 @@ bool wxDropTarget::GetData() rc = TRUE; } else { - wxLogLastError("IDataObject::SetData()"); + wxLogLastError(wxT("IDataObject::SetData()")); } } else { - wxLogLastError("IDataObject::GetData()"); + wxLogLastError(wxT("IDataObject::GetData()")); } return rc; diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 38519d4f9b..55e74c6c45 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -63,16 +63,16 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount) // ---------------------------------------------------------------------------- #if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ > 1000) -const char *GetIidName(REFIID riid) +static wxString GetIidName(REFIID riid) { // an association between symbolic name and numeric value of an IID struct KNOWN_IID { const IID *pIid; - const char *szName; + const wxChar *szName; }; // construct the table containing all known interfaces - #define ADD_KNOWN_IID(name) { &IID_I##name, #name } + #define ADD_KNOWN_IID(name) { &IID_I##name, _T(#name) } static const KNOWN_IID aKnownIids[] = { ADD_KNOWN_IID(AdviseSink), @@ -166,24 +166,24 @@ const char *GetIidName(REFIID riid) } // unknown IID, just transform to string - static Uuid s_uuid; - s_uuid.Set(riid); - return s_uuid; + Uuid uuid(riid); + return wxString((const wxChar *)uuid); } -void wxLogQueryInterface(const char *szInterface, REFIID riid) +void wxLogQueryInterface(const wxChar *szInterface, REFIID riid) { - wxLogTrace("%s::QueryInterface (iid = %s)", szInterface, GetIidName(riid)); + wxLogTrace(wxT("%s::QueryInterface (iid = %s)"), + szInterface, GetIidName(riid).c_str()); } -void wxLogAddRef(const char *szInterface, ULONG cRef) +void wxLogAddRef(const wxChar *szInterface, ULONG cRef) { - wxLogTrace("After %s::AddRef: m_cRef = %d", szInterface, cRef + 1); + wxLogTrace(wxT("After %s::AddRef: m_cRef = %d"), szInterface, cRef + 1); } -void wxLogRelease(const char *szInterface, ULONG cRef) +void wxLogRelease(const wxChar *szInterface, ULONG cRef) { - wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1); + wxLogTrace(wxT("After %s::Release: m_cRef = %d"), szInterface, cRef - 1); } #elif defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ <= 1000) diff --git a/src/msw/ole/uuid.cpp b/src/msw/ole/uuid.cpp index cc912a6d1d..9436536733 100644 --- a/src/msw/ole/uuid.cpp +++ b/src/msw/ole/uuid.cpp @@ -165,8 +165,7 @@ void Uuid::UuidToCForm() if ( m_pszCForm == NULL ) m_pszCForm = new wxChar[UUID_CSTRLEN]; - wsprintf(m_pszCForm, wxT("0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X," - "0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X"), + wsprintf(m_pszCForm, wxT("0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X"), m_uuid.Data1, m_uuid.Data2, m_uuid.Data3, m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], m_uuid.Data4[4], m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7], m_uuid.Data4[8]); diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 17f7a55d2b..712b0d374a 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -28,6 +28,12 @@ #pragma hdrstop #endif +#if wxUSE_PRINTING_ARCHITECTURE + +#ifndef WX_PRECOMP + #include "wx/app.h" +#endif + #include "wx/printdlg.h" #include "wx/dcprint.h" @@ -106,7 +112,18 @@ int wxPrintDialog::ShowModal() { m_printDialogData.ConvertToNative(); - bool ret = (PrintDlg( (PRINTDLG *)m_printDialogData.GetNativeData() ) != 0); + PRINTDLG* p = (PRINTDLG *)m_printDialogData.GetNativeData() ; + if (m_dialogParent) + p->hwndOwner = (HWND) m_dialogParent->GetHWND(); + else if (wxTheApp->GetTopWindow()) + p->hwndOwner = (HWND) wxTheApp->GetTopWindow()->GetHWND(); + else + p->hwndOwner = 0; + + bool ret = (PrintDlg( p ) != 0); + + p->hwndOwner = 0; + if ( ret != FALSE && ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC) { wxPrinterDC *pdc = new wxPrinterDC((WXHDC) ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC); @@ -166,7 +183,16 @@ int wxPageSetupDialog::ShowModal() { #ifdef __WIN95__ m_pageSetupData.ConvertToNative(); - if (PageSetupDlg( (PAGESETUPDLG *)m_pageSetupData.GetNativeData() )) + PAGESETUPDLG *p = (PAGESETUPDLG *)m_pageSetupData.GetNativeData(); + if (m_dialogParent) + p->hwndOwner = (HWND) m_dialogParent->GetHWND(); + else if (wxTheApp->GetTopWindow()) + p->hwndOwner = (HWND) wxTheApp->GetTopWindow()->GetHWND(); + else + p->hwndOwner = 0; + BOOL retVal = PageSetupDlg( p ) ; + p->hwndOwner = 0; + if (retVal) { m_pageSetupData.ConvertFromNative(); return wxID_OK; @@ -182,3 +208,5 @@ int wxPageSetupDialog::ShowModal() #endif } +#endif + // wxUSE_PRINTING_ARCHITECTURE diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index f46993f88a..8185820ef0 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -30,6 +30,8 @@ #include "wx/defs.h" +#if wxUSE_PRINTING_ARCHITECTURE + #ifndef WX_PRECOMP #include "wx/window.h" #include "wx/msw/private.h" @@ -87,7 +89,7 @@ wxWindowsPrinter::~wxWindowsPrinter() { // avoids mingw warning about statement with no effect (FreeProcInstance // doesn't do anything under Win32) -#ifndef __GNUWIN32__ +#if !defined(__GNUWIN32__) && !defined(__WATCOMC__) FreeProcInstance((FARPROC) m_lpAbortProc); #endif } @@ -98,7 +100,10 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt sm_abortWindow = NULL; if (!printout) + { + sm_lastError = wxPRINTER_ERROR; return FALSE; + } printout->SetIsPreview(FALSE); @@ -113,7 +118,10 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage); if (maxPage == 0) + { + sm_lastError = wxPRINTER_ERROR; return FALSE; + } m_printDialogData.SetMinPage(minPage); m_printDialogData.SetMaxPage(maxPage); @@ -173,6 +181,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt if (logPPIPrinterX == 0 || logPPIPrinterY == 0) { delete dc; + sm_lastError = wxPRINTER_ERROR; return FALSE; } @@ -220,6 +229,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt { wxEndBusyCursor(); wxLogDebug(wxT("Could not create an abort dialog.")); + sm_lastError = wxPRINTER_ERROR; delete dc; } @@ -229,6 +239,8 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt printout->OnBeginPrinting(); + sm_lastError = wxPRINTER_NO_ERROR; + int copyCount; for ( copyCount = 1; copyCount <= m_printDialogData.GetNoCopies(); @@ -238,10 +250,14 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt { wxEndBusyCursor(); wxLogError(_("Could not start printing.")); + sm_lastError = wxPRINTER_ERROR; break; } if (sm_abortIt) + { + sm_lastError = wxPRINTER_CANCELLED; break; + } int pn; for ( pn = m_printDialogData.GetFromPage(); @@ -250,6 +266,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt { if ( sm_abortIt ) { + sm_lastError = wxPRINTER_CANCELLED; break; } @@ -258,7 +275,10 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt dc->EndPage(); if ( !cont ) + { + sm_lastError = wxPRINTER_CANCELLED; break; + } } printout->OnEndDocument(); @@ -277,7 +297,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt delete dc; - return TRUE; + return (sm_lastError == wxPRINTER_NO_ERROR); } wxDC* wxWindowsPrinter::PrintDialog(wxWindow *parent) @@ -291,7 +311,13 @@ wxDC* wxWindowsPrinter::PrintDialog(wxWindow *parent) { dc = dialog.GetPrintDC(); m_printDialogData = dialog.GetPrintDialogData(); + if (dc == NULL) + sm_lastError = wxPRINTER_ERROR; + else + sm_lastError = wxPRINTER_NO_ERROR; } + else + sm_lastError = wxPRINTER_CANCELLED; return dc; } @@ -419,3 +445,5 @@ LONG APIENTRY _EXPORT wxAbortProc(HDC WXUNUSED(hPr), int WXUNUSED(Code)) return (!wxPrinterBase::sm_abortIt); } +#endif + // wxUSE_PRINTING_ARCHITECTURE diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index e54fa2c71c..529c46dbd3 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: radiobox.cpp -// Purpose: wxRadioBox +// Name: msw/radiobox.cpp +// Purpose: wxRadioBox implementation // Author: Julian Smart // Modified by: // Created: 04/01/98 @@ -32,6 +32,7 @@ #include "wx/bitmap.h" #include "wx/brush.h" #include "wx/radiobox.h" + #include "wx/settings.h" #include "wx/log.h" #endif @@ -97,6 +98,7 @@ static WXFARPROC s_wndprocRadioBtn = (WXFARPROC)NULL; // wxRadioBox // --------------------------------------------------------------------------- +// returns the number of rows int wxRadioBox::GetNumVer() const { if ( m_windowStyle & wxRA_SPECIFY_ROWS ) @@ -109,6 +111,7 @@ int wxRadioBox::GetNumVer() const } } +// returns the number of columns int wxRadioBox::GetNumHor() const { if ( m_windowStyle & wxRA_SPECIFY_ROWS ) @@ -125,6 +128,9 @@ bool wxRadioBox::MSWCommand(WXUINT cmd, WXWORD id) { if ( cmd == BN_CLICKED ) { + if (id == GetId()) + return TRUE; + int selectedButton = -1; for ( int i = 0; i < m_noItems; i++ ) @@ -137,7 +143,14 @@ bool wxRadioBox::MSWCommand(WXUINT cmd, WXWORD id) } } - wxASSERT_MSG( selectedButton != -1, wxT("click from alien button?") ); + if ( selectedButton == -1 ) + { + // just ignore it - due to a hack with WM_NCHITTEST handling in our + // wnd proc, we can receive dummy click messages when we click near + // the radiobox edge (this is ugly but Julian wouldn't let me get + // rid of this...) + return FALSE; + } if ( selectedButton != m_selectedButton ) { @@ -197,7 +210,7 @@ bool wxRadioBox::Create(wxWindow *parent, m_selectedButton = -1; m_noItems = 0; - m_majorDim = majorDim == 0 ? n : majorDim; + m_majorDim = majorDim == 0 ? n : majorDim; m_noRowsOrCols = majorDim; // common initialization @@ -251,7 +264,7 @@ bool wxRadioBox::Create(wxWindow *parent, if ( !hwndBtn ) { - wxLogLastError("CreateWindow(radio btn)"); + wxLogLastError(wxT("CreateWindow(radio btn)")); return FALSE; } @@ -362,6 +375,75 @@ wxString wxRadioBox::GetString(int N) const return wxGetWindowText(m_radioButtons[N]); } +// ---------------------------------------------------------------------------- +// size calculations +// ---------------------------------------------------------------------------- + +wxSize wxRadioBox::GetMaxButtonSize() const +{ + // calculate the max button size + int widthMax = 0, + heightMax = 0; + for ( int i = 0 ; i < m_noItems; i++ ) + { + int width, height; + if ( m_radioWidth[i] < 0 ) + { + GetTextExtent(wxGetWindowText(m_radioButtons[i]), &width, &height); + + // adjust the size to take into account the radio box itself + // FIXME this is totally bogus! + width += RADIO_SIZE; + height *= 3; + height /= 2; + } + else + { + width = m_radioWidth[i]; + height = m_radioHeight[i]; + } + + if ( widthMax < width ) + widthMax = width; + if ( heightMax < height ) + heightMax = height; + } + + return wxSize(widthMax, heightMax); +} + +wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const +{ + // the radiobox should be big enough for its buttons + int cx1, cy1; + wxGetCharSize(m_hWnd, &cx1, &cy1, &GetFont()); + + int extraHeight = cy1; + +#if defined(CTL3D) && !CTL3D + // Requires a bigger group box in plain Windows + extraHeight *= 3; + extraHeight /= 2; +#endif + + int height = GetNumVer() * sizeBtn.y + cy1/2 + extraHeight; + int width = GetNumHor() * (sizeBtn.x + cx1) + cx1; + + // and also wide enough for its label + int widthLabel; + GetTextExtent(GetTitle(), &widthLabel, NULL); + widthLabel += RADIO_SIZE; // FIXME this is bogus too + if ( widthLabel > width ) + width = widthLabel; + + return wxSize(width, height); +} + +wxSize wxRadioBox::DoGetBestSize() const +{ + return GetTotalButtonSize(GetMaxButtonSize()); +} + // Restored old code. void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) { @@ -386,106 +468,89 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) int x_offset = xx; #endif - int current_width, cyf; - - int cx1,cy1; + int cx1, cy1; wxGetCharSize(m_hWnd, &cx1, &cy1, & GetFont()); // Attempt to have a look coherent with other platforms: We compute the // biggest toggle dim, then we align all items according this value. - int maxWidth = -1; - int maxHeight = -1; + wxSize maxSize = GetMaxButtonSize(); + int maxWidth = maxSize.x, + maxHeight = maxSize.y; - int i; - for (i = 0 ; i < m_noItems; i++) + wxSize totSize = GetTotalButtonSize(maxSize); + int totWidth = totSize.x, + totHeight = totSize.y; + + // only change our width/height if asked for + if ( width == -1 ) { - int eachWidth; - int eachHeight; - if (m_radioWidth[i]<0) - { - // It's a labelled toggle - GetTextExtent(wxGetWindowText(m_radioButtons[i]), - ¤t_width, &cyf); - eachWidth = (int)(current_width + RADIO_SIZE); - eachHeight = (int)((3*cyf)/2); - } + if ( sizeFlags & wxSIZE_AUTO_WIDTH ) + width = totWidth; else - { - eachWidth = m_radioWidth[i]; - eachHeight = m_radioHeight[i]; - } - - if (maxWidth= (m_noItems/m_majorDim)*m_majorDim; + } + + // is this the start of new row/column? + if ( i && (i % m_majorDim == 0) ) + { + if ( m_windowStyle & wxRA_SPECIFY_ROWS ) { + // start of new column y_offset = startY; x_offset += maxWidth + cx1; } - else + else // start of new row { x_offset = startX; y_offset += maxHeight; @@ -493,23 +558,19 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) y_offset += cy1/2; } } - int eachWidth; - int eachHeight; - if (m_radioWidth[i]<0) - { - // It's a labeled item - GetTextExtent(wxGetWindowText(m_radioButtons[i]), - ¤t_width, &cyf); - // How do we find out radio button bitmap size!! - // By adjusting them carefully, manually :-) - eachWidth = (int)(current_width + RADIO_SIZE); - eachHeight = (int)((3*cyf)/2); + int widthBtn; + if ( isLastInTheRow ) + { + // make the button go to the end of radio box + widthBtn = startX + width - x_offset - 2*cx1; + if ( widthBtn < maxWidth ) + widthBtn = maxWidth; } else { - eachWidth = m_radioWidth[i]; - eachHeight = m_radioHeight[i]; + // normal button, always of the same size + widthBtn = maxWidth; } // VZ: make all buttons of the same, maximal size - like this they @@ -517,17 +578,22 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) // shown (otherwise they are not when the mouse pointer is in the // radiobox part not belonging to any radiobutton) ::MoveWindow((HWND)m_radioButtons[i], - x_offset, y_offset, maxWidth, maxHeight, + x_offset, y_offset, widthBtn, maxHeight, TRUE); - if (m_windowStyle & wxRA_SPECIFY_ROWS) + // where do we put the next button? + if ( m_windowStyle & wxRA_SPECIFY_ROWS ) { + // below this one y_offset += maxHeight; if (m_radioWidth[0]>0) y_offset += cy1/2; } else - x_offset += maxWidth + cx1; + { + // to the right of this one + x_offset += widthBtn + cx1; + } } } @@ -716,11 +782,12 @@ bool wxRadioBox::SetFont(const wxFont& font) WXHFONT hfont = wxFont(font).GetResourceHandle(); for ( int n = 0; n < m_noItems; n++ ) { - ::SendMessage((HWND)m_radioButtons[n], WM_SETFONT, (WPARAM)hfont, 0L); - } + HWND hwndBtn = (HWND)m_radioButtons[n]; + ::SendMessage(hwndBtn, WM_SETFONT, (WPARAM)hfont, 0L); - // this is needed because otherwise the buttons are not redrawn correctly - Refresh(); + // otherwise the buttons are not redrawn correctly + ::InvalidateRect(hwndBtn, NULL, FALSE /* don't erase bg */); + } return TRUE; } @@ -769,6 +836,39 @@ long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) return wxControl::MSWWindowProc(nMsg, wParam, lParam); } +WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam) +{ +#if wxUSE_CTL3D + if ( m_useCtl3D ) + { + HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); + return (WXHBRUSH) hbrush; + } +#endif // wxUSE_CTL3D + + HDC hdc = (HDC)pDC; + if (GetParent()->GetTransparentBackground()) + SetBkMode(hdc, TRANSPARENT); + else + SetBkMode(hdc, OPAQUE); + + wxColour colBack = GetBackgroundColour(); + + if (!IsEnabled()) + colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + + ::SetBkColor(hdc, wxColourToRGB(colBack)); + ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); + + wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); + + return (WXHBRUSH)brush->GetResourceHandle(); +} + + // --------------------------------------------------------------------------- // window proc for radio buttons // --------------------------------------------------------------------------- @@ -828,25 +928,60 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, bool processed = TRUE; + bool horz = (radiobox->GetWindowStyle() & wxRA_SPECIFY_COLS) != 0; + int num = radiobox->Number(), + rows = radiobox->GetNumVer(), + cols = radiobox->GetNumHor(); + int selOld = radiobox->GetSelection(); int selNew = selOld; + // wrapping will be handled below for the cases when we + // add/substract more than 1 but here otherwise as it's simpler switch ( wParam ) { case VK_UP: - selNew--; + if ( horz ) + selNew -= cols; + else + { + if ( selNew ) + selNew--; + else + selNew = num - 1; + } break; case VK_LEFT: - selNew -= radiobox->GetNumVer(); + if ( horz ) + { + if ( selNew ) + selNew--; + else + selNew = num - 1; + } + else + selNew -= rows; break; case VK_DOWN: - selNew++; + if ( horz ) + selNew += cols; + else + { + if ( ++selNew == num ) + selNew = 0; + } break; case VK_RIGHT: - selNew += radiobox->GetNumVer(); + if ( horz ) + { + if ( ++selNew == num ) + selNew = 0; + } + else + selNew += rows; break; default: @@ -856,9 +991,28 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, if ( processed ) { // ensure that selNew is in range [0..num) - int num = radiobox->Number(); - selNew += num; - selNew %= num; + if ( selNew >= num ) + { + selNew -= num; + + int dim = horz ? cols : rows; + selNew += dim - 1; + selNew %= dim; + } + else if ( selNew < 0 ) + { + selNew += num; + + int dim = horz ? cols : rows; + if ( selNew % dim == 0 ) + { + selNew -= dim - 1; + } + else + { + selNew++; + } + } if ( selNew != selOld ) { diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 0f7b1dc92e..261af8c3d3 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -24,6 +24,7 @@ #include #include "wx/setup.h" #include "wx/radiobut.h" +#include "wx/settings.h" #include "wx/brush.h" #endif @@ -38,6 +39,7 @@ bool wxRadioButton::MSWCommand(WXUINT param, WXWORD id) { wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId); event.SetEventObject( this ); + event.SetInt( GetValue() ); ProcessCommand(event); return TRUE; } @@ -78,7 +80,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, groupStyle = WS_GROUP; // long msStyle = groupStyle | RADIO_FLAGS; - long msStyle = groupStyle | BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE ; + long msStyle = groupStyle | BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */; bool want3D; WXDWORD exStyle = Determine3DEffects(0, &want3D) ; @@ -136,6 +138,13 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, SetSize(x, y, width, height); + // for compatibility with wxGTK, the first radio button in a group is + // always checked (this makes sense anyhow as you need to ensure that at + // least one button in the group is checked and this is the simlpest way to + // do it) + if ( m_windowStyle & wxRB_GROUP ) + SetValue(TRUE); + return TRUE; } @@ -163,6 +172,37 @@ void wxRadioButton::Command (wxCommandEvent & event) ProcessCommand (event); } +WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam) +{ +#if wxUSE_CTL3D + if ( m_useCtl3D ) + { + HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); + return (WXHBRUSH) hbrush; + } +#endif // wxUSE_CTL3D + + HDC hdc = (HDC)pDC; + if (GetParent()->GetTransparentBackground()) + SetBkMode(hdc, TRANSPARENT); + else + SetBkMode(hdc, OPAQUE); + + wxColour colBack = GetBackgroundColour(); + + if (!IsEnabled()) + colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + + ::SetBkColor(hdc, wxColourToRGB(colBack)); + ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); + + wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); + + return (WXHBRUSH)brush->GetResourceHandle(); +} // Not implemented #if 0 diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index e62511ca68..a590bdaa8f 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -16,6 +16,12 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/defs.h" + #include "wx/string.h" + #include "wx/intl.h" +#endif //WX_PRECOMP + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -27,6 +33,9 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/log.h" + +#if wxUSE_CONFIG + #include "wx/config.h" #ifndef __WIN16__ @@ -109,14 +118,28 @@ wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName, //else: we don't need to do all the complicated stuff above wxString str = strLocal.IsEmpty() ? strRoot : strLocal; + + // as we're going to change the name of these keys fairly often and as + // there are only few of wxRegConfig objects (usually 1), we can allow + // ourselves to be generous and spend some memory to significantly improve + // performance of SetPath() + static const size_t MEMORY_PREALLOC = 512; + + m_keyLocalRoot.ReserveMemoryForName(MEMORY_PREALLOC); + m_keyLocal.ReserveMemoryForName(MEMORY_PREALLOC); + m_keyLocalRoot.SetName(wxRegKey::HKCU, SOFTWARE_KEY + str); - m_keyLocal.SetName(m_keyLocalRoot, ""); + m_keyLocal.SetName(m_keyLocalRoot, _T("")); if ( bDoUseGlobal ) { str = strGlobal.IsEmpty() ? strRoot : strGlobal; + + m_keyGlobalRoot.ReserveMemoryForName(MEMORY_PREALLOC); + m_keyGlobal.ReserveMemoryForName(MEMORY_PREALLOC); + m_keyGlobalRoot.SetName(wxRegKey::HKLM, SOFTWARE_KEY + str); - m_keyGlobal.SetName(m_keyGlobalRoot, ""); + m_keyGlobal.SetName(m_keyGlobalRoot, _T("")); } // Create() will Open() if key already exists @@ -142,50 +165,230 @@ wxRegConfig::~wxRegConfig() // ---------------------------------------------------------------------------- // path management // ---------------------------------------------------------------------------- + +// this function is called a *lot* of times (as I learned after seeing from +// profiler output that it is called ~12000 times from Mahogany start up code!) +// so it is important to optimize it - in particular, avoid using generic +// string functions here and do everything manually because it is faster +// +// I still kept the old version to be able to check that the optimized code has +// the same output as the non optimized version. void wxRegConfig::SetPath(const wxString& strPath) { - wxArrayString aParts; + // remember the old path + wxString strOldPath = m_strPath; - // because GetPath() returns "" when we're at root, we must understand - // empty string as "/" - if ( strPath.IsEmpty() || (strPath[0] == wxCONFIG_PATH_SEPARATOR) ) { - // absolute path - wxSplitPath(aParts, strPath); - } - else { - // relative path, combine with current one - wxString strFullPath = GetPath(); - strFullPath << wxCONFIG_PATH_SEPARATOR << strPath; - wxSplitPath(aParts, strFullPath); - } +#ifdef WX_DEBUG_SET_PATH // non optimized version kept here for testing + wxString m_strPathAlt; - // recombine path parts in one variable - wxString strOldPath = m_strPath, strRegPath; - m_strPath.Empty(); - for ( size_t n = 0; n < aParts.Count(); n++ ) { - strRegPath << '\\' << aParts[n]; - m_strPath << wxCONFIG_PATH_SEPARATOR << aParts[n]; - } + { + wxArrayString aParts; - if ( m_strPath == strOldPath ) - return; + // because GetPath() returns "" when we're at root, we must understand + // empty string as "/" + if ( strPath.IsEmpty() || (strPath[0] == wxCONFIG_PATH_SEPARATOR) ) { + // absolute path + wxSplitPath(aParts, strPath); + } + else { + // relative path, combine with current one + wxString strFullPath = GetPath(); + strFullPath << wxCONFIG_PATH_SEPARATOR << strPath; + wxSplitPath(aParts, strFullPath); + } - // as we create the registry key when SetPath(key) is done, we can be left - // with plenty of empty keys if this was only done to try to read some value - // which, in fact, doesn't exist - to prevent this from happening we - // automatically delete the old key if it was empty - if ( m_keyLocal.IsEmpty() ) - { - m_keyLocal.DeleteSelf(); - } + // recombine path parts in one variable + wxString strRegPath; + m_strPathAlt.Empty(); + for ( size_t n = 0; n < aParts.Count(); n++ ) { + strRegPath << '\\' << aParts[n]; + m_strPathAlt << wxCONFIG_PATH_SEPARATOR << aParts[n]; + } + } +#endif // 0 - // change current key(s) - m_keyLocal.SetName(m_keyLocalRoot, strRegPath); - m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath); - m_keyLocal.Create(); + // check for the most common case first + if ( strPath.empty() ) + { + m_strPath = wxCONFIG_PATH_SEPARATOR; + } + else // not root + { + // construct the full path + wxString strFullPath; + if ( strPath[0u] == wxCONFIG_PATH_SEPARATOR ) + { + // absolute path + strFullPath = strPath; + } + else // relative path + { + strFullPath.reserve(2*m_strPath.length()); - wxLogNull nolog; - m_keyGlobal.Open(); + strFullPath << m_strPath << wxCONFIG_PATH_SEPARATOR << strPath; + } + + // simplify it: we need to handle ".." here + + // count the total number of slashes we have to know if we can go upper + size_t totalSlashes = 0; + + // position of the last slash to be able to backtrack to it quickly if + // needed, but we set it to -1 if we don't have a valid position + // + // we only remember the last position which means that we handle ".." + // quite efficiently but not "../.." - however the latter should be + // much more rare, so it is probably ok + int posLastSlash = -1; + + const wxChar *src = strFullPath.c_str(); + size_t len = strFullPath.length(); + const wxChar *end = src + len; + + wxChar *dst = m_strPath.GetWriteBuf(len); + wxChar *start = dst; + + for ( ; src < end; src++, dst++ ) + { + if ( *src == wxCONFIG_PATH_SEPARATOR ) + { + // check for "/.." + + // note that we don't have to check for src < end here as + // *end == 0 so can't be '.' + if ( src[1] == _T('.') && src[2] == _T('.') && + (src + 3 == end || src[3] == wxCONFIG_PATH_SEPARATOR) ) + { + if ( !totalSlashes ) + { + wxLogWarning(_("'%s' has extra '..', ignored."), + strFullPath.c_str()); + } + else // return to the previous path component + { + // do we already have its position? + if ( posLastSlash == -1 ) + { + // no, find it: note that we are sure to have one + // because totalSlashes > 0 so we don't have to + // check the boundary condition below + + // this is more efficient than strrchr() + dst--; + while ( *dst != wxCONFIG_PATH_SEPARATOR ) + { + dst--; + } + } + else // the position of last slash was stored + { + // go directly there + dst = start + posLastSlash; + + // invalidate posLastSlash + posLastSlash = -1; + } + + // we must have found a slash one way or another! + wxASSERT_MSG( *dst == wxCONFIG_PATH_SEPARATOR, + _T("error in wxRegConfig::SetPath") ); + + // stay at the same position + dst--; + + // we killed one + totalSlashes--; + } + + // skip both dots + src += 2; + } + else // not "/.." + { + if ( (dst == start) || (dst[-1] != wxCONFIG_PATH_SEPARATOR) ) + { + *dst = wxCONFIG_PATH_SEPARATOR; + + posLastSlash = dst - start; + + totalSlashes++; + } + else // previous char was a slash too + { + // squeeze several subsequent slashes into one: i.e. + // just ignore this one + dst--; + } + } + } + else // normal character + { + // just copy + *dst = *src; + } + } + + // NUL terminate the string + if ( dst[-1] == wxCONFIG_PATH_SEPARATOR && (dst != start + 1) ) + { + // if it has a trailing slash we remove it unless it is the only + // string character + dst--; + } + + *dst = _T('\0'); + + m_strPath.UngetWriteBuf(dst - start); + } + +#ifdef WX_DEBUG_SET_PATH + wxASSERT( m_strPath == m_strPathAlt ); +#endif + + if ( m_strPath == strOldPath ) + return; + + // registry APIs want backslashes instead of slashes + wxString strRegPath; + size_t len = m_strPath.length(); + + const wxChar *src = m_strPath.c_str(); + wxChar *dst = strRegPath.GetWriteBuf(len); + + const wxChar *end = src + len; + for ( ; src < end; src++, dst++ ) + { + if ( *src == wxCONFIG_PATH_SEPARATOR ) + *dst = _T('\\'); + else + *dst = *src; + } + + strRegPath.UngetWriteBuf(len); + + // this is not needed any longer as we don't create keys unnecessarily any + // more (now it is done on demand, i.e. only when they're going to contain + // something) +#if 0 + // as we create the registry key when SetPath(key) is done, we can be left + // with plenty of empty keys if this was only done to try to read some + // value which, in fact, doesn't exist - to prevent this from happening we + // automatically delete the old key if it was empty + if ( m_keyLocal.Exists() && LocalKey().IsEmpty() ) + { + m_keyLocal.DeleteSelf(); + } +#endif // 0 + + // change current key(s) + m_keyLocal.SetName(m_keyLocalRoot, strRegPath); + m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath); + + // don't create it right now, wait until it is accessed + //m_keyLocal.Create(); + + wxLogNull nolog; + m_keyGlobal.Open(); } // ---------------------------------------------------------------------------- @@ -214,19 +417,25 @@ bool wxRegConfig::GetNextGroup(wxString& str, long& lIndex) const // are we already enumerating local entries? if ( m_keyGlobal.IsOpened() && !IS_LOCAL_INDEX(lIndex) ) { // try to find a global entry which doesn't appear locally - do { - if ( !m_keyGlobal.GetNextKey(str, lIndex) ) { - // no more global entries - lIndex |= LOCAL_MASK; - break; + while ( m_keyGlobal.GetNextKey(str, lIndex) ) { + if ( !m_keyLocal.Exists() || !LocalKey().HasSubKey(str) ) { + // ok, found one - return it + return TRUE; } - } while( m_keyLocal.HasSubKey(str) ); + } + + // no more global entries + lIndex |= LOCAL_MASK; } + // if we don't have the key at all, don't try to enumerate anything under it + if ( !m_keyLocal.Exists() ) + return FALSE; + // much easier with local entries: get the next one we find // (don't forget to clear our flag bit and set it again later) lIndex &= ~LOCAL_MASK; - bool bOk = m_keyLocal.GetNextKey(str, lIndex); + bool bOk = LocalKey().GetNextKey(str, lIndex); lIndex |= LOCAL_MASK; return bOk; @@ -243,19 +452,25 @@ bool wxRegConfig::GetNextEntry(wxString& str, long& lIndex) const // are we already enumerating local entries? if ( m_keyGlobal.IsOpened() && !IS_LOCAL_INDEX(lIndex) ) { // try to find a global entry which doesn't appear locally - do { - if ( !m_keyGlobal.GetNextValue(str, lIndex) ) { - // no more global entries - lIndex |= LOCAL_MASK; - break; + while ( m_keyGlobal.GetNextValue(str, lIndex) ) { + if ( !m_keyLocal.Exists() || !LocalKey().HasValue(str) ) { + // ok, found one - return it + return TRUE; } - } while( m_keyLocal.HasValue(str) ); + } + + // no more global entries + lIndex |= LOCAL_MASK; } + // if we don't have the key at all, don't try to enumerate anything under it + if ( !m_keyLocal.Exists() ) + return FALSE; + // much easier with local entries: get the next one we find // (don't forget to clear our flag bit and set it again later) lIndex &= ~LOCAL_MASK; - bool bOk = m_keyLocal.GetNextValue(str, lIndex); + bool bOk = LocalKey().GetNextValue(str, lIndex); lIndex |= LOCAL_MASK; return bOk; @@ -305,7 +520,8 @@ bool wxRegConfig::HasGroup(const wxString& key) const wxString strName(path.Name()); - return m_keyLocal.HasSubKey(strName) || m_keyGlobal.HasSubKey(strName); + return (m_keyLocal.Exists() && LocalKey().HasSubKey(strName)) || + m_keyGlobal.HasSubKey(strName); } bool wxRegConfig::HasEntry(const wxString& key) const @@ -314,7 +530,8 @@ bool wxRegConfig::HasEntry(const wxString& key) const wxString strName(path.Name()); - return m_keyLocal.HasValue(strName) || m_keyGlobal.HasValue(strName); + return (m_keyLocal.Exists() && LocalKey().HasValue(strName)) || + m_keyGlobal.HasValue(strName); } wxConfigBase::EntryType wxRegConfig::GetEntryType(const wxString& key) const @@ -324,7 +541,7 @@ wxConfigBase::EntryType wxRegConfig::GetEntryType(const wxString& key) const wxString strName(path.Name()); bool isNumeric; - if ( m_keyLocal.HasValue(strName) ) + if ( m_keyLocal.Exists() && LocalKey().HasValue(strName) ) isNumeric = m_keyLocal.IsNumericValue(strName); else if ( m_keyGlobal.HasValue(strName) ) isNumeric = m_keyGlobal.IsNumericValue(strName); @@ -348,7 +565,7 @@ bool wxRegConfig::Read(const wxString& key, wxString *pStr) const // overriden by the local key with the same name if ( IsImmutable(path.Name()) ) { if ( TryGetValue(m_keyGlobal, path.Name(), *pStr) ) { - if ( m_keyLocal.HasValue(path.Name()) ) { + if ( m_keyLocal.Exists() && LocalKey().HasValue(path.Name()) ) { wxLogWarning(wxT("User value for immutable key '%s' ignored."), path.Name().c_str()); } @@ -362,7 +579,7 @@ bool wxRegConfig::Read(const wxString& key, wxString *pStr) const } // first try local key - if ( TryGetValue(m_keyLocal, path.Name(), *pStr) || + if ( (m_keyLocal.Exists() && TryGetValue(LocalKey(), path.Name(), *pStr)) || (bQueryGlobal && TryGetValue(m_keyGlobal, path.Name(), *pStr)) ) { // nothing to do @@ -384,7 +601,7 @@ bool wxRegConfig::Read(const wxString& key, wxString *pStr, // overriden by the local key with the same name if ( IsImmutable(path.Name()) ) { if ( TryGetValue(m_keyGlobal, path.Name(), *pStr) ) { - if ( m_keyLocal.HasValue(path.Name()) ) { + if ( m_keyLocal.Exists() && LocalKey().HasValue(path.Name()) ) { wxLogWarning(wxT("User value for immutable key '%s' ignored."), path.Name().c_str()); } @@ -398,7 +615,7 @@ bool wxRegConfig::Read(const wxString& key, wxString *pStr, } // first try local key - if ( TryGetValue(m_keyLocal, path.Name(), *pStr) || + if ( (m_keyLocal.Exists() && TryGetValue(LocalKey(), path.Name(), *pStr)) || (bQueryGlobal && TryGetValue(m_keyGlobal, path.Name(), *pStr)) ) { *pStr = wxConfigBase::ExpandEnvVars(*pStr); return TRUE; @@ -427,7 +644,7 @@ bool wxRegConfig::Read(const wxString& key, long *plResult) const // overriden by the local key with the same name if ( IsImmutable(path.Name()) ) { if ( TryGetValue(m_keyGlobal, path.Name(), plResult) ) { - if ( m_keyLocal.HasValue(path.Name()) ) { + if ( m_keyLocal.Exists() && LocalKey().HasValue(path.Name()) ) { wxLogWarning(wxT("User value for immutable key '%s' ignored."), path.Name().c_str()); } @@ -441,7 +658,7 @@ bool wxRegConfig::Read(const wxString& key, long *plResult) const } // first try local key - if ( TryGetValue(m_keyLocal, path.Name(), plResult) || + if ( (m_keyLocal.Exists() && TryGetValue(LocalKey(), path.Name(), plResult)) || (bQueryGlobal && TryGetValue(m_keyGlobal, path.Name(), plResult)) ) { return TRUE; } @@ -457,7 +674,7 @@ bool wxRegConfig::Write(const wxString& key, const wxString& szValue) return FALSE; } - return m_keyLocal.SetValue(path.Name(), szValue); + return LocalKey().SetValue(path.Name(), szValue); } bool wxRegConfig::Write(const wxString& key, long lValue) @@ -469,7 +686,7 @@ bool wxRegConfig::Write(const wxString& key, long lValue) return FALSE; } - return m_keyLocal.SetValue(path.Name(), lValue); + return LocalKey().SetValue(path.Name(), lValue); } // ---------------------------------------------------------------------------- @@ -486,34 +703,7 @@ bool wxRegConfig::RenameEntry(const wxString& oldName, const wxString& newName) if ( HasEntry(newName) ) return FALSE; - // delete the old entry and create the new one - but do in the reverse - // order to not lose the data if Create() fails - - bool ok; - if ( m_keyLocal.IsNumericValue(oldName) ) - { - long val; - ok = m_keyLocal.QueryValue(oldName, &val) && - m_keyLocal.SetValue(newName, val); - } - else - { - wxString val; - ok = m_keyLocal.QueryValue(oldName, val) && - m_keyLocal.SetValue(newName, val); - } - - if ( !ok ) - return FALSE; - - if ( !m_keyLocal.DeleteValue(oldName) ) - { - m_keyLocal.DeleteValue(newName); - - return FALSE; - } - - return TRUE; + return m_keyLocal.RenameValue(oldName, newName); } bool wxRegConfig::RenameGroup(const wxString& oldName, const wxString& newName) @@ -526,11 +716,7 @@ bool wxRegConfig::RenameGroup(const wxString& oldName, const wxString& newName) if ( HasGroup(newName) ) return FALSE; - // TODO there is no way to rename a registry key - we must do a deep copy - // ourselves - wxFAIL_MSG(wxT("Registry key renaming not implemented")); - - return FALSE; + return wxRegKey(m_keyLocal, oldName).Rename(newName); } // ---------------------------------------------------------------------------- @@ -540,13 +726,15 @@ bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso) { wxConfigPathChanger path(this, value); - if ( !m_keyLocal.DeleteValue(path.Name()) ) - return FALSE; + if ( m_keyLocal.Exists() ) { + if ( !m_keyLocal.DeleteValue(path.Name()) ) + return FALSE; - if ( m_keyLocal.IsEmpty() ) { - wxString strKey = GetPath().AfterLast(wxCONFIG_PATH_SEPARATOR); - SetPath(".."); // changes m_keyLocal - return m_keyLocal.DeleteKey(strKey); + if ( m_keyLocal.IsEmpty() ) { + wxString strKey = GetPath().AfterLast(wxCONFIG_PATH_SEPARATOR); + SetPath(".."); // changes m_keyLocal + return LocalKey().DeleteKey(strKey); + } } return TRUE; @@ -556,7 +744,7 @@ bool wxRegConfig::DeleteGroup(const wxString& key) { wxConfigPathChanger path(this, key); - return m_keyLocal.DeleteKey(path.Name()); + return m_keyLocal.Exists() ? LocalKey().DeleteKey(path.Name()) : TRUE; } bool wxRegConfig::DeleteAll() @@ -577,3 +765,5 @@ bool wxRegConfig::DeleteAll() #endif // __WIN16__ +#endif + // wxUSE_CONFIG diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 50da59b181..f06c417fc6 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -27,7 +27,6 @@ #include "wx/string.h" #include "wx/intl.h" #include "wx/log.h" -#include "wx/config.h" // for wxExpandEnvVars #ifndef __WIN16__ @@ -92,12 +91,12 @@ aStdKeys[] = // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- -// @ const_cast<> is not yet supported by all compilers + +// const_cast<> is not yet supported by all compilers #define CONST_CAST ((wxRegKey *)this)-> -#if !USE_MUTABLE - #define m_dwLastError CONST_CAST m_dwLastError -#endif +// and neither is mutable which m_dwLastError should be +#define m_dwLastError CONST_CAST m_dwLastError // ---------------------------------------------------------------------------- // non member functions @@ -187,16 +186,16 @@ wxRegKey::StdKey wxRegKey::GetStdKeyFromHkey(WXHKEY hkey) wxRegKey::wxRegKey() { - m_hKey = 0; m_hRootKey = (WXHKEY) aStdKeys[HKCR].hkey; - m_dwLastError = 0; + + Init(); } wxRegKey::wxRegKey(const wxString& strKey) : m_strKey(strKey) { m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey; - m_hKey = (WXHKEY) NULL; - m_dwLastError = 0; + + Init(); } // parent is a predefined (and preopened) key @@ -204,8 +203,8 @@ wxRegKey::wxRegKey(StdKey keyParent, const wxString& strKey) : m_strKey(strKey) { RemoveTrailingSeparator(m_strKey); m_hRootKey = (WXHKEY) aStdKeys[keyParent].hkey; - m_hKey = (WXHKEY) NULL; - m_dwLastError = 0; + + Init(); } // parent is a normal regkey @@ -222,8 +221,8 @@ wxRegKey::wxRegKey(const wxRegKey& keyParent, const wxString& strKey) RemoveTrailingSeparator(m_strKey); m_hRootKey = keyParent.m_hRootKey; - m_hKey = (WXHKEY) NULL; - m_dwLastError = 0; + + Init(); } // dtor closes the key releasing system resource @@ -261,7 +260,14 @@ void wxRegKey::SetName(const wxRegKey& keyParent, const wxString& strKey) Close(); // combine our name with parent's to get the full name - m_strKey = keyParent.m_strKey; + + // NB: this method is called by wxRegConfig::SetPath() which is a performance + // critical function and so it preallocates space for our m_strKey to + // gain some speed - this is why we only use += here and not = which + // would just free the prealloc'd buffer and would have to realloc it the + // next line! + m_strKey.clear(); + m_strKey += keyParent.m_strKey; if ( !strKey.IsEmpty() && strKey[0] != REG_SEPARATOR ) m_strKey += REG_SEPARATOR; m_strKey += strKey; @@ -406,16 +412,14 @@ bool wxRegKey::Close() { if ( IsOpened() ) { m_dwLastError = RegCloseKey((HKEY) m_hKey); + m_hKey = 0; + if ( m_dwLastError != ERROR_SUCCESS ) { wxLogSysError(m_dwLastError, _("Can't close registry key '%s'"), GetName().c_str()); - m_hKey = 0; return FALSE; } - else { - m_hKey = 0; - } } return TRUE; @@ -573,7 +577,7 @@ bool wxRegKey::Copy(wxRegKey& keyDst) wxRegKey key(*this, strKey); wxString keyName; keyName << GetFullName(&keyDst) << REG_SEPARATOR << strKey; - ok = key.Copy((const char*) keyName); + ok = key.Copy((const wxChar*) keyName); if ( ok ) bCont = GetNextKey(strKey, lIndex); @@ -596,8 +600,7 @@ bool wxRegKey::Copy(wxRegKey& keyDst) } if ( !ok ) { - wxLogError(_("Failed to copy the contents of registry key '%s' to " - "'%s'."), GetFullName(this), GetFullName(&keyDst)); + wxLogError(_("Failed to copy the contents of registry key '%s' to '%s'."), GetFullName(this), GetFullName(&keyDst)); } return ok; @@ -619,11 +622,10 @@ bool wxRegKey::DeleteSelf() // prevent a buggy program from erasing one of the root registry keys or an // immediate subkey (i.e. one which doesn't have '\\' inside) of any other // key except HKCR (HKCR has some "deleteable" subkeys) - if ( m_strKey.IsEmpty() || (m_hRootKey != HKCR && - m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND) ) { - wxLogError(_("Registry key '%s' is needed for normal system operation,\n" - "deleting it will leave your system in unusable state:\n" - "operation aborted."), GetFullName(this)); + if ( m_strKey.IsEmpty() || + ((m_hRootKey != (WXHKEY) aStdKeys[HKCR].hkey) && + (m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND)) ) { + wxLogError(_("Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted."), GetFullName(this)); return FALSE; } @@ -709,12 +711,14 @@ bool wxRegKey::HasValue(const wxChar *szValue) const wxLogNull nolog; #ifdef __WIN32__ - if ( CONST_CAST Open() ) { - return RegQueryValueEx((HKEY) m_hKey, WXSTRINGCAST szValue, RESERVED, - NULL, NULL, NULL) == ERROR_SUCCESS; - } - else - return FALSE; + if ( !CONST_CAST Open() ) + return FALSE; + + LONG dwRet = ::RegQueryValueEx((HKEY) m_hKey, + WXSTRINGCAST szValue, + RESERVED, + NULL, NULL, NULL); + return dwRet == ERROR_SUCCESS; #else // WIN16 // only unnamed value exists return IsEmpty(szValue); @@ -751,10 +755,10 @@ bool wxRegKey::HasSubKey(const wxChar *szKey) const // this function should be silent, so suppress possible messages from Open() wxLogNull nolog; - if ( CONST_CAST Open() ) - return KeyExists(m_hKey, szKey); - else + if ( !CONST_CAST Open() ) return FALSE; + + return KeyExists(m_hKey, szKey); } wxRegKey::ValueType wxRegKey::GetValueType(const wxChar *szValue) const @@ -847,6 +851,30 @@ bool wxRegKey::QueryValue(const wxChar *szValue, wxString& strValue) const pBuf, &dwSize); strValue.UngetWriteBuf(); + + // always expand the var expansions in the string + if ( dwType == REG_EXPAND_SZ ) + { + DWORD dwExpSize = ::ExpandEnvironmentStrings(strValue, NULL, 0); + bool ok = dwExpSize != 0; + if ( ok ) + { + wxString strExpValue; + ok = ::ExpandEnvironmentStrings + ( + strValue, + strExpValue.GetWriteBuf(dwExpSize), + dwExpSize + ) != 0; + strExpValue.UngetWriteBuf(); + strValue = strExpValue; + } + + if ( !ok ) + { + wxLogLastError(_T("ExpandEnvironmentStrings")); + } + } } if ( m_dwLastError == ERROR_SUCCESS ) { @@ -879,7 +907,7 @@ bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue) #if defined( __WIN32__) && !defined(__TWIN32__) m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_SZ, (RegString)strValue.c_str(), - strValue.Len() + 1); + (strValue.Len() + 1)*sizeof(wxChar)); if ( m_dwLastError == ERROR_SUCCESS ) return TRUE; #else //WIN16 @@ -1018,8 +1046,13 @@ bool wxRegKey::IsNumericValue(const wxChar *szValue) const // ============================================================================ // implementation of global private functions // ============================================================================ + bool KeyExists(WXHKEY hRootKey, const wxChar *szKey) { + // don't close this key itself for the case of empty szKey! + if ( wxIsEmpty(szKey) ) + return TRUE; + HKEY hkeyDummy; if ( RegOpenKey( (HKEY) hRootKey, szKey, &hkeyDummy) == ERROR_SUCCESS ) { RegCloseKey(hkeyDummy); diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index cd87ce1fb5..2d58734c5b 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: settings.cpp -// Purpose: wxSettings +// Name: msw/settings.cpp +// Purpose: wxSystemSettings // Author: Julian Smart // Modified by: // Created: 04/01/98 @@ -9,8 +9,16 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #ifdef __GNUG__ -#pragma implementation "settings.h" + #pragma implementation "settings.h" #endif // For compilers that support precompilation, includes "wx.h". @@ -21,17 +29,64 @@ #endif #ifndef WX_PRECOMP -#include -#include "wx/defs.h" -#include "wx/pen.h" -#include "wx/brush.h" -#include "wx/gdicmn.h" + #include + #include "wx/defs.h" + #include "wx/pen.h" + #include "wx/brush.h" + #include "wx/gdicmn.h" #endif #include "wx/settings.h" +#include "wx/module.h" #include "wx/window.h" #include "wx/msw/private.h" +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// the module which is used to clean up wxSystemSettings data (this is a +// singleton class so it can't be done in the dtor) +class wxSystemSettingsModule : public wxModule +{ +public: + virtual bool OnInit(); + virtual void OnExit(); + +private: + DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule) +}; + +// ---------------------------------------------------------------------------- +// global data +// ---------------------------------------------------------------------------- + +static wxFont *gs_fontDefault = NULL; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxSystemSettingsModule +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule, wxModule) + +bool wxSystemSettingsModule::OnInit() +{ + return TRUE; +} + +void wxSystemSettingsModule::OnExit() +{ + delete gs_fontDefault; +} + +// ---------------------------------------------------------------------------- +// wxSystemSettings +// ---------------------------------------------------------------------------- + // TODO: see ::SystemParametersInfo for all sorts of Windows settings. // Different args are required depending on the id. How does this differ // from GetSystemMetric, and should it? Perhaps call it GetSystemParameter @@ -45,36 +100,51 @@ wxColour wxSystemSettings::GetSystemColour(int index) { case wxSYS_COLOUR_LISTBOX: return *wxWHITE; - break; - + default: COLORREF ref = ::GetSysColor(index); wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref)); return col; - break; } } wxFont wxSystemSettings::GetSystemFont(int index) { + // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're + // called fairly often - this is why we cache this particular font + bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT; + if ( isDefaultRequested && gs_fontDefault ) + { + return *gs_fontDefault; + } + + wxFont font; + HFONT hFont = (HFONT) ::GetStockObject(index); - if ( hFont != (HFONT) NULL ) + if ( hFont ) { LOGFONT lf; if ( ::GetObject(hFont, sizeof(LOGFONT), &lf) != 0 ) { - // In fontdlg.cpp - return wxCreateFontFromLogFont(&lf); + font = wxCreateFontFromLogFont(&lf); } else { - return wxNullFont; + wxFAIL_MSG( _T("failed to get LOGFONT") ); } } - else + else // GetStockObject() failed { - return wxNullFont; + wxFAIL_MSG( _T("stock font not found") ); } + + if ( isDefaultRequested ) + { + // if we got here it means we hadn't cached it yet - do now + gs_fontDefault = new wxFont(font); + } + + return font; } // Get a system metric, e.g. scrollbar size @@ -171,6 +241,5 @@ int wxSystemSettings::GetSystemMetric(int index) default: return 0; } - return 0; } diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index e5667dd391..77cf291c9f 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -260,6 +260,7 @@ bool wxSlider95::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, GetEventHandler()->ProcessEvent(event); wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() ); + cevent.SetInt( newPos ); cevent.SetEventObject( this ); return GetEventHandler()->ProcessEvent( cevent ); diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index 7aa2ccfe03..4050e2c1a4 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -97,9 +97,6 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), wxGetInstance(), NULL); - // Now create slider - m_windowId = (int)NewControlId(); - msStyle = 0; if (m_windowStyle & wxSL_VERTICAL) msStyle = SBS_VERT | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; @@ -231,6 +228,7 @@ bool wxSliderMSW::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, GetEventHandler()->ProcessEvent(event); wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() ); + cevent.SetInt( newPos ); cevent.SetEventObject( this ); return GetEventHandler()->ProcessEvent( cevent ); diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index fe6e08b372..03428c16ee 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -106,7 +106,7 @@ bool wxSpinButton::Create(wxWindow *parent, y = 0; // translate the styles - DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | + DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | /* WS_CLIPSIBLINGS | */ UDS_NOTHOUSANDS | // never useful, sometimes harmful UDS_SETBUDDYINT; // it doesn't harm if we don't have buddy @@ -132,7 +132,7 @@ bool wxSpinButton::Create(wxWindow *parent, if ( !m_hWnd ) { - wxLogLastError("CreateUpDownControl"); + wxLogLastError(wxT("CreateUpDownControl")); return FALSE; } @@ -221,6 +221,9 @@ bool wxSpinButton::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) LPNMUPDOWN lpnmud = (LPNMUPDOWN)lParam; #endif + if (lpnmud->hdr.hwndFrom != GetHwnd()) // make sure it is the right control + return FALSE; + wxSpinEvent event(lpnmud->iDelta > 0 ? wxEVT_SCROLL_LINEUP : wxEVT_SCROLL_LINEDOWN, m_windowId); diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index e8f8323ff3..9f2928f82a 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -69,6 +69,32 @@ static const int MARGIN_BETWEEN = 1; // implementation // ============================================================================ +// ---------------------------------------------------------------------------- +// wnd proc for the buddy text ctrl +// ---------------------------------------------------------------------------- + +LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd, + UINT message, + WPARAM wParam, + LPARAM lParam) +{ + wxSpinCtrl *spin = (wxSpinCtrl *)::GetWindowLong(hwnd, GWL_USERDATA); + + // forward some messages (the key ones only so far) to the spin ctrl + switch ( message ) + { + case WM_CHAR: + case WM_DEADCHAR: + case WM_KEYUP: + case WM_KEYDOWN: + spin->MSWWindowProc(message, wParam, lParam); + break; + } + + return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(), + hwnd, message, wParam, lParam); +} + // ---------------------------------------------------------------------------- // construction // ---------------------------------------------------------------------------- @@ -122,7 +148,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, WS_EX_CLIENTEDGE, // sunken border _T("EDIT"), // window class NULL, // no window title - WS_CHILD | WS_BORDER, // style (will be shown later) + WS_CHILD | WS_BORDER /* | WS_CLIPSIBLINGS */, // style (will be shown later) pos.x, pos.y, // position 0, 0, // size (will be set later) GetHwndOf(parent), // parent @@ -133,11 +159,16 @@ bool wxSpinCtrl::Create(wxWindow *parent, if ( !m_hwndBuddy ) { - wxLogLastError("CreateWindow(buddy text window)"); + wxLogLastError(wxT("CreateWindow(buddy text window)")); return FALSE; } + // subclass the text ctrl to be able to intercept some events + m_oldBuddyWndProc = (WXFARPROC)::GetWindowLong((HWND)m_hwndBuddy, GWL_WNDPROC); + ::SetWindowLong((HWND)m_hwndBuddy, GWL_USERDATA, (LONG)this); + ::SetWindowLong((HWND)m_hwndBuddy, GWL_WNDPROC, (LONG)wxBuddyTextWndProc); + // should have the same font as the other controls SetFont(GetParent()->GetFont()); @@ -167,6 +198,13 @@ bool wxSpinCtrl::Create(wxWindow *parent, return TRUE; } +wxSpinCtrl::~wxSpinCtrl() +{ + // destroy the buddy window because this pointer which wxBuddyTextWndProc + // uses will not soon be valid any more + ::DestroyWindow((HWND)m_hwndBuddy); +} + // ---------------------------------------------------------------------------- // wxTextCtrl-like methods // ---------------------------------------------------------------------------- @@ -175,7 +213,7 @@ void wxSpinCtrl::SetValue(const wxString& text) { if ( !::SetWindowText((HWND)m_hwndBuddy, text.c_str()) ) { - wxLogLastError("SetWindowText(buddy)"); + wxLogLastError(wxT("SetWindowText(buddy)")); } } @@ -288,16 +326,41 @@ void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height) if ( !::MoveWindow((HWND)m_hwndBuddy, x, y, widthText, height, TRUE) ) { - wxLogLastError("MoveWindow(buddy)"); + wxLogLastError(wxT("MoveWindow(buddy)")); } x += widthText + MARGIN_BETWEEN; if ( !::MoveWindow(GetHwnd(), x, y, widthBtn, height, TRUE) ) { - wxLogLastError("MoveWindow"); + wxLogLastError(wxT("MoveWindow")); } } +// get total size of the control +void wxSpinCtrl::DoGetSize(int *x, int *y) const +{ + RECT spinrect, textrect, ctrlrect; + GetWindowRect(GetHwnd(), &spinrect); + GetWindowRect((HWND)m_hwndBuddy, &textrect); + UnionRect(&ctrlrect,&textrect, &spinrect); + + if ( x ) + *x = ctrlrect.right - ctrlrect.left; + if ( y ) + *y = ctrlrect.bottom - ctrlrect.top; +} + +void wxSpinCtrl::DoGetPosition(int *x, int *y) const +{ + // hack: pretend that our HWND is the text control just for a moment + WXHWND hWnd = GetHWND(); + wxConstCast(this, wxSpinCtrl)->m_hWnd = m_hwndBuddy; + + wxSpinButton::DoGetPosition(x, y); + + wxConstCast(this, wxSpinCtrl)->m_hWnd = hWnd; +} + #endif // __WIN95__ #endif diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 7b939e5ec4..fd9dd5db30 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -120,7 +120,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, classname, wxT(""), // NOT DISABLED!!! We want to move it in Dialog Editor. - winstyle | WS_CHILD | WS_VISIBLE, // | WS_DISABLED, + winstyle | WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ , // | WS_DISABLED, 0, 0, 0, 0, (HWND)parent->GetHWND(), (HMENU)m_windowId, diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index f0a8607c1d..4843ea05a6 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -71,6 +71,8 @@ LRESULT APIENTRY wxStatusBarProc(HWND hwnd, { switch (message) { case WM_COMMAND: + case WM_DRAWITEM: + case WM_MEASUREITEM: case WM_SIZE: case WM_MOVE: case WM_MOUSEMOVE: @@ -120,7 +122,7 @@ bool wxStatusBar95::Create(wxWindow *parent, m_windowId = id == -1 ? NewControlId() : id; - DWORD wstyle = WS_CHILD | WS_VISIBLE; + DWORD wstyle = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ ; // setting SBARS_SIZEGRIP is perfectly useless: it's always on by default // (at least in the version of comctl32.dll I'm using), and the only way to @@ -186,21 +188,21 @@ void wxStatusBar95::CopyFieldsWidth(const int widths[]) void wxStatusBar95::SetFieldsCount(int nFields, const int *widths) { - // this is Windows limitation - wxASSERT_MSG( (nFields > 0) && (nFields < 255), _T("too many fields") ); + // this is a Windows limitation + wxASSERT_MSG( (nFields > 0) && (nFields < 255), _T("too many fields") ); - m_nFields = nFields; + m_nFields = nFields; - CopyFieldsWidth(widths); - SetFieldsWidth(); + CopyFieldsWidth(widths); + SetFieldsWidth(); } void wxStatusBar95::SetStatusWidths(int n, const int widths[]) { - wxASSERT_MSG( n == m_nFields, _T("field number mismatch") ); + wxASSERT_MSG( n == m_nFields, _T("field number mismatch") ); - CopyFieldsWidth(widths); - SetFieldsWidth(); + CopyFieldsWidth(widths); + SetFieldsWidth(); } void wxStatusBar95::SetFieldsWidth() @@ -319,7 +321,7 @@ bool wxStatusBar95::GetFieldRect(int i, wxRect& rect) const RECT r; if ( !::SendMessage(GetHwnd(), SB_GETRECT, i, (LPARAM)&r) ) { - wxLogLastError("SendMessage(SB_GETRECT)"); + wxLogLastError(wxT("SendMessage(SB_GETRECT)")); } wxCopyRECTToRect(r, rect); diff --git a/src/msw/statline.cpp b/src/msw/statline.cpp index 75bc183dc8..605153f40d 100644 --- a/src/msw/statline.cpp +++ b/src/msw/statline.cpp @@ -34,6 +34,14 @@ #include "wx/msw/private.h" #include "wx/log.h" +#ifndef SS_SUNKEN + #define SS_SUNKEN 0x00001000L +#endif + +#ifndef SS_NOTIFY + #define SS_NOTIFY 0x00000100L +#endif + // ============================================================================ // implementation // ============================================================================ @@ -58,16 +66,12 @@ bool wxStaticLine::Create( wxWindow *parent, wxSize sizeReal = AdjustSize(size); -#ifndef WIN32 -#define SS_SUNKEN 0 -#endif - m_hWnd = (WXHWND)::CreateWindow ( wxT("STATIC"), wxT(""), - WS_VISIBLE | WS_CHILD | - SS_GRAYRECT | SS_SUNKEN, // | SS_ETCHEDFRAME, + WS_VISIBLE | WS_CHILD /* | WS_CLIPSIBLINGS */ | + SS_GRAYRECT | SS_SUNKEN | SS_NOTIFY, pos.x, pos.y, sizeReal.x, sizeReal.y, GetWinHwnd(parent), (HMENU)m_windowId, @@ -77,9 +81,8 @@ bool wxStaticLine::Create( wxWindow *parent, if ( !m_hWnd ) { -#ifdef __WXDEBUG__ wxLogDebug(wxT("Failed to create static control")); -#endif + return FALSE; } @@ -87,5 +90,6 @@ bool wxStaticLine::Create( wxWindow *parent, return TRUE; } -#endif + +#endif // wxUSE_STATLINE diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index b7e0f01365..150711deba 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -57,7 +57,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, m_windowStyle = style; - long msStyle = WS_CHILD|WS_VISIBLE; + long msStyle = WS_CHILD | WS_VISIBLE /* | WS_CLIPSIBLINGS */ ; if (m_windowStyle & wxALIGN_CENTRE) msStyle |= SS_CENTER; else if (m_windowStyle & wxALIGN_RIGHT) @@ -145,6 +145,8 @@ void wxStaticText::SetLabel(const wxString& label) if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) { DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT); + + Refresh(); } } diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index 78f329f0d8..baa830c801 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -39,7 +39,7 @@ #endif #include "wx/msw/dib.h" -#include "wx/msw/tabctrl.h" +#include "wx/tabctrl.h" #include "wx/app.h" #include "wx/msw/private.h" #include "wx/msw/imaglist.h" diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index fc4f1cb9ca..13235cea9d 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -182,8 +182,14 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) //, int x, int y); menu->UpdateUI(); + // Work around a WIN32 bug + ::SetForegroundWindow ((HWND) win->GetHWND ()); + rval = win->PopupMenu(menu, 0, 0); + // Work around a WIN32 bug + ::PostMessage ((HWND) win->GetHWND(),WM_NULL,0,0L); + win->PopEventHandler(FALSE); win->Destroy(); delete win; diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 2cc55c2797..14d444137e 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -35,6 +35,7 @@ #include "wx/dynarray.h" #include "wx/settings.h" #include "wx/bitmap.h" + #include "wx/dcmemory.h" #endif #if wxUSE_TOOLBAR && defined(__WIN95__) && wxUSE_TOOLBAR_NATIVE @@ -60,6 +61,18 @@ #include "wx/msw/dib.h" #include "wx/app.h" // for GetComCtl32Version +// ---------------------------------------------------------------------------- +// conditional compilation +// ---------------------------------------------------------------------------- + +// wxWindows previously always considered that toolbar buttons have light grey +// (0xc0c0c0) background and so ignored any bitmap masks - however, this +// doesn't work with XPMs which then appear to have black background. To make +// this work, we must respect the bitmap masks - which we do now. This should +// be ok in any case, but to restore 100% compatible with the old version +// behaviour, you can set this to 0. +#define USE_BITMAP_MASKS 1 + // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -95,6 +108,7 @@ // private function prototypes // ---------------------------------------------------------------------------- +// adjust toolbar bitmap colours static void wxMapBitmap(HBITMAP hBitmap, int width, int height); // ---------------------------------------------------------------------------- @@ -223,6 +237,10 @@ bool wxToolBar::Create(wxWindow *parent, SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + // All the positioing code here doesn't have + // any effect since it is overridden later + // on. RR. + // position it int x = pos.x; int y = pos.y; @@ -245,7 +263,18 @@ bool wxToolBar::Create(wxWindow *parent, wxToolBar::~wxToolBar() { - if (m_hBitmap) + // we must refresh the frame size when the toolbar is deleted but the frame + // is not - otherwise toolbar leaves a hole in the place it used to occupy + // + // NB: a frame is being deleted only if it is not any longer in + // wxTopLevelWindows list + wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); + if ( frame && wxTopLevelWindows.Find(frame) ) + { + frame->SendSizeEvent(); + } + + if ( m_hBitmap ) { ::DeleteObject((HBITMAP) m_hBitmap); } @@ -267,8 +296,32 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) { - // normally, we only delete one button, but we use several separators to - // cover the space used by one control sometimes (with old comctl32.dll) + // the main difficulty we have here is with the controls in the toolbars: + // as we (sometimes) use several separators to cover up the space used by + // them, the indices are not the same for us and the toolbar + + // first determine the position of the first button to delete: it may be + // different from pos if we use several separators to cover the space used + // by a control + wxToolBarToolsList::Node *node; + for ( node = m_tools.GetFirst(); node; node = node->GetNext() ) + { + wxToolBarToolBase *tool2 = node->GetData(); + if ( tool2 == tool ) + { + // let node point to the next node in the list + node = node->GetNext(); + + break; + } + + if ( tool2->IsControl() ) + { + pos += ((wxToolBarTool *)tool2)->GetSeparatorsCount() - 1; + } + } + + // now determine the number of buttons to delete and the area taken by them size_t nButtonsToDelete = 1; // get the size of the button we're going to delete @@ -287,11 +340,13 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) width *= nButtonsToDelete; } + // do delete all buttons + m_nButtons -= nButtonsToDelete; while ( nButtonsToDelete-- > 0 ) { if ( !::SendMessage(GetHwnd(), TB_DELETEBUTTON, pos, 0) ) { - wxLogLastError("TB_DELETEBUTTON"); + wxLogLastError(wxT("TB_DELETEBUTTON")); return FALSE; } @@ -299,11 +354,9 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) tool->Detach(); - m_nButtons -= nButtonsToDelete; - - // reposition all the controls after this button - wxToolBarToolsList::Node *node = m_tools.Item(pos); - for ( node = node->GetNext(); node; node = node->GetNext() ) + // and finally reposition all the controls after this button (the toolbar + // takes care of all normal items) + for ( /* node -> first after deleted */ ; node; node = node->GetNext() ) { wxToolBarToolBase *tool2 = node->GetData(); if ( tool2->IsControl() ) @@ -339,7 +392,18 @@ bool wxToolBar::Realize() int totalBitmapWidth = (int)(m_defaultWidth * nTools); int totalBitmapHeight = (int)m_defaultHeight; - // Create a bitmap for all the tool bitmaps + // Create a bitmap and copy all the tool bitmaps to it +#if USE_BITMAP_MASKS + wxMemoryDC dcAllButtons; + wxBitmap bitmap(totalBitmapWidth, totalBitmapHeight); + dcAllButtons.SelectObject(bitmap); + wxColour colTbar = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE); + dcAllButtons.SetBackground(wxBrush(colTbar, wxSOLID)); + dcAllButtons.Clear(); + + m_hBitmap = bitmap.GetHBITMAP(); + HBITMAP hBitmap = (HBITMAP)m_hBitmap; +#else // !USE_BITMAP_MASKS HBITMAP hBitmap = ::CreateCompatibleBitmap(ScreenHDC(), totalBitmapWidth, totalBitmapHeight); @@ -352,11 +416,11 @@ bool wxToolBar::Realize() m_hBitmap = (WXHBITMAP)hBitmap; - // Now blit all the tools onto this bitmap HDC memoryDC = ::CreateCompatibleDC(NULL); HBITMAP oldBitmap = (HBITMAP) ::SelectObject(memoryDC, hBitmap); HDC memoryDC2 = ::CreateCompatibleDC(NULL); +#endif // USE_BITMAP_MASKS/!USE_BITMAP_MASKS // the button position wxCoord x = 0; @@ -370,17 +434,29 @@ bool wxToolBar::Realize() wxToolBarToolBase *tool = node->GetData(); if ( tool->IsButton() ) { - HBITMAP hbmp = GetHbitmapOf(tool->GetBitmap1()); - if ( hbmp ) + const wxBitmap& bmp = tool->GetBitmap1(); + if ( bmp.Ok() ) { +#if USE_BITMAP_MASKS + // blit the bitmap to the DC with the mask + wxBitmap bmpTool = tool->GetBitmap1(); + if ( !bmpTool.GetMask() ) + { + // it doesn't have mask - create a default one + bmpTool.SetMask(new wxMask(bmpTool, *wxLIGHT_GREY)); + } + dcAllButtons.DrawBitmap(bmpTool, x, 0, TRUE); +#else // !USE_BITMAP_MASKS + HBITMAP hbmp = GetHbitmapOf(bmp); HBITMAP oldBitmap2 = (HBITMAP)::SelectObject(memoryDC2, hbmp); if ( !BitBlt(memoryDC, x, 0, m_defaultWidth, m_defaultHeight, memoryDC2, 0, 0, SRCCOPY) ) { - wxLogLastError("BitBlt"); + wxLogLastError(wxT("BitBlt")); } ::SelectObject(memoryDC2, oldBitmap2); +#endif // USE_BITMAP_MASKS/!USE_BITMAP_MASKS } else { @@ -397,10 +473,18 @@ bool wxToolBar::Realize() node = node->GetNext(); } +#if USE_BITMAP_MASKS + dcAllButtons.SelectObject(wxNullBitmap); + + // don't delete this HBITMAP! + bitmap.SetHBITMAP(0); +#else // !USE_BITMAP_MASKS ::SelectObject(memoryDC, oldBitmap); ::DeleteDC(memoryDC); ::DeleteDC(memoryDC2); +#endif // USE_BITMAP_MASKS/!USE_BITMAP_MASKS + // Map to system colours wxMapBitmap(hBitmap, totalBitmapWidth, totalBitmapHeight); @@ -446,7 +530,7 @@ bool wxToolBar::Realize() { if ( !::SendMessage(GetHwnd(), TB_DELETEBUTTON, 0, 0) ) { - wxLogLastError("TB_DELETEBUTTON"); + wxLogLastError(wxT("TB_DELETEBUTTON")); } } @@ -518,7 +602,7 @@ bool wxToolBar::Realize() if ( !::SendMessage(GetHwnd(), TB_ADDBUTTONS, (WPARAM)i, (LPARAM)buttons) ) { - wxLogLastError("TB_ADDBUTTONS"); + wxLogLastError(wxT("TB_ADDBUTTONS")); } delete [] buttons; @@ -547,7 +631,7 @@ bool wxToolBar::Realize() if ( !SendMessage(GetHwnd(), TB_GETITEMRECT, index, (LPARAM)(LPRECT)&r) ) { - wxLogLastError("TB_GETITEMRECT"); + wxLogLastError(wxT("TB_GETITEMRECT")); } // TB_SETBUTTONINFO message is only supported by comctl32.dll 4.71+ @@ -566,7 +650,7 @@ bool wxToolBar::Realize() tool->GetId(), (LPARAM)&tbbi) ) { // the id is probably invalid? - wxLogLastError("TB_SETBUTTONINFO"); + wxLogLastError(wxT("TB_SETBUTTONINFO")); } } else @@ -580,7 +664,7 @@ bool wxToolBar::Realize() TBBUTTON tbb; wxZeroMemory(tbb); tbb.idCommand = 0; - tbb.fsState = TBSTATE_ENABLED | TBSTATE_HIDDEN; + tbb.fsState = TBSTATE_ENABLED; tbb.fsStyle = TBSTYLE_SEP; size_t nSeparators = size.x / widthSep; @@ -589,7 +673,7 @@ bool wxToolBar::Realize() if ( !SendMessage(GetHwnd(), TB_INSERTBUTTON, index, (LPARAM)&tbb) ) { - wxLogLastError("TB_INSERTBUTTON"); + wxLogLastError(wxT("TB_INSERTBUTTON")); } index++; @@ -707,6 +791,9 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl), } else { +#if wxUSE_UNICODE + ttText->lpszText = (wxChar *)help.c_str(); +#else // VZ: I don't know why it happens, but the versions of // comctl32.dll starting from 4.70 sometimes send TTN_NEEDTEXTW // even to ANSI programs (normally, this message is supposed @@ -733,6 +820,7 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl), dst[lenUnicode] = 0; delete [] pwz; +#endif } } @@ -816,15 +904,7 @@ void wxToolBar::UpdateSize() wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); if ( frame ) { - // don't change the size, we just need to generate a WM_SIZE - RECT r; - if ( !GetWindowRect(GetHwndOf(frame), &r) ) - { - wxLogLastError(_T("GetWindowRect")); - } - - (void)::SendMessage(GetHwndOf(frame), WM_SIZE, SIZE_RESTORED, - MAKELPARAM(r.right - r.left, r.bottom - r.top)); + frame->SendSizeEvent(); } } @@ -908,7 +988,10 @@ long wxToolBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) else { w = LOWORD(lParam); - h = r.bottom - r.top; + if (HasFlag( wxTB_FLAT )) + h = r.bottom - r.top - 3; + else + h = r.bottom - r.top; if ( m_maxRows ) { h += 6; // FIXME: this is the separator line height... @@ -945,24 +1028,70 @@ long wxToolBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) #define BGR_BACKGROUNDSEL (RGB(000,000,255)) // blue #define BGR_BACKGROUND (RGB(255,000,255)) // magenta +static bool sg_coloursInit = FALSE; +static long sg_stdColours[6]; + void wxMapBitmap(HBITMAP hBitmap, int width, int height) { - COLORMAP ColorMap[] = - { - {BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black - {BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey - {BGR_BUTTONFACE, COLOR_BTNFACE}, // bright grey - {BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white -/* {BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT}, // blue */ - {BGR_BACKGROUND, COLOR_WINDOW} // magenta - }; + if (!sg_coloursInit) + { + // When a bitmap is loaded, the RGB values can change. So we need to have a + // reference bitmap which can tell us what the RGB values change to. + wxBitmap stdColourBitmap("wxBITMAP_STD_COLOURS", wxBITMAP_TYPE_RESOURCE); + if (stdColourBitmap.Ok()) + { + wxMemoryDC memDC; + memDC.SelectObject(stdColourBitmap); - int NUM_MAPS = (sizeof(ColorMap)/sizeof(COLORMAP)); - int n; - for ( n = 0; n < NUM_MAPS; n++) - { - ColorMap[n].to = ::GetSysColor(ColorMap[n].to); - } + int i = 0; + wxColour colour; + for (i = 0; i < 6; i++) + { + memDC.GetPixel(i, 0, & colour); + sg_stdColours[i] = RGB(colour.Red(), colour.Green(), colour.Blue()); + } + sg_coloursInit = TRUE; + memDC.SelectObject(wxNullBitmap); + } + else + { + sg_stdColours[0] = RGB(000,000,000) ; + sg_stdColours[1] = RGB(128,128,128) ; + sg_stdColours[2] = RGB(192,192,192) ; + sg_stdColours[3] = RGB(255,255,255) ; + sg_stdColours[4] = RGB(000,000,255) ; + sg_stdColours[5] = RGB(255,000,255) ; + sg_coloursInit = TRUE; + } + } + + COLORMAP ColorMap[5]; + + ColorMap[0].from = sg_stdColours[0]; ColorMap[0].to = COLOR_BTNTEXT; // black (0, 0 0) + ColorMap[1].from = sg_stdColours[1]; ColorMap[1].to = COLOR_BTNSHADOW; // dark grey (128, 128, 128) + ColorMap[2].from = sg_stdColours[2]; ColorMap[2].to = COLOR_BTNFACE; // bright grey (192, 192, 192) + ColorMap[3].from = sg_stdColours[3]; ColorMap[3].to = COLOR_BTNHIGHLIGHT; // white (255, 255, 255) + // ColorMap[4].from = sg_stdColours[4]; ColorMap[4].to = COLOR_HIGHLIGHT; // blue (0, 0, 255) + ColorMap[4].from = sg_stdColours[5]; ColorMap[4].to = COLOR_WINDOW; // magenta (255, 0, 255) + +#if 0 + { + {BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black + {BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey + {BGR_BUTTONFACE, COLOR_BTNFACE}, // bright grey + {BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white + /* {BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT}, // blue */ + {BGR_BACKGROUND, COLOR_WINDOW} // magenta + }; +#endif + + int NUM_MAPS = (sizeof(ColorMap)/sizeof(COLORMAP)); + int n; + for ( n = 0; n < NUM_MAPS; n++) + { + ColorMap[n].to = ::GetSysColor(ColorMap[n].to); + } + HBITMAP hbmOld; HDC hdcMem = CreateCompatibleDC(NULL); @@ -977,17 +1106,17 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height) for ( j = 0; j < height; j++) { COLORREF pixel = ::GetPixel(hdcMem, i, j); -/* - BYTE red = GetRValue(pixel); - BYTE green = GetGValue(pixel); - BYTE blue = GetBValue(pixel); -*/ - for ( k = 0; k < NUM_MAPS; k ++) { - if ( ColorMap[k].from == pixel ) + int distance = 0 ; + + distance = abs( GetRValue( pixel ) - GetRValue( ColorMap[k].from )) ; + distance = max( distance , abs(GetGValue(pixel ) - GetGValue( ColorMap[k].from ))) ; + distance = max( distance , abs(GetBValue(pixel ) - GetBValue( ColorMap[k].from ))) ; + if ( distance < 0x10 ) + //if ( ColorMap[k].from == pixel ) { - /* COLORREF actualPixel = */ ::SetPixel(hdcMem, i, j, ColorMap[k].to); + ::SetPixel(hdcMem, i, j, ColorMap[k].to); break; } } diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index e48ba50b35..200c035b08 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -38,6 +38,8 @@ #include "wx/app.h" #endif +#include "wx/module.h" + #if wxUSE_CLIPBOARD #include "wx/clipbrd.h" #endif @@ -119,6 +121,9 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) EVT_UPDATE_UI(wxID_PASTE, wxTextCtrl::OnUpdatePaste) EVT_UPDATE_UI(wxID_UNDO, wxTextCtrl::OnUpdateUndo) EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo) +#ifdef __WIN16__ + EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) +#endif END_EVENT_TABLE() @@ -154,12 +159,11 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, // translate wxWin style flags to MSW ones, checking for consistency while // doing it - long msStyle = ES_LEFT | WS_VISIBLE | WS_CHILD | WS_TABSTOP; + long msStyle = ES_LEFT | WS_VISIBLE | WS_CHILD | WS_TABSTOP /* | WS_CLIPSIBLINGS */ ; if ( m_windowStyle & wxTE_MULTILINE ) { wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER), - wxT("wxTE_PROCESS_ENTER style is ignored for multiline " - "text controls (they always process it)") ); + wxT("wxTE_PROCESS_ENTER style is ignored for multiline text controls (they always process it)") ); msStyle |= ES_MULTILINE | ES_WANTRETURN; if ((m_windowStyle & wxTE_NO_VSCROLL) == 0) @@ -212,9 +216,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, // done) if ( !wxRichEditModule::Load() ) { - wxLogError(_("Impossible to create a rich edit control, " - "using simple text control instead. Please " - "reinstall riched32.dll")); + wxLogError(_("Impossible to create a rich edit control, using simple text control instead. Please reinstall riched32.dll")); s_errorGiven = TRUE; } @@ -356,10 +358,10 @@ void wxTextCtrl::AdoptAttributesFromHWND() void wxTextCtrl::SetupColours() { wxColour bkgndColour; - if (IsEditable() || (m_windowStyle & wxTE_MULTILINE)) +// if (IsEditable() || (m_windowStyle & wxTE_MULTILINE)) bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW); - else - bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); +// else +// bkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); SetBackgroundColour(bkgndColour); SetForegroundColour(GetParent()->GetForegroundColour()); @@ -376,29 +378,34 @@ wxString wxTextCtrl::GetValue() const #if wxUSE_RICHEDIT if ( m_isRich ) { - int len = GetWindowTextLength(GetHwnd()) + 1; - wxString str; - wxChar *p = str.GetWriteBuf(len); - TEXTRANGE textRange; - textRange.chrg.cpMin = 0; - textRange.chrg.cpMax = -1; - textRange.lpstrText = p; - - (void)SendMessage(GetHwnd(), EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - - // believe it or not, but EM_GETTEXTRANGE uses just CR ('\r') for the - // newlines which is neither Unix nor Windows style (Win95 with - // riched20.dll shows this behaviour) - convert it to something - // reasonable - for ( ; *p; p++ ) + int len = GetWindowTextLength(GetHwnd()); + if ( len ) { - if ( *p == _T('\r') ) - *p = _T('\n'); - } + // alloc one extra WORD as needed by the control + wxChar *p = str.GetWriteBuf(++len); - str.UngetWriteBuf(); + TEXTRANGE textRange; + textRange.chrg.cpMin = 0; + textRange.chrg.cpMax = -1; + textRange.lpstrText = p; + + (void)SendMessage(GetHwnd(), EM_GETTEXTRANGE, 0, (LPARAM)&textRange); + + // believe it or not, but EM_GETTEXTRANGE uses just CR ('\r') for + // the newlines which is neither Unix nor Windows style (Win95 with + // riched20.dll shows this behaviour) - convert it to something + // reasonable + for ( ; *p; p++ ) + { + if ( *p == _T('\r') ) + *p = _T('\n'); + } + + str.UngetWriteBuf(); + } + //else: no text at all, leave the string empty return str; } @@ -423,6 +430,14 @@ void wxTextCtrl::SetValue(const wxString& value) SetWindowText(GetHwnd(), valueDos.c_str()); + // for compatibility with the GTK and because it is more logical, we + // move the cursor to the end of the text after SetValue() + + // GRG, Jun/2000: Changed this back after a lot of discussion + // in the lists. wxWindows 2.2 will have a set of flags to + // customize this behaviour. + //SetInsertionPointEnd(); + AdjustSpaceLimit(); } } @@ -491,7 +506,7 @@ bool wxTextCtrl::CanCut() const // Can cut if there's a selection long from, to; GetSelection(& from, & to); - return (from != to); + return (from != to) && (IsEditable()); } bool wxTextCtrl::CanPaste() const @@ -523,16 +538,8 @@ bool wxTextCtrl::CanPaste() const void wxTextCtrl::SetEditable(bool editable) { - bool isEditable = IsEditable(); - HWND hWnd = GetHwnd(); SendMessage(hWnd, EM_SETREADONLY, (WPARAM)!editable, (LPARAM)0L); - - if (editable != isEditable) - { - SetupColours(); - Refresh(); - } } void wxTextCtrl::SetInsertionPoint(long pos) @@ -811,24 +818,20 @@ int wxTextCtrl::GetLineLength(long lineNo) const wxString wxTextCtrl::GetLineText(long lineNo) const { - // TODO this should probably be optimized by using GetWriteBuf() - size_t len = (size_t)GetLineLength(lineNo) + 1; - if ( len < sizeof(WORD) ) - { - // there must be at least enough place for the length WORD in the - // buffer - len += sizeof(WORD); - } - char *buf = (char *)malloc(len); + // there must be at least enough place for the length WORD in the + // buffer + len += sizeof(WORD); + + wxString str; + wxChar *buf = str.GetWriteBuf(len); + *(WORD *)buf = len; - int noChars = (int)SendMessage(GetHwnd(), EM_GETLINE, lineNo, (LPARAM)buf); - buf[noChars] = 0; + len = (size_t)::SendMessage(GetHwnd(), EM_GETLINE, lineNo, (LPARAM)buf); + buf[len] = 0; - wxString str(buf); - - free(buf); + str.UngetWriteBuf(len); return str; } @@ -892,6 +895,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); InitCommandEvent(event); + event.SetString(GetValue()); if ( GetEventHandler()->ProcessEvent(event) ) return; } @@ -954,6 +958,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) case EN_ERRSPACE: case EN_HSCROLL: case EN_VSCROLL: + return FALSE; default: return FALSE; } @@ -962,6 +967,71 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) return TRUE; } +WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam) +{ +#if wxUSE_CTL3D + if ( m_useCtl3D ) + { + HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); + return (WXHBRUSH) hbrush; + } +#endif // wxUSE_CTL3D + + HDC hdc = (HDC)pDC; + if (GetParent()->GetTransparentBackground()) + SetBkMode(hdc, TRANSPARENT); + else + SetBkMode(hdc, OPAQUE); + + wxColour colBack = GetBackgroundColour(); + + if (!IsEnabled() && (GetWindowStyle() & wxTE_MULTILINE) == 0) + colBack = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); + + ::SetBkColor(hdc, wxColourToRGB(colBack)); + ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); + + wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID); + + return (WXHBRUSH)brush->GetResourceHandle(); +} + +// In WIN16, need to override normal erasing because +// Ctl3D doesn't use the wxWindows background colour. +#ifdef __WIN16__ +void wxTextCtrl::OnEraseBackground(wxEraseEvent& event) +{ + wxColour col(m_backgroundColour); + +#if wxUSE_CTL3D + if (m_useCtl3D) + col = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW); +#endif + + RECT rect; + ::GetClientRect(GetHwnd(), &rect); + + COLORREF ref = PALETTERGB(col.Red(), + col.Green(), + col.Blue()); + HBRUSH hBrush = ::CreateSolidBrush(ref); + if ( !hBrush ) + wxLogLastError(wxT("CreateSolidBrush")); + + HDC hdc = (HDC)event.GetDC()->GetHDC(); + + int mode = ::SetMapMode(hdc, MM_TEXT); + + ::FillRect(hdc, &rect, hBrush); + ::DeleteObject(hBrush); + ::SetMapMode(hdc, mode); + +} +#endif + void wxTextCtrl::AdjustSpaceLimit() { #ifndef __WIN16__ @@ -1070,6 +1140,59 @@ void wxTextCtrl::OnUpdateRedo(wxUpdateUIEvent& event) event.Enable( CanRedo() ); } +// ---------------------------------------------------------------------------- +// colour setting for the rich edit controls +// ---------------------------------------------------------------------------- + +#if wxUSE_RICHEDIT + +// Watcom C++ doesn't define this +#ifndef SCF_ALL +#define SCF_ALL 0x0004 +#endif + +bool wxTextCtrl::SetBackgroundColour(const wxColour& colour) +{ + if ( !wxTextCtrlBase::SetBackgroundColour(colour) ) + { + // colour didn't really change + return FALSE; + } + + if ( IsRich() ) + { + // rich edit doesn't use WM_CTLCOLOR, hence we need to send + // EM_SETBKGNDCOLOR additionally + ::SendMessage(GetHwnd(), EM_SETBKGNDCOLOR, 0, wxColourToRGB(colour)); + } + + return TRUE; +} + +bool wxTextCtrl::SetForegroundColour(const wxColour& colour) +{ + if ( !wxTextCtrlBase::SetForegroundColour(colour) ) + { + // colour didn't really change + return FALSE; + } + + if ( IsRich() ) + { + // change the colour of everything + CHARFORMAT cf; + wxZeroMemory(cf); + cf.cbSize = sizeof(cf); + cf.dwMask = CFM_COLOR; + cf.crTextColor = wxColourToRGB(colour); + ::SendMessage(GetHwnd(), EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf); + } + + return TRUE; +} + +#endif // wxUSE_RICHEDIT + // ---------------------------------------------------------------------------- // wxRichEditModule // ---------------------------------------------------------------------------- diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 27b948f785..a743d287b0 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -211,44 +211,83 @@ class wxConditionInternal public: wxConditionInternal() { - event = ::CreateEvent( - NULL, // default secutiry - FALSE, // not manual reset - FALSE, // nonsignaled initially - NULL // nameless event - ); - if ( !event ) + m_hEvent = ::CreateEvent( + NULL, // default secutiry + FALSE, // not manual reset + FALSE, // nonsignaled initially + NULL // nameless event + ); + if ( !m_hEvent ) { wxLogSysError(_("Can not create event object.")); } - waiters = 0; + + // nobody waits for us yet + m_nWaiters = 0; } bool Wait(DWORD timeout) { - waiters++; + // as m_nWaiters variable is accessed from multiple waiting threads + // (and possibly from the broadcasting thread), we need to change its + // value atomically + ::InterlockedIncrement(&m_nWaiters); - // FIXME this should be MsgWaitForMultipleObjects() as well probably - DWORD rc = ::WaitForSingleObject(event, timeout); + // FIXME this should be MsgWaitForMultipleObjects() as we want to keep + // processing Windows messages while waiting (or don't we?) + DWORD rc = ::WaitForSingleObject(m_hEvent, timeout); - waiters--; + ::InterlockedDecrement(&m_nWaiters); return rc != WAIT_TIMEOUT; } + void Signal() + { + // set the event to signaled: if a thread is already waiting on it, it + // will be woken up, otherwise the event will remain in the signaled + // state until someone waits on it. In any case, the system will return + // it to a non signalled state afterwards. If multiple threads are + // waiting, only one will be woken up. + if ( !::SetEvent(m_hEvent) ) + { + wxLogLastError(wxT("SetEvent")); + } + } + + void Broadcast() + { + // we need to save the original value as m_nWaiters is goign to be + // decreased by the signalled thread resulting in the loop being + // executed less times than needed + LONG nWaiters = m_nWaiters; + + // this works because all these threads are already waiting and so each + // SetEvent() inside Signal() is really a PulseEvent() because the + // event state is immediately returned to non-signaled + for ( LONG n = 0; n < nWaiters; n++ ) + { + Signal(); + } + } + ~wxConditionInternal() { - if ( event ) + if ( m_hEvent ) { - if ( !::CloseHandle(event) ) + if ( !::CloseHandle(m_hEvent) ) { - wxLogLastError("CloseHandle(event)"); + wxLogLastError(wxT("CloseHandle(event)")); } } } - HANDLE event; - int waiters; +private: + // the Win32 synchronization object corresponding to this event + HANDLE m_hEvent; + + // number of threads waiting for this condition + LONG m_nWaiters; }; wxCondition::wxCondition() @@ -274,26 +313,12 @@ bool wxCondition::Wait(unsigned long sec, void wxCondition::Signal() { - // set the event to signaled: if a thread is already waiting on it, it will - // be woken up, otherwise the event will remain in the signaled state until - // someone waits on it. In any case, the system will return it to a non - // signalled state afterwards. If multiple threads are waiting, only one - // will be woken up. - if ( !::SetEvent(m_internal->event) ) - { - wxLogLastError("SetEvent"); - } + m_internal->Signal(); } void wxCondition::Broadcast() { - // this works because all these threads are already waiting and so each - // SetEvent() inside Signal() is really a PulseEvent() because the event - // state is immediately returned to non-signaled - for ( int i = 0; i < m_internal->waiters; i++ ) - { - Signal(); - } + m_internal->Broadcast(); } // ---------------------------------------------------------------------------- @@ -351,7 +376,7 @@ public: { if ( !::CloseHandle(m_hThread) ) { - wxLogLastError("CloseHandle(thread)"); + wxLogLastError(wxT("CloseHandle(thread)")); } m_hThread = 0; @@ -390,31 +415,38 @@ private: DWORD wxThreadInternal::WinThreadStart(wxThread *thread) { - // first of all, check whether we hadn't been cancelled already + DWORD rc; + bool wasCancelled; + + // first of all, check whether we hadn't been cancelled already and don't + // start the user code at all then if ( thread->m_internal->GetState() == STATE_EXITED ) { - return (DWORD)-1; + rc = (DWORD)-1; + wasCancelled = TRUE; } - - // store the thread object in the TLS - if ( !::TlsSetValue(gs_tlsThisThread, thread) ) + else // do run thread { - wxLogSysError(_("Can not start thread: error writing TLS.")); + // store the thread object in the TLS + if ( !::TlsSetValue(gs_tlsThisThread, thread) ) + { + wxLogSysError(_("Can not start thread: error writing TLS.")); - return (DWORD)-1; + return (DWORD)-1; + } + + rc = (DWORD)thread->Entry(); + + // enter m_critsect before changing the thread state + thread->m_critsect.Enter(); + wasCancelled = thread->m_internal->GetState() == STATE_CANCELED; + thread->m_internal->SetState(STATE_EXITED); + thread->m_critsect.Leave(); } - DWORD rc = (DWORD)thread->Entry(); - - // enter m_critsect before changing the thread state - thread->m_critsect.Enter(); - bool wasCancelled = thread->m_internal->GetState() == STATE_CANCELED; - thread->m_internal->SetState(STATE_EXITED); - thread->m_critsect.Leave(); - thread->OnExit(); - // if the thread was cancelled (from Delete()), then it the handle is still + // if the thread was cancelled (from Delete()), then its handle is still // needed there if ( thread->IsDetached() && !wasCancelled ) { @@ -522,7 +554,13 @@ bool wxThreadInternal::Resume() return FALSE; } - m_state = STATE_RUNNING; + // don't change the state from STATE_EXITED because it's special and means + // we are going to terminate without running any user code - if we did it, + // the codei n Delete() wouldn't work + if ( m_state != STATE_EXITED ) + { + m_state = STATE_RUNNING; + } return TRUE; } @@ -645,18 +683,12 @@ bool wxThread::SetConcurrency(size_t level) if ( hModKernel ) { pfnSetProcessAffinityMask = (SETPROCESSAFFINITYMASK) - ::GetProcAddress(hModKernel, -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520) - "SetProcessAffinityMask"); -#else - _T("SetProcessAffinityMask")); -#endif + ::GetProcAddress(hModKernel, "SetProcessAffinityMask"); } // we've discovered a MT version of Win9x! wxASSERT_MSG( pfnSetProcessAffinityMask, - _T("this system has several CPUs but no " - "SetProcessAffinityMask function?") ); + _T("this system has several CPUs but no SetProcessAffinityMask function?") ); } if ( !pfnSetProcessAffinityMask ) @@ -759,29 +791,44 @@ wxThreadError wxThread::Delete(ExitCode *pRc) // Delete() is always safe to call, so consider all possible states - // has the thread started to run? - bool shouldResume = FALSE; + // we might need to resume the thread, but we might also not need to cancel + // it if it doesn't run yet + bool shouldResume = FALSE, + shouldCancel = TRUE, + isRunning = FALSE; + // check if the thread already started to run { wxCriticalSectionLocker lock(m_critsect); if ( m_internal->GetState() == STATE_NEW ) { - // WinThreadStart() will see it and terminate immediately + // WinThreadStart() will see it and terminate immediately, no need + // to cancel the thread - but we still need to resume it to let it + // run m_internal->SetState(STATE_EXITED); - shouldResume = TRUE; + Resume(); // it knows about STATE_EXITED special case + + shouldCancel = FALSE; + isRunning = TRUE; + + // shouldResume is correctly set to FALSE here + } + else + { + shouldResume = IsPaused(); } } - // is the thread paused? - if ( shouldResume || IsPaused() ) + // resume the thread if it is paused + if ( shouldResume ) Resume(); HANDLE hThread = m_internal->GetHandle(); // does is still run? - if ( IsRunning() ) + if ( isRunning || IsRunning() ) { if ( IsMain() ) { @@ -794,6 +841,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc) } // ask the thread to terminate + if ( shouldCancel ) { wxCriticalSectionLocker lock(m_critsect); @@ -877,7 +925,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc) if ( !::GetExitCodeThread(hThread, (LPDWORD)&rc) ) { - wxLogLastError("GetExitCodeThread"); + wxLogLastError(wxT("GetExitCodeThread")); rc = (ExitCode)-1; } @@ -886,7 +934,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc) { // if the thread exits normally, this is done in WinThreadStart, but in // this case it would have been too early because - // MsgWaitForMultipleObject() would fail if the therad handle was + // MsgWaitForMultipleObject() would fail if the thread handle was // closed while we were waiting on it, so we must do it here delete this; } @@ -1020,9 +1068,7 @@ bool wxThreadModule::OnInit() // in normal circumstances it will only happen if all other // TLS_MINIMUM_AVAILABLE (>= 64) indices are already taken - in other // words, this should never happen - wxLogSysError(_("Thread module initialization failed: " - "impossible to allocate index in thread " - "local storage")); + wxLogSysError(_("Thread module initialization failed: impossible to allocate index in thread local storage")); return FALSE; } @@ -1034,8 +1080,7 @@ bool wxThreadModule::OnInit() ::TlsFree(gs_tlsThisThread); gs_tlsThisThread = 0xFFFFFFFF; - wxLogSysError(_("Thread module initialization failed: " - "can not store value in thread local storage")); + wxLogSysError(_("Thread module initialization failed: can not store value in thread local storage")); return FALSE; } @@ -1055,7 +1100,7 @@ void wxThreadModule::OnExit() { if ( !::TlsFree(gs_tlsThisThread) ) { - wxLogLastError("TlsFree failed."); + wxLogLastError(wxT("TlsFree failed.")); } if ( gs_critsectGui ) @@ -1106,7 +1151,7 @@ void WXDLLEXPORT wxMutexGuiLeave() } else { - // decrement the number of waiters now + // decrement the number of threads waiting for GUI access now wxASSERT_MSG( gs_nWaitingForGui > 0, wxT("calling wxMutexGuiLeave() without entering it first?") ); @@ -1160,7 +1205,7 @@ void WXDLLEXPORT wxWakeUpMainThread() if ( !::PostThreadMessage(gs_idMainThread, WM_NULL, 0, 0) ) { // should never happen - wxLogLastError("PostThreadMessage(WM_NULL)"); + wxLogLastError(wxT("PostThreadMessage(WM_NULL)")); } } diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index 128c77e852..0dcc94f036 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -32,7 +32,7 @@ #include "wx/tooltip.h" #include "wx/msw/private.h" -#if defined(__WIN95__) && (!defined(__GNUWIN32__) || defined(__MINGW32__)) +#if defined(__WIN95__) && (!defined(__GNUWIN32_OLD__) || defined(__MINGW32__)) #include #endif @@ -207,7 +207,7 @@ WXHWND wxToolTip::GetToolTipCtrl() if ( !ms_hwndTT ) { ms_hwndTT = (WXHWND)::CreateWindow(TOOLTIPS_CLASS, - (LPSTR)NULL, + (LPCTSTR)NULL, TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, @@ -303,25 +303,25 @@ void wxToolTip::Add(WXHWND hWnd) hfont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); if ( !hfont ) { - wxLogLastError("GetStockObject(DEFAULT_GUI_FONT)"); + wxLogLastError(wxT("GetStockObject(DEFAULT_GUI_FONT)")); } } HDC hdc = CreateCompatibleDC(NULL); if ( !hdc ) { - wxLogLastError("CreateCompatibleDC(NULL)"); + wxLogLastError(wxT("CreateCompatibleDC(NULL)")); } if ( !SelectObject(hdc, hfont) ) { - wxLogLastError("SelectObject(hfont)"); + wxLogLastError(wxT("SelectObject(hfont)")); } SIZE sz; if ( !GetTextExtentPoint(hdc, m_text, index, &sz) ) { - wxLogLastError("GetTextExtentPoint"); + wxLogLastError(wxT("GetTextExtentPoint")); } DeleteDC(hdc); @@ -374,6 +374,22 @@ void wxToolTip::SetWindow(wxWindow *win) Add((WXHWND)hwnd); } } + + // VZ: it's ugly to do it here, but I don't want any major changes right + // now, later we will probably want to have wxWindow::OnGotToolTip() or + // something like this where the derived class can do such things + // itself instead of wxToolTip "knowing" about them all + wxComboBox *combo = wxDynamicCast(control, wxComboBox); + if ( combo ) + { + WXHWND hwndComboEdit = combo->GetWindowStyle() & wxCB_READONLY + ? combo->GetHWND() + : combo->GetEditHWND(); + if ( hwndComboEdit ) + { + Add(hwndComboEdit); + } + } } void wxToolTip::SetTip(const wxString& tip) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 7f8403c58f..d25241697b 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -29,6 +29,9 @@ #include "wx/msw/private.h" +// Set this to 1 to be _absolutely_ sure that repainting will work for all comctl32.dll versions +#define wxUSE_COMCTL32_SAFELY 0 + // Mingw32 is a bit mental even though this is done in winundef #ifdef GetFirstChild #undef GetFirstChild @@ -112,7 +115,7 @@ static bool IsItemSelected(HWND hwndTV, HTREEITEM hItem) if ( !TreeView_GetItem(hwndTV, &tvi) ) { - wxLogLastError("TreeView_GetItem"); + wxLogLastError(wxT("TreeView_GetItem")); } return (tvi.state & TVIS_SELECTED) != 0; @@ -128,7 +131,7 @@ static void SelectItem(HWND hwndTV, HTREEITEM hItem, bool select = TRUE) if ( TreeView_SetItem(hwndTV, &tvi) == -1 ) { - wxLogLastError("TreeView_SetItem"); + wxLogLastError(wxT("TreeView_SetItem")); } } @@ -446,7 +449,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl) // ---------------------------------------------------------------------------- // handy table for sending events -static const wxEventType g_events[2][2] = +static wxEventType g_events[2][2] = { { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxEVT_COMMAND_TREE_ITEM_COLLAPSING }, { wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxEVT_COMMAND_TREE_ITEM_EXPANDING } @@ -498,8 +501,15 @@ void wxTreeCtrl::Init() m_textCtrl = NULL; m_hasAnyAttr = FALSE; m_dragImage = NULL; - m_htSelStart = 0; + + // Initialize static array of events, because with the new event system, + // they may not be initialized yet. + + g_events[0][0] = wxEVT_COMMAND_TREE_ITEM_COLLAPSED; + g_events[0][1] = wxEVT_COMMAND_TREE_ITEM_COLLAPSING; + g_events[1][0] = wxEVT_COMMAND_TREE_ITEM_EXPANDED; + g_events[1][1] = wxEVT_COMMAND_TREE_ITEM_EXPANDING; } bool wxTreeCtrl::Create(wxWindow *parent, @@ -516,7 +526,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, return FALSE; DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | - TVS_HASLINES | TVS_SHOWSELALWAYS; + TVS_HASLINES | TVS_SHOWSELALWAYS /* | WS_CLIPSIBLINGS */; if ( m_windowStyle & wxTR_HAS_BUTTONS ) wstyle |= TVS_HASBUTTONS; @@ -545,8 +555,23 @@ bool wxTreeCtrl::Create(wxWindow *parent, if ( !MSWCreateControl(WC_TREEVIEW, wstyle) ) return FALSE; +#if wxUSE_COMCTL32_SAFELY + wxWindow::SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + wxWindow::SetForegroundColour(wxWindow::GetParent()->GetForegroundColour()); +#elif 1 SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); SetForegroundColour(wxWindow::GetParent()->GetForegroundColour()); +#else + // This works around a bug in the Windows tree control whereby for some versions + // of comctrl32, setting any colour actually draws the background in black. + // This will initialise the background to the system colour. + // THIS FIX NOW REVERTED since it caused problems on _other_ systems. + // Assume the user has an updated comctl32.dll. + ::SendMessage(GetHwnd(), TVM_SETBKCOLOR, 0,-1); + wxWindow::SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + SetForegroundColour(wxWindow::GetParent()->GetForegroundColour()); +#endif + // VZ: this is some experimental code which may be used to get the // TVS_CHECKBOXES style functionality for comctl32.dll < 4.71. @@ -634,7 +659,7 @@ bool wxTreeCtrl::DoGetItem(wxTreeViewItem* tvItem) const { if ( !TreeView_GetItem(GetHwnd(), tvItem) ) { - wxLogLastError("TreeView_GetItem"); + wxLogLastError(wxT("TreeView_GetItem")); return FALSE; } @@ -646,7 +671,7 @@ void wxTreeCtrl::DoSetItem(wxTreeViewItem* tvItem) { if ( TreeView_SetItem(GetHwnd(), tvItem) == -1 ) { - wxLogLastError("TreeView_SetItem"); + wxLogLastError(wxT("TreeView_SetItem")); } } @@ -707,20 +732,24 @@ size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item, bool wxTreeCtrl::SetBackgroundColour(const wxColour &colour) { +#if !wxUSE_COMCTL32_SAFELY if ( !wxWindowBase::SetBackgroundColour(colour) ) return FALSE; SendMessage(GetHwnd(), TVM_SETBKCOLOR, 0, colour.GetPixel()); +#endif return TRUE; } bool wxTreeCtrl::SetForegroundColour(const wxColour &colour) { +#if !wxUSE_COMCTL32_SAFELY if ( !wxWindowBase::SetForegroundColour(colour) ) return FALSE; SendMessage(GetHwnd(), TVM_SETTEXTCOLOR, 0, colour.GetPixel()); +#endif return TRUE; } @@ -908,6 +937,12 @@ wxTreeItemData *wxTreeCtrl::GetItemData(const wxTreeItemId& item) const void wxTreeCtrl::SetItemData(const wxTreeItemId& item, wxTreeItemData *data) { + // first, associate this piece of data with this item + if ( data ) + { + data->SetId(item); + } + wxTreeViewItem tvItem(item, TVIF_PARAM); if ( HasIndirectData(item) ) @@ -982,6 +1017,7 @@ void wxTreeCtrl::SetItemTextColour(const wxTreeItemId& item, } attr->SetTextColour(col); + Refresh(); } void wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item, @@ -998,6 +1034,7 @@ void wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item, } attr->SetBackgroundColour(col); + Refresh(); } void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font) @@ -1013,6 +1050,7 @@ void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font) } attr->SetFont(font); + Refresh(); } // ---------------------------------------------------------------------------- @@ -1142,16 +1180,14 @@ wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const { - wxASSERT_MSG( IsVisible(item), wxT("The item you call GetNextVisible() " - "for must be visible itself!")); + wxASSERT_MSG( IsVisible(item), wxT("The item you call GetNextVisible() for must be visible itself!")); return wxTreeItemId((WXHTREEITEM) TreeView_GetNextVisible(GetHwnd(), HITEM(item))); } wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const { - wxASSERT_MSG( IsVisible(item), wxT("The item you call GetPrevVisible() " - "for must be visible itself!")); + wxASSERT_MSG( IsVisible(item), wxT("The item you call GetPrevVisible() for must be visible itself!")); return wxTreeItemId((WXHTREEITEM) TreeView_GetPrevVisible(GetHwnd(), HITEM(item))); } @@ -1219,6 +1255,11 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent, mask |= TVIF_TEXT; tvIns.item.pszText = (wxChar *)text.c_str(); // cast is ok } + else + { + tvIns.item.pszText = NULL; + tvIns.item.cchTextMax = 0; + } if ( image != -1 ) { @@ -1249,7 +1290,7 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent, HTREEITEM id = (HTREEITEM) TreeView_InsertItem(GetHwnd(), &tvIns); if ( id == 0 ) { - wxLogLastError("TreeView_InsertItem"); + wxLogLastError(wxT("TreeView_InsertItem")); } if ( data != NULL ) @@ -1334,7 +1375,7 @@ void wxTreeCtrl::Delete(const wxTreeItemId& item) { if ( !TreeView_DeleteItem(GetHwnd(), HITEM(item)) ) { - wxLogLastError("TreeView_DeleteItem"); + wxLogLastError(wxT("TreeView_DeleteItem")); } } @@ -1357,7 +1398,7 @@ void wxTreeCtrl::DeleteChildren(const wxTreeItemId& item) { if ( !TreeView_DeleteItem(GetHwnd(), (HTREEITEM)children[n]) ) { - wxLogLastError("TreeView_DeleteItem"); + wxLogLastError(wxT("TreeView_DeleteItem")); } } } @@ -1366,7 +1407,7 @@ void wxTreeCtrl::DeleteAllItems() { if ( !TreeView_DeleteAllItems(GetHwnd()) ) { - wxLogLastError("TreeView_DeleteAllItems"); + wxLogLastError(wxT("TreeView_DeleteAllItems")); } } @@ -1491,7 +1532,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& item) { if ( !TreeView_SelectItem(GetHwnd(), HITEM(item)) ) { - wxLogLastError("TreeView_SelectItem"); + wxLogLastError(wxT("TreeView_SelectItem")); } else { @@ -1513,7 +1554,7 @@ void wxTreeCtrl::ScrollTo(const wxTreeItemId& item) { if ( !TreeView_SelectSetFirstVisible(GetHwnd(), HITEM(item)) ) { - wxLogLastError("TreeView_SelectSetFirstVisible"); + wxLogLastError(wxT("TreeView_SelectSetFirstVisible")); } } @@ -1544,6 +1585,14 @@ void wxTreeCtrl::DeleteTextCtrl() { if ( m_textCtrl ) { + // the HWND corresponding to this control is deleted by the tree + // control itself and we don't know when exactly this happens, so check + // if the window still exists before calling UnsubclassWin() + if ( !::IsWindow(GetHwndOf(m_textCtrl)) ) + { + m_textCtrl->SetHWND(0); + } + m_textCtrl->UnsubclassWin(); m_textCtrl->SetHWND(0); delete m_textCtrl; @@ -1568,6 +1617,7 @@ wxTextCtrl* wxTreeCtrl::EditLabel(const wxTreeItemId& item, } m_textCtrl = (wxTextCtrl *)textControlClass->CreateObject(); + m_textCtrl->SetParent(this); m_textCtrl->SetHWND((WXHWND)hWnd); m_textCtrl->SubclassWin((WXHWND)hWnd); @@ -1915,25 +1965,6 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) switch ( hdr->code ) { - case NM_RCLICK: - { - if ( wxControl::MSWOnNotify(idCtrl, lParam, result) ) - return TRUE; - - TV_HITTESTINFO tvhti; - ::GetCursorPos(&(tvhti.pt)); - ::ScreenToClient(GetHwnd(),&(tvhti.pt)); - if ( TreeView_HitTest(GetHwnd(),&tvhti) ) - { - if( tvhti.flags & TVHT_ONITEM ) - { - event.m_item = (WXHTREEITEM) tvhti.hItem; - eventType = wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK; - } - } - } - break; - case TVN_BEGINDRAG: eventType = wxEVT_COMMAND_TREE_BEGIN_DRAG; // fall through @@ -2029,8 +2060,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; default: - wxLogDebug(wxT("unexpected code %d in TVN_ITEMEXPAND " - "message"), tv->action); + wxLogDebug(wxT("unexpected code %d in TVN_ITEMEXPAND message"), tv->action); } bool ing = ((int)hdr->code == TVN_ITEMEXPANDING); @@ -2082,7 +2112,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } break; -#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 +#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 && !wxUSE_COMCTL32_SAFELY case NM_CUSTOMDRAW: { LPNMTVCUSTOMDRAW lptvcd = (LPNMTVCUSTOMDRAW)lParam; @@ -2179,6 +2209,30 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; #endif // _WIN32_IE >= 0x300 + case NM_DBLCLK: + case NM_RCLICK: + { + TV_HITTESTINFO tvhti; + ::GetCursorPos(&tvhti.pt); + ::ScreenToClient(GetHwnd(), &tvhti.pt); + if ( TreeView_HitTest(GetHwnd(), &tvhti) ) + { + if ( tvhti.flags & TVHT_ONITEM ) + { + event.m_item = (WXHTREEITEM) tvhti.hItem; + eventType = (int)hdr->code == NM_DBLCLK + ? wxEVT_COMMAND_TREE_ITEM_ACTIVATED + : wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK; + + event.m_pointDrag.x = tvhti.pt.x; + event.m_pointDrag.y = tvhti.pt.y; + } + + break; + } + } + // fall through + default: return wxControl::MSWOnNotify(idCtrl, lParam, result); } @@ -2191,6 +2245,14 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // post processing switch ( hdr->code ) { + case NM_DBLCLK: + // we translate NM_DBLCLK into ACTIVATED event, so don't interpret + // the return code of this event handler as the return value for + // NM_DBLCLK - otherwise, double clicking the item to toggle its + // expanded status would never work + *result = FALSE; + break; + case TVN_BEGINDRAG: case TVN_BEGINRDRAG: if ( event.IsAllowed() ) @@ -2238,8 +2300,12 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) break; case TVN_ENDLABELEDIT: - // return TRUE to set the label to the new string + // return TRUE to set the label to the new string: note that we + // also must pretend that we did process the message or it is going + // to be passed to DefWindowProc() which will happily return FALSE + // cancelling the label change *result = event.IsAllowed(); + processed = TRUE; // ensure that we don't have the text ctrl which is going to be // deleted any more diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index f836d8dc4b..9b93c671af 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -31,9 +31,11 @@ #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/app.h" - #include "wx/cursor.h" #include "wx/intl.h" #include "wx/log.h" +#if wxUSE_GUI + #include "wx/cursor.h" +#endif #endif //WX_PRECOMP // In some mingws there is a missing extern "C" int the winsock header, @@ -127,7 +129,7 @@ extern "C" { #endif # if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS -# define new new(__FILE__,__LINE__) +# define new new(__TFILE__,__LINE__) # endif #endif @@ -163,7 +165,7 @@ bool wxGetHostName(wxChar *buf, int maxSize) DWORD nSize = maxSize; if ( !::GetComputerName(buf, &nSize) ) { - wxLogLastError("GetComputerName"); + wxLogLastError(wxT("GetComputerName")); return FALSE; } @@ -450,7 +452,7 @@ bool wxDirExists(const wxString& dir) if ( h == INVALID_HANDLE_VALUE ) { - wxLogLastError("FindFirstFile"); + wxLogLastError(wxT("FindFirstFile")); return FALSE; } @@ -547,10 +549,16 @@ wxString wxGetOsDescription() case VER_PLATFORM_WIN32_WINDOWS: str.Printf(_("Windows 9%c"), - info.dwMinorVersion == 0 ? _T('5') : _T('9')); - if ( !wxIsEmpty(info.szCSDVersion) ) + info.dwMinorVersion == 0 ? _T('5') : _T('8')); { - str << _T(" (") << info.szCSDVersion << _T(')'); + // we need to trim it as under my version of Win98 this is + // just a space and "( )" at the end looks quite ugly + wxString ver = info.szCSDVersion; + ver.Trim(); + if ( !ver.IsEmpty() ) + { + str << _T(" (") << ver << _T(')'); + } } break; @@ -910,8 +918,6 @@ bool wxCheckForInterrupt(wxWindow *wnd) return TRUE; } -#endif // wxUSE_GUI - // MSW only: get user-defined resource from the .res file. // Returns NULL or newly-allocated memory, so use delete[] to clean up. @@ -964,10 +970,22 @@ void wxGetMousePosition( int* x, int* y ) // Return TRUE if we have a colour display bool wxColourDisplay() { - ScreenHDC dc; - int noCols = GetDeviceCaps(dc, NUMCOLORS); + // this function is called from wxDC ctor so it is called a *lot* of times + // hence we optimize it a bit but doign the check only once + // + // this should be MT safe as only the GUI thread (holding the GUI mutex) + // can call us + static int s_isColour = -1; - return (noCols == -1) || (noCols > 2); + if ( s_isColour == -1 ) + { + ScreenHDC dc; + int noCols = ::GetDeviceCaps(dc, NUMCOLORS); + + s_isColour = (noCols == -1) || (noCols > 2); + } + + return s_isColour != 0; } // Returns depth of screen @@ -1052,6 +1070,8 @@ WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd) #endif // Win16/32 } +#endif // wxUSE_GUI + #if 0 //------------------------------------------------------------------------ // wild character routines @@ -1209,7 +1229,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) return ((*str == '\0') && (*pattern == '\0')); }; -#endif +#endif // 0 #if 0 diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 453b7efc5d..2ab9fcab40 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -108,7 +108,7 @@ public: #ifndef __WIN16__ if ( !::CloseHandle(hProcess) ) { - wxLogLastError("CloseHandle(hProcess)"); + wxLogLastError(wxT("CloseHandle(hProcess)")); } #endif } @@ -121,17 +121,20 @@ public: bool state; // set to FALSE when the process finishes }; +#if defined(__WIN32__) && wxUSE_STREAMS -#ifdef __WIN32__ // ---------------------------------------------------------------------------- // wxPipeStreams // ---------------------------------------------------------------------------- -class wxPipeInputStream: public wxInputStream { +class wxPipeInputStream: public wxInputStream +{ public: wxPipeInputStream(HANDLE hInput); ~wxPipeInputStream(); + virtual bool Eof() const; + protected: size_t OnSysRead(void *buffer, size_t len); @@ -139,7 +142,8 @@ protected: HANDLE m_hInput; }; -class wxPipeOutputStream: public wxOutputStream { +class wxPipeOutputStream: public wxOutputStream +{ public: wxPipeOutputStream(HANDLE hOutput); ~wxPipeOutputStream(); @@ -165,17 +169,55 @@ wxPipeInputStream::~wxPipeInputStream() ::CloseHandle(m_hInput); } +bool wxPipeInputStream::Eof() const +{ + DWORD nAvailable; + + // function name is misleading, it works with anon pipes as well + DWORD rc = ::PeekNamedPipe + ( + m_hInput, // handle + NULL, 0, // ptr to buffer and its size + NULL, // [out] bytes read + &nAvailable, // [out] bytes available + NULL // [out] bytes left + ); + + if ( !rc ) + { + if ( ::GetLastError() != ERROR_BROKEN_PIPE ) + { + // unexpected error + wxLogLastError(_T("PeekNamedPipe")); + } + + // don't try to continue reading from a pipe if an error occured or if + // it had been closed + return TRUE; + } + else + { + return nAvailable == 0; + } +} + size_t wxPipeInputStream::OnSysRead(void *buffer, size_t len) { - DWORD bytesRead; - + // reading from a pipe may block if there is no more data, always check for + // EOF first m_lasterror = wxSTREAM_NOERROR; - if (! ::ReadFile(m_hInput, buffer, len, &bytesRead, NULL) ) { - if (GetLastError() == ERROR_BROKEN_PIPE) + if ( Eof() ) + return 0; + + DWORD bytesRead; + if ( !::ReadFile(m_hInput, buffer, len, &bytesRead, NULL) ) + { + if ( ::GetLastError() == ERROR_BROKEN_PIPE ) m_lasterror = wxSTREAM_EOF; else m_lasterror = wxSTREAM_READ_ERROR; } + return bytesRead; } @@ -198,12 +240,14 @@ size_t wxPipeOutputStream::OnSysWrite(const void *buffer, size_t len) DWORD bytesRead; m_lasterror = wxSTREAM_NOERROR; - if (! ::WriteFile(m_hOutput, buffer, len, &bytesRead, NULL) ) { - if (GetLastError() == ERROR_BROKEN_PIPE) + if ( !::WriteFile(m_hOutput, buffer, len, &bytesRead, NULL) ) + { + if ( ::GetLastError() == ERROR_BROKEN_PIPE ) m_lasterror = wxSTREAM_EOF; else m_lasterror = wxSTREAM_READ_ERROR; } + return bytesRead; } @@ -214,6 +258,7 @@ size_t wxPipeOutputStream::OnSysWrite(const void *buffer, size_t len) // ============================================================================ #ifdef __WIN32__ + static DWORD wxExecuteThread(wxExecuteData *data) { WaitForSingleObject(data->hProcess, INFINITE); @@ -221,7 +266,7 @@ static DWORD wxExecuteThread(wxExecuteData *data) // get the exit code if ( !GetExitCodeProcess(data->hProcess, &data->dwExitCode) ) { - wxLogLastError("GetExitCodeProcess"); + wxLogLastError(wxT("GetExitCodeProcess")); } wxASSERT_MSG( data->dwExitCode != STILL_ACTIVE, @@ -270,6 +315,49 @@ LRESULT APIENTRY _EXPORT wxExecuteWindowCbk(HWND hWnd, UINT message, } #endif // Win32 +#if wxUSE_IPC + +// connect to the given server via DDE and ask it to execute the command +static bool wxExecuteDDE(const wxString& ddeServer, + const wxString& ddeTopic, + const wxString& ddeCommand) +{ + bool ok; + + wxDDEClient client; + wxConnectionBase *conn = client.MakeConnection(_T(""), + ddeServer, + ddeTopic); + if ( !conn ) + { + ok = FALSE; + } + else // connected to DDE server + { + // the added complication here is that although most + // programs use XTYP_EXECUTE for their DDE API, some + // important ones - like IE and other MS stuff - use + // XTYP_REQUEST! + // + // so we try it first and then the other one if it + // failed + { + wxLogNull noErrors; + ok = conn->Request(ddeCommand) != NULL; + } + + if ( !ok ) + { + // now try execute - but show the errors + ok = conn->Execute(ddeCommand); + } + } + + return ok; +} + +#endif // wxUSE_IPC + long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) { wxCHECK_MSG( !!cmd, 0, wxT("empty command in wxExecute") ); @@ -288,6 +376,11 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) static const size_t lenDdePrefix = 7; // strlen("WX_DDE:") if ( cmd.Left(lenDdePrefix) == _T("WX_DDE#") ) { + // speed up the concatenations below + ddeServer.reserve(256); + ddeTopic.reserve(256); + ddeCommand.reserve(256); + const wxChar *p = cmd.c_str() + 7; while ( *p && *p != _T('#') ) { @@ -338,6 +431,22 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) { ddeCommand += *p++; } + + // if we want to just launch the program and not wait for its + // termination, try to execute DDE command right now, it can succeed if + // the process is already running - but as it fails if it's not + // running, suppress any errors it might generate + if ( !sync ) + { + wxLogNull noErrors; + if ( wxExecuteDDE(ddeServer, ddeTopic, ddeCommand) ) + { + // a dummy PID - this is a hack, of course, but it's well worth + // it as we don't open a new server each time we're called + // which would be quite bad + return -1; + } + } } else #endif // wxUSE_IPC @@ -347,164 +456,148 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) } #if defined(__WIN32__) && !defined(__TWIN32__) - // the old code is disabled because we really need a process handle - // if we want to execute it asynchronously or even just get its - // return code and for this we must use CreateProcess() and not - // ShellExecute() -#if 0 - // isolate command and arguments - wxString commandName; - bool insideQuotes = FALSE; - const char *pc; - for ( pc = command.c_str(); *pc != '\0'; pc++ ) - { - switch ( *pc ) - { - case ' ': - case '\t': - if ( !insideQuotes ) - break; - // fall through - case '"': - insideQuotes = !insideQuotes; - // fall through - - default: - commandName += *pc; - continue; // skip the next break - } - - // only reached for space not inside quotes - break; - } - wxString commandArgs = pc; - - wxWindow *winTop = wxTheApp->GetTopWindow(); - HWND hwndTop = (HWND)(winTop ? winTop->GetHWND() : 0); - - HANDLE result; -#ifdef __GNUWIN32__ - result = ShellExecute(hwndTop, - (const wchar_t)"open", - (const wchar_t)commandName, - (const wchar_t)commandArgs, - (const wchar_t)NULL, - SW_SHOWNORMAL); -#else // !GNUWIN32 - result = ShellExecute(hwndTop, "open", commandName, - commandArgs, NULL, SW_SHOWNORMAL); -#endif // GNUWIN32 - - if ( ((long)result) <= 32 ) - wxLogSysError(_("Can't execute command '%s'"), command.c_str()); - - return result; -#else // 1 - - HANDLE hpipeRead[2]; - HANDLE hpipeWrite[2]; - HANDLE hStdIn = INVALID_HANDLE_VALUE; - HANDLE hStdOut = INVALID_HANDLE_VALUE; - - // we need to inherit handles in the child process if we want to redirect - // its IO - BOOL inheritHandles = FALSE; + // the IO redirection is only supported with wxUSE_STREAMS + BOOL redirect = FALSE; +#if wxUSE_STREAMS + // the first elements are reading ends, the second are the writing ones + HANDLE hpipeStdin[2], + hpipeStdinWrite = INVALID_HANDLE_VALUE, + hpipeStdout[2], + hpipeStderr[2]; // open the pipes to which child process IO will be redirected if needed if ( handler && handler->IsRedirected() ) { + // default secutiry attributes SECURITY_ATTRIBUTES security; security.nLength = sizeof(security); security.lpSecurityDescriptor = NULL; security.bInheritHandle = TRUE; - if ( !::CreatePipe(&hpipeRead[0], &hpipeRead[1], &security, 0) ) + // create stdin pipe + if ( !::CreatePipe(&hpipeStdin[0], &hpipeStdin[1], &security, 0) ) { wxLogSysError(_("Can't create the inter-process read pipe")); - return 0; + // indicate failure in both cases + return sync ? -1 : 0; } - if ( !::CreatePipe(&hpipeWrite[0], &hpipeWrite[1], &security, 0) ) + // and a stdout one + if ( !::CreatePipe(&hpipeStdout[0], &hpipeStdout[1], &security, 0) ) { - ::CloseHandle(hpipeRead[0]); - ::CloseHandle(hpipeRead[1]); + ::CloseHandle(hpipeStdin[0]); + ::CloseHandle(hpipeStdin[1]); wxLogSysError(_("Can't create the inter-process write pipe")); - return 0; + return sync ? -1 : 0; } - // We need to save the old stdio handles to restore them after the call - // to CreateProcess - hStdIn = ::GetStdHandle(STD_INPUT_HANDLE); - hStdOut = ::GetStdHandle(STD_OUTPUT_HANDLE); + (void)::CreatePipe(&hpipeStderr[0], &hpipeStderr[1], &security, 0); - if ( !::SetStdHandle(STD_INPUT_HANDLE, hpipeRead[0]) || - !::SetStdHandle(STD_OUTPUT_HANDLE, hpipeWrite[1]) ) - { - wxLogDebug(_T("Failed to change stdin/out handles")); - } - - inheritHandles = TRUE; + redirect = TRUE; } +#endif // wxUSE_STREAMS // create the process STARTUPINFO si; wxZeroMemory(si); - si.cb = sizeof(si); - PROCESS_INFORMATION pi; - - if ( ::CreateProcess( - NULL, // application name (use only cmd line) - (wxChar *)command.c_str(), // full command line - NULL, // security attributes: defaults for both - NULL, // the process and its main thread - inheritHandles, // inherit handles if we need pipes - CREATE_DEFAULT_ERROR_MODE | - CREATE_SUSPENDED, // flags - NULL, // environment (use the same) - NULL, // current directory (use the same) - &si, // startup info (unused here) - &pi // process info - ) == 0 ) +#if wxUSE_STREAMS + if ( redirect ) { - if ( inheritHandles ) + // when the std IO is redirected, we don't show the (console) process + // window + si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; + + si.hStdInput = hpipeStdin[0]; + si.hStdOutput = hpipeStdout[1]; + si.hStdError = hpipeStderr[1]; + + si.wShowWindow = SW_HIDE; + + // we must duplicate the handle to the write side of stdin pipe to make + // it non inheritable: indeed, we must close hpipeStdin[1] before + // launching the child process as otherwise this handle will be + // inherited by the child which will never close it and so the pipe + // will never be closed and the child will be left stuck in ReadFile() + if ( !::DuplicateHandle + ( + GetCurrentProcess(), + hpipeStdin[1], + GetCurrentProcess(), + &hpipeStdinWrite, + 0, // desired access: unused here + FALSE, // not inherited + DUPLICATE_SAME_ACCESS // same access as for src handle + ) ) { - ::CloseHandle(hpipeWrite[0]); - ::CloseHandle(hpipeWrite[1]); - ::CloseHandle(hpipeRead[0]); - ::CloseHandle(hpipeRead[1]); + wxLogLastError(_T("DuplicateHandle")); } + ::CloseHandle(hpipeStdin[1]); + } +#endif // wxUSE_STREAMS + + PROCESS_INFORMATION pi; + DWORD dwFlags = CREATE_DEFAULT_ERROR_MODE | CREATE_SUSPENDED; + + bool ok = ::CreateProcess + ( + NULL, // application name (use only cmd line) + (wxChar *) + command.c_str(), // full command line + NULL, // security attributes: defaults for both + NULL, // the process and its main thread + redirect, // inherit handles if we use pipes + dwFlags, // process creation flags + NULL, // environment (use the same) + NULL, // current directory (use the same) + &si, // startup info (unused here) + &pi // process info + ) != 0; + +#if wxUSE_STREAMS + // we can close the pipe ends used by child anyhow + if ( redirect ) + { + ::CloseHandle(hpipeStdin[0]); + ::CloseHandle(hpipeStdout[1]); + ::CloseHandle(hpipeStderr[1]); + } +#endif // wxUSE_STREAMS + + if ( !ok ) + { +#if wxUSE_STREAMS + // close the other handles too + if ( redirect ) + { + ::CloseHandle(hpipeStdout[0]); + ::CloseHandle(hpipeStderr[0]); + } +#endif // wxUSE_STREAMS + wxLogSysError(_("Execution of command '%s' failed"), command.c_str()); - return 0; + return sync ? -1 : 0; } - // Restore the old stdio handles - if ( inheritHandles ) +#if wxUSE_STREAMS + if ( redirect ) { - if ( !::SetStdHandle(STD_INPUT_HANDLE, hStdIn) || - !::SetStdHandle(STD_OUTPUT_HANDLE, hStdOut) ) - { - wxLogDebug(_T("Failed to restore old stdin/out handles")); - } - - // they're still opened in child process - ::CloseHandle(hpipeWrite[1]); - ::CloseHandle(hpipeRead[0]); - // We can now initialize the wxStreams - wxInputStream *inStream = new wxPipeInputStream(hpipeWrite[0]); - wxOutputStream *outStream = new wxPipeOutputStream(hpipeRead[1]); + wxInputStream *inStream = new wxPipeInputStream(hpipeStdout[0]), + *errStream = new wxPipeInputStream(hpipeStderr[0]); + wxOutputStream *outStream = new wxPipeOutputStream(hpipeStdinWrite); - handler->SetPipeStreams(inStream, outStream); + handler->SetPipeStreams(inStream, outStream, errStream); } +#endif // wxUSE_STREAMS // register the class for the hidden window used for the notifications if ( !gs_classForHiddenWindow ) @@ -519,7 +612,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) if ( !::RegisterClass(&wndclass) ) { - wxLogLastError("RegisterClass(hidden window)"); + wxLogLastError(wxT("RegisterClass(hidden window)")); } } @@ -562,16 +655,16 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) if ( ::ResumeThread(pi.hThread) == (DWORD)-1 ) { // ignore it - what can we do? - wxLogLastError("ResumeThread in wxExecute"); + wxLogLastError(wxT("ResumeThread in wxExecute")); } // close unneeded handle if ( !::CloseHandle(pi.hThread) ) - wxLogLastError("CloseHandle(hThread)"); + wxLogLastError(wxT("CloseHandle(hThread)")); if ( !hThread ) { - wxLogLastError("CreateThread in wxExecute"); + wxLogLastError(wxT("CreateThread in wxExecute")); DestroyWindow(hwnd); delete data; @@ -580,16 +673,41 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) return pi.dwProcessId; } + ::CloseHandle(hThread); + #if wxUSE_IPC // second part of DDE hack: now establish the DDE conversation with the // just launched process - if ( !!ddeServer ) + if ( !ddeServer.empty() ) { - wxDDEClient client; - wxConnectionBase *conn = client.MakeConnection(_T(""), - ddeServer, - ddeTopic); - if ( !conn || !conn->Execute(ddeCommand) ) + bool ok; + + // give the process the time to init itself + // + // we use a very big timeout hoping that WaitForInputIdle() will return + // much sooner, but not INFINITE just in case the process hangs + // completely - like this we will regain control sooner or later + switch ( ::WaitForInputIdle(pi.hProcess, 10000 /* 10 seconds */) ) + { + default: + wxFAIL_MSG( _T("unexpected WaitForInputIdle() return code") ); + // fall through + + case -1: + wxLogLastError(_T("WaitForInputIdle() in wxExecute")); + + case WAIT_TIMEOUT: + wxLogDebug(_T("Timeout too small in WaitForInputIdle")); + + ok = FALSE; + break; + + case 0: + // ok, process ready to accept DDE requests + ok = wxExecuteDDE(ddeServer, ddeTopic, ddeCommand); + } + + if ( !ok ) { wxLogError(_("Couldn't launch DDE server '%s'."), command.c_str()); } @@ -624,7 +742,6 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) // return the exit code return dwExitCode; -#endif // 0/1 #else // Win16 long instanceID = WinExec((LPCSTR) WXSTRINGCAST command, SW_SHOW); if (instanceID < 32) return(0); @@ -655,6 +772,8 @@ long wxExecute(char **argv, bool sync, wxProcess *handler) return wxExecute(command, sync, handler); } +#if wxUSE_GUI + // ---------------------------------------------------------------------------- // Metafile helpers // ---------------------------------------------------------------------------- @@ -688,3 +807,5 @@ extern void HIMETRICToPixel(LONG *x, LONG *y) *y *= iHeightPels; *y /= (iHeightMM * 100); } + +#endif // wxUSE_GUI diff --git a/src/msw/version.rc b/src/msw/version.rc new file mode 100644 index 0000000000..0a5ea72a80 --- /dev/null +++ b/src/msw/version.rc @@ -0,0 +1,59 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/msw/version.rc +// Purpose: contains version info resource for wxMSW DLL build +// Author: Vadim Zeitlin +// Modified by: +// Created: 09.07.00 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vadim Zeitlin +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/version.h" + +#ifdef _DEBUG + #define DLL_FLAGS 0x1L + #ifdef _UNICODE + #define DLL_SUFFIX "ud" + #else + #define DLL_SUFFIX "d" + #endif +#else + #define DLL_FLAGS 0x0L + #ifdef _UNICODE + #define DLL_SUFFIX "u" + #else + #define DLL_SUFFIX "" + #endif +#endif + +1 VERSIONINFO + FILEVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER + PRODUCTVERSION wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxBETA_NUMBER + FILEFLAGSMASK 0x3fL + FILEFLAGS DLL_FLAGS + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "wxWindows cross-platform GUI framework\0" + VALUE "CompanyName", "wxWindows development team\0" + VALUE "FileDescription", "wxWindows for MSW\0" + VALUE "FileVersion", "2.2.1\0" + VALUE "InternalName", "wxMSW\0" + VALUE "LegalCopyright", "Copyright © 1993, 2000 wxWindows development team\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "wxmsw221" DLL_SUFFIX ".dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "wxWindows\0" + VALUE "ProductVersion", "2.2.1\0" +#ifdef _UNICODE + VALUE "SpecialBuild", "Unicode build\0" +#endif + END + END +END diff --git a/src/msw/window.cpp b/src/msw/window.cpp index a011dca8ab..2b622a44aa 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -46,11 +46,12 @@ #include "wx/listbox.h" #include "wx/button.h" #include "wx/msgdlg.h" + #include "wx/settings.h" #include #endif -#if wxUSE_OWNER_DRAWN +#if wxUSE_OWNER_DRAWN #include "wx/ownerdrw.h" #endif @@ -98,6 +99,11 @@ #endif #endif +// This didn't appear in mingw until 2.95.2 +#ifndef SIF_TRACKPOS +#define SIF_TRACKPOS 16 +#endif + // --------------------------------------------------------------------------- // global variables // --------------------------------------------------------------------------- @@ -129,6 +135,9 @@ wxWindow *wxFindWinFromHandle(WXHWND hWnd); // mouse clicks static void TranslateKbdEventToMouse(wxWindow *win, int *x, int *y, WPARAM *flags); +// get the text metrics for the current font +static TEXTMETRIC wxGetTextMetrics(const wxWindow *win); + // --------------------------------------------------------------------------- // event tables // --------------------------------------------------------------------------- @@ -263,18 +272,18 @@ wxWindow::~wxWindow() MSWDetachWindowMenu(); + DestroyChildren(); + if ( m_parent ) m_parent->RemoveChild(this); - DestroyChildren(); - if ( m_hWnd ) { // VZ: test temp removed to understand what really happens here //if (::IsWindow(GetHwnd())) { if ( !::DestroyWindow(GetHwnd()) ) - wxLogLastError("DestroyWindow"); + wxLogLastError(wxT("DestroyWindow")); } // remove hWnd <-> wxWindow association @@ -299,10 +308,12 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, DWORD msflags = 0; if ( style & wxBORDER ) msflags |= WS_BORDER; +/* Not appropriate for non-frame/dialog windows, and + may clash with other window styles. if ( style & wxTHICK_FRAME ) msflags |= WS_THICKFRAME; - - //msflags |= WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE; +*/ + //msflags |= WS_CHILD /* | WS_CLIPSIBLINGS */ | WS_VISIBLE; msflags |= WS_CHILD | WS_VISIBLE; if ( style & wxCLIP_CHILDREN ) msflags |= WS_CLIPCHILDREN; @@ -326,12 +337,10 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, DLGC_WANTTAB | DLGC_WANTMESSAGE; } - MSWCreate(m_windowId, parent, wxCanvasClassName, this, NULL, - pos.x, pos.y, - WidthDefault(size.x), HeightDefault(size.y), - msflags, NULL, exStyle); - - return TRUE; + return MSWCreate(m_windowId, parent, wxCanvasClassName, this, NULL, + pos.x, pos.y, + WidthDefault(size.x), HeightDefault(size.y), + msflags, NULL, exStyle); } // --------------------------------------------------------------------------- @@ -855,7 +864,8 @@ WXDWORD wxWindow::MakeExtendedStyle(long style, bool eliminateBorders) exStyle |= WS_EX_DLGMODALFRAME; #if defined(__WIN95__) if ( style & wxRAISED_BORDER ) - exStyle |= WS_EX_WINDOWEDGE; + // It seems that WS_EX_WINDOWEDGE doesn't work, but WS_EX_DLGMODALFRAME does + exStyle |= WS_EX_DLGMODALFRAME; /* WS_EX_WINDOWEDGE */; if ( style & wxSTATIC_BORDER ) exStyle |= WS_EX_STATICEDGE; #endif @@ -1087,8 +1097,14 @@ void wxWindow::DoGetSize(int *x, int *y) const { HWND hWnd = GetHwnd(); RECT rect; - GetWindowRect(hWnd, &rect); - +#ifdef __WIN16__ + ::GetWindowRect(hWnd, &rect); +#else + if ( !::GetWindowRect(hWnd, &rect) ) + { + wxLogLastError(_T("GetWindowRect")); + } +#endif if ( x ) *x = rect.right - rect.left; if ( y ) @@ -1122,11 +1138,14 @@ void wxWindow::DoGetPosition(int *x, int *y) const ::ScreenToClient(hParentWnd, &point); } - // We may be faking the client origin. So a window that's really at (0, - // 30) may appear (to wxWin apps) to be at (0, 0). - wxPoint pt(parent->GetClientAreaOrigin()); - point.x -= pt.x; - point.y -= pt.y; + if ( parent ) + { + // We may be faking the client origin. So a window that's really at (0, + // 30) may appear (to wxWin apps) to be at (0, 0). + wxPoint pt(parent->GetClientAreaOrigin()); + point.x -= pt.x; + point.y -= pt.y; + } } if ( x ) @@ -1185,7 +1204,7 @@ void wxWindow::DoMoveWindow(int x, int y, int width, int height) { if ( !::MoveWindow(GetHwnd(), x, y, width, height, TRUE) ) { - wxLogLastError("MoveWindow"); + wxLogLastError(wxT("MoveWindow")); } } @@ -1258,40 +1277,54 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags) void wxWindow::DoSetClientSize(int width, int height) { - wxWindow *parent = GetParent(); - HWND hWnd = GetHwnd(); - HWND hParentWnd = (HWND) 0; - if ( parent ) - hParentWnd = (HWND) parent->GetHWND(); - - RECT rect; - ::GetClientRect(hWnd, &rect); - - RECT rect2; - GetWindowRect(hWnd, &rect2); - - // Find the difference between the entire window (title bar and all) - // and the client area; add this to the new client size to move the - // window - int actual_width = rect2.right - rect2.left - rect.right + width; - int actual_height = rect2.bottom - rect2.top - rect.bottom + height; - - // If there's a parent, must subtract the parent's top left corner - // since MoveWindow moves relative to the parent - - POINT point; - point.x = rect2.left; - point.y = rect2.top; - if ( parent ) + // normally this loop shouldn't take more than 2 iterations (usually 1 but + // if scrollbars [dis]appear as the result of the first call, then 2) but + // just to be on the safe side we check for it instead of making it an + // "infinite" loop (i.e. leaving break inside as the only way to get out) + for ( int i = 0; i < 3; i++ ) { - ::ScreenToClient(hParentWnd, &point); + RECT rectClient; + ::GetClientRect(GetHwnd(), &rectClient); + + // if the size is already ok, stop here (rectClient.left = top = 0) + if ( rectClient.right == width && rectClient.bottom == height ) + { + break; + } + + if ( i == 2 ) + { + // how did it happen? maybe OnSize() handler does something really + // strange in this class? + wxFAIL_MSG( _T("logic error in DoSetClientSize") ); + + break; + } + + // Find the difference between the entire window (title bar and all) + // and the client area; add this to the new client size to move the + // window + RECT rectWin; + ::GetWindowRect(GetHwnd(), &rectWin); + + int widthClient = rectWin.right - rectWin.left - rectClient.right + width; + int heightClient = rectWin.bottom - rectWin.top - rectClient.bottom + height; + + // If there's a parent, must subtract the parent's top left corner + // since MoveWindow moves relative to the parent + + POINT point; + point.x = rectWin.left; + point.y = rectWin.top; + + wxWindow *parent = GetParent(); + if ( parent ) + { + ::ScreenToClient(GetHwndOf(parent), &point); + } + + DoMoveWindow(point.x, point.y, widthClient, heightClient); } - - DoMoveWindow(point.x, point.y, actual_width, actual_height); - - wxSizeEvent event(wxSize(width, height), m_windowId); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); } // For implementation purposes - sometimes decorations make the client area @@ -1313,7 +1346,8 @@ void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent ) { wxPoint pt(parent->GetClientAreaOrigin()); - x += pt.x; y += pt.y; + x += pt.x; + y += pt.y; } } } @@ -1324,26 +1358,18 @@ void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) int wxWindow::GetCharHeight() const { - TEXTMETRIC lpTextMetric; - HWND hWnd = GetHwnd(); - HDC dc = ::GetDC(hWnd); - - GetTextMetrics(dc, &lpTextMetric); - ::ReleaseDC(hWnd, dc); - - return lpTextMetric.tmHeight; + return wxGetTextMetrics(this).tmHeight; } int wxWindow::GetCharWidth() const { - TEXTMETRIC lpTextMetric; - HWND hWnd = GetHwnd(); - HDC dc = ::GetDC(hWnd); - - GetTextMetrics(dc, &lpTextMetric); - ::ReleaseDC(hWnd, dc); - - return lpTextMetric.tmAveCharWidth; + // +1 is needed because Windows apparently adds it when calculating the + // dialog units size in pixels +#if wxDIALOG_UNIT_COMPATIBILITY + return wxGetTextMetrics(this).tmAveCharWidth ; +#else + return wxGetTextMetrics(this).tmAveCharWidth + 1; +#endif } void wxWindow::GetTextExtent(const wxString& string, @@ -1433,6 +1459,18 @@ void wxWindow::GetCaretPos(int *x, int *y) const // popup menu // --------------------------------------------------------------------------- +static void wxYieldForCommandsOnly() +{ + // peek all WM_COMMANDs (it will always return WM_QUIT too but we don't + // want to process it here) + MSG msg; + while ( ::PeekMessage(&msg, (HWND)0, WM_COMMAND, WM_COMMAND, PM_REMOVE) + && msg.message != WM_QUIT ) + { + wxTheApp->DoMessage((WXMSG *)&msg); + } +} + bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y) { menu->SetInvokingWindow(this); @@ -1446,7 +1484,9 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y) ::ClientToScreen(hWnd, &point); wxCurrentPopupMenu = menu; ::TrackPopupMenu(hMenu, TPM_RIGHTBUTTON, point.x, point.y, 0, hWnd, NULL); - wxYield(); + + wxYieldForCommandsOnly(); + wxCurrentPopupMenu = NULL; menu->SetInvokingWindow(NULL); @@ -1541,7 +1581,18 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg) } else if ( lDlgCode & DLGC_BUTTON ) { - // buttons want process Enter themselevs + // let IsDialogMessage() handle this for all + // buttons except the owner-drawn ones which it + // just seems to ignore + long style = ::GetWindowLong(msg->hwnd, GWL_STYLE); + if ( (style & BS_OWNERDRAW) == BS_OWNERDRAW ) + { + // emulate the button click + wxWindow *btn = wxFindWinFromHandle((WXHWND)msg->hwnd); + if ( btn ) + btn->MSWCommand(BN_CLICKED, 0 /* unused */); + } + bProcess = FALSE; } else @@ -1624,7 +1675,10 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg) #endif // 0 if ( ::IsDialogMessage(GetHwnd(), msg) ) + { + // IsDialogMessage() did something... return TRUE; + } } #if wxUSE_TOOLTIPS @@ -1758,12 +1812,6 @@ LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM w // it with wxWindow stored in wxWndHook if ( !wnd && wxWndHook ) { -#if 0 // def __WXDEBUG__ - char buf[512]; - ::GetClassNameA((HWND) hWnd, buf, 512); - wxString className(buf); -#endif - wxAssociateWinWithHandle(hWnd, wxWndHook); wnd = wxWndHook; wxWndHook = NULL; @@ -1823,11 +1871,15 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) break; case WM_DESTROY: - processed = HandleDestroy(); + // never set processed to TRUE and *always* pass WM_DESTROY to + // DefWindowProc() as Windows may do some internal cleanup when + // processing it and failing to pass the message along may cause + // memory and resource leaks! + (void)HandleDestroy(); break; case WM_MOVE: - processed = HandleMove(LOWORD(lParam), HIWORD(lParam)); + processed = HandleMove(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); break; case WM_SIZE: @@ -1868,19 +1920,19 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) break; case WM_MOUSEMOVE: - { - short x = LOWORD(lParam); - short y = HIWORD(lParam); - - processed = HandleMouseMove(x, y, wParam); - } - break; + processed = HandleMouseMove(GET_X_LPARAM(lParam), + GET_Y_LPARAM(lParam), + wParam); + break; case WM_LBUTTONDOWN: - // set focus to this window - SetFocus(); + // set focus to this window + if ( AcceptsFocus() ) + { + SetFocus(); + } - // fall through + // fall through case WM_LBUTTONUP: case WM_LBUTTONDBLCLK: @@ -1890,12 +1942,10 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) case WM_MBUTTONDOWN: case WM_MBUTTONUP: case WM_MBUTTONDBLCLK: - { - short x = LOWORD(lParam); - short y = HIWORD(lParam); - - processed = HandleMouseEvent(message, x, y, wParam); - } + processed = HandleMouseEvent(message, + GET_X_LPARAM(lParam), + GET_Y_LPARAM(lParam), + wParam); break; case MM_JOY1MOVE: @@ -1906,12 +1956,10 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) case MM_JOY2BUTTONDOWN: case MM_JOY1BUTTONUP: case MM_JOY2BUTTONUP: - { - int x = LOWORD(lParam); - int y = HIWORD(lParam); - - processed = HandleJoystickEvent(message, x, y, wParam); - } + processed = HandleJoystickEvent(message, + GET_X_LPARAM(lParam), + GET_Y_LPARAM(lParam), + wParam); break; case WM_SYSCOMMAND: @@ -2243,24 +2291,25 @@ void wxWindow::MSWDetachWindowMenu() { if ( m_hMenu ) { + wxChar buf[1024]; HMENU hMenu = (HMENU)m_hMenu; int N = ::GetMenuItemCount(hMenu); - int i; - for (i = 0; i < N; i++) + for ( int i = 0; i < N; i++ ) { - wxChar buf[100]; - int chars = GetMenuString(hMenu, i, buf, 100, MF_BYPOSITION); - if ( !chars ) + if ( !::GetMenuString(hMenu, i, buf, WXSIZEOF(buf), MF_BYPOSITION) ) { wxLogLastError(wxT("GetMenuString")); continue; } - if ( wxStrcmp(buf, wxT("&Window")) == 0 ) + if ( wxStrcmp(buf, _("&Window")) == 0 ) { - RemoveMenu(hMenu, i, MF_BYPOSITION); + if ( !::RemoveMenu(hMenu, i, MF_BYPOSITION) ) + { + wxLogLastError(wxT("RemoveMenu")); + } break; } @@ -2302,16 +2351,19 @@ bool wxWindow::MSWCreate(int id, if ( width > -1 ) width1 = width; if ( height > -1 ) height1 = height; - // Unfortunately this won't work in WIN16. Unless perhaps - // we define WS_EX_CONTROLPARENT ourselves? -#ifndef __WIN16__ + // unfortunately, setting WS_EX_CONTROLPARENT only for some windows in the + // hierarchy with several embedded panels (and not all of them) causes the + // program to hang during the next call to IsDialogMessage() due to the bug + // in this function (at least in Windows NT 4.0, it seems to work ok in + // Win2K) +#if 0 // if we have wxTAB_TRAVERSAL style, we want WS_EX_CONTROLPARENT or // IsDialogMessage() won't work for us if ( GetWindowStyleFlag() & wxTAB_TRAVERSAL ) { extendedStyle |= WS_EX_CONTROLPARENT; } -#endif +#endif // 0 HWND hParent = (HWND)NULL; if ( parent ) @@ -2328,8 +2380,7 @@ bool wxWindow::MSWCreate(int id, if ( m_hWnd == 0 ) { - wxLogError(_("Can't find dummy dialog template!\n" - "Check resource include path for finding wx.rc.")); + wxLogError(_("Can't find dummy dialog template!\nCheck resource include path for finding wx.rc.")); return FALSE; } @@ -2358,7 +2409,7 @@ bool wxWindow::MSWCreate(int id, { controlId = id; // all child windows should clip their siblings - // style |= WS_CLIPSIBLINGS; + // style |= /* WS_CLIPSIBLINGS */ ; } wxString className(wclass); @@ -2379,8 +2430,7 @@ bool wxWindow::MSWCreate(int id, if ( !m_hWnd ) { - wxLogError(_("Can't create window of class %s!\n" - "Possible Windows 3.x compatibility problem?"), + wxLogError(_("Can't create window of class %s!\nPossible Windows 3.x compatibility problem?"), wclass); return FALSE; @@ -2401,6 +2451,8 @@ bool wxWindow::MSWCreate(int id, #endif wxAssociateWinWithHandle((HWND) m_hWnd, this); + SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + return TRUE; } @@ -2434,8 +2486,6 @@ bool wxWindow::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( child->MSWOnNotify(idCtrl, lParam, result) ) { return TRUE; - - break; } node = node->GetNext(); @@ -2642,10 +2692,13 @@ bool wxWindow::HandleDropFiles(WXWPARAM wParam) DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint); // Get the total number of files dropped - WORD gwFilesDropped = (WORD)DragQueryFile ((HDROP)hFilesInfo, - (UINT)-1, - (LPSTR)0, - (UINT)0); + WORD gwFilesDropped = (WORD)::DragQueryFile + ( + (HDROP)hFilesInfo, + (UINT)-1, + (LPTSTR)0, + (UINT)0 + ); wxString *files = new wxString[gwFilesDropped]; int wIndex; @@ -2692,7 +2745,7 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd, #ifdef __WIN32__ if ( !::GetCursorPos(&pt) ) { - wxLogLastError("GetCursorPos"); + wxLogLastError(wxT("GetCursorPos")); } #else // In WIN16 it doesn't return a value. @@ -2747,11 +2800,9 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd, // cursor set, stop here return TRUE; } - else - { - // pass up the window chain - return FALSE; - } + + // pass up the window chain + return FALSE; } // --------------------------------------------------------------------------- @@ -2913,9 +2964,9 @@ bool wxWindow::HandlePaint() #ifdef __WIN32__ HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle if ( !hRegion ) - wxLogLastError("CreateRectRgn"); + wxLogLastError(wxT("CreateRectRgn")); if ( ::GetUpdateRgn(GetHwnd(), hRegion, FALSE) == ERROR ) - wxLogLastError("GetUpdateRgn"); + wxLogLastError(wxT("GetUpdateRgn")); m_updateRegion = wxRegion((WXHRGN) hRegion); #else @@ -2966,7 +3017,7 @@ void wxWindow::OnEraseBackground(wxEraseEvent& event) m_backgroundColour.Blue()); HBRUSH hBrush = ::CreateSolidBrush(ref); if ( !hBrush ) - wxLogLastError("CreateSolidBrush"); + wxLogLastError(wxT("CreateSolidBrush")); HDC hdc = (HDC)event.GetDC()->GetHDC(); @@ -3046,6 +3097,23 @@ bool wxWindow::HandleGetMinMaxInfo(void *mmInfo) return rc; } +// generate an artificial resize event +void wxWindow::SendSizeEvent() +{ + RECT r; +#ifdef __WIN16__ + ::GetWindowRect(GetHwnd(), &r); +#else + if ( !::GetWindowRect(GetHwnd(), &r) ) + { + wxLogLastError(_T("GetWindowRect")); + } +#endif + + (void)::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, + MAKELPARAM(r.right - r.left, r.bottom - r.top)); +} + // --------------------------------------------------------------------------- // command messages // --------------------------------------------------------------------------- @@ -3061,19 +3129,20 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) } wxWindow *win = (wxWindow*) NULL; - if ( cmd == 0 || cmd == 1 ) // menu or accel - use id - { - // must cast to a signed type before comparing with other ids! - win = FindItem((signed short)id); - } - if (!win && control) + if ( control ) { // find it from HWND - this works even with the broken programs using // the same ids for different controls win = wxFindWinFromHandle(control); } + if ( !win && (cmd == 0 || cmd == 1) ) // menu or accel - use id + { + // must cast to a signed type before comparing with other ids! + win = FindItem((signed short)id); + } + if ( win ) { return win->MSWCommand(cmd, id); @@ -3122,11 +3191,12 @@ void wxWindow::InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags) { event.m_x = x; event.m_y = y; - event.m_shiftDown = ((flags & MK_SHIFT) != 0); - event.m_controlDown = ((flags & MK_CONTROL) != 0); - event.m_leftDown = ((flags & MK_LBUTTON) != 0); - event.m_middleDown = ((flags & MK_MBUTTON) != 0); - event.m_rightDown = ((flags & MK_RBUTTON) != 0); + event.m_shiftDown = (flags & MK_SHIFT) != 0; + event.m_controlDown = (flags & MK_CONTROL) != 0; + event.m_leftDown = (flags & MK_LBUTTON) != 0; + event.m_middleDown = (flags & MK_MBUTTON) != 0; + event.m_rightDown = (flags & MK_RBUTTON) != 0; + event.m_altDown = (::GetKeyState(VK_MENU) & 0x80000000) != 0; event.SetTimestamp(s_currentMsg.time); event.m_eventObject = this; @@ -3184,7 +3254,7 @@ bool wxWindow::HandleMouseMove(int x, int y, WXUINT flags) if ( (m_lastMouseEvent == wxEVT_RIGHT_DOWN || m_lastMouseEvent == wxEVT_LEFT_DOWN || m_lastMouseEvent == wxEVT_MIDDLE_DOWN) && - (m_lastMouseX == event.m_x && m_lastMouseY == event.m_y) ) + (m_lastMouseX == x && m_lastMouseY == y) ) { m_lastMouseEvent = wxEVT_MOTION; @@ -3456,11 +3526,41 @@ bool wxWindow::MSWOnScroll(int orientation, WXWORD wParam, break; case SB_THUMBPOSITION: - event.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; - break; - case SB_THUMBTRACK: - event.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; +#ifdef __WIN32__ + // the up down controls send the WM_SCROLL events too but we can't call + // GetScrollInfo() for them as they don't have the scrollbars + // + // NB: this is an ugly fix for 2.2 branch only - a better one involves + // modifying the headers and will be in 2.4 branch + if ( !wxDynamicCast(this, wxNotebook) ) + + // under Win32, the scrollbar range and position are 32 bit integers, + // but WM_[HV]SCROLL only carry the low 16 bits of them, so we must + // explicitly query the scrollbar for the correct position (this must + // be done only for these two SB_ events as they are the only one + // carrying the scrollbar position) + { + SCROLLINFO scrollInfo; + wxZeroMemory(scrollInfo); + scrollInfo.cbSize = sizeof(SCROLLINFO); + scrollInfo.fMask = SIF_TRACKPOS; + + if ( !::GetScrollInfo(GetHwnd(), + orientation == wxHORIZONTAL ? SB_HORZ + : SB_VERT, + &scrollInfo) ) + { + wxLogLastError(_T("GetScrollInfo")); + } + + event.SetPosition(scrollInfo.nTrackPos); + } +#endif // Win32 + + event.m_eventType = wParam == SB_THUMBPOSITION + ? wxEVT_SCROLLWIN_THUMBRELEASE + : wxEVT_SCROLLWIN_THUMBTRACK; break; default: @@ -3508,80 +3608,82 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font) // the key should be ignored by WM_KEYDOWN and processed by WM_CHAR instead. int wxCharCodeMSWToWX(int keySym) { - int id = 0; + int id; switch (keySym) { - case VK_CANCEL: id = WXK_CANCEL; break; - case VK_BACK: id = WXK_BACK; break; - case VK_TAB: id = WXK_TAB; break; - case VK_CLEAR: id = WXK_CLEAR; break; - case VK_RETURN: id = WXK_RETURN; break; - case VK_SHIFT: id = WXK_SHIFT; break; - case VK_CONTROL: id = WXK_CONTROL; break; - case VK_MENU : id = WXK_MENU; break; - case VK_PAUSE: id = WXK_PAUSE; break; - case VK_SPACE: id = WXK_SPACE; break; - case VK_ESCAPE: id = WXK_ESCAPE; break; - case VK_PRIOR: id = WXK_PRIOR; break; - case VK_NEXT : id = WXK_NEXT; break; - case VK_END: id = WXK_END; break; - case VK_HOME : id = WXK_HOME; break; - case VK_LEFT : id = WXK_LEFT; break; - case VK_UP: id = WXK_UP; break; - case VK_RIGHT: id = WXK_RIGHT; break; - case VK_DOWN : id = WXK_DOWN; break; - case VK_SELECT: id = WXK_SELECT; break; - case VK_PRINT: id = WXK_PRINT; break; - case VK_EXECUTE: id = WXK_EXECUTE; break; - case VK_INSERT: id = WXK_INSERT; break; - case VK_DELETE: id = WXK_DELETE; break; - case VK_HELP : id = WXK_HELP; break; - case VK_NUMPAD0: id = WXK_NUMPAD0; break; - case VK_NUMPAD1: id = WXK_NUMPAD1; break; - case VK_NUMPAD2: id = WXK_NUMPAD2; break; - case VK_NUMPAD3: id = WXK_NUMPAD3; break; - case VK_NUMPAD4: id = WXK_NUMPAD4; break; - case VK_NUMPAD5: id = WXK_NUMPAD5; break; - case VK_NUMPAD6: id = WXK_NUMPAD6; break; - case VK_NUMPAD7: id = WXK_NUMPAD7; break; - case VK_NUMPAD8: id = WXK_NUMPAD8; break; - case VK_NUMPAD9: id = WXK_NUMPAD9; break; - case VK_MULTIPLY: id = WXK_MULTIPLY; break; - case VK_ADD: id = WXK_ADD; break; - case VK_SUBTRACT: id = WXK_SUBTRACT; break; - case VK_DECIMAL: id = WXK_DECIMAL; break; - case VK_DIVIDE: id = WXK_DIVIDE; break; - case VK_F1: id = WXK_F1; break; - case VK_F2: id = WXK_F2; break; - case VK_F3: id = WXK_F3; break; - case VK_F4: id = WXK_F4; break; - case VK_F5: id = WXK_F5; break; - case VK_F6: id = WXK_F6; break; - case VK_F7: id = WXK_F7; break; - case VK_F8: id = WXK_F8; break; - case VK_F9: id = WXK_F9; break; - case VK_F10: id = WXK_F10; break; - case VK_F11: id = WXK_F11; break; - case VK_F12: id = WXK_F12; break; - case VK_F13: id = WXK_F13; break; - case VK_F14: id = WXK_F14; break; - case VK_F15: id = WXK_F15; break; - case VK_F16: id = WXK_F16; break; - case VK_F17: id = WXK_F17; break; - case VK_F18: id = WXK_F18; break; - case VK_F19: id = WXK_F19; break; - case VK_F20: id = WXK_F20; break; - case VK_F21: id = WXK_F21; break; - case VK_F22: id = WXK_F22; break; - case VK_F23: id = WXK_F23; break; - case VK_F24: id = WXK_F24; break; - case VK_NUMLOCK: id = WXK_NUMLOCK; break; - case VK_SCROLL: id = WXK_SCROLL; break; - default: - { - return 0; - } + case VK_CANCEL: id = WXK_CANCEL; break; + case VK_BACK: id = WXK_BACK; break; + case VK_TAB: id = WXK_TAB; break; + case VK_CLEAR: id = WXK_CLEAR; break; + case VK_RETURN: id = WXK_RETURN; break; + case VK_SHIFT: id = WXK_SHIFT; break; + case VK_CONTROL: id = WXK_CONTROL; break; + case VK_MENU : id = WXK_MENU; break; + case VK_PAUSE: id = WXK_PAUSE; break; + case VK_SPACE: id = WXK_SPACE; break; + case VK_ESCAPE: id = WXK_ESCAPE; break; + case VK_PRIOR: id = WXK_PRIOR; break; + case VK_NEXT : id = WXK_NEXT; break; + case VK_END: id = WXK_END; break; + case VK_HOME : id = WXK_HOME; break; + case VK_LEFT : id = WXK_LEFT; break; + case VK_UP: id = WXK_UP; break; + case VK_RIGHT: id = WXK_RIGHT; break; + case VK_DOWN : id = WXK_DOWN; break; + case VK_SELECT: id = WXK_SELECT; break; + case VK_PRINT: id = WXK_PRINT; break; + case VK_EXECUTE: id = WXK_EXECUTE; break; + case VK_INSERT: id = WXK_INSERT; break; + case VK_DELETE: id = WXK_DELETE; break; + case VK_HELP : id = WXK_HELP; break; + case VK_NUMPAD0: id = WXK_NUMPAD0; break; + case VK_NUMPAD1: id = WXK_NUMPAD1; break; + case VK_NUMPAD2: id = WXK_NUMPAD2; break; + case VK_NUMPAD3: id = WXK_NUMPAD3; break; + case VK_NUMPAD4: id = WXK_NUMPAD4; break; + case VK_NUMPAD5: id = WXK_NUMPAD5; break; + case VK_NUMPAD6: id = WXK_NUMPAD6; break; + case VK_NUMPAD7: id = WXK_NUMPAD7; break; + case VK_NUMPAD8: id = WXK_NUMPAD8; break; + case VK_NUMPAD9: id = WXK_NUMPAD9; break; + case VK_MULTIPLY: id = WXK_MULTIPLY; break; + case 0xBB: // VK_OEM_PLUS + case VK_ADD: id = WXK_ADD; break; + case 0xBD: // VK_OEM_MINUS + case VK_SUBTRACT: id = WXK_SUBTRACT; break; + case 0xBE: // VK_OEM_PERIOD + case VK_DECIMAL: id = WXK_DECIMAL; break; + case VK_DIVIDE: id = WXK_DIVIDE; break; + case VK_F1: id = WXK_F1; break; + case VK_F2: id = WXK_F2; break; + case VK_F3: id = WXK_F3; break; + case VK_F4: id = WXK_F4; break; + case VK_F5: id = WXK_F5; break; + case VK_F6: id = WXK_F6; break; + case VK_F7: id = WXK_F7; break; + case VK_F8: id = WXK_F8; break; + case VK_F9: id = WXK_F9; break; + case VK_F10: id = WXK_F10; break; + case VK_F11: id = WXK_F11; break; + case VK_F12: id = WXK_F12; break; + case VK_F13: id = WXK_F13; break; + case VK_F14: id = WXK_F14; break; + case VK_F15: id = WXK_F15; break; + case VK_F16: id = WXK_F16; break; + case VK_F17: id = WXK_F17; break; + case VK_F18: id = WXK_F18; break; + case VK_F19: id = WXK_F19; break; + case VK_F20: id = WXK_F20; break; + case VK_F21: id = WXK_F21; break; + case VK_F22: id = WXK_F22; break; + case VK_F23: id = WXK_F23; break; + case VK_F24: id = WXK_F24; break; + case VK_NUMLOCK: id = WXK_NUMLOCK; break; + case VK_SCROLL: id = WXK_SCROLL; break; + default: + id = 0; } + return id; } @@ -4227,3 +4329,35 @@ static void TranslateKbdEventToMouse(wxWindow *win, int *x, int *y, WPARAM *flag win->ScreenToClient(x, y); } + +static TEXTMETRIC wxGetTextMetrics(const wxWindow *win) +{ + // prepare the DC + TEXTMETRIC tm; + HWND hwnd = GetHwndOf(win); + HDC hdc = ::GetDC(hwnd); + +#if !wxDIALOG_UNIT_COMPATIBILITY + // and select the current font into it + HFONT hfont = GetHfontOf(win->GetFont()); + if ( hfont ) + { + hfont = (HFONT)::SelectObject(hdc, hfont); + } +#endif + + // finally retrieve the text metrics from it + GetTextMetrics(hdc, &tm); + +#if !wxDIALOG_UNIT_COMPATIBILITY + // and clean up + if ( hfont ) + { + (void)::SelectObject(hdc, hfont); + } +#endif + + ::ReleaseDC(hwnd, hdc); + + return tm; +} diff --git a/src/msw/xpmhand.cpp b/src/msw/xpmhand.cpp index 064e9fc34a..8dcb803079 100644 --- a/src/msw/xpmhand.cpp +++ b/src/msw/xpmhand.cpp @@ -55,7 +55,7 @@ static void XpmToBitmap(wxBitmap *bitmap, BITMAP bm; if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(bm), (LPSTR) & bm) ) { - wxLogLastError("GetObject(bitmap)"); + wxLogLastError(wxT("GetObject(bitmap)")); } refData->m_width = bm.bmWidth; @@ -67,7 +67,8 @@ static void XpmToBitmap(wxBitmap *bitmap, if (xmask) { wxMask *mask = new wxMask(); - mask->SetMaskBitmap((WXHBITMAP) wxInvertMask(xmask->bitmap)); + mask->SetMaskBitmap((WXHBITMAP) wxInvertMask(xmask->bitmap, + bm.bmWidth, bm.bmHeight)); bitmap->SetMask(mask); } } @@ -101,8 +102,9 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, { XpmToBitmap(bitmap, ximage, xmask, xpmAttr); - XpmFree(xpmAttr.pixels); XpmFreeAttributes(&xpmAttr); + if (xpmAttr.pixels) // VS: should never happen + XpmFree(xpmAttr.pixels); XImageFree(ximage); if (xmask) XDestroyImage(xmask); @@ -199,8 +201,9 @@ bool wxXPMDataHandler::Create(wxBitmap *bitmap, { XpmToBitmap(bitmap, ximage, xmask, xpmAttr); - XpmFree(xpmAttr.pixels); XpmFreeAttributes(&xpmAttr); + if (xpmAttr.pixels) // VS: should never happen + XpmFree(xpmAttr.pixels); XImageFree(ximage); // releases the malloc, but does not destroy bitmap if (xmask) XDestroyImage(xmask); diff --git a/src/os2/accel.cpp b/src/os2/accel.cpp index 7be1c6acd3..1b901b20c4 100644 --- a/src/os2/accel.cpp +++ b/src/os2/accel.cpp @@ -16,6 +16,8 @@ #include #include "wx/setup.h" #include "wx/window.h" +#include "wx/app.h" +#include "wx/frame.h" #endif #include "wx/os2/accel.h" @@ -42,59 +44,127 @@ protected: wxAcceleratorRefData::wxAcceleratorRefData() { - // TODO -/* - HACCEL m_hAccel; -*/ -} + m_ok = FALSE; + m_hAccel = 0; +} // end of wxAcceleratorRefData::wxAcceleratorRefData wxAcceleratorRefData::~wxAcceleratorRefData() { -/* - if (m_hAccel) - { - DestroyAcceleratorTable((HACCEL) m_hAccel); - } - m_hAccel = 0 ; -*/ -} + if (m_hAccel) + { + WinDestroyAccelTable((HACCEL) m_hAccel); + } + m_hAccel = 0 ; +} // end of wxAcceleratorRefData::~wxAcceleratorRefData wxAcceleratorTable::wxAcceleratorTable() { - m_refData = NULL; -} + m_refData = NULL; +} // end of wxAcceleratorTable::wxAcceleratorTable wxAcceleratorTable::~wxAcceleratorTable() { -} +} // end of wxAcceleratorTable::~wxAcceleratorTable // Load from .rc resource -wxAcceleratorTable::wxAcceleratorTable(const wxString& resource) +wxAcceleratorTable::wxAcceleratorTable( + const wxString& rResource +) { + HACCEL hAccel; + ULONG ulId; + m_refData = new wxAcceleratorRefData; -/* TODO: load acelerator from resource, if appropriate for your platform + ulId = atol((char*)rResource.c_str()); + hAccel = ::WinLoadAccelTable( vHabmain + ,NULL // resources always in .exe + ,(ULONG)ulId + ); + if (wxTheApp->GetTopWindow() != NULL) + { + // + // If we have accelerators the top window is the frame + // + wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow(); + + ::WinSetAccelTable( vHabmain + ,hAccel + ,(HWND)pFrame->GetHWND() + ); + } M_ACCELDATA->m_hAccel = hAccel; M_ACCELDATA->m_ok = (hAccel != 0); -*/ } -extern int wxCharCodeWXToOS2(int id, bool *isVirtual); +extern int wxCharCodeWXToOS2( + int nId +, bool* pbIsVirtual +); // Create from an array -wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[]) +wxAcceleratorTable::wxAcceleratorTable( + int n +, wxAcceleratorEntry vaEntries[] +) { - m_refData = new wxAcceleratorRefData; + int nAccelLength = ((sizeof(ACCEL) * n) + sizeof(ACCELTABLE)); + PACCELTABLE pArr; + int i; -/* TODO: create table from entries - */ -} + m_refData = new wxAcceleratorRefData; + pArr = (PACCELTABLE) new BYTE[nAccelLength]; + + for (i = 0; i < n; i++) + { + USHORT uVirt = AF_CHAR; + + if (vaEntries[i].GetFlags() & wxACCEL_ALT) + uVirt |= AF_ALT; + if (vaEntries[i].GetFlags() & wxACCEL_SHIFT) + uVirt |= AF_SHIFT; + if (vaEntries[i].GetFlags() & wxACCEL_CTRL) + uVirt |= AF_CONTROL; + + bool bIsVirtual; + USHORT uKey = wxCharCodeWXToOS2( vaEntries[i].GetKeyCode() + ,&bIsVirtual + ); + if (bIsVirtual) + uVirt = AF_CHAR | AF_VIRTUALKEY; + + USHORT uCmd = vaEntries[i].GetCommand(); + + pArr->aaccel[i].fs = uVirt; + pArr->aaccel[i].key = uKey; + pArr->aaccel[i].cmd = uCmd; + } + pArr->codepage = 437; // default to english Fix??? + pArr->cAccel = (USHORT)n; + M_ACCELDATA->m_hAccel = ::WinCreateAccelTable( vHabmain + ,pArr + ); + if (wxTheApp->GetTopWindow() != NULL) + { + // + // If we have accelerators the top window is the frame + // + wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow(); + + ::WinSetAccelTable( vHabmain + ,M_ACCELDATA->m_hAccel + ,(HWND)pFrame->GetHWND() + ); + } + + delete[] pArr; + M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0); +} // end of wxAcceleratorTable::wxAcceleratorTable bool wxAcceleratorTable::Ok() const { - // TODO - return FALSE; -} + return(M_ACCELDATA && (M_ACCELDATA->m_ok)); +} // end of wxAcceleratorTable::Ok void wxAcceleratorTable::SetHACCEL(WXHACCEL hAccel) { @@ -111,14 +181,17 @@ WXHACCEL wxAcceleratorTable::GetHACCEL() const return (WXHACCEL) M_ACCELDATA->m_hAccel; } -bool wxAcceleratorTable::Translate(wxWindow *window, WXMSG *wxmsg) const +bool wxAcceleratorTable::Translate( + WXHWND hWnd +, WXMSG* pWxmsg +) const { - // TODO: -/* - MSG *msg = (MSG *)wxmsg; + PQMSG pMsg = (PQMSG)pWxmsg; - return Ok() && ::TranslateAccelerator(GetHwndOf(window), GetHaccel(), msg); -*/ - return FALSE; -} + return Ok() && ::WinTranslateAccel( vHabmain + ,(HWND)hWnd + ,GetHaccel() + ,pMsg + ); +} // end of wxAcceleratorTable::Translate diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 26611eed61..70342ca40f 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -63,7 +63,6 @@ // --------------------------------------------------------------------------- extern wxChar* wxBuffer; -extern wxChar* wxOsVersion; extern wxList* wxWinHandleList; extern wxList WXDLLEXPORT wxPendingDelete; extern wxCursor* g_globalCursor; @@ -136,10 +135,6 @@ bool wxApp::Initialize( wxClassInfo::InitializeClasses(); -#if wxUSE_RESOURCES - wxGetResource(wxT("wxWindows"), wxT("OsVersion"), &wxOsVersion); -#endif - #if wxUSE_THREADS wxPendingEventsLocker = new wxCriticalSection; #endif @@ -188,8 +183,8 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxFrameClassName - ,(PFNWP)wxWndProc - ,CS_SIZEREDRAW | CS_SYNCPAINT + ,NULL + ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT ,sizeof(ULONG) )) { @@ -201,7 +196,7 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxFrameClassNameNoRedraw - ,(PFNWP)wxWndProc + ,NULL ,0 ,0 )) @@ -214,8 +209,8 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxMDIFrameClassName - ,(PFNWP)wxWndProc - ,CS_SIZEREDRAW | CS_SYNCPAINT + ,NULL + ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT ,0 )) { @@ -227,7 +222,7 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxMDIFrameClassNameNoRedraw - ,(PFNWP)wxWndProc + ,NULL ,0 ,0 )) @@ -240,7 +235,7 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxMDIChildFrameClassName - ,(PFNWP)wxWndProc + ,NULL ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_SYNCPAINT | CS_HITTEST ,0 )) @@ -253,7 +248,7 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxMDIChildFrameClassNameNoRedraw - ,(PFNWP)wxWndProc + ,NULL ,CS_HITTEST ,0 )) @@ -266,7 +261,7 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxPanelClassName - ,(PFNWP)wxWndProc + ,NULL ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT ,0 )) @@ -279,8 +274,8 @@ bool wxApp::RegisterWindowClasses( if (!::WinRegisterClass( vHab ,wxCanvasClassName - ,(PFNWP)wxWndProc - ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT + ,NULL + ,0 // CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT ,0 )) { @@ -555,7 +550,7 @@ bool wxApp::DoMessage() { BOOL bRc = ::WinGetMsg(vHabmain, &svCurrentMsg, HWND(NULL), 0, 0); - wxUsleep(10000); +// wxUsleep(1000); if (bRc == 0) { // got WM_QUIT @@ -656,9 +651,9 @@ int wxApp::MainLoop() #if wxUSE_THREADS wxMutexGuiLeaveOrEnter(); #endif // wxUSE_THREADS - while (!Pending() && ProcessIdle()) + while (/*Pending() &&*/ ProcessIdle()) { - wxUsleep(10000); +// wxUsleep(10000); } DoMessage(); } @@ -703,8 +698,8 @@ bool wxApp::ProcessMessage( WXMSG* pWxmsg ) { - QMSG* vMsg = (PQMSG)pWxmsg; - HWND hWnd = vMsg->hwnd; + QMSG* pMsg = (PQMSG)pWxmsg; + HWND hWnd = pMsg->hwnd; wxWindow* pWndThis = wxFindWinFromHandle((WXHWND)hWnd); wxWindow* pWnd; @@ -713,7 +708,7 @@ bool wxApp::ProcessMessage( // We must relay WM_MOUSEMOVE events to the tooltip ctrl if we want it to // popup the tooltip bubbles // - if (pWndThis && (vMsg->msg == WM_MOUSEMOVE)) + if (pWndThis && (pMsg->msg == WM_MOUSEMOVE)) { wxToolTip* pToolTip = pWndThis->GetToolTip(); if (pToolTip) @@ -734,14 +729,45 @@ bool wxApp::ProcessMessage( pWndThis = wxFindWinFromHandle((WXHWND)hWnd); } + // + // Try translations first; find the youngest window with + // a translation table. OS/2 has case sensative accels, so + // this block, coded by BK, removes that and helps make them + // case insensative. + // + if(pMsg->msg == WM_CHAR) + { + PBYTE pChmsg = (PBYTE)&(pMsg->msg); + USHORT uSch = CHARMSG(pChmsg)->chr; + bool bRc; + + // + // Do not process keyup events + // + if(!(CHARMSG(pChmsg)->fs & KC_KEYUP)) + { + if((CHARMSG(pChmsg)->fs & (KC_ALT | KC_CTRL)) && CHARMSG(pChmsg)->chr != 0) + CHARMSG(pChmsg)->chr = (USHORT)wxToupper((UCHAR)uSch); + + + for(pWnd = pWndThis; pWnd; pWnd = pWnd->GetParent() ) + { + if((bRc = pWnd->OS2TranslateMessage(pWxmsg)) == TRUE) + break; + } + + if(!bRc) // untranslated, should restore original value + CHARMSG(pChmsg)->chr = uSch; + } + } // // Anyone for a non-translation message? Try youngest descendants first. // - for (pWnd = pWndThis; pWnd; pWnd = pWnd->GetParent()) - { - if (pWnd->OS2ProcessMessage(pWxmsg)) - return TRUE; - } +// for (pWnd = pWndThis; pWnd; pWnd = pWnd->GetParent()) +// { +// if (pWnd->OS2ProcessMessage(pWxmsg)) +// return TRUE; +// } return FALSE; } // end of wxApp::ProcessMessage @@ -754,7 +780,7 @@ void wxApp::OnIdle( // // Avoid recursion (via ProcessEvent default case) // - if (sbInOnIdle ) + if (sbInOnIdle) return; sbInOnIdle = TRUE; diff --git a/src/os2/data.cpp b/src/os2/data.cpp index d899b9771a..d588b780f6 100644 --- a/src/os2/data.cpp +++ b/src/os2/data.cpp @@ -36,12 +36,6 @@ wxCursor *g_globalCursor = NULL; // Message Strings for Internationalization char **wx_msg_str = (char**)NULL; -// Custom OS version, as optionally placed in wx.ini/.wxrc -// Currently this can be Win95, Windows, Win32s, WinNT. -// For some systems, you can't tell until run-time what services you -// have. See wxGetOsVersion, which uses this string if present. -char *wxOsVersion = NULL; - int wxPageNumber; // GDI Object Lists diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index 05dbc01904..63a91c8b71 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -42,6 +42,18 @@ static const int VIEWPORT_EXTENT = 1000; static const int MM_POINTS = 9; static const int MM_METRIC = 10; +// usually this is defined in math.h +#ifndef M_PI + static const double M_PI = 3.14159265358979323846; +#endif // M_PI + +// --------------------------------------------------------------------------- +// private functions +// --------------------------------------------------------------------------- + +// convert degrees to radians +static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } + // =========================================================================== // implementation // =========================================================================== @@ -52,17 +64,17 @@ static const int MM_METRIC = 10; wxDC::wxDC(void) { - m_canvas = NULL; + m_pCanvas = NULL; - m_oldBitmap = 0; - m_oldPen = 0; - m_oldBrush = 0; - m_oldFont = 0; - m_oldPalette = 0; + m_hOldBitmap = 0; + m_hOldPen = 0; + m_hOldBrush = 0; + m_hOldFont = 0; + m_hOldPalette = 0; - m_bOwnsDC = FALSE; - m_hDC = 0; - m_hDCCount = 0; + m_bOwnsDC = FALSE; + m_hDC = 0; + m_nDCCount = 0; }; wxDC::~wxDC(void) @@ -77,52 +89,59 @@ void wxDC::SelectOldObjects(WXHDC dc) { if (dc) { - if (m_oldBitmap) + if (m_hOldBitmap) { // ::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap); - if (m_selectedBitmap.Ok()) + if (m_vSelectedBitmap.Ok()) { - m_selectedBitmap.SetSelectedInto(NULL); + m_vSelectedBitmap.SetSelectedInto(NULL); } } - m_oldBitmap = 0; - if (m_oldPen) + m_hOldBitmap = 0; + if (m_hOldPen) { // ::SelectObject((HDC) dc, (HPEN) m_oldPen); } - m_oldPen = 0; - if (m_oldBrush) + m_hOldPen = 0; + if (m_hOldBrush) { // ::SelectObject((HDC) dc, (HBRUSH) m_oldBrush); } - m_oldBrush = 0; - if (m_oldFont) + m_hOldBrush = 0; + if (m_hOldFont) { // ::SelectObject((HDC) dc, (HFONT) m_oldFont); } - m_oldFont = 0; - if (m_oldPalette) + m_hOldFont = 0; + if (m_hOldPalette) { // ::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE); } - m_oldPalette = 0; + m_hOldPalette = 0; } - m_brush = wxNullBrush; - m_pen = wxNullPen; - m_palette = wxNullPalette; - m_font = wxNullFont; + m_brush = wxNullBrush; + m_pen = wxNullPen; + m_palette = wxNullPalette; + m_font = wxNullFont; m_backgroundBrush = wxNullBrush; - m_selectedBitmap = wxNullBitmap; + m_vSelectedBitmap = wxNullBitmap; } // --------------------------------------------------------------------------- // clipping // --------------------------------------------------------------------------- -void wxDC::DoSetClippingRegionAsRegion(const wxRegion& region) -{ - // TODO +#define DO_SET_CLIPPING_BOX() \ +{ \ + RECT rect; \ + \ + GetClipBox(GetHdc(), &rect); \ + \ + m_clipX1 = (wxCoord) XDEV2LOG(rect.left); \ + m_clipY1 = (wxCoord) YDEV2LOG(rect.top); \ + m_clipX2 = (wxCoord) XDEV2LOG(rect.right); \ + m_clipY2 = (wxCoord) YDEV2LOG(rect.bottom); \ } void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y @@ -132,14 +151,9 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y // TODO } -void wxDC::DoClipping(WXHDC dc) +void wxDC::DoSetClippingRegionAsRegion(const wxRegion& region) { - if (m_clipping && dc) - { -// TODO: -// IntersectClipRect((HDC) dc, XLOG2DEV(m_clipX1), YLOG2DEV(m_clipY1), -// XLOG2DEV(m_clipX2), YLOG2DEV(m_clipY2)); - } + // TODO } void wxDC::DestroyClippingRegion(void) @@ -213,6 +227,12 @@ void wxDC::DoDrawArc( wxCoord x1, wxCoord y1 // TODO } +void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1, + wxCoord width, wxCoord height) +{ + // TODO +} + void wxDC::DoDrawPoint(wxCoord x, wxCoord y) { // TODO @@ -280,6 +300,11 @@ void wxDC::DoDrawText(const wxString& text, wxCoord x, wxCoord y) // TODO } +void wxDC::DrawAnyText(const wxString& text, wxCoord x, wxCoord y) +{ + // TODO +} + void wxDC::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle) @@ -345,9 +370,39 @@ void wxDC::SetPalette(const wxPalette& palette) // TODO } -void wxDC::SetFont(const wxFont& font) +void wxDC::SetFont( + const wxFont& rFont +) { - // TODO + // + // Set the old object temporarily, in case the assignment deletes an object + // that's not yet selected out. + // + if (m_hOldFont) + { +// ::SelectObject(GetHdc(), (HFONT) m_hOldFont); + m_hOldFont = 0; + } + + m_font = rFont; + + if (!rFont.Ok()) + { + if (m_hOldFont) +// ::SelectObject(GetHdc(), (HFONT) m_hOldFont); + m_hOldFont = 0; + } + + if (m_font.Ok() && m_font.GetResourceHandle()) + { + HFONT hFont = (HFONT)0; //::SelectObject(GetHdc(), (HFONT) m_font.GetResourceHandle()); + if (hFont == (HFONT) NULL) + { + wxLogDebug(wxT("::SelectObject failed in wxDC::SetFont.")); + } + if (!m_hOldFont) + m_hOldFont = (WXHFONT) hFont; + } } void wxDC::SetPen(const wxPen& pen) @@ -496,71 +551,43 @@ void wxDC::SetDeviceOrigin( wxCoord x, wxCoord y ) wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const { - wxCoord new_x = x - m_deviceOriginX; - if (new_x > 0) - return (wxCoord)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; - else - return (wxCoord)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; -}; + return (wxCoord) (((x) - m_deviceOriginX)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX) - m_logicalOriginX); +} wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const { - if (x > 0) - return (wxCoord)((double)(x) / m_scaleX + 0.5); - else - return (wxCoord)((double)(x) / m_scaleX - 0.5); -}; + return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX)); +} wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const { - wxCoord new_y = y - m_deviceOriginY; - if (new_y > 0) - return (wxCoord)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; - else - return (wxCoord)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; -}; + return (wxCoord) (((y) - m_deviceOriginY)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY) - m_logicalOriginY); +} wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const { - if (y > 0) - return (wxCoord)((double)(y) / m_scaleY + 0.5); - else - return (wxCoord)((double)(y) / m_scaleY - 0.5); -}; + return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY)); +} wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const { - wxCoord new_x = x - m_logicalOriginX; - if (new_x > 0) - return (wxCoord)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; - else - return (wxCoord)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; -}; + return (wxCoord) ((x - m_logicalOriginX)*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX + m_deviceOriginX); +} wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const { - if (x > 0) - return (wxCoord)((double)(x) * m_scaleX + 0.5); - else - return (wxCoord)((double)(x) * m_scaleX - 0.5); -}; + return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX); +} wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const { - wxCoord new_y = y - m_logicalOriginY; - if (new_y > 0) - return (wxCoord)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; - else - return (wxCoord)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; -}; + return (wxCoord) ((y - m_logicalOriginY)*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY + m_deviceOriginY); +} wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const { - if (y > 0) - return (wxCoord)((double)(y) * m_scaleY + 0.5); - else - return (wxCoord)((double)(y) * m_scaleY - 0.5); -}; + return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY); +} // --------------------------------------------------------------------------- // bit blit diff --git a/src/os2/dcclient.cpp b/src/os2/dcclient.cpp index 9fa35aa9d7..cee1da7214 100644 --- a/src/os2/dcclient.cpp +++ b/src/os2/dcclient.cpp @@ -82,14 +82,14 @@ static RECT g_paintStruct; wxWindowDC::wxWindowDC() { - m_canvas = NULL; + m_pCanvas = NULL; } wxWindowDC::wxWindowDC(wxWindow *the_canvas) { - m_canvas = the_canvas; + m_pCanvas = the_canvas; m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(the_canvas) ); - m_hDCCount++; + m_nDCCount++; // // default under PM is that Window and Client DC's are the same // so we offer a separate Presentation Space to use for the @@ -103,12 +103,12 @@ wxWindowDC::wxWindowDC(wxWindow *the_canvas) ); ::GpiAssociate(m_hPS, NULLHANDLE); ::GpiAssociate(m_hPS, m_hDC); - SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID)); + SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID)); } wxWindowDC::~wxWindowDC() { - if (m_canvas && m_hDC) + if (m_pCanvas && m_hDC) { SelectOldObjects(m_hDC); @@ -123,7 +123,7 @@ wxWindowDC::~wxWindowDC() m_hDC = NULLHANDLE; } - m_hDCCount--; + m_nDCCount--; } // ---------------------------------------------------------------------------- @@ -132,12 +132,12 @@ wxWindowDC::~wxWindowDC() wxClientDC::wxClientDC() { - m_canvas = NULL; + m_pCanvas = NULL; } wxClientDC::wxClientDC(wxWindow *the_canvas) { - m_canvas = the_canvas; + m_pCanvas = the_canvas; // // default under PM is that Window and Client DC's are the same @@ -147,12 +147,12 @@ wxClientDC::wxClientDC(wxWindow *the_canvas) // // Default mode is BM_LEAVEALONE so we make no call Set the mix // - SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID)); + SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID)); } wxClientDC::~wxClientDC() { - if ( m_canvas && GetHdc() ) + if ( m_pCanvas && GetHdc() ) { SelectOldObjects(m_hDC); @@ -187,7 +187,7 @@ wxArrayDCInfo wxPaintDC::ms_cache; wxPaintDC::wxPaintDC() { - m_canvas = NULL; + m_pCanvas = NULL; m_hDC = 0; } @@ -204,7 +204,7 @@ wxPaintDC::wxPaintDC(wxWindow *canvas) } #endif // __WXDEBUG__ - m_canvas = canvas; + m_pCanvas = canvas; // do we have a DC for this window in the cache? wxPaintDCInfo *info = FindInCache(); @@ -215,10 +215,10 @@ wxPaintDC::wxPaintDC(wxWindow *canvas) } else // not in cache, create a new one { - m_hDC = (WXHDC)::WinBeginPaint(GetWinHwnd(m_canvas), NULLHANDLE, &g_paintStruct); - ms_cache.Add(new wxPaintDCInfo(m_canvas, this)); + m_hDC = (WXHDC)::WinBeginPaint(GetWinHwnd(m_pCanvas), NULLHANDLE, &g_paintStruct); + ms_cache.Add(new wxPaintDCInfo(m_pCanvas, this)); } - SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID)); + SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID)); } wxPaintDC::~wxPaintDC() @@ -252,7 +252,7 @@ wxPaintDCInfo *wxPaintDC::FindInCache(size_t *index) const for ( size_t n = 0; n < nCache; n++ ) { info = &ms_cache[n]; - if ( info->hwnd == m_canvas->GetHWND() ) + if ( info->hwnd == m_pCanvas->GetHWND() ) { if ( index ) *index = n; diff --git a/src/os2/dcmemory.cpp b/src/os2/dcmemory.cpp index 1ab4a99f27..9e6515d0bf 100644 --- a/src/os2/dcmemory.cpp +++ b/src/os2/dcmemory.cpp @@ -77,13 +77,13 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) void wxMemoryDC::DoGetSize( int *width, int *height ) const { - if (!m_selectedBitmap.Ok()) + if (!m_vSelectedBitmap.Ok()) { *width = 0; *height = 0; return; } - *width = m_selectedBitmap.GetWidth(); - *height = m_selectedBitmap.GetHeight(); + *width = m_vSelectedBitmap.GetWidth(); + *height = m_vSelectedBitmap.GetHeight(); }; diff --git a/src/os2/dir.cpp b/src/os2/dir.cpp index 0b66575785..2915cf69b6 100644 --- a/src/os2/dir.cpp +++ b/src/os2/dir.cpp @@ -36,8 +36,6 @@ #ifdef __EMX__ #include -#else -#include #endif // ---------------------------------------------------------------------------- diff --git a/src/os2/font.cpp b/src/os2/font.cpp index db5ecb184a..b443496b6a 100644 --- a/src/os2/font.cpp +++ b/src/os2/font.cpp @@ -183,6 +183,9 @@ wxFont::~wxFont() // ---------------------------------------------------------------------------- // real implementation +// Boris' Kovalenko comments: +// Because OS/2 fonts are associated with PS we can not create the font +// here, but we may check that font definition is true // ---------------------------------------------------------------------------- bool wxFont::RealizeResource() @@ -196,7 +199,24 @@ bool wxFont::RealizeResource() return TRUE; } - int ff_family = 0; + HPS hps; + FATTRS fAttrs; + FACENAMEDESC fName; + LONG fLid; + + fAttrs.usRecordLength = sizeof(FATTRS); + fAttrs.fsFontUse = FATTR_FONTUSE_OUTLINE | // only outline fonts allowed + FATTR_FONTUSE_TRANSFORMABLE; // may be transformed + fAttrs.fsType = 0; + fAttrs.lMaxBaselineExt = fAttrs.lAveCharWidth = 0; + fAttrs.idRegistry = 0; + fAttrs.lMatch = 0; + + fName.usSize = sizeof(FACENAMEDESC); + fName.usWidthClass = FWIDTH_NORMAL; + fName.usReserved = 0; + fName.flOptions = 0; + wxString ff_face; // OS/2 combines the family with styles to give a facename @@ -204,42 +224,27 @@ bool wxFont::RealizeResource() switch ( M_FONTDATA->m_family ) { case wxSCRIPT: -// ff_family = FF_SCRIPT ; - ff_face = wxT("Script") ; - break ; - case wxDECORATIVE: -// ff_family = FF_DECORATIVE; - break; - case wxROMAN: -// ff_family = FF_ROMAN; ff_face = wxT("Times New Roman") ; break; case wxTELETYPE: case wxMODERN: -// ff_family = FF_MODERN; - ff_face = wxT("Courier New") ; + ff_face = wxT("Courier") ; break; case wxSWISS: -// ff_family = FF_SWISS; - ff_face = wxT("Arial") ; - break; - case wxDEFAULT: default: -// ff_family = FF_SWISS; - ff_face = wxT("Arial") ; + ff_face = wxT("Helvetica") ; } - BYTE ff_italic; switch ( M_FONTDATA->m_style ) { case wxITALIC: case wxSLANT: - ff_italic = 1; + fAttrs.fsSelection = FATTR_SEL_ITALIC; break; default: @@ -247,10 +252,9 @@ bool wxFont::RealizeResource() // fall through case wxNORMAL: - ff_italic = 0; + fAttrs.fsSelection = 0; } - int ff_weight = 0; switch ( M_FONTDATA->m_weight ) { default: @@ -258,68 +262,20 @@ bool wxFont::RealizeResource() // fall through case wxNORMAL: -// ff_weight = FW_NORMAL; + fName.usWeightClass = FWEIGHT_NORMAL; break; case wxLIGHT: -// ff_weight = FW_LIGHT; + fName.usWeightClass = FWEIGHT_LIGHT; break; case wxBOLD: -// ff_weight = FW_BOLD; + fName.usWeightClass = FWEIGHT_BOLD; break; } - - const wxChar* pzFace; - if ( M_FONTDATA->m_faceName.IsEmpty() ) - pzFace = ff_face; - else - pzFace = M_FONTDATA->m_faceName ; - -#if 0 - /* Always calculate fonts using the screen DC (is this the best strategy?) - * There may be confusion if a font is selected into a printer - * DC (say), because the height will be calculated very differently. - */ - // What sort of display is it? - int technology = ::GetDeviceCaps(dc, TECHNOLOGY); - - int nHeight; - - if (technology != DT_RASDISPLAY && technology != DT_RASPRINTER) - { - // Have to get screen DC Caps, because a metafile will return 0. - HDC dc2 = ::GetDC(NULL); - nHeight = M_FONTDATA->m_pointSize*GetDeviceCaps(dc2, LOGPIXELSY)/72; - ::ReleaseDC(NULL, dc2); - } - else - { - nHeight = M_FONTDATA->m_pointSize*GetDeviceCaps(dc, LOGPIXELSY)/72; - } -#endif // 0 - -#if 0 - // Have to get screen DC Caps, because a metafile will return 0. - HDC dc2 = ::GetDC(NULL); - ppInch = ::GetDeviceCaps(dc2, LOGPIXELSY); - ::ReleaseDC(NULL, dc2); -#endif // 0 - - // New behaviour: apparently ppInch varies according to Large/Small Fonts - // setting in Windows. This messes up fonts. So, set ppInch to a constant - // 96 dpi. - static const int ppInch = 96; - -#if wxFONT_SIZE_COMPATIBILITY - // Incorrect, but compatible with old wxWindows behaviour - int nHeight = (M_FONTDATA->m_pointSize*ppInch/72); -#else - // Correct for Windows compatibility - int nHeight = - (M_FONTDATA->m_pointSize*ppInch/72); -#endif - - BYTE ff_underline = M_FONTDATA->m_underlined; + + if( M_FONTDATA->m_underlined ) + fAttrs.fsSelection |= FATTR_SEL_UNDERSCORE; wxFontEncoding encoding = M_FONTDATA->m_encoding; if ( encoding == wxFONTENCODING_DEFAULT ) @@ -327,52 +283,51 @@ bool wxFont::RealizeResource() encoding = wxFont::GetDefaultEncoding(); } - DWORD charset; switch ( encoding ) { case wxFONTENCODING_ISO8859_1: case wxFONTENCODING_ISO8859_15: case wxFONTENCODING_CP1250: -// charset = ANSI_CHARSET; + fAttrs.usCodePage = 1250; break; case wxFONTENCODING_ISO8859_2: case wxFONTENCODING_CP1252: -// charset = EASTEUROPE_CHARSET; + fAttrs.usCodePage = 1252; break; case wxFONTENCODING_ISO8859_4: case wxFONTENCODING_ISO8859_10: -// charset = BALTIC_CHARSET; + fAttrs.usCodePage = 850; // what is baltic? break; case wxFONTENCODING_ISO8859_5: case wxFONTENCODING_CP1251: -// charset = RUSSIAN_CHARSET; + fAttrs.usCodePage = 1251; break; case wxFONTENCODING_ISO8859_6: -// charset = ARABIC_CHARSET; + fAttrs.usCodePage = 850; // what is arabic? break; case wxFONTENCODING_ISO8859_7: -// charset = GREEK_CHARSET; + fAttrs.usCodePage = 850; // what is greek break; case wxFONTENCODING_ISO8859_8: -// charset = HEBREW_CHARSET; + fAttrs.usCodePage = 850; // what is hebrew? break; case wxFONTENCODING_ISO8859_9: -// charset = TURKISH_CHARSET; + fAttrs.usCodePage = 857; break; case wxFONTENCODING_ISO8859_11: -// charset = THAI_CHARSET; + fAttrs.usCodePage = 850; // what is thai break; case wxFONTENCODING_CP437: -// charset = OEM_CHARSET; + fAttrs.usCodePage = 437; break; default: @@ -380,32 +335,58 @@ bool wxFont::RealizeResource() // fall through case wxFONTENCODING_SYSTEM: -// charset = ANSI_CHARSET; + fAttrs.usCodePage = 850; // what is ANSI? break; } -// TODO: -WXHFONT hFont = 0; -// HFONT hFont = ::CreateFont -// ( -// nHeight, // height -// 0, // width (choose best) -// 0, // escapement -// 0, // orientation -// ff_weight, // weight -// ff_italic, // italic? -// ff_underline, // underlined? -// 0, // strikeout? -// charset, // charset -// OUT_DEFAULT_PRECIS, // precision -// CLIP_DEFAULT_PRECIS, // clip precision -// PROOF_QUALITY, // quality of match -// DEFAULT_PITCH | // fixed or variable -// ff_family, // family id -// pzFace // face name -// ); +// Now cheking + fLid = 1; + hps = ::WinGetPS( HWND_DESKTOP ); + + long numLids = ::GpiQueryNumberSetIds( hps ); + long gpiError; + + // First we should generate unique id + if( numLids ) + { + long Types[255]; + STR8 Names[255]; + long lIds[255]; + + if( !GpiQuerySetIds(hps, numLids, Types, Names, lIds) ) + { + ::WinReleasePS( hps ); + return 0; + } + + for(unsigned long LCNum = 0; LCNum < numLids; LCNum++) + if(lIds[LCNum] == fLid) + ++fLid; + if(fLid > 254) // wow, no id available! + { + ::WinReleasePS( hps ); + return 0; + } + } + + // now building facestring + if(::GpiQueryFaceString(hps, ff_face.c_str(), &fName, FACESIZE, fAttrs.szFacename) == GPI_ERROR) + { + ::WinReleasePS( hps ); + return 0; + } + + // now creating font + WXHFONT hFont = (WXHFONT)0; + + if(::GpiCreateLogFont(hps, NULL, fLid, &fAttrs) != GPI_ERROR) + M_FONTDATA->m_hFont = hFont = (WXHFONT)1; + + if( hFont ) + ::GpiDeleteSetId(hps, fLid); + + ::WinReleasePS( hps ); - M_FONTDATA->m_hFont = (WXHFONT)hFont; if ( !hFont ) { wxLogLastError("CreateFont"); diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 18269f66d1..9de5fdf513 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -90,6 +90,20 @@ void wxFrame::Init() m_nFsToolBarHeight = 0; m_bFsIsMaximized = FALSE; m_bFsIsShowing = FALSE; + m_bIsShown = FALSE; + m_pWinLastFocused = (wxWindow *)NULL; + + // + // Initialize SWP's + // + memset(&m_vSwp, 0, sizeof(SWP)); + memset(&m_vSwpClient, 0, sizeof(SWP)); + memset(&m_vSwpTitleBar, 0, sizeof(SWP)); + memset(&m_vSwpMenuBar, 0, sizeof(SWP)); + memset(&m_vSwpHScroll, 0, sizeof(SWP)); + memset(&m_vSwpVScroll, 0, sizeof(SWP)); + memset(&m_vSwpStatusBar, 0, sizeof(SWP)); + memset(&m_vSwpToolBar, 0, sizeof(SWP)); } // end of wxFrame::Init bool wxFrame::Create( @@ -150,6 +164,7 @@ bool wxFrame::Create( wxFrame::~wxFrame() { m_isBeingDeleted = TRUE; + wxTopLevelWindows.DeleteObject(this); DeleteAllBars(); @@ -160,9 +175,10 @@ wxFrame::~wxFrame() if (wxTheApp->GetExitOnFrameDelete()) { - ::WinPostMsg(GetHwnd(), WM_QUIT, 0, 0); + ::WinPostMsg(NULL, WM_QUIT, 0, 0); } } + wxModelessWindows.DeleteObject(this); // @@ -202,14 +218,12 @@ void wxFrame::DoGetClientSize( // top-left thus the += instead of the -= // RECTL vRect; - HWND hWndClient; // // PM has no GetClientRect that inherantly knows about the client window // We have to explicitly go fetch it! // - hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT); - ::WinQueryWindowRect(hWndClient, &vRect); + ::WinQueryWindowRect(GetHwnd(), &vRect); #if wxUSE_STATUSBAR if ( GetStatusBar() ) @@ -245,14 +259,12 @@ void wxFrame::DoSetClientSize( ) { HWND hWnd = GetHwnd(); - HWND hWndClient; RECTL vRect; RECTL vRect2; - hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT); - ::WinQueryWindowRect(hWndClient, &vRect); + ::WinQueryWindowRect(GetHwnd(), &vRect); - ::WinQueryWindowRect(hWnd, &vRect2); + ::WinQueryWindowRect(GetHWND(), &vRect2); // // Find the difference between the entire window (title bar and all) @@ -282,7 +294,7 @@ void wxFrame::DoSetClientSize( POINTL vPointl; vPointl.x = vRect2.xLeft; - vPoint.y = vRect2.yTop; + vPointl.y = vRect2.yTop; ::WinSetWindowPos( hWnd ,HWND_TOP @@ -309,7 +321,7 @@ void wxFrame::DoGetSize( { RECTL vRect; - ::WinQueryWindowRect(GetHwnd(), &vRect); + ::WinQueryWindowRect(GetHWND(), &vRect); *pWidth = vRect.xRight - vRect.xLeft; *pHeight = vRect.yTop - vRect.yBottom; } // end of wxFrame::DoGetSize @@ -322,7 +334,7 @@ void wxFrame::DoGetPosition( RECTL vRect; POINTL vPoint; - ::WinQueryWindowRect(GetHwnd(), &vRect); + ::WinQueryWindowRect(GetHWND(), &vRect); vPoint.x = vRect.xLeft; // @@ -342,24 +354,8 @@ void wxFrame::DoShowWindow( int bShowCmd ) { - HWND hClient = NULLHANDLE; - SWP vSwp; - - // - // Reset the window position - // - hClient = WinWindowFromID(GetHwnd(), FID_CLIENT); - WinQueryWindowPos(GetHwnd(), &vSwp); - WinSetWindowPos( GetHwnd() - ,HWND_TOP - ,vSwp.x - ,vSwp.y - ,vSwp.cx - ,vSwp.cy - ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE - ); - ::WinShowWindow(GetHwnd(), (BOOL)bShowCmd); - ::WinShowWindow(hClient, (BOOL)bShowCmd); + ::WinShowWindow(GetHWND(), (BOOL)bShowCmd); + m_bIconized = bShowCmd == SWP_MINIMIZE; } // end of wxFrame::DoShowWindow bool wxFrame::Show( @@ -374,9 +370,10 @@ bool wxFrame::Show( { wxActivateEvent vEvent(wxEVT_ACTIVATE, TRUE, m_windowId); - ::WinQueryWindowPos(GetHwnd(), &vSwp); + ::WinQueryWindowPos(GetHWND(), &vSwp); m_bIconized = vSwp.fl & SWP_MINIMIZE; - ::WinEnableWindow(GetHwnd(), TRUE); + ::WinSendMsg(GetHWND(), WM_UPDATEFRAME, (MPARAM)~0, 0); + ::WinEnableWindow(GetHWND(), TRUE); vEvent.SetEventObject(this); GetEventHandler()->ProcessEvent(vEvent); } @@ -427,7 +424,6 @@ void wxFrame::Restore() bool wxFrame::IsIconized() const { SWP vSwp; - bool bIconic; ::WinQueryWindowPos(GetHwnd(), &vSwp); @@ -444,7 +440,7 @@ bool wxFrame::IsMaximized() const SWP vSwp; bool bIconic; - ::WinQueryWindowPos(GetHwnd(), &vSwp); + ::WinQueryWindowPos(GetHWND(), &vSwp); return (vSwp.fl & SWP_MAXIMIZE); } // end of wxFrame::IsMaximized @@ -456,12 +452,12 @@ void wxFrame::SetIcon( if ((m_icon.GetHICON()) != NULLHANDLE) { - ::WinSendMsg( GetHwnd() + ::WinSendMsg( GetHWND() ,WM_SETICON ,(MPARAM)((HPOINTER)m_icon.GetHICON()) ,NULL ); - ::WinSendMsg( GetHwnd() + ::WinSendMsg( GetHWND() ,WM_UPDATEFRAME ,(MPARAM)FCF_ICON ,(MPARAM)0 @@ -478,17 +474,34 @@ wxStatusBar* wxFrame::OnCreateStatusBar( ) { wxStatusBar* pStatusBar = NULL; + SWP vSwp; + ERRORID vError; + wxString sError; pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber ,lulStyle ,vId ,rName - ); + ); + + if( !pStatusBar ) + return NULL; + + // + // to show statusbar + // + if( ::WinIsWindowShowing(GetHWND()) ) + ::WinSendMsg(GetHWND(), WM_UPDATEFRAME, (MPARAM)~0, 0); + return pStatusBar; } // end of wxFrame::OnCreateStatusBar void wxFrame::PositionStatusBar() { + SWP vSwp; + ERRORID vError; + wxString sError; + // // Native status bar positions itself // @@ -501,8 +514,7 @@ void wxFrame::PositionStatusBar() HWND hWndClient; RECTL vRect; - hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT); - ::WinQueryWindowRect(hWndClient, &vRect); + ::WinQueryWindowRect(GetHwnd(), &vRect); nWidth = vRect.xRight - vRect.xLeft; nHeight = vRect.yTop - vRect.yBottom; @@ -519,6 +531,27 @@ void wxFrame::PositionStatusBar() ,nWidth ,nStatbarHeight ); + if (!::WinQueryWindowPos(m_frameStatusBar->GetHWND(), &vSwp)) + { + vError = ::WinGetLastError(vHabmain); + sError = wxPMErrorToStr(vError); + wxLogError("Error setting parent for submenu. Error: %s\n", sError); + return; + } + if (!::WinSetWindowPos( m_frameStatusBar->GetHWND() + ,HWND_TOP + ,vSwp.x + ,vSwp.y + ,nStatbarWidth + ,nStatbarHeight + ,SWP_SIZE | SWP_MOVE | SWP_SHOW | SWP_ZORDER + )) + { + vError = ::WinGetLastError(vHabmain); + sError = wxPMErrorToStr(vError); + wxLogError("Error setting parent for submenu. Error: %s\n", sError); + return; + } } } // end of wxFrame::PositionStatusBar #endif // wxUSE_STATUSBAR @@ -553,64 +586,52 @@ void wxFrame::SetMenuBar( if (!pMenuBar) { DetachMenuBar(); - return; + + // + // Actually remove the menu from the frame + // + m_hMenu = (WXHMENU)0; + InternalSetMenuBar(); } - - m_frameMenuBar = NULL; - - // Can set a menubar several times. - // TODO: how to prevent a memory leak if you have a currently-unattached - // menubar? wxWindows assumes that the frame will delete the menu (otherwise - // there are problems for MDI). - if (pMenuBar->GetHMenu()) + else // set new non NULL menu bar { - m_hMenu = pMenuBar->GetHMenu(); + m_frameMenuBar = NULL; + + // + // Can set a menubar several times. + // TODO: how to prevent a memory leak if you have a currently-unattached + // menubar? wxWindows assumes that the frame will delete the menu (otherwise + // there are problems for MDI). + // + if (pMenuBar->GetHMenu()) + { + m_hMenu = pMenuBar->GetHMenu(); + } + else + { + pMenuBar->Detach(); + m_hMenu = pMenuBar->Create(); + if (!m_hMenu) + return; + } + InternalSetMenuBar(); + m_frameMenuBar = pMenuBar; + pMenuBar->Attach(this); } - else - { - pMenuBar->Detach(); - - m_hMenu = pMenuBar->Create(); - - if (!m_hMenu) - return; - } - - // - // Set the parent and owner of the menubar to be the frame - // - if (!::WinSetParent(m_hMenu, GetHwnd(), FALSE)) - { - vError = ::WinGetLastError(vHabmain); - sError = wxPMErrorToStr(vError); - wxLogError("Error setting parent for submenu. Error: %s\n", sError); - } - - if (!::WinSetOwner(m_hMenu, GetHwnd())) - { - vError = ::WinGetLastError(vHabmain); - sError = wxPMErrorToStr(vError); - wxLogError("Error setting parent for submenu. Error: %s\n", sError); - } - InternalSetMenuBar(); - - m_frameMenuBar = pMenuBar; - pMenuBar->Attach(this); // // Now resize the client to fit the new frame // - WinQueryWindowPos(GetHwnd(), &vSwp); - hClient = WinWindowFromID(GetHwnd(), FID_CLIENT); - hTitlebar = WinWindowFromID(GetHwnd(), FID_TITLEBAR); + WinQueryWindowPos(GetHWND(), &vSwp); + hTitlebar = WinWindowFromID(GetHWND(), FID_TITLEBAR); WinQueryWindowPos(hTitlebar, &vSwpTitlebar); - hHScroll = WinWindowFromID(GetHwnd(), FID_HORZSCROLL); + hHScroll = WinWindowFromID(GetHWND(), FID_HORZSCROLL); WinQueryWindowPos(hHScroll, &vSwpHScroll); - hVScroll = WinWindowFromID(GetHwnd(), FID_VERTSCROLL); + hVScroll = WinWindowFromID(GetHWND(), FID_VERTSCROLL); WinQueryWindowPos(hVScroll, &vSwpVScroll); - hMenuBar = WinWindowFromID(GetHwnd(), FID_MENU); + hMenuBar = WinWindowFromID(GetHWND(), FID_MENU); WinQueryWindowPos(hMenuBar, &vSwpMenu); - WinSetWindowPos( hClient + WinSetWindowPos( GetHwnd() ,HWND_TOP ,SV_CXSIZEBORDER/2 ,(SV_CYSIZEBORDER/2) + vSwpHScroll.cy/2 @@ -622,7 +643,25 @@ void wxFrame::SetMenuBar( void wxFrame::InternalSetMenuBar() { - WinSendMsg((HWND)GetHwnd(), WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0); + ERRORID vError; + wxString sError; + // + // Set the parent and owner of the menubar to be the frame + // + if (!::WinSetParent(m_hMenu, GetHWND(), FALSE)) + { + vError = ::WinGetLastError(vHabmain); + sError = wxPMErrorToStr(vError); + wxLogError("Error setting parent for submenu. Error: %s\n", sError); + } + + if (!::WinSetOwner(m_hMenu, GetHWND())) + { + vError = ::WinGetLastError(vHabmain); + sError = wxPMErrorToStr(vError); + wxLogError("Error setting parent for submenu. Error: %s\n", sError); + } + WinSendMsg((HWND)GetHWND(), WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0); } // end of wxFrame::InternalSetMenuBar // @@ -655,86 +694,122 @@ bool wxFrame::ShowFullScreen( , long lStyle ) { - /* - // TODO - if (show) + if (bShow) { if (IsFullScreen()) return FALSE; - m_fsIsShowing = TRUE; - m_fsStyle = style; + m_bFsIsShowing = TRUE; + m_lFsStyle = lStyle; - wxToolBar *theToolBar = GetToolBar(); - wxStatusBar *theStatusBar = GetStatusBar(); + wxToolBar* pTheToolBar = GetToolBar(); + wxStatusBar* pTheStatusBar = GetStatusBar(); - int dummyWidth; + int nDummyWidth; - if (theToolBar) - theToolBar->GetSize(&dummyWidth, &m_fsToolBarHeight); - if (theStatusBar) - theStatusBar->GetSize(&dummyWidth, &m_fsStatusBarHeight); + if (pTheToolBar) + pTheToolBar->GetSize(&nDummyWidth, &m_nFsToolBarHeight); + if (pTheStatusBar) + pTheStatusBar->GetSize(&nDummyWidth, &m_nFsStatusBarHeight); - // zap the toolbar, menubar, and statusbar - - if ((style & wxFULLSCREEN_NOTOOLBAR) && theToolBar) + // + // Zap the toolbar, menubar, and statusbar + // + if ((lStyle & wxFULLSCREEN_NOTOOLBAR) && pTheToolBar) { - theToolBar->SetSize(-1,0); - theToolBar->Show(FALSE); + pTheToolBar->SetSize(-1,0); + pTheToolBar->Show(FALSE); } - if (style & wxFULLSCREEN_NOMENUBAR) - SetMenu((HWND)GetHWND(), (HMENU) NULL); - - // Save the number of fields in the statusbar - if ((style & wxFULLSCREEN_NOSTATUSBAR) && theStatusBar) + if (lStyle & wxFULLSCREEN_NOMENUBAR) { - m_fsStatusBarFields = theStatusBar->GetFieldsCount(); + ::WinSetParent(m_hMenu, GetHWND(), FALSE); + ::WinSetOwner(m_hMenu, GetHWND()); + ::WinSendMsg((HWND)GetHWND(), WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0); + } + + // + // Save the number of fields in the statusbar + // + if ((lStyle & wxFULLSCREEN_NOSTATUSBAR) && pTheStatusBar) + { + m_nFsStatusBarFields = pTheStatusBar->GetFieldsCount(); SetStatusBar((wxStatusBar*) NULL); - delete theStatusBar; + delete pTheStatusBar; } else - m_fsStatusBarFields = 0; + m_nFsStatusBarFields = 0; - // zap the frame borders + // + // Zap the frame borders + // - // save the 'normal' window style - m_fsOldWindowStyle = GetWindowLong((HWND)GetHWND(), GWL_STYLE); + // + // Save the 'normal' window style + // + m_lFsOldWindowStyle = ::WinQueryWindowULong((HWND)GetHWND(), QWL_STYLE); - // save the old position, width & height, maximize state - m_fsOldSize = GetRect(); - m_fsIsMaximized = IsMaximized(); + // + // Save the old position, width & height, maximize state + // + m_vFsOldSize = GetRect(); + m_bFsIsMaximized = IsMaximized(); - // decide which window style flags to turn off - LONG newStyle = m_fsOldWindowStyle; - LONG offFlags = 0; + // + // Decide which window style flags to turn off + // + LONG lNewStyle = m_lFsOldWindowStyle; + LONG lOffFlags = 0; - if (style & wxFULLSCREEN_NOBORDER) - offFlags |= WS_BORDER; - if (style & wxFULLSCREEN_NOCAPTION) - offFlags |= (WS_CAPTION | WS_SYSMENU); + if (lStyle & wxFULLSCREEN_NOBORDER) + lOffFlags |= FCF_BORDER; + if (lStyle & wxFULLSCREEN_NOCAPTION) + lOffFlags |= (FCF_TASKLIST | FCF_SYSMENU); - newStyle &= (~offFlags); + lNewStyle &= (~lOffFlags); - // change our window style to be compatible with full-screen mode - SetWindowLong((HWND)GetHWND(), GWL_STYLE, newStyle); + // + // Change our window style to be compatible with full-screen mode + // + ::WinSetWindowULong((HWND)GetHWND(), QWL_STYLE, (ULONG)lNewStyle); - // resize to the size of the desktop - int width, height; + // + // Resize to the size of the desktop + int nWidth; + int nHeight; - RECT rect; - ::GetWindowRect(GetDesktopWindow(), &rect); - width = rect.right - rect.left; - height = rect.bottom - rect.top; + RECTL vRect; - SetSize(width, height); + ::WinQueryWindowRect(HWND_DESKTOP, &vRect); + nWidth = vRect.xRight - vRect.xLeft; + // + // Rmember OS/2 is backwards! + // + nHeight = vRect.yTop - vRect.yBottom; - // now flush the window style cache and actually go full-screen - SetWindowPos((HWND)GetHWND(), HWND_TOP, 0, 0, width, height, SWP_FRAMECHANGED); + SetSize( nWidth + ,nHeight + ); - wxSizeEvent event(wxSize(width, height), GetId()); - GetEventHandler()->ProcessEvent(event); + // + // Now flush the window style cache and actually go full-screen + // + ::WinSetWindowPos( (HWND) GetParent()->GetHWND() + ,HWND_TOP + ,0 + ,0 + ,nWidth + ,nHeight + ,SWP_SIZE | SWP_SHOW + ); + wxSizeEvent vEvent( wxSize( nWidth + ,nHeight + ) + ,GetId() + ); + + GetEventHandler()->ProcessEvent(vEvent); return TRUE; } else @@ -742,35 +817,47 @@ bool wxFrame::ShowFullScreen( if (!IsFullScreen()) return FALSE; - m_fsIsShowing = FALSE; + m_bFsIsShowing = FALSE; - wxToolBar *theToolBar = GetToolBar(); + wxToolBar* pTheToolBar = GetToolBar(); - // restore the toolbar, menubar, and statusbar - if (theToolBar && (m_fsStyle & wxFULLSCREEN_NOTOOLBAR)) + // + // Restore the toolbar, menubar, and statusbar + // + if (pTheToolBar && (m_lFsStyle & wxFULLSCREEN_NOTOOLBAR)) { - theToolBar->SetSize(-1, m_fsToolBarHeight); - theToolBar->Show(TRUE); + pTheToolBar->SetSize(-1, m_nFsToolBarHeight); + pTheToolBar->Show(TRUE); } - if ((m_fsStyle & wxFULLSCREEN_NOSTATUSBAR) && (m_fsStatusBarFields > 0)) + if ((m_lFsStyle & wxFULLSCREEN_NOSTATUSBAR) && (m_nFsStatusBarFields > 0)) { - CreateStatusBar(m_fsStatusBarFields); - PositionStatusBar(); + CreateStatusBar(m_nFsStatusBarFields); +// PositionStatusBar(); } - if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && (m_hMenu != 0)) - SetMenu((HWND)GetHWND(), (HMENU)m_hMenu); - - Maximize(m_fsIsMaximized); - SetWindowLong((HWND)GetHWND(),GWL_STYLE, m_fsOldWindowStyle); - SetWindowPos((HWND)GetHWND(),HWND_TOP,m_fsOldSize.x, m_fsOldSize.y, - m_fsOldSize.width, m_fsOldSize.height, SWP_FRAMECHANGED); + if ((m_lFsStyle & wxFULLSCREEN_NOMENUBAR) && (m_hMenu != 0)) + { + ::WinSetParent(m_hMenu, GetHWND(), FALSE); + ::WinSetOwner(m_hMenu, GetHWND()); + ::WinSendMsg((HWND)GetHWND(), WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0); + } + Maximize(m_bFsIsMaximized); + ::WinSetWindowULong( (HWND)GetHWND() + ,QWL_STYLE + ,(ULONG)m_lFsOldWindowStyle + ); + ::WinSetWindowPos( (HWND) GetParent()->GetHWND() + ,HWND_TOP + ,m_vFsOldSize.x + ,m_vFsOldSize.y + ,m_vFsOldSize.width + ,m_vFsOldSize.height + ,SWP_SIZE | SWP_SHOW + ); return TRUE; } -*/ - return TRUE; } // end of wxFrame::ShowFullScreen // @@ -799,10 +886,9 @@ bool wxFrame::OS2Create( HWND hTitlebar = NULLHANDLE; HWND hHScroll = NULLHANDLE; HWND hVScroll = NULLHANDLE; - SWP vSwp; - SWP vSwpTitlebar; - SWP vSwpVScroll; - SWP vSwpHScroll; + SWP vSwp[10]; + RECTL vRect[10]; + USHORT uCtlCount; m_hDefaultIcon = (WXHICON) (wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON : wxDEFAULT_FRAME_ICON); @@ -813,7 +899,7 @@ bool wxFrame::OS2Create( if (ulStyle == wxDEFAULT_FRAME_STYLE) ulCreateFlags = FCF_SIZEBORDER | FCF_TITLEBAR | FCF_SYSMENU | - FCF_MINMAX | FCF_VERTSCROLL | FCF_HORZSCROLL | FCF_TASKLIST; + FCF_MINMAX | FCF_TASKLIST; else { if ((ulStyle & wxCAPTION) == wxCAPTION) @@ -821,6 +907,10 @@ bool wxFrame::OS2Create( else ulCreateFlags = FCF_NOMOVEWITHOWNER; + if ((ulStyle & wxVSCROLL) == wxVSCROLL) + ulCreateFlags |= FCF_VERTSCROLL; + if ((ulStyle & wxHSCROLL) == wxHSCROLL) + ulCreateFlags |= FCF_HORZSCROLL; if (ulStyle & wxMINIMIZE_BOX) ulCreateFlags |= FCF_MINBUTTON; if (ulStyle & wxMAXIMIZE_BOX) @@ -871,95 +961,56 @@ bool wxFrame::OS2Create( // // Create the frame window // + if (!wxWindow::OS2Create( hParent ,WC_FRAME - ,zTitle - ,ulStyleFlags - ,(long)nX - ,(long)nY - ,(long)nWidth - ,(long)nHeight + ,(PSZ)zTitle + ,0 + ,0, 0, 0, 0 ,NULLHANDLE ,HWND_TOP - ,(long)nId - ,(void*)&vFrameCtlData + ,(ULONG)nId + ,(PVOID)&vFrameCtlData ,NULL )) { return FALSE; } - hFrame = GetHwnd(); - - // - // Since under PM the controling window proc is associated with the client window handle - // not the frame's we have to perform the hook here in order to associated the client handle, - // not the frame's with the window object ! + // + // Now need to subclass window. // - wxWndHook = this; - // - // Create the client window. We must call the API from here rather than - // the static base class create because we need a separate handle - // - if ((hClient = ::WinCreateWindow( hFrame // Frame is parent - ,wxFrameClassName - ,NULL // Window title - ,0 // No styles - ,0, 0, 0, 0 // Window position - ,NULLHANDLE // Owner - ,HWND_TOP // Sibling - ,FID_CLIENT // standard client ID - ,NULL // Creation data - ,NULL // Window Pres Params - )) == 0L) - { - return FALSE; - } - - wxWndHook = NULL; - // - // Send anything to initialize the frame - // - ::WinSendMsg( hFrame - ,WM_UPDATEFRAME - ,(MPARAM)FCF_TASKLIST - ,(MPARAM)0 - ); + //SubclassWin(GetHWND()); +// ::WinCreateWindow(GetHWND(), WC_LISTBOX, "", WS_VISIBLE, 0, 0, +// 0, 0, GetHWND(), HWND_TOP, FID_CLIENT, NULL, NULL); // // Now size everything. If adding a menu the client will need to be resized. // - if (!::WinSetWindowPos( hFrame + + if (!::WinSetWindowPos( GetHWND() ,HWND_TOP ,nX ,nY ,nWidth ,nHeight - ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE + ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE | SWP_ZORDER )) return FALSE; - - WinQueryWindowPos(GetHwnd(), &vSwp); - hClient = WinWindowFromID(GetHwnd(), FID_CLIENT); - hTitlebar = WinWindowFromID(GetHwnd(), FID_TITLEBAR); - WinQueryWindowPos(hTitlebar, &vSwpTitlebar); - hHScroll = WinWindowFromID(GetHwnd(), FID_HORZSCROLL); - WinQueryWindowPos(hHScroll, &vSwpHScroll); - hVScroll = WinWindowFromID(GetHwnd(), FID_VERTSCROLL); - WinQueryWindowPos(hVScroll, &vSwpVScroll); - WinSetWindowPos( hClient - ,HWND_TOP - ,SV_CXSIZEBORDER/2 - ,(SV_CYSIZEBORDER/2) + vSwpHScroll.cy/2 - ,vSwp.cx - ((SV_CXSIZEBORDER + 1) + vSwpVScroll.cx) - ,vSwp.cy - ((SV_CYSIZEBORDER + 1) + vSwpTitlebar.cy + vSwpHScroll.cy/2) - ,SWP_SIZE | SWP_MOVE - ); - - // - // Set the client window's background, otherwise it is transparent! - // +/* + uCtlCount = SHORT1FROMMP(::WinSendMsg(GetHWND(), WM_FORMATFRAME, (MPARAM)vSwp, (MPARAM)vRect)); + for (int i = 0; i < uCtlCount; i++) + { + if (vSwp[i].hwnd == GetHWND()) + memcpy(&m_vSwp, &vSwp[i], sizeof(SWP)); + else if (vSwp[i].hwnd == m_hVScroll) + memcpy(&m_vSwpVScroll, &vSwp[i], sizeof(SWP)); + else if (vSwp[i].hwnd == m_hHScroll) + memcpy(&m_vSwpVScroll, &vSwp[i], sizeof(SWP)); + else if (vSwp[i].hwnd == m_hTitleBar) + memcpy(&m_vSwpTitleBar, &vSwp[i], sizeof(SWP)); + }*/ return TRUE; } // end of wxFrame::OS2Create @@ -1056,8 +1107,7 @@ void wxFrame::PositionToolBar() HWND hWndClient; RECTL vRect; - hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT); - ::WinQueryWindowRect(hWndClient, &vRect); + ::WinQueryWindowRect(GetHwnd(), &vRect); #if wxUSE_STATUSBAR if (GetStatusBar()) @@ -1141,8 +1191,6 @@ bool wxFrame::OS2TranslateMessage( WXMSG* pMsg ) { - if (wxWindow::OS2TranslateMessage(pMsg)) - return TRUE; // // try the menu bar accels // @@ -1152,7 +1200,7 @@ bool wxFrame::OS2TranslateMessage( return FALSE; const wxAcceleratorTable& rAcceleratorTable = pMenuBar->GetAccelTable(); - return rAcceleratorTable.Translate(this, pMsg); + return rAcceleratorTable.Translate(GetHWND(), pMsg); } // end of wxFrame::OS2TranslateMessage // --------------------------------------------------------------------------- @@ -1162,7 +1210,7 @@ bool wxFrame::HandlePaint() { RECTL vRect; - if (::WinQueryUpdateRect(GetHwnd(), &vRect)) + if (::WinQueryUpdateRect(GetHWND(), &vRect)) { if (m_bIconized) { @@ -1172,7 +1220,7 @@ bool wxFrame::HandlePaint() HPOINTER hIcon; if (m_icon.Ok()) - hIcon = (HPOINTER)::WinSendMsg(GetHwnd(), WM_QUERYICON, 0L, 0L); + hIcon = (HPOINTER)::WinSendMsg(GetHWND(), WM_QUERYICON, 0L, 0L); else hIcon = (HPOINTER)m_hDefaultIcon; @@ -1193,8 +1241,7 @@ bool wxFrame::HandlePaint() HWND hWndClient; RECTL vRect3; - hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT); - ::WinQueryWindowRect(hWndClient, &vRect3); + ::WinQueryWindowRect(GetHwnd(), &vRect3); static const int nIconWidth = 32; static const int nIconHeight = 32; @@ -1208,6 +1255,14 @@ bool wxFrame::HandlePaint() } else { +/* DosBeep(500,500); + HPS hPS; + RECTL vRect; + + hPS = WinBeginPaint(GetHwnd(), 0L, &vRect); + WinFillRect(hPS, &vRect, SYSCLR_WINDOW); + WinEndPaint(hPS);*/ + return wxWindow::HandlePaint(); } } @@ -1278,7 +1333,7 @@ bool wxFrame::HandleSize( } #endif // wxUSE_NATIVE_STATUSBAR - PositionStatusBar(); +// PositionStatusBar(); PositionToolBar(); wxSizeEvent vEvent( wxSize( nX ,nY @@ -1314,7 +1369,7 @@ bool wxFrame::HandleCommand( // // Handle here commands from menus and accelerators // - if (nCmd == 0 || nCmd == 1) + if (nCmd == CMDSRC_MENU || nCmd == CMDSRC_ACCELERATOR) { if (wxCurrentPopupMenu) { @@ -1341,8 +1396,9 @@ bool wxFrame::HandleMenuSelect( , WXHMENU hMenu ) { - int nMenuItem; +// int nMenuItem; +/* This is wrong section according to IBM's documentation if (nFlags == 0xFFFF && hMenu == 0) { // @@ -1362,10 +1418,24 @@ bool wxFrame::HandleMenuSelect( // return FALSE; } - wxMenuEvent vEvent(wxEVT_MENU_HIGHLIGHT, nMenuItem); +*/ - vEvent.SetEventObject(this); - return GetEventHandler()->ProcessEvent(vEvent); + if( !nFlags ) + { + MENUITEM mItem; + MRESULT rc; + + rc = WinSendMsg(hMenu, MM_QUERYITEM, MPFROM2SHORT(nItem, TRUE), (MPARAM)&mItem); + + if(rc && !(mItem.afStyle & (MIS_SUBMENU | MIS_SEPARATOR))) + { + wxMenuEvent vEvent(wxEVT_MENU_HIGHLIGHT, nItem); + + vEvent.SetEventObject(this); + GetEventHandler()->ProcessEvent(vEvent); // return value would be ignored by PM + } + } + return TRUE; } // end of wxFrame::HandleMenuSelect // --------------------------------------------------------------------------- @@ -1398,11 +1468,12 @@ MRESULT wxFrame::OS2WindowProc( WXHWND hWnd; UnpackCommand( (WXWPARAM)wParam - ,(WXLPARAM)lParam - ,&wId - ,&hWnd - ,&wCmd - ); + ,(WXLPARAM)lParam + ,&wId + ,&hWnd + ,&wCmd + ); + bProcessed = HandleCommand( wId ,wCmd ,(WXHWND)hWnd @@ -1426,6 +1497,7 @@ MRESULT wxFrame::OS2WindowProc( ,wFlags ,hMenu ); + mRc = (MRESULT)TRUE; } break; @@ -1433,12 +1505,21 @@ MRESULT wxFrame::OS2WindowProc( bProcessed = HandlePaint(); break; + case WM_ERASEBACKGROUND: + // + // Return TRUE to request PM to paint the window background + // in SYSCLR_WINDOW. + // + bProcessed = TRUE; + mRc = (MRESULT)(TRUE); + break; + case CM_QUERYDRAGIMAGE: { HPOINTER hIcon; if (m_icon.Ok()) - hIcon = (HPOINTER)::WinSendMsg(GetHwnd(), WM_QUERYICON, 0L, 0L); + hIcon = (HPOINTER)::WinSendMsg(GetHWND(), WM_QUERYICON, 0L, 0L); else hIcon = (HPOINTER)m_hDefaultIcon; mRc = (MRESULT)hIcon; @@ -1449,6 +1530,81 @@ MRESULT wxFrame::OS2WindowProc( case WM_SIZE: bProcessed = HandleSize(LOWORD(lParam), HIWORD(lParam), (WXUINT)wParam); break; + + case WM_QUERYFRAMECTLCOUNT: + { + USHORT itemCount = SHORT1FROMMR(OS2GetOldWndProc()(GetHWND(), uMessage, wParam, lParam)); + if(m_frameStatusBar) + ++itemCount; + bProcessed = TRUE; + mRc = MRFROMSHORT( itemCount ); + } + break; + + case WM_FORMATFRAME: + { + PSWP pSWP = 0; + USHORT usClient = 0; + SWP swp; + USHORT itemCount; + char s[128]; + + itemCount = SHORT1FROMMR(OS2GetOldWndProc()(GetHWND(), uMessage, wParam, lParam)); + pSWP = (PSWP)PVOIDFROMMP( wParam ); + + while(pSWP[usClient].hwnd != WinWindowFromID(GetHWND(), FID_CLIENT) + && usClient < itemCount) + usClient++; + + if(m_frameStatusBar) + { + int height; + + m_frameStatusBar->GetSize(NULL, &height); + + if(usClient == itemCount) + { + // frame has no client window + // using another method of calculation + RECTL wRectl; + + ::WinQueryWindowRect(GetHWND(), &wRectl); + ::WinMapWindowPoints(GetHWND(), HWND_DESKTOP, (PPOINTL)&wRectl, 2); + ::WinCalcFrameRect(GetHWND(), &wRectl, TRUE); + ::WinMapWindowPoints(HWND_DESKTOP, GetHWND(), (PPOINTL)&wRectl, 2); + + pSWP[itemCount].x = wRectl.xLeft; + pSWP[itemCount].y = wRectl.yBottom; + pSWP[itemCount].cx = wRectl.xRight - wRectl.xLeft - 1; + pSWP[itemCount].cy = height; + pSWP[itemCount].fl = SWP_SIZE | + SWP_MOVE | + SWP_SHOW; + pSWP[itemCount].hwnd = m_frameStatusBar->GetHWND(); + pSWP[itemCount].hwndInsertBehind = HWND_TOP; + ++itemCount; + } + else + { + pSWP[itemCount].x = pSWP[usClient].x; + pSWP[itemCount].y = pSWP[usClient].y; + pSWP[itemCount].cx = pSWP[usClient].cx; + pSWP[itemCount].cy = height; + pSWP[itemCount].fl = SWP_SIZE | + SWP_MOVE | + SWP_SHOW; + pSWP[itemCount].hwnd = m_frameStatusBar->GetHWND(); + pSWP[itemCount].hwndInsertBehind = HWND_TOP; + pSWP[usClient].cy -= height; + pSWP[usClient].y += height; + + ++itemCount; + } + } + bProcessed = TRUE; + mRc = MRFROMSHORT(itemCount); + } + break; } if (!bProcessed ) @@ -1456,6 +1612,66 @@ MRESULT wxFrame::OS2WindowProc( ,wParam ,lParam ); - return (MRESULT)0; + return (MRESULT)mRc; } // wxFrame::OS2WindowProc + +void wxFrame::SetClient(WXHWND c_Hwnd) +{ + // Are we really need to implement it? +} + +void wxFrame::SetClient(wxWindow* c_Window) +{ + wxWindow *oldClient = this->GetClient(); + bool clientHasFocus = oldClient && (oldClient == wxWindow::FindFocus()); + + if(oldClient == c_Window) // nothing to do + return; + + if(c_Window == NULL) // just need to remove old client + { + if(oldClient == NULL) // nothing to do + return; + + if( clientHasFocus ) + this->SetFocus(); + + oldClient->Enable( FALSE ); + oldClient->Show( FALSE ); + ::WinSetWindowUShort(oldClient->GetHWND(), QWS_ID, (USHORT)oldClient->GetId()); + // to avoid OS/2 bug need to update frame + ::WinSendMsg((HWND)this->GetHWND(), WM_UPDATEFRAME, (MPARAM)~0, 0); + return; + } + + // else need to change client + if( clientHasFocus ) + this->SetFocus(); + + ::WinEnableWindowUpdate((HWND)GetHWND(), FALSE); + if( oldClient ) + { + oldClient->Enable( FALSE ); + oldClient->Show( FALSE ); + ::WinSetWindowUShort(oldClient->GetHWND(), QWS_ID, (USHORT)oldClient->GetId()); + } + + c_Window->Reparent( this ); + ::WinSetWindowUShort(c_Window->GetHWND(), QWS_ID, FID_CLIENT); + + ::WinEnableWindowUpdate((HWND)GetHWND(), TRUE); + c_Window->Enable(); + c_Window->Show(); // ensure client is showing + + if( this->IsShown() ) + { + this->Show(); + ::WinSendMsg(GetHWND(), WM_UPDATEFRAME, (MPARAM)~0, 0); + } +} + +wxWindow *wxFrame::GetClient() +{ + return wxFindWinFromHandle((WXHWND)::WinWindowFromID(GetHWND(), FID_CLIENT)); +} diff --git a/src/os2/gdiimage.cpp b/src/os2/gdiimage.cpp index d4357d6331..321e61e1c1 100644 --- a/src/os2/gdiimage.cpp +++ b/src/os2/gdiimage.cpp @@ -335,7 +335,9 @@ void wxGDIImage::CleanUpHandlers() wxNode* pNext = pNode->Next(); delete pHandler; +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete pNode; +#endif pNode = pNext; } } diff --git a/src/os2/gsocket.c b/src/os2/gsocket.c index 44ff3ad5ff..8ba4efe94a 100644 --- a/src/os2/gsocket.c +++ b/src/os2/gsocket.c @@ -80,19 +80,10 @@ int _System soclose(int); /* Global initialisers */ -#if !defined(__VISAGECPP__) - int GSocket_Init() { return 1; } -#else -bool GSocket_Init() -{ - return 1; -} - -#endif void GSocket_Cleanup() { diff --git a/src/os2/makefile.va b/src/os2/makefile.va index bbe82e3a5e..720dd9e935 100644 --- a/src/os2/makefile.va +++ b/src/os2/makefile.va @@ -989,20 +989,16 @@ $(WXDIR)\lib\wx.lib: \ !else -# Update the import library -$(WXDIR)\lib\wx214.lib: $(OBJECTS) - implib $(WXDIR)\lib\wx214.lib $(WXDIR)\lib\wx214.def - # Update the dynamic link library -$(WXDIR)\lib\wx214.dll: $(OBJECTS) +$(WXDIR)\lib\wx22.dll: $(OBJECTS) icc @<< /B" $(LINKFLAGS)" /Fe$@ $(LIBS) $(DUMMYOBJ) $(OBJECTS) - $(WXDIR)\lib\wx214.def + $(WXDIR)\lib\wx22.def << - implib $(WXDIR)\lib\wx214.lib $(WXDIR)\lib\wx214.def + implib $(WXDIR)\lib\wx22.lib $(WXDIR)\lib\wx22.def !endif @@ -1098,7 +1094,7 @@ clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm clean_t rd ..\os2\$D del $(LIBTARGET) !if "$(WXMAKINGDLL)" == "1" - erase /N ..\..\lib\wx214.lib + erase /N ..\..\lib\wx22.lib !endif cleanall: clean diff --git a/src/os2/mdi.cpp b/src/os2/mdi.cpp index b0142bab68..2c36bb8c0d 100644 --- a/src/os2/mdi.cpp +++ b/src/os2/mdi.cpp @@ -996,7 +996,7 @@ MRESULT wxMDIChildFrame::OS2DefWindowProc(WXUINT message, WXWPARAM wParam, WXLPA bool wxMDIChildFrame::OS2TranslateMessage(WXMSG* msg) { - return m_acceleratorTable.Translate(GetParent(), msg); + return m_acceleratorTable.Translate(GetParent()->GetHWND(), msg); } // --------------------------------------------------------------------------- diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index 3ab6173a4b..a9c390acc3 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -49,6 +49,15 @@ extern wxMenu* wxCurrentPopupMenu; // static const int idMenuTitle = -2; +// +// The unique ID for Menus +// +#ifdef __VISAGECPP__ +USHORT wxMenu::m_nextMenuId = 0; +#else +static USHORT wxMenu::m_nextMenuId = 0; +#endif + // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- @@ -73,7 +82,7 @@ static wxString TextToLabel(const wxString& rTitle) pc++; Title << wxT('&'); } - else + else Title << wxT('~'); } // else if (*pc == wxT('/')) @@ -113,7 +122,7 @@ void wxMenu::Init() // Create the menu (to be used as a submenu or a popup) // if ((m_hMenu = ::WinCreateWindow( HWND_DESKTOP - ,(const wxChar*)WC_MENU + ,WC_MENU ,"Menu" ,0L ,0L @@ -132,7 +141,7 @@ void wxMenu::Init() m_vMenuData.iPosition = 0; m_vMenuData.afStyle = MIS_SUBMENU | MIS_TEXT; m_vMenuData.afAttribute = (USHORT)0; - m_vMenuData.id = (USHORT)0; + m_vMenuData.id = m_nextMenuId++; m_vMenuData.hwndSubMenu = m_hMenu; m_vMenuData.hItem = NULLHANDLE; @@ -169,7 +178,9 @@ wxMenu::~wxMenu() // // Delete accels // +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) WX_CLEAR_ARRAY(m_vAccels); +#endif #endif // wxUSE_ACCEL } // end of wxMenu::~wxMenu @@ -254,13 +265,24 @@ bool wxMenu::DoInsertOrAppend( { ERRORID vError; wxString sError; - MENUITEM vItem; - #if wxUSE_ACCEL UpdateAccel(pItem); #endif // wxUSE_ACCEL - memset(&vItem, '\0', sizeof(vItem)); + // + // rItem is the member MENUITEM for the menu items and the submenu's + // MENUITEM for submenus as required by ::MM_INSERTITEM message API + // + + wxMenu* pSubmenu = pItem->GetSubMenu(); + MENUITEM& rItem = (pSubmenu != NULL)?pSubmenu->m_vMenuData: + pItem->m_vMenuData; + if(pSubmenu != NULL) + { + wxASSERT_MSG(pSubmenu->GetHMenu(), wxT("invalid submenu")); + pSubmenu->SetParent(this); + rItem.afStyle |= MIS_SUBMENU | MIS_TEXT; + } // // If "Break" has just been called, insert a menu break before this item @@ -268,19 +290,13 @@ bool wxMenu::DoInsertOrAppend( // if (m_bDoBreak) { - vItem.afStyle |= MIS_BREAK; + rItem.afStyle |= MIS_BREAK; m_bDoBreak = FALSE; } - // - // Menu items that are being inserted into a submenu MUST have a - // MENUITEM structure separate from the parent menu so we must use - // a local vItem not the object's m_vMenuItem as that is the MENUITEM - // associated with the parent submenu. - // if (pItem->IsSeparator()) { - vItem.afStyle |= MIS_SEPARATOR; + rItem.afStyle |= MIS_SEPARATOR; } // @@ -288,20 +304,18 @@ bool wxMenu::DoInsertOrAppend( // required by ::MM_INSERTITEM message API // - wxMenu* pSubmenu = pItem->GetSubMenu(); - if (pSubmenu != NULL) { wxASSERT_MSG(pSubmenu->GetHMenu(), wxT("invalid submenu")); pSubmenu->SetParent(this); - vItem.iPosition = 0; // submenus have a 0 position - vItem.id = (USHORT)pSubmenu->GetHMenu(); - vItem.afStyle |= MIS_SUBMENU | MIS_TEXT; + rItem.iPosition = 0; // submenus have a 0 position + rItem.id = (USHORT)pSubmenu->GetHMenu(); + rItem.afStyle |= MIS_SUBMENU | MIS_TEXT; } else { - vItem.id = pItem->GetId(); + rItem.id = pItem->GetId(); } BYTE* pData; @@ -314,7 +328,7 @@ bool wxMenu::DoInsertOrAppend( // item draws itself, pass pointer to it in data parameter // Will eventually need to set the image handle somewhere into vItem.hItem // - vItem.afStyle |= MIS_OWNERDRAW; + rItem.afStyle |= MIS_OWNERDRAW; pData = (BYTE*)pItem; // vItem.hItem = ???? } @@ -324,29 +338,26 @@ bool wxMenu::DoInsertOrAppend( // // Menu is just a normal string (passed in data parameter) // - wxSetShortCutKey((wxChar*)pItem->GetText().c_str()); - vItem.afStyle |= MIS_TEXT; + rItem.afStyle |= MIS_TEXT; pData = (char*)pItem->GetText().c_str(); } + if (nPos == (size_t)-1) + { + rItem.iPosition = MIT_END; + } + else + { + rItem.iPosition = nPos; + } + APIRET rc; - if (pSubmenu == NULL) - { - // - // -1 means append at end - // - if (nPos == (size_t)-1) - { - vItem.iPosition = MIT_END; - } - else - { - vItem.iPosition = nPos; - } - } - - rc = (APIRET)::WinSendMsg(GetHmenu(), MM_INSERTITEM, (MPARAM)&vItem, (MPARAM)pData); + rc = (APIRET)::WinSendMsg( GetHmenu() + ,MM_INSERTITEM + ,(MPARAM)&rItem + ,(MPARAM)pData + ); if (rc == MIT_MEMERROR || rc == MIT_ERROR) { vError = ::WinGetLastError(vHabmain); @@ -666,7 +677,6 @@ WXHMENU wxMenuBar::Create() { MENUITEM vItem; HWND hFrame; - HWND hMenuBar = NULLHANDLE; if (m_hMenu != 0 ) return m_hMenu; @@ -683,39 +693,39 @@ WXHMENU wxMenuBar::Create() // // Create an empty menu and then fill it with insertions // - if (!wxWindow::OS2Create( hFrame - ,WC_MENU - ,"Menu" - ,MS_ACTIONBAR | WS_SYNCPAINT | WS_VISIBLE - ,0L - ,0L - ,0L - ,0L - ,hFrame - ,HWND_TOP - ,FID_MENU - ,(PVOID)NULL - ,(PVOID)NULL - )) + if ((m_hMenu = ::WinCreateWindow( hFrame + ,WC_MENU + ,(PSZ)NULL + ,MS_ACTIONBAR | WS_SYNCPAINT | WS_VISIBLE + ,0L + ,0L + ,0L + ,0L + ,hFrame + ,HWND_TOP + ,FID_MENU + ,NULL + ,NULL + )) == 0) { - wxLogLastError("CreateMenu"); + wxLogLastError("WinLoadMenu"); } else { size_t nCount = GetMenuCount(); - hMenuBar = GetHwnd(); for (size_t i = 0; i < nCount; i++) { APIRET rc; ERRORID vError; wxString sError; - MENUITEM vItem; + HWND hSubMenu; // // Set the parent and owner of the submenues to be the menubar, not the desktop // - if (!::WinSetParent(m_menus[i]->m_vMenuData.hwndSubMenu, hMenuBar, FALSE)) + hSubMenu = m_menus[i]->m_vMenuData.hwndSubMenu; + if (!::WinSetParent(m_menus[i]->m_vMenuData.hwndSubMenu, m_hMenu, FALSE)) { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); @@ -723,7 +733,7 @@ WXHMENU wxMenuBar::Create() return NULLHANDLE; } - if (!::WinSetOwner(m_menus[i]->m_vMenuData.hwndSubMenu, hMenuBar)) + if (!::WinSetOwner(m_menus[i]->m_vMenuData.hwndSubMenu, m_hMenu)) { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); @@ -733,7 +743,7 @@ WXHMENU wxMenuBar::Create() m_menus[i]->m_vMenuData.iPosition = i; - rc = (APIRET)::WinSendMsg(hMenuBar, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str()); + rc = (APIRET)::WinSendMsg(m_hMenu, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str()); if (rc == MIT_MEMERROR || rc == MIT_ERROR) { vError = ::WinGetLastError(vHabmain); @@ -743,7 +753,7 @@ WXHMENU wxMenuBar::Create() } } } - return hMenuBar; + return m_hMenu; } // end of wxMenuBar::Create // --------------------------------------------------------------------------- @@ -772,7 +782,7 @@ void wxMenuBar::EnableTop( wxLogLastError("LogLastError"); return; } - ::WinSendMsg((HWND)m_hMenu, MM_SETITEMATTR, MPFROM2SHORT(nId, TRUE), MPFROM2SHORT(uFlag, uFlag)); + ::WinSendMsg((HWND)m_hMenu, MM_SETITEMATTR, MPFROM2SHORT(nId, TRUE), MPFROM2SHORT(MIA_DISABLED, uFlag)); Refresh(); } // end of wxMenuBar::EnableTop @@ -853,7 +863,7 @@ wxMenu* wxMenuBar::Replace( m_titles[nPos] = Title; if (IsAttached()) { - ::WinSendMsg((HWND)m_hMenu, MM_DELETEITEM, MPFROM2SHORT(nId, TRUE), (MPARAM)0); + ::WinSendMsg((HWND)m_hMenu, MM_REMOVEITEM, MPFROM2SHORT(nId, TRUE), (MPARAM)0); ::WinSendMsg((HWND)m_hMenu, MM_INSERTITEM, (MPARAM)&pMenu->m_vMenuData, (MPARAM)Title.c_str()); #if wxUSE_ACCEL @@ -913,8 +923,6 @@ bool wxMenuBar::Append( wxCHECK_MSG(hSubmenu, FALSE, wxT("can't append invalid menu to menubar")); - wxSetShortCutKey((wxChar*)rTitle.c_str()); - wxString Title = TextToLabel(rTitle); if (!wxMenuBarBase::Append(pMenu, Title)) return FALSE; @@ -958,7 +966,7 @@ wxMenu* wxMenuBar::Remove( } if (IsAttached()) { - ::WinSendMsg((HWND)GetHmenu(), MM_DELETEITEM, MPFROM2SHORT(nId, TRUE), (MPARAM)0); + ::WinSendMsg((HWND)GetHmenu(), MM_REMOVEITEM, MPFROM2SHORT(nId, TRUE), (MPARAM)0); pMenu->Detach(); #if wxUSE_ACCEL @@ -1019,6 +1027,14 @@ void wxMenuBar::Attach( #if wxUSE_ACCEL RebuildAccelTable(); + // + // Ensure the accelerator table is set to the frame (not the client!) + // + if (!::WinSetAccelTable( vHabmain + ,(HWND)pFrame->GetHWND() + ,m_vAccelTable.GetHACCEL() + )) + wxLogLastError("WinSetAccelTable"); #endif // wxUSE_ACCEL } // end of wxMenuBar::Attach @@ -1074,23 +1090,4 @@ wxMenuItem* wxMenuBar::FindItem( return pItem; } // end of wxMenuBar::FindItem -// -// wxWindows' default shortcut identifier is WIN32's "&" but -// OS2's is "~" so we have to change this and must watch for the -// sequence, "&&" converting only the first one -// -void wxSetShortCutKey( - wxChar* zText -) -{ - for (int i = 0; zText[i] != '\0'; i++) - { - if (zText[i] == '&') - { - zText[i] = '~'; - if (zText[i+1] == '&') - i++; - } - } -} diff --git a/src/os2/menuitem.cpp b/src/os2/menuitem.cpp index af97aab35a..1d960c605b 100644 --- a/src/os2/menuitem.cpp +++ b/src/os2/menuitem.cpp @@ -155,6 +155,8 @@ wxMenuItem::wxMenuItem( m_text = TextToLabel(rText); m_isCheckable = bCheckable; m_help = rStrHelp; + memset(&m_vMenuData, '\0', sizeof(m_vMenuData)); + m_vMenuData.id= nId; } // end of wxMenuItem::wxMenuItem wxMenuItem::~wxMenuItem() @@ -233,13 +235,13 @@ void wxMenuItem::Enable( bOk = (bool)::WinSendMsg( GetHMenuOf(m_parentMenu) ,MM_SETITEMATTR ,MPFROM2SHORT(GetRealId(), TRUE) - ,MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED) + ,MPFROM2SHORT(MIA_DISABLED, FALSE) ); else bOk = (bool)::WinSendMsg( GetHMenuOf(m_parentMenu) ,MM_SETITEMATTR ,MPFROM2SHORT(GetRealId(), TRUE) - ,MPFROM2SHORT(MIA_DISABLED, FALSE) + ,MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED) ); if (!bOk) { @@ -271,7 +273,7 @@ void wxMenuItem::Check( ); if (!bOk) { - wxLogLastError("EnableMenuItem"); + wxLogLastError("CheckMenuItem"); } wxMenuItemBase::Check(bCheck); } // end of wxMenuItem::Check diff --git a/src/os2/metafile.cpp b/src/os2/metafile.cpp index 4cd1db8306..bb9fa9719d 100644 --- a/src/os2/metafile.cpp +++ b/src/os2/metafile.cpp @@ -269,8 +269,8 @@ void wxMetafileDC::SetMapMode(int mode) break; } } - m_windowExtX = 100; - m_windowExtY = 100; + m_nWindowExtX = 100; + m_nWindowExtY = 100; } #ifdef __WIN32__ diff --git a/src/os2/msgdlg.cpp b/src/os2/msgdlg.cpp index e1cf166e2a..8aaa2313cc 100644 --- a/src/os2/msgdlg.cpp +++ b/src/os2/msgdlg.cpp @@ -21,6 +21,7 @@ #include "wx/defs.h" #include "wx/utils.h" #include "wx/dialog.h" +#include "wx/app.h" #include "wx/msgdlg.h" #endif @@ -35,18 +36,105 @@ IMPLEMENT_CLASS(wxMessageDialog, wxDialog) -wxMessageDialog::wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption, - long style, const wxPoint& pos) +wxMessageDialog::wxMessageDialog( + wxWindow* pParent +, const wxString& rsMessage +, const wxString& rsCaption +, long lStyle +, const wxPoint& pPos +) { - m_caption = caption; - m_message = message; - m_dialogStyle = style; - m_parent = parent; -} + m_sCaption = rsCaption; + m_sMessage = rsMessage; + m_lDialogStyle = lStyle; + m_pParent = NULL; // pParent; +} // end of wxMessageDialog::wxMessageDialog int wxMessageDialog::ShowModal() { - // TODO - return wxID_CANCEL; -} + HWND hWnd = 0; + ULONG ulStyle = MB_OK; + int nAns = wxOK; + + if (!wxTheApp->GetTopWindow()) + { + // + // when the message box is shown from wxApp::OnInit() (i.e. before the + // message loop is entered), this must be done or the next message box + // will never be shown - just try putting 2 calls to wxMessageBox() in + // OnInit() to see it + // + while (wxTheApp->Pending()) + wxTheApp->Dispatch(); + } + + if (m_pParent) + hWnd = (HWND) m_pParent->GetHWND(); + else + hWnd = HWND_DESKTOP; + if (m_lDialogStyle & wxYES_NO) + { + if (m_lDialogStyle & wxCANCEL) + ulStyle = MB_YESNOCANCEL; + else + ulStyle = MB_YESNO; + + if (m_lDialogStyle & wxNO_DEFAULT) + ulStyle |= MB_DEFBUTTON2; + } + + if (m_lDialogStyle & wxOK) + { + if (m_lDialogStyle & wxCANCEL) + ulStyle = MB_OKCANCEL; + else + ulStyle = MB_OK; + } + if (m_lDialogStyle & wxICON_EXCLAMATION) + ulStyle |= MB_ICONEXCLAMATION; + else if (m_lDialogStyle & wxICON_HAND) + ulStyle |= MB_ICONHAND; + else if (m_lDialogStyle & wxICON_INFORMATION) + ulStyle |= MB_ICONEXCLAMATION; + else if (m_lDialogStyle & wxICON_QUESTION) + ulStyle |= MB_ICONQUESTION; + + if (hWnd != HWND_DESKTOP) + ulStyle |= MB_APPLMODAL; + else + ulStyle |= MB_SYSTEMMODAL; + + // + // This little line of code is get message boxes under OS/2 to + // behve like the other ports. In OS/2 if the parent is a window + // it displays, clipped, in the window. This centers it on the + // desktop, like the other ports but still allows control over modality + // + hWnd = HWND_DESKTOP; + + ULONG ulAns = ::WinMessageBox( hWnd + ,hWnd + ,(PSZ)m_sMessage.c_str() + ,(PSZ)m_sCaption.c_str() + ,0L + ,ulStyle); + switch (ulAns) + { + case MBID_CANCEL: + nAns = wxID_CANCEL; + break; + case MBID_OK: + nAns = wxID_OK; + break; + case MBID_YES: + nAns = wxID_YES; + break; + case MBID_NO: + nAns = wxID_NO; + break; + default: + nAns = wxID_CANCEL; + } + return nAns; +} // end of wxMessageDialog::ShowModal diff --git a/src/os2/thread.cpp b/src/os2/thread.cpp index ac5b0d56ca..94de24c7cd 100644 --- a/src/os2/thread.cpp +++ b/src/os2/thread.cpp @@ -746,11 +746,15 @@ void wxThreadModule::OnExit() if (gs_pCritsectGui) { gs_pCritsectGui->Leave(); +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete gs_pCritsectGui; +#endif gs_pCritsectGui = NULL; } +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) wxDELETE(gs_pCritsectWaitingForGui); +#endif } // ---------------------------------------------------------------------------- diff --git a/src/os2/utils.cpp b/src/os2/utils.cpp index 31b8f70da6..9bfe35f46f 100644 --- a/src/os2/utils.cpp +++ b/src/os2/utils.cpp @@ -26,8 +26,6 @@ #include #ifdef __EMX__ #include -#else -#include #endif #include "wx/log.h" diff --git a/src/os2/utilsexc.cpp b/src/os2/utilsexc.cpp index 92187d9b61..f9f3885e16 100644 --- a/src/os2/utilsexc.cpp +++ b/src/os2/utilsexc.cpp @@ -35,8 +35,6 @@ #include #ifdef __EMX__ #include -#else -#include #endif #include diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 2a899ef618..9d0e828f52 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -306,8 +306,11 @@ wxWindow::~wxWindow() if (m_parent) m_parent->RemoveChild(this); DestroyChildren(); + if (m_hWnd) { +// UnsubclassWin(); + if(!::WinDestroyWindow(GetHWND())) wxLogLastError(wxT("DestroyWindow")); // @@ -382,6 +385,7 @@ bool wxWindow::Create( ,NULLHANDLE ,m_windowId ); + return(TRUE); } // end of wxWindow::Create @@ -714,28 +718,28 @@ void wxWindow::SubclassWin( wxCHECK_RET(::WinIsWindow(vHabmain, hwnd), wxT("invalid HWND in SubclassWin") ); - wxAssociateWinWithHandle(hwnd, this); +// wxAssociateWinWithHandle(hwnd, this); m_fnOldWndProc = (WXFARPROC) ::WinSubclassWindow(hwnd, (PFNWP)wxWndProc); - ::WinSetWindowULong(hwnd, QWS_USER, (ULONG)wxWndProc); +// ::WinSetWindowULong(hwnd, QWL_USER, (ULONG)wxWndProc); } // end of wxWindow::SubclassWin void wxWindow::UnsubclassWin() { - wxRemoveHandleAssociation(this); +// wxRemoveHandleAssociation(this); // // Restore old Window proc // - HWND hwnd = GetHwnd(); + HWND hwnd = GetHWND(); - if (hwnd) + if (m_hWnd) { - m_hWnd = 0; +// m_hWnd = 0; wxCHECK_RET( ::WinIsWindow(vHabmain, hwnd), wxT("invalid HWND in UnsubclassWin") ); - PFNWP fnProc = (PFNWP)::WinQueryWindowULong(hwnd, QWS_USER); + PFNWP fnProc = (PFNWP)::WinQueryWindowPtr(hwnd, QWP_PFNWP); if ( (m_fnOldWndProc != 0) && (fnProc != (PFNWP) m_fnOldWndProc)) { WinSubclassWindow(hwnd, (PFNWP)m_fnOldWndProc); @@ -1502,9 +1506,9 @@ MRESULT wxWindow::OS2DefWindowProc( ) { if (m_fnOldWndProc) - return ((MRESULT)m_fnOldWndProc()); + return (MRESULT)m_fnOldWndProc(GetHWND(), (ULONG)uMsg, (MPARAM)wParam, (MPARAM)lParam); else - return (::WinDefWindowProc(GetHwnd(), (ULONG)uMsg, (MPARAM)wParam, (MPARAM)lParam)); + return ::WinDefWindowProc(GetHWND(), (ULONG)uMsg, (MPARAM)wParam, (MPARAM)lParam); } // end of wxWindow::OS2DefWindowProc bool wxWindow::OS2ProcessMessage( @@ -1699,7 +1703,7 @@ bool wxWindow::OS2TranslateMessage( WXMSG* pMsg ) { - return m_acceleratorTable.Translate(this, pMsg); + return m_acceleratorTable.Translate(m_hWnd, pMsg); } // end of wxWindow::OS2TranslateMessage // --------------------------------------------------------------------------- @@ -1714,9 +1718,14 @@ void wxWindow::UnpackCommand( , WORD* pCmd ) { +/* *pId = LOWORD(wParam); *phWnd = (WXHWND)lParam; *pCmd = HIWORD(wParam); +*/ + *pId = LOWORD(wParam); + *phWnd = NULL; // or may be GetHWND() ? + *pCmd = LOWORD(lParam); } // end of wxWindow::UnpackCommand void wxWindow::UnpackActivate( @@ -1798,7 +1807,8 @@ MRESULT EXPENTRY wxWndProc( pWnd->SetHWND((WXHWND)hWnd); } - MRESULT rc; + MRESULT rc = (MRESULT)0; + // // Stop right here if we don't have a valid handle in our wxWindow object. @@ -1816,6 +1826,7 @@ MRESULT EXPENTRY wxWndProc( else rc = ::WinDefWindowProc(hWnd, ulMsg, wParam, lParam); } + return rc; } // end of wxWndProc @@ -1833,22 +1844,26 @@ MRESULT wxWindow::OS2WindowProc( // Did we process the uMsg? // bool bProcessed = FALSE; + bool bAllow; + MRESULT mResult; + WXHICON hIcon; + WXHBRUSH hBrush; // // The return value // - union - { - bool bAllow; - MRESULT mResult; - WXHICON hIcon; - WXHBRUSH hBrush; - } vRc; +// union +// { +// bool bAllow; +// MRESULT mResult; +// WXHICON hIcon; +// WXHBRUSH hBrush; +// } vRc; // // For most messages we should return 0 when we do process the message // - vRc.mResult = (MRESULT)0; + mResult = (MRESULT)0; switch (uMsg) { @@ -1864,14 +1879,15 @@ MRESULT wxWindow::OS2WindowProc( // // Return 0 to bAllow window creation // - vRc.mResult = (MRESULT)(bMayCreate ? 0 : -1); + mResult = (MRESULT)(bMayCreate ? 0 : -1); } } break; case WM_DESTROY: - bProcessed = HandleDestroy(); - break; + HandleDestroy(); + bProcessed = TRUE; + break; case WM_MOVE: bProcessed = HandleMove( LOWORD(lParam) @@ -1900,6 +1916,7 @@ MRESULT wxWindow::OS2WindowProc( bProcessed = HandleActivate( wState ,(WXHWND)hWnd ); + bProcessed = FALSE; } break; @@ -1920,7 +1937,7 @@ MRESULT wxWindow::OS2WindowProc( // ourselves in ~wxWindow // bProcessed = TRUE; - vRc.mResult = (MRESULT)TRUE; + mResult = (MRESULT)TRUE; break; case WM_SHOW: @@ -1954,7 +1971,6 @@ MRESULT wxWindow::OS2WindowProc( bProcessed = HandleMouseEvent(uMsg, x, y, (WXUINT)wParam); } break; - case WM_SYSCOMMAND: bProcessed = HandleSysCommand(wParam, lParam); break; @@ -1988,14 +2004,14 @@ MRESULT wxWindow::OS2WindowProc( } if ( bProcessed ) - vRc.mResult = (MRESULT)TRUE; + mResult = (MRESULT)TRUE; } break; case WM_QUERYDLGCODE: if ( m_lDlgCode ) { - vRc.mResult = (MRESULT)m_lDlgCode; + mResult = (MRESULT)m_lDlgCode; bProcessed = TRUE; } // @@ -2094,7 +2110,7 @@ MRESULT wxWindow::OS2WindowProc( #if defined(__VISAGECPP__) && (__IBMCPP__ >= 400) case WM_CTLCOLORCHANGE: { - bProcessed = HandleCtlColor(&vRc.hBrush); + bProcessed = HandleCtlColor(&hBrush); } break; #endif @@ -2133,7 +2149,7 @@ MRESULT wxWindow::OS2WindowProc( // // We processed the message, i.e. erased the background // - vRc.mResult = (MRESULT)TRUE; + mResult = (MRESULT)TRUE; } break; @@ -2148,18 +2164,18 @@ MRESULT wxWindow::OS2WindowProc( if ( bProcessed ) { // we never set focus from here - vRc.mResult = FALSE; + mResult = FALSE; } break; // wxFrame specific message case WM_MINMAXFRAME: - bProcessed = HandleGetMinMaxInfo((PSWP)lParam); + bProcessed = HandleGetMinMaxInfo((PSWP)wParam); break; case WM_SYSVALUECHANGED: // TODO: do something - vRc.mResult = (MRESULT)TRUE; + mResult = (MRESULT)TRUE; break; // @@ -2176,7 +2192,7 @@ MRESULT wxWindow::OS2WindowProc( // processing this message - exactly what we need because we've // just set the cursor. // - vRc.mResult = (MRESULT)TRUE; + mResult = (MRESULT)TRUE; } break; } @@ -2187,9 +2203,9 @@ MRESULT wxWindow::OS2WindowProc( wxLogTrace(wxTraceMessages, wxT("Forwarding %s to DefWindowProc."), wxGetMessageName(uMsg)); #endif // __WXDEBUG__ - vRc.mResult = OS2DefWindowProc(uMsg, wParam, lParam); + mResult = OS2DefWindowProc(uMsg, wParam, lParam); } - return vRc.mResult; + return mResult; } // end of wxWindow::OS2WindowProc // @@ -2326,10 +2342,10 @@ bool wxWindow::OS2Create( { ERRORID vError; wxString sError; - long lX1 = (long)CW_USEDEFAULT; + long lX1 = 0L; long lY1 = 0L; - long lWidth1 = (long)CW_USEDEFAULT; - long lHeight1 = 100L; + long lWidth1 = 20L; + long lHeight1 = 20L; int nControlId = 0; // @@ -2357,7 +2373,7 @@ bool wxWindow::OS2Create( (ULONG)zClass == (ULONG)WC_COMBOBOX || (ULONG)zClass == (ULONG)WC_CONTAINER || (ULONG)zClass == (ULONG)WC_ENTRYFIELD || - (ULONG)zClass == (ULONG)WC_FRAME || + (ULONG)zClass == (ULONG)WC_FRAME || (ULONG)zClass == (ULONG)WC_LISTBOX || (ULONG)zClass == (ULONG)WC_MENU || (ULONG)zClass == (ULONG)WC_NOTEBOOK || @@ -2395,6 +2411,7 @@ bool wxWindow::OS2Create( wxLogError("Can't create window of class %s!. Error: %s\n", zClass, sError); return FALSE; } + ::WinSetWindowULong(m_hWnd, QWL_USER, (ULONG) this); wxWndHook = NULL; #ifdef __WXDEBUG__ @@ -2414,6 +2431,12 @@ bool wxWindow::OS2Create( wxAssociateWinWithHandle((HWND)m_hWnd ,this ); + // + // Now need to subclass window. + // + + SubclassWin(GetHWND()); + return TRUE; } // end of wxWindow::OS2Create @@ -2796,6 +2819,9 @@ void wxWindow::OnSysColourChanged( bool wxWindow::HandlePaint() { HRGN hRgn = NULLHANDLE; + wxPaintEvent vEvent; + HPS hPS; + RECTL vRect; if (::WinQueryUpdateRegion(GetHwnd(), hRgn) == RGN_NULL) { @@ -2803,9 +2829,11 @@ bool wxWindow::HandlePaint() return FALSE; } m_updateRegion = wxRegion(hRgn); - - wxPaintEvent vEvent; - +/* + hPS = WinBeginPaint(GetHWND(), 0L, &vRect); + WinFillRect(hPS, &vRect, SYSCLR_WINDOW); + WinEndPaint(hPS); +*/ vEvent.SetEventObject(this); return (GetEventHandler()->ProcessEvent(vEvent)); } // end of wxWindow::HandlePaint diff --git a/src/png/png.dsp b/src/png/PngVC.dsp similarity index 92% rename from src/png/png.dsp rename to src/png/PngVC.dsp index dfa963dfdf..6c43ab7b18 100644 --- a/src/png/png.dsp +++ b/src/png/PngVC.dsp @@ -8,12 +8,12 @@ CFG=png - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE -!MESSAGE NMAKE /f "png.mak". +!MESSAGE NMAKE /f "PngVC.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "png.mak" CFG="png - Win32 Debug" +!MESSAGE NMAKE /f "PngVC.mak" CFG="png - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE @@ -64,7 +64,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe diff --git a/src/tiff/tiff.dsw b/src/png/PngVC.dsw similarity index 90% rename from src/tiff/tiff.dsw rename to src/png/PngVC.dsw index 95529cb365..58c98b69e6 100644 --- a/src/tiff/tiff.dsw +++ b/src/png/PngVC.dsw @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "tiff"=.\tiff.dsp - Package Owner=<4> +Project: "png"=.\PngVC.dsp - Package Owner=<4> Package=<5> {{{ diff --git a/src/png/makefile.nt b/src/png/makefile.nt deleted file mode 100644 index ab823c8fc9..0000000000 --- a/src/png/makefile.nt +++ /dev/null @@ -1,68 +0,0 @@ -# -# File: makefile.nt -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds winpng.lib library for Windows 3.1 - -# Change WXDIR or WXWIN to wherever wxWindows is found -WXDIR = $(WXWIN) -WXLIB = $(WXDIR)\lib\wx.lib -WXINC = $(WXDIR)\include - -WINPNGDIR = ..\png -WINPNGINC = $(WINPNGDIR) -WINPNGLIB = ..\..\lib\winpng.lib - -INC = /I..\zlib - -FINAL=1 - -# Set this to nothing if your compiler is MS C++ 7 -ZOPTION= - -!ifndef FINAL -FINAL=0 -!endif - -PRECOMP=/YuWX.H - -!if "$(FINAL)" == "0" -OPT = /Od -CPPFLAGS= /W4 /Zi /MD /GX- $(ZOPTION) $(OPT) /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS= /W4 /Zi /MD /GX- /Od /Dwx_msw $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE -!else -# /Ox for real FINAL version -OPT = /O2 -CPPFLAGS= /W4 /MD /GX- /Dwx_msw $(INC) # $(PRECOMP) /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS= /W4 /MD /GX- /Dwx_msw $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE -!endif - -OBJECTS = png.obj pngread.obj pngrtran.obj pngrutil.obj \ - pngpread.obj pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj \ - pngerror.obj pngmem.obj pngwio.obj pngrio.obj pngget.obj pngset.obj - -all: $(WINPNGLIB) - -$(WINPNGLIB): $(OBJECTS) - erase $(WINPNGLIB) - lib @<< --out:$(WINPNGLIB) -$(OBJECTS) -<< - -.c.obj: - cl -DWIN32 $(OPT) $(CFLAGS) /c $*.c - -clean: - erase *.obj - erase *.exe - erase *.lib - -cleanall: clean diff --git a/src/png/makefile.vc b/src/png/makefile.vc index 61b7be06a5..cf5e9f3af6 100644 --- a/src/png/makefile.vc +++ b/src/png/makefile.vc @@ -17,6 +17,8 @@ WINPNGINC = $(WINPNGDIR) !if "$(FINAL)" == "1" WINPNGLIB=..\..\lib\png.lib +!else if "$(FINAL)" == "hybrid" +WINPNGLIB=..\..\lib\pngh.lib !else WINPNGLIB=..\..\lib\pngd.lib !endif @@ -38,13 +40,19 @@ CPPFLAGS= /W4 /Zi $(CRTFLAG) /GX $(ZOPTION) $(OPT) /D__WXMSW__ $(INC) CFLAGS= /W4 /Zi $(CRTFLAG) /GX /Od /D__WXMSW__ $(INC) LINKFLAGS=/NOD /CO /ONERROR:NOEXE _CRTFLAG=/MDd +!else if "$(FINAL)" == "hybrid" +OPT = /Od +CPPFLAGS= /W4 /Zi $(CRTFLAG) /GX $(ZOPTION) $(OPT) /D__WXMSW__ $(INC) +CFLAGS= /W4 /Zi $(CRTFLAG) /GX /Od /D__WXMSW__ $(INC) +LINKFLAGS=/NOD /CO /ONERROR:NOEXE +_CRTFLAG=/MD !else # /Ox for real FINAL version OPT = /O2 CPPFLAGS= /W4 $(CRTFLAG) /GX /D__WXMSW__ $(INC) CFLAGS= /W4 $(CRTFLAG) /GX /D__WXMSW__ $(INC) LINKFLAGS=/NOD /ONERROR:NOEXE -_CRTFLAG=/MDd +_CRTFLAG=/MD !endif !if "$(CRTFLAG)" == "" diff --git a/src/regex/COPYRIGHT b/src/regex/COPYRIGHT deleted file mode 100644 index 30c1f7a488..0000000000 --- a/src/regex/COPYRIGHT +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 1992, 1993, 1994, 1997 Henry Spencer. All rights reserved. -This software is not subject to any license of the American Telephone -and Telegraph Company or of the Regents of the University of California. - -Permission is granted to anyone to use this software for any purpose on -any computer system, and to alter it and redistribute it, subject -to the following restrictions: - -1. The author is not responsible for the consequences of use of this - software, no matter how awful, even if they arise from flaws in it. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. Since few users ever read sources, - credits must appear in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. Since few users - ever read sources, credits must appear in the documentation. - -4. This notice may not be removed or altered. diff --git a/src/regex/Makefile b/src/regex/Makefile deleted file mode 100644 index 3882b37864..0000000000 --- a/src/regex/Makefile +++ /dev/null @@ -1,130 +0,0 @@ -# You probably want to take -DREDEBUG out of CFLAGS, and put something like -# -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of -# internal assertion checking and some debugging facilities). -# Put -Dconst= in for a pre-ANSI compiler. -# Do not take -DPOSIX_MISTAKE out. -# REGCFLAGS isn't important to you (it's for my use in some special contexts). -CFLAGS=-I. -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) - -# If you have a pre-ANSI compiler, put -o into MKHFLAGS. If you want -# the Berkeley __P macro, put -b in. -MKHFLAGS= - -# Flags for linking but not compiling, if any. -LDFLAGS= - -# Extra libraries for linking, if any. -LIBS= - -# Internal stuff, should not need changing. -OBJPRODN=regcomp.o regexec.o regerror.o regfree.o -OBJS=$(OBJPRODN) split.o debug.o main.o -H=cclass.h cname.h regex2.h utils.h -REGSRC=regcomp.c regerror.c regexec.c regfree.c -ALLSRC=$(REGSRC) engine.c debug.c main.c split.c - -# Stuff that matters only if you're trying to lint the package. -LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG -LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c -JUNKLINT=possible pointer alignment|null effect - -# arrangements to build forward-reference header files -.SUFFIXES: .ih .h -.c.ih: - sh ./mkh $(MKHFLAGS) -p $< >$@ - -default: r - -lib: purge $(OBJPRODN) - rm -f libregex.a - ar crv libregex.a $(OBJPRODN) - -purge: - rm -f *.o - -# stuff to build regex.h -REGEXH=regex.h -REGEXHSRC=regex2.h $(REGSRC) -$(REGEXH): $(REGEXHSRC) mkh - sh ./mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) >regex.tmp - cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h - rm -f regex.tmp - -# dependencies -$(OBJPRODN) debug.o: utils.h regex.h regex2.h -regcomp.o: cclass.h cname.h regcomp.ih -regexec.o: engine.c engine.ih -regerror.o: regerror.ih -debug.o: debug.ih -main.o: main.ih - -# tester -re: $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ - -# regression test -r: re tests - ./re &1 | egrep -v '$(JUNKLINT)' | tee lint - -fullprint: - ti README WHATSNEW notes todo | list - ti *.h | list - list *.c - list regex.3 regex.7 - -print: - ti README WHATSNEW notes todo | list - ti *.h | list - list reg*.c engine.c - - -mf.tmp: Makefile - sed '/^REGEXH=/s/=.*/=regex.h/' Makefile | sed '/#DEL$$/d' >$@ - -DTRH=cclass.h cname.h regex2.h utils.h -PRE=COPYRIGHT README WHATSNEW -POST=mkh regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch] -FILES=$(PRE) Makefile $(POST) -DTR=$(PRE) Makefile=mf.tmp $(POST) -dtr: $(FILES) mf.tmp - makedtr $(DTR) >$@ - rm mf.tmp - -cio: $(FILES) - cio $(FILES) - -rdf: $(FILES) - rcsdiff -c $(FILES) 2>&1 | p - -# various forms of cleanup -tidy: - rm -f junk* core core.* *.core dtr *.tmp lint - -clean: tidy - rm -f *.o *.s *.ih re libregex.a - -# don't do this one unless you know what you're doing -spotless: clean - rm -f mkh regex.h diff --git a/src/regex/README b/src/regex/README deleted file mode 100644 index e6ce373444..0000000000 --- a/src/regex/README +++ /dev/null @@ -1,32 +0,0 @@ -alpha3.8 release. -Tue Aug 10 15:51:48 EDT 1999 -henry@spsystems.net (formerly henry@zoo.toronto.edu) - -See WHATSNEW for change listing. - -installation notes: --------- -Read the comments at the beginning of Makefile before running. - -Utils.h contains some things that just might have to be modified on -some systems, as well as a nested include (ugh) of . - -The "fake" directory contains quick-and-dirty fakes for some header -files and routines that old systems may not have. Note also that --DUSEBCOPY will make utils.h substitute bcopy() for memmove(). - -After that, "make r" will build regcomp.o, regexec.o, regfree.o, -and regerror.o (the actual routines), bundle them together into a test -program, and run regression tests on them. No output is good output. - -"make lib" builds just the .o files for the actual routines (when -you're happy with testing and have adjusted CFLAGS for production), -and puts them together into libregex.a. You can pick up either the -library or *.o ("make lib" makes sure there are no other .o files left -around to confuse things). - -Main.c, debug.c, split.c are used for regression testing but are not part -of the RE routines themselves. - -Regex.h goes in /usr/include. All other .h files are internal only. --------- diff --git a/src/regex/WHATSNEW b/src/regex/WHATSNEW deleted file mode 100644 index 12953433d3..0000000000 --- a/src/regex/WHATSNEW +++ /dev/null @@ -1,108 +0,0 @@ -New in alpha3.8: Bug fix for signed/unsigned mixup, found and fixed -by the FreeBSD folks. - -New in alpha3.7: A bit of cleanup aimed at maximizing portability, -possibly at slight cost in efficiency. "ul" suffixes and "unsigned long" -no longer appear, in particular. - -New in alpha3.6: A couple more portability glitches fixed. - -New in alpha3.5: Active development of this code has been stopped -- -I'm working on a complete reimplementation -- but folks have found some -minor portability glitches and the like, hence this release to fix them. -One penalty: slightly reduced compatibility with old compilers, because -the ANSI C `unsigned long' type and `ul' constant suffix are used in a -few places (I could avoid this but it would be considerably more work). - -New in alpha3.4: The complex bug alluded to below has been fixed (in a -slightly kludgey temporary way that may hurt efficiency a bit; this is -another "get it out the door for 4.4" release). The tests at the end of -the tests file have accordingly been uncommented. The primary sign of -the bug was that something like a?b matching ab matched b rather than ab. -(The bug was essentially specific to this exact situation, else it would -have shown up earlier.) - -New in alpha3.3: The definition of word boundaries has been altered -slightly, to more closely match the usual programming notion that "_" -is an alphabetic. Stuff used for pre-ANSI systems is now in a subdir, -and the makefile no longer alludes to it in mysterious ways. The -makefile has generally been cleaned up some. Fixes have been made -(again!) so that the regression test will run without -DREDEBUG, at -the cost of weaker checking. A workaround for a bug in some folks' - has been added. And some more things have been added to -tests, including a couple right at the end which are commented out -because the code currently flunks them (complex bug; fix coming). -Plus the usual minor cleanup. - -New in alpha3.2: Assorted bits of cleanup and portability improvement -(the development base is now a BSDI system using GCC instead of an ancient -Sun system, and the newer compiler exposed some glitches). Fix for a -serious bug that affected REs using many [] (including REG_ICASE REs -because of the way they are implemented), *sometimes*, depending on -memory-allocation patterns. The header-file prototypes no longer name -the parameters, avoiding possible name conflicts. The possibility that -some clot has defined CHAR_MIN as (say) `-128' instead of `(-128)' is -now handled gracefully. "uchar" is no longer used as an internal type -name (too many people have the same idea). Still the same old lousy -performance, alas. - -New in alpha3.1: Basically nothing, this release is just a bookkeeping -convenience. Stay tuned. - -New in alpha3.0: Performance is no better, alas, but some fixes have been -made and some functionality has been added. (This is basically the "get -it out the door in time for 4.4" release.) One bug fix: regfree() didn't -free the main internal structure (how embarrassing). It is now possible -to put NULs in either the RE or the target string, using (resp.) a new -REG_PEND flag and the old REG_STARTEND flag. The REG_NOSPEC flag to -regcomp() makes all characters ordinary, so you can match a literal -string easily (this will become more useful when performance improves!). -There are now primitives to match beginnings and ends of words, although -the syntax is disgusting and so is the implementation. The REG_ATOI -debugging interface has changed a bit. And there has been considerable -internal cleanup of various kinds. - -New in alpha2.3: Split change list out of README, and moved flags notes -into Makefile. Macro-ized the name of regex(7) in regex(3), since it has -to change for 4.4BSD. Cleanup work in engine.c, and some new regression -tests to catch tricky cases thereof. - -New in alpha2.2: Out-of-date manpages updated. Regerror() acquires two -small extensions -- REG_ITOA and REG_ATOI -- which avoid debugging kludges -in my own test program and might be useful to others for similar purposes. -The regression test will now compile (and run) without REDEBUG. The -BRE \$ bug is fixed. Most uses of "uchar" are gone; it's all chars now. -Char/uchar parameters are now written int/unsigned, to avoid possible -portability problems with unpromoted parameters. Some unsigned casts have -been introduced to minimize portability problems with shifting into sign -bits. - -New in alpha2.1: Lots of little stuff, cleanup and fixes. The one big -thing is that regex.h is now generated, using mkh, rather than being -supplied in the distribution; due to circularities in dependencies, -you have to build regex.h explicitly by "make h". The two known bugs -have been fixed (and the regression test now checks for them), as has a -problem with assertions not being suppressed in the absence of REDEBUG. -No performance work yet. - -New in alpha2: Backslash-anything is an ordinary character, not an -error (except, of course, for the handful of backslashed metacharacters -in BREs), which should reduce script breakage. The regression test -checks *where* null strings are supposed to match, and has generally -been tightened up somewhat. Small bug fixes in parameter passing (not -harmful, but technically errors) and some other areas. Debugging -invoked by defining REDEBUG rather than not defining NDEBUG. - -New in alpha+3: full prototyping for internal routines, using a little -helper program, mkh, which extracts prototypes given in stylized comments. -More minor cleanup. Buglet fix: it's CHAR_BIT, not CHAR_BITS. Simple -pre-screening of input when a literal string is known to be part of the -RE; this does wonders for performance. - -New in alpha+2: minor bits of cleanup. Notably, the number "32" for the -word width isn't hardwired into regexec.c any more, the public header -file prototypes the functions if __STDC__ is defined, and some small typos -in the manpages have been fixed. - -New in alpha+1: improvements to the manual pages, and an important -extension, the REG_STARTEND option to regexec(). diff --git a/src/regex/cclass.h b/src/regex/cclass.h deleted file mode 100644 index 0c293028e9..0000000000 --- a/src/regex/cclass.h +++ /dev/null @@ -1,31 +0,0 @@ -/* character-class table */ -static struct cclass { - char *name; - char *chars; - char *multis; -} cclasses[] = { - "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ -0123456789", "", - "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", - "", - "blank", " \t", "", - "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\ -\25\26\27\30\31\32\33\34\35\36\37\177", "", - "digit", "0123456789", "", - "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ -0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", - "", - "lower", "abcdefghijklmnopqrstuvwxyz", - "", - "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ -0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ", - "", - "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", - "", - "space", "\t\n\v\f\r ", "", - "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "", - "xdigit", "0123456789ABCDEFabcdef", - "", - NULL, 0, "" -}; diff --git a/src/regex/cname.h b/src/regex/cname.h deleted file mode 100644 index 02e86e912e..0000000000 --- a/src/regex/cname.h +++ /dev/null @@ -1,102 +0,0 @@ -/* character-name table */ -static struct cname { - char *name; - char code; -} cnames[] = { - "NUL", '\0', - "SOH", '\001', - "STX", '\002', - "ETX", '\003', - "EOT", '\004', - "ENQ", '\005', - "ACK", '\006', - "BEL", '\007', - "alert", '\007', - "BS", '\010', - "backspace", '\b', - "HT", '\011', - "tab", '\t', - "LF", '\012', - "newline", '\n', - "VT", '\013', - "vertical-tab", '\v', - "FF", '\014', - "form-feed", '\f', - "CR", '\015', - "carriage-return", '\r', - "SO", '\016', - "SI", '\017', - "DLE", '\020', - "DC1", '\021', - "DC2", '\022', - "DC3", '\023', - "DC4", '\024', - "NAK", '\025', - "SYN", '\026', - "ETB", '\027', - "CAN", '\030', - "EM", '\031', - "SUB", '\032', - "ESC", '\033', - "IS4", '\034', - "FS", '\034', - "IS3", '\035', - "GS", '\035', - "IS2", '\036', - "RS", '\036', - "IS1", '\037', - "US", '\037', - "space", ' ', - "exclamation-mark", '!', - "quotation-mark", '"', - "number-sign", '#', - "dollar-sign", '$', - "percent-sign", '%', - "ampersand", '&', - "apostrophe", '\'', - "left-parenthesis", '(', - "right-parenthesis", ')', - "asterisk", '*', - "plus-sign", '+', - "comma", ',', - "hyphen", '-', - "hyphen-minus", '-', - "period", '.', - "full-stop", '.', - "slash", '/', - "solidus", '/', - "zero", '0', - "one", '1', - "two", '2', - "three", '3', - "four", '4', - "five", '5', - "six", '6', - "seven", '7', - "eight", '8', - "nine", '9', - "colon", ':', - "semicolon", ';', - "less-than-sign", '<', - "equals-sign", '=', - "greater-than-sign", '>', - "question-mark", '?', - "commercial-at", '@', - "left-square-bracket", '[', - "backslash", '\\', - "reverse-solidus", '\\', - "right-square-bracket", ']', - "circumflex", '^', - "circumflex-accent", '^', - "underscore", '_', - "low-line", '_', - "grave-accent", '`', - "left-brace", '{', - "left-curly-bracket", '{', - "vertical-line", '|', - "right-brace", '}', - "right-curly-bracket", '}', - "tilde", '~', - "DEL", '\177', - NULL, 0, -}; diff --git a/src/regex/engine.ih b/src/regex/engine.ih deleted file mode 100644 index cc98334e75..0000000000 --- a/src/regex/engine.ih +++ /dev/null @@ -1,35 +0,0 @@ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -/* === engine.c === */ -static int matcher(register struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags); -static char *dissect(register struct match *m, char *start, char *stop, sopno startst, sopno stopst); -static char *backref(register struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev); -static char *fast(register struct match *m, char *start, char *stop, sopno startst, sopno stopst); -static char *slow(register struct match *m, char *start, char *stop, sopno startst, sopno stopst); -static states step(register struct re_guts *g, sopno start, sopno stop, register states bef, int ch, register states aft); -#define BOL (OUT+1) -#define EOL (BOL+1) -#define BOLEOL (BOL+2) -#define NOTHING (BOL+3) -#define BOW (BOL+4) -#define EOW (BOL+5) -#define CODEMAX (BOL+5) /* highest code used */ -#define NONCHAR(c) ((c) > CHAR_MAX) -#define NNONCHAR (CODEMAX-CHAR_MAX) -#ifdef REDEBUG -static void print(struct match *m, char *caption, states st, int ch, FILE *d); -#endif -#ifdef REDEBUG -static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst); -#endif -#ifdef REDEBUG -static char *pchar(int ch); -#endif - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ diff --git a/src/regex/mkh b/src/regex/mkh deleted file mode 100644 index 252b246c7b..0000000000 --- a/src/regex/mkh +++ /dev/null @@ -1,76 +0,0 @@ -#! /bin/sh -# mkh - pull headers out of C source -PATH=/bin:/usr/bin ; export PATH - -# egrep pattern to pick out marked lines -egrep='^ =([ ]|$)' - -# Sed program to process marked lines into lines for the header file. -# The markers have already been removed. Two things are done here: removal -# of backslashed newlines, and some fudging of comments. The first is done -# because -o needs to have prototypes on one line to strip them down. -# Getting comments into the output is tricky; we turn C++-style // comments -# into /* */ comments, after altering any existing */'s to avoid trouble. -peel=' /\\$/N - /\\\n[ ]*/s///g - /\/\//s;\*/;* /;g - /\/\//s;//\(.*\);/*\1 */;' - -for a -do - case "$a" in - -o) # old (pre-function-prototype) compiler - # add code to comment out argument lists - peel="$peel - "'/^\([^#\/][^\/]*[a-zA-Z0-9_)]\)(\(.*\))/s;;\1(/*\2*/);' - shift - ;; - -b) # funny Berkeley __P macro - peel="$peel - "'/^\([^#\/][^\/]*[a-zA-Z0-9_)]\)(\(.*\))/s;;\1 __P((\2));' - shift - ;; - -s) # compiler doesn't like `static foo();' - # add code to get rid of the `static' - peel="$peel - "'/^static[ ][^\/]*[a-zA-Z0-9_)](.*)/s;static.;;' - shift - ;; - -p) # private declarations - egrep='^ ==([ ]|$)' - shift - ;; - -i) # wrap in #ifndef, argument is name - ifndef="$2" - shift ; shift - ;; - *) break - ;; - esac -done - -if test " $ifndef" != " " -then - echo "#ifndef $ifndef" - echo "#define $ifndef /* never again */" -fi -echo "/* ========= begin header generated by $0 ========= */" -echo '#ifdef __cplusplus' -echo 'extern "C" {' -echo '#endif' -for f -do - echo - echo "/* === $f === */" - egrep "$egrep" $f | sed 's/^ ==*[ ]//;s/^ ==*$//' | sed "$peel" - echo -done -echo '#ifdef __cplusplus' -echo '}' -echo '#endif' -echo "/* ========= end header generated by $0 ========= */" -if test " $ifndef" != " " -then - echo "#endif" -fi -exit 0 diff --git a/src/regex/re_syntax.n b/src/regex/re_syntax.n deleted file mode 100644 index f37bb85abd..0000000000 --- a/src/regex/re_syntax.n +++ /dev/null @@ -1,970 +0,0 @@ -'\" -'\" Copyright (c) 1998 Sun Microsystems, Inc. -'\" Copyright (c) 1999 Scriptics Corporation -'\" -'\" This software is copyrighted by the Regents of the University of -'\" California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState -'\" Corporation and other parties. The following terms apply to all files -'\" associated with the software unless explicitly disclaimed in -'\" individual files. -'\" -'\" The authors hereby grant permission to use, copy, modify, distribute, -'\" and license this software and its documentation for any purpose, provided -'\" that existing copyright notices are retained in all copies and that this -'\" notice is included verbatim in any distributions. No written agreement, -'\" license, or royalty fee is required for any of the authorized uses. -'\" Modifications to this software may be copyrighted by their authors -'\" and need not follow the licensing terms described here, provided that -'\" the new terms are clearly indicated on the first page of each file where -'\" they apply. -'\" -'\" IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY -'\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES -'\" ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY -'\" DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE -'\" POSSIBILITY OF SUCH DAMAGE. -'\" -'\" THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, -'\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, -'\" FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE -'\" IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE -'\" NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -'\" MODIFICATIONS. -'\" -'\" GOVERNMENT USE: If you are acquiring this software on behalf of the -'\" U.S. government, the Government shall have only "Restricted Rights" -'\" in the software and related documentation as defined in the Federal -'\" Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you -'\" are acquiring the software on behalf of the Department of Defense, the -'\" software shall be classified as "Commercial Computer Software" and the -'\" Government shall have only "Restricted Rights" as defined in Clause -'\" 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the -'\" authors grant the U.S. Government and others acting in its behalf -'\" permission to use and distribute the software in accordance with the -'\" terms specified in this license. -'\" -'\" RCS: @(#) Id: re_syntax.n,v 1.3 1999/07/14 19:09:36 jpeek Exp -'\" -.so man.macros -.TH re_syntax n "8.1" Tcl "Tcl Built-In Commands" -.BS -.SH NAME -re_syntax \- Syntax of Tcl regular expressions. -.BE - -.SH DESCRIPTION -.PP -A \fIregular expression\fR describes strings of characters. -It's a pattern that matches certain strings and doesn't match others. - -.SH "DIFFERENT FLAVORS OF REs" -Regular expressions (``RE''s), as defined by POSIX, come in two -flavors: \fIextended\fR REs (``EREs'') and \fIbasic\fR REs (``BREs''). -EREs are roughly those of the traditional \fIegrep\fR, while BREs are -roughly those of the traditional \fIed\fR. This implementation adds -a third flavor, \fIadvanced\fR REs (``AREs''), basically EREs with -some significant extensions. -.PP -This manual page primarily describes AREs. BREs mostly exist for -backward compatibility in some old programs; they will be discussed at -the end. POSIX EREs are almost an exact subset of AREs. Features of -AREs that are not present in EREs will be indicated. - -.SH "REGULAR EXPRESSION SYNTAX" -.PP -Tcl regular expressions are implemented using the package written by -Henry Spencer, based on the 1003.2 spec and some (not quite all) of -the Perl5 extensions (thanks, Henry!). Much of the description of -regular expressions below is copied verbatim from his manual entry. -.PP -An ARE is one or more \fIbranches\fR, -separated by `\fB|\fR', -matching anything that matches any of the branches. -.PP -A branch is zero or more \fIconstraints\fR or \fIquantified atoms\fR, -concatenated. -It matches a match for the first, followed by a match for the second, etc; -an empty branch matches the empty string. -.PP -A quantified atom is an \fIatom\fR possibly followed -by a single \fIquantifier\fR. -Without a quantifier, it matches a match for the atom. -The quantifiers, -and what a so-quantified atom matches, are: -.RS 2 -.TP 6 -\fB*\fR -a sequence of 0 or more matches of the atom -.TP -\fB+\fR -a sequence of 1 or more matches of the atom -.TP -\fB?\fR -a sequence of 0 or 1 matches of the atom -.TP -\fB{\fIm\fB}\fR -a sequence of exactly \fIm\fR matches of the atom -.TP -\fB{\fIm\fB,}\fR -a sequence of \fIm\fR or more matches of the atom -.TP -\fB{\fIm\fB,\fIn\fB}\fR -a sequence of \fIm\fR through \fIn\fR (inclusive) matches of the atom; -\fIm\fR may not exceed \fIn\fR -.TP -\fB*? +? ?? {\fIm\fB}? {\fIm\fB,}? {\fIm\fB,\fIn\fB}?\fR -\fInon-greedy\fR quantifiers, -which match the same possibilities, -but prefer the smallest number rather than the largest number -of matches (see MATCHING) -.RE -.PP -The forms using -\fB{\fR and \fB}\fR -are known as \fIbound\fRs. -The numbers -\fIm\fR and \fIn\fR are unsigned decimal integers -with permissible values from 0 to 255 inclusive. -.PP -An atom is one of: -.RS 2 -.TP 6 -\fB(\fIre\fB)\fR -(where \fIre\fR is any regular expression) -matches a match for -\fIre\fR, with the match noted for possible reporting -.TP -\fB(?:\fIre\fB)\fR -as previous, -but does no reporting -(a ``non-capturing'' set of parentheses) -.TP -\fB()\fR -matches an empty string, -noted for possible reporting -.TP -\fB(?:)\fR -matches an empty string, -without reporting -.TP -\fB[\fIchars\fB]\fR -a \fIbracket expression\fR, -matching any one of the \fIchars\fR (see BRACKET EXPRESSIONS for more detail) -.TP - \fB.\fR -matches any single character -.TP -\fB\e\fIk\fR -(where \fIk\fR is a non-alphanumeric character) -matches that character taken as an ordinary character, -e.g. \e\e matches a backslash character -.TP -\fB\e\fIc\fR -where \fIc\fR is alphanumeric -(possibly followed by other characters), -an \fIescape\fR (AREs only), -see ESCAPES below -.TP -\fB{\fR -when followed by a character other than a digit, -matches the left-brace character `\fB{\fR'; -when followed by a digit, it is the beginning of a -\fIbound\fR (see above) -.TP -\fIx\fR -where \fIx\fR is -a single character with no other significance, matches that character. -.RE -.PP -A \fIconstraint\fR matches an empty string when specific conditions -are met. -A constraint may not be followed by a quantifier. -The simple constraints are as follows; some more constraints are -described later, under ESCAPES. -.RS 2 -.TP 8 -\fB^\fR -matches at the beginning of a line -.TP -\fB$\fR -matches at the end of a line -.TP -\fB(?=\fIre\fB)\fR -\fIpositive lookahead\fR (AREs only), matches at any point -where a substring matching \fIre\fR begins -.TP -\fB(?!\fIre\fB)\fR -\fInegative lookahead\fR (AREs only), matches at any point -where no substring matching \fIre\fR begins -.RE -.PP -The lookahead constraints may not contain back references (see later), -and all parentheses within them are considered non-capturing. -.PP -An RE may not end with `\fB\e\fR'. - -.SH "BRACKET EXPRESSIONS" -A \fIbracket expression\fR is a list of characters enclosed in `\fB[\|]\fR'. -It normally matches any single character from the list (but see below). -If the list begins with `\fB^\fR', -it matches any single character -(but see below) \fInot\fR from the rest of the list. -.PP -If two characters in the list are separated by `\fB\-\fR', -this is shorthand -for the full \fIrange\fR of characters between those two (inclusive) in the -collating sequence, -e.g. -\fB[0\-9]\fR -in ASCII matches any decimal digit. -Two ranges may not share an -endpoint, so e.g. -\fBa\-c\-e\fR -is illegal. -Ranges are very collating-sequence-dependent, -and portable programs should avoid relying on them. -.PP -To include a literal -\fB]\fR -or -\fB\-\fR -in the list, -the simplest method is to -enclose it in -\fB[.\fR and \fB.]\fR -to make it a collating element (see below). -Alternatively, -make it the first character -(following a possible `\fB^\fR'), -or (AREs only) precede it with `\fB\e\fR'. -Alternatively, for `\fB\-\fR', -make it the last character, -or the second endpoint of a range. -To use a literal -\fB\-\fR -as the first endpoint of a range, -make it a collating element -or (AREs only) precede it with `\fB\e\fR'. -With the exception of these, some combinations using -\fB[\fR -(see next -paragraphs), and escapes, -all other special characters lose their -special significance within a bracket expression. -.PP -Within a bracket expression, a collating element (a character, -a multi-character sequence that collates as if it were a single character, -or a collating-sequence name for either) -enclosed in -\fB[.\fR and \fB.]\fR -stands for the -sequence of characters of that collating element. -The sequence is a single element of the bracket expression's list. -A bracket expression in a locale that has -multi-character collating elements -can thus match more than one character. -.VS 8.2 -So (insidiously), a bracket expression that starts with \fB^\fR -can match multi-character collating elements even if none of them -appear in the bracket expression! -(\fINote:\fR Tcl currently has no multi-character collating elements. -This information is only for illustration.) -.PP -For example, assume the collating sequence includes a \fBch\fR -multi-character collating element. -Then the RE \fB[[.ch.]]*c\fR (zero or more \fBch\fP's followed by \fBc\fP) -matches the first five characters of `\fBchchcc\fR'. -Also, the RE \fB[^c]b\fR matches all of `\fBchb\fR' -(because \fB[^c]\fR matches the multi-character \fBch\fR). -.VE 8.2 -.PP -Within a bracket expression, a collating element enclosed in -\fB[=\fR -and -\fB=]\fR -is an equivalence class, standing for the sequences of characters -of all collating elements equivalent to that one, including itself. -(If there are no other equivalent collating elements, -the treatment is as if the enclosing delimiters were `\fB[.\fR'\& -and `\fB.]\fR'.) -For example, if -\fBo\fR -and -\fB\o'o^'\fR -are the members of an equivalence class, -then `\fB[[=o=]]\fR', `\fB[[=\o'o^'=]]\fR', -and `\fB[o\o'o^']\fR'\& -are all synonymous. -An equivalence class may not be an endpoint -of a range. -.VS 8.2 -(\fINote:\fR -Tcl currently implements only the Unicode locale. -It doesn't define any equivalence classes. -The examples above are just illustrations.) -.VE 8.2 -.PP -Within a bracket expression, the name of a \fIcharacter class\fR enclosed -in -\fB[:\fR -and -\fB:]\fR -stands for the list of all characters -(not all collating elements!) -belonging to that -class. -Standard character classes are: -.PP -.RS -.ne 5 -.nf -.ta 3c -\fBalpha\fR A letter. -\fBupper\fR An upper-case letter. -\fBlower\fR A lower-case letter. -\fBdigit\fR A decimal digit. -\fBxdigit\fR A hexadecimal digit. -\fBalnum\fR An alphanumeric (letter or digit). -\fBprint\fR An alphanumeric (same as alnum). -\fBblank\fR A space or tab character. -\fBspace\fR A character producing white space in displayed text. -\fBpunct\fR A punctuation character. -\fBgraph\fR A character with a visible representation. -\fBcntrl\fR A control character. -.fi -.RE -.PP -A locale may provide others. -.VS 8.2 -(Note that the current Tcl implementation has only one locale: -the Unicode locale.) -.VE 8.2 -A character class may not be used as an endpoint of a range. -.PP -There are two special cases of bracket expressions: -the bracket expressions -\fB[[:<:]]\fR -and -\fB[[:>:]]\fR -are constraints, matching empty strings at -the beginning and end of a word respectively. -'\" note, discussion of escapes below references this definition of word -A word is defined as a sequence of -word characters -that is neither preceded nor followed by -word characters. -A word character is an -\fIalnum\fR -character -or an underscore -(\fB_\fR). -These special bracket expressions are deprecated; -users of AREs should use constraint escapes instead (see below). -.SH ESCAPES -Escapes (AREs only), which begin with a -\fB\e\fR -followed by an alphanumeric character, -come in several varieties: -character entry, class shorthands, constraint escapes, and back references. -A -\fB\e\fR -followed by an alphanumeric character but not constituting -a valid escape is illegal in AREs. -In EREs, there are no escapes: -outside a bracket expression, -a -\fB\e\fR -followed by an alphanumeric character merely stands for that -character as an ordinary character, -and inside a bracket expression, -\fB\e\fR -is an ordinary character. -(The latter is the one actual incompatibility between EREs and AREs.) -.PP -Character-entry escapes (AREs only) exist to make it easier to specify -non-printing and otherwise inconvenient characters in REs: -.RS 2 -.TP 5 -\fB\ea\fR -alert (bell) character, as in C -.TP -\fB\eb\fR -backspace, as in C -.TP -\fB\eB\fR -synonym for -\fB\e\fR -to help reduce backslash doubling in some -applications where there are multiple levels of backslash processing -.TP -\fB\ec\fIX\fR -(where X is any character) the character whose -low-order 5 bits are the same as those of -\fIX\fR, -and whose other bits are all zero -.TP -\fB\ee\fR -the character whose collating-sequence name -is `\fBESC\fR', -or failing that, the character with octal value 033 -.TP -\fB\ef\fR -formfeed, as in C -.TP -\fB\en\fR -newline, as in C -.TP -\fB\er\fR -carriage return, as in C -.TP -\fB\et\fR -horizontal tab, as in C -.TP -\fB\eu\fIwxyz\fR -(where -\fIwxyz\fR -is exactly four hexadecimal digits) -the Unicode character -\fBU+\fIwxyz\fR -in the local byte ordering -.TP -\fB\eU\fIstuvwxyz\fR -(where -\fIstuvwxyz\fR -is exactly eight hexadecimal digits) -reserved for a somewhat-hypothetical Unicode extension to 32 bits -.TP -\fB\ev\fR -vertical tab, as in C -are all available. -.TP -\fB\ex\fIhhh\fR -(where -\fIhhh\fR -is any sequence of hexadecimal digits) -the character whose hexadecimal value is -\fB0x\fIhhh\fR -(a single character no matter how many hexadecimal digits are used). -.TP -\fB\e0\fR -the character whose value is -\fB0\fR -.TP -\fB\e\fIxy\fR -(where -\fIxy\fR -is exactly two octal digits, -and is not a -\fIback reference\fR (see below)) -the character whose octal value is -\fB0\fIxy\fR -.TP -\fB\e\fIxyz\fR -(where -\fIxyz\fR -is exactly three octal digits, -and is not a -back reference (see below)) -the character whose octal value is -\fB0\fIxyz\fR -.RE -.PP -Hexadecimal digits are `\fB0\fR'-`\fB9\fR', `\fBa\fR'-`\fBf\fR', -and `\fBA\fR'-`\fBF\fR'. -Octal digits are `\fB0\fR'-`\fB7\fR'. -.PP -The character-entry escapes are always taken as ordinary characters. -For example, -\fB\e135\fR -is -\fB]\fR -in ASCII, -but -\fB\e135\fR -does not terminate a bracket expression. -Beware, however, that some applications (e.g., C compilers) interpret -such sequences themselves before the regular-expression package -gets to see them, which may require doubling (quadrupling, etc.) the `\fB\e\fR'. -.PP -Class-shorthand escapes (AREs only) provide shorthands for certain commonly-used -character classes: -.RS 2 -.TP 10 -\fB\ed\fR -\fB[[:digit:]]\fR -.TP -\fB\es\fR -\fB[[:space:]]\fR -.TP -\fB\ew\fR -\fB[[:alnum:]_]\fR -(note underscore) -.TP -\fB\eD\fR -\fB[^[:digit:]]\fR -.TP -\fB\eS\fR -\fB[^[:space:]]\fR -.TP -\fB\eW\fR -\fB[^[:alnum:]_]\fR -(note underscore) -.RE -.PP -Within bracket expressions, `\fB\ed\fR', `\fB\es\fR', -and `\fB\ew\fR'\& -lose their outer brackets, -and `\fB\eD\fR', `\fB\eS\fR', -and `\fB\eW\fR'\& -are illegal. -.VS 8.2 -(So, for example, \fB[a-c\ed]\fR is equivalent to \fB[a-c[:digit:]]\fR. -Also, \fB[a-c\eD]\fR, which is equivalent to \fB[a-c^[:digit:]]\fR, is illegal.) -.VE 8.2 -.PP -A constraint escape (AREs only) is a constraint, -matching the empty string if specific conditions are met, -written as an escape: -.RS 2 -.TP 6 -\fB\eA\fR -matches only at the beginning of the string -(see MATCHING, below, for how this differs from `\fB^\fR') -.TP -\fB\em\fR -matches only at the beginning of a word -.TP -\fB\eM\fR -matches only at the end of a word -.TP -\fB\ey\fR -matches only at the beginning or end of a word -.TP -\fB\eY\fR -matches only at a point that is not the beginning or end of a word -.TP -\fB\eZ\fR -matches only at the end of the string -(see MATCHING, below, for how this differs from `\fB$\fR') -.TP -\fB\e\fIm\fR -(where -\fIm\fR -is a nonzero digit) a \fIback reference\fR, see below -.TP -\fB\e\fImnn\fR -(where -\fIm\fR -is a nonzero digit, and -\fInn\fR -is some more digits, -and the decimal value -\fImnn\fR -is not greater than the number of closing capturing parentheses seen so far) -a \fIback reference\fR, see below -.RE -.PP -A word is defined as in the specification of -\fB[[:<:]]\fR -and -\fB[[:>:]]\fR -above. -Constraint escapes are illegal within bracket expressions. -.PP -A back reference (AREs only) matches the same string matched by the parenthesized -subexpression specified by the number, -so that (e.g.) -\fB([bc])\e1\fR -matches -\fBbb\fR -or -\fBcc\fR -but not `\fBbc\fR'. -The subexpression must entirely precede the back reference in the RE. -Subexpressions are numbered in the order of their leading parentheses. -Non-capturing parentheses do not define subexpressions. -.PP -There is an inherent historical ambiguity between octal character-entry -escapes and back references, which is resolved by heuristics, -as hinted at above. -A leading zero always indicates an octal escape. -A single non-zero digit, not followed by another digit, -is always taken as a back reference. -A multi-digit sequence not starting with a zero is taken as a back -reference if it comes after a suitable subexpression -(i.e. the number is in the legal range for a back reference), -and otherwise is taken as octal. -.SH "METASYNTAX" -In addition to the main syntax described above, there are some special -forms and miscellaneous syntactic facilities available. -.PP -Normally the flavor of RE being used is specified by -application-dependent means. -However, this can be overridden by a \fIdirector\fR. -If an RE of any flavor begins with `\fB***:\fR', -the rest of the RE is an ARE. -If an RE of any flavor begins with `\fB***=\fR', -the rest of the RE is taken to be a literal string, -with all characters considered ordinary characters. -.PP -An ARE may begin with \fIembedded options\fR: -a sequence -\fB(?\fIxyz\fB)\fR -(where -\fIxyz\fR -is one or more alphabetic characters) -specifies options affecting the rest of the RE. -These supplement, and can override, -any options specified by the application. -The available option letters are: -.RS 2 -.TP 3 -\fBb\fR -rest of RE is a BRE -.TP 3 -\fBc\fR -case-sensitive matching (usual default) -.TP 3 -\fBe\fR -rest of RE is an ERE -.TP 3 -\fBi\fR -case-insensitive matching (see MATCHING, below) -.TP 3 -\fBm\fR -historical synonym for -\fBn\fR -.TP 3 -\fBn\fR -newline-sensitive matching (see MATCHING, below) -.TP 3 -\fBp\fR -partial newline-sensitive matching (see MATCHING, below) -.TP 3 -\fBq\fR -rest of RE is a literal (``quoted'') string, all ordinary characters -.TP 3 -\fBs\fR -non-newline-sensitive matching (usual default) -.TP 3 -\fBt\fR -tight syntax (usual default; see below) -.TP 3 -\fBw\fR -inverse partial newline-sensitive (``weird'') matching (see MATCHING, below) -.TP 3 -\fBx\fR -expanded syntax (see below) -.RE -.PP -Embedded options take effect at the -\fB)\fR -terminating the sequence. -They are available only at the start of an ARE, -and may not be used later within it. -.PP -In addition to the usual (\fItight\fR) RE syntax, in which all characters are -significant, there is an \fIexpanded\fR syntax, -available in all flavors of RE -with the \fB-expanded\fR switch, or in AREs with the embedded x option. -In the expanded syntax, -white-space characters are ignored -and all characters between a -\fB#\fR -and the following newline (or the end of the RE) are ignored, -permitting paragraphing and commenting a complex RE. -There are three exceptions to that basic rule: -.RS 2 -.PP -a white-space character or `\fB#\fR' preceded by `\fB\e\fR' is retained -.PP -white space or `\fB#\fR' within a bracket expression is retained -.PP -white space and comments are illegal within multi-character symbols -like the ARE `\fB(?:\fR' or the BRE `\fB\e(\fR' -.RE -.PP -Expanded-syntax white-space characters are blank, tab, newline, and -.VS 8.2 -any character that belongs to the \fIspace\fR character class. -.VE 8.2 -.PP -Finally, in an ARE, -outside bracket expressions, the sequence `\fB(?#\fIttt\fB)\fR' -(where -\fIttt\fR -is any text not containing a `\fB)\fR') -is a comment, -completely ignored. -Again, this is not allowed between the characters of -multi-character symbols like `\fB(?:\fR'. -Such comments are more a historical artifact than a useful facility, -and their use is deprecated; -use the expanded syntax instead. -.PP -\fINone\fR of these metasyntax extensions is available if the application -(or an initial -\fB***=\fR -director) -has specified that the user's input be treated as a literal string -rather than as an RE. -.SH MATCHING -In the event that an RE could match more than one substring of a given -string, -the RE matches the one starting earliest in the string. -If the RE could match more than one substring starting at that point, -its choice is determined by its \fIpreference\fR: -either the longest substring, or the shortest. -.PP -Most atoms, and all constraints, have no preference. -A parenthesized RE has the same preference (possibly none) as the RE. -A quantified atom with quantifier -\fB{\fIm\fB}\fR -or -\fB{\fIm\fB}?\fR -has the same preference (possibly none) as the atom itself. -A quantified atom with other normal quantifiers (including -\fB{\fIm\fB,\fIn\fB}\fR -with -\fIm\fR -equal to -\fIn\fR) -prefers longest match. -A quantified atom with other non-greedy quantifiers (including -\fB{\fIm\fB,\fIn\fB}?\fR -with -\fIm\fR -equal to -\fIn\fR) -prefers shortest match. -A branch has the same preference as the first quantified atom in it -which has a preference. -An RE consisting of two or more branches connected by the -\fB|\fR -operator prefers longest match. -.PP -Subject to the constraints imposed by the rules for matching the whole RE, -subexpressions also match the longest or shortest possible substrings, -based on their preferences, -with subexpressions starting earlier in the RE taking priority over -ones starting later. -Note that outer subexpressions thus take priority over -their component subexpressions. -.PP -Note that the quantifiers -\fB{1,1}\fR -and -\fB{1,1}?\fR -can be used to force longest and shortest preference, respectively, -on a subexpression or a whole RE. -.PP -Match lengths are measured in characters, not collating elements. -An empty string is considered longer than no match at all. -For example, -\fBbb*\fR -matches the three middle characters of `\fBabbbc\fR', -\fB(week|wee)(night|knights)\fR -matches all ten characters of `\fBweeknights\fR', -when -\fB(.*).*\fR -is matched against -\fBabc\fR -the parenthesized subexpression -matches all three characters, and -when -\fB(a*)*\fR -is matched against -\fBbc\fR -both the whole RE and the parenthesized -subexpression match an empty string. -.PP -If case-independent matching is specified, -the effect is much as if all case distinctions had vanished from the -alphabet. -When an alphabetic that exists in multiple cases appears as an -ordinary character outside a bracket expression, it is effectively -transformed into a bracket expression containing both cases, -so that -\fBx\fR -becomes `\fB[xX]\fR'. -When it appears inside a bracket expression, all case counterparts -of it are added to the bracket expression, so that -\fB[x]\fR -becomes -\fB[xX]\fR -and -\fB[^x]\fR -becomes `\fB[^xX]\fR'. -.PP -If newline-sensitive matching is specified, \fB.\fR -and bracket expressions using -\fB^\fR -will never match the newline character -(so that matches will never cross newlines unless the RE -explicitly arranges it) -and -\fB^\fR -and -\fB$\fR -will match the empty string after and before a newline -respectively, in addition to matching at beginning and end of string -respectively. -ARE -\fB\eA\fR -and -\fB\eZ\fR -continue to match beginning or end of string \fIonly\fR. -.PP -If partial newline-sensitive matching is specified, -this affects \fB.\fR -and bracket expressions -as with newline-sensitive matching, but not -\fB^\fR -and `\fB$\fR'. -.PP -If inverse partial newline-sensitive matching is specified, -this affects -\fB^\fR -and -\fB$\fR -as with -newline-sensitive matching, -but not \fB.\fR -and bracket expressions. -This isn't very useful but is provided for symmetry. -.SH "LIMITS AND COMPATIBILITY" -No particular limit is imposed on the length of REs. -Programs intended to be highly portable should not employ REs longer -than 256 bytes, -as a POSIX-compliant implementation can refuse to accept such REs. -.PP -The only feature of AREs that is actually incompatible with -POSIX EREs is that -\fB\e\fR -does not lose its special -significance inside bracket expressions. -All other ARE features use syntax which is illegal or has -undefined or unspecified effects in POSIX EREs; -the -\fB***\fR -syntax of directors likewise is outside the POSIX -syntax for both BREs and EREs. -.PP -Many of the ARE extensions are borrowed from Perl, but some have -been changed to clean them up, and a few Perl extensions are not present. -Incompatibilities of note include `\fB\eb\fR', `\fB\eB\fR', -the lack of special treatment for a trailing newline, -the addition of complemented bracket expressions to the things -affected by newline-sensitive matching, -the restrictions on parentheses and back references in lookahead constraints, -and the longest/shortest-match (rather than first-match) matching semantics. -.PP -The matching rules for REs containing both normal and non-greedy quantifiers -have changed since early beta-test versions of this package. -(The new rules are much simpler and cleaner, -but don't work as hard at guessing the user's real intentions.) -.PP -Henry Spencer's original 1986 \fIregexp\fR package, -still in widespread use (e.g., in pre-8.1 releases of Tcl), -implemented an early version of today's EREs. -There are four incompatibilities between \fIregexp\fR's near-EREs -(`RREs' for short) and AREs. -In roughly increasing order of significance: -.PP -.RS -In AREs, -\fB\e\fR -followed by an alphanumeric character is either an -escape or an error, -while in RREs, it was just another way of writing the -alphanumeric. -This should not be a problem because there was no reason to write -such a sequence in RREs. -.PP -\fB{\fR -followed by a digit in an ARE is the beginning of a bound, -while in RREs, -\fB{\fR -was always an ordinary character. -Such sequences should be rare, -and will often result in an error because following characters -will not look like a valid bound. -.PP -In AREs, -\fB\e\fR -remains a special character within `\fB[\|]\fR', -so a literal -\fB\e\fR -within -\fB[\|]\fR -must be written `\fB\e\e\fR'. -\fB\e\e\fR -also gives a literal -\fB\e\fR -within -\fB[\|]\fR -in RREs, -but only truly paranoid programmers routinely doubled the backslash. -.PP -AREs report the longest/shortest match for the RE, -rather than the first found in a specified search order. -This may affect some RREs which were written in the expectation that -the first match would be reported. -(The careful crafting of RREs to optimize the search order for fast -matching is obsolete (AREs examine all possible matches -in parallel, and their performance is largely insensitive to their -complexity) but cases where the search order was exploited to deliberately -find a match which was \fInot\fR the longest/shortest will need rewriting.) -.RE - -.SH "BASIC REGULAR EXPRESSIONS" -BREs differ from EREs in several respects. `\fB|\fR', `\fB+\fR', -and -\fB?\fR -are ordinary characters and there is no equivalent -for their functionality. -The delimiters for bounds are -\fB\e{\fR -and `\fB\e}\fR', -with -\fB{\fR -and -\fB}\fR -by themselves ordinary characters. -The parentheses for nested subexpressions are -\fB\e(\fR -and `\fB\e)\fR', -with -\fB(\fR -and -\fB)\fR -by themselves ordinary characters. -\fB^\fR -is an ordinary character except at the beginning of the -RE or the beginning of a parenthesized subexpression, -\fB$\fR -is an ordinary character except at the end of the -RE or the end of a parenthesized subexpression, -and -\fB*\fR -is an ordinary character if it appears at the beginning of the -RE or the beginning of a parenthesized subexpression -(after a possible leading `\fB^\fR'). -Finally, -single-digit back references are available, -and -\fB\e<\fR -and -\fB\e>\fR -are synonyms for -\fB[[:<:]]\fR -and -\fB[[:>:]]\fR -respectively; -no other escapes are available. - -.SH "SEE ALSO" -RegExp(3), regexp(n), regsub(n), lsearch(n), switch(n), text(n) - -.SH KEYWORDS -match, regular expression, string diff --git a/src/regex/regc_color.c b/src/regex/regc_color.c deleted file mode 100644 index 5376af2ed5..0000000000 --- a/src/regex/regc_color.c +++ /dev/null @@ -1,780 +0,0 @@ -/* - * colorings of characters - * This file is #included by regcomp.c. - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Header$ - * - * - * Note that there are some incestuous relationships between this code and - * NFA arc maintenance, which perhaps ought to be cleaned up sometime. - */ - - - -#define CISERR() VISERR(cm->v) -#define CERR(e) VERR(cm->v, (e)) - - - -/* - * initcm - set up new colormap - */ -static void -initcm(struct vars * v, - struct colormap * cm) -{ - int i; - int j; - union tree *t; - union tree *nextt; - struct colordesc *cd; - - cm->magic = CMMAGIC; - cm->v = v; - - cm->ncds = NINLINECDS; - cm->cd = cm->cdspace; - cm->max = 0; - cm->free = 0; - - cd = cm->cd; /* cm->cd[WHITE] */ - cd->sub = NOSUB; - cd->arcs = NULL; - cd->flags = 0; - cd->nchrs = CHR_MAX - CHR_MIN + 1; - - /* upper levels of tree */ - for (t = &cm->tree[0], j = NBYTS - 1; j > 0; t = nextt, j--) - { - nextt = t + 1; - for (i = BYTTAB - 1; i >= 0; i--) - t->tptr[i] = nextt; - } - /* bottom level is solid white */ - t = &cm->tree[NBYTS - 1]; - for (i = BYTTAB - 1; i >= 0; i--) - t->tcolor[i] = WHITE; - cd->block = t; -} - -/* - * freecm - free dynamically-allocated things in a colormap - */ -static void -freecm(struct colormap * cm) -{ - size_t i; - union tree *cb; - - cm->magic = 0; - if (NBYTS > 1) - cmtreefree(cm, cm->tree, 0); - for (i = 1; i <= cm->max; i++) /* skip WHITE */ - if (!UNUSEDCOLOR(&cm->cd[i])) - { - cb = cm->cd[i].block; - if (cb != NULL) - FREE(cb); - } - if (cm->cd != cm->cdspace) - FREE(cm->cd); -} - -/* - * cmtreefree - free a non-terminal part of a colormap tree - */ -static void -cmtreefree(struct colormap * cm, - union tree * tree, - int level) /* level number (top == 0) of this block */ -{ - int i; - union tree *t; - union tree *fillt = &cm->tree[level + 1]; - union tree *cb; - - assert(level < NBYTS - 1); /* this level has pointers */ - for (i = BYTTAB - 1; i >= 0; i--) - { - t = tree->tptr[i]; - assert(t != NULL); - if (t != fillt) - { - if (level < NBYTS - 2) - { /* more pointer blocks below */ - cmtreefree(cm, t, level + 1); - FREE(t); - } - else - { /* color block below */ - cb = cm->cd[t->tcolor[0]].block; - if (t != cb) /* not a solid block */ - FREE(t); - } - } - } -} - -/* - * setcolor - set the color of a character in a colormap - */ -static color /* previous color */ -setcolor(struct colormap * cm, - chr c, - pcolor co) -{ - uchr uc = c; - int shift; - int level; - int b; - int bottom; - union tree *t; - union tree *newt; - union tree *fillt; - union tree *lastt; - union tree *cb; - color prev; - - assert(cm->magic == CMMAGIC); - if (CISERR() || co == COLORLESS) - return COLORLESS; - - t = cm->tree; - for (level = 0, shift = BYTBITS * (NBYTS - 1); shift > 0; - level++, shift -= BYTBITS) - { - b = (uc >> shift) & BYTMASK; - lastt = t; - t = lastt->tptr[b]; - assert(t != NULL); - fillt = &cm->tree[level + 1]; - bottom = (shift <= BYTBITS) ? 1 : 0; - cb = (bottom) ? cm->cd[t->tcolor[0]].block : fillt; - if (t == fillt || t == cb) - { /* must allocate a new block */ - newt = (union tree *) MALLOC((bottom) ? - sizeof(struct colors) : sizeof(struct ptrs)); - if (newt == NULL) - { - CERR(REG_ESPACE); - return COLORLESS; - } - if (bottom) - memcpy(VS(newt->tcolor), VS(t->tcolor), - BYTTAB * sizeof(color)); - else - memcpy(VS(newt->tptr), VS(t->tptr), - BYTTAB * sizeof(union tree *)); - t = newt; - lastt->tptr[b] = t; - } - } - - b = uc & BYTMASK; - prev = t->tcolor[b]; - t->tcolor[b] = (color) co; - return prev; -} - -/* - * maxcolor - report largest color number in use - */ -static color -maxcolor(struct colormap * cm) -{ - if (CISERR()) - return COLORLESS; - - return (color) cm->max; -} - -/* - * newcolor - find a new color (must be subject of setcolor at once) - * Beware: may relocate the colordescs. - */ -static color /* COLORLESS for error */ -newcolor(struct colormap * cm) -{ - struct colordesc *cd; - struct colordesc *new; - size_t n; - - if (CISERR()) - return COLORLESS; - - if (cm->free != 0) - { - assert(cm->free > 0); - assert((size_t) cm->free < cm->ncds); - cd = &cm->cd[cm->free]; - assert(UNUSEDCOLOR(cd)); - assert(cd->arcs == NULL); - cm->free = cd->sub; - } - else if (cm->max < cm->ncds - 1) - { - cm->max++; - cd = &cm->cd[cm->max]; - } - else - { - /* oops, must allocate more */ - n = cm->ncds * 2; - if (cm->cd == cm->cdspace) - { - new = (struct colordesc *) MALLOC(n * - sizeof(struct colordesc)); - if (new != NULL) - memcpy(VS(new), VS(cm->cdspace), cm->ncds * - sizeof(struct colordesc)); - } - else - new = (struct colordesc *) REALLOC(cm->cd, - n * sizeof(struct colordesc)); - if (new == NULL) - { - CERR(REG_ESPACE); - return COLORLESS; - } - cm->cd = new; - cm->ncds = n; - assert(cm->max < cm->ncds - 1); - cm->max++; - cd = &cm->cd[cm->max]; - } - - cd->nchrs = 0; - cd->sub = NOSUB; - cd->arcs = NULL; - cd->flags = 0; - cd->block = NULL; - - return (color) (cd - cm->cd); -} - -/* - * freecolor - free a color (must have no arcs or subcolor) - */ -static void -freecolor(struct colormap * cm, - pcolor co) -{ - struct colordesc *cd = &cm->cd[co]; - color pco, - nco; /* for freelist scan */ - - assert(co >= 0); - if (co == WHITE) - return; - - assert(cd->arcs == NULL); - assert(cd->sub == NOSUB); - assert(cd->nchrs == 0); - cd->flags = FREECOL; - if (cd->block != NULL) - { - FREE(cd->block); - cd->block = NULL; /* just paranoia */ - } - - if ((size_t) co == cm->max) - { - while (cm->max > WHITE && UNUSEDCOLOR(&cm->cd[cm->max])) - cm->max--; - assert(cm->free >= 0); - while ((size_t) cm->free > cm->max) - cm->free = cm->cd[cm->free].sub; - if (cm->free > 0) - { - assert(cm->free < cm->max); - pco = cm->free; - nco = cm->cd[pco].sub; - while (nco > 0) - if ((size_t) nco > cm->max) - { - /* take this one out of freelist */ - nco = cm->cd[nco].sub; - cm->cd[pco].sub = nco; - } - else - { - assert(nco < cm->max); - pco = nco; - nco = cm->cd[pco].sub; - } - } - } - else - { - cd->sub = cm->free; - cm->free = (color) (cd - cm->cd); - } -} - -/* - * pseudocolor - allocate a false color, to be managed by other means - */ -static color -pseudocolor(struct colormap * cm) -{ - color co; - - co = newcolor(cm); - if (CISERR()) - return COLORLESS; - cm->cd[co].nchrs = 1; - cm->cd[co].flags = PSEUDO; - return co; -} - -/* - * subcolor - allocate a new subcolor (if necessary) to this chr - */ -static color -subcolor(struct colormap * cm, chr c) -{ - color co; /* current color of c */ - color sco; /* new subcolor */ - - co = GETCOLOR(cm, c); - sco = newsub(cm, co); - if (CISERR()) - return COLORLESS; - assert(sco != COLORLESS); - - if (co == sco) /* already in an open subcolor */ - return co; /* rest is redundant */ - cm->cd[co].nchrs--; - cm->cd[sco].nchrs++; - setcolor(cm, c, sco); - return sco; -} - -/* - * newsub - allocate a new subcolor (if necessary) for a color - */ -static color -newsub(struct colormap * cm, - pcolor co) -{ - color sco; /* new subcolor */ - - sco = cm->cd[co].sub; - if (sco == NOSUB) - { /* color has no open subcolor */ - if (cm->cd[co].nchrs == 1) /* optimization */ - return co; - sco = newcolor(cm); /* must create subcolor */ - if (sco == COLORLESS) - { - assert(CISERR()); - return COLORLESS; - } - cm->cd[co].sub = sco; - cm->cd[sco].sub = sco; /* open subcolor points to self */ - } - assert(sco != NOSUB); - - return sco; -} - -/* - * subrange - allocate new subcolors to this range of chrs, fill in arcs - */ -static void -subrange(struct vars * v, - chr from, - chr to, - struct state * lp, - struct state * rp) -{ - uchr uf; - int i; - - assert(from <= to); - - /* first, align "from" on a tree-block boundary */ - uf = (uchr) from; - i = (int) (((uf + BYTTAB - 1) & (uchr) ~BYTMASK) - uf); - for (; from <= to && i > 0; i--, from++) - newarc(v->nfa, PLAIN, subcolor(v->cm, from), lp, rp); - if (from > to) /* didn't reach a boundary */ - return; - - /* deal with whole blocks */ - for (; to - from >= BYTTAB; from += BYTTAB) - subblock(v, from, lp, rp); - - /* clean up any remaining partial table */ - for (; from <= to; from++) - newarc(v->nfa, PLAIN, subcolor(v->cm, from), lp, rp); -} - -/* - * subblock - allocate new subcolors for one tree block of chrs, fill in arcs - */ -static void -subblock(struct vars * v, - chr start, /* first of BYTTAB chrs */ - struct state * lp, - struct state * rp) -{ - uchr uc = start; - struct colormap *cm = v->cm; - int shift; - int level; - int i; - int b; - union tree *t; - union tree *cb; - union tree *fillt; - union tree *lastt; - int previ; - int ndone; - color co; - color sco; - - assert((uc % BYTTAB) == 0); - - /* find its color block, making new pointer blocks as needed */ - t = cm->tree; - fillt = NULL; - for (level = 0, shift = BYTBITS * (NBYTS - 1); shift > 0; - level++, shift -= BYTBITS) - { - b = (uc >> shift) & BYTMASK; - lastt = t; - t = lastt->tptr[b]; - assert(t != NULL); - fillt = &cm->tree[level + 1]; - if (t == fillt && shift > BYTBITS) - { /* need new ptr block */ - t = (union tree *) MALLOC(sizeof(struct ptrs)); - if (t == NULL) - { - CERR(REG_ESPACE); - return; - } - memcpy(VS(t->tptr), VS(fillt->tptr), - BYTTAB * sizeof(union tree *)); - lastt->tptr[b] = t; - } - } - - /* special cases: fill block or solid block */ - co = t->tcolor[0]; - cb = cm->cd[co].block; - if (t == fillt || t == cb) - { - /* either way, we want a subcolor solid block */ - sco = newsub(cm, co); - t = cm->cd[sco].block; - if (t == NULL) - { /* must set it up */ - t = (union tree *) MALLOC(sizeof(struct colors)); - if (t == NULL) - { - CERR(REG_ESPACE); - return; - } - for (i = 0; i < BYTTAB; i++) - t->tcolor[i] = sco; - cm->cd[sco].block = t; - } - /* find loop must have run at least once */ - lastt->tptr[b] = t; - newarc(v->nfa, PLAIN, sco, lp, rp); - cm->cd[co].nchrs -= BYTTAB; - cm->cd[sco].nchrs += BYTTAB; - return; - } - - /* general case, a mixed block to be altered */ - i = 0; - while (i < BYTTAB) - { - co = t->tcolor[i]; - sco = newsub(cm, co); - newarc(v->nfa, PLAIN, sco, lp, rp); - previ = i; - do - { - t->tcolor[i++] = sco; - } while (i < BYTTAB && t->tcolor[i] == co); - ndone = i - previ; - cm->cd[co].nchrs -= ndone; - cm->cd[sco].nchrs += ndone; - } -} - -/* - * okcolors - promote subcolors to full colors - */ -static void -okcolors(struct nfa * nfa, - struct colormap * cm) -{ - struct colordesc *cd; - struct colordesc *end = CDEND(cm); - struct colordesc *scd; - struct arc *a; - color co; - color sco; - - for (cd = cm->cd, co = 0; cd < end; cd++, co++) - { - sco = cd->sub; - if (UNUSEDCOLOR(cd) || sco == NOSUB) - { - /* has no subcolor, no further action */ - } - else if (sco == co) - { - /* is subcolor, let parent deal with it */ - } - else if (cd->nchrs == 0) - { - /* parent empty, its arcs change color to subcolor */ - cd->sub = NOSUB; - scd = &cm->cd[sco]; - assert(scd->nchrs > 0); - assert(scd->sub == sco); - scd->sub = NOSUB; - while ((a = cd->arcs) != NULL) - { - assert(a->co == co); - /* uncolorchain(cm, a); */ - cd->arcs = a->colorchain; - a->co = sco; - /* colorchain(cm, a); */ - a->colorchain = scd->arcs; - scd->arcs = a; - } - freecolor(cm, co); - } - else - { - /* parent's arcs must gain parallel subcolor arcs */ - cd->sub = NOSUB; - scd = &cm->cd[sco]; - assert(scd->nchrs > 0); - assert(scd->sub == sco); - scd->sub = NOSUB; - for (a = cd->arcs; a != NULL; a = a->colorchain) - { - assert(a->co == co); - newarc(nfa, a->type, sco, a->from, a->to); - } - } - } -} - -/* - * colorchain - add this arc to the color chain of its color - */ -static void -colorchain(struct colormap * cm, - struct arc * a) -{ - struct colordesc *cd = &cm->cd[a->co]; - - a->colorchain = cd->arcs; - cd->arcs = a; -} - -/* - * uncolorchain - delete this arc from the color chain of its color - */ -static void -uncolorchain(struct colormap * cm, - struct arc * a) -{ - struct colordesc *cd = &cm->cd[a->co]; - struct arc *aa; - - aa = cd->arcs; - if (aa == a) /* easy case */ - cd->arcs = a->colorchain; - else - { - for (; aa != NULL && aa->colorchain != a; aa = aa->colorchain) - continue; - assert(aa != NULL); - aa->colorchain = a->colorchain; - } - a->colorchain = NULL; /* paranoia */ -} - -/* - * singleton - is this character in its own color? - */ -static int /* predicate */ -singleton(struct colormap * cm, - chr c) -{ - color co; /* color of c */ - - co = GETCOLOR(cm, c); - if (cm->cd[co].nchrs == 1 && cm->cd[co].sub == NOSUB) - return 1; - return 0; -} - -/* - * rainbow - add arcs of all full colors (but one) between specified states - */ -static void -rainbow(struct nfa * nfa, - struct colormap * cm, - int type, - pcolor but, /* COLORLESS if no exceptions */ - struct state * from, - struct state * to) -{ - struct colordesc *cd; - struct colordesc *end = CDEND(cm); - color co; - - for (cd = cm->cd, co = 0; cd < end && !CISERR(); cd++, co++) - if (!UNUSEDCOLOR(cd) && cd->sub != co && co != but && - !(cd->flags & PSEUDO)) - newarc(nfa, type, co, from, to); -} - -/* - * colorcomplement - add arcs of complementary colors - * - * The calling sequence ought to be reconciled with cloneouts(). - */ -static void -colorcomplement(struct nfa * nfa, - struct colormap * cm, - int type, - struct state * of, /* complements of this guy's PLAIN - * outarcs */ - struct state * from, - struct state * to) -{ - struct colordesc *cd; - struct colordesc *end = CDEND(cm); - color co; - - assert(of != from); - for (cd = cm->cd, co = 0; cd < end && !CISERR(); cd++, co++) - if (!UNUSEDCOLOR(cd) && !(cd->flags & PSEUDO)) - if (findarc(of, PLAIN, co) == NULL) - newarc(nfa, type, co, from, to); -} - - -#ifdef REG_DEBUG - -/* - * dumpcolors - debugging output - */ -static void -dumpcolors(struct colormap * cm, - FILE *f) -{ - struct colordesc *cd; - struct colordesc *end; - color co; - chr c; - char *has; - - fprintf(f, "max %ld\n", (long) cm->max); - if (NBYTS > 1) - fillcheck(cm, cm->tree, 0, f); - end = CDEND(cm); - for (cd = cm->cd + 1, co = 1; cd < end; cd++, co++) /* skip 0 */ - if (!UNUSEDCOLOR(cd)) - { - assert(cd->nchrs > 0); - has = (cd->block != NULL) ? "#" : ""; - if (cd->flags & PSEUDO) - fprintf(f, "#%2ld%s(ps): ", (long) co, has); - else - fprintf(f, "#%2ld%s(%2d): ", (long) co, - has, cd->nchrs); - /* it's hard to do this more efficiently */ - for (c = CHR_MIN; c < CHR_MAX; c++) - if (GETCOLOR(cm, c) == co) - dumpchr(c, f); - assert(c == CHR_MAX); - if (GETCOLOR(cm, c) == co) - dumpchr(c, f); - fprintf(f, "\n"); - } -} - -/* - * fillcheck - check proper filling of a tree - */ -static void -fillcheck(struct colormap * cm, - union tree * tree, - int level, /* level number (top == 0) of this block */ - FILE *f) -{ - int i; - union tree *t; - union tree *fillt = &cm->tree[level + 1]; - - assert(level < NBYTS - 1); /* this level has pointers */ - for (i = BYTTAB - 1; i >= 0; i--) - { - t = tree->tptr[i]; - if (t == NULL) - fprintf(f, "NULL found in filled tree!\n"); - else if (t == fillt) - { - } - else if (level < NBYTS - 2) /* more pointer blocks below */ - fillcheck(cm, t, level + 1, f); - } -} - -/* - * dumpchr - print a chr - * - * Kind of char-centric but works well enough for debug use. - */ -static void -dumpchr(chr c, - FILE *f) -{ - if (c == '\\') - fprintf(f, "\\\\"); - else if (c > ' ' && c <= '~') - putc((char) c, f); - else - fprintf(f, "\\u%04lx", (long) c); -} - -#endif /* REG_DEBUG */ diff --git a/src/regex/regc_lex.c b/src/regex/regc_lex.c deleted file mode 100644 index a24290d1a1..0000000000 --- a/src/regex/regc_lex.c +++ /dev/null @@ -1,1146 +0,0 @@ -/* - * lexical analyzer - * This file is #included by regcomp.c. - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Header$ - * - */ - -/* scanning macros (know about v) */ -#define ATEOS() (v->now >= v->stop) -#define HAVE(n) (v->stop - v->now >= (n)) -#define NEXT1(c) (!ATEOS() && *v->now == CHR(c)) -#define NEXT2(a,b) (HAVE(2) && *v->now == CHR(a) && *(v->now+1) == CHR(b)) -#define NEXT3(a,b,c) (HAVE(3) && *v->now == CHR(a) && \ - *(v->now+1) == CHR(b) && \ - *(v->now+2) == CHR(c)) -#define SET(c) (v->nexttype = (c)) -#define SETV(c, n) (v->nexttype = (c), v->nextvalue = (n)) -#define RET(c) return (SET(c), 1) -#define RETV(c, n) return (SETV(c, n), 1) -#define FAILW(e) return (ERR(e), 0) /* ERR does SET(EOS) */ -#define LASTTYPE(t) (v->lasttype == (t)) - -/* lexical contexts */ -#define L_ERE 1 /* mainline ERE/ARE */ -#define L_BRE 2 /* mainline BRE */ -#define L_Q 3 /* REG_QUOTE */ -#define L_EBND 4 /* ERE/ARE bound */ -#define L_BBND 5 /* BRE bound */ -#define L_BRACK 6 /* brackets */ -#define L_CEL 7 /* collating element */ -#define L_ECL 8 /* equivalence class */ -#define L_CCL 9 /* character class */ -#define INTOCON(c) (v->lexcon = (c)) -#define INCON(con) (v->lexcon == (con)) - -/* construct pointer past end of chr array */ -#define ENDOF(array) ((array) + sizeof(array)/sizeof(chr)) - -/* - * lexstart - set up lexical stuff, scan leading options - */ -static void -lexstart(struct vars * v) -{ - prefixes(v); /* may turn on new type bits etc. */ - NOERR(); - - if (v->cflags & REG_QUOTE) - { - assert(!(v->cflags & (REG_ADVANCED | REG_EXPANDED | REG_NEWLINE))); - INTOCON(L_Q); - } - else if (v->cflags & REG_EXTENDED) - { - assert(!(v->cflags & REG_QUOTE)); - INTOCON(L_ERE); - } - else - { - assert(!(v->cflags & (REG_QUOTE | REG_ADVF))); - INTOCON(L_BRE); - } - - v->nexttype = EMPTY; /* remember we were at the start */ - next(v); /* set up the first token */ -} - -/* - * prefixes - implement various special prefixes - */ -static void -prefixes(struct vars * v) -{ - /* literal string doesn't get any of this stuff */ - if (v->cflags & REG_QUOTE) - return; - - /* initial "***" gets special things */ - if (HAVE(4) && NEXT3('*', '*', '*')) - switch (*(v->now + 3)) - { - case CHR('?'): /* "***?" error, msg shows version */ - ERR(REG_BADPAT); - return; /* proceed no further */ - break; - case CHR('='): /* "***=" shifts to literal string */ - NOTE(REG_UNONPOSIX); - v->cflags |= REG_QUOTE; - v->cflags &= ~(REG_ADVANCED | REG_EXPANDED | REG_NEWLINE); - v->now += 4; - return; /* and there can be no more prefixes */ - break; - case CHR(':'): /* "***:" shifts to AREs */ - NOTE(REG_UNONPOSIX); - v->cflags |= REG_ADVANCED; - v->now += 4; - break; - default: /* otherwise *** is just an error */ - ERR(REG_BADRPT); - return; - break; - } - - /* BREs and EREs don't get embedded options */ - if ((v->cflags & REG_ADVANCED) != REG_ADVANCED) - return; - - /* embedded options (AREs only) */ - if (HAVE(3) && NEXT2('(', '?') && iscalpha(*(v->now + 2))) - { - NOTE(REG_UNONPOSIX); - v->now += 2; - for (; !ATEOS() && iscalpha(*v->now); v->now++) - switch (*v->now) - { - case CHR('b'): /* BREs (but why???) */ - v->cflags &= ~(REG_ADVANCED | REG_QUOTE); - break; - case CHR('c'): /* case sensitive */ - v->cflags &= ~REG_ICASE; - break; - case CHR('e'): /* plain EREs */ - v->cflags |= REG_EXTENDED; - v->cflags &= ~(REG_ADVF | REG_QUOTE); - break; - case CHR('i'): /* case insensitive */ - v->cflags |= REG_ICASE; - break; - case CHR('m'): /* Perloid synonym for n */ - case CHR('n'): /* \n affects ^ $ . [^ */ - v->cflags |= REG_NEWLINE; - break; - case CHR('p'): /* ~Perl, \n affects . [^ */ - v->cflags |= REG_NLSTOP; - v->cflags &= ~REG_NLANCH; - break; - case CHR('q'): /* literal string */ - v->cflags |= REG_QUOTE; - v->cflags &= ~REG_ADVANCED; - break; - case CHR('s'): /* single line, \n ordinary */ - v->cflags &= ~REG_NEWLINE; - break; - case CHR('t'): /* tight syntax */ - v->cflags &= ~REG_EXPANDED; - break; - case CHR('w'): /* weird, \n affects ^ $ only */ - v->cflags &= ~REG_NLSTOP; - v->cflags |= REG_NLANCH; - break; - case CHR('x'): /* expanded syntax */ - v->cflags |= REG_EXPANDED; - break; - default: - ERR(REG_BADOPT); - return; - } - if (!NEXT1(')')) - { - ERR(REG_BADOPT); - return; - } - v->now++; - if (v->cflags & REG_QUOTE) - v->cflags &= ~(REG_EXPANDED | REG_NEWLINE); - } -} - -/* - * lexnest - "call a subroutine", interpolating string at the lexical level - * - * Note, this is not a very general facility. There are a number of - * implicit assumptions about what sorts of strings can be subroutines. - */ -static void -lexnest(struct vars * v, - chr *beginp, /* start of interpolation */ - chr *endp) /* one past end of interpolation */ -{ - assert(v->savenow == NULL); /* only one level of nesting */ - v->savenow = v->now; - v->savestop = v->stop; - v->now = beginp; - v->stop = endp; -} - -/* - * string constants to interpolate as expansions of things like \d - */ -static chr backd[] = { /* \d */ - CHR('['), CHR('['), CHR(':'), - CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'), - CHR(':'), CHR(']'), CHR(']') -}; -static chr backD[] = { /* \D */ - CHR('['), CHR('^'), CHR('['), CHR(':'), - CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'), - CHR(':'), CHR(']'), CHR(']') -}; -static chr brbackd[] = { /* \d within brackets */ - CHR('['), CHR(':'), - CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'), - CHR(':'), CHR(']') -}; -static chr backs[] = { /* \s */ - CHR('['), CHR('['), CHR(':'), - CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'), - CHR(':'), CHR(']'), CHR(']') -}; -static chr backS[] = { /* \S */ - CHR('['), CHR('^'), CHR('['), CHR(':'), - CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'), - CHR(':'), CHR(']'), CHR(']') -}; -static chr brbacks[] = { /* \s within brackets */ - CHR('['), CHR(':'), - CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'), - CHR(':'), CHR(']') -}; -static chr backw[] = { /* \w */ - CHR('['), CHR('['), CHR(':'), - CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'), - CHR(':'), CHR(']'), CHR('_'), CHR(']') -}; -static chr backW[] = { /* \W */ - CHR('['), CHR('^'), CHR('['), CHR(':'), - CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'), - CHR(':'), CHR(']'), CHR('_'), CHR(']') -}; -static chr brbackw[] = { /* \w within brackets */ - CHR('['), CHR(':'), - CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'), - CHR(':'), CHR(']'), CHR('_') -}; - -/* - * lexword - interpolate a bracket expression for word characters - * Possibly ought to inquire whether there is a "word" character class. - */ -static void -lexword(struct vars * v) -{ - lexnest(v, backw, ENDOF(backw)); -} - -/* - * next - get next token - */ -static int /* 1 normal, 0 failure */ -next(struct vars * v) -{ - chr c; - - /* errors yield an infinite sequence of failures */ - if (ISERR()) - return 0; /* the error has set nexttype to EOS */ - - /* remember flavor of last token */ - v->lasttype = v->nexttype; - - /* REG_BOSONLY */ - if (v->nexttype == EMPTY && (v->cflags & REG_BOSONLY)) - { - /* at start of a REG_BOSONLY RE */ - RETV(SBEGIN, 0); /* same as \A */ - } - - /* if we're nested and we've hit end, return to outer level */ - if (v->savenow != NULL && ATEOS()) - { - v->now = v->savenow; - v->stop = v->savestop; - v->savenow = v->savestop = NULL; - } - - /* skip white space etc. if appropriate (not in literal or []) */ - if (v->cflags & REG_EXPANDED) - switch (v->lexcon) - { - case L_ERE: - case L_BRE: - case L_EBND: - case L_BBND: - skip(v); - break; - } - - /* handle EOS, depending on context */ - if (ATEOS()) - { - switch (v->lexcon) - { - case L_ERE: - case L_BRE: - case L_Q: - RET(EOS); - break; - case L_EBND: - case L_BBND: - FAILW(REG_EBRACE); - break; - case L_BRACK: - case L_CEL: - case L_ECL: - case L_CCL: - FAILW(REG_EBRACK); - break; - } - assert(NOTREACHED); - } - - /* okay, time to actually get a character */ - c = *v->now++; - - /* deal with the easy contexts, punt EREs to code below */ - switch (v->lexcon) - { - case L_BRE: /* punt BREs to separate function */ - return brenext(v, c); - break; - case L_ERE: /* see below */ - break; - case L_Q: /* literal strings are easy */ - RETV(PLAIN, c); - break; - case L_BBND: /* bounds are fairly simple */ - case L_EBND: - switch (c) - { - case CHR('0'): - case CHR('1'): - case CHR('2'): - case CHR('3'): - case CHR('4'): - case CHR('5'): - case CHR('6'): - case CHR('7'): - case CHR('8'): - case CHR('9'): - RETV(DIGIT, (chr) DIGITVAL(c)); - break; - case CHR(','): - RET(','); - break; - case CHR('}'): /* ERE bound ends with } */ - if (INCON(L_EBND)) - { - INTOCON(L_ERE); - if ((v->cflags & REG_ADVF) && NEXT1('?')) - { - v->now++; - NOTE(REG_UNONPOSIX); - RETV('}', 0); - } - RETV('}', 1); - } - else - FAILW(REG_BADBR); - break; - case CHR('\\'): /* BRE bound ends with \} */ - if (INCON(L_BBND) && NEXT1('}')) - { - v->now++; - INTOCON(L_BRE); - RET('}'); - } - else - FAILW(REG_BADBR); - break; - default: - FAILW(REG_BADBR); - break; - } - assert(NOTREACHED); - break; - case L_BRACK: /* brackets are not too hard */ - switch (c) - { - case CHR(']'): - if (LASTTYPE('[')) - RETV(PLAIN, c); - else - { - INTOCON((v->cflags & REG_EXTENDED) ? - L_ERE : L_BRE); - RET(']'); - } - break; - case CHR('\\'): - NOTE(REG_UBBS); - if (!(v->cflags & REG_ADVF)) - RETV(PLAIN, c); - NOTE(REG_UNONPOSIX); - if (ATEOS()) - FAILW(REG_EESCAPE); - (DISCARD) lexescape(v); - switch (v->nexttype) - { /* not all escapes okay here */ - case PLAIN: - return 1; - break; - case CCLASS: - switch (v->nextvalue) - { - case 'd': - lexnest(v, brbackd, ENDOF(brbackd)); - break; - case 's': - lexnest(v, brbacks, ENDOF(brbacks)); - break; - case 'w': - lexnest(v, brbackw, ENDOF(brbackw)); - break; - default: - FAILW(REG_EESCAPE); - break; - } - /* lexnest done, back up and try again */ - v->nexttype = v->lasttype; - return next(v); - break; - } - /* not one of the acceptable escapes */ - FAILW(REG_EESCAPE); - break; - case CHR('-'): - if (LASTTYPE('[') || NEXT1(']')) - RETV(PLAIN, c); - else - RETV(RANGE, c); - break; - case CHR('['): - if (ATEOS()) - FAILW(REG_EBRACK); - switch (*v->now++) - { - case CHR('.'): - INTOCON(L_CEL); - /* might or might not be locale-specific */ - RET(COLLEL); - break; - case CHR('='): - INTOCON(L_ECL); - NOTE(REG_ULOCALE); - RET(ECLASS); - break; - case CHR(':'): - INTOCON(L_CCL); - NOTE(REG_ULOCALE); - RET(CCLASS); - break; - default: /* oops */ - v->now--; - RETV(PLAIN, c); - break; - } - assert(NOTREACHED); - break; - default: - RETV(PLAIN, c); - break; - } - assert(NOTREACHED); - break; - case L_CEL: /* collating elements are easy */ - if (c == CHR('.') && NEXT1(']')) - { - v->now++; - INTOCON(L_BRACK); - RETV(END, '.'); - } - else - RETV(PLAIN, c); - break; - case L_ECL: /* ditto equivalence classes */ - if (c == CHR('=') && NEXT1(']')) - { - v->now++; - INTOCON(L_BRACK); - RETV(END, '='); - } - else - RETV(PLAIN, c); - break; - case L_CCL: /* ditto character classes */ - if (c == CHR(':') && NEXT1(']')) - { - v->now++; - INTOCON(L_BRACK); - RETV(END, ':'); - } - else - RETV(PLAIN, c); - break; - default: - assert(NOTREACHED); - break; - } - - /* that got rid of everything except EREs and AREs */ - assert(INCON(L_ERE)); - - /* deal with EREs and AREs, except for backslashes */ - switch (c) - { - case CHR('|'): - RET('|'); - break; - case CHR('*'): - if ((v->cflags & REG_ADVF) && NEXT1('?')) - { - v->now++; - NOTE(REG_UNONPOSIX); - RETV('*', 0); - } - RETV('*', 1); - break; - case CHR('+'): - if ((v->cflags & REG_ADVF) && NEXT1('?')) - { - v->now++; - NOTE(REG_UNONPOSIX); - RETV('+', 0); - } - RETV('+', 1); - break; - case CHR('?'): - if ((v->cflags & REG_ADVF) && NEXT1('?')) - { - v->now++; - NOTE(REG_UNONPOSIX); - RETV('?', 0); - } - RETV('?', 1); - break; - case CHR('{'): /* bounds start or plain character */ - if (v->cflags & REG_EXPANDED) - skip(v); - if (ATEOS() || !iscdigit(*v->now)) - { - NOTE(REG_UBRACES); - NOTE(REG_UUNSPEC); - RETV(PLAIN, c); - } - else - { - NOTE(REG_UBOUNDS); - INTOCON(L_EBND); - RET('{'); - } - assert(NOTREACHED); - break; - case CHR('('): /* parenthesis, or advanced extension */ - if ((v->cflags & REG_ADVF) && NEXT1('?')) - { - NOTE(REG_UNONPOSIX); - v->now++; - switch (*v->now++) - { - case CHR(':'): /* non-capturing paren */ - RETV('(', 0); - break; - case CHR('#'): /* comment */ - while (!ATEOS() && *v->now != CHR(')')) - v->now++; - if (!ATEOS()) - v->now++; - assert(v->nexttype == v->lasttype); - return next(v); - break; - case CHR('='): /* positive lookahead */ - NOTE(REG_ULOOKAHEAD); - RETV(LACON, 1); - break; - case CHR('!'): /* negative lookahead */ - NOTE(REG_ULOOKAHEAD); - RETV(LACON, 0); - break; - default: - FAILW(REG_BADRPT); - break; - } - assert(NOTREACHED); - } - if (v->cflags & REG_NOSUB) - RETV('(', 0); /* all parens non-capturing */ - else - RETV('(', 1); - break; - case CHR(')'): - if (LASTTYPE('(')) - NOTE(REG_UUNSPEC); - RETV(')', c); - break; - case CHR('['): /* easy except for [[:<:]] and [[:>:]] */ - if (HAVE(6) && *(v->now + 0) == CHR('[') && - *(v->now + 1) == CHR(':') && - (*(v->now + 2) == CHR('<') || - *(v->now + 2) == CHR('>')) && - *(v->now + 3) == CHR(':') && - *(v->now + 4) == CHR(']') && - *(v->now + 5) == CHR(']')) - { - c = *(v->now + 2); - v->now += 6; - NOTE(REG_UNONPOSIX); - RET((c == CHR('<')) ? '<' : '>'); - } - INTOCON(L_BRACK); - if (NEXT1('^')) - { - v->now++; - RETV('[', 0); - } - RETV('[', 1); - break; - case CHR('.'): - RET('.'); - break; - case CHR('^'): - RET('^'); - break; - case CHR('$'): - RET('$'); - break; - case CHR('\\'): /* mostly punt backslashes to code below */ - if (ATEOS()) - FAILW(REG_EESCAPE); - break; - default: /* ordinary character */ - RETV(PLAIN, c); - break; - } - - /* ERE/ARE backslash handling; backslash already eaten */ - assert(!ATEOS()); - if (!(v->cflags & REG_ADVF)) - { /* only AREs have non-trivial escapes */ - if (iscalnum(*v->now)) - { - NOTE(REG_UBSALNUM); - NOTE(REG_UUNSPEC); - } - RETV(PLAIN, *v->now++); - } - (DISCARD) lexescape(v); - if (ISERR()) - FAILW(REG_EESCAPE); - if (v->nexttype == CCLASS) - { /* fudge at lexical level */ - switch (v->nextvalue) - { - case 'd': - lexnest(v, backd, ENDOF(backd)); - break; - case 'D': - lexnest(v, backD, ENDOF(backD)); - break; - case 's': - lexnest(v, backs, ENDOF(backs)); - break; - case 'S': - lexnest(v, backS, ENDOF(backS)); - break; - case 'w': - lexnest(v, backw, ENDOF(backw)); - break; - case 'W': - lexnest(v, backW, ENDOF(backW)); - break; - default: - assert(NOTREACHED); - FAILW(REG_ASSERT); - break; - } - /* lexnest done, back up and try again */ - v->nexttype = v->lasttype; - return next(v); - } - /* otherwise, lexescape has already done the work */ - return !ISERR(); -} - -/* - * lexescape - parse an ARE backslash escape (backslash already eaten) - * Note slightly nonstandard use of the CCLASS type code. - */ -static int /* not actually used, but convenient for - * RETV */ -lexescape(struct vars * v) -{ - chr c; - static chr alert[] = { - CHR('a'), CHR('l'), CHR('e'), CHR('r'), CHR('t') - }; - static chr esc[] = { - CHR('E'), CHR('S'), CHR('C') - }; - chr *save; - - assert(v->cflags & REG_ADVF); - - assert(!ATEOS()); - c = *v->now++; - if (!iscalnum(c)) - RETV(PLAIN, c); - - NOTE(REG_UNONPOSIX); - switch (c) - { - case CHR('a'): - RETV(PLAIN, chrnamed(v, alert, ENDOF(alert), CHR('\007'))); - break; - case CHR('A'): - RETV(SBEGIN, 0); - break; - case CHR('b'): - RETV(PLAIN, CHR('\b')); - break; - case CHR('B'): - RETV(PLAIN, CHR('\\')); - break; - case CHR('c'): - NOTE(REG_UUNPORT); - if (ATEOS()) - FAILW(REG_EESCAPE); - RETV(PLAIN, (chr) (*v->now++ & 037)); - break; - case CHR('d'): - NOTE(REG_ULOCALE); - RETV(CCLASS, 'd'); - break; - case CHR('D'): - NOTE(REG_ULOCALE); - RETV(CCLASS, 'D'); - break; - case CHR('e'): - NOTE(REG_UUNPORT); - RETV(PLAIN, chrnamed(v, esc, ENDOF(esc), CHR('\033'))); - break; - case CHR('f'): - RETV(PLAIN, CHR('\f')); - break; - case CHR('m'): - RET('<'); - break; - case CHR('M'): - RET('>'); - break; - case CHR('n'): - RETV(PLAIN, CHR('\n')); - break; - case CHR('r'): - RETV(PLAIN, CHR('\r')); - break; - case CHR('s'): - NOTE(REG_ULOCALE); - RETV(CCLASS, 's'); - break; - case CHR('S'): - NOTE(REG_ULOCALE); - RETV(CCLASS, 'S'); - break; - case CHR('t'): - RETV(PLAIN, CHR('\t')); - break; - case CHR('u'): - c = lexdigits(v, 16, 4, 4); - if (ISERR()) - FAILW(REG_EESCAPE); - RETV(PLAIN, c); - break; - case CHR('U'): - c = lexdigits(v, 16, 8, 8); - if (ISERR()) - FAILW(REG_EESCAPE); - RETV(PLAIN, c); - break; - case CHR('v'): - RETV(PLAIN, CHR('\v')); - break; - case CHR('w'): - NOTE(REG_ULOCALE); - RETV(CCLASS, 'w'); - break; - case CHR('W'): - NOTE(REG_ULOCALE); - RETV(CCLASS, 'W'); - break; - case CHR('x'): - NOTE(REG_UUNPORT); - c = lexdigits(v, 16, 1, 255); /* REs >255 long outside - * spec */ - if (ISERR()) - FAILW(REG_EESCAPE); - RETV(PLAIN, c); - break; - case CHR('y'): - NOTE(REG_ULOCALE); - RETV(WBDRY, 0); - break; - case CHR('Y'): - NOTE(REG_ULOCALE); - RETV(NWBDRY, 0); - break; - case CHR('Z'): - RETV(SEND, 0); - break; - case CHR('1'): - case CHR('2'): - case CHR('3'): - case CHR('4'): - case CHR('5'): - case CHR('6'): - case CHR('7'): - case CHR('8'): - case CHR('9'): - save = v->now; - v->now--; /* put first digit back */ - c = lexdigits(v, 10, 1, 255); /* REs >255 long outside - * spec */ - if (ISERR()) - FAILW(REG_EESCAPE); - /* ugly heuristic (first test is "exactly 1 digit?") */ - if (v->now - save == 0 || (int) c <= v->nsubexp) - { - NOTE(REG_UBACKREF); - RETV(BACKREF, (chr) c); - } - /* oops, doesn't look like it's a backref after all... */ - v->now = save; - /* and fall through into octal number */ - case CHR('0'): - NOTE(REG_UUNPORT); - v->now--; /* put first digit back */ - c = lexdigits(v, 8, 1, 3); - if (ISERR()) - FAILW(REG_EESCAPE); - RETV(PLAIN, c); - break; - default: - assert(iscalpha(c)); - FAILW(REG_EESCAPE); /* unknown alphabetic escape */ - break; - } - assert(NOTREACHED); -} - -/* - * lexdigits - slurp up digits and return chr value - */ -static chr /* chr value; errors signalled via ERR */ -lexdigits(struct vars * v, - int base, - int minlen, - int maxlen) -{ - uchr n; /* unsigned to avoid overflow misbehavior */ - int len; - chr c; - int d; - const uchr ub = (uchr) base; - - n = 0; - for (len = 0; len < maxlen && !ATEOS(); len++) - { - c = *v->now++; - switch (c) - { - case CHR('0'): - case CHR('1'): - case CHR('2'): - case CHR('3'): - case CHR('4'): - case CHR('5'): - case CHR('6'): - case CHR('7'): - case CHR('8'): - case CHR('9'): - d = DIGITVAL(c); - break; - case CHR('a'): - case CHR('A'): - d = 10; - break; - case CHR('b'): - case CHR('B'): - d = 11; - break; - case CHR('c'): - case CHR('C'): - d = 12; - break; - case CHR('d'): - case CHR('D'): - d = 13; - break; - case CHR('e'): - case CHR('E'): - d = 14; - break; - case CHR('f'): - case CHR('F'): - d = 15; - break; - default: - v->now--; /* oops, not a digit at all */ - d = -1; - break; - } - - if (d >= base) - { /* not a plausible digit */ - v->now--; - d = -1; - } - if (d < 0) - break; /* NOTE BREAK OUT */ - n = n * ub + (uchr) d; - } - if (len < minlen) - ERR(REG_EESCAPE); - - return (chr) n; -} - -/* - * brenext - get next BRE token - * - * This is much like EREs except for all the stupid backslashes and the - * context-dependency of some things. - */ -static int /* 1 normal, 0 failure */ -brenext(struct vars * v, - chr pc) -{ - chr c = (chr) pc; - - switch (c) - { - case CHR('*'): - if (LASTTYPE(EMPTY) || LASTTYPE('(') || LASTTYPE('^')) - RETV(PLAIN, c); - RET('*'); - break; - case CHR('['): - if (HAVE(6) && *(v->now + 0) == CHR('[') && - *(v->now + 1) == CHR(':') && - (*(v->now + 2) == CHR('<') || - *(v->now + 2) == CHR('>')) && - *(v->now + 3) == CHR(':') && - *(v->now + 4) == CHR(']') && - *(v->now + 5) == CHR(']')) - { - c = *(v->now + 2); - v->now += 6; - NOTE(REG_UNONPOSIX); - RET((c == CHR('<')) ? '<' : '>'); - } - INTOCON(L_BRACK); - if (NEXT1('^')) - { - v->now++; - RETV('[', 0); - } - RETV('[', 1); - break; - case CHR('.'): - RET('.'); - break; - case CHR('^'): - if (LASTTYPE(EMPTY)) - RET('^'); - if (LASTTYPE('(')) - { - NOTE(REG_UUNSPEC); - RET('^'); - } - RETV(PLAIN, c); - break; - case CHR('$'): - if (v->cflags & REG_EXPANDED) - skip(v); - if (ATEOS()) - RET('$'); - if (NEXT2('\\', ')')) - { - NOTE(REG_UUNSPEC); - RET('$'); - } - RETV(PLAIN, c); - break; - case CHR('\\'): - break; /* see below */ - default: - RETV(PLAIN, c); - break; - } - - assert(c == CHR('\\')); - - if (ATEOS()) - FAILW(REG_EESCAPE); - - c = *v->now++; - switch (c) - { - case CHR('{'): - INTOCON(L_BBND); - NOTE(REG_UBOUNDS); - RET('{'); - break; - case CHR('('): - RETV('(', 1); - break; - case CHR(')'): - RETV(')', c); - break; - case CHR('<'): - NOTE(REG_UNONPOSIX); - RET('<'); - break; - case CHR('>'): - NOTE(REG_UNONPOSIX); - RET('>'); - break; - case CHR('1'): - case CHR('2'): - case CHR('3'): - case CHR('4'): - case CHR('5'): - case CHR('6'): - case CHR('7'): - case CHR('8'): - case CHR('9'): - NOTE(REG_UBACKREF); - RETV(BACKREF, (chr) DIGITVAL(c)); - break; - default: - if (iscalnum(c)) - { - NOTE(REG_UBSALNUM); - NOTE(REG_UUNSPEC); - } - RETV(PLAIN, c); - break; - } - - assert(NOTREACHED); -} - -/* - * skip - skip white space and comments in expanded form - */ -static void -skip(struct vars * v) -{ - chr *start = v->now; - - assert(v->cflags & REG_EXPANDED); - - for (;;) - { - while (!ATEOS() && iscspace(*v->now)) - v->now++; - if (ATEOS() || *v->now != CHR('#')) - break; /* NOTE BREAK OUT */ - assert(NEXT1('#')); - while (!ATEOS() && *v->now != CHR('\n')) - v->now++; - /* leave the newline to be picked up by the iscspace loop */ - } - - if (v->now != start) - NOTE(REG_UNONPOSIX); -} - -/* - * newline - return the chr for a newline - * - * This helps confine use of CHR to this source file. - */ -static chr -newline(void) -{ - return CHR('\n'); -} - -/* - * chrnamed - return the chr known by a given (chr string) name - * - * The code is a bit clumsy, but this routine gets only such specialized - * use that it hardly matters. - */ -static chr -chrnamed(struct vars * v, - chr *startp, /* start of name */ - chr *endp, /* just past end of name */ - chr lastresort) /* what to return if name lookup fails */ -{ - celt c; - int errsave; - int e; - struct cvec *cv; - - errsave = v->err; - v->err = 0; - c = element(v, startp, endp); - e = v->err; - v->err = errsave; - - if (e != 0) - return (chr) lastresort; - - cv = range(v, c, c, 0); - if (cv->nchrs == 0) - return (chr) lastresort; - return cv->chrs[0]; -} diff --git a/src/regex/regc_nfa.c b/src/regex/regc_nfa.c deleted file mode 100644 index cc9f6ea2f9..0000000000 --- a/src/regex/regc_nfa.c +++ /dev/null @@ -1,1559 +0,0 @@ -/* - * NFA utilities. - * This file is #included by regcomp.c. - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Header$ - * - * - * One or two things that technically ought to be in here - * are actually in color.c, thanks to some incestuous relationships in - * the color chains. - */ - -#define NISERR() VISERR(nfa->v) -#define NERR(e) VERR(nfa->v, (e)) - - -/* - * newnfa - set up an NFA - */ -static struct nfa * /* the NFA, or NULL */ -newnfa(struct vars * v, - struct colormap * cm, - struct nfa * parent) /* NULL if primary NFA */ -{ - struct nfa *nfa; - - nfa = (struct nfa *) MALLOC(sizeof(struct nfa)); - if (nfa == NULL) - return NULL; - - nfa->states = NULL; - nfa->slast = NULL; - nfa->free = NULL; - nfa->nstates = 0; - nfa->cm = cm; - nfa->v = v; - nfa->bos[0] = nfa->bos[1] = COLORLESS; - nfa->eos[0] = nfa->eos[1] = COLORLESS; - nfa->post = newfstate(nfa, '@'); /* number 0 */ - nfa->pre = newfstate(nfa, '>'); /* number 1 */ - nfa->parent = parent; - - nfa->init = newstate(nfa); /* may become invalid later */ - nfa->final = newstate(nfa); - if (ISERR()) - { - freenfa(nfa); - return NULL; - } - rainbow(nfa, nfa->cm, PLAIN, COLORLESS, nfa->pre, nfa->init); - newarc(nfa, '^', 1, nfa->pre, nfa->init); - newarc(nfa, '^', 0, nfa->pre, nfa->init); - rainbow(nfa, nfa->cm, PLAIN, COLORLESS, nfa->final, nfa->post); - newarc(nfa, '$', 1, nfa->final, nfa->post); - newarc(nfa, '$', 0, nfa->final, nfa->post); - - if (ISERR()) - { - freenfa(nfa); - return NULL; - } - return nfa; -} - -/* - * freenfa - free an entire NFA - */ -static void -freenfa(struct nfa * nfa) -{ - struct state *s; - - while ((s = nfa->states) != NULL) - { - s->nins = s->nouts = 0; /* don't worry about arcs */ - freestate(nfa, s); - } - while ((s = nfa->free) != NULL) - { - nfa->free = s->next; - destroystate(nfa, s); - } - - nfa->slast = NULL; - nfa->nstates = -1; - nfa->pre = NULL; - nfa->post = NULL; - FREE(nfa); -} - -/* - * newstate - allocate an NFA state, with zero flag value - */ -static struct state * /* NULL on error */ -newstate(struct nfa * nfa) -{ - struct state *s; - - if (nfa->free != NULL) - { - s = nfa->free; - nfa->free = s->next; - } - else - { - s = (struct state *) MALLOC(sizeof(struct state)); - if (s == NULL) - { - NERR(REG_ESPACE); - return NULL; - } - s->oas.next = NULL; - s->free = NULL; - s->noas = 0; - } - - assert(nfa->nstates >= 0); - s->no = nfa->nstates++; - s->flag = 0; - if (nfa->states == NULL) - nfa->states = s; - s->nins = 0; - s->ins = NULL; - s->nouts = 0; - s->outs = NULL; - s->tmp = NULL; - s->next = NULL; - if (nfa->slast != NULL) - { - assert(nfa->slast->next == NULL); - nfa->slast->next = s; - } - s->prev = nfa->slast; - nfa->slast = s; - return s; -} - -/* - * newfstate - allocate an NFA state with a specified flag value - */ -static struct state * /* NULL on error */ -newfstate(struct nfa * nfa, int flag) -{ - struct state *s; - - s = newstate(nfa); - if (s != NULL) - s->flag = (char) flag; - return s; -} - -/* - * dropstate - delete a state's inarcs and outarcs and free it - */ -static void -dropstate(struct nfa * nfa, - struct state * s) -{ - struct arc *a; - - while ((a = s->ins) != NULL) - freearc(nfa, a); - while ((a = s->outs) != NULL) - freearc(nfa, a); - freestate(nfa, s); -} - -/* - * freestate - free a state, which has no in-arcs or out-arcs - */ -static void -freestate(struct nfa * nfa, - struct state * s) -{ - assert(s != NULL); - assert(s->nins == 0 && s->nouts == 0); - - s->no = FREESTATE; - s->flag = 0; - if (s->next != NULL) - s->next->prev = s->prev; - else - { - assert(s == nfa->slast); - nfa->slast = s->prev; - } - if (s->prev != NULL) - s->prev->next = s->next; - else - { - assert(s == nfa->states); - nfa->states = s->next; - } - s->prev = NULL; - s->next = nfa->free; /* don't delete it, put it on the free - * list */ - nfa->free = s; -} - -/* - * destroystate - really get rid of an already-freed state - */ -static void -destroystate(struct nfa * nfa, - struct state * s) -{ - struct arcbatch *ab; - struct arcbatch *abnext; - - assert(s->no == FREESTATE); - for (ab = s->oas.next; ab != NULL; ab = abnext) - { - abnext = ab->next; - FREE(ab); - } - s->ins = NULL; - s->outs = NULL; - s->next = NULL; - FREE(s); -} - -/* - * newarc - set up a new arc within an NFA - */ -static void -newarc(struct nfa * nfa, - int t, - pcolor co, - struct state * from, - struct state * to) -{ - struct arc *a; - - assert(from != NULL && to != NULL); - - /* check for duplicates */ - for (a = from->outs; a != NULL; a = a->outchain) - if (a->to == to && a->co == co && a->type == t) - return; - - a = allocarc(nfa, from); - if (NISERR()) - return; - assert(a != NULL); - - a->type = t; - a->co = (color) co; - a->to = to; - a->from = from; - - /* - * Put the new arc on the beginning, not the end, of the chains. Not - * only is this easier, it has the very useful side effect that - * deleting the most-recently-added arc is the cheapest case rather - * than the most expensive one. - */ - a->inchain = to->ins; - to->ins = a; - a->outchain = from->outs; - from->outs = a; - - from->nouts++; - to->nins++; - - if (COLORED(a) && nfa->parent == NULL) - colorchain(nfa->cm, a); - - return; -} - -/* - * allocarc - allocate a new out-arc within a state - */ -static struct arc * /* NULL for failure */ -allocarc(struct nfa * nfa, - struct state * s) -{ - struct arc *a; - struct arcbatch *new; - int i; - - /* shortcut */ - if (s->free == NULL && s->noas < ABSIZE) - { - a = &s->oas.a[s->noas]; - s->noas++; - return a; - } - - /* if none at hand, get more */ - if (s->free == NULL) - { - new = (struct arcbatch *) MALLOC(sizeof(struct arcbatch)); - if (new == NULL) - { - NERR(REG_ESPACE); - return NULL; - } - new->next = s->oas.next; - s->oas.next = new; - - for (i = 0; i < ABSIZE; i++) - { - new->a[i].type = 0; - new->a[i].freechain = &new->a[i + 1]; - } - new->a[ABSIZE - 1].freechain = NULL; - s->free = &new->a[0]; - } - assert(s->free != NULL); - - a = s->free; - s->free = a->freechain; - return a; -} - -/* - * freearc - free an arc - */ -static void -freearc(struct nfa * nfa, - struct arc * victim) -{ - struct state *from = victim->from; - struct state *to = victim->to; - struct arc *a; - - assert(victim->type != 0); - - /* take it off color chain if necessary */ - if (COLORED(victim) && nfa->parent == NULL) - uncolorchain(nfa->cm, victim); - - /* take it off source's out-chain */ - assert(from != NULL); - assert(from->outs != NULL); - a = from->outs; - if (a == victim) /* simple case: first in chain */ - from->outs = victim->outchain; - else - { - for (; a != NULL && a->outchain != victim; a = a->outchain) - continue; - assert(a != NULL); - a->outchain = victim->outchain; - } - from->nouts--; - - /* take it off target's in-chain */ - assert(to != NULL); - assert(to->ins != NULL); - a = to->ins; - if (a == victim) /* simple case: first in chain */ - to->ins = victim->inchain; - else - { - for (; a != NULL && a->inchain != victim; a = a->inchain) - continue; - assert(a != NULL); - a->inchain = victim->inchain; - } - to->nins--; - - /* clean up and place on free list */ - victim->type = 0; - victim->from = NULL; /* precautions... */ - victim->to = NULL; - victim->inchain = NULL; - victim->outchain = NULL; - victim->freechain = from->free; - from->free = victim; -} - -/* - * findarc - find arc, if any, from given source with given type and color - * If there is more than one such arc, the result is random. - */ -static struct arc * -findarc(struct state * s, - int type, - pcolor co) -{ - struct arc *a; - - for (a = s->outs; a != NULL; a = a->outchain) - if (a->type == type && a->co == co) - return a; - return NULL; -} - -/* - * cparc - allocate a new arc within an NFA, copying details from old one - */ -static void -cparc(struct nfa * nfa, - struct arc * oa, - struct state * from, - struct state * to) -{ - newarc(nfa, oa->type, oa->co, from, to); -} - -/* - * moveins - move all in arcs of a state to another state - * - * You might think this could be done better by just updating the - * existing arcs, and you would be right if it weren't for the desire - * for duplicate suppression, which makes it easier to just make new - * ones to exploit the suppression built into newarc. - */ -static void -moveins(struct nfa * nfa, - struct state * old, - struct state * new) -{ - struct arc *a; - - assert(old != new); - - while ((a = old->ins) != NULL) - { - cparc(nfa, a, a->from, new); - freearc(nfa, a); - } - assert(old->nins == 0); - assert(old->ins == NULL); -} - -/* - * copyins - copy all in arcs of a state to another state - */ -static void -copyins(struct nfa * nfa, - struct state * old, - struct state * new) -{ - struct arc *a; - - assert(old != new); - - for (a = old->ins; a != NULL; a = a->inchain) - cparc(nfa, a, a->from, new); -} - -/* - * moveouts - move all out arcs of a state to another state - */ -static void -moveouts(struct nfa * nfa, - struct state * old, - struct state * new) -{ - struct arc *a; - - assert(old != new); - - while ((a = old->outs) != NULL) - { - cparc(nfa, a, new, a->to); - freearc(nfa, a); - } -} - -/* - * copyouts - copy all out arcs of a state to another state - */ -static void -copyouts(struct nfa * nfa, - struct state * old, - struct state * new) -{ - struct arc *a; - - assert(old != new); - - for (a = old->outs; a != NULL; a = a->outchain) - cparc(nfa, a, new, a->to); -} - -/* - * cloneouts - copy out arcs of a state to another state pair, modifying type - */ -static void -cloneouts(struct nfa * nfa, - struct state * old, - struct state * from, - struct state * to, - int type) -{ - struct arc *a; - - assert(old != from); - - for (a = old->outs; a != NULL; a = a->outchain) - newarc(nfa, type, a->co, from, to); -} - -/* - * delsub - delete a sub-NFA, updating subre pointers if necessary - * - * This uses a recursive traversal of the sub-NFA, marking already-seen - * states using their tmp pointer. - */ -static void -delsub(struct nfa * nfa, - struct state * lp, /* the sub-NFA goes from here... */ - struct state * rp) /* ...to here, *not* inclusive */ -{ - assert(lp != rp); - - rp->tmp = rp; /* mark end */ - - deltraverse(nfa, lp, lp); - assert(lp->nouts == 0 && rp->nins == 0); /* did the job */ - assert(lp->no != FREESTATE && rp->no != FREESTATE); /* no more */ - - rp->tmp = NULL; /* unmark end */ - lp->tmp = NULL; /* and begin, marked by deltraverse */ -} - -/* - * deltraverse - the recursive heart of delsub - * This routine's basic job is to destroy all out-arcs of the state. - */ -static void -deltraverse(struct nfa * nfa, - struct state * leftend, - struct state * s) -{ - struct arc *a; - struct state *to; - - if (s->nouts == 0) - return; /* nothing to do */ - if (s->tmp != NULL) - return; /* already in progress */ - - s->tmp = s; /* mark as in progress */ - - while ((a = s->outs) != NULL) - { - to = a->to; - deltraverse(nfa, leftend, to); - assert(to->nouts == 0 || to->tmp != NULL); - freearc(nfa, a); - if (to->nins == 0 && to->tmp == NULL) - { - assert(to->nouts == 0); - freestate(nfa, to); - } - } - - assert(s->no != FREESTATE); /* we're still here */ - assert(s == leftend || s->nins != 0); /* and still reachable */ - assert(s->nouts == 0); /* but have no outarcs */ - - s->tmp = NULL; /* we're done here */ -} - -/* - * dupnfa - duplicate sub-NFA - * - * Another recursive traversal, this time using tmp to point to duplicates - * as well as mark already-seen states. (You knew there was a reason why - * it's a state pointer, didn't you? :-)) - */ -static void -dupnfa(struct nfa * nfa, - struct state * start, /* duplicate of subNFA starting here */ - struct state * stop, /* and stopping here */ - struct state * from, /* stringing duplicate from here */ - struct state * to) /* to here */ -{ - if (start == stop) - { - newarc(nfa, EMPTY, 0, from, to); - return; - } - - stop->tmp = to; - duptraverse(nfa, start, from); - /* done, except for clearing out the tmp pointers */ - - stop->tmp = NULL; - cleartraverse(nfa, start); -} - -/* - * duptraverse - recursive heart of dupnfa - */ -static void -duptraverse(struct nfa * nfa, - struct state * s, - struct state * stmp) /* s's duplicate, or NULL */ -{ - struct arc *a; - - if (s->tmp != NULL) - return; /* already done */ - - s->tmp = (stmp == NULL) ? newstate(nfa) : stmp; - if (s->tmp == NULL) - { - assert(NISERR()); - return; - } - - for (a = s->outs; a != NULL && !NISERR(); a = a->outchain) - { - duptraverse(nfa, a->to, (struct state *) NULL); - assert(a->to->tmp != NULL); - cparc(nfa, a, s->tmp, a->to->tmp); - } -} - -/* - * cleartraverse - recursive cleanup for algorithms that leave tmp ptrs set - */ -static void -cleartraverse(struct nfa * nfa, - struct state * s) -{ - struct arc *a; - - if (s->tmp == NULL) - return; - s->tmp = NULL; - - for (a = s->outs; a != NULL; a = a->outchain) - cleartraverse(nfa, a->to); -} - -/* - * specialcolors - fill in special colors for an NFA - */ -static void -specialcolors(struct nfa * nfa) -{ - /* false colors for BOS, BOL, EOS, EOL */ - if (nfa->parent == NULL) - { - nfa->bos[0] = pseudocolor(nfa->cm); - nfa->bos[1] = pseudocolor(nfa->cm); - nfa->eos[0] = pseudocolor(nfa->cm); - nfa->eos[1] = pseudocolor(nfa->cm); - } - else - { - assert(nfa->parent->bos[0] != COLORLESS); - nfa->bos[0] = nfa->parent->bos[0]; - assert(nfa->parent->bos[1] != COLORLESS); - nfa->bos[1] = nfa->parent->bos[1]; - assert(nfa->parent->eos[0] != COLORLESS); - nfa->eos[0] = nfa->parent->eos[0]; - assert(nfa->parent->eos[1] != COLORLESS); - nfa->eos[1] = nfa->parent->eos[1]; - } -} - -/* - * optimize - optimize an NFA - */ -static long /* re_info bits */ -optimize(struct nfa * nfa, - FILE *f) /* for debug output; NULL none */ -{ -#ifdef REG_DEBUG - int verbose = (f != NULL) ? 1 : 0; - - if (verbose) - fprintf(f, "\ninitial cleanup:\n"); -#endif - cleanup(nfa); /* may simplify situation */ -#ifdef REG_DEBUG - if (verbose) - dumpnfa(nfa, f); - if (verbose) - fprintf(f, "\nempties:\n"); -#endif - fixempties(nfa, f); /* get rid of EMPTY arcs */ -#ifdef REG_DEBUG - if (verbose) - fprintf(f, "\nconstraints:\n"); -#endif - pullback(nfa, f); /* pull back constraints backward */ - pushfwd(nfa, f); /* push fwd constraints forward */ -#ifdef REG_DEBUG - if (verbose) - fprintf(f, "\nfinal cleanup:\n"); -#endif - cleanup(nfa); /* final tidying */ - return analyze(nfa); /* and analysis */ -} - -/* - * pullback - pull back constraints backward to (with luck) eliminate them - */ -static void -pullback(struct nfa * nfa, - FILE *f) /* for debug output; NULL none */ -{ - struct state *s; - struct state *nexts; - struct arc *a; - struct arc *nexta; - int progress; - - /* find and pull until there are no more */ - do - { - progress = 0; - for (s = nfa->states; s != NULL && !NISERR(); s = nexts) - { - nexts = s->next; - for (a = s->outs; a != NULL && !NISERR(); a = nexta) - { - nexta = a->outchain; - if (a->type == '^' || a->type == BEHIND) - if (pull(nfa, a)) - progress = 1; - assert(nexta == NULL || s->no != FREESTATE); - } - } - if (progress && f != NULL) - dumpnfa(nfa, f); - } while (progress && !NISERR()); - if (NISERR()) - return; - - for (a = nfa->pre->outs; a != NULL; a = nexta) - { - nexta = a->outchain; - if (a->type == '^') - { - assert(a->co == 0 || a->co == 1); - newarc(nfa, PLAIN, nfa->bos[a->co], a->from, a->to); - freearc(nfa, a); - } - } -} - -/* - * pull - pull a back constraint backward past its source state - * A significant property of this function is that it deletes at most - * one state -- the constraint's from state -- and only if the constraint - * was that state's last outarc. - */ -static int /* 0 couldn't, 1 could */ -pull(struct nfa * nfa, - struct arc * con) -{ - struct state *from = con->from; - struct state *to = con->to; - struct arc *a; - struct arc *nexta; - struct state *s; - - if (from == to) - { /* circular constraint is pointless */ - freearc(nfa, con); - return 1; - } - if (from->flag) /* can't pull back beyond start */ - return 0; - if (from->nins == 0) - { /* unreachable */ - freearc(nfa, con); - return 1; - } - - /* first, clone from state if necessary to avoid other outarcs */ - if (from->nouts > 1) - { - s = newstate(nfa); - if (NISERR()) - return 0; - assert(to != from); /* con is not an inarc */ - copyins(nfa, from, s); /* duplicate inarcs */ - cparc(nfa, con, s, to); /* move constraint arc */ - freearc(nfa, con); - from = s; - con = from->outs; - } - assert(from->nouts == 1); - - /* propagate the constraint into the from state's inarcs */ - for (a = from->ins; a != NULL; a = nexta) - { - nexta = a->inchain; - switch (combine(con, a)) - { - case INCOMPATIBLE: /* destroy the arc */ - freearc(nfa, a); - break; - case SATISFIED: /* no action needed */ - break; - case COMPATIBLE: /* swap the two arcs, more or less */ - s = newstate(nfa); - if (NISERR()) - return 0; - cparc(nfa, a, s, to); /* anticipate move */ - cparc(nfa, con, a->from, s); - if (NISERR()) - return 0; - freearc(nfa, a); - break; - default: - assert(NOTREACHED); - break; - } - } - - /* remaining inarcs, if any, incorporate the constraint */ - moveins(nfa, from, to); - dropstate(nfa, from); /* will free the constraint */ - return 1; -} - -/* - * pushfwd - push forward constraints forward to (with luck) eliminate them - */ -static void -pushfwd(struct nfa * nfa, - FILE *f) /* for debug output; NULL none */ -{ - struct state *s; - struct state *nexts; - struct arc *a; - struct arc *nexta; - int progress; - - /* find and push until there are no more */ - do - { - progress = 0; - for (s = nfa->states; s != NULL && !NISERR(); s = nexts) - { - nexts = s->next; - for (a = s->ins; a != NULL && !NISERR(); a = nexta) - { - nexta = a->inchain; - if (a->type == '$' || a->type == AHEAD) - if (push(nfa, a)) - progress = 1; - assert(nexta == NULL || s->no != FREESTATE); - } - } - if (progress && f != NULL) - dumpnfa(nfa, f); - } while (progress && !NISERR()); - if (NISERR()) - return; - - for (a = nfa->post->ins; a != NULL; a = nexta) - { - nexta = a->inchain; - if (a->type == '$') - { - assert(a->co == 0 || a->co == 1); - newarc(nfa, PLAIN, nfa->eos[a->co], a->from, a->to); - freearc(nfa, a); - } - } -} - -/* - * push - push a forward constraint forward past its destination state - * A significant property of this function is that it deletes at most - * one state -- the constraint's to state -- and only if the constraint - * was that state's last inarc. - */ -static int /* 0 couldn't, 1 could */ -push(struct nfa * nfa, - struct arc * con) -{ - struct state *from = con->from; - struct state *to = con->to; - struct arc *a; - struct arc *nexta; - struct state *s; - - if (to == from) - { /* circular constraint is pointless */ - freearc(nfa, con); - return 1; - } - if (to->flag) /* can't push forward beyond end */ - return 0; - if (to->nouts == 0) - { /* dead end */ - freearc(nfa, con); - return 1; - } - - /* first, clone to state if necessary to avoid other inarcs */ - if (to->nins > 1) - { - s = newstate(nfa); - if (NISERR()) - return 0; - copyouts(nfa, to, s); /* duplicate outarcs */ - cparc(nfa, con, from, s); /* move constraint */ - freearc(nfa, con); - to = s; - con = to->ins; - } - assert(to->nins == 1); - - /* propagate the constraint into the to state's outarcs */ - for (a = to->outs; a != NULL; a = nexta) - { - nexta = a->outchain; - switch (combine(con, a)) - { - case INCOMPATIBLE: /* destroy the arc */ - freearc(nfa, a); - break; - case SATISFIED: /* no action needed */ - break; - case COMPATIBLE: /* swap the two arcs, more or less */ - s = newstate(nfa); - if (NISERR()) - return 0; - cparc(nfa, con, s, a->to); /* anticipate move */ - cparc(nfa, a, from, s); - if (NISERR()) - return 0; - freearc(nfa, a); - break; - default: - assert(NOTREACHED); - break; - } - } - - /* remaining outarcs, if any, incorporate the constraint */ - moveouts(nfa, to, from); - dropstate(nfa, to); /* will free the constraint */ - return 1; -} - -/* - * combine - constraint lands on an arc, what happens? - * - * #def INCOMPATIBLE 1 // destroys arc - * #def SATISFIED 2 // constraint satisfied - * #def COMPATIBLE 3 // compatible but not satisfied yet - */ -static int -combine(struct arc * con, - struct arc * a) -{ -#define CA(ct,at) (((ct)<type, a->type)) - { - case CA('^', PLAIN): /* newlines are handled separately */ - case CA('$', PLAIN): - return INCOMPATIBLE; - break; - case CA(AHEAD, PLAIN): /* color constraints meet colors */ - case CA(BEHIND, PLAIN): - if (con->co == a->co) - return SATISFIED; - return INCOMPATIBLE; - break; - case CA('^', '^'): /* collision, similar constraints */ - case CA('$', '$'): - case CA(AHEAD, AHEAD): - case CA(BEHIND, BEHIND): - if (con->co == a->co) /* true duplication */ - return SATISFIED; - return INCOMPATIBLE; - break; - case CA('^', BEHIND): /* collision, dissimilar constraints */ - case CA(BEHIND, '^'): - case CA('$', AHEAD): - case CA(AHEAD, '$'): - return INCOMPATIBLE; - break; - case CA('^', '$'): /* constraints passing each other */ - case CA('^', AHEAD): - case CA(BEHIND, '$'): - case CA(BEHIND, AHEAD): - case CA('$', '^'): - case CA('$', BEHIND): - case CA(AHEAD, '^'): - case CA(AHEAD, BEHIND): - case CA('^', LACON): - case CA(BEHIND, LACON): - case CA('$', LACON): - case CA(AHEAD, LACON): - return COMPATIBLE; - break; - } - assert(NOTREACHED); - return INCOMPATIBLE; /* for benefit of blind compilers */ -} - -/* - * fixempties - get rid of EMPTY arcs - */ -static void -fixempties(struct nfa * nfa, - FILE *f) /* for debug output; NULL none */ -{ - struct state *s; - struct state *nexts; - struct arc *a; - struct arc *nexta; - int progress; - - /* find and eliminate empties until there are no more */ - do - { - progress = 0; - for (s = nfa->states; s != NULL && !NISERR(); s = nexts) - { - nexts = s->next; - for (a = s->outs; a != NULL && !NISERR(); a = nexta) - { - nexta = a->outchain; - if (a->type == EMPTY && unempty(nfa, a)) - progress = 1; - assert(nexta == NULL || s->no != FREESTATE); - } - } - if (progress && f != NULL) - dumpnfa(nfa, f); - } while (progress && !NISERR()); -} - -/* - * unempty - optimize out an EMPTY arc, if possible - * - * Actually, as it stands this function always succeeds, but the return - * value is kept with an eye on possible future changes. - */ -static int /* 0 couldn't, 1 could */ -unempty(struct nfa * nfa, - struct arc * a) -{ - struct state *from = a->from; - struct state *to = a->to; - int usefrom; /* work on from, as opposed to to? */ - - assert(a->type == EMPTY); - assert(from != nfa->pre && to != nfa->post); - - if (from == to) - { /* vacuous loop */ - freearc(nfa, a); - return 1; - } - - /* decide which end to work on */ - usefrom = 1; /* default: attack from */ - if (from->nouts > to->nins) - usefrom = 0; - else if (from->nouts == to->nins) - { - /* decide on secondary issue: move/copy fewest arcs */ - if (from->nins > to->nouts) - usefrom = 0; - } - - freearc(nfa, a); - if (usefrom) - { - if (from->nouts == 0) - { - /* was the state's only outarc */ - moveins(nfa, from, to); - freestate(nfa, from); - } - else - copyins(nfa, from, to); - } - else - { - if (to->nins == 0) - { - /* was the state's only inarc */ - moveouts(nfa, to, from); - freestate(nfa, to); - } - else - copyouts(nfa, to, from); - } - - return 1; -} - -/* - * cleanup - clean up NFA after optimizations - */ -static void -cleanup(struct nfa * nfa) -{ - struct state *s; - struct state *nexts; - int n; - - /* clear out unreachable or dead-end states */ - /* use pre to mark reachable, then post to mark can-reach-post */ - markreachable(nfa, nfa->pre, (struct state *) NULL, nfa->pre); - markcanreach(nfa, nfa->post, nfa->pre, nfa->post); - for (s = nfa->states; s != NULL; s = nexts) - { - nexts = s->next; - if (s->tmp != nfa->post && !s->flag) - dropstate(nfa, s); - } - assert(nfa->post->nins == 0 || nfa->post->tmp == nfa->post); - cleartraverse(nfa, nfa->pre); - assert(nfa->post->nins == 0 || nfa->post->tmp == NULL); - /* the nins==0 (final unreachable) case will be caught later */ - - /* renumber surviving states */ - n = 0; - for (s = nfa->states; s != NULL; s = s->next) - s->no = n++; - nfa->nstates = n; -} - -/* - * markreachable - recursive marking of reachable states - */ -static void -markreachable(struct nfa * nfa, - struct state * s, - struct state * okay, /* consider only states with this - * mark */ - struct state * mark) /* the value to mark with */ -{ - struct arc *a; - - if (s->tmp != okay) - return; - s->tmp = mark; - - for (a = s->outs; a != NULL; a = a->outchain) - markreachable(nfa, a->to, okay, mark); -} - -/* - * markcanreach - recursive marking of states which can reach here - */ -static void -markcanreach(struct nfa * nfa, - struct state * s, - struct state * okay, /* consider only states with this - * mark */ - struct state * mark) /* the value to mark with */ -{ - struct arc *a; - - if (s->tmp != okay) - return; - s->tmp = mark; - - for (a = s->ins; a != NULL; a = a->inchain) - markcanreach(nfa, a->from, okay, mark); -} - -/* - * analyze - ascertain potentially-useful facts about an optimized NFA - */ -static long /* re_info bits to be ORed in */ -analyze(struct nfa * nfa) -{ - struct arc *a; - struct arc *aa; - - if (nfa->pre->outs == NULL) - return REG_UIMPOSSIBLE; - for (a = nfa->pre->outs; a != NULL; a = a->outchain) - for (aa = a->to->outs; aa != NULL; aa = aa->outchain) - if (aa->to == nfa->post) - return REG_UEMPTYMATCH; - return 0; -} - -/* - * compact - compact an NFA - */ -static void -compact(struct nfa * nfa, - struct cnfa * cnfa) -{ - struct state *s; - struct arc *a; - size_t nstates; - size_t narcs; - struct carc *ca; - struct carc *first; - - assert(!NISERR()); - - nstates = 0; - narcs = 0; - for (s = nfa->states; s != NULL; s = s->next) - { - nstates++; - narcs += 1 + s->nouts + 1; - /* 1 as a fake for flags, nouts for arcs, 1 as endmarker */ - } - - cnfa->states = (struct carc **) MALLOC(nstates * sizeof(struct carc *)); - cnfa->arcs = (struct carc *) MALLOC(narcs * sizeof(struct carc)); - if (cnfa->states == NULL || cnfa->arcs == NULL) - { - if (cnfa->states != NULL) - FREE(cnfa->states); - if (cnfa->arcs != NULL) - FREE(cnfa->arcs); - NERR(REG_ESPACE); - return; - } - cnfa->nstates = nstates; - cnfa->pre = nfa->pre->no; - cnfa->post = nfa->post->no; - cnfa->bos[0] = nfa->bos[0]; - cnfa->bos[1] = nfa->bos[1]; - cnfa->eos[0] = nfa->eos[0]; - cnfa->eos[1] = nfa->eos[1]; - cnfa->ncolors = maxcolor(nfa->cm) + 1; - cnfa->flags = 0; - - ca = cnfa->arcs; - for (s = nfa->states; s != NULL; s = s->next) - { - assert((size_t) s->no < nstates); - cnfa->states[s->no] = ca; - ca->co = 0; /* clear and skip flags "arc" */ - ca++; - first = ca; - for (a = s->outs; a != NULL; a = a->outchain) - switch (a->type) - { - case PLAIN: - ca->co = a->co; - ca->to = a->to->no; - ca++; - break; - case LACON: - assert(s->no != cnfa->pre); - ca->co = (color) (cnfa->ncolors + a->co); - ca->to = a->to->no; - ca++; - cnfa->flags |= HASLACONS; - break; - default: - assert(NOTREACHED); - break; - } - carcsort(first, ca - 1); - ca->co = COLORLESS; - ca->to = 0; - ca++; - } - assert(ca == &cnfa->arcs[narcs]); - assert(cnfa->nstates != 0); - - /* mark no-progress states */ - for (a = nfa->pre->outs; a != NULL; a = a->outchain) - cnfa->states[a->to->no]->co = 1; - cnfa->states[nfa->pre->no]->co = 1; -} - -/* - * carcsort - sort compacted-NFA arcs by color - * - * Really dumb algorithm, but if the list is long enough for that to matter, - * you're in real trouble anyway. - */ -static void -carcsort(struct carc * first, - struct carc * last) -{ - struct carc *p; - struct carc *q; - struct carc tmp; - - if (last - first <= 1) - return; - - for (p = first; p <= last; p++) - for (q = p; q <= last; q++) - if (p->co > q->co || - (p->co == q->co && p->to > q->to)) - { - assert(p != q); - tmp = *p; - *p = *q; - *q = tmp; - } -} - -/* - * freecnfa - free a compacted NFA - */ -static void -freecnfa(struct cnfa * cnfa) -{ - assert(cnfa->nstates != 0); /* not empty already */ - cnfa->nstates = 0; - FREE(cnfa->states); - FREE(cnfa->arcs); -} - -/* - * dumpnfa - dump an NFA in human-readable form - */ -static void -dumpnfa(struct nfa * nfa, - FILE *f) -{ -#ifdef REG_DEBUG - struct state *s; - - fprintf(f, "pre %d, post %d", nfa->pre->no, nfa->post->no); - if (nfa->bos[0] != COLORLESS) - fprintf(f, ", bos [%ld]", (long) nfa->bos[0]); - if (nfa->bos[1] != COLORLESS) - fprintf(f, ", bol [%ld]", (long) nfa->bos[1]); - if (nfa->eos[0] != COLORLESS) - fprintf(f, ", eos [%ld]", (long) nfa->eos[0]); - if (nfa->eos[1] != COLORLESS) - fprintf(f, ", eol [%ld]", (long) nfa->eos[1]); - fprintf(f, "\n"); - for (s = nfa->states; s != NULL; s = s->next) - dumpstate(s, f); - if (nfa->parent == NULL) - dumpcolors(nfa->cm, f); - fflush(f); -#endif -} - -#ifdef REG_DEBUG /* subordinates of dumpnfa */ - -/* - * dumpstate - dump an NFA state in human-readable form - */ -static void -dumpstate(struct state * s, - FILE *f) -{ - struct arc *a; - - fprintf(f, "%d%s%c", s->no, (s->tmp != NULL) ? "T" : "", - (s->flag) ? s->flag : '.'); - if (s->prev != NULL && s->prev->next != s) - fprintf(f, "\tstate chain bad\n"); - if (s->nouts == 0) - fprintf(f, "\tno out arcs\n"); - else - dumparcs(s, f); - fflush(f); - for (a = s->ins; a != NULL; a = a->inchain) - { - if (a->to != s) - fprintf(f, "\tlink from %d to %d on %d's in-chain\n", - a->from->no, a->to->no, s->no); - } -} - -/* - * dumparcs - dump out-arcs in human-readable form - */ -static void -dumparcs(struct state * s, - FILE *f) -{ - int pos; - - assert(s->nouts > 0); - /* printing arcs in reverse order is usually clearer */ - pos = dumprarcs(s->outs, s, f, 1); - if (pos != 1) - fprintf(f, "\n"); -} - -/* - * dumprarcs - dump remaining outarcs, recursively, in reverse order - */ -static int /* resulting print position */ -dumprarcs(struct arc * a, - struct state * s, - FILE *f, - int pos) /* initial print position */ -{ - if (a->outchain != NULL) - pos = dumprarcs(a->outchain, s, f, pos); - dumparc(a, s, f); - if (pos == 5) - { - fprintf(f, "\n"); - pos = 1; - } - else - pos++; - return pos; -} - -/* - * dumparc - dump one outarc in readable form, including prefixing tab - */ -static void -dumparc(struct arc * a, - struct state * s, - FILE *f) -{ - struct arc *aa; - struct arcbatch *ab; - - fprintf(f, "\t"); - switch (a->type) - { - case PLAIN: - fprintf(f, "[%ld]", (long) a->co); - break; - case AHEAD: - fprintf(f, ">%ld>", (long) a->co); - break; - case BEHIND: - fprintf(f, "<%ld<", (long) a->co); - break; - case LACON: - fprintf(f, ":%ld:", (long) a->co); - break; - case '^': - case '$': - fprintf(f, "%c%d", a->type, (int) a->co); - break; - case EMPTY: - break; - default: - fprintf(f, "0x%x/0%lo", a->type, (long) a->co); - break; - } - if (a->from != s) - fprintf(f, "?%d?", a->from->no); - for (ab = &a->from->oas; ab != NULL; ab = ab->next) - { - for (aa = &ab->a[0]; aa < &ab->a[ABSIZE]; aa++) - if (aa == a) - break; /* NOTE BREAK OUT */ - if (aa < &ab->a[ABSIZE]) /* propagate break */ - break; /* NOTE BREAK OUT */ - } - if (ab == NULL) - fprintf(f, "?!?"); /* not in allocated space */ - fprintf(f, "->"); - if (a->to == NULL) - { - fprintf(f, "NULL"); - return; - } - fprintf(f, "%d", a->to->no); - for (aa = a->to->ins; aa != NULL; aa = aa->inchain) - if (aa == a) - break; /* NOTE BREAK OUT */ - if (aa == NULL) - fprintf(f, "?!?"); /* missing from in-chain */ -} -#endif /* REG_DEBUG */ - -/* - * dumpcnfa - dump a compacted NFA in human-readable form - */ -#ifdef REG_DEBUG -static void -dumpcnfa(struct cnfa * cnfa, - FILE *f) -{ - int st; - - fprintf(f, "pre %d, post %d", cnfa->pre, cnfa->post); - if (cnfa->bos[0] != COLORLESS) - fprintf(f, ", bos [%ld]", (long) cnfa->bos[0]); - if (cnfa->bos[1] != COLORLESS) - fprintf(f, ", bol [%ld]", (long) cnfa->bos[1]); - if (cnfa->eos[0] != COLORLESS) - fprintf(f, ", eos [%ld]", (long) cnfa->eos[0]); - if (cnfa->eos[1] != COLORLESS) - fprintf(f, ", eol [%ld]", (long) cnfa->eos[1]); - if (cnfa->flags & HASLACONS) - fprintf(f, ", haslacons"); - fprintf(f, "\n"); - for (st = 0; st < cnfa->nstates; st++) - dumpcstate(st, cnfa->states[st], cnfa, f); - fflush(f); -} -#endif - -#ifdef REG_DEBUG /* subordinates of dumpcnfa */ - -/* - * dumpcstate - dump a compacted-NFA state in human-readable form - */ -static void -dumpcstate(int st, - struct carc * ca, - struct cnfa * cnfa, - FILE *f) -{ - int i; - int pos; - - fprintf(f, "%d%s", st, (ca[0].co) ? ":" : "."); - pos = 1; - for (i = 1; ca[i].co != COLORLESS; i++) - { - if (ca[i].co < cnfa->ncolors) - fprintf(f, "\t[%ld]->%d", (long) ca[i].co, ca[i].to); - else - fprintf(f, "\t:%ld:->%d", (long) ca[i].co - cnfa->ncolors, - ca[i].to); - if (pos == 5) - { - fprintf(f, "\n"); - pos = 1; - } - else - pos++; - } - if (i == 1 || pos != 1) - fprintf(f, "\n"); - fflush(f); -} - -#endif /* REG_DEBUG */ diff --git a/src/regex/regcomp.ih b/src/regex/regcomp.ih deleted file mode 100644 index 0776e7185c..0000000000 --- a/src/regex/regcomp.ih +++ /dev/null @@ -1,51 +0,0 @@ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -/* === regcomp.c === */ -static void p_ere(register struct parse *p, int stop); -static void p_ere_exp(register struct parse *p); -static void p_str(register struct parse *p); -static void p_bre(register struct parse *p, register int end1, register int end2); -static int p_simp_re(register struct parse *p, int starordinary); -static int p_count(register struct parse *p); -static void p_bracket(register struct parse *p); -static void p_b_term(register struct parse *p, register cset *cs); -static void p_b_cclass(register struct parse *p, register cset *cs); -static void p_b_eclass(register struct parse *p, register cset *cs); -static char p_b_symbol(register struct parse *p); -static char p_b_coll_elem(register struct parse *p, int endc); -static char othercase(int ch); -static void bothcases(register struct parse *p, int ch); -static void ordinary(register struct parse *p, register int ch); -static void nonnewline(register struct parse *p); -static void repeat(register struct parse *p, sopno start, int from, int to); -static int seterr(register struct parse *p, int e); -static cset *allocset(register struct parse *p); -static void freeset(register struct parse *p, register cset *cs); -static int freezeset(register struct parse *p, register cset *cs); -static int firstch(register struct parse *p, register cset *cs); -static int nch(register struct parse *p, register cset *cs); -static void mcadd(register struct parse *p, register cset *cs, register char *cp); -static void mcsub(register cset *cs, register char *cp); -static int mcin(register cset *cs, register char *cp); -static char *mcfind(register cset *cs, register char *cp); -static void mcinvert(register struct parse *p, register cset *cs); -static void mccase(register struct parse *p, register cset *cs); -static int isinsets(register struct re_guts *g, int c); -static int samesets(register struct re_guts *g, int c1, int c2); -static void categorize(struct parse *p, register struct re_guts *g); -static sopno dupl(register struct parse *p, sopno start, sopno finish); -static void doemit(register struct parse *p, sop op, size_t opnd); -static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos); -static void dofwd(register struct parse *p, sopno pos, sop value); -static void enlarge(register struct parse *p, sopno size); -static void stripsnug(register struct parse *p, register struct re_guts *g); -static void findmust(register struct parse *p, register struct re_guts *g); -static sopno pluscount(register struct parse *p, register struct re_guts *g); - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ diff --git a/src/regex/rege_dfa.c b/src/regex/rege_dfa.c deleted file mode 100644 index 5347b90d73..0000000000 --- a/src/regex/rege_dfa.c +++ /dev/null @@ -1,699 +0,0 @@ -/* - * DFA routines - * This file is #included by regexec.c. - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Header$ - * - */ - -/* - * longest - longest-preferred matching engine - */ -static chr * /* endpoint, or NULL */ -longest(struct vars * v, /* used only for debug and exec flags */ - struct dfa * d, - chr *start, /* where the match should start */ - chr *stop, /* match must end at or before here */ - int *hitstopp) /* record whether hit v->stop, if non-NULL */ -{ - chr *cp; - chr *realstop = (stop == v->stop) ? stop : stop + 1; - color co; - struct sset *css; - struct sset *ss; - chr *post; - int i; - struct colormap *cm = d->cm; - - /* initialize */ - css = initialize(v, d, start); - cp = start; - if (hitstopp != NULL) - *hitstopp = 0; - - /* startup */ - FDEBUG(("+++ startup +++\n")); - if (cp == v->start) - { - co = d->cnfa->bos[(v->eflags & REG_NOTBOL) ? 0 : 1]; - FDEBUG(("color %ld\n", (long) co)); - } - else - { - co = GETCOLOR(cm, *(cp - 1)); - FDEBUG(("char %c, color %ld\n", (char) *(cp - 1), (long) co)); - } - css = miss(v, d, css, co, cp, start); - if (css == NULL) - return NULL; - css->lastseen = cp; - - /* main loop */ - if (v->eflags & REG_FTRACE) - while (cp < realstop) - { - FDEBUG(("+++ at c%d +++\n", css - d->ssets)); - co = GETCOLOR(cm, *cp); - FDEBUG(("char %c, color %ld\n", (char) *cp, (long) co)); - ss = css->outs[co]; - if (ss == NULL) - { - ss = miss(v, d, css, co, cp + 1, start); - if (ss == NULL) - break; /* NOTE BREAK OUT */ - } - cp++; - ss->lastseen = cp; - css = ss; - } - else - while (cp < realstop) - { - co = GETCOLOR(cm, *cp); - ss = css->outs[co]; - if (ss == NULL) - { - ss = miss(v, d, css, co, cp + 1, start); - if (ss == NULL) - break; /* NOTE BREAK OUT */ - } - cp++; - ss->lastseen = cp; - css = ss; - } - - /* shutdown */ - FDEBUG(("+++ shutdown at c%d +++\n", css - d->ssets)); - if (cp == v->stop && stop == v->stop) - { - if (hitstopp != NULL) - *hitstopp = 1; - co = d->cnfa->eos[(v->eflags & REG_NOTEOL) ? 0 : 1]; - FDEBUG(("color %ld\n", (long) co)); - ss = miss(v, d, css, co, cp, start); - /* special case: match ended at eol? */ - if (ss != NULL && (ss->flags & POSTSTATE)) - return cp; - else if (ss != NULL) - ss->lastseen = cp; /* to be tidy */ - } - - /* find last match, if any */ - post = d->lastpost; - for (ss = d->ssets, i = d->nssused; i > 0; ss++, i--) - if ((ss->flags & POSTSTATE) && post != ss->lastseen && - (post == NULL || post < ss->lastseen)) - post = ss->lastseen; - if (post != NULL) /* found one */ - return post - 1; - - return NULL; -} - -/* - * shortest - shortest-preferred matching engine - */ -static chr * /* endpoint, or NULL */ -shortest(struct vars * v, - struct dfa * d, - chr *start, /* where the match should start */ - chr *min, /* match must end at or after here */ - chr *max, /* match must end at or before here */ - chr **coldp, /* store coldstart pointer here, if - * nonNULL */ - int *hitstopp) /* record whether hit v->stop, if non-NULL */ -{ - chr *cp; - chr *realmin = (min == v->stop) ? min : min + 1; - chr *realmax = (max == v->stop) ? max : max + 1; - color co; - struct sset *css; - struct sset *ss; - struct colormap *cm = d->cm; - - /* initialize */ - css = initialize(v, d, start); - cp = start; - if (hitstopp != NULL) - *hitstopp = 0; - - /* startup */ - FDEBUG(("--- startup ---\n")); - if (cp == v->start) - { - co = d->cnfa->bos[(v->eflags & REG_NOTBOL) ? 0 : 1]; - FDEBUG(("color %ld\n", (long) co)); - } - else - { - co = GETCOLOR(cm, *(cp - 1)); - FDEBUG(("char %c, color %ld\n", (char) *(cp - 1), (long) co)); - } - css = miss(v, d, css, co, cp, start); - if (css == NULL) - return NULL; - css->lastseen = cp; - ss = css; - - /* main loop */ - if (v->eflags & REG_FTRACE) - while (cp < realmax) - { - FDEBUG(("--- at c%d ---\n", css - d->ssets)); - co = GETCOLOR(cm, *cp); - FDEBUG(("char %c, color %ld\n", (char) *cp, (long) co)); - ss = css->outs[co]; - if (ss == NULL) - { - ss = miss(v, d, css, co, cp + 1, start); - if (ss == NULL) - break; /* NOTE BREAK OUT */ - } - cp++; - ss->lastseen = cp; - css = ss; - if ((ss->flags & POSTSTATE) && cp >= realmin) - break; /* NOTE BREAK OUT */ - } - else - while (cp < realmax) - { - co = GETCOLOR(cm, *cp); - ss = css->outs[co]; - if (ss == NULL) - { - ss = miss(v, d, css, co, cp + 1, start); - if (ss == NULL) - break; /* NOTE BREAK OUT */ - } - cp++; - ss->lastseen = cp; - css = ss; - if ((ss->flags & POSTSTATE) && cp >= realmin) - break; /* NOTE BREAK OUT */ - } - - if (ss == NULL) - return NULL; - - if (coldp != NULL) /* report last no-progress state set, if - * any */ - *coldp = lastcold(v, d); - - if ((ss->flags & POSTSTATE) && cp > min) - { - assert(cp >= realmin); - cp--; - } - else if (cp == v->stop && max == v->stop) - { - co = d->cnfa->eos[(v->eflags & REG_NOTEOL) ? 0 : 1]; - FDEBUG(("color %ld\n", (long) co)); - ss = miss(v, d, css, co, cp, start); - /* match might have ended at eol */ - if ((ss == NULL || !(ss->flags & POSTSTATE)) && hitstopp != NULL) - *hitstopp = 1; - } - - if (ss == NULL || !(ss->flags & POSTSTATE)) - return NULL; - - return cp; -} - -/* - * lastcold - determine last point at which no progress had been made - */ -static chr * /* endpoint, or NULL */ -lastcold(struct vars * v, - struct dfa * d) -{ - struct sset *ss; - chr *nopr; - int i; - - nopr = d->lastnopr; - if (nopr == NULL) - nopr = v->start; - for (ss = d->ssets, i = d->nssused; i > 0; ss++, i--) - if ((ss->flags & NOPROGRESS) && nopr < ss->lastseen) - nopr = ss->lastseen; - return nopr; -} - -/* - * newdfa - set up a fresh DFA - */ -static struct dfa * -newdfa(struct vars * v, - struct cnfa * cnfa, - struct colormap * cm, - struct smalldfa * small) /* preallocated space, may be NULL */ -{ - struct dfa *d; - size_t nss = cnfa->nstates * 2; - int wordsper = (cnfa->nstates + UBITS - 1) / UBITS; - struct smalldfa *smallwas = small; - - assert(cnfa != NULL && cnfa->nstates != 0); - - if (nss <= FEWSTATES && cnfa->ncolors <= FEWCOLORS) - { - assert(wordsper == 1); - if (small == NULL) - { - small = (struct smalldfa *) MALLOC( - sizeof(struct smalldfa)); - if (small == NULL) - { - ERR(REG_ESPACE); - return NULL; - } - } - d = &small->dfa; - d->ssets = small->ssets; - d->statesarea = small->statesarea; - d->work = &d->statesarea[nss]; - d->outsarea = small->outsarea; - d->incarea = small->incarea; - d->cptsmalloced = 0; - d->mallocarea = (smallwas == NULL) ? (char *) small : NULL; - } - else - { - d = (struct dfa *) MALLOC(sizeof(struct dfa)); - if (d == NULL) - { - ERR(REG_ESPACE); - return NULL; - } - d->ssets = (struct sset *) MALLOC(nss * sizeof(struct sset)); - d->statesarea = (unsigned *) MALLOC((nss + WORK) * wordsper * - sizeof(unsigned)); - d->work = &d->statesarea[nss * wordsper]; - d->outsarea = (struct sset **) MALLOC(nss * cnfa->ncolors * - sizeof(struct sset *)); - d->incarea = (struct arcp *) MALLOC(nss * cnfa->ncolors * - sizeof(struct arcp)); - d->cptsmalloced = 1; - d->mallocarea = (char *) d; - if (d->ssets == NULL || d->statesarea == NULL || - d->outsarea == NULL || d->incarea == NULL) - { - freedfa(d); - ERR(REG_ESPACE); - return NULL; - } - } - - d->nssets = (v->eflags & REG_SMALL) ? 7 : nss; - d->nssused = 0; - d->nstates = cnfa->nstates; - d->ncolors = cnfa->ncolors; - d->wordsper = wordsper; - d->cnfa = cnfa; - d->cm = cm; - d->lastpost = NULL; - d->lastnopr = NULL; - d->search = d->ssets; - - /* initialization of sset fields is done as needed */ - - return d; -} - -/* - * freedfa - free a DFA - */ -static void -freedfa(struct dfa * d) -{ - if (d->cptsmalloced) - { - if (d->ssets != NULL) - FREE(d->ssets); - if (d->statesarea != NULL) - FREE(d->statesarea); - if (d->outsarea != NULL) - FREE(d->outsarea); - if (d->incarea != NULL) - FREE(d->incarea); - } - - if (d->mallocarea != NULL) - FREE(d->mallocarea); -} - -/* - * hash - construct a hash code for a bitvector - * - * There are probably better ways, but they're more expensive. - */ -static unsigned -hash(unsigned *uv, - int n) -{ - int i; - unsigned h; - - h = 0; - for (i = 0; i < n; i++) - h ^= uv[i]; - return h; -} - -/* - * initialize - hand-craft a cache entry for startup, otherwise get ready - */ -static struct sset * -initialize(struct vars * v, /* used only for debug flags */ - struct dfa * d, - chr *start) -{ - struct sset *ss; - int i; - - /* is previous one still there? */ - if (d->nssused > 0 && (d->ssets[0].flags & STARTER)) - ss = &d->ssets[0]; - else - { /* no, must (re)build it */ - ss = getvacant(v, d, start, start); - for (i = 0; i < d->wordsper; i++) - ss->states[i] = 0; - BSET(ss->states, d->cnfa->pre); - ss->hash = HASH(ss->states, d->wordsper); - assert(d->cnfa->pre != d->cnfa->post); - ss->flags = STARTER | LOCKED | NOPROGRESS; - /* lastseen dealt with below */ - } - - for (i = 0; i < d->nssused; i++) - d->ssets[i].lastseen = NULL; - ss->lastseen = start; /* maybe untrue, but harmless */ - d->lastpost = NULL; - d->lastnopr = NULL; - return ss; -} - -/* - * miss - handle a cache miss - */ -static struct sset * /* NULL if goes to empty set */ -miss(struct vars * v, /* used only for debug flags */ - struct dfa * d, - struct sset * css, - pcolor co, - chr *cp, /* next chr */ - chr *start) /* where the attempt got started */ -{ - struct cnfa *cnfa = d->cnfa; - int i; - unsigned h; - struct carc *ca; - struct sset *p; - int ispost; - int noprogress; - int gotstate; - int dolacons; - int sawlacons; - - /* for convenience, we can be called even if it might not be a miss */ - if (css->outs[co] != NULL) - { - FDEBUG(("hit\n")); - return css->outs[co]; - } - FDEBUG(("miss\n")); - - /* first, what set of states would we end up in? */ - for (i = 0; i < d->wordsper; i++) - d->work[i] = 0; - ispost = 0; - noprogress = 1; - gotstate = 0; - for (i = 0; i < d->nstates; i++) - if (ISBSET(css->states, i)) - for (ca = cnfa->states[i] + 1; ca->co != COLORLESS; ca++) - if (ca->co == co) - { - BSET(d->work, ca->to); - gotstate = 1; - if (ca->to == cnfa->post) - ispost = 1; - if (!cnfa->states[ca->to]->co) - noprogress = 0; - FDEBUG(("%d -> %d\n", i, ca->to)); - } - dolacons = (gotstate) ? (cnfa->flags & HASLACONS) : 0; - sawlacons = 0; - while (dolacons) - { /* transitive closure */ - dolacons = 0; - for (i = 0; i < d->nstates; i++) - if (ISBSET(d->work, i)) - for (ca = cnfa->states[i] + 1; ca->co != COLORLESS; - ca++) - { - if (ca->co <= cnfa->ncolors) - continue; /* NOTE CONTINUE */ - sawlacons = 1; - if (ISBSET(d->work, ca->to)) - continue; /* NOTE CONTINUE */ - if (!lacon(v, cnfa, cp, ca->co)) - continue; /* NOTE CONTINUE */ - BSET(d->work, ca->to); - dolacons = 1; - if (ca->to == cnfa->post) - ispost = 1; - if (!cnfa->states[ca->to]->co) - noprogress = 0; - FDEBUG(("%d :> %d\n", i, ca->to)); - } - } - if (!gotstate) - return NULL; - h = HASH(d->work, d->wordsper); - - /* next, is that in the cache? */ - for (p = d->ssets, i = d->nssused; i > 0; p++, i--) - if (HIT(h, d->work, p, d->wordsper)) - { - FDEBUG(("cached c%d\n", p - d->ssets)); - break; /* NOTE BREAK OUT */ - } - if (i == 0) - { /* nope, need a new cache entry */ - p = getvacant(v, d, cp, start); - assert(p != css); - for (i = 0; i < d->wordsper; i++) - p->states[i] = d->work[i]; - p->hash = h; - p->flags = (ispost) ? POSTSTATE : 0; - if (noprogress) - p->flags |= NOPROGRESS; - /* lastseen to be dealt with by caller */ - } - - if (!sawlacons) - { /* lookahead conds. always cache miss */ - FDEBUG(("c%d[%d]->c%d\n", css - d->ssets, co, p - d->ssets)); - css->outs[co] = p; - css->inchain[co] = p->ins; - p->ins.ss = css; - p->ins.co = (color) co; - } - return p; -} - -/* - * lacon - lookahead-constraint checker for miss() - */ -static int /* predicate: constraint satisfied? */ -lacon(struct vars * v, - struct cnfa * pcnfa, /* parent cnfa */ - chr *cp, - pcolor co) /* "color" of the lookahead constraint */ -{ - int n; - struct subre *sub; - struct dfa *d; - struct smalldfa sd; - chr *end; - - n = co - pcnfa->ncolors; - assert(n < v->g->nlacons && v->g->lacons != NULL); - FDEBUG(("=== testing lacon %d\n", n)); - sub = &v->g->lacons[n]; - d = newdfa(v, &sub->cnfa, &v->g->cmap, &sd); - if (d == NULL) - { - ERR(REG_ESPACE); - return 0; - } - end = longest(v, d, cp, v->stop, (int *) NULL); - freedfa(d); - FDEBUG(("=== lacon %d match %d\n", n, (end != NULL))); - return (sub->subno) ? (end != NULL) : (end == NULL); -} - -/* - * getvacant - get a vacant state set - * This routine clears out the inarcs and outarcs, but does not otherwise - * clear the innards of the state set -- that's up to the caller. - */ -static struct sset * -getvacant(struct vars * v, /* used only for debug flags */ - struct dfa * d, - chr *cp, - chr *start) -{ - int i; - struct sset *ss; - struct sset *p; - struct arcp ap; - struct arcp lastap; - color co; - - ss = pickss(v, d, cp, start); - assert(!(ss->flags & LOCKED)); - - /* clear out its inarcs, including self-referential ones */ - ap = ss->ins; - while ((p = ap.ss) != NULL) - { - co = ap.co; - FDEBUG(("zapping c%d's %ld outarc\n", p - d->ssets, (long) co)); - p->outs[co] = NULL; - ap = p->inchain[co]; - p->inchain[co].ss = NULL; /* paranoia */ - } - ss->ins.ss = NULL; - - /* take it off the inarc chains of the ssets reached by its outarcs */ - for (i = 0; i < d->ncolors; i++) - { - p = ss->outs[i]; - assert(p != ss); /* not self-referential */ - if (p == NULL) - continue; /* NOTE CONTINUE */ - FDEBUG(("del outarc %d from c%d's in chn\n", i, p - d->ssets)); - if (p->ins.ss == ss && p->ins.co == i) - p->ins = ss->inchain[i]; - else - { - assert(p->ins.ss != NULL); - for (ap = p->ins; ap.ss != NULL && - !(ap.ss == ss && ap.co == i); - ap = ap.ss->inchain[ap.co]) - lastap = ap; - assert(ap.ss != NULL); - lastap.ss->inchain[lastap.co] = ss->inchain[i]; - } - ss->outs[i] = NULL; - ss->inchain[i].ss = NULL; - } - - /* if ss was a success state, may need to remember location */ - if ((ss->flags & POSTSTATE) && ss->lastseen != d->lastpost && - (d->lastpost == NULL || d->lastpost < ss->lastseen)) - d->lastpost = ss->lastseen; - - /* likewise for a no-progress state */ - if ((ss->flags & NOPROGRESS) && ss->lastseen != d->lastnopr && - (d->lastnopr == NULL || d->lastnopr < ss->lastseen)) - d->lastnopr = ss->lastseen; - - return ss; -} - -/* - * pickss - pick the next stateset to be used - */ -static struct sset * -pickss(struct vars * v, /* used only for debug flags */ - struct dfa * d, - chr *cp, - chr *start) -{ - int i; - struct sset *ss; - struct sset *end; - chr *ancient; - - /* shortcut for cases where cache isn't full */ - if (d->nssused < d->nssets) - { - i = d->nssused; - d->nssused++; - ss = &d->ssets[i]; - FDEBUG(("new c%d\n", i)); - /* set up innards */ - ss->states = &d->statesarea[i * d->wordsper]; - ss->flags = 0; - ss->ins.ss = NULL; - ss->ins.co = WHITE; /* give it some value */ - ss->outs = &d->outsarea[i * d->ncolors]; - ss->inchain = &d->incarea[i * d->ncolors]; - for (i = 0; i < d->ncolors; i++) - { - ss->outs[i] = NULL; - ss->inchain[i].ss = NULL; - } - return ss; - } - - /* look for oldest, or old enough anyway */ - if (cp - start > d->nssets * 2 / 3) /* oldest 33% are expendable */ - ancient = cp - d->nssets * 2 / 3; - else - ancient = start; - for (ss = d->search, end = &d->ssets[d->nssets]; ss < end; ss++) - if ((ss->lastseen == NULL || ss->lastseen < ancient) && - !(ss->flags & LOCKED)) - { - d->search = ss + 1; - FDEBUG(("replacing c%d\n", ss - d->ssets)); - return ss; - } - for (ss = d->ssets, end = d->search; ss < end; ss++) - if ((ss->lastseen == NULL || ss->lastseen < ancient) && - !(ss->flags & LOCKED)) - { - d->search = ss + 1; - FDEBUG(("replacing c%d\n", ss - d->ssets)); - return ss; - } - - /* nobody's old enough?!? -- something's really wrong */ - FDEBUG(("can't find victim to replace!\n")); - assert(NOTREACHED); - ERR(REG_ASSERT); - return d->ssets; -} diff --git a/src/regex/regerror.c b/src/regex/regerror.c deleted file mode 100644 index aca13aade0..0000000000 --- a/src/regex/regerror.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * regerror - error-code expansion - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "regguts.h" - -/* unknown-error explanation */ -static char unk[] = "*** unknown regex error code 0x%x ***"; - -/* struct to map among codes, code names, and explanations */ -static struct rerr { - int code; - char *name; - char *explain; -} rerrs[] = { - /* the actual table is built from regex.h */ -# include "regerrs.h" - { -1, "", "oops" }, /* explanation special-cased in code */ -}; - -/* - - regerror - the interface to error numbers - */ -/* ARGSUSED */ -size_t /* actual space needed (including NUL) */ -regerror(errcode, preg, errbuf, errbuf_size) -int errcode; /* error code, or REG_ATOI or REG_ITOA */ -CONST regex_t *preg; /* associated regex_t (unused at present) */ -char *errbuf; /* result buffer (unless errbuf_size==0) */ -size_t errbuf_size; /* available space in errbuf, can be 0 */ -{ - struct rerr *r; - char *msg; - char convbuf[sizeof(unk)+50]; /* 50 = plenty for int */ - size_t len; - int icode; - - switch (errcode) { - case REG_ATOI: /* convert name to number */ - for (r = rerrs; r->code >= 0; r++) - if (strcmp(r->name, errbuf) == 0) - break; - sprintf(convbuf, "%d", r->code); /* -1 for unknown */ - msg = convbuf; - break; - case REG_ITOA: /* convert number to name */ - icode = atoi(errbuf); /* not our problem if this fails */ - for (r = rerrs; r->code >= 0; r++) - if (r->code == icode) - break; - if (r->code >= 0) - msg = r->name; - else { /* unknown; tell him the number */ - sprintf(convbuf, "REG_%u", (unsigned)icode); - msg = convbuf; - } - break; - default: /* a real, normal error code */ - for (r = rerrs; r->code >= 0; r++) - if (r->code == errcode) - break; - if (r->code >= 0) - msg = r->explain; - else { /* unknown; say so */ - sprintf(convbuf, unk, errcode); - msg = convbuf; - } - break; - } - - len = strlen(msg) + 1; /* space needed, including NUL */ - if (errbuf_size > 0) { - if (errbuf_size > len) - strcpy(errbuf, msg); - else { /* truncate to fit */ - strncpy(errbuf, msg, errbuf_size-1); - errbuf[errbuf_size-1] = '\0'; - } - } - - return len; -} diff --git a/src/regex/regerror.ih b/src/regex/regerror.ih deleted file mode 100644 index 2cb668c24f..0000000000 --- a/src/regex/regerror.ih +++ /dev/null @@ -1,12 +0,0 @@ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -/* === regerror.c === */ -static char *regatoi(const regex_t *preg, char *localbuf); - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ diff --git a/src/regex/regerrs.h b/src/regex/regerrs.h deleted file mode 100644 index f99dbf4f73..0000000000 --- a/src/regex/regerrs.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * $Id$ - */ - -{ - REG_OKAY, "REG_OKAY", "no errors detected" -}, - -{ - REG_NOMATCH, "REG_NOMATCH", "failed to match" -}, - -{ - REG_BADPAT, "REG_BADPAT", "invalid regexp (reg version 0.8)" -}, - -{ - REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element" -}, - -{ - REG_ECTYPE, "REG_ECTYPE", "invalid character class" -}, - -{ - REG_EESCAPE, "REG_EESCAPE", "invalid escape \\ sequence" -}, - -{ - REG_ESUBREG, "REG_ESUBREG", "invalid backreference number" -}, - -{ - REG_EBRACK, "REG_EBRACK", "brackets [] not balanced" -}, - -{ - REG_EPAREN, "REG_EPAREN", "parentheses () not balanced" -}, - -{ - REG_EBRACE, "REG_EBRACE", "braces {} not balanced" -}, - -{ - REG_BADBR, "REG_BADBR", "invalid repetition count(s)" -}, - -{ - REG_ERANGE, "REG_ERANGE", "invalid character range" -}, - -{ - REG_ESPACE, "REG_ESPACE", "out of memory" -}, - -{ - REG_BADRPT, "REG_BADRPT", "quantifier operand invalid" -}, - -{ - REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug" -}, - -{ - REG_INVARG, "REG_INVARG", "invalid argument to regex function" -}, - -{ - REG_MIXED, "REG_MIXED", "character widths of regex and string differ" -}, - -{ - REG_BADOPT, "REG_BADOPT", "invalid embedded option" -}, diff --git a/src/regex/regex.3 b/src/regex/regex.3 deleted file mode 100644 index bc747096d6..0000000000 --- a/src/regex/regex.3 +++ /dev/null @@ -1,509 +0,0 @@ -.TH REGEX 3 "25 Sept 1997" -.BY "Henry Spencer" -.de ZR -.\" one other place knows this name: the SEE ALSO section -.IR regex (7) \\$1 -.. -.SH NAME -regcomp, regexec, regerror, regfree \- regular-expression library -.SH SYNOPSIS -.ft B -.\".na -#include -.br -#include -.HP 10 -int regcomp(regex_t\ *preg, const\ char\ *pattern, int\ cflags); -.HP -int\ regexec(const\ regex_t\ *preg, const\ char\ *string, -size_t\ nmatch, regmatch_t\ pmatch[], int\ eflags); -.HP -size_t\ regerror(int\ errcode, const\ regex_t\ *preg, -char\ *errbuf, size_t\ errbuf_size); -.HP -void\ regfree(regex_t\ *preg); -.\".ad -.ft -.SH DESCRIPTION -These routines implement POSIX 1003.2 regular expressions (``RE''s); -see -.ZR . -.I Regcomp -compiles an RE written as a string into an internal form, -.I regexec -matches that internal form against a string and reports results, -.I regerror -transforms error codes from either into human-readable messages, -and -.I regfree -frees any dynamically-allocated storage used by the internal form -of an RE. -.PP -The header -.I -declares two structure types, -.I regex_t -and -.IR regmatch_t , -the former for compiled internal forms and the latter for match reporting. -It also declares the four functions, -a type -.IR regoff_t , -and a number of constants with names starting with ``REG_''. -.PP -.I Regcomp -compiles the regular expression contained in the -.I pattern -string, -subject to the flags in -.IR cflags , -and places the results in the -.I regex_t -structure pointed to by -.IR preg . -.I Cflags -is the bitwise OR of zero or more of the following flags: -.IP REG_EXTENDED \w'REG_EXTENDED'u+2n -Compile modern (``extended'') REs, -rather than the obsolete (``basic'') REs that -are the default. -.IP REG_BASIC -This is a synonym for 0, -provided as a counterpart to REG_EXTENDED to improve readability. -This is an extension, -compatible with but not specified by POSIX 1003.2, -and should be used with -caution in software intended to be portable to other systems. -.IP REG_NOSPEC -Compile with recognition of all special characters turned off. -All characters are thus considered ordinary, -so the ``RE'' is a literal string. -This is an extension, -compatible with but not specified by POSIX 1003.2, -and should be used with -caution in software intended to be portable to other systems. -REG_EXTENDED and REG_NOSPEC may not be used -in the same call to -.IR regcomp . -.IP REG_ICASE -Compile for matching that ignores upper/lower case distinctions. -See -.ZR . -.IP REG_NOSUB -Compile for matching that need only report success or failure, -not what was matched. -.IP REG_NEWLINE -Compile for newline-sensitive matching. -By default, newline is a completely ordinary character with no special -meaning in either REs or strings. -With this flag, -`[^' bracket expressions and `.' never match newline, -a `^' anchor matches the null string after any newline in the string -in addition to its normal function, -and the `$' anchor matches the null string before any newline in the -string in addition to its normal function. -.IP REG_PEND -The regular expression ends, -not at the first NUL, -but just before the character pointed to by the -.I re_endp -member of the structure pointed to by -.IR preg . -The -.I re_endp -member is of type -.IR const\ char\ * . -This flag permits inclusion of NULs in the RE; -they are considered ordinary characters. -This is an extension, -compatible with but not specified by POSIX 1003.2, -and should be used with -caution in software intended to be portable to other systems. -.PP -When successful, -.I regcomp -returns 0 and fills in the structure pointed to by -.IR preg . -One member of that structure -(other than -.IR re_endp ) -is publicized: -.IR re_nsub , -of type -.IR size_t , -contains the number of parenthesized subexpressions within the RE -(except that the value of this member is undefined if the -REG_NOSUB flag was used). -If -.I regcomp -fails, it returns a non-zero error code; -see DIAGNOSTICS. -.PP -.I Regexec -matches the compiled RE pointed to by -.I preg -against the -.IR string , -subject to the flags in -.IR eflags , -and reports results using -.IR nmatch , -.IR pmatch , -and the returned value. -The RE must have been compiled by a previous invocation of -.IR regcomp . -The compiled form is not altered during execution of -.IR regexec , -so a single compiled RE can be used simultaneously by multiple threads. -.PP -By default, -the NUL-terminated string pointed to by -.I string -is considered to be the text of an entire line, -with the NUL indicating the end of the line. -(That is, -any other end-of-line marker is considered to have been removed -and replaced by the NUL.) -The -.I eflags -argument is the bitwise OR of zero or more of the following flags: -.IP REG_NOTBOL \w'REG_STARTEND'u+2n -The first character of -the string -is not the beginning of a line, so the `^' anchor should not match before it. -This does not affect the behavior of newlines under REG_NEWLINE. -.IP REG_NOTEOL -The NUL terminating -the string -does not end a line, so the `$' anchor should not match before it. -This does not affect the behavior of newlines under REG_NEWLINE. -.IP REG_STARTEND -The string is considered to start at -\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_so\fR -and to have a terminating NUL located at -\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_eo\fR -(there need not actually be a NUL at that location), -regardless of the value of -.IR nmatch . -See below for the definition of -.IR pmatch -and -.IR nmatch . -This is an extension, -compatible with but not specified by POSIX 1003.2, -and should be used with -caution in software intended to be portable to other systems. -Note that a non-zero \fIrm_so\fR does not imply REG_NOTBOL; -REG_STARTEND affects only the location of the string, -not how it is matched. -.PP -See -.ZR -for a discussion of what is matched in situations where an RE or a -portion thereof could match any of several substrings of -.IR string . -.PP -Normally, -.I regexec -returns 0 for success and the non-zero code REG_NOMATCH for failure. -Other non-zero error codes may be returned in exceptional situations; -see DIAGNOSTICS. -.PP -If REG_NOSUB was specified in the compilation of the RE, -or if -.I nmatch -is 0, -.I regexec -ignores the -.I pmatch -argument (but see below for the case where REG_STARTEND is specified). -Otherwise, -.I pmatch -points to an array of -.I nmatch -structures of type -.IR regmatch_t . -Such a structure has at least the members -.I rm_so -and -.IR rm_eo , -both of type -.I regoff_t -(a signed arithmetic type at least as large as an -.I off_t -and a -.IR ssize_t ), -containing respectively the offset of the first character of a substring -and the offset of the first character after the end of the substring. -Offsets are measured from the beginning of the -.I string -argument given to -.IR regexec . -An empty substring is denoted by equal offsets, -both indicating the character following the empty substring. -.PP -The 0th member of the -.I pmatch -array is filled in to indicate what substring of -.I string -was matched by the entire RE. -Remaining members report what substring was matched by parenthesized -subexpressions within the RE; -member -.I i -reports subexpression -.IR i , -with subexpressions counted (starting at 1) by the order of their opening -parentheses in the RE, left to right. -Unused entries in the array\(emcorresponding either to subexpressions that -did not participate in the match at all, or to subexpressions that do not -exist in the RE (that is, \fIi\fR\ > \fIpreg\fR\->\fIre_nsub\fR)\(emhave both -.I rm_so -and -.I rm_eo -set to \-1. -If a subexpression participated in the match several times, -the reported substring is the last one it matched. -(Note, as an example in particular, that when the RE `(b*)+' matches `bbb', -the parenthesized subexpression matches the three `b's and then -an infinite number of empty strings following the last `b', -so the reported substring is one of the empties.) -.PP -If REG_STARTEND is specified, -.I pmatch -must point to at least one -.I regmatch_t -(even if -.I nmatch -is 0 or REG_NOSUB was specified), -to hold the input offsets for REG_STARTEND. -Use for output is still entirely controlled by -.IR nmatch ; -if -.I nmatch -is 0 or REG_NOSUB was specified, -the value of -.IR pmatch [0] -will not be changed by a successful -.IR regexec . -.PP -.I Regerror -maps a non-zero -.I errcode -from either -.I regcomp -or -.I regexec -to a human-readable, printable message. -If -.I preg -is non-NULL, -the error code should have arisen from use of -the -.I regex_t -pointed to by -.IR preg , -and if the error code came from -.IR regcomp , -it should have been the result from the most recent -.I regcomp -using that -.IR regex_t . -.RI ( Regerror -may be able to supply a more detailed message using information -from the -.IR regex_t .) -.I Regerror -places the NUL-terminated message into the buffer pointed to by -.IR errbuf , -limiting the length (including the NUL) to at most -.I errbuf_size -bytes. -If the whole message won't fit, -as much of it as will fit before the terminating NUL is supplied. -In any case, -the returned value is the size of buffer needed to hold the whole -message (including terminating NUL). -If -.I errbuf_size -is 0, -.I errbuf -is ignored but the return value is still correct. -.PP -If the -.I errcode -given to -.I regerror -is first ORed with REG_ITOA, -the ``message'' that results is the printable name of the error code, -e.g. ``REG_NOMATCH'', -rather than an explanation thereof. -If -.I errcode -is REG_ATOI, -then -.I preg -shall be non-NULL and the -.I re_endp -member of the structure it points to -must point to the printable name of an error code; -in this case, the result in -.I errbuf -is the decimal digits of -the numeric value of the error code -(0 if the name is not recognized). -REG_ITOA and REG_ATOI are intended primarily as debugging facilities; -they are extensions, -compatible with but not specified by POSIX 1003.2, -and should be used with -caution in software intended to be portable to other systems. -Be warned also that they are considered experimental and changes are possible. -.PP -.I Regfree -frees any dynamically-allocated storage associated with the compiled RE -pointed to by -.IR preg . -The remaining -.I regex_t -is no longer a valid compiled RE -and the effect of supplying it to -.I regexec -or -.I regerror -is undefined. -.PP -None of these functions references global variables except for tables -of constants; -all are safe for use from multiple threads if the arguments are safe. -.SH IMPLEMENTATION CHOICES -There are a number of decisions that 1003.2 leaves up to the implementor, -either by explicitly saying ``undefined'' or by virtue of them being -forbidden by the RE grammar. -This implementation treats them as follows. -.PP -See -.ZR -for a discussion of the definition of case-independent matching. -.PP -There is no particular limit on the length of REs, -except insofar as memory is limited. -Memory usage is approximately linear in RE size, and largely insensitive -to RE complexity, except for bounded repetitions. -See BUGS for one short RE using them -that will run almost any system out of memory. -.PP -A backslashed character other than one specifically given a magic meaning -by 1003.2 (such magic meanings occur only in obsolete [``basic''] REs) -is taken as an ordinary character. -.PP -Any unmatched [ is a REG_EBRACK error. -.PP -Equivalence classes cannot begin or end bracket-expression ranges. -The endpoint of one range cannot begin another. -.PP -RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255. -.PP -A repetition operator (?, *, +, or bounds) cannot follow another -repetition operator. -A repetition operator cannot begin an expression or subexpression -or follow `^' or `|'. -.PP -`|' cannot appear first or last in a (sub)expression or after another `|', -i.e. an operand of `|' cannot be an empty subexpression. -An empty parenthesized subexpression, `()', is legal and matches an -empty (sub)string. -An empty string is not a legal RE. -.PP -A `{' followed by a digit is considered the beginning of bounds for a -bounded repetition, which must then follow the syntax for bounds. -A `{' \fInot\fR followed by a digit is considered an ordinary character. -.PP -`^' and `$' beginning and ending subexpressions in obsolete (``basic'') -REs are anchors, not ordinary characters. -.SH SEE ALSO -grep(1), regex(7) -.PP -POSIX 1003.2, sections 2.8 (Regular Expression Notation) -and -B.5 (C Binding for Regular Expression Matching). -.SH DIAGNOSTICS -Non-zero error codes from -.I regcomp -and -.I regexec -include the following: -.PP -.nf -.ta \w'REG_ECOLLATE'u+3n -REG_NOMATCH regexec() failed to match -REG_BADPAT invalid regular expression -REG_ECOLLATE invalid collating element -REG_ECTYPE invalid character class -REG_EESCAPE \e applied to unescapable character -REG_ESUBREG invalid backreference number -REG_EBRACK brackets [ ] not balanced -REG_EPAREN parentheses ( ) not balanced -REG_EBRACE braces { } not balanced -REG_BADBR invalid repetition count(s) in { } -REG_ERANGE invalid character range in [ ] -REG_ESPACE ran out of memory -REG_BADRPT ?, *, or + operand invalid -REG_EMPTY empty (sub)expression -REG_ASSERT ``can't happen''\(emyou found a bug -REG_INVARG invalid argument, e.g. negative-length string -.fi -.SH HISTORY -Written by Henry Spencer, -henry@zoo.toronto.edu. -.SH BUGS -This is an alpha release with known defects. -Please report problems. -.PP -There is one known functionality bug. -The implementation of internationalization is incomplete: -the locale is always assumed to be the default one of 1003.2, -and only the collating elements etc. of that locale are available. -.PP -The back-reference code is subtle and doubts linger about its correctness -in complex cases. -.PP -.I Regexec -performance is poor. -This will improve with later releases. -.I Nmatch -exceeding 0 is expensive; -.I nmatch -exceeding 1 is worse. -.I Regexec -is largely insensitive to RE complexity \fIexcept\fR that back -references are massively expensive. -RE length does matter; in particular, there is a strong speed bonus -for keeping RE length under about 30 characters, -with most special characters counting roughly double. -.PP -.I Regcomp -implements bounded repetitions by macro expansion, -which is costly in time and space if counts are large -or bounded repetitions are nested. -An RE like, say, -`((((a{1,100}){1,100}){1,100}){1,100}){1,100}' -will (eventually) run almost any existing machine out of swap space. -.PP -There are suspected problems with response to obscure error conditions. -Notably, -certain kinds of internal overflow, -produced only by truly enormous REs or by multiply nested bounded repetitions, -are probably not handled well. -.PP -Due to a mistake in 1003.2, things like `a)b' are legal REs because `)' is -a special character only in the presence of a previous unmatched `('. -This can't be fixed until the spec is fixed. -.PP -The standard's definition of back references is vague. -For example, does -`a\e(\e(b\e)*\e2\e)*d' match `abbbd'? -Until the standard is clarified, -behavior in such cases should not be relied on. -.PP -The implementation of word-boundary matching is a bit of a kludge, -and bugs may lurk in combinations of word-boundary matching and anchoring. diff --git a/src/regex/regex.7 b/src/regex/regex.7 deleted file mode 100644 index 0fa180269e..0000000000 --- a/src/regex/regex.7 +++ /dev/null @@ -1,235 +0,0 @@ -.TH REGEX 7 "25 Oct 1995" -.BY "Henry Spencer" -.SH NAME -regex \- POSIX 1003.2 regular expressions -.SH DESCRIPTION -Regular expressions (``RE''s), -as defined in POSIX 1003.2, come in two forms: -modern REs (roughly those of -.IR egrep ; -1003.2 calls these ``extended'' REs) -and obsolete REs (roughly those of -.IR ed ; -1003.2 ``basic'' REs). -Obsolete REs mostly exist for backward compatibility in some old programs; -they will be discussed at the end. -1003.2 leaves some aspects of RE syntax and semantics open; -`\(dg' marks decisions on these aspects that -may not be fully portable to other 1003.2 implementations. -.PP -A (modern) RE is one\(dg or more non-empty\(dg \fIbranches\fR, -separated by `|'. -It matches anything that matches one of the branches. -.PP -A branch is one\(dg or more \fIpieces\fR, concatenated. -It matches a match for the first, followed by a match for the second, etc. -.PP -A piece is an \fIatom\fR possibly followed -by a single\(dg `*', `+', `?', or \fIbound\fR. -An atom followed by `*' matches a sequence of 0 or more matches of the atom. -An atom followed by `+' matches a sequence of 1 or more matches of the atom. -An atom followed by `?' matches a sequence of 0 or 1 matches of the atom. -.PP -A \fIbound\fR is `{' followed by an unsigned decimal integer, -possibly followed by `,' -possibly followed by another unsigned decimal integer, -always followed by `}'. -The integers must lie between 0 and RE_DUP_MAX (255\(dg) inclusive, -and if there are two of them, the first may not exceed the second. -An atom followed by a bound containing one integer \fIi\fR -and no comma matches -a sequence of exactly \fIi\fR matches of the atom. -An atom followed by a bound -containing one integer \fIi\fR and a comma matches -a sequence of \fIi\fR or more matches of the atom. -An atom followed by a bound -containing two integers \fIi\fR and \fIj\fR matches -a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom. -.PP -An atom is a regular expression enclosed in `()' (matching a match for the -regular expression), -an empty set of `()' (matching the null string)\(dg, -a \fIbracket expression\fR (see below), `.' -(matching any single character), `^' (matching the null string at the -beginning of a line), `$' (matching the null string at the -end of a line), a `\e' followed by one of the characters -`^.[$()|*+?{\e' -(matching that character taken as an ordinary character), -a `\e' followed by any other character\(dg -(matching that character taken as an ordinary character, -as if the `\e' had not been present\(dg), -or a single character with no other significance (matching that character). -A `{' followed by a character other than a digit is an ordinary -character, not the beginning of a bound\(dg. -It is illegal to end an RE with `\e'. -.PP -A \fIbracket expression\fR is a list of characters enclosed in `[]'. -It normally matches any single character from the list (but see below). -If the list begins with `^', -it matches any single character -(but see below) \fInot\fR from the rest of the list. -If two characters in the list are separated by `\-', this is shorthand -for the full \fIrange\fR of characters between those two (inclusive) in the -collating sequence, -e.g. `[0\-9]' in ASCII matches any decimal digit. -It is illegal\(dg for two ranges to share an -endpoint, e.g. `a\-c\-e'. -Ranges are very collating-sequence-dependent, -and portable programs should avoid relying on them. -.PP -To include a literal `]' in the list, make it the first character -(following a possible `^'). -To include a literal `\-', make it the first or last character, -or the second endpoint of a range. -To use a literal `\-' as the first endpoint of a range, -enclose it in `[.' and `.]' to make it a collating element (see below). -With the exception of these and some combinations using `[' (see next -paragraphs), all other special characters, including `\e', lose their -special significance within a bracket expression. -.PP -Within a bracket expression, a collating element (a character, -a multi-character sequence that collates as if it were a single character, -or a collating-sequence name for either) -enclosed in `[.' and `.]' stands for the -sequence of characters of that collating element. -The sequence is a single element of the bracket expression's list. -A bracket expression containing a multi-character collating element -can thus match more than one character, -e.g. if the collating sequence includes a `ch' collating element, -then the RE `[[.ch.]]*c' matches the first five characters -of `chchcc'. -.PP -Within a bracket expression, a collating element enclosed in `[=' and -`=]' is an equivalence class, standing for the sequences of characters -of all collating elements equivalent to that one, including itself. -(If there are no other equivalent collating elements, -the treatment is as if the enclosing delimiters were `[.' and `.]'.) -For example, if o and \o'o^' are the members of an equivalence class, -then `[[=o=]]', `[[=\o'o^'=]]', and `[o\o'o^']' are all synonymous. -An equivalence class may not\(dg be an endpoint -of a range. -.PP -Within a bracket expression, the name of a \fIcharacter class\fR enclosed -in `[:' and `:]' stands for the list of all characters belonging to that -class. -Standard character class names are: -.PP -.RS -.nf -.ta 3c 6c 9c -alnum digit punct -alpha graph space -blank lower upper -cntrl print xdigit -.fi -.RE -.PP -These stand for the character classes defined in -.IR ctype (3). -A locale may provide others. -A character class may not be used as an endpoint of a range. -.PP -There are two special cases\(dg of bracket expressions: -the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at -the beginning and end of a word respectively. -A word is defined as a sequence of -word characters -which is neither preceded nor followed by -word characters. -A word character is an -.I alnum -character (as defined by -.IR ctype (3)) -or an underscore. -This is an extension, -compatible with but not specified by POSIX 1003.2, -and should be used with -caution in software intended to be portable to other systems. -.PP -In the event that an RE could match more than one substring of a given -string, -the RE matches the one starting earliest in the string. -If the RE could match more than one substring starting at that point, -it matches the longest. -Subexpressions also match the longest possible substrings, subject to -the constraint that the whole match be as long as possible, -with subexpressions starting earlier in the RE taking priority over -ones starting later. -Note that higher-level subexpressions thus take priority over -their lower-level component subexpressions. -.PP -Match lengths are measured in characters, not collating elements. -A null string is considered longer than no match at all. -For example, -`bb*' matches the three middle characters of `abbbc', -`(wee|week)(knights|nights)' matches all ten characters of `weeknights', -when `(.*).*' is matched against `abc' the parenthesized subexpression -matches all three characters, and -when `(a*)*' is matched against `bc' both the whole RE and the parenthesized -subexpression match the null string. -.PP -If case-independent matching is specified, -the effect is much as if all case distinctions had vanished from the -alphabet. -When an alphabetic that exists in multiple cases appears as an -ordinary character outside a bracket expression, it is effectively -transformed into a bracket expression containing both cases, -e.g. `x' becomes `[xX]'. -When it appears inside a bracket expression, all case counterparts -of it are added to the bracket expression, so that (e.g.) `[x]' -becomes `[xX]' and `[^x]' becomes `[^xX]'. -.PP -No particular limit is imposed on the length of REs\(dg. -Programs intended to be portable should not employ REs longer -than 256 bytes, -as an implementation can refuse to accept such REs and remain -POSIX-compliant. -.PP -Obsolete (``basic'') regular expressions differ in several respects. -`|', `+', and `?' are ordinary characters and there is no equivalent -for their functionality. -The delimiters for bounds are `\e{' and `\e}', -with `{' and `}' by themselves ordinary characters. -The parentheses for nested subexpressions are `\e(' and `\e)', -with `(' and `)' by themselves ordinary characters. -`^' is an ordinary character except at the beginning of the -RE or\(dg the beginning of a parenthesized subexpression, -`$' is an ordinary character except at the end of the -RE or\(dg the end of a parenthesized subexpression, -and `*' is an ordinary character if it appears at the beginning of the -RE or the beginning of a parenthesized subexpression -(after a possible leading `^'). -Finally, there is one new type of atom, a \fIback reference\fR: -`\e' followed by a non-zero decimal digit \fId\fR -matches the same sequence of characters -matched by the \fId\fRth parenthesized subexpression -(numbering subexpressions by the positions of their opening parentheses, -left to right), -so that (e.g.) `\e([bc]\e)\e1' matches `bb' or `cc' but not `bc'. -.SH SEE ALSO -regex(3) -.PP -POSIX 1003.2, section 2.8 (Regular Expression Notation). -.SH HISTORY -Written by Henry Spencer, based on the 1003.2 spec. -.SH BUGS -Having two kinds of REs is a botch. -.PP -The current 1003.2 spec says that `)' is an ordinary character in -the absence of an unmatched `('; -this was an unintentional result of a wording error, -and change is likely. -Avoid relying on it. -.PP -Back references are a dreadful botch, -posing major problems for efficient implementations. -They are also somewhat vaguely defined -(does -`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?). -Avoid using them. -.PP -1003.2's specification of case-independent matching is vague. -The ``one case implies all cases'' definition given above -is current consensus among implementors as to the right interpretation. -.PP -The syntax for word boundaries is incredibly ugly. diff --git a/src/regex/regex.h b/src/regex/regex.h deleted file mode 100644 index a1fcec2e1c..0000000000 --- a/src/regex/regex.h +++ /dev/null @@ -1,202 +0,0 @@ -#ifndef _REGEX_H_ -#define _REGEX_H_ /* never again */ -/* - * regular expressions - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - */ - -/* - * Add your own defines, if needed, here. - */ -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#ifndef wxCHECK_GCC_VERSION -#define wxCHECK_GCC_VERSION( major, minor ) \ - ( defined(__GNUC__) && defined(__GNUC_MINOR__) \ - && ( ( __GNUC__ > (major) ) \ - || ( __GNUC__ == (major) && __GNUC_MINOR__ >= (minor) ) ) ) -#endif - -#if !wxUSE_UNICODE -# define wx_wchar char -#else // Unicode - #if (defined(__GNUC__) && !wxCHECK_GCC_VERSION(2, 96)) -# define wx_wchar __WCHAR_TYPE__ - #else // __WCHAR_TYPE__ and gcc < 2.96 - // standard case -# define wx_wchar wchar_t - #endif // __WCHAR_TYPE__ -#endif // ASCII/Unicode - -/* - * interface types etc. - */ - -/* - * regoff_t has to be large enough to hold either off_t or ssize_t, - * and must be signed; it's only a guess that long is suitable. - */ -typedef long regoff_t; - -/* - * other interface types - */ - -/* the biggie, a compiled RE (or rather, a front end to same) */ -typedef struct -{ - int re_magic; /* magic number */ - size_t re_nsub; /* number of subexpressions */ - long re_info; /* information about RE */ -#define REG_UBACKREF 000001 -#define REG_ULOOKAHEAD 000002 -#define REG_UBOUNDS 000004 -#define REG_UBRACES 000010 -#define REG_UBSALNUM 000020 -#define REG_UPBOTCH 000040 -#define REG_UBBS 000100 -#define REG_UNONPOSIX 000200 -#define REG_UUNSPEC 000400 -#define REG_UUNPORT 001000 -#define REG_ULOCALE 002000 -#define REG_UEMPTYMATCH 004000 -#define REG_UIMPOSSIBLE 010000 -#define REG_USHORTEST 020000 - int re_csize; /* sizeof(character) */ - char *re_endp; /* backward compatibility kludge */ - /* the rest is opaque pointers to hidden innards */ - char *re_guts; /* `char *' is more portable than `void *' */ - char *re_fns; -} regex_t; - -/* result reporting (may acquire more fields later) */ -typedef struct -{ - regoff_t rm_so; /* start of substring */ - regoff_t rm_eo; /* end of substring */ -} regmatch_t; - -/* supplementary control and reporting */ -typedef struct -{ - regmatch_t rm_extend; /* see REG_EXPECT */ -} rm_detail_t; - - - -/* - * regex compilation flags - */ -#define REG_BASIC 000000 /* BREs (convenience) */ -#define REG_EXTENDED 000001 /* EREs */ -#define REG_ADVF 000002 /* advanced features in EREs */ -#define REG_ADVANCED 000003 /* AREs (which are also EREs) */ -#define REG_QUOTE 000004 /* no special characters, none */ -#define REG_NOSPEC REG_QUOTE /* historical synonym */ -#define REG_ICASE 000010 /* ignore case */ -#define REG_NOSUB 000020 /* don't care about subexpressions */ -#define REG_EXPANDED 000040 /* expanded format, white space & comments */ -#define REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */ -#define REG_NLANCH 000200 /* ^ matches after \n, $ before */ -#define REG_NEWLINE 000300 /* newlines are line terminators */ -#define REG_PEND 000400 /* ugh -- backward-compatibility hack */ -#define REG_EXPECT 001000 /* report details on partial/limited - * matches */ -#define REG_BOSONLY 002000 /* temporary kludge for BOS-only matches */ -#define REG_DUMP 004000 /* none of your business :-) */ -#define REG_FAKE 010000 /* none of your business :-) */ -#define REG_PROGRESS 020000 /* none of your business :-) */ - - - -/* - * regex execution flags - */ -#define REG_NOTBOL 0001 /* BOS is not BOL */ -#define REG_NOTEOL 0002 /* EOS is not EOL */ -#define REG_STARTEND 0004 /* backward compatibility kludge */ -#define REG_FTRACE 0010 /* none of your business */ -#define REG_MTRACE 0020 /* none of your business */ -#define REG_SMALL 0040 /* none of your business */ - - -/* - * error reporting - * Be careful if modifying the list of error codes -- the table used by - * regerror() is generated automatically from this file! - */ -#define REG_OKAY 0 /* no errors detected */ -#define REG_NOMATCH 1 /* failed to match */ -#define REG_BADPAT 2 /* invalid regexp */ -#define REG_ECOLLATE 3 /* invalid collating element */ -#define REG_ECTYPE 4 /* invalid character class */ -#define REG_EESCAPE 5 /* invalid escape \ sequence */ -#define REG_ESUBREG 6 /* invalid backreference number */ -#define REG_EBRACK 7 /* brackets [] not balanced */ -#define REG_EPAREN 8 /* parentheses () not balanced */ -#define REG_EBRACE 9 /* braces {} not balanced */ -#define REG_BADBR 10 /* invalid repetition count(s) */ -#define REG_ERANGE 11 /* invalid character range */ -#define REG_ESPACE 12 /* out of memory */ -#define REG_BADRPT 13 /* quantifier operand invalid */ -#define REG_ASSERT 15 /* "can't happen" -- you found a bug */ -#define REG_INVARG 16 /* invalid argument to regex function */ -#define REG_MIXED 17 /* character widths of regex and string - * differ */ -#define REG_BADOPT 18 /* invalid embedded option */ -/* two specials for debugging and testing */ -#define REG_ATOI 101 /* convert error-code name to number */ -#define REG_ITOA 102 /* convert error-code number to name */ - - - -/* - * the prototypes for exported functions - */ -extern int wx_regcomp(regex_t *, const wx_wchar *, size_t, int); -extern int regcomp(regex_t *, const wx_wchar *, int); -extern int wx_regexec(regex_t *, const wx_wchar *, size_t, rm_detail_t *, size_t, regmatch_t[], int); -extern int regexec(regex_t *, const wx_wchar *, size_t, regmatch_t[], int); -extern void regfree(regex_t *); -extern size_t regerror(int, const regex_t *, char *, size_t); -extern void wx_regfree(regex_t *); -extern size_t wx_regerror(int, const regex_t *, char *, size_t); - -#ifdef __cplusplus -} -#endif - -#endif /* _REGEX_H_ */ diff --git a/src/regex/regexec.c b/src/regex/regexec.c deleted file mode 100644 index 41d49bdab5..0000000000 --- a/src/regex/regexec.c +++ /dev/null @@ -1,1038 +0,0 @@ -/* - * re_*exec and friends - match REs - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "regguts.h" - - - -/* lazy-DFA representation */ -struct arcp { /* "pointer" to an outarc */ - struct sset *ss; - color co; -}; - -struct sset { /* state set */ - unsigned *states; /* pointer to bitvector */ - unsigned hash; /* hash of bitvector */ -# define HASH(bv, nw) (((nw) == 1) ? *(bv) : hash(bv, nw)) -# define HIT(h,bv,ss,nw) ((ss)->hash == (h) && ((nw) == 1 || \ - memcmp(VS(bv), VS((ss)->states), (nw)*sizeof(unsigned)) == 0)) - int flags; -# define STARTER 01 /* the initial state set */ -# define POSTSTATE 02 /* includes the goal state */ -# define LOCKED 04 /* locked in cache */ -# define NOPROGRESS 010 /* zero-progress state set */ - struct arcp ins; /* chain of inarcs pointing here */ - chr *lastseen; /* last entered on arrival here */ - struct sset **outs; /* outarc vector indexed by color */ - struct arcp *inchain; /* chain-pointer vector for outarcs */ -}; - -struct dfa { - int nssets; /* size of cache */ - int nssused; /* how many entries occupied yet */ - int nstates; /* number of states */ - int ncolors; /* length of outarc and inchain vectors */ - int wordsper; /* length of state-set bitvectors */ - struct sset *ssets; /* state-set cache */ - unsigned *statesarea; /* bitvector storage */ - unsigned *work; /* pointer to work area within statesarea */ - struct sset **outsarea; /* outarc-vector storage */ - struct arcp *incarea; /* inchain storage */ - struct cnfa *cnfa; - struct colormap *cm; - chr *lastpost; /* location of last cache-flushed success */ - chr *lastnopr; /* location of last cache-flushed NOPROGRESS */ - struct sset *search; /* replacement-search-pointer memory */ - int cptsmalloced; /* were the areas individually malloced? */ - char *mallocarea; /* self, or master malloced area, or NULL */ -}; - -#define WORK 1 /* number of work bitvectors needed */ - -/* setup for non-malloc allocation for small cases */ -#define FEWSTATES 20 /* must be less than UBITS */ -#define FEWCOLORS 15 -struct smalldfa { - struct dfa dfa; - struct sset ssets[FEWSTATES*2]; - unsigned statesarea[FEWSTATES*2 + WORK]; - struct sset *outsarea[FEWSTATES*2 * FEWCOLORS]; - struct arcp incarea[FEWSTATES*2 * FEWCOLORS]; -}; -#define DOMALLOC ((struct smalldfa *)NULL) /* force malloc */ - - - -/* internal variables, bundled for easy passing around */ -struct vars { - regex_t *re; - struct guts *g; - int eflags; /* copies of arguments */ - size_t nmatch; - regmatch_t *pmatch; - rm_detail_t *details; - chr *start; /* start of string */ - chr *stop; /* just past end of string */ - int err; /* error code if any (0 none) */ - regoff_t *mem; /* memory vector for backtracking */ - struct smalldfa dfa1; - struct smalldfa dfa2; -}; -#define VISERR(vv) ((vv)->err != 0) /* have we seen an error yet? */ -#define ISERR() VISERR(v) -#define VERR(vv,e) (((vv)->err) ? (vv)->err : ((vv)->err = (e))) -#define ERR(e) VERR(v, e) /* record an error */ -#define NOERR() {if (ISERR()) return v->err;} /* if error seen, return it */ -#define OFF(p) ((p) - v->start) -#define LOFF(p) ((long)OFF(p)) - - - -/* - * forward declarations - */ -/* =====^!^===== begin forwards =====^!^===== */ -/* automatically gathered by fwd; do not hand-edit */ -/* === regexec.c === */ -int exec _ANSI_ARGS_((regex_t *, CONST chr *, size_t, rm_detail_t *, size_t, regmatch_t [], int)); -static int find _ANSI_ARGS_((struct vars *, struct cnfa *, struct colormap *)); -static int cfind _ANSI_ARGS_((struct vars *, struct cnfa *, struct colormap *)); -static int cfindloop _ANSI_ARGS_((struct vars *, struct cnfa *, struct colormap *, struct dfa *, struct dfa *, chr **)); -static VOID zapsubs _ANSI_ARGS_((regmatch_t *, size_t)); -static VOID zapmem _ANSI_ARGS_((struct vars *, struct subre *)); -static VOID subset _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int dissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int condissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int altdissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int cdissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int ccondissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int crevdissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int cbrdissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -static int caltdissect _ANSI_ARGS_((struct vars *, struct subre *, chr *, chr *)); -/* === rege_dfa.c === */ -static chr *longest _ANSI_ARGS_((struct vars *, struct dfa *, chr *, chr *, int *)); -static chr *shortest _ANSI_ARGS_((struct vars *, struct dfa *, chr *, chr *, chr *, chr **, int *)); -static chr *lastcold _ANSI_ARGS_((struct vars *, struct dfa *)); -static struct dfa *newdfa _ANSI_ARGS_((struct vars *, struct cnfa *, struct colormap *, struct smalldfa *)); -static VOID freedfa _ANSI_ARGS_((struct dfa *)); -static unsigned hash _ANSI_ARGS_((unsigned *, int)); -static struct sset *initialize _ANSI_ARGS_((struct vars *, struct dfa *, chr *)); -static struct sset *miss _ANSI_ARGS_((struct vars *, struct dfa *, struct sset *, pcolor, chr *, chr *)); -static int lacon _ANSI_ARGS_((struct vars *, struct cnfa *, chr *, pcolor)); -static struct sset *getvacant _ANSI_ARGS_((struct vars *, struct dfa *, chr *, chr *)); -static struct sset *pickss _ANSI_ARGS_((struct vars *, struct dfa *, chr *, chr *)); -/* automatically gathered by fwd; do not hand-edit */ -/* =====^!^===== end forwards =====^!^===== */ - - - -/* - - exec - match regular expression - ^ int exec(regex_t *, CONST chr *, size_t, rm_detail_t *, - ^ size_t, regmatch_t [], int); - */ -int -exec(re, string, len, details, nmatch, pmatch, flags) -regex_t *re; -CONST chr *string; -size_t len; -rm_detail_t *details; -size_t nmatch; -regmatch_t pmatch[]; -int flags; -{ - struct vars var; - register struct vars *v = &var; - int st; - size_t n; - int backref; -# define LOCALMAT 20 - regmatch_t mat[LOCALMAT]; -# define LOCALMEM 40 - regoff_t mem[LOCALMEM]; - - /* sanity checks */ - if (re == NULL || string == NULL || re->re_magic != REMAGIC) - return REG_INVARG; - if (re->re_csize != sizeof(chr)) - return REG_MIXED; - - /* setup */ - v->re = re; - v->g = (struct guts *)re->re_guts; - if ((v->g->cflags®_EXPECT) && details == NULL) - return REG_INVARG; - if (v->g->info®_UIMPOSSIBLE) - return REG_NOMATCH; - backref = (v->g->info®_UBACKREF) ? 1 : 0; - v->eflags = flags; - if (v->g->cflags®_NOSUB) - nmatch = 0; /* override client */ - v->nmatch = nmatch; - if (backref) { - /* need work area */ - if (v->g->nsub + 1 <= LOCALMAT) - v->pmatch = mat; - else - v->pmatch = (regmatch_t *)MALLOC((v->g->nsub + 1) * - sizeof(regmatch_t)); - if (v->pmatch == NULL) - return REG_ESPACE; - v->nmatch = v->g->nsub + 1; - } else - v->pmatch = pmatch; - v->details = details; - v->start = (chr *)string; - v->stop = (chr *)string + len; - v->err = 0; - if (backref) { - /* need retry memory */ - assert(v->g->ntree >= 0); - n = (size_t)v->g->ntree; - if (n <= LOCALMEM) - v->mem = mem; - else - v->mem = (regoff_t *)MALLOC(n*sizeof(regoff_t)); - if (v->mem == NULL) { - if (v->pmatch != pmatch && v->pmatch != mat) - FREE(v->pmatch); - return REG_ESPACE; - } - } else - v->mem = NULL; - - /* do it */ - assert(v->g->tree != NULL); - if (backref) - st = cfind(v, &v->g->tree->cnfa, &v->g->cmap); - else - st = find(v, &v->g->tree->cnfa, &v->g->cmap); - - /* copy (portion of) match vector over if necessary */ - if (st == REG_OKAY && v->pmatch != pmatch && nmatch > 0) { - zapsubs(pmatch, nmatch); - n = (nmatch < v->nmatch) ? nmatch : v->nmatch; - memcpy(VS(pmatch), VS(v->pmatch), n*sizeof(regmatch_t)); - } - - /* clean up */ - if (v->pmatch != pmatch && v->pmatch != mat) - FREE(v->pmatch); - if (v->mem != NULL && v->mem != mem) - FREE(v->mem); - return st; -} - -/* - - find - find a match for the main NFA (no-complications case) - ^ static int find(struct vars *, struct cnfa *, struct colormap *); - */ -static int -find(v, cnfa, cm) -struct vars *v; -struct cnfa *cnfa; -struct colormap *cm; -{ - struct dfa *s; - struct dfa *d; - chr *begin; - chr *end = NULL; - chr *cold; - chr *open; /* open and close of range of possible starts */ - chr *close; - int hitend; - int shorter = (v->g->tree->flags&SHORTER) ? 1 : 0; - - /* first, a shot with the search RE */ - s = newdfa(v, &v->g->search, cm, &v->dfa1); - assert(!(ISERR() && s != NULL)); - NOERR(); - MDEBUG(("\nsearch at %ld\n", LOFF(v->start))); - cold = NULL; - close = shortest(v, s, v->start, v->start, v->stop, &cold, (int *)NULL); - freedfa(s); - NOERR(); - if (v->g->cflags®_EXPECT) { - assert(v->details != NULL); - if (cold != NULL) - v->details->rm_extend.rm_so = OFF(cold); - else - v->details->rm_extend.rm_so = OFF(v->stop); - v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ - } - if (close == NULL) /* not found */ - return REG_NOMATCH; - if (v->nmatch == 0) /* found, don't need exact location */ - return REG_OKAY; - - /* find starting point and match */ - assert(cold != NULL); - open = cold; - cold = NULL; - MDEBUG(("between %ld and %ld\n", LOFF(open), LOFF(close))); - d = newdfa(v, cnfa, cm, &v->dfa1); - assert(!(ISERR() && d != NULL)); - NOERR(); - for (begin = open; begin <= close; begin++) { - MDEBUG(("\nfind trying at %ld\n", LOFF(begin))); - if (shorter) - end = shortest(v, d, begin, begin, v->stop, - (chr **)NULL, &hitend); - else - end = longest(v, d, begin, v->stop, &hitend); - NOERR(); - if (hitend && cold == NULL) - cold = begin; - if (end != NULL) - break; /* NOTE BREAK OUT */ - } - assert(end != NULL); /* search RE succeeded so loop should */ - freedfa(d); - - /* and pin down details */ - assert(v->nmatch > 0); - v->pmatch[0].rm_so = OFF(begin); - v->pmatch[0].rm_eo = OFF(end); - if (v->g->cflags®_EXPECT) { - if (cold != NULL) - v->details->rm_extend.rm_so = OFF(cold); - else - v->details->rm_extend.rm_so = OFF(v->stop); - v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ - } - if (v->nmatch == 1) /* no need for submatches */ - return REG_OKAY; - - /* submatches */ - zapsubs(v->pmatch, v->nmatch); - return dissect(v, v->g->tree, begin, end); -} - -/* - - cfind - find a match for the main NFA (with complications) - ^ static int cfind(struct vars *, struct cnfa *, struct colormap *); - */ -static int -cfind(v, cnfa, cm) -struct vars *v; -struct cnfa *cnfa; -struct colormap *cm; -{ - struct dfa *s; - struct dfa *d; - chr *cold; - int ret; - - s = newdfa(v, &v->g->search, cm, &v->dfa1); - NOERR(); - d = newdfa(v, cnfa, cm, &v->dfa2); - if (ISERR()) { - assert(d == NULL); - freedfa(s); - return v->err; - } - - ret = cfindloop(v, cnfa, cm, d, s, &cold); - - freedfa(d); - freedfa(s); - NOERR(); - if (v->g->cflags®_EXPECT) { - assert(v->details != NULL); - if (cold != NULL) - v->details->rm_extend.rm_so = OFF(cold); - else - v->details->rm_extend.rm_so = OFF(v->stop); - v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ - } - return ret; -} - -/* - - cfindloop - the heart of cfind - ^ static int cfindloop(struct vars *, struct cnfa *, struct colormap *, - ^ struct dfa *, struct dfa *, chr **); - */ -static int -cfindloop(v, cnfa, cm, d, s, coldp) -struct vars *v; -struct cnfa *cnfa; -struct colormap *cm; -struct dfa *d; -struct dfa *s; -chr **coldp; /* where to put coldstart pointer */ -{ - chr *begin; - chr *end; - chr *cold; - chr *open; /* open and close of range of possible starts */ - chr *close; - chr *estart; - chr *estop; - int er; - int shorter = v->g->tree->flags&SHORTER; - int hitend; - - assert(d != NULL && s != NULL); - cold = NULL; - close = v->start; - do { - MDEBUG(("\ncsearch at %ld\n", LOFF(close))); - close = shortest(v, s, close, close, v->stop, &cold, (int *)NULL); - if (close == NULL) - break; /* NOTE BREAK */ - assert(cold != NULL); - open = cold; - cold = NULL; - MDEBUG(("cbetween %ld and %ld\n", LOFF(open), LOFF(close))); - for (begin = open; begin <= close; begin++) { - MDEBUG(("\ncfind trying at %ld\n", LOFF(begin))); - estart = begin; - estop = v->stop; - for (;;) { - if (shorter) - end = shortest(v, d, begin, estart, - estop, (chr **)NULL, &hitend); - else - end = longest(v, d, begin, estop, - &hitend); - if (hitend && cold == NULL) - cold = begin; - if (end == NULL) - break; /* NOTE BREAK OUT */ - MDEBUG(("tentative end %ld\n", LOFF(end))); - zapsubs(v->pmatch, v->nmatch); - zapmem(v, v->g->tree); - er = cdissect(v, v->g->tree, begin, end); - if (er == REG_OKAY) { - if (v->nmatch > 0) { - v->pmatch[0].rm_so = OFF(begin); - v->pmatch[0].rm_eo = OFF(end); - } - *coldp = cold; - return REG_OKAY; - } - if (er != REG_NOMATCH) { - ERR(er); - return er; - } - if ((shorter) ? end == estop : end == begin) { - /* no point in trying again */ - *coldp = cold; - return REG_NOMATCH; - } - /* go around and try again */ - if (shorter) - estart = end + 1; - else - estop = end - 1; - } - } - } while (close < v->stop); - - *coldp = cold; - return REG_NOMATCH; -} - -/* - - zapsubs - initialize the subexpression matches to "no match" - ^ static VOID zapsubs(regmatch_t *, size_t); - */ -static VOID -zapsubs(p, n) -regmatch_t *p; -size_t n; -{ - size_t i; - - for (i = n-1; i > 0; i--) { - p[i].rm_so = -1; - p[i].rm_eo = -1; - } -} - -/* - - zapmem - initialize the retry memory of a subtree to zeros - ^ static VOID zapmem(struct vars *, struct subre *); - */ -static VOID -zapmem(v, t) -struct vars *v; -struct subre *t; -{ - if (t == NULL) - return; - - assert(v->mem != NULL); - v->mem[t->retry] = 0; - if (t->op == '(') { - assert(t->subno > 0); - v->pmatch[t->subno].rm_so = -1; - v->pmatch[t->subno].rm_eo = -1; - } - - if (t->left != NULL) - zapmem(v, t->left); - if (t->right != NULL) - zapmem(v, t->right); -} - -/* - - subset - set any subexpression relevant to a successful subre - ^ static VOID subset(struct vars *, struct subre *, chr *, chr *); - */ -static VOID -subset(v, sub, begin, end) -struct vars *v; -struct subre *sub; -chr *begin; -chr *end; -{ - int n = sub->subno; - - assert(n > 0); - if ((size_t)n >= v->nmatch) - return; - - MDEBUG(("setting %d\n", n)); - v->pmatch[n].rm_so = OFF(begin); - v->pmatch[n].rm_eo = OFF(end); -} - -/* - - dissect - determine subexpression matches (uncomplicated case) - ^ static int dissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -dissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - assert(t != NULL); - MDEBUG(("dissect %ld-%ld\n", LOFF(begin), LOFF(end))); - - switch (t->op) { - case '=': /* terminal node */ - assert(t->left == NULL && t->right == NULL); - return REG_OKAY; /* no action, parent did the work */ - break; - case '|': /* alternation */ - assert(t->left != NULL); - return altdissect(v, t, begin, end); - break; - case 'b': /* back ref -- shouldn't be calling us! */ - return REG_ASSERT; - break; - case '.': /* concatenation */ - assert(t->left != NULL && t->right != NULL); - return condissect(v, t, begin, end); - break; - case '(': /* capturing */ - assert(t->left != NULL && t->right == NULL); - assert(t->subno > 0); - subset(v, t, begin, end); - return dissect(v, t->left, begin, end); - break; - default: - return REG_ASSERT; - break; - } -} - -/* - - condissect - determine concatenation subexpression matches (uncomplicated) - ^ static int condissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -condissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - struct dfa *d; - struct dfa *d2; - chr *mid; - int i; - int shorter = (t->left->flags&SHORTER) ? 1 : 0; - chr *stop = (shorter) ? end : begin; - - assert(t->op == '.'); - assert(t->left != NULL && t->left->cnfa.nstates > 0); - assert(t->right != NULL && t->right->cnfa.nstates > 0); - - d = newdfa(v, &t->left->cnfa, &v->g->cmap, &v->dfa1); - NOERR(); - d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, &v->dfa2); - if (ISERR()) { - assert(d2 == NULL); - freedfa(d); - return v->err; - } - - /* pick a tentative midpoint */ - if (shorter) - mid = shortest(v, d, begin, begin, end, (chr **)NULL, - (int *)NULL); - else - mid = longest(v, d, begin, end, (int *)NULL); - if (mid == NULL) { - freedfa(d); - freedfa(d2); - return REG_ASSERT; - } - MDEBUG(("tentative midpoint %ld\n", LOFF(mid))); - - /* iterate until satisfaction or failure */ - while (longest(v, d2, mid, end, (int *)NULL) != end) { - /* that midpoint didn't work, find a new one */ - if (mid == stop) { - /* all possibilities exhausted! */ - MDEBUG(("no midpoint!\n")); - freedfa(d); - freedfa(d2); - return REG_ASSERT; - } - if (shorter) - mid = shortest(v, d, begin, mid+1, end, (chr **)NULL, - (int *)NULL); - else - mid = longest(v, d, begin, mid-1, (int *)NULL); - if (mid == NULL) { - /* failed to find a new one! */ - MDEBUG(("failed midpoint!\n")); - freedfa(d); - freedfa(d2); - return REG_ASSERT; - } - MDEBUG(("new midpoint %ld\n", LOFF(mid))); - } - - /* satisfaction */ - MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); - i = dissect(v, t->left, begin, mid); - if (i != REG_OKAY) - return i; - return dissect(v, t->right, mid, end); -} - -/* - - altdissect - determine alternative subexpression matches (uncomplicated) - ^ static int altdissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -altdissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - struct dfa *d; - int i; - - assert(t != NULL); - assert(t->op == '|'); - - for (i = 0; t != NULL; t = t->right, i++) { - MDEBUG(("trying %dth\n", i)); - assert(t->left != NULL && t->left->cnfa.nstates > 0); - d = newdfa(v, &t->left->cnfa, &v->g->cmap, &v->dfa1); - if (ISERR()) - return v->err; - if (longest(v, d, begin, end, (int *)NULL) == end) { - MDEBUG(("success\n")); - freedfa(d); - return dissect(v, t->left, begin, end); - } - freedfa(d); - } - return REG_ASSERT; /* none of them matched?!? */ -} - -/* - - cdissect - determine subexpression matches (with complications) - * The retry memory stores the offset of the trial midpoint from begin, - * plus 1 so that 0 uniquely means "clean slate". - ^ static int cdissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -cdissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - int er; - - assert(t != NULL); - MDEBUG(("cdissect %ld-%ld %c\n", LOFF(begin), LOFF(end), t->op)); - - switch (t->op) { - case '=': /* terminal node */ - assert(t->left == NULL && t->right == NULL); - return REG_OKAY; /* no action, parent did the work */ - break; - case '|': /* alternation */ - assert(t->left != NULL); - return caltdissect(v, t, begin, end); - break; - case 'b': /* back ref -- shouldn't be calling us! */ - assert(t->left == NULL && t->right == NULL); - return cbrdissect(v, t, begin, end); - break; - case '.': /* concatenation */ - assert(t->left != NULL && t->right != NULL); - return ccondissect(v, t, begin, end); - break; - case '(': /* capturing */ - assert(t->left != NULL && t->right == NULL); - assert(t->subno > 0); - er = cdissect(v, t->left, begin, end); - if (er == REG_OKAY) - subset(v, t, begin, end); - return er; - break; - default: - return REG_ASSERT; - break; - } -} - -/* - - ccondissect - concatenation subexpression matches (with complications) - * The retry memory stores the offset of the trial midpoint from begin, - * plus 1 so that 0 uniquely means "clean slate". - ^ static int ccondissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -ccondissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - struct dfa *d; - struct dfa *d2; - chr *mid; - int er; - - assert(t->op == '.'); - assert(t->left != NULL && t->left->cnfa.nstates > 0); - assert(t->right != NULL && t->right->cnfa.nstates > 0); - - if (t->left->flags&SHORTER) /* reverse scan */ - return crevdissect(v, t, begin, end); - - d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); - if (ISERR()) - return v->err; - d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, DOMALLOC); - if (ISERR()) { - freedfa(d); - return v->err; - } - MDEBUG(("cconcat %d\n", t->retry)); - - /* pick a tentative midpoint */ - if (v->mem[t->retry] == 0) { - mid = longest(v, d, begin, end, (int *)NULL); - if (mid == NULL) { - freedfa(d); - freedfa(d2); - return REG_NOMATCH; - } - MDEBUG(("tentative midpoint %ld\n", LOFF(mid))); - v->mem[t->retry] = (mid - begin) + 1; - } else { - mid = begin + (v->mem[t->retry] - 1); - MDEBUG(("working midpoint %ld\n", LOFF(mid))); - } - - /* iterate until satisfaction or failure */ - for (;;) { - /* try this midpoint on for size */ - er = cdissect(v, t->left, begin, mid); - if (er == REG_OKAY && - longest(v, d2, mid, end, (int *)NULL) == end && - (er = cdissect(v, t->right, mid, end)) == - REG_OKAY) - break; /* NOTE BREAK OUT */ - if (er != REG_OKAY && er != REG_NOMATCH) { - freedfa(d); - freedfa(d2); - return er; - } - - /* that midpoint didn't work, find a new one */ - if (mid == begin) { - /* all possibilities exhausted */ - MDEBUG(("%d no midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); - return REG_NOMATCH; - } - mid = longest(v, d, begin, mid-1, (int *)NULL); - if (mid == NULL) { - /* failed to find a new one */ - MDEBUG(("%d failed midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); - return REG_NOMATCH; - } - MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid))); - v->mem[t->retry] = (mid - begin) + 1; - zapmem(v, t->left); - zapmem(v, t->right); - } - - /* satisfaction */ - MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); - return REG_OKAY; -} - -/* - - crevdissect - determine backref shortest-first subexpression matches - * The retry memory stores the offset of the trial midpoint from begin, - * plus 1 so that 0 uniquely means "clean slate". - ^ static int crevdissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -crevdissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - struct dfa *d; - struct dfa *d2; - chr *mid; - int er; - - assert(t->op == '.'); - assert(t->left != NULL && t->left->cnfa.nstates > 0); - assert(t->right != NULL && t->right->cnfa.nstates > 0); - assert(t->left->flags&SHORTER); - - /* concatenation -- need to split the substring between parts */ - d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); - if (ISERR()) - return v->err; - d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, DOMALLOC); - if (ISERR()) { - freedfa(d); - return v->err; - } - MDEBUG(("crev %d\n", t->retry)); - - /* pick a tentative midpoint */ - if (v->mem[t->retry] == 0) { - mid = shortest(v, d, begin, begin, end, (chr **)NULL, (int *)NULL); - if (mid == NULL) { - freedfa(d); - freedfa(d2); - return REG_NOMATCH; - } - MDEBUG(("tentative midpoint %ld\n", LOFF(mid))); - v->mem[t->retry] = (mid - begin) + 1; - } else { - mid = begin + (v->mem[t->retry] - 1); - MDEBUG(("working midpoint %ld\n", LOFF(mid))); - } - - /* iterate until satisfaction or failure */ - for (;;) { - /* try this midpoint on for size */ - er = cdissect(v, t->left, begin, mid); - if (er == REG_OKAY && - longest(v, d2, mid, end, (int *)NULL) == end && - (er = cdissect(v, t->right, mid, end)) == - REG_OKAY) - break; /* NOTE BREAK OUT */ - if (er != REG_OKAY && er != REG_NOMATCH) { - freedfa(d); - freedfa(d2); - return er; - } - - /* that midpoint didn't work, find a new one */ - if (mid == end) { - /* all possibilities exhausted */ - MDEBUG(("%d no midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); - return REG_NOMATCH; - } - mid = shortest(v, d, begin, mid+1, end, (chr **)NULL, (int *)NULL); - if (mid == NULL) { - /* failed to find a new one */ - MDEBUG(("%d failed midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); - return REG_NOMATCH; - } - MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid))); - v->mem[t->retry] = (mid - begin) + 1; - zapmem(v, t->left); - zapmem(v, t->right); - } - - /* satisfaction */ - MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); - return REG_OKAY; -} - -/* - - cbrdissect - determine backref subexpression matches - ^ static int cbrdissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -cbrdissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - int i; - int n = t->subno; - size_t len; - chr *paren; - chr *p; - chr *stop; - int min = t->min; - int max = t->max; - - assert(t != NULL); - assert(t->op == 'b'); - assert(n >= 0); - assert((size_t)n < v->nmatch); - - MDEBUG(("cbackref n%d %d{%d-%d}\n", t->retry, n, min, max)); - - if (v->pmatch[n].rm_so == -1) - return REG_NOMATCH; - paren = v->start + v->pmatch[n].rm_so; - len = v->pmatch[n].rm_eo - v->pmatch[n].rm_so; - - /* no room to maneuver -- retries are pointless */ - if (v->mem[t->retry]) - return REG_NOMATCH; - v->mem[t->retry] = 1; - - /* special-case zero-length string */ - if (len == 0) { - if (begin == end) - return REG_OKAY; - return REG_NOMATCH; - } - - /* and too-short string */ - assert(end >= begin); - if ((size_t)(end - begin) < len) - return REG_NOMATCH; - stop = end - len; - - /* count occurrences */ - i = 0; - for (p = begin; p <= stop && (i < max || max == INFINITY); p += len) { - if ((*v->g->compare)(paren, p, len) != 0) - break; - i++; - } - MDEBUG(("cbackref found %d\n", i)); - - /* and sort it out */ - if (p != end) /* didn't consume all of it */ - return REG_NOMATCH; - if (min <= i && (i <= max || max == INFINITY)) - return REG_OKAY; - return REG_NOMATCH; /* out of range */ -} - -/* - - caltdissect - determine alternative subexpression matches (w. complications) - ^ static int caltdissect(struct vars *, struct subre *, chr *, chr *); - */ -static int /* regexec return code */ -caltdissect(v, t, begin, end) -struct vars *v; -struct subre *t; -chr *begin; /* beginning of relevant substring */ -chr *end; /* end of same */ -{ - struct dfa *d; - int er; -# define UNTRIED 0 /* not yet tried at all */ -# define TRYING 1 /* top matched, trying submatches */ -# define TRIED 2 /* top didn't match or submatches exhausted */ - - if (t == NULL) - return REG_NOMATCH; - assert(t->op == '|'); - if (v->mem[t->retry] == TRIED) - return caltdissect(v, t->right, begin, end); - - MDEBUG(("calt n%d\n", t->retry)); - assert(t->left != NULL); - - if (v->mem[t->retry] == UNTRIED) { - d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); - if (ISERR()) - return v->err; - if (longest(v, d, begin, end, (int *)NULL) != end) { - freedfa(d); - v->mem[t->retry] = TRIED; - return caltdissect(v, t->right, begin, end); - } - freedfa(d); - MDEBUG(("calt matched\n")); - v->mem[t->retry] = TRYING; - } - - er = cdissect(v, t->left, begin, end); - if (er != REG_NOMATCH) - return er; - - v->mem[t->retry] = TRIED; - return caltdissect(v, t->right, begin, end); -} - - - -#include "rege_dfa.c" diff --git a/src/regex/regfree.c b/src/regex/regfree.c deleted file mode 100644 index 17a73896f5..0000000000 --- a/src/regex/regfree.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * regfree - free an RE - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * - * - * You might think that this could be incorporated into regcomp.c, and - * that would be a reasonable idea... except that this is a generic - * function (with a generic name), applicable to all compiled REs - * regardless of the size of their characters, whereas the stuff in - * regcomp.c gets compiled once per character size. - */ - -#include "regguts.h" - -/* - - regfree - free an RE (generic function, punts to RE-specific function) - * - * Ignoring invocation with NULL is a convenience. - */ -VOID -regfree(re) -regex_t *re; -{ - if (re == NULL) - return; - (*((struct fns *)re->re_fns)->free)(re); -} diff --git a/src/regex/regfronts.c b/src/regex/regfronts.c deleted file mode 100644 index 82f48e2abc..0000000000 --- a/src/regex/regfronts.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * regcomp and regexec - front ends to re_ routines - * - * Mostly for implementation of backward-compatibility kludges. Note - * that these routines exist ONLY in char versions. - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "regguts.h" - -/* - - regcomp - compile regular expression - */ -int -regcomp(re, str, flags) -regex_t *re; -CONST char *str; -int flags; -{ - size_t len; - int f = flags; - - if (f®_PEND) { - len = re->re_endp - str; - f &= ~REG_PEND; - } else - len = strlen(str); - - return re_comp(re, str, len, f); -} - -/* - - regexec - execute regular expression - */ -int -regexec(re, str, nmatch, pmatch, flags) -regex_t *re; -CONST char *str; -size_t nmatch; -regmatch_t pmatch[]; -int flags; -{ - CONST char *start; - size_t len; - int f = flags; - - if (f®_STARTEND) { - start = str + pmatch[0].rm_so; - len = pmatch[0].rm_eo - pmatch[0].rm_so; - f &= ~REG_STARTEND; - } else { - start = str; - len = strlen(str); - } - - return re_exec(re, start, len, nmatch, pmatch, f); -} diff --git a/src/regex/regguts.h b/src/regex/regguts.h deleted file mode 100644 index aa12dbf445..0000000000 --- a/src/regex/regguts.h +++ /dev/null @@ -1,417 +0,0 @@ -/* - * Internal interface definitions, etc., for the reg package - * - * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. - * - * Development of this software was funded, in part, by Cray Research Inc., - * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics - * Corporation, none of whom are responsible for the results. The author - * thanks all of them. - * - * Redistribution and use in source and binary forms -- with or without - * modification -- are permitted for any purpose, provided that - * redistributions in source form retain this entire copyright notice and - * indicate the origin and nature of any modifications. - * - * I'd appreciate being given credit for this package in the documentation - * of software which uses it, but that is not a requirement. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - */ - - - -/* - * Environmental customization. It should not (I hope) be necessary to - * alter the file you are now reading -- regcustom.h should handle it all, - * given care here and elsewhere. - */ -#include "regcustom.h" - - - -/* - * Things that regcustom.h might override. - */ - -/* assertions */ -#ifndef assert -#ifndef REG_DEBUG -# ifndef NDEBUG -# define NDEBUG /* no assertions */ -# endif -#endif -#include -#endif - -/* voids */ -#ifndef DISCARD -#define DISCARD void /* for throwing values away */ -#endif -#ifndef VS -#define VS(x) ((void *)(x)) /* cast something to generic ptr */ -#endif - -/* function-pointer declarator */ -#ifndef FUNCPTR -#define FUNCPTR(name, args) (*name) args -#endif - -/* memory allocation */ -#ifndef MALLOC -#define MALLOC(n) malloc(n) -#endif -#ifndef REALLOC -#define REALLOC(p, n) realloc(VS(p), n) -#endif -#ifndef FREE -#define FREE(p) free(VS(p)) -#endif - -/* want size of a char in bits, and max value in bounded quantifiers */ -#ifndef CHAR_BIT -#include -#endif -#ifndef _POSIX2_RE_DUP_MAX -#define _POSIX2_RE_DUP_MAX 255 /* normally from */ -#endif - - - -/* - * misc - */ - -#define NOTREACHED 0 -#define xxx 1 - -#define DUPMAX _POSIX2_RE_DUP_MAX -#define INFINITY (DUPMAX+1) - -#define REMAGIC 0xfed7 /* magic number for main struct */ - - - -/* - * debugging facilities - */ -#ifdef REG_DEBUG -/* FDEBUG does finite-state tracing */ -#define FDEBUG(arglist) { if (v->eflags®_FTRACE) printf arglist; } -/* MDEBUG does higher-level tracing */ -#define MDEBUG(arglist) { if (v->eflags®_MTRACE) printf arglist; } -#else -#define FDEBUG(arglist) {} -#define MDEBUG(arglist) {} -#endif - - - -/* - * bitmap manipulation - */ -#define UBITS (CHAR_BIT * sizeof(unsigned)) -#define BSET(uv, sn) ((uv)[(sn)/UBITS] |= (unsigned)1 << ((sn)%UBITS)) -#define ISBSET(uv, sn) ((uv)[(sn)/UBITS] & ((unsigned)1 << ((sn)%UBITS))) - - - -/* - * We dissect a chr into byts for colormap table indexing. Here we define - * a byt, which will be the same as a byte on most machines... The exact - * size of a byt is not critical, but about 8 bits is good, and extraction - * of 8-bit chunks is sometimes especially fast. - */ -#ifndef BYTBITS -#define BYTBITS 8 /* bits in a byt */ -#endif -#define BYTTAB (1<flags&FREECOL) - union tree *block; /* block of solid color, if any */ -}; - -/* the color map itself */ -struct colormap -{ - int magic; -#define CMMAGIC 0x876 - struct vars *v; /* for compile error reporting */ - size_t ncds; /* number of colordescs */ - size_t max; /* highest in use */ - color free; /* beginning of free chain (if non-0) */ - struct colordesc *cd; -#define CDEND(cm) (&(cm)->cd[(cm)->max + 1]) -#define NINLINECDS ((size_t)10) - struct colordesc cdspace[NINLINECDS]; - union tree tree[NBYTS]; /* tree top, plus fill blocks */ -}; - -/* optimization magic to do fast chr->color mapping */ -#define B0(c) ((c) & BYTMASK) -#define B1(c) (((c)>>BYTBITS) & BYTMASK) -#define B2(c) (((c)>>(2*BYTBITS)) & BYTMASK) -#define B3(c) (((c)>>(3*BYTBITS)) & BYTMASK) -#if NBYTS == 1 -#define GETCOLOR(cm, c) ((cm)->tree->tcolor[B0(c)]) -#endif -/* beware, for NBYTS>1, GETCOLOR() is unsafe -- 2nd arg used repeatedly */ -#if NBYTS == 2 -#define GETCOLOR(cm, c) ((cm)->tree->tptr[B1(c)]->tcolor[B0(c)]) -#endif -#if NBYTS == 4 -#define GETCOLOR(cm, c) ((cm)->tree->tptr[B3(c)]->tptr[B2(c)]->tptr[B1(c)]->tcolor[B0(c)]) -#endif - - - -/* - * Interface definitions for locale-interface functions in locale.c. - * Multi-character collating elements (MCCEs) cause most of the trouble. - */ -struct cvec -{ - int nchrs; /* number of chrs */ - int chrspace; /* number of chrs possible */ - chr *chrs; /* pointer to vector of chrs */ - int nranges; /* number of ranges (chr pairs) */ - int rangespace; /* number of chrs possible */ - chr *ranges; /* pointer to vector of chr pairs */ - int nmcces; /* number of MCCEs */ - int mccespace; /* number of MCCEs possible */ - int nmccechrs; /* number of chrs used for MCCEs */ - chr *mcces[1]; /* pointers to 0-terminated MCCEs */ - /* and both batches of chrs are on the end */ -}; - -/* caution: this value cannot be changed easily */ -#define MAXMCCE 2 /* length of longest MCCE */ - - - -/* - * definitions for NFA internal representation - * - * Having a "from" pointer within each arc may seem redundant, but it - * saves a lot of hassle. - */ -struct state; - -struct arc -{ - int type; -#define ARCFREE '\0' - color co; - struct state *from; /* where it's from (and contained within) */ - struct state *to; /* where it's to */ - struct arc *outchain; /* *from's outs chain or free chain */ -#define freechain outchain - struct arc *inchain; /* *to's ins chain */ - struct arc *colorchain; /* color's arc chain */ -}; - -struct arcbatch -{ /* for bulk allocation of arcs */ - struct arcbatch *next; -#define ABSIZE 10 - struct arc a[ABSIZE]; -}; - -struct state -{ - int no; -#define FREESTATE (-1) - char flag; /* marks special states */ - int nins; /* number of inarcs */ - struct arc *ins; /* chain of inarcs */ - int nouts; /* number of outarcs */ - struct arc *outs; /* chain of outarcs */ - struct arc *free; /* chain of free arcs */ - struct state *tmp; /* temporary for traversal algorithms */ - struct state *next; /* chain for traversing all */ - struct state *prev; /* back chain */ - struct arcbatch oas; /* first arcbatch, avoid malloc in easy - * case */ - int noas; /* number of arcs used in first arcbatch */ -}; - -struct nfa -{ - struct state *pre; /* pre-initial state */ - struct state *init; /* initial state */ - struct state *final; /* final state */ - struct state *post; /* post-final state */ - int nstates; /* for numbering states */ - struct state *states; /* state-chain header */ - struct state *slast; /* tail of the chain */ - struct state *free; /* free list */ - struct colormap *cm; /* the color map */ - color bos[2]; /* colors, if any, assigned to BOS and BOL */ - color eos[2]; /* colors, if any, assigned to EOS and EOL */ - struct vars *v; /* simplifies compile error reporting */ - struct nfa *parent; /* parent NFA, if any */ -}; - - - -/* - * definitions for compacted NFA - */ -struct carc -{ - color co; /* COLORLESS is list terminator */ - int to; /* state number */ -}; - -struct cnfa -{ - int nstates; /* number of states */ - int ncolors; /* number of colors */ - int flags; -#define HASLACONS 01 /* uses lookahead constraints */ - int pre; /* setup state number */ - int post; /* teardown state number */ - color bos[2]; /* colors, if any, assigned to BOS and BOL */ - color eos[2]; /* colors, if any, assigned to EOS and EOL */ - struct carc **states; /* vector of pointers to outarc lists */ - struct carc *arcs; /* the area for the lists */ -}; - -#define ZAPCNFA(cnfa) ((cnfa).nstates = 0) -#define NULLCNFA(cnfa) ((cnfa).nstates == 0) - - - -/* - * subexpression tree - */ -struct subre -{ - char op; /* '|', '.' (concat), 'b' (backref), '(', - * '=' */ - char flags; -#define LONGER 01 /* prefers longer match */ -#define SHORTER 02 /* prefers shorter match */ -#define MIXED 04 /* mixed preference below */ -#define CAP 010 /* capturing parens below */ -#define BACKR 020 /* back reference below */ -#define INUSE 0100 /* in use in final tree */ -#define LOCAL 03 /* bits which may not propagate up */ -#define LMIX(f) ((f)<<2) /* LONGER -> MIXED */ -#define SMIX(f) ((f)<<1) /* SHORTER -> MIXED */ -#define UP(f) (((f)&~LOCAL) | (LMIX(f) & SMIX(f) & MIXED)) -#define MESSY(f) ((f)&(MIXED|CAP|BACKR)) -#define PREF(f) ((f)&LOCAL) -#define PREF2(f1, f2) ((PREF(f1) != 0) ? PREF(f1) : PREF(f2)) -#define COMBINE(f1, f2) (UP((f1)|(f2)) | PREF2(f1, f2)) - short retry; /* index into retry memory */ - int subno; /* subexpression number (for 'b' and '(') */ - short min; /* min repetitions, for backref only */ - short max; /* max repetitions, for backref only */ - struct subre *left; /* left child, if any (also freelist - * chain) */ - struct subre *right; /* right child, if any */ - struct state *begin; /* outarcs from here... */ - struct state *end; /* ...ending in inarcs here */ - struct cnfa cnfa; /* compacted NFA, if any */ - struct subre *chain; /* for bookkeeping and error cleanup */ -}; - - - -/* - * table of function pointers for generic manipulation functions - * A regex_t's re_fns points to one of these. - */ -struct fns -{ - void FUNCPTR(free, (regex_t *)); -}; - - - -/* - * the insides of a regex_t, hidden behind a void * - */ -struct guts -{ - int magic; -#define GUTSMAGIC 0xfed9 - int cflags; /* copy of compile flags */ - long info; /* copy of re_info */ - size_t nsub; /* copy of re_nsub */ - struct subre *tree; - struct cnfa search; /* for fast preliminary search */ - int ntree; - struct colormap cmap; - int FUNCPTR(compare, (const chr *, const chr *, size_t)); - struct subre *lacons; /* lookahead-constraint vector */ - int nlacons; /* size of lacons */ -}; diff --git a/src/regex/tests b/src/regex/tests deleted file mode 100644 index e4d928dad6..0000000000 --- a/src/regex/tests +++ /dev/null @@ -1,477 +0,0 @@ -# regular expression test set -# Lines are at least three fields, separated by one or more tabs. "" stands -# for an empty field. First field is an RE. Second field is flags. If -# C flag given, regcomp() is expected to fail, and the third field is the -# error name (minus the leading REG_). -# -# Otherwise it is expected to succeed, and the third field is the string to -# try matching it against. If there is no fourth field, the match is -# expected to fail. If there is a fourth field, it is the substring that -# the RE is expected to match. If there is a fifth field, it is a comma- -# separated list of what the subexpressions should match, with - indicating -# no match for that one. In both the fourth and fifth fields, a (sub)field -# starting with @ indicates that the (sub)expression is expected to match -# a null string followed by the stuff after the @; this provides a way to -# test where null strings match. The character `N' in REs and strings -# is newline, `S' is space, `T' is tab, `Z' is NUL. -# -# The full list of flags: -# - placeholder, does nothing -# b RE is a BRE, not an ERE -# & try it as both an ERE and a BRE -# C regcomp() error expected, third field is error name -# i REG_ICASE -# m ("mundane") REG_NOSPEC -# s REG_NOSUB (not really testable) -# n REG_NEWLINE -# ^ REG_NOTBOL -# $ REG_NOTEOL -# # REG_STARTEND (see below) -# p REG_PEND -# -# For REG_STARTEND, the start/end offsets are those of the substring -# enclosed in (). - -# basics -a & a a -abc & abc abc -abc|de - abc abc -a|b|c - abc a - -# parentheses and perversions thereof -a(b)c - abc abc -a\(b\)c b abc abc -a( C EPAREN -a( b a( a( -a\( - a( a( -a\( bC EPAREN -a\(b bC EPAREN -a(b C EPAREN -a(b b a(b a(b -# gag me with a right parenthesis -- 1003.2 goofed here (my fault, partly) -a) - a) a) -) - ) ) -# end gagging (in a just world, those *should* give EPAREN) -a) b a) a) -a\) bC EPAREN -\) bC EPAREN -a()b - ab ab -a\(\)b b ab ab - -# anchoring and REG_NEWLINE -^abc$ & abc abc -a^b - a^b -a^b b a^b a^b -a$b - a$b -a$b b a$b a$b -^ & abc @abc -$ & abc @ -^$ & "" @ -$^ - "" @ -\($\)\(^\) b "" @ -# stop retching, those are legitimate (although disgusting) -^^ - "" @ -$$ - "" @ -b$ & abNc -b$ &n abNc b -^b$ & aNbNc -^b$ &n aNbNc b -^$ &n aNNb @Nb -^$ n abc -^$ n abcN @ -$^ n aNNb @Nb -\($\)\(^\) bn aNNb @Nb -^^ n^ aNNb @Nb -$$ n aNNb @NN -^a ^ a -a$ $ a -^a ^n aNb -^b ^n aNb b -a$ $n bNa -b$ $n bNa b -a*(^b$)c* - b b -a*\(^b$\)c* b b b - -# certain syntax errors and non-errors -| C EMPTY -| b | | -* C BADRPT -* b * * -+ C BADRPT -? C BADRPT -"" &C EMPTY -() - abc @abc -\(\) b abc @abc -a||b C EMPTY -|ab C EMPTY -ab| C EMPTY -(|a)b C EMPTY -(a|)b C EMPTY -(*a) C BADRPT -(+a) C BADRPT -(?a) C BADRPT -({1}a) C BADRPT -\(\{1\}a\) bC BADRPT -(a|*b) C BADRPT -(a|+b) C BADRPT -(a|?b) C BADRPT -(a|{1}b) C BADRPT -^* C BADRPT -^* b * * -^+ C BADRPT -^? C BADRPT -^{1} C BADRPT -^\{1\} bC BADRPT - -# metacharacters, backslashes -a.c & abc abc -a[bc]d & abd abd -a\*c & a*c a*c -a\\b & a\b a\b -a\\\*b & a\*b a\*b -a\bc & abc abc -a\ &C EESCAPE -a\\bc & a\bc a\bc -\{ bC BADRPT -a\[b & a[b a[b -a[b &C EBRACK -# trailing $ is a peculiar special case for the BRE code -a$ & a a -a$ & a$ -a\$ & a -a\$ & a$ a$ -a\\$ & a -a\\$ & a$ -a\\$ & a\$ -a\\$ & a\ a\ - -# back references, ugh -a\(b\)\2c bC ESUBREG -a\(b\1\)c bC ESUBREG -a\(b*\)c\1d b abbcbbd abbcbbd bb -a\(b*\)c\1d b abbcbd -a\(b*\)c\1d b abbcbbbd -^\(.\)\1 b abc -a\([bc]\)\1d b abcdabbd abbd b -a\(\([bc]\)\2\)*d b abbccd abbccd -a\(\([bc]\)\2\)*d b abbcbd -# actually, this next one probably ought to fail, but the spec is unclear -a\(\(b\)*\2\)*d b abbbd abbbd -# here is a case that no NFA implementation does right -\(ab*\)[ab]*\1 b ababaaa ababaaa a -# check out normal matching in the presence of back refs -\(a\)\1bcd b aabcd aabcd -\(a\)\1bc*d b aabcd aabcd -\(a\)\1bc*d b aabd aabd -\(a\)\1bc*d b aabcccd aabcccd -\(a\)\1bc*[ce]d b aabcccd aabcccd -^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd - -# ordinary repetitions -ab*c & abc abc -ab+c - abc abc -ab?c - abc abc -a\(*\)b b a*b a*b -a\(**\)b b ab ab -a\(***\)b bC BADRPT -*a b *a *a -**a b a a -***a bC BADRPT - -# the dreaded bounded repetitions -{ & { { -{abc & {abc {abc -{1 C BADRPT -{1} C BADRPT -a{b & a{b a{b -a{1}b - ab ab -a\{1\}b b ab ab -a{1,}b - ab ab -a\{1,\}b b ab ab -a{1,2}b - aab aab -a\{1,2\}b b aab aab -a{1 C EBRACE -a\{1 bC EBRACE -a{1a C EBRACE -a\{1a bC EBRACE -a{1a} C BADBR -a\{1a\} bC BADBR -a{,2} - a{,2} a{,2} -a\{,2\} bC BADBR -a{,} - a{,} a{,} -a\{,\} bC BADBR -a{1,x} C BADBR -a\{1,x\} bC BADBR -a{1,x C EBRACE -a\{1,x bC EBRACE -a{300} C BADBR -a\{300\} bC BADBR -a{1,0} C BADBR -a\{1,0\} bC BADBR -ab{0,0}c - abcac ac -ab\{0,0\}c b abcac ac -ab{0,1}c - abcac abc -ab\{0,1\}c b abcac abc -ab{0,3}c - abbcac abbc -ab\{0,3\}c b abbcac abbc -ab{1,1}c - acabc abc -ab\{1,1\}c b acabc abc -ab{1,3}c - acabc abc -ab\{1,3\}c b acabc abc -ab{2,2}c - abcabbc abbc -ab\{2,2\}c b abcabbc abbc -ab{2,4}c - abcabbc abbc -ab\{2,4\}c b abcabbc abbc -((a{1,10}){1,10}){1,10} - a a a,a - -# multiple repetitions -a** &C BADRPT -a++ C BADRPT -a?? C BADRPT -a*+ C BADRPT -a*? C BADRPT -a+* C BADRPT -a+? C BADRPT -a?* C BADRPT -a?+ C BADRPT -a{1}{1} C BADRPT -a*{1} C BADRPT -a+{1} C BADRPT -a?{1} C BADRPT -a{1}* C BADRPT -a{1}+ C BADRPT -a{1}? C BADRPT -a*{b} - a{b} a{b} -a\{1\}\{1\} bC BADRPT -a*\{1\} bC BADRPT -a\{1\}* bC BADRPT - -# brackets, and numerous perversions thereof -a[b]c & abc abc -a[ab]c & abc abc -a[^ab]c & adc adc -a[]b]c & a]c a]c -a[[b]c & a[c a[c -a[-b]c & a-c a-c -a[^]b]c & adc adc -a[^-b]c & adc adc -a[b-]c & a-c a-c -a[b &C EBRACK -a[] &C EBRACK -a[1-3]c & a2c a2c -a[3-1]c &C ERANGE -a[1-3-5]c &C ERANGE -a[[.-.]--]c & a-c a-c -a[1- &C ERANGE -a[[. &C EBRACK -a[[.x &C EBRACK -a[[.x. &C EBRACK -a[[.x.] &C EBRACK -a[[.x.]] & ax ax -a[[.x,.]] &C ECOLLATE -a[[.one.]]b & a1b a1b -a[[.notdef.]]b &C ECOLLATE -a[[.].]]b & a]b a]b -a[[:alpha:]]c & abc abc -a[[:notdef:]]c &C ECTYPE -a[[: &C EBRACK -a[[:alpha &C EBRACK -a[[:alpha:] &C EBRACK -a[[:alpha,:] &C ECTYPE -a[[:]:]]b &C ECTYPE -a[[:-:]]b &C ECTYPE -a[[:alph:]] &C ECTYPE -a[[:alphabet:]] &C ECTYPE -[[:alnum:]]+ - -%@a0X- a0X -[[:alpha:]]+ - -%@aX0- aX -[[:blank:]]+ - aSSTb SST -[[:cntrl:]]+ - aNTb NT -[[:digit:]]+ - a019b 019 -[[:graph:]]+ - Sa%bS a%b -[[:lower:]]+ - AabC ab -[[:print:]]+ - NaSbN aSb -[[:punct:]]+ - S%-&T %-& -[[:space:]]+ - aSNTb SNT -[[:upper:]]+ - aBCd BC -[[:xdigit:]]+ - p0f3Cq 0f3C -a[[=b=]]c & abc abc -a[[= &C EBRACK -a[[=b &C EBRACK -a[[=b= &C EBRACK -a[[=b=] &C EBRACK -a[[=b,=]] &C ECOLLATE -a[[=one=]]b & a1b a1b - -# complexities -a(((b)))c - abc abc -a(b|(c))d - abd abd -a(b*|c)d - abbd abbd -# just gotta have one DFA-buster, of course -a[ab]{20} - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab -# and an inline expansion in case somebody gets tricky -a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab] - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab -# and in case somebody just slips in an NFA... -a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night) - aaaaabaaaabaaaabaaaabweeknights aaaaabaaaabaaaabaaaabweeknights -# fish for anomalies as the number of states passes 32 -12345678901234567890123456789 - a12345678901234567890123456789b 12345678901234567890123456789 -123456789012345678901234567890 - a123456789012345678901234567890b 123456789012345678901234567890 -1234567890123456789012345678901 - a1234567890123456789012345678901b 1234567890123456789012345678901 -12345678901234567890123456789012 - a12345678901234567890123456789012b 12345678901234567890123456789012 -123456789012345678901234567890123 - a123456789012345678901234567890123b 123456789012345678901234567890123 -# and one really big one, beyond any plausible word width -1234567890123456789012345678901234567890123456789012345678901234567890 - a1234567890123456789012345678901234567890123456789012345678901234567890b 1234567890123456789012345678901234567890123456789012345678901234567890 -# fish for problems as brackets go past 8 -[ab][cd][ef][gh][ij][kl][mn] - xacegikmoq acegikm -[ab][cd][ef][gh][ij][kl][mn][op] - xacegikmoq acegikmo -[ab][cd][ef][gh][ij][kl][mn][op][qr] - xacegikmoqy acegikmoq -[ab][cd][ef][gh][ij][kl][mn][op][q] - xacegikmoqy acegikmoq - -# subtleties of matching -abc & xabcy abc -a\(b\)?c\1d b acd -aBc i Abc Abc -a[Bc]*d i abBCcd abBCcd -0[[:upper:]]1 &i 0a1 0a1 -0[[:lower:]]1 &i 0A1 0A1 -a[^b]c &i abc -a[^b]c &i aBc -a[^b]c &i adc adc -[a]b[c] - abc abc -[a]b[a] - aba aba -[abc]b[abc] - abc abc -[abc]b[abd] - abd abd -a(b?c)+d - accd accd -(wee|week)(knights|night) - weeknights weeknights -(we|wee|week|frob)(knights|night|day) - weeknights weeknights -a[bc]d - xyzaaabcaababdacd abd -a[ab]c - aaabc abc -abc s abc abc -a* & b @b - -# Let's have some fun -- try to match a C comment. -# first the obvious, which looks okay at first glance... -/\*.*\*/ - /*x*/ /*x*/ -# but... -/\*.*\*/ - /*x*/y/*z*/ /*x*/y/*z*/ -# okay, we must not match */ inside; try to do that... -/\*([^*]|\*[^/])*\*/ - /*x*/ /*x*/ -/\*([^*]|\*[^/])*\*/ - /*x*/y/*z*/ /*x*/ -# but... -/\*([^*]|\*[^/])*\*/ - /*x**/y/*z*/ /*x**/y/*z*/ -# and a still fancier version, which does it right (I think)... -/\*([^*]|\*+[^*/])*\*+/ - /*x*/ /*x*/ -/\*([^*]|\*+[^*/])*\*+/ - /*x*/y/*z*/ /*x*/ -/\*([^*]|\*+[^*/])*\*+/ - /*x**/y/*z*/ /*x**/ -/\*([^*]|\*+[^*/])*\*+/ - /*x****/y/*z*/ /*x****/ -/\*([^*]|\*+[^*/])*\*+/ - /*x**x*/y/*z*/ /*x**x*/ -/\*([^*]|\*+[^*/])*\*+/ - /*x***x/y/*z*/ /*x***x/y/*z*/ - -# subexpressions -.* - abc abc - -a(b)(c)d - abcd abcd b,c -a(((b)))c - abc abc b,b,b -a(b|(c))d - abd abd b,- -a(b*|c|e)d - abbd abbd bb -a(b*|c|e)d - acd acd c -a(b*|c|e)d - ad ad @d -a(b?)c - abc abc b -a(b?)c - ac ac @c -a(b+)c - abc abc b -a(b+)c - abbbc abbbc bbb -a(b*)c - ac ac @c -(a|ab)(bc([de]+)f|cde) - abcdef abcdef a,bcdef,de -# the regression tester only asks for 9 subexpressions -a(b)(c)(d)(e)(f)(g)(h)(i)(j)k - abcdefghijk abcdefghijk b,c,d,e,f,g,h,i,j -a(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)l - abcdefghijkl abcdefghijkl b,c,d,e,f,g,h,i,j,k -a([bc]?)c - abc abc b -a([bc]?)c - ac ac @c -a([bc]+)c - abc abc b -a([bc]+)c - abcc abcc bc -a([bc]+)bc - abcbc abcbc bc -a(bb+|b)b - abb abb b -a(bbb+|bb+|b)b - abb abb b -a(bbb+|bb+|b)b - abbb abbb bb -a(bbb+|bb+|b)bb - abbb abbb b -(.*).* - abcdef abcdef abcdef -(a*)* - bc @b @b - -# do we get the right subexpression when it is used more than once? -a(b|c)*d - ad ad - -a(b|c)*d - abcd abcd c -a(b|c)+d - abd abd b -a(b|c)+d - abcd abcd c -a(b|c?)+d - ad ad @d -a(b|c?)+d - abcd abcd @d -a(b|c){0,0}d - ad ad - -a(b|c){0,1}d - ad ad - -a(b|c){0,1}d - abd abd b -a(b|c){0,2}d - ad ad - -a(b|c){0,2}d - abcd abcd c -a(b|c){0,}d - ad ad - -a(b|c){0,}d - abcd abcd c -a(b|c){1,1}d - abd abd b -a(b|c){1,1}d - acd acd c -a(b|c){1,2}d - abd abd b -a(b|c){1,2}d - abcd abcd c -a(b|c){1,}d - abd abd b -a(b|c){1,}d - abcd abcd c -a(b|c){2,2}d - acbd acbd b -a(b|c){2,2}d - abcd abcd c -a(b|c){2,4}d - abcd abcd c -a(b|c){2,4}d - abcbd abcbd b -a(b|c){2,4}d - abcbcd abcbcd c -a(b|c){2,}d - abcd abcd c -a(b|c){2,}d - abcbd abcbd b -a(b+|((c)*))+d - abd abd @d,@d,- -a(b+|((c)*))+d - abcd abcd @d,@d,- - -# check out the STARTEND option -[abc] &# a(b)c b -[abc] &# a(d)c -[abc] &# a(bc)d b -[abc] &# a(dc)d c -. &# a()c -b.*c &# b(bc)c bc -b.* &# b(bc)c bc -.*c &# b(bc)c bc - -# plain strings, with the NOSPEC flag -abc m abc abc -abc m xabcy abc -abc m xyz -a*b m aba*b a*b -a*b m ab -"" mC EMPTY - -# cases involving NULs -aZb & a a -aZb &p a -aZb &p# (aZb) aZb -aZ*b &p# (ab) ab -a.b &# (aZb) aZb -a.* &# (aZb)c aZb - -# word boundaries (ick) -[[:<:]]a & a a -[[:<:]]a & ba -[[:<:]]a & -a a -a[[:>:]] & a a -a[[:>:]] & ab -a[[:>:]] & a- a -[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc abc -[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc-q abc -[[:<:]]a.c[[:>:]] & axc-dayc-dazce-abc axc -[[:<:]]b.c[[:>:]] & a_bxc-byc_d-bzc-q bzc -[[:<:]].x..[[:>:]] & y_xa_-_xb_y-_xc_-axdc _xc_ -[[:<:]]a_b[[:>:]] & x_a_b - -# past problems, and suspected problems -(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A]) - A1 A1 -abcdefghijklmnop i abcdefghijklmnop abcdefghijklmnop -abcdefghijklmnopqrstuv i abcdefghijklmnopqrstuv abcdefghijklmnopqrstuv -(ALAK)|(ALT[AB])|(CC[123]1)|(CM[123]1)|(GAMC)|(LC[23][EO ])|(SEM[1234])|(SL[ES][12])|(SLWW)|(SLF )|(SLDT)|(VWH[12])|(WH[34][EW])|(WP1[ESN]) - CC11 CC11 -CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a - CC11 CC11 -Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz -a?b - ab ab --\{0,1\}[0-9]*$ b -5 -5 -a*a*a*a*a*a*a* & aaaaaa aaaaaa diff --git a/src/stc/Makefile.in b/src/stc/Makefile.in index 425ea48714..9f1ebcf396 100644 --- a/src/stc/Makefile.in +++ b/src/stc/Makefile.in @@ -5,12 +5,11 @@ # Version: $Id$ ############################################################################### -top_srcdir = @top_srcdir@ +top_srcdir = @top_srcdir@/.. top_builddir = ../../.. -this_dir = $(top_srcdir)/src/stc -scintilla_dir=$(this_dir)/scintilla -VPATH=$(this_dir)@PATH_IFS@$(scintilla_dir)/src # ':' for autoconf +scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla +libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src TARGET_LIBNAME=libstc @@ -18,23 +17,40 @@ LIBVERSION_CURRENT=1 LIBVERSION_REVISION=0 LIBVERSION_AGE=0 +HEADER_PATH=$(top_srcdir)/contrib/include/wx +HEADER_SUBDIR=stc + +HEADERS=stc.h + OBJECTS=PlatWX.o ScintillaWX.o stc.o \ - Accessor.o \ - AutoComplete.o \ + DocumentAccessor.o \ + LexCPP.o \ + LexHTML.o \ + LexLua.o \ + LexOthers.o \ + LexPerl.o \ + LexPython.o \ + LexSQL.o \ + LexVB.o \ + UniConversion.o \ + WindowAccessor.o \ + AutoComplete.o \ CallTip.o \ - CellBuffer.o \ - ContractionState.o \ + CellBuffer.o \ + ContractionState.o \ Document.o \ - Editor.o \ + Editor.o \ Indicator.o \ - KeyMap.o \ + KeyMap.o \ KeyWords.o \ - LineMarker.o \ + LineMarker.o \ PropSet.o \ - ScintillaBase.o \ + ScintillaBase.o \ Style.o \ - ViewStyle.o - -APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/include + ViewStyle.o \ + PosRegExp.o \ + + +APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include include $(top_builddir)/src/makelib.env diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 0dbd3d5ea7..e0eeab7d98 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -4,17 +4,23 @@ // Robin Dunn // The License.txt file describes the conditions under which this software may be distributed. +#include #include "Platform.h" #include "wx/stc/stc.h" + +#ifdef __WXGTK__ +#include +#endif + Point Point::FromLong(long lpoint) { - return Point(lpoint & 0xFFFF, lpoint >> 32); + return Point(lpoint & 0xFFFF, lpoint >> 16); } wxRect wxRectFromPRectangle(PRectangle prc) { wxRect rc(prc.left, prc.top, - prc.right-prc.left+1, prc.bottom-prc.top+1); + prc.right-prc.left, prc.bottom-prc.top); return rc; } @@ -105,14 +111,15 @@ Font::Font() { Font::~Font() { } -void Font::Create(const char *faceName, int size, bool bold, bool italic) { +void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic) { Release(); id = new wxFont(size, wxDEFAULT, italic ? wxITALIC : wxNORMAL, bold ? wxBOLD : wxNORMAL, false, - faceName); + faceName, + wxFONTENCODING_DEFAULT); } @@ -181,13 +188,21 @@ void Surface::BrushColor(Colour back) { } void Surface::SetFont(Font &font_) { - hdc->SetFont(*font_.GetID()); + if (font_.GetID()) { + hdc->SetFont(*font_.GetID()); + } } int Surface::LogPixelsY() { return hdc->GetPPI().y; } + +int Surface::DeviceHeightFont(int points) { + return points * LogPixelsY() / 72; +} + + void Surface::MoveTo(int x_, int y_) { x = x_; y = y_; @@ -232,7 +247,7 @@ void Surface::FillRectangle(PRectangle rc, Surface &surfacePattern) { void Surface::RoundedRectangle(PRectangle rc, Colour fore, Colour back) { PenColour(fore); BrushColor(back); - hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 8); + hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4); } void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) { @@ -242,7 +257,8 @@ void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) { } void Surface::Copy(PRectangle rc, Point from, Surface &surfaceSource) { - hdc->Blit(rc.left, rc.top, rc.Width(), rc.Height(), + wxRect r = wxRectFromPRectangle(rc); + hdc->Blit(r.x, r.y, r.width, r.height, surfaceSource.hdc, from.x, from.y, wxCOPY); } @@ -344,7 +360,8 @@ void Surface::SetClip(PRectangle rc) { hdc->SetClippingRegion(wxRectFromPRectangle(rc)); } - +void Surface::FlushCachedState() { +} Window::~Window() { } @@ -365,7 +382,8 @@ PRectangle Window::GetPosition() { } void Window::SetPosition(PRectangle rc) { - id->SetSize(rc.left, rc.top, rc.Width(), rc.Height()); + wxRect r = wxRectFromPRectangle(rc); + id->SetSize(r); } void Window::SetPositionRelative(PRectangle rc, Window) { @@ -374,7 +392,7 @@ void Window::SetPositionRelative(PRectangle rc, Window) { PRectangle Window::GetClientPosition() { wxSize sz = id->GetClientSize(); - return PRectangle(0, 0, sz.x - 1, sz.y - 1); + return PRectangle(0, 0, sz.x, sz.y); } void Window::Show(bool show) { @@ -386,7 +404,8 @@ void Window::InvalidateAll() { } void Window::InvalidateRectangle(PRectangle rc) { - id->Refresh(false, &wxRectFromPRectangle(rc)); + wxRect r = wxRectFromPRectangle(rc); + id->Refresh(false, &r); } void Window::SetFont(Font &font) { @@ -432,6 +451,76 @@ void Window::SetTitle(const char *s) { } +class wxSTCListBox : public wxListBox { +public: + wxSTCListBox(wxWindow* parent, wxWindowID id) + : wxListBox(parent, id, wxDefaultPosition, wxDefaultSize, + 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER) + {} + + void OnFocus(wxFocusEvent& event) { + GetParent()->SetFocus(); + event.Skip(); + } + +#ifdef __WXGTK__ + void DoSetFirstItem(int n); +#endif + +private: + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox) + EVT_SET_FOCUS(wxSTCListBox::OnFocus) +END_EVENT_TABLE() + + + + +#ifdef __WXGTK__ + // This can be removed after 2.2.2 I think +void wxSTCListBox::DoSetFirstItem( int n ) +{ + wxCHECK_RET( m_list, wxT("invalid listbox") ); + + if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list)) + return; + + // terribly efficient + const gchar *vadjustment_key = "gtk-vadjustment"; + guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key); + + GtkAdjustment *adjustment = + (GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id); + wxCHECK_RET( adjustment, wxT("invalid listbox code") ); + + GList *target = g_list_nth( m_list->children, n ); + wxCHECK_RET( target, wxT("invalid listbox index") ); + + GtkWidget *item = GTK_WIDGET(target->data); + wxCHECK_RET( item, wxT("invalid listbox code") ); + + // find the last item before this one which is already realized + size_t nItemsBefore; + for ( nItemsBefore = 0; item && (item->allocation.y == -1); nItemsBefore++ ) + { + target = target->prev; + if ( !target ) + { + // nothing we can do if there are no allocated items yet + return; + } + + item = GTK_WIDGET(target->data); + } + + gtk_adjustment_set_value(adjustment, + item->allocation.y + + nItemsBefore*item->allocation.height); +} +#endif + ListBox::ListBox() { } @@ -440,8 +529,32 @@ ListBox::~ListBox() { } void ListBox::Create(Window &parent, int ctrlID) { - id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize, - 0, NULL, wxLB_SINGLE | wxLB_SORT); + id = new wxSTCListBox(parent.id, ctrlID); +// id = new wxListBox(parent.id, ctrlID, wxDefaultPosition, wxDefaultSize, +// 0, NULL, wxLB_SINGLE | wxLB_SORT | wxSIMPLE_BORDER); +} + +PRectangle ListBox::GetDesiredRect() { + wxSize sz = ((wxListBox*)id)->GetBestSize(); + PRectangle rc; + rc.top = 0; + rc.left = 0; + if (sz.x > 150) // TODO: A better way to determine these max sizes + sz.x = 150; + if (sz.y > 100) + sz.y = 100; + rc.right = sz.x; + rc.bottom = sz.y; + + return rc; +} + +void ListBox::SetAverageCharWidth(int width) { + aveCharWidth = width; +} + +void ListBox::SetFont(Font &font) { + Window::SetFont(font); } void ListBox::Clear() { @@ -458,6 +571,13 @@ int ListBox::Length() { void ListBox::Select(int n) { ((wxListBox*)id)->SetSelection(n); +#ifdef __WXGTK__ + if (n > 4) + n = n - 4; + else + n = 1; + ((wxListBox*)id)->SetFirstItem(n); +#endif } int ListBox::GetSelection() { @@ -465,7 +585,14 @@ int ListBox::GetSelection() { } int ListBox::Find(const char *prefix) { - return ((wxListBox*)id)->FindString(prefix); + if (prefix) { + for (int x=0; x < ((wxListBox*)id)->Number(); x++) { + wxString text = ((wxListBox*)id)->GetString(x); + if (text.StartsWith(prefix)) + return x; + } + } + return -1; } void ListBox::GetValue(int n, char *value, int len) { diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index cd0064be5c..0912f8ee61 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -14,6 +14,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +#include + #include "ScintillaWX.h" #include "wx/stc/stc.h" @@ -60,6 +62,29 @@ void wxSTCDropTarget::OnLeave() { } +class wxSTCCallTip : public wxWindow { +public: + wxSTCCallTip(wxWindow* parent, int ID, CallTip* ct) + : wxWindow(parent, ID) + { + m_ct = ct; + } + + void OnPaint(wxPaintEvent& evt) { + wxPaintDC dc(this); + Surface surfaceWindow; + surfaceWindow.Init(&dc); + m_ct->PaintCT(&surfaceWindow); + surfaceWindow.Release(); + } + + CallTip* m_ct; + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSTCCallTip, wxWindow) + EVT_PAINT(wxSTCCallTip::OnPaint) +END_EVENT_TABLE() //---------------------------------------------------------------------- // Constructor/Destructor @@ -193,9 +218,8 @@ void ScintillaWX::NotifyParent(SCNotification scn) { void ScintillaWX::Copy() { if (currentPos != anchor) { char* text = CopySelectionRange(); - textDO.SetText(text); wxTheClipboard->Open(); - wxTheClipboard->SetData(&textDO); + wxTheClipboard->SetData(new wxTextDataObject(text)); wxTheClipboard->Close(); } } @@ -236,7 +260,7 @@ bool ScintillaWX::CanPaste() { } void ScintillaWX::CreateCallTipWindow(PRectangle) { - ct.wCallTip = new wxWindow(wDraw.GetID(), -1); + ct.wCallTip = new wxSTCCallTip(wDraw.GetID(), -1, &ct); ct.wDraw = ct.wCallTip; } @@ -249,8 +273,6 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { if (!enabled) popup.GetID()->Enable(cmd, enabled); - - // TODO: need to create event handler mappings for the cmd ID } @@ -259,18 +281,18 @@ void ScintillaWX::ClaimSelection() { } -LRESULT ScintillaWX::DefWndProc(UINT /*iMessage*/, WPARAM /*wParam*/, LPARAM /*lParam*/) { +long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) { return 0; } -LRESULT ScintillaWX::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { - switch (iMessage) { - case EM_CANPASTE: - return CanPaste(); - default: +long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { +// switch (iMessage) { +// case EM_CANPASTE: +// return CanPaste(); +// default: return ScintillaBase::WndProc(iMessage, wParam, lParam); - } - return 0; +// } +// return 0; } @@ -293,6 +315,11 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { FullPaint(); } paintState = notPainting; +#ifdef __WXGTK__ + // On wxGTK the editor window paints can overwrite the listbox... + if (ac.Active()) + ((wxWindow*)ac.lb.GetID())->Refresh(TRUE); +#endif } @@ -384,10 +411,36 @@ void ScintillaWX::DoButtonMove(Point pt) { void ScintillaWX::DoAddChar(char ch) { + //bool acActiveBeforeCharAdded = ac.Active(); AddChar(ch); + //if (acActiveBeforeCharAdded) + // AutoCompleteChanged(ch); } int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt) { + switch (key) { + case WXK_DOWN: key = SCK_DOWN; break; + case WXK_UP: key = SCK_UP; break; + case WXK_LEFT: key = SCK_LEFT; break; + case WXK_RIGHT: key = SCK_RIGHT; break; + case WXK_HOME: key = SCK_HOME; break; + case WXK_END: key = SCK_END; break; + case WXK_PRIOR: key = SCK_PRIOR; break; + case WXK_NEXT: key = SCK_NEXT; break; + case WXK_DELETE: key = SCK_DELETE; break; + case WXK_INSERT: key = SCK_INSERT; break; + case WXK_ESCAPE: key = SCK_ESCAPE; break; + case WXK_BACK: key = SCK_BACK; break; + case WXK_TAB: key = SCK_TAB; break; + case WXK_RETURN: key = SCK_RETURN; break; + case WXK_ADD: key = SCK_ADD; break; + case WXK_SUBTRACT: key = SCK_SUBTRACT; break; + case WXK_DIVIDE: key = SCK_DIVIDE; break; + case WXK_CONTROL: key = 0; break; + case WXK_ALT: key = 0; break; + case WXK_SHIFT: key = 0; break; + } + return KeyDown(key, shift, ctrl, alt); } @@ -401,6 +454,9 @@ void ScintillaWX::DoContextMenu(Point pt) { ContextMenu(pt); } +void ScintillaWX::DoOnListBox() { + AutoCompleteCompleted(); +} //---------------------------------------------------------------------- @@ -434,11 +490,15 @@ void ScintillaWX::DoDragLeave() { void ScintillaWX::FullPaint() { paintState = painting; rcPaint = GetTextRectangle(); + paintingAllText = true; wxClientDC dc(wMain.GetID()); Surface surfaceWindow; surfaceWindow.Init(&dc); Paint(&surfaceWindow, rcPaint); surfaceWindow.Release(); + +// wMain.GetID()->Refresh(FALSE); + paintState = notPainting; } diff --git a/src/stc/ScintillaWX.h b/src/stc/ScintillaWX.h index 2d273fc99a..b773eac3a9 100644 --- a/src/stc/ScintillaWX.h +++ b/src/stc/ScintillaWX.h @@ -97,8 +97,12 @@ public: virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); virtual void ClaimSelection(); - virtual LRESULT DefWndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); - virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); + virtual long DefWndProc(unsigned int iMessage, + unsigned long wParam, + long lParam); + virtual long WndProc(unsigned int iMessage, + unsigned long wParam, + long lParam); virtual void NotifyChange(); virtual void NotifyParent(SCNotification scn); @@ -126,6 +130,7 @@ public: void DoCommand(int ID); void DoContextMenu(Point pt); + void DoOnListBox(); // helpers @@ -139,7 +144,6 @@ private: bool capturedMouse; wxStyledTextCtrl* stc; - wxTextDataObject textDO; wxSTCDropTarget* dropTarget; wxDragResult dragResult; }; diff --git a/src/stc/StcVC.dsp b/src/stc/StcVC.dsp index 3b8fc6d9e7..5e77ef19e2 100644 --- a/src/stc/StcVC.dsp +++ b/src/stc/StcVC.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="StcVC" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 @@ -22,11 +22,9 @@ CFG=StcVC - Win32 Debug !MESSAGE # Begin Project -# PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe -RSC=rc.exe !IF "$(CFG)" == "StcVC - Win32 Release" @@ -40,11 +38,12 @@ RSC=rc.exe # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c # SUBTRACT CPP /YX -# ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -64,11 +63,12 @@ LIB32=link.exe -lib # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /FD /c # SUBTRACT CPP /YX -# ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -179,6 +179,34 @@ SOURCE=.\scintilla\src\KeyWords.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexCPP.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexHTML.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexOthers.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexPerl.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexPython.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexSQL.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexVB.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LineMarker.cxx # End Source File # Begin Source File diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py new file mode 100644 index 0000000000..257180da6b --- /dev/null +++ b/src/stc/gen_iface.py @@ -0,0 +1,684 @@ +#!/bin/env python +#---------------------------------------------------------------------------- +# Name: gen_iface.py +# Purpose: Generate stc.h and stc.cpp from the info in Scintilla.iface +# +# Author: Robin Dunn +# +# Created: 5-Sept-2000 +# RCS-ID: $Id$ +# Copyright: (c) 2000 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------------- + + +import sys, string, re +from fileinput import FileInput + + +IFACE = './scintilla/include/Scintilla.iface' +H_TEMPLATE = './stc.h.in' +CPP_TEMPLATE = './stc.cpp.in' +H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' # +CPP_DEST = './stc.cpp' #'./stc_test.cpp' + + +# Value prefixes to convert +valPrefixes = [('SCI_', ''), + ('SC_', ''), + ('SCN_', None), # just toss these... + ('SCEN_', None), + ('SCE_', ''), + ('SCLEX_', 'LEX_'), + ('SCK_', 'KEY_'), + ('SCFIND_', 'FIND_'), + ('SCWS_', 'WS_'), +] + +# Message funcion values that should have a CMD_ constant as well +cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ] + + +# Map some generic typenames to wx types, using return value syntax +retTypeMap = { + 'position': 'int', + 'string': 'wxString', + 'colour': 'wxColour', + } + +# Map some generic typenames to wx types, using parameter syntax +paramTypeMap = { + 'position': 'int', + 'string': 'const wxString&', + 'colour': 'const wxColour&', + 'keymod': 'int', +} + +# Map of method info that needs tweaked. Either the name needs changed, or +# the method definition/implementation. Tuple items are: +# +# 1. New method name. None to skip the method, 0 to leave the +# default name. +# 2. Method definition for the .h file, 0 to leave alone +# 3. Method implementation for the .cpp file, 0 to leave alone. +# 4. tuple of Doc string lines, or 0 to leave alone. +# +methodOverrideMap = { + 'AddText' : (0, + 'void %s(const wxString& text);', + + '''void %s(const wxString& text) { + SendMsg(%s, text.Len(), (long)text.c_str());''', + 0), + + 'AddStyledText' : (0, + 'void %s(const wxString& text);', + + '''void %s(const wxString& text) { + SendMsg(%s, text.Len(), (long)text.c_str());''', + 0), + + 'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0), + 'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0), + + 'GetStyledText' : (0, + 'wxString %s(int startPos, int endPos);', + + '''wxString %s(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + TextRange tr; + tr.lpstrText = text.GetWriteBuf(len*2+1); + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + SendMsg(%s, 0, (long)&tr); + text.UngetWriteBuf(len*2); + return text;''', + + ('Retrieve a buffer of cells.',)), + + + 'PositionFromPoint' : (0, + 'int %s(wxPoint pt);', + + '''int %s(wxPoint pt) { + return SendMsg(%s, pt.x, pt.y);''', + + 0), + + 'GetCurLine' : (0, + 'wxString %s(int* OUTPUT=NULL);', + + '''wxString %s(int* linePos) { + wxString text; + int len = LineLength(GetCurrentLine()); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(%s, len, (long)buf); + text.UngetWriteBuf(); + if (linePos) *linePos = pos; + + return text;''', + + 0), + + 'SetUsePalette' : (None, 0,0,0), + + 'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0), + 'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0), + + 'MarkerDefine' : (0, + '''void %s(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour);''', + + '''void %s(int markerNumber, int markerSymbol, + const wxColour& foreground, + const wxColour& background) { + + SendMsg(%s, markerNumber, markerSymbol); + if (foreground.Ok()) + MarkerSetForeground(markerNumber, foreground); + if (background.Ok()) + MarkerSetBackground(markerNumber, background);''', + + ('Set the symbol used for a particular marker number,', + 'and optionally the for and background colours.')), + + 'SetMarginTypeN' : ('SetMarginType', 0, 0, 0), + 'GetMarginTypeN' : ('GetMarginType', 0, 0, 0), + 'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0), + 'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0), + 'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0), + 'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0), + 'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0), + 'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0), + + 'StyleSetFore' : ('StyleSetForeground', 0, 0, 0), + 'StyleSetBack' : ('StyleSetBackground', 0, 0, 0), + 'SetSelFore' : ('SetSelForeground', 0, 0, 0), + 'SetSelBack' : ('SetSelBackground', 0, 0, 0), + 'SetCaretFore' : ('SetCaretForeground', 0, 0, 0), + 'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0), + + # need to fix this to map between wx and scintilla encoding flags, leave it out for now... + 'StyleSetCharacterSet' : (None, 0, 0, 0), + + 'AssignCmdKey' : ('CmdKeyAssign', + 'void %s(int key, int modifiers, int cmd);', + + '''void %s(int key, int modifiers, int cmd) { + SendMsg(%s, MAKELONG(key, modifiers), cmd);''', + + 0), + + 'ClearCmdKey' : ('CmdKeyClear', + 'void %s(int key, int modifiers);', + + '''void %s(int key, int modifiers) { + SendMsg(%s, MAKELONG(key, modifiers));''', + + 0), + + 'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0), + + + 'SetStylingEx' : ('SetStyleBytes', + 'void %s(int length, char* styleBytes);', + + '''void %s(int length, char* styleBytes) { + SendMsg(%s, length, (long)styleBytes);''', + + 0), + + + 'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0), + 'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0), + 'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0), + 'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0), + + 'AutoCShow' : ('AutoCompShow', 0, 0, 0), + 'AutoCCancel' : ('AutoCompCancel', 0, 0, 0), + 'AutoCActive' : ('AutoCompActive', 0, 0, 0), + 'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0), + 'AutoCComplete' : ('AutoCompComplete', 0, 0, 0), + 'AutoCStops' : ('AutoCompStops', 0, 0, 0), + 'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0), + 'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0), + 'AutoCSelect' : ('AutoCompSelect', 0, 0, 0), + 'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0), + 'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0), + 'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0), + 'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0), + 'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0), + 'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0), + 'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0), + + 'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0), + 'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0), + + 'GetCaretFore' : ('GetCaretForeground', 0, 0, 0), + + 'GetUsePalette' : (None, 0, 0, 0), + + 'FindText' : (0, + '''int %s(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord);''', + '''int %s(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord) { + TextToFind ft; + int flags = 0; + + flags |= caseSensitive ? SCFIND_MATCHCASE : 0; + flags |= wholeWord ? SCFIND_WHOLEWORD : 0; + ft.chrg.cpMin = minPos; + ft.chrg.cpMax = maxPos; + ft.lpstrText = (char*)text.c_str(); + + return SendMsg(%s, flags, (long)&ft);''', + 0), + + 'FormatRange' : (0, + '''int %s(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect);''', + ''' int %s(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect) { + RangeToFormat fr; + + fr.hdc = draw; + fr.hdcTarget = target; + fr.rc.top = renderRect.GetTop(); + fr.rc.left = renderRect.GetLeft(); + fr.rc.right = renderRect.GetRight(); + fr.rc.bottom = renderRect.GetBottom(); + fr.rcPage.top = pageRect.GetTop(); + fr.rcPage.left = pageRect.GetLeft(); + fr.rcPage.right = pageRect.GetRight(); + fr.rcPage.bottom = pageRect.GetBottom(); + fr.chrg.cpMin = startPos; + fr.chrg.cpMax = endPos; + + return SendMsg(%s, doDraw, (long)&fr);''', + 0), + + + 'GetLine' : (0, + 'wxString %s(int line);', + + '''wxString %s(int line) { + wxString text; + int len = LineLength(line); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(%s, line, (long)buf); + text.UngetWriteBuf(); + + return text;''', + + ('Retrieve the contents of a line.',)), + + 'SetSel' : ('SetSelection', 0, 0, 0), + 'GetSelText' : ('GetSelectedText', + 'wxString %s();', + + '''wxString %s() { + wxString text; + int start; + int end; + + GetSelection(&start, &end); + int len = end - start; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(%s, 0, (long)buff); + text.UngetWriteBuf(); + return text;''', + + ('Retrieve the selected text.',)), + + 'GetTextRange' : (0, + 'wxString %s(int startPos, int endPos);', + + '''wxString %s(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + char* buff = text.GetWriteBuf(len+1); + TextRange tr; + tr.lpstrText = buff; + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + + SendMsg(%s, 0, (long)&tr); + text.UngetWriteBuf(); + return text;''', + + ('Retrieve a range of text.',)), + + 'PointXFromPosition' : (None, 0, 0, 0), + 'PointYFromPosition' : (None, 0, 0, 0), + + 'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0), + 'ReplaceSel' : ('ReplaceSelection', 0, 0, 0), + 'Null' : (None, 0, 0, 0), + + 'GetText' : (0, + 'wxString %s();', + + '''wxString %s() { + wxString text; + int len = GetTextLength()+1; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(%s, len, (long)buff); + buff[len] = 0; + text.UngetWriteBuf(); + return text;''', + + ('Retrieve all the text in the document.', )), + + 'GetDirectFunction' : (None, 0, 0, 0), + 'GetDirectPointer' : (None, 0, 0, 0), + + 'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0), + 'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0), + 'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0), + + + # Remove all methods that are key commands since they can be + # executed with CmdKeyExecute + 'LineDown' : (None, 0, 0, 0), + 'LineDownExtend' : (None, 0, 0, 0), + 'LineUp' : (None, 0, 0, 0), + 'LineUpExtend' : (None, 0, 0, 0), + 'CharLeft' : (None, 0, 0, 0), + 'CharLeftExtend' : (None, 0, 0, 0), + 'CharRight' : (None, 0, 0, 0), + 'CharRightExtend' : (None, 0, 0, 0), + 'WordLeft' : (None, 0, 0, 0), + 'WordLeftExtend' : (None, 0, 0, 0), + 'WordRight' : (None, 0, 0, 0), + 'WordRightExtend' : (None, 0, 0, 0), + 'Home' : (None, 0, 0, 0), + 'HomeExtend' : (None, 0, 0, 0), + 'LineEnd' : (None, 0, 0, 0), + 'LineEndExtend' : (None, 0, 0, 0), + 'DocumentStart' : (None, 0, 0, 0), + 'DocumentStartExtend' : (None, 0, 0, 0), + 'DocumentEnd' : (None, 0, 0, 0), + 'DocumentEndExtend' : (None, 0, 0, 0), + 'PageUp' : (None, 0, 0, 0), + 'PageUpExtend' : (None, 0, 0, 0), + 'PageDown' : (None, 0, 0, 0), + 'PageDownExtend' : (None, 0, 0, 0), + 'EditToggleOvertype' : (None, 0, 0, 0), + 'Cancel' : (None, 0, 0, 0), + 'DeleteBack' : (None, 0, 0, 0), + 'Tab' : (None, 0, 0, 0), + 'BackTab' : (None, 0, 0, 0), + 'NewLine' : (None, 0, 0, 0), + 'FormFeed' : (None, 0, 0, 0), + 'VCHome' : (None, 0, 0, 0), + 'VCHomeExtend' : (None, 0, 0, 0), + 'ZoomIn' : (None, 0, 0, 0), + 'ZoomOut' : (None, 0, 0, 0), + 'DelWordLeft' : (None, 0, 0, 0), + 'DelWordRight' : (None, 0, 0, 0), + 'LineCut' : (None, 0, 0, 0), + 'LineDelete' : (None, 0, 0, 0), + 'LineTranspose' : (None, 0, 0, 0), + 'LowerCase' : (None, 0, 0, 0), + 'UpperCase' : (None, 0, 0, 0), + 'LineScrollDown' : (None, 0, 0, 0), + 'LineScrollUp' : (None, 0, 0, 0), + + + 'GetDocPointer' : (0, + 'void* %s();', + '''void* %s() { + return (void*)SendMsg(%s);''', + 0), + + 'SetDocPointer' : (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, (long)docPointer);''', + 0), + + 'CreateDocument' : (0, + 'void* %s();', + '''void* %s() { + return (void*)SendMsg(%s);''', + 0), + + 'AddRefDocument' : (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, (long)docPointer);''', + 0), + + 'ReleaseDocument' : (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, (long)docPointer);''', + 0), + + 'GrabFocus' : (None, 0, 0, 0), + + '' : ('', 0, 0, 0), + + } + +#---------------------------------------------------------------------------- + +def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest): + curDocStrings = [] + values = [] + methods = [] + + # parse iface file + fi = FileInput(iface) + for line in fi: + line = line[:-1] + if line[:2] == '##' or line == '': + #curDocStrings = [] + continue + + op = line[:4] + if line[:2] == '# ': # a doc string + curDocStrings.append(line[2:]) + + elif op == 'val ': + parseVal(line[4:], values, curDocStrings) + curDocStrings = [] + + elif op == 'fun ' or op == 'set ' or op == 'get ': + parseFun(line[4:], methods, curDocStrings, values) + curDocStrings = [] + + elif op == 'cat ': + if string.strip(line[4:]) == 'Deprecated': + break # skip the rest of the file + + elif op == 'evt ': + pass + + else: + print '***** Unknown line type: ', line + + + # process templates + data = {} + data['VALUES'] = processVals(values) + defs, imps = processMethods(methods) + data['METHOD_DEFS'] = defs + data['METHOD_IMPS'] = imps + + # get template text + h_text = open(h_tmplt).read() + cpp_text = open(cpp_tmplt).read() + + # do the substitutions + h_text = h_text % data + cpp_text = cpp_text % data + + # write out destination files + open(h_dest, 'w').write(h_text) + open(cpp_dest, 'w').write(cpp_text) + + + +#---------------------------------------------------------------------------- + +def processVals(values): + text = [] + for name, value, docs in values: + if docs: + text.append('') + for x in docs: + text.append('// ' + x) + text.append('#define %s %s' % (name, value)) + return string.join(text, '\n') + +#---------------------------------------------------------------------------- + +def processMethods(methods): + defs = [] + imps = [] + + for retType, name, number, param1, param2, docs in methods: + retType = retTypeMap.get(retType, retType) + params = makeParamString(param1, param2) + + name, theDef, theImp, docs = checkMethodOverride(name, number, docs) + + if name is None: + continue + + # Build the method definition for the .h file + if docs: + defs.append('') + for x in docs: + defs.append(' // ' + x) + if not theDef: + theDef = ' %s %s(%s);' % (retType, name, params) + defs.append(theDef) + + # Build the method implementation string + if docs: + imps.append('') + for x in docs: + imps.append('// ' + x) + if not theImp: + theImp = '%s wxStyledTextCtrl::%s(%s) {\n ' % (retType, name, params) + + if retType == 'wxColour': + theImp = theImp + 'long c = ' + elif retType != 'void': + theImp = theImp + 'return ' + theImp = theImp + 'SendMsg(%s, %s, %s)' % (number, + makeArgString(param1), + makeArgString(param2)) + if retType == 'bool': + theImp = theImp + ' != 0' + if retType == 'wxColour': + theImp = theImp + ';\n return wxColourFromLong(c)' + + theImp = theImp + ';\n}' + imps.append(theImp) + + + return string.join(defs, '\n'), string.join(imps, '\n') + + +#---------------------------------------------------------------------------- + +def checkMethodOverride(name, number, docs): + theDef = theImp = None + if methodOverrideMap.has_key(name): + item = methodOverrideMap[name] + + if item[0] != 0: + name = item[0] + if item[1] != 0: + theDef = ' ' + (item[1] % name) + if item[2] != 0: + theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}' + if item[3] != 0: + docs = item[3] + + return name, theDef, theImp, docs + +#---------------------------------------------------------------------------- + +def makeArgString(param): + if not param: + return '0' + + typ, name = param + + if typ == 'string': + return '(long)%s.c_str()' % name + if typ == 'colour': + return 'wxColourAsLong(%s)' % name + + return name + +#---------------------------------------------------------------------------- + +def makeParamString(param1, param2): + def doOne(param): + if param: + aType = paramTypeMap.get(param[0], param[0]) + return aType + ' ' + param[1] + else: + return '' + + st = doOne(param1) + if st and param2: + st = st + ', ' + st = st + doOne(param2) + return st + + +#---------------------------------------------------------------------------- + +def parseVal(line, values, docs): + name, val = string.split(line, '=') + + # remove prefixes such as SCI, etc. + for old, new in valPrefixes: + lo = len(old) + if name[:lo] == old: + if new is None: + return + name = new + name[lo:] + + # add it to the list + values.append( ('wxSTC_' + name, val, docs) ) + +#---------------------------------------------------------------------------- + +funregex = re.compile(r'\s*([a-zA-Z0-9_]+)' # return type + '\s+([a-zA-Z0-9_]+)=' # name= + '([0-9]+)' # number + '\(([ a-zA-Z0-9_]*),' # (param, + '([ a-zA-Z0-9_]*)\)') # param) + +def parseFun(line, methods, docs, values): + def parseParam(param): + param = string.strip(param) + if param == '': + param = None + else: + param = tuple(string.split(param)) + return param + + mo = funregex.match(line) + if mo is None: + print "***** Line doesn't match! : " + line + + retType, name, number, param1, param2 = mo.groups() + + param1 = parseParam(param1) + param2 = parseParam(param2) + + # Special case. For the key command functionss we want a value defined too + num = string.atoi(number) + for v in cmdValues: + if (type(v) == type(()) and v[0] <= num < v[1]) or v == num: + parseVal('CMD_%s=%s' % (string.upper(name), number), values, ()) + + #if retType == 'void' and not param1 and not param2: + + methods.append( (retType, name, number, param1, param2, tuple(docs)) ) + + +#---------------------------------------------------------------------------- + + +def main(args): + # TODO: parse command line args to replace default input/output files??? + + # Now just do it + processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST) + + + +if __name__ == '__main__': + main(sys.argv) + +#---------------------------------------------------------------------------- + + diff --git a/src/stc/makefile.b32 b/src/stc/makefile.b32 index 3d52701553..0d86478b7c 100644 --- a/src/stc/makefile.b32 +++ b/src/stc/makefile.b32 @@ -2,7 +2,7 @@ # File: makefile.b32 # Author: Julian Smart # Created: 1999 -# Updated: +# Updated: # Copyright: # # Makefile : Builds wxMMedia library for 32-bit BC++ @@ -21,25 +21,38 @@ STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S) LIBTARGET=$(WXDIR)\contrib\lib\stc.lib OBJECTS = \ - Accessor.obj \ + Accessor.obj \ AutoComplete.obj \ - CallTip.obj \ - CellBuffer.obj \ - ContractionState.obj\ - Document.obj \ + CallTip.obj \ + CellBuffer.obj \ + ContractionState.obj \ + Document.obj \ + DocumentAccessor.obj \ Editor.obj \ - Indicator.obj \ + Indicator.obj \ KeyMap.obj \ - KeyWords.obj \ - LineMarker.obj \ - PropSet.obj \ + KeyWords.obj \ + LexCPP.obj \ + LexHTML.obj \ + LexLua.obj \ + LexOthers.obj \ + LexPerl.obj \ + LexPython.obj \ + LexSQL.obj \ + LexVB.obj \ + LineMarker.obj \ + PropSet.obj \ + PosRegExp.obj \ ScintillaBase.obj \ Style.obj \ - ViewStyle.obj \ + UniConversion.obj \ + ViewStyle.obj \ + WindowAccessor.obj \ \ PlatWX.obj \ - ScintillaWX.obj \ - stc.obj \ + ScintillaWX.obj \ + stc.obj \ + !include $(WXDIR)\src\makelib.b32 diff --git a/src/stc/makefile.g95 b/src/stc/makefile.g95 index b6d802ecd9..5b0cc02089 100644 --- a/src/stc/makefile.g95 +++ b/src/stc/makefile.g95 @@ -25,6 +25,18 @@ OBJECTS = \ $(S)/ScintillaBase.$(OBJSUFF) \ $(S)/Style.$(OBJSUFF) \ $(S)/ViewStyle.$(OBJSUFF) \ + $(S)/LexCPP.$(OBJSUFF) \ + $(S)/LexHTML.$(OBJSUFF) \ + $(S)/LexLua.$(OBJSUFF) \ + $(S)/LexOthers.$(OBJSUFF) \ + $(S)/LexPerl.$(OBJSUFF) \ + $(S)/LexPython.$(OBJSUFF) \ + $(S)/LexSQL.$(OBJSUFF) \ + $(S)/LexVB.$(OBJSUFF) \ + $(S)/DocumentAccessor.$(OBJSUFF)\ + $(S)/UniConversion.$(OBJSUFF) \ + $(S)/WindowAccessor.$(OBJSUFF) \ + $(S)/PosRegExp.$(OBJSUFF) \ PlatWX.$(OBJSUFF) \ ScintillaWX.$(OBJSUFF) \ stc.$(OBJSUFF) diff --git a/src/stc/makefile.vc b/src/stc/makefile.vc index c1adeacff6..c101bba3f1 100644 --- a/src/stc/makefile.vc +++ b/src/stc/makefile.vc @@ -15,21 +15,32 @@ NOPCH=1 !include $(WXDIR)\src\makevc.env OBJECTS = \ - $(D)\Accessor.obj \ $(D)\AutoComplete.obj \ $(D)\CallTip.obj \ $(D)\CellBuffer.obj \ $(D)\ContractionState.obj\ $(D)\Document.obj \ + $(D)\DocumentAccessor.obj\ $(D)\Editor.obj \ $(D)\Indicator.obj \ $(D)\KeyMap.obj \ $(D)\KeyWords.obj \ + $(D)\LexCPP.obj \ + $(D)\LexHTML.obj \ + $(D)\LexLua.obj \ + $(D)\LexOthers.obj \ + $(D)\LexPerl.obj \ + $(D)\LexPython.obj \ + $(D)\LexSQL.obj \ + $(D)\LexVB.obj \ $(D)\LineMarker.obj \ + $(D)\PosRegExp.obj \ $(D)\PropSet.obj \ $(D)\ScintillaBase.obj \ $(D)\Style.obj \ + $(D)\UniConversion.obj \ $(D)\ViewStyle.obj \ + $(D)\WindowAccessor.obj \ \ $(D)\PlatWX.obj \ $(D)\ScintillaWX.obj \ diff --git a/src/stc/scintilla/README.txt b/src/stc/scintilla/README.txt index 705fb99652..b88d57495c 100644 --- a/src/stc/scintilla/README.txt +++ b/src/stc/scintilla/README.txt @@ -3,5 +3,5 @@ scintilla/include directories from the Scintilla/SCiTE source distribution. All other code needed to implement Scintilla on top of wxWindows is located in the directory above this one. -The current version of the Scintilla code is somewhere between 1.22 -and 1.23, (from their CVS.) +The current version of the Scintilla code is 1.32 + diff --git a/src/stc/scintilla/include/Accessor.h b/src/stc/scintilla/include/Accessor.h index 1bba4af55e..b4b7e62ecf 100644 --- a/src/stc/scintilla/include/Accessor.h +++ b/src/stc/scintilla/include/Accessor.h @@ -3,26 +3,30 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; + +class Accessor; + +typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); + +// Interface to data in a Scintilla class Accessor { protected: - // bufferSize is a trade off between time taken to copy the characters and SendMessage overhead + enum {extremePosition=0x7FFFFFFF}; + // bufferSize is a trade off between time taken to copy the characters and retrieval overhead // slopSize positions the buffer before the desired position in case there is some backtracking enum {bufferSize=4000, slopSize=bufferSize/8}; char buf[bufferSize+1]; - WindowID id; - PropSet &props; int startPos; int endPos; - int lenDoc; - int offset; // Optional but including an offset makes GCC generate better code - void Fill(int position); + int codePage; + + virtual bool InternalIsLeadByte(char ch)=0; + virtual void Fill(int position)=0; public: - Accessor(WindowID id_, PropSet &props_, int offset_=0) : - id(id_), props(props_), startPos(0x7FFFFFFF), endPos(0), - lenDoc(-1), offset(offset_) { - } + Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} + virtual ~Accessor() {} char operator[](int position) { - position += offset; if (position < startPos || position >= endPos) { Fill(position); } @@ -30,7 +34,6 @@ public: } char SafeGetCharAt(int position, char chDefault=' ') { // Safe version of operator[], returning a defined value for invalid position - position += offset; if (position < startPos || position >= endPos) { Fill(position); if (position < startPos || position >= endPos) { @@ -40,37 +43,28 @@ public: } return buf[position - startPos]; } - char StyleAt(int position); - int GetLine(int position); - int LineStart(int line); - int LevelAt(int line); - int Length(); - void Flush() { - startPos = 0x7FFFFFFF; - lenDoc = -1; + bool IsLeadByte(char ch) { + return codePage && InternalIsLeadByte(ch); } - int GetLineState(int line); - int SetLineState(int line, int state); - PropSet &GetPropSet() { return props; } -}; - -class StylingContext : public Accessor { - char styleBuf[bufferSize]; - int validLen; - char chFlags; - char chWhile; - unsigned int startSeg; -public: - StylingContext(WindowID id_, PropSet &props_, int offset_=0) : - Accessor(id_,props_,offset_), validLen(0), chFlags(0) {} - void StartAt(unsigned int start, char chMask=31); - void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; - void ColourSegment(unsigned int start, unsigned int end, int chAttr); - unsigned int GetStartSegment() { return startSeg; } - void StartSegment(unsigned int pos); - void ColourTo(unsigned int pos, int chAttr); - int GetLine(int position); - void SetLevel(int line, int level); - void Flush(); + void SetCodePage(int codePage_) { codePage = codePage_; } + + virtual char StyleAt(int position)=0; + virtual int GetLine(int position)=0; + virtual int LineStart(int line)=0; + virtual int LevelAt(int line)=0; + virtual int Length()=0; + virtual void Flush()=0; + virtual int GetLineState(int line)=0; + virtual int SetLineState(int line, int state)=0; + virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; + + // Style setting + virtual void StartAt(unsigned int start, char chMask=31)=0; + virtual void SetFlags(char chFlags_, char chWhile_)=0; + virtual unsigned int GetStartSegment()=0; + virtual void StartSegment(unsigned int pos)=0; + virtual void ColourTo(unsigned int pos, int chAttr)=0; + virtual void SetLevel(int line, int level)=0; + virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; }; diff --git a/src/stc/scintilla/include/KeyWords.h b/src/stc/scintilla/include/KeyWords.h index 2cc03b788f..3159dcc1b4 100644 --- a/src/stc/scintilla/include/KeyWords.h +++ b/src/stc/scintilla/include/KeyWords.h @@ -3,6 +3,39 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -void ColouriseDoc(int codePage, int startPos, int lengthDoc, int initStyle, - int language, WordList *keywordlists[], StylingContext &styler); +typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler); + +class LexerModule { + static LexerModule *base; + LexerModule *next; + int language; + LexerFunction fn; +public: + LexerModule(int language_, LexerFunction fn_); + static void Colourise(unsigned int startPos, int lengthDoc, int initStyle, + int language, WordList *keywordlists[], Accessor &styler); +}; + +inline bool iswordchar(char ch) { + return isalnum(ch) || ch == '.' || ch == '_'; +} + +inline bool iswordstart(char ch) { + return isalnum(ch) || ch == '_'; +} + +inline bool isoperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '.' || ch == '~') + return true; + return false; +} diff --git a/src/stc/scintilla/include/Platform.h b/src/stc/scintilla/include/Platform.h index 3a5e9816dc..de9cf202a1 100644 --- a/src/stc/scintilla/include/Platform.h +++ b/src/stc/scintilla/include/Platform.h @@ -45,6 +45,7 @@ #pragma warning(disable: 4800 4244 4309) #endif #include +#include #include #endif @@ -79,12 +80,6 @@ typedef wxWindow* WindowID; typedef wxMenu* MenuID; #endif -#if PLAT_GTK || PLAT_WX -#define SHIFT_PRESSED 1 -#define LEFT_CTRL_PRESSED 2 -#define LEFT_ALT_PRESSED 4 -#endif - // Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably class Point { @@ -198,6 +193,7 @@ public: }; class Font { +protected: FontID id; #if PLAT_WX int ascent; @@ -207,18 +203,21 @@ class Font { Font &operator=(const Font &) { id=0; return *this; } public: Font(); - ~Font(); + virtual ~Font(); - void Create(const char *faceName, int size, bool bold=false, bool italic=false); - void Release(); + virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic); + virtual void Release(); FontID GetID() { return id; } + // Alias another font - caller guarantees not to Release + void SetID(FontID id_) { id = id_; } friend class Surface; }; // A surface abstracts a place to draw class Surface { private: + bool unicodeMode; #if PLAT_GTK GdkDrawable *drawable; GdkGC *gc; @@ -266,6 +265,7 @@ public: bool Initialised(); void PenColour(Colour fore); int LogPixelsY(); + int DeviceHeightFont(int points); void MoveTo(int x_, int y_); void LineTo(int x_, int y_); void Polygon(Point *pts, int npts, Colour fore, Colour back); @@ -290,6 +290,11 @@ public: int SetPalette(Palette *pal, bool inBackGround); void SetClip(PRectangle rc); + void FlushCachedState(); + + void SetUnicodeMode(bool unicodeMode_) { + unicodeMode=unicodeMode_; + } }; // Class to hide the details of window manipulation @@ -300,6 +305,7 @@ protected: WindowID id; public: Window() : id(0) {} + Window(const Window &source) : id(source.id) {} virtual ~Window(); Window &operator=(WindowID id_) { id = id_; @@ -316,7 +322,7 @@ public: void Show(bool show=true); void InvalidateAll(); void InvalidateRectangle(PRectangle rc); - void SetFont(Font &font); + virtual void SetFont(Font &font); enum Cursor { cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow }; void SetCursor(Cursor curs); void SetTitle(const char *s); @@ -333,14 +339,17 @@ class ListBox : public Window { WindowID scroller; int current; #endif + int desiredVisibleRows; + unsigned int maxItemCharacters; + unsigned int aveCharWidth; public: ListBox(); virtual ~ListBox(); - ListBox &operator=(WindowID id_) { - id = id_; - return *this; - } void Create(Window &parent, int ctrlID); + virtual void SetFont(Font &font); + void SetAverageCharWidth(int width); + void SetVisibleRows(int rows); + PRectangle GetDesiredRect(); void Clear(); void Append(char *s); int Length(); @@ -385,6 +394,16 @@ public: // These are utility functions not really tied to a platform static int Minimum(int a, int b); static int Maximum(int a, int b); + // Next three assume 16 bit shorts and 32 bit longs + static long LongFromTwoShorts(short a,short b) { + return (a) | ((b) << 16); + } + static short HighShortFromLong(long x) { + return static_cast(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast(x & 0xffff); + } static void DebugPrintf(const char *format, ...); static int Clamp(int val, int minVal, int maxVal); }; diff --git a/src/stc/scintilla/include/PosRegExp.h b/src/stc/scintilla/include/PosRegExp.h new file mode 100644 index 0000000000..b915b1ed49 --- /dev/null +++ b/src/stc/scintilla/include/PosRegExp.h @@ -0,0 +1,138 @@ +#ifndef POSREGEXP_H +#define POSREGEXP_H + +#define MatchesNum 0x10 + +enum EOps +{ + ReBlockOps = 0x1000, + ReMul, // * + RePlus, // + + ReQuest, // ? + ReNGMul, // *? + ReNGPlus, // +? + ReNGQuest, // ?? + ReRangeN, // {n,} + ReRangeNM, // {n,m} + ReNGRangeN, // {n,}? + ReNGRangeNM, // {n,m}? + ReOr, // | + ReBehind = 0x1100, // ?#n + ReNBehind = 0x1200, // ?~n + ReAhead = 0x1300, // ?= + ReNAhead = 0x1400, // ?! + + ReSymbolOps = 0x2000, + ReEmpty, + ReSymb, // a b \W \s ... + ReEnum, // [] + ReNEnum, // [^] + ReBrackets, // (...) + ReBkTrace = 0x2100, // \yN + ReBkBrack = 0x2200 // \N +}; + +enum ESymbols +{ + ReAnyChr = 0x4000, // . + ReSoL, // ^ + ReEoL, // $ + ReDigit, // \d + ReNDigit, // \D + ReWordSymb, // \w + ReNWordSymb, // \W + ReWSpace, // \s + ReNWSpace, // \S + ReUCase, // \u + ReNUCase , // \l + ReWBound, // \b + ReNWBound, // \B + RePreNW, // \c + ReStart, // \m + ReEnd, // \M + + ReChr = 0x0 // Char in Lower Byte +}; +enum ETempSymb +{ + ReTemp = 0x7000, + ReLBrack, ReRBrack, + ReEnumS, ReEnumE, ReNEnumS, + ReRangeS, ReRangeE, ReNGRangeE, ReFrToEnum +}; + +#define BackSlash '\\' + +typedef union SCharData +{ + int IArr[8]; + char CArr[32]; + void SetBit(unsigned char Bit); + void ClearBit(unsigned char Bit); + bool GetBit(unsigned char Bit); +} *PCharData; + +typedef struct SRegInfo +{ + SRegInfo(); + ~SRegInfo(); + + EOps Op; + union{ + SRegInfo *Param; + int Symb; + PCharData ChrClass; + }un; + int s,e; + SRegInfo *Parent; + SRegInfo *Next; +} *PRegInfo; + +typedef struct SMatches +{ + int s[MatchesNum]; + int e[MatchesNum]; + int CurMatch; +} *PMatches; + +typedef class PosRegExp +{ + PRegInfo Info; + PMatches BkTrace; + bool NoCase,Extend,NoMoves; + bool Error; + int *Exprn; + int posParse; + int posEnd,posStart; + int posBkStr; + int FirstChar; + + bool SetExprLow(const char *Expr); + bool SetStructs(PRegInfo &Info,int st,int end); + void Optimize(); + bool CheckSymb(int Symb,bool Inc); + bool LowParse(PRegInfo Re); + bool LowParseRe(PRegInfo &Next); + bool LowCheckNext(PRegInfo Re); + bool ParseRe(int posStr); + bool QuickCheck(); +public: + PMatches Matches; + int Ok, CurMatch; + + void *param; + char (*CharAt)(int pos, void *param); + + PosRegExp(); + ~PosRegExp(); + + bool isok(); + bool SetNoMoves(bool Moves); + bool SetBkTrace(int posStr,PMatches Trace); + bool SetExpr(const char *Expr); + bool Parse(int posStr, int posStop, PMatches Mtch); + bool Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves = -1); + bool Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res); +} *PPosRegExp; + +#endif /* POSREGEXP_H */ diff --git a/src/stc/scintilla/include/PropSet.h b/src/stc/scintilla/include/PropSet.h index 31da01f954..025174f8ab 100644 --- a/src/stc/scintilla/include/PropSet.h +++ b/src/stc/scintilla/include/PropSet.h @@ -8,44 +8,92 @@ bool EqualCaseInsensitive(const char *a, const char *b); +#if PLAT_WIN +#define strcasecmp stricmp +#define strncasecmp strnicmp +#endif + +#ifdef __WXMSW__ +#define strcasecmp stricmp +#define strncasecmp strnicmp +#endif + // Define another string class. // While it would be 'better' to use std::string, that doubles the executable size. -inline char *StringDup(const char *s) { +inline char *StringDup(const char *s, int len=-1) { if (!s) return 0; - char *sNew = new char[strlen(s) + 1]; - if (sNew) - strcpy(sNew, s); + if (len == -1) + len = strlen(s); + char *sNew = new char[len + 1]; + if (sNew) { + strncpy(sNew, s, len); + sNew[len] = '\0'; + } return sNew; } class SString { char *s; + int ssize; public: + typedef const char* const_iterator; + typedef int size_type; + static size_type npos; + const char* begin(void) const { + return s; + } + const char* end(void) const { + return &s[ssize]; + } + size_type size(void) const { + if (s) + return ssize; + else + return 0; + } + SString &assign(const char* sother, int size_ = -1) { + char *t = s; + s = StringDup(sother,size_); + ssize = (s) ? strlen(s) : 0; + delete []t; + return *this; + } + SString &assign(const SString& sother, int size_ = -1) { + return assign(sother.s,size_); + } + SString &assign(const_iterator ibeg, const_iterator iend) { + return assign(ibeg,iend - ibeg); + } SString() { s = 0; + ssize = 0; } SString(const SString &source) { s = StringDup(source.s); + ssize = (s) ? strlen(s) : 0; } SString(const char *s_) { s = StringDup(s_); + ssize = (s) ? strlen(s) : 0; } SString(int i) { char number[100]; sprintf(number, "%0d", i); - //itoa(i, number, 10); s = StringDup(number); + ssize = (s) ? strlen(s) : 0; } ~SString() { delete []s; s = 0; + ssize = 0; } SString &operator=(const SString &source) { if (this != &source) { delete []s; s = StringDup(source.s); + ssize = (s) ? strlen(s) : 0; } return *this; } @@ -56,6 +104,9 @@ public: return false; return strcmp(s, other.s) == 0; } + bool operator!=(const SString &other) const { + return !operator==(other); + } bool operator==(const char *sother) const { if ((s == 0) && (sother == 0)) return true; @@ -63,6 +114,9 @@ public: return false; return strcmp(s, sother) == 0; } + bool operator!=(const char *sother) const { + return !operator==(sother); + } const char *c_str() const { if (s) return s; @@ -75,106 +129,116 @@ public: else return 0; } - char operator[](int i) { + char operator[](int i) const { if (s) return s[i]; else return '\0'; } SString &operator +=(const char *sother) { + return append(sother,-1); + } + SString &operator +=(const SString &sother) { + return append(sother.s,sother.ssize); + } + SString &operator +=(char ch) { + return append(&ch,1); + } + SString &append(const char* sother, int lenOther) { int len = length(); - int lenOther = strlen(sother); + if(lenOther < 0) + lenOther = strlen(sother); char *sNew = new char[len + lenOther + 1]; if (sNew) { if (s) memcpy(sNew, s, len); - memcpy(sNew + len, sother, lenOther); + strncpy(&sNew[len], sother, lenOther); sNew[len + lenOther] = '\0'; delete []s; s = sNew; + ssize = (s) ? strlen(s) : 0; } return *this; } - int value() { + int value() const { if (s) return atoi(s); - else + else return 0; } + void substitute(char find, char replace) { + char *t = s; + while (t) { + t = strchr(t, find); + if (t) + *t = replace; + } + } + // I don't think this really belongs here -- Neil + void correctPath() { +#ifdef unix + substitute('\\', '/'); +#else + substitute('/', '\\'); +#endif + } +}; + +struct Property { + unsigned int hash; + char *key; + char *val; + Property *next; + Property() : hash(0), key(0), val(0), next(0) {} }; class PropSet { private: - char **vals; - int size; - int used; + enum { hashRoots=31 }; + Property *props[hashRoots]; public: PropSet *superPS; PropSet(); ~PropSet(); - void EnsureCanAddEntry(); void Set(const char *key, const char *val); void Set(char *keyval); SString Get(const char *key); + SString GetExpanded(const char *key); + SString Expand(const char *withvars); int GetInt(const char *key, int defaultValue=0); SString GetWild(const char *keybase, const char *filename); SString GetNewExpand(const char *keybase, const char *filename); void Clear(); - void ReadFromMemory(const char *data, int len); - void Read(const char *filename); -}; - -// This is a fixed length list of strings suitable for display in combo boxes -// as a memory of user entries -template -class EntryMemory { - SString entries[sz]; -public: - void Insert(SString s) { - for (int i=0;i0;j--) { - entries[j] = entries[j-1]; - } - entries[0] = s; - return; - } - } - for (int k=sz-1;k>0;k--) { - entries[k] = entries[k-1]; - } - entries[0] = s; - } - int Length() const { - int len = 0; - for (int i=0;i?@[\\]^`{|}~", ch) != NULL; +} + #endif diff --git a/src/stc/scintilla/include/SciLexer.h b/src/stc/scintilla/include/SciLexer.h index d6667e4e25..69402ab9ab 100644 --- a/src/stc/scintilla/include/SciLexer.h +++ b/src/stc/scintilla/include/SciLexer.h @@ -3,11 +3,15 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + #ifndef SCILEXER_H #define SCILEXER_H // SciLexer features - not in standard Scintilla +//++Autogenerated -- start of section automatically generated from Scintilla.iface #define SCLEX_CONTAINER 0 #define SCLEX_NULL 1 #define SCLEX_PYTHON 2 @@ -21,8 +25,10 @@ #define SCLEX_ERRORLIST 10 #define SCLEX_MAKEFILE 11 #define SCLEX_BATCH 12 - -// Lexical states for SCLEX_PYTHON +#define SCLEX_XCODE 13 +#define SCLEX_LATEX 14 +#define SCLEX_LUA 15 +#define SCLEX_DIFF 16 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 #define SCE_P_NUMBER 2 @@ -35,8 +41,8 @@ #define SCE_P_DEFNAME 9 #define SCE_P_OPERATOR 10 #define SCE_P_IDENTIFIER 11 - -// Lexical states for SCLEX_CPP, SCLEX_VB +#define SCE_P_COMMENTBLOCK 12 +#define SCE_P_STRINGEOL 13 #define SCE_C_DEFAULT 0 #define SCE_C_COMMENT 1 #define SCE_C_COMMENTLINE 2 @@ -45,13 +51,12 @@ #define SCE_C_WORD 5 #define SCE_C_STRING 6 #define SCE_C_CHARACTER 7 -#define SCE_C_PUNTUATION 8 +#define SCE_C_UUID 8 #define SCE_C_PREPROCESSOR 9 #define SCE_C_OPERATOR 10 #define SCE_C_IDENTIFIER 11 #define SCE_C_STRINGEOL 12 - -// Lexical states for SCLEX_HTML, SCLEX_xML +#define SCE_C_VERBATIM 13 #define SCE_H_DEFAULT 0 #define SCE_H_TAG 1 #define SCE_H_TAGUNKNOWN 2 @@ -63,51 +68,90 @@ #define SCE_H_OTHER 8 #define SCE_H_COMMENT 9 #define SCE_H_ENTITY 10 -// Embedded Javascript -#define SCE_HJ_START 11 -#define SCE_HJ_DEFAULT 12 -#define SCE_HJ_COMMENT 13 -#define SCE_HJ_COMMENTLINE 14 -#define SCE_HJ_COMMENTDOC 15 -#define SCE_HJ_NUMBER 16 -#define SCE_HJ_WORD 17 -#define SCE_HJ_KEYWORD 18 -#define SCE_HJ_DOUBLESTRING 19 -#define SCE_HJ_SINGLESTRING 20 -#define SCE_HJ_SYMBOLS 21 -#define SCE_HJ_STRINGEOL 28 -// XML and ASP -#define SCE_H_TAGEND 22 -#define SCE_H_XMLSTART 23 -#define SCE_H_XMLEND 24 -#define SCE_H_SCRIPT 25 -#define SCE_H_ASP 26 -#define SCE_H_ASPAT 27 -// Embedded VBScript -#define SCE_HB_START 40 -#define SCE_HB_DEFAULT 41 -#define SCE_HB_COMMENTLINE 42 -#define SCE_HB_NUMBER 43 -#define SCE_HB_WORD 44 -#define SCE_HB_STRING 45 -#define SCE_HB_IDENTIFIER 46 -#define SCE_HB_STRINGEOL 47 -// Embedded Python -#define SCE_HP_START 50 -#define SCE_HP_DEFAULT 51 -#define SCE_HP_COMMENTLINE 52 -#define SCE_HP_NUMBER 53 -#define SCE_HP_STRING 54 -#define SCE_HP_CHARACTER 55 -#define SCE_HP_WORD 56 -#define SCE_HP_TRIPLE 57 -#define SCE_HP_TRIPLEDOUBLE 58 -#define SCE_HP_CLASSNAME 59 -#define SCE_HP_DEFNAME 60 -#define SCE_HP_OPERATOR 61 -#define SCE_HP_IDENTIFIER 62 - -// Lexical states for SCLEX_PERL +#define SCE_H_TAGEND 11 +#define SCE_H_XMLSTART 12 +#define SCE_H_XMLEND 13 +#define SCE_H_SCRIPT 14 +#define SCE_H_ASP 15 +#define SCE_H_ASPAT 16 +#define SCE_H_CDATA 17 +#define SCE_H_QUESTION 18 +#define SCE_H_VALUE 19 +#define SCE_HJ_START 40 +#define SCE_HJ_DEFAULT 41 +#define SCE_HJ_COMMENT 42 +#define SCE_HJ_COMMENTLINE 43 +#define SCE_HJ_COMMENTDOC 44 +#define SCE_HJ_NUMBER 45 +#define SCE_HJ_WORD 46 +#define SCE_HJ_KEYWORD 47 +#define SCE_HJ_DOUBLESTRING 48 +#define SCE_HJ_SINGLESTRING 49 +#define SCE_HJ_SYMBOLS 50 +#define SCE_HJ_STRINGEOL 51 +#define SCE_HJA_START 55 +#define SCE_HJA_DEFAULT 56 +#define SCE_HJA_COMMENT 57 +#define SCE_HJA_COMMENTLINE 58 +#define SCE_HJA_COMMENTDOC 59 +#define SCE_HJA_NUMBER 60 +#define SCE_HJA_WORD 61 +#define SCE_HJA_KEYWORD 62 +#define SCE_HJA_DOUBLESTRING 63 +#define SCE_HJA_SINGLESTRING 64 +#define SCE_HJA_SYMBOLS 65 +#define SCE_HJA_STRINGEOL 66 +#define SCE_HB_START 70 +#define SCE_HB_DEFAULT 71 +#define SCE_HB_COMMENTLINE 72 +#define SCE_HB_NUMBER 73 +#define SCE_HB_WORD 74 +#define SCE_HB_STRING 75 +#define SCE_HB_IDENTIFIER 76 +#define SCE_HB_STRINGEOL 77 +#define SCE_HBA_START 80 +#define SCE_HBA_DEFAULT 81 +#define SCE_HBA_COMMENTLINE 82 +#define SCE_HBA_NUMBER 83 +#define SCE_HBA_WORD 84 +#define SCE_HBA_STRING 85 +#define SCE_HBA_IDENTIFIER 86 +#define SCE_HBA_STRINGEOL 87 +#define SCE_HP_START 90 +#define SCE_HP_DEFAULT 91 +#define SCE_HP_COMMENTLINE 92 +#define SCE_HP_NUMBER 93 +#define SCE_HP_STRING 94 +#define SCE_HP_CHARACTER 95 +#define SCE_HP_WORD 96 +#define SCE_HP_TRIPLE 97 +#define SCE_HP_TRIPLEDOUBLE 98 +#define SCE_HP_CLASSNAME 99 +#define SCE_HP_DEFNAME 100 +#define SCE_HP_OPERATOR 101 +#define SCE_HP_IDENTIFIER 102 +#define SCE_HPA_START 105 +#define SCE_HPA_DEFAULT 106 +#define SCE_HPA_COMMENTLINE 107 +#define SCE_HPA_NUMBER 108 +#define SCE_HPA_STRING 109 +#define SCE_HPA_CHARACTER 110 +#define SCE_HPA_WORD 111 +#define SCE_HPA_TRIPLE 112 +#define SCE_HPA_TRIPLEDOUBLE 113 +#define SCE_HPA_CLASSNAME 114 +#define SCE_HPA_DEFNAME 115 +#define SCE_HPA_OPERATOR 116 +#define SCE_HPA_IDENTIFIER 117 +#define SCE_HPHP_DEFAULT 118 +#define SCE_HPHP_HSTRING 119 +#define SCE_HPHP_SIMPLESTRING 120 +#define SCE_HPHP_WORD 121 +#define SCE_HPHP_NUMBER 122 +#define SCE_HPHP_VARIABLE 123 +#define SCE_HPHP_COMMENT 124 +#define SCE_HPHP_COMMENTLINE 125 +#define SCE_HPHP_STRINGEOL 126 #define SCE_PL_DEFAULT 0 #define SCE_PL_HERE 1 #define SCE_PL_COMMENTLINE 2 @@ -130,5 +174,31 @@ #define SCE_PL_LONGQUOTE 19 #define SCE_PL_BACKTICKS 20 #define SCE_PL_DATASECTION 21 - +#define SCE_L_DEFAULT 0 +#define SCE_L_COMMAND 1 +#define SCE_L_TAG 2 +#define SCE_L_MATH 3 +#define SCE_L_COMMENT 4 +#define SCE_LUA_DEFAULT 0 +#define SCE_LUA_COMMENT 1 +#define SCE_LUA_COMMENTLINE 2 +#define SCE_LUA_COMMENTDOC 3 +#define SCE_LUA_NUMBER 4 +#define SCE_LUA_WORD 5 +#define SCE_LUA_STRING 6 +#define SCE_LUA_CHARACTER 7 +#define SCE_LUA_LITERALSTRING 8 +#define SCE_LUA_PREPROCESSOR 9 +#define SCE_LUA_OPERATOR 10 +#define SCE_LUA_IDENTIFIER 11 +#define SCE_LUA_STRINGEOL 12 +#define SCE_ERR_DEFAULT 0 +#define SCE_ERR_PYTHON 1 +#define SCE_ERR_GCC 2 +#define SCE_ERR_MS 3 +#define SCE_ERR_CMD 4 +#define SCE_ERR_BORLAND 5 +#define SCE_ERR_PERL 6 +//--Autogenerated -- end of section automatically generated from Scintilla.iface + #endif diff --git a/src/stc/scintilla/include/Scintilla.h b/src/stc/scintilla/include/Scintilla.h index 07572168dc..ca81d135bd 100644 --- a/src/stc/scintilla/include/Scintilla.h +++ b/src/stc/scintilla/include/Scintilla.h @@ -3,117 +3,74 @@ // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + #ifndef SCINTILLA_H #define SCINTILLA_H // Compile-time configuration options #define MACRO_SUPPORT 1 // Comment out to remove macro hooks -#if PLAT_GTK -#include -#include - -#ifdef __cplusplus -extern "C" { +#if PLAT_WIN +#ifdef STATIC_BUILD +void Scintilla_RegisterClasses(HINSTANCE hInstance); +#endif #endif -#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) -#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAS T (klass, scintilla_get_type (), ScintillaClass) -#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) +typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wParam, long lParam); - typedef struct _ScintillaObject ScintillaObject; - typedef struct _ScintillaClass ScintillaClass; - - struct _ScintillaObject - { - GtkFixed vbox; - void *pscin; - }; - - struct _ScintillaClass - { - GtkFixedClass parent_class; - - void (* command) (ScintillaObject *ttt); - void (* notify) (ScintillaObject *ttt); - }; - - guint scintilla_get_type (void); - GtkWidget* scintilla_new (void); - void scintilla_set_id (ScintillaObject *sci,int id); - long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam); - -#include "WinDefs.h" - -#ifdef __cplusplus -} -#endif - -#endif - -#if PLAT_WX -#include "WinDefs.h" -#endif - -// Both GTK and Windows - -#define INVALID_POSITION -1 - -// Define start of Scintilla messages to be greater than all edit (EM_*) messages -// as many EM_ messages can be used. +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define INVALID_POSITION -1 #define SCI_START 2000 #define SCI_OPTIONAL_START 3000 #define SCI_LEXER_START 4000 - -#define SCI_ADDTEXT SCI_START + 1 -#define SCI_ADDSTYLEDTEXT SCI_START + 2 -#define SCI_INSERTTEXT SCI_START + 3 -#define SCI_CLEARALL SCI_START + 4 -#define SCI_GETLENGTH SCI_START + 6 -#define SCI_GETCHARAT SCI_START + 7 -#define SCI_GETCURRENTPOS SCI_START + 8 -#define SCI_GETANCHOR SCI_START + 9 -#define SCI_GETSTYLEAT SCI_START + 10 - -#define SCI_REDO SCI_START + 11 -#define SCI_SETUNDOCOLLECTION SCI_START + 12 -#define SCI_SELECTALL SCI_START + 13 -#define SCI_SETSAVEPOINT SCI_START + 14 -#define SCI_GETSTYLEDTEXT SCI_START + 15 -#define SCI_CANREDO SCI_START + 16 -#define SCI_MARKERLINEFROMHANDLE SCI_START + 17 -#define SCI_MARKERDELETEHANDLE SCI_START + 18 - -#define SC_UNDOCOLLECT_NONE 0 -#define SC_UNDOCOLLECT_AUTOSTART 1 - -#define SCI_GETVIEWWS SCI_START + 20 -#define SCI_SETVIEWWS SCI_START + 21 -#define SCI_CHANGEPOSITION SCI_START + 22 -#define SCI_GOTOLINE SCI_START + 24 -#define SCI_GOTOPOS SCI_START + 25 -#define SCI_SETANCHOR SCI_START + 26 -#define SCI_GETCURLINE SCI_START + 27 -#define SCI_GETENDSTYLED SCI_START + 28 -#define SCI_CONVERTEOLS SCI_START + 29 - -#define SCI_GETEOLMODE SCI_START + 30 -#define SCI_SETEOLMODE SCI_START + 31 - +#define SCI_ADDTEXT 2001 +#define SCI_ADDSTYLEDTEXT 2002 +#define SCI_INSERTTEXT 2003 +#define SCI_CLEARALL 2004 +#define SCI_CLEARDOCUMENTSTYLE 2005 +#define SCI_GETLENGTH 2006 +#define SCI_GETCHARAT 2007 +#define SCI_GETCURRENTPOS 2008 +#define SCI_GETANCHOR 2009 +#define SCI_GETSTYLEAT 2010 +#define SCI_REDO 2011 +#define SCI_SETUNDOCOLLECTION 2012 +#define SCI_SELECTALL 2013 +#define SCI_SETSAVEPOINT 2014 +#define SCI_GETSTYLEDTEXT 2015 +#define SCI_CANREDO 2016 +#define SCI_MARKERLINEFROMHANDLE 2017 +#define SCI_MARKERDELETEHANDLE 2018 +#define SCI_GETUNDOCOLLECTION 2019 +#define SCWS_INVISIBLE 0 +#define SCWS_VISIBLEALWAYS 1 +#define SCWS_VISIBLEAFTERINDENT 2 +#define SCI_GETVIEWWS 2020 +#define SCI_SETVIEWWS 2021 +#define SCI_POSITIONFROMPOINT 2022 +#define SCI_GOTOLINE 2024 +#define SCI_GOTOPOS 2025 +#define SCI_SETANCHOR 2026 +#define SCI_GETCURLINE 2027 +#define SCI_GETENDSTYLED 2028 +#define SCI_CONVERTEOLS 2029 #define SC_EOL_CRLF 0 #define SC_EOL_CR 1 #define SC_EOL_LF 2 - -#define SCI_STARTSTYLING SCI_START + 32 -#define SCI_SETSTYLING SCI_START + 33 - -#define SCI_SETBUFFEREDDRAW SCI_START + 35 -#define SCI_SETTABWIDTH SCI_START + 36 -#define SCI_SETCODEPAGE SCI_START + 37 -#define SCI_SETUSEPALETTE SCI_START + 39 - +#define SCI_GETEOLMODE 2030 +#define SCI_SETEOLMODE 2031 +#define SCI_STARTSTYLING 2032 +#define SCI_SETSTYLING 2033 +#define SCI_GETBUFFEREDDRAW 2034 +#define SCI_SETBUFFEREDDRAW 2035 +#define SCI_SETTABWIDTH 2036 +#define SCI_GETTABWIDTH 2121 +#define SC_CP_UTF8 65001 +#define SCI_SETCODEPAGE 2037 +#define SCI_SETUSEPALETTE 2039 #define MARKER_MAX 31 - #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 #define SC_MARK_ARROW 2 @@ -123,217 +80,296 @@ extern "C" { #define SC_MARK_ARROWDOWN 6 #define SC_MARK_MINUS 7 #define SC_MARK_PLUS 8 - -#define SCI_MARKERDEFINE SCI_START + 40 -#define SCI_MARKERSETFORE SCI_START + 41 -#define SCI_MARKERSETBACK SCI_START + 42 -#define SCI_MARKERADD SCI_START + 43 -#define SCI_MARKERDELETE SCI_START + 44 -#define SCI_MARKERDELETEALL SCI_START + 45 -#define SCI_MARKERGET SCI_START + 46 -#define SCI_MARKERNEXT SCI_START + 47 -#define SCI_MARKERPREVIOUS SCI_START + 48 - #define SC_MARKNUM_FOLDER 30 #define SC_MARKNUM_FOLDEROPEN 31 - -#define SC_MASK_FOLDERS ((1< start a category +## fun -> a function +## get -> a property get function +## set -> a property set function +## val -> definition of a constant +## evt -> an event +## All other feature names should be ignored. They may be defined in the future. +## A property may have a set function, a get function or both. Each will have +## "Get" or "Set" in their names and the corresponding name will have the obvious switch. +## A property may be subscripted, in which case the first parameter is the subscript. +## fun, get, and set features have a strict syntax: +## [=,) +## param is [=] +## Additional white space is allowed between elements. +## The syntax for evt is [=[,]*]) +## Feature names that contain an underscore are defined by Windows, so in these +## cases, using the Windows definition is preferred where available. + +## Types: +## void +## int +## bool -> integer, 1=true, 0=false +## position -> integer position in a document +## colour -> colour integer containing red, green and blue bytes. +## string -> pointer to const character +## stringresult -> pointer to character +## cells -> pointer to array of cells, each cell containing a style byte and character byte +## charrange -> range of a min and a max position +## charrangeresult -> like charrange, but output param +## textrange -> charrange + output string +## findtext -> searchrange, text -> foundposition +## findtextex -> searchrange +## keymod -> integer containing key in low half and modifiers in high half +## countedstring +## formatrange +## point -> x,y +## pointresult -> like point, but output param +## rectangle -> left,top,right,bottom +## Client code should ignore definitions containing types it does not understand, except +## for possibly #defining the constants + +cat Basics + +################################################ +## For Scintilla.h +val INVALID_POSITION=-1 +## Define start of Scintilla messages to be greater than all edit (EM_*) messages +## as many EM_ messages can be used although that use is deprecated. +val SCI_START=2000 +val SCI_OPTIONAL_START=3000 +val SCI_LEXER_START=4000 + +# Add text to the document +fun void AddText=2001(int length, string text) + +# Add array of cells to document +fun void AddStyledText=2002(int length, cells c) + +# Insert string at a position +fun void InsertText=2003(position pos, string text) + +# Delete all text in the document +fun void ClearAll=2004(,) + +# Set all style bytes to 0, remove all folding information +fun void ClearDocumentStyle=2005(,) + +# The number of characters in the document +get int GetLength=2006(,) + +# Returns the character byte at the position +get int GetCharAt=2007(position pos,) + +# Returns the position of the caret +get position GetCurrentPos=2008(,) + +# Returns the position of the opposite end of the selection to the caret +get position GetAnchor=2009(,) + +# Returns the style byte at the position +get int GetStyleAt=2010(position pos,) + +# Redoes the next action on the undo history +fun void Redo=2011(,) + +# Choose between collecting actions into the undo +# history and discarding them. +set void SetUndoCollection=2012(bool collectUndo,) + +# Select all the text in the document. +fun void SelectAll=2013(,) + +# Remember the current position in the undo history as the position +# at which the document was saved. +fun void SetSavePoint=2014(,) + +# Retrieve a buffer of cells. +# Returns the number of bytes in the buffer not including terminating nulls. +fun int GetStyledText=2015(, textrange tr) + +# Are there any redoable actions in the undo history. +fun bool CanRedo=2016(,) + +# Retrieve the line number at which a particular marker is located +fun int MarkerLineFromHandle=2017(int handle,) + +# Delete a marker. +fun void MarkerDeleteHandle=2018(int handle,) + +# Is undo history being collected? +get bool GetUndoCollection=2019(,) + +val SCWS_INVISIBLE=0 +val SCWS_VISIBLEALWAYS=1 +val SCWS_VISIBLEAFTERINDENT=2 + +# Are white space characters currently visible? +# Returns one of SCWS_* constants. +get int GetViewWS=2020(,) + +# Make white space characters invisible, always visible or visible outside indentation. +set void SetViewWS=2021(int viewWS,) + +# Find the position from a point within the window. +fun int PositionFromPoint=2022(int x, int y) + +# Set caret to start of a line and ensure it is visible. +fun void GotoLine=2024(int line,) + +# Set caret to a position and ensure it is visible. +fun void GotoPos=2025(position pos,) + +# Set the selection anchor to a position. The anchor is the opposite +# end of the selection from the caret. +set void SetAnchor=2026(position posAnchor,) + +# Retrieve the text of the line containing the caret. +# Returns the index of the caret on the line. +fun int GetCurLine=2027(int length, stringresult text) + +# Retrieve the position of the last correctly styled character. +get position GetEndStyled=2028(,) + +# Convert all line endings in the document to use the current mode. +fun void ConvertEOLs=2029(,) + +val SC_EOL_CRLF=0 +val SC_EOL_CR=1 +val SC_EOL_LF=2 + +# Retrieve the current end of line mode - one of CRLF, CR, or LF. +get int GetEOLMode=2030(,) + +# Set the current end of line mode. +set void SetEOLMode=2031(int eolMode,) + +# Set the current styling position to pos and the styling mask to mask. +# The styling mask can be used to protect some bits in each styling byte from +# modification. +fun void StartStyling=2032(position pos, int mask) + +# Change style from current styling position for length characters to a style +# and move the current styling position to after this newly styled segment. +fun void SetStyling=2033(int length, int style) + +# Is drawing done first into a buffer or direct to the screen. +get bool GetBufferedDraw=2034(,) + +# If drawing is buffered then each line of text is drawn into a bitmap buffer +# before drawing it to the screen to avoid flicker. +set void SetBufferedDraw=2035(bool buffered,) + +# Change the visible size of a tab to be a multiple of the width of a space +# character. +set void SetTabWidth=2036(int tabWidth,) + +# Retrieve the visible size of a tab. +get int GetTabWidth=2121(,) + +# The SC_CP_UTF8 value can be used to enter Unicode mode. +# This is the same value as CP_UTF8 in Windows +val SC_CP_UTF8=65001 + +# Set the code page used to interpret the bytes of the document as characters. +# The SC_CP_UTF8 value can be used to enter Unicode mode. +set void SetCodePage=2037(int codePage,) + +# In palette mode, Scintilla uses the environments palette calls to display +# more colours. This may lead to ugly displays. +set void SetUsePalette=2039(bool usePalette,) + +val MARKER_MAX=31 +val SC_MARK_CIRCLE=0 +val SC_MARK_ROUNDRECT=1 +val SC_MARK_ARROW=2 +val SC_MARK_SMALLRECT=3 +val SC_MARK_SHORTARROW=4 +val SC_MARK_EMPTY=5 +val SC_MARK_ARROWDOWN=6 +val SC_MARK_MINUS=7 +val SC_MARK_PLUS=8 + +val SC_MARKNUM_FOLDER=30 +val SC_MARKNUM_FOLDEROPEN=31 + +# Set the symbol used for a particular marker number. +fun void MarkerDefine=2040(int markerNumber, int markerSymbol) + +# Set the foreground colour used for a particular marker number. +fun void MarkerSetFore=2041(int markerNumber, colour fore) + +# Set the background colour used for a particular marker number. +fun void MarkerSetBack=2042(int markerNumber, colour back) + +# Add a marker to a line. +fun void MarkerAdd=2043(int line, int markerNumber) + +# Delete a marker from a line +fun void MarkerDelete=2044(int line, int markerNumber) + +# Delete all markers with a particular number from all lines +fun void MarkerDeleteAll=2045(int markerNumber,) + +# Get a bit mask of all the markers set on a line. +fun int MarkerGet=2046(int line,) + +# Find the next line after lineStart that includes a marker in mask. +fun int MarkerNext=2047(int lineStart, int markerMask) + +# Find the previous line before lineStart that includes a marker in mask. +fun int MarkerPrevious=2048(int lineStart, int markerMask) + +val SC_MARGIN_SYMBOL=0 +val SC_MARGIN_NUMBER=1 + +# Set a margin to be either numeric or symbolic. +set void SetMarginTypeN=2240(int margin, int marginType) + +# Retrieve the type of a margin. +get int GetMarginTypeN=2241(int margin,) + +# Set the width of a margin to a width expressed in pixels. +set void SetMarginWidthN=2242(int margin, int pixelWidth) + +# Retrieve the width of a margin in pixels. +get int GetMarginWidthN=2243(int margin,) + +# Set a mask that determines which markers are displayed in a margin. +set void SetMarginMaskN=2244(int margin, int mask) + +# Retrieve the marker mask of a margin. +get int GetMarginMaskN=2245(int margin,) + +# Make a margin sensitive or insensitive to mouse clicks. +set void SetMarginSensitiveN=2246(int margin, bool sensitive) + +# Retrieve the mouse click sensitivity of a margin. +get bool GetMarginSensitiveN=2247(int margin,) + +val STYLE_DEFAULT=32 +val STYLE_LINENUMBER=33 +val STYLE_BRACELIGHT=34 +val STYLE_BRACEBAD=35 +val STYLE_CONTROLCHAR=36 +val STYLE_INDENTGUIDE=37 +val STYLE_MAX=127 + +# Character set identifiers are used in StyleSetCharacterSet. +# The values are the same as the Windows *_CHARSET values. +val SC_CHARSET_ANSI=0 +val SC_CHARSET_DEFAULT=1 +val SC_CHARSET_BALTIC=186 +val SC_CHARSET_CHINESEBIG5=136 +val SC_CHARSET_EASTEUROPE=238 +val SC_CHARSET_GB2312=134 +val SC_CHARSET_GREEK=161 +val SC_CHARSET_HANGUL=129 +val SC_CHARSET_MAC=77 +val SC_CHARSET_OEM=255 +val SC_CHARSET_RUSSIAN=204 +val SC_CHARSET_SHIFTJIS=128 +val SC_CHARSET_SYMBOL=2 +val SC_CHARSET_TURKISH=162 +val SC_CHARSET_JOHAB=130 +val SC_CHARSET_HEBREW=177 +val SC_CHARSET_ARABIC=178 +val SC_CHARSET_VIETNAMESE=163 +val SC_CHARSET_THAI=222 + +# Clear all the styles and make equivalent to the global default style. +set void StyleClearAll=2050(,) + +# Set the foreground colour of a style. +set void StyleSetFore=2051(int style, colour fore) + +# Set the background colour of a style. +set void StyleSetBack=2052(int style, colour back) + +# Set a style to be bold or not. +set void StyleSetBold=2053(int style, bool bold) + +# Set a style to be italic or not. +set void StyleSetItalic=2054(int style, bool italic) + +# Set the size of characters of a style. +set void StyleSetSize=2055(int style, int sizePoints) + +# Set the font of a style. +set void StyleSetFont=2056(int style, string fontName) + +# Set a style to have its end of line filled or not. +set void StyleSetEOLFilled=2057(int style, bool filled) + +# Reset the default style to its state at startup +fun void StyleResetDefault=2058(,) + +# Set a style to be underlined or not. +set void StyleSetUnderline=2059(int style, bool underline) + +# Set the character set of the font in a style. +set void StyleSetCharacterSet=2066(int style, int characterSet) + +# Set the foreground colour of the selection and whether to use this setting. +fun void SetSelFore=2067(bool useSetting, colour fore) + +# Set the background colour of the selection and whether to use this setting. +fun void SetSelBack=2068(bool useSetting, colour back) + +# Set the foreground colour of the caret. +set void SetCaretFore=2069(colour fore,) + +# When key+modifier combination km is pressed perform msg. +fun void AssignCmdKey=2070(keymod km, int msg) + +# When key+modifier combination km do nothing. +fun void ClearCmdKey=2071(keymod km,) + +# Drop all key mappings. +fun void ClearAllCmdKeys=2072(,) + +# Set the styles for a segment of the document. +fun void SetStylingEx=2073(int length, string styles) + +# Set a style to be visible or not. +set void StyleSetVisible=2074(int style, bool visible) + +# Get the time in milliseconds that the caret is on and off. +get int GetCaretPeriod=2075(,) + +# Get the time in milliseconds that the caret is on and off. 0 = steady on. +set void SetCaretPeriod=2076(int periodMilliseconds,) + +# Set the set of characters making up words for when moving or selecting +# by word. +set void SetWordChars=2077(, string characters) + +# Start a sequence of actions that is undone and redone as a unit. +# May be nested. +fun void BeginUndoAction=2078(,) + +# End a sequence of actions that is undone and redone as a unit. +fun void EndUndoAction=2079(,) + +val INDIC_MAX=7 +val INDIC_PLAIN=0 +val INDIC_SQUIGGLE=1 +val INDIC_TT=2 +val INDIC_DIAGONAL=3 +val INDIC_STRIKE=4 +val INDIC0_MASK=32 +val INDIC1_MASK=64 +val INDIC2_MASK=128 +##val INDICS_MASK=INDIC0_MASK | INDIC1_MASK | INDIC2_MASK +val INDICS_MASK=32 | 64 | 128 + +# Set an indicator to plain, squiggle or TT. +set void IndicSetStyle=2080(int indic, int style) + +# Retrieve the style of an indicator. +get int IndicGetStyle=2081(int indic,) + +# Set the foreground colour of an indicator. +set void IndicSetFore=2082(int indic, colour fore) + +# Retrieve the foreground colour of an indicator. +get colour IndicGetFore=2083(int indic,) + +# Divide each styling byte into lexical class bits (default:5) and indicator +# bits (default:3). If a lexer requires more than 32 lexical states, then this +# is used to expand the possible states. +set void SetStyleBits=2090(int bits,) + +# Retrieve number of bits in style bytes used to hold the lexical state. +get int GetStyleBits=2091(,) + +# Used to hold extra styling information for each line. +set void SetLineState=2092(int line, int state) + +# Retrieve the extra styling information for a line. +get int GetLineState=2093(int line,) + +# Retrieve the last line number that has line state. +get int GetMaxLineState=2094(,) + +# Display a auto-completion list. +# The lenEntered parameter indicates how many characters before +# the caret should be used to provide context. +fun void AutoCShow=2100(int lenEntered, string itemList) + +# Remove the auto-completion list from the screen. +fun void AutoCCancel=2101(,) + +# Is there an auto-completion list visible? +fun bool AutoCActive=2102(,) + +# Retrieve the position of the caret when the auto-completion list was +# displayed. +fun position AutoCPosStart=2103(,) + +# User has selected an item so remove the list and insert the selection. +fun void AutoCComplete=2104(,) + +# Define a set of character that when typed cancel the auto-completion list. +fun void AutoCStops=2105(, string characterSet) + +# Change the separator character in the string setting up an auto-completion +# list. Default is space but can be changed if items contain space. +set void AutoCSetSeparator=2106(int separatorCharacter,) + +# Retrieve the auto-completion list separator character. +get int AutoCGetSeparator=2107(,) + +# Select the item in the auto-completion list that starts with a string. +fun void AutoCSelect=2108(, string text) + +# Should the auto-completion list be cancelled if the user backspaces to a +# position before where the box was created. +set void AutoCSetCancelAtStart=2110(bool cancel,) + +# Retrieve whether auto-completion cancelled by backspacing before start. +get bool AutoCGetCancelAtStart=2111(,) + +# Define a set of character that when typed fills up the selected word. +set void AutoCSetFillUps=2112(, string characterSet) + +# Should a single item auto-completion list automatically choose the item. +set void AutoCSetChooseSingle=2113(bool chooseSingle,) + +# Retrieve whether a single item auto-completion list automatically choose the item. +get bool AutoCGetChooseSingle=2114(,) + +# Set whether case is significant when performing auto-completion searches. +set void AutoCSetIgnoreCase=2115(bool ignoreCase,) + +# Retrieve state of ignore case flag. +get bool AutoCGetIgnoreCase=2116(,) + +# Set the number of spaces used for one level of indentation. +set void SetIndent=2122(int indentSize,) + +# Retrieve indentation size. +get int GetIndent=2123(,) + +# Indentation will only use space characters if useTabs is false, otherwise +# it will use a combination of tabs and spaces. +set void SetUseTabs=2124(bool useTabs,) + +# Retrieve whether tabs will be used in indentation. +get bool GetUseTabs=2125(,) + +# Change the indentation of a line to a number of columns. +set void SetLineIndentation=2126(int line, int indentSize) + +# Retrieve the number of columns that a line is indented. +get int GetLineIndentation=2127(int line,) + +# Retrieve the position before the first non indentation character on a line. +get position GetLineIndentPosition=2128(int line,) + +# Retrieve the column number of a position, taking tab width into account. +get int GetColumn=2129(position pos,) + +# Show or hide the horizontal scroll bar. +set void SetHScrollBar=2130(bool show,) + +# Is the horizontal scroll bar visible? +get bool GetHScrollBar=2131(,) + +# Show or hide indentation guides. +set void SetIndentationGuides=2132(bool show,) + +# Are the indentation guides visible? +get bool GetIndentationGuides=2133(,) + +# Set the highlighted indentation guide column. +# 0 = no highlighted guide. +set void SetHighlightGuide=2134(int column,) + +# Get the highlighted indentation guide column. +get int GetHighlightGuide=2135(,) + +# Get the position after the last visible characters on a line. +get int GetLineEndPosition=2136(int line,) + +# Get the code page used to interpret the bytes of the document as characters. +get int GetCodePage=2137(,) + +# Get the foreground colour of the caret. +get colour GetCaretFore=2138(,) + +# In palette mode? +get bool GetUsePalette=2139(,) + +# In read-only mode? +get bool GetReadOnly=2140(,) + +# Sets the position of the caret. +set void SetCurrentPos=2141(position pos,) + +# Sets the position that starts the selection - this becomes the anchor. +set void SetSelectionStart=2142(position pos,) + +# Returns the position at the start of the selection. +get position GetSelectionStart=2143(,) + +# Sets the position that ends the selection - this becomes the currentPosition. +set void SetSelectionEnd=2144(position pos,) + +# Returns the position at the end of the selection. +get position GetSelectionEnd=2145(,) + +# Sets the print magnification added to the point size of each style for printing. +set void SetPrintMagnification=2146(int magnification,) + +# Returns the print magnification. +get int GetPrintMagnification=2147(,) + +# PrintColourMode - use same colours as screen. +val SC_PRINT_NORMAL=0 +# PrintColourMode - invert the light value of each style for printing. +val SC_PRINT_INVERTLIGHT=1 +# PrintColourMode - force black text on white background for printing. +val SC_PRINT_BLACKONWHITE=2 + +# Modify colours when printing for clearer printed text. +set void SetPrintColourMode=2148(int mode,) + +# Returns the print colour mode. +get int GetPrintColourMode=2149(,) + +val SCFIND_DOWN=1 +val SCFIND_WHOLEWORD=2 +val SCFIND_MATCHCASE=4 +val SCFIND_WORDSTART=0x00100000 +# SCFIND_REGEXP is not yet implemented. +val SCFIND_REGEXP=0x00200000 + +# Find some text in the document. +fun position FindText=2150(int flags, findtext ft) + +# On Windows will draw the document into a display context such as a printer. +fun void FormatRange=2151(bool draw, formatrange fr) + +# Retrieve the line at the top of the display. +get int GetFirstVisibleLine=2152(,) + +# Retrieve the contents of a line. +# Returns the length of the line. +fun int GetLine=2153(int line, stringresult text) + +# Returns the number of lines in the document. There is always at least one. +get int GetLineCount=2154(,) + +# Sets the size in pixels of the left margin. +set void SetMarginLeft=2155(, int width) + +# Returns the size in pixels of the left margin. +get int GetMarginLeft=2156(,) + +# Sets the size in pixels of the right margin. +set void SetMarginRight=2157(, int width) + +# Returns the size in pixels of the right margin. +get int GetMarginRight=2158(,) + +# Is the document different from when it was last saved? +get bool GetModify=2159(,) + +# Select a range of text. +fun void SetSel=2160(position start, position end) + +# Retrieve the selected text. +# Return the length of the text. +fun int GetSelText=2161(,stringresult text) + +# Retrieve a range of text. +# Return the length of the text. +fun int GetTextRange=2162(, textrange tr) + +# Draw the selection in normal style or with selection highlighted. +fun void HideSelection=2163(bool normal,) + +# Retrieve the x value of the point in the window where a position is displayed. +fun int PointXFromPosition=2164(, position pos) + +# Retrieve the y value of the point in the window where a position is displayed. +fun int PointYFromPosition=2165(, position pos) + +# Retrieve the line containing a position. +fun int LineFromPosition=2166(position pos,) + +# Retrieve the position at the start of a line. +fun int PositionFromLine=2167(int line,) + +# Scroll horizontally and vertically. +fun void LineScroll=2168(int columns, int lines) + +# Ensure the caret is visible. +fun void ScrollCaret=2169(,) + +# Replace the selected text with the argument text. +fun void ReplaceSel=2170(, string text) + +# Set to read only or read write. +set void SetReadOnly=2171(bool readOnly,) + +# Null operation. +fun void Null=2172(,) + +# Will a paste succeed? +fun bool CanPaste=2173(,) + +# Are there any undoable actions in the undo history. +fun bool CanUndo=2174(,) + +# Delete the undo history. +fun void EmptyUndoBuffer=2175(,) + +# Undo one action in the undo history. +fun void Undo=2176(,) + +# Cut the selection to the clipboard. +fun void Cut=2177(,) + +# Copy the selection to the clipboard. +fun void Copy=2178(,) + +# Paste the contents of the clipboard into the document replacing the selection. +fun void Paste=2179(,) + +# Clear the selection. +fun void Clear=2180(,) + +# Replace the contents of the document with the argument text. +fun void SetText=2181(, string text) + +# Retrieve all the text in the document. +# Returns number of characters retrieved. +fun int GetText=2182(int length, stringresult text) + +# Retrieve the number of characters in the document. +get int GetTextLength=2183(,) + +# Retrieve a pointer to a function that processes messages for this Scintilla. +get int GetDirectFunction=2184(,) + +# Retrieve a pointer value to use as the first argument when calling +# the function returned by GetDirectFunction. +get int GetDirectPointer=2185(,) + +# Set to overtype (true) or insert mode +set void SetOvertype=2186(bool overtype,) + +# Returns true if overtype mode is active otherwise false is returned. +get bool GetOvertype=2187(,) + +# Show a call tip containing a definition near position pos. +fun void CallTipShow=2200(position pos, string definition) + +# Remove the call tip from the screen. +fun void CallTipCancel=2201(,) + +# Is there an active call tip? +fun bool CallTipActive=2202(,) + +# Retrieve the position where the caret was before displaying the call tip. +fun position CallTipPosStart=2203(,) + +# Highlight a segment of the definition. +fun void CallTipSetHlt=2204(int start, int end) + +# Set the background colour for the call tip. +set void CallTipSetBack=2205(colour back,) + +# Find the display line of a document line taking hidden lines into account. +fun int VisibleFromDocLine=2220(int line,) + +# Find the document line of a display line taking hidden lines into account. +fun int DocLineFromVisible=2221(int lineDisplay,) + +val SC_FOLDLEVELBASE=0x400 +val SC_FOLDLEVELWHITEFLAG=0x1000 +val SC_FOLDLEVELHEADERFLAG=0x2000 +val SC_FOLDLEVELNUMBERMASK=0x0FFF + +# Set the fold level of a line. +# This encodes an integer level along with flags indicating whether the +# line is a header and whether it is effectively white space. +set void SetFoldLevel=2222(int line, int level) + +# Retrieve the fold level of a line. +get int GetFoldLevel=2223(int line,) + +# Find the last child line of a header line. +get int GetLastChild=2224(int line, int level) + +# Find the parent line of a child line. +get int GetFoldParent=2225(int line,) + +# Make a range of lines visible. +fun void ShowLines=2226(int lineStart, int lineEnd) + +# Make a range of lines invisible. +fun void HideLines=2227(int lineStart, int lineEnd) + +# Is a line visible? +get bool GetLineVisible=2228(int line,) + +# Show the children of a header line. +set void SetFoldExpanded=2229(int line, bool expanded) + +# Is a header line expanded? +get bool GetFoldExpanded=2230(int line,) + +# Switch a header line between expanded and contracted. +fun void ToggleFold=2231(int line,) + +# Ensure a particular line is visible by expanding any header line hiding it. +fun void EnsureVisible=2232(int line,) + +# Set some debugging options for folding +fun void SetFoldFlags=2233(int flags,) + +## Start of key messages +# Move caret down one line. +fun void LineDown=2300(,) + +# Move caret down one line extending selection to new caret position. +fun void LineDownExtend=2301(,) + +# Move caret up one line. +fun void LineUp=2302(,) + +# Move caret up one line extending selection to new caret position. +fun void LineUpExtend=2303(,) + +# Move caret left one character. +fun void CharLeft=2304(,) + +# Move caret left one character extending selection to new caret position. +fun void CharLeftExtend=2305(,) + +# Move caret right one character. +fun void CharRight=2306(,) + +# Move caret right one character extending selection to new caret position. +fun void CharRightExtend=2307(,) + +# Move caret left one word. +fun void WordLeft=2308(,) + +# Move caret left one word extending selection to new caret position. +fun void WordLeftExtend=2309(,) + +# Move caret right one word. +fun void WordRight=2310(,) + +# Move caret right one word extending selection to new caret position. +fun void WordRightExtend=2311(,) + +# Move caret to first position on line. +fun void Home=2312(,) + +# Move caret to first position on line extending selection to new caret position. +fun void HomeExtend=2313(,) + +# Move caret to last position on line. +fun void LineEnd=2314(,) + +# Move caret to last position on line extending selection to new caret position. +fun void LineEndExtend=2315(,) + +# Move caret to first position in document. +fun void DocumentStart=2316(,) + +# Move caret to first position in document extending selection to new caret position. +fun void DocumentStartExtend=2317(,) + +# Move caret to last position in document. +fun void DocumentEnd=2318(,) + +# Move caret to last position in document extending selection to new caret position. +fun void DocumentEndExtend=2319(,) + +# Move caret one page up. +fun void PageUp=2320(,) + +# Move caret one page up extending selection to new caret position. +fun void PageUpExtend=2321(,) + +# Move caret one page down. +fun void PageDown=2322(,) + +# Move caret one page down extending selection to new caret position. +fun void PageDownExtend=2323(,) + +# Switch from insert to overtype mode or the reverse. +fun void EditToggleOvertype=2324(,) + +# Cancel any modes such as call tip or auto-completion list display. +fun void Cancel=2325(,) + +# Delete the selection or if no selection, the character before the caret. +fun void DeleteBack=2326(,) + +# If selection is empty or all on one line replace the selection with a tab +# character. +# If more than one line selected, indent the lines. +fun void Tab=2327(,) + +# Dedent the selected lines. +fun void BackTab=2328(,) + +# Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +fun void NewLine=2329(,) + +# Insert a Form Feed character. +fun void FormFeed=2330(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +fun void VCHome=2331(,) + +# Like VCHome but extending selection to new caret position. +fun void VCHomeExtend=2332(,) + +# Magnify the displayed text by increasing the sizes by 1 point. +fun void ZoomIn=2333(,) + +# Make the displayed text smaller by decreasing the sizes by 1 point. +fun void ZoomOut=2334(,) + +# Delete the word to the left of the caret. +fun void DelWordLeft=2335(,) + +# Delete the word to the right of the caret. +fun void DelWordRight=2336(,) + +# Cut the line containing the caret. +fun void LineCut=2337(,) + +# Delete the line containing the caret. +fun void LineDelete=2338(,) + +# Switch the current line with the previous. +fun void LineTranspose=2339(,) + +# Transform the selection to lower case. +fun void LowerCase=2340(,) + +# Transform the selection to upper case. +fun void UpperCase=2341(,) + +# Scroll the document down, keeping the caret visible. +fun void LineScrollDown=2342(,) + +# Scroll the document up, keeping the caret visible. +fun void LineScrollUp=2343(,) + +# How many characters are on a line, not including end of line characters. +fun int LineLength=2350(int line,) + +# Highlight the characters at two positions. +fun void BraceHighlight=2351(position pos1,position pos2) + +# Highlight the character at a position indicating there is no matching brace. +fun void BraceBadLight=2352(position pos,) + +# Find the position of a matching brace or INVALID_POSITION if no match. +fun position BraceMatch=2353(position pos,) + +# Are the end of line characters visible. +get bool GetViewEOL=2355(,) + +# Make the end of line characters visible or invisible +set void SetViewEOL=2356(bool visible,) + +# Retrieve a pointer to the document object. +get int GetDocPointer=2357(,) + +# Change the document object used. +set void SetDocPointer=2358(int pointer,) + +# Set which document modification events are sent to the container. +set void SetModEventMask=2359(int mask,) + +val EDGE_NONE=0 +val EDGE_LINE=1 +val EDGE_BACKGROUND=2 + +# Retrieve the column number which text should be kept within. +get int GetEdgeColumn=2360(,) + +# Set the column number of the edge. +# If text goes past the edge then it is highlighted. +set void SetEdgeColumn=2361(int column,) + +# Retrieve the edge highlight mode. +get int GetEdgeMode=2362(,) + +# The edge may be displayed by a line (EDGE_LINE) or by highlighting text that +# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +set void SetEdgeMode=2363(int mode,) + +# Retrieve the colour used in edge indication. +get colour GetEdgeColour=2364(,) + +# Change the colour used in edge indication. +set void SetEdgeColour=2365(colour edgeColour,) + +# Sets the current caret position to be the search anchor. +fun void SearchAnchor=2366(,) + +# Find some text starting at the search anchor. +fun int SearchNext=2367(int flags, string text) + +# Find some text starting at the search anchor and moving backwards. +fun int SearchPrev=2368(int flags, string text) + +# Show caret within N lines of edge when it's scrolled to view +val CARET_SLOP=0x01 +# Center caret on screen when it's scrolled to view +val CARET_CENTER=0x02 +# OR this with CARET_CENTER to reposition even when visible, or +# OR this with CARET_SLOP to reposition whenever outside slop border +val CARET_STRICT=0x04 +# Set the way the line the caret is on is kept visible. +fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop) + +# Retrieves the number of lines completely visible. +get int LinesOnScreen=2370(,) + +# Set whether a pop up menu is displayed automatically when the user presses +# the wrong mouse button. +fun void UsePopUp=2371(bool allowPopUp,) + +# Is the selection a rectangular. The alternative is the more common stream selection. +get bool SelectionIsRectangle=2372(,) + +# Set the zoom level. This number of points is added to the size of all fonts. +# It may be positive to magnify or negative to reduce. +set void SetZoom=2373(int zoom,) +# Retrieve the zoom level. +get int GetZoom=2374(,) + +# Create a new document object. +# Starts with reference count of 1 and not selected into editor. +fun int CreateDocument=2375(,) +# Extend life of document. +fun void AddRefDocument=2376(, int doc) +# Release a reference to the document, deleting document if it fades to black. +fun void ReleaseDocument=2377(, int doc) + +# Get which document modification events are sent to the container. +get int GetModEventMask=2378(,) + +# Set the focus to this Scintilla widget. +# GTK+ Specific +fun void GrabFocus=2400(,) + +# Start notifying the container of all key presses and commands. +fun void StartRecord=3001(,) + +# Stop notifying the container of all key presses and commands. +fun void StopRecord=3002(,) + +# Set the lexing language of the document. +set void SetLexer=4001(int lexer,) + +# Retrieve the lexing language of the document. +get int GetLexer=4002(,) + +# Colourise a segment of the document using the current lexing language. +fun void Colourise=4003(position start, position end) + +# Set up a value that may be used by a lexer for some optional feature. +set void SetProperty=4004(string key, string value) + +# Set up the key words used by the lexer. +set void SetKeyWords=4005(int keywordSet, string keyWords) + +# Notifications +# Type of modification and the action which caused the modification +# These are defined as a bit mask to make it easy to specify which notifications are wanted. +# One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +val SC_MOD_INSERTTEXT=0x1 +val SC_MOD_DELETETEXT=0x2 +val SC_MOD_CHANGESTYLE=0x4 +val SC_MOD_CHANGEFOLD=0x8 +val SC_PERFORMED_USER=0x10 +val SC_PERFORMED_UNDO=0x20 +val SC_PERFORMED_REDO=0x40 +val SC_LASTSTEPINUNDOREDO=0x100 +val SC_MOD_CHANGEMARKER=0x200 +val SC_MOD_BEFOREINSERT=0x400 +val SC_MOD_BEFOREDELETE=0x800 +val SC_MODEVENTMASKALL=0xF77 + +# For compatibility, these go through the COMMAND notification rather than NOTIFY +# and have exactly the same values as the EN_* constants. +val SCEN_CHANGE=768 +val SCEN_SETFOCUS=512 +val SCEN_KILLFOCUS=256 + +# Symbolic key codes and modifier flags +# ASCII and other printable characters below 256 +# Extended keys above 300 + +val SCK_DOWN=300 +val SCK_UP=301 +val SCK_LEFT=302 +val SCK_RIGHT=303 +val SCK_HOME=304 +val SCK_END=305 +val SCK_PRIOR=306 +val SCK_NEXT=307 +val SCK_DELETE=308 +val SCK_INSERT=309 +val SCK_ESCAPE=7 +val SCK_BACK=8 +val SCK_TAB=9 +val SCK_RETURN=13 +val SCK_ADD=310 +val SCK_SUBTRACT=311 +val SCK_DIVIDE=312 + +val SCMOD_SHIFT=1 +val SCMOD_CTRL=2 +val SCMOD_ALT=4 + +################################################ +# For SciLexer.h +val SCLEX_CONTAINER=0 +val SCLEX_NULL=1 +val SCLEX_PYTHON=2 +val SCLEX_CPP=3 +val SCLEX_HTML=4 +val SCLEX_XML=5 +val SCLEX_PERL=6 +val SCLEX_SQL=7 +val SCLEX_VB=8 +val SCLEX_PROPERTIES=9 +val SCLEX_ERRORLIST=10 +val SCLEX_MAKEFILE=11 +val SCLEX_BATCH=12 +val SCLEX_XCODE=13 +val SCLEX_LATEX=14 +val SCLEX_LUA=15 +val SCLEX_DIFF=16 +# Lexical states for SCLEX_PYTHON +val SCE_P_DEFAULT=0 +val SCE_P_COMMENTLINE=1 +val SCE_P_NUMBER=2 +val SCE_P_STRING=3 +val SCE_P_CHARACTER=4 +val SCE_P_WORD=5 +val SCE_P_TRIPLE=6 +val SCE_P_TRIPLEDOUBLE=7 +val SCE_P_CLASSNAME=8 +val SCE_P_DEFNAME=9 +val SCE_P_OPERATOR=10 +val SCE_P_IDENTIFIER=11 +val SCE_P_COMMENTBLOCK=12 +val SCE_P_STRINGEOL=13 +# Lexical states for SCLEX_CPP, SCLEX_VB +val SCE_C_DEFAULT=0 +val SCE_C_COMMENT=1 +val SCE_C_COMMENTLINE=2 +val SCE_C_COMMENTDOC=3 +val SCE_C_NUMBER=4 +val SCE_C_WORD=5 +val SCE_C_STRING=6 +val SCE_C_CHARACTER=7 +val SCE_C_UUID=8 +val SCE_C_PREPROCESSOR=9 +val SCE_C_OPERATOR=10 +val SCE_C_IDENTIFIER=11 +val SCE_C_STRINGEOL=12 +val SCE_C_VERBATIM=13 +# Lexical states for SCLEX_HTML, SCLEX_XML +val SCE_H_DEFAULT=0 +val SCE_H_TAG=1 +val SCE_H_TAGUNKNOWN=2 +val SCE_H_ATTRIBUTE=3 +val SCE_H_ATTRIBUTEUNKNOWN=4 +val SCE_H_NUMBER=5 +val SCE_H_DOUBLESTRING=6 +val SCE_H_SINGLESTRING=7 +val SCE_H_OTHER=8 +val SCE_H_COMMENT=9 +val SCE_H_ENTITY=10 +# XML and ASP +val SCE_H_TAGEND=11 +val SCE_H_XMLSTART=12 +val SCE_H_XMLEND=13 +val SCE_H_SCRIPT=14 +val SCE_H_ASP=15 +val SCE_H_ASPAT=16 +val SCE_H_CDATA=17 +val SCE_H_QUESTION=18 +# More HTML +val SCE_H_VALUE=19 +# Embedded Javascript +val SCE_HJ_START=40 +val SCE_HJ_DEFAULT=41 +val SCE_HJ_COMMENT=42 +val SCE_HJ_COMMENTLINE=43 +val SCE_HJ_COMMENTDOC=44 +val SCE_HJ_NUMBER=45 +val SCE_HJ_WORD=46 +val SCE_HJ_KEYWORD=47 +val SCE_HJ_DOUBLESTRING=48 +val SCE_HJ_SINGLESTRING=49 +val SCE_HJ_SYMBOLS=50 +val SCE_HJ_STRINGEOL=51 +# ASP Javascript +val SCE_HJA_START=55 +val SCE_HJA_DEFAULT=56 +val SCE_HJA_COMMENT=57 +val SCE_HJA_COMMENTLINE=58 +val SCE_HJA_COMMENTDOC=59 +val SCE_HJA_NUMBER=60 +val SCE_HJA_WORD=61 +val SCE_HJA_KEYWORD=62 +val SCE_HJA_DOUBLESTRING=63 +val SCE_HJA_SINGLESTRING=64 +val SCE_HJA_SYMBOLS=65 +val SCE_HJA_STRINGEOL=66 +# Embedded VBScript +val SCE_HB_START=70 +val SCE_HB_DEFAULT=71 +val SCE_HB_COMMENTLINE=72 +val SCE_HB_NUMBER=73 +val SCE_HB_WORD=74 +val SCE_HB_STRING=75 +val SCE_HB_IDENTIFIER=76 +val SCE_HB_STRINGEOL=77 +# ASP VBScript +val SCE_HBA_START=80 +val SCE_HBA_DEFAULT=81 +val SCE_HBA_COMMENTLINE=82 +val SCE_HBA_NUMBER=83 +val SCE_HBA_WORD=84 +val SCE_HBA_STRING=85 +val SCE_HBA_IDENTIFIER=86 +val SCE_HBA_STRINGEOL=87 +# Embedded Python +val SCE_HP_START=90 +val SCE_HP_DEFAULT=91 +val SCE_HP_COMMENTLINE=92 +val SCE_HP_NUMBER=93 +val SCE_HP_STRING=94 +val SCE_HP_CHARACTER=95 +val SCE_HP_WORD=96 +val SCE_HP_TRIPLE=97 +val SCE_HP_TRIPLEDOUBLE=98 +val SCE_HP_CLASSNAME=99 +val SCE_HP_DEFNAME=100 +val SCE_HP_OPERATOR=101 +val SCE_HP_IDENTIFIER=102 +# ASP Python +val SCE_HPA_START=105 +val SCE_HPA_DEFAULT=106 +val SCE_HPA_COMMENTLINE=107 +val SCE_HPA_NUMBER=108 +val SCE_HPA_STRING=109 +val SCE_HPA_CHARACTER=110 +val SCE_HPA_WORD=111 +val SCE_HPA_TRIPLE=112 +val SCE_HPA_TRIPLEDOUBLE=113 +val SCE_HPA_CLASSNAME=114 +val SCE_HPA_DEFNAME=115 +val SCE_HPA_OPERATOR=116 +val SCE_HPA_IDENTIFIER=117 +# PHP +val SCE_HPHP_DEFAULT=118 +val SCE_HPHP_HSTRING=119 +val SCE_HPHP_SIMPLESTRING=120 +val SCE_HPHP_WORD=121 +val SCE_HPHP_NUMBER=122 +val SCE_HPHP_VARIABLE=123 +val SCE_HPHP_COMMENT=124 +val SCE_HPHP_COMMENTLINE=125 +val SCE_HPHP_STRINGEOL=126 +# Lexical states for SCLEX_PERL +val SCE_PL_DEFAULT=0 +val SCE_PL_HERE=1 +val SCE_PL_COMMENTLINE=2 +val SCE_PL_POD=3 +val SCE_PL_NUMBER=4 +val SCE_PL_WORD=5 +val SCE_PL_STRING=6 +val SCE_PL_CHARACTER=7 +val SCE_PL_PUNCTUATION=8 +val SCE_PL_PREPROCESSOR=9 +val SCE_PL_OPERATOR=10 +val SCE_PL_IDENTIFIER=11 +val SCE_PL_SCALAR=12 +val SCE_PL_ARRAY=13 +val SCE_PL_HASH=14 +val SCE_PL_SYMBOLTABLE=15 +val SCE_PL_REF=16 +val SCE_PL_REGEX=17 +val SCE_PL_REGSUBST=18 +val SCE_PL_LONGQUOTE=19 +val SCE_PL_BACKTICKS=20 +val SCE_PL_DATASECTION=21 +# Lexical states for SCLEX_LATEX +val SCE_L_DEFAULT=0 +val SCE_L_COMMAND=1 +val SCE_L_TAG=2 +val SCE_L_MATH=3 +val SCE_L_COMMENT=4 +# Lexical states for SCLEX_LUA +val SCE_LUA_DEFAULT=0 +val SCE_LUA_COMMENT=1 +val SCE_LUA_COMMENTLINE=2 +val SCE_LUA_COMMENTDOC=3 +val SCE_LUA_NUMBER=4 +val SCE_LUA_WORD=5 +val SCE_LUA_STRING=6 +val SCE_LUA_CHARACTER=7 +val SCE_LUA_LITERALSTRING=8 +val SCE_LUA_PREPROCESSOR=9 +val SCE_LUA_OPERATOR=10 +val SCE_LUA_IDENTIFIER=11 +val SCE_LUA_STRINGEOL=12 +val SCE_ERR_DEFAULT=0 +val SCE_ERR_PYTHON=1 +val SCE_ERR_GCC=2 +val SCE_ERR_MS=3 +val SCE_ERR_CMD=4 +val SCE_ERR_BORLAND=5 +val SCE_ERR_PERL=6 + +# Events + +evt void StyleNeeded=2000(int position) +evt void CharAdded=2001(int ch) +evt void SavePointReached=2002(void) +evt void SavePointLeft=2003(void) +evt void ModifyAttemptRO=2004(void) +# GTK+ Specific to work around focus and accelerator problems: +evt void Key=2005(int ch, int modifiers) +evt void DoubleClick=2006(void) +evt void UpdateUI=2007(void) +# The old name for SCN_UPDATEUI +val SCN_CHECKBRACE=2007 +evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) +# Optional module for macro recording +evt void MacroRecord=2009(int message, int wParam, int lParam) +evt void MarginClick=2010(int modifiers, int position, int margin) +evt void NeedShown=2011(int position, int length) +evt void PosChanged=2012(int position) + +cat Deprecated + +################################################ +# From WinDefs.h + +# ***** DEPRECATED from here to end of file ****** + +# Will a paste succeed? +fun bool EM_CanPaste=1074(,) + +# Are there any undoable actions in the undo history. +fun bool EM_CanUndo=198(,) + +# Find the position and line from a point within the window. +fun int EM_CharFromPos=215(,point pt) + +# Delete the undo history. +fun void EM_EmptyUndoBuffer=205(,) + +# Retrieve the selection range. +fun void EM_ExGetSel=1076(,charrangeresult cr) + +# Retrieve the line number of a position in the document. +get int EM_ExLineFromChar=1078(,position pos) + +# Select a range of text. +fun void EM_ExSetSel=1079(,charrange cr) + +# Find some text in the document. +fun position EM_FindText=1080(int flags, findtext ft) + +# Find some text in the document. Returns range of found text in ft argument. +fun position EM_FindTextEx=1103(int flags, findtextex ft) + +# On Windows will draw the document into a display context such as a printer. +fun void EM_FormatRange=1081(bool draw, formatrange fr) + +# Retrieve the line at the top of the display. +get int EM_GetFirstVisibleLine=206(,) + +# Retrieve the contents of a line. +# Returns the length of the line. +fun int EM_GetLine=196(int line, countedstring text) + +# Returns the number of lines in the document. There is always at least one. +fun int EM_GetLineCount=186(,) + +# Returns the size in pixels of left and right margins packed into one integer. +# The left margin is in the low half and the right margin in the high half. +fun int EM_GetMargins=212(,) + +# Is the document different from when it was last saved? +get bool EM_GetModify=184(,) + +# Get the area used to display the document. +fun void EM_GetRect=178(,rectangle r) + +# Return the selection packed into one integer with the start of the selection +# in the low half and the end in the high half. +fun int EM_GetSel=176(,) + +# Retrieve the selected text. +# Return the length of the text. +fun int EM_GetSelText=1086(,stringresult text) + +# Retrieve a range of text. +# Return the length of the text. +fun int EM_GetTextRange=1099(, textrange tr) + +# Draw the selection in normal style or with selection highlighted. +fun void EM_HideSelection=1087(bool normal,) + +# Retrieve the line of a position. +fun int EM_LineFromChar=201(position pos,) + +# Retrieve the position at the start of a line. +fun position EM_LineIndex=187(int line,) + +# Retrieve the number of characters on a line not including end of line characters. +fun int EM_LineLength=193(int line,) + +# Scroll horizontally and vertically. +fun void EM_LineScroll=182(int columns, int lines) + +# Retrieve the point in the window where a position is displayed. +fun void EM_PosFromChar=214(pointresult pt, position pos) + +# Replace the selected text with the argument text. +fun void EM_ReplaceSel=194(, string text) + +# Ensure the caret is visible. +fun void EM_ScrollCaret=183(,) + +# Returns SEL_EMPTY if selection contains no characters, otherwise SEL_TEXT. +fun void EM_SelectionType=1090(,) + +# Set the width of the left and right margins +fun void EM_SetMargins=211(int flags, int values) + +# Set to read only or read write. +set void EM_SetReadOnly=207(bool readOnly,) + +# Select the range of text from start to end. +fun void EM_SetSel=177(position start, position end) + +# Undo one action in the undo history. +fun void EM_Undo=199(,) + +# Null operation. +fun void WM_Null=0(,) + +# Clear the selection. +fun void WM_Clear=771(,) + +fun void WM_Command=273(,) + +# Copy the selection to the clipboard. +fun void WM_Copy=769(,) + +# Cut the selection to the clipboard. +fun void WM_Cut=768(,) + +# Retrieve all the text in the document. +# Returns number of characters retrieved. +fun int WM_GetText=13(int length, stringresult text) + +# Retrieve the number of characters in the document. +fun int WM_GetTextLength=14(,) + +# Notification back to container +fun void WM_Notify=78(int id, int stuff) + +# Paste the contents of the clipboard into the document replacing the selection. +fun void WM_Paste=770(,) + +# Replace the contents of the document with the argument text. +fun void WM_SetText=12(, string text) + +# Undo one action in the undo history. +fun void WM_Undo=772(,) + +# Notification codes +val EN_CHANGE=768 +val EN_KILLFOCUS=512 +val EN_SETFOCUS=256 + +# Flags for setting margins. +val EC_LEFTMARGIN=1 +val EC_RIGHTMARGIN=2 +val EC_USEFONTINFO=0xffff + +# Selection type. +val SEL_EMPTY=0 +val SEL_TEXT=1 + +# Find replace mask constants +val FR_MATCHCASE=0x4 +val FR_WHOLEWORD=0x2 +val FR_DOWN=0x1 + +# Key modifier flag. +val SHIFT_PRESSED=1 +val LEFT_CTRL_PRESSED=2 +val LEFT_ALT_PRESSED=4 + +#events +evt void EN_Change=768(void) diff --git a/src/stc/scintilla/include/ScintillaWidget.h b/src/stc/scintilla/include/ScintillaWidget.h new file mode 100644 index 0000000000..980557a2e7 --- /dev/null +++ b/src/stc/scintilla/include/ScintillaWidget.h @@ -0,0 +1,46 @@ +// Scintilla source code edit control +// ScintillaWidget.h - definition of Scintilla widget for GTK+ +// Only needed by GTK+ code but is harmless on other platforms. +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SCINTILLAWIDGET_H +#define SCINTILLAWIDGET_H + +#if PLAT_GTK + +#ifdef __cplusplus +extern "C" { +#endif + +#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) +#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) +#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) + +typedef struct _ScintillaObject ScintillaObject; +typedef struct _ScintillaClass ScintillaClass; + +struct _ScintillaObject { + GtkFixed vbox; + void *pscin; +}; + +struct _ScintillaClass { + GtkFixedClass parent_class; + + void (* command) (ScintillaObject *ttt); + void (* notify) (ScintillaObject *ttt); +}; + +guint scintilla_get_type (void); +GtkWidget* scintilla_new (void); +void scintilla_set_id (ScintillaObject *sci,int id); +long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam); + +#ifdef __cplusplus +} +#endif + +#endif + +#endif diff --git a/src/stc/scintilla/include/WinDefs.h b/src/stc/scintilla/include/WinDefs.h index 0b125e7313..c56f02d810 100644 --- a/src/stc/scintilla/include/WinDefs.h +++ b/src/stc/scintilla/include/WinDefs.h @@ -16,93 +16,47 @@ #define LPSTR char * #define LONG long +//#if 0 /* RTF control */ #define EM_CANPASTE (1074) #define EM_CANUNDO (198) #define EM_CHARFROMPOS (215) -#define EM_DISPLAYBAND (1075) #define EM_EMPTYUNDOBUFFER (205) #define EM_EXGETSEL (1076) -#define EM_EXLIMITTEXT (1077) #define EM_EXLINEFROMCHAR (1078) #define EM_EXSETSEL (1079) #define EM_FINDTEXT (1080) #define EM_FINDTEXTEX (1103) -#define EM_FINDWORDBREAK (1100) -#define EM_FMTLINES (200) #define EM_FORMATRANGE (1081) -#define EM_GETCHARFORMAT (1082) -#define EM_GETEVENTMASK (1083) #define EM_GETFIRSTVISIBLELINE (206) -#define EM_GETHANDLE (189) -#define EM_GETLIMITTEXT (213) #define EM_GETLINE (196) #define EM_GETLINECOUNT (186) #define EM_GETMARGINS (212) #define EM_GETMODIFY (184) -#define EM_GETIMECOLOR (1129) -#define EM_GETIMEOPTIONS (1131) -#define EM_GETOPTIONS (1102) -#define EM_GETOLEINTERFACE (1084) -#define EM_GETPARAFORMAT (1085) -#define EM_GETPASSWORDCHAR (210) -#define EM_GETPUNCTUATION (1125) #define EM_GETRECT (178) #define EM_GETSEL (176) #define EM_GETSELTEXT (1086) #define EM_GETTEXTRANGE (1099) -#define EM_GETTHUMB (190) -#define EM_GETWORDBREAKPROC (209) -#define EM_GETWORDBREAKPROCEX (1104) -#define EM_GETWORDWRAPMODE (1127) #define EM_HIDESELECTION (1087) -#define EM_LIMITTEXT (197) #define EM_LINEFROMCHAR (201) #define EM_LINEINDEX (187) #define EM_LINELENGTH (193) #define EM_LINESCROLL (182) -#define EM_PASTESPECIAL (1088) #define EM_POSFROMCHAR (214) #define EM_REPLACESEL (194) -#define EM_REQUESTRESIZE (1089) -#define EM_SCROLL (181) #define EM_SCROLLCARET (183) #define EM_SELECTIONTYPE (1090) -#define EM_SETBKGNDCOLOR (1091) -#define EM_SETCHARFORMAT (1092) -#define EM_SETEVENTMASK (1093) -#define EM_SETHANDLE (188) -#define EM_SETIMECOLOR (1128) -#define EM_SETIMEOPTIONS (1130) -#define EM_SETLIMITTEXT (197) #define EM_SETMARGINS (211) -#define EM_SETMODIFY (185) -#define EM_SETOLECALLBACK (1094) -#define EM_SETOPTIONS (1101) -#define EM_SETPARAFORMAT (1095) -#define EM_SETPASSWORDCHAR (204) -#define EM_SETPUNCTUATION (1124) #define EM_SETREADONLY (207) -#define EM_SETRECT (179) -#define EM_SETRECTNP (180) #define EM_SETSEL (177) -#define EM_SETTABSTOPS (203) -#define EM_SETTARGETDEVICE (1096) -#define EM_SETWORDBREAKPROC (208) -#define EM_SETWORDBREAKPROCEX (1105) -#define EM_SETWORDWRAPMODE (1126) -#define EM_STREAMIN (1097) -#define EM_STREAMOUT (1098) #define EM_UNDO (199) #define WM_NULL (0) #define WM_CLEAR (771) -#define WM_COMMAND (273) #define WM_COPY (769) #define WM_CUT (768) #define WM_GETTEXT (13) #define WM_GETTEXTLENGTH (14) -#define WM_NOTIFY (78) #define WM_PASTE (770) #define WM_SETTEXT (12) #define WM_UNDO (772) @@ -115,6 +69,9 @@ #define EC_RIGHTMARGIN 2 #define EC_USEFONTINFO 0xffff +//#endif + +#if 0 #if PLAT_GTK #define VK_DOWN GDK_Down #define VK_UP GDK_Up @@ -132,6 +89,7 @@ #define VK_RETURN GDK_Return #define VK_ADD GDK_KP_Add #define VK_SUBTRACT GDK_KP_Subtract +#define VK_DIVIDE GDK_KP_Divide #endif #if PLAT_WX @@ -151,12 +109,18 @@ #define VK_RETURN WXK_RETURN #define VK_ADD WXK_ADD #define VK_SUBTRACT WXK_SUBTRACT +//TODO: +#define VK_DIVIDE WXK_DIVIDE +#endif + +#define SHIFT_PRESSED 1 +#define LEFT_CTRL_PRESSED 2 +#define LEFT_ALT_PRESSED 4 // Are these needed any more #define LPSTR char * #define LONG long #define LPDWORD (long *) -#endif /* SELCHANGE structure */ #define SEL_EMPTY (0) @@ -165,15 +129,6 @@ #define SEL_MULTICHAR (4) #define SEL_MULTIOBJECT (8) -/* FINDREPLACE structure */ -#define FR_MATCHCASE (0x4) -#define FR_WHOLEWORD (0x2) -#define FR_DOWN (0x1) - -#define SHIFT_PRESSED 1 -#define LEFT_CTRL_PRESSED 2 -#define LEFT_ALT_PRESSED 4 - struct RECT { LONG left; LONG top; @@ -181,6 +136,15 @@ struct RECT { LONG bottom; }; +/* FINDREPLACE structure */ + +#define FR_MATCHCASE (0x4) +#define FR_WHOLEWORD (0x2) +#define FR_DOWN (0x1) + +#endif + +#if 0 struct CHARRANGE { LONG cpMin; LONG cpMax; @@ -210,9 +174,10 @@ struct FORMATRANGE { RECT rcPage; CHARRANGE chrg; }; +#endif -#define MAKELONG(a, b) ((a) | ((b) << 16)) -#define LOWORD(x) (x & 0xffff) -#define HIWORD(x) (x >> 16) +//#define MAKELONG(a, b) ((a) | ((b) << 16)) +//#define LOWORD(x) (x & 0xffff) +//#define HIWORD(x) (x >> 16) #endif diff --git a/src/stc/scintilla/include/WindowAccessor.h b/src/stc/scintilla/include/WindowAccessor.h new file mode 100644 index 0000000000..4f41dfc7ff --- /dev/null +++ b/src/stc/scintilla/include/WindowAccessor.h @@ -0,0 +1,47 @@ +// WindowAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +class WindowAccessor : public Accessor { + // Private so WindowAccessor objects can not be copied + WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {} + WindowAccessor &operator=(const WindowAccessor &) { return *this; } +protected: + WindowID id; + PropSet &props; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + + bool InternalIsLeadByte(char ch); + void Fill(int position); +public: + WindowAccessor(WindowID id_, PropSet &props_) : + Accessor(), id(id_), props(props_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { + } + ~WindowAccessor(); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); +}; diff --git a/src/stc/scintilla/src/Accessor.cxx b/src/stc/scintilla/src/Accessor.cxx deleted file mode 100644 index 57b7e4dc4e..0000000000 --- a/src/stc/scintilla/src/Accessor.cxx +++ /dev/null @@ -1,112 +0,0 @@ -// SciTE - Scintilla based Text Editor -// Accessor.cxx - rapid easy access to contents of a Scintilla -// Copyright 1998-2000 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include - -#include "Platform.h" - -#include "PropSet.h" -#include "Accessor.h" -#include "Scintilla.h" - -void Accessor::Fill(int position) { - if (lenDoc == -1) - lenDoc = Platform::SendScintilla(id, WM_GETTEXTLENGTH, 0, 0); - startPos = position - slopSize; - if (startPos + bufferSize > lenDoc) - startPos = lenDoc - bufferSize; - if (startPos < 0) - startPos = 0; - endPos = startPos + bufferSize; - if (endPos > lenDoc) - endPos = lenDoc; - - TEXTRANGE tr = {{startPos, endPos}, buf}; - Platform::SendScintilla(id, EM_GETTEXTRANGE, 0, reinterpret_cast(&tr)); -} - -char Accessor::StyleAt(int position) { - return static_cast(Platform::SendScintilla( - id, SCI_GETSTYLEAT, position, 0)); -} - -int Accessor::GetLine(int position) { - return Platform::SendScintilla(id, EM_LINEFROMCHAR, position, 0); -} - -int Accessor::LineStart(int line) { - return Platform::SendScintilla(id, EM_LINEINDEX, line, 0); -} - -int Accessor::LevelAt(int line) { - return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0); -} - -int Accessor::Length() { - if (lenDoc == -1) - lenDoc = Platform::SendScintilla(id, WM_GETTEXTLENGTH, 0, 0); - return lenDoc; -} - -int Accessor::GetLineState(int line) { - return Platform::SendScintilla(id, SCI_GETLINESTATE, line); -} - -int Accessor::SetLineState(int line, int state) { - return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state); -} - -void StylingContext::StartAt(unsigned int start, char chMask) { - Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask); -} - -void StylingContext::ColourSegment(unsigned int start, unsigned int end, int chAttr) { - // Only perform styling if non empty range - if (end != start - 1) { - if (end < start) { - Platform::DebugPrintf("Bad colour positions %d - %d\n", start, end); - } - - if (validLen + (end - start + 1) >= bufferSize) - Flush(); - if (validLen + (end - start + 1) >= bufferSize) { - // Too big for buffer so send directly - Platform::SendScintilla(id, SCI_SETSTYLING, end - start + 1, chAttr); - } else { - if (chAttr != chWhile) - chFlags = 0; - chAttr |= chFlags; - for (unsigned int i = start; i <= end; i++) { - styleBuf[validLen++] = chAttr; - } - } - } -} - -void StylingContext::StartSegment(unsigned int pos) { - startSeg = pos; -} - -void StylingContext::ColourTo(unsigned int pos, int chAttr) { - ColourSegment(startSeg, pos, chAttr); - startSeg = pos+1; -} - -int StylingContext::GetLine(int position) { - return Platform::SendScintilla(id, EM_LINEFROMCHAR, position, 0); -} - -void StylingContext::SetLevel(int line, int level) { - Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level); -} - -void StylingContext::Flush() { - if (validLen > 0) { - Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen, - reinterpret_cast(styleBuf)); - validLen = 0; - } -} diff --git a/src/stc/scintilla/src/AutoComplete.cxx b/src/stc/scintilla/src/AutoComplete.cxx index c3ec29c3c9..5bc50d1efa 100644 --- a/src/stc/scintilla/src/AutoComplete.cxx +++ b/src/stc/scintilla/src/AutoComplete.cxx @@ -10,11 +10,16 @@ #include "AutoComplete.h" -AutoComplete::AutoComplete() { - lb = 0; - active = false; - posStart = 0; - strcpy(stopChars, ""); +AutoComplete::AutoComplete() : + active(false), + separator(' '), + ignoreCase(false), + chooseSingle(false), + posStart(0), + startLen(0), + cancelAtStartPos(true) { + stopChars[0] = '\0'; + fillUpChars[0] = '\0'; } AutoComplete::~AutoComplete() { @@ -44,8 +49,24 @@ bool AutoComplete::IsStopChar(char ch) { return ch && strchr(stopChars, ch); } -int AutoComplete::SetList(const char *list) { - int maxStrLen = 12; +void AutoComplete::SetFillUpChars(const char *fillUpChars_) { + strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars)); + fillUpChars[sizeof(fillUpChars) - 1] = '\0'; +} + +bool AutoComplete::IsFillUpChar(char ch) { + return ch && strchr(fillUpChars, ch); +} + +void AutoComplete::SetSeparator(char separator_) { + separator = separator_; +} + +char AutoComplete::GetSeparator() { + return separator; +} + +void AutoComplete::SetList(const char *list) { lb.Clear(); char *words = new char[strlen(list) + 1]; if (words) { @@ -53,21 +74,18 @@ int AutoComplete::SetList(const char *list) { char *startword = words; int i = 0; for (; words && words[i]; i++) { - if (words[i] == ' ') { + if (words[i] == separator) { words[i] = '\0'; lb.Append(startword); - maxStrLen = Platform::Maximum(maxStrLen, strlen(startword)); startword = words + i + 1; } } if (startword) { lb.Append(startword); - maxStrLen = Platform::Maximum(maxStrLen, strlen(startword)); } delete []words; } lb.Sort(); - return maxStrLen; } void AutoComplete::Show() { @@ -78,7 +96,6 @@ void AutoComplete::Show() { void AutoComplete::Cancel() { if (lb.Created()) { lb.Destroy(); - lb = 0; active = false; } } diff --git a/src/stc/scintilla/src/AutoComplete.h b/src/stc/scintilla/src/AutoComplete.h index 10216027bd..c1789ad7b6 100644 --- a/src/stc/scintilla/src/AutoComplete.h +++ b/src/stc/scintilla/src/AutoComplete.h @@ -9,10 +9,16 @@ class AutoComplete { bool active; char stopChars[256]; + char fillUpChars[256]; + char separator; public: + bool ignoreCase; + bool chooseSingle; ListBox lb; int posStart; int startLen; + // Should autocompletion be canceled if editor's currentPos <= startPos? + bool cancelAtStartPos; AutoComplete(); ~AutoComplete(); @@ -27,8 +33,16 @@ public: void SetStopChars(const char *stopChars_); bool IsStopChar(char ch); - // The list string contains a sequence of words separated by spaces - int SetList(const char *list); + // The fillup chars are characters which, when typed, fill up the selected word + void SetFillUpChars(const char *fillUpChars_); + bool IsFillUpChar(char ch); + + // The separator character is used when interpreting the list in SetList + void SetSeparator(char separator_); + char GetSeparator(); + + // The list string contains a sequence of words separated by the separator character + void SetList(const char *list); void Show(); void Cancel(); diff --git a/src/stc/scintilla/src/CallTip.cxx b/src/stc/scintilla/src/CallTip.cxx index ad6740208b..d22a963645 100644 --- a/src/stc/scintilla/src/CallTip.cxx +++ b/src/stc/scintilla/src/CallTip.cxx @@ -8,6 +8,7 @@ #include "Platform.h" +#include "Scintilla.h" #include "CallTip.h" CallTip::CallTip() { @@ -117,7 +118,7 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, Surface surfaceMeasure; surfaceMeasure.Init(); int deviceHeight = (size * surfaceMeasure.LogPixelsY()) / 72; - font.Create(faceName, deviceHeight); + font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false); if (val) delete []val; val = new char[strlen(defn) + 1]; diff --git a/src/stc/scintilla/src/CallTip.h b/src/stc/scintilla/src/CallTip.h index cd5b093c84..cb5bc29032 100644 --- a/src/stc/scintilla/src/CallTip.h +++ b/src/stc/scintilla/src/CallTip.h @@ -6,13 +6,14 @@ #ifndef CALLTIP_H #define CALLTIP_H -const char callClassName[] = "CallTip"; - class CallTip { int startHighlight; int endHighlight; char *val; Font font; + // Private so CallTip objects can not be copied + CallTip(const CallTip &) {} + CallTip &operator=(const CallTip &) { return *this; } public: Window wCallTip; Window wDraw; diff --git a/src/stc/scintilla/src/CellBuffer.cxx b/src/stc/scintilla/src/CellBuffer.cxx index 777688511a..befec75fc3 100644 --- a/src/stc/scintilla/src/CellBuffer.cxx +++ b/src/stc/scintilla/src/CellBuffer.cxx @@ -88,7 +88,7 @@ void MarkerHandleSet::RemoveHandle(int handle) { if (mhn->handle == handle) { *pmhn = mhn->next; delete mhn; - return; + return ; } pmhn = &((*pmhn)->next); } @@ -101,7 +101,7 @@ void MarkerHandleSet::RemoveNumber(int markerNum) { if (mhn->number == markerNum) { *pmhn = mhn->next; delete mhn; - return; + return ; } pmhn = &((*pmhn)->next); } @@ -119,7 +119,11 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { LineVector::LineVector() { linesData = 0; lines = 0; + size = 0; levels = 0; + sizeLevels = 0; + handleCurrent = 1; + Init(); } @@ -161,6 +165,7 @@ void LineVector::Expand(int sizeNew) { Platform::DebugPrintf("No memory available\n"); // TODO: Blow up } + } void LineVector::ExpandLevels(int sizeNew) { @@ -180,6 +185,13 @@ void LineVector::ExpandLevels(int sizeNew) { Platform::DebugPrintf("No memory available\n"); // TODO: Blow up } + +} + +void LineVector::ClearLevels() { + delete []levels; + levels = 0; + sizeLevels = 0; } void LineVector::InsertValue(int pos, int value) { @@ -191,11 +203,23 @@ void LineVector::InsertValue(int pos, int value) { } } lines++; - for (int i = lines + 1; i > pos; i--) { + for (int i = lines; i > pos; i--) { linesData[i] = linesData[i - 1]; } linesData[pos].startPosition = value; linesData[pos].handleSet = 0; + if (levels) { + for (int j = lines; j > pos; j--) { + levels[j] = levels[j - 1]; + } + if (pos == 0) { + levels[pos] = SC_FOLDLEVELBASE; + } else if (pos == (lines - 1)) { // Last line will not be a folder + levels[pos] = SC_FOLDLEVELBASE; + } else { + levels[pos] = levels[pos - 1]; + } + } } void LineVector::SetValue(int pos, int value) { @@ -221,6 +245,15 @@ void LineVector::Remove(int pos) { for (int i = pos; i < lines; i++) { linesData[i] = linesData[i + 1]; } + if (levels) { + // Level information merges back onto previous line + int posAbove = pos - 1; + if (posAbove < 0) + posAbove = 0; + for (int j = posAbove; j < lines; j++) { + levels[j] = levels[j + 1]; + } + } lines--; } @@ -233,9 +266,8 @@ int LineVector::LineFromPosition(int pos) { return lines - 1; int lower = 0; int upper = lines; - int middle = 0; do { - middle = (upper + lower + 1) / 2; // Round high + int middle = (upper + lower + 1) / 2; // Round high if (pos < linesData[middle].startPosition) { upper = middle - 1; } else { @@ -260,11 +292,12 @@ int LineVector::AddMark(int line, int markerNum) { } void LineVector::MergeMarkers(int pos) { - if (linesData[pos].handleSet || linesData[pos + 1].handleSet) { - if (linesData[pos].handleSet && linesData[pos + 1].handleSet) { - linesData[pos].handleSet->CombineWith(linesData[pos].handleSet); - linesData[pos].handleSet = 0; - } + if (linesData[pos + 1].handleSet != NULL) { + if (linesData[pos].handleSet == NULL ) + linesData[pos].handleSet = new MarkerHandleSet; + linesData[pos].handleSet->CombineWith(linesData[pos + 1].handleSet); + delete linesData[pos + 1].handleSet; + linesData[pos + 1].handleSet = NULL; } } @@ -316,12 +349,13 @@ Action::~Action() { Destroy(); } -void Action::Create(actionType at_, int position_, char *data_, int lenData_) { +void Action::Create(actionType at_, int position_, char *data_, int lenData_, bool mayCoalesce_) { delete []data; position = position_; at = at_; data = data_; lenData = lenData_; + mayCoalesce = mayCoalesce_; } void Action::Destroy() { @@ -336,12 +370,207 @@ void Action::Grab(Action *source) { at = source->at; data = source->data; lenData = source->lenData; + mayCoalesce = source->mayCoalesce; // Ownership of source data transferred to this source->position = 0; source->at = startAction; source->data = 0; source->lenData = 0; + source->mayCoalesce = true; +} + +// The undo history stores a sequence of user operations that represent the user's view of the +// commands executed on the text. +// Each user operation contains a sequence of text insertion and text deletion actions. +// All the user operations are stored in a list of individual actions with 'start' actions used +// as delimiters between user operations. +// Initially there is one start action in the history. +// As each action is performed, it is recorded in the history. The action may either become +// part of the current user operation or may start a new user operation. If it is to be part of the +// current operation, then it overwrites the current last action. If it is to be part of a new +// operation, it is appended after the current last action. +// After writing the new action, a new start action is appended at the end of the history. +// The decision of whether to start a new user operation is based upon two factors. If a +// compound operation has been explicitly started by calling BeginUndoAction and no matching +// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current +// operation. If there is no outstanding BeginUndoAction call then a new operation is started +// unless it looks as if the new action is caused by the user typing or deleting a stream of text. +// Sequences that look like typing or deletion are coalesced into a single user operation. + +UndoHistory::UndoHistory() { + + lenActions = 100; + actions = new Action[lenActions]; + maxAction = 0; + currentAction = 0; + undoSequenceDepth = 0; + savePoint = 0; + + actions[currentAction].Create(startAction); +} + +UndoHistory::~UndoHistory() { + delete []actions; + actions = 0; +} + +void UndoHistory::EnsureUndoRoom() { + //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, length, currentAction); + if (currentAction >= 2) { + // Have to test that there is room for 2 more actions in the array + // as two actions may be created by this function + if (currentAction >= (lenActions - 2)) { + // Run out of undo nodes so extend the array + int lenActionsNew = lenActions * 2; + Action *actionsNew = new Action[lenActionsNew]; + if (!actionsNew) + return ; + for (int act = 0; act <= currentAction; act++) + actionsNew[act].Grab(&actions[act]); + delete []actions; + lenActions = lenActionsNew; + actions = actionsNew; + } + } +} + +void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData) { + EnsureUndoRoom(); + //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); + //Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, + // actions[currentAction - 1].position, actions[currentAction - 1].lenData); + if (currentAction >= 1) { + if (0 == undoSequenceDepth) { + // Top level actions may not always be coalesced + Action &actPrevious = actions[currentAction - 1]; + // See if current action can be coalesced into previous action + // Will work if both are inserts or deletes and position is same + if (at != actPrevious.at) { + currentAction++; + } else if (currentAction == savePoint) { + currentAction++; + } else if ((at == removeAction) && + ((position + lengthData * 2) != actPrevious.position)) { + // Removals must be at same position to coalesce + currentAction++; + } else if ((at == insertAction) && + (position != (actPrevious.position + actPrevious.lenData*2))) { + // Insertions must be immediately after to coalesce + currentAction++; + } else { + //Platform::DebugPrintf("action coalesced\n"); + } + + } else { + // Actions not at top level are always coalesced unless this is after return to top level + if (!actions[currentAction].mayCoalesce) + currentAction++; + } + } else { + currentAction++; + } + actions[currentAction].Create(at, position, data, lengthData); + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; +} + +void UndoHistory::BeginUndoAction() { + EnsureUndoRoom(); + if (undoSequenceDepth == 0) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } + undoSequenceDepth++; +} + +void UndoHistory::EndUndoAction() { + EnsureUndoRoom(); + undoSequenceDepth--; + if (0 == undoSequenceDepth) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } +} + +void UndoHistory::DropUndoSequence() { + undoSequenceDepth = 0; +} + +void UndoHistory::DeleteUndoHistory() { + for (int i = 1; i < maxAction; i++) + actions[i].Destroy(); + maxAction = 0; + currentAction = 0; + actions[currentAction].Create(startAction); + savePoint = 0; +} + +void UndoHistory::SetSavePoint() { + savePoint = currentAction; +} + +bool UndoHistory::IsSavePoint() const { + return savePoint == currentAction; +} + +bool UndoHistory::CanUndo() const { + return (currentAction > 0) && (maxAction > 0); +} + +int UndoHistory::StartUndo() { + // Drop any trailing startAction + if (actions[currentAction].at == startAction && currentAction > 0) + currentAction--; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act > 0) { + act--; + } + return currentAction - act; +} + +const Action &UndoHistory::GetUndoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedUndoStep() { + currentAction--; +} + +bool UndoHistory::CanRedo() const { + return maxAction > currentAction; +} + +int UndoHistory::StartRedo() { + // Drop any leading startAction + if (actions[currentAction].at == startAction && currentAction < maxAction) + currentAction++; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act < maxAction) { + act++; + } + return act - currentAction; +} + +const Action &UndoHistory::GetRedoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedRedoStep() { + currentAction++; } CellBuffer::CellBuffer(int initialLength) { @@ -352,28 +581,17 @@ CellBuffer::CellBuffer(int initialLength) { gaplen = initialLength; part2body = body + gaplen; readOnly = false; - - lenActions = 100; - actions = new Action[lenActions]; - maxAction = 0; - currentAction = 0; - collectingUndo = undoCollectAutoStart; - undoSequenceDepth = 0; - savePoint = 0; - - actions[currentAction].Create(startAction); + collectingUndo = true; } CellBuffer::~CellBuffer() { delete []body; body = 0; - delete []actions; - actions = 0; } void CellBuffer::GapTo(int position) { if (position == part1len) - return; + return ; if (position < part1len) { int diff = part1len - position; //Platform::DebugPrintf("Move gap backwards to %d diff = %d part1len=%d length=%d \n", position,diff, part1len, length); @@ -405,6 +623,7 @@ void CellBuffer::RoomFor(int insertionLength) { size = newSize; //Platform::DebugPrintf("end need room %d %d - size=%d length=%d\n", gaplen, insertionLength,size,length); } + } // To make it easier to write code that uses ByteAt, a position outside the range of the buffer @@ -429,16 +648,16 @@ void CellBuffer::SetByteAt(int position, char ch) { if (position < 0) { //Platform::DebugPrintf("Bad position %d\n",position); - return; + return ; } if (position >= length + 11) { Platform::DebugPrintf("Very Bad position %d of %d\n", position, length); //exit(2); - return; + return ; } if (position >= length) { //Platform::DebugPrintf("Bad position %d of %d\n",position,length); - return; + return ; } if (position < part1len) { @@ -454,20 +673,20 @@ char CellBuffer::CharAt(int position) { void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) { if (lengthRetrieve < 0) - return; + return ; if (position < 0) - return; + return ; int bytePos = position * 2; if ((bytePos + lengthRetrieve * 2) > length) { - Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n",bytePos, - lengthRetrieve, length); - return; + Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", bytePos, + lengthRetrieve, length); + return ; } GapTo(0); // Move the buffer so its easy to subscript into it char *pb = part2body + bytePos; while (lengthRetrieve--) { *buffer++ = *pb; - pb +=2; + pb += 2; } } @@ -486,7 +705,7 @@ const char *CellBuffer::InsertString(int position, char *s, int insertLength) { for (int i = 0; i < insertLength / 2; i++) { data[i] = s[i * 2]; } - AppendAction(insertAction, position, data, insertLength / 2); + uh.AppendAction(insertAction, position, data, insertLength / 2); } BasicInsertString(position, s, insertLength); @@ -502,9 +721,9 @@ void CellBuffer::InsertCharStyle(int position, char ch, char style) { } bool CellBuffer::SetStyleAt(int position, char style, char mask) { - char curVal = ByteAt(position*2 + 1); + char curVal = ByteAt(position * 2 + 1); if ((curVal & mask) != style) { - SetByteAt(position*2 + 1, (curVal & ~mask) | style); + SetByteAt(position*2 + 1, static_cast((curVal & ~mask) | style)); return true; } else { return false; @@ -517,7 +736,7 @@ bool CellBuffer::SetStyleFor(int position, int lengthStyle, char style, char mas while (lengthStyle--) { char curVal = ByteAt(bytePos); if ((curVal & mask) != style) { - SetByteAt(bytePos, (curVal & ~mask) | style); + SetByteAt(bytePos, static_cast((curVal & ~mask) | style)); changed = true; } bytePos += 2; @@ -525,48 +744,6 @@ bool CellBuffer::SetStyleFor(int position, int lengthStyle, char style, char mas return changed; } -void CellBuffer::EnsureUndoRoom() { - //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, length, currentAction); - if (currentAction >= 2) { - // Have to test that there is room for 2 more actions in the array - // as two actions may be created by this function - if (currentAction >= (lenActions - 2)) { - // Run out of undo nodes so extend the array - int lenActionsNew = lenActions * 2; - Action *actionsNew = new Action[lenActionsNew]; - if (!actionsNew) - return; - for (int act = 0; act <= currentAction; act++) - actionsNew[act].Grab(&actions[act]); - delete []actions; - lenActions = lenActionsNew; - actions = actionsNew; - } - } -} - -void CellBuffer::AppendAction(actionType at, int position, char *data, int lengthData) { - EnsureUndoRoom(); - //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); - if (currentAction >= 2) { - // See if current action can be coalesced into previous action - // Will work if both are inserts or deletes and position is same or two different - if ((at != actions[currentAction - 1].at) || (abs(position - actions[currentAction - 1].position) > 2)) { - currentAction++; - } else if (currentAction == savePoint) { - currentAction++; - } - } else { - currentAction++; - } - actions[currentAction].Create(at, position, data, lengthData); - if ((collectingUndo == undoCollectAutoStart) && (0 == undoSequenceDepth)) { - currentAction++; - actions[currentAction].Create(startAction); - } - maxAction = currentAction; -} - const char *CellBuffer::DeleteChars(int position, int deleteLength) { // InsertString and DeleteChars are the bottleneck though which all changes occur char *data = 0; @@ -577,7 +754,7 @@ const char *CellBuffer::DeleteChars(int position, int deleteLength) { for (int i = 0; i < deleteLength / 2; i++) { data[i] = ByteAt(position + i * 2); } - AppendAction(removeAction, position, data, deleteLength / 2); + uh.AppendAction(removeAction, position, data, deleteLength / 2); } BasicDeleteChars(position, deleteLength); @@ -616,11 +793,11 @@ void CellBuffer::SetReadOnly(bool set) { } void CellBuffer::SetSavePoint() { - savePoint = currentAction; + uh.SetSavePoint(); } bool CellBuffer::IsSavePoint() { - return savePoint == currentAction; + return uh.IsSavePoint(); } int CellBuffer::AddMark(int line, int markerNum) { @@ -661,7 +838,7 @@ int CellBuffer::LineFromHandle(int markerHandle) { void CellBuffer::BasicInsertString(int position, char *s, int insertLength) { //Platform::DebugPrintf("Inserting at %d for %d\n", position, insertLength); if (insertLength == 0) - return; + return ; RoomFor(insertLength); GapTo(position); @@ -721,7 +898,7 @@ void CellBuffer::BasicInsertString(int position, char *s, int insertLength) { void CellBuffer::BasicDeleteChars(int position, int deleteLength) { //Platform::DebugPrintf("Deleting at %d for %d\n", position, deleteLength); if (deleteLength == 0) - return; + return ; if ((position == 0) && (deleteLength == length)) { // If whole buffer is being deleted, faster to reinitialise lines data @@ -753,6 +930,7 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) { ignoreNL = true; // First \n is not real deletion } + char ch = chNext; for (int i = 0; i < deleteLength; i += 2) { chNext = ' '; @@ -770,6 +948,7 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) { ignoreNL = false; // Further \n are not real deletions } + ch = chNext; } // May have to fix up end if last deletion causes cr to be next to lf @@ -790,9 +969,9 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) { part2body = body + gaplen; } -undoCollectionType CellBuffer::SetUndoCollection(undoCollectionType collectUndo) { +bool CellBuffer::SetUndoCollection(bool collectUndo) { collectingUndo = collectUndo; - undoSequenceDepth = 0; + uh.DropUndoSequence(); return collectingUndo; } @@ -800,116 +979,72 @@ bool CellBuffer::IsCollectingUndo() { return collectingUndo; } -void CellBuffer::AppendUndoStartAction() { - EnsureUndoRoom(); - // Finish any currently active undo sequence - undoSequenceDepth = 0; - if (actions[currentAction].at != startAction) { - undoSequenceDepth++; - currentAction++; - actions[currentAction].Create(startAction); - maxAction = currentAction; - } -} - void CellBuffer::BeginUndoAction() { - EnsureUndoRoom(); - if (undoSequenceDepth == 0) { - if (actions[currentAction].at != startAction) { - currentAction++; - actions[currentAction].Create(startAction); - maxAction = currentAction; - } - } - undoSequenceDepth++; + uh.BeginUndoAction(); } void CellBuffer::EndUndoAction() { - EnsureUndoRoom(); - undoSequenceDepth--; - if (0 == undoSequenceDepth) { - if (actions[currentAction].at != startAction) { - currentAction++; - actions[currentAction].Create(startAction); - maxAction = currentAction; - } - } + uh.EndUndoAction(); } void CellBuffer::DeleteUndoHistory() { - for (int i = 1; i < maxAction; i++) - actions[i].Destroy(); - maxAction = 0; - currentAction = 0; - savePoint = 0; + uh.DeleteUndoHistory(); } bool CellBuffer::CanUndo() { - return (!readOnly) && ((currentAction > 0) && (maxAction > 0)); + return (!readOnly) && (uh.CanUndo()); } int CellBuffer::StartUndo() { - // Drop any trailing startAction - if (actions[currentAction].at == startAction && currentAction > 0) - currentAction--; - - // Count the steps in this action - int act = currentAction; - while (actions[act].at != startAction && act > 0) { - act--; - } - return currentAction - act; + return uh.StartUndo(); } -const Action &CellBuffer::UndoStep() { - const Action &actionStep = actions[currentAction]; +const Action &CellBuffer::GetUndoStep() const { + return uh.GetUndoStep(); +} + +void CellBuffer::PerformUndoStep() { + const Action &actionStep = uh.GetUndoStep(); if (actionStep.at == insertAction) { BasicDeleteChars(actionStep.position, actionStep.lenData*2); } else if (actionStep.at == removeAction) { char *styledData = new char[actionStep.lenData * 2]; for (int i = 0; i < actionStep.lenData; i++) { styledData[i*2] = actionStep.data[i]; - styledData[i*2+1] = 0; + styledData[i*2 + 1] = 0; } BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); delete []styledData; } - currentAction--; - return actionStep; + uh.CompletedUndoStep(); } bool CellBuffer::CanRedo() { - return (!readOnly) && (maxAction > currentAction); + return (!readOnly) && (uh.CanRedo()); } int CellBuffer::StartRedo() { - // Drop any leading startAction - if (actions[currentAction].at == startAction && currentAction < maxAction) - currentAction++; - - // Count the steps in this action - int act = currentAction; - while (actions[act].at != startAction && act < maxAction) { - act++; - } - return act - currentAction; + return uh.StartRedo(); } -const Action &CellBuffer::RedoStep() { - const Action &actionStep = actions[currentAction]; +const Action &CellBuffer::GetRedoStep() const { + return uh.GetRedoStep(); +} + +void CellBuffer::PerformRedoStep() { + const Action &actionStep = uh.GetRedoStep(); if (actionStep.at == insertAction) { char *styledData = new char[actionStep.lenData * 2]; for (int i = 0; i < actionStep.lenData; i++) { styledData[i*2] = actionStep.data[i]; - styledData[i*2+1] = 0; + styledData[i*2 + 1] = 0; } BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); delete []styledData; } else if (actionStep.at == removeAction) { BasicDeleteChars(actionStep.position, actionStep.lenData*2); } - currentAction++; - return actionStep; + uh.CompletedRedoStep(); } int CellBuffer::SetLineState(int line, int state) { @@ -925,7 +1060,7 @@ int CellBuffer::GetLineState(int line) { int CellBuffer::GetMaxLineState() { return lineStates.Length(); } - + int CellBuffer::SetLevel(int line, int level) { int prev = 0; if ((line >= 0) && (line < lv.lines)) { @@ -948,3 +1083,6 @@ int CellBuffer::GetLevel(int line) { } } +void CellBuffer::ClearLevels() { + lv.ClearLevels(); +} diff --git a/src/stc/scintilla/src/CellBuffer.h b/src/stc/scintilla/src/CellBuffer.h index 5fbe2ea8a0..4a1ecb3989 100644 --- a/src/stc/scintilla/src/CellBuffer.h +++ b/src/stc/scintilla/src/CellBuffer.h @@ -58,6 +58,7 @@ public: void Expand(int sizeNew); void ExpandLevels(int sizeNew=-1); + void ClearLevels(); void InsertValue(int pos, int value); void SetValue(int pos, int value); void Remove(int pos); @@ -79,15 +80,52 @@ public: int position; char *data; int lenData; + bool mayCoalesce; Action(); ~Action(); - void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0); + void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true); void Destroy(); void Grab(Action *source); }; -enum undoCollectionType { undoCollectNone, undoCollectAutoStart, undoCollectManualStart }; +class UndoHistory { + Action *actions; + int lenActions; + int maxAction; + int currentAction; + int undoSequenceDepth; + int savePoint; + + void EnsureUndoRoom(); + +public: + UndoHistory(); + ~UndoHistory(); + + void AppendAction(actionType at, int position, char *data, int length); + + void BeginUndoAction(); + void EndUndoAction(); + void DropUndoSequence(); + void DeleteUndoHistory(); + + // The save point is a marker in the undo stack where the container has stated that + // the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint() const; + + // To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + // called that many times. Similarly for redo. + bool CanUndo() const; + int StartUndo(); + const Action &GetUndoStep() const; + void CompletedUndoStep(); + bool CanRedo() const; + int StartRedo(); + const Action &GetRedoStep() const; + void CompletedRedoStep(); +}; // Holder for an expandable array of characters that supports undo and line markers // Based on article "Data Structures in a Bit-Mapped Text Editor" @@ -102,24 +140,16 @@ private: char *part2body; bool readOnly; - Action *actions; - int lenActions; - int maxAction; - int currentAction; - undoCollectionType collectingUndo; - int undoSequenceDepth; - int savePoint; + bool collectingUndo; + UndoHistory uh; LineVector lv; - SVector lineStates; + SVector lineStates; void GapTo(int position); void RoomFor(int insertionLength); - void EnsureUndoRoom(); - void AppendAction(actionType at, int position, char *data, int length); - inline char ByteAt(int position); void SetByteAt(int position, char ch); @@ -143,7 +173,7 @@ public: // Setting styles for positions outside the range of the buffer is safe and has no effect. // True is returned if the style of a character changed. - bool SetStyleAt(int position, char style, char mask=(char)0xff); + bool SetStyleAt(int position, char style, char mask='\377'); bool SetStyleFor(int position, int length, char style, char mask); const char *DeleteChars(int position, int deleteLength); @@ -168,21 +198,22 @@ public: void BasicInsertString(int position, char *s, int insertLength); void BasicDeleteChars(int position, int deleteLength); - undoCollectionType SetUndoCollection(undoCollectionType collectUndo); + bool SetUndoCollection(bool collectUndo); bool IsCollectingUndo(); - void AppendUndoStartAction(); void BeginUndoAction(); void EndUndoAction(); void DeleteUndoHistory(); - // To perform an undo, StartUndo is called to retreive the number of steps, then UndoStep is + // To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is // called that many times. Similarly for redo. bool CanUndo(); int StartUndo(); - const Action &UndoStep(); + const Action &GetUndoStep() const; + void PerformUndoStep(); bool CanRedo(); int StartRedo(); - const Action &RedoStep(); + const Action &GetRedoStep() const; + void PerformRedoStep(); int SetLineState(int line, int state); int GetLineState(int line); @@ -190,6 +221,7 @@ public: int SetLevel(int line, int level); int GetLevel(int line); + void ClearLevels(); }; #define CELL_SIZE 2 diff --git a/src/stc/scintilla/src/ContractionState.cxx b/src/stc/scintilla/src/ContractionState.cxx index 6f41461eb1..0558b4c365 100644 --- a/src/stc/scintilla/src/ContractionState.cxx +++ b/src/stc/scintilla/src/ContractionState.cxx @@ -30,7 +30,6 @@ void ContractionState::MakeValid() const { if (!valid) { // Could be cleverer by keeping the index of the last still valid entry // rather than invalidating all. - int linePrev = -1; int lineDisplay = 0; for (int line=0; line= size) { - Grow(size + growSize); + if ((linesInDoc + lineCount + 2) >= size) { + Grow(linesInDoc + lineCount + growSize); } linesInDoc += lineCount; linesInDisplay += lineCount; - for (int i = linesInDoc + 1; i >= lineDoc + lineCount; i--) { + for (int i = linesInDoc; i >= lineDoc + lineCount; i--) { lines[i].visible = lines[i - lineCount].visible; lines[i].expanded = lines[i - lineCount].expanded; } @@ -130,16 +129,18 @@ void ContractionState::DeleteLines(int lineDoc, int lineCount) { linesInDisplay -= lineCount; return; } - int delta = 0; - for (int d=0;d lineDocEnd) + return false; if (size == 0) { - Grow(lineDocEnd + growSize); + Grow(linesInDoc + growSize); } // TODO: modify docLine members to mirror displayLine int delta = 0; @@ -166,12 +171,6 @@ bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible delta += visible ? 1 : -1; lines[line].visible = visible; } - lines[line].displayLine += delta; - } - if (delta != 0) { - for (int line=lineDocEnd+1; line <= linesInDoc; line++) { - lines[line].displayLine += delta; - } } } linesInDisplay += delta; @@ -191,7 +190,7 @@ bool ContractionState::GetExpanded(int lineDoc) const { bool ContractionState::SetExpanded(int lineDoc, bool expanded) { if (size == 0) { - Grow(lineDoc + growSize); + Grow(linesInDoc + growSize); } if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { if (lines[lineDoc].expanded != expanded) { @@ -201,3 +200,9 @@ bool ContractionState::SetExpanded(int lineDoc, bool expanded) { } return false; } + +void ContractionState::ShowAll() { + delete []lines; + lines = 0; + size = 0; +} diff --git a/src/stc/scintilla/src/ContractionState.h b/src/stc/scintilla/src/ContractionState.h index 9e17a76937..2c344efeea 100644 --- a/src/stc/scintilla/src/ContractionState.h +++ b/src/stc/scintilla/src/ContractionState.h @@ -42,9 +42,11 @@ public: bool GetVisible(int lineDoc) const; bool SetVisible(int lineDocStart, int lineDocEnd, bool visible); - + bool GetExpanded(int lineDoc) const; bool SetExpanded(int lineDoc, bool expanded); + + void ShowAll(); }; #endif diff --git a/src/stc/scintilla/src/Document.cxx b/src/stc/scintilla/src/Document.cxx index 7d832241fc..c883dd253f 100644 --- a/src/stc/scintilla/src/Document.cxx +++ b/src/stc/scintilla/src/Document.cxx @@ -32,7 +32,10 @@ Document::Document() { } endStyled = 0; enteredCount = 0; + enteredReadOnlyCount = 0; tabInChars = 8; + indentInChars = 0; + useTabs = true; watchers = 0; lenWatchers = 0; } @@ -51,7 +54,7 @@ int Document::AddRef() { return refCount++; } -// Decrease reference count and return its provius value. +// Decrease reference count and return its previous value. // Delete the document if reference count reaches zero. int Document::Release() { int curRefCount = --refCount; @@ -65,26 +68,54 @@ void Document::SetSavePoint() { NotifySavePoint(true); } +int Document::AddMark(int line, int markerNum) { + int prev = cb.AddMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0); + NotifyModified(mh); + return prev; +} + +void Document::DeleteMark(int line, int markerNum) { + cb.DeleteMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0); + NotifyModified(mh); +} + +void Document::DeleteMarkFromHandle(int markerHandle) { + cb.DeleteMarkFromHandle(markerHandle); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + NotifyModified(mh); +} + +void Document::DeleteAllMarks(int markerNum) { + cb.DeleteAllMarks(markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + NotifyModified(mh); +} + int Document::LineStart(int line) { return cb.LineStart(line); } +int Document::LineEnd(int line) { + if (line == LinesTotal() - 1) { + return LineStart(line + 1); + } else { + int position = LineStart(line + 1) - 1; + // When line terminator is CR+LF, may need to go back one more + if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { + position--; + } + return position; + } +} + int Document::LineFromPosition(int pos) { return cb.LineFromPosition(pos); } int Document::LineEndPosition(int position) { - int line = LineFromPosition(position); - if (line == LinesTotal() - 1) { - position = LineStart(line + 1); - } else { - position = LineStart(line + 1) - 1; - // When line terminator is CR+LF, may need to go back one more - if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { - position--; - } - } - return position; + return LineEnd(LineFromPosition(position)); } int Document::VCHomePosition(int position) { @@ -124,7 +155,10 @@ int Document::GetLastChild(int lineParent, int level) { level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK; int maxLine = LinesTotal(); int lineMaxSubord = lineParent; - while ((lineMaxSubord < maxLine-1) && IsSubordinate(level, GetLevel(lineMaxSubord+1))) { + while (lineMaxSubord < maxLine-1) { + EnsureStyledTo(LineStart(lineMaxSubord+2)); + if (!IsSubordinate(level, GetLevel(lineMaxSubord+1))) + break; lineMaxSubord++; } if (lineMaxSubord > lineParent) { @@ -167,27 +201,58 @@ bool Document::IsCrLf(int pos) { return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); } -bool Document::IsDBCS(int pos) { #if PLAT_WIN +bool Document::IsDBCS(int pos) { if (dbcsCodePage) { - // Anchor DBCS calculations at start of line because start of line can - // not be a DBCS trail byte. - int startLine = pos; - while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') - startLine--; - while (startLine <= pos) { - if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) { + if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + return ch >= 0x80; + } else { + // Anchor DBCS calculations at start of line because start of line can + // not be a DBCS trail byte. + int startLine = pos; + while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') + startLine--; + while (startLine <= pos) { + if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) { + startLine++; + if (startLine >= pos) + return true; + } startLine++; - if (startLine >= pos) - return true; } - startLine++; } } return false; +} #else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool Document::IsDBCS(int) { return false; +} #endif + +int Document::LenChar(int pos) { + if (IsCrLf(pos)) { + return 2; + } else if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + if (ch < 0x80) + return 1; + int len = 2; + if (ch >= (0x80+0x40+0x20)) + len = 3; + int lengthDoc = Length(); + if ((pos + len) > lengthDoc) + return lengthDoc-pos; + else + return len; + } else if (IsDBCS(pos)) { + return 2; + } else { + return 1; + } } // Normalise a position so that it is not halfway through a two byte character. @@ -221,29 +286,41 @@ int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { #if PLAT_WIN if (dbcsCodePage) { - // Anchor DBCS calculations at start of line because start of line can - // not be a DBCS trail byte. - int startLine = pos; - while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') - startLine--; - bool atLeadByte = false; - while (startLine < pos) { - if (atLeadByte) - atLeadByte = false; - else if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) - atLeadByte = true; - else - atLeadByte = false; - startLine++; - //Platform::DebugPrintf("DBCS %s\n", atlead ? "D" : "-"); - } + if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) { + // ch is a trail byte + if (moveDir > 0) + pos++; + else + pos--; + ch = static_cast(cb.CharAt(pos)); + } + } else { + // Anchor DBCS calculations at start of line because start of line can + // not be a DBCS trail byte. + int startLine = pos; + while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') + startLine--; + bool atLeadByte = false; + while (startLine < pos) { + if (atLeadByte) + atLeadByte = false; + else if (IsDBCSLeadByteEx(dbcsCodePage, cb.CharAt(startLine))) + atLeadByte = true; + else + atLeadByte = false; + startLine++; + //Platform::DebugPrintf("DBCS %s\n", atlead ? "D" : "-"); + } - if (atLeadByte) { - // Position is between a lead byte and a trail byte - if (moveDir > 0) - return pos + 1; - else - return pos - 1; + if (atLeadByte) { + // Position is between a lead byte and a trail byte + if (moveDir > 0) + return pos + 1; + else + return pos - 1; + } } } #endif @@ -261,41 +338,62 @@ void Document::ModifiedAt(int pos) { // Unlike Undo, Redo, and InsertStyledString, the pos argument is a cell number not a char number void Document::DeleteChars(int pos, int len) { + if ((pos + len) > Length()) + return; + if (cb.IsReadOnly() && enteredReadOnlyCount==0) { + enteredReadOnlyCount++; + NotifyModifyAttempt(); + enteredReadOnlyCount--; + } if (enteredCount == 0) { enteredCount++; - if (cb.IsReadOnly()) - NotifyModifyAttempt(); if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, + pos, len, + 0, 0)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); const char *text = cb.DeleteChars(pos*2, len * 2); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); ModifiedAt(pos); - int modFlags = SC_MOD_DELETETEXT | SC_PERFORMED_USER; - DocModification mh(modFlags, pos, len, LinesTotal() - prevLinesTotal, text); - NotifyModified(mh); + NotifyModified( + DocModification( + SC_MOD_DELETETEXT | SC_PERFORMED_USER, + pos, len, + LinesTotal() - prevLinesTotal, text)); } enteredCount--; } } void Document::InsertStyledString(int position, char *s, int insertLength) { + if (cb.IsReadOnly() && enteredReadOnlyCount==0) { + enteredReadOnlyCount++; + NotifyModifyAttempt(); + enteredReadOnlyCount--; + } if (enteredCount == 0) { enteredCount++; - if (cb.IsReadOnly()) - NotifyModifyAttempt(); if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, + position / 2, insertLength / 2, + 0, 0)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); const char *text = cb.InsertString(position, s, insertLength); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); ModifiedAt(position / 2); - - int modFlags = SC_MOD_INSERTTEXT | SC_PERFORMED_USER; - DocModification mh(modFlags, position / 2, insertLength / 2, LinesTotal() - prevLinesTotal, text); - NotifyModified(mh); + NotifyModified( + DocModification( + SC_MOD_INSERTTEXT | SC_PERFORMED_USER, + position / 2, insertLength / 2, + LinesTotal() - prevLinesTotal, text)); } enteredCount--; } @@ -307,9 +405,18 @@ int Document::Undo() { enteredCount++; bool startSavePoint = cb.IsSavePoint(); int steps = cb.StartUndo(); + //Platform::DebugPrintf("Steps=%d\n", steps); for (int step=0; step= tabSize) && (length > 0)) { + *linebuf++ = '\t'; + indent -= tabSize; + length--; + } + } + while ((indent > 0) && (length > 0)) { + *linebuf++ = ' '; + indent--; + length--; + } + *linebuf = '\0'; +} + +int Document::GetLineIndentation(int line) { + int indent = 0; + if ((line >= 0) && (line < LinesTotal())) { + int lineStart = LineStart(line); + int length = Length(); + for (int i=lineStart;i= 0) && (line < LinesTotal())) { + for (int i=LineStart(line);i= lineTop; line--) { - InsertChar(LineStart(line), '\t'); - } - } else { - // Dedent - suck white space off the front of the line to dedent by equivalent of a tab - for (int line = lineBottom; line >= lineTop; line--) { - int ispc = 0; - while (ispc < tabInChars && cb.CharAt(LineStart(line) + ispc) == ' ') - ispc++; - int posStartLine = LineStart(line); - if (ispc == tabInChars) { - DeleteChars(posStartLine, ispc); - } else if (cb.CharAt(posStartLine + ispc) == '\t') { - DeleteChars(posStartLine, ispc + 1); - } else { // Hit a non-white - DeleteChars(posStartLine, ispc); - } - } + // Dedent - suck white space off the front of the line to dedent by equivalent of a tab + for (int line = lineBottom; line >= lineTop; line--) { + int indentOfLine = GetLineIndentation(line); + if (forwards) + SetLineIndentation(line, indentOfLine + IndentSize()); + else + SetLineIndentation(line, indentOfLine - IndentSize()); } } @@ -485,6 +677,8 @@ void Document::ConvertLineEnds(int eolModeSet) { } bool Document::IsWordChar(unsigned char ch) { + if ((SC_CP_UTF8 == dbcsCodePage) && (ch >0x80)) + return true; return wordchars[ch]; } @@ -523,25 +717,29 @@ int Document::NextWordStart(int pos, int delta) { return pos; } -bool Document::IsWordAt(int start, int end) { - int lengthDoc = Length(); - if (start > 0) { - char ch = CharAt(start - 1); - if (IsWordChar(ch)) - return false; - } - if (end < lengthDoc - 1) { - char ch = CharAt(end); - if (IsWordChar(ch)) - return false; +bool Document::IsWordStartAt(int pos) { + if (pos > 0) { + return !IsWordChar(CharAt(pos - 1)); } return true; } +bool Document::IsWordEndAt(int pos) { + if (pos < Length() - 1) { + return !IsWordChar(CharAt(pos)); + } + return true; +} + +bool Document::IsWordAt(int start, int end) { + return IsWordStartAt(start) && IsWordEndAt(end); +} + // Find text in document, supporting both forward and backward // searches (just pass minPos > maxPos to do a backward search) // Has not been tested with backwards DBCS searches yet. -long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word) { +long Document::FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart) { bool forward = minPos <= maxPos; int increment = forward ? 1 : -1; @@ -551,16 +749,14 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv // Compute actual search ranges needed int lengthFind = strlen(s); - int endSearch = 0; + int endSearch = endPos; if (startPos <= endPos) { endSearch = endPos - lengthFind + 1; - } else { - endSearch = endPos; } //Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind); char firstChar = s[0]; if (!caseSensitive) - firstChar = toupper(firstChar); + firstChar = static_cast(toupper(firstChar)); int pos = startPos; while (forward ? (pos < endSearch) : (pos >= endSearch)) { char ch = CharAt(pos); @@ -573,8 +769,10 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv found = false; } if (found) { - if ((!word) || IsWordAt(pos, pos + lengthFind)) - return pos; + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; } } } else { @@ -586,8 +784,10 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv found = false; } if (found) { - if ((!word) || IsWordAt(pos, pos + lengthFind)) - return pos; + if (!(word && wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; } } } @@ -605,6 +805,25 @@ int Document::LinesTotal() { return cb.Lines(); } +void Document::ChangeCase(Range r, bool makeUpperCase) { + for (int pos=r.start; pos(toupper(ch))); + } + } else { + if (isupper(ch)) { + ChangeChar(pos, static_cast(tolower(ch))); + } + } + } + } +} + void Document::SetWordChars(unsigned char *chars) { int ch; for (ch = 0; ch < 256; ch++) { @@ -671,6 +890,13 @@ void Document::SetStyles(int length, char *styles) { } } +bool Document::EnsureStyledTo(int pos) { + // Ask the watchers to style, and stop as soon as one responds. + for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) + watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos); + return pos <= GetEndStyled(); +} + bool Document::AddWatcher(DocWatcher *watcher, void *userData) { for (int i = 0; i < lenWatchers; i++) { if ((watchers[i].watcher == watcher) && diff --git a/src/stc/scintilla/src/Document.h b/src/stc/scintilla/src/Document.h index fba611c7f7..af477dd79b 100644 --- a/src/stc/scintilla/src/Document.h +++ b/src/stc/scintilla/src/Document.h @@ -74,9 +74,10 @@ private: CellBuffer cb; bool wordchars[256]; int stylingPos; - int stylingMask; + char stylingMask; int endStyled; int enteredCount; + int enteredReadOnlyCount; WatcherWithUserData *watchers; int lenWatchers; @@ -86,8 +87,11 @@ public: int stylingBitsMask; int eolMode; + // dbcsCodePage can also be SC_CP_UTF8 to enable UTF-8 mode int dbcsCodePage; int tabInChars; + int indentInChars; + bool useTabs; Document(); virtual ~Document(); @@ -98,6 +102,7 @@ public: int LineFromPosition(int pos); int ClampPositionIntoDocument(int pos); bool IsCrLf(int pos); + int LenChar(int pos); int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); // Gateways to modifying document @@ -108,21 +113,28 @@ public: bool CanUndo() { return cb.CanUndo(); } bool CanRedo() { return cb.CanRedo(); } void DeleteUndoHistory() { cb.DeleteUndoHistory(); } - undoCollectionType SetUndoCollection(undoCollectionType collectUndo) { + bool SetUndoCollection(bool collectUndo) { return cb.SetUndoCollection(collectUndo); } - void AppendUndoStartAction() { cb.AppendUndoStartAction(); } + bool IsCollectingUndo() { return cb.IsCollectingUndo(); } void BeginUndoAction() { cb.BeginUndoAction(); } void EndUndoAction() { cb.EndUndoAction(); } void SetSavePoint(); bool IsSavePoint() { return cb.IsSavePoint(); } + + int GetLineIndentation(int line); + void SetLineIndentation(int line, int indent); + int GetLineIndentPosition(int line); + int GetColumn(int position); void Indent(bool forwards, int lineBottom, int lineTop); void ConvertLineEnds(int eolModeSet); void SetReadOnly(bool set) { cb.SetReadOnly(set); } + bool IsReadOnly() { return cb.IsReadOnly(); } void InsertChar(int pos, char ch); void InsertString(int position, const char *s); void InsertString(int position, const char *s, int insertLength); + void ChangeChar(int pos, char ch); void DelChar(int pos); int DelCharBack(int pos); @@ -132,17 +144,19 @@ public: } char StyleAt(int position) { return cb.StyleAt(position); } int GetMark(int line) { return cb.GetMark(line); } - int AddMark(int line, int markerNum) { return cb.AddMark(line, markerNum); } - void DeleteMark(int line, int markerNum) { cb.DeleteMark(line, markerNum); } - void DeleteMarkFromHandle(int markerHandle) { cb.DeleteMarkFromHandle(markerHandle); } - void DeleteAllMarks(int markerNum) { cb.DeleteAllMarks(markerNum); } + int AddMark(int line, int markerNum); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); } int LineStart(int line); + int LineEnd(int line); int LineEndPosition(int position); int VCHomePosition(int position); int SetLevel(int line, int level); int GetLevel(int line) { return cb.GetLevel(line); } + void ClearLevels() { cb.ClearLevels(); } int GetLastChild(int lineParent, int level=-1); int GetFoldParent(int line); @@ -150,16 +164,20 @@ public: int ExtendWordSelect(int pos, int delta); int NextWordStart(int pos, int delta); int Length() { return cb.Length(); } - long FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word); - long FindText(WORD iMessage,WPARAM wParam,LPARAM lParam); + long FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart); + long FindText(int iMessage, unsigned long wParam, long lParam); int LinesTotal(); + void ChangeCase(Range r, bool makeUpperCase); + void SetWordChars(unsigned char *chars); void SetStylingBits(int bits); void StartStyling(int position, char mask); void SetStyleFor(int length, char style); void SetStyles(int length, char *styles); int GetEndStyled() { return endStyled; } + bool EnsureStyledTo(int pos); int SetLineState(int line, int state) { return cb.SetLineState(line, state); } int GetLineState(int line) { return cb.GetLineState(line); } @@ -173,12 +191,16 @@ public: private: bool IsDBCS(int pos); bool IsWordChar(unsigned char ch); + bool IsWordStartAt(int pos); + bool IsWordEndAt(int pos); bool IsWordAt(int start, int end); void ModifiedAt(int pos); - + void NotifyModifyAttempt(); void NotifySavePoint(bool atSavePoint); void NotifyModified(DocModification mh); + + int IndentSize() { return indentInChars ? indentInChars : tabInChars; } }; // To optimise processing of document modifications by DocWatchers, a hint is passed indicating the @@ -205,6 +227,16 @@ public: line(0), foldLevelNow(0), foldLevelPrev(0) {} + + DocModification(int modificationType_, const Action &act, int linesAdded_=0) : + modificationType(modificationType_), + position(act.position / 2), + length(act.lenData), + linesAdded(linesAdded_), + text(act.data), + line(0), + foldLevelNow(0), + foldLevelPrev(0) {} }; // A class that wants to receive notifications from a Document must be derived from DocWatcher @@ -217,6 +249,7 @@ public: virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; virtual void NotifyDeleted(Document *doc, void *userData) = 0; + virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; }; #endif diff --git a/src/stc/scintilla/src/DocumentAccessor.cxx b/src/stc/scintilla/src/DocumentAccessor.cxx new file mode 100644 index 0000000000..6828e37c3f --- /dev/null +++ b/src/stc/scintilla/src/DocumentAccessor.cxx @@ -0,0 +1,176 @@ +// SciTE - Scintilla based Text Editor +// Accessor.cxx - rapid easy access to contents of a Scintilla +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "SVector.h" +#include "Accessor.h" +#include "DocumentAccessor.h" +#include "CellBuffer.h" +#include "Scintilla.h" +#include "Document.h" + +DocumentAccessor::~DocumentAccessor() { +} + +#if PLAT_WIN +bool DocumentAccessor::InternalIsLeadByte(char ch) { + if (SC_CP_UTF8 == codePage) + // For lexing, all characters >= 0x80 are treated the + // same so none is considered a lead byte. + return false; + else + return IsDBCSLeadByteEx(codePage, ch); +} +#else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool DocumentAccessor::InternalIsLeadByte(char) { + return false; +} +#endif + +void DocumentAccessor::Fill(int position) { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + startPos = position - slopSize; + if (startPos + bufferSize > lenDoc) + startPos = lenDoc - bufferSize; + if (startPos < 0) + startPos = 0; + endPos = startPos + bufferSize; + if (endPos > lenDoc) + endPos = lenDoc; + + pdoc->GetCharRange(buf, startPos, endPos-startPos); + buf[endPos-startPos] = '\0'; +} + +char DocumentAccessor::StyleAt(int position) { + return pdoc->StyleAt(position); +} + +int DocumentAccessor::GetLine(int position) { + return pdoc->LineFromPosition(position); +} + +int DocumentAccessor::LineStart(int line) { + return pdoc->LineStart(line); +} + +int DocumentAccessor::LevelAt(int line) { + return pdoc->GetLevel(line); +} + +int DocumentAccessor::Length() { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + return lenDoc; +} + +int DocumentAccessor::GetLineState(int line) { + return pdoc->GetLineState(line); +} + +int DocumentAccessor::SetLineState(int line, int state) { + return pdoc->SetLineState(line, state); +} + +void DocumentAccessor::StartAt(unsigned int start, char chMask) { + pdoc->StartStyling(start, chMask); +} + +void DocumentAccessor::StartSegment(unsigned int pos) { + startSeg = pos; +} + +void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) { + // Only perform styling if non empty range + if (pos != startSeg - 1) { + if (pos < startSeg) { + Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos); + } + + if (validLen + (pos - startSeg + 1) >= bufferSize) + Flush(); + if (validLen + (pos - startSeg + 1) >= bufferSize) { + // Too big for buffer so send directly + pdoc->SetStyleFor(pos - startSeg + 1, static_cast(chAttr)); + } else { + if (chAttr != chWhile) + chFlags = 0; + chAttr |= chFlags; + for (unsigned int i = startSeg; i <= pos; i++) { + styleBuf[validLen++] = static_cast(chAttr); + } + } + } + startSeg = pos+1; +} + +void DocumentAccessor::SetLevel(int line, int level) { + pdoc->SetLevel(line, level); +} + +void DocumentAccessor::Flush() { + startPos = extremePosition; + lenDoc = -1; + if (validLen > 0) { + pdoc->SetStyles(validLen, styleBuf); + validLen = 0; + } +} + +int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { + int end = Length(); + int spaceFlags = 0; + + // Determines the indentation level of the current line and also checks for consistent + // indentation compared to the previous line. + // Indentation is judged consistent when the indentation whitespace of each line lines + // the same or the indentation of one line is a prefix of the other. + + int pos = LineStart(line); + char ch = (*this)[pos]; + int indent = 0; + bool inPrevPrefix = line > 0; + int posPrev = inPrevPrefix ? LineStart(line-1) : 0; + while ((ch == ' ' || ch == '\t') && (pos < end)) { + if (inPrevPrefix) { + char chPrev = (*this)[posPrev++]; + if (chPrev == ' ' || chPrev == '\t') { + if (chPrev != ch) + spaceFlags |= wsInconsistent; + } else { + inPrevPrefix = false; + } + } + if (ch == ' ') { + spaceFlags |= wsSpace; + indent++; + } else { // Tab + spaceFlags |= wsTab; + if (spaceFlags & wsSpace) + spaceFlags |= wsSpaceTab; + indent = (indent / 8 + 1) * 8; + } + ch = (*this)[++pos]; + } + + *flags = spaceFlags; + indent += SC_FOLDLEVELBASE; + // if completely empty line or the start of a comment... + if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) + return indent | SC_FOLDLEVELWHITEFLAG; + else + return indent; +} + diff --git a/src/stc/scintilla/src/DocumentAccessor.h b/src/stc/scintilla/src/DocumentAccessor.h new file mode 100644 index 0000000000..ccc05fee9f --- /dev/null +++ b/src/stc/scintilla/src/DocumentAccessor.h @@ -0,0 +1,49 @@ +// DocumentAccessor.h - implementation of BufferAccess and StylingAccess on a Scintilla rapid easy access to contents of a Scintilla +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +class Document; + +class DocumentAccessor : public Accessor { + // Private so DocumentAccessor objects can not be copied + DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {} + DocumentAccessor &operator=(const DocumentAccessor &) { return *this; } +protected: + Document *pdoc; + PropSet &props; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + + bool InternalIsLeadByte(char ch); + void Fill(int position); +public: + DocumentAccessor(Document *pdoc_, PropSet &props_) : + Accessor(), pdoc(pdoc_), props(props_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { + } + ~DocumentAccessor(); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); +}; diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx index 6508c95b1f..e1cc7468b9 100644 --- a/src/stc/scintilla/src/Editor.cxx +++ b/src/stc/scintilla/src/Editor.cxx @@ -11,6 +11,11 @@ #include "Platform.h" #include "Scintilla.h" + +#if PLAT_WX || PLAT_GTK +#include "WinDefs.h" +#endif + #include "ContractionState.h" #include "SVector.h" #include "CellBuffer.h" @@ -33,6 +38,9 @@ Editor::Editor() { stylesValid = false; + printMagnification = 0; + printColourMode = SC_PRINT_NORMAL; + hideSelection = false; inOverstrike = false; @@ -58,43 +66,47 @@ Editor::Editor() { selType = selStream; xStartSelect = 0; xEndSelect = 0; + primarySelection = true; caretPolicy = CARET_SLOP; caretSlop = 0; searchAnchor = 0; - + ucWheelScrollLines = 0; cWheelDelta = 0; //wheel delta from roll xOffset = 0; xCaretMargin = 50; - + horizontalScrollBarVisible = true; + currentPos = 0; anchor = 0; topLine = 0; posTopLine = 0; - + needUpdateUI = true; - braces[0]=invalidPosition; - braces[1]=invalidPosition; + braces[0] = invalidPosition; + braces[1] = invalidPosition; bracesMatchStyle = STYLE_BRACEBAD; - - edgeState = EDGE_NONE; + highlightGuideColumn = 0; + theEdge = 0; - + paintState = notPainting; - + modEventMask = SC_MODEVENTMASKALL; + displayPopupMenu = true; + pdoc = new Document(); pdoc ->AddRef(); pdoc->AddWatcher(this, 0); #ifdef MACRO_SUPPORT recordingMacro = 0; -#endif +#endif foldFlags = 0; } @@ -110,12 +122,14 @@ Editor::~Editor() { } void Editor::Finalise() { + CancelModes(); } void Editor::DropGraphics() { pixmapLine.Release(); pixmapSelMargin.Release(); pixmapSelPattern.Release(); + pixmapIndentGuide.Release(); } void Editor::InvalidateStyleData() { @@ -182,12 +196,12 @@ int Editor::MaxScrollPos() { return retVal; } -bool IsControlCharacter(char ch) { +static inline bool IsControlCharacter(signed char ch) { // iscntrl returns true for lots of chars > 127 which are displayable return ch >= 0 && ch < ' '; } -const char *ControlCharacterString(char ch) { +const char *ControlCharacterString(unsigned char ch) { const char *reps[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", @@ -208,15 +222,16 @@ Point Editor::LocationFromPosition(unsigned int pos) { //Platform::DebugPrintf("line=%d\n", line); Surface surface; surface.Init(); + surface.SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); Point pt; pt.y = (lineVisible - topLine) * vs.lineHeight; // + half a lineheight? unsigned int posLineStart = pdoc->LineStart(line); + LineLayout ll; + LayoutLine(line, &surface, vs, ll); if ((pos - posLineStart) > LineLayout::maxLineLength) { // very long line so put x at arbitrary large position - pt.x = 30000 + vs.fixedColumnWidth - xOffset; + pt.x = ll.positions[LineLayout::maxLineLength] + vs.fixedColumnWidth - xOffset; } else { - LineLayout ll; - LayoutLine(line, &surface, vs, ll); pt.x = ll.positions[pos - posLineStart] + vs.fixedColumnWidth - xOffset; } return pt; @@ -226,7 +241,7 @@ int Editor::XFromPosition(unsigned int pos) { Point pt = LocationFromPosition(pos); return pt.x - vs.fixedColumnWidth + xOffset; } - + int Editor::LineFromLocation(Point pt) { return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine); } @@ -247,16 +262,17 @@ int Editor::PositionFromLocation(Point pt) { return 0; if (line >= pdoc->LinesTotal()) return pdoc->Length(); -//Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); + //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); Surface surface; surface.Init(); + surface.SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); unsigned int posLineStart = pdoc->LineStart(line); LineLayout ll; LayoutLine(line, &surface, vs, ll); for (int i = 0; i < ll.numCharsInLine; i++) { - if (pt.x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || - ll.chars[i] == '\r' || ll.chars[i] == '\n') { + if (pt.x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || + ll.chars[i] == '\r' || ll.chars[i] == '\n') { return i + posLineStart; } } @@ -271,13 +287,14 @@ int Editor::PositionFromLineX(int line, int x) { //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); Surface surface; surface.Init(); + surface.SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); unsigned int posLineStart = pdoc->LineStart(line); LineLayout ll; LayoutLine(line, &surface, vs, ll); for (int i = 0; i < ll.numCharsInLine; i++) { - if (x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || - ll.chars[i] == '\r' || ll.chars[i] == '\n') { + if (x < ((ll.positions[i] + ll.positions[i + 1]) / 2) || + ll.chars[i] == '\r' || ll.chars[i] == '\n') { return i + posLineStart; } } @@ -356,7 +373,7 @@ int Editor::SelectionStart(int line) { //return PositionFromLineX(line, minX + vs.fixedColumnWidth - xOffset); return PositionFromLineX(line, minX); } - } + } } int Editor::SelectionEnd(int line) { @@ -427,10 +444,26 @@ void Editor::SetEmptySelection(int currentPos_) { SetSelection(currentPos_, currentPos_); } +int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { + // Asks document to find a good position and then moves out of any invisible positions + pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd); + int mask = pdoc->stylingBitsMask; + if (moveDir > 0) { + while ((pos < pdoc->Length()) && + (!vs.styles[pdoc->StyleAt(pos - 1) & mask].visible)) + pos++; + } else { + while ((pos > 0) && + (!vs.styles[pdoc->StyleAt(pos - 1) & mask].visible)) + pos--; + } + return pos; +} + int Editor::MovePositionTo(int newPos, bool extend) { int delta = newPos - currentPos; newPos = pdoc->ClampPositionIntoDocument(newPos); - newPos = pdoc->MovePositionOutsideChar(newPos, delta); + newPos = MovePositionOutsideChar(newPos, delta); if (extend) { SetSelection(newPos); } else { @@ -443,7 +476,7 @@ int Editor::MovePositionTo(int newPos, bool extend) { int Editor::MovePositionSoVisible(int pos, int moveDir) { pos = pdoc->ClampPositionIntoDocument(pos); - pos = pdoc->MovePositionOutsideChar(pos, moveDir); + pos = MovePositionOutsideChar(pos, moveDir); int lineDoc = pdoc->LineFromPosition(pos); if (cs.GetVisible(lineDoc)) { return pos; @@ -483,7 +516,7 @@ void Editor::ScrollTo(int line) { } } -void Editor::ScrollText(int linesToMove) { +void Editor::ScrollText(int /* linesToMove */) { //Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove); Redraw(); } @@ -497,6 +530,19 @@ void Editor::HorizontalScrollTo(int xPos) { Redraw(); } +void Editor::MoveCaretInsideView() { + PRectangle rcClient = GetTextRectangle(); + Point pt = LocationFromPosition(currentPos); + if (pt.y < rcClient.top) { + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top))); + } else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) { + int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight; + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed))); + } +} + void Editor::EnsureCaretVisible(bool useMargin) { //Platform::DebugPrintf("EnsureCaretVisible %d\n", xOffset); PRectangle rcClient = GetTextRectangle(); @@ -513,11 +559,11 @@ void Editor::EnsureCaretVisible(bool useMargin) { int xMargin = Platform::Clamp(xCaretMargin, 2, Platform::Maximum(rcClient.Width() - 10, 4) / 2); if (!useMargin) xMargin = 2; - + // Ensure certain amount of text visible on both sides of caretSo move if caret just on edge rcClient.left = rcClient.left + xMargin; rcClient.right = rcClient.right - xMargin; - + if (!rcClient.Contains(pt) || !rcClient.Contains(ptBottomCaret) || (caretPolicy & CARET_STRICT)) { //Platform::DebugPrintf("EnsureCaretVisible move, (%d,%d) (%d,%d)\n", pt.x, pt.y, rcClient.left, rcClient.right); // It should be possible to scroll the window to show the caret, @@ -527,8 +573,8 @@ void Editor::EnsureCaretVisible(bool useMargin) { SetTopLine(Platform::Clamp(lineCaret - caretSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); - } else if ((lineCaret > topLine + LinesOnScreen() - 1) || - ((caretPolicy & CARET_STRICT) && (lineCaret > topLine + LinesOnScreen() - 1 - caretSlop))) { + } else if ((lineCaret > topLine + LinesOnScreen() - 1) || + ((caretPolicy & CARET_STRICT) && (lineCaret > topLine + LinesOnScreen() - 1 - caretSlop))) { SetTopLine(Platform::Clamp(lineCaret - LinesOnScreen() + 1 + caretSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); @@ -565,7 +611,7 @@ void Editor::ShowCaretAtCurrentPosition() { if (!wMain.HasFocus()) { caret.active = false; caret.on = false; - return; + return ; } caret.active = true; caret.on = true; @@ -586,13 +632,13 @@ void Editor::InvalidateCaret() { void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (vs.fixedColumnWidth == 0) - return; + return ; PRectangle rcMargin = GetClientRectangle(); rcMargin.right = vs.fixedColumnWidth; if (!rc.Intersects(rcMargin)) - return; + return ; Surface *surface; if (bufferedDraw) { @@ -604,9 +650,9 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { PRectangle rcSelMargin = rcMargin; rcSelMargin.right = rcMargin.left; - for (int margin=0; margin < vs.margins; margin++) { + for (int margin = 0; margin < vs.margins; margin++) { if (vs.ms[margin].width > 0) { - + rcSelMargin.left = rcSelMargin.right; rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; @@ -620,18 +666,18 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { */ if (vs.ms[margin].mask & SC_MASK_FOLDERS) // Required because of special way brush is created for selection margin - surface->FillRectangle(rcSelMargin, pixmapSelPattern); + surface->FillRectangle(rcSelMargin, pixmapSelPattern); else - surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); + surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); } else { surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); } - + int visibleLine = topLine; int line = cs.DocFromDisplay(visibleLine); int yposScreen = 0; - while (line < pdoc->LinesTotal() && yposScreen < rcMargin.bottom) { + while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { int marks = pdoc->GetMark(line); if (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) { if (cs.GetExpanded(line)) { @@ -648,22 +694,21 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { char number[100]; number[0] = '\0'; sprintf(number, "%d", line + 1); - if (foldFlags & 8) + if (foldFlags & 64) sprintf(number, "%X", pdoc->GetLevel(line)); - int xpos = 0; - PRectangle rcNumber=rcMarker; + PRectangle rcNumber = rcMarker; // Right justify int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, strlen(number)); - xpos = rcNumber.right - width - 3; + int xpos = rcNumber.right - width - 3; rcNumber.left = xpos; if ((visibleLine < cs.LinesDisplayed()) && cs.GetVisible(line)) { surface->DrawText(rcNumber, vs.styles[STYLE_LINENUMBER].font, rcNumber.top + vs.maxAscent, number, strlen(number), - vs.styles[STYLE_LINENUMBER].fore.allocated, - vs.styles[STYLE_LINENUMBER].back.allocated); + vs.styles[STYLE_LINENUMBER].fore.allocated, + vs.styles[STYLE_LINENUMBER].back.allocated); } } - + if (marks) { for (int markBit = 0; (markBit < 32) && marks; markBit++) { if (marks & 1) { @@ -674,7 +719,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { marks >>= 1; } } - + visibleLine++; line = cs.DocFromDisplay(visibleLine); yposScreen += vs.lineHeight; @@ -684,8 +729,8 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { PRectangle rcBlankMargin = rcMargin; rcBlankMargin.left = rcSelMargin.right; - surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated); - + surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated); + if (bufferedDraw) { surfWindow->Copy(rcMargin, Point(), pixmapSelMargin); } @@ -711,44 +756,60 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; char styleByte = 0; int styleMask = pdoc->stylingBitsMask; - for (int charInDoc = posLineStart; - charInDoc < posLineEnd && numCharsInLine < LineLayout::maxLineLength - 1; - charInDoc++) { + ll.xHighlightGuide = 0; + if (posLineEnd > (posLineStart + LineLayout::maxLineLength)) { + posLineEnd = posLineStart + LineLayout::maxLineLength; + } + for (int charInDoc = posLineStart; charInDoc < posLineEnd; charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); styleByte = pdoc->StyleAt(charInDoc); if (vstyle.viewEOL || ((chDoc != '\r') && (chDoc != '\n'))) { ll.chars[numCharsInLine] = chDoc; - ll.styles[numCharsInLine] = styleByte & styleMask; - ll.indicators[numCharsInLine] = styleByte & ~styleMask; + ll.styles[numCharsInLine] = static_cast(styleByte & styleMask); + ll.indicators[numCharsInLine] = static_cast(styleByte & ~styleMask); numCharsInLine++; } } - ll.chars[numCharsInLine] = 0; + // Extra element at the end of the line to hold end x position and act as + ll.chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character ll.styles[numCharsInLine] = styleByte; // For eolFilled ll.indicators[numCharsInLine] = 0; - // Layout the line, determining the position of each character + // Layout the line, determining the position of each character, + // with an extra element at the end for the end of the line. int startseg = 0; int startsegx = 0; ll.positions[0] = 0; unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars; - + for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { if ((ll.styles[charInLine] != ll.styles[charInLine + 1]) || IsControlCharacter(ll.chars[charInLine]) || IsControlCharacter(ll.chars[charInLine + 1])) { ll.positions[startseg] = 0; - if (IsControlCharacter(ll.chars[charInLine])) { - if (ll.chars[charInLine] == '\t') { - ll.positions[charInLine + 1] = ((((startsegx + 2) / - tabWidth) + 1) * tabWidth) - startsegx; + if (vstyle.styles[ll.styles[charInLine]].visible) { + if (IsControlCharacter(ll.chars[charInLine])) { + if (ll.chars[charInLine] == '\t') { + ll.positions[charInLine + 1] = ((((startsegx + 2) / + tabWidth) + 1) * tabWidth) - startsegx; + } else { + const char *ctrlChar = ControlCharacterString(ll.chars[charInLine]); + // +3 For a blank on front and rounded edge each side: + ll.positions[charInLine + 1] = surface->WidthText(ctrlCharsFont, ctrlChar, strlen(ctrlChar)) + 3; + } } else { - const char *ctrlChar = ControlCharacterString(ll.chars[charInLine]); - // +3 For a blank on front and rounded edge each side: - ll.positions[charInLine + 1] = surface->WidthText(ctrlCharsFont, ctrlChar, strlen(ctrlChar)) + 3; + int lenSeg = charInLine - startseg + 1; + if ((lenSeg == 1) && (' ' == ll.chars[startseg])) { + // Over half the segments are single characters and of these about half are space characters. + ll.positions[charInLine + 1] = vstyle.styles[ll.styles[charInLine]].spaceWidth; + } else { + surface->MeasureWidths(vstyle.styles[ll.styles[charInLine]].font, ll.chars + startseg, + charInLine - startseg + 1, ll.positions + startseg + 1); + } + } + } else { // invisible + for (int posToZero = startseg; posToZero <= (charInLine + 1); posToZero++) { + ll.positions[posToZero] = 0; } - } else { - surface->MeasureWidths(vstyle.styles[ll.styles[charInLine]].font, ll.chars + startseg, - charInLine - startseg + 1, ll.positions + startseg + 1); } for (int posToIncrease = startseg; posToIncrease <= (charInLine + 1); posToIncrease++) { ll.positions[posToIncrease] += startsegx; @@ -760,10 +821,11 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou ll.numCharsInLine = numCharsInLine; } -void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, PRectangle rcLine, LineLayout &ll) { - +void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, + PRectangle rcLine, LineLayout &ll) { + PRectangle rcSegment = rcLine; - + // Using one font for all control characters so it can be controlled independently to ensure // the box goes around the characters tightly. Seems to be no way to work out what height // is taken by an individual character - internal leading gives varying results. @@ -784,12 +846,14 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, marks = pdoc->GetMark(line) & vsDraw.maskInLine; } + bool inIndentation = true; + int indentWidth = pdoc->indentInChars * vsDraw.spaceWidth; + if (indentWidth == 0) + indentWidth = pdoc->tabInChars * vsDraw.spaceWidth; + int posLineStart = pdoc->LineStart(line); int posLineEnd = pdoc->LineStart(line + 1); - int selStart = SelectionStart(line); - int selEnd = SelectionEnd(line); - int styleMask = pdoc->stylingBitsMask; int startseg = 0; for (int i = 0; i < ll.numCharsInLine; i++) { @@ -798,37 +862,57 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, // If there is the end of a style run for any reason if ((ll.styles[i] != ll.styles[i + 1]) || IsControlCharacter(ll.chars[i]) || IsControlCharacter(ll.chars[i + 1]) || - ((selStart != selEnd) && ((iDoc + 1 == selStart) || (iDoc + 1 == selEnd))) || - (i == (theEdge-1))) { + ((ll.selStart != ll.selEnd) && ((iDoc + 1 == ll.selStart) || (iDoc + 1 == ll.selEnd))) || + (i == (ll.edgeColumn - 1))) { int styleMain = ll.styles[i]; Colour textBack = vsDraw.styles[styleMain].back.allocated; Colour textFore = vsDraw.styles[styleMain].fore.allocated; Font &textFont = vsDraw.styles[styleMain].font; - bool inSelection = (iDoc >= selStart) && (iDoc < selEnd) && (selStart != selEnd); - if (inSelection && !hideSelection) { - if (vsDraw.selbackset) - textBack = vsDraw.selbackground.allocated; + bool inSelection = (iDoc >= ll.selStart) && (iDoc < ll.selEnd) && (ll.selStart != ll.selEnd); + if (inSelection) { + if (vsDraw.selbackset) { + if (primarySelection) + textBack = vsDraw.selbackground.allocated; + else + textBack = vsDraw.selbackground2.allocated; + } if (vsDraw.selforeset) textFore = vsDraw.selforeground.allocated; } else { if (marks) textBack = markBack; - if ((edgeState == EDGE_BACKGROUND) && (i >= theEdge) && (ll.chars[i] != '\n') && (ll.chars[i] != '\r')) - textBack = vs.edgecolour.allocated; + if ((vsDraw.edgeState == EDGE_BACKGROUND) && (i >= ll.edgeColumn) && (ll.chars[i] != '\n') && (ll.chars[i] != '\r')) + textBack = vsDraw.edgecolour.allocated; } // Manage tab display if (ll.chars[i] == '\t') { rcSegment.left = ll.positions[i] + xStart; rcSegment.right = ll.positions[i + 1] + xStart; surface->FillRectangle(rcSegment, textBack); - if (vsDraw.viewWhitespace) { + if ((vsDraw.viewWhitespace != wsInvisible) || ((inIndentation && vsDraw.viewIndentationGuides))) { surface->PenColour(textFore); - PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, - rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); - DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); } - // Manage control character display - } else if (IsControlCharacter(ll.chars[i])) { + if (inIndentation && vsDraw.viewIndentationGuides) { + for (int xIG = ll.positions[i] / indentWidth * indentWidth; xIG < ll.positions[i + 1]; xIG += indentWidth) { + if (xIG >= ll.positions[i] && xIG > 0) { + Point from(0, ((lineVisible & 1) && (vsDraw.lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea(xIG + xStart + 1, rcSegment.top, xIG + xStart + 2, rcSegment.bottom); + surface->Copy(rcCopyArea, from, (ll.xHighlightGuide == xIG) ? + pixmapIndentGuideHighlight : pixmapIndentGuide); + } + } + } + if (vsDraw.viewWhitespace != wsInvisible) { + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, + rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); + DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); + } + } + // Manage control character display + } + else if (IsControlCharacter(ll.chars[i])) { + inIndentation = false; const char *ctrlChar = ControlCharacterString(ll.chars[i]); rcSegment.left = ll.positions[i] + xStart; rcSegment.right = ll.positions[i + 1] + xStart; @@ -847,30 +931,52 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, rcChar.left++; rcChar.right--; surface->DrawTextClipped(rcChar, ctrlCharsFont, - rcSegment.top + vsDraw.maxAscent, ctrlChar, strlen(ctrlChar), - textBack, textFore); - // Manage normal display + rcSegment.top + vsDraw.maxAscent, ctrlChar, strlen(ctrlChar), + textBack, textFore); + // Manage normal display } else { rcSegment.left = ll.positions[startseg] + xStart; rcSegment.right = ll.positions[i + 1] + xStart; - // Only try do draw if really visible - enhances performance by not calling environment to + // Only try to draw if really visible - enhances performance by not calling environment to // draw strings that are completely past the right side of the window. if (rcSegment.left <= rcLine.right) { surface->DrawText(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, ll.chars + startseg, i - startseg + 1, textFore, textBack); - if (vsDraw.viewWhitespace) { + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides)) { for (int cpos = 0; cpos <= i - startseg; cpos++) { if (ll.chars[cpos + startseg] == ' ') { - int xmid = (ll.positions[cpos + startseg] + ll.positions[cpos + startseg + 1]) / 2; - PRectangle rcDot(xmid + xStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); - rcDot.right = rcDot.left + 1; - rcDot.bottom = rcDot.top + 1; - surface->FillRectangle(rcDot, textFore); + if (vsDraw.viewWhitespace != wsInvisible) { + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + int xmid = (ll.positions[cpos + startseg] + ll.positions[cpos + startseg + 1]) / 2; + PRectangle rcDot(xmid + xStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); + rcDot.right = rcDot.left + 1; + rcDot.bottom = rcDot.top + 1; + surface->FillRectangle(rcDot, textFore); + } + } + if (inIndentation && vsDraw.viewIndentationGuides) { + int startSpace = ll.positions[cpos + startseg]; + if (startSpace > 0 && (startSpace % indentWidth == 0)) { + Point from(0, ((lineVisible & 1) && (vsDraw.lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea(startSpace + xStart + 1, rcSegment.top, startSpace + xStart + 2, rcSegment.bottom); + surface->Copy(rcCopyArea, from, (ll.xHighlightGuide == ll.positions[cpos + startseg]) ? + pixmapIndentGuideHighlight : pixmapIndentGuide); + } + } + } else { + inIndentation = false; } } } } + if (vsDraw.styles[styleMain].underline) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + surface->FillRectangle(rcUL, textFore); + } } startseg = i + 1; } @@ -881,10 +987,10 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, for (int indica = 0; indica <= INDIC_MAX; indica++) indStart[indica] = 0; - for (int indicPos = 0; indicPos <= ll.numCharsInLine; indicPos++) { + for (int indicPos = 0; indicPos < ll.numCharsInLine; indicPos++) { if (ll.indicators[indicPos] != ll.indicators[indicPos + 1]) { int mask = 1 << pdoc->stylingBits; - for (int indicnum = 0; mask <= 0x100; indicnum++) { + for (int indicnum = 0; mask < 0x100; indicnum++) { if ((ll.indicators[indicPos + 1] & mask) && !(ll.indicators[indicPos] & mask)) { indStart[indicnum] = ll.positions[indicPos + 1]; } @@ -906,9 +1012,12 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, int xEol = ll.positions[ll.numCharsInLine]; rcSegment.left = xEol + xStart; rcSegment.right = xEol + vsDraw.aveCharWidth + xStart; - bool eolInSelection = (posLineEnd > selStart) && (posLineEnd <= selEnd) && (selStart != selEnd); - if (eolInSelection && !hideSelection && vsDraw.selbackset && (line < pdoc->LinesTotal()-1)) { - surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); + bool eolInSelection = (posLineEnd > ll.selStart) && (posLineEnd <= ll.selEnd) && (ll.selStart != ll.selEnd); + if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1)) { + if (primarySelection) + surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); + else + surface->FillRectangle(rcSegment, vsDraw.selbackground2.allocated); } else if (marks) { surface->FillRectangle(rcSegment, markBack); } else { @@ -924,12 +1033,12 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, } else { surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); } - - if (edgeState == EDGE_LINE) { - int edgeX = theEdge * vsDraw.spaceWidth; + + if (vsDraw.edgeState == EDGE_LINE) { + int edgeX = ll.edgeColumn * vsDraw.spaceWidth; rcSegment.left = edgeX + xStart; rcSegment.right = rcSegment.left + 1; - surface->FillRectangle(rcSegment, vs.edgecolour.allocated); + surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated); } } @@ -960,6 +1069,22 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { pixmapSelPattern.FillRectangle(rcPattern, vs.selbarlight.allocated); } } + if (!pixmapIndentGuide.Initialised()) { + // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line + pixmapIndentGuide.InitPixMap(1, vs.lineHeight + 1, surfaceWindow); + pixmapIndentGuideHighlight.InitPixMap(1, vs.lineHeight + 1, surfaceWindow); + PRectangle rcIG(0, 0, 1, vs.lineHeight); + pixmapIndentGuide.FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back.allocated); + pixmapIndentGuide.PenColour(vs.styles[STYLE_INDENTGUIDE].fore.allocated); + pixmapIndentGuideHighlight.FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back.allocated); + pixmapIndentGuideHighlight.PenColour(vs.styles[STYLE_BRACELIGHT].fore.allocated); + for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) { + pixmapIndentGuide.MoveTo(0, stripe); + pixmapIndentGuide.LineTo(2, stripe); + pixmapIndentGuideHighlight.MoveTo(0, stripe); + pixmapIndentGuideHighlight.LineTo(2, stripe); + } + } if (bufferedDraw) { if (!pixmapLine.Initialised()) { @@ -979,7 +1104,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { int screenLinePaintFirst = rcArea.top / vs.lineHeight; // The area to be painted plus one extra line is styled. // The extra line is to determine when a style change, such as statrting a comment flows on to other lines. - int lineStyleLast = topLine + (rcArea.bottom-1) / vs.lineHeight + 1; + int lineStyleLast = topLine + (rcArea.bottom - 1) / vs.lineHeight + 1; //Platform::DebugPrintf("Paint lines = %d .. %d\n", topLine + screenLinePaintFirst, lineStyleLast); int endPosPaint = pdoc->Length(); if (lineStyleLast < cs.LinesDisplayed()) @@ -991,39 +1116,37 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ypos += screenLinePaintFirst * vs.lineHeight; int yposScreen = screenLinePaintFirst * vs.lineHeight; - if (endPosPaint > pdoc->GetEndStyled()) { - // Notify container to do some more styling - NotifyStyleNeeded(endPosPaint); - } + // Ensure we are styled as far as we are painting. + pdoc->EnsureStyledTo(endPosPaint); + if (needUpdateUI) { NotifyUpdateUI(); needUpdateUI = false; } - + PaintSelMargin(surfaceWindow, rcArea); PRectangle rcRightMargin = rcClient; rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; if (rcArea.Intersects(rcRightMargin)) { - surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated); + surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated); } if (paintState == paintAbandoned) { - // Either NotifyStyleNeeded or NotifyUpdateUI noticed that painting is needed + // Either styling or NotifyUpdateUI noticed that painting is needed // outside the current painting rectangle //Platform::DebugPrintf("Abandoning paint\n"); - return; + return ; } //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); - Surface *surface = 0; if (rcArea.right > vs.fixedColumnWidth) { + Surface *surface = surfaceWindow; if (bufferedDraw) { surface = &pixmapLine; - } else { - surface = surfaceWindow; } + surface->SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); int visibleLine = topLine + screenLinePaintFirst; int line = cs.DocFromDisplay(visibleLine); @@ -1040,7 +1163,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { rcTextArea.right -= vs.rightMarginWidth; surfaceWindow->SetClip(rcTextArea); //GTimer *tim=g_timer_new(); - while (visibleLine <= cs.LinesDisplayed() && yposScreen < rcArea.bottom) { + while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) { //g_timer_start(tim); //Platform::DebugPrintf("Painting line %d\n", line); @@ -1056,34 +1179,64 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // and determine the x position at which each character starts. LineLayout ll; LayoutLine(line, surface, vs, ll); - + // Highlight the current braces if any - if ((braces[0] >= posLineStart) && (braces[0] < posLineEnd)) - ll.styles[braces[0] - posLineStart] = bracesMatchStyle; - if ((braces[1] >= posLineStart) && (braces[1] < posLineEnd)) - ll.styles[braces[1] - posLineStart] = bracesMatchStyle; - + if ((braces[0] >= posLineStart) && (braces[0] < posLineEnd)) { + int braceOffset = braces[0] - posLineStart; + if (braceOffset < ll.numCharsInLine) + ll.styles[braceOffset] = static_cast(bracesMatchStyle); + } + if ((braces[1] >= posLineStart) && (braces[1] < posLineEnd)) { + int braceOffset = braces[1] - posLineStart; + if (braceOffset < ll.numCharsInLine) + ll.styles[braceOffset] = static_cast(bracesMatchStyle); + } + if ((braces[0] >= posLineStart && braces[1] <= posLineEnd) || + (braces[1] >= posLineStart && braces[0] <= posLineEnd)) { + ll.xHighlightGuide = highlightGuideColumn * vs.spaceWidth; + } + + ll.selStart = SelectionStart(line); + ll.selEnd = SelectionEnd(line); + if (hideSelection) { + ll.selStart = -1; + ll.selEnd = -1; + } + // Need to fix this up so takes account of Unicode and DBCS + ll.edgeColumn = theEdge; + // Draw the line if (cs.GetVisible(line)) - DrawLine(surface, vs, line, xStart, rcLine, ll); + DrawLine(surface, vs, line, visibleLine, xStart, rcLine, ll); - if (foldFlags & 2) { + bool expanded = cs.GetExpanded(line); + if ( (expanded && (foldFlags & 2)) || (!expanded && (foldFlags & 4)) ) { if (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) { PRectangle rcFoldLine = rcLine; rcFoldLine.bottom = rcFoldLine.top + 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } } - + if ( (expanded && (foldFlags & 8)) || (!expanded && (foldFlags & 16)) ) { + if (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + // Draw the Caret if (line == lineCaret) { - int xposCaret = ll.positions[posCaret - posLineStart] + xStart; - int widthOverstrikeCaret = - ll.positions[posCaret - posLineStart + 1] - ll.positions[posCaret - posLineStart]; - if (posCaret == pdoc->Length()) // At end of document + int offset = Platform::Minimum(posCaret - posLineStart, LineLayout::maxLineLength); + int xposCaret = ll.positions[offset] + xStart; + int widthOverstrikeCaret; + if (posCaret == pdoc->Length()) { // At end of document widthOverstrikeCaret = vs.aveCharWidth; - if ((posCaret - posLineStart) >= ll.numCharsInLine) // At end of line + } else if ((posCaret - posLineStart) >= ll.numCharsInLine) { // At end of line widthOverstrikeCaret = vs.aveCharWidth; + } else { + widthOverstrikeCaret = ll.positions[offset + 1] - ll.positions[offset]; + } if (widthOverstrikeCaret < 3) // Make sure its visible widthOverstrikeCaret = 3; if (((caret.active && caret.on) || (posDrag >= 0)) && xposCaret >= 0) { @@ -1104,12 +1257,12 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { surface->FillRectangle(rcCaret, vs.caretcolour.allocated); } } - + if (cs.GetVisible(line)) { if (bufferedDraw) { Point from(vs.fixedColumnWidth, 0); PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, - rcClient.right, yposScreen + vs.lineHeight); + rcClient.right, yposScreen + vs.lineHeight); surfaceWindow->Copy(rcCopyArea, from, pixmapLine); } } @@ -1126,13 +1279,14 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //Platform::DebugPrintf("Paint [%0d] took %g\n", line, g_timer_elapsed(tim, 0)); } //g_timer_destroy(tim); + PRectangle rcBeyondEOF = rcClient; rcBeyondEOF.left = vs.fixedColumnWidth; rcBeyondEOF.right = rcBeyondEOF.right; rcBeyondEOF.top = (cs.LinesDisplayed() - topLine) * vs.lineHeight; if (rcBeyondEOF.top < rcBeyondEOF.bottom) { surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back.allocated); - if (edgeState == EDGE_LINE) { + if (vs.edgeState == EDGE_LINE) { int edgeX = theEdge * vs.spaceWidth; rcBeyondEOF.left = edgeX + xStart; rcBeyondEOF.right = rcBeyondEOF.left + 1; @@ -1145,24 +1299,40 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // Space (3 space characters) between line numbers and text when printing. #define lineNumberPrintSpace " " +Colour InvertedLight(Colour orig) { + unsigned int r = orig.GetRed(); + unsigned int g = orig.GetGreen(); + unsigned int b = orig.GetBlue(); + unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye + unsigned int il = 0xff - l; + if (l == 0) + return Colour(0xff, 0xff, 0xff); + r = r * il / l; + g = g * il / l; + b = b * il / l; + return Colour(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); +} + // This is mostly copied from the Paint method but with some things omitted // such as the margin markers, line numbers, selection and caret // Should be merged back into a combined Draw method. -long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { +long Editor::FormatRange(bool draw, RangeToFormat *pfr) { if (!pfr) return 0; Surface *surface = new Surface(); surface->Init(pfr->hdc); + surface->SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); Surface *surfaceMeasure = new Surface(); surfaceMeasure->Init(pfr->hdcTarget); - + surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == pdoc->dbcsCodePage); + ViewStyle vsPrint(vs); - + // Modify the view style for printing as do not normally want any of the transient features to be printed // Printing supports only the line number margin. int lineNumberIndex = -1; - for (int margin=0; margin < ViewStyle::margins; margin++) { + for (int margin = 0; margin < ViewStyle::margins; margin++) { if ((!vsPrint.ms[margin].symbol) && (vsPrint.ms[margin].width > 0)) { lineNumberIndex = margin; } else { @@ -1171,13 +1341,24 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { } vsPrint.showMarkedLines = false; vsPrint.fixedColumnWidth = 0; - vsPrint.zoomLevel = 0; + vsPrint.zoomLevel = printMagnification; + vsPrint.viewIndentationGuides = false; // Don't show the selection when printing vsPrint.selbackset = false; vsPrint.selforeset = false; // White background for the line numbers - vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff,0xff,0xff); - + vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff, 0xff, 0xff); + for (int sty = 0;sty <= STYLE_MAX;sty++) { + if (printColourMode == SC_PRINT_INVERTLIGHT) { + vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired); + vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired); + } else if (printColourMode == SC_PRINT_BLACKONWHITE) { + vsPrint.styles[sty].fore.desired = Colour(0, 0, 0); + vsPrint.styles[sty].back.desired = Colour(0xff, 0xff, 0xff); + } + } + vsPrint.styles[STYLE_LINENUMBER].back.desired = Colour(0xff, 0xff, 0xff); + vsPrint.Refresh(*surfaceMeasure); // Ensure colours are set up vsPrint.RefreshColourPalette(palette, true); @@ -1185,8 +1366,8 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { // Determining width must hapen after fonts have been realised in Refresh int lineNumberWidth = 0; if (lineNumberIndex >= 0) { - lineNumberWidth = surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, - "9999" lineNumberPrintSpace, 4 + strlen(lineNumberPrintSpace)); + lineNumberWidth = surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, + "9999" lineNumberPrintSpace, 4 + strlen(lineNumberPrintSpace)); vsPrint.ms[lineNumberIndex].width = lineNumberWidth; } @@ -1204,10 +1385,9 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { if (linePrintLast < pdoc->LinesTotal()) endPosPrint = pdoc->LineStart(linePrintLast + 1); - if (endPosPrint > pdoc->GetEndStyled()) { - // Notify container to do some more styling - NotifyStyleNeeded(endPosPrint); - } + // Ensure we are styled to where we are formatting. + pdoc->EnsureStyledTo(endPosPrint); + int xStart = vsPrint.fixedColumnWidth + pfr->rc.left + lineNumberWidth; int ypos = pfr->rc.top; int line = linePrintStart; @@ -1221,28 +1401,39 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { rcLine.top = ypos; rcLine.right = pfr->rc.right; rcLine.bottom = ypos + vsPrint.lineHeight; - + if (lineNumberWidth) { char number[100]; sprintf(number, "%d" lineNumberPrintSpace, line + 1); PRectangle rcNumber = rcLine; rcNumber.right = rcNumber.left + lineNumberWidth; // Right justify - rcNumber.left += lineNumberWidth - - surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, number, strlen(number)); + rcNumber.left -= + surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, number, strlen(number)); surface->DrawText(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, ypos + vsPrint.maxAscent, number, strlen(number), - vsPrint.styles[STYLE_LINENUMBER].fore.allocated, - vsPrint.styles[STYLE_LINENUMBER].back.allocated); + vsPrint.styles[STYLE_LINENUMBER].fore.allocated, + vsPrint.styles[STYLE_LINENUMBER].back.allocated); } - + + // When printing, the hdc and hdcTarget may be the same, so + // changing the state of surfaceMeasure may change the underlying + // state of surface. Therefore, any cached state is discarded before + // using each surface. + // Copy this line and its styles from the document into local arrays // and determine the x position at which each character starts. + surfaceMeasure->FlushCachedState(); LineLayout ll; LayoutLine(line, surfaceMeasure, vsPrint, ll); - + ll.selStart = -1; + ll.selEnd = -1; + // Need to fix this up so takes account of Unicode and DBCS + ll.edgeColumn = theEdge; + // Draw the line - DrawLine(surface, vsPrint, line, xStart, rcLine, ll); + surface->FlushCachedState(); + DrawLine(surface, vsPrint, line, line, xStart, rcLine, ll); ypos += vsPrint.lineHeight; line++; @@ -1255,6 +1446,10 @@ long Editor::FormatRange(bool draw, FORMATRANGE *pfr) { return endPosPrint; } +// Empty method is overridden on GTK+ to show / hide scrollbars +void Editor::ReconfigureScrollBars() {} + + void Editor::SetScrollBarsTo(PRectangle) { RefreshStyleData(); @@ -1274,12 +1469,20 @@ void Editor::SetScrollBarsTo(PRectangle) { //Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage); } + void Editor::SetScrollBars() { PRectangle rsClient = GetClientRectangle(); SetScrollBarsTo(rsClient); } void Editor::AddChar(char ch) { + char s[2]; + s[0] = ch; + s[1] = '\0'; + AddCharUTF(s, 1); +} + +void Editor::AddCharUTF(char *s, unsigned int len) { bool wasSelection = currentPos != anchor; ClearSelection(); if (inOverstrike && !wasSelection) { @@ -1289,11 +1492,13 @@ void Editor::AddChar(char ch) { } } } - pdoc->InsertChar(currentPos, ch); - SetEmptySelection(currentPos + 1); + pdoc->InsertString(currentPos, s, len); + SetEmptySelection(currentPos + len); EnsureCaretVisible(); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); SetLastXChosen(); - NotifyChar(ch); + NotifyChar(s[0]); } void Editor::ClearSelection() { @@ -1302,8 +1507,7 @@ void Editor::ClearSelection() { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int startPos = SelectionStart(); - int line; - for (line=lineStart; line <= lineEnd; line++) { + for (int line = lineEnd; line >= lineStart; line--) { startPos = SelectionStart(line); unsigned int chars = SelectionEnd(line) - startPos; if (0 != chars) { @@ -1334,6 +1538,13 @@ void Editor::ClearAll() { SetVerticalScrollPos(); } +void Editor::ClearDocumentStyle() { + pdoc->StartStyling(0, '\377'); + pdoc->SetStyleFor(pdoc->Length(), 0); + cs.ShowAll(); + pdoc->ClearLevels(); +} + void Editor::Cut() { Copy(); ClearSelection(); @@ -1345,9 +1556,9 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) { int xInsert = XFromPosition(currentPos); int line = pdoc->LineFromPosition(currentPos); bool prevCr = false; - for (int i=0; i= pdoc->LinesTotal()) { if (pdoc->eolMode != SC_EOL_LF) @@ -1358,7 +1569,7 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) { currentPos = PositionFromLineX(line, xInsert); prevCr = ptr[i] == '\r'; } else { - pdoc->InsertString(currentPos, ptr+i, 1); + pdoc->InsertString(currentPos, ptr + i, 1); currentPos++; insertPos = currentPos; prevCr = false; @@ -1383,6 +1594,7 @@ void Editor::SelectAll() { void Editor::Undo() { if (pdoc->CanUndo()) { + InvalidateCaret(); int newPos = pdoc->Undo(); SetEmptySelection(newPos); EnsureCaretVisible(); @@ -1399,6 +1611,8 @@ void Editor::Redo() { void Editor::DelChar() { pdoc->DelChar(currentPos); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); } void Editor::DelCharBack() { @@ -1409,18 +1623,24 @@ void Editor::DelCharBack() { ClearSelection(); SetEmptySelection(currentPos); } + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); } -void Editor::NotifyFocus(bool) { -} +void Editor::NotifyFocus(bool) {} -void Editor::NotifyStyleNeeded(int endStyleNeeded) { + +void Editor::NotifyStyleToNeeded(int endStyleNeeded) { SCNotification scn; scn.nmhdr.code = SCN_STYLENEEDED; scn.position = endStyleNeeded; NotifyParent(scn); } +void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) { + NotifyStyleToNeeded(endStyleNeeded); +} + void Editor::NotifyChar(char ch) { SCNotification scn; scn.nmhdr.code = SCN_CHARADDED; @@ -1431,9 +1651,9 @@ void Editor::NotifyChar(char ch) { char txt[2]; txt[0] = ch; txt[1] = '\0'; - NotifyMacroRecord(EM_REPLACESEL, 0, (LPARAM) txt); + NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast(txt)); } -#endif +#endif } void Editor::NotifySavePoint(bool isSavePoint) { @@ -1467,7 +1687,7 @@ void Editor::NotifyUpdateUI() { bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { int marginClicked = -1; int x = 0; - for (int margin=0; margin < ViewStyle::margins; margin++) { + for (int margin = 0; margin < ViewStyle::margins; margin++) { if ((pt.x > x) && (pt.x < x + vs.ms[margin].width)) marginClicked = margin; x += vs.ms[margin].width; @@ -1500,6 +1720,13 @@ void Editor::NotifyModifyAttempt(Document*, void *) { NotifyModifyAttempt(); } +void Editor::NotifyMove(int position) { + SCNotification scn; + scn.nmhdr.code = SCN_POSCHANGED; + scn.position = position; + NotifyParent(scn); +} + void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) { //Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off"); NotifySavePoint(atSavePoint); @@ -1563,13 +1790,21 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { } } } + if (cs.LinesDisplayed() < cs.LinesInDoc()) { + // Some lines are hidden so may need shown. + // TODO: check if the modified area is hidden. + if (mh.modificationType & SC_MOD_BEFOREINSERT) { + NotifyNeedShown(mh.position, 0); + } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { + NotifyNeedShown(mh.position, mh.length); + } + } if (mh.linesAdded != 0) { // Update contraction state for inserted and removed lines // lineOfPos should be calculated in context of state before modification, shouldn't it int lineOfPos = pdoc->LineFromPosition(mh.position); if (mh.linesAdded > 0) { - NotifyNeedShown(mh.position, mh.length); cs.InsertLines(lineOfPos, mh.linesAdded); } else { cs.DeleteLines(lineOfPos, -mh.linesAdded); @@ -1582,7 +1817,7 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { SetVerticalScrollPos(); } } - + //Platform::DebugPrintf("** %x Doc Changed\n", this); // TODO: could invalidate from mh.startModification to end of screen //InvalidateRange(mh.position, mh.position + mh.length); @@ -1599,12 +1834,17 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { SetScrollBars(); } + if (mh.modificationType & SC_MOD_CHANGEMARKER) { + RedrawSelMargin(); + } + // If client wants to see this modification if (mh.modificationType & modEventMask) { if ((mh.modificationType & SC_MOD_CHANGESTYLE) == 0) { // Real modification made to text of document. NotifyChange(); // Send EN_CHANGE } + SCNotification scn; scn.nmhdr.code = SCN_MODIFIED; scn.position = mh.position; @@ -1619,20 +1859,20 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { } } -void Editor::NotifyDeleted(Document *document, void *userData) { +void Editor::NotifyDeleted(Document *, void *) { /* Do nothing */ } #ifdef MACRO_SUPPORT -void Editor::NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam) { +void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam) { // Enumerates all macroable messages switch (iMessage) { - case WM_CUT: - case WM_COPY: - case WM_PASTE: - case WM_CLEAR: - case EM_REPLACESEL: + case SCI_CUT: + case SCI_COPY: + case SCI_PASTE: + case SCI_CLEAR: + case SCI_REPLACESEL: case SCI_ADDTEXT: case SCI_INSERTTEXT: case SCI_CLEARALL: @@ -1677,12 +1917,18 @@ void Editor::NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_VCHOMEEXTEND: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: break; - // Filter out all others (display changes, etc) + // Filter out all others (display changes, etc) default: -// printf("Filtered out %ld of macro recording\n", iMessage); - return; + // printf("Filtered out %ld of macro recording\n", iMessage); + + return ; } // Send notification @@ -1693,13 +1939,13 @@ void Editor::NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam) { scn.lParam = lParam; NotifyParent(scn); } -#endif +#endif // Force scroll and keep position relative to top of window void Editor::PageMove(int direction, bool extend) { Point pt = LocationFromPosition(currentPos); int topLineNew = Platform::Clamp( - topLine + direction * LinesToScroll(), 0, MaxScrollPos()); + topLine + direction * LinesToScroll(), 0, MaxScrollPos()); int newPos = PositionFromLocation( Point(lastXChosen, pt.y + direction * (vs.lineHeight * LinesToScroll()))); if (topLineNew != topLine) { @@ -1712,7 +1958,64 @@ void Editor::PageMove(int direction, bool extend) { } } -int Editor::KeyCommand(UINT iMessage) { +void Editor::ChangeCaseOfSelection(bool makeUpperCase) { + pdoc->BeginUndoAction(); + int startCurrent = currentPos; + int startAnchor = anchor; + if (selType == selRectangle) { + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + for (int line = lineEnd; line >= lineStart; line--) { + pdoc->ChangeCase( + Range(SelectionStart(line), SelectionEnd(line)), + makeUpperCase); + } + // Would be nicer to keep the rectangular selection but this is complex + selType = selStream; + SetSelection(startCurrent, startCurrent); + } else { + pdoc->ChangeCase(Range(SelectionStart(), SelectionEnd()), + makeUpperCase); + SetSelection(startCurrent, startAnchor); + } + pdoc->EndUndoAction(); +} + + +void Editor::LineTranspose() { + int line = pdoc->LineFromPosition(currentPos); + if (line > 0) { + int startPrev = pdoc->LineStart(line - 1); + int endPrev = pdoc->LineEnd(line - 1); + int start = pdoc->LineStart(line); + int end = pdoc->LineEnd(line); + int startNext = pdoc->LineStart(line + 1); + if (end < pdoc->Length()) { + end = startNext; + char *thisLine = CopyRange(start, end); + pdoc->DeleteChars(start, end - start); + pdoc->InsertString(startPrev, thisLine, end - start); + MovePositionTo(startPrev + end - start); + delete []thisLine; + } else { + // Last line so line has no line end + char *thisLine = CopyRange(start, end); + char *prevEnd = CopyRange(endPrev, start); + pdoc->DeleteChars(endPrev, end - endPrev); + pdoc->InsertString(startPrev, thisLine, end - start); + pdoc->InsertString(startPrev + end - start, prevEnd, start - endPrev); + MovePositionTo(startPrev + end - endPrev); + delete []thisLine; + delete []prevEnd; + } + + } +} + +void Editor::CancelModes() {} + + +int Editor::KeyCommand(unsigned int iMessage) { Point pt = LocationFromPosition(currentPos); switch (iMessage) { @@ -1724,6 +2027,10 @@ int Editor::KeyCommand(UINT iMessage) { MovePositionTo(PositionFromLocation( Point(lastXChosen, pt.y + vs.lineHeight)), true); break; + case SCI_LINESCROLLDOWN: + ScrollTo(topLine + 1); + MoveCaretInsideView(); + break; case SCI_LINEUP: MovePositionTo(PositionFromLocation( Point(lastXChosen, pt.y - vs.lineHeight))); @@ -1732,6 +2039,10 @@ int Editor::KeyCommand(UINT iMessage) { MovePositionTo(PositionFromLocation( Point(lastXChosen, pt.y - vs.lineHeight)), true); break; + case SCI_LINESCROLLUP: + ScrollTo(topLine - 1); + MoveCaretInsideView(); + break; case SCI_CHARLEFT: if (SelectionEmpty()) { MovePositionTo(MovePositionSoVisible(currentPos - 1, -1)); @@ -1820,20 +2131,26 @@ int Editor::KeyCommand(UINT iMessage) { inOverstrike = !inOverstrike; DropCaret(); ShowCaretAtCurrentPosition(); + NotifyUpdateUI(); break; - case SCI_CANCEL: // Cancel any modes - handled in subclass + case SCI_CANCEL: // Cancel any modes - handled in subclass // Also unselect text - SetEmptySelection(currentPos); + CancelModes(); break; case SCI_DELETEBACK: DelCharBack(); + SetLastXChosen(); EnsureCaretVisible(); break; case SCI_TAB: Indent(true); + SetLastXChosen(); + EnsureCaretVisible(); break; case SCI_BACKTAB: Indent(false); + SetLastXChosen(); + EnsureCaretVisible(); break; case SCI_NEWLINE: ClearSelection(); @@ -1879,13 +2196,46 @@ int Editor::KeyCommand(UINT iMessage) { int startWord = pdoc->NextWordStart(currentPos, -1); pdoc->DeleteChars(startWord, currentPos - startWord); MovePositionTo(startWord); + SetLastXChosen(); } break; case SCI_DELWORDRIGHT: { int endWord = pdoc->NextWordStart(currentPos, 1); pdoc->DeleteChars(currentPos, endWord - currentPos); + MovePositionTo(currentPos); } break; + case SCI_LINECUT: { + int lineStart = pdoc->LineFromPosition(currentPos); + int lineEnd = pdoc->LineFromPosition(anchor); + if (lineStart > lineEnd) { + int t = lineEnd; + lineEnd = lineStart; + lineStart = t; + } + int start = pdoc->LineStart(lineStart); + int end = pdoc->LineStart(lineEnd + 1); + SetSelection(start, end); + Cut(); + } + break; + case SCI_LINEDELETE: { + int line = pdoc->LineFromPosition(currentPos); + int start = pdoc->LineStart(line); + int end = pdoc->LineStart(line + 1); + pdoc->DeleteChars(start, end - start); + MovePositionTo(start); + } + break; + case SCI_LINETRANSPOSE: + LineTranspose(); + break; + case SCI_LOWERCASE: + ChangeCaseOfSelection(false); + break; + case SCI_UPPERCASE: + ChangeCaseOfSelection(true); + break; } return 0; } @@ -1904,11 +2254,11 @@ int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt) { return KeyDefault(key, modifiers); } -void Editor::SetWhitespaceVisible(bool view) { - vs.viewWhitespace = view; +void Editor::SetWhitespaceVisible(int view) { + vs.viewWhitespace = static_cast(view); } -bool Editor::GetWhitespaceVisible() { +int Editor::GetWhitespaceVisible() { return vs.viewWhitespace; } @@ -1918,9 +2268,15 @@ void Editor::Indent(bool forwards) { int lineCurrentPos = pdoc->LineFromPosition(currentPos); if (lineOfAnchor == lineCurrentPos) { ClearSelection(); - pdoc->InsertChar(currentPos, '\t'); - //pdoc->InsertChar(currentPos++, '\t'); - SetEmptySelection(currentPos + 1); + if (pdoc->useTabs) { + pdoc->InsertChar(currentPos, '\t'); + SetEmptySelection(currentPos + 1); + } else { + for (int i = 0; i < pdoc->tabInChars; i++) { + pdoc->InsertChar(currentPos, ' '); + } + SetEmptySelection(currentPos + pdoc->tabInChars); + } } else { int anchorPosOnLine = anchor - pdoc->LineStart(lineOfAnchor); int currentPosPosOnLine = currentPos - pdoc->LineStart(lineCurrentPos); @@ -1946,12 +2302,13 @@ void Editor::Indent(bool forwards) { } } -long Editor::FindText(UINT iMessage, WPARAM wParam, LPARAM lParam) { - FINDTEXTEX *ft = reinterpret_cast(lParam); +long Editor::FindText(unsigned int iMessage, unsigned long wParam, long lParam) { + TextToFind *ft = reinterpret_cast(lParam); int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText, - wParam & FR_MATCHCASE, wParam & FR_WHOLEWORD); + wParam & SCFIND_MATCHCASE, wParam & SCFIND_WHOLEWORD, + wParam & SCFIND_WORDSTART); if (pos != -1) { - if (iMessage == EM_FINDTEXTEX) { + if (iMessage != EM_FINDTEXT) { ft->chrgText.cpMin = pos; ft->chrgText.cpMax = pos + strlen(ft->lpstrText); } @@ -1959,8 +2316,8 @@ long Editor::FindText(UINT iMessage, WPARAM wParam, LPARAM lParam) { return pos; } -// Relocatable search support : Searches relative to current selection -// point and sets the selection to the found text range with +// Relocatable search support : Searches relative to current selection +// point and sets the selection to the found text range with // each search. // Anchor following searches at current selection start: This allows @@ -1975,18 +2332,20 @@ void Editor::SearchAnchor() { // Accepts both SCI_SEARCHNEXT and SCI_SEARCHPREV. // wParam contains search modes : ORed FR_MATCHCASE and FR_WHOLEWORD. // lParam contains the text to search for. -long Editor::SearchText(UINT iMessage, WPARAM wParam, LPARAM lParam) { +long Editor::SearchText(unsigned int iMessage, unsigned long wParam, long lParam) { const char *txt = reinterpret_cast(lParam); int pos; if (iMessage == SCI_SEARCHNEXT) { - pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, - wParam & FR_MATCHCASE, - wParam & FR_WHOLEWORD); + pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, + wParam & SCFIND_MATCHCASE, + wParam & SCFIND_WHOLEWORD, + wParam & SCFIND_WORDSTART); } else { - pos = pdoc->FindText(searchAnchor, 0, txt, - wParam & FR_MATCHCASE, - wParam & FR_WHOLEWORD); + pos = pdoc->FindText(searchAnchor, 0, txt, + wParam & SCFIND_MATCHCASE, + wParam & SCFIND_WHOLEWORD, + wParam & SCFIND_WORDSTART); } if (pos != -1) { @@ -2034,7 +2393,7 @@ int Editor::SelectionRangeLength() { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int totalSize = 0; - for (int line=lineStart; line <= lineEnd; line++) { + for (int line = lineStart; line <= lineEnd; line++) { totalSize += SelectionEnd(line) - SelectionStart(line) + 1; if (pdoc->eolMode == SC_EOL_CRLF) totalSize++; @@ -2055,8 +2414,8 @@ char *Editor::CopySelectionRange() { text = new char[totalSize + 1]; if (text) { int j = 0; - for (int line=lineStart; line <= lineEnd; line++) { - for (int i=SelectionStart(line);iCharAt(i); } if (pdoc->eolMode != SC_EOL_LF) @@ -2086,7 +2445,7 @@ void Editor::CopySelectionIntoDrag() { void Editor::SetDragPosition(int newPos) { if (newPos >= 0) { - newPos = pdoc->MovePositionOutsideChar(newPos, 1); + newPos = MovePositionOutsideChar(newPos, 1); posDrop = newPos; } if (posDrag != newPos) { @@ -2104,6 +2463,7 @@ void Editor::StartDrag() { //wDraw.SetCursor(Window::cursorArrow); } + void Editor::DropAt(int position, const char *value, bool moving, bool rectangular) { //Platform::DebugPrintf("DropAt %d\n", inDragDrop); if (inDragDrop) @@ -2111,11 +2471,15 @@ void Editor::DropAt(int position, const char *value, bool moving, bool rectangul int positionWasInSelection = PositionInSelection(position); - if ((!inDragDrop) || !(0 == positionWasInSelection)) { + bool positionOnEdgeOfSelection = + (position == SelectionStart()) || (position == SelectionEnd()); + + if ((!inDragDrop) || !(0 == positionWasInSelection) || + (positionOnEdgeOfSelection && !moving)) { int selStart = SelectionStart(); int selEnd = SelectionEnd(); - + pdoc->BeginUndoAction(); int positionAfterDeletion = position; @@ -2124,7 +2488,7 @@ void Editor::DropAt(int position, const char *value, bool moving, bool rectangul if (rectangular) { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); - for (int line=lineStart; line <= lineEnd; line++) { + for (int line = lineStart; line <= lineEnd; line++) { int startPos = SelectionStart(line); int endPos = SelectionEnd(line); if (position >= startPos) { @@ -2143,14 +2507,14 @@ void Editor::DropAt(int position, const char *value, bool moving, bool rectangul ClearSelection(); } position = positionAfterDeletion; - + if (rectangular) { PasteRectangular(position, value, strlen(value)); pdoc->EndUndoAction(); // Should try to select new rectangle but it may not be a rectangle now so just select the drop position - SetSelection(position, position); + SetSelection(position, position); } else { - position = pdoc->MovePositionOutsideChar(position, currentPos - position); + position = MovePositionOutsideChar(position, currentPos - position); pdoc->InsertString(position, value); pdoc->EndUndoAction(); SetSelection(position + strlen(value), position); @@ -2170,7 +2534,7 @@ static int BeforeInOrAfter(int val, int minim, int maxim) { } int Editor::PositionInSelection(int pos) { - pos = pdoc->MovePositionOutsideChar(pos, currentPos - pos); + pos = MovePositionOutsideChar(pos, currentPos - pos); if (selType == selRectangle) { if (pos < SelectionStart()) return -1; @@ -2224,13 +2588,13 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b //Platform::DebugPrintf("Scintilla:ButtonDown %d %d = %d alt=%d\n", curTime, lastClickTime, curTime - lastClickTime, alt); ptMouseLast = pt; int newPos = PositionFromLocation(pt); - newPos = pdoc->MovePositionOutsideChar(newPos, currentPos - newPos); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); inDragDrop = false; - + bool processed = NotifyMarginClick(pt, shift, ctrl, alt); if (processed) - return; - + return ; + if (shift) { SetSelection(newPos); } @@ -2276,7 +2640,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b if (ctrl) { SelectAll(); lastClickTime = curTime; - return; + return ; } lineAnchor = LineFromLocation(pt); // While experimenting with folding turn off line selection @@ -2323,7 +2687,7 @@ void Editor::ButtonMove(Point pt) { xEndSelect = pt.x - vs.fixedColumnWidth + xOffset; ptMouseLast = pt; int movePos = PositionFromLocation(pt); - movePos = pdoc->MovePositionOutsideChar(movePos, currentPos - movePos); + movePos = MovePositionOutsideChar(movePos, currentPos - movePos); if (posDrag >= 0) { SetDragPosition(movePos); } else { @@ -2343,10 +2707,10 @@ void Editor::ButtonMove(Point pt) { int lineMove = LineFromLocation(pt); if (lineAnchor < lineMove) { SetSelection(pdoc->LineStart(lineMove + 1), - pdoc->LineStart(lineAnchor)); + pdoc->LineStart(lineAnchor)); } else { SetSelection(pdoc->LineStart(lineMove), - pdoc->LineStart(lineAnchor + 1)); + pdoc->LineStart(lineAnchor + 1)); } } } @@ -2355,8 +2719,9 @@ void Editor::ButtonMove(Point pt) { if (vs.fixedColumnWidth > 0) { // There is a margin if (PointInSelMargin(pt)) { wDraw.SetCursor(Window::cursorReverseArrow); - return; // No need to test for selection + return ; // No need to test for selection } + } // Display regular (drag) cursor over selection if (PointInSelection(pt)) @@ -2379,7 +2744,7 @@ void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { ptMouseLast = pt; SetMouseCapture(false); int newPos = PositionFromLocation(pt); - newPos = pdoc->MovePositionOutsideChar(newPos, currentPos - newPos); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); if (inDragDrop) { int selStart = SelectionStart(); int selEnd = SelectionEnd(); @@ -2441,53 +2806,53 @@ static bool IsIn(int a, int minimum, int maximum) { } static bool IsOverlap(int mina, int maxa, int minb, int maxb) { - return - IsIn(mina, minb, maxb) || - IsIn(maxa, minb, maxb) || - IsIn(minb, mina, maxa) || - IsIn(maxb, mina, maxa); + return + IsIn(mina, minb, maxb) || + IsIn(maxa, minb, maxb) || + IsIn(minb, mina, maxa) || + IsIn(maxb, mina, maxa); } void Editor::CheckForChangeOutsidePaint(Range r) { if (paintState == painting && !paintingAllText) { //Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end); if (!r.Valid()) - return; - + return ; + PRectangle rcText = GetTextRectangle(); // Determine number of lines displayed including a possible partially displayed last line int linesDisplayed = (rcText.bottom - rcText.top - 1) / vs.lineHeight + 1; int bottomLine = topLine + linesDisplayed - 1; - + int lineRangeStart = cs.DisplayFromDoc(pdoc->LineFromPosition(r.start)); int lineRangeEnd = cs.DisplayFromDoc(pdoc->LineFromPosition(r.end)); if (!IsOverlap(topLine, bottomLine, lineRangeStart, lineRangeEnd)) { //Platform::DebugPrintf("No overlap (%d-%d) with window(%d-%d)\n", // lineRangeStart, lineRangeEnd, topLine, bottomLine); - return; + return ; } - + // Assert rcPaint contained within or equal to rcText if (rcPaint.top > rcText.top) { - // does range intersect rcText.top .. rcPaint.top - int paintTopLine = ((rcPaint.top - rcText.top-1) / vs.lineHeight) + topLine; + // does range intersect rcText.top .. rcPaint.top + int paintTopLine = ((rcPaint.top - rcText.top - 1) / vs.lineHeight) + topLine; // paintTopLine is the top line of the paint rectangle or the line just above if that line is completely inside the paint rectangle if (IsOverlap(topLine, paintTopLine, lineRangeStart, lineRangeEnd)) { - //Platform::DebugPrintf("Change (%d-%d) in top npv(%d-%d)\n", + //Platform::DebugPrintf("Change (%d-%d) in top npv(%d-%d)\n", // lineRangeStart, lineRangeEnd, topLine, paintTopLine); paintState = paintAbandoned; - return; + return ; } } if (rcPaint.bottom < rcText.bottom) { // does range intersect rcPaint.bottom .. rcText.bottom - int paintBottomLine = ((rcPaint.bottom - rcText.top-1) / vs.lineHeight + 1) + topLine; + int paintBottomLine = ((rcPaint.bottom - rcText.top - 1) / vs.lineHeight + 1) + topLine; // paintTopLine is the bottom line of the paint rectangle or the line just below if that line is completely inside the paint rectangle if (IsOverlap(paintBottomLine, bottomLine, lineRangeStart, lineRangeEnd)) { - //Platform::DebugPrintf("Change (%d-%d) in bottom npv(%d-%d)\n", + //Platform::DebugPrintf("Change (%d-%d) in bottom npv(%d-%d)\n", // lineRangeStart, lineRangeEnd, paintBottomLine, bottomLine); paintState = paintAbandoned; - return; + return ; } } } @@ -2495,27 +2860,37 @@ void Editor::CheckForChangeOutsidePaint(Range r) { char BraceOpposite(char ch) { switch (ch) { - case '(': return ')'; - case ')': return '('; - case '[': return ']'; - case ']': return '['; - case '{': return '}'; - case '}': return '{'; - case '<': return '>'; - case '>': return '<'; - default: return '\0'; + case '(': + return ')'; + case ')': + return '('; + case '[': + return ']'; + case ']': + return '['; + case '{': + return '}'; + case '}': + return '{'; + case '<': + return '>'; + case '>': + return '<'; + default: + return '\0'; } } // TODO: should be able to extend styled region to find matching brace // TODO: may need to make DBCS safe // so should be moved into Document -int Editor::BraceMatch(int position, int maxReStyle) { +int Editor::BraceMatch(int position, int /*maxReStyle*/) { char chBrace = pdoc->CharAt(position); char chSeek = BraceOpposite(chBrace); - if (!chSeek) + if (chSeek == '\0') return - 1; - char styBrace = pdoc->StyleAt(position) & pdoc->stylingBitsMask; + char styBrace = static_cast( + pdoc->StyleAt(position) & pdoc->stylingBitsMask); int direction = -1; if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') direction = 1; @@ -2523,7 +2898,7 @@ int Editor::BraceMatch(int position, int maxReStyle) { position = position + direction; while ((position >= 0) && (position < pdoc->Length())) { char chAtPos = pdoc->CharAt(position); - char styAtPos = pdoc->StyleAt(position) & pdoc->stylingBitsMask; + char styAtPos = static_cast(pdoc->StyleAt(position) & pdoc->stylingBitsMask); if ((position > pdoc->GetEndStyled()) || (styAtPos == styBrace)) { if (chAtPos == chBrace) depth++; @@ -2539,12 +2914,12 @@ int Editor::BraceMatch(int position, int maxReStyle) { void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { if ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) { - if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { + if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[0])); CheckForChangeOutsidePaint(Range(pos0)); braces[0] = pos0; } - if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { + if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[1])); CheckForChangeOutsidePaint(Range(pos1)); braces[1] = pos1; @@ -2566,6 +2941,10 @@ void Editor::SetDocPointer(Document *document) { pdoc = document; } pdoc->AddRef(); + // Reset the contraction state to fully shown. + cs.Clear(); + cs.InsertLines(0, pdoc->LinesTotal() - 1); + pdoc->AddWatcher(this, 0); Redraw(); SetScrollBars(); @@ -2597,7 +2976,7 @@ void Editor::ToggleContraction(int line) { int lineMaxSubord = pdoc->GetLastChild(line); cs.SetExpanded(line, 0); if (lineMaxSubord > line) { - cs.SetVisible(line+1, lineMaxSubord, false); + cs.SetVisible(line + 1, lineMaxSubord, false); SetScrollBars(); Redraw(); } @@ -2628,30 +3007,37 @@ void Editor::EnsureLineVisible(int line) { } } -LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { +static bool ValidMargin(unsigned long wParam) { + return wParam < ViewStyle::margins; +} + + +long Editor::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { //Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam); // Optional macro recording hook #ifdef MACRO_SUPPORT if (recordingMacro) NotifyMacroRecord(iMessage, wParam, lParam); -#endif +#endif switch (iMessage) { case WM_GETTEXT: + case SCI_GETTEXT: { if (lParam == 0) return 0; char *ptr = reinterpret_cast(lParam); unsigned int iChar = 0; - for (; iChar < wParam-1; iChar++) + for (; iChar < wParam - 1; iChar++) ptr[iChar] = pdoc->CharAt(iChar); ptr[iChar] = '\0'; return iChar; } case WM_SETTEXT: + case SCI_SETTEXT: { if (lParam == 0) return FALSE; @@ -2662,32 +3048,35 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { } case WM_GETTEXTLENGTH: + case SCI_GETTEXTLENGTH: return pdoc->Length(); - case WM_NOTIFY: - //Platform::DebugPrintf("S notify %d %d\n", wParam, lParam); - break; - case WM_CUT: + case SCI_CUT: Cut(); SetLastXChosen(); break; case WM_COPY: + case SCI_COPY: Copy(); break; case WM_PASTE: + case SCI_PASTE: Paste(); SetLastXChosen(); + EnsureCaretVisible(); break; case WM_CLEAR: + case SCI_CLEAR: Clear(); SetLastXChosen(); break; case WM_UNDO: + case SCI_UNDO: Undo(); SetLastXChosen(); break; @@ -2734,26 +3123,30 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { // EM_GETPUNCTUATION // EM_SETPUNCTUATION // EM_GETTHUMB + // EM_SETTARGETDEVICE // Not supported but should be: // EM_GETEVENTMASK // EM_SETEVENTMASK // For printing: // EM_DISPLAYBAND - // EM_SETTARGETDEVICE case EM_CANUNDO: + case SCI_CANUNDO: return pdoc->CanUndo() ? TRUE : FALSE; case EM_UNDO: Undo(); + SetLastXChosen(); break; case EM_EMPTYUNDOBUFFER: + case SCI_EMPTYUNDOBUFFER: pdoc->DeleteUndoHistory(); return 0; case EM_GETFIRSTVISIBLELINE: + case SCI_GETFIRSTVISIBLELINE: return topLine; case EM_GETLINE: { @@ -2762,7 +3155,7 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { int lineStart = pdoc->LineStart(wParam); int lineEnd = pdoc->LineStart(wParam + 1); char *ptr = reinterpret_cast(lParam); - WORD *pBufSize = reinterpret_cast(lParam); + short *pBufSize = reinterpret_cast(lParam); if (*pBufSize < lineEnd - lineStart) { ptr[0] = '\0'; // If no characters copied have to put a NUL into buffer return 0; @@ -2773,21 +3166,29 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return iPlace; } + case SCI_GETLINE: { + if (lParam == 0) + return 0; + int lineStart = pdoc->LineStart(wParam); + int lineEnd = pdoc->LineStart(wParam + 1); + char *ptr = reinterpret_cast(lParam); + int iPlace = 0; + for (int iChar = lineStart; iChar < lineEnd; iChar++) + ptr[iPlace++] = pdoc->CharAt(iChar); + return iPlace; + } + case EM_GETLINECOUNT: + case SCI_GETLINECOUNT: if (pdoc->LinesTotal() == 0) return 1; else return pdoc->LinesTotal(); case EM_GETMODIFY: + case SCI_GETMODIFY: return !pdoc->IsSavePoint(); - case EM_SETMODIFY: - // Not really supported now that there is the save point stuff - //pdoc->isModified = wParam; - //return pdoc->isModified; - return false; - case EM_GETRECT: if (lParam == 0) return 0; @@ -2799,24 +3200,28 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { *reinterpret_cast(wParam) = SelectionStart(); if (lParam) *reinterpret_cast(lParam) = SelectionEnd(); - return MAKELONG(SelectionStart(), SelectionEnd()); + return Platform::LongFromTwoShorts( + static_cast(SelectionStart()), + static_cast(SelectionEnd())); case EM_EXGETSEL: { if (lParam == 0) return 0; - CHARRANGE *pCR = reinterpret_cast(lParam); + CharacterRange *pCR = reinterpret_cast(lParam); pCR->cpMin = SelectionStart(); pCR->cpMax = SelectionEnd(); } break; - case EM_SETSEL: { + case EM_SETSEL: + case SCI_SETSEL: { int nStart = static_cast(wParam); int nEnd = static_cast(lParam); if (nEnd < 0) nEnd = pdoc->Length(); if (nStart < 0) nStart = nEnd; // Remove selection + selType = selStream; SetSelection(nEnd, nStart); EnsureCaretVisible(); } @@ -2825,7 +3230,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case EM_EXSETSEL: { if (lParam == 0) return 0; - CHARRANGE *pCR = reinterpret_cast(lParam); + CharacterRange *pCR = reinterpret_cast(lParam); + selType = selStream; if (pCR->cpMax == -1) { SetSelection(pCR->cpMin, pdoc->Length()); } else { @@ -2835,7 +3241,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return pdoc->LineFromPosition(SelectionStart()); } - case EM_GETSELTEXT: { + case EM_GETSELTEXT: + case SCI_GETSELTEXT: { if (lParam == 0) return 0; char *ptr = reinterpret_cast(lParam); @@ -2851,22 +3258,6 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return iChar; } - case EM_GETWORDBREAKPROC: - return 0; - - case EM_SETWORDBREAKPROC: - break; - - case EM_LIMITTEXT: - // wParam holds the number of characters control should be limited to - break; - - case EM_GETLIMITTEXT: - return 0xffffffff; - - case EM_GETOLEINTERFACE: - return 0; - case EM_LINEFROMCHAR: if (static_cast(wParam) < 0) wParam = SelectionStart(); @@ -2877,7 +3268,13 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { lParam = SelectionStart(); // Not specified, but probably OK return pdoc->LineFromPosition(lParam); + case SCI_LINEFROMPOSITION: + if (static_cast(wParam) < 0) + return 0; + return pdoc->LineFromPosition(wParam); + case EM_LINEINDEX: + case SCI_POSITIONFROMLINE: if (static_cast(wParam) < 0) wParam = pdoc->LineFromPosition(SelectionStart()); if (wParam == 0) @@ -2888,8 +3285,7 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { // return -1; return pdoc->LineStart(wParam); - case EM_LINELENGTH: - { + case EM_LINELENGTH: { if (static_cast(wParam) < 0) // Who use this anyway? return 0; // Should be... Too complex to describe here, see MS specs! if (static_cast(wParam) > pdoc->Length()) // Useful test, anyway... @@ -2910,7 +3306,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return 0; return pdoc->LineStart(wParam + 1) - pdoc->LineStart(wParam); - case EM_REPLACESEL: { + case EM_REPLACESEL: + case SCI_REPLACESEL: { if (lParam == 0) return 0; pdoc->BeginUndoAction(); @@ -2924,22 +3321,26 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case EM_LINESCROLL: + case SCI_LINESCROLL: ScrollTo(topLine + lParam); HorizontalScrollTo(xOffset + wParam * vs.spaceWidth); return TRUE; case EM_SCROLLCARET: + case SCI_SCROLLCARET: EnsureCaretVisible(); break; case EM_SETREADONLY: + case SCI_SETREADONLY: pdoc->SetReadOnly(wParam); return TRUE; - case EM_SETRECT: - break; + case SCI_GETREADONLY: + return pdoc->IsReadOnly(); case EM_CANPASTE: + case SCI_CANPASTE: return 1; case EM_CHARFROMPOS: { @@ -2948,7 +3349,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { Point *ppt = reinterpret_cast(lParam); int pos = PositionFromLocation(*ppt); int line = pdoc->LineFromPosition(pos); - return MAKELONG(pos, line); + return Platform::LongFromTwoShorts( + static_cast(pos), static_cast < short > (line)); } case EM_POSFROMCHAR: { @@ -2964,16 +3366,34 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return 0; } + case SCI_POINTXFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.x; + } + + case SCI_POINTYFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.y; + } + case EM_FINDTEXT: return FindText(iMessage, wParam, lParam); case EM_FINDTEXTEX: + case SCI_FINDTEXT: return FindText(iMessage, wParam, lParam); - case EM_GETTEXTRANGE: { + case EM_GETTEXTRANGE: + case SCI_GETTEXTRANGE: { if (lParam == 0) return 0; - TEXTRANGE *tr = reinterpret_cast(lParam); + TextRange *tr = reinterpret_cast(lParam); int cpMax = tr->chrg.cpMax; if (cpMax == -1) cpMax = pdoc->Length(); @@ -2984,11 +3404,16 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return len; // Not including NUL } + case EM_SELECTIONTYPE: +#ifdef SEL_EMPTY if (currentPos == anchor) return SEL_EMPTY; else return SEL_TEXT; +#else + return 0; +#endif case EM_HIDESELECTION: hideSelection = wParam; @@ -2996,25 +3421,45 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case EM_FORMATRANGE: - return FormatRange(wParam, reinterpret_cast(lParam)); + case SCI_FORMATRANGE: + return FormatRange(wParam, reinterpret_cast(lParam)); case EM_GETMARGINS: - return MAKELONG(vs.leftMarginWidth, vs.rightMarginWidth); - + return Platform::LongFromTwoShorts(static_cast(vs.leftMarginWidth), + static_cast(vs.rightMarginWidth)); + + case SCI_GETMARGINLEFT: + return vs.leftMarginWidth; + + case SCI_GETMARGINRIGHT: + return vs.rightMarginWidth; + case EM_SETMARGINS: +#ifdef EC_LEFTMARGIN if (wParam & EC_LEFTMARGIN) { - vs.leftMarginWidth = LOWORD(lParam); + vs.leftMarginWidth = Platform::LowShortFromLong(lParam); } if (wParam & EC_RIGHTMARGIN) { - vs.rightMarginWidth = HIWORD(lParam); + vs.rightMarginWidth = Platform::HighShortFromLong(lParam); } if (wParam == EC_USEFONTINFO) { vs.leftMarginWidth = vs.aveCharWidth / 2; vs.rightMarginWidth = vs.aveCharWidth / 2; } InvalidateStyleRedraw(); +#endif break; - + + case SCI_SETMARGINLEFT: + vs.leftMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + + case SCI_SETMARGINRIGHT: + vs.rightMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + // Control specific mesages case SCI_ADDTEXT: { @@ -3055,15 +3500,16 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { ClearAll(); return 0; - case SCI_SETUNDOCOLLECTION: - pdoc->SetUndoCollection(static_cast(wParam)); + case SCI_CLEARDOCUMENTSTYLE: + ClearDocumentStyle(); return 0; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_APPENDUNDOSTARTACTION: - pdoc->AppendUndoStartAction(); + case SCI_SETUNDOCOLLECTION: + pdoc->SetUndoCollection(wParam); return 0; -#endif + + case SCI_GETUNDOCOLLECTION: + return pdoc->IsCollectingUndo(); case SCI_BEGINUNDOACTION: pdoc->BeginUndoAction(); @@ -3093,12 +3539,48 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_GETCHARAT: return pdoc->CharAt(wParam); + case SCI_SETCURRENTPOS: + SetSelection(wParam, anchor); + break; + case SCI_GETCURRENTPOS: return currentPos; + case SCI_SETANCHOR: + SetSelection(currentPos, wParam); + break; + case SCI_GETANCHOR: return anchor; + case SCI_SETSELECTIONSTART: + SetSelection(Platform::Maximum(currentPos, wParam), wParam); + break; + + case SCI_GETSELECTIONSTART: + return Platform::Minimum(anchor, currentPos); + + case SCI_SETSELECTIONEND: + SetSelection(wParam, Platform::Minimum(anchor, wParam)); + break; + + case SCI_GETSELECTIONEND: + return Platform::Maximum(anchor, currentPos); + + case SCI_SETPRINTMAGNIFICATION: + printMagnification = wParam; + break; + + case SCI_GETPRINTMAGNIFICATION: + return printMagnification; + + case SCI_SETPRINTCOLOURMODE: + printColourMode = wParam; + break; + + case SCI_GETPRINTCOLOURMODE: + return printColourMode; + case SCI_GETSTYLEAT: if (static_cast(wParam) >= pdoc->Length()) return 0; @@ -3121,7 +3603,7 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_GETSTYLEDTEXT: { if (lParam == 0) return 0; - TEXTRANGE *tr = reinterpret_cast(lParam); + TextRange *tr = reinterpret_cast(lParam); int iPlace = 0; for (int iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) { tr->lpstrText[iPlace++] = pdoc->CharAt(iChar); @@ -3146,10 +3628,13 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return vs.viewWhitespace; case SCI_SETVIEWWS: - vs.viewWhitespace = wParam; + vs.viewWhitespace = static_cast(wParam); Redraw(); break; + case SCI_POSITIONFROMPOINT: + return PositionFromLocation(Point(wParam, lParam)); + case SCI_GOTOLINE: GoToLine(wParam); break; @@ -3160,10 +3645,6 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { Redraw(); break; - case SCI_SETANCHOR: - SetSelection(currentPos, wParam); - break; - case SCI_GETCURLINE: { if (lParam == 0) return 0; @@ -3189,56 +3670,109 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case SCI_STARTSTYLING: - pdoc->StartStyling(wParam, lParam); + pdoc->StartStyling(wParam, static_cast(lParam)); break; case SCI_SETSTYLING: - pdoc->SetStyleFor(wParam, lParam); + pdoc->SetStyleFor(wParam, static_cast(lParam)); break; - case SCI_SETSTYLINGEX: // Specify a complete styling buffer + case SCI_SETSTYLINGEX: // Specify a complete styling buffer if (lParam == 0) return 0; pdoc->SetStyles(wParam, reinterpret_cast(lParam)); break; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_SETMARGINWIDTH: - if (wParam < 100) { - vs.ms[1].width = wParam; - } - InvalidateStyleRedraw(); - break; -#endif - case SCI_SETBUFFEREDDRAW: bufferedDraw = wParam; break; + case SCI_GETBUFFEREDDRAW: + return bufferedDraw; + case SCI_SETTABWIDTH: if (wParam > 0) pdoc->tabInChars = wParam; InvalidateStyleRedraw(); break; + case SCI_GETTABWIDTH: + return pdoc->tabInChars; + + case SCI_SETINDENT: + pdoc->indentInChars = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETINDENT: + return pdoc->indentInChars; + + case SCI_SETUSETABS: + pdoc->useTabs = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETUSETABS: + return pdoc->useTabs; + + case SCI_SETLINEINDENTATION: + pdoc->SetLineIndentation(wParam, lParam); + break; + + case SCI_GETLINEINDENTATION: + return pdoc->GetLineIndentation(wParam); + + case SCI_GETLINEINDENTPOSITION: + return pdoc->GetLineIndentPosition(wParam); + + case SCI_GETCOLUMN: + return pdoc->GetColumn(wParam); + + case SCI_SETHSCROLLBAR : + horizontalScrollBarVisible = wParam; + SetScrollBars(); + ReconfigureScrollBars(); + break; + + case SCI_GETHSCROLLBAR: + return horizontalScrollBarVisible; + + case SCI_SETINDENTATIONGUIDES: + vs.viewIndentationGuides = wParam; + Redraw(); + break; + + case SCI_GETINDENTATIONGUIDES: + return vs.viewIndentationGuides; + + case SCI_SETHIGHLIGHTGUIDE: + if ((highlightGuideColumn != static_cast(wParam)) || (wParam > 0)) { + highlightGuideColumn = wParam; + Redraw(); + } + break; + + case SCI_GETHIGHLIGHTGUIDE: + return highlightGuideColumn; + + case SCI_GETLINEENDPOSITION: + return pdoc->LineEnd(wParam); + case SCI_SETCODEPAGE: pdoc->dbcsCodePage = wParam; break; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_SETLINENUMBERWIDTH: - if (wParam < 200) { - vs.ms[0].width = wParam; - } - InvalidateStyleRedraw(); - break; -#endif + case SCI_GETCODEPAGE: + return pdoc->dbcsCodePage; case SCI_SETUSEPALETTE: palette.allowRealization = wParam; InvalidateStyleRedraw(); break; + case SCI_GETUSEPALETTE: + return palette.allowRealization; + // Marker definition and setting case SCI_MARKERDEFINE: if (wParam <= MARKER_MAX) @@ -3260,18 +3794,15 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case SCI_MARKERADD: { int markerID = pdoc->AddMark(wParam, lParam); - RedrawSelMargin(); return markerID; } case SCI_MARKERDELETE: pdoc->DeleteMark(wParam, lParam); - RedrawSelMargin(); break; case SCI_MARKERDELETEALL: pdoc->DeleteAllMarks(static_cast(wParam)); - RedrawSelMargin(); break; case SCI_MARKERGET: @@ -3295,53 +3826,53 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { return -1; case SCI_SETMARGINTYPEN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].symbol = (lParam == SC_MARGIN_SYMBOL); InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINTYPEN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].symbol ? SC_MARGIN_SYMBOL : SC_MARGIN_NUMBER; else return 0; - + case SCI_SETMARGINWIDTHN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].width = lParam; InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINWIDTHN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].width; else return 0; - + case SCI_SETMARGINMASKN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].mask = lParam; InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINMASKN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].mask; else return 0; - + case SCI_SETMARGINSENSITIVEN: - if (wParam >= 0 && wParam < ViewStyle::margins) { + if (ValidMargin(wParam)) { vs.ms[wParam].sensitive = lParam; InvalidateStyleRedraw(); } break; - + case SCI_GETMARGINSENSITIVEN: - if (wParam >= 0 && wParam < ViewStyle::margins) + if (ValidMargin(wParam)) return vs.ms[wParam].sensitive ? 1 : 0; else return 0; @@ -3391,37 +3922,54 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { if (lParam == 0) return 0; if (wParam <= STYLE_MAX) { - strcpy(vs.styles[wParam].fontName, reinterpret_cast(lParam)); + vs.SetStyleFontName(wParam, reinterpret_cast(lParam)); InvalidateStyleRedraw(); } break; - + case SCI_STYLESETUNDERLINE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].underline = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCHARACTERSET: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].characterSet = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETVISIBLE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].visible = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLERESETDEFAULT: vs.ResetDefaultStyle(); InvalidateStyleRedraw(); break; - case SCI_SETSTYLEBITS: pdoc->SetStylingBits(wParam); break; - + case SCI_GETSTYLEBITS: return pdoc->stylingBits; - + case SCI_SETLINESTATE: return pdoc->SetLineState(wParam, lParam); - + case SCI_GETLINESTATE: return pdoc->GetLineState(wParam); - + case SCI_GETMAXLINESTATE: return pdoc->GetMaxLineState(); - - // Folding messages - + + // Folding messages + case SCI_VISIBLEFROMDOCLINE: return cs.DisplayFromDoc(wParam); - + case SCI_DOCLINEFROMVISIBLE: return cs.DocFromDisplay(wParam); @@ -3431,40 +3979,40 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { RedrawSelMargin(); return prev; } - + case SCI_GETFOLDLEVEL: return pdoc->GetLevel(wParam); - + case SCI_GETLASTCHILD: return pdoc->GetLastChild(wParam, lParam); - + case SCI_GETFOLDPARENT: return pdoc->GetFoldParent(wParam); - + case SCI_SHOWLINES: cs.SetVisible(wParam, lParam, true); SetScrollBars(); Redraw(); break; - + case SCI_HIDELINES: cs.SetVisible(wParam, lParam, false); SetScrollBars(); Redraw(); break; - + case SCI_GETLINEVISIBLE: return cs.GetVisible(wParam); - + case SCI_SETFOLDEXPANDED: if (cs.SetExpanded(wParam, lParam)) { RedrawSelMargin(); } break; - + case SCI_GETFOLDEXPANDED: return cs.GetExpanded(wParam); - + case SCI_SETFOLDFLAGS: foldFlags = wParam; Redraw(); @@ -3473,11 +4021,11 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_TOGGLEFOLD: ToggleContraction(wParam); break; - + case SCI_ENSUREVISIBLE: EnsureLineVisible(wParam); break; - + case SCI_SEARCHANCHOR: SearchAnchor(); break; @@ -3485,47 +4033,19 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_SEARCHNEXT: case SCI_SEARCHPREV: return SearchText(iMessage, wParam, lParam); - break; case SCI_SETCARETPOLICY: caretPolicy = wParam; caretSlop = lParam; break; -#ifdef INCLUDE_DEPRECATED_FEATURES - case SCI_SETFORE: - vs.styles[STYLE_DEFAULT].fore.desired = Colour(wParam); - InvalidateStyleRedraw(); - break; + case SCI_LINESONSCREEN: + return LinesOnScreen(); - case SCI_SETBACK: - vs.styles[STYLE_DEFAULT].back.desired = Colour(wParam); - InvalidateStyleRedraw(); + case SCI_USEPOPUP: + displayPopupMenu = wParam; break; - case SCI_SETBOLD: - vs.styles[STYLE_DEFAULT].bold = wParam; - InvalidateStyleRedraw(); - break; - - case SCI_SETITALIC: - vs.styles[STYLE_DEFAULT].italic = wParam; - InvalidateStyleRedraw(); - break; - - case SCI_SETSIZE: - vs.styles[STYLE_DEFAULT].size = wParam; - InvalidateStyleRedraw(); - break; - - case SCI_SETFONT: - if (wParam == 0) - return 0; - strcpy(vs.styles[STYLE_DEFAULT].fontName, reinterpret_cast(wParam)); - InvalidateStyleRedraw(); - break; -#endif - case SCI_SETSELFORE: vs.selforeset = wParam; vs.selforeground.desired = Colour(lParam); @@ -3543,12 +4063,17 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { InvalidateStyleRedraw(); break; + case SCI_GETCARETFORE: + return vs.caretcolour.desired.AsLong(); + case SCI_ASSIGNCMDKEY: - kmap.AssignCmdKey(LOWORD(wParam), HIWORD(wParam), lParam); + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), lParam); break; case SCI_CLEARCMDKEY: - kmap.AssignCmdKey(LOWORD(wParam), HIWORD(wParam), WM_NULL); + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), WM_NULL); break; case SCI_CLEARALLCMDKEYS: @@ -3612,12 +4137,19 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_ZOOMOUT: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: + case SCI_LINESCROLLDOWN: + case SCI_LINESCROLLUP: return KeyCommand(iMessage); case SCI_BRACEHIGHLIGHT: SetBraceHighlight(static_cast(wParam), lParam, STYLE_BRACELIGHT); break; - + case SCI_BRACEBADLIGHT: SetBraceHighlight(static_cast(wParam), -1, STYLE_BRACEBAD); break; @@ -3635,46 +4167,81 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { Redraw(); break; + case SCI_SETZOOM: + vs.zoomLevel = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETZOOM: + return vs.zoomLevel; + case SCI_GETEDGECOLUMN: return theEdge; - + case SCI_SETEDGECOLUMN: theEdge = wParam; InvalidateStyleRedraw(); break; - + case SCI_GETEDGEMODE: - return edgeState; - + return vs.edgeState; + case SCI_SETEDGEMODE: - edgeState = wParam; + vs.edgeState = wParam; InvalidateStyleRedraw(); break; - + case SCI_GETEDGECOLOUR: return vs.edgecolour.desired.AsLong(); - + case SCI_SETEDGECOLOUR: vs.edgecolour.desired = Colour(wParam); InvalidateStyleRedraw(); break; - + case SCI_GETDOCPOINTER: - return reinterpret_cast(pdoc); + return reinterpret_cast(pdoc); case SCI_SETDOCPOINTER: SetDocPointer(reinterpret_cast(lParam)); return 0; + case SCI_CREATEDOCUMENT: { + Document *doc = new Document(); + doc->AddRef(); + return reinterpret_cast(doc); + } + + case SCI_ADDREFDOCUMENT: + (reinterpret_cast(lParam))->AddRef(); + break; + + case SCI_RELEASEDOCUMENT: + (reinterpret_cast(lParam))->Release(); + break; + case SCI_SETMODEVENTMASK: modEventMask = wParam; return 0; - + + case SCI_GETMODEVENTMASK: + return modEventMask; + case SCI_CONVERTEOLS: pdoc->ConvertLineEnds(wParam); SetSelection(currentPos, anchor); // Ensure selection inside document return 0; + case SCI_SELECTIONISRECTANGLE: + return (selType == selRectangle) ? 1 : 0; + + case SCI_SETOVERTYPE: + inOverstrike = wParam; + break; + + case SCI_GETOVERTYPE: + return inOverstrike ? TRUE : FALSE; + #ifdef MACRO_SUPPORT case SCI_STARTRECORD: recordingMacro = 1; @@ -3683,8 +4250,8 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_STOPRECORD: recordingMacro = 0; return 0; -#endif - +#endif + default: return DefWndProc(iMessage, wParam, lParam); } diff --git a/src/stc/scintilla/src/Editor.h b/src/stc/scintilla/src/Editor.h index 4ff334767a..83967cfd6a 100644 --- a/src/stc/scintilla/src/Editor.h +++ b/src/stc/scintilla/src/Editor.h @@ -31,13 +31,21 @@ public: // Drawing is only performed for maxLineLength characters on each line. enum {maxLineLength = 4000}; int numCharsInLine; - char chars[maxLineLength]; - char styles[maxLineLength]; - char indicators[maxLineLength]; - int positions[maxLineLength]; + int xHighlightGuide; + bool highlightColumn; + int selStart; + int selEnd; + int edgeColumn; + char chars[maxLineLength+1]; + char styles[maxLineLength+1]; + char indicators[maxLineLength+1]; + int positions[maxLineLength+1]; }; class Editor : public DocWatcher { + // Private so Editor objects can not be copied + Editor(const Editor &) : DocWatcher() {} + Editor &operator=(const Editor &) { return *this; } protected: // ScintillaBase subclass needs access to much of Editor // On GTK+, Scintilla is a container widget holding two scroll bars and a drawing area @@ -51,6 +59,8 @@ protected: // ScintillaBase subclass needs access to much of Editor bool stylesValid; ViewStyle vs; Palette palette; + int printMagnification; + int printColourMode; bool hideSelection; bool inOverstrike; @@ -61,13 +71,16 @@ protected: // ScintillaBase subclass needs access to much of Editor int xOffset; // Horizontal scrolled amount in pixels int xCaretMargin; // Ensure this many pixels visible on both sides of caret + bool horizontalScrollBarVisible; Surface pixmapLine; Surface pixmapSelMargin; Surface pixmapSelPattern; + Surface pixmapIndentGuide; + Surface pixmapIndentGuideHighlight; // Intellimouse support - currently only implemented for Windows unsigned int ucWheelScrollLines; - short cWheelDelta; //wheel delta from roll + int cWheelDelta; //wheel delta from roll KeyMap kmap; @@ -94,8 +107,8 @@ protected: // ScintillaBase subclass needs access to much of Editor bool needUpdateUI; Position braces[2]; int bracesMatchStyle; + int highlightGuideColumn; - int edgeState; int theEdge; enum { notPainting, painting, paintAbandoned } paintState; @@ -110,12 +123,15 @@ protected: // ScintillaBase subclass needs access to much of Editor enum { selStream, selRectangle, selRectangleFixed } selType; int xStartSelect; int xEndSelect; + bool primarySelection; int caretPolicy; int caretSlop; int searchAnchor; + int displayPopupMenu; + #ifdef MACRO_SUPPORT int recordingMacro; #endif @@ -162,6 +178,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void SetSelection(int currentPos_, int anchor_); void SetSelection(int currentPos_); void SetEmptySelection(int currentPos_); + int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); int MovePositionTo(int newPos, bool extend = false); int MovePositionSoVisible(int pos, int moveDir); void SetLastXChosen(); @@ -169,6 +186,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void ScrollTo(int line); virtual void ScrollText(int linesToMove); void HorizontalScrollTo(int xPos); + void MoveCaretInsideView(); void EnsureCaretVisible(bool useMargin=true); void ShowCaretAtCurrentPosition(); void DropCaret(); @@ -176,20 +194,23 @@ protected: // ScintillaBase subclass needs access to much of Editor void PaintSelMargin(Surface *surface, PRectangle &rc); void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout &ll); - void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int xStart, + void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout &ll); void Paint(Surface *surfaceWindow, PRectangle rcArea); - long FormatRange(bool draw, FORMATRANGE *pfr); + long FormatRange(bool draw, RangeToFormat *pfr); virtual void SetVerticalScrollPos() = 0; virtual void SetHorizontalScrollPos() = 0; virtual bool ModifyScrollBars(int nMax, int nPage) = 0; + virtual void ReconfigureScrollBars(); void SetScrollBarsTo(PRectangle rsClient); void SetScrollBars(); - virtual void AddChar(char ch); + void AddChar(char ch); + virtual void AddCharUTF(char *s, unsigned int len); void ClearSelection(); void ClearAll(); + void ClearDocumentStyle(); void Cut(); void PasteRectangular(int pos, const char *ptr, int len); virtual void Copy() = 0; @@ -205,8 +226,9 @@ protected: // ScintillaBase subclass needs access to much of Editor virtual void NotifyChange() = 0; virtual void NotifyFocus(bool focus); virtual void NotifyParent(SCNotification scn) = 0; - virtual void NotifyStyleNeeded(int endStyleNeeded); + virtual void NotifyStyleToNeeded(int endStyleNeeded); void NotifyChar(char ch); + void NotifyMove(int position); void NotifySavePoint(bool isSavePoint); void NotifyModifyAttempt(); virtual void NotifyDoubleClick(Point pt, bool shift); @@ -218,24 +240,29 @@ protected: // ScintillaBase subclass needs access to much of Editor void NotifySavePoint(Document *document, void *userData, bool atSavePoint); void NotifyModified(Document *document, DocModification mh, void *userData); void NotifyDeleted(Document *document, void *userData); + void NotifyStyleNeeded(Document *doc, void *userData, int endPos); + #ifdef MACRO_SUPPORT - void NotifyMacroRecord(UINT iMessage, WPARAM wParam, LPARAM lParam); + void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam); #endif void PageMove(int direction, bool extend=false); - virtual int KeyCommand(UINT iMessage); + void ChangeCaseOfSelection(bool makeUpperCase); + void LineTranspose(); + virtual void CancelModes(); + virtual int KeyCommand(unsigned int iMessage); virtual int KeyDefault(int /* key */, int /*modifiers*/); int KeyDown(int key, bool shift, bool ctrl, bool alt); - bool GetWhitespaceVisible(); - void SetWhitespaceVisible(bool view); + int GetWhitespaceVisible(); + void SetWhitespaceVisible(int view); void Indent(bool forwards); - long FindText(UINT iMessage,WPARAM wParam,LPARAM lParam); + long FindText(unsigned int iMessage, unsigned long wParam, long lParam); void SearchAnchor(); - long SearchText(UINT iMessage,WPARAM wParam,LPARAM lParam); + long SearchText(unsigned int iMessage, unsigned long wParam, long lParam); void GoToLine(int lineNo); char *CopyRange(int start, int end); @@ -269,11 +296,11 @@ protected: // ScintillaBase subclass needs access to much of Editor void ToggleContraction(int line); void EnsureLineVisible(int line); - virtual LRESULT DefWndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) = 0; + virtual long DefWndProc(unsigned int iMessage, unsigned long wParam, long lParam) = 0; public: // Public so scintilla_send_message can use it - virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); + virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam); // Public so scintilla_set_id can use it int ctrlID; }; diff --git a/src/stc/scintilla/src/Indicator.cxx b/src/stc/scintilla/src/Indicator.cxx index fb6ad09157..05bdf66b53 100644 --- a/src/stc/scintilla/src/Indicator.cxx +++ b/src/stc/scintilla/src/Indicator.cxx @@ -37,6 +37,22 @@ void Indicator::Draw(Surface *surface, PRectangle &rc) { surface->MoveTo(x-3, ymid); surface->LineTo(x-3, ymid+2); } + } else if (style == INDIC_DIAGONAL) { + int x = rc.left; + while (x < rc.right) { + surface->MoveTo(x, rc.top+2); + int endX = x+3; + int endY = rc.top - 1; + if (endX > rc.right) { + endY += endX - rc.right; + endX = rc.right; + } + surface->LineTo(endX, endY); + x += 4; + } + } else if (style == INDIC_STRIKE) { + surface->MoveTo(rc.left, rc.top - 4); + surface->LineTo(rc.right, rc.top - 4); } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); diff --git a/src/stc/scintilla/src/KeyMap.cxx b/src/stc/scintilla/src/KeyMap.cxx index f339cd2750..d2a6660f3c 100644 --- a/src/stc/scintilla/src/KeyMap.cxx +++ b/src/stc/scintilla/src/KeyMap.cxx @@ -28,7 +28,7 @@ void KeyMap::Clear() { alloc = 0; } -void KeyMap::AssignCmdKey(int key, int modifiers, UINT msg) { +void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) { if ((len+1) >= alloc) { KeyToCommand *ktcNew = new KeyToCommand[alloc + 5]; if (!ktcNew) @@ -51,7 +51,7 @@ void KeyMap::AssignCmdKey(int key, int modifiers, UINT msg) { len++; } -UINT KeyMap::Find(int key, int modifiers) { +unsigned int KeyMap::Find(int key, int modifiers) { for (int i=0; i < len; i++) { if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) { return kmap[i].msg; @@ -61,51 +61,61 @@ UINT KeyMap::Find(int key, int modifiers) { } KeyToCommand KeyMap::MapDefault[] = { - VK_DOWN, SCI_NORM, SCI_LINEDOWN, - VK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND, - VK_UP, SCI_NORM, SCI_LINEUP, - VK_UP, SCI_SHIFT, SCI_LINEUPEXTEND, - VK_LEFT, SCI_NORM, SCI_CHARLEFT, - VK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND, - VK_LEFT, SCI_CTRL, SCI_WORDLEFT, - VK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND, - VK_RIGHT, SCI_NORM, SCI_CHARRIGHT, - VK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND, - VK_RIGHT, SCI_CTRL, SCI_WORDRIGHT, - VK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND, - VK_HOME, SCI_NORM, SCI_VCHOME, - VK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND, - VK_HOME, SCI_CTRL, SCI_DOCUMENTSTART, - VK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND, - VK_END, SCI_NORM, SCI_LINEEND, - VK_END, SCI_SHIFT, SCI_LINEENDEXTEND, - VK_END, SCI_CTRL, SCI_DOCUMENTEND, - VK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND, - VK_PRIOR, SCI_NORM, SCI_PAGEUP, - VK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND, - VK_NEXT, SCI_NORM, SCI_PAGEDOWN, - VK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND, - VK_DELETE, SCI_NORM, WM_CLEAR, - VK_DELETE, SCI_SHIFT, WM_CUT, - VK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT, - VK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE, - VK_INSERT, SCI_SHIFT, WM_PASTE, - VK_INSERT, SCI_CTRL, WM_COPY, - VK_ESCAPE, SCI_NORM, SCI_CANCEL, - VK_BACK, SCI_NORM, SCI_DELETEBACK, - VK_BACK, SCI_CTRL, SCI_DELWORDLEFT, - 'Z', SCI_CTRL, WM_UNDO, - 'Y', SCI_CTRL, SCI_REDO, - 'X', SCI_CTRL, WM_CUT, - 'C', SCI_CTRL, WM_COPY, - 'V', SCI_CTRL, WM_PASTE, - 'A', SCI_CTRL, SCI_SELECTALL, - VK_TAB, SCI_NORM, SCI_TAB, - VK_TAB, SCI_SHIFT, SCI_BACKTAB, - VK_RETURN, SCI_NORM, SCI_NEWLINE, - 'L', SCI_CTRL, SCI_FORMFEED, - VK_ADD, SCI_CTRL, SCI_ZOOMIN, - VK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT, - 0,0,0, + {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, + {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, + {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN}, + {SCK_UP, SCI_NORM, SCI_LINEUP}, + {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, + {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP}, + {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, + {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, + {SCK_LEFT, SCI_CTRL, SCI_WORDLEFT}, + {SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND}, + {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT}, + {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND}, + {SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT}, + {SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND}, + {SCK_HOME, SCI_NORM, SCI_VCHOME}, + {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND}, + {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART}, + {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, + {SCK_END, SCI_NORM, SCI_LINEEND}, + {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND}, + {SCK_END, SCI_CTRL, SCI_DOCUMENTEND}, + {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, + {SCK_PRIOR, SCI_NORM, SCI_PAGEUP}, + {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND}, + {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN}, + {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND}, + {SCK_DELETE, SCI_NORM, SCI_CLEAR}, + {SCK_DELETE, SCI_SHIFT, SCI_CUT}, + {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT}, + {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE}, + {SCK_INSERT, SCI_SHIFT, SCI_PASTE}, + {SCK_INSERT, SCI_CTRL, SCI_COPY}, + {SCK_ESCAPE, SCI_NORM, SCI_CANCEL}, + {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, + {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, + {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, + {SCK_BACK, SCI_ALT, SCI_UNDO}, + {'Z', SCI_CTRL, SCI_UNDO}, + {'Y', SCI_CTRL, SCI_REDO}, + {'X', SCI_CTRL, SCI_CUT}, + {'C', SCI_CTRL, SCI_COPY}, + {'V', SCI_CTRL, SCI_PASTE}, + {'A', SCI_CTRL, SCI_SELECTALL}, + {SCK_TAB, SCI_NORM, SCI_TAB}, + {SCK_TAB, SCI_SHIFT, SCI_BACKTAB}, + {SCK_RETURN, SCI_NORM, SCI_NEWLINE}, + {SCK_ADD, SCI_CTRL, SCI_ZOOMIN}, + {SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT}, + {SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM}, + //'L', SCI_CTRL, SCI_FORMFEED, + {'L', SCI_CTRL, SCI_LINECUT}, + {'L', SCI_CSHIFT, SCI_LINEDELETE}, + {'T', SCI_CTRL, SCI_LINETRANSPOSE}, + {'U', SCI_CTRL, SCI_LOWERCASE}, + {'U', SCI_CSHIFT, SCI_UPPERCASE}, + {0,0,0}, }; diff --git a/src/stc/scintilla/src/KeyMap.h b/src/stc/scintilla/src/KeyMap.h index 814f3aa3b7..c843104174 100644 --- a/src/stc/scintilla/src/KeyMap.h +++ b/src/stc/scintilla/src/KeyMap.h @@ -7,16 +7,17 @@ #define KEYTOCOMMAND_H #define SCI_NORM 0 -#define SCI_SHIFT SHIFT_PRESSED -#define SCI_CTRL LEFT_CTRL_PRESSED -#define SCI_ALT LEFT_ALT_PRESSED +#define SCI_SHIFT SCMOD_SHIFT +#define SCI_CTRL SCMOD_CTRL +#define SCI_ALT SCMOD_ALT #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) +#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) class KeyToCommand { public: int key; int modifiers; - UINT msg; + unsigned int msg; }; class KeyMap { @@ -28,8 +29,8 @@ public: KeyMap(); ~KeyMap(); void Clear(); - void AssignCmdKey(int key, int modifiers, UINT msg); - UINT Find(int key, int modifiers); // 0 returned on failure + void AssignCmdKey(int key, int modifiers, unsigned int msg); + unsigned int Find(int key, int modifiers); // 0 returned on failure }; #endif diff --git a/src/stc/scintilla/src/KeyWords.cxx b/src/stc/scintilla/src/KeyWords.cxx index 20f6762470..113ba222df 100644 --- a/src/stc/scintilla/src/KeyWords.cxx +++ b/src/stc/scintilla/src/KeyWords.cxx @@ -17,2201 +17,29 @@ #include "Scintilla.h" #include "SciLexer.h" -inline bool IsLeadByte(int codePage, char ch) { -#if PLAT_GTK - // TODO: support DBCS under GTK+ - return false; -#elif PLAT_WIN - return codePage && IsDBCSLeadByteEx(codePage, ch); -#elif PLAT_WX - return false; -#endif +LexerModule *LexerModule::base = 0; + +LexerModule::LexerModule(int language_, LexerFunction fn_) : + language(language_), fn(fn_) { + next = base; + base = this; } -inline bool iswordchar(char ch) { - return isalnum(ch) || ch == '.' || ch == '_'; -} - -inline bool iswordstart(char ch) { - return isalnum(ch) || ch == '_'; -} - -enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; - -static int IndentAmount(StylingContext &styler, int line, int *flags) { - int end = styler.Length(); - int spaceFlags = 0; - - // Determines the indentation level of the current line and also checks for consistent - // indentation compared to the previous line. - // Indentation is judged consistent when the indentation whitespace of each line lines - // the same or the indentation of one line is a prefix of the other. - - int pos = styler.LineStart(line); - char ch = styler[pos]; - int indent = 0; - bool inPrevPrefix = line > 0; - int posPrev = inPrevPrefix ? styler.LineStart(line-1) : 0; - while ((ch == ' ' || ch == '\t') && (pos < end)) { - if (inPrevPrefix) { - char chPrev = styler[posPrev++]; - if (chPrev == ' ' || chPrev == '\t') { - if (chPrev != ch) - spaceFlags |= wsInconsistent; - } else { - inPrevPrefix = false; - } +void LexerModule::Colourise(unsigned int startPos, int lengthDoc, int initStyle, + int language, WordList *keywordlists[], Accessor &styler) { + LexerModule *lm = base; + while (lm) { + if (lm->language == language) { + lm->fn(startPos, lengthDoc, initStyle, keywordlists, styler); + return; } - if (ch == ' ') { - spaceFlags |= wsSpace; - indent++; - } else { // Tab - spaceFlags |= wsTab; - if (spaceFlags & wsSpace) - spaceFlags |= wsSpaceTab; - indent = (indent / 8 + 1) * 8; - } - ch = styler[++pos]; + lm = lm->next; } - - *flags = spaceFlags; - indent += SC_FOLDLEVELBASE; - if (isspace(ch)) // Completely empty line - return indent | SC_FOLDLEVELWHITEFLAG; - else - return indent; -} - -inline bool isoperator(char ch) { - if (isalnum(ch)) - return false; - // '.' left out as it is used to make up numbers - if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || - ch == '(' || ch == ')' || ch == '-' || ch == '+' || - ch == '=' || ch == '|' || ch == '{' || ch == '}' || - ch == '[' || ch == ']' || ch == ':' || ch == ';' || - ch == '<' || ch == '>' || ch == ',' || ch == '/' || - ch == '?' || ch == '!' || ch == '.' || ch == '~') - return true; - return false; -} - -static void classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_C_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_C_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_C_WORD; - } - styler.ColourSegment(start, end, chAttr); -} - -static void ColouriseCppDoc(int codePage, int startPos, int length, - int initStyle, WordList &keywords, StylingContext &styler) { - - bool fold = styler.GetPropSet().GetInt("fold"); - int lineCurrent = styler.GetLine(startPos); - int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; - int levelCurrent = levelPrev; - - int state = initStyle; - char chPrev = ' '; - char chNext = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - int visChars = 0; - for (unsigned int i = startPos; i <= lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - - if ((fold) && ((ch == '\r' && chNext != '\n') || (ch == '\n'))) { - int lev = levelPrev; - if (visChars == 0) - lev |= SC_FOLDLEVELWHITEFLAG; - if ((levelCurrent > levelPrev) && (visChars > 0)) - lev |= SC_FOLDLEVELHEADERFLAG; - styler.SetLevel(lineCurrent, lev); - lineCurrent++; - visChars = 0; - levelPrev = levelCurrent; - } - if (!isspace(ch)) - visChars++; - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - i += 1; - continue; - } - - if (state == SCE_C_STRINGEOL) { - if (ch != '\r' && ch != '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } - if (state == SCE_C_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_WORD; - startSeg = i; - } else if (ch == '/' && chNext == '*') { - styler.ColourSegment(startSeg, i - 1, state); - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_C_COMMENTDOC; - else - state = SCE_C_COMMENT; - startSeg = i; - } else if (ch == '/' && chNext == '/') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRING; - startSeg = i; - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_CHARACTER; - startSeg = i; - } else if (ch == '#') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_PREPROCESSOR; - startSeg = i; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_C_OPERATOR); - startSeg = i + 1; - if ((ch == '{') || (ch == '}')) { - levelCurrent += (ch == '{') ? 1 : -1; - } - } - } else if (state == SCE_C_WORD) { - if (!iswordchar(ch)) { - classifyWordCpp(startSeg, i - 1, keywords, styler); - state = SCE_C_DEFAULT; - startSeg = i; - if (ch == '/' && chNext == '*') { - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_C_COMMENTDOC; - else - state = SCE_C_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } else if (ch == '\'') { - state = SCE_C_CHARACTER; - } else if (ch == '#') { - state = SCE_C_PREPROCESSOR; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - if ((ch == '{') || (ch == '}')) { - levelCurrent += (ch == '{') ? 1 : -1; - } - } - } - } else { - if (state == SCE_C_PREPROCESSOR) { - if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_COMMENT) { - if (ch == '/' && chPrev == '*' && ( - (i > startSeg + 2) || ((initStyle == SCE_C_COMMENT) && (startSeg == startPos)))) { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_C_COMMENTDOC) { - if (ch == '/' && chPrev == '*' && ( - (i > startSeg + 3) || ((initStyle == SCE_C_COMMENTDOC) && (startSeg == startPos)))) { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_C_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_STRING) { - if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRINGEOL; - startSeg = i; - } else if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_C_CHARACTER) { - if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRINGEOL; - startSeg = i; - } else if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } - if (state == SCE_C_DEFAULT) { // One of the above succeeded - if (ch == '/' && chNext == '*') { - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_C_COMMENTDOC; - else - state = SCE_C_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } else if (ch == '\'') { - state = SCE_C_CHARACTER; - } else if (ch == '#') { - state = SCE_C_PREPROCESSOR; - } else if (iswordstart(ch)) { - state = SCE_C_WORD; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - if ((ch == '{') || (ch == '}')) { - levelCurrent += (ch == '{') ? 1 : -1; - } - } - } - } - chPrev = ch; - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc - 1, state); - // Fill in the real level of the next line, keeping the current flags as they will be filled in later - if (fold) { - int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; - //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); - styler.SetLevel(lineCurrent, levelPrev | flagsNext); - - } -} - -inline bool isPerlOperator(char ch) { - if (isalnum(ch)) - return false; - // '.' left out as it is used to make up numbers - if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '\\' || - ch == '(' || ch == ')' || ch == '-' || ch == '+' || - ch == '=' || ch == '|' || ch == '{' || ch == '}' || - ch == '[' || ch == ']' || ch == ':' || ch == ';' || - ch == '<' || ch == '>' || ch == ',' || ch == '/' || - ch == '?' || ch == '!' || ch == '.' || ch == '~') - return true; - return false; -} - -static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_PL_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_PL_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_PL_WORD; - } - styler.ColourSegment(start, end, chAttr); - return chAttr; -} - -static bool isEndVar(char ch) { - return !isalnum(ch) && ch != '#' && ch != '$' && - ch != '_' && ch != '\''; -} - -static bool isMatch(StylingContext &styler, int lengthDoc, int pos, const char *val) { - if ((pos + static_cast(strlen(val))) >= lengthDoc) { - return false; - } - while (*val) { - if (*val != styler[pos++]) { - return false; - } - val++; - } - return true; -} - -static bool isOKQuote(char ch) { - if (isalnum(ch)) - return false; - if (isspace(ch)) - return false; - if (iscntrl(ch)) - return false; - return true; -} - -static char opposite(char ch) { - if (ch == '(') - return ')'; - if (ch == '[') - return ']'; - if (ch == '{') - return '}'; - if (ch == '<') - return '>'; - return ch; -} - -static void ColourisePerlDoc(int codePage, int startPos, int length, int initStyle, - WordList &keywords, StylingContext &styler) { - char sooked[100]; - int quotes = 0; - char quoteDown = 'd'; - char quoteUp = 'd'; - int quoteRep = 1; - int sookedpos = 0; - bool preferRE = true; - sooked[sookedpos] = '\0'; - int state = initStyle; - int lengthDoc = startPos + length; - // If in a long distance lexical state, seek to the beginning to find quote characters - if (state == SCE_PL_HERE || state == SCE_PL_REGEX || - state == SCE_PL_REGSUBST || state == SCE_PL_LONGQUOTE) { - while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) { - startPos--; - } - state = SCE_PL_DEFAULT; - } - styler.StartAt(startPos); - char chPrev = ' '; - char chNext = styler[startPos]; - int startSeg = startPos; - for (int i = startPos; i <= lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - char chNext2 = styler.SafeGetCharAt(i + 2); - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - i += 1; - continue; - } - - if (state == SCE_PL_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - if (ch == 's' && !isalnum(chNext)) { - state = SCE_PL_REGSUBST; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 2; - startSeg = i; - } else if (ch == 'm' && !isalnum(chNext)) { - state = SCE_PL_REGEX; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 1; - startSeg = i; - } else if (ch == 't' && chNext == 'r' && !isalnum(chNext2)) { - state = SCE_PL_REGSUBST; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 2; - startSeg = i; - i++; - chNext = chNext2; - } else if (ch == 'q' && (chNext == 'q' || chNext == 'r' || chNext == 'w' || chNext == 'x') && !isalnum(chNext2)) { - state = SCE_PL_LONGQUOTE; - startSeg = i; - i++; - chNext = chNext2; - quotes = 0; - quoteUp = '\0'; - quoteDown = '\0'; - quoteRep = 1; - } else { - state = SCE_PL_WORD; - startSeg = i; - preferRE = false; - } - } else if (ch == '#') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_STRING; - startSeg = i; - } else if (ch == '\'') { - if (chPrev == '&') { - // Archaic call - styler.ColourSegment(i, i, state); - startSeg = i + 1; - } else { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_CHARACTER; - startSeg = i; - } - } else if (ch == '`') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_BACKTICKS; - startSeg = i; - } else if (ch == '$') { - preferRE = false; - styler.ColourSegment(startSeg, i - 1, state); - if (isalnum(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { - state = SCE_PL_SCALAR; - startSeg = i; - } else if (chNext != '{' && chNext != '[') { - styler.ColourSegment(i - 1, i, SCE_PL_SCALAR); - i++; - startSeg = i + 1; - ch = ' '; - chNext = ' '; - } else { - styler.ColourSegment(i, i, SCE_PL_SCALAR); - startSeg = i + 1; - } - } else if (ch == '@') { - preferRE = false; - styler.ColourSegment(startSeg, i - 1, state); - if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { - state = SCE_PL_ARRAY; - startSeg = i; - } else if (chNext != '{' && chNext != '[') { - styler.ColourSegment(i - 1, i, SCE_PL_ARRAY); - i++; - startSeg = i + 1; - ch = ' '; - } else { - styler.ColourSegment(i, i, SCE_PL_ARRAY); - startSeg = i + 1; - } - } else if (ch == '%') { - preferRE = false; - styler.ColourSegment(startSeg, i - 1, state); - if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { - state = SCE_PL_HASH; - startSeg = i; - } else if (chNext != '{' && chNext != '[') { - styler.ColourSegment(i - 1, i, SCE_PL_HASH); - i++; - startSeg = i + 1; - ch = ' '; - } else { - styler.ColourSegment(i, i, SCE_PL_HASH); - startSeg = i + 1; - } - } else if (ch == '*') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_SYMBOLTABLE; - startSeg = i; - } else if (ch == '/' && preferRE) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_REGEX; - quoteUp = '/'; - quoteDown = '/'; - quotes = 1; - quoteRep = 1; - startSeg = i; - } else if (ch == '<' && chNext == '<') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_HERE; - startSeg = i; - i++; - ch = chNext; - chNext = chNext2; - quotes = 0; - sookedpos = 0; - sooked[sookedpos] = '\0'; - } else if (ch == '=' && isalpha(chNext)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_POD; - startSeg = i; - quotes = 0; - sookedpos = 0; - sooked[sookedpos] = '\0'; - } else if (isPerlOperator(ch)) { - if (ch == ')' || ch == ']') - preferRE = false; - else - preferRE = true; - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_PL_OPERATOR); - startSeg = i + 1; - } - } else if (state == SCE_PL_WORD) { - if (!iswordchar(ch) && ch != '\'') { // Archaic Perl has quotes inside names - if (isMatch(styler, lengthDoc, startSeg, "__DATA__")) { - styler.ColourSegment(startSeg, i, SCE_PL_DATASECTION); - state = SCE_PL_DATASECTION; - } else if (isMatch(styler, lengthDoc, startSeg, "__END__")) { - styler.ColourSegment(startSeg, i, SCE_PL_DATASECTION); - state = SCE_PL_DATASECTION; - } else { - if (classifyWordPerl(startSeg, i - 1, keywords, styler) == SCE_PL_WORD) - preferRE = true; - state = SCE_PL_DEFAULT; - startSeg = i; - if (ch == '#') { - state = SCE_PL_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_PL_STRING; - } else if (ch == '\'') { - state = SCE_PL_CHARACTER; - } else if (ch == '<' && chNext == '<') { - state = SCE_PL_HERE; - quotes = 0; - startSeg = i; - sookedpos = 0; - sooked[sookedpos] = '\0'; - } else if (isPerlOperator(ch)) { - if (ch == ')' || ch == ']') - preferRE = false; - else - preferRE = true; - styler.ColourSegment(startSeg, i, SCE_PL_OPERATOR); - state = SCE_PL_DEFAULT; - startSeg = i + 1; - } - } - } - } else { - if (state == SCE_PL_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_PL_DEFAULT; - startSeg = i; - } - } else if (state == SCE_PL_HERE) { - if (isalnum(ch) && quotes < 2) { - sooked[sookedpos++] = ch; - sooked[sookedpos] = '\0'; - if (quotes == 0) - quotes = 1; - } else { - quotes++; - } - - if (quotes > 1 && isMatch(styler, lengthDoc, i, sooked)) { - styler.ColourSegment(startSeg, i + sookedpos - 1, SCE_PL_HERE); - state = SCE_PL_DEFAULT; - i += sookedpos; - startSeg = i; - chNext = ' '; - } - } else if (state == SCE_PL_STRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_PL_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_PL_CHARACTER) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_PL_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_PL_BACKTICKS) { - if (ch == '`') { - styler.ColourSegment(startSeg, i, state); - state = SCE_PL_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } else if (state == SCE_PL_POD) { - if (ch == '=') { - if (isMatch(styler, lengthDoc, i, "=cut")) { - styler.ColourSegment(startSeg, i - 1 + 4, state); - i += 4; - startSeg = i; - state = SCE_PL_DEFAULT; - chNext = ' '; - ch = ' '; - } - } - } else if (state == SCE_PL_SCALAR) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_ARRAY) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_HASH) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_SYMBOLTABLE) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_REF) { - if (isEndVar(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - state = SCE_PL_DEFAULT; - } - } else if (state == SCE_PL_REGEX) { - if (!quoteUp && !isspace(ch)) { - quoteUp = ch; - quoteDown = opposite(ch); - quotes++; - } else { - if (ch == quoteDown && chPrev != '\\') { - quotes--; - if (quotes == 0) { - quoteRep--; - if (quoteUp == quoteDown) { - quotes++; - } - } - if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - } else if (ch == quoteUp && chPrev != '\\') { - quotes++; - } else if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - } - } else if (state == SCE_PL_REGSUBST) { - if (!quoteUp && !isspace(ch)) { - quoteUp = ch; - quoteDown = opposite(ch); - quotes++; - } else { - if (ch == quoteDown && chPrev != '\\') { - quotes--; - if (quotes == 0) { - quoteRep--; - } - if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - if (quoteUp == quoteDown) { - quotes++; - } - } else if (ch == quoteUp && chPrev != '\\') { - quotes++; - } else if (!isalpha(chNext)) { - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - } - } - } else if (state == SCE_PL_LONGQUOTE) { - if (!quoteDown && !isspace(ch)) { - quoteUp = ch; - quoteDown = opposite(quoteUp); - quotes++; - } else if (ch == quoteDown) { - quotes--; - if (quotes == 0) { - quoteRep--; - if (quoteRep <= 0) { - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - state = SCE_PL_DEFAULT; - ch = ' '; - } - if (quoteUp == quoteDown) { - quotes++; - } - } - } else if (ch == quoteUp) { - quotes++; - } - } - - if (state == SCE_PL_DEFAULT) { // One of the above succeeded - if (ch == '#') { - state = SCE_PL_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_PL_STRING; - } else if (ch == '\'') { - state = SCE_PL_CHARACTER; - } else if (iswordstart(ch)) { - state = SCE_PL_WORD; - preferRE = false; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_PL_OPERATOR); - startSeg = i + 1; - } - } - } - chPrev = ch; - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc, state); -} - - -static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } - char chAttr = SCE_C_DEFAULT; - if (wordIsNumber) - chAttr = SCE_C_NUMBER; - else { - if (keywords.InList(s)) { - chAttr = SCE_C_WORD; - if (strcmp(s, "rem") == 0) - chAttr = SCE_C_COMMENTLINE; - } - } - styler.ColourSegment(start, end, chAttr); - if (chAttr == SCE_C_COMMENTLINE) - return SCE_C_COMMENTLINE; - else - return SCE_C_DEFAULT; -} - -static void ColouriseVBDoc(int codePage, int startPos, int length, int initStyle, - WordList &keywords, StylingContext &styler) { - int state = initStyle; - char chNext = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - for (int i = startPos; i < lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - i += 1; - continue; - } - - if (state == SCE_C_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_WORD; - startSeg = i; - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRING; - startSeg = i; - } - } else if (state == SCE_C_WORD) { - if (!iswordchar(ch)) { - state = classifyWordVB(startSeg, i - 1, keywords, styler); - if (state == SCE_C_DEFAULT) { - startSeg = i; - if (ch == '\'') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } - } - } - } else { - if (state == SCE_C_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_STRING) { - // VB doubles quotes to preserve them - if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - startSeg = i; - } - } - if (state == SCE_C_DEFAULT) { // One of the above succeeded - if (ch == '\'') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_C_STRING; - } else if (iswordstart(ch)) { - state = SCE_C_WORD; - } - } - } - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc, state); -} - -static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler, char *prevWord) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_P_IDENTIFIER; - if (0 == strcmp(prevWord, "class")) - chAttr = SCE_P_CLASSNAME; - else if (0 == strcmp(prevWord, "def")) - chAttr = SCE_P_DEFNAME; - else if (wordIsNumber) - chAttr = SCE_P_NUMBER; - else if (keywords.InList(s)) - chAttr = SCE_P_WORD; - styler.ColourSegment(start, end, chAttr); - strcpy(prevWord, s); -} - -static void ColourisePyDoc(int codePage, int startPos, int length, int initStyle, WordList &keywords, StylingContext &styler) { - //Platform::DebugPrintf("Python coloured\n"); - bool fold = styler.GetPropSet().GetInt("fold"); - int whingeLevel = styler.GetPropSet().GetInt("tab.timmy.whinge.level"); - char prevWord[200]; - prevWord[0] = '\0'; - if (length == 0) - return ; - int lineCurrent = styler.GetLine(startPos); - int spaceFlags = 0; - // TODO: Need to check previous line for indentation for both folding and bad indentation - int indentCurrent = IndentAmount(styler, lineCurrent, &spaceFlags); - - int state = initStyle & 31; - char chPrev = ' '; - char chPrev2 = ' '; - char chNext = styler[startPos]; - char chNext2 = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - bool atStartLine = true; - for (int i = startPos; i <= lengthDoc; i++) { - - if (atStartLine) { - if (whingeLevel == 1) { - styler.SetFlags((spaceFlags & wsInconsistent) ? 64 : 0, state); - } else if (whingeLevel == 2) { - styler.SetFlags((spaceFlags & wsSpaceTab) ? 64 : 0, state); - } else if (whingeLevel == 3) { - styler.SetFlags((spaceFlags & wsSpace) ? 64 : 0, state); - } else if (whingeLevel == 4) { - styler.SetFlags((spaceFlags & wsTab) ? 64 : 0, state); - } - atStartLine = false; - } - - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - chNext2 = styler.SafeGetCharAt(i + 2); - - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) { - // Perform colourisation of white space and triple quoted strings at end of each line to allow - // tab marking to work inside white space and triple quoted strings - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - } - - int lev = indentCurrent; - int indentNext = IndentAmount(styler, lineCurrent + 1, &spaceFlags); - if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { - // Only non whitespace lines can be headers - if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { - lev |= SC_FOLDLEVELHEADERFLAG; - } - } - indentCurrent = indentNext; - if (fold) { - styler.SetLevel(lineCurrent, lev); - } - lineCurrent++; - atStartLine = true; - } - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - chPrev2 = ' '; - i += 1; - continue; - } - - if (state == SCE_P_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_P_WORD; - startSeg = i; - } else if (ch == '#') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_P_COMMENTLINE; - startSeg = i; - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_P_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_STRING; - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - startSeg = i; - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_P_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_P_OPERATOR); - startSeg = i + 1; - } - } else if (state == SCE_P_WORD) { - if (!iswordchar(ch)) { - classifyWordPy(startSeg, i - 1, keywords, styler, prevWord); - state = SCE_P_DEFAULT; - startSeg = i; - if (ch == '#') { - state = SCE_P_COMMENTLINE; - } else if (ch == '\"') { - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_P_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_STRING; - } - } else if (ch == '\'') { - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_P_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_P_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_P_OPERATOR); - startSeg = i + 1; - } - } - } else { - if (state == SCE_P_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_P_DEFAULT; - startSeg = i; - } - } else if (state == SCE_P_STRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_P_CHARACTER) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_P_TRIPLE) { - if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } else if (state == SCE_P_TRIPLEDOUBLE) { - if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { - styler.ColourSegment(startSeg, i, state); - state = SCE_P_DEFAULT; - startSeg = i + 1; - } - } - } - chPrev2 = chPrev; - chPrev = ch; - } - if (startSeg <= lengthDoc) { - if (state == SCE_P_DEFAULT) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_WORD) { - classifyWordPy(startSeg, lengthDoc, keywords, styler, prevWord); - } else if (state == SCE_P_COMMENTLINE) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_STRING) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_CHARACTER) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_TRIPLE) { - styler.ColourSegment(startSeg, lengthDoc, state); - } else if (state == SCE_P_TRIPLEDOUBLE) { - styler.ColourSegment(startSeg, lengthDoc, state); - } - } -} - -static void ColouriseBatchLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - if (0 == strncmp(lineBuffer, "REM", 3)) { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (0 == strncmp(lineBuffer, "rem", 3)) { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (0 == strncmp(lineBuffer, "SET", 3)) { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if (0 == strncmp(lineBuffer, "set", 3)) { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if (lineBuffer[0] == ':') { - styler.ColourSegment(0, lengthLine - 1, 3); - } else { - styler.ColourSegment(0, lengthLine - 1, 0); - } -} - -static void ColouriseBatchDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i < startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - ColouriseBatchLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColouriseBatchLine(lineBuffer, linePos, styler); -} - -enum { eScriptNone, eScriptJS, eScriptVBS, eScriptPython }; -static int segIsScriptingIndicator(StylingContext &styler, unsigned int start, unsigned int end, int prevValue) { - char s[100]; - s[0] = '\0'; - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } -Platform::DebugPrintf("Scripting indicator [%s]\n", s); - if (strstr(s, "vbs")) - return eScriptVBS; - if (strstr(s, "pyth")) - return eScriptPython; - if (strstr(s, "javas")) - return eScriptJS; - if (strstr(s, "jscr")) - return eScriptJS; - - return prevValue; -} - -static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') || - (styler[start] == '-') || (styler[start] == '#'); - char chAttr = SCE_H_ATTRIBUTEUNKNOWN; - if (wordIsNumber) { - chAttr = SCE_H_NUMBER; - } else { - char s[100]; - s[0] = '\0'; - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } - if (keywords.InList(s)) - chAttr = SCE_H_ATTRIBUTE; - } - styler.ColourTo(end, chAttr); -} - -static int classifyTagHTML(unsigned int start, unsigned int end, - WordList &keywords, StylingContext &styler) { - char s[100]; - // Copy after the '<' - unsigned int i = 0; - for (int cPos=start; cPos <= end && i < 30; cPos++) { - char ch = styler[cPos]; - if (ch != '<') - s[i++] = tolower(ch); - } - s[i] = '\0'; - char chAttr = SCE_H_TAGUNKNOWN; - if (s[0] == '!' && s[1] == '-' && s[2] == '-') { //Comment - chAttr = SCE_H_COMMENT; - } else if (s[0] == '/') { // Closing tag - if (keywords.InList(s + 1)) - chAttr = SCE_H_TAG; - } else { - if (keywords.InList(s)) { - chAttr = SCE_H_TAG; - if (0 == strcmp(s, "script")) - chAttr = SCE_H_SCRIPT; - } - } - styler.ColourTo(end, chAttr); - return chAttr; -} - -static void classifyWordHTJS(unsigned int start, unsigned int end, - WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_HJ_WORD; - if (wordIsNumber) - chAttr = SCE_HJ_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_HJ_KEYWORD; - } - styler.ColourTo(end, chAttr); -} - -static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = tolower(styler[start + i]); - s[i + 1] = '\0'; - } - char chAttr = SCE_HB_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_HB_NUMBER; - else { - if (keywords.InList(s)) { - chAttr = SCE_HB_WORD; - if (strcmp(s, "rem") == 0) - chAttr = SCE_HB_COMMENTLINE; - } - } - styler.ColourTo(end, chAttr); - if (chAttr == SCE_HB_COMMENTLINE) - return SCE_HB_COMMENTLINE; - else - return SCE_HB_DEFAULT; -} - -static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler, char *prevWord) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - s[i + 1] = '\0'; - } - char chAttr = SCE_HP_IDENTIFIER; - if (0 == strcmp(prevWord, "class")) - chAttr = SCE_HP_CLASSNAME; - else if (0 == strcmp(prevWord, "def")) - chAttr = SCE_HP_DEFNAME; - else if (wordIsNumber) - chAttr = SCE_HP_NUMBER; - else if (keywords.InList(s)) - chAttr = SCE_HP_WORD; - styler.ColourTo(end, chAttr); - strcpy(prevWord, s); -} - -inline bool ishtmlwordchar(char ch) { - return isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'; -} - -static bool InTagState(int state) { - return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || - state == SCE_H_SCRIPT || - state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || - state == SCE_H_NUMBER || state == SCE_H_OTHER || - state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; -} - -static bool isLineEnd(char ch) { - return ch == '\r' || ch == '\n'; -} - -static void ColouriseHyperTextDoc(int codePage, int startPos, int length, - int initStyle, WordList &keywords, WordList &keywords2, WordList &keywords3, WordList &keywords4, - StylingContext &styler) { - - styler.StartAt(startPos, 63); - bool lastTagWasScript = false; - char prevWord[200]; - prevWord[0] = '\0'; - int scriptLanguage = eScriptJS; - int state = initStyle; - // If inside a tag, it may be a script tage, so reread from the start to ensure any language tas are seen - if (InTagState(state)) { - while ((startPos > 1) && (InTagState(styler.StyleAt(startPos - 1)))) { - startPos--; - } - state = SCE_H_DEFAULT; - } - styler.StartAt(startPos, 63); - - int lineState = eScriptVBS; - int lineCurrent = styler.GetLine(startPos); - if (lineCurrent > 0) - lineState = styler.GetLineState(lineCurrent); - int defaultScript = lineState &0xff; - int beforeASP = (lineState >> 8) &0xff; - int inASP = (lineState >> 16) &0xff; - - char chPrev = ' '; - char chPrev2 = ' '; - styler.StartSegment(startPos); - int lengthDoc = startPos + length; - for (int i = startPos; i <= lengthDoc; i++) { - char ch = styler[i]; - char chNext = styler.SafeGetCharAt(i + 1); - char chNext2 = styler.SafeGetCharAt(i + 2); - - if (IsLeadByte(codePage, ch)) { // dbcs - chPrev2 = ' '; - chPrev = ' '; - i += 1; - continue; - } - - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - // New line -> record any line state onto /next/ line - lineCurrent++; - styler.SetLineState(lineCurrent, - defaultScript | (beforeASP << 8) | (inASP << 16)); - } - - // Handle ASP even within other constructs as it is a preprocessor - if ((ch == '<') && (chNext == '%')) { - beforeASP = state; - styler.ColourTo(i - 1, state); - if (chNext2 == '@') { - styler.ColourTo(i + 2, SCE_H_ASP); - state = SCE_H_ASPAT; - i+=2; - } else { - if (defaultScript == eScriptVBS) - state = SCE_HB_START; - else if (defaultScript == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - if (chNext2 == '=') { - styler.ColourTo(i + 2, SCE_H_ASP); - i+=2; - } else { - styler.ColourTo(i + 1, SCE_H_ASP); - i++; - } - } - inASP = 1; - continue; - } - if (inASP && (ch == '%') && (chNext == '>')) { - if (state == SCE_H_ASPAT) - defaultScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i-1, defaultScript); - // Bounce out of any ASP mode - styler.ColourTo(i - 1, state); - //if (state == SCE_H_ASPAT) - // styler.ColourTo(i+1, SCE_H_ASPAT); - //else - styler.ColourTo(i+1, SCE_H_ASP); - i++; - state = beforeASP; - beforeASP = SCE_H_DEFAULT; - inASP = 0; - continue; - } - - if (state == SCE_H_DEFAULT) { - if (ch == '<') { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - if (chNext == '?') { - styler.ColourTo(i + 1, SCE_H_XMLSTART); - i++; - ch = chNext; - } - } else if (ch == '&') { - styler.ColourTo(i - 1, SCE_H_DEFAULT); - state = SCE_H_ENTITY; - } - } else if (state == SCE_H_COMMENT) { - if ((ch == '>') && (chPrev == '-')) { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_ENTITY) { - if (ch == ';') { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_TAGUNKNOWN) { - if (!ishtmlwordchar(ch) && ch != '/' && ch != '-') { - int eClass = classifyTagHTML(styler.GetStartSegment(), i - 1, keywords, styler); - lastTagWasScript = eClass == SCE_H_SCRIPT; - if (lastTagWasScript) { - scriptLanguage = eScriptJS; - eClass = SCE_H_TAG; - } - if (ch == '>') { - styler.ColourTo(i, SCE_H_TAG); - if (lastTagWasScript) { - if (scriptLanguage == eScriptVBS) - state = SCE_HB_START; - else if (scriptLanguage == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - } else { - state = SCE_H_DEFAULT; - } - } else { - if (eClass == SCE_H_COMMENT) { - state = SCE_H_COMMENT; - } else { - state = SCE_H_OTHER; - } - } - } - } else if (state == SCE_H_ATTRIBUTE) { - if (!ishtmlwordchar(ch) && ch != '/' && ch != '-') { - if (lastTagWasScript) - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i-1, scriptLanguage); - classifyAttribHTML(styler.GetStartSegment(), i - 1, keywords, styler); - if (ch == '>') { - styler.ColourTo(i, SCE_H_TAG); - if (lastTagWasScript) { - if (scriptLanguage == eScriptVBS) - state = SCE_HB_START; - else if (scriptLanguage == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - } else { - state = SCE_H_DEFAULT; - } - } else { - state = SCE_H_OTHER; - } - } - } else if (state == SCE_H_ASP) { - if ((ch == '>') && (chPrev == '%')) { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_ASPAT) { - if ((ch == '>') && (chPrev == '%')) { - styler.ColourTo(i, state); - state = SCE_H_DEFAULT; - } - } else if (state == SCE_H_OTHER) { - if (ch == '>') { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_H_TAG); - if (lastTagWasScript) { - if (scriptLanguage == eScriptVBS) - state = SCE_HB_START; - else if (scriptLanguage == eScriptPython) - state = SCE_HP_START; - else - state = SCE_HJ_START; - } else { - state = SCE_H_DEFAULT; - } - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - state = SCE_H_DOUBLESTRING; - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - state = SCE_H_SINGLESTRING; - } else if (ch == '/' && chNext == '>') { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_TAGEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } else if (ch == '?' && chNext == '>') { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_XMLEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } else if (ishtmlwordchar(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_H_ATTRIBUTE; - } - } else if (state == SCE_H_DOUBLESTRING) { - if (ch == '\"') { - if (lastTagWasScript) - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); - styler.ColourTo(i, SCE_H_DOUBLESTRING); - state = SCE_H_OTHER; - } - } else if (state == SCE_H_SINGLESTRING) { - if (ch == '\'') { - if (lastTagWasScript) - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); - styler.ColourTo(i, SCE_H_SINGLESTRING); - state = SCE_H_OTHER; - } - } else if (state == SCE_HJ_DEFAULT || state == SCE_HJ_START) { - if (iswordstart(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HJ_WORD; - } else if (ch == '/' && chNext == '*') { - styler.ColourTo(i - 1, state); - if (chNext2 == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_SINGLESTRING; - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, state); - state = SCE_HJ_COMMENTLINE; - } else if (isoperator(ch)) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_HJ_SYMBOLS); - state = SCE_HJ_DEFAULT; - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HJ_START) { - styler.ColourTo(i - 1, state); - state = SCE_HJ_DEFAULT; - } - } - } else if (state == SCE_HJ_WORD) { - if (!iswordchar(ch)) { - classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler); - //styler.ColourTo(i - 1, eHTJSKeyword); - state = SCE_HJ_DEFAULT; - if (ch == '/' && chNext == '*') { - if (chNext2 == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_HJ_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - state = SCE_HJ_SINGLESTRING; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HJ_SYMBOLS); - state = SCE_HJ_DEFAULT; - } - } - } else if (state == SCE_HJ_COMMENT) { - if (ch == '/' && chPrev == '*') { - state = SCE_HJ_DEFAULT; - styler.ColourTo(i, SCE_HJ_COMMENT); - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_TAGEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } - } else if (state == SCE_HJ_COMMENTDOC) { - if (ch == '/' && chPrev == '*') { - state = SCE_HJ_DEFAULT; - styler.ColourTo(i, SCE_HJ_COMMENTDOC); - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i + 1, SCE_H_TAGEND); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } - } else if (state == SCE_HJ_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, SCE_HJ_COMMENTLINE); - state = SCE_HJ_DEFAULT; - } else if ((ch == '<') && (chNext == '/')) { - // Common to hide end script tag in comment - styler.ColourTo(i - 1, SCE_HJ_COMMENTLINE); - state = SCE_H_TAGUNKNOWN; - } - } else if (state == SCE_HJ_DOUBLESTRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - } - } else if (ch == '\"') { - styler.ColourTo(i, SCE_HJ_DOUBLESTRING); - state = SCE_HJ_DEFAULT; - i++; - ch = chNext; - } else if (isLineEnd(ch)) { - styler.ColourTo(i-1, state); - state = SCE_HJ_STRINGEOL; - } - } else if (state == SCE_HJ_SINGLESTRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - } - } else if (ch == '\'') { - styler.ColourTo(i, SCE_HJ_SINGLESTRING); - state = SCE_HJ_DEFAULT; - i++; - ch = chNext; - } else if (isLineEnd(ch)) { - styler.ColourTo(i-1, state); - state = SCE_HJ_STRINGEOL; - } - } else if (state == SCE_HJ_STRINGEOL) { - if (!isLineEnd(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HJ_DEFAULT; - } - } else if (state == SCE_HB_DEFAULT || state == SCE_HB_START) { - if (iswordstart(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HB_WORD; - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - state = SCE_HB_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - state = SCE_HB_STRING; - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, state); - state = SCE_HB_COMMENTLINE; - } else if (isoperator(ch)) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_HB_DEFAULT); - state = SCE_HB_DEFAULT; - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HB_START) { - styler.ColourTo(i - 1, state); - state = SCE_HB_DEFAULT; - } - } - } else if (state == SCE_HB_WORD) { - if (!iswordchar(ch)) { - state = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler); - if (state == SCE_HB_DEFAULT) { - if (ch == '\"') { - state = SCE_HB_STRING; - } else if (ch == '\'') { - state = SCE_HB_COMMENTLINE; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HB_DEFAULT); - state = SCE_HB_DEFAULT; - } - } - } - } else if (state == SCE_HB_STRING) { - if (ch == '\"') { - styler.ColourTo(i, state); - state = SCE_HB_DEFAULT; - i++; - ch = chNext; - } else if (ch == '\r' || ch == '\n') { - styler.ColourTo(i-1, state); - state = SCE_HB_STRINGEOL; - } - } else if (state == SCE_HB_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, state); - state = SCE_HB_DEFAULT; - } else if ((ch == '<') && (chNext == '/')) { - // Common to hide end script tag in comment - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } - } else if (state == SCE_HB_STRINGEOL) { - if (!isLineEnd(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HB_DEFAULT; - } - } else if (state == SCE_HP_DEFAULT || state == SCE_HP_START) { - if (iswordstart(ch)) { - styler.ColourTo(i - 1, state); - state = SCE_HP_WORD; - } else if ((ch == '<') && (chNext == '/')) { - styler.ColourTo(i - 1, state); - state = SCE_H_TAGUNKNOWN; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, state); - state = SCE_HP_COMMENTLINE; - } else if (ch == '#') { - styler.ColourTo(i - 1, state); - state = SCE_HP_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, state); - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_HP_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_STRING; - } - } else if (ch == '\'') { - styler.ColourTo(i - 1, state); - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_HP_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourTo(i - 1, state); - styler.ColourTo(i, SCE_HP_OPERATOR); - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HP_START) { - styler.ColourTo(i - 1, state); - state = SCE_HP_DEFAULT; - } - } - } else if (state == SCE_HP_WORD) { - if (!iswordchar(ch)) { - classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord); - state = SCE_HP_DEFAULT; - if (ch == '#') { - state = SCE_HP_COMMENTLINE; - } else if (ch == '\"') { - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_HP_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_STRING; - } - } else if (ch == '\'') { - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_HP_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = styler.SafeGetCharAt(i + 1); - } else { - state = SCE_HP_CHARACTER; - } - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HP_OPERATOR); - } - } - } else { - if (state == SCE_HP_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_STRING) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\"') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_CHARACTER) { - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } else if (ch == '\'') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_TRIPLE) { - if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } else if (state == SCE_HP_TRIPLEDOUBLE) { - if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { - styler.ColourTo(i, state); - state = SCE_HP_DEFAULT; - } - } - } - if (state == SCE_HB_DEFAULT) { // One of the above succeeded - if (ch == '\"') { - state = SCE_HB_STRING; - } else if (ch == '\'') { - state = SCE_HB_COMMENTLINE; - } else if (iswordstart(ch)) { - state = SCE_HB_WORD; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HB_DEFAULT); - } - } - if (state == SCE_HJ_DEFAULT) { // One of the above succeeded - if (ch == '/' && chNext == '*') { - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_HJ_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - state = SCE_HJ_SINGLESTRING; - } else if (iswordstart(ch)) { - state = SCE_HJ_WORD; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_HJ_SYMBOLS); - } - } - chPrev2 = chPrev; - chPrev = ch; - } - styler.ColourTo(lengthDoc - 1, state); -} - -static void ColourisePropsLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - int i = 0; - while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces - i++; - if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (lineBuffer[i] == '[') { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if (lineBuffer[i] == '@') { - styler.ColourSegment(0, i, 4); - if (lineBuffer[++i] == '=') - styler.ColourSegment(i, i, 3); - if (++i < lengthLine) - styler.ColourSegment(i, lengthLine - 1, 0); - } else { - while (lineBuffer[i] != '=' && (i < lengthLine)) // Search the '=' character - i++; - if (lineBuffer[i] == '=') { - styler.ColourSegment(0, i - 1, 0); - styler.ColourSegment(i, i, 3); - if (++i < lengthLine) - styler.ColourSegment(i, lengthLine - 1, 0); - } else - styler.ColourSegment(0, lengthLine - 1, 0); - } -} - -static void ColourisePropsDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i <= startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - lineBuffer[linePos] = '\0'; - ColourisePropsLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColourisePropsLine(lineBuffer, linePos, styler); -} - -static void ColouriseMakeLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - int i = 0; - while (isspace(lineBuffer[i]) && (i < lengthLine)) - i++; - if (lineBuffer[i] == '#' || lineBuffer[i] == '!') { - styler.ColourSegment(0, lengthLine - 1, 1); - } else { - styler.ColourSegment(0, lengthLine - 1, 0); - } -} - -static void ColouriseMakeDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i <= startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - ColouriseMakeLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColouriseMakeLine(lineBuffer, linePos, styler); -} - -static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, StylingContext &styler) { - if (lineBuffer[0] == '>') { - // Command or return status - styler.ColourSegment(0, lengthLine - 1, 4); - } else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) { - styler.ColourSegment(0, lengthLine - 1, 1); - } else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) { - // Borland error message - styler.ColourSegment(0, lengthLine - 1, 5); - } else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) { - // Borland warning message - styler.ColourSegment(0, lengthLine - 1, 5); - } else { - // Look for ::message - // Look for (line)message - // Look for (line,pos)message - int state = 0; - for (int i = 0; i < lengthLine; i++) { - if (state == 0 && lineBuffer[i] == ':' && isdigit(lineBuffer[i + 1])) { - state = 1; - } else if (state == 0 && lineBuffer[i] == '(') { - state = 10; - } else if (state == 1 && isdigit(lineBuffer[i])) { - state = 2; - } else if (state == 2 && lineBuffer[i] == ':') { - state = 3; - break; - } else if (state == 2 && !isdigit(lineBuffer[i])) { - state = 99; - } else if (state == 10 && isdigit(lineBuffer[i])) { - state = 11; - } else if (state == 11 && lineBuffer[i] == ',') { - state = 14; - } else if (state == 11 && lineBuffer[i] == ')') { - state = 12; - break; - } else if (state == 12 && lineBuffer[i] == ':') { - state = 13; - } else if (state == 14 && lineBuffer[i] == ')') { - state = 15; - break; - } else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) { - state = 99; - } - } - if (state == 3) { - styler.ColourSegment(0, lengthLine - 1, 2); - } else if ((state == 14) || (state == 15)) { - styler.ColourSegment(0, lengthLine - 1, 3); - } else { - styler.ColourSegment(0, lengthLine - 1, 0); - } - } -} - -static void ColouriseErrorListDoc(int startPos, int length, int, StylingContext &styler) { - char lineBuffer[1024]; - unsigned int linePos = 0; - for (int i = startPos; i <= startPos + length; i++) { - lineBuffer[linePos++] = styler[i]; - if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { - ColouriseErrorListLine(lineBuffer, linePos, styler); - linePos = 0; - } - } - if (linePos > 0) - ColouriseErrorListLine(lineBuffer, linePos, styler); -} - -static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, StylingContext &styler) { - char s[100]; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); - for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = toupper(styler[start + i]); - s[i + 1] = '\0'; - } - char chAttr = SCE_C_IDENTIFIER; - if (wordIsNumber) - chAttr = SCE_C_NUMBER; - else { - if (keywords.InList(s)) - chAttr = SCE_C_WORD; - } - styler.ColourSegment(start, end, chAttr); -} - -static void ColouriseSQLDoc(int codePage, int startPos, int length, - int initStyle, WordList &keywords, StylingContext &styler) { - - bool fold = styler.GetPropSet().GetInt("fold"); - int lineCurrent = styler.GetLine(startPos); - int spaceFlags = 0; - int indentCurrent = 0; - - int state = initStyle; - char chPrev = ' '; - char chNext = styler[startPos]; - int startSeg = startPos; - int lengthDoc = startPos + length; - bool prevCr = false; - for (int i = startPos; i <= lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - indentCurrent = IndentAmount(styler, lineCurrent, &spaceFlags); - int lev = indentCurrent; - if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { - // Only non whitespace lines can be headers - int indentNext = IndentAmount(styler, lineCurrent + 1, &spaceFlags); - if (indentCurrent < (indentNext & ~SC_FOLDLEVELWHITEFLAG)) { - lev |= SC_FOLDLEVELHEADERFLAG; - } - } - if (fold) { - styler.SetLevel(lineCurrent, lev); - } - } - - if (IsLeadByte(codePage, ch)) { // dbcs - chNext = styler.SafeGetCharAt(i + 2); - chPrev = ' '; - i += 1; - continue; - } - - if (state == SCE_C_DEFAULT) { - if (iswordstart(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_WORD; - startSeg = i; - } else if (ch == '/' && chNext == '*') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENT; - startSeg = i; - } else if (ch == '-' && chNext == '-') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_COMMENTLINE; - startSeg = i; - } else if (ch == '\'') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_STRING; - startSeg = i; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i - 1, state); - styler.ColourSegment(i, i, SCE_C_OPERATOR); - startSeg = i + 1; - } - } else if (state == SCE_C_WORD) { - if (!iswordchar(ch)) { - classifyWordSQL(startSeg, i - 1, keywords, styler); - state = SCE_C_DEFAULT; - startSeg = i; - if (ch == '/' && chNext == '*') { - state = SCE_C_COMMENT; - } else if (ch == '-' && chNext == '-') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\'') { - state = SCE_C_STRING; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - } - } - } else { - if (state == SCE_C_COMMENT) { - if (ch == '/' && chPrev == '*' && ( - (i > startSeg + 2) || ((initStyle == SCE_C_COMMENT) && (startSeg == startPos)))) { - state = SCE_C_DEFAULT; - styler.ColourSegment(startSeg, i, state); - startSeg = i + 1; - } - } else if (state == SCE_C_COMMENTLINE) { - if (ch == '\r' || ch == '\n') { - styler.ColourSegment(startSeg, i - 1, state); - state = SCE_C_DEFAULT; - startSeg = i; - } - } else if (state == SCE_C_STRING) { - if (ch == '\'') { - if ( chNext == '\'' ) { - i++; - } else { - styler.ColourSegment(startSeg, i, state); - state = SCE_C_DEFAULT; - i++; - startSeg = i; - } - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } - } - if (state == SCE_C_DEFAULT) { // One of the above succeeded - if (ch == '/' && chNext == '*') { - state = SCE_C_COMMENT; - } else if (ch == '-' && chNext == '-') { - state = SCE_C_COMMENTLINE; - } else if (ch == '\'') { - state = SCE_C_STRING; - } else if (iswordstart(ch)) { - state = SCE_C_WORD; - } else if (isoperator(ch)) { - styler.ColourSegment(startSeg, i, SCE_C_OPERATOR); - startSeg = i + 1; - } - } - } - chPrev = ch; - } - if (startSeg < lengthDoc) - styler.ColourSegment(startSeg, lengthDoc - 1, state); -} - -void ColouriseDoc(int codePage, int startPos, int lengthDoc, int initStyle, - int language, WordList *keywordlists[], StylingContext &styler) { - //Platform::DebugPrintf("ColouriseDoc <%s>\n", language); - if (language == SCLEX_PYTHON) { - // Python uses a different mask because bad indentation is marked by oring with 32 - styler.StartAt(startPos, 127); - ColourisePyDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_PERL) { - // Lexer for perl often has to backtrack to start of current style to determine - // which characters are being used as quotes, how deeply nested is the - // start position and what the termination string is for here documents - ColourisePerlDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if ((language == SCLEX_HTML) || (language == SCLEX_XML)) { - // Lexer for HTML requires more lexical states (6 bits worth) than most lexers - ColouriseHyperTextDoc(codePage, startPos, lengthDoc, initStyle, - *keywordlists[0], *keywordlists[1], *keywordlists[2], *keywordlists[3], styler); - } else { - styler.StartAt(startPos); - if (language == SCLEX_CPP) { - ColouriseCppDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_SQL) { - ColouriseSQLDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_VB) { - ColouriseVBDoc(codePage, startPos, lengthDoc, initStyle, *keywordlists[0], styler); - } else if (language == SCLEX_PROPERTIES) { - ColourisePropsDoc(startPos, lengthDoc, initStyle, styler); - } else if (language == SCLEX_ERRORLIST) { - ColouriseErrorListDoc(startPos, lengthDoc, initStyle, styler); - } else if (language == SCLEX_MAKEFILE) { - ColouriseMakeDoc(startPos, lengthDoc, initStyle, styler); - } else if (language == SCLEX_BATCH) { - ColouriseBatchDoc(startPos, lengthDoc, initStyle, styler); - } else { - // Null language means all style bytes are 0 so just mark the end - no need to fill in. - styler.StartAt(startPos + lengthDoc - 1); - styler.ColourSegment(0, 0, 0); - } + // Unknown language + // Null language means all style bytes are 0 so just mark the end - no need to fill in. + if (lengthDoc > 0) { + styler.StartAt(startPos + lengthDoc - 1); + styler.StartSegment(startPos + lengthDoc - 1); + styler.ColourTo(startPos + lengthDoc - 1, 0); } } diff --git a/src/stc/scintilla/src/LexCPP.cxx b/src/stc/scintilla/src/LexCPP.cxx new file mode 100644 index 0000000000..b6358ab332 --- /dev/null +++ b/src/stc/scintilla/src/LexCPP.cxx @@ -0,0 +1,262 @@ +// SciTE - Scintilla based Text Editor +// LexCPP.cxx - lexer for C++, C, Java, and Javascript +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + bool wordIsUUID = false; + char chAttr = SCE_C_IDENTIFIER; + if (isdigit(s[0]) || (s[0] == '.')) + chAttr = SCE_C_NUMBER; + else { + if (keywords.InList(s)) { + chAttr = SCE_C_WORD; + wordIsUUID = strcmp(s, "uuid") == 0; + } + } + styler.ColourTo(end, chAttr); + return wordIsUUID; +} + +static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + bool fold = styler.GetPropertyInt("fold"); + bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor"); + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + + int state = initStyle; + if (state == SCE_C_STRINGEOL) // Does not leak onto next line + state = SCE_C_DEFAULT; + char chPrev = ' '; + char chNext = styler[startPos]; + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + styler.StartSegment(startPos); + bool lastWordWasUUID = false; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // End of line + if (state == SCE_C_STRINGEOL) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + levelPrev = levelCurrent; + } + visibleChars = 0; + } + if (!isspace(ch)) + visibleChars++; + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (ch == '@' && chNext == '\"') { + styler.ColourTo(i-1, state); + state = SCE_C_VERBATIM; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } else if (iswordstart(ch) || (ch == '@')) { + styler.ColourTo(i-1, state); + if (lastWordWasUUID) { + state = SCE_C_UUID; + lastWordWasUUID = false; + } else { + state = SCE_C_IDENTIFIER; + } + } else if (ch == '/' && chNext == '*') { + styler.ColourTo(i-1, state); + if (styler.SafeGetCharAt(i + 2) == '*') + state = SCE_C_COMMENTDOC; + else + state = SCE_C_COMMENT; + } else if (ch == '/' && chNext == '/') { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i-1, state); + state = SCE_C_STRING; + } else if (ch == '\'') { + styler.ColourTo(i-1, state); + state = SCE_C_CHARACTER; + } else if (ch == '#' && visibleChars == 1) { + // Preprocessor commands are alone on their line + styler.ColourTo(i-1, state); + state = SCE_C_PREPROCESSOR; + // Skip whitespace between # and preprocessor word + do { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } while (isspace(ch) && (i < lengthDoc)); + } else if (isoperator(ch)) { + styler.ColourTo(i-1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + } else if (state == SCE_C_IDENTIFIER) { + if (!iswordchar(ch)) { + lastWordWasUUID = classifyWordCpp(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_C_DEFAULT; + if (ch == '/' && chNext == '*') { + if (styler.SafeGetCharAt(i + 2) == '*') + state = SCE_C_COMMENTDOC; + else + state = SCE_C_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (ch == '\'') { + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + } + } else { + if (state == SCE_C_PREPROCESSOR) { + if (stylingWithinPreprocessor) { + if (isspace(ch)) { + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } else { + if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) { + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENT) { + if (ch == '/' && chPrev == '*') { + if (((i > styler.GetStartSegment() + 2) || ( + (initStyle == SCE_C_COMMENT) && + (styler.GetStartSegment() == static_cast(startPos))))) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENTDOC) { + if (ch == '/' && chPrev == '*') { + if (((i > styler.GetStartSegment() + 2) || ( + (initStyle == SCE_C_COMMENTDOC) && + (styler.GetStartSegment() == static_cast(startPos))))) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } else if (chNext == '\r' || chNext == '\n') { + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } + } else if (state == SCE_C_CHARACTER) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_VERBATIM) { + if (ch == '\"') { + if (chNext == '\"') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } else { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_UUID) { + if (ch == '\r' || ch == '\n' || ch == ')') { + styler.ColourTo(i-1, state); + if (ch == ')') + styler.ColourTo(i, SCE_C_OPERATOR); + state = SCE_C_DEFAULT; + } + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + + } +} + +LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc); diff --git a/src/stc/scintilla/src/LexHTML.cxx b/src/stc/scintilla/src/LexHTML.cxx new file mode 100644 index 0000000000..7868b47fc8 --- /dev/null +++ b/src/stc/scintilla/src/LexHTML.cxx @@ -0,0 +1,1151 @@ +// SciTE - Scintilla based Text Editor +// LexHTML.cxx - lexer for HTML +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START) +#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START) +#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START) + +enum { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML }; +enum { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc }; + +static int segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, int prevValue) { + char s[30 + 1]; + s[0] = '\0'; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + //Platform::DebugPrintf("Scripting indicator [%s]\n", s); + if (strstr(s, "vbs")) + return eScriptVBS; + if (strstr(s, "pyth")) + return eScriptPython; + if (strstr(s, "javas")) + return eScriptJS; + if (strstr(s, "jscr")) + return eScriptJS; + if (strstr(s, "php")) + return eScriptPHP; + if (strstr(s, "xml")) + return eScriptXML; + + return prevValue; +} + +static int PrintScriptingIndicatorOffset(Accessor &styler, unsigned int start, unsigned int end) { + int iResult = 0; + char s[30 + 1]; + s[0] = '\0'; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + if (0 == strncmp(s, "php", 3)) { + iResult = 3; + } + + return iResult; +} + +//static int ScriptOfState(int state,int defaultScript) +static int ScriptOfState(int state) { + int scriptLanguage; + + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + scriptLanguage = eScriptPython; + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + scriptLanguage = eScriptVBS; + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_STRINGEOL)) { + scriptLanguage = eScriptJS; + } else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) { + scriptLanguage = eScriptPHP; + } else { + // scriptLanguage = defaultScript; + scriptLanguage = eScriptNone; + } + + return scriptLanguage; +} + +static int statePrintForState(int state, int inScriptType) { + int StateToPrint; + + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON); + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS); + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_STRINGEOL)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS); + } else { + StateToPrint = state; + } + + return StateToPrint; +} + +static int stateForPrintState(int StateToPrint) { + int state; + + if ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) { + state = StateToPrint - SCE_HA_PYTHON; + } else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) { + state = StateToPrint - SCE_HA_VBS; + } else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_STRINGEOL)) { + state = StateToPrint - SCE_HA_JS; + } else { + state = StateToPrint; + } + + return state; +} + +static inline bool IsNumber(unsigned int start, Accessor &styler) { + return isdigit(styler[start]) || (styler[start] == '.') || + (styler[start] == '-') || (styler[start] == '#'); +} + +static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + bool wordIsNumber = IsNumber(start, styler); + char chAttr = SCE_H_ATTRIBUTEUNKNOWN; + if (wordIsNumber) { + chAttr = SCE_H_NUMBER; + } else { + char s[30 + 1]; + s[0] = '\0'; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + if (keywords.InList(s)) + chAttr = SCE_H_ATTRIBUTE; + } + if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords) + // No keywords -> all are known + chAttr = SCE_H_ATTRIBUTE; + styler.ColourTo(end, chAttr); +} + +static int classifyTagHTML(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler) { + char s[30 + 1]; + // Copy after the '<' + unsigned int i = 0; + for (unsigned int cPos = start; cPos <= end && i < 30; cPos++) { + char ch = styler[cPos]; + if (ch != '<') + s[i++] = static_cast(tolower(ch)); + } + s[i] = '\0'; + char chAttr = SCE_H_TAGUNKNOWN; + if (s[0] == '!' && s[1] == '-' && s[2] == '-') { //Comment + chAttr = SCE_H_COMMENT; + } else if (strcmp(s, "![cdata[") == 0) { // In lower case because already converted + chAttr = SCE_H_CDATA; + } else if (s[0] == '/') { // Closing tag + if (keywords.InList(s + 1)) + chAttr = SCE_H_TAG; + } else { + if (keywords.InList(s)) { + chAttr = SCE_H_TAG; + } + if (0 == strcmp(s, "script")) { + chAttr = SCE_H_SCRIPT; + } + } + if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords) + // No keywords -> all are known + chAttr = SCE_H_TAG; + styler.ColourTo(end, chAttr); + return chAttr; +} + +static void classifyWordHTJS(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler, int inScriptType) { + char chAttr = SCE_HJ_WORD; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HJ_NUMBER; + else { + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + if (keywords.InList(s)) + chAttr = SCE_HJ_KEYWORD; + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); +} + +static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, int inScriptType) { + char chAttr = SCE_HB_IDENTIFIER; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HB_NUMBER; + else { + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + if (keywords.InList(s)) { + chAttr = SCE_HB_WORD; + if (strcmp(s, "rem") == 0) + chAttr = SCE_HB_COMMENTLINE; + } + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + if (chAttr == SCE_HB_COMMENTLINE) + return SCE_HB_COMMENTLINE; + else + return SCE_HB_DEFAULT; +} + +static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord, int inScriptType) { + bool wordIsNumber = isdigit(styler[start]); + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_HP_IDENTIFIER; + if (0 == strcmp(prevWord, "class")) + chAttr = SCE_HP_CLASSNAME; + else if (0 == strcmp(prevWord, "def")) + chAttr = SCE_HP_DEFNAME; + else if (wordIsNumber) + chAttr = SCE_HP_NUMBER; + else if (keywords.InList(s)) + chAttr = SCE_HP_WORD; + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + strcpy(prevWord, s); +} + +// Update the word colour to default or keyword +// Called when in a PHP word +static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char chAttr = SCE_HPHP_DEFAULT; + bool wordIsNumber = isdigit(styler[start]); + if (wordIsNumber) + chAttr = SCE_HPHP_NUMBER; + else { + char s[30 + 1]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + if (keywords.InList(s)) + chAttr = SCE_HPHP_WORD; + } + styler.ColourTo(end, chAttr); +} + +// Return the first state to reach when entering a scripting language +static int StateForScript(int scriptLanguage) { + int Result; + switch (scriptLanguage) { + case eScriptVBS: + Result = SCE_HB_START; + break; + case eScriptPython: + Result = SCE_HP_START; + break; + case eScriptPHP: + Result = SCE_HPHP_DEFAULT; + break; + case eScriptXML: + Result = SCE_H_TAGUNKNOWN; + break; + default : + Result = SCE_HJ_START; + break; + } + return Result; +} + +inline bool ishtmlwordchar(char ch) { + return isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'; +} + +static bool InTagState(int state) { + return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || + state == SCE_H_SCRIPT || + state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || + state == SCE_H_NUMBER || state == SCE_H_OTHER || + state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; +} + +static bool isLineEnd(char ch) { + return ch == '\r' || ch == '\n'; +} + +static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + + // Lexer for HTML requires more lexical states (7 bits worth) than most lexers + styler.StartAt(startPos, 127); + char prevWord[200]; + prevWord[0] = '\0'; + int StateToPrint = initStyle; + int state = stateForPrintState(StateToPrint); + + // If inside a tag, it may be a script tag, so reread from the start to ensure any language tags are seen + if (InTagState(state)) { + while ((startPos > 1) && (InTagState(styler.StyleAt(startPos - 1)))) { + startPos--; + } + state = SCE_H_DEFAULT; + } + styler.StartAt(startPos, 127); + + int lineState = eScriptVBS; + int lineCurrent = styler.GetLine(startPos); + if (lineCurrent > 0) + lineState = styler.GetLineState(lineCurrent); + int inScriptType = (lineState >> 0) & 0x03; // 2 bits + int defaultScript = (lineState >> 4) & 0x0F; // 4 bits + int beforePreProc = (lineState >> 8) & 0xFF; // 8 bits + + // int scriptLanguage = ScriptOfState(state,defaultScript); + int scriptLanguage = ScriptOfState(state); + + bool fold = styler.GetPropertyInt("fold"); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + int visibleChars = 0; + + char chPrev = ' '; + char ch = ' '; + styler.StartSegment(startPos); + int lengthDoc = startPos + length; + for (int i = startPos; i < lengthDoc; i++) { + char chPrev2 = chPrev; + chPrev = ch; + ch = styler[i]; + char chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + // Handle DBCS codepages + if (styler.IsLeadByte(ch)) { + chPrev = ' '; + i += 1; + continue; + } + + if (fold && !isspace(ch)) + visibleChars++; + + // handle script folding + if (fold) { + switch (scriptLanguage) { + case eScriptJS: + case eScriptPHP: + //not currently supported case eScriptVBS: + if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC)) { + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + break; + case eScriptPython: + if (state != SCE_HP_COMMENTLINE) { + if ((ch == ':') && ((chNext == '\n') || (chNext == '\r' && chNext2 == '\n'))) { + levelCurrent++; + } else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) { + // check if the number of tabs is lower than the level + int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8; + for (int j = 0;Findlevel > 0;j++) { + char chTmp = styler.SafeGetCharAt(i + j + 1); + if (chTmp == '\t') { + Findlevel -= 8; + } else if (chTmp == ' ') { + Findlevel--; + } else break; + } + + if (Findlevel > 0) { + levelCurrent -= Findlevel / 8; + if (Findlevel % 8) levelCurrent--; + } + } + } + break; + } + } + + // decide what is the current state to print (depending of the script tag) + StateToPrint = statePrintForState(state, inScriptType); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // New line -> record any line state onto /next/ line + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + visibleChars = 0; + levelPrev = levelCurrent; + } + lineCurrent++; + styler.SetLineState(lineCurrent, + ((inScriptType & 0x03) << 0) | + ((defaultScript & 0x0F) << 4) | + ((beforePreProc & 0xFF) << 8)); + } + + // generic end of script processing + else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { + // Check if it's the end of the script tag (or any other HTML tag) + switch (state) { + // in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!) + case SCE_H_DOUBLESTRING: + case SCE_H_SINGLESTRING: + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + case SCE_HJ_COMMENTLINE: + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HB_STRING: + case SCE_HP_STRING: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + break; + default : + // maybe we should check here if it's a tag and if it's SCRIPT + + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_TAGUNKNOWN; + inScriptType = eHtml; + scriptLanguage = eScriptNone; + i += 2; + continue; + } + } + + ///////////////////////////////////// + // handle the start of PHP pre-processor = Non-HTML + else if ((ch == '<') && (chNext == '?')) { + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment() + 2, i + 10, eScriptPHP); + i++; + i += PrintScriptingIndicatorOffset(styler, styler.GetStartSegment() + 2, i + 10); + if (scriptLanguage == eScriptXML) + styler.ColourTo(i, SCE_H_XMLSTART); + else + styler.ColourTo(i, SCE_H_QUESTION); + state = StateForScript(scriptLanguage); + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + continue; + } + + // handle the start of ASP pre-processor = Non-HTML + else if ((ch == '<') && (chNext == '%')) { + styler.ColourTo(i - 1, StateToPrint); + beforePreProc = state; + if (inScriptType == eNonHtmlScript) + inScriptType = eNonHtmlScriptPreProc; + else + inScriptType = eNonHtmlPreProc; + + if (chNext2 == '@') { + i += 2; // place as if it was the second next char treated + state = SCE_H_ASPAT; + } else { + if (chNext2 == '=') { + i += 2; // place as if it was the second next char treated + } + else { + i++; // place as if it was the next char treated + } + + + state = StateForScript(defaultScript); + } + styler.ColourTo(i, SCE_H_ASP); + continue; + } + + // handle the end of a pre-processor = Non-HTML + else if (((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && ((ch == '?') || (ch == '%')) && (chNext == '>')) { + if (state == SCE_H_ASPAT) { + defaultScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, defaultScript); + } + // Bounce out of any ASP mode + switch (state) { + case SCE_HJ_WORD: + classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); + break; + case SCE_HB_WORD: + classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); + break; + case SCE_HP_WORD: + classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType); + break; + case SCE_HPHP_WORD: + classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); + break; + default : + styler.ColourTo(i - 1, StateToPrint); + break; + } + i++; + if (ch == '%') + styler.ColourTo(i, SCE_H_ASP); + else if (scriptLanguage == eScriptXML) + styler.ColourTo(i, SCE_H_XMLEND); + else + styler.ColourTo(i, SCE_H_QUESTION); + state = beforePreProc; + if (inScriptType == eNonHtmlScriptPreProc) + inScriptType = eNonHtmlScript; + else + inScriptType = eHtml; + scriptLanguage = eScriptNone; + continue; + } + ///////////////////////////////////// + + switch (state) { + case SCE_H_DEFAULT: + if (ch == '<') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '!' && chNext2 == '-' && styler.SafeGetCharAt(i + 3) == '-') + state = SCE_H_COMMENT; + else + state = SCE_H_TAGUNKNOWN; + } else if (ch == '&') { + styler.ColourTo(i - 1, SCE_H_DEFAULT); + state = SCE_H_ENTITY; + } + break; + case SCE_H_COMMENT: + if ((ch == '>') && (chPrev == '-') && (chPrev2 == '-')) { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + } + break; + case SCE_H_CDATA: + if ((ch == '>') && (chPrev == ']') && (chPrev2 == ']')) { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + } + break; + case SCE_H_ENTITY: + if (ch == ';') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_DEFAULT; + } + if (ch != '#' && !isalnum(ch)) { // Should check that '#' follows '&', but it is unlikely anyway... + styler.ColourTo(i, SCE_H_TAGUNKNOWN); + state = SCE_H_DEFAULT; + } + break; + case SCE_H_TAGUNKNOWN: + if (!ishtmlwordchar(ch) && ch != '/' && ch != '-' && ch != '[') { + int eClass = classifyTagHTML(styler.GetStartSegment(), i - 1, keywords, styler); + if (eClass == SCE_H_SCRIPT) { + inScriptType = eNonHtmlScript; + scriptLanguage = defaultScript; + eClass = SCE_H_TAG; + } + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else { + if (eClass == SCE_H_CDATA) { + state = SCE_H_CDATA; + } else { + state = SCE_H_OTHER; + } + } + } + break; + case SCE_H_ATTRIBUTE: + if (!ishtmlwordchar(ch) && ch != '/' && ch != '-') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, scriptLanguage); + } + classifyAttribHTML(styler.GetStartSegment(), i - 1, keywords, styler); + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else if (ch == '=') { + styler.ColourTo(i, SCE_H_OTHER); + state = SCE_H_VALUE; + } else { + state = SCE_H_OTHER; + } + } + break; + case SCE_H_OTHER: + if (ch == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_DOUBLESTRING; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_SINGLESTRING; + } else if (ch == '=') { + styler.ColourTo(i, StateToPrint); + state = SCE_H_VALUE; + } else if (ch == '/' && chNext == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i + 1, SCE_H_TAGEND); + i++; + ch = chNext; + state = SCE_H_DEFAULT; + } else if (ch == '?' && chNext == '>') { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i + 1, SCE_H_XMLEND); + i++; + ch = chNext; + state = SCE_H_DEFAULT; + } else if (ishtmlwordchar(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_H_ATTRIBUTE; + } + break; + case SCE_H_DOUBLESTRING: + if (ch == '\"') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); + } + styler.ColourTo(i, SCE_H_DOUBLESTRING); + state = SCE_H_OTHER; + } + break; + case SCE_H_SINGLESTRING: + if (ch == '\'') { + if (inScriptType == eNonHtmlScript) { + scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); + } + styler.ColourTo(i, SCE_H_SINGLESTRING); + state = SCE_H_OTHER; + } + break; + case SCE_H_VALUE: + if (!ishtmlwordchar(ch)) { + if (ch == '\"') { + // Should really test for being first character + state = SCE_H_DOUBLESTRING; + } else if (ch == '\'') { + state = SCE_H_SINGLESTRING; + } else { + if (IsNumber(styler.GetStartSegment(), styler)) { + styler.ColourTo(i - 1, SCE_H_NUMBER); + } else { + styler.ColourTo(i - 1, StateToPrint); + } + if (ch == '>') { + styler.ColourTo(i, SCE_H_TAG); + if (inScriptType == eNonHtmlScript) { + state = StateForScript(scriptLanguage); + } else { + state = SCE_H_DEFAULT; + } + } else { + state = SCE_H_OTHER; + } + } + } + break; + case SCE_HJ_DEFAULT: + case SCE_HJ_START: + case SCE_HJ_SYMBOLS: + if (iswordstart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_WORD; + } else if (ch == '/' && chNext == '*') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext2 == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_SINGLESTRING; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); + state = SCE_HJ_DEFAULT; + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HJ_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DEFAULT; + } + } + break; + case SCE_HJ_WORD: + if (!iswordchar(ch)) { + classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); + //styler.ColourTo(i - 1, eHTJSKeyword); + state = SCE_HJ_DEFAULT; + if (ch == '/' && chNext == '*') { + if (chNext2 == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_HJ_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + state = SCE_HJ_SINGLESTRING; + } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isoperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); + state = SCE_HJ_DEFAULT; + } + } + break; + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + if (ch == '/' && chPrev == '*') { + styler.ColourTo(i, StateToPrint); + state = SCE_HJ_DEFAULT; + } + break; + case SCE_HJ_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, statePrintForState(SCE_HJ_COMMENTLINE, inScriptType)); + state = SCE_HJ_DEFAULT; + } + break; + case SCE_HJ_DOUBLESTRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + } + } else if (ch == '\"') { + styler.ColourTo(i, statePrintForState(SCE_HJ_DOUBLESTRING, inScriptType)); + state = SCE_HJ_DEFAULT; + i++; + ch = chNext; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_STRINGEOL; + } + break; + case SCE_HJ_SINGLESTRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + } + } else if (ch == '\'') { + styler.ColourTo(i, statePrintForState(SCE_HJ_SINGLESTRING, inScriptType)); + state = SCE_HJ_DEFAULT; + i++; + ch = chNext; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; + } else if (isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_STRINGEOL; + } + break; + case SCE_HJ_STRINGEOL: + if (!isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_DEFAULT; + } else if (!isLineEnd(chNext)) { + styler.ColourTo(i, StateToPrint); + state = SCE_HJ_DEFAULT; + } + break; + case SCE_HB_DEFAULT: + case SCE_HB_START: + if (iswordstart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_WORD; + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_STRING; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_COMMENTLINE; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, SCE_HB_DEFAULT); + state = SCE_HB_DEFAULT; + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HB_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } + } + break; + case SCE_HB_WORD: + if (!iswordchar(ch)) { + state = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); + if (state == SCE_HB_DEFAULT) { + if (ch == '\"') { + state = SCE_HB_STRING; + } else if (ch == '\'') { + state = SCE_HB_COMMENTLINE; + } else if (isoperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); + state = SCE_HB_DEFAULT; + } + } + } + break; + case SCE_HB_STRING: + if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HB_DEFAULT; + i++; + ch = chNext; + } else if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_STRINGEOL; + } + break; + case SCE_HB_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } + break; + case SCE_HB_STRINGEOL: + if (!isLineEnd(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HB_DEFAULT; + } else if (!isLineEnd(chNext)) { + styler.ColourTo(i, StateToPrint); + state = SCE_HB_DEFAULT; + } + break; + case SCE_HP_DEFAULT: + case SCE_HP_START: + if (iswordstart(ch)) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_WORD; + } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && + styler.SafeGetCharAt(i + 3) == '-') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_COMMENTLINE; + } else if (ch == '#') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_HP_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + // state = statePrintForState(SCE_HP_STRING,inScriptType); + state = SCE_HP_STRING; + } + } else if (ch == '\'') { + styler.ColourTo(i - 1, StateToPrint); + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_HP_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_HP_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, StateToPrint); + styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); + } else if ((ch == ' ') || (ch == '\t')) { + if (state == SCE_HP_START) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_DEFAULT; + } + } + break; + case SCE_HP_WORD: + if (!iswordchar(ch)) { + classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType); + state = SCE_HP_DEFAULT; + if (ch == '#') { + state = SCE_HP_COMMENTLINE; + } else if (ch == '\"') { + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_HP_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_HP_STRING; + } + } else if (ch == '\'') { + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_HP_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_HP_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); + } + } + break; + case SCE_HP_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_STRING: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_CHARACTER: + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_TRIPLE: + if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + case SCE_HP_TRIPLEDOUBLE: + if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HP_DEFAULT; + } + break; + ///////////// start - PHP state handling + case SCE_HPHP_WORD: + if (!iswordstart(ch)) { + classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); + if (ch == '/' && chNext == '*') { + i++; + state = SCE_HPHP_COMMENT; + } else if (ch == '/' && chNext == '/') { + i++; + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '#') { + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HPHP_HSTRING; + } else if (ch == '\'') { + state = SCE_HPHP_SIMPLESTRING; + } else if (ch == '$') { + state = SCE_HPHP_VARIABLE; + } else { + state = SCE_HPHP_DEFAULT; + } + } + break; + case SCE_HPHP_NUMBER: + if (!isdigit(ch)) { + styler.ColourTo(i - 1, SCE_HPHP_NUMBER); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_VARIABLE: + if (!iswordstart(ch)) { + styler.ColourTo(i - 1, SCE_HPHP_VARIABLE); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_COMMENT: + if (ch == '/' && chPrev == '*') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_COMMENTLINE: + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_HSTRING: + if (ch == '\\') { + // skip the next char + i++; + } else if (ch == '\"') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_SIMPLESTRING: + if (ch == '\'') { + styler.ColourTo(i, StateToPrint); + state = SCE_HPHP_DEFAULT; + } + break; + case SCE_HPHP_DEFAULT: + styler.ColourTo(i - 1, StateToPrint); + if (isdigit(ch)) { + state = SCE_HPHP_NUMBER; + } else if (iswordstart(ch)) { + state = SCE_HPHP_WORD; + } else if (ch == '/' && chNext == '*') { + i++; + state = SCE_HPHP_COMMENT; + } else if (ch == '/' && chNext == '/') { + i++; + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '#') { + state = SCE_HPHP_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HPHP_HSTRING; + } else if (ch == '\'') { + state = SCE_HPHP_SIMPLESTRING; + } else if (ch == '$') { + state = SCE_HPHP_VARIABLE; + } + break; + ///////////// end - PHP state handling + } + + + + if (state == SCE_HB_DEFAULT) { // One of the above succeeded + if (ch == '\"') { + state = SCE_HB_STRING; + } else if (ch == '\'') { + state = SCE_HB_COMMENTLINE; + } else if (iswordstart(ch)) { + state = SCE_HB_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_HB_DEFAULT); + } + } else if (state == SCE_HBA_DEFAULT) { // One of the above succeeded + if (ch == '\"') { + state = SCE_HBA_STRING; + } else if (ch == '\'') { + state = SCE_HBA_COMMENTLINE; + } else if (iswordstart(ch)) { + state = SCE_HBA_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_HBA_DEFAULT); + } + } else if (state == SCE_HJ_DEFAULT) { // One of the above succeeded + if (ch == '/' && chNext == '*') { + if (styler.SafeGetCharAt(i + 2) == '*') + state = SCE_HJ_COMMENTDOC; + else + state = SCE_HJ_COMMENT; + } else if (ch == '/' && chNext == '/') { + state = SCE_HJ_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_HJ_DOUBLESTRING; + } else if (ch == '\'') { + state = SCE_HJ_SINGLESTRING; + } else if (iswordstart(ch)) { + state = SCE_HJ_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_HJ_SYMBOLS); + } + } + } + + StateToPrint = statePrintForState(state, inScriptType); + styler.ColourTo(lengthDoc - 1, StateToPrint); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + + } +} + +LexerModule lmHTML(SCLEX_HTML, ColouriseHyperTextDoc); +LexerModule lmXML(SCLEX_XML, ColouriseHyperTextDoc); + diff --git a/src/stc/scintilla/src/LexLua.cxx b/src/stc/scintilla/src/LexLua.cxx new file mode 100644 index 0000000000..e6da7668dd --- /dev/null +++ b/src/stc/scintilla/src/LexLua.cxx @@ -0,0 +1,298 @@ +// LexLua.cxx - lexer for Lua language +// Written by Paul Winwood + +#include +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void classifyWordLua(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) +{ + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) + { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + + char chAttr = SCE_LUA_IDENTIFIER; + + if (wordIsNumber) + chAttr = SCE_LUA_NUMBER; + else + { + if (keywords.InList(s)) + { + chAttr = SCE_LUA_WORD; + } + } + styler.ColourTo(end, chAttr); +} + +static void ColouriseLuaDoc(unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) +{ + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + styler.GetLine(startPos); + + int state = initStyle; + char chPrev = ' '; + char chNext = styler[startPos]; + unsigned int lengthDoc = startPos + length; + bool firstChar = true; + int literalString = 0; + + styler.StartSegment(startPos); + for (unsigned int i = startPos; i <= lengthDoc; i++) + { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) + { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_LUA_STRINGEOL) + { + if (ch != '\r' && ch != '\n') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_DEFAULT; + } + } + + if (state == SCE_LUA_LITERALSTRING && ch == '[' && chNext == '[') + { + literalString++; + } + else + if (state == SCE_LUA_DEFAULT) + { + if (ch == '-' && chNext == '-') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_COMMENTLINE; + } + else + if (ch == '[' && chNext == '[') + { + state = SCE_LUA_LITERALSTRING; + literalString = 1; + } + else + if (iswordstart(ch)) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_WORD; + } + else + if (ch == '\"') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_STRING; + } + else + if (ch == '\'') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_CHARACTER; + } + else + if (ch == '$' && firstChar) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_PREPROCESSOR; + } + else + if (isoperator(ch)) + { + styler.ColourTo(i-1, state); + styler.ColourTo(i, SCE_LUA_OPERATOR); + } + } + else + if (state == SCE_LUA_WORD) + { + if (!iswordchar(ch)) + { + classifyWordLua(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_LUA_DEFAULT; + if (ch == '[' && chNext == '[') + { + literalString = 1; + state = SCE_LUA_LITERALSTRING; + } + else + if (ch == '-' && chNext == '-') + { + state = SCE_LUA_COMMENTLINE; + } + else + if (ch == '\"') + { + state = SCE_LUA_STRING; + } + else + if (ch == '\'') + { + state = SCE_LUA_CHARACTER; + } + else + if (ch == '$' && firstChar) + { + state = SCE_LUA_PREPROCESSOR; + } + else + if (isoperator(ch)) + { + styler.ColourTo(i, SCE_LUA_OPERATOR); + } + } + } + else + { + if (state == SCE_LUA_LITERALSTRING) + { + if (ch == ']' && (chPrev == ']') && (--literalString == 0)) + { + styler.ColourTo(i, state); + state = SCE_LUA_DEFAULT; + } + } + else + if (state == SCE_LUA_PREPROCESSOR) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_DEFAULT; + } + } + else + if (state == SCE_LUA_COMMENTLINE) + { + if (ch == '\r' || ch == '\n') + { + styler.ColourTo(i-1, state); + state = SCE_LUA_DEFAULT; + } + } + else + if (state == SCE_LUA_STRING) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_STRINGEOL; + } + else + if (ch == '\\') + { + if (chNext == '\"' || chNext == '\\') + { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else + if (ch == '\"') + { + styler.ColourTo(i, state); + state = SCE_LUA_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else + if (state == SCE_LUA_CHARACTER) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i-1, state); + state = SCE_LUA_STRINGEOL; + } + else + if (ch == '\\') + { + if (chNext == '\'' || chNext == '\\') + { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else + if (ch == '\'') + { + styler.ColourTo(i, state); + state = SCE_LUA_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + + if (state == SCE_LUA_DEFAULT) + { + if (ch == '-' && chNext == '-') + { + state = SCE_LUA_COMMENTLINE; + } + else + if (ch == '\"') + { + state = SCE_LUA_STRING; + } + else + if (ch == '\'') + { + state = SCE_LUA_CHARACTER; + } + else + if (ch == '$' && firstChar) + { + state = SCE_LUA_PREPROCESSOR; + } + else + if (iswordstart(ch)) + { + state = SCE_LUA_WORD; + } + else + if (isoperator(ch)) + { + styler.ColourTo(i, SCE_LUA_OPERATOR); + } + } + } + chPrev = ch; + firstChar = (ch == '\r' || ch == '\n'); + } + styler.ColourTo(lengthDoc - 1, state); +} + +LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc); diff --git a/src/stc/scintilla/src/LexOthers.cxx b/src/stc/scintilla/src/LexOthers.cxx new file mode 100644 index 0000000000..dd86033687 --- /dev/null +++ b/src/stc/scintilla/src/LexOthers.cxx @@ -0,0 +1,351 @@ +// SciTE - Scintilla based Text Editor +// LexOthers.cxx - lexers for properties files, batch files, make files and error lists +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void ColouriseBatchLine(char *lineBuffer, int endLine, Accessor &styler) { + if (0 == strncmp(lineBuffer, "REM", 3)) { + styler.ColourTo(endLine, 1); + } else if (0 == strncmp(lineBuffer, "rem", 3)) { + styler.ColourTo(endLine, 1); + } else if (0 == strncmp(lineBuffer, "SET", 3)) { + styler.ColourTo(endLine, 2); + } else if (0 == strncmp(lineBuffer, "set", 3)) { + styler.ColourTo(endLine, 2); + } else if (lineBuffer[0] == ':') { + styler.ColourTo(endLine, 3); + } else { + styler.ColourTo(endLine, 0); + } +} + +static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i < startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseBatchLine(lineBuffer, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseBatchLine(lineBuffer, startPos + length, styler); +} + +static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) { + // It is needed to remember the current state to recognize starting + // comment lines before the first "diff " or "--- ". If a real + // difference starts then each line starting with ' ' is a whitespace + // otherwise it is considered a comment (Only in..., Binary file...) + if (0 == strncmp(lineBuffer, "diff ", 3)) { + styler.ColourTo(endLine, 2); + } else if (0 == strncmp(lineBuffer, "--- ", 3)) { + styler.ColourTo(endLine, 3); + } else if (0 == strncmp(lineBuffer, "+++ ", 3)) { + styler.ColourTo(endLine, 3); + } else if (lineBuffer[0] == '@') { + styler.ColourTo(endLine, 4); + } else if (lineBuffer[0] == '-') { + styler.ColourTo(endLine, 5); + } else if (lineBuffer[0] == '+') { + styler.ColourTo(endLine, 6); + } else if (lineBuffer[0] != ' ') { + styler.ColourTo(endLine, 1); + } else { + styler.ColourTo(endLine, 0); + } +} + +static void ColouriseDiffDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i < startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseDiffLine(lineBuffer, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseDiffLine(lineBuffer, startPos + length, styler); +} + +static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, Accessor &styler) { + int i = 0; + while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces + i++; + if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') { + styler.ColourTo(endPos, 1); + } else if (lineBuffer[i] == '[') { + styler.ColourTo(endPos, 2); + } else if (lineBuffer[i] == '@') { + styler.ColourTo(startLine+i, 4); + if (lineBuffer[++i] == '=') + styler.ColourTo(startLine+i, 3); + styler.ColourTo(endPos, 0); + } else { + while (lineBuffer[i] != '=' && (i < lengthLine)) // Search the '=' character + i++; + if (lineBuffer[i] == '=') { + styler.ColourTo(startLine+i-1, 0); + styler.ColourTo(startLine+i, 3); + styler.ColourTo(endPos, 0); + } else { + styler.ColourTo(endPos, 0); + } + } +} + +static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + int startLine = startPos; + for (unsigned int i = startPos; i <= startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if ((styler[i] == '\r' && styler.SafeGetCharAt(i+1) != '\n') || + styler[i] == '\n' || + (linePos >= sizeof(lineBuffer) - 1)) { + lineBuffer[linePos] = '\0'; + ColourisePropsLine(lineBuffer, linePos, startLine, i, styler); + linePos = 0; + startLine = i+1; + } + } + if (linePos > 0) + ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length, styler); +} + +static void ColouriseMakeLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) { + int i = 0; + while (isspace(lineBuffer[i]) && (i < lengthLine)) + i++; + if (lineBuffer[i] == '#' || lineBuffer[i] == '!') { + styler.ColourTo(endPos, 1); + } else { + styler.ColourTo(endPos, 0); + } +} + +static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i <= startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseMakeLine(lineBuffer, linePos, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseMakeLine(lineBuffer, linePos, startPos + length, styler); +} + +static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) { + if (lineBuffer[0] == '>') { + // Command or return status + styler.ColourTo(endPos, SCE_ERR_CMD); + } else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) { + styler.ColourTo(endPos, SCE_ERR_PYTHON); + } else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) { + // Borland error message + styler.ColourTo(endPos, SCE_ERR_BORLAND); + } else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) { + // Borland warning message + styler.ColourTo(endPos, SCE_ERR_BORLAND); + } else if (strstr(lineBuffer, " at " ) && + strstr(lineBuffer, " at " ) < lineBuffer+lengthLine && + strstr(lineBuffer, " line ") && + strstr(lineBuffer, " line ") < lineBuffer+lengthLine) { + // perl error message + styler.ColourTo(endPos, SCE_ERR_PERL); + } else { + // Look for ::message + // Look for (line)message + // Look for (line,pos)message + int state = 0; + for (int i = 0; i < lengthLine; i++) { + if (state == 0 && lineBuffer[i] == ':' && isdigit(lineBuffer[i + 1])) { + state = 1; + } else if (state == 0 && lineBuffer[i] == '(') { + state = 10; + } else if (state == 1 && isdigit(lineBuffer[i])) { + state = 2; + } else if (state == 2 && lineBuffer[i] == ':') { + state = 3; + break; + } else if (state == 2 && !isdigit(lineBuffer[i])) { + state = 99; + } else if (state == 10 && isdigit(lineBuffer[i])) { + state = 11; + } else if (state == 11 && lineBuffer[i] == ',') { + state = 14; + } else if (state == 11 && lineBuffer[i] == ')') { + state = 12; + } else if (state == 12 && lineBuffer[i] == ':') { + state = 13; + } else if (state == 14 && lineBuffer[i] == ')') { + state = 15; + break; + } else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) { + state = 99; + } + } + if (state == 3) { + styler.ColourTo(endPos, SCE_ERR_GCC); + } else if ((state == 13) || (state == 14) || (state == 15)) { + styler.ColourTo(endPos, SCE_ERR_MS); + } else { + styler.ColourTo(endPos, SCE_ERR_DEFAULT); + } + } +} + +static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + char lineBuffer[1024]; + styler.StartAt(startPos); + styler.StartSegment(startPos); + unsigned int linePos = 0; + for (unsigned int i = startPos; i <= startPos + length; i++) { + lineBuffer[linePos++] = styler[i]; + if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) { + ColouriseErrorListLine(lineBuffer, linePos, i, styler); + linePos = 0; + } + } + if (linePos > 0) + ColouriseErrorListLine(lineBuffer, linePos, startPos + length, styler); +} + +static int isSpecial(char s) { + + return (s == '\\') || (s == ',') || (s == ';') || (s == '\'') || (s == ' ') || + (s == '\"') || (s == '`') || (s == '^') || (s == '~'); +} + +static int isTag(int start, Accessor &styler) { + + char s[6]; + unsigned int i = 0, e=1; + while (i < 5 && e) { + s[i] = styler[start + i]; + i++; + e = styler[start + i] != '{'; + } + s[i] = '\0'; + return (strcmp(s, "begin") == 0) || (strcmp(s, "end") == 0); +} + +static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + + styler.StartAt(startPos); + + int state = initStyle; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + int lengthDoc = startPos + length; + + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_L_DEFAULT : + switch(ch) { + case '\\' : + styler.ColourTo(i - 1, state); + if (isSpecial(styler[i + 1])) { + styler.ColourTo(i + 1, SCE_L_COMMAND); + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + else { + if (isTag(i+1, styler)) + state = SCE_L_TAG; + else + state = SCE_L_COMMAND; + } + break; + case '$' : + styler.ColourTo(i - 1, state); + state = SCE_L_MATH; + if (chNext == '$') { + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + break; + case '%' : + styler.ColourTo(i - 1, state); + state = SCE_L_COMMENT; + break; + } + break; + case SCE_L_COMMAND : + if (chNext == '[' || chNext == '{' || chNext == '}' || + chNext == ' ' || chNext == '\r' || chNext == '\n') { + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + break; + case SCE_L_TAG : + if (ch == '}') { + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + } + break; + case SCE_L_MATH : + if (ch == '$') { + if (chNext == '$') { + i++; + chNext = styler.SafeGetCharAt(i + 1); + } + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + } + break; + case SCE_L_COMMENT : + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_L_DEFAULT; + } + } + } + styler.ColourTo(lengthDoc, state); +} + +LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc); +LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc); +LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc); +LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc); +LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc); +LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc); diff --git a/src/stc/scintilla/src/LexPerl.cxx b/src/stc/scintilla/src/LexPerl.cxx new file mode 100644 index 0000000000..a7186fe552 --- /dev/null +++ b/src/stc/scintilla/src/LexPerl.cxx @@ -0,0 +1,508 @@ +// SciTE - Scintilla based Text Editor +// LexPerl.cxx - lexer for subset of Perl +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +inline bool isPerlOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '\\' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '.' || ch == '~') + return true; + return false; +} + +static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_PL_IDENTIFIER; + if (wordIsNumber) + chAttr = SCE_PL_NUMBER; + else { + if (keywords.InList(s)) + chAttr = SCE_PL_WORD; + } + styler.ColourTo(end, chAttr); + return chAttr; +} + +static bool isEndVar(char ch) { + return !isalnum(ch) && ch != '#' && ch != '$' && + ch != '_' && ch != '\''; +} + +static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) { + if ((pos + static_cast(strlen(val))) >= lengthDoc) { + return false; + } + while (*val) { + if (*val != styler[pos++]) { + return false; + } + val++; + } + return true; +} + +static char opposite(char ch) { + if (ch == '(') + return ')'; + if (ch == '[') + return ']'; + if (ch == '{') + return '}'; + if (ch == '<') + return '>'; + return ch; +} + +static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + // Lexer for perl often has to backtrack to start of current style to determine + // which characters are being used as quotes, how deeply nested is the + // start position and what the termination string is for here documents + + WordList &keywords = *keywordlists[0]; + + char sooked[100]; + int quotes = 0; + char quoteDown = 'd'; + char quoteUp = 'd'; + int quoteRep = 1; + int sookedpos = 0; + bool preferRE = true; + sooked[sookedpos] = '\0'; + int state = initStyle; + int lengthDoc = startPos + length; + // If in a long distance lexical state, seek to the beginning to find quote characters + if (state == SCE_PL_HERE || state == SCE_PL_REGEX || + state == SCE_PL_REGSUBST || state == SCE_PL_LONGQUOTE) { + while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) { + startPos--; + } + state = SCE_PL_DEFAULT; + } + styler.StartAt(startPos); + char chPrev = styler.SafeGetCharAt(startPos - 1); + char chNext = styler[startPos]; + styler.StartSegment(startPos); + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_PL_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + if (ch == 's' && !isalnum(chNext)) { + state = SCE_PL_REGSUBST; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 2; + } else if (ch == 'm' && !isalnum(chNext)) { + state = SCE_PL_REGEX; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 1; + } else if (ch == 't' && chNext == 'r' && !isalnum(chNext2)) { + state = SCE_PL_REGSUBST; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 2; + i++; + chNext = chNext2; + } else if (ch == 'q' && (chNext == 'q' || chNext == 'r' || chNext == 'w' || chNext == 'x') && !isalnum(chNext2)) { + state = SCE_PL_LONGQUOTE; + i++; + chNext = chNext2; + quotes = 0; + quoteUp = '\0'; + quoteDown = '\0'; + quoteRep = 1; + } else { + state = SCE_PL_WORD; + preferRE = false; + } + } else if (ch == '#') { + styler.ColourTo(i - 1, state); + state = SCE_PL_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, state); + state = SCE_PL_STRING; + } else if (ch == '\'') { + if (chPrev == '&') { + // Archaic call + styler.ColourTo(i, state); + } else { + styler.ColourTo(i - 1, state); + state = SCE_PL_CHARACTER; + } + } else if (ch == '`') { + styler.ColourTo(i - 1, state); + state = SCE_PL_BACKTICKS; + } else if (ch == '$') { + preferRE = false; + styler.ColourTo(i - 1, state); + if (isalnum(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { + state = SCE_PL_SCALAR; + } else if (chNext != '{' && chNext != '[') { + styler.ColourTo(i, SCE_PL_SCALAR); + i++; + ch = ' '; + chNext = ' '; + } else { + styler.ColourTo(i, SCE_PL_SCALAR); + } + } else if (ch == '@') { + preferRE = false; + styler.ColourTo(i - 1, state); + if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { + state = SCE_PL_ARRAY; + } else if (chNext != '{' && chNext != '[') { + styler.ColourTo(i, SCE_PL_ARRAY); + i++; + ch = ' '; + } else { + styler.ColourTo(i, SCE_PL_ARRAY); + } + } else if (ch == '%') { + preferRE = false; + styler.ColourTo(i - 1, state); + if (isalpha(chNext) || chNext == '#' || chNext == '$' || chNext == '_') { + state = SCE_PL_HASH; + } else if (chNext != '{' && chNext != '[') { + styler.ColourTo(i, SCE_PL_HASH); + i++; + ch = ' '; + } else { + styler.ColourTo(i, SCE_PL_HASH); + } + } else if (ch == '*') { + styler.ColourTo(i - 1, state); + state = SCE_PL_SYMBOLTABLE; + } else if (ch == '/' && preferRE) { + styler.ColourTo(i - 1, state); + state = SCE_PL_REGEX; + quoteUp = '/'; + quoteDown = '/'; + quotes = 1; + quoteRep = 1; + } else if (ch == '<' && chNext == '<') { + styler.ColourTo(i - 1, state); + state = SCE_PL_HERE; + i++; + ch = chNext; + chNext = chNext2; + quotes = 0; + sookedpos = 0; + sooked[sookedpos] = '\0'; + } else if (ch == '=' && (chPrev == '\r' || chPrev == '\n') && isalpha(chNext)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_POD; + quotes = 0; + sookedpos = 0; + sooked[sookedpos] = '\0'; + } else if (isPerlOperator(ch)) { + if (ch == ')' || ch == ']') + preferRE = false; + else + preferRE = true; + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_PL_OPERATOR); + } + } else if (state == SCE_PL_WORD) { + if (!iswordchar(ch) && ch != '\'') { // Archaic Perl has quotes inside names + if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__DATA__")) { + styler.ColourTo(i, SCE_PL_DATASECTION); + state = SCE_PL_DATASECTION; + } else if (isMatch(styler, lengthDoc, styler.GetStartSegment(), "__END__")) { + styler.ColourTo(i, SCE_PL_DATASECTION); + state = SCE_PL_DATASECTION; + } else { + if (classifyWordPerl(styler.GetStartSegment(), i - 1, keywords, styler) == SCE_PL_WORD) + preferRE = true; + state = SCE_PL_DEFAULT; + if (ch == '#') { + state = SCE_PL_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_PL_STRING; + } else if (ch == '\'') { + state = SCE_PL_CHARACTER; + } else if (ch == '<' && chNext == '<') { + state = SCE_PL_HERE; + quotes = 0; + sookedpos = 0; + sooked[sookedpos] = '\0'; + } else if (isPerlOperator(ch)) { + if (ch == ')' || ch == ']') + preferRE = false; + else + preferRE = true; + styler.ColourTo(i, SCE_PL_OPERATOR); + state = SCE_PL_DEFAULT; + } + } + } + } else { + if (state == SCE_PL_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_HERE) { + if ((isalnum(ch) || ch == '_') && quotes < 2) { + sooked[sookedpos++] = ch; + sooked[sookedpos] = '\0'; + if (quotes == 0) + quotes = 1; + } else { + quotes++; + } + if ((quotes > 1) && + (chPrev == '\n' || chPrev == '\r') && + isMatch(styler, lengthDoc, i, sooked)) { + i += sookedpos; + chNext = styler.SafeGetCharAt(i); + if (chNext == '\n' || chNext == '\r') { + styler.ColourTo(i - 1, SCE_PL_HERE); + state = SCE_PL_DEFAULT; + } + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_CHARACTER) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_BACKTICKS) { + if (ch == '`') { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (state == SCE_PL_POD) { + if (ch == '=' && (chPrev == '\r' || chPrev == '\n')) { + if (isMatch(styler, lengthDoc, i, "=cut")) { + styler.ColourTo(i - 1 + 4, state); + i += 4; + state = SCE_PL_DEFAULT; + ch = styler.SafeGetCharAt(i); + chNext = styler.SafeGetCharAt(i + 1); + } + } + } else if (state == SCE_PL_SCALAR) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_ARRAY) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_HASH) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_SYMBOLTABLE) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_REF) { + if (isEndVar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_PL_DEFAULT; + } + } else if (state == SCE_PL_REGEX) { + if (!quoteUp && !isspace(ch)) { + quoteUp = ch; + quoteDown = opposite(ch); + quotes++; + } else { + if (ch == quoteDown && chPrev != '\\') { + quotes--; + if (quotes == 0) { + quoteRep--; + if (quoteUp == quoteDown) { + quotes++; + } + } + if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + } else if (ch == quoteUp && chPrev != '\\') { + quotes++; + } else if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + } + } else if (state == SCE_PL_REGSUBST) { + if (!quoteUp && !isspace(ch)) { + quoteUp = ch; + quoteDown = opposite(ch); + quotes++; + } else { + if (quotes == 0 && quoteRep == 1) { + /* We matched something like s(...) or tr{...} + * and are looking for the next matcher characters, + * which could be either bracketed ({...}) or non-bracketed + * (/.../). + * + * Number-signs are problematic. If they occur after + * the close of the first part, treat them like + * a quoteUp char, even if they actually start comments. + * + * If we find an alnum, we end the regsubst, and punt. + * + * Eric Promislow ericp@activestate.com Aug 9,2000 + */ + if (isspace(ch)) { + // Keep going + } else if (isalnum(ch)) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } else { + quoteUp = ch; + quoteDown = opposite(ch); + quotes++; + } + } else if (ch == quoteDown && chPrev != '\\') { + quotes--; + if (quotes == 0) { + quoteRep--; + } + if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + if (quoteUp == quoteDown) { + quotes++; + } + } else if (ch == quoteUp && chPrev != '\\') { + quotes++; + } else if (!isalpha(chNext)) { + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + } + } + } else if (state == SCE_PL_LONGQUOTE) { + if (!quoteDown && !isspace(ch)) { + quoteUp = ch; + quoteDown = opposite(quoteUp); + quotes++; + } else if (ch == quoteDown) { + quotes--; + if (quotes == 0) { + quoteRep--; + if (quoteRep <= 0) { + styler.ColourTo(i, state); + state = SCE_PL_DEFAULT; + ch = ' '; + } + if (quoteUp == quoteDown) { + quotes++; + } + } + } else if (ch == quoteUp) { + quotes++; + } + } + + if (state == SCE_PL_DEFAULT) { // One of the above succeeded + if (ch == '#') { + state = SCE_PL_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_PL_STRING; + } else if (ch == '\'') { + state = SCE_PL_CHARACTER; + } else if (iswordstart(ch)) { + state = SCE_PL_WORD; + preferRE = false; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_PL_OPERATOR); + } + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc, state); +} + +LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc); diff --git a/src/stc/scintilla/src/LexPython.cxx b/src/stc/scintilla/src/LexPython.cxx new file mode 100644 index 0000000000..492d21c7d9 --- /dev/null +++ b/src/stc/scintilla/src/LexPython.cxx @@ -0,0 +1,281 @@ +// SciTE - Scintilla based Text Editor +// LexPython.cxx - lexer for Python +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void ClassifyWordPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) { + char s[100]; + bool wordIsNumber = isdigit(styler[start]); + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_P_IDENTIFIER; + if (0 == strcmp(prevWord, "class")) + chAttr = SCE_P_CLASSNAME; + else if (0 == strcmp(prevWord, "def")) + chAttr = SCE_P_DEFNAME; + else if (wordIsNumber) + chAttr = SCE_P_NUMBER; + else if (keywords.InList(s)) + chAttr = SCE_P_WORD; + // make sure that dot-qualifiers inside the word are lexed correct + else for (unsigned int i = 0; i < end - start + 1; i++) { + if (styler[start + i] == '.') { + styler.ColourTo(start + i - 1, chAttr); + styler.ColourTo(start + i, SCE_P_OPERATOR); + } + } + styler.ColourTo(end, chAttr); + strcpy(prevWord, s); +} + +static bool IsPyComment(Accessor &styler, int pos, int len) { + return len>0 && styler[pos]=='#'; +} + +static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + int lengthDoc = startPos + length; + + // Backtrack to previous line in case need to fix its fold status or tab whinging + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + if (startPos == 0) + initStyle = SCE_P_DEFAULT; + else + initStyle = styler.StyleAt(startPos-1); + } + } + + // Python uses a different mask because bad indentation is marked by oring with 32 + styler.StartAt(startPos, 127); + + WordList &keywords = *keywordlists[0]; + + bool fold = styler.GetPropertyInt("fold"); + int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level"); + char prevWord[200]; + prevWord[0] = '\0'; + if (length == 0) + return ; + int spaceFlags = 0; + + int state = initStyle & 31; + + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment); + if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) + indentCurrent |= SC_FOLDLEVELWHITEFLAG; + + char chPrev = ' '; + char chPrev2 = ' '; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + bool atStartLine = true; + for (int i = startPos; i < lengthDoc; i++) { + + if (atStartLine) { + char chBad = static_cast(64); + char chGood = static_cast(0); + char chFlags = chGood; + if (whingeLevel == 1) { + chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood; + } else if (whingeLevel == 2) { + chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood; + } else if (whingeLevel == 3) { + chFlags = (spaceFlags & wsSpace) ? chBad : chGood; + } else if (whingeLevel == 4) { + chFlags = (spaceFlags & wsTab) ? chBad : chGood; + } + styler.SetFlags(chFlags, static_cast(state)); + atStartLine = false; + } + + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) { + if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) { + // Perform colourisation of white space and triple quoted strings at end of each line to allow + // tab marking to work inside white space and triple quoted strings + styler.ColourTo(i, state); + } + + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsPyComment); + if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) + indentNext |= SC_FOLDLEVELWHITEFLAG; + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsPyComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + if (fold) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + atStartLine = true; + } + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + chPrev2 = ' '; + i += 1; + continue; + } + + if (state == SCE_P_STRINGEOL) { + if (ch != '\r' && ch != '\n') { + styler.ColourTo(i - 1, state); + state = SCE_P_DEFAULT; + } + } + if (state == SCE_P_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_P_WORD; + } else if (ch == '#') { + styler.ColourTo(i - 1, state); + state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, state); + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_P_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_STRING; + } + } else if (ch == '\'') { + styler.ColourTo(i - 1, state); + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_P_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_P_OPERATOR); + } + } else if (state == SCE_P_WORD) { + if (!iswordchar(ch)) { + ClassifyWordPy(styler.GetStartSegment(), i - 1, keywords, styler, prevWord); + state = SCE_P_DEFAULT; + if (ch == '#') { + state = chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE; + } else if (ch == '\"') { + if (chNext == '\"' && chNext2 == '\"') { + i += 2; + state = SCE_P_TRIPLEDOUBLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_STRING; + } + } else if (ch == '\'') { + if (chNext == '\'' && chNext2 == '\'') { + i += 2; + state = SCE_P_TRIPLE; + ch = ' '; + chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } else { + state = SCE_P_CHARACTER; + } + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_P_OPERATOR); + } + } + } else { + if (state == SCE_P_COMMENTLINE || state == SCE_P_COMMENTBLOCK) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_STRING) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + styler.ColourTo(i - 1, state); + state = SCE_P_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_CHARACTER) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + styler.ColourTo(i - 1, state); + state = SCE_P_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_TRIPLE) { + if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } else if (state == SCE_P_TRIPLEDOUBLE) { + if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } + } + chPrev2 = chPrev; + chPrev = ch; + } + if (state == SCE_P_WORD) { + ClassifyWordPy(styler.GetStartSegment(), lengthDoc, keywords, styler, prevWord); + } else { + styler.ColourTo(lengthDoc, state); + } +} + +LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc); diff --git a/src/stc/scintilla/src/LexSQL.cxx b/src/stc/scintilla/src/LexSQL.cxx new file mode 100644 index 0000000000..facd0e6b7b --- /dev/null +++ b/src/stc/scintilla/src/LexSQL.cxx @@ -0,0 +1,156 @@ +// SciTE - Scintilla based Text Editor +// LexSQL.cxx - lexer for SQL +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(toupper(styler[start + i])); + s[i + 1] = '\0'; + } + char chAttr = SCE_C_IDENTIFIER; + if (wordIsNumber) + chAttr = SCE_C_NUMBER; + else { + if (keywords.InList(s)) + chAttr = SCE_C_WORD; + } + styler.ColourTo(end, chAttr); +} + +static void ColouriseSQLDoc(unsigned int startPos, int length, + int initStyle, WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + bool fold = styler.GetPropertyInt("fold"); + int lineCurrent = styler.GetLine(startPos); + int spaceFlags = 0; + + int state = initStyle; + char chPrev = ' '; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + unsigned int lengthDoc = startPos + length; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags); + int lev = indentCurrent; + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags); + if (indentCurrent < (indentNext & ~SC_FOLDLEVELWHITEFLAG)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + if (fold) { + styler.SetLevel(lineCurrent, lev); + } + } + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_C_WORD; + } else if (ch == '/' && chNext == '*') { + styler.ColourTo(i - 1, state); + state = SCE_C_COMMENT; + } else if (ch == '-' && chNext == '-') { + styler.ColourTo(i - 1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\'') { + styler.ColourTo(i - 1, state); + state = SCE_C_STRING; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_WORD) { + if (!iswordchar(ch)) { + classifyWordSQL(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_C_DEFAULT; + if (ch == '/' && chNext == '*') { + state = SCE_C_COMMENT; + } else if (ch == '-' && chNext == '-') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\'') { + state = SCE_C_STRING; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + } + } + } else { + if (state == SCE_C_COMMENT) { + if (ch == '/' && chPrev == '*') { + if (((i > (styler.GetStartSegment() + 2)) || ((initStyle == SCE_C_COMMENT) && + (styler.GetStartSegment() == startPos)))) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + styler.ColourTo(i - 1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '\'') { + if ( chNext == '\'' ) { + i++; + } else { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + i++; + } + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + if (state == SCE_C_DEFAULT) { // One of the above succeeded + if (ch == '/' && chNext == '*') { + state = SCE_C_COMMENT; + } else if (ch == '-' && chNext == '-') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\'') { + state = SCE_C_STRING; + } else if (iswordstart(ch)) { + state = SCE_C_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + } + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); +} + +LexerModule lmSQL(SCLEX_SQL, ColouriseSQLDoc); diff --git a/src/stc/scintilla/src/LexVB.cxx b/src/stc/scintilla/src/LexVB.cxx new file mode 100644 index 0000000000..67dfa78427 --- /dev/null +++ b/src/stc/scintilla/src/LexVB.cxx @@ -0,0 +1,139 @@ +// SciTE - Scintilla based Text Editor +// LexVB.cxx - lexer for Visual Basic and VBScript +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + + char s[100]; + bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') || + (styler[start] == '&' && tolower(styler[start+1]) == 'h'); + unsigned int i; + for (i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + } + s[i] = '\0'; + char chAttr = SCE_C_DEFAULT; + if (wordIsNumber) + chAttr = SCE_C_NUMBER; + else { + if (strcmp(s, "rem") == 0) + chAttr = SCE_C_COMMENTLINE; + else if (keywords.InList(s)) + chAttr = SCE_C_WORD; + } + styler.ColourTo(end, chAttr); + if (chAttr == SCE_C_COMMENTLINE) + return SCE_C_COMMENTLINE; + else + return SCE_C_DEFAULT; +} + +static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + int visibleChars = 0; + int state = initStyle; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + int lengthDoc = startPos + length; + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i += 1; + continue; + } + + if (ch == '\r' || ch == '\n') { + // End of line + if (state == SCE_C_COMMENTLINE || state == SCE_C_PREPROCESSOR) { + styler.ColourTo(i - 1, state); + state = SCE_C_DEFAULT; + } + visibleChars = 0; + } + if (!isspace(ch)) + visibleChars++; + + if (state == SCE_C_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_C_WORD; + } else if (ch == '\'') { + styler.ColourTo(i - 1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i - 1, state); + state = SCE_C_STRING; + } else if (ch == '#' && visibleChars == 1) { + // Preprocessor commands are alone on their line + styler.ColourTo(i - 1, state); + state = SCE_C_PREPROCESSOR; + } else if (ch == '&' && tolower(chNext) == 'h') { + styler.ColourTo(i - 1, state); + state = SCE_C_WORD; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_WORD) { + if (!iswordchar(ch)) { + state = classifyWordVB(styler.GetStartSegment(), i - 1, keywords, styler); + if (state == SCE_C_DEFAULT) { + if (ch == '\'') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (isoperator(ch)) { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } + } + } else { + if (state == SCE_C_STRING) { + // VB doubles quotes to preserve them + if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + if (state == SCE_C_DEFAULT) { // One of the above succeeded + if (ch == '\'') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (iswordstart(ch)) { + state = SCE_C_WORD; + } + } + } + } + styler.ColourTo(lengthDoc, state); +} + +LexerModule lmVB(SCLEX_VB, ColouriseVBDoc); diff --git a/src/stc/scintilla/src/LineMarker.cxx b/src/stc/scintilla/src/LineMarker.cxx index 9afccb8227..f54978c3fc 100644 --- a/src/stc/scintilla/src/LineMarker.cxx +++ b/src/stc/scintilla/src/LineMarker.cxx @@ -51,20 +51,6 @@ void LineMarker::Draw(Surface *surface, PRectangle &rc) { } else if (markType == SC_MARK_PLUS) { int armSize = dimOn2-2; - Point xpts[] = { - Point(centreX - armSize, centreY), - Point(centreX, centreY), - Point(centreX, centreY - armSize), - Point(centreX, centreY - armSize), - Point(centreX, centreY), - Point(centreX + armSize, centreY), - Point(centreX + armSize, centreY), - Point(centreX, centreY), - Point(centreX, centreY + armSize), - Point(centreX, centreY + armSize), - Point(centreX, centreY), - Point(centreX - armSize, centreY), - }; Point pts[] = { Point(centreX - armSize, centreY - 1), Point(centreX - 1, centreY - 1), @@ -90,12 +76,6 @@ void LineMarker::Draw(Surface *surface, PRectangle &rc) { Point(centreX + armSize, centreY +1), Point(centreX - armSize, centreY + 1), }; - Point xpts[] = { - Point(centreX - armSize, centreY), - Point(centreX + armSize, centreY), - Point(centreX + armSize, centreY), - Point(centreX - armSize, centreY), - }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); diff --git a/src/stc/scintilla/src/PosRegExp.cxx b/src/stc/scintilla/src/PosRegExp.cxx new file mode 100644 index 0000000000..ea719b7c28 --- /dev/null +++ b/src/stc/scintilla/src/PosRegExp.cxx @@ -0,0 +1,1181 @@ +#include +#include +#include +#include + +#include "PosRegExp.h" + +//Up: /[A-Z \x80-\x9f \xf0 ]/x +//Lo: /[a-z \xa0-\xaf \xe0-\xef \xf1 ]/x +//Wd: /[\d _ A-Z a-z \xa0-\xaf \xe0-\xf1 \x80-\x9f]/x +//* // Dos866 +SCharData UCData = {0x0, 0x0, 0x7fffffe, 0x0, 0xffffffff, 0x0, 0x0, 0x10000}, + LCData = {0x0, 0x0, 0x0, 0x7fffffe, 0x0, 0xffff, 0x0, 0x2ffff}, + WdData = {0x0, 0x3ff0000, 0x87fffffe, 0x7fffffe, 0xffffffff, 0xffff, 0x0, 0x3ffff}, + DigData = {0x0, 0x3ff0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +/*/ // cp1251 +SCharData UCData = {0x0, 0x0, 0x7fffffe, 0x0, 0x0, 0x0, 0xffffffff, 0x0}, + LCData = {0x0, 0x0, 0x0, 0x7fffffe, 0x0, 0x0, 0x0, 0xffffffff}, + WdData = {0x0, 0x3ff0000, 0x87fffffe, 0x7fffffe, 0x0, 0x0, 0xffffffff, 0xffffffff}, + DigData = {0x0, 0x3ff0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; +//*/ + +/////////////////////////////////////////////// + +int GetNumber(int *str,int s,int e) { + int r = 1, num = 0; + if (e < s) return -1; + for(int i = e-1; i >= s; i--) { + if (str[i] > '9' || str[i] < '0') return -1; + num += (str[i] - 0x30)*r; + r *= 10; + }; + return num; + /* + char tmp[20]; + double Res; + if (e == s) return -1; + for (int i = s;i < e;i++) + tmp[i-s] = (char)Str[i]; + tmp[e-s] = 0; + GetNumber(tmp,&Res); + return (int)Res; + */ +}; + +bool IsDigit(char Symb) { + return DigData.GetBit(Symb); +}; +bool IsWord(char Symb) { + return WdData.GetBit(Symb); +}; +bool IsUpperCase(char Symb) { + return UCData.GetBit(Symb); +}; +bool IsLowerCase(char Symb) { + return LCData.GetBit(Symb); +}; +char LowCase(char Chr) { + if (UCData.GetBit(Chr)) + return Chr+0x20; + return Chr; +}; + +/////////////////////////////////////////////// + +SRegInfo::SRegInfo() { + Next = Parent = 0; + un.Param = 0; + Op = ReEmpty; +}; +SRegInfo::~SRegInfo() { + if (Next) delete Next; + if (un.Param) + switch(Op) { + case ReEnum: + case ReNEnum: + delete un.ChrClass; + break; + default: + if (Op > ReBlockOps && Op < ReSymbolOps || Op == ReBrackets) + delete un.Param; + break; + }; +}; + +/////////////////////////////////////////////// + +void SCharData::SetBit(unsigned char Bit) { + int p = Bit/8; + CArr[p] |= (1 << Bit%8); +}; +void SCharData::ClearBit(unsigned char Bit) { + int p = Bit/8; + CArr[p] &= ~(1 << Bit%8); +}; +bool SCharData::GetBit(unsigned char Bit) { + int p = (unsigned char)Bit/8; + return (CArr[p] & (1 << Bit%8))!=0; +}; + +///////////////////////////////////////////////////////////////// +////////////////////// RegExp Class /////////////////////////// +///////////////////////////////////////////////////////////////// + +PosRegExp::PosRegExp() { + Info = 0; + Exprn = 0; + NoMoves = false; + Error = true; + FirstChar = 0; + CurMatch = 0; +}; +PosRegExp::~PosRegExp() { + if (Info) delete Info; +}; + +bool PosRegExp::SetExpr(const char *Expr) { + if (!this) return false; + Error = true; + CurMatch = 0; + if (SetExprLow(Expr)) Error = false; + return !Error; +}; +bool PosRegExp::isok() { + return !Error; +}; + + +bool PosRegExp::SetExprLow(const char *Expr) { + int Len = strlen(Expr); + bool Ok = false; + int i,j,s = 0,pos,tmp; + int EnterBr = 0,EnterGr = 0,EnterFg = 0; + + if (Info) delete Info; + Info = new SRegInfo; + Exprn = new int[Len]; + + NoCase = false; + Extend = false; + if (Expr[0] == '/') s++; + else return false; + + for (i = Len; i > 0 && !Ok;i--) + if (Expr[i] == '/') { + Len = i-s; + Ok = true; + for (int j = i+1; Expr[j]; j++) { + if (Expr[j] == 'i') NoCase = true; + if (Expr[j] == 'x') Extend = true; + }; + }; + if (!Ok) return false; + + //////////////////////////////// + for (j = 0,pos = 0; j < Len; j++,pos++) { + if (Extend && Expr[j+s] == ' ') { + pos--; + continue; + }; + + Exprn[pos] = (int)(unsigned char)Expr[j+s]; + + if (Expr[j+s] == BackSlash) { + switch (Expr[j+s+1]) { + case 'd': + Exprn[pos] = ReDigit; + break; + case 'D': + Exprn[pos] = ReNDigit; + break; + case 'w': + Exprn[pos] = ReWordSymb; + break; + case 'W': + Exprn[pos] = ReNWordSymb; + break; + case 's': + Exprn[pos] = ReWSpace; + break; + case 'S': + Exprn[pos] = ReNWSpace; + break; + case 'u': + Exprn[pos] = ReUCase; + break; + case 'l': + Exprn[pos] = ReNUCase; + break; + case 't': + Exprn[pos] = '\t'; + break; + case 'n': + Exprn[pos] = '\n'; + break; + case 'r': + Exprn[pos] = '\r'; + break; + case 'b': + Exprn[pos] = ReWBound; + break; + case 'B': + Exprn[pos] = ReNWBound; + break; + case 'c': + Exprn[pos] = RePreNW; + break; + case 'm': + Exprn[pos] = ReStart; + break; + case 'M': + Exprn[pos] = ReEnd; + break; + case 'x': + tmp = toupper(Expr[j+s+2])-0x30; + tmp = (tmp>9?tmp-7:tmp)<<4; + tmp += (toupper(Expr[j+s+3])-0x30)>9?toupper(Expr[j+s+3])-0x37:(toupper(Expr[j+s+3])-0x30); + Exprn[pos] = tmp; + j+=2; + break; + case 'y': + tmp = Expr[j+s+2] - 0x30; + if (tmp >= 0 && tmp <= 9) { + if (tmp == 1) { + tmp = 10 + Expr[j+s+3] - 0x30; + if (tmp >= 10 && tmp <= 19) j++; + else tmp = 1; + }; + Exprn[pos] = ReBkTrace + tmp; + j++; + break; + }; + default: + tmp = Expr[j+s+1] - 0x30; + if (tmp >= 0 && tmp <= 9) { + if (tmp == 1) { + tmp = 10 + Expr[j+s+2] - 0x30; + if (tmp >= 10 && tmp <= 19) j++; + else tmp = 1; + }; + Exprn[pos] = ReBkBrack + tmp; + break; + } else + Exprn[pos] = Expr[j+s+1]; + break; + }; + j++; + continue; + }; + if (Expr[j+s] == ']') { + Exprn[pos] = ReEnumE; + if (EnterFg || !EnterGr) return false; + EnterGr--; + }; + if (Expr[j+s] == '-' && EnterGr) Exprn[pos] = ReFrToEnum; + + if (EnterGr) continue; + + if (Expr[j+s] == '[' && Expr[j+s+1] == '^') { + Exprn[pos] = ReNEnumS; + if (EnterFg) return false; + EnterGr++; + j++; + continue; + }; + if (Expr[j+s] == '*' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGMul; + j++; + continue; + }; + if (Expr[j+s] == '+' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGPlus; + j++; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGQuest; + j++; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '#' && + Expr[j+s+2]>='0' && Expr[j+s+2]<='9') { + Exprn[pos] = ReBehind+Expr[j+s+2]-0x30; + j+=2; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '~' && + Expr[j+s+2]>='0' && Expr[j+s+2]<='9') { + Exprn[pos] = ReNBehind+Expr[j+s+2]-0x30; + j+=2; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '=') { + Exprn[pos] = ReAhead; + j++; + continue; + }; + if (Expr[j+s] == '?' && Expr[j+s+1] == '!') { + Exprn[pos] = ReNAhead; + j++; + continue; + }; + + if (Expr[j+s] == '(') { + Exprn[pos] = ReLBrack; + if (EnterFg) return false; + EnterBr++; + }; + if (Expr[j+s] == ')') { + Exprn[pos] = ReRBrack; + if (!EnterBr || EnterFg) return false; + EnterBr--; + }; + if (Expr[j+s] == '[') { + Exprn[pos] = ReEnumS; + if (EnterFg) return false; + EnterGr++; + }; + if (Expr[j+s] == '{') { + Exprn[pos] = ReRangeS; + if (EnterFg) return false; + EnterFg++; + }; + if (Expr[j+s] == '}' && Expr[j+s+1] == '?') { + Exprn[pos] = ReNGRangeE; + if (!EnterFg) return false; + EnterFg--; + j++; + continue; + }; + if (Expr[j+s] == '}') { + Exprn[pos] = ReRangeE; + if (!EnterFg) return false; + EnterFg--; + }; + + if (Expr[j+s] == '^') Exprn[pos] = ReSoL; + if (Expr[j+s] == '$') Exprn[pos] = ReEoL; + if (Expr[j+s] == '.') Exprn[pos] = ReAnyChr; + if (Expr[j+s] == '*') Exprn[pos] = ReMul; + if (Expr[j+s] == '+') Exprn[pos] = RePlus; + if (Expr[j+s] == '?') Exprn[pos] = ReQuest; + if (Expr[j+s] == '|') Exprn[pos] = ReOr; + }; + if (EnterGr || EnterBr || EnterFg) return false; + + Info->Op = ReBrackets; + Info->un.Param = new SRegInfo; + Info->s = CurMatch++; + + if (!SetStructs(Info->un.Param,0,pos)) return false; + Optimize(); + delete Exprn; + return true; +}; + +void PosRegExp::Optimize() { + PRegInfo Next = Info; + FirstChar = 0; + while(Next) { + if (Next->Op == ReBrackets || Next->Op == RePlus || Next->Op == ReNGPlus) { + Next = Next->un.Param; + continue; + }; + if (Next->Op == ReSymb) { + if (Next->un.Symb & 0xFF00 && Next->un.Symb != ReSoL && Next->un.Symb != ReWBound) + break; + FirstChar = Next->un.Symb; + break; + }; + break; + }; +}; + +bool PosRegExp::SetStructs(PRegInfo &re,int start,int end) { + PRegInfo Next,Prev,Prev2; + int comma,st,en,ng,i, j,k; + int EnterBr; + bool Add; + + if (end - start < 0) return false; + Next = re; + for (i = start; i < end; i++) { + Add = false; + // Ops + if (Exprn[i] > ReBlockOps && Exprn[i] < ReSymbolOps) { + Next->un.Param = 0; + Next->Op = (EOps)Exprn[i]; + Add = true; + }; + // {n,m} + if (Exprn[i] == ReRangeS) { + st = i; + en = -1; + comma = -1; + ng = 0; + for (j = i;j < end;j++) { + if (Exprn[j] == ReNGRangeE) { + en = j; + ng = 1; + break; + }; + if (Exprn[j] == ReRangeE) { + en = j; + break; + }; + if ((char)Exprn[j] == ',') + comma = j; + }; + if (en == -1) return false; + if (comma == -1) comma = en; + Next->s = (char)GetNumber(Exprn,st+1,comma); + if (comma != en) + Next->e = (char)GetNumber(Exprn,comma+1,en); + else + Next->e = Next->s; + Next->un.Param = 0; + Next->Op = ng?ReNGRangeNM:ReRangeNM; + if (en-comma == 1) { + Next->e = -1; + Next->Op = ng?ReNGRangeN:ReRangeN; + }; + i=j; + Add = true; + }; + // [] [^] + if (Exprn[i] == ReEnumS || Exprn[i] == ReNEnumS) { + Next->Op = (Exprn[i] == ReEnumS)?ReEnum:ReNEnum; + for (j = i+1;j < end;j++) { + if (Exprn[j] == ReEnumE) + break; + }; + if (j == end) return false; + Next->un.ChrClass = new SCharData; + memset(Next->un.ChrClass, 0, 32); + for (j = i+1;Exprn[j] != ReEnumE;j++) { + if (Exprn[j+1] == ReFrToEnum) { + for (i = (Exprn[j]&0xFF); i < (Exprn[j+2]&0xFF);i++) + Next->un.ChrClass->SetBit(i&0xFF); + j++; + continue; + }; + switch(Exprn[j]) { + case ReDigit: + for (k = 0x30;k < 0x40;k++) + if (IsDigit((char)k)) + Next->un.ChrClass->SetBit(k); + break; + case ReNDigit: + for (k = 0x30;k < 0x40;k++) + if (!IsDigit((char)k)) + Next->un.ChrClass->SetBit(k); + Next->un.ChrClass->ClearBit(0x0a); + Next->un.ChrClass->ClearBit(0x0d); + break; + case ReWordSymb: + for (k = 0;k < 256;k++) + if (IsWord((char)k)) + Next->un.ChrClass->SetBit(k); + break; + case ReNWordSymb: + for (k = 0;k < 256;k++) + if (!IsWord((char)k)) + Next->un.ChrClass->SetBit(k); + Next->un.ChrClass->ClearBit(0x0a); + Next->un.ChrClass->ClearBit(0x0d); + break; + case ReWSpace: + Next->un.ChrClass->SetBit(0x20); + Next->un.ChrClass->SetBit(0x09); + break; + case ReNWSpace: + memset(Next->un.ChrClass->IArr, 0xFF, 32); + Next->un.ChrClass->ClearBit(0x20); + Next->un.ChrClass->ClearBit(0x09); + Next->un.ChrClass->ClearBit(0x0a); + Next->un.ChrClass->ClearBit(0x0d); + break; + default: + if (!(Exprn[j]&0xFF00)) + Next->un.ChrClass->SetBit(Exprn[j]&0xFF); + break; + }; + }; + Add = true; + i=j; + }; + // ( ... ) + if (Exprn[i] == ReLBrack) { + EnterBr = 1; + for (j = i+1;j < end;j++) { + if (Exprn[j] == ReLBrack) EnterBr++; + if (Exprn[j] == ReRBrack) EnterBr--; + if (!EnterBr) break; + }; + if (EnterBr) return false; + Next->Op = ReBrackets; + Next->un.Param = new SRegInfo; + Next->un.Param->Parent = Next; + Next->s = CurMatch++; + if (CurMatch > MatchesNum) CurMatch = MatchesNum; + if (!SetStructs(Next->un.Param,i+1,j)) return false; + Add = true; + i=j; + }; + if ((Exprn[i]&0xFF00) == ReBkTrace) { + Next->Op = ReBkTrace; + Next->un.Symb = Exprn[i]&0xFF; + Add = true; + }; + if ((Exprn[i]&0xFF00) == ReBkBrack) { + Next->Op = ReBkBrack; + Next->un.Symb = Exprn[i]&0xFF; + Add = true; + }; + if ((Exprn[i]&0xFF00) == ReBehind) { + Next->Op = ReBehind; + Next->s = Exprn[i]&0xFF; + Add = true; + }; + if ((Exprn[i]&0xFF00) == ReNBehind) { + Next->Op = ReNBehind; + Next->s = Exprn[i]&0xFF; + Add = true; + }; + // Chars + if (Exprn[i] >= ReAnyChr && Exprn[i] < ReTemp || Exprn[i] < 0x100) { + Next->Op = ReSymb; + Next->un.Symb = Exprn[i]; + Add = true; + }; + // Next + if (Add && i != end-1) { + Next->Next = new SRegInfo; + Next->Next->Parent = Next->Parent; + Next = Next->Next; + }; + }; + Next = re; + Prev = Prev2 = 0; + while(Next) { + if (Next->Op > ReBlockOps && Next->Op < ReSymbolOps) { + if (!Prev) return false; + if (!Prev2) re = Next; + else Prev2->Next = Next; + //if (Prev->Op > ReBlockOps && Prev->Op < ReSymbolOps) return false; + Prev->Parent = Next; + Prev->Next = 0; + Next->un.Param = Prev; + Prev = Prev2; + }; + Prev2 = Prev; + Prev = Next; + Next = Next->Next; + }; + + return true; +}; + +///////////////////////////////////////////////////////////////// +///////////////////////// Parsing ///////////////////////////// +///////////////////////////////////////////////////////////////// + +bool PosRegExp::CheckSymb(int Symb,bool Inc) { + bool Res; + char ch; + switch(Symb) { + case ReAnyChr: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReSoL: + if (posStart == posParse) + return true; + ch = CharAt(posParse-1,param); + return ch == '\n' || ch == '\r'; + case ReEoL: + if (posEnd == posParse) + return true; + ch = CharAt(posParse,param); + return ch == '\n' || ch == '\r'; + case ReDigit: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = (ch >= 0x30 && ch <= 0x39); + if (Res && Inc) posParse++; + return Res; + case ReNDigit: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = !(ch >= 0x30 && ch <= 0x39) && ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReWordSymb: + if (posParse >= posEnd) return false; + Res = IsWord(CharAt(posParse,param)); + if (Res && Inc) posParse++; + return Res; + case ReNWordSymb: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = !IsWord(ch) && ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReWSpace: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = (ch == 0x20 || ch == '\t'); + if (Res && Inc) posParse++; + return Res; + case ReNWSpace: + if (posParse >= posEnd) return false; + ch = CharAt(posParse,param); + Res = !(ch == 0x20 || ch == '\t') && ch != '\r' && ch != '\n'; + if (Res && Inc) posParse++; + return Res; + case ReUCase: + if (posParse >= posEnd) return false; + Res = IsUpperCase(CharAt(posParse,param)); + if (Res && Inc) posParse++; + return Res; + case ReNUCase: + if (posParse >= posEnd) return false; + Res = IsLowerCase(CharAt(posParse,param)); + if (Res && Inc) posParse++; + return Res; + case ReWBound: + if (posParse >= posEnd) return true; + ch = CharAt(posParse,param); + return IsWord(CharAt(posParse,param)) && (posParse == posStart || !IsWord(CharAt(posParse-1,param))); + case ReNWBound: + if (posParse >= posEnd) return true; + return !IsWord(CharAt(posParse,param)) && IsWord(CharAt(posParse-1,param)); + case RePreNW: + if (posParse >= posEnd) return true; + return (posParse == posStart || !IsWord(CharAt(posParse-1,param))); + case ReStart: + Matches->s[0] = (posParse-posStart); + return true; + case ReEnd: + Matches->e[0] = (posParse-posStart); + return true; + default: + if ((Symb & 0xFF00) || posParse >= posEnd) return false; + if (NoCase) { + if (LowCase(CharAt(posParse,param)) != LowCase((char)Symb&0xFF)) return false; + } else + if (CharAt(posParse,param) != (char)(Symb&0xFF)) return false; + if (Inc) posParse++; + return true; + }; +} + +bool PosRegExp::LowParseRe(PRegInfo &Next) { + PRegInfo OrNext; + int i,match,sv; + int posStr; + + switch(Next->Op) { + case ReSymb: + if (!CheckSymb(Next->un.Symb,true)) return false; + break; + case ReEmpty: + break; + case ReBkTrace: + if (!posBkStr | !BkTrace) return false; + sv = Next->un.Symb; + posStr = posParse; + for (i = BkTrace->s[sv]; i < BkTrace->e[sv]; i++) { + if (CharAt(posStr,param) != CharAt(posBkStr+i,param) || posEnd == posStr) return false; + posStr++; + }; + posParse = posStr; + break; + case ReBkBrack: + sv = Next->un.Symb; + posStr = posParse; + if (Matches->s[sv] == -1 || Matches->e[sv] == -1) return false; + for (i = Matches->s[sv]; i < Matches->e[sv]; i++) { + if (CharAt(posStr,param) != CharAt(posStart+i,param) || posEnd == posStr) return false; + posStr++; + }; + posParse = posStr; + break; + case ReBehind: + sv = Next->s; + posStr = posParse; + posParse -= sv; + if (!LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReNBehind: + sv = Next->s; + posStr = posParse; + posParse -= sv; + if (LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReAhead: + posStr = posParse; + if (!LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReNAhead: + posStr = posParse; + if (LowParse(Next->un.Param)) return false; + posParse = posStr; + break; + case ReEnum: + if (posParse >= posEnd) return false; + if (!Next->un.ChrClass->GetBit(CharAt(posParse,param))) return false; + posParse++; + break; + case ReNEnum: + if (posParse >= posEnd) return false; + if (Next->un.ChrClass->GetBit(CharAt(posParse,param))) return false; + posParse++; + break; + case ReBrackets: + match = Next->s; + sv = posParse-posStart; + posStr = posParse; + if (LowParse(Next->un.Param)) { + if (match || (Matches->s[match] == -1)) + Matches->s[match] = sv; + if (match || (Matches->e[match] == -1)) + Matches->e[match] = posParse-posStart; + return true; + }; + posParse = posStr; + return false; + case ReMul: + posStr = posParse; + while (LowParse(Next->un.Param)); + while(!LowCheckNext(Next) && posStr < posParse) posParse--; + break; + case ReNGMul: + do { + if (LowCheckNext(Next)) break; + } while (LowParse(Next->un.Param)); + break; + case RePlus: + posStr = posParse; + match = false; + while (LowParse(Next->un.Param)) + match = true; + if (!match) return false; + while(!LowCheckNext(Next) && posStr < posParse) posParse--; + break; + case ReNGPlus: + if (!LowParse(Next->un.Param)) return false; + do { + if (LowCheckNext(Next)) break; + } while (LowParse(Next->un.Param)); + break; + case ReQuest: + LowParse(Next->un.Param); + break; + case ReNGQuest: + if (LowCheckNext(Next)) break; + if (!LowParse(Next->un.Param)) return false; + break; + case ReOr: + OrNext = Next; + // posStr = posParse; + if (LowParse(Next->un.Param)) { + while (OrNext && OrNext->Op == ReOr) + OrNext = OrNext->Next; + /*if (!LowCheckNext(OrNext)){ + posParse = posStr; + OrNext = Next; + };*/ + }; + Next = OrNext; + break; + case ReRangeN: + posStr = posParse; + i = 0; + while (LowParse(Next->un.Param)) i++; // ??? + do { + if (i < Next->s) { + posParse = posStr; + return false; + }; + i--; + } while(!LowCheckNext(Next) && posStr < posParse--); + break; + case ReNGRangeN: + posStr = posParse; + i = 0; + while (LowParse(Next->un.Param)) { + i++; + if (i >= Next->s && LowCheckNext(Next)) // ??? + break; + }; + if (i < Next->s) { + posParse = posStr; + return false; + }; + break; + case ReRangeNM: + posStr = posParse; + i = 0; + while (i < Next->s && LowParse(Next->un.Param)) // ??? + i++; + if (i < Next->s) { + posParse = posStr; + return false; + }; + while (i < Next->e && LowParse(Next->un.Param)) // ??? + i++; + + while(!LowCheckNext(Next)) { + i--; + posParse--; + if (i < Next->s) { + posParse = posStr; + return false; + }; + }; + break; + case ReNGRangeNM: + posStr = posParse; + i = 0; + while (i < Next->s && LowParse(Next->un.Param)) // ??? + i++; + if (i < Next->s) { + posParse = posStr; + return false; + }; + while(!LowCheckNext(Next)) { + i++; + if (!LowParse(Next->un.Param) || i > Next->e) { // ??? + posParse = posStr; + return false; + }; + }; + break; + }; + return true; +}; + +bool PosRegExp::LowCheckNext(PRegInfo Re) { + PRegInfo Next; + int tmp = posParse; + Next = Re; + do { + if (Next && Next->Op == ReOr) + while (Next && Next->Op == ReOr) + Next = Next->Next; + if (Next->Next && !LowParse(Next->Next)) { + posParse = tmp; + Ok = false; + return false; + }; + Next = Next->Parent; + } while(Next); + posParse = tmp; + if (Ok != false) Ok = true; + return true; +}; + +bool PosRegExp::LowParse(PRegInfo Re) { + while(Re && posParse <= posEnd) { + if (!LowParseRe(Re)) return false; + if (Re) Re = Re->Next; + }; + return true; +}; + +bool PosRegExp::QuickCheck() { + if (!NoMoves || !FirstChar) + return true; + switch(FirstChar) { + case ReSoL: + if (posParse != posStart) return false; + return true; + case ReWBound: + return IsWord(CharAt(posParse,param)) && (posParse == posStart || !IsWord(CharAt(posParse-1,param))); + default: + if (NoCase && LowCase(CharAt(posParse,param)) != LowCase(FirstChar)) return false; + if (!NoCase && CharAt(posParse,param) != (char)FirstChar) return false; + return true; + }; +}; + +bool PosRegExp::ParseRe(int posStr) { + if (Error) return false; + + posParse = posStr; + if (!QuickCheck()) return false; + + for (int i = 0; i < MatchesNum; i++) + Matches->s[i] = Matches->e[i] = -1; + Matches->CurMatch = CurMatch; + + Ok = -1; + //try{ + do { + if (!LowParse(Info)) { + if (NoMoves) return false; + } else + return true; + posParse = ++posStr; + } while(posParse != posEnd+1); + return false; + //}__except(){ + // return true; + //}; +} +; + +bool PosRegExp::Parse(int posStr,int posSol, int posEol, PMatches Mtch, int Moves) { + if (!this) return false; + + bool s = NoMoves; + if (Moves != -1) NoMoves = Moves!=0; + posStart = posSol; + posEnd = posEol; + Matches = Mtch; + bool r = ParseRe(posStr); + NoMoves = s; + return r; +}; + +bool PosRegExp::Parse(int posStr, int posStop, PMatches Mtch) { + if (!this) return false; + posStart = posStr; + posEnd = posStop; + Matches = Mtch; + return ParseRe(posStr); +}; + +bool PosRegExp::SetNoMoves(bool Moves) { + NoMoves = Moves; + return true; +}; + +bool PosRegExp::SetBkTrace(int posStr,PMatches Trace) { + BkTrace = Trace; + posBkStr = posStr; + return true; +}; + +#define EVAL_MATCHES 16 +#define EVAL_CHUNKSIZE 256 + +#define EVAL_LOWERCASE 1 +#define EVAL_UPPERCASE 2 +#define EVAL_LOWERCASE_NEXT 4 +#define EVAL_UPPERCASE_NEXT 8 + +bool PosRegExp::Evaluate(char *Expr, int posStr, PMatches Mtch, char **Res) { + int length, + newlength, + chunklength, + value, + size, + src, + end; + unsigned flag; + char ch, + *dest, + *pool; + + size = EVAL_CHUNKSIZE; + pool = (char*) malloc (size); + dest = pool; + length = 0; + flag = 0; + while (*Expr) { + switch (ch = *Expr++) { + case '\\': + switch (ch = *Expr++) { + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + ch -= ('A' - '0'); + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + value = ch - '0'; + if (Mtch->s[value] != -1 && value < EVAL_MATCHES) { + chunklength = Mtch->e[value] - Mtch->s[value]; + if (chunklength) { + newlength = chunklength + length; + if (newlength > size) { + do + size += EVAL_CHUNKSIZE; + while (size < newlength); + pool = (char*) realloc (pool, size); + dest = pool + length; + } + length = newlength; + src = posStr + Mtch->s[value]; + end = posStr + Mtch->e[value]; + if (flag & EVAL_UPPERCASE) { + if (flag & EVAL_LOWERCASE_NEXT) { + *dest++ = tolower (CharAt(src++,param)); + flag &= ~EVAL_LOWERCASE_NEXT; + } + while (src < end) + *dest++ = toupper (CharAt(src++,param)); + } else if (flag & EVAL_LOWERCASE) { + if (flag & EVAL_UPPERCASE_NEXT) { + *dest++ = toupper (CharAt(src++,param)); + flag &= ~EVAL_UPPERCASE_NEXT; + } + while (src < end) + *dest++ = tolower (CharAt(src++,param)); + } else { + if (flag & EVAL_LOWERCASE_NEXT) { + *dest++ = tolower (CharAt(src++,param)); + flag &= ~EVAL_LOWERCASE_NEXT; + } else if (flag & EVAL_UPPERCASE_NEXT) { + *dest++ = toupper (CharAt(src++,param)); + flag &= ~EVAL_UPPERCASE_NEXT; + } + while (src < end) + *dest++ = CharAt(src++,param); + } + } + } else + goto error; + continue; + case '\0': + goto error; + case 'r': + ch = '\r'; + break; + case 'n': + ch = '\n'; + break; + case 'b': + ch = '\b'; + break; + case 'a': + ch = '\a'; + break; + case 't': + ch = '\t'; + break; + case 'U': + flag |= EVAL_UPPERCASE; + continue; + case 'u': + flag |= EVAL_UPPERCASE_NEXT; + continue; + case 'L': + flag |= EVAL_LOWERCASE; + continue; + case 'l': + flag |= EVAL_LOWERCASE_NEXT; + continue; + case 'Q': + case 'q': + flag &= ~(EVAL_UPPERCASE | EVAL_LOWERCASE); + continue; + case 'x': + { + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + value = value + '0' - 'A' + 10; + if (value > 15) + goto error; + ch = value << 4; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + value = value + '0' - 'A' + 10; + if (value > 15) + goto error; + Expr++; + ch |= value; + break; + } + case 'd': + { + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch = value * 100; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch += value * 10; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch += value; + Expr++; + break; + } + case 'o': + { + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch = value << 6; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch += value << 3; + Expr++; + if (!*Expr) + goto error; + value = toupper (*Expr) - '0'; + if (value > 9) + goto error; + ch |= value; + Expr++; + /* break; */ + } + /* default: + break; */ + } + default: + if (++length > size) { + do + size += EVAL_CHUNKSIZE; + while (size < length); + pool = (char*) realloc (pool, size); + dest = pool + length - 1; + } + if (flag & EVAL_LOWERCASE_NEXT) { + *dest++ = tolower (ch); + flag &= ~EVAL_LOWERCASE_NEXT; + } else if (flag & EVAL_UPPERCASE_NEXT) { + *dest++ = toupper (ch); + flag &= ~EVAL_UPPERCASE_NEXT; + } else if (flag & EVAL_UPPERCASE) + *dest++ = toupper (ch); + else if (flag & EVAL_LOWERCASE) + *dest++ = tolower (ch); + else + *dest++ = ch; + } + } + if (++length > size) { + do + size += EVAL_CHUNKSIZE; + while (size < length); + pool = (char*) realloc (pool, size); + dest = pool + length - 1; + } + *dest = '\0'; + *Res = pool; + return true; +error: + free (pool); + return false; +} diff --git a/src/stc/scintilla/src/PropSet.cxx b/src/stc/scintilla/src/PropSet.cxx index 7e2a906a47..a58d143164 100644 --- a/src/stc/scintilla/src/PropSet.cxx +++ b/src/stc/scintilla/src/PropSet.cxx @@ -24,9 +24,22 @@ bool EqualCaseInsensitive(const char *a, const char *b) { #endif } +SString::size_type SString::npos = -1; + +inline unsigned int HashString(const char *s) { + unsigned int ret = 0; + while (*s) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; +} + // Get a line of input. If end of line escaped with '\\' then continue reading. static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { bool continuation = true; + s[0] = '\0'; while ((len > 1) && lenData > 0) { char ch = *fpc; fpc++; @@ -38,7 +51,7 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { fpc++; lenData--; } - *s++ = '\0'; + *s = '\0'; return true; } } else if ((ch == '\\') && (lenData > 0) && ((*fpc == '\r') || (*fpc == '\n'))) { @@ -46,6 +59,7 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { } else { continuation = false; *s++ = ch; + *s = '\0'; len--; } } @@ -54,47 +68,39 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { PropSet::PropSet() { superPS = 0; - size = 10; - used = 0; - vals = new char * [size]; + for (int root=0; root < hashRoots; root++) + props[root] = 0; } PropSet::~PropSet() { superPS = 0; Clear(); - delete []vals; -} - -void PropSet::EnsureCanAddEntry() { - if (used >= size - 2) { - int newsize = size + 10; - char **newvals = new char * [newsize]; - - for (int i = 0; i < used; i++) { - newvals[i] = vals[i]; - } - delete []vals; - vals = newvals; - size = newsize; - } } void PropSet::Set(const char *key, const char *val) { - EnsureCanAddEntry(); - for (int i = 0; i < used; i += 2) { - if (EqualCaseInsensitive(vals[i], key)) { + unsigned int hash = HashString(key); + for (Property *p=props[hash % hashRoots]; p; p=p->next) { + if ((hash == p->hash) && (0 == strcmp(p->key, key))) { // Replace current value - delete [](vals[i + 1]); - vals[i + 1] = StringDup(val); + delete [](p->val); + p->val = StringDup(val); return; } } // Not found - vals[used++] = StringDup(key); - vals[used++] = StringDup(val); + Property *pNew = new Property; + if (pNew) { + pNew->hash = HashString(key); + pNew->key = StringDup(key); + pNew->val = StringDup(val); + pNew->next = props[hash % hashRoots]; + props[hash % hashRoots] = pNew; + } } void PropSet::Set(char *keyval) { + while (isspace(*keyval)) + keyval++; char *eqat = strchr(keyval, '='); if (eqat) { *eqat = '\0'; @@ -104,11 +110,12 @@ void PropSet::Set(char *keyval) { } SString PropSet::Get(const char *key) { - for (int i = 0; i < used; i += 2) { - if (EqualCaseInsensitive(vals[i], key)) { - return vals[i + 1]; - } - } + unsigned int hash = HashString(key); + for (Property *p=props[hash % hashRoots]; p; p=p->next) { + if ((hash == p->hash) && (0 == strcmp(p->key, key))) { + return p->val; + } + } if (superPS) { // Failed here, so try in base property set return superPS->Get(key); @@ -117,17 +124,47 @@ SString PropSet::Get(const char *key) { } } +SString PropSet::GetExpanded(const char *key) { + SString val = Get(key); + return Expand(val.c_str()); +} + +SString PropSet::Expand(const char *withvars) { + char *base = StringDup(withvars); + char *cpvar = strstr(base, "$("); + while (cpvar) { + char *cpendvar = strchr(cpvar, ')'); + if (cpendvar) { + int lenvar = cpendvar - cpvar - 2; // Subtract the $() + char *var = StringDup(cpvar+2, lenvar); + SString val = GetExpanded(var); + int newlenbase = strlen(base) + val.length() - lenvar; + char *newbase = new char[newlenbase]; + strncpy(newbase, base, cpvar - base); + strcpy(newbase + (cpvar - base), val.c_str()); + strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1); + delete []var; + delete []base; + base = newbase; + } + cpvar = strstr(base, "$("); + } + SString sret = base; + delete []base; + return sret; +} + int PropSet::GetInt(const char *key, int defaultValue) { SString val = Get(key); if (val.length()) - return Get(key).value(); + return val.value(); else return defaultValue; } -bool isprefix(const char *target, const char *prefix) { +inline bool isprefix(const char *target, const char *prefix) { while (*target && *prefix) { - if (toupper(*target) != toupper(*prefix)) + if (*target != *prefix) return false; target++; prefix++; @@ -144,64 +181,63 @@ bool issuffix(const char *target, const char *suffix) { if (lensuffix > lentarget) return false; for (int i = lensuffix - 1; i >= 0; i--) { - if (toupper(target[i + lentarget - lensuffix]) != toupper(suffix[i])) + if (target[i + lentarget - lensuffix] != suffix[i]) return false; } return true; } SString PropSet::GetWild(const char *keybase, const char *filename) { - for (int i = 0; i < used; i += 2) { - if (isprefix(vals[i], keybase)) { - char *orgkeyfile = vals[i] + strlen(keybase); - char *keyfile = NULL; + for (int root=0; root < hashRoots; root++) { + for (Property *p=props[root]; p; p=p->next) { + if (isprefix(p->key, keybase)) { + char *orgkeyfile = p->key + strlen(keybase); + char *keyfile = NULL; - if (strstr(orgkeyfile, "$(") == orgkeyfile) { - char *cpendvar = strchr(orgkeyfile, ')'); - if (cpendvar) { - int lenvar = cpendvar - orgkeyfile - 2; // Subtract the $() - char *var = static_cast(malloc(lenvar + 1)); - strncpy(var, orgkeyfile + 2, lenvar); - var[lenvar] = '\0'; - SString s = Get(var); - free(var); - keyfile = strdup(s.c_str()); - } - } - char *keyptr = keyfile; + if (strstr(orgkeyfile, "$(") == orgkeyfile) { + char *cpendvar = strchr(orgkeyfile, ')'); + if (cpendvar) { + *cpendvar = '\0'; + SString s = Get(orgkeyfile + 2); + *cpendvar= ')'; + keyfile = strdup(s.c_str()); + } + } + char *keyptr = keyfile; - if (keyfile == NULL) - keyfile = orgkeyfile; + if (keyfile == NULL) + keyfile = orgkeyfile; - for (; ; ) { - char *del = strchr(keyfile, ';'); - if (del == NULL) - del = keyfile + strlen(keyfile); - char delchr = *del; - *del = '\0'; - if (*keyfile == '*') { - if (issuffix(filename, keyfile + 1)) { - *del = delchr; - free(keyptr); - return vals[i + 1]; - } - } else if (EqualCaseInsensitive(keyfile, filename)) { - *del = delchr; - free(keyptr); - return vals[i + 1]; - } - if (delchr == '\0') - break; - *del = delchr; - keyfile = del + 1; - } - free(keyptr); + for (; ; ) { + char *del = strchr(keyfile, ';'); + if (del == NULL) + del = keyfile + strlen(keyfile); + char delchr = *del; + *del = '\0'; + if (*keyfile == '*') { + if (issuffix(filename, keyfile + 1)) { + *del = delchr; + free(keyptr); + return p->val; + } + } else if (0 == strcmp(keyfile, filename)) { + *del = delchr; + free(keyptr); + return p->val; + } + if (delchr == '\0') + break; + *del = delchr; + keyfile = del + 1; + } + free(keyptr); - if (EqualCaseInsensitive(vals[i], keybase)) { - return vals[i + 1]; - } - } - } + if (0 == strcmp(p->key, keybase)) { + return p->val; + } + } + } + } if (superPS) { // Failed here, so try in base property set return superPS->GetWild(keybase, filename); @@ -217,9 +253,7 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) { char *cpendvar = strchr(cpvar, ')'); if (cpendvar) { int lenvar = cpendvar - cpvar - 2; // Subtract the $() - char *var = new char[lenvar + 1]; - strncpy(var, cpvar + 2, lenvar); - var[lenvar] = '\0'; + char *var = StringDup(cpvar+2, lenvar); SString val = GetWild(var, filename); int newlenbase = strlen(base) + val.length() - lenvar; char *newbase = new char[newlenbase]; @@ -238,33 +272,54 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) { } void PropSet::Clear() { - for (int i = 0; i < used; i++) { - delete [](vals[i]); - vals[i] = 0; - } - used = 0; + for (int root=0; root < hashRoots; root++) { + Property *p=props[root]; + while (p) { + Property *pNext=p->next; + p->hash = 0; + delete p->key; + p->key = 0; + delete p->val; + p->val = 0; + delete p; + p = pNext; + } + props[root] = 0; + } } -void PropSet::ReadFromMemory(const char *data, int len) { - if (len > 0) { - const char *pd = data; - char linebuf[60000]; - while (GetFullLine(pd, len, linebuf, sizeof(linebuf))) { - if (isalpha(linebuf[0])) - Set(linebuf); +void PropSet::ReadFromMemory(const char *data, int len, const char *directoryForImports) { + const char *pd = data; + char linebuf[60000]; + bool ifIsTrue = true; + while (len > 0) { + GetFullLine(pd, len, linebuf, sizeof(linebuf)); + if (isalpha(linebuf[0])) // If clause ends with first non-indented line + ifIsTrue = true; + if (isprefix(linebuf, "if ")) { + const char *expr = linebuf + strlen("if") + 1; + ifIsTrue = GetInt(expr); + } else if (isprefix(linebuf, "import ") && directoryForImports) { + char importPath[1024]; + strcpy(importPath, directoryForImports); + strcat(importPath, linebuf + strlen("import") + 1); + strcat(importPath, ".properties"); + Read(importPath,directoryForImports); + } else if (isalpha(linebuf[0])) { + Set(linebuf); + } else if (isspace(linebuf[0]) && ifIsTrue) { + Set(linebuf); } } } -void PropSet::Read(const char *filename) { - //printf("Opening properties <%s>\n", filename); - Clear(); +void PropSet::Read(const char *filename, const char *directoryForImports) { char propsData[60000]; FILE *rcfile = fopen(filename, "rb"); if (rcfile) { int lenFile = fread(propsData, 1, sizeof(propsData), rcfile); fclose(rcfile); - ReadFromMemory(propsData, lenFile); + ReadFromMemory(propsData, lenFile, directoryForImports); } else { //printf("Could not open <%s>\n", filename); } @@ -280,7 +335,8 @@ static bool iswordsep(char ch, bool onlyLineEnds) { // Creates an array that points into each word in the string and puts \0 terminators // after each word. -static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) { +static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) { +#if 1 char prev = '\n'; int words = 0; for (int j = 0; wordlist[j]; j++) { @@ -292,8 +348,8 @@ static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) { if (keywords) { words = 0; prev = '\0'; - int len = strlen(wordlist); - for (int k = 0; k < len; k++) { + int slen = strlen(wordlist); + for (int k = 0; k < slen; k++) { if (!iswordsep(wordlist[k], onlyLineEnds)) { if (!prev) { keywords[words] = &wordlist[k]; @@ -304,25 +360,69 @@ static char **ArrayFromWordList(char *wordlist, bool onlyLineEnds = false) { } prev = wordlist[k]; } - keywords[words] = &wordlist[len]; + keywords[words] = &wordlist[slen]; + *len = words; + } else { + *len = 0; } +#else + int words = 0; // length of the returned buffer of pointers + #undef APICHUNK // how many pointers will be pre-allocated (to avoid buffer reallocation on each new pointer) + #define APICHUNK 256 + int size = APICHUNK; // real size of the returned buffer of pointers + char **keywords; // buffer for the pointers returned + int slen = strlen(wordlist); //length of the buffer with api file + keywords = (char**) malloc((size + 1) * sizeof (*keywords)); + words = 0; + for (int k = 0;;) { + while (iswordsep(wordlist[k], onlyLineEnds)) + wordlist[k++] = '\0'; + if (k >= slen) + break; + if (words >= size) { + do + size += APICHUNK; + while (size <= words); + keywords = (char**) realloc(keywords, (size + 1) * sizeof (*keywords)); + } + keywords[words++] = wordlist + k; + do + if (k < slen) + k++; + else + goto out; + while (!iswordsep(wordlist[k], onlyLineEnds)); + } +out: + keywords[words] = wordlist + slen; + *len = words; +#endif return keywords; } void WordList::Clear() { if (words) { - delete []words; delete []list; +#if 1 + delete []words; +#else + free(words); +#endif + free(wordsNoCase); } words = 0; + wordsNoCase = 0; list = 0; len = 0; + sorted = false; } void WordList::Set(const char *s) { - len = 0; list = StringDup(s); - words = ArrayFromWordList(list, onlyLineEnds); + sorted = false; + words = ArrayFromWordList(list, &len, onlyLineEnds); + wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase)); + memcpy(wordsNoCase, words, (len + 1) * sizeof (*words)); } char *WordList::Allocate(int size) { @@ -332,46 +432,36 @@ char *WordList::Allocate(int size) { } void WordList::SetFromAllocated() { - len = 0; - words = ArrayFromWordList(list, onlyLineEnds); + sorted = false; + words = ArrayFromWordList(list, &len, onlyLineEnds); + wordsNoCase = (char**) malloc ((len + 1) * sizeof (*wordsNoCase)); + memcpy(wordsNoCase, words, (len + 1) * sizeof (*words)); } -// Shell sort based upon public domain C implementation by Raymond Gardner 1991 -// Used here because of problems with mingw qsort. -static void SortWordList(char **words, unsigned int len) { - unsigned int gap = len / 2; - - while (gap > 0) { - unsigned int i = gap; - while (i < len) { - unsigned int j = i; - char **a = words + j; - do { - j -= gap; - char **b = a; - a -= gap; - if (strcmp(*a, *b) > 0) { - char *tmp = *a; - *a = *b; - *b = tmp; - } else { - break; - } - } while (j >= gap); - i++; - } - gap = gap / 2; - } +int cmpString(const void *a1, const void *a2) { + // Can't work out the correct incantation to use modern casts here + return strcmp(*(char**)(a1), *(char**)(a2)); } +int cmpStringNoCase(const void *a1, const void *a2) { + // Can't work out the correct incantation to use modern casts here + return strcasecmp(*(char**)(a1), *(char**)(a2)); +} + +static void SortWordList(char **words, char **wordsNoCase, unsigned int len) { + qsort(reinterpret_cast(words), len, sizeof(*words), + cmpString); + qsort(reinterpret_cast(wordsNoCase), len, sizeof(*wordsNoCase), + cmpStringNoCase); +} + bool WordList::InList(const char *s) { if (0 == words) return false; - if (len == 0) { - for (int i = 0; words[i][0]; i++) - len++; - SortWordList(words, len); - for (int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) + if (!sorted) { + sorted = true; + SortWordList(words, wordsNoCase, len); + for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) starts[k] = -1; for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; @@ -397,3 +487,256 @@ bool WordList::InList(const char *s) { } return false; } + +/** + * Returns an element (complete) of the wordlist array which has the beginning + * the same as the passed string. The length of the word to compare is passed + * too. Letter case can be ignored or preserved (default). + */ +const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) { + int start = 0; // lower bound of the api array block to search + int end = len - 1; // upper bound of the api array block to search + int pivot; // index of api array element just being compared + int cond; // comparison result (in the sense of strcmp() result) + const char *word; // api array element just being compared + + if (0 == words) + return NULL; + if (!sorted) { + sorted = true; + SortWordList(words, wordsNoCase, len); + } + if (ignoreCase) + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = wordsNoCase[pivot]; + cond = strncasecmp(wordStart, word, searchLen); + if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here? + return word; // result must not be freed with free() + else if (cond < 0) + end = pivot - 1; + else if (cond > 0) + start = pivot + 1; + } + else // preserve the letter case + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = words[pivot]; + cond = strncmp(wordStart, word, searchLen); + if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here? + return word; // result must not be freed with free() + else if (cond >= 0) + start = pivot + 1; + else if (cond < 0) + end = pivot - 1; + } + return NULL; +} + +/** + * Returns elements (first words of them) of the wordlist array which have + * the beginning the same as the passed string. The length of the word to + * compare is passed too. Letter case can be ignored or preserved (default). + * If there are more words meeting the condition they are returned all of + * them in the ascending order separated with spaces. + * + * NOTE: returned buffer has to be freed with a free() call. + */ +char *WordList::GetNearestWords(const char *wordStart, int searchLen /*= -1*/, bool ignoreCase /*= false*/) { + int wordlen; // length of the word part (before the '(' brace) of the api array element + int length = 0; // length of the returned buffer of words (string) + int newlength; // length of the new buffer before the reallocating itself + #undef WORDCHUNK // how many characters will be pre-allocated (to avoid buffer reallocation on each new word) + #define WORDCHUNK 100 + int size = WORDCHUNK; // real size of the returned buffer of words + char *buffer; // buffer for the words returned + int start = 0; // lower bound of the api array block to search + int end = len - 1; // upper bound of the api array block to search + int pivot; // index of api array element just being compared + int cond; // comparison result (in the sense of strcmp() result) + int oldpivot; // pivot storage to be able to browse the api array upwards and then downwards + const char *word; // api array element just being compared + const char *brace; // position of the opening brace in the api array element just being compared + + if (0 == words) + return NULL; + if (!sorted) { + sorted = true; + SortWordList(words, wordsNoCase, len); + } + buffer = (char*) malloc(size); + *buffer = '\0'; + if (ignoreCase) + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = wordsNoCase[pivot]; + cond = strncasecmp(wordStart, word, searchLen); + if (!cond) { + oldpivot = pivot; + do { // browse sequentially the rest after the hit + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + if (++pivot > end) + break; + word = wordsNoCase[pivot]; + } while (!strncasecmp(wordStart, word, searchLen)); + + pivot = oldpivot; + for (;;) { // browse sequentially the rest before the hit + if (--pivot < start) + break; + word = wordsNoCase[pivot]; + if (strncasecmp(wordStart, word, searchLen)) + break; + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) + { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + } + return buffer; // result has to be freed with free() + } + else if (cond < 0) + end = pivot - 1; + else if (cond > 0) + start = pivot + 1; + } + else // preserve the letter case + while (start <= end) { // binary searching loop + pivot = (start + end) >> 1; + word = words[pivot]; + cond = strncmp(wordStart, word, searchLen); + if (!cond) { + oldpivot = pivot; + do { // browse sequentially the rest after the hit + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) + { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + if (++pivot > end) + break; + word = words[pivot]; + } while (!strncmp(wordStart, word, searchLen)); + + pivot = oldpivot; + for (;;) { // browse sequentially the rest before the hit + if (--pivot < start) + break; + word = words[pivot]; + if (strncmp(wordStart, word, searchLen)) + break; + brace = strchr(word, '('); + if (brace) + do + if (--brace < word) + break; + while (isspace(*brace)); + else { + brace = word + strlen(word); + do + if (--brace < word) + break; + while (isspace(*brace)); + } + wordlen = brace - word + 1; + newlength = length + wordlen; // stretch the buffer + if (length) + newlength++; + if (newlength >= size) + { + do + size += WORDCHUNK; + while (size <= newlength); + buffer = (char*) realloc(buffer, size); + } + if (length) // append a new entry + buffer[length++] = ' '; + memcpy(buffer + length, word, wordlen); + length = newlength; + buffer[length] = '\0'; + } + return buffer; // result has to be freed with free() + } + else if (cond < 0) + end = pivot - 1; + else if (cond > 0) + start = pivot + 1; + } + free(buffer); + return NULL; +} diff --git a/src/stc/scintilla/src/SVector.h b/src/stc/scintilla/src/SVector.h index 49fc376dda..d4d49c717d 100644 --- a/src/stc/scintilla/src/SVector.h +++ b/src/stc/scintilla/src/SVector.h @@ -6,13 +6,12 @@ #ifndef SVECTOR_H #define SVECTOR_H -// A simple expandable vector. -// T must support assignment. +// A simple expandable integer vector. // Storage not allocated for elements until an element is used. // This makes it very lightweight unless used so is a good match for optional features. -template + class SVector { - T *v; + int *v; unsigned int size; // Number of elements allocated unsigned int len; // Number of elements in vector bool allocFailure; // A memory allocation call has failed @@ -20,19 +19,23 @@ class SVector { // Internally allocate more elements than the user wants to avoid // thrashng the memory allocator void SizeTo(int newSize) { - if (newSize < sizeIncrement) - newSize += sizeIncrement; + if (newSize < 4000) + newSize += 4000; else newSize = (newSize * 3) / 2; - T* newv = new T[newSize]; + int* newv = new int[newSize]; if (!newv) { allocFailure = true; return; } size = newSize; - for (int i=0; i= len) { if (i >= size) { SizeTo(i); @@ -94,13 +97,13 @@ public: size = 0; len = 0; } - void SetLength(int newLen) { - if (newLen > len) { - if (newLen >= size) { - SizeTo(newLen); + void SetLength(unsigned int newLength) { + if (newLength > len) { + if (newLength >= size) { + SizeTo(newLength); } } - len = newLen; + len = newLength; } int Length() const { return len; diff --git a/src/stc/scintilla/src/ScintillaBase.cxx b/src/stc/scintilla/src/ScintillaBase.cxx index eb68904b79..4f182850ad 100644 --- a/src/stc/scintilla/src/ScintillaBase.cxx +++ b/src/stc/scintilla/src/ScintillaBase.cxx @@ -11,10 +11,12 @@ #include "Platform.h" #include "Scintilla.h" +#include "PropSet.h" #ifdef SCI_LEXER #include "SciLexer.h" -#include "PropSet.h" #include "Accessor.h" +#include "WindowAccessor.h" +#include "DocumentAccessor.h" #include "KeyWords.h" #endif #include "ContractionState.h" @@ -39,9 +41,15 @@ ScintillaBase::ScintillaBase() { #endif } -ScintillaBase::~ScintillaBase() {} +ScintillaBase::~ScintillaBase() { +#ifdef SCI_LEXER + for (int wl=0;wlDeleteChars(currentPos, lenEntered); + SetEmptySelection(currentPos); + pdoc->InsertString(currentPos, list); + SetEmptySelection(currentPos + strlen(list)); + } else { + SetEmptySelection(currentPos); + pdoc->InsertString(currentPos, list + lenEntered); + SetEmptySelection(currentPos + strlen(list + lenEntered)); + } + return; + } + } ac.Start(wDraw, idAutoComplete, currentPos, lenEntered); PRectangle rcClient = GetClientRectangle(); Point pt = LocationFromPosition(currentPos-lenEntered); - //Platform::DebugPrintf("Auto complete %x\n", lbAutoComplete); int heightLB = 100; int widthLB = 100; if (pt.x >= rcClient.right - widthLB) { @@ -186,16 +213,18 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { rcac.right = rcac.left + widthLB; rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom); ac.lb.SetPositionRelative(rcac, wMain); - ac.lb.SetFont(vs.styles[0].font); + ac.lb.SetFont(vs.styles[STYLE_DEFAULT].font); + ac.lb.SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth); - int maxStrLen = ac.SetList(list); + ac.SetList(list); // Fiddle the position of the list so it is right next to the target and wide enough for all its strings - PRectangle rcList = ac.lb.GetPosition(); + PRectangle rcList = ac.lb.GetDesiredRect(); int heightAlloced = rcList.bottom - rcList.top; + widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left); // Make an allowance for large strings in list rcList.left = pt.x - 5; - rcList.right = rcList.left + Platform::Maximum(widthLB, maxStrLen * 8 + 16); + rcList.right = rcList.left + widthLB; if (pt.y >= rcClient.bottom - heightLB && // Wont fit below. pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above. rcList.top = pt.y - heightAlloced; @@ -204,8 +233,10 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { } rcList.bottom = rcList.top + heightAlloced; ac.lb.SetPositionRelative(rcList, wMain); - //lbAutoComplete.SetPosition(rcList); ac.Show(); + if (lenEntered != 0) { + AutoCompleteMoveToCurrentWord(); + } } void ScintillaBase::AutoCompleteCancel() { @@ -216,36 +247,63 @@ void ScintillaBase::AutoCompleteMove(int delta) { ac.Move(delta); } +void ScintillaBase::AutoCompleteMoveToCurrentWord() { + char wordCurrent[1000]; + int i; + int startWord = ac.posStart - ac.startLen; + for (i = startWord; i < currentPos; i++) + wordCurrent[i - startWord] = pdoc->CharAt(i); + wordCurrent[i - startWord] = '\0'; + ac.Select(wordCurrent); +} + void ScintillaBase::AutoCompleteChanged(char ch) { - if (currentPos <= ac.posStart) { + if (ac.IsFillUpChar(ch)) { + AutoCompleteCompleted(ch); + } else if (currentPos <= ac.posStart - ac.startLen) { + ac.Cancel(); + } else if (ac.cancelAtStartPos && currentPos <= ac.posStart) { ac.Cancel(); } else if (ac.IsStopChar(ch)) { ac.Cancel(); } else { - char wordCurrent[1000]; - int i; - int startWord = ac.posStart - ac.startLen; - for (i = startWord; i < currentPos; i++) - wordCurrent[i - startWord] = pdoc->CharAt(i); - wordCurrent[i - startWord] = '\0'; - ac.Select(wordCurrent); + AutoCompleteMoveToCurrentWord(); } } -void ScintillaBase::AutoCompleteCompleted() { +void ScintillaBase::AutoCompleteCompleted(char fillUp/*='\0'*/) { int item = ac.lb.GetSelection(); - char selected[200]; + char selected[1000]; if (item != -1) { ac.lb.GetValue(item, selected, sizeof(selected)); } ac.Cancel(); - if (currentPos != ac.posStart) { - pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart); - } - SetEmptySelection(ac.posStart); - if (item != -1) { - pdoc->InsertString(currentPos, selected + ac.startLen); - SetEmptySelection(currentPos + strlen(selected + ac.startLen)); + + if (ac.ignoreCase) { + if (currentPos != ac.posStart) { + pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart); + } + SetEmptySelection(ac.posStart - ac.startLen); + pdoc->DeleteChars(ac.posStart - ac.startLen, ac.startLen); + if (item != -1) { + SString piece = selected; + if (fillUp) + piece += fillUp; + pdoc->InsertString(currentPos, piece.c_str()); + SetEmptySelection(currentPos + piece.length()); + } + } else { + if (currentPos != ac.posStart) { + pdoc->DeleteChars(ac.posStart, currentPos - ac.posStart); + } + SetEmptySelection(ac.posStart); + if (item != -1) { + SString piece = selected + ac.startLen; + if (fillUp) + piece += fillUp; + pdoc->InsertString(currentPos, piece.c_str()); + SetEmptySelection(currentPos + piece.length()); + } } } @@ -256,16 +314,21 @@ void ScintillaBase::ContextMenu(Point pt) { AddToPopUp(""); AddToPopUp("Cut", idcmdCut, currentPos != anchor); AddToPopUp("Copy", idcmdCopy, currentPos != anchor); - AddToPopUp("Paste", idcmdPaste, WndProc(EM_CANPASTE, 0, 0)); + AddToPopUp("Paste", idcmdPaste, WndProc(SCI_CANPASTE, 0, 0)); AddToPopUp("Delete", idcmdDelete, currentPos != anchor); AddToPopUp(""); AddToPopUp("Select All", idcmdSelectAll); popup.Show(pt, wMain); } -void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { +void ScintillaBase::CancelModes() { AutoCompleteCancel(); ct.CallTipCancel(); + Editor::CancelModes(); +} + +void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { + CancelModes(); Editor::ButtonDown(pt, curTime, shift, ctrl, alt); } @@ -276,33 +339,33 @@ void ScintillaBase::Colourise(int start, int end) { end = lengthDoc; int len = end - start; - PropSet props; - - StylingContext styler(wMain.GetID(), props); + //WindowAccessor styler(wMain.GetID(), props); + DocumentAccessor styler(pdoc, props); int styleStart = 0; if (start > 0) styleStart = styler.StyleAt(start - 1); - - ColouriseDoc(pdoc->dbcsCodePage, start, len, styleStart, lexLanguage, keyWordLists, styler); + styler.SetCodePage(pdoc->dbcsCodePage); + + LexerModule::Colourise(start, len, styleStart, lexLanguage, keyWordLists, styler); styler.Flush(); } #endif -void ScintillaBase::NotifyStyleNeeded(int endStyleNeeded) { +void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) { #ifdef SCI_LEXER if (lexLanguage != SCLEX_CONTAINER) { int endStyled = Platform::SendScintilla(wMain.GetID(), SCI_GETENDSTYLED, 0, 0); - int lineEndStyled = Platform::SendScintilla(wMain.GetID(), EM_LINEFROMCHAR, endStyled, 0); - endStyled = Platform::SendScintilla(wMain.GetID(), EM_LINEINDEX, lineEndStyled, 0); + int lineEndStyled = Platform::SendScintilla(wMain.GetID(), SCI_LINEFROMPOSITION, endStyled, 0); + endStyled = Platform::SendScintilla(wMain.GetID(), SCI_POSITIONFROMLINE, lineEndStyled, 0); Colourise(endStyled, endStyleNeeded); return; } #endif - Editor::NotifyStyleNeeded(endStyleNeeded); + Editor::NotifyStyleToNeeded(endStyleNeeded); } -LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { +long ScintillaBase::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { switch (iMessage) { case SCI_AUTOCSHOW: AutoCompleteStart(wParam, reinterpret_cast(lParam)); @@ -322,16 +385,52 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { AutoCompleteCompleted(); break; + case SCI_AUTOCSETSEPARATOR: + ac.SetSeparator(static_cast(wParam)); + break; + + case SCI_AUTOCGETSEPARATOR: + return ac.GetSeparator(); + case SCI_AUTOCSTOPS: ac.SetStopChars(reinterpret_cast(lParam)); break; + + case SCI_AUTOCSELECT: + ac.Select(reinterpret_cast(lParam)); + break; + + case SCI_AUTOCSETCANCELATSTART: + ac.cancelAtStartPos = wParam; + break; + + case SCI_AUTOCGETCANCELATSTART: + return ac.cancelAtStartPos; + case SCI_AUTOCSETFILLUPS: + ac.SetFillUpChars(reinterpret_cast(lParam)); + break; + + case SCI_AUTOCSETCHOOSESINGLE: + ac.chooseSingle = wParam; + break; + + case SCI_AUTOCGETCHOOSESINGLE: + return ac.chooseSingle; + + case SCI_AUTOCSETIGNORECASE: + ac.ignoreCase = wParam; + break; + + case SCI_AUTOCGETIGNORECASE: + return ac.ignoreCase; + case SCI_CALLTIPSHOW: { AutoCompleteCancel(); if (!ct.wCallTip.Created()) { PRectangle rc = ct.CallTipStart(currentPos, LocationFromPosition(wParam), reinterpret_cast(lParam), - vs.styles[0].fontName, vs.styles[0].size); + vs.styles[STYLE_DEFAULT].fontName, vs.styles[STYLE_DEFAULT].size); // If the call-tip window would be out of the client // space, adjust so it displays above the text. PRectangle rcClient = GetClientRectangle(); @@ -377,6 +476,7 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_COLOURISE: Colourise(wParam, lParam); + Redraw(); break; case SCI_SETPROPERTY: @@ -385,7 +485,7 @@ LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { break; case SCI_SETKEYWORDS: - if ((wParam >= 0) && (wParam < numWordLists)) { + if (wParam < numWordLists) { keyWordLists[wParam]->Clear(); keyWordLists[wParam]->Set(reinterpret_cast(lParam)); } diff --git a/src/stc/scintilla/src/ScintillaBase.h b/src/stc/scintilla/src/ScintillaBase.h index e9f8f28d03..e630ba1aac 100644 --- a/src/stc/scintilla/src/ScintillaBase.h +++ b/src/stc/scintilla/src/ScintillaBase.h @@ -7,6 +7,9 @@ #define SCINTILLABASE_H class ScintillaBase : public Editor { + // Private so ScintillaBase objects can not be copied + ScintillaBase(const ScintillaBase &) : Editor() {} + ScintillaBase &operator=(const ScintillaBase &) { return *this; } protected: // Enumeration of commands and child windows enum { @@ -42,15 +45,17 @@ protected: virtual void RefreshColourPalette(Palette &pal, bool want); - virtual void AddChar(char ch); + virtual void AddCharUTF(char *s, unsigned int len); void Command(int cmdId); - virtual int KeyCommand(UINT iMessage); + virtual void CancelModes(); + virtual int KeyCommand(unsigned int iMessage); void AutoCompleteStart(int lenEntered, const char *list); void AutoCompleteCancel(); void AutoCompleteMove(int delta); void AutoCompleteChanged(char ch=0); - void AutoCompleteCompleted(); + void AutoCompleteCompleted(char fillUp='\0'); + void AutoCompleteMoveToCurrentWord(); virtual void CreateCallTipWindow(PRectangle rc) = 0; @@ -59,10 +64,10 @@ protected: virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); - virtual void NotifyStyleNeeded(int endStyleNeeded); + virtual void NotifyStyleToNeeded(int endStyleNeeded); public: // Public so scintilla_send_message can use it - virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam); + virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam); }; #endif diff --git a/src/stc/scintilla/src/Style.cxx b/src/stc/scintilla/src/Style.cxx index 56312314ff..0a52ed41a3 100644 --- a/src/stc/scintilla/src/Style.cxx +++ b/src/stc/scintilla/src/Style.cxx @@ -7,49 +7,111 @@ #include "Platform.h" +#include "Scintilla.h" #include "Style.h" Style::Style() { - Clear(); + aliasOfDefaultFont = true; + Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), + Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT, + false, false, false, false, true); +} + +Style::Style(const Style &source) { + Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), + 0, 0, 0, + false, false, false, false, true); + fore.desired = source.fore.desired; + back.desired = source.back.desired; + characterSet = source.characterSet; + bold = source.bold; + italic = source.italic; + size = source.size; + eolFilled = source.eolFilled; + underline = source.underline; + visible = source.visible; } Style::~Style() { - font.Release(); + if (aliasOfDefaultFont) + font.SetID(0); + else + font.Release(); + aliasOfDefaultFont = false; } Style &Style::operator=(const Style &source) { if (this == &source) return *this; - Clear(); + Clear(Colour(0,0,0), Colour(0xff,0xff,0xff), + 0, 0, SC_CHARSET_DEFAULT, + false, false, false, false, true); fore.desired = source.fore.desired; back.desired = source.back.desired; + characterSet = source.characterSet; bold = source.bold; italic = source.italic; size = source.size; - strcpy(fontName, source.fontName); eolFilled = source.eolFilled; + underline = source.underline; + visible = source.visible; return *this; } -void Style::Clear(Colour fore_, Colour back_, int size_, const char *fontName_, - bool bold_, bool italic_, bool eolFilled_) { +void Style::Clear(Colour fore_, Colour back_, int size_, + const char *fontName_, int characterSet_, + bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_) { fore.desired = fore_; back.desired = back_; + characterSet = characterSet_; bold = bold_; italic = italic_; size = size_; - strcpy(fontName, fontName_); + fontName = fontName_; eolFilled = eolFilled_; - font.Release(); + underline = underline_; + visible = visible_; + if (aliasOfDefaultFont) + font.SetID(0); + else + font.Release(); + aliasOfDefaultFont = false; } -void Style::Realise(Surface &surface, int zoomLevel) { +bool Style::EquivalentFontTo(const Style *other) const { + if (bold != other->bold || + italic != other->italic || + size != other->size || + characterSet != other->characterSet) + return false; + if (fontName == other->fontName) + return true; + if (!fontName) + return false; + if (!other->fontName) + return false; + return strcmp(fontName, other->fontName) == 0; +} + +void Style::Realise(Surface &surface, int zoomLevel, Style *defaultStyle) { int sizeZoomed = size + zoomLevel; if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1 sizeZoomed = 2; - - int deviceHeight = (sizeZoomed * surface.LogPixelsY()) / 72; - font.Create(fontName, deviceHeight, bold, italic); + + if (aliasOfDefaultFont) + font.SetID(0); + else + font.Release(); + int deviceHeight = surface.DeviceHeightFont(sizeZoomed); + aliasOfDefaultFont = defaultStyle && + (EquivalentFontTo(defaultStyle) || !fontName); + if (aliasOfDefaultFont) { + font.SetID(defaultStyle->font.GetID()); + } else if (fontName) { + font.Create(fontName, characterSet, deviceHeight, bold, italic); + } else { + font.SetID(0); + } ascent = surface.Ascent(font); descent = surface.Descent(font); diff --git a/src/stc/scintilla/src/Style.h b/src/stc/scintilla/src/Style.h index 916b646315..9a2b4586a3 100644 --- a/src/stc/scintilla/src/Style.h +++ b/src/stc/scintilla/src/Style.h @@ -10,11 +10,15 @@ class Style { public: ColourPair fore; ColourPair back; + bool aliasOfDefaultFont; bool bold; bool italic; int size; - char fontName[100]; + const char *fontName; + int characterSet; bool eolFilled; + bool underline; + bool visible; Font font; unsigned int lineHeight; @@ -25,13 +29,15 @@ public: unsigned int spaceWidth; Style(); + Style(const Style &source); ~Style(); Style &operator=(const Style &source); - void Clear(Colour fore_=Colour(0,0,0), Colour back_=Colour(0xff,0xff,0xff), - int size_=Platform::DefaultFontSize(), - const char *fontName_=Platform::DefaultFont(), - bool bold_=false, bool italic_=false, bool eolFilled_=false); - void Realise(Surface &surface, int zoomLevel); + void Clear(Colour fore_, Colour back_, + int size_, + const char *fontName_, int characterSet_, + bool bold_, bool italic_, bool eolFilled_, bool underline_, bool visible_); + bool EquivalentFontTo(const Style *other) const; + void Realise(Surface &surface, int zoomLevel, Style *defaultStyle=0); }; #endif diff --git a/src/stc/scintilla/src/UniConversion.cxx b/src/stc/scintilla/src/UniConversion.cxx new file mode 100644 index 0000000000..9306f307c2 --- /dev/null +++ b/src/stc/scintilla/src/UniConversion.cxx @@ -0,0 +1,77 @@ +// UniConversion.h - functions to handle UFT-8 and UCS-2 strings +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include + +#include "UniConversion.h" + +unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) { + unsigned int len = 0; + for (unsigned int i = 0; i < tlen && uptr[i]; i++) { + unsigned int uch = uptr[i]; + if (uch < 0x80) + len++; + else if (uch < 0x800) + len+=2; + else + len +=3; + } + return len; +} + +void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) { + int k = 0; + for (unsigned int i = 0; i < tlen && uptr[i]; i++) { + unsigned int uch = uptr[i]; + if (uch < 0x80) { + putf[k++] = static_cast(uch); + } else if (uch < 0x800) { + putf[k++] = static_cast(0xC0 | (uch >> 6)); + putf[k++] = static_cast(0x80 | (uch & 0x3f)); + } else { + putf[k++] = static_cast(0xE0 | (uch >> 12)); + putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); + putf[k++] = static_cast(0x80 | (uch & 0x3f)); + } + } + putf[len] = '\0'; +} + +unsigned int UCS2Length(const char *s, unsigned int len) { + unsigned int ulen = 0; + for (unsigned int i=0;i(s[i]); + if ((ch < 0x80) || (ch > (0x80 + 0x40))) + ulen++; + } + return ulen; +} + +unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen) { +#ifdef USE_API + return ::MultiByteToWideChar(CP_UTF8, 0, s, len, tbuf, tlen); +#else + unsigned int ui=0; + const unsigned char *us = reinterpret_cast(s); + unsigned int i=0; + while ((i((ch & 0x1F) << 6); + ch = us[i++]; + tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); + } else { + tbuf[ui] = static_cast((ch & 0xF) << 12); + ch = us[i++]; + tbuf[ui] = static_cast(tbuf[ui] + ((ch & 0x7F) << 6)); + ch = us[i++]; + tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); + } + ui++; + } + return ui; +#endif +} diff --git a/src/stc/scintilla/src/UniConversion.h b/src/stc/scintilla/src/UniConversion.h new file mode 100644 index 0000000000..cace497c48 --- /dev/null +++ b/src/stc/scintilla/src/UniConversion.h @@ -0,0 +1,9 @@ +// UniConversion.h - functions to handle UFT-8 and UCS-2 strings +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen); +void UTF8FromUCS2(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len); +unsigned int UCS2Length(const char *s, unsigned int len); +unsigned int UCS2FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen); + diff --git a/src/stc/scintilla/src/ViewStyle.cxx b/src/stc/scintilla/src/ViewStyle.cxx index 001ecdb319..9b7a8535e9 100644 --- a/src/stc/scintilla/src/ViewStyle.cxx +++ b/src/stc/scintilla/src/ViewStyle.cxx @@ -17,14 +17,46 @@ MarginStyle::MarginStyle() : symbol(false), width(16), mask(0xffffffff), sensitive(false) { } +// A list of the fontnames - avoids wasting space in each style +FontNames::FontNames() { + max = 0; +} + +FontNames::~FontNames() { + Clear(); +} + +void FontNames::Clear() { + for (int i=0;i +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "WindowAccessor.h" +#include "Scintilla.h" + +WindowAccessor::~WindowAccessor() { +} + +#if PLAT_WIN +bool WindowAccessor::InternalIsLeadByte(char ch) { + if (SC_CP_UTF8 == codePage) + // For lexing, all characters >= 0x80 are treated the + // same so none is considered a lead byte. + return false; + else + return IsDBCSLeadByteEx(codePage, ch); +} +#else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool WindowAccessor::InternalIsLeadByte(char) { + return false; +} +#endif + +void WindowAccessor::Fill(int position) { + if (lenDoc == -1) + lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); + startPos = position - slopSize; + if (startPos + bufferSize > lenDoc) + startPos = lenDoc - bufferSize; + if (startPos < 0) + startPos = 0; + endPos = startPos + bufferSize; + if (endPos > lenDoc) + endPos = lenDoc; + + TextRange tr = {{startPos, endPos}, buf}; + Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast(&tr)); +} + +char WindowAccessor::StyleAt(int position) { + return static_cast(Platform::SendScintilla( + id, SCI_GETSTYLEAT, position, 0)); +} + +int WindowAccessor::GetLine(int position) { + return Platform::SendScintilla(id, SCI_LINEFROMPOSITION, position, 0); +} + +int WindowAccessor::LineStart(int line) { + return Platform::SendScintilla(id, SCI_POSITIONFROMLINE, line, 0); +} + +int WindowAccessor::LevelAt(int line) { + return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0); +} + +int WindowAccessor::Length() { + if (lenDoc == -1) + lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); + return lenDoc; +} + +int WindowAccessor::GetLineState(int line) { + return Platform::SendScintilla(id, SCI_GETLINESTATE, line); +} + +int WindowAccessor::SetLineState(int line, int state) { + return Platform::SendScintilla(id, SCI_SETLINESTATE, line, state); +} + +void WindowAccessor::StartAt(unsigned int start, char chMask) { + Platform::SendScintilla(id, SCI_STARTSTYLING, start, chMask); +} + +void WindowAccessor::StartSegment(unsigned int pos) { + startSeg = pos; +} + +void WindowAccessor::ColourTo(unsigned int pos, int chAttr) { + // Only perform styling if non empty range + if (pos != startSeg - 1) { + if (pos < startSeg) { + Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos); + } + + if (validLen + (pos - startSeg + 1) >= bufferSize) + Flush(); + if (validLen + (pos - startSeg + 1) >= bufferSize) { + // Too big for buffer so send directly + Platform::SendScintilla(id, SCI_SETSTYLING, pos - startSeg + 1, chAttr); + } else { + if (chAttr != chWhile) + chFlags = 0; + chAttr |= chFlags; + for (unsigned int i = startSeg; i <= pos; i++) { + styleBuf[validLen++] = static_cast(chAttr); + } + } + } + startSeg = pos+1; +} + +void WindowAccessor::SetLevel(int line, int level) { + Platform::SendScintilla(id, SCI_SETFOLDLEVEL, line, level); +} + +void WindowAccessor::Flush() { + startPos = extremePosition; + lenDoc = -1; + if (validLen > 0) { + Platform::SendScintilla(id, SCI_SETSTYLINGEX, validLen, + reinterpret_cast(styleBuf)); + validLen = 0; + } +} + +int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { + int end = Length(); + int spaceFlags = 0; + + // Determines the indentation level of the current line and also checks for consistent + // indentation compared to the previous line. + // Indentation is judged consistent when the indentation whitespace of each line lines + // the same or the indentation of one line is a prefix of the other. + + int pos = LineStart(line); + char ch = (*this)[pos]; + int indent = 0; + bool inPrevPrefix = line > 0; + int posPrev = inPrevPrefix ? LineStart(line-1) : 0; + while ((ch == ' ' || ch == '\t') && (pos < end)) { + if (inPrevPrefix) { + char chPrev = (*this)[posPrev++]; + if (chPrev == ' ' || chPrev == '\t') { + if (chPrev != ch) + spaceFlags |= wsInconsistent; + } else { + inPrevPrefix = false; + } + } + if (ch == ' ') { + spaceFlags |= wsSpace; + indent++; + } else { // Tab + spaceFlags |= wsTab; + if (spaceFlags & wsSpace) + spaceFlags |= wsSpaceTab; + indent = (indent / 8 + 1) * 8; + } + ch = (*this)[++pos]; + } + + *flags = spaceFlags; + indent += SC_FOLDLEVELBASE; + // if completely empty line or the start of a comment... + if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) + return indent | SC_FOLDLEVELWHITEFLAG; + else + return indent; +} + diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index e85c952886..311378fe58 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -5,7 +5,7 @@ // derive directly from the Scintilla classes, but instead // delegates most things to the real Scintilla class. // This allows the use of Scintilla without polluting the -// namespace with all the classes and itentifiers from Scintilla. +// namespace with all the classes and identifiers from Scintilla. // // Author: Robin Dunn // @@ -15,11 +15,53 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +#include + #include "wx/stc/stc.h" #include "ScintillaWX.h" #include +// The following code forces a reference to all of the Scintilla lexers. +// If we don't do something like this, then the linker tends to "optimize" +// them away. (eric@sourcegear.com) + +int wxForceScintillaLexers(void) +{ + extern LexerModule lmCPP; + extern LexerModule lmHTML; + extern LexerModule lmXML; + extern LexerModule lmProps; + extern LexerModule lmErrorList; + extern LexerModule lmMake; + extern LexerModule lmBatch; + extern LexerModule lmPerl; + extern LexerModule lmPython; + extern LexerModule lmSQL; + extern LexerModule lmVB; + + if ( + &lmCPP + && &lmHTML + && &lmXML + && &lmProps + && &lmErrorList + && &lmMake + && &lmBatch + && &lmPerl + && &lmPython + && &lmSQL + && &lmVB + ) + { + return 1; + } + else + { + return 0; + } +} + //---------------------------------------------------------------------- const wxChar* wxSTCNameStr = "stcwindow"; @@ -33,13 +75,19 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp) EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp) EVT_CHAR (wxStyledTextCtrl::OnChar) + EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown) EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus) EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus) EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged) EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground) EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu) + EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox) END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent) + //---------------------------------------------------------------------- // Constructor and Destructor @@ -50,556 +98,32 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent, long style, const wxString& name) : wxControl(parent, id, pos, size, - style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS, + style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN, wxDefaultValidator, name) { m_swx = new ScintillaWX(this); - // m_keywords = new WordList; m_stopWatch.Start(); - m_readOnly = false; - m_undoType = wxSTC_UndoCollectAutoStart; } wxStyledTextCtrl::~wxStyledTextCtrl() { delete m_swx; - // delete m_keywords; } //---------------------------------------------------------------------- -inline long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { +long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { return m_swx->WndProc(msg, wp, lp); } -//---------------------------------------------------------------------- -// Text retrieval and modification +#ifdef MAKELONG +#undef MAKELONG +#endif -wxString wxStyledTextCtrl::GetText() { - wxString text; - int len = GetTextLength(); - char* buff = text.GetWriteBuf(len); - - SendMsg(WM_GETTEXT, len, (long)buff); - text.UngetWriteBuf(); - return text; -} - - -bool wxStyledTextCtrl::SetText(const wxString& text) { - return SendMsg(WM_SETTEXT, 0, (long)text.c_str()) != 0; -} - - -wxString wxStyledTextCtrl::GetLine(int line) { - wxString text; - int len = GetLineLength(line); - char* buff = text.GetWriteBuf(len+1); - - *((WORD*)buff) = len+1; - SendMsg(EM_GETLINE, line, (long)buff); - text.UngetWriteBuf(); - return text; -} - - -void wxStyledTextCtrl::ReplaceSelection(const wxString& text) { - SendMsg(EM_REPLACESEL, 0, (long)text.c_str()); -} - - -void wxStyledTextCtrl::SetReadOnly(bool readOnly) { - SendMsg(EM_SETREADONLY, (long)readOnly); - m_readOnly = readOnly; -} - - -bool wxStyledTextCtrl::GetReadOnly() { - // TODO: need support in Scintilla to do this right, - // until then we'll track it ourselves - return m_readOnly; -} - - -void wxStyledTextCtrl::GetTextRange(int startPos, int endPos, char* buff) { - TEXTRANGE tr; - tr.lpstrText = buff; - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - SendMsg(EM_GETTEXTRANGE, 0, (long)&tr); -} - - -wxString wxStyledTextCtrl::GetTextRange(int startPos, int endPos) { - wxString text; - int len = endPos - startPos; - char* buff = text.GetWriteBuf(len); - GetTextRange(startPos, endPos, buff); - text.UngetWriteBuf(); - return text; -} - - -void wxStyledTextCtrl::GetStyledTextRange(int startPos, int endPos, char* buff) { - TEXTRANGE tr; - tr.lpstrText = buff; - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - SendMsg(SCI_GETSTYLEDTEXT, 0, (long)&tr); -} - - -wxString wxStyledTextCtrl::GetStyledTextRange(int startPos, int endPos) { - wxString text; - int len = endPos - startPos; - char* buff = text.GetWriteBuf(len*2); - GetStyledTextRange(startPos, endPos, buff); - text.UngetWriteBuf(len*2); - return text; -} - - -void wxStyledTextCtrl::AddText(const wxString& text) { - SendMsg(SCI_ADDTEXT, text.Len(), (long)text.c_str()); -} - - -void wxStyledTextCtrl::AddStyledText(const wxString& text) { - SendMsg(SCI_ADDSTYLEDTEXT, text.Len(), (long)text.c_str()); -} - - -void wxStyledTextCtrl::InsertText(int pos, const wxString& text) { - SendMsg(SCI_INSERTTEXT, pos, (long)text.c_str()); -} - - -void wxStyledTextCtrl::ClearAll() { - SendMsg(SCI_CLEARALL); -} - - -char wxStyledTextCtrl::GetCharAt(int pos) { - return SendMsg(SCI_GETCHARAT, pos); -} - - -char wxStyledTextCtrl::GetStyleAt(int pos) { - return SendMsg(SCI_GETSTYLEAT, pos); -} - - -void wxStyledTextCtrl::SetStyleBits(int bits) { - SendMsg(SCI_SETSTYLEBITS, bits); -} - - -int wxStyledTextCtrl::GetStyleBits() { - return SendMsg(SCI_GETSTYLEBITS); -} - - -//---------------------------------------------------------------------- -// Clipboard - - -void wxStyledTextCtrl::Cut() { - SendMsg(WM_CUT); -} - - -void wxStyledTextCtrl::Copy() { - SendMsg(WM_COPY); -} - - -void wxStyledTextCtrl::Paste() { - SendMsg(WM_PASTE); -} - - -bool wxStyledTextCtrl::CanPaste() { - return SendMsg(EM_CANPASTE) != 0; -} - - -void wxStyledTextCtrl::ClearClipbrd() { - SendMsg(WM_CLEAR); -} - - - -//---------------------------------------------------------------------- -// Undo and Redo - -void wxStyledTextCtrl::Undo() { - SendMsg(WM_UNDO); -} - - -bool wxStyledTextCtrl::CanUndo() { - return SendMsg(EM_CANUNDO) != 0; -} - - -void wxStyledTextCtrl::EmptyUndoBuffer() { - SendMsg(EM_EMPTYUNDOBUFFER); -} - - -void wxStyledTextCtrl::Redo() { - SendMsg(SCI_REDO); -} - - -bool wxStyledTextCtrl::CanRedo() { - return SendMsg(SCI_CANREDO) != 0; -} - - -void wxStyledTextCtrl::SetUndoCollection(wxSTC_UndoType type) { - SendMsg(SCI_SETUNDOCOLLECTION, type); - m_undoType = type; -} - - -wxSTC_UndoType wxStyledTextCtrl::GetUndoCollection() { - // TODO: need support in Scintilla to do this right, - // until then we'll track it ourselves - return m_undoType; -} - - -void wxStyledTextCtrl::BeginUndoAction() { - SendMsg(SCI_BEGINUNDOACTION); -} - - -void wxStyledTextCtrl::EndUndoAction() { - SendMsg(SCI_ENDUNDOACTION); -} - - - - -//---------------------------------------------------------------------- -// Selection and information - - -void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) { - SendMsg(EM_GETSEL, (long)startPos, (long)endPos); -} - - -void wxStyledTextCtrl::SetSelection(int startPos, int endPos) { - SendMsg(EM_SETSEL, startPos, endPos); -} - - -wxString wxStyledTextCtrl::GetSelectedText() { - wxString text; - int start; - int end; - - GetSelection(&start, &end); - int len = end - start; - char* buff = text.GetWriteBuf(len); - - SendMsg(EM_GETSELTEXT, 0, (long)buff); - text.UngetWriteBuf(); - return text; -} - - -void wxStyledTextCtrl::HideSelection(bool hide) { - SendMsg(EM_HIDESELECTION, hide); -} - - -bool wxStyledTextCtrl::GetHideSelection() { - return m_swx->GetHideSelection(); -} - - -int wxStyledTextCtrl::GetTextLength() { - return SendMsg(WM_GETTEXTLENGTH); -} - - -int wxStyledTextCtrl::GetFirstVisibleLine() { - return SendMsg(EM_GETFIRSTVISIBLELINE); -} - - -int wxStyledTextCtrl::GetLineCount() { - return SendMsg(EM_GETLINECOUNT); -} - - -bool wxStyledTextCtrl::GetModified() { - return SendMsg(EM_GETMODIFY) != 0; -} - - -wxRect wxStyledTextCtrl::GetRect() { - PRectangle pr; - SendMsg(EM_GETRECT, 0, (long)&pr); - - wxRect rect = wxRectFromPRectangle(pr); - return rect; -} - - -int wxStyledTextCtrl::GetLineFromPos(int pos) { - return SendMsg(EM_LINEFROMCHAR, pos); -} - - -int wxStyledTextCtrl::GetLineStartPos(int line) { - return SendMsg(EM_LINEINDEX, line); -} - - -int wxStyledTextCtrl::GetLineLengthAtPos(int pos) { - return SendMsg(EM_LINELENGTH, pos); -} - - -int wxStyledTextCtrl::GetLineLength(int line) { - return SendMsg(SCI_LINELENGTH, line); -} - - -int wxStyledTextCtrl::GetCurrentLine() { - int line = GetLineFromPos(GetCurrentPos()); - return line; -} - - -wxString wxStyledTextCtrl::GetCurrentLineText(int* linePos) { - wxString text; - int len = GetLineLength(GetCurrentLine()); - char* buff = text.GetWriteBuf(len+1); - - int pos = SendMsg(SCI_GETCURLINE, len+1, (long)buff); - text.UngetWriteBuf(); - - if (linePos) - *linePos = pos; - - return text; -} - - -int wxStyledTextCtrl::PositionFromPoint(wxPoint pt) { - Point spt(pt.x, pt.y); - long rv = SendMsg(EM_CHARFROMPOS, 0, (long)&spt); - return LOWORD(rv); -} - - -int wxStyledTextCtrl::LineFromPoint(wxPoint pt) { - Point spt(pt.x, pt.y); - long rv = SendMsg(EM_CHARFROMPOS, 0, (long)&spt); - return HIWORD(rv); -} - - -wxPoint wxStyledTextCtrl::PointFromPosition(int pos) { - Point pt; - SendMsg(EM_POSFROMCHAR, pos, (long)&pt); - return wxPoint(pt.x, pt.y); -} - - -int wxStyledTextCtrl::GetCurrentPos() { - return SendMsg(SCI_GETCURRENTPOS); -} - - -int wxStyledTextCtrl::GetAnchor() { - return SendMsg(SCI_GETANCHOR); -} - - -void wxStyledTextCtrl::SelectAll() { - SendMsg(SCI_SELECTALL); -} - - -void wxStyledTextCtrl::SetCurrentPosition(int pos) { - SendMsg(SCI_GOTOPOS, pos); -} - - -void wxStyledTextCtrl::SetAnchor(int pos) { - SendMsg(SCI_SETANCHOR, pos); -} - - -void wxStyledTextCtrl::GotoPos(int pos) { - SendMsg(SCI_GOTOPOS, pos); -} - - -void wxStyledTextCtrl::GotoLine(int line) { - SendMsg(SCI_GOTOLINE, line); -} - - -void wxStyledTextCtrl::ChangePosition(int delta, bool extendSelection) { - // TODO: Is documented but doesn't seem to be implemented - //SendMsg(SCI_CHANGEPOSITION, delta, extendSelection); -} - - -void wxStyledTextCtrl::PageMove(int cmdKey, bool extendSelection) { - // TODO: Is documented but doesn't seem to be implemented - //SendMsg(SCI_PAGEMOVE, cmdKey, extendSelection); -} - - -void wxStyledTextCtrl::ScrollBy(int columnDelta, int lineDelta) { - SendMsg(EM_LINESCROLL, columnDelta, lineDelta); -} - -void wxStyledTextCtrl::ScrollToLine(int line) { - m_swx->DoScrollToLine(line); -} - - -void wxStyledTextCtrl::ScrollToColumn(int column) { - m_swx->DoScrollToColumn(column); -} - - -void wxStyledTextCtrl::EnsureCaretVisible() { - SendMsg(EM_SCROLLCARET); -} - - -void wxStyledTextCtrl::SetCaretPolicy(int policy, int slop) { - SendMsg(SCI_SETCARETPOLICY, policy, slop); -} - - -int wxStyledTextCtrl::GetSelectionType() { - return SendMsg(EM_SELECTIONTYPE); -} - - - - -//---------------------------------------------------------------------- -// Searching - -int wxStyledTextCtrl::FindText(int minPos, int maxPos, - const wxString& text, - bool caseSensitive, bool wholeWord) { - FINDTEXTEX ft; - int flags = 0; - - flags |= caseSensitive ? FR_MATCHCASE : 0; - flags |= wholeWord ? FR_WHOLEWORD : 0; - ft.chrg.cpMin = minPos; - ft.chrg.cpMax = maxPos; - ft.lpstrText = (char*)text.c_str(); - - return SendMsg(EM_FINDTEXT, flags, (long)&ft); -} - - -void wxStyledTextCtrl::SearchAnchor() { - SendMsg(SCI_SEARCHANCHOR); -} - - -int wxStyledTextCtrl::SearchNext(const wxString& text, bool caseSensitive, bool wholeWord) { - int flags = 0; - flags |= caseSensitive ? FR_MATCHCASE : 0; - flags |= wholeWord ? FR_WHOLEWORD : 0; - - return SendMsg(SCI_SEARCHNEXT, flags, (long)text.c_str()); -} - - -int wxStyledTextCtrl::SearchPrev(const wxString& text, bool caseSensitive, bool wholeWord) { - int flags = 0; - flags |= caseSensitive ? FR_MATCHCASE : 0; - flags |= wholeWord ? FR_WHOLEWORD : 0; - - return SendMsg(SCI_SEARCHPREV, flags, (long)text.c_str()); -} - -//---------------------------------------------------------------------- -// Visible whitespace - - -bool wxStyledTextCtrl::GetViewWhitespace() { - return SendMsg(SCI_GETVIEWWS) != 0; -} - - -void wxStyledTextCtrl::SetViewWhitespace(bool visible) { - SendMsg(SCI_SETVIEWWS, visible); -} - - - -//---------------------------------------------------------------------- -// Line endings - -wxSTC_EOL wxStyledTextCtrl::GetEOLMode() { - return (wxSTC_EOL)SendMsg(SCI_GETEOLMODE); -} - - -void wxStyledTextCtrl::SetEOLMode(wxSTC_EOL mode) { - SendMsg(SCI_SETEOLMODE, mode); -} - - -bool wxStyledTextCtrl::GetViewEOL() { - return SendMsg(SCI_GETVIEWEOL) != 0; -} - - -void wxStyledTextCtrl::SetViewEOL(bool visible) { - SendMsg(SCI_SETVIEWEOL, visible); -} - -void wxStyledTextCtrl::ConvertEOL(wxSTC_EOL mode) { - SendMsg(SCI_CONVERTEOLS, mode); -} - -//---------------------------------------------------------------------- -// Styling - -int wxStyledTextCtrl::GetEndStyled() { - return SendMsg(SCI_GETENDSTYLED); -} - - -void wxStyledTextCtrl::StartStyling(int pos, int mask) { - SendMsg(SCI_STARTSTYLING, pos, mask); -} - - -void wxStyledTextCtrl::SetStyleFor(int length, int style) { - SendMsg(SCI_SETSTYLING, length, style); -} - - -void wxStyledTextCtrl::SetStyleBytes(int length, char* styleBytes) { - SendMsg(SCI_SETSTYLINGEX, length, (long)styleBytes); -} - - -//---------------------------------------------------------------------- -// Style Definition +#define MAKELONG(a, b) ((a) | ((b) << 16)) static long wxColourAsLong(const wxColour& co) { @@ -625,15 +149,1228 @@ static wxColour wxColourFromSpec(const wxString& spec) { } +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py from the contents of Scintilla.iface. Do not edit +// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate. + + +// Add text to the document +void wxStyledTextCtrl::AddText(const wxString& text) { + SendMsg(2001, text.Len(), (long)text.c_str()); +} + +// Add array of cells to document +void wxStyledTextCtrl::AddStyledText(const wxString& text) { + SendMsg(2002, text.Len(), (long)text.c_str()); +} + +// Insert string at a position +void wxStyledTextCtrl::InsertText(int pos, const wxString& text) { + SendMsg(2003, pos, (long)text.c_str()); +} + +// Delete all text in the document +void wxStyledTextCtrl::ClearAll() { + SendMsg(2004, 0, 0); +} + +// Set all style bytes to 0, remove all folding information +void wxStyledTextCtrl::ClearDocumentStyle() { + SendMsg(2005, 0, 0); +} + +// The number of characters in the document +int wxStyledTextCtrl::GetLength() { + return SendMsg(2006, 0, 0); +} + +// Returns the character byte at the position +int wxStyledTextCtrl::GetCharAt(int pos) { + return SendMsg(2007, pos, 0); +} + +// Returns the position of the caret +int wxStyledTextCtrl::GetCurrentPos() { + return SendMsg(2008, 0, 0); +} + +// Returns the position of the opposite end of the selection to the caret +int wxStyledTextCtrl::GetAnchor() { + return SendMsg(2009, 0, 0); +} + +// Returns the style byte at the position +int wxStyledTextCtrl::GetStyleAt(int pos) { + return SendMsg(2010, pos, 0); +} + +// Redoes the next action on the undo history +void wxStyledTextCtrl::Redo() { + SendMsg(2011, 0, 0); +} + +// Choose between collecting actions into the undo +// history and discarding them. +void wxStyledTextCtrl::SetUndoCollection(bool collectUndo) { + SendMsg(2012, collectUndo, 0); +} + +// Select all the text in the document. +void wxStyledTextCtrl::SelectAll() { + SendMsg(2013, 0, 0); +} + +// Remember the current position in the undo history as the position +// at which the document was saved. +void wxStyledTextCtrl::SetSavePoint() { + SendMsg(2014, 0, 0); +} + +// Retrieve a buffer of cells. +wxString wxStyledTextCtrl::GetStyledText(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + TextRange tr; + tr.lpstrText = text.GetWriteBuf(len*2+1); + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + SendMsg(2015, 0, (long)&tr); + text.UngetWriteBuf(len*2); + return text; +} + +// Are there any redoable actions in the undo history. +bool wxStyledTextCtrl::CanRedo() { + return SendMsg(2016, 0, 0) != 0; +} + +// Retrieve the line number at which a particular marker is located +int wxStyledTextCtrl::MarkerLineFromHandle(int handle) { + return SendMsg(2017, handle, 0); +} + +// Delete a marker. +void wxStyledTextCtrl::MarkerDeleteHandle(int handle) { + SendMsg(2018, handle, 0); +} + +// Is undo history being collected? +bool wxStyledTextCtrl::GetUndoCollection() { + return SendMsg(2019, 0, 0) != 0; +} + +// Are white space characters currently visible? +// Returns one of SCWS_* constants. +int wxStyledTextCtrl::GetViewWhiteSpace() { + return SendMsg(2020, 0, 0); +} + +// Make white space characters invisible, always visible or visible outside indentation. +void wxStyledTextCtrl::SetViewWhiteSpace(int viewWS) { + SendMsg(2021, viewWS, 0); +} + +// Find the position from a point within the window. +int wxStyledTextCtrl::PositionFromPoint(wxPoint pt) { + return SendMsg(2022, pt.x, pt.y); +} + +// Set caret to start of a line and ensure it is visible. +void wxStyledTextCtrl::GotoLine(int line) { + SendMsg(2024, line, 0); +} + +// Set caret to a position and ensure it is visible. +void wxStyledTextCtrl::GotoPos(int pos) { + SendMsg(2025, pos, 0); +} + +// Set the selection anchor to a position. The anchor is the opposite +// end of the selection from the caret. +void wxStyledTextCtrl::SetAnchor(int posAnchor) { + SendMsg(2026, posAnchor, 0); +} + +// Retrieve the text of the line containing the caret. +// Returns the index of the caret on the line. +wxString wxStyledTextCtrl::GetCurLine(int* linePos) { + wxString text; + int len = LineLength(GetCurrentLine()); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(2027, len, (long)buf); + text.UngetWriteBuf(); + if (linePos) *linePos = pos; + + return text; +} + +// Retrieve the position of the last correctly styled character. +int wxStyledTextCtrl::GetEndStyled() { + return SendMsg(2028, 0, 0); +} + +// Convert all line endings in the document to use the current mode. +void wxStyledTextCtrl::ConvertEOLs() { + SendMsg(2029, 0, 0); +} + +// Retrieve the current end of line mode - one of CRLF, CR, or LF. +int wxStyledTextCtrl::GetEOLMode() { + return SendMsg(2030, 0, 0); +} + +// Set the current end of line mode. +void wxStyledTextCtrl::SetEOLMode(int eolMode) { + SendMsg(2031, eolMode, 0); +} + +// Set the current styling position to pos and the styling mask to mask. +// The styling mask can be used to protect some bits in each styling byte from +// modification. +void wxStyledTextCtrl::StartStyling(int pos, int mask) { + SendMsg(2032, pos, mask); +} + +// Change style from current styling position for length characters to a style +// and move the current styling position to after this newly styled segment. +void wxStyledTextCtrl::SetStyling(int length, int style) { + SendMsg(2033, length, style); +} + +// Is drawing done first into a buffer or direct to the screen. +bool wxStyledTextCtrl::GetBufferedDraw() { + return SendMsg(2034, 0, 0) != 0; +} + +// If drawing is buffered then each line of text is drawn into a bitmap buffer +// before drawing it to the screen to avoid flicker. +void wxStyledTextCtrl::SetBufferedDraw(bool buffered) { + SendMsg(2035, buffered, 0); +} + +// Change the visible size of a tab to be a multiple of the width of a space +// character. +void wxStyledTextCtrl::SetTabWidth(int tabWidth) { + SendMsg(2036, tabWidth, 0); +} + +// Retrieve the visible size of a tab. +int wxStyledTextCtrl::GetTabWidth() { + return SendMsg(2121, 0, 0); +} + +// Set the code page used to interpret the bytes of the document as characters. +// The SC_CP_UTF8 value can be used to enter Unicode mode. +void wxStyledTextCtrl::SetCodePage(int codePage) { + SendMsg(2037, codePage, 0); +} + +// Set the symbol used for a particular marker number, +// and optionally the for and background colours. +void wxStyledTextCtrl::MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground, + const wxColour& background) { + + SendMsg(2040, markerNumber, markerSymbol); + if (foreground.Ok()) + MarkerSetForeground(markerNumber, foreground); + if (background.Ok()) + MarkerSetBackground(markerNumber, background); +} + +// Set the foreground colour used for a particular marker number. +void wxStyledTextCtrl::MarkerSetForeground(int markerNumber, const wxColour& fore) { + SendMsg(2041, markerNumber, wxColourAsLong(fore)); +} + +// Set the background colour used for a particular marker number. +void wxStyledTextCtrl::MarkerSetBackground(int markerNumber, const wxColour& back) { + SendMsg(2042, markerNumber, wxColourAsLong(back)); +} + +// Add a marker to a line. +void wxStyledTextCtrl::MarkerAdd(int line, int markerNumber) { + SendMsg(2043, line, markerNumber); +} + +// Delete a marker from a line +void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) { + SendMsg(2044, line, markerNumber); +} + +// Delete all markers with a particular number from all lines +void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) { + SendMsg(2045, markerNumber, 0); +} + +// Get a bit mask of all the markers set on a line. +int wxStyledTextCtrl::MarkerGet(int line) { + return SendMsg(2046, line, 0); +} + +// Find the next line after lineStart that includes a marker in mask. +int wxStyledTextCtrl::MarkerNext(int lineStart, int markerMask) { + return SendMsg(2047, lineStart, markerMask); +} + +// Find the previous line before lineStart that includes a marker in mask. +int wxStyledTextCtrl::MarkerPrevious(int lineStart, int markerMask) { + return SendMsg(2048, lineStart, markerMask); +} + +// Set a margin to be either numeric or symbolic. +void wxStyledTextCtrl::SetMarginType(int margin, int marginType) { + SendMsg(2240, margin, marginType); +} + +// Retrieve the type of a margin. +int wxStyledTextCtrl::GetMarginType(int margin) { + return SendMsg(2241, margin, 0); +} + +// Set the width of a margin to a width expressed in pixels. +void wxStyledTextCtrl::SetMarginWidth(int margin, int pixelWidth) { + SendMsg(2242, margin, pixelWidth); +} + +// Retrieve the width of a margin in pixels. +int wxStyledTextCtrl::GetMarginWidth(int margin) { + return SendMsg(2243, margin, 0); +} + +// Set a mask that determines which markers are displayed in a margin. +void wxStyledTextCtrl::SetMarginMask(int margin, int mask) { + SendMsg(2244, margin, mask); +} + +// Retrieve the marker mask of a margin. +int wxStyledTextCtrl::GetMarginMask(int margin) { + return SendMsg(2245, margin, 0); +} + +// Make a margin sensitive or insensitive to mouse clicks. +void wxStyledTextCtrl::SetMarginSensitive(int margin, bool sensitive) { + SendMsg(2246, margin, sensitive); +} + +// Retrieve the mouse click sensitivity of a margin. +bool wxStyledTextCtrl::GetMarginSensitive(int margin) { + return SendMsg(2247, margin, 0) != 0; +} + +// Clear all the styles and make equivalent to the global default style. void wxStyledTextCtrl::StyleClearAll() { - SendMsg(SCI_STYLECLEARALL); + SendMsg(2050, 0, 0); } +// Set the foreground colour of a style. +void wxStyledTextCtrl::StyleSetForeground(int style, const wxColour& fore) { + SendMsg(2051, style, wxColourAsLong(fore)); +} +// Set the background colour of a style. +void wxStyledTextCtrl::StyleSetBackground(int style, const wxColour& back) { + SendMsg(2052, style, wxColourAsLong(back)); +} + +// Set a style to be bold or not. +void wxStyledTextCtrl::StyleSetBold(int style, bool bold) { + SendMsg(2053, style, bold); +} + +// Set a style to be italic or not. +void wxStyledTextCtrl::StyleSetItalic(int style, bool italic) { + SendMsg(2054, style, italic); +} + +// Set the size of characters of a style. +void wxStyledTextCtrl::StyleSetSize(int style, int sizePoints) { + SendMsg(2055, style, sizePoints); +} + +// Set the font of a style. +void wxStyledTextCtrl::StyleSetFaceName(int style, const wxString& fontName) { + SendMsg(2056, style, (long)fontName.c_str()); +} + +// Set a style to have its end of line filled or not. +void wxStyledTextCtrl::StyleSetEOLFilled(int style, bool filled) { + SendMsg(2057, style, filled); +} + +// Reset the default style to its state at startup void wxStyledTextCtrl::StyleResetDefault() { - SendMsg(SCI_STYLERESETDEFAULT); + SendMsg(2058, 0, 0); } +// Set a style to be underlined or not. +void wxStyledTextCtrl::StyleSetUnderline(int style, bool underline) { + SendMsg(2059, style, underline); +} + +// Set the foreground colour of the selection and whether to use this setting. +void wxStyledTextCtrl::SetSelForeground(bool useSetting, const wxColour& fore) { + SendMsg(2067, useSetting, wxColourAsLong(fore)); +} + +// Set the background colour of the selection and whether to use this setting. +void wxStyledTextCtrl::SetSelBackground(bool useSetting, const wxColour& back) { + SendMsg(2068, useSetting, wxColourAsLong(back)); +} + +// Set the foreground colour of the caret. +void wxStyledTextCtrl::SetCaretForeground(const wxColour& fore) { + SendMsg(2069, wxColourAsLong(fore), 0); +} + +// When key+modifier combination km is pressed perform msg. +void wxStyledTextCtrl::CmdKeyAssign(int key, int modifiers, int cmd) { + SendMsg(2070, MAKELONG(key, modifiers), cmd); +} + +// When key+modifier combination km do nothing. +void wxStyledTextCtrl::CmdKeyClear(int key, int modifiers) { + SendMsg(2071, MAKELONG(key, modifiers)); +} + +// Drop all key mappings. +void wxStyledTextCtrl::CmdKeyClearAll() { + SendMsg(2072, 0, 0); +} + +// Set the styles for a segment of the document. +void wxStyledTextCtrl::SetStyleBytes(int length, char* styleBytes) { + SendMsg(2073, length, (long)styleBytes); +} + +// Set a style to be visible or not. +void wxStyledTextCtrl::StyleSetVisible(int style, bool visible) { + SendMsg(2074, style, visible); +} + +// Get the time in milliseconds that the caret is on and off. +int wxStyledTextCtrl::GetCaretPeriod() { + return SendMsg(2075, 0, 0); +} + +// Get the time in milliseconds that the caret is on and off. 0 = steady on. +void wxStyledTextCtrl::SetCaretPeriod(int periodMilliseconds) { + SendMsg(2076, periodMilliseconds, 0); +} + +// Set the set of characters making up words for when moving or selecting +// by word. +void wxStyledTextCtrl::SetWordChars(const wxString& characters) { + SendMsg(2077, 0, (long)characters.c_str()); +} + +// Start a sequence of actions that is undone and redone as a unit. +// May be nested. +void wxStyledTextCtrl::BeginUndoAction() { + SendMsg(2078, 0, 0); +} + +// End a sequence of actions that is undone and redone as a unit. +void wxStyledTextCtrl::EndUndoAction() { + SendMsg(2079, 0, 0); +} + +// Set an indicator to plain, squiggle or TT. +void wxStyledTextCtrl::IndicatorSetStyle(int indic, int style) { + SendMsg(2080, indic, style); +} + +// Retrieve the style of an indicator. +int wxStyledTextCtrl::IndicatorGetStyle(int indic) { + return SendMsg(2081, indic, 0); +} + +// Set the foreground colour of an indicator. +void wxStyledTextCtrl::IndicatorSetForeground(int indic, const wxColour& fore) { + SendMsg(2082, indic, wxColourAsLong(fore)); +} + +// Retrieve the foreground colour of an indicator. +wxColour wxStyledTextCtrl::IndicatorGetForeground(int indic) { + long c = SendMsg(2083, indic, 0); + return wxColourFromLong(c); +} + +// Divide each styling byte into lexical class bits (default:5) and indicator +// bits (default:3). If a lexer requires more than 32 lexical states, then this +// is used to expand the possible states. +void wxStyledTextCtrl::SetStyleBits(int bits) { + SendMsg(2090, bits, 0); +} + +// Retrieve number of bits in style bytes used to hold the lexical state. +int wxStyledTextCtrl::GetStyleBits() { + return SendMsg(2091, 0, 0); +} + +// Used to hold extra styling information for each line. +void wxStyledTextCtrl::SetLineState(int line, int state) { + SendMsg(2092, line, state); +} + +// Retrieve the extra styling information for a line. +int wxStyledTextCtrl::GetLineState(int line) { + return SendMsg(2093, line, 0); +} + +// Retrieve the last line number that has line state. +int wxStyledTextCtrl::GetMaxLineState() { + return SendMsg(2094, 0, 0); +} + +// Display a auto-completion list. +// The lenEntered parameter indicates how many characters before +// the caret should be used to provide context. +void wxStyledTextCtrl::AutoCompShow(int lenEntered, const wxString& itemList) { + SendMsg(2100, lenEntered, (long)itemList.c_str()); +} + +// Remove the auto-completion list from the screen. +void wxStyledTextCtrl::AutoCompCancel() { + SendMsg(2101, 0, 0); +} + +// Is there an auto-completion list visible? +bool wxStyledTextCtrl::AutoCompActive() { + return SendMsg(2102, 0, 0) != 0; +} + +// Retrieve the position of the caret when the auto-completion list was +// displayed. +int wxStyledTextCtrl::AutoCompPosStart() { + return SendMsg(2103, 0, 0); +} + +// User has selected an item so remove the list and insert the selection. +void wxStyledTextCtrl::AutoCompComplete() { + SendMsg(2104, 0, 0); +} + +// Define a set of character that when typed cancel the auto-completion list. +void wxStyledTextCtrl::AutoCompStops(const wxString& characterSet) { + SendMsg(2105, 0, (long)characterSet.c_str()); +} + +// Change the separator character in the string setting up an auto-completion +// list. Default is space but can be changed if items contain space. +void wxStyledTextCtrl::AutoCompSetSeparator(int separatorCharacter) { + SendMsg(2106, separatorCharacter, 0); +} + +// Retrieve the auto-completion list separator character. +int wxStyledTextCtrl::AutoCompGetSeparator() { + return SendMsg(2107, 0, 0); +} + +// Select the item in the auto-completion list that starts with a string. +void wxStyledTextCtrl::AutoCompSelect(const wxString& text) { + SendMsg(2108, 0, (long)text.c_str()); +} + +// Should the auto-completion list be cancelled if the user backspaces to a +// position before where the box was created. +void wxStyledTextCtrl::AutoCompSetCancelAtStart(bool cancel) { + SendMsg(2110, cancel, 0); +} + +// Retrieve whether auto-completion cancelled by backspacing before start. +bool wxStyledTextCtrl::AutoCompGetCancelAtStart() { + return SendMsg(2111, 0, 0) != 0; +} + +// Define a set of character that when typed fills up the selected word. +void wxStyledTextCtrl::AutoCompSetFillUps(const wxString& characterSet) { + SendMsg(2112, 0, (long)characterSet.c_str()); +} + +// Should a single item auto-completion list automatically choose the item. +void wxStyledTextCtrl::AutoCompSetChooseSingle(bool chooseSingle) { + SendMsg(2113, chooseSingle, 0); +} + +// Retrieve whether a single item auto-completion list automatically choose the item. +bool wxStyledTextCtrl::AutoCompGetChooseSingle() { + return SendMsg(2114, 0, 0) != 0; +} + +// Set whether case is significant when performing auto-completion searches. +void wxStyledTextCtrl::AutoCompSetIgnoreCase(bool ignoreCase) { + SendMsg(2115, ignoreCase, 0); +} + +// Retrieve state of ignore case flag. +bool wxStyledTextCtrl::AutoCompGetIgnoreCase() { + return SendMsg(2116, 0, 0) != 0; +} + +// Set the number of spaces used for one level of indentation. +void wxStyledTextCtrl::SetIndent(int indentSize) { + SendMsg(2122, indentSize, 0); +} + +// Retrieve indentation size. +int wxStyledTextCtrl::GetIndent() { + return SendMsg(2123, 0, 0); +} + +// Indentation will only use space characters if useTabs is false, otherwise +// it will use a combination of tabs and spaces. +void wxStyledTextCtrl::SetUseTabs(bool useTabs) { + SendMsg(2124, useTabs, 0); +} + +// Retrieve whether tabs will be used in indentation. +bool wxStyledTextCtrl::GetUseTabs() { + return SendMsg(2125, 0, 0) != 0; +} + +// Change the indentation of a line to a number of columns. +void wxStyledTextCtrl::SetLineIndentation(int line, int indentSize) { + SendMsg(2126, line, indentSize); +} + +// Retrieve the number of columns that a line is indented. +int wxStyledTextCtrl::GetLineIndentation(int line) { + return SendMsg(2127, line, 0); +} + +// Retrieve the position before the first non indentation character on a line. +int wxStyledTextCtrl::GetLineIndentPosition(int line) { + return SendMsg(2128, line, 0); +} + +// Retrieve the column number of a position, taking tab width into account. +int wxStyledTextCtrl::GetColumn(int pos) { + return SendMsg(2129, pos, 0); +} + +// Show or hide the horizontal scroll bar. +void wxStyledTextCtrl::SetUseHorizontalScrollBar(bool show) { + SendMsg(2130, show, 0); +} + +// Is the horizontal scroll bar visible? +bool wxStyledTextCtrl::GetUseHorizontalScrollBar() { + return SendMsg(2131, 0, 0) != 0; +} + +// Show or hide indentation guides. +void wxStyledTextCtrl::SetIndentationGuides(bool show) { + SendMsg(2132, show, 0); +} + +// Are the indentation guides visible? +bool wxStyledTextCtrl::GetIndentationGuides() { + return SendMsg(2133, 0, 0) != 0; +} + +// Set the highlighted indentation guide column. +// 0 = no highlighted guide. +void wxStyledTextCtrl::SetHighlightGuide(int column) { + SendMsg(2134, column, 0); +} + +// Get the highlighted indentation guide column. +int wxStyledTextCtrl::GetHighlightGuide() { + return SendMsg(2135, 0, 0); +} + +// Get the position after the last visible characters on a line. +int wxStyledTextCtrl::GetLineEndPosition(int line) { + return SendMsg(2136, line, 0); +} + +// Get the code page used to interpret the bytes of the document as characters. +int wxStyledTextCtrl::GetCodePage() { + return SendMsg(2137, 0, 0); +} + +// Get the foreground colour of the caret. +wxColour wxStyledTextCtrl::GetCaretForeground() { + long c = SendMsg(2138, 0, 0); + return wxColourFromLong(c); +} + +// In read-only mode? +bool wxStyledTextCtrl::GetReadOnly() { + return SendMsg(2140, 0, 0) != 0; +} + +// Sets the position of the caret. +void wxStyledTextCtrl::SetCurrentPos(int pos) { + SendMsg(2141, pos, 0); +} + +// Sets the position that starts the selection - this becomes the anchor. +void wxStyledTextCtrl::SetSelectionStart(int pos) { + SendMsg(2142, pos, 0); +} + +// Returns the position at the start of the selection. +int wxStyledTextCtrl::GetSelectionStart() { + return SendMsg(2143, 0, 0); +} + +// Sets the position that ends the selection - this becomes the currentPosition. +void wxStyledTextCtrl::SetSelectionEnd(int pos) { + SendMsg(2144, pos, 0); +} + +// Returns the position at the end of the selection. +int wxStyledTextCtrl::GetSelectionEnd() { + return SendMsg(2145, 0, 0); +} + +// Sets the print magnification added to the point size of each style for printing. +void wxStyledTextCtrl::SetPrintMagnification(int magnification) { + SendMsg(2146, magnification, 0); +} + +// Returns the print magnification. +int wxStyledTextCtrl::GetPrintMagnification() { + return SendMsg(2147, 0, 0); +} + +// Modify colours when printing for clearer printed text. +void wxStyledTextCtrl::SetPrintColourMode(int mode) { + SendMsg(2148, mode, 0); +} + +// Returns the print colour mode. +int wxStyledTextCtrl::GetPrintColourMode() { + return SendMsg(2149, 0, 0); +} + +// Find some text in the document. +int wxStyledTextCtrl::FindText(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord) { + TextToFind ft; + int flags = 0; + + flags |= caseSensitive ? SCFIND_MATCHCASE : 0; + flags |= wholeWord ? SCFIND_WHOLEWORD : 0; + ft.chrg.cpMin = minPos; + ft.chrg.cpMax = maxPos; + ft.lpstrText = (char*)text.c_str(); + + return SendMsg(2150, flags, (long)&ft); +} + +// On Windows will draw the document into a display context such as a printer. + int wxStyledTextCtrl::FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect) { + RangeToFormat fr; + + fr.hdc = draw; + fr.hdcTarget = target; + fr.rc.top = renderRect.GetTop(); + fr.rc.left = renderRect.GetLeft(); + fr.rc.right = renderRect.GetRight(); + fr.rc.bottom = renderRect.GetBottom(); + fr.rcPage.top = pageRect.GetTop(); + fr.rcPage.left = pageRect.GetLeft(); + fr.rcPage.right = pageRect.GetRight(); + fr.rcPage.bottom = pageRect.GetBottom(); + fr.chrg.cpMin = startPos; + fr.chrg.cpMax = endPos; + + return SendMsg(2151, doDraw, (long)&fr); +} + +// Retrieve the line at the top of the display. +int wxStyledTextCtrl::GetFirstVisibleLine() { + return SendMsg(2152, 0, 0); +} + +// Retrieve the contents of a line. +wxString wxStyledTextCtrl::GetLine(int line) { + wxString text; + int len = LineLength(line); + char* buf = text.GetWriteBuf(len+1); + + int pos = SendMsg(2153, line, (long)buf); + text.UngetWriteBuf(); + + return text; +} + +// Returns the number of lines in the document. There is always at least one. +int wxStyledTextCtrl::GetLineCount() { + return SendMsg(2154, 0, 0); +} + +// Sets the size in pixels of the left margin. +void wxStyledTextCtrl::SetMarginLeft(int width) { + SendMsg(2155, 0, width); +} + +// Returns the size in pixels of the left margin. +int wxStyledTextCtrl::GetMarginLeft() { + return SendMsg(2156, 0, 0); +} + +// Sets the size in pixels of the right margin. +void wxStyledTextCtrl::SetMarginRight(int width) { + SendMsg(2157, 0, width); +} + +// Returns the size in pixels of the right margin. +int wxStyledTextCtrl::GetMarginRight() { + return SendMsg(2158, 0, 0); +} + +// Is the document different from when it was last saved? +bool wxStyledTextCtrl::GetModify() { + return SendMsg(2159, 0, 0) != 0; +} + +// Select a range of text. +void wxStyledTextCtrl::SetSelection(int start, int end) { + SendMsg(2160, start, end); +} + +// Retrieve the selected text. +wxString wxStyledTextCtrl::GetSelectedText() { + wxString text; + int start; + int end; + + GetSelection(&start, &end); + int len = end - start; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(2161, 0, (long)buff); + text.UngetWriteBuf(); + return text; +} + +// Retrieve a range of text. +wxString wxStyledTextCtrl::GetTextRange(int startPos, int endPos) { + wxString text; + int len = endPos - startPos; + char* buff = text.GetWriteBuf(len+1); + TextRange tr; + tr.lpstrText = buff; + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + + SendMsg(2162, 0, (long)&tr); + text.UngetWriteBuf(); + return text; +} + +// Draw the selection in normal style or with selection highlighted. +void wxStyledTextCtrl::HideSelection(bool normal) { + SendMsg(2163, normal, 0); +} + +// Retrieve the line containing a position. +int wxStyledTextCtrl::LineFromPosition(int pos) { + return SendMsg(2166, pos, 0); +} + +// Retrieve the position at the start of a line. +int wxStyledTextCtrl::PositionFromLine(int line) { + return SendMsg(2167, line, 0); +} + +// Scroll horizontally and vertically. +void wxStyledTextCtrl::LineScroll(int columns, int lines) { + SendMsg(2168, columns, lines); +} + +// Ensure the caret is visible. +void wxStyledTextCtrl::EnsureCaretVisible() { + SendMsg(2169, 0, 0); +} + +// Replace the selected text with the argument text. +void wxStyledTextCtrl::ReplaceSelection(const wxString& text) { + SendMsg(2170, 0, (long)text.c_str()); +} + +// Set to read only or read write. +void wxStyledTextCtrl::SetReadOnly(bool readOnly) { + SendMsg(2171, readOnly, 0); +} + +// Will a paste succeed? +bool wxStyledTextCtrl::CanPaste() { + return SendMsg(2173, 0, 0) != 0; +} + +// Are there any undoable actions in the undo history. +bool wxStyledTextCtrl::CanUndo() { + return SendMsg(2174, 0, 0) != 0; +} + +// Delete the undo history. +void wxStyledTextCtrl::EmptyUndoBuffer() { + SendMsg(2175, 0, 0); +} + +// Undo one action in the undo history. +void wxStyledTextCtrl::Undo() { + SendMsg(2176, 0, 0); +} + +// Cut the selection to the clipboard. +void wxStyledTextCtrl::Cut() { + SendMsg(2177, 0, 0); +} + +// Copy the selection to the clipboard. +void wxStyledTextCtrl::Copy() { + SendMsg(2178, 0, 0); +} + +// Paste the contents of the clipboard into the document replacing the selection. +void wxStyledTextCtrl::Paste() { + SendMsg(2179, 0, 0); +} + +// Clear the selection. +void wxStyledTextCtrl::Clear() { + SendMsg(2180, 0, 0); +} + +// Replace the contents of the document with the argument text. +void wxStyledTextCtrl::SetText(const wxString& text) { + SendMsg(2181, 0, (long)text.c_str()); +} + +// Retrieve all the text in the document. +wxString wxStyledTextCtrl::GetText() { + wxString text; + int len = GetTextLength()+1; + char* buff = text.GetWriteBuf(len+1); + + SendMsg(2182, len, (long)buff); + buff[len] = 0; + text.UngetWriteBuf(); + return text; +} + +// Retrieve the number of characters in the document. +int wxStyledTextCtrl::GetTextLength() { + return SendMsg(2183, 0, 0); +} + +// Set to overtype (true) or insert mode +void wxStyledTextCtrl::SetOvertype(bool overtype) { + SendMsg(2186, overtype, 0); +} + +// Returns true if overtype mode is active otherwise false is returned. +bool wxStyledTextCtrl::GetOvertype() { + return SendMsg(2187, 0, 0) != 0; +} + +// Show a call tip containing a definition near position pos. +void wxStyledTextCtrl::CallTipShow(int pos, const wxString& definition) { + SendMsg(2200, pos, (long)definition.c_str()); +} + +// Remove the call tip from the screen. +void wxStyledTextCtrl::CallTipCancel() { + SendMsg(2201, 0, 0); +} + +// Is there an active call tip? +bool wxStyledTextCtrl::CallTipActive() { + return SendMsg(2202, 0, 0) != 0; +} + +// Retrieve the position where the caret was before displaying the call tip. +int wxStyledTextCtrl::CallTipPosAtStart() { + return SendMsg(2203, 0, 0); +} + +// Highlight a segment of the definition. +void wxStyledTextCtrl::CallTipSetHighlight(int start, int end) { + SendMsg(2204, start, end); +} + +// Set the background colour for the call tip. +void wxStyledTextCtrl::CallTipSetBackground(const wxColour& back) { + SendMsg(2205, wxColourAsLong(back), 0); +} + +// Find the display line of a document line taking hidden lines into account. +int wxStyledTextCtrl::VisibleFromDocLine(int line) { + return SendMsg(2220, line, 0); +} + +// Find the document line of a display line taking hidden lines into account. +int wxStyledTextCtrl::DocLineFromVisible(int lineDisplay) { + return SendMsg(2221, lineDisplay, 0); +} + +// Set the fold level of a line. +// This encodes an integer level along with flags indicating whether the +// line is a header and whether it is effectively white space. +void wxStyledTextCtrl::SetFoldLevel(int line, int level) { + SendMsg(2222, line, level); +} + +// Retrieve the fold level of a line. +int wxStyledTextCtrl::GetFoldLevel(int line) { + return SendMsg(2223, line, 0); +} + +// Find the last child line of a header line. +int wxStyledTextCtrl::GetLastChild(int line, int level) { + return SendMsg(2224, line, level); +} + +// Find the parent line of a child line. +int wxStyledTextCtrl::GetFoldParent(int line) { + return SendMsg(2225, line, 0); +} + +// Make a range of lines visible. +void wxStyledTextCtrl::ShowLines(int lineStart, int lineEnd) { + SendMsg(2226, lineStart, lineEnd); +} + +// Make a range of lines invisible. +void wxStyledTextCtrl::HideLines(int lineStart, int lineEnd) { + SendMsg(2227, lineStart, lineEnd); +} + +// Is a line visible? +bool wxStyledTextCtrl::GetLineVisible(int line) { + return SendMsg(2228, line, 0) != 0; +} + +// Show the children of a header line. +void wxStyledTextCtrl::SetFoldExpanded(int line, bool expanded) { + SendMsg(2229, line, expanded); +} + +// Is a header line expanded? +bool wxStyledTextCtrl::GetFoldExpanded(int line) { + return SendMsg(2230, line, 0) != 0; +} + +// Switch a header line between expanded and contracted. +void wxStyledTextCtrl::ToggleFold(int line) { + SendMsg(2231, line, 0); +} + +// Ensure a particular line is visible by expanding any header line hiding it. +void wxStyledTextCtrl::EnsureVisible(int line) { + SendMsg(2232, line, 0); +} + +// Set some debugging options for folding +void wxStyledTextCtrl::SetFoldFlags(int flags) { + SendMsg(2233, flags, 0); +} + +// How many characters are on a line, not including end of line characters. +int wxStyledTextCtrl::LineLength(int line) { + return SendMsg(2350, line, 0); +} + +// Highlight the characters at two positions. +void wxStyledTextCtrl::BraceHighlight(int pos1, int pos2) { + SendMsg(2351, pos1, pos2); +} + +// Highlight the character at a position indicating there is no matching brace. +void wxStyledTextCtrl::BraceBadLight(int pos) { + SendMsg(2352, pos, 0); +} + +// Find the position of a matching brace or INVALID_POSITION if no match. +int wxStyledTextCtrl::BraceMatch(int pos) { + return SendMsg(2353, pos, 0); +} + +// Are the end of line characters visible. +bool wxStyledTextCtrl::GetViewEOL() { + return SendMsg(2355, 0, 0) != 0; +} + +// Make the end of line characters visible or invisible +void wxStyledTextCtrl::SetViewEOL(bool visible) { + SendMsg(2356, visible, 0); +} + +// Retrieve a pointer to the document object. +void* wxStyledTextCtrl::GetDocPointer() { + return (void*)SendMsg(2357); +} + +// Change the document object used. +void wxStyledTextCtrl::SetDocPointer(void* docPointer) { + SendMsg(2358, (long)docPointer); +} + +// Set which document modification events are sent to the container. +void wxStyledTextCtrl::SetModEventMask(int mask) { + SendMsg(2359, mask, 0); +} + +// Retrieve the column number which text should be kept within. +int wxStyledTextCtrl::GetEdgeColumn() { + return SendMsg(2360, 0, 0); +} + +// Set the column number of the edge. +// If text goes past the edge then it is highlighted. +void wxStyledTextCtrl::SetEdgeColumn(int column) { + SendMsg(2361, column, 0); +} + +// Retrieve the edge highlight mode. +int wxStyledTextCtrl::GetEdgeMode() { + return SendMsg(2362, 0, 0); +} + +// The edge may be displayed by a line (EDGE_LINE) or by highlighting text that +// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +void wxStyledTextCtrl::SetEdgeMode(int mode) { + SendMsg(2363, mode, 0); +} + +// Retrieve the colour used in edge indication. +wxColour wxStyledTextCtrl::GetEdgeColour() { + long c = SendMsg(2364, 0, 0); + return wxColourFromLong(c); +} + +// Change the colour used in edge indication. +void wxStyledTextCtrl::SetEdgeColour(const wxColour& edgeColour) { + SendMsg(2365, wxColourAsLong(edgeColour), 0); +} + +// Sets the current caret position to be the search anchor. +void wxStyledTextCtrl::SearchAnchor() { + SendMsg(2366, 0, 0); +} + +// Find some text starting at the search anchor. +int wxStyledTextCtrl::SearchNext(int flags, const wxString& text) { + return SendMsg(2367, flags, (long)text.c_str()); +} + +// Find some text starting at the search anchor and moving backwards. +int wxStyledTextCtrl::SearchPrev(int flags, const wxString& text) { + return SendMsg(2368, flags, (long)text.c_str()); +} + +// Set the way the line the caret is on is kept visible. +void wxStyledTextCtrl::SetCaretPolicy(int caretPolicy, int caretSlop) { + SendMsg(2369, caretPolicy, caretSlop); +} + +// Retrieves the number of lines completely visible. +int wxStyledTextCtrl::LinesOnScreen() { + return SendMsg(2370, 0, 0); +} + +// Set whether a pop up menu is displayed automatically when the user presses +// the wrong mouse button. +void wxStyledTextCtrl::UsePopUp(bool allowPopUp) { + SendMsg(2371, allowPopUp, 0); +} + +// Is the selection a rectangular. The alternative is the more common stream selection. +bool wxStyledTextCtrl::SelectionIsRectangle() { + return SendMsg(2372, 0, 0) != 0; +} + +// Set the zoom level. This number of points is added to the size of all fonts. +// It may be positive to magnify or negative to reduce. +void wxStyledTextCtrl::SetZoom(int zoom) { + SendMsg(2373, zoom, 0); +} + +// Retrieve the zoom level. +int wxStyledTextCtrl::GetZoom() { + return SendMsg(2374, 0, 0); +} + +// Create a new document object. +// Starts with reference count of 1 and not selected into editor. +void* wxStyledTextCtrl::CreateDocument() { + return (void*)SendMsg(2375); +} + +// Extend life of document. +void wxStyledTextCtrl::AddRefDocument(void* docPointer) { + SendMsg(2376, (long)docPointer); +} + +// Release a reference to the document, deleting document if it fades to black. +void wxStyledTextCtrl::ReleaseDocument(void* docPointer) { + SendMsg(2377, (long)docPointer); +} + +// Get which document modification events are sent to the container. +int wxStyledTextCtrl::GetModEventMask() { + return SendMsg(2378, 0, 0); +} + +// Start notifying the container of all key presses and commands. +void wxStyledTextCtrl::StartRecord() { + SendMsg(3001, 0, 0); +} + +// Stop notifying the container of all key presses and commands. +void wxStyledTextCtrl::StopRecord() { + SendMsg(3002, 0, 0); +} + +// Set the lexing language of the document. +void wxStyledTextCtrl::SetLexer(int lexer) { + SendMsg(4001, lexer, 0); +} + +// Retrieve the lexing language of the document. +int wxStyledTextCtrl::GetLexer() { + return SendMsg(4002, 0, 0); +} + +// Colourise a segment of the document using the current lexing language. +void wxStyledTextCtrl::Colourise(int start, int end) { + SendMsg(4003, start, end); +} + +// Set up a value that may be used by a lexer for some optional feature. +void wxStyledTextCtrl::SetProperty(const wxString& key, const wxString& value) { + SendMsg(4004, (long)key.c_str(), (long)value.c_str()); +} + +// Set up the key words used by the lexer. +void wxStyledTextCtrl::SetKeyWords(int keywordSet, const wxString& keyWords) { + SendMsg(4005, keywordSet, (long)keyWords.c_str()); +} + +// END of generated section +//---------------------------------------------------------------------- + + +// Returns the line number of the line with the caret. +int wxStyledTextCtrl::GetCurrentLine() { + int line = LineFromPosition(GetCurrentPos()); + return line; +} // Extract style settings from a spec-string which is composed of one or @@ -646,8 +1383,8 @@ void wxStyledTextCtrl::StyleResetDefault() { // face:[facename] sets the font face name to use // size:[num] sets the font size in points // eol turns on eol filling +// underline turns on underlining // - void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { wxStringTokenizer tkz(spec, ","); @@ -663,6 +1400,9 @@ void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { else if (option == "italic") StyleSetItalic(styleNum, true); + else if (option == "underline") + StyleSetUnderline(styleNum, true); + else if (option == "eol") StyleSetEOLFilled(styleNum, true); @@ -684,550 +1424,72 @@ void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { } -void wxStyledTextCtrl::StyleSetForeground(int styleNum, const wxColour& colour) { - SendMsg(SCI_STYLESETFORE, styleNum, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::StyleSetBackground(int styleNum, const wxColour& colour) { - SendMsg(SCI_STYLESETBACK, styleNum, wxColourAsLong(colour)); -} - - +// Set style size, face, bold, italic, and underline attributes from +// a wxFont's attributes. void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { int size = font.GetPointSize(); wxString faceName = font.GetFaceName(); bool bold = font.GetWeight() == wxBOLD; bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); - StyleSetFontAttr(styleNum, size, faceName, bold, italic); + // TODO: add encoding/charset mapping + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); } - +// Set all font style attributes at once. void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size, const wxString& faceName, - bool bold, bool italic) { + bool bold, bool italic, + bool underline) { StyleSetSize(styleNum, size); StyleSetFaceName(styleNum, faceName); StyleSetBold(styleNum, bold); StyleSetItalic(styleNum, italic); + StyleSetUnderline(styleNum, underline); + + // TODO: add encoding/charset mapping } -void wxStyledTextCtrl::StyleSetBold(int styleNum, bool bold) { - SendMsg(SCI_STYLESETBOLD, styleNum, bold); -} - - -void wxStyledTextCtrl::StyleSetItalic(int styleNum, bool italic) { - SendMsg(SCI_STYLESETITALIC, styleNum, italic); -} - - -void wxStyledTextCtrl::StyleSetFaceName(int styleNum, const wxString& faceName) { - SendMsg(SCI_STYLESETFONT, styleNum, (long)faceName.c_str()); -} - - -void wxStyledTextCtrl::StyleSetSize(int styleNum, int pointSize) { - SendMsg(SCI_STYLESETSIZE, styleNum, pointSize); -} - - -void wxStyledTextCtrl::StyleSetEOLFilled(int styleNum, bool fillEOL) { - SendMsg(SCI_STYLESETEOLFILLED, styleNum, fillEOL); -} - - -//---------------------------------------------------------------------- -// Margins in the edit area - -int wxStyledTextCtrl::GetLeftMargin() { - return LOWORD(SendMsg(EM_GETMARGINS)); -} - - -int wxStyledTextCtrl::GetRightMargin() { - return HIWORD(SendMsg(EM_GETMARGINS)); -} - - -void wxStyledTextCtrl::SetMargins(int left, int right) { - int flag = 0; - int val = 0; - - if (right != -1) { - flag |= EC_RIGHTMARGIN; - val = right << 16; - } - if (left != -1) { - flag |= EC_LEFTMARGIN; - val |= (left & 0xffff); - } - - SendMsg(EM_SETMARGINS, flag, val); -} - - -//---------------------------------------------------------------------- -// Margins for selection, markers, etc. - -void wxStyledTextCtrl::SetMarginType(int margin, int type) { - SendMsg(SCI_SETMARGINTYPEN, margin, type); -} - - -int wxStyledTextCtrl::GetMarginType(int margin) { - return SendMsg(SCI_GETMARGINTYPEN, margin); -} - - -void wxStyledTextCtrl::SetMarginWidth(int margin, int pixelWidth) { - SendMsg(SCI_SETMARGINWIDTHN, margin, pixelWidth); -} - - -int wxStyledTextCtrl::GetMarginWidth(int margin) { - return SendMsg(SCI_GETMARGINWIDTHN, margin); -} - - -void wxStyledTextCtrl::SetMarginMask(int margin, int mask) { - SendMsg(SCI_SETMARGINMASKN, margin, mask); -} - - -int wxStyledTextCtrl::GetMarginMask(int margin) { - return SendMsg(SCI_GETMARGINMASKN, margin); -} - - -void wxStyledTextCtrl::SetMarginSensitive(int margin, bool sensitive) { - SendMsg(SCI_SETMARGINSENSITIVEN, margin, sensitive); -} - - -bool wxStyledTextCtrl::GetMarginSensitive(int margin) { - return SendMsg(SCI_GETMARGINSENSITIVEN, margin) != 0; -} - - - - -//---------------------------------------------------------------------- -// Selection and Caret styles - - -void wxStyledTextCtrl::SetSelectionForeground(const wxColour& colour) { - SendMsg(SCI_SETSELFORE, 0, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::SetSelectionBackground(const wxColour& colour) { - SendMsg(SCI_SETSELBACK, 0, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::SetCaretForeground(const wxColour& colour) { - SendMsg(SCI_SETCARETFORE, 0, wxColourAsLong(colour)); -} - - -int wxStyledTextCtrl::GetCaretPeriod() { - return SendMsg(SCI_GETCARETPERIOD); -} - - -void wxStyledTextCtrl::SetCaretPeriod(int milliseconds) { - SendMsg(SCI_SETCARETPERIOD, milliseconds); -} - - - -//---------------------------------------------------------------------- -// Other settings - - -void wxStyledTextCtrl::SetBufferedDraw(bool isBuffered) { - SendMsg(SCI_SETBUFFEREDDRAW, isBuffered); -} - - -void wxStyledTextCtrl::SetTabWidth(int numChars) { - SendMsg(SCI_SETTABWIDTH, numChars); -} - - -void wxStyledTextCtrl::SetWordChars(const wxString& wordChars) { - SendMsg(SCI_SETTABWIDTH, 0, (long)wordChars.c_str()); -} - - -//---------------------------------------------------------------------- -// Brace highlighting - - -void wxStyledTextCtrl::BraceHighlight(int pos1, int pos2) { - SendMsg(SCI_BRACEHIGHLIGHT, pos1, pos2); -} - - -void wxStyledTextCtrl::BraceBadlight(int pos) { - SendMsg(SCI_BRACEBADLIGHT, pos); -} - - -int wxStyledTextCtrl::BraceMatch(int pos, int maxReStyle) { - return SendMsg(SCI_BRACEMATCH, pos, maxReStyle); -} - - - -//---------------------------------------------------------------------- -// Markers - -void wxStyledTextCtrl::MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground, - const wxColour& background) { - MarkerSetType(markerNumber, markerSymbol); - MarkerSetForeground(markerNumber, foreground); - MarkerSetBackground(markerNumber, background); -} - - -void wxStyledTextCtrl::MarkerSetType(int markerNumber, int markerSymbol) { - SendMsg(SCI_MARKERDEFINE, markerNumber, markerSymbol); -} - - -void wxStyledTextCtrl::MarkerSetForeground(int markerNumber, const wxColour& colour) { - SendMsg(SCI_MARKERSETFORE, markerNumber, wxColourAsLong(colour)); -} - - -void wxStyledTextCtrl::MarkerSetBackground(int markerNumber, const wxColour& colour) { - SendMsg(SCI_MARKERSETBACK, markerNumber, wxColourAsLong(colour)); -} - - -int wxStyledTextCtrl::MarkerAdd(int line, int markerNumber) { - return SendMsg(SCI_MARKERADD, line, markerNumber); -} - - -void wxStyledTextCtrl::MarkerDelete(int line, int markerNumber) { - SendMsg(SCI_MARKERDELETE, line, markerNumber); -} - - -void wxStyledTextCtrl::MarkerDeleteAll(int markerNumber) { - SendMsg(SCI_MARKERDELETEALL, markerNumber); -} - - -int wxStyledTextCtrl::MarkerGet(int line) { - return SendMsg(SCI_MARKERGET); -} - - -int wxStyledTextCtrl::MarkerGetNextLine(int lineStart, int markerMask) { - return SendMsg(SCI_MARKERNEXT, lineStart, markerMask); -} - - -int wxStyledTextCtrl::MarkerGetPrevLine(int lineStart, int markerMask) { -// return SendMsg(SCI_MARKERPREV, lineStart, markerMask); - return 0; -} - - -int wxStyledTextCtrl::MarkerLineFromHandle(int handle) { - return SendMsg(SCI_MARKERLINEFROMHANDLE, handle); -} - - -void wxStyledTextCtrl::MarkerDeleteHandle(int handle) { - SendMsg(SCI_MARKERDELETEHANDLE, handle); -} - - - -//---------------------------------------------------------------------- -// Indicators - - -void wxStyledTextCtrl::IndicatorSetStyle(int indicNum, int indicStyle) { - SendMsg(SCI_INDICSETSTYLE, indicNum, indicStyle); -} - - -int wxStyledTextCtrl::IndicatorGetStyle(int indicNum) { - return SendMsg(SCI_INDICGETSTYLE, indicNum); -} - - -void wxStyledTextCtrl::IndicatorSetColour(int indicNum, const wxColour& colour) { - SendMsg(SCI_INDICSETSTYLE, indicNum, wxColourAsLong(colour)); -} - - - -//---------------------------------------------------------------------- -// Auto completion - - -void wxStyledTextCtrl::AutoCompShow(const wxString& listOfWords) { - SendMsg(SCI_AUTOCSHOW, 0, (long)listOfWords.c_str()); -} - - -void wxStyledTextCtrl::AutoCompCancel() { - SendMsg(SCI_AUTOCCANCEL); -} - - -bool wxStyledTextCtrl::AutoCompActive() { - return SendMsg(SCI_AUTOCACTIVE) != 0; -} - - -int wxStyledTextCtrl::AutoCompPosAtStart() { - return SendMsg(SCI_AUTOCPOSSTART); -} - - -void wxStyledTextCtrl::AutoCompComplete() { - SendMsg(SCI_AUTOCCOMPLETE); -} - - -void wxStyledTextCtrl::AutoCompStopChars(const wxString& stopChars) { - SendMsg(SCI_AUTOCSHOW, 0, (long)stopChars.c_str()); -} - - -//---------------------------------------------------------------------- -// Call tips - -void wxStyledTextCtrl::CallTipShow(int pos, const wxString& text) { - SendMsg(SCI_CALLTIPSHOW, pos, (long)text.c_str()); -} - - -void wxStyledTextCtrl::CallTipCancel() { - SendMsg(SCI_CALLTIPCANCEL); -} - - -bool wxStyledTextCtrl::CallTipActive() { - return SendMsg(SCI_CALLTIPACTIVE) != 0; -} - - -int wxStyledTextCtrl::CallTipPosAtStart() { - return SendMsg(SCI_CALLTIPPOSSTART); -} - - -void wxStyledTextCtrl::CallTipSetHighlight(int start, int end) { - SendMsg(SCI_CALLTIPSETHLT, start, end); -} - - -void wxStyledTextCtrl::CallTipSetBackground(const wxColour& colour) { - SendMsg(SCI_CALLTIPSETBACK, wxColourAsLong(colour)); -} - - -//---------------------------------------------------------------------- -// Key bindings - -void wxStyledTextCtrl::CmdKeyAssign(int key, int modifiers, int cmd) { - SendMsg(SCI_ASSIGNCMDKEY, MAKELONG(key, modifiers), cmd); -} - - -void wxStyledTextCtrl::CmdKeyClear(int key, int modifiers) { - SendMsg(SCI_CLEARCMDKEY, MAKELONG(key, modifiers)); -} - - -void wxStyledTextCtrl::CmdKeyClearAll() { - SendMsg(SCI_CLEARALLCMDKEYS); -} - - +// Perform one of the operations defined by the wxSTC_CMD_* constants. void wxStyledTextCtrl::CmdKeyExecute(int cmd) { SendMsg(cmd); } - -//---------------------------------------------------------------------- -// Print formatting - -int -wxStyledTextCtrl::FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect) { - FORMATRANGE fr; - - fr.hdc = draw; - fr.hdcTarget = target; - fr.rc.top = renderRect.GetTop(); - fr.rc.left = renderRect.GetLeft(); - fr.rc.right = renderRect.GetRight(); - fr.rc.bottom = renderRect.GetBottom(); - fr.rcPage.top = pageRect.GetTop(); - fr.rcPage.left = pageRect.GetLeft(); - fr.rcPage.right = pageRect.GetRight(); - fr.rcPage.bottom = pageRect.GetBottom(); - fr.chrg.cpMin = startPos; - fr.chrg.cpMax = endPos; - - return SendMsg(EM_FORMATRANGE, doDraw, (long)&fr); +// Set the left and right margin in the edit area, measured in pixels. +void wxStyledTextCtrl::SetMargins(int left, int right) { + SetMarginLeft(left); + SetMarginRight(right); } -//---------------------------------------------------------------------- -// Document Sharing - -void* wxStyledTextCtrl::GetDocument() { - return (void*)SendMsg(SCI_GETDOCPOINTER); +// Retrieve the start and end positions of the current selection. +void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) { + if (startPos != NULL) + *startPos = SendMsg(SCI_GETSELECTIONSTART); + if (endPos != NULL) + *endPos = SendMsg(SCI_GETSELECTIONEND); } -void wxStyledTextCtrl::SetDocument(void* document) { - SendMsg(SCI_SETDOCPOINTER, 0, (long)document); +// Retrieve the point in the window where a position is displayed. +wxPoint wxStyledTextCtrl::PointFromPosition(int pos) { + int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos); + int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos); + return wxPoint(x, y); +} + +// Scroll enough to make the given line visible +void wxStyledTextCtrl::ScrollToLine(int line) { + m_swx->DoScrollToLine(line); } -//---------------------------------------------------------------------- -// Folding - -int wxStyledTextCtrl::VisibleFromDocLine(int docLine) { - return SendMsg(SCI_VISIBLEFROMDOCLINE, docLine); -} - - -int wxStyledTextCtrl::DocLineFromVisible(int displayLine) { - return SendMsg(SCI_DOCLINEFROMVISIBLE, displayLine); -} - - -int wxStyledTextCtrl::SetFoldLevel(int line, int level) { - return SendMsg(SCI_SETFOLDLEVEL, line, level); -} - - -int wxStyledTextCtrl::GetFoldLevel(int line) { - return SendMsg(SCI_GETFOLDLEVEL, line); -} - - -int wxStyledTextCtrl::GetLastChild(int line) { - return SendMsg(SCI_GETLASTCHILD, line); -} - - -int wxStyledTextCtrl::GetFoldParent(int line) { - return SendMsg(SCI_GETFOLDPARENT, line); -} - - -void wxStyledTextCtrl::ShowLines(int lineStart, int lineEnd) { - SendMsg(SCI_SHOWLINES, lineStart, lineEnd); -} - - -void wxStyledTextCtrl::HideLines(int lineStart, int lineEnd) { - SendMsg(SCI_HIDELINES, lineStart, lineEnd); -} - - -bool wxStyledTextCtrl::GetLineVisible(int line) { - return SendMsg(SCI_GETLINEVISIBLE, line) != 0; -} - - -void wxStyledTextCtrl::SetFoldExpanded(int line) { - SendMsg(SCI_SETFOLDEXPANDED, line); -} - - -bool wxStyledTextCtrl::GetFoldExpanded(int line) { - return SendMsg(SCI_GETFOLDEXPANDED, line) != 0; -} - - -void wxStyledTextCtrl::ToggleFold(int line) { - SendMsg(SCI_TOGGLEFOLD, line); -} - - -void wxStyledTextCtrl::EnsureVisible(int line) { - SendMsg(SCI_ENSUREVISIBLE, line); -} - - -//---------------------------------------------------------------------- -// Long Lines - -int wxStyledTextCtrl::GetEdgeColumn() { - return SendMsg(SCI_GETEDGECOLUMN); -} - -void wxStyledTextCtrl::SetEdgeColumn(int column) { - SendMsg(SCI_SETEDGECOLUMN, column); -} - -wxSTC_EDGE wxStyledTextCtrl::GetEdgeMode() { - return (wxSTC_EDGE) SendMsg(SCI_GETEDGEMODE); -} - -void wxStyledTextCtrl::SetEdgeMode(wxSTC_EDGE mode){ - SendMsg(SCI_SETEDGEMODE, mode); -} - -wxColour wxStyledTextCtrl::GetEdgeColour() { - long c = SendMsg(SCI_GETEDGECOLOUR); - return wxColourFromLong(c); -} - -void wxStyledTextCtrl::SetEdgeColour(const wxColour& colour) { - SendMsg(SCI_SETEDGECOLOUR, wxColourAsLong(colour)); -} - - -//---------------------------------------------------------------------- -// Lexer - -void wxStyledTextCtrl::SetLexer(wxSTC_LEX lexer) { - SendMsg(SCI_SETLEXER, lexer); -} - - -wxSTC_LEX wxStyledTextCtrl::GetLexer() { - return (wxSTC_LEX)SendMsg(SCI_GETLEXER); -} - - -void wxStyledTextCtrl::Colourise(int start, int end) { - SendMsg(SCI_COLOURISE, start, end); -} - - -void wxStyledTextCtrl::SetProperty(const wxString& key, const wxString& value) { - SendMsg(SCI_SETPROPERTY, (long)key.c_str(), (long)value.c_str()); -} - - -void wxStyledTextCtrl::SetKeywords(int keywordSet, const wxString& keywordList) { - SendMsg(SCI_SETKEYWORDS, keywordSet, (long)keywordList.c_str()); +// Scroll enough to make the given column visible +void wxStyledTextCtrl::ScrollToColumn(int column) { + m_swx->DoScrollToColumn(column); } @@ -1278,20 +1540,23 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) { } void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { - int processed = 0; long key = evt.KeyCode(); if ((key > WXK_ESCAPE) && (key != WXK_DELETE) && (key < 255) && !evt.ControlDown() && !evt.AltDown()) { m_swx->DoAddChar(key); - processed = true; } else { - key = toupper(key); - processed = m_swx->DoKeyDown(key, evt.ShiftDown(), - evt.ControlDown(), evt.AltDown()); + evt.Skip(); } +} + +void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { + long key = evt.KeyCode(); + key = toupper(key); + int processed = m_swx->DoKeyDown(key, evt.ShiftDown(), + evt.ControlDown(), evt.AltDown()); if (! processed) evt.Skip(); } @@ -1319,9 +1584,15 @@ void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) { } +void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) { + m_swx->DoOnListBox(); +} + + //---------------------------------------------------------------------- // Turn notifications from Scintilla into events + void wxStyledTextCtrl::NotifyChange() { wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId()); GetEventHandler()->ProcessEvent(evt); @@ -1367,6 +1638,9 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { case SCN_NEEDSHOWN: eventType = wxEVT_STC_NEEDSHOWN; break; + case SCN_POSCHANGED: + eventType = wxEVT_STC_POSCHANGED; + break; } if (eventType) { wxStyledTextEvent evt(eventType, GetId()); @@ -1375,7 +1649,8 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { evt.SetModifiers(scn.modifiers); if (eventType == wxEVT_STC_MODIFIED) { evt.SetModificationType(scn.modificationType); - evt.SetText(scn.text); + if (scn.text) + evt.SetText(wxString(scn.text, scn.length)); evt.SetLength(scn.length); evt.SetLinesAdded(scn.linesAdded); evt.SetLine(scn.line); diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in new file mode 100644 index 0000000000..b5df70df2a --- /dev/null +++ b/src/stc/stc.cpp.in @@ -0,0 +1,523 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: stc.cpp +// Purpose: A wxWindows implementation of Scintilla. This class is the +// one meant to be used directly by wx applications. It does not +// derive directly from the Scintilla classes, but instead +// delegates most things to the real Scintilla class. +// This allows the use of Scintilla without polluting the +// namespace with all the classes and identifiers from Scintilla. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#include + +#include "wx/stc/stc.h" +#include "ScintillaWX.h" + +#include + +// The following code forces a reference to all of the Scintilla lexers. +// If we don't do something like this, then the linker tends to "optimize" +// them away. (eric@sourcegear.com) + +int wxForceScintillaLexers(void) +{ + extern LexerModule lmCPP; + extern LexerModule lmHTML; + extern LexerModule lmXML; + extern LexerModule lmProps; + extern LexerModule lmErrorList; + extern LexerModule lmMake; + extern LexerModule lmBatch; + extern LexerModule lmPerl; + extern LexerModule lmPython; + extern LexerModule lmSQL; + extern LexerModule lmVB; + + if ( + &lmCPP + && &lmHTML + && &lmXML + && &lmProps + && &lmErrorList + && &lmMake + && &lmBatch + && &lmPerl + && &lmPython + && &lmSQL + && &lmVB + ) + { + return 1; + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------- + +const wxChar* wxSTCNameStr = "stcwindow"; + +BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) + EVT_PAINT (wxStyledTextCtrl::OnPaint) + EVT_SCROLLWIN (wxStyledTextCtrl::OnScrollWin) + EVT_SIZE (wxStyledTextCtrl::OnSize) + EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown) + EVT_MOTION (wxStyledTextCtrl::OnMouseMove) + EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp) + EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp) + EVT_CHAR (wxStyledTextCtrl::OnChar) + EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown) + EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus) + EVT_SET_FOCUS (wxStyledTextCtrl::OnGainFocus) + EVT_SYS_COLOUR_CHANGED (wxStyledTextCtrl::OnSysColourChanged) + EVT_ERASE_BACKGROUND (wxStyledTextCtrl::OnEraseBackground) + EVT_MENU_RANGE (-1, -1, wxStyledTextCtrl::OnMenu) + EVT_LISTBOX_DCLICK (-1, wxStyledTextCtrl::OnListBox) +END_EVENT_TABLE() + + +IMPLEMENT_CLASS(wxStyledTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxStyledTextEvent, wxCommandEvent) + +//---------------------------------------------------------------------- +// Constructor and Destructor + +wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) : + wxControl(parent, id, pos, size, + style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN, + wxDefaultValidator, name) +{ + m_swx = new ScintillaWX(this); + m_stopWatch.Start(); +} + + +wxStyledTextCtrl::~wxStyledTextCtrl() { + delete m_swx; +} + + +//---------------------------------------------------------------------- + +long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) { + + return m_swx->WndProc(msg, wp, lp); +} + + +#ifdef MAKELONG +#undef MAKELONG +#endif + +#define MAKELONG(a, b) ((a) | ((b) << 16)) + + +static long wxColourAsLong(const wxColour& co) { + return (((long)co.Blue() << 16) | + ((long)co.Green() << 8) | + ((long)co.Red())); +} + +static wxColour wxColourFromLong(long c) { + wxColour clr; + clr.Set(c & 0xff, (c >> 8) & 0xff, (c >> 16) & 0xff); + return clr; +} + + +static wxColour wxColourFromSpec(const wxString& spec) { + // spec should be #RRGGBB + char* junk; + int red = strtol(spec.Mid(1,2), &junk, 16); + int green = strtol(spec.Mid(3,2), &junk, 16); + int blue = strtol(spec.Mid(5,2), &junk, 16); + return wxColour(red, green, blue); +} + + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py from the contents of Scintilla.iface. Do not edit +// this file. Edit stc.cpp.in or gen_iface.py instead and regenerate. + +%(METHOD_IMPS)s + +// END of generated section +//---------------------------------------------------------------------- + + +// Returns the line number of the line with the caret. +int wxStyledTextCtrl::GetCurrentLine() { + int line = LineFromPosition(GetCurrentPos()); + return line; +} + + +// Extract style settings from a spec-string which is composed of one or +// more of the following comma separated elements: +// +// bold turns on bold +// italic turns on italics +// fore:#RRGGBB sets the foreground colour +// back:#RRGGBB sets the background colour +// face:[facename] sets the font face name to use +// size:[num] sets the font size in points +// eol turns on eol filling +// underline turns on underlining +// +void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { + + wxStringTokenizer tkz(spec, ","); + while (tkz.HasMoreTokens()) { + wxString token = tkz.GetNextToken(); + + wxString option = token.BeforeFirst(':'); + wxString val = token.AfterFirst(':'); + + if (option == "bold") + StyleSetBold(styleNum, true); + + else if (option == "italic") + StyleSetItalic(styleNum, true); + + else if (option == "underline") + StyleSetUnderline(styleNum, true); + + else if (option == "eol") + StyleSetEOLFilled(styleNum, true); + + else if (option == "size") { + long points; + if (val.ToLong(&points)) + StyleSetSize(styleNum, points); + } + + else if (option == "face") + StyleSetFaceName(styleNum, val); + + else if (option == "fore") + StyleSetForeground(styleNum, wxColourFromSpec(val)); + + else if (option == "back") + StyleSetBackground(styleNum, wxColourFromSpec(val)); + } +} + + +// Set style size, face, bold, italic, and underline attributes from +// a wxFont's attributes. +void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { + int size = font.GetPointSize(); + wxString faceName = font.GetFaceName(); + bool bold = font.GetWeight() == wxBOLD; + bool italic = font.GetStyle() != wxNORMAL; + bool under = font.GetUnderlined(); + + // TODO: add encoding/charset mapping + StyleSetFontAttr(styleNum, size, faceName, bold, italic, under); +} + +// Set all font style attributes at once. +void wxStyledTextCtrl::StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline) { + StyleSetSize(styleNum, size); + StyleSetFaceName(styleNum, faceName); + StyleSetBold(styleNum, bold); + StyleSetItalic(styleNum, italic); + StyleSetUnderline(styleNum, underline); + + // TODO: add encoding/charset mapping +} + + +// Perform one of the operations defined by the wxSTC_CMD_* constants. +void wxStyledTextCtrl::CmdKeyExecute(int cmd) { + SendMsg(cmd); +} + + +// Set the left and right margin in the edit area, measured in pixels. +void wxStyledTextCtrl::SetMargins(int left, int right) { + SetMarginLeft(left); + SetMarginRight(right); +} + + +// Retrieve the start and end positions of the current selection. +void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) { + if (startPos != NULL) + *startPos = SendMsg(SCI_GETSELECTIONSTART); + if (endPos != NULL) + *endPos = SendMsg(SCI_GETSELECTIONEND); +} + + +// Retrieve the point in the window where a position is displayed. +wxPoint wxStyledTextCtrl::PointFromPosition(int pos) { + int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos); + int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos); + return wxPoint(x, y); +} + +// Scroll enough to make the given line visible +void wxStyledTextCtrl::ScrollToLine(int line) { + m_swx->DoScrollToLine(line); +} + + +// Scroll enough to make the given column visible +void wxStyledTextCtrl::ScrollToColumn(int column) { + m_swx->DoScrollToColumn(column); +} + + + +//---------------------------------------------------------------------- +// Event handlers + +void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) { + wxPaintDC dc(this); + wxRegion region = GetUpdateRegion(); + + m_swx->DoPaint(&dc, region.GetBox()); +} + +void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) { + if (evt.GetOrientation() == wxHORIZONTAL) + m_swx->DoHScroll(evt.GetEventType(), evt.GetPosition()); + else + m_swx->DoVScroll(evt.GetEventType(), evt.GetPosition()); +} + +void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { + wxSize sz = GetClientSize(); + m_swx->DoSize(sz.x, sz.y); +} + +void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), + evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); +} + +void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoButtonMove(Point(pt.x, pt.y)); +} + +void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(), + evt.ControlDown()); +} + + +void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoContextMenu(Point(pt.x, pt.y)); +} + +void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { + long key = evt.KeyCode(); + if ((key > WXK_ESCAPE) && + (key != WXK_DELETE) && (key < 255) && + !evt.ControlDown() && !evt.AltDown()) { + + m_swx->DoAddChar(key); + } + else { + evt.Skip(); + } +} + +void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { + long key = evt.KeyCode(); + key = toupper(key); + int processed = m_swx->DoKeyDown(key, evt.ShiftDown(), + evt.ControlDown(), evt.AltDown()); + if (! processed) + evt.Skip(); +} + +void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) { + m_swx->DoLoseFocus(); +} + +void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) { + m_swx->DoGainFocus(); +} + +void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) { + m_swx->DoSysColourChange(); +} + +void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) { + // do nothing to help avoid flashing +} + + + +void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) { + m_swx->DoCommand(evt.GetId()); +} + + +void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) { + m_swx->DoOnListBox(); +} + + +//---------------------------------------------------------------------- +// Turn notifications from Scintilla into events + + +void wxStyledTextCtrl::NotifyChange() { + wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId()); + GetEventHandler()->ProcessEvent(evt); +} + +void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { + SCNotification& scn = *_scn; + int eventType = 0; + switch (scn.nmhdr.code) { + case SCN_STYLENEEDED: + eventType = wxEVT_STC_STYLENEEDED; + break; + case SCN_CHARADDED: + eventType = wxEVT_STC_CHARADDED; + break; + case SCN_UPDATEUI: + eventType = wxEVT_STC_UPDATEUI; + break; + case SCN_SAVEPOINTREACHED: + eventType = wxEVT_STC_SAVEPOINTREACHED; + break; + case SCN_SAVEPOINTLEFT: + eventType = wxEVT_STC_SAVEPOINTLEFT; + break; + case SCN_MODIFYATTEMPTRO: + eventType = wxEVT_STC_ROMODIFYATTEMPT; + break; + case SCN_DOUBLECLICK: + eventType = wxEVT_STC_DOUBLECLICK; + break; + case SCN_MODIFIED: + eventType = wxEVT_STC_MODIFIED; + break; + case SCN_KEY: + eventType = wxEVT_STC_KEY; + break; + case SCN_MACRORECORD: + eventType = wxEVT_STC_MACRORECORD; + break; + case SCN_MARGINCLICK: + eventType = wxEVT_STC_MARGINCLICK; + break; + case SCN_NEEDSHOWN: + eventType = wxEVT_STC_NEEDSHOWN; + break; + case SCN_POSCHANGED: + eventType = wxEVT_STC_POSCHANGED; + break; + } + if (eventType) { + wxStyledTextEvent evt(eventType, GetId()); + evt.SetPosition(scn.position); + evt.SetKey(scn.ch); + evt.SetModifiers(scn.modifiers); + if (eventType == wxEVT_STC_MODIFIED) { + evt.SetModificationType(scn.modificationType); + if (scn.text) + evt.SetText(wxString(scn.text, scn.length)); + evt.SetLength(scn.length); + evt.SetLinesAdded(scn.linesAdded); + evt.SetLine(scn.line); + evt.SetFoldLevelNow(scn.foldLevelNow); + evt.SetFoldLevelPrev(scn.foldLevelPrev); + } + if (eventType == wxEVT_STC_MARGINCLICK) + evt.SetMargin(scn.margin); + if (eventType == wxEVT_STC_MACRORECORD) { + evt.SetMessage(scn.message); + evt.SetWParam(scn.wParam); + evt.SetLParam(scn.lParam); + } + + GetEventHandler()->ProcessEvent(evt); + } +} + + + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- + +wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id) + : wxCommandEvent(commandType, id) +{ + m_position = 0; + m_key = 0; + m_modifiers = 0; + m_modificationType = 0; + m_length = 0; + m_linesAdded = 0; + m_line = 0; + m_foldLevelNow = 0; + m_foldLevelPrev = 0; + m_margin = 0; + m_message = 0; + m_wParam = 0; + m_lParam = 0; + + +} + +bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; } +bool wxStyledTextEvent::GetControl() const { return (m_modifiers & SCI_CTRL) != 0; } +bool wxStyledTextEvent::GetAlt() const { return (m_modifiers & SCI_ALT) != 0; } + +void wxStyledTextEvent::CopyObject(wxObject& obj) const { + wxCommandEvent::CopyObject(obj); + + wxStyledTextEvent* o = (wxStyledTextEvent*)&obj; + o->m_position = m_position; + o->m_key = m_key; + o->m_modifiers = m_modifiers; + o->m_modificationType = m_modificationType; + o->m_text = m_text; + o->m_length = m_length; + o->m_linesAdded = m_linesAdded; + o->m_line = m_line; + o->m_foldLevelNow = m_foldLevelNow; + o->m_foldLevelPrev = m_foldLevelPrev; + + o->m_margin = m_margin; + + o->m_message = m_message; + o->m_wParam = m_wParam; + o->m_lParam = m_lParam; + + + +} + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- + diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in new file mode 100644 index 0000000000..d9c23f9be3 --- /dev/null +++ b/src/stc/stc.h.in @@ -0,0 +1,297 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: stc.h +// Purpose: A wxWindows implementation of Scintilla. This class is the +// one meant to be used directly by wx applications. It does not +// derive directly from the Scintilla classes, and in fact there +// is no mention of Scintilla classes at all in this header. +// This class delegates all method calls and events to the +// Scintilla objects and so forth. This allows the use of +// Scintilla without polluting the namespace with all the +// classes and itentifiers from Scintilla. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef __stc_h__ +#define __stc_h__ + + +#include + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +%(VALUES)s + +// END of generated section +//---------------------------------------------------------------------- +// Others + +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)) + + + +//---------------------------------------------------------------------- + +class ScintillaWX; // forward declare +class WordList; +struct SCNotification; + + +extern const wxChar* wxSTCNameStr; + +//---------------------------------------------------------------------- + +class wxStyledTextCtrl : public wxControl { +public: + +#ifdef SWIG + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const char* name = "styledtext"); +#else + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSTCNameStr); +#endif + + +#ifndef SWIG + ~wxStyledTextCtrl(); +#endif + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +%(METHOD_DEFS)s + +// END of generated section +//---------------------------------------------------------------------- +// Others... + + + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:#RRGGBB sets the foreground colour + // back:#RRGGBB sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec(int styleNum, const wxString& spec); + + + + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont(int styleNum, wxFont& font); + + + + // Set all font style attributes at once. + void StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline); + + + + // Perform one of the operations defined by the wxSTC_CMD_* constants. + void CmdKeyExecute(int cmd); + + + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins(int left, int right); + + + // Retrieve the start and end positions of the current selection. +#ifdef SWIG + void GetSelection(int* OUTPUT, int* OUTPUT); +#else + void GetSelection(int* startPos, int* endPos); +#endif + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition(int pos); + + + // Scroll enough to make the given line visible + void ScrollToLine(int line); + + + // Scroll enough to make the given column visible + void ScrollToColumn(int column); + +//---------------------------------------------------------------------- + + +#ifndef SWIG +private: + // Event handlers + void OnPaint(wxPaintEvent& evt); + void OnScrollWin(wxScrollWinEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnMouseLeftDown(wxMouseEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseLeftUp(wxMouseEvent& evt); + void OnMouseRightUp(wxMouseEvent& evt); + void OnChar(wxKeyEvent& evt); + void OnKeyDown(wxKeyEvent& evt); + void OnLoseFocus(wxFocusEvent& evt); + void OnGainFocus(wxFocusEvent& evt); + void OnSysColourChanged(wxSysColourChangedEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnMenu(wxCommandEvent& evt); + void OnListBox(wxCommandEvent& evt); + + + // Turn notifications from Scintilla into events + void NotifyChange(); + void NotifyParent(SCNotification* scn); + + long SendMsg(int msg, long wp=0, long lp=0); + +private: + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxStyledTextCtrl) + + ScintillaWX* m_swx; + wxStopWatch m_stopWatch; + + + friend class ScintillaWX; + friend class Platform; +#endif +}; + +//---------------------------------------------------------------------- + +class wxStyledTextEvent : public wxCommandEvent { +public: + wxStyledTextEvent(wxEventType commandType=0, int id=0); + ~wxStyledTextEvent() {} + + void SetPosition(int pos) { m_position = pos; } + void SetKey(int k) { m_key = k; } + void SetModifiers(int m) { m_modifiers = m; } + void SetModificationType(int t) { m_modificationType = t; } + void SetText(const char* t) { m_text = t; } + void SetLength(int len) { m_length = len; } + void SetLinesAdded(int num) { m_linesAdded = num; } + void SetLine(int val) { m_line = val; } + void SetFoldLevelNow(int val) { m_foldLevelNow = val; } + void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } + void SetMargin(int val) { m_margin = val; } + void SetMessage(int val) { m_message = val; } + void SetWParam(int val) { m_wParam = val; } + void SetLParam(int val) { m_lParam = val; } + + int GetPosition() const { return m_position; } + int GetKey() const { return m_key; } + int GetModifiers() const { return m_modifiers; } + int GetModificationType() const { return m_modificationType; } + wxString GetText() const { return m_text; } + int GetLength() const { return m_length; } + int GetLinesAdded() const { return m_linesAdded; } + int GetLine() const { return m_line; } + int GetFoldLevelNow() const { return m_foldLevelNow; } + int GetFoldLevelPrev() const { return m_foldLevelPrev; } + int GetMargin() const { return m_margin; } + int GetMessage() const { return m_message; } + int GetWParam() const { return m_wParam; } + int GetLParam() const { return m_lParam; } + + bool GetShift() const; + bool GetControl() const; + bool GetAlt() const; + + void CopyObject(wxObject& obj) const; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) + + int m_position; + int m_key; + int m_modifiers; + + int m_modificationType; // wxEVT_STC_MODIFIED + wxString m_text; + int m_length; + int m_linesAdded; + int m_line; + int m_foldLevelNow; + int m_foldLevelPrev; + + int m_margin; // wxEVT_STC_MARGINCLICK + + int m_message; // wxEVT_STC_MACRORECORD + int m_wParam; + int m_lParam; +#endif +}; + + +// Event types +enum { + wxEVT_STC_CHANGE = 1650, + wxEVT_STC_STYLENEEDED, + wxEVT_STC_CHARADDED, + wxEVT_STC_UPDATEUI, + wxEVT_STC_SAVEPOINTREACHED, + wxEVT_STC_SAVEPOINTLEFT, + wxEVT_STC_ROMODIFYATTEMPT, + wxEVT_STC_DOUBLECLICK, + wxEVT_STC_MODIFIED, + wxEVT_STC_KEY, + wxEVT_STC_MACRORECORD, + wxEVT_STC_MARGINCLICK, + wxEVT_STC_NEEDSHOWN, + wxEVT_STC_POSCHANGED +}; + + +#ifndef SWIG +typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); + +#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, + +#endif + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- +#endif + + diff --git a/src/tiff/tiff.dsp b/src/tiff/TiffVC.dsp similarity index 100% rename from src/tiff/tiff.dsp rename to src/tiff/TiffVC.dsp diff --git a/src/tiff/TiffVC.dsw b/src/tiff/TiffVC.dsw new file mode 100644 index 0000000000..8e9111524c --- /dev/null +++ b/src/tiff/TiffVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "tiff"=.\TiffVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/src/tiff/makefile.vc b/src/tiff/makefile.vc index 5680063a25..1f746d54a8 100644 --- a/src/tiff/makefile.vc +++ b/src/tiff/makefile.vc @@ -1,46 +1,25 @@ !if "$(FINAL)" == "1" -LIBTARGET=$(WXDIR)\lib\tiff.lib +LIBTARGET=..\..\lib\tiff.lib +!else if "$(FINAL)" == "hybrid" +LIBTARGET=..\..\lib\tiffh.lib !else -LIBTARGET=$(WXDIR)\lib\tiffd.lib +LIBTARGET=..\..\lib\tiffd.lib !endif -OBJECTS= \ - tif_aux.obj \ - tif_close.obj \ - tif_codec.obj \ - tif_compress.obj \ - tif_dir.obj \ - tif_dirinfo.obj \ - tif_dirread.obj \ - tif_dirwrite.obj \ - tif_dumpmode.obj \ - tif_error.obj \ - tif_fax3.obj \ - tif_fax3sm.obj \ - tif_flush.obj \ - tif_getimage.obj \ - tif_jpeg.obj \ - tif_luv.obj \ - tif_lzw.obj \ - tif_next.obj \ - tif_open.obj \ - tif_packbits.obj \ - tif_pixarlog.obj \ - tif_predict.obj \ - tif_print.obj \ - tif_read.obj \ - tif_strip.obj \ - tif_swab.obj \ - tif_thunder.obj \ - tif_tile.obj \ - tif_version.obj \ - tif_warning.obj \ - tif_win32.obj \ - tif_write.obj \ - tif_zip.obj \ +OBJECTS= tif_aux.obj tif_close.obj tif_codec.obj tif_compress.obj tif_dir.obj tif_dirinfo.obj \ + tif_dirread.obj tif_dirwrite.obj tif_dumpmode.obj tif_error.obj tif_fax3.obj \ + tif_fax3sm.obj tif_flush.obj tif_getimage.obj tif_jpeg.obj tif_luv.obj tif_lzw.obj \ + tif_next.obj tif_open.obj tif_packbits.obj tif_pixarlog.obj tif_predict.obj \ + tif_print.obj tif_read.obj tif_strip.obj tif_swab.obj tif_thunder.obj tif_tile.obj \ + tif_version.obj tif_warning.obj tif_win32.obj tif_write.obj tif_zip.obj +defaulttarget: + echo Please use the 'all' target for this makefile. +clean: + -erase $(LIBTARGET) + -erase *.obj # Pull in standard variable definitions diff --git a/src/tiff/makefile.wat b/src/tiff/makefile.wat new file mode 100644 index 0000000000..4f8d5cfc38 --- /dev/null +++ b/src/tiff/makefile.wat @@ -0,0 +1,141 @@ +#!/binb/wmake.exe +# +# File: makefile.wat +# Author: Julian Smart +# Created: 1998 +# +# Makefile : Builds TIFF library for Watcom C++, WIN32 +# This makefile has to rename files because apparently Watcom C++ +# can't deal with greater than 8.3 filenames (can't +# make tif_close.c, for example) + +WXDIR = ..\.. +EXTRACPPFLAGS=-i=..\zlib + +!include $(WXDIR)\src\makewat.env + +WXLIB = $(WXDIR)\lib + +LIBTARGET = $(WXLIB)\tiff.lib + +OBJECTS= & + _aux.obj & + close.obj & + codec.obj & + compress.obj & + dir.obj & + dirinfo.obj & + dirread.obj & + dirwrite.obj & + dumpmode.obj & + error.obj & + fax3.obj & + fax3sm.obj & + flush.obj & + getimage.obj & + jpeg.obj & + luv.obj & + lzw.obj & + next.obj & + open.obj & + packbits.obj & + pixarlog.obj & + predict.obj & + print.obj & + read.obj & + strip.obj & + swab.obj & + thunder.obj & + tile.obj & + version.obj & + warning.obj & + win32.obj & + write.obj & + zip.obj + +rename: .SYMBOLIC + copy tif_predict.h tif_pred.h + copy tif_aux.c _aux.c + copy tif_close.c close.c + copy tif_codec.c codec.c + copy tif_compress.c compress.c + copy tif_dir.c dir.c + copy tif_dirinfo.c dirinfo.c + copy tif_dirread.c dirread.c + copy tif_dirwrite.c dirwrite.c + copy tif_dumpmode.c dumpmode.c + copy tif_error.c error.c + copy tif_fax3.c fax3.c + copy tif_fax3sm.c fax3sm.c + copy tif_flush.c flush.c + copy tif_getimage.c getimage.c + copy tif_jpeg.c jpeg.c + copy tif_luv.c luv.c + copy tif_lzw.c lzw.c + copy tif_next.c next.c + copy tif_open.c open.c + copy tif_packbits.c packbits.c + copy tif_pixarlog.c pixarlog.c + copy tif_predict.c predict.c + copy tif_print.c print.c + copy tif_read.c read.c + copy tif_strip.c strip.c + copy tif_swab.c swab.c + copy tif_thunder.c thunder.c + copy tif_tile.c tile.c + copy tif_version.c version.c + copy tif_warning.c warning.c + copy tif_win32.c win32.c + copy tif_write.c write.c + copy tif_zip.c zip.c + +all: rename $(OBJECTS) $(LIBTARGET) + +$(LIBTARGET) : $(OBJECTS) + %create tmp.lbc + @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i + wlib /b /c /n /p=512 $^@ @tmp.lbc + +clean: .SYMBOLIC + -erase *.obj + -erase $(LIBTARGET) + -erase *.pch + -erase *.err + -erase *.lbc + -erase tif_pred.h + -erase _aux.c + -erase close.c + -erase codec.c + -erase compress.c + -erase dir.c + -erase dirinfo.c + -erase dirread.c + -erase dirwrite.c + -erase dumpmode.c + -erase error.c + -erase fax3.c + -erase fax3sm.c + -erase flush.c + -erase getimage.c + -erase jpeg.c + -erase luv.c + -erase lzw.c + -erase next.c + -erase open.c + -erase packbits.c + -erase pixarlog.c + -erase predict.c + -erase print.c + -erase read.c + -erase strip.c + -erase swab.c + -erase thunder.c + -erase tile.c + -erase version.c + -erase warning.c + -erase win32.c + -erase write.c + -erase zip.c + +cleanall: clean + diff --git a/src/tiff/tif_lzw.c b/src/tiff/tif_lzw.c index e41314a6a3..d739e6f18d 100644 --- a/src/tiff/tif_lzw.c +++ b/src/tiff/tif_lzw.c @@ -36,7 +36,12 @@ * * The original Berkeley copyright notice appears below in its entirety. */ +/* Watcom C++ (or its make utility) doesn't like long filenames */ +#ifdef __WATCOMC__ +#include "tif_pred.h" +#else #include "tif_predict.h" +#endif #include #include diff --git a/src/tiff/tif_pixarlog.c b/src/tiff/tif_pixarlog.c index 27f2a9d775..1cf49be837 100644 --- a/src/tiff/tif_pixarlog.c +++ b/src/tiff/tif_pixarlog.c @@ -84,7 +84,13 @@ * */ +/* Watcom C++ (or its make utility) doesn't like long filenames */ +#ifdef __WATCOMC__ +#include "tif_pred.h" +#else #include "tif_predict.h" +#endif + #include "zlib.h" #include "zutil.h" diff --git a/src/tiff/tif_predict.c b/src/tiff/tif_predict.c index 3dd7c98747..137a2fb3a4 100644 --- a/src/tiff/tif_predict.c +++ b/src/tiff/tif_predict.c @@ -30,7 +30,12 @@ * Predictor Tag Support (used by multiple codecs). */ #include "tiffiop.h" +/* Watcom C++ (or its make utility) doesn't like long filenames */ +#ifdef __WATCOMC__ +#include "tif_pred.h" +#else #include "tif_predict.h" +#endif #include diff --git a/src/tiff/tif_zip.c b/src/tiff/tif_zip.c index 89cfdbde18..38e98a96c8 100644 --- a/src/tiff/tif_zip.c +++ b/src/tiff/tif_zip.c @@ -46,7 +46,13 @@ * directory ftp://ftp.uu.net/pub/archiving/zip/doc. The library was * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz. */ +/* Watcom C++ (or its make utility) doesn't like long filenames */ +#ifdef __WATCOMC__ +#include "tif_pred.h" +#else #include "tif_predict.h" +#endif + #include "zlib.h" #include diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index 6641d377b4..ac03724f84 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -1,4 +1,4 @@ -// -*- c++ -*- /////////////////////////////////////////////////////////////// +// -*- c++ -*- //////////////////////////////////////////////////////////////// // Name: unix/dialup.cpp // Purpose: Network related wxWindows classes and functions // Author: Karsten Ballüder @@ -7,7 +7,7 @@ // RCS-ID: $Id$ // Copyright: (c) Karsten Ballüder // Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// #include "wx/setup.h" @@ -28,7 +28,7 @@ #include "wx/filefn.h" #include "wx/utils.h" #include "wx/log.h" -#include "wx/file.h" +#include "wx/ffile.h" #include "wx/process.h" #include "wx/intl.h" #include "wx/app.h" @@ -96,7 +96,7 @@ public: const wxString& WXUNUSED(password), bool async); - /// Hang up the currently active dial up connection. + // Hang up the currently active dial up connection. virtual bool HangUp(); // returns TRUE if the computer is connected to the network: under Windows, @@ -105,17 +105,14 @@ public: virtual bool IsOnline() const { CheckStatus(); - return m_IsOnline > 0; + return m_IsOnline == Net_Connected; } - /// do we have a constant net connection? -- GUESS! - bool IsAlwaysOnline() const - { - ((wxDialUpManagerImpl *) this)->HangUp(); // brutal but necessary - return IsOnline(); - } - /// returns TRUE if (async) dialing is in progress - inline virtual bool IsDialing() const + // do we have a constant net connection? + virtual bool IsAlwaysOnline() const; + + // returns TRUE if (async) dialing is in progress + virtual bool IsDialing() const { return m_DialProcess != NULL; } // cancel dialing the number initiated with Dial(async = TRUE) @@ -130,7 +127,7 @@ public: // allows to forcefully set the online status - whatever our internal // algorithm may think about it. virtual void SetOnlineStatus(bool isOnline = TRUE) - { m_IsOnline = isOnline; } + { m_IsOnline = isOnline ? Net_Connected : Net_No; } // set misc wxDialUpManager options // -------------------------------- @@ -159,56 +156,87 @@ public: virtual void SetConnectCommand(const wxString &command, const wxString &hupcmd) { m_ConnectCommand = command; m_HangUpCommand = hupcmd; } -private: - /// -1: don´t know, 0 = no, 1 = yes - int m_IsOnline; +//private: -- Sun CC 4.2 objects to using NetConnection enum as the return +// type if it is declared private - /// Can we use ifconfig to list active devices? + // the possible results of testing for Online() status + enum NetConnection + { + Net_Unknown = -1, // we couldn't learn anything + Net_No, // no network connection [currently] + Net_Connected // currently connected + }; + + // the possible net connection types + enum NetDeviceType + { + NetDevice_None = 0x0000, // no network devices (authoritative) + NetDevice_Unknown = 0x0001, // test doesn't work on this OS + NetDevice_Modem = 0x0002, // we have a modem + NetDevice_LAN = 0x0004 // a network card + }; + +private: + // the current status + NetConnection m_IsOnline; + + // the connection we have with the network card + NetConnection m_connCard; + + // Can we use ifconfig to list active devices? int m_CanUseIfconfig; - /// The path to ifconfig + + // The path to ifconfig wxString m_IfconfigPath; - /// Can we use ping to find hosts? + // Can we use ping to find hosts? int m_CanUsePing; - /// The path to ping program + // The path to ping program wxString m_PingPath; - /// beacon host: + // beacon host: wxString m_BeaconHost; - /// beacon host portnumber for connect: + // beacon host portnumber for connect: int m_BeaconPort; - /// command to connect to network + // command to connect to network wxString m_ConnectCommand; - /// command to hang up + // command to hang up wxString m_HangUpCommand; - /// name of ISP + // name of ISP wxString m_ISPname; - /// a timer for regular testing + // a timer for regular testing class AutoCheckTimer *m_timer; friend class AutoCheckTimer; - /// a wxProcess for dialling in background + // a wxProcess for dialling in background class wxDialProcess *m_DialProcess; - /// pid of dial process + // pid of dial process int m_DialPId; friend class wxDialProcess; - /// determine status + // determine status void CheckStatus(bool fromAsync = FALSE) const; - /// real status check - void CheckStatusInternal(void); + // real status check + void CheckStatusInternal(); - /// Check /proc/net (Linux only) - int CheckProcNet(void); - /// Check output of ifconfig command for PPP/SLIP/PLIP devices - int CheckIfconfig(void); - /// Ping a host: 1 on success, -1 if it cannot be used, 0 if unreachable - int CheckPing(void); - /// Check by connecting to host on given port. - int CheckConnect(void); + // check /proc/net (Linux only) for ppp/eth interfaces, returns the bit + // mask of NetDeviceType constants + int CheckProcNet(); + // check output of ifconfig command for PPP/SLIP/PLIP devices, returns the + // bit mask of NetDeviceType constants + int CheckIfconfig(); + + // combines the 2 possible checks for determining the connection status + NetConnection CheckConnectAndPing(); + + // pings a host + NetConnection CheckPing(); + + // check by connecting to host on given port. + NetConnection CheckConnect(); }; @@ -241,7 +269,7 @@ public: { m_DupMan = dupman; } - void Disconnect(void) { m_DupMan = NULL; } + void Disconnect() { m_DupMan = NULL; } virtual void OnTerminate(int WXUNUSED(pid), int WXUNUSED(status)) { if(m_DupMan) @@ -257,12 +285,8 @@ private: wxDialUpManagerImpl::wxDialUpManagerImpl() { - /* The isOnline flag can have the following values internally: - 0 : not connected - 1 : connected - -1 : unknown/undefined status - */ - m_IsOnline = -1; + m_IsOnline = + m_connCard = Net_Unknown; m_DialProcess = NULL; m_timer = NULL; m_CanUseIfconfig = -1; // unknown @@ -300,7 +324,7 @@ wxDialUpManagerImpl::Dial(const wxString &isp, const wxString & WXUNUSED(password), bool async) { - if(m_IsOnline == 1) + if(m_IsOnline == Net_Connected) return FALSE; m_ISPname = isp; wxString cmd; @@ -326,10 +350,9 @@ wxDialUpManagerImpl::Dial(const wxString &isp, return wxExecute(cmd, /* sync */ TRUE) == 0; } -bool -wxDialUpManagerImpl::HangUp(void) +bool wxDialUpManagerImpl::HangUp() { - if(m_IsOnline == 0) + if(m_IsOnline == Net_No) return FALSE; if(IsDialing()) { @@ -345,16 +368,14 @@ wxDialUpManagerImpl::HangUp(void) } -bool -wxDialUpManagerImpl::CancelDialing() +bool wxDialUpManagerImpl::CancelDialing() { if(! IsDialing()) return FALSE; return kill(m_DialPId, SIGTERM) > 0; } -bool -wxDialUpManagerImpl::EnableAutoCheckOnlineStatus(size_t nSeconds) +bool wxDialUpManagerImpl::EnableAutoCheckOnlineStatus(size_t nSeconds) { DisableAutoCheckOnlineStatus(); m_timer = new AutoCheckTimer(this); @@ -367,8 +388,7 @@ wxDialUpManagerImpl::EnableAutoCheckOnlineStatus(size_t nSeconds) return rc; } -void -wxDialUpManagerImpl::DisableAutoCheckOnlineStatus() +void wxDialUpManagerImpl::DisableAutoCheckOnlineStatus() { if(m_timer != NULL) { @@ -379,8 +399,7 @@ wxDialUpManagerImpl::DisableAutoCheckOnlineStatus() } -void -wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) +void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) { if(hostname.Length() == 0) { @@ -388,8 +407,8 @@ wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) m_BeaconPort = 80; return; } - - /// does hostname contain a port number? + + // does hostname contain a port number? wxString port = hostname.After(wxT(':')); if(port.Length()) { @@ -404,60 +423,139 @@ wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) } -void -wxDialUpManagerImpl::CheckStatus(bool fromAsync) const +void wxDialUpManagerImpl::CheckStatus(bool fromAsync) const { - // This function calls the CheckStatusInternal() helper function - // which is OS - specific and then sends the events. + // This function calls the CheckStatusInternal() helper function + // which is OS - specific and then sends the events. - int oldIsOnline = m_IsOnline; - ( /* non-const */ (wxDialUpManagerImpl *)this)->CheckStatusInternal(); + NetConnection oldIsOnline = m_IsOnline; + ( /* non-const */ (wxDialUpManagerImpl *)this)->CheckStatusInternal(); - // now send the events as appropriate: - if(m_IsOnline != oldIsOnline // it changed - && ( m_IsOnline == 1 // and it is a defined status - || m_IsOnline == 0) - // only send events for well defined transitions - && ( oldIsOnline == 1 || oldIsOnline == 0) - ) - { - wxDialUpEvent event(m_IsOnline, ! fromAsync); - (void)wxTheApp->ProcessEvent(event); - } + // now send the events as appropriate: i.e. if the status changed and + // if we're in defined state + if(m_IsOnline != oldIsOnline + && m_IsOnline != Net_Unknown + && oldIsOnline != Net_Unknown ) + { + wxDialUpEvent event(m_IsOnline == Net_Connected, ! fromAsync); + (void)wxTheApp->ProcessEvent(event); + } } /* - We have three methods that we can use: + We first try to find out if ppp interface is active. If it is, we assume + that we're online but don't have a permanent connection (this is false if a + networked machine uses modem to connect to somewhere else, but we can't do + anything in this case anyhow). - 1. test via /sbin/ifconfig and grep for "sl", "ppp", "pl" - --> should be fast enough for regular polling - 2. test if we can reach the well known beacon host - --> too slow for polling - 3. check /proc/net/dev on linux?? - This method should be preferred, if possible. Need to do more - testing. + If no ppp interface is detected, we check for eth interface. If it is + found, we check that we can, indeed, connect to an Internet host. The logic + here is that connection check should be fast enough in this case and we + don't want to give false positives in a (common) case of a machine on a LAN + which is not connected to the outside. + If we didn't find either ppp or eth interfaces, we stop here and decide + that we're connected. However, if couldn't check for this, we try to ping a + remote host just in case. + + NB1: Checking for the interface presence can be done in 2 ways + a) reading /proc/net/dev under Linux + b) spawning ifconfig under any OS + + The first method is faster but only works under Linux. + + NB2: pinging, actually, means that we first try to connect "manually" to + a port on remove machine and if it fails, we run ping. */ -void -wxDialUpManagerImpl::CheckStatusInternal(void) +void wxDialUpManagerImpl::CheckStatusInternal() { - m_IsOnline = -1; + m_IsOnline = Net_Unknown; - int testResult; + // first do quick checks to determine what kind of network devices do we + // have + int netDeviceType = CheckProcNet(); + if ( netDeviceType == NetDevice_Unknown ) + { + // nothing found, try ifconfig too + netDeviceType = CheckIfconfig(); + } - testResult = CheckProcNet(); - if(testResult == -1) - testResult = CheckIfconfig(); - if(testResult == -1) - testResult = CheckConnect(); - if(testResult == -1) - testResult = CheckPing(); - m_IsOnline = testResult; + switch ( netDeviceType ) + { + case NetDevice_None: + // no network devices, no connection + m_IsOnline = Net_No; + break; + + case NetDevice_LAN: + // we still do ping to confirm that we're connected but we only do + // it once and hope that the purpose of the network card (i.e. + // whether it used for connecting to the Internet or just to a + // LAN) won't change during the program lifetime + if ( m_connCard == Net_Unknown ) + { + m_connCard = CheckConnectAndPing(); + } + m_IsOnline = m_connCard; + break; + + case NetDevice_Unknown: + // try to ping just in case + m_IsOnline = CheckConnectAndPing(); + break; + + case NetDevice_LAN + NetDevice_Modem: + case NetDevice_Modem: + // assume we're connected + m_IsOnline = Net_Connected; + break; + + default: + wxFAIL_MSG(_T("Unexpected netDeviceType")); + } } -int -wxDialUpManagerImpl::CheckConnect(void) +bool wxDialUpManagerImpl::IsAlwaysOnline() const +{ + wxDialUpManagerImpl *self = wxConstCast(this, wxDialUpManagerImpl); + + int netDeviceType = self->CheckProcNet(); + if ( netDeviceType == NetDevice_Unknown ) + { + // nothing found, try ifconfig too + netDeviceType = self->CheckIfconfig(); + } + + if ( netDeviceType == NetDevice_Unknown ) + { + // this is the only thing we can do unfortunately... + self->HangUp(); + return IsOnline(); + } + else + { + // we are only permanently online if we have a network card + return (netDeviceType & NetDevice_LAN) != 0; + } +} + +wxDialUpManagerImpl::NetConnection wxDialUpManagerImpl::CheckConnectAndPing() +{ + NetConnection conn; + + // first try connecting - faster + conn = CheckConnect(); + if ( conn == Net_Unknown ) + { + // try pinging too + conn = CheckPing(); + } + + return conn; +} + +wxDialUpManagerImpl::NetConnection wxDialUpManagerImpl::CheckConnect() { // second method: try to connect to a well known host: // This can be used under Win 9x, too! @@ -465,7 +563,7 @@ wxDialUpManagerImpl::CheckConnect(void) struct sockaddr_in serv_addr; if((hp = gethostbyname(m_BeaconHost.mb_str())) == NULL) - return 0; // no DNS no net + return Net_No; // no DNS no net serv_addr.sin_family = hp->h_addrtype; memcpy(&serv_addr.sin_addr,hp->h_addr, hp->h_length); @@ -474,160 +572,180 @@ wxDialUpManagerImpl::CheckConnect(void) int sockfd; if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) { - return -1; // no info + return Net_Unknown; // no info } if( connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) >= 0) { close(sockfd); - return 1; // we cant connect, so we have a network! + return Net_Connected; // we can connect, so we have a network! + } + else // failed to connect + { + if(errno == ENETUNREACH) + return Net_No; // network is unreachable + else + return Net_Unknown; // connect failed, but don't know why } - //connected! - close(sockfd); - if(errno == ENETUNREACH) - return 0; // network is unreachable - // connect failed, but don't know why - return -1; } -int -wxDialUpManagerImpl::CheckProcNet(void) +int +wxDialUpManagerImpl::CheckProcNet() { - int rc = -1; + // assume that the test doesn't work + int netDevice = NetDevice_Unknown; #ifdef __LINUX__ - if (wxFileExists(_T("/proc/net/route"))) - { - // NOTE: cannot use wxFile::Length because file doesn't support - // seeking - FILE *f = fopen("/proc/net/route", "rt"); - if (f != NULL) - { - char output[256]; - - while (fgets(output, 256, f) != NULL) - { - if (strstr(output,"ppp") // ppp - || strstr(output,"sl") // slip - || strstr(output,"pl")) // plip - rc = 1; - } - if (rc == -1) rc = 0; - fclose(f); - } - } -#endif - - return rc; + if (wxFileExists(_T("/proc/net/route"))) + { + // cannot use wxFile::Length because file doesn't support seeking, so + // use stdio directly + FILE *f = fopen("/proc/net/route", "rt"); + if (f != NULL) + { + // now we know that we will find all devices we may have + netDevice = NetDevice_None; + + char output[256]; + + while (fgets(output, 256, f) != NULL) + { + if ( strstr(output, "eth") ) // network card + { + netDevice |= NetDevice_LAN; + } + else if (strstr(output,"ppp") // ppp + || strstr(output,"sl") // slip + || strstr(output,"pl")) // plip + { + netDevice |= NetDevice_Modem; + } + } + + fclose(f); + } + } +#endif // __LINUX__ + + return netDevice; } int -wxDialUpManagerImpl::CheckIfconfig(void) +wxDialUpManagerImpl::CheckIfconfig() { - int rc = -1; + // assume that the test doesn't work + int netDevice = NetDevice_Unknown; - // First time check for ifconfig location. We only use the variant which - // does not take arguments, a la GNU. - if ( m_CanUseIfconfig == -1 ) // unknown - { - static const wxChar *ifconfigLocations[] = - { - _T("/sbin"), // Linux, FreeBSD - _T("/usr/sbin"), // SunOS, Solaris, AIX, HP-UX - _T("/usr/etc"), // IRIX - }; + // first time check for ifconfig location + if ( m_CanUseIfconfig == -1 ) // unknown + { + static const wxChar *ifconfigLocations[] = + { + _T("/sbin"), // Linux, FreeBSD + _T("/usr/sbin"), // SunOS, Solaris, AIX, HP-UX + _T("/usr/etc"), // IRIX + }; - for ( size_t n = 0; n < WXSIZEOF(ifconfigLocations); n++ ) - { - wxString path(ifconfigLocations[n]); - path << _T("/ifconfig"); + for ( size_t n = 0; n < WXSIZEOF(ifconfigLocations); n++ ) + { + wxString path(ifconfigLocations[n]); + path << _T("/ifconfig"); - if ( wxFileExists(path) ) - { - m_IfconfigPath = path; - break; - } - } - } + if ( wxFileExists(path) ) + { + m_IfconfigPath = path; + break; + } + } + } - wxLogNull ln; // suppress all error messages - // Let´s try the ifconfig method first, should be fastest: - if(m_CanUseIfconfig != 0) // unknown or yes - { - wxASSERT(m_IfconfigPath.length()); + if ( m_CanUseIfconfig != 0 ) // unknown or yes + { + wxLogNull ln; // suppress all error messages - wxString tmpfile = wxGetTempFileName("_wxdialuptest"); - wxString cmd = "/bin/sh -c \'"; - cmd << m_IfconfigPath; + wxASSERT_MSG( m_IfconfigPath.length(), + _T("can't use ifconfig if it wasn't found") ); + + wxString tmpfile = wxGetTempFileName("_wxdialuptest"); + wxString cmd = "/bin/sh -c \'"; + cmd << m_IfconfigPath; #if defined(__SOLARIS__) || defined (__SUNOS__) - // need to add -a flag - cmd << " -a"; + // need to add -a flag + cmd << " -a"; #elif defined(__LINUX__) || defined(__SGI__) - // nothing to be added to ifconfig + // nothing to be added to ifconfig #elif defined(__FREEBSD__) - // add -l flag - cmd << " -l"; + // add -l flag + cmd << " -l"; #elif defined(__HPUX__) - // VZ: a wild guess (but without it, ifconfig fails completely) - cmd << _T(" ppp0"); + // VZ: a wild guess (but without it, ifconfig fails completely) + cmd << _T(" ppp0"); #else # pragma warning "No ifconfig information for this OS." - m_CanUseIfconfig = 0; - return -1; + m_CanUseIfconfig = 0; + return -1; #endif - cmd << " >" << tmpfile << '\''; - /* I tried to add an option to wxExecute() to not close stdout, - so we could let ifconfig write directly to the tmpfile, but - this does not work. That should be faster, as it doesn´t call - the shell first. I have no idea why. :-( (KB) */ - if(wxExecute(cmd,TRUE /* sync */) == 0) - { - m_CanUseIfconfig = 1; - wxFile file; - if( file.Open(tmpfile) ) - { - char *output = new char [file.Length()+1]; - output[file.Length()] = '\0'; - if(file.Read(output,file.Length()) == file.Length()) + cmd << " >" << tmpfile << '\''; + /* I tried to add an option to wxExecute() to not close stdout, + so we could let ifconfig write directly to the tmpfile, but + this does not work. That should be faster, as it doesn´t call + the shell first. I have no idea why. :-( (KB) */ + if ( wxExecute(cmd,TRUE /* sync */) == 0 ) + { + m_CanUseIfconfig = 1; + wxFFile file; + if( file.Open(tmpfile) ) { - // FIXME shouldn't we grep for "^ppp"? (VZ) + wxString output; + if ( file.ReadAll(&output) ) + { + // FIXME shouldn't we grep for "^ppp"? (VZ) + + bool hasModem = FALSE, + hasLAN = FALSE; #if defined(__SOLARIS__) || defined (__SUNOS__) - // dialup device under SunOS/Solaris - rc = strstr(output,"ipdptp") != (char *)NULL; + // dialup device under SunOS/Solaris + hasModem = wxStrstr(output, _T("ipdptp")) != NULL; + hasLAN = wxStrstr(output, _T("hme")) != NULL; #elif defined(__LINUX__) || defined (__FREEBSD__) - rc = strstr(output,"ppp") // ppp - || strstr(output,"sl") // slip - || strstr(output,"pl"); // plip + hasModem = wxStrstr(output, _T("ppp")) // ppp + || wxStrstr(output, _T("sl")) // slip + || wxStrstr(output, _T("pl")); // plip + hasLAN = wxStrstr(output, _T("eth")) != NULL; #elif defined(__SGI__) // IRIX - rc = (int) strstr(output, "ppp"); // PPP + hasModem = wxStrstr(output, _T("ppp")) != NULL; // PPP #elif defined(__HPUX__) - // if could run ifconfig on interface, then it exists - rc = TRUE; + // if could run ifconfig on interface, then it exists + hasModem = TRUE; #endif - } - file.Close(); - delete [] output; - } - // else rc remains -1 as we don't know for sure - } - else // could not run ifconfig correctly - m_CanUseIfconfig = 0; // don´t try again - (void) wxRemoveFile(tmpfile); - } - return rc; + netDevice = NetDevice_None; + if ( hasModem ) + netDevice |= NetDevice_Modem; + if ( hasLAN ) + netDevice |= NetDevice_LAN; + } + //else: error reading the file + } + //else: error opening the file + } + else // could not run ifconfig correctly + { + m_CanUseIfconfig = 0; // don´t try again + } + + (void) wxRemoveFile(tmpfile); + } + + return netDevice; } -int -wxDialUpManagerImpl::CheckPing(void) +wxDialUpManagerImpl::NetConnection wxDialUpManagerImpl::CheckPing() { - if(! m_CanUsePing) - return -1; - // First time check for ping location. We only use the variant // which does not take arguments, a la GNU. if(m_CanUsePing == -1) // unknown @@ -639,10 +757,15 @@ wxDialUpManagerImpl::CheckPing(void) if(! m_PingPath) { m_CanUsePing = 0; - return -1; } } + if(! m_CanUsePing) + { + // we didn't find ping + return Net_Unknown; + } + wxLogNull ln; // suppress all error messages wxASSERT(m_PingPath.length()); wxString cmd; @@ -656,18 +779,17 @@ wxDialUpManagerImpl::CheckPing(void) #else # pragma warning "No Ping information for this OS." m_CanUsePing = 0; - return -1; + return Net_Unknown; #endif cmd << m_BeaconHost; if(wxExecute(cmd, TRUE /* sync */) == 0) - return 1; + return Net_Connected; else - return 0; + return Net_No; } /* static */ -wxDialUpManager * -wxDialUpManager::Create(void) +wxDialUpManager *wxDialUpManager::Create() { return new wxDialUpManagerImpl; } diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 036c84272d..224725f7b6 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -171,6 +171,7 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, case wxFONTENCODING_ISO8859_9: case wxFONTENCODING_ISO8859_10: case wxFONTENCODING_ISO8859_11: + case wxFONTENCODING_ISO8859_12: case wxFONTENCODING_ISO8859_13: case wxFONTENCODING_ISO8859_14: case wxFONTENCODING_ISO8859_15: diff --git a/src/unix/gsocket.c b/src/unix/gsocket.c index 9fa98f1f47..0da32b61eb 100644 --- a/src/unix/gsocket.c +++ b/src/unix/gsocket.c @@ -351,7 +351,6 @@ GAddress *GSocket_GetPeer(GSocket *socket) */ GSocketError GSocket_SetServer(GSocket *sck) { - int type; int arg = 1; assert(sck != NULL); @@ -1500,7 +1499,9 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port, se = getservbyname(port, protocol); if (!se) { - if (isdigit(port[0])) + /* the cast to int suppresses compiler warnings about subscript having the + type char */ + if (isdigit((int)port[0])) { int port_int; diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index e2a0e1d834..ba5909609d 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -9,8 +9,16 @@ // Licence: wxWindows license (part of wxExtra library) ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "mimetype.h" +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#ifdef __GNUG__ + #pragma implementation "mimetype.h" #endif // for compilers that support precompilation, includes "wx.h". @@ -24,7 +32,7 @@ #include "wx/defs.h" #endif -#if (wxUSE_FILE && wxUSE_TEXTFILE) || defined(__WXMSW__) +#if wxUSE_FILE && wxUSE_TEXTFILE #ifndef WX_PRECOMP #include "wx/string.h" @@ -54,6 +62,22 @@ // in case we're compiling in non-GUI mode class WXDLLEXPORT wxIcon; +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// MIME code tracing mask +#define TRACE_MIME _T("mime") + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// there are some fields which we don't understand but for which we don't give +// warnings as we know that they're not important - this function is used to +// test for them +static bool IsKnownUnimportantField(const wxString& field); + // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- @@ -873,17 +897,26 @@ wxFileTypeImpl::GetEntry(const wxFileType::MessageParameters& params) const wxString command; MailCapEntry *entry = m_manager->m_aEntries[m_index[0]]; while ( entry != NULL ) { - // notice that an empty command would always succeed (it's ok) + // get the command to run as the test for this entry command = wxFileType::ExpandCommand(entry->GetTestCmd(), params); - if ( command.IsEmpty() || (wxSystem(command) == 0) ) { - // ok, passed - wxLogTrace(wxT("Test '%s' for mime type '%s' succeeded."), + // don't trace the test result if there is no test at all + if ( command.IsEmpty() ) + { + // no test at all, ok + break; + } + + if ( wxSystem(command) == 0 ) { + // ok, test passed + wxLogTrace(TRACE_MIME, + wxT("Test '%s' for mime type '%s' succeeded."), command.c_str(), params.GetMimeType().c_str()); break; } else { - wxLogTrace(wxT("Test '%s' for mime type '%s' failed."), + wxLogTrace(TRACE_MIME, + wxT("Test '%s' for mime type '%s' failed."), command.c_str(), params.GetMimeType().c_str()); } @@ -1189,7 +1222,8 @@ void wxMimeTypesManagerImpl::AddMailcapInfo(const wxString& strType, bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName) { - wxLogTrace(wxT("--- Parsing mime.types file '%s' ---"), strFileName.c_str()); + wxLogTrace(TRACE_MIME, wxT("--- Parsing mime.types file '%s' ---"), + strFileName.c_str()); wxTextFile file(strFileName); if ( !file.Open() ) @@ -1345,7 +1379,8 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName) bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, bool fallback) { - wxLogTrace(wxT("--- Parsing mailcap file '%s' ---"), strFileName.c_str()); + wxLogTrace(TRACE_MIME, wxT("--- Parsing mailcap file '%s' ---"), + strFileName.c_str()); wxTextFile file(strFileName); if ( !file.Open() ) @@ -1393,18 +1428,31 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, strTest, strDesc, curField; // accumulator - for ( bool cont = TRUE; cont; pc++ ) { + bool cont = TRUE; + while ( cont ) { switch ( *pc ) { case wxT('\\'): // interpret the next character literally (notice that // backslash can be used for line continuation) if ( *++pc == wxT('\0') ) { - // fetch the next line. + // fetch the next line if there is one + if ( nLine == nLineCount - 1 ) { + // something is wrong, bail out + cont = FALSE; - // pc currently points to nowhere, but after the next - // pc++ in the for line it will point to the beginning - // of the next line in the file - pc = file[++nLine].c_str() - 1; + wxLogDebug(wxT("Mailcap file %s, line %d: " + "'\\' on the end of the last line " + "ignored."), + strFileName.c_str(), + nLine + 1); + } + else { + // pass to the beginning of the next line + pc = file[++nLine].c_str(); + + // skip pc++ at the end of the loop + continue; + } } else { // just a normal character @@ -1426,6 +1474,12 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, switch ( currentToken ) { case Field_Type: strType = curField; + if ( strType.empty() ) { + // I don't think that this is a valid mailcap + // entry, but try to interpret it somehow + strType = _T('*'); + } + if ( strType.Find(wxT('/')) == wxNOT_FOUND ) { // we interpret "type" as "type/*" strType += wxT("/*"); @@ -1441,7 +1495,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, break; case Field_Other: - { + if ( !curField.empty() ) { // "good" mailcap entry? bool ok = TRUE; @@ -1480,25 +1534,23 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, } else { // no, it's a simple flag - // TODO support the flags: - // 1. create an xterm for 'needsterminal' - // 2. append "| $PAGER" for 'copiousoutput' if ( curField == wxT("needsterminal") ) needsterminal = TRUE; - else if ( curField == wxT("copiousoutput") ) + else if ( curField == wxT("copiousoutput")) { + // copiousoutput impies that the + // viewer is a console program + needsterminal = copiousoutput = TRUE; - else if ( curField == wxT("textualnewlines") ) - ; // ignore - else + } + else { + // unknown flag ok = FALSE; + } } if ( !ok ) { - // we don't understand this field, but - // Netscape stores info in it, so don't warn - // about it - if ( curField.Left(16u) != "x-mozilla-flags=" ) + if ( !IsKnownUnimportantField(curField) ) { // don't flood the user with error // messages if we don't understand @@ -1518,6 +1570,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, } } } + //else: the field is empty, ignore silently // it already has this value //currentToken = Field_Other; @@ -1534,6 +1587,9 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, default: curField += *pc; } + + // continue in the same line + pc++; } // check that we really read something reasonable @@ -1543,6 +1599,19 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName, strFileName.c_str(), nLine + 1); } else { + // support for flags: + // 1. create an xterm for 'needsterminal' + // 2. append "| $PAGER" for 'copiousoutput' + if ( copiousoutput ) { + const wxChar *p = wxGetenv(_T("PAGER")); + strOpenCmd << _T(" | ") << (p ? p : _T("more")); + } + + if ( needsterminal ) { + strOpenCmd.Printf(_T("xterm -e sh -c '%s'"), + strOpenCmd.c_str()); + } + MailCapEntry *entry = new MailCapEntry(strOpenCmd, strPrintCmd, strTest); @@ -1638,6 +1707,29 @@ size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes) return mimetypes.GetCount(); } +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +static bool IsKnownUnimportantField(const wxString& fieldAll) +{ + static const wxChar *knownFields[] = + { + _T("x-mozilla-flags"), + _T("nametemplate"), + _T("textualnewlines"), + }; + + wxString field = fieldAll.BeforeFirst(_T('=')); + for ( size_t n = 0; n < WXSIZEOF(knownFields); n++ ) + { + if ( field.CmpNoCase(knownFields[n]) == 0 ) + return TRUE; + } + + return FALSE; +} + #endif // wxUSE_FILE && wxUSE_TEXTFILE diff --git a/src/unix/net.cpp b/src/unix/net.cpp deleted file mode 100644 index 8fff0bfdd1..0000000000 --- a/src/unix/net.cpp +++ /dev/null @@ -1,422 +0,0 @@ -// -*- c++ -*- /////////////////////////////////////////////////////////////// -// Name: unix/net.cpp -// Purpose: Network related wxWindows classes and functions -// Author: Karsten Ballüder -// Modified by: -// Created: 03.10.99 -// RCS-ID: $Id$ -// Copyright: (c) Karsten Ballüder -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#include "wx/setup.h" - -#if wxUSE_DIALUP_MANAGER - -#ifndef WX_PRECOMP -# include "wx/defs.h" -#endif // !PCH - -#include "wx/string.h" -#include "wx/event.h" -#include "wx/net.h" -#include "wx/timer.h" -#include "wx/filefn.h" -#include "wx/utils.h" -#include "wx/log.h" -#include "wx/file.h" - -#include -#include -#include -#include -#define __STRICT_ANSI__ -#include -#include -#include -#include -#include -#include - -// ---------------------------------------------------------------------------- -// A class which groups functions dealing with connecting to the network from a -// workstation using dial-up access to the net. There is at most one instance -// of this class in the program accessed via GetDialUpManager(). -// ---------------------------------------------------------------------------- - -/* TODO - * - * 1. more configurability for Unix: i.e. how to initiate the connection, how - * to check for online status, &c. - * 2. add a "long Dial(long connectionId = -1)" function which asks the user - * about which connection to dial (this may be done using native dialogs - * under NT, need generic dialogs for all others) and returns the identifier - * of the selected connection (it's opaque to the application) - it may be - * reused later to dial the same connection later (or use strings instead of - * longs may be?) - * 3. add an async version of dialing functions which notify the caller about - * the progress (or may be even start another thread to monitor it) - * 4. the static creation/accessor functions are not MT-safe - but is this - * really crucial? I think we may suppose they're always called from the - * main thread? - */ - -class WXDLLEXPORT wxDialUpManagerImpl : public wxDialUpManager -{ -public: - wxDialUpManagerImpl() - { - m_IsOnline = -1; // unknown - m_timer = NULL; - m_CanUseIfconfig = -1; // unknown - m_BeaconHost = WXDIALUP_MANAGER_DEFAULT_BEACONHOST; - m_BeaconPort = 80; - } - - /** Could the dialup manager be initialized correctly? If this function - returns FALSE, no other functions will work neither, so it's a good idea - to call this function and check its result before calling any other - wxDialUpManager methods. - */ - virtual bool IsOk() const - { return TRUE; } - - /** The simplest way to initiate a dial up: this function dials the given - ISP (exact meaning of the parameter depends on the platform), returns - TRUE on success or FALSE on failure and logs the appropriate error - message in the latter case. - @param nameOfISP optional paramater for dial program - @param username unused - @param password unused - */ - virtual bool Dial(const wxString& nameOfISP, - const wxString& WXUNUSED(username), - const wxString& WXUNUSED(password)); - - /// Hang up the currently active dial up connection. - virtual bool HangUp(); - - // returns TRUE if the computer is connected to the network: under Windows, - // this just means that a RAS connection exists, under Unix we check that - // the "well-known host" (as specified by SetWellKnownHost) is reachable - virtual bool IsOnline() const - { - if( (! m_timer) // we are not polling, so test now: - || m_IsOnline == -1 - ) - CheckStatus(); - return m_IsOnline != 0; - } - - // sometimes the built-in logic for determining the online status may fail, - // so, in general, the user should be allowed to override it. This function - // allows to forcefully set the online status - whatever our internal - // algorithm may think about it. - virtual void SetOnlineStatus(bool isOnline = TRUE) - { m_IsOnline = isOnline; } - - // set misc wxDialUpManager options - // -------------------------------- - - // enable automatical checks for the connection status and sending of - // wxEVT_DIALUP_CONNECTED/wxEVT_DIALUP_DISCONNECTED events. The interval - // parameter is only for Unix where we do the check manually: under - // Windows, the notification about the change of connection status is - // instantenous. - // - // Returns FALSE if couldn't set up automatic check for online status. - virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds); - - // disable automatic check for connection status change - notice that the - // wxEVT_DIALUP_XXX events won't be sent any more neither. - virtual void DisableAutoCheckOnlineStatus(); - - // under Unix, the value of well-known host is used to check whether we're - // connected to the internet. It's unused under Windows, but this function - // is always safe to call. The default value is www.yahoo.com. - virtual void SetWellKnownHost(const wxString& hostname, - int portno = 80); - /** Sets the commands to start up the network and to hang up - again. Used by the Unix implementations only. - */ - virtual void SetConnectCommand(const wxString &command, const wxString &hupcmd) - { m_ConnectCommand = command; m_HangUpCommand = hupcmd; } - -private: - /// -1: don´t know, 0 = no, 1 = yes - int m_IsOnline; - - /// Can we use ifconfig to list active devices? - int m_CanUseIfconfig; - /// The path to ifconfig - wxString m_IfconfigPath; - - /// beacon host: - wxString m_BeaconHost; - /// beacon host portnumber for connect: - int m_BeaconPort; - - /// command to connect to network - wxString m_ConnectCommand; - /// command to hang up - wxString m_HangUpCommand; - /// name of ISP - wxString m_ISPname; - /// a timer for regular testing - class AutoCheckTimer *m_timer; - - friend class AutoCheckTimer; - /// determine status - void CheckStatus(void) const; - - /// real status check - void CheckStatusInternal(void); -}; - - -class AutoCheckTimer : public wxTimer -{ -public: - AutoCheckTimer(wxDialUpManagerImpl *dupman) - { - m_dupman = dupman; - m_started = FALSE; - } - - virtual bool Start( int millisecs = -1 ) - { m_started = TRUE; return wxTimer::Start(millisecs, FALSE); } - - virtual void Notify() - { wxLogTrace("Checking dial up network status."); m_dupman->CheckStatus(); } - - virtual void Stop() - { if ( m_started ) wxTimer::Stop(); } -public: - bool m_started; - wxDialUpManagerImpl *m_dupman; -}; - -bool -wxDialUpManagerImpl::Dial(const wxString &isp, - const wxString & WXUNUSED(username), - const wxString & WXUNUSED(password)) -{ - if(m_IsOnline == 1) - return FALSE; - m_IsOnline = -1; - m_ISPname = isp; - wxString cmd; - if(m_ConnectCommand.Find("%s")) - cmd.Printf(m_ConnectCommand,m_ISPname.c_str()); - else - cmd = m_ConnectCommand; - return wxExecute(cmd, /* sync */ TRUE) == 0; -} - -bool -wxDialUpManagerImpl::HangUp(void) -{ - if(m_IsOnline == 0) - return FALSE; - m_IsOnline = -1; - wxString cmd; - if(m_HangUpCommand.Find("%s")) - cmd.Printf(m_HangUpCommand,m_ISPname.c_str()); - else - cmd = m_HangUpCommand; - return wxExecute(cmd, /* sync */ TRUE) == 0; -} - - -bool -wxDialUpManagerImpl::EnableAutoCheckOnlineStatus(size_t nSeconds) -{ - wxASSERT(m_timer == NULL); - m_timer = new AutoCheckTimer(this); - bool rc = m_timer->Start(nSeconds*1000); - if(! rc) - { - delete m_timer; - m_timer = NULL; - } - return rc; -} - -void -wxDialUpManagerImpl::DisableAutoCheckOnlineStatus() -{ - wxASSERT(m_timer != NULL); - m_timer->Stop(); - delete m_timer; - m_timer = NULL; -} - - -void -wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) -{ - /// does hostname contain a port number? - wxString port = hostname.After(':'); - if(port.Length()) - { - m_BeaconHost = hostname.Before(':'); - m_BeaconPort = atoi(port); - } - else - { - m_BeaconHost = hostname; - m_BeaconPort = portno; - } -} - - -void -wxDialUpManagerImpl::CheckStatus(void) const -{ - // This function calls the CheckStatusInternal() helper function - // which is OS - specific and then sends the events. - - int oldIsOnline = m_IsOnline; - ( /* non-const */ (wxDialUpManagerImpl *)this)->CheckStatusInternal(); - - // now send the events as appropriate: - if(m_IsOnline != oldIsOnline) - { - if(m_IsOnline) - ; // send ev - else - ; // send ev - } -} - -/* - We have three methods that we can use: - - 1. test via /sbin/ifconfig and grep for "sl", "ppp", "pl" - --> should be fast enough for regular polling - 2. test if we can reach the well known beacon host - --> too slow for polling - 3. check /proc/net/dev on linux?? - This method should be preferred, if possible. Need to do more - testing. - -*/ - -void -wxDialUpManagerImpl::CheckStatusInternal(void) -{ - m_IsOnline = -1; - - // First time check for ifconfig location. We only use the variant - // which does not take arguments, a la GNU. - if(m_CanUseIfconfig == -1) // unknown - { - if(wxFileExists("/sbin/ifconfig")) - m_IfconfigPath = "/sbin/ifconfig"; - else if(wxFileExists("/usr/sbin/ifconfig")) - m_IfconfigPath = "/usr/sbin/ifconfig"; - } - - wxLogNull ln; // suppress all error messages - // Let´s try the ifconfig method first, should be fastest: - if(m_CanUseIfconfig != 0) // unknown or yes - { - wxASSERT(m_IfconfigPath.length()); - - wxString tmpfile = wxGetTempFileName("_wxdialuptest"); - wxString cmd = "/bin/sh -c \'"; - cmd << m_IfconfigPath << " >" << tmpfile << '\''; - /* I tried to add an option to wxExecute() to not close stdout, - so we could let ifconfig write directly to the tmpfile, but - this does not work. That should be faster, as it doesn´t call - the shell first. I have no idea why. :-( (KB) */ -#if 0 - // temporarily redirect stdout/stderr: - int - new_stdout = dup(STDOUT_FILENO), - new_stderr = dup(STDERR_FILENO); - close(STDOUT_FILENO); - close(STDERR_FILENO); - - int - // new stdout: - output_fd = open(tmpfile, O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR), - // new stderr: - null_fd = open("/dev/null", O_CREAT, S_IRUSR|S_IWUSR); - // verify well behaved unix behaviour: - wxASSERT(output_fd == STDOUT_FILENO); - wxASSERT(null_fd == STDERR_FILENO); - int rc = wxExecute(m_IfconfigPath,TRUE /* sync */,NULL ,wxEXECUTE_DONT_CLOSE_FDS); - close(null_fd); close(output_fd); - // restore old stdout, stderr: - int test; - test = dup(new_stdout); close(new_stdout); wxASSERT(test == STDOUT_FILENO); - test = dup(new_stderr); close(new_stderr); wxASSERT(test == STDERR_FILENO); - if(rc == 0) -#endif - if(wxExecute(cmd,TRUE /* sync */) == 0) - { - m_CanUseIfconfig = 1; - wxFile file; - if( file.Open(tmpfile) ) - { - char *output = new char [file.Length()+1]; - output[file.Length()] = '\0'; - if(file.Read(output,file.Length()) == file.Length()) - { - if(strstr(output,"ppp") // ppp - || strstr(output,"sl") // slip - || strstr(output,"pl") // plip - ) - m_IsOnline = 1; - else - m_IsOnline = 0; - } - file.Close(); - delete [] output; - } - // else m_IsOnline remains -1 as we don't know for sure - } - else // could not run ifconfig correctly - m_CanUseIfconfig = 0; // don´t try again - (void) wxRemoveFile(tmpfile); - if(m_IsOnline != -1) // we are done - return; - } - - // second method: try to connect to well known host: - // This can be used under Win 9x, too! - struct hostent *hp; - struct sockaddr_in serv_addr; - int sockfd; - - m_IsOnline = 0; // assume false - if((hp = gethostbyname(m_BeaconHost)) == NULL) - return; // no DNS no net - - serv_addr.sin_family = hp->h_addrtype; - memcpy(&serv_addr.sin_addr,hp->h_addr, hp->h_length); - serv_addr.sin_port = htons(m_BeaconPort); - if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) - { - // sys_error("cannot create socket for gw"); - return; - } - if( connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) - { - //sys_error("cannot connect to server"); - return; - } - //connected! - close(sockfd); -} - - -/* static */ -wxDialUpManager * -wxDialUpManager::wxDialUpManager::Create(void) -{ - return new wxDialUpManagerImpl; -} - -#endif // wxUSE_DIALUP_MANAGER diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 49067b4d82..b749e020b9 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -32,6 +32,12 @@ #include "wx/unix/execute.h" #endif +// SGI signal.h defines signal handler arguments differently depending on +// whether _LANGUAGE_C_PLUS_PLUS is set or not - do set it +#if defined(__SGI__) && !defined(_LANGUAGE_C_PLUS_PLUS) + #define _LANGUAGE_C_PLUS_PLUS 1 +#endif // SGI hack + #include #include #include @@ -397,7 +403,14 @@ long wxExecute(wxChar **argv, bool sync, wxProcess *process) { - wxCHECK_MSG( *argv, 0, wxT("can't exec empty command") ); + // for the sync execution, we return -1 to indicate failure, but for async + // case we return 0 which is never a valid PID + // + // we define this as a macro, not a variable, to avoid compiler warnings + // about "ERROR_RETURN_CODE value may be clobbered by fork()" + #define ERROR_RETURN_CODE ((sync) ? -1 : 0) + + wxCHECK_MSG( *argv, ERROR_RETURN_CODE, wxT("can't exec empty command") ); #if wxUSE_UNICODE int mb_argc = 0; @@ -432,18 +445,22 @@ long wxExecute(wxChar **argv, ARGS_CLEANUP; - return 0; + return ERROR_RETURN_CODE; } #endif // wxUSE_GUI - int pipeIn[2]; - int pipeOut[2]; + // pipes for inter process communication + int pipeIn[2], // stdin + pipeOut[2], // stdout + pipeErr[2]; // stderr + pipeIn[0] = pipeIn[1] = - pipeOut[0] = pipeOut[1] = -1; + pipeOut[0] = pipeOut[1] = + pipeErr[0] = pipeErr[1] = -1; if ( process && process->IsRedirected() ) { - if ( pipe(pipeIn) == -1 || pipe(pipeOut) == -1 ) + if ( pipe(pipeIn) == -1 || pipe(pipeOut) == -1 || pipe(pipeErr) == -1 ) { #if wxUSE_GUI // free previously allocated resources @@ -456,7 +473,7 @@ long wxExecute(wxChar **argv, ARGS_CLEANUP; - return 0; + return ERROR_RETURN_CODE; } } @@ -476,13 +493,15 @@ long wxExecute(wxChar **argv, close(pipeIn[1]); close(pipeOut[0]); close(pipeOut[1]); + close(pipeErr[0]); + close(pipeErr[1]); #endif // wxUSE_GUI wxLogSysError( _("Fork failed") ); ARGS_CLEANUP; - return 0; + return ERROR_RETURN_CODE; } else if ( pid == 0 ) // we're in child { @@ -498,7 +517,7 @@ long wxExecute(wxChar **argv, { for ( int fd = 0; fd < FD_SETSIZE; fd++ ) { - if ( fd == pipeIn[0] || fd == pipeOut[1] + if ( fd == pipeIn[0] || fd == pipeOut[1] || fd == pipeErr[1] #if wxUSE_GUI || fd == end_proc_detect[1] #endif // wxUSE_GUI @@ -514,19 +533,19 @@ long wxExecute(wxChar **argv, } } - // redirect stdio and stdout - // (TODO: what about stderr?) + // redirect stdio, stdout and stderr if ( pipeIn[0] != -1 ) { if ( dup2(pipeIn[0], STDIN_FILENO) == -1 || - dup2(pipeOut[1], STDOUT_FILENO) == -1 ) + dup2(pipeOut[1], STDOUT_FILENO) == -1 || + dup2(pipeErr[1], STDERR_FILENO) == -1 ) { - wxLogSysError(_("Failed to redirect child process " - "input/output")); + wxLogSysError(_("Failed to redirect child process input/output")); } close(pipeIn[0]); close(pipeOut[1]); + close(pipeErr[1]); } execvp (*mb_argv, mb_argv); @@ -544,10 +563,13 @@ long wxExecute(wxChar **argv, // These two streams are relative to this process. wxOutputStream *outStream = new wxProcessFileOutputStream(pipeIn[1]); wxInputStream *inStream = new wxProcessFileInputStream(pipeOut[0]); + wxInputStream *errStream = new wxProcessFileInputStream(pipeErr[0]); + close(pipeIn[0]); // close reading side close(pipeOut[1]); // close writing side + close(pipeErr[1]); // close writing side - process->SetPipeStreams(inStream, outStream); + process->SetPipeStreams(inStream, outStream, errStream); } #if wxUSE_GUI @@ -603,12 +625,11 @@ long wxExecute(wxChar **argv, return exitcode; #endif // wxUSE_GUI } - - return 0; - - #undef ARGS_CLEANUP } +#undef ERROR_RETURN_CODE +#undef ARGS_CLEANUP + // ---------------------------------------------------------------------------- // file and directory functions // ---------------------------------------------------------------------------- @@ -848,7 +869,7 @@ long wxGetFreeMemory() #include -static void wxFatalSignalHandler(int WXUNUSED(signal)) +static void wxFatalSignalHandler(wxTYPE_SA_HANDLER) { if ( wxTheApp ) { diff --git a/src/wxWin.icc b/src/wxWin.icc index 011b8eb501..2d60341ff1 100644 --- a/src/wxWin.icc +++ b/src/wxWin.icc @@ -16,6 +16,8 @@ option ProjectOptions = gen(arch, "pentium2"), lang(longlong, "yes"), gen(mangl perform { run before '-mkdir ' '..\\src\\common\\dbgos240' + run before 'copy ' '..\\src\common\\dosyacc.c ' '..\\src\\common\\y_tab.c' + run before 'copy ' '..\\src\common\\doslex.c ' '..\\src\\common\\lex_yy.c' } target type("lib") "..\\LIB\\wx40.lib" { diff --git a/src/wxvc.dsp b/src/wxvc.dsp index 039bfb973e..f03654b43d 100644 --- a/src/wxvc.dsp +++ b/src/wxvc.dsp @@ -97,6 +97,10 @@ SOURCE=.\common\clipcmn.cpp # End Source File # Begin Source File +SOURCE=.\common\cmdline.cpp +# End Source File +# Begin Source File + SOURCE=.\common\cmndata.cpp # End Source File # Begin Source File @@ -552,6 +556,10 @@ SOURCE=.\generic\panelg.cpp # End Source File # Begin Source File +SOURCE=.\generic\plot.cpp +# End Source File +# Begin Source File + SOURCE=.\generic\progdlgg.cpp # End Source File # Begin Source File @@ -883,6 +891,10 @@ SOURCE=.\msw\gsockmsw.c # End Source File # Begin Source File +SOURCE=.\msw\helpchm.cpp +# End Source File +# Begin Source File + SOURCE=.\msw\helpwin.cpp # End Source File # Begin Source File diff --git a/src/wxvc.dsw b/src/wxvc.dsw index f23cbe7897..cca7eb869f 100644 --- a/src/wxvc.dsw +++ b/src/wxvc.dsw @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "jpeg"=.\jpeg\jpeg.dsp - Package Owner=<4> +Project: "jpeg"=.\jpeg\JpegVC.dsp - Package Owner=<4> Package=<5> {{{ @@ -15,7 +15,7 @@ Package=<4> ############################################################################### -Project: "png"=.\png\png.dsp - Package Owner=<4> +Project: "png"=.\png\PngVC.dsp - Package Owner=<4> Package=<5> {{{ @@ -27,7 +27,7 @@ Package=<4> ############################################################################### -Project: "tiff"=.\tiff\tiff.dsp - Package Owner=<4> +Project: "tiff"=.\tiff\TiffVC.dsp - Package Owner=<4> Package=<5> {{{ @@ -66,7 +66,7 @@ Package=<4> ############################################################################### -Project: "xpm"=.\xpm\xpm.dsp - Package Owner=<4> +Project: "xpm"=.\xpm\XpmVC.dsp - Package Owner=<4> Package=<5> {{{ @@ -78,7 +78,7 @@ Package=<4> ############################################################################### -Project: "zlib"=.\zlib\zlib.dsp - Package Owner=<4> +Project: "zlib"=.\zlib\ZlibVC.dsp - Package Owner=<4> Package=<5> {{{ diff --git a/src/wxvc_dll.dsp b/src/wxvc_dll.dsp index add461b25a..d2fff0abd7 100644 --- a/src/wxvc_dll.dsp +++ b/src/wxvc_dll.dsp @@ -53,7 +53,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"../lib/wxdll.dll" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"../lib/wx22_9.dll" !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" @@ -69,7 +69,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXMAKINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXMAKINGDLL=1 /Yu"wx/wxprec.h" /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x809 /d "_DEBUG" @@ -79,7 +79,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"../lib/wxdlld.dll" /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"../lib/wx22_9d.dll" /pdbtype:sept !ENDIF @@ -104,6 +104,10 @@ SOURCE=.\common\clipcmn.cpp # End Source File # Begin Source File +SOURCE=.\common\cmdline.cpp +# End Source File +# Begin Source File + SOURCE=.\common\cmndata.cpp # End Source File # Begin Source File @@ -554,6 +558,10 @@ SOURCE=.\generic\panelg.cpp # End Source File # Begin Source File +SOURCE=.\generic\plot.cpp +# End Source File +# Begin Source File + SOURCE=.\generic\progdlgg.cpp # End Source File # Begin Source File @@ -885,6 +893,10 @@ SOURCE=.\msw\gsockmsw.c # End Source File # Begin Source File +SOURCE=.\msw\helpchm.cpp +# End Source File +# Begin Source File + SOURCE=.\msw\helpwin.cpp # End Source File # Begin Source File @@ -1416,7 +1428,7 @@ SOURCE=.\jpeg\jcapimin.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1433,7 +1445,7 @@ SOURCE=.\jpeg\jcapistd.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1450,7 +1462,7 @@ SOURCE=.\jpeg\jccoefct.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1467,7 +1479,7 @@ SOURCE=.\jpeg\jccolor.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1484,7 +1496,7 @@ SOURCE=.\jpeg\jcdctmgr.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1501,7 +1513,7 @@ SOURCE=.\jpeg\jchuff.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1518,7 +1530,7 @@ SOURCE=.\jpeg\jcinit.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1535,7 +1547,7 @@ SOURCE=.\jpeg\jcmainct.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1552,7 +1564,7 @@ SOURCE=.\jpeg\jcmarker.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1569,7 +1581,7 @@ SOURCE=.\jpeg\jcmaster.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1586,7 +1598,7 @@ SOURCE=.\jpeg\jcomapi.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1603,7 +1615,7 @@ SOURCE=.\jpeg\jcparam.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1620,7 +1632,7 @@ SOURCE=.\jpeg\jcphuff.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1637,7 +1649,7 @@ SOURCE=.\jpeg\jcprepct.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1654,7 +1666,7 @@ SOURCE=.\jpeg\jcsample.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1671,7 +1683,7 @@ SOURCE=.\jpeg\jctrans.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1688,7 +1700,7 @@ SOURCE=.\jpeg\jdapimin.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1705,7 +1717,7 @@ SOURCE=.\jpeg\jdapistd.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1722,7 +1734,7 @@ SOURCE=.\jpeg\jdatadst.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1739,7 +1751,7 @@ SOURCE=.\jpeg\jdatasrc.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1756,7 +1768,7 @@ SOURCE=.\jpeg\jdcoefct.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1773,7 +1785,7 @@ SOURCE=.\jpeg\jdcolor.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1790,7 +1802,7 @@ SOURCE=.\jpeg\jddctmgr.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1807,7 +1819,7 @@ SOURCE=.\jpeg\jdhuff.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1824,7 +1836,7 @@ SOURCE=.\jpeg\jdinput.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1841,7 +1853,7 @@ SOURCE=.\jpeg\jdmainct.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1858,7 +1870,7 @@ SOURCE=.\jpeg\jdmarker.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1875,7 +1887,7 @@ SOURCE=.\jpeg\jdmaster.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1892,7 +1904,7 @@ SOURCE=.\jpeg\jdmerge.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1909,7 +1921,7 @@ SOURCE=.\jpeg\jdphuff.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1926,7 +1938,7 @@ SOURCE=.\jpeg\jdpostct.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1943,7 +1955,7 @@ SOURCE=.\jpeg\jdsample.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1960,7 +1972,7 @@ SOURCE=.\jpeg\jdtrans.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1977,7 +1989,7 @@ SOURCE=.\jpeg\jerror.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -1994,7 +2006,7 @@ SOURCE=.\jpeg\jfdctflt.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2011,7 +2023,7 @@ SOURCE=.\jpeg\jfdctfst.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2028,7 +2040,7 @@ SOURCE=.\jpeg\jfdctint.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2045,7 +2057,7 @@ SOURCE=.\jpeg\jidctflt.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2062,7 +2074,7 @@ SOURCE=.\jpeg\jidctfst.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2079,7 +2091,7 @@ SOURCE=.\jpeg\jidctint.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2096,7 +2108,7 @@ SOURCE=.\jpeg\jidctred.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2113,7 +2125,7 @@ SOURCE=.\jpeg\jmemmgr.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2130,7 +2142,7 @@ SOURCE=.\jpeg\jmemnobs.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2147,7 +2159,7 @@ SOURCE=.\jpeg\jquant1.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2164,7 +2176,7 @@ SOURCE=.\jpeg\jquant2.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF @@ -2181,7 +2193,7 @@ SOURCE=.\jpeg\jutils.c !ELSEIF "$(CFG)" == "wxvc_dll - Win32 Debug" -# ADD CPP /I ".." +# ADD CPP /Zi /I ".." # SUBTRACT CPP /YX /Yc /Yu !ENDIF diff --git a/src/xpm/attrib.c b/src/xpm/Attrib.c similarity index 99% rename from src/xpm/attrib.c rename to src/xpm/Attrib.c index fce8eca394..dafaec219f 100644 --- a/src/xpm/attrib.c +++ b/src/xpm/Attrib.c @@ -141,7 +141,7 @@ XpmFreeExtensions(extensions, nextensions) char **sptr; if (extensions) { - for (i = 0, ext = extensions; i < nextensions; i++, ext++) { + for (i = 0, ext = extensions; i < (unsigned)nextensions; i++, ext++) { if (ext->name) XpmFree(ext->name); nlines = ext->nlines; diff --git a/src/xpm/crbuffri.c b/src/xpm/CrBufFrI.c similarity index 100% rename from src/xpm/crbuffri.c rename to src/xpm/CrBufFrI.c diff --git a/src/xpm/crdatfri.c b/src/xpm/CrDatFrI.c similarity index 100% rename from src/xpm/crdatfri.c rename to src/xpm/CrDatFrI.c diff --git a/src/xpm/crifrbuf.c b/src/xpm/CrIFrBuf.c similarity index 100% rename from src/xpm/crifrbuf.c rename to src/xpm/CrIFrBuf.c diff --git a/src/xpm/crifrdat.c b/src/xpm/CrIFrDat.c similarity index 100% rename from src/xpm/crifrdat.c rename to src/xpm/CrIFrDat.c diff --git a/src/xpm/image.c b/src/xpm/Image.c similarity index 100% rename from src/xpm/image.c rename to src/xpm/Image.c diff --git a/src/xpm/info.c b/src/xpm/Info.c similarity index 100% rename from src/xpm/info.c rename to src/xpm/Info.c diff --git a/src/xpm/rdftodat.c b/src/xpm/RdFToDat.c similarity index 100% rename from src/xpm/rdftodat.c rename to src/xpm/RdFToDat.c diff --git a/src/xpm/rdftoi.c b/src/xpm/RdFToI.c similarity index 99% rename from src/xpm/rdftoi.c rename to src/xpm/RdFToI.c index 89cdc4ec0f..eff47d3ef3 100644 --- a/src/xpm/rdftoi.c +++ b/src/xpm/RdFToI.c @@ -155,8 +155,9 @@ OpenReadFile(filename, mdata) #endif { #ifndef NO_ZPIPE - char *compressfile, buf[BUFSIZ]; + char buf[BUFSIZ]; # ifdef STAT_ZFILE + char *compressfile; struct stat status; # endif #endif diff --git a/src/xpm/wrffrdat.c b/src/xpm/WrFFrDat.c similarity index 100% rename from src/xpm/wrffrdat.c rename to src/xpm/WrFFrDat.c diff --git a/src/xpm/wrffri.c b/src/xpm/WrFFrI.c similarity index 100% rename from src/xpm/wrffri.c rename to src/xpm/WrFFrI.c diff --git a/src/xpm/xpmi.h b/src/xpm/XpmI.h similarity index 100% rename from src/xpm/xpmi.h rename to src/xpm/XpmI.h diff --git a/src/xpm/XpmVC.dsp b/src/xpm/XpmVC.dsp new file mode 100644 index 0000000000..3cd176618c --- /dev/null +++ b/src/xpm/XpmVC.dsp @@ -0,0 +1,186 @@ +# Microsoft Developer Studio Project File - Name="xpm" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=xpm - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "xpm.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "xpm.mak" CFG="xpm - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "xpm - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "xpm - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "xpm - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\lib\xpm.lib" + +!ELSEIF "$(CFG)" == "xpm - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "xpm___Win32_Debug" +# PROP BASE Intermediate_Dir "xpm___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\lib\xpmd.lib" + +!ENDIF + +# Begin Target + +# Name "xpm - Win32 Release" +# Name "xpm - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\attrib.c +# End Source File +# Begin Source File + +SOURCE=.\crbuffri.c +# End Source File +# Begin Source File + +SOURCE=.\crdatfri.c +# End Source File +# Begin Source File + +SOURCE=.\create.c +# End Source File +# Begin Source File + +SOURCE=.\crifrbuf.c +# End Source File +# Begin Source File + +SOURCE=.\crifrdat.c +# End Source File +# Begin Source File + +SOURCE=.\dataxpm.c +# End Source File +# Begin Source File + +SOURCE=.\hashtab.c +# End Source File +# Begin Source File + +SOURCE=.\imagexpm.c +# End Source File +# Begin Source File + +SOURCE=.\info.c +# End Source File +# Begin Source File + +SOURCE=.\misc.c +# End Source File +# Begin Source File + +SOURCE=.\parse.c +# End Source File +# Begin Source File + +SOURCE=.\rdftodat.c +# End Source File +# Begin Source File + +SOURCE=.\rdftoi.c +# End Source File +# Begin Source File + +SOURCE=.\rgb.c +# End Source File +# Begin Source File + +SOURCE=.\scan.c +# End Source File +# Begin Source File + +SOURCE=.\simx.c +# End Source File +# Begin Source File + +SOURCE=.\wrffrdat.c +# End Source File +# Begin Source File + +SOURCE=.\wrffri.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\rgbtab.h +# End Source File +# Begin Source File + +SOURCE=.\simx.h +# End Source File +# Begin Source File + +SOURCE=.\xpm.h +# End Source File +# Begin Source File + +SOURCE=.\xpmi.h +# End Source File +# End Group +# End Target +# End Project diff --git a/src/png/png.dsw b/src/xpm/XpmVC.dsw similarity index 90% rename from src/png/png.dsw rename to src/xpm/XpmVC.dsw index 81564033ad..270daf62c1 100644 --- a/src/png/png.dsw +++ b/src/xpm/XpmVC.dsw @@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### -Project: "png"=.\png.dsp - Package Owner=<4> +Project: "xpm"=.\XpmVC.dsp - Package Owner=<4> Package=<5> {{{ diff --git a/src/xpm/makefile.b32 b/src/xpm/makefile.b32 index 810c189353..c912cd6456 100644 --- a/src/xpm/makefile.b32 +++ b/src/xpm/makefile.b32 @@ -9,3 +9,10 @@ OBJECTS = attrib.obj crbuffri.obj crdatfri.obj create.obj crifrbuf.obj crifrdat. rdftodat.obj rdftoi.obj rgb.obj scan.obj simx.obj wrffrdat.obj wrffri.obj !include $(WXWIN)\src\makelib.b32 + +create.obj: create.c + bcc32 $(CPPFLAGS) -Od -P- -c create.c + +rgb.obj: rgb.c + bcc32 $(CPPFLAGS) -Od -P- -c rgb.c + diff --git a/src/xpm/makefile.vc b/src/xpm/makefile.vc index 0336b1eb82..6a2db85d80 100644 --- a/src/xpm/makefile.vc +++ b/src/xpm/makefile.vc @@ -15,6 +15,8 @@ THISDIR=$(WXWIN)\src\xpm !if "$(FINAL)" == "1" LIBTARGET=$(WXDIR)\lib\xpm.lib +!else if "$(FINAL)" == "hybrid" +LIBTARGET=$(WXDIR)\lib\xpmh.lib !else LIBTARGET=$(WXDIR)\lib\xpmd.lib !endif diff --git a/src/xpm/scan.c b/src/xpm/scan.c index c4ee723280..8660ff99ed 100644 --- a/src/xpm/scan.c +++ b/src/xpm/scan.c @@ -506,7 +506,7 @@ ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes) return (XpmNoMemory); for (i = 0, i2 = mask, color = colors, xcolor = xcolors; - i < ncolors; i++, i2++, color++, xcolor++, pixels++) { + i < (unsigned)ncolors; i++, i2++, color++, xcolor++, pixels++) { if (!(s = color->string = (char *) XpmMalloc(cpp + 1))) { XpmFree(xcolors); @@ -549,7 +549,7 @@ ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes) } /* end 3.2 bc */ - for (i = 0, color = colors, xcolor = xcolors; i < ncolors; + for (i = 0, color = colors, xcolor = xcolors; i < (unsigned)ncolors; i++, color++, xcolor++) { /* look for related info from the attributes if any */ diff --git a/src/xpm/simx.c b/src/xpm/simx.c index 04714849bf..1b648a7ee4 100644 --- a/src/xpm/simx.c +++ b/src/xpm/simx.c @@ -38,7 +38,7 @@ #ifdef FOR_MSW -#include "xpmi.h" /* for XpmMalloc */ +#include "XpmI.h" /* for XpmMalloc */ /* * On DOS size_t is only 2 bytes, thus malloc(size_t s) can only malloc diff --git a/src/xpm/xpm.dsp b/src/xpm/xpm.dsp index 3cd176618c..07451438e5 100644 --- a/src/xpm/xpm.dsp +++ b/src/xpm/xpm.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# ADD CPP /nologo /MD /W3 /GX- /O1 /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\lib\xpm.lib" +# ADD LIB32 /nologo !ELSEIF "$(CFG)" == "xpm - Win32 Debug" @@ -65,7 +65,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX- /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" @@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\lib\xpmd.lib" +# ADD LIB32 /nologo !ENDIF diff --git a/src/zlib/zlib.dsp b/src/zlib/ZlibVC.dsp similarity index 100% rename from src/zlib/zlib.dsp rename to src/zlib/ZlibVC.dsp diff --git a/src/zlib/ZlibVC.dsw b/src/zlib/ZlibVC.dsw new file mode 100644 index 0000000000..de32c7cf3a --- /dev/null +++ b/src/zlib/ZlibVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "zlib"=.\ZlibVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/src/zlib/makefile.vc b/src/zlib/makefile.vc index fdcbbb97c7..51b1348b74 100644 --- a/src/zlib/makefile.vc +++ b/src/zlib/makefile.vc @@ -17,6 +17,9 @@ FINAL=0 !if "$(FINAL)" == "0" CFLAGS=/Od $(CRTFLAG) /GX _CRTFLAG=/MDd +!else if "$(FINAL)" == "hybrid" +CFLAGS=/Od $(CRTFLAG) /GX +_CRTFLAG=/MD !else CFLAGS=-O2 $(CRTFLAG) /GX _CRTFLAG=/MD @@ -36,6 +39,8 @@ O=.obj !if "$(FINAL)" == "1" LIBTARGET=..\..\lib\zlib.lib +!else if "$(FINAL)" == "hybrid" +LIBTARGET=..\..\lib\zlibh.lib !else LIBTARGET=..\..\lib\zlibd.lib !endif diff --git a/src/zlib/makefile.wat b/src/zlib/makefile.wat index 7f62708415..7bf8971c7b 100644 --- a/src/zlib/makefile.wat +++ b/src/zlib/makefile.wat @@ -25,9 +25,9 @@ LIBTARGET=..\..\lib\zlib.lib OBJ1=adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) OBJ2=trees$(O) zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) OBJ3=infutil$(O) inffast$(O) -OBJP1=adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O) -OBJP2=trees$(O)+zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O) -OBJP3=infutil$(O)+inffast$(O) +OBJP1=adler32$(O) +compress$(O) +crc32$(O) +gzio$(O) +uncompr$(O) +deflate$(O) +OBJP2=trees$(O) +zutil$(O) +inflate$(O) +infblock$(O) +inftrees$(O) +infcodes$(O) +OBJP3=infutil$(O) +inffast$(O) # all: test @@ -85,7 +85,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h # we must cut the command line to fit in the MS/DOS 128 byte limit: $(LIBTARGET): $(OBJ1) $(OBJ2) $(OBJ3) - del $(LIBTARGET) + if exist $(LIBTARGET) del $(LIBTARGET) $(LIB) $(LIBTARGET) +$(OBJP1) $(LIB) $(LIBTARGET) +$(OBJP2) $(LIB) $(LIBTARGET) +$(OBJP3) diff --git a/src/zlib/zlib.dsw b/src/zlib/zlib.dsw deleted file mode 100644 index fae86d6c51..0000000000 --- a/src/zlib/zlib.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "zlib"=.\zlib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/src/zlib/zutil.h b/src/zlib/zutil.h index 1415c44225..9e06e03d47 100644 --- a/src/zlib/zutil.h +++ b/src/zlib/zutil.h @@ -73,7 +73,15 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ /* target dependencies */ -#ifdef MSDOS +#ifdef OS2 +# define OS_CODE 0x06 +#endif + +#ifdef WIN32 /* Window 95 & Windows NT */ +# define OS_CODE 0x0b +#endif + +#if defined(MSDOS) && !defined(OS_CODE) # define OS_CODE 0x00 # ifdef __TURBOC__ # if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) @@ -88,14 +96,6 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ # endif #endif -#ifdef OS2 -# define OS_CODE 0x06 -#endif - -#ifdef WIN32 /* Window 95 & Windows NT */ -# define OS_CODE 0x0b -#endif - #if defined(VAXC) || defined(VMS) # define OS_CODE 0x02 # define F_OPEN(name, mode) \ diff --git a/utils/HelpGen/Makefile.in b/utils/HelpGen/Makefile.in index 3e3d5388f5..6d36395442 100644 --- a/utils/HelpGen/Makefile.in +++ b/utils/HelpGen/Makefile.in @@ -1,7 +1,7 @@ all: - cd src; make + cd src; $(MAKE) clean: - cd src; make clean + cd src; $(MAKE) clean diff --git a/utils/HelpGen/src/HelpGen.cpp b/utils/HelpGen/src/HelpGen.cpp index 97ee2dcf7a..c59588cde7 100644 --- a/utils/HelpGen/src/HelpGen.cpp +++ b/utils/HelpGen/src/HelpGen.cpp @@ -436,10 +436,10 @@ private: static void usage() { wxString prog = g_argv[0]; - wxString basename = prog.BeforeLast('/'); + wxString basename = prog.AfterLast('/'); #ifdef __WXMSW__ if ( !basename ) - basename = prog.BeforeLast('\\'); + basename = prog.AfterLast('\\'); #endif if ( !basename ) basename = prog; @@ -788,7 +788,7 @@ void HelpGenVisitor::VisitClass( spClass& cl ) // the file name is built from the class name by removing the leading "wx" // if any and converting it to the lower case - wxString filename = m_directoryOut; + wxString filename; if ( name(0, 2) == "wx" ) { filename << name.c_str() + 2; } @@ -798,6 +798,7 @@ void HelpGenVisitor::VisitClass( spClass& cl ) filename.MakeLower(); filename += ".tex"; + filename.Prepend(m_directoryOut); if ( !m_overwrite && wxFile::Exists(filename) ) { wxLogError("Won't overwrite existing file '%s' - please use '-f'.", @@ -1938,6 +1939,9 @@ static const char *GetCurrentTime(const char *timeFormat) /* $Log$ + Revision 1.10.2.2 2000/03/27 15:33:10 VZ + don't trasnform output dir name to lower case + Revision 1.10 2000/03/11 10:05:23 VS now compiles with wxBase diff --git a/utils/HelpGen/src/HelpGenVC.dsp b/utils/HelpGen/src/HelpGenVC.dsp new file mode 100644 index 0000000000..d12d84f325 --- /dev/null +++ b/utils/HelpGen/src/HelpGenVC.dsp @@ -0,0 +1,348 @@ +# Microsoft Developer Studio Project File - Name="HelpGenVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=HelpGenVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "HelpGenVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "HelpGenVC.mak" CFG="HelpGenVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "HelpGenVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "HelpGenVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "HelpGenVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "HelpGenVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/helpgen.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/helpgen.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/helpgen.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/helpgen.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "HelpGenVC - Win32 Release" +# Name "HelpGenVC - Win32 Debug" +# Name "HelpGenVC - Win32 Debug DLL" +# Name "HelpGenVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\cjparser.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\cjparser.h +# End Source File +# Begin Source File + +SOURCE=.\docripper.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\docripper.h +# End Source File +# Begin Source File + +SOURCE=.\HelpGen.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\HelpGen.rc +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 /i "..\..\..\include" +# End Source File +# Begin Source File + +SOURCE=.\ifcontext.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\ifcontext.h +# End Source File +# Begin Source File + +SOURCE=.\markup.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\markup.h +# End Source File +# Begin Source File + +SOURCE=.\ripper_main.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\scriptbinder.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\scriptbinder.h +# End Source File +# Begin Source File + +SOURCE=.\sourcepainter.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\sourcepainter.h +# End Source File +# Begin Source File + +SOURCE=.\srcparser.cpp + +!IF "$(CFG)" == "HelpGenVC - Win32 Release" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "HelpGenVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\srcparser.h +# End Source File +# Begin Source File + +SOURCE=.\wxstlac.h +# End Source File +# Begin Source File + +SOURCE=.\wxstllst.h +# End Source File +# Begin Source File + +SOURCE=.\wxstlvec.h +# End Source File +# End Target +# End Project diff --git a/utils/HelpGen/src/HelpGenVC.dsw b/utils/HelpGen/src/HelpGenVC.dsw new file mode 100644 index 0000000000..80d524ef13 --- /dev/null +++ b/utils/HelpGen/src/HelpGenVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "HelpGenVC"=.\HelpGenVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/utils/HelpGen/src/markup.h b/utils/HelpGen/src/markup.h index 13e43a0a8c..7e1ccc6c7c 100644 --- a/utils/HelpGen/src/markup.h +++ b/utils/HelpGen/src/markup.h @@ -48,4 +48,4 @@ MarkupTagsT get_HTML_markup_tags(); // MarkupTagsT get_PostScript_markup_tags(); // MarkupTagsT get_Latex_markup_tags(); -#endif \ No newline at end of file +#endif diff --git a/utils/HelpGen/src/wx_extra_imps.cpp b/utils/HelpGen/src/wx_extra_imps.cpp index e4af6ef024..fcc09b2d79 100644 --- a/utils/HelpGen/src/wx_extra_imps.cpp +++ b/utils/HelpGen/src/wx_extra_imps.cpp @@ -13,18 +13,6 @@ #include "wx/defs.h" #endif -char * -copystring (const char *s) -{ - if (s == NULL) s = ""; - size_t len = strlen (s) + 1; - - char *news = new char[len]; - memcpy (news, s, len); // Should be the fastest - - return news; -} - #ifdef __WXMSW__ // from filefn.cpp void WXDLLEXPORT wxSplitPath(const char *pszFileName, @@ -73,9 +61,4 @@ const char *wxLocale::GetString(const char *szOrigString, return szOrigString; } -#else // !MSW -const char *wxGetTranslation(const char *str) -{ - return str; -} -#endif // MSW \ No newline at end of file +#endif // MSW diff --git a/utils/wxPython/demo/bitmaps/copy.bmp b/utils/Install/builder/bitmaps/copy.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/copy.bmp rename to utils/Install/builder/bitmaps/copy.bmp diff --git a/utils/Install/builder/bitmaps/copy.xpm b/utils/Install/builder/bitmaps/copy.xpm new file mode 100644 index 0000000000..47565c1cae --- /dev/null +++ b/utils/Install/builder/bitmaps/copy.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char *copy_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c None", +". c Black", +"X c Gray100", +"o c #000080", +/* pixels */ +" ", +" ...... ", +" .XXXX.. ", +" .XXXX.X. ", +" .X..X.oooooo ", +" .XXXXXoXXXXoo ", +" .X....oXXXXoXo ", +" .XXXXXoX..Xoooo", +" .X....oXXXXXXXo", +" .XXXXXoX.....Xo", +" ......oXXXXXXXo", +" oX.....Xo", +" oXXXXXXXo", +" ooooooooo", +" " +}; diff --git a/utils/Install/builder/bitmaps/cut.bmp b/utils/Install/builder/bitmaps/cut.bmp new file mode 100644 index 0000000000000000000000000000000000000000..15554338a01bc4d8f0a501c32237e84200e64583 GIT binary patch literal 238 zcmZvU!3}^Q5Cqr6gr}Ba8OD(CvKJo2^+{<|WDB@(K8*2TclNjo+kV075Ef~cCTYMZ z2hQ$)mH}PlY>+FWlp?l4?H9GSBqTFi~p=nI%+}YJ={H-mN0|?29BK#fUL#erbtT(lh^R?4vYy(d-6AGn1|j$rr}v KbDqI%Xjd+{i$y;G literal 0 HcmV?d00001 diff --git a/utils/Install/builder/bitmaps/help.xpm b/utils/Install/builder/bitmaps/help.xpm new file mode 100644 index 0000000000..50fdb4157e --- /dev/null +++ b/utils/Install/builder/bitmaps/help.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char *help_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c None", +". c Black", +"X c Blue", +"o c #000080", +/* pixels */ +" ", +" ...... ", +" .XXXXX.. ", +" .XX...oX.. ", +" .X.. .X.. ", +" .X.. .XX.. ", +" .. .XX.. ", +" .XX.. ", +" .X.. ", +" .X.. ", +" .o.. ", +" .. ", +" .XX.. ", +" .XX.. ", +" ... " +}; diff --git a/utils/wxPython/demo/bitmaps/new.bmp b/utils/Install/builder/bitmaps/new.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/new.bmp rename to utils/Install/builder/bitmaps/new.bmp diff --git a/utils/Install/builder/bitmaps/new.xpm b/utils/Install/builder/bitmaps/new.xpm new file mode 100644 index 0000000000..754d2d20a2 --- /dev/null +++ b/utils/Install/builder/bitmaps/new.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char *new_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +/* pixels */ +" ", +" ........ ", +" .XXXXXX.. ", +" .XXXXXX.X. ", +" .XXXXXX.... ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" .XXXXXXXXX. ", +" ........... ", +" " +}; diff --git a/utils/Install/builder/bitmaps/open.bmp b/utils/Install/builder/bitmaps/open.bmp new file mode 100644 index 0000000000000000000000000000000000000000..bbf93fe03364e63f3e18a3507a0e85ab8ea2f87d GIT binary patch literal 238 zcmXv{u@M3>3=;=;U&0ua+_3>YyQsonW~6N3OvKTr2(k@|B{{YeKb~(CUb3rr5zpcQ zCn>O}mP9XDa6kd~GO1FGG0<95V`X5i$V8neN$dxz4&8XX3!AZr-;ApY^eS-9oTLj~ Y^Hcc9z2|$wrXTtLH=Rc2n(WoWFRhqJ00000 literal 0 HcmV?d00001 diff --git a/utils/Install/builder/bitmaps/open.xpm b/utils/Install/builder/bitmaps/open.xpm new file mode 100644 index 0000000000..54748e910d --- /dev/null +++ b/utils/Install/builder/bitmaps/open.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char *open_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c None", +". c Black", +"X c Yellow", +"o c Gray100", +"O c #bfbf00", +/* pixels */ +" ", +" ... ", +" . . .", +" ..", +" ... ...", +" .XoX....... ", +" .oXoXoXoXo. ", +" .XoXoXoXoX. ", +" .oXoX..........", +" .XoX.OOOOOOOOO.", +" .oo.OOOOOOOOO. ", +" .X.OOOOOOOOO. ", +" ..OOOOOOOOO. ", +" ........... ", +" " +}; diff --git a/utils/Install/builder/bitmaps/page.bmp b/utils/Install/builder/bitmaps/page.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3dbd4b05b4c2d1a4f046141d450caf34c1a3d470 GIT binary patch literal 714 zcmaJk)fu{chJ-2TT-iZmtVS?uc5roS;-EuD8k*^vaH9hj_d6X ziQgC358^U$kRpEdIqzx8X~Jz0i&xCtBKWwA%eHOw^mwIrw+KG&;&N&1L*Q{1Xmx8p zxBo0O*pac2@{B`!>-fgLdSDP(C2}M>_DcBv60g*0UKyHhy!Oc8UYD-XBeIyOWTry_ zTA4Yuua#Ixm?vFMcI3@F*>XSp02Lyo AJ^%m! literal 0 HcmV?d00001 diff --git a/utils/wxPython/demo/bitmaps/paste.bmp b/utils/Install/builder/bitmaps/paste.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/paste.bmp rename to utils/Install/builder/bitmaps/paste.bmp diff --git a/utils/Install/builder/bitmaps/preview.bmp b/utils/Install/builder/bitmaps/preview.bmp new file mode 100644 index 0000000000000000000000000000000000000000..da1f4dbc4be6c2dd8fb9d7cb71cc48a4a7c139ca GIT binary patch literal 238 zcmZvVu?@p83pv2yNo4mlT?N_pr2ISnd1NHDM5O^cFcMc59&^> z)PfrwsOeYM05)2ipmU4fJIss+o(=cdQCu+!%TlZiKDH!a!aP2;C|UGpLD9M;zmsLJ XIp;lzIUm!ckI6HO{IjaYcZ_-fA4^nl literal 0 HcmV?d00001 diff --git a/utils/Install/builder/bitmaps/preview.xpm b/utils/Install/builder/bitmaps/preview.xpm new file mode 100644 index 0000000000..7e5e9cd06e --- /dev/null +++ b/utils/Install/builder/bitmaps/preview.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char *paste_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c Black", +". c None", +"X c Gray100", +"o c #808080", +"O c Cyan", +/* pixels */ +" .......", +" XXXXXXX ......", +" XXXXXXX . .....", +" XXXXXXX ....", +" XXXXXXXXXX ....", +" XXXXXXX ....", +" XXXXXX o..o ...", +" XXXXX oOO.oo ..", +" XXXXX .O..o. ..", +" XXXXX ....o. ..", +" XXXXX o..Ooo ..", +" XXXXXX o..o o..", +" XXXXXXX o .", +" XXXXXXXXXX . ", +" .. " +}; diff --git a/utils/Install/builder/bitmaps/print.bmp b/utils/Install/builder/bitmaps/print.bmp new file mode 100644 index 0000000000000000000000000000000000000000..00319b55bb23c3c69cc051144d80e5275747c53e GIT binary patch literal 238 zcmZur!3_d23^Ni^o@EUFY`~vgA|YX<`*bfpod|VizM>j+f}Fx~Q7! zgtHKM7yg3|DAD^Sp<0YF#C}+nSj(MC$5#Ss27*aN<{l9dYV3`7rsq)3!X>4ws(){6V0MX5FKAjcylGXqN-n#XsS=YhW0WogZT{L^_i_GT%*k@+ph E1NJ~MtpET3 literal 0 HcmV?d00001 diff --git a/utils/Install/builder/bitmaps/save.xpm b/utils/Install/builder/bitmaps/save.xpm new file mode 100644 index 0000000000..01b18f9340 --- /dev/null +++ b/utils/Install/builder/bitmaps/save.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char *save_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c None", +". c Black", +"X c #808000", +"o c #808080", +/* pixels */ +" ", +" .............. ", +" .X. . . ", +" .X. ... ", +" .X. .X. ", +" .X. .X. ", +" .X. .X. ", +" .X. .X. ", +" .XX........oX. ", +" .XXXXXXXXXXXX. ", +" .XX.........X. ", +" .XX...... .X. ", +" .XX...... .X. ", +" .XX...... .X. ", +" ............. " +}; diff --git a/utils/Install/builder/makefile b/utils/Install/builder/makefile new file mode 100644 index 0000000000..b718b54009 --- /dev/null +++ b/utils/Install/builder/makefile @@ -0,0 +1,23 @@ +# Purpose: makefile for toolbar example (Unix) +# Created: 2000-03-14 + +CC = gcc + +PROGRAM = wxib + +OBJECTS = $(PROGRAM).o + +# implementation + +.SUFFIXES: .o .cpp + +.cpp.o : + $(CC) -c `wx-config --cflags` -o $@ $< + +all: $(PROGRAM) + +$(PROGRAM): $(OBJECTS) + $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` + +clean: + rm -f *.o $(PROGRAM) diff --git a/utils/Install/builder/makefile.b32 b/utils/Install/builder/makefile.b32 new file mode 100644 index 0000000000..2f78f08cc2 --- /dev/null +++ b/utils/Install/builder/makefile.b32 @@ -0,0 +1,10 @@ +# Purpose: makefile for toolbar example (BC++ 32bit) +# Created: 2000-03-14 + +WXDIR = $(WXWIN) + +TARGET=wxib +OBJECTS = $(TARGET).obj + +!include $(WXDIR)\src\makeprog.b32 + diff --git a/utils/Install/builder/makefile.bcc b/utils/Install/builder/makefile.bcc new file mode 100644 index 0000000000..a622b7c6aa --- /dev/null +++ b/utils/Install/builder/makefile.bcc @@ -0,0 +1,14 @@ +# Purpose: makefile for toolbar example (BC++ 16bit) +# Created: 2000-03-14 + +!if "$(WXWIN)" == "" +!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx +!endif + +WXDIR = $(WXWIN) + +TARGET=toolbar +OBJECTS=$(TARGET).obj + +!include $(WXDIR)\src\makeprog.bcc + diff --git a/utils/Install/builder/makefile.dos b/utils/Install/builder/makefile.dos new file mode 100644 index 0000000000..bb6f8d0c48 --- /dev/null +++ b/utils/Install/builder/makefile.dos @@ -0,0 +1,10 @@ +# Purpose: makefile for toolbar example (VC++ 1.5x) +# Created: 2000-03-14 + +WXDIR = $(WXWIN) + +TARGET=toolbar +OBJECTS=$(TARGET).obj + +!include $(WXDIR)\src\makeprog.msc + diff --git a/utils/Install/builder/makefile.g95 b/utils/Install/builder/makefile.g95 new file mode 100644 index 0000000000..25bcc5b88a --- /dev/null +++ b/utils/Install/builder/makefile.g95 @@ -0,0 +1,10 @@ +# Purpose: makefile for toolbar example (Cygwin/Mingw32) +# Created: #03.01.00 + +WXDIR = ../.. + +TARGET=toolbar +OBJECTS = $(TARGET).o + +include $(WXDIR)\src\makeprog.g95 + diff --git a/utils/Install/builder/makefile.sc b/utils/Install/builder/makefile.sc new file mode 100644 index 0000000000..6de8e6893c --- /dev/null +++ b/utils/Install/builder/makefile.sc @@ -0,0 +1,37 @@ +# Purpose: makefile for toolbar example (Symantec C++) +# Created: 2000-03-14 + +WXDIR = $(WXWIN) +WXLIB = $(WXDIR)\lib\wx.lib +INCDIR = $(WXDIR)\include +INCLUDE=$(INCDIR) +TARGET=toolbar + +include $(WXDIR)\src\makesc.env + +toolbar.exe: toolbar.obj $(DEFFILE) toolbar.res + *$(CC) $(LDFLAGS) -o$@ $** $(LIBS) + *$(RC) -k toolbar.res + +sc32.def: + echo EXETYPE NT > sc32.def + echo SUBSYSTEM WINDOWS >> sc32.def + +sc16.def: + echo NAME $(TARGET) > sc16.def + echo EXETYPE WINDOWS >> sc16.def + echo STUB 'WINSTUB.EXE' >> sc16.def + echo CODE PRELOAD MOVEABLE DISCARDABLE >> sc16.def + echo DATA PRELOAD MOVEABLE MULTIPLE >> sc16.def + echo HEAPSIZE 1024 >> sc16.def + echo STACKSIZE 8192 >> sc16.def + +clean: + -del *.obj + -del *.exe + -del *.res + -del *.map + -del *.rws + -del sc32.def + -del sc16.def + diff --git a/utils/Install/builder/makefile.sl b/utils/Install/builder/makefile.sl new file mode 100644 index 0000000000..216b087cf2 --- /dev/null +++ b/utils/Install/builder/makefile.sl @@ -0,0 +1,14 @@ +# Purpose: makefile for toolbar example (Salford C++) +# Created: 2000-03-14 + +PROGRAM = toolbar +OBJECTS = $(PROGRAM).obj + +include ..\..\src\makeprog.sl + +all: wx $(TARGET) + +wx: + cd $(WXDIR)\src\msw ^ mk32 -f makefile.sl all + cd $(WXDIR)\samples\toolbar + diff --git a/utils/Install/builder/makefile.twn b/utils/Install/builder/makefile.twn new file mode 100644 index 0000000000..fd89e57b4b --- /dev/null +++ b/utils/Install/builder/makefile.twn @@ -0,0 +1,35 @@ +# Purpose: makefile for toolbar example (TWIN) +# Created: 2000-03-14 + +WXDIR = ../.. + +# All common UNIX compiler flags and options are now in +# this central makefile. +include $(WXDIR)/src/maketwin.env + +OBJECTS = $(OBJDIR)/toolbar.$(OBJSUFF) $(OBJDIR)/toolbar.$(OBJSUFF) + +all: $(OBJDIR) toolbar$(GUISUFFIX)$(EXESUFF) + +wx: + +$(OBJDIR): + mkdir $(OBJDIR) + +toolbar$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB) + $(CC) $(LDFLAGS) -o toolbar$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS) + +$(OBJDIR)/toolbar.$(OBJSUFF): toolbar.$(SRCSUFF) + $(CC) -c $(CPPFLAGS) -o $@ toolbar.$(SRCSUFF) + +toolbar.c: toolbar.rc + $(RESCOMP) $(RCINPUTSWITCH) toolbar.rc $(RCOUTPUTSWITCH) toolbar.c $(RESFLAGS) + +$(OBJDIR)/toolbar.$(OBJSUFF): toolbar.c + $(CC) -c $(CPPFLAGS) -o $@ toolbar.c + +#$(OBJDIR)/toolbar.o: toolbar.rc +# $(RESCOMP) $(RCINPUTSWITCH) toolbar.rc $(RCOUTPUTSWITCH) $(OBJDIR)/toolbar.o $(RESFLAGS) + +clean: + rm -f $(OBJECTS) toolbar$(GUISUFFIX).exe core *.rsc *.res diff --git a/utils/Install/builder/makefile.unx b/utils/Install/builder/makefile.unx new file mode 100644 index 0000000000..91d51a0bd1 --- /dev/null +++ b/utils/Install/builder/makefile.unx @@ -0,0 +1,23 @@ +# Purpose: makefile for toolbar example (Unix) +# Created: 2000-03-14 + +CC = gcc + +PROGRAM = toolbar + +OBJECTS = $(PROGRAM).o + +# implementation + +.SUFFIXES: .o .cpp + +.cpp.o : + $(CC) -c `wx-config --cflags` -o $@ $< + +all: $(PROGRAM) + +$(PROGRAM): $(OBJECTS) + $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` + +clean: + rm -f *.o $(PROGRAM) diff --git a/utils/Install/builder/makefile.vc b/utils/Install/builder/makefile.vc new file mode 100644 index 0000000000..5c17461960 --- /dev/null +++ b/utils/Install/builder/makefile.vc @@ -0,0 +1,11 @@ +# Purpose: makefile for toolbar example (VC++ 32bit) +# Created: 2000-03-14 + +# Set WXDIR for your system +WXDIR = $(WXWIN) + +PROGRAM=wxib +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.vc + diff --git a/utils/Install/builder/makefile.wat b/utils/Install/builder/makefile.wat new file mode 100644 index 0000000000..95c26443ed --- /dev/null +++ b/utils/Install/builder/makefile.wat @@ -0,0 +1,11 @@ +# Purpose: makefile for toolbar example (Watcom) +# Created: 2000-03-14 + +WXDIR = $(%WXWIN) + +PROGRAM = toolbar +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/utils/wxPython/demo/bitmaps/mondrian.ico b/utils/Install/builder/mondrian.ico similarity index 100% rename from utils/wxPython/demo/bitmaps/mondrian.ico rename to utils/Install/builder/mondrian.ico diff --git a/utils/Install/builder/mondrian.xpm b/utils/Install/builder/mondrian.xpm new file mode 100644 index 0000000000..409f27a843 --- /dev/null +++ b/utils/Install/builder/mondrian.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *mondrian_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 6 1", +" c Black", +". c Blue", +"X c #00bf00", +"o c Red", +"O c Yellow", +"+ c Gray100", +/* pixels */ +" ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" " +}; diff --git a/utils/Install/builder/wxib.cpp b/utils/Install/builder/wxib.cpp new file mode 100644 index 0000000000..73abbcaab9 --- /dev/null +++ b/utils/Install/builder/wxib.cpp @@ -0,0 +1,647 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wxib.cpp +// Purpose: wxInstall Builder +// Author: Julian Smart +// Author: Brian Smith +// Modified by: +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx/wx.h". +#include + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include +#endif + +#include +#include +#include + +// define this to 1 to use wxToolBarSimple instead of the native one +#define USE_GENERIC_TBAR 0 + +#if USE_GENERIC_TBAR + #if !wxUSE_TOOLBAR_SIMPLE + #error wxToolBarSimple is not compiled in, set wxUSE_TOOLBAR_SIMPLE \ + to 1 in setup.h and recompile the library. + #else + #include + #endif +#endif // USE_GENERIC_TBAR + +// ---------------------------------------------------------------------------- +// resources +// ---------------------------------------------------------------------------- + +#if defined(__WXGTK__) || defined(__WXMOTIF__) + #include "mondrian.xpm" + #include "bitmaps/new.xpm" + #include "bitmaps/open.xpm" + #include "bitmaps/save.xpm" + #include "bitmaps/copy.xpm" + #include "bitmaps/cut.xpm" + #include "bitmaps/preview.xpm" // paste XPM + #include "bitmaps/print.xpm" + #include "bitmaps/help.xpm" +#endif // GTK or Motif + +char appName[] = "wxInstall Builder"; + +// ---------------------------------------------------------------------------- +// classes +// ---------------------------------------------------------------------------- + +// Define a new application +class MyApp : public wxApp +{ +public: + bool OnInit(); +}; + +// Define a new frame +class MyFrame: public wxFrame +{ +public: + MyFrame(wxFrame *parent, + wxWindowID id = -1, + const wxString& title = "wxInstall Builder", + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE); + + void RecreateToolbar(); + + void OnQuit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + + void OnNewScript(wxCommandEvent& event); + void OnOpenScript(wxCommandEvent& event); + void OnSaveScript(wxCommandEvent& event); + void OnNewProject(wxCommandEvent& event); + void OnOpenProject(wxCommandEvent& event); + void OnSaveProject(wxCommandEvent& event); + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + + void OnListBoxDoubleClick(wxCommandEvent& event); + +#if USE_GENERIC_TBAR + virtual wxToolBar *OnCreateToolBar(long style, + wxWindowID id, + const wxString& name ); +#endif // USE_GENERIC_TBAR + +private: + bool m_smallToolbar, + m_horzToolbar; + size_t m_rows; // 1 or 2 only + + wxTextCtrl* m_textWindow; + wxListBox* m_listBox; + + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +const int ID_TOOLBAR = 500; + +enum +{ + ID_COMBO = 1000, + ID_LISTBOX, + wxID_NEW_SCRIPT, + wxID_SAVE_SCRIPT, + wxID_OPEN_SCRIPT, + wxID_NEW_PROJECT, + wxID_SAVE_PROJECT, + wxID_OPEN_PROJECT +}; + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar +// help button. + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(wxID_EXIT, MyFrame::OnQuit) + EVT_MENU(wxID_HELP, MyFrame::OnAbout) + + EVT_MENU(wxID_NEW_SCRIPT, MyFrame::OnNewScript) + EVT_MENU(wxID_OPEN_SCRIPT, MyFrame::OnOpenScript) + EVT_MENU(wxID_SAVE_SCRIPT, MyFrame::OnSaveScript) + EVT_MENU(wxID_NEW_PROJECT, MyFrame::OnNewProject) + EVT_MENU(wxID_OPEN_PROJECT, MyFrame::OnOpenProject) + EVT_MENU(wxID_SAVE_PROJECT, MyFrame::OnSaveProject) + + EVT_MENU(wxID_CUT, MyFrame::OnCut) + EVT_MENU(wxID_COPY, MyFrame::OnCopy) + EVT_MENU(wxID_PASTE, MyFrame::OnPaste) + + EVT_LISTBOX_DCLICK(ID_LISTBOX, MyFrame::OnListBoxDoubleClick) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// MyApp +// ---------------------------------------------------------------------------- + +IMPLEMENT_APP(MyApp) + +// The `main program' equivalent, creating the windows and returning the +// main frame +bool MyApp::OnInit() +{ + // Create the main frame window + MyFrame* frame = new MyFrame((wxFrame *) NULL, -1, + "wxInstall Builder", + wxPoint(100, 100), wxSize(450, 300)); + + frame->SetAutoLayout(TRUE); + + frame->Show(TRUE); + + frame->SetStatusText("Welcome to wxWindows Install Builder"); + + SetTopWindow(frame); + + return TRUE; +} + +void MyFrame::RecreateToolbar() +{ + // delete and recreate the toolbar + wxToolBarBase *toolBar = GetToolBar(); + delete toolBar; + + SetToolBar(NULL); + + long style = wxNO_BORDER | wxTB_FLAT | wxTB_DOCKABLE; + style |= m_horzToolbar ? wxTB_HORIZONTAL : wxTB_VERTICAL; + + toolBar = CreateToolBar(style, ID_TOOLBAR); + toolBar->SetMargins( 4, 4 ); + + // Set up toolbar + wxBitmap toolBarBitmaps[8]; + + toolBarBitmaps[0] = wxBITMAP(new); + toolBarBitmaps[1] = wxBITMAP(open); + toolBarBitmaps[2] = wxBITMAP(save); + toolBarBitmaps[3] = wxBITMAP(copy); + toolBarBitmaps[4] = wxBITMAP(cut); + toolBarBitmaps[5] = wxBITMAP(paste); + toolBarBitmaps[6] = wxBITMAP(print); + toolBarBitmaps[7] = wxBITMAP(help); + + if ( !m_smallToolbar ) + { + int w = 2*toolBarBitmaps[0].GetWidth(), + h = 2*toolBarBitmaps[0].GetHeight(); + for ( size_t n = 0; n < WXSIZEOF(toolBarBitmaps); n++ ) + { + toolBarBitmaps[n] = + wxImage(toolBarBitmaps[n]).Scale(w, h).ConvertToBitmap(); + } + + toolBar->SetToolBitmapSize(wxSize(w, h)); + } + +#ifdef __WXMSW__ + int width = 24; +#else + int width = 16; +#endif + + int currentX = 5; + + toolBar->AddTool(wxID_NEW_SCRIPT, toolBarBitmaps[0], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New script"); + currentX += width + 5; + toolBar->AddTool(wxID_OPEN_SCRIPT, toolBarBitmaps[1], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Open script"); + + // neither the generic nor Motif native toolbars really support this + currentX += width + 5; + toolBar->AddTool(wxID_SAVE_SCRIPT, toolBarBitmaps[2], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Save script"); + currentX += width + 5; + toolBar->AddTool(wxID_COPY, toolBarBitmaps[3], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Copy"); + currentX += width + 5; + toolBar->AddTool(wxID_CUT, toolBarBitmaps[4], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Cut"); + currentX += width + 5; + toolBar->AddTool(wxID_PASTE, toolBarBitmaps[5], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Paste"); + currentX += width + 5; + toolBar->AddSeparator(); + toolBar->AddTool(wxID_HELP, toolBarBitmaps[7], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help button"); + + // after adding the buttons to the toolbar, must call Realize() to reflect + // the changes + toolBar->Realize(); + + toolBar->SetRows(m_horzToolbar ? m_rows : 10 / m_rows); +} + +// ---------------------------------------------------------------------------- +// MyFrame +// ---------------------------------------------------------------------------- + +// Define my frame constructor +MyFrame::MyFrame(wxFrame* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style) + : wxFrame(parent, id, title, pos, size, style) +{ + m_listBox = new wxListBox(this, ID_LISTBOX, wxPoint(0,0), wxSize(-1, -1)); + + m_listBox->Append("loadwxr"); + m_listBox->Append("closeold"); + m_listBox->Append("mleview"); + m_listBox->Append("setbutton"); + m_listBox->Append("getcheck"); + m_listBox->Append("message"); + m_listBox->Append("disable"); + m_listBox->Append("settext"); + m_listBox->Append("gettext"); + m_listBox->Append("grabfile"); + m_listBox->Append("remove"); + m_listBox->Append("system"); + m_listBox->Append("startinst"); + + wxLayoutConstraints *b1 = new wxLayoutConstraints; + b1->left.SameAs (this, wxLeft, 0); + b1->top.SameAs (this, wxTop, 0); + b1->width.PercentOf (this, wxWidth, 20); + b1->bottom.SameAs (this, wxBottom, 0); + m_listBox->SetConstraints(b1); + + m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0,0), wxSize(-1, -1), wxTE_MULTILINE); + + m_textWindow->AppendText("; Script generated by wxInstall Builder\n"); + + wxLayoutConstraints *b2 = new wxLayoutConstraints; + b2->top.SameAs (this, wxTop, 0); + b2->left.SameAs (m_listBox, wxRight, 0); + b2->width.PercentOf (this, wxWidth, 80); + b2->bottom.SameAs (this, wxBottom, 0); + m_textWindow->SetConstraints(b2); + + m_smallToolbar = TRUE; + m_horzToolbar = TRUE; + m_rows = 1; + + // Give it a status line + CreateStatusBar(); + + // Give it an icon + SetIcon(wxICON(mondrian)); + + wxMenu *fileMenu = new wxMenu; + fileMenu->Append(wxID_NEW_SCRIPT, "&New Script", "New wxInstall Script" ); + fileMenu->Append(wxID_OPEN_SCRIPT, "&Open Script", "Open wxInstall Script" ); + fileMenu->Append(wxID_SAVE_SCRIPT, "&Save Script", "Save wxInstall Script" ); + fileMenu->AppendSeparator(); + /*fileMenu->Append(wxID_NEW_PROJECT, "N&ew Project", "New wxInstall Project" ); + fileMenu->Append(wxID_OPEN_PROJECT, "O&pen Project", "Open wxInstall Project" ); + fileMenu->Append(wxID_SAVE_PROJECT, "S&ave Project", "Save wxInstall Project" ); + fileMenu->AppendSeparator();*/ + fileMenu->Append(wxID_EXIT, "E&xit", "Quit wxInstall Builder" ); + + wxMenu *helpMenu = new wxMenu; + helpMenu->Append(wxID_HELP, "&About", "About wxInstall Builder"); + + wxMenuBar* menuBar = new wxMenuBar( wxMB_DOCKABLE ); + + menuBar->Append(fileMenu, "&File"); + menuBar->Append(helpMenu, "&Help"); + + // Associate the menu bar with the frame + SetMenuBar(menuBar); + + // Create the toolbar + RecreateToolbar(); +} + +#if USE_GENERIC_TBAR + +wxToolBar* MyFrame::OnCreateToolBar(long style, + wxWindowID id, + const wxString& name) +{ + return (wxToolBar *)new wxToolBarSimple(this, id, + wxDefaultPosition, wxDefaultSize, + style, name); +} + +#endif // USE_GENERIC_TBAR + +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + Close(TRUE); +} + +void MyFrame::OnCut(wxCommandEvent& WXUNUSED(event)) +{ + m_textWindow->Cut(); +} + +void MyFrame::OnCopy(wxCommandEvent& WXUNUSED(event)) +{ + m_textWindow->Copy(); +} + +void MyFrame::OnPaste(wxCommandEvent& WXUNUSED(event)) +{ + m_textWindow->Paste(); +} + +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +{ + (void)wxMessageBox("wxInstall Builder by Brian Smith", "About wxInstall Builder"); +} + +void MyFrame::OnNewScript(wxCommandEvent& event) +{ + m_textWindow->Clear(); + m_textWindow->AppendText("; Script generated by wxInstall Builder\n"); +} + +void MyFrame::OnOpenScript(wxCommandEvent& event) +{ + wxFileDialog dialog2(this, "Open Script", "", "", "*.ini", 0); + + if (dialog2.ShowModal() == wxID_OK) + m_textWindow->LoadFile(dialog2.GetPath()); +} + +void MyFrame::OnSaveScript(wxCommandEvent& event) +{ + wxFileDialog dialog2(this, "Save Script", "", "", "*.ini", 0); + + if (dialog2.ShowModal() == wxID_OK) + m_textWindow->SaveFile(dialog2.GetPath()); +} + +void MyFrame::OnNewProject(wxCommandEvent& event) +{ +} + +void MyFrame::OnOpenProject(wxCommandEvent& event) +{ +} + +void MyFrame::OnSaveProject(wxCommandEvent& event) +{ +} + +void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event ) +{ + int item; + + item = m_listBox->GetSelection(); + + switch(item) + { + case 0: + { + wxFileDialog dialog2(this, "Choose wxr filename", "", "", "*.wxr", 0); + + if (dialog2.ShowModal() == wxID_OK) + { + char tempbuf[1024] = "DialogEd "; + wxString tmp = dialog2.GetFilename(); + + m_textWindow->WriteText("loadwxr,"); + m_textWindow->WriteText(tmp); + m_textWindow->WriteText("\n"); + + strcat(tempbuf, tmp); + wxExecute(tempbuf); + } + } + break; + case 1: + { + m_textWindow->WriteText("closeold\n"); + } + break; + case 2: + { + wxFileDialog dialog2(this, "Choose filename to view", "", "", "*.txt", 0); + + if (dialog2.ShowModal() == wxID_OK) + { + wxTextEntryDialog dialog3(this, + "Please enter name of the MLE widget", + appName, + "", + wxOK | wxCANCEL); + + if (dialog3.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("mleview,"); + m_textWindow->WriteText(dialog3.GetValue()); + m_textWindow->WriteText(","); + m_textWindow->WriteText(dialog2.GetFilename()); + m_textWindow->WriteText("\n"); + } + } + } + break; + case 3: + { + wxFileDialog dialog2(this, "Choose script to attach to button", "", "", "*.ini", 0); + + if (dialog2.ShowModal() == wxID_OK) + { + wxTextEntryDialog dialog3(this, + "Please enter ID of the button", + appName, + "", + wxOK | wxCANCEL); + + if (dialog3.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("setbutton,"); + m_textWindow->WriteText(dialog3.GetValue()); + m_textWindow->WriteText(","); + m_textWindow->WriteText(dialog2.GetFilename()); + m_textWindow->WriteText("\n"); + } + } + } + break; + case 4: + { + wxFileDialog dialog2(this, "Choose script to run if not checked", "", "", "*.ini", 0); + + if (dialog2.ShowModal() == wxID_OK) + { + wxTextEntryDialog dialog3(this, + "Please enter name of the checkbox widget", + appName, + "", + wxOK | wxCANCEL); + + if (dialog3.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("getcheck,"); + m_textWindow->WriteText(dialog3.GetValue()); + m_textWindow->WriteText(","); + m_textWindow->WriteText(dialog2.GetFilename()); + m_textWindow->WriteText("\n"); + } + } + } + break; + case 5: + { + wxTextEntryDialog dialog2(this, + "Please enter the message to display to the user", + appName, + "", + wxOK | wxCANCEL); + + if (dialog2.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("message,\""); + m_textWindow->WriteText(dialog2.GetValue()); + m_textWindow->WriteText("\"\n"); + } + } + break; + case 6: + { + wxTextEntryDialog dialog2(this, + "Please enter the widget name to disable", + appName, + "", + wxOK | wxCANCEL); + + if (dialog2.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("disable,"); + m_textWindow->WriteText(dialog2.GetValue()); + m_textWindow->WriteText("\n"); + } + } + break; + case 7: + { + wxTextEntryDialog dialog2(this, + "Please enter text widget name to set from", + appName, + "", + wxOK | wxCANCEL); + + if (dialog2.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("settext,"); + m_textWindow->WriteText(dialog2.GetValue()); + m_textWindow->WriteText("\n"); + } + } + break; + case 8: + { + wxTextEntryDialog dialog2(this, + "Please enter text widget name to get from", + appName, + "", + wxOK | wxCANCEL); + + if (dialog2.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("gettext,"); + m_textWindow->WriteText(dialog2.GetValue()); + m_textWindow->WriteText("\n"); + } + } + break; + case 9: + { + wxFileDialog dialog2(this, "Choose file to grab", "", "", "*", 0); + + if (dialog2.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("grabfile,"); + m_textWindow->WriteText(dialog2.GetFilename()); + m_textWindow->WriteText("\n"); + } + } + break; + case 10: + { + wxFileDialog dialog2(this, "Choose file to remove", "", "", "*", 0); + + if (dialog2.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("remove,"); + m_textWindow->WriteText(dialog2.GetFilename()); + m_textWindow->WriteText("\n"); + } + } + break; + case 11: + { + wxTextEntryDialog dialog2(this, + "Please enter the command to execute", + appName, + "", + wxOK | wxCANCEL); + + if (dialog2.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("system,"); + m_textWindow->WriteText(dialog2.GetValue()); + m_textWindow->WriteText("\n"); + } + } + break; + case 12: + { + wxFileDialog dialog2(this, "Choose script to run at installation completion", "", "", "*.ini", 0); + + if (dialog2.ShowModal() == wxID_OK) + { + wxTextEntryDialog dialog3(this, + "Please enter name of the gauge widget", + appName, + "", + wxOK | wxCANCEL); + + if (dialog3.ShowModal() == wxID_OK) + { + m_textWindow->WriteText("startinst,"); + m_textWindow->WriteText(dialog3.GetValue()); + m_textWindow->WriteText(","); + m_textWindow->WriteText(dialog2.GetFilename()); + m_textWindow->WriteText("\n"); + } + } + } + break; + } +} diff --git a/utils/Install/builder/wxib.def b/utils/Install/builder/wxib.def new file mode 100644 index 0000000000..897b9dacbb --- /dev/null +++ b/utils/Install/builder/wxib.def @@ -0,0 +1,8 @@ +NAME ToolTest +DESCRIPTION 'wxToolBar Sample' +EXETYPE WINDOWS +STUB 'WINSTUB.EXE' +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE +HEAPSIZE 1024 +STACKSIZE 8192 diff --git a/utils/Install/builder/wxib.rc b/utils/Install/builder/wxib.rc new file mode 100644 index 0000000000..42bb7cb984 --- /dev/null +++ b/utils/Install/builder/wxib.rc @@ -0,0 +1,12 @@ +mondrian ICON "mondrian.ico" +#include "wx/msw/wx.rc" + +new BITMAP "bitmaps/new.bmp" +open BITMAP "bitmaps/open.bmp" +save BITMAP "bitmaps/save.bmp" +copy BITMAP "bitmaps/copy.bmp" +cut BITMAP "bitmaps/cut.bmp" +paste BITMAP "bitmaps/paste.bmp" +print BITMAP "bitmaps/print.bmp" +help BITMAP "bitmaps/help.bmp" + diff --git a/utils/Install/builder/wxibVC.dsp b/utils/Install/builder/wxibVC.dsp new file mode 100644 index 0000000000..0e8a413aaa --- /dev/null +++ b/utils/Install/builder/wxibVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="wxibVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=wxibVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "wxibVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "wxibVC.mak" CFG="wxibVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "wxibVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "wxibVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "wxibVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "wxibVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "wxibVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wxib.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "wxibVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"wxib.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "wxibVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdlld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxib.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "wxibVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdll.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxib.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "wxibVC - Win32 Release" +# Name "wxibVC - Win32 Debug" +# Name "wxibVC - Win32 Debug DLL" +# Name "wxibVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\wxib.cpp + +!IF "$(CFG)" == "wxibVC - Win32 Release" + +!ELSEIF "$(CFG)" == "wxibVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "wxibVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "wxibVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wxib.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/utils/Install/builder/wxibvc.dsw b/utils/Install/builder/wxibvc.dsw new file mode 100644 index 0000000000..1716e9dd7a --- /dev/null +++ b/utils/Install/builder/wxibvc.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "wxibVC"=.\wxibVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/utils/Install/incace/acestruc.h b/utils/Install/incace/acestruc.h new file mode 100644 index 0000000000..1a6b488a20 --- /dev/null +++ b/utils/Install/incace/acestruc.h @@ -0,0 +1,151 @@ +#ifndef __acestruc_h +#define __acestruc_h + +#include "declare.h" +#include "portable.h" + +#define acesign_len 7 +#define bytes_before_acesign 7 +#define acever 10 + +struct tech +{ + UCHAR TYPE; + UCHAR QUAL; + USHORT PARM; +}; + +typedef struct tacehead +{ + USHORT HEAD_CRC; + USHORT HEAD_SIZE; + UCHAR HEAD_TYPE; + USHORT HEAD_FLAGS; + ULONG ADDSIZE; + UCHAR other[2048]; + +} thead; + +typedef struct tacemhead +{ + USHORT HEAD_CRC; + USHORT HEAD_SIZE; + UCHAR HEAD_TYPE; + USHORT HEAD_FLAGS; + + UCHAR ACESIGN[acesign_len]; + UCHAR VER_MOD; + UCHAR VER_CR; + UCHAR HOST_CR; + UCHAR VOL_NUM; + ULONG TIME_CR; + USHORT RES1; + USHORT RES2; + ULONG RES; + UCHAR AV_SIZE; + UCHAR AV[256]; + USHORT COMM_SIZE; + UCHAR COMM[2048]; + +} tmhead; + +#ifndef PATH_MAX + #define PATH_MAX 512 +#endif + +typedef struct tacefhead +{ + USHORT HEAD_CRC; + USHORT HEAD_SIZE; + UCHAR HEAD_TYPE; + USHORT HEAD_FLAGS; + + ULONG PSIZE; + ULONG SIZE; + ULONG FTIME; + ULONG ATTR; + ULONG CRC32; + struct tech TECH; + USHORT RESERVED; + USHORT FNAME_SIZE; + UCHAR FNAME[PATH_MAX]; + USHORT COMM_SIZE; + UCHAR COMM[2048]; + +} tfhead; + +#define mhead (*t_mhead) +#define fhead (*t_fhead) +#define rhead (*t_rhead) +#define tmpmhead (*t_tmpmhead) +#define tmpfhead (*t_tmpfhead) +#define tmprhead (*t_tmprhead) + +#define mhead_size h_mhead_size(mhead) +#define fhead_size h_fhead_size(fhead) +#define rhead_size ((INT)&rhead.REC_CRC-(INT)&head.HEAD_TYPE+sizeof(rhead.REC_CRC)) + +#define h_mhead_size(phead) ((INT)mhead.AV-(INT)&head.HEAD_TYPE+ \ + (phead).AV_SIZE+ \ + ((phead).HEAD_FLAGS&ACE_COMM? \ + sizeof((phead).COMM_SIZE)+H_MCOMM_SIZE(phead):0)) + + +#define h_fhead_size(phead) ((INT)fhead.FNAME-(INT)&head.HEAD_TYPE+ \ + (phead).FNAME_SIZE+ \ + ((phead).HEAD_FLAGS&ACE_COMM? \ + sizeof((phead).COMM_SIZE)+H_FCOMM_SIZE(phead):0)) + + +//main-comment-definitions +#define H_MCOMM_SIZE(head) (BUF2WORD((UCHAR*)&(head).AV+(head).AV_SIZE)) +#define MCOMM_SIZE H_MCOMM_SIZE(mhead) +#define H_MCOMM(head) ((UCHAR*)&(head).AV+(head).AV_SIZE+sizeof((head).COMM_SIZE)) +#define MCOMM H_MCOMM(mhead) + + +//file-comment-definitions +#define H_FCOMM_SIZE(head) (BUF2WORD((UCHAR*)&(head).FNAME+(head).FNAME_SIZE)) +#define FCOMM_SIZE H_FCOMM_SIZE(fhead) +#define H_FCOMM(head) ((UCHAR*)&(head).FNAME+(head).FNAME_SIZE+sizeof((head).COMM_SIZE)) +#define FCOMM H_FCOMM(fhead) + +// +#define calc_head_crc getcrc16(CRC_MASK, (CHAR*)&head.HEAD_TYPE, head.HEAD_SIZE) +#define GET_ADDSIZE ((head.HEAD_FLAGS & ACE_ADDSIZE) ? head.ADDSIZE : 0) + +//archive-header-flags +#define ACE_LIM256 1024 +#define ACE_MULT_VOL 2048 +#define ACE_AV 4096 +#define ACE_RECOV 8192 +#define ACE_LOCK 16384 +#define ACE_SOLID 32768 + +//file-header-flags +#define ACE_ADDSIZE 1 +#define ACE_PASSW 16384 +#define ACE_SP_BEF 4096 +#define ACE_SP_AFTER 8192 +#define ACE_COMM 2 + +//block types +#define MAIN_BLK 0 +#define FILE_BLK 1 +#define REC_BLK 2 + +//known compression types +#define TYPE_STORE 0 +#define TYPE_LZW1 1 + +//structure for archive handling +struct tadat +{ + INT sol, + vol, + vol_num; + ULONG time_cr; +}; + + +#endif /* __acestruc_h */ diff --git a/utils/Install/incace/attribs.h b/utils/Install/incace/attribs.h new file mode 100644 index 0000000000..dbc82ffb5b --- /dev/null +++ b/utils/Install/incace/attribs.h @@ -0,0 +1,33 @@ +#ifndef __attribs_h +#define __attribs_h + + +#ifndef _A_SUBDIR + #define _A_SUBDIR 0x10 // MS-DOS directory constant +#endif + +#ifndef S_IEXEC + #ifdef S_IEXECUTE + #define S_IEXEC S_IEXECUTE + #else + #define S_IEXEC 0 + #endif +#endif + +#ifndef S_IDELETE + #define S_IDELETE 0 +#endif + +#ifndef S_IRGRP + #define S_IRGRP 0 + #define S_IWGRP 0 +#endif + +#ifndef S_IROTH + #define S_IROTH 0 + #define S_IWOTH 0 +#endif + + +#endif /* __attribs_h */ + diff --git a/utils/Install/incace/declare.h b/utils/Install/incace/declare.h new file mode 100644 index 0000000000..4c14a28dcd --- /dev/null +++ b/utils/Install/incace/declare.h @@ -0,0 +1,38 @@ +/******************************************************/ +/* */ +/* declare.h: declaration-symbols (UCHAR, ULONG, ...) */ +/* */ +/******************************************************/ + +#ifndef __declare_h +#define __declare_h + +#if defined(__CYGWIN__) +#include +#endif + +#if !defined(OS2_H_INCLUDED) && !defined(__CYGWIN__) +#ifdef AMIGA + +#include + +#else /* AMIGA */ +typedef unsigned short USHORT; +typedef short SHORT ; +typedef unsigned short UWORD ; +typedef short WORD ; +typedef unsigned long ULONG ; +typedef long LONG ; +#endif /* !AMIGA */ + +typedef unsigned char UCHAR ; +typedef char CHAR ; +typedef unsigned UINT ; +typedef int INT ; +#else +typedef unsigned short UWORD ; +#endif + + +#endif /* __declare_h */ + diff --git a/utils/Install/incace/globals.h b/utils/Install/incace/globals.h new file mode 100644 index 0000000000..f6b03660ec --- /dev/null +++ b/utils/Install/incace/globals.h @@ -0,0 +1,90 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Global variable definitions */ +/* */ +/* ------------------------------------------------------------------------ */ + +#ifndef __globals_h +#define __globals_h + +#include "acestruc.h" +#include "unace.h" + +//-------- Ace sign +extern const char *acesign; + +//-------- Version string for program +extern const char *version; + +//-------- header buffer and pointers +extern thead head; + +extern tmhead *t_mhead; +extern tfhead *t_fhead; + +//-------- buffers +extern ULONG *buf_rd ; +extern CHAR *buf ; +extern CHAR *buf_wr ; +extern UCHAR *readbuf; + +//-------- decompressor variables +extern +SHORT rpos , + dcpr_do , + dcpr_do_max , + blocksize , + dcpr_dic , + dcpr_oldnum , + bits_rd , + dcpr_frst_file; +extern +USHORT dcpr_code_mn[1 << maxwd_mn], + dcpr_code_lg[1 << maxwd_lg]; +extern +UCHAR dcpr_wd_mn[maxcode + 2], + dcpr_wd_lg[maxcode + 2], + wd_svwd[svwd_cnt]; +extern +ULONG dcpr_dpos , + cpr_dpos2 , + dcpr_dicsiz , + dcpr_dican , + dcpr_size , + dcpr_olddist[4], + code_rd ; +extern +CHAR *dcpr_text ; + +//-------- quicksort +extern USHORT sort_org[maxcode + 2]; +extern UCHAR sort_freq[(maxcode + 2) * 2]; + +//-------- file handling +extern CHAR aname[PATH_MAX]; +extern +INT archan, + wrhan; +#if !defined(__EMX__) && !defined(__OS2__) +extern FILE *farchan; +#endif + +extern LONG skipsize; + +//-------- structures for archive handling +extern struct tadat adat; + +//-------- flags +extern +INT f_err , + f_ovrall , + f_allvol_pr, + f_curpas , + f_criterr ; + +int pipeit(char *format, ...); +void error(char *format, ...); +int confirm(char *format, ...); + +#endif /* __globals_h */ + diff --git a/utils/Install/incace/os.h b/utils/Install/incace/os.h new file mode 100644 index 0000000000..a5f3d0de79 --- /dev/null +++ b/utils/Install/incace/os.h @@ -0,0 +1,26 @@ +#ifndef __os_h +#define __os_h + + +#if defined(AMIGA) + #define DIRSEP '/' + #define HI_LO_BYTE_ORDER +#endif + +#if defined(DOS) || defined(WINNT) || defined(WIN16) + #define DIRSEP '\\' + #define LO_HI_BYTE_ORDER +#endif + +#if defined(OS2) || defined(__EMX__) + #define DIRSEP '\\' + #define LO_HI_BYTE_ORDER +#endif + +#if defined(UNIX) + #define DIRSEP '/' + #define HI_LO_BYTE_ORDER +#endif + + +#endif /* __os_h */ diff --git a/utils/Install/incace/portable.h b/utils/Install/incace/portable.h new file mode 100644 index 0000000000..0488adf3d6 --- /dev/null +++ b/utils/Install/incace/portable.h @@ -0,0 +1,101 @@ +/****************************************************************/ +/* */ +/* A collection of routines used in making ACE portable for */ +/* different computers */ +/* */ +/****************************************************************/ + +#ifndef __portable_h +#define __portable_h + +#include "os.h" + +#ifdef HI_LO_BYTE_ORDER + +/* All kinds of inplace swap routines, to reverse from LOHI to HILO byte order */ + +#ifdef AMIGA + +#if __SASC && __VERSION__>=6 && __REVISION__>=58 + +#define WORDswap(n) (*(n) = __builtin_rol(*(n), 8, 1)) +#define LONGswap(n) ( WORDswap(&((WORD *)(n))[0]),\ + WORDswap(&((WORD *)(n))[1]),\ + *(n) = __builtin_rol(*(n), 16, 2) ) +#else /* __SASC */ + +#define EORSWAP + +#endif /* !__SASC */ + +#endif /* AMIGA */ + + +#ifdef EORSWAP + +/* With some compilers and processors these work faster then the + * regular swap below, for example on a Amiga 68040 using SAS C 6.58. + * But using builtin rotates works even faster, see above. + */ + +#define WORDswap(n) (((BYTE*)(n))[0] ^= ((BYTE*)(n))[1],\ + ((BYTE*)(n))[1] ^= ((BYTE*)(n))[0],\ + ((BYTE*)(n))[0] ^= ((BYTE*)(n))[1]) +#define LONGswap(n) (((BYTE*)(n))[0] ^= ((BYTE*)(n))[3],\ + ((BYTE*)(n))[3] ^= ((BYTE*)(n))[0],\ + ((BYTE*)(n))[0] ^= ((BYTE*)(n))[3],\ + ((BYTE*)(n))[1] ^= ((BYTE*)(n))[2],\ + ((BYTE*)(n))[2] ^= ((BYTE*)(n))[1],\ + ((BYTE*)(n))[1] ^= ((BYTE*)(n))[2]) +#endif /* EORSWAP */ + +#ifndef WORDswap + +/* If not yet defined use the standard swaps */ + +#define WORDswap(n) (*(n) = (*(n) << 8) | (*(n) >> 8)) +#define LONGswap(n) ( WORDswap(&((WORD *)(n))[0]),\ + WORDswap(&((WORD *)(n))[1]),\ + *(n) = (*(n) >> 16) | (*(n) << 16) ) +#endif /* WORDSWAP */ + +#endif /* HI_LO_BYTE_ORDER */ + + +/* GENERIC: Convert to LONG or WORD from BYTE-Pointer-to-LOHI-byte-order data, + * without worrying if the bytes are word alined in memory. + * p is a pointer to char. + */ + +#ifdef HI_LO_BYTE_ORDER + +#define BUFP2WORD(p) ((UWORD)*(p)++ | ((*(p)++)<<8)) +#define BUFP2LONG(p) ((ULONG)*(p)++ | ((*(p)++)<<8) | ((*(p)++)<<16) | ((*(p)++)<<24)) + +#define BUF2WORD(p) ((UWORD)*(p) | (*((p)+1)<<8)) +#define BUF2LONG(p) ((ULONG)*(p) | (*((p)+1)<<8) | (*((p)+2)<<16) | (*((p)+3)<<24)) + +#else /* HI_LO_BYTE_ORDER */ + +#define BUFP2WORD(p) *(UWORD*)((p+=2)-2) +#define BUFP2LONG(p) *(ULONG*)((p+=4)-4) + +#define BUF2WORD(p) (*(UWORD*)p) +#define BUF2LONG(p) (*(ULONG*)p) + +#endif /* !HI_LO_BYTE_ORDER */ + +/* Timestamp macros */ + +#define get_tx(m,d,h,n) (((ULONG)m<<21)+((ULONG)d<<16)+((ULONG)h<<11)+(n<<5)) +#define get_tstamp(y,m,d,h,n,s) ((((ULONG)(y-1980))<<25)+get_tx(m,d,h,n)+(s/2)) + +#define ts_year(ts) ((UINT)((ts >> 25) & 0x7f) + 1980) +#define ts_month(ts) ((UINT)(ts >> 21) & 0x0f) // 1..12 means Jan..Dec +#define ts_day(ts) ((UINT)(ts >> 16) & 0x1f) // 1..31 means 1st..31st +#define ts_hour(ts) ((UINT)(ts >> 11) & 0x1f) +#define ts_min(ts) ((UINT)(ts >> 5) & 0x3f) +#define ts_sec(ts) ((UINT)((ts & 0x1f) * 2)) + + +#endif /* __portable_h */ diff --git a/utils/Install/incace/uac_comm.h b/utils/Install/incace/uac_comm.h new file mode 100644 index 0000000000..04bfdcef56 --- /dev/null +++ b/utils/Install/incace/uac_comm.h @@ -0,0 +1,14 @@ +#ifndef __uac_comm_h +#define __uac_comm_h + + +#include "declare.h" + +extern INT comm_cpr_size; +extern CHAR *comm; + +void comment_out(CHAR *top); + + +#endif /* __uac_comm_h */ + diff --git a/utils/Install/incace/uac_crc.h b/utils/Install/incace/uac_crc.h new file mode 100644 index 0000000000..566a80845a --- /dev/null +++ b/utils/Install/incace/uac_crc.h @@ -0,0 +1,20 @@ +#ifndef __uac_crc_h +#define __uac_crc_h + + +#include "declare.h" + +#define CRC_MASK 0xFFFFFFFFL +#define CRCPOLY 0xEDB88320L + + +extern ULONG crctable[256]; +extern ULONG rd_crc; + + +ULONG getcrc(ULONG crc, UCHAR * addr, INT len); +void make_crctable(void); + + +#endif /* __uac_crc_h */ + diff --git a/utils/Install/incace/uac_crt.h b/utils/Install/incace/uac_crt.h new file mode 100644 index 0000000000..38614d1895 --- /dev/null +++ b/utils/Install/incace/uac_crt.h @@ -0,0 +1,12 @@ +#ifndef __uac_crt_h +#define __uac_crt_h + + +#include "acestruc.h" + +CHAR *ace_fname(CHAR * s, thead * head, INT nopath); +INT create_dest_file(CHAR * file, INT a); + + +#endif /* __uac_crt_h */ + diff --git a/utils/Install/incace/uac_dcpr.h b/utils/Install/incace/uac_dcpr.h new file mode 100644 index 0000000000..92795d056f --- /dev/null +++ b/utils/Install/incace/uac_dcpr.h @@ -0,0 +1,14 @@ +#ifndef __uac_dcpr_h +#define __uac_dcpr_h + +#include "declare.h" + +INT calc_dectabs(void); +void dcpr_comm(INT comm_size); +INT read_wd(UINT maxwd, USHORT * code, UCHAR * wd, INT max_el); +void dcpr_init(void); +INT dcpr_adds_blk(CHAR * buf, UINT len); +void dcpr_init_file(void); + +#endif /* __uac_dcpr_h */ + diff --git a/utils/Install/incace/uac_sys.h b/utils/Install/incace/uac_sys.h new file mode 100644 index 0000000000..ac283f1831 --- /dev/null +++ b/utils/Install/incace/uac_sys.h @@ -0,0 +1,18 @@ +#ifndef __uac_sys_h +#define __uac_sys_h + + +#include "declare.h" + +#define upcase(ch) ((in(ch,'a','z'))?(ch-32):(ch)) + +void memset16(USHORT * dest, SHORT val, INT len); +INT cancel(void); +INT wrask(CHAR * s); +#if !defined(__MINGW32__) +void beep(void); +#endif +void set_handler(void); + + +#endif diff --git a/utils/Install/incace/unace.h b/utils/Install/incace/unace.h new file mode 100644 index 0000000000..3e85277771 --- /dev/null +++ b/utils/Install/incace/unace.h @@ -0,0 +1,66 @@ +#ifndef __unace_h +#define __unace_h + + +#include "declare.h" + + +//--------- functions + +INT read_adds_blk(CHAR * buffer, INT len); + + +//--------- buffers: increase sizes when possible to speed up the program + +#define size_rdb 1024 +#define size_wrb 2048 +#define size_buf 1024 + +#define size_headrdb (sizeof(head)-20) // (some bytes less esp. for Amiga) + + +//--------- (de-)compressor constants + +#define maxdic 22 +#define maxwd_mn 11 +#define maxwd_lg 11 +#define maxwd_svwd 7 +#define maxlength 259 +#define maxdis2 255 +#define maxdis3 8191 +#define maxcode (255+4+maxdic) +#define svwd_cnt 15 +#define max_cd_mn (256+4+(maxdic+1)-1) +#define max_cd_lg (256-1) + +//--------- flags + +#define ERR_MEM 1 +#define ERR_FILES 2 +#define ERR_FOUND 3 +#define ERR_FULL 4 +#define ERR_OPEN 5 +#define ERR_READ 6 +#define ERR_WRITE 7 +#define ERR_CLINE 8 +#define ERR_CRC 9 +#define ERR_OTHER 10 +#define ERR_USER 255 + +//--------- system things + +#define flush fflush(stdout); + +#define in(v1,v2,v3) ((((long)v1)>=(v2)) && (((long)v1)<=(v3))) + +#define delay_len 500 + +//-------- file creation + +#define fileexists(name) (!access(name, 0)) + + +//-------- eof + +#endif /* __unace_h */ + diff --git a/utils/Install/inczip/consts.h b/utils/Install/inczip/consts.h new file mode 100644 index 0000000000..f418a6c8fe --- /dev/null +++ b/utils/Install/inczip/consts.h @@ -0,0 +1,46 @@ +/*--------------------------------------------------------------------------- + + consts.h + + This file contains global, initialized variables that never change. It is + included by unzip.c and windll/windll.c. + + ---------------------------------------------------------------------------*/ + + +/* And'ing with mask_bits[n] masks the lower n bits */ +ZCONST ush near mask_bits[] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + +ZCONST char Far VersionDate[] = VERSION_DATE; /* now defined in version.h */ + +#ifndef SFX + ZCONST char Far EndSigMsg[] = + "\nnote: didn't find end-of-central-dir signature at end of central dir.\n"; +#endif + +ZCONST char Far CentSigMsg[] = + "error: expected central file header signature not found (file #%u).\n"; +ZCONST char Far SeekMsg[] = + "error [%s]: attempt to seek before beginning of zipfile\n%s"; +ZCONST char Far FilenameNotMatched[] = "caution: filename not matched: %s\n"; +ZCONST char Far ExclFilenameNotMatched[] = + "caution: excluded filename not matched: %s\n"; + +#ifdef VMS + ZCONST char Far ReportMsg[] = "\ + (please check that you have transferred or created the zipfile in the\n\ + appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)\n"; +#else + ZCONST char Far ReportMsg[] = "\ + (please check that you have transferred or created the zipfile in the\n\ + appropriate BINARY mode and that you have compiled UnZip properly)\n"; +#endif + +#ifndef SFX + ZCONST char Far Zipnfo[] = "zipinfo"; + ZCONST char Far CompiledWith[] = "Compiled with %s%s for %s%s%s%s.\n\n"; +#endif diff --git a/utils/Install/inczip/crypt.h b/utils/Install/inczip/crypt.h new file mode 100644 index 0000000000..d462f2d7ba --- /dev/null +++ b/utils/Install/inczip/crypt.h @@ -0,0 +1,24 @@ +/* + crypt.h (dummy version) by Info-ZIP. Last revised: 15 Aug 98 + + This is a non-functional version of Info-ZIP's crypt.h encryption/ + decryption header file for Zip, ZipCloak, UnZip and fUnZip. This + file is not copyrighted and may be distributed without restriction. + See the "WHERE" file for sites from which to obtain the full crypt + sources (zcrypt28.zip or later). + */ + +#ifndef __crypt_h /* don't include more than once */ +#define __crypt_h + +#ifdef CRYPT +# undef CRYPT +#endif +#define CRYPT 0 /* dummy version */ + +#define zencode +#define zdecode + +#define zfwrite fwrite + +#endif /* !__crypt_h */ diff --git a/utils/Install/inczip/ebcdic.h b/utils/Install/inczip/ebcdic.h new file mode 100644 index 0000000000..db2e976b7f --- /dev/null +++ b/utils/Install/inczip/ebcdic.h @@ -0,0 +1,272 @@ +/*--------------------------------------------------------------------------- + + ebcdic.h + + The CECP 1047 (Extended de-facto EBCDIC) <-> ISO 8859-1 conversion tables, + from ftp://aix1.segi.ulg.ac.be/pub/docs/iso8859/iso8859.networking + + NOTES: + (OS/390 port 12/97) + These table no longer represent the standard mappings (for example in the + OS/390 iconv utility). In order to follow current standards I remapped + ebcdic x0a to ascii x15 and + ebcdic x85 to ascii x25 (and vice-versa) + Without these changes, newlines in auto-convert text files appeared + as literal \045. + I'm not sure what effect this remap would have on the MVS and CMS ports, so + I ifdef'd these changes. Hopefully these ifdef's can be removed when the + MVS/CMS folks test the new mappings. + + Christian Spieler , 27-Apr-1998 + The problem mentioned by Paul von Behren was already observed previously + on VM/CMS, during the preparation of the CMS&MVS port of UnZip 5.20 in + 1996. At that point, the ebcdic tables were not changed since they seemed + to be an adopted standard (to my knowledge, these tables are still used + as presented in mainfraime KERMIT). Instead, the "end-of-line" conversion + feature of Zip's and UnZip's "text-translation" mode was used to force + correct mappings between ASCII and EBCDIC newline markers. + Before interchanging the ASCII mappings of the EBCDIC control characters + "NL" 0x25 and "LF" 0x15 according to the OS/390 setting, we have to + make sure that EBCDIC 0x15 is never used as line termination. + + ---------------------------------------------------------------------------*/ + +#ifndef __ebcdic_h /* prevent multiple inclusions */ +#define __ebcdic_h + + +#ifndef ZCONST +# define ZCONST const +#endif + +#ifdef EBCDIC +#ifndef MTS /* MTS uses a slightly "special" EBCDIC code page */ + +ZCONST uch ebcdic[] = { + 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, /* 00 - 07 */ +#ifdef OS390 + 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ +#else + 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ +#endif + 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, /* 10 - 17 */ + 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ + 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, /* 20 - 27 */ + 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, /* 28 - 2F */ + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /* 30 - 37 */ + 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, /* 38 - 3F */ + 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, /* 40 - 47 */ + 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, /* 48 - 4F */ + 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, /* 50 - 57 */ + 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, /* 58 - 5F */ + 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 60 - 67 */ + 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* 68 - 6F */ + 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, /* 70 - 77 */ + 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, /* 78 - 7F */ +#ifdef OS390 + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17, /* 80 - 87 */ +#else + 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, /* 80 - 87 */ +#endif + 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, /* 88 - 8F */ + 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, /* 90 - 97 */ + 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, /* 98 - 9F */ + 0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, /* A0 - A7 */ + 0xBB, 0xB4, 0x9A, 0x8A, 0xB0, 0xCA, 0xAF, 0xBC, /* A8 - AF */ + 0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, /* B0 - B7 */ + 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, /* B8 - BF */ + 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, /* C0 - C7 */ + 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* C8 - CF */ + 0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, /* D0 - D7 */ + 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xBA, 0xAE, 0x59, /* D8 - DF */ + 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, /* E0 - E7 */ + 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* E8 - EF */ + 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, /* F0 - F7 */ + 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF /* F8 - FF */ +}; + +#if (defined(ZIP) || CRYPT) +ZCONST uch ascii[] = { + 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, /* 00 - 07 */ + 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ +#ifdef OS390 + 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, /* 10 - 17 */ +#else + 0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, /* 10 - 17 */ +#endif + 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ +#ifdef OS390 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, /* 20 - 27 */ +#else + 0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, /* 20 - 27 */ +#endif + 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, /* 28 - 2F */ + 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, /* 30 - 37 */ + 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, /* 38 - 3F */ + 0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, /* 40 - 47 */ + 0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, /* 48 - 4F */ + 0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, /* 50 - 57 */ + 0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E, /* 58 - 5F */ + 0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, /* 60 - 67 */ + 0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, /* 68 - 6F */ + 0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, /* 70 - 77 */ + 0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, /* 78 - 7F */ + 0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 80 - 87 */ + 0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1, /* 88 - 8F */ + 0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, /* 90 - 97 */ + 0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4, /* 98 - 9F */ + 0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, /* A0 - A7 */ + 0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0x5B, 0xDE, 0xAE, /* A8 - AF */ + 0xAC, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, /* B0 - B7 */ + 0xBD, 0xBE, 0xDD, 0xA8, 0xAF, 0x5D, 0xB4, 0xD7, /* B8 - BF */ + 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* C0 - C7 */ + 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, /* C8 - CF */ + 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, /* D0 - D7 */ + 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, /* D8 - DF */ + 0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* E0 - E7 */ + 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, /* E8 - EF */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* F0 - F7 */ + 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F /* F8 - FF */ +}; +#endif /* ZIP || CRYPT */ + +#else /* MTS */ + +/* + * This is the MTS ASCII->EBCDIC translation table. It provides a 1-1 + * translation from ISO 8859/1 8-bit ASCII to IBM Code Page 37 EBCDIC. + */ + +ZCONST uch ebcdic[] = { + 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, /* 00 - 07 */ + 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ + 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, /* 10 - 17 */ + 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ + 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, /* 20 - 27 */ + 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, /* 28 - 2F */ + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, /* 30 - 37 */ + 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, /* 38 - 3F */ + 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, /* 40 - 47 */ + 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, /* 48 - 4F */ + 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, /* 50 - 57 */ + 0xE7, 0xE8, 0xE9, 0xBA, 0xE0, 0xBB, 0xB0, 0x6D, /* 58 - 5F */ + 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 60 - 67 */ + 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* 68 - 6F */ + 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, /* 70 - 77 */ + 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, /* 78 - 7F */ + 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, /* 80 - 87 */ + 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x09, 0x0A, 0x1B, /* 88 - 8F */ + 0x30, 0x31, 0x1A, 0x33, 0x34, 0x35, 0x36, 0x08, /* 90 - 97 */ + 0x38, 0x39, 0x3A, 0x3B, 0x04, 0x14, 0x3E, 0xFF, /* 98 - 9F */ + 0x41, 0xAA, 0x4A, 0xB1, 0x9F, 0xB2, 0x6A, 0xB5, /* A0 - A7 */ + 0xBD, 0xB4, 0x9A, 0x8A, 0x5F, 0xCA, 0xAF, 0xBC, /* A8 - AF */ + 0x90, 0x8F, 0xEA, 0xFA, 0xBE, 0xA0, 0xB6, 0xB3, /* B0 - B7 */ + 0x9D, 0xDA, 0x9B, 0x8B, 0xB7, 0xB8, 0xB9, 0xAB, /* B8 - BF */ + 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9E, 0x68, /* C0 - C7 */ + 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* C8 - CF */ + 0xAC, 0x69, 0xED, 0xEE, 0xEB, 0xEF, 0xEC, 0xBF, /* D0 - D7 */ + 0x80, 0xFD, 0xFE, 0xFB, 0xFC, 0xAD, 0xAE, 0x59, /* D8 - DF */ + 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9C, 0x48, /* E0 - E7 */ + 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* E8 - EF */ + 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, /* F0 - F7 */ + 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF /* F8 - FF */ +}; + +#if (defined(ZIP) || CRYPT) +ZCONST uch ascii[] = { + 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, /* 00 - 07 */ + 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, /* 08 - 0F */ + 0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, /* 10 - 17 */ + 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, /* 18 - 1F */ + 0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, /* 20 - 27 */ + 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, /* 28 - 2F */ + 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, /* 30 - 37 */ + 0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A, /* 38 - 3F */ + 0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5, /* 40 - 47 */ + 0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, /* 48 - 4F */ + 0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF, /* 50 - 57 */ + 0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAC, /* 58 - 5F */ + 0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5, /* 60 - 67 */ + 0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, /* 68 - 6F */ + 0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF, /* 70 - 77 */ + 0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, /* 78 - 7F */ + 0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 80 - 87 */ + 0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1, /* 88 - 8F */ + 0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, /* 90 - 97 */ + 0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4, /* 98 - 9F */ + 0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, /* A0 - A7 */ + 0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0xDD, 0xDE, 0xAE, /* A8 - AF */ + 0x5E, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC, /* B0 - B7 */ + 0xBD, 0xBE, 0x5B, 0x5D, 0xAF, 0xA8, 0xB4, 0xD7, /* B8 - BF */ + 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* C0 - C7 */ + 0x48, 0x49, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5, /* C8 - CF */ + 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, /* D0 - D7 */ + 0x51, 0x52, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF, /* D8 - DF */ + 0x5C, 0xF7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* E0 - E7 */ + 0x59, 0x5A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5, /* E8 - EF */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* F0 - F7 */ + 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F /* F8 - FF */ +}; +#endif /* ZIP || CRYPT */ + +#endif /* ?MTS */ +#endif /* EBCDIC */ + +/*--------------------------------------------------------------------------- + + The following conversion tables translate between IBM PC CP 850 + (OEM codepage) and the "Western Europe & America" Windows codepage 1252. + The Windows codepage 1252 contains the ISO 8859-1 "Latin 1" codepage, + with some additional printable characters in the range (0x80 - 0x9F), + that is reserved to control codes in the ISO 8859-1 character table. + + The ISO <--> OEM conversion tables were constructed with the help + of the WIN32 (Win16?) API's OemToAnsi() and AnsiToOem() conversion + functions and have been checked against the CP850 and LATIN1 tables + provided in the MS-Kermit 3.14 distribution. + + ---------------------------------------------------------------------------*/ + +#ifdef IZ_ISO2OEM_ARRAY +ZCONST uch Far iso2oem[] = { + 0x3F, 0x3F, 0x27, 0x9F, 0x22, 0x2E, 0xC5, 0xCE, /* 80 - 87 */ + 0x5E, 0x25, 0x53, 0x3C, 0x4F, 0x3F, 0x3F, 0x3F, /* 88 - 8F */ + 0x3F, 0x27, 0x27, 0x22, 0x22, 0x07, 0x2D, 0x2D, /* 90 - 97 */ + 0x7E, 0x54, 0x73, 0x3E, 0x6F, 0x3F, 0x3F, 0x59, /* 98 - 9F */ + 0xFF, 0xAD, 0xBD, 0x9C, 0xCF, 0xBE, 0xDD, 0xF5, /* A0 - A7 */ + 0xF9, 0xB8, 0xA6, 0xAE, 0xAA, 0xF0, 0xA9, 0xEE, /* A8 - AF */ + 0xF8, 0xF1, 0xFD, 0xFC, 0xEF, 0xE6, 0xF4, 0xFA, /* B0 - B7 */ + 0xF7, 0xFB, 0xA7, 0xAF, 0xAC, 0xAB, 0xF3, 0xA8, /* B8 - BF */ + 0xB7, 0xB5, 0xB6, 0xC7, 0x8E, 0x8F, 0x92, 0x80, /* C0 - C7 */ + 0xD4, 0x90, 0xD2, 0xD3, 0xDE, 0xD6, 0xD7, 0xD8, /* C8 - CF */ + 0xD1, 0xA5, 0xE3, 0xE0, 0xE2, 0xE5, 0x99, 0x9E, /* D0 - D7 */ + 0x9D, 0xEB, 0xE9, 0xEA, 0x9A, 0xED, 0xE8, 0xE1, /* D8 - DF */ + 0x85, 0xA0, 0x83, 0xC6, 0x84, 0x86, 0x91, 0x87, /* E0 - E7 */ + 0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B, /* E8 - EF */ + 0xD0, 0xA4, 0x95, 0xA2, 0x93, 0xE4, 0x94, 0xF6, /* F0 - F7 */ + 0x9B, 0x97, 0xA3, 0x96, 0x81, 0xEC, 0xE7, 0x98 /* F8 - FF */ +}; +#endif /* IZ_ISO2OEM_ARRAY */ + +#ifdef IZ_OEM2ISO_ARRAY +ZCONST uch Far oem2iso[] = { + 0xC7, 0xFC, 0xE9, 0xE2, 0xE4, 0xE0, 0xE5, 0xE7, /* 80 - 87 */ + 0xEA, 0xEB, 0xE8, 0xEF, 0xEE, 0xEC, 0xC4, 0xC5, /* 88 - 8F */ + 0xC9, 0xE6, 0xC6, 0xF4, 0xF6, 0xF2, 0xFB, 0xF9, /* 90 - 97 */ + 0xFF, 0xD6, 0xDC, 0xF8, 0xA3, 0xD8, 0xD7, 0x83, /* 98 - 9F */ + 0xE1, 0xED, 0xF3, 0xFA, 0xF1, 0xD1, 0xAA, 0xBA, /* A0 - A7 */ + 0xBF, 0xAE, 0xAC, 0xBD, 0xBC, 0xA1, 0xAB, 0xBB, /* A8 - AF */ + 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xC1, 0xC2, 0xC0, /* B0 - B7 */ + 0xA9, 0xA6, 0xA6, 0x2B, 0x2B, 0xA2, 0xA5, 0x2B, /* B8 - BF */ + 0x2B, 0x2D, 0x2D, 0x2B, 0x2D, 0x2B, 0xE3, 0xC3, /* C0 - C7 */ + 0x2B, 0x2B, 0x2D, 0x2D, 0xA6, 0x2D, 0x2B, 0xA4, /* C8 - CF */ + 0xF0, 0xD0, 0xCA, 0xCB, 0xC8, 0x69, 0xCD, 0xCE, /* D0 - D7 */ + 0xCF, 0x2B, 0x2B, 0xA6, 0x5F, 0xA6, 0xCC, 0xAF, /* D8 - DF */ + 0xD3, 0xDF, 0xD4, 0xD2, 0xF5, 0xD5, 0xB5, 0xFE, /* E0 - E7 */ + 0xDE, 0xDA, 0xDB, 0xD9, 0xFD, 0xDD, 0xAF, 0xB4, /* E8 - EF */ + 0xAD, 0xB1, 0x3D, 0xBE, 0xB6, 0xA7, 0xF7, 0xB8, /* F0 - F7 */ + 0xB0, 0xA8, 0xB7, 0xB9, 0xB3, 0xB2, 0xA6, 0xA0 /* F8 - FF */ +}; +#endif /* IZ_OEM2ISO_ARRAY */ + +#endif /* __ebcdic_h */ diff --git a/utils/Install/inczip/globals.h b/utils/Install/inczip/globals.h new file mode 100644 index 0000000000..49439cffe7 --- /dev/null +++ b/utils/Install/inczip/globals.h @@ -0,0 +1,395 @@ +/*--------------------------------------------------------------------------- + + globals.h + + There is usually no need to include this file since unzip.h includes it. + + This header file is used by all of the UnZip source files. It contains + a struct definition that is used to "house" all of the global variables. + This is done to allow for multithreaded environments (OS/2, NT, Win95, + Unix) to call UnZip through an API without a semaphore. REENTRANT should + be defined for all platforms that require this. + + GLOBAL CONSTRUCTOR AND DESTRUCTOR (API WRITERS READ THIS!!!) + ------------------------------------------------------------ + + No, it's not C++, but it's as close as we can get with K&R. + + The main() of each process that uses these globals must include the + CONSTRUCTGLOBALS; statement. This will malloc enough memory for the + structure and initialize any variables that require it. This must + also be done by any API function that jumps into the middle of the + code. + + The DESTROYGLOBALS; statement should be inserted before EVERY "EXIT(n)". + Naturally, it also needs to be put before any API returns as well. + In fact, it's much more important in API functions since the process + will NOT end, and therefore the memory WON'T automatically be freed + by the operating system. + + USING VARIABLES FROM THE STRUCTURE + ---------------------------------- + + All global variables must now be prefixed with `G.' which is either a + global struct (in which case it should be the only global variable) or + a macro for the value of a local pointer variable that is passed from + function to function. Yes, this is a pain. But it's the only way to + allow full reentrancy. + + ADDING VARIABLES TO THE STRUCTURE + --------------------------------- + + If you make the inclusion of any variables conditional, be sure to only + check macros that are GUARANTEED to be included in every module. + For instance, newzip and pwdarg are needed only if CRYPT is TRUE, + but this is defined after unzip.h has been read. If you are not careful, + some modules will expect your variable to be part of this struct while + others won't. This will cause BIG problems. (Inexplicable crashes at + strange times, car fires, etc.) When in doubt, always include it! + + Note also that UnZipSFX needs a few variables that UnZip doesn't. However, + it also includes some object files from UnZip. If we were to conditionally + include the extra variables that UnZipSFX needs, the object files from + UnZip would not mesh with the UnZipSFX object files. Result: we just + include the UnZipSFX variables every time. (It's only an extra 4 bytes + so who cares!) + + ADDING FUNCTIONS + ---------------- + + To support this new global struct, all functions must now conditionally + pass the globals pointer (pG) to each other. This is supported by 5 macros: + __GPRO, __GPRO__, __G, __G__ and __GDEF. A function that needs no other + parameters would look like this: + + int extract_or_test_files(__G) + __GDEF + { + ... stuff ... + } + + A function with other parameters would look like: + + int memextract(__G__ tgt, tgtsize, src, srcsize) + __GDEF + uch *tgt, *src; + ulg tgtsize, srcsize; + { + ... stuff ... + } + + In the Function Prototypes section of unzpriv.h, you should use __GPRO and + __GPRO__ instead: + + int uz_opts OF((__GPRO__ int *pargc, char ***pargv)); + int process_zipfiles OF((__GPRO)); + + Note that there is NO comma after __G__ or __GPRO__ and no semi-colon after + __GDEF. I wish there was another way but I don't think there is. + + + TESTING THE CODE + ----------------- + + Whether your platform requires reentrancy or not, you should always try + building with REENTRANT defined if any functions have been added. It is + pretty easy to forget a __G__ or a __GDEF and this mistake will only show + up if REENTRANT is defined. All platforms should run with REENTRANT + defined. Platforms that can't take advantage of it will just be paying + a performance penalty needlessly. + + SIGNAL MADNESS + -------------- + + This whole pointer passing scheme falls apart when it comes to SIGNALs. + I handle this situation 2 ways right now. If you define USETHREADID, + UnZip will include a 64-entry table. Each entry can hold a global + pointer and thread ID for one thread. This should allow up to 64 + threads to access UnZip simultaneously. Calling DESTROYGLOBALS() + will free the global struct and zero the table entry. If somebody + forgets to call DESTROYGLOBALS(), this table will eventually fill up + and UnZip will exit with an error message. A good way to test your + code to make sure you didn't forget a DESTROYGLOBALS() is to change + THREADID_ENTRIES to 3 or 4 in globals.c, making the table real small. + Then make a small test program that calls your API a dozen times. + + Those platforms that don't have threads still need to be able to compile + with REENTRANT defined to test and see if new code is correctly written + to work either way. For these platforms, I simply keep a global pointer + called GG that points to the Globals structure. Good enough for testing. + + I believe that NT has thread level storage. This could probably be used + to store a global pointer for the sake of the signal handler more cleanly + than my table approach. + + ---------------------------------------------------------------------------*/ + +#ifndef __globals_h +#define __globals_h + +#ifdef USE_ZLIB +# include "zlib.h" +#endif + + +/*************/ +/* Globals */ +/*************/ + +typedef struct Globals { +#ifdef DLL + zvoid *callerglobs; /* pointer to structure of pass-through global vars */ +#endif + + /* command options of general use */ + UzpOpts UzO; /* command options of general use */ + +#ifndef FUNZIP + /* command options specific to the high level command line interface */ +#ifdef MORE + int M_flag; /* -M: built-in "more" function */ +#endif + + /* internal flags and general globals */ +#ifdef MORE + int height; /* check for SIGWINCH, etc., eventually... */ +#endif /* (take line-wrapping into account?) */ +#if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) + int tz_is_valid; /* indicates that timezone info can be used */ +#endif +#ifdef WINDLL + int prompt_always; /* prompt to overwrite if TRUE */ +#endif + int noargs; /* did true command line have *any* arguments? */ + unsigned filespecs; /* number of real file specifications to be matched */ + unsigned xfilespecs; /* number of excluded filespecs to be matched */ + int process_all_files; + int create_dirs; /* used by main(), mapname(), checkdir() */ + int extract_flag; + int newzip; /* reset in extract.c; used in crypt.c */ + LONGINT real_ecrec_offset; + LONGINT expect_ecrec_offset; + long csize; /* used by decompr. (NEXTBYTE): must be signed */ + long ucsize; /* used by unReduce(), explode() */ + long used_csize; /* used by extract_or_test_member(), explode() */ + +#ifdef DLL + int fValidate; /* true if only validating an archive */ + int filenotfound; + int redirect_data; /* redirect data to memory buffer */ + int redirect_text; /* redirect text output to buffer */ +# ifndef NO_SLIDE_REDIR + int redirect_slide; /* redirect decompression area to mem buffer */ + unsigned _wsize; +# endif + unsigned redirect_size; /* size of redirected output buffer */ + uch *redirect_buffer; /* pointer to head of allocated buffer */ + uch *redirect_pointer; /* pointer past end of written data */ +# ifndef NO_SLIDE_REDIR + uch *redirect_sldptr; /* head of decompression slide buffer */ +# endif +# ifdef OS2DLL + cbList(processExternally); /* call-back list */ +# endif +#endif /* DLL */ + + char **pfnames; + char **pxnames; + char sig[4]; + char answerbuf[10]; + min_info info[DIR_BLKSIZ]; + min_info *pInfo; +#endif /* !FUNZIP */ + union work area; /* see unzpriv.h for definition of work */ + +#ifndef FUNZIP +# if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) + ZCONST ulg near *crc_32_tab; +# else + ZCONST ulg Far *crc_32_tab; +# endif +#endif + ulg crc32val; /* CRC shift reg. (was static in funzip) */ + +#ifdef FUNZIP + FILE *in; /* file descriptor of compressed stream */ +#endif + uch *inbuf; /* input buffer (any size is OK) */ + uch *inptr; /* pointer into input buffer */ + int incnt; + +#ifndef FUNZIP + ulg bitbuf; + int bits_left; /* unreduce and unshrink only */ + int zipeof; + char *argv0; /* used for NT and EXE_EXTENSION */ + char *wildzipfn; + char *zipfn; /* GRR: WINDLL: must nuke any malloc'd zipfn... */ +#ifdef USE_STRM_INPUT + FILE *zipfd; /* zipfile file descriptor */ +#else + int zipfd; /* zipfile file handle */ +#endif + LONGINT ziplen; + LONGINT cur_zipfile_bufstart; /* extract_or_test, readbuf, ReadByte */ + LONGINT extra_bytes; /* used in unzip.c, misc.c */ + uch *extra_field; /* Unix, VMS, Mac, OS/2, Acorn, ... */ + uch *hold; + + local_file_hdr lrec; /* used in unzip.c, extract.c */ + cdir_file_hdr crec; /* used in unzip.c, extract.c, misc.c */ + ecdir_rec ecrec; /* used in unzip.c, extract.c */ + struct stat statbuf; /* used by main, mapname, check_for_newer */ + + int mem_mode; + uch *outbufptr; /* extract.c static */ + ulg outsize; /* extract.c static */ + int reported_backslash; /* extract.c static */ + int disk_full; + int newfile; + + int didCRlast; /* fileio static */ + ulg numlines; /* fileio static: number of lines printed */ + int sol; /* fileio static: at start of line */ + int no_ecrec; /* process static */ +#ifdef SYMLINKS + int symlnk; +#endif +#ifdef NOVELL_BUG_FAILSAFE + int dne; /* true if stat() says file doesn't exist */ +#endif + + FILE *outfile; + uch *outbuf; + uch *realbuf; + +#ifndef VMS /* if SMALL_MEM, outbuf2 is initialized in */ + uch *outbuf2; /* process_zipfiles() (never changes); */ +#endif /* else malloc'd ONLY if unshrink and -a */ +#endif /* !FUNZIP */ + uch *outptr; + ulg outcnt; /* number of chars stored in outbuf */ +#ifndef FUNZIP + char filename[FILNAMSIZ]; /* also used by NT for temporary SFX path */ + +#ifdef CMS_MVS + char *tempfn; /* temp file used; erase on close */ +#endif + + char *key; /* crypt static: decryption password or NULL */ + int nopwd; /* crypt static */ +#endif /* !FUNZIP */ + ulg keys[3]; /* crypt static: keys defining pseudo-random sequence */ + +#if (!defined(DOS_FLX_H68_OS2_W32) && !defined(AMIGA) && !defined(RISCOS)) +#if (!defined(MACOS) && !defined(ATARI) && !defined(VMS)) + int echofd; /* ttyio static: file descriptor whose echo is off */ +#endif /* !(MACOS || ATARI || VMS) */ +#endif /* !(DOS_FLX_H68_OS2_W32 || AMIGA || RISCOS) */ + + unsigned hufts; /* track memory usage */ + +#ifdef USE_ZLIB + int inflInit; /* inflate static: zlib inflate() initialized */ + z_stream dstrm; /* inflate global: decompression stream */ +#else + struct huft *fixed_tl; /* inflate static */ + struct huft *fixed_td; /* inflate static */ + int fixed_bl, fixed_bd; /* inflate static */ + unsigned wp; /* inflate static: current position in slide */ + ulg bb; /* inflate static: bit buffer */ + unsigned bk; /* inflate static: bits in bit buffer */ +#endif /* ?USE_ZLIB */ + +#ifndef FUNZIP +#ifdef SMALL_MEM + char rgchBigBuffer[512]; + char rgchSmallBuffer[96]; + char rgchSmallBuffer2[160]; /* boosted to 160 for local3[] in unzip.c */ +#endif + + MsgFn *message; + InputFn *input; + PauseFn *mpause; + PasswdFn *decr_passwd; + StatCBFn *statreportcb; +#ifdef WINDLL + LPUSERFUNCTIONS lpUserFunctions; +#endif + + int incnt_leftover; /* so improved NEXTBYTE does not waste input */ + uch *inptr_leftover; + +#ifdef VMS_TEXT_CONV + int VMS_line_state; /* so native VMS variable-length text files are */ + int VMS_line_length; /* readable on other platforms */ + int VMS_line_pad; +#endif +#endif /* !FUNZIP */ + +#ifdef SYSTEM_SPECIFIC_GLOBALS + SYSTEM_SPECIFIC_GLOBALS +#endif + +} Uz_Globs; /* end of struct Globals */ + + +/***************************************************************************/ + + +#ifdef FUNZIP +# if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) + extern ZCONST ulg near crc_32_tab[256]; +# else + extern ZCONST ulg Far *crc_32_tab; +# endif +# define CRC_32_TAB crc_32_tab +#else +# define CRC_32_TAB G.crc_32_tab +#endif + + +Uz_Globs *globalsCtor OF((void)); + +/* pseudo constant sigs; they are initialized at runtime so unzip executable + * won't look like a zipfile + */ +extern char local_hdr_sig[4]; +extern char central_hdr_sig[4]; +extern char end_central_sig[4]; +/* extern char extd_local_sig[4]; NOT USED YET */ + +#ifdef REENTRANT +# define G (*(Uz_Globs *)pG) +# define __G pG +# define __G__ pG, +# define __GPRO Uz_Globs *pG +# define __GPRO__ Uz_Globs *pG, +# define __GDEF Uz_Globs *pG; +# ifdef USETHREADID + extern int lastScan; + void deregisterGlobalPointer OF((__GPRO)); + Uz_Globs *getGlobalPointer OF((void)); +# define GETGLOBALS() Uz_Globs *pG = getGlobalPointer(); +# define DESTROYGLOBALS() {free_G_buffers(pG); deregisterGlobalPointer(pG);} +# else + extern Uz_Globs *GG; +# define GETGLOBALS() Uz_Globs *pG = GG; +# define DESTROYGLOBALS() {free_G_buffers(pG); free(pG);} +# endif /* ?USETHREADID */ +# define CONSTRUCTGLOBALS() Uz_Globs *pG = globalsCtor() +#else /* !REENTRANT */ + extern Uz_Globs G; +# define __G +# define __G__ +# define __GPRO void +# define __GPRO__ +# define __GDEF +# define GETGLOBALS() +# define CONSTRUCTGLOBALS() globalsCtor() +# define DESTROYGLOBALS() +#endif /* ?REENTRANT */ + +#define uO G.UzO + +#endif /* __globals_h */ diff --git a/utils/Install/inczip/inflate.h b/utils/Install/inczip/inflate.h new file mode 100644 index 0000000000..f1d774b793 --- /dev/null +++ b/utils/Install/inczip/inflate.h @@ -0,0 +1,24 @@ +/* inflate.h for UnZip -- put in the public domain by Mark Adler + version c14f, 23 November 1995 */ + + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + + History: + vers date who what + ---- --------- -------------- ------------------------------------ + c14 12 Mar 93 M. Adler made inflate.c standalone with the + introduction of inflate.h. + c14d 28 Aug 93 G. Roelofs replaced flush/FlushOutput with new version + c14e 29 Sep 93 G. Roelofs moved everything into unzip.h; added crypt.h + c14f 23 Nov 95 G. Roelofs added UNZIP_INTERNAL to accommodate newly + split unzip.h + */ + +#define UNZIP_INTERNAL +#include "unzip.h" /* provides slide[], typedefs and macros */ +#ifdef FUNZIP +# include "crypt.h" /* provides NEXTBYTE macro for crypt version of funzip */ +#endif diff --git a/utils/Install/inczip/nt.h b/utils/Install/inczip/nt.h new file mode 100644 index 0000000000..0109c2b678 --- /dev/null +++ b/utils/Install/inczip/nt.h @@ -0,0 +1,28 @@ +/* nt.h: central header for EF_NTSD "SD" extra field */ + +#ifndef _NT_H +#define _NT_H + +#define NTSD_BUFFERSIZE (1024) /* threshold to cause malloc() */ +#define OVERRIDE_BACKUP 1 /* we have SeBackupPrivilege on remote */ +#define OVERRIDE_RESTORE 2 /* we have SeRestorePrivilege on remote */ +#define OVERRIDE_SACL 4 /* we have SeSystemSecurityPrivilege on remote */ + +typedef struct { + BOOL bValid; /* are our contents valid? */ + BOOL bProcessDefer; /* process deferred entry yet? */ + BOOL bUsePrivileges; /* use privilege overrides? */ + DWORD dwFileSystemFlags; /* describes target file system */ + BOOL bRemote; /* is volume remote? */ + DWORD dwRemotePrivileges; /* relevant only on remote volumes */ + DWORD dwFileAttributes; + char RootPath[MAX_PATH+1]; /* path to network / filesystem */ +} VOLUMECAPS, *PVOLUMECAPS, *LPVOLUMECAPS; + +BOOL SecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata); +BOOL GetVolumeCaps(char *rootpath, char *name, PVOLUMECAPS VolumeCaps); +BOOL ValidateSecurity(uch *securitydata); +BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed, + PDWORD dwDirectoryFail, PDWORD dwBytesFail); + +#endif /* _NT_H */ diff --git a/utils/Install/inczip/os2acl.h b/utils/Install/inczip/os2acl.h new file mode 100644 index 0000000000..1defd59bdb --- /dev/null +++ b/utils/Install/inczip/os2acl.h @@ -0,0 +1,29 @@ +/* os2acl.h + * + * Author: Kai Uwe Rommel + * Created: Fri Mar 29 1996 + */ + +/* $Id$ */ + +/* + * $Log$ + * Revision 1.1.2.1 2000/04/11 12:38:05 BS + * Added wxInstall a self extracting installation program using wxWindows. + * + * Revision 1.1 1996/03/30 09:35:00 rommel + * Initial revision + * + */ + +#ifndef _OS2ACL_H +#define _OS2ACL_H + +#define ACL_BUFFERSIZE 4096 + +int acl_get(char *server, const char *resource, char *buffer); +int acl_set(char *server, const char *resource, char *buffer); + +#endif /* _OS2ACL_H */ + +/* end of os2acl.h */ diff --git a/utils/Install/inczip/os2cfg.h b/utils/Install/inczip/os2cfg.h new file mode 100644 index 0000000000..0a5bf491ce --- /dev/null +++ b/utils/Install/inczip/os2cfg.h @@ -0,0 +1,136 @@ +/*--------------------------------------------------------------------------- + OS/2 specific configuration section: + ---------------------------------------------------------------------------*/ + +#ifndef __os2cfg_h +#define __os2cfg_h + +#ifdef MSDOS +# include /* for REGS macro (TC) or _dos_setftime (MSC) */ +# ifdef __TURBOC__ /* includes Power C */ +# include /* for structure ftime */ +# ifndef __BORLANDC__ /* there appears to be a bug (?) in Borland's */ +# include /* MEM.H related to __STDC__ and far poin- */ +# endif /* ters. (dpk) [mem.h included for memcpy] */ +# endif +#endif /* MSDOS */ + +#ifdef __IBMC__ +# define S_IFMT 0xF000 +# define timezone _timezone /* (underscore names work with */ +# define tzset _tzset /* all versions of C Set) */ +# define PIPE_ERROR (errno == EERRSET || errno == EOS2ERR) +#endif /* __IBMC__ */ + +#ifdef __WATCOMC__ +# ifdef __386__ +# ifndef WATCOMC_386 +# define WATCOMC_386 +# endif +# define __32BIT__ +# undef far +# define far +# undef near +# define near + +/* Get asm routines to link properly without using "__cdecl": */ +# ifndef USE_ZLIB +# pragma aux crc32 "_*" parm caller [] value [eax] modify [eax] +# pragma aux get_crc_table "_*" parm caller [] value [eax] \ + modify [eax ecx edx] +# endif /* !USE_ZLIB */ +# else /* !__386__ */ +# ifndef USE_ZLIB +# pragma aux crc32 "_*" parm caller [] value [ax dx] \ + modify [ax cx dx bx] +# pragma aux get_crc_table "_*" parm caller [] value [ax] \ + modify [ax cx dx bx] +# endif /* !USE_ZLIB */ +# endif /* ?__386__ */ + +# ifndef EPIPE +# define EPIPE -1 +# endif +# define PIPE_ERROR (errno == EPIPE) +#endif /* __WATCOMC__ */ + +#ifdef __EMX__ +# ifndef __32BIT__ +# define __32BIT__ +# endif +# define far +#endif + +#ifndef __32BIT__ +# define __16BIT__ +#endif + +#ifdef MSDOS +# undef MSDOS +#endif + +#if defined(M_I86CM) || defined(M_I86LM) +# define MED_MEM +#endif +#if (defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)) +# define MED_MEM +#endif +#ifdef __16BIT__ +# ifndef MED_MEM +# define SMALL_MEM +# endif +#endif + +#ifdef __16BIT__ +# if defined(MSC) || defined(__WATCOMC__) +# include +# define nearmalloc _nmalloc +# define nearfree _nfree +# endif +# if defined(__TURBOC__) && defined(DYNALLOC_CRCTAB) +# if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__) +# undef DYNALLOC_CRCTAB +# endif +# endif +# ifndef nearmalloc +# define nearmalloc malloc +# define nearfree free +# endif +#endif + +/* TIMESTAMP is now supported on OS/2, so enable it by default */ +#if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) +# define TIMESTAMP +#endif + +/* check that TZ environment variable is defined before using UTC times */ +#if (!defined(NO_IZ_CHECK_TZ) && !defined(IZ_CHECK_TZ)) +# define IZ_CHECK_TZ +#endif + +#ifndef OS2_EAS +# define OS2_EAS /* for -l and -v listings (list.c) */ +#endif + +#ifdef isupper +# undef isupper +#endif +#ifdef tolower +# undef tolower +#endif +#define isupper(x) IsUpperNLS((unsigned char)(x)) +#define tolower(x) ToLowerNLS((unsigned char)(x)) +#define USETHREADID + +/* handlers for OEM <--> ANSI string conversions */ +#ifndef _OS2_ISO_ANSI + /* use home-brewed conversion functions; internal charset is OEM */ +# ifdef CRTL_CP_IS_ISO +# undef CRTL_CP_IS_ISO +# endif +# ifndef CRTL_CP_IS_OEM +# define CRTL_CP_IS_OEM +# endif +#endif + +#endif /* !__os2cfg_h */ diff --git a/utils/Install/inczip/os2data.h b/utils/Install/inczip/os2data.h new file mode 100644 index 0000000000..726baa99d3 --- /dev/null +++ b/utils/Install/inczip/os2data.h @@ -0,0 +1,139 @@ +/*--------------------------------------------------------------------------- + + os2data.h + + OS/2-specific structures and data to be included in the global data struc- + ture. + + ---------------------------------------------------------------------------*/ + + +#define MAXNAMLEN 256 +#define MAXPATHLEN 256 +#define MAXLEN 256 /* temporary buffer length */ +#define IBUF_LEN 4096 /* input buffer length */ + +#define INCL_NOPM +#define INCL_DOSNLS +#define INCL_DOSPROCESS +#define INCL_DOSDEVICES +#define INCL_DOSDEVIOCTL +#define INCL_DOSERRORS +#define INCL_DOSMISC + +#if (defined(OS2DLL) && !defined(DLL)) +# undef OS2DLL +#endif + +#ifdef OS2DLL +# define INCL_REXXSAA +# include +#endif + +#include + + +struct direct +{ + ino_t d_ino; /* a bit of a farce */ + int d_reclen; /* more farce */ + int d_namlen; /* length of d_name */ + char d_name[MAXNAMLEN + 1]; /* null terminated */ + /* nonstandard fields */ + long d_size; /* size in bytes */ + unsigned d_mode; /* MS-DOS or OS/2 file attributes */ + unsigned d_time; + unsigned d_date; +}; + +/* The fields d_size and d_mode are extensions by me (Kai Uwe Rommel). The + * find_first and find_next calls deliver these data without any extra cost. + * If these data are needed, the fields save a lot of extra calls to stat() + * (each stat() again performs a find_first call !). + */ + +struct _dircontents +{ + char *_d_entry; + long _d_size; + unsigned _d_mode, _d_time, _d_date; + struct _dircontents *_d_next; +}; + +typedef struct _dirdesc +{ + int dd_id; /* uniquely identify each open directory */ + long dd_loc; /* where we are in directory entry is this */ + struct _dircontents *dd_contents; /* pointer to contents of dir */ + struct _dircontents *dd_cp; /* pointer to current position */ +} +DIR; + + +struct os2Global { + +#ifndef SFX + HDIR hdir; +#ifdef __32BIT__ + ULONG count; + FILEFINDBUF3 find; +#else + USHORT count; + FILEFINDBUF find; +#endif +#endif /* !SFX */ + + int created_dir; /* used by mapname(), checkdir() */ + int renamed_fullpath; /* ditto */ + int fnlen; /* ditto */ +#ifdef __32BIT__ + ULONG nLabelDrive; /* ditto */ +#else + USHORT nLabelDrive; +#endif + int longnameEA; /* checkdir(), close_outfile() */ + char *lastpathcomp; /* ditto */ + + struct direct dp; + int lower; + USHORT nLastDrive, nResult; + + DIR *dir; + char *dirname, *wildname, matchname[FILNAMSIZ]; + int firstcall, have_dirname, dirnamelen; + + int rootlen; /* length of rootpath */ + char *rootpath; /* user's "extract-to" directory */ + char *buildpathHPFS; /* full path (so far) to extracted file, */ + char *buildpathFAT; /* both HPFS/EA (main) and FAT versions */ + char *endHPFS; /* corresponding pointers to end of */ + char *endFAT; /* buildpath ('\0') */ + +#ifdef OS2DLL + char buffer[IBUF_LEN]; + char output_var[MAXLEN]; + char getvar_buf[MAXLEN]; + int getvar_len; + + int output_idx; + int stem_len; + int putchar_idx; + int rexx_error; + char *rexx_mes; + + SHVBLOCK request; +#endif +}; + + +#define SYSTEM_SPECIFIC_GLOBALS struct os2Global os2; +#define SYSTEM_SPECIFIC_CTOR os2GlobalsCtor + +#ifdef OS2DLL +# ifdef API_DOC +# define SYSTEM_API_BRIEF REXXBrief +# define SYSTEM_API_DETAILS REXXDetails + extern char *REXXBrief; + extern APIDocStruct REXXDetails[]; +# endif +#endif diff --git a/utils/Install/inczip/rsxntwin.h b/utils/Install/inczip/rsxntwin.h new file mode 100644 index 0000000000..c6dd09a22f --- /dev/null +++ b/utils/Install/inczip/rsxntwin.h @@ -0,0 +1,155 @@ +/* rsxntwin.h + * + * fills some gaps in the rsxnt 1.3 win32 header files () that are + * required for compiling Info-ZIP sources for Win NT / Win 95 + */ + +#ifdef __RSXNT__ +#if !defined (_RSXNTWIN_H) +#define _RSXNTWIN_H + +#ifdef TFUNCT /* TFUNCT is undefined when MSSDK headers are used */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define PASCAL __stdcall + +#define ANYSIZE_ARRAY 1 + +#ifndef TIME_ZONE_ID_UNKNOWN +# define TIME_ZONE_ID_UNKNOWN 0 +#endif + +#define FILE_ATTRIBUTE_HIDDEN 0x00000002 +#define FILE_ATTRIBUTE_SYSTEM 0x00000004 + +#define FILE_SHARE_DELETE 0x00000004 + +#define FILE_PERSISTENT_ACLS 0x00000008 + +#define HFILE_ERROR ((HFILE)-1) + +#define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS + + +BOOL WINAPI DosDateTimeToFileTime(WORD, WORD, LPFILETIME); + + +#ifndef SetVolumeLabel +#define SetVolumeLabel TFUNCT(SetVolumeLabel) +#endif +BOOL WINAPI SetVolumeLabel(LPCTSTR, LPCTSTR); + + +#ifndef GetDriveType +#define GetDriveType TFUNCT(GetDriveType) +#endif +DWORD GetDriveType(LPCTSTR); + +#define DRIVE_UNKNOWN 0 +#define DRIVE_REMOVABLE 2 +#define DRIVE_FIXED 3 +#define DRIVE_REMOTE 4 +#define DRIVE_CDROM 5 +#define DRIVE_RAMDISK 6 + +#ifndef SearchPath +#define SearchPath TFUNCT(SearchPath) +#endif +BOOL WINAPI SearchPath(LPCTSTR, LPCTSTR, LPCTSTR, UINT, LPTSTR, LPTSTR *); + +#define ERROR_SUCCESS 0 +#define ERROR_INSUFFICIENT_BUFFER 122 + +LONG WINAPI InterlockedExchange(LPLONG, LONG); + +#define ACCESS_SYSTEM_SECURITY 0x01000000L + +typedef PVOID PSECURITY_DESCRIPTOR; +typedef PVOID PSID; +typedef struct _ACL { + BYTE AclRevision; + BYTE Sbz1; + WORD AclSize; + WORD AceCount; + WORD Sbz2; +} ACL; +typedef ACL *PACL; + +typedef struct _LUID { + DWORD LowPart; + LONG HighPart; +} LUID, *PLUID; + +typedef struct _LUID_AND_ATTRIBUTES { + LUID Luid; + DWORD Attributes; + } LUID_AND_ATTRIBUTES, * PLUID_AND_ATTRIBUTES; + +typedef struct _TOKEN_PRIVILEGES { + DWORD PrivilegeCount; + LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]; +} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES; + +#define TOKEN_QUERY 0x0008 +#define TOKEN_ADJUST_PRIVILEGES 0x0020 + +BOOL WINAPI OpenProcessToken(HANDLE, DWORD, PHANDLE); +BOOL WINAPI AdjustTokenPrivileges(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, + PTOKEN_PRIVILEGES, PDWORD); + +#ifndef LookupPrivilegeValue +#define LookupPrivilegeValue TFUNCT(LookupPrivilegeValue) +#endif +BOOL WINAPI LookupPrivilegeValue(LPCTSTR, LPCTSTR, PLUID); + +typedef DWORD SECURITY_INFORMATION, *PSECURITY_INFORMATION; +#define OWNER_SECURITY_INFORMATION 0x00000001L +#define GROUP_SECURITY_INFORMATION 0x00000002L +#define DACL_SECURITY_INFORMATION 0x00000004L +#define SACL_SECURITY_INFORMATION 0x00000008L + +typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL; +#define SE_DACL_PRESENT 0x0004 +#define SE_SACL_PRESENT 0x0010 + +#define SE_PRIVILEGE_ENABLED 0x00000002L + +#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege") +#define SE_BACKUP_NAME TEXT("SeBackupPrivilege") +#define SE_RESTORE_NAME TEXT("SeRestorePrivilege") + +BOOL WINAPI GetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION, + PSECURITY_DESCRIPTOR, DWORD, LPDWORD); +BOOL WINAPI SetKernelObjectSecurity(HANDLE, SECURITY_INFORMATION, + PSECURITY_DESCRIPTOR); +BOOL WINAPI IsValidSid(PSID); +BOOL WINAPI IsValidAcl(PACL); +BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR); +BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR); +DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR); +BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR, + PSECURITY_DESCRIPTOR_CONTROL, LPDWORD); +BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR, + SECURITY_DESCRIPTOR_CONTROL, SECURITY_DESCRIPTOR_CONTROL); +BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR, + LPBOOL, PACL *, LPBOOL); +BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL); +BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR, + LPBOOL, PACL *, LPBOOL); +BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR, BOOL, PACL, BOOL); +BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID *, LPBOOL); +BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR, PSID, BOOL); +BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID *, LPBOOL); +BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR, PSID, BOOL); +VOID WINAPI InitializeCriticalSection(); + +#ifdef __cplusplus +} +#endif + +#endif /* TFUNCT */ +#endif /* !defined (_RSXNTWIN_H) */ +#endif /* __RSXNT__ */ diff --git a/utils/Install/inczip/tables.h b/utils/Install/inczip/tables.h new file mode 100644 index 0000000000..0f4ecc316a --- /dev/null +++ b/utils/Install/inczip/tables.h @@ -0,0 +1,81 @@ +/*--------------------------------------------------------------------------- + + tables.h + + This file contains only the 32-bit CRC table used in fUnZip; + it is in a separate file because it is rather big and ugly and + gets in the way during editing. + This file can be included in no more than ONE source file per + executable, of course. + + ---------------------------------------------------------------------------*/ + +#ifndef __tables_h /* prevent multiple inclusions */ +#define __tables_h + +#ifdef FUNZIP +#if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) + +/* Table of CRC-32's of all single-byte values (made by makecrc.c) */ +ZCONST ulg near crc_32_tab[256] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; + +#else /* USE_ZLIB && !USE_OWN_CRCTAB */ + +ZCONST uLongf *crc_32_tab = NULL; + +#endif /* ?(!USE_ZLIB || USE_OWN_CRCTAB) */ +#endif /* FUNZIP */ +#endif /* __tables_h */ diff --git a/utils/Install/inczip/ttyio.h b/utils/Install/inczip/ttyio.h new file mode 100644 index 0000000000..685e7ace66 --- /dev/null +++ b/utils/Install/inczip/ttyio.h @@ -0,0 +1,186 @@ +/* + ttyio.h + */ + +#ifndef __ttyio_h /* don't include more than once */ +#define __ttyio_h + +#ifndef __crypt_h +# include "crypt.h" /* ensure that encryption header file has been seen */ +#endif + +#if (CRYPT || (defined(UNZIP) && !defined(FUNZIP))) +/* + * Non-echo keyboard/console input support is needed and enabled. + */ + +#ifndef __G /* UnZip only, for now (DLL stuff) */ +# define __G +# define __G__ +# define __GDEF +# define __GPRO void +# define __GPRO__ +#endif + +#ifndef ZCONST /* UnZip only (until have configure script like Zip) */ +# define ZCONST const +#endif + +#if (defined(MSDOS) || defined(OS2) || defined(WIN32)) +# ifndef DOS_OS2_W32 +# define DOS_OS2_W32 +# endif +#endif + +#if (defined(DOS_OS2_W32) || defined(__human68k__)) +# ifndef DOS_H68_OS2_W32 +# define DOS_H68_OS2_W32 +# endif +#endif + +#if (defined(DOS_OS2_W32) || defined(FLEXOS)) +# ifndef DOS_FLX_OS2_W32 +# define DOS_FLX_OS2_W32 +# endif +#endif + +#if (defined(DOS_H68_OS2_W32) || defined(FLEXOS)) +# ifndef DOS_FLX_H68_OS2_W32 +# define DOS_FLX_H68_OS2_W32 +# endif +#endif + +#if (defined(VM_CMS) || defined(MVS)) +# ifndef CMS_MVS +# define CMS_MVS +# endif +#endif + + +/* Function prototypes */ + +/* The following systems supply a `non-echo' character input function "getch()" + * (or an alias) and do not need the echoff() / echon() function pair. + */ +#ifdef AMIGA +# define echoff(f) +# define echon() +# define getch() Agetch() +# define HAVE_WORKING_GETCH +#endif /* AMIGA */ + +#ifdef ATARI +# define echoff(f) +# define echon() +# include +# define getch() (Cnecin() & 0x000000ff) +# define HAVE_WORKING_GETCH +#endif + +#ifdef MACOS +# define echoff(f) +# define echon() +# define getch() macgetch() +# define HAVE_WORKING_GETCH +#endif + +#ifdef QDOS +# define echoff(f) +# define echon() +# define HAVE_WORKING_GETCH +#endif + +#ifdef RISCOS +# define echoff(f) +# define echon() +# define getch() SWI_OS_ReadC() +# define HAVE_WORKING_GETCH +#endif + +#ifdef DOS_H68_OS2_W32 +# define echoff(f) +# define echon() +# ifdef WIN32 +# ifndef getch +# define getch() getch_win32() +# endif +# else /* !WIN32 */ +# ifdef __EMX__ +# ifndef getch +# define getch() _read_kbd(0, 1, 0) +# endif +# else /* !__EMX__ */ +# ifdef __GO32__ +# include +# define getch() getkey() +# else /* !__GO32__ */ +# include +# endif /* ?__GO32__ */ +# endif /* ?__EMX__ */ +# endif /* ?WIN32 */ +# define HAVE_WORKING_GETCH +#endif /* DOS_H68_OS2_W32 */ + +#ifdef FLEXOS +# define echoff(f) +# define echon() +# define getch() getchar() /* not correct, but may not be on a console */ +# define HAVE_WORKING_GETCH +#endif + +/* For VM/CMS and MVS, we do not (yet) have any support to switch terminal + * input echo on and off. The following "fake" definitions allow inclusion + * of crypt support and UnZip's "pause prompting" features, but without + * any echo suppression. + */ +#ifdef CMS_MVS +# define echoff(f) +# define echon() +#endif + +/* VMS has a single echo() function in ttyio.c to toggle terminal + * input echo on and off. + */ +#ifdef VMS +# define echoff(f) echo(0) +# define echon() echo(1) + int echo OF((int)); +#endif + +/* For all other systems, ttyio.c supplies the two functions Echoff() and + * Echon() for suppressing and (re)enabling console input echo. + */ +#ifndef echoff +# define echoff(f) Echoff(__G__ f) +# define echon() Echon(__G) + void Echoff OF((__GPRO__ int f)); + void Echon OF((__GPRO)); +#endif + +/* this stuff is used by MORE and also now by the ctrl-S code; fileio.c only */ +#if (defined(UNZIP) && !defined(FUNZIP)) +# ifdef HAVE_WORKING_GETCH +# define FGETCH(f) getch() +# endif +# ifndef FGETCH + /* default for all systems where no getch()-like function is available */ + int zgetch OF((__GPRO__ int f)); +# define FGETCH(f) zgetch(__G__ f) +# endif +#endif /* UNZIP && !FUNZIP */ + +#if (CRYPT && !defined(WINDLL)) + char *getp OF((__GPRO__ ZCONST char *m, char *p, int n)); +#endif + +#else /* !(CRYPT || (UNZIP && !FUNZIP)) */ + +/* + * No need for non-echo keyboard/console input; provide dummy definitions. + */ +#define echoff(f) +#define echon() + +#endif /* ?(CRYPT || (UNZIP && !FUNZIP)) */ + +#endif /* !__ttyio_h */ diff --git a/utils/Install/inczip/unzip.h b/utils/Install/inczip/unzip.h new file mode 100644 index 0000000000..5aa56a4160 --- /dev/null +++ b/utils/Install/inczip/unzip.h @@ -0,0 +1,548 @@ +/*--------------------------------------------------------------------------- + + unzip.h (new) + + This header file contains the public macros and typedefs required by + both the UnZip sources and by any application using the UnZip API. If + UNZIP_INTERNAL is defined, it includes unzpriv.h (containing includes, + prototypes and extern variables used by the actual UnZip sources). + + ---------------------------------------------------------------------------*/ + + +#ifndef __unzip_h /* prevent multiple inclusions */ +#define __unzip_h + +/*--------------------------------------------------------------------------- + Predefined, machine-specific macros. + ---------------------------------------------------------------------------*/ + +#ifdef __GO32__ /* MS-DOS extender: NOT Unix */ +# ifdef unix +# undef unix +# endif +# ifdef __unix +# undef __unix +# endif +# ifdef __unix__ +# undef __unix__ +# endif +#endif + +#if ((defined(__convex__) || defined(__convexc__)) && !defined(CONVEX)) +# define CONVEX +#endif + +#if (defined(unix) || defined(__unix) || defined(__unix__)) +# ifndef UNIX +# define UNIX +# endif +#endif /* unix || __unix || __unix__ */ +#if (defined(M_XENIX) || defined(COHERENT) || defined(__hpux)) +# ifndef UNIX +# define UNIX +# endif +#endif /* M_XENIX || COHERENT || __hpux */ +#if (defined(CONVEX) || defined(MINIX) || defined(_AIX) || defined(__QNX__)) +# ifndef UNIX +# define UNIX +# endif +#endif /* CONVEX || MINIX || _AIX || __QNX__ */ + +#if (defined(VM_CMS) || defined(MVS)) +# define CMS_MVS +#endif + +#if (defined(__OS2__) && !defined(OS2)) +# define OS2 +#endif + +#if (defined(__TANDEM) && !defined(TANDEM)) +# define TANDEM +#endif + +#if (defined(__VMS) && !defined(VMS)) +# define VMS +#endif + +#if ((defined(__WIN32__) || defined(_WIN32)) && !defined(WIN32)) +# define WIN32 +#endif +#if ((defined(__WINNT__) || defined(__WINNT)) && !defined(WIN32)) +# define WIN32 +#endif + +#ifdef __COMPILER_KCC__ +# include +# ifdef SYS_T20 +# define TOPS20 +# endif +#endif /* __COMPILER_KCC__ */ + +/* Borland C does not define __TURBOC__ if compiling for a 32-bit platform */ +#ifdef __BORLANDC__ +# ifndef __TURBOC__ +# define __TURBOC__ +# endif +# if (!defined(__MSDOS__) && !defined(OS2) && !defined(WIN32)) +# define __MSDOS__ +# endif +#endif + +/* define MSDOS for Turbo C (unless OS/2) and Power C as well as Microsoft C */ +#ifdef __POWERC +# define __TURBOC__ +# define MSDOS +#endif /* __POWERC */ + +#if (defined(__MSDOS__) && !defined(MSDOS)) /* just to make sure */ +# define MSDOS +#endif + +/* RSXNTDJ (at least up to v1.3) compiles for WIN32 (RSXNT) using a derivate + of the EMX environment, but defines MSDOS and __GO32__. ARG !!! */ +#if (defined(MSDOS) && defined(WIN32)) +# undef MSDOS /* WIN32 is >>>not<<< MSDOS */ +#endif +#if (defined(__GO32__) && defined(__EMX__) && defined(__RSXNT__)) +# undef __GO32__ +#endif + +#if (defined(linux) && !defined(LINUX)) +# define LINUX +#endif + +#ifdef __riscos +# define RISCOS +#endif + +#if (defined(THINK_C) || defined(MPW)) +# define MACOS +#endif +#if (defined(__MWERKS__) && defined(macintosh)) +# define MACOS +#endif + +/* use prototypes and ANSI libraries if __STDC__, or Microsoft or Borland C, or + * Silicon Graphics, or Convex?, or IBM C Set/2, or GNU gcc/emx, or Watcom C, + * or Macintosh, or Windows NT, or Sequent, or Atari or IBM RS/6000. + */ +#if (defined(__STDC__) || defined(MSDOS) || defined(WIN32) || defined(__EMX__)) +# ifndef PROTO +# define PROTO +# endif +# ifndef MODERN +# define MODERN +# endif +#endif +#if (defined(__IBMC__) || defined(__BORLANDC__) || defined(__WATCOMC__)) +# ifndef PROTO +# define PROTO +# endif +# ifndef MODERN +# define MODERN +# endif +#endif +#if (defined(MACOS) || defined(ATARI_ST) || defined(RISCOS)) +# ifndef PROTO +# define PROTO +# endif +# ifndef MODERN +# define MODERN +# endif +#endif +/* Sequent running Dynix/ptx: non-modern compiler */ +#if (defined(_AIX) || defined(sgi) || (defined(_SEQUENT_) && !defined(PTX))) +# ifndef PROTO +# define PROTO +# endif +# ifndef MODERN +# define MODERN +# endif +#endif +#if (defined(CMS_MVS) || defined(__BEOS__)) /* || defined(CONVEX) */ +# ifndef PROTO +# define PROTO +# endif +# ifndef MODERN +# define MODERN +# endif +#endif + +/* turn off prototypes if requested */ +#if (defined(NOPROTO) && defined(PROTO)) +# undef PROTO +#endif + +/* used to remove arguments in function prototypes for non-ANSI C */ +#ifdef PROTO +# define OF(a) a +#else +# define OF(a) () +#endif + +/* enable the "const" keyword only if MODERN and if not otherwise instructed */ +#ifdef MODERN +# if (!defined(ZCONST) && (defined(USE_CONST) || !defined(NO_CONST))) +# define ZCONST const +# endif +#endif + +#ifndef ZCONST +# define ZCONST +#endif + + +/*--------------------------------------------------------------------------- + Grab system-specific public include headers. + ---------------------------------------------------------------------------*/ + +#ifdef POCKET_UNZIP /* WinCE port */ +# include "wince/punzip.h" /* must appear before windows.h */ +#endif + +#ifdef WINDLL +# include +# include "windll/structs.h" +#endif + +/*--------------------------------------------------------------------------- + Grab system-dependent definition of EXPENTRY for prototypes below. + ---------------------------------------------------------------------------*/ + +#if 0 +#if (defined(OS2) && !defined(FUNZIP)) +# ifdef UNZIP_INTERNAL +# define INCL_NOPM +# define INCL_DOSNLS +# define INCL_DOSPROCESS +# define INCL_DOSDEVICES +# define INCL_DOSDEVIOCTL +# define INCL_DOSERRORS +# define INCL_DOSMISC +# ifdef OS2DLL +# define INCL_REXXSAA +# include +# endif +# endif /* UNZIP_INTERNAL */ +# include +# define UZ_EXP EXPENTRY +#endif /* OS2 && !FUNZIP */ +#endif /* 0 */ + +#if (defined(OS2) && !defined(FUNZIP)) +# if (defined(__IBMC__) || defined(__WATCOMC__)) +# define UZ_EXP _System /* compiler keyword */ +# else +# define UZ_EXP +# endif +#endif /* OS2 && !FUNZIP */ + +#if (defined(WINDLL) || defined(USE_UNZIP_LIB)) +# ifndef EXPENTRY +# define UZ_EXP WINAPI +# else +# define UZ_EXP EXPENTRY +# endif +#endif + +#ifndef UZ_EXP +# define UZ_EXP +#endif + + +/*--------------------------------------------------------------------------- + Public typedefs. + ---------------------------------------------------------------------------*/ + +#ifndef _IZ_TYPES_DEFINED +#ifdef MODERN + typedef void zvoid; +#else /* !MODERN */ +# ifndef AOS_VS /* mostly modern? */ +# ifndef VAXC /* not fully modern, but has knows 'void' */ +# define void int +# endif /* !VAXC */ +# endif /* !AOS_VS */ + typedef char zvoid; +#endif /* ?MODERN */ +typedef unsigned char uch; /* code assumes unsigned bytes; these type- */ +typedef unsigned short ush; /* defs replace byte/UWORD/ULONG (which are */ +typedef unsigned long ulg; /* predefined on some systems) & match zip */ +#define _IZ_TYPES_DEFINED +#endif /* !_IZ_TYPES_DEFINED */ + +/* InputFn is not yet used and is likely to change: */ +#ifdef PROTO + typedef int (UZ_EXP MsgFn) (zvoid *pG, uch *buf, ulg size, int flag); + typedef int (UZ_EXP InputFn) (zvoid *pG, uch *buf, int *size, int flag); + typedef void (UZ_EXP PauseFn) (zvoid *pG, ZCONST char *prompt, int flag); + typedef int (UZ_EXP PasswdFn) (zvoid *pG, int *rcnt, char *pwbuf, + int size, ZCONST char *zfn, + ZCONST char *efn); + typedef int (UZ_EXP StatCBFn) (zvoid *pG, int fnflag, ZCONST char *zfn, + ZCONST char *efn, ZCONST zvoid *details); + typedef void (UZ_EXP UsrIniFn) (void); +#else /* !PROTO */ + typedef int (UZ_EXP MsgFn) (); + typedef int (UZ_EXP InputFn) (); + typedef void (UZ_EXP PauseFn) (); + typedef int (UZ_EXP PasswdFn) (); + typedef int (UZ_EXP StatCBFn) (); + typedef void (UZ_EXP UsrIniFn) (); +#endif /* ?PROTO */ + +typedef struct _UzpBuffer { /* rxstr */ + ulg strlength; /* length of string */ + char *strptr; /* pointer to string */ +} UzpBuffer; + +typedef struct _UzpInit { + ulg structlen; /* length of the struct being passed */ + + /* GRR: can we assume that each of these is a 32-bit pointer? if not, + * does it matter? add "far" keyword to make sure? */ + MsgFn *msgfn; + InputFn *inputfn; + PauseFn *pausefn; + UsrIniFn *userfn; /* user init function to be called after */ + /* globals constructed and initialized */ + + /* pointer to program's environment area or something? */ + /* hooks for performance testing? */ + /* hooks for extra unzip -v output? (detect CPU or other hardware?) */ + /* anything else? let me (Greg) know... */ +} UzpInit; + +typedef struct _UzpCB { + ulg structlen; /* length of the struct being passed */ + /* GRR: can we assume that each of these is a 32-bit pointer? if not, + * does it matter? add "far" keyword to make sure? */ + MsgFn *msgfn; + InputFn *inputfn; + PauseFn *pausefn; + PasswdFn *passwdfn; + StatCBFn *statrepfn; +} UzpCB; + +/* the collection of general UnZip option flags and option arguments */ +typedef struct _UzpOpts { +#ifndef FUNZIP + char *exdir; /* pointer to extraction root directory (-d option) */ + char *pwdarg; /* pointer to command-line password (-P option) */ + int zipinfo_mode; /* behave like ZipInfo or like normal UnZip? */ + int aflag; /* -a: do ASCII-EBCDIC and/or end-of-line translation */ +#ifdef VMS + int bflag; /* -b: force fixed record format for binary files */ +#endif +#ifdef UNIXBACKUP + int B_flag; /* -B: back up existing files by renaming to *~ first */ +#endif + int cflag; /* -c: output to stdout */ + int C_flag; /* -C: match filenames case-insensitively */ +#ifdef MACOS + int E_flag; /* -E: [MacOS] show Mac extra field during restoring */ +#endif + int fflag; /* -f: "freshen" (extract only newer files) */ +#if (defined(RISCOS) || defined(ACORN_FTYPE_NFS)) + int acorn_nfs_ext; /* -F: RISC OS types & NFS filetype extensions */ +#endif + int hflag; /* -h: header line (zipinfo) */ +#ifdef MACOS + int i_flag; /* -i: [MacOS] ignore filenames stored in Mac e.f. */ +#endif +#ifdef RISCOS + int scanimage; /* -I: scan image files */ +#endif + int jflag; /* -j: junk pathnames (unzip) */ +#if (defined(__BEOS__) || defined(MACOS)) + int J_flag; /* -J: ignore BeOS/MacOS extra field info (unzip) */ +#endif + int lflag; /* -12slmv: listing format (zipinfo) */ + int L_flag; /* -L: convert filenames from some OSes to lowercase */ + int overwrite_none; /* -n: never overwrite files (no prompting) */ +#ifdef AMIGA + int N_flag; /* -N: restore comments as AmigaDOS filenotes */ +#endif + int overwrite_all; /* -o: OK to overwrite files without prompting */ +#endif /* !FUNZIP */ + int qflag; /* -q: produce a lot less output */ +#ifndef FUNZIP +#if (defined(MSDOS) || defined(FLEXOS) || defined(OS2) || defined(WIN32)) + int sflag; /* -s: convert spaces in filenames to underscores */ +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WIN32)) + int volflag; /* -$: extract volume labels */ +#endif + int tflag; /* -t: test (unzip) or totals line (zipinfo) */ + int T_flag; /* -T: timestamps (unzip) or dec. time fmt (zipinfo) */ + int uflag; /* -u: "update" (extract only newer/brand-new files) */ + int vflag; /* -v: (verbosely) list directory */ + int V_flag; /* -V: don't strip VMS version numbers */ +#if (defined(TANDEM) || defined(UNIX) || defined(VMS) || defined(__BEOS__)) + int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */ +#endif +#if (defined(OS2) || defined(WIN32)) + int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */ +#endif + int zflag; /* -z: display the zipfile comment (only, for unzip) */ +#endif /* !FUNZIP */ +} UzpOpts; + +/* intended to be a private struct: */ +typedef struct _ver { + uch major; /* e.g., integer 5 */ + uch minor; /* e.g., 2 */ + uch patchlevel; /* e.g., 0 */ + uch not_used; +} _version_type; + +typedef struct _UzpVer { + ulg structlen; /* length of the struct being passed */ + ulg flag; /* bit 0: is_beta bit 1: uses_zlib */ + char *betalevel; /* e.g., "g BETA" or "" */ + char *date; /* e.g., "4 Sep 95" (beta) or "4 September 1995" */ + char *zlib_version; /* e.g., "0.95" or NULL */ + _version_type unzip; + _version_type zipinfo; + _version_type os2dll; + _version_type windll; +} UzpVer; + +/* for Visual BASIC access to Windows DLLs: */ +typedef struct _UzpVer2 { + ulg structlen; /* length of the struct being passed */ + ulg flag; /* bit 0: is_beta bit 1: uses_zlib */ + char betalevel[10]; /* e.g., "g BETA" or "" */ + char date[20]; /* e.g., "4 Sep 95" (beta) or "4 September 1995" */ + char zlib_version[10]; /* e.g., "0.95" or NULL */ + _version_type unzip; + _version_type zipinfo; + _version_type os2dll; + _version_type windll; +} UzpVer2; + +typedef struct central_directory_file_header { /* CENTRAL */ + uch version_made_by[2]; + uch version_needed_to_extract[2]; + ush general_purpose_bit_flag; + ush compression_method; + ulg last_mod_dos_datetime; + ulg crc32; + ulg csize; + ulg ucsize; + ush filename_length; + ush extra_field_length; + ush file_comment_length; + ush disk_number_start; + ush internal_file_attributes; + ulg external_file_attributes; + ulg relative_offset_local_header; +} cdir_file_hdr; + + +#define UZPINIT_LEN sizeof(UzpInit) +#define UZPVER_LEN sizeof(UzpVer) +#define cbList(func) int (* UZ_EXP func)(char *filename, cdir_file_hdr *crec) + + +/*--------------------------------------------------------------------------- + Return (and exit) values of the public UnZip API functions. + ---------------------------------------------------------------------------*/ + +/* external return codes */ +#define PK_OK 0 /* no error */ +#define PK_COOL 0 /* no error */ +#define PK_GNARLY 0 /* no error */ +#define PK_WARN 1 /* warning error */ +#define PK_ERR 2 /* error in zipfile */ +#define PK_BADERR 3 /* severe error in zipfile */ +#define PK_MEM 4 /* insufficient memory (during initialization) */ +#define PK_MEM2 5 /* insufficient memory (password failure) */ +#define PK_MEM3 6 /* insufficient memory (file decompression) */ +#define PK_MEM4 7 /* insufficient memory (memory decompression) */ +#define PK_MEM5 8 /* insufficient memory (not yet used) */ +#define PK_NOZIP 9 /* zipfile not found */ +#define PK_PARAM 10 /* bad or illegal parameters specified */ +#define PK_FIND 11 /* no files found */ +#define PK_DISK 50 /* disk full */ +#define PK_EOF 51 /* unexpected EOF */ + +#define IZ_CTRLC 80 /* user hit ^C to terminate */ +#define IZ_UNSUP 81 /* no files found: all unsup. compr/encrypt. */ +#define IZ_BADPWD 82 /* no files found: all had bad password */ + +/* internal and DLL-only return codes */ +#define IZ_DIR 76 /* potential zipfile is a directory */ +#define IZ_CREATED_DIR 77 /* directory created: set time and permissions */ +#define IZ_VOL_LABEL 78 /* volume label, but can't set on hard disk */ +#define IZ_EF_TRUNC 79 /* local extra field truncated (PKZIP'd) */ + +/* return codes of password fetches (negative = user abort; positive = error) */ +#define IZ_PW_ENTERED 0 /* got some password string; use/try it */ +#define IZ_PW_CANCEL -1 /* no password available (for this entry) */ +#define IZ_PW_CANCELALL -2 /* no password, skip any further pwd. request */ +#define IZ_PW_ERROR 5 /* = PK_MEM2 : failure (no mem, no tty, ...) */ + +/* flag values for status callback function */ +#define UZ_ST_START_EXTRACT 1 +#define UZ_ST_IN_PROGRESS 2 +#define UZ_ST_FINISH_MEMBER 3 + +/* return values of status callback function */ +#define UZ_ST_CONTINUE 0 +#define UZ_ST_BREAK 1 + + +/*--------------------------------------------------------------------------- + Prototypes for public UnZip API (DLL) functions. + ---------------------------------------------------------------------------*/ + +#define UzpMatch match + +int UZ_EXP UzpMain OF((int argc, char **argv)); +int UZ_EXP UzpAltMain OF((int argc, char **argv, UzpInit *init)); +UzpVer * UZ_EXP UzpVersion OF((void)); +void UZ_EXP UzpFreeMemBuffer OF((UzpBuffer *retstr)); +#ifndef WINDLL +int UZ_EXP UzpUnzipToMemory OF((char *zip, char *file, UzpOpts *optflgs, + UzpCB *UsrFunc, UzpBuffer *retstr)); +#endif +#ifndef WINDLL + int UZ_EXP UzpGrep OF((char *archive, char *file, + char *pattern, int cmd, int SkipBin, + UzpCB *UsrFunc)); +#endif +#ifdef OS2 +int UZ_EXP UzpFileTree OF((char *name, cbList(callBack), + char *cpInclude[], char *cpExclude[])); +#endif + +void UZ_EXP UzpVersion2 OF((UzpVer2 *version)); +int UZ_EXP UzpValidate OF((char *archive, int AllCodes)); + + +/* default I/O functions (can be swapped out via UzpAltMain() entry point): */ + +int UZ_EXP UzpMessagePrnt OF((zvoid *pG, uch *buf, ulg size, int flag)); +int UZ_EXP UzpMessageNull OF((zvoid *pG, uch *buf, ulg size, int flag)); +int UZ_EXP UzpInput OF((zvoid *pG, uch *buf, int *size, int flag)); +void UZ_EXP UzpMorePause OF((zvoid *pG, ZCONST char *prompt, int flag)); +int UZ_EXP UzpPassword OF((zvoid *pG, int *rcnt, char *pwbuf, + int size, ZCONST char *zfn, + ZCONST char *efn)); + + +/*--------------------------------------------------------------------------- + Remaining private stuff for UnZip compilation. + ---------------------------------------------------------------------------*/ + +#ifdef UNZIP_INTERNAL +# include "unzpriv.h" +#endif + +int pipeit(char *format, ...); +int pipeit2(char *format, int flag, ...); +int confirm(char *format, ...); + +#endif /* !__unzip_h */ diff --git a/utils/Install/inczip/unzpriv.h b/utils/Install/inczip/unzpriv.h new file mode 100644 index 0000000000..e4108c5281 --- /dev/null +++ b/utils/Install/inczip/unzpriv.h @@ -0,0 +1,2384 @@ +/*--------------------------------------------------------------------------- + + unzpriv.h + + This header file contains private (internal) macros, typedefs, prototypes + and global-variable declarations used by all of the UnZip source files. + In a prior life it was part of the main unzip.h header, but now it is only + included by that header if UNZIP_INTERNAL is defined. + + ---------------------------------------------------------------------------*/ + + + +#ifndef __unzpriv_h /* prevent multiple inclusions */ +#define __unzpriv_h + +/* First thing: Signal all following code that we compile UnZip utilities! */ +#ifndef UNZIP +# define UNZIP +#endif + +/* GRR 960204: MORE defined here in preparation for removal altogether */ +#ifndef MORE +# define MORE +#endif + +/* fUnZip should never need to be reentrant */ +#ifdef FUNZIP +# ifdef REENTRANT +# undef REENTRANT +# endif +# ifdef DLL +# undef DLL +# endif +#endif + +#if (defined(DLL) && !defined(REENTRANT)) +# define REENTRANT +#endif + +#if (!defined(DYNAMIC_CRC_TABLE) && !defined(FUNZIP)) +# define DYNAMIC_CRC_TABLE +#endif + +#if (defined(DYNAMIC_CRC_TABLE) && !defined(REENTRANT)) +# ifndef DYNALLOC_CRCTAB +# define DYNALLOC_CRCTAB +# endif +#endif + +/*--------------------------------------------------------------------------- + OS-dependent configuration for UnZip internals + ---------------------------------------------------------------------------*/ + +/* bad or (occasionally?) missing stddef.h: */ +#if (defined(M_XENIX) || defined(DNIX)) +# define NO_STDDEF_H +#endif + +#if (defined(M_XENIX) && !defined(M_UNIX)) /* SCO Xenix only, not SCO Unix */ +# define SCO_XENIX +# define NO_LIMITS_H /* no limits.h, but MODERN defined */ +# define NO_UID_GID /* no uid_t/gid_t */ +# define size_t int +#endif + +#ifdef realix /* Modcomp Real/IX, real-time SysV.3 variant */ +# define SYSV +# define NO_UID_GID /* no uid_t/gid_t */ +#endif + +#if (defined(_AIX) && !defined(_ALL_SOURCE)) +# define _ALL_SOURCE +#endif + +#if defined(apollo) /* defines __STDC__ */ +# define NO_STDLIB_H +#endif + +#ifdef DNIX +# define SYSV +# define SHORT_NAMES /* 14-char limitation on path components */ +/* # define FILENAME_MAX 14 */ +# define FILENAME_MAX NAME_MAX /* GRR: experiment */ +#endif + +#if (defined(SYSTEM_FIVE) || defined(__SYSTEM_FIVE)) +# ifndef SYSV +# define SYSV +# endif +#endif /* SYSTEM_FIVE || __SYSTEM_FIVE */ +#if (defined(M_SYSV) || defined(M_SYS5)) +# ifndef SYSV +# define SYSV +# endif +#endif /* M_SYSV || M_SYS5 */ +/* __SVR4 and __svr4__ catch Solaris on at least some combos of compiler+OS */ +#if (defined(__SVR4) || defined(__svr4__) || defined(sgi) || defined(__hpux)) +# ifndef SYSV +# define SYSV +# endif +#endif /* __SVR4 || __svr4__ || sgi || __hpux */ +#if (defined(LINUX) || defined(__QNX__)) +# ifndef SYSV +# define SYSV +# endif +#endif /* LINUX || __QNX__ */ + +#if (defined(ultrix) || defined(__ultrix) || defined(bsd4_2)) +# if (!defined(BSD) && !defined(SYSV)) +# define BSD +# endif +#endif /* ultrix || __ultrix || bsd4_2 */ +#if (defined(sun) || defined(pyr) || defined(CONVEX)) +# if (!defined(BSD) && !defined(SYSV)) +# define BSD +# endif +#endif /* sun || pyr || CONVEX */ + +#ifdef pyr /* Pyramid: has BSD and AT&T "universes" */ +# ifdef BSD +# define pyr_bsd +# define USE_STRINGS_H /* instead of more common string.h */ +# define ZMEM /* ZMEM now uses bcopy/bzero: not in AT&T universe */ +# endif /* (AT&T memcpy claimed to be very slow, though) */ +# define DECLARE_ERRNO +#endif /* pyr */ + +/* stat() bug for Borland, VAX C (also GNU?), and Atari ST MiNT on TOS + * filesystems: returns 0 for wildcards! (returns 0xffffffff on Minix + * filesystem or `U:' drive under Atari MiNT.) Watcom C was previously + * included on this list; it would be good to know what version the problem + * was fixed at, if it did exist. Watcom 10.6 has a separate stat() problem: + * it fails on "." when the current directory is a root. This is covered by + * giving it a separate definition of SSTAT in OS-specific header files. */ +#if (defined(__TURBOC__) || defined(VMS) || defined(__MINT__)) +# define WILD_STAT_BUG +#endif + +#ifdef WILD_STAT_BUG +# define SSTAT(path,pbuf) (iswild(path) || stat(path,pbuf)) +#else +# define SSTAT stat +#endif + +#ifdef REGULUS /* returns the inode number on success(!)...argh argh argh */ +# define stat(p,s) zstat((p),(s)) +#endif + +#define STRNICMP zstrnicmp + +/*--------------------------------------------------------------------------- + OS-dependent includes + ---------------------------------------------------------------------------*/ + +#ifdef EFT +# define LONGINT off_t /* Amdahl UTS nonsense ("extended file types") */ +#else +# define LONGINT long +#endif + +#ifdef MODERN +# ifndef NO_STDDEF_H +# include +# endif +# ifndef NO_STDLIB_H +# include /* standard library prototypes, malloc(), etc. */ +# endif + typedef size_t extent; +#else /* !MODERN */ +# ifndef AOS_VS /* mostly modern? */ + LONGINT lseek(); +# ifdef VAXC /* not fully modern, but does have stdlib.h and void */ +# include +# else + char *malloc(); +# endif /* ?VAXC */ +# endif /* !AOS_VS */ + typedef unsigned int extent; +#endif /* ?MODERN */ + + +#ifndef MINIX /* Minix needs it after all the other includes (?) */ +# include +#endif +#include /* skip for VMS, to use tolower() function? */ +#include /* used in mapname() */ +#ifdef USE_STRINGS_H +# include /* strcpy, strcmp, memcpy, index/rindex, etc. */ +#else +# include /* strcpy, strcmp, memcpy, strchr/strrchr, etc. */ +#endif +#if (defined(MODERN) && !defined(NO_LIMITS_H)) +# include /* GRR: EXPERIMENTAL! (can be deleted) */ +#endif + +/* this include must be down here for SysV.4, for some reason... */ +#include /* used in unzip.c, fileio.c */ + + +/*--------------------------------------------------------------------------- + API (DLL) section: + ---------------------------------------------------------------------------*/ + +#ifdef DLL +# define MAIN UZ_EXP UzpMain /* was UzpUnzip */ +# ifdef OS2DLL +# undef Info +# define REDIRECTC(c) varputchar(__G__ c) +# define REDIRECTPRINT(buf,size) varmessage(__G__ buf, size) +# define FINISH_REDIRECT() finish_REXX_redirect(__G) +# else +# define REDIRECTC(c) +# define REDIRECTPRINT(buf,size) 0 +# define FINISH_REDIRECT() close_redirect(__G) +# endif +#endif + +/*--------------------------------------------------------------------------- + Acorn RISCOS section: + ---------------------------------------------------------------------------*/ + +#ifdef RISCOS +# include "acorn/riscos.h" +#endif + +/*--------------------------------------------------------------------------- + Amiga section: + ---------------------------------------------------------------------------*/ + +#ifdef AMIGA +# include "amiga/amiga.h" +#endif + +/*--------------------------------------------------------------------------- + AOS/VS section (somewhat similar to Unix, apparently): + ---------------------------------------------------------------------------*/ + +#ifdef AOS_VS +# ifdef FILEIO_C +# include "aosvs/aosvs.h" +# endif +#endif + +/*--------------------------------------------------------------------------- + Atari ST section: + ---------------------------------------------------------------------------*/ + +#ifdef ATARI +# include +# include +# include +# include +# define SYMLINKS +# define EXE_EXTENSION ".tos" +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_DMY +# endif +# define DIR_END '/' +# define INT_SPRINTF +# define timezone _timezone +# define lenEOL 2 +# define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} +# undef SHORT_NAMES +# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) +# define TIMESTAMP +# endif +#endif + +/*--------------------------------------------------------------------------- + BeOS section: + ---------------------------------------------------------------------------*/ + +#ifdef __BEOS__ +# include /* [cjh]: This is pretty much a generic */ +# include /* POSIX 1003.1 system; see beos/ for */ +# include /* extra code to deal with our extra file */ +# include /* attributes. */ +# include +# include +# define DIRENT +# include +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY /* GRR: customize with locale.h somehow? */ +# endif +# define lenEOL 1 +# define PutNativeEOL *q++ = native(LF); +# define SCREENLINES screenlines() +# define USE_EF_UT_TIME +# define SET_DIR_ATTRIB +# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) +# define TIMESTAMP +# endif +# define RESTORE_UIDGID +# define NO_GMTIME /* maybe DR10 will have timezones... */ +# define INT_SPRINTF +# define SYMLINKS +# define MAIN main_stub /* now that we're using a wrapper... */ +#endif + +/*--------------------------------------------------------------------------- + Human68k/X68000 section: + ---------------------------------------------------------------------------*/ + +#ifdef __human68k__ /* DO NOT DEFINE DOS_OS2 HERE! If Human68k is so much */ +# include /* like MS-DOS and/or OS/2, create DOS_H68_OS2 macro. */ +# include +# include +# include +# include +# include +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_YMD /* Japanese standard */ +# endif + /* GRR: these EOL macros are guesses */ +# define lenEOL 2 +# define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} +# define EXE_EXTENSION ".exe" /* just a guess... */ +#endif + +/*--------------------------------------------------------------------------- + Mac section: + ---------------------------------------------------------------------------*/ + +#ifdef MACOS +# include "maccfg.h" +#endif /* MACOS */ + +/*--------------------------------------------------------------------------- + MS-DOS, OS/2, FLEXOS section: + ---------------------------------------------------------------------------*/ + +#ifdef WINDLL +# define MSWIN +# ifdef MORE +# undef MORE +# endif +# ifdef OS2_EAS +# undef OS2_EAS +# endif +#endif + +#if (defined(_MSC_VER) || (defined(M_I86) && !defined(__WATCOMC__))) +# ifndef MSC +# define MSC /* This should work for older MSC, too! */ +# endif +#endif + +#if (defined(MSDOS) || defined(OS2) || defined(FLEXOS)) +# include /* off_t, time_t, dev_t, ... */ +# include +# include /* lseek(), open(), setftime(), dup(), creat() */ +# include /* localtime() */ +# include /* O_BINARY for open() w/o CR/LF translation */ + +# ifdef OS2 /* defined for all OS/2 compilers */ +# include "os2/os2cfg.h" +# else +# ifdef FLEXOS +# include "flexos/flxcfg.h" +# else +# include "msdos/doscfg.h" +# endif +# endif + +# if (defined(_MSC_VER) && (_MSC_VER == 700) && !defined(GRR)) + /* + * ARGH. MSC 7.0 libraries think times are based on 1899 Dec 31 00:00, not + * 1970 Jan 1 00:00. So we have to diddle time_t's appropriately: add or + * subtract 70 years' worth of seconds; i.e., number of days times 86400; + * i.e., (70*365 regular days + 17 leap days + 1 1899 day) * 86400 == + * (25550 + 17 + 1) * 86400 == 2209075200 seconds. We know time_t is an + * unsigned long (ulg) on the only system with this bug. + */ +# define TIMET_TO_NATIVE(x) (x) += (ulg)2209075200L; +# define NATIVE_TO_TIMET(x) (x) -= (ulg)2209075200L; +# endif +# if (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0450)) +# define timezone _timezone +# endif +# if (defined(__GO32__) || defined(FLEXOS)) +# define DIR_END '/' +# else +# define DIR_END '\\' /* OS uses '\\' as directory separator */ +# define DIR_END2 '/' /* also check for '/' (RTL may convert) */ +# endif +# ifndef WIN32 +# ifdef DATE_FORMAT +# undef DATE_FORMAT +# endif +# define DATE_FORMAT dateformat() +# endif +# define lenEOL 2 +# define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} +# define USE_EF_UT_TIME +#endif /* MSDOS || OS2 || FLEXOS */ + +/*--------------------------------------------------------------------------- + MTS section (piggybacks UNIX, I think): + ---------------------------------------------------------------------------*/ + +#ifdef MTS +# include /* off_t, time_t, dev_t, ... */ +# include +# include /* MTS uses this instead of fcntl.h */ +# include +# include +# include /* some important non-ANSI routines */ +# define mkdir(s,n) (-1) /* no "make directory" capability */ +# define EBCDIC /* set EBCDIC conversion on */ +# define NO_STRNICMP /* unzip's is as good the one in MTS */ +# define USE_FWRITE +# define close_outfile() fclose(G.outfile) /* can't set time on files */ +# define umask(n) /* don't have umask() on MTS */ +# define FOPWT "w" /* open file for writing in TEXT mode */ +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY +# endif +# define lenEOL 1 +# define PutNativeEOL *q++ = native(LF); +#endif /* MTS */ + + /*--------------------------------------------------------------------------- + QDOS section + ---------------------------------------------------------------------------*/ + +#ifdef QDOS +# define DIRENT +# include +# include +# include +# include +# include "qdos/izqdos.h" +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY +# endif +# define lenEOL 1 +# define PutNativeEOL *q++ = native(LF); +# define DIR_END '_' +# define RETURN QReturn +# undef PATH_MAX +# define PATH_MAX 36 +# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) +# define TIMESTAMP +# endif +#endif + +/*--------------------------------------------------------------------------- + Tandem NSK section: + ---------------------------------------------------------------------------*/ + +#ifdef TANDEM +# include "tandem.h" +# include + /* use a single LF delimiter so that writes to 101 text files work */ +# define PutNativeEOL *q++ = native(LF); +# define lenEOL 1 +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_DMY +# endif +# define USE_EF_UT_TIME +# define RESTORE_UIDGID +#endif + +/*--------------------------------------------------------------------------- + TOPS-20 section: + ---------------------------------------------------------------------------*/ + +#ifdef TOPS20 +# include /* off_t, time_t, dev_t, ... */ +# include +# include +# include +# include +# include +# include +# include /* get amazing monsym() macro */ + extern int open(), close(), read(); + extern int stat(), unlink(), jsys(), fcntl(); + extern long lseek(), dup(), creat(); +# define strchr index /* GRR: necessary? */ +# define strrchr rindex +# define REALLY_SHORT_SYMS +# define NO_MKDIR +# define DIR_BEG '<' +# define DIR_END '>' +# define DIR_EXT ".directory" +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY +# endif +# define EXE_EXTENSION ".exe" /* just a guess... */ +#endif /* TOPS20 */ + +/*--------------------------------------------------------------------------- + Unix section: + ---------------------------------------------------------------------------*/ + +#ifdef UNIX +# include /* off_t, time_t, dev_t, ... */ +# include + +# ifndef COHERENT +# include /* O_BINARY for open() w/o CR/LF translation */ +# else /* COHERENT */ +# ifdef _I386 +# include /* Coherent 4.0.x, Mark Williams C */ +# else +# include /* Coherent 3.10, Mark Williams C */ +# endif +# define SHORT_SYMS +# ifndef __COHERENT__ /* Coherent 4.2 has tzset() */ +# define tzset settz +# endif +# endif /* ?COHERENT */ + +# ifndef NO_PARAM_H +# ifdef NGROUPS_MAX +# undef NGROUPS_MAX /* SCO bug: defined again in */ +# endif +# ifdef BSD +# define TEMP_BSD /* may be defined again in */ +# undef BSD +# endif +# include /* conflict with , some systems? */ +# ifdef TEMP_BSD +# undef TEMP_BSD +# ifndef BSD +# define BSD +# endif +# endif +# endif /* !NO_PARAM_H */ + +# ifdef __osf__ +# define DIRENT +# ifdef BSD +# undef BSD +# endif +# endif /* __osf__ */ + +# ifdef BSD +# include +# include +# ifdef _AIX +# include +# endif +# else +# include + struct tm *gmtime(), *localtime(); +# endif + +# if (defined(BSD4_4) || (defined(SYSV) && defined(MODERN))) +# include /* this includes utime.h on SGIs */ +# if (defined(BSD4_4) || defined(linux)) +# include +# define GOT_UTIMBUF +# endif +# endif + +# if (defined(V7) || defined(pyr_bsd)) +# define strchr index +# define strrchr rindex +# endif +# ifdef V7 +# define O_RDONLY 0 +# define O_WRONLY 1 +# define O_RDWR 2 +# endif + +# ifdef MINIX +# include +# endif +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY /* GRR: customize with locale.h somehow? */ +# endif +# define lenEOL 1 +# ifdef EBCDIC +# define PutNativeEOL *q++ = '\n'; +# else +# define PutNativeEOL *q++ = native(LF); +# endif +# define SCREENLINES screenlines() +# define USE_EF_UT_TIME +# define SET_DIR_ATTRIB +# if (!defined(TIMESTAMP) && !defined(NOTIMESTAMP)) /* GRR 970513 */ +# define TIMESTAMP +# endif +# define RESTORE_UIDGID +#endif /* UNIX */ + +/*--------------------------------------------------------------------------- + VM/CMS and MVS section: + ---------------------------------------------------------------------------*/ + +#ifdef CMS_MVS +# include "vmmvs.h" +# define CLOSE_INFILE() close_infile(__G) +#endif + +/*--------------------------------------------------------------------------- + VMS section: + ---------------------------------------------------------------------------*/ + +#ifdef VMS +# include /* GRR: experimenting... */ +# include +# include /* the usual non-BSD time functions */ +# include /* same things as fcntl.h has */ +# include +# include +# define _MAX_PATH (NAM$C_MAXRSS+1) /* to define FILNAMSIZ below */ +# ifdef RETURN_CODES /* VMS interprets standard PK return codes incorrectly */ +# define RETURN(ret) return_VMS(__G__ (ret)) /* verbose version */ +# define EXIT(ret) return_VMS(__G__ (ret)) +# else +# define RETURN return_VMS /* quiet version */ +# define EXIT return_VMS +# endif +# ifdef VMSCLI +# define USAGE(ret) VMSCLI_usage(__G__ (ret)) +# endif +# define DIR_BEG '[' +# define DIR_END ']' +# define DIR_EXT ".dir" +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY +# endif +# define lenEOL 1 +# define PutNativeEOL *q++ = native(LF); +# define SCREENLINES screenlines() +# if (defined(__VMS_VERSION) && !defined(VMS_VERSION)) +# define VMS_VERSION __VMS_VERSION +# endif +# if (defined(__VMS_VER) && !defined(__CRTL_VER)) +# define __CRTL_VER __VMS_VER +# endif +# if ((!defined(__CRTL_VER)) || (__CRTL_VER < 70000000)) +# define NO_GMTIME /* gmtime() of earlier VMS C RTLs is broken */ +# else +# if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)) +# define USE_EF_UT_TIME +# endif +# endif +# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) +# define TIMESTAMP +# endif +# define RESTORE_UIDGID +#endif /* VMS */ + +/*--------------------------------------------------------------------------- + Win32 (Windows 95/NT) section: + ---------------------------------------------------------------------------*/ + +#if (defined(WIN32) && !defined(POCKET_UNZIP)) +# include "w32cfg.h" +#endif + + + + + +/*************/ +/* Defines */ +/*************/ + +#define UNZIP_VERSION 20 /* compatible with PKUNZIP 2.0 */ +#define VMS_UNZIP_VERSION 42 /* if OS-needed-to-extract is VMS: can do */ + +#if (defined(MSDOS) || defined(OS2)) +# define DOS_OS2 +#endif + +#if (defined(OS2) || defined(WIN32)) +# define OS2_W32 +#endif + +#if (defined(DOS_OS2) || defined(WIN32)) +# define DOS_OS2_W32 +# define DOS_W32_OS2 /* historical: don't use */ +#endif + +#if (defined(DOS_OS2_W32) || defined(__human68k__)) +# define DOS_H68_OS2_W32 +#endif + +#if (defined(DOS_OS2) || defined(FLEXOS)) +# define DOS_FLX_OS2 +#endif + +#if (defined(DOS_OS2_W32) || defined(FLEXOS)) +# define DOS_FLX_OS2_W32 +#endif + +#if (defined(DOS_H68_OS2_W32) || defined(FLEXOS)) +# define DOS_FLX_H68_OS2_W32 +#endif + +#if (defined(TOPS20) || defined(VMS)) +# define T20_VMS +#endif + +#if (defined(MSDOS) || defined(T20_VMS)) +# define DOS_T20_VMS +#endif + +/* clean up with a few defaults */ +#ifndef DIR_END +# define DIR_END '/' /* last char before program name or filename */ +#endif +#ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY /* defaults to US convention */ +#endif +#ifndef CLOSE_INFILE +# define CLOSE_INFILE() close(G.zipfd) +#endif +#ifndef RETURN +# define RETURN return /* only used in main() */ +#endif +#ifndef EXIT +# define EXIT exit +#endif +#ifndef USAGE +# define USAGE(ret) usage(__G__ (ret)) /* used in unzip.c, zipinfo.c */ +#endif +#ifndef TIMET_TO_NATIVE /* everybody but MSC 7.0 and Macintosh */ +# define TIMET_TO_NATIVE(x) +# define NATIVE_TO_TIMET(x) +#endif + +#if (defined(DOS_FLX_OS2_W32) || defined(UNIX) || defined(RISCOS)) +# ifndef HAVE_UNLINK +# define HAVE_UNLINK +# endif +#endif +#if (defined(AOS_VS) || defined(ATARI) || defined(__BEOS__)) /* GRR: others? */ +# ifndef HAVE_UNLINK +# define HAVE_UNLINK +# endif +#endif + +/* OS-specific exceptions to the "ANSI <--> INT_SPRINTF" rule */ + +#if (!defined(PCHAR_SPRINTF) && !defined(INT_SPRINTF)) +# if (defined(SYSV) || defined(CONVEX) || defined(NeXT) || defined(BSD4_4)) +# define INT_SPRINTF /* sprintf() returns int: SysVish/Posix */ +# endif +# if (defined(DOS_FLX_OS2_W32) || defined(VMS) || defined(AMIGA)) +# define INT_SPRINTF /* sprintf() returns int: ANSI */ +# endif +# if (defined(ultrix) || defined(__ultrix)) /* Ultrix 4.3 and newer */ +# if (defined(POSIX) || defined(__POSIX)) +# define INT_SPRINTF /* sprintf() returns int: ANSI/Posix */ +# endif +# ifdef __GNUC__ +# define PCHAR_SPRINTF /* undetermined actual return value */ +# endif +# endif +# if (defined(__osf__) || defined(_AIX) || defined(CMS_MVS)) +# define INT_SPRINTF /* sprintf() returns int: ANSI/Posix */ +# endif +# if defined(sun) +# define PCHAR_SPRINTF /* sprintf() returns char *: SunOS cc *and* gcc */ +# endif +#endif + +/* defaults that we hope will take care of most machines in the future */ + +#if (!defined(PCHAR_SPRINTF) && !defined(INT_SPRINTF)) +# ifdef __STDC__ +# define INT_SPRINTF /* sprintf() returns int: ANSI */ +# endif +# ifndef INT_SPRINTF +# define PCHAR_SPRINTF /* sprintf() returns char *: BSDish */ +# endif +#endif + +#define MSG_STDERR(f) (f & 1) /* bit 0: 0 = stdout, 1 = stderr */ +#define MSG_INFO(f) ((f & 6) == 0) /* bits 1 and 2: 0 = info */ +#define MSG_WARN(f) ((f & 6) == 2) /* bits 1 and 2: 1 = warning */ +#define MSG_ERROR(f) ((f & 6) == 4) /* bits 1 and 2: 2 = error */ +#define MSG_FATAL(f) ((f & 6) == 6) /* bits 1 and 2: (3 = fatal error) */ +#define MSG_ZFN(f) (f & 0x0008) /* bit 3: 1 = print zipfile name */ +#define MSG_FN(f) (f & 0x0010) /* bit 4: 1 = print filename */ +#define MSG_LNEWLN(f) (f & 0x0020) /* bit 5: 1 = leading newline if !SOL */ +#define MSG_TNEWLN(f) (f & 0x0040) /* bit 6: 1 = trailing newline if !SOL */ +#define MSG_MNEWLN(f) (f & 0x0080) /* bit 7: 1 = trailing NL for prompts */ +/* the following are subject to change */ +#define MSG_NO_WGUI(f) (f & 0x0100) /* bit 8: 1 = skip if Windows GUI */ +#define MSG_NO_AGUI(f) (f & 0x0200) /* bit 9: 1 = skip if Acorn GUI */ +#define MSG_NO_DLL2(f) (f & 0x0400) /* bit 10: 1 = skip if OS/2 DLL */ +#define MSG_NO_NDLL(f) (f & 0x0800) /* bit 11: 1 = skip if WIN32 DLL */ +#define MSG_NO_WDLL(f) (f & 0x1000) /* bit 12: 1 = skip if Windows DLL */ + +#if (defined(MORE) && !defined(SCREENLINES)) +# ifdef DOS_FLX_OS2_W32 +# define SCREENLINES 25 /* can be (should be) a function instead */ +# else +# define SCREENLINES 24 /* VT-100s are assumed to be minimal hardware */ +# endif +#endif + +#define DIR_BLKSIZ 64 /* number of directory entries per block + * (should fit in 4096 bytes, usually) */ +#ifndef WSIZE +# define WSIZE 0x8000 /* window size--must be a power of two, and */ +#endif /* at least 32K for zip's deflate method */ + +#ifndef INBUFSIZ +# if (defined(MED_MEM) || defined(SMALL_MEM)) +# define INBUFSIZ 2048 /* works for MS-DOS small model */ +# else +# define INBUFSIZ 8192 /* larger buffers for real OSes */ +# endif +#endif + +#ifndef __16BIT__ +# define nearmalloc malloc +# define nearfree free +# if (!defined(__IBMC__) || !defined(OS2)) +# ifndef near +# define near +# endif +# ifndef far +# define far +# endif +# endif +#endif + +#if (defined(DYNALLOC_CRCTAB) && !defined(DYNAMIC_CRC_TABLE)) +# undef DYNALLOC_CRCTAB +#endif + +#if (defined(DYNALLOC_CRCTAB) && defined(REENTRANT)) +# undef DYNALLOC_CRCTAB /* not safe with reentrant code */ +#endif + +#if (defined(USE_ZLIB) && !defined(USE_OWN_CRCTAB)) +# ifdef DYNALLOC_CRCTAB +# undef DYNALLOC_CRCTAB +# endif +#endif + +#if (defined(USE_ZLIB) && defined(ASM_CRC)) +# undef ASM_CRC +#endif + +/* Logic for case of small memory, length of EOL > 1: if OUTBUFSIZ == 2048, + * OUTBUFSIZ>>1 == 1024 and OUTBUFSIZ>>7 == 16; therefore rawbuf is 1008 bytes + * and transbuf 1040 bytes. Have room for 32 extra EOL chars; 1008/32 == 31.5 + * chars/line, smaller than estimated 35-70 characters per line for C source + * and normal text. Hence difference is sufficient for most "average" files. + * (Argument scales for larger OUTBUFSIZ.) + */ +#ifdef SMALL_MEM /* i.e., 16-bit OSes: MS-DOS, OS/2 1.x, etc. */ +# define LoadFarString(x) fLoadFarString(__G__ (x)) +# define LoadFarStringSmall(x) fLoadFarStringSmall(__G__ (x)) +# define LoadFarStringSmall2(x) fLoadFarStringSmall2(__G__ (x)) +# if (defined(_MSC_VER) && (_MSC_VER >= 600)) +# define zfstrcpy(dest, src) _fstrcpy((dest), (src)) +# endif +# ifndef Far +# define Far far /* __far only works for MSC 6.00, not 6.0a or Borland */ +# endif +# define OUTBUFSIZ INBUFSIZ +# if (lenEOL == 1) +# define RAWBUFSIZ (OUTBUFSIZ>>1) +# else +# define RAWBUFSIZ ((OUTBUFSIZ>>1) - (OUTBUFSIZ>>7)) +# endif +# define TRANSBUFSIZ (OUTBUFSIZ-RAWBUFSIZ) + typedef short shrint; /* short/int or "shrink int" (unshrink) */ +#else +# define zfstrcpy(dest, src) strcpy((dest), (src)) +# ifdef QDOS +# define LoadFarString(x) Qstrfix(x) /* fix up _ for '.' */ +# define LoadFarStringSmall(x) Qstrfix(x) +# define LoadFarStringSmall2(x) Qstrfix(x) +# else +# define LoadFarString(x) x +# define LoadFarStringSmall(x) x +# define LoadFarStringSmall2(x) x +# endif +# ifdef MED_MEM +# define OUTBUFSIZ 0xFF80 /* can't malloc arrays of 0xFFE8 or more */ +# define TRANSBUFSIZ 0xFF80 + typedef short shrint; +# else +# define OUTBUFSIZ (lenEOL*WSIZE) /* more efficient text conversion */ +# define TRANSBUFSIZ (lenEOL*OUTBUFSIZ) +# ifdef AMIGA + typedef short shrint; +# else + typedef int shrint; /* for efficiency/speed, we hope... */ +# endif +# endif /* ?MED_MEM */ +# define RAWBUFSIZ OUTBUFSIZ +#endif /* ?SMALL_MEM */ + +#ifndef Far +# define Far +#endif + +#ifndef MAIN +# define MAIN main +#endif + +#ifdef SFX /* disable some unused features for SFX executables */ +# ifndef NO_ZIPINFO +# define NO_ZIPINFO +# endif +# ifdef TIMESTAMP +# undef TIMESTAMP +# endif +#endif + +/* user may have defined both by accident... NOTIMESTAMP takes precedence */ +#if (defined(TIMESTAMP) && defined(NOTIMESTAMP)) +# undef TIMESTAMP +#endif + +#if (!defined(COPYRIGHT_CLEAN) && !defined(USE_SMITH_CODE)) +# define COPYRIGHT_CLEAN +#endif + +#if (!defined(LZW_CLEAN) && !defined(USE_UNSHRINK)) +# define LZW_CLEAN +#endif + +#ifndef O_BINARY +# define O_BINARY 0 +#endif + +#ifndef PIPE_ERROR +# define PIPE_ERROR (errno == EPIPE) +#endif + +/* File operations--use "b" for binary if allowed or fixed length 512 on VMS */ +#ifdef VMS +# define FOPR "r","ctx=stm" +# define FOPM "r+","ctx=stm","rfm=fix","mrs=512" +# define FOPW "w","ctx=stm","rfm=fix","mrs=512" +#endif /* VMS */ + +#ifdef CMS_MVS +/* Binary files must be RECFM=F,LRECL=1 for ftell() to get correct pos */ +/* ...unless byteseek is used. Let's try that for a while. */ +# define FOPR "rb,byteseek" +# define FOPM "r+b,byteseek" +# define FOPW "wb,recfm=v,lrecl=32760" +# ifdef MVS +# define FOPWT "w,lrecl=133" +# else +# define FOPWT "w" +# endif +#endif /* CMS_MVS */ + +#ifdef TOPS20 /* TOPS-20 MODERN? You kidding? */ +# define FOPW "w8" +#endif /* TOPS20 */ + +/* Defaults when nothing special has been defined previously. */ +#ifdef MODERN +# ifndef FOPR +# define FOPR "rb" +# endif +# ifndef FOPM +# define FOPM "r+b" +# endif +# ifndef FOPW +# define FOPW "wb" +# endif +# ifndef FOPWT +# define FOPWT "wt" +# endif +#else /* !MODERN */ +# ifndef FOPR +# define FOPR "r" +# endif +# ifndef FOPM +# define FOPM "r+" +# endif +# ifndef FOPW +# define FOPW "w" +# endif +# ifndef FOPWT +# define FOPWT "w" +# endif +#endif /* ?MODERN */ + +/* + * If exists on most systems, should include that, since it may + * define some or all of the following: NAME_MAX, PATH_MAX, _POSIX_NAME_MAX, + * _POSIX_PATH_MAX. + */ +#ifdef DOS_FLX_OS2 +# include +#endif + +#ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN /* in on some systems */ +# else +# ifdef _MAX_PATH +# define PATH_MAX _MAX_PATH +# else +# if FILENAME_MAX > 255 +# define PATH_MAX FILENAME_MAX /* used like PATH_MAX on some systems */ +# else +# define PATH_MAX 1024 +# endif +# endif /* ?_MAX_PATH */ +# endif /* ?MAXPATHLEN */ +#endif /* !PATH_MAX */ + +#define FILNAMSIZ PATH_MAX + +#ifdef SHORT_SYMS /* Mark Williams C, ...? */ +# define extract_or_test_files xtr_or_tst_files +# define extract_or_test_member xtr_or_tst_member +#endif + +#ifdef REALLY_SHORT_SYMS /* TOPS-20 linker: first 6 chars */ +# define process_cdir_file_hdr XXpcdfh +# define process_local_file_hdr XXplfh +# define extract_or_test_files XXxotf /* necessary? */ +# define extract_or_test_member XXxotm /* necessary? */ +# define check_for_newer XXcfn +# define overwrite_all XXoa +# define process_all_files XXpaf +# define extra_field XXef +# define explode_lit8 XXel8 +# define explode_lit4 XXel4 +# define explode_nolit8 XXnl8 +# define explode_nolit4 XXnl4 +# define cpdist8 XXcpdist8 +# define inflate_codes XXic +# define inflate_stored XXis +# define inflate_fixed XXif +# define inflate_dynamic XXid +# define inflate_block XXib +# define maxcodemax XXmax +#endif + +#ifndef S_TIME_T_MAX /* max value of signed (>= 32-bit) time_t */ +# define S_TIME_T_MAX ((time_t)(ulg)0x7fffffffL) +#endif +#ifndef U_TIME_T_MAX /* max value of unsigned (>= 32-bit) time_t */ +# define U_TIME_T_MAX ((time_t)(ulg)0xffffffffL) +#endif +#ifdef DOSTIME_MINIMUM /* min DOSTIME value (1980-01-01) */ +# undef DOSTIME_MINIMUM +#endif +#define DOSTIME_MINIMUM ((ulg)0x00210000L) +#ifdef DOSTIME_2038_01_18 /* approximate DOSTIME equivalent of */ +# undef DOSTIME_2038_01_18 /* the signed-32-bit time_t limit */ +#endif +#define DOSTIME_2038_01_18 ((ulg)0x74320000L) + +#ifdef QDOS +# define ZSUFX "_zip" +# define ALT_ZSUFX ".zip" +#else +# ifdef RISCOS +# define ZSUFX "/zip" +# else +# define ZSUFX ".zip" +# endif +# define ALT_ZSUFX ".ZIP" /* Unix-only so far (only case-sensitive fs) */ +#endif + +#define CENTRAL_HDR_SIG "\001\002" /* the infamous "PK" signature bytes, */ +#define LOCAL_HDR_SIG "\003\004" /* sans "PK" (so unzip executable not */ +#define END_CENTRAL_SIG "\005\006" /* mistaken for zipfile itself) */ +#define EXTD_LOCAL_SIG "\007\010" /* [ASCII "\113" == EBCDIC "\080" ??] */ + +/* choice of activities for do_string() */ +#define SKIP 0 /* skip header block */ +#define DISPLAY 1 /* display archive comment (ASCII) */ +#define DISPL_8 5 /* display file comment (ext. ASCII) */ +#define DS_FN 2 /* read filename (ext. ASCII) */ +#define EXTRA_FIELD 3 /* copy extra field into buffer */ +#define DS_EF 3 +#ifdef AMIGA +# define FILENOTE 4 +#endif + +#define DOES_NOT_EXIST -1 /* return values for check_for_newer() */ +#define EXISTS_AND_OLDER 0 +#define EXISTS_AND_NEWER 1 + +#define ROOT 0 /* checkdir() extract-to path: called once */ +#define INIT 1 /* allocate buildpath: called once per member */ +#define APPEND_DIR 2 /* append a dir comp.: many times per member */ +#define APPEND_NAME 3 /* append actual filename: once per member */ +#define GETPATH 4 /* retrieve the complete path and free it */ +#define END 5 /* free root path prior to exiting program */ + +/* version_made_by codes (central dir): make sure these */ +/* are not defined on their respective systems!! */ +#define FS_FAT_ 0 /* filesystem used by MS-DOS, OS/2, Win32 */ +#define AMIGA_ 1 +#define VMS_ 2 +#define UNIX_ 3 +#define VM_CMS_ 4 +#define ATARI_ 5 /* what if it's a minix filesystem? [cjh] */ +#define FS_HPFS_ 6 /* filesystem used by OS/2 (and NT 3.x) */ +#define MAC_ 7 /* HFS filesystem used by MacOS */ +#define Z_SYSTEM_ 8 +#define CPM_ 9 +#define TOPS20_ 10 +#define FS_NTFS_ 11 /* filesystem used by Windows NT */ +#define QDOS_ 12 +#define ACORN_ 13 /* Archimedes Acorn RISC OS */ +#define FS_VFAT_ 14 /* filesystem used by Windows 95, NT */ +#define MVS_ 15 +#define BEOS_ 16 /* hybrid POSIX/database filesystem */ +#define TANDEM_ 17 /* Tandem/NSK */ +#define NUM_HOSTS 18 /* index of last system + 1 */ + +#define STORED 0 /* compression methods */ +#define SHRUNK 1 +#define REDUCED1 2 +#define REDUCED2 3 +#define REDUCED3 4 +#define REDUCED4 5 +#define IMPLODED 6 +#define TOKENIZED 7 +#define DEFLATED 8 +#define ENHDEFLATED 9 +#define DCLIMPLODED 10 +#define NUM_METHODS 11 /* index of last method + 1 */ +/* don't forget to update list_files(), extract.c and zipinfo.c appropriately + * if NUM_METHODS changes */ + +/* (the PK-class error codes are public and have been moved into unzip.h) */ + +#define DF_MDY 0 /* date format 10/26/91 (USA only) */ +#define DF_DMY 1 /* date format 26/10/91 (most of the world) */ +#define DF_YMD 2 /* date format 91/10/26 (a few countries) */ + +/*--------------------------------------------------------------------------- + Extra-field block ID values and offset info. + ---------------------------------------------------------------------------*/ +/* extra-field ID values, all little-endian: */ +#define EF_AV 0x0007 /* PKWARE's authenticity verification */ +#define EF_OS2 0x0009 /* OS/2 extended attributes */ +#define EF_PKW32 0x000a /* PKWARE's Win95/98/WinNT filetimes */ +#define EF_PKVMS 0x000c /* PKWARE's VMS */ +#define EF_PKUNIX 0x000d /* PKWARE's Unix */ +#define EF_IZVMS 0x4d49 /* Info-ZIP's VMS ("IM") */ +#define EF_IZUNIX 0x5855 /* Info-ZIP's old Unix[1] ("UX") */ +#define EF_IZUNIX2 0x7855 /* Info-ZIP's new Unix[2] ("Ux") */ +#define EF_TIME 0x5455 /* universal timestamp ("UT") */ +#define EF_MAC3 0x334d /* Info-ZIP's new Macintosh (= "M3") */ +#define EF_JLMAC 0x07c8 /* Johnny Lee's old Macintosh (= 1992) */ +#define EF_ZIPIT 0x2605 /* Thomas Brown's Macintosh (ZipIt) */ +#define EF_ZIPIT2 0x2705 /* T. Brown's Mac (ZipIt) v 1.3.8 and newer ? */ +#define EF_VMCMS 0x4704 /* Info-ZIP's VM/CMS ("\004G") */ +#define EF_MVS 0x470f /* Info-ZIP's MVS ("\017G") */ +#define EF_ACL 0x4c41 /* (OS/2) access control list ("AL") */ +#define EF_NTSD 0x4453 /* NT security descriptor ("SD") */ +#define EF_BEOS 0x6542 /* BeOS ("Be") */ +#define EF_QDOS 0xfb4a /* SMS/QDOS ("J\373") */ +#define EF_AOSVS 0x5356 /* AOS/VS ("VS") */ +#define EF_SPARK 0x4341 /* David Pilling's Acorn/SparkFS ("AC") */ +#define EF_MD5 0x4b46 /* Fred Kantor's MD5 ("FK") */ +#define EF_ASIUNIX 0x756e /* ASi's Unix ("nu") */ + +#define EB_HEADSIZE 4 /* length of extra field block header */ +#define EB_ID 0 /* offset of block ID in header */ +#define EB_LEN 2 /* offset of data length field in header */ +#define EB_UCSIZE_P 0 /* offset of ucsize field in compr. data */ +#define EB_CMPRHEADLEN 6 /* lenght of compression header */ + +#define EB_UX_MINLEN 8 /* minimal "UX" field contains atime, mtime */ +#define EB_UX_FULLSIZE 12 /* full "UX" field (atime, mtime, uid, gid) */ +#define EB_UX_ATIME 0 /* offset of atime in "UX" extra field data */ +#define EB_UX_MTIME 4 /* offset of mtime in "UX" extra field data */ +#define EB_UX_UID 8 /* byte offset of UID in "UX" field data */ +#define EB_UX_GID 10 /* byte offset of GID in "UX" field data */ + +#define EB_UX2_MINLEN 4 /* minimal "Ux" field contains UID/GID */ +#define EB_UX2_UID 0 /* byte offset of UID in "Ux" field data */ +#define EB_UX2_GID 2 /* byte offset of GID in "Ux" field data */ +#define EB_UX2_VALID (1 << 8) /* UID/GID present */ + +#define EB_UT_MINLEN 1 /* minimal UT field contains Flags byte */ +#define EB_UT_FLAGS 0 /* byte offset of Flags field */ +#define EB_UT_TIME1 1 /* byte offset of 1st time value */ +#define EB_UT_FL_MTIME (1 << 0) /* mtime present */ +#define EB_UT_FL_ATIME (1 << 1) /* atime present */ +#define EB_UT_FL_CTIME (1 << 2) /* ctime present */ + +#define EB_FLGS_OFFS 4 /* offset of flags area in generic compressed + extra field blocks (OS2, NT, and others) */ +#define EB_OS2_HLEN 4 /* size of OS2/ACL compressed data header */ +#define EB_BEOS_HLEN 5 /* length of BeOS e.f attribute header */ +#define EB_BE_FL_UNCMPR 0x01 /* "BeOS attributes uncompressed" bit flag */ +#define EB_MAC3_HLEN 14 /* length of Mac3 attribute block header */ +#define EB_M3_FL_DATFRK 0x01 /* "this entry is data fork" flag */ +#define EB_M3_FL_UNCMPR 0x04 /* "Mac3 attributes uncompressed" bit flag */ +#define EB_M3_FL_TIME64 0x08 /* "Mac3 time fields are 64 bit wide" flag */ +#define EB_M3_FL_NOUTC 0x10 /* "Mac3 timezone offset fields missing" flag */ + +#define EB_NTSD_C_LEN 4 /* length of central NT security data */ +#define EB_NTSD_L_LEN 5 /* length of minimal local NT security data */ +#define EB_NTSD_VERSION 4 /* offset of NTSD version byte */ +#define EB_NTSD_MAX_VER (0) /* maximum version # we know how to handle */ + +#define EB_ASI_CRC32 0 /* offset of ASI Unix field's crc32 checksum */ +#define EB_ASI_MODE 4 /* offset of ASI Unix permission mode field */ + +/*--------------------------------------------------------------------------- + True sizes of the various headers, as defined by PKWARE--so it is not + likely that these will ever change. But if they do, make sure both these + defines AND the typedefs below get updated accordingly. + ---------------------------------------------------------------------------*/ +#define LREC_SIZE 26 /* lengths of local file headers, central */ +#define CREC_SIZE 42 /* directory headers, and the end-of- */ +#define ECREC_SIZE 18 /* central-dir record, respectively */ + +#define MAX_BITS 13 /* used in unshrink() */ +#define HSIZE (1 << MAX_BITS) /* size of global work area */ + +#define LF 10 /* '\n' on ASCII machines; must be 10 due to EBCDIC */ +#define CR 13 /* '\r' on ASCII machines; must be 13 due to EBCDIC */ +#define CTRLZ 26 /* DOS & OS/2 EOF marker (used in fileio.c, vms.c) */ + +#ifdef EBCDIC +# define foreign(c) ascii[(uch)(c)] +# define native(c) ebcdic[(uch)(c)] +# define NATIVE "EBCDIC" +# define NOANSIFILT +#endif + +#if (defined(CRAY) && defined(ZMEM)) +# undef ZMEM +#endif + +#ifdef ZMEM +# undef ZMEM +# define memcmp(b1,b2,len) bcmp(b2,b1,len) +# define memcpy(dest,src,len) bcopy(src,dest,len) +# define memzero bzero +#else +# define memzero(dest,len) memset(dest,0,len) +#endif + +#ifdef VMS +# define ENV_UNZIP "UNZIP_OPTS" /* names of environment variables */ +# define ENV_ZIPINFO "ZIPINFO_OPTS" +#endif /* VMS */ +#ifdef RISCOS +# define ENV_UNZIP "Unzip$Options" +# define ENV_ZIPINFO "Zipinfo$Options" +# define ENV_UNZIPEXTS "Unzip$Exts" +#endif /* RISCOS */ +#ifndef ENV_UNZIP +# define ENV_UNZIP "UNZIP" /* the standard names */ +# define ENV_ZIPINFO "ZIPINFO" +#endif +#define ENV_UNZIP2 "UNZIPOPT" /* alternate names, for zip compat. */ +#define ENV_ZIPINFO2 "ZIPINFOOPT" + +#if (!defined(QQ) && !defined(NOQQ)) +# define QQ +#endif + +#ifdef QQ /* Newtware version: no file */ +# define QCOND (!uO.qflag) /* comments with -vq or -vqq */ +#else /* Bill Davidsen version: no way to */ +# define QCOND (longhdr) /* kill file comments when listing */ +#endif + +#ifdef OLD_QQ +# define QCOND2 (uO.qflag < 2) +#else +# define QCOND2 (!uO.qflag) +#endif + +#ifndef TRUE +# define TRUE 1 /* sort of obvious */ +#endif +#ifndef FALSE +# define FALSE 0 +#endif + +#ifndef SEEK_SET +# define SEEK_SET 0 +# define SEEK_CUR 1 +# define SEEK_END 2 +#endif + +#if (defined(UNIX) && defined(S_IFLNK) && !defined(MTS)) +# define SYMLINKS +# ifndef S_ISLNK +# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +# endif +#endif /* UNIX && S_IFLNK && !MTS */ + +#ifndef S_ISDIR +# ifdef CMS_MVS +# define S_ISDIR(m) (FALSE) +# else +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +# endif +#endif + +#ifndef IS_VOLID +# define IS_VOLID(m) ((m) & 0x08) +#endif + + + + + +/**************/ +/* Typedefs */ +/**************/ + +#ifdef NO_UID_GID +# ifdef UID_USHORT + typedef unsigned short uid_t; /* TI SysV.3 */ + typedef unsigned short gid_t; +# else + typedef unsigned int uid_t; /* SCO Xenix */ + typedef unsigned int gid_t; +# endif +#endif + +#if (defined(WIN32) || defined(sgi) || defined(GOT_UTIMBUF) || defined(ATARI)) + typedef struct utimbuf ztimbuf; +#else + typedef struct ztimbuf { + time_t actime; /* new access time */ + time_t modtime; /* new modification time */ + } ztimbuf; +#endif + +typedef struct iztimes { + time_t atime; /* new access time */ + time_t mtime; /* new modification time */ + time_t ctime; /* used for creation time; NOT same as st_ctime */ +} iztimes; + +#ifdef SET_DIR_ATTRIB + typedef struct dirtime { /* temporary struct for holding directory info */ + struct dirtime *next; /* until can be sorted and set at end */ + char *fn; /* filename of directory */ + union { + iztimes t3; /* mtime, atime, ctime */ + ztimbuf t2; /* modtime, actime */ + } u; + unsigned perms; /* same as min_info.file_attr */ + int have_uidgid; /* flag */ + ush uidgid[2]; + } dirtime; +#endif /* SET_DIR_ATTRIB */ + +typedef struct min_info { + long offset; + ulg crc; /* crc (needed if extended header) */ + ulg compr_size; /* compressed size (needed if extended header) */ + ulg uncompr_size; /* uncompressed size (needed if extended header) */ + int hostnum; + unsigned file_attr; /* local flavor, as used by creat(), chmod()... */ + unsigned encrypted : 1; /* file encrypted: decrypt before uncompressing */ + unsigned ExtLocHdr : 1; /* use time instead of CRC for decrypt check */ + unsigned textfile : 1; /* file is text (according to zip) */ + unsigned textmode : 1; /* file is to be extracted as text */ + unsigned lcflag : 1; /* convert filename to lowercase */ + unsigned vollabel : 1; /* "file" is an MS-DOS volume (disk) label */ +} min_info; + +typedef struct VMStimbuf { + char *revdate; /* (both roughly correspond to Unix modtime/st_mtime) */ + char *credate; +} VMStimbuf; + +/*--------------------------------------------------------------------------- + Zipfile work area declarations. + ---------------------------------------------------------------------------*/ + +#ifdef MALLOC_WORK + union work { + struct { /* unshrink(): */ + shrint *Parent; /* (8193 * sizeof(shrint)) */ + uch *value; + uch *Stack; + } shrink; + uch *Slide; /* explode(), inflate(), unreduce() */ + }; +#else /* !MALLOC_WORK */ + union work { + struct { /* unshrink(): */ + shrint Parent[HSIZE]; /* (8192 * sizeof(shrint)) == 16KB minimum */ + uch value[HSIZE]; /* 8KB */ + uch Stack[HSIZE]; /* 8KB */ + } shrink; /* total = 32KB minimum; 80KB on Cray/Alpha */ + uch Slide[WSIZE]; /* explode(), inflate(), unreduce() */ + }; +#endif /* ?MALLOC_WORK */ + +#define slide G.area.Slide + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) +# define redirSlide G.redirect_sldptr +#else +# define redirSlide G.area.Slide +#endif + +/*--------------------------------------------------------------------------- + Zipfile layout declarations. If these headers ever change, make sure the + xxREC_SIZE defines (above) change with them! + ---------------------------------------------------------------------------*/ + + typedef uch local_byte_hdr[ LREC_SIZE ]; +# define L_VERSION_NEEDED_TO_EXTRACT_0 0 +# define L_VERSION_NEEDED_TO_EXTRACT_1 1 +# define L_GENERAL_PURPOSE_BIT_FLAG 2 +# define L_COMPRESSION_METHOD 4 +# define L_LAST_MOD_DOS_DATETIME 6 +# define L_CRC32 10 +# define L_COMPRESSED_SIZE 14 +# define L_UNCOMPRESSED_SIZE 18 +# define L_FILENAME_LENGTH 22 +# define L_EXTRA_FIELD_LENGTH 24 + + typedef uch cdir_byte_hdr[ CREC_SIZE ]; +# define C_VERSION_MADE_BY_0 0 +# define C_VERSION_MADE_BY_1 1 +# define C_VERSION_NEEDED_TO_EXTRACT_0 2 +# define C_VERSION_NEEDED_TO_EXTRACT_1 3 +# define C_GENERAL_PURPOSE_BIT_FLAG 4 +# define C_COMPRESSION_METHOD 6 +# define C_LAST_MOD_DOS_DATETIME 8 +# define C_CRC32 12 +# define C_COMPRESSED_SIZE 16 +# define C_UNCOMPRESSED_SIZE 20 +# define C_FILENAME_LENGTH 24 +# define C_EXTRA_FIELD_LENGTH 26 +# define C_FILE_COMMENT_LENGTH 28 +# define C_DISK_NUMBER_START 30 +# define C_INTERNAL_FILE_ATTRIBUTES 32 +# define C_EXTERNAL_FILE_ATTRIBUTES 34 +# define C_RELATIVE_OFFSET_LOCAL_HEADER 38 + + typedef uch ec_byte_rec[ ECREC_SIZE+4 ]; +/* define SIGNATURE 0 space-holder only */ +# define NUMBER_THIS_DISK 4 +# define NUM_DISK_WITH_START_CENTRAL_DIR 6 +# define NUM_ENTRIES_CENTRL_DIR_THS_DISK 8 +# define TOTAL_ENTRIES_CENTRAL_DIR 10 +# define SIZE_CENTRAL_DIRECTORY 12 +# define OFFSET_START_CENTRAL_DIRECTORY 16 +# define ZIPFILE_COMMENT_LENGTH 20 + + + typedef struct local_file_header { /* LOCAL */ + uch version_needed_to_extract[2]; + ush general_purpose_bit_flag; + ush compression_method; + ulg last_mod_dos_datetime; + ulg crc32; + ulg csize; + ulg ucsize; + ush filename_length; + ush extra_field_length; + } local_file_hdr; + +#if 0 + typedef struct central_directory_file_header { /* CENTRAL */ + uch version_made_by[2]; + uch version_needed_to_extract[2]; + ush general_purpose_bit_flag; + ush compression_method; + ulg last_mod_dos_datetime; + ulg crc32; + ulg csize; + ulg ucsize; + ush filename_length; + ush extra_field_length; + ush file_comment_length; + ush disk_number_start; + ush internal_file_attributes; + ulg external_file_attributes; + ulg relative_offset_local_header; + } cdir_file_hdr; +#endif /* 0 */ + + typedef struct end_central_dir_record { /* END CENTRAL */ + ush number_this_disk; + ush num_disk_start_cdir; + ush num_entries_centrl_dir_ths_disk; + ush total_entries_central_dir; + ulg size_central_directory; + ulg offset_start_central_directory; + ush zipfile_comment_length; + } ecdir_rec; + + +/* Huffman code lookup table entry--this entry is four bytes for machines + that have 16-bit pointers (e.g. PC's in the small or medium model). + Valid extra bits are 0..13. e == 15 is EOB (end of block), e == 16 + means that v is a literal, 16 < e < 32 means that v is a pointer to + the next table, which codes e - 16 bits, and lastly e == 99 indicates + an unused code. If a code with e == 99 is looked up, this implies an + error in the data. */ + +struct huft { + uch e; /* number of extra bits or operation */ + uch b; /* number of bits in this code or subcode */ + union { + ush n; /* literal, length base, or distance base */ + struct huft *t; /* pointer to next level of table */ + } v; +}; + + +typedef struct _APIDocStruct { + char *compare; + char *function; + char *syntax; + char *purpose; +} APIDocStruct; + + + + +/*************/ +/* Globals */ +/*************/ + +#if (defined(OS2) && !defined(FUNZIP)) +# include "os2/os2data.h" +#endif + +#include "globals.h" + + + +/*************************/ +/* Function Prototypes */ +/*************************/ + +/*--------------------------------------------------------------------------- + Functions in unzip.c (initialization routines): + ---------------------------------------------------------------------------*/ + +#ifndef WINDLL + int MAIN OF((int argc, char **argv)); + int unzip OF((__GPRO__ int argc, char **argv)); + int uz_opts OF((__GPRO__ int *pargc, char ***pargv)); + int usage OF((__GPRO__ int error)); +#endif /* !WINDLL */ + +/*--------------------------------------------------------------------------- + Functions in process.c (main driver routines): + ---------------------------------------------------------------------------*/ + +int process_zipfiles OF((__GPRO)); +void free_G_buffers OF((__GPRO)); +/* static int do_seekable OF((__GPRO__ int lastchance)); */ +/* static int find_ecrec OF((__GPRO__ long searchlen)); */ +int uz_end_central OF((__GPRO)); +int process_cdir_file_hdr OF((__GPRO)); +int get_cdir_ent OF((__GPRO)); +int process_local_file_hdr OF((__GPRO)); +unsigned ef_scan_for_izux OF((uch *ef_buf, unsigned ef_len, int ef_is_c, + ulg dos_mdatetime, + iztimes *z_utim, ush *z_uidgid)); + +#ifndef SFX + +/*--------------------------------------------------------------------------- + Functions in zipinfo.c (`zipinfo-style' listing routines): + ---------------------------------------------------------------------------*/ + +#ifndef NO_ZIPINFO +#ifndef WINDLL + int zi_opts OF((__GPRO__ int *pargc, char ***pargv)); +#endif +int zi_end_central OF((__GPRO)); +int zipinfo OF((__GPRO)); +/* static int zi_long OF((__GPRO__ ulg *pEndprev)); */ +/* static int zi_short OF((__GPRO)); */ +/* static char *zi_time OF((__GPRO__ ZCONST ulg *datetimez, + ZCONST time_t *modtimez, char *d_t_str));*/ +#endif /* !NO_ZIPINFO */ + +/*--------------------------------------------------------------------------- + Functions in list.c (generic zipfile-listing routines): + ---------------------------------------------------------------------------*/ + +int list_files OF((__GPRO)); +#ifdef TIMESTAMP + int get_time_stamp OF((__GPRO__ time_t *last_modtime, + unsigned *nmember)); +#endif +int ratio OF((ulg uc, ulg c)); +void fnprint OF((__GPRO)); + +#endif /* !SFX */ + +/*--------------------------------------------------------------------------- + Functions in fileio.c: + ---------------------------------------------------------------------------*/ + +int open_input_file OF((__GPRO)); +int open_outfile OF((__GPRO)); /* also vms.c */ +void undefer_input OF((__GPRO)); +void defer_leftover_input OF((__GPRO)); +unsigned readbuf OF((__GPRO__ char *buf, register unsigned len)); +int readbyte OF((__GPRO)); +int fillinbuf OF((__GPRO)); +#ifdef FUNZIP + int flush OF((__GPRO__ ulg size)); /* actually funzip.c */ +#else + int flush OF((__GPRO__ uch *buf, ulg size, int unshrink)); +#endif +/* static int disk_error OF((__GPRO)); */ +void handler OF((int signal)); +time_t dos_to_unix_time OF((ulg dos_datetime)); +int check_for_newer OF((__GPRO__ char *filename)); /* os2,vmcms,vms */ +int do_string OF((__GPRO__ unsigned int len, int option)); +ush makeword OF((ZCONST uch *b)); +ulg makelong OF((ZCONST uch *sig)); +#if (!defined(STR_TO_ISO) || defined(NEED_STR2ISO)) + char *str2iso OF((char *dst, ZCONST char *src)); +#endif +#if (!defined(STR_TO_OEM) || defined(NEED_STR2OEM)) + char *str2oem OF((char *dst, ZCONST char *src)); +#endif +int zstrnicmp OF((register ZCONST char *s1, + register ZCONST char *s2, + register unsigned n)); +#ifdef REGULUS + int zstat OF((char *p, struct stat *s)); +#endif +#ifdef ZMEM /* MUST be ifdef'd because of conflicts with the standard def. */ + zvoid *memset OF((register zvoid *, register int, register unsigned int)); + int memcmp OF((register ZCONST zvoid*, register ZCONST zvoid *, + register unsigned int)); + zvoid *memcpy OF((register zvoid *, register ZCONST zvoid *, + register unsigned int)); +#endif +#ifdef SMALL_MEM + char *fLoadFarString OF((__GPRO__ const char Far *sz)); + char *fLoadFarStringSmall OF((__GPRO__ const char Far *sz)); + char *fLoadFarStringSmall2 OF((__GPRO__ const char Far *sz)); + #ifndef zfstrcpy + char Far * Far zfstrcpy OF((char Far *s1, const char Far *s2)); + #endif +#endif + + +/*--------------------------------------------------------------------------- + Functions in extract.c: + ---------------------------------------------------------------------------*/ + +int extract_or_test_files OF((__GPRO)); +/* static int store_info OF((void)); */ +/* static int extract_or_test_member OF((__GPRO)); */ +/* static int TestExtraField OF((__GPRO__ uch *ef, unsigned ef_len)); */ +/* static int test_OS2 OF((__GPRO__ uch *eb, unsigned eb_size)); */ +/* static int test_NT OF((__GPRO__ uch *eb, unsigned eb_size)); */ +int memextract OF((__GPRO__ uch *tgt, ulg tgtsize, + uch *src, ulg srcsize)); +int memflush OF((__GPRO__ uch *rawbuf, ulg size)); +char *fnfilter OF((ZCONST char *raw, uch *space)); + +/*--------------------------------------------------------------------------- + Decompression functions: + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) && !defined(FUNZIP)) +int explode OF((__GPRO)); /* explode.c */ +#endif +int huft_free OF((struct huft *t)); /* inflate.c */ +int huft_build OF((__GPRO__ ZCONST unsigned *b, unsigned n, + unsigned s, ZCONST ush *d, ZCONST ush *e, + struct huft **t, int *m)); +#ifdef USE_ZLIB + int UZinflate OF((__GPRO)); /* inflate.c */ +# define inflate_free(x) inflateEnd(&((Uz_Globs *)(&G))->dstrm) +#else + int inflate OF((__GPRO)); /* inflate.c */ + int inflate_free OF((__GPRO)); /* inflate.c */ +#endif /* ?USE_ZLIB */ +#if (!defined(SFX) && !defined(FUNZIP)) +void unreduce OF((__GPRO)); /* unreduce.c */ +/* static void LoadFollowers OF((__GPRO__ f_array *follower, uch *Slen)); + * unreduce.c */ +int unshrink OF((__GPRO)); /* unshrink.c */ +/* static void partial_clear OF((__GPRO)); * unshrink.c */ +#endif /* !SFX && !FUNZIP */ + +/*--------------------------------------------------------------------------- + Internal API functions (only included in DLL versions): + ---------------------------------------------------------------------------*/ + +#ifdef DLL + void setFileNotFound OF((__GPRO)); /* api.c */ + int unzipToMemory OF((__GPRO__ char *zip, char *file, + UzpBuffer *retstr)); /* api.c */ + int redirect_outfile OF((__GPRO)); /* api.c */ + int writeToMemory OF((__GPRO__ uch *rawbuf, ulg size)); + int close_redirect OF((__GPRO)); /* api.c */ + /* this obsolescent entry point kept for compatibility: */ + int UzpUnzip OF((int argc, char **argv));/* use UzpMain */ +#ifdef OS2DLL + int varmessage OF((__GPRO__ uch *buf, ulg size)); + int varputchar OF((__GPRO__ int c)); /* rexxapi.c */ + int finish_REXX_redirect OF((__GPRO)); /* rexxapi.c */ +#endif +#ifdef API_DOC + void APIhelp OF((__GPRO__ int argc, char **argv)); +#endif /* apihelp.c */ +#endif /* DLL */ + +/*--------------------------------------------------------------------------- + Acorn RISC OS-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef RISCOS + int isRISCOSexfield OF((void *extra_field)); /* acorn.c */ + void setRISCOSexfield OF((char *path, void *extra_field)); /* acorn.c */ + void printRISCOSexfield OF((int isdir, void *extra_field)); /* acorn.c */ +#endif + +/*--------------------------------------------------------------------------- + Human68K-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef __human68k__ + void InitTwentyOne OF((void)); +#endif + +/*--------------------------------------------------------------------------- + Macintosh-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef MACOS + void screenOpen OF((char *)); /* macscreen.c */ + void screenControl OF((char *, int)); /* macscreen.c */ + void screenDump OF((char *, long)); /* macscreen.c */ + void screenUpdate OF((WindowPtr)); /* macscreen.c */ + void screenClose OF((void)); /* macscreen.c */ + int macgetch OF((void)); /* macscreen.c */ + + int macmkdir OF((char *)); /* mac.c */ + short macopen OF((char *, short)); /* mac.c */ + short maccreat OF((char *)); /* mac.c */ + short macread OF((short, char *, unsigned)); /* mac.c */ + long macwrite OF((short, char *, unsigned)); /* mac.c */ + short macclose OF((short)); /* mac.c */ + long maclseek OF((short, long, short)); /* mac.c */ + char *macfgets OF((char *, int, FILE *)); /* mac.c */ + int macfprintf OF((FILE *, char *, ...)); /* mac.c */ + int macprintf OF((char *, ...)); /* mac.c */ +#endif + +/*--------------------------------------------------------------------------- + MSDOS-only functions: + ---------------------------------------------------------------------------*/ + +#if (defined(MSDOS) && (defined(__GO32__) || defined(__EMX__))) + unsigned _dos_getcountryinfo(void *); /* msdos.c */ +#if (!defined(__DJGPP__) || (__DJGPP__ < 2)) + unsigned _dos_setftime(int, unsigned short, unsigned short); /* msdos.c */ + unsigned _dos_setfileattr(char *, unsigned); /* msdos.c */ + unsigned _dos_creat(char *, unsigned, int *); /* msdos.c */ + void _dos_getdrive(unsigned *); /* msdos.c */ + unsigned _dos_close(int); /* msdos.c */ +#endif /* !__DJGPP__ || (__DJGPP__ < 2) */ +#endif + +/*--------------------------------------------------------------------------- + OS/2-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef OS2 /* GetFileTime conflicts with something in Win32 header files */ +#if (defined(REENTRANT) && defined(USETHREADID)) + ulg GetThreadId OF((void)); +#endif + int GetCountryInfo OF((void)); /* os2.c */ + long GetFileTime OF((ZCONST char *name)); /* os2.c */ +/* static void SetPathAttrTimes OF((__GPRO__ int flags, int dir)); os2.c */ +/* static int SetEAs OF((__GPRO__ const char *path, + void *eablock)); os2.c */ +/* static int SetACL OF((__GPRO__ const char *path, + void *eablock)); os2.c */ +/* static int IsFileNameValid OF((const char *name)); os2.c */ +/* static void map2fat OF((char *pathcomp, char **pEndFAT)); os2.c */ +/* static int SetLongNameEA OF((char *name, char *longname)); os2.c */ +/* static void InitNLS OF((void)); os2.c */ + int IsUpperNLS OF((int nChr)); /* os2.c */ + int ToLowerNLS OF((int nChr)); /* os2.c */ + void DebugMalloc OF((void)); /* os2.c */ +#endif + +/*--------------------------------------------------------------------------- + QDOS-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef QDOS + int QMatch (uch, uch); + void QFilename (__GPRO__ char *); + char *Qstrfix (char *); + int QReturn (int zip_error); +#endif + +/*--------------------------------------------------------------------------- + TOPS20-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef TOPS20 + int upper OF((char *s)); /* tops20.c */ + int enquote OF((char *s)); /* tops20.c */ + int dequote OF((char *s)); /* tops20.c */ + int fnlegal OF(()); /* error if prototyped? */ /* tops20.c */ +#endif + +/*--------------------------------------------------------------------------- + VM/CMS- and MVS-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef CMS_MVS + extent getVMMVSexfield OF((char *type, uch *ef_block, unsigned datalen)); + FILE *vmmvs_open_infile OF((__GPRO)); /* vmmvs.c */ + void close_infile OF((__GPRO)); /* vmmvs.c */ +#endif + +/*--------------------------------------------------------------------------- + VMS-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef VMS + int check_format OF((__GPRO)); /* vms.c */ +/* int open_outfile OF((__GPRO)); * (see fileio.c) vms.c */ +/* int flush OF((__GPRO__ uch *rawbuf, unsigned size, + int final_flag)); * (see fileio.c) vms.c */ +#ifdef RETURN_CODES + void return_VMS OF((__GPRO__ int zip_error)); /* vms.c */ +#else + void return_VMS OF((int zip_error)); /* vms.c */ +#endif +#ifdef VMSCLI + ulg vms_unzip_cmdline OF((int *, char ***)); /* cmdline.c */ + int VMSCLI_usage OF((__GPRO__ int error)); /* cmdline.c */ +#endif +#endif + +/*--------------------------------------------------------------------------- + WIN32-only functions: + ---------------------------------------------------------------------------*/ + +#ifdef WIN32 + int IsWinNT OF((void)); /* win32.c */ +#ifdef NTSD_EAS + void process_defer_NT OF((__GPRO)); /* win32.c */ + int test_NTSD OF((__GPRO__ uch *eb, unsigned eb_size, + uch *eb_ucptr, ulg eb_ucsize)); /* win32.c */ +# define TEST_NTSD test_NTSD +#endif +#ifdef W32_STAT_BANDAID + int zstat_win32 OF((__W32STAT_GLOBALS__ + const char *path, struct stat *buf)); /* win32.c */ +#endif +#endif + +/*--------------------------------------------------------------------------- + Miscellaneous/shared functions: + ---------------------------------------------------------------------------*/ + +Uz_Globs *globalsCtor OF((void)); /* globals.c */ + +void envargs OF((__GPRO__ int *Pargc, char ***Pargv, + ZCONST char *envstr, ZCONST char *envstr2)); + /* envargs.c */ +void mksargs OF((int *argcp, char ***argvp)); /* envargs.c */ + +int match OF((ZCONST char *s, ZCONST char *p, + int ic)); /* match.c */ +int iswild OF((ZCONST char *p)); /* match.c */ + +#ifdef DYNALLOC_CRCTAB + void free_crc_table OF((void)); /* crctab.c */ +#endif +#ifndef USE_ZLIB + ZCONST ulg near *get_crc_table OF((void)); /* funzip.c, crctab.c */ + ulg crc32 OF((ulg crc, ZCONST uch *buf, extent len)); +#endif /* !USE_ZLIB */ /* assembler source or crc32.c */ + +int dateformat OF((void)); /* currently, only msdos.c */ +#ifndef WINDLL + void version OF((__GPRO)); /* local */ +#endif +int mapattr OF((__GPRO)); /* local */ +int mapname OF((__GPRO__ int renamed)); /* local */ +int checkdir OF((__GPRO__ char *pathcomp, int flag)); /* local */ +char *do_wild OF((__GPRO__ char *wildzipfn)); /* local */ +char *GetLoadPath OF((__GPRO)); /* local */ +#if (defined(MORE) && (defined(UNIX) || defined(VMS) || defined(__BEOS__))) + int screenlines OF((void)); /* local */ +#endif +#ifndef MTS /* macro in MTS */ + void close_outfile OF((__GPRO)); /* local */ +#endif +#ifdef SET_DIR_ATTRIB + int set_direc_attribs OF((__GPRO__ dirtime *d)); /* local */ +#endif +#ifdef TIMESTAMP +# ifdef WIN32 + int stamp_file OF((__GPRO__ + ZCONST char *fname, time_t modtime)); /* local */ +# else + int stamp_file OF((ZCONST char *fname, time_t modtime)); /* local */ +# endif +#endif +#ifdef SYSTEM_SPECIFIC_CTOR + void SYSTEM_SPECIFIC_CTOR OF((__GPRO)); /* local */ +#endif + + + + + +/************/ +/* Macros */ +/************/ + +#ifndef MAX +# define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif +#ifndef MIN +# define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif + +#ifdef DEBUG +# define Trace(x) fprintf x +#else +# define Trace(x) +#endif + +#ifdef DEBUG_TIME +# define TTrace(x) fprintf x +#else +# define TTrace(x) +#endif + +#ifdef NO_DEBUG_IN_MACROS +# define MTrace(x) +#else +# define MTrace(x) Trace(x) +#endif + +#if (defined(UNIX) || defined(T20_VMS)) /* generally old systems */ +# define ToLower(x) ((char)(isupper((int)x)? tolower((int)x) : x)) +#else +# define ToLower tolower /* assumed "smart"; used in match() */ +#endif + +#ifdef USE_STRM_INPUT + /* ``Replace'' the unbuffered UNIX style I/O function with similar + * standard C functions from . + */ +# define read(fd,buf,n) fread((buf),1,(n),(FILE *)(fd)) +# define lseek(fd,o,w) fseek((FILE *)(fd),(o),(w)) +# define close(fd) fclose((FILE *)(fd)) +#endif /* USE_STRM_INPUT */ + +/* The return value of the Info() "macro function" is never checked in + * UnZip. Otherwise, to get the same behaviour as for (*G.message)(), the + * Info() definition for "FUNZIP" would have to be corrected: + * #define Info(buf,flag,sprf_arg) \ + * (fprintf((flag)&1? stderr : stdout, \ + * (char *)(sprintf sprf_arg, (buf))) == EOF) + */ +#ifndef Info /* may already have been defined for redirection */ +# ifdef FUNZIP +# define Info(buf,flag,sprf_arg) \ + fprintf((flag)&1? stderr : stdout, (char *)(sprintf sprf_arg, (buf))) +# else +# ifdef INT_SPRINTF /* optimized version for "int sprintf()" flavour */ +# define Info(buf,flag,sprf_arg) \ + (*G.message)((zvoid *)&G, (uch *)(buf), (ulg)sprintf sprf_arg, (flag)) +# else /* generic version, does not use sprintf() return value */ +# define Info(buf,flag,sprf_arg) \ + (*G.message)((zvoid *)&G, (uch *)(buf), \ + (ulg)(sprintf sprf_arg, strlen((char *)(buf))), (flag)) +# endif +# endif +#endif /* !Info */ + +#undef Info +#define Info(buf,flag,sprf_arg) (0) + +/* The following macros wrappers around the fnfilter function are used many + * times to prepare archive entry names or name components for displaying + * listings and (warning/error) messages. They use sections in the upper half + * of 'slide' as buffer, since their output is normally fed through the + * Info() macro with 'slide' (the start of this area) as message buffer. + */ +#define FnFilter1(fname) fnfilter((fname), slide + (WSIZE>>1)) +#define FnFilter2(fname) fnfilter((fname), slide + ((WSIZE>>1) + (WSIZE>>2))) + +#ifndef FUNZIP /* used only in inflate.c */ +# define MESSAGE(str,len,flag) (*G.message)((zvoid *)&G,(str),(len),(flag)) +#endif + +#if 0 /* Optimization: use the (const) result of crc32(0L,NULL,0) */ +# define CRCVAL_INITIAL crc32(0L, NULL, 0) +#else +# define CRCVAL_INITIAL 0L +#endif + +#ifndef TEST_NTSD /* "NTSD valid?" checking function */ +# define TEST_NTSD NULL /* ... is not available */ +#endif + +/* + * Seek to the block boundary of the block which includes abs_offset, + * then read block into input buffer and set pointers appropriately. + * If block is already in the buffer, just set the pointers. This macro + * is used by uz_end_central (process.c), zi_end_central (zipinfo.c) and + * do_string (fileio.c). A slightly modified version is embedded within + * extract_or_test_files (extract.c). readbyte() and readbuf() (fileio.c) + * are compatible. NOTE THAT abs_offset is intended to be the "proper off- + * set" (i.e., if there were no extra bytes prepended); cur_zipfile_bufstart + * contains the corrected offset. + * + * Since ZLSEEK is never used during decompression, it is safe to use the + * slide[] buffer for the error message. + * + * The awkward "%cbs_offset" construct is provided for the obnoxious Solaris + * compiler, which wants to do macro substitution inside strings. + */ + +#ifndef ZLSEEK +# ifdef USE_STRM_INPUT +# define _ZLS_RELOAD(abs_offset) {\ + MTrace((stderr, "ZLSEEK: %cbs_offset = %ld, G.extra_bytes = %ld\n",\ + 'a', (abs_offset), G.extra_bytes));\ + fseek(G.zipfd,(LONGINT)bufstart,SEEK_SET);\ + G.cur_zipfile_bufstart = ftell(G.zipfd);\ + MTrace((stderr,\ + " request = %ld, (abs+extra) = %ld, inbuf_offset = %ld\n",\ + request, ((abs_offset)+G.extra_bytes), inbuf_offset));\ + MTrace((stderr, " bufstart = %ld, cur_zipfile_bufstart = %ld\n",\ + bufstart, G.cur_zipfile_bufstart));\ + if ((G.incnt = fread((char *)G.inbuf,1,INBUFSIZ,G.zipfd)) <= 0)\ + return(PK_EOF);\ + G.inptr = G.inbuf + (int)inbuf_offset;\ + G.incnt -= (int)inbuf_offset;\ + } +# else /* !USE_STRM_INPUT */ +# define _ZLS_RELOAD(abs_offset) {\ + MTrace((stderr, "ZLSEEK: %cbs_offset = %ld, G.extra_bytes = %ld\n",\ + 'a', (abs_offset), G.extra_bytes));\ + G.cur_zipfile_bufstart = lseek(G.zipfd,(LONGINT)bufstart,SEEK_SET);\ + MTrace((stderr,\ + " request = %ld, (abs+extra) = %ld, inbuf_offset = %ld\n",\ + request, ((abs_offset)+G.extra_bytes), inbuf_offset));\ + MTrace((stderr, " bufstart = %ld, cur_zipfile_bufstart = %ld\n",\ + bufstart, G.cur_zipfile_bufstart));\ + if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) <= 0)\ + return(PK_EOF);\ + G.inptr = G.inbuf + (int)inbuf_offset;\ + G.incnt -= (int)inbuf_offset;\ + } +# endif /* ?USE_STRM_INPUT */ + +# define ZLSEEK(abs_offset) {\ + LONGINT request = (abs_offset) + G.extra_bytes;\ + LONGINT inbuf_offset = request % INBUFSIZ;\ + LONGINT bufstart = request - inbuf_offset;\ +\ + if (request < 0) {\ + Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg),\ + G.zipfn, LoadFarString(ReportMsg)));\ + return(PK_BADERR);\ + } else if (bufstart != G.cur_zipfile_bufstart)\ + _ZLS_RELOAD(abs_offset)\ + else {\ + G.incnt += (G.inptr-G.inbuf) - (int)inbuf_offset;\ + G.inptr = G.inbuf + (int)inbuf_offset;\ + }\ + } +#endif /* !ZLSEEK */ + +#define SKIP_(length) if(length&&((error=do_string(__G__ length,SKIP))!=0))\ + {error_in_archive=error; if(error>1) return error;} + +/* + * Skip a variable-length field, and report any errors. Used in zipinfo.c + * and unzip.c in several functions. + * + * macro SKIP_(length) + * ush length; + * { + * if (length && ((error = do_string(length, SKIP)) != 0)) { + * error_in_archive = error; /-* might be warning *-/ + * if (error > 1) /-* fatal *-/ + * return (error); + * } + * } + * + */ + + +#ifdef FUNZIP +# define FLUSH(w) flush(__G__ (ulg)(w)) +# define NEXTBYTE getc(G.in) /* redefined in crypt.h if full version */ +#else +# define FLUSH(w) if (G.mem_mode) memflush(__G__ redirSlide,(ulg)(w)); \ + else flush(__G__ redirSlide,(ulg)(w),0) +# define NEXTBYTE (--G.incnt >= 0 ? (int)(*G.inptr++) : readbyte(__G)) +#endif + + +#define READBITS(nbits,zdest) {if(nbits>G.bits_left) {int temp; G.zipeof=1;\ + while (G.bits_left<=8*(int)(sizeof(G.bitbuf)-1) && (temp=NEXTBYTE)!=EOF) {\ + G.bitbuf|=(ulg)temp<>=nbits;\ + G.bits_left-=nbits;} + +/* + * macro READBITS(nbits,zdest) * only used by unreduce and unshrink * + * { + * if (nbits > G.bits_left) { * fill G.bitbuf, 8*sizeof(ulg) bits * + * int temp; + * + * G.zipeof = 1; + * while (G.bits_left <= 8*(int)(sizeof(G.bitbuf)-1) && + * (temp = NEXTBYTE) != EOF) { + * G.bitbuf |= (ulg)temp << G.bits_left; + * G.bits_left += 8; + * G.zipeof = 0; + * } + * } + * zdest = (shrint)((ush)G.bitbuf & mask_bits[nbits]); + * G.bitbuf >>= nbits; + * G.bits_left -= nbits; + * } + * + */ + + +/* GRR: should change name to STRLOWER and use StringLower if possible */ + +/* + * Copy the zero-terminated string in str1 into str2, converting any + * uppercase letters to lowercase as we go. str2 gets zero-terminated + * as well, of course. str1 and str2 may be the same character array. + */ +#ifdef __human68k__ +# define TOLOWER(str1, str2) \ + { \ + char *p=(str1), *q=(str2); \ + uch c; \ + while ((c = *p++) != '\0') { \ + if (iskanji(c)) { \ + if (*p == '\0') \ + break; \ + *q++ = c; \ + *q++ = *p++; \ + } else \ + *q++ = isupper(c) ? tolower(c) : c; \ + } \ + *q = '\0'; \ + } +#else +# define TOLOWER(str1, str2) \ + { \ + char *p, *q; \ + p = (str1) - 1; \ + q = (str2); \ + while (*++p) \ + *q++ = (char)(isupper((int)(*p))? tolower((int)(*p)) : *p); \ + *q = '\0'; \ + } +#endif +/* + * NOTES: This macro makes no assumptions about the characteristics of + * the tolower() function or macro (beyond its existence), nor does it + * make assumptions about the structure of the character set (i.e., it + * should work on EBCDIC machines, too). The fact that either or both + * of isupper() and tolower() may be macros has been taken into account; + * watch out for "side effects" (in the C sense) when modifying this + * macro. + */ + +#ifndef foreign +# define foreign(c) (c) +#endif + +#ifndef native +# define native(c) (c) +# define A_TO_N(str1) +#else +# ifndef NATIVE +# define NATIVE "native chars" +# endif +# define A_TO_N(str1) {register uch *p;\ + for (p=(uch *)(str1); *p; p++) *p=native(*p);} +#endif +/* + * Translate the zero-terminated string in str1 from ASCII to the native + * character set. The translation is performed in-place and uses the + * "native" macro to translate each character. + * + * NOTE: Using the "native" macro means that is it the only part of unzip + * which knows which translation table (if any) is actually in use to + * produce the native character set. This makes adding new character set + * translation tables easy, insofar as all that is needed is an appropriate + * "native" macro definition and the translation table itself. Currently, + * the only non-ASCII native character set implemented is EBCDIC, but this + * may not always be so. + */ + + +/* default setup for internal codepage: assume ISO 8859-1 compatibility!! */ +#if (!defined(NATIVE) && !defined(CRTL_CP_IS_ISO) && !defined(CRTL_CP_IS_OEM)) +# define CRTL_CP_IS_ISO +#endif + + +/* Translate "extended ASCII" chars (OEM coding for DOS and OS/2; else + * ISO-8859-1 [ISO Latin 1, Win Ansi,...]) into the internal "native" + * code page. As with A_TO_N(), conversion is done in place. + */ +#ifndef _ISO_INTERN +# ifdef CRTL_CP_IS_OEM +# ifndef IZ_ISO2OEM_ARRAY +# define IZ_ISO2OEM_ARRAY +# endif +# define _ISO_INTERN(str1) {register uch *p;\ + for (p=(uch *)(str1); *p; p++)\ + *p = native((*p & 0x80) ? iso2oem[*p & 0x7f] : *p);} +# else +# define _ISO_INTERN(str1) A_TO_N(str1) +# endif +#endif + +#ifndef _OEM_INTERN +# ifdef CRTL_CP_IS_OEM +# define _OEM_INTERN(str1) A_TO_N(str1) +# else +# ifndef IZ_OEM2ISO_ARRAY +# define IZ_OEM2ISO_ARRAY +# endif +# define _OEM_INTERN(str1) {register uch *p;\ + for (p=(uch *)(str1); *p; p++)\ + *p = native((*p & 0x80) ? oem2iso[*p & 0x7f] : *p);} +# endif +#endif + +#ifndef STR_TO_ISO +# ifdef CRTL_CP_IS_ISO +# define STR_TO_ISO strcpy +# else +# define STR_TO_ISO str2iso +# define NEED_STR2ISO +# endif +#endif + +#ifndef STR_TO_OEM +# ifdef CRTL_CP_IS_OEM +# define STR_TO_OEM strcpy +# else +# define STR_TO_OEM str2oem +# define NEED_STR2OEM +# endif +#endif + +#if (!defined(INTERN_TO_ISO) && !defined(ASCII2ISO)) +# ifdef CRTL_CP_IS_OEM + /* know: "ASCII" is "OEM" */ +# define ASCII2ISO(c) (((c) & 0x80) ? oem2iso[(c) & 0x7f] : (c)) +# if (defined(NEED_STR2ISO) && !defined(CRYP_USES_OEM2ISO)) +# define CRYP_USES_OEM2ISO +# endif +# else + /* assume: "ASCII" is "ISO-ANSI" */ +# define ASCII2ISO(c) (c) +# endif +#endif + +#if (!defined(INTERN_TO_OEM) && !defined(ASCII2OEM)) +# ifdef CRTL_CP_IS_OEM + /* know: "ASCII" is "OEM" */ +# define ASCII2OEM(c) (c) +# else + /* assume: "ASCII" is "ISO-ANSI" */ +# define ASCII2OEM(c) (((c) & 0x80) ? iso2oem[(c) & 0x7f] : (c)) +# if (defined(NEED_STR2OEM) && !defined(CRYP_USES_ISO2OEM)) +# define CRYP_USES_ISO2OEM +# endif +# endif +#endif + +/* codepage conversion setup for testp() in crypt.c */ +#ifdef CRTL_CP_IS_ISO +# ifndef STR_TO_CP2 +# define STR_TO_CP2 STR_TO_OEM +# endif +#else +# ifdef CRTL_CP_IS_OEM +# ifndef STR_TO_CP2 +# define STR_TO_CP2 STR_TO_ISO +# endif +# else /* native internal CP is neither ISO nor OEM */ +# ifndef STR_TO_CP1 +# define STR_TO_CP1 STR_TO_ISO +# endif +# ifndef STR_TO_CP2 +# define STR_TO_CP2 STR_TO_OEM +# endif +# endif +#endif + + +/* Convert filename (and file comment string) into "internal" charset. + * This macro assumes that Zip entry filenames are coded in OEM (IBM DOS) + * codepage when made on + * -> DOS (this includes 16-bit Windows 3.1) (FS_FAT_) + * -> OS/2 (FS_HPFS_) + * -> Win95/WinNT with Nico Mak's WinZip (FS_NTFS_ && hostver == "5.0") + * + * All other ports are assumed to code zip entry filenames in ISO 8859-1. + */ +#ifndef Ext_ASCII_TO_Native +# define Ext_ASCII_TO_Native(string, hostnum, hostver) \ + if ((hostnum) == FS_FAT_ || (hostnum) == FS_HPFS_ || \ + ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ + _OEM_INTERN((string)); \ + } else { \ + _ISO_INTERN((string)); \ + } +#endif + + + +/**********************/ +/* Global constants */ +/**********************/ + + extern ZCONST ush near mask_bits[]; + extern ZCONST char *fnames[2]; + +#ifdef EBCDIC + extern ZCONST uch ebcdic[]; +#endif +#ifdef IZ_ISO2OEM_ARRAY + extern ZCONST uch Far iso2oem[]; +#endif +#ifdef IZ_OEM2ISO_ARRAY + extern ZCONST uch Far oem2iso[]; +#endif + + extern ZCONST char Far VersionDate[]; + extern ZCONST char Far CentSigMsg[]; + extern ZCONST char Far EndSigMsg[]; + extern ZCONST char Far SeekMsg[]; + extern ZCONST char Far FilenameNotMatched[]; + extern ZCONST char Far ExclFilenameNotMatched[]; + extern ZCONST char Far ReportMsg[]; + +#ifndef SFX + extern ZCONST char Far CompiledWith[]; +#endif /* !SFX */ + + + +/***********************************/ +/* Global (shared?) RTL variables */ +/***********************************/ + +#ifdef DECLARE_ERRNO + extern int errno; +#endif + + +#endif /* !__unzpriv_h */ diff --git a/utils/Install/inczip/version.h b/utils/Install/inczip/version.h new file mode 100644 index 0000000000..763cc13078 --- /dev/null +++ b/utils/Install/inczip/version.h @@ -0,0 +1,44 @@ +/* + version.h (for UnZip) by Info-ZIP. + + This header file is not copyrighted and may be distributed without + restriction. (That's a little geek humor, heh heh.) + */ + +#ifndef __version_h /* don't include more than once */ +#define __version_h + +#ifdef BETA +# undef BETA /* define BETA for internal beta releases */ +#endif + +#ifdef BETA +# define BETALEVEL "d BETA" +# define VERSION_DATE "27 November 98" /* internal beta version */ +#else +# define BETALEVEL "" +# define VERSION_DATE "28 November 1998" /* official release version */ +# define RELEASE +#endif + +#define UZ_MAJORVER 5 /* UnZip */ +#define UZ_MINORVER 4 + +#define ZI_MAJORVER 2 /* ZipInfo */ +#define ZI_MINORVER 3 + +#define PATCHLEVEL 0 + + +/* these are obsolete but remain for backward compatibility: */ +#define D2_MAJORVER UZ_MAJORVER /* DLL for OS/2 */ +#define D2_MINORVER UZ_MINORVER +#define D2_PATCHLEVEL PATCHLEVEL + +#define DW_MAJORVER UZ_MAJORVER /* DLL for MS Windows */ +#define DW_MINORVER UZ_MINORVER +#define DW_PATCHLEVEL PATCHLEVEL + +#define WIN_VERSION_DATE VERSION_DATE + +#endif /* !__version_h */ diff --git a/utils/Install/inczip/w32cfg.h b/utils/Install/inczip/w32cfg.h new file mode 100644 index 0000000000..18a8e3f85c --- /dev/null +++ b/utils/Install/inczip/w32cfg.h @@ -0,0 +1,222 @@ +/*--------------------------------------------------------------------------- + Win32 specific configuration section: + ---------------------------------------------------------------------------*/ + +#ifndef __w32cfg_h +#define __w32cfg_h + +#if (defined(__CYGWIN__) && !defined(__CYGWIN32__)) +# define __CYGWIN32__ /* new versions of CygWin may not define this */ +#endif + +#include /* off_t, time_t, dev_t, ... */ +#include +#include /* read(), open(), etc. */ +#include +#if (defined(__RSXNT__) || defined(__EMX__)) && !defined(tzset) +# define tzset _tzset +#endif +#ifdef __MINGW32__ + extern void _tzset(void); /* this is missing in */ +# ifndef tzset +# define tzset _tzset +# endif +#endif +#include +#if (!defined(__RSXNT__) && !defined(__CYGWIN32__)) +# include /* mkdir() */ +#endif +#include +#ifdef __CYGWIN32__ +# include + extern int setmode(int, int); /* this is missing in */ +#endif +#if (defined(MSC) || defined(__WATCOMC__) || defined(__MINGW32__)) +# include +#else +# include +#endif + +#if defined(FILEIO_C) +# ifndef __CYGWIN32__ +# include +# endif +# include +# ifdef __RSXNT__ +# include "win32/rsxntwin.h" +# endif +#endif +#if (defined(ENVARGS_C) || defined(EXTRACT_C) || defined(UNZIP_C) || \ + defined(ZCRYPT_INTERNAL)) +# include +# ifdef __RSXNT__ +# include "win32/rsxntwin.h" +# endif +#endif +#if (defined(__CYGWIN32__) || defined(__MINGW32__)) + /* the following definitions are missing in their */ +# ifndef AnsiToOem +# define AnsiToOem CharToOemA +# endif +# ifndef OemToAnsi +# define OemToAnsi OemToCharA +# endif +#endif + +#define DIR_END '\\' /* OS uses '\\' as directory separator */ +#define DIR_END2 '/' /* also check for '/' (RTL may convert) */ +#ifndef DATE_FORMAT +# define DATE_FORMAT DF_MDY +#endif +#define lenEOL 2 +#define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} + +#if (defined(__RSXNT__) && !defined(HAVE_MKTIME)) +# define HAVE_MKTIME /* use mktime() in time conversion routines */ +#endif +#if (defined(__CYGWIN32__) && defined(HAVE_MKTIME)) +# undef HAVE_MKTIME /* Cygnus' mktime() implementation is buggy */ +#endif +#if (!defined(NT_TZBUG_WORKAROUND) && !defined(NO_NT_TZBUG_WORKAROUND)) +# define NT_TZBUG_WORKAROUND +#endif +#if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)) +# define USE_EF_UT_TIME +#endif +#if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) +# define TIMESTAMP +#endif +#if (!defined(NO_NTSD_EAS) && !defined(NTSD_EAS)) +# define NTSD_EAS /* enable NTSD support unless explicitly suppressed */ +#endif + +/* handlers for OEM <--> ANSI string conversions */ +#ifdef __RSXNT__ + /* RSXNT uses OEM coded strings in functions supplied by C RTL */ +# ifdef CRTL_CP_IS_ISO +# undef CRTL_CP_IS_ISO +# endif +# ifndef CRTL_CP_IS_OEM +# define CRTL_CP_IS_OEM +# endif +#else + /* "real" native WIN32 compilers use ANSI coded strings in C RTL calls */ +# ifndef CRTL_CP_IS_ISO +# define CRTL_CP_IS_ISO +# endif +# ifdef CRTL_CP_IS_OEM +# undef CRTL_CP_IS_OEM +# endif +#endif + +#ifdef CRTL_CP_IS_ISO + /* C RTL's file system support assumes ANSI coded strings */ +# define ISO_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} +# define OEM_TO_INTERN(src, dst) OemToAnsi(src, dst) +# define INTERN_TO_ISO(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} +# define INTERN_TO_OEM(src, dst) AnsiToOem(src, dst) +#endif /* CRTL_CP_IS_ISO */ +#ifdef CRTL_CP_IS_OEM + /* C RTL's file system support assumes OEM coded strings */ +# define ISO_TO_INTERN(src, dst) AnsiToOem(src, dst) +# define OEM_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} +# define INTERN_TO_ISO(src, dst) OemToAnsi(src, dst) +# define INTERN_TO_OEM(src, dst) {if ((src) != (dst)) strcpy((dst), (src));} +#endif /* CRTL_CP_IS_OEM */ +#define _OEM_INTERN(str1) OEM_TO_INTERN(str1, str1) +#define _ISO_INTERN(str1) ISO_TO_INTERN(str1, str1) +#ifndef WINDLL + /* Despite best intentions, for the command-line version UzpPassword() + * could return either character set, depending on whether running under + * Win95 (DOS-session) or WinNT (native WinNT command interpreter)! */ +# define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst) +# define STR_TO_CP3(dst, src) (OemToAnsi(src, dst), dst) +#else + /* The WINDLL front end is known to supply ISO/ANSI-coded passwords! */ +# define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst) +#endif +/* dummy defines to disable these functions, they are not needed */ +#define STR_TO_OEM +#define STR_TO_ISO + +/* Static variables that we have to add to Uz_Globs: */ +#define SYSTEM_SPECIFIC_GLOBALS \ + int created_dir, renamed_fullpath, fnlen;\ + unsigned nLabelDrive;\ + char lastRootPath[4];\ + int lastVolOldFAT, lastVolLocTim;\ + char *rootpath, *buildpathHPFS, *buildpathFAT, *endHPFS, *endFAT;\ + char *dirname, *wildname, matchname[FILNAMSIZ];\ + int rootlen, have_dirname, dirnamelen, notfirstcall;\ + zvoid *wild_dir; + +/* created_dir, renamed_fullpath, fnlen, and nLabelDrive are used by */ +/* both mapname() and checkdir(). */ +/* lastRootPath and lastVolOldFAT are used by IsVolumeOldFAT(). */ +/* rootlen, rootpath, buildpathHPFS, buildpathFAT, endHPFS, and endFAT */ +/* are used by checkdir(). */ +/* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ +/* and notfirstcall are used by do_wild(). */ + +#if (defined(_MSC_VER) && !defined(MSC)) +# define MSC +#endif + +/* This replacement for C-RTL-supplied getch() (or similar) functionality + * avoids leaving unabsorbed LFs in the keyboard buffer under Windows95, + * and supports the +[0] feature. + */ +int getch_win32 OF((void)); + +/* This patch of stat() is useful for at least two compilers. It is */ +/* difficult to take a stat() of a root directory under Windows95, so */ +/* zstat_win32() detects that case and fills in suitable values. */ +#ifndef __RSXNT__ +# ifndef W32_STATROOT_FIX +# define W32_STATROOT_FIX +# endif +#endif /* !__RSXNT__ */ + +#if (defined(NT_TZBUG_WORKAROUND) || defined(W32_STATROOT_FIX)) +# define W32_STAT_BANDAID +# if (defined(NT_TZBUG_WORKAROUND) && defined(REENTRANT)) +# define __W32STAT_GLOBALS__ Uz_Globs *pG, +# define __W32STAT_G__ pG, +# else +# define __W32STAT_GLOBALS__ +# define __W32STAT_G__ +# endif +# undef SSTAT +# ifdef WILD_STAT_BUG +# define SSTAT(path, pbuf) (iswild(path) || zstat_win32(__W32STAT_G__ path, pbuf)) +# else +# define SSTAT(path, pbuf) zstat_win32(__W32STAT_G__ path, pbuf) +# endif +#endif + +#ifdef __WATCOMC__ +# ifdef __386__ +# ifndef WATCOMC_386 +# define WATCOMC_386 +# endif +# define __32BIT__ +# undef far +# define far +# undef near +# define near + +/* Get asm routines to link properly without using "__cdecl": */ +# ifndef USE_ZLIB +# pragma aux crc32 "_*" parm caller [] value [eax] modify [eax] +# pragma aux get_crc_table "_*" parm caller [] value [eax] \ + modify [eax ecx edx] +# endif /* !USE_ZLIB */ +# endif /* __386__ */ + +# ifndef EPIPE +# define EPIPE -1 +# endif +# define PIPE_ERROR (errno == EPIPE) +#endif /* __WATCOMC__ */ + +#endif /* !__w32cfg_h */ diff --git a/utils/Install/inczip/zip.h b/utils/Install/inczip/zip.h new file mode 100644 index 0000000000..5c079467f7 --- /dev/null +++ b/utils/Install/inczip/zip.h @@ -0,0 +1,15 @@ +/* This is a dummy zip.h to allow the source files shared with Zip (crypt.c, + crc32.c, crctab.c, ttyio.c) to compile for UnZip. */ + +#ifndef __zip_h /* don't include more than once */ +#define __zip_h + +#define UNZIP_INTERNAL +#include "unzip.h" + +#define local static + +#define ZE_MEM PK_MEM +#define ziperr(c, h) return + +#endif /* !__zip_h */ diff --git a/utils/Install/install.c b/utils/Install/install.c new file mode 100644 index 0000000000..1c29ce6a36 --- /dev/null +++ b/utils/Install/install.c @@ -0,0 +1,1081 @@ +/* + * install.c (c) 1998,1999 Brian Smith + * parts by Daniele Vistalli + */ + +#include +#include +#include +#include +#include +#include +#if defined(__OS2__) || defined(__EMX__) || defined(WINNT) || defined(WIN32) +#include +#endif +#include +#include "install.h" +#include "instsup.h" + +#if !defined(__EMX__) && !defined(__OS2__) && !defined(WIN32) && !defined(WINNT) +#define stricmp strcasecmp +#endif + +/* My Global variables ;) unusually many due to multiple dialogs */ +char tempPath[MAX_PATH]; +int installstate = NONE; +int installstage = 0; +int current_file=0, success=0; +unsigned long int acepos=0, aceoffset=0; +int pixels=0; +char confirmstring[1024]; +/* I know I am being excessive but... better safe than sorry ;) */ +char *configsys[8196]; +int configfilecount=-1; +int files = 0, files_deleted=0, packagesize=0, packagesselected[20]; +/* Global flags often set by the user */ +int driveselected, packagechosen, express = 1, driverstatus = -1, no_update = 0; +int licensechecked = 0, custom = 0, checkforupdate = 1, downloadsite = 0; +int usescitech = 1, usecurrent = 0, checking = 0, checkerror = 0, newerver = 0; +char sddfilename[256] = "", sddversion[256] = "", sdddate[256] = ""; +char sddurl[4][256] = { "", "", "", "" }; + +/* So these are accessible to REXX */ +int drivelist[26]; +FILE *self; + +/* These get loaded in loadheader */ +char *INSTALLER_APPLICATION; +char *INSTALLER_VERSION; +char *INSTALLER_TITLE; +char *INSTALLER_PATH; +char *INSTALLER_FOLDER; +char *INSTALLER_PROGRAM; +char *INSTALLER_SHADOW; +char *INSTALLER_OBJECT; +char *INSTALLER_SETS; +char *INSTALLER_SYSVAR; +char *INSTALLER_SYSLINE; +char *INSTALLER_PACKAGES[20]; +char *INSTALLER_CONFIRM_WPS; +char *INSTALLER_CONFIRM_CONFIGSYS; +char *INSTALLER_CONFIRM_OVERWRITE; +int INSTALLER_PACKAGE_COUNT; + +/* Will have to seperate this stuff to platform specifics... */ + +/* Config.Sys -- Note the drive letter gets replaced with the boot drive letter + It is just a place holder. (For the next 3 entries) */ +char csfile[] = "C:\\CONFIG.SYS"; +/* Backup Config.Sys filename */ +char bufile[] = "C:\\CONFIG.SDD"; +/* Installation Log Database -- Used for uninstallation and aborting */ +#if defined(__OS2__) || defined(__EMX__) || defined(WINNT) || defined(WIN32) +char instlog[] = "C:\\DBINST.LOG"; +#else +char instlog[] = "~/dbinst.log"; +#endif +char installdir[400]; + +char bootdrive[2] = "C"; +char winpath[400] = "C:\\OS2\\MDOS\\WINOS2"; +char winjpath[400] = "C:\\OS2\\MDOS\\WINJOS2"; +char wintpath[400] = "C:\\OS2\\MDOS\\WINTOS2"; +char winhpath[400] = "C:\\OS2\\MDOS\\WINHOS2"; +char browsedir[400] = "C:\\"; +char installdir2[400] = ""; +char empty_string[] = ""; +char currentcf[400] = ""; + +#ifdef ENABLE_LOGGING +FILE *logfile; +#endif + +/* Function prototypes */ +int installer_unpack(char *filename, int operation); +void resetglobals(void); + +typedef struct _replacements { + char *replacestring, *replacevar; +} Replacements; + +/* The variables in this array must be static buffers */ +Replacements InstRep[] = { + { "%INSTALLPATH%", installdir }, + { "%BOOTDRIVE%", bootdrive }, + { "%ANYSTRING%", empty_string }, + { "%WINPATH%", winpath }, + { "%WINJPATH%", winjpath }, + { "%WINTPATH%", wintpath }, + { "%WINHPATH%", winhpath }, + { "%USERPATH%", installdir2 }, + { "%VERSION%", "1.0" }, /* This may be depricated */ + { "%WEB_VER%", sddversion }, + { "%WEB_DATE%", sdddate }, + { "%WEB_LOCATION1%", sddurl[0] }, + { "%WEB_LOCATION2%", sddurl[1] }, + { "%WEB_LOCATION3%", sddurl[2] }, + { "%WEB_LOCATION4%", sddurl[3] }, + { "%PRI%", "SVGA" } +}; +int replacemax = 16; + +/* In str1, str2 gets replaced by str3 */ +char *replacestr(char *str1, char *str2, char *str3) +{ + char bigbuffer[4096]; + int z, x=0, len1 = strlen(str1), len2 = strlen(str2), len3 = strlen(str3); + + for(z=0;z 0 && strncmp(&str1[z], str2, len2)==0) + { + int i; + for(i=0;i (packagesize-(curpos-aceoffset))) + readit = (packagesize-(curpos-aceoffset)); + else + readit = count; + + return fread(buf, 1, readit, self); +} + +off_t acelseek(off_t offset, int whence) +{ + switch(whence) + { + case SEEK_SET: + fseek(self, aceoffset+offset, SEEK_SET); + break; + case SEEK_CUR: + fseek(self, offset, SEEK_CUR); + break; + } + acepos = ftell(self); + return acepos-aceoffset; +} + +int aceopen(const char *path, int flags) +{ + fseek(self, aceoffset, SEEK_SET); + return 1; +} + +int aceclose(int fd) +{ + fseek(self, aceoffset, SEEK_SET); + return 0; +} + +int acesize(void) +{ + return packagesize; +} + +int acetell(int fd) +{ + return ftell(self)-aceoffset; +} + +/* + * Read the generated log file and remove any files installed. + */ +void delete_files(void) +{ + char tmpbuf[8196], *fileptr; + FILE *tmplf; + int linenum=0, found=-1, z; + + files_deleted=1; + + if((tmplf=fopen(instlog, "rb"))==NULL) + return; + + while(!feof(tmplf)) + { + fgets(tmpbuf, 8196, tmplf); + linenum++; + if(tmpbuf[0]=='[' && (char *)strstr(tmpbuf, INSTALLER_APPLICATION) != NULL && !feof(tmplf)) + { + fgets(tmpbuf, 8196, tmplf); + linenum++; + if((char *)strstr(tmpbuf, "") != NULL && (char *)strstr(tmpbuf, INSTALLER_VERSION) != NULL) + found=linenum; + } + } + if(found != -1) + { + rewind(tmplf); + for (z=0;z") != NULL) + { + fileptr = (char *)strchr(tmpbuf, ',')+1; + /* Remove trailing CRLFs */ + if(fileptr[strlen(fileptr)-1] == '\r' || fileptr[strlen(fileptr)-1] == '\n') + fileptr[strlen(fileptr)-1]=0; + if(fileptr[strlen(fileptr)-1] == '\r' || fileptr[strlen(fileptr)-1] == '\n') + fileptr[strlen(fileptr)-1]=0; + remove(fileptr); + current_file--; +#if 0 + sendmessage(0, 1); +#endif + } + if((char *)strstr(tmpbuf, "") != NULL) + { + fclose(tmplf); + return; + } + } + } + fclose(tmplf); + return; +} + +/* + * Reads a config file into memory for editing with updatesys, updateset, etc. + */ +int readconfigfile(char *filename) +{ + char tmpbuf[8196]; + FILE *tmpcs; + + /* Reset this value when restarting */ + configfilecount = -1; + + if((tmpcs=fopen(filename, "rb"))==NULL) + { + strcpy(currentcf, empty_string); + return 1; + } + else + strcpy(currentcf, filename); + + while(!feof(tmpcs)) + { + configfilecount++; + fgets(tmpbuf, 8196, tmpcs); + configsys[configfilecount] = malloc(strlen(tmpbuf)+1); + strcpy(configsys[configfilecount], tmpbuf); + stripcrlf(configsys[configfilecount]); + } + + fclose(tmpcs); + return 0; +} + +/* + * Write the updated config file to disk and backup the original. + */ +int writeconfigfile(char *filename, char *backup) +{ + FILE *tmpcs; + int i; + + if(backup) + { + remove(backup); + rename(filename, backup); + } + else + remove(filename); + + if((tmpcs=fopen(filename, "wb"))==NULL) + return 1; + + for(i=0;i,%s,%s\r\n", currentcf, configsys[i]); +#endif + free(configsys[i]); + configsys[i] = malloc(strlen(setname)+strlen(nv)+6); + strcpy(configsys[i], "SET "); + strcat(configsys[i], setname); + strcat(configsys[i], "="); + strcat(configsys[i], nv); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s\r\n", currentcf, configsys[i]); +#endif + free(cmpbuf1);free(cmpbuf2);free(tmpptr); + } + return; + } + free(cmpbuf2); + } + free(tmpptr); + } + } + /* Couldn't find the line so we'll add it */ + configsys[configfilecount]=malloc(strlen(cmpbuf1)+strlen(nv)+6); + strcpy(configsys[configfilecount], "SET "); + strcat(configsys[configfilecount], setname); + strcat(configsys[configfilecount], "="); + strcat(configsys[configfilecount], nv); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s\r\n", currentcf, configsys[configfilecount]); +#endif + configfilecount++; + free(cmpbuf1); +} + +/* + * Adds an entry to a system variable (CONFIG.SYS) + */ +void updatesys(char *sysname, char *newvalue) +{ + char *cmpbuf1, *cmpbuf2, *tmpptr, *tmpptr2, *capbuf1, *capbuf2, *nv, *brian; + int i, z, t; + + nv=replaceem(newvalue); + + cmpbuf1=malloc(strlen(sysname)+2); + strcpy(cmpbuf1, sysname); + strcat(cmpbuf1, "="); + for(i=0;i,%s,%s\r\n", currentcf, configsys[i]); +#endif + brian = configsys[i]; + configsys[i] = malloc(strlen(configsys[i])+strlen(nv)+4); + strcpy(configsys[i], brian); + free(brian); + /* Remove any trailing CRLFs */ + if(configsys[i][strlen(configsys[i])-1]!=';') + strcat(configsys[i], ";"); + strcat(configsys[i], nv); + strcat(configsys[i], ";"); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s\r\n", currentcf, configsys[i]); +#endif + } + free(cmpbuf1);free(cmpbuf2);free(capbuf1);free(capbuf2); + return; + } + free(cmpbuf2); + } + } + /* Couldn't find the line so we'll add it */ + configsys[configfilecount]=malloc(strlen(cmpbuf1)+strlen(nv)+3); + strcpy(configsys[configfilecount], cmpbuf1); + strcat(configsys[configfilecount], nv); + strcat(configsys[configfilecount], ";"); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s", currentcf, configsys[configfilecount]); +#endif + configfilecount++; + free(cmpbuf1); + if(nv) + free(nv); +} + +/* + * Removes a line from a config file. + */ +void removeline(char *text) +{ + int z; + for(z=0;z,%s,%s\r\n", currentcf, configsys[z]); +#endif + free(configsys[z]); + for(t=z;t<(configfilecount-1);t++) + configsys[t] = configsys[t+1]; + configfilecount--; + } + } +} + + +/* + * The Window peocedure for the confirmation dialog. + */ +#if 0 +MRESULT EXPENTRY ConfirmDlgProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2) +{ + SWP winpos; + + switch (msg) + { + case WM_INITDLG: + WinSetWindowText(hWnd, INSTALLER_TITLE); + WinEnableWindow(WinWindowFromID(mainhwnd, I_Cancel), FALSE); + WinSetDlgItemText(hWnd, I_Confirm, confirmstring); + WinQueryWindowPos(mainhwnd, &winpos); + WinSetWindowPos(hWnd, HWND_TOP, winpos.x+30, winpos.y+30, 0, 0, SWP_MOVE | SWP_ZORDER); + break; + case WM_COMMAND: + WinEnableWindow(WinWindowFromID(mainhwnd, I_Cancel), TRUE); + switch ( SHORT1FROMMP(mp1) ) + { + case I_Ja: + WinDismissDlg(hWnd, 0); + break; + case I_Alle: + WinDismissDlg(hWnd, 1); + break; + case I_Nein: + WinDismissDlg(hWnd, 2); + break; + case I_Halt: + success=2; + installstate=ABORTED; + WinDismissDlg(hWnd, 3); + break; + } + break; + default : + return(WinDefDlgProc(hWnd, msg, mp1, mp2)); + } + return(0L); +} +#endif +/* + * Display a confirmation dialog with the options: YES NO ALL CANCEL + * Returns: 0 for YES, 1 for ALL, 2 for NO and 3 for CANCEL + */ +int confirm(char *format, ...) { + va_list args; + + /* if no confirmation, return 1, meaning overwrite all */ + if (stricmp(INSTALLER_CONFIRM_OVERWRITE, "no") == 0) + return 1; + + va_start(args, format); + vsprintf(confirmstring, format, args); + va_end(args); + + /* Do something here in wxwindows */ + return 1; +} + +/* + * A function to grab a file from an embedded archive and extract it to the TEMP directory. + */ +void grabfile(char *filename) +{ + no_update = 1; + settempdir(); + remove(filename); + aceseek_entry(0); + resetglobals(); + installer_unpack(filename, 2); + no_update = 0; +} + +/* + * This thread runs along side the main thread allowing the user to cancel the process. + */ +void install_thread(void *param) +{ + char tmpinstallpath[1024]; + int k, j, installcount=0, installed=0; + + if(INSTALLER_PACKAGE_COUNT == 2) + packagesselected[1] = TRUE; + + installstate = INSTALLING; + +#ifdef ENABLE_LOGGING + if((logfile=fopen(instlog, "ab"))==NULL) + { + error("Log file \"%s\" open failed! Installation aborted!", instlog); + exit(1); + } + + fprintf(logfile, "[%s]\r\n,%s\r\n\r\n", INSTALLER_APPLICATION, INSTALLER_VERSION); +#endif + + /* Create nested subdirectories if necessary. */ + strcpy(tmpinstallpath, installdir); + for(k=3;k,%s\r\n", tmpinstallpath); +#else + ; +#endif + tmpinstallpath[k] = '\\'; + } + } + +#if defined(__EMX__) || defined(__CYGWIN__) || defined(UNIX) + if (!mkdir(installdir, 0)) +#else + if (!mkdir(installdir)) +#endif +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s\r\n", installdir); +#else + ; +#endif + + /*if(strlen(installdir) > 0 && installdir[0] > 'a'-1 && installdir[0] < 'z'+1) + installdir[0]=installdir[0] - ('a'-'A'); + if(strlen(installdir)>2 && installdir[1]==':' && installdir[2]=='\\') + DosSetDefaultDisk((int)(installdir[0]-'A'+1));*/ + + setdrivedir(installdir); + + /* Unpack files to destination directory */ + for(j=1;j0) + { + char *tmpptr = &temp[0]; + int len; + + strcpy(temp, INSTALLER_SYSLINE); + temp[4999] = 0; + len = strlen(temp); + + for(z=0;z,%s,%s\r\n", currentcf, tmpptr2); +#endif + configfilecount++; + } + } + if(tmpptr && *tmpptr) + { + char *tmpptr2; + + tmpptr2 = replaceem(tmpptr); + removeline(tmpptr2); + configsys[configfilecount] = tmpptr2; +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s\r\n", currentcf, tmpptr2); +#endif + configfilecount++; + } + + } + /* Update SET variables */ + if(strlen(INSTALLER_SETS)>0) + { + strcpy(temp, INSTALLER_SETS); + argn=0; + arg1=&temp[0]; + arg2=arg3=NULL; + for(z=0;z0) + { + strcpy(temp, INSTALLER_SYSVAR); + argn=0; + arg1=&temp[0]; + arg2=NULL; + for(z=0;z +#include +#include +#include +#include +#include +#if defined(__OS2__) || defined(__EMX__) || defined(WIN32) || defined(WINNT) +#include +#endif +#include +#ifdef WIN32 +#include +#endif +#include "install.h" +#include "instsup.h" + +extern char *INSTALLER_TITLE; +extern char *INSTALLER_PROGRAM; +extern char *INSTALLER_FOLDER; +extern char *INSTALLER_SHADOW; +extern char *INSTALLER_OBJECT; +extern char tempPath[], installdir[], csfile[], bufile[], bootdrive[], instlog[], installdir2[]; +extern int installstate, success; + +extern FILE *self; + +#ifdef __cplusplus +extern "C" { +#endif + +char *replaceem(char *orig); + +int sendmessage(int destination, int messid) +{ +#if 0 + /* Update percentage bar */ + if(messid == 1) + { + wxMutexGuiEnter(); + + updatepercent(); + + wxMutexGuiLeave(); + } + if(messid == 2) + { + extern wxCondition *InstCond; + + InstCond->Broadcast(); + } + +#endif + return 0; +} + +void DoGUI(void) +{ + updatepercent(); + wxYield(); +} +/* This should return the current color depth */ +unsigned long color_depth(void) +{ +#if __OS2__ + HDC hdc = WinOpenWindowDC(HWND_DESKTOP); + LONG colors; + + DevQueryCaps(hdc, CAPS_COLORS, 1, &colors); + DevCloseDC(hdc); + return colors; +#endif + return 0; +} + +/* + * Call the reboot vector. + */ +void sysreboot(void) +{ +#if __OS2__ +#define SYSFUNC 0xD5 +#define REBOOT 0xAB +#define REBOOTDEV "\\DEV\\DOS$" + + APIRET rc; + HFILE hREBOOT; + ULONG ulAction; + + rc = DosOpen(REBOOTDEV, + &hREBOOT, + &ulAction, + 0L, + FILE_NORMAL, + FILE_OPEN, + OPEN_SHARE_DENYNONE | OPEN_ACCESS_READWRITE, + 0L); + if (rc == 0) + { + DosDevIOCtl(hREBOOT, + SYSFUNC, + REBOOT, + NULL, + 0L, + NULL, + NULL, + 0L, + NULL); + DosClose(hREBOOT); + } +#endif +} + +/* + * Display an informational dialog box to the user with the given text. + */ +int mesg(char *format, ...) { + va_list args; + char outbuf[4096]; + + va_start(args, format); + vsprintf(outbuf, format, args); + va_end(args); + + wxMessageBox(outbuf, INSTALLER_TITLE, + wxOK | wxICON_EXCLAMATION, NULL); + + return strlen(outbuf); +} + +int checktext(char *text, char *buffer, int buflen) +{ + int z, len = strlen(text); + + for(z=0;z<(buflen-len);z++) + { + if(memcmp(text, &buffer[z], len) == 0) + return z; + } + return -1; + +} + +/* + * Returns the offset withing the executable to the specified text. + */ +long findtext(char *text) +{ + char buffer[512]; + int offset; + unsigned long curpos = 0; + + fseek(self, 0, SEEK_SET); + fread(buffer, 1, 512, self); + if((offset = checktext(text, buffer, 512)) > -1) + return offset; + while(!feof(self)) + { + memcpy(buffer, &buffer[256], 256); + fread(&buffer[256], 1, 256, self); + curpos += 256; + if((offset = checktext(text, buffer, 512)) > -1) + return offset+curpos; + + } + return -1; +} + +/* We encode archive search text so we don't get confused + * by the string table - I was using LXLite to take care + * of this problem on OS/2 but in portable code this may + * not be an option. */ +char *decode(char *input) +{ + char *result; + int i = 0; + + result = (char *)malloc(strlen(input) / 2 + 1); + + while (input[0] && input[1]) + { + result[i] = ((input[0] - 0x41) << 4) | (input[1] - 0x41); + input += 2; + i++; + } + result[i] = '\0'; + + return result; +} + +/* + * Removes any carriage returns or line feeds from the buffer. + */ +void stripcrlf(char *buffer) +{ + int z, len = strlen(buffer); + + for(z=0;z 3 && tempPath[len-1] == '\\') + tempPath[len-1] = 0; + strupr(tempPath); + setdrivedir(tempPath); +#else + /* Unix */ + setdrivedir("/tmp"); +#endif +} + +void getbootdrive(void) +{ + /* On windows I don't think you can boot from anything + except C: drive. So I am not going to do anything here. */ +} + +void PM_backslash(char *s) +{ + unsigned int pos = strlen(s); + if (s[pos-1] != '\\') { + s[pos] = '\\'; + s[pos+1] = '\0'; + } +} + +/* + * Makes a folder on the desktop. + */ +void MakeFolder(char Title[], char Icon[], char dest[], char id[], char setup[]) +{ +#ifdef __OS2__ + char szArg[200]; + + memset(szArg,0,sizeof(szArg)); + + if ((Icon != NULL) && (strlen(Icon) != 0)) + { + strcat(szArg,"ICONFILE="); + strcat(szArg,Icon); + } + + if ((id != NULL) && (strlen(id) != 0)) + { + strcat(szArg,";OBJECTID="); + strcat(szArg,id); + } + + if ((setup != NULL) && (strlen(setup) != 0)) + { + strcat(szArg,";"); + strcat(szArg,setup); + } + + WinCreateObject("WPFolder",Title,szArg,dest,CO_REPLACEIFEXISTS); +#elif defined(WIN32) + char startpath[MAX_PATH]; + LPITEMIDLIST pidl; + + if(!SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &pidl)) + { + SHGetPathFromIDList(pidl, startpath); + + if(startpath[strlen(startpath)-1] != '\\') + strcat(startpath, "\\"); + strcat(startpath, Title); + CreateDirectory(startpath, NULL); + } +#else + /* Unix? */ +#endif +} + +#ifdef WIN32 +HRESULT CreateLink(LPCSTR lpszPathObj, + LPSTR lpszPathLink, LPSTR lpszDesc) +{ + HRESULT hres; + IShellLink* psl; + + // Get a pointer to the IShellLink interface. + hres = CoCreateInstance(CLSID_ShellLink, NULL, + CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl); + if (SUCCEEDED(hres)) { + IPersistFile* ppf; + + // Set the path to the shortcut target, and add the + // description. + psl->SetPath(lpszPathObj); + + psl->SetDescription(lpszDesc); + + // Query IShellLink for the IPersistFile interface for saving the + // shortcut in persistent storage. + hres = psl->QueryInterface(IID_IPersistFile, + (void **)&ppf); + + if (SUCCEEDED(hres)) { + WCHAR wsz[MAX_PATH]; + + // Ensure that the string is ANSI. + MultiByteToWideChar(CP_ACP, 0, lpszPathLink, -1, + wsz, MAX_PATH); + + + // Save the link by calling IPersistFile::Save. + hres = ppf->Save(wsz, TRUE); + ppf->Release(); + } + psl->Release(); + } + return hres; +} +#endif + +/* + * Makes a Program object on the desktop. + */ +void MakeProgram(char Title[], char Program[], char Icon[], char dest[], char id[], char setup[]) +{ +#ifdef __OS2__ + char szArg[200]; + + memset(szArg,0,sizeof(szArg)); + + strcat(szArg,"EXENAME="); + strcat(szArg,Program); + + if ((Icon != NULL) && (strlen(Icon) != 0)) + { + strcat(szArg,";ICONFILE="); + strcat(szArg,Icon); + } + + if ((id != NULL) && (strlen(id) != 0)) + { + strcat(szArg,";OBJECTID="); + strcat(szArg,id); + } + + if ((setup != NULL) && (strlen(setup) != 0)) + { + strcat(szArg,";"); + strcat(szArg,setup); + } + + WinCreateObject("WPProgram",Title,szArg,dest,CO_REPLACEIFEXISTS); +#elif defined(WIN32) + char startpath[MAX_PATH]; + LPITEMIDLIST pidl; + + if(!SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &pidl)) + { + SHGetPathFromIDList(pidl, startpath); + + if(startpath[strlen(startpath)-1] != '\\') + strcat(startpath, "\\"); + strcat(startpath, dest); + strcat(startpath, "\\"); + strcat(startpath, Title); + strcat(startpath, ".lnk"); + + CoInitialize(NULL); + CreateLink(Program, startpath, Title); + CoUninitialize(); + } + + +#else + /* Unix? */ +#endif +} +/* + * Makes a user defined object on the desktop. + */ +void MakeObject(char Title[], char oclass[], char dest[], char id[], char setup[]) +{ +#ifdef __OS2__ + char szArg[200]; + + memset(szArg,0,sizeof(szArg)); + + if ((oclass == NULL) || (strlen(oclass) == 0)) + return; + + if ((id != NULL) && (strlen(id) != 0)) + { + strcat(szArg,"OBJECTID="); + strcat(szArg,id); + } + + if ((setup != NULL) && (strlen(setup) != 0)) + { + if ((id != NULL) && (strlen(id) != 0)) + strcat(szArg,";"); + strcat(szArg,setup); + } + + WinCreateObject(oclass,Title,szArg,dest,CO_REPLACEIFEXISTS); +#elif defined(WIN32) + /* Not sure if there is an equivilent on Windows */ +#else + /* Unix? */ +#endif +} +/* + * Makes a shadow on the desktop. + */ +void MakeShadow(char Title[], char reference[], char dest[], char id[]) +{ +#ifdef __OS2__ + char szArg[400]; + + memset(szArg,0,sizeof(szArg)); + + strcpy(szArg,"SHADOWID="); + strcat(szArg,reference); + if ((id != NULL) && (strlen(id) != 0)) + { + strcat(szArg,";OBJECTID="); + strcat(szArg,id); + } + strcat(szArg,";"); + WinCreateObject("WPShadow",Title,szArg,dest,CO_REPLACEIFEXISTS); +#elif defined(WIN32) + /* Nothing like this on Windows9x anyway */ +#else + /* Unix? */ +#endif +} + +/* This creates program objects on the desktop, it was originally designed + * for the OS/2 Workplace Shell so it may be somewhat different in use on + * other platforms. + */ +void create_wps_objects(void) +{ + char *arg1, *arg2, *arg3, *arg4, *arg5, *arg6; + char temp[5000]; + char zerotext[2] = ""; + int z, argn, len; + + /* No distinction for the moment... this may change.. */ + strcpy(installdir2, installdir); + + /* Create Folder Objects */ + if(strlen(INSTALLER_FOLDER)>0) + { + strcpy(temp, replaceem(INSTALLER_FOLDER)); + argn=0; + arg1=&temp[0]; + arg2=arg3=arg4=arg5=&zerotext[0]; + len = strlen(temp); + for(z=0;z,%s,%s,%s,%s,%s\r\n", arg1, arg2,arg3,arg4,arg5); +#endif + arg1=&temp[z+1]; + arg2=arg3=arg4=arg5=&zerotext[0]; + break; + } + } + } + MakeFolder(arg1, arg2, arg3, arg4, arg5); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s,%s,%s,%s\r\n", arg1, arg2,arg3,arg4,arg5); +#endif + } + + /* Create Program Objects */ + if(strlen(INSTALLER_PROGRAM)>0) + { + strcpy(temp, replaceem(INSTALLER_PROGRAM)); + argn=0; + arg1=&temp[0]; + arg2=arg3=arg4=arg5=arg6=&zerotext[0]; + len = strlen(temp); + for(z=0;z,%s,%s,%s,%s,%s,%s\r\n", arg1,arg2,arg3,arg4,arg5,arg6); +#endif + arg1=&temp[z+1]; + arg2=arg3=arg4=arg5=arg6=&zerotext[0]; + break; + } + } + } + MakeProgram(arg1, arg2, arg3, arg4, arg5, arg6); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s,%s,%s,%s,%s\r\n", arg1, arg2,arg3,arg4,arg5,arg6); +#endif + } + + /* Create Shadow Objects */ + if(strlen(INSTALLER_SHADOW)>0) + { + strcpy(temp, replaceem(INSTALLER_SHADOW)); + argn=0; + arg1=&temp[0]; + arg2=arg3=arg4=&zerotext[0]; + len = strlen(temp); + for(z=0;z,%s,%s,%s,%s\r\n", arg1,arg2,arg3,arg4); +#endif + arg1=&temp[z+1]; + arg2=arg3=arg4=&zerotext[0]; + break; + } + } + } + MakeShadow(arg1, arg2, arg3, arg4); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s,%s,%s\r\n", arg1,arg2,arg3,arg4); +#endif + } + + /* Create Generic Objects */ + if(strlen(INSTALLER_OBJECT)>0) + { + strcpy(temp, replaceem(INSTALLER_OBJECT)); + argn=0; + arg1=&temp[0]; + arg2=arg3=arg4=arg5=&zerotext[0]; + len = strlen(temp); + for(z=0;z,%s,%s,%s,%s,%s\r\n", arg1,arg2,arg3,arg4,arg5); +#endif + arg1=&temp[z+1]; + arg2=arg3=arg4=arg5=&zerotext[0]; + break; + } + } + } + MakeObject(arg1, arg2, arg3, arg4, arg5); +#ifdef ENABLE_LOGGING + fprintf(logfile, ",%s,%s,%s,%s,%s\r\n", arg1, arg2,arg3,arg4,arg5); +#endif + } +} + + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/utils/Install/instsup.h b/utils/Install/instsup.h new file mode 100644 index 0000000000..b2e1c1d27d --- /dev/null +++ b/utils/Install/instsup.h @@ -0,0 +1,26 @@ +#ifdef __cplusplus +extern "C" { +#endif +void create_wps_objects(void); +unsigned long color_depth(void); +void sysreboot(void); +int mesg(char *format, ...); +int checktext(char *text, char *buffer, int buflen); +long findtext(char *text); +char *decode(char *input); +void viewfile(char *filename); +void stripcrlf(char *buffer); +unsigned long drivefree(int drive); +void error(char *format, ...); +void setdrivedir(char *drivedir); +void settempdir(void); +void getbootdrive(void); +int cmdrun(char *progname); +void PM_backslash(char *s); +int sendmessage(int destination, int messid); +void DoGUI(void); +#ifdef __cplusplus +} +#endif +int parse_ini(char *filename); +void updatepercent(void); \ No newline at end of file diff --git a/utils/Install/packace/globals.c b/utils/Install/packace/globals.c new file mode 100644 index 0000000000..b28c4f22c0 --- /dev/null +++ b/utils/Install/packace/globals.c @@ -0,0 +1,134 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Global variable declarations */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#include "acestruc.h" +#include "unace.h" + +#include +#include + +//-------- Ace sign +const char *acesign = "**ACE**"; + +//-------- Version string for program +const char *version="UNACE v1.1 public version\n"; + +#ifdef AMIGA +//-------- Version string for VERSION program +static char *_version="$VER: Unace Amiga 1.1 "__AMIGADATE__"\n\n"; +#endif + +//-------- header buffer and pointers +thead head; + +tmhead *t_mhead = (tmhead *) & head; +tfhead *t_fhead = (tfhead *) & head; + +//-------- buffers +ULONG *buf_rd =0; +CHAR *buf =0; +CHAR *buf_wr =0; +UCHAR *readbuf =0; + +//-------- decompressor variables +SHORT rpos =0, + dcpr_do =0, + dcpr_do_max =0, + blocksize =0, + dcpr_dic =0, + dcpr_oldnum =0, + bits_rd =0, + dcpr_frst_file =0; +USHORT dcpr_code_mn[1 << maxwd_mn], + dcpr_code_lg[1 << maxwd_lg]; +UCHAR dcpr_wd_mn[maxcode + 2], + dcpr_wd_lg[maxcode + 2], + wd_svwd[svwd_cnt]; +ULONG dcpr_dpos =0, + cpr_dpos2 =0, + dcpr_dicsiz =0, + dcpr_dican =0, + dcpr_size =0, + dcpr_olddist[4]={0,0,0,0}, + code_rd =0; + +CHAR *dcpr_text =0; + +//-------- quicksort +USHORT sort_org[maxcode + 2]; +UCHAR sort_freq[(maxcode + 2) * 2]; + +//-------- file handling +CHAR aname[PATH_MAX]; +INT archan, + wrhan; +#if !defined(__EMX__) && !defined(__OS2__) +FILE *farchan = NULL; +#endif +LONG skipsize=0; + +//-------- structures for archive handling +struct tadat adat; + +//-------- flags +INT f_err =0, + f_ovrall =0, + f_allvol_pr=0, + f_curpas =0, + f_criterr =0; + + +void resetglobals(void) +{ + t_mhead = (tmhead *) & head; + t_fhead = (tfhead *) & head; + + buf_rd =0; + buf =0; + buf_wr =0; + readbuf =0; + + rpos =0; + dcpr_do =0; + dcpr_do_max =0; + blocksize =0; + dcpr_dic =0; + dcpr_oldnum =0; + bits_rd =0; + dcpr_frst_file =0; + + memset(&dcpr_code_mn, 0, sizeof(dcpr_code_mn)); + memset(&dcpr_code_lg, 0, sizeof(dcpr_code_lg)); + memset(&dcpr_wd_mn, 0, sizeof(dcpr_wd_mn)); + memset(&dcpr_wd_lg, 0, sizeof(dcpr_wd_lg)); + memset(&wd_svwd, 0, sizeof(wd_svwd)); + dcpr_dpos =0; + cpr_dpos2 =0; + dcpr_dicsiz =0; + dcpr_dican =0; + dcpr_size =0; + + memset(&dcpr_olddist, 0, sizeof(dcpr_olddist)); + + code_rd =0; + dcpr_text =0; + + memset(&sort_org, 0, sizeof(sort_org)); + memset(&sort_freq, 0, sizeof(sort_freq)); + + archan=0; + wrhan=0; + skipsize=0; + + f_err =0; + f_ovrall =0; + f_allvol_pr=0; + f_curpas =0; + f_criterr =0; + +} diff --git a/utils/Install/packace/makefile b/utils/Install/packace/makefile new file mode 100644 index 0000000000..837e7878d0 --- /dev/null +++ b/utils/Install/packace/makefile @@ -0,0 +1,46 @@ +# Installer Makefile + +CC = gcc +RM = rm -f +RC = rc +MAKE = make + +DEFS = +LIBS = + +CFLAGS = -O -g -I../incace -Wall +LDFLAGS = + + +OBJECTS = globals.o packinst.o uac_comm.o uac_crc.o \ + uac_crt.o uac_dcpr.o uac_sys.o unace.o + +SOURCES = globals.c ../packinst/packinst.c uac_comm.c \ + uac_crc.c uac_crt.c uac_dcpr.c uac_sys.c unace.c + +all: packinst + +$(OBJECTS): + $(CC) $(CFLAGS) -c $< + +Include: ../incace/Makefile Makefile +# cd include +# $(MAKE) -f Makefile all + +packinst: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o packinst $(OBJECTS) + +clean: + $(RM) $(OBJECTS) packinst *~ + +globals.o: globals.c ../incace/globals.h ../incace/acestruc.h ../incace/unace.h +packinst.o: ../packinst/packinst.c +uac_comm.o: uac_comm.c ../incace/globals.h ../incace/uac_dcpr.h ../incace/uac_comm.h +uac_crc.o: uac_crc.c ../incace/uac_crc.h +uac_crt.o: uac_crt.c ../incace/os.h ../incace/attribs.h ../incace/globals.h ../incace/uac_crt.h ../incace/uac_sys.h +uac_dcpr.o: uac_dcpr.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +uac_sys.o: uac_sys.c ../incace/os.h ../incace/globals.h ../incace/uac_sys.h +unace.o: unace.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h ../incace/uac_crt.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h + diff --git a/utils/Install/packace/makefile.b32 b/utils/Install/packace/makefile.b32 new file mode 100644 index 0000000000..d2cece68fc --- /dev/null +++ b/utils/Install/packace/makefile.b32 @@ -0,0 +1,41 @@ +# Common settings for Borland 32-bit compilation (makefile.b32 files) + +LINK=ilink32 + +OPT = -O2 +LDFLAGS = -lxncd -l-P +CPPFLAGS = /I"..\incace" /DWIN32 +LINKFLAGS=/aa -L$(BCCDIR)\lib\psdk + +DUMMY=dummy + +SRCSUFF = cpp +OBJSUFF = obj + +TARGET = packinst +OBJECTS = globals.obj uac_comm.obj uac_crc.obj uac_crt.obj uac_dcpr.obj uac_sys.obj unace.obj packinst.obj + +all: $(TARGET).exe + +packinst.exe: $(OBJECTS) + bcc32 $(LDFLAGS) -epackinst.exe @&&| +$(OBJECTS) +| + +.$(SRCSUFF).obj: + bcc32 $(CPPFLAGS) -c {$< } + +packinst.obj: ..\packinst\packinst.c + bcc32 $(CPPFLAGS) -P- -c ..\packinst\packinst.c + +.c.obj: + bcc32 $(CPPFLAGS) -P- -c {$< } + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + -erase *.tds + -erase *.il? diff --git a/utils/Install/packace/makefile.g95 b/utils/Install/packace/makefile.g95 new file mode 100644 index 0000000000..a89a5ddfee --- /dev/null +++ b/utils/Install/packace/makefile.g95 @@ -0,0 +1,46 @@ +# Installer Makefile + +CC = gcc +RM = rm -f +RC = rc +MAKE = make + +DEFS = +LIBS = + +CFLAGS = -mno-cygwin -O -g -I../incace -Wall -DWIN32 +LDFLAGS = -mno-cygwin + + +OBJECTS = globals.o packinst.o uac_comm.o uac_crc.o \ + uac_crt.o uac_dcpr.o uac_sys.o unace.o + +SOURCES = globals.c ../packinst/packinst.c uac_comm.c \ + uac_crc.c uac_crt.c uac_dcpr.c uac_sys.c unace.c + +all: packinst + +$(OBJECTS): + $(CC) $(CFLAGS) -c $< + +Include: ../incace/Makefile Makefile +# cd include +# $(MAKE) -f Makefile all + +packinst: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o packinst $(OBJECTS) + +clean: + $(RM) $(OBJECTS) packinst *~ + +globals.o: globals.c ../incace/globals.h ../incace/acestruc.h ../incace/unace.h +packinst.o: ../packinst/packinst.c +uac_comm.o: uac_comm.c ../incace/globals.h ../incace/uac_dcpr.h ../incace/uac_comm.h +uac_crc.o: uac_crc.c ../incace/uac_crc.h +uac_crt.o: uac_crt.c ../incace/os.h ../incace/attribs.h ../incace/globals.h ../incace/uac_crt.h ../incace/uac_sys.h +uac_dcpr.o: uac_dcpr.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +uac_sys.o: uac_sys.c ../incace/os.h ../incace/globals.h ../incace/uac_sys.h +unace.o: unace.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h ../incace/uac_crt.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h + diff --git a/utils/Install/packace/makefile.gcc b/utils/Install/packace/makefile.gcc new file mode 100644 index 0000000000..837e7878d0 --- /dev/null +++ b/utils/Install/packace/makefile.gcc @@ -0,0 +1,46 @@ +# Installer Makefile + +CC = gcc +RM = rm -f +RC = rc +MAKE = make + +DEFS = +LIBS = + +CFLAGS = -O -g -I../incace -Wall +LDFLAGS = + + +OBJECTS = globals.o packinst.o uac_comm.o uac_crc.o \ + uac_crt.o uac_dcpr.o uac_sys.o unace.o + +SOURCES = globals.c ../packinst/packinst.c uac_comm.c \ + uac_crc.c uac_crt.c uac_dcpr.c uac_sys.c unace.c + +all: packinst + +$(OBJECTS): + $(CC) $(CFLAGS) -c $< + +Include: ../incace/Makefile Makefile +# cd include +# $(MAKE) -f Makefile all + +packinst: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o packinst $(OBJECTS) + +clean: + $(RM) $(OBJECTS) packinst *~ + +globals.o: globals.c ../incace/globals.h ../incace/acestruc.h ../incace/unace.h +packinst.o: ../packinst/packinst.c +uac_comm.o: uac_comm.c ../incace/globals.h ../incace/uac_dcpr.h ../incace/uac_comm.h +uac_crc.o: uac_crc.c ../incace/uac_crc.h +uac_crt.o: uac_crt.c ../incace/os.h ../incace/attribs.h ../incace/globals.h ../incace/uac_crt.h ../incace/uac_sys.h +uac_dcpr.o: uac_dcpr.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +uac_sys.o: uac_sys.c ../incace/os.h ../incace/globals.h ../incace/uac_sys.h +unace.o: unace.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h ../incace/uac_crt.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h + diff --git a/utils/Install/packace/uac_comm.c b/utils/Install/packace/uac_comm.c new file mode 100644 index 0000000000..d050cf4e4c --- /dev/null +++ b/utils/Install/packace/uac_comm.c @@ -0,0 +1,51 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Decompresses and outputs comment if present. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include // printf() + +#include "globals.h" +#include "uac_dcpr.h" +#include "uac_comm.h" + +INT comm_cpr_size=0; +CHAR *comm; + +void comment_out(CHAR *top) // outputs comment if present +{ + INT i; + + if (head.HEAD_FLAGS & ACE_COMM) + { // comment present? + if (head.HEAD_TYPE == MAIN_BLK) + { // get begin and size of comment data + comm = (CHAR *)MCOMM; + comm_cpr_size = MCOMM_SIZE; + } + else + { + comm = (CHAR *)FCOMM; + comm_cpr_size = FCOMM_SIZE; + } // limit comment size if too big + i = sizeof(head) - (INT)(comm - (CHAR*) &head); + if (comm_cpr_size > i) + comm_cpr_size = i; + dcpr_comm(i); // decompress comment + +#ifdef AMIGA + { + char *p=comm; + while (*p) + { + if (*p==0x0D) + *p=0x0A; // Replace ms-dos line termination + p++; + } + } +#endif + + pipeit("%s\n\n%s\n\n", top, comm); // output comment + } +} diff --git a/utils/Install/packace/uac_crc.c b/utils/Install/packace/uac_crc.c new file mode 100644 index 0000000000..3d9335ec72 --- /dev/null +++ b/utils/Install/packace/uac_crc.c @@ -0,0 +1,36 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* CRC-calculation routines. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "uac_crc.h" + + +ULONG crctable[256]; +ULONG rd_crc=0; + + +void make_crctable(void) // initializes CRC table +{ + ULONG r, + i, + j; + + for (i = 0; i <= 255; i++) + { + for (r = i, j = 8; j; j--) + r = (r & 1) ? (r >> 1) ^ CRCPOLY : (r >> 1); + crctable[i] = r; + } +} + +// Updates crc from addr till addr+len-1 +// +ULONG getcrc(ULONG crc, UCHAR * addr, INT len) +{ + while (len--) + crc = crctable[(unsigned char) crc ^ (*addr++)] ^ (crc >> 8); + return (crc); +} + diff --git a/utils/Install/packace/uac_crt.c b/utils/Install/packace/uac_crt.c new file mode 100644 index 0000000000..9e20fcd162 --- /dev/null +++ b/utils/Install/packace/uac_crt.c @@ -0,0 +1,149 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Creates/Replaces files or directories. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#include +#include // AMIGA: open() +#include // pipeit() remove() +#include // strncpy() +#include +#include // struct stat +#include + + +#if defined(DOS) || defined(WINNT) || defined(WIN16) + #include // access() +#endif +#if defined(__IBMC__) + #include +#endif + +#define DIRSEP '\\' + +#include "attribs.h" +#include "globals.h" +#include "uac_crt.h" +#include "uac_sys.h" + +/* gets file name from header + */ +CHAR *ace_fname(CHAR * s, thead * head, INT nopath) +{ + INT i; + char *cp; + + strncpy(s, (CHAR *)(*(tfhead *) head).FNAME, i = (*(tfhead *) head).FNAME_SIZE); + s[i] = 0; + + if (nopath) + { + cp=strrchr(s, '\\'); + if (cp) + memmove(s, cp+1, strlen(cp)); + } + + return s; +} + +void check_ext_dir(CHAR * f) // checks/creates path of file +{ + CHAR *cp, + d[PATH_MAX]; + INT i; + + d[0] = 0; + + for (;;) + { + if ((cp = (CHAR *) strchr(&f[strlen(d) + 1], DIRSEP))!=NULL) + { + i = cp - f; + strncpy(d, f, i); + d[i] = 0; + } + else + return; + + if (!fileexists(d)) +#if (defined(__OS2__) && !defined(__EMX__)) || (defined(WINNT) && !defined(__CYGWIN__)) + if (mkdir(d)) +#else + if (mkdir(d, 0)) +#endif + { + f_err = ERR_WRITE; + pipeit("\n Error while creating directory.\n"); + } + } +} + +INT ovr_delete(CHAR * n) // deletes directory or file +{ + if (remove(n) && rmdir(n)) + { + pipeit("\n Could not delete file or directory. Access denied.\n"); + return (1); + } + return (0); +} + +INT create_dest_file(CHAR * file, INT a) // creates file or directory +{ + INT han, + i = 0, + ex = fileexists(file); + struct stat st; + + check_ext_dir(file); + if (f_err) + return (-1); + if (a & _A_SUBDIR) + { // create dir or file? + if (ex) + stat(file, &st); +#if (defined(__OS2__) && !defined(__EMX__)) || (!defined(__CYGWIN__) && defined(WINNT)) + if ((!ex && mkdir(file)) || (ex && (st.st_mode & S_IFDIR))) +#else + if ((!ex && mkdir(file, 0)) || (ex && (st.st_mode & S_IFDIR))) +#endif + { + pipeit("\n Could not create directory.\n"); + return (-1); + } +#ifdef DOS + _dos_setfileattr(file, a); // set directory attributes +#endif + return (-1); + } + else + { + if (ex) + { // does the file already exist + if (!f_ovrall) + { + i = wrask("Overwrite existing file?"); // prompt for overwrite + f_ovrall = (i == 1); + if (i == 3) + f_err = ERR_USER; + } + if ((i && !f_ovrall) || ovr_delete(file)) + return (-1); // delete? + } +#if defined(__OS2_) || defined(__EMX__) || defined(WIN32) + if ((han = open(file, O_WRONLY | O_TRUNC | O_CREAT | O_BINARY, + S_IREAD | S_IWRITE | S_IEXEC | S_IDELETE | + S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH )) < 0) +#else + if ((han = open(file, O_WRONLY | O_TRUNC | O_CREAT, + S_IREAD | S_IWRITE | S_IEXEC | S_IDELETE | + S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH )) < 0) +#endif + pipeit("\n Could not create destination file.\n"); + return (han); + } +} + diff --git a/utils/Install/packace/uac_dcpr.c b/utils/Install/packace/uac_dcpr.c new file mode 100644 index 0000000000..9f1a29b9b3 --- /dev/null +++ b/utils/Install/packace/uac_dcpr.c @@ -0,0 +1,553 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* These are the decompression algorithms. */ +/* Don't change here anything (apart from memory allocation perhaps). */ +/* Any changes will very likely cause bugs! */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#if defined(AMIGA) + #include // mem*() +#endif +#if defined(DOS) || defined(WIN16) || defined(WINNT) || defined(OS2) || defined(UNIX) +#if !defined(__CYGWIN__) + #include // mem*() +#endif +#endif + +#include // pipeit() +#include // malloc() +#include + +#include "globals.h" +#include "portable.h" +#include "uac_comm.h" +#include "uac_crc.h" +#include "uac_dcpr.h" +#include "uac_sys.h" +#ifdef CRYPT + #include "unace_ps.h" +#endif /* CRYPT */ + + +//------------------------------ QUICKSORT ---------------------------------// +#define xchg_def(v1,v2) {INT dummy;\ + dummy=v1; \ + v1=v2; \ + v2=dummy;} + +void sortrange(INT left, INT right) +{ + INT zl = left, + zr = right, + hyphen; + + hyphen = sort_freq[right]; + + //divides by hyphen the given range into 2 parts + do + { + while (sort_freq[zl] > hyphen) + zl++; + while (sort_freq[zr] < hyphen) + zr--; + //found a too small (left side) and + //a too big (right side) element-->exchange them + if (zl <= zr) + { + xchg_def(sort_freq[zl], sort_freq[zr]); + xchg_def(sort_org[zl], sort_org[zr]); + zl++; + zr--; + } + } + while (zl < zr); + + //sort partial ranges - when very small, sort directly + if (left < zr) + { + if (left < zr - 1) + sortrange(left, zr); + else if (sort_freq[left] < sort_freq[zr]) + { + xchg_def(sort_freq[left], sort_freq[zr]); + xchg_def(sort_org[left], sort_org[zr]); + } + } + + if (right > zl) + { + if (zl < right - 1) + sortrange(zl, right); + else if (sort_freq[zl] < sort_freq[right]) + { + xchg_def(sort_freq[zl], sort_freq[right]); + xchg_def(sort_org[zl], sort_org[right]); + } + } +} + +void quicksort(INT n) +{ + INT i; + + for (i = n + 1; i--;) + sort_org[i] = i; + sortrange(0, n); +} + +//------------------------------ read bits ---------------------------------// +void readdat(void) +{ + UINT i; + + i = (size_rdb - 2) << 2; + rpos -= size_rdb - 2; + buf_rd[0] = buf_rd[size_rdb - 2]; + buf_rd[1] = buf_rd[size_rdb - 1]; + read_adds_blk((CHAR *) & buf_rd[2], i); +#ifdef HI_LO_BYTE_ORDER + { + ULONG *p; + i>>=2; // count LONGs not BYTEs + p=&buf_rd[2]; + while (i--) + { + LONGswap(p); + p++; + } + } +#endif +} + +#define addbits(bits) \ +{ \ + rpos+=(bits_rd+=bits)>>5; \ + bits_rd&=31; \ + if (rpos==(size_rdb-2)) readdat(); \ + code_rd=(buf_rd[rpos] << bits_rd) \ + +((buf_rd[rpos+1] >> (32-bits_rd))&(!bits_rd-1)); \ + } + + +//---------------------- COMMENT DECOMPRESSION -----------------------------// + +#define comm_cpr_hf(a,b) (a+b) + +void dcpr_comm_init(void) +{ + INT i; + + i = comm_cpr_size > size_rdb * sizeof(LONG) ? size_rdb * sizeof(LONG) : comm_cpr_size; + if (!f_err) + memcpy(buf_rd, comm, i); +#ifdef HI_LO_BYTE_ORDER + { + ULONG *p; + i>>=2; // count LONGs not BYTEs + p=buf_rd; + while (i--) + { + LONGswap(p); + p++; + } + } +#endif + code_rd = buf_rd[0]; + rpos = bits_rd = 0; +} + +void dcpr_comm(INT comm_size) +{ + SHORT hash[comm_cpr_hf(255, 255) + 1]; + INT dpos = 0, + c, + pos = 0, + len, + hs; + + memset(&hash, 0, sizeof(hash)); + if (comm_cpr_size) + { + dcpr_comm_init(); + len = code_rd >> (32 - 15); + addbits(15); + if (len >= comm_size) + len = comm_size - 1; + if (read_wd(maxwd_mn, dcpr_code_mn, dcpr_wd_mn, max_cd_mn)) + do + { + if (dpos > 1) + { + pos = hash[hs = comm_cpr_hf(comm[dpos - 1], comm[dpos - 2])]; + hash[hs] = dpos; + } + addbits(dcpr_wd_mn[(c = dcpr_code_mn[code_rd >> (32 - maxwd_mn)])]); + if (rpos == size_rdb - 3) + rpos = 0; + if (c > 255) + { + c -= 256; + c += 2; + while (c--) + comm[dpos++] = comm[pos++]; + } + else + { + comm[dpos++] = c; + } + } + while (dpos < len); + comm[len] = 0; + } +} + +//------------------------- LZW1 DECOMPRESSION -----------------------------// +void wrchar(CHAR ch) +{ + dcpr_do++; + + dcpr_text[dcpr_dpos] = ch; + dcpr_dpos++; + dcpr_dpos &= dcpr_dican; +} + +void copystr(LONG d, INT l) +{ + INT mpos; + + dcpr_do += l; + + mpos = dcpr_dpos - d; + mpos &= dcpr_dican; + + if ((mpos >= dcpr_dicsiz - maxlength) || (dcpr_dpos >= dcpr_dicsiz - maxlength)) + { + while (l--) + { + dcpr_text[dcpr_dpos] = dcpr_text[mpos]; + dcpr_dpos++; + dcpr_dpos &= dcpr_dican; + mpos++; + mpos &= dcpr_dican; + } + } + else + { + while (l--) + dcpr_text[dcpr_dpos++] = dcpr_text[mpos++]; + dcpr_dpos &= dcpr_dican; + } +} + +void decompress(void) +{ + INT c, + lg, + i, + k; + ULONG dist; + + while (dcpr_do < dcpr_do_max) + { + if (!blocksize) + if (!calc_dectabs()) + return; + + addbits(dcpr_wd_mn[(c = dcpr_code_mn[code_rd >> (32 - maxwd_mn)])]); + blocksize--; + if (c > 255) + { + if (c > 259) + { + if ((c -= 260) > 1) + { + dist = (code_rd >> (33 - c)) + (1L << (c - 1)); + addbits(c - 1); + } + else + dist = c; + dcpr_olddist[(dcpr_oldnum = (dcpr_oldnum + 1) & 3)] = dist; + i = 2; + if (dist > maxdis2) + { + i++; + if (dist > maxdis3) + i++; + } + } + else + { + dist = dcpr_olddist[(dcpr_oldnum - (c &= 255)) & 3]; + for (k = c + 1; k--;) + dcpr_olddist[(dcpr_oldnum - k) & 3] = dcpr_olddist[(dcpr_oldnum - k + 1) & 3]; + dcpr_olddist[dcpr_oldnum] = dist; + i = 2; + if (c > 1) + i++; + } + addbits(dcpr_wd_lg[(lg = dcpr_code_lg[code_rd >> (32 - maxwd_lg)])]); + dist++; + lg += i; + copystr(dist, lg); + } + else + wrchar(c); + } +} + +//-------------------------- HUFFMAN ROUTINES ------------------------------// +INT makecode(UINT maxwd, UINT size1_t, UCHAR * wd, USHORT * code) +{ + UINT maxc, + size2_t, + l, + c, + i, + max_make_code; + + memcpy(&sort_freq, wd, (size1_t + 1) * sizeof(CHAR)); + if (size1_t) + quicksort(size1_t); + else + sort_org[0] = 0; + sort_freq[size1_t + 1] = size2_t = c = 0; + while (sort_freq[size2_t]) + size2_t++; + if (size2_t < 2) + { + i = sort_org[0]; + wd[i] = 1; + size2_t += (size2_t == 0); + } + size2_t--; + + max_make_code = 1 << maxwd; + for (i = size2_t + 1; i-- && c < max_make_code;) + { + maxc = 1 << (maxwd - sort_freq[i]); + l = sort_org[i]; + if (c + maxc > max_make_code) + { + dcpr_do = dcpr_do_max; + return (0); + } + memset16(&code[c], l, maxc); + c += maxc; + } + return (1); +} + +INT read_wd(UINT maxwd, USHORT * code, UCHAR * wd, INT max_el) +{ + UINT c, + i, + j, + num_el, + l, + uplim, + lolim; + + memset(wd, 0, max_el * sizeof(CHAR)); + memset(code, 0, (1 << maxwd) * sizeof(SHORT)); + + num_el = code_rd >> (32 - 9); + addbits(9); + if (num_el > max_el) + num_el = max_el; + + lolim = code_rd >> (32 - 4); + addbits(4); + uplim = code_rd >> (32 - 4); + addbits(4); + + for (i = -1; ++i <= uplim;) + { + wd_svwd[i] = code_rd >> (32 - 3); + addbits(3); + } + if (!makecode(maxwd_svwd, uplim, wd_svwd, code)) + return (0); + j = 0; + while (j <= num_el) + { + c = code[code_rd >> (32 - maxwd_svwd)]; + addbits(wd_svwd[c]); + if (c < uplim) + wd[j++] = c; + else + { + l = (code_rd >> 28) + 4; + addbits(4); + while (l-- && j <= num_el) + wd[j++] = 0; + } + } + if (uplim) + for (i = 0; ++i <= num_el;) + wd[i] = (wd[i] + wd[i - 1]) % uplim; + for (i = -1; ++i <= num_el;) + if (wd[i]) + wd[i] += lolim; + + return (makecode(maxwd, num_el, wd, code)); + +} + +INT calc_dectabs(void) +{ + if (!read_wd(maxwd_mn, dcpr_code_mn, dcpr_wd_mn, max_cd_mn) + || !read_wd(maxwd_lg, dcpr_code_lg, dcpr_wd_lg, max_cd_lg)) + return (0); + + blocksize = code_rd >> (32 - 15); + addbits(15); + + return (1); +} + +//---------------------------- BLOCK ROUTINES ------------------------------// +INT decompress_blk(CHAR * buf, UINT len) +{ + LONG old_pos = dcpr_dpos; + INT i; + + dcpr_do = 0; + if ((dcpr_do_max = len - maxlength) > dcpr_size) + dcpr_do_max = dcpr_size; + if ((LONG) dcpr_size > 0 && dcpr_do_max) + { + decompress(); + if (old_pos + dcpr_do > dcpr_dicsiz) + { + i = dcpr_dicsiz - old_pos; + memcpy(buf, &dcpr_text[old_pos], i); + memcpy(&buf[i], dcpr_text, dcpr_do - i); + } + else + memcpy(buf, &dcpr_text[old_pos], dcpr_do); + } + dcpr_size -= dcpr_do; + return (dcpr_do); +} + +INT unstore(CHAR * buf, UINT len) +{ + UINT rd = 0, + i, + pos = 0; + +#ifdef CRYPT + len = crypt_len(len - 8); /* because of decryption */ +#endif /* CRYPT */ + + while ((i = read_adds_blk((CHAR *) buf_rd, (INT) ((i = ((len > dcpr_size) ? dcpr_size : len)) > size_rdb ? size_rdb : i))) != 0) + { + rd += i; + len -= i; + memcpy(&buf[pos], buf_rd, i); + pos += i; + } + dcpr_size -= rd; + for (i = 0; i < rd; i++) + { + dcpr_text[dcpr_dpos] = buf[i]; + dcpr_dpos++; + dcpr_dpos &= dcpr_dican; + } + return (INT)rd; +} + +INT dcpr_adds_blk(CHAR * buf, UINT len) +{ + INT r; + + switch (fhead.TECH.TYPE) + { + case TYPE_STORE: + r = unstore(buf, len); + break; + case TYPE_LZW1: + r = decompress_blk(buf, len); + break; + default: + pipeit("\nFile compressed with unknown method. Decompression not possible.\n"); + f_err = ERR_OTHER; + r = 0; + } + rd_crc = getcrc(rd_crc, (UCHAR *)buf, r); + return r; +} + + +//----------------------------- INIT ROUTINES ------------------------------// +void dcpr_init(void) +{ + dcpr_frst_file = 1; + + dcpr_dic = 20; + while ((dcpr_text = malloc(dcpr_dicsiz = (LONG) 1 << dcpr_dic))==NULL) + dcpr_dic--; + dcpr_dican = dcpr_dicsiz - 1; +} + +void dcpr_init_file(void) +{ + UINT i; + +#ifdef CRYPT + + reset_cryptkey(); + +#else /* CRYPT */ + + if (head.HEAD_FLAGS & ACE_PASSW) + { + pipeit("\nFound passworded file. Decryption not supported.\n"); + f_err = ERR_OTHER; + return; + } + +#endif /* CRYPT */ + + rd_crc = CRC_MASK; + dcpr_size = fhead.SIZE; + if (fhead.TECH.TYPE == TYPE_LZW1) + { + if ((fhead.TECH.PARM & 15) + 10 > dcpr_dic) + { + pipeit("\nNot enough memory or dictionary of archive too large.\n"); + f_err = ERR_MEM; + return; + } + + i = size_rdb * sizeof(LONG); + read_adds_blk((CHAR *) buf_rd, i); +#ifdef HI_LO_BYTE_ORDER + { + ULONG *p; + i>>=2; // count LONGs not BYTEs + p=buf_rd; + while (i--) + { + LONGswap(p); + p++; + } + } +#endif + code_rd = buf_rd[0]; + bits_rd = rpos = 0; + + blocksize = 0; + } + if (!adat.sol || dcpr_frst_file) + dcpr_dpos = 0; + + dcpr_oldnum = 0; + memset(&dcpr_olddist, 0, sizeof(dcpr_olddist)); + + dcpr_frst_file = 0; +} + diff --git a/utils/Install/packace/uac_sys.c b/utils/Install/packace/uac_sys.c new file mode 100644 index 0000000000..2a261f3d57 --- /dev/null +++ b/utils/Install/packace/uac_sys.c @@ -0,0 +1,105 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Some basic things. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#include // signal() +#include // fprintf() fflush() getch() putc() + +#if defined(DOS) || defined(WINNT) || defined(WIN16) +#if !defined(__CYGWIN__) + #include // getch() +#endif +#endif +#if defined(DOS) + #include // delay() sound() +#endif + +#include "globals.h" +#include "uac_sys.h" + + +void memset16(USHORT * dest, SHORT val, INT len) // fills short-array with +{ // value + while (len--) + *(dest++) = val; +} + +INT cancel(void) // checks whether to interrupt the program +{ +#ifdef DOS + while (kbhit()) + { + if (getch() == 27) + f_err = ERR_USER; + } +#endif + return (f_err); +} + +INT wrask(CHAR * s) // prompt-routine +{ + CHAR ch = 0; + + fprintf(stderr, "\n %s (Yes,Always,No,Cancel) ", s); + fflush(stderr); + do + { + /*ch = getch(); + ch = upcase(ch);*/ + } + while (ch != 'Y' && ch != 'A' && ch != 'N' && ch != 'C' && ch != 27); + fprintf(stderr, "%s", ch == 'Y' ? "Yes" : (ch == 'A' ? "Always" : (ch == 'N' ? "No" : "Cancel"))); + fflush(stderr); + return (ch == 'Y' ? 0 : (ch == 'A' ? 1 : (ch == 'N' ? 2 : 3))); +} + +void beep(void) // makes some noise +{ +#ifdef DOS + sound(800); + delay(250); + nosound(); +#endif +#ifdef AMIGA + putc(0x07, stderr); +#endif +} + +void my_signalhandler(INT sig_number) // sets f_err if ctrl+c or ctrl+brk +{ + f_err = ERR_USER; + pipeit("\nUser break\n"); +} + +#ifdef DOS // handles hardware errors +#ifdef __BORLANDC__ +INT harderrhandler(UINT deverr, UINT errc, UINT * devhdr) +#else +INT __far harderrhandler(UINT deverr, UINT errc, UINT * devhdr) +#endif +{ + f_criterr = 'A' + deverr & 0xff; + f_err = ERR_OTHER; + return (0x3); +} +#endif + +void set_handler(void) // initializes handlers +{ +#if defined(DOS) && !defined(__BORLANDC__) + signal(SIGBREAK, my_signalhandler); // set ctrl-break/-c handlers +#endif + signal(SIGINT, my_signalhandler); +#if defined(DOS) && !defined(__CONSOLE__) // set hardware error handler +#ifdef __BORLANDC__ + harderr(harderrhandler); +#else + _harderr(harderrhandler); +#endif +#endif +} + diff --git a/utils/Install/packace/unace.c b/utils/Install/packace/unace.c new file mode 100644 index 0000000000..e38a88d756 --- /dev/null +++ b/utils/Install/packace/unace.c @@ -0,0 +1,584 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Main file of public UNACE. */ +/* */ +/* ------------------------------------------------------------------------ */ + + +//--------------- include general files ------------------------------------// +#include // tolower() +#include // open() +#include // printf() sprintf() remove() +#include // malloc() +#include // str*() +#include +#include // S_I* AMIGA: fstat() + +#define DIRSEP '\\' + +#if (!defined(__EMX__) && !defined(__OS2__) && !defined(WINNT) && !defined(WIN32)) || defined(__CYGWIN__) +#include +#endif + + +//--------------- include unace specific header files ----------------------// +#include "os.h" + +#include "globals.h" +#include "portable.h" +#include "uac_comm.h" +#include "uac_crc.h" +#include "uac_crt.h" +#include "uac_dcpr.h" +#include "uac_sys.h" + +#ifdef CRYPT + #include "unace_ps.h" +#endif /* CRYPT */ +int files=0; + +//--------------- BEGIN OF UNACE ROUTINES ----------------------------------// + +int pipeit(char *format, ...) { + /* Do nothing ... perhaps pipe this somewhere in the future */ + return 0; +} + +void init_unace(void) // initializes unace +{ + buf_rd =malloc(size_rdb * sizeof(ULONG)); // Allocate buffers: increase + buf =malloc(size_buf); // sizes when possible to speed + buf_wr =malloc(size_wrb); // up the program + readbuf=malloc(size_headrdb); + + if (buf_rd ==NULL || + buf ==NULL || + buf_wr ==NULL || + readbuf==NULL ) + f_err = ERR_MEM; + + make_crctable(); // initialize CRC table + dcpr_init(); // initialize decompression + + set_handler(); // ctrl+break etc. +} + +void done_unace(void) +{ + if (buf_rd ) free(buf_rd ); + if (buf ) free(buf ); + if (buf_wr ) free(buf_wr ); + if (readbuf ) free(readbuf ); + if (dcpr_text) free(dcpr_text); +} + +INT read_header(INT print_err) // reads any header from archive +{ + USHORT rd, + head_size, + crc_ok; + LONG crc; + UCHAR *tp=readbuf; + + lseek(archan, skipsize, SEEK_CUR); // skip ADDSIZE block + + if (read(archan, &head, 4)<4) + return (0); // read CRC and header size + +#ifdef HI_LO_BYTE_ORDER + WORDswap(&head.HEAD_CRC); + WORDswap(&head.HEAD_SIZE); +#endif + // read size_headrdb bytes into + head_size = head.HEAD_SIZE; // header structure + rd = (head_size > size_headrdb) ? size_headrdb : head_size; + if (read(archan, readbuf, rd) < rd) + return (0); + head_size -= rd; + crc = getcrc(CRC_MASK, readbuf, rd); + + while (head_size) // skip rest of header + { + rd = (head_size > size_buf) ? size_buf : head_size; + if (read(archan, buf, rd) < rd) + return (0); + head_size -= rd; + crc = getcrc(crc, (UCHAR *)buf, rd); + } + + head.HEAD_TYPE =*tp++; // generic buffer to head conversion + head.HEAD_FLAGS=BUFP2WORD(tp); + + if (head.HEAD_FLAGS & ACE_ADDSIZE) + skipsize = head.ADDSIZE = BUF2LONG(tp); // get ADDSIZE + else + skipsize = 0; + + // check header CRC + if (!(crc_ok = head.HEAD_CRC == (crc & 0xffff)) && print_err) + pipeit("\nError: archive is broken\n"); + else + switch (head.HEAD_TYPE) // specific buffer to head conversion + { + case MAIN_BLK: + memcpy(mhead.ACESIGN, tp, acesign_len); tp+=acesign_len; + mhead.VER_MOD=*tp++; + mhead.VER_CR =*tp++; + mhead.HOST_CR=*tp++; + mhead.VOL_NUM=*tp++; + mhead.TIME_CR=BUFP2LONG(tp); + mhead.RES1 =BUFP2WORD(tp); + mhead.RES2 =BUFP2WORD(tp); + mhead.RES =BUFP2LONG(tp); + mhead.AV_SIZE=*tp++; + memcpy(mhead.AV, tp, rd-(USHORT)(tp-readbuf)); + break; + case FILE_BLK: + fhead.PSIZE =BUFP2LONG(tp); + fhead.SIZE =BUFP2LONG(tp); + fhead.FTIME =BUFP2LONG(tp); + fhead.ATTR =BUFP2LONG(tp); + fhead.CRC32 =BUFP2LONG(tp); + fhead.TECH.TYPE =*tp++; + fhead.TECH.QUAL =*tp++; + fhead.TECH.PARM =BUFP2WORD(tp); + fhead.RESERVED =BUFP2WORD(tp); + fhead.FNAME_SIZE=BUFP2WORD(tp); + memcpy(fhead.FNAME, tp, rd-(USHORT)(tp-readbuf)); + break; + // default: (REC_BLK and future things): + // do nothing 'cause isn't needed for extraction + } + + return (crc_ok); +} +// maximum SFX module size +#define max_sfx_size 65536 // (needed by read_arc_head) + +INT read_arc_head(void) // searches for the archive header and reads it +{ + INT i, + flags, + buf_pos = 0; + LONG arc_head_pos, + old_fpos, + fpos = 0; + struct stat st; + + fstat(archan, &st); + + memset(buf, 0, size_buf); + +#if !defined(__EMX__) && !defined(__OS2__) + while (ftell(farchan) 0; + adat.vol = (flags & ACE_MULT_VOL) > 0; + adat.vol_num = mhead.VOL_NUM; + adat.time_cr = mhead.TIME_CR; + return (1); + } + } + } + // was no archive header, + // continue search + lseek(archan, fpos, SEEK_SET); + memcpy(buf, &buf[size_buf - 512], 512); + buf_pos = 512; // keep 512 old bytes + } + return (0); +} + +INT open_archive(INT print_err) // opens archive (or volume) +{ + CHAR av_str[80]; + + +#if defined(__OS2_) || defined(__EMX__) || defined(WIN32) + archan = open(aname, O_RDONLY | O_BINARY); // open file +#else + archan = open(aname, O_RDONLY); // open file +#endif +#if !defined(__EMX__) && !defined(__OS2__) + farchan = fdopen(archan, "rb"); +#endif + if (archan == -1) + { + pipeit("\nError opening file %s", aname); + return (0); + } + if (!read_arc_head()) // read archive header + { + if (print_err) + pipeit("\nInvalid archive file: %s\n", aname); +#if !defined(__EMX__) && !defined(__OS2__) + fclose(farchan); +#endif + close(archan); + return (0); + } + + pipeit("\nProcessing archive: %s\n\n", aname); + if (head.HEAD_FLAGS & ACE_AV) + { + pipeit("Authenticity Verification:"); // print the AV + sprintf(av_str, "\ncreated on %d.%d.%d by ", + ts_day(adat.time_cr), ts_month(adat.time_cr), ts_year(adat.time_cr)); + pipeit(av_str); + strncpy(av_str, (char *)mhead.AV, mhead.AV_SIZE); + av_str[mhead.AV_SIZE] = 0; + pipeit("%s\n\n", av_str); + } + comment_out("Main comment:"); // print main comment + return (1); +} + +void get_next_volname(void) // get file name of next volume +{ + CHAR *cp; + INT num; + + if ((cp = (CHAR *) strrchr(aname, '.')) == NULL || !*(cp + 1)) + num = -1; + else + { + cp++; + num = (*(cp + 1) - '0') * 10 + *(cp + 2) - '0'; + if (!in(num, 0, 99)) + num = -1; + if (in(*cp, '0', '9')) + num += (*cp - '0') * 100; + } + num++; + + if (num < 100) + *cp = 'C'; + else + *cp = num / 100 + '0'; + *(cp + 1) = (num / 10) % 10 + '0'; + *(cp + 2) = num % 10 + '0'; +} + +INT proc_vol(void) // opens volume +{ + INT i; + CHAR s[80]; + + if (!fileexists(aname) || !f_allvol_pr) + { + do + { + sprintf(s, "Ready to process %s?", aname); +#if !defined(__MINGW32__) + beep(); +#else + beep(500,500); +#endif + i = wrask(s); // ask whether ready or not + f_allvol_pr = (i == 1); // "Always" --> process all volumes + if (i >= 2) + { + f_err = ERR_FOUND; + return (0); + } + } + while (!fileexists(aname)); + } + + if (!open_archive(1)) // open volume + { + pipeit("\nError while opening archive. File not found or archive broken.\n"); + f_err = ERR_OPEN; + return (0); + } + + return (1); +} + +INT proc_next_vol(void) // opens next volume to process +{ +#if !defined(__EMX__) && !defined(__OS2__) + fclose(farchan); +#endif + close(archan); // close handle + get_next_volname(); // get file name of next volume + + if (!proc_vol()) // try to open volume, read archive header + return 0; + if (!read_header(1)) // read 2nd header + { + f_err=ERR_READ; + return 0; + } + return 1; +} + +INT read_adds_blk(CHAR * buffer, INT len) // reads part of ADD_SIZE block +{ + INT rd = 0, + l = len; + LONG i; + +#ifdef CRYPT + char *cbuffer=buffer; + + if (head.HEAD_TYPE == FILE_BLK && (head.HEAD_FLAGS & ACE_PASSW)) + len = crypt_len(len); +#endif /* CRYPT */ + while (!f_err && len && skipsize) + { + i = (skipsize > len) ? len : skipsize; + skipsize -= i; + + /* How do I check error condition when comping -mno-cygwin? */ +#if !defined(__MINGW32__) + errno = 0; +#endif + rd += read(archan, buffer, i); +#if !defined(__MINGW32__) + if (errno) + { + pipeit("\nRead error\n"); + f_err = ERR_READ; + } +#endif + + buffer += i; + len -= i; + + if (!skipsize) // if block is continued on next volume + if (head.HEAD_FLAGS & ACE_SP_AFTER && !proc_next_vol()) + break; + } +#ifdef CRYPT + if (head.HEAD_TYPE == FILE_BLK && (head.HEAD_FLAGS & ACE_PASSW)) + decrypt(cbuffer, rd); +#endif /* CRYPT */ + + return (rd > l ? l : rd); +} + +void crc_print(void) // checks CRC, prints message +{ + INT crc_not_ok = rd_crc != fhead.CRC32; /* check CRC of file */ + + if (!f_err) // print message + { + pipeit(crc_not_ok ? " CRC-check error" : " CRC OK"); + flush; + } +} + +void analyze_file(void) // analyzes one file (for solid archives) +{ + pipeit("\n Analyzing"); + flush; + while (!cancel() && (dcpr_adds_blk(buf_wr, size_wrb))) // decompress only + ; + crc_print(); +} + +void extract_file(void) // extracts one file +{ + INT rd; + + pipeit("\n Extracting"); + flush; // decompress block + while (!cancel() && (rd = dcpr_adds_blk(buf_wr, size_wrb))) + { + if (write(wrhan, buf_wr, rd) != rd) // write block + { + pipeit("\nWrite error\n"); + f_err = ERR_WRITE; + } + } + crc_print(); +} + +/* extracts or tests all files of the archive + */ +void extract_files(int nopath, int test) +{ + CHAR file[PATH_MAX]; + + while (!cancel() && read_header(1)) + { + if (head.HEAD_TYPE == FILE_BLK) + { + comment_out("File comment:"); // show file comment + ace_fname(file, &head, nopath); // get file name + pipeit("\n%s", file); + flush; + dcpr_init_file(); // initialize decompression of file + if (!f_err) + { + if (test || + (wrhan = create_dest_file(file, (INT) fhead.ATTR))<0) + { + if (test || adat.sol) + analyze_file(); // analyze file + } + else + { + extract_file(); // extract it +#ifdef DOS // set file time + _dos_setftime(wrhan, (USHORT) (fhead.FTIME >> 16), (USHORT) fhead.FTIME); +#endif + close(wrhan); +#ifdef DOS // set file attributes + _dos_setfileattr(file, (UINT) fhead.ATTR); +#endif +#ifdef AMIGA + { // set file date and time + struct DateTime dt; + char Date[9], Time[9]; + ULONG tstamp=fhead.FTIME; + + sprintf(Date, "%02d-%02d-%02d", ts_year(tstamp)-1900, ts_month(tstamp), ts_day(tstamp)); + sprintf(Time, "%02d:%02d:%02d", ts_hour(tstamp), ts_min(tstamp), ts_sec(tstamp)); + + dt.dat_Format = FORMAT_INT; + dt.dat_Flags = 0; + dt.dat_StrDate= Date; + dt.dat_StrTime= Time; + + if (StrToDate(&dt)) + SetFileDate(file, &dt.dat_Stamp); + } +#endif + if (f_err) + remove(file); + } + } + } + } +} + +unsigned percentage(ULONG p, ULONG d) +{ + return (unsigned)( d ? (d/2+p*100)/d : 100 ); +} + +void list_files(int verbose) +{ + ULONG size =0, + psize=0, + tpsize; + CHAR file[PATH_MAX]; + + pipeit("Date |Time |Packed |Size |Ratio|File\n"); + + while (!cancel() && read_header(1)) + { + if (head.HEAD_TYPE == FILE_BLK) + { + ULONG ti=fhead.FTIME; + ace_fname(file, &head, verbose ? 0 : 1); // get file name + + size += fhead.SIZE; + psize += + tpsize = fhead.PSIZE; + files++; + + while (head.HEAD_FLAGS & ACE_SP_AFTER) + { + skipsize=0; + if (!proc_next_vol()) + break; + psize += fhead.PSIZE; + tpsize+= fhead.PSIZE; + } + if (!f_err) + pipeit("%02u.%02u.%02u|%02u:%02u|%c%c%9lu|%9lu|%4u%%|%c%s\n", + ts_day (ti), ts_month(ti), ts_year(ti)%100, + ts_hour(ti), ts_min (ti), + fhead.HEAD_FLAGS & ACE_SP_BEF ? '<' : ' ', + fhead.HEAD_FLAGS & ACE_SP_AFTER ? '>' : ' ', + tpsize, fhead.SIZE, percentage(tpsize, fhead.SIZE), + fhead.HEAD_FLAGS & ACE_PASSW ? '*' : ' ', + file + ); + } + } + if (!f_err) + { + pipeit("\n %9lu|%9lu|%4u%%| %u file%s", + psize, + size, + percentage(psize, size), + files, + (char*)(files == 1 ? "" : "s") + ); + } +} + +void showhelp(void) +{ + pipeit("\n" + "Usage: UNACE \n" + "\n" + "Where is one of:\n" + "\n" + " e Extract files\n" + " l List archive\n" + " t Test archive integrity\n" + " v List archive (verbose)\n" + " x Extract files with full path" + ); +} + +int include_unpack(char *bleah) // processes the archive +{ + CHAR *s; + + strcpy(aname, bleah); + + init_unace(); // initialize unace + + if (!(s = (CHAR *) strrchr(aname, DIRSEP))) + s = aname; + if (!strrchr(s, '.')) + strcat(aname, ".ACE"); + + if (open_archive(1)) // open archive to process + { + if (adat.vol_num) + pipeit("\nFirst volume of archive required!\n"); + else + list_files (0 ); + +#if !defined(__EMX__) && !defined(__OS2__) + fclose(farchan); +#endif + close(archan); + if (f_err) + { + pipeit("\nError occurred\n"); + if (f_criterr) + pipeit("Critical error on drive %c\n", f_criterr); + } + } + else + f_err = ERR_CLINE; + + done_unace(); + return (f_err); +} + diff --git a/utils/Install/packzip/api.c b/utils/Install/packzip/api.c new file mode 100644 index 0000000000..5a4e73abf8 --- /dev/null +++ b/utils/Install/packzip/api.c @@ -0,0 +1,601 @@ +/*--------------------------------------------------------------------------- + + api.c + + This module supplies an UnZip engine for use directly from C/C++ + programs. The functions are: + + UzpVer *UzpVersion(void); + void UzpVersion2(UzpVer2 *version) + int UzpMain(int argc, char *argv[]); + int UzpAltMain(int argc, char *argv[], UzpInit *init); + int UzpValidate(char *archive, int AllCodes); + void UzpFreeMemBuffer(UzpBuffer *retstr); + int UzpUnzipToMemory(char *zip, char *file, UzpOpts *optflgs, + UzpCB *UsrFuncts, UzpBuffer *retstr); + + non-WINDLL only (a special WINDLL variant is defined in windll/windll.c): + int UzpGrep(char *archive, char *file, char *pattern, int cmd, int SkipBin, + UzpCB *UsrFuncts); + + OS/2 only (for now): + int UzpFileTree(char *name, cbList(callBack), char *cpInclude[], + char *cpExclude[]); + + You must define `DLL' in order to include the API extensions. + + ---------------------------------------------------------------------------*/ + + +#ifdef OS2 +# define INCL_DOSMEMMGR +# include +#endif +#include + +#define UNZIP_INTERNAL +#include "unzip.h" +#include "version.h" +#ifdef WINDLL +# include "windll/windll.h" +#endif + +#ifdef DLL /* This source file supplies DLL-only interface code. */ + +jmp_buf dll_error_return; + +/*--------------------------------------------------------------------------- + Documented API entry points + ---------------------------------------------------------------------------*/ + + +UzpVer * UZ_EXP UzpVersion() /* should be pointer to const struct */ +{ + static UzpVer version; /* doesn't change between calls */ + + + version.structlen = UZPVER_LEN; + +#ifdef BETA + version.flag = 1; +#else + version.flag = 0; +#endif + version.betalevel = BETALEVEL; + version.date = VERSION_DATE; + +#ifdef ZLIB_VERSION + version.zlib_version = ZLIB_VERSION; + version.flag |= 2; +#else + version.zlib_version = NULL; +#endif + + /* someday each of these may have a separate patchlevel: */ + version.unzip.major = UZ_MAJORVER; + version.unzip.minor = UZ_MINORVER; + version.unzip.patchlevel = PATCHLEVEL; + + version.zipinfo.major = ZI_MAJORVER; + version.zipinfo.minor = ZI_MINORVER; + version.zipinfo.patchlevel = PATCHLEVEL; + + /* these are retained for backward compatibility only: */ + version.os2dll.major = UZ_MAJORVER; + version.os2dll.minor = UZ_MINORVER; + version.os2dll.patchlevel = PATCHLEVEL; + + version.windll.major = UZ_MAJORVER; + version.windll.minor = UZ_MINORVER; + version.windll.patchlevel = PATCHLEVEL; + + return &version; +} + +void UZ_EXP UzpVersion2(UzpVer2 *version) +{ + + version->structlen = UZPVER_LEN; + +#ifdef BETA + version->flag = 1; +#else + version->flag = 0; +#endif + strcpy(version->betalevel, BETALEVEL); + strcpy(version->date, VERSION_DATE); + +#ifdef ZLIB_VERSION + strcpy(version->zlib_version, ZLIB_VERSION); + version->flag |= 2; +#else + version->zlib_version[0] = '\0'; +#endif + + /* someday each of these may have a separate patchlevel: */ + version->unzip.major = UZ_MAJORVER; + version->unzip.minor = UZ_MINORVER; + version->unzip.patchlevel = PATCHLEVEL; + + version->zipinfo.major = ZI_MAJORVER; + version->zipinfo.minor = ZI_MINORVER; + version->zipinfo.patchlevel = PATCHLEVEL; + + /* these are retained for backward compatibility only: */ + version->os2dll.major = UZ_MAJORVER; + version->os2dll.minor = UZ_MINORVER; + version->os2dll.patchlevel = PATCHLEVEL; + + version->windll.major = UZ_MAJORVER; + version->windll.minor = UZ_MINORVER; + version->windll.patchlevel = PATCHLEVEL; +} + + + + + +#ifndef WINDLL + +int UZ_EXP UzpAltMain(int argc, char *argv[], UzpInit *init) +{ + int r, (*dummyfn)(); + + + CONSTRUCTGLOBALS(); + + if (init->structlen >= (sizeof(ulg) + sizeof(dummyfn)) && init->msgfn) + G.message = init->msgfn; + + if (init->structlen >= (sizeof(ulg) + 2*sizeof(dummyfn)) && init->inputfn) + G.input = init->inputfn; + + if (init->structlen >= (sizeof(ulg) + 3*sizeof(dummyfn)) && init->pausefn) + G.mpause = init->pausefn; + + if (init->structlen >= (sizeof(ulg) + 4*sizeof(dummyfn)) && init->userfn) + (*init->userfn)(); /* allow void* arg? */ + + r = unzip(__G__ argc, argv); + DESTROYGLOBALS() + RETURN(r); +} + +#endif /* !WINDLL */ + + + + +#ifndef __16BIT__ + +void UZ_EXP UzpFreeMemBuffer(UzpBuffer *retstr) +{ + if (retstr->strptr != NULL) { + free(retstr->strptr); + retstr->strptr = NULL; + } +} + + + + +#ifndef WINDLL + +static int UzpDLL_Init OF((zvoid *pG, UzpCB *UsrFuncts)); + +static int UzpDLL_Init(pG, UsrFuncts) +zvoid *pG; +UzpCB *UsrFuncts; +{ + int (*dummyfn)(); + + if (UsrFuncts->structlen >= (sizeof(ulg) + sizeof(dummyfn)) && + UsrFuncts->msgfn) + ((Uz_Globs *)pG)->message = UsrFuncts->msgfn; + else + return FALSE; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 2*sizeof(dummyfn)) && + UsrFuncts->inputfn) + ((Uz_Globs *)pG)->input = UsrFuncts->inputfn; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 3*sizeof(dummyfn)) && + UsrFuncts->pausefn) + ((Uz_Globs *)pG)->mpause = UsrFuncts->pausefn; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 4*sizeof(dummyfn)) && + UsrFuncts->passwdfn) + ((Uz_Globs *)pG)->decr_passwd = UsrFuncts->passwdfn; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 5*sizeof(dummyfn)) && + UsrFuncts->statrepfn) + ((Uz_Globs *)pG)->statreportcb = UsrFuncts->statrepfn; + + return TRUE; +} + + +int UZ_EXP UzpUnzipToMemory(char *zip, char *file, UzpOpts *optflgs, + UzpCB *UsrFuncts, UzpBuffer *retstr) +{ + int r; +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) + char *intern_zip, *intern_file; +#endif + + CONSTRUCTGLOBALS(); +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) + intern_zip = (char *)malloc(strlen(zip)+1); + if (intern_zip == NULL) { + DESTROYGLOBALS() + return PK_MEM; + } + intern_file = (char *)malloc(strlen(file)+1); + if (intern_file == NULL) { + DESTROYGLOBALS() + free(intern_zip); + return PK_MEM; + } + ISO_TO_INTERN(zip, intern_zip); + ISO_TO_INTERN(file, intern_file); +# define zip intern_zip +# define file intern_file +#endif + /* Copy those options that are meaningful for UzpUnzipToMemory, instead of + * a simple "memcpy(G.UzO, optflgs, sizeof(UzpOpts));" + */ + uO.pwdarg = optflgs->pwdarg; + uO.aflag = optflgs->aflag; + uO.C_flag = optflgs->C_flag; + uO.qflag = optflgs->qflag; /* currently, overridden in unzipToMemory */ + + if (!UzpDLL_Init((zvoid *)&G, UsrFuncts)) { + DESTROYGLOBALS(); + return PK_BADERR; + } + G.redirect_data = 1; + + r = (unzipToMemory(__G__ zip, file, retstr) <= PK_WARN); + + DESTROYGLOBALS() +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) +# undef file +# undef zip + free(intern_file); + free(intern_zip); +#endif + if (!r && retstr->strlength) { + free(retstr->strptr); + retstr->strptr = NULL; + } + return r; +} +#endif /* !WINDLL */ +#endif /* !__16BIT__ */ + + + + + +#ifdef OS2DLL + +int UZ_EXP UzpFileTree(char *name, cbList(callBack), char *cpInclude[], + char *cpExclude[]) +{ + int r; + + CONSTRUCTGLOBALS(); + uO.qflag = 2; + uO.vflag = 1; + uO.C_flag = 1; + G.wildzipfn = name; + G.process_all_files = TRUE; + if (cpInclude) { + char **ptr = cpInclude; + + while (*ptr != NULL) ptr++; + G.filespecs = ptr - cpInclude; + G.pfnames = cpInclude, G.process_all_files = FALSE; + } + if (cpExclude) { + char **ptr = cpExclude; + + while (*ptr != NULL) ptr++; + G.xfilespecs = ptr - cpExclude; + G.pxnames = cpExclude, G.process_all_files = FALSE; + } + + G.processExternally = callBack; + r = process_zipfiles(__G)==0; + DESTROYGLOBALS() + return r; +} + +#endif /* OS2DLL */ + + + + +/*--------------------------------------------------------------------------- + Helper functions + ---------------------------------------------------------------------------*/ + + +void setFileNotFound(__G) + __GDEF +{ + G.filenotfound++; +} + + + +int unzipToMemory(__GPRO__ char *zip, char *file, UzpBuffer *retstr) +{ + int r; + char *incname[2]; + + G.process_all_files = FALSE; + G.extract_flag = TRUE; + uO.qflag = 2; + G.wildzipfn = zip; + + G.pfnames = incname; + incname[0] = file; + incname[1] = NULL; + G.filespecs = 1; + + r = process_zipfiles(__G); + if (retstr) { + retstr->strptr = (char *)G.redirect_buffer; + retstr->strlength = G.redirect_size; + } + return r; /* returns `PK_???' error values */ +} + + + +int redirect_outfile(__G) + __GDEF +{ + if (G.redirect_size != 0 || G.redirect_buffer != NULL) + return FALSE; + +#ifndef NO_SLIDE_REDIR + G.redirect_slide = !G.pInfo->textmode; +#endif + G.redirect_size = (G.pInfo->textmode ? + G.lrec.ucsize * lenEOL : G.lrec.ucsize); +#ifdef OS2 + DosAllocMem((void **)&G.redirect_buffer, G.redirect_size+1, + PAG_READ|PAG_WRITE|PAG_COMMIT); + G.redirect_pointer = G.redirect_buffer; +#else +#ifdef __16BIT__ + if ((ulg)((extent)G.redirect_size) != G.redirect_size) + return FALSE; +#endif + G.redirect_pointer = G.redirect_buffer = malloc(G.redirect_size+1); +#endif + if (!G.redirect_buffer) + return FALSE; + G.redirect_pointer[G.redirect_size] = '\0'; + return TRUE; +} + + + +int writeToMemory(__GPRO__ uch *rawbuf, ulg size) +{ + if (rawbuf != G.redirect_pointer) + memcpy(G.redirect_pointer,rawbuf,size); + G.redirect_pointer += size; + return 0; +} + + + + +int close_redirect(__G) + __GDEF +{ + if (G.pInfo->textmode) { + *G.redirect_pointer = '\0'; + G.redirect_size = G.redirect_pointer - G.redirect_buffer; + if ((G.redirect_buffer = + realloc(G.redirect_buffer, G.redirect_size + 1)) == NULL) { + G.redirect_size = 0; + return EOF; + } + } + return 0; +} + + + + +#ifndef __16BIT__ +#ifndef WINDLL + +/* Purpose: Determine if file in archive contains the string szSearch + + Parameters: archive = archive name + file = file contained in the archive. This cannot be + a wild card to be meaningful + pattern = string to search for + cmd = 0 - case-insensitive search + 1 - case-sensitve search + 2 - case-insensitive, whole words only + 3 - case-sensitive, whole words only + SkipBin = if true, skip any files that have control + characters other than CR, LF, or tab in the first + 100 characters. + + Returns: TRUE if a match is found + FALSE if no match is found + -1 on error + + Comments: This does not pretend to be as useful as the standard + Unix grep, which returns the strings associated with a + particular pattern, nor does it search past the first + matching occurrence of the pattern. + */ + +int UZ_EXP UzpGrep(char *archive, char *file, char *pattern, int cmd, + int SkipBin, UzpCB *UsrFuncts) +{ + int retcode = FALSE, compare; + ulg i, j, patternLen, buflen; + char * sz, *p; + UzpOpts flgopts; + UzpBuffer retstr; + + memzero(&flgopts, sizeof(UzpOpts)); /* no special options */ + + if (!UzpUnzipToMemory(archive, file, &flgopts, UsrFuncts, &retstr)) { + return -1; /* not enough memory, file not found, or other error */ + } + + if (SkipBin) { + if (retstr.strlength < 100) + buflen = retstr.strlength; + else + buflen = 100; + for (i = 0; i < buflen; i++) { + if (iscntrl(retstr.strptr[i])) { + if ((retstr.strptr[i] != 0x0A) && + (retstr.strptr[i] != 0x0D) && + (retstr.strptr[i] != 0x09)) + { + /* OK, we now think we have a binary file of some sort */ + free(retstr.strptr); + return FALSE; + } + } + } + } + + patternLen = strlen(pattern); + + if (retstr.strlength < patternLen) { + free(retstr.strptr); + return FALSE; + } + + sz = malloc(patternLen + 3); /* add two in case doing whole words only */ + if (cmd > 1) { + strcpy(sz, " "); + strcat(sz, pattern); + strcat(sz, " "); + } else + strcpy(sz, pattern); + + if ((cmd == 0) || (cmd == 2)) { + for (i = 0; i < strlen(sz); i++) + sz[i] = toupper(sz[i]); + for (i = 0; i < retstr.strlength; i++) + retstr.strptr[i] = toupper(retstr.strptr[i]); + } + + for (i = 0; i < (retstr.strlength - patternLen); i++) { + p = &retstr.strptr[i]; + compare = TRUE; + for (j = 0; j < patternLen; j++) { + /* We cannot do strncmp here, as we may be dealing with a + * "binary" file, such as a word processing file, or perhaps + * even a true executable of some sort. */ + if (p[j] != sz[j]) { + compare = FALSE; + break; + } + } + if (compare == TRUE) { + retcode = TRUE; + break; + } + } + + free(sz); + free(retstr.strptr); + + return retcode; +} +#endif /* !WINDLL */ +#endif /* !__16BIT__ */ + + + + +int UZ_EXP UzpValidate(char *archive, int AllCodes) +{ + int retcode; + CONSTRUCTGLOBALS(); + + uO.jflag = 1; + uO.tflag = 1; + uO.overwrite_none = 0; + G.extract_flag = (!uO.zipinfo_mode && + !uO.cflag && !uO.tflag && !uO.vflag && !uO.zflag +#ifdef TIMESTAMP + && !uO.T_flag +#endif + ); + + uO.qflag = 2; /* turn off all messages */ + G.fValidate = TRUE; + G.pfnames = (char **)&fnames[0]; /* assign default filename vector */ +#ifdef WINDLL + Wiz_NoPrinting(TRUE); +#endif + + if (archive == NULL) { /* something is screwed up: no filename */ + DESTROYGLOBALS(); + return PK_NOZIP; + } + + G.wildzipfn = (char *)malloc(FILNAMSIZ + 1); + strcpy(G.wildzipfn, archive); +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) + _ISO_INTERN(G.wildzipfn); +#endif + + G.process_all_files = TRUE; /* for speed */ + + retcode = setjmp(dll_error_return); + + if (retcode) { +#ifdef WINDLL + Wiz_NoPrinting(FALSE); +#endif + free(G.wildzipfn); + DESTROYGLOBALS(); + return PK_BADERR; + } + + retcode = process_zipfiles(__G); + + free(G.wildzipfn); +#ifdef WINDLL + Wiz_NoPrinting(FALSE); +#endif + DESTROYGLOBALS(); + + /* PK_WARN == 1 and PK_FIND == 11. When we are just looking at an + archive, we should still be able to see the files inside it, + even if we can't decode them for some reason. + + We also still want to be able to get at files even if there is + something odd about the zip archive, hence allow PK_WARN, + PK_FIND, IZ_UNSUP as well as PK_ERR + */ + + if (AllCodes) + return retcode; + + if ((retcode == PK_OK) || (retcode == PK_WARN) || (retcode == PK_ERR) || + (retcode == IZ_UNSUP) || (retcode == PK_FIND)) + return TRUE; + else + return FALSE; +} + +#endif /* DLL */ diff --git a/utils/Install/packzip/apihelp.c b/utils/Install/packzip/apihelp.c new file mode 100644 index 0000000000..1a0d682cdd --- /dev/null +++ b/utils/Install/packzip/apihelp.c @@ -0,0 +1,147 @@ +/* apihelp.c */ + +#ifdef API_DOC + +#define UNZIP_INTERNAL +#include "unzip.h" +#include "version.h" + + +APIDocStruct APIDoc[] = { + { + "UZPVERSION" , "UzpVersion" , + "UzpVer *UzpVersion(void);", + "Get version numbers of the API and the underlying UnZip code.\n\n" + "\t\tThis is used for comparing the version numbers of the run-time\n" + "\t\tDLL code with those expected from the unzip.h at compile time.\n" + "\t\tIf the version numbers do not match, there may be compatibility\n" + "\t\tproblems with further use of the DLL.\n\n" + " Example:\t/* Check the major version number of the DLL code. */\n" + "\t\tUzpVer *pVersion;\n" + "\t\tpVersion = UzpVersion();\n" + "\t\tif (pVersion->unzip.major != UZ_MAJORVER)\n" + "\t\t fprintf(stderr, \"error: using wrong version of DLL\\n\");\n\n" + "\t\tSee unzip.h for details and unzipstb.c for an example.\n" + }, + + { + "UZPMAIN" , "UzpMain" , + "int UzpMain(int argc, char *argv[]);", + "Provide a direct entry point to the command line interface.\n\n" + "\t\tThis is used by the UnZip stub but you can use it in your\n" + "\t\town program as well. Output is sent to stdout.\n" + "\t\t0 on return indicates success.\n\n" + " Example:\t/* Extract 'test.zip' silently, junking paths. */\n" + "\t\tchar *argv[] = { \"-q\", \"-j\", \"test.zip\" };\n" + "\t\tint argc = 3;\n" + "\t\tif (UzpMain(argc,argv))\n" + "\t\t printf(\"error: unzip failed\\n\");\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { + "UZPALTMAIN" , "UzpAltMain" , + "int UzpAltMain(int argc, char *argv[], UzpInit *init);", + "Provide a direct entry point to the command line interface,\n" + "optionally installing replacement I/O handler functions.\n\n" + "\t\tAs with UzpMain(), output is sent to stdout by default.\n" + "\t\t`InputFn *inputfn' is not yet implemented. 0 on return\n" + "\t\tindicates success.\n\n" + " Example:\t/* Replace normal output and `more' functions. */\n" + "\t\tchar *argv[] = { \"-q\", \"-j\", \"test.zip\" };\n" + "\t\tint argc = 3;\n" + "\t\tUzpInit init = { 16, MyMessageFn, NULL, MyPauseFn };\n" + "\t\tif (UzpAltMain(argc,argv,&init))\n" + "\t\t printf(\"error: unzip failed\\n\");\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { + "UZPUNZIPTOMEMORY", "UzpUnzipToMemory", + "int UzpUnzipToMemory(char *zip, char *file, UzpBuffer *retstr);", + "Pass the name of the zip file and the name of the file\n" + "\t\tyou wish to extract. UzpUnzipToMemory will create a\n" + "\t\tbuffer and return it in *retstr; 0 on return indicates\n" + "\t\tfailure.\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { + "UZPFILETREE", "UzpFileTree", + "int UzpFileTree(char *name, cbList(callBack),\n" + "\t\t\tchar *cpInclude[], char *cpExclude[]);", + "Pass the name of the zip file, a callback function, an\n" + "\t\tinclude and exclude file list. UzpFileTree calls the\n" + "\t\tcallback for each valid file found in the zip file.\n" + "\t\t0 on return indicates failure.\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { 0 } +}; + + +static int function_help OF((__GPRO__ APIDocStruct *doc, char *fname)); + + + +static int function_help(__G__ doc, fname) + __GDEF + APIDocStruct *doc; + char *fname; +{ + strcpy(slide, fname); + /* strupr(slide); non-standard */ + while (doc->compare && STRNICMP(doc->compare,slide,strlen(fname))) + doc++; + if (!doc->compare) + return 0; + else + Info(slide, 0, ((char *)slide, + " Function:\t%s\n\n Syntax:\t%s\n\n Purpose:\t%s", + doc->function, doc->syntax, doc->purpose)); + + return 1; +} + + + +void APIhelp(__G__ argc, argv) + __GDEF + int argc; + char **argv; +{ + if (argc > 1) { + struct APIDocStruct *doc; + + if (function_help(__G__ APIDoc, argv[1])) + return; +#ifdef SYSTEM_API_DETAILS + if (function_help(__G__ SYSTEM_API_DETAILS, argv[1])) + return; +#endif + Info(slide, 0, ((char *)slide, + "%s is not a documented command.\n\n", argv[1])); + } + + Info(slide, 0, ((char *)slide, "\ +This API provides a number of external C and REXX functions for handling\n\ +zipfiles in OS/2. Programmers are encouraged to expand this API.\n\ +\n\ +C functions: -- See unzip.h for details\n\ + UzpVer *UzpVersion(void);\n\ + int UzpMain(int argc, char *argv[]);\n\ + int UzpAltMain(int argc, char *argv[], UzpInit *init);\n\ + int UzpUnzipToMemory(char *zip, char *file, UzpBuffer *retstr);\n\ + int UzpFileTree(char *name, cbList(callBack),\n\ + char *cpInclude[], char *cpExclude[]);\n\n")); + +#ifdef SYSTEM_API_BRIEF + Info(slide, 0, ((char *)slide, SYSTEM_API_BRIEF)); +#endif + + Info(slide, 0, ((char *)slide, + "\nFor more information, type 'unzip -A '\n")); +} + +#endif /* API_DOC */ diff --git a/utils/Install/packzip/crc32.c b/utils/Install/packzip/crc32.c new file mode 100644 index 0000000000..cd05536108 --- /dev/null +++ b/utils/Install/packzip/crc32.c @@ -0,0 +1,56 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* $Id$ */ + +#define __CRC32_C /* identifies this source module */ + +#include "zip.h" + +#ifndef USE_ZLIB +#ifndef ASM_CRC + +#ifndef ZCONST +# define ZCONST const +#endif + +#ifdef CRC32 +# undef CRC32 +#endif +#define CRC32(c, b) (crc_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) +#define DO1(buf) crc = CRC32(crc, *buf++) +#define DO2(buf) DO1(buf); DO1(buf) +#define DO4(buf) DO2(buf); DO2(buf) +#define DO8(buf) DO4(buf); DO4(buf) + +/* ========================================================================= */ +ulg crc32(crc, buf, len) + register ulg crc; /* crc shift register */ + register ZCONST uch *buf; /* pointer to bytes to pump through */ + extent len; /* number of bytes in buf[] */ +/* Run a set of bytes through the crc shift register. If buf is a NULL + pointer, then initialize the crc shift register contents instead. + Return the current crc in either case. */ +{ + register ZCONST ulg near *crc_table; + + if (buf == NULL) return 0L; + + crc_table = get_crc_table(); + + crc = crc ^ 0xffffffffL; +#ifndef NO_UNROLLED_LOOPS + while (len >= 8) { + DO8(buf); + len -= 8; + } +#endif + if (len) do { + DO1(buf); + } while (--len); + return crc ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ +} +#endif /* !ASM_CRC */ +#endif /* !USE_ZLIB */ diff --git a/utils/Install/packzip/crc_i386.S b/utils/Install/packzip/crc_i386.S new file mode 100644 index 0000000000..5d0867f0e1 --- /dev/null +++ b/utils/Install/packzip/crc_i386.S @@ -0,0 +1,230 @@ +/* + * crc_i386.S, optimized CRC calculation function for Zip and UnZip, not + * copyrighted by Paul Kienitz and Christian Spieler. Last revised 12 Oct 97. + * + * GRR 961110: incorporated Scott Field optimizations from win32/crc_i386.asm + * => overall 6% speedup in "unzip -tq" on 9MB zipfile (486-66) + * + * SPC 970402: revised for Rodney Brown's optimizations (32-bit-wide + * aligned reads for most of the data from buffer), can be + * disabled by defining the macro NO_32_BIT_LOADS + * + * SPC 971012: added Rodney Brown's additional tweaks for 32-bit-optimized + * CPUs (like the Pentium Pro, Pentium II, and probably some + * Pentium clones). This optimization is controlled by the + * preprocessor switch "__686" and is disabled by default. + * (This default is based on the assumption that most users + * do not yet work on a Pentium Pro or Pentium II machine ...) + * + * FLAT memory model assumed. Calling interface: + * - args are pushed onto the stack from right to left, + * - return value is given in the EAX register, + * - all other registers (with exception of EFLAGS) are preserved. (With + * GNU C 2.7.x, %edx and %ecx are `scratch' registers, but preserving + * them nevertheless adds only 4 single byte instructions.) + * + * This source generates the function + * ulg crc32(ulg crc, ZCONST uch *buf, ulg len). + * + * The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. + * This results in shorter code at the expense of reduced performance. + */ + +/* This file is NOT used in conjunction with zlib. */ +#ifndef USE_ZLIB + +/* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix + * external symbols with an underline character '_'. + */ +#if defined(NO_UNDERLINE) || defined(__ELF__) +# define _crc32 crc32 +# define _get_crc_table get_crc_table +#endif +/* Use 16-byte alignment if your assembler supports it. Warning: gas + * uses a log(x) parameter (.align 4 means 16-byte alignment). On SVR4 + * the parameter is a number of bytes. + */ +#ifndef ALIGNMENT +# define ALIGNMENT .align 4,0x90 +#endif + +#if defined(i386) || defined(_i386) || defined(_I386) || defined(__i386) + +/* This version is for 386 Unix, OS/2, MSDOS in 32 bit mode (gcc & gas). + * Warning: it uses the AT&T syntax: mov source,dest + * This file is only optional. If you want to use the C version, + * remove -DASM_CRC from CFLAGS in Makefile and set OBJA to an empty string. + */ + + .file "crc_i386.S" + +#if defined(NO_STD_STACKFRAME) && defined(USE_STD_STACKFRAME) +# undef USE_STACKFRAME +#else + /* The default is to use standard stack frame entry, because it + * results in smaller code! + */ +# ifndef USE_STD_STACKFRAME +# define USE_STD_STACKFRAME +# endif +#endif + +#ifdef USE_STD_STACKFRAME +# define _STD_ENTRY pushl %ebp ; movl %esp,%ebp +# define arg1 8(%ebp) +# define arg2 12(%ebp) +# define arg3 16(%ebp) +# define _STD_LEAVE popl %ebp +#else /* !USE_STD_STACKFRAME */ +# define _STD_ENTRY +# define arg1 24(%esp) +# define arg2 28(%esp) +# define arg3 32(%esp) +# define _STD_LEAVE +#endif /* ?USE_STD_STACKFRAME */ + +/* + * These two (three) macros make up the loop body of the CRC32 cruncher. + * registers modified: + * eax : crc value "c" + * esi : pointer to next data byte (or lword) "buf++" + * registers read: + * edi : pointer to base of crc_table array + * scratch registers: + * ebx : index into crc_table array + * (requires upper three bytes = 0 when __686 is undefined) + */ +#ifndef __686 /* optimize for 386, 486, Pentium */ +#define Do_CRC /* c = (c >> 8) ^ table[c & 0xFF] */\ + movb %al, %bl ;/* tmp = c & 0xFF */\ + shrl $8, %eax ;/* c = (c >> 8) */\ + xorl (%edi, %ebx, 4), %eax ;/* c ^= table[tmp] */ +#else /* __686 : optimize for Pentium Pro and compatible CPUs */ +#define Do_CRC /* c = (c >> 8) ^ table[c & 0xFF] */\ + movzbl %al, %ebx ;/* tmp = c & 0xFF */\ + shrl $8, %eax ;/* c = (c >> 8) */\ + xorl (%edi, %ebx, 4), %eax ;/* c ^=table[tmp] */ +#endif /* ?__686 */ + +#define Do_CRC_byte /* c = (c >> 8) ^ table[(c^*buf++)&0xFF] */\ + xorb (%esi), %al ;/* c ^= *buf */\ + incl %esi ;/* buf++ */\ + Do_CRC + +#ifndef NO_32_BIT_LOADS +#define Do_CRC_lword \ + xorl (%esi), %eax ;/* c ^= *(ulg *)buf */\ + addl $4, %esi ;/* ((ulg *)buf)++ */\ + Do_CRC \ + Do_CRC \ + Do_CRC \ + Do_CRC +#endif /* !NO_32_BIT_LOADS */ + + + .text + + .globl _crc32 + +_crc32: /* ulg crc32(ulg crc, uch *buf, extent len) */ + _STD_ENTRY + pushl %edi + pushl %esi + pushl %ebx + pushl %edx + pushl %ecx + + movl arg2, %esi /* 2nd arg: uch *buf */ + subl %eax, %eax /* > if (!buf) */ + testl %esi, %esi /* > return 0; */ + jz .L_fine /* > else { */ + call _get_crc_table + movl %eax, %edi + movl arg1, %eax /* 1st arg: ulg crc */ +#ifndef __686 + subl %ebx, %ebx /* ebx=0; bl usable as dword */ +#endif + movl arg3, %ecx /* 3rd arg: extent len */ + notl %eax /* > c = ~crc; */ + +#ifndef NO_UNROLLED_LOOPS +# ifndef NO_32_BIT_LOADS + testl %ecx, %ecx + jz .L_bail + /* Assert now have positive length */ +.L_align_loop: + testl $3, %esi /* Align buf on lword boundary */ + jz .L_aligned_now + Do_CRC_byte + decl %ecx + jnz .L_align_loop +.L_aligned_now: +# endif /* !NO_32_BIT_LOADS */ + movl %ecx, %edx /* save len in edx */ + andl $7, %edx /* edx = len % 8 */ + shrl $3, %ecx /* ecx = len / 8 */ + jz .L_No_Eights +/* align loop head at start of 486 internal cache line !! */ + ALIGNMENT +.L_Next_Eight: +# ifndef NO_32_BIT_LOADS + /* Do_CRC_lword */ + xorl (%esi), %eax ;/* c ^= *(ulg *)buf */ + addl $4, %esi ;/* ((ulg *)buf)++ */ + Do_CRC + Do_CRC + Do_CRC + Do_CRC + /* Do_CRC_lword */ + xorl (%esi), %eax ;/* c ^= *(ulg *)buf */ + addl $4, %esi ;/* ((ulg *)buf)++ */ + Do_CRC + Do_CRC + Do_CRC + Do_CRC +# else /* NO_32_BIT_LOADS */ + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte +# endif /* ?NO_32_BIT_LOADS */ + decl %ecx + jnz .L_Next_Eight + +.L_No_Eights: + movl %edx, %ecx +#endif /* NO_UNROLLED_LOOPS */ + +#ifndef NO_JECXZ_SUPPORT + jecxz .L_bail /* > if (len) */ +#else + testl %ecx, %ecx /* > if (len) */ + jz .L_bail +#endif +/* align loop head at start of 486 internal cache line !! */ + ALIGNMENT +.L_loupe: /* > do { */ + Do_CRC_byte /* c = CRC32(c, *buf++); */ + decl %ecx /* > } while (--len); */ + jnz .L_loupe + +.L_bail: /* > } */ + notl %eax /* > return ~c; */ +.L_fine: + popl %ecx + popl %edx + popl %ebx + popl %esi + popl %edi + _STD_LEAVE + ret + +#else + error: this asm version is for 386 only +#endif /* i386 || _i386 || _I386 || __i386 */ + +#endif /* !USE_ZLIB */ diff --git a/utils/Install/packzip/crc_i386.asm b/utils/Install/packzip/crc_i386.asm new file mode 100644 index 0000000000..ea29282286 --- /dev/null +++ b/utils/Install/packzip/crc_i386.asm @@ -0,0 +1,229 @@ +; crc_i386.asm, optimized CRC calculation function for Zip and UnZip, not +; copyrighted by Paul Kienitz and Christian Spieler. Last revised 25 Mar 98. +; +; Revised 06-Oct-96, Scott Field (sfield@microsoft.com) +; fixed to assemble with masm by not using .model directive which makes +; assumptions about segment alignment. Also, +; avoid using loop, and j[e]cxz where possible. Use mov + inc, rather +; than lodsb, and other misc. changes resulting in the following performance +; increases: +; +; unrolled loops NO_UNROLLED_LOOPS +; *8 >8 <8 *8 >8 <8 +; +; +54% +42% +35% +82% +52% +25% +; +; first item in each table is input buffer length, even multiple of 8 +; second item in each table is input buffer length, > 8 +; third item in each table is input buffer length, < 8 +; +; Revised 02-Apr-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) +; Incorporated Rodney Brown's 32-bit-reads optimization as found in the +; UNIX AS source crc_i386.S. This new code can be disabled by defining +; the macro symbol NO_32_BIT_LOADS. +; +; Revised 12-Oct-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) +; Incorporated Rodney Brown's additional tweaks for 32-bit-optimized CPUs +; (like the Pentium Pro, Pentium II, and probably some Pentium clones). +; This optimization is controlled by the macro symbol __686 and is disabled +; by default. (This default is based on the assumption that most users +; do not yet work on a Pentium Pro or Pentium II machine ...) +; +; FLAT memory model assumed. +; +; The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. +; This results in shorter code at the expense of reduced performance. +; +; Revised 25-Mar-98, Cosmin Truta (cosmint@cs.ubbcluj.ro) +; Working without .model directive caused tasm32 version 5.0 to produce +; bad object code. The optimized alignments can be optionally disabled +; by defining NO_ALIGN, thus allowing to use .model flat. There is no need +; to define this macro if using other version of tasm. +; +;============================================================================== +; +; Do NOT assemble this source if external crc32 routine from zlib gets used. +; + IFNDEF USE_ZLIB +; + .386p + name crc_i386 + + IFDEF NO_ALIGN + .model flat + ENDIF + +extrn _get_crc_table:near ; ZCONST ulg near *get_crc_table(void); + +; + IFNDEF NO_STD_STACKFRAME + ; Use a `standard' stack frame setup on routine entry and exit. + ; Actually, this option is set as default, because it results + ; in smaller code !! +STD_ENTRY MACRO + push ebp + mov ebp,esp + ENDM + + Arg1 EQU 08H[ebp] + Arg2 EQU 0CH[ebp] + Arg3 EQU 10H[ebp] + +STD_LEAVE MACRO + pop ebp + ENDM + + ELSE ; NO_STD_STACKFRAME + +STD_ENTRY MACRO + ENDM + + Arg1 EQU 18H[esp] + Arg2 EQU 1CH[esp] + Arg3 EQU 20H[esp] + +STD_LEAVE MACRO + ENDM + + ENDIF ; ?NO_STD_STACKFRAME + +; These two (three) macros make up the loop body of the CRC32 cruncher. +; registers modified: +; eax : crc value "c" +; esi : pointer to next data byte (or dword) "buf++" +; registers read: +; edi : pointer to base of crc_table array +; scratch registers: +; ebx : index into crc_table array +; (requires upper three bytes = 0 when __686 is undefined) + IFNDEF __686 ; optimize for 386, 486, Pentium +Do_CRC MACRO + mov bl,al ; tmp = c & 0xFF + shr eax,8 ; c = (c >> 8) + xor eax,[edi+ebx*4] ; ^ table[tmp] + ENDM + ELSE ; __686 : optimize for Pentium Pro, Pentium II and compatible CPUs +Do_CRC MACRO + movzx ebx,al ; tmp = c & 0xFF + shr eax,8 ; c = (c >> 8) + xor eax,[edi+ebx*4] ; ^ table[tmp] + ENDM + ENDIF ; ?__686 +Do_CRC_byte MACRO + xor al, byte ptr [esi] ; c ^= *buf + inc esi ; buf++ + Do_CRC ; c = (c >> 8) ^ table[c & 0xFF] + ENDM + IFNDEF NO_32_BIT_LOADS +Do_CRC_dword MACRO + xor eax, dword ptr [esi] ; c ^= *(ulg *)buf + add esi, 4 ; ((ulg *)buf)++ + Do_CRC + Do_CRC + Do_CRC + Do_CRC + ENDM + ENDIF ; !NO_32_BIT_LOADS + + IFNDEF NO_ALIGN +_TEXT segment use32 para public 'CODE' + ELSE +_TEXT segment use32 + ENDIF + assume CS: _TEXT + + public _crc32 +_crc32 proc near ; ulg crc32(ulg crc, ZCONST uch *buf, extent len) + STD_ENTRY + push edi + push esi + push ebx + push edx + push ecx + + mov esi,Arg2 ; 2nd arg: uch *buf + sub eax,eax ;> if (!buf) + test esi,esi ;> return 0; + jz fine ;> else { + + call _get_crc_table + mov edi,eax + mov eax,Arg1 ; 1st arg: ulg crc + IFNDEF __686 + sub ebx,ebx ; ebx=0; make bl usable as a dword + ENDIF + mov ecx,Arg3 ; 3rd arg: extent len + not eax ;> c = ~crc; + + IFNDEF NO_UNROLLED_LOOPS + IFNDEF NO_32_BIT_LOADS + test ecx,ecx + je bail +align_loop: + test esi,3 ; align buf pointer on next + jz SHORT aligned_now ; dword boundary + Do_CRC_byte + dec ecx + jnz align_loop +aligned_now: + ENDIF ; !NO_32_BIT_LOADS + mov edx,ecx ; save len in edx + and edx,000000007H ; edx = len % 8 + shr ecx,3 ; ecx = len / 8 + jz SHORT No_Eights + IFNDEF NO_ALIGN +; align loop head at start of 486 internal cache line !! + align 16 + ENDIF +Next_Eight: + IFNDEF NO_32_BIT_LOADS + Do_CRC_dword + Do_CRC_dword + ELSE ; NO_32_BIT_LOADS + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + ENDIF ; ?NO_32_BIT_LOADS + dec ecx + jnz Next_Eight +No_Eights: + mov ecx,edx + + ENDIF ; NO_UNROLLED_LOOPS + IFNDEF NO_JECXZ_SUPPORT + jecxz bail ;> if (len) + ELSE + test ecx,ecx ;> if (len) + jz SHORT bail + ENDIF + IFNDEF NO_ALIGN +; align loop head at start of 486 internal cache line !! + align 16 + ENDIF +loupe: ;> do { + Do_CRC_byte ; c = CRC32(c, *buf++); + dec ecx ;> } while (--len); + jnz loupe + +bail: ;> } + not eax ;> return ~c; +fine: + pop ecx + pop edx + pop ebx + pop esi + pop edi + STD_LEAVE + ret +_crc32 endp + +_TEXT ends +; + ENDIF ; !USE_ZLIB +; +end diff --git a/utils/Install/packzip/crc_i386.c b/utils/Install/packzip/crc_i386.c new file mode 100644 index 0000000000..72e2c6b9dc --- /dev/null +++ b/utils/Install/packzip/crc_i386.c @@ -0,0 +1,215 @@ +/* crc_i386.c -- Microsoft 32-bit C/C++ adaptation of crc_i386.asm + * Created by Rodney Brown from crc_i386.asm, modified by Chr. Spieler. + * Last revised: 22-Mai-1998 + * + * Original coded (in crc_i386.asm) and put into the public domain + * by Paul Kienitz and Christian Spieler. + * + * Revised 06-Oct-96, Scott Field (sfield@microsoft.com) + * fixed to assemble with masm by not using .model directive which makes + * assumptions about segment alignment. Also, + * avoid using loop, and j[e]cxz where possible. Use mov + inc, rather + * than lodsb, and other misc. changes resulting in the following performance + * increases: + * + * unrolled loops NO_UNROLLED_LOOPS + * *8 >8 <8 *8 >8 <8 + * + * +54% +42% +35% +82% +52% +25% + * + * first item in each table is input buffer length, even multiple of 8 + * second item in each table is input buffer length, > 8 + * third item in each table is input buffer length, < 8 + * + * Revised 02-Apr-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) + * Incorporated Rodney Brown's 32-bit-reads optimization as found in the + * UNIX AS source crc_i386.S. This new code can be disabled by defining + * the macro symbol NO_32_BIT_LOADS. + * + * Revised 12-Oct-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) + * Incorporated Rodney Brown's additional tweaks for 32-bit-optimized CPUs + * (like the Pentium Pro, Pentium II, and probably some Pentium clones). + * This optimization is controlled by the macro symbol __686 and is disabled + * by default. (This default is based on the assumption that most users + * do not yet work on a Pentium Pro or Pentium II machine ...) + * + * Revised 16-Nov-97, Chr. Spieler: Made code compatible with Borland C++ + * 32-bit, removed unneeded kludge for potentially unknown movzx mnemonic, + * confirmed correct working with MS VC++ (32-bit). + * + * Revised 22-Mai-98, Peter Kunath, Chr. Spieler : The 16-Nov-97 revision broke + * MSVC 5.0. Inside preprocessor macros, each instruction is enclosed in its + * own __asm {...} construct. For MSVC, a "#pragma warning" was added to + * shut up the "no return value" warning message. + * + * FLAT memory model assumed. + * + * The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. + * This results in shorter code at the expense of reduced performance. + * + */ + +#include "zip.h" + +#ifndef USE_ZLIB + +#ifndef ZCONST +# define ZCONST const +#endif + +/* Select wether the following inline-assember code is supported. */ +#if (defined(_MSC_VER) && _MSC_VER >= 700) +#if (defined(_M_IX86) && _M_IX86 >= 300) +# define MSC_INLINE_ASM_32BIT_SUPPORT + /* Disable warning for no return value, typical of asm functions */ +# pragma warning( disable : 4035 ) +#endif +#endif + +#if (defined(__BORLANDC__) && __BORLANDC__ >= 452) +# define MSC_INLINE_ASM_32BIT_SUPPORT +#endif + +#ifdef MSC_INLINE_ASM_32BIT_SUPPORT +/* This code is intended for Microsoft C/C++ (32-bit) compatible compilers. */ + +/* + * These two (three) macros make up the loop body of the CRC32 cruncher. + * registers modified: + * eax : crc value "c" + * esi : pointer to next data byte (or dword) "buf++" + * registers read: + * edi : pointer to base of crc_table array + * scratch registers: + * ebx : index into crc_table array + * (requires upper three bytes = 0 when __686 is undefined) + */ +#ifndef __686 +#define Do_CRC { \ + __asm { mov bl, al }; \ + __asm { shr eax, 8 }; \ + __asm { xor eax, [edi+ebx*4] }; } +#else /* __686 */ +#define Do_CRC { \ + __asm { movzx ebx, al }; \ + __asm { shr eax, 8 }; \ + __asm { xor eax, [edi+ebx*4] }; } +#endif /* ?__686 */ + +#define Do_CRC_byte { \ + __asm { xor al, byte ptr [esi] }; \ + __asm { inc esi }; \ + Do_CRC; } + +#ifndef NO_32_BIT_LOADS +#define Do_CRC_dword { \ + __asm { xor eax, dword ptr [esi] }; \ + __asm { add esi, 4 }; \ + Do_CRC; \ + Do_CRC; \ + Do_CRC; \ + Do_CRC; } +#endif /* !NO_32_BIT_LOADS */ + +/* ========================================================================= */ +ulg crc32(crc, buf, len) + ulg crc; /* crc shift register */ + ZCONST uch *buf; /* pointer to bytes to pump through */ + extent len; /* number of bytes in buf[] */ +/* Run a set of bytes through the crc shift register. If buf is a NULL + pointer, then initialize the crc shift register contents instead. + Return the current crc in either case. */ +{ + __asm { + push edx + push ecx + + mov esi,buf ;/* 2nd arg: uch *buf */ + sub eax,eax ;/*> if (!buf) */ + test esi,esi ;/*> return 0; */ + jz fine ;/*> else { */ + + call get_crc_table + mov edi,eax + mov eax,crc ;/* 1st arg: ulg crc */ +#ifndef __686 + sub ebx,ebx ;/* ebx=0; => bl usable as a dword */ +#endif + mov ecx,len ;/* 3rd arg: extent len */ + not eax ;/*> c = ~crc; */ + +#ifndef NO_UNROLLED_LOOPS +# ifndef NO_32_BIT_LOADS + test ecx,ecx + je bail +align_loop: + test esi,3 ;/* align buf pointer on next */ + jz aligned_now ;/* dword boundary */ + } + Do_CRC_byte ; + __asm { + dec ecx + jnz align_loop +aligned_now: +# endif /* !NO_32_BIT_LOADS */ + mov edx,ecx ;/* save len in edx */ + and edx,000000007H ;/* edx = len % 8 */ + shr ecx,3 ;/* ecx = len / 8 */ + jz No_Eights +; align loop head at start of 486 internal cache line !! + align 16 +Next_Eight: + } +# ifndef NO_32_BIT_LOADS + Do_CRC_dword ; + Do_CRC_dword ; +# else /* NO_32_BIT_LOADS */ + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; +# endif /* ?NO_32_BIT_LOADS */ + __asm { + dec ecx + jnz Next_Eight +No_Eights: + mov ecx,edx + +#endif /* NO_UNROLLED_LOOPS */ +#ifndef NO_JECXZ_SUPPORT + jecxz bail ;/*> if (len) */ +#else + test ecx,ecx ;/*> if (len) */ + jz bail +#endif +; align loop head at start of 486 internal cache line !! + align 16 +loupe: ;/*> do { */ + } + Do_CRC_byte ;/* c = CRC32(c, *buf++); */ + __asm { + dec ecx ;/*> } while (--len); */ + jnz loupe + +bail: ;/*> } */ + not eax ;/*> return ~c; */ +fine: + pop ecx + pop edx + } +#ifdef NEED_RETURN + return _EAX; +#endif +} +#endif /* MSC_INLINE_ASM_32BIT_SUPPORT */ +#if (defined(_MSC_VER) && _MSC_VER >= 700) +#if (defined(_M_IX86) && _M_IX86 >= 300) + /* Reenable missing return value warning */ +# pragma warning( default : 4035 ) +#endif +#endif +#endif /* !USE_ZLIB */ diff --git a/utils/Install/packzip/crc_lcc.asm b/utils/Install/packzip/crc_lcc.asm new file mode 100644 index 0000000000..b3288a833e --- /dev/null +++ b/utils/Install/packzip/crc_lcc.asm @@ -0,0 +1,108 @@ +; crc_lcc.asm, optimized CRC calculation function for Zip and UnZip, not +; copyrighted by Paul Kienitz and Christian Spieler. Last revised 25 Mar 98. +; +; The code in this file has been copied verbatim from crc_i386.{asm|S}; +; only the assembler syntax and metacommands have been adapted to +; the habits of the free LCC-Win32 C compiler package. +; This version of the code uses the "optimized for i686" variant of +; crc_i386.{asm|S}. +; +; For more information (and a revision log), look into the original +; source files. +; + .text + .file "crc32.c" + .text + .type _crc32,function +_crc32: + pushl %ebp + movl %esp,%ebp + pushl %ecx + pushl %ebx + pushl %esi + pushl %edi + .line 34 + .line 37 + movl 12(%ebp),%esi + subl %eax,%eax + testl %esi,%esi + jz _$3 + .line 39 + call _get_crc_table + movl %eax,%edi + .line 41 + movl 8(%ebp),%eax + movl 16(%ebp),%ecx + notl %eax + testl %ecx,%ecx + jz _$4 +_$5: + testl $3,%esi + jz _$6 + xorb (%esi),%al + incl %esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + decl %ecx + jnz _$5 +_$6: + movl %ecx,%edx + andl $7,%edx + shrl $3,%ecx + jz _$8 +_$7: + xorl (%esi),%eax + addl $4,%esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + xorl (%esi),%eax + addl $4,%esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + decl %ecx + jnz _$7 +_$8: + movl %edx,%ecx + jecxz _$4 +_$9: + xorb (%esi),%al + incl %esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + decl %ecx + jnz _$9 +_$4: + xorl $0xffffffff,%eax +_$3: + .line 52 + popl %edi + popl %esi + popl %ebx + leave + ret +_$34: + .size _crc32,_$34-_crc32 + .globl _crc32 + .extern _get_crc_table diff --git a/utils/Install/packzip/crctab.c b/utils/Install/packzip/crctab.c new file mode 100644 index 0000000000..2f80aa2cfa --- /dev/null +++ b/utils/Install/packzip/crctab.c @@ -0,0 +1,219 @@ +/* crctab.c -- supply the CRC table needed for CRC-32 calculations. + * Copyright (C) 1995 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* $Id$ */ + +/* + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all + the information needed to generate CRC's on data a byte at a time for all + combinations of CRC register values and incoming bytes. +*/ + +#define __CRCTAB_C /* identifies this source module */ + +#include "zip.h" + +#if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) + +#ifndef ZCONST +# define ZCONST const +#endif + +#ifdef DYNAMIC_CRC_TABLE + +/* ========================================================================= + * Make the crc table. This function is needed only if you want to compute + * the table dynamically. + */ + +local void make_crc_table OF((void)); + +#if (defined(DYNALLOC_CRCTAB) && defined(REENTRANT)) + error: Dynamic allocation of CRC table not safe with reentrant code. +#endif /* DYNALLOC_CRCTAB && REENTRANT */ + +#ifdef DYNALLOC_CRCTAB + local ulg near *crc_table = NULL; +# if 0 /* not used, since sizeof("near *") <= sizeof(int) */ + /* Use this section when access to a "local int" is faster than access to + a "local pointer" (e.g.: i86 16bit code with far pointers). */ + local int crc_table_empty = 1; +# define CRC_TABLE_IS_EMPTY (crc_table_empty != 0) +# define MARK_CRCTAB_FILLED crc_table_empty = 0 +# define MARK_CRCTAB_EMPTY crc_table_empty = 1 +# else + /* Use this section on systems where the size of pointers and ints is + equal (e.g.: all 32bit systems). */ +# define CRC_TABLE_IS_EMPTY (crc_table == NULL) +# define MARK_CRCTAB_FILLED crc_table = crctab_p +# define MARK_CRCTAB_EMPTY crc_table = NULL +# endif +#else /* !DYNALLOC_CRCTAB */ + local ulg near crc_table[256]; + local int crc_table_empty = 1; +# define CRC_TABLE_IS_EMPTY (crc_table_empty != 0) +# define MARK_CRCTAB_FILLED crc_table_empty = 0 +#endif /* ?DYNALLOC_CRCTAB */ + + +local void make_crc_table() +{ + ulg c; /* crc shift register */ + int n; /* counter for all possible eight bit values */ + int k; /* byte being shifted into crc apparatus */ +#ifdef DYNALLOC_CRCTAB + ulg near *crctab_p; /* temporary pointer to allocated crc_table area */ +#else /* !DYNALLOC_CRCTAB */ +# define crctab_p crc_table +#endif /* DYNALLOC_CRCTAB */ + +#ifdef COMPUTE_XOR_PATTERN + /* This piece of code has been left here to explain how the XOR pattern + * used in the creation of the crc_table values can be recomputed. + * For production versions of this function, it is more efficient to + * supply the resultant pattern at compile time. + */ + ulg xor; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static uch p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* make exclusive-or pattern from polynomial (0xedb88320L) */ + xor = 0L; + for (i = 0; i < sizeof(p)/sizeof(uch); i++) + xor |= 1L << (31 - p[i]); +#else +# define xor 0xedb88320L +#endif + +#ifdef DYNALLOC_CRCTAB + crctab_p = (ulg near *) nearmalloc (256*sizeof(ulg)); + if (crctab_p == NULL) { + ziperr(ZE_MEM, "crc_table allocation"); + } +#endif /* DYNALLOC_CRCTAB */ + + for (n = 0; n < 256; n++) { + c = (ulg)n; + for (k = 8; k; k--) + c = c & 1 ? xor ^ (c >> 1) : c >> 1; + crctab_p[n] = c; + } + MARK_CRCTAB_FILLED; +} + +#else /* !DYNAMIC_CRC_TABLE */ + +#ifdef DYNALLOC_CRCTAB + error: Inconsistent flags, DYNALLOC_CRCTAB without DYNAMIC_CRC_TABLE. +#endif + +/* ======================================================================== + * Table of CRC-32's of all single-byte values (made by make_crc_table) + */ +local ZCONST ulg near crc_table[256] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; +#endif /* ?DYNAMIC_CRC_TABLE */ + +/* use "OF((void))" here to work around a Borland TC++ 1.0 problem */ +#ifdef USE_ZLIB +ZCONST uLongf *get_crc_table OF((void)) +#else +ZCONST ulg near *get_crc_table OF((void)) +#endif +{ +#ifdef DYNAMIC_CRC_TABLE + if (CRC_TABLE_IS_EMPTY) + make_crc_table(); +#endif +#ifdef USE_ZLIB + return (ZCONST uLongf *)crc_table; +#else + return (ZCONST ulg near *)crc_table; +#endif +} + +#ifdef DYNALLOC_CRCTAB +void free_crc_table() +{ + if (!CRC_TABLE_IS_EMPTY) + { + nearfree((ulg near *)crc_table); + MARK_CRCTAB_EMPTY; + } +} +#endif + +#endif /* !USE_ZLIB || USE_OWN_CRCTAB */ diff --git a/utils/Install/packzip/crypt.c b/utils/Install/packzip/crypt.c new file mode 100644 index 0000000000..0dbe227f81 --- /dev/null +++ b/utils/Install/packzip/crypt.c @@ -0,0 +1,12 @@ +/* + crypt.c (dummy version) by Info-ZIP. Last revised: 15 Aug 98 + + This is a non-functional version of Info-ZIP's crypt.c encryption/ + decryption code for Zip, ZipCloak, UnZip and fUnZip. This file is + not copyrighted and may be distributed freely. :-) See the "WHERE" + file for sites from which to obtain the full encryption/decryption + sources (zcrypt28.zip or later). + */ + +/* something "externally visible" to shut up compiler/linker warnings */ +int zcr_dummy; diff --git a/utils/Install/packzip/envargs.c b/utils/Install/packzip/envargs.c new file mode 100644 index 0000000000..76a41e8997 --- /dev/null +++ b/utils/Install/packzip/envargs.c @@ -0,0 +1,314 @@ +/*----------------------------------------------------------------* + | envargs - add default options from environment to command line + |---------------------------------------------------------------- + | Author: Bill Davidsen, original 10/13/91, revised 23 Oct 1991. + | This program is in the public domain. + |---------------------------------------------------------------- + | Minor program notes: + | 1. Yes, the indirection is a tad complex + | 2. Parentheses were added where not needed in some cases + | to make the action of the code less obscure. + |---------------------------------------------------------------- + | UnZip notes: 24 May 92 ("v1.4"): + | 1. #include "unzip.h" for prototypes (24 May 92) + | 2. changed ch to type char (24 May 92) + | 3. added an ifdef to avoid Borland warnings (24 May 92) + | 4. included Rich Wales' mksargs() routine (for MS-DOS, maybe + | OS/2? NT?) (4 Dec 93) + | 5. added alternate-variable string envstr2 (21 Apr 94) + | 6. added support for quoted arguments (6 Jul 96) + *----------------------------------------------------------------*/ + + +#define ENVARGS_C +#define UNZIP_INTERNAL +#include "unzip.h" + +#ifdef __EMX__ /* emx isspace() returns TRUE on extended ASCII !! */ +# define ISspace(c) ((c) & 0x80 ? 0 : isspace((unsigned)c)) +#else +# define ISspace(c) isspace((unsigned)c) +#endif /* ?__EMX__ */ + +static int count_args OF((ZCONST char *)); +static void mem_err OF((__GPRO)); + +static ZCONST char Far NoMemArguments[] = + "envargs: cannot get memory for arguments"; + + +void envargs(__G__ Pargc, Pargv, envstr, envstr2) + __GDEF + int *Pargc; + char ***Pargv; + ZCONST char *envstr, *envstr2; +{ +#ifndef RISCOS + char *getenv(); +#endif + char *envptr; /* value returned by getenv */ + char *bufptr; /* copy of env info */ + int argc = 0; /* internal arg count */ + register int ch; /* spare temp value */ + char **argv; /* internal arg vector */ + char **argvect; /* copy of vector address */ + + /* see if anything in the environment */ + if ((envptr = getenv(envstr)) != (char *)NULL) /* usual var */ + while (ISspace(*envptr)) /* must discard leading spaces */ + envptr++; + if (envptr == (char *)NULL || *envptr == '\0') + if ((envptr = getenv(envstr2)) != (char *)NULL) /* alternate var */ + while (ISspace(*envptr)) + envptr++; + if (envptr == (char *)NULL || *envptr == '\0') + return; + + bufptr = malloc(1 + strlen(envptr)); + if (bufptr == (char *)NULL) + mem_err(__G); +#if (defined(WIN32) || defined(WINDLL)) +# ifdef WIN32 + if (IsWinNT()) { + /* SPC: don't know codepage of 'real' WinNT console */ + strcpy(bufptr, envptr); + } else { + /* Win95 environment is DOS and uses OEM character coding */ + OEM_TO_INTERN(envptr, bufptr); + } +# else /* !WIN32 */ + /* DOS environment uses OEM codepage */ + OEM_TO_INTERN(envptr, bufptr); +# endif +#else /* !(WIN32 || WINDLL) */ + strcpy(bufptr, envptr); +#endif /* ?(WIN32 || WINDLL) */ + + /* count the args so we can allocate room for them */ + argc = count_args(bufptr); + /* allocate a vector large enough for all args */ + argv = (char **)malloc((argc + *Pargc + 1) * sizeof(char *)); + if (argv == (char **)NULL) { + free(bufptr); + mem_err(__G); + } + argvect = argv; + + /* copy the program name first, that's always true */ + *(argv++) = *((*Pargv)++); + + /* copy the environment args next, may be changed */ + do { +#if defined(AMIGA) || defined(UNIX) + if (*bufptr == '"') { + char *argstart = ++bufptr; + + *(argv++) = argstart; + for (ch = *bufptr; ch != '\0' && ch != '\"'; ch = *(++bufptr)) + if (ch == '\\' && bufptr[1] != '\0') + ++bufptr; /* skip char after backslash */ + if (ch != '\0') + *(bufptr++) = '\0'; /* overwrite trailing " */ + + /* remove escape characters */ + while ((argstart = strchr(argstart, '\\')) != (char *)NULL) { + strcpy(argstart, argstart + 1); + if (*argstart) + ++argstart; + } + } else { + *(argv++) = bufptr; + while ((ch = *bufptr) != '\0' && !ISspace(ch)) + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; + } +#else +#ifdef DOS_FLX_OS2_W32 + /* we do not support backslash-quoting of quotes in quoted + * strings under DOS_OS2_W32, because backslashes are directory + * separators and double quotes are illegal in filenames */ + if (*bufptr == '"') { + *(argv++) = ++bufptr; + while ((ch = *bufptr) != '\0' && ch != '\"') + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; + } else { + *(argv++) = bufptr; + while ((ch = *bufptr) != '\0' && !ISspace(ch)) + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; + } +#else + *(argv++) = bufptr; + while ((ch = *bufptr) != '\0' && !ISspace(ch)) + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; +#endif /* ?DOS_FLX_OS2_W32 */ +#endif /* ?(AMIGA || UNIX) */ + while ((ch = *bufptr) != '\0' && ISspace(ch)) + ++bufptr; + } while (ch); + + /* now save old argc and copy in the old args */ + argc += *Pargc; + while (--(*Pargc)) + *(argv++) = *((*Pargv)++); + + /* finally, add a NULL after the last arg, like Unix */ + *argv = (char *)NULL; + + /* save the values and return */ + *Pargv = argvect; + *Pargc = argc; +} + + + +static int count_args(s) + ZCONST char *s; +{ + int count = 0; + char ch; + + do { + /* count and skip args */ + ++count; +#if defined(AMIGA) || defined(UNIX) + if (*s == '\"') { + for (ch = *(++s); ch != '\0' && ch != '\"'; ch = *(++s)) + if (ch == '\\' && s[1] != '\0') + ++s; + if (*s) + ++s; /* trailing quote */ + } else +#else +#ifdef DOS_FLX_OS2_W32 + if (*s == '\"') { + ++s; /* leading quote */ + while ((ch = *s) != '\0' && ch != '\"') + ++s; + if (*s) + ++s; /* trailing quote */ + } else +#endif /* DOS_FLX_OS2_W32 */ +#endif /* ?(AMIGA || UNIX) */ + while ((ch = *s) != '\0' && !ISspace(ch)) /* note else-clauses above */ + ++s; + while ((ch = *s) != '\0' && ISspace(ch)) + ++s; + } while (ch); + + return count; +} + + + +static void mem_err(__G) + __GDEF +{ + perror(LoadFarString(NoMemArguments)); + DESTROYGLOBALS() + EXIT(PK_MEM); +} + + + +#ifdef TEST + +main(argc, argv) + int argc; + char **argv; +{ + int i; + + pipeit("Orig argv: %p\n", argv); + dump_args(argc, argv); + envargs(__G__ &argc, &argv, "ENVTEST"); + pipeit(" New argv: %p\n", argv); + dump_args(argc, argv); +} + + + +dump_args(argc, argv) + int argc; + char *argv[]; +{ + int i; + + pipeit("\nDump %d args:\n", argc); + for (i = 0; i < argc; ++i) + pipeit("%3d %s\n", i, argv[i]); +} + +#endif /* TEST */ + + + +#ifdef MSDOS /* DOS_OS2? DOS_OS2_W32? */ + +/* + * void mksargs(int *argcp, char ***argvp) + * + * Substitutes the extended command line argument list produced by + * the MKS Korn Shell in place of the command line info from DOS. + * + * The MKS shell gets around DOS's 128-byte limit on the length of + * a command line by passing the "real" command line in the envi- + * ronment. The "real" arguments are flagged by prepending a tilde + * (~) to each one. + * + * This "mksargs" routine creates a new argument list by scanning + * the environment from the beginning, looking for strings begin- + * ning with a tilde character. The new list replaces the original + * "argv" (pointed to by "argvp"), and the number of arguments + * in the new list replaces the original "argc" (pointed to by + * "argcp"). + * + * Rich Wales + */ +void mksargs(argcp, argvp) + int *argcp; + char ***argvp; +{ +#ifndef MSC /* declared differently in MSC 7.0 headers, at least */ +#ifndef __WATCOMC__ + extern char **environ; /* environment */ +#endif +#endif + char **envp; /* pointer into environment */ + char **newargv; /* new argument list */ + char **argp; /* pointer into new arg list */ + int newargc; /* new argument count */ + + /* sanity check */ + if (environ == NULL || argcp == NULL || argvp == NULL || *argvp == NULL) + return; + + /* find out how many environment arguments there are */ + for (envp = environ, newargc = 0; *envp != NULL && (*envp)[0] == '~'; + envp++, newargc++) + ; + if (newargc == 0) + return; /* no environment arguments */ + + /* set up new argument list */ + newargv = (char **) malloc(sizeof(char **) * (newargc+1)); + if (newargv == NULL) + return; /* malloc failed */ + + for (argp = newargv, envp = environ; *envp != NULL && (*envp)[0] == '~'; + *argp++ = &(*envp++)[1]) + ; + *argp = NULL; /* null-terminate the list */ + + /* substitute new argument list in place of old one */ + *argcp = newargc; + *argvp = newargv; +} + +#endif /* MSDOS */ diff --git a/utils/Install/packzip/explode.c b/utils/Install/packzip/explode.c new file mode 100644 index 0000000000..c1a8f80032 --- /dev/null +++ b/utils/Install/packzip/explode.c @@ -0,0 +1,871 @@ +/* explode.c -- put in the public domain by Mark Adler + version c15, 6 July 1996 */ + + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + + History: + vers date who what + ---- --------- -------------- ------------------------------------ + c1 30 Mar 92 M. Adler explode that uses huft_build from inflate + (this gives over a 70% speed improvement + over the original unimplode.c, which + decoded a bit at a time) + c2 4 Apr 92 M. Adler fixed bug for file sizes a multiple of 32k. + c3 10 Apr 92 M. Adler added a little memory tracking if DEBUG + c4 11 Apr 92 M. Adler added NOMEMCPY do kill use of memcpy() + c5 21 Apr 92 M. Adler added the WSIZE #define to allow reducing + the 32K window size for specialized + applications. + c6 31 May 92 M. Adler added typecasts to eliminate some warnings + c7 27 Jun 92 G. Roelofs added more typecasts. + c8 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch. + c9 19 Jul 93 J. Bush added more typecasts (to return values); + made l[256] array static for Amiga. + c10 8 Oct 93 G. Roelofs added used_csize for diagnostics; added + buf and unshrink arguments to flush(); + undef'd various macros at end for Turbo C; + removed NEXTBYTE macro (now in unzip.h) + and bytebuf variable (not used); changed + memset() to memzero(). + c11 9 Jan 94 M. Adler fixed incorrect used_csize calculation. + c12 9 Apr 94 G. Roelofs fixed split comments on preprocessor lines + to avoid bug in Encore compiler. + c13 25 Aug 94 M. Adler fixed distance-length comment (orig c9 fix) + c14 22 Nov 95 S. Maxwell removed unnecessary "static" on auto array + c15 6 Jul 96 W. Haidinger added ulg typecasts to flush() calls. + c16 8 Feb 98 C. Spieler added ZCONST modifiers to const tables + and #ifdef DEBUG around debugging code. + c16b 25 Mar 98 C. Spieler modified DLL code for slide redirection. + */ + + +/* + Explode imploded (PKZIP method 6 compressed) data. This compression + method searches for as much of the current string of bytes (up to a length + of ~320) in the previous 4K or 8K bytes. If it doesn't find any matches + (of at least length 2 or 3), it codes the next byte. Otherwise, it codes + the length of the matched string and its distance backwards from the + current position. Single bytes ("literals") are preceded by a one (a + single bit) and are either uncoded (the eight bits go directly into the + compressed stream for a total of nine bits) or Huffman coded with a + supplied literal code tree. If literals are coded, then the minimum match + length is three, otherwise it is two. + + There are therefore four kinds of imploded streams: 8K search with coded + literals (min match = 3), 4K search with coded literals (min match = 3), + 8K with uncoded literals (min match = 2), and 4K with uncoded literals + (min match = 2). The kind of stream is identified in two bits of a + general purpose bit flag that is outside of the compressed stream. + + Distance-length pairs for matched strings are preceded by a zero bit (to + distinguish them from literals) and are always coded. The distance comes + first and is either the low six (4K) or low seven (8K) bits of the + distance (uncoded), followed by the high six bits of the distance coded. + Then the length is six bits coded (0..63 + min match length), and if the + maximum such length is coded, then it's followed by another eight bits + (uncoded) to be added to the coded length. This gives a match length + range of 2..320 or 3..321 bytes. + + The literal, length, and distance codes are all represented in a slightly + compressed form themselves. What is sent are the lengths of the codes for + each value, which is sufficient to construct the codes. Each byte of the + code representation is the code length (the low four bits representing + 1..16), and the number of values sequentially with that length (the high + four bits also representing 1..16). There are 256 literal code values (if + literals are coded), 64 length code values, and 64 distance code values, + in that order at the beginning of the compressed stream. Each set of code + values is preceded (redundantly) with a byte indicating how many bytes are + in the code description that follows, in the range 1..256. + + The codes themselves are decoded using tables made by huft_build() from + the bit lengths. That routine and its comments are in the inflate.c + module. + */ + +#define UNZIP_INTERNAL +#include "unzip.h" /* must supply slide[] (uch) array and NEXTBYTE macro */ + +#ifndef WSIZE +# define WSIZE 0x8000 /* window size--must be a power of two, and */ +#endif /* at least 8K for zip's implode method */ + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) +# define wsize G._wsize +#else +# define wsize WSIZE +#endif + +/* routines here */ +static int get_tree OF((__GPRO__ unsigned *l, unsigned n)); +static int explode_lit8 OF((__GPRO__ struct huft *tb, struct huft *tl, + struct huft *td, int bb, int bl, int bd)); +static int explode_lit4 OF((__GPRO__ struct huft *tb, struct huft *tl, + struct huft *td, int bb, int bl, int bd)); +static int explode_nolit8 OF((__GPRO__ struct huft *tl, struct huft *td, + int bl, int bd)); +static int explode_nolit4 OF((__GPRO__ struct huft *tl, struct huft *td, + int bl, int bd)); +int explode OF((__GPRO)); + + +/* The implode algorithm uses a sliding 4K or 8K byte window on the + uncompressed stream to find repeated byte strings. This is implemented + here as a circular buffer. The index is updated simply by incrementing + and then and'ing with 0x0fff (4K-1) or 0x1fff (8K-1). Here, the 32K + buffer of inflate is used, and it works just as well to always have + a 32K circular buffer, so the index is anded with 0x7fff. This is + done to allow the window to also be used as the output buffer. */ +/* This must be supplied in an external module useable like "uch slide[8192];" + or "uch *slide;", where the latter would be malloc'ed. In unzip, slide[] + is actually a 32K area for use by inflate, which uses a 32K sliding window. + */ + + +/* Tables for length and distance */ +static ZCONST ush cplen2[] = + {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65}; +static ZCONST ush cplen3[] = + {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66}; +static ZCONST ush extra[] = + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8}; +static ZCONST ush cpdist4[] = + {1, 65, 129, 193, 257, 321, 385, 449, 513, 577, 641, 705, + 769, 833, 897, 961, 1025, 1089, 1153, 1217, 1281, 1345, 1409, 1473, + 1537, 1601, 1665, 1729, 1793, 1857, 1921, 1985, 2049, 2113, 2177, + 2241, 2305, 2369, 2433, 2497, 2561, 2625, 2689, 2753, 2817, 2881, + 2945, 3009, 3073, 3137, 3201, 3265, 3329, 3393, 3457, 3521, 3585, + 3649, 3713, 3777, 3841, 3905, 3969, 4033}; +static ZCONST ush cpdist8[] = + {1, 129, 257, 385, 513, 641, 769, 897, 1025, 1153, 1281, + 1409, 1537, 1665, 1793, 1921, 2049, 2177, 2305, 2433, 2561, 2689, + 2817, 2945, 3073, 3201, 3329, 3457, 3585, 3713, 3841, 3969, 4097, + 4225, 4353, 4481, 4609, 4737, 4865, 4993, 5121, 5249, 5377, 5505, + 5633, 5761, 5889, 6017, 6145, 6273, 6401, 6529, 6657, 6785, 6913, + 7041, 7169, 7297, 7425, 7553, 7681, 7809, 7937, 8065}; + + +/* Macros for inflate() bit peeking and grabbing. + The usage is: + + NEEDBITS(j) + x = b & mask_bits[j]; + DUMPBITS(j) + + where NEEDBITS makes sure that b has at least j bits in it, and + DUMPBITS removes the bits from b. The macros use the variable k + for the number of bits in b. Normally, b and k are register + variables for speed. + */ + +#define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} + + + +static int get_tree(__G__ l, n) + __GDEF +unsigned *l; /* bit lengths */ +unsigned n; /* number expected */ +/* Get the bit lengths for a code representation from the compressed + stream. If get_tree() returns 4, then there is an error in the data. + Otherwise zero is returned. */ +{ + unsigned i; /* bytes remaining in list */ + unsigned k; /* lengths entered */ + unsigned j; /* number of codes */ + unsigned b; /* bit length for those codes */ + + + /* get bit lengths */ + i = NEXTBYTE + 1; /* length/count pairs to read */ + k = 0; /* next code */ + do { + b = ((j = NEXTBYTE) & 0xf) + 1; /* bits in code (1..16) */ + j = ((j & 0xf0) >> 4) + 1; /* codes with those bits (1..16) */ + if (k + j > n) + return 4; /* don't overflow l[] */ + do { + l[k++] = b; + } while (--j); + } while (--i); + return k != n ? 4 : 0; /* should have read n of them */ +} + + + +static int explode_lit8(__G__ tb, tl, td, bb, bl, bd) + __GDEF +struct huft *tb, *tl, *td; /* literal, length, and distance tables */ +int bb, bl, bd; /* number of bits decoded by those */ +/* Decompress the imploded data using coded literals and an 8K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned mb, ml, md; /* masks for bb, bl, and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + mb = mask_bits[bb]; /* precompute masks for speed */ + ml = mask_bits[bl]; + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--decode it */ + { + DUMPBITS(1) + s--; + NEEDBITS((unsigned)bb) /* get coded literal */ + if ((e = (t = tb + ((~(unsigned)b) & mb))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + redirSlide[w++] = (uch)t->v.n; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(7) /* get distance low bits */ + d = (unsigned)b & 0x7f; + DUMPBITS(7) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +static int explode_lit4(__G__ tb, tl, td, bb, bl, bd) + __GDEF +struct huft *tb, *tl, *td; /* literal, length, and distance tables */ +int bb, bl, bd; /* number of bits decoded by those */ +/* Decompress the imploded data using coded literals and a 4K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned mb, ml, md; /* masks for bb, bl, and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + mb = mask_bits[bb]; /* precompute masks for speed */ + ml = mask_bits[bl]; + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--decode it */ + { + DUMPBITS(1) + s--; + NEEDBITS((unsigned)bb) /* get coded literal */ + if ((e = (t = tb + ((~(unsigned)b) & mb))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + redirSlide[w++] = (uch)t->v.n; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(6) /* get distance low bits */ + d = (unsigned)b & 0x3f; + DUMPBITS(6) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +static int explode_nolit8(__G__ tl, td, bl, bd) + __GDEF +struct huft *tl, *td; /* length and distance decoder tables */ +int bl, bd; /* number of bits decoded by tl[] and td[] */ +/* Decompress the imploded data using uncoded literals and an 8K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--get eight bits */ + { + DUMPBITS(1) + s--; + NEEDBITS(8) + redirSlide[w++] = (uch)b; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + DUMPBITS(8) + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(7) /* get distance low bits */ + d = (unsigned)b & 0x7f; + DUMPBITS(7) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +static int explode_nolit4(__G__ tl, td, bl, bd) + __GDEF +struct huft *tl, *td; /* length and distance decoder tables */ +int bl, bd; /* number of bits decoded by tl[] and td[] */ +/* Decompress the imploded data using uncoded literals and a 4K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--get eight bits */ + { + DUMPBITS(1) + s--; + NEEDBITS(8) + redirSlide[w++] = (uch)b; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + DUMPBITS(8) + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(6) /* get distance low bits */ + d = (unsigned)b & 0x3f; + DUMPBITS(6) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +int explode(__G) + __GDEF +/* Explode an imploded compressed stream. Based on the general purpose + bit flag, decide on coded or uncoded literals, and an 8K or 4K sliding + window. Construct the literal (if any), length, and distance codes and + the tables needed to decode them (using huft_build() from inflate.c), + and call the appropriate routine for the type of data in the remainder + of the stream. The four routines are nearly identical, differing only + in whether the literal is decoded or simply read in, and in how many + bits are read in, uncoded, for the low distance bits. */ +{ + unsigned r; /* return codes */ + struct huft *tb; /* literal code table */ + struct huft *tl; /* length code table */ + struct huft *td; /* distance code table */ + int bb; /* bits for tb */ + int bl; /* bits for tl */ + int bd; /* bits for td */ + unsigned l[256]; /* bit lengths for codes */ + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; + else + wsize = WSIZE, redirSlide = slide; +#endif + + /* Tune base table sizes. Note: I thought that to truly optimize speed, + I would have to select different bl, bd, and bb values for different + compressed file sizes. I was surprised to find out that the values of + 7, 7, and 9 worked best over a very wide range of sizes, except that + bd = 8 worked marginally better for large compressed sizes. */ + bl = 7; + bd = (G.csize + G.incnt) > 200000L ? 8 : 7; + + + /* With literal tree--minimum match length is 3 */ +#ifdef DEBUG + G.hufts = 0; /* initialize huft's malloc'ed */ +#endif + if (G.lrec.general_purpose_bit_flag & 4) + { + bb = 9; /* base table size for literals */ + if ((r = get_tree(__G__ l, 256)) != 0) + return (int)r; + if ((r = huft_build(__G__ l, 256, 256, NULL, NULL, &tb, &bb)) != 0) + { + if (r == 1) + huft_free(tb); + return (int)r; + } + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if ((r = huft_build(__G__ l, 64, 0, cplen3, extra, &tl, &bl)) != 0) + { + if (r == 1) + huft_free(tl); + huft_free(tb); + return (int)r; + } + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if (G.lrec.general_purpose_bit_flag & 2) /* true if 8K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist8, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + huft_free(tb); + return (int)r; + } + r = explode_lit8(__G__ tb, tl, td, bb, bl, bd); + } + else /* else 4K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist4, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + huft_free(tb); + return (int)r; + } + r = explode_lit4(__G__ tb, tl, td, bb, bl, bd); + } + huft_free(td); + huft_free(tl); + huft_free(tb); + } + else + + + /* No literal tree--minimum match length is 2 */ + { + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if ((r = huft_build(__G__ l, 64, 0, cplen2, extra, &tl, &bl)) != 0) + { + if (r == 1) + huft_free(tl); + return (int)r; + } + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if (G.lrec.general_purpose_bit_flag & 2) /* true if 8K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist8, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + return (int)r; + } + r = explode_nolit8(__G__ tl, td, bl, bd); + } + else /* else 4K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist4, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + return (int)r; + } + r = explode_nolit4(__G__ tl, td, bl, bd); + } + huft_free(td); + huft_free(tl); + } + Trace((stderr, "<%u > ", G.hufts)); + return (int)r; +} + +/* so explode.c and inflate.c can be compiled together into one object: */ +#undef NEXTBYTE +#undef NEEDBITS +#undef DUMPBITS diff --git a/utils/Install/packzip/extract.c b/utils/Install/packzip/extract.c new file mode 100644 index 0000000000..5fd2577c31 --- /dev/null +++ b/utils/Install/packzip/extract.c @@ -0,0 +1,1985 @@ +/*--------------------------------------------------------------------------- + + extract.c + + This file contains the high-level routines ("driver routines") for extrac- + ting and testing zipfile members. It calls the low-level routines in files + explode.c, inflate.c, unreduce.c and unshrink.c. + + Contains: extract_or_test_files() + store_info() + extract_or_test_member() + TestExtraField() + test_compr_eb() + memextract() + memflush() + fnfilter() + + ---------------------------------------------------------------------------*/ + + +#define EXTRACT_C +#define UNZIP_INTERNAL +#include "unzip.h" +#include "crypt.h" +#ifdef WINDLL +# ifdef POCKET_UNZIP +# include "wince/intrface.h" +# else +# include "windll/windll.h" +# endif +#endif + +#define GRRDUMP(buf,len) { \ + int i, j; \ + \ + for (j = 0; j < (len)/16; ++j) { \ + pipeit(" "); \ + for (i = 0; i < 16; ++i) \ + pipeit("%02x ", (uch)(buf)[i+(j<<4)]); \ + pipeit("\n "); \ + for (i = 0; i < 16; ++i) { \ + char c = (char)(buf)[i+(j<<4)]; \ + \ + if (c == '\n') \ + pipeit("\\n "); \ + else if (c == '\r') \ + pipeit("\\r "); \ + else \ + pipeit(" %c ", c); \ + } \ + pipeit("\n"); \ + } \ + if ((len) % 16) { \ + pipeit(" "); \ + for (i = j<<4; i < (len); ++i) \ + pipeit("%02x ", (uch)(buf)[i]); \ + pipeit("\n "); \ + for (i = j<<4; i < (len); ++i) { \ + char c = (char)(buf)[i]; \ + \ + if (c == '\n') \ + pipeit("\\n "); \ + else if (c == '\r') \ + pipeit("\\r "); \ + else \ + pipeit(" %c ", c); \ + } \ + pipeit("\n"); \ + } \ +} + +static int store_info OF((__GPRO)); +static int extract_or_test_member OF((__GPRO)); +#ifndef SFX + static int TestExtraField OF((__GPRO__ uch *ef, unsigned ef_len)); + static int test_compr_eb OF((__GPRO__ uch *eb, unsigned eb_size, + unsigned compr_offset, + int (*test_uc_ebdata)(__GPRO__ uch *eb, unsigned eb_size, + uch *eb_ucptr, ulg eb_ucsize))); +#endif +#ifdef SET_DIR_ATTRIB + static int dircomp OF((ZCONST zvoid *a, ZCONST zvoid *b)); +#endif + + + +/*******************************/ +/* Strings used in extract.c */ +/*******************************/ + +static ZCONST char Far VersionMsg[] = + " skipping: %-22s need %s compat. v%u.%u (can do v%u.%u)\n"; +static ZCONST char Far ComprMsgNum[] = + " skipping: %-22s unsupported compression method %u\n"; +#ifndef SFX + static ZCONST char Far ComprMsgName[] = + " skipping: %-22s `%s' method not supported\n"; + static ZCONST char Far CmprNone[] = "store"; + static ZCONST char Far CmprShrink[] = "shrink"; + static ZCONST char Far CmprReduce[] = "reduce"; + static ZCONST char Far CmprImplode[] = "implode"; + static ZCONST char Far CmprTokenize[] = "tokenize"; + static ZCONST char Far CmprDeflate[] = "deflate"; + static ZCONST char Far CmprEnDeflate[] = "enhanced deflate"; + static ZCONST char Far CmprDCLImplode[] = "DCL implode"; + static ZCONST char Far *ComprNames[NUM_METHODS] = { + CmprNone, CmprShrink, CmprReduce, CmprReduce, CmprReduce, CmprReduce, + CmprImplode, CmprTokenize, CmprDeflate, CmprEnDeflate, CmprDCLImplode + }; +#endif /* !SFX */ +static ZCONST char Far FilNamMsg[] = + "%s: bad filename length (%s)\n"; +static ZCONST char Far ExtFieldMsg[] = + "%s: bad extra field length (%s)\n"; +static ZCONST char Far OffsetMsg[] = + "file #%u: bad zipfile offset (%s): %ld\n"; +static ZCONST char Far ExtractMsg[] = + "%8sing: %-22s %s%s"; +#ifndef SFX + static ZCONST char Far LengthMsg[] = + "%s %s: %ld bytes required to uncompress to %lu bytes;\n %s\ + supposed to require %lu bytes%s%s%s\n"; +#endif + +static ZCONST char Far BadFileCommLength[] = "%s: bad file comment length\n"; +static ZCONST char Far LocalHdrSig[] = "local header sig"; +static ZCONST char Far BadLocalHdr[] = "file #%u: bad local header\n"; +static ZCONST char Far AttemptRecompensate[] = + " (attempting to re-compensate)\n"; +#ifndef SFX + static ZCONST char Far BackslashPathSep[] = + "warning: %s appears to use backslashes as path separators\n"; +#endif +static ZCONST char Far SkipVolumeLabel[] = + " skipping: %-22s %svolume label\n"; + +#ifdef SET_DIR_ATTRIB /* messages of code for setting directory attributes */ + static ZCONST char Far DirlistEntryNoMem[] = + "warning: cannot alloc memory for dir times/permissions/UID/GID\n"; + static ZCONST char Far DirlistSortNoMem[] = + "warning: cannot alloc memory to sort dir times/perms/etc.\n"; + static ZCONST char Far DirlistSetAttrFailed[] = + "warning: set times/attribs failed for %s\n"; +#endif + +#ifndef WINDLL + static ZCONST char Far ReplaceQuery[] = + "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: "; + static ZCONST char Far AssumeNone[] = " NULL\n(assuming [N]one)\n"; + static ZCONST char Far NewNameQuery[] = "new name: "; + static ZCONST char Far InvalidResponse[] = "error: invalid response [%c]\n"; +#endif /* !WINDLL */ + +static ZCONST char Far ErrorInArchive[] = + "At least one %serror was detected in %s.\n"; +static ZCONST char Far ZeroFilesTested[] = + "Caution: zero files tested in %s.\n"; + +#ifndef VMS + static ZCONST char Far VMSFormatQuery[] = + "\n%s: stored in VMS format. Extract anyway? (y/n) "; +#endif + +#if CRYPT + static ZCONST char Far SkipCannotGetPasswd[] = + " skipping: %-22s unable to get password\n"; + static ZCONST char Far SkipIncorrectPasswd[] = + " skipping: %-22s incorrect password\n"; + static ZCONST char Far FilesSkipBadPasswd[] = + "%u file%s skipped because of incorrect password.\n"; + static ZCONST char Far MaybeBadPasswd[] = + " (may instead be incorrect password)\n"; +#else + static ZCONST char Far SkipEncrypted[] = + " skipping: %-22s encrypted (not supported)\n"; +#endif + +static ZCONST char Far NoErrInCompData[] = + "No errors detected in compressed data of %s.\n"; +static ZCONST char Far NoErrInTestedFiles[] = + "No errors detected in %s for the %u file%s tested.\n"; +static ZCONST char Far FilesSkipped[] = + "%u file%s skipped because of unsupported compression or encoding.\n"; + +static ZCONST char Far ErrUnzipFile[] = " error: %s%s %s\n"; +static ZCONST char Far ErrUnzipNoFile[] = "\n error: %s%s\n"; +static ZCONST char Far NotEnoughMem[] = "not enough memory to "; +static ZCONST char Far InvalidComprData[] = "invalid compressed data to "; +static ZCONST char Far Inflate[] = "inflate"; + +#ifndef SFX + static ZCONST char Far Explode[] = "explode"; +#ifndef LZW_CLEAN + static ZCONST char Far Unshrink[] = "unshrink"; +#endif +#endif + +#if (!defined(DELETE_IF_FULL) || !defined(HAVE_UNLINK)) + static ZCONST char Far FileTruncated[] = + "warning: %s is probably truncated\n"; +#endif + +static ZCONST char Far FileUnknownCompMethod[] = + "%s: unknown compression method\n"; +static ZCONST char Far BadCRC[] = " bad CRC %08lx (should be %08lx)\n"; + + /* TruncEAs[] also used in OS/2 mapname(), close_outfile() */ +char ZCONST Far TruncEAs[] = " compressed EA data missing (%d bytes)%s"; +char ZCONST Far TruncNTSD[] = + " compressed WinNT security data missing (%d bytes)%s"; + +#ifndef SFX + static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \ + EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n"; + static ZCONST char Far InvalidComprDataEAs[] = + " invalid compressed data for EAs\n"; +# if (defined(WIN32) && defined(NTSD_EAS)) + static ZCONST char Far InvalidSecurityEAs[] = + " EAs fail security check\n"; +# endif + static ZCONST char Far UnsuppNTSDVersEAs[] = + " unsupported NTSD EAs version %d\n"; + static ZCONST char Far BadCRC_EAs[] = " bad CRC for extended attributes\n"; + static ZCONST char Far UnknComprMethodEAs[] = + " unknown compression method for EAs (%u)\n"; + static ZCONST char Far NotEnoughMemEAs[] = + " out of memory while inflating EAs\n"; + static ZCONST char Far UnknErrorEAs[] = + " unknown error on extended attributes\n"; +#endif /* !SFX */ + +static ZCONST char Far UnsupportedExtraField[] = + "\nerror: unsupported extra-field compression type (%u)--skipping\n"; +static ZCONST char Far BadExtraFieldCRC[] = + "error [%s]: bad extra-field CRC %08lx (should be %08lx)\n"; + + + + + +/**************************************/ +/* Function extract_or_test_files() */ +/**************************************/ + +int extract_or_test_files(__G) /* return PK-type error code */ + __GDEF +{ + uch *cd_inptr; + unsigned i, j, filnum=0, blknum=0; + int cd_incnt, renamed, query; + int error, error_in_archive=PK_COOL, *fn_matched=NULL, *xn_matched=NULL; +#ifdef WINDLL + int done_once = 0; +#else + extent len; +#endif + unsigned members_remaining, num_skipped=0, num_bad_pwd=0; + long cd_bufstart, bufstart, inbuf_offset, request; + LONGINT old_extra_bytes = 0L; +#ifdef SET_DIR_ATTRIB + unsigned num_dirs=0; + dirtime *dirlist=(dirtime *)NULL, **sorted_dirlist=(dirtime **)NULL; +#endif + + +/*--------------------------------------------------------------------------- + The basic idea of this function is as follows. Since the central di- + rectory lies at the end of the zipfile and the member files lie at the + beginning or middle or wherever, it is not very desirable to simply + read a central directory entry, jump to the member and extract it, and + then jump back to the central directory. In the case of a large zipfile + this would lead to a whole lot of disk-grinding, especially if each mem- + ber file is small. Instead, we read from the central directory the per- + tinent information for a block of files, then go extract/test the whole + block. Thus this routine contains two small(er) loops within a very + large outer loop: the first of the small ones reads a block of files + from the central directory; the second extracts or tests each file; and + the outer one loops over blocks. There's some file-pointer positioning + stuff in between, but that's about it. Btw, it's because of this jump- + ing around that we can afford to be lenient if an error occurs in one of + the member files: we should still be able to go find the other members, + since we know the offset of each from the beginning of the zipfile. + ---------------------------------------------------------------------------*/ + + G.pInfo = G.info; + members_remaining = (unsigned)G.ecrec.total_entries_central_dir; + +#if CRYPT + G.newzip = TRUE; +#endif +#ifndef SFX + G.reported_backslash = FALSE; +#endif + + /* malloc space for check on unmatched filespecs (OK if one or both NULL) */ + if (G.filespecs > 0 && + (fn_matched=(int *)malloc(G.filespecs*sizeof(int))) != (int *)NULL) + for (i = 0; i < G.filespecs; ++i) + fn_matched[i] = FALSE; + if (G.xfilespecs > 0 && + (xn_matched=(int *)malloc(G.xfilespecs*sizeof(int))) != (int *)NULL) + for (i = 0; i < G.xfilespecs; ++i) + xn_matched[i] = FALSE; + +/*--------------------------------------------------------------------------- + Begin main loop over blocks of member files. We know the entire central + directory is on this disk: we would not have any of this information un- + less the end-of-central-directory record was on this disk, and we would + not have gotten to this routine unless this is also the disk on which + the central directory starts. In practice, this had better be the ONLY + disk in the archive, but we'll add multi-disk support soon. + ---------------------------------------------------------------------------*/ + + while (members_remaining) { + j = 0; +#ifdef AMIGA + memzero(G.filenotes, DIR_BLKSIZ * sizeof(char *)); +#endif + + /* + * Loop through files in central directory, storing offsets, file + * attributes, case-conversion and text-conversion flags until block + * size is reached. + */ + + while (members_remaining && (j < DIR_BLKSIZ)) { + --members_remaining; + G.pInfo = &G.info[j]; + + if (readbuf(__G__ G.sig, 4) == 0) { + error_in_archive = PK_EOF; + members_remaining = 0; /* ...so no more left to do */ + break; + } + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), + j + blknum*DIR_BLKSIZ + 1)); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + members_remaining = 0; /* ...so no more left to do */ + break; + } + /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) { + error_in_archive = error; /* only PK_EOF defined */ + members_remaining = 0; /* ...so no more left to do */ + break; + } + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != + PK_COOL) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { /* fatal: no more left to do */ + Info(slide, 0x401, ((char *)slide, LoadFarString(FilNamMsg), + FnFilter1(G.filename), "central")); + members_remaining = 0; + break; + } + } + if ((error = do_string(__G__ G.crec.extra_field_length, + EXTRA_FIELD)) != 0) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { /* fatal */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExtFieldMsg), + FnFilter1(G.filename), "central")); + members_remaining = 0; + break; + } + } +#ifdef AMIGA + G.filenote_slot = j; + if ((error = do_string(__G__ G.crec.file_comment_length, + uO.N_flag ? FILENOTE : SKIP)) != PK_COOL) +#else + if ((error = do_string(__G__ G.crec.file_comment_length, SKIP)) + != PK_COOL) +#endif + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { /* fatal */ + Info(slide, 0x421, ((char *)slide, + LoadFarString(BadFileCommLength), + FnFilter1(G.filename))); + members_remaining = 0; + break; + } + } + if (G.process_all_files) { + if (store_info(__G)) + ++j; /* file is OK; info[] stored; continue with next */ + else + ++num_skipped; + } else { + int do_this_file; + + if (G.filespecs == 0) + do_this_file = TRUE; + else { /* check if this entry matches an `include' argument */ + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; /* ^-- ignore case or not? */ + if (fn_matched) + fn_matched[i] = TRUE; + break; /* found match, so stop looping */ + } + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case or not? */ + if (xn_matched) + xn_matched[i] = TRUE; + break; + } + } + if (do_this_file) { + if (store_info(__G)) + ++j; /* file is OK */ + else + ++num_skipped; /* unsupp. compression or encryption */ + } + } /* end if (process_all_files) */ + + + } /* end while-loop (adding files to current block) */ + + /* save position in central directory so can come back later */ + cd_bufstart = G.cur_zipfile_bufstart; + cd_inptr = G.inptr; + cd_incnt = G.incnt; + + /*----------------------------------------------------------------------- + Second loop: process files in current block, extracting or testing + each one. + -----------------------------------------------------------------------*/ + + for (i = 0; i < j; ++i) { + filnum++; /* filnum = i + blknum*DIR_BLKSIZ + 1; */ + G.pInfo = &G.info[i]; +#ifdef NOVELL_BUG_FAILSAFE + G.dne = FALSE; /* assume file exists until stat() says otherwise */ +#endif + + /* if the target position is not within the current input buffer + * (either haven't yet read far enough, or (maybe) skipping back- + * ward), skip to the target position and reset readbuf(). */ + + /* ZLSEEK(pInfo->offset): */ + request = G.pInfo->offset + G.extra_bytes; + inbuf_offset = request % INBUFSIZ; + bufstart = request - inbuf_offset; + + Trace((stderr, "\ndebug: request = %ld, inbuf_offset = %ld\n", + request, inbuf_offset)); + Trace((stderr, + "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n", + bufstart, G.cur_zipfile_bufstart)); + if (request < 0) { + Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), + G.zipfn, LoadFarString(ReportMsg))); + error_in_archive = PK_ERR; + if (filnum == 1 && G.extra_bytes != 0L) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(AttemptRecompensate))); + old_extra_bytes = G.extra_bytes; + G.extra_bytes = 0L; + request = G.pInfo->offset; /* could also check if != 0 */ + inbuf_offset = request % INBUFSIZ; + bufstart = request - inbuf_offset; + Trace((stderr, "debug: request = %ld, inbuf_offset = %ld\n", + request, inbuf_offset)); + Trace((stderr, + "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n", + bufstart, G.cur_zipfile_bufstart)); + } else { + error_in_archive = PK_BADERR; + continue; /* this one hosed; try next */ + } + } + /* try again */ + if (request < 0) { + Trace((stderr, "debug: recompensated request still < 0\n")); + Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), + G.zipfn, LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + continue; + } else if (bufstart != G.cur_zipfile_bufstart) { + Trace((stderr, "debug: bufstart != cur_zipfile_bufstart\n")); +#ifdef USE_STRM_INPUT + fseek((FILE *)G.zipfd,(LONGINT)bufstart,SEEK_SET); + G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); +#else /* !USE_STRM_INPUT */ + G.cur_zipfile_bufstart = + lseek(G.zipfd,(LONGINT)bufstart,SEEK_SET); +#endif /* ?USE_STRM_INPUT */ + if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) <= 0) + { + Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), + filnum, "lseek", bufstart)); + error_in_archive = PK_BADERR; + continue; /* can still do next file */ + } + G.inptr = G.inbuf + (int)inbuf_offset; + G.incnt -= (int)inbuf_offset; + } else { + G.incnt += (int)(G.inptr-G.inbuf) - (int)inbuf_offset; + G.inptr = G.inbuf + (int)inbuf_offset; + } + + /* should be in proper position now, so check for sig */ + if (readbuf(__G__ G.sig, 4) == 0) { /* bad offset */ + Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), + filnum, "EOF", request)); + error_in_archive = PK_BADERR; + continue; /* but can still try next one */ + } + if (strncmp(G.sig, local_hdr_sig, 4)) { + Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), + filnum, LoadFarStringSmall(LocalHdrSig), request)); + /* + GRRDUMP(G.sig, 4) + GRRDUMP(local_hdr_sig, 4) + */ + error_in_archive = PK_ERR; + if ((filnum == 1 && G.extra_bytes != 0L) || + (G.extra_bytes == 0L && old_extra_bytes != 0L)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(AttemptRecompensate))); + if (G.extra_bytes) { + old_extra_bytes = G.extra_bytes; + G.extra_bytes = 0L; + } else + G.extra_bytes = old_extra_bytes; /* third attempt */ + ZLSEEK(G.pInfo->offset) + if (readbuf(__G__ G.sig, 4) == 0) { /* bad offset */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(OffsetMsg), filnum, "EOF", request)); + error_in_archive = PK_BADERR; + continue; /* but can still try next one */ + } + if (strncmp(G.sig, local_hdr_sig, 4)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(OffsetMsg), filnum, + LoadFarStringSmall(LocalHdrSig), request)); + error_in_archive = PK_BADERR; + continue; + } + } else + continue; /* this one hosed; try next */ + } + if ((error = process_local_file_hdr(__G)) != PK_COOL) { + Info(slide, 0x421, ((char *)slide, LoadFarString(BadLocalHdr), + filnum)); + error_in_archive = error; /* only PK_EOF defined */ + continue; /* can still try next one */ + } + if ((error = do_string(__G__ G.lrec.filename_length, DS_FN)) != + PK_COOL) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { + Info(slide, 0x401, ((char *)slide, LoadFarString(FilNamMsg), + FnFilter1(G.filename), "local")); + continue; /* go on to next one */ + } + } + if (G.extra_field != (uch *)NULL) { + free(G.extra_field); + G.extra_field = (uch *)NULL; + } + if ((error = + do_string(__G__ G.lrec.extra_field_length, EXTRA_FIELD)) != 0) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExtFieldMsg), + FnFilter1(G.filename), "local")); + continue; /* go on */ + } + } + +#if CRYPT + if (G.pInfo->encrypted && + (error = decrypt(__G__ uO.pwdarg)) != PK_COOL) { + if (error == PK_WARN) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, + LoadFarString(SkipIncorrectPasswd), + FnFilter1(G.filename))); + ++num_bad_pwd; + } else { /* (error > PK_WARN) */ + if (error > error_in_archive) + error_in_archive = error; + Info(slide, 0x401, ((char *)slide, + LoadFarString(SkipCannotGetPasswd), + FnFilter1(G.filename))); + } + continue; /* go on to next file */ + } +#endif /* CRYPT */ + + /* + * just about to extract file: if extracting to disk, check if + * already exists, and if so, take appropriate action according to + * fflag/uflag/overwrite_all/etc. (we couldn't do this in upper + * loop because we don't store the possibly renamed filename[] in + * info[]) + */ +#ifdef DLL + if (!uO.tflag && !uO.cflag && !G.redirect_data) +#else + if (!uO.tflag && !uO.cflag) +#endif + { + renamed = FALSE; /* user hasn't renamed output file yet */ + +startover: + query = FALSE; + /* for files from DOS FAT, check for use of backslash instead + * of slash as directory separator (bug in some zipper(s); so + * far, not a problem in HPFS, NTFS or VFAT systems) + */ +#ifndef SFX + if (G.pInfo->hostnum == FS_FAT_ && !strchr(G.filename, '/')) { + char *p=G.filename-1; + + while (*++p) { + if (*p == '\\') { + if (!G.reported_backslash) { + Info(slide, 0x21, ((char *)slide, + LoadFarString(BackslashPathSep), G.zipfn)); + G.reported_backslash = TRUE; + if (!error_in_archive) + error_in_archive = PK_WARN; + } + *p = '/'; + } + } + } +#endif /* !SFX */ + + /* mapname can create dirs if not freshening or if renamed */ + if ((error = mapname(__G__ renamed)) > PK_WARN) { + if (error == IZ_CREATED_DIR) { +#ifdef SET_DIR_ATTRIB + dirtime *d_entry; + + d_entry = (dirtime *)malloc(sizeof(dirtime)); + if (d_entry == (dirtime *)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(DirlistEntryNoMem))); + } else { + unsigned eb_izux_flg; + + d_entry->next = dirlist; + dirlist = d_entry; + dirlist->fn = + (char *)malloc(strlen(G.filename) + 1); + if (dirlist->fn == (char *)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(DirlistEntryNoMem))); + dirlist = d_entry->next; + free(d_entry); + if (!error_in_archive) + error_in_archive = PK_WARN; + continue; + } + strcpy(dirlist->fn, G.filename); + dirlist->perms = G.pInfo->file_attr; +#ifdef USE_EF_UT_TIME + eb_izux_flg = G.extra_field? ef_scan_for_izux( + G.extra_field, G.lrec.extra_field_length, 0, + G.lrec.last_mod_dos_datetime, +#ifdef IZ_CHECK_TZ + (G.tz_is_valid ? &(dirlist->u.t3) : NULL), +#else + &(dirlist->u.t3), +#endif + dirlist->uidgid) + : 0; +#else /* !USE_EF_UT_TIME */ + eb_izux_flg = 0; +#endif /* ?USE_EF_UT_TIME */ + if (eb_izux_flg & EB_UT_FL_MTIME) { + TTrace((stderr, + "\nextract: Unix dir e.f. modtime = %ld\n", + dirlist->u.t3.mtime)); + } else { + dirlist->u.t3.mtime = dos_to_unix_time( + G.lrec.last_mod_dos_datetime); + } + if (eb_izux_flg & EB_UT_FL_ATIME) { + TTrace((stderr, + "\nextract: Unix dir e.f. actime = %ld\n", + dirlist->u.t3.atime)); + } else { + dirlist->u.t3.atime = + dirlist->u.t3.mtime; + } + dirlist->have_uidgid = + (uO.X_flag && (eb_izux_flg & EB_UX2_VALID)); + ++num_dirs; + } +#endif /* SET_DIR_ATTRIB */ + } else if (error == IZ_VOL_LABEL) { +#ifdef DOS_OS2_W32 + Info(slide, 0x401, ((char *)slide, + LoadFarString(SkipVolumeLabel), + FnFilter1(G.filename), + uO.volflag? "hard disk " : "")); +#else + Info(slide, 1, ((char *)slide, + LoadFarString(SkipVolumeLabel), + FnFilter1(G.filename), "")); +#endif + /* if (!error_in_archive) + error_in_archive = PK_WARN; */ + } else if (error > PK_ERR && error_in_archive < PK_ERR) + error_in_archive = PK_ERR; + Trace((stderr, "mapname(%s) returns error = %d\n", + FnFilter1(G.filename), error)); + continue; /* go on to next file */ + } + +#ifdef QDOS + QFilename(__G__ G.filename); +#endif + switch (check_for_newer(__G__ G.filename)) { + case DOES_NOT_EXIST: +#ifdef NOVELL_BUG_FAILSAFE + G.dne = TRUE; /* stat() says file DOES NOT EXIST */ +#endif + /* if freshening, don't skip if just renamed */ + if (uO.fflag && !renamed) + continue; /* freshen (no new files): skip */ + break; + case EXISTS_AND_OLDER: + if (uO.overwrite_none) { +#ifdef WINDLL + char szStr[FILNAMSIZ+40]; /* add. space for text */ + + if ((!G.prompt_always) || (done_once)) { + sprintf(szStr, + "Target file exists.\nSkipping %s\n", + FnFilter1(G.filename)); + win_fprintf((zvoid *)&G, stdout, + strlen(szStr), szStr); + } else { + query = TRUE; + break; + } +#endif /* WINDLL */ + continue; /* never overwrite: skip file */ + } +#ifdef UNIXBACKUP + if (!uO.overwrite_all && !uO.B_flag) +#else + if (!uO.overwrite_all) +#endif + query = TRUE; + break; + case EXISTS_AND_NEWER: /* (or equal) */ + if (uO.overwrite_none || (uO.uflag && !renamed)) { +#ifdef WINDLL + char szStr[FILNAMSIZ+40]; /* add. space for text */ + + if ((!G.prompt_always) || (done_once)) { + sprintf(szStr, + "Target file newer.\nSkipping %s\n", + FnFilter1(G.filename)); + win_fprintf((zvoid *)&G, stdout, + strlen(szStr), szStr); + } else { + query = TRUE; + break; + } +#endif /* WINDLL */ + continue; /* skip if update/freshen & orig name */ + } +#ifdef UNIXBACKUP + if (!uO.overwrite_all && !uO.B_flag) +#else + if (!uO.overwrite_all) +#endif + query = TRUE; + break; + } + if (query) { +#ifdef WINDLL + switch (G.lpUserFunctions->replace != NULL ? + (*G.lpUserFunctions->replace)(G.filename) : + IDM_REPLACE_NONE) { + case IDM_REPLACE_RENAME: + _ISO_INTERN(G.filename); + renamed = TRUE; + goto startover; + case IDM_REPLACE_YES: + break; + case IDM_REPLACE_ALL: + uO.overwrite_all = TRUE; + uO.overwrite_none = FALSE; /* just to make sure */ + break; + case IDM_REPLACE_NONE: + uO.overwrite_none = TRUE; + uO.overwrite_all = FALSE; /* make sure */ + done_once = TRUE; + /* FALL THROUGH, skip */ + case IDM_REPLACE_NO: + { + char szStr[FILNAMSIZ+40]; + + sprintf(szStr, + "Target file newer.\nSkipping %s\n", + FnFilter1(G.filename)); + win_fprintf((zvoid *)&G, stdout, + strlen(szStr), szStr); + } + continue; + } +#else /* !WINDLL */ +reprompt: + Info(slide, 0x81, ((char *)slide, + LoadFarString(ReplaceQuery), + FnFilter1(G.filename))); + if (fgets(G.answerbuf, 9, stdin) == (char *)NULL) { + Info(slide, 1, ((char *)slide, + LoadFarString(AssumeNone))); + *G.answerbuf = 'N'; + if (!error_in_archive) + error_in_archive = 1; /* not extracted: warning */ + } + switch (*G.answerbuf) { + case 'A': /* dangerous option: force caps */ + uO.overwrite_all = TRUE; + uO.overwrite_none = FALSE; /* just to make sure */ + break; + case 'r': + case 'R': + do { + Info(slide, 0x81, ((char *)slide, + LoadFarString(NewNameQuery))); + fgets(G.filename, FILNAMSIZ, stdin); + /* usually get \n here: better check for it */ + len = strlen(G.filename); + if (G.filename[len-1] == '\n') + G.filename[--len] = '\0'; + } while (len == 0); +#ifdef WIN32 /* WIN32 fgets( ... , stdin) returns OEM coded strings */ + _OEM_INTERN(G.filename); +#endif + renamed = TRUE; + goto startover; /* sorry for a goto */ + case 'y': + case 'Y': + break; + case 'N': + uO.overwrite_none = TRUE; + uO.overwrite_all = FALSE; /* make sure */ + /* FALL THROUGH, skip */ + case 'n': + continue; /* skip file */ + default: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidResponse), *G.answerbuf)); + goto reprompt; /* yet another goto? */ + } /* end switch (*answerbuf) */ +#endif /* ?WINDLL */ + } /* end if (query) */ + } /* end if (extracting to disk) */ + +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_START_EXTRACT, G.zipfn, + G.filename, NULL)) { + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return IZ_CTRLC; /* cancel operation by user request */ + } +#endif +#ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); +#endif +#ifdef AMIGA + G.filenote_slot = i; +#endif + G.disk_full = 0; + if ((error = extract_or_test_member(__G)) != PK_COOL) { + if (error > error_in_archive) + error_in_archive = error; /* ...and keep going */ +#ifdef DLL + if (G.disk_full > 1 || error_in_archive == IZ_CTRLC) { +#else + if (G.disk_full > 1) { +#endif + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return error_in_archive; /* (unless disk full) */ + } + } +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, + G.filename, (zvoid *)&G.lrec.ucsize)) { + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return IZ_CTRLC; /* cancel operation by user request */ + } +#endif +#ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); +#endif + } /* end for-loop (i: files in current block) */ + + + /* + * Jump back to where we were in the central directory, then go and do + * the next batch of files. + */ + +#ifdef USE_STRM_INPUT + fseek((FILE *)G.zipfd, (LONGINT)cd_bufstart, SEEK_SET); + G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); +#else /* !USE_STRM_INPUT */ + G.cur_zipfile_bufstart = lseek(G.zipfd,(LONGINT)cd_bufstart,SEEK_SET); +#endif /* ?USE_STRM_INPUT */ + read(G.zipfd, (char *)G.inbuf, INBUFSIZ); /* been here before... */ + G.inptr = cd_inptr; + G.incnt = cd_incnt; + ++blknum; + +#ifdef TEST + pipeit("\ncd_bufstart = %ld (%.8lXh)\n", cd_bufstart, cd_bufstart); + pipeit("cur_zipfile_bufstart = %ld (%.8lXh)\n", cur_zipfile_bufstart, + cur_zipfile_bufstart); + pipeit("inptr-inbuf = %d\n", G.inptr-G.inbuf); + pipeit("incnt = %d\n\n", G.incnt); +#endif + + } /* end while-loop (blocks of files in central directory) */ + +/*--------------------------------------------------------------------------- + Go back through saved list of directories, sort and set times/perms/UIDs + and GIDs from the deepest level on up. + ---------------------------------------------------------------------------*/ + +#ifdef SET_DIR_ATTRIB + if (num_dirs > 0) { + sorted_dirlist = (dirtime **)malloc(num_dirs*sizeof(dirtime *)); + if (sorted_dirlist == (dirtime **)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(DirlistSortNoMem))); + while (dirlist != (dirtime *)NULL) { + dirtime *d = dirlist; + + dirlist = dirlist->next; + free(d); + } + } else { + if (num_dirs == 1) + sorted_dirlist[0] = dirlist; + else { + for (i = 0; i < num_dirs; ++i) { + sorted_dirlist[i] = dirlist; + dirlist = dirlist->next; + } + qsort((char *)sorted_dirlist, num_dirs, sizeof(dirtime *), + dircomp); + } + + Trace((stderr, "setting directory times/perms/attributes\n")); + for (i = 0; i < num_dirs; ++i) { + dirtime *d = sorted_dirlist[i]; + + Trace((stderr, "dir = %s\n", d->fn)); + if ((error = set_direc_attribs(__G__ d)) != PK_OK) { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistSetAttrFailed), d->fn)); + if (!error_in_archive) + error_in_archive = error; + } + free(d->fn); + free(d); + } + free(sorted_dirlist); + } + } +#endif /* SET_DIR_ATTRIB */ + +#if (defined(WIN32) && defined(NTSD_EAS)) + process_defer_NT(__G); /* process any deferred items for this .zip file */ +#endif + +/*--------------------------------------------------------------------------- + Check for unmatched filespecs on command line and print warning if any + found. Free allocated memory. + ---------------------------------------------------------------------------*/ + + if (fn_matched) { + for (i = 0; i < G.filespecs; ++i) + if (!fn_matched[i]) { +#ifdef DLL + if (!G.redirect_data && !G.redirect_text) + Info(slide, 0x401, ((char *)slide, + LoadFarString(FilenameNotMatched), G.pfnames[i])); + else + setFileNotFound(__G); +#else + Info(slide, 1, ((char *)slide, + LoadFarString(FilenameNotMatched), G.pfnames[i])); +#endif + if (error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; /* some files not found */ + } + free((zvoid *)fn_matched); + } + if (xn_matched) { + for (i = 0; i < G.xfilespecs; ++i) + if (!xn_matched[i]) + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExclFilenameNotMatched), G.pxnames[i])); + free((zvoid *)xn_matched); + } + +/*--------------------------------------------------------------------------- + Double-check that we're back at the end-of-central-directory record, and + print quick summary of results, if we were just testing the archive. We + send the summary to stdout so that people doing the testing in the back- + ground and redirecting to a file can just do a "tail" on the output file. + ---------------------------------------------------------------------------*/ + +#ifndef SFX + if (readbuf(__G__ G.sig, 4) == 0) + error_in_archive = PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + if (!error_in_archive) /* don't overwrite stronger error */ + error_in_archive = PK_WARN; + } +#endif /* !SFX */ + if (uO.tflag) { + unsigned num = filnum - num_bad_pwd; + + if (uO.qflag < 2) { /* GRR 930710: was (uO.qflag == 1) */ + if (error_in_archive) + Info(slide, 0, ((char *)slide, LoadFarString(ErrorInArchive), + (error_in_archive == 1)? "warning-" : "", G.zipfn)); + else if (num == 0) + Info(slide, 0, ((char *)slide, LoadFarString(ZeroFilesTested), + G.zipfn)); + else if (G.process_all_files && (num_skipped+num_bad_pwd == 0)) + Info(slide, 0, ((char *)slide, LoadFarString(NoErrInCompData), + G.zipfn)); + else + Info(slide, 0, ((char *)slide, LoadFarString(NoErrInTestedFiles) + , G.zipfn, num, (num==1)? "":"s")); + if (num_skipped > 0) + Info(slide, 0, ((char *)slide, LoadFarString(FilesSkipped), + num_skipped, (num_skipped==1)? "":"s")); +#if CRYPT + if (num_bad_pwd > 0) + Info(slide, 0, ((char *)slide, LoadFarString(FilesSkipBadPasswd) + , num_bad_pwd, (num_bad_pwd==1)? "":"s")); +#endif /* CRYPT */ + } else if ((uO.qflag == 0) && !error_in_archive && (num == 0)) + Info(slide, 0, ((char *)slide, LoadFarString(ZeroFilesTested), + G.zipfn)); + } + + /* give warning if files not tested or extracted (first condition can still + * happen if zipfile is empty and no files specified on command line) */ + + if ((filnum == 0) && error_in_archive <= PK_WARN) { + if (num_skipped > 0) + error_in_archive = IZ_UNSUP; /* unsupport. compression/encryption */ + else + error_in_archive = PK_FIND; /* no files found at all */ + } +#if CRYPT + else if ((filnum == num_bad_pwd) && error_in_archive <= PK_WARN) + error_in_archive = IZ_BADPWD; /* bad passwd => all files skipped */ +#endif + else if ((num_skipped > 0) && error_in_archive <= PK_WARN) + error_in_archive = IZ_UNSUP; /* was PK_WARN; Jean-loup complained */ +#if CRYPT + else if ((num_bad_pwd > 0) && !error_in_archive) + error_in_archive = PK_WARN; +#endif + + return error_in_archive; + +} /* end function extract_or_test_files() */ + + + + + +/***************************/ +/* Function store_info() */ +/***************************/ + +static int store_info(__G) /* return 0 if skipping, 1 if OK */ + __GDEF +{ +#ifdef SFX +# define UNKN_COMPR \ + (G.crec.compression_method!=STORED && G.crec.compression_method!=DEFLATED) +#else +# ifdef COPYRIGHT_CLEAN /* no reduced files */ +# define UNKN_RED (G.crec.compression_method >= REDUCED1 && \ + G.crec.compression_method <= REDUCED4) +# else +# define UNKN_RED FALSE /* reducing not unknown */ +# endif +# ifdef LZW_CLEAN /* no shrunk files */ +# define UNKN_SHR (G.crec.compression_method == SHRUNK) +# else +# define UNKN_SHR FALSE /* unshrinking not unknown */ +# endif +# define UNKN_COMPR (UNKN_RED || UNKN_SHR || \ + G.crec.compression_method==TOKENIZED || G.crec.compression_method>DEFLATED) +#endif + +/*--------------------------------------------------------------------------- + Check central directory info for version/compatibility requirements. + ---------------------------------------------------------------------------*/ + + G.pInfo->encrypted = G.crec.general_purpose_bit_flag & 1; /* bit field */ + G.pInfo->ExtLocHdr = (G.crec.general_purpose_bit_flag & 8) == 8; /* bit */ + G.pInfo->textfile = G.crec.internal_file_attributes & 1; /* bit field */ + G.pInfo->crc = G.crec.crc32; + G.pInfo->compr_size = G.crec.csize; + G.pInfo->uncompr_size = G.crec.ucsize; + + switch (uO.aflag) { + case 0: + G.pInfo->textmode = FALSE; /* bit field */ + break; + case 1: + G.pInfo->textmode = G.pInfo->textfile; /* auto-convert mode */ + break; + default: /* case 2: */ + G.pInfo->textmode = TRUE; + break; + } + + if (G.crec.version_needed_to_extract[1] == VMS_) { + if (G.crec.version_needed_to_extract[0] > VMS_UNZIP_VERSION) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, LoadFarString(VersionMsg), + FnFilter1(G.filename), "VMS", + G.crec.version_needed_to_extract[0] / 10, + G.crec.version_needed_to_extract[0] % 10, + VMS_UNZIP_VERSION / 10, VMS_UNZIP_VERSION % 10)); + return 0; + } +#ifndef VMS /* won't be able to use extra field, but still have data */ + else if (!uO.tflag && !uO.overwrite_all) { /* if -o, extract anyway */ + Info(slide, 0x481, ((char *)slide, LoadFarString(VMSFormatQuery), + FnFilter1(G.filename))); + fgets(G.answerbuf, 9, stdin); + if ((*G.answerbuf != 'y') && (*G.answerbuf != 'Y')) + return 0; + } +#endif /* !VMS */ + /* usual file type: don't need VMS to extract */ + } else if (G.crec.version_needed_to_extract[0] > UNZIP_VERSION) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, LoadFarString(VersionMsg), + FnFilter1(G.filename), "PK", + G.crec.version_needed_to_extract[0] / 10, + G.crec.version_needed_to_extract[0] % 10, + UNZIP_VERSION / 10, UNZIP_VERSION % 10)); + return 0; + } + + if UNKN_COMPR { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) { +#ifndef SFX + if (G.crec.compression_method < NUM_METHODS) + Info(slide, 0x401, ((char *)slide, LoadFarString(ComprMsgName), + FnFilter1(G.filename), + LoadFarStringSmall(ComprNames[G.crec.compression_method]))); + else +#endif + Info(slide, 0x401, ((char *)slide, LoadFarString(ComprMsgNum), + FnFilter1(G.filename), + G.crec.compression_method)); + } + return 0; + } +#if (!CRYPT) + if (G.pInfo->encrypted) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, LoadFarString(SkipEncrypted), + FnFilter1(G.filename))); + return 0; + } +#endif /* !CRYPT */ + + /* map whatever file attributes we have into the local format */ + mapattr(__G); /* GRR: worry about return value later */ + + G.pInfo->offset = (long)G.crec.relative_offset_local_header; + return 1; + +} /* end function store_info() */ + + + + + +/***************************************/ +/* Function extract_or_test_member() */ +/***************************************/ + +static int extract_or_test_member(__G) /* return PK-type error code */ + __GDEF +{ + char *nul="[empty] ", *txt="[text] ", *bin="[binary]"; +#ifdef CMS_MVS + char *ebc="[ebcdic]"; +#endif + register int b; + int r, error=PK_COOL; +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + ulg wsize; +#else +# define wsize WSIZE +#endif + + +/*--------------------------------------------------------------------------- + Initialize variables, buffers, etc. + ---------------------------------------------------------------------------*/ + + G.bits_left = 0; + G.bitbuf = 0L; /* unreduce and unshrink only */ + G.zipeof = 0; + G.newfile = TRUE; + G.crc32val = CRCVAL_INITIAL; + +#ifdef SYMLINKS + /* if file came from Unix and is a symbolic link and we are extracting + * to disk, prepare to restore the link */ + if (S_ISLNK(G.pInfo->file_attr) && + (G.pInfo->hostnum == UNIX_ || G.pInfo->hostnum == ATARI_ || + G.pInfo->hostnum == BEOS_) && + !uO.tflag && !uO.cflag && (G.lrec.ucsize > 0)) + G.symlnk = TRUE; + else + G.symlnk = FALSE; +#endif /* SYMLINKS */ + + if (uO.tflag) { + if (!uO.qflag) + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "test", + FnFilter1(G.filename), "", "")); + } else { +#ifdef DLL + if (uO.cflag && !G.redirect_data) +#else + if (uO.cflag) +#endif + { +#if (defined(OS2) && defined(__IBMC__) && (__IBMC__ >= 200)) + G.outfile = freopen("", "wb", stdout); /* VAC++ ignores setmode */ +#else + G.outfile = stdout; +#endif +#ifdef DOS_FLX_H68_OS2_W32 +#if (defined(__HIGHC__) && !defined(FLEXOS)) + setmode(G.outfile, _BINARY); +#else /* !(defined(__HIGHC__) && !defined(FLEXOS)) */ + setmode(fileno(G.outfile), O_BINARY); +#endif /* ?(defined(__HIGHC__) && !defined(FLEXOS)) */ +# define NEWLINE "\r\n" +#else /* !DOS_FLX_H68_OS2_W32 */ +# define NEWLINE "\n" +#endif /* ?DOS_FLX_H68_OS2_W32 */ +#ifdef VMS + if (open_outfile(__G)) /* VMS: required even for stdout! */ + return PK_DISK; +#endif + } else if (open_outfile(__G)) + return PK_DISK; + } + +/*--------------------------------------------------------------------------- + Unpack the file. + ---------------------------------------------------------------------------*/ + + defer_leftover_input(__G); /* so NEXTBYTE bounds check will work */ + switch (G.lrec.compression_method) { + case STORED: + if (!uO.tflag && QCOND2) { +#ifdef SYMLINKS + if (G.symlnk) /* can also be deflated, but rarer... */ + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "link", FnFilter1(G.filename), "", "")); + else +#endif /* SYMLINKS */ + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "extract", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.lrec.ucsize == 0L? nul : (G.pInfo->textfile? txt : + bin)), uO.cflag? NEWLINE : "")); + } +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + wsize = G.redirect_size; redirSlide = G.redirect_buffer; + } else { + wsize = WSIZE; redirSlide = slide; + } +#endif + G.outptr = redirSlide; + G.outcnt = 0L; + while ((b = NEXTBYTE) != EOF && !G.disk_full) { + *G.outptr++ = (uch)b; + if (++G.outcnt == wsize) { + flush(__G__ redirSlide, G.outcnt, 0); + G.outptr = redirSlide; + G.outcnt = 0L; + } + } + if (G.outcnt) /* flush final (partial) buffer */ + flush(__G__ redirSlide, G.outcnt, 0); + break; + +#ifndef SFX +#ifndef LZW_CLEAN + case SHRUNK: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + LoadFarStringSmall(Unshrink), FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } + if ((r = unshrink(__G)) != PK_COOL) { + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipFile), + LoadFarString(NotEnoughMem), + LoadFarStringSmall2(Unshrink), + FnFilter1(G.filename))); + else + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), + LoadFarString(NotEnoughMem), + LoadFarStringSmall2(Unshrink))); + error = r; + } + break; +#endif /* !LZW_CLEAN */ + +#ifndef COPYRIGHT_CLEAN + case REDUCED1: + case REDUCED2: + case REDUCED3: + case REDUCED4: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "unreduc", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } + unreduce(__G); + break; +#endif /* !COPYRIGHT_CLEAN */ + + case IMPLODED: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "explod", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } + if (((r = explode(__G)) != 0) && (r != 5)) { /* treat 5 specially */ + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Explode), + FnFilter1(G.filename))); + else + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Explode))); + error = (r == 3)? PK_MEM3 : PK_ERR; + } + if (r == 5) { + int warning = ((ulg)G.used_csize <= G.lrec.csize); + + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, LoadFarString(LengthMsg), + "", warning? "warning" : "error", G.used_csize, + G.lrec.ucsize, warning? " " : "", G.lrec.csize, + " [", FnFilter1(G.filename), "]")); + else + Info(slide, 0x401, ((char *)slide, LoadFarString(LengthMsg), + "\n", warning? "warning" : "error", G.used_csize, + G.lrec.ucsize, warning? " ":"", G.lrec.csize, + "", "", ".")); + error = warning? PK_WARN : PK_ERR; + } + break; +#endif /* !SFX */ + + case DEFLATED: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "inflat", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } +#ifndef USE_ZLIB /* zlib's function is called inflate(), too */ +# define UZinflate inflate +#endif + if ((r = UZinflate(__G)) != 0) { + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Inflate), + FnFilter1(G.filename))); + else + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Inflate))); + error = (r == 3)? PK_MEM3 : PK_ERR; + } + break; + + default: /* should never get to this point */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(FileUnknownCompMethod), FnFilter1(G.filename))); + /* close and delete file before return? */ + undefer_input(__G); + return PK_WARN; + + } /* end switch (compression method) */ + +/*--------------------------------------------------------------------------- + Close the file and set its date and time (not necessarily in that order), + and make sure the CRC checked out OK. Logical-AND the CRC for 64-bit + machines (redundant on 32-bit machines). + ---------------------------------------------------------------------------*/ + +#ifdef VMS /* VMS: required even for stdout! (final flush) */ + if (!uO.tflag) /* don't close NULL file */ + close_outfile(__G); +#else +#ifdef DLL + if (!uO.tflag && (!uO.cflag || G.redirect_data)) { + if (G.redirect_data) + FINISH_REDIRECT(); + else + close_outfile(__G); + } +#else + if (!uO.tflag && !uO.cflag) /* don't close NULL file or stdout */ + close_outfile(__G); +#endif +#endif /* VMS */ + + /* GRR: CONVERT close_outfile() TO NON-VOID: CHECK FOR ERRORS! */ + + + if (G.disk_full) { /* set by flush() */ + if (G.disk_full > 1) { +#if (defined(DELETE_IF_FULL) && defined(HAVE_UNLINK)) + /* delete the incomplete file if we can */ + if (unlink(G.filename) != 0) + Trace((stderr, "extract.c: could not delete %s\n", + FnFilter1(G.filename))); +#else + /* warn user about the incomplete file */ + Info(slide, 0x421, ((char *)slide, LoadFarString(FileTruncated), + FnFilter1(G.filename))); +#endif + error = PK_DISK; + } else { + error = PK_WARN; + } + } + + if (error > PK_WARN) {/* don't print redundant CRC error if error already */ + undefer_input(__G); + return error; + } + if (G.crc32val != G.lrec.crc32) { + /* if quiet enough, we haven't output the filename yet: do it */ + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 0x401, ((char *)slide, LoadFarString(BadCRC), G.crc32val, + G.lrec.crc32)); +#if CRYPT + if (G.pInfo->encrypted) + Info(slide, 0x401, ((char *)slide, LoadFarString(MaybeBadPasswd))); +#endif + error = PK_ERR; + } else if (uO.tflag) { +#ifndef SFX + if (G.extra_field) { + if ((r = TestExtraField(__G__ G.extra_field, + G.lrec.extra_field_length)) > error) + error = r; + } else +#endif /* !SFX */ + if (!uO.qflag) + Info(slide, 0, ((char *)slide, " OK\n")); + } else { + if (QCOND2 && !error) /* GRR: is stdout reset to text mode yet? */ + Info(slide, 0, ((char *)slide, "\n")); + } + + undefer_input(__G); + return error; + +} /* end function extract_or_test_member() */ + + + + + +#ifndef SFX + +/*******************************/ +/* Function TestExtraField() */ +/*******************************/ + +static int TestExtraField(__G__ ef, ef_len) + __GDEF + uch *ef; + unsigned ef_len; +{ + ush ebID; + unsigned ebLen; + unsigned eb_cmpr_offs = 0; + int r; + + /* we know the regular compressed file data tested out OK, or else we + * wouldn't be here ==> print filename if any extra-field errors found + */ + while (ef_len >= EB_HEADSIZE) { + ebID = makeword(ef); + ebLen = (unsigned)makeword(ef+EB_LEN); + + if (ebLen > (ef_len - EB_HEADSIZE)) { + /* Discovered some extra field inconsistency! */ + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 1, ((char *)slide, LoadFarString(InconsistEFlength), + ebLen, (ef_len - EB_HEADSIZE))); + return PK_ERR; + } + + switch (ebID) { + case EF_OS2: + case EF_ACL: + case EF_MAC3: + case EF_BEOS: + switch (ebID) { + case EF_OS2: + case EF_ACL: + eb_cmpr_offs = EB_OS2_HLEN; + break; + case EF_MAC3: + if (ebLen >= EB_MAC3_HLEN && + (makeword(ef+(EB_HEADSIZE+EB_FLGS_OFFS)) + & EB_M3_FL_UNCMPR) && + (makelong(ef+EB_HEADSIZE) == ebLen - EB_MAC3_HLEN)) + eb_cmpr_offs = 0; + else + eb_cmpr_offs = EB_MAC3_HLEN; + break; + case EF_BEOS: + if (ebLen >= EB_BEOS_HLEN && + (*(ef+(EB_HEADSIZE+EB_FLGS_OFFS)) & EB_BE_FL_UNCMPR) && + (makelong(ef+EB_HEADSIZE) == ebLen - EB_BEOS_HLEN)) + eb_cmpr_offs = 0; + else + eb_cmpr_offs = EB_BEOS_HLEN; + break; + } + if ((r = test_compr_eb(__G__ ef, ebLen, eb_cmpr_offs, NULL)) + != PK_OK) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + switch (r) { + case IZ_EF_TRUNC: + Info(slide, 1, ((char *)slide, + LoadFarString(TruncEAs), + ebLen-(eb_cmpr_offs+EB_CMPRHEADLEN), "\n")); + break; + case PK_ERR: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidComprDataEAs))); + break; + case PK_MEM3: + case PK_MEM4: + Info(slide, 1, ((char *)slide, + LoadFarString(NotEnoughMemEAs))); + break; + default: + if ((r & 0xff) != PK_ERR) + Info(slide, 1, ((char *)slide, + LoadFarString(UnknErrorEAs))); + else { + ush m = (ush)(r >> 8); + if (m == DEFLATED) /* GRR KLUDGE! */ + Info(slide, 1, ((char *)slide, + LoadFarString(BadCRC_EAs))); + else + Info(slide, 1, ((char *)slide, + LoadFarString(UnknComprMethodEAs), m)); + } + break; + } + return r; + } + break; + + case EF_NTSD: + Trace((stderr, "ebID: %i / ebLen: %u\n", ebID, ebLen)); + r = ebLen < EB_NTSD_L_LEN ? IZ_EF_TRUNC : + ((ef[EB_HEADSIZE+EB_NTSD_VERSION] > EB_NTSD_MAX_VER) ? + (PK_WARN | 0x4000) : + test_compr_eb(__G__ ef, ebLen, EB_NTSD_L_LEN, TEST_NTSD)); + if (r != PK_OK) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + switch (r) { + case IZ_EF_TRUNC: + Info(slide, 1, ((char *)slide, + LoadFarString(TruncNTSD), + ebLen-(EB_NTSD_L_LEN+EB_CMPRHEADLEN), "\n")); + break; +#if (defined(WIN32) && defined(NTSD_EAS)) + case PK_WARN: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidSecurityEAs))); + break; +#endif + case PK_ERR: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidComprDataEAs))); + break; + case PK_MEM3: + case PK_MEM4: + Info(slide, 1, ((char *)slide, + LoadFarString(NotEnoughMemEAs))); + break; + case (PK_WARN | 0x4000): + Info(slide, 1, ((char *)slide, + LoadFarString(UnsuppNTSDVersEAs), + (int)ef[EB_HEADSIZE+EB_NTSD_VERSION])); + r = PK_WARN; + break; + default: + if ((r & 0xff) != PK_ERR) + Info(slide, 1, ((char *)slide, + LoadFarString(UnknErrorEAs))); + else { + ush m = (ush)(r >> 8); + if (m == DEFLATED) /* GRR KLUDGE! */ + Info(slide, 1, ((char *)slide, + LoadFarString(BadCRC_EAs))); + else + Info(slide, 1, ((char *)slide, + LoadFarString(UnknComprMethodEAs), m)); + } + break; + } + return r; + } + break; + case EF_PKVMS: + case EF_PKW32: + case EF_PKUNIX: + case EF_ASIUNIX: + case EF_IZVMS: + case EF_IZUNIX: + case EF_VMCMS: + case EF_MVS: + case EF_SPARK: + case EF_AV: + default: + break; + } + ef_len -= (ebLen + EB_HEADSIZE); + ef += (ebLen + EB_HEADSIZE); + } + + if (!uO.qflag) + Info(slide, 0, ((char *)slide, " OK\n")); + + return PK_COOL; + +} /* end function TestExtraField() */ + + + + + +/******************************/ +/* Function test_compr_eb() */ +/******************************/ + +#ifdef PROTO +static int test_compr_eb( + __GPRO__ + uch *eb, + unsigned eb_size, + unsigned compr_offset, + int (*test_uc_ebdata)(__GPRO__ uch *eb, unsigned eb_size, + uch *eb_ucptr, ulg eb_ucsize)) +#else /* !PROTO */ +static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) + __GDEF + uch *eb; + unsigned eb_size; + unsigned compr_offset; + int (*test_uc_ebdata)(); +#endif /* ?PROTO */ +{ + ulg eb_ucsize; + uch *eb_ucptr; + int r; + + if (compr_offset < 4) /* field is not compressed: */ + return PK_OK; /* do nothing and signal OK */ + + if ((eb_size < (EB_UCSIZE_P + 4)) || + ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L && + eb_size <= (compr_offset + EB_CMPRHEADLEN))) + return IZ_EF_TRUNC; /* no compressed data! */ + + if ((eb_ucptr = (uch *)malloc((extent)eb_ucsize)) == (uch *)NULL) + return PK_MEM4; + + r = memextract(__G__ eb_ucptr, eb_ucsize, + eb + (EB_HEADSIZE + compr_offset), + (ulg)(eb_size - compr_offset)); + + if (r == PK_OK && test_uc_ebdata != NULL) + r = (*test_uc_ebdata)(__G__ eb, eb_size, eb_ucptr, eb_ucsize); + + free(eb_ucptr); + return r; + +} /* end function test_compr_eb() */ + +#endif /* !SFX */ + + + + + +/***************************/ +/* Function memextract() */ +/***************************/ + +int memextract(__G__ tgt, tgtsize, src, srcsize) /* extract compressed */ + __GDEF /* extra field block; */ + uch *tgt, *src; /* return PK-type error */ + ulg tgtsize, srcsize; /* level */ +{ + long old_csize=G.csize; + uch *old_inptr=G.inptr; + int old_incnt=G.incnt; + int r, error=PK_OK; + ush method; + ulg extra_field_crc; + + + method = makeword(src); + extra_field_crc = makelong(src+2); + + /* compressed extra field exists completely in memory at this location: */ + G.inptr = src + 2 + 4; /* method and extra_field_crc */ + G.incnt = (int)(G.csize = (long)(srcsize - (2 + 4))); + G.mem_mode = TRUE; + G.outbufptr = tgt; + G.outsize = tgtsize; + + switch (method) { + case STORED: + memcpy((char *)tgt, (char *)G.inptr, (extent)G.incnt); + G.outcnt = G.csize; /* for CRC calculation */ + break; + case DEFLATED: + G.outcnt = 0L; + if ((r = UZinflate(__G)) != 0) { + if (!uO.tflag) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Inflate))); + error = (r == 3)? PK_MEM3 : PK_ERR; + } + if (G.outcnt == 0L) /* inflate's final FLUSH sets outcnt */ + break; + break; + default: + if (uO.tflag) + error = PK_ERR | ((int)method << 8); + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(UnsupportedExtraField), method)); + error = PK_ERR; /* GRR: should be passed on up via SetEAs() */ + } + break; + } + + G.inptr = old_inptr; + G.incnt = old_incnt; + G.csize = old_csize; + G.mem_mode = FALSE; + + if (!error) { + register ulg crcval = crc32(CRCVAL_INITIAL, tgt, (extent)G.outcnt); + + if (crcval != extra_field_crc) { + if (uO.tflag) + error = PK_ERR | (DEFLATED << 8); /* kludge for now */ + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(BadExtraFieldCRC), G.zipfn, crcval, + extra_field_crc)); + error = PK_ERR; + } + } + } + return error; + +} /* end function memextract() */ + + + + + +/*************************/ +/* Function memflush() */ +/*************************/ + +int memflush(__G__ rawbuf, size) + __GDEF + uch *rawbuf; + ulg size; +{ + if (size > G.outsize) + return 50; /* more data than output buffer can hold */ + + memcpy((char *)G.outbufptr, (char *)rawbuf, (extent)size); + G.outbufptr += (unsigned int)size; + G.outsize -= size; + G.outcnt += size; + + return 0; + +} /* end function memflush() */ + + + + + +/*************************/ +/* Function fnfilter() */ /* here instead of in list.c for SFX */ +/*************************/ + +char *fnfilter(raw, space) /* convert name to safely printable form */ + ZCONST char *raw; + uch *space; +{ +#ifndef NATIVE /* ASCII: filter ANSI escape codes, etc. */ + uch *r=(uch *)raw, *s=space; + + while (*r) { +#ifdef QDOS + if (qlflag & 2) { + if (*r == '/' || *r == '.') { + ++r; + *s++ = '_'; + continue; + } + } else +#endif + if (*r < 32) + *s++ = '^', *s++ = (uch)(64 + *r++); + else + *s++ = *r++; + } + *s = 0; + +#ifdef WINDLL + INTERN_TO_ISO((char *)space, (char *)space); /* translate to ANSI */ +#else +#ifdef WIN32 + /* Win9x console always uses OEM character coding, and + WinNT console is set to OEM charset by default, too */ + INTERN_TO_OEM((char *)space, (char *)space); +#endif /* WIN32 */ +#endif /* ?WINDLL */ + + return (char *)space; + +#else /* NATIVE: EBCDIC or whatever */ + return (char *)raw; +#endif + +} /* end function fnfilter() */ + + + + + +#ifdef SET_DIR_ATTRIB +/* must sort saved directories so can set perms from bottom up */ + +/************************/ +/* Function dircomp() */ +/************************/ + +static int dircomp(a, b) /* used by qsort(); swiped from Zip */ + ZCONST zvoid *a, *b; +{ + /* order is significant: this sorts in reverse order (deepest first) */ + return strcmp((*(dirtime **)b)->fn, (*(dirtime **)a)->fn); + /* return namecmp((*(dirtime **)b)->fn, (*(dirtime **)a)->fn); */ +} + + + +#if 0 /* not used in Unix, but maybe for future OSes? */ + +/************************/ +/* Function namecmp() */ +/************************/ + +static int namecmp(s1, s2) /* [not] used by dircomp(); swiped from Zip */ + ZCONST char *s1, *s2; +{ + int d; + + for (;;) { + d = (int)(uch)case_map(*s1) + - (int)(uch)case_map(*s2); + + if (d || *s1 == 0 || *s2 == 0) + return d; + + s1++; + s2++; + } +} + +#endif /* 0 */ +#endif /* SET_DIR_ATTRIB */ diff --git a/utils/Install/packzip/fileio.c b/utils/Install/packzip/fileio.c new file mode 100644 index 0000000000..602bfaf058 --- /dev/null +++ b/utils/Install/packzip/fileio.c @@ -0,0 +1,2153 @@ +/*--------------------------------------------------------------------------- + + fileio.c + + This file contains routines for doing direct but relatively generic input/ + output, file-related sorts of things, plus some miscellaneous stuff. Most + of the stuff has to do with opening, closing, reading and/or writing files. + + Contains: open_input_file() + open_outfile() (non-VMS, non-AOS/VS, non-CMS_MVS) + undefer_input() + defer_leftover_input() + readbuf() + readbyte() + fillinbuf() + flush() (non-VMS) + disk_error() (non-VMS) + UzpMessagePrnt() + UzpMessageNull() (DLL only) + UzpInput() + UzpMorePause() + UzpPassword() (non-WINDLL) + handler() + dos_to_unix_time() (non-VMS, non-VM/CMS, non-MVS) + check_for_newer() (non-VMS, non-OS/2, non-VM/CMS, non-MVS) + do_string() + makeword() + makelong() + str2iso() (CRYPT && NEED_STR2ISO, only) + str2oem() (CRYPT && NEED_STR2OEM, only) + memset() (ZMEM only) + memcpy() (ZMEM only) + zstrnicmp() + zstat() (REGULUS only) + fLoadFarString() (SMALL_MEM only) + fLoadFarStringSmall() (SMALL_MEM only) + fLoadFarStringSmall2() (SMALL_MEM only) + zfstrcpy() (SMALL_MEM only) + + ---------------------------------------------------------------------------*/ + + +#define FILEIO_C +#define UNZIP_INTERNAL +#include "unzip.h" +#ifdef WINDLL +# include "windll/windll.h" +# include +#endif +#include "crypt.h" +#include "ttyio.h" + +/* setup of codepage conversion for decryption passwords */ +#if CRYPT +# if (defined(CRYP_USES_ISO2OEM) && !defined(IZ_ISO2OEM_ARRAY)) +# define IZ_ISO2OEM_ARRAY /* pull in iso2oem[] table */ +# endif +# if (defined(CRYP_USES_OEM2ISO) && !defined(IZ_OEM2ISO_ARRAY)) +# define IZ_OEM2ISO_ARRAY /* pull in oem2iso[] table */ +# endif +#endif +#include "ebcdic.h" /* definition/initialization of ebcdic[] */ + + +/* + Note: Under Windows, the maximum size of the buffer that can be used + with any of the *printf calls is 16,384, so win_fprintf was used to + feed the fprintf clone no more than 16K chunks at a time. This should + be valid for anything up to 64K (and probably beyond, assuming your + buffers are that big). +*/ +#ifdef WINDLL +# define WriteError(buf,len,strm) \ + (win_fprintf(pG, strm, (extent)len, (char far *)buf) != (int)(len)) +#else /* !WINDLL */ +# ifdef USE_FWRITE +# define WriteError(buf,len,strm) \ + ((extent)fwrite((char *)(buf),1,(extent)(len),strm) != (extent)(len)) +# else +# define WriteError(buf,len,strm) \ + ((extent)write(fileno(strm),(char *)(buf),(extent)(len)) != (extent)(len)) +# endif +#endif /* ?WINDLL */ + +static int disk_error OF((__GPRO)); + + +/****************************/ +/* Strings used in fileio.c */ +/****************************/ + +#if (defined(UNIX) || defined(DOS_FLX_OS2_W32) || defined(__BEOS__)) + static ZCONST char Far CannotDeleteOldFile[] = + "error: cannot delete old %s\n"; +#ifdef UNIXBACKUP + static ZCONST char Far CannotRenameOldFile[] = + "error: cannot rename old %s\n"; + static ZCONST char Far BackupSuffix[] = "~"; +#endif +#endif /* UNIX || DOS_FLX_OS2_W32 || __BEOS__ */ + +static ZCONST char Far CannotOpenZipfile[] = + "error: cannot open zipfile [ %s ]\n"; +#if (!defined(VMS) && !defined(AOS_VS) && !defined(CMS_MVS) && !defined(MACOS)) + static ZCONST char Far CannotCreateFile[] = "error: cannot create %s\n"; +#endif +#ifdef NOVELL_BUG_FAILSAFE + static ZCONST char Far NovellBug[] = + "error: %s: stat() says does not exist, but fopen() found anyway\n"; +#endif +static ZCONST char Far ReadError[] = "error: zipfile read error\n"; +static ZCONST char Far FilenameTooLongTrunc[] = + "warning: filename too long--truncating.\n"; +static ZCONST char Far ExtraFieldTooLong[] = + "warning: extra field too long (%d). Ignoring...\n"; + +#ifdef WINDLL + static ZCONST char Far DiskFullQuery[] = + "%s: write error (disk full?).\n"; +#else + static ZCONST char Far DiskFullQuery[] = + "%s: write error (disk full?). Continue? (y/n/^C) "; + static ZCONST char Far ZipfileCorrupt[] = + "error: zipfile probably corrupt (%s)\n"; +# ifdef SYMLINKS + static ZCONST char Far FileIsSymLink[] = + "%s exists and is a symbolic link%s.\n"; +# endif +# ifdef MORE + static ZCONST char Far MorePrompt[] = "--More--(%lu)"; +# endif + static ZCONST char Far QuitPrompt[] = + "--- Press `Q' to quit, or any other key to continue ---"; + static ZCONST char Far HidePrompt[] = /* "\r \r"; */ + "\r \r"; +# if CRYPT +# ifdef MACOS + /* SPC: are names on MacOS REALLY so much longer than elsewhere ??? */ + static ZCONST char Far PasswPrompt[] = "[%s]\n %s password: "; +# else + static ZCONST char Far PasswPrompt[] = "[%s] %s password: "; +# endif + static ZCONST char Far PasswPrompt2[] = "Enter password: "; + static ZCONST char Far PasswRetry[] = "password incorrect--reenter: "; +# endif /* CRYPT */ +#endif /* !WINDLL */ + + + + + +/******************************/ +/* Function open_input_file() */ +/******************************/ + +int open_input_file(__G) /* return 1 if open failed */ + __GDEF +{ + /* + * open the zipfile for reading and in BINARY mode to prevent cr/lf + * translation, which would corrupt the bitstreams + */ + +#if (defined(UNIX) || defined(TOPS20) || defined(AOS_VS) || defined(__BEOS__)) + G.zipfd = open(G.zipfn, O_RDONLY); +#else /* !(UNIX || TOPS20 || AOS_VS || __BEOS__) */ +#ifdef VMS + G.zipfd = open(G.zipfn, O_RDONLY, 0, "ctx=stm"); +#else /* !VMS */ +#ifdef MACOS + G.zipfd = open(G.zipfn, 0); +#else /* !MACOS */ +#ifdef RISCOS + G.zipfd = fopen(G.zipfn, "rb"); +#else /* !RISCOS */ +#ifdef CMS_MVS + G.zipfd = vmmvs_open_infile(__G); +#else /* !CMS_MVS */ + G.zipfd = open(G.zipfn, O_RDONLY | O_BINARY); +#endif /* ?CMS_MVS */ +#endif /* ?RISCOS */ +#endif /* ?MACOS */ +#endif /* ?VMS */ +#endif /* ?(UNIX || TOPS20 || AOS_VS || __BEOS__) */ + +#ifdef USE_STRM_INPUT + if (G.zipfd == NULL) +#else + /* if (G.zipfd < 0) */ /* no good for Windows CE port */ + if (G.zipfd == -1) +#endif + { + Info(slide, 0x401, ((char *)slide, LoadFarString(CannotOpenZipfile), + G.zipfn)); + return 1; + } + return 0; + +} /* end function open_input_file() */ + + + + +#if (!defined(VMS) && !defined(AOS_VS) && !defined(CMS_MVS) && !defined(MACOS)) + +/***************************/ +/* Function open_outfile() */ +/***************************/ + +int open_outfile(__G) /* return 1 if fail */ + __GDEF +{ +#ifdef DLL + if (G.redirect_data) + return (redirect_outfile(__G) == FALSE); +#endif +#ifdef QDOS + QFilename(__G__ G.filename); +#endif +#if (defined(DOS_FLX_OS2_W32) || defined(UNIX) || defined(__BEOS__)) +#ifdef BORLAND_STAT_BUG + /* Borland 5.0's stat() barfs if the filename has no extension and the + * file doesn't exist. */ + if (access(G.filename, 0) == -1) { + FILE *tmp = fopen(G.filename, "wb+"); + + /* file doesn't exist, so create a dummy file to keep stat() from + * failing (will be over-written anyway) */ + fputc('0', tmp); /* just to have something in the file */ + fclose(tmp); + } +#endif /* BORLAND_STAT_BUG */ +#ifdef SYMLINKS + if (SSTAT(G.filename, &G.statbuf) == 0 || lstat(G.filename,&G.statbuf) == 0) +#else + if (SSTAT(G.filename, &G.statbuf) == 0) +#endif /* ?SYMLINKS */ + { + Trace((stderr, "open_outfile: stat(%s) returns 0: file exists\n", + FnFilter1(G.filename))); +#ifdef UNIXBACKUP + if (uO.B_flag) { /* do backup */ + char *tname; + int blen, flen, tlen; + + blen = strlen(BackupSuffix); + flen = strlen(G.filename); + tlen = flen + blen + 1; + if (tlen >= FILNAMSIZ) { /* in case name is too long, truncate */ + tname = (char *)malloc(FILNAMSIZ); + if (tname == NULL) + return 1; /* in case we run out of space */ + tlen = FILNAMSIZ - 1 - blen; + strcpy(tname, G.filename); /* make backup name */ + tname[tlen] = '\0'; + } else { + tname = (char *)malloc(tlen); + if (tname == NULL) + return 1; /* in case we run out of space */ + strcpy(tname, G.filename); /* make backup name */ + } + strcpy(tname+flen, BackupSuffix); + + /* GRR: should check if backup file exists, apply -n/-o to that */ + if (rename(G.filename, tname) < 0) { /* move file */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotRenameOldFile), FnFilter1(G.filename))); + free(tname); + return 1; + } + free(tname); + } else +#endif /* UNIXBACKUP */ +#ifdef DOS_FLX_OS2_W32 + if (!(G.statbuf.st_mode & S_IWRITE)) { + Trace((stderr, "open_outfile: existing file %s is read-only\n", + FnFilter1(G.filename))); + chmod(G.filename, S_IREAD | S_IWRITE); + Trace((stderr, "open_outfile: %s now writable\n", + FnFilter1(G.filename))); + } +#endif /* DOS_FLX_OS2_W32 */ + if (unlink(G.filename) != 0) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotDeleteOldFile), FnFilter1(G.filename))); + return 1; + } + Trace((stderr, "open_outfile: %s now deleted\n", + FnFilter1(G.filename))); + } +#endif /* DOS_FLX_OS2_W32 || UNIX || __BEOS__ */ +#ifdef RISCOS + if (SWI_OS_File_7(G.filename,0xDEADDEAD,0xDEADDEAD,G.lrec.ucsize)!=NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } +#endif /* RISCOS */ +#ifdef TOPS20 + char *tfilnam; + + if ((tfilnam = (char *)malloc(2*strlen(G.filename)+1)) == (char *)NULL) + return 1; + strcpy(tfilnam, G.filename); + upper(tfilnam); + enquote(tfilnam); + if ((G.outfile = fopen(tfilnam, FOPW)) == (FILE *)NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + tfilnam)); + free(tfilnam); + return 1; + } + free(tfilnam); +#else /* !TOPS20 */ +#ifdef MTS + if (uO.aflag) + G.outfile = fopen(G.filename, FOPWT); + else + G.outfile = fopen(G.filename, FOPW); + if (G.outfile == (FILE *)NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } +#else /* !MTS */ +#ifdef TANDEM + if (SSTAT(G.filename, &G.statbuf) == 0) { + Trace((stderr, "open_outfile: stat(%s) returns 0 (file exists)\n", + FnFilter1(G.filename))); + if (unlink(G.filename) != 0) { + Trace((stderr, "open_outfile: existing file %s is read-only\n", + FnFilter1(G.filename))); + chmod(G.filename, S_IRUSR | S_IWUSR); + Trace((stderr, "open_outfile: %s now writable\n", + FnFilter1(G.filename))); + if (unlink(G.filename) != 0) + return 1; + } + Trace((stderr, "open_outfile: %s now deleted\n", + FnFilter1(G.filename))); + } + if (G.pInfo->textmode) + G.outfile = fopen(G.filename, FOPWT); + else + G.outfile = fopen(G.filename, FOPW); + if (G.outfile == (FILE *)NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } +#else /* !TANDEM */ +#ifdef DEBUG + Info(slide, 1, ((char *)slide, + "open_outfile: doing fopen(%s) for reading\n", FnFilter1(G.filename))); + if ((G.outfile = fopen(G.filename, FOPR)) == (FILE *)NULL) + Info(slide, 1, ((char *)slide, + "open_outfile: fopen(%s) for reading failed: does not exist\n", + FnFilter1(G.filename))); + else { + Info(slide, 1, ((char *)slide, + "open_outfile: fopen(%s) for reading succeeded: file exists\n", + FnFilter1(G.filename))); + fclose(G.outfile); + } +#endif /* DEBUG */ +#ifdef NOVELL_BUG_FAILSAFE + if (G.dne && ((G.outfile = fopen(G.filename, FOPR)) != (FILE *)NULL)) { + Info(slide, 0x401, ((char *)slide, LoadFarString(NovellBug), + FnFilter1(G.filename))); + fclose(G.outfile); + return 1; /* with "./" fix in checkdir(), should never reach here */ + } +#endif /* NOVELL_BUG_FAILSAFE */ + Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", + FnFilter1(G.filename))); + if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) { + Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } + Trace((stderr, "open_outfile: fopen(%s) for writing succeeded\n", + FnFilter1(G.filename))); +#endif /* !TANDEM */ +#endif /* !MTS */ +#endif /* !TOPS20 */ + +#ifdef USE_FWRITE +#ifdef DOS_OS2_W32 + /* 16-bit MSC: buffer size must be strictly LESS than 32K (WSIZE): bogus */ + setbuf(G.outfile, (char *)NULL); /* make output unbuffered */ +#else /* !DOS_OS2_W32 */ +#ifndef RISCOS +#ifdef _IOFBF /* make output fully buffered (works just about like write()) */ + setvbuf(G.outfile, (char *)slide, _IOFBF, WSIZE); +#else + setbuf(G.outfile, (char *)slide); +#endif +#endif /* !RISCOS */ +#endif /* ?DOS_OS2_W32 */ +#endif /* USE_FWRITE */ + return 0; + +} /* end function open_outfile() */ + +#endif /* !VMS && !AOS_VS && !CMS_MVS && !MACOS */ + + + + + +/* + * These functions allow NEXTBYTE to function without needing two bounds + * checks. Call defer_leftover_input() if you ever have filled G.inbuf + * by some means other than readbyte(), and you then want to start using + * NEXTBYTE. When going back to processing bytes without NEXTBYTE, call + * undefer_input(). For example, extract_or_test_member brackets its + * central section that does the decompression with these two functions. + * If you need to check the number of bytes remaining in the current + * file while using NEXTBYTE, check (G.csize + G.incnt), not G.csize. + */ + +/****************************/ +/* function undefer_input() */ +/****************************/ + +void undefer_input(__G) + __GDEF +{ + if (G.incnt > 0) + G.csize += G.incnt; + if (G.incnt_leftover > 0) { + /* We know that "(G.csize < MAXINT)" so we can cast G.csize to int: + * This condition was checked when G.incnt_leftover was set > 0 in + * defer_leftover_input(), and it is NOT allowed to touch G.csize + * before calling undefer_input() when (G.incnt_leftover > 0) + * (single exception: see read_byte()'s "G.csize <= 0" handling) !! + */ + G.incnt = G.incnt_leftover + (int)G.csize; + G.inptr = G.inptr_leftover - (int)G.csize; + G.incnt_leftover = 0; + } else if (G.incnt < 0) + G.incnt = 0; +} /* end function undefer_input() */ + + + + + +/***********************************/ +/* function defer_leftover_input() */ +/***********************************/ + +void defer_leftover_input(__G) + __GDEF +{ + if ((long)G.incnt > G.csize) { + /* (G.csize < MAXINT), we can safely cast it to int !! */ + if (G.csize < 0L) + G.csize = 0L; + G.inptr_leftover = G.inptr + (int)G.csize; + G.incnt_leftover = G.incnt - (int)G.csize; + G.incnt = (int)G.csize; + } else + G.incnt_leftover = 0; + G.csize -= G.incnt; +} /* end function defer_leftover_input() */ + + + + + +/**********************/ +/* Function readbuf() */ +/**********************/ + +unsigned readbuf(__G__ buf, size) /* return number of bytes read into buf */ + __GDEF + char *buf; + register unsigned size; +{ + register unsigned count; + unsigned n; + + n = size; + while (size) { + if (G.incnt <= 0) { + if ((G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) == 0) + return (n-size); + else if (G.incnt < 0) { + /* another hack, but no real harm copying same thing twice */ + (*G.message)((zvoid *)&G, + (uch *)LoadFarString(ReadError), /* CANNOT use slide */ + (ulg)strlen(LoadFarString(ReadError)), 0x401); + return 0; /* discarding some data; better than lock-up */ + } + /* buffer ALWAYS starts on a block boundary: */ + G.cur_zipfile_bufstart += INBUFSIZ; + G.inptr = G.inbuf; + } + count = MIN(size, (unsigned)G.incnt); + memcpy(buf, G.inptr, count); + buf += count; + G.inptr += count; + G.incnt -= count; + size -= count; + } + return n; + +} /* end function readbuf() */ + + + + + +/***********************/ +/* Function readbyte() */ +/***********************/ + +int readbyte(__G) /* refill inbuf and return a byte if available, else EOF */ + __GDEF +{ + if (G.mem_mode) + return EOF; + if (G.csize <= 0) { + G.csize--; /* for tests done after exploding */ + G.incnt = 0; + return EOF; + } + if (G.incnt <= 0) { + if ((G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) == 0) { + G.incnt = 0; /* do not allow negative value to affect stuff */ + return EOF; + } else if (G.incnt < 0) { /* "fail" (abort, retry, ...) returns this */ + /* another hack, but no real harm copying same thing twice */ + (*G.message)((zvoid *)&G, + (uch *)LoadFarString(ReadError), + (ulg)strlen(LoadFarString(ReadError)), 0x401); + echon(); +#ifdef WINDLL + longjmp(dll_error_return, 1); +#else + DESTROYGLOBALS() + EXIT(PK_BADERR); /* totally bailing; better than lock-up */ +#endif + } + G.cur_zipfile_bufstart += INBUFSIZ; /* always starts on block bndry */ + G.inptr = G.inbuf; + defer_leftover_input(__G); /* decrements G.csize */ + } + +#if CRYPT + if (G.pInfo->encrypted) { + uch *p; + int n; + + /* This was previously set to decrypt one byte beyond G.csize, when + * incnt reached that far. GRR said, "but it's required: why?" This + * was a bug in fillinbuf() -- was it also a bug here? + */ + for (n = G.incnt, p = G.inptr; n--; p++) + zdecode(*p); + } +#endif /* CRYPT */ + + --G.incnt; + return *G.inptr++; + +} /* end function readbyte() */ + + + + + +#ifdef USE_ZLIB + +/************************/ +/* Function fillinbuf() */ +/************************/ + +int fillinbuf(__G) /* like readbyte() except returns number of bytes in inbuf */ + __GDEF +{ + if (G.mem_mode || + (G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) <= 0) + return 0; + G.cur_zipfile_bufstart += INBUFSIZ; /* always starts on a block boundary */ + G.inptr = G.inbuf; + defer_leftover_input(__G); /* decrements G.csize */ + +#if CRYPT + if (G.pInfo->encrypted) { + uch *p; + int n; + + for (n = G.incnt, p = G.inptr; n--; p++) + zdecode(*p); + } +#endif /* CRYPT */ + + return G.incnt; + +} /* end function fillinbuf() */ + +#endif /* USE_ZLIB */ + + + + + +#ifndef VMS /* for VMS use code in vms.c */ + +/********************/ +/* Function flush() */ /* returns PK error codes: */ +/********************/ /* if cflag => always 0; PK_DISK if write error */ + +int flush(__G__ rawbuf, size, unshrink) + __GDEF + uch *rawbuf; + ulg size; + int unshrink; +{ + register uch *p, *q; + uch *transbuf; +#if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) + ulg transbufsiz; +#endif + /* static int didCRlast = FALSE; moved to globals.h */ + + +/*--------------------------------------------------------------------------- + Compute the CRC first; if testing or if disk is full, that's it. + ---------------------------------------------------------------------------*/ + + G.crc32val = crc32(G.crc32val, rawbuf, (extent)size); + +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_IN_PROGRESS, G.zipfn, G.filename, NULL)) + return IZ_CTRLC; /* cancel operation by user request */ +#endif + + if (uO.tflag || size == 0L) /* testing or nothing to write: all done */ + return PK_OK; + + if (G.disk_full) + return PK_DISK; /* disk already full: ignore rest of file */ + +/*--------------------------------------------------------------------------- + Write the bytes rawbuf[0..size-1] to the output device, first converting + end-of-lines and ASCII/EBCDIC as needed. If SMALL_MEM or MED_MEM are NOT + defined, outbuf is assumed to be at least as large as rawbuf and is not + necessarily checked for overflow. + ---------------------------------------------------------------------------*/ + + if (!G.pInfo->textmode) { /* write raw binary data */ + /* GRR: note that for standard MS-DOS compilers, size argument to + * fwrite() can never be more than 65534, so WriteError macro will + * have to be rewritten if size can ever be that large. For now, + * never more than 32K. Also note that write() returns an int, which + * doesn't necessarily limit size to 32767 bytes if write() is used + * on 16-bit systems but does make it more of a pain; however, because + * at least MSC 5.1 has a lousy implementation of fwrite() (as does + * DEC Ultrix cc), write() is used anyway. + */ +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ rawbuf, size); + else +#endif + if (!uO.cflag && WriteError(rawbuf, size, G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, rawbuf, size, 0)) + return 0; + } else { /* textmode: aflag is true */ + if (unshrink) { + /* rawbuf = outbuf */ + transbuf = G.outbuf2; +#if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) + transbufsiz = TRANSBUFSIZ; +#endif + } else { + /* rawbuf = slide */ + transbuf = G.outbuf; +#if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) + transbufsiz = OUTBUFSIZ; + Trace((stderr, "\ntransbufsiz = OUTBUFSIZ = %u\n", OUTBUFSIZ)); +#endif + } + if (G.newfile) { +#ifdef VMS_TEXT_CONV + /* GRR: really want to check if -aa (or -aaa?) was given... */ + if (rawbuf[1]) { /* first line is more than 255 chars long */ + Trace((stderr, + "\nfirst line of VMS `text' too long; switching to normal extraction\n")); + G.VMS_line_state = -1; /* -1: don't treat as VMS text */ + } else + G.VMS_line_state = 0; /* 0: ready to read line length */ +#endif + G.didCRlast = FALSE; /* no previous buffers written */ + G.newfile = FALSE; + } + +#ifdef VMS_TEXT_CONV + if (G.pInfo->hostnum == VMS_ && G.extra_field && G.VMS_line_state >= 0) + { + /* GRR: really want to check for actual VMS extra field, and + * ideally for variable-length record format */ +/* + printf("\n>>>>>> GRR: file is VMS text and has an extra field\n"); + */ + + p = rawbuf; + q = transbuf; + while(p < rawbuf+(unsigned)size) { + switch (G.VMS_line_state) { + + /* 0: ready to read line length */ + case 0: + G.VMS_line_length = 0; + G.VMS_line_pad = 0; + if (p == rawbuf+(unsigned)size-1) { /* last char */ + G.VMS_line_length = (int)((uch)(*p++)); + G.VMS_line_state = 1; + } else { + G.VMS_line_length = makeword(p); + p += 2; + G.VMS_line_state = 2; + } + if (G.VMS_line_length & 1) /* odd */ + G.VMS_line_pad = 1; + break; + + /* 1: read one byte of length, need second */ + case 1: + G.VMS_line_length += ((int)((uch)(*p++)) << 8); + G.VMS_line_state = 2; + break; + + /* 2: ready to read VMS_line_length chars */ + case 2: + if (G.VMS_line_length < rawbuf+(unsigned)size-p) { + if (G.VMS_line_length >= + transbuf+(unsigned)transbufsiz-q) + { + int outroom = transbuf+(unsigned)transbufsiz-q; + +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, outroom); +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, + (unsigned)outroom); + else +#endif + if (!uO.cflag && WriteError(transbuf, + (unsigned)outroom, G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)outroom, 0)) + return 0; + q = transbuf; + p += outroom; + G.VMS_line_length -= outroom; + /* fall through to normal case */ + } +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, G.VMS_line_length); + q += G.VMS_line_length; + p += G.VMS_line_length; + G.VMS_line_length = 0; /* necessary?? */ + G.VMS_line_state = 3; + + } else { /* remaining input is less than full line */ + int remaining = rawbuf+(unsigned)size-p; + + if (remaining < + transbuf+(unsigned)transbufsiz-q) + { + int outroom = transbuf+(unsigned)transbufsiz-q; + +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, outroom); +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, + (unsigned)(outroom)); + else +#endif + if (!uO.cflag && WriteError(transbuf, + (unsigned)outroom, G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)outroom, 0)) + return 0; + q = transbuf; + p += outroom; + remaining -= outroom; + } +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, remaining); + q += remaining; + p += remaining; + G.VMS_line_length -= remaining; + /* no change in G.VMS_line_state */ + } + break; + + /* 3: ready to PutNativeEOL */ + case 3: + if (q > transbuf+(unsigned)transbufsiz-lenEOL) { +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, + (unsigned)(q-transbuf)); + else +#endif + if (!uO.cflag && + WriteError(transbuf, (unsigned)(q-transbuf), + G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)(q-transbuf), 0)) + return 0; + q = transbuf; + } + PutNativeEOL + if (G.VMS_line_pad) + if (p < rawbuf+(unsigned)size) { + ++p; + G.VMS_line_state = 0; + } else + G.VMS_line_state = 4; + else + G.VMS_line_state = 0; + break; + + /* 4: ready to read pad byte */ + case 4: + ++p; + G.VMS_line_state = 0; + break; + } + } /* end while */ + + } else +#endif /* VMS_TEXT_CONV */ + + /*----------------------------------------------------------------------- + Algorithm: CR/LF => native; lone CR => native; lone LF => native. + This routine is only for non-raw-VMS, non-raw-VM/CMS files (i.e., + stream-oriented files, not record-oriented). + -----------------------------------------------------------------------*/ + + /* else not VMS text */ { + p = rawbuf; + if (*p == LF && G.didCRlast) + ++p; + G.didCRlast = FALSE; + for (q = transbuf; p < rawbuf+(unsigned)size; ++p) { + if (*p == CR) { /* lone CR or CR/LF: EOL either way */ + PutNativeEOL + if (p == rawbuf+(unsigned)size-1) /* last char in buffer */ + G.didCRlast = TRUE; + else if (p[1] == LF) /* get rid of accompanying LF */ + ++p; + } else if (*p == LF) /* lone LF */ + PutNativeEOL + else +#ifndef DOS_FLX_OS2_W32 + if (*p != CTRLZ) /* lose all ^Z's */ +#endif + *q++ = native(*p); + +#if (defined(SMALL_MEM) || defined(MED_MEM)) +# if (lenEOL == 1) /* don't check unshrink: both buffers small but equal */ + if (!unshrink) +# endif + /* check for danger of buffer overflow and flush */ + if (q > transbuf+(unsigned)transbufsiz-lenEOL) { + Trace((stderr, + "p - rawbuf = %u q-transbuf = %u size = %lu\n", + (unsigned)(p-rawbuf), (unsigned)(q-transbuf), size)); + if (!uO.cflag && WriteError(transbuf, + (unsigned)(q-transbuf), G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)(q-transbuf), 0)) + return 0; + q = transbuf; + continue; + } +#endif /* SMALL_MEM || MED_MEM */ + } + } + + /*----------------------------------------------------------------------- + Done translating: write whatever we've got to file (or screen). + -----------------------------------------------------------------------*/ + + Trace((stderr, "p - rawbuf = %u q-transbuf = %u size = %lu\n", + (unsigned)(p-rawbuf), (unsigned)(q-transbuf), size)); + if (q > transbuf) { +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, (unsigned)(q-transbuf)); + else +#endif + if (!uO.cflag && WriteError(transbuf, (unsigned)(q-transbuf), + G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, transbuf, + (ulg)(q-transbuf), 0)) + return 0; + } + } + + return 0; + +} /* end function flush() */ + + + + + +/*************************/ +/* Function disk_error() */ +/*************************/ + +static int disk_error(__G) + __GDEF +{ + /* OK to use slide[] here because this file is finished regardless */ + Info(slide, 0x4a1, ((char *)slide, LoadFarString(DiskFullQuery), + FnFilter1(G.filename))); + +#ifndef WINDLL + fgets(G.answerbuf, 9, stdin); + if (*G.answerbuf == 'y') /* stop writing to this file */ + G.disk_full = 1; /* (outfile bad?), but new OK */ + else +#endif + G.disk_full = 2; /* no: exit program */ + + return PK_DISK; + +} /* end function disk_error() */ + +#endif /* !VMS */ + + + + + +/*****************************/ +/* Function UzpMessagePrnt() */ +/*****************************/ + +int UZ_EXP UzpMessagePrnt(pG, buf, size, flag) + zvoid *pG; /* globals struct: always passed */ + uch *buf; /* preformatted string to be printed */ + ulg size; /* length of string (may include nulls) */ + int flag; /* flag bits */ +{ + /* IMPORTANT NOTE: + * The name of the first parameter of UzpMessagePrnt(), which passes + * the "Uz_Globs" address, >>> MUST <<< be identical to the string + * expansion of the __G__ macro in the REENTRANT case (see globals.h). + * This name identity is mandatory for the LoadFarString() macro + * (in the SMALL_MEM case) !!! + */ + int error; + uch *q=buf, *endbuf=buf+(unsigned)size; +#ifdef MORE + uch *p=buf-1; +#endif + FILE *outfp; + + +/*--------------------------------------------------------------------------- + These tests are here to allow fine-tuning of UnZip's output messages, + but none of them will do anything without setting the appropriate bit + in the flag argument of every Info() statement which is to be turned + *off*. That is, all messages are currently turned on for all ports. + To turn off *all* messages, use the UzpMessageNull() function instead + of this one. + ---------------------------------------------------------------------------*/ + +#if (defined(OS2) && defined(DLL)) + if (MSG_NO_DLL2(flag)) /* if OS/2 DLL bit is set, do NOT print this msg */ + return 0; +#endif +#ifdef WINDLL + if (MSG_NO_WDLL(flag)) + return 0; +#endif +#ifdef WINDLL + if (MSG_NO_WGUI(flag)) + return 0; +#endif +/* +#ifdef ACORN_GUI + if (MSG_NO_AGUI(flag)) + return 0; +#endif + */ +#ifdef DLL /* don't display message if data is redirected */ + if (((Uz_Globs *)pG)->redirect_data && + !((Uz_Globs *)pG)->redirect_text) + return 0; +#endif + + if (MSG_STDERR(flag) && !((Uz_Globs *)pG)->UzO.tflag) + outfp = (FILE *)stderr; + else + outfp = (FILE *)stdout; + +#ifdef QUERY_TRNEWLN + /* some systems require termination of query prompts with '\n' to force + * immediate display */ + if (MSG_MNEWLN(flag)) { /* assumes writable buffer (e.g., slide[]) */ + *endbuf++ = '\n'; /* with room for one more char at end of buf */ + ++size; /* (safe assumption: only used for four */ + } /* short queries in extract.c and fileio.c) */ +#endif + + if (MSG_TNEWLN(flag)) { /* again assumes writable buffer: fragile... */ + if ((!size && !((Uz_Globs *)pG)->sol) || + (size && (endbuf[-1] != '\n'))) + { + *endbuf++ = '\n'; + ++size; + } + } + +#ifdef MORE + /* room for --More-- and one line of overlap: */ + ((Uz_Globs *)pG)->height = SCREENLINES - 2; +#endif + + if (MSG_LNEWLN(flag) && !((Uz_Globs *)pG)->sol) { + /* not at start of line: want newline */ +#ifdef OS2DLL + if (!((Uz_Globs *)pG)->redirect_text) { +#endif + putc('\n', outfp); + fflush(outfp); +#ifdef MORE + if (((Uz_Globs *)pG)->M_flag) + { + ++((Uz_Globs *)pG)->numlines; + if (((Uz_Globs *)pG)->numlines % + ((Uz_Globs *)pG)->height == 0L) /* GRR: fix */ + (*((Uz_Globs *)pG)->mpause)((zvoid *)pG, + LoadFarString(MorePrompt), 1); + } +#endif /* MORE */ + if (MSG_STDERR(flag) && ((Uz_Globs *)pG)->UzO.tflag && + !isatty(1) && isatty(2)) + { + /* error output from testing redirected: also send to stderr */ + putc('\n', stderr); + fflush(stderr); + } +#ifdef OS2DLL + } else + REDIRECTC('\n'); +#endif + ((Uz_Globs *)pG)->sol = TRUE; + } + + /* put zipfile name, filename and/or error/warning keywords here */ + +#ifdef MORE + if (((Uz_Globs *)pG)->M_flag +#ifdef OS2DLL + && !((Uz_Globs *)pG)->redirect_text +#endif + ) + { + while (++p < endbuf) { + if (*p == '\n') { + ++((Uz_Globs *)pG)->numlines; + if (((Uz_Globs *)pG)->numlines % + ((Uz_Globs *)pG)->height == 0L) /* GRR: fix */ + { + if ((error = WriteError(q, p-q+1, outfp)) != 0) + return error; + fflush(outfp); + ((Uz_Globs *)pG)->sol = TRUE; + q = p + 1; + (*((Uz_Globs *)pG)->mpause)((zvoid *)pG, + LoadFarString(MorePrompt), 1); + } + } + } /* end while */ + size = (ulg)(p - q); /* remaining text */ + } +#endif /* MORE */ + + if (size) { +#ifdef OS2DLL + if (!((Uz_Globs *)pG)->redirect_text) { +#endif + if ((error = WriteError(q, size, outfp)) != 0) + return error; + fflush(outfp); + if (MSG_STDERR(flag) && ((Uz_Globs *)pG)->UzO.tflag && + !isatty(1) && isatty(2)) + { + /* error output from testing redirected: also send to stderr */ + if ((error = WriteError(q, size, stderr)) != 0) + return error; + fflush(stderr); + } +#ifdef OS2DLL + } else { /* GRR: this is ugly: hide with macro */ + if ((error = REDIRECTPRINT(q, size)) != 0) + return error; + } +#endif + ((Uz_Globs *)pG)->sol = (endbuf[-1] == '\n'); + } + return 0; + +} /* end function UzpMessagePrnt() */ + + + + + +#ifdef DLL + +/*****************************/ +/* Function UzpMessageNull() */ /* convenience routine for no output at all */ +/*****************************/ + +int UZ_EXP UzpMessageNull(pG, buf, size, flag) + zvoid *pG; /* globals struct: always passed */ + uch *buf; /* preformatted string to be printed */ + ulg size; /* length of string (may include nulls) */ + int flag; /* flag bits */ +{ + return 0; + +} /* end function UzpMessageNull() */ + +#endif /* DLL */ + + + + + +/***********************/ +/* Function UzpInput() */ /* GRR: this is a placeholder for now */ +/***********************/ + +int UZ_EXP UzpInput(pG, buf, size, flag) + zvoid *pG; /* globals struct: always passed */ + uch *buf; /* preformatted string to be printed */ + int *size; /* (address of) size of buf and of returned string */ + int flag; /* flag bits (bit 0: no echo) */ +{ + /* tell picky compilers to shut up about "unused variable" warnings */ + pG = pG; buf = buf; flag = flag; + + *size = 0; + return 0; + +} /* end function UzpInput() */ + + + + + +#if (!defined(WINDLL) && !defined(MACOS)) + +/***************************/ +/* Function UzpMorePause() */ +/***************************/ + +void UZ_EXP UzpMorePause(pG, prompt, flag) + zvoid *pG; /* globals struct: always passed */ + ZCONST char *prompt; /* "--More--" prompt */ + int flag; /* 0 = any char OK; 1 = accept only '\n', ' ', q */ + { +#if 0 + uch c; + +/*--------------------------------------------------------------------------- + Print a prompt and wait for the user to press a key, then erase prompt + if possible. + ---------------------------------------------------------------------------*/ + + if (!((Uz_Globs *)pG)->sol) + fprintf(stderr, "\n"); + /* numlines may or may not be used: */ + fprintf(stderr, prompt, ((Uz_Globs *)pG)->numlines); + fflush(stderr); + if (flag & 1) { + do { + c = (uch)FGETCH(0); + } while (c != '\r' && c != '\n' && c != ' ' && c != 'q' && c != 'Q'); + } else + c = (uch)FGETCH(0); + + /* newline was not echoed, so cover up prompt line */ + fprintf(stderr, LoadFarString(HidePrompt)); + fflush(stderr); + + if (ToLower(c) == 'q') { + DESTROYGLOBALS() + EXIT(PK_COOL); + } + + ((Uz_Globs *)pG)->sol = TRUE; + +#endif +} /* end function UzpMorePause() */ + +#endif /* !WINDLL && !MACOS */ + + + + +#ifndef WINDLL + +/**************************/ +/* Function UzpPassword() */ +/**************************/ + +int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) + zvoid *pG; /* pointer to UnZip's internal global vars */ + int *rcnt; /* retry counter */ + char *pwbuf; /* buffer for password */ + int size; /* size of password buffer */ + ZCONST char *zfn; /* name of zip archive */ + ZCONST char *efn; /* name of archive entry being processed */ + { +#if CRYPT + int r = IZ_PW_ENTERED; + char *m; + char *prompt; + +#ifndef REENTRANT + /* tell picky compilers to shut up about "unused variable" warnings */ + pG = pG; +#endif + + if (*rcnt == 0) { /* First call for current entry */ + *rcnt = 2; + if ((prompt = (char *)malloc(2*FILNAMSIZ + 15)) != (char *)NULL) { + sprintf(prompt, LoadFarString(PasswPrompt), + FnFilter1(zfn), FnFilter2(efn)); + m = prompt; + } else + m = (char *)LoadFarString(PasswPrompt2); + } else { /* Retry call, previous password was wrong */ + (*rcnt)--; + prompt = NULL; + m = (char *)LoadFarString(PasswRetry); + } + + m = getp(__G__ m, pwbuf, size); + if (prompt != (char *)NULL) { + free(prompt); + } + if (m == (char *)NULL) { + r = IZ_PW_ERROR; + } + else if (*pwbuf == '\0') { + r = IZ_PW_CANCELALL; + } + return r; + +#else /* !CRYPT */ + /* tell picky compilers to shut up about "unused variable" warnings */ + pG = pG; rcnt = rcnt; pwbuf = pwbuf; size = size; zfn = zfn; efn = efn; + + return IZ_PW_ERROR; /* internal error; function should never get called */ +#endif /* ?CRYPT */ + +} /* end function UzpPassword() */ + + + + + +/**********************/ +/* Function handler() */ +/**********************/ + +void handler(signal) /* upon interrupt, turn on echo and exit cleanly */ + int signal; +{ + GETGLOBALS(); + +#if !(defined(SIGBUS) || defined(SIGSEGV)) /* add a newline if not at */ + (*G.message)((zvoid *)&G, slide, 0L, 0x41); /* start of line (to stderr; */ +#endif /* slide[] should be safe) */ + + echon(); + +#ifdef SIGBUS + if (signal == SIGBUS) { + Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt), + "bus error")); + DESTROYGLOBALS() + EXIT(PK_BADERR); + } +#endif /* SIGBUS */ + +#ifdef SIGSEGV + if (signal == SIGSEGV) { + Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt), + "segmentation violation")); + DESTROYGLOBALS() + EXIT(PK_BADERR); + } +#endif /* SIGSEGV */ + + /* probably ctrl-C */ + DESTROYGLOBALS() +#if defined(AMIGA) && defined(__SASC) + _abort(); +#endif + EXIT(IZ_CTRLC); /* was EXIT(0), then EXIT(PK_ERR) */ +} + +#endif /* !WINDLL */ + + + + +#if (!defined(VMS) && !defined(CMS_MVS)) +#if (!defined(OS2) || defined(TIMESTAMP)) + +#if (!defined(HAVE_MKTIME) || defined(AMIGA) || defined(WIN32)) +/* also used in amiga/filedate.c and win32/win32.c */ +ZCONST ush ydays[] = + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; +#endif + +/*******************************/ +/* Function dos_to_unix_time() */ /* used for freshening/updating/timestamps */ +/*******************************/ + +time_t dos_to_unix_time(dosdatetime) + ulg dosdatetime; +{ + time_t m_time; + +#ifdef HAVE_MKTIME + + ZCONST time_t now = time(NULL); + struct tm *tm; +# define YRBASE 1900 + + tm = localtime(&now); + tm->tm_isdst = -1; /* let mktime determine if DST is in effect */ + + /* dissect date */ + tm->tm_year = ((int)(dosdatetime >> 25) & 0x7f) + (1980 - YRBASE); + tm->tm_mon = ((int)(dosdatetime >> 21) & 0x0f) - 1; + tm->tm_mday = ((int)(dosdatetime >> 16) & 0x1f); + + /* dissect time */ + tm->tm_hour = (int)((unsigned)dosdatetime >> 11) & 0x1f; + tm->tm_min = (int)((unsigned)dosdatetime >> 5) & 0x3f; + tm->tm_sec = (int)((unsigned)dosdatetime << 1) & 0x3e; + + m_time = mktime(tm); + NATIVE_TO_TIMET(m_time) /* NOP unless MSC 7.0 or Macintosh */ + TTrace((stderr, " final m_time = %lu\n", (ulg)m_time)); + +#else /* !HAVE_MKTIME */ + + int yr, mo, dy, hh, mm, ss; +#ifdef TOPS20 +# define YRBASE 1900 + struct tmx *tmx; + char temp[20]; +#else /* !TOPS20 */ +# define YRBASE 1970 + int leap; + unsigned days; + struct tm *tm; +#if (!defined(MACOS) && !defined(RISCOS) && !defined(QDOS) && !defined(TANDEM)) +#ifdef WIN32 + TIME_ZONE_INFORMATION tzinfo; + DWORD res; +#else /* ! WIN32 */ +#ifndef BSD4_4 /* GRR: change to !defined(MODERN) ? */ +#if (defined(BSD) || defined(MTS) || defined(__GO32__)) + struct timeb tbp; +#else /* !(BSD || MTS || __GO32__) */ +#ifdef DECLARE_TIMEZONE + extern time_t timezone; +#endif +#endif /* ?(BSD || MTS || __GO32__) */ +#endif /* !BSD4_4 */ +#endif /* ?WIN32 */ +#endif /* !MACOS && !RISCOS && !QDOS && !TANDEM */ +#endif /* ?TOPS20 */ + + + /* dissect date */ + yr = ((int)(dosdatetime >> 25) & 0x7f) + (1980 - YRBASE); + mo = ((int)(dosdatetime >> 21) & 0x0f) - 1; + dy = ((int)(dosdatetime >> 16) & 0x1f) - 1; + + /* dissect time */ + hh = (int)((unsigned)dosdatetime >> 11) & 0x1f; + mm = (int)((unsigned)dosdatetime >> 5) & 0x3f; + ss = (int)((unsigned)dosdatetime & 0x1f) * 2; + +#ifdef TOPS20 + tmx = (struct tmx *)malloc(sizeof(struct tmx)); + sprintf (temp, "%02d/%02d/%02d %02d:%02d:%02d", mo+1, dy+1, yr, hh, mm, ss); + time_parse(temp, tmx, (char *)0); + m_time = time_make(tmx); + free(tmx); + +#else /* !TOPS20 */ + +/*--------------------------------------------------------------------------- + Calculate the number of seconds since the epoch, usually 1 January 1970. + ---------------------------------------------------------------------------*/ + + /* leap = # of leap yrs from YRBASE up to but not including current year */ + leap = ((yr + YRBASE - 1) / 4); /* leap year base factor */ + + /* calculate days from BASE to this year and add expired days this year */ + days = (yr * 365) + (leap - 492) + ydays[mo]; + + /* if year is a leap year and month is after February, add another day */ + if ((mo > 1) && ((yr+YRBASE)%4 == 0) && ((yr+YRBASE) != 2100)) + ++days; /* OK through 2199 */ + + /* convert date & time to seconds relative to 00:00:00, 01/01/YRBASE */ + m_time = (time_t)((unsigned long)(days + dy) * 86400L + + (unsigned long)hh * 3600L + + (unsigned long)(mm * 60 + ss)); + /* - 1; MS-DOS times always rounded up to nearest even second */ + TTrace((stderr, "dos_to_unix_time:\n")); + TTrace((stderr, " m_time before timezone = %lu\n", (ulg)m_time)); + +/*--------------------------------------------------------------------------- + Adjust for local standard timezone offset. + ---------------------------------------------------------------------------*/ + +#if (!defined(MACOS) && !defined(RISCOS) && !defined(QDOS) && !defined(TANDEM)) +#ifdef WIN32 + /* account for timezone differences */ + res = GetTimeZoneInformation(&tzinfo); + if (res != TIME_ZONE_ID_UNKNOWN) + { + m_time += 60*(tzinfo.Bias); +#else /* !WIN32 */ +#if (defined(BSD) || defined(MTS) || defined(__GO32__)) +#ifdef BSD4_4 + if ( (dosdatetime >= DOSTIME_2038_01_18) && + (m_time < (time_t)0x70000000L) ) + m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ + if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ + m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ + if ((tm = localtime(&m_time)) != (struct tm *)NULL) + m_time -= tm->tm_gmtoff; /* sec. EAST of GMT: subtr. */ +#else /* !(BSD4_4 */ + ftime(&tbp); /* get `timezone' */ + m_time += tbp.timezone * 60L; /* seconds WEST of GMT: add */ +#endif /* ?(BSD4_4 || __EMX__) */ +#else /* !(BSD || MTS || __GO32__) */ + /* tzset was already called at start of process_zipfiles() */ + /* tzset(); */ /* set `timezone' variable */ +#ifndef __BEOS__ /* BeOS DR8 has no timezones... */ + m_time += timezone; /* seconds WEST of GMT: add */ +#endif +#endif /* ?(BSD || MTS || __GO32__) */ +#endif /* ?WIN32 */ + TTrace((stderr, " m_time after timezone = %lu\n", (ulg)m_time)); + +/*--------------------------------------------------------------------------- + Adjust for local daylight savings (summer) time. + ---------------------------------------------------------------------------*/ + +#ifndef BSD4_4 /* (DST already added to tm_gmtoff, so skip tm_isdst) */ + if ( (dosdatetime >= DOSTIME_2038_01_18) && + (m_time < (time_t)0x70000000L) ) + m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ + if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ + m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ + TIMET_TO_NATIVE(m_time) /* NOP unless MSC 7.0 or Macintosh */ + if (((tm = localtime((time_t *)&m_time)) != NULL) && tm->tm_isdst) +#ifdef WIN32 + m_time += 60L * tzinfo.DaylightBias; /* adjust with DST bias */ + else + m_time += 60L * tzinfo.StandardBias; /* add StdBias (normally 0) */ +#else + m_time -= 60L * 60L; /* adjust for daylight savings time */ +#endif + NATIVE_TO_TIMET(m_time) /* NOP unless MSC 7.0 or Macintosh */ + TTrace((stderr, " m_time after DST = %lu\n", (ulg)m_time)); +#endif /* !BSD4_4 */ +#ifdef WIN32 + } +#endif +#endif /* !MACOS && !RISCOS && !QDOS && !TANDEM */ +#endif /* ?TOPS20 */ + +#endif /* ?HAVE_MKTIME */ + + if ( (dosdatetime >= DOSTIME_2038_01_18) && + (m_time < (time_t)0x70000000L) ) + m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ + if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ + m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ + + return m_time; + +} /* end function dos_to_unix_time() */ + +#endif /* !OS2 || TIMESTAMP */ +#endif /* !VMS && !CMS_MVS */ + + + +#if (!defined(VMS) && !defined(OS2) && !defined(CMS_MVS)) + +/******************************/ +/* Function check_for_newer() */ /* used for overwriting/freshening/updating */ +/******************************/ + +int check_for_newer(__G__ filename) /* return 1 if existing file is newer */ + __GDEF /* or equal; 0 if older; -1 if doesn't */ + char *filename; /* exist yet */ +{ + time_t existing, archive; +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif +#ifdef AOS_VS + long dyy, dmm, ddd, dhh, dmin, dss; + + + dyy = (lrec.last_mod_dos_datetime >> 25) + 1980; + dmm = (lrec.last_mod_dos_datetime >> 21) & 0x0f; + ddd = (lrec.last_mod_dos_datetime >> 16) & 0x1f; + dhh = (lrec.last_mod_dos_datetime >> 11) & 0x1f; + dmin = (lrec.last_mod_dos_datetime >> 5) & 0x3f; + dss = (lrec.last_mod_dos_datetime & 0x1f) * 2; + + /* under AOS/VS, file times can only be set at creation time, + * with the info in a special DG format. Make sure we can create + * it here - we delete it later & re-create it, whether or not + * it exists now. + */ + if (!zvs_create(filename, (((ulg)dgdate(dmm, ddd, dyy)) << 16) | + (dhh*1800L + dmin*30L + dss/2L), -1L, -1L, (char *) -1, -1, -1, -1)) + return DOES_NOT_EXIST; +#endif /* AOS_VS */ + + Trace((stderr, "check_for_newer: doing stat(%s)\n", FnFilter1(filename))); + if (SSTAT(filename, &G.statbuf)) { + Trace((stderr, + "check_for_newer: stat(%s) returns %d: file does not exist\n", + FnFilter1(filename), SSTAT(filename, &G.statbuf))); +#ifdef SYMLINKS + Trace((stderr, "check_for_newer: doing lstat(%s)\n", + FnFilter1(filename))); + /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ + if (lstat(filename, &G.statbuf) == 0) { + Trace((stderr, + "check_for_newer: lstat(%s) returns 0: symlink does exist\n", + FnFilter1(filename))); + if (QCOND2 && !uO.overwrite_all) + Info(slide, 0, ((char *)slide, LoadFarString(FileIsSymLink), + FnFilter1(filename), " with no real file")); + return EXISTS_AND_OLDER; /* symlink dates are meaningless */ + } +#endif /* SYMLINKS */ + return DOES_NOT_EXIST; + } + Trace((stderr, "check_for_newer: stat(%s) returns 0: file exists\n", + FnFilter1(filename))); + +#ifdef SYMLINKS + /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ + if (lstat(filename, &G.statbuf) == 0 && S_ISLNK(G.statbuf.st_mode)) { + Trace((stderr, "check_for_newer: %s is a symbolic link\n", + FnFilter1(filename))); + if (QCOND2 && !uO.overwrite_all) + Info(slide, 0, ((char *)slide, LoadFarString(FileIsSymLink), + FnFilter1(filename), "")); + return EXISTS_AND_OLDER; /* symlink dates are meaningless */ + } +#endif /* SYMLINKS */ + + NATIVE_TO_TIMET(G.statbuf.st_mtime) /* NOP unless MSC 7.0 or Macintosh */ + +#ifdef USE_EF_UT_TIME + /* The `Unix extra field mtime' should be used for comparison with the + * time stamp of the existing file >>>ONLY<<< when the EF info is also + * used to set the modification time of the extracted file. + */ + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, + G.lrec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TTrace((stderr, "check_for_newer: using Unix extra field mtime\n")); + existing = G.statbuf.st_mtime; + archive = z_utime.mtime; + } else { + /* round up existing filetime to nearest 2 seconds for comparison, + * but saturate in case of arithmetic overflow + */ + existing = ((G.statbuf.st_mtime & 1) && + (G.statbuf.st_mtime + 1 > G.statbuf.st_mtime)) ? + G.statbuf.st_mtime + 1 : G.statbuf.st_mtime; + archive = dos_to_unix_time(G.lrec.last_mod_dos_datetime); + } +#else /* !USE_EF_UT_TIME */ + /* round up existing filetime to nearest 2 seconds for comparison, + * but saturate in case of arithmetic overflow + */ + existing = ((G.statbuf.st_mtime & 1) && + (G.statbuf.st_mtime + 1 > G.statbuf.st_mtime)) ? + G.statbuf.st_mtime + 1 : G.statbuf.st_mtime; + archive = dos_to_unix_time(G.lrec.last_mod_dos_datetime); +#endif /* ?USE_EF_UT_TIME */ + + TTrace((stderr, "check_for_newer: existing %lu, archive %lu, e-a %ld\n", + (ulg)existing, (ulg)archive, (long)(existing-archive))); + + return (existing >= archive); + +} /* end function check_for_newer() */ + +#endif /* !VMS && !OS2 && !CMS_MVS */ + + + + + +/************************/ +/* Function do_string() */ +/************************/ + +int do_string(__G__ len, option) /* return PK-type error code */ + __GDEF + unsigned int len; /* without prototype, ush converted to this */ + int option; +{ + long comment_bytes_left, block_length; + int error=PK_OK; + ush extra_len; +#ifdef AMIGA + char tmp_fnote[2 * AMIGA_FILENOTELEN]; /* extra room for squozen chars */ +#endif + + +/*--------------------------------------------------------------------------- + This function processes arbitrary-length (well, usually) strings. Four + options are allowed: SKIP, wherein the string is skipped (pretty logical, + eh?); DISPLAY, wherein the string is printed to standard output after un- + dergoing any necessary or unnecessary character conversions; DS_FN, + wherein the string is put into the filename[] array after undergoing ap- + propriate conversions (including case-conversion, if that is indicated: + see the global variable pInfo->lcflag); and EXTRA_FIELD, wherein the + `string' is assumed to be an extra field and is copied to the (freshly + malloced) buffer G.extra_field. The third option should be OK since + filename is dimensioned at 1025, but we check anyway. + + The string, by the way, is assumed to start at the current file-pointer + position; its length is given by len. So start off by checking length + of string: if zero, we're already done. + ---------------------------------------------------------------------------*/ + + if (!len) + return PK_COOL; + + switch (option) { + + /* + * First case: print string on standard output. First set loop vari- + * ables, then loop through the comment in chunks of OUTBUFSIZ bytes, + * converting formats and printing as we go. The second half of the + * loop conditional was added because the file might be truncated, in + * which case comment_bytes_left will remain at some non-zero value for + * all time. outbuf and slide are used as scratch buffers because they + * are available (we should be either before or in between any file pro- + * cessing). + */ + + case DISPLAY: + case DISPL_8: + comment_bytes_left = len; + block_length = OUTBUFSIZ; /* for the while statement, first time */ + while (comment_bytes_left > 0 && block_length > 0) { + register uch *p = G.outbuf; + register uch *q = G.outbuf; + + if ((block_length = readbuf(__G__ (char *)G.outbuf, + (unsigned) MIN((long)OUTBUFSIZ, comment_bytes_left))) == 0) + return PK_EOF; + comment_bytes_left -= block_length; + + /* this is why we allocated an extra byte for outbuf: terminate + * with zero (ASCIIZ) */ + G.outbuf[(unsigned)block_length] = '\0'; + + /* remove all ASCII carriage returns from comment before printing + * (since used before A_TO_N(), check for CR instead of '\r') + */ + while (*p) { + while (*p == CR) + ++p; + *q++ = *p++; + } + /* could check whether (p - outbuf) == block_length here */ + *q = '\0'; + + if (option == DISPL_8) { + /* translate the text coded in the entry's host-dependent + "extended ASCII" charset into the compiler's (system's) + internal text code page */ + Ext_ASCII_TO_Native((char *)G.outbuf, G.pInfo->hostnum, + G.crec.version_made_by[0]); +#ifdef WINDLL + /* translate to ANSI (RTL internal codepage may be OEM) */ + INTERN_TO_ISO((char *)G.outbuf, (char *)G.outbuf); +#else /* !WINDLL */ +#ifdef WIN32 + /* Win9x console always uses OEM character coding, and + WinNT console is set to OEM charset by default, too */ + INTERN_TO_OEM((char *)G.outbuf, (char *)G.outbuf); +#endif /* WIN32 */ +#endif /* ?WINDLL */ + } else { + A_TO_N(G.outbuf); /* translate string to native */ + } + +#ifdef WINDLL + /* ran out of local mem -- had to cheat */ + win_fprintf((zvoid *)&G, stdout, len, (char *)G.outbuf); + win_fprintf((zvoid *)&G, stdout, 2, (char *)"\n\n"); +#else /* !WINDLL */ +#ifdef NOANSIFILT /* GRR: can ANSI be used with EBCDIC? */ + (*G.message)((zvoid *)&G, G.outbuf, (ulg)(q-G.outbuf), 0); +#else /* ASCII, filter out ANSI escape sequences and handle ^S (pause) */ + p = G.outbuf - 1; + q = slide; + while (*++p) { + int pause = FALSE; + + if (*p == 0x1B) { /* ASCII escape char */ + *q++ = '^'; + *q++ = '['; + } else if (*p == 0x13) { /* ASCII ^S (pause) */ + pause = TRUE; + if (p[1] == LF) /* ASCII LF */ + *q++ = *++p; + else if (p[1] == CR && p[2] == LF) { /* ASCII CR LF */ + *q++ = *++p; + *q++ = *++p; + } + } else + *q++ = *p; + if ((unsigned)(q-slide) > WSIZE-3 || pause) { /* flush */ + (*G.message)((zvoid *)&G, slide, (ulg)(q-slide), 0); + q = slide; + if (pause && G.extract_flag) /* don't pause for list/test */ + (*G.mpause)((zvoid *)&G, LoadFarString(QuitPrompt), 0); + } + } + (*G.message)((zvoid *)&G, slide, (ulg)(q-slide), 0); +#endif /* ?NOANSIFILT */ +#endif /* ?WINDLL */ + } + /* add '\n' if not at start of line */ + (*G.message)((zvoid *)&G, slide, 0L, 0x40); + break; + + /* + * Second case: read string into filename[] array. The filename should + * never ever be longer than FILNAMSIZ-1 (1024), but for now we'll check, + * just to be sure. + */ + + case DS_FN: + extra_len = 0; + if (len >= FILNAMSIZ) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(FilenameTooLongTrunc))); + error = PK_WARN; + extra_len = (ush)(len - FILNAMSIZ + 1); + len = FILNAMSIZ - 1; + } + if (readbuf(__G__ G.filename, len) == 0) + return PK_EOF; + G.filename[len] = '\0'; /* terminate w/zero: ASCIIZ */ + + /* translate the Zip entry filename coded in host-dependent "extended + ASCII" into the compiler's (system's) internal text code page */ + Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, + G.crec.version_made_by[0]); + + if (G.pInfo->lcflag) /* replace with lowercase filename */ + TOLOWER(G.filename, G.filename); + + if (G.pInfo->vollabel && len > 8 && G.filename[8] == '.') { + char *p = G.filename+8; + while (*p++) + p[-1] = *p; /* disk label, and 8th char is dot: remove dot */ + } + + if (!extra_len) /* we're done here */ + break; + + /* + * We truncated the filename, so print what's left and then fall + * through to the SKIP routine. + */ + Info(slide, 0x401, ((char *)slide, "[ %s ]\n", FnFilter1(G.filename))); + len = extra_len; + /* FALL THROUGH... */ + + /* + * Third case: skip string, adjusting readbuf's internal variables + * as necessary (and possibly skipping to and reading a new block of + * data). + */ + + case SKIP: + /* cur_zipfile_bufstart already takes account of extra_bytes, so don't + * correct for it twice: */ + ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr-G.inbuf) + len) + break; + + /* + * Fourth case: assume we're at the start of an "extra field"; malloc + * storage for it and read data into the allocated space. + */ + + case EXTRA_FIELD: + if (G.extra_field != (uch *)NULL) + free(G.extra_field); + if ((G.extra_field = (uch *)malloc(len)) == (uch *)NULL) { + Info(slide, 0x401, ((char *)slide, LoadFarString(ExtraFieldTooLong), + len)); + /* cur_zipfile_bufstart already takes account of extra_bytes, + * so don't correct for it twice: */ + ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr-G.inbuf) + len) + } else + if (readbuf(__G__ (char *)G.extra_field, len) == 0) + return PK_EOF; + break; + +#ifdef AMIGA + /* + * Fifth case, for the Amiga only: take the comment that would ordinarily + * be skipped over, and turn it into a 79 character string that will be + * attached to the file as a "filenote" after it is extracted. + */ + + case FILENOTE: + if ((extra_len = readbuf(__G__ tmp_fnote, (unsigned) + MIN(len, 2 * AMIGA_FILENOTELEN - 1))) == 0) + return PK_EOF; + if ((len -= extra_len) > 0) /* treat remainder as in case SKIP: */ + ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr - G.inbuf) + len) + /* convert multi-line text into single line with no ctl-chars: */ + tmp_fnote[extra_len] = '\0'; + while ((short int) --extra_len >= 0) + if ((unsigned) tmp_fnote[extra_len] < ' ') + if (tmp_fnote[extra_len+1] == ' ') /* no excess */ + strcpy(tmp_fnote+extra_len, tmp_fnote+extra_len+1); + else + tmp_fnote[extra_len] = ' '; + tmp_fnote[AMIGA_FILENOTELEN - 1] = '\0'; + if (G.filenotes[G.filenote_slot]) + free(G.filenotes[G.filenote_slot]); /* should not happen */ + G.filenotes[G.filenote_slot] = NULL; + if (tmp_fnote[0]) { + if (!(G.filenotes[G.filenote_slot] = malloc(strlen(tmp_fnote)+1))) + return PK_MEM; + strcpy(G.filenotes[G.filenote_slot], tmp_fnote); + } + break; +#endif /* AMIGA */ + + } /* end switch (option) */ + + return error; + +} /* end function do_string() */ + + + + + +/***********************/ +/* Function makeword() */ +/***********************/ + +ush makeword(b) + ZCONST uch *b; +{ + /* + * Convert Intel style 'short' integer to non-Intel non-16-bit + * host format. This routine also takes care of byte-ordering. + */ + return (ush)((b[1] << 8) | b[0]); +} + + + + + +/***********************/ +/* Function makelong() */ +/***********************/ + +ulg makelong(sig) + ZCONST uch *sig; +{ + /* + * Convert intel style 'long' variable to non-Intel non-16-bit + * host format. This routine also takes care of byte-ordering. + */ + return (((ulg)sig[3]) << 24) + + (((ulg)sig[2]) << 16) + + (((ulg)sig[1]) << 8) + + ((ulg)sig[0]); +} + + + +#if CRYPT + +#ifdef NEED_STR2ISO +/**********************/ +/* Function str2iso() */ +/**********************/ + +char *str2iso(dst, src) + char *dst; /* destination buffer */ + register ZCONST char *src; /* source string */ +{ +#ifdef INTERN_TO_ISO + INTERN_TO_ISO(src, dst); +#else + register uch c; + register char *dstp = dst; + + do { + c = (uch)foreign(*src++); + *dstp++ = (char)ASCII2ISO(c); + } while (c != '\0'); +#endif + + return dst; +} +#endif /* NEED_STR2ISO */ + + +#ifdef NEED_STR2OEM +/**********************/ +/* Function str2oem() */ +/**********************/ + +char *str2oem(dst, src) + char *dst; /* destination buffer */ + register ZCONST char *src; /* source string */ +{ +#ifdef INTERN_TO_OEM + INTERN_TO_OEM(src, dst); +#else + register uch c; + register char *dstp = dst; + + do { + c = (uch)foreign(*src++); + *dstp++ = (char)ASCII2OEM(c); + } while (c != '\0'); +#endif + + return dst; +} +#endif /* NEED_STR2OEM */ + +#endif /* CRYPT */ + + +#ifdef ZMEM /* memset/memcmp/memcpy for systems without either them or */ + /* bzero/bcmp/bcopy */ + /* (no known systems as of 960211) */ + +/*********************/ +/* Function memset() */ +/*********************/ + +zvoid *memset(buf, init, len) + register zvoid *buf; /* buffer location */ + register int init; /* initializer character */ + register unsigned int len; /* length of the buffer */ +{ + zvoid *start; + + start = buf; + while (len--) + *((char *)buf++) = (char)init; + return start; +} + + + +/*********************/ +/* Function memcmp() */ +/*********************/ + +int memcmp(b1, b2, len) + register ZCONST zvoid *b1; + register ZCONST zvoid *b2; + register unsigned int len; +{ + register int c; + + if (len > 0) do { + if ((c = (int)(*((ZCONST unsigned char *)b1)++) - + (int)(*((ZCONST unsigned char *)b2)++)) != 0) + return c; + } while (--len > 0) + return 0; +} + + + +/*********************/ +/* Function memcpy() */ +/*********************/ + +zvoid *memcpy(dst, src, len) + register zvoid *dst; + register ZCONST zvoid *src; + register unsigned int len; +{ + zvoid *start; + + start = dst; + while (len-- > 0) + *((char *)dst)++ = *((ZCONST char *)src)++; + return start; +} + +#endif /* ZMEM */ + + + + + +/************************/ +/* Function zstrnicmp() */ +/************************/ + +int zstrnicmp(s1, s2, n) + register ZCONST char *s1, *s2; + register unsigned n; +{ + for (; n > 0; --n, ++s1, ++s2) { + + if (ToLower(*s1) != ToLower(*s2)) + /* test includes early termination of one string */ + return (ToLower(*s1) < ToLower(*s2))? -1 : 1; + + if (*s1 == '\0') /* both strings terminate early */ + return 0; + } + return 0; +} + + + + + +#ifdef REGULUS /* returns the inode number on success(!)...argh argh argh */ +# undef stat + +/********************/ +/* Function zstat() */ +/********************/ + +int zstat(p, s) + char *p; + struct stat *s; +{ + return (stat(p,s) >= 0? 0 : (-1)); +} + +#endif /* REGULUS */ + + + + + +#ifdef SMALL_MEM + +/*******************************/ +/* Function fLoadFarString() */ /* (and friends...) */ +/*******************************/ + +char *fLoadFarString(__GPRO__ const char Far *sz) +{ + (void)zfstrcpy(G.rgchBigBuffer, sz); + return G.rgchBigBuffer; +} + +char *fLoadFarStringSmall(__GPRO__ const char Far *sz) +{ + (void)zfstrcpy(G.rgchSmallBuffer, sz); + return G.rgchSmallBuffer; +} + +char *fLoadFarStringSmall2(__GPRO__ const char Far *sz) +{ + (void)zfstrcpy(G.rgchSmallBuffer2, sz); + return G.rgchSmallBuffer2; +} + + + + +#if (!defined(_MSC_VER) || (_MSC_VER < 600)) +/*************************/ +/* Function zfstrcpy() */ /* portable clone of _fstrcpy() */ +/*************************/ + +char Far * Far zfstrcpy(char Far *s1, const char Far *s2) +{ + char Far *p = s1; + + while ((*s1++ = *s2++) != '\0'); + return p; +} +#endif /* !_MSC_VER || (_MSC_VER < 600) */ + +#endif /* SMALL_MEM */ diff --git a/utils/Install/packzip/funzip.c b/utils/Install/packzip/funzip.c new file mode 100644 index 0000000000..e83ae424d2 --- /dev/null +++ b/utils/Install/packzip/funzip.c @@ -0,0 +1,468 @@ +/* funzip.c -- put in the public domain by Mark Adler */ + +#define VERSION "3.93 of 21 November 1998" + + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + + History: + vers date who what + ---- --------- -------------- ------------------------------------ + 1.0 13 Aug 92 M. Adler really simple unzip filter. + 1.1 13 Aug 92 M. Adler cleaned up somewhat, give help if + stdin not redirected, warn if more + zip file entries after the first. + 1.2 15 Aug 92 M. Adler added check of lengths for stored + entries, added more help. + 1.3 16 Aug 92 M. Adler removed redundant #define's, added + decryption. + 1.4 27 Aug 92 G. Roelofs added exit(0). + 1.5 1 Sep 92 K. U. Rommel changed read/write modes for OS/2. + 1.6 6 Sep 92 G. Roelofs modified to use dummy crypt.c and + crypt.h instead of -DCRYPT. + 1.7 23 Sep 92 G. Roelofs changed to use DOS_OS2; included + crypt.c under MS-DOS. + 1.8 9 Oct 92 M. Adler improved inflation error msgs. + 1.9 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch; + renamed inflate_entry() to inflate(); + adapted to use new, in-place zdecode. + 2.0 22 Oct 92 M. Adler allow filename argument, prompt for + passwords and don't echo, still allow + command-line password entry, but as an + option. + 2.1 23 Oct 92 J-l. Gailly fixed crypt/store bug, + G. Roelofs removed crypt.c under MS-DOS, fixed + decryption check to compare single byte. + 2.2 28 Oct 92 G. Roelofs removed declaration of key. + 2.3 14 Dec 92 M. Adler replaced fseek (fails on stdin for SCO + Unix V.3.2.4). added quietflg for + inflate.c. + 3.0 11 May 93 M. Adler added gzip support + 3.1 9 Jul 93 K. U. Rommel fixed OS/2 pipe bug (PIPE_ERROR) + 3.2 4 Sep 93 G. Roelofs moved crc_32_tab[] to tables.h; used FOPx + from unzip.h; nuked OUTB macro and outbuf; + replaced flush(); inlined FlushOutput(); + renamed decrypt to encrypted + 3.3 29 Sep 93 G. Roelofs replaced ReadByte() with NEXTBYTE macro; + revised (restored?) flush(); added FUNZIP + 3.4 21 Oct 93 G. Roelofs renamed quietflg to qflag; changed outcnt, + H. Gessau second updcrc() arg and flush() arg to ulg; + added inflate_free(); added "g =" to null + getc(in) to avoid compiler warnings + 3.5 31 Oct 93 H. Gessau changed DOS_OS2 to DOS_NT_OS2 + 3.6 6 Dec 93 H. Gessau added "near" to mask_bits[] + 3.7 9 Dec 93 G. Roelofs added extent typecasts to fwrite() checks + 3.8 28 Jan 94 GRR/JlG initialized g variable in main() for gcc + 3.81 22 Feb 94 M. Hanning-Lee corrected usage message + 3.82 27 Feb 94 G. Roelofs added some typecasts to avoid warnings + 3.83 22 Jul 94 G. Roelofs changed fprintf to macro for DLLs + - 2 Aug 94 - public release with UnZip 5.11 + - 28 Aug 94 - public release with UnZip 5.12 + 3.84 1 Oct 94 K. U. Rommel changes for Metaware High C + 3.85 29 Oct 94 G. Roelofs changed fprintf macro to Info + 3.86 7 May 95 K. Davis RISCOS patches; + P. Kienitz Amiga patches + 3.87 12 Aug 95 G. Roelofs inflate_free(), DESTROYGLOBALS fixes + 3.88 4 Sep 95 C. Spieler reordered macro to work around MSC 5.1 bug + 3.89 22 Nov 95 PK/CS ifdef'd out updcrc() for ASM_CRC + 3.9 17 Dec 95 G. Roelofs modified for USE_ZLIB (new fillinbuf()) + - 30 Apr 96 - public release with UnZip 5.2 + 3.91 17 Aug 96 G. Roelofs main() -> return int (Peter Seebach) + 3.92 13 Apr 97 G. Roelofs minor cosmetic fixes to messages + - 22 Apr 97 - public release with UnZip 5.3 + - 31 May 97 - public release with UnZip 5.31 + 3.93 20 Sep 97 G. Roelofs minor cosmetic fixes to messages + - 3 Nov 97 - public release with UnZip 5.32 + - 28 Nov 98 - public release with UnZip 5.4 + */ + + +/* + + All funzip does is take a zipfile from stdin and decompress the + first entry to stdout. The entry has to be either deflated or + stored. If the entry is encrypted, then the decryption password + must be supplied on the command line as the first argument. + + funzip needs to be linked with inflate.o and crypt.o compiled from + the unzip source. If decryption is desired, the full version of + crypt.c (and crypt.h) from zcrypt21.zip or later must be used. + + */ + +#define FUNZIP +#define UNZIP_INTERNAL +#include "unzip.h" +#include "crypt.h" +#include "ttyio.h" + +#ifdef EBCDIC +# undef EBCDIC /* don't need ebcdic[] */ +#endif +#include "tables.h" /* crc_32_tab[] */ + +#ifndef USE_ZLIB /* zlib's function is called inflate(), too */ +# define UZinflate inflate +#endif + +/* PKZIP header definitions */ +#define ZIPMAG 0x4b50 /* two-byte zip lead-in */ +#define LOCREM 0x0403 /* remaining two bytes in zip signature */ +#define LOCSIG 0x04034b50L /* full signature */ +#define LOCFLG 4 /* offset of bit flag */ +#define CRPFLG 1 /* bit for encrypted entry */ +#define EXTFLG 8 /* bit for extended local header */ +#define LOCHOW 6 /* offset of compression method */ +#define LOCTIM 8 /* file mod time (for decryption) */ +#define LOCCRC 12 /* offset of crc */ +#define LOCSIZ 16 /* offset of compressed size */ +#define LOCLEN 20 /* offset of uncompressed length */ +#define LOCFIL 24 /* offset of file name field length */ +#define LOCEXT 26 /* offset of extra field length */ +#define LOCHDR 28 /* size of local header, including LOCREM */ +#define EXTHDR 16 /* size of extended local header, inc sig */ + +/* GZIP header definitions */ +#define GZPMAG 0x8b1f /* two-byte gzip lead-in */ +#define GZPHOW 0 /* offset of method number */ +#define GZPFLG 1 /* offset of gzip flags */ +#define GZPMUL 2 /* bit for multiple-part gzip file */ +#define GZPISX 4 /* bit for extra field present */ +#define GZPISF 8 /* bit for filename present */ +#define GZPISC 16 /* bit for comment present */ +#define GZPISE 32 /* bit for encryption */ +#define GZPTIM 2 /* offset of Unix file modification time */ +#define GZPEXF 6 /* offset of extra flags */ +#define GZPCOS 7 /* offset of operating system compressed on */ +#define GZPHDR 8 /* length of minimal gzip header */ + +/* Macros for getting two-byte and four-byte header values */ +#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8)) +#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16)) + +/* Function prototypes */ +void err OF((int, char *)); +int main OF((int, char **)); + +/* Globals */ +FILE *out; /* output file (*in moved to G struct) */ +ulg outsiz; /* total bytes written to out */ +int encrypted; /* flag to turn on decryption */ + +/* Masks for inflate.c */ +ZCONST ush near mask_bits[] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + + +#ifdef USE_ZLIB + +int fillinbuf(__G) +__GDEF +/* Fill input buffer for pull-model inflate() in zlib. Return the number of + * bytes in inbuf. */ +{ +/* GRR: check return value from fread(): same as read()? check errno? */ + if ((G.incnt = fread((char *)G.inbuf, 1, INBUFSIZ, G.in)) <= 0) + return 0; + G.inptr = G.inbuf; + +#if CRYPT + if (encrypted) { + uch *p; + int n; + + for (n = G.incnt, p = G.inptr; n--; p++) + zdecode(*p); + } +#endif /* CRYPT */ + + return G.incnt; + +} + +#endif /* USE_ZLIB */ + + +#if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) +#ifdef USE_ZLIB +ZCONST uLongf *get_crc_table() +{ + return (ZCONST uLongf *)crc_32_tab; +} +#else /* !USE_ZLIB */ +ZCONST ulg near *get_crc_table() +{ + return crc_32_tab; +} +#endif /* ?USE_ZLIB */ +#endif /* !USE_ZLIB || USE_OWN_CRCTAB */ + + +void err(n, m) +int n; +char *m; +/* Exit on error with a message and a code */ +{ + Info(slide, 1, ((char *)slide, "funzip error: %s\n", m)); + DESTROYGLOBALS() + EXIT(n); +} + + +int flush(w) /* used by inflate.c (FLUSH macro) */ +ulg w; /* number of bytes to flush */ +{ + G.crc32val = crc32(G.crc32val, slide, (extent)w); + if (fwrite((char *)slide,1,(extent)w,out) != (extent)w && !PIPE_ERROR) + err(9, "out of space on stdout"); + outsiz += w; + return 0; +} + + +int main(argc, argv) +int argc; +char **argv; +/* Given a zipfile on stdin, decompress the first entry to stdout. */ +{ + ush n; + uch h[LOCHDR]; /* first local header (GZPHDR < LOCHDR) */ + int g = 0; /* true if gzip format */ +#if CRYPT + char *s = " [-password]"; + char *p; /* password */ +#else /* !CRYPT */ + char *s = ""; +#endif /* ?CRYPT */ + CONSTRUCTGLOBALS(); + + /* skip executable name */ + argc--; + argv++; + +#if CRYPT + /* get the command line password, if any */ + p = (char *)NULL; + if (argc && **argv == '-') + { + argc--; + p = 1 + *argv++; + } +#endif /* CRYPT */ + +#ifdef MALLOC_WORK + G.area.Slide = (uch *)calloc(8193, sizeof(short)+sizeof(char)+sizeof(char)); +#endif + + /* if no file argument and stdin not redirected, give the user help */ + if (argc == 0 && isatty(0)) + { + Info(slide, 1, ((char *)slide, "fUnZip (filter UnZip), version %s\n", + VERSION)); + Info(slide, 1, ((char *)slide, "usage: ... | funzip%s | ...\n", s)); + Info(slide, 1, ((char *)slide, " ... | funzip%s > outfile\n", s)); + Info(slide, 1, ((char *)slide, " funzip%s infile.zip > outfile\n",s)); + Info(slide, 1, ((char *)slide, " funzip%s infile.gz > outfile\n", s)); + Info(slide, 1, ((char *)slide, "Extracts to stdout the gzip file or first\ + zip entry of stdin or the given file.\n")); + DESTROYGLOBALS() + EXIT(3); + } + + /* prepare to be a binary filter */ + if (argc) + { + if ((G.in = fopen(*argv, FOPR)) == (FILE *)NULL) + err(2, "cannot find input file"); + } + else + { +#ifdef DOS_FLX_H68_OS2_W32 +#if (defined(__HIGHC__) && !defined(FLEXOS)) + setmode(stdin, _BINARY); +#else + setmode(0, O_BINARY); /* some buggy C libraries require BOTH setmode() */ +#endif /* call AND the fdopen() in binary mode :-( */ +#endif /* DOS_FLX_H68_OS2_W32 */ + +#ifdef RISCOS + G.in = stdin; +#else + if ((G.in = fdopen(0, FOPR)) == (FILE *)NULL) + err(2, "cannot find stdin"); +#endif + } + +#ifdef DOS_FLX_H68_OS2_W32 +#if (defined(__HIGHC__) && !defined(FLEXOS)) + setmode(stdout, _BINARY); +#else + setmode(1, O_BINARY); +#endif +#endif /* DOS_FLX_H68_OS2_W32 */ + +#ifdef RISCOS + out = stdout; +#else + if ((out = fdopen(1, FOPW)) == (FILE *)NULL) + err(2, "cannot write to stdout"); +#endif + + /* read local header, check validity, and skip name and extra fields */ + n = getc(G.in); n |= getc(G.in) << 8; + if (n == ZIPMAG) + { + if (fread((char *)h, 1, LOCHDR, G.in) != LOCHDR || SH(h) != LOCREM) + err(3, "invalid zipfile"); + if (SH(h + LOCHOW) != STORED && SH(h + LOCHOW) != DEFLATED) + err(3, "first entry not deflated or stored--cannot unpack"); + for (n = SH(h + LOCFIL); n--; ) g = getc(G.in); + for (n = SH(h + LOCEXT); n--; ) g = getc(G.in); + g = 0; + encrypted = h[LOCFLG] & CRPFLG; + } + else if (n == GZPMAG) + { + if (fread((char *)h, 1, GZPHDR, G.in) != GZPHDR) + err(3, "invalid gzip file"); + if (h[GZPHOW] != DEFLATED) + err(3, "gzip file not deflated"); + if (h[GZPFLG] & GZPMUL) + err(3, "cannot handle multi-part gzip files"); + if (h[GZPFLG] & GZPISX) + { + n = getc(G.in); n |= getc(G.in) << 8; + while (n--) g = getc(G.in); + } + if (h[GZPFLG] & GZPISF) + while ((g = getc(G.in)) != 0 && g != EOF) ; + if (h[GZPFLG] & GZPISC) + while ((g = getc(G.in)) != 0 && g != EOF) ; + g = 1; + encrypted = h[GZPFLG] & GZPISE; + } + else + err(3, "input not a zip or gzip file"); + + /* if entry encrypted, decrypt and validate encryption header */ + if (encrypted) +#if CRYPT + { + ush i, e; + + if (p == (char *)NULL) { + if ((p = (char *)malloc(IZ_PWLEN+1)) == (char *)NULL) + err(1, "out of memory"); + else if ((p = getp("Enter password: ", p, IZ_PWLEN+1)) == (char *)NULL) + err(1, "no tty to prompt for password"); + } +#if (defined(USE_ZLIB) && !defined(USE_OWN_CRCTAB)) + /* initialize crc_32_tab pointer for decryption */ + CRC_32_TAB = (ZCONST ulg Far *)get_crc_table(); +#endif + init_keys(p); + for (i = 0; i < RAND_HEAD_LEN; i++) + e = NEXTBYTE; + if (e != (ush)(h[LOCFLG] & EXTFLG ? h[LOCTIM + 1] : h[LOCCRC + 3])) + err(3, "incorrect password for first entry"); + } +#else /* !CRYPT */ + err(3, "cannot decrypt entry (need to recompile with full crypt.c)"); +#endif /* ?CRYPT */ + + /* prepare output buffer and crc */ + G.outptr = slide; + G.outcnt = 0L; + outsiz = 0L; + G.crc32val = CRCVAL_INITIAL; + + /* decompress */ + if (g || h[LOCHOW]) + { /* deflated entry */ + int r; + +#ifdef USE_ZLIB + /* need to allocate and prepare input buffer */ + if ((G.inbuf = (uch *)malloc(INBUFSIZ)) == (uch *)NULL) + err(1, "out of memory"); +#endif /* USE_ZLIB */ + if ((r = UZinflate(__G)) != 0) { + if (r == 3) + err(1, "out of memory"); + else + err(4, "invalid compressed data--format violated"); + } + inflate_free(__G); + } + else + { /* stored entry */ + register ulg n; + + n = LG(h + LOCLEN); +#if CRYPT + if (n != LG(h + LOCSIZ) - (encrypted ? RAND_HEAD_LEN : 0)) { +#else + if (n != LG(h + LOCSIZ)) { +#endif + Info(slide, 1, ((char *)slide, "len %ld, siz %ld\n", n, LG(h + LOCSIZ))); + err(4, "invalid compressed data--length mismatch"); + } + while (n--) { + ush c = getc(G.in); +#if CRYPT + if (encrypted) + zdecode(c); +#endif + *G.outptr++ = (uch)c; + if (++G.outcnt == WSIZE) /* do FlushOutput() */ + { + G.crc32val = crc32(G.crc32val, slide, (extent)G.outcnt); + if (fwrite((char *)slide, 1,(extent)G.outcnt,out) != (extent)G.outcnt + && !PIPE_ERROR) + err(9, "out of space on stdout"); + outsiz += G.outcnt; + G.outptr = slide; + G.outcnt = 0L; + } + } + } + if (G.outcnt) /* flush one last time; no need to reset G.outptr/outcnt */ + { + G.crc32val = crc32(G.crc32val, slide, (extent)G.outcnt); + if (fwrite((char *)slide, 1,(extent)G.outcnt,out) != (extent)G.outcnt + && !PIPE_ERROR) + err(9, "out of space on stdout"); + outsiz += G.outcnt; + } + fflush(out); + + /* if extended header, get it */ + if (g) + { + if (fread((char *)h + LOCCRC, 1, 8, G.in) != 8) + err(3, "gzip file ended prematurely"); + } + else + if ((h[LOCFLG] & EXTFLG) && + fread((char *)h + LOCCRC - 4, 1, EXTHDR, G.in) != EXTHDR) + err(3, "zipfile ended prematurely"); + + /* validate decompression */ + if (LG(h + LOCCRC) != G.crc32val) + err(4, "invalid compressed data--crc error"); + if (LG((g ? (h + LOCSIZ) : (h + LOCLEN))) != outsiz) + err(4, "invalid compressed data--length error"); + + /* check if there are more entries */ + if (!g && fread((char *)h, 1, 4, G.in) == 4 && LG(h) == LOCSIG) + Info(slide, 1, ((char *)slide, + "funzip warning: zipfile has more than one entry--rest ignored\n")); + + DESTROYGLOBALS() + RETURN (0); +} diff --git a/utils/Install/packzip/globals.c b/utils/Install/packzip/globals.c new file mode 100644 index 0000000000..d795090b98 --- /dev/null +++ b/utils/Install/packzip/globals.c @@ -0,0 +1,204 @@ +/*--------------------------------------------------------------------------- + + globals.c + + Routines to allocate and initialize globals, with or without threads. + + Contents: registerGlobalPointer() + deregisterGlobalPointer() + getGlobalPointer() + globalsCtor() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" + +#ifndef FUNZIP +/* initialization of sigs is completed at runtime so unzip(sfx) executable + * won't look like a zipfile + */ +char central_hdr_sig[4] = {0, 0, 0x01, 0x02}; +char local_hdr_sig[4] = {0, 0, 0x03, 0x04}; +char end_central_sig[4] = {0, 0, 0x05, 0x06}; +/* extern char extd_local_sig[4] = {0, 0, 0x07, 0x08}; NOT USED YET */ + +ZCONST char *fnames[2] = {"*", NULL}; /* default filenames vector */ +#endif + + +#ifndef REENTRANT + Uz_Globs G; +#else /* REENTRANT */ + +# ifndef USETHREADID + Uz_Globs *GG; +# else /* USETHREADID */ +# define THREADID_ENTRIES 0x40 + + int lastScan; + Uz_Globs *threadPtrTable[THREADID_ENTRIES]; + ulg threadIdTable [THREADID_ENTRIES] = { + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* Make sure there are */ + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* THREADID_ENTRIES 0s */ + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 + }; + + static ZCONST char Far TooManyThreads[] = + "error: more than %d simultaneous threads.\n\ + Some threads are probably not calling DESTROYTHREAD()\n"; + static ZCONST char Far EntryNotFound[] = + "error: couldn't find global pointer in table.\n\ + Maybe somebody accidentally called DESTROYTHREAD() twice.\n"; + static ZCONST char Far GlobalPointerMismatch[] = + "error: global pointer in table does not match pointer passed as\ + parameter\n"; + +static void registerGlobalPointer OF((__GPRO)); + + + +static void registerGlobalPointer(__G) + __GDEF +{ + int scan=0; + ulg tid = GetThreadId(); + + while (threadIdTable[scan] && scan < THREADID_ENTRIES) + scan++; + + if (scan == THREADID_ENTRIES) { + ZCONST char *tooMany = LoadFarString(TooManyThreads); + Info(slide, 0x421, ((char *)slide, tooMany, THREADID_ENTRIES)); + free(pG); + EXIT(PK_MEM); /* essentially memory error before we've started */ + } + + threadIdTable [scan] = tid; + threadPtrTable[scan] = pG; + lastScan = scan; +} + + + +void deregisterGlobalPointer(__G) + __GDEF +{ + int scan=0; + ulg tid = GetThreadId(); + + + while (threadIdTable[scan] != tid && scan < THREADID_ENTRIES) + scan++; + +/*--------------------------------------------------------------------------- + There are two things we can do if we can't find the entry: ignore it or + scream. The most likely reason for it not to be here is the user calling + this routine twice. Since this could cause BIG problems if any globals + are accessed after the first call, we'd better scream. + ---------------------------------------------------------------------------*/ + + if (scan == THREADID_ENTRIES || threadPtrTable[scan] != pG) { + ZCONST char *noEntry; + if (scan == THREADID_ENTRIES) + noEntry = LoadFarString(EntryNotFound); + else + noEntry = LoadFarString(GlobalPointerMismatch); + Info(slide, 0x421, ((char *)slide, noEntry)); + EXIT(PK_WARN); /* programming error, but after we're all done */ + } + + threadIdTable [scan] = 0; + lastScan = scan; + free(threadPtrTable[scan]); +} + + + +Uz_Globs *getGlobalPointer() +{ + int scan=0; + ulg tid = GetThreadId(); + + while (threadIdTable[scan] != tid && scan < THREADID_ENTRIES) + scan++; + +/*--------------------------------------------------------------------------- + There are two things we can do if we can't find the entry: ignore it or + scream. The most likely reason for it not to be here is the user calling + this routine twice. Since this could cause BIG problems if any globals + are accessed after the first call, we'd better scream. + ---------------------------------------------------------------------------*/ + + if (scan == THREADID_ENTRIES) { + ZCONST char *noEntry = LoadFarString(EntryNotFound); + fprintf(stderr, noEntry); /* can't use Info w/o a global pointer */ + EXIT(PK_ERR); /* programming error while still working */ + } + + return threadPtrTable[scan]; +} + +# endif /* ?USETHREADID */ +#endif /* ?REENTRANT */ + + + +Uz_Globs *globalsCtor() +{ +#ifdef REENTRANT + Uz_Globs *pG = (Uz_Globs *)malloc(sizeof(Uz_Globs)); + + if (!pG) + return (Uz_Globs *)NULL; +#endif /* REENTRANT */ + + /* for REENTRANT version, G is defined as (*pG) */ + + memzero(&G, sizeof(Uz_Globs)); + +#ifndef FUNZIP +#ifdef CMS_MVS + uO.aflag=1; + uO.C_flag=1; +#endif + + uO.lflag=(-1); + G.wildzipfn = ""; + G.pfnames = (char **)fnames; + G.pxnames = (char **)&fnames[1]; + G.pInfo = G.info; + G.sol = TRUE; /* at start of line */ + + G.message = UzpMessagePrnt; + G.input = UzpInput; /* not used by anyone at the moment... */ +#if defined(WINDLL) || defined(MACOS) + G.mpause = NULL; /* has scrollbars: no need for pausing */ +#else + G.mpause = UzpMorePause; +#endif + G.decr_passwd = UzpPassword; +#endif /* !FUNZIP */ + +#if (!defined(DOS_FLX_H68_OS2_W32) && !defined(AMIGA) && !defined(RISCOS)) +#if (!defined(MACOS) && !defined(ATARI) && !defined(VMS)) + G.echofd = -1; +#endif /* !(MACOS || ATARI || VMS) */ +#endif /* !(DOS_FLX_H68_OS2_W32 || AMIGA || RISCOS) */ + +#ifdef SYSTEM_SPECIFIC_CTOR + SYSTEM_SPECIFIC_CTOR(__G); +#endif + +#ifdef REENTRANT +#ifdef USETHREADID + registerGlobalPointer(__G); +#else + GG = &G; +#endif /* ?USETHREADID */ +#endif /* REENTRANT */ + + return &G; +} diff --git a/utils/Install/packzip/inflate.c b/utils/Install/packzip/inflate.c new file mode 100644 index 0000000000..29877300d2 --- /dev/null +++ b/utils/Install/packzip/inflate.c @@ -0,0 +1,1305 @@ +/* inflate.c -- put in the public domain by Mark Adler + version c16b, 29 March 1998 */ + + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + + History: + vers date who what + ---- --------- -------------- ------------------------------------ + a ~~ Feb 92 M. Adler used full (large, one-step) lookup table + b1 21 Mar 92 M. Adler first version with partial lookup tables + b2 21 Mar 92 M. Adler fixed bug in fixed-code blocks + b3 22 Mar 92 M. Adler sped up match copies, cleaned up some + b4 25 Mar 92 M. Adler added prototypes; removed window[] (now + is the responsibility of unzip.h--also + changed name to slide[]), so needs diffs + for unzip.c and unzip.h (this allows + compiling in the small model on MSDOS); + fixed cast of q in huft_build(); + b5 26 Mar 92 M. Adler got rid of unintended macro recursion. + b6 27 Mar 92 M. Adler got rid of nextbyte() routine. fixed + bug in inflate_fixed(). + c1 30 Mar 92 M. Adler removed lbits, dbits environment variables. + changed BMAX to 16 for explode. Removed + OUTB usage, and replaced it with flush()-- + this was a 20% speed improvement! Added + an explode.c (to replace unimplod.c) that + uses the huft routines here. Removed + register union. + c2 4 Apr 92 M. Adler fixed bug for file sizes a multiple of 32k. + c3 10 Apr 92 M. Adler reduced memory of code tables made by + huft_build significantly (factor of two to + three). + c4 15 Apr 92 M. Adler added NOMEMCPY do kill use of memcpy(). + worked around a Turbo C optimization bug. + c5 21 Apr 92 M. Adler added the WSIZE #define to allow reducing + the 32K window size for specialized + applications. + c6 31 May 92 M. Adler added some typecasts to eliminate warnings + c7 27 Jun 92 G. Roelofs added some more typecasts (444: MSC bug). + c8 5 Oct 92 J-l. Gailly added ifdef'd code to deal with PKZIP bug. + c9 9 Oct 92 M. Adler removed a memory error message (~line 416). + c10 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch, + removed old inflate, renamed inflate_entry + to inflate, added Mark's fix to a comment. + c10.5 14 Dec 92 M. Adler fix up error messages for incomplete trees. + c11 2 Jan 93 M. Adler fixed bug in detection of incomplete + tables, and removed assumption that EOB is + the longest code (bad assumption). + c12 3 Jan 93 M. Adler make tables for fixed blocks only once. + c13 5 Jan 93 M. Adler allow all zero length codes (pkzip 2.04c + outputs one zero length code for an empty + distance tree). + c14 12 Mar 93 M. Adler made inflate.c standalone with the + introduction of inflate.h. + c14b 16 Jul 93 G. Roelofs added (unsigned) typecast to w at 470. + c14c 19 Jul 93 J. Bush changed v[N_MAX], l[288], ll[28x+3x] arrays + to static for Amiga. + c14d 13 Aug 93 J-l. Gailly de-complicatified Mark's c[*p++]++ thing. + c14e 8 Oct 93 G. Roelofs changed memset() to memzero(). + c14f 22 Oct 93 G. Roelofs renamed quietflg to qflag; made Trace() + conditional; added inflate_free(). + c14g 28 Oct 93 G. Roelofs changed l/(lx+1) macro to pointer (Cray bug) + c14h 7 Dec 93 C. Ghisler huft_build() optimizations. + c14i 9 Jan 94 A. Verheijen set fixed_t{d,l} to NULL after freeing; + G. Roelofs check NEXTBYTE macro for EOF. + c14j 23 Jan 94 G. Roelofs removed Ghisler "optimizations"; ifdef'd + EOF check. + c14k 27 Feb 94 G. Roelofs added some typecasts to avoid warnings. + c14l 9 Apr 94 G. Roelofs fixed split comments on preprocessor lines + to avoid bug in Encore compiler. + c14m 7 Jul 94 P. Kienitz modified to allow assembler version of + inflate_codes() (define ASM_INFLATECODES) + c14n 22 Jul 94 G. Roelofs changed fprintf to macro for DLL versions + c14o 23 Aug 94 C. Spieler added a newline to a debug statement; + G. Roelofs added another typecast to avoid MSC warning + c14p 4 Oct 94 G. Roelofs added (voidp *) cast to free() argument + c14q 30 Oct 94 G. Roelofs changed fprintf macro to MESSAGE() + c14r 1 Nov 94 G. Roelofs fixed possible redefinition of CHECK_EOF + c14s 7 May 95 S. Maxwell OS/2 DLL globals stuff incorporated; + P. Kienitz "fixed" ASM_INFLATECODES macro/prototype + c14t 18 Aug 95 G. Roelofs added UZinflate() to use zlib functions; + changed voidp to zvoid; moved huft_build() + and huft_free() to end of file + c14u 1 Oct 95 G. Roelofs moved G into definition of MESSAGE macro + c14v 8 Nov 95 P. Kienitz changed ASM_INFLATECODES to use a regular + call with __G__ instead of a macro + c15 3 Aug 96 M. Adler fixed bomb-bug on random input data (Adobe) + c15b 24 Aug 96 M. Adler more fixes for random input data + c15c 28 Mar 97 G. Roelofs changed USE_ZLIB fatal exit code from + PK_MEM2 to PK_MEM3 + c16 20 Apr 97 J. Altman added memzero(v[]) in huft_build() + c16b 29 Mar 98 C. Spieler modified DLL code for slide redirection + */ + + +/* + Inflate deflated (PKZIP's method 8 compressed) data. The compression + method searches for as much of the current string of bytes (up to a + length of 258) in the previous 32K bytes. If it doesn't find any + matches (of at least length 3), it codes the next byte. Otherwise, it + codes the length of the matched string and its distance backwards from + the current position. There is a single Huffman code that codes both + single bytes (called "literals") and match lengths. A second Huffman + code codes the distance information, which follows a length code. Each + length or distance code actually represents a base value and a number + of "extra" (sometimes zero) bits to get to add to the base value. At + the end of each deflated block is a special end-of-block (EOB) literal/ + length code. The decoding process is basically: get a literal/length + code; if EOB then done; if a literal, emit the decoded byte; if a + length then get the distance and emit the referred-to bytes from the + sliding window of previously emitted data. + + There are (currently) three kinds of inflate blocks: stored, fixed, and + dynamic. The compressor outputs a chunk of data at a time and decides + which method to use on a chunk-by-chunk basis. A chunk might typically + be 32K to 64K, uncompressed. If the chunk is uncompressible, then the + "stored" method is used. In this case, the bytes are simply stored as + is, eight bits per byte, with none of the above coding. The bytes are + preceded by a count, since there is no longer an EOB code. + + If the data are compressible, then either the fixed or dynamic methods + are used. In the dynamic method, the compressed data are preceded by + an encoding of the literal/length and distance Huffman codes that are + to be used to decode this block. The representation is itself Huffman + coded, and so is preceded by a description of that code. These code + descriptions take up a little space, and so for small blocks, there is + a predefined set of codes, called the fixed codes. The fixed method is + used if the block ends up smaller that way (usually for quite small + chunks); otherwise the dynamic method is used. In the latter case, the + codes are customized to the probabilities in the current block and so + can code it much better than the pre-determined fixed codes can. + + The Huffman codes themselves are decoded using a multi-level table + lookup, in order to maximize the speed of decoding plus the speed of + building the decoding tables. See the comments below that precede the + lbits and dbits tuning parameters. + + GRR: return values(?) + 0 OK + 1 incomplete table + 2 bad input + 3 not enough memory + */ + + +/* + Notes beyond the 1.93a appnote.txt: + + 1. Distance pointers never point before the beginning of the output + stream. + 2. Distance pointers can point back across blocks, up to 32k away. + 3. There is an implied maximum of 7 bits for the bit length table and + 15 bits for the actual data. + 4. If only one code exists, then it is encoded using one bit. (Zero + would be more efficient, but perhaps a little confusing.) If two + codes exist, they are coded using one bit each (0 and 1). + 5. There is no way of sending zero distance codes--a dummy must be + sent if there are none. (History: a pre 2.0 version of PKZIP would + store blocks with no distance codes, but this was discovered to be + too harsh a criterion.) Valid only for 1.93a. 2.04c does allow + zero distance codes, which is sent as one code of zero bits in + length. + 6. There are up to 286 literal/length codes. Code 256 represents the + end-of-block. Note however that the static length tree defines + 288 codes just to fill out the Huffman codes. Codes 286 and 287 + cannot be used though, since there is no length base or extra bits + defined for them. Similarily, there are up to 30 distance codes. + However, static trees define 32 codes (all 5 bits) to fill out the + Huffman codes, but the last two had better not show up in the data. + 7. Unzip can check dynamic Huffman blocks for complete code sets. + The exception is that a single code would not be complete (see #4). + 8. The five bits following the block type is really the number of + literal codes sent minus 257. + 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits + (1+6+6). Therefore, to output three times the length, you output + three codes (1+1+1), whereas to output four times the same length, + you only need two codes (1+3). Hmm. + 10. In the tree reconstruction algorithm, Code = Code + Increment + only if BitLength(i) is not zero. (Pretty obvious.) + 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) + 12. Note: length code 284 can represent 227-258, but length code 285 + really is 258. The last length deserves its own, short code + since it gets used a lot in very redundant files. The length + 258 is special since 258 - 3 (the min match length) is 255. + 13. The literal/length and distance code bit lengths are read as a + single stream of lengths. It is possible (and advantageous) for + a repeat code (16, 17, or 18) to go across the boundary between + the two sets of lengths. + */ + + +#define PKZIP_BUG_WORKAROUND /* PKZIP 1.93a problem--live with it */ + +/* + inflate.h must supply the uch slide[WSIZE] array, the zvoid typedef + (void if (void *) is accepted, else char) and the NEXTBYTE, + FLUSH() and memzero macros. If the window size is not 32K, it + should also define WSIZE. If INFMOD is defined, it can include + compiled functions to support the NEXTBYTE and/or FLUSH() macros. + There are defaults for NEXTBYTE and FLUSH() below for use as + examples of what those functions need to do. Normally, you would + also want FLUSH() to compute a crc on the data. inflate.h also + needs to provide these typedefs: + + typedef unsigned char uch; + typedef unsigned short ush; + typedef unsigned long ulg; + + This module uses the external functions malloc() and free() (and + probably memset() or bzero() in the memzero() macro). Their + prototypes are normally found in and . + */ + +/* #define DEBUG */ +#define INFMOD /* tell inflate.h to include code to be compiled */ +#include "inflate.h" + + +#ifndef WSIZE /* default is 32K */ +# define WSIZE 0x8000 /* window size--must be a power of two, and at least */ +#endif /* 32K for zip's deflate method */ + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) +# define wsize G._wsize /* wsize is a variable */ +#else +# define wsize WSIZE /* wsize is a constant */ +#endif + + +#ifndef NEXTBYTE /* default is to simply get a byte from stdin */ +# define NEXTBYTE getchar() +#endif + +#ifndef MESSAGE /* only used twice, for fixed strings--NOT general-purpose */ +# define MESSAGE(str,len,flag) pipeit((char *)(str)) +#endif + +#ifndef FLUSH /* default is to simply write the buffer to stdout */ +# define FLUSH(n) fwrite(redirSlide, 1, n, stdout) /* return value not used */ +#endif +/* Warning: the fwrite above might not work on 16-bit compilers, since + 0x8000 might be interpreted as -32,768 by the library function. */ + +#ifndef Trace +# ifdef DEBUG +# define Trace(x) fprintf x +# else +# define Trace(x) +# endif +#endif + + +/*---------------------------------------------------------------------------*/ +#ifdef USE_ZLIB + + +/* + GRR: return values for both original inflate() and UZinflate() + 0 OK + 1 incomplete table(?) + 2 bad input + 3 not enough memory + */ + +/**************************/ +/* Function UZinflate() */ +/**************************/ + +int UZinflate(__G) /* decompress an inflated entry using the zlib routines */ + __GDEF +{ + int err=Z_OK; + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; + else + wsize = WSIZE, redirSlide = slide; +#endif + + G.dstrm.next_out = redirSlide; + G.dstrm.avail_out = wsize; + + G.dstrm.next_in = G.inptr; + G.dstrm.avail_in = G.incnt; + + if (!G.inflInit) { + unsigned i; + int windowBits; + + /* only need to test this stuff once */ + if (zlib_version[0] != ZLIB_VERSION[0]) { + Info(slide, 0x21, ((char *)slide, + "error: incompatible zlib version (expected %s, found %s)\n", + ZLIB_VERSION, zlib_version)); + return 3; + } else if (strcmp(zlib_version, ZLIB_VERSION) != 0) + Info(slide, 0x21, ((char *)slide, + "warning: different zlib version (expected %s, using %s)\n", + ZLIB_VERSION, zlib_version)); + + /* windowBits = log2(wsize) */ + for (i = ((unsigned)wsize * 2 - 1), windowBits = 0; + !(i & 1); i >>= 1, ++windowBits); + if ((unsigned)windowBits > (unsigned)15) + windowBits = 15; + else if (windowBits < 8) + windowBits = 8; + + G.dstrm.zalloc = (alloc_func)Z_NULL; + G.dstrm.zfree = (free_func)Z_NULL; + + Trace((stderr, "initializing inflate()\n")); + err = inflateInit2(&G.dstrm, -windowBits); + + if (err == Z_MEM_ERROR) + return 3; + else if (err != Z_OK) + Trace((stderr, "oops! (inflateInit2() err = %d)\n", err)); + G.inflInit = 1; + } + +#ifdef FUNZIP + while (err != Z_STREAM_END) { +#else /* !FUNZIP */ + while (G.csize > 0) { + Trace((stderr, "first loop: G.csize = %ld\n", G.csize)); +#endif /* ?FUNZIP */ + while (G.dstrm.avail_out > 0) { + err = inflate(&G.dstrm, Z_PARTIAL_FLUSH); + + if (err == Z_DATA_ERROR) + return 2; + else if (err == Z_MEM_ERROR) + return 3; + else if (err != Z_OK && err != Z_STREAM_END) + Trace((stderr, "oops! (inflate(first loop) err = %d)\n", err)); + +#ifdef FUNZIP + if (err == Z_STREAM_END) /* "END-of-entry-condition" ? */ +#else /* !FUNZIP */ + if (G.csize <= 0L) /* "END-of-entry-condition" ? */ +#endif /* ?FUNZIP */ + break; + + if (G.dstrm.avail_in <= 0) { + if (fillinbuf(__G) == 0) + return 2; /* no "END-condition" yet, but no more data */ + + G.dstrm.next_in = G.inptr; + G.dstrm.avail_in = G.incnt; + } + Trace((stderr, " avail_in = %d\n", G.dstrm.avail_in)); + } + FLUSH(wsize - G.dstrm.avail_out); /* flush slide[] */ + Trace((stderr, "inside loop: flushing %ld bytes (ptr diff = %ld)\n", + (long)(wsize - G.dstrm.avail_out), + (long)(G.dstrm.next_out-(Bytef *)redirSlide))); + G.dstrm.next_out = redirSlide; + G.dstrm.avail_out = wsize; + } + + /* no more input, so loop until we have all output */ + Trace((stderr, "beginning final loop: err = %d\n", err)); + while (err != Z_STREAM_END) { + err = inflate(&G.dstrm, Z_PARTIAL_FLUSH); + if (err == Z_DATA_ERROR) + return 2; + else if (err == Z_MEM_ERROR) + return 3; + else if (err == Z_BUF_ERROR) { /* DEBUG */ + Trace((stderr, "zlib inflate() did not detect stream end (%s, %s)\n" + , G.zipfn, G.filename)); + break; + } else if (err != Z_OK && err != Z_STREAM_END) { + Trace((stderr, "oops! (inflate(final loop) err = %d)\n", err)); + DESTROYGLOBALS() + EXIT(PK_MEM3); + } + FLUSH(wsize - G.dstrm.avail_out); /* final flush of slide[] */ + Trace((stderr, "final loop: flushing %ld bytes (ptr diff = %ld)\n", + (long)(wsize - G.dstrm.avail_out), + (long)(G.dstrm.next_out-(Bytef *)redirSlide))); + G.dstrm.next_out = redirSlide; + G.dstrm.avail_out = wsize; + } + Trace((stderr, "total in = %ld, total out = %ld\n", G.dstrm.total_in, + G.dstrm.total_out)); + + G.inptr = (uch *)G.dstrm.next_in; + G.incnt = (G.inbuf + INBUFSIZ) - G.inptr; /* reset for other routines */ + + err = inflateReset(&G.dstrm); + if (err != Z_OK) + Trace((stderr, "oops! (inflateReset() err = %d)\n", err)); + + return 0; +} + + +/*---------------------------------------------------------------------------*/ +#else /* !USE_ZLIB */ + + +/* Function prototypes */ +#ifndef OF +# ifdef __STDC__ +# define OF(a) a +# else +# define OF(a) () +# endif +#endif /* !OF */ +int inflate_codes OF((__GPRO__ struct huft *tl, struct huft *td, + int bl, int bd)); +static int inflate_stored OF((__GPRO)); +static int inflate_fixed OF((__GPRO)); +static int inflate_dynamic OF((__GPRO)); +static int inflate_block OF((__GPRO__ int *e)); + + +/* The inflate algorithm uses a sliding 32K byte window on the uncompressed + stream to find repeated byte strings. This is implemented here as a + circular buffer. The index is updated simply by incrementing and then + and'ing with 0x7fff (32K-1). */ +/* It is left to other modules to supply the 32K area. It is assumed + to be usable as if it were declared "uch slide[32768];" or as just + "uch *slide;" and then malloc'ed in the latter case. The definition + must be in unzip.h, included above. */ + + +/* unsigned wp; moved to globals.h */ /* current position in slide */ + + +/* Tables for deflate from PKZIP's appnote.txt. */ +static ZCONST unsigned border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; +static ZCONST ush cplens[] = { /* Copy lengths for literal codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + /* note: see note #13 above about the 258 in this list. */ +static ZCONST ush cplext[] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */ +static ZCONST ush cpdist[] = { /* Copy offsets for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; +static ZCONST ush cpdext[] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + + +/* moved to consts.h (included in unzip.c), resp. funzip.c */ +#if 0 +/* And'ing with mask_bits[n] masks the lower n bits */ +ZCONST ush near mask_bits[] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; +#endif /* 0 */ + + +/* Macros for inflate() bit peeking and grabbing. + The usage is: + + NEEDBITS(j) + x = b & mask_bits[j]; + DUMPBITS(j) + + where NEEDBITS makes sure that b has at least j bits in it, and + DUMPBITS removes the bits from b. The macros use the variable k + for the number of bits in b. Normally, b and k are register + variables for speed and are initialized at the begining of a + routine that uses these macros from a global bit buffer and count. + + In order to not ask for more bits than there are in the compressed + stream, the Huffman tables are constructed to only ask for just + enough bits to make up the end-of-block code (value 256). Then no + bytes need to be "returned" to the buffer at the end of the last + block. See the huft_build() routine. + */ + +/* These have been moved to globals.h */ +#if 0 +ulg bb; /* bit buffer */ +unsigned bk; /* bits in bit buffer */ +#endif + +#ifndef CHECK_EOF +# define CHECK_EOF /* default as of 5.13/5.2 */ +#endif + +#ifndef CHECK_EOF +# define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} + + +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + are not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ + + +static ZCONST int lbits = 9; /* bits in base literal/length lookup table */ +static ZCONST int dbits = 6; /* bits in base distance lookup table */ + + +#ifndef ASM_INFLATECODES + +int inflate_codes(__G__ tl, td, bl, bd) + __GDEF +struct huft *tl, *td; /* literal/length and distance decoder tables */ +int bl, bd; /* number of bits decoded by tl[] and td[] */ +/* inflate (decompress) the codes in a deflated (compressed) block. + Return an error code or zero if it all goes ok. */ +{ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local copies of globals */ + b = G.bb; /* initialize bit buffer */ + k = G.bk; + w = G.wp; /* initialize window position */ + + + /* inflate the coded data */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + while (1) /* do until end of block */ + { + NEEDBITS((unsigned)bl) + if ((e = (t = tl + ((unsigned)b & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + if (e == 16) /* then it's a literal */ + { + redirSlide[w++] = (uch)t->v.n; + if (w == wsize) + { + FLUSH(w); + w = 0; + } + } + else /* it's an EOB or a length */ + { + /* exit if end of block */ + if (e == 15) + break; + + /* get length of block to copy */ + NEEDBITS(e) + n = t->v.n + ((unsigned)b & mask_bits[e]); + DUMPBITS(e); + + /* decode distance of block to copy */ + NEEDBITS((unsigned)bd) + if ((e = (t = td + ((unsigned)b & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + NEEDBITS(e) + d = w - t->v.n - ((unsigned)b & mask_bits[e]); + DUMPBITS(e) + + /* do the copy */ + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) {/* &= w/ wsize unnecessary & wrong if redirect */ + if (d >= wsize) + return 1; /* invalid compressed data */ + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } + else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slowly to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + FLUSH(w); + w = 0; + } + } while (n); + } + } + + + /* restore the globals from the locals */ + G.wp = w; /* restore global window pointer */ + G.bb = b; /* restore global bit buffer */ + G.bk = k; + + + /* done */ + return 0; +} + +#endif /* ASM_INFLATECODES */ + + + +static int inflate_stored(__G) + __GDEF +/* "decompress" an inflated type 0 (stored) block. */ +{ + unsigned n; /* number of bytes in block */ + unsigned w; /* current window position */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local copies of globals */ + Trace((stderr, "\nstored block")); + b = G.bb; /* initialize bit buffer */ + k = G.bk; + w = G.wp; /* initialize window position */ + + + /* go to byte boundary */ + n = k & 7; + DUMPBITS(n); + + + /* get the length and its complement */ + NEEDBITS(16) + n = ((unsigned)b & 0xffff); + DUMPBITS(16) + NEEDBITS(16) + if (n != (unsigned)((~b) & 0xffff)) + return 1; /* error in compressed data */ + DUMPBITS(16) + + + /* read and output the compressed data */ + while (n--) + { + NEEDBITS(8) + redirSlide[w++] = (uch)b; + if (w == wsize) + { + FLUSH(w); + w = 0; + } + DUMPBITS(8) + } + + + /* restore the globals from the locals */ + G.wp = w; /* restore global window pointer */ + G.bb = b; /* restore global bit buffer */ + G.bk = k; + return 0; +} + + +/* Globals for literal tables (built once) */ +/* Moved to globals.h */ +#if 0 +struct huft *fixed_tl = (struct huft *)NULL; +struct huft *fixed_td; +int fixed_bl, fixed_bd; +#endif + +static int inflate_fixed(__G) + __GDEF +/* decompress an inflated type 1 (fixed Huffman codes) block. We should + either replace this with a custom decoder, or at least precompute the + Huffman tables. */ +{ + /* if first time, set up tables for fixed blocks */ + Trace((stderr, "\nliteral block")); + if (G.fixed_tl == (struct huft *)NULL) + { + int i; /* temporary variable */ + unsigned l[288]; /* length list for huft_build */ + + /* literal table */ + for (i = 0; i < 144; i++) + l[i] = 8; + for (; i < 256; i++) + l[i] = 9; + for (; i < 280; i++) + l[i] = 7; + for (; i < 288; i++) /* make a complete, but wrong code set */ + l[i] = 8; + G.fixed_bl = 7; + if ((i = huft_build(__G__ l, 288, 257, cplens, cplext, + &G.fixed_tl, &G.fixed_bl)) != 0) + { + G.fixed_tl = (struct huft *)NULL; + return i; + } + + /* distance table */ + for (i = 0; i < 30; i++) /* make an incomplete code set */ + l[i] = 5; + G.fixed_bd = 5; + if ((i = huft_build(__G__ l, 30, 0, cpdist, cpdext, + &G.fixed_td, &G.fixed_bd)) > 1) + { + huft_free(G.fixed_tl); + G.fixed_tl = (struct huft *)NULL; + return i; + } + } + + /* decompress until an end-of-block code */ + return inflate_codes(__G__ G.fixed_tl, G.fixed_td, + G.fixed_bl, G.fixed_bd) != 0; +} + + + +static int inflate_dynamic(__G) + __GDEF +/* decompress an inflated type 2 (dynamic Huffman codes) block. */ +{ + int i; /* temporary variables */ + unsigned j; + unsigned l; /* last length */ + unsigned m; /* mask for bit lengths table */ + unsigned n; /* number of lengths to get */ + struct huft *tl; /* literal/length code table */ + struct huft *td; /* distance code table */ + int bl; /* lookup bits for tl */ + int bd; /* lookup bits for td */ + unsigned nb; /* number of bit length codes */ + unsigned nl; /* number of literal/length codes */ + unsigned nd; /* number of distance codes */ +#ifdef PKZIP_BUG_WORKAROUND + unsigned ll[288+32]; /* literal/length and distance code lengths */ +#else + unsigned ll[286+30]; /* literal/length and distance code lengths */ +#endif + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local bit buffer */ + Trace((stderr, "\ndynamic block")); + b = G.bb; + k = G.bk; + + + /* read in table lengths */ + NEEDBITS(5) + nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */ + DUMPBITS(5) + NEEDBITS(5) + nd = 1 + ((unsigned)b & 0x1f); /* number of distance codes */ + DUMPBITS(5) + NEEDBITS(4) + nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */ + DUMPBITS(4) +#ifdef PKZIP_BUG_WORKAROUND + if (nl > 288 || nd > 32) +#else + if (nl > 286 || nd > 30) +#endif + return 1; /* bad lengths */ + + + /* read in bit-length-code lengths */ + for (j = 0; j < nb; j++) + { + NEEDBITS(3) + ll[border[j]] = (unsigned)b & 7; + DUMPBITS(3) + } + for (; j < 19; j++) + ll[border[j]] = 0; + + + /* build decoding table for trees--single level, 7 bit lookup */ + bl = 7; + i = huft_build(__G__ ll, 19, 19, NULL, NULL, &tl, &bl); + if (bl == 0) /* no bit lengths */ + i = 1; + if (i) + { + if (i == 1) + huft_free(tl); + return i; /* incomplete code set */ + } + + + /* read in literal and distance code lengths */ + n = nl + nd; + m = mask_bits[bl]; + i = l = 0; + while ((unsigned)i < n) + { + NEEDBITS((unsigned)bl) + j = (td = tl + ((unsigned)b & m))->b; + DUMPBITS(j) + j = td->v.n; + if (j < 16) /* length of code in bits (0..15) */ + ll[i++] = l = j; /* save last length in l */ + else if (j == 16) /* repeat last length 3 to 6 times */ + { + NEEDBITS(2) + j = 3 + ((unsigned)b & 3); + DUMPBITS(2) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = l; + } + else if (j == 17) /* 3 to 10 zero length codes */ + { + NEEDBITS(3) + j = 3 + ((unsigned)b & 7); + DUMPBITS(3) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + else /* j == 18: 11 to 138 zero length codes */ + { + NEEDBITS(7) + j = 11 + ((unsigned)b & 0x7f); + DUMPBITS(7) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + } + + + /* free decoding table for trees */ + huft_free(tl); + + + /* restore the global bit buffer */ + G.bb = b; + G.bk = k; + + + /* build the decoding tables for literal/length and distance codes */ + bl = lbits; + i = huft_build(__G__ ll, nl, 257, cplens, cplext, &tl, &bl); + if (bl == 0) /* no literals or lengths */ + i = 1; + if (i) + { + if (i == 1) { + if (!uO.qflag) + MESSAGE((uch *)"(incomplete l-tree) ", 21L, 1); + huft_free(tl); + } + return i; /* incomplete code set */ + } + bd = dbits; + i = huft_build(__G__ ll + nl, nd, 0, cpdist, cpdext, &td, &bd); + if (bd == 0 && nl > 257) /* lengths but no distances */ + { + if (!uO.qflag) + MESSAGE((uch *)"(incomplete d-tree) ", 21L, 1); + huft_free(tl); + return 1; + } + if (i == 1) { +#ifdef PKZIP_BUG_WORKAROUND + i = 0; +#else + if (!uO.qflag) + MESSAGE((uch *)"(incomplete d-tree) ", 21L, 1); + huft_free(td); +#endif + } + if (i) + { + huft_free(tl); + return i; + } + + + /* decompress until an end-of-block code */ + if (inflate_codes(__G__ tl, td, bl, bd)) + return 1; + + + /* free the decoding tables, return */ + huft_free(tl); + huft_free(td); + return 0; +} + + + +static int inflate_block(__G__ e) + __GDEF + int *e; /* last block flag */ +/* decompress an inflated block */ +{ + unsigned t; /* block type */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local bit buffer */ + b = G.bb; + k = G.bk; + + + /* read in last block bit */ + NEEDBITS(1) + *e = (int)b & 1; + DUMPBITS(1) + + + /* read in block type */ + NEEDBITS(2) + t = (unsigned)b & 3; + DUMPBITS(2) + + + /* restore the global bit buffer */ + G.bb = b; + G.bk = k; + + + /* inflate that block type */ + if (t == 2) + return inflate_dynamic(__G); + if (t == 0) + return inflate_stored(__G); + if (t == 1) + return inflate_fixed(__G); + + + /* bad block type */ + return 2; +} + + + +int inflate(__G) + __GDEF +/* decompress an inflated entry */ +{ + int e; /* last block flag */ + int r; /* result code */ +#ifdef DEBUG + unsigned h = 0; /* maximum struct huft's malloc'ed */ +#endif + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; + else + wsize = WSIZE, redirSlide = slide; /* how they're #defined if !DLL */ +#endif + + /* initialize window, bit buffer */ + G.wp = 0; + G.bk = 0; + G.bb = 0; + + + /* decompress until the last block */ + do { +#ifdef DEBUG + G.hufts = 0; +#endif + if ((r = inflate_block(__G__ &e)) != 0) + return r; +#ifdef DEBUG + if (G.hufts > h) + h = G.hufts; +#endif + } while (!e); + + + /* flush out redirSlide */ + FLUSH(G.wp); + + + /* return success */ + Trace((stderr, "\n%u bytes in Huffman tables (%d/entry)\n", + h * sizeof(struct huft), sizeof(struct huft))); + return 0; +} + + + +int inflate_free(__G) + __GDEF +{ + if (G.fixed_tl != (struct huft *)NULL) + { + huft_free(G.fixed_td); + huft_free(G.fixed_tl); + G.fixed_td = G.fixed_tl = (struct huft *)NULL; + } + return 0; +} + +#endif /* ?USE_ZLIB */ + + +/* + * GRR: moved huft_build() and huft_free() down here; used by explode() + * and fUnZip regardless of whether USE_ZLIB defined or not + */ + + +/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */ +#define BMAX 16 /* maximum bit length of any code (16 for explode) */ +#define N_MAX 288 /* maximum number of codes in any set */ + + +int huft_build(__G__ b, n, s, d, e, t, m) + __GDEF + ZCONST unsigned *b; /* code lengths in bits (all assumed <= BMAX) */ + unsigned n; /* number of codes (assumed <= N_MAX) */ + unsigned s; /* number of simple-valued codes (0..s-1) */ + ZCONST ush *d; /* list of base values for non-simple codes */ + ZCONST ush *e; /* list of extra bits for non-simple codes */ + struct huft **t; /* result: starting table */ + int *m; /* maximum lookup bits, returns actual */ +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return zero on success, one if + the given code set is incomplete (the tables are still built in this + case), two if the input is invalid (all zero length codes or an + oversubscribed set of lengths), and three if not enough memory. + The code with value 256 is special, and the tables are constructed + so that no bits beyond that code are fetched when that code is + decoded. */ +{ + unsigned a; /* counter for codes of length k */ + unsigned c[BMAX+1]; /* bit length count table */ + unsigned el; /* length of EOB code (value 256) */ + unsigned f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register unsigned i; /* counter, current code */ + register unsigned j; /* counter */ + register int k; /* number of bits in current code */ + int lx[BMAX+1]; /* memory for l[-1..BMAX-1] */ + int *l = lx+1; /* stack of bits per table */ + register unsigned *p; /* pointer into c[], b[], or v[] */ + register struct huft *q; /* points to current table */ + struct huft r; /* table entry for structure assignment */ + struct huft *u[BMAX]; /* table stack */ + unsigned v[N_MAX]; /* values in order of bit length */ + register int w; /* bits before this table == (l * h) */ + unsigned x[BMAX+1]; /* bit offsets, then code stack */ + unsigned *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + unsigned z; /* number of entries in current table */ + + + /* Generate counts for each bit length */ + el = n > 256 ? b[256] : BMAX; /* set length of EOB code, if any */ + memzero((char *)c, sizeof(c)); + p = (unsigned *)b; i = n; + do { + c[*p]++; p++; /* assume all entries <= BMAX */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = (struct huft *)NULL; + *m = 0; + return 0; + } + + + /* Find minimum and maximum length, bound *m by those */ + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((unsigned)*m < j) + *m = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((unsigned)*m > i) + *m = i; + + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) + return 2; /* bad input: more codes than bits */ + if ((y -= c[i]) < 0) + return 2; + c[i] += y; + + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + + /* Make a table of values in order of bit lengths */ + memzero((char *)v, sizeof(v)); + p = (unsigned *)b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + n = x[g]; /* set n to length of v */ + + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = l[-1] = 0; /* no bits decoded yet */ + u[0] = (struct huft *)NULL; /* just to keep compilers happy */ + q = (struct huft *)NULL; /* ditto */ + z = 0; /* ditto */ + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + a = c[k]; + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l[h]) + { + w += l[h++]; /* add bits already decoded */ + + /* compute minimum size table less than or equal to *m bits */ + z = (z = g - w) > (unsigned)*m ? *m : z; /* upper limit */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } + if ((unsigned)w + j > el && (unsigned)w < el) + j = el - w; /* make EOB code end at table */ + z = 1 << j; /* table entries for j-bit table */ + l[h] = j; /* set table size in stack */ + + /* allocate and link in new table */ + if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) == + (struct huft *)NULL) + { + if (h) + huft_free(u[0]); + return 3; /* not enough memory */ + } +#ifdef DEBUG + G.hufts += z + 1; /* track memory usage */ +#endif + *t = q + 1; /* link to list for huft_free() */ + *(t = &(q->v.t)) = (struct huft *)NULL; + u[h] = ++q; /* table starts after link */ + + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.b = (uch)l[h-1]; /* bits to dump before this table */ + r.e = (uch)(16 + j); /* bits in this table */ + r.v.t = q; /* pointer to this table */ + j = (i & ((1 << w) - 1)) >> (w - l[h-1]); + u[h-1][j] = r; /* connect to last table */ + } + } + + /* set up table entry in r */ + r.b = (uch)(k - w); + if (p >= v + n) + r.e = 99; /* out of values--invalid code */ + else if (*p < s) + { + r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ + r.v.n = (ush)*p++; /* simple code is just the value */ + } + else + { + r.e = (uch)e[*p - s]; /* non-simple--look up in lists */ + r.v.n = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + while ((i & ((1 << w) - 1)) != x[h]) + w -= l[--h]; /* don't need to update q */ + } + } + + + /* return actual size of base table */ + *m = l[0]; + + + /* Return true (1) if we were given an incomplete table */ + return y != 0 && g != 1; +} + + + +int huft_free(t) +struct huft *t; /* table to free */ +/* Free the malloc'ed tables built by huft_build(), which makes a linked + list of the tables it made, with the links in a dummy first entry of + each table. */ +{ + register struct huft *p, *q; + + + /* Go through linked list, freeing from the malloced (t[-1]) address. */ + p = t; + while (p != (struct huft *)NULL) + { + q = (--p)->v.t; + free((zvoid *)p); + p = q; + } + return 0; +} diff --git a/utils/Install/packzip/list.c b/utils/Install/packzip/list.c new file mode 100644 index 0000000000..60fa4dc044 --- /dev/null +++ b/utils/Install/packzip/list.c @@ -0,0 +1,649 @@ +/*--------------------------------------------------------------------------- + + list.c + + This file contains the non-ZipInfo-specific listing routines for UnZip. + + Contains: list_files() + get_time_stamp() [optional feature] + ratio() + fnprint() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#ifdef WINDLL +# ifdef POCKET_UNZIP +# include "wince/intrface.h" +# else +# include "windll/windll.h" +# endif +#endif + + +#ifdef TIMESTAMP + static int fn_is_dir OF((__GPRO)); +#endif + +#ifndef WINDLL + static ZCONST char Far CompFactorStr[] = "%c%d%%"; + static ZCONST char Far CompFactor100[] = "100%%"; + +#ifdef OS2_EAS + static ZCONST char Far HeadersS[] = + " Length EAs ACLs Date Time Name"; + static ZCONST char Far HeadersS1[] = + " -------- --- ---- ---- ---- ----"; +#else + static ZCONST char Far HeadersS[] = " Length Date Time Name"; + static ZCONST char Far HeadersS1[] = " -------- ---- ---- ----"; +#endif + + static ZCONST char Far HeadersL[] = + " Length Method Size Ratio Date Time CRC-32 Name"; + static ZCONST char Far HeadersL1[] = + "-------- ------ ------- ----- ---- ---- ------ ----"; + static ZCONST char Far *Headers[][2] = + { {HeadersS, HeadersS1}, {HeadersL, HeadersL1} }; + + static ZCONST char Far CaseConversion[] = + "%s (\"^\" ==> case\n%s conversion)\n"; + static ZCONST char Far LongHdrStats[] = + "%8lu %-7s%8lu %4s %02u-%02u-%02u %02u:%02u %08lx %c"; + static ZCONST char Far LongFileTrailer[] = + "-------- ------- --- \ + -------\n%8lu %8lu %4s %u file%s\n"; +#ifdef OS2_EAS + static ZCONST char Far ShortHdrStats[] = + "%9lu %6lu %6lu %02u-%02u-%02u %02u:%02u %c"; + static ZCONST char Far ShortFileTrailer[] = " -------- ----- ----- \ + -------\n%9lu %6lu %6lu %u file%s\n"; + static ZCONST char Far OS2ExtAttrTrailer[] = + "%ld file%s %ld bytes of OS/2 extended attributes attached.\n"; + static ZCONST char Far OS2ACLTrailer[] = + "%ld file%s %ld bytes of access control lists attached.\n"; +#else + static ZCONST char Far ShortHdrStats[] = + "%9lu %02u-%02u-%02u %02u:%02u %c"; + static ZCONST char Far ShortFileTrailer[] = + " -------- -------\n%9lu %u file%s\n"; +#endif /* ?OS2_EAS */ +#endif /* !WINDLL */ + + + + + +/*************************/ +/* Function list_files() */ +/*************************/ + +int list_files(__G) /* return PK-type error code */ + __GDEF +{ + int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL; +#ifndef WINDLL + char sgn, cfactorstr[10]; + int longhdr=(uO.vflag>1); +#endif + int date_format; + unsigned j, methnum, members=0; +#ifdef USE_EF_UT_TIME + iztimes z_utime; + struct tm *t; +#endif + unsigned yr, mo, dy, hh, mm; + ulg csiz, tot_csize=0L, tot_ucsize=0L; +#ifdef OS2_EAS + ulg ea_size, tot_easize=0L, tot_eafiles=0L; + ulg acl_size, tot_aclsize=0L, tot_aclfiles=0L; +#endif + min_info info; + char methbuf[8]; + static ZCONST char dtype[]="NXFS"; /* see zi_short() */ + static ZCONST char Far method[NUM_METHODS+1][8] = + {"Stored", "Shrunk", "Reduce1", "Reduce2", "Reduce3", "Reduce4", + "Implode", "Token", "Defl:#", "EnhDefl", "ImplDCL", "Unk:###"}; + +extern int files; + + +/*--------------------------------------------------------------------------- + Unlike extract_or_test_files(), this routine confines itself to the cen- + tral directory. Thus its structure is somewhat simpler, since we can do + just a single loop through the entire directory, listing files as we go. + + So to start off, print the heading line and then begin main loop through + the central directory. The results will look vaguely like the following: + + Length Method Size Ratio Date Time CRC-32 Name ("^" ==> case +-------- ------ ------- ----- ---- ---- ------ ---- conversion) + 44004 Implode 13041 71% 11-02-89 19:34 8b4207f7 Makefile.UNIX + 3438 Shrunk 2209 36% 09-15-90 14:07 a2394fd8 ^dos-file.ext + 16717 Defl:X 5252 69% 11-03-97 06:40 1ce0f189 WHERE +-------- ------- --- ------- + 64159 20502 68% 3 files + ---------------------------------------------------------------------------*/ + + + G.pInfo = &info; + date_format = DATE_FORMAT; + + files = 0; + +#ifndef WINDLL + if (uO.qflag < 2) { + if (uO.L_flag) + Info(slide, 0, ((char *)slide, LoadFarString(CaseConversion), + LoadFarStringSmall(Headers[longhdr][0]), + LoadFarStringSmall2(Headers[longhdr][1]))); + else + Info(slide, 0, ((char *)slide, "%s\n%s\n", + LoadFarString(Headers[longhdr][0]), + LoadFarStringSmall(Headers[longhdr][1]))); + } +#endif /* !WINDLL */ + + for (j = 0; j++ < (unsigned)G.ecrec.total_entries_central_dir;) { + + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag, ...: */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) + return error; /* only PK_EOF defined */ + + /* + * We could DISPLAY the filename instead of storing (and possibly trun- + * cating, in the case of a very long name) and printing it, but that + * has the disadvantage of not allowing case conversion--and it's nice + * to be able to see in the listing precisely how you have to type each + * filename in order for unzip to consider it a match. Speaking of + * which, if member names were specified on the command line, check in + * with match() to see if the current file is one of them, and make a + * note of it if it is. + */ + + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != + PK_COOL) /* ^--(uses pInfo->lcflag) */ + { + error_in_archive = error; + if (error > PK_WARN) /* fatal: can't continue */ + return error; + } + if (G.extra_field != (uch *)NULL) { + free(G.extra_field); + G.extra_field = (uch *)NULL; + } + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) + != 0) + { + error_in_archive = error; + if (error > PK_WARN) /* fatal */ + return error; + } + if (!G.process_all_files) { /* check if specified on command line */ + unsigned i; + + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; + break; /* found match, so stop looping */ + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case in match */ + break; + } + } + } + /* + * If current file was specified on command line, or if no names were + * specified, do the listing for this file. Otherwise, get rid of the + * file comment and go back for the next file. + */ + + if (G.process_all_files || do_this_file) { + +#ifdef OS2DLL + /* this is used by UzpFileTree() to allow easy processing of lists + * of zip directory contents */ + if (G.processExternally) { + if ((G.processExternally)(G.filename, &G.crec)) + break; + ++members; + } else { +#endif +#ifdef OS2_EAS + { + uch *ef_ptr = G.extra_field; + int ef_size, ef_len = G.crec.extra_field_length; + ea_size = acl_size = 0; + + while (ef_len >= EB_HEADSIZE) { + ef_size = makeword(&ef_ptr[EB_LEN]); + switch (makeword(&ef_ptr[EB_ID])) { + case EF_OS2: + ea_size = makelong(&ef_ptr[EB_HEADSIZE]); + break; + case EF_ACL: + acl_size = makelong(&ef_ptr[EB_HEADSIZE]); + break; + } + ef_ptr += (ef_size + EB_HEADSIZE); + ef_len -= (ef_size + EB_HEADSIZE); + } + } +#endif +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0, Mac */ + t = localtime(&(z_utime.mtime)); + } else + t = (struct tm *)NULL; + if (t != (struct tm *)NULL) { + mo = (unsigned)(t->tm_mon + 1); + dy = (unsigned)(t->tm_mday); + yr = (unsigned)(t->tm_year % 100); + hh = (unsigned)(t->tm_hour); + mm = (unsigned)(t->tm_min); + } else +#endif /* USE_EF_UT_TIME */ + { + yr = ((((unsigned)(G.crec.last_mod_dos_datetime >> 25) & 0x7f) + + 80) % (unsigned)100); + mo = ((unsigned)(G.crec.last_mod_dos_datetime >> 21) & 0x0f); + dy = ((unsigned)(G.crec.last_mod_dos_datetime >> 16) & 0x1f); + hh = (((unsigned)G.crec.last_mod_dos_datetime >> 11) & 0x1f); + mm = (((unsigned)G.crec.last_mod_dos_datetime >> 5) & 0x3f); + } + /* permute date so it displays according to nat'l convention + * ('methnum' is not yet set, it is used as temporary buffer) */ + switch (date_format) { + case DF_YMD: + methnum = (unsigned)mo; + mo = yr; yr = dy; dy = (ush)methnum; + break; + case DF_DMY: + methnum = (unsigned)mo; + mo = dy; dy = (ush)methnum; + } + + csiz = G.crec.csize; + if (G.crec.general_purpose_bit_flag & 1) + csiz -= 12; /* if encrypted, don't count encryption header */ + if ((cfactor = ratio(G.crec.ucsize, csiz)) < 0) { +#ifndef WINDLL + sgn = '-'; +#endif + cfactor = (-cfactor + 5) / 10; + } else { +#ifndef WINDLL + sgn = ' '; +#endif + cfactor = (cfactor + 5) / 10; + } + + methnum = MIN(G.crec.compression_method, NUM_METHODS); + zfstrcpy(methbuf, method[methnum]); + if (methnum == DEFLATED) { + methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3]; + } else if (methnum >= NUM_METHODS) { + sprintf(&methbuf[4], "%03u", G.crec.compression_method); + } + +#if 0 /* GRR/Euro: add this? */ +#if defined(DOS_FLX_OS2_W32) || defined(UNIX) + for (p = G.filename; *p; ++p) + if (!isprint(*p)) + *p = '?'; /* change non-printable chars to '?' */ +#endif /* DOS_FLX_OS2_W32 || UNIX */ +#endif /* 0 */ + +#ifdef WINDLL + /* send data to application for formatting and printing */ + (*G.lpUserFunctions->SendApplicationMessage)(G.crec.ucsize, csiz, + (ush)cfactor, mo, dy, yr, hh, mm, + (char)(G.pInfo->lcflag ? '^' : ' '), + (LPSTR)fnfilter(G.filename, slide), (LPSTR)methbuf, G.crec.crc32, + (char)((G.crec.general_purpose_bit_flag & 1) ? 'E' : ' ')); +#else /* !WINDLL */ + if (cfactor == 100) + sprintf(cfactorstr, LoadFarString(CompFactor100)); + else + sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) + Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats), + G.crec.ucsize, methbuf, csiz, cfactorstr, mo, dy, + yr, hh, mm, G.crec.crc32, (G.pInfo->lcflag? '^':' '))); + else +#ifdef OS2_EAS + Info(slide, 0, ((char *)slide, LoadFarString(ShortHdrStats), + G.crec.ucsize, ea_size, acl_size, + mo, dy, yr, hh, mm, (G.pInfo->lcflag? '^':' '))); +#else + Info(slide, 0, ((char *)slide, LoadFarString(ShortHdrStats), + G.crec.ucsize, + mo, dy, yr, hh, mm, (G.pInfo->lcflag? '^':' '))); +#endif + /* fnprint(__G);*/ + files++; +#endif /* ?WINDLL */ + + if ((error = do_string(__G__ G.crec.file_comment_length, + QCOND? DISPL_8 : SKIP)) != 0) + { + error_in_archive = error; /* might be just warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + tot_ucsize += G.crec.ucsize; + tot_csize += csiz; + ++members; +#ifdef OS2_EAS + if (ea_size) { + tot_easize += ea_size; + ++tot_eafiles; + } + if (acl_size) { + tot_aclsize += acl_size; + ++tot_aclfiles; + } +#endif +#ifdef OS2DLL + } /* end of "if (G.processExternally) {...} else {..." */ +#endif + } else { /* not listing this file */ + SKIP_(G.crec.file_comment_length) + } + } /* end for-loop (j: files in central directory) */ + +/*--------------------------------------------------------------------------- + Print footer line and totals (compressed size, uncompressed size, number + of members in zipfile). + ---------------------------------------------------------------------------*/ + + if (uO.qflag < 2 +#ifdef OS2DLL + && !G.processExternally +#endif + ) { + if ((cfactor = ratio(tot_ucsize, tot_csize)) < 0) { +#ifndef WINDLL + sgn = '-'; +#endif + cfactor = (-cfactor + 5) / 10; + } else { +#ifndef WINDLL + sgn = ' '; +#endif + cfactor = (cfactor + 5) / 10; + } +#ifdef WINDLL + /* pass the totals back to the calling application */ + G.lpUserFunctions->TotalSizeComp = tot_csize; + G.lpUserFunctions->TotalSize = tot_ucsize; + G.lpUserFunctions->CompFactor = cfactor; + G.lpUserFunctions->NumMembers = members; + +#else /* !WINDLL */ + if (cfactor == 100) + sprintf(cfactorstr, LoadFarString(CompFactor100)); + else + sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) { + Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer), + tot_ucsize, tot_csize, cfactorstr, members, members==1? "":"s")); +#ifdef OS2_EAS + if (tot_easize || tot_aclsize) + Info(slide, 0, ((char *)slide, "\n")); + if (tot_eafiles && tot_easize) + Info(slide, 0, ((char *)slide, LoadFarString(OS2ExtAttrTrailer), + tot_eafiles, tot_eafiles == 1? " has" : "s have a total of", + tot_easize)); + if (tot_aclfiles && tot_aclsize) + Info(slide, 0, ((char *)slide, LoadFarString(OS2ACLTrailer), + tot_aclfiles, tot_aclfiles == 1? " has" : "s have a total of", + tot_aclsize)); +#endif /* OS2_EAS */ + } else +#ifdef OS2_EAS + Info(slide, 0, ((char *)slide, LoadFarString(ShortFileTrailer), + tot_ucsize, tot_easize, tot_aclsize, members, members == 1? + "" : "s")); +#else + Info(slide, 0, ((char *)slide, LoadFarString(ShortFileTrailer), + tot_ucsize, members, members == 1? "" : "s")); +#endif /* OS2_EAS */ +#endif /* ?WINDLL */ + } + +/*--------------------------------------------------------------------------- + Double check that we're back at the end-of-central-directory record. + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ G.sig, 4) == 0) /* disk error? */ + return PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + if (members == 0 && error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; + + return error_in_archive; + +} /* end function list_files() */ + + + + + +#ifdef TIMESTAMP + +/************************/ +/* Function fn_is_dir() */ +/************************/ + +static int fn_is_dir(__G) /* returns TRUE if G.filename is directory */ + __GDEF +{ + extent fn_len = strlen(G.filename); + register char endc; + + return fn_len > 0 && + ((endc = G.filename[fn_len-1]) == '/' || + (G.pInfo->hostnum == FS_FAT_ && !strchr(G.filename, '/') && + endc == '\\')); +} + + + + + +/*****************************/ +/* Function get_time_stamp() */ +/*****************************/ + +int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + __GDEF + time_t *last_modtime; + unsigned *nmember; +{ + int do_this_file=FALSE, error, error_in_archive=PK_COOL; + unsigned j; +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif + min_info info; + + +/*--------------------------------------------------------------------------- + Unlike extract_or_test_files() but like list_files(), this function works + on information in the central directory alone. Thus we have a single, + large loop through the entire directory, searching for the latest time + stamp. + ---------------------------------------------------------------------------*/ + + *last_modtime = 0L; /* assuming no zipfile data older than 1970 */ + *nmember = 0; + G.pInfo = &info; + + for (j = 0; j++ < (unsigned)G.ecrec.total_entries_central_dir;) { + + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + return PK_BADERR; + } + /* process_cdir_file_hdr() sets pInfo->lcflag: */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) + return error; /* only PK_EOF defined */ + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != PK_OK) + { /* ^-- (uses pInfo->lcflag) */ + error_in_archive = error; + if (error > PK_WARN) /* fatal: can't continue */ + return error; + } + if (G.extra_field != (uch *)NULL) { + free(G.extra_field); + G.extra_field = (uch *)NULL; + } + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) + != 0) + { + error_in_archive = error; + if (error > PK_WARN) /* fatal */ + return error; + } + if (!G.process_all_files) { /* check if specified on command line */ + unsigned i; + + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; + break; /* found match, so stop looping */ + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case in match */ + break; + } + } + } + + /* If current file was specified on command line, or if no names were + * specified, check the time for this file. Either way, get rid of the + * file comment and go back for the next file. + * Directory entries are always ignored, to stay compatible with both + * Zip and PKZIP. + */ + if ((G.process_all_files || do_this_file) && !fn_is_dir(__G)) { +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + if (*last_modtime < z_utime.mtime) + *last_modtime = z_utime.mtime; + } else +#endif /* USE_EF_UT_TIME */ + { + time_t modtime = dos_to_unix_time(G.crec.last_mod_dos_datetime); + + if (*last_modtime < modtime) + *last_modtime = modtime; + } + ++*nmember; + } + SKIP_(G.crec.file_comment_length) + + } /* end for-loop (j: files in central directory) */ + +/*--------------------------------------------------------------------------- + Double check that we're back at the end-of-central-directory record. + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; + } + if (*nmember == 0 && error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; + + return error_in_archive; + +} /* end function get_time_stamp() */ + +#endif /* TIMESTAMP */ + + + + + +/********************/ +/* Function ratio() */ /* also used by ZipInfo routines */ +/********************/ + +int ratio(uc, c) + ulg uc, c; +{ + ulg denom; + + if (uc == 0) + return 0; + if (uc > 2000000L) { /* risk signed overflow if multiply numerator */ + denom = uc / 1000L; + return ((uc >= c) ? + (int) ((uc-c + (denom>>1)) / denom) : + -((int) ((c-uc + (denom>>1)) / denom))); + } else { /* ^^^^^^^^ rounding */ + denom = uc; + return ((uc >= c) ? + (int) ((1000L*(uc-c) + (denom>>1)) / denom) : + -((int) ((1000L*(c-uc) + (denom>>1)) / denom))); + } /* ^^^^^^^^ rounding */ +} + + + + + +/************************/ +/* Function fnprint() */ /* also used by ZipInfo routines */ +/************************/ + +void fnprint(__G) /* print filename (after filtering) and newline */ + __GDEF +{ + char *name = fnfilter(G.filename, slide); + + (*G.message)((zvoid *)&G, (uch *)name, (ulg)strlen(name), 0); + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + +} /* end function fnprint() */ diff --git a/utils/Install/packzip/makefile b/utils/Install/packzip/makefile new file mode 100644 index 0000000000..e5b1b70ec4 --- /dev/null +++ b/utils/Install/packzip/makefile @@ -0,0 +1,146 @@ +#============================================================================== +# Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only) +# Version: 5.4 19 November 1998 +#============================================================================== + + +# INSTRUCTIONS (such as they are): +# +# "make sunos" -- makes UnZip in current directory on a generic SunOS 4.x Sun +# "make list" -- lists all supported systems (targets) +# "make help" -- provides pointers on what targets to try if problems occur +# "make wombat" -- chokes and dies if you haven't added the specifics for your +# Wombat 68000 (or whatever) to the systems list +# +# CF are flags for the C compiler. LF are flags for the loader. LF2 are more +# flags for the loader, if they need to be at the end of the line instead of at +# the beginning (for example, some libraries). FL and FL2 are the corre- +# sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can +# be used to add default C flags to your compile without editing the Makefile +# (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C). +# +# Some versions of make do not define the macro "$(MAKE)"; this is rare, but +# if things don't work, try using "make" instead of "$(MAKE)" in your system's +# makerule. Or try adding the following line to your .login file: +# setenv MAKE "make" +# (That never works--makes that are too stupid to define MAKE are also too +# stupid to look in the environment--but try it anyway for kicks. :-) ) +# +# Memcpy and memset are provided for those systems that don't have them; they +# are in fileio.c and will be used if -DZMEM is included in CF. These days +# almost all systems have them. +# +# Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila- +# tion does not always imply a working program. + + +##################### +# MACRO DEFINITIONS # +##################### + +# Defaults most systems use (use LOCAL_UNZIP in environment to add flags, +# such as -DDOSWILD). + +# UnZip flags +CC = cc# try using "gcc" target rather than changing this (CC and LD +LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) +AS = as +LOC = $(LOCAL_UNZIP) +AF = $(LOC) +CF = -O -I. -I.. -I../inczip $(LOC) +LF = -o packinst +LF2 = -s + +# general-purpose stuff +#CP = cp +CP = ln +LN = ln +RM = rm -f +CHMOD = chmod +BINPERMS = 755 +MANPERMS = 644 +STRIP = strip +E = +O = .o +M = unix +SHELL = /bin/sh + +# defaults for crc32 stuff and system dependent headers +CRC32 = crc32 + +# object files +OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O +OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O +OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O packinst$O +#OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O install$O wxmain$O instsup$O +UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h + +# installation +# (probably can change next two to `install' and `install -d' if you have it) +INSTALL = cp +INSTALL_D = mkdir -p + +############################################### +# BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES # +############################################### + +# this is for GNU make; comment out and notify zip-bugs if it causes errors +.SUFFIXES: .c .o .obj .pic.o + +# yes, we should be able to use the $O macro to combine these two, but it +# fails on some brain-damaged makes (e.g., AIX's)...no big deal +.c.o: + $(CC) -c $(CF) $*.c + +.c.obj: + $(CC) -c $(CF) $*.c + +.c.pic.o: + $(CC) -c $(CF) -o $@ $*.c + +all: sfx + + +# EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS +# make utilities if default: change "unzip$E:" to "unzip$E:&" + +sfx$E: $(OBJS) # add `&' for parallel makes + $(LD) $(LF) $(OBJS) + +crc32$O: crc32.c $(UNZIP_H) ../inczip/zip.h +crctab$O: crctab.c $(UNZIP_H) ../inczip/zip.h +crypt$O: crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +envargs$O: envargs.c $(UNZIP_H) +explode$O: explode.c $(UNZIP_H) +extract$O: extract.c $(UNZIP_H) ../inczip/crypt.h +fileio$O: fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h +funzip$O: funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h +globals$O: globals.c $(UNZIP_H) +inflate$O: inflate.c ../inczip/inflate.h $(UNZIP_H) +list$O: list.c $(UNZIP_H) +match$O: match.c $(UNZIP_H) +process$O: process.c $(UNZIP_H) +ttyio$O: ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +unreduce$O: unreduce.c $(UNZIP_H) +unshrink$O: unshrink.c $(UNZIP_H) +unzip$O: unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h +zipinfo$O: zipinfo.c $(UNZIP_H) + +unix$O: unix.c $(UNZIP_H) ../inczip/version.h # Unix only + $(CC) -c $(CF) unix.c + +packinst$O: ../packinst/packinst.c + $(CC) -c $(CF) ../packinst/packinst.c + +#install$O: ../install.c +# $(CC) -c $(CF) ../install.c +# +#unix$O: ../wxmain.cpp +# $(CC) -c $(CF) ../wxmain.cpp +# +#unix$O: ../instsup.cpp +# $(CC) -c $(CF) ../instsup.cpp + + + diff --git a/utils/Install/packzip/makefile.b32 b/utils/Install/packzip/makefile.b32 new file mode 100644 index 0000000000..7734f0f7b3 --- /dev/null +++ b/utils/Install/packzip/makefile.b32 @@ -0,0 +1,118 @@ +# Makefile for UnZip(SFX) and fUnZip for Borland C++ for Windows 95/NT +# Version: 5.4 and later Alvin Koh, Jim Knoble, Christian Spieler, etc. +# Adapted from the MS-DOS makefile by E-Yen Tan +# +# Last revised: 24 Nov 98 +# +# + + +# Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD) +# should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added +# to the declaration of LOC here: +LOC = $(LOCAL_UNZIP) + +# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. +CPU_TYP = 4 + +# (De)Select inclusion of optimized assembler CRC32 routine: +USE_ASMCRC = 0 + +# If you have bcc32i, you should define: +# CC = bcc32i +# This compiler generates a faster code. +CC = bcc32 +AS = tasm32 + +!if $(USE_ASMCRC) +ASMFLG = -DASM_CRC +ASMOBJS = crc_i386.obj +!else +ASMFLG = +ASMOBJS = +!endif + +!if $(UNCLEAN) +DIRT = -DUSE_SMITH_CODE -DUSE_UNSHRINK +!else +DIRT = +!endif + +# compiler flags + +ASCPUFLAG = __$(CPU_TYP)86 +!if $(CPU_TYP) != 0 +CC_CPUFLG = -$(CPU_TYP) +!endif +ASFLAGS = -ml -m2 -w0 -D$(ASCPUFLAG) $(LOC) +CFLAGS = -O2 -w- $(CC_CPUFLG) -ff- -k- -P-.C -I. -I.. -I..\inczip -DWIN32 $(ASMFLG) $(LOC) $(DIRT) +LDFLAGS = -lxncd -l-P # for bcc +UNFLAGS = $(CFLAGS) + +# implicit rules + +.asm.obj: + $(AS) $(ASFLAGS) $< + +.c.obj: + $(CC) -c $(UNFLAGS) {$< } + +# list macros + +OBJU1 = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj explode.obj +OBJU2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj +OBJU3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj +OBJUS = win32.obj nt.obj $(ASMOBJS) packinst.obj +OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJUS) + +UNZIP_H = ..\inczip\unzip.h ..\inczip\unzpriv.h ..\inczip\globals.h ..\inczip\w32cfg.h + +# explicit rules + +all: packinst.exe + +packinst.exe: $(OBJU) + $(CC) $(LDFLAGS) -epackinst.exe @&&| +$(OBJU) +| + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + -erase *.tds + -erase *.il? + +# individual file dependencies + +crc32.obj: crc32.c $(UNZIP_H) ..\inczip\zip.h +crctab.obj: crctab.c $(UNZIP_H) ..\inczip\zip.h +crypt.obj: crypt.c $(UNZIP_H) ..\inczip\zip.h ..\inczip\crypt.h ..\inczip\ttyio.h +envargs.obj: envargs.c $(UNZIP_H) +explode.obj: explode.c $(UNZIP_H) +extract.obj: extract.c $(UNZIP_H) ..\inczip\crypt.h +fileio.obj: fileio.c $(UNZIP_H) ..\inczip\crypt.h ..\inczip\ttyio.h ..\inczip\ebcdic.h +globals.obj: globals.c $(UNZIP_H) +inflate.obj: inflate.c ..\inczip\inflate.h $(UNZIP_H) +list.obj: list.c $(UNZIP_H) +match.obj: match.c $(UNZIP_H) +process.obj: process.c $(UNZIP_H) +ttyio.obj: ttyio.c $(UNZIP_H) ..\inczip\zip.h ..\inczip\crypt.h ..\inczip\ttyio.h +unreduce.obj: unreduce.c $(UNZIP_H) +unshrink.obj: unshrink.c $(UNZIP_H) +unzip.obj: unzip.c $(UNZIP_H) ..\inczip\crypt.h ..\inczip\version.h ..\inczip\consts.h +zipinfo.obj: zipinfo.c $(UNZIP_H) + +crc_i386.obj: crc_i386.asm + $(AS) $(ASFLAGS) crc_i386.asm, $*.obj ; + +win32.obj: win32.c $(UNZIP_H) + $(CC) -c $(UNFLAGS) win32.c + +packinst.obj: ..\packinst\packinst.c $(UNZIP_H) + $(CC) -c $(UNFLAGS) ..\packinst\packinst.c + +nt.obj: nt.c $(UNZIP_H) + $(CC) -c $(UNFLAGS) nt.c diff --git a/utils/Install/packzip/makefile.g95 b/utils/Install/packzip/makefile.g95 new file mode 100644 index 0000000000..fdd6be493b --- /dev/null +++ b/utils/Install/packzip/makefile.g95 @@ -0,0 +1,158 @@ +# Makefile for UnZip, fUnZip and UnZipSFX for native Win32-Intel ports of gcc. +# Currently supported implementations: Cygnus/Win32 and MinGW32. +# +# First version: Cosmin Truta , Dec 1997. +# Last revision: Christian Spieler, 29-Apr-1998 +# +# To use, do "make -f win32/makefile.gcc". + + +### Optional section + +# Optional nonstandard preprocessor flags (as -DUSE_ZLIB or -DUSE_SMITH_CODE) +# should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added +# to the declaration of LOCFLAGS here: +LOCFLAGS = $(LOCAL_UNZIP) + + +### Compiler-specific section + +# ------------ GNU C ------------ +CC = gcc + +#AS = as +AS = $(CC) + +#LD = ld +LD = $(CC) + +# Quiet +CC_QUIET_OPT = +AS_QUIET_OPT = $(CC_QUIET_OPT) +LD_QUIET_OPT = $(CC_QUIET_OPT) + +# Warnings +CC_WARN_OPT = -Wall +AS_WARN_OPT = $(CC_WARN_OPT) +LD_WARN_OPT = + +# Debug version +CC_DEBUG_OPT = -g +AS_DEBUG_OPT = $(CC_DEBUG_OPT) +LD_DEBUG_OPT = $(CC_DEBUG_OPT) + +# Release version +CC_RELEASE_OPT = +AS_RELEASE_OPT = +LD_RELEASE_OPT = -s + +# Smallest code +CC_SIZE_OPT = -O1 + +# Fastest code +CC_SPEED_OPT = -O2 + +# Output object file name +CC_OUT_OPT = -o + +# Other specific options +#CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32 -mno-cygwin +CC_SPECIFIC_OPT = -c -DWIN32 -mno-cygwin -I../inczip +AS_SPECIFIC_OPT = -c +LD_SPECIFIC_OPT = -mno-cygwin -o $@ + +# Libraries for the debug & release version +LD_RELEASE_LIBS = -luser32 -ladvapi32 +LD_DEBUG_LIBS = $(LD_RELEASE_LIBS) + + +### System-specific section + +# Suffixes +OBJ = .o +EXE = .exe + +.SUFFIXES: .c .S $(OBJ) $(EXE) + +# Commands +RM = rm -f + + +### General section + +CFLAGS = $(CC_SPECIFIC_OPT) $(CC_QUIET_OPT) $(CC_WARN_OPT) $(LOCFLAGS) \ + $(CC_OUT_OPT) $@ +ASFLAGS = $(AS_SPECIFIC_OPT) $(AS_QUIET_OPT) $(AS_WARN_OPT) $(LOCFLAGS) +LDFLAGS = $(LD_SPECIFIC_OPT) $(LD_QUIET_OPT) $(LD_WARN_OPT) + +# To build with debug info, use 'make DEBUG=1'. +ifdef DEBUG +CVER = $(CC_DEBUG_OPT) +ASVER = $(AS_DEBUG_OPT) +LDVER = $(LD_DEBUG_OPT) +GENFLAGS = +FFLAGS = -DFUNZIP +SFXFLAGS = -DSFX +LDLIBS = $(LD_DEBUG_LIBS) +else +CVER = $(CC_RELEASE_OPT) +ASVER = $(AS_RELEASE_OPT) +LDVER = $(LD_RELEASE_OPT) +GENFLAGS = $(CC_SPEED_OPT) +FFLAGS = $(CC_SPEED_OPT) -DFUNZIP +SFXFLAGS = $(CC_SIZE_OPT) -DSFX +LDLIBS = $(LD_RELEASE_LIBS) +endif + +# Object files +OBJA = crc_i386$(OBJ) packinst$(OBJ) +OBJS1 = unzip$(OBJ) crc32$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) +OBJS2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) inflate$(OBJ) +OBJS3 = list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) unreduce$(OBJ) +OBJS4 = unshrink$(OBJ) zipinfo$(OBJ) win32$(OBJ) nt$(OBJ) +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJA) + +UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h ../inczip/w32cfg.h + + +# Default target is all the executables +unzips: packinst$(EXE) + +packinst$(EXE): $(OBJS) + $(LD) $(LDFLAGS) $(LDVER) $(OBJS) $(LDLIBS) + +# How to compile sources +.c$(OBJ): + $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $< +.S$(OBJ): + $(AS) $(ASFLAGS) $(ASVER) $(GENFLAGS) $< + +# Dependencies +crc32$(OBJ): crc32.c $(UNZIP_H) ../inczip/zip.h +crctab$(OBJ): crctab.c $(UNZIP_H) ../inczip/zip.h +crypt$(OBJ): crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +envargs$(OBJ): envargs.c $(UNZIP_H) +explode$(OBJ): explode.c $(UNZIP_H) +extract$(OBJ): extract.c $(UNZIP_H) ../inczip/crypt.h +fileio$(OBJ): fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h +funzip$(OBJ): funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h +globals$(OBJ): globals.c $(UNZIP_H) +inflate$(OBJ): inflate.c ../inczip/inflate.h $(UNZIP_H) +list$(OBJ): list.c $(UNZIP_H) +match$(OBJ): match.c $(UNZIP_H) +process$(OBJ): process.c $(UNZIP_H) +ttyio$(OBJ): ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +unreduce$(OBJ): unreduce.c $(UNZIP_H) +unshrink$(OBJ): unshrink.c $(UNZIP_H) +unzip$(OBJ): unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h +zipinfo$(OBJ): zipinfo.c $(UNZIP_H) +crc_i386$(OBJ): crc_i386.S +win32$(OBJ): win32.c $(UNZIP_H) ../inczip/nt.h +nt$(OBJ): nt.c ../inczip/nt.h + +packinst$(OBJ): ../packinst/packinst.c + $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $< + +clean: + $(RM) *$(OBJ) + $(RM) *$(EXE) diff --git a/utils/Install/packzip/makefile.gcc b/utils/Install/packzip/makefile.gcc new file mode 100644 index 0000000000..e5b1b70ec4 --- /dev/null +++ b/utils/Install/packzip/makefile.gcc @@ -0,0 +1,146 @@ +#============================================================================== +# Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only) +# Version: 5.4 19 November 1998 +#============================================================================== + + +# INSTRUCTIONS (such as they are): +# +# "make sunos" -- makes UnZip in current directory on a generic SunOS 4.x Sun +# "make list" -- lists all supported systems (targets) +# "make help" -- provides pointers on what targets to try if problems occur +# "make wombat" -- chokes and dies if you haven't added the specifics for your +# Wombat 68000 (or whatever) to the systems list +# +# CF are flags for the C compiler. LF are flags for the loader. LF2 are more +# flags for the loader, if they need to be at the end of the line instead of at +# the beginning (for example, some libraries). FL and FL2 are the corre- +# sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can +# be used to add default C flags to your compile without editing the Makefile +# (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C). +# +# Some versions of make do not define the macro "$(MAKE)"; this is rare, but +# if things don't work, try using "make" instead of "$(MAKE)" in your system's +# makerule. Or try adding the following line to your .login file: +# setenv MAKE "make" +# (That never works--makes that are too stupid to define MAKE are also too +# stupid to look in the environment--but try it anyway for kicks. :-) ) +# +# Memcpy and memset are provided for those systems that don't have them; they +# are in fileio.c and will be used if -DZMEM is included in CF. These days +# almost all systems have them. +# +# Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila- +# tion does not always imply a working program. + + +##################### +# MACRO DEFINITIONS # +##################### + +# Defaults most systems use (use LOCAL_UNZIP in environment to add flags, +# such as -DDOSWILD). + +# UnZip flags +CC = cc# try using "gcc" target rather than changing this (CC and LD +LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) +AS = as +LOC = $(LOCAL_UNZIP) +AF = $(LOC) +CF = -O -I. -I.. -I../inczip $(LOC) +LF = -o packinst +LF2 = -s + +# general-purpose stuff +#CP = cp +CP = ln +LN = ln +RM = rm -f +CHMOD = chmod +BINPERMS = 755 +MANPERMS = 644 +STRIP = strip +E = +O = .o +M = unix +SHELL = /bin/sh + +# defaults for crc32 stuff and system dependent headers +CRC32 = crc32 + +# object files +OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O +OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O +OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O packinst$O +#OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O install$O wxmain$O instsup$O +UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h + +# installation +# (probably can change next two to `install' and `install -d' if you have it) +INSTALL = cp +INSTALL_D = mkdir -p + +############################################### +# BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES # +############################################### + +# this is for GNU make; comment out and notify zip-bugs if it causes errors +.SUFFIXES: .c .o .obj .pic.o + +# yes, we should be able to use the $O macro to combine these two, but it +# fails on some brain-damaged makes (e.g., AIX's)...no big deal +.c.o: + $(CC) -c $(CF) $*.c + +.c.obj: + $(CC) -c $(CF) $*.c + +.c.pic.o: + $(CC) -c $(CF) -o $@ $*.c + +all: sfx + + +# EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS +# make utilities if default: change "unzip$E:" to "unzip$E:&" + +sfx$E: $(OBJS) # add `&' for parallel makes + $(LD) $(LF) $(OBJS) + +crc32$O: crc32.c $(UNZIP_H) ../inczip/zip.h +crctab$O: crctab.c $(UNZIP_H) ../inczip/zip.h +crypt$O: crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +envargs$O: envargs.c $(UNZIP_H) +explode$O: explode.c $(UNZIP_H) +extract$O: extract.c $(UNZIP_H) ../inczip/crypt.h +fileio$O: fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h +funzip$O: funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h +globals$O: globals.c $(UNZIP_H) +inflate$O: inflate.c ../inczip/inflate.h $(UNZIP_H) +list$O: list.c $(UNZIP_H) +match$O: match.c $(UNZIP_H) +process$O: process.c $(UNZIP_H) +ttyio$O: ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +unreduce$O: unreduce.c $(UNZIP_H) +unshrink$O: unshrink.c $(UNZIP_H) +unzip$O: unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h +zipinfo$O: zipinfo.c $(UNZIP_H) + +unix$O: unix.c $(UNZIP_H) ../inczip/version.h # Unix only + $(CC) -c $(CF) unix.c + +packinst$O: ../packinst/packinst.c + $(CC) -c $(CF) ../packinst/packinst.c + +#install$O: ../install.c +# $(CC) -c $(CF) ../install.c +# +#unix$O: ../wxmain.cpp +# $(CC) -c $(CF) ../wxmain.cpp +# +#unix$O: ../instsup.cpp +# $(CC) -c $(CF) ../instsup.cpp + + + diff --git a/utils/Install/packzip/makefile.os2 b/utils/Install/packzip/makefile.os2 new file mode 100644 index 0000000000..6778bd50ab --- /dev/null +++ b/utils/Install/packzip/makefile.os2 @@ -0,0 +1,670 @@ +# Makefile for UnZip, UnZipSFX and fUnZip 24 November 1998 +# +# supported compilers: +# - Microsoft C, version 6.00 or higher, for use under OS/2 1.x (16-bit) +# - Watcom C/C++, version 9.0+, for use under OS/2 1.x or 2.x+ (16/32-bit) +# - emx+gcc, version 0.9c or higher, for use under OS/2 2.x+ (32-bit) +# - IBM C Set++, for use under OS/2 2.x+ (32-bit) +# - Borland C++, for use under OS/2 2.x+ (32-bit) +# - Metaware High C/C++, for use under OS/2 2.x+ (32-bit) +# +# supported cross-compilers: +# - Microsoft C, version 6.0 or 7.0, for use under DOS (16-bit) +# - Watcom C/C++, version 9.0+, for use under DOS/Win95/NT (16/32-bit) +# - GNU gcc (emx), version 0.9c or higher, for use under DOS/Win95/NT (32-bit) +# +# supported assemblers: +# - Microsoft MASM 6.00 with Microsoft C +# - Watcom WASM with Watcom C/C++ +# - GNU as with GNU gcc + +# To use MASM 5.x instead of MASM 6.00: +# - set AS="masm -t -Ml" +# - set ASEOL=";" + +# To use, enter "{d,n}make -f os2/makefile.os2" (this makefile depends on its +# name being "makefile.os2", and it must be in the os2 subdirectory). + +# Notes on Microsoft C 6.00 compilation for OS/2: +# +# The resulting programs can be used under OS/2 protected mode only, not +# under DOS. A larger stack has to be used for OS/2 because system calls +# use more stack than under DOS; 8k is recommended by Microsoft. + +# Notes on IBM C Set++, Watcom C/C++, Borland C++ or emx+gcc compilation: +# +# The resulting programs can be used under protected mode of OS/2 2.x or +# higher only, not under OS/2 1.x and not under DOS. +# +# The NFLAGS macro is used to work around an optimization bug in the IBM +# C++ Set compiler; this is fixed by CSD #4, so NFLAGS="" can be used for +# all targets below. + +# Notes on Watcom C/C++ compilation for DOS with the PMODE/W extender: +# +# You need to add the following section to your \watcom\binb\wlsystem.lnk +# file and also need to copy pmodew.exe to the same directory: +# +# system begin pmodew +# option osname='PMODE/W' +# libpath %WATCOM%\lib386 +# libpath %WATCOM%\lib386\dos +# op stub=pmodew.exe +# format os2 le +# end +# +# PMODE/W 1.16 or higher is required. See also msdos/README for important +# notes about PMODE/W bugs. + +default: + @echo "Enter `$(MAKE) -f os2/makefile.os2 target' from the main" + @echo "UnZip directory, where target is one of:" + @echo " msc mscdebug mscdos ibm ibmdyn ibmdebug ibmprof" + @echo " ibmdll ibmdyndll ibmdebugdll ibmprofdll" + @echo " metaware borland gcc gccdyn gccdebug gccdos gccwin32" + @echo " watcom watcom16 watcomdos watcom16dos pmodew watcomwin32" + +# MS C 6.00 for OS/2, 16-bit (should figure out way to split unzip/funzip +# compiles so former is always large model and latter always small model...) +msc: + $(MAKE) -f os2/makefile.os2 all \ + CC="cl -nologo -AL -Ocegit -Gs -I. $(FP)" \ + CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="ml -nologo -c -Zm -Cp" \ + ASFLAGS="-D__LARGE__ -D__286" \ + LDFLAGS="-F 2000 -Lp -Fe" \ + LDFLAGS2="-link /noe" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + DEF="os2\unzip.def" + +# MS C 6.00 for OS/2, debug version +mscdebug: + $(MAKE) -f os2/makefile.os2 all \ + CC="cl -nologo -AL -Zi -Od -I. $(FP)" \ + CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="ml -nologo -c -Zim -Cp" \ + ASFLAGS="-D__LARGE__ -D__286" \ + LDFLAGS="-F 2000 -Lp -Fe" \ + LDFLAGS2="-link /noe" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + DEF="os2\unzip.def" + +# cross-compilation for MS-DOS with MS C 6.00 (same comment as above...formerly; +# now unzip is medium model again, with [almost] all strings in far memory) +mscdos: + $(MAKE) -f os2/makefile.os2 all \ + CC="cl -nologo -AM -Oaict -Gs -I. $(FP)" \ + CFLAGS="-Zp1 -W3 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="ml -nologo -c -Zm -Cp" \ + ASFLAGS="-D__MEDIUM__" \ + LDFLAGS="-F 0C00 -Lr -Fe" \ + LDFLAGS2="-link /noe /exe" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" + +# IBM C Set, statically linked runtime +ibm: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -O -Gs -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, dynamically linked runtime +ibmdyn: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -O -Gs -Gd -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, debug version +ibmdebug: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -Ti -I." \ + CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, profiling version for PROFIT +ibmprof: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -O -Gs -Gh -Ti -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="cppopa3.obj" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, statically linked runtime +ibmdll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -O -Gs -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# IBM C Set, dynamically linked runtime +ibmdyndll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -O -Gs -Gd -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# IBM C Set, debug version +ibmdebugdll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -Ti -I." \ + CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# IBM C Set, profiling version for PROFIT +ibmprofdll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -O -Gs -Gh -Ti -I." \ + CFLAGS="-Gm -Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="profit.obj" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# Watcom C/386 9.0 or higher +watcom: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=os2v2 -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=os2v2 -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=os2v2 -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + DEF="" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/286 9.0 or higher +watcom16: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl -bt=os2 -zq -ml -Ox -s -I." \ + CFLAGS="-Zp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=os2 -zq -2 -ml" \ + ASFLAGS="" \ + LDFLAGS="-k0x2000 -x -l=os2 -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/386 9.0 or higher, crosscompilation for DOS, DOS4GW extender +watcomdos: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=dos4g -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=dos4g -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=dos4g -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/386 9.0 or higher, crosscompilation for DOS, PMODE/W extender +pmodew: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=dos4g -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=dos4g -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=pmodew -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/286 9.0 or higher, crosscompilation for DOS +watcom16dos: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl -bt=dos -zq -ml -Ox -s -I." \ + CFLAGS="-Zp1 -DMSDOS $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=dos -0 -mm" \ + ASFLAGS="-D__MEDIUM__" \ + LDFLAGS="-k0xC00 -x -l=dos -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/386 9.0 or higher, crosscompilation for Win95/NT +watcomwin32: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=NT -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DWIN32 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=NT -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=NT -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + OBJU2="win32.obj nt.obj" \ + OBJX2="win32_.obj nt_.obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + DEF="" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# MetaWare High C/C++ 3.2 +metaware: + $(MAKE) -f os2/makefile.os2 all \ + CC="hc -O2 -I." \ + CFLAGS="-D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-o " \ + LDFLAGS2="" \ + OUT="-o ./" \ + OBJ=".obj" \ + DEF="-Hdef=os2\unzip.def" + +# Borland C++ +borland: + $(MAKE) -f os2/makefile.os2 all \ + CC="bcc -O -I. -Ios2" \ + CFLAGS="-w- -D__cdecl -D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-e" \ + LDFLAGS2="" \ + OUT="-o" \ + OBJ=".obj" \ + DEF="-sDos2\unzip.def" + +# emx, gcc, OMF format, statically linked C runtime +gcc: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -Zomf -O -I." \ + CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc -Zomf" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zsmall-conv -Zstack 320 -Zsys -s" \ + OUT="-o" \ + OBJ=".obj" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + DEF="os2/unzip.def" + +# emx, gcc, OMF format, dynamically linked C runtime +gccdyn: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -Zomf -O -I." \ + CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc -Zomf" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zstack 320 -Zcrtdll -s" \ + OUT="-o" \ + OBJ=".obj" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + DEF="os2/unzip.def" + +# emx, gcc, a.out format, with debug info for gdb +gccdebug: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -g -I." \ + CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc -g" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zsmall-conv" \ + OUT="-o" \ + OBJ=".o" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" + +# emx, gcc, a.out format, cross-compilation for MS-DOS +gccdos: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -O -I." \ + CFLAGS="-Wall -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zsmall-conv -s" \ + OUT="-o" \ + OBJ=".o" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + OBJU2="msdos.o" \ + OBJX2="msdos_.o" \ + OSDEP_H="msdos/doscfg.h" + +# emx, gcc, RSXNT, cross-compilation for Win32, statically linked C runtime +gccwin32: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -Zwin32 -O2 -I." \ + CFLAGS="-Wall -DWIN32 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc" \ + ASFLAGS="-Di386" \ + LDFLAGS="-Zsys -o ./" \ + LDFLAGS2="-ladvapi32 -Zsmall-conv -s" \ + OUT="-o" \ + OBJ=".o" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + OBJU2="win32.o nt.o" \ + OBJX2="win32_.o nt_.o" \ + OBJF2="win32f.o" \ + OSDEP_H="win32/w32cfg.h" + +# variables + +# LOCAL_UNZIP = -DREENTRANT + +# default settings for target dependent macros: +DIRSEP = / +AS_DIRSEP = / + +OSDEP_H = os2/os2data.h os2/os2cfg.h +CRC32 = crc32 +CRC32F = crc32f +CRC32X = crc32_ + +OBJU = unzip$(OBJ) $(CRC32)$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) \ + explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) \ + inflate$(OBJ) list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) \ + unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ) +OBJU2 = os2$(OBJ) os2acl$(OBJ) +OBJX = unzipsf_$(OBJ) $(CRC32X)$(OBJ) crctab_$(OBJ) crypt_$(OBJ) \ + extract_$(OBJ) fileio_$(OBJ) globals_$(OBJ) inflate_$(OBJ) \ + match_$(OBJ) process_$(OBJ) ttyio_$(OBJ) +OBJX2 = os2_$(OBJ) os2acl_$(OBJ) +OBJDLL= api$(OBJ) apihelp$(OBJ) rexxhelp$(OBJ) rexxapi$(OBJ) +OBJF = funzip$(OBJ) $(CRC32F)$(OBJ) cryptf$(OBJ) inflatef$(OBJ) \ + globalsf$(OBJ) ttyiof$(OBJ) +OBJF2 = + +UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) + +# rules + +.SUFFIXES: .c .asm $(OBJ) + +.c$(OBJ): + $(CC) -c $(CFLAGS) $(DLLFLAG) $< + +.asm$(OBJ): + $(AS) $(ASFLAGS) $< $(ASEOL) + +# targets + +all: unzip.exe funzip.exe unzipsfx.exe +dll: unzip32.dll unzip.stb funzip.exe unzipsfx.exe + +unzip.exe: $(OBJU) $(OBJU2) + $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(OBJU2) $(LDFLAGS2) + +funzip.exe: $(OBJF) $(OBJF2) + $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(OBJF2) $(LDFLAGS2) + +unzipsfx.exe: $(OBJX) $(OBJX2) + $(CC) $(LDFLAGS)$@ $(DEF) $(OBJX) $(OBJX2) $(LDFLAGS2) + +unzip32.dll: $(DLLDEF) $(OBJU) $(OBJU2) $(OBJDLL) + $(CC) $(DLLFLAG) $(LDFLAGS)$@ $(DLLDEF) $(OBJU) $(OBJDLL) $(OBJU2) $(APILIB) $(LDFLAGS2) + +unzip.stb: unzipstb$(OBJ) $(STUBDEF) + $(CC) $(LDFLAGS)$@ $(STUBDEF) unzipstb$(OBJ) $(LDFLAGS2) + copy unzip.stb unzip.exe + +# dependencies + +apihelp$(OBJ): apihelp.c $(UNZIP_H) version.h +crc32$(OBJ): crc32.c $(UNZIP_H) zip.h +crctab$(OBJ): crctab.c $(UNZIP_H) zip.h +envargs$(OBJ): envargs.c $(UNZIP_H) +explode$(OBJ): explode.c $(UNZIP_H) +extract$(OBJ): extract.c $(UNZIP_H) crypt.h +fileio$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h +globals$(OBJ): globals.c $(UNZIP_H) +inflate$(OBJ): inflate.c $(UNZIP_H) +list$(OBJ): list.c $(UNZIP_H) +match$(OBJ): match.c $(UNZIP_H) +process$(OBJ): process.c $(UNZIP_H) +ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h +unreduce$(OBJ): unreduce.c $(UNZIP_H) +unshrink$(OBJ): unshrink.c $(UNZIP_H) +unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h +api$(OBJ): api.c $(UNZIP_H) version.h +zipinfo$(OBJ): zipinfo.c $(UNZIP_H) + +funzip$(OBJ): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h # funzip only + $(CC) -c $(CFLAGS) funzip.c + +unzipstb$(OBJ): unzipstb.c # DLL version + $(CC) -c $(CFLAGS) unzipstb.c + +msdos$(OBJ): msdos/msdos.c $(UNZIP_H) version.h # DOS only + $(CC) -c $(CFLAGS) msdos$(DIRSEP)msdos.c + +msdos_$(OBJ): msdos/msdos.c $(UNZIP_H) # DOS unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ msdos$(DIRSEP)msdos.c + +win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h version.h # Win32 only + $(CC) -c $(CFLAGS) win32$(DIRSEP)win32.c + +nt$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # Win32 only + $(CC) -c $(CFLAGS) win32$(DIRSEP)nt.c + +win32_$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # Win32 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ win32$(DIRSEP)win32.c + +nt_$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # Win32 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ win32$(DIRSEP)nt.c + +win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # Win32 funzip + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ win32$(DIRSEP)win32.c + +os2$(OBJ): os2/os2.c $(UNZIP_H) version.h # OS/2 only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)os2.c + +os2_$(OBJ): os2/os2.c $(UNZIP_H) # OS/2 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2$(DIRSEP)os2.c + +os2acl$(OBJ): os2/os2acl.c $(UNZIP_H) version.h # OS/2 only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)os2acl.c + +os2acl_$(OBJ): os2/os2acl.c $(UNZIP_H) version.h # OS/2 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2$(DIRSEP)os2acl.c + +rexxhelp$(OBJ): os2/rexxhelp.c # OS/2 DLL only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)rexxhelp.c + +rexxapi$(OBJ): os2/rexxapi.c # OS/2 DLL only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)rexxapi.c + +crc_i86$(OBJ): msdos/crc_i86.asm # 16bit only + $(AS) $(ASFLAGS) msdos$(AS_DIRSEP)crc_i86.asm $(ASEOL) + +crc_i386$(OBJ): win32/crc_i386.asm # 32bit, MASM + $(AS) $(ASFLAGS) win32$(AS_DIRSEP)crc_i386.asm $(ASEOL) + +crc_gcc$(OBJ): crc_i386.S # 32bit, GNU AS + $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S + +# NFLAGS are solely used as work-around for optimization bug in IBM C++ Set +crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h + $(CC) -c $(CFLAGS) $(DLLFLAG) $(NFLAGS) crypt.c + +cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only + $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ crypt.c + +crc32f$(OBJ): crc32.c $(UNZIP_H) zip.h # funzip only + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ crc32.c + +globalsf$(OBJ): globals.c $(UNZIP_H) # funzip only + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ globals.c + +inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c + +ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only + $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ ttyio.c + +crc32_$(OBJ): crc32.c $(UNZIP_H) zip.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crc32.c + +crctab_$(OBJ): crctab.c $(UNZIP_H) zip.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crctab.c + +crypt_$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crypt.c + +extract_$(OBJ): extract.c $(UNZIP_H) crypt.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ extract.c + +fileio_$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ fileio.c + +globals_$(OBJ): globals.c $(UNZIP_H) # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ globals.c + +inflate_$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ inflate.c + +match_$(OBJ): match.c $(UNZIP_H) # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ match.c + +process_$(OBJ): process.c $(UNZIP_H) # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ process.c + +ttyio_$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ ttyio.c + +unzipsf_$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.c diff --git a/utils/Install/packzip/match.c b/utils/Install/packzip/match.c new file mode 100644 index 0000000000..77355d4400 --- /dev/null +++ b/utils/Install/packzip/match.c @@ -0,0 +1,294 @@ +/*--------------------------------------------------------------------------- + + match.c + + The match() routine recursively compares a string to a "pattern" (regular + expression), returning TRUE if a match is found or FALSE if not. This + version is specifically for use with unzip.c: as did the previous match() + routines from SEA and J. Kercheval, it leaves the case (upper, lower, or + mixed) of the string alone, but converts any uppercase characters in the + pattern to lowercase if indicated by the global var pInfo->lcflag (which + is to say, string is assumed to have been converted to lowercase already, + if such was necessary). + + GRR: reversed order of text, pattern in matche() (now same as match()); + added ignore_case/ic flags, Case() macro. + + PaulK: replaced matche() with recmatch() from Zip, modified to have an + ignore_case argument; replaced test frame with simpler one. + + --------------------------------------------------------------------------- + + Copyright on recmatch() from Zip's util.c (although recmatch() was almost + certainly written by Mark Adler...ask me how I can tell :-) ): + + Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, Jean-loup Gailly, + Kai Uwe Rommel and Igor Mandrichenko. + + Permission is granted to any individual or institution to use, copy, + or redistribute this software so long as all of the original files are + included unmodified, that it is not sold for profit, and that this copy- + right notice is retained. + + --------------------------------------------------------------------------- + + Match the pattern (wildcard) against the string (fixed): + + match(string, pattern, ignore_case); + + returns TRUE if string matches pattern, FALSE otherwise. In the pattern: + + `*' matches any sequence of characters (zero or more) + `?' matches any single character + [SET] matches any character in the specified set, + [!SET] or [^SET] matches any character not in the specified set. + + A set is composed of characters or ranges; a range looks like ``character + hyphen character'' (as in 0-9 or A-Z). [0-9a-zA-Z_] is the minimal set of + characters allowed in the [..] pattern construct. Other characters are + allowed (i.e., 8-bit characters) if your system will support them. + + To suppress the special syntactic significance of any of ``[]*?!^-\'', in- + side or outside a [..] construct, and match the character exactly, precede + it with a ``\'' (backslash). + + Note that "*.*" and "*." are treated specially under MS-DOS if DOSWILD is + defined. See the DOSWILD section below for an explanation. Note also + that with VMSWILD defined, '%' is used instead of '?', and sets (ranges) + are delimited by () instead of []. + + ---------------------------------------------------------------------------*/ + + + +/* define ToLower() in here (for Unix, define ToLower to be macro (using + * isupper()); otherwise just use tolower() */ +#define UNZIP_INTERNAL +#include "unzip.h" + +#if 0 /* this is not useful until it matches Amiga names insensitively */ +#ifdef AMIGA /* some other platforms might also want to use this */ +# define ANSI_CHARSET /* MOVE INTO UNZIP.H EVENTUALLY */ +#endif +#endif /* 0 */ + +#ifdef ANSI_CHARSET +# ifdef ToLower +# undef ToLower +# endif + /* uppercase letters are values 41 thru 5A, C0 thru D6, and D8 thru DE */ +# define IsUpper(c) (c>=0xC0 ? c<=0xDE && c!=0xD7 : c>=0x41 && c<=0x5A) +# define ToLower(c) (IsUpper((uch) c) ? (unsigned) c | 0x20 : (unsigned) c) +#endif +#define Case(x) (ic? ToLower(x) : (x)) + +#ifdef VMSWILD +# define WILDCHAR '%' +# define BEG_RANGE '(' +# define END_RANGE ')' +#else +# define WILDCHAR '?' +# define BEG_RANGE '[' +# define END_RANGE ']' +#endif + +#if 0 /* GRR: add this to unzip.h someday... */ +#if !(defined(MSDOS) && defined(DOSWILD)) +#define match(s,p,ic) (recmatch((ZCONST uch *)p,(ZCONST uch *)s,ic) == 1) +int recmatch OF((ZCONST uch *pattern, ZCONST uch *string, int ignore_case)); +#endif +#endif /* 0 */ +static int recmatch OF((ZCONST uch *pattern, ZCONST uch *string, + int ignore_case)); + + + +/* match() is a shell to recmatch() to return only Boolean values. */ + +int match(string, pattern, ignore_case) + ZCONST char *string, *pattern; + int ignore_case; +{ +#if (defined(MSDOS) && defined(DOSWILD)) + char *dospattern; + int j = strlen(pattern); + +/*--------------------------------------------------------------------------- + Optional MS-DOS preprocessing section: compare last three chars of the + wildcard to "*.*" and translate to "*" if found; else compare the last + two characters to "*." and, if found, scan the non-wild string for dots. + If in the latter case a dot is found, return failure; else translate the + "*." to "*". In either case, continue with the normal (Unix-like) match + procedure after translation. (If not enough memory, default to normal + match.) This causes "a*.*" and "a*." to behave as MS-DOS users expect. + ---------------------------------------------------------------------------*/ + + if ((dospattern = (char *)malloc(j+1)) != NULL) { + strcpy(dospattern, pattern); + if (!strcmp(dospattern+j-3, "*.*")) { + dospattern[j-2] = '\0'; /* nuke the ".*" */ + } else if (!strcmp(dospattern+j-2, "*.")) { + char *p = strchr(string, '.'); + + if (p) { /* found a dot: match fails */ + free(dospattern); + return 0; + } + dospattern[j-1] = '\0'; /* nuke the end "." */ + } + j = recmatch((uch *)dospattern, (uch *)string, ignore_case); + free(dospattern); + return j == 1; + } else +#endif /* MSDOS && DOSWILD */ + return recmatch((uch *)pattern, (uch *)string, ignore_case) == 1; +} + + + +static int recmatch(p, s, ic) + ZCONST uch *p; /* sh pattern to match */ + ZCONST uch *s; /* string to which to match it */ + int ic; /* true for case insensitivity */ +/* Recursively compare the sh pattern p with the string s and return 1 if + * they match, and 0 or 2 if they don't or if there is a syntax error in the + * pattern. This routine recurses on itself no more deeply than the number + * of characters in the pattern. */ +{ + unsigned int c; /* pattern char or start of range in [-] loop */ + + /* Get first character, the pattern for new recmatch calls follows */ + c = *p++; + + /* If that was the end of the pattern, match if string empty too */ + if (c == 0) + return *s == 0; + + /* '?' (or '%') matches any character (but not an empty string) */ + if (c == WILDCHAR) + return *s ? recmatch(p, s + 1, ic) : 0; + + /* '*' matches any number of characters, including zero */ +#ifdef AMIGA + if (c == '#' && *p == '?') /* "#?" is Amiga-ese for "*" */ + c = '*', p++; +#endif /* AMIGA */ + if (c == '*') { + if (*p == 0) + return 1; + for (; *s; s++) + if ((c = recmatch(p, s, ic)) != 0) + return (int)c; + return 2; /* 2 means give up--match will return false */ + } + + /* Parse and process the list of characters and ranges in brackets */ + if (c == BEG_RANGE) { + int e; /* flag true if next char to be taken literally */ + ZCONST uch *q; /* pointer to end of [-] group */ + int r; /* flag true to match anything but the range */ + + if (*s == 0) /* need a character to match */ + return 0; + p += (r = (*p == '!' || *p == '^')); /* see if reverse */ + for (q = p, e = 0; *q; q++) /* find closing bracket */ + if (e) + e = 0; + else + if (*q == '\\') /* GRR: change to ^ for MS-DOS, OS/2? */ + e = 1; + else if (*q == END_RANGE) + break; + if (*q != END_RANGE) /* nothing matches if bad syntax */ + return 0; + for (c = 0, e = *p == '-'; p < q; p++) { /* go through the list */ + if (e == 0 && *p == '\\') /* set escape flag if \ */ + e = 1; + else if (e == 0 && *p == '-') /* set start of range if - */ + c = *(p-1); + else { + unsigned int cc = Case(*s); + + if (*(p+1) != '-') + for (c = c ? c : *p; c <= *p; c++) /* compare range */ + if ((unsigned)Case(c) == cc) /* typecast for MSC bug */ + return r ? 0 : recmatch(q + 1, s + 1, ic); + c = e = 0; /* clear range, escape flags */ + } + } + return r ? recmatch(q + 1, s + 1, ic) : 0; /* bracket match failed */ + } + + /* if escape ('\'), just compare next character */ + if (c == '\\' && (c = *p++) == 0) /* if \ at end, then syntax error */ + return 0; + + /* just a character--compare it */ +#ifdef QDOS + return QMatch(Case((uch)c), Case(*s)) ? recmatch(p, ++s, ic) : 0; +#else + return Case((uch)c) == Case(*s) ? recmatch(p, ++s, ic) : 0; +#endif + +} /* end function recmatch() */ + + + + + +int iswild(p) /* originally only used for stat()-bug workaround in */ + ZCONST char *p; /* VAX C, Turbo/Borland C, Watcom C, Atari MiNT libs; */ +{ /* now used in process_zipfiles() as well */ + for (; *p; ++p) + if (*p == '\\' && *(p+1)) + ++p; +#ifdef VMS + else if (*p == '%' || *p == '*') +#else /* !VMS */ +#ifdef AMIGA + else if (*p == '?' || *p == '*' || (*p=='#' && p[1]=='?') || *p == '[') +#else /* !AMIGA */ + else if (*p == '?' || *p == '*' || *p == '[') +#endif /* ?AMIGA */ +#endif /* ?VMS */ +#ifdef QDOS + return (int)p; +#else + return TRUE; +#endif + + return FALSE; + +} /* end function iswild() */ + + + + + +#ifdef TEST_MATCH + +#define put(s) {fputs(s,stdout); fflush(stdout);} + +void main() +{ + char pat[256], str[256]; + + for (;;) { + put("Pattern (return to exit): "); + gets(pat); + if (!pat[0]) + break; + for (;;) { + put("String (return for new pattern): "); + gets(str); + if (!str[0]) + break; + pipeit("Case sensitive: %s insensitive: %s\n", + match(str, pat, 0) ? "YES" : "NO", + match(str, pat, 1) ? "YES" : "NO"); + } + } + EXIT(0); +} + +#endif /* TEST_MATCH */ diff --git a/utils/Install/packzip/nt.c b/utils/Install/packzip/nt.c new file mode 100644 index 0000000000..ab4cea3a9f --- /dev/null +++ b/utils/Install/packzip/nt.c @@ -0,0 +1,659 @@ +/* + + Copyright (c) 1996 Scott Field + + Module Name: + + nt.c + + Abstract: + + This module implements WinNT security descriptor operations for the + Win32 Info-ZIP project. Operation such as setting file security, + using/querying local and remote privileges, and queuing of operations + is performed here. The contents of this module are only relevant + when the code is running on Windows NT, and the target volume supports + persistent Acl storage. + + User privileges that allow accessing certain privileged aspects of the + security descriptor (such as the Sacl) are only used if the user specified + to do so. + + Author: + + Scott Field (sfield@microsoft.com) + + Last revised: 18 Jan 97 + + */ + +#define WIN32_LEAN_AND_MEAN +#define UNZIP_INTERNAL +#include "unzip.h" +#include +#ifdef __RSXNT__ +# include "rsxntwin.h" +#endif +#include "nt.h" + + +#ifdef NTSD_EAS /* This file is only needed for NTSD handling */ + +/* Borland C++ does not define FILE_SHARE_DELETE. Others also? */ +#ifndef FILE_SHARE_DELETE +# define FILE_SHARE_DELETE 0x00000004 +#endif + + +/* private prototypes */ + +static BOOL Initialize(VOID); +#if 0 /* currently unused */ +static BOOL Shutdown(VOID); +#endif +static BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer); +static VOID GetRemotePrivilegesSet(CHAR *FileName, PDWORD dwRemotePrivileges); +static VOID InitLocalPrivileges(VOID); + + +BOOL bInitialized = FALSE; /* module level stuff initialized? */ +HANDLE hInitMutex = NULL; /* prevent multiple initialization */ + +BOOL g_bRestorePrivilege = FALSE; /* for local set file security override */ +BOOL g_bSaclPrivilege = FALSE; /* for local set sacl operations, only when + restore privilege not present */ + +/* our single cached volume capabilities structure that describes the last + volume root we encountered. A single entry like this works well in the + zip/unzip scenario for a number of reasons: + 1. typically one extraction path during unzip. + 2. typically process one volume at a time during zip, and then move + on to the next. + 3. no cleanup code required and no memory leaks. + 4. simple code. + + This approach should be reworked to a linked list approach if we expect to + be called by many threads which are processing a variety of input/output + volumes, since lock contention and stale data may become a bottleneck. */ + +VOLUMECAPS g_VolumeCaps; +CRITICAL_SECTION VolumeCapsLock; + + +/* our deferred set structure linked list element, used for making a copy + of input data which is used at a later time to process the original input + at a time when it makes more sense. eg, applying security to newly created + directories, after all files have been placed in such directories. */ + +CRITICAL_SECTION SetDeferLock; + +typedef struct _DEFERRED_SET { + struct _DEFERRED_SET *Next; + uch *buffer; /* must point to DWORD aligned block */ + PVOLUMECAPS VolumeCaps; + char *resource; +} DEFERRED_SET, *PDEFERRED_SET, *LPDEFERRED_SET; + +PDEFERRED_SET pSetHead = NULL; +PDEFERRED_SET pSetTail; + +static BOOL Initialize(VOID) +{ + HANDLE hMutex; + HANDLE hOldMutex; + + if(bInitialized) return TRUE; + + hMutex = CreateMutex(NULL, TRUE, NULL); + if(hMutex == NULL) return FALSE; + + hOldMutex = (HANDLE)InterlockedExchange((LPLONG)&hInitMutex, (LONG)hMutex); + + if(hOldMutex != NULL) { + /* somebody setup the mutex already */ + InterlockedExchange((LPLONG)&hInitMutex, (LONG)hOldMutex); + + CloseHandle(hMutex); /* close new, un-needed mutex */ + + /* wait for initialization to complete and return status */ + WaitForSingleObject(hOldMutex, INFINITE); + ReleaseMutex(hOldMutex); + + return bInitialized; + } + + /* initialize module level resources */ + + InitializeCriticalSection( &SetDeferLock ); + + InitializeCriticalSection( &VolumeCapsLock ); + memset(&g_VolumeCaps, 0, sizeof(VOLUMECAPS)); + + InitLocalPrivileges(); + + bInitialized = TRUE; + + ReleaseMutex(hMutex); /* release correct mutex */ + + return TRUE; +} + +#if 0 /* currently not used ! */ +static BOOL Shutdown(VOID) +{ + /* really need to free critical sections, disable enabled privilges, etc, + but doing so brings up possibility of race conditions if those resources + are about to be used. The easiest way to handle this is let these + resources be freed when the process terminates... */ + + return TRUE; +} +#endif /* never */ + + +static BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer) +{ + PDEFERRED_SET psd; + DWORD cbDeferSet; + DWORD cbResource; + DWORD cbBuffer; + + if(!bInitialized) if(!Initialize()) return FALSE; + + cbResource = lstrlenA(resource) + 1; + cbBuffer = GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)buffer); + cbDeferSet = sizeof(DEFERRED_SET) + cbBuffer + sizeof(VOLUMECAPS) + + cbResource; + + psd = (PDEFERRED_SET)HeapAlloc(GetProcessHeap(), 0, cbDeferSet); + if(psd == NULL) return FALSE; + + psd->Next = NULL; + psd->buffer = (uch *)(psd+1); + psd->VolumeCaps = (PVOLUMECAPS)((char *)psd->buffer + cbBuffer); + psd->resource = (char *)((char *)psd->VolumeCaps + sizeof(VOLUMECAPS)); + + memcpy(psd->buffer, buffer, cbBuffer); + memcpy(psd->VolumeCaps, VolumeCaps, sizeof(VOLUMECAPS)); + psd->VolumeCaps->bProcessDefer = TRUE; + memcpy(psd->resource, resource, cbResource); + + /* take defer lock */ + EnterCriticalSection( &SetDeferLock ); + + /* add element at tail of list */ + + if(pSetHead == NULL) { + pSetHead = psd; + } else { + pSetTail->Next = psd; + } + + pSetTail = psd; + + /* release defer lock */ + LeaveCriticalSection( &SetDeferLock ); + + return TRUE; +} + +BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed, + PDWORD dwDirectoryFail, PDWORD dwBytesFail) +{ + PDEFERRED_SET This; + PDEFERRED_SET Next; + + *dwDirectoryCount = 0; + *dwBytesProcessed = 0; + + *dwDirectoryFail = 0; + *dwBytesFail = 0; + + if(!bInitialized) return TRUE; /* nothing to do */ + + EnterCriticalSection( &SetDeferLock ); + + This = pSetHead; + + while(This) { + + if(SecuritySet(This->resource, This->VolumeCaps, This->buffer)) { + (*dwDirectoryCount)++; + *dwBytesProcessed += + GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer); + } else { + (*dwDirectoryFail)++; + *dwBytesFail += + GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer); + } + + Next = This->Next; + HeapFree(GetProcessHeap(), 0, This); + This = Next; + } + + pSetHead = NULL; + + LeaveCriticalSection( &SetDeferLock ); + + return TRUE; +} + +BOOL ValidateSecurity(uch *securitydata) +{ + PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)securitydata; + PACL pAcl; + PSID pSid; + BOOL bAclPresent; + BOOL bDefaulted; + + if(!IsWinNT()) return TRUE; /* don't do anything if not on WinNT */ + + if(!IsValidSecurityDescriptor(sd)) return FALSE; + + /* verify Dacl integrity */ + + if(!GetSecurityDescriptorDacl(sd, &bAclPresent, &pAcl, &bDefaulted)) + return FALSE; + + if(bAclPresent) { + if(!IsValidAcl(pAcl)) return FALSE; + } + + /* verify Sacl integrity */ + + if(!GetSecurityDescriptorSacl(sd, &bAclPresent, &pAcl, &bDefaulted)) + return FALSE; + + if(bAclPresent) { + if(!IsValidAcl(pAcl)) return FALSE; + } + + /* verify owner integrity */ + + if(!GetSecurityDescriptorOwner(sd, &pSid, &bDefaulted)) + return FALSE; + + if(pSid != NULL) { + if(!IsValidSid(pSid)) return FALSE; + } + + /* verify group integrity */ + + if(!GetSecurityDescriptorGroup(sd, &pSid, &bDefaulted)) + return FALSE; + + if(pSid != NULL) { + if(!IsValidSid(pSid)) return FALSE; + } + + return TRUE; +} + +static VOID GetRemotePrivilegesSet(char *FileName, PDWORD dwRemotePrivileges) +{ + HANDLE hFile; + + *dwRemotePrivileges = 0; + + /* see if we have the SeRestorePrivilege */ + + hFile = CreateFileA( + FileName, + ACCESS_SYSTEM_SECURITY | WRITE_DAC | WRITE_OWNER | READ_CONTROL, + FILE_SHARE_READ | FILE_SHARE_DELETE, /* no sd updating allowed here */ + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + NULL + ); + + if(hFile != INVALID_HANDLE_VALUE) { + /* no remote way to determine SeRestorePrivilege -- just try a + read/write to simulate it */ + SECURITY_INFORMATION si = DACL_SECURITY_INFORMATION | + SACL_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION; + PSECURITY_DESCRIPTOR sd; + DWORD cbBuf = 0; + + GetKernelObjectSecurity(hFile, si, NULL, cbBuf, &cbBuf); + + if(ERROR_INSUFFICIENT_BUFFER == GetLastError()) { + if((sd = HeapAlloc(GetProcessHeap(), 0, cbBuf)) != NULL) { + if(GetKernelObjectSecurity(hFile, si, sd, cbBuf, &cbBuf)) { + if(SetKernelObjectSecurity(hFile, si, sd)) + *dwRemotePrivileges |= OVERRIDE_RESTORE; + } + HeapFree(GetProcessHeap(), 0, sd); + } + } + + CloseHandle(hFile); + } else { + + /* see if we have the SeSecurityPrivilege */ + /* note we don't need this if we have SeRestorePrivilege */ + + hFile = CreateFileA( + FileName, + ACCESS_SYSTEM_SECURITY, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, /* max */ + NULL, + OPEN_EXISTING, + 0, + NULL + ); + + if(hFile != INVALID_HANDLE_VALUE) { + CloseHandle(hFile); + *dwRemotePrivileges |= OVERRIDE_SACL; + } + } +} + + +BOOL GetVolumeCaps( + char *rootpath, /* filepath, or NULL */ + char *name, /* filename associated with rootpath */ + PVOLUMECAPS VolumeCaps /* result structure describing capabilities */ + ) +{ + char TempRootPath[MAX_PATH + 1]; + DWORD cchTempRootPath = 0; + BOOL bSuccess = TRUE; /* assume success until told otherwise */ + + if(!bInitialized) if(!Initialize()) return FALSE; + + /* process the input path to produce a consistent path suitable for + compare operations and also suitable for certain picky Win32 API + that don't like forward slashes */ + + if(rootpath != NULL && rootpath[0] != '\0') { + DWORD i; + + cchTempRootPath = lstrlen(rootpath); + if(cchTempRootPath > MAX_PATH) return FALSE; + + /* copy input, converting forward slashes to back slashes as we go */ + + for(i = 0 ; i <= cchTempRootPath ; i++) { + if(rootpath[i] == '/') TempRootPath[i] = '\\'; + else TempRootPath[i] = rootpath[i]; + } + + /* check for UNC and Null terminate or append trailing \ as + appropriate */ + + /* possible valid UNCs we are passed follow: + \\machine\foo\bar (path is \\machine\foo\) + \\machine\foo (path is \\machine\foo\) + \\machine\foo\ + \\.\c$\ (FIXFIX: Win32API doesn't like this - GetComputerName()) + LATERLATER: handling mounted DFS drives in the future will require + slightly different logic which isn't available today. + This is required because directories can point at + different servers which have differing capabilities. + */ + + if(TempRootPath[0] == '\\' && TempRootPath[1] == '\\') { + DWORD slash = 0; + + for(i = 2 ; i < cchTempRootPath ; i++) { + if(TempRootPath[i] == '\\') { + slash++; + + if(slash == 2) { + i++; + TempRootPath[i] = '\0'; + cchTempRootPath = i; + break; + } + } + } + + /* if there was only one slash found, just tack another onto the + end */ + + if(slash == 1 && TempRootPath[cchTempRootPath] != '\\') { + TempRootPath[cchTempRootPath] = TempRootPath[0]; /* '\' */ + TempRootPath[cchTempRootPath+1] = '\0'; + cchTempRootPath++; + } + + } else { + + if(TempRootPath[1] == ':') { + + /* drive letter specified, truncate to root */ + TempRootPath[2] = '\\'; + TempRootPath[3] = '\0'; + cchTempRootPath = 3; + } else { + + /* must be file on current drive */ + TempRootPath[0] = '\0'; + cchTempRootPath = 0; + } + + } + + } /* if path != NULL */ + + /* grab lock protecting cached entry */ + EnterCriticalSection( &VolumeCapsLock ); + + if(!g_VolumeCaps.bValid || + lstrcmpi(g_VolumeCaps.RootPath, TempRootPath) != 0) + { + + /* no match found, build up new entry */ + + DWORD dwFileSystemFlags; + DWORD dwRemotePrivileges = 0; + BOOL bRemote = FALSE; + + /* release lock during expensive operations */ + LeaveCriticalSection( &VolumeCapsLock ); + + bSuccess = GetVolumeInformation( + (TempRootPath[0] == '\0') ? NULL : TempRootPath, + NULL, 0, + NULL, NULL, + &dwFileSystemFlags, + NULL, 0); + + + /* only if target volume supports Acls, and we were told to use + privileges do we need to go out and test for the remote case */ + + if(bSuccess && (dwFileSystemFlags & FS_PERSISTENT_ACLS) && + VolumeCaps->bUsePrivileges) + { + if(GetDriveType( (TempRootPath[0] == '\0') ? NULL : TempRootPath ) + == DRIVE_REMOTE) + { + bRemote = TRUE; + + /* make a determination about our remote capabilities */ + + GetRemotePrivilegesSet(name, &dwRemotePrivileges); + } + } + + /* always take the lock again, since we release it below */ + EnterCriticalSection( &VolumeCapsLock ); + + /* replace the existing data if successful */ + if(bSuccess) { + + lstrcpynA(g_VolumeCaps.RootPath, TempRootPath, cchTempRootPath+1); + g_VolumeCaps.bProcessDefer = FALSE; + g_VolumeCaps.dwFileSystemFlags = dwFileSystemFlags; + g_VolumeCaps.bRemote = bRemote; + g_VolumeCaps.dwRemotePrivileges = dwRemotePrivileges; + g_VolumeCaps.bValid = TRUE; + } + } + + if(bSuccess) { + /* copy input elements */ + g_VolumeCaps.bUsePrivileges = VolumeCaps->bUsePrivileges; + g_VolumeCaps.dwFileAttributes = VolumeCaps->dwFileAttributes; + + /* give caller results */ + memcpy(VolumeCaps, &g_VolumeCaps, sizeof(VOLUMECAPS)); + } else { + g_VolumeCaps.bValid = FALSE; + } + + LeaveCriticalSection( &VolumeCapsLock ); /* release lock */ + + return bSuccess; +} + + +BOOL SecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata) +{ + HANDLE hFile; + DWORD dwDesiredAccess = 0; + DWORD dwFlags = 0; + PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)securitydata; + SECURITY_DESCRIPTOR_CONTROL sdc; + SECURITY_INFORMATION RequestedInfo = 0; + DWORD dwRev; + BOOL bRestorePrivilege = FALSE; + BOOL bSaclPrivilege = FALSE; + BOOL bSuccess; + + if(!bInitialized) if(!Initialize()) return FALSE; + + /* defer directory processing */ + + if(VolumeCaps->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + if(!VolumeCaps->bProcessDefer) { + return DeferSet(resource, VolumeCaps, securitydata); + } else { + /* opening a directory requires FILE_FLAG_BACKUP_SEMANTICS */ + dwFlags |= FILE_FLAG_BACKUP_SEMANTICS; + } + } + + /* evaluate the input security desriptor and act accordingly */ + + if(!IsValidSecurityDescriptor(sd)) + return FALSE; + + if(!GetSecurityDescriptorControl(sd, &sdc, &dwRev)) + return FALSE; + + /* setup privilege usage based on if told we can use privileges, and if so, + what privileges we have */ + + if(VolumeCaps->bUsePrivileges) { + if(VolumeCaps->bRemote) { + /* use remotely determined privileges */ + if(VolumeCaps->dwRemotePrivileges & OVERRIDE_RESTORE) + bRestorePrivilege = TRUE; + + if(VolumeCaps->dwRemotePrivileges & OVERRIDE_SACL) + bSaclPrivilege = TRUE; + + } else { + /* use local privileges */ + bRestorePrivilege = g_bRestorePrivilege; + bSaclPrivilege = g_bSaclPrivilege; + } + } + + + /* if a Dacl is present write Dacl out */ + /* if we have SeRestorePrivilege, write owner and group info out */ + + if(sdc & SE_DACL_PRESENT) { + dwDesiredAccess |= WRITE_DAC; + RequestedInfo |= DACL_SECURITY_INFORMATION; + + if(bRestorePrivilege) { + dwDesiredAccess |= WRITE_OWNER; + RequestedInfo |= (OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION); + } + } + + /* if a Sacl is present and we have either SeRestorePrivilege or + SeSystemSecurityPrivilege try to write Sacl out */ + + if((sdc & SE_SACL_PRESENT) && (bRestorePrivilege || bSaclPrivilege)) { + dwDesiredAccess |= ACCESS_SYSTEM_SECURITY; + RequestedInfo |= SACL_SECURITY_INFORMATION; + } + + if(RequestedInfo == 0) /* nothing to do */ + return FALSE; + + if(bRestorePrivilege) + dwFlags |= FILE_FLAG_BACKUP_SEMANTICS; + + hFile = CreateFileA( + resource, + dwDesiredAccess, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,/* max sharing */ + NULL, + OPEN_EXISTING, + dwFlags, + NULL + ); + + if(hFile == INVALID_HANDLE_VALUE) + return FALSE; + + bSuccess = SetKernelObjectSecurity(hFile, RequestedInfo, sd); + + CloseHandle(hFile); + + return bSuccess; +} + +static VOID InitLocalPrivileges(VOID) +{ + HANDLE hToken; + TOKEN_PRIVILEGES tp; + + /* try to enable some interesting privileges that give us the ability + to get some security information that we normally cannot. + + note that enabling privileges is only relevant on the local machine; + when accessing files that are on a remote machine, any privileges + that are present on the remote machine get enabled by default. */ + + if(!OpenProcessToken(GetCurrentProcess(), + TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, &hToken)) + return; + + tp.PrivilegeCount = 1; + tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + + if(LookupPrivilegeValue(NULL, SE_RESTORE_NAME, &tp.Privileges[0].Luid)) { + + /* try to enable SeRestorePrivilege; if this succeeds, we can write + all aspects of the security descriptor */ + + if(AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) && + GetLastError() == ERROR_SUCCESS) g_bRestorePrivilege = TRUE; + + } + + /* try to enable SeSystemSecurityPrivilege, if SeRestorePrivilege not + present; if this succeeds, we can write the Sacl */ + + if(!g_bRestorePrivilege && + LookupPrivilegeValue(NULL, SE_SECURITY_NAME, &tp.Privileges[0].Luid)) { + + if(AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) && + GetLastError() == ERROR_SUCCESS) g_bSaclPrivilege = TRUE; + } + + CloseHandle(hToken); +} +#endif /* NTSD_EAS */ diff --git a/utils/Install/packzip/os2.c b/utils/Install/packzip/os2.c new file mode 100644 index 0000000000..a9a962796c --- /dev/null +++ b/utils/Install/packzip/os2.c @@ -0,0 +1,2187 @@ +/*--------------------------------------------------------------------------- + + os2.c + + OS/2-specific routines for use with Info-ZIP's UnZip 5.1 and later. + + This file contains the OS/2 versions of the file name/attribute/time/etc + code. Most or all of the routines which make direct use of OS/2 system + calls (i.e., the non-lowercase routines) are Kai Uwe Rommel's. The read- + dir() suite was written by Michael Rendell and ported to OS/2 by Kai Uwe; + it is in the public domain. + + Contains: GetCountryInfo() + GetFileTime() + SetFileTime() (TIMESTAMP only) + stamp_file() (TIMESTAMP only) + Utime2DosDateTime() + SetPathAttrTimes() + SetEAs() + GetLoadPath() + opendir() + closedir() + readdir() + [ seekdir() ] not used + [ telldir() ] not used + free_dircontents() + getdirent() + IsFileSystemFAT() + do_wild() + mapattr() + mapname() + checkdir() + isfloppy() + IsFileNameValid() + map2fat() + SetLongNameEA() + close_outfile() + check_for_newer() + dateformat() + version() + InitNLS() + IsUpperNLS() + ToLowerNLS() + StringLower() + DebugMalloc() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#include "os2acl.h" + +extern ZCONST char Far TruncEAs[]; + +/* local prototypes */ + +#ifdef TIMESTAMP + static int SetFileTime(ZCONST char *name, ulg stamp); +#endif +#if defined(USE_EF_UT_TIME) || defined(TIMESTAMP) + static ulg Utime2DosDateTime OF((time_t uxtime)); +#endif +static int getOS2filetimes OF((__GPRO__ + ulg *pM_dt, ulg *pA_dt, ulg *pC_dt)); +static void SetPathAttrTimes OF((__GPRO__ int flags, int dir)); +static int SetEAs OF((__GPRO__ const char *path, + void *ef_block)); +static int SetACL OF((__GPRO__ const char *path, + void *ef_block)); +static int EvalExtraFields OF((__GPRO__ const char *path, + void *extra_field, unsigned ef_len)); +static int isfloppy OF((int nDrive)); +static int IsFileNameValid OF((const char *name)); +static void map2fat OF((char *pathcomp, char **pEndFAT)); +static int SetLongNameEA OF((char *name, char *longname)); +static void InitNLS OF((void)); + + +/*****************************/ +/* Strings used in os2.c */ +/*****************************/ + +#ifndef SFX + static char Far CantAllocateWildcard[] = + "warning: cannot allocate wildcard buffers\n"; +#endif +static char Far Creating[] = " creating: %-22s "; +static char Far ConversionFailed[] = "mapname: conversion of %s failed\n"; +static char Far Labelling[] = "labelling %c: %-22s\n"; +static char Far ErrSetVolLabel[] = "mapname: error setting volume label\n"; +static char Far PathTooLong[] = "checkdir error: path too long: %s\n"; +static char Far CantCreateDir[] = "checkdir error: cannot create %s\n\ + unable to process %s.\n"; +static char Far DirIsntDirectory[] = + "checkdir error: %s exists but is not directory\n\ + unable to process %s.\n"; +static char Far PathTooLongTrunc[] = + "checkdir warning: path too long; truncating\n %s\n\ + -> %s\n"; +#if (!defined(SFX) || defined(SFX_EXDIR)) + static char Far CantCreateExtractDir[] = + "checkdir: cannot create extraction directory: %s\n"; +#endif + +#ifndef __EMX__ +# if (_MSC_VER >= 600) || defined(__IBMC__) +# include /* have special MSC/IBM C mkdir prototype */ +# else /* own prototype because dir.h conflicts? */ + int mkdir(const char *path); +# endif +# define MKDIR(path,mode) mkdir(path) +#else +# define MKDIR(path,mode) mkdir(path,mode) +#endif + + +#ifdef __32BIT__ + +USHORT DosDevIOCtl32(PVOID pData, USHORT cbData, PVOID pParms, USHORT cbParms, + USHORT usFunction, USHORT usCategory, HFILE hDevice) +{ + ULONG ulParmLengthInOut = cbParms, ulDataLengthInOut = cbData; + return (USHORT) DosDevIOCtl(hDevice, usCategory, usFunction, + pParms, cbParms, &ulParmLengthInOut, + pData, cbData, &ulDataLengthInOut); +} + +# define DosDevIOCtl DosDevIOCtl32 +#else +# define DosDevIOCtl DosDevIOCtl2 +#endif + + +typedef struct +{ + ush nID; + ush nSize; + ulg lSize; +} +EFHEADER, *PEFHEADER; + + +#ifdef __32BIT__ + +#define DosFindFirst(p1, p2, p3, p4, p5, p6) \ + DosFindFirst(p1, p2, p3, p4, p5, p6, 1) + +#else + +typedef struct +{ + ULONG oNextEntryOffset; + BYTE fEA; + BYTE cbName; + USHORT cbValue; + CHAR szName[1]; +} +FEA2, *PFEA2; + +typedef struct +{ + ULONG cbList; + FEA2 list[1]; +} +FEA2LIST, *PFEA2LIST; + +#define DosQueryCurrentDisk DosQCurDisk +#define DosQueryFSAttach(p1, p2, p3, p4, p5) \ + DosQFSAttach(p1, p2, p3, p4, p5, 0) +#define DosEnumAttribute(p1, p2, p3, p4, p5, p6, p7) \ + DosEnumAttribute(p1, p2, p3, p4, p5, p6, p7, 0) +#define DosFindFirst(p1, p2, p3, p4, p5, p6) \ + DosFindFirst(p1, p2, p3, p4, p5, p6, 0) +#define DosMapCase DosCaseMap +#define DosSetPathInfo(p1, p2, p3, p4, p5) \ + DosSetPathInfo(p1, p2, p3, p4, p5, 0) +#define DosQueryPathInfo(p1, p2, p3, p4) \ + DosQPathInfo(p1, p2, p3, p4, 0) +#define DosQueryFileInfo DosQFileInfo +#define DosMapCase DosCaseMap +#define DosQueryCtryInfo DosGetCtryInfo + +#endif /* !__32BIT__ */ + + + + + +/* + * @(#) dir.h 1.4 87/11/06 Public Domain. + */ + +#define A_RONLY 0x01 +#define A_HIDDEN 0x02 +#define A_SYSTEM 0x04 +#define A_LABEL 0x08 +#define A_DIR 0x10 +#define A_ARCHIVE 0x20 + + +const int attributes = A_DIR | A_HIDDEN | A_SYSTEM; + + +extern DIR *opendir(__GPRO__ ZCONST char *); +extern struct direct *readdir(__GPRO__ DIR *); +extern void seekdir(DIR *, long); +extern long telldir(DIR *); +extern void closedir(DIR *); +#define rewinddir(dirp) seekdir(dirp, 0L) + +int IsFileSystemFAT(__GPRO__ ZCONST char *dir); +char *StringLower(char *szArg); + + + + +/* + * @(#)dir.c 1.4 87/11/06 Public Domain. + */ + + +#ifndef S_IFMT +# define S_IFMT 0xF000 +#endif + + +#ifndef SFX + static char *getdirent(__GPRO__ ZCONST char *); + static void free_dircontents(struct _dircontents *); +#endif /* !SFX */ + + + + +int GetCountryInfo(void) +{ + COUNTRYINFO ctryi; + COUNTRYCODE ctryc; +#ifdef __32BIT__ + ULONG cbInfo; +#else + USHORT cbInfo; +#endif + + ctryc.country = ctryc.codepage = 0; + + if ( DosQueryCtryInfo(sizeof(ctryi), &ctryc, &ctryi, &cbInfo) != NO_ERROR ) + return 0; + + return ctryi.fsDateFmt; +} + + +long GetFileTime(ZCONST char *name) +{ +#ifdef __32BIT__ + FILESTATUS3 fs; +#else + FILESTATUS fs; +#endif + USHORT nDate, nTime; + + if ( DosQueryPathInfo((PSZ) name, 1, (PBYTE) &fs, sizeof(fs)) ) + return -1; + + nDate = * (USHORT *) &fs.fdateLastWrite; + nTime = * (USHORT *) &fs.ftimeLastWrite; + + return ((ULONG) nDate) << 16 | nTime; +} + + +#ifdef TIMESTAMP + +static int SetFileTime(ZCONST char *name, ulg stamp) /* swiped from Zip */ +{ + FILESTATUS fs; + USHORT fd, ft; + + if (DosQueryPathInfo((PSZ) name, FIL_STANDARD, (PBYTE) &fs, sizeof(fs))) + return -1; + + fd = (USHORT) (stamp >> 16); + ft = (USHORT) stamp; + fs.fdateLastWrite = fs.fdateCreation = * (FDATE *) &fd; + fs.ftimeLastWrite = fs.ftimeCreation = * (FTIME *) &ft; + + if (DosSetPathInfo((PSZ) name, FIL_STANDARD, (PBYTE) &fs, sizeof(fs), 0)) + return -1; + + return 0; +} + + +int stamp_file(ZCONST char *fname, time_t modtime) +{ + return SetFileTime(fname, Utime2DosDateTime(modtime)); +} + +#endif /* TIMESTAMP */ + + +/* The following DOS date/time structures are machine-dependent as they + * assume "little-endian" byte order. For OS/2-specific code, which + * is run on x86 CPUs (or emulators?), this assumption is valid; but + * care should be taken when using this code as template for other ports. + */ +typedef union { + ULONG timevalue; /* combined value, useful for comparisons */ + struct { + FTIME ft; /* system file time record: + * USHORT twosecs : 5 + * USHORT minutes : 6; + * USHORT hours : 5; */ + FDATE fd; /* system file date record: + * USHORT day : 5 + * USHORT month : 4; + * USHORT year : 7; */ + } _fdt; +} F_DATE_TIME, *PF_DATE_TIME; + + +#if defined(USE_EF_UT_TIME) || defined(TIMESTAMP) + +static ulg Utime2DosDateTime(uxtime) + time_t uxtime; +{ + F_DATE_TIME dosfiletime; + struct tm *t; + + /* round up to even seconds */ + /* round up (down if "up" overflows) to even seconds */ + if (((ulg)uxtime) & 1) + uxtime = (uxtime + 1 > uxtime) ? uxtime + 1 : uxtime - 1; + + t = localtime(&(uxtime)); + if (t == (struct tm *)NULL) { + /* time conversion error; use current time instead, hoping + that localtime() does not reject it as well! */ + time_t now = time(NULL); + t = localtime(&now); + } + if (t->tm_year < 80) { + dosfiletime._fdt.ft.twosecs = 0; + dosfiletime._fdt.ft.minutes = 0; + dosfiletime._fdt.ft.hours = 0; + dosfiletime._fdt.fd.day = 1; + dosfiletime._fdt.fd.month = 1; + dosfiletime._fdt.fd.year = 0; + } else { + dosfiletime._fdt.ft.twosecs = t->tm_sec >> 1; + dosfiletime._fdt.ft.minutes = t->tm_min; + dosfiletime._fdt.ft.hours = t->tm_hour; + dosfiletime._fdt.fd.day = t->tm_mday; + dosfiletime._fdt.fd.month = t->tm_mon + 1; + dosfiletime._fdt.fd.year = t->tm_year - 80; + } + return dosfiletime.timevalue; + +} /* end function Utime2DosDateTime() */ + +#endif /* USE_EF_UT_TIME || TIMESTAMP */ + + +static int getOS2filetimes(__GPRO__ ulg *pM_dt, ulg *pA_dt, ulg *pC_dt) +{ +#ifdef USE_EF_UT_TIME + unsigned eb_izux_flg; + iztimes z_utime; +#endif + + /* Copy and/or convert time and date variables, if necessary; */ + /* return a flag indicating which time stamps are available. */ +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + ((eb_izux_flg = ef_scan_for_izux(G.extra_field, + G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, + &z_utime, NULL)) & EB_UT_FL_MTIME)) + { + TTrace((stderr, "getOS2filetimes: UT e.f. modif. time = %lu\n", + z_utime.mtime)); + *pM_dt = Utime2DosDateTime(z_utime.mtime); + if (eb_izux_flg & EB_UT_FL_ATIME) { + TTrace((stderr, "getOS2filetimes: UT e.f. access time = %lu\n", + z_utime.atime)); + *pA_dt = Utime2DosDateTime(z_utime.atime); + } + if (eb_izux_flg & EB_UT_FL_CTIME) { + TTrace((stderr, "getOS2filetimes: UT e.f. creation time = %lu\n", + z_utime.ctime)); + *pC_dt = Utime2DosDateTime(z_utime.ctime); + } else { + /* no creation time value supplied, set it to modification time */ + *pC_dt = *pM_dt; + eb_izux_flg |= EB_UT_FL_CTIME; + } + return (int)eb_izux_flg; + } +#endif /* USE_EF_UT_TIME */ + *pC_dt = *pM_dt = G.lrec.last_mod_dos_datetime; + TTrace((stderr, "\ngetOS2filetimes: DOS dir modific./creation time = %lu\n", + *pM_dt)); + return (EB_UT_FL_MTIME | EB_UT_FL_CTIME); +} + + +static void SetPathAttrTimes(__GPRO__ int flags, int dir) +{ + HFILE hFile; +#ifdef __32BIT__ + ULONG nAction; +#else + USHORT nAction; +#endif + FILESTATUS fs; + USHORT nLength; + char szName[CCHMAXPATH]; + ulg Mod_dt, Acc_dt, Cre_dt; + int gotTimes; + + strcpy(szName, G.filename); + nLength = strlen(szName); + if (szName[nLength - 1] == '/') + szName[nLength - 1] = 0; + + if (dir) + { + if ( DosQueryPathInfo(szName, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)) ) + return; + } + else + { + /* for regular files, open them and operate on the file handle, to + work around certain network operating system bugs ... */ + + if ( DosOpen(szName, &hFile, &nAction, 0, 0, + OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW, + OPEN_SHARE_DENYREADWRITE | OPEN_ACCESS_READWRITE, 0) ) + return; + + if ( DosQueryFileInfo(hFile, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)) ) + return; + } + + /* set date/time stamps */ + gotTimes = getOS2filetimes(__G__ &Mod_dt, &Acc_dt, &Cre_dt); + if (gotTimes & EB_UT_FL_MTIME) { + fs.fdateLastWrite = ((F_DATE_TIME *)&Mod_dt)->_fdt.fd; + fs.ftimeLastWrite = ((F_DATE_TIME *)&Mod_dt)->_fdt.ft; + } + if (gotTimes & EB_UT_FL_ATIME) { + fs.fdateLastAccess = ((F_DATE_TIME *)&Acc_dt)->_fdt.fd; + fs.ftimeLastAccess = ((F_DATE_TIME *)&Acc_dt)->_fdt.ft; + } + if (gotTimes & EB_UT_FL_CTIME) { + fs.fdateCreation = ((F_DATE_TIME *)&Cre_dt)->_fdt.fd; + fs.ftimeCreation = ((F_DATE_TIME *)&Cre_dt)->_fdt.ft; + } + + if ( flags != -1 ) + fs.attrFile = flags; /* hidden, system, archive, read-only */ + + if (dir) + { + DosSetPathInfo(szName, FIL_STANDARD, (PBYTE) &fs, sizeof(fs), 0); + } + else + { + DosSetFileInfo(hFile, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)); + DosClose(hFile); + } +} + + +typedef struct +{ + ULONG cbList; /* length of value + 22 */ +#ifdef __32BIT__ + ULONG oNext; +#endif + BYTE fEA; /* 0 */ + BYTE cbName; /* length of ".LONGNAME" = 9 */ + USHORT cbValue; /* length of value + 4 */ + BYTE szName[10]; /* ".LONGNAME" */ + USHORT eaType; /* 0xFFFD for length-preceded ASCII */ + USHORT eaSize; /* length of value */ + BYTE szValue[CCHMAXPATH]; +} +FEALST; + + +static int SetEAs(__GPRO__ const char *path, void *ef_block) +{ /* returns almost-PK errors */ + EFHEADER *pEAblock = (PEFHEADER) ef_block; +#ifdef __32BIT__ + EAOP2 eaop; + PFEA2LIST pFEA2list; +#else + EAOP eaop; + PFEALIST pFEAlist; + PFEA pFEA; + PFEA2LIST pFEA2list; + PFEA2 pFEA2; + ULONG nLength2; +#endif + USHORT nLength; + char szName[CCHMAXPATH]; + int error; + + if ( ef_block == NULL || pEAblock -> nID != EF_OS2 ) + return PK_OK; /* not an OS/2 extra field: assume OK */ + + if ( pEAblock->nSize < 4 || (pEAblock->lSize > 0L && pEAblock->nSize <= 10) ) + return IZ_EF_TRUNC; /* no compressed data! */ + + strcpy(szName, path); + nLength = strlen(szName); + if (szName[nLength - 1] == '/') + szName[nLength - 1] = 0; + + if ( (pFEA2list = (PFEA2LIST) malloc((size_t) pEAblock -> lSize)) == NULL ) + return PK_MEM4; + + if ( (error = memextract(__G__ (uch *)pFEA2list, pEAblock->lSize, + (uch *)(pEAblock+1), (ulg)(pEAblock->nSize - 4))) != PK_OK ) + { + free(pFEA2list); + return error; + } + +#ifdef __32BIT__ + eaop.fpGEA2List = NULL; + eaop.fpFEA2List = pFEA2list; +#else + pFEAlist = (PVOID) pFEA2list; + pFEA2 = pFEA2list -> list; + pFEA = pFEAlist -> list; + + do + { + nLength2 = pFEA2 -> oNextEntryOffset; + nLength = sizeof(FEA) + pFEA2 -> cbName + 1 + pFEA2 -> cbValue; + + memcpy(pFEA, (PCH) pFEA2 + sizeof(pFEA2 -> oNextEntryOffset), nLength); + + pFEA2 = (PFEA2) ((PCH) pFEA2 + nLength2); + pFEA = (PFEA) ((PCH) pFEA + nLength); + } + while ( nLength2 != 0 ); + + pFEAlist -> cbList = (PCH) pFEA - (PCH) pFEAlist; + + eaop.fpGEAList = NULL; + eaop.fpFEAList = pFEAlist; +#endif + + eaop.oError = 0; + DosSetPathInfo(szName, FIL_QUERYEASIZE, (PBYTE) &eaop, sizeof(eaop), 0); + + if (!uO.tflag && QCOND2) + Info(slide, 0, ((char *)slide, " (%ld bytes EAs)", pFEA2list -> cbList)); + + free(pFEA2list); + return PK_COOL; +} + + +static int SetACL(__GPRO__ const char *path, void *ef_block) +{ /* returns almost-PK errors */ + EFHEADER *pACLblock = (PEFHEADER) ef_block; + char *szACL; + int error; + + if ( ef_block == NULL || pACLblock -> nID != EF_ACL ) + return PK_OK; /* not an OS/2 extra field: assume OK */ + + if (pACLblock->nSize < 4 || (pACLblock->lSize > 0L && pACLblock->nSize <= 10)) + return IZ_EF_TRUNC; /* no compressed data! */ + + if ( (szACL = malloc((size_t) pACLblock -> lSize)) == NULL ) + return PK_MEM4; + + if ( (error = memextract(__G__ (uch *)szACL, pACLblock->lSize, + (uch *)(pACLblock+1), (ulg)(pACLblock->nSize - 4))) != PK_OK ) + { + free(szACL); + return error; + } + + if (acl_set(NULL, path, szACL) == 0) + if (!uO.tflag && QCOND2) + Info(slide, 0, ((char *)slide, " (%ld bytes ACL)", strlen(szACL))); + + free(szACL); + return PK_COOL; +} + + +#ifdef SFX + +char *GetLoadPath(__GPRO) +{ +#ifdef __32BIT__ /* generic for 32-bit API */ + PTIB pptib; + PPIB pppib; + char *szPath; + + DosGetInfoBlocks(&pptib, &pppib); + szPath = pppib -> pib_pchenv; +#else /* 16-bit, note: requires large data model */ + SEL selEnv; + USHORT offCmd; + char *szPath; + + DosGetEnv(&selEnv, &offCmd); + szPath = MAKEP(selEnv, 0); +#endif + + while (*szPath) /* find end of process environment */ + szPath = strchr(szPath, 0) + 1; + + return szPath + 1; /* .exe file name follows environment */ + +} /* end function GetLoadPath() */ + + + + + +#else /* !SFX */ + +DIR *opendir(__GPRO__ const char *name) +{ + struct stat statb; + DIR *dirp; + char c; + char *s; + struct _dircontents *dp; + char nbuf[MAXPATHLEN + 1]; + int len; + + strcpy(nbuf, name); + if ((len = strlen(nbuf)) == 0) + return NULL; + + if ( ((c = nbuf[len - 1]) == '\\' || c == '/') && (len > 1) ) + { + nbuf[len - 1] = 0; + --len; + + if ( nbuf[len - 1] == ':' ) + { + strcpy(nbuf+len, "\\."); + len += 2; + } + } + else + if ( nbuf[len - 1] == ':' ) + { + strcpy(nbuf+len, "."); + ++len; + } + + /* GRR: Borland and Watcom C return non-zero on wildcards... < 0 ? */ + if (stat(nbuf, &statb) < 0 || (statb.st_mode & S_IFMT) != S_IFDIR) + { + Trace((stderr, "opendir: stat(%s) returns negative or not directory\n", + nbuf)); + return NULL; + } + + if ( (dirp = malloc(sizeof(DIR))) == NULL ) + return NULL; + + if ( nbuf[len - 1] == '.' && (len == 1 || nbuf[len - 2] != '.') ) + strcpy(nbuf+len-1, "*"); + else + if ( ((c = nbuf[len - 1]) == '\\' || c == '/') && (len == 1) ) + strcpy(nbuf+len, "*"); + else + strcpy(nbuf+len, "\\*"); + + /* len is no longer correct (but no longer needed) */ + Trace((stderr, "opendir: nbuf = [%s]\n", nbuf)); + + dirp -> dd_loc = 0; + dirp -> dd_contents = dirp -> dd_cp = NULL; + + if ((s = getdirent(__G__ nbuf)) == NULL) + return dirp; + + do + { + if (((dp = malloc(sizeof(struct _dircontents))) == NULL) || + ((dp -> _d_entry = malloc(strlen(s) + 1)) == NULL) ) + { + if (dp) + free(dp); + free_dircontents(dirp -> dd_contents); + + return NULL; + } + + if (dirp -> dd_contents) + { + dirp -> dd_cp -> _d_next = dp; + dirp -> dd_cp = dirp -> dd_cp -> _d_next; + } + else + dirp -> dd_contents = dirp -> dd_cp = dp; + + strcpy(dp -> _d_entry, s); + dp -> _d_next = NULL; + + dp -> _d_size = G.os2.find.cbFile; + dp -> _d_mode = G.os2.find.attrFile; + dp -> _d_time = *(unsigned *) &(G.os2.find.ftimeLastWrite); + dp -> _d_date = *(unsigned *) &(G.os2.find.fdateLastWrite); + } + while ((s = getdirent(__G__ NULL)) != NULL); + + dirp -> dd_cp = dirp -> dd_contents; + + return dirp; +} + + +void closedir(DIR * dirp) +{ + free_dircontents(dirp -> dd_contents); + free(dirp); +} + + +struct direct *readdir(__GPRO__ DIR * dirp) +{ + /* moved to os2data.h so it can be global */ + /* static struct direct dp; */ + + if (dirp -> dd_cp == NULL) + return NULL; + + G.os2.dp.d_namlen = G.os2.dp.d_reclen = + strlen(strcpy(G.os2.dp.d_name, dirp -> dd_cp -> _d_entry)); + + G.os2.dp.d_ino = 0; + + G.os2.dp.d_size = dirp -> dd_cp -> _d_size; + G.os2.dp.d_mode = dirp -> dd_cp -> _d_mode; + G.os2.dp.d_time = dirp -> dd_cp -> _d_time; + G.os2.dp.d_date = dirp -> dd_cp -> _d_date; + + dirp -> dd_cp = dirp -> dd_cp -> _d_next; + dirp -> dd_loc++; + + return &G.os2.dp; +} + + + +#if 0 /* not used in unzip; retained for possibly future use */ + +void seekdir(DIR * dirp, long off) +{ + long i = off; + struct _dircontents *dp; + + if (off >= 0) + { + for (dp = dirp -> dd_contents; --i >= 0 && dp; dp = dp -> _d_next); + + dirp -> dd_loc = off - (i + 1); + dirp -> dd_cp = dp; + } +} + + +long telldir(DIR * dirp) +{ + return dirp -> dd_loc; +} + +#endif /* 0 */ + + + +static void free_dircontents(struct _dircontents * dp) +{ + struct _dircontents *odp; + + while (dp) + { + if (dp -> _d_entry) + free(dp -> _d_entry); + + dp = (odp = dp) -> _d_next; + free(odp); + } +} + + +static char *getdirent(__GPRO__ ZCONST char *dir) +{ + int done; + /* moved to os2data.h so it can be global */ + /* static int lower; */ + + if (dir != NULL) + { /* get first entry */ + G.os2.hdir = HDIR_SYSTEM; + G.os2.count = 1; + done = DosFindFirst((PSZ) dir, &G.os2.hdir, attributes, + &G.os2.find, sizeof(G.os2.find), &G.os2.count); + G.os2.lower = IsFileSystemFAT(__G__ dir); + } + else /* get next entry */ + done = DosFindNext(G.os2.hdir, + &G.os2.find, sizeof(G.os2.find), &G.os2.count); + + if (done == 0) + { + if ( G.os2.lower ) + StringLower(G.os2.find.achName); + return G.os2.find.achName; + } + else + { + DosFindClose(G.os2.hdir); + return NULL; + } +} + + + +int IsFileSystemFAT(__GPRO__ ZCONST char *dir) /* FAT / HPFS detection */ +{ + /* moved to os2data.h so they can be global */ + /* static USHORT nLastDrive=(USHORT)(-1), nResult; */ + ULONG lMap; + BYTE bData[64]; + char bName[3]; +#ifdef __32BIT__ + ULONG nDrive, cbData; + PFSQBUFFER2 pData = (PFSQBUFFER2) bData; +#else + USHORT nDrive, cbData; + PFSQBUFFER pData = (PFSQBUFFER) bData; +#endif + + /* We separate FAT and HPFS+other file systems here. + at the moment I consider other systems to be similar to HPFS, + i.e. support long file names and case sensitive */ + + if ( isalpha(dir[0]) && (dir[1] == ':') ) + nDrive = toupper(dir[0]) - '@'; + else + DosQueryCurrentDisk(&nDrive, &lMap); + + if ( nDrive == G.os2.nLastDrive ) + return G.os2.nResult; + + bName[0] = (char) (nDrive + '@'); + bName[1] = ':'; + bName[2] = 0; + + G.os2.nLastDrive = nDrive; + cbData = sizeof(bData); + + if ( !DosQueryFSAttach(bName, 0, FSAIL_QUERYNAME, (PVOID) pData, &cbData) ) + G.os2.nResult = !strcmp((char *) (pData -> szFSDName) + pData -> cbName, + "FAT"); + else + G.os2.nResult = FALSE; + + /* End of this ugly code */ + return G.os2.nResult; +} /* end function IsFileSystemFAT() */ + + + + + +/************************/ +/* Function do_wild() */ +/************************/ + +char *do_wild(__G__ wildspec) + __GDEF + char *wildspec; /* only used first time on a given dir */ +{ + /* moved to os2data.h so they can be global */ +#if 0 + static DIR *dir = NULL; + static char *dirname, *wildname, matchname[FILNAMSIZ]; + static int firstcall=TRUE, have_dirname, dirnamelen; +#endif + char *fnamestart; + struct direct *file; + + + /* Even when we're just returning wildspec, we *always* do so in + * matchname[]--calling routine is allowed to append four characters + * to the returned string, and wildspec may be a pointer to argv[]. + */ + if (G.os2.firstcall) { /* first call: must initialize everything */ + G.os2.firstcall = FALSE; + + if (!iswild(wildspec)) { + strcpy(G.os2.matchname, wildspec); + G.os2.have_dirname = FALSE; + G.os2.dir = NULL; + return G.os2.matchname; + } + + /* break the wildspec into a directory part and a wildcard filename */ + if ((G.os2.wildname = strrchr(wildspec, '/')) == NULL && + (G.os2.wildname = strrchr(wildspec, ':')) == NULL) { + G.os2.dirname = "."; + G.os2.dirnamelen = 1; + G.os2.have_dirname = FALSE; + G.os2.wildname = wildspec; + } else { + ++G.os2.wildname; /* point at character after '/' or ':' */ + G.os2.dirnamelen = G.os2.wildname - wildspec; + if ((G.os2.dirname = (char *)malloc(G.os2.dirnamelen+1)) == NULL) { + Info(slide, 1, ((char *)slide, + LoadFarString(CantAllocateWildcard))); + strcpy(G.os2.matchname, wildspec); + return G.os2.matchname; /* but maybe filespec was not a wildcard */ + } + strncpy(G.os2.dirname, wildspec, G.os2.dirnamelen); + G.os2.dirname[G.os2.dirnamelen] = '\0'; /* terminate for strcpy below */ + G.os2.have_dirname = TRUE; + } + Trace((stderr, "do_wild: dirname = [%s]\n", G.os2.dirname)); + + if ((G.os2.dir = opendir(__G__ G.os2.dirname)) != NULL) { + if (G.os2.have_dirname) { + strcpy(G.os2.matchname, G.os2.dirname); + fnamestart = G.os2.matchname + G.os2.dirnamelen; + } else + fnamestart = G.os2.matchname; + while ((file = readdir(__G__ G.os2.dir)) != NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.os2.wildname, 1) && /* 1 == ignore case */ + /* skip "." and ".." directory entries */ + strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.os2.matchname; + } + } + /* if we get to here directory is exhausted, so close it */ + closedir(G.os2.dir); + G.os2.dir = NULL; + } +#ifdef DEBUG + else { + Trace((stderr, "do_wild: opendir(%s) returns NULL\n", G.os2.dirname)); + } +#endif /* DEBUG */ + + /* return the raw wildspec in case that works (e.g., directory not + * searchable, but filespec was not wild and file is readable) */ + strcpy(G.os2.matchname, wildspec); + return G.os2.matchname; + } + + /* last time through, might have failed opendir but returned raw wildspec */ + if (G.os2.dir == NULL) { + G.os2.firstcall = TRUE; /* nothing left to try--reset for new wildspec */ + if (G.os2.have_dirname) + free(G.os2.dirname); + return (char *)NULL; + } + + /* If we've gotten this far, we've read and matched at least one entry + * successfully (in a previous call), so dirname has been copied into + * matchname already. + */ + if (G.os2.have_dirname) { + /* strcpy(G.os2.matchname, G.os2.dirname); */ + fnamestart = G.os2.matchname + G.os2.dirnamelen; + } else + fnamestart = G.os2.matchname; + while ((file = readdir(__G__ G.os2.dir)) != NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.os2.wildname, 1)) { /* 1 == ignore case */ + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.os2.matchname; + } + } + + closedir(G.os2.dir); /* have read at least one dir entry; nothing left */ + G.os2.dir = NULL; + G.os2.firstcall = TRUE; /* reset for new wildspec */ + if (G.os2.have_dirname) + free(G.os2.dirname); + return (char *)NULL; + +} /* end function do_wild() */ + +#endif /* !SFX */ + + +/* scan extra fields for something we happen to know */ + +static int EvalExtraFields(__GPRO__ const char *path, + void *extra_field, unsigned ef_len) +{ + char *ef_ptr = extra_field; + PEFHEADER pEFblock; + int rc = PK_OK; + + while (ef_len >= sizeof(EFHEADER)) + { + pEFblock = (PEFHEADER) ef_ptr; + + if (pEFblock -> nSize > (ef_len - EB_HEADSIZE)) + return PK_ERR; /* claimed EFblock length exceeds EF size! */ + + switch (pEFblock -> nID) + { + case EF_OS2: + rc = SetEAs(__G__ path, ef_ptr); + break; + case EF_ACL: + rc = (uO.X_flag) ? SetACL(__G__ path, ef_ptr) : PK_OK; + break; +#if 0 + case EF_IZUNIX: + case EF_PKUNIX: + /* handled elsewhere */ + break; +#endif + default: + TTrace((stderr,"EvalExtraFields: unknown extra field block, ID=%d\n", + pEFblock -> nID)); + break; + } + + ef_ptr += (pEFblock -> nSize + EB_HEADSIZE); + ef_len -= (pEFblock -> nSize + EB_HEADSIZE); + + if (rc != PK_OK) + break; + } + + return rc; +} + + + +/************************/ +/* Function mapattr() */ +/************************/ + +int mapattr(__G) + __GDEF +{ + /* set archive bit (file is not backed up): */ + G.pInfo->file_attr = (unsigned)(G.crec.external_file_attributes | 32) & 0xff; + return 0; +} + + + + + +/************************/ +/* Function mapname() */ +/************************/ + +/* + * There are presently two possibilities in OS/2: the output filesystem is + * FAT, or it is HPFS. If the former, we need to map to FAT, obviously, but + * we *also* must map to HPFS and store that version of the name in extended + * attributes. Either way, we need to map to HPFS, so the main mapname + * routine does that. In the case that the output file system is FAT, an + * extra filename-mapping routine is called in checkdir(). While it should + * be possible to determine the filesystem immediately upon entry to mapname(), + * it is conceivable that the DOS APPEND utility could be added to OS/2 some- + * day, allowing a FAT directory to be APPENDed to an HPFS drive/path. There- + * fore we simply check the filesystem at each path component. + * + * Note that when alternative IFSes become available/popular, everything will + * become immensely more complicated. For example, a Minix filesystem would + * have limited filename lengths like FAT but no extended attributes in which + * to store the longer versions of the names. A BSD Unix filesystem would + * support paths of length 1024 bytes or more, but it is not clear that FAT + * EAs would allow such long .LONGNAME fields or that OS/2 would properly + * restore such fields when moving files from FAT to the new filesystem. + * + * GRR: some or all of the following chars should be checked in either + * mapname (HPFS) or map2fat (FAT), depending: ,=^+'"[]<>|\t& + */ + /* return 0 if no error, 1 if caution (filename */ +int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ + __GDEF /* dir doesn't exist), 3 if error (skip file), */ + int renamed; /* or 10 if out of memory (skip file) */ +{ /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ + char pathcomp[FILNAMSIZ]; /* path-component buffer */ + char *pp, *cp=(char *)NULL; /* character pointers */ + char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ + int quote = FALSE; /* flag: next char is literal */ + int error = 0; + register unsigned workch; /* hold the character being tested */ + + +/*--------------------------------------------------------------------------- + Initialize various pointers and counters and stuff. + ---------------------------------------------------------------------------*/ + + /* can create path as long as not just freshening, or if user told us */ + G.create_dirs = (!uO.fflag || renamed); + + G.os2.created_dir = FALSE; /* not yet */ + G.os2.renamed_fullpath = FALSE; + G.os2.fnlen = strlen(G.filename); + +/* GRR: for VMS, convert to internal format now or later? or never? */ + if (renamed) { + cp = G.filename - 1; /* point to beginning of renamed name... */ + while (*++cp) + if (*cp == '\\') /* convert backslashes to forward */ + *cp = '/'; + cp = G.filename; + /* use temporary rootpath if user gave full pathname */ + if (G.filename[0] == '/') { + G.os2.renamed_fullpath = TRUE; + pathcomp[0] = '/'; /* copy the '/' and terminate */ + pathcomp[1] = '\0'; + ++cp; + } else if (isalpha(G.filename[0]) && G.filename[1] == ':') { + G.os2.renamed_fullpath = TRUE; + pp = pathcomp; + *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ + *pp++ = *cp++; + if (*cp == '/') + *pp++ = *cp++; /* otherwise add "./"? */ + *pp = '\0'; + } + } + + /* pathcomp is ignored unless renamed_fullpath is TRUE: */ + if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* init path buffer */ + return error; /* ...unless no mem or vol label on hard disk */ + + *pathcomp = '\0'; /* initialize translation buffer */ + pp = pathcomp; /* point to translation buffer */ + if (!renamed) { /* cp already set if renamed */ + if (uO.jflag) /* junking directories */ +/* GRR: watch out for VMS version... */ + cp = (char *)strrchr(G.filename, '/'); + if (cp == (char *)NULL) /* no '/' or not junking dirs */ + cp = G.filename; /* point to internal zipfile-member pathname */ + else + ++cp; /* point to start of last component of path */ + } + +/*--------------------------------------------------------------------------- + Begin main loop through characters in filename. + ---------------------------------------------------------------------------*/ + + while ((workch = (uch)*cp++) != 0) { + + if (quote) { /* if character quoted, */ + *pp++ = (char)workch; /* include it literally */ + quote = FALSE; + } else + switch (workch) { + case '/': /* can assume -j flag not given */ + *pp = '\0'; + if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) + return error; + pp = pathcomp; /* reset conversion buffer for next piece */ + lastsemi = (char *)NULL; /* leave directory semi-colons alone */ + break; + + case ':': + *pp++ = '_'; /* drive names not stored in zipfile, */ + break; /* so no colons allowed */ + + case ';': /* start of VMS version? */ + lastsemi = pp; /* remove VMS version later... */ + *pp++ = ';'; /* but keep semicolon for now */ + break; + + case '\026': /* control-V quote for special chars */ + quote = TRUE; /* set flag for next character */ + break; + + case ' ': /* keep spaces unless specifically */ + if (uO.sflag) /* requested to change to underscore */ + *pp++ = '_'; + else + *pp++ = ' '; + break; + + default: + /* allow ASCII 255 and European characters in filenames: */ + if (isprint(workch) || workch >= 127) + *pp++ = (char)workch; + } /* end switch */ + + } /* end while loop */ + + *pp = '\0'; /* done with pathcomp: terminate it */ + + /* if not saving them, remove VMS version numbers (appended "###") */ + if (!uO.V_flag && lastsemi) { + pp = lastsemi + 1; /* semi-colon was kept: expect #s after */ + while (isdigit((uch)(*pp))) + ++pp; + if (*pp == '\0') /* only digits between ';' and end: nuke */ + *lastsemi = '\0'; + } + +/*--------------------------------------------------------------------------- + Report if directory was created (and no file to create: filename ended + in '/'), check name to be sure it exists, and combine path and name be- + fore exiting. + ---------------------------------------------------------------------------*/ + + if (G.filename[G.os2.fnlen-1] == '/') { + checkdir(__G__ G.filename, GETPATH); + if (G.os2.created_dir) { + if (!uO.qflag) + Info(slide, 0, ((char *)slide, LoadFarString(Creating), + G.filename)); + if (G.extra_field) { /* zipfile extra field has extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", G.filename)); + Info(slide, 1, ((char *)slide, LoadFarString(TruncEAs), + makeword(G.extra_field+2)-10, "\n")); + } else if (!uO.qflag) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + } else if (!uO.qflag) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + + /* set date/time stamps */ + SetPathAttrTimes(__G__ G.pInfo->file_attr & ~A_ARCHIVE, 1); + + return IZ_CREATED_DIR; /* dir time already set */ + + } else if (G.extra_field && uO.overwrite_all) { + /* overwrite EAs of existing directory since user requested it */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + Info(slide, 0x421, ((char *)slide, "%-22s ", G.filename)); + Info(slide, 0x401, ((char *)slide, LoadFarString(TruncEAs), + makeword(G.extra_field+2)-10, "\n")); + } + + /* set date/time stamps (dirs only have creation times) */ + SetPathAttrTimes(__G__ G.pInfo->file_attr & ~A_ARCHIVE, 1); + } + return 2; /* dir existed already; don't look for data to extract */ + } + + if (*pathcomp == '\0') { + Info(slide, 1, ((char *)slide, LoadFarString(ConversionFailed), + G.filename)); + return 3; + } + + checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ + checkdir(__G__ G.filename, GETPATH); + Trace((stderr, "mapname returns with filename = [%s] (error = %d)\n\n", + G.filename, error)); + + if (G.pInfo->vollabel) { /* set the volume label now */ + VOLUMELABEL FSInfoBuf; +/* GRR: "VOLUMELABEL" defined for IBM C and emx, but haven't checked MSC... */ + + strcpy(FSInfoBuf.szVolLabel, G.filename); + FSInfoBuf.cch = (BYTE)strlen(FSInfoBuf.szVolLabel); + + if (!uO.qflag) + Info(slide, 0, ((char *)slide, LoadFarString(Labelling), + (char)(G.os2.nLabelDrive + 'a' - 1), G.filename)); + if (DosSetFSInfo(G.os2.nLabelDrive, FSIL_VOLSER, (PBYTE)&FSInfoBuf, + sizeof(VOLUMELABEL))) + { + Info(slide, 1, ((char *)slide, LoadFarString(ErrSetVolLabel))); + return 3; + } + return 2; /* success: skip the "extraction" quietly */ + } + + return error; + +} /* end function mapname() */ + + + + + +/***********************/ +/* Function checkdir() */ +/***********************/ + +int checkdir(__G__ pathcomp, flag) + __GDEF + char *pathcomp; + int flag; +/* + * returns: 1 - (on APPEND_NAME) truncated filename + * 2 - path doesn't exist, not allowed to create + * 3 - path doesn't exist, tried to create and failed; or + * path exists and is not a directory, but is supposed to be + * 4 - path is too long + * 10 - can't allocate memory for filename buffers + */ +{ + /* moved to os2data.h so they can be global */ +#if 0 + static int rootlen = 0; /* length of rootpath */ + static char *rootpath; /* user's "extract-to" directory */ + static char *buildpathHPFS; /* full path (so far) to extracted file, */ + static char *buildpathFAT; /* both HPFS/EA (main) and FAT versions */ + static char *endHPFS; /* corresponding pointers to end of */ + static char *endFAT; /* buildpath ('\0') */ +#endif + +# define FN_MASK 7 +# define FUNCTION (flag & FN_MASK) + + + +/*--------------------------------------------------------------------------- + APPEND_DIR: append the path component to the path being built and check + for its existence. If doesn't exist and we are creating directories, do + so for this one; else signal success or error as appropriate. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_DIR) { + char *p = pathcomp; + int longdirEA, too_long=FALSE; + + Trace((stderr, "appending dir segment [%s]\n", pathcomp)); + while ((*G.os2.endHPFS = *p++) != '\0') /* copy to HPFS filename */ + ++G.os2.endHPFS; + if (IsFileNameValid(G.os2.buildpathHPFS)) { + longdirEA = FALSE; + p = pathcomp; + while ((*G.os2.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.os2.endFAT; + } else { + longdirEA = TRUE; +/* GRR: check error return? */ + map2fat(pathcomp, &G.os2.endFAT); /* map, put in FAT fn, update endFAT */ + } + + /* GRR: could do better check, see if overrunning buffer as we go: + * check endHPFS-G.os2.buildpathHPFS after each append, set warning variable + * if within 20 of FILNAMSIZ; then if var set, do careful check when + * appending. Clear variable when begin new path. */ + + /* next check: need to append '/', at least one-char name, '\0' */ + if ((G.os2.endHPFS-G.os2.buildpathHPFS) > FILNAMSIZ-3) + too_long = TRUE; /* check if extracting dir? */ +#ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ + if (GetFileTime(G.os2.buildpathFAT) == -1 || stat(G.os2.buildpathFAT, &G.statbuf)) +#else + if (stat(G.os2.buildpathFAT, &G.statbuf)) /* path doesn't exist */ +#endif + { + if (!G.create_dirs) { /* told not to create (freshening) */ + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ + Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), + G.os2.buildpathHPFS)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + if (MKDIR(G.os2.buildpathFAT, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, LoadFarString(CantCreateDir), + G.os2.buildpathFAT, G.filename)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 3; /* path didn't exist, tried to create, failed */ + } + G.os2.created_dir = TRUE; + /* only set EA if creating directory */ +/* GRR: need trailing '/' before function call? */ + if (longdirEA) { +#ifdef DEBUG + int e = +#endif + SetLongNameEA(G.os2.buildpathFAT, pathcomp); + Trace((stderr, "APPEND_DIR: SetLongNameEA() returns %d\n", e)); + } + } else if (!S_ISDIR(G.statbuf.st_mode)) { + Info(slide, 1, ((char *)slide, LoadFarString(DirIsntDirectory), + G.os2.buildpathFAT, G.filename)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 3; /* path existed but wasn't dir */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), + G.os2.buildpathHPFS)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + *G.os2.endHPFS++ = '/'; + *G.os2.endFAT++ = '/'; + *G.os2.endHPFS = *G.os2.endFAT = '\0'; + Trace((stderr, "buildpathHPFS now = [%s]\n", G.os2.buildpathHPFS)); + Trace((stderr, "buildpathFAT now = [%s]\n", G.os2.buildpathFAT)); + return 0; + + } /* end if (FUNCTION == APPEND_DIR) */ + +/*--------------------------------------------------------------------------- + GETPATH: copy full FAT path to the string pointed at by pathcomp (want + filename to reflect name used on disk, not EAs; if full path is HPFS, + buildpathFAT and buildpathHPFS will be identical). Also free both paths. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == GETPATH) { + Trace((stderr, "getting and freeing FAT path [%s]\n", G.os2.buildpathFAT)); + Trace((stderr, "freeing HPFS path [%s]\n", G.os2.buildpathHPFS)); + strcpy(pathcomp, G.os2.buildpathFAT); + free(G.os2.buildpathFAT); + free(G.os2.buildpathHPFS); + G.os2.buildpathHPFS = G.os2.buildpathFAT = G.os2.endHPFS = G.os2.endFAT = (char *)NULL; + return 0; + } + +/*--------------------------------------------------------------------------- + APPEND_NAME: assume the path component is the filename; append it and + return without checking for existence. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_NAME) { + char *p = pathcomp; + int error = 0; + + Trace((stderr, "appending filename [%s]\n", pathcomp)); + while ((*G.os2.endHPFS = *p++) != '\0') { /* copy to HPFS filename */ + ++G.os2.endHPFS; + if ((G.os2.endHPFS-G.os2.buildpathHPFS) >= FILNAMSIZ) { + *--G.os2.endHPFS = '\0'; + Info(slide, 1, ((char *)slide, LoadFarString(PathTooLongTrunc), + G.filename, G.os2.buildpathHPFS)); + error = 1; /* filename truncated */ + } + } + +/* GRR: how can longnameEA ever be set before this point??? we don't want + * to save the original name to EAs if user renamed it, do we? + * + * if (!G.os2.longnameEA && ((G.os2.longnameEA = !IsFileNameValid(name)) != 0)) + */ + if (G.pInfo->vollabel || IsFileNameValid(G.os2.buildpathHPFS)) { + G.os2.longnameEA = FALSE; + p = pathcomp; + while ((*G.os2.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.os2.endFAT; + } else { + G.os2.longnameEA = TRUE; + if ((G.os2.lastpathcomp = (char *)malloc(strlen(pathcomp)+1)) == + (char *)NULL) + { + Info(slide, 1, ((char *)slide, + "checkdir warning: cannot save longname EA: out of memory\n")); + G.os2.longnameEA = FALSE; + error = 1; /* can't set .LONGNAME extended attribute */ + } else /* used and freed in close_outfile() */ + strcpy(G.os2.lastpathcomp, pathcomp); + map2fat(pathcomp, &G.os2.endFAT); /* map, put in FAT fn, update endFAT */ + } + Trace((stderr, "buildpathHPFS: %s\nbuildpathFAT: %s\n", + G.os2.buildpathHPFS, G.os2.buildpathFAT)); + + return error; /* could check for existence, prompt for new name... */ + + } /* end if (FUNCTION == APPEND_NAME) */ + +/*--------------------------------------------------------------------------- + INIT: allocate and initialize buffer space for the file currently being + extracted. If file was renamed with an absolute path, don't prepend the + extract-to path. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == INIT) { + Trace((stderr, "initializing buildpathHPFS and buildpathFAT to ")); + if ((G.os2.buildpathHPFS = (char *)malloc(G.os2.fnlen+G.os2.rootlen+1)) == (char *)NULL) + return 10; + if ((G.os2.buildpathFAT = (char *)malloc(G.os2.fnlen+G.os2.rootlen+1)) == (char *)NULL) { + free(G.os2.buildpathHPFS); + return 10; + } + if (G.pInfo->vollabel) { /* use root or renamed path, but don't store */ +/* GRR: for network drives, do strchr() and return IZ_VOL_LABEL if not [1] */ + if (G.os2.renamed_fullpath && pathcomp[1] == ':') + *G.os2.buildpathHPFS = (char)ToLower(*pathcomp); + else if (!G.os2.renamed_fullpath && G.os2.rootlen > 1 && G.os2.rootpath[1] == ':') + *G.os2.buildpathHPFS = (char)ToLower(*G.os2.rootpath); + else { + ULONG lMap; + DosQueryCurrentDisk(&G.os2.nLabelDrive, &lMap); + *G.os2.buildpathHPFS = (char)(G.os2.nLabelDrive - 1 + 'a'); + } + G.os2.nLabelDrive = *G.os2.buildpathHPFS - 'a' + 1; /* save for mapname() */ + if (uO.volflag == 0 || *G.os2.buildpathHPFS < 'a' || /* no labels/bogus? */ + (uO.volflag == 1 && !isfloppy(G.os2.nLabelDrive))) { /* -$: no fixed */ + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return IZ_VOL_LABEL; /* skipping with message */ + } + *G.os2.buildpathHPFS = '\0'; + } else if (G.os2.renamed_fullpath) /* pathcomp = valid data */ + strcpy(G.os2.buildpathHPFS, pathcomp); + else if (G.os2.rootlen > 0) + strcpy(G.os2.buildpathHPFS, G.os2.rootpath); + else + *G.os2.buildpathHPFS = '\0'; + G.os2.endHPFS = G.os2.buildpathHPFS; + G.os2.endFAT = G.os2.buildpathFAT; + while ((*G.os2.endFAT = *G.os2.endHPFS) != '\0') { + ++G.os2.endFAT; + ++G.os2.endHPFS; + } + Trace((stderr, "[%s]\n", G.os2.buildpathHPFS)); + return 0; + } + +/*--------------------------------------------------------------------------- + ROOT: if appropriate, store the path in rootpath and create it if neces- + sary; else assume it's a zipfile member and return. This path segment + gets used in extracting all members from every zipfile specified on the + command line. Note that under OS/2 and MS-DOS, if a candidate extract-to + directory specification includes a drive letter (leading "x:"), it is + treated just as if it had a trailing '/'--that is, one directory level + will be created if the path doesn't exist, unless this is otherwise pro- + hibited (e.g., freshening). + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) || defined(SFX_EXDIR)) + if (FUNCTION == ROOT) { + Trace((stderr, "initializing root path to [%s]\n", pathcomp)); + if (pathcomp == (char *)NULL) { + G.os2.rootlen = 0; + return 0; + } + if ((G.os2.rootlen = strlen(pathcomp)) > 0) { + int had_trailing_pathsep=FALSE, has_drive=FALSE, xtra=2; + + if (isalpha(pathcomp[0]) && pathcomp[1] == ':') + has_drive = TRUE; /* drive designator */ + if (pathcomp[G.os2.rootlen-1] == '/') { + pathcomp[--G.os2.rootlen] = '\0'; + had_trailing_pathsep = TRUE; + } + if (has_drive && (G.os2.rootlen == 2)) { + if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ + xtra = 3; /* room for '.' + '/' + 0 at end of "x:" */ + } else if (G.os2.rootlen > 0) { /* need not check "x:." and "x:/" */ +#ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ + if (GetFileTime(pathcomp) == -1 || + SSTAT(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) +#else + if (SSTAT(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) +#endif + { /* path does not exist */ + if (!G.create_dirs /* || iswild(pathcomp) */ + ) { + G.os2.rootlen = 0; + return 2; /* treat as stored file */ + } + /* create directory (could add loop here to scan pathcomp + * and create more than one level, but really necessary?) */ + if (MKDIR(pathcomp, 0777) == -1) { + Info(slide, 1, ((char *)slide, + LoadFarString(CantCreateExtractDir), pathcomp)); + G.os2.rootlen = 0; /* path didn't exist, tried to create, */ + return 3; /* failed: file exists, or need 2+ levels */ + } + } + } + if ((G.os2.rootpath = (char *)malloc(G.os2.rootlen+xtra)) == (char *)NULL) { + G.os2.rootlen = 0; + return 10; + } + strcpy(G.os2.rootpath, pathcomp); + if (xtra == 3) /* had just "x:", make "x:." */ + G.os2.rootpath[G.os2.rootlen++] = '.'; + G.os2.rootpath[G.os2.rootlen++] = '/'; + G.os2.rootpath[G.os2.rootlen] = '\0'; + Trace((stderr, "rootpath now = [%s]\n", G.os2.rootpath)); + } + return 0; + } +#endif /* !SFX || SFX_EXDIR */ + +/*--------------------------------------------------------------------------- + END: free rootpath, immediately prior to program exit. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == END) { + Trace((stderr, "freeing rootpath\n")); + if (G.os2.rootlen > 0) { + free(G.os2.rootpath); + G.os2.rootlen = 0; + } + return 0; + } + + return 99; /* should never reach */ + +} /* end function checkdir() */ + + + + + +/***********************/ +/* Function isfloppy() */ /* more precisely, is it removable? */ +/***********************/ + +static int isfloppy(nDrive) + int nDrive; /* 1 == A:, 2 == B:, etc. */ +{ + uch ParmList[1] = {0}; + uch DataArea[1] = {0}; + char Name[3]; + HFILE handle; +#ifdef __32BIT__ + ULONG rc; + ULONG action; +#else + USHORT rc; + USHORT action; +#endif + + + Name[0] = (char) (nDrive + 'A' - 1); + Name[1] = ':'; + Name[2] = 0; + + rc = DosOpen(Name, &handle, &action, 0L, FILE_NORMAL, FILE_OPEN, + OPEN_FLAGS_DASD | OPEN_FLAGS_FAIL_ON_ERROR | + OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0L); + + if (rc == ERROR_NOT_READY) /* must be removable */ + return TRUE; + else if (rc) { /* other error: do default a/b heuristic instead */ + Trace((stderr, "error in DosOpen(DASD): guessing...\n", rc)); + return (nDrive == 1 || nDrive == 2)? TRUE : FALSE; + } + + rc = DosDevIOCtl(DataArea, sizeof(DataArea), ParmList, sizeof(ParmList), + DSK_BLOCKREMOVABLE, IOCTL_DISK, handle); + DosClose(handle); + + if (rc) { /* again, just check for a/b */ + Trace((stderr, "error in DosDevIOCtl category IOCTL_DISK, function " + "DSK_BLOCKREMOVABLE\n (rc = 0x%04x): guessing...\n", rc)); + return (nDrive == 1 || nDrive == 2)? TRUE : FALSE; + } else { + return DataArea[0] ? FALSE : TRUE; + } +} /* end function isfloppy() */ + + + + + +static int IsFileNameValid(const char *name) +{ + HFILE hf; +#ifdef __32BIT__ + ULONG uAction; +#else + USHORT uAction; +#endif + + switch( DosOpen((PSZ) name, &hf, &uAction, 0, 0, FILE_OPEN, + OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0) ) + { + case ERROR_INVALID_NAME: + case ERROR_FILENAME_EXCED_RANGE: + return FALSE; + case NO_ERROR: + DosClose(hf); + default: + return TRUE; + } +} + + + + + +/**********************/ +/* Function map2fat() */ +/**********************/ + +static void map2fat(pathcomp, pEndFAT) + char *pathcomp, **pEndFAT; +{ + char *ppc = pathcomp; /* variable pointer to pathcomp */ + char *pEnd = *pEndFAT; /* variable pointer to buildpathFAT */ + char *pBegin = *pEndFAT; /* constant pointer to start of this comp. */ + char *last_dot = (char *)NULL; /* last dot not converted to underscore */ + int dotname = FALSE; /* flag: path component begins with dot */ + /* ("." and ".." don't count) */ + register unsigned workch; /* hold the character being tested */ + + + /* Only need check those characters which are legal in HPFS but not + * in FAT: to get here, must already have passed through mapname. + * (GRR: oops, small bug--if char was quoted, no longer have any + * knowledge of that.) Also must truncate path component to ensure + * 8.3 compliance... + */ + while ((workch = (uch)*ppc++) != 0) { + switch (workch) { + case '[': /* add '"' '+' ',' '=' ?? */ + case ']': + *pEnd++ = '_'; /* convert brackets to underscores */ + break; + + case '.': + if (pEnd == *pEndFAT) { /* nothing appended yet... */ + if (*ppc == '\0') /* don't bother appending a */ + break; /* "./" component to the path */ + else if (*ppc == '.' && ppc[1] == '\0') { /* "../" */ + *pEnd++ = '.'; /* add first dot, unchanged... */ + ++ppc; /* skip second dot, since it will */ + } else { /* be "added" at end of if-block */ + *pEnd++ = '_'; /* FAT doesn't allow null filename */ + dotname = TRUE; /* bodies, so map .exrc -> _.exrc */ + } /* (extra '_' now, "dot" below) */ + } else if (dotname) { /* found a second dot, but still */ + dotname = FALSE; /* have extra leading underscore: */ + *pEnd = '\0'; /* remove it by shifting chars */ + pEnd = *pEndFAT + 1; /* left one space (e.g., .p1.p2: */ + while (pEnd[1]) { /* __p1 -> _p1_p2 -> _p1.p2 when */ + *pEnd = pEnd[1]; /* finished) [opt.: since first */ + ++pEnd; /* two chars are same, can start */ + } /* shifting at second position] */ + } + last_dot = pEnd; /* point at last dot so far... */ + *pEnd++ = '_'; /* convert dot to underscore for now */ + break; + + default: + *pEnd++ = (char)workch; + + } /* end switch */ + } /* end while loop */ + + *pEnd = '\0'; /* terminate buildpathFAT */ + + /* NOTE: keep in mind that pEnd points to the end of the path + * component, and *pEndFAT still points to the *beginning* of it... + * Also note that the algorithm does not try to get too fancy: + * if there are no dots already, the name either gets truncated + * at 8 characters or the last underscore is converted to a dot + * (only if more characters are saved that way). In no case is + * a dot inserted between existing characters. + */ + if (last_dot == (char *)NULL) { /* no dots: check for underscores... */ + char *plu = strrchr(pBegin, '_'); /* pointer to last underscore */ + + if (plu == (char *)NULL) { /* no dots, no underscores: truncate at 8 */ + *pEndFAT += 8; /* chars (could insert '.' and keep 11...) */ + if (*pEndFAT > pEnd) + *pEndFAT = pEnd; /* oops...didn't have 8 chars to truncate */ + else + **pEndFAT = '\0'; + } else if (MIN(plu - pBegin, 8) + MIN(pEnd - plu - 1, 3) > 8) { + last_dot = plu; /* be lazy: drop through to next if-block */ + } else if ((pEnd - *pEndFAT) > 8) { + *pEndFAT += 8; /* more fits into just basename than if */ + **pEndFAT = '\0'; /* convert last underscore to dot */ + } else + *pEndFAT = pEnd; /* whole thing fits into 8 chars or less */ + } + + if (last_dot != (char *)NULL) { /* one dot (or two, in the case of */ + *last_dot = '.'; /* "..") is OK: put it back in */ + + if ((last_dot - pBegin) > 8) { + char *p, *q; + int i; + + p = last_dot; + q = last_dot = pBegin + 8; + for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ + *q++ = *p++; /* shift ".ext" left and */ + *q = '\0'; /* truncate/terminate it */ + *pEndFAT = q; + } else if ((pEnd - last_dot) > 4) { /* too many chars in extension */ + *pEndFAT = last_dot + 4; + **pEndFAT = '\0'; + } else + *pEndFAT = pEnd; /* filename is fine; point at terminating zero */ + + if ((last_dot - pBegin) > 0 && last_dot[-1] == ' ') + last_dot[-1] = '_'; /* NO blank in front of '.'! */ + } +} /* end function map2fat() */ + + + + + +static int SetLongNameEA(char *name, char *longname) +{ + EAOP eaop; + FEALST fealst; + + eaop.fpFEAList = (PFEALIST) &fealst; + eaop.fpGEAList = NULL; + eaop.oError = 0; + + strcpy((char *) fealst.szName, ".LONGNAME"); + strcpy((char *) fealst.szValue, longname); + + fealst.cbList = sizeof(fealst) - CCHMAXPATH + strlen((char *) fealst.szValue); + fealst.cbName = (BYTE) strlen((char *) fealst.szName); + fealst.cbValue = sizeof(USHORT) * 2 + strlen((char *) fealst.szValue); + +#ifdef __32BIT__ + fealst.oNext = 0; +#endif + fealst.fEA = 0; + fealst.eaType = 0xFFFD; + fealst.eaSize = strlen((char *) fealst.szValue); + + return DosSetPathInfo(name, FIL_QUERYEASIZE, + (PBYTE) &eaop, sizeof(eaop), 0); +} + + + + + +/****************************/ +/* Function close_outfile() */ +/****************************/ + + /* GRR: need to return error level!! */ + +void close_outfile(__G) /* only for extracted files, not directories */ + __GDEF +{ + fclose(G.outfile); + + /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ + if (G.extra_field) { /* zipfile extra field may have extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", G.filename)); + Info(slide, 1, ((char *)slide, LoadFarString(TruncEAs), + makeword(G.extra_field+2)-10, uO.qflag? "\n" : "")); + } + } + + if (G.os2.longnameEA) { +#ifdef DEBUG + int e = +#endif + SetLongNameEA(G.filename, G.os2.lastpathcomp); + Trace((stderr, "close_outfile: SetLongNameEA() returns %d\n", e)); + free(G.os2.lastpathcomp); + } + + /* set date/time and permissions */ + SetPathAttrTimes(__G__ G.pInfo->file_attr, 0); + +} /* end function close_outfile() */ + + + + + +/******************************/ +/* Function check_for_newer() */ +/******************************/ + +int check_for_newer(__G__ filename) /* return 1 if existing file newer or equal; */ + __GDEF + char *filename; /* 0 if older; -1 if doesn't exist yet */ +{ + ulg existing, archive; +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif + + if ((existing = (ulg)GetFileTime(filename)) == (ulg)-1) + return DOES_NOT_EXIST; + +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, + G.lrec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TTrace((stderr, "check_for_newer: using Unix extra field mtime\n")); + archive = Utime2DosDateTime(z_utime.mtime); + } else { + archive = G.lrec.last_mod_dos_datetime; + } +#else /* !USE_EF_UT_TIME */ + archive = G.lrec.last_mod_dos_datetime; +#endif /* ?USE_EF_UT_TIME */ + + return (existing >= archive); +} /* end function check_for_newer() */ + + + + + +#ifndef SFX + +/*************************/ +/* Function dateformat() */ +/*************************/ + +int dateformat() +{ +/*----------------------------------------------------------------------------- + For those operating systems which support it, this function returns a value + which tells how national convention says that numeric dates are displayed. + Return values are DF_YMD, DF_DMY and DF_MDY. + -----------------------------------------------------------------------------*/ + + switch (GetCountryInfo()) { + case 0: + return DF_MDY; + case 1: + return DF_DMY; + case 2: + return DF_YMD; + } + return DF_MDY; /* default if error */ + +} /* end function dateformat() */ + + + + + +/************************/ +/* Function version() */ +/************************/ + +void version(__G) + __GDEF +{ + int len; +#if defined(__IBMC__) || defined(__WATCOMC__) || defined(_MSC_VER) + char buf[80]; +#endif + + len = sprintf((char *)slide, LoadFarString(CompiledWith), + +#if defined(__GNUC__) +# ifdef __EMX__ /* __EMX__ is defined as "1" only (sigh) */ + "emx+gcc ", __VERSION__, +# else + "gcc/2 ", __VERSION__, +# endif +#elif defined(__IBMC__) + "IBM ", +# if (__IBMC__ < 200) + (sprintf(buf, "C Set/2 %d.%02d", __IBMC__/100,__IBMC__%100), buf), +# elif (__IBMC__ < 300) + (sprintf(buf, "C Set++ %d.%02d", __IBMC__/100,__IBMC__%100), buf), +# else + (sprintf(buf, "Visual Age C++ %d.%02d", __IBMC__/100,__IBMC__%100), buf), +# endif +#elif defined(__WATCOMC__) + "Watcom C", (sprintf(buf, " (__WATCOMC__ = %d)", __WATCOMC__), buf), +#elif defined(__TURBOC__) +# ifdef __BORLANDC__ + "Borland C++", +# if (__BORLANDC__ < 0x0460) + " 1.0", +# elif (__BORLANDC__ == 0x0460) + " 1.5", /* from Kai Uwe: three less than DOS */ +# else + " 2.0", /* (__BORLANDC__ == 0x0500)? */ +# endif +# else + "Turbo C", /* these are probably irrelevant */ +# if (__TURBOC__ >= 661) + "++ 1.0 or later", +# elif (__TURBOC__ == 661) + " 3.0?", +# elif (__TURBOC__ == 397) + " 2.0", +# else + " 1.0 or 1.5?", +# endif +# endif +#elif defined(MSC) + "Microsoft C ", +# ifdef _MSC_VER + (sprintf(buf, "%d.%02d", _MSC_VER/100, _MSC_VER%100), buf), +# else + "5.1 or earlier", +# endif +#else + "unknown compiler", "", +#endif /* ?compilers */ + + "OS/2", + +/* GRR: does IBM C/2 identify itself as IBM rather than Microsoft? */ +#if (defined(MSC) || (defined(__WATCOMC__) && !defined(__386__))) +# if defined(M_I86HM) || defined(__HUGE__) + " (16-bit, huge)", +# elif defined(M_I86LM) || defined(__LARGE__) + " (16-bit, large)", +# elif defined(M_I86MM) || defined(__MEDIUM__) + " (16-bit, medium)", +# elif defined(M_I86CM) || defined(__COMPACT__) + " (16-bit, compact)", +# elif defined(M_I86SM) || defined(__SMALL__) + " (16-bit, small)", +# elif defined(M_I86TM) || defined(__TINY__) + " (16-bit, tiny)", +# else + " (16-bit)", +# endif +#else + " 2.x/3.x (32-bit)", +#endif + +#ifdef __DATE__ + " on ", __DATE__ +#else + "", "" +#endif + ); + + (*G.message)((zvoid *)&G, slide, (ulg)len, 0); + /* MSC can't handle huge macro expansions */ + + /* temporary debugging code for Borland compilers only */ + /* __TCPLUSPLUS__, __BCPLUSPLUS__ not defined for v1.5 */ +#if (defined(__TURBOC__) && defined(DEBUG)) + Info(slide, 0, ((char *)slide, "\t(__TURBOC__ = 0x%04x = %d)\n", __TURBOC__, + __TURBOC__)); +#ifdef __BORLANDC__ + Info(slide, 0, ((char *)slide, "\t(__BORLANDC__ = 0x%04x)\n",__BORLANDC__)); +#else + Info(slide, 0, ((char *)slide, "\tdebug(__BORLANDC__ not defined)\n")); +#endif +#endif /* __TURBOC__ && DEBUG */ + +} /* end function version() */ + +#endif /* !SFX */ + + + +/* This table can be static because it is pseudo-constant */ +static unsigned char cUpperCase[256], cLowerCase[256]; +static BOOL bInitialized=FALSE; + +/* Initialize the tables of upper- and lowercase characters, including + handling of country-dependent characters. */ + +static void InitNLS(void) +{ + unsigned nCnt, nU; + COUNTRYCODE cc; + + if (bInitialized == FALSE) { + bInitialized = TRUE; + + for ( nCnt = 0; nCnt < 256; nCnt++ ) + cUpperCase[nCnt] = cLowerCase[nCnt] = (unsigned char) nCnt; + + cc.country = cc.codepage = 0; + DosMapCase(sizeof(cUpperCase), &cc, (PCHAR) cUpperCase); + + for ( nCnt = 0; nCnt < 256; nCnt++ ) { + nU = cUpperCase[nCnt]; + if (nU != nCnt && cLowerCase[nU] == (unsigned char) nU) + cLowerCase[nU] = (unsigned char) nCnt; + } + + for ( nCnt = 'A'; nCnt <= 'Z'; nCnt++ ) + cLowerCase[nCnt] = (unsigned char) (nCnt - 'A' + 'a'); + } +} + + +int IsUpperNLS(int nChr) +{ + return (cUpperCase[nChr] == (unsigned char) nChr); +} + + +int ToLowerNLS(int nChr) +{ + return cLowerCase[nChr]; +} + + +char *StringLower(char *szArg) +{ + unsigned char *szPtr; + + for ( szPtr = (unsigned char *) szArg; *szPtr; szPtr++ ) + *szPtr = cLowerCase[*szPtr]; + return szArg; +} + + +#if defined(__IBMC__) && defined(__DEBUG_ALLOC__) +void DebugMalloc(void) +{ + _dump_allocated(0); /* print out debug malloc memory statistics */ +} +#endif + + +#if defined(REENTRANT) && defined(USETHREADID) +ulg GetThreadId(void) +{ + PTIB pptib; /* Address of a pointer to the + Thread Information Block */ + PPIB pppib; /* Address of a pointer to the + Process Information Block */ + + DosGetInfoBlocks(&pptib, &pppib); + return pptib->tib_ptib2->tib2_ultid; +} +#endif /* defined(REENTRANT) && defined(USETHREADID) */ + + +void os2GlobalsCtor(__GPRO) +{ + G.os2.nLastDrive = (USHORT)(-1); + G.os2.firstcall = TRUE; + +#ifdef OS2DLL + G.os2.rexx_mes = "0"; +#endif + + InitNLS(); +} diff --git a/utils/Install/packzip/os2acl.c b/utils/Install/packzip/os2acl.c new file mode 100644 index 0000000000..c58f6e0419 --- /dev/null +++ b/utils/Install/packzip/os2acl.c @@ -0,0 +1,381 @@ +/* os2acl.c - access to OS/2 (LAN Server) ACLs + * + * Author: Kai Uwe Rommel + * Created: Mon Aug 08 1994 + * + * This code is in the public domain. + */ + +/* + * supported 32-bit compilers: + * - emx+gcc + * - IBM C Set++ 2.1 or newer + * - Watcom C/C++ 10.0 or newer + * + * supported 16-bit compilers: + * - MS C 6.00A + * - Watcom C/C++ 10.0 or newer + * + * supported OS/2 LAN environments: + * - IBM LAN Server/Requester 3.0, 4.0 and 5.0 (Warp Server) + * - IBM Peer 1.0 (Warp Connect) + */ + +#ifdef KUR + static char *rcsid = + "$Id$"; + static char *rcsrev = "$Revision$"; +#endif + +/* + * $Log$ + * Revision 1.1.2.1 2000/04/11 12:38:06 BS + * Added wxInstall a self extracting installation program using wxWindows. + * + * Revision 1.3 1996/04/03 19:18:27 rommel + * minor fixes + * + * Revision 1.2 1996/03/30 22:03:52 rommel + * avoid frequent dynamic allocation for every call + * streamlined code + * + * Revision 1.1 1996/03/30 09:35:00 rommel + * Initial revision + * + */ + +#include +#include +#include +#include +#include + +#define INCL_NOPM +#define INCL_DOS +#define INCL_DOSERRORS +#include + +#include "os2/os2acl.h" + +#define UNLEN 20 + +#if defined(__WATCOMC__) && defined(__386__) && !defined(__32BIT__) +#define __32BIT__ +#endif + +#ifdef __32BIT__ +typedef ULONG U_INT; +#ifdef __EMX__ +#define PSTR16 _far16ptr +#define PTR16(x) _emx_32to16(x) +#else /* other 32-bit */ +#define PSTR16 PCHAR16 +#define PTR16(x) ((PCHAR16)(x)) +#endif +#else /* 16-bit */ +typedef USHORT U_INT; +#define PSTR16 PSZ +#define PTR16(x) (x) +#endif + +typedef struct access_list +{ + char acl_ugname[UNLEN+1]; + char acl_pad; + USHORT acl_access; +} +ACCLIST; + +typedef struct access_info +{ + PSTR16 acc_resource_name; + USHORT acc_attr; + USHORT acc_count; +} +ACCINFO; + +static ACCINFO *ai; +static char *path, *data; + +#ifdef __32BIT__ + +#ifdef __EMX__ + +static USHORT (APIENTRY *_NetAccessGetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail); +static USHORT (APIENTRY *_NetAccessSetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum); +static USHORT (APIENTRY *_NetAccessAdd)(PSZ pszServer, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer); + +USHORT NetAccessGetInfo(PSZ pszServer, PSZ pszResource, USHORT sLevel, + PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail) +{ + return (USHORT) + (_THUNK_PROLOG (4+4+2+4+2+4); + _THUNK_FLAT (pszServer); + _THUNK_FLAT (pszResource); + _THUNK_SHORT (sLevel); + _THUNK_FLAT (pbBuffer); + _THUNK_SHORT (cbBuffer); + _THUNK_FLAT (pcbTotalAvail); + _THUNK_CALLI (_emx_32to16(_NetAccessGetInfo))); +} + +USHORT NetAccessSetInfo(PSZ pszServer, PSZ pszResource, USHORT sLevel, + PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum) +{ + return (USHORT) + (_THUNK_PROLOG (4+4+2+4+2+2); + _THUNK_FLAT (pszServer); + _THUNK_FLAT (pszResource); + _THUNK_SHORT (sLevel); + _THUNK_FLAT (pbBuffer); + _THUNK_SHORT (cbBuffer); + _THUNK_SHORT (sParmNum); + _THUNK_CALLI (_emx_32to16(_NetAccessSetInfo))); +} + +USHORT NetAccessAdd(PSZ pszServer, USHORT sLevel, + PVOID pbBuffer, USHORT cbBuffer) +{ + return (USHORT) + (_THUNK_PROLOG (4+2+4+2); + _THUNK_FLAT (pszServer); + _THUNK_SHORT (sLevel); + _THUNK_FLAT (pbBuffer); + _THUNK_SHORT (cbBuffer); + _THUNK_CALLI (_emx_32to16(_NetAccessAdd))); +} + +#else /* other 32-bit */ + +APIRET16 (* APIENTRY16 NetAccessGetInfo)(PCHAR16 pszServer, PCHAR16 pszResource, + USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer, PVOID16 pcbTotalAvail); +APIRET16 (* APIENTRY16 NetAccessSetInfo)(PCHAR16 pszServer, PCHAR16 pszResource, + USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer, USHORT sParmNum); +APIRET16 (* APIENTRY16 NetAccessAdd)(PCHAR16 pszServer, + USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer); + +#define _NetAccessGetInfo NetAccessGetInfo +#define _NetAccessSetInfo NetAccessSetInfo +#define _NetAccessAdd NetAccessAdd + +#if !defined(__IBMC__) || !defined(__TILED__) +#define _tmalloc malloc +#define _tfree free +#endif + +#endif +#else /* 16-bit */ + +USHORT (APIENTRY *NetAccessGetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail); +USHORT (APIENTRY *NetAccessSetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum); +USHORT (APIENTRY *NetAccessAdd)(PSZ pszServer, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer); + +#define _NetAccessGetInfo NetAccessGetInfo +#define _NetAccessSetInfo NetAccessSetInfo +#define _NetAccessAdd NetAccessAdd + +#define _tmalloc malloc +#define _tfree free + +#define DosQueryProcAddr(handle, ord, name, funcptr) \ + DosGetProcAddr(handle, name, funcptr) +#define DosQueryCurrentDir DosQCurDir +#define DosQueryCurrentDisk DosQCurDisk + +#endif + + +static BOOL acl_init(void) +{ + static BOOL initialized, netapi_avail; + HMODULE netapi; + char buf[256]; + + if (initialized) + return netapi_avail; + + initialized = TRUE; + + if (DosLoadModule(buf, sizeof(buf), "NETAPI", &netapi)) + return FALSE; + + if (DosQueryProcAddr(netapi, 0, "NETACCESSGETINFO", (PFN *) &_NetAccessGetInfo) || + DosQueryProcAddr(netapi, 0, "NETACCESSSETINFO", (PFN *) &_NetAccessSetInfo) || + DosQueryProcAddr(netapi, 0, "NETACCESSADD", (PFN *) &_NetAccessAdd)) + return FALSE; + +#if defined(__WATCOMC__) && defined(__386__) + NetAccessGetInfo = (PVOID) (ULONG) (PVOID16) NetAccessGetInfo; + NetAccessSetInfo = (PVOID) (ULONG) (PVOID16) NetAccessSetInfo; + NetAccessAdd = (PVOID) (ULONG) (PVOID16) NetAccessAdd; +#endif + + if ((path = _tmalloc(CCHMAXPATH)) == NULL) + return FALSE; + if ((data = _tmalloc(ACL_BUFFERSIZE)) == NULL) + return FALSE; + if ((ai = _tmalloc(sizeof(ACCINFO))) == NULL) + return -1; + + netapi_avail = TRUE; + + return netapi_avail; +} + +static void acl_mkpath(char *buffer, const char *source) +{ + char *ptr; + static char cwd[CCHMAXPATH]; + static U_INT cwdlen; + U_INT cdrive; + ULONG drivemap; + + if (isalpha(source[0]) && source[1] == ':') + buffer[0] = 0; /* fully qualified names */ + else + { + if (cwd[0] == 0) + { + DosQueryCurrentDisk(&cdrive, &drivemap); + cwd[0] = (char)(cdrive + '@'); + cwd[1] = ':'; + cwd[2] = '\\'; + cwdlen = sizeof(cwd) - 3; + DosQueryCurrentDir(0, cwd + 3, &cwdlen); + cwdlen = strlen(cwd); + } + + if (source[0] == '/' || source[0] == '\\') + { + if (source[1] == '/' || source[1] == '\\') + buffer[0] = 0; /* UNC names */ + else + { + strncpy(buffer, cwd, 2); + buffer[2] = 0; + } + } + else + { + strcpy(buffer, cwd); + if (cwd[cwdlen - 1] != '\\' && cwd[cwdlen - 1] != '/') + strcat(buffer, "/"); + } + } + + strcat(buffer, source); + + for (ptr = buffer; *ptr; ptr++) + if (*ptr == '/') + *ptr = '\\'; + + if (ptr[-1] == '\\') + ptr[-1] = 0; + + strupr(buffer); +} + +static int acl_bin2text(char *data, char *text) +{ + ACCINFO *ai; + ACCLIST *al; + U_INT cnt, offs; + + ai = (ACCINFO *) data; + al = (ACCLIST *) (data + sizeof(ACCINFO)); + + offs = sprintf(text, "ACL1:%X,%d\n", + ai -> acc_attr, ai -> acc_count); + + for (cnt = 0; cnt < ai -> acc_count; cnt++) + offs += sprintf(text + offs, "%s,%X\n", + al[cnt].acl_ugname, al[cnt].acl_access); + + return strlen(text); +} + +int acl_get(char *server, const char *resource, char *buffer) +{ + USHORT datalen; + PSZ srv = NULL; + int rc; + + if (!acl_init()) + return -1; + + if (server) + srv = server; + + acl_mkpath(path, resource); + datalen = 0; + + rc = NetAccessGetInfo(srv, path, 1, data, ACL_BUFFERSIZE, &datalen); + + if (rc == 0) + acl_bin2text(data, buffer); + + return rc; +} + +static int acl_text2bin(char *data, char *text, char *path) +{ + ACCINFO *ai; + ACCLIST *al; + char *ptr, *ptr2; + U_INT cnt; + + ai = (ACCINFO *) data; + ai -> acc_resource_name = PTR16(path); + + if (sscanf(text, "ACL1:%hX,%hd", + &ai -> acc_attr, &ai -> acc_count) != 2) + return ERROR_INVALID_PARAMETER; + + al = (ACCLIST *) (data + sizeof(ACCINFO)); + ptr = strchr(text, '\n') + 1; + + for (cnt = 0; cnt < ai -> acc_count; cnt++) + { + ptr2 = strchr(ptr, ','); + strncpy(al[cnt].acl_ugname, ptr, ptr2 - ptr); + al[cnt].acl_ugname[ptr2 - ptr] = 0; + sscanf(ptr2 + 1, "%hx", &al[cnt].acl_access); + ptr = strchr(ptr, '\n') + 1; + } + + return sizeof(ACCINFO) + ai -> acc_count * sizeof(ACCLIST); +} + +int acl_set(char *server, const char *resource, char *buffer) +{ + USHORT datalen; + PSZ srv = NULL; + + if (!acl_init()) + return -1; + + if (server) + srv = server; + + acl_mkpath(path, resource); + + ai -> acc_resource_name = PTR16(path); + ai -> acc_attr = 0; + ai -> acc_count = 0; + + NetAccessAdd(srv, 1, ai, sizeof(ACCINFO)); + /* Ignore any errors, most probably because ACL already exists. */ + /* In any such case, try updating the existing ACL. */ + + datalen = acl_text2bin(data, buffer, path); + + return NetAccessSetInfo(srv, path, 1, data, datalen, 0); +} + +/* end of os2acl.c */ diff --git a/utils/Install/packzip/process.c b/utils/Install/packzip/process.c new file mode 100644 index 0000000000..3fa023c904 --- /dev/null +++ b/utils/Install/packzip/process.c @@ -0,0 +1,1383 @@ +/*--------------------------------------------------------------------------- + + process.c + + This file contains the top-level routines for processing multiple zipfiles. + + Contains: process_zipfiles() + free_G_buffers() + do_seekable() + find_ecrec() + uz_end_central() + process_cdir_file_hdr() + get_cdir_ent() + process_local_file_hdr() + ef_scan_for_izux() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#ifdef WINDLL +# ifdef POCKET_UNZIP +# include "wince/intrface.h" +# else +# include "windll/windll.h" +# endif +#endif + +static int do_seekable OF((__GPRO__ int lastchance)); +static int find_ecrec OF((__GPRO__ long searchlen)); + +int files = 0; + +static ZCONST char Far CannotAllocateBuffers[] = + "error: cannot allocate unzip buffers\n"; + +#ifdef SFX + static ZCONST char Far CannotFindMyself[] = + "unzipsfx: cannot find myself! [%s]\n"; + +#else /* !SFX */ + /* process_zipfiles() strings */ +# if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) + static ZCONST char Far WarnInvalidTZ[] = + "Warning: TZ environment variable not found, cannot use UTC times!!\n"; +# endif + static ZCONST char Far FilesProcessOK[] = + "%d archive%s successfully processed.\n"; + static ZCONST char Far ArchiveWarning[] = + "%d archive%s had warnings but no fatal errors.\n"; + static ZCONST char Far ArchiveFatalError[] = + "%d archive%s had fatal errors.\n"; + static ZCONST char Far FileHadNoZipfileDir[] = + "%d file%s had no zipfile directory.\n"; + static ZCONST char Far ZipfileWasDir[] = "1 \"zipfile\" was a directory.\n"; + static ZCONST char Far ManyZipfilesWereDir[] = + "%d \"zipfiles\" were directories.\n"; + static ZCONST char Far NoZipfileFound[] = "No zipfiles found.\n"; + + /* do_seekable() strings */ +# ifdef UNIX + static ZCONST char Far CannotFindZipfileDirMsg[] = + "%s: cannot find zipfile directory in one of %s or\n\ + %s%s.zip, and cannot find %s, period.\n"; + static ZCONST char Far CannotFindEitherZipfile[] = + "%s: cannot find %s, %s.zip or %s.\n"; /* ", so there" removed 970918 */ +# else /* !UNIX */ +# ifndef AMIGA + static ZCONST char Far CannotFindWildcardMatch[] = + "%s: cannot find any matches for wildcard specification \"%s\".\n"; +# endif /* !AMIGA */ + static ZCONST char Far CannotFindZipfileDirMsg[] = + "%s: cannot find zipfile directory in %s,\n\ + %sand cannot find %s, period.\n"; + static ZCONST char Far CannotFindEitherZipfile[] = + "%s: cannot find either %s or %s.\n"; /* ", so there" removed 970918 */ +# endif /* ?UNIX */ + extern ZCONST char Far Zipnfo[]; /* in unzip.c */ +#ifndef WINDLL + static ZCONST char Far Unzip[] = "unzip"; +#else + static ZCONST char Far Unzip[] = "UnZip DLL"; +#endif + static ZCONST char Far MaybeExe[] = + "note: %s may be a plain executable, not an archive\n"; + static ZCONST char Far CentDirNotInZipMsg[] = "\n\ + [%s]:\n\ + Zipfile is disk %u of a multi-disk archive, and this is not the disk on\n\ + which the central zipfile directory begins (disk %u).\n"; + static ZCONST char Far EndCentDirBogus[] = + "\nwarning [%s]: end-of-central-directory record claims this\n\ + is disk %u but that the central directory starts on disk %u; this is a\n\ + contradiction. Attempting to process anyway.\n"; +# ifdef NO_MULTIPART + static ZCONST char Far NoMultiDiskArcSupport[] = + "\nerror [%s]: zipfile is part of multi-disk archive\n\ + (sorry, not yet supported).\n"; + static ZCONST char Far MaybePakBug[] = "warning [%s]:\ + zipfile claims to be 2nd disk of a 2-part archive;\n\ + attempting to process anyway. If no further errors occur, this archive\n\ + was probably created by PAK v2.51 or earlier. This bug was reported to\n\ + NoGate in March 1991 and was supposed to have been fixed by mid-1991; as\n\ + of mid-1992 it still hadn't been. (If further errors do occur, archive\n\ + was probably created by PKZIP 2.04c or later; UnZip does not yet support\n\ + multi-part archives.)\n"; +# else + static ZCONST char Far MaybePakBug[] = "warning [%s]:\ + zipfile claims to be last disk of a multi-part archive;\n\ + attempting to process anyway, assuming all parts have been concatenated\n\ + together in order. Expect \"errors\" and warnings...true multi-part support\ +\n doesn't exist yet (coming soon).\n"; +# endif + static ZCONST char Far ExtraBytesAtStart[] = + "warning [%s]: %ld extra byte%s at beginning or within zipfile\n\ + (attempting to process anyway)\n"; +#endif /* ?SFX */ + +static ZCONST char Far MissingBytes[] = + "error [%s]: missing %ld bytes in zipfile\n\ + (attempting to process anyway)\n"; +static ZCONST char Far NullCentDirOffset[] = + "error [%s]: NULL central directory offset\n\ + (attempting to process anyway)\n"; +static ZCONST char Far ZipfileEmpty[] = "warning [%s]: zipfile is empty\n"; +static ZCONST char Far CentDirStartNotFound[] = + "error [%s]: start of central directory not found;\n\ + zipfile corrupt.\n%s"; +#ifndef SFX + static ZCONST char Far CentDirTooLong[] = + "error [%s]: reported length of central directory is\n\ + %ld bytes too long (Atari STZip zipfile? J.H.Holm ZIPSPLIT 1.1\n\ + zipfile?). Compensating...\n"; + static ZCONST char Far CentDirEndSigNotFound[] = "\ + End-of-central-directory signature not found. Either this file is not\n\ + a zipfile, or it constitutes one disk of a multi-part archive. In the\n\ + latter case the central directory and zipfile comment will be found on\n\ + the last disk(s) of this archive.\n"; +#else /* SFX */ + static ZCONST char Far CentDirEndSigNotFound[] = + " End-of-central-directory signature not found.\n"; +#endif /* ?SFX */ +static ZCONST char Far ZipfileCommTrunc1[] = + "\ncaution: zipfile comment truncated\n"; + + + + +/*******************************/ +/* Function process_zipfiles() */ +/*******************************/ + +int process_zipfiles(__G) /* return PK-type error code */ + __GDEF +{ +#ifndef SFX + char *lastzipfn = (char *)NULL; + int NumWinFiles, NumLoseFiles, NumWarnFiles; + int NumMissDirs, NumMissFiles; +#endif + int error=0, error_in_archive=0; + + +/*--------------------------------------------------------------------------- + Start by allocating buffers and (re)constructing the various PK signature + strings. + ---------------------------------------------------------------------------*/ + + G.inbuf = (uch *)malloc(INBUFSIZ + 4); /* 4 extra for hold[] (below) */ + G.outbuf = (uch *)malloc(OUTBUFSIZ + 1); /* 1 extra for string term. */ + + if ((G.inbuf == (uch *)NULL) || (G.outbuf == (uch *)NULL)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotAllocateBuffers))); + return(PK_MEM); + } + G.hold = G.inbuf + INBUFSIZ; /* to check for boundary-spanning sigs */ +#ifndef VMS /* VMS uses its own buffer scheme for textmode flush(). */ +#ifdef SMALL_MEM + G.outbuf2 = G.outbuf+RAWBUFSIZ; /* never changes */ +#endif +#endif /* !VMS */ + +#if 0 /* CRC_32_TAB has been NULLified by CONSTRUCTGLOBALS !!!! */ + /* allocate the CRC table only later when we know we have a zipfile */ + CRC_32_TAB = NULL; +#endif /* 0 */ + + /* finish up initialization of magic signature strings */ + local_hdr_sig[0] /* = extd_local_sig[0] */ = 0x50; /* ASCII 'P', */ + central_hdr_sig[0] = end_central_sig[0] = 0x50; /* not EBCDIC */ + + local_hdr_sig[1] /* = extd_local_sig[1] */ = 0x4B; /* ASCII 'K', */ + central_hdr_sig[1] = end_central_sig[1] = 0x4B; /* not EBCDIC */ + +/*--------------------------------------------------------------------------- + Make sure timezone info is set correctly; localtime() returns GMT on + some OSes (e.g., Solaris 2.x) if this isn't done first. The ifdefs were + initially copied from dos_to_unix_time() in fileio.c. probably, they are + still too strict; any listed OS that supplies tzset(), regardless of + whether the function does anything, should be removed from the ifdefs. + ---------------------------------------------------------------------------*/ + +#if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) +# ifndef VALID_TIMEZONE +# define VALID_TIMEZONE(tmp) \ + (((tmp = getenv("TZ")) != NULL) && (*tmp != '\0')) +# endif + { + char *p; + G.tz_is_valid = VALID_TIMEZONE(p); +# ifndef SFX + if (!G.tz_is_valid) { + Info(slide, 0x401, ((char *)slide, LoadFarString(WarnInvalidTZ))); + error_in_archive = error = PK_WARN; + } +# endif /* !SFX */ + } +#endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */ + +/* For systems that do not have tzset() but supply this function using another + name (_tzset() or something similar), an appropiate "#define tzset ..." + should be added to the system specifc configuration section. */ +#if (!defined(T20_VMS) && !defined(MACOS) && !defined(RISCOS) && !defined(QDOS)) +#if (!defined(BSD) && !defined(MTS) && !defined(CMS_MVS) && !defined(TANDEM)) + tzset(); +#endif +#endif + +/*--------------------------------------------------------------------------- + Match (possible) wildcard zipfile specification with existing files and + attempt to process each. If no hits, try again after appending ".zip" + suffix. If still no luck, give up. + ---------------------------------------------------------------------------*/ + +#ifdef SFX + if ((error = do_seekable(__G__ 0)) == PK_NOZIP) { +#ifdef EXE_EXTENSION + int len=strlen(G.argv0); + + /* append .exe if appropriate; also .sfx? */ + if ( (G.zipfn = (char *)malloc(len+sizeof(EXE_EXTENSION))) != + (char *)NULL ) { + strcpy(G.zipfn, G.argv0); + strcpy(G.zipfn+len, EXE_EXTENSION); + error = do_seekable(__G__ 0); + free(G.zipfn); + G.zipfn = G.argv0; /* for "cannot find myself" message only */ + } +#endif /* EXE_EXTENSION */ +#ifdef WIN32 + G.zipfn = G.argv0; /* for "cannot find myself" message only */ +#endif + } + if (error) { + if (error == IZ_DIR) + error_in_archive = PK_NOZIP; + else + error_in_archive = error; + if (error == PK_NOZIP) + Info(slide, 1, ((char *)slide, LoadFarString(CannotFindMyself), + G.zipfn)); + } + +#else /* !SFX */ + NumWinFiles = NumLoseFiles = NumWarnFiles = 0; + files = NumMissDirs = NumMissFiles = 0; + + while ((G.zipfn = do_wild(__G__ G.wildzipfn)) != (char *)NULL) { + Trace((stderr, "do_wild( %s ) returns %s\n", G.wildzipfn, G.zipfn)); + + lastzipfn = G.zipfn; + + /* print a blank line between the output of different zipfiles */ + if (!uO.qflag && error != PK_NOZIP && error != IZ_DIR +#ifdef TIMESTAMP + && (!uO.T_flag || uO.zipinfo_mode) +#endif + && (NumWinFiles+NumLoseFiles+NumWarnFiles+NumMissFiles) > 0) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + + if ((error = do_seekable(__G__ 0)) == PK_WARN) + ++NumWarnFiles; + else if (error == IZ_DIR) + ++NumMissDirs; + else if (error == PK_NOZIP) + ++NumMissFiles; + else if (error) + ++NumLoseFiles; + else + ++NumWinFiles; + + if(!uO.vflag) + files = NumWinFiles; + + if (error != IZ_DIR && error > error_in_archive) + error_in_archive = error; + Trace((stderr, "do_seekable(0) returns %d\n", error)); +#ifdef WINDLL + if (error == IZ_CTRLC) { + free_G_buffers(__G); + return error; + } +#endif + + } /* end while-loop (wildcard zipfiles) */ + + if ((NumWinFiles + NumWarnFiles + NumLoseFiles) == 0 && + (NumMissDirs + NumMissFiles) == 1 && lastzipfn != (char *)NULL) + { + NumMissDirs = NumMissFiles = 0; + if (error_in_archive == PK_NOZIP) + error_in_archive = PK_COOL; + +#if (!defined(UNIX) && !defined(AMIGA)) /* filenames with wildcard characters */ + if (iswild(G.wildzipfn)) + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotFindWildcardMatch), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn)); + else +#endif + { + char *p = lastzipfn + strlen(lastzipfn); + + G.zipfn = lastzipfn; + strcpy(p, ZSUFX); + +#if defined(UNIX) || defined(QDOS) + /* only Unix has case-sensitive filesystems */ + /* Well FlexOS (sometimes) also has them, but support is per media */ + /* and a pig to code for, so treat as case insensitive for now */ + /* we do this under QDOS to check for .zip as well as _zip */ + if ((error = do_seekable(__G__ 0)) == PK_NOZIP || error == IZ_DIR) { + if (error == IZ_DIR) + ++NumMissDirs; + strcpy(p, ALT_ZSUFX); + error = do_seekable(__G__ 1); + } +#else + error = do_seekable(__G__ 1); +#endif + if (error == PK_WARN) /* GRR: make this a switch/case stmt ... */ + ++NumWarnFiles; + else if (error == IZ_DIR) + ++NumMissDirs; + else if (error == PK_NOZIP) + /* increment again => bug: "1 file had no zipfile directory." */ + /* ++NumMissFiles */ ; + else if (error) + ++NumLoseFiles; + else + ++NumWinFiles; + + if (error > error_in_archive) + error_in_archive = error; + Trace((stderr, "do_seekable(1) returns %d\n", error)); +#ifdef WINDLL + if (error == IZ_CTRLC) { + free_G_buffers(__G); + return error; + } +#endif + } + } +#endif /* ?SFX */ + +/*--------------------------------------------------------------------------- + Print summary of all zipfiles, assuming zipfile spec was a wildcard (no + need for a summary if just one zipfile). + ---------------------------------------------------------------------------*/ + +#ifndef SFX + if (iswild(G.wildzipfn) && uO.qflag < 3 +#ifdef TIMESTAMP + && !(uO.T_flag && uO.qflag && !uO.zipinfo_mode) +#endif + ) + { + if ((NumMissFiles + NumLoseFiles + NumWarnFiles > 0 || NumWinFiles != 1) +#ifdef TIMESTAMP + && !(uO.T_flag && !uO.zipinfo_mode) +#endif + && !(uO.tflag && uO.qflag > 1)) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0x401); + if ((NumWinFiles > 1) || (NumWinFiles == 1 && + NumMissDirs + NumMissFiles + NumLoseFiles + NumWarnFiles > 0)) + Info(slide, 0x401, ((char *)slide, LoadFarString(FilesProcessOK), + NumWinFiles, (NumWinFiles == 1)? " was" : "s were")); + if (NumWarnFiles > 0) + Info(slide, 0x401, ((char *)slide, LoadFarString(ArchiveWarning), + NumWarnFiles, (NumWarnFiles == 1)? "" : "s")); + if (NumLoseFiles > 0) + Info(slide, 0x401, ((char *)slide, LoadFarString(ArchiveFatalError), + NumLoseFiles, (NumLoseFiles == 1)? "" : "s")); + if (NumMissFiles > 0) + Info(slide, 0x401, ((char *)slide, + LoadFarString(FileHadNoZipfileDir), NumMissFiles, + (NumMissFiles == 1)? "" : "s")); + if (NumMissDirs == 1) + Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileWasDir))); + else if (NumMissDirs > 0) + Info(slide, 0x401, ((char *)slide, + LoadFarString(ManyZipfilesWereDir), NumMissDirs)); + if (NumWinFiles + NumLoseFiles + NumWarnFiles == 0) + Info(slide, 0x401, ((char *)slide, LoadFarString(NoZipfileFound))); + } +#endif /* !SFX */ + + /* free allocated memory */ + free_G_buffers(__G); + + return error_in_archive; + +} /* end function process_zipfiles() */ + + + + + +/*****************************/ +/* Function free_G_buffers() */ +/*****************************/ + +void free_G_buffers(__G) /* releases all memory allocated in global vars */ + __GDEF +{ + inflate_free(__G); + checkdir(__G__ (char *)NULL, END); + +#ifdef DYNALLOC_CRCTAB + if (CRC_32_TAB) { + free_crc_table(); + CRC_32_TAB = NULL; + } +#endif + + if (G.key != (char *)NULL) { + free(G.key); + G.key = (char *)NULL; + } + +#if (!defined(VMS) && !defined(SMALL_MEM)) + /* VMS uses its own buffer scheme for textmode flush() */ + if (G.outbuf2) { + free(G.outbuf2); /* malloc'd ONLY if unshrink and -a */ + G.outbuf2 = (uch *)NULL; + } +#endif + + if (G.outbuf) + free(G.outbuf); + if (G.inbuf) + free(G.inbuf); + G.inbuf = G.outbuf = (uch *)NULL; + +#ifdef MALLOC_WORK + if (G.area.Slide) { + free(G.area.Slide); + G.area.Slide = (uch *)NULL; + } +#endif + +} /* end function free_G_buffers() */ + + + + + +/**************************/ +/* Function do_seekable() */ +/**************************/ + +static int do_seekable(__G__ lastchance) /* return PK-type error code */ + __GDEF + int lastchance; +{ +#ifndef SFX + /* static int no_ecrec = FALSE; SKM: moved to globals.h */ + int maybe_exe=FALSE; + int too_weird_to_continue=FALSE; +#ifdef TIMESTAMP + time_t uxstamp; + unsigned nmember = 0; +#endif +#endif + int error=0, error_in_archive; + + +/*--------------------------------------------------------------------------- + Open the zipfile for reading in BINARY mode to prevent CR/LF translation, + which would corrupt the bit streams. + ---------------------------------------------------------------------------*/ + + if (SSTAT(G.zipfn, &G.statbuf) || + (error = S_ISDIR(G.statbuf.st_mode)) != 0) + { +#ifndef SFX + if (lastchance) { +#if defined(UNIX) || defined(QDOS) + if (G.no_ecrec) + Info(slide, 1, ((char *)slide, + LoadFarString(CannotFindZipfileDirMsg), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, uO.zipinfo_mode? " " : "", G.wildzipfn, + G.zipfn)); + else + Info(slide, 1, ((char *)slide, + LoadFarString(CannotFindEitherZipfile), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, G.wildzipfn, G.zipfn)); +#else /* !UNIX */ + if (G.no_ecrec) + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotFindZipfileDirMsg), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, uO.zipinfo_mode? " " : "", G.zipfn)); + else + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotFindEitherZipfile), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, G.zipfn)); +#endif /* ?UNIX */ + } +#endif /* !SFX */ + return error? IZ_DIR : PK_NOZIP; + } + G.ziplen = G.statbuf.st_size; + +#ifndef SFX +#if defined(UNIX) || defined(DOS_OS2_W32) + if (G.statbuf.st_mode & S_IEXEC) /* no extension on Unix exes: might */ + maybe_exe = TRUE; /* find unzip, not unzip.zip; etc. */ +#endif +#endif /* !SFX */ + +#ifdef VMS + if (check_format(__G)) /* check for variable-length format */ + return PK_ERR; +#endif + + if (open_input_file(__G)) /* this should never happen, given */ + return PK_NOZIP; /* the stat() test above, but... */ + +/*--------------------------------------------------------------------------- + Find and process the end-of-central-directory header. UnZip need only + check last 65557 bytes of zipfile: comment may be up to 65535, end-of- + central-directory record is 18 bytes, and signature itself is 4 bytes; + add some to allow for appended garbage. Since ZipInfo is often used as + a debugging tool, search the whole zipfile if zipinfo_mode is true. + ---------------------------------------------------------------------------*/ + + /* initialize the CRC table pointer (once) */ + if (CRC_32_TAB == NULL) { + if ((CRC_32_TAB = get_crc_table()) == NULL) + return PK_MEM; + } + +#if (!defined(SFX) || defined(SFX_EXDIR)) + /* check out if specified extraction root directory exists */ + if (uO.exdir != (char *)NULL && G.extract_flag) { + G.create_dirs = !uO.fflag; + if ((error = checkdir(__G__ uO.exdir, ROOT)) > 2) + return error; /* out of memory, or file in way */ + } +#endif /* !SFX || SFX_EXDIR */ + + G.cur_zipfile_bufstart = 0; + G.inptr = G.inbuf; + +#if (!defined(WINDLL) && !defined(SFX)) +#ifdef TIMESTAMP + if (!uO.zipinfo_mode && !uO.qflag && !uO.T_flag) +#else + if (!uO.zipinfo_mode && !uO.qflag) +#endif +#ifdef WIN32 /* Win32 console may require codepage conversion for G.zipfn */ + Info(slide, 0, ((char *)slide, "Archive: %s\n", FnFilter1(G.zipfn))); +#else + Info(slide, 0, ((char *)slide, "Archive: %s\n", G.zipfn)); +#endif +#endif /* !WINDLL && !SFX */ + + if (( +#ifndef NO_ZIPINFO + uO.zipinfo_mode && + ((error_in_archive = find_ecrec(__G__ G.ziplen)) != 0 || + (error_in_archive = zi_end_central(__G)) > PK_WARN)) + || (!uO.zipinfo_mode && +#endif + ((error_in_archive = find_ecrec(__G__ MIN(G.ziplen,66000L))) != 0 || + (error_in_archive = uz_end_central(__G)) > PK_WARN))) + { + CLOSE_INFILE(); + +#ifdef SFX + ++lastchance; /* avoid picky compiler warnings */ + return error_in_archive; +#else + if (maybe_exe) + Info(slide, 0x401, ((char *)slide, LoadFarString(MaybeExe), + G.zipfn)); + if (lastchance) + return error_in_archive; + else { + G.no_ecrec = TRUE; /* assume we found wrong file: e.g., */ + return PK_NOZIP; /* unzip instead of unzip.zip */ + } +#endif /* ?SFX */ + } + + if ((uO.zflag > 0) && !uO.zipinfo_mode) { /* unzip: zflag = comment ONLY */ + CLOSE_INFILE(); + return error_in_archive; + } + +/*--------------------------------------------------------------------------- + Test the end-of-central-directory info for incompatibilities (multi-disk + archives) or inconsistencies (missing or extra bytes in zipfile). + ---------------------------------------------------------------------------*/ + +#ifdef NO_MULTIPART + error = !uO.zipinfo_mode && (G.ecrec.number_this_disk == 1) && + (G.ecrec.num_disk_start_cdir == 1); +#else + error = !uO.zipinfo_mode && (G.ecrec.number_this_disk != 0); +#endif + +#ifndef SFX + if (uO.zipinfo_mode && + G.ecrec.number_this_disk != G.ecrec.num_disk_start_cdir) + { + if (G.ecrec.number_this_disk > G.ecrec.num_disk_start_cdir) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentDirNotInZipMsg), G.zipfn, + G.ecrec.number_this_disk, G.ecrec.num_disk_start_cdir)); + error_in_archive = PK_FIND; + too_weird_to_continue = TRUE; + } else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(EndCentDirBogus), G.zipfn, + G.ecrec.number_this_disk, G.ecrec.num_disk_start_cdir)); + error_in_archive = PK_WARN; + } +#ifdef NO_MULTIPART /* concatenation of multiple parts works in some cases */ + } else if (!uO.zipinfo_mode && !error && G.ecrec.number_this_disk != 0) { + Info(slide, 0x401, ((char *)slide, LoadFarString(NoMultiDiskArcSupport), + G.zipfn)); + error_in_archive = PK_FIND; + too_weird_to_continue = TRUE; +#endif + } + + if (!too_weird_to_continue) { /* (relatively) normal zipfile: go for it */ + if (error) { + Info(slide, 0x401, ((char *)slide, LoadFarString(MaybePakBug), + G.zipfn)); + error_in_archive = PK_WARN; + } +#endif /* !SFX */ + if ((G.extra_bytes = G.real_ecrec_offset-G.expect_ecrec_offset) < + (LONGINT)0) + { + Info(slide, 0x401, ((char *)slide, LoadFarString(MissingBytes), + G.zipfn, (long)(-G.extra_bytes))); + error_in_archive = PK_ERR; + } else if (G.extra_bytes > 0) { + if ((G.ecrec.offset_start_central_directory == 0) && + (G.ecrec.size_central_directory != 0)) /* zip 1.5 -go bug */ + { + Info(slide, 0x401, ((char *)slide, + LoadFarString(NullCentDirOffset), G.zipfn)); + G.ecrec.offset_start_central_directory = G.extra_bytes; + G.extra_bytes = 0; + error_in_archive = PK_ERR; + } +#ifndef SFX + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExtraBytesAtStart), G.zipfn, + (long)G.extra_bytes, (G.extra_bytes == 1)? "":"s")); + error_in_archive = PK_WARN; + } +#endif /* !SFX */ + } + + /*----------------------------------------------------------------------- + Check for empty zipfile and exit now if so. + -----------------------------------------------------------------------*/ + + if (G.expect_ecrec_offset==0L && G.ecrec.size_central_directory==0) { + if (uO.zipinfo_mode) + Info(slide, 0, ((char *)slide, "%sEmpty zipfile.\n", + uO.lflag>9? "\n " : "")); + else + Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileEmpty), + G.zipfn)); + CLOSE_INFILE(); + return (error_in_archive > PK_WARN)? error_in_archive : PK_WARN; + } + + /*----------------------------------------------------------------------- + Compensate for missing or extra bytes, and seek to where the start + of central directory should be. If header not found, uncompensate + and try again (necessary for at least some Atari archives created + with STZip, as well as archives created by J.H. Holm's ZIPSPLIT 1.1). + -----------------------------------------------------------------------*/ + + ZLSEEK( G.ecrec.offset_start_central_directory ) +#ifdef OLD_SEEK_TEST + if (readbuf(G.sig, 4) == 0) { + CLOSE_INFILE(); + return PK_ERR; /* file may be locked, or possibly disk error(?) */ + } + if (strncmp(G.sig, central_hdr_sig, 4)) +#else + if ((readbuf(__G__ G.sig, 4) == 0) || + strncmp(G.sig, central_hdr_sig, 4)) +#endif + { +#ifndef SFX + long tmp = G.extra_bytes; +#endif + + G.extra_bytes = 0; + ZLSEEK( G.ecrec.offset_start_central_directory ) + if ((readbuf(__G__ G.sig, 4) == 0) || + strncmp(G.sig, central_hdr_sig, 4)) + { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentDirStartNotFound), G.zipfn, + LoadFarStringSmall(ReportMsg))); + CLOSE_INFILE(); + return PK_BADERR; + } +#ifndef SFX + Info(slide, 0x401, ((char *)slide, LoadFarString(CentDirTooLong), + G.zipfn, -tmp)); +#endif + error_in_archive = PK_ERR; + } + + /*----------------------------------------------------------------------- + Seek to the start of the central directory one last time, since we + have just read the first entry's signature bytes; then list, extract + or test member files as instructed, and close the zipfile. + -----------------------------------------------------------------------*/ + + Trace((stderr, "about to extract/list files (error = %d)\n", + error_in_archive)); + + ZLSEEK( G.ecrec.offset_start_central_directory ) + +#ifdef DLL + /* G.fValidate is used only to look at an archive to see if + it appears to be a valid archive. There is no interest + in what the archive contains, nor in validating that the + entries in the archive are in good condition. This is + currently used only in the Windows DLLs for purposes of + checking archives within an archive to determine whether + or not to display the inner archives. + */ + if (!G.fValidate) +#endif + { +#ifndef NO_ZIPINFO + if (uO.zipinfo_mode) + error = zipinfo(__G); /* ZIPINFO 'EM */ + else +#endif +#ifndef SFX +#ifdef TIMESTAMP + if (uO.T_flag) + error = get_time_stamp(__G__ &uxstamp, &nmember); + else +#endif + if (uO.vflag && !uO.tflag && !uO.cflag) + error = list_files(__G); /* LIST 'EM */ + else +#endif /* !SFX */ + error = extract_or_test_files(__G); /* EXTRACT OR TEST 'EM */ + + Trace((stderr, "done with extract/list files (error = %d)\n", + error)); + } + + if (error > error_in_archive) /* don't overwrite stronger error */ + error_in_archive = error; /* with (for example) a warning */ +#ifndef SFX + } /* end if (!too_weird_to_continue) */ +#endif + + CLOSE_INFILE(); + +#ifdef TIMESTAMP + if (uO.T_flag && !uO.zipinfo_mode && (nmember > 0)) { +# ifdef WIN32 + if (stamp_file(__G__ G.zipfn, uxstamp)) { /* TIME-STAMP 'EM */ +# else + if (stamp_file(G.zipfn, uxstamp)) { /* TIME-STAMP 'EM */ +# endif + Info(slide, 0x201, ((char *)slide, + "warning: cannot set time for %s\n", G.zipfn)); + if (error_in_archive < PK_WARN) + error_in_archive = PK_WARN; + } + } +#endif + return error_in_archive; + +} /* end function do_seekable() */ + + + + + +/*************************/ +/* Function find_ecrec() */ +/*************************/ + +static int find_ecrec(__G__ searchlen) /* return PK-class error */ + __GDEF + long searchlen; +{ + int i, numblks, found=FALSE; + LONGINT tail_len; + ec_byte_rec byterec; + + +/*--------------------------------------------------------------------------- + Treat case of short zipfile separately. + ---------------------------------------------------------------------------*/ + + if (G.ziplen <= INBUFSIZ) { + lseek(G.zipfd, 0L, SEEK_SET); + if ((G.incnt = read(G.zipfd,(char *)G.inbuf,(unsigned int)G.ziplen)) + == (int)G.ziplen) + + /* 'P' must be at least 22 bytes from end of zipfile */ + for (G.inptr = G.inbuf+(int)G.ziplen-22; G.inptr >= G.inbuf; + --G.inptr) + if ((native(*G.inptr) == 'P') && + !strncmp((char *)G.inptr, end_central_sig, 4)) { + G.incnt -= (int)(G.inptr - G.inbuf); + found = TRUE; + break; + } + +/*--------------------------------------------------------------------------- + Zipfile is longer than INBUFSIZ: may need to loop. Start with short + block at end of zipfile (if not TOO short). + ---------------------------------------------------------------------------*/ + + } else { + if ((tail_len = G.ziplen % INBUFSIZ) > ECREC_SIZE) { +#ifdef USE_STRM_INPUT + fseek((FILE *)G.zipfd, G.ziplen-tail_len, SEEK_SET); + G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); +#else /* !USE_STRM_INPUT */ + G.cur_zipfile_bufstart = lseek(G.zipfd, G.ziplen-tail_len, + SEEK_SET); +#endif /* ?USE_STRM_INPUT */ + if ((G.incnt = read(G.zipfd, (char *)G.inbuf, + (unsigned int)tail_len)) != (int)tail_len) + goto fail; /* it's expedient... */ + + /* 'P' must be at least 22 bytes from end of zipfile */ + for (G.inptr = G.inbuf+(int)tail_len-22; G.inptr >= G.inbuf; + --G.inptr) + if ((native(*G.inptr) == 'P') && + !strncmp((char *)G.inptr, end_central_sig, 4)) { + G.incnt -= (int)(G.inptr - G.inbuf); + found = TRUE; + break; + } + /* sig may span block boundary: */ + strncpy((char *)G.hold, (char *)G.inbuf, 3); + } else + G.cur_zipfile_bufstart = G.ziplen - tail_len; + + /*----------------------------------------------------------------------- + Loop through blocks of zipfile data, starting at the end and going + toward the beginning. In general, need not check whole zipfile for + signature, but may want to do so if testing. + -----------------------------------------------------------------------*/ + + numblks = (int)((searchlen - tail_len + (INBUFSIZ-1)) / INBUFSIZ); + /* ==amount= ==done== ==rounding== =blksiz= */ + + for (i = 1; !found && (i <= numblks); ++i) { + G.cur_zipfile_bufstart -= INBUFSIZ; + lseek(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET); + if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) + != INBUFSIZ) + break; /* fall through and fail */ + + for (G.inptr = G.inbuf+INBUFSIZ-1; G.inptr >= G.inbuf; + --G.inptr) + if ((native(*G.inptr) == 'P') && + !strncmp((char *)G.inptr, end_central_sig, 4)) { + G.incnt -= (int)(G.inptr - G.inbuf); + found = TRUE; + break; + } + /* sig may span block boundary: */ + strncpy((char *)G.hold, (char *)G.inbuf, 3); + } + } /* end if (ziplen > INBUFSIZ) */ + +/*--------------------------------------------------------------------------- + Searched through whole region where signature should be without finding + it. Print informational message and die a horrible death. + ---------------------------------------------------------------------------*/ + +fail: + if (!found) { + if (uO.qflag || uO.zipinfo_mode) + Info(slide, 0x401, ((char *)slide, "[%s]\n", G.zipfn)); + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentDirEndSigNotFound))); + return PK_ERR; /* failed */ + } + +/*--------------------------------------------------------------------------- + Found the signature, so get the end-central data before returning. Do + any necessary machine-type conversions (byte ordering, structure padding + compensation) by reading data into character array and copying to struct. + ---------------------------------------------------------------------------*/ + + G.real_ecrec_offset = G.cur_zipfile_bufstart + (G.inptr-G.inbuf); +#ifdef TEST + pipeit("\n found end-of-central-dir signature at offset %ld (%.8lXh)\n", + G.real_ecrec_offset, G.real_ecrec_offset); + pipeit(" from beginning of file; offset %d (%.4Xh) within block\n", + G.inptr-G.inbuf, G.inptr-G.inbuf); +#endif + + if (readbuf(__G__ (char *)byterec, ECREC_SIZE+4) == 0) + return PK_EOF; + + G.ecrec.number_this_disk = + makeword(&byterec[NUMBER_THIS_DISK]); + G.ecrec.num_disk_start_cdir = + makeword(&byterec[NUM_DISK_WITH_START_CENTRAL_DIR]); + G.ecrec.num_entries_centrl_dir_ths_disk = + makeword(&byterec[NUM_ENTRIES_CENTRL_DIR_THS_DISK]); + G.ecrec.total_entries_central_dir = + makeword(&byterec[TOTAL_ENTRIES_CENTRAL_DIR]); + G.ecrec.size_central_directory = + makelong(&byterec[SIZE_CENTRAL_DIRECTORY]); + G.ecrec.offset_start_central_directory = + makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]); + G.ecrec.zipfile_comment_length = + makeword(&byterec[ZIPFILE_COMMENT_LENGTH]); + + G.expect_ecrec_offset = G.ecrec.offset_start_central_directory + + G.ecrec.size_central_directory; + return PK_COOL; + +} /* end function find_ecrec() */ + + + + + +/*****************************/ +/* Function uz_end_central() */ +/*****************************/ + +int uz_end_central(__G) /* return PK-type error code */ + __GDEF +{ + int error = PK_COOL; + + +/*--------------------------------------------------------------------------- + Get the zipfile comment (up to 64KB long), if any, and print it out. + Then position the file pointer to the beginning of the central directory + and fill buffer. + ---------------------------------------------------------------------------*/ + +#ifdef WINDLL + /* for comment button: */ + if ((!G.fValidate) && (G.lpUserFunctions != NULL)) + G.lpUserFunctions->cchComment = G.ecrec.zipfile_comment_length; + if (G.ecrec.zipfile_comment_length && (uO.zflag > 0)) +#else /* !WINDLL */ + if (G.ecrec.zipfile_comment_length && (uO.zflag > 0 || + (uO.zflag == 0 && +#ifdef TIMESTAMP + !uO.T_flag && +#endif + !uO.qflag))) +#endif /* ?WINDLL */ + { + if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ZipfileCommTrunc1))); + error = PK_WARN; + } + } + return error; + +} /* end function uz_end_central() */ + + + + + +/************************************/ +/* Function process_cdir_file_hdr() */ +/************************************/ + +int process_cdir_file_hdr(__G) /* return PK-type error code */ + __GDEF +{ + int error; + + +/*--------------------------------------------------------------------------- + Get central directory info, save host and method numbers, and set flag + for lowercase conversion of filename, depending on the OS from which the + file is coming. + ---------------------------------------------------------------------------*/ + + if ((error = get_cdir_ent(__G)) != 0) + return error; + + G.pInfo->hostnum = MIN(G.crec.version_made_by[1], NUM_HOSTS); +/* extnum = MIN(crec.version_needed_to_extract[1], NUM_HOSTS); */ + + G.pInfo->lcflag = 0; + if (uO.L_flag) /* user specified case-conversion */ + switch (G.pInfo->hostnum) { + case FS_FAT_: /* PKZIP and zip -k store in uppercase */ + case CPM_: /* like MS-DOS, right? */ + case VM_CMS_: /* all caps? */ + case MVS_: /* all caps? */ + case TANDEM_: + case TOPS20_: + case VMS_: /* our Zip uses lowercase, but ASi's doesn't */ + /* case Z_SYSTEM_: ? */ + /* case QDOS_: ? */ + G.pInfo->lcflag = 1; /* convert filename to lowercase */ + break; + + default: /* AMIGA_, FS_HPFS_, FS_NTFS_, MAC_, UNIX_, ATARI_, */ + break; /* FS_VFAT_, BEOS_ (Z_SYSTEM_): no conversion */ + } + + /* do Amigas (AMIGA_) also have volume labels? */ + if (IS_VOLID(G.crec.external_file_attributes) && + (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ || + G.pInfo->hostnum == FS_NTFS_ || G.pInfo->hostnum == ATARI_)) + { + G.pInfo->vollabel = TRUE; + G.pInfo->lcflag = 0; /* preserve case of volume labels */ + } else + G.pInfo->vollabel = FALSE; + + return PK_COOL; + +} /* end function process_cdir_file_hdr() */ + + + + + +/***************************/ +/* Function get_cdir_ent() */ +/***************************/ + +int get_cdir_ent(__G) /* return PK-type error code */ + __GDEF +{ + cdir_byte_hdr byterec; + + +/*--------------------------------------------------------------------------- + Read the next central directory entry and do any necessary machine-type + conversions (byte ordering, structure padding compensation--do so by + copying the data from the array into which it was read (byterec) to the + usable struct (crec)). + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ (char *)byterec, CREC_SIZE) == 0) + return PK_EOF; + + G.crec.version_made_by[0] = byterec[C_VERSION_MADE_BY_0]; + G.crec.version_made_by[1] = byterec[C_VERSION_MADE_BY_1]; + G.crec.version_needed_to_extract[0] = + byterec[C_VERSION_NEEDED_TO_EXTRACT_0]; + G.crec.version_needed_to_extract[1] = + byterec[C_VERSION_NEEDED_TO_EXTRACT_1]; + + G.crec.general_purpose_bit_flag = + makeword(&byterec[C_GENERAL_PURPOSE_BIT_FLAG]); + G.crec.compression_method = + makeword(&byterec[C_COMPRESSION_METHOD]); + G.crec.last_mod_dos_datetime = + makelong(&byterec[C_LAST_MOD_DOS_DATETIME]); + G.crec.crc32 = + makelong(&byterec[C_CRC32]); + G.crec.csize = + makelong(&byterec[C_COMPRESSED_SIZE]); + G.crec.ucsize = + makelong(&byterec[C_UNCOMPRESSED_SIZE]); + G.crec.filename_length = + makeword(&byterec[C_FILENAME_LENGTH]); + G.crec.extra_field_length = + makeword(&byterec[C_EXTRA_FIELD_LENGTH]); + G.crec.file_comment_length = + makeword(&byterec[C_FILE_COMMENT_LENGTH]); + G.crec.disk_number_start = + makeword(&byterec[C_DISK_NUMBER_START]); + G.crec.internal_file_attributes = + makeword(&byterec[C_INTERNAL_FILE_ATTRIBUTES]); + G.crec.external_file_attributes = + makelong(&byterec[C_EXTERNAL_FILE_ATTRIBUTES]); /* LONG, not word! */ + G.crec.relative_offset_local_header = + makelong(&byterec[C_RELATIVE_OFFSET_LOCAL_HEADER]); + + return PK_COOL; + +} /* end function get_cdir_ent() */ + + + + + +/*************************************/ +/* Function process_local_file_hdr() */ +/*************************************/ + +int process_local_file_hdr(__G) /* return PK-type error code */ + __GDEF +{ + local_byte_hdr byterec; + + +/*--------------------------------------------------------------------------- + Read the next local file header and do any necessary machine-type con- + versions (byte ordering, structure padding compensation--do so by copy- + ing the data from the array into which it was read (byterec) to the + usable struct (lrec)). + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ (char *)byterec, LREC_SIZE) == 0) + return PK_EOF; + + G.lrec.version_needed_to_extract[0] = + byterec[L_VERSION_NEEDED_TO_EXTRACT_0]; + G.lrec.version_needed_to_extract[1] = + byterec[L_VERSION_NEEDED_TO_EXTRACT_1]; + + G.lrec.general_purpose_bit_flag = + makeword(&byterec[L_GENERAL_PURPOSE_BIT_FLAG]); + G.lrec.compression_method = makeword(&byterec[L_COMPRESSION_METHOD]); + G.lrec.last_mod_dos_datetime = makelong(&byterec[L_LAST_MOD_DOS_DATETIME]); + G.lrec.crc32 = makelong(&byterec[L_CRC32]); + G.lrec.csize = makelong(&byterec[L_COMPRESSED_SIZE]); + G.lrec.ucsize = makelong(&byterec[L_UNCOMPRESSED_SIZE]); + G.lrec.filename_length = makeword(&byterec[L_FILENAME_LENGTH]); + G.lrec.extra_field_length = makeword(&byterec[L_EXTRA_FIELD_LENGTH]); + + G.csize = (long) G.lrec.csize; + G.ucsize = (long) G.lrec.ucsize; + + if ((G.lrec.general_purpose_bit_flag & 8) != 0) { + /* can't trust local header, use central directory: */ + G.lrec.crc32 = G.pInfo->crc; + G.csize = (long)(G.lrec.csize = G.pInfo->compr_size); + G.ucsize = (long)(G.lrec.ucsize = G.pInfo->uncompr_size); + } + + return PK_COOL; + +} /* end function process_local_file_hdr() */ + + +#ifdef USE_EF_UT_TIME + +/*******************************/ +/* Function ef_scan_for_izux() */ +/*******************************/ + +unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime, + z_utim, z_uidgid) + uch *ef_buf; /* buffer containing extra field */ + unsigned ef_len; /* total length of extra field */ + int ef_is_c; /* flag indicating "is central extra field" */ + ulg dos_mdatetime; /* last_mod_file_date_time in DOS format */ + iztimes *z_utim; /* return storage: atime, mtime, ctime */ + ush *z_uidgid; /* return storage: uid and gid */ +{ + unsigned flags = 0; + unsigned eb_id; + unsigned eb_len; + int have_new_type_eb = FALSE; + int ut_zip_unzip_compatible = FALSE; + +/*--------------------------------------------------------------------------- + This function scans the extra field for EF_TIME, EF_IZUNIX2, EF_IZUNIX, or + EF_PKUNIX blocks containing Unix-style time_t (GMT) values for the entry's + access, creation, and modification time. + If a valid block is found, the time stamps are copied to the iztimes + structure (provided the z_utim pointer is not NULL). + If a IZUNIX2 block is found or the IZUNIX block contains UID/GID fields, + and the z_uidgid array pointer is valid (!= NULL), the owner info is + transfered as well. + The presence of an EF_TIME or EF_IZUNIX2 block results in ignoring all + data from probably present obsolete EF_IZUNIX blocks. + If multiple blocks of the same type are found, only the information from + the last block is used. + The return value is a combination of the EF_TIME Flags field with an + additional flag bit indicating the presence of valid UID/GID info, + or 0 in case of failure. + ---------------------------------------------------------------------------*/ + + if (ef_len == 0 || ef_buf == NULL || (z_utim == 0 && z_uidgid == NULL)) + return 0; + + TTrace((stderr,"\nef_scan_for_izux: scanning extra field of length %u\n", + ef_len)); + + while (ef_len >= EB_HEADSIZE) { + eb_id = makeword(EB_ID + ef_buf); + eb_len = makeword(EB_LEN + ef_buf); + + if (eb_len > (ef_len - EB_HEADSIZE)) { + /* discovered some extra field inconsistency! */ + TTrace((stderr, + "ef_scan_for_izux: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } + + switch (eb_id) { + case EF_TIME: + flags &= ~0x0ff; /* ignore previous IZUNIX or EF_TIME fields */ + have_new_type_eb = TRUE; + if ( eb_len >= EB_UT_MINLEN && z_utim != NULL) { + unsigned eb_idx = EB_UT_TIME1; + TTrace((stderr,"ef_scan_for_izux: found TIME extra field\n")); + flags |= (ef_buf[EB_HEADSIZE+EB_UT_FLAGS] & 0x0ff); + if ((flags & EB_UT_FL_MTIME)) { + if ((eb_idx+4) <= eb_len) { + z_utim->mtime = makelong((EB_HEADSIZE+eb_idx) + ef_buf); + eb_idx += 4; + TTrace((stderr," UT e.f. modification time = %ld\n", + z_utim->mtime)); + + if ((ulg)(z_utim->mtime) & (ulg)(0x80000000L)) { + ut_zip_unzip_compatible = + ((time_t)0x80000000L < (time_t)0L) + ? (dos_mdatetime == DOSTIME_MINIMUM) + : (dos_mdatetime >= DOSTIME_2038_01_18); + if (!ut_zip_unzip_compatible) { + /* UnZip interpretes mtime differently than Zip; + without modtime: ignore complete UT field */ + flags &= ~0x0ff; /* no time_t times available */ + TTrace((stderr, + " UT modtime range error; ignore e.f.!\n")); + break; /* stop scanning this field */ + } + } else { + /* cannot determine, safe assumption is FALSE */ + ut_zip_unzip_compatible = FALSE; + } + } else { + flags &= ~EB_UT_FL_MTIME; + TTrace((stderr," UT e.f. truncated; no modtime\n")); + } + } + if (ef_is_c) { + break; /* central version of TIME field ends here */ + } + + if (flags & EB_UT_FL_ATIME) { + if ((eb_idx+4) <= eb_len) { + z_utim->atime = makelong((EB_HEADSIZE+eb_idx) + ef_buf); + eb_idx += 4; + TTrace((stderr," UT e.f. access time = %ld\n", + z_utim->atime)); + if (((ulg)(z_utim->atime) & (ulg)(0x80000000L)) && + !ut_zip_unzip_compatible) { + flags &= ~EB_UT_FL_ATIME; + TTrace((stderr, + " UT access time range error: skip time!\n")); + } + } else { + flags &= ~EB_UT_FL_ATIME; + } + } + if (flags & EB_UT_FL_CTIME) { + if ((eb_idx+4) <= eb_len) { + z_utim->ctime = makelong((EB_HEADSIZE+eb_idx) + ef_buf); + TTrace((stderr," UT e.f. creation time = %ld\n", + z_utim->ctime)); + if (((ulg)(z_utim->ctime) & (ulg)(0x80000000L)) && + !ut_zip_unzip_compatible) { + flags &= ~EB_UT_FL_CTIME; + TTrace((stderr, + " UT creation time range error: skip time!\n")); + } + } else { + flags &= ~EB_UT_FL_CTIME; + } + } + } + break; + + case EF_IZUNIX2: + if (!have_new_type_eb) { + flags &= ~0x0ff; /* ignore any previous IZUNIX field */ + have_new_type_eb = TRUE; + } + if (eb_len >= EB_UX2_MINLEN && z_uidgid != NULL) { + z_uidgid[0] = makeword((EB_HEADSIZE+EB_UX2_UID) + ef_buf); + z_uidgid[1] = makeword((EB_HEADSIZE+EB_UX2_GID) + ef_buf); + flags |= EB_UX2_VALID; /* signal success */ + } + break; + + case EF_IZUNIX: + case EF_PKUNIX: /* PKUNIX e.f. layout is identical to IZUNIX */ + if (eb_len >= EB_UX_MINLEN) { + TTrace((stderr,"ef_scan_for_izux: found %s extra field\n", + (eb_id == EF_IZUNIX ? "IZUNIX" : "PKUNIX"))); + if (have_new_type_eb) { + break; /* Ignore IZUNIX extra field block ! */ + } + if (z_utim != NULL) { + z_utim->atime = makelong((EB_HEADSIZE+EB_UX_ATIME)+ef_buf); + z_utim->mtime = makelong((EB_HEADSIZE+EB_UX_MTIME)+ef_buf); + TTrace((stderr," Unix EF actime = %ld\n", z_utim->atime)); + TTrace((stderr," Unix EF modtime = %ld\n", z_utim->mtime)); + flags |= (EB_UT_FL_MTIME | EB_UT_FL_ATIME); + if ((ulg)(z_utim->mtime) & (ulg)(0x80000000L)) { + ut_zip_unzip_compatible = + ((time_t)0x80000000L < (time_t)0L) + ? (dos_mdatetime == DOSTIME_MINIMUM) + : (dos_mdatetime >= DOSTIME_2038_01_18); + if (!ut_zip_unzip_compatible) { + /* UnZip interpretes mtime differently than Zip; + without modtime: ignore complete UT field */ + flags &= ~0x0ff; /* no time_t times available */ + TTrace((stderr, + " UX modtime range error: ignore e.f.!\n")); + } + } else { + /* cannot determine, safe assumption is FALSE */ + ut_zip_unzip_compatible = FALSE; + } + if ((ulg)(z_utim->atime) & (ulg)(0x80000000L) && + !ut_zip_unzip_compatible && (flags & 0x0ff)) { + /* atime not in range of UnZip's time_t */ + flags &= ~EB_UT_FL_ATIME; + TTrace((stderr, + " UX access time range error: skip time!\n")); + } + } + if (eb_len >= EB_UX_FULLSIZE && z_uidgid != NULL) { + z_uidgid[0] = makeword((EB_HEADSIZE+EB_UX_UID) + ef_buf); + z_uidgid[1] = makeword((EB_HEADSIZE+EB_UX_GID) + ef_buf); + flags |= EB_UX2_VALID; + } + } + break; + + default: + break; + } + + /* Skip this extra field block */ + ef_buf += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + } + + return flags; +} + +#endif /* USE_EF_UT_TIME */ diff --git a/utils/Install/packzip/rexxapi.c b/utils/Install/packzip/rexxapi.c new file mode 100644 index 0000000000..43b4ddde3e --- /dev/null +++ b/utils/Install/packzip/rexxapi.c @@ -0,0 +1,886 @@ +/********************************************************************** +* REXXAPI.C * +* * +* This program adds a ZIP engine directly to the REXX language. * +* The functions are: * +* UZDropFuncs -- Makes all functions in this package * +* unknown to REXX. * +* UZLoadFuncs -- Makes all functions in this package * +* known to REXX so REXX programs may * +* call them. * +* UZFileTree -- Searches for files matching a given * +* filespec, including files in * +* subdirectories. * +* UZUnZip -- Unzip command-line entry point. * +* This is functionally equivalent to * +* using Unzip as an external program. * +* UZUnZipToVar -- Unzip one file to a variable * +* UZUnZipToStem -- Unzip files to a variable array * +* UZVer -- Returns the Unzip version number * +* * +**********************************************************************/ +/* Include files */ + +#ifdef OS2DLL + +#define INCL_DOS +#define INCL_DOSMEMMGR +#include +#include +#include +#include + +#define UNZIP_INTERNAL +#include "../unzip.h" +#include "../version.h" + + +/*********************************************************************/ +/* Various definitions used by various functions. */ +/*********************************************************************/ + +RexxFunctionHandler UZDropFuncs; +RexxFunctionHandler UZLoadFuncs; +RexxFunctionHandler UZFileTree; +RexxFunctionHandler UZUnZip; +RexxFunctionHandler UZUnZipToVar; +RexxFunctionHandler UZUnZipToStem; +RexxFunctionHandler UZVer; +RexxFunctionHandler UZAPIVer; + + +int SetOutputVar(__GPRO__ const char *name); +int SetOutputVarStem(__GPRO__ const char *name); +int SetOutputVarLength(__GPRO); +int WriteToVariable(__GPRO__ const char *name, char *buffer, int len); +int PrintToSubVariable(__GPRO__ int idx, const char *format,...); +int PrintToVariable(__GPRO__ const char *name, const char *format,...); +int _PrintToVariable(__GPRO__ const char *name, const char *format, va_list arg_ptr); +int TextSetNext(__GPRO__ char *format, int len, int all); + +#define EZRXSTRING(r,p) {(r).strptr=(PCH)p;(r).strlength=(ULONG)strlen((r).strptr);} + + +/*********************************************************************/ +/* RxFncTable */ +/* Array of names of the UNZIPAPI functions. */ +/* This list is used for registration and deregistration. */ +/*********************************************************************/ + +static PSZ RxFncTable[] = + { + "UZDropFuncs", + "UZLoadFuncs", + "UZFileSearch", + "UZFileTree", + "UZUnZip", + "UZUnZipToVar", + "UZUnZipToStem", + "UZVer", + }; + +/*********************************************************************/ +/* Numeric Error Return Strings */ +/*********************************************************************/ + +#define NO_UTIL_ERROR "0" /* No error whatsoever */ +#define ERROR_NOMEM "2" /* Insufficient memory */ + +/*********************************************************************/ +/* Numeric Return calls */ +/*********************************************************************/ + +#define INVALID_ROUTINE 40 /* Raise Rexx error */ +#define VALID_ROUTINE 0 /* Successful completion */ + +/*********************************************************************/ +/* Some useful macros */ +/*********************************************************************/ + +#define BUILDRXSTRING(t, s) { \ + strcpy((t)->strptr,(s));\ + (t)->strlength = strlen((s)); \ +} + + +/*********************************************************************/ +/**************** UNZIPAPI Supporting Functions ********************/ +/**************** UNZIPAPI Supporting Functions ********************/ +/**************** UNZIPAPI Supporting Functions ********************/ +/*********************************************************************/ + + +int RexxReturn(__GPRO__ int nodefault, RXSTRING *retstr) +{ + int ret = G.os2.rexx_error; + if (G.filenotfound) + G.os2.rexx_mes = "file not found"; + if (*G.os2.rexx_mes != '0') { + if (retstr->strlength > 255) { + DosFreeMem(retstr->strptr); + retstr->strptr = NULL; + } + } else if (nodefault) + goto noBuild; + BUILDRXSTRING(retstr, G.os2.rexx_mes); + noBuild: + DESTROYGLOBALS(); + return ret; +} + +/* Get a variable from REXX, return 0 if OK */ +int GetVariable(__GPRO__ const char *name) +{ + G.os2.request.shvnext = NULL; + EZRXSTRING(G.os2.request.shvname, name); + G.os2.request.shvnamelen = G.os2.request.shvname.strlength; + G.os2.request.shvvalue.strptr = G.os2.buffer; + G.os2.request.shvvalue.strlength = IBUF_LEN; + G.os2.request.shvvaluelen = IBUF_LEN; + G.os2.request.shvcode = RXSHV_SYFET; + G.os2.request.shvret = 0; + switch (RexxVariablePool(&G.os2.request)) { + case RXSHV_MEMFL: + G.os2.rexx_mes = ERROR_NOMEM; + break; + case RXSHV_BADN: + case RXSHV_NEWV: + G.os2.request.shvvaluelen = 0; + case RXSHV_OK: + *(G.os2.buffer+G.os2.request.shvvaluelen) = 0; + return G.os2.request.shvvaluelen; + } + return 0; +} + + +/* Get REXX compound variable */ +/* Stem must exist in G.os2.getvar_buf w/ length in G.os2.getvar_len */ +int GetVariableIndex(__GPRO__ int index) +{ + sprintf(G.os2.getvar_buf+G.os2.getvar_len,"%d",index); + return GetVariable(__G__ G.os2.getvar_buf); +} + + +/* Transfer REXX array to standard C string array */ +/* Returns number of elements */ +/* User is responsible for calling KillStringArray */ + +int CompoundToStringArray(__GPRO__ char ***pointer, const char *name) +{ + int count; + int total; + char **trav; + + G.os2.getvar_len = strlen(name); + memcpy(G.os2.getvar_buf,name,G.os2.getvar_len+1); + if (*(G.os2.getvar_buf+G.os2.getvar_len-1) != '.') + *(G.os2.getvar_buf+G.os2.getvar_len++) = '.', *(G.os2.getvar_buf+G.os2.getvar_len) = 0; + + if (GetVariableIndex(__G__ 0)) + return 0; + + total = atoi(G.os2.buffer); + *pointer = (char **)malloc((total+1)<<2); + trav = *pointer; + for (count = 1; count <= total; count++) { + GetVariableIndex(__G__ count); + trav[count-1] = (char *)malloc(strlen(G.os2.buffer)+1); + strcpy(trav[count-1],G.os2.buffer); + } + trav[count-1] = NULL; + return total; +} + + +/* Kill string array created by CompoundToStringArray */ + +void KillStringArray(char **pointer) +{ + char **trav=pointer; + while (*trav != NULL) { + free(*trav); + trav++; + } + free(pointer); +} + + +/************************************************************************* +* Function: UZDropFuncs * +* * +* Syntax: call UZDropFuncs * +* * +* Return: NO_UTIL_ERROR - Successful. * +*************************************************************************/ + +ULONG UZDropFuncs(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + INT entries; /* Num of entries */ + INT j; /* Counter */ + + if (numargs != 0) /* no arguments for this */ + return INVALID_ROUTINE; /* raise an error */ + + retstr->strlength = 0; /* return a null string result*/ + + entries = sizeof(RxFncTable)/sizeof(PSZ); + + for (j = 0; j < entries; j++) + RexxDeregisterFunction(RxFncTable[j]); + + return VALID_ROUTINE; /* no error on call */ +} + + +/************************************************************************* +* Function: UZFileTree * +* * +* Syntax: call UZFileTree zipfile, stem[, include-filespec] * +* [, exclude-filespec][, options] * +* * +* Params: zipfile - Name of zip file to search. * +* stem - Name of stem var to store results in. * +* include - Filespec to search for (may include * and ?). * +* exclude - Filespec to exclude (may include * and ?). * +* options - Either of the following: * +* 'F' - Give file statistics. * +* Length Date Time Name * +* 'Z' - Give zip statistics, too. * +* Length Method Size Ratio Date Time CRC-32 Name* +* Default is to return only filenames * +* * +* Return: NO_UTIL_ERROR - Successful. * +* ERROR_NOMEM - Out of memory. * +*************************************************************************/ + +ULONG UZFileTree(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + /* validate arguments */ + char *incname[2]; + char *excname[2]; + CONSTRUCTGLOBALS(); + + if (numargs < 2 || numargs > 5 || + !RXVALIDSTRING(args[0]) || + !RXVALIDSTRING(args[1]) || + args[0].strlength > 255) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + /* initialize data area */ + SetOutputVarStem(__G__ args[1].strptr); + G.wildzipfn = args[0].strptr; + G.process_all_files = TRUE; + + uO.lflag = 1; + uO.zipinfo_mode = TRUE; + uO.C_flag = 1; + G.extract_flag = FALSE; + uO.qflag = 2; + + if (numargs >= 3 && /* check third option */ + !RXNULLSTRING(args[2]) && + args[2].strlength > 0) { /* a zero length string isn't */ + if (!(G.filespecs = CompoundToStringArray(__G__ &G.pfnames,args[2].strptr))) { + G.pfnames = incname; + incname[0] = args[2].strptr; + incname[1] = NULL; + G.filespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs >= 4 && /* check third option */ + !RXNULLSTRING(args[3]) && + args[3].strlength > 0) { /* a zero length string isn't */ + if (!(G.xfilespecs = CompoundToStringArray(__G__ &G.pxnames,args[3].strptr))) { + G.pxnames = excname; + excname[0] = args[3].strptr; + excname[1] = NULL; + G.xfilespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs == 5 && /* check third option */ + !RXNULLSTRING(args[4]) && + args[4].strlength > 0) { /* a zero length string isn't */ + int first = *args[4].strptr & 0x5f; + + if (first == 'Z') + uO.vflag = 2, uO.lflag = 0, uO.zipinfo_mode = FALSE; + else if (first == 'F') + uO.vflag = 1, uO.lflag = 0, uO.zipinfo_mode = FALSE; + } + + process_zipfiles(__G); + SetOutputVarLength(__G); + if (G.filespecs > 0 && G.pfnames != incname) + KillStringArray(G.pfnames); + if (G.xfilespecs > 0 && G.pxnames != excname) + KillStringArray(G.pxnames); + return RexxReturn(__G__ 0,retstr); /* no error on call */ +} + + +/************************************************************************* +* Function: UZUnZipToVar * +* * +* Syntax: call UZUnZipToVar zipfile, filespec [, stem] * +* * +* Params: zipfile - Name of zip file to search. * +* filespec - File to extract * +* stem - If you specify a stem variable, the file will be * +* extracted to the variable, one line per index * +* In this case, 0 will be returned * +* * +* Return: Extracted file * +* ERROR_NOMEM - Out of memory. * +*************************************************************************/ + +ULONG UZUnZipToVar(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + CONSTRUCTGLOBALS(); + UzpBuffer *ub = (UzpBuffer *)retstr; + /* validate arguments */ + if (numargs < 2 || numargs > 3 || + !RXVALIDSTRING(args[0]) || + !RXVALIDSTRING(args[1]) || + args[0].strlength == 0 || + args[1].strlength == 0) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + + uO.C_flag = 1; + G.redirect_data=1; + if (numargs == 3) { + if (!RXVALIDSTRING(args[2]) || + RXNULLSTRING(args[1]) || + args[2].strlength == 0) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + SetOutputVarStem(__G__ args[2].strptr); + G.redirect_text = 0; + G.redirect_data++; + } + unzipToMemory(__G__ args[0].strptr, args[1].strptr, + G.redirect_data==1 ? ub : NULL); + return RexxReturn(__G__ G.redirect_data==1,retstr); +} + + +/************************************************************************* +* Function: UZUnZipToStem * +* * +* Syntax: call UZUnZipToStem zipfile, stem[, include-filespec] * +* [, exclude-filespec][, mode] * +* * +* Params: zipfile - Name of zip file to search. * +* stem - Name of stem var to store files in. * +* include - Filespec to search for (may include * and ?). * +* exclude - Filespec to exclude (may include * and ?). * +* mode - Specifies 'F'lat or 'T'ree mode. Umm, this is * +* hard to explain so I'll give an example, too. * +* Assuming a file unzip.zip containing: * +* unzip.c * +* unshrink.c * +* extract.c * +* os2/makefile.os2 * +* os2/os2.c * +* os2/dll/dll.def * +* os2/dll/unzipapi.c * +* * +* -- In flat mode, each file is stored in * +* stem.fullname i.e. stem."os2/dll/unzipapi.c" * +* A list of files is created in stem. * +* * +* Flat mode returns: * +* stem.0 = 7 * +* stem.1 = unzip.c * +* stem.2 = unshrink.c * +* stem.3 = extract.c * +* stem.4 = os2/makefile.os2 * +* stem.5 = os2/os2.c * +* stem.6 = os2/dll/dll.def * +* stem.7 = os2/dll/unzipapi.c * +* * +* And the following contain the contents of the * +* various programs: * +* stem.unzip.c * +* stem.unshrink.c * +* stem.extract.c * +* stem.os2/makefile.os2 * +* stem.os2/os2.c * +* stem.os2/dll/dll.def * +* stem.os2/dll/unzipapi.c * +* * +* -- In tree mode, slashes are converted to periods* +* in the pathname thus the above file would have* +* been stored in stem.os2.dll.unzipapi.c * +* The index would then be stored in stem.OS2. * +* DLL.. * +* * +* NOTE: All path names are converted to uppercase * +* * +* Tree mode returns: * +* stem.0 = 4 * +* stem.1 = unzip.c * +* stem.2 = unshrink.c * +* stem.3 = extract.c * +* stem.4 = OS2/ * +* * +* stem.OS2.0 = 3 * +* stem.OS2.1 = makefile.os2 * +* stem.OS2.2 = os2.c * +* stem.OS2.3 = DLL/ * +* * +* stem.OS2.DLL.0 = 2 * +* stem.OS2.DLL.1 = def * +* stem.OS2.DLL.2 = unzipapi.c * +* * +* And the following contain the contents of the * +* various programs: * +* stem.unzip.c * +* stem.unshrink.c * +* stem.extract.c * +* stem.OS2.makefile.os2 * +* stem.OS2.os2.c * +* stem.OS2.DLL.dll.def * +* stem.OS2.DLL.unzipapi.c * +* * +* * +* Return: NO_UTIL_ERROR - Successful. * +* ERROR_NOMEM - Out of memory. * +*************************************************************************/ + +ULONG UZUnZipToStem(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + char *incname[2]; + char *excname[2]; + CONSTRUCTGLOBALS(); + /* validate arguments */ + if (numargs < 2 || numargs > 5 || + !RXVALIDSTRING(args[0]) || + !RXVALIDSTRING(args[1]) || + args[0].strlength > 255) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + /* initialize data area */ + G.wildzipfn = args[0].strptr; + G.process_all_files = TRUE; + + uO.C_flag = 1; + G.extract_flag = TRUE; + SetOutputVarStem(__G__ args[1].strptr); + G.redirect_data = 3; + G.redirect_text = 0; + + if (numargs >= 3 && /* check third option */ + !RXNULLSTRING(args[2]) && + args[2].strlength > 0) { /* a zero length string isn't */ + if (!(G.filespecs = CompoundToStringArray(__G__ &G.pfnames,args[2].strptr))) { + G.pfnames = incname; + incname[0] = args[2].strptr; + incname[1] = NULL; + G.filespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs >= 4 && /* check third option */ + !RXNULLSTRING(args[3]) && + args[3].strlength > 0) { /* a zero length string isn't */ + if (!(G.xfilespecs = CompoundToStringArray(__G__ &G.pxnames,args[3].strptr))) { + G.pxnames = excname; + excname[0] = args[3].strptr; + excname[1] = NULL; + G.xfilespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs == 5 && /* check third option */ + !RXNULLSTRING(args[4]) && + (*args[4].strptr & 0x5f) == 'T') { + G.redirect_data++; + G.os2.request.shvnext = NULL; + EZRXSTRING(G.os2.request.shvname, args[4].strptr); + G.os2.request.shvnamelen = G.os2.request.shvname.strlength; + G.os2.request.shvcode = RXSHV_SYDRO; + G.os2.request.shvret = 0; + RexxVariablePool(&G.os2.request); + } + + + uO.qflag = 2; + + process_zipfiles(__G); + if (G.filespecs > 0 && G.pfnames != incname) + KillStringArray(G.pfnames); + if (G.xfilespecs > 0 && G.pxnames != excname) + KillStringArray(G.pxnames); + if (G.redirect_data == 3) + SetOutputVarLength(__G); + return RexxReturn(__G__ 0,retstr); /* no error on call */ +} + + +/************************************************************************* +* Function: UZLoadFuncs * +* * +* Syntax: call UZLoadFuncs [option] * +* * +* Params: none * +* * +* Return: null string * +*************************************************************************/ + +ULONG UZLoadFuncs(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + INT entries; /* Num of entries */ + INT j; /* Counter */ + + retstr->strlength = 0; /* set return value */ + /* check arguments */ + if (numargs > 0) + return INVALID_ROUTINE; + + entries = sizeof(RxFncTable)/sizeof(PSZ); + + for (j = 0; j < entries; j++) { + RexxRegisterFunctionDll(RxFncTable[j], + "UNZIP32", RxFncTable[j]); + } + return VALID_ROUTINE; +} + + + +/************************************************************************* +* Function: UZVer * +* * +* Syntax: call UZVer * +* * +* Return: Version of Unzip * +*************************************************************************/ + +ULONG UZVer(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + if (numargs > 1) /* validate arg count */ + return INVALID_ROUTINE; + + if (numargs == 0 || (*args[0].strptr & 0x5f) != 'L') + /* strcpy( retstr->strptr, UZ_VERNUM ); "5.13a BETA" */ + sprintf( retstr->strptr, "%d.%d%d%s", UZ_MAJORVER, UZ_MINORVER, + PATCHLEVEL, BETALEVEL ); + else + /* strcpy( retstr->strptr, UZ_VERSION ); UZ_VERNUM" of 26 Sep 94" */ + sprintf( retstr->strptr, "%d.%d%d%s of %s", UZ_MAJORVER, UZ_MINORVER, + PATCHLEVEL, BETALEVEL, VERSION_DATE ); + retstr->strlength = strlen(retstr->strptr); + return VALID_ROUTINE; +} + + +/************************************************************************* +* Function: UZUnZip * +* * +* Syntax: call UZUnZip * +* * +* Return: Unzip return code * +*************************************************************************/ + +ULONG UZUnZip(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + char *argv[30]; + char *scan; + int argc=0; + int idx; + CONSTRUCTGLOBALS(); + + if (numargs < 1 || numargs > 2 || + args[0].strlength > 255) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + /* initialize data area */ + if (numargs == 2) + SetOutputVarStem(__G__ args[1].strptr); + + scan = args[0].strptr; + argv[argc++] = ""; /* D:\\SOURCECODE\\UNZIP51S\\UNZIP.COM"; */ + while (*scan == ' ') + scan++; + argv[argc++] = scan; + while ( (scan = strchr(scan,' ')) != NULL) { + *scan++ = 0; + while (*scan == ' ') + scan++; + argv[argc++] = scan; + } + if (*argv[argc-1] == 0) + argc--; + argv[argc] = 0; + + /* GRR: should resetMainFlags() be called in here somewhere? */ + + sprintf(retstr->strptr, "%d", unzip(__G__ argc, argv)); /* a.k.a. MAIN() */ + if (numargs == 2) + SetOutputVarLength(__G); + retstr->strlength = strlen(retstr->strptr); + return RexxReturn(__G__ 1,retstr); +} + +int varmessage(__GPRO__ uch *buf, ulg size) +{ + if (size > 0) + memcpy(G.os2.buffer+G.os2.putchar_idx,buf,size); + G.os2.putchar_idx = TextSetNext(__G__ G.os2.buffer, size+G.os2.putchar_idx,0); + return 0; +} + +int varputchar(__GPRO__ int c) +{ + G.os2.buffer[G.os2.putchar_idx++] = c; + if (c == '\n') { + G.os2.buffer[G.os2.putchar_idx] = 0; + if (G.os2.output_var[0]) + G.os2.putchar_idx = TextSetNext(__G__ G.os2.buffer, G.os2.putchar_idx,0); + else { + G.os2.buffer[--G.os2.putchar_idx] = 0; + puts(G.os2.buffer); + G.os2.putchar_idx = 0; + } + } + return 1; +} + + + +int SetOutputVarStem(__GPRO__ const char *name) +{ + int len=strlen(name); + G.redirect_text=1; + G.os2.output_idx = 0; + strcpy(G.os2.output_var, name); + if (len) { + strupr(G.os2.output_var); /* uppercase the name */ + if (*(G.os2.output_var+len-1) != '.') { + *(G.os2.output_var+len) = '.'; + len++; + *(G.os2.output_var+len) = 0; + } + WriteToVariable(__G__ G.os2.output_var,"",0); + } + G.os2.stem_len = len; + return G.os2.stem_len; +} + +int SetOutputVar(__GPRO__ const char *name) +{ + int len=strlen(name); + G.redirect_text=1; + G.os2.output_idx = 0; + strcpy(G.os2.output_var, name); + strupr(G.os2.output_var); /* uppercase the name */ + if (*(name+len-1) == '.') + G.os2.stem_len = len; + else + G.os2.stem_len = 0; + return G.os2.stem_len; +} + +int SetOutputVarLength(__GPRO) +{ + if (G.os2.stem_len > 0) { + if (G.os2.putchar_idx) + TextSetNext(__G__ G.os2.buffer,G.os2.putchar_idx,1); + return PrintToSubVariable(__G__ 0,"%d",G.os2.output_idx); + } + return 0; +} + +int PrintToVariable(__GPRO__ const char *name, const char *format,...) +{ + va_list arg_ptr; + int ret; + + va_start(arg_ptr, format); + ret = _PrintToVariable(__G__ name, format, arg_ptr); + va_end(arg_ptr); + return ret; +} + +int WriteToVariable(__GPRO__ const char *name, char *buffer, int len) +{ + G.os2.request.shvnext = NULL; + EZRXSTRING(G.os2.request.shvname, name); + G.os2.request.shvnamelen = G.os2.request.shvname.strlength; + G.os2.request.shvvalue.strptr = buffer; + G.os2.request.shvvalue.strlength = len; + G.os2.request.shvvaluelen = len; + G.os2.request.shvcode = RXSHV_SET; + G.os2.request.shvret = 0; + switch (RexxVariablePool(&G.os2.request)) { + case RXSHV_BADN: + G.os2.rexx_error = INVALID_ROUTINE; + break; + case RXSHV_MEMFL: + G.os2.rexx_mes = ERROR_NOMEM; + break; + case RXSHV_OK: + return 0; + } + return INVALID_ROUTINE; /* error on non-zero */ +} + +int _PrintToVariable(__GPRO__ const char *name, const char *format, va_list arg_ptr) +{ + int ret = vsprintf(G.os2.buffer, format, arg_ptr); + WriteToVariable(__G__ name, G.os2.buffer, strlen(G.os2.buffer)); + return ret; +} + +int PrintToSubVariable(__GPRO__ int idx, const char *format, ...) +{ + va_list arg_ptr; + int ret; + + if (G.os2.stem_len == 0) + return INVALID_ROUTINE; /* error on non-zero */ + sprintf(G.os2.output_var+G.os2.stem_len,"%d",idx); + + va_start(arg_ptr, format); + ret = _PrintToVariable(__G__ G.os2.output_var, format, arg_ptr); + va_end(arg_ptr); + return ret; +} + + +int WriteToNextVariable(__GPRO__ char *buffer, int len) +{ + if (G.os2.stem_len > 0) { + G.os2.output_idx++; + sprintf(G.os2.output_var+G.os2.stem_len,"%d",G.os2.output_idx); + } + return WriteToVariable(__G__ G.os2.output_var, buffer, len); +} + + +int TextSetNext(__GPRO__ char *buffer, int len, int all) +{ + char *scan = buffer, *next, *base=buffer; + int remaining=len; + int ret; + + while ((next = strchr(scan,'\n')) != NULL && remaining > 0) { + if (next > scan && *(next-1) == 0xd) + *(next-1) = 0; + else + *next = 0; + if (WriteToNextVariable(__G__ scan,strlen(scan))) + return 0; + next++; + remaining -= (next-scan); + scan = next; + } + if (remaining > 0) + if (all) { + *(scan+remaining) = 0; + WriteToNextVariable(__G__ scan,remaining); + } else { + memcpy(buffer,scan,remaining); + return remaining; + } + + return 0; +} + +int finish_REXX_redirect(__GPRO) +{ + char *scan, *ptr; + int idx=0, first=1, offset; + + if (!G.redirect_size) + return 0; + switch(G.redirect_data) { + case 1: + break; + case 2: + TextSetNext(__G__ G.redirect_buffer, G.redirect_size, 1); + SetOutputVarLength(__G); + DosFreeMem(G.redirect_buffer); + G.redirect_buffer = NULL; + G.redirect_size = 0; + break; + case 3: + WriteToNextVariable(__G__ G.filename,strlen(G.filename)); + sprintf(G.os2.output_var+G.os2.stem_len,G.filename); + WriteToVariable(__G__ G.os2.output_var, G.redirect_buffer, G.redirect_size); + DosFreeMem(G.redirect_buffer); + G.redirect_buffer = NULL; + G.redirect_size = 0; + break; + case 4: + if ((scan = strrchr(G.filename,'/')) != NULL) { + idx = *scan; + *scan = 0; + strupr(G.filename); + *scan = idx; + } + scan = G.os2.output_var+G.os2.stem_len; + strcpy(scan,G.filename); + while ((scan = strchr(scan,'/')) != NULL) + *scan = '.'; + WriteToVariable(__G__ G.os2.output_var, G.redirect_buffer, G.redirect_size); + DosFreeMem(G.redirect_buffer); + G.redirect_buffer = NULL; + G.redirect_size = 0; + strcpy(G.os2.getvar_buf, G.os2.output_var); + do { + if ((scan = strrchr(G.filename,'/')) == NULL) + offset = 0; + else + offset = scan-G.filename+1; + if (first || !GetVariable(__G__ G.os2.output_var)) { + ptr = G.os2.getvar_buf+offset+G.os2.stem_len; + *ptr = '0'; + *(ptr+1) = 0; + if (!GetVariable(__G__ G.os2.getvar_buf)) + idx = 1; + else + idx = atoi(G.os2.buffer)+1; + PrintToVariable(__G__ G.os2.getvar_buf,"%d",idx); + sprintf(ptr,"%d",idx); + if (!first) { + PrintToVariable(__G__ G.os2.output_var,"%d",idx); + idx = strlen(G.filename); + *(G.filename+idx) = '/'; + *(G.filename+idx+1) = 0; + } + WriteToVariable(__G__ G.os2.getvar_buf,G.filename+offset,strlen(G.filename+offset)); + first=0; + } + if (offset) { + *(G.os2.output_var+G.os2.stem_len+offset-1) = 0; + *scan = 0; + } + } while (offset); + break; + } + return 0; +} + +#endif /* OS2DLL */ diff --git a/utils/Install/packzip/rexxapi.def b/utils/Install/packzip/rexxapi.def new file mode 100644 index 0000000000..813964abe8 --- /dev/null +++ b/utils/Install/packzip/rexxapi.def @@ -0,0 +1,18 @@ +LIBRARY UNZIP32 INITINSTANCE LONGNAMES +PROTMODE +DESCRIPTION 'Info-ZIP UnZip API - Copyright Scott Maxwell 1994, Info-ZIP 1995-1997' +DATA MULTIPLE NONSHARED +EXPORTS + UzpVersion @1 + UzpUnzipToMemory @2 + UzpFileTree @3 + UzpMain @4 + UzpAltMain @5 + UzpVersion2 @6 + UZDROPFUNCS = UZDropFuncs @2000 + UZLOADFUNCS = UZLoadFuncs @2001 + UZFILETREE = UZFileTree @2002 + UZUNZIPTOVAR = UZUnZipToVar @2003 + UZUNZIPTOSTEM = UZUnZipToStem @2004 + UZVER = UZVer @2005 + UZUNZIP = UZUnZip @2007 diff --git a/utils/Install/packzip/rexxhelp.c b/utils/Install/packzip/rexxhelp.c new file mode 100644 index 0000000000..20a72597a8 --- /dev/null +++ b/utils/Install/packzip/rexxhelp.c @@ -0,0 +1,178 @@ +/* rexxhelp.c */ + +#if defined(API_DOC) && defined(OS2DLL) + +#define UNZIP_INTERNAL +#include "../unzip.h" +#include "../version.h" + +APIDocStruct REXXDetails[] = { + { "UZDROPFUNCS" , "UZDropFuncs" , + "call UZDropFuncs", + "Use this function to drop all the loaded UnZip functions.\n" +"\t\tOnce this function is processed by a REXX program, the\n" +"\t\tUnZip functions are not accessible in any OS/2 sessions.\n" }, + + { "UZLOADFUNCS" , "UZLoadFuncs" , + "call UZLoadFuncs", + "Use this function to make all of the UnZip functions\n" +" in this package available to all OS/2 sessions.\n\n" +" Example: call RxFuncAdd 'UZLoadFuncs', 'UNZIPAPI', 'UZLoadFuncs'\n" +" call UZLoadFuncs\n" }, + + { "UZFILETREE" , "UZFileTree" , + "rc = UZFileTree(zipfile, stem, [include], [exclude], [options])\n\n" +" zipfile - Name of ZIP file to search\n" +" stem - Name of the stem variable for results\n" +" Note: stem.0 contains the number of files found.\n" +" include - Optional stem variable specifying a list of files (including\n" +" wildcards) to include. stem.0 must indicate number of items.\n" +" exclude - Optional stem variable specifying a list of files (including\n" +" wildcards) to exclude. stem.0 must indicate number of items.\n" +" NOTE: If lists are not needed, filespec strings may be passed.\n" +" options - One of the following:\n" +" 'O' - Give file names only. This is the default.\n" +" 'F' - Give file statistics in the form:\n" +" Length Date Time Name\n" +" 'Z' - Also give ZIP statistics in the form:\n" +" Length Method Size Ratio Date Time CRC-32 Name", + "Finds all files in the specified ZIP with the specified\n" +" filespec and places their descriptions in a stem variable.\n\n" +" rc: Return codes\n" +" 0 Successful\n" +" 2 Error. Not enough memory.\n\n" +" Examples:\n" +" /* Return a list of all .NDX files in pcboard.qwk */\n" +" rc = UZFileTree('pcboard.qwk', 'stem.', '*.ndx')\n\n" +" /* Return a list of all files except *.NDX and *.DAT */\n" +" exc.0 = 2; exc.1 = '*.ndx'; exc.2 = '*.dat'\n" +" rc = UZFileTree('pcboard.qwk', 'stem.',,'exc.')\n" }, + + { "UZUNZIP" , "UZUnZip" , + "rc = UZUnZip('parameters', [stem])\n\n" +" parameters - The entire list of parameters you would use from\n" +" the command-line\n" +" stem - The name of an optional stem variable where any\n" +" output should be redirected.\n" +" NOTE: If a stem is not specified, all output will\n" +" go to the console.", + "Provide a direct entry point to the command line interface.\n\n" +" rc: UnZip return code\n\n" +" Examples: /* Test the archive 'unzip51s.zip' and return output in stem.*/\n" +" rc = UZUnZip('-t unzip51s.zip','stem.')\n" +" /* Extract the archive, display output on screen */\n" +" call UZUnZip 'doom.zip'\n" +" /* Extract all .NDX files from the archive */\n" +" call UZUnZip 'pcboard.qwk *.ndx','stem.'\n" }, + + { "UZUNZIPTOVAR" , "UZUnZipToVar" , + "rc = UZUnZipToVar('zipfile', 'filename', [stem])\n\n" +" zipfile - Name of ZIP file to search\n" +" filename - Name of file to extract from zipfile\n" +" stem - Optional stem variable to extract the file to.\n" +" If you specify a stem variable, the file will be extracted\n" +" to the variable, one line per index, stem.0 containing a\n" +" line count. In this case, 0 will be returned in rc.\n" +" If NO stem variable is specified, the entire file will be\n" +" extracted to rc.", + "Unzip one file to a variable.\n\n" +" rc: If no stem variable is specified, rc contains the contents of\n" +" the extracted file if successful or an error-code if not.\n" +" If a stem variable IS specified, rc contains 0 if successful.\n"}, + + /* GRR: "include" and "exclude" used to be identified as stem variables + * (Daniel H bug report) + */ + { "UZUNZIPTOSTEM", "UZUnZipToStem", + "rc = UZUnZipToStem(zipfile, stem, [include], [exclude], [mode])\n" +" zipfile - Name of ZIP file to search\n" +" stem - Stem variable used to store the extracted files\n" +" include - Optional string variable specifying a list of files (including\n" +" wildcards) to include. stem.0 must indicate number of items.\n" +" exclude - Optional string variable specifying a list of files (including\n" +" wildcards) to exclude. stem.0 must indicate number of items.\n" +" NOTE: If lists are not needed, filespec strings may be passed.\n" +" mode - Optional mode parameter specifies either 'F'lat (the default)\n" +" or 'T'ree mode.\n" +" -- In flat mode, each file is stored in stem.fullname i.e.\n" +" stem.os2/dll/unzipapi.c. A list of files is created in\n" +" stem.\n" +" -- In tree mode, slashes are converted to periods in the\n" +" pathname thus the above file would have been stored in\n" +" stem.OS2.DLL.unzipapi.c and an index stored for each\n" +" directory, i.e. stem.OS2.DLL. = \"unzipapi.c\",\n" +" stem.OS2. = \"DLL/\", stem. = \"OS2/\"", + "Unzip files to a stem variable.\n\n" +" Example: Assuming a file unzip.zip containing:\n" +" unzip.c, unshrink.c, extract.c,\n" +" os2/makefile.os2, os2/os2.c\n" +" os2/dll/dll.def, os2/dll/unzipapi.c\n\n" +" rc = UZUnZipToStem('unzip.zip', 'stem.')\n" +" Returns: stem.0 = 7\n" +" stem.1 = unzip.c\n" +" stem.2 = unshrink.c\n" +" stem.3 = extract.c\n" +" stem.4 = os2/makefile.os2\n" +" stem.5 = os2/os2.c\n" +" stem.6 = os2/dll/dll.def\n" +" stem.7 = os2/dll/unzipapi.c\n" +" And the following contain the contents of the\n" +" various files:\n" +" stem.unzip.c\n" +" stem.unshrink.c\n" +" stem.extract.c\n" +" stem.os2/makefile.os2\n" +" stem.os2/os2.c\n" +" stem.os2/dll/dll.def\n" +" stem.os2/dll/unzipapi.c\n\n" +" rc = UZUnZipToStem('unzip.zip', 'stem.',,,'TREE')\n" +" Returns: stem.0 = 4\n" +" stem.1 = unzip.c\n" +" stem.2 = unshrink.c\n" +" stem.3 = extract.c\n" +" stem.4 = OS2/\n" +" stem.OS2.0 = 3\n" +" stem.OS2.1 = makefile.os2\n" +" stem.OS2.2 = os2.c\n" +" stem.OS2.3 = DLL/\n" +" stem.OS2.DLL.0 = 2\n" +" stem.OS2.DLL.1 = def\n" +" stem.OS2.DLL.2 = unzipapi.c\n" +"\n" +" And the following contain the contents of the\n" +" various programs:\n" +" stem.unzip.c\n" +" stem.unshrink.c\n" +" stem.extract.c\n" +" stem.OS2.makefile.os2\n" +" stem.OS2.os2.c\n" +" stem.OS2.DLL.dll.def\n" +" stem.OS2.DLL.unzipapi.c\n" }, + + { "UZVER" , "UZVer" , + "rc = UZVer([option])\n\n" +" rc String containing UnZip version info in the form 'x.xx'\n" +" If option is 'L' then info is in the form 'x.xx of ", + "Returns the version number of UnZip\n" }, + + { "UZAPIVER" , "UZAPIVer" , + "rc = UZAPIVer([option])\n\n" +" rc String containing API version info in the form 'x.xx'\n" +" If option is 'L' then info is in the form 'x.xx of ", + "Returns the version number of the API\n" }, + { 0 } +}; + +char *REXXBrief = "\ +REXX functions:\n\ + UZDropFuncs -- Makes all functions in this package unknown to REXX\n\ + UZLoadFuncs -- Makes all functions in this package known to REXX\n\ + UZFileTree -- Searches for files matching a given filespec\n\ + UZUnZip -- UnZip command-line entry point\n\ + UZUnZipToVar -- Unzip one file to a variable\n\ + UZUnZipToStem -- Unzip files to a variable array\n\ + UZVer -- Returns the UnZip version number\n\ + UZAPIVer -- Returns the API version number\n"; + + +#endif /* API_DOC && OS2DLL */ diff --git a/utils/Install/packzip/stub.def b/utils/Install/packzip/stub.def new file mode 100644 index 0000000000..f3852f109e --- /dev/null +++ b/utils/Install/packzip/stub.def @@ -0,0 +1,6 @@ +DESCRIPTION 'The world-famous Info-ZIP unarchiving utilities' +STACKSIZE 0x50000 +IMPORTS + UNZIP32.UzpVersion + UNZIP32.UzpMain + UNZIP32.UzpVersion2 diff --git a/utils/Install/packzip/ttyio.c b/utils/Install/packzip/ttyio.c new file mode 100644 index 0000000000..c755d1c5a3 --- /dev/null +++ b/utils/Install/packzip/ttyio.c @@ -0,0 +1,625 @@ +/*--------------------------------------------------------------------------- + + ttyio.c + + This file contains routines for doing console input/output, including code + for non-echoing input. It is used by the encryption/decryption code but + does not contain any restricted code itself. This file is shared between + Info-ZIP's Zip and UnZip. + + Contains: echo() (VMS only) + Echon() (Unix only) + Echoff() (Unix only) + screenlines() (Unix only) + zgetch() (Unix and non-Unix versions) + getp() ("PC," Unix/Atari/Be, VMS/VMCMS/MVS) + + ---------------------------------------------------------------------------*/ + +#define __TTYIO_C /* identifies this source module */ + +#include "zip.h" +#include "crypt.h" + +#if (CRYPT || (defined(UNZIP) && !defined(FUNZIP))) +/* Non-echo console/keyboard input is needed for (en/de)cryption's password + * entry, and for UnZip(SFX)'s MORE and Pause features. + * (The corresponding #endif is found at the end of this module.) + */ + +#include "ttyio.h" + +#ifndef PUTC +# define PUTC putc +#endif + +#ifdef ZIP +# ifdef GLOBAL /* used in Amiga system headers, maybe others too */ +# undef GLOBAL +# endif +# define GLOBAL(g) g +#else +# define GLOBAL(g) G.g +#endif + +#ifdef __BEOS__ /* why yes, we do */ +# define HAVE_TERMIOS_H +#endif + +#ifdef _POSIX_VERSION +# ifndef USE_POSIX_TERMIOS +# define USE_POSIX_TERMIOS /* use POSIX style termio (termios) */ +# endif +# ifndef HAVE_TERMIOS_H +# define HAVE_TERMIOS_H /* POSIX termios.h */ +# endif +#endif /* _POSIX_VERSION */ + +#ifdef UNZIP /* Zip handles this with the unix/configure script */ +# ifndef _POSIX_VERSION +# if (defined(SYSV) || defined(CRAY)) && !defined(__MINT__) +# ifndef USE_SYSV_TERMIO +# define USE_SYSV_TERMIO +# endif +# ifdef COHERENT +# ifndef HAVE_TERMIO_H +# define HAVE_TERMIO_H +# endif +# ifdef HAVE_SYS_TERMIO_H +# undef HAVE_SYS_TERMIO_H +# endif +# else /* !COHERENT */ +# ifdef HAVE_TERMIO_H +# undef HAVE_TERMIO_H +# endif +# ifndef HAVE_SYS_TERMIO_H +# define HAVE_SYS_TERMIO_H +# endif +# endif /* ?COHERENT */ +# endif /* (SYSV || CRAY) && !__MINT__ */ +# endif /* !_POSIX_VERSION */ +# if !(defined(BSD4_4) || defined(SYSV) || defined(__convexc__)) +# ifndef NO_FCNTL_H +# define NO_FCNTL_H +# endif +# endif /* !(BSD4_4 || SYSV || __convexc__) */ +#endif /* UNZIP */ + +#ifdef HAVE_TERMIOS_H +# ifndef USE_POSIX_TERMIOS +# define USE_POSIX_TERMIOS +# endif +#endif + +#if (defined(HAVE_TERMIO_H) || defined(HAVE_SYS_TERMIO_H)) +# ifndef USE_SYSV_TERMIO +# define USE_SYSV_TERMIO +# endif +#endif + +#if (defined(UNZIP) && !defined(FUNZIP) && defined(UNIX) && defined(MORE)) +# include +# define GOT_IOCTL_H + /* int ioctl OF((int, int, zvoid *)); GRR: may need for some systems */ +#endif + +#ifndef HAVE_WORKING_GETCH + /* include system support for switching of console echo */ +# ifdef VMS +# include +# include +# include +# include +# include +# else /* !VMS */ +# ifdef HAVE_TERMIOS_H +# include +# define sgttyb termios +# define sg_flags c_lflag +# define GTTY(f, s) tcgetattr(f, (zvoid *) s) +# define STTY(f, s) tcsetattr(f, TCSAFLUSH, (zvoid *) s) +# else /* !HAVE_TERMIOS_H */ +# ifdef USE_SYSV_TERMIO /* Amdahl, Cray, all SysV? */ +# ifdef HAVE_TERMIO_H +# include +# endif +# ifdef HAVE_SYS_TERMIO_H +# include +# endif +# ifdef NEED_PTEM +# include +# include +# endif +# define sgttyb termio +# define sg_flags c_lflag +# define GTTY(f,s) ioctl(f,TCGETA,(zvoid *)s) +# define STTY(f,s) ioctl(f,TCSETAW,(zvoid *)s) +# else /* !USE_SYSV_TERMIO */ +# ifndef CMS_MVS +# if (!defined(MINIX) && !defined(GOT_IOCTL_H)) +# include +# endif +# include +# define GTTY gtty +# define STTY stty +# ifdef UNZIP + /* + * XXX : Are these declarations needed at all ???? + */ + /* + * GRR: let's find out... Hmmm, appears not... + int gtty OF((int, struct sgttyb *)); + int stty OF((int, struct sgttyb *)); + */ +# endif +# endif /* !CMS_MVS */ +# endif /* ?USE_SYSV_TERMIO */ +# endif /* ?HAVE_TERMIOS_H */ +# ifndef NO_FCNTL_H +# ifndef UNZIP +# include +# endif +# else + char *ttyname OF((int)); +# endif +# endif /* ?VMS */ +#endif /* !HAVE_WORKING_GETCH */ + + + +#ifndef HAVE_WORKING_GETCH +#ifdef VMS + +/* + * Turn keyboard echoing on or off (VMS). Loosely based on VMSmunch.c + * and hence on Joe Meadows' file.c code. + */ +int echo(opt) + int opt; +{ + /* + * For VMS v5.x: + * IO$_SENSEMODE/SETMODE info: Programming, Vol. 7A, System Programming, + * I/O User's: Part I, sec. 8.4.1.1, 8.4.3, 8.4.5, 8.6 + * sys$assign(), sys$qio() info: Programming, Vol. 4B, System Services, + * System Services Reference Manual, pp. sys-23, sys-379 + * fixed-length descriptor info: Programming, Vol. 3, System Services, + * Intro to System Routines, sec. 2.9.2 + * Greg Roelofs, 15 Aug 91 + */ + + /* SKM: make global? */ + static struct dsc$descriptor_s DevDesc = + {11, DSC$K_DTYPE_T, DSC$K_CLASS_S, "SYS$COMMAND"}; + /* {dsc$w_length, dsc$b_dtype, dsc$b_class, dsc$a_pointer}; */ + static short DevChan, iosb[4]; + static long status; + static unsigned long oldmode[2], newmode[2]; /* each = 8 bytes */ + + + /* assign a channel to standard input */ + status = sys$assign(&DevDesc, &DevChan, 0, 0); + if (!(status & 1)) + return status; + + /* use sys$qio and the IO$_SENSEMODE function to determine the current + * tty status (for password reading, could use IO$_READVBLK function + * instead, but echo on/off will be more general) + */ + status = sys$qiow(0, DevChan, IO$_SENSEMODE, &iosb, 0, 0, + oldmode, 8, 0, 0, 0, 0); + if (!(status & 1)) + return status; + status = iosb[0]; + if (!(status & 1)) + return status; + + /* copy old mode into new-mode buffer, then modify to be either NOECHO or + * ECHO (depending on function argument opt) + */ + newmode[0] = oldmode[0]; + newmode[1] = oldmode[1]; + if (opt == 0) /* off */ + newmode[1] |= TT$M_NOECHO; /* set NOECHO bit */ + else + newmode[1] &= ~((unsigned long) TT$M_NOECHO); /* clear NOECHO bit */ + + /* use the IO$_SETMODE function to change the tty status */ + status = sys$qiow(0, DevChan, IO$_SETMODE, &iosb, 0, 0, + newmode, 8, 0, 0, 0, 0); + if (!(status & 1)) + return status; + status = iosb[0]; + if (!(status & 1)) + return status; + + /* deassign the sys$input channel by way of clean-up */ + status = sys$dassgn(DevChan); + if (!(status & 1)) + return status; + + return SS$_NORMAL; /* we be happy */ + +} /* end function echo() */ + + +#else /* !VMS: basically Unix */ + + +/* For VM/CMS and MVS, non-echo terminal input is not (yet?) supported. */ +#ifndef CMS_MVS + +#ifdef ZIP /* moved to globals.h for UnZip */ + static int echofd=(-1); /* file descriptor whose echo is off */ +#endif + +/* + * Turn echo off for file descriptor f. Assumes that f is a tty device. + */ +void Echoff(__G__ f) + __GDEF + int f; /* file descriptor for which to turn echo off */ +{ + struct sgttyb sg; /* tty device structure */ + + GLOBAL(echofd) = f; + GTTY(f, &sg); /* get settings */ + sg.sg_flags &= ~ECHO; /* turn echo off */ + STTY(f, &sg); +} + +/* + * Turn echo back on for file descriptor echofd. + */ +void Echon(__G) + __GDEF +{ + struct sgttyb sg; /* tty device structure */ + + if (GLOBAL(echofd) != -1) { + GTTY(GLOBAL(echofd), &sg); /* get settings */ + sg.sg_flags |= ECHO; /* turn echo on */ + STTY(GLOBAL(echofd), &sg); + GLOBAL(echofd) = -1; + } +} + +#endif /* !CMS_MVS */ +#endif /* ?VMS */ + + +#if (defined(UNZIP) && !defined(FUNZIP)) + +#if (defined(UNIX) || defined(__BEOS__)) +#ifdef MORE + +/* + * Get the number of lines on the output terminal. SCO Unix apparently + * defines TIOCGWINSZ but doesn't support it (!M_UNIX). + * + * GRR: will need to know width of terminal someday, too, to account for + * line-wrapping. + */ + +#if (defined(TIOCGWINSZ) && !defined(M_UNIX)) + +int screenlines() +{ + struct winsize wsz; +#ifdef DEBUG_WINSZ + static int firsttime = TRUE; +#endif + + /* see termio(4) under, e.g., SunOS */ + if (ioctl(1, TIOCGWINSZ, &wsz) == 0) { +#ifdef DEBUG_WINSZ + if (firsttime) { + firsttime = FALSE; + fprintf(stderr, "ttyio.c screenlines(): ws_row = %d\n", + wsz.ws_row); + } +#endif + /* number of columns = ws_col */ + return (wsz.ws_row > 0)? wsz.ws_row : 24; /* number of rows */ + + } else { /* this happens when piping to more(1), for example */ +#ifdef DEBUG_WINSZ + if (firsttime) { + firsttime = FALSE; + fprintf(stderr, + "ttyio.c screenlines(): ioctl(TIOCGWINSZ) failed\n")); + } +#endif + return 24; /* VT-100 assumed to be minimal hardware */ + } +} + +#else /* !TIOCGWINSZ: service not available, fall back to semi-bogus method */ + +int screenlines() +{ + char *envptr, *getenv(); + int n; + + /* GRR: this is overly simplistic, but don't have access to stty/gtty + * system anymore + */ + envptr = getenv("LINES"); + if (envptr == (char *)NULL || (n = atoi(envptr)) < 5) + return 24; /* VT-100 assumed to be minimal hardware */ + else + return n; +} + +#endif /* ?(TIOCGWINSZ && !M_UNIX) */ +#endif /* MORE */ + + +/* + * Get a character from the given file descriptor without echo or newline. + */ +int zgetch(__G__ f) + __GDEF + int f; /* file descriptor from which to read */ +{ +#if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) + char oldmin, oldtim; +#endif + char c; + struct sgttyb sg; /* tty device structure */ + + GTTY(f, &sg); /* get settings */ +#if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) + oldmin = sg.c_cc[VMIN]; /* save old values */ + oldtim = sg.c_cc[VTIME]; + sg.c_cc[VMIN] = 1; /* need only one char to return read() */ + sg.c_cc[VTIME] = 0; /* no timeout */ + sg.sg_flags &= ~ICANON; /* canonical mode off */ +#else + sg.sg_flags |= CBREAK; /* cbreak mode on */ +#endif + sg.sg_flags &= ~ECHO; /* turn echo off, too */ + STTY(f, &sg); /* set cbreak mode */ + GLOBAL(echofd) = f; /* in case ^C hit (not perfect: still CBREAK) */ + + read(f, &c, 1); /* read our character */ + +#if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) + sg.c_cc[VMIN] = oldmin; /* restore old values */ + sg.c_cc[VTIME] = oldtim; + sg.sg_flags |= ICANON; /* canonical mode on */ +#else + sg.sg_flags &= ~CBREAK; /* cbreak mode off */ +#endif + sg.sg_flags |= ECHO; /* turn echo on */ + STTY(f, &sg); /* restore canonical mode */ + GLOBAL(echofd) = -1; + + return (int)c; +} + + +#else /* !UNIX && !__BEOS__ */ + + +int zgetch(__G__ f) + __GDEF + int f; /* file descriptor from which to read (must be open already) */ +{ + char c, c2; + +/*--------------------------------------------------------------------------- + Get a character from the given file descriptor without echo; can't fake + CBREAK mode (i.e., newline required), but can get rid of all chars up to + and including newline. + ---------------------------------------------------------------------------*/ + + echoff(f); + read(f, &c, 1); + if (c != '\n') + do { + read(f, &c2, 1); /* throw away all other chars up thru newline */ + } while (c2 != '\n'); + echon(); + return (int)c; +} + +#endif /* ?(UNIX || __BEOS__) */ + +#endif /* UNZIP && !FUNZIP */ +#endif /* !HAVE_WORKING_GETCH */ + + +#if CRYPT /* getp() is only used with full encryption */ + +/* + * Simple compile-time check for source compatibility between + * zcrypt and ttyio: + */ +#if (!defined(CR_MAJORVER) || (CR_MAJORVER < 2) || (CR_MINORVER < 7)) + error: This Info-ZIP tool requires zcrypt 2.7 or later. +#endif + +/* + * Get a password of length n-1 or less into *p using the prompt *m. + * The entered password is not echoed. + */ + +#ifdef HAVE_WORKING_GETCH +/* + * For the AMIGA, getch() is defined as Agetch(), which is in + * amiga/filedate.c; SAS/C 6.x provides a getch(), but since Agetch() + * uses the infrastructure that is already in place in filedate.c, it is + * smaller. With this function, echoff() and echon() are not needed. + * + * For the MAC, a non-echo macgetch() function is defined in the MacOS + * specific sources which uses the event handling mechanism of the + * desktop window manager to get a character from the keyboard. + * + * For the other systems in this section, a non-echo getch() function + * is either contained the C runtime library (conio package), or getch() + * is defined as an alias for a similar system specific RTL function. + */ + +#ifndef WINDLL /* WINDLL does not support a console interface */ +#ifndef QDOS /* QDOS supplies a variant of this function */ + +/* This is the getp() function for all systems (with TTY type user interface) + * that supply a working `non-echo' getch() function for "raw" console input. + */ +char *getp(__G__ m, p, n) + __GDEF + ZCONST char *m; /* prompt for password */ + char *p; /* return value: line input */ + int n; /* bytes available in p[] */ +{ + char c; /* one-byte buffer for read() to use */ + int i; /* number of characters input */ + char *w; /* warning on retry */ + + /* get password */ + w = ""; + do { + fputs(w, stderr); /* warning if back again */ + fputs(m, stderr); /* display prompt and flush */ + fflush(stderr); + i = 0; + do { /* read line, keeping first n characters */ + if ((c = (char)getch()) == '\r') + c = '\n'; /* until user hits CR */ + if (c == 8 || c == 127) { + if (i > 0) i--; /* the `backspace' and `del' keys works */ + } + else if (i < n) + p[i++] = c; /* truncate past n */ + } while (c != '\n'); + PUTC('\n', stderr); fflush(stderr); + w = "(line too long--try again)\n"; + } while (p[i-1] != '\n'); + p[i-1] = 0; /* terminate at newline */ + + return p; /* return pointer to password */ + +} /* end function getp() */ + +#endif /* !QDOS */ +#endif /* !WINDLL */ + + +#else /* !HAVE_WORKING_GETCH */ + + +#if (defined(UNIX) || defined(__MINT__) || defined(__BEOS__)) + +#ifndef _PATH_TTY +# ifdef __MINT__ +# define _PATH_TTY ttyname(2) +# else +# define _PATH_TTY "/dev/tty" +# endif +#endif + +char *getp(__G__ m, p, n) + __GDEF + ZCONST char *m; /* prompt for password */ + char *p; /* return value: line input */ + int n; /* bytes available in p[] */ +{ + char c; /* one-byte buffer for read() to use */ + int i; /* number of characters input */ + char *w; /* warning on retry */ + int f; /* file descriptor for tty device */ + +#ifdef PASSWD_FROM_STDIN + /* Read from stdin. This is unsafe if the password is stored on disk. */ + f = 0; +#else + /* turn off echo on tty */ + + if ((f = open(_PATH_TTY, 0)) == -1) + return NULL; +#endif + /* get password */ + w = ""; + do { + fputs(w, stderr); /* warning if back again */ + fputs(m, stderr); /* prompt */ + fflush(stderr); + i = 0; + echoff(f); + do { /* read line, keeping n */ + read(f, &c, 1); + if (i < n) + p[i++] = c; + } while (c != '\n'); + echon(); + PUTC('\n', stderr); fflush(stderr); + w = "(line too long--try again)\n"; + } while (p[i-1] != '\n'); + p[i-1] = 0; /* terminate at newline */ + +#ifndef PASSWD_FROM_STDIN + close(f); +#endif + + return p; /* return pointer to password */ + +} /* end function getp() */ + +#endif /* UNIX || __MINT__ || __BEOS__ */ + + + +#if (defined(VMS) || defined(CMS_MVS)) + +char *getp(__G__ m, p, n) + __GDEF + ZCONST char *m; /* prompt for password */ + char *p; /* return value: line input */ + int n; /* bytes available in p[] */ +{ + char c; /* one-byte buffer for read() to use */ + int i; /* number of characters input */ + char *w; /* warning on retry */ + FILE *f; /* file structure for SYS$COMMAND device */ + +#ifdef PASSWD_FROM_STDIN + f = stdin; +#else + if ((f = fopen(ctermid(NULL), "r")) == NULL) + return NULL; +#endif + + /* get password */ + fflush(stdout); + w = ""; + do { + if (*w) /* bug: VMS apparently adds \n to NULL fputs */ + fputs(w, stderr); /* warning if back again */ + fputs(m, stderr); /* prompt */ + fflush(stderr); + i = 0; + echoff(f); + do { /* read line, keeping n */ + if ((c = (char)getc(f)) == '\r') + c = '\n'; + if (i < n) + p[i++] = c; + } while (c != '\n'); + echon(); + PUTC('\n', stderr); fflush(stderr); + w = "(line too long--try again)\n"; + } while (p[i-1] != '\n'); + p[i-1] = 0; /* terminate at newline */ +#ifndef PASSWD_FROM_STDIN + fclose(f); +#endif + + return p; /* return pointer to password */ + +} /* end function getp() */ + +#endif /* VMS || CMS_MVS */ +#endif /* ?HAVE_WORKING_GETCH */ +#endif /* CRYPT */ +#endif /* CRYPT || (UNZIP && !FUNZIP) */ diff --git a/utils/Install/packzip/unix.c b/utils/Install/packzip/unix.c new file mode 100644 index 0000000000..c9eaaabafc --- /dev/null +++ b/utils/Install/packzip/unix.c @@ -0,0 +1,1424 @@ +/*--------------------------------------------------------------------------- + + unix.c + + Unix-specific routines for use with Info-ZIP's UnZip 5.3 and later. + + Contains: readdir() + do_wild() <-- generic enough to put in fileio.c? + mapattr() + mapname() + checkdir() + mkdir() + close_outfile() + set_direc_attribs() + stamp_file() + version() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" + +#ifdef SCO_XENIX +# define SYSNDIR +#else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ +# if defined(__convexc__) || defined(SYSV) || defined(CRAY) || defined(BSD4_4) +# define DIRENT +# endif +#endif +#if defined(_AIX) +# define DIRENT +#endif +#ifdef COHERENT +# if defined(_I386) || (defined(__COHERENT__) && (__COHERENT__ >= 0x420)) +# define DIRENT +# endif +#endif + +/* GRR: may need to uncomment this: */ +#if 0 +#if defined(_POSIX_VERSION) +# define DIRENT +#endif +#endif + +#ifdef DIRENT +# include +#else +# ifdef SYSV +# ifdef SYSNDIR +# include +# else +# include +# endif +# else /* !SYSV */ +# ifndef NO_SYSDIR +# include +# endif +# endif /* ?SYSV */ +# ifndef dirent +# define dirent direct +# endif +#endif /* ?DIRENT */ + +#ifdef ACORN_FTYPE_NFS +/* Acorn bits for NFS filetyping */ +typedef struct { + uch ID[2]; + uch size[2]; + uch ID_2[4]; + uch loadaddr[4]; + uch execaddr[4]; + uch attr[4]; +} RO_extra_block; + +static int isRISCOSexfield OF((uch *extra_field)); +#endif /* ACORN_FTYPE_NFS */ + +static int created_dir; /* used in mapname(), checkdir() */ +static int renamed_fullpath; /* ditto */ + + +#ifndef SFX +#ifdef NO_DIR /* for AT&T 3B1 */ + +#define opendir(path) fopen(path,"r") +#define closedir(dir) fclose(dir) +typedef FILE DIR; + +/* + * Apparently originally by Rich Salz. + * Cleaned up and modified by James W. Birdsall. + */ +struct dirent *readdir(dirp) + DIR *dirp; +{ + static struct dirent entry; + + if (dirp == NULL) + return NULL; + + for (;;) + if (fread(&entry, sizeof (struct dirent), 1, dirp) == 0) + return (struct dirent *)NULL; + else if (entry.d_ino) + return &entry; + +} /* end function readdir() */ + +#endif /* NO_DIR */ + + +/**********************/ +/* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ +/**********************/ + +char *do_wild(__G__ wildspec) + __GDEF + char *wildspec; /* only used first time on a given dir */ +{ + static DIR *dir = (DIR *)NULL; + static char *dirname, *wildname, matchname[FILNAMSIZ]; + static int firstcall=TRUE, have_dirname, dirnamelen; + struct dirent *file; + + + /* Even when we're just returning wildspec, we *always* do so in + * matchname[]--calling routine is allowed to append four characters + * to the returned string, and wildspec may be a pointer to argv[]. + */ + if (firstcall) { /* first call: must initialize everything */ + firstcall = FALSE; + + if (!iswild(wildspec)) { + strcpy(matchname, wildspec); + have_dirname = FALSE; + dir = NULL; + return matchname; + } + + /* break the wildspec into a directory part and a wildcard filename */ + if ((wildname = strrchr(wildspec, '/')) == (char *)NULL) { + dirname = "."; + dirnamelen = 1; + have_dirname = FALSE; + wildname = wildspec; + } else { + ++wildname; /* point at character after '/' */ + dirnamelen = wildname - wildspec; + if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { + Info(slide, 0x201, ((char *)slide, + "warning: cannot allocate wildcard buffers\n")); + strcpy(matchname, wildspec); + return matchname; /* but maybe filespec was not a wildcard */ + } + strncpy(dirname, wildspec, dirnamelen); + dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ + have_dirname = TRUE; + } + + if ((dir = opendir(dirname)) != (DIR *)NULL) { + while ((file = readdir(dir)) != (struct dirent *)NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + if (file->d_name[0] == '.' && wildname[0] != '.') + continue; /* Unix: '*' and '?' do not match leading dot */ + if (match(file->d_name, wildname, 0) && /* 0 == case sens. */ + /* skip "." and ".." directory entries */ + strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { + Trace((stderr, "do_wild: match() succeeds\n")); + if (have_dirname) { + strcpy(matchname, dirname); + strcpy(matchname+dirnamelen, file->d_name); + } else + strcpy(matchname, file->d_name); + return matchname; + } + } + /* if we get to here directory is exhausted, so close it */ + closedir(dir); + dir = (DIR *)NULL; + } + + /* return the raw wildspec in case that works (e.g., directory not + * searchable, but filespec was not wild and file is readable) */ + strcpy(matchname, wildspec); + return matchname; + } + + /* last time through, might have failed opendir but returned raw wildspec */ + if (dir == (DIR *)NULL) { + firstcall = TRUE; /* nothing left to try--reset for new wildspec */ + if (have_dirname) + free(dirname); + return (char *)NULL; + } + + /* If we've gotten this far, we've read and matched at least one entry + * successfully (in a previous call), so dirname has been copied into + * matchname already. + */ + while ((file = readdir(dir)) != (struct dirent *)NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + if (file->d_name[0] == '.' && wildname[0] != '.') + continue; /* Unix: '*' and '?' do not match leading dot */ + if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ + Trace((stderr, "do_wild: match() succeeds\n")); + if (have_dirname) { + /* strcpy(matchname, dirname); */ + strcpy(matchname+dirnamelen, file->d_name); + } else + strcpy(matchname, file->d_name); + return matchname; + } + } + + closedir(dir); /* have read at least one dir entry; nothing left */ + dir = (DIR *)NULL; + firstcall = TRUE; /* reset for new wildspec */ + if (have_dirname) + free(dirname); + return (char *)NULL; + +} /* end function do_wild() */ + +#endif /* !SFX */ + + + + + +/**********************/ +/* Function mapattr() */ +/**********************/ + +int mapattr(__G) + __GDEF +{ + ulg tmp = G.crec.external_file_attributes; + + G.pInfo->file_attr = 0; + /* initialized to 0 for check in "default" branch below... */ + + switch (G.pInfo->hostnum) { + case AMIGA_: + tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ + G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); + break; + case UNIX_: + case VMS_: + case ACORN_: + case ATARI_: + case BEOS_: + case QDOS_: + case TANDEM_: + G.pInfo->file_attr = (unsigned)(tmp >> 16); + if (G.pInfo->file_attr != 0 || !G.extra_field) { + return 0; + } else { + /* Some (non-Info-ZIP) implementations of Zip for Unix and + * VMS (and probably others ??) leave 0 in the upper 16-bit + * part of the external_file_attributes field. Instead, they + * store file permission attributes in some extra field. + * As a work-around, we search for the presence of one of + * these extra fields and fall back to the MSDOS compatible + * part of external_file_attributes if one of the known + * e.f. types has been detected. + * Later, we might implement extraction of the permission + * bits from the VMS extra field. But for now, the work-around + * should be sufficient to provide "readable" extracted files. + * (For ASI Unix e.f., an experimental remap from the e.f. + * mode value IS already provided!) + */ + ush ebID; + unsigned ebLen; + uch *ef = G.extra_field; + unsigned ef_len = G.crec.extra_field_length; + int r = FALSE; + + while (!r && ef_len >= EB_HEADSIZE) { + ebID = makeword(ef); + ebLen = (unsigned)makeword(ef+EB_LEN); + if (ebLen > (ef_len - EB_HEADSIZE)) + /* discoverd some e.f. inconsistency! */ + break; + switch (ebID) { + case EF_ASIUNIX: + if (ebLen >= (EB_ASI_MODE+2)) { + G.pInfo->file_attr = + (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); + /* force stop of loop: */ + ef_len = (ebLen + EB_HEADSIZE); + break; + } + /* else: fall through! */ + case EF_PKVMS: + /* "found nondecypherable e.f. with perm. attr" */ + r = TRUE; + default: + break; + } + ef_len -= (ebLen + EB_HEADSIZE); + ef += (ebLen + EB_HEADSIZE); + } + if (!r) + return 0; + } + /* fall through! */ + /* all remaining cases: expand MSDOS read-only bit into write perms */ + case FS_FAT_: + /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the + * Unix attributes in the upper 16 bits of the external attributes + * field, just like Info-ZIP's Zip for Unix. We try to use that + * value, after a check for consistency with the MSDOS attribute + * bits (see below). + */ + G.pInfo->file_attr = (unsigned)(tmp >> 16); + /* fall through! */ + case FS_HPFS_: + case FS_NTFS_: + case MAC_: + case TOPS20_: + default: + /* read-only bit --> write perms; subdir bit --> dir exec bit */ + tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; + if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) + /* keep previous G.pInfo->file_attr setting, when its "owner" + * part appears to be consistent with DOS attribute flags! + */ + return 0; + G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); + break; + } /* end switch (host-OS-created-by) */ + + /* for originating systems with no concept of "group," "other," "system": */ + umask( (int)(tmp=umask(0)) ); /* apply mask to expanded r/w(/x) perms */ + G.pInfo->file_attr &= ~tmp; + + return 0; + +} /* end function mapattr() */ + + + + + +/************************/ +/* Function mapname() */ +/************************/ + /* return 0 if no error, 1 if caution (filename */ +int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ + __GDEF /* dir doesn't exist), 3 if error (skip file), */ + int renamed; /* or 10 if out of memory (skip file) */ +{ /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ + char pathcomp[FILNAMSIZ]; /* path-component buffer */ + char *pp, *cp=(char *)NULL; /* character pointers */ + char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ +#ifdef ACORN_FTYPE_NFS + char *lastcomma=(char *)NULL; /* pointer to last comma in pathcomp */ +#endif + int quote = FALSE; /* flags */ + int error = 0; + register unsigned workch; /* hold the character being tested */ + + +/*--------------------------------------------------------------------------- + Initialize various pointers and counters and stuff. + ---------------------------------------------------------------------------*/ + + if (G.pInfo->vollabel) + return IZ_VOL_LABEL; /* can't set disk volume labels in Unix */ + + /* can create path as long as not just freshening, or if user told us */ + G.create_dirs = (!uO.fflag || renamed); + + created_dir = FALSE; /* not yet */ + + /* user gave full pathname: don't prepend rootpath */ + renamed_fullpath = (renamed && (*G.filename == '/')); + + if (checkdir(__G__ (char *)NULL, INIT) == 10) + return 10; /* initialize path buffer, unless no memory */ + + *pathcomp = '\0'; /* initialize translation buffer */ + pp = pathcomp; /* point to translation buffer */ + if (uO.jflag) /* junking directories */ + cp = (char *)strrchr(G.filename, '/'); + if (cp == (char *)NULL) /* no '/' or not junking dirs */ + cp = G.filename; /* point to internal zipfile-member pathname */ + else + ++cp; /* point to start of last component of path */ + +/*--------------------------------------------------------------------------- + Begin main loop through characters in filename. + ---------------------------------------------------------------------------*/ + + while ((workch = (uch)*cp++) != 0) { + + if (quote) { /* if character quoted, */ + *pp++ = (char)workch; /* include it literally */ + quote = FALSE; + } else + switch (workch) { + case '/': /* can assume -j flag not given */ + *pp = '\0'; + if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) + return error; + pp = pathcomp; /* reset conversion buffer for next piece */ + lastsemi = (char *)NULL; /* leave directory semi-colons alone */ + break; + + case ';': /* VMS version (or DEC-20 attrib?) */ + lastsemi = pp; + *pp++ = ';'; /* keep for now; remove VMS ";##" */ + break; /* later, if requested */ + +#ifdef ACORN_FTYPE_NFS + case ',': /* NFS filetype extension */ + lastcomma = pp; + *pp++ = ','; /* keep for now; may need to remove */ + break; /* later, if requested */ +#endif + + case '\026': /* control-V quote for special chars */ + quote = TRUE; /* set flag for next character */ + break; + +#ifdef MTS + case ' ': /* change spaces to underscore under */ + *pp++ = '_'; /* MTS; leave as spaces under Unix */ + break; +#endif + + default: + /* allow European characters in filenames: */ + if (isprint(workch) || (128 <= workch && workch <= 254)) + *pp++ = (char)workch; + } /* end switch */ + + } /* end while loop */ + + *pp = '\0'; /* done with pathcomp: terminate it */ + + /* if not saving them, remove VMS version numbers (appended ";###") */ + if (!uO.V_flag && lastsemi) { + pp = lastsemi + 1; + while (isdigit((uch)(*pp))) + ++pp; + if (*pp == '\0') /* only digits between ';' and end: nuke */ + *lastsemi = '\0'; + } + +#ifdef ACORN_FTYPE_NFS + /* translate Acorn filetype information if asked to do so */ + if (uO.acorn_nfs_ext && isRISCOSexfield(G.extra_field)) { + /* file *must* have a RISC OS extra field */ + int ft = (int)makelong(((RO_extra_block *)G.extra_field)->loadaddr); + /*32-bit*/ + if (lastcomma) { + pp = lastcomma + 1; + while (isxdigit((uch)(*pp))) ++pp; + if (pp == lastcomma+4 && *pp == '\0') *lastcomma='\0'; /* nuke */ + } + if ((ft & 1<<31)==0) ft=0x000FFD00; + sprintf(pathcomp+strlen(pathcomp), ",%03x", ft>>8 & 0xFFF); + } +#endif /* ACORN_FTYPE_NFS */ + +/*--------------------------------------------------------------------------- + Report if directory was created (and no file to create: filename ended + in '/'), check name to be sure it exists, and combine path and name be- + fore exiting. + ---------------------------------------------------------------------------*/ + + if (G.filename[strlen(G.filename) - 1] == '/') { + checkdir(__G__ G.filename, GETPATH); + if (created_dir) { + if (QCOND2) { + Info(slide, 0, ((char *)slide, " creating: %s\n", + G.filename)); + } +#ifndef NO_CHMOD + /* set approx. dir perms (make sure can still read/write in dir) */ + if (chmod(G.filename, (0xffff & G.pInfo->file_attr) | 0700)) + perror("chmod (directory attributes) error"); +#endif + return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ + } + return 2; /* dir existed already; don't look for data to extract */ + } + + if (*pathcomp == '\0') { + Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", + G.filename)); + return 3; + } + + checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ + checkdir(__G__ G.filename, GETPATH); + + return error; + +} /* end function mapname() */ + + + + +#if 0 /*========== NOTES ==========*/ + + extract-to dir: a:path/ + buildpath: path1/path2/ ... (NULL-terminated) + pathcomp: filename + + mapname(): + loop over chars in zipfile member name + checkdir(path component, COMPONENT | CREATEDIR) --> map as required? + (d:/tmp/unzip/) (disk:[tmp.unzip.) + (d:/tmp/unzip/jj/) (disk:[tmp.unzip.jj.) + (d:/tmp/unzip/jj/temp/) (disk:[tmp.unzip.jj.temp.) + finally add filename itself and check for existence? (could use with rename) + (d:/tmp/unzip/jj/temp/msg.outdir) (disk:[tmp.unzip.jj.temp]msg.outdir) + checkdir(name, GETPATH) --> copy path to name and free space + +#endif /* 0 */ + + + + +/***********************/ +/* Function checkdir() */ +/***********************/ + +int checkdir(__G__ pathcomp, flag) + __GDEF + char *pathcomp; + int flag; +/* + * returns: 1 - (on APPEND_NAME) truncated filename + * 2 - path doesn't exist, not allowed to create + * 3 - path doesn't exist, tried to create and failed; or + * path exists and is not a directory, but is supposed to be + * 4 - path is too long + * 10 - can't allocate memory for filename buffers + */ +{ + static int rootlen = 0; /* length of rootpath */ + static char *rootpath; /* user's "extract-to" directory */ + static char *buildpath; /* full path (so far) to extracted file */ + static char *end; /* pointer to end of buildpath ('\0') */ + +# define FN_MASK 7 +# define FUNCTION (flag & FN_MASK) + + + +/*--------------------------------------------------------------------------- + APPEND_DIR: append the path component to the path being built and check + for its existence. If doesn't exist and we are creating directories, do + so for this one; else signal success or error as appropriate. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_DIR) { + int too_long = FALSE; +#ifdef SHORT_NAMES + char *old_end = end; +#endif + + Trace((stderr, "appending dir segment [%s]\n", pathcomp)); + while ((*end = *pathcomp++) != '\0') + ++end; +#ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ + if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ + *(end = old_end + FILENAME_MAX) = '\0'; +#endif + + /* GRR: could do better check, see if overrunning buffer as we go: + * check end-buildpath after each append, set warning variable if + * within 20 of FILNAMSIZ; then if var set, do careful check when + * appending. Clear variable when begin new path. */ + + if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ + too_long = TRUE; /* check if extracting directory? */ + if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ + if (!G.create_dirs) { /* told not to create (freshening) */ + free(buildpath); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", buildpath)); + free(buildpath); + return 4; /* no room for filenames: fatal */ + } + if (mkdir(buildpath, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, + "checkdir error: cannot create %s\n\ + unable to process %s.\n", buildpath, G.filename)); + free(buildpath); + return 3; /* path didn't exist, tried to create, failed */ + } + created_dir = TRUE; + } else if (!S_ISDIR(G.statbuf.st_mode)) { + Info(slide, 1, ((char *)slide, + "checkdir error: %s exists but is not directory\n\ + unable to process %s.\n", buildpath, G.filename)); + free(buildpath); + return 3; /* path existed but wasn't dir */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", buildpath)); + free(buildpath); + return 4; /* no room for filenames: fatal */ + } + *end++ = '/'; + *end = '\0'; + Trace((stderr, "buildpath now = [%s]\n", buildpath)); + return 0; + + } /* end if (FUNCTION == APPEND_DIR) */ + +/*--------------------------------------------------------------------------- + GETPATH: copy full path to the string pointed at by pathcomp, and free + buildpath. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == GETPATH) { + strcpy(pathcomp, buildpath); + Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); + free(buildpath); + buildpath = end = (char *)NULL; + return 0; + } + +/*--------------------------------------------------------------------------- + APPEND_NAME: assume the path component is the filename; append it and + return without checking for existence. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_NAME) { +#ifdef SHORT_NAMES + char *old_end = end; +#endif + + Trace((stderr, "appending filename [%s]\n", pathcomp)); + while ((*end = *pathcomp++) != '\0') { + ++end; +#ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ + if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ + *(end = old_end + FILENAME_MAX) = '\0'; +#endif + if ((end-buildpath) >= FILNAMSIZ) { + *--end = '\0'; + Info(slide, 0x201, ((char *)slide, + "checkdir warning: path too long; truncating\n\ + %s\n -> %s\n", G.filename, buildpath)); + return 1; /* filename truncated */ + } + } + Trace((stderr, "buildpath now = [%s]\n", buildpath)); + return 0; /* could check for existence here, prompt for new name... */ + } + +/*--------------------------------------------------------------------------- + INIT: allocate and initialize buffer space for the file currently being + extracted. If file was renamed with an absolute path, don't prepend the + extract-to path. + ---------------------------------------------------------------------------*/ + +/* GRR: for VMS and TOPS-20, add up to 13 to strlen */ + + if (FUNCTION == INIT) { + Trace((stderr, "initializing buildpath to ")); +#ifdef ACORN_FTYPE_NFS + if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+ + (uO.acorn_nfs_ext ? 5 : 1))) +#else + if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) +#endif + == (char *)NULL) + return 10; + if ((rootlen > 0) && !renamed_fullpath) { + strcpy(buildpath, rootpath); + end = buildpath + rootlen; + } else { + *buildpath = '\0'; + end = buildpath; + } + Trace((stderr, "[%s]\n", buildpath)); + return 0; + } + +/*--------------------------------------------------------------------------- + ROOT: if appropriate, store the path in rootpath and create it if neces- + sary; else assume it's a zipfile member and return. This path segment + gets used in extracting all members from every zipfile specified on the + command line. + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) || defined(SFX_EXDIR)) + if (FUNCTION == ROOT) { + Trace((stderr, "initializing root path to [%s]\n", pathcomp)); + if (pathcomp == (char *)NULL) { + rootlen = 0; + return 0; + } + if ((rootlen = strlen(pathcomp)) > 0) { + if (pathcomp[rootlen-1] == '/') { + pathcomp[--rootlen] = '\0'; + } + if (rootlen > 0 && (stat(pathcomp, &G.statbuf) || + !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ + { + if (!G.create_dirs /* || iswild(pathcomp) */ ) { + rootlen = 0; + return 2; /* skip (or treat as stored file) */ + } + /* create the directory (could add loop here to scan pathcomp + * and create more than one level, but why really necessary?) */ + if (mkdir(pathcomp, 0777) == -1) { + Info(slide, 1, ((char *)slide, + "checkdir: cannot create extraction directory: %s\n", + pathcomp)); + rootlen = 0; /* path didn't exist, tried to create, and */ + return 3; /* failed: file exists, or 2+ levels required */ + } + } + if ((rootpath = (char *)malloc(rootlen+2)) == (char *)NULL) { + rootlen = 0; + return 10; + } + strcpy(rootpath, pathcomp); + rootpath[rootlen++] = '/'; + rootpath[rootlen] = '\0'; + Trace((stderr, "rootpath now = [%s]\n", rootpath)); + } + return 0; + } +#endif /* !SFX || SFX_EXDIR */ + +/*--------------------------------------------------------------------------- + END: free rootpath, immediately prior to program exit. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == END) { + Trace((stderr, "freeing rootpath\n")); + if (rootlen > 0) { + free(rootpath); + rootlen = 0; + } + return 0; + } + + return 99; /* should never reach */ + +} /* end function checkdir() */ + + + + + +#ifdef NO_MKDIR + +/********************/ +/* Function mkdir() */ +/********************/ + +int mkdir(path, mode) + char *path; + int mode; /* ignored */ +/* + * returns: 0 - successful + * -1 - failed (errno not set, however) + */ +{ + char command[FILNAMSIZ+40]; /* buffer for system() call */ + + /* GRR 930416: added single quotes around path to avoid bug with + * creating directories with ampersands in name; not yet tested */ + sprintf(command, "IFS=\" \t\n\" /bin/mkdir '%s' 2>/dev/null", path); + if (system(command)) + return -1; + return 0; +} + +#endif /* NO_MKDIR */ + + + + + +#if 0 +#ifdef MORE + +/**************************/ +/* Function screenlines() */ +/**************************/ + +int screenlines() +{ + char *envptr, *getenv(); + int n; + + /* GRR: this is overly simplistic; should use winsize struct and + * appropriate TIOCGWINSZ ioctl(), assuming exists on enough systems + */ + envptr = getenv("LINES"); + if (envptr == (char *)NULL || (n = atoi(envptr)) < 5) + return 24; /* VT-100 assumed to be minimal hardware */ + else + return n; +} + +#endif /* MORE */ +#endif /* 0 */ + + + + + +#ifndef MTS + +/****************************/ +/* Function close_outfile() */ +/****************************/ + +void close_outfile(__G) /* GRR: change to return PK-style warning level */ + __GDEF +{ + iztimes zt; + ush z_uidgid[2]; + unsigned eb_izux_flg; + +/*--------------------------------------------------------------------------- + If symbolic links are supported, allocate a storage area, put the uncom- + pressed "data" in it, and create the link. Since we know it's a symbolic + link to start with, we shouldn't have to worry about overflowing unsigned + ints with unsigned longs. + ---------------------------------------------------------------------------*/ + +#ifdef SYMLINKS + if (G.symlnk) { + unsigned ucsize = (unsigned)G.lrec.ucsize; + char *linktarget = (char *)malloc((unsigned)G.lrec.ucsize+1); + + fclose(G.outfile); /* close "data" file... */ + G.outfile = fopen(G.filename, FOPR); /* ...and reopen for reading */ + if (!linktarget || fread(linktarget, 1, ucsize, G.outfile) != + (int)ucsize) + { + Info(slide, 0x201, ((char *)slide, + "warning: symbolic link (%s) failed\n", G.filename)); + if (linktarget) + free(linktarget); + fclose(G.outfile); + return; + } + fclose(G.outfile); /* close "data" file for good... */ + unlink(G.filename); /* ...and delete it */ + linktarget[ucsize] = '\0'; + if (QCOND2) + Info(slide, 0, ((char *)slide, "-> %s ", linktarget)); + if (symlink(linktarget, G.filename)) /* create the real link */ + perror("symlink error"); + free(linktarget); + return; /* can't set time on symlinks */ + } +#endif /* SYMLINKS */ + + fclose(G.outfile); +#ifdef QLZIP + if (G.extra_field) { + static void qlfix OF((__GPRO__ uch *ef_ptr, unsigned ef_len)); + + qlfix(__G__ G.extra_field, G.lrec.extra_field_length); + } +#endif + +/*--------------------------------------------------------------------------- + Convert from MSDOS-format local time and date to Unix-format 32-bit GMT + time: adjust base year from 1980 to 1970, do usual conversions from + yy/mm/dd hh:mm:ss to elapsed seconds, and account for timezone and day- + light savings time differences. If we have a Unix extra field, however, + we're laughing: both mtime and atime are ours. On the other hand, we + then have to check for restoration of UID/GID. + ---------------------------------------------------------------------------*/ + + eb_izux_flg = (G.extra_field ? ef_scan_for_izux(G.extra_field, + G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, +#ifdef IZ_CHECK_TZ + (G.tz_is_valid ? &zt : NULL), +#else + &zt, +#endif + z_uidgid) : 0); + if (eb_izux_flg & EB_UT_FL_MTIME) { + TTrace((stderr, "\nclose_outfile: Unix e.f. modif. time = %ld\n", + zt.mtime)); + } else { + zt.mtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); + } + if (eb_izux_flg & EB_UT_FL_ATIME) { + TTrace((stderr, "close_outfile: Unix e.f. access time = %ld\n", + zt.atime)); + } else { + zt.atime = zt.mtime; + TTrace((stderr, "\nclose_outfile: modification/access times = %ld\n", + zt.mtime)); + } + + /* if -X option was specified and we have UID/GID info, restore it */ + if (uO.X_flag && eb_izux_flg & EB_UX2_VALID) { + TTrace((stderr, "close_outfile: restoring Unix UID/GID info\n")); + if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1])) + { + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: cannot set UID %d and/or GID %d for %s\n", + z_uidgid[0], z_uidgid[1], G.filename)); + else + Info(slide, 0x201, ((char *)slide, + " (warning) cannot set UID %d and/or GID %d", + z_uidgid[0], z_uidgid[1])); + } + } + + /* set the file's access and modification times */ + if (utime(G.filename, (ztimbuf *)&zt)) { +#ifdef AOS_VS + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, "... cannot set time for %s\n", + G.filename)); + else + Info(slide, 0x201, ((char *)slide, "... cannot set time")); +#else + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: cannot set times for %s\n", G.filename)); + else + Info(slide, 0x201, ((char *)slide, + " (warning) cannot set times")); +#endif /* ?AOS_VS */ + } + +/*--------------------------------------------------------------------------- + Change the file permissions from default ones to those stored in the + zipfile. + ---------------------------------------------------------------------------*/ + +#ifndef NO_CHMOD + if (chmod(G.filename, 0xffff & G.pInfo->file_attr)) + perror("chmod (file attributes) error"); +#endif + +} /* end function close_outfile() */ + +#endif /* !MTS */ + + + + +#ifdef SET_DIR_ATTRIB +/* messages of code for setting directory attributes */ +static char Far DirlistUidGidFailed[] = + "warning: cannot set UID %d and/or GID %d for %s\n"; +static char Far DirlistUtimeFailed[] = + "warning: cannot set modification, access times for %s\n"; +# ifndef NO_CHMOD + static char Far DirlistChmodFailed[] = + "warning: cannot set permissions for %s\n"; +# endif + + +int set_direc_attribs(__G__ d) + __GDEF + dirtime *d; +{ + int errval = PK_OK; + + if (d->have_uidgid && + chown(d->fn, (uid_t)d->uidgid[0], (gid_t)d->uidgid[1])) + { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistUidGidFailed), + d->uidgid[0], d->uidgid[1], d->fn)); + if (!errval) + errval = PK_WARN; + } + if (utime(d->fn, &d->u.t2)) { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistUtimeFailed), d->fn)); + if (!errval) + errval = PK_WARN; + } +#ifndef NO_CHMOD + if (chmod(d->fn, 0xffff & d->perms)) { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistChmodFailed), d->fn)); + /* perror("chmod (file attributes) error"); */ + if (!errval) + errval = PK_WARN; + } +#endif /* !NO_CHMOD */ + return errval; +} /* end function set_directory_attributes() */ + +#endif /* SET_DIR_ATTRIB */ + + + + +#ifdef TIMESTAMP + +/***************************/ +/* Function stamp_file() */ +/***************************/ + +int stamp_file(fname, modtime) + ZCONST char *fname; + time_t modtime; +{ + ztimbuf tp; + + tp.modtime = tp.actime = modtime; + return (utime(fname, &tp)); + +} /* end function stamp_file() */ + +#endif /* TIMESTAMP */ + + + + +#ifndef SFX + +/************************/ +/* Function version() */ +/************************/ + +void version(__G) + __GDEF +{ +#if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE) || defined(NetBSD) + char buf1[40]; +#if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE) + char buf2[40]; +#endif +#endif + + /* Pyramid, NeXT have problems with huge macro expansion, too: no Info() */ + sprintf((char *)slide, LoadFarString(CompiledWith), + +#ifdef __GNUC__ +# ifdef NX_CURRENT_COMPILER_RELEASE + (sprintf(buf1, "NeXT DevKit %d.%02d ", NX_CURRENT_COMPILER_RELEASE/100, + NX_CURRENT_COMPILER_RELEASE%100), buf1), + (strlen(__VERSION__) > 8)? "(gcc)" : + (sprintf(buf2, "(gcc %s)", __VERSION__), buf2), +# else + "gcc ", __VERSION__, +# endif +#else +# if defined(CRAY) && defined(_RELEASE) + "cc ", (sprintf(buf1, "version %d", _RELEASE), buf1), +# else +# ifdef __VERSION__ + "cc ", __VERSION__, +# else + "cc", "", +# endif +# endif +#endif + + "Unix", + +#if defined(sgi) || defined(__sgi) + " (Silicon Graphics IRIX)", +#else +#ifdef sun +# ifdef sparc +# ifdef __SVR4 + " (Sun SPARC/Solaris)", +# else /* may or may not be SunOS */ + " (Sun SPARC)", +# endif +# else +# if defined(sun386) || defined(i386) + " (Sun 386i)", +# else +# if defined(mc68020) || defined(__mc68020__) + " (Sun 3)", +# else /* mc68010 or mc68000: Sun 2 or earlier */ + " (Sun 2)", +# endif +# endif +# endif +#else +#ifdef __hpux + " (HP/UX)", +#else +#ifdef __osf__ + " (DEC OSF/1)", +#else +#ifdef _AIX + " (IBM AIX)", +#else +#ifdef aiws + " (IBM RT/AIX)", +#else +#if defined(CRAY) || defined(cray) +# ifdef _UNICOS + (sprintf(buf2, " (Cray UNICOS release %d)", _UNICOS), buf2), +# else + " (Cray UNICOS)", +# endif +#else +#if defined(uts) || defined(UTS) + " (Amdahl UTS)", +#else +#ifdef NeXT +# ifdef mc68000 + " (NeXTStep/black)", +# else + " (NeXTStep for Intel)", +# endif +#else /* the next dozen or so are somewhat order-dependent */ +#ifdef LINUX +# ifdef __ELF__ + " (Linux ELF)", +# else + " (Linux a.out)", +# endif +#else +#ifdef MINIX + " (Minix)", +#else +#ifdef M_UNIX + " (SCO Unix)", +#else +#ifdef M_XENIX + " (SCO Xenix)", +#else +#ifdef __NetBSD__ +# ifdef NetBSD0_8 + (sprintf(buf1, " (NetBSD 0.8%c)", (char)(NetBSD0_8 - 1 + 'A')), buf1), +# else +# ifdef NetBSD0_9 + (sprintf(buf1, " (NetBSD 0.9%c)", (char)(NetBSD0_9 - 1 + 'A')), buf1), +# else +# ifdef NetBSD1_0 + (sprintf(buf1, " (NetBSD 1.0%c)", (char)(NetBSD1_0 - 1 + 'A')), buf1), +# else + (BSD4_4 == 0.5)? " (NetBSD before 0.9)" : " (NetBSD 1.1 or later)", +# endif +# endif +# endif +#else +#ifdef __FreeBSD__ + (BSD4_4 == 0.5)? " (FreeBSD 1.x)" : " (FreeBSD 2.0 or later)", +#else +#ifdef __bsdi__ + (BSD4_4 == 0.5)? " (BSD/386 1.0)" : " (BSD/386 1.1 or later)", +#else +#ifdef __386BSD__ + (BSD4_4 == 1)? " (386BSD, post-4.4 release)" : " (386BSD)", +#else +#if defined(i486) || defined(__i486) || defined(__i486__) + " (Intel 486)", +#else +#if defined(i386) || defined(__i386) || defined(__i386__) + " (Intel 386)", +#else +#ifdef pyr + " (Pyramid)", +#else +#ifdef ultrix +# ifdef mips + " (DEC/MIPS)", +# else +# ifdef vax + " (DEC/VAX)", +# else /* __alpha? */ + " (DEC/Alpha)", +# endif +# endif +#else +#ifdef gould + " (Gould)", +#else +#ifdef MTS + " (MTS)", +#else +#ifdef __convexc__ + " (Convex)", +#else +#ifdef __QNX__ + " (QNX 4)", +#else +#ifdef __QNXNTO__ + " (QNX Neutrino)", +#else +#ifdef Lynx + " (LynxOS)", +#else + "", +#endif /* Lynx */ +#endif /* QNX Neutrino */ +#endif /* QNX 4 */ +#endif /* Convex */ +#endif /* MTS */ +#endif /* Gould */ +#endif /* DEC */ +#endif /* Pyramid */ +#endif /* 386 */ +#endif /* 486 */ +#endif /* 386BSD */ +#endif /* BSDI BSD/386 */ +#endif /* NetBSD */ +#endif /* FreeBSD */ +#endif /* SCO Xenix */ +#endif /* SCO Unix */ +#endif /* Minix */ +#endif /* Linux */ +#endif /* NeXT */ +#endif /* Amdahl */ +#endif /* Cray */ +#endif /* RT/AIX */ +#endif /* AIX */ +#endif /* OSF/1 */ +#endif /* HP/UX */ +#endif /* Sun */ +#endif /* SGI */ + +#ifdef __DATE__ + " on ", __DATE__ +#else + "", "" +#endif + ); + + (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); + +} /* end function version() */ + +#endif /* !SFX */ + + + + +#ifdef QLZIP + +struct qdirect { + long d_length __attribute__ ((packed)); /* file length */ + unsigned char d_access __attribute__ ((packed)); /* file access type */ + unsigned char d_type __attribute__ ((packed)); /* file type */ + long d_datalen __attribute__ ((packed)); /* data length */ + long d_reserved __attribute__ ((packed));/* Unused */ + short d_szname __attribute__ ((packed)); /* size of name */ + char d_name[36] __attribute__ ((packed));/* name area */ + long d_update __attribute__ ((packed)); /* last update */ + long d_refdate __attribute__ ((packed)); + long d_backup __attribute__ ((packed)); /* EOD */ +}; + +#define LONGID "QDOS02" +#define EXTRALEN (sizeof(struct qdirect) + 8) +#define JBLONGID "QZHD" +#define JBEXTRALEN (sizeof(jbextra) - 4 * sizeof(char)) + +typedef struct { + char eb_header[4] __attribute__ ((packed)); /* place_holder */ + char longid[8] __attribute__ ((packed)); + struct qdirect header __attribute__ ((packed)); +} qdosextra; + +typedef struct { + char eb_header[4]; /* place_holder */ + char longid[4]; + struct qdirect header; +} jbextra; + + + +/* The following two functions SH() and LG() convert big-endian short + * and long numbers into native byte order. They are some kind of + * counterpart to the generic UnZip's makeword() and makelong() functions. + */ +static ush SH(ush val) +{ + uch swapbuf[2]; + + swapbuf[1] = (uch)(val & 0xff); + swapbuf[0] = (uch)(val >> 8); + return (*(ush *)swapbuf); +} + + + +static ulg LG(ulg val) +{ + /* convert the big-endian unsigned long number `val' to the machine + * dependant representation + */ + ush swapbuf[2]; + + swapbuf[1] = SH((ush)(val & 0xffff)); + swapbuf[0] = SH((ush)(val >> 16)); + return (*(ulg *)swapbuf); +} + + + +static void qlfix(__G__ ef_ptr, ef_len) + __GDEF + uch *ef_ptr; + unsigned ef_len; +{ + while (ef_len >= EB_HEADSIZE) + { + unsigned eb_id = makeword(EB_ID + ef_ptr); + unsigned eb_len = makeword(EB_LEN + ef_ptr); + + if (eb_len > (ef_len - EB_HEADSIZE)) { + /* discovered some extra field inconsistency! */ + Trace((stderr, + "qlfix: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } + + switch (eb_id) { + case EF_QDOS: + { + struct _ntc_ + { + long id; + long dlen; + } ntc; + long dlen = 0; + + qdosextra *extra = (qdosextra *)ef_ptr; + jbextra *jbp = (jbextra *)ef_ptr; + + if (!strncmp(extra->longid, LONGID, strlen(LONGID))) + { + if (eb_len != EXTRALEN) + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in Qdos field for %s\n", + G.filename)); + else + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in Qdos field")); + + if (extra->header.d_type) + { + dlen = extra->header.d_datalen; + } + } + + if (!strncmp(jbp->longid, JBLONGID, strlen(JBLONGID))) + { + if (eb_len != JBEXTRALEN) + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in QZ field for %s\n", + G.filename)); + else + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in QZ field")); + if(jbp->header.d_type) + { + dlen = jbp->header.d_datalen; + } + } + + if ((long)LG(dlen) > 0) + { + G.outfile = fopen(G.filename,"r+"); + fseek(G.outfile, -8, SEEK_END); + fread(&ntc, 8, 1, G.outfile); + if(ntc.id != *(long *)"XTcc") + { + ntc.id = *(long *)"XTcc"; + ntc.dlen = dlen; + fwrite (&ntc, 8, 1, G.outfile); + } + Info(slide, 0x201, ((char *)slide, "QData = %d", LG(dlen))); + fclose(G.outfile); + } + return; /* finished, cancel further extra field scanning */ + } + + default: + Trace((stderr,"qlfix: unknown extra field block, ID=%d\n", + eb_id)); + } + + /* Skip this extra field block */ + ef_ptr += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + } +} +#endif /* QLZIP */ + + + + +#ifdef ACORN_FTYPE_NFS + +/* Acorn bits for NFS filetyping */ + +static int isRISCOSexfield(uch *extra_field) +{ + if (extra_field != NULL) { + RO_extra_block *block = (RO_extra_block *)extra_field; + return ( + makeword(block->ID) == EF_SPARK && + (makeword(block->size) == 24 || makeword(block->size) == 20) && + makelong(block->ID_2) == 0x30435241 /* ARC0 */); + } + return FALSE; +} +#endif /* ACORN_FTYPE_NFS */ diff --git a/utils/Install/packzip/unreduce.c b/utils/Install/packzip/unreduce.c new file mode 100644 index 0000000000..4cfb3fec6f --- /dev/null +++ b/utils/Install/packzip/unreduce.c @@ -0,0 +1,230 @@ +/*--------------------------------------------------------------------------- + + unreduce.c + + The Reducing algorithm is actually a combination of two distinct algorithms. + The first algorithm compresses repeated byte sequences, and the second al- + gorithm takes the compressed stream from the first algorithm and applies a + probabilistic compression method. + + * Copyright 1989 Samuel H. Smith; All rights reserved + * + * Do not distribute modified versions without my permission. + * Do not remove or alter this notice or any other copyright notice. + * If you use this in your own program you must distribute source code. + * Do not use any of this in a commercial product. + + See the accompanying file "COPYING" in UnZip source and binary distributions + for further information. This code is NOT used unless USE_SMITH_CODE is + explicitly defined (==> COPYRIGHT_CLEAN is not defined). + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" /* defines COPYRIGHT_CLEAN by default */ + + +#ifndef COPYRIGHT_CLEAN + +/**************************************/ +/* UnReduce Defines, Typedefs, etc. */ +/**************************************/ + +#define DLE 144 + +typedef uch f_array[64]; /* for followers[256][64] */ + + + +/******************************/ +/* UnReduce Local Functions */ +/******************************/ + +static void LoadFollowers OF((__GPRO__ f_array *followers, uch *Slen)); + + + +/*******************************/ +/* UnReduce Global Constants */ +/*******************************/ + +static ZCONST shrint L_table[] = +{0, 0x7f, 0x3f, 0x1f, 0x0f}; + +static ZCONST shrint D_shift[] = +{0, 0x07, 0x06, 0x05, 0x04}; +static ZCONST shrint D_mask[] = +{0, 0x01, 0x03, 0x07, 0x0f}; + +static ZCONST shrint B_table[] = +{8, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8}; + + + + + +/*************************/ +/* Function unreduce() */ +/*************************/ + +void unreduce(__G) /* expand probabilistically reduced data */ + __GDEF +{ + register int lchar = 0; + shrint nchar; + shrint ExState = 0; + shrint V = 0; + shrint Len = 0; + long s = G.ucsize; /* number of bytes left to decompress */ + unsigned w = 0; /* position in output window slide[] */ + unsigned u = 1; /* true if slide[] unflushed */ + uch Slen[256]; + + f_array *followers = (f_array *)(slide + 0x4000); + int factor = G.lrec.compression_method - 1; + + LoadFollowers(__G__ followers, Slen); + + while (s > 0 /* && (!zipeof) */) { + if (Slen[lchar] == 0) + READBITS(8, nchar) /* ; */ + else { + READBITS(1, nchar) /* ; */ + if (nchar != 0) + READBITS(8, nchar) /* ; */ + else { + shrint follower; + int bitsneeded = B_table[Slen[lchar]]; + + READBITS(bitsneeded, follower) /* ; */ + nchar = followers[lchar][follower]; + } + } + /* expand the resulting byte */ + switch (ExState) { + + case 0: + if (nchar != DLE) { + s--; + slide[w++] = (uch)nchar; + if (w == 0x4000) { + flush(__G__ slide, (ulg)w, 0); + w = u = 0; + } + } + else + ExState = 1; + break; + + case 1: + if (nchar != 0) { + V = nchar; + Len = V & L_table[factor]; + if (Len == L_table[factor]) + ExState = 2; + else + ExState = 3; + } else { + s--; + slide[w++] = DLE; + if (w == 0x4000) + { + flush(__G__ slide, (ulg)w, 0); + w = u = 0; + } + ExState = 0; + } + break; + + case 2:{ + Len += nchar; + ExState = 3; + } + break; + + case 3:{ + register unsigned e; + register unsigned n = Len + 3; + register unsigned d = w - ((((V >> D_shift[factor]) & + D_mask[factor]) << 8) + nchar + 1); + + s -= n; + do { + n -= (e = (e = 0x4000 - ((d &= 0x3fff) > w ? d : w)) > n ? + n : e); + if (u && w <= d) + { + memzero(slide + w, e); + w += e; + d += e; + } + else + if (w - d < e) /* (assume unsigned comparison) */ + do { /* slow to avoid memcpy() overlap */ + slide[w++] = slide[d++]; + } while (--e); + else + { + memcpy(slide + w, slide + d, e); + w += e; + d += e; + } + if (w == 0x4000) + { + flush(__G__ slide, (ulg)w, 0); + w = u = 0; + } + } while (n); + + ExState = 0; + } + break; + } + + /* store character for next iteration */ + lchar = nchar; + } + + /* flush out slide */ + flush(__G__ slide, (ulg)w, 0); +} + + + + + +/******************************/ +/* Function LoadFollowers() */ +/******************************/ + +static void LoadFollowers(__G__ followers, Slen) + __GDEF + f_array *followers; + uch *Slen; +{ + register int x; + register int i; + + for (x = 255; x >= 0; x--) { + READBITS(6, Slen[x]) /* ; */ + for (i = 0; (uch)i < Slen[x]; i++) + READBITS(8, followers[x][i]) /* ; */ + } +} + +#endif /* !COPYRIGHT_CLEAN */ diff --git a/utils/Install/packzip/unshrink.c b/utils/Install/packzip/unshrink.c new file mode 100644 index 0000000000..287b4baf54 --- /dev/null +++ b/utils/Install/packzip/unshrink.c @@ -0,0 +1,301 @@ +/*--------------------------------------------------------------------------- + + unshrink.c version 1.21 23 Nov 95 + + + NOTE: This code may or may not infringe on the so-called "Welch + patent" owned by Unisys. (From reading the patent, it appears + that a pure LZW decompressor is *not* covered, but this claim has + not been tested in court, and Unisys is reported to believe other- + wise.) It is therefore the responsibility of the user to acquire + whatever license(s) may be required for legal use of this code. + + THE INFO-ZIP GROUP DISCLAIMS ALL LIABILITY FOR USE OF THIS CODE + IN VIOLATION OF APPLICABLE PATENT LAW. + + + Shrinking is basically a dynamic LZW algorithm with allowed code sizes of + up to 13 bits; in addition, there is provision for partial clearing of + leaf nodes. PKWARE uses the special code 256 (decimal) to indicate a + change in code size or a partial clear of the code tree: 256,1 for the + former and 256,2 for the latter. [Note that partial clearing can "orphan" + nodes: the parent-to-be can be cleared before its new child is added, + but the child is added anyway (as an orphan, as though the parent still + existed). When the tree fills up to the point where the parent node is + reused, the orphan is effectively "adopted." Versions prior to 1.05 were + affected more due to greater use of pointers (to children and siblings + as well as parents).] + + This replacement version of unshrink.c was written from scratch. It is + based only on the algorithms described in Mark Nelson's _The Data Compres- + sion Book_ and in Terry Welch's original paper in the June 1984 issue of + IEEE _Computer_; no existing source code, including any in Nelson's book, + was used. + + Memory requirements have been reduced in this version and are now no more + than the original Sam Smith code. This is still larger than any of the + other algorithms: at a minimum, 8K+8K+16K (stack+values+parents) assuming + 16-bit short ints, and this does not even include the output buffer (the + other algorithms leave the uncompressed data in the work area, typically + called slide[]). For machines with a 64KB data space this is a problem, + particularly when text conversion is required and line endings have more + than one character. UnZip's solution is to use two roughly equal halves + of outbuf for the ASCII conversion in such a case; the "unshrink" argument + to flush() signals that this is the case. + + For large-memory machines, a second outbuf is allocated for translations, + but only if unshrinking and only if translations are required. + + | binary mode | text mode + --------------------------------------------------- + big mem | big outbuf | big outbuf + big outbuf2 <- malloc'd here + small mem | small outbuf | half + half small outbuf + + Copyright 1994, 1995 Greg Roelofs. See the accompanying file "COPYING" + in UnZip 5.20 (or later) source or binary distributions. + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" /* defines LZW_CLEAN by default */ + + +#ifndef LZW_CLEAN + +static void partial_clear OF((__GPRO)); + +#ifdef DEBUG +# define OUTDBG(c) \ + if ((c)<32 || (c)>=127) pipeit("\\x%02x",(c)); else { } +#else +# define OUTDBG(c) +#endif + +/* HSIZE is defined as 2^13 (8192) in unzip.h */ +#define BOGUSCODE 256 +#define FLAG_BITS parent /* upper bits of parent[] used as flag bits */ +#define CODE_MASK (HSIZE - 1) /* 0x1fff (lower bits are parent's index) */ +#define FREE_CODE HSIZE /* 0x2000 (code is unused or was cleared) */ +#define HAS_CHILD (HSIZE << 1) /* 0x4000 (code has a child--do not clear) */ + +#define parent G.area.shrink.Parent +#define Value G.area.shrink.value /* "value" conflicts with Pyramid ioctl.h */ +#define stack G.area.shrink.Stack + + +/***********************/ +/* Function unshrink() */ +/***********************/ + +int unshrink(__G) + __GDEF +{ + int offset = (HSIZE - 1); + uch *stacktop = stack + offset; + register uch *newstr; + int codesize=9, len, KwKwK, error; + shrint code, oldcode, freecode, curcode; + shrint lastfreecode; + unsigned int outbufsiz; +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + /* Normally realbuf and outbuf will be the same. However, if the data + * are redirected to a large memory buffer, realbuf will point to the + * new location while outbuf will remain pointing to the malloc'd + * memory buffer. */ + uch *realbuf = G.outbuf; +#else +# define realbuf G.outbuf +#endif + + +/*--------------------------------------------------------------------------- + Initialize various variables. + ---------------------------------------------------------------------------*/ + + lastfreecode = BOGUSCODE; + +#ifndef VMS /* VMS uses its own buffer scheme for textmode flush(). */ +#ifndef SMALL_MEM + /* non-memory-limited machines: allocate second (large) buffer for + * textmode conversion in flush(), but only if needed */ + if (G.pInfo->textmode && !G.outbuf2 && + (G.outbuf2 = (uch *)malloc(TRANSBUFSIZ)) == (uch *)NULL) + return PK_MEM3; +#endif +#endif /* !VMS */ + + for (code = 0; code < BOGUSCODE; ++code) { + Value[code] = (uch)code; + parent[code] = BOGUSCODE; + } + for (code = BOGUSCODE+1; code < HSIZE; ++code) + parent[code] = FREE_CODE; + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { /* use normal outbuf unless we're a DLL routine */ + realbuf = G.redirect_buffer; + outbufsiz = G.redirect_size; + } else +#endif +#ifdef DLL + if (G.pInfo->textmode && !G.redirect_data) +#else + if (G.pInfo->textmode) +#endif + outbufsiz = RAWBUFSIZ; + else + outbufsiz = OUTBUFSIZ; + G.outptr = realbuf; + G.outcnt = 0L; + +/*--------------------------------------------------------------------------- + Get and output first code, then loop over remaining ones. + ---------------------------------------------------------------------------*/ + + READBITS(codesize, oldcode) + if (!G.zipeof) { + *G.outptr++ = (uch)oldcode; + OUTDBG((uch)oldcode) + ++G.outcnt; + } + + do { + READBITS(codesize, code) + if (G.zipeof) + break; + if (code == BOGUSCODE) { /* possible to have consecutive escapes? */ + READBITS(codesize, code) + if (code == 1) { + ++codesize; + Trace((stderr, " (codesize now %d bits)\n", codesize)); + } else if (code == 2) { + Trace((stderr, " (partial clear code)\n")); + partial_clear(__G); /* clear leafs (nodes with no children) */ + Trace((stderr, " (done with partial clear)\n")); + lastfreecode = BOGUSCODE; /* reset start of free-node search */ + } + continue; + } + + /*----------------------------------------------------------------------- + Translate code: traverse tree from leaf back to root. + -----------------------------------------------------------------------*/ + + newstr = stacktop; + curcode = code; + + if (parent[curcode] == FREE_CODE) { + /* or (FLAG_BITS[curcode] & FREE_CODE)? */ + KwKwK = TRUE; + Trace((stderr, " (found a KwKwK code %d; oldcode = %d)\n", code, + oldcode)); + --newstr; /* last character will be same as first character */ + curcode = oldcode; + } else + KwKwK = FALSE; + + do { + *newstr-- = Value[curcode]; + curcode = (shrint)(parent[curcode] & CODE_MASK); + } while (curcode != BOGUSCODE); + + len = (int)(stacktop - newstr++); + if (KwKwK) + *stacktop = *newstr; + + /*----------------------------------------------------------------------- + Write expanded string in reverse order to output buffer. + -----------------------------------------------------------------------*/ + + Trace((stderr, "code %4d; oldcode %4d; char %3d (%c); string [", code, + oldcode, (int)(*newstr), (*newstr<32 || *newstr>=127)? ' ':*newstr)); + + { + register uch *p; + + for (p = newstr; p < newstr+len; ++p) { + *G.outptr++ = *p; + OUTDBG(*p) + if (++G.outcnt == outbufsiz) { + Trace((stderr, "doing flush(), outcnt = %lu\n", G.outcnt)); + if ((error = flush(__G__ realbuf, G.outcnt, TRUE)) != 0) + pipeit("unshrink: flush() error (%d)\n", + error); + Trace((stderr, "done with flush()\n")); + G.outptr = realbuf; + G.outcnt = 0L; + } + } + } + + /*----------------------------------------------------------------------- + Add new leaf (first character of newstr) to tree as child of oldcode. + -----------------------------------------------------------------------*/ + + /* search for freecode */ + freecode = (shrint)(lastfreecode + 1); + /* add if-test before loop for speed? */ + while (parent[freecode] != FREE_CODE) + ++freecode; + lastfreecode = freecode; + Trace((stderr, "]; newcode %d\n", freecode)); + + Value[freecode] = *newstr; + parent[freecode] = oldcode; + oldcode = code; + + } while (!G.zipeof); + +/*--------------------------------------------------------------------------- + Flush any remaining data and return to sender... + ---------------------------------------------------------------------------*/ + + if (G.outcnt > 0L) { + Trace((stderr, "doing final flush(), outcnt = %lu\n", G.outcnt)); + if ((error = flush(__G__ realbuf, G.outcnt, TRUE)) != 0) + pipeit("unshrink: flush() error (%d)\n", error); + Trace((stderr, "done with flush()\n")); + } + + return PK_OK; + +} /* end function unshrink() */ + + + + + +/****************************/ +/* Function partial_clear() */ /* no longer recursive... */ +/****************************/ + +static void partial_clear(__G) + __GDEF +{ + register shrint code; + + /* clear all nodes which have no children (i.e., leaf nodes only) */ + + /* first loop: mark each parent as such */ + for (code = BOGUSCODE+1; code < HSIZE; ++code) { + register shrint cparent = (shrint)(parent[code] & CODE_MASK); + + if (cparent > BOGUSCODE && cparent != FREE_CODE) + FLAG_BITS[cparent] |= HAS_CHILD; /* set parent's child-bit */ + } + + /* second loop: clear all nodes *not* marked as parents; reset flag bits */ + for (code = BOGUSCODE+1; code < HSIZE; ++code) { + if (FLAG_BITS[code] & HAS_CHILD) /* just clear child-bit */ + FLAG_BITS[code] &= ~HAS_CHILD; + else { /* leaf: lose it */ + Trace((stderr, "%d\n", code)); + parent[code] = FREE_CODE; + } + } + + return; +} + +#endif /* !LZW_CLEAN */ diff --git a/utils/Install/packzip/unzip.c b/utils/Install/packzip/unzip.c new file mode 100644 index 0000000000..feada08bfc --- /dev/null +++ b/utils/Install/packzip/unzip.c @@ -0,0 +1,1744 @@ +/*--------------------------------------------------------------------------- + + unzip.c + + UnZip - a zipfile extraction utility. See below for make instructions, or + read the comments in Makefile and the various Contents files for more de- + tailed explanations. To report a bug, send a *complete* description to + Zip-Bugs@lists.wku.edu; include machine type, operating system and ver- + sion, compiler and version, and reasonably detailed error messages or prob- + lem report. To join Info-ZIP, see the instructions in README. + + UnZip 5.x is a greatly expanded and partially rewritten successor to 4.x, + which in turn was almost a complete rewrite of version 3.x. For a detailed + revision history, see UnzpHist.zip at quest.jpl.nasa.gov. For a list of + the many (near infinite) contributors, see "CONTRIBS" in the UnZip source + distribution. + + --------------------------------------------------------------------------- + + [from original zipinfo.c] + + This program reads great gobs of totally nifty information, including the + central directory stuff, from ZIP archives ("zipfiles" for short). It + started as just a testbed for fooling with zipfiles, but at this point it + is actually a useful utility. It also became the basis for the rewrite of + UnZip (3.16 -> 4.0), using the central directory for processing rather than + the individual (local) file headers. + + As of ZipInfo v2.0 and UnZip v5.1, the two programs are combined into one. + If the executable is named "unzip" (or "unzip.exe", depending), it behaves + like UnZip by default; if it is named "zipinfo" or "ii", it behaves like + ZipInfo. The ZipInfo behavior may also be triggered by use of unzip's -Z + option; for example, "unzip -Z [zipinfo_options] archive.zip". + + Another dandy product from your buddies at Newtware! + + Author: Greg Roelofs, newt@pobox.com, http://pobox.com/~newt/ + 23 August 1990 -> April 1997 + + --------------------------------------------------------------------------- + + Version: unzip5??.{tar.Z | tar.gz | zip} for Unix, VMS, OS/2, MS-DOS, Amiga, + Atari, Windows 3.x/95/NT/CE, Macintosh, Human68K, Acorn RISC OS, + BeOS, SMS/QDOS, VM/CMS, MVS, AOS/VS and TOPS-20. Decryption + requires sources in zcrypt28.zip. See the accompanying "WHERE" + file in the main source distribution for ftp, uucp, BBS and mail- + server sites, or see http://www.cdrom.com/pub/infozip/UnZip.html . + + Copyrights: see accompanying file "COPYING" in UnZip source distribution. + (This software is free but NOT IN THE PUBLIC DOMAIN. There + are some restrictions on commercial use.) + + ---------------------------------------------------------------------------*/ + + + +#define UNZIP_C +#define UNZIP_INTERNAL +#include "unzip.h" /* includes, typedefs, macros, prototypes, etc. */ +#include "crypt.h" +#include "version.h" + +#ifndef WINDLL /* The WINDLL port uses windll/windll.c instead... */ + +/*******************/ +/* Local Functions */ +/*******************/ + +#ifndef SFX +static void show_version_info OF((__GPRO)); +#endif + + +/*************/ +/* Constants */ +/*************/ + +#include "consts.h" /* all constant global variables are in here */ + /* (non-constant globals were moved to globals.c) */ + +/* constant local variables: */ + +#ifndef SFX + static ZCONST char Far EnvUnZip[] = ENV_UNZIP; + static ZCONST char Far EnvUnZip2[] = ENV_UNZIP2; + static ZCONST char Far EnvZipInfo[] = ENV_ZIPINFO; + static ZCONST char Far EnvZipInfo2[] = ENV_ZIPINFO2; +#ifdef RISCOS + static ZCONST char Far EnvUnZipExts[] = ENV_UNZIPEXTS; +#endif /* RISCOS */ +#endif + +#if (!defined(SFX) || defined(SFX_EXDIR)) + static ZCONST char Far NotExtracting[] = + "caution: not extracting; -d ignored\n"; + static ZCONST char Far MustGiveExdir[] = + "error: must specify directory to which to extract with -d option\n"; + static ZCONST char Far OnlyOneExdir[] = + "error: -d option used more than once (only one exdir allowed)\n"; +#endif + +#if CRYPT + static ZCONST char Far MustGivePasswd[] = + "error: must give decryption password with -P option\n"; +#endif + +#ifndef SFX + static ZCONST char Far Zfirst[] = + "error: -Z must be first option for ZipInfo mode (check UNZIP variable?)\n"; +#endif +static ZCONST char Far InvalidOptionsMsg[] = "error:\ + -fn or any combination of -c, -l, -p, -t, -u and -v options invalid\n"; +static ZCONST char Far IgnoreOOptionMsg[] = + "caution: both -n and -o specified; ignoring -o\n"; + +/* usage() strings */ +#ifndef SFX +#ifdef VMS + static ZCONST char Far Example3[] = "vms.c"; + static ZCONST char Far Example2[] = " unzip\ + \"-V\" foo \"Bar\" => must quote uppercase options and filenames in VMS\n"; +#else /* !VMS */ + static ZCONST char Far Example3[] = "ReadMe"; +#ifdef RISCOS + static ZCONST char Far Example2[] = +" unzip foo -d RAM:$ => extract all files from foo into RAMDisc\n"; +#else /* !RISCOS */ +#if (defined(OS2) || (defined(DOS_FLX_OS2_W32) && defined(MORE))) + static ZCONST char Far Example2[] = + ""; /* no room: too many local3[] items */ +#else /* !OS2 */ +#ifdef MACOS + static ZCONST char Far Example2[] = ""; /* not needed */ +#else /* !MACOS */ + static ZCONST char Far Example2[] = " \ + unzip -p foo | more => send contents of foo.zip via pipe into program more\n"; +#endif /* ?MACOS */ +#endif /* ?OS2 */ +#endif /* ?RISCOS */ +#endif /* ?VMS */ + +/* local1[]: command options */ +#if (defined(DLL) && defined(API_DOC)) + static ZCONST char Far local1[] = + " -A print extended help for API functions"; +#else /* !(DLL && API_DOC) */ + static ZCONST char Far local1[] = ""; +#endif /* ?(DLL && API_DOC) */ + +/* local2[] and local3[]: modifier options */ +#ifdef DOS_FLX_OS2_W32 +#ifdef FLEXOS + static ZCONST char Far local2[] = ""; +#else + static ZCONST char Far local2[] = + " -$ label removables (-$$ => fixed disks)"; +#endif +#ifdef OS2 +#ifdef MORE + static ZCONST char Far local3[] = "\ + -X restore ACLs if supported -s spaces in filenames => '_'\n\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = " \ + -X restore ACLs if supported -s spaces in filenames => '_'\n\n"; +#endif /* ?MORE */ +#else /* !OS2 */ +#ifdef WIN32 +#ifdef MORE + static ZCONST char Far local3[] = "\ + -X restore ACLs (-XX => use privileges) -s spaces in filenames => '_'\n\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = " \ + -X restore ACLs (-XX => use privileges) -s spaces in filenames => '_'\n\n"; +#endif /* ?MORE */ +#else /* !WIN32 */ +#ifdef MORE + static ZCONST char Far local3[] = " -\ +M pipe through \"more\" pager -s spaces in filenames => '_'\n\n"; +#else + static ZCONST char Far local3[] = "\ + -s spaces in filenames => '_'\n"; +#endif +#endif /* ?WIN32 */ +#endif /* ?OS2 || ?WIN32 */ +#else /* !DOS_FLX_OS2_W32 */ +#ifdef VMS + static ZCONST char Far local2[] = "\"-X\" restore owner/protection info"; +#ifdef MORE + static ZCONST char Far local3[] = " \ + \"-M\" pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = "\n"; +#endif +#else /* !VMS */ +#if (defined(__BEOS__) || defined(TANDEM) || defined(UNIX)) + static ZCONST char Far local2[] = " -X restore UID/GID info"; +#ifdef MORE + static ZCONST char Far local3[] = "\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = "\n"; +#endif +#else /* !(__BEOS__ || TANDEM || UNIX) */ +#ifdef AMIGA + static ZCONST char Far local2[] = " -N restore comments as filenotes"; +#ifdef MORE + static ZCONST char Far local3[] = "\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = "\n"; +#endif +#else /* !AMIGA */ +#ifdef MACOS + static ZCONST char Far local2[] = " -E show Mac info during extraction"; + static ZCONST char Far local3[] = " \ + -i ignore filenames in mac extra info -J junk (ignore) Mac extra info\n\n"; +#else /* !MACOS */ +#ifdef MORE + static ZCONST char Far local2[] = " -M pipe through \"more\" pager"; + static ZCONST char Far local3[] = "\n"; +#else + static ZCONST char Far local2[] = ""; /* Atari, Mac, CMS/MVS etc. */ + static ZCONST char Far local3[] = ""; +#endif +#endif /* ?MACOS */ +#endif /* ?AMIGA */ +#endif /* ?(__BEOS__ || TANDEM || UNIX) */ +#endif /* ?VMS */ +#endif /* ?DOS_FLX_OS2_W32 */ +#endif /* !SFX */ + +#ifndef NO_ZIPINFO +#ifdef VMS + static ZCONST char Far ZipInfoExample[] = "* or % (e.g., \"*font-%.zip\")"; +#else + static ZCONST char Far ZipInfoExample[] = "*, ?, [] (e.g., \"[a-j]*.zip\")"; +#endif + +static ZCONST char Far ZipInfoUsageLine1[] = "\ +ZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group.\n\ +\n\ +List name, date/time, attribute, size, compression method, etc., about files\n\ +in list (excluding those in xlist) contained in the specified .zip archive(s).\ +\n\"file[.zip]\" may be a wildcard name containing %s.\n\n\ + usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...]\n\ + or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...]\n"; + +static ZCONST char Far ZipInfoUsageLine2[] = "\nmain\ + listing-format options: -s short Unix \"ls -l\" format (def.)\n\ + -1 filenames ONLY, one per line -m medium Unix \"ls -l\" format\n\ + -2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ + -v verbose, multi-page format\n"; + +static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ + -h print header line -t print totals for listed files or for all\n\ + -z print zipfile comment %c-T%c print file times in sortable decimal format\ +\n %c-C%c be case-insensitive %s\ + -x exclude filenames that follow from listing\n"; +#ifdef MORE +#ifdef VMS + static ZCONST char Far ZipInfoUsageLine4[] = + " \"-M\" page output through built-in \"more\"\n"; +#else + static ZCONST char Far ZipInfoUsageLine4[] = + " -M page output through built-in \"more\"\n"; +#endif +#else /* !MORE */ + static ZCONST char Far ZipInfoUsageLine4[] = ""; +#endif /* ?MORE */ +#endif /* !NO_ZIPINFO */ + +#ifdef BETA +# ifdef VMSCLI + /* BetaVersion[] is also used in vms/cmdline.c: do not make it static */ + ZCONST char Far BetaVersion[] = "%s\ + THIS IS STILL A BETA VERSION OF UNZIP%s -- DO NOT DISTRIBUTE.\n\n"; +# else + static ZCONST char Far BetaVersion[] = "%s\ + THIS IS STILL A BETA VERSION OF UNZIP%s -- DO NOT DISTRIBUTE.\n\n"; +# endif +#endif + +#ifdef SFX +# ifdef VMSCLI + /* UnzipSFXBanner[] is also used in vms/cmdline.c: do not make it static */ + ZCONST char Far UnzipSFXBanner[] = +# else + static ZCONST char Far UnzipSFXBanner[] = +# endif + "UnZipSFX %d.%d%d%s of %s, by Info-ZIP (Zip-Bugs@lists.wku.edu).\n"; +# ifdef SFX_EXDIR + static ZCONST char Far UnzipSFXOpts[] = + "Valid options are -tfupcz and -d ; modifiers are -abjnoqCL%sV%s.\n"; +# else + static ZCONST char Far UnzipSFXOpts[] = + "Valid options are -tfupcz; modifiers are -abjnoqCL%sV%s.\n"; +# endif +#else /* !SFX */ + static ZCONST char Far CompileOptions[] = + "UnZip special compilation options:\n"; + static ZCONST char Far CompileOptFormat[] = "\t%s\n"; + static ZCONST char Far EnvOptions[] = + "\nUnZip and ZipInfo environment options:\n"; + static ZCONST char Far EnvOptFormat[] = "%16s: %s\n"; + static ZCONST char Far None[] = "[none]"; +# ifdef ACORN_FTYPE_NFS + static ZCONST char Far AcornFtypeNFS[] = "ACORN_FTYPE_NFS"; +# endif +# ifdef ASM_CRC + static ZCONST char Far AsmCRC[] = "ASM_CRC"; +# endif +# ifdef ASM_INFLATECODES + static ZCONST char Far AsmInflateCodes[] = "ASM_INFLATECODES"; +# endif +# ifdef CHECK_VERSIONS + static ZCONST char Far Check_Versions[] = "CHECK_VERSIONS"; +# endif +# ifdef COPYRIGHT_CLEAN + static ZCONST char Far Copyright_Clean[] = + "COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)"; +# endif +# ifdef DEBUG + static ZCONST char Far UDebug[] = "DEBUG"; +# endif +# ifdef DEBUG_TIME + static ZCONST char Far DebugTime[] = "DEBUG_TIME"; +# endif +# ifdef DLL + static ZCONST char Far Dll[] = "DLL"; +# endif +# ifdef DOSWILD + static ZCONST char Far DosWild[] = "DOSWILD"; +# endif +# ifdef LZW_CLEAN + static ZCONST char Far LZW_Clean[] = + "LZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)"; +# endif +# ifndef MORE + static ZCONST char Far No_More[] = "NO_MORE"; +# endif +# ifdef NO_ZIPINFO + static ZCONST char Far No_ZipInfo[] = "NO_ZIPINFO"; +# endif +# ifdef NTSD_EAS + static ZCONST char Far NTSDExtAttrib[] = "NTSD_EAS"; +# endif +# ifdef OS2_EAS + static ZCONST char Far OS2ExtAttrib[] = "OS2_EAS"; +# endif +# ifdef QLZIP + static ZCONST char Far SMSExFldOnUnix[] = "QLZIP"; +# endif +# ifdef REENTRANT + static ZCONST char Far Reentrant[] = "REENTRANT"; +# endif +# ifdef REGARGS + static ZCONST char Far RegArgs[] = "REGARGS"; +# endif +# ifdef RETURN_CODES + static ZCONST char Far Return_Codes[] = "RETURN_CODES"; +# endif +# ifdef SET_DIR_ATTRIB + static ZCONST char Far SetDirAttrib[] = "SET_DIR_ATTRIB"; +# endif +# ifdef TIMESTAMP + static ZCONST char Far TimeStamp[] = "TIMESTAMP"; +# endif +# ifdef UNIXBACKUP + static ZCONST char Far UnixBackup[] = "UNIXBACKUP"; +# endif +# ifdef USE_EF_UT_TIME + static ZCONST char Far Use_EF_UT_time[] = "USE_EF_UT_TIME"; +# endif +# ifndef LZW_CLEAN + static ZCONST char Far Use_Unshrink[] = + "USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)"; +# endif +# ifndef COPYRIGHT_CLEAN + static ZCONST char Far Use_Smith_Code[] = + "USE_SMITH_CODE (PKZIP 0.9x unreducing method supported)"; +# endif +# ifdef USE_VFAT + static ZCONST char Far Use_VFAT_support[] = "USE_VFAT"; +# endif +# ifdef USE_ZLIB + static ZCONST char Far UseZlib[] = + "USE_ZLIB (compiled with version %s; using version %s)"; +# endif +# ifdef VMS_TEXT_CONV + static ZCONST char Far VmsTextConv[] = "VMS_TEXT_CONV"; +# endif +# ifdef VMSCLI + static ZCONST char Far VmsCLI[] = "VMSCLI"; +# endif +# ifdef VMSWILD + static ZCONST char Far VmsWild[] = "VMSWILD"; +# endif +# if CRYPT +# ifdef PASSWD_FROM_STDIN + static ZCONST char Far PasswdStdin[] = "PASSWD_FROM_STDIN"; +# endif + static ZCONST char Far Decryption[] = + "\t[decryption, version %d.%d%s of %s]\n"; + static ZCONST char Far CryptDate[] = CR_VERSION_DATE; +# endif +# ifndef __RSXNT__ +# ifdef __EMX__ + static ZCONST char Far EnvEMX[] = "EMX"; + static ZCONST char Far EnvEMXOPT[] = "EMXOPT"; +# endif +# if (defined(__GO32__) && (!defined(__DJGPP__) || (__DJGPP__ < 2))) + static ZCONST char Far EnvGO32[] = "GO32"; + static ZCONST char Far EnvGO32TMP[] = "GO32TMP"; +# endif +# endif /* !__RSXNT__ */ + +#ifdef VMS +/* UnzipUsageLine1[] is also used in vms/cmdline.c: do not make it static */ + ZCONST char Far UnzipUsageLine1[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unzip -v.\n\n"; +#ifdef COPYRIGHT_CLEAN + static ZCONST char Far UnzipUsageLine1v[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send\n\ +bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#else + static ZCONST char Far UnzipUsageLine1v[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ +Send bug reports to authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#endif /* ?COPYRIGHT_CLEAN */ +#else /* !VMS */ +#ifdef COPYRIGHT_CLEAN + static ZCONST char Far UnzipUsageLine1[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send\n\ +bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#else + static ZCONST char Far UnzipUsageLine1[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ +Send bug reports to authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#endif /* ?COPYRIGHT_CLEAN */ +#define UnzipUsageLine1v UnzipUsageLine1 +#endif /* ?VMS */ + +static ZCONST char Far UnzipUsageLine2v[] = "\ +Latest sources and executables are at ftp://ftp.cdrom.com/pub/infozip/ , as of\ +\nabove date; see http://www.cdrom.com/pub/infozip/UnZip.html for other sites.\ +\n\n"; + +#ifdef MACOS +static ZCONST char Far UnzipUsageLine2[] = "\ +Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-d exdir]\n \ + Default action is to extract files in list, to exdir;\n\ + file[.zip] may be a wildcard. %s\n"; +#else /* !MACOS */ +#ifdef VM_CMS +static ZCONST char Far UnzipUsageLine2[] = "\ +Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d fm]\n \ + Default action is to extract files in list, except those in xlist, to disk fm;\n\ + file[.zip] may be a wildcard. %s\n"; +#else /* !VM_CMS */ +static ZCONST char Far UnzipUsageLine2[] = "\ +Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]\n \ + Default action is to extract files in list, except those in xlist, to exdir;\n\ + file[.zip] may be a wildcard. %s\n"; +#endif /* ?VM_CMS */ +#endif /* ?MACOS */ + +#ifdef NO_ZIPINFO +# define ZIPINFO_MODE_OPTION "" + static ZCONST char Far ZipInfoMode[] = + "(ZipInfo mode is disabled in this version.)"; +#else +# define ZIPINFO_MODE_OPTION "[-Z] " +# ifdef VMS + static ZCONST char Far ZipInfoMode[] = + "\"-Z\" => ZipInfo mode (`unzip \"-Z\"' for usage)."; +# else + static ZCONST char Far ZipInfoMode[] = + "-Z => ZipInfo mode (\"unzip -Z\" for usage)."; +# endif +#endif /* ?NO_ZIPINFO */ + +#ifdef VMS + static ZCONST char Far VMSusageLine2b[] = "\ +=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe\ +\n"; +#endif + +#ifdef MACOS +static ZCONST char Far UnzipUsageLine3[] = "\n\ + -d extract files into exdir -l list files (short format)\n\ + -f freshen existing files, create none -t test compressed archive data\n\ + -u update files, create if necessary -z display archive comment\n\ +%s\n"; +#else /* !MACOS */ +#ifdef VM_CMS +static ZCONST char Far UnzipUsageLine3[] = "\n\ + -p extract files to pipe, no messages -l list files (short format)\n\ + -f freshen existing files, create none -t test compressed archive data\n\ + -u update files, create if necessary -z display archive comment\n\ + -x exclude files that follow (in xlist) -d extract files onto disk fm\n\ +%s\n"; +#else /* !VM_CMS */ +static ZCONST char Far UnzipUsageLine3[] = "\n\ + -p extract files to pipe, no messages -l list files (short format)\n\ + -f freshen existing files, create none -t test compressed archive data\n\ + -u update files, create if necessary -z display archive comment\n\ + -x exclude files that follow (in xlist) -d extract files into exdir\n\ +%s\n"; +#endif /* ?VM_CMS */ +#endif /* ?MACOS */ + +static ZCONST char Far UnzipUsageLine4[] = "\ +modifiers: -q quiet mode (-qq => quieter)\n\ + -n never overwrite existing files -a auto-convert any text files\n\ + -o overwrite files WITHOUT prompting -aa treat ALL files as text\n \ + -j junk paths (do not make directories) -v be verbose/print version info\n\ + %c-C%c match filenames case-insensitively %c-L%c make (some) names \ +lowercase\n %-42s %c-V%c retain VMS version numbers\n%s"; + +static ZCONST char Far UnzipUsageLine5[] = "\ +Examples (see unzip.doc for more info):\n\ + unzip data1 -x joe => extract all files except joe from zipfile data1.zip\n\ +%s\ + unzip -fo foo %-6s => quietly replace existing %s if archive file newer\n"; +#endif /* ?SFX */ + + + + + +/*****************************/ +/* main() / UzpMain() stub */ +/*****************************/ + +int include_unpack(char *aname) /* return PK-type error code (except under VMS) */ +{ + int r, argc = 3; + char *argv[4]; + + argv[0] = "install.exe"; + argv[1] = "-v"; + argv[2] = aname; + argv[3] = NULL; + + CONSTRUCTGLOBALS(); + r = unzip(__G__ argc, argv); + DESTROYGLOBALS() + RETURN(r); +} + +void resetglobals(void) { } + +int pipeit(char *format, ...) +{ + return 0; +} + +int confirm(char *format, ...) +{ + return 1; +} + + + +/*******************************/ +/* Primary UnZip entry point */ +/*******************************/ + +int unzip(__G__ argc, argv) + __GDEF + int argc; + char *argv[]; +{ +#ifndef NO_ZIPINFO + char *p; +#endif +#ifdef DOS_FLX_H68_OS2_W32 + int i; +#endif + int retcode, error=FALSE; + +#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) + extern void DebugMalloc(void); + + atexit(DebugMalloc); +#endif + +#ifdef MALLOC_WORK + G.area.Slide =(uch *)calloc(8193, sizeof(shrint)+sizeof(uch)+sizeof(uch)); + G.area.shrink.Parent = (shrint *)G.area.Slide; + G.area.shrink.value = G.area.Slide + (sizeof(shrint)*(HSIZE+1)); + G.area.shrink.Stack = G.area.Slide + + (sizeof(shrint) + sizeof(uch))*(HSIZE+1); +#endif + +/*--------------------------------------------------------------------------- + Macintosh initialization code. + ---------------------------------------------------------------------------*/ + +#ifdef MACOS + { + int a; + + for (a = 0; a < 4; ++a) + G.rghCursor[a] = GetCursor(a+128); + G.giCursor = 0; + } +#endif + +/*--------------------------------------------------------------------------- + Human68K initialization code. + ---------------------------------------------------------------------------*/ + +#ifdef __human68k__ + InitTwentyOne(); +#endif + +/*--------------------------------------------------------------------------- + Acorn RISC OS initialization code. + ---------------------------------------------------------------------------*/ + +#ifdef RISCOS + set_prefix(); +#endif + +/*--------------------------------------------------------------------------- + Set signal handler for restoring echo, warn of zipfile corruption, etc. + ---------------------------------------------------------------------------*/ + +#ifdef SIGINT + signal(SIGINT, handler); +#endif +#ifdef SIGTERM /* some systems really have no SIGTERM */ + signal(SIGTERM, handler); +#endif +#ifdef SIGBUS + signal(SIGBUS, handler); +#endif +#ifdef SIGSEGV + signal(SIGSEGV, handler); +#endif + +#if (defined(WIN32) && defined(__RSXNT__)) + for (i = 0 ; i < argc; i++) { + _ISO_INTERN(argv[i]); + } +#endif + +/*--------------------------------------------------------------------------- + First figure out if we're running in UnZip mode or ZipInfo mode, and put + the appropriate environment-variable options into the queue. Then rip + through any command-line options lurking about... + ---------------------------------------------------------------------------*/ + +#ifdef SFX + G.argv0 = argv[0]; +#if (defined(OS2) || defined(WIN32)) + G.zipfn = GetLoadPath(__G);/* non-MSC NT puts path into G.filename[] */ +#else + G.zipfn = G.argv0; +#endif + +#ifdef VMSCLI + { + ulg status = vms_unzip_cmdline(&argc, &argv); + if (!(status & 1)) + return status; + } +#endif /* VMSCLI */ + + uO.zipinfo_mode = FALSE; + error = uz_opts(__G__ &argc, &argv); /* UnZipSFX call only */ + +#else /* !SFX */ + +#ifdef RISCOS + /* get the extensions to swap from environment */ + getRISCOSexts(ENV_UNZIPEXTS); +#endif + +#ifdef MSDOS + /* extract MKS extended argument list from environment (before envargs!) */ + mksargs(&argc, &argv); +#endif + +#ifdef VMSCLI + { + ulg status = vms_unzip_cmdline(&argc, &argv); + if (!(status & 1)) + return status; + } +#endif /* VMSCLI */ + + G.noargs = (argc == 1); /* no options, no zipfile, no anything */ + +#ifndef NO_ZIPINFO + for (p = argv[0] + strlen(argv[0]); p >= argv[0]; --p) { + if (*p == DIR_END +#ifdef DIR_END2 + || *p == DIR_END2 +#endif + ) + break; + } + ++p; + + if (STRNICMP(p, LoadFarStringSmall(Zipnfo), 7) == 0 || + STRNICMP(p, "ii", 2) == 0 || + (argc > 1 && strncmp(argv[1], "-Z", 2) == 0)) + { + uO.zipinfo_mode = TRUE; + envargs(__G__ &argc, &argv, LoadFarStringSmall(EnvZipInfo), + LoadFarStringSmall2(EnvZipInfo2)); + error = zi_opts(__G__ &argc, &argv); + } else +#endif /* NO_ZIPINFO */ + { + uO.zipinfo_mode = FALSE; + envargs(__G__ &argc, &argv, LoadFarStringSmall(EnvUnZip), + LoadFarStringSmall2(EnvUnZip2)); + error = uz_opts(__G__ &argc, &argv); + } + +#endif /* ?SFX */ + + if ((argc < 0) || error) + return error; + +/*--------------------------------------------------------------------------- + Now get the zipfile name from the command line and then process any re- + maining options and file specifications. + ---------------------------------------------------------------------------*/ + +#ifdef DOS_FLX_H68_OS2_W32 + /* convert MSDOS-style directory separators to Unix-style ones for + * user's convenience (include zipfile name itself) + */ +#ifdef SFX + for (G.pfnames = argv, i = argc; i > 0; --i) { +#else + /* argc does not include the zipfile specification */ + for (G.pfnames = argv, i = argc+1; i > 0; --i) { +#endif + char *q; + + for (q = *G.pfnames; *q; ++q) + if (*q == '\\') + *q = '/'; + ++G.pfnames; + } +#endif /* DOS_FLX_H68_OS2_W32 */ + +#ifndef SFX + G.wildzipfn = *argv++; +#endif + +#if (defined(SFX) && !defined(SFX_EXDIR)) /* only check for -x */ + + G.filespecs = argc; + G.xfilespecs = 0; + + if (argc > 0) { + char **pp = argv-1; + + G.pfnames = argv; + while (*++pp) + if (strcmp(*pp, "-x") == 0) { + if (pp > argv) { + *pp = 0; /* terminate G.pfnames */ + G.filespecs = pp - G.pfnames; + } else { + G.pfnames = (char **)fnames; /* defaults */ + G.filespecs = 0; + } + G.pxnames = pp + 1; /* excluded-names ptr: _after_ -x */ + G.xfilespecs = argc - G.filespecs - 1; + break; /* skip rest of args */ + } + G.process_all_files = FALSE; + } else + G.process_all_files = TRUE; /* for speed */ + +#else /* !SFX || SFX_EXDIR */ /* check for -x or -d */ + + G.filespecs = argc; + G.xfilespecs = 0; + + if (argc > 0) { + int in_files=FALSE, in_xfiles=FALSE; + char **pp = argv-1; + + G.process_all_files = FALSE; + G.pfnames = argv; + while (*++pp) { + Trace((stderr, "pp - argv = %d\n", pp-argv)); +#ifdef CMS_MVS + if (!uO.exdir && STRNICMP(*pp, "-d", 2) == 0) { +#else + if (!uO.exdir && strncmp(*pp, "-d", 2) == 0) { +#endif + int firstarg = (pp == argv); + + uO.exdir = (*pp) + 2; + if (in_files) { /* ... zipfile ... -d exdir ... */ + *pp = (char *)NULL; /* terminate G.pfnames */ + G.filespecs = pp - G.pfnames; + in_files = FALSE; + } else if (in_xfiles) { + *pp = (char *)NULL; /* terminate G.pxnames */ + G.xfilespecs = pp - G.pxnames; + /* "... -x xlist -d exdir": nothing left */ + } + /* first check for "-dexdir", then for "-d exdir" */ + if (*uO.exdir == '\0') { + if (*++pp) + uO.exdir = *pp; + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); /* don't extract here by accident */ + } + } + if (firstarg) { /* ... zipfile -d exdir ... */ + if (pp[1]) { + G.pfnames = pp + 1; /* argv+2 */ + G.filespecs = argc - (G.pfnames-argv); /* for now... */ + } else { + G.process_all_files = TRUE; + G.pfnames = (char **)fnames; /* GRR: necessary? */ + G.filespecs = 0; /* GRR: necessary? */ + break; + } + } + } else if (!in_xfiles) { + if (strcmp(*pp, "-x") == 0) { + in_xfiles = TRUE; + if (pp == G.pfnames) { + G.pfnames = (char **)fnames; /* defaults */ + G.filespecs = 0; + } else if (in_files) { + *pp = 0; /* terminate G.pfnames */ + G.filespecs = pp - G.pfnames; /* adjust count */ + in_files = FALSE; + } + G.pxnames = pp + 1; /* excluded-names ptr starts after -x */ + G.xfilespecs = argc - (G.pxnames-argv); /* anything left */ + } else + in_files = TRUE; + } + } + } else + G.process_all_files = TRUE; /* for speed */ + + if (uO.exdir != (char *)NULL && !G.extract_flag) /* -d ignored */ + Info(slide, 0x401, ((char *)slide, LoadFarString(NotExtracting))); +#endif /* ?(SFX && !SFX_EXDIR) */ + +/*--------------------------------------------------------------------------- + Okey dokey, we have everything we need to get started. Let's roll. + ---------------------------------------------------------------------------*/ + + retcode = process_zipfiles(__G); + return(retcode); + +} /* end main()/unzip() */ + + + + + +/**********************/ +/* Function uz_opts() */ +/**********************/ + +int uz_opts(__G__ pargc, pargv) + __GDEF + int *pargc; + char ***pargv; +{ + char **argv, *s; + int argc, c, error=FALSE, negative=0; + + + argc = *pargc; + argv = *pargv; + + while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { + s = *argv + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ +#ifdef CMS_MVS + switch (tolower(c)) +#else + switch (c) +#endif + { + case ('-'): + ++negative; + break; + case ('a'): + if (negative) { + uO.aflag = MAX(uO.aflag-negative,0); + negative = 0; + } else + ++uO.aflag; + break; +#if (defined(DLL) && defined(API_DOC)) + case ('A'): /* extended help for API */ + APIhelp(__G__ argc, argv); + *pargc = -1; /* signal to exit successfully */ + return 0; +#endif + case ('b'): + if (negative) { +#ifdef VMS + uO.bflag = MAX(uO.bflag-negative,0); +#endif + negative = 0; /* do nothing: "-b" is default */ + } else { +#ifdef VMS + if (uO.aflag == 0) + ++uO.bflag; +#endif + uO.aflag = 0; + } + break; +#ifdef UNIXBACKUP + case ('B'): /* -B: back up existing files */ + if (negative) + uO.B_flag = FALSE, negative = 0; + else + uO.B_flag = TRUE; + break; +#endif + case ('c'): + if (negative) { + uO.cflag = FALSE, negative = 0; +#ifdef NATIVE + uO.aflag = 0; +#endif + } else { + uO.cflag = TRUE; +#ifdef NATIVE + uO.aflag = 2; /* so you can read it on the screen */ +#endif +#ifdef DLL + if (G.redirect_text) + G.redirect_data = 2; +#endif + } + break; +#ifndef CMS_MVS + case ('C'): /* -C: match filenames case-insensitively */ + if (negative) + uO.C_flag = FALSE, negative = 0; + else + uO.C_flag = TRUE; + break; +#endif /* !CMS_MVS */ +#if (!defined(SFX) || defined(SFX_EXDIR)) + case ('d'): + if (negative) { /* negative not allowed with -d exdir */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); /* don't extract here by accident */ + } + if (uO.exdir != (char *)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(OnlyOneExdir))); + return(PK_PARAM); /* GRR: stupid restriction? */ + } else { + /* first check for "-dexdir", then for "-d exdir" */ + uO.exdir = s; + if (*uO.exdir == '\0') { + if (argc > 1) { + --argc; + uO.exdir = *++argv; + if (*uO.exdir == '-') { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); + } + /* else uO.exdir points at extraction dir */ + } else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); + } + } + /* uO.exdir now points at extraction dir (-dexdir or + * -d exdir); point s at end of exdir to avoid mis- + * interpretation of exdir characters as more options + */ + if (*s != 0) + while (*++s != 0) + ; + } + break; +#endif /* !SFX || SFX_EXDIR */ + case ('e'): /* just ignore -e, -x options (extract) */ + break; +#ifdef MACOS + case ('E'): /* -E [MacOS] display Mac e.f. when restoring */ + if( negative ) { + uO.E_flag = FALSE, negative = 0; + } else { + uO.E_flag = TRUE; + } + break; +#endif /* MACOS */ + case ('f'): /* "freshen" (extract only newer files) */ + if (negative) + uO.fflag = uO.uflag = FALSE, negative = 0; + else + uO.fflag = uO.uflag = TRUE; + break; +#if (defined(RISCOS) || defined(ACORN_FTYPE_NFS)) + case ('F'): /* Acorn filetype & NFS extension handling */ + if (negative) + uO.acorn_nfs_ext = FALSE, negative = 0; + else + uO.acorn_nfs_ext = TRUE; + break; +#endif /* RISCOS || ACORN_FTYPE_NFS */ + case ('h'): /* just print help message and quit */ + *pargc = -1; + return USAGE(PK_OK); +#ifdef MACOS + case ('i'): /* -i [MacOS] ignore filenames stored in Mac ef */ + if( negative ) { + uO.i_flag = FALSE, negative = 0; + } else { + uO.i_flag = TRUE; + } + break; +#endif /* MACOS */ + case ('j'): /* junk pathnames/directory structure */ + if (negative) + uO.jflag = FALSE, negative = 0; + else + uO.jflag = TRUE; + break; +#if (defined(__BEOS__) || defined(MACOS)) + case ('J'): /* Junk BeOS or MacOS file attributes */ + if( negative ) { + uO.J_flag = FALSE, negative = 0; + } else { + uO.J_flag = TRUE; + } + break; +#endif /* __BEOS__ || MACOS */ +#ifndef SFX + case ('l'): + if (negative) { + uO.vflag = MAX(uO.vflag-negative,0); + negative = 0; + } else + ++uO.vflag; + break; +#endif /* !SFX */ +#ifndef CMS_MVS + case ('L'): /* convert (some) filenames to lowercase */ + if (negative) + uO.L_flag = FALSE, negative = 0; + else + uO.L_flag = TRUE; + break; +#endif /* !CMS_MVS */ +#ifdef MORE +#ifdef CMS_MVS + case ('m'): +#endif + case ('M'): /* send all screen output through "more" fn. */ +/* GRR: eventually check for numerical argument => height */ + if (negative) + G.M_flag = FALSE, negative = 0; + else + G.M_flag = TRUE; + break; +#endif /* MORE */ + case ('n'): /* don't overwrite any files */ + if (negative) + uO.overwrite_none = FALSE, negative = 0; + else + uO.overwrite_none = TRUE; + break; +#ifdef AMIGA + case ('N'): /* restore comments as filenotes */ + if (negative) + uO.N_flag = FALSE, negative = 0; + else + uO.N_flag = TRUE; + break; +#endif /* AMIGA */ + case ('o'): /* OK to overwrite files without prompting */ + if (negative) { + uO.overwrite_all = MAX(uO.overwrite_all-negative,0); + negative = 0; + } else + ++uO.overwrite_all; + break; + case ('p'): /* pipes: extract to stdout, no messages */ + if (negative) { + uO.cflag = FALSE; + uO.qflag = MAX(uO.qflag-999,0); + negative = 0; + } else { + uO.cflag = TRUE; + uO.qflag += 999; + } + break; +#if CRYPT + /* GRR: yes, this is highly insecure, but dozens of people + * have pestered us for this, so here we go... */ + case ('P'): + if (negative) { /* negative not allowed with -P passwd */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGivePasswd))); + return(PK_PARAM); /* don't extract here by accident */ + } + if (uO.pwdarg != (char *)NULL) { +/* + GRR: eventually support multiple passwords? + Info(slide, 0x401, ((char *)slide, + LoadFarString(OnlyOnePasswd))); + return(PK_PARAM); + */ + } else { + /* first check for "-Ppasswd", then for "-P passwd" */ + uO.pwdarg = s; + if (*uO.pwdarg == '\0') { + if (argc > 1) { + --argc; + uO.pwdarg = *++argv; + if (*uO.pwdarg == '-') { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGivePasswd))); + return(PK_PARAM); + } + /* else pwdarg points at decryption password */ + } else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGivePasswd))); + return(PK_PARAM); + } + } + /* pwdarg now points at decryption password (-Ppasswd or + * -P passwd); point s at end of passwd to avoid mis- + * interpretation of passwd characters as more options + */ + if (*s != 0) + while (*++s != 0) + ; + } + break; +#endif /* CRYPT */ + case ('q'): /* quiet: fewer comments/messages */ + if (negative) { + uO.qflag = MAX(uO.qflag-negative,0); + negative = 0; + } else + ++uO.qflag; + break; +#ifdef QDOS + case ('Q'): /* QDOS flags */ + qlflag ^= strtol(s, &s, 10); + break; /* we XOR this as we can config qlflags */ +#endif +#ifdef DOS_FLX_OS2_W32 + case ('s'): /* spaces in filenames: allow by default */ + if (negative) + uO.sflag = FALSE, negative = 0; + else + uO.sflag = TRUE; + break; +#endif /* DOS_FLX_OS2_W32 */ + case ('t'): + if (negative) + uO.tflag = FALSE, negative = 0; + else + uO.tflag = TRUE; + break; +#ifdef TIMESTAMP + case ('T'): + if (negative) + uO.T_flag = FALSE, negative = 0; + else + uO.T_flag = TRUE; + break; +#endif + case ('u'): /* update (extract only new and newer files) */ + if (negative) + uO.uflag = FALSE, negative = 0; + else + uO.uflag = TRUE; + break; +#ifndef CMS_MVS + case ('U'): /* obsolete; to be removed in version 6.0 */ + if (negative) + uO.L_flag = TRUE, negative = 0; + else + uO.L_flag = FALSE; + break; +#endif /* !CMS_MVS */ +#ifndef SFX + case ('v'): /* verbose */ + if (negative) { + uO.vflag = MAX(uO.vflag-negative,0); + negative = 0; + } else if (uO.vflag) + ++uO.vflag; + else + uO.vflag = 2; + break; +#endif /* !SFX */ +#ifndef CMS_MVS + case ('V'): /* Version (retain VMS/DEC-20 file versions) */ + if (negative) + uO.V_flag = FALSE, negative = 0; + else + uO.V_flag = TRUE; + break; +#endif /* !CMS_MVS */ + case ('x'): /* extract: default */ +#ifdef SFX + /* when 'x' is the only option in this argument, and the + * next arg is not an option, assume this initiates an + * exclusion list (-x xlist): terminate option-scanning + * and leave uz_opts with argv still pointing to "-x"; + * the xlist is processed later + */ + if (s - argv[0] == 2 && *s == '\0' && + argc > 1 && argv[1][0] != '-') { + /* break out of nested loops without "++argv;--argc" */ + goto opts_done; + } +#endif /* SFX */ + break; +#if (defined(RESTORE_UIDGID) || defined(OS2_W32)) + case ('X'): /* restore owner/protection info (need privs?) */ + if (negative) { + uO.X_flag = MAX(uO.X_flag-negative,0); + negative = 0; + } else + ++uO.X_flag; + break; +#endif /* RESTORE_UIDGID || OS2_W32 */ + case ('z'): /* display only the archive comment */ + if (negative) { + uO.zflag = MAX(uO.zflag-negative,0); + negative = 0; + } else + ++uO.zflag; + break; +#ifndef SFX + case ('Z'): /* should have been first option (ZipInfo) */ + Info(slide, 0x401, ((char *)slide, LoadFarString(Zfirst))); + error = TRUE; + break; +#endif /* !SFX */ +#ifdef DOS_OS2_W32 + case ('$'): + if (negative) { + uO.volflag = MAX(uO.volflag-negative,0); + negative = 0; + } else + ++uO.volflag; + break; +#endif /* DOS_OS2_W32 */ + default: + error = TRUE; + break; + + } /* end switch */ + } /* end while (not end of argument string) */ + } /* end while (not done with switches) */ + +/*--------------------------------------------------------------------------- + Check for nonsensical combinations of options. + ---------------------------------------------------------------------------*/ + +#ifdef SFX +opts_done: /* yes, very ugly...but only used by UnZipSFX with -x xlist */ +#endif + + if ((uO.cflag && uO.tflag) || (uO.cflag && uO.uflag) || + (uO.tflag && uO.uflag) || (uO.fflag && uO.overwrite_none)) + { + Info(slide, 0x401, ((char *)slide, LoadFarString(InvalidOptionsMsg))); + error = TRUE; + } + if (uO.aflag > 2) + uO.aflag = 2; +#ifdef VMS + if (uO.bflag > 2) + uO.bflag = 2; +#endif + if (uO.overwrite_all && uO.overwrite_none) { + Info(slide, 0x401, ((char *)slide, LoadFarString(IgnoreOOptionMsg))); + uO.overwrite_all = FALSE; + } +#ifdef MORE + if (G.M_flag && !isatty(1)) /* stdout redirected: "more" func. useless */ + G.M_flag = 0; +#endif + +#ifdef SFX + if (error) +#else + if ((argc-- == 0) || error) +#endif + { + *pargc = argc; + *pargv = argv; +#ifndef SFX + if (uO.vflag >= 2 && argc == -1) { /* "unzip -v" */ + show_version_info(__G); + return PK_OK; + } + if (!G.noargs && !error) + error = PK_PARAM; /* had options (not -h or -v) but no zipfile */ +#endif /* !SFX */ + return USAGE(error); + } + +#ifdef SFX + /* print our banner unless we're being fairly quiet */ + if (uO.qflag < 2) + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(UnzipSFXBanner), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); +#ifdef BETA + /* always print the beta warning: no unauthorized distribution!! */ + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(BetaVersion), "\n", + "SFX")); +#endif +#endif /* SFX */ + + if (uO.cflag || uO.tflag || uO.vflag || uO.zflag +#ifdef TIMESTAMP + || uO.T_flag +#endif + ) + G.extract_flag = FALSE; + else + G.extract_flag = TRUE; + + *pargc = argc; + *pargv = argv; + return PK_OK; + +} /* end function uz_opts() */ + + + + +/********************/ +/* Function usage() */ +/********************/ + +#ifdef SFX +# ifdef VMS +# define LOCAL "X. Quote uppercase options" +# endif +# ifdef UNIX +# define LOCAL "X" +# endif +# ifdef DOS_OS2_W32 +# define LOCAL "s$" +# endif +# ifdef FLEXOS +# define LOCAL "s" +# endif +# ifdef AMIGA +# define LOCAL "N" +# endif + /* Default for all other systems: */ +# ifndef LOCAL +# define LOCAL "" +# endif + +# ifdef MORE +# define SFXOPT1 "M" +# else +# define SFXOPT1 "" +# endif + +int usage(__G__ error) /* return PK-type error code */ + __GDEF + int error; +{ + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(UnzipSFXBanner), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(UnzipSFXOpts), + SFXOPT1, LOCAL)); +#ifdef BETA + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(BetaVersion), "\n", + "SFX")); +#endif + + if (error) + return PK_PARAM; + else + return PK_COOL; /* just wanted usage screen: no error */ + +} /* end function usage() */ + + + + + +#else /* !SFX */ +# ifdef VMS +# define QUOT '\"' +# define QUOTS "\"" +# else +# define QUOT ' ' +# define QUOTS "" +# endif + +int usage(__G__ error) /* return PK-type error code */ + __GDEF + int error; +{ + int flag = (error? 1 : 0); + + +/*--------------------------------------------------------------------------- + Print either ZipInfo usage or UnZip usage, depending on incantation. + (Strings must be no longer than 512 bytes for Turbo C, apparently.) + ---------------------------------------------------------------------------*/ + + if (uO.zipinfo_mode) { + +#ifndef NO_ZIPINFO + + Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine1), + ZI_MAJORVER, ZI_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate), + LoadFarStringSmall2(ZipInfoExample), QUOTS,QUOTS)); + Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine2))); + Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine3), + QUOT,QUOT, QUOT,QUOT, LoadFarStringSmall(ZipInfoUsageLine4))); +#ifdef VMS + Info(slide, flag, ((char *)slide, "\nRemember that non-lowercase\ + filespecs must be quoted in VMS (e.g., \"Makefile\").\n")); +#endif + +#endif /* !NO_ZIPINFO */ + + } else { /* UnZip mode */ + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine1), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); +#ifdef BETA + Info(slide, flag, ((char *)slide, LoadFarString(BetaVersion), "", "")); +#endif + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine2), + ZIPINFO_MODE_OPTION, LoadFarStringSmall(ZipInfoMode))); +#ifdef VMS + if (!error) /* maybe no command-line tail found; show extra help */ + Info(slide, flag, ((char *)slide, LoadFarString(VMSusageLine2b))); +#endif + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine3), + LoadFarStringSmall(local1))); + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine4), + QUOT,QUOT, QUOT,QUOT, LoadFarStringSmall(local2), QUOT,QUOT, + LoadFarStringSmall2(local3))); + + /* This is extra work for SMALL_MEM, but it will work since + * LoadFarStringSmall2 uses the same buffer. Remember, this + * is a hack. */ + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine5), + LoadFarStringSmall(Example2), LoadFarStringSmall2(Example3), + LoadFarStringSmall2(Example3))); + + } /* end if (uO.zipinfo_mode) */ + + if (error) + return PK_PARAM; + else + return PK_COOL; /* just wanted usage screen: no error */ + +} /* end function usage() */ + +#endif /* ?SFX */ + + + + +#ifndef SFX + +/********************************/ +/* Function show_version_info() */ +/********************************/ + +static void show_version_info(__G) + __GDEF +{ + if (uO.qflag > 3) /* "unzip -vqqqq" */ + Info(slide, 0, ((char *)slide, "%d\n", + (UZ_MAJORVER*100 + UZ_MINORVER*10 + PATCHLEVEL))); + else { + char *envptr, *getenv(); + int numopts = 0; + + Info(slide, 0, ((char *)slide, LoadFarString(UnzipUsageLine1v), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); + Info(slide, 0, ((char *)slide, + LoadFarString(UnzipUsageLine2v))); + version(__G); + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptions))); +#ifdef ACORN_FTYPE_NFS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(AcornFtypeNFS))); + ++numopts; +#endif +#ifdef ASM_CRC + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(AsmCRC))); + ++numopts; +#endif +#ifdef ASM_INFLATECODES + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(AsmInflateCodes))); + ++numopts; +#endif +#ifdef CHECK_VERSIONS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Check_Versions))); + ++numopts; +#endif +#ifdef COPYRIGHT_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Copyright_Clean))); + ++numopts; +#endif +#ifdef DEBUG + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(UDebug))); + ++numopts; +#endif +#ifdef DEBUG_TIME + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(DebugTime))); + ++numopts; +#endif +#ifdef DLL + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Dll))); + ++numopts; +#endif +#ifdef DOSWILD + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(DosWild))); + ++numopts; +#endif +#ifdef LZW_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(LZW_Clean))); + ++numopts; +#endif +#ifndef MORE + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(No_More))); + ++numopts; +#endif +#ifdef NO_ZIPINFO + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(No_ZipInfo))); + ++numopts; +#endif +#ifdef NTSD_EAS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(NTSDExtAttrib))); + ++numopts; +#endif +#ifdef OS2_EAS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(OS2ExtAttrib))); + ++numopts; +#endif +#ifdef QLZIP + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(SMSExFldOnUnix))); + ++numopts; +#endif +#ifdef REENTRANT + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Reentrant))); + ++numopts; +#endif +#ifdef REGARGS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(RegArgs))); + ++numopts; +#endif +#ifdef RETURN_CODES + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Return_Codes))); + ++numopts; +#endif +#ifdef SET_DIR_ATTRIB + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(SetDirAttrib))); + ++numopts; +#endif +#ifdef TIMESTAMP + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(TimeStamp))); + ++numopts; +#endif +#ifdef UNIXBACKUP + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(UnixBackup))); + ++numopts; +#endif +#ifdef USE_EF_UT_TIME + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_EF_UT_time))); + ++numopts; +#endif +#ifndef COPYRIGHT_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_Smith_Code))); + ++numopts; +#endif +#ifndef LZW_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_Unshrink))); + ++numopts; +#endif +#ifdef USE_VFAT + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_VFAT_support))); + ++numopts; +#endif +#ifdef USE_ZLIB + sprintf((char *)(slide+256), LoadFarStringSmall(UseZlib), + ZLIB_VERSION, zlib_version); + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + (char *)(slide+256))); + ++numopts; +#endif +#ifdef VMS_TEXT_CONV + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(VmsTextConv))); + ++numopts; +#endif +#ifdef VMSCLI + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(VmsCLI))); + ++numopts; +#endif +#ifdef VMSWILD + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(VmsWild))); + ++numopts; +#endif +#if CRYPT +# ifdef PASSWD_FROM_STDIN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(PasswdStdin))); +# endif + Info(slide, 0, ((char *)slide, LoadFarString(Decryption), + CR_MAJORVER, CR_MINORVER, CR_BETA_VER, + LoadFarStringSmall(CryptDate))); + ++numopts; +#endif /* CRYPT */ + if (numopts == 0) + Info(slide, 0, ((char *)slide, + LoadFarString(CompileOptFormat), + LoadFarStringSmall(None))); + + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptions))); + envptr = getenv(LoadFarStringSmall(EnvUnZip)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvUnZip), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvUnZip2)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvUnZip2), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvZipInfo)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvZipInfo), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvZipInfo2)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvZipInfo2), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#ifndef __RSXNT__ +#ifdef __EMX__ + envptr = getenv(LoadFarStringSmall(EnvEMX)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvEMX), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvEMXOPT)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvEMXOPT), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#endif /* __EMX__ */ +#if (defined(__GO32__) && (!defined(__DJGPP__) || (__DJGPP__ < 2))) + envptr = getenv(LoadFarStringSmall(EnvGO32)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvGO32), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvGO32TMP)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvGO32TMP), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#endif /* __GO32__ && !(__DJGPP__ >= 2) */ +#endif /* !__RSXNT__ */ +#ifdef RISCOS + envptr = getenv(LoadFarStringSmall(EnvUnZipExts)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvUnZipExts), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#endif /* RISCOS */ + } +} /* end function show_version() */ + +#endif /* !SFX */ +#endif /* !WINDLL */ diff --git a/utils/Install/packzip/unzip.def b/utils/Install/packzip/unzip.def new file mode 100644 index 0000000000..e57dd829c7 --- /dev/null +++ b/utils/Install/packzip/unzip.def @@ -0,0 +1,4 @@ +NAME WINDOWCOMPAT NEWFILES +DESCRIPTION 'The world-famous Info-ZIP unarchiving utilities' +; SEGMENTS +; _MSGSEG32 CLASS 'CODE' diff --git a/utils/Install/packzip/unzipstb.c b/utils/Install/packzip/unzipstb.c new file mode 100644 index 0000000000..6ca238a89f --- /dev/null +++ b/utils/Install/packzip/unzipstb.c @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------- + + unzipstb.c + + Simple stub function for UnZip DLL (or shared library, whatever); does + exactly the same thing as normal UnZip, except for additional printf()s + of various version numbers, solely as a demonstration of what can/should + be checked when using the DLL. (If major version numbers ever differ, + assume program is incompatible with DLL--especially if DLL version is + older. This is not likely to be a problem with *this* simple program, + but most user programs will be much more complex.) + + ---------------------------------------------------------------------------*/ + +#include +#include "unzip.h" +#include "version.h" + +int main(int argc, char *argv[]) +{ + static UzpVer *pVersion; /* no pervert jokes, please... */ + + pVersion = UzpVersion(); + + printf("UnZip stub: checking version numbers (DLL is dated %s)\n", + pVersion->date); + printf(" UnZip versions: expecting %d.%d%d, using %d.%d%d%s\n", + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, pVersion->unzip.major, + pVersion->unzip.minor, pVersion->unzip.patchlevel, pVersion->betalevel); + printf(" ZipInfo versions: expecting %d.%d%d, using %d.%d%d\n", + ZI_MAJORVER, ZI_MINORVER, PATCHLEVEL, pVersion->zipinfo.major, + pVersion->zipinfo.minor, pVersion->zipinfo.patchlevel); + +/* + D2_M*VER and os2dll.* are obsolete, though retained for compatibility: + + printf(" OS2 DLL versions: expecting %d.%d%d, using %d.%d%d\n", + D2_MAJORVER, D2_MINORVER, PATCHLEVEL, pVersion->os2dll.major, + pVersion->os2dll.minor, pVersion->os2dll.patchlevel); + */ + + if (pVersion->flag & 2) + printf(" using zlib version %s\n", pVersion->zlib_version); + printf("\n"); + + /* call the actual UnZip routine (string-arguments version) */ + return UzpMain(argc, argv); +} diff --git a/utils/Install/packzip/win32.c b/utils/Install/packzip/win32.c new file mode 100644 index 0000000000..f50ee5f9dd --- /dev/null +++ b/utils/Install/packzip/win32.c @@ -0,0 +1,2390 @@ +/*--------------------------------------------------------------------------- + + win32.c + + 32-bit Windows-specific (NT/95) routines for use with Info-ZIP's UnZip 5.3 + and later. + + Contains: GetLoadPath() + Opendir() + Readdir() + Closedir() + process_defer_NT() process any deferred items + SetSD() set security descriptor on file + EvalExtraFields() evaluate and process and extra field NOW + IsWinNT() indicate type of WIN32 platform + test_NTSD() test integrity of NT security data + utime2FileTime() + FStampIsLocTime() + FileTime2utime() + VFatFileTime2utime() + UTCtime2Localtime() + NTtzbugWorkaround() + getNTfiletime() + close_outfile() + stamp_file() + isfloppy() + NTQueryVolInfo() + IsVolumeOldFAT() + do_wild() + mapattr() + mapname() + map2fat() + checkdir() + version() + zstat_win32() + getch_win32() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#include /* must be AFTER unzip.h to avoid struct G problems */ +#ifdef __RSXNT__ +# include "rsxntwin.h" +#endif +#include "nt.h" + +#ifndef FUNZIP /* most of this file is not used with fUnZip */ + +#if (defined(__GO32__) || defined(__EMX__) || defined(__CYGWIN32__)) +# define MKDIR(path,mode) mkdir(path,mode) +#else +# define MKDIR(path,mode) mkdir(path) +#endif + +#ifdef HAVE_WORKING_DIRENT_H +# undef HAVE_WORKING_DIRENT_H +#endif +/* The emxrtl dirent support of (__GO32__ || __EMX__) converts to lowercase! */ +#if defined(__CYGWIN32__) +# define HAVE_WORKING_DIRENT_H +#endif + +#ifndef SFX +# ifdef HAVE_WORKING_DIRENT_H +# include /* use readdir() */ +# define zdirent dirent +# define zDIR DIR +# define Opendir opendir +# define Readdir readdir +# define Closedir closedir +# else /* !HAVE_WORKING_DIRENT_H */ + typedef struct zdirent { + char reserved [21]; + char ff_attrib; + short ff_ftime; + short ff_fdate; + long size; + char d_name[MAX_PATH]; + int d_first; + HANDLE d_hFindFile; + } zDIR; + + static zDIR *Opendir (const char *n); + static struct zdirent *Readdir (zDIR *d); + static void Closedir (zDIR *d); +# endif /* ?HAVE_WORKING_DIRENT_H */ +#endif /* !SFX */ + + +/* Function prototypes */ +#ifdef NTSD_EAS + static int SetSD(__GPRO__ char *path, PVOLUMECAPS VolumeCaps, + uch *eb_ptr, unsigned eb_len); + static int EvalExtraFields(__GPRO__ char *path, uch *ef_ptr, + unsigned ef_len); +#endif + +#if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND) || \ + defined(TIMESTAMP)) + static void utime2FileTime(time_t ut, FILETIME *pft); + static int FStampIsLocTime(__GPRO__ const char *path); +#endif /* USE_EF_UT_TIME || NT_TZBUG_WORKAROUND || TIMESTAMP */ +#ifdef NT_TZBUG_WORKAROUND + static int FileTime2utime(const FILETIME *pft, time_t *ut); +#ifdef W32_STAT_BANDAID + static int VFatFileTime2utime(const FILETIME *pft, time_t *ut); +#endif + static time_t UTCtime2Localtime(time_t utctime); + static void NTtzbugWorkaround(time_t ut, FILETIME *pft); +#endif /* NT_TZBUG_WORKAROUND */ + +static int getNTfiletime (__GPRO__ FILETIME *pModFT, FILETIME *pAccFT, + FILETIME *pCreFT); +static int isfloppy (int nDrive); +static int NTQueryVolInfo (__GPRO__ const char *name); +static int IsVolumeOldFAT (__GPRO__ const char *name); +static void map2fat (char *pathcomp, char **pEndFAT); + + +#ifdef __MINGW32__ + int _CRT_glob = 0; /* suppress command line globbing by C RTL */ +#endif + +/* static int created_dir; */ /* used by mapname(), checkdir() */ +/* static int renamed_fullpath; */ /* ditto */ +/* static int fnlen; */ /* ditto */ +/* static unsigned nLabelDrive; */ /* ditto */ + +extern char Far TruncNTSD[]; /* in extract.c */ + + + +#ifdef SFX + +/**************************/ +/* Function GetLoadPath() */ +/**************************/ + +char *GetLoadPath(__GPRO) +{ +#ifdef MSC + extern char *_pgmptr; + return _pgmptr; + +#else /* use generic API call */ + + GetModuleFileName(NULL, G.filename, FILNAMSIZ-1); + _ISO_INTERN(G.filename); /* translate to codepage of C rtl's stdio */ + return G.filename; +#endif + +} /* end function GetLoadPath() */ + + + + + +#else /* !SFX */ + +#ifndef HAVE_WORKING_DIRENT_H + +/**********************/ /* Borrowed from ZIP 2.0 sources */ +/* Function Opendir() */ /* Difference: no special handling for */ +/**********************/ /* hidden or system files. */ + +static zDIR *Opendir(n) + const char *n; /* directory to open */ +{ + zDIR *d; /* malloc'd return value */ + char *p; /* malloc'd temporary string */ + WIN32_FIND_DATA fd; + extent len = strlen(n); + + /* Start searching for files in directory n */ + + if ((d = (zDIR *)malloc(sizeof(zDIR))) == NULL || + (p = malloc(strlen(n) + 5)) == NULL) + { + if (d != (zDIR *)NULL) + free((void *)d); + return (zDIR *)NULL; + } + INTERN_TO_ISO(n, p); + if (len > 0) { + if (p[len-1] == ':') + p[len++] = '.'; /* x: => x:. */ + else if (p[len-1] == '/' || p[len-1] == '\\') + --len; /* foo/ => foo */ + } + strcpy(p+len, "/*"); + + if (INVALID_HANDLE_VALUE == (d->d_hFindFile = FindFirstFile(p, &fd))) { + free((zvoid *)d); + free((zvoid *)p); + return NULL; + } + strcpy(d->d_name, fd.cFileName); + + free((zvoid *)p); + d->d_first = 1; + return d; + +} /* end of function Opendir() */ + + + + +/**********************/ /* Borrowed from ZIP 2.0 sources */ +/* Function Readdir() */ /* Difference: no special handling for */ +/**********************/ /* hidden or system files. */ + +static struct zdirent *Readdir(d) + zDIR *d; /* directory stream from which to read */ +{ + /* Return pointer to first or next directory entry, or NULL if end. */ + + if ( d->d_first ) + d->d_first = 0; + else + { + WIN32_FIND_DATA fd; + + if ( !FindNextFile(d->d_hFindFile, &fd) ) + return NULL; + + ISO_TO_INTERN(fd.cFileName, d->d_name); + } + return (struct zdirent *)d; + +} /* end of function Readdir() */ + + + + +/***********************/ +/* Function Closedir() */ /* Borrowed from ZIP 2.0 sources */ +/***********************/ + +static void Closedir(d) + zDIR *d; /* directory stream to close */ +{ + FindClose(d->d_hFindFile); + free(d); +} + +#endif /* !HAVE_WORKING_DIRENT_H */ +#endif /* ?SFX */ + + + + +#ifdef NTSD_EAS + +/*********************************/ +/* Function process_defer_NT() */ +/*********************************/ + +void process_defer_NT(__G) + __GDEF +{ + /* process deferred items */ + + DWORD dir, bytes; + DWORD dirfail, bytesfail; + + ProcessDefer(&dir, &bytes, &dirfail, &bytesfail); + + if (!uO.tflag && (uO.qflag < 2)) { + if (dir) + Info(slide, 0, ((char *)slide, + " updated: %lu directory entries with %lu bytes security", + (ulg)dir, (ulg)bytes)); + if (dirfail) + Info(slide, 0, ((char *)slide, + " failed: %lu directory entries with %lu bytes security", + (ulg)dirfail, (ulg)bytesfail)); + } +} + + + +/**********************/ +/* Function SetSD() */ /* return almost-PK errors */ +/**********************/ + +static int SetSD(__G__ path, VolumeCaps, eb_ptr, eb_len) + __GDEF + char *path; + PVOLUMECAPS VolumeCaps; + uch *eb_ptr; + unsigned eb_len; +{ + ulg ntsd_ucSize; + uch *security_data; + int error; + + if (eb_ptr == NULL || eb_len < EB_NTSD_L_LEN) + return PK_OK; /* not a valid NTSD extra field: assume OK */ + + /* check if we know how to handle this version */ + if (*(eb_ptr + (EB_HEADSIZE+EB_NTSD_VERSION)) > (uch)EB_NTSD_MAX_VER) + return PK_OK; + + ntsd_ucSize = makelong(eb_ptr + (EB_HEADSIZE+EB_UCSIZE_P)); + if (ntsd_ucSize > 0L && eb_len <= (EB_NTSD_L_LEN + EB_CMPRHEADLEN)) + return IZ_EF_TRUNC; /* no compressed data! */ + + /* allocate storage for uncompressed data */ + security_data = (uch *)malloc((extent)ntsd_ucSize); + if (security_data == (uch *)NULL) + return PK_MEM4; + + error = memextract(__G__ security_data, ntsd_ucSize, + (eb_ptr + (EB_HEADSIZE+EB_NTSD_L_LEN)), (ulg)(eb_len - EB_NTSD_L_LEN)); + + if (error == PK_OK) { + if (SecuritySet(path, VolumeCaps, security_data)) { + error = PK_COOL; + if (!uO.tflag && (uO.qflag < 2) && + (!(VolumeCaps->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) + Info(slide, 0, ((char *)slide, " (%ld bytes security)", + ntsd_ucSize)); + } + } + + free(security_data); + return error; +} + + + + +/********************************/ /* scan extra fields for something */ +/* Function EvalExtraFields() */ /* we happen to know */ +/********************************/ + +static int EvalExtraFields(__G__ path, ef_ptr, ef_len) + __GDEF + char *path; + uch *ef_ptr; + unsigned ef_len; +{ + int rc = PK_OK; + + if (!uO.X_flag) + return PK_OK; /* user said don't process ACLs; for now, no other + extra block types are handled here */ + + while (ef_len >= EB_HEADSIZE) + { + unsigned eb_id = makeword(EB_ID + ef_ptr); + unsigned eb_len = makeword(EB_LEN + ef_ptr); + + if (eb_len > (ef_len - EB_HEADSIZE)) { + /* discovered some extra field inconsistency! */ + Trace((stderr, + "EvalExtraFields: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } + + switch (eb_id) + { + /* process security descriptor extra data if: + Caller is WinNT AND + Target local/remote drive supports acls AND + Target file is not a directory (else we defer processing + until later) + */ + case EF_NTSD: + if (IsWinNT()) { + VOLUMECAPS VolumeCaps; + + /* provide useful input */ + VolumeCaps.dwFileAttributes = G.pInfo->file_attr; + VolumeCaps.bUsePrivileges = (uO.X_flag > 1); + + /* check target volume capabilities - just fall through + * and try if fail */ + if (GetVolumeCaps(G.rootpath, path, &VolumeCaps) && + !(VolumeCaps.dwFileSystemFlags & FS_PERSISTENT_ACLS)) + { + rc = PK_OK; + break; + } + rc = SetSD(__G__ path, &VolumeCaps, ef_ptr, eb_len); + } else + rc = PK_OK; + break; + +#if 0 + /* perhaps later we can add support for unzipping OS/2 EAs to NT */ + case EF_OS2: + rc = SetEAs(__G__ path, ef_ptr); + break; + + case EF_PKUNIX: + case EF_IZUNIX: + case EF_IZUNIX2: + case EF_TIME: + break; /* handled elsewhere */ +#else /* ! 0 */ +#ifdef DEBUG + case EF_AV: + case EF_OS2: + case EF_PKVMS: + case EF_PKW32: + case EF_PKUNIX: + case EF_IZVMS: + case EF_IZUNIX: + case EF_IZUNIX2: + case EF_TIME: + case EF_MAC3: + case EF_JLMAC: + case EF_ZIPIT: + case EF_VMCMS: + case EF_MVS: + case EF_ACL: + case EF_BEOS: + case EF_QDOS: + case EF_AOSVS: + case EF_SPARK: + case EF_MD5: + case EF_ASIUNIX: + break; /* shut up for other known e.f. blocks */ +#endif /* DEBUG */ +#endif /* ? 0 */ + + default: + Trace((stderr, + "EvalExtraFields: unknown extra field block, ID=%u\n", + eb_id)); + break; + } + + ef_ptr += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + + if (rc != PK_OK) + break; + } + + return rc; +} + + + + +#ifndef SFX + +/**************************/ +/* Function test_NTSD() */ /* returns PK_WARN when NTSD data is invalid */ +/**************************/ + +#ifdef __BORLANDC__ +/* Turn off warning about not using all parameters for this function only */ +#pragma argsused +#endif +int test_NTSD(__G__ eb, eb_size, eb_ucptr, eb_ucsize) + __GDEF + uch *eb; + unsigned eb_size; + uch *eb_ucptr; + ulg eb_ucsize; +{ + int r = PK_OK; + + if (!ValidateSecurity(eb_ucptr)) + r = PK_WARN; + return r; + +} /* end function test_NTSD() */ + +#endif /* !SFX */ +#endif /* NTSD_EAS */ + + + + +/**********************/ +/* Function IsWinNT() */ +/**********************/ + +int IsWinNT(void) /* returns TRUE if real NT, FALSE if Win95 or Win32s */ +{ + static DWORD g_PlatformId = 0xFFFFFFFF; /* saved platform indicator */ + + if (g_PlatformId == 0xFFFFFFFF) { + /* note: GetVersionEx() doesn't exist on WinNT 3.1 */ + if (GetVersion() < 0x80000000) + g_PlatformId = TRUE; + else + g_PlatformId = FALSE; + } + return (int)g_PlatformId; +} + + +/* DEBUG_TIME insertion: */ +#ifdef DEBUG_TIME +static int show_NTFileTime(FILE *hdo, char *TTmsg, int isloc, FILETIME *pft); + +static int show_NTFileTime(FILE *hdo, char *TTmsg, int isloc, FILETIME *pft) +{ + SYSTEMTIME w32tm; + int rval; + + rval = FileTimeToSystemTime(pft, &w32tm); + if (!rval) { + fprintf(hdo, "%s\n %08lX,%08lX (%s) -> Conversion failed !!!\n", + TTmsg, (ulg)(pft->dwHighDateTime), (ulg)(pft->dwLowDateTime), + (isloc ? "local" : "UTC")); + } else { + fprintf(hdo, "%s\n %08lx,%08lx -> %04u-%02u-%02u, %02u:%02u:%02u %s\n", + TTmsg, (ulg)(pft->dwHighDateTime), (ulg)(pft->dwLowDateTime), + w32tm.wYear, w32tm.wMonth, w32tm.wDay, w32tm.wHour, + w32tm.wMinute, w32tm.wSecond, (isloc ? "local" : "UTC")); + } + return rval; +} +#define FTTrace(x) show_NTFileTime x +#else +#define FTTrace(x) +#endif /* DEBUG_TIME */ +/* end of TIME_DEBUG insertion */ + +#if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND) || \ + defined(TIMESTAMP)) + +#if ((defined(__GNUC__) || defined(ULONG_LONG_MAX)) && !defined(HAVE_INT64)) + typedef long long LLONG64; + typedef unsigned long long ULLNG64; +# define HAVE_INT64 +#endif +#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1100) && !defined(HAVE_INT64)) + typedef __int64 LLONG64; + typedef unsigned __int64 ULLNG64; +# define HAVE_INT64 +#endif +#if (defined(_MSC_VER) && (_MSC_VER >= 1100) && !defined(HAVE_INT64)) + typedef __int64 LLONG64; + typedef unsigned __int64 ULLNG64; +# define HAVE_INT64 +#endif + +/*****************************/ +/* Function utime2FileTime() */ /* convert Unix time_t format into the */ +/*****************************/ /* form used by SetFileTime() in NT/95 */ + +#define UNIX_TIME_ZERO_HI 0x019DB1DEUL +#define UNIX_TIME_ZERO_LO 0xD53E8000UL +#define NT_QUANTA_PER_UNIX 10000000L + +static void utime2FileTime(time_t ut, FILETIME *pft) +{ +#ifdef HAVE_INT64 + ULLNG64 NTtime; + + /* NT_QUANTA_PER_UNIX is small enough so that "ut * NT_QUANTA_PER_UNIX" + * cannot overflow in 64-bit signed calculation, regardless wether "ut" + * is signed or unsigned. */ + NTtime = ((LLONG64)ut * NT_QUANTA_PER_UNIX) + + ((ULLNG64)UNIX_TIME_ZERO_LO + ((ULLNG64)UNIX_TIME_ZERO_HI << 32)); + pft->dwLowDateTime = (DWORD)NTtime; + pft->dwHighDateTime = (DWORD)(NTtime >> 32); + +#else /* !HAVE_INT64 (64-bit integer arithmetics may not be supported) */ + unsigned int b1, b2, carry = 0; + unsigned long r0, r1, r2, r3; + long r4; /* signed, to catch environments with signed time_t */ + + b1 = ut & 0xFFFF; + b2 = (ut >> 16) & 0xFFFF; /* if ut is over 32 bits, too bad */ + r1 = b1 * (NT_QUANTA_PER_UNIX & 0xFFFF); + r2 = b1 * (NT_QUANTA_PER_UNIX >> 16); + r3 = b2 * (NT_QUANTA_PER_UNIX & 0xFFFF); + r4 = b2 * (NT_QUANTA_PER_UNIX >> 16); + r0 = (r1 + (r2 << 16)) & 0xFFFFFFFFL; + if (r0 < r1) + carry++; + r1 = r0; + r0 = (r0 + (r3 << 16)) & 0xFFFFFFFFL; + if (r0 < r1) + carry++; + pft->dwLowDateTime = r0 + UNIX_TIME_ZERO_LO; + if (pft->dwLowDateTime < r0) + carry++; + pft->dwHighDateTime = r4 + (r2 >> 16) + (r3 >> 16) + + UNIX_TIME_ZERO_HI + carry; +#endif /* ?HAVE_INT64 */ + +} /* end function utime2FileTime() */ + + + +/******************************/ +/* Function FStampIsLocTime() */ +/******************************/ + +static int FStampIsLocTime(__GPRO__ const char *path) +{ + return (NTQueryVolInfo(__G__ path) ? G.lastVolLocTim : FALSE); +} + +#endif /* USE_EF_UT_TIME || NT_TZBUG_WORKAROUND || TIMESTAMP */ + + + +#ifndef NT_TZBUG_WORKAROUND +# define UTIME_BOUNDCHECK_1(utimval) \ + if (fs_uses_loctime) { \ + utime_dosmin = dos_to_unix_time(DOSTIME_MINIMUM); \ + if ((ulg)utimval < (ulg)utime_dosmin) \ + utimval = utime_dosmin; \ + } +# define UTIME_BOUNDCHECK_N(utimval) \ + if (fs_uses_loctime && ((ulg)utimval < (ulg)utime_dosmin)) \ + utimval = utime_dosmin; +# define NT_TZBUG_PRECOMPENSATE(ut, pft) + +#else /* NT_TZBUG_WORKAROUND */ +# define UNIX_TIME_UMAX_HI 0x0236485EUL +# define UNIX_TIME_UMAX_LO 0xD4A5E980UL +# define UNIX_TIME_SMIN_HI 0x0151669EUL +# define UNIX_TIME_SMIN_LO 0xD53E8000UL +# define UNIX_TIME_SMAX_HI 0x01E9FD1EUL +# define UNIX_TIME_SMAX_LO 0xD4A5E980UL +# define UTIME_1980_JAN_01_00_00 315532800L +# define UTIME_BOUNDCHECK_1(utimval) +# define UTIME_BOUNDCHECK_N(utimval) +# define NT_TZBUG_PRECOMPENSATE(ut, pft) \ + if (fs_uses_loctime) NTtzbugWorkaround(ut, pft); + + /* nonzero if `y' is a leap year, else zero */ +# define leap(y) (((y)%4 == 0 && (y)%100 != 0) || (y)%400 == 0) + /* number of leap years from 1970 to `y' (not including `y' itself) */ +# define nleap(y) (((y)-1969)/4 - ((y)-1901)/100 + ((y)-1601)/400) + +extern ZCONST ush ydays[]; /* defined in fileio.c */ + +/*****************************/ +/* Function FileTime2utime() */ +/*****************************/ + +static int FileTime2utime(const FILETIME *pft, time_t *ut) +{ +#ifdef HAVE_INT64 + ULLNG64 NTtime; + + NTtime = ((ULLNG64)pft->dwLowDateTime + + ((ULLNG64)pft->dwHighDateTime << 32)); + + /* underflow and overflow handling */ +#ifdef CHECK_UTIME_SIGNED_UNSIGNED + if ((time_t)0x80000000L < (time_t)0L) + { + if (NTtime < ((ULLNG64)UNIX_TIME_SMIN_LO + + ((ULLNG64)UNIX_TIME_SMIN_HI << 32))) { + *ut = (time_t)LONG_MIN; + return FALSE; + } + if (NTtime > ((ULLNG64)UNIX_TIME_SMAX_LO + + ((ULLNG64)UNIX_TIME_SMAX_HI << 32))) { + *ut = (time_t)LONG_MAX; + return FALSE; + } + } + else +#endif /* CHECK_UTIME_SIGNED_UNSIGNED */ + { + if (NTtime < ((ULLNG64)UNIX_TIME_ZERO_LO + + ((ULLNG64)UNIX_TIME_ZERO_HI << 32))) { + *ut = (time_t)0; + return FALSE; + } + if (NTtime > ((ULLNG64)UNIX_TIME_UMAX_LO + + ((ULLNG64)UNIX_TIME_UMAX_HI << 32))) { + *ut = (time_t)ULONG_MAX; + return FALSE; + } + } + + NTtime -= ((ULLNG64)UNIX_TIME_ZERO_LO + + ((ULLNG64)UNIX_TIME_ZERO_HI << 32)); + *ut = (time_t)(NTtime / (unsigned long)NT_QUANTA_PER_UNIX); + return TRUE; +#else /* !HAVE_INT64 (64-bit integer arithmetics may not be supported) */ + time_t days; + SYSTEMTIME w32tm; + + /* underflow and overflow handling */ +#ifdef CHECK_UTIME_SIGNED_UNSIGNED + if ((time_t)0x80000000L < (time_t)0L) + { + if ((pft->dwHighDateTime < UNIX_TIME_SMIN_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMIN_HI) && + (pft->dwLowDateTime < UNIX_TIME_SMIN_LO))) { + *ut = (time_t)LONG_MIN; + return FALSE; + if ((pft->dwHighDateTime > UNIX_TIME_SMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_SMAX_LO))) { + *ut = (time_t)LONG_MAX; + return FALSE; + } + } + else +#endif /* CHECK_UTIME_SIGNED_UNSIGNED */ + { + if ((pft->dwHighDateTime < UNIX_TIME_ZERO_HI) || + ((pft->dwHighDateTime == UNIX_TIME_ZERO_HI) && + (pft->dwLowDateTime < UNIX_TIME_ZERO_LO))) { + *ut = (time_t)0; + return FALSE; + } + if ((pft->dwHighDateTime > UNIX_TIME_UMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_UMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_UMAX_LO))) { + *ut = (time_t)ULONG_MAX; + return FALSE; + } + } + + FileTimeToSystemTime(pft, &w32tm); + + /* set `days' to the number of days into the year */ + days = w32tm.wDay - 1 + ydays[w32tm.wMonth-1] + + (w32tm.wMonth > 2 && leap (w32tm.wYear)); + + /* now set `days' to the number of days since 1 Jan 1970 */ + days += 365 * (time_t)(w32tm.wYear - 1970) + + (time_t)(nleap(w32tm.wYear)); + + *ut = (time_t)(86400L * days + 3600L * (time_t)w32tm.wHour + + (time_t)(60 * w32tm.wMinute + w32tm.wSecond)); + return TRUE; +#endif /* ?HAVE_INT64 */ +} /* end function FileTime2utime() */ + + + +#ifdef W32_STAT_BANDAID +/*********************************/ +/* Function VFatFileTime2utime() */ +/*********************************/ + +static int VFatFileTime2utime(const FILETIME *pft, time_t *ut) +{ + FILETIME lft; +#ifndef HAVE_MKTIME + WORD wDOSDate, wDOSTime; +#else + SYSTEMTIME w32tm; + struct tm ltm; +#endif + + FileTimeToLocalFileTime(pft, &lft); + FTTrace((stdout, "VFatFT2utime, feed for mktime()", 1, &lft)); +#ifndef HAVE_MKTIME + /* This version of the FILETIME-to-UNIXTIME conversion function + * uses DOS-DATE-TIME format as intermediate stage. For modification + * and access times, this is no problem. But, the extra fine resolution + * of the VFAT-stored creation time gets lost. + */ + FileTimeToDosDateTime(&lft, &wDOSDate, &wDOSTime); + TTrace((stdout,"DosDateTime is %04u-%02u-%02u %02u:%02u:%02u\n", + (unsigned)((wDOSDate>>9)&0x7f)+1980,(unsigned)((wDOSDate>>5)&0x0f), + (unsigned)(wDOSDate&0x1f),(unsigned)((wDOSTime>>11)&0x1f), + (unsigned)((wDOSTime>>5)&0x3f),(unsigned)((wDOSTime<<1)&0x3e))); + *ut = dos_to_unix_time(((ulg)wDOSDate << 16) | (ulg)wDOSTime); + + /* a cheap error check: dos_to_unix_time() only returns an odd time + * when clipping at maximum time_t value. DOS_DATE_TIME values have + * a resolution of 2 seconds and are therefore even numbers. + */ + return (((*ut)&1) == (time_t)0); +#else /* HAVE_MKTIME */ + FileTimeToSystemTime(&lft, &w32tm); + /* underflow and overflow handling */ + /* TODO: The range checks are not accurate, the actual limits may + * be off by one daylight-saving-time shift (typically 1 hour), + * depending on the current state of "is_dst". + */ +#ifdef CHECK_UTIME_SIGNED_UNSIGNED + if ((time_t)0x80000000L < (time_t)0L) + { + if ((pft->dwHighDateTime < UNIX_TIME_SMIN_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMIN_HI) && + (pft->dwLowDateTime < UNIX_TIME_SMIN_LO))) { + *ut = (time_t)LONG_MIN; + return FALSE; + if ((pft->dwHighDateTime > UNIX_TIME_SMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_SMAX_LO))) { + *ut = (time_t)LONG_MAX; + return FALSE; + } + } + else +#endif /* CHECK_UTIME_SIGNED_UNSIGNED */ + { + if ((pft->dwHighDateTime < UNIX_TIME_ZERO_HI) || + ((pft->dwHighDateTime == UNIX_TIME_ZERO_HI) && + (pft->dwLowDateTime < UNIX_TIME_ZERO_LO))) { + *ut = (time_t)0; + return FALSE; + } + if ((pft->dwHighDateTime > UNIX_TIME_UMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_UMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_UMAX_LO))) { + *ut = (time_t)ULONG_MAX; + return FALSE; + } + } + ltm.tm_year = w32tm.wYear - 1900; + ltm.tm_mon = w32tm.wMonth - 1; + ltm.tm_mday = w32tm.wDay; + ltm.tm_hour = w32tm.wHour; + ltm.tm_min = w32tm.wMinute; + ltm.tm_sec = w32tm.wSecond; + ltm.tm_isdst = -1; /* let mktime determine if DST is in effect */ + *ut = mktime(<m); + + /* a cheap error check: mktime returns "(time_t)-1L" on conversion errors. + * Normally, we would have to apply a consistency check because "-1" + * could also be a valid time. But, it is quite unlikely to read back odd + * time numbers from file systems that store time stamps in DOS format. + * (The only known exception is creation time on VFAT partitions.) + */ + return (*ut != (time_t)-1L); +#endif /* ?HAVE_MKTIME */ + +} /* end function VFatFileTime2utime() */ +#endif /* W32_STAT_BANDAID */ + + + +/********************************/ +/* Function UTCtime2Localtime() */ /* borrowed from Zip's mkgmtime() */ +/********************************/ + +static time_t UTCtime2Localtime(time_t utctime) +{ + time_t utc = utctime; + struct tm *tm; + unsigned years, months, days, hours, minutes, seconds; + + +#ifdef __BORLANDC__ /* Borland C++ 5.x crashes when trying to reference tm */ + if (utc < UTIME_1980_JAN_01_00_00) + utc = UTIME_1980_JAN_01_00_00; +#endif + tm = localtime(&utc); + if (tm == (struct tm *)NULL) + /* localtime() did not accept given utc time value; as an emergency + exit, the unconverted utctime value is returned */ + return utctime; + + years = tm->tm_year + 1900; /* year - 1900 -> year */ + months = tm->tm_mon; /* 0..11 */ + days = tm->tm_mday - 1; /* 1..31 -> 0..30 */ + hours = tm->tm_hour; /* 0..23 */ + minutes = tm->tm_min; /* 0..59 */ + seconds = tm->tm_sec; /* 0..61 in ANSI C */ + + /* set `days' to the number of days into the year */ + days += ydays[months] + (months > 1 && leap(years)); + + /* now set `days' to the number of days since 1 Jan 1970 */ + days += 365 * (years - 1970) + nleap(years); + + return (time_t)(86400L * (ulg)days + 3600L * (ulg)hours + + (ulg)(60 * minutes + seconds)); + +} /* end function UTCtime2Localtime() */ + + + +/********************************/ +/* Function NTtzbugWorkaround() */ +/********************************/ + +static void NTtzbugWorkaround(time_t ut, FILETIME *pft) +{ + FILETIME C_RTL_locft, NTAPI_locft; + time_t ux_loctime = UTCtime2Localtime(ut); + + /* This routine is only used when the target file system stores time- + * stamps as local time in MSDOS format. Thus we make sure that the + * resulting timestamp is within the range of MSDOS date-time values. */ + if (ux_loctime < UTIME_1980_JAN_01_00_00) + ux_loctime = UTIME_1980_JAN_01_00_00; + + utime2FileTime(ux_loctime, &C_RTL_locft); + if (!FileTimeToLocalFileTime(pft, &NTAPI_locft)) + return; + else { + long time_shift_l, time_shift_h; + int carry = 0; + + time_shift_l = C_RTL_locft.dwLowDateTime - NTAPI_locft.dwLowDateTime; + if (C_RTL_locft.dwLowDateTime < NTAPI_locft.dwLowDateTime) + carry--; + time_shift_h = C_RTL_locft.dwHighDateTime - NTAPI_locft.dwHighDateTime; + pft->dwLowDateTime += time_shift_l; + if (pft->dwLowDateTime < (ulg)time_shift_l) + carry++; + pft->dwHighDateTime += time_shift_h + carry; + TTrace((stdout, "FileTime shift: %08lx:%08lx\n", + time_shift_h+carry,time_shift_l)); + } +} /* end function NTtzbugWorkaround() */ + +#endif /* ?NT_TZBUG_WORKAROUND */ + + + +/****************************/ /* Get the file time in a format that */ +/* Function getNTfiletime() */ /* can be used by SetFileTime() in NT */ +/****************************/ + +static int getNTfiletime(__G__ pModFT, pAccFT, pCreFT) + __GDEF + FILETIME *pModFT; + FILETIME *pAccFT; + FILETIME *pCreFT; +{ +#ifdef NT_TZBUG_WORKAROUND + time_t ux_modtime; +#else /* !NT_TZBUG_WORKAROUND */ + FILETIME locft; /* 64-bit value made up of two 32-bit [low & high] */ + WORD wDOSDate; /* for converting from DOS date to Windows NT */ + WORD wDOSTime; +#endif /* ?NT_TZBUG_WORKAROUND */ +#ifdef USE_EF_UT_TIME + unsigned eb_izux_flg; + iztimes z_utime; /* struct for Unix-style actime & modtime, + creatime */ +#endif +#if (defined(USE_EF_UT_TIME) && !defined(NT_TZBUG_WORKAROUND)) + time_t utime_dosmin; +# endif +#if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND)) + int fs_uses_loctime = FStampIsLocTime(__G__ G.filename); +#endif + + /* Copy and/or convert time and date variables, if necessary; + * return a flag indicating which time stamps are available. */ +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + ((eb_izux_flg = ef_scan_for_izux(G.extra_field, + G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, + &z_utime, NULL)) & EB_UT_FL_MTIME)) + { + TTrace((stderr, "getNTfiletime: Unix e.f. modif. time = %lu\n", + z_utime.mtime)); + UTIME_BOUNDCHECK_1(z_utime.mtime) + utime2FileTime(z_utime.mtime, pModFT); + NT_TZBUG_PRECOMPENSATE(z_utime.mtime, pModFT) + if (eb_izux_flg & EB_UT_FL_ATIME) { + UTIME_BOUNDCHECK_N(z_utime.atime) + utime2FileTime(z_utime.atime, pAccFT); + NT_TZBUG_PRECOMPENSATE(z_utime.atime, pAccFT) + } + if (eb_izux_flg & EB_UT_FL_CTIME) { + UTIME_BOUNDCHECK_N(z_utime.ctime) + utime2FileTime(z_utime.ctime, pCreFT); + NT_TZBUG_PRECOMPENSATE(z_utime.ctime, pCreFT) + } + return (int)eb_izux_flg; + } +#endif /* USE_EF_UT_TIME */ +#ifdef NT_TZBUG_WORKAROUND + ux_modtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); + utime2FileTime(ux_modtime, pModFT); + NT_TZBUG_PRECOMPENSATE(ux_modtime, pModFT) +#else /* !NT_TZBUG_WORKAROUND */ + + wDOSTime = (WORD)(G.lrec.last_mod_dos_datetime); + wDOSDate = (WORD)(G.lrec.last_mod_dos_datetime >> 16); + + /* The DosDateTimeToFileTime() function converts a DOS date/time + * into a 64-bit Windows NT file time */ + if (!DosDateTimeToFileTime(wDOSDate, wDOSTime, &locft)) + { + Info(slide, 0, ((char *)slide, "DosDateTime failed: %d\n", + (int)GetLastError())); + return 0; + } + if (!LocalFileTimeToFileTime(&locft, pModFT)) + { + Info(slide, 0, ((char *)slide, "LocalFileTime failed: %d\n", + (int)GetLastError())); + *pModFT = locft; + } +#endif /* ?NT_TZBUG_WORKAROUND */ + *pAccFT = *pModFT; + return (EB_UT_FL_MTIME | EB_UT_FL_ATIME); + +} /* end function getNTfiletime() */ + + + + +/****************************/ +/* Function close_outfile() */ +/****************************/ + +void close_outfile(__G) + __GDEF +{ + FILETIME Modft; /* File time type defined in NT, `last modified' time */ + FILETIME Accft; /* NT file time type, `last access' time */ + FILETIME Creft; /* NT file time type, `file creation' time */ + HANDLE hFile; /* File handle defined in NT */ + int gotTime; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(G.filename) + 1); + + INTERN_TO_ISO(G.filename, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname G.filename +#endif + + /* Close the file and then re-open it using the Win32 + * CreateFile call, so that the file can be created + * with GENERIC_WRITE access, otherwise the SetFileTime + * call will fail. */ + fclose(G.outfile); + + /* don't set the time stamp and attributes on standard output */ + if (uO.cflag) + return; + + gotTime = getNTfiletime(__G__ &Modft, &Accft, &Creft); + + /* open a handle to the file before processing extra fields; + we do this in case new security on file prevents us from updating + time stamps */ + hFile = CreateFile(Ansi_Fname, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + + /* sfield@microsoft.com: set attributes before time in case we decide to + support other filetime members later. This also allows us to apply + attributes before the security is changed, which may prevent this + from succeeding otherwise. Also, since most files don't have + any interesting attributes, only change them if something other than + FILE_ATTRIBUTE_ARCHIVE appears in the attributes. This works well + as an optimization because FILE_ATTRIBUTE_ARCHIVE gets applied to the + file anyway, when it's created new. */ + if((G.pInfo->file_attr & 0x7F) & ~FILE_ATTRIBUTE_ARCHIVE) { + if (!SetFileAttributes(Ansi_Fname, G.pInfo->file_attr & 0x7F)) + Info(slide, 1, ((char *)slide, + "\nwarning (%d): could not set file attributes\n", + (int)GetLastError())); + } + +#ifdef NTSD_EAS + /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ + if (G.extra_field) { /* zipfile extra field may have extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 1, ((char *)slide, LoadFarString(TruncNTSD), + makeword(G.extra_field+2)-10, uO.qflag? "\n":"")); + } + } +#endif /* NTSD_EAS */ + + if ( hFile == INVALID_HANDLE_VALUE ) + Info(slide, 1, ((char *)slide, + "\nCreateFile error %d when trying set file time\n", + (int)GetLastError())); + else { + if (gotTime) { + FILETIME *pModft = (gotTime & EB_UT_FL_MTIME) ? &Modft : NULL; + FILETIME *pAccft = (gotTime & EB_UT_FL_ATIME) ? &Accft : NULL; + FILETIME *pCreft = (gotTime & EB_UT_FL_CTIME) ? &Creft : NULL; + + if (!SetFileTime(hFile, pCreft, pAccft, pModft)) + Info(slide, 0, ((char *)slide, "\nSetFileTime failed: %d\n", + (int)GetLastError())); + } + CloseHandle(hFile); + } + + return; + +#undef Ansi_Fname + +} /* end function close_outfile() */ + + + + +#ifdef TIMESTAMP + +/*************************/ +/* Function stamp_file() */ +/*************************/ + +int stamp_file(__GPRO__ ZCONST char *fname, time_t modtime) +{ + FILETIME Modft; /* File time type defined in NT, `last modified' time */ + HANDLE hFile; /* File handle defined in NT */ + int errstat = 0; /* return status: 0 == "OK", -1 == "Failure" */ +#ifndef NT_TZBUG_WORKAROUND + time_t utime_dosmin; /* internal variable for UTIME_BOUNDCHECK_1 */ +#endif + int fs_uses_loctime = FStampIsLocTime(__G__ fname); +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(fname) + 1); + + INTERN_TO_ISO(fname, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname fname +#endif + + /* open a handle to the file to prepare setting the mod-time stamp */ + hFile = CreateFile(Ansi_Fname, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if ( hFile == INVALID_HANDLE_VALUE ) { + errstat = -1; + } else { + /* convert time_t modtime into WIN32 native 64bit format */ + UTIME_BOUNDCHECK_1(modtime) + utime2FileTime(modtime, &Modft); + NT_TZBUG_PRECOMPENSATE(modtime, &Modft) + /* set Access and Modification times of the file to modtime */ + if (!SetFileTime(hFile, NULL, &Modft, &Modft)) { + errstat = -1; + } + CloseHandle(hFile); + } + + return errstat; + +#undef Ansi_Fname +} /* end function stamp_file() */ + +#endif /* TIMESTAMP */ + + + + +/***********************/ +/* Function isfloppy() */ /* more precisely, is it removable? */ +/***********************/ + +static int isfloppy(int nDrive) /* 1 == A:, 2 == B:, etc. */ +{ + char rootPathName[4]; + + rootPathName[0] = (char)('A' + nDrive - 1); /* build the root path */ + rootPathName[1] = ':'; /* name, e.g. "A:/" */ + rootPathName[2] = '/'; + rootPathName[3] = '\0'; + + return (GetDriveType(rootPathName) == DRIVE_REMOVABLE); + +} /* end function isfloppy() */ + + + + +/*****************************/ +/* Function NTQueryVolInfo() */ +/*****************************/ + +/* + * Note: 8.3 limits on filenames apply only to old-style FAT filesystems. + * More recent versions of Windows (Windows NT 3.5 / Windows 4.0) + * can support long filenames (LFN) on FAT filesystems. Check the + * filesystem maximum component length field to detect LFN support. + */ + +static int NTQueryVolInfo(__GPRO__ const char *name) +{ + /* static char lastRootPath[4] = ""; */ + /* static int lastVolOldFAT; */ + /* static int lastVolLocTim; */ + char *tmp0; + char tmp1[MAX_PATH], tmp2[MAX_PATH]; + unsigned volSerNo, maxCompLen, fileSysFlags; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(name) + 1); + + INTERN_TO_ISO(name, ansi_name); + name = ansi_name; +#endif + + if ((!strncmp(name, "//", 2) || !strncmp(name,"\\\\", 2)) && + (name[2] != '\0' && name[2] != '/' && name[2] != '\\')) { + /* GetFullPathname() and GetVolumeInformation() do not work + * on UNC names. For now, we return "error". + * **FIXME**: check if UNC name is mapped to a drive letter + * and use mapped drive for volume info query. + */ + return FALSE; + } + if (isalpha((uch)name[0]) && (name[1] == ':')) + tmp0 = (char *)name; + else + { + if (!GetFullPathName(name, MAX_PATH, tmp1, &tmp0)) + return FALSE; + tmp0 = &tmp1[0]; + } + if (strncmp(G.lastRootPath, tmp0, 2) != 0) { + /* For speed, we skip repeated queries for the same device */ + strncpy(G.lastRootPath, tmp0, 2); /* Build the root path name, */ + G.lastRootPath[2] = '/'; /* e.g. "A:/" */ + G.lastRootPath[3] = '\0'; + + if (!GetVolumeInformation((LPCTSTR)G.lastRootPath, + (LPTSTR)tmp1, (DWORD)MAX_PATH, + (LPDWORD)&volSerNo, (LPDWORD)&maxCompLen, + (LPDWORD)&fileSysFlags, (LPTSTR)tmp2, (DWORD)MAX_PATH)) { + G.lastRootPath[0] = '\0'; + return FALSE; + } + + /* LFNs are available if the component length is > 12 */ + G.lastVolOldFAT = (maxCompLen <= 12); +/* G.lastVolOldFAT = !strncmp(strupr(tmp2), "FAT", 3); old version */ + + /* Volumes in (V)FAT and (OS/2) HPFS format store file timestamps in + * local time! + */ + G.lastVolLocTim = !strncmp(strupr(tmp2), "VFAT", 4) || + !strncmp(tmp2, "HPFS", 4) || + !strncmp(tmp2, "FAT", 3); + } + + return TRUE; + +} /* end function NTQueryVolInfo() */ + + + + +/*****************************/ +/* Function IsVolumeOldFAT() */ +/*****************************/ + +static int IsVolumeOldFAT(__GPRO__ const char *name) +{ + return (NTQueryVolInfo(__G__ name) ? G.lastVolOldFAT : FALSE); +} + + + + +#ifndef SFX + +/************************/ +/* Function do_wild() */ /* identical to OS/2 version */ +/************************/ + +char *do_wild(__G__ wildspec) + __GDEF + char *wildspec; /* only used first time on a given dir */ +{ + /* static zDIR *wild_dir = NULL; */ + /* static char *dirname, *wildname, matchname[FILNAMSIZ]; */ + /* static int firstcall=TRUE, have_dirname, dirnamelen; */ + char *fnamestart; + struct zdirent *file; + + /* Even when we're just returning wildspec, we *always* do so in + * matchname[]--calling routine is allowed to append four characters + * to the returned string, and wildspec may be a pointer to argv[]. + */ + if (!G.notfirstcall) { /* first call: must initialize everything */ + G.notfirstcall = TRUE; + + if (!iswild(wildspec)) { + strcpy(G.matchname, wildspec); + G.have_dirname = FALSE; + G.wild_dir = NULL; + return G.matchname; + } + + /* break the wildspec into a directory part and a wildcard filename */ + if ((G.wildname = strrchr(wildspec, '/')) == NULL && + (G.wildname = strrchr(wildspec, ':')) == NULL) { + G.dirname = "."; + G.dirnamelen = 1; + G.have_dirname = FALSE; + G.wildname = wildspec; + } else { + ++G.wildname; /* point at character after '/' or ':' */ + G.dirnamelen = G.wildname - wildspec; + if ((G.dirname = (char *)malloc(G.dirnamelen+1)) == NULL) { + Info(slide, 1, ((char *)slide, + "warning: cannot allocate wildcard buffers\n")); + strcpy(G.matchname, wildspec); + return G.matchname; /* but maybe filespec was not a wildcard */ + } + strncpy(G.dirname, wildspec, G.dirnamelen); + G.dirname[G.dirnamelen] = '\0'; /* terminate for strcpy below */ + G.have_dirname = TRUE; + } + Trace((stderr, "do_wild: dirname = [%s]\n", G.dirname)); + + if ((G.wild_dir = (zvoid *)Opendir(G.dirname)) != NULL) { + if (G.have_dirname) { + strcpy(G.matchname, G.dirname); + fnamestart = G.matchname + G.dirnamelen; + } else + fnamestart = G.matchname; + while ((file = Readdir((zDIR *)G.wild_dir)) != NULL) { + Trace((stderr, "do_wild: Readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.wildname, 1) && /* 1 == ignore case */ + /* skip "." and ".." directory entries */ + strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.matchname; + } + } + /* if we get to here directory is exhausted, so close it */ + Closedir((zDIR *)G.wild_dir); + G.wild_dir = NULL; + } + Trace((stderr, "do_wild: Opendir(%s) returns NULL\n", G.dirname)); + + /* return the raw wildspec in case that works (e.g., directory not + * searchable, but filespec was not wild and file is readable) */ + strcpy(G.matchname, wildspec); + return G.matchname; + } + + /* last time through, might have failed opendir but returned raw wildspec */ + if (G.wild_dir == NULL) { + G.notfirstcall = FALSE; /* reset for new wildspec */ + if (G.have_dirname) + free(G.dirname); + return (char *)NULL; + } + + /* If we've gotten this far, we've read and matched at least one entry + * successfully (in a previous call), so dirname has been copied into + * matchname already. + */ + if (G.have_dirname) { + /* strcpy(G.matchname, G.dirname); */ + fnamestart = G.matchname + G.dirnamelen; + } else + fnamestart = G.matchname; + while ((file = Readdir((zDIR *)G.wild_dir)) != NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.wildname, 1)) { /* 1 == ignore case */ + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.matchname; + } + } + + Closedir((zDIR *)G.wild_dir); /* at least one entry read; nothing left */ + G.wild_dir = NULL; + G.notfirstcall = FALSE; /* reset for new wildspec */ + if (G.have_dirname) + free(G.dirname); + return (char *)NULL; + +} /* end function do_wild() */ + +#endif /* !SFX */ + + + +/**********************/ +/* Function mapattr() */ +/**********************/ + +/* Identical to MS-DOS, OS/2 versions. However, NT has a lot of extra + * permission stuff, so this function should probably be extended in the + * future. */ + +int mapattr(__G) + __GDEF +{ + /* set archive bit for file entries (file is not backed up): */ + G.pInfo->file_attr = ((unsigned)G.crec.external_file_attributes | + (G.crec.external_file_attributes & FILE_ATTRIBUTE_DIRECTORY ? + 0 : FILE_ATTRIBUTE_ARCHIVE)) & 0xff; + return 0; + +} /* end function mapattr() */ + + + + +/************************/ +/* Function mapname() */ +/************************/ + /* return 0 if no error, 1 if caution (filename */ +int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ + __GDEF /* dir doesn't exist), 3 if error (skip file), */ + int renamed; /* or 10 if out of memory (skip file) */ +{ /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ + char pathcomp[FILNAMSIZ]; /* path-component buffer */ + char *pp, *cp=NULL; /* character pointers */ + char *lastsemi = NULL; /* pointer to last semi-colon in pathcomp */ + int error; + register unsigned workch; /* hold the character being tested */ + + +/*--------------------------------------------------------------------------- + Initialize various pointers and counters and stuff. + ---------------------------------------------------------------------------*/ + + /* can create path as long as not just freshening, or if user told us */ + G.create_dirs = (!uO.fflag || renamed); + + G.created_dir = FALSE; /* not yet */ + G.renamed_fullpath = FALSE; + G.fnlen = strlen(G.filename); + + if (renamed) { + cp = G.filename - 1; /* point to beginning of renamed name... */ + while (*++cp) + if (*cp == '\\') /* convert backslashes to forward */ + *cp = '/'; + cp = G.filename; + /* use temporary rootpath if user gave full pathname */ + if (G.filename[0] == '/') { + G.renamed_fullpath = TRUE; + pathcomp[0] = '/'; /* copy the '/' and terminate */ + pathcomp[1] = '\0'; + ++cp; + } else if (isalpha((uch)G.filename[0]) && G.filename[1] == ':') { + G.renamed_fullpath = TRUE; + pp = pathcomp; + *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ + *pp++ = *cp++; + if (*cp == '/') + *pp++ = *cp++; /* otherwise add "./"? */ + *pp = '\0'; + } + } + + /* pathcomp is ignored unless renamed_fullpath is TRUE: */ + if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* init path buffer */ + return error; /* ...unless no mem or vol label on hard disk */ + + *pathcomp = '\0'; /* initialize translation buffer */ + pp = pathcomp; /* point to translation buffer */ + if (!renamed) { /* cp already set if renamed */ + if (uO.jflag) /* junking directories */ + cp = (char *)strrchr(G.filename, '/'); + if (cp == NULL) /* no '/' or not junking dirs */ + cp = G.filename; /* point to internal zipfile-member pathname */ + else + ++cp; /* point to start of last component of path */ + } + +/*--------------------------------------------------------------------------- + Begin main loop through characters in filename. + ---------------------------------------------------------------------------*/ + + while ((workch = (uch)*cp++) != 0) { + + switch (workch) { + case '/': /* can assume -j flag not given */ + *pp = '\0'; + if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) + return error; + pp = pathcomp; /* reset conversion buffer for next piece */ + lastsemi = NULL; /* leave directory semi-colons alone */ + break; + + case ':': /* drive names not stored in zipfile, */ + case '<': /* so no colons allowed */ + case '>': /* no redirection symbols allowed either */ + case '|': /* no pipe signs allowed */ + case '"': /* no double quotes allowed */ + case '?': /* no wildcards allowed */ + case '*': + *pp++ = '_'; /* these rules apply equally to FAT and NTFS */ + break; + case ';': /* start of VMS version? */ + lastsemi = pp; /* remove VMS version later... */ + *pp++ = ';'; /* but keep semicolon for now */ + break; + + case ' ': /* keep spaces unless specifically */ + /* NT cannot create filenames with spaces on FAT volumes */ + if (uO.sflag || IsVolumeOldFAT(__G__ G.filename)) + *pp++ = '_'; + else + *pp++ = ' '; + break; + + default: + /* allow European characters in filenames: */ + if (isprint(workch) || workch >= 127) + *pp++ = (char)workch; + } /* end switch */ + } /* end while loop */ + + *pp = '\0'; /* done with pathcomp: terminate it */ + + /* if not saving them, remove VMS version numbers (appended "###") */ + if (!uO.V_flag && lastsemi) { + pp = lastsemi + 1; /* semi-colon was kept: expect #'s after */ + while (isdigit((uch)(*pp))) + ++pp; + if (*pp == '\0') /* only digits between ';' and end: nuke */ + *lastsemi = '\0'; + } + +/*--------------------------------------------------------------------------- + Report if directory was created (and no file to create: filename ended + in '/'), check name to be sure it exists, and combine path and name be- + fore exiting. + ---------------------------------------------------------------------------*/ + + if (G.filename[G.fnlen-1] == '/') { + checkdir(__G__ G.filename, GETPATH); + if (G.created_dir) { +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(G.filename) + 1); + + INTERN_TO_ISO(G.filename, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname G.filename +#endif + if (QCOND2) { + Info(slide, 0, ((char *)slide, " creating: %-22s\n", + FnFilter1(G.filename))); + } + + /* set file attributes: + The default for newly created directories is "DIR attribute + flags set", so there is no need to change attributes unless + one of the DOS style attribute flags is set. The readonly + attribute need not be masked, since it does not prevent + modifications in the new directory. */ + if(G.pInfo->file_attr & (0x7F & ~FILE_ATTRIBUTE_DIRECTORY)) { + if (!SetFileAttributes(Ansi_Fname, G.pInfo->file_attr & 0x7F)) + Info(slide, 1, ((char *)slide, + "\nwarning (%d): could not set file attributes for %s\n", + (int)GetLastError(), G.filename)); + } + +#ifdef NTSD_EAS + /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ + if (G.extra_field) { /* zipfile e.f. may have extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 1, ((char *)slide, LoadFarString(TruncNTSD), + makeword(G.extra_field+2)-10, uO.qflag? "\n":"")); + } + } +#endif /* NTSD_EAS */ + return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ + } + return 2; /* dir existed already; don't look for data to extract */ + } + + if (*pathcomp == '\0') { + Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", + FnFilter1(G.filename))); + return 3; + } + + checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ + checkdir(__G__ G.filename, GETPATH); + Trace((stderr, "mapname returns with filename = [%s] (error = %d)\n\n", + FnFilter1(G.filename), error)); + + if (G.pInfo->vollabel) { /* set the volume label now */ + char drive[4]; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(G.filename) + 1); + INTERN_TO_ISO(G.filename, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname G.filename +#endif + + /* Build a drive string, e.g. "b:" */ + drive[0] = (char)('a' + G.nLabelDrive - 1); + strcpy(drive + 1, ":\\"); + if (QCOND2) + Info(slide, 0, ((char *)slide, "labelling %s %-22s\n", drive, + FnFilter1(G.filename))); + if (!SetVolumeLabel(drive, Ansi_Fname)) { + Info(slide, 1, ((char *)slide, + "mapname: error setting volume label\n")); + return 3; + } + return 2; /* success: skip the "extraction" quietly */ +#undef Ansi_Fname + } + + return error; + +} /* end function mapname() */ + + + + +/**********************/ +/* Function map2fat() */ /* Not quite identical to OS/2 version */ +/**********************/ + +static void map2fat(pathcomp, pEndFAT) + char *pathcomp, **pEndFAT; +{ + char *ppc = pathcomp; /* variable pointer to pathcomp */ + char *pEnd = *pEndFAT; /* variable pointer to buildpathFAT */ + char *pBegin = *pEndFAT; /* constant pointer to start of this comp. */ + char *last_dot = NULL; /* last dot not converted to underscore */ + int dotname = FALSE; /* flag: path component begins with dot */ + /* ("." and ".." don't count) */ + register unsigned workch; /* hold the character being tested */ + + + /* Only need check those characters which are legal in NTFS but not + * in FAT: to get here, must already have passed through mapname. + * Also must truncate path component to ensure 8.3 compliance. + */ + while ((workch = (uch)*ppc++) != 0) { + switch (workch) { + case '[': + case ']': + case '+': + case ',': + case ';': + case '=': + *pEnd++ = '_'; /* convert brackets to underscores */ + break; + + case '.': + if (pEnd == *pEndFAT) { /* nothing appended yet... */ + if (*ppc == '\0') /* don't bother appending a */ + break; /* "./" component to the path */ + else if (*ppc == '.' && ppc[1] == '\0') { /* "../" */ + *pEnd++ = '.'; /* add first dot, unchanged... */ + ++ppc; /* skip second dot, since it will */ + } else { /* be "added" at end of if-block */ + *pEnd++ = '_'; /* FAT doesn't allow null filename */ + dotname = TRUE; /* bodies, so map .exrc -> _.exrc */ + } /* (extra '_' now, "dot" below) */ + } else if (dotname) { /* found a second dot, but still */ + dotname = FALSE; /* have extra leading underscore: */ + *pEnd = '\0'; /* remove it by shifting chars */ + pEnd = *pEndFAT + 1; /* left one space (e.g., .p1.p2: */ + while (pEnd[1]) { /* __p1 -> _p1_p2 -> _p1.p2 when */ + *pEnd = pEnd[1]; /* finished) [opt.: since first */ + ++pEnd; /* two chars are same, can start */ + } /* shifting at second position] */ + } + last_dot = pEnd; /* point at last dot so far... */ + *pEnd++ = '_'; /* convert dot to underscore for now */ + break; + + default: + *pEnd++ = (char)workch; + + } /* end switch */ + } /* end while loop */ + + *pEnd = '\0'; /* terminate buildpathFAT */ + + /* NOTE: keep in mind that pEnd points to the end of the path + * component, and *pEndFAT still points to the *beginning* of it... + * Also note that the algorithm does not try to get too fancy: + * if there are no dots already, the name either gets truncated + * at 8 characters or the last underscore is converted to a dot + * (only if more characters are saved that way). In no case is + * a dot inserted between existing characters. + */ + if (last_dot == NULL) { /* no dots: check for underscores... */ + char *plu = strrchr(pBegin, '_'); /* pointer to last underscore */ + + if (plu == NULL) { /* no dots, no underscores: truncate at 8 chars */ + *pEndFAT += 8; /* (or could insert '.' and keep 11...?) */ + if (*pEndFAT > pEnd) + *pEndFAT = pEnd; /* oops...didn't have 8 chars to truncate */ + else + **pEndFAT = '\0'; + } else if (MIN(plu - pBegin, 8) + MIN(pEnd - plu - 1, 3) > 8) { + last_dot = plu; /* be lazy: drop through to next if-blk */ + } else if ((pEnd - *pEndFAT) > 8) { + *pEndFAT += 8; /* more fits into just basename than if */ + **pEndFAT = '\0'; /* convert last underscore to dot */ + } else + *pEndFAT = pEnd; /* whole thing fits into 8 chars or less */ + } + + if (last_dot != NULL) { /* one dot (or two, in the case of */ + *last_dot = '.'; /* "..") is OK: put it back in */ + + if ((last_dot - pBegin) > 8) { + char *p, *q; + int i; + + p = last_dot; + q = last_dot = pBegin + 8; + for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ + *q++ = *p++; /* shift .ext left and trun- */ + *q = '\0'; /* cate/terminate it */ + *pEndFAT = q; + } else if ((pEnd - last_dot) > 4) { /* too many chars in extension */ + *pEndFAT = last_dot + 4; + **pEndFAT = '\0'; + } else + *pEndFAT = pEnd; /* filename is fine; point at terminating zero */ + + if ((last_dot - pBegin) > 0 && last_dot[-1] == ' ') + last_dot[-1] = '_'; /* NO blank in front of '.'! */ + } +} /* end function map2fat() */ + + + + +/***********************/ /* Borrowed from os2.c for UnZip 5.1. */ +/* Function checkdir() */ /* Difference: no EA stuff */ +/***********************/ /* HPFS stuff works on NTFS too */ + +int checkdir(__G__ pathcomp, flag) + __GDEF + char *pathcomp; + int flag; +/* + * returns: 1 - (on APPEND_NAME) truncated filename + * 2 - path doesn't exist, not allowed to create + * 3 - path doesn't exist, tried to create and failed; or + * path exists and is not a directory, but is supposed to be + * 4 - path is too long + * 10 - can't allocate memory for filename buffers + */ +{ + /* static int rootlen = 0; */ /* length of rootpath */ + /* static char *rootpath; */ /* user's "extract-to" directory */ + /* static char *buildpathHPFS; */ /* full path (so far) to extracted file, */ + /* static char *buildpathFAT; */ /* both HPFS/EA (main) and FAT versions */ + /* static char *endHPFS; */ /* corresponding pointers to end of */ + /* static char *endFAT; */ /* buildpath ('\0') */ + +# define FN_MASK 7 +# define FUNCTION (flag & FN_MASK) + + + +/*--------------------------------------------------------------------------- + APPEND_DIR: append the path component to the path being built and check + for its existence. If doesn't exist and we are creating directories, do + so for this one; else signal success or error as appropriate. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_DIR) { + char *p = pathcomp; + int too_long=FALSE; + + Trace((stderr, "appending dir segment [%s]\n", pathcomp)); + while ((*G.endHPFS = *p++) != '\0') /* copy to HPFS filename */ + ++G.endHPFS; + if (!IsVolumeOldFAT(__G__ G.buildpathHPFS)) { + p = pathcomp; + while ((*G.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.endFAT; + } else + map2fat(pathcomp, &G.endFAT); /* map into FAT fn, update endFAT */ + + /* GRR: could do better check, see if overrunning buffer as we go: + * check endHPFS-buildpathHPFS after each append, set warning variable + * if within 20 of FILNAMSIZ; then if var set, do careful check when + * appending. Clear variable when begin new path. */ + + /* next check: need to append '/', at least one-char name, '\0' */ + if ((G.endHPFS-G.buildpathHPFS) > FILNAMSIZ-3) + too_long = TRUE; /* check if extracting dir? */ +#ifdef FIX_STAT_BUG + /* Borland C++ 5.0 does not handle a call to stat() well if the + * directory does not exist (it tends to crash in strange places.) + * This is apparently a problem only when compiling for GUI rather + * than console. The code below attempts to work around this problem. + */ + if (access(G.buildpathFAT, 0) != 0) { + if (!G.create_dirs) { /* told not to create (freshening) */ + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", + FnFilter1(G.buildpathHPFS))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + if (MKDIR(G.buildpathFAT, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, + "checkdir error: cannot create %s\n\ + unable to process %s.\n", + FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 3; /* path didn't exist, tried to create, failed */ + } + G.created_dir = TRUE; + } +#endif /* FIX_STAT_BUG */ + if (SSTAT(G.buildpathFAT, &G.statbuf)) /* path doesn't exist */ + { + if (!G.create_dirs) { /* told not to create (freshening) */ + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", + FnFilter1(G.buildpathHPFS))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + if (MKDIR(G.buildpathFAT, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, + "checkdir error: cannot create %s\n\ + unable to process %s.\n", + FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 3; /* path didn't exist, tried to create, failed */ + } + G.created_dir = TRUE; + } else if (!S_ISDIR(G.statbuf.st_mode)) { + Info(slide, 1, ((char *)slide, + "checkdir error: %s exists but is not directory\n \ + unable to process %s.\n", + FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 3; /* path existed but wasn't dir */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", + FnFilter1(G.buildpathHPFS))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + *G.endHPFS++ = '/'; + *G.endFAT++ = '/'; + *G.endHPFS = *G.endFAT = '\0'; + Trace((stderr, "buildpathHPFS now = [%s]\nbuildpathFAT now = [%s]\n", + FnFilter1(G.buildpathHPFS), FnFilter2(G.buildpathFAT))); + return 0; + + } /* end if (FUNCTION == APPEND_DIR) */ + +/*--------------------------------------------------------------------------- + GETPATH: copy full FAT path to the string pointed at by pathcomp (want + filename to reflect name used on disk, not EAs; if full path is HPFS, + buildpathFAT and buildpathHPFS will be identical). Also free both paths. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == GETPATH) { + Trace((stderr, "getting and freeing FAT path [%s]\n", + FnFilter1(G.buildpathFAT))); + Trace((stderr, "freeing HPFS path [%s]\n", + FnFilter1(G.buildpathHPFS))); + strcpy(pathcomp, G.buildpathFAT); + free(G.buildpathFAT); + free(G.buildpathHPFS); + G.buildpathHPFS = G.buildpathFAT = G.endHPFS = G.endFAT = NULL; + return 0; + } + +/*--------------------------------------------------------------------------- + APPEND_NAME: assume the path component is the filename; append it and + return without checking for existence. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_NAME) { + char *p = pathcomp; + int error = 0; + + Trace((stderr, "appending filename [%s]\n", FnFilter1(pathcomp))); + while ((*G.endHPFS = *p++) != '\0') { /* copy to HPFS filename */ + ++G.endHPFS; + if ((G.endHPFS-G.buildpathHPFS) >= FILNAMSIZ) { + *--G.endHPFS = '\0'; + Info(slide, 1, ((char *)slide, + "checkdir warning: path too long; truncating\n \ + %s\n -> %s\n", + FnFilter1(G.filename), FnFilter2(G.buildpathHPFS))); + error = 1; /* filename truncated */ + } + } + + if ( G.pInfo->vollabel || !IsVolumeOldFAT(__G__ G.buildpathHPFS)) { + p = pathcomp; + while ((*G.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.endFAT; + } else + map2fat(pathcomp, &G.endFAT); /* map into FAT fn, update endFAT */ + Trace((stderr, "buildpathHPFS: %s\nbuildpathFAT: %s\n", + FnFilter1(G.buildpathHPFS), FnFilter2(G.buildpathFAT))); + + return error; /* could check for existence, prompt for new name... */ + + } /* end if (FUNCTION == APPEND_NAME) */ + +/*--------------------------------------------------------------------------- + INIT: allocate and initialize buffer space for the file currently being + extracted. If file was renamed with an absolute path, don't prepend the + extract-to path. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == INIT) { + Trace((stderr, "initializing buildpathHPFS and buildpathFAT to ")); + if ((G.buildpathHPFS = (char *)malloc(G.fnlen+G.rootlen+1)) == NULL) + return 10; + if ((G.buildpathFAT = (char *)malloc(G.fnlen+G.rootlen+1)) == NULL) { + free(G.buildpathHPFS); + return 10; + } + if (G.pInfo->vollabel) { /* use root or renamed path, but don't store */ +/* GRR: for network drives, do strchr() and return IZ_VOL_LABEL if not [1] */ + if (G.renamed_fullpath && pathcomp[1] == ':') + *G.buildpathHPFS = (char)ToLower(*pathcomp); + else if (!G.renamed_fullpath && G.rootlen > 1 && + G.rootpath[1] == ':') + *G.buildpathHPFS = (char)ToLower(*G.rootpath); + else { + char tmpN[MAX_PATH], *tmpP; + if (GetFullPathName(".", MAX_PATH, tmpN, &tmpP) > MAX_PATH) + { /* by definition of MAX_PATH we should never get here */ + Info(slide, 1, ((char *)slide, + "checkdir warning: current dir path too long\n")); + return 1; /* can't get drive letter */ + } + G.nLabelDrive = *tmpN - 'a' + 1; + *G.buildpathHPFS = (char)(G.nLabelDrive - 1 + 'a'); + } + G.nLabelDrive = *G.buildpathHPFS - 'a' + 1; /* save for mapname() */ + if (uO.volflag == 0 || *G.buildpathHPFS < 'a' /* no labels/bogus? */ + || (uO.volflag == 1 && !isfloppy(G.nLabelDrive))) { /* !fixed */ + free(G.buildpathHPFS); + free(G.buildpathFAT); + return IZ_VOL_LABEL; /* skipping with message */ + } + *G.buildpathHPFS = '\0'; + } else if (G.renamed_fullpath) /* pathcomp = valid data */ + strcpy(G.buildpathHPFS, pathcomp); + else if (G.rootlen > 0) + strcpy(G.buildpathHPFS, G.rootpath); + else + *G.buildpathHPFS = '\0'; + G.endHPFS = G.buildpathHPFS; + G.endFAT = G.buildpathFAT; + while ((*G.endFAT = *G.endHPFS) != '\0') { + ++G.endFAT; + ++G.endHPFS; + } + Trace((stderr, "[%s]\n", FnFilter1(G.buildpathHPFS))); + return 0; + } + +/*--------------------------------------------------------------------------- + ROOT: if appropriate, store the path in rootpath and create it if neces- + sary; else assume it's a zipfile member and return. This path segment + gets used in extracting all members from every zipfile specified on the + command line. Note that under OS/2 and MS-DOS, if a candidate extract-to + directory specification includes a drive letter (leading "x:"), it is + treated just as if it had a trailing '/'--that is, one directory level + will be created if the path doesn't exist, unless this is otherwise pro- + hibited (e.g., freshening). + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) || defined(SFX_EXDIR)) + if (FUNCTION == ROOT) { + Trace((stderr, "initializing root path to [%s]\n", + FnFilter1(pathcomp))); + if (pathcomp == NULL) { + G.rootlen = 0; + return 0; + } + if ((G.rootlen = strlen(pathcomp)) > 0) { + int had_trailing_pathsep=FALSE, has_drive=FALSE, xtra=2; + + if (isalpha((uch)pathcomp[0]) && pathcomp[1] == ':') + has_drive = TRUE; /* drive designator */ + if (pathcomp[G.rootlen-1] == '/' || pathcomp[G.rootlen-1] == '\\') { + pathcomp[--G.rootlen] = '\0'; + had_trailing_pathsep = TRUE; + } + if (has_drive && (G.rootlen == 2)) { + if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ + xtra = 3; /* room for '.' + '/' + 0 at end of "x:" */ + } else if (G.rootlen > 0) { /* need not check "x:." and "x:/" */ + if (SSTAT(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) + { + /* path does not exist */ + if (!G.create_dirs /* || iswild(pathcomp) */ ) { + G.rootlen = 0; + return 2; /* treat as stored file */ + } + /* create directory (could add loop here to scan pathcomp + * and create more than one level, but really necessary?) */ + if (MKDIR(pathcomp, 0777) == -1) { + Info(slide, 1, ((char *)slide, + "checkdir: cannot create extraction directory: %s\n", + FnFilter1(pathcomp))); + G.rootlen = 0; /* path didn't exist, tried to create, */ + return 3; /* failed: file exists, or need 2+ levels */ + } + } + } + if ((G.rootpath = (char *)malloc(G.rootlen+xtra)) == NULL) { + G.rootlen = 0; + return 10; + } + strcpy(G.rootpath, pathcomp); + if (xtra == 3) /* had just "x:", make "x:." */ + G.rootpath[G.rootlen++] = '.'; + G.rootpath[G.rootlen++] = '/'; + G.rootpath[G.rootlen] = '\0'; + Trace((stderr, "rootpath now = [%s]\n", FnFilter1(G.rootpath))); + } + return 0; + } +#endif /* !SFX || SFX_EXDIR */ + +/*--------------------------------------------------------------------------- + END: free rootpath, immediately prior to program exit. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == END) { + Trace((stderr, "freeing rootpath\n")); + if (G.rootlen > 0) { + free(G.rootpath); + G.rootlen = 0; + } + return 0; + } + + return 99; /* should never reach */ + +} /* end function checkdir() */ + + + + + +#ifndef SFX +#ifndef WINDLL + +/************************/ +/* Function version() */ +/************************/ + +void version(__G) + __GDEF +{ + int len; +#if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DJGPP__)) + char buf[80]; +#if (defined(_MSC_VER) && (_MSC_VER > 900)) + char buf2[80]; +#endif +#endif + + len = sprintf((char *)slide, CompiledWith, + +#if defined(_MSC_VER) /* MSC == VC++, but what about SDK compiler? */ + (sprintf(buf, "Microsoft C %d.%02d ", _MSC_VER/100, _MSC_VER%100), buf), +# if (_MSC_VER == 800) + "(Visual C++ v1.1)", +# elif (_MSC_VER == 850) + "(Windows NT v3.5 SDK)", +# elif (_MSC_VER == 900) + "(Visual C++ v2.x)", +# elif (_MSC_VER > 900) + (sprintf(buf2, "(Visual C++ %d.%d)", _MSC_VER/100 - 6, _MSC_VER%100/10), + buf2), +# else + "(bad version)", +# endif +#elif defined(__WATCOMC__) +# if (__WATCOMC__ % 10 > 0) + (sprintf(buf, "Watcom C/C++ %d.%02d", __WATCOMC__ / 100, + __WATCOMC__ % 100), buf), "", +# else + (sprintf(buf, "Watcom C/C++ %d.%d", __WATCOMC__ / 100, + (__WATCOMC__ % 100) / 10), buf), "", +# endif +#elif defined(__BORLANDC__) + "Borland C++", +# if (__BORLANDC__ < 0x0200) + " 1.0", +# elif (__BORLANDC__ == 0x0200) + " 2.0", +# elif (__BORLANDC__ == 0x0400) + " 3.0", +# elif (__BORLANDC__ == 0x0410) /* __BCPLUSPLUS__ = 0x0310 */ + " 3.1", +# elif (__BORLANDC__ == 0x0452) /* __BCPLUSPLUS__ = 0x0320 */ + " 4.0 or 4.02", +# elif (__BORLANDC__ == 0x0460) /* __BCPLUSPLUS__ = 0x0340 */ + " 4.5", +# elif (__BORLANDC__ == 0x0500) /* __BCPLUSPLUS__ = 0x0340 */ + " 5.0", +# elif (__BORLANDC__ == 0x0520) /* __BCPLUSPLUS__ = 0x0520 */ + " 5.2 (C++ Builder)", /* GRR: assume this will stay sync'd? */ +# else + " later than 5.2", +# endif +#elif defined(__LCC__) + "LCC-Win32", "", +#elif defined(__GNUC__) +# if defined(__RSXNT__) +# if (defined(__DJGPP__) && !defined(__EMX__)) + (sprintf(buf, "rsxnt(djgpp v%d.%02d) / gcc ", + __DJGPP__, __DJGPP_MINOR__), buf), +# elif defined(__DJGPP__) + (sprintf(buf, "rsxnt(emx+djgpp v%d.%02d) / gcc ", + __DJGPP__, __DJGPP_MINOR__), buf), +# elif (defined(__GO32__) && !defined(__EMX__)) + "rsxnt(djgpp v1.x) / gcc ", +# elif defined(__GO32__) + "rsxnt(emx + djgpp v1.x) / gcc ", +# elif defined(__EMX__) + "rsxnt(emx)+gcc ", +# else + "rsxnt(unknown) / gcc ", +# endif +# elif defined(__CYGWIN32__) + "cygnus win32 / gcc ", +# elif defined(__MINGW32__) + "mingw32 / gcc ", +# else + "gcc ", +# endif + __VERSION__, +#else /* !_MSC_VER, !__WATCOMC__, !__BORLANDC__, !__LCC__, !__GNUC__ */ + "unknown compiler (SDK?)", "", +#endif /* ?compilers */ + + "Windows 95 / Windows NT", "\n(32-bit)", + +#ifdef __DATE__ + " on ", __DATE__ +#else + "", "" +#endif + ); + + (*G.message)((zvoid *)&G, slide, (ulg)len, 0); + + return; + +} /* end function version() */ + +#endif /* !WINDLL */ +#endif /* !SFX */ + + + +#ifdef W32_STAT_BANDAID + +/* All currently known variants of WIN32 operating systems (Windows 95/98, + * WinNT 3.x, 4.0, 5.0) have a nasty bug in the OS kernel concerning + * conversions between UTC and local time: In the time conversion functions + * of the Win32 API, the timezone offset (including seasonal daylight saving + * shift) between UTC and local time evaluation is erratically based on the + * current system time. The correct evaluation must determine the offset + * value as it {was/is/will be} for the actual time to be converted. + * + * Some versions of MS C runtime lib's stat() returns utc time-stamps so + * that localtime(timestamp) corresponds to the (potentially false) local + * time shown by the OS' system programs (Explorer, command shell dir, etc.) + * The RSXNT port follows the same strategy, but fails to recognize the + * access-time attribute. + * + * For the NTFS file system (and other filesystems that store time-stamps + * as UTC values), this results in st_mtime (, st_{c|a}time) fields which + * are not stable but vary according to the seasonal change of "daylight + * saving time in effect / not in effect". + * + * Other C runtime libs (CygWin, or the CRT DLLs supplied with Win95/NT + * return the unix-time equivalent of the UTC FILETIME values as got back + * from the Win32 API call. This time, return values from NTFS are correct + * whereas utimes from files on (V)FAT volumes vary according to the DST + * switches. + * + * To achieve timestamp consistency of UTC (UT extra field) values in + * Zip archives, the Info-ZIP programs require work-around code for + * proper time handling in stat() (and other time handling routines). + */ +/* stat() functions under Windows95 tend to fail for root directories. * + * Watcom and Borland, at least, are affected by this bug. Watcom made * + * a partial fix for 11.0 but still missed some cases. This substitute * + * detects the case and fills in reasonable values. Otherwise we get * + * effects like failure to extract to a root dir because it's not found. */ + +int zstat_win32(__W32STAT_GLOBALS__ const char *path, struct stat *buf) +{ + if (!stat(path, buf)) + { +#ifdef NT_TZBUG_WORKAROUND + /* stat was successful, now redo the time-stamp fetches */ + int fs_uses_loctime = FStampIsLocTime(__G__ path); + HANDLE h; + FILETIME Modft, Accft, Creft; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_path = (char *)alloca(strlen(path) + 1); + + INTERN_TO_ISO(path, ansi_path); +# define Ansi_Path ansi_path +#else +# define Ansi_Path path +#endif + + TTrace((stdout, "stat(%s) finds modtime %08lx\n", path, buf->st_mtime)); + h = CreateFile(Ansi_Path, GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (h != INVALID_HANDLE_VALUE) { + BOOL ftOK = GetFileTime(h, &Creft, &Accft, &Modft); + CloseHandle(h); + + if (ftOK) { + FTTrace((stdout, "GetFileTime returned Modft", 0, &Modft)); + FTTrace((stdout, "GetFileTime returned Creft", 0, &Creft)); + if (!fs_uses_loctime) { + /* On a filesystem that stores UTC timestamps, we refill + * the time fields of the struct stat buffer by directly + * using the UTC values as returned by the Win32 + * GetFileTime() API call. + */ + FileTime2utime(&Modft, &(buf->st_mtime)); + if (Accft.dwLowDateTime != 0 || Accft.dwHighDateTime != 0) + FileTime2utime(&Accft, &(buf->st_atime)); + else + buf->st_atime = buf->st_mtime; + if (Creft.dwLowDateTime != 0 || Creft.dwHighDateTime != 0) + FileTime2utime(&Creft, &(buf->st_ctime)); + else + buf->st_ctime = buf->st_mtime; + TTrace((stdout,"NTFS, recalculated modtime %08lx\n", + buf->st_mtime)); + } else { + /* On VFAT and FAT-like filesystems, the FILETIME values + * are converted back to the stable local time before + * converting them to UTC unix time-stamps. + */ + VFatFileTime2utime(&Modft, &(buf->st_mtime)); + if (Accft.dwLowDateTime != 0 || Accft.dwHighDateTime != 0) + VFatFileTime2utime(&Accft, &(buf->st_atime)); + else + buf->st_atime = buf->st_mtime; + if (Creft.dwLowDateTime != 0 || Creft.dwHighDateTime != 0) + VFatFileTime2utime(&Creft, &(buf->st_ctime)); + else + buf->st_ctime = buf->st_mtime; + TTrace((stdout, "VFAT, recalculated modtime %08lx\n", + buf->st_mtime)); + } + } + } +# undef Ansi_Path +#endif /* NT_TZBUG_WORKAROUND */ + return 0; + } +#ifdef W32_STATROOT_FIX + else + { + DWORD flags; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_path = (char *)alloca(strlen(path) + 1); + + INTERN_TO_ISO(path, ansi_path); +# define Ansi_Path ansi_path +#else +# define Ansi_Path path +#endif + + flags = GetFileAttributes(Ansi_Path); + if (flags != 0xFFFFFFFF && flags & FILE_ATTRIBUTE_DIRECTORY) { + Trace((stderr, "\nstat(\"%s\",...) failed on existing directory\n", + path)); + memset(buf, 0, sizeof(struct stat)); + buf->st_atime = buf->st_ctime = buf->st_mtime = + dos_to_unix_time(DOSTIME_MINIMUM); /* 1-1-80 */ + buf->st_mode = S_IFDIR | S_IREAD | + ((flags & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE); + return 0; + } /* assumes: stat() won't fail on non-dirs without good reason */ +# undef Ansi_Path + } +#endif /* W32_STATROOT_FIX */ + return -1; +} + +#endif /* W32_STAT_BANDAID */ + +#endif /* !FUNZIP */ + + + +#ifndef WINDLL +/* This replacement getch() function was originally created for Watcom C + * and then additionally used with CYGWIN. Since UnZip 5.4, all other Win32 + * ports apply this replacement rather that their supplied getch() (or + * alike) function. There are problems with unabsorbed LF characters left + * over in the keyboard buffer under Win95 (and 98) when ENTER was pressed. + * (Under Win95, ENTER returns two(!!) characters: CR-LF.) This problem + * does not appear when run on a WinNT console prompt! + */ + +/* Watcom 10.6's getch() does not handle Alt+. */ +/* Note that if PASSWD_FROM_STDIN is defined, the file containing */ +/* the password must have a carriage return after the word, not a */ +/* Unix-style newline (linefeed only). This discards linefeeds. */ + +int getch_win32(void) +{ + HANDLE stin; + DWORD rc; + unsigned char buf[2]; + int ret = -1; + DWORD odemode = ~(DWORD)0; + +# ifdef PASSWD_FROM_STDIN + stin = GetStdHandle(STD_INPUT_HANDLE); +# else + stin = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + if (stin == INVALID_HANDLE_VALUE) + return -1; +# endif + if (GetConsoleMode(stin, &odemode)) + SetConsoleMode(stin, ENABLE_PROCESSED_INPUT); /* raw except ^C noticed */ + if (ReadFile(stin, &buf, 1, &rc, NULL) && rc == 1) + ret = buf[0]; + /* when the user hits return we get CR LF. We discard the LF, not the CR, + * because when we call this for the first time after a previous input + * such as the one for "replace foo? [y]es, ..." the LF may still be in + * the input stream before whatever the user types at our prompt. */ + if (ret == '\n') + if (ReadFile(stin, &buf, 1, &rc, NULL) && rc == 1) + ret = buf[0]; + if (odemode != ~(DWORD)0) + SetConsoleMode(stin, odemode); +# ifndef PASSWD_FROM_STDIN + CloseHandle(stin); +# endif + return ret; +} +#endif /* !WINDLL */ diff --git a/utils/Install/packzip/zipinfo.c b/utils/Install/packzip/zipinfo.c new file mode 100644 index 0000000000..c244c1e92f --- /dev/null +++ b/utils/Install/packzip/zipinfo.c @@ -0,0 +1,1912 @@ +/*--------------------------------------------------------------------------- + + zipinfo.c Greg Roelofs et al. + + This file contains all of the ZipInfo-specific listing routines for UnZip. + + Contains: zi_opts() + zi_end_central() + zipinfo() + zi_long() + zi_short() + zi_time() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" + + +#ifndef NO_ZIPINFO /* strings use up too much space in small-memory systems */ + +/* Define OS-specific attributes for use on ALL platforms--the S_xxxx + * versions of these are defined differently (or not defined) by different + * compilers and operating systems. */ + +#define UNX_IFMT 0170000 /* Unix file type mask */ +#define UNX_IFDIR 0040000 /* Unix directory */ +#define UNX_IFREG 0100000 /* Unix regular file */ +#define UNX_IFSOCK 0140000 /* Unix socket (BSD, not SysV or Amiga) */ +#define UNX_IFLNK 0120000 /* Unix symbolic link (not SysV, Amiga) */ +#define UNX_IFBLK 0060000 /* Unix block special (not Amiga) */ +#define UNX_IFCHR 0020000 /* Unix character special (not Amiga) */ +#define UNX_IFIFO 0010000 /* Unix fifo (BCC, not MSC or Amiga) */ +#define UNX_ISUID 04000 /* Unix set user id on execution */ +#define UNX_ISGID 02000 /* Unix set group id on execution */ +#define UNX_ISVTX 01000 /* Unix directory permissions control */ +#define UNX_ENFMT UNX_ISGID /* Unix record locking enforcement flag */ +#define UNX_IRWXU 00700 /* Unix read, write, execute: owner */ +#define UNX_IRUSR 00400 /* Unix read permission: owner */ +#define UNX_IWUSR 00200 /* Unix write permission: owner */ +#define UNX_IXUSR 00100 /* Unix execute permission: owner */ +#define UNX_IRWXG 00070 /* Unix read, write, execute: group */ +#define UNX_IRGRP 00040 /* Unix read permission: group */ +#define UNX_IWGRP 00020 /* Unix write permission: group */ +#define UNX_IXGRP 00010 /* Unix execute permission: group */ +#define UNX_IRWXO 00007 /* Unix read, write, execute: other */ +#define UNX_IROTH 00004 /* Unix read permission: other */ +#define UNX_IWOTH 00002 /* Unix write permission: other */ +#define UNX_IXOTH 00001 /* Unix execute permission: other */ + +#define VMS_IRUSR UNX_IRUSR /* VMS read/owner */ +#define VMS_IWUSR UNX_IWUSR /* VMS write/owner */ +#define VMS_IXUSR UNX_IXUSR /* VMS execute/owner */ +#define VMS_IRGRP UNX_IRGRP /* VMS read/group */ +#define VMS_IWGRP UNX_IWGRP /* VMS write/group */ +#define VMS_IXGRP UNX_IXGRP /* VMS execute/group */ +#define VMS_IROTH UNX_IROTH /* VMS read/other */ +#define VMS_IWOTH UNX_IWOTH /* VMS write/other */ +#define VMS_IXOTH UNX_IXOTH /* VMS execute/other */ + +#define AMI_IFMT 06000 /* Amiga file type mask */ +#define AMI_IFDIR 04000 /* Amiga directory */ +#define AMI_IFREG 02000 /* Amiga regular file */ +#define AMI_IHIDDEN 00200 /* to be supported in AmigaDOS 3.x */ +#define AMI_ISCRIPT 00100 /* executable script (text command file) */ +#define AMI_IPURE 00040 /* allow loading into resident memory */ +#define AMI_IARCHIVE 00020 /* not modified since bit was last set */ +#define AMI_IREAD 00010 /* can be opened for reading */ +#define AMI_IWRITE 00004 /* can be opened for writing */ +#define AMI_IEXECUTE 00002 /* executable image, a loadable runfile */ +#define AMI_IDELETE 00001 /* can be deleted */ + +#define LFLAG 3 /* short "ls -l" type listing */ + +static int zi_long OF((__GPRO__ ulg *pEndprev)); +static int zi_short OF((__GPRO)); +static void zi_showMacTypeCreator + OF((__GPRO__ uch *ebfield)); +static char *zi_time OF((__GPRO__ ZCONST ulg *datetimez, + ZCONST time_t *modtimez, char *d_t_str)); + + +/**********************************************/ +/* Strings used in zipinfo.c (ZipInfo half) */ +/**********************************************/ + +static char nullStr[] = ""; + +static ZCONST char Far LongHeader[] = "Archive: %s %ld bytes %d file%s\n"; +static ZCONST char Far ShortHeader[] = "Archive: %s %ld %d\n"; +static ZCONST char Far EndCentDirRec[] = "\nEnd-of-central-directory record:\n"; +static ZCONST char Far LineSeparators[] = "-------------------------------\n\n"; +static ZCONST char Far ActOffsetCentDir[] = "\ + Actual offset of end-of-central-dir record: %9ld (%.8lXh)\n\ + Expected offset of end-of-central-dir record: %9ld (%.8lXh)\n\ + (based on the length of the central directory and its expected offset)\n\n"; +static ZCONST char Far SinglePartArchive1[] = "\ + This zipfile constitutes the sole disk of a single-part archive; its\n\ + central directory contains %u %s. The central directory is %lu\n\ + (%.8lXh) bytes long, and its (expected) offset in bytes from the\n"; +static ZCONST char Far SinglePartArchive2[] = "\ + beginning of the zipfile is %lu (%.8lXh).\n\n"; +static ZCONST char Far MultiPartArchive1[] = "\ + This zipfile constitutes disk %u of a multi-part archive. The central\n\ + directory starts on disk %u; %u of its entries %s contained within\n"; +static ZCONST char Far MultiPartArchive2[] = "\ + this zipfile, out of a total of %u %s. The entire central\n\ + directory is %lu (%.8lXh) bytes long, and its offset in bytes from\n"; +static ZCONST char Far MultiPartArchive3[] = "\ + the beginning of the zipfile in which it begins is %lu (%.8lXh).\n\n"; +static ZCONST char Far NoZipfileComment[] = " There is no zipfile comment.\n"; +static ZCONST char Far ZipfileCommentDesc[] = + " The zipfile comment is %u bytes long and contains the following text:\n\n"; +static ZCONST char Far ZipfileCommBegin[] = + "======================== zipfile comment begins ==========================\n"; +static ZCONST char Far ZipfileCommEnd[] = + "========================= zipfile comment ends ===========================\n"; +static ZCONST char Far ZipfileCommTrunc2[] = "\n The zipfile comment is truncated.\n"; +static ZCONST char Far ZipfileCommTruncMsg[] = + "\ncaution: zipfile comment truncated\n"; + +static ZCONST char Far CentralDirEntry[] = + "\nCentral directory entry #%d:\n---------------------------\n\n"; +static ZCONST char Far ZipfileStats[] = + "%d file%s, %lu bytes uncompressed, %lu bytes compressed: %s%d.%d%%\n"; + +/* zi_long() strings */ +static ZCONST char Far OS_FAT[] = "MS-DOS, OS/2 or NT FAT"; +static ZCONST char Far OS_Amiga[] = "Amiga"; +static ZCONST char Far OS_VMS[] = "VMS"; +static ZCONST char Far OS_Unix[] = "Unix"; +static ZCONST char Far OS_VMCMS[] = "VM/CMS"; +static ZCONST char Far OS_AtariST[] = "Atari ST"; +static ZCONST char Far OS_HPFS[] = "OS/2 or NT HPFS"; +static ZCONST char Far OS_Macintosh[] = "Macintosh HFS"; +static ZCONST char Far OS_ZSystem[] = "Z-System"; +static ZCONST char Far OS_CPM[] = "CP/M"; +static ZCONST char Far OS_TOPS20[] = "TOPS-20"; +static ZCONST char Far OS_NTFS[] = "NTFS"; +static ZCONST char Far OS_QDOS[] = "SMS/QDOS"; +static ZCONST char Far OS_Acorn[] = "Acorn RISC OS"; +static ZCONST char Far OS_MVS[] = "MVS"; +static ZCONST char Far OS_VFAT[] = "Win32 VFAT"; +static ZCONST char Far OS_BeOS[] = "BeOS"; +static ZCONST char Far OS_Tandem[] = "Tandem NSK"; + +static ZCONST char Far MthdNone[] = "none (stored)"; +static ZCONST char Far MthdShrunk[] = "shrunk"; +static ZCONST char Far MthdRedF1[] = "reduced (factor 1)"; +static ZCONST char Far MthdRedF2[] = "reduced (factor 2)"; +static ZCONST char Far MthdRedF3[] = "reduced (factor 3)"; +static ZCONST char Far MthdRedF4[] = "reduced (factor 4)"; +static ZCONST char Far MthdImplode[] = "imploded"; +static ZCONST char Far MthdToken[] = "tokenized"; +static ZCONST char Far MthdDeflate[] = "deflated"; +static ZCONST char Far MthdEnDeflate[] = "deflated (enhanced)"; +static ZCONST char Far MthdDCLImplode[] = "imploded (PK DCL)"; + +static ZCONST char Far DeflNorm[] = "normal"; +static ZCONST char Far DeflMax[] = "maximum"; +static ZCONST char Far DeflFast[] = "fast"; +static ZCONST char Far DeflSFast[] = "superfast"; + +static ZCONST char Far ExtraBytesPreceding[] = + " There are an extra %ld bytes preceding this file.\n\n"; + +static ZCONST char Far UnknownNo[] = "unknown (%d)"; + +static ZCONST char Far LocalHeaderOffset[] = + "\n offset of local header from start of archive: %lu (%.8lXh) bytes\n"; +static ZCONST char Far HostOS[] = + " file system or operating system of origin: %s\n"; +static ZCONST char Far EncodeSWVer[] = + " version of encoding software: %d.%d\n"; +static ZCONST char Far MinOSCompReq[] = + " minimum file system compatibility required: %s\n"; +static ZCONST char Far MinSWVerReq[] = + " minimum software version required to extract: %d.%d\n"; +static ZCONST char Far CompressMethod[] = + " compression method: %s\n"; +static ZCONST char Far SlideWindowSizeImplode[] = + " size of sliding dictionary (implosion): %cK\n"; +static ZCONST char Far ShannonFanoTrees[] = + " number of Shannon-Fano trees (implosion): %c\n"; +static ZCONST char Far CompressSubtype[] = + " compression sub-type (deflation): %s\n"; +static ZCONST char Far FileSecurity[] = + " file security status: %sencrypted\n"; +static ZCONST char Far ExtendedLocalHdr[] = + " extended local header: %s\n"; +static ZCONST char Far FileModDate[] = + " file last modified on (DOS date/time): %s\n"; +#ifdef USE_EF_UT_TIME + static ZCONST char Far UT_FileModDate[] = + " file last modified on (UT extra field modtime): %s %s\n"; + static ZCONST char Far LocalTime[] = "local"; +#ifndef NO_GMTIME + static ZCONST char Far GMTime[] = "UTC"; +#endif +#endif /* USE_EF_UT_TIME */ +static ZCONST char Far CRC32Value[] = + " 32-bit CRC value (hex): %.8lx\n"; +static ZCONST char Far CompressedFileSize[] = + " compressed size: %lu bytes\n"; +static ZCONST char Far UncompressedFileSize[] = + " uncompressed size: %lu bytes\n"; +static ZCONST char Far FilenameLength[] = + " length of filename: %u characters\n"; +static ZCONST char Far ExtraFieldLength[] = + " length of extra field: %u bytes\n"; +static ZCONST char Far FileCommentLength[] = + " length of file comment: %u characters\n"; +static ZCONST char Far FileDiskNum[] = + " disk number on which file begins: disk %u\n"; +static ZCONST char Far ApparentFileType[] = + " apparent file type: %s\n"; +static ZCONST char Far VMSFileAttributes[] = + " VMS file attributes (%06o octal): %s\n"; +static ZCONST char Far AmigaFileAttributes[] = + " Amiga file attributes (%06o octal): %s\n"; +static ZCONST char Far UnixFileAttributes[] = + " Unix file attributes (%06o octal): %s\n"; +static ZCONST char Far NonMSDOSFileAttributes[] = + " non-MSDOS external file attributes: %06lX hex\n"; +static ZCONST char Far MSDOSFileAttributes[] = + " MS-DOS file attributes (%02X hex): none\n"; +static ZCONST char Far MSDOSFileAttributesRO[] = + " MS-DOS file attributes (%02X hex): read-only\n"; +static ZCONST char Far MSDOSFileAttributesAlpha[] = + " MS-DOS file attributes (%02X hex): %s%s%s%s%s%s\n"; + + +static ZCONST char Far ExtraFieldTrunc[] = "\n\ + error: EF data block (type 0x%04x) size %u exceeds remaining extra field\n\ + space %u; block length has been truncated.\n"; +static ZCONST char Far ExtraFields[] = "\n\ + The central-directory extra field contains:"; +static ZCONST char Far ExtraFieldType[] = "\n\ + - A subfield with ID 0x%04x (%s) and %u data bytes"; +static ZCONST char Far efAV[] = "PKWARE AV"; +static ZCONST char Far efOS2[] = "OS/2"; +static ZCONST char Far efPKVMS[] = "PKWARE VMS"; +static ZCONST char Far efPKWin32[] = "PKWARE Win32"; +static ZCONST char Far efPKUnix[] = "PKWARE Unix"; +static ZCONST char Far efIZVMS[] = "Info-ZIP VMS"; +static ZCONST char Far efIZUnix[] = "old Info-ZIP Unix/OS2/NT"; +static ZCONST char Far efIZUnix2[] = "Unix UID/GID"; +static ZCONST char Far efTime[] = "universal time"; +static ZCONST char Far efJLMac[] = "old Info-ZIP Macintosh"; +static ZCONST char Far efMac3[] = "new Info-ZIP Macintosh"; +static ZCONST char Far efZipIt[] = "ZipIt Macintosh"; +static ZCONST char Far efZipIt2[] = "ZipIt Macintosh (short)"; +static ZCONST char Far efVMCMS[] = "VM/CMS"; +static ZCONST char Far efMVS[] = "MVS"; +static ZCONST char Far efACL[] = "OS/2 ACL"; +static ZCONST char Far efNTSD[] = "Security Descriptor"; +static ZCONST char Far efBeOS[] = "BeOS"; +static ZCONST char Far efQDOS[] = "SMS/QDOS"; +static ZCONST char Far efAOSVS[] = "AOS/VS"; +static ZCONST char Far efSpark[] = "Acorn SparkFS"; +static ZCONST char Far efMD5[] = "Fred Kantor MD5"; +static ZCONST char Far efASiUnix[] = "ASi Unix"; +static ZCONST char Far efUnknown[] = "unknown"; + +static ZCONST char Far OS2EAs[] = ".\n\ + The local extra field has %lu bytes of OS/2 extended attributes.\n\ + (May not match OS/2 \"dir\" amount due to storage method)"; +static ZCONST char Far izVMSdata[] = ". The extra\n\ + field is %s and has %lu bytes of VMS %s information%s"; +static ZCONST char Far izVMSstored[] = "stored"; +static ZCONST char Far izVMSrleenc[] = "run-length encoded"; +static ZCONST char Far izVMSdeflat[] = "deflated"; +static ZCONST char Far izVMScunknw[] = "compressed(?)"; +static ZCONST char Far *izVMScomp[4] = + {izVMSstored, izVMSrleenc, izVMSdeflat, izVMScunknw}; +static ZCONST char Far ACLdata[] = ".\n\ + The local extra field has %lu bytes of access control list information"; +static ZCONST char Far NTSDData[] = ".\n\ + The local extra field has %lu bytes of NT security descriptor data"; +static ZCONST char Far UTdata[] = ".\n\ + The local extra field has UTC/GMT %s time%s"; +static ZCONST char Far UTmodification[] = "modification"; +static ZCONST char Far UTaccess[] = "access"; +static ZCONST char Far UTcreation[] = "creation"; +static ZCONST char Far ZipItFname[] = ".\n\ + The Mac long filename is %s.\n"; +static ZCONST char Far Mac3data[] = ".\n\ + The local extra field has %lu bytes of %scompressed Macintosh\n\ + finder attributes"; + /* MacOSdata[] is used by EF_MAC3, EF_ZIPIT, EF_ZIPIT2 and EF_JLEE e. f. */ +static ZCONST char Far MacOSdata[] = ".\n\ + The associated file has type code `%c%c%c%c' and creator code `%c%c%c%c'"; +static ZCONST char Far MacOSdata1[] = ".\n\ + The associated file has type code `0x%lx' and creator code `0x%lx'"; +static ZCONST char Far MacOSJLEEflags[] = "\n File is marked as %s"; +static ZCONST char Far MacOS_RF[] = "Resource-fork"; +static ZCONST char Far MacOS_DF[] = "Data-fork"; +static ZCONST char Far MacOSMAC3flags[] = ".\n\ + File is marked as %s, File Dates are in %d Bit"; +static ZCONST char Far BeOSdata[] = ".\n\ + The local extra field has %lu bytes of %scompressed BeOS file attributes"; + /* The associated file has type code `%c%c%c%c' and creator code `%c%c%c%c'" */ +static ZCONST char Far QDOSdata[] = ".\n\ + The QDOS extra field subtype is `%c%c%c%c'"; +static ZCONST char Far AOSVSdata[] = ".\n\ + The AOS/VS extra field revision is %d.%d"; +static ZCONST char Far MD5data[] = ".\n\ + The 128-bit MD5 signature is %s"; +#ifdef CMS_MVS + static ZCONST char Far VmMvsExtraField[] = ".\n\ + The stored file open mode (FLDATA TYPE) is \"%s\""; + static ZCONST char Far VmMvsInvalid[] = "[invalid]"; +#endif /* CMS_MVS */ + +static ZCONST char Far First20[] = ". The first\n 20 are: "; +static ZCONST char Far ColonIndent[] = ":\n "; +static ZCONST char Far efFormat[] = " %02x"; + +static ZCONST char Far lExtraFieldType[] = "\n\ + There %s a local extra field with ID 0x%04x (%s) and\n\ + %u data bytes (%s).\n"; +static ZCONST char Far efIZuid[] = + "GMT modification/access times and Unix UID/GID"; +static ZCONST char Far efIZnouid[] = "GMT modification/access times only"; + + +static ZCONST char Far NoFileComment[] = "\n There is no file comment.\n"; +static ZCONST char Far FileCommBegin[] = "\n\ +------------------------- file comment begins ----------------------------\n"; +static ZCONST char Far FileCommEnd[] = "\ +-------------------------- file comment ends -----------------------------\n"; + +/* zi_time() strings */ +static ZCONST char Far BogusFmt[] = "%03d"; +static ZCONST char Far DMYHMTime[] = "%2u-%s-%02u %02u:%02u"; +static ZCONST char Far YMDHMSTime[] = "%u %s %u %02u:%02u:%02u"; +static ZCONST char Far DecimalTime[] = "%04u%02u%02u.%02u%02u%02u"; +static ZCONST char Far YMDHMSTimeError[] = "???? ??? ?? ??:??:??"; + + + + + +#ifndef WINDLL + +/************************/ +/* Function zi_opts() */ +/************************/ + +int zi_opts(__G__ pargc, pargv) + int *pargc; + char ***pargv; + __GDEF +{ + char **argv, *s; + int argc, c, error=FALSE, negative=0; + int hflag_slmv=TRUE, hflag_2=FALSE; /* diff options => diff defaults */ + int tflag_slm=TRUE, tflag_2v=FALSE; + int explicit_h=FALSE, explicit_t=FALSE; + + +#ifdef MACOS + uO.lflag = LFLAG; /* reset default on each call */ +#endif + G.extract_flag = FALSE; /* zipinfo does not extract to disk */ + argc = *pargc; + argv = *pargv; + + while (--argc > 0 && (*++argv)[0] == '-') { + s = argv[0] + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ + switch (c) { + case '-': + ++negative; + break; + case '1': /* shortest listing: JUST filenames */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 1; + break; + case '2': /* just filenames, plus headers if specified */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 2; + break; +#ifndef CMS_MVS + case ('C'): /* -C: match filenames case-insensitively */ + if (negative) + uO.C_flag = FALSE, negative = 0; + else + uO.C_flag = TRUE; + break; +#endif /* !CMS_MVS */ + case 'h': /* header line */ + if (negative) + hflag_2 = hflag_slmv = FALSE, negative = 0; + else { + hflag_2 = hflag_slmv = explicit_h = TRUE; + if (uO.lflag == -1) + uO.lflag = 0; + } + break; + case 'l': /* longer form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 5; + break; + case 'm': /* medium form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 4; + break; +#ifdef MORE + case 'M': /* send output through built-in "more" */ + if (negative) + G.M_flag = FALSE, negative = 0; + else + G.M_flag = TRUE; + break; +#endif + case 's': /* default: shorter "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 3; + break; + case 't': /* totals line */ + if (negative) + tflag_2v = tflag_slm = FALSE, negative = 0; + else { + tflag_2v = tflag_slm = explicit_t = TRUE; + if (uO.lflag == -1) + uO.lflag = 0; + } + break; + case ('T'): /* use (sortable) decimal time format */ + if (negative) + uO.T_flag = FALSE, negative = 0; + else + uO.T_flag = TRUE; + break; + case 'v': /* turbo-verbose listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 10; + break; + case 'z': /* print zipfile comment */ + if (negative) + uO.zflag = negative = 0; + else + uO.zflag = 1; + break; + case 'Z': /* ZipInfo mode: ignore */ + break; + default: + error = TRUE; + break; + } + } + } + if ((argc-- == 0) || error) { + *pargc = argc; + *pargv = argv; + return USAGE(error); + } + +#ifdef MORE + if (G.M_flag && !isatty(1)) /* stdout redirected: "more" func useless */ + G.M_flag = 0; +#endif + + /* if no listing options given (or all negated), or if only -h/-t given + * with individual files specified, use default listing format */ + if ((uO.lflag < 0) || ((argc > 0) && (uO.lflag == 0))) + uO.lflag = LFLAG; + + /* set header and totals flags to default or specified values */ + switch (uO.lflag) { + case 0: /* 0: can only occur if either -t or -h explicitly given; */ + case 2: /* therefore set both flags equal to normally false value */ + uO.hflag = hflag_2; + uO.tflag = tflag_2v; + break; + case 1: /* only filenames, *always* */ + uO.hflag = FALSE; + uO.tflag = FALSE; + uO.zflag = FALSE; + break; + case 3: + case 4: + case 5: + uO.hflag = ((argc > 0) && !explicit_h)? FALSE : hflag_slmv; + uO.tflag = ((argc > 0) && !explicit_t)? FALSE : tflag_slm; + break; + case 10: + uO.hflag = hflag_slmv; + uO.tflag = tflag_2v; + break; + } + + *pargc = argc; + *pargv = argv; + return 0; + +} /* end function zi_opts() */ + +#endif /* !WINDLL */ + + + + + +/*******************************/ +/* Function zi_end_central() */ +/*******************************/ + +int zi_end_central(__G) /* return PK-type error code */ + __GDEF +{ + int error = PK_COOL; + + +/*--------------------------------------------------------------------------- + Print out various interesting things about the zipfile. + ---------------------------------------------------------------------------*/ + + /* header fits on one line, for anything up to 10GB and 10000 files: */ + if (uO.hflag) + Info(slide, 0, ((char *)slide, ((int)strlen(G.zipfn) < 39)? + LoadFarString(LongHeader) : LoadFarString(ShortHeader), G.zipfn, + (long)G.ziplen, G.ecrec.total_entries_central_dir, + (G.ecrec.total_entries_central_dir==1)? + nullStr : "s")); + + /* verbose format */ + if (uO.lflag > 9) { + Info(slide, 0, ((char *)slide, LoadFarString(EndCentDirRec))); + Info(slide, 0, ((char *)slide, LoadFarString(LineSeparators))); + + Info(slide, 0, ((char *)slide, LoadFarString(ActOffsetCentDir), + (long)G.real_ecrec_offset, (long)G.real_ecrec_offset, + (long)G.expect_ecrec_offset, (long)G.expect_ecrec_offset)); + + if (G.ecrec.number_this_disk == 0) { + Info(slide, 0, ((char *)slide, LoadFarString(SinglePartArchive1), + G.ecrec.total_entries_central_dir, + (G.ecrec.total_entries_central_dir == 1)? "entry" : "entries", + G.ecrec.size_central_directory, + G.ecrec.size_central_directory)); + Info(slide, 0, ((char *)slide, LoadFarString(SinglePartArchive2), + G.ecrec.offset_start_central_directory, + G.ecrec.offset_start_central_directory)); + } else { + Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive1), + G.ecrec.number_this_disk + 1, + G.ecrec.num_disk_start_cdir + 1, + G.ecrec.num_entries_centrl_dir_ths_disk, + (G.ecrec.num_entries_centrl_dir_ths_disk == 1)? "is" : "are")); + Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive2), + G.ecrec.total_entries_central_dir, + (G.ecrec.total_entries_central_dir == 1) ? "entry" : "entries", + G.ecrec.size_central_directory, + G.ecrec.size_central_directory)); + Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive3), + G.ecrec.offset_start_central_directory, + G.ecrec.offset_start_central_directory)); + } + + /*----------------------------------------------------------------------- + Get the zipfile comment, if any, and print it out. (Comment may be + up to 64KB long. May the fleas of a thousand camels infest the arm- + pits of anyone who actually takes advantage of this fact.) + -----------------------------------------------------------------------*/ + + if (!G.ecrec.zipfile_comment_length) + Info(slide, 0, ((char *)slide, LoadFarString(NoZipfileComment))); + else { + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommentDesc), + G.ecrec.zipfile_comment_length)); + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommBegin))); + if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) + error = PK_WARN; + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommEnd))); + if (error) + Info(slide, 0, ((char *)slide, + LoadFarString(ZipfileCommTrunc2))); + } /* endif (comment exists) */ + + /* non-verbose mode: print zipfile comment only if requested */ + } else if (uO.zflag && G.ecrec.zipfile_comment_length) { + if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ZipfileCommTruncMsg))); + error = PK_WARN; + } + } /* endif (verbose) */ + + return error; + +} /* end function zi_end_central() */ + + + + + +/************************/ +/* Function zipinfo() */ +/************************/ + +int zipinfo(__G) /* return PK-type error code */ + __GDEF +{ + int do_this_file=FALSE, error, error_in_archive=PK_COOL; + int *fn_matched=NULL, *xn_matched=NULL; + unsigned j, members=0; + ulg tot_csize=0L, tot_ucsize=0L; + ulg endprev; /* buffers end of previous entry for zi_long()'s check + * of extra bytes */ + + +/*--------------------------------------------------------------------------- + Malloc space for check on unmatched filespecs (no big deal if one or both + are NULL). + ---------------------------------------------------------------------------*/ + + if (G.filespecs > 0 && + (fn_matched=(int *)malloc(G.filespecs*sizeof(int))) != NULL) + for (j = 0; j < G.filespecs; ++j) + fn_matched[j] = FALSE; + + if (G.xfilespecs > 0 && + (xn_matched=(int *)malloc(G.xfilespecs*sizeof(int))) != NULL) + for (j = 0; j < G.xfilespecs; ++j) + xn_matched[j] = FALSE; + +/*--------------------------------------------------------------------------- + Set file pointer to start of central directory, then loop through cen- + tral directory entries. Check that directory-entry signature bytes are + actually there (just a precaution), then process the entry. We know + the entire central directory is on this disk: we wouldn't have any of + this information unless the end-of-central-directory record was on this + disk, and we wouldn't have gotten to this routine unless this is also + the disk on which the central directory starts. In practice, this had + better be the *only* disk in the archive, but maybe someday we'll add + multi-disk support. + ---------------------------------------------------------------------------*/ + + uO.L_flag = FALSE; /* zipinfo mode: never convert name to lowercase */ + G.pInfo = G.info; /* (re-)initialize, (just to make sure) */ + G.pInfo->textmode = 0; /* so one can read on screen (is this ever used?) */ + + /* reset endprev for new zipfile; account for multi-part archives (?) */ + endprev = (G.crec.relative_offset_local_header == 4L)? 4L : 0L; + + + for (j = 0; j++ < (unsigned)G.ecrec.total_entries_central_dir;) { + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); + return PK_BADERR; /* sig not found */ + } + /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag, ...: */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) + return error; /* only PK_EOF defined */ + + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != + PK_COOL) + { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + + if (!G.process_all_files) { /* check if specified on command line */ + unsigned i; + + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; + if (fn_matched) + fn_matched[i] = TRUE; + break; /* found match, so stop looping */ + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case in match */ + if (xn_matched) + xn_matched[i] = TRUE; + break; + } + } + } + + /*----------------------------------------------------------------------- + If current file was specified on command line, or if no names were + specified, do the listing for this file. Otherwise, get rid of the + file comment and go back for the next file. + -----------------------------------------------------------------------*/ + + if (G.process_all_files || do_this_file) { + + switch (uO.lflag) { + case 1: + case 2: + fnprint(__G); + SKIP_(G.crec.extra_field_length) + SKIP_(G.crec.file_comment_length) + break; + + case 3: + case 4: + case 5: + if ((error = zi_short(__G)) != PK_COOL) { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + break; + + case 10: + Info(slide, 0, ((char *)slide, + LoadFarString(CentralDirEntry), j)); + if ((error = zi_long(__G__ &endprev)) != PK_COOL) { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + break; + + default: + SKIP_(G.crec.extra_field_length) + SKIP_(G.crec.file_comment_length) + break; + + } /* end switch (lflag) */ + + tot_csize += G.crec.csize; + tot_ucsize += G.crec.ucsize; + if (G.crec.general_purpose_bit_flag & 1) + tot_csize -= 12; /* don't count encryption header */ + ++members; + +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, + G.filename, NULL)) { + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return IZ_CTRLC; /* cancel operation by user request */ + } +#endif +#ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); +#endif + + } else { /* not listing this file */ + SKIP_(G.crec.extra_field_length) + SKIP_(G.crec.file_comment_length) + + } /* end if (list member?) */ + + } /* end for-loop (j: member files) */ + +/*--------------------------------------------------------------------------- + Check that we actually found requested files; if so, print totals. + ---------------------------------------------------------------------------*/ + + if (uO.tflag) { + char *sgn = ""; + int cfactor = ratio(tot_ucsize, tot_csize); + + if (cfactor < 0) { + sgn = "-"; + cfactor = -cfactor; + } + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileStats), + members, (members==1)? nullStr:"s", tot_ucsize, + tot_csize, sgn, cfactor/10, cfactor%10)); + } + +/*--------------------------------------------------------------------------- + Check for unmatched filespecs on command line and print warning if any + found. + ---------------------------------------------------------------------------*/ + + if (fn_matched) { + for (j = 0; j < G.filespecs; ++j) + if (!fn_matched[j]) + Info(slide, 0x401, ((char *)slide, + LoadFarString(FilenameNotMatched), G.pfnames[j])); + free((zvoid *)fn_matched); + } + if (xn_matched) { + for (j = 0; j < G.xfilespecs; ++j) + if (!xn_matched[j]) + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExclFilenameNotMatched), G.pxnames[j])); + free((zvoid *)xn_matched); + } + +/*--------------------------------------------------------------------------- + Double check that we're back at the end-of-central-directory record. + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ G.sig, 4) == 0) /* disk error? */ + return PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + if (members == 0 && error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; + + if (uO.lflag >= 10) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + + return error_in_archive; + +} /* end function zipinfo() */ + + + + + +/************************/ +/* Function zi_long() */ +/************************/ + +static int zi_long(__G__ pEndprev) /* return PK-type error code */ + __GDEF + ulg *pEndprev; /* for zi_long() check of extra bytes */ +{ +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif + int error, error_in_archive=PK_COOL; + ush hostnum, hostver, extnum, extver, methnum, xattr; + char workspace[12], attribs[22]; + ZCONST char *varmsg_str; + char unkn[16]; + static ZCONST char Far *os[NUM_HOSTS] = { + OS_FAT, OS_Amiga, OS_VMS, OS_Unix, OS_VMCMS, OS_AtariST, OS_HPFS, + OS_Macintosh, OS_ZSystem, OS_CPM, OS_TOPS20, OS_NTFS, OS_QDOS, + OS_Acorn, OS_VFAT, OS_MVS, OS_BeOS, OS_Tandem + }; + static ZCONST char Far *method[NUM_METHODS] = { + MthdNone, MthdShrunk, MthdRedF1, MthdRedF2, MthdRedF3, MthdRedF4, + MthdImplode, MthdToken, MthdDeflate, MthdEnDeflate, MthdDCLImplode + }; + static ZCONST char Far *dtypelng[4] = { + DeflNorm, DeflMax, DeflFast, DeflSFast + }; + + +/*--------------------------------------------------------------------------- + Check whether there's any extra space inside the zipfile. If *pEndprev is + zero, it's probably a signal that OS/2 extra fields are involved (with + unknown compressed size). We won't worry about prepended junk here... + ---------------------------------------------------------------------------*/ + + if (G.crec.relative_offset_local_header != *pEndprev && *pEndprev > 0L) { + /* GRR DEBUG + Info(slide, 0, ((char *)slide, + " [crec.relative_offset_local_header = %lu, endprev = %lu]\n", + G.crec.relative_offset_local_header, *pEndprev)); + */ + Info(slide, 0, ((char *)slide, LoadFarString(ExtraBytesPreceding), + (long)G.crec.relative_offset_local_header - (long)(*pEndprev))); + } + + /* calculate endprev for next time around (problem: extra fields may + * differ in length between local and central-directory records) */ + *pEndprev = G.crec.relative_offset_local_header + 4L + LREC_SIZE + + G.crec.filename_length + G.crec.extra_field_length + + G.crec.file_comment_length + G.crec.csize; + +/*--------------------------------------------------------------------------- + Read the extra field, if any. It may be used to get UNIX style modtime. + ---------------------------------------------------------------------------*/ + + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) + { + if (G.extra_field != NULL) { + free(G.extra_field); + G.extra_field = NULL; + } + error_in_archive = error; + /* The premature return in case of a "fatal" error (PK_EOF) is + * delayed until we analyze the extra field contents. + * This allows us to display all the other info that has been + * successfully read in. + */ + } + +/*--------------------------------------------------------------------------- + Print out various interesting things about the compressed file. + ---------------------------------------------------------------------------*/ + + hostnum = (ush)(G.pInfo->hostnum); + hostver = G.crec.version_made_by[0]; + extnum = (ush)MIN(G.crec.version_needed_to_extract[1], NUM_HOSTS); + extver = G.crec.version_needed_to_extract[0]; + methnum = (ush)MIN(G.crec.compression_method, NUM_METHODS); + + (*G.message)((zvoid *)&G, (uch *)" ", 2L, 0); fnprint(__G); + + Info(slide, 0, ((char *)slide, LoadFarString(LocalHeaderOffset), + G.crec.relative_offset_local_header, + G.crec.relative_offset_local_header)); + + if (hostnum >= NUM_HOSTS) { + sprintf(unkn, LoadFarString(UnknownNo), + (int)G.crec.version_made_by[1]); + varmsg_str = unkn; + } else { + varmsg_str = LoadFarStringSmall(os[hostnum]); + } + Info(slide, 0, ((char *)slide, LoadFarString(HostOS), varmsg_str)); + Info(slide, 0, ((char *)slide, LoadFarString(EncodeSWVer), hostver/10, + hostver%10)); + + if (extnum >= NUM_HOSTS) { + sprintf(unkn, LoadFarString(UnknownNo), + (int)G.crec.version_needed_to_extract[1]); + varmsg_str = unkn; + } else { + varmsg_str = LoadFarStringSmall(os[extnum]); + } + Info(slide, 0, ((char *)slide, LoadFarString(MinOSCompReq), varmsg_str)); + Info(slide, 0, ((char *)slide, LoadFarString(MinSWVerReq), extver/10, + extver%10)); + + if (methnum >= NUM_METHODS) { + sprintf(unkn, LoadFarString(UnknownNo), G.crec.compression_method); + varmsg_str = unkn; + } else { + varmsg_str = LoadFarStringSmall(method[methnum]); + } + Info(slide, 0, ((char *)slide, LoadFarString(CompressMethod), varmsg_str)); + if (methnum == IMPLODED) { + Info(slide, 0, ((char *)slide, LoadFarString(SlideWindowSizeImplode), + (G.crec.general_purpose_bit_flag & 2)? '8' : '4')); + Info(slide, 0, ((char *)slide, LoadFarString(ShannonFanoTrees), + (G.crec.general_purpose_bit_flag & 4)? '3' : '2')); + } else if (methnum == DEFLATED) { + ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); + + Info(slide, 0, ((char *)slide, LoadFarString(CompressSubtype), + LoadFarStringSmall(dtypelng[dnum]))); + } + + Info(slide, 0, ((char *)slide, LoadFarString(FileSecurity), + (G.crec.general_purpose_bit_flag & 1) ? nullStr : "not ")); + Info(slide, 0, ((char *)slide, LoadFarString(ExtendedLocalHdr), + (G.crec.general_purpose_bit_flag & 8) ? "yes" : "no")); + /* print upper 3 bits for amusement? */ + + /* For printing of date & time, a "char d_t_buf[21]" is required. + * To save stack space, we reuse the "char attribs[22]" buffer which + * is not used yet. + */ +# define d_t_buf attribs + + zi_time(__G__ &G.crec.last_mod_dos_datetime, NULL, d_t_buf); + Info(slide, 0, ((char *)slide, LoadFarString(FileModDate), d_t_buf)); +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ + d_t_buf[0] = (char)0; /* signal "show local time" */ + zi_time(__G__ &G.crec.last_mod_dos_datetime, &(z_utime.mtime), d_t_buf); + Info(slide, 0, ((char *)slide, LoadFarString(UT_FileModDate), + d_t_buf, LoadFarStringSmall(LocalTime))); +#ifndef NO_GMTIME + d_t_buf[0] = (char)1; /* signal "show UTC (GMT) time" */ + zi_time(__G__ &G.crec.last_mod_dos_datetime, &(z_utime.mtime), d_t_buf); + Info(slide, 0, ((char *)slide, LoadFarString(UT_FileModDate), + d_t_buf, LoadFarStringSmall(GMTime))); +#endif /* !NO_GMTIME */ + } +#endif /* USE_EF_UT_TIME */ + + Info(slide, 0, ((char *)slide, LoadFarString(CRC32Value), G.crec.crc32)); + Info(slide, 0, ((char *)slide, LoadFarString(CompressedFileSize), + G.crec.csize)); + Info(slide, 0, ((char *)slide, LoadFarString(UncompressedFileSize), + G.crec.ucsize)); + Info(slide, 0, ((char *)slide, LoadFarString(FilenameLength), + G.crec.filename_length)); + Info(slide, 0, ((char *)slide, LoadFarString(ExtraFieldLength), + G.crec.extra_field_length)); + Info(slide, 0, ((char *)slide, LoadFarString(FileCommentLength), + G.crec.file_comment_length)); + Info(slide, 0, ((char *)slide, LoadFarString(FileDiskNum), + G.crec.disk_number_start + 1)); + Info(slide, 0, ((char *)slide, LoadFarString(ApparentFileType), + (G.crec.internal_file_attributes & 1)? "text" + : (G.crec.internal_file_attributes & 2)? "ebcdic" + : "binary")); /* changed to accept EBCDIC */ +#ifdef ATARI + printf(" external file attributes (hex): %.8lx\n", + G.crec.external_file_attributes); +#endif + xattr = (ush)((G.crec.external_file_attributes >> 16) & 0xFFFF); + if (hostnum == VMS_) { + char *p=attribs, *q=attribs+1; + int i, j, k; + + for (k = 0; k < 12; ++k) + workspace[k] = 0; + if (xattr & VMS_IRUSR) + workspace[0] = 'R'; + if (xattr & VMS_IWUSR) { + workspace[1] = 'W'; + workspace[3] = 'D'; + } + if (xattr & VMS_IXUSR) + workspace[2] = 'E'; + if (xattr & VMS_IRGRP) + workspace[4] = 'R'; + if (xattr & VMS_IWGRP) { + workspace[5] = 'W'; + workspace[7] = 'D'; + } + if (xattr & VMS_IXGRP) + workspace[6] = 'E'; + if (xattr & VMS_IROTH) + workspace[8] = 'R'; + if (xattr & VMS_IWOTH) { + workspace[9] = 'W'; + workspace[11] = 'D'; + } + if (xattr & VMS_IXOTH) + workspace[10] = 'E'; + + *p++ = '('; + for (k = j = 0; j < 3; ++j) { /* loop over groups of permissions */ + for (i = 0; i < 4; ++i, ++k) /* loop over perms within a group */ + if (workspace[k]) + *p++ = workspace[k]; + *p++ = ','; /* group separator */ + if (j == 0) + while ((*p++ = *q++) != ',') + ; /* system, owner perms are same */ + } + *p-- = 0; + *p = ')'; /* overwrite last comma */ + Info(slide, 0, ((char *)slide, LoadFarString(VMSFileAttributes), xattr, + attribs)); + + } else if (hostnum == AMIGA_) { + switch (xattr & AMI_IFMT) { + case AMI_IFDIR: attribs[0] = 'd'; break; + case AMI_IFREG: attribs[0] = '-'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & AMI_IHIDDEN)? 'h' : '-'; + attribs[2] = (xattr & AMI_ISCRIPT)? 's' : '-'; + attribs[3] = (xattr & AMI_IPURE)? 'p' : '-'; + attribs[4] = (xattr & AMI_IARCHIVE)? 'a' : '-'; + attribs[5] = (xattr & AMI_IREAD)? 'r' : '-'; + attribs[6] = (xattr & AMI_IWRITE)? 'w' : '-'; + attribs[7] = (xattr & AMI_IEXECUTE)? 'e' : '-'; + attribs[8] = (xattr & AMI_IDELETE)? 'd' : '-'; + attribs[9] = 0; /* better dlm the string */ + Info(slide, 0, ((char *)slide, LoadFarString(AmigaFileAttributes), + xattr, attribs)); + + } else if ((hostnum != FS_FAT_) && (hostnum != FS_HPFS_) && + (hostnum != FS_NTFS_) && (hostnum != FS_VFAT_) && + (hostnum != ACORN_) && + (hostnum != VM_CMS_) && (hostnum != MVS_)) + { /* assume Unix-like */ + switch ((unsigned)(xattr & UNX_IFMT)) { + case (unsigned)UNX_IFDIR: attribs[0] = 'd'; break; + case (unsigned)UNX_IFREG: attribs[0] = '-'; break; + case (unsigned)UNX_IFLNK: attribs[0] = 'l'; break; + case (unsigned)UNX_IFBLK: attribs[0] = 'b'; break; + case (unsigned)UNX_IFCHR: attribs[0] = 'c'; break; + case (unsigned)UNX_IFIFO: attribs[0] = 'p'; break; + case (unsigned)UNX_IFSOCK: attribs[0] = 's'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & UNX_IRUSR)? 'r' : '-'; + attribs[4] = (xattr & UNX_IRGRP)? 'r' : '-'; + attribs[7] = (xattr & UNX_IROTH)? 'r' : '-'; + + attribs[2] = (xattr & UNX_IWUSR)? 'w' : '-'; + attribs[5] = (xattr & UNX_IWGRP)? 'w' : '-'; + attribs[8] = (xattr & UNX_IWOTH)? 'w' : '-'; + + if (xattr & UNX_IXUSR) + attribs[3] = (xattr & UNX_ISUID)? 's' : 'x'; + else + attribs[3] = (xattr & UNX_ISUID)? 'S' : '-'; /* S = undefined */ + if (xattr & UNX_IXGRP) + attribs[6] = (xattr & UNX_ISGID)? 's' : 'x'; /* == UNX_ENFMT */ + else + attribs[6] = (xattr & UNX_ISGID)? 'l' : '-'; + if (xattr & UNX_IXOTH) + attribs[9] = (xattr & UNX_ISVTX)? 't' : 'x'; /* "sticky bit" */ + else + attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-'; /* T = undefined */ + attribs[10] = 0; + + Info(slide, 0, ((char *)slide, LoadFarString(UnixFileAttributes), xattr, + attribs)); + + } else { + Info(slide, 0, ((char *)slide, LoadFarString(NonMSDOSFileAttributes), + G.crec.external_file_attributes >> 8)); + + } /* endif (hostnum: external attributes format) */ + + if ((xattr=(ush)(G.crec.external_file_attributes & 0xFF)) == 0) + Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributes), + xattr)); + else if (xattr == 1) + Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributesRO), + xattr)); + else + Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributesAlpha), + xattr, (xattr&1)? "rdo " : nullStr, + (xattr&2)? "hid " : nullStr, + (xattr&4)? "sys " : nullStr, + (xattr&8)? "lab " : nullStr, + (xattr&16)? "dir " : nullStr, + (xattr&32)? "arc" : nullStr)); + +/*--------------------------------------------------------------------------- + Analyze the extra field, if any, and print the file comment, if any (the + filename has already been printed, above). That finishes up this file + entry... + ---------------------------------------------------------------------------*/ + + if (G.crec.extra_field_length > 0) { + uch *ef_ptr = G.extra_field; + ush ef_len = G.crec.extra_field_length; + ush eb_id, eb_datalen; + ZCONST char Far *ef_fieldname; + + if (error_in_archive > PK_WARN) /* fatal: can't continue */ + /* delayed "fatal error" return from extra field reading */ + return error; + if (G.extra_field == (uch *)NULL) + return PK_ERR; /* not consistent with crec length */ + + Info(slide, 0, ((char *)slide, LoadFarString(ExtraFields))); + + while (ef_len >= EB_HEADSIZE) { + eb_id = makeword(&ef_ptr[EB_ID]); + eb_datalen = makeword(&ef_ptr[EB_LEN]); + ef_ptr += EB_HEADSIZE; + ef_len -= EB_HEADSIZE; + + if (eb_datalen > (ush)ef_len) { + Info(slide, 0x421, ((char *)slide, + LoadFarString(ExtraFieldTrunc), eb_id, eb_datalen, ef_len)); + eb_datalen = ef_len; + } + + switch (eb_id) { + case EF_AV: + ef_fieldname = efAV; + break; + case EF_OS2: + ef_fieldname = efOS2; + break; + case EF_ACL: + ef_fieldname = efACL; + break; + case EF_NTSD: + ef_fieldname = efNTSD; + break; + case EF_PKVMS: + ef_fieldname = efPKVMS; + break; + case EF_IZVMS: + ef_fieldname = efIZVMS; + break; + case EF_PKW32: + ef_fieldname = efPKWin32; + break; + case EF_PKUNIX: + ef_fieldname = efPKUnix; + break; + case EF_IZUNIX: + ef_fieldname = efIZUnix; + if (G.crec.version_made_by[1] == UNIX_ && *pEndprev > 0L) + *pEndprev += 4L; /* also have UID/GID in local copy */ + break; + case EF_IZUNIX2: + ef_fieldname = efIZUnix2; + if (*pEndprev > 0L) + *pEndprev += 4L; /* 4 byte UID/GID in local copy */ + break; + case EF_TIME: + ef_fieldname = efTime; + break; + case EF_MAC3: + ef_fieldname = efMac3; + break; + case EF_JLMAC: + ef_fieldname = efJLMac; + break; + case EF_ZIPIT: + ef_fieldname = efZipIt; + break; + case EF_ZIPIT2: + ef_fieldname = efZipIt2; + break; + case EF_VMCMS: + ef_fieldname = efVMCMS; + break; + case EF_MVS: + ef_fieldname = efMVS; + break; + case EF_BEOS: + ef_fieldname = efBeOS; + break; + case EF_QDOS: + ef_fieldname = efQDOS; + break; + case EF_AOSVS: + ef_fieldname = efAOSVS; + break; + case EF_SPARK: /* from RISC OS */ + ef_fieldname = efSpark; + break; + case EF_MD5: + ef_fieldname = efMD5; + break; + case EF_ASIUNIX: + ef_fieldname = efASiUnix; + break; + default: + ef_fieldname = efUnknown; + break; + } + Info(slide, 0, ((char *)slide, LoadFarString(ExtraFieldType), + eb_id, LoadFarStringSmall(ef_fieldname), eb_datalen)); + + /* additional, field-specific information: */ + switch (eb_id) { + case EF_OS2: + case EF_ACL: + if (eb_datalen >= EB_OS2_HLEN) { + if (eb_id == EF_OS2) + ef_fieldname = OS2EAs; + else + ef_fieldname = ACLdata; + Info(slide, 0, ((char *)slide, + LoadFarString(ef_fieldname), makelong(ef_ptr))); + *pEndprev = 0L; /* no clue about csize of local */ + } + break; + case EF_NTSD: + if (eb_datalen >= EB_NTSD_C_LEN) { + Info(slide, 0, ((char *)slide, LoadFarString(NTSDData), + makelong(ef_ptr))); + *pEndprev = 0L; /* no clue about csize of local */ + } + break; + case EF_IZVMS: + if (eb_datalen >= 8) { + char *p, q[8]; + int compr = makeword(ef_ptr+4) & 7; + + *q = '\0'; + if (compr > 3) + compr = 3; + if (strncmp((char *)ef_ptr, "VFAB", 4) == 0) + p = "FAB"; + else if (strncmp((char *)ef_ptr, "VALL", 4) == 0) + p = "XABALL"; + else if (strncmp((char *)ef_ptr, "VFHC", 4) == 0) + p = "XABFHC"; + else if (strncmp((char *)ef_ptr, "VDAT", 4) == 0) + p = "XABDAT"; + else if (strncmp((char *)ef_ptr, "VRDT", 4) == 0) + p = "XABRDT"; + else if (strncmp((char *)ef_ptr, "VPRO", 4) == 0) + p = "XABPRO"; + else if (strncmp((char *)ef_ptr, "VKEY", 4) == 0) + p = "XABKEY"; + else if (strncmp((char *)ef_ptr, "VMSV", 4) == 0) { + p = "version"; + if (eb_datalen >= 16) { + q[0] = ' '; + q[1] = '('; + strncpy(q+2, (char *)ef_ptr+12, 4); + q[6] = ')'; + q[7] = '\0'; + } + } else + p = "version"; + Info(slide, 0, ((char *)slide, LoadFarString(izVMSdata), + LoadFarStringSmall(izVMScomp[compr]), + makeword(ef_ptr+6), p, q)); + } + break; + case EF_TIME: + if (eb_datalen >= 1) { + char types[80]; + int num = 0, len; + + *types = '\0'; + if (*ef_ptr & 1) { + strcpy(types, LoadFarString(UTmodification)); + ++num; + } + if (*ef_ptr & 2) { + len = strlen(types); + if (num) + types[len++] = '/'; + strcpy(types+len, LoadFarString(UTaccess)); + ++num; + if (*pEndprev > 0L) + *pEndprev += 4L; + } + if (*ef_ptr & 4) { + len = strlen(types); + if (num) + types[len++] = '/'; + strcpy(types+len, LoadFarString(UTcreation)); + ++num; + if (*pEndprev > 0L) + *pEndprev += 4L; + } + if (num > 0) + Info(slide, 0, ((char *)slide, + LoadFarString(UTdata), types, + num == 1? nullStr : "s")); + } + break; + case EF_MAC3: + if (eb_datalen >= EB_MAC3_HLEN) { + ulg eb_uc = makelong(ef_ptr); + unsigned mac3_flgs = makeword(ef_ptr+EB_FLGS_OFFS); + unsigned eb_is_uc = mac3_flgs & EB_M3_FL_UNCMPR; + + Info(slide, 0, ((char *)slide, LoadFarString(Mac3data), + eb_uc, eb_is_uc ? "un" : nullStr)); + if (eb_is_uc) { + if (*pEndprev > 0L) + *pEndprev += makelong(ef_ptr); + } else { + *pEndprev = 0L; /* no clue about csize of local */ + } + + Info(slide, 0, ((char *)slide, + LoadFarString(MacOSMAC3flags), + LoadFarStringSmall(mac3_flgs & EB_M3_FL_DATFRK ? + MacOS_DF : MacOS_RF), + (mac3_flgs & EB_M3_FL_TIME64 ? 64 : 32))); + zi_showMacTypeCreator(__G__ &ef_ptr[6]); + } + break; + case EF_ZIPIT2: + if (eb_datalen >= 5 && + strncmp((char *)ef_ptr, "ZPIT", 4) == 0) { + + if (eb_datalen >= 12) { + zi_showMacTypeCreator(__G__ &ef_ptr[4]); + } + } + + case EF_ZIPIT: + if (eb_datalen >= 5 && + strncmp((char *)ef_ptr, "ZPIT", 4) == 0) { + unsigned fnlen = ef_ptr[4]; + + if (eb_datalen >= fnlen + (5 + 8)) { + uch nullchar = ef_ptr[fnlen+5]; + + ef_ptr[fnlen+5] = '\0'; /* terminate filename */ + Info(slide, 0, ((char *)slide, + LoadFarString(ZipItFname), (char *)ef_ptr+5)); + ef_ptr[fnlen+5] = nullchar; + zi_showMacTypeCreator(__G__ &ef_ptr[fnlen+5]); + } + } + break; + case EF_JLMAC: + if (eb_datalen >= 40 && + strncmp((char *)ef_ptr, "JLEE", 4) == 0) + { + zi_showMacTypeCreator(__G__ &ef_ptr[4]); + + Info(slide, 0, ((char *)slide, + LoadFarString(MacOSJLEEflags), + LoadFarStringSmall(ef_ptr[31] & 1 ? + MacOS_DF : MacOS_RF))); + } + break; +#ifdef CMS_MVS + case EF_VMCMS: + case EF_MVS: + { + char type[100]; + + Info(slide, 0, ((char *)slide, + LoadFarString(VmMvsExtraField), + (getVMMVSexfield(type, ef_ptr-EB_HEADSIZE, + (unsigned)eb_datalen) > 0)? + type : LoadFarStringSmall(VmMvsInvalid))); + } + break; +#endif /* CMS_MVS */ + case EF_BEOS: + if (eb_datalen >= EB_BEOS_HLEN) { + ulg eb_uc = makelong(ef_ptr); + unsigned eb_is_uc = + *(ef_ptr+EB_FLGS_OFFS) & EB_BE_FL_UNCMPR; + + Info(slide, 0, ((char *)slide, LoadFarString(BeOSdata), + eb_uc, eb_is_uc ? "un" : nullStr)); + if (eb_is_uc) { + if (*pEndprev > 0L) + *pEndprev += makelong(ef_ptr); + } else { + *pEndprev = 0L; /* no clue about csize of local */ + } + } + break; + case EF_QDOS: + if (eb_datalen >= 4) { + Info(slide, 0, ((char *)slide, LoadFarString(QDOSdata), + ef_ptr[0], ef_ptr[1], ef_ptr[2], ef_ptr[3])); + } + break; + case EF_AOSVS: + if (eb_datalen >= 5) { + Info(slide, 0, ((char *)slide, LoadFarString(AOSVSdata), + ((int)(uch)ef_ptr[4])/10, ((int)(uch)ef_ptr[4])%10)); + } + break; + case EF_MD5: + if (eb_datalen >= 19) { + char md5[33]; + int i; + + for (i = 0; i < 16; ++i) + sprintf(&md5[i<<1], "%02x", ef_ptr[15-i]); + md5[32] = '\0'; + Info(slide, 0, ((char *)slide, LoadFarString(MD5data), + md5)); + break; + } /* else: fall through !! */ + default: + if (eb_datalen > 0) { + ush i, n; + + if (eb_datalen <= 24) { + Info(slide, 0, ((char *)slide, + LoadFarString(ColonIndent))); + n = eb_datalen; + } else { + Info(slide, 0, ((char *)slide, + LoadFarString(First20))); + n = 20; + } + for (i = 0; i < n; ++i) + Info(slide, 0, ((char *)slide, + LoadFarString(efFormat), ef_ptr[i])); + } + break; + } + (*G.message)((zvoid *)&G, (uch *)".", 1L, 0); + + ef_ptr += eb_datalen; + ef_len -= eb_datalen; + } + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + } + + /* high bit == Unix/OS2/NT GMT times (mtime, atime); next bit == UID/GID */ + if ((xattr = (ush)((G.crec.external_file_attributes & 0xC000) >> 12)) & 8) + { + if (hostnum == UNIX_ || hostnum == FS_HPFS_ || hostnum == FS_NTFS_) + { + Info(slide, 0, ((char *)slide, LoadFarString(lExtraFieldType), + "is", EF_IZUNIX, LoadFarStringSmall(efIZUnix), + (unsigned)(xattr&12), (xattr&4)? efIZuid : efIZnouid)); + if (*pEndprev > 0L) + *pEndprev += (ulg)(xattr&12); + } + else if (hostnum == FS_FAT_ && !(xattr&4)) + Info(slide, 0, ((char *)slide, LoadFarString(lExtraFieldType), + "may be", EF_IZUNIX, LoadFarStringSmall(efIZUnix), 8, + efIZnouid)); + } + + if (!G.crec.file_comment_length) + Info(slide, 0, ((char *)slide, LoadFarString(NoFileComment))); + else { + Info(slide, 0, ((char *)slide, LoadFarString(FileCommBegin))); + if ((error = do_string(__G__ G.crec.file_comment_length, DISPL_8)) != + PK_COOL) + { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + Info(slide, 0, ((char *)slide, LoadFarString(FileCommEnd))); + } + + return error_in_archive; + +} /* end function zi_long() */ + + + + + +/*************************/ +/* Function zi_short() */ +/*************************/ + +static int zi_short(__G) /* return PK-type error code */ + __GDEF +{ +#ifdef USE_EF_UT_TIME + iztimes z_utime; + time_t *z_modtim; +#endif + int k, error, error_in_archive=PK_COOL; + ush methnum, hostnum, hostver, xattr; + char *p, workspace[12], attribs[16]; + char methbuf[5]; + static ZCONST char dtype[5]="NXFS"; /* normal, maximum, fast, superfast */ + static ZCONST char Far os[NUM_HOSTS+1][4] = { + "fat", "ami", "vms", "unx", "cms", "atr", "hpf", "mac", "zzz", + "cpm", "t20", "ntf", "qds", "aco", "vft", "mvs", "be ", "nsk", + "???" + }; + static ZCONST char Far method[NUM_METHODS+1][5] = { + "stor", "shrk", "re:1", "re:2", "re:3", "re:4", "i#:#", "tokn", + "def#", "edef", "dcli", "u###" + }; + + +/*--------------------------------------------------------------------------- + Print out various interesting things about the compressed file. + ---------------------------------------------------------------------------*/ + + methnum = (ush)MIN(G.crec.compression_method, NUM_METHODS); + hostnum = (ush)(G.pInfo->hostnum); + hostver = G.crec.version_made_by[0]; +/* + extnum = MIN(G.crec.version_needed_to_extract[1], NUM_HOSTS); + extver = G.crec.version_needed_to_extract[0]; + */ + + zfstrcpy(methbuf, method[methnum]); + if (methnum == IMPLODED) { + methbuf[1] = (char)((G.crec.general_purpose_bit_flag & 2)? '8' : '4'); + methbuf[3] = (char)((G.crec.general_purpose_bit_flag & 4)? '3' : '2'); + } else if (methnum == DEFLATED) { + ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); + methbuf[3] = dtype[dnum]; + } else if (methnum >= NUM_METHODS) { /* unknown */ + sprintf(&methbuf[1], "%03u", G.crec.compression_method); + } + + for (k = 0; k < 15; ++k) + attribs[k] = ' '; + attribs[15] = 0; + + xattr = (ush)((G.crec.external_file_attributes >> 16) & 0xFFFF); + switch (hostnum) { + case VMS_: + { int i, j; + + for (k = 0; k < 12; ++k) + workspace[k] = 0; + if (xattr & VMS_IRUSR) + workspace[0] = 'R'; + if (xattr & VMS_IWUSR) { + workspace[1] = 'W'; + workspace[3] = 'D'; + } + if (xattr & VMS_IXUSR) + workspace[2] = 'E'; + if (xattr & VMS_IRGRP) + workspace[4] = 'R'; + if (xattr & VMS_IWGRP) { + workspace[5] = 'W'; + workspace[7] = 'D'; + } + if (xattr & VMS_IXGRP) + workspace[6] = 'E'; + if (xattr & VMS_IROTH) + workspace[8] = 'R'; + if (xattr & VMS_IWOTH) { + workspace[9] = 'W'; + workspace[11] = 'D'; + } + if (xattr & VMS_IXOTH) + workspace[10] = 'E'; + + p = attribs; + for (k = j = 0; j < 3; ++j) { /* groups of permissions */ + for (i = 0; i < 4; ++i, ++k) /* perms within a group */ + if (workspace[k]) + *p++ = workspace[k]; + *p++ = ','; /* group separator */ + } + *--p = ' '; /* overwrite last comma */ + if ((p - attribs) < 12) + sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); + } + break; + + case FS_FAT_: + case FS_HPFS_: + case FS_NTFS_: + case VM_CMS_: + case FS_VFAT_: + case MVS_: + case ACORN_: + xattr = (ush)(G.crec.external_file_attributes & 0xFF); + sprintf(attribs, ".r.-... %d.%d", hostver/10, hostver%10); + attribs[2] = (xattr & 0x01)? '-' : 'w'; + attribs[5] = (xattr & 0x02)? 'h' : '-'; + attribs[6] = (xattr & 0x04)? 's' : '-'; + attribs[4] = (xattr & 0x20)? 'a' : '-'; + if (xattr & 0x10) { + attribs[0] = 'd'; + attribs[3] = 'x'; + } else + attribs[0] = '-'; + if (IS_VOLID(xattr)) + attribs[0] = 'V'; + else if ((p = strrchr(G.filename, '.')) != (char *)NULL) { + ++p; + if (STRNICMP(p, "com", 3) == 0 || STRNICMP(p, "exe", 3) == 0 || + STRNICMP(p, "btm", 3) == 0 || STRNICMP(p, "cmd", 3) == 0 || + STRNICMP(p, "bat", 3) == 0) + attribs[3] = 'x'; + } + break; + + case AMIGA_: + switch (xattr & AMI_IFMT) { + case AMI_IFDIR: attribs[0] = 'd'; break; + case AMI_IFREG: attribs[0] = '-'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & AMI_IHIDDEN)? 'h' : '-'; + attribs[2] = (xattr & AMI_ISCRIPT)? 's' : '-'; + attribs[3] = (xattr & AMI_IPURE)? 'p' : '-'; + attribs[4] = (xattr & AMI_IARCHIVE)? 'a' : '-'; + attribs[5] = (xattr & AMI_IREAD)? 'r' : '-'; + attribs[6] = (xattr & AMI_IWRITE)? 'w' : '-'; + attribs[7] = (xattr & AMI_IEXECUTE)? 'e' : '-'; + attribs[8] = (xattr & AMI_IDELETE)? 'd' : '-'; + sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); + break; + + default: /* assume Unix-like */ + switch ((unsigned)(xattr & UNX_IFMT)) { + case (unsigned)UNX_IFDIR: attribs[0] = 'd'; break; + case (unsigned)UNX_IFREG: attribs[0] = '-'; break; + case (unsigned)UNX_IFLNK: attribs[0] = 'l'; break; + case (unsigned)UNX_IFBLK: attribs[0] = 'b'; break; + case (unsigned)UNX_IFCHR: attribs[0] = 'c'; break; + case (unsigned)UNX_IFIFO: attribs[0] = 'p'; break; + case (unsigned)UNX_IFSOCK: attribs[0] = 's'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & UNX_IRUSR)? 'r' : '-'; + attribs[4] = (xattr & UNX_IRGRP)? 'r' : '-'; + attribs[7] = (xattr & UNX_IROTH)? 'r' : '-'; + attribs[2] = (xattr & UNX_IWUSR)? 'w' : '-'; + attribs[5] = (xattr & UNX_IWGRP)? 'w' : '-'; + attribs[8] = (xattr & UNX_IWOTH)? 'w' : '-'; + + if (xattr & UNX_IXUSR) + attribs[3] = (xattr & UNX_ISUID)? 's' : 'x'; + else + attribs[3] = (xattr & UNX_ISUID)? 'S' : '-'; /* S==undefined */ + if (xattr & UNX_IXGRP) + attribs[6] = (xattr & UNX_ISGID)? 's' : 'x'; /* == UNX_ENFMT */ + else + /* attribs[6] = (xattr & UNX_ISGID)? 'l' : '-'; real 4.3BSD */ + attribs[6] = (xattr & UNX_ISGID)? 'S' : '-'; /* SunOS 4.1.x */ + if (xattr & UNX_IXOTH) + attribs[9] = (xattr & UNX_ISVTX)? 't' : 'x'; /* "sticky bit" */ + else + attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-'; /* T==undefined */ + + sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); + break; + + } /* end switch (hostnum: external attributes format) */ + + Info(slide, 0, ((char *)slide, "%s %s %8lu ", attribs, + LoadFarStringSmall(os[hostnum]), G.crec.ucsize)); + Info(slide, 0, ((char *)slide, "%c", + (G.crec.general_purpose_bit_flag & 1)? + ((G.crec.internal_file_attributes & 1)? 'T' : 'B') : /* encrypted */ + ((G.crec.internal_file_attributes & 1)? 't' : 'b'))); /* plaintext */ + k = (G.crec.extra_field_length || + /* a local-only "UX" (old Unix/OS2/NT GMT times "IZUNIX") e.f.? */ + ((G.crec.external_file_attributes & 0x8000) && + (hostnum == UNIX_ || hostnum == FS_HPFS_ || hostnum == FS_NTFS_))); + Info(slide, 0, ((char *)slide, "%c", k? + ((G.crec.general_purpose_bit_flag & 8)? 'X' : 'x') : /* extra field */ + ((G.crec.general_purpose_bit_flag & 8)? 'l' : '-'))); /* no extra field */ + /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ extended local header or not */ + + if (uO.lflag == 4) { + ulg csiz = G.crec.csize; + + if (G.crec.general_purpose_bit_flag & 1) + csiz -= 12; /* if encrypted, don't count encryption header */ + Info(slide, 0, ((char *)slide, "%3d%%", + (ratio(G.crec.ucsize,csiz)+5)/10)); + } else if (uO.lflag == 5) + Info(slide, 0, ((char *)slide, " %8lu", G.crec.csize)); + + /* Read the extra field, if any. The extra field info may be used + * in the file modification time section, below. + */ + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) + { + if (G.extra_field != NULL) { + free(G.extra_field); + G.extra_field = NULL; + } + error_in_archive = error; + /* We do not return prematurely in case of a "fatal" error (PK_EOF). + * This does not hurt here, because we do not need to read from the + * zipfile again before the end of this function. + */ + } + + /* For printing of date & time, a "char d_t_buf[16]" is required. + * To save stack space, we reuse the "char attribs[16]" buffer whose + * content is no longer needed. + */ +# define d_t_buf attribs +#ifdef USE_EF_UT_TIME + z_modtim = G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME) + ? &z_utime.mtime : NULL; + TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ + d_t_buf[0] = (char)0; /* signal "show local time" */ +#else +# define z_modtim NULL +#endif + Info(slide, 0, ((char *)slide, " %s %s ", methbuf, + zi_time(__G__ &G.crec.last_mod_dos_datetime, z_modtim, d_t_buf))); + fnprint(__G); + +/*--------------------------------------------------------------------------- + Skip the file comment, if any (the filename has already been printed, + above). That finishes up this file entry... + ---------------------------------------------------------------------------*/ + + SKIP_(G.crec.file_comment_length) + + return error_in_archive; + +} /* end function zi_short() */ + + + + + +/**************************************/ +/* Function zi_showMacTypeCreator() */ +/**************************************/ + +static void zi_showMacTypeCreator(__G__ ebfield) + __GDEF + uch *ebfield; +{ + /* not every Type / Creator character is printable */ + if (isprint(ebfield[0]) && isprint(ebfield[1]) && + isprint(ebfield[2]) && isprint(ebfield[3]) && + isprint(ebfield[4]) && isprint(ebfield[5]) && + isprint(ebfield[6]) && isprint(ebfield[7])) { + Info(slide, 0, ((char *)slide, LoadFarString(MacOSdata), + ebfield[0], ebfield[1], ebfield[2], ebfield[3], + ebfield[4], ebfield[5], ebfield[6], ebfield[7])); + } else { + Info(slide, 0, ((char *)slide, LoadFarString(MacOSdata1), + (((ulg)ebfield[0]) << 24) + + (((ulg)ebfield[1]) << 16) + + (((ulg)ebfield[2]) << 8) + + ((ulg)ebfield[3]), + (((ulg)ebfield[4]) << 24) + + (((ulg)ebfield[5]) << 16) + + (((ulg)ebfield[6]) << 8) + + ((ulg)ebfield[7]))); + } +} /* end function zi_showMacTypeCreator() */ + + + + + +/************************/ +/* Function zi_time() */ +/************************/ + +static char *zi_time(__G__ datetimez, modtimez, d_t_str) + __GDEF + ZCONST ulg *datetimez; + ZCONST time_t *modtimez; + char *d_t_str; +{ + unsigned yr, mo, dy, hh, mm, ss; + char monthbuf[4]; + ZCONST char *monthstr; + static ZCONST char Far month[12][4] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; +#ifdef USE_EF_UT_TIME + struct tm *t; +#endif + + + +/*--------------------------------------------------------------------------- + Convert the file-modification date and time info to a string of the form + "1991 Feb 23 17:15:00", "23-Feb-91 17:15" or "19910223.171500", depending + on values of lflag and T_flag. If using Unix-time extra fields, convert + to local time or not, depending on value of first character in d_t_str[]. + ---------------------------------------------------------------------------*/ + +#ifdef USE_EF_UT_TIME + if (modtimez != NULL) { +#ifndef NO_GMTIME + /* check for our secret message from above... */ + t = (d_t_str[0] == (char)1)? gmtime(modtimez) : localtime(modtimez); +#else + t = localtime(modtimez); +#endif + if (uO.lflag > 9 && t == (struct tm *)NULL) + /* time conversion error in verbose listing format, + * return string with '?' instead of data + */ + return (strcpy(d_t_str, LoadFarString(YMDHMSTimeError))); + } else + t = (struct tm *)NULL; + if (t != (struct tm *)NULL) { + mo = (unsigned)(t->tm_mon + 1); + dy = (unsigned)(t->tm_mday); + yr = (unsigned)(t->tm_year); + + hh = (unsigned)(t->tm_hour); + mm = (unsigned)(t->tm_min); + ss = (unsigned)(t->tm_sec); + } else +#endif /* USE_EF_UT_TIME */ + { + yr = ((unsigned)(*datetimez >> 25) & 0x7f) + 80; + mo = ((unsigned)(*datetimez >> 21) & 0x0f); + dy = ((unsigned)(*datetimez >> 16) & 0x1f); + + hh = (((unsigned)*datetimez >> 11) & 0x1f); + mm = (((unsigned)*datetimez >> 5) & 0x3f); + ss = (((unsigned)*datetimez << 1) & 0x3e); + } + + if (mo == 0 || mo > 12) { + sprintf(monthbuf, LoadFarString(BogusFmt), mo); + monthstr = monthbuf; + } else + monthstr = LoadFarStringSmall(month[mo-1]); + + if (uO.lflag > 9) /* verbose listing format */ + sprintf(d_t_str, LoadFarString(YMDHMSTime), yr+1900, monthstr, dy, hh, + mm, ss); + else if (uO.T_flag) + sprintf(d_t_str, LoadFarString(DecimalTime), yr+1900, mo, dy, hh, mm, + ss); + else /* was: if ((uO.lflag >= 3) && (uO.lflag <= 5)) */ + sprintf(d_t_str, LoadFarString(DMYHMTime), dy, monthstr, yr%100, hh, + mm); + + return d_t_str; + +} /* end function zi_time() */ + +#endif /* !NO_ZIPINFO */ diff --git a/utils/Install/script/finished.ini b/utils/Install/script/finished.ini new file mode 100644 index 0000000000..3c52d33bcc --- /dev/null +++ b/utils/Install/script/finished.ini @@ -0,0 +1,9 @@ +# Sample ini file for the last page +# +closeold +grabfile,install.bmp +loadwxr,finished.wxr +setbutton,101,exit +setbutton,103,exit +disable,button3 +remove,install.bmp \ No newline at end of file diff --git a/utils/Install/script/finished.wxr b/utils/Install/script/finished.wxr new file mode 100644 index 0000000000..5d4e4b5dcd --- /dev/null +++ b/utils/Install/script/finished.wxr @@ -0,0 +1,25 @@ +static char *dialog1 = "dialog(name = 'dialog1',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ + title = 'Installing wxInstall 0.1',\ + id = 100,\ + x = 10, y = 10, width = 264, height = 179,\ + background_colour = 'D4D0C8',\ + use_dialog_units = 1,\ + use_system_defaults = 0,\ + font = [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg'],\ + control = [101, wxButton, 'Exit Installer', '0', 'button2', 5, 160, 60, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [102, wxButton, '<< Back', 'wxNO_BORDER', 'button3', 165, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [103, wxButton, 'Finish', '0', 'button4', 209, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [104, wxStaticBitmap, '', 'wxNO_BORDER', 'static5', 9, 8, 60, 144, 'bitmap9',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [105, wxStaticText, 'wxInstall Installation finished.', '0', 'statictext10', 81, 12, 164, 10, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [6006, wxStaticText, 'Thanks for trying wxInstall. Press finish to exit.', '0', 'statictext6', 80, 42, 168, 6, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']])."; + +static char *bitmap9 = "bitmap(name = 'bitmap9',\ + bitmap = ['install.bmp', wxBITMAP_TYPE_BMP, 'ANY'])."; + diff --git a/utils/Install/script/install.bmp b/utils/Install/script/install.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b394773c37223ee9764a9162ebf0de10367fa667 GIT binary patch literal 14418 zcmeI0O^)L>5QRCmR@u>ZW7cMC23bbdbe4gw)@pz(+JJq4M%ot`AlZABE94S6L?5h? zSH&MuBB`IO$%ZZ2%He*abI_9qTMD9mo!32eJd% zf$TtbAUlv9$PP?6P#h-)gxy6`E`^F_zf;Q~sGQ`c4CT|`unM3yJ!II!h}=u5W_lpkGkrwP1Hb@ z4aydSXtF)lKu}fBTCM>jfQ}|yd*IGTLVBH4gT37H_pWZ1@eAa2q6SboJj&RjNEL|f zgidrFX|J(j2Gf7d;YJZ5Gz4T&AX?xFL_;AWM4d(miXni;7I;xi}>falNV+NlI0kZ^RgqZn|Mwpok8ALPlAd47g4&)Ha zOhX;wm?_9ZI%XVl2;Dl#YtzPxt8eGnP8@ViEiI+4~3y_`*ZER&&MAFm4K61L~+EyJ0lV3Q5p9A_Sg=e0FnvjVj9u(0z@a4^$RiTeo zsV#%pDl?o8KH{KphLM&VUq~xOVyn2D-hk}d7S9}{-?k@wW1w_wK-%Y;9*AsNiOr79 zY3Ox@E^36-6`i@{-Fe9TLjxJ16K@VUrI7iX1|k>Uh_ei)3pblnl6fW+4F=$kTZxYp zX~@vPTJ9=3YJ@OuMkvZ4tgS})zY>hs5HV1SF_cL~-RP(JM;Z)KaJXEA;p8joHUIk% zQ}P>qxgG3jgs6}UwF)oy?~>1ih^RC|3dKtHT9KLxnEo_6aIZN0Crc3IBpn+dh#>mk$f2p!HrOtkUUdp#;P` zcB|s@F;hESrCcInGyl>2cjMUN9(K`WSRL)-kb@kC1B^cw_dH==p%?c%$4Lf$; z%dc;~j$W)u2G<87zx49a8KoH11<1ooKOb#fia{~Y^5OC_$cKfJ3_=4k%!h@N40Ik| z38k3p<#v|4(`Mis><*u%g4$Yckk6|;ZB(eEnj?k;4GdY0TcWzY-Mo1K83-K% z0AG;K?eYqQLc4WyhZ&V(C?7&@fQC$&(m_6~a(zQ>IV3GY!6ld*^3f`~QG^v%;%%IVkw zMDC{Z8K_{-G|7aBcAUV}-02)6188T4W|R^PjnF3ZiAF3m#@L;L-TMG%r4gn>x-*8- zOgFGQ(@IIE8`zz3Zb{!<^*tk)Af<#(ckS-XGBVC=U4I0T-=g<}$}%w|@mmr_B!PJCGg74rB-ZzXSgP_-C-$ literal 0 HcmV?d00001 diff --git a/utils/Install/script/install.xpm b/utils/Install/script/install.xpm new file mode 100644 index 0000000000..cd2938912f --- /dev/null +++ b/utils/Install/script/install.xpm @@ -0,0 +1,292 @@ +/* XPM */ +static char * inst[] = { +/* width height ncolors chars_per_pixel */ +"100 275 10 1", +/* colors */ +" c #AE3E4A", +"! c #C2C2C2", +"# c #828282", +"$ c #FEFEFE", +"% c #020202", +"& c #020282", +"' c #0202FE", +"( c #FE0202", +") c #02FE02", +"* c #028202", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" $$$$ ", +" $$$$$!!!!$$ ", +" $$$$!!!!!!!!!!!$$ ", +" $$$$$!!!!!!!!!!!!!!!!!$$ ", +" $$ $$$$$!!!!!!!!!!!!!!!!!!!!!!!!$$ ", +" $$!!$$% $$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$ ", +" $$!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$ ", +" $$!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$ ", +" $!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$ ", +" $$!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$ ", +" $!$!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$% ", +" $!!$$!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#% ", +" $!!!!$$!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!###% ", +" $!!!!!!$$!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!#####% ", +" $!!!!!!!!$$!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!#######% ", +" $!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!#########% ", +" $!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!$!!!!!!!!!!!!!!!!!###########% ", +" $!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!#############% ", +" $!!!##!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!$$!!!!!!!!!###############% ", +" $!!!#'##!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!$$!!!!!#################% ", +" $!!!#&&'##!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!$$!###################% ", +" $!!!#''&&'##!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!%###################% ", +" $!!!#'&''&&'##!!!!!!!!!!!$$!!!!!!!!!!!!!!#%###################% ", +" $!!!#''&&'''&'##!!!!!!!!!!!$$!!!!!!!!!!###%###################% ", +" $!!!#&&'''&''&&&##!!!!!!!!!!!$$!!!!!!#####%###################% ", +" $!!!#''&&''&&'''&'##!!!!!!!!!!!$$!!#######%###################% ", +" $!!!#&&''&&'''&&''&&##!!!!!!!!!!!#########%###################% ", +" $!!!#&'&&''&&'''&&''&'##!!!!!!!!!#########%###################% ", +" $!!!#&&''&&''&&&''&'''&&##!!!!!!!#########%###################% ", +" $!!!#''&&&'&##''&'''&&''&'##!!!!!#########%###################% ", +" $!!!#&&&'&&'####''&&''&&''&&##!!!#########%###################% ", +" $!!!#&'&&''&######''&'''&&''&$!!!#########%###################% ", +" $!!!#&&''&&'#!######''&&''&''$!!!#########%##################% ", +" $!!!#&'&&&'&#!!!#####&''&'''&$!!!#########%#################%% ", +" $!!!#&&&'&&'#!!%!!####&&''&&'$!!!#########%################%#% ", +" $!!!#&'&&''&#!!!%%!!##''&&''&$!!!#########%###############%##% ", +" $!!!#&&&'&&&#!&&!!!%!#&&''&&'$!!!#########%##############%###% ", +" $!!!#&&&&&'&#!&&&&!!!#''&&''&$!!!#########%#############%####% ", +" $!!!#&&&'&&&#!!!&&&&!#&&'&&&'$!!!#########%############%#####% ", +" $!!!#&'&&&&&##!!!!&&!#'&&&''&$!!!#########%###########%######% ", +" $!!!#&&&'&&&'&##!!!!!#&&''&&'$!!!#########%##########%#######% ", +" $!!!#&&&&&'&&&&&##!!!#''&&''&$!!!#########%#########%########% ", +" $!!!$$&&'&&&'&&&'&##!#&&'&&&'$!!!#########%########%#########% ", +" $!!!!!$$&&&&&&'&&&&&##'&&&''&$!!!#########%#######%##########% ", +" $!!!!!!!$$&&&&&&'&&&'&&&''&&'$!!!#########%######%###########% ", +" $!!!!!!!!!$$&&&&&&'&&&&&&&'&&$!!!#########%#####%############% ", +" $#!!!!!!!!!!$$&&'&&&'&&&'&&&'$!!!#########%####%###########%% ", +" %%#!!!!!!!!!!!$$&&&&&&'&&&&&&$!!!#########%###%##########%% ", +" %##!!!!!!!!!!!$$&&'&&&'&&&'$!!!#########%##%#########%% ", +" %%##!!!!!!!!!!!$$&&&&&&'&&$!!!#########%#%########%% ", +" %%##!!!!!!!!!!!$$&&'&&&'$!!!#########%%#######%% ", +" $$!!%%##!!!!!!!!!!!$$&&&&&$!!!#########%######%% ", +" $$!!!!!!%%##!!!!!!!!!!!$$&&'$!!!#########%####%%$ ", +" $$!!!!!!!!!!%%##!!!!!!!!!!!$$&$!!!#########%##%%#%%$$ ", +" $$!!!!!!!!!!!!$#%%##!!!!!!!!!!!&$!!!#########%%%#####%!$$ ", +" $$!!!!!!!!!!!!!$####%%##!!!!!!))!!!!!!#########%########%!!$$ ", +" $$!!!!!!!!!!!!!!$#######%%##!!!!**!!!!!!#########%#########%!!!$$ ", +" $!$$!!!!!!!!!!!!$!!!!!####%%##!!!!!!!!!!#########%#########%!!!!!$$ ", +" $!!!$$!!!!!!!!!!$!!!!!!!!###%%##!!!!!!!!#########%#########%!!!!!!!$$ ", +" $!!!!!$$!!!!!!!!$!!!!!!!!!!###%%##!!!!!!#########%#########%!!!!!!!!!$$ ", +" $!!!!!!!$$!!!!!!$!!!!!!!!!!!!###%%##!!!!########%%#########%!!!!!!!!!!!$% ", +" $!!!!!!!!!$$!!!!!$!!!!!!!!!!!!!###%%##!!######%%##########%!!!!!!!!!!###% ", +" $!!!!!!!!!!!$$!!!%$!!!!!!!!!!!!!####%%######%%############%!!!!!!!!#####% ", +" $!!!))!!!!!!!!$!!!%$!!!!!!!!!!!!!!####%%##%%#############%!!!!!!!#######% ", +" $!!!))!!!!!!!!$!!!!%$$!!!!!!!!!!!!!#####%%##############%!!!!!!!!#######% ", +" $!!!**!!!!!!!!!$$!!!%%$$!!!!!!!!!!!!##################%%!!!!!!!#########% ", +" $!!!!!!!!!!!!!!!!$$!!!%%$$$!!!!!!!!!!###############%%!!!!!!!###########% ", +" $!!!!!!!!!!!!!!!!!!$$!!!%%%$$$$$!!!!!!###########%%%!!!!!!!#############% ", +" $!!!!!!!!!!!!!!!!!!!!$$!!!!%%%%%$$$$$$######%%%%%!!!!!!!!###########%%##% ", +" $!!!!!!!!!!!!!!!!!!!!!!$$!!!!!!!%%%%%%%%%%%%!!!!!!!!!!!###########%%%%##% ", +" $!!!!!!!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!!!!!#############%%#%##% ", +" $#!!!!!!!!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!!!!!###############%%#%##% ", +" %%##!!!!!!!!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!!!!!#################%%%%##% ", +" %%##!!!!!!!!!!!!!!!!!!!!!!!!!$$!!!!!!!!!!!!!!###################%#%%##% ", +" %%##!!!!!!!!!!!!!!!##!!!!!!!!$$!!!!!!!!!!#####################%%%%##% ", +" %%##!!!!!!!!!!!!!$$##!!!!!!!!$$!!!!!!!######################%%####% ", +" %%##!!!!!!!!!!!!!$$##!!!!!!!!$$!!!#############################%% ", +" %%##!!!!!!!!!!!!!$$##!!!!!!!!$#############################%% ", +" %%#!!!!!!!!!!!!!!$$##!!!!!!!###########################%% ", +" %##!!!!!!!!!!!!!!$$##!!!!!#########################%% ", +" %%##!!!!!!!!!!!!!!$$!!!!!#######################%% ", +" %%##!!!!!!!!!!!!!!!!!!!#####################%% ", +" %%##!!!!!!!!!!!!!!!!!###################%% ", +" %%##!!!!!!!!!!!!!!!#################%% ", +" %%##!!!!!!!!!!!!!###############%% ", +" %%##!!!!!!!!!!!#############%% ", +" %%##!!!!!!!!!###########%% ", +" %%##!!!!!!!#########%% ", +" %%##!!!!!#######%% ", +" %%##!!!#####%% ", +" %%##!####% ", +" %%###%% ", +" %%% ", +" ", +" ", +" ", +" ", +" ", +" $$ ", +" $$$$$$ $$ ", +" $$!!(($$$$ $$$$$$ ", +" $$!!!!!!(($$$$ $$!!(($$$$ ", +" $$!!!!!!!!!!(($$$$ $$!!!!!!(($$$$ ", +" $$!!!!!!!!!$$!!!(($$$ $!!!!!!!!!!(($$$$ ", +" $$!!###!!!!!$##$!!!!(($$$ $$!!!!!!!!$$!!!(($$$$ ", +" $!!#######!!!!$$!!!!!!!!!#% $$!!##!!!!!$##$!!!!(($$$$ ", +" %##!!######$$!!!!!!!!!!!##% $!!######!!!!$$!!!!!!!!!!#% ", +" %%##!!%#$$$$$$!!!!!!!!#%% %##!!######!!!!!!!!!!!!!##% ", +" %%##$$%!!($$$$!!!!##% %%##!###%%##!!!!!!!!!##%% ", +" $$!!!!!!(($$$$##%% %%#!!%%##!#!!!!!!##%% ", +" $$!!!!!!!!!!(($$$$ %##!!%%##!!!!##%% ", +" $$!!!!!!!!!$$!!!(($$$$ %%##%%!!!!##%% ", +" $$!!###!!!!!$##$!!!!(($$$ %%##!!%##% ", +" $!!#######!!!!$$!!!!!!!!!!% %%##%% ", +" %##!!#######!!!!!!!!!!!!!#% $$ %% ", +" %%##!!###%%##!!!!!!!!!##% $$$$$$ ", +" %%##!!%##!!#!!!!!!##%% $$!!(($$$$ ", +" %%##!!%##%!!!!##%% $$!!!!!!(($$$ ", +" %%##%%!!!!##%% $$!!!!!!!!!!(($$$ ", +" %%##!!%##% $$!!!!!!!!!$$!!!($$$$ ", +" %%##%% $$!!###!!!!!$##$!!!(($$$$ ", +" %% $!!#######!!!!$$!!!!!!!!!#% ", +" %##!!#######!!!!!!!!!!!!##% ", +" %%##!!###%%##!!!!!!!!##%% ", +" %%##!!%##!!#!!!!!##%% ", +" %%##!!%##%!!!!#%% ", +" %%##%%!!!!##% ", +" %%##!!%##% ", +" %%##%% ", +" %% ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/utils/Install/script/license.txt b/utils/Install/script/license.txt new file mode 100644 index 0000000000..f26969ed51 --- /dev/null +++ b/utils/Install/script/license.txt @@ -0,0 +1,26 @@ +wxWindows Library Licence, Version 3 +==================================== + +Copyright (C) 1998 Julian Smart, Robert Roebling [, ...] + +Everyone is permitted to copy and distribute verbatim copies of this licence document, but changing it is not allowed. + +WXWINDOWS LIBRARY LICENCE + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or (at your option) any later version. + +This library 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 Library General Public Licence for more details. + +You should have received a copy of the GNU Library General Public Licence along with this software, usually in a file named COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + +EXCEPTION NOTICE + +1. As a special exception, the copyright holders of this library give permission for additional uses of the text contained in this release of the library as licenced under the wxWindows Library Licence, applying either version 3 of the Licence, or (at your option) any later version of the Licence as published by the copyright holders of version 3 of the Licence document. + +2. The exception is that you may use, copy, link, modify and distribute under the user's own terms, binary object code versions of works based on the Library. + +3. If you copy code from files distributed under the terms of the GNU General Public Licence or the GNU Library General Public Licence into a copy of this library, as this licence permits, the exception does not apply to the code that you add in this way. To avoid misleading anyone as to the status of such modified files, you must delete this exception notice from such code and/or adjust the licensing conditions notice accordingly. + +4. If you write modifications of your own for this library, it is your choice whether to permit this exception to apply to your modifications. If you do not wish that, you must delete the exception notice from such code and/or adjust the licensing conditions notice accordingly. diff --git a/utils/Install/script/nocheck.ini b/utils/Install/script/nocheck.ini new file mode 100644 index 0000000000..7223ff2551 --- /dev/null +++ b/utils/Install/script/nocheck.ini @@ -0,0 +1,5 @@ +# ini file that gets called when the license isn't checked. +# +message,"Please accept the license or exit." +setbutton,101,exit +setbutton,103,page2.ini diff --git a/utils/Install/script/page1.ini b/utils/Install/script/page1.ini new file mode 100644 index 0000000000..af901086e1 --- /dev/null +++ b/utils/Install/script/page1.ini @@ -0,0 +1,12 @@ +# Sample ini file for page one +# +closeold +grabfile,install.bmp +loadwxr,page1.wxr +setbutton,101,exit +setbutton,103,page2.ini +disable,button3 +grabfile,license.txt +mleview,textctrl11,license.txt +remove,license.txt +remove,install.bmp \ No newline at end of file diff --git a/utils/Install/script/page1.wxr b/utils/Install/script/page1.wxr new file mode 100644 index 0000000000..5d0fb778eb --- /dev/null +++ b/utils/Install/script/page1.wxr @@ -0,0 +1,27 @@ +static char *dialog1 = "dialog(name = 'dialog1',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ + title = 'Installing wxInstall 0.1',\ + id = 100,\ + x = 10, y = 10, width = 264, height = 179,\ + background_colour = 'D4D0C8',\ + use_dialog_units = 1,\ + use_system_defaults = 0,\ + font = [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg'],\ + control = [101, wxButton, 'Exit Installer', '0', 'button2', 5, 160, 60, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [102, wxButton, '<< Back', 'wxNO_BORDER', 'button3', 165, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [103, wxButton, 'Next >>', '0', 'button4', 209, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [104, wxStaticBitmap, '', 'wxNO_BORDER', 'static5', 9, 8, 60, 144, 'bitmap9',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [105, wxStaticText, 'Welcome to wxInstall 0.1', '0', 'statictext10', 81, 12, 164, 10, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [106, wxTextCtrl, '', 'wxTE_READONLY | wxTE_MULTILINE', 'textctrl11', 80, 32, 168, 99, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [6001, wxCheckBox, 'I accept the terms of this license.', '0', 'checkbox1', 84, 140, 157, 10, 0,\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']])."; + +static char *bitmap9 = "bitmap(name = 'bitmap9',\ + bitmap = ['install.bmp', wxBITMAP_TYPE_BMP, 'ANY'])."; + diff --git a/utils/Install/script/page2.ini b/utils/Install/script/page2.ini new file mode 100644 index 0000000000..63012d61e2 --- /dev/null +++ b/utils/Install/script/page2.ini @@ -0,0 +1,11 @@ +# Sample ini file for page two +# +getcheck,checkbox1,nocheck.ini +closeold +grabfile,install.bmp +loadwxr,page2.wxr +settext,textctrl1 +setbutton,101,exit +setbutton,102,page1.ini +setbutton,103,page3.ini +remove,install.bmp \ No newline at end of file diff --git a/utils/Install/script/page2.wxr b/utils/Install/script/page2.wxr new file mode 100644 index 0000000000..6d3003e0a8 --- /dev/null +++ b/utils/Install/script/page2.wxr @@ -0,0 +1,27 @@ +static char *dialog1 = "dialog(name = 'dialog1',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ + title = 'Installing wxInstall 0.1',\ + id = 100,\ + x = 10, y = 10, width = 264, height = 179,\ + background_colour = 'D4D0C8',\ + use_dialog_units = 1,\ + use_system_defaults = 0,\ + font = [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg'],\ + control = [101, wxButton, 'Exit Installer', '0', 'button2', 5, 160, 60, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [102, wxButton, '<< Back', 'wxNO_BORDER', 'button3', 165, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [103, wxButton, 'Next >>', '0', 'button4', 209, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [104, wxStaticBitmap, '', 'wxNO_BORDER', 'static5', 9, 8, 60, 144, 'bitmap9',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [105, wxStaticText, 'Choose installation directory', '0', 'statictext10', 81, 12, 164, 10, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [106, wxTextCtrl, '', 'wxTE_READONLY | wxTE_MULTILINE', 'textctrl11', 80, 48, 168, 99, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [6002, wxTextCtrl, '', '0', 'textctrl1', 80, 28, 168, 13, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']])."; + +static char *bitmap9 = "bitmap(name = 'bitmap9',\ + bitmap = ['install.bmp', wxBITMAP_TYPE_BMP, 'ANY'])."; + diff --git a/utils/Install/script/page3.ini b/utils/Install/script/page3.ini new file mode 100644 index 0000000000..24ba2fe411 --- /dev/null +++ b/utils/Install/script/page3.ini @@ -0,0 +1,11 @@ +# Sample ini file for page three +# +gettext,textctrl1 +closeold +grabfile,install.bmp +loadwxr,page3.wxr +setbutton,101,exit +setbutton,102,page2.ini +setbutton,103,page4.ini +setbutton,6004,readme.ini +remove,install.bmp \ No newline at end of file diff --git a/utils/Install/script/page3.wxr b/utils/Install/script/page3.wxr new file mode 100644 index 0000000000..aeb885fecc --- /dev/null +++ b/utils/Install/script/page3.wxr @@ -0,0 +1,29 @@ +static char *dialog1 = "dialog(name = 'dialog1',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ + title = 'Installing wxInstall 0.1',\ + id = 100,\ + x = 10, y = 10, width = 264, height = 179,\ + background_colour = 'D4D0C8',\ + use_dialog_units = 1,\ + use_system_defaults = 0,\ + font = [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg'],\ + control = [101, wxButton, 'Exit Installer', '0', 'button2', 5, 160, 60, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [102, wxButton, '<< Back', 'wxNO_BORDER', 'button3', 165, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [103, wxButton, 'Start', '0', 'button4', 209, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [104, wxStaticBitmap, '', 'wxNO_BORDER', 'static5', 9, 8, 60, 144, 'bitmap9',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [105, wxStaticText, 'Ready to begin installation.', '0', 'statictext10', 81, 12, 164, 10, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [6002, wxStaticText, 'Thanks for trying wxInstall. Feel free to contact me at', '0', 'statictext2', 80, 27, 172, 10, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\ + control = [6003, wxStaticText, 'dbsoft@technologist.com with comments questions or bug reports.', '0', 'statictext3', 80, 36, 181, 6, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [6004, wxButton, 'View Readme', '0', 'button5', 84, 81, 162, 15, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']])."; + +static char *bitmap9 = "bitmap(name = 'bitmap9',\ + bitmap = ['install.bmp', wxBITMAP_TYPE_BMP, 'ANY'])."; + diff --git a/utils/Install/script/page4.ini b/utils/Install/script/page4.ini new file mode 100644 index 0000000000..61417dc75b --- /dev/null +++ b/utils/Install/script/page4.ini @@ -0,0 +1,11 @@ +# Sample ini file for page four +# +remove,readme.txt +closeold +grabfile,install.bmp +loadwxr,page4.wxr +setbutton,101,exit +disable,button3 +disable,button4 +remove,install.bmp +startinst,gauge5,finished.ini \ No newline at end of file diff --git a/utils/Install/script/page4.wxr b/utils/Install/script/page4.wxr new file mode 100644 index 0000000000..c7b59f3d7f --- /dev/null +++ b/utils/Install/script/page4.wxr @@ -0,0 +1,25 @@ +static char *dialog1 = "dialog(name = 'dialog1',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ + title = 'Installing wxInstall 0.1',\ + id = 100,\ + x = 10, y = 10, width = 264, height = 179,\ + background_colour = 'D4D0C8',\ + use_dialog_units = 1,\ + use_system_defaults = 0,\ + font = [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg'],\ + control = [101, wxButton, 'Exit Installer', '0', 'button2', 5, 160, 60, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [102, wxButton, '<< Back', 'wxNO_BORDER', 'button3', 165, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [103, wxButton, 'Next >>', '0', 'button4', 209, 160, 44, 14, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [104, wxStaticBitmap, '', 'wxNO_BORDER', 'static5', 9, 8, 60, 144, 'bitmap9',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [105, wxStaticText, 'Please wait while installing wxInstall...', '0', 'statictext10', 81, 12, 164, 10, '',\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']],\ + control = [6005, wxGauge, '', 'wxGA_HORIZONTAL', 'gauge5', 85, 58, 157, 15, 0, 100,\ + [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Shell Dlg']])."; + +static char *bitmap9 = "bitmap(name = 'bitmap9',\ + bitmap = ['install.bmp', wxBITMAP_TYPE_BMP, 'ANY'])."; + diff --git a/utils/Install/script/readme.ini b/utils/Install/script/readme.ini new file mode 100644 index 0000000000..9dfde93ed7 --- /dev/null +++ b/utils/Install/script/readme.ini @@ -0,0 +1,8 @@ +# Sample ini file for the readme +# +grabfile,readme.txt +system,"notepad readme.txt" +setbutton,101,exit +setbutton,102,page2.ini +setbutton,103,page4.ini +setbutton,6004,readme.ini diff --git a/utils/Install/script/readme.txt b/utils/Install/script/readme.txt new file mode 100644 index 0000000000..6e836c83c5 --- /dev/null +++ b/utils/Install/script/readme.txt @@ -0,0 +1,25 @@ +Ok, this is the first release of wxInstall, my wxWindows port of my +OS/2 installation program. Everything is under the wxWindows license +except for the Infozip code. + +Current Status: + +Archive support: ACE and ZIP. + +Tested platforms: Windows 2000, FreeBSD 4.0 (GTK) + +Todo: + +I need to write a directory browser, since the wxDirCtrl won't work. +I need to add Project support to the wxInstall builder. +Add platform specific code for modifying the startup environment. +--- There is some code for OS/2 (currently unsupported) and Windows --- + +Bugs: + +XPM's crash the installer on Windows. +ZIP archives crash on Windows. + +Thanks! + +You can reach me at dbsoft@technologist.com \ No newline at end of file diff --git a/utils/Install/script/wxinst.cfg b/utils/Install/script/wxinst.cfg new file mode 100644 index 0000000000..0196b54403 --- /dev/null +++ b/utils/Install/script/wxinst.cfg @@ -0,0 +1,62 @@ +# Name of the application being installed +# +INSTALLER_APPLICATION=wxInstall +# +# Version of the application being installed +# +INSTALLER_VERSION=0.1 +# +# What the installer says in the title bar +# +INSTALLER_TITLE=wxInstall Installer +# +# Default install path +# +INSTALLER_PATH=c:\wxInstall +# +# Bitmap Width to avoid sizing problems +# +INSTALLER_BITMAP_WIDTH=100 +# +# Bitmap Height to avoid sizing problems +# +INSTALLER_BITMAP_HEIGHT=275 +# +# Make WPS Program: Title ,Program name, Icon, Destination, ID, setup +# +INSTALLER_PROGRAM=wxInstall,%USERPATH%\wxib.exe,,wxInstall,,,DialogEd,%USERPATH%\dialoged.exe,,wxInstall,, +# +# Make WPS Folder: Folder title, Icon, Destination, ID, setup +# +INSTALLER_FOLDER=wxInstall,,,, +# +# Make WPS Folder: Shadow title, Reference, Destination +# +INSTALLER_SHADOW= +# +# Make a generic object: Title, Class, Destination, ID, setup +# +INSTALLER_OBJECT= +# +# Add SETs to the CONFIG.SYS: Variable, Value, flag +# flag = 1 if the installer should overwrite existing SETs +# flag = 2 if the installer should only create it if it is nonexistant +# +INSTALLER_SETS= +# +# Add System Variables (LIBPATH, PATH, ETC): SysVariable, Value +# +INSTALLER_SYSVAR=LIBPATH,%INSTALLPATH% +# +# Adds a line to the Config.Sys replacing an expandables. +# +INSTALLER_SYSLINE= +# +# Number of packages included in this self extractor. +# +INSTALLER_PACKAGE_COUNT=2 +# +# List of packages. +# +INSTALLER_PACKAGE=misc.ace,Misc. Files +INSTALLER_PACKAGE=wxinst.ace,wxInstall version 0.1 diff --git a/utils/Install/sfxace/globals.c b/utils/Install/sfxace/globals.c new file mode 100644 index 0000000000..fdba0e5509 --- /dev/null +++ b/utils/Install/sfxace/globals.c @@ -0,0 +1,137 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Global variable declarations */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#if defined(__CYGWIN__) +#include +#endif +#include "acestruc.h" +#include "unace.h" +#include +#include + +//-------- Ace sign +const char *acesign = "**ACE**"; + +//-------- Version string for program +const char *version="UNACE v1.1 public version\n"; + +#ifdef AMIGA +//-------- Version string for VERSION program +static char *_version="$VER: Unace Amiga 1.1 "__AMIGADATE__"\n\n"; +#endif + +//-------- header buffer and pointers +thead head; + +tmhead *t_mhead = (tmhead *) & head; +tfhead *t_fhead = (tfhead *) & head; + +//-------- buffers +ULONG *buf_rd =0; +CHAR *buf =0; +CHAR *buf_wr =0; +UCHAR *readbuf =0; + +//-------- decompressor variables +SHORT rpos =0, + dcpr_do =0, + dcpr_do_max =0, + blocksize =0, + dcpr_dic =0, + dcpr_oldnum =0, + bits_rd =0, + dcpr_frst_file =0; +USHORT dcpr_code_mn[1 << maxwd_mn], + dcpr_code_lg[1 << maxwd_lg]; +UCHAR dcpr_wd_mn[maxcode + 2], + dcpr_wd_lg[maxcode + 2], + wd_svwd[svwd_cnt]; +ULONG dcpr_dpos =0, + cpr_dpos2 =0, + dcpr_dicsiz =0, + dcpr_dican =0, + dcpr_size =0, + dcpr_olddist[4]={0,0,0,0}, + code_rd =0; + +CHAR *dcpr_text =0; + +//-------- quicksort +USHORT sort_org[maxcode + 2]; +UCHAR sort_freq[(maxcode + 2) * 2]; + +//-------- file handling +CHAR aname[PATH_MAX]; +INT archan, + wrhan; +#if !defined(__EMX__) && !defined(__OS2__) +FILE *farchan = NULL; +#endif + +LONG skipsize=0; + +//-------- structures for archive handling +struct tadat adat; + +//-------- flags +INT f_err =0, + f_ovrall =0, + f_allvol_pr=0, + f_curpas =0, + f_criterr =0; + + +void resetglobals(void) +{ + t_mhead = (tmhead *) & head; + t_fhead = (tfhead *) & head; + + buf_rd =0; + buf =0; + buf_wr =0; + readbuf =0; + + rpos =0; + dcpr_do =0; + dcpr_do_max =0; + blocksize =0; + dcpr_dic =0; + dcpr_oldnum =0; + bits_rd =0; + dcpr_frst_file =0; + + memset(&dcpr_code_mn, 0, sizeof(dcpr_code_mn)); + memset(&dcpr_code_lg, 0, sizeof(dcpr_code_lg)); + memset(&dcpr_wd_mn, 0, sizeof(dcpr_wd_mn)); + memset(&dcpr_wd_lg, 0, sizeof(dcpr_wd_lg)); + memset(&wd_svwd, 0, sizeof(wd_svwd)); + dcpr_dpos =0; + cpr_dpos2 =0; + dcpr_dicsiz =0; + dcpr_dican =0; + dcpr_size =0; + + memset(&dcpr_olddist, 0, sizeof(dcpr_olddist)); + + code_rd =0; + dcpr_text =0; + + memset(&sort_org, 0, sizeof(sort_org)); + memset(&sort_freq, 0, sizeof(sort_freq)); + + archan=0; + wrhan=0; + skipsize=0; + + f_err =0; + f_ovrall =0; + f_allvol_pr=0; + f_curpas =0; + f_criterr =0; + +} diff --git a/utils/Install/sfxace/install.PRJ b/utils/Install/sfxace/install.PRJ new file mode 100644 index 0000000000..73d30d6ad9 --- /dev/null +++ b/utils/Install/sfxace/install.PRJ @@ -0,0 +1,50 @@ +[Project ID] +Signature=UE Proj: v.1 +[Files] +0=C:\Program Files\wx2\samples\Install\install.c +1=C:\Program Files\wx2\samples\Install\install.h +2=C:\Program Files\wx2\samples\Install\instsup.c +3=C:\Program Files\wx2\samples\Install\makefile +4=C:\Program Files\wx2\samples\Install\wxmain.cpp +[Open Files] +Open File0=C:\Program Files\wx2\samples\Install\makefile +Open File Pos0=2487 +Open File Line0=1545 +Open File Window Pos0=0,1,0,0,-4,-23,22,22,646,423 +Open File1=C:\Program Files\wx2\samples\Install\wxmain.cpp +Open File Pos1=2953 +Open File Line1=0 +Open File Window Pos1=0,1,0,0,-4,-23,110,110,734,511 +Open File2=C:\Program Files\wx2\samples\Install\install.c +Open File Pos2=9875 +Open File Line2=9111 +Open File Window Pos2=0,1,0,0,-4,-23,176,176,800,577 +Open File3=C:\insttmp\winbitchx.cfg +Open File Pos3=229 +Open File Line3=0 +Open File Window Pos3=0,1,0,0,-4,-23,0,0,612,364 +Open File4=C:\Program Files\wx2\samples\Install\instsup.cpp +Open File Pos4=2 +Open File Line4=0 +Open File Window Pos4=0,1,0,0,-4,-23,154,154,788,507 +Open File5=C:\Program Files\wx2\samples\controls\controls.cpp +Open File Pos5=34608 +Open File Line5=34168 +Open File Window Pos5=2,3,0,0,-4,-23,88,88,722,437 +Open File6= +Open File Pos6=203 +Open File Line6=0 +Open File Window Pos6=0,1,0,0,-4,-23,154,154,788,502 +Open File7=C:\Program Files\wx2\src\makeg95.env +Open File Pos7=357 +Open File Line7=0 +Open File Window Pos7=0,1,0,0,-4,-23,0,0,634,348 +Open File8=c:\error.log +Open File Pos8=0 +Open File Line8=0 +Active File Index=5 +Open File Window Pos8=2,3,0,0,-4,-23,22,22,656,370 +Open File9= +Active File Display Mode=3 +[File View] +Current Select=Open Files\ diff --git a/utils/Install/sfxace/install.def b/utils/Install/sfxace/install.def new file mode 100644 index 0000000000..40e70d64c5 --- /dev/null +++ b/utils/Install/sfxace/install.def @@ -0,0 +1,3 @@ +NAME INSTALL WINDOWAPI +DESCRIPTION "Self extracting Installer (C)'99-00 Brian Smith" +STACKSIZE 51200 diff --git a/utils/Install/sfxace/install.rc b/utils/Install/sfxace/install.rc new file mode 100644 index 0000000000..82bdf07561 --- /dev/null +++ b/utils/Install/sfxace/install.rc @@ -0,0 +1,2 @@ +#include "wx/msw/wx.rc" + diff --git a/utils/Install/sfxace/makefile b/utils/Install/sfxace/makefile new file mode 100644 index 0000000000..429b74e760 --- /dev/null +++ b/utils/Install/sfxace/makefile @@ -0,0 +1,47 @@ +# Installer Makefile + +CC = gcc +RM = rm -f +RC = windres + + +DEFS = +LIBS = -lwx_gtk -lpng -ljpeg -lstdc++ -lgcc -lc_r -lgtk -lgdk -lgmodule -lglib -lXext -lX11 -lm -lgthread + +CFLAGS = -g -I.. -I../incace -I/usr/local//include -I/usr/X11R6/include -I/usr/local/lib/glib/include -DSTRICT -D__WXGTK__ -DGTK_NO_CHECK_CASTS -D_REENTRANT -D_IODBC_ -Wall +LDFLAGS = -L/usr/local/lib -L/usr/X11R6/lib -L/usr + +OBJECTS = globals.o install.o uac_comm.o uac_crc.o instsup.o \ + uac_crt.o uac_dcpr.o uac_sys.o unace.o wxmain.o + +SOURCES = globals.c ../install.c uac_comm.c uac_crc.c ../instsup.cpp \ + uac_crt.c uac_dcpr.c uac_sys.c unace.c ../wxmain.cpp + +all: sfx + +$(OBJECTS): + $(CC) $(CFLAGS) -c $< + +packinst: packinst/Makefile Makefile + @cd packinst + $(MAKE) -f Makefile all + +sfx: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o sfx $(OBJECTS) $(LIBS) + +clean: + $(RM) $(OBJECTS) install sfx *~ + +globals.o: globals.c ../incace/globals.h ../incace/acestruc.h ../incace/unace.h +install.o: ../install.c ../install.h ../instsup.h +instsup.o: ../instsup.cpp +uac_comm.o: uac_comm.c ../incace/globals.h ../incace/uac_dcpr.h ../incace/uac_comm.h +uac_crc.o: uac_crc.c ../incace/uac_crc.h +uac_crt.o: uac_crt.c ../incace/os.h ../incace/attribs.h ../incace/globals.h ../incace/uac_crt.h ../incace/uac_sys.h +uac_dcpr.o: uac_dcpr.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +uac_sys.o: uac_sys.c ../incace/os.h ../incace/globals.h ../incace/uac_sys.h +unace.o: unace.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h ../incace/uac_crt.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +wxmain.o: ../wxmain.cpp + diff --git a/utils/Install/sfxace/makefile.b32 b/utils/Install/sfxace/makefile.b32 new file mode 100644 index 0000000000..f324d3be90 --- /dev/null +++ b/utils/Install/sfxace/makefile.b32 @@ -0,0 +1,76 @@ +# +# File: makefile.b32 +# Author: Julian Smart +# Created: 1999 +# Updated: +# Copyright: +# +# Makefile : Builds sample for 32-bit BC++ + +WXDIR = $(WXWIN) + +EXTRACPPFLAGS = /I"..\incace" /I".." +TARGET=sfx +OBJECTS = wxmain.obj instsup.obj install.obj globals.obj uac_comm.obj uac_crc.obj uac_crt.obj uac_dcpr.obj uac_sys.obj unace.obj + +WXDIR = $(WXWIN) +!include $(WXDIR)\src\makeb32.env + +LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff odbc32 + +# Note: you may need to remove some libraries for earlier versions of BC++, as below +#LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32 winpng zlib xpm tiff + +!if "$(FINAL)" == "0" +#LINKFLAGS=/v /c /Tpe $(LNKCFG) $(EXTRALINKFLAGS) +LINKFLAGS=/v /c /aa -L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS) +OPT = -Od +DEBUG_FLAGS= -v +!else +#LINKFLAGS=/Tpe +$(LNKCFG) $(EXTRALINKFLAGS) +LINKFLAGS=/aa -L$(WXLIBDIR);$(WXLIBDIR2);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk $(EXTRALINKFLAGS) +OPT = -O2 +DEBUG_FLAGS = +!endif + +CPPFLAGS=$(DEBUG_FLAGS) $(EXTRACPPFLAGS) $(OPT) @$(CFG) + +all: $(TARGET).exe $(EXTRATARGETS) + +$(TARGET).exe: $(OBJECTS) $(TARGET).res + $(LINK) $(LINKFLAGS) @&&! +c0w32.obj $(OBJECTS) +$(TARGET) +nul +$(LIBS) + +$(TARGET).res +! + +.$(SRCSUFF).obj: + bcc32 $(CPPFLAGS) -c {$< } + +install.obj: ..\install.c + bcc32 $(CPPFLAGS) -P- -c ..\install.c + +wxmain.obj: ..\wxmain.cpp + bcc32 $(CPPFLAGS) -P- -c ..\wxmain.cpp + +instsup.obj: ..\instsup.cpp + bcc32 $(CPPFLAGS) -P- -c ..\instsup.cpp + +.c.obj: + bcc32 $(CPPFLAGS) -P- -c {$< } + +$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc + brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(TARGET) + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + -erase *.tds + -erase *.il? + diff --git a/utils/Install/sfxace/makefile.g95 b/utils/Install/sfxace/makefile.g95 new file mode 100644 index 0000000000..2853f46219 --- /dev/null +++ b/utils/Install/sfxace/makefile.g95 @@ -0,0 +1,53 @@ +# Installer Makefile + +CC = gcc +RM = rm -f +RC = windres + + +DEFS = +LIBS = ../../../lib/libwx.a -lpng -ljpeg -lzlib -lxpm -lstdc++ -lgcc -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lole32 -loleaut32 -luuid -lodbc32 -lwsock32 + +#CFLAGS = -I./include -mno-cygwin -D_X86_=1 -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -I../../include -I../../src/png -I../../src/jpeg -I../../src/zlib -I../../include/wx/msw/gnuwin32 -DSTRICT -D__WXMSW__ -D__WINDOWS__ -D__WXDEBUG__ -Wall -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions +#LDFLAGS = -mno-cygwin -Wl,--subsystem,windows -mwindows -L../../lib +CFLAGS = -g -I../incace -I.. -D_X86_=1 -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -I../../../include -I../../../src/png -I../../../src/jpeg -I../../../src/zlib -I../../../include/wx/msw/gnuwin32 -DSTRICT -D__WXMSW__ -D__WINDOWS__ -D__WXDEBUG__ -Wall -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions +LDFLAGS = -Wl,--subsystem,windows -mwindows -L../../../lib + +OBJECTS = globals.o install.o uac_comm.o uac_crc.o instsup.o \ + uac_crt.o uac_dcpr.o uac_sys.o unace.o wxmain.o instres.o + +SOURCES = globals.c ../install.c uac_comm.c uac_crc.c ../instsup.cpp \ + uac_crt.c uac_dcpr.c uac_sys.c unace.c ../wxmain.cpp + +#all: sfx.exe packinst +all: sfx.exe + +$(OBJECTS): + $(CC) $(CFLAGS) -c $< + +packinst: packinst/Makefile Makefile + @cd packinst + $(MAKE) -f Makefile all + +sfx.exe: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o sfx.exe $(OBJECTS) $(LIBS) + +clean: + $(RM) $(OBJECTS) install.exe install.res sfx.exe + +instres.o: install.rc + $(RC) install.rc instres.o --include-dir ../../../include + +globals.o: globals.c ../incace/globals.h ../incace/acestruc.h ../incace/unace.h +install.o: ../install.c ../install.h ../instsup.h +instsup.o: ../instsup.cpp +uac_comm.o: uac_comm.c ../incace/globals.h ../incace/uac_dcpr.h ../incace/uac_comm.h +uac_crc.o: uac_crc.c ../incace/uac_crc.h +uac_crt.o: uac_crt.c ../incace/os.h ../incace/attribs.h ../incace/globals.h ../incace/uac_crt.h ../incace/uac_sys.h +uac_dcpr.o: uac_dcpr.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +uac_sys.o: uac_sys.c ../incace/os.h ../incace/globals.h ../incace/uac_sys.h +unace.o: unace.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h ../incace/uac_crt.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +wxmain.o: ../wxmain.cpp + diff --git a/utils/Install/sfxace/makefile.gcc b/utils/Install/sfxace/makefile.gcc new file mode 100644 index 0000000000..429b74e760 --- /dev/null +++ b/utils/Install/sfxace/makefile.gcc @@ -0,0 +1,47 @@ +# Installer Makefile + +CC = gcc +RM = rm -f +RC = windres + + +DEFS = +LIBS = -lwx_gtk -lpng -ljpeg -lstdc++ -lgcc -lc_r -lgtk -lgdk -lgmodule -lglib -lXext -lX11 -lm -lgthread + +CFLAGS = -g -I.. -I../incace -I/usr/local//include -I/usr/X11R6/include -I/usr/local/lib/glib/include -DSTRICT -D__WXGTK__ -DGTK_NO_CHECK_CASTS -D_REENTRANT -D_IODBC_ -Wall +LDFLAGS = -L/usr/local/lib -L/usr/X11R6/lib -L/usr + +OBJECTS = globals.o install.o uac_comm.o uac_crc.o instsup.o \ + uac_crt.o uac_dcpr.o uac_sys.o unace.o wxmain.o + +SOURCES = globals.c ../install.c uac_comm.c uac_crc.c ../instsup.cpp \ + uac_crt.c uac_dcpr.c uac_sys.c unace.c ../wxmain.cpp + +all: sfx + +$(OBJECTS): + $(CC) $(CFLAGS) -c $< + +packinst: packinst/Makefile Makefile + @cd packinst + $(MAKE) -f Makefile all + +sfx: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -o sfx $(OBJECTS) $(LIBS) + +clean: + $(RM) $(OBJECTS) install sfx *~ + +globals.o: globals.c ../incace/globals.h ../incace/acestruc.h ../incace/unace.h +install.o: ../install.c ../install.h ../instsup.h +instsup.o: ../instsup.cpp +uac_comm.o: uac_comm.c ../incace/globals.h ../incace/uac_dcpr.h ../incace/uac_comm.h +uac_crc.o: uac_crc.c ../incace/uac_crc.h +uac_crt.o: uac_crt.c ../incace/os.h ../incace/attribs.h ../incace/globals.h ../incace/uac_crt.h ../incace/uac_sys.h +uac_dcpr.o: uac_dcpr.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +uac_sys.o: uac_sys.c ../incace/os.h ../incace/globals.h ../incace/uac_sys.h +unace.o: unace.c ../incace/os.h ../incace/globals.h ../incace/portable.h ../incace/uac_comm.h ../incace/uac_crc.h ../incace/uac_crt.h \ + ../incace/uac_dcpr.h ../incace/uac_sys.h +wxmain.o: ../wxmain.cpp + diff --git a/utils/Install/sfxace/sfx.RES b/utils/Install/sfxace/sfx.RES new file mode 100644 index 0000000000000000000000000000000000000000..09bcebd7887a75a6a5d6fa5fb08771241e46bbfb GIT binary patch literal 13744 zcmeHNO^jT{5w16H?6>}rXN@9^1z|=U5XVJ9(JBUJY%gA0F}AVS;pgH-kRKEWhM#B_ zZ2VqGBqL=d!_iWN$=}5%q~u`9Nc%)0#fO#5DdGg9L<*eZL5{>YjHmN`)!j31o@Zxm zyvBmiyEU(?yQ;dos;jzQ&xnXr0LEBAb)eh^Yzkn^DtS~Mll}6L9FSe|1fE-Eo9xDO z3iwvk_R4gRcVc`^(Ibg0y6RnWtGprKci04;_XE7_?U1rhW*}{^>=`0;Q0BSBipk2H zlAp`Z@b@y-^t3!9Ps(9=PJRqRuA>Ivquh+NlSMAYtvPOgSHBw1_jmi zLbrytlz{&9lrevS*erZJe3)-xQj-8<*6aS+j{UM99<~>shhXWgx|{6G2lr0_+O0s( z)G{q&KPxJW_9-Y+);=XEt-O8g)L^4jWc@5Rgh*vf=v(vhBgie z0yEV_!nd)z-bceH00sgQYyy-3s{trEwOtc>0@TpH2?6jRlK|2fE?2cCX~X?GAn0B} z0HPL%VM5x;o+ZQlXrD&n?TBu>b+#g-Z4~BgR8+34jn>MV8)%~mjJFf;Ius9oDO5!M zQ^O%)vM!bQXMj5w0Ju2YU;UDbUnamh+%H4xrMh{IW4)Rm8d2w4v{daGQ(2 zG3Mj9V)L)n7FcH+``Vv^g|-4~w$Mh1221$T!-#d$h<3YV2jC&ZKVL@Ms+hCYDrL*s zYDME-)Wo?0PpM!}Z2yPI{6?6lk_45hq)?f!6}H||D{Q-~R+!pWE9`u&R=BrV3+^f= zK@rBAzZX33SzgMZtR+fTZv*vqIdc}lTf!zxl*Zk15_ift86R9sU>tA<;8wsoz^X)~kRo`_0>P%gxn;DC_QRK$L-ZrwXd6X2 z8;xO!Oso3uTjO8AkAhYy2~K>PNX)D@PQr!DY1Aq;OXn}P$_tmFVoVQyYT~~iF)?rp519B}!go!4xEvpAmls}bm(IV~qRepN)s$oCSQwLI zBZEh*>O&j80l(1gkz#ug5*XBjEK@ukpQ+<-VyjUmWoO4?eYA}p#o082_p+Vh%V-;o zvjVw!CMGh zhY|^^smv{;atyI80<-}Jcok{z36n&hAwX8KYppNFp(9qg)He#IH0blZEw2jv0Y{b|;80*S6(neAjc{!2bzmpPnQVB2L zDPi{*pb01gH#oO=1Mq2A;tNfUDt=)jo^~+gLtMMb1?uAiQ3Y zkT6z}>EgKjs4ynSf}+H&*CZ}(9e`uNkN)x(GFK}|y;79f@iD25A(x1nNH=n&T}8Yq z4+7fwdep_c5#wKH+`{BU*^C2Z4mLar8?J`^BG@lXt^~MUkOWB0LlZS4Q^H+Sxm{l7 zefANYNBi-|TSi+(+h~2xM#Ey=3fRca<;!}Qn_Ncw5%0!%d*^Svm%DRVE1%%?qXOmO zr4A6N8nfropbzl?N1O)F@RHado+KK}`H3nZku*)gf)K(ef)iUG_(T;z%#{f7FIyTp zJl9{!;bs7jN&|SK0ld-h;vxD3an}&Z7-o`4!w-2vZQVwLa#$2^MUfJ~30-L^0g?8i z5|JP#-dQ})N2^hfw8P<$5V76UV-jJ_ndT(OEo)XA3wPz^w~Zb&$Xoc7wo94OGrz4cpM} z>zk7}-b29x-8*93?4a{+BmiKrE}#uab&FJyA25Gr9?g6@Y~t)m0SQJXEK#_jNy9uo zN^Ne>9G{s@40+gjyqCzvz72XOz6+T*zY#hlk08I}_fP&iB1l9TjD5_cE0rQXZ&Qy7 za(-nU=H~bnmE0?sd9Th&T_$un_5-Bh*-S|qjV&4U?3ri~KkM-`@@u7w>X!Z;Sx5X# zRJZaR{!T+I?&uTj1*><;g#hb`+Xc|Xbe2H$n*A5qi#h<@`0zB2gfD^>Uk{RMC8 zg1m!%!SU^GQV6$SN*rY+xqi7%=xL!UsfngA@ z3&>9?$t7iAw?XyfDT9wqb>OEAtN7-E0<<4h+qkK*8C|SvH%2551ceocgFt0^oCNG% z3eVGn+{vqN1{b>hc$}Zs**0Xpy4?PH#$|B5dHqnG5aSETmBHa}63ysayZamt6>;`b zYRdw9y58Q|l&DW+&!(sep9A>wX}L3sqP;I>&#DMAN`T&Z#apuMc{K?}WAc8*J3VIU zOMRD-KdZu=PZc3`@LlSg9PnClK<;rAp96M~Gco7NRQEI0l;odfexL9``xl zHR2$*@>@0s)Uo*Ca=;$$azHb$DW5^mw>hliZvjVmXNIWqxJhi1*h>*X@RiR2@58FD z^eKLuu>(G3%jn#%nDeJq%5*c&C^v2Q@W+os@hal-AluNWW2g2xB7J4*EDL#1-m2=tUD_pu-(|e=tk~X@+*!k9@*jWc?9f89eX(PM$q?h zbTaqs^L!U%Xs_4~*WMhE|w=X&%NOHKb*@Jd6b=?&6(?H;8a?>M?F2za#j1 ziZjRKq#-SN^z6~P{T&j|BM;h_K)-|(aOaFT+f0k9y6^K3SusbHWL$GJL+qdIRjyv_?-mYZ-;J)My zDZ%eczkkt`D+?m{mxTrUz$dDD$F|(QY}E0R0@eoKUGS{)t;I^WQ5=Z&;}BpJwAA_p zsXiO7UHP)>+^%`&0r=+NN^izGdlR>pbyz1>%=vr3^0e-suHDn2SJ&&`@M_4=Z7eIm zg8bd_3|4s%_0el(47>&4ZTbP~zKo+nu;n^z3M1Kq^-bsNznVHuo3edwy0Me>Db!!W z|8dlJqJw?Yq}ho!^0WTZ6q{`wk9yRvztXQ`!vY~aNKU`qr&-&l(LLwq01DDiPlG`V ze%{CVxO#T})cGWoLm%qvdkzZw~l-?dAR8%eP0y z_cMDiyEn6YwvpM(gR$Z|?C}NtM(yF|toF#-)yW(lm!7~W|Nj%0U}5Z9jr-IPKhiYM>!(jg1lvv;+pdww)8pmS%DI}jw3OcMS-iX-d=1WFjTBDT8NE~I4d|Y_9?&~< PPVc(HPCYqSqxb&-^+!7H literal 0 HcmV?d00001 diff --git a/utils/Install/sfxace/sfx.rc b/utils/Install/sfxace/sfx.rc new file mode 100644 index 0000000000..82bdf07561 --- /dev/null +++ b/utils/Install/sfxace/sfx.rc @@ -0,0 +1,2 @@ +#include "wx/msw/wx.rc" + diff --git a/utils/Install/sfxace/uac_comm.c b/utils/Install/sfxace/uac_comm.c new file mode 100644 index 0000000000..bcea08f4c8 --- /dev/null +++ b/utils/Install/sfxace/uac_comm.c @@ -0,0 +1,51 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Decompresses and outputs comment if present. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include // printf() + +#include "globals.h" +#include "uac_dcpr.h" +#include "uac_comm.h" + +INT comm_cpr_size=0; +CHAR *comm; + +void comment_out(CHAR *top) // outputs comment if present +{ + INT i; + + if (head.HEAD_FLAGS & ACE_COMM) + { // comment present? + if (head.HEAD_TYPE == MAIN_BLK) + { // get begin and size of comment data + comm = (CHAR*)MCOMM; + comm_cpr_size = MCOMM_SIZE; + } + else + { + comm = (CHAR*)FCOMM; + comm_cpr_size = FCOMM_SIZE; + } // limit comment size if too big + i = sizeof(head) - (INT)(comm - (CHAR*) &head); + if (comm_cpr_size > i) + comm_cpr_size = i; + dcpr_comm(i); // decompress comment + +#ifdef AMIGA + { + char *p=comm; + while (*p) + { + if (*p==0x0D) + *p=0x0A; // Replace ms-dos line termination + p++; + } + } +#endif + + pipeit("%s\n\n%s\n\n", top, comm); // output comment + } +} diff --git a/utils/Install/sfxace/uac_crc.c b/utils/Install/sfxace/uac_crc.c new file mode 100644 index 0000000000..3d9335ec72 --- /dev/null +++ b/utils/Install/sfxace/uac_crc.c @@ -0,0 +1,36 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* CRC-calculation routines. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "uac_crc.h" + + +ULONG crctable[256]; +ULONG rd_crc=0; + + +void make_crctable(void) // initializes CRC table +{ + ULONG r, + i, + j; + + for (i = 0; i <= 255; i++) + { + for (r = i, j = 8; j; j--) + r = (r & 1) ? (r >> 1) ^ CRCPOLY : (r >> 1); + crctable[i] = r; + } +} + +// Updates crc from addr till addr+len-1 +// +ULONG getcrc(ULONG crc, UCHAR * addr, INT len) +{ + while (len--) + crc = crctable[(unsigned char) crc ^ (*addr++)] ^ (crc >> 8); + return (crc); +} + diff --git a/utils/Install/sfxace/uac_crt.c b/utils/Install/sfxace/uac_crt.c new file mode 100644 index 0000000000..6a6acdb792 --- /dev/null +++ b/utils/Install/sfxace/uac_crt.c @@ -0,0 +1,303 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Creates/Replaces files or directories. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#ifdef __EMX__ +#include +#include +#include +#endif +#include +#include // printf() remove() +#include // strncpy() +#include +#include // struct stat +#include +#include "install.h" + +#if defined(DOS) || defined(WINNT) || defined(WIN16) + #include // access() +#endif +#if defined(__CYGWIN__) +#include +#endif + +#include "attribs.h" +#include "globals.h" +#include "uac_crt.h" +#include "uac_sys.h" + +#ifdef ENABLE_LOGGING +extern FILE *logfile; +#endif +extern char installdir[400]; + +/* Undocumented functions */ +#if defined(__OS2__) || defined(__EMX__) +APIRET APIENTRY DosReplaceModule(PSZ pszOldModule,PSZ pszNewModule,PSZ pszBackupModule); +#endif + + +/* gets file name from header + */ +CHAR *ace_fname(CHAR * s, thead * head, INT nopath) +{ + INT i; + char *cp; + + strncpy(s, (CHAR*)(*(tfhead *) head).FNAME, i = (*(tfhead *) head).FNAME_SIZE); + s[i] = 0; + + if (nopath) + { + cp=strrchr(s, '\\'); + if (cp) + memmove(s, cp+1, strlen(cp)); + } +#ifdef __UNIX__ + else + { // by current OS seperator + cp=s; + while ((cp=strchr(cp, '\\'))!=NULL) + *cp++='/'; + } +#endif + + return s; +} + +void check_ext_dir(CHAR * f) // checks/creates path of file +{ + char d[1024]; + char buffer[1024]; + int z, flag = 0, len = strlen(f); + + strcpy(buffer, f); + for(z=len;z>-1;z--) + { + if(buffer[z] == '\\') + { + buffer[z+1] = 0; + flag = 1; + z = -1; + } + } + if(!flag) + return; + for(z=0;z 1 && d[1] == ':') + fprintf(logfile, ",%s\r\n", d); + else + { + if(installdir[strlen(installdir)-1] == '\\') + fprintf(logfile, ",%s%s\r\n", installdir, d); + else + fprintf(logfile, ",%s\\%s\r\n", installdir, d); + } + } +#endif + } + } + } + } + + } +} + +INT ovr_delete(CHAR * n) // deletes directory or file +{ + if (remove(n) && rmdir(n)) + { +#if defined(__OS2__) || defined(__EMX__) + DosReplaceModule(n, NULL, NULL); +#endif + if (remove(n) && rmdir(n)) + { + error("Could not delete file or directory: \"%s\" Access denied.", n); + return (1); + } + } + return (0); +} + +INT create_dest_file(CHAR * file, INT a) // creates file or directory +{ + INT han, + i = 0, + ex = fileexists(file); + struct stat st; + extern int no_update; + + check_ext_dir(file); + if (f_err) + return (-1); + if (a & _A_SUBDIR) + { // create dir or file? + if (ex) + { + stat(file, &st); + } + +#if (defined(__OS2__) && !defined(__EMX__)) || (!defined(__CYGWIN__) && defined(WINNT)) + if ((!ex && mkdir(file)) || (ex && (st.st_mode & S_IFDIR))) +#else + if ((!ex && mkdir(file, 0)) || (ex && (st.st_mode & S_IFDIR))) +#endif + { + error("Could not create directory %s."); + return (-1); + } + else + { /* I wonder why it never gets here... :/ BS */ +#ifdef ENABLE_LOGGIN + if(logfile) + fprintf(logfile, ",%s\\%s\r\n", installdir, file); +#endif + } + +#ifdef DOS + _dos_setfileattr(file, a); // set directory attributes +#endif + return (-1); + } + else + { + if (ex) + { // does the file already exist +#if defined(__OS2_) || defined(__EMX__) + static int sddall = 0; + FILESTATUS3 fileinfo; + + f_ovrall = 1; + + DosQueryPathInfo(file, FIL_STANDARD, &fileinfo, sizeof(FILESTATUS3)); + if(!sddall) + { + FDATE fdate; + FTIME ftime; + struct tm tc, tc2; + time_t tt, tt2; + + *((USHORT*)&fdate) = (USHORT)(fhead.FTIME >> 16); + *((USHORT*)&ftime) = (USHORT)fhead.FTIME; + + tc.tm_year = fileinfo.fdateLastWrite.year + 80; + tc.tm_mon = fileinfo.fdateLastWrite.month - 1; + tc.tm_mday = fileinfo.fdateLastWrite.day; + tc.tm_hour = fileinfo.ftimeLastWrite.hours; + tc.tm_min = fileinfo.ftimeLastWrite.minutes; + tc.tm_sec = fileinfo.ftimeLastWrite.twosecs * 2; + + tc2.tm_year = fdate.year + 80; + tc2.tm_mon = fdate.month - 1; + tc2.tm_mday = fdate.day; + tc2.tm_hour = ftime.hours; + tc2.tm_min = ftime.minutes; + tc2.tm_sec = ftime.twosecs * 2; + + if((tt = mktime(&tc)) == -1 || (tt2 = mktime(&tc2)) == -1 || tt > tt2) + { + + if(file[1] == ':') + i = confirm("File \"%s\" has a newer modification time. Overwrite?", file); // prompt for overwrite + else + { + if(installdir[strlen(installdir)-1] == '\\') + i = confirm("File \"%s%s\" has a newer modification time. Overwrite?", installdir, file); // prompt for overwrite + else + i = confirm("File \"%s\\%s\" has a newer modification time. Overwrite?", installdir, file); // prompt for overwrite + } + if(i == 1) + { + sddall = 1; + i = 0; + } + if (i == 3) + f_err = ERR_USER; + if(i) + return -1; + } + } + fileinfo.attrFile = FILE_NORMAL; + DosSetPathInfo(file, FIL_STANDARD, (PVOID)&fileinfo, sizeof(FILESTATUS3), 0); +#endif + if (!f_ovrall) + { + if(installdir[strlen(installdir)-1] == '\\') + i = confirm("Overwrite file \"%s%s\"?", installdir, file); // prompt for overwrite + else + i = confirm("Overwrite file \"%s\\%s\"?", installdir, file); // prompt for overwrite + f_ovrall = (i == 1); + if (i == 3) + f_err = ERR_USER; + } + if ((i && !f_ovrall) || ovr_delete(file)) + return (-1); // delete? + } +#if defined(__OS2_) || defined(__EMX__) || defined(WIN32) + if ((han = open(file, O_WRONLY | O_TRUNC | O_CREAT | O_BINARY, + S_IREAD | S_IWRITE | S_IEXEC | S_IDELETE | + S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH )) < 0) +#else + if ((han = open(file, O_WRONLY | O_TRUNC | O_CREAT, + S_IREAD | S_IWRITE | S_IEXEC | S_IDELETE | + S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH )) < 0) +#endif + error("Could not create destination file \"%s\".", file); + else + { +#ifdef ENABLE_LOGGING + if(logfile) + { + if(!no_update) + { + if(strlen(file) > 1 && file[1] == ':') + fprintf(logfile, ",%s\r\n", file); + else + { + if(installdir[strlen(installdir)-1] == '\\') + fprintf(logfile, ",%s%s\r\n", installdir, file); + else + fprintf(logfile, ",%s\\%s\r\n", installdir, file); + } + } + } +#endif + } + + return (han); + } +} + diff --git a/utils/Install/sfxace/uac_dcpr.c b/utils/Install/sfxace/uac_dcpr.c new file mode 100644 index 0000000000..d6703428ca --- /dev/null +++ b/utils/Install/sfxace/uac_dcpr.c @@ -0,0 +1,554 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* These are the decompression algorithms. */ +/* Don't change here anything (apart from memory allocation perhaps). */ +/* Any changes will very likely cause bugs! */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#if defined(AMIGA) + #include // mem*() +#endif +#if defined(DOS) || defined(WIN16) || defined(WINNT) || defined(OS2) || defined(UNIX) +#if !defined(__CYGWIN__) + #include // mem*() +#endif +#endif + +#include // printf() +#include // malloc() +#include + + +#include "globals.h" +#include "portable.h" +#include "uac_comm.h" +#include "uac_crc.h" +#include "uac_dcpr.h" +#include "uac_sys.h" +#ifdef CRYPT + #include "unace_ps.h" +#endif /* CRYPT */ + + +//------------------------------ QUICKSORT ---------------------------------// +#define xchg_def(v1,v2) {INT dummy;\ + dummy=v1; \ + v1=v2; \ + v2=dummy;} + +void sortrange(INT left, INT right) +{ + INT zl = left, + zr = right, + hyphen; + + hyphen = sort_freq[right]; + + //divides by hyphen the given range into 2 parts + do + { + while (sort_freq[zl] > hyphen) + zl++; + while (sort_freq[zr] < hyphen) + zr--; + //found a too small (left side) and + //a too big (right side) element-->exchange them + if (zl <= zr) + { + xchg_def(sort_freq[zl], sort_freq[zr]); + xchg_def(sort_org[zl], sort_org[zr]); + zl++; + zr--; + } + } + while (zl < zr); + + //sort partial ranges - when very small, sort directly + if (left < zr) + { + if (left < zr - 1) + sortrange(left, zr); + else if (sort_freq[left] < sort_freq[zr]) + { + xchg_def(sort_freq[left], sort_freq[zr]); + xchg_def(sort_org[left], sort_org[zr]); + } + } + + if (right > zl) + { + if (zl < right - 1) + sortrange(zl, right); + else if (sort_freq[zl] < sort_freq[right]) + { + xchg_def(sort_freq[zl], sort_freq[right]); + xchg_def(sort_org[zl], sort_org[right]); + } + } +} + +void quicksort(INT n) +{ + INT i; + + for (i = n + 1; i--;) + sort_org[i] = i; + sortrange(0, n); +} + +//------------------------------ read bits ---------------------------------// +void readdat(void) +{ + UINT i; + + i = (size_rdb - 2) << 2; + rpos -= size_rdb - 2; + buf_rd[0] = buf_rd[size_rdb - 2]; + buf_rd[1] = buf_rd[size_rdb - 1]; + read_adds_blk((CHAR *) & buf_rd[2], i); +#ifdef HI_LO_BYTE_ORDER + { + ULONG *p; + i>>=2; // count LONGs not BYTEs + p=&buf_rd[2]; + while (i--) + { + LONGswap(p); + p++; + } + } +#endif +} + +#define addbits(bits) \ +{ \ + rpos+=(bits_rd+=bits)>>5; \ + bits_rd&=31; \ + if (rpos==(size_rdb-2)) readdat(); \ + code_rd=(buf_rd[rpos] << bits_rd) \ + +((buf_rd[rpos+1] >> (32-bits_rd))&(!bits_rd-1)); \ + } + + +//---------------------- COMMENT DECOMPRESSION -----------------------------// + +#define comm_cpr_hf(a,b) (a+b) + +void dcpr_comm_init(void) +{ + INT i; + + i = comm_cpr_size > size_rdb * sizeof(LONG) ? size_rdb * sizeof(LONG) : comm_cpr_size; + if (!f_err) + memcpy(buf_rd, comm, i); +#ifdef HI_LO_BYTE_ORDER + { + ULONG *p; + i>>=2; // count LONGs not BYTEs + p=buf_rd; + while (i--) + { + LONGswap(p); + p++; + } + } +#endif + code_rd = buf_rd[0]; + rpos = bits_rd = 0; +} + +void dcpr_comm(INT comm_size) +{ + SHORT hash[comm_cpr_hf(255, 255) + 1]; + INT dpos = 0, + c, + pos = 0, + len, + hs; + + memset(&hash, 0, sizeof(hash)); + if (comm_cpr_size) + { + dcpr_comm_init(); + len = code_rd >> (32 - 15); + addbits(15); + if (len >= comm_size) + len = comm_size - 1; + if (read_wd(maxwd_mn, dcpr_code_mn, dcpr_wd_mn, max_cd_mn)) + do + { + if (dpos > 1) + { + pos = hash[hs = comm_cpr_hf(comm[dpos - 1], comm[dpos - 2])]; + hash[hs] = dpos; + } + addbits(dcpr_wd_mn[(c = dcpr_code_mn[code_rd >> (32 - maxwd_mn)])]); + if (rpos == size_rdb - 3) + rpos = 0; + if (c > 255) + { + c -= 256; + c += 2; + while (c--) + comm[dpos++] = comm[pos++]; + } + else + { + comm[dpos++] = c; + } + } + while (dpos < len); + comm[len] = 0; + } +} + +//------------------------- LZW1 DECOMPRESSION -----------------------------// +void wrchar(CHAR ch) +{ + dcpr_do++; + + dcpr_text[dcpr_dpos] = ch; + dcpr_dpos++; + dcpr_dpos &= dcpr_dican; +} + +void copystr(LONG d, INT l) +{ + INT mpos; + + dcpr_do += l; + + mpos = dcpr_dpos - d; + mpos &= dcpr_dican; + + if ((mpos >= dcpr_dicsiz - maxlength) || (dcpr_dpos >= dcpr_dicsiz - maxlength)) + { + while (l--) + { + dcpr_text[dcpr_dpos] = dcpr_text[mpos]; + dcpr_dpos++; + dcpr_dpos &= dcpr_dican; + mpos++; + mpos &= dcpr_dican; + } + } + else + { + while (l--) + dcpr_text[dcpr_dpos++] = dcpr_text[mpos++]; + dcpr_dpos &= dcpr_dican; + } +} + +void decompress(void) +{ + INT c, + lg, + i, + k; + ULONG dist; + + while (dcpr_do < dcpr_do_max) + { + if (!blocksize) + if (!calc_dectabs()) + return; + + addbits(dcpr_wd_mn[(c = dcpr_code_mn[code_rd >> (32 - maxwd_mn)])]); + blocksize--; + if (c > 255) + { + if (c > 259) + { + if ((c -= 260) > 1) + { + dist = (code_rd >> (33 - c)) + (1L << (c - 1)); + addbits(c - 1); + } + else + dist = c; + dcpr_olddist[(dcpr_oldnum = (dcpr_oldnum + 1) & 3)] = dist; + i = 2; + if (dist > maxdis2) + { + i++; + if (dist > maxdis3) + i++; + } + } + else + { + dist = dcpr_olddist[(dcpr_oldnum - (c &= 255)) & 3]; + for (k = c + 1; k--;) + dcpr_olddist[(dcpr_oldnum - k) & 3] = dcpr_olddist[(dcpr_oldnum - k + 1) & 3]; + dcpr_olddist[dcpr_oldnum] = dist; + i = 2; + if (c > 1) + i++; + } + addbits(dcpr_wd_lg[(lg = dcpr_code_lg[code_rd >> (32 - maxwd_lg)])]); + dist++; + lg += i; + copystr(dist, lg); + } + else + wrchar(c); + } +} + +//-------------------------- HUFFMAN ROUTINES ------------------------------// +INT makecode(UINT maxwd, UINT size1_t, UCHAR * wd, USHORT * code) +{ + UINT maxc, + size2_t, + l, + c, + i, + max_make_code; + + memcpy(&sort_freq, wd, (size1_t + 1) * sizeof(CHAR)); + if (size1_t) + quicksort(size1_t); + else + sort_org[0] = 0; + sort_freq[size1_t + 1] = size2_t = c = 0; + while (sort_freq[size2_t]) + size2_t++; + if (size2_t < 2) + { + i = sort_org[0]; + wd[i] = 1; + size2_t += (size2_t == 0); + } + size2_t--; + + max_make_code = 1 << maxwd; + for (i = size2_t + 1; i-- && c < max_make_code;) + { + maxc = 1 << (maxwd - sort_freq[i]); + l = sort_org[i]; + if (c + maxc > max_make_code) + { + dcpr_do = dcpr_do_max; + return (0); + } + memset16(&code[c], l, maxc); + c += maxc; + } + return (1); +} + +INT read_wd(UINT maxwd, USHORT * code, UCHAR * wd, INT max_el) +{ + UINT c, + i, + j, + num_el, + l, + uplim, + lolim; + + memset(wd, 0, max_el * sizeof(CHAR)); + memset(code, 0, (1 << maxwd) * sizeof(SHORT)); + + num_el = code_rd >> (32 - 9); + addbits(9); + if (num_el > max_el) + num_el = max_el; + + lolim = code_rd >> (32 - 4); + addbits(4); + uplim = code_rd >> (32 - 4); + addbits(4); + + for (i = -1; ++i <= uplim;) + { + wd_svwd[i] = code_rd >> (32 - 3); + addbits(3); + } + if (!makecode(maxwd_svwd, uplim, wd_svwd, code)) + return (0); + j = 0; + while (j <= num_el) + { + c = code[code_rd >> (32 - maxwd_svwd)]; + addbits(wd_svwd[c]); + if (c < uplim) + wd[j++] = c; + else + { + l = (code_rd >> 28) + 4; + addbits(4); + while (l-- && j <= num_el) + wd[j++] = 0; + } + } + if (uplim) + for (i = 0; ++i <= num_el;) + wd[i] = (wd[i] + wd[i - 1]) % uplim; + for (i = -1; ++i <= num_el;) + if (wd[i]) + wd[i] += lolim; + + return (makecode(maxwd, num_el, wd, code)); + +} + +INT calc_dectabs(void) +{ + if (!read_wd(maxwd_mn, dcpr_code_mn, dcpr_wd_mn, max_cd_mn) + || !read_wd(maxwd_lg, dcpr_code_lg, dcpr_wd_lg, max_cd_lg)) + return (0); + + blocksize = code_rd >> (32 - 15); + addbits(15); + + return (1); +} + +//---------------------------- BLOCK ROUTINES ------------------------------// +INT decompress_blk(CHAR * buf, UINT len) +{ + LONG old_pos = dcpr_dpos; + INT i; + + dcpr_do = 0; + if ((dcpr_do_max = len - maxlength) > dcpr_size) + dcpr_do_max = dcpr_size; + if ((LONG) dcpr_size > 0 && dcpr_do_max) + { + decompress(); + if (old_pos + dcpr_do > dcpr_dicsiz) + { + i = dcpr_dicsiz - old_pos; + memcpy(buf, &dcpr_text[old_pos], i); + memcpy(&buf[i], dcpr_text, dcpr_do - i); + } + else + memcpy(buf, &dcpr_text[old_pos], dcpr_do); + } + dcpr_size -= dcpr_do; + return (dcpr_do); +} + +INT unstore(CHAR * buf, UINT len) +{ + UINT rd = 0, + i, + pos = 0; + +#ifdef CRYPT + len = crypt_len(len - 8); /* because of decryption */ +#endif /* CRYPT */ + + while ((i = read_adds_blk((CHAR *) buf_rd, (INT) ((i = ((len > dcpr_size) ? dcpr_size : len)) > size_rdb ? size_rdb : i))) != 0) + { + rd += i; + len -= i; + memcpy(&buf[pos], buf_rd, i); + pos += i; + } + dcpr_size -= rd; + for (i = 0; i < rd; i++) + { + dcpr_text[dcpr_dpos] = buf[i]; + dcpr_dpos++; + dcpr_dpos &= dcpr_dican; + } + return (INT)rd; +} + +INT dcpr_adds_blk(CHAR * buf, UINT len) +{ + INT r; + + switch (fhead.TECH.TYPE) + { + case TYPE_STORE: + r = unstore(buf, len); + break; + case TYPE_LZW1: + r = decompress_blk(buf, len); + break; + default: + error("\nFile compressed with unknown method. Decompression not possible.\n"); + f_err = ERR_OTHER; + r = 0; + } + rd_crc = getcrc(rd_crc, (UCHAR*)buf, r); + return r; +} + + +//----------------------------- INIT ROUTINES ------------------------------// +void dcpr_init(void) +{ + dcpr_frst_file = 1; + + dcpr_dic = 20; + while ((dcpr_text = malloc(dcpr_dicsiz = (LONG) 1 << dcpr_dic))==NULL) + dcpr_dic--; + dcpr_dican = dcpr_dicsiz - 1; +} + +void dcpr_init_file(void) +{ + UINT i; + +#ifdef CRYPT + + reset_cryptkey(); + +#else /* CRYPT */ + + if (head.HEAD_FLAGS & ACE_PASSW) + { + error("\nFound passworded file. Decryption not supported.\n"); + f_err = ERR_OTHER; + return; + } + +#endif /* CRYPT */ + + rd_crc = CRC_MASK; + dcpr_size = fhead.SIZE; + if (fhead.TECH.TYPE == TYPE_LZW1) + { + if ((fhead.TECH.PARM & 15) + 10 > dcpr_dic) + { + error("\nNot enough memory or dictionary of archive too large.\n"); + f_err = ERR_MEM; + return; + } + + i = size_rdb * sizeof(LONG); + read_adds_blk((CHAR *) buf_rd, i); +#ifdef HI_LO_BYTE_ORDER + { + ULONG *p; + i>>=2; // count LONGs not BYTEs + p=buf_rd; + while (i--) + { + LONGswap(p); + p++; + } + } +#endif + code_rd = buf_rd[0]; + bits_rd = rpos = 0; + + blocksize = 0; + } + if (!adat.sol || dcpr_frst_file) + dcpr_dpos = 0; + + dcpr_oldnum = 0; + memset(&dcpr_olddist, 0, sizeof(dcpr_olddist)); + + dcpr_frst_file = 0; +} + diff --git a/utils/Install/sfxace/uac_sys.c b/utils/Install/sfxace/uac_sys.c new file mode 100644 index 0000000000..d31e961ea1 --- /dev/null +++ b/utils/Install/sfxace/uac_sys.c @@ -0,0 +1,96 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Some basic things. */ +/* */ +/* ------------------------------------------------------------------------ */ + +#include "os.h" + +#include // signal() +#include // fprintf() fflush() getch() putc() + +#include "globals.h" +#include "uac_sys.h" + + +void memset16(USHORT * dest, SHORT val, INT len) // fills short-array with +{ // value + while (len--) + *(dest++) = val; +} + +INT cancel(void) // checks whether to interrupt the program +{ +#ifdef DOS + while (kbhit()) + { + if (getch() == 27) + f_err = ERR_USER; + } +#endif + return (f_err); +} + +/*INT wrask(CHAR * s) // prompt-routine +{ + INT ch; + + fprintf(stderr, "\n %s (Yes,Always,No,Cancel) ", s); + fflush(stderr); + do + { + ch = getch(); + ch = upcase(ch); + } + while (ch != 'Y' && ch != 'A' && ch != 'N' && ch != 'C' && ch != 27); + fprintf(stderr, "%s", ch == 'Y' ? "Yes" : (ch == 'A' ? "Always" : (ch == 'N' ? "No" : "Cancel"))); + fflush(stderr); + return (ch == 'Y' ? 0 : (ch == 'A' ? 1 : (ch == 'N' ? 2 : 3))); +} */ + +void beep(void) // makes some noise +{ +#ifdef DOS + sound(800); + delay(250); + nosound(); +#endif +#ifdef AMIGA + putc(0x07, stderr); +#endif +} + +void my_signalhandler(INT sig_number) // sets f_err if ctrl+c or ctrl+brk +{ + f_err = ERR_USER; + error("\nUser break\n"); +} + +#ifdef DOS // handles hardware errors +#ifdef __BORLANDC__ +INT harderrhandler(UINT deverr, UINT errc, UINT * devhdr) +#else +INT __far harderrhandler(UINT deverr, UINT errc, UINT * devhdr) +#endif +{ + f_criterr = 'A' + deverr & 0xff; + f_err = ERR_OTHER; + return (0x3); +} +#endif + +void set_handler(void) // initializes handlers +{ +#if defined(DOS) && !defined(__BORLANDC__) + signal(SIGBREAK, my_signalhandler); // set ctrl-break/-c handlers +#endif + signal(SIGINT, my_signalhandler); +#if defined(DOS) && !defined(__CONSOLE__) // set hardware error handler +#ifdef __BORLANDC__ + harderr(harderrhandler); +#else + _harderr(harderrhandler); +#endif +#endif +} + diff --git a/utils/Install/sfxace/unace.c b/utils/Install/sfxace/unace.c new file mode 100644 index 0000000000..f08bdf58ac --- /dev/null +++ b/utils/Install/sfxace/unace.c @@ -0,0 +1,555 @@ +/* ------------------------------------------------------------------------ */ +/* */ +/* Main file of public UNACE. */ +/* */ +/* ------------------------------------------------------------------------ */ + + +#define INCL_WIN /* Window Manager Functions */ +#define INCL_DOS +#define INCL_BASE + + +//--------------- include general files ------------------------------------// +#include // tolower() +#include // open() +#include // printf() sprintf() remove() +#include // malloc() +#include // str*() +#include +#include // S_I* AMIGA: fstat() +#if (!defined(__EMX__) && !defined(__OS2__) && !defined(WINNT) && !defined(WIN32)) || defined(__CYGWIN__) +#include +#endif + +#if !defined(__EMX__) && !defined(__OS2__) && !defined(WIN32) && !defined(WINNT) +#define stricmp strcasecmp +#endif + +#include "install.h" +#include "instsup.h" +extern int installstate; + +off_t acelseek(off_t offset, int whence); +int aceread(void *buf, size_t count); +int aceopen(const char *path, int flags); +int aceclose(int fd); +int acesize(void); +int acetell(int fd); +char *replacestr(char *str1, char *str2, char *str3); + +//--------------- include unace specific header files ----------------------// +#include "os.h" + +#include "globals.h" +#include "portable.h" +#include "uac_comm.h" +#include "uac_crc.h" +#include "uac_crt.h" +#include "uac_dcpr.h" +#include "uac_sys.h" + +#ifdef CRYPT + #include "unace_ps.h" +#endif /* CRYPT */ + + + + +//--------------- BEGIN OF UNACE ROUTINES ----------------------------------// + +int pipeit(char *format, ...) +{ + /* Do nothing ... perhaps pipe this somewhere in the future */ + return 0; +} + +void init_unace(void) // initializes unace +{ + buf_rd =malloc(size_rdb * sizeof(ULONG)); // Allocate buffers: increase + buf =malloc(size_buf); // sizes when possible to speed + buf_wr =malloc(size_wrb); // up the program + readbuf=malloc(size_headrdb); + + if (buf_rd ==NULL || + buf ==NULL || + buf_wr ==NULL || + readbuf==NULL ) + f_err = ERR_MEM; + + make_crctable(); // initialize CRC table + dcpr_init(); // initialize decompression + + set_handler(); // ctrl+break etc. +} + +void done_unace(void) +{ + if (buf_rd ) free(buf_rd ); + if (buf ) free(buf ); + if (buf_wr ) free(buf_wr ); + if (readbuf ) free(readbuf ); + if (dcpr_text) free(dcpr_text); +} + +INT read_header(INT print_err) // reads any header from archive +{ + USHORT rd, + head_size, + crc_ok; + LONG crc; + UCHAR *tp=readbuf; + + acelseek(skipsize, SEEK_CUR); // skip ADDSIZE block + + if (aceread(&head, 4)<4) + return (0); // read CRC and header size + +#ifdef HI_LO_BYTE_ORDER + WORDswap(&head.HEAD_CRC); + WORDswap(&head.HEAD_SIZE); +#endif + // read size_headrdb bytes into + head_size = head.HEAD_SIZE; // header structure + rd = (head_size > size_headrdb) ? size_headrdb : head_size; + if (aceread(readbuf, rd) < rd) + return (0); + head_size -= rd; + crc = getcrc(CRC_MASK, readbuf, rd); + + while (head_size) // skip rest of header + { + rd = (head_size > size_buf) ? size_buf : head_size; + if (aceread(buf, rd) < rd) + return (0); + head_size -= rd; + crc = getcrc(crc, (UCHAR*)buf, rd); + } + + head.HEAD_TYPE =*tp++; // generic buffer to head conversion + head.HEAD_FLAGS=BUFP2WORD(tp); + + if (head.HEAD_FLAGS & ACE_ADDSIZE) + skipsize = head.ADDSIZE = BUF2LONG(tp); // get ADDSIZE + else + skipsize = 0; + + // check header CRC + if (!(crc_ok = head.HEAD_CRC == (crc & 0xffff)) && print_err) + pipeit("\nError: archive is broken\n"); + else + switch (head.HEAD_TYPE) // specific buffer to head conversion + { + case MAIN_BLK: + memcpy(mhead.ACESIGN, tp, acesign_len); tp+=acesign_len; + mhead.VER_MOD=*tp++; + mhead.VER_CR =*tp++; + mhead.HOST_CR=*tp++; + mhead.VOL_NUM=*tp++; + mhead.TIME_CR=BUFP2LONG(tp); + mhead.RES1 =BUFP2WORD(tp); + mhead.RES2 =BUFP2WORD(tp); + mhead.RES =BUFP2LONG(tp); + mhead.AV_SIZE=*tp++; + memcpy(mhead.AV, tp, rd-(USHORT)(tp-readbuf)); + break; + case FILE_BLK: + fhead.PSIZE =BUFP2LONG(tp); + fhead.SIZE =BUFP2LONG(tp); + fhead.FTIME =BUFP2LONG(tp); + fhead.ATTR =BUFP2LONG(tp); + fhead.CRC32 =BUFP2LONG(tp); + fhead.TECH.TYPE =*tp++; + fhead.TECH.QUAL =*tp++; + fhead.TECH.PARM =BUFP2WORD(tp); + fhead.RESERVED =BUFP2WORD(tp); + fhead.FNAME_SIZE=BUFP2WORD(tp); + memcpy(fhead.FNAME, tp, rd-(USHORT)(tp-readbuf)); + break; + // default: (REC_BLK and future things): + // do nothing 'cause isn't needed for extraction + } + + return (crc_ok); +} +// maximum SFX module size +#define max_sfx_size 65536 // (needed by read_arc_head) + +INT read_arc_head(void) // searches for the archive header and reads it +{ + INT i, + flags, + buf_pos = 0; + LONG arc_head_pos, + old_fpos, + fpos = 0; + struct stat st; + + fstat(archan, &st); + + memset(buf, 0, size_buf); + + while (acetell(archan) 0; + adat.vol = (flags & ACE_MULT_VOL) > 0; + adat.vol_num = mhead.VOL_NUM; + adat.time_cr = mhead.TIME_CR; + return (1); + } + } + } + // was no archive header, + // continue search + acelseek(fpos, SEEK_SET); + memcpy(buf, &buf[size_buf - 512], 512); + buf_pos = 512; // keep 512 old bytes + } + return (0); +} + +INT open_archive(INT print_err) // opens archive (or volume) +{ + CHAR av_str[80]; + +#if defined(__OS2_) || defined(__EMX__) || defined(WIN32) + archan = aceopen(aname, O_RDONLY | O_BINARY); // open file +#else + archan = aceopen(aname, O_RDONLY); // open file +#endif +#if !defined(__EMX__) && !defined(__OS2__) + farchan = fdopen(archan, "rb"); +#endif + + if (archan == -1) + { + error("\nError opening file %s", aname); + return (0); + } + if (!read_arc_head()) // read archive header + { + error("Invalid embedded archive file."); +#if !defined(__EMX__) && !defined(__OS2__) + fclose(farchan); +#endif + aceclose(archan); + return (0); + } + + pipeit("\nProcessing archive: %s\n\n", aname); + if (head.HEAD_FLAGS & ACE_AV) + { + pipeit("Authenticity Verification:"); // print the AV + sprintf(av_str, "\ncreated on %d.%d.%d by ", + ts_day(adat.time_cr), ts_month(adat.time_cr), ts_year(adat.time_cr)); + pipeit(av_str); + strncpy(av_str, (CHAR*)mhead.AV, mhead.AV_SIZE); + av_str[mhead.AV_SIZE] = 0; + pipeit("%s\n\n", av_str); + } + comment_out("Main comment:"); // print main comment + return (1); +} + +void get_next_volname(void) // get file name of next volume +{ + CHAR *cp; + INT num; + + if ((cp = (CHAR *) strrchr(aname, '.')) == NULL || !*(cp + 1)) + num = -1; + else + { + cp++; + num = (*(cp + 1) - '0') * 10 + *(cp + 2) - '0'; + if (!in(num, 0, 99)) + num = -1; + if (in(*cp, '0', '9')) + num += (*cp - '0') * 100; + } + num++; + + if (num < 100) + *cp = 'C'; + else + *cp = num / 100 + '0'; + *(cp + 1) = (num / 10) % 10 + '0'; + *(cp + 2) = num % 10 + '0'; +} + +INT proc_vol(void) // opens volume +{ + INT i; + CHAR s[80]; + + if (!fileexists(aname) || !f_allvol_pr) + { + do + { + sprintf(s, "Ready to process %s?", aname); +#if defined(__MINGW32__) + beep(500,500); +#else + beep(); +#endif + i = confirm(s); // ask whether ready or not + f_allvol_pr = (i == 1); // "Always" --> process all volumes + if (i >= 2) + { + f_err = ERR_FOUND; + return (0); + } + } + while (!fileexists(aname)); + } + + if (!open_archive(1)) // open volume + { + pipeit("\nError while opening archive. File not found or archive broken.\n"); + f_err = ERR_OPEN; + return (0); + } + + return (1); +} + +INT proc_next_vol(void) // opens next volume to process +{ +#if !defined(__EMX__) && !defined(__OS2__) + fclose(farchan); +#endif + aceclose(archan); // close handle + get_next_volname(); // get file name of next volume + + if (!proc_vol()) // try to open volume, read archive header + return 0; + if (!read_header(1)) // read 2nd header + { + f_err=ERR_READ; + return 0; + } + return 1; +} + +INT read_adds_blk(CHAR * buffer, INT len) // reads part of ADD_SIZE block +{ + INT rd = 0, + l = len; + LONG i; + +#ifdef CRYPT + char *cbuffer=buffer; + + if (head.HEAD_TYPE == FILE_BLK && (head.HEAD_FLAGS & ACE_PASSW)) + len = crypt_len(len); +#endif /* CRYPT */ + while (!f_err && len && skipsize) + { + i = (skipsize > len) ? len : skipsize; + skipsize -= i; + + /* How do I test failure when compiling -mno-cygwin? */ +#if !defined(__MINGW32__) + errno = 0; +#endif + rd += aceread(buffer, i); +#if !defined(__MINGW32__) + if (errno) + { + error("\nRead error\n"); + f_err = ERR_READ; + } +#endif + + buffer += i; + len -= i; + + if (!skipsize) // if block is continued on next volume + if (head.HEAD_FLAGS & ACE_SP_AFTER && !proc_next_vol()) + break; + } +#ifdef CRYPT + if (head.HEAD_TYPE == FILE_BLK && (head.HEAD_FLAGS & ACE_PASSW)) + decrypt(cbuffer, rd); +#endif /* CRYPT */ + + return (rd > l ? l : rd); +} + +void crc_print(void) // checks CRC, prints message +{ + INT crc_not_ok = rd_crc != fhead.CRC32; /* check CRC of file */ + + if(crc_not_ok && installstate != ABORTED) + error("CRC error reading archive!"); +} + +void analyze_file(void) // analyzes one file (for solid archives) +{ + pipeit("\n Analyzing"); + flush; + while (!cancel() && (dcpr_adds_blk(buf_wr, size_wrb))) // decompress only + ; + crc_print(); +} + +void extract_file(void) // extracts one file +{ + INT rd; + + pipeit("\n Extracting"); + flush; // decompress block + while (!cancel() && (rd = dcpr_adds_blk(buf_wr, size_wrb))) + { + if (write(wrhan, buf_wr, rd) != rd) // write block + { + error("\nWrite error\n"); + f_err = ERR_WRITE; + } + } + crc_print(); +} + + +/* extracts or tests all files of the archive + */ +void extract_files(int nopath, int test, char *getfilename) +{ + CHAR file[PATH_MAX]; + char *tmpfile; + extern unsigned current_file; + extern char installdir2[]; + + while (!cancel() && read_header(1)) + { + if (head.HEAD_TYPE == FILE_BLK) + { + if(installstate == ABORTED) + return; + current_file++; + if(installstate == INSTALLING) + DoGUI(); + + comment_out("File comment:"); // show file comment + ace_fname(file, &head, nopath); // get file name + + /* We allow expansion of "userdir" to the selected directory by the user */ + tmpfile = replacestr(file, "USERDIR", installdir2); + strcpy(file, tmpfile); + free(tmpfile); + + if(!getfilename || (getfilename && stricmp(getfilename, file) == 0)) + { + pipeit("\n%s", file); + flush; + dcpr_init_file(); // initialize decompression of file + if (!f_err) + { + if (test || + (wrhan = create_dest_file(file, (INT) fhead.ATTR))<0) + { + if (test || adat.sol) + analyze_file(); // analyze file + } + else + { + extract_file(); // extract it +#ifdef DOS // set file time + _dos_setftime(wrhan, (USHORT) (fhead.FTIME >> 16), (USHORT) fhead.FTIME); +#endif + close(wrhan); +#if defined(__OS2__) || defined(__EMX__) + { + FILESTATUS3 fileinfo; + + DosQueryPathInfo(file, FIL_STANDARD, &fileinfo, sizeof(FILESTATUS3)); + *((USHORT*)&fileinfo.fdateCreation) = (USHORT)(fhead.FTIME >> 16); + *((USHORT*)&fileinfo.ftimeCreation) = (USHORT)fhead.FTIME; + *((USHORT*)&fileinfo.fdateLastAccess) = (USHORT)(fhead.FTIME >> 16); + *((USHORT*)&fileinfo.ftimeLastAccess) = (USHORT)fhead.FTIME; + *((USHORT*)&fileinfo.fdateLastWrite) = (USHORT)(fhead.FTIME >> 16); + *((USHORT*)&fileinfo.ftimeLastWrite) = (USHORT)fhead.FTIME; + DosSetPathInfo(file, FIL_STANDARD, (PVOID)&fileinfo, sizeof(FILESTATUS3), 0); + } +#endif +#ifdef DOS // set file attributes + _dos_setfileattr(file, (UINT) fhead.ATTR); +#endif +#ifdef AMIGA + { // set file date and time + struct DateTime dt; + char Date[9], Time[9]; + ULONG tstamp=fhead.FTIME; + + sprintf(Date, "%02d-%02d-%02d", ts_year(tstamp)-1900, ts_month(tstamp), ts_day(tstamp)); + sprintf(Time, "%02d:%02d:%02d", ts_hour(tstamp), ts_min(tstamp), ts_sec(tstamp)); + + dt.dat_Format = FORMAT_INT; + dt.dat_Flags = 0; + dt.dat_StrDate= Date; + dt.dat_StrTime= Time; + + if (StrToDate(&dt)) + SetFileDate(file, &dt.dat_Stamp); + } +#endif + if (f_err) + remove(file); + } + } + } + } + } +} + +unsigned percentage(ULONG p, ULONG d) +{ + return (unsigned)( d ? (d/2+p*100)/d : 100 ); +} + +int installer_unpack(CHAR * filename, int operation) // processes the archive +{ + init_unace(); // initialize unace + strcpy(aname, "installer"); // get archive name + + if(filename) + f_ovrall=1; + + if (open_archive(1)) // open archive to process + { + if (adat.vol_num) + pipeit("\nFirst volume of archive required!\n"); + else + { + if(operation == 2) + extract_files(0, 0, filename); + } +#if !defined(__EMX__) && !defined(__OS2__) + fclose(farchan); +#endif + aceclose(archan); + if (f_err) + { + pipeit("\nError occurred\n"); + if (f_criterr) + pipeit("Critical error on drive %c\n", f_criterr); + } + } + + done_unace(); + return 0; +} diff --git a/utils/Install/sfxzip/api.c b/utils/Install/sfxzip/api.c new file mode 100644 index 0000000000..5a4e73abf8 --- /dev/null +++ b/utils/Install/sfxzip/api.c @@ -0,0 +1,601 @@ +/*--------------------------------------------------------------------------- + + api.c + + This module supplies an UnZip engine for use directly from C/C++ + programs. The functions are: + + UzpVer *UzpVersion(void); + void UzpVersion2(UzpVer2 *version) + int UzpMain(int argc, char *argv[]); + int UzpAltMain(int argc, char *argv[], UzpInit *init); + int UzpValidate(char *archive, int AllCodes); + void UzpFreeMemBuffer(UzpBuffer *retstr); + int UzpUnzipToMemory(char *zip, char *file, UzpOpts *optflgs, + UzpCB *UsrFuncts, UzpBuffer *retstr); + + non-WINDLL only (a special WINDLL variant is defined in windll/windll.c): + int UzpGrep(char *archive, char *file, char *pattern, int cmd, int SkipBin, + UzpCB *UsrFuncts); + + OS/2 only (for now): + int UzpFileTree(char *name, cbList(callBack), char *cpInclude[], + char *cpExclude[]); + + You must define `DLL' in order to include the API extensions. + + ---------------------------------------------------------------------------*/ + + +#ifdef OS2 +# define INCL_DOSMEMMGR +# include +#endif +#include + +#define UNZIP_INTERNAL +#include "unzip.h" +#include "version.h" +#ifdef WINDLL +# include "windll/windll.h" +#endif + +#ifdef DLL /* This source file supplies DLL-only interface code. */ + +jmp_buf dll_error_return; + +/*--------------------------------------------------------------------------- + Documented API entry points + ---------------------------------------------------------------------------*/ + + +UzpVer * UZ_EXP UzpVersion() /* should be pointer to const struct */ +{ + static UzpVer version; /* doesn't change between calls */ + + + version.structlen = UZPVER_LEN; + +#ifdef BETA + version.flag = 1; +#else + version.flag = 0; +#endif + version.betalevel = BETALEVEL; + version.date = VERSION_DATE; + +#ifdef ZLIB_VERSION + version.zlib_version = ZLIB_VERSION; + version.flag |= 2; +#else + version.zlib_version = NULL; +#endif + + /* someday each of these may have a separate patchlevel: */ + version.unzip.major = UZ_MAJORVER; + version.unzip.minor = UZ_MINORVER; + version.unzip.patchlevel = PATCHLEVEL; + + version.zipinfo.major = ZI_MAJORVER; + version.zipinfo.minor = ZI_MINORVER; + version.zipinfo.patchlevel = PATCHLEVEL; + + /* these are retained for backward compatibility only: */ + version.os2dll.major = UZ_MAJORVER; + version.os2dll.minor = UZ_MINORVER; + version.os2dll.patchlevel = PATCHLEVEL; + + version.windll.major = UZ_MAJORVER; + version.windll.minor = UZ_MINORVER; + version.windll.patchlevel = PATCHLEVEL; + + return &version; +} + +void UZ_EXP UzpVersion2(UzpVer2 *version) +{ + + version->structlen = UZPVER_LEN; + +#ifdef BETA + version->flag = 1; +#else + version->flag = 0; +#endif + strcpy(version->betalevel, BETALEVEL); + strcpy(version->date, VERSION_DATE); + +#ifdef ZLIB_VERSION + strcpy(version->zlib_version, ZLIB_VERSION); + version->flag |= 2; +#else + version->zlib_version[0] = '\0'; +#endif + + /* someday each of these may have a separate patchlevel: */ + version->unzip.major = UZ_MAJORVER; + version->unzip.minor = UZ_MINORVER; + version->unzip.patchlevel = PATCHLEVEL; + + version->zipinfo.major = ZI_MAJORVER; + version->zipinfo.minor = ZI_MINORVER; + version->zipinfo.patchlevel = PATCHLEVEL; + + /* these are retained for backward compatibility only: */ + version->os2dll.major = UZ_MAJORVER; + version->os2dll.minor = UZ_MINORVER; + version->os2dll.patchlevel = PATCHLEVEL; + + version->windll.major = UZ_MAJORVER; + version->windll.minor = UZ_MINORVER; + version->windll.patchlevel = PATCHLEVEL; +} + + + + + +#ifndef WINDLL + +int UZ_EXP UzpAltMain(int argc, char *argv[], UzpInit *init) +{ + int r, (*dummyfn)(); + + + CONSTRUCTGLOBALS(); + + if (init->structlen >= (sizeof(ulg) + sizeof(dummyfn)) && init->msgfn) + G.message = init->msgfn; + + if (init->structlen >= (sizeof(ulg) + 2*sizeof(dummyfn)) && init->inputfn) + G.input = init->inputfn; + + if (init->structlen >= (sizeof(ulg) + 3*sizeof(dummyfn)) && init->pausefn) + G.mpause = init->pausefn; + + if (init->structlen >= (sizeof(ulg) + 4*sizeof(dummyfn)) && init->userfn) + (*init->userfn)(); /* allow void* arg? */ + + r = unzip(__G__ argc, argv); + DESTROYGLOBALS() + RETURN(r); +} + +#endif /* !WINDLL */ + + + + +#ifndef __16BIT__ + +void UZ_EXP UzpFreeMemBuffer(UzpBuffer *retstr) +{ + if (retstr->strptr != NULL) { + free(retstr->strptr); + retstr->strptr = NULL; + } +} + + + + +#ifndef WINDLL + +static int UzpDLL_Init OF((zvoid *pG, UzpCB *UsrFuncts)); + +static int UzpDLL_Init(pG, UsrFuncts) +zvoid *pG; +UzpCB *UsrFuncts; +{ + int (*dummyfn)(); + + if (UsrFuncts->structlen >= (sizeof(ulg) + sizeof(dummyfn)) && + UsrFuncts->msgfn) + ((Uz_Globs *)pG)->message = UsrFuncts->msgfn; + else + return FALSE; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 2*sizeof(dummyfn)) && + UsrFuncts->inputfn) + ((Uz_Globs *)pG)->input = UsrFuncts->inputfn; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 3*sizeof(dummyfn)) && + UsrFuncts->pausefn) + ((Uz_Globs *)pG)->mpause = UsrFuncts->pausefn; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 4*sizeof(dummyfn)) && + UsrFuncts->passwdfn) + ((Uz_Globs *)pG)->decr_passwd = UsrFuncts->passwdfn; + + if (UsrFuncts->structlen >= (sizeof(ulg) + 5*sizeof(dummyfn)) && + UsrFuncts->statrepfn) + ((Uz_Globs *)pG)->statreportcb = UsrFuncts->statrepfn; + + return TRUE; +} + + +int UZ_EXP UzpUnzipToMemory(char *zip, char *file, UzpOpts *optflgs, + UzpCB *UsrFuncts, UzpBuffer *retstr) +{ + int r; +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) + char *intern_zip, *intern_file; +#endif + + CONSTRUCTGLOBALS(); +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) + intern_zip = (char *)malloc(strlen(zip)+1); + if (intern_zip == NULL) { + DESTROYGLOBALS() + return PK_MEM; + } + intern_file = (char *)malloc(strlen(file)+1); + if (intern_file == NULL) { + DESTROYGLOBALS() + free(intern_zip); + return PK_MEM; + } + ISO_TO_INTERN(zip, intern_zip); + ISO_TO_INTERN(file, intern_file); +# define zip intern_zip +# define file intern_file +#endif + /* Copy those options that are meaningful for UzpUnzipToMemory, instead of + * a simple "memcpy(G.UzO, optflgs, sizeof(UzpOpts));" + */ + uO.pwdarg = optflgs->pwdarg; + uO.aflag = optflgs->aflag; + uO.C_flag = optflgs->C_flag; + uO.qflag = optflgs->qflag; /* currently, overridden in unzipToMemory */ + + if (!UzpDLL_Init((zvoid *)&G, UsrFuncts)) { + DESTROYGLOBALS(); + return PK_BADERR; + } + G.redirect_data = 1; + + r = (unzipToMemory(__G__ zip, file, retstr) <= PK_WARN); + + DESTROYGLOBALS() +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) +# undef file +# undef zip + free(intern_file); + free(intern_zip); +#endif + if (!r && retstr->strlength) { + free(retstr->strptr); + retstr->strptr = NULL; + } + return r; +} +#endif /* !WINDLL */ +#endif /* !__16BIT__ */ + + + + + +#ifdef OS2DLL + +int UZ_EXP UzpFileTree(char *name, cbList(callBack), char *cpInclude[], + char *cpExclude[]) +{ + int r; + + CONSTRUCTGLOBALS(); + uO.qflag = 2; + uO.vflag = 1; + uO.C_flag = 1; + G.wildzipfn = name; + G.process_all_files = TRUE; + if (cpInclude) { + char **ptr = cpInclude; + + while (*ptr != NULL) ptr++; + G.filespecs = ptr - cpInclude; + G.pfnames = cpInclude, G.process_all_files = FALSE; + } + if (cpExclude) { + char **ptr = cpExclude; + + while (*ptr != NULL) ptr++; + G.xfilespecs = ptr - cpExclude; + G.pxnames = cpExclude, G.process_all_files = FALSE; + } + + G.processExternally = callBack; + r = process_zipfiles(__G)==0; + DESTROYGLOBALS() + return r; +} + +#endif /* OS2DLL */ + + + + +/*--------------------------------------------------------------------------- + Helper functions + ---------------------------------------------------------------------------*/ + + +void setFileNotFound(__G) + __GDEF +{ + G.filenotfound++; +} + + + +int unzipToMemory(__GPRO__ char *zip, char *file, UzpBuffer *retstr) +{ + int r; + char *incname[2]; + + G.process_all_files = FALSE; + G.extract_flag = TRUE; + uO.qflag = 2; + G.wildzipfn = zip; + + G.pfnames = incname; + incname[0] = file; + incname[1] = NULL; + G.filespecs = 1; + + r = process_zipfiles(__G); + if (retstr) { + retstr->strptr = (char *)G.redirect_buffer; + retstr->strlength = G.redirect_size; + } + return r; /* returns `PK_???' error values */ +} + + + +int redirect_outfile(__G) + __GDEF +{ + if (G.redirect_size != 0 || G.redirect_buffer != NULL) + return FALSE; + +#ifndef NO_SLIDE_REDIR + G.redirect_slide = !G.pInfo->textmode; +#endif + G.redirect_size = (G.pInfo->textmode ? + G.lrec.ucsize * lenEOL : G.lrec.ucsize); +#ifdef OS2 + DosAllocMem((void **)&G.redirect_buffer, G.redirect_size+1, + PAG_READ|PAG_WRITE|PAG_COMMIT); + G.redirect_pointer = G.redirect_buffer; +#else +#ifdef __16BIT__ + if ((ulg)((extent)G.redirect_size) != G.redirect_size) + return FALSE; +#endif + G.redirect_pointer = G.redirect_buffer = malloc(G.redirect_size+1); +#endif + if (!G.redirect_buffer) + return FALSE; + G.redirect_pointer[G.redirect_size] = '\0'; + return TRUE; +} + + + +int writeToMemory(__GPRO__ uch *rawbuf, ulg size) +{ + if (rawbuf != G.redirect_pointer) + memcpy(G.redirect_pointer,rawbuf,size); + G.redirect_pointer += size; + return 0; +} + + + + +int close_redirect(__G) + __GDEF +{ + if (G.pInfo->textmode) { + *G.redirect_pointer = '\0'; + G.redirect_size = G.redirect_pointer - G.redirect_buffer; + if ((G.redirect_buffer = + realloc(G.redirect_buffer, G.redirect_size + 1)) == NULL) { + G.redirect_size = 0; + return EOF; + } + } + return 0; +} + + + + +#ifndef __16BIT__ +#ifndef WINDLL + +/* Purpose: Determine if file in archive contains the string szSearch + + Parameters: archive = archive name + file = file contained in the archive. This cannot be + a wild card to be meaningful + pattern = string to search for + cmd = 0 - case-insensitive search + 1 - case-sensitve search + 2 - case-insensitive, whole words only + 3 - case-sensitive, whole words only + SkipBin = if true, skip any files that have control + characters other than CR, LF, or tab in the first + 100 characters. + + Returns: TRUE if a match is found + FALSE if no match is found + -1 on error + + Comments: This does not pretend to be as useful as the standard + Unix grep, which returns the strings associated with a + particular pattern, nor does it search past the first + matching occurrence of the pattern. + */ + +int UZ_EXP UzpGrep(char *archive, char *file, char *pattern, int cmd, + int SkipBin, UzpCB *UsrFuncts) +{ + int retcode = FALSE, compare; + ulg i, j, patternLen, buflen; + char * sz, *p; + UzpOpts flgopts; + UzpBuffer retstr; + + memzero(&flgopts, sizeof(UzpOpts)); /* no special options */ + + if (!UzpUnzipToMemory(archive, file, &flgopts, UsrFuncts, &retstr)) { + return -1; /* not enough memory, file not found, or other error */ + } + + if (SkipBin) { + if (retstr.strlength < 100) + buflen = retstr.strlength; + else + buflen = 100; + for (i = 0; i < buflen; i++) { + if (iscntrl(retstr.strptr[i])) { + if ((retstr.strptr[i] != 0x0A) && + (retstr.strptr[i] != 0x0D) && + (retstr.strptr[i] != 0x09)) + { + /* OK, we now think we have a binary file of some sort */ + free(retstr.strptr); + return FALSE; + } + } + } + } + + patternLen = strlen(pattern); + + if (retstr.strlength < patternLen) { + free(retstr.strptr); + return FALSE; + } + + sz = malloc(patternLen + 3); /* add two in case doing whole words only */ + if (cmd > 1) { + strcpy(sz, " "); + strcat(sz, pattern); + strcat(sz, " "); + } else + strcpy(sz, pattern); + + if ((cmd == 0) || (cmd == 2)) { + for (i = 0; i < strlen(sz); i++) + sz[i] = toupper(sz[i]); + for (i = 0; i < retstr.strlength; i++) + retstr.strptr[i] = toupper(retstr.strptr[i]); + } + + for (i = 0; i < (retstr.strlength - patternLen); i++) { + p = &retstr.strptr[i]; + compare = TRUE; + for (j = 0; j < patternLen; j++) { + /* We cannot do strncmp here, as we may be dealing with a + * "binary" file, such as a word processing file, or perhaps + * even a true executable of some sort. */ + if (p[j] != sz[j]) { + compare = FALSE; + break; + } + } + if (compare == TRUE) { + retcode = TRUE; + break; + } + } + + free(sz); + free(retstr.strptr); + + return retcode; +} +#endif /* !WINDLL */ +#endif /* !__16BIT__ */ + + + + +int UZ_EXP UzpValidate(char *archive, int AllCodes) +{ + int retcode; + CONSTRUCTGLOBALS(); + + uO.jflag = 1; + uO.tflag = 1; + uO.overwrite_none = 0; + G.extract_flag = (!uO.zipinfo_mode && + !uO.cflag && !uO.tflag && !uO.vflag && !uO.zflag +#ifdef TIMESTAMP + && !uO.T_flag +#endif + ); + + uO.qflag = 2; /* turn off all messages */ + G.fValidate = TRUE; + G.pfnames = (char **)&fnames[0]; /* assign default filename vector */ +#ifdef WINDLL + Wiz_NoPrinting(TRUE); +#endif + + if (archive == NULL) { /* something is screwed up: no filename */ + DESTROYGLOBALS(); + return PK_NOZIP; + } + + G.wildzipfn = (char *)malloc(FILNAMSIZ + 1); + strcpy(G.wildzipfn, archive); +#if (defined(WINDLL) && !defined(CRTL_CP_IS_ISO)) + _ISO_INTERN(G.wildzipfn); +#endif + + G.process_all_files = TRUE; /* for speed */ + + retcode = setjmp(dll_error_return); + + if (retcode) { +#ifdef WINDLL + Wiz_NoPrinting(FALSE); +#endif + free(G.wildzipfn); + DESTROYGLOBALS(); + return PK_BADERR; + } + + retcode = process_zipfiles(__G); + + free(G.wildzipfn); +#ifdef WINDLL + Wiz_NoPrinting(FALSE); +#endif + DESTROYGLOBALS(); + + /* PK_WARN == 1 and PK_FIND == 11. When we are just looking at an + archive, we should still be able to see the files inside it, + even if we can't decode them for some reason. + + We also still want to be able to get at files even if there is + something odd about the zip archive, hence allow PK_WARN, + PK_FIND, IZ_UNSUP as well as PK_ERR + */ + + if (AllCodes) + return retcode; + + if ((retcode == PK_OK) || (retcode == PK_WARN) || (retcode == PK_ERR) || + (retcode == IZ_UNSUP) || (retcode == PK_FIND)) + return TRUE; + else + return FALSE; +} + +#endif /* DLL */ diff --git a/utils/Install/sfxzip/apihelp.c b/utils/Install/sfxzip/apihelp.c new file mode 100644 index 0000000000..1a0d682cdd --- /dev/null +++ b/utils/Install/sfxzip/apihelp.c @@ -0,0 +1,147 @@ +/* apihelp.c */ + +#ifdef API_DOC + +#define UNZIP_INTERNAL +#include "unzip.h" +#include "version.h" + + +APIDocStruct APIDoc[] = { + { + "UZPVERSION" , "UzpVersion" , + "UzpVer *UzpVersion(void);", + "Get version numbers of the API and the underlying UnZip code.\n\n" + "\t\tThis is used for comparing the version numbers of the run-time\n" + "\t\tDLL code with those expected from the unzip.h at compile time.\n" + "\t\tIf the version numbers do not match, there may be compatibility\n" + "\t\tproblems with further use of the DLL.\n\n" + " Example:\t/* Check the major version number of the DLL code. */\n" + "\t\tUzpVer *pVersion;\n" + "\t\tpVersion = UzpVersion();\n" + "\t\tif (pVersion->unzip.major != UZ_MAJORVER)\n" + "\t\t fprintf(stderr, \"error: using wrong version of DLL\\n\");\n\n" + "\t\tSee unzip.h for details and unzipstb.c for an example.\n" + }, + + { + "UZPMAIN" , "UzpMain" , + "int UzpMain(int argc, char *argv[]);", + "Provide a direct entry point to the command line interface.\n\n" + "\t\tThis is used by the UnZip stub but you can use it in your\n" + "\t\town program as well. Output is sent to stdout.\n" + "\t\t0 on return indicates success.\n\n" + " Example:\t/* Extract 'test.zip' silently, junking paths. */\n" + "\t\tchar *argv[] = { \"-q\", \"-j\", \"test.zip\" };\n" + "\t\tint argc = 3;\n" + "\t\tif (UzpMain(argc,argv))\n" + "\t\t printf(\"error: unzip failed\\n\");\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { + "UZPALTMAIN" , "UzpAltMain" , + "int UzpAltMain(int argc, char *argv[], UzpInit *init);", + "Provide a direct entry point to the command line interface,\n" + "optionally installing replacement I/O handler functions.\n\n" + "\t\tAs with UzpMain(), output is sent to stdout by default.\n" + "\t\t`InputFn *inputfn' is not yet implemented. 0 on return\n" + "\t\tindicates success.\n\n" + " Example:\t/* Replace normal output and `more' functions. */\n" + "\t\tchar *argv[] = { \"-q\", \"-j\", \"test.zip\" };\n" + "\t\tint argc = 3;\n" + "\t\tUzpInit init = { 16, MyMessageFn, NULL, MyPauseFn };\n" + "\t\tif (UzpAltMain(argc,argv,&init))\n" + "\t\t printf(\"error: unzip failed\\n\");\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { + "UZPUNZIPTOMEMORY", "UzpUnzipToMemory", + "int UzpUnzipToMemory(char *zip, char *file, UzpBuffer *retstr);", + "Pass the name of the zip file and the name of the file\n" + "\t\tyou wish to extract. UzpUnzipToMemory will create a\n" + "\t\tbuffer and return it in *retstr; 0 on return indicates\n" + "\t\tfailure.\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { + "UZPFILETREE", "UzpFileTree", + "int UzpFileTree(char *name, cbList(callBack),\n" + "\t\t\tchar *cpInclude[], char *cpExclude[]);", + "Pass the name of the zip file, a callback function, an\n" + "\t\tinclude and exclude file list. UzpFileTree calls the\n" + "\t\tcallback for each valid file found in the zip file.\n" + "\t\t0 on return indicates failure.\n\n" + "\t\tSee unzip.h for details.\n" + }, + + { 0 } +}; + + +static int function_help OF((__GPRO__ APIDocStruct *doc, char *fname)); + + + +static int function_help(__G__ doc, fname) + __GDEF + APIDocStruct *doc; + char *fname; +{ + strcpy(slide, fname); + /* strupr(slide); non-standard */ + while (doc->compare && STRNICMP(doc->compare,slide,strlen(fname))) + doc++; + if (!doc->compare) + return 0; + else + Info(slide, 0, ((char *)slide, + " Function:\t%s\n\n Syntax:\t%s\n\n Purpose:\t%s", + doc->function, doc->syntax, doc->purpose)); + + return 1; +} + + + +void APIhelp(__G__ argc, argv) + __GDEF + int argc; + char **argv; +{ + if (argc > 1) { + struct APIDocStruct *doc; + + if (function_help(__G__ APIDoc, argv[1])) + return; +#ifdef SYSTEM_API_DETAILS + if (function_help(__G__ SYSTEM_API_DETAILS, argv[1])) + return; +#endif + Info(slide, 0, ((char *)slide, + "%s is not a documented command.\n\n", argv[1])); + } + + Info(slide, 0, ((char *)slide, "\ +This API provides a number of external C and REXX functions for handling\n\ +zipfiles in OS/2. Programmers are encouraged to expand this API.\n\ +\n\ +C functions: -- See unzip.h for details\n\ + UzpVer *UzpVersion(void);\n\ + int UzpMain(int argc, char *argv[]);\n\ + int UzpAltMain(int argc, char *argv[], UzpInit *init);\n\ + int UzpUnzipToMemory(char *zip, char *file, UzpBuffer *retstr);\n\ + int UzpFileTree(char *name, cbList(callBack),\n\ + char *cpInclude[], char *cpExclude[]);\n\n")); + +#ifdef SYSTEM_API_BRIEF + Info(slide, 0, ((char *)slide, SYSTEM_API_BRIEF)); +#endif + + Info(slide, 0, ((char *)slide, + "\nFor more information, type 'unzip -A '\n")); +} + +#endif /* API_DOC */ diff --git a/utils/Install/sfxzip/crc32.c b/utils/Install/sfxzip/crc32.c new file mode 100644 index 0000000000..cd05536108 --- /dev/null +++ b/utils/Install/sfxzip/crc32.c @@ -0,0 +1,56 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* $Id$ */ + +#define __CRC32_C /* identifies this source module */ + +#include "zip.h" + +#ifndef USE_ZLIB +#ifndef ASM_CRC + +#ifndef ZCONST +# define ZCONST const +#endif + +#ifdef CRC32 +# undef CRC32 +#endif +#define CRC32(c, b) (crc_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) +#define DO1(buf) crc = CRC32(crc, *buf++) +#define DO2(buf) DO1(buf); DO1(buf) +#define DO4(buf) DO2(buf); DO2(buf) +#define DO8(buf) DO4(buf); DO4(buf) + +/* ========================================================================= */ +ulg crc32(crc, buf, len) + register ulg crc; /* crc shift register */ + register ZCONST uch *buf; /* pointer to bytes to pump through */ + extent len; /* number of bytes in buf[] */ +/* Run a set of bytes through the crc shift register. If buf is a NULL + pointer, then initialize the crc shift register contents instead. + Return the current crc in either case. */ +{ + register ZCONST ulg near *crc_table; + + if (buf == NULL) return 0L; + + crc_table = get_crc_table(); + + crc = crc ^ 0xffffffffL; +#ifndef NO_UNROLLED_LOOPS + while (len >= 8) { + DO8(buf); + len -= 8; + } +#endif + if (len) do { + DO1(buf); + } while (--len); + return crc ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */ +} +#endif /* !ASM_CRC */ +#endif /* !USE_ZLIB */ diff --git a/utils/Install/sfxzip/crc_i386.S b/utils/Install/sfxzip/crc_i386.S new file mode 100644 index 0000000000..5d0867f0e1 --- /dev/null +++ b/utils/Install/sfxzip/crc_i386.S @@ -0,0 +1,230 @@ +/* + * crc_i386.S, optimized CRC calculation function for Zip and UnZip, not + * copyrighted by Paul Kienitz and Christian Spieler. Last revised 12 Oct 97. + * + * GRR 961110: incorporated Scott Field optimizations from win32/crc_i386.asm + * => overall 6% speedup in "unzip -tq" on 9MB zipfile (486-66) + * + * SPC 970402: revised for Rodney Brown's optimizations (32-bit-wide + * aligned reads for most of the data from buffer), can be + * disabled by defining the macro NO_32_BIT_LOADS + * + * SPC 971012: added Rodney Brown's additional tweaks for 32-bit-optimized + * CPUs (like the Pentium Pro, Pentium II, and probably some + * Pentium clones). This optimization is controlled by the + * preprocessor switch "__686" and is disabled by default. + * (This default is based on the assumption that most users + * do not yet work on a Pentium Pro or Pentium II machine ...) + * + * FLAT memory model assumed. Calling interface: + * - args are pushed onto the stack from right to left, + * - return value is given in the EAX register, + * - all other registers (with exception of EFLAGS) are preserved. (With + * GNU C 2.7.x, %edx and %ecx are `scratch' registers, but preserving + * them nevertheless adds only 4 single byte instructions.) + * + * This source generates the function + * ulg crc32(ulg crc, ZCONST uch *buf, ulg len). + * + * The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. + * This results in shorter code at the expense of reduced performance. + */ + +/* This file is NOT used in conjunction with zlib. */ +#ifndef USE_ZLIB + +/* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix + * external symbols with an underline character '_'. + */ +#if defined(NO_UNDERLINE) || defined(__ELF__) +# define _crc32 crc32 +# define _get_crc_table get_crc_table +#endif +/* Use 16-byte alignment if your assembler supports it. Warning: gas + * uses a log(x) parameter (.align 4 means 16-byte alignment). On SVR4 + * the parameter is a number of bytes. + */ +#ifndef ALIGNMENT +# define ALIGNMENT .align 4,0x90 +#endif + +#if defined(i386) || defined(_i386) || defined(_I386) || defined(__i386) + +/* This version is for 386 Unix, OS/2, MSDOS in 32 bit mode (gcc & gas). + * Warning: it uses the AT&T syntax: mov source,dest + * This file is only optional. If you want to use the C version, + * remove -DASM_CRC from CFLAGS in Makefile and set OBJA to an empty string. + */ + + .file "crc_i386.S" + +#if defined(NO_STD_STACKFRAME) && defined(USE_STD_STACKFRAME) +# undef USE_STACKFRAME +#else + /* The default is to use standard stack frame entry, because it + * results in smaller code! + */ +# ifndef USE_STD_STACKFRAME +# define USE_STD_STACKFRAME +# endif +#endif + +#ifdef USE_STD_STACKFRAME +# define _STD_ENTRY pushl %ebp ; movl %esp,%ebp +# define arg1 8(%ebp) +# define arg2 12(%ebp) +# define arg3 16(%ebp) +# define _STD_LEAVE popl %ebp +#else /* !USE_STD_STACKFRAME */ +# define _STD_ENTRY +# define arg1 24(%esp) +# define arg2 28(%esp) +# define arg3 32(%esp) +# define _STD_LEAVE +#endif /* ?USE_STD_STACKFRAME */ + +/* + * These two (three) macros make up the loop body of the CRC32 cruncher. + * registers modified: + * eax : crc value "c" + * esi : pointer to next data byte (or lword) "buf++" + * registers read: + * edi : pointer to base of crc_table array + * scratch registers: + * ebx : index into crc_table array + * (requires upper three bytes = 0 when __686 is undefined) + */ +#ifndef __686 /* optimize for 386, 486, Pentium */ +#define Do_CRC /* c = (c >> 8) ^ table[c & 0xFF] */\ + movb %al, %bl ;/* tmp = c & 0xFF */\ + shrl $8, %eax ;/* c = (c >> 8) */\ + xorl (%edi, %ebx, 4), %eax ;/* c ^= table[tmp] */ +#else /* __686 : optimize for Pentium Pro and compatible CPUs */ +#define Do_CRC /* c = (c >> 8) ^ table[c & 0xFF] */\ + movzbl %al, %ebx ;/* tmp = c & 0xFF */\ + shrl $8, %eax ;/* c = (c >> 8) */\ + xorl (%edi, %ebx, 4), %eax ;/* c ^=table[tmp] */ +#endif /* ?__686 */ + +#define Do_CRC_byte /* c = (c >> 8) ^ table[(c^*buf++)&0xFF] */\ + xorb (%esi), %al ;/* c ^= *buf */\ + incl %esi ;/* buf++ */\ + Do_CRC + +#ifndef NO_32_BIT_LOADS +#define Do_CRC_lword \ + xorl (%esi), %eax ;/* c ^= *(ulg *)buf */\ + addl $4, %esi ;/* ((ulg *)buf)++ */\ + Do_CRC \ + Do_CRC \ + Do_CRC \ + Do_CRC +#endif /* !NO_32_BIT_LOADS */ + + + .text + + .globl _crc32 + +_crc32: /* ulg crc32(ulg crc, uch *buf, extent len) */ + _STD_ENTRY + pushl %edi + pushl %esi + pushl %ebx + pushl %edx + pushl %ecx + + movl arg2, %esi /* 2nd arg: uch *buf */ + subl %eax, %eax /* > if (!buf) */ + testl %esi, %esi /* > return 0; */ + jz .L_fine /* > else { */ + call _get_crc_table + movl %eax, %edi + movl arg1, %eax /* 1st arg: ulg crc */ +#ifndef __686 + subl %ebx, %ebx /* ebx=0; bl usable as dword */ +#endif + movl arg3, %ecx /* 3rd arg: extent len */ + notl %eax /* > c = ~crc; */ + +#ifndef NO_UNROLLED_LOOPS +# ifndef NO_32_BIT_LOADS + testl %ecx, %ecx + jz .L_bail + /* Assert now have positive length */ +.L_align_loop: + testl $3, %esi /* Align buf on lword boundary */ + jz .L_aligned_now + Do_CRC_byte + decl %ecx + jnz .L_align_loop +.L_aligned_now: +# endif /* !NO_32_BIT_LOADS */ + movl %ecx, %edx /* save len in edx */ + andl $7, %edx /* edx = len % 8 */ + shrl $3, %ecx /* ecx = len / 8 */ + jz .L_No_Eights +/* align loop head at start of 486 internal cache line !! */ + ALIGNMENT +.L_Next_Eight: +# ifndef NO_32_BIT_LOADS + /* Do_CRC_lword */ + xorl (%esi), %eax ;/* c ^= *(ulg *)buf */ + addl $4, %esi ;/* ((ulg *)buf)++ */ + Do_CRC + Do_CRC + Do_CRC + Do_CRC + /* Do_CRC_lword */ + xorl (%esi), %eax ;/* c ^= *(ulg *)buf */ + addl $4, %esi ;/* ((ulg *)buf)++ */ + Do_CRC + Do_CRC + Do_CRC + Do_CRC +# else /* NO_32_BIT_LOADS */ + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte +# endif /* ?NO_32_BIT_LOADS */ + decl %ecx + jnz .L_Next_Eight + +.L_No_Eights: + movl %edx, %ecx +#endif /* NO_UNROLLED_LOOPS */ + +#ifndef NO_JECXZ_SUPPORT + jecxz .L_bail /* > if (len) */ +#else + testl %ecx, %ecx /* > if (len) */ + jz .L_bail +#endif +/* align loop head at start of 486 internal cache line !! */ + ALIGNMENT +.L_loupe: /* > do { */ + Do_CRC_byte /* c = CRC32(c, *buf++); */ + decl %ecx /* > } while (--len); */ + jnz .L_loupe + +.L_bail: /* > } */ + notl %eax /* > return ~c; */ +.L_fine: + popl %ecx + popl %edx + popl %ebx + popl %esi + popl %edi + _STD_LEAVE + ret + +#else + error: this asm version is for 386 only +#endif /* i386 || _i386 || _I386 || __i386 */ + +#endif /* !USE_ZLIB */ diff --git a/utils/Install/sfxzip/crc_i386.asm b/utils/Install/sfxzip/crc_i386.asm new file mode 100644 index 0000000000..ea29282286 --- /dev/null +++ b/utils/Install/sfxzip/crc_i386.asm @@ -0,0 +1,229 @@ +; crc_i386.asm, optimized CRC calculation function for Zip and UnZip, not +; copyrighted by Paul Kienitz and Christian Spieler. Last revised 25 Mar 98. +; +; Revised 06-Oct-96, Scott Field (sfield@microsoft.com) +; fixed to assemble with masm by not using .model directive which makes +; assumptions about segment alignment. Also, +; avoid using loop, and j[e]cxz where possible. Use mov + inc, rather +; than lodsb, and other misc. changes resulting in the following performance +; increases: +; +; unrolled loops NO_UNROLLED_LOOPS +; *8 >8 <8 *8 >8 <8 +; +; +54% +42% +35% +82% +52% +25% +; +; first item in each table is input buffer length, even multiple of 8 +; second item in each table is input buffer length, > 8 +; third item in each table is input buffer length, < 8 +; +; Revised 02-Apr-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) +; Incorporated Rodney Brown's 32-bit-reads optimization as found in the +; UNIX AS source crc_i386.S. This new code can be disabled by defining +; the macro symbol NO_32_BIT_LOADS. +; +; Revised 12-Oct-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) +; Incorporated Rodney Brown's additional tweaks for 32-bit-optimized CPUs +; (like the Pentium Pro, Pentium II, and probably some Pentium clones). +; This optimization is controlled by the macro symbol __686 and is disabled +; by default. (This default is based on the assumption that most users +; do not yet work on a Pentium Pro or Pentium II machine ...) +; +; FLAT memory model assumed. +; +; The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. +; This results in shorter code at the expense of reduced performance. +; +; Revised 25-Mar-98, Cosmin Truta (cosmint@cs.ubbcluj.ro) +; Working without .model directive caused tasm32 version 5.0 to produce +; bad object code. The optimized alignments can be optionally disabled +; by defining NO_ALIGN, thus allowing to use .model flat. There is no need +; to define this macro if using other version of tasm. +; +;============================================================================== +; +; Do NOT assemble this source if external crc32 routine from zlib gets used. +; + IFNDEF USE_ZLIB +; + .386p + name crc_i386 + + IFDEF NO_ALIGN + .model flat + ENDIF + +extrn _get_crc_table:near ; ZCONST ulg near *get_crc_table(void); + +; + IFNDEF NO_STD_STACKFRAME + ; Use a `standard' stack frame setup on routine entry and exit. + ; Actually, this option is set as default, because it results + ; in smaller code !! +STD_ENTRY MACRO + push ebp + mov ebp,esp + ENDM + + Arg1 EQU 08H[ebp] + Arg2 EQU 0CH[ebp] + Arg3 EQU 10H[ebp] + +STD_LEAVE MACRO + pop ebp + ENDM + + ELSE ; NO_STD_STACKFRAME + +STD_ENTRY MACRO + ENDM + + Arg1 EQU 18H[esp] + Arg2 EQU 1CH[esp] + Arg3 EQU 20H[esp] + +STD_LEAVE MACRO + ENDM + + ENDIF ; ?NO_STD_STACKFRAME + +; These two (three) macros make up the loop body of the CRC32 cruncher. +; registers modified: +; eax : crc value "c" +; esi : pointer to next data byte (or dword) "buf++" +; registers read: +; edi : pointer to base of crc_table array +; scratch registers: +; ebx : index into crc_table array +; (requires upper three bytes = 0 when __686 is undefined) + IFNDEF __686 ; optimize for 386, 486, Pentium +Do_CRC MACRO + mov bl,al ; tmp = c & 0xFF + shr eax,8 ; c = (c >> 8) + xor eax,[edi+ebx*4] ; ^ table[tmp] + ENDM + ELSE ; __686 : optimize for Pentium Pro, Pentium II and compatible CPUs +Do_CRC MACRO + movzx ebx,al ; tmp = c & 0xFF + shr eax,8 ; c = (c >> 8) + xor eax,[edi+ebx*4] ; ^ table[tmp] + ENDM + ENDIF ; ?__686 +Do_CRC_byte MACRO + xor al, byte ptr [esi] ; c ^= *buf + inc esi ; buf++ + Do_CRC ; c = (c >> 8) ^ table[c & 0xFF] + ENDM + IFNDEF NO_32_BIT_LOADS +Do_CRC_dword MACRO + xor eax, dword ptr [esi] ; c ^= *(ulg *)buf + add esi, 4 ; ((ulg *)buf)++ + Do_CRC + Do_CRC + Do_CRC + Do_CRC + ENDM + ENDIF ; !NO_32_BIT_LOADS + + IFNDEF NO_ALIGN +_TEXT segment use32 para public 'CODE' + ELSE +_TEXT segment use32 + ENDIF + assume CS: _TEXT + + public _crc32 +_crc32 proc near ; ulg crc32(ulg crc, ZCONST uch *buf, extent len) + STD_ENTRY + push edi + push esi + push ebx + push edx + push ecx + + mov esi,Arg2 ; 2nd arg: uch *buf + sub eax,eax ;> if (!buf) + test esi,esi ;> return 0; + jz fine ;> else { + + call _get_crc_table + mov edi,eax + mov eax,Arg1 ; 1st arg: ulg crc + IFNDEF __686 + sub ebx,ebx ; ebx=0; make bl usable as a dword + ENDIF + mov ecx,Arg3 ; 3rd arg: extent len + not eax ;> c = ~crc; + + IFNDEF NO_UNROLLED_LOOPS + IFNDEF NO_32_BIT_LOADS + test ecx,ecx + je bail +align_loop: + test esi,3 ; align buf pointer on next + jz SHORT aligned_now ; dword boundary + Do_CRC_byte + dec ecx + jnz align_loop +aligned_now: + ENDIF ; !NO_32_BIT_LOADS + mov edx,ecx ; save len in edx + and edx,000000007H ; edx = len % 8 + shr ecx,3 ; ecx = len / 8 + jz SHORT No_Eights + IFNDEF NO_ALIGN +; align loop head at start of 486 internal cache line !! + align 16 + ENDIF +Next_Eight: + IFNDEF NO_32_BIT_LOADS + Do_CRC_dword + Do_CRC_dword + ELSE ; NO_32_BIT_LOADS + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + Do_CRC_byte + ENDIF ; ?NO_32_BIT_LOADS + dec ecx + jnz Next_Eight +No_Eights: + mov ecx,edx + + ENDIF ; NO_UNROLLED_LOOPS + IFNDEF NO_JECXZ_SUPPORT + jecxz bail ;> if (len) + ELSE + test ecx,ecx ;> if (len) + jz SHORT bail + ENDIF + IFNDEF NO_ALIGN +; align loop head at start of 486 internal cache line !! + align 16 + ENDIF +loupe: ;> do { + Do_CRC_byte ; c = CRC32(c, *buf++); + dec ecx ;> } while (--len); + jnz loupe + +bail: ;> } + not eax ;> return ~c; +fine: + pop ecx + pop edx + pop ebx + pop esi + pop edi + STD_LEAVE + ret +_crc32 endp + +_TEXT ends +; + ENDIF ; !USE_ZLIB +; +end diff --git a/utils/Install/sfxzip/crc_i386.c b/utils/Install/sfxzip/crc_i386.c new file mode 100644 index 0000000000..72e2c6b9dc --- /dev/null +++ b/utils/Install/sfxzip/crc_i386.c @@ -0,0 +1,215 @@ +/* crc_i386.c -- Microsoft 32-bit C/C++ adaptation of crc_i386.asm + * Created by Rodney Brown from crc_i386.asm, modified by Chr. Spieler. + * Last revised: 22-Mai-1998 + * + * Original coded (in crc_i386.asm) and put into the public domain + * by Paul Kienitz and Christian Spieler. + * + * Revised 06-Oct-96, Scott Field (sfield@microsoft.com) + * fixed to assemble with masm by not using .model directive which makes + * assumptions about segment alignment. Also, + * avoid using loop, and j[e]cxz where possible. Use mov + inc, rather + * than lodsb, and other misc. changes resulting in the following performance + * increases: + * + * unrolled loops NO_UNROLLED_LOOPS + * *8 >8 <8 *8 >8 <8 + * + * +54% +42% +35% +82% +52% +25% + * + * first item in each table is input buffer length, even multiple of 8 + * second item in each table is input buffer length, > 8 + * third item in each table is input buffer length, < 8 + * + * Revised 02-Apr-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) + * Incorporated Rodney Brown's 32-bit-reads optimization as found in the + * UNIX AS source crc_i386.S. This new code can be disabled by defining + * the macro symbol NO_32_BIT_LOADS. + * + * Revised 12-Oct-97, Chr. Spieler, based on Rodney Brown (rdb@cmutual.com.au) + * Incorporated Rodney Brown's additional tweaks for 32-bit-optimized CPUs + * (like the Pentium Pro, Pentium II, and probably some Pentium clones). + * This optimization is controlled by the macro symbol __686 and is disabled + * by default. (This default is based on the assumption that most users + * do not yet work on a Pentium Pro or Pentium II machine ...) + * + * Revised 16-Nov-97, Chr. Spieler: Made code compatible with Borland C++ + * 32-bit, removed unneeded kludge for potentially unknown movzx mnemonic, + * confirmed correct working with MS VC++ (32-bit). + * + * Revised 22-Mai-98, Peter Kunath, Chr. Spieler : The 16-Nov-97 revision broke + * MSVC 5.0. Inside preprocessor macros, each instruction is enclosed in its + * own __asm {...} construct. For MSVC, a "#pragma warning" was added to + * shut up the "no return value" warning message. + * + * FLAT memory model assumed. + * + * The loop unrolling can be disabled by defining the macro NO_UNROLLED_LOOPS. + * This results in shorter code at the expense of reduced performance. + * + */ + +#include "zip.h" + +#ifndef USE_ZLIB + +#ifndef ZCONST +# define ZCONST const +#endif + +/* Select wether the following inline-assember code is supported. */ +#if (defined(_MSC_VER) && _MSC_VER >= 700) +#if (defined(_M_IX86) && _M_IX86 >= 300) +# define MSC_INLINE_ASM_32BIT_SUPPORT + /* Disable warning for no return value, typical of asm functions */ +# pragma warning( disable : 4035 ) +#endif +#endif + +#if (defined(__BORLANDC__) && __BORLANDC__ >= 452) +# define MSC_INLINE_ASM_32BIT_SUPPORT +#endif + +#ifdef MSC_INLINE_ASM_32BIT_SUPPORT +/* This code is intended for Microsoft C/C++ (32-bit) compatible compilers. */ + +/* + * These two (three) macros make up the loop body of the CRC32 cruncher. + * registers modified: + * eax : crc value "c" + * esi : pointer to next data byte (or dword) "buf++" + * registers read: + * edi : pointer to base of crc_table array + * scratch registers: + * ebx : index into crc_table array + * (requires upper three bytes = 0 when __686 is undefined) + */ +#ifndef __686 +#define Do_CRC { \ + __asm { mov bl, al }; \ + __asm { shr eax, 8 }; \ + __asm { xor eax, [edi+ebx*4] }; } +#else /* __686 */ +#define Do_CRC { \ + __asm { movzx ebx, al }; \ + __asm { shr eax, 8 }; \ + __asm { xor eax, [edi+ebx*4] }; } +#endif /* ?__686 */ + +#define Do_CRC_byte { \ + __asm { xor al, byte ptr [esi] }; \ + __asm { inc esi }; \ + Do_CRC; } + +#ifndef NO_32_BIT_LOADS +#define Do_CRC_dword { \ + __asm { xor eax, dword ptr [esi] }; \ + __asm { add esi, 4 }; \ + Do_CRC; \ + Do_CRC; \ + Do_CRC; \ + Do_CRC; } +#endif /* !NO_32_BIT_LOADS */ + +/* ========================================================================= */ +ulg crc32(crc, buf, len) + ulg crc; /* crc shift register */ + ZCONST uch *buf; /* pointer to bytes to pump through */ + extent len; /* number of bytes in buf[] */ +/* Run a set of bytes through the crc shift register. If buf is a NULL + pointer, then initialize the crc shift register contents instead. + Return the current crc in either case. */ +{ + __asm { + push edx + push ecx + + mov esi,buf ;/* 2nd arg: uch *buf */ + sub eax,eax ;/*> if (!buf) */ + test esi,esi ;/*> return 0; */ + jz fine ;/*> else { */ + + call get_crc_table + mov edi,eax + mov eax,crc ;/* 1st arg: ulg crc */ +#ifndef __686 + sub ebx,ebx ;/* ebx=0; => bl usable as a dword */ +#endif + mov ecx,len ;/* 3rd arg: extent len */ + not eax ;/*> c = ~crc; */ + +#ifndef NO_UNROLLED_LOOPS +# ifndef NO_32_BIT_LOADS + test ecx,ecx + je bail +align_loop: + test esi,3 ;/* align buf pointer on next */ + jz aligned_now ;/* dword boundary */ + } + Do_CRC_byte ; + __asm { + dec ecx + jnz align_loop +aligned_now: +# endif /* !NO_32_BIT_LOADS */ + mov edx,ecx ;/* save len in edx */ + and edx,000000007H ;/* edx = len % 8 */ + shr ecx,3 ;/* ecx = len / 8 */ + jz No_Eights +; align loop head at start of 486 internal cache line !! + align 16 +Next_Eight: + } +# ifndef NO_32_BIT_LOADS + Do_CRC_dword ; + Do_CRC_dword ; +# else /* NO_32_BIT_LOADS */ + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; + Do_CRC_byte ; +# endif /* ?NO_32_BIT_LOADS */ + __asm { + dec ecx + jnz Next_Eight +No_Eights: + mov ecx,edx + +#endif /* NO_UNROLLED_LOOPS */ +#ifndef NO_JECXZ_SUPPORT + jecxz bail ;/*> if (len) */ +#else + test ecx,ecx ;/*> if (len) */ + jz bail +#endif +; align loop head at start of 486 internal cache line !! + align 16 +loupe: ;/*> do { */ + } + Do_CRC_byte ;/* c = CRC32(c, *buf++); */ + __asm { + dec ecx ;/*> } while (--len); */ + jnz loupe + +bail: ;/*> } */ + not eax ;/*> return ~c; */ +fine: + pop ecx + pop edx + } +#ifdef NEED_RETURN + return _EAX; +#endif +} +#endif /* MSC_INLINE_ASM_32BIT_SUPPORT */ +#if (defined(_MSC_VER) && _MSC_VER >= 700) +#if (defined(_M_IX86) && _M_IX86 >= 300) + /* Reenable missing return value warning */ +# pragma warning( default : 4035 ) +#endif +#endif +#endif /* !USE_ZLIB */ diff --git a/utils/Install/sfxzip/crc_lcc.asm b/utils/Install/sfxzip/crc_lcc.asm new file mode 100644 index 0000000000..b3288a833e --- /dev/null +++ b/utils/Install/sfxzip/crc_lcc.asm @@ -0,0 +1,108 @@ +; crc_lcc.asm, optimized CRC calculation function for Zip and UnZip, not +; copyrighted by Paul Kienitz and Christian Spieler. Last revised 25 Mar 98. +; +; The code in this file has been copied verbatim from crc_i386.{asm|S}; +; only the assembler syntax and metacommands have been adapted to +; the habits of the free LCC-Win32 C compiler package. +; This version of the code uses the "optimized for i686" variant of +; crc_i386.{asm|S}. +; +; For more information (and a revision log), look into the original +; source files. +; + .text + .file "crc32.c" + .text + .type _crc32,function +_crc32: + pushl %ebp + movl %esp,%ebp + pushl %ecx + pushl %ebx + pushl %esi + pushl %edi + .line 34 + .line 37 + movl 12(%ebp),%esi + subl %eax,%eax + testl %esi,%esi + jz _$3 + .line 39 + call _get_crc_table + movl %eax,%edi + .line 41 + movl 8(%ebp),%eax + movl 16(%ebp),%ecx + notl %eax + testl %ecx,%ecx + jz _$4 +_$5: + testl $3,%esi + jz _$6 + xorb (%esi),%al + incl %esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + decl %ecx + jnz _$5 +_$6: + movl %ecx,%edx + andl $7,%edx + shrl $3,%ecx + jz _$8 +_$7: + xorl (%esi),%eax + addl $4,%esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + xorl (%esi),%eax + addl $4,%esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + decl %ecx + jnz _$7 +_$8: + movl %edx,%ecx + jecxz _$4 +_$9: + xorb (%esi),%al + incl %esi + movzbl %al,%ebx + shrl $8,%eax + xorl (%edi,%ebx,4),%eax + decl %ecx + jnz _$9 +_$4: + xorl $0xffffffff,%eax +_$3: + .line 52 + popl %edi + popl %esi + popl %ebx + leave + ret +_$34: + .size _crc32,_$34-_crc32 + .globl _crc32 + .extern _get_crc_table diff --git a/utils/Install/sfxzip/crctab.c b/utils/Install/sfxzip/crctab.c new file mode 100644 index 0000000000..2f80aa2cfa --- /dev/null +++ b/utils/Install/sfxzip/crctab.c @@ -0,0 +1,219 @@ +/* crctab.c -- supply the CRC table needed for CRC-32 calculations. + * Copyright (C) 1995 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* $Id$ */ + +/* + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all + the information needed to generate CRC's on data a byte at a time for all + combinations of CRC register values and incoming bytes. +*/ + +#define __CRCTAB_C /* identifies this source module */ + +#include "zip.h" + +#if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) + +#ifndef ZCONST +# define ZCONST const +#endif + +#ifdef DYNAMIC_CRC_TABLE + +/* ========================================================================= + * Make the crc table. This function is needed only if you want to compute + * the table dynamically. + */ + +local void make_crc_table OF((void)); + +#if (defined(DYNALLOC_CRCTAB) && defined(REENTRANT)) + error: Dynamic allocation of CRC table not safe with reentrant code. +#endif /* DYNALLOC_CRCTAB && REENTRANT */ + +#ifdef DYNALLOC_CRCTAB + local ulg near *crc_table = NULL; +# if 0 /* not used, since sizeof("near *") <= sizeof(int) */ + /* Use this section when access to a "local int" is faster than access to + a "local pointer" (e.g.: i86 16bit code with far pointers). */ + local int crc_table_empty = 1; +# define CRC_TABLE_IS_EMPTY (crc_table_empty != 0) +# define MARK_CRCTAB_FILLED crc_table_empty = 0 +# define MARK_CRCTAB_EMPTY crc_table_empty = 1 +# else + /* Use this section on systems where the size of pointers and ints is + equal (e.g.: all 32bit systems). */ +# define CRC_TABLE_IS_EMPTY (crc_table == NULL) +# define MARK_CRCTAB_FILLED crc_table = crctab_p +# define MARK_CRCTAB_EMPTY crc_table = NULL +# endif +#else /* !DYNALLOC_CRCTAB */ + local ulg near crc_table[256]; + local int crc_table_empty = 1; +# define CRC_TABLE_IS_EMPTY (crc_table_empty != 0) +# define MARK_CRCTAB_FILLED crc_table_empty = 0 +#endif /* ?DYNALLOC_CRCTAB */ + + +local void make_crc_table() +{ + ulg c; /* crc shift register */ + int n; /* counter for all possible eight bit values */ + int k; /* byte being shifted into crc apparatus */ +#ifdef DYNALLOC_CRCTAB + ulg near *crctab_p; /* temporary pointer to allocated crc_table area */ +#else /* !DYNALLOC_CRCTAB */ +# define crctab_p crc_table +#endif /* DYNALLOC_CRCTAB */ + +#ifdef COMPUTE_XOR_PATTERN + /* This piece of code has been left here to explain how the XOR pattern + * used in the creation of the crc_table values can be recomputed. + * For production versions of this function, it is more efficient to + * supply the resultant pattern at compile time. + */ + ulg xor; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static uch p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* make exclusive-or pattern from polynomial (0xedb88320L) */ + xor = 0L; + for (i = 0; i < sizeof(p)/sizeof(uch); i++) + xor |= 1L << (31 - p[i]); +#else +# define xor 0xedb88320L +#endif + +#ifdef DYNALLOC_CRCTAB + crctab_p = (ulg near *) nearmalloc (256*sizeof(ulg)); + if (crctab_p == NULL) { + ziperr(ZE_MEM, "crc_table allocation"); + } +#endif /* DYNALLOC_CRCTAB */ + + for (n = 0; n < 256; n++) { + c = (ulg)n; + for (k = 8; k; k--) + c = c & 1 ? xor ^ (c >> 1) : c >> 1; + crctab_p[n] = c; + } + MARK_CRCTAB_FILLED; +} + +#else /* !DYNAMIC_CRC_TABLE */ + +#ifdef DYNALLOC_CRCTAB + error: Inconsistent flags, DYNALLOC_CRCTAB without DYNAMIC_CRC_TABLE. +#endif + +/* ======================================================================== + * Table of CRC-32's of all single-byte values (made by make_crc_table) + */ +local ZCONST ulg near crc_table[256] = { + 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, + 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, + 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, + 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, + 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, + 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, + 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, + 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, + 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, + 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, + 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, + 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, + 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, + 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, + 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, + 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, + 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, + 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, + 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, + 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, + 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, + 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, + 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, + 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, + 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, + 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, + 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, + 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, + 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, + 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, + 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, + 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, + 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, + 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, + 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, + 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, + 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, + 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, + 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, + 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, + 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, + 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, + 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, + 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, + 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, + 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, + 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, + 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, + 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, + 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, + 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, + 0x2d02ef8dL +}; +#endif /* ?DYNAMIC_CRC_TABLE */ + +/* use "OF((void))" here to work around a Borland TC++ 1.0 problem */ +#ifdef USE_ZLIB +ZCONST uLongf *get_crc_table OF((void)) +#else +ZCONST ulg near *get_crc_table OF((void)) +#endif +{ +#ifdef DYNAMIC_CRC_TABLE + if (CRC_TABLE_IS_EMPTY) + make_crc_table(); +#endif +#ifdef USE_ZLIB + return (ZCONST uLongf *)crc_table; +#else + return (ZCONST ulg near *)crc_table; +#endif +} + +#ifdef DYNALLOC_CRCTAB +void free_crc_table() +{ + if (!CRC_TABLE_IS_EMPTY) + { + nearfree((ulg near *)crc_table); + MARK_CRCTAB_EMPTY; + } +} +#endif + +#endif /* !USE_ZLIB || USE_OWN_CRCTAB */ diff --git a/utils/Install/sfxzip/crypt.c b/utils/Install/sfxzip/crypt.c new file mode 100644 index 0000000000..0dbe227f81 --- /dev/null +++ b/utils/Install/sfxzip/crypt.c @@ -0,0 +1,12 @@ +/* + crypt.c (dummy version) by Info-ZIP. Last revised: 15 Aug 98 + + This is a non-functional version of Info-ZIP's crypt.c encryption/ + decryption code for Zip, ZipCloak, UnZip and fUnZip. This file is + not copyrighted and may be distributed freely. :-) See the "WHERE" + file for sites from which to obtain the full encryption/decryption + sources (zcrypt28.zip or later). + */ + +/* something "externally visible" to shut up compiler/linker warnings */ +int zcr_dummy; diff --git a/utils/Install/sfxzip/envargs.c b/utils/Install/sfxzip/envargs.c new file mode 100644 index 0000000000..76a41e8997 --- /dev/null +++ b/utils/Install/sfxzip/envargs.c @@ -0,0 +1,314 @@ +/*----------------------------------------------------------------* + | envargs - add default options from environment to command line + |---------------------------------------------------------------- + | Author: Bill Davidsen, original 10/13/91, revised 23 Oct 1991. + | This program is in the public domain. + |---------------------------------------------------------------- + | Minor program notes: + | 1. Yes, the indirection is a tad complex + | 2. Parentheses were added where not needed in some cases + | to make the action of the code less obscure. + |---------------------------------------------------------------- + | UnZip notes: 24 May 92 ("v1.4"): + | 1. #include "unzip.h" for prototypes (24 May 92) + | 2. changed ch to type char (24 May 92) + | 3. added an ifdef to avoid Borland warnings (24 May 92) + | 4. included Rich Wales' mksargs() routine (for MS-DOS, maybe + | OS/2? NT?) (4 Dec 93) + | 5. added alternate-variable string envstr2 (21 Apr 94) + | 6. added support for quoted arguments (6 Jul 96) + *----------------------------------------------------------------*/ + + +#define ENVARGS_C +#define UNZIP_INTERNAL +#include "unzip.h" + +#ifdef __EMX__ /* emx isspace() returns TRUE on extended ASCII !! */ +# define ISspace(c) ((c) & 0x80 ? 0 : isspace((unsigned)c)) +#else +# define ISspace(c) isspace((unsigned)c) +#endif /* ?__EMX__ */ + +static int count_args OF((ZCONST char *)); +static void mem_err OF((__GPRO)); + +static ZCONST char Far NoMemArguments[] = + "envargs: cannot get memory for arguments"; + + +void envargs(__G__ Pargc, Pargv, envstr, envstr2) + __GDEF + int *Pargc; + char ***Pargv; + ZCONST char *envstr, *envstr2; +{ +#ifndef RISCOS + char *getenv(); +#endif + char *envptr; /* value returned by getenv */ + char *bufptr; /* copy of env info */ + int argc = 0; /* internal arg count */ + register int ch; /* spare temp value */ + char **argv; /* internal arg vector */ + char **argvect; /* copy of vector address */ + + /* see if anything in the environment */ + if ((envptr = getenv(envstr)) != (char *)NULL) /* usual var */ + while (ISspace(*envptr)) /* must discard leading spaces */ + envptr++; + if (envptr == (char *)NULL || *envptr == '\0') + if ((envptr = getenv(envstr2)) != (char *)NULL) /* alternate var */ + while (ISspace(*envptr)) + envptr++; + if (envptr == (char *)NULL || *envptr == '\0') + return; + + bufptr = malloc(1 + strlen(envptr)); + if (bufptr == (char *)NULL) + mem_err(__G); +#if (defined(WIN32) || defined(WINDLL)) +# ifdef WIN32 + if (IsWinNT()) { + /* SPC: don't know codepage of 'real' WinNT console */ + strcpy(bufptr, envptr); + } else { + /* Win95 environment is DOS and uses OEM character coding */ + OEM_TO_INTERN(envptr, bufptr); + } +# else /* !WIN32 */ + /* DOS environment uses OEM codepage */ + OEM_TO_INTERN(envptr, bufptr); +# endif +#else /* !(WIN32 || WINDLL) */ + strcpy(bufptr, envptr); +#endif /* ?(WIN32 || WINDLL) */ + + /* count the args so we can allocate room for them */ + argc = count_args(bufptr); + /* allocate a vector large enough for all args */ + argv = (char **)malloc((argc + *Pargc + 1) * sizeof(char *)); + if (argv == (char **)NULL) { + free(bufptr); + mem_err(__G); + } + argvect = argv; + + /* copy the program name first, that's always true */ + *(argv++) = *((*Pargv)++); + + /* copy the environment args next, may be changed */ + do { +#if defined(AMIGA) || defined(UNIX) + if (*bufptr == '"') { + char *argstart = ++bufptr; + + *(argv++) = argstart; + for (ch = *bufptr; ch != '\0' && ch != '\"'; ch = *(++bufptr)) + if (ch == '\\' && bufptr[1] != '\0') + ++bufptr; /* skip char after backslash */ + if (ch != '\0') + *(bufptr++) = '\0'; /* overwrite trailing " */ + + /* remove escape characters */ + while ((argstart = strchr(argstart, '\\')) != (char *)NULL) { + strcpy(argstart, argstart + 1); + if (*argstart) + ++argstart; + } + } else { + *(argv++) = bufptr; + while ((ch = *bufptr) != '\0' && !ISspace(ch)) + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; + } +#else +#ifdef DOS_FLX_OS2_W32 + /* we do not support backslash-quoting of quotes in quoted + * strings under DOS_OS2_W32, because backslashes are directory + * separators and double quotes are illegal in filenames */ + if (*bufptr == '"') { + *(argv++) = ++bufptr; + while ((ch = *bufptr) != '\0' && ch != '\"') + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; + } else { + *(argv++) = bufptr; + while ((ch = *bufptr) != '\0' && !ISspace(ch)) + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; + } +#else + *(argv++) = bufptr; + while ((ch = *bufptr) != '\0' && !ISspace(ch)) + ++bufptr; + if (ch != '\0') + *(bufptr++) = '\0'; +#endif /* ?DOS_FLX_OS2_W32 */ +#endif /* ?(AMIGA || UNIX) */ + while ((ch = *bufptr) != '\0' && ISspace(ch)) + ++bufptr; + } while (ch); + + /* now save old argc and copy in the old args */ + argc += *Pargc; + while (--(*Pargc)) + *(argv++) = *((*Pargv)++); + + /* finally, add a NULL after the last arg, like Unix */ + *argv = (char *)NULL; + + /* save the values and return */ + *Pargv = argvect; + *Pargc = argc; +} + + + +static int count_args(s) + ZCONST char *s; +{ + int count = 0; + char ch; + + do { + /* count and skip args */ + ++count; +#if defined(AMIGA) || defined(UNIX) + if (*s == '\"') { + for (ch = *(++s); ch != '\0' && ch != '\"'; ch = *(++s)) + if (ch == '\\' && s[1] != '\0') + ++s; + if (*s) + ++s; /* trailing quote */ + } else +#else +#ifdef DOS_FLX_OS2_W32 + if (*s == '\"') { + ++s; /* leading quote */ + while ((ch = *s) != '\0' && ch != '\"') + ++s; + if (*s) + ++s; /* trailing quote */ + } else +#endif /* DOS_FLX_OS2_W32 */ +#endif /* ?(AMIGA || UNIX) */ + while ((ch = *s) != '\0' && !ISspace(ch)) /* note else-clauses above */ + ++s; + while ((ch = *s) != '\0' && ISspace(ch)) + ++s; + } while (ch); + + return count; +} + + + +static void mem_err(__G) + __GDEF +{ + perror(LoadFarString(NoMemArguments)); + DESTROYGLOBALS() + EXIT(PK_MEM); +} + + + +#ifdef TEST + +main(argc, argv) + int argc; + char **argv; +{ + int i; + + pipeit("Orig argv: %p\n", argv); + dump_args(argc, argv); + envargs(__G__ &argc, &argv, "ENVTEST"); + pipeit(" New argv: %p\n", argv); + dump_args(argc, argv); +} + + + +dump_args(argc, argv) + int argc; + char *argv[]; +{ + int i; + + pipeit("\nDump %d args:\n", argc); + for (i = 0; i < argc; ++i) + pipeit("%3d %s\n", i, argv[i]); +} + +#endif /* TEST */ + + + +#ifdef MSDOS /* DOS_OS2? DOS_OS2_W32? */ + +/* + * void mksargs(int *argcp, char ***argvp) + * + * Substitutes the extended command line argument list produced by + * the MKS Korn Shell in place of the command line info from DOS. + * + * The MKS shell gets around DOS's 128-byte limit on the length of + * a command line by passing the "real" command line in the envi- + * ronment. The "real" arguments are flagged by prepending a tilde + * (~) to each one. + * + * This "mksargs" routine creates a new argument list by scanning + * the environment from the beginning, looking for strings begin- + * ning with a tilde character. The new list replaces the original + * "argv" (pointed to by "argvp"), and the number of arguments + * in the new list replaces the original "argc" (pointed to by + * "argcp"). + * + * Rich Wales + */ +void mksargs(argcp, argvp) + int *argcp; + char ***argvp; +{ +#ifndef MSC /* declared differently in MSC 7.0 headers, at least */ +#ifndef __WATCOMC__ + extern char **environ; /* environment */ +#endif +#endif + char **envp; /* pointer into environment */ + char **newargv; /* new argument list */ + char **argp; /* pointer into new arg list */ + int newargc; /* new argument count */ + + /* sanity check */ + if (environ == NULL || argcp == NULL || argvp == NULL || *argvp == NULL) + return; + + /* find out how many environment arguments there are */ + for (envp = environ, newargc = 0; *envp != NULL && (*envp)[0] == '~'; + envp++, newargc++) + ; + if (newargc == 0) + return; /* no environment arguments */ + + /* set up new argument list */ + newargv = (char **) malloc(sizeof(char **) * (newargc+1)); + if (newargv == NULL) + return; /* malloc failed */ + + for (argp = newargv, envp = environ; *envp != NULL && (*envp)[0] == '~'; + *argp++ = &(*envp++)[1]) + ; + *argp = NULL; /* null-terminate the list */ + + /* substitute new argument list in place of old one */ + *argcp = newargc; + *argvp = newargv; +} + +#endif /* MSDOS */ diff --git a/utils/Install/sfxzip/explode.c b/utils/Install/sfxzip/explode.c new file mode 100644 index 0000000000..c1a8f80032 --- /dev/null +++ b/utils/Install/sfxzip/explode.c @@ -0,0 +1,871 @@ +/* explode.c -- put in the public domain by Mark Adler + version c15, 6 July 1996 */ + + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + + History: + vers date who what + ---- --------- -------------- ------------------------------------ + c1 30 Mar 92 M. Adler explode that uses huft_build from inflate + (this gives over a 70% speed improvement + over the original unimplode.c, which + decoded a bit at a time) + c2 4 Apr 92 M. Adler fixed bug for file sizes a multiple of 32k. + c3 10 Apr 92 M. Adler added a little memory tracking if DEBUG + c4 11 Apr 92 M. Adler added NOMEMCPY do kill use of memcpy() + c5 21 Apr 92 M. Adler added the WSIZE #define to allow reducing + the 32K window size for specialized + applications. + c6 31 May 92 M. Adler added typecasts to eliminate some warnings + c7 27 Jun 92 G. Roelofs added more typecasts. + c8 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch. + c9 19 Jul 93 J. Bush added more typecasts (to return values); + made l[256] array static for Amiga. + c10 8 Oct 93 G. Roelofs added used_csize for diagnostics; added + buf and unshrink arguments to flush(); + undef'd various macros at end for Turbo C; + removed NEXTBYTE macro (now in unzip.h) + and bytebuf variable (not used); changed + memset() to memzero(). + c11 9 Jan 94 M. Adler fixed incorrect used_csize calculation. + c12 9 Apr 94 G. Roelofs fixed split comments on preprocessor lines + to avoid bug in Encore compiler. + c13 25 Aug 94 M. Adler fixed distance-length comment (orig c9 fix) + c14 22 Nov 95 S. Maxwell removed unnecessary "static" on auto array + c15 6 Jul 96 W. Haidinger added ulg typecasts to flush() calls. + c16 8 Feb 98 C. Spieler added ZCONST modifiers to const tables + and #ifdef DEBUG around debugging code. + c16b 25 Mar 98 C. Spieler modified DLL code for slide redirection. + */ + + +/* + Explode imploded (PKZIP method 6 compressed) data. This compression + method searches for as much of the current string of bytes (up to a length + of ~320) in the previous 4K or 8K bytes. If it doesn't find any matches + (of at least length 2 or 3), it codes the next byte. Otherwise, it codes + the length of the matched string and its distance backwards from the + current position. Single bytes ("literals") are preceded by a one (a + single bit) and are either uncoded (the eight bits go directly into the + compressed stream for a total of nine bits) or Huffman coded with a + supplied literal code tree. If literals are coded, then the minimum match + length is three, otherwise it is two. + + There are therefore four kinds of imploded streams: 8K search with coded + literals (min match = 3), 4K search with coded literals (min match = 3), + 8K with uncoded literals (min match = 2), and 4K with uncoded literals + (min match = 2). The kind of stream is identified in two bits of a + general purpose bit flag that is outside of the compressed stream. + + Distance-length pairs for matched strings are preceded by a zero bit (to + distinguish them from literals) and are always coded. The distance comes + first and is either the low six (4K) or low seven (8K) bits of the + distance (uncoded), followed by the high six bits of the distance coded. + Then the length is six bits coded (0..63 + min match length), and if the + maximum such length is coded, then it's followed by another eight bits + (uncoded) to be added to the coded length. This gives a match length + range of 2..320 or 3..321 bytes. + + The literal, length, and distance codes are all represented in a slightly + compressed form themselves. What is sent are the lengths of the codes for + each value, which is sufficient to construct the codes. Each byte of the + code representation is the code length (the low four bits representing + 1..16), and the number of values sequentially with that length (the high + four bits also representing 1..16). There are 256 literal code values (if + literals are coded), 64 length code values, and 64 distance code values, + in that order at the beginning of the compressed stream. Each set of code + values is preceded (redundantly) with a byte indicating how many bytes are + in the code description that follows, in the range 1..256. + + The codes themselves are decoded using tables made by huft_build() from + the bit lengths. That routine and its comments are in the inflate.c + module. + */ + +#define UNZIP_INTERNAL +#include "unzip.h" /* must supply slide[] (uch) array and NEXTBYTE macro */ + +#ifndef WSIZE +# define WSIZE 0x8000 /* window size--must be a power of two, and */ +#endif /* at least 8K for zip's implode method */ + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) +# define wsize G._wsize +#else +# define wsize WSIZE +#endif + +/* routines here */ +static int get_tree OF((__GPRO__ unsigned *l, unsigned n)); +static int explode_lit8 OF((__GPRO__ struct huft *tb, struct huft *tl, + struct huft *td, int bb, int bl, int bd)); +static int explode_lit4 OF((__GPRO__ struct huft *tb, struct huft *tl, + struct huft *td, int bb, int bl, int bd)); +static int explode_nolit8 OF((__GPRO__ struct huft *tl, struct huft *td, + int bl, int bd)); +static int explode_nolit4 OF((__GPRO__ struct huft *tl, struct huft *td, + int bl, int bd)); +int explode OF((__GPRO)); + + +/* The implode algorithm uses a sliding 4K or 8K byte window on the + uncompressed stream to find repeated byte strings. This is implemented + here as a circular buffer. The index is updated simply by incrementing + and then and'ing with 0x0fff (4K-1) or 0x1fff (8K-1). Here, the 32K + buffer of inflate is used, and it works just as well to always have + a 32K circular buffer, so the index is anded with 0x7fff. This is + done to allow the window to also be used as the output buffer. */ +/* This must be supplied in an external module useable like "uch slide[8192];" + or "uch *slide;", where the latter would be malloc'ed. In unzip, slide[] + is actually a 32K area for use by inflate, which uses a 32K sliding window. + */ + + +/* Tables for length and distance */ +static ZCONST ush cplen2[] = + {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65}; +static ZCONST ush cplen3[] = + {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66}; +static ZCONST ush extra[] = + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8}; +static ZCONST ush cpdist4[] = + {1, 65, 129, 193, 257, 321, 385, 449, 513, 577, 641, 705, + 769, 833, 897, 961, 1025, 1089, 1153, 1217, 1281, 1345, 1409, 1473, + 1537, 1601, 1665, 1729, 1793, 1857, 1921, 1985, 2049, 2113, 2177, + 2241, 2305, 2369, 2433, 2497, 2561, 2625, 2689, 2753, 2817, 2881, + 2945, 3009, 3073, 3137, 3201, 3265, 3329, 3393, 3457, 3521, 3585, + 3649, 3713, 3777, 3841, 3905, 3969, 4033}; +static ZCONST ush cpdist8[] = + {1, 129, 257, 385, 513, 641, 769, 897, 1025, 1153, 1281, + 1409, 1537, 1665, 1793, 1921, 2049, 2177, 2305, 2433, 2561, 2689, + 2817, 2945, 3073, 3201, 3329, 3457, 3585, 3713, 3841, 3969, 4097, + 4225, 4353, 4481, 4609, 4737, 4865, 4993, 5121, 5249, 5377, 5505, + 5633, 5761, 5889, 6017, 6145, 6273, 6401, 6529, 6657, 6785, 6913, + 7041, 7169, 7297, 7425, 7553, 7681, 7809, 7937, 8065}; + + +/* Macros for inflate() bit peeking and grabbing. + The usage is: + + NEEDBITS(j) + x = b & mask_bits[j]; + DUMPBITS(j) + + where NEEDBITS makes sure that b has at least j bits in it, and + DUMPBITS removes the bits from b. The macros use the variable k + for the number of bits in b. Normally, b and k are register + variables for speed. + */ + +#define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} + + + +static int get_tree(__G__ l, n) + __GDEF +unsigned *l; /* bit lengths */ +unsigned n; /* number expected */ +/* Get the bit lengths for a code representation from the compressed + stream. If get_tree() returns 4, then there is an error in the data. + Otherwise zero is returned. */ +{ + unsigned i; /* bytes remaining in list */ + unsigned k; /* lengths entered */ + unsigned j; /* number of codes */ + unsigned b; /* bit length for those codes */ + + + /* get bit lengths */ + i = NEXTBYTE + 1; /* length/count pairs to read */ + k = 0; /* next code */ + do { + b = ((j = NEXTBYTE) & 0xf) + 1; /* bits in code (1..16) */ + j = ((j & 0xf0) >> 4) + 1; /* codes with those bits (1..16) */ + if (k + j > n) + return 4; /* don't overflow l[] */ + do { + l[k++] = b; + } while (--j); + } while (--i); + return k != n ? 4 : 0; /* should have read n of them */ +} + + + +static int explode_lit8(__G__ tb, tl, td, bb, bl, bd) + __GDEF +struct huft *tb, *tl, *td; /* literal, length, and distance tables */ +int bb, bl, bd; /* number of bits decoded by those */ +/* Decompress the imploded data using coded literals and an 8K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned mb, ml, md; /* masks for bb, bl, and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + mb = mask_bits[bb]; /* precompute masks for speed */ + ml = mask_bits[bl]; + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--decode it */ + { + DUMPBITS(1) + s--; + NEEDBITS((unsigned)bb) /* get coded literal */ + if ((e = (t = tb + ((~(unsigned)b) & mb))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + redirSlide[w++] = (uch)t->v.n; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(7) /* get distance low bits */ + d = (unsigned)b & 0x7f; + DUMPBITS(7) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +static int explode_lit4(__G__ tb, tl, td, bb, bl, bd) + __GDEF +struct huft *tb, *tl, *td; /* literal, length, and distance tables */ +int bb, bl, bd; /* number of bits decoded by those */ +/* Decompress the imploded data using coded literals and a 4K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned mb, ml, md; /* masks for bb, bl, and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + mb = mask_bits[bb]; /* precompute masks for speed */ + ml = mask_bits[bl]; + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--decode it */ + { + DUMPBITS(1) + s--; + NEEDBITS((unsigned)bb) /* get coded literal */ + if ((e = (t = tb + ((~(unsigned)b) & mb))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + redirSlide[w++] = (uch)t->v.n; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(6) /* get distance low bits */ + d = (unsigned)b & 0x3f; + DUMPBITS(6) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +static int explode_nolit8(__G__ tl, td, bl, bd) + __GDEF +struct huft *tl, *td; /* length and distance decoder tables */ +int bl, bd; /* number of bits decoded by tl[] and td[] */ +/* Decompress the imploded data using uncoded literals and an 8K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--get eight bits */ + { + DUMPBITS(1) + s--; + NEEDBITS(8) + redirSlide[w++] = (uch)b; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + DUMPBITS(8) + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(7) /* get distance low bits */ + d = (unsigned)b & 0x7f; + DUMPBITS(7) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +static int explode_nolit4(__G__ tl, td, bl, bd) + __GDEF +struct huft *tl, *td; /* length and distance decoder tables */ +int bl, bd; /* number of bits decoded by tl[] and td[] */ +/* Decompress the imploded data using uncoded literals and a 4K sliding + window. */ +{ + long s; /* bytes to decompress */ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + unsigned u; /* true if unflushed */ + + + /* explode the coded data */ + b = k = w = 0; /* initialize bit buffer, window */ + u = 1; /* buffer unflushed */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + s = G.ucsize; + while (s > 0) /* do until ucsize bytes uncompressed */ + { + NEEDBITS(1) + if (b & 1) /* then literal--get eight bits */ + { + DUMPBITS(1) + s--; + NEEDBITS(8) + redirSlide[w++] = (uch)b; + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + DUMPBITS(8) + } + else /* else distance/length */ + { + DUMPBITS(1) + NEEDBITS(6) /* get distance low bits */ + d = (unsigned)b & 0x3f; + DUMPBITS(6) + NEEDBITS((unsigned)bd) /* get coded distance high bits */ + if ((e = (t = td + ((~(unsigned)b) & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + d = w - d - t->v.n; /* construct offset */ + NEEDBITS((unsigned)bl) /* get coded length */ + if ((e = (t = tl + ((~(unsigned)b) & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((~(unsigned)b) & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + n = t->v.n; + if (e) /* get length extra bits */ + { + NEEDBITS(8) + n += (unsigned)b & 0xff; + DUMPBITS(8) + } + + /* do the copy */ + s -= n; + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + /* &= w/ wsize not needed and wrong if redirect */ + if (d >= wsize) + return 1; + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); + if (u && w <= d) + { + memzero(redirSlide + w, e); + w += e; + d += e; + } + else +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + flush(__G__ redirSlide, (ulg)w, 0); + w = u = 0; + } + } while (n); + } + } + + /* flush out redirSlide */ + flush(__G__ redirSlide, (ulg)w, 0); + if (G.csize + G.incnt + (k >> 3)) /* should have read csize bytes, but */ + { /* sometimes read one too many: k>>3 compensates */ + G.used_csize = G.lrec.csize - G.csize - G.incnt - (k >> 3); + return 5; + } + return 0; +} + + + +int explode(__G) + __GDEF +/* Explode an imploded compressed stream. Based on the general purpose + bit flag, decide on coded or uncoded literals, and an 8K or 4K sliding + window. Construct the literal (if any), length, and distance codes and + the tables needed to decode them (using huft_build() from inflate.c), + and call the appropriate routine for the type of data in the remainder + of the stream. The four routines are nearly identical, differing only + in whether the literal is decoded or simply read in, and in how many + bits are read in, uncoded, for the low distance bits. */ +{ + unsigned r; /* return codes */ + struct huft *tb; /* literal code table */ + struct huft *tl; /* length code table */ + struct huft *td; /* distance code table */ + int bb; /* bits for tb */ + int bl; /* bits for tl */ + int bd; /* bits for td */ + unsigned l[256]; /* bit lengths for codes */ + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; + else + wsize = WSIZE, redirSlide = slide; +#endif + + /* Tune base table sizes. Note: I thought that to truly optimize speed, + I would have to select different bl, bd, and bb values for different + compressed file sizes. I was surprised to find out that the values of + 7, 7, and 9 worked best over a very wide range of sizes, except that + bd = 8 worked marginally better for large compressed sizes. */ + bl = 7; + bd = (G.csize + G.incnt) > 200000L ? 8 : 7; + + + /* With literal tree--minimum match length is 3 */ +#ifdef DEBUG + G.hufts = 0; /* initialize huft's malloc'ed */ +#endif + if (G.lrec.general_purpose_bit_flag & 4) + { + bb = 9; /* base table size for literals */ + if ((r = get_tree(__G__ l, 256)) != 0) + return (int)r; + if ((r = huft_build(__G__ l, 256, 256, NULL, NULL, &tb, &bb)) != 0) + { + if (r == 1) + huft_free(tb); + return (int)r; + } + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if ((r = huft_build(__G__ l, 64, 0, cplen3, extra, &tl, &bl)) != 0) + { + if (r == 1) + huft_free(tl); + huft_free(tb); + return (int)r; + } + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if (G.lrec.general_purpose_bit_flag & 2) /* true if 8K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist8, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + huft_free(tb); + return (int)r; + } + r = explode_lit8(__G__ tb, tl, td, bb, bl, bd); + } + else /* else 4K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist4, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + huft_free(tb); + return (int)r; + } + r = explode_lit4(__G__ tb, tl, td, bb, bl, bd); + } + huft_free(td); + huft_free(tl); + huft_free(tb); + } + else + + + /* No literal tree--minimum match length is 2 */ + { + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if ((r = huft_build(__G__ l, 64, 0, cplen2, extra, &tl, &bl)) != 0) + { + if (r == 1) + huft_free(tl); + return (int)r; + } + if ((r = get_tree(__G__ l, 64)) != 0) + return (int)r; + if (G.lrec.general_purpose_bit_flag & 2) /* true if 8K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist8, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + return (int)r; + } + r = explode_nolit8(__G__ tl, td, bl, bd); + } + else /* else 4K */ + { + if ((r = huft_build(__G__ l, 64, 0, cpdist4, extra, &td, &bd)) != 0) + { + if (r == 1) + huft_free(td); + huft_free(tl); + return (int)r; + } + r = explode_nolit4(__G__ tl, td, bl, bd); + } + huft_free(td); + huft_free(tl); + } + Trace((stderr, "<%u > ", G.hufts)); + return (int)r; +} + +/* so explode.c and inflate.c can be compiled together into one object: */ +#undef NEXTBYTE +#undef NEEDBITS +#undef DUMPBITS diff --git a/utils/Install/sfxzip/extract.c b/utils/Install/sfxzip/extract.c new file mode 100644 index 0000000000..bd142dcae5 --- /dev/null +++ b/utils/Install/sfxzip/extract.c @@ -0,0 +1,1993 @@ +/*--------------------------------------------------------------------------- + + extract.c + + This file contains the high-level routines ("driver routines") for extrac- + ting and testing zipfile members. It calls the low-level routines in files + explode.c, inflate.c, unreduce.c and unshrink.c. + + Contains: extract_or_test_files() + store_info() + extract_or_test_member() + TestExtraField() + test_compr_eb() + memextract() + memflush() + fnfilter() + + ---------------------------------------------------------------------------*/ + + +#define EXTRACT_C +#define UNZIP_INTERNAL +#include "unzip.h" +#include "crypt.h" +#ifdef WINDLL +# ifdef POCKET_UNZIP +# include "wince/intrface.h" +# else +# include "windll/windll.h" +# endif +#endif + +off_t acelseek(off_t offset, int whence); +int aceread(void *buf, size_t count); +int aceopen(const char *path, int flags); +int aceclose(int fd); +int acesize(void); +int acetell(int fd); +char *replacestr(char *str1, char *str2, char *str3); + +#define GRRDUMP(buf,len) { \ + int i, j; \ + \ + for (j = 0; j < (len)/16; ++j) { \ + pipeit(" "); \ + for (i = 0; i < 16; ++i) \ + pipeit("%02x ", (uch)(buf)[i+(j<<4)]); \ + pipeit("\n "); \ + for (i = 0; i < 16; ++i) { \ + char c = (char)(buf)[i+(j<<4)]; \ + \ + if (c == '\n') \ + pipeit("\\n "); \ + else if (c == '\r') \ + pipeit("\\r "); \ + else \ + pipeit(" %c ", c); \ + } \ + pipeit("\n"); \ + } \ + if ((len) % 16) { \ + pipeit(" "); \ + for (i = j<<4; i < (len); ++i) \ + pipeit("%02x ", (uch)(buf)[i]); \ + pipeit("\n "); \ + for (i = j<<4; i < (len); ++i) { \ + char c = (char)(buf)[i]; \ + \ + if (c == '\n') \ + pipeit("\\n "); \ + else if (c == '\r') \ + pipeit("\\r "); \ + else \ + pipeit(" %c ", c); \ + } \ + pipeit("\n"); \ + } \ +} + +static int store_info OF((__GPRO)); +static int extract_or_test_member OF((__GPRO)); +#ifndef SFX + static int TestExtraField OF((__GPRO__ uch *ef, unsigned ef_len)); + static int test_compr_eb OF((__GPRO__ uch *eb, unsigned eb_size, + unsigned compr_offset, + int (*test_uc_ebdata)(__GPRO__ uch *eb, unsigned eb_size, + uch *eb_ucptr, ulg eb_ucsize))); +#endif +#ifdef SET_DIR_ATTRIB + static int dircomp OF((ZCONST zvoid *a, ZCONST zvoid *b)); +#endif + + + +/*******************************/ +/* Strings used in extract.c */ +/*******************************/ + +static ZCONST char Far VersionMsg[] = + " skipping: %-22s need %s compat. v%u.%u (can do v%u.%u)\n"; +static ZCONST char Far ComprMsgNum[] = + " skipping: %-22s unsupported compression method %u\n"; +#ifndef SFX + static ZCONST char Far ComprMsgName[] = + " skipping: %-22s `%s' method not supported\n"; + static ZCONST char Far CmprNone[] = "store"; + static ZCONST char Far CmprShrink[] = "shrink"; + static ZCONST char Far CmprReduce[] = "reduce"; + static ZCONST char Far CmprImplode[] = "implode"; + static ZCONST char Far CmprTokenize[] = "tokenize"; + static ZCONST char Far CmprDeflate[] = "deflate"; + static ZCONST char Far CmprEnDeflate[] = "enhanced deflate"; + static ZCONST char Far CmprDCLImplode[] = "DCL implode"; + static ZCONST char Far *ComprNames[NUM_METHODS] = { + CmprNone, CmprShrink, CmprReduce, CmprReduce, CmprReduce, CmprReduce, + CmprImplode, CmprTokenize, CmprDeflate, CmprEnDeflate, CmprDCLImplode + }; +#endif /* !SFX */ +static ZCONST char Far FilNamMsg[] = + "%s: bad filename length (%s)\n"; +static ZCONST char Far ExtFieldMsg[] = + "%s: bad extra field length (%s)\n"; +static ZCONST char Far OffsetMsg[] = + "file #%u: bad zipfile offset (%s): %ld\n"; +static ZCONST char Far ExtractMsg[] = + "%8sing: %-22s %s%s"; +#ifndef SFX + static ZCONST char Far LengthMsg[] = + "%s %s: %ld bytes required to uncompress to %lu bytes;\n %s\ + supposed to require %lu bytes%s%s%s\n"; +#endif + +static ZCONST char Far BadFileCommLength[] = "%s: bad file comment length\n"; +static ZCONST char Far LocalHdrSig[] = "local header sig"; +static ZCONST char Far BadLocalHdr[] = "file #%u: bad local header\n"; +static ZCONST char Far AttemptRecompensate[] = + " (attempting to re-compensate)\n"; +#ifndef SFX + static ZCONST char Far BackslashPathSep[] = + "warning: %s appears to use backslashes as path separators\n"; +#endif +static ZCONST char Far SkipVolumeLabel[] = + " skipping: %-22s %svolume label\n"; + +#ifdef SET_DIR_ATTRIB /* messages of code for setting directory attributes */ + static ZCONST char Far DirlistEntryNoMem[] = + "warning: cannot alloc memory for dir times/permissions/UID/GID\n"; + static ZCONST char Far DirlistSortNoMem[] = + "warning: cannot alloc memory to sort dir times/perms/etc.\n"; + static ZCONST char Far DirlistSetAttrFailed[] = + "warning: set times/attribs failed for %s\n"; +#endif + +#ifndef WINDLL + static ZCONST char Far ReplaceQuery[] = + "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: "; + static ZCONST char Far AssumeNone[] = " NULL\n(assuming [N]one)\n"; + static ZCONST char Far NewNameQuery[] = "new name: "; + static ZCONST char Far InvalidResponse[] = "error: invalid response [%c]\n"; +#endif /* !WINDLL */ + +static ZCONST char Far ErrorInArchive[] = + "At least one %serror was detected in %s.\n"; +static ZCONST char Far ZeroFilesTested[] = + "Caution: zero files tested in %s.\n"; + +#ifndef VMS + static ZCONST char Far VMSFormatQuery[] = + "\n%s: stored in VMS format. Extract anyway? (y/n) "; +#endif + +#if CRYPT + static ZCONST char Far SkipCannotGetPasswd[] = + " skipping: %-22s unable to get password\n"; + static ZCONST char Far SkipIncorrectPasswd[] = + " skipping: %-22s incorrect password\n"; + static ZCONST char Far FilesSkipBadPasswd[] = + "%u file%s skipped because of incorrect password.\n"; + static ZCONST char Far MaybeBadPasswd[] = + " (may instead be incorrect password)\n"; +#else + static ZCONST char Far SkipEncrypted[] = + " skipping: %-22s encrypted (not supported)\n"; +#endif + +static ZCONST char Far NoErrInCompData[] = + "No errors detected in compressed data of %s.\n"; +static ZCONST char Far NoErrInTestedFiles[] = + "No errors detected in %s for the %u file%s tested.\n"; +static ZCONST char Far FilesSkipped[] = + "%u file%s skipped because of unsupported compression or encoding.\n"; + +static ZCONST char Far ErrUnzipFile[] = " error: %s%s %s\n"; +static ZCONST char Far ErrUnzipNoFile[] = "\n error: %s%s\n"; +static ZCONST char Far NotEnoughMem[] = "not enough memory to "; +static ZCONST char Far InvalidComprData[] = "invalid compressed data to "; +static ZCONST char Far Inflate[] = "inflate"; + +#ifndef SFX + static ZCONST char Far Explode[] = "explode"; +#ifndef LZW_CLEAN + static ZCONST char Far Unshrink[] = "unshrink"; +#endif +#endif + +#if (!defined(DELETE_IF_FULL) || !defined(HAVE_UNLINK)) + static ZCONST char Far FileTruncated[] = + "warning: %s is probably truncated\n"; +#endif + +static ZCONST char Far FileUnknownCompMethod[] = + "%s: unknown compression method\n"; +static ZCONST char Far BadCRC[] = " bad CRC %08lx (should be %08lx)\n"; + + /* TruncEAs[] also used in OS/2 mapname(), close_outfile() */ +char ZCONST Far TruncEAs[] = " compressed EA data missing (%d bytes)%s"; +char ZCONST Far TruncNTSD[] = + " compressed WinNT security data missing (%d bytes)%s"; + +#ifndef SFX + static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \ + EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n"; + static ZCONST char Far InvalidComprDataEAs[] = + " invalid compressed data for EAs\n"; +# if (defined(WIN32) && defined(NTSD_EAS)) + static ZCONST char Far InvalidSecurityEAs[] = + " EAs fail security check\n"; +# endif + static ZCONST char Far UnsuppNTSDVersEAs[] = + " unsupported NTSD EAs version %d\n"; + static ZCONST char Far BadCRC_EAs[] = " bad CRC for extended attributes\n"; + static ZCONST char Far UnknComprMethodEAs[] = + " unknown compression method for EAs (%u)\n"; + static ZCONST char Far NotEnoughMemEAs[] = + " out of memory while inflating EAs\n"; + static ZCONST char Far UnknErrorEAs[] = + " unknown error on extended attributes\n"; +#endif /* !SFX */ + +static ZCONST char Far UnsupportedExtraField[] = + "\nerror: unsupported extra-field compression type (%u)--skipping\n"; +static ZCONST char Far BadExtraFieldCRC[] = + "error [%s]: bad extra-field CRC %08lx (should be %08lx)\n"; + + + + + +/**************************************/ +/* Function extract_or_test_files() */ +/**************************************/ + +int extract_or_test_files(__G) /* return PK-type error code */ + __GDEF +{ + uch *cd_inptr; + unsigned i, j, filnum=0, blknum=0; + int cd_incnt, renamed, query; + int error, error_in_archive=PK_COOL, *fn_matched=NULL, *xn_matched=NULL; +#ifdef WINDLL + int done_once = 0; +#else + extent len; +#endif + unsigned members_remaining, num_skipped=0, num_bad_pwd=0; + long cd_bufstart, bufstart, inbuf_offset, request; + LONGINT old_extra_bytes = 0L; +#ifdef SET_DIR_ATTRIB + unsigned num_dirs=0; + dirtime *dirlist=(dirtime *)NULL, **sorted_dirlist=(dirtime **)NULL; +#endif + + +/*--------------------------------------------------------------------------- + The basic idea of this function is as follows. Since the central di- + rectory lies at the end of the zipfile and the member files lie at the + beginning or middle or wherever, it is not very desirable to simply + read a central directory entry, jump to the member and extract it, and + then jump back to the central directory. In the case of a large zipfile + this would lead to a whole lot of disk-grinding, especially if each mem- + ber file is small. Instead, we read from the central directory the per- + tinent information for a block of files, then go extract/test the whole + block. Thus this routine contains two small(er) loops within a very + large outer loop: the first of the small ones reads a block of files + from the central directory; the second extracts or tests each file; and + the outer one loops over blocks. There's some file-pointer positioning + stuff in between, but that's about it. Btw, it's because of this jump- + ing around that we can afford to be lenient if an error occurs in one of + the member files: we should still be able to go find the other members, + since we know the offset of each from the beginning of the zipfile. + ---------------------------------------------------------------------------*/ + + G.pInfo = G.info; + members_remaining = (unsigned)G.ecrec.total_entries_central_dir; + +#if CRYPT + G.newzip = TRUE; +#endif +#ifndef SFX + G.reported_backslash = FALSE; +#endif + + /* malloc space for check on unmatched filespecs (OK if one or both NULL) */ + if (G.filespecs > 0 && + (fn_matched=(int *)malloc(G.filespecs*sizeof(int))) != (int *)NULL) + for (i = 0; i < G.filespecs; ++i) + fn_matched[i] = FALSE; + if (G.xfilespecs > 0 && + (xn_matched=(int *)malloc(G.xfilespecs*sizeof(int))) != (int *)NULL) + for (i = 0; i < G.xfilespecs; ++i) + xn_matched[i] = FALSE; + +/*--------------------------------------------------------------------------- + Begin main loop over blocks of member files. We know the entire central + directory is on this disk: we would not have any of this information un- + less the end-of-central-directory record was on this disk, and we would + not have gotten to this routine unless this is also the disk on which + the central directory starts. In practice, this had better be the ONLY + disk in the archive, but we'll add multi-disk support soon. + ---------------------------------------------------------------------------*/ + + while (members_remaining) { + j = 0; +#ifdef AMIGA + memzero(G.filenotes, DIR_BLKSIZ * sizeof(char *)); +#endif + + /* + * Loop through files in central directory, storing offsets, file + * attributes, case-conversion and text-conversion flags until block + * size is reached. + */ + + while (members_remaining && (j < DIR_BLKSIZ)) { + --members_remaining; + G.pInfo = &G.info[j]; + + if (readbuf(__G__ G.sig, 4) == 0) { + error_in_archive = PK_EOF; + members_remaining = 0; /* ...so no more left to do */ + break; + } + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), + j + blknum*DIR_BLKSIZ + 1)); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + members_remaining = 0; /* ...so no more left to do */ + break; + } + /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) { + error_in_archive = error; /* only PK_EOF defined */ + members_remaining = 0; /* ...so no more left to do */ + break; + } + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != + PK_COOL) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { /* fatal: no more left to do */ + Info(slide, 0x401, ((char *)slide, LoadFarString(FilNamMsg), + FnFilter1(G.filename), "central")); + members_remaining = 0; + break; + } + } + if ((error = do_string(__G__ G.crec.extra_field_length, + EXTRA_FIELD)) != 0) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { /* fatal */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExtFieldMsg), + FnFilter1(G.filename), "central")); + members_remaining = 0; + break; + } + } +#ifdef AMIGA + G.filenote_slot = j; + if ((error = do_string(__G__ G.crec.file_comment_length, + uO.N_flag ? FILENOTE : SKIP)) != PK_COOL) +#else + if ((error = do_string(__G__ G.crec.file_comment_length, SKIP)) + != PK_COOL) +#endif + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { /* fatal */ + Info(slide, 0x421, ((char *)slide, + LoadFarString(BadFileCommLength), + FnFilter1(G.filename))); + members_remaining = 0; + break; + } + } + if (G.process_all_files) { + if (store_info(__G)) + ++j; /* file is OK; info[] stored; continue with next */ + else + ++num_skipped; + } else { + int do_this_file; + + if (G.filespecs == 0) + do_this_file = TRUE; + else { /* check if this entry matches an `include' argument */ + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; /* ^-- ignore case or not? */ + if (fn_matched) + fn_matched[i] = TRUE; + break; /* found match, so stop looping */ + } + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case or not? */ + if (xn_matched) + xn_matched[i] = TRUE; + break; + } + } + if (do_this_file) { + if (store_info(__G)) + ++j; /* file is OK */ + else + ++num_skipped; /* unsupp. compression or encryption */ + } + } /* end if (process_all_files) */ + + + } /* end while-loop (adding files to current block) */ + + /* save position in central directory so can come back later */ + cd_bufstart = G.cur_zipfile_bufstart; + cd_inptr = G.inptr; + cd_incnt = G.incnt; + + /*----------------------------------------------------------------------- + Second loop: process files in current block, extracting or testing + each one. + -----------------------------------------------------------------------*/ + + for (i = 0; i < j; ++i) { + filnum++; /* filnum = i + blknum*DIR_BLKSIZ + 1; */ + G.pInfo = &G.info[i]; +#ifdef NOVELL_BUG_FAILSAFE + G.dne = FALSE; /* assume file exists until stat() says otherwise */ +#endif + + /* if the target position is not within the current input buffer + * (either haven't yet read far enough, or (maybe) skipping back- + * ward), skip to the target position and reset readbuf(). */ + + /* ZLSEEK(pInfo->offset): */ + request = G.pInfo->offset + G.extra_bytes; + inbuf_offset = request % INBUFSIZ; + bufstart = request - inbuf_offset; + + Trace((stderr, "\ndebug: request = %ld, inbuf_offset = %ld\n", + request, inbuf_offset)); + Trace((stderr, + "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n", + bufstart, G.cur_zipfile_bufstart)); + if (request < 0) { + Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), + G.zipfn, LoadFarString(ReportMsg))); + error_in_archive = PK_ERR; + if (filnum == 1 && G.extra_bytes != 0L) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(AttemptRecompensate))); + old_extra_bytes = G.extra_bytes; + G.extra_bytes = 0L; + request = G.pInfo->offset; /* could also check if != 0 */ + inbuf_offset = request % INBUFSIZ; + bufstart = request - inbuf_offset; + Trace((stderr, "debug: request = %ld, inbuf_offset = %ld\n", + request, inbuf_offset)); + Trace((stderr, + "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n", + bufstart, G.cur_zipfile_bufstart)); + } else { + error_in_archive = PK_BADERR; + continue; /* this one hosed; try next */ + } + } + /* try again */ + if (request < 0) { + Trace((stderr, "debug: recompensated request still < 0\n")); + Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), + G.zipfn, LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + continue; + } else if (bufstart != G.cur_zipfile_bufstart) { + Trace((stderr, "debug: bufstart != cur_zipfile_bufstart\n")); +#ifdef USE_STRM_INPUT + fseek((FILE *)G.zipfd,(LONGINT)bufstart,SEEK_SET); + G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); +#else /* !USE_STRM_INPUT */ + G.cur_zipfile_bufstart = + acelseek((LONGINT)bufstart,SEEK_SET); +#endif /* ?USE_STRM_INPUT */ + if ((G.incnt = aceread((char *)G.inbuf,INBUFSIZ)) <= 0) + { + Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), + filnum, "lseek", bufstart)); + error_in_archive = PK_BADERR; + continue; /* can still do next file */ + } + G.inptr = G.inbuf + (int)inbuf_offset; + G.incnt -= (int)inbuf_offset; + } else { + G.incnt += (int)(G.inptr-G.inbuf) - (int)inbuf_offset; + G.inptr = G.inbuf + (int)inbuf_offset; + } + + /* should be in proper position now, so check for sig */ + if (readbuf(__G__ G.sig, 4) == 0) { /* bad offset */ + Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), + filnum, "EOF", request)); + error_in_archive = PK_BADERR; + continue; /* but can still try next one */ + } + if (strncmp(G.sig, local_hdr_sig, 4)) { + Info(slide, 0x401, ((char *)slide, LoadFarString(OffsetMsg), + filnum, LoadFarStringSmall(LocalHdrSig), request)); + /* + GRRDUMP(G.sig, 4) + GRRDUMP(local_hdr_sig, 4) + */ + error_in_archive = PK_ERR; + if ((filnum == 1 && G.extra_bytes != 0L) || + (G.extra_bytes == 0L && old_extra_bytes != 0L)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(AttemptRecompensate))); + if (G.extra_bytes) { + old_extra_bytes = G.extra_bytes; + G.extra_bytes = 0L; + } else + G.extra_bytes = old_extra_bytes; /* third attempt */ + ZLSEEK(G.pInfo->offset) + if (readbuf(__G__ G.sig, 4) == 0) { /* bad offset */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(OffsetMsg), filnum, "EOF", request)); + error_in_archive = PK_BADERR; + continue; /* but can still try next one */ + } + if (strncmp(G.sig, local_hdr_sig, 4)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(OffsetMsg), filnum, + LoadFarStringSmall(LocalHdrSig), request)); + error_in_archive = PK_BADERR; + continue; + } + } else + continue; /* this one hosed; try next */ + } + if ((error = process_local_file_hdr(__G)) != PK_COOL) { + Info(slide, 0x421, ((char *)slide, LoadFarString(BadLocalHdr), + filnum)); + error_in_archive = error; /* only PK_EOF defined */ + continue; /* can still try next one */ + } + if ((error = do_string(__G__ G.lrec.filename_length, DS_FN)) != + PK_COOL) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { + Info(slide, 0x401, ((char *)slide, LoadFarString(FilNamMsg), + FnFilter1(G.filename), "local")); + continue; /* go on to next one */ + } + } + if (G.extra_field != (uch *)NULL) { + free(G.extra_field); + G.extra_field = (uch *)NULL; + } + if ((error = + do_string(__G__ G.lrec.extra_field_length, EXTRA_FIELD)) != 0) + { + if (error > error_in_archive) + error_in_archive = error; + if (error > PK_WARN) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExtFieldMsg), + FnFilter1(G.filename), "local")); + continue; /* go on */ + } + } + +#if CRYPT + if (G.pInfo->encrypted && + (error = decrypt(__G__ uO.pwdarg)) != PK_COOL) { + if (error == PK_WARN) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, + LoadFarString(SkipIncorrectPasswd), + FnFilter1(G.filename))); + ++num_bad_pwd; + } else { /* (error > PK_WARN) */ + if (error > error_in_archive) + error_in_archive = error; + Info(slide, 0x401, ((char *)slide, + LoadFarString(SkipCannotGetPasswd), + FnFilter1(G.filename))); + } + continue; /* go on to next file */ + } +#endif /* CRYPT */ + + /* + * just about to extract file: if extracting to disk, check if + * already exists, and if so, take appropriate action according to + * fflag/uflag/overwrite_all/etc. (we couldn't do this in upper + * loop because we don't store the possibly renamed filename[] in + * info[]) + */ +#ifdef DLL + if (!uO.tflag && !uO.cflag && !G.redirect_data) +#else + if (!uO.tflag && !uO.cflag) +#endif + { + renamed = FALSE; /* user hasn't renamed output file yet */ + +startover: + query = FALSE; + /* for files from DOS FAT, check for use of backslash instead + * of slash as directory separator (bug in some zipper(s); so + * far, not a problem in HPFS, NTFS or VFAT systems) + */ +#ifndef SFX + if (G.pInfo->hostnum == FS_FAT_ && !strchr(G.filename, '/')) { + char *p=G.filename-1; + + while (*++p) { + if (*p == '\\') { + if (!G.reported_backslash) { + Info(slide, 0x21, ((char *)slide, + LoadFarString(BackslashPathSep), G.zipfn)); + G.reported_backslash = TRUE; + if (!error_in_archive) + error_in_archive = PK_WARN; + } + *p = '/'; + } + } + } +#endif /* !SFX */ + + /* mapname can create dirs if not freshening or if renamed */ + if ((error = mapname(__G__ renamed)) > PK_WARN) { + if (error == IZ_CREATED_DIR) { +#ifdef SET_DIR_ATTRIB + dirtime *d_entry; + + d_entry = (dirtime *)malloc(sizeof(dirtime)); + if (d_entry == (dirtime *)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(DirlistEntryNoMem))); + } else { + unsigned eb_izux_flg; + + d_entry->next = dirlist; + dirlist = d_entry; + dirlist->fn = + (char *)malloc(strlen(G.filename) + 1); + if (dirlist->fn == (char *)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(DirlistEntryNoMem))); + dirlist = d_entry->next; + free(d_entry); + if (!error_in_archive) + error_in_archive = PK_WARN; + continue; + } + strcpy(dirlist->fn, G.filename); + dirlist->perms = G.pInfo->file_attr; +#ifdef USE_EF_UT_TIME + eb_izux_flg = G.extra_field? ef_scan_for_izux( + G.extra_field, G.lrec.extra_field_length, 0, + G.lrec.last_mod_dos_datetime, +#ifdef IZ_CHECK_TZ + (G.tz_is_valid ? &(dirlist->u.t3) : NULL), +#else + &(dirlist->u.t3), +#endif + dirlist->uidgid) + : 0; +#else /* !USE_EF_UT_TIME */ + eb_izux_flg = 0; +#endif /* ?USE_EF_UT_TIME */ + if (eb_izux_flg & EB_UT_FL_MTIME) { + TTrace((stderr, + "\nextract: Unix dir e.f. modtime = %ld\n", + dirlist->u.t3.mtime)); + } else { + dirlist->u.t3.mtime = dos_to_unix_time( + G.lrec.last_mod_dos_datetime); + } + if (eb_izux_flg & EB_UT_FL_ATIME) { + TTrace((stderr, + "\nextract: Unix dir e.f. actime = %ld\n", + dirlist->u.t3.atime)); + } else { + dirlist->u.t3.atime = + dirlist->u.t3.mtime; + } + dirlist->have_uidgid = + (uO.X_flag && (eb_izux_flg & EB_UX2_VALID)); + ++num_dirs; + } +#endif /* SET_DIR_ATTRIB */ + } else if (error == IZ_VOL_LABEL) { +#ifdef DOS_OS2_W32 + Info(slide, 0x401, ((char *)slide, + LoadFarString(SkipVolumeLabel), + FnFilter1(G.filename), + uO.volflag? "hard disk " : "")); +#else + Info(slide, 1, ((char *)slide, + LoadFarString(SkipVolumeLabel), + FnFilter1(G.filename), "")); +#endif + /* if (!error_in_archive) + error_in_archive = PK_WARN; */ + } else if (error > PK_ERR && error_in_archive < PK_ERR) + error_in_archive = PK_ERR; + Trace((stderr, "mapname(%s) returns error = %d\n", + FnFilter1(G.filename), error)); + continue; /* go on to next file */ + } + +#ifdef QDOS + QFilename(__G__ G.filename); +#endif + switch (check_for_newer(__G__ G.filename)) { + case DOES_NOT_EXIST: +#ifdef NOVELL_BUG_FAILSAFE + G.dne = TRUE; /* stat() says file DOES NOT EXIST */ +#endif + /* if freshening, don't skip if just renamed */ + if (uO.fflag && !renamed) + continue; /* freshen (no new files): skip */ + break; + case EXISTS_AND_OLDER: + if (uO.overwrite_none) { +#ifdef WINDLL + char szStr[FILNAMSIZ+40]; /* add. space for text */ + + if ((!G.prompt_always) || (done_once)) { + sprintf(szStr, + "Target file exists.\nSkipping %s\n", + FnFilter1(G.filename)); + win_fprintf((zvoid *)&G, stdout, + strlen(szStr), szStr); + } else { + query = TRUE; + break; + } +#endif /* WINDLL */ + continue; /* never overwrite: skip file */ + } +#ifdef UNIXBACKUP + if (!uO.overwrite_all && !uO.B_flag) +#else + if (!uO.overwrite_all) +#endif + query = TRUE; + break; + case EXISTS_AND_NEWER: /* (or equal) */ + if (uO.overwrite_none || (uO.uflag && !renamed)) { +#ifdef WINDLL + char szStr[FILNAMSIZ+40]; /* add. space for text */ + + if ((!G.prompt_always) || (done_once)) { + sprintf(szStr, + "Target file newer.\nSkipping %s\n", + FnFilter1(G.filename)); + win_fprintf((zvoid *)&G, stdout, + strlen(szStr), szStr); + } else { + query = TRUE; + break; + } +#endif /* WINDLL */ + continue; /* skip if update/freshen & orig name */ + } +#ifdef UNIXBACKUP + if (!uO.overwrite_all && !uO.B_flag) +#else + if (!uO.overwrite_all) +#endif + query = TRUE; + break; + } + if (query) { +#ifdef WINDLL + switch (G.lpUserFunctions->replace != NULL ? + (*G.lpUserFunctions->replace)(G.filename) : + IDM_REPLACE_NONE) { + case IDM_REPLACE_RENAME: + _ISO_INTERN(G.filename); + renamed = TRUE; + goto startover; + case IDM_REPLACE_YES: + break; + case IDM_REPLACE_ALL: + uO.overwrite_all = TRUE; + uO.overwrite_none = FALSE; /* just to make sure */ + break; + case IDM_REPLACE_NONE: + uO.overwrite_none = TRUE; + uO.overwrite_all = FALSE; /* make sure */ + done_once = TRUE; + /* FALL THROUGH, skip */ + case IDM_REPLACE_NO: + { + char szStr[FILNAMSIZ+40]; + + sprintf(szStr, + "Target file newer.\nSkipping %s\n", + FnFilter1(G.filename)); + win_fprintf((zvoid *)&G, stdout, + strlen(szStr), szStr); + } + continue; + } +#else /* !WINDLL */ +reprompt: + Info(slide, 0x81, ((char *)slide, + LoadFarString(ReplaceQuery), + FnFilter1(G.filename))); + if (fgets(G.answerbuf, 9, stdin) == (char *)NULL) { + Info(slide, 1, ((char *)slide, + LoadFarString(AssumeNone))); + *G.answerbuf = 'N'; + if (!error_in_archive) + error_in_archive = 1; /* not extracted: warning */ + } + switch (*G.answerbuf) { + case 'A': /* dangerous option: force caps */ + uO.overwrite_all = TRUE; + uO.overwrite_none = FALSE; /* just to make sure */ + break; + case 'r': + case 'R': + do { + Info(slide, 0x81, ((char *)slide, + LoadFarString(NewNameQuery))); + fgets(G.filename, FILNAMSIZ, stdin); + /* usually get \n here: better check for it */ + len = strlen(G.filename); + if (G.filename[len-1] == '\n') + G.filename[--len] = '\0'; + } while (len == 0); +#ifdef WIN32 /* WIN32 fgets( ... , stdin) returns OEM coded strings */ + _OEM_INTERN(G.filename); +#endif + renamed = TRUE; + goto startover; /* sorry for a goto */ + case 'y': + case 'Y': + break; + case 'N': + uO.overwrite_none = TRUE; + uO.overwrite_all = FALSE; /* make sure */ + /* FALL THROUGH, skip */ + case 'n': + continue; /* skip file */ + default: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidResponse), *G.answerbuf)); + goto reprompt; /* yet another goto? */ + } /* end switch (*answerbuf) */ +#endif /* ?WINDLL */ + } /* end if (query) */ + } /* end if (extracting to disk) */ + +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_START_EXTRACT, G.zipfn, + G.filename, NULL)) { + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return IZ_CTRLC; /* cancel operation by user request */ + } +#endif +#ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); +#endif +#ifdef AMIGA + G.filenote_slot = i; +#endif + G.disk_full = 0; + if ((error = extract_or_test_member(__G)) != PK_COOL) { + if (error > error_in_archive) + error_in_archive = error; /* ...and keep going */ +#ifdef DLL + if (G.disk_full > 1 || error_in_archive == IZ_CTRLC) { +#else + if (G.disk_full > 1) { +#endif + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return error_in_archive; /* (unless disk full) */ + } + } +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, + G.filename, (zvoid *)&G.lrec.ucsize)) { + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return IZ_CTRLC; /* cancel operation by user request */ + } +#endif +#ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); +#endif + } /* end for-loop (i: files in current block) */ + + + /* + * Jump back to where we were in the central directory, then go and do + * the next batch of files. + */ + +#ifdef USE_STRM_INPUT + fseek((FILE *)G.zipfd, (LONGINT)cd_bufstart, SEEK_SET); + G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); +#else /* !USE_STRM_INPUT */ + G.cur_zipfile_bufstart = acelseek((LONGINT)cd_bufstart,SEEK_SET); +#endif /* ?USE_STRM_INPUT */ + aceread((char *)G.inbuf, INBUFSIZ); /* been here before... */ + G.inptr = cd_inptr; + G.incnt = cd_incnt; + ++blknum; + +#ifdef TEST + pipeit("\ncd_bufstart = %ld (%.8lXh)\n", cd_bufstart, cd_bufstart); + pipeit("cur_zipfile_bufstart = %ld (%.8lXh)\n", cur_zipfile_bufstart, + cur_zipfile_bufstart); + pipeit("inptr-inbuf = %d\n", G.inptr-G.inbuf); + pipeit("incnt = %d\n\n", G.incnt); +#endif + + } /* end while-loop (blocks of files in central directory) */ + +/*--------------------------------------------------------------------------- + Go back through saved list of directories, sort and set times/perms/UIDs + and GIDs from the deepest level on up. + ---------------------------------------------------------------------------*/ + +#ifdef SET_DIR_ATTRIB + if (num_dirs > 0) { + sorted_dirlist = (dirtime **)malloc(num_dirs*sizeof(dirtime *)); + if (sorted_dirlist == (dirtime **)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(DirlistSortNoMem))); + while (dirlist != (dirtime *)NULL) { + dirtime *d = dirlist; + + dirlist = dirlist->next; + free(d); + } + } else { + if (num_dirs == 1) + sorted_dirlist[0] = dirlist; + else { + for (i = 0; i < num_dirs; ++i) { + sorted_dirlist[i] = dirlist; + dirlist = dirlist->next; + } + qsort((char *)sorted_dirlist, num_dirs, sizeof(dirtime *), + dircomp); + } + + Trace((stderr, "setting directory times/perms/attributes\n")); + for (i = 0; i < num_dirs; ++i) { + dirtime *d = sorted_dirlist[i]; + + Trace((stderr, "dir = %s\n", d->fn)); + if ((error = set_direc_attribs(__G__ d)) != PK_OK) { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistSetAttrFailed), d->fn)); + if (!error_in_archive) + error_in_archive = error; + } + free(d->fn); + free(d); + } + free(sorted_dirlist); + } + } +#endif /* SET_DIR_ATTRIB */ + +#if (defined(WIN32) && defined(NTSD_EAS)) + process_defer_NT(__G); /* process any deferred items for this .zip file */ +#endif + +/*--------------------------------------------------------------------------- + Check for unmatched filespecs on command line and print warning if any + found. Free allocated memory. + ---------------------------------------------------------------------------*/ + + if (fn_matched) { + for (i = 0; i < G.filespecs; ++i) + if (!fn_matched[i]) { +#ifdef DLL + if (!G.redirect_data && !G.redirect_text) + Info(slide, 0x401, ((char *)slide, + LoadFarString(FilenameNotMatched), G.pfnames[i])); + else + setFileNotFound(__G); +#else + Info(slide, 1, ((char *)slide, + LoadFarString(FilenameNotMatched), G.pfnames[i])); +#endif + if (error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; /* some files not found */ + } + free((zvoid *)fn_matched); + } + if (xn_matched) { + for (i = 0; i < G.xfilespecs; ++i) + if (!xn_matched[i]) + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExclFilenameNotMatched), G.pxnames[i])); + free((zvoid *)xn_matched); + } + +/*--------------------------------------------------------------------------- + Double-check that we're back at the end-of-central-directory record, and + print quick summary of results, if we were just testing the archive. We + send the summary to stdout so that people doing the testing in the back- + ground and redirecting to a file can just do a "tail" on the output file. + ---------------------------------------------------------------------------*/ + +#ifndef SFX + if (readbuf(__G__ G.sig, 4) == 0) + error_in_archive = PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + if (!error_in_archive) /* don't overwrite stronger error */ + error_in_archive = PK_WARN; + } +#endif /* !SFX */ + if (uO.tflag) { + unsigned num = filnum - num_bad_pwd; + + if (uO.qflag < 2) { /* GRR 930710: was (uO.qflag == 1) */ + if (error_in_archive) + Info(slide, 0, ((char *)slide, LoadFarString(ErrorInArchive), + (error_in_archive == 1)? "warning-" : "", G.zipfn)); + else if (num == 0) + Info(slide, 0, ((char *)slide, LoadFarString(ZeroFilesTested), + G.zipfn)); + else if (G.process_all_files && (num_skipped+num_bad_pwd == 0)) + Info(slide, 0, ((char *)slide, LoadFarString(NoErrInCompData), + G.zipfn)); + else + Info(slide, 0, ((char *)slide, LoadFarString(NoErrInTestedFiles) + , G.zipfn, num, (num==1)? "":"s")); + if (num_skipped > 0) + Info(slide, 0, ((char *)slide, LoadFarString(FilesSkipped), + num_skipped, (num_skipped==1)? "":"s")); +#if CRYPT + if (num_bad_pwd > 0) + Info(slide, 0, ((char *)slide, LoadFarString(FilesSkipBadPasswd) + , num_bad_pwd, (num_bad_pwd==1)? "":"s")); +#endif /* CRYPT */ + } else if ((uO.qflag == 0) && !error_in_archive && (num == 0)) + Info(slide, 0, ((char *)slide, LoadFarString(ZeroFilesTested), + G.zipfn)); + } + + /* give warning if files not tested or extracted (first condition can still + * happen if zipfile is empty and no files specified on command line) */ + + if ((filnum == 0) && error_in_archive <= PK_WARN) { + if (num_skipped > 0) + error_in_archive = IZ_UNSUP; /* unsupport. compression/encryption */ + else + error_in_archive = PK_FIND; /* no files found at all */ + } +#if CRYPT + else if ((filnum == num_bad_pwd) && error_in_archive <= PK_WARN) + error_in_archive = IZ_BADPWD; /* bad passwd => all files skipped */ +#endif + else if ((num_skipped > 0) && error_in_archive <= PK_WARN) + error_in_archive = IZ_UNSUP; /* was PK_WARN; Jean-loup complained */ +#if CRYPT + else if ((num_bad_pwd > 0) && !error_in_archive) + error_in_archive = PK_WARN; +#endif + + return error_in_archive; + +} /* end function extract_or_test_files() */ + + + + + +/***************************/ +/* Function store_info() */ +/***************************/ + +static int store_info(__G) /* return 0 if skipping, 1 if OK */ + __GDEF +{ +#ifdef SFX +# define UNKN_COMPR \ + (G.crec.compression_method!=STORED && G.crec.compression_method!=DEFLATED) +#else +# ifdef COPYRIGHT_CLEAN /* no reduced files */ +# define UNKN_RED (G.crec.compression_method >= REDUCED1 && \ + G.crec.compression_method <= REDUCED4) +# else +# define UNKN_RED FALSE /* reducing not unknown */ +# endif +# ifdef LZW_CLEAN /* no shrunk files */ +# define UNKN_SHR (G.crec.compression_method == SHRUNK) +# else +# define UNKN_SHR FALSE /* unshrinking not unknown */ +# endif +# define UNKN_COMPR (UNKN_RED || UNKN_SHR || \ + G.crec.compression_method==TOKENIZED || G.crec.compression_method>DEFLATED) +#endif + +/*--------------------------------------------------------------------------- + Check central directory info for version/compatibility requirements. + ---------------------------------------------------------------------------*/ + + G.pInfo->encrypted = G.crec.general_purpose_bit_flag & 1; /* bit field */ + G.pInfo->ExtLocHdr = (G.crec.general_purpose_bit_flag & 8) == 8; /* bit */ + G.pInfo->textfile = G.crec.internal_file_attributes & 1; /* bit field */ + G.pInfo->crc = G.crec.crc32; + G.pInfo->compr_size = G.crec.csize; + G.pInfo->uncompr_size = G.crec.ucsize; + + switch (uO.aflag) { + case 0: + G.pInfo->textmode = FALSE; /* bit field */ + break; + case 1: + G.pInfo->textmode = G.pInfo->textfile; /* auto-convert mode */ + break; + default: /* case 2: */ + G.pInfo->textmode = TRUE; + break; + } + + if (G.crec.version_needed_to_extract[1] == VMS_) { + if (G.crec.version_needed_to_extract[0] > VMS_UNZIP_VERSION) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, LoadFarString(VersionMsg), + FnFilter1(G.filename), "VMS", + G.crec.version_needed_to_extract[0] / 10, + G.crec.version_needed_to_extract[0] % 10, + VMS_UNZIP_VERSION / 10, VMS_UNZIP_VERSION % 10)); + return 0; + } +#ifndef VMS /* won't be able to use extra field, but still have data */ + else if (!uO.tflag && !uO.overwrite_all) { /* if -o, extract anyway */ + Info(slide, 0x481, ((char *)slide, LoadFarString(VMSFormatQuery), + FnFilter1(G.filename))); + fgets(G.answerbuf, 9, stdin); + if ((*G.answerbuf != 'y') && (*G.answerbuf != 'Y')) + return 0; + } +#endif /* !VMS */ + /* usual file type: don't need VMS to extract */ + } else if (G.crec.version_needed_to_extract[0] > UNZIP_VERSION) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, LoadFarString(VersionMsg), + FnFilter1(G.filename), "PK", + G.crec.version_needed_to_extract[0] / 10, + G.crec.version_needed_to_extract[0] % 10, + UNZIP_VERSION / 10, UNZIP_VERSION % 10)); + return 0; + } + + if UNKN_COMPR { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) { +#ifndef SFX + if (G.crec.compression_method < NUM_METHODS) + Info(slide, 0x401, ((char *)slide, LoadFarString(ComprMsgName), + FnFilter1(G.filename), + LoadFarStringSmall(ComprNames[G.crec.compression_method]))); + else +#endif + Info(slide, 0x401, ((char *)slide, LoadFarString(ComprMsgNum), + FnFilter1(G.filename), + G.crec.compression_method)); + } + return 0; + } +#if (!CRYPT) + if (G.pInfo->encrypted) { + if (!((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2))) + Info(slide, 0x401, ((char *)slide, LoadFarString(SkipEncrypted), + FnFilter1(G.filename))); + return 0; + } +#endif /* !CRYPT */ + + /* map whatever file attributes we have into the local format */ + mapattr(__G); /* GRR: worry about return value later */ + + G.pInfo->offset = (long)G.crec.relative_offset_local_header; + return 1; + +} /* end function store_info() */ + + + + + +/***************************************/ +/* Function extract_or_test_member() */ +/***************************************/ + +static int extract_or_test_member(__G) /* return PK-type error code */ + __GDEF +{ + char *nul="[empty] ", *txt="[text] ", *bin="[binary]"; +#ifdef CMS_MVS + char *ebc="[ebcdic]"; +#endif + register int b; + int r, error=PK_COOL; +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + ulg wsize; +#else +# define wsize WSIZE +#endif + + +/*--------------------------------------------------------------------------- + Initialize variables, buffers, etc. + ---------------------------------------------------------------------------*/ + + G.bits_left = 0; + G.bitbuf = 0L; /* unreduce and unshrink only */ + G.zipeof = 0; + G.newfile = TRUE; + G.crc32val = CRCVAL_INITIAL; + +#ifdef SYMLINKS + /* if file came from Unix and is a symbolic link and we are extracting + * to disk, prepare to restore the link */ + if (S_ISLNK(G.pInfo->file_attr) && + (G.pInfo->hostnum == UNIX_ || G.pInfo->hostnum == ATARI_ || + G.pInfo->hostnum == BEOS_) && + !uO.tflag && !uO.cflag && (G.lrec.ucsize > 0)) + G.symlnk = TRUE; + else + G.symlnk = FALSE; +#endif /* SYMLINKS */ + + if (uO.tflag) { + if (!uO.qflag) + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), "test", + FnFilter1(G.filename), "", "")); + } else { +#ifdef DLL + if (uO.cflag && !G.redirect_data) +#else + if (uO.cflag) +#endif + { +#if (defined(OS2) && defined(__IBMC__) && (__IBMC__ >= 200)) + G.outfile = freopen("", "wb", stdout); /* VAC++ ignores setmode */ +#else + G.outfile = stdout; +#endif +#ifdef DOS_FLX_H68_OS2_W32 +#if (defined(__HIGHC__) && !defined(FLEXOS)) + setmode(G.outfile, _BINARY); +#else /* !(defined(__HIGHC__) && !defined(FLEXOS)) */ + setmode(fileno(G.outfile), O_BINARY); +#endif /* ?(defined(__HIGHC__) && !defined(FLEXOS)) */ +# define NEWLINE "\r\n" +#else /* !DOS_FLX_H68_OS2_W32 */ +# define NEWLINE "\n" +#endif /* ?DOS_FLX_H68_OS2_W32 */ +#ifdef VMS + if (open_outfile(__G)) /* VMS: required even for stdout! */ + return PK_DISK; +#endif + } else if (open_outfile(__G)) + return PK_DISK; + } + +/*--------------------------------------------------------------------------- + Unpack the file. + ---------------------------------------------------------------------------*/ + + defer_leftover_input(__G); /* so NEXTBYTE bounds check will work */ + switch (G.lrec.compression_method) { + case STORED: + if (!uO.tflag && QCOND2) { +#ifdef SYMLINKS + if (G.symlnk) /* can also be deflated, but rarer... */ + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "link", FnFilter1(G.filename), "", "")); + else +#endif /* SYMLINKS */ + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "extract", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.lrec.ucsize == 0L? nul : (G.pInfo->textfile? txt : + bin)), uO.cflag? NEWLINE : "")); + } +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { + wsize = G.redirect_size; redirSlide = G.redirect_buffer; + } else { + wsize = WSIZE; redirSlide = slide; + } +#endif + G.outptr = redirSlide; + G.outcnt = 0L; + while ((b = NEXTBYTE) != EOF && !G.disk_full) { + *G.outptr++ = (uch)b; + if (++G.outcnt == wsize) { + flush(__G__ redirSlide, G.outcnt, 0); + G.outptr = redirSlide; + G.outcnt = 0L; + } + } + if (G.outcnt) /* flush final (partial) buffer */ + flush(__G__ redirSlide, G.outcnt, 0); + break; + +#ifndef SFX +#ifndef LZW_CLEAN + case SHRUNK: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + LoadFarStringSmall(Unshrink), FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } + if ((r = unshrink(__G)) != PK_COOL) { + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipFile), + LoadFarString(NotEnoughMem), + LoadFarStringSmall2(Unshrink), + FnFilter1(G.filename))); + else + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), + LoadFarString(NotEnoughMem), + LoadFarStringSmall2(Unshrink))); + error = r; + } + break; +#endif /* !LZW_CLEAN */ + +#ifndef COPYRIGHT_CLEAN + case REDUCED1: + case REDUCED2: + case REDUCED3: + case REDUCED4: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "unreduc", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } + unreduce(__G); + break; +#endif /* !COPYRIGHT_CLEAN */ + + case IMPLODED: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "explod", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } + if (((r = explode(__G)) != 0) && (r != 5)) { /* treat 5 specially */ + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Explode), + FnFilter1(G.filename))); + else + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Explode))); + error = (r == 3)? PK_MEM3 : PK_ERR; + } + if (r == 5) { + int warning = ((ulg)G.used_csize <= G.lrec.csize); + + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, LoadFarString(LengthMsg), + "", warning? "warning" : "error", G.used_csize, + G.lrec.ucsize, warning? " " : "", G.lrec.csize, + " [", FnFilter1(G.filename), "]")); + else + Info(slide, 0x401, ((char *)slide, LoadFarString(LengthMsg), + "\n", warning? "warning" : "error", G.used_csize, + G.lrec.ucsize, warning? " ":"", G.lrec.csize, + "", "", ".")); + error = warning? PK_WARN : PK_ERR; + } + break; +#endif /* !SFX */ + + case DEFLATED: + if (!uO.tflag && QCOND2) { + Info(slide, 0, ((char *)slide, LoadFarString(ExtractMsg), + "inflat", FnFilter1(G.filename), + (uO.aflag != 1 /* && G.pInfo->textfile==G.pInfo->textmode */)? + "" : (G.pInfo->textfile? txt : bin), uO.cflag? NEWLINE : "")); + } +#ifndef USE_ZLIB /* zlib's function is called inflate(), too */ +# define UZinflate inflate +#endif + if ((r = UZinflate(__G)) != 0) { + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Inflate), + FnFilter1(G.filename))); + else + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Inflate))); + error = (r == 3)? PK_MEM3 : PK_ERR; + } + break; + + default: /* should never get to this point */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(FileUnknownCompMethod), FnFilter1(G.filename))); + /* close and delete file before return? */ + undefer_input(__G); + return PK_WARN; + + } /* end switch (compression method) */ + +/*--------------------------------------------------------------------------- + Close the file and set its date and time (not necessarily in that order), + and make sure the CRC checked out OK. Logical-AND the CRC for 64-bit + machines (redundant on 32-bit machines). + ---------------------------------------------------------------------------*/ + +#ifdef VMS /* VMS: required even for stdout! (final flush) */ + if (!uO.tflag) /* don't close NULL file */ + close_outfile(__G); +#else +#ifdef DLL + if (!uO.tflag && (!uO.cflag || G.redirect_data)) { + if (G.redirect_data) + FINISH_REDIRECT(); + else + close_outfile(__G); + } +#else + if (!uO.tflag && !uO.cflag) /* don't close NULL file or stdout */ + close_outfile(__G); +#endif +#endif /* VMS */ + + /* GRR: CONVERT close_outfile() TO NON-VOID: CHECK FOR ERRORS! */ + + + if (G.disk_full) { /* set by flush() */ + if (G.disk_full > 1) { +#if (defined(DELETE_IF_FULL) && defined(HAVE_UNLINK)) + /* delete the incomplete file if we can */ + if (unlink(G.filename) != 0) + Trace((stderr, "extract.c: could not delete %s\n", + FnFilter1(G.filename))); +#else + /* warn user about the incomplete file */ + Info(slide, 0x421, ((char *)slide, LoadFarString(FileTruncated), + FnFilter1(G.filename))); +#endif + error = PK_DISK; + } else { + error = PK_WARN; + } + } + + if (error > PK_WARN) {/* don't print redundant CRC error if error already */ + undefer_input(__G); + return error; + } + if (G.crc32val != G.lrec.crc32) { + /* if quiet enough, we haven't output the filename yet: do it */ + if ((uO.tflag && uO.qflag) || (!uO.tflag && !QCOND2)) + Info(slide, 0x401, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 0x401, ((char *)slide, LoadFarString(BadCRC), G.crc32val, + G.lrec.crc32)); +#if CRYPT + if (G.pInfo->encrypted) + Info(slide, 0x401, ((char *)slide, LoadFarString(MaybeBadPasswd))); +#endif + error = PK_ERR; + } else if (uO.tflag) { +#ifndef SFX + if (G.extra_field) { + if ((r = TestExtraField(__G__ G.extra_field, + G.lrec.extra_field_length)) > error) + error = r; + } else +#endif /* !SFX */ + if (!uO.qflag) + Info(slide, 0, ((char *)slide, " OK\n")); + } else { + if (QCOND2 && !error) /* GRR: is stdout reset to text mode yet? */ + Info(slide, 0, ((char *)slide, "\n")); + } + + undefer_input(__G); + return error; + +} /* end function extract_or_test_member() */ + + + + + +#ifndef SFX + +/*******************************/ +/* Function TestExtraField() */ +/*******************************/ + +static int TestExtraField(__G__ ef, ef_len) + __GDEF + uch *ef; + unsigned ef_len; +{ + ush ebID; + unsigned ebLen; + unsigned eb_cmpr_offs = 0; + int r; + + /* we know the regular compressed file data tested out OK, or else we + * wouldn't be here ==> print filename if any extra-field errors found + */ + while (ef_len >= EB_HEADSIZE) { + ebID = makeword(ef); + ebLen = (unsigned)makeword(ef+EB_LEN); + + if (ebLen > (ef_len - EB_HEADSIZE)) { + /* Discovered some extra field inconsistency! */ + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 1, ((char *)slide, LoadFarString(InconsistEFlength), + ebLen, (ef_len - EB_HEADSIZE))); + return PK_ERR; + } + + switch (ebID) { + case EF_OS2: + case EF_ACL: + case EF_MAC3: + case EF_BEOS: + switch (ebID) { + case EF_OS2: + case EF_ACL: + eb_cmpr_offs = EB_OS2_HLEN; + break; + case EF_MAC3: + if (ebLen >= EB_MAC3_HLEN && + (makeword(ef+(EB_HEADSIZE+EB_FLGS_OFFS)) + & EB_M3_FL_UNCMPR) && + (makelong(ef+EB_HEADSIZE) == ebLen - EB_MAC3_HLEN)) + eb_cmpr_offs = 0; + else + eb_cmpr_offs = EB_MAC3_HLEN; + break; + case EF_BEOS: + if (ebLen >= EB_BEOS_HLEN && + (*(ef+(EB_HEADSIZE+EB_FLGS_OFFS)) & EB_BE_FL_UNCMPR) && + (makelong(ef+EB_HEADSIZE) == ebLen - EB_BEOS_HLEN)) + eb_cmpr_offs = 0; + else + eb_cmpr_offs = EB_BEOS_HLEN; + break; + } + if ((r = test_compr_eb(__G__ ef, ebLen, eb_cmpr_offs, NULL)) + != PK_OK) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + switch (r) { + case IZ_EF_TRUNC: + Info(slide, 1, ((char *)slide, + LoadFarString(TruncEAs), + ebLen-(eb_cmpr_offs+EB_CMPRHEADLEN), "\n")); + break; + case PK_ERR: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidComprDataEAs))); + break; + case PK_MEM3: + case PK_MEM4: + Info(slide, 1, ((char *)slide, + LoadFarString(NotEnoughMemEAs))); + break; + default: + if ((r & 0xff) != PK_ERR) + Info(slide, 1, ((char *)slide, + LoadFarString(UnknErrorEAs))); + else { + ush m = (ush)(r >> 8); + if (m == DEFLATED) /* GRR KLUDGE! */ + Info(slide, 1, ((char *)slide, + LoadFarString(BadCRC_EAs))); + else + Info(slide, 1, ((char *)slide, + LoadFarString(UnknComprMethodEAs), m)); + } + break; + } + return r; + } + break; + + case EF_NTSD: + Trace((stderr, "ebID: %i / ebLen: %u\n", ebID, ebLen)); + r = ebLen < EB_NTSD_L_LEN ? IZ_EF_TRUNC : + ((ef[EB_HEADSIZE+EB_NTSD_VERSION] > EB_NTSD_MAX_VER) ? + (PK_WARN | 0x4000) : + test_compr_eb(__G__ ef, ebLen, EB_NTSD_L_LEN, TEST_NTSD)); + if (r != PK_OK) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + switch (r) { + case IZ_EF_TRUNC: + Info(slide, 1, ((char *)slide, + LoadFarString(TruncNTSD), + ebLen-(EB_NTSD_L_LEN+EB_CMPRHEADLEN), "\n")); + break; +#if (defined(WIN32) && defined(NTSD_EAS)) + case PK_WARN: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidSecurityEAs))); + break; +#endif + case PK_ERR: + Info(slide, 1, ((char *)slide, + LoadFarString(InvalidComprDataEAs))); + break; + case PK_MEM3: + case PK_MEM4: + Info(slide, 1, ((char *)slide, + LoadFarString(NotEnoughMemEAs))); + break; + case (PK_WARN | 0x4000): + Info(slide, 1, ((char *)slide, + LoadFarString(UnsuppNTSDVersEAs), + (int)ef[EB_HEADSIZE+EB_NTSD_VERSION])); + r = PK_WARN; + break; + default: + if ((r & 0xff) != PK_ERR) + Info(slide, 1, ((char *)slide, + LoadFarString(UnknErrorEAs))); + else { + ush m = (ush)(r >> 8); + if (m == DEFLATED) /* GRR KLUDGE! */ + Info(slide, 1, ((char *)slide, + LoadFarString(BadCRC_EAs))); + else + Info(slide, 1, ((char *)slide, + LoadFarString(UnknComprMethodEAs), m)); + } + break; + } + return r; + } + break; + case EF_PKVMS: + case EF_PKW32: + case EF_PKUNIX: + case EF_ASIUNIX: + case EF_IZVMS: + case EF_IZUNIX: + case EF_VMCMS: + case EF_MVS: + case EF_SPARK: + case EF_AV: + default: + break; + } + ef_len -= (ebLen + EB_HEADSIZE); + ef += (ebLen + EB_HEADSIZE); + } + + if (!uO.qflag) + Info(slide, 0, ((char *)slide, " OK\n")); + + return PK_COOL; + +} /* end function TestExtraField() */ + + + + + +/******************************/ +/* Function test_compr_eb() */ +/******************************/ + +#ifdef PROTO +static int test_compr_eb( + __GPRO__ + uch *eb, + unsigned eb_size, + unsigned compr_offset, + int (*test_uc_ebdata)(__GPRO__ uch *eb, unsigned eb_size, + uch *eb_ucptr, ulg eb_ucsize)) +#else /* !PROTO */ +static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) + __GDEF + uch *eb; + unsigned eb_size; + unsigned compr_offset; + int (*test_uc_ebdata)(); +#endif /* ?PROTO */ +{ + ulg eb_ucsize; + uch *eb_ucptr; + int r; + + if (compr_offset < 4) /* field is not compressed: */ + return PK_OK; /* do nothing and signal OK */ + + if ((eb_size < (EB_UCSIZE_P + 4)) || + ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L && + eb_size <= (compr_offset + EB_CMPRHEADLEN))) + return IZ_EF_TRUNC; /* no compressed data! */ + + if ((eb_ucptr = (uch *)malloc((extent)eb_ucsize)) == (uch *)NULL) + return PK_MEM4; + + r = memextract(__G__ eb_ucptr, eb_ucsize, + eb + (EB_HEADSIZE + compr_offset), + (ulg)(eb_size - compr_offset)); + + if (r == PK_OK && test_uc_ebdata != NULL) + r = (*test_uc_ebdata)(__G__ eb, eb_size, eb_ucptr, eb_ucsize); + + free(eb_ucptr); + return r; + +} /* end function test_compr_eb() */ + +#endif /* !SFX */ + + + + + +/***************************/ +/* Function memextract() */ +/***************************/ + +int memextract(__G__ tgt, tgtsize, src, srcsize) /* extract compressed */ + __GDEF /* extra field block; */ + uch *tgt, *src; /* return PK-type error */ + ulg tgtsize, srcsize; /* level */ +{ + long old_csize=G.csize; + uch *old_inptr=G.inptr; + int old_incnt=G.incnt; + int r, error=PK_OK; + ush method; + ulg extra_field_crc; + + + method = makeword(src); + extra_field_crc = makelong(src+2); + + /* compressed extra field exists completely in memory at this location: */ + G.inptr = src + 2 + 4; /* method and extra_field_crc */ + G.incnt = (int)(G.csize = (long)(srcsize - (2 + 4))); + G.mem_mode = TRUE; + G.outbufptr = tgt; + G.outsize = tgtsize; + + switch (method) { + case STORED: + memcpy((char *)tgt, (char *)G.inptr, (extent)G.incnt); + G.outcnt = G.csize; /* for CRC calculation */ + break; + case DEFLATED: + G.outcnt = 0L; + if ((r = UZinflate(__G)) != 0) { + if (!uO.tflag) + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), r == 3? + LoadFarString(NotEnoughMem) : + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Inflate))); + error = (r == 3)? PK_MEM3 : PK_ERR; + } + if (G.outcnt == 0L) /* inflate's final FLUSH sets outcnt */ + break; + break; + default: + if (uO.tflag) + error = PK_ERR | ((int)method << 8); + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(UnsupportedExtraField), method)); + error = PK_ERR; /* GRR: should be passed on up via SetEAs() */ + } + break; + } + + G.inptr = old_inptr; + G.incnt = old_incnt; + G.csize = old_csize; + G.mem_mode = FALSE; + + if (!error) { + register ulg crcval = crc32(CRCVAL_INITIAL, tgt, (extent)G.outcnt); + + if (crcval != extra_field_crc) { + if (uO.tflag) + error = PK_ERR | (DEFLATED << 8); /* kludge for now */ + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(BadExtraFieldCRC), G.zipfn, crcval, + extra_field_crc)); + error = PK_ERR; + } + } + } + return error; + +} /* end function memextract() */ + + + + + +/*************************/ +/* Function memflush() */ +/*************************/ + +int memflush(__G__ rawbuf, size) + __GDEF + uch *rawbuf; + ulg size; +{ + if (size > G.outsize) + return 50; /* more data than output buffer can hold */ + + memcpy((char *)G.outbufptr, (char *)rawbuf, (extent)size); + G.outbufptr += (unsigned int)size; + G.outsize -= size; + G.outcnt += size; + + return 0; + +} /* end function memflush() */ + + + + + +/*************************/ +/* Function fnfilter() */ /* here instead of in list.c for SFX */ +/*************************/ + +char *fnfilter(raw, space) /* convert name to safely printable form */ + ZCONST char *raw; + uch *space; +{ +#ifndef NATIVE /* ASCII: filter ANSI escape codes, etc. */ + uch *r=(uch *)raw, *s=space; + + while (*r) { +#ifdef QDOS + if (qlflag & 2) { + if (*r == '/' || *r == '.') { + ++r; + *s++ = '_'; + continue; + } + } else +#endif + if (*r < 32) + *s++ = '^', *s++ = (uch)(64 + *r++); + else + *s++ = *r++; + } + *s = 0; + +#ifdef WINDLL + INTERN_TO_ISO((char *)space, (char *)space); /* translate to ANSI */ +#else +#ifdef WIN32 + /* Win9x console always uses OEM character coding, and + WinNT console is set to OEM charset by default, too */ + INTERN_TO_OEM((char *)space, (char *)space); +#endif /* WIN32 */ +#endif /* ?WINDLL */ + + return (char *)space; + +#else /* NATIVE: EBCDIC or whatever */ + return (char *)raw; +#endif + +} /* end function fnfilter() */ + + + + + +#ifdef SET_DIR_ATTRIB +/* must sort saved directories so can set perms from bottom up */ + +/************************/ +/* Function dircomp() */ +/************************/ + +static int dircomp(a, b) /* used by qsort(); swiped from Zip */ + ZCONST zvoid *a, *b; +{ + /* order is significant: this sorts in reverse order (deepest first) */ + return strcmp((*(dirtime **)b)->fn, (*(dirtime **)a)->fn); + /* return namecmp((*(dirtime **)b)->fn, (*(dirtime **)a)->fn); */ +} + + + +#if 0 /* not used in Unix, but maybe for future OSes? */ + +/************************/ +/* Function namecmp() */ +/************************/ + +static int namecmp(s1, s2) /* [not] used by dircomp(); swiped from Zip */ + ZCONST char *s1, *s2; +{ + int d; + + for (;;) { + d = (int)(uch)case_map(*s1) + - (int)(uch)case_map(*s2); + + if (d || *s1 == 0 || *s2 == 0) + return d; + + s1++; + s2++; + } +} + +#endif /* 0 */ +#endif /* SET_DIR_ATTRIB */ diff --git a/utils/Install/sfxzip/fileio.c b/utils/Install/sfxzip/fileio.c new file mode 100644 index 0000000000..9ee4ed3a92 --- /dev/null +++ b/utils/Install/sfxzip/fileio.c @@ -0,0 +1,2161 @@ +/*--------------------------------------------------------------------------- + + fileio.c + + This file contains routines for doing direct but relatively generic input/ + output, file-related sorts of things, plus some miscellaneous stuff. Most + of the stuff has to do with opening, closing, reading and/or writing files. + + Contains: open_input_file() + open_outfile() (non-VMS, non-AOS/VS, non-CMS_MVS) + undefer_input() + defer_leftover_input() + readbuf() + readbyte() + fillinbuf() + flush() (non-VMS) + disk_error() (non-VMS) + UzpMessagePrnt() + UzpMessageNull() (DLL only) + UzpInput() + UzpMorePause() + UzpPassword() (non-WINDLL) + handler() + dos_to_unix_time() (non-VMS, non-VM/CMS, non-MVS) + check_for_newer() (non-VMS, non-OS/2, non-VM/CMS, non-MVS) + do_string() + makeword() + makelong() + str2iso() (CRYPT && NEED_STR2ISO, only) + str2oem() (CRYPT && NEED_STR2OEM, only) + memset() (ZMEM only) + memcpy() (ZMEM only) + zstrnicmp() + zstat() (REGULUS only) + fLoadFarString() (SMALL_MEM only) + fLoadFarStringSmall() (SMALL_MEM only) + fLoadFarStringSmall2() (SMALL_MEM only) + zfstrcpy() (SMALL_MEM only) + + ---------------------------------------------------------------------------*/ + + +#define FILEIO_C +#define UNZIP_INTERNAL +#include "unzip.h" +#ifdef WINDLL +# include "windll/windll.h" +# include +#endif +#include "crypt.h" +#include "ttyio.h" + +off_t acelseek(off_t offset, int whence); +int aceread(void *buf, size_t count); +int aceopen(const char *path, int flags); +int aceclose(int fd); +int acesize(void); +int acetell(int fd); +char *replacestr(char *str1, char *str2, char *str3); + +/* setup of codepage conversion for decryption passwords */ +#if CRYPT +# if (defined(CRYP_USES_ISO2OEM) && !defined(IZ_ISO2OEM_ARRAY)) +# define IZ_ISO2OEM_ARRAY /* pull in iso2oem[] table */ +# endif +# if (defined(CRYP_USES_OEM2ISO) && !defined(IZ_OEM2ISO_ARRAY)) +# define IZ_OEM2ISO_ARRAY /* pull in oem2iso[] table */ +# endif +#endif +#include "ebcdic.h" /* definition/initialization of ebcdic[] */ + + +/* + Note: Under Windows, the maximum size of the buffer that can be used + with any of the *printf calls is 16,384, so win_fprintf was used to + feed the fprintf clone no more than 16K chunks at a time. This should + be valid for anything up to 64K (and probably beyond, assuming your + buffers are that big). +*/ +#ifdef WINDLL +# define WriteError(buf,len,strm) \ + (win_fprintf(pG, strm, (extent)len, (char far *)buf) != (int)(len)) +#else /* !WINDLL */ +# ifdef USE_FWRITE +# define WriteError(buf,len,strm) \ + ((extent)fwrite((char *)(buf),1,(extent)(len),strm) != (extent)(len)) +# else +# define WriteError(buf,len,strm) \ + ((extent)write(fileno(strm),(char *)(buf),(extent)(len)) != (extent)(len)) +# endif +#endif /* ?WINDLL */ + +static int disk_error OF((__GPRO)); + + +/****************************/ +/* Strings used in fileio.c */ +/****************************/ + +#if (defined(UNIX) || defined(DOS_FLX_OS2_W32) || defined(__BEOS__)) + static ZCONST char Far CannotDeleteOldFile[] = + "error: cannot delete old %s\n"; +#ifdef UNIXBACKUP + static ZCONST char Far CannotRenameOldFile[] = + "error: cannot rename old %s\n"; + static ZCONST char Far BackupSuffix[] = "~"; +#endif +#endif /* UNIX || DOS_FLX_OS2_W32 || __BEOS__ */ + +static ZCONST char Far CannotOpenZipfile[] = + "error: cannot open zipfile [ %s ]\n"; +#if (!defined(VMS) && !defined(AOS_VS) && !defined(CMS_MVS) && !defined(MACOS)) + static ZCONST char Far CannotCreateFile[] = "error: cannot create %s\n"; +#endif +#ifdef NOVELL_BUG_FAILSAFE + static ZCONST char Far NovellBug[] = + "error: %s: stat() says does not exist, but fopen() found anyway\n"; +#endif +static ZCONST char Far ReadError[] = "error: zipfile read error\n"; +static ZCONST char Far FilenameTooLongTrunc[] = + "warning: filename too long--truncating.\n"; +static ZCONST char Far ExtraFieldTooLong[] = + "warning: extra field too long (%d). Ignoring...\n"; + +#ifdef WINDLL + static ZCONST char Far DiskFullQuery[] = + "%s: write error (disk full?).\n"; +#else + static ZCONST char Far DiskFullQuery[] = + "%s: write error (disk full?). Continue? (y/n/^C) "; + static ZCONST char Far ZipfileCorrupt[] = + "error: zipfile probably corrupt (%s)\n"; +# ifdef SYMLINKS + static ZCONST char Far FileIsSymLink[] = + "%s exists and is a symbolic link%s.\n"; +# endif +# ifdef MORE + static ZCONST char Far MorePrompt[] = "--More--(%lu)"; +# endif + static ZCONST char Far QuitPrompt[] = + "--- Press `Q' to quit, or any other key to continue ---"; + static ZCONST char Far HidePrompt[] = /* "\r \r"; */ + "\r \r"; +# if CRYPT +# ifdef MACOS + /* SPC: are names on MacOS REALLY so much longer than elsewhere ??? */ + static ZCONST char Far PasswPrompt[] = "[%s]\n %s password: "; +# else + static ZCONST char Far PasswPrompt[] = "[%s] %s password: "; +# endif + static ZCONST char Far PasswPrompt2[] = "Enter password: "; + static ZCONST char Far PasswRetry[] = "password incorrect--reenter: "; +# endif /* CRYPT */ +#endif /* !WINDLL */ + + + + + +/******************************/ +/* Function open_input_file() */ +/******************************/ + +int open_input_file(__G) /* return 1 if open failed */ + __GDEF +{ + /* + * open the zipfile for reading and in BINARY mode to prevent cr/lf + * translation, which would corrupt the bitstreams + */ + +#if (defined(UNIX) || defined(TOPS20) || defined(AOS_VS) || defined(__BEOS__)) + G.zipfd = aceopen(G.zipfn, O_RDONLY); +#else /* !(UNIX || TOPS20 || AOS_VS || __BEOS__) */ +#ifdef VMS + G.zipfd = open(G.zipfn, O_RDONLY, 0, "ctx=stm"); +#else /* !VMS */ +#ifdef MACOS + G.zipfd = aceopen(G.zipfn, 0); +#else /* !MACOS */ +#ifdef RISCOS + G.zipfd = fopen(G.zipfn, "rb"); +#else /* !RISCOS */ +#ifdef CMS_MVS + G.zipfd = vmmvs_open_infile(__G); +#else /* !CMS_MVS */ + G.zipfd = aceopen(G.zipfn, O_RDONLY | O_BINARY); +#endif /* ?CMS_MVS */ +#endif /* ?RISCOS */ +#endif /* ?MACOS */ +#endif /* ?VMS */ +#endif /* ?(UNIX || TOPS20 || AOS_VS || __BEOS__) */ + +#ifdef USE_STRM_INPUT + if (G.zipfd == NULL) +#else + /* if (G.zipfd < 0) */ /* no good for Windows CE port */ + if (G.zipfd == -1) +#endif + { + Info(slide, 0x401, ((char *)slide, LoadFarString(CannotOpenZipfile), + G.zipfn)); + return 1; + } + return 0; + +} /* end function open_input_file() */ + + + + +#if (!defined(VMS) && !defined(AOS_VS) && !defined(CMS_MVS) && !defined(MACOS)) + +/***************************/ +/* Function open_outfile() */ +/***************************/ + +int open_outfile(__G) /* return 1 if fail */ + __GDEF +{ +#ifdef DLL + if (G.redirect_data) + return (redirect_outfile(__G) == FALSE); +#endif +#ifdef QDOS + QFilename(__G__ G.filename); +#endif +#if (defined(DOS_FLX_OS2_W32) || defined(UNIX) || defined(__BEOS__)) +#ifdef BORLAND_STAT_BUG + /* Borland 5.0's stat() barfs if the filename has no extension and the + * file doesn't exist. */ + if (access(G.filename, 0) == -1) { + FILE *tmp = fopen(G.filename, "wb+"); + + /* file doesn't exist, so create a dummy file to keep stat() from + * failing (will be over-written anyway) */ + fputc('0', tmp); /* just to have something in the file */ + fclose(tmp); + } +#endif /* BORLAND_STAT_BUG */ +#ifdef SYMLINKS + if (SSTAT(G.filename, &G.statbuf) == 0 || lstat(G.filename,&G.statbuf) == 0) +#else + if (SSTAT(G.filename, &G.statbuf) == 0) +#endif /* ?SYMLINKS */ + { + Trace((stderr, "open_outfile: stat(%s) returns 0: file exists\n", + FnFilter1(G.filename))); +#ifdef UNIXBACKUP + if (uO.B_flag) { /* do backup */ + char *tname; + int blen, flen, tlen; + + blen = strlen(BackupSuffix); + flen = strlen(G.filename); + tlen = flen + blen + 1; + if (tlen >= FILNAMSIZ) { /* in case name is too long, truncate */ + tname = (char *)malloc(FILNAMSIZ); + if (tname == NULL) + return 1; /* in case we run out of space */ + tlen = FILNAMSIZ - 1 - blen; + strcpy(tname, G.filename); /* make backup name */ + tname[tlen] = '\0'; + } else { + tname = (char *)malloc(tlen); + if (tname == NULL) + return 1; /* in case we run out of space */ + strcpy(tname, G.filename); /* make backup name */ + } + strcpy(tname+flen, BackupSuffix); + + /* GRR: should check if backup file exists, apply -n/-o to that */ + if (rename(G.filename, tname) < 0) { /* move file */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotRenameOldFile), FnFilter1(G.filename))); + free(tname); + return 1; + } + free(tname); + } else +#endif /* UNIXBACKUP */ +#ifdef DOS_FLX_OS2_W32 + if (!(G.statbuf.st_mode & S_IWRITE)) { + Trace((stderr, "open_outfile: existing file %s is read-only\n", + FnFilter1(G.filename))); + chmod(G.filename, S_IREAD | S_IWRITE); + Trace((stderr, "open_outfile: %s now writable\n", + FnFilter1(G.filename))); + } +#endif /* DOS_FLX_OS2_W32 */ + if (unlink(G.filename) != 0) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotDeleteOldFile), FnFilter1(G.filename))); + return 1; + } + Trace((stderr, "open_outfile: %s now deleted\n", + FnFilter1(G.filename))); + } +#endif /* DOS_FLX_OS2_W32 || UNIX || __BEOS__ */ +#ifdef RISCOS + if (SWI_OS_File_7(G.filename,0xDEADDEAD,0xDEADDEAD,G.lrec.ucsize)!=NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } +#endif /* RISCOS */ +#ifdef TOPS20 + char *tfilnam; + + if ((tfilnam = (char *)malloc(2*strlen(G.filename)+1)) == (char *)NULL) + return 1; + strcpy(tfilnam, G.filename); + upper(tfilnam); + enquote(tfilnam); + if ((G.outfile = fopen(tfilnam, FOPW)) == (FILE *)NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + tfilnam)); + free(tfilnam); + return 1; + } + free(tfilnam); +#else /* !TOPS20 */ +#ifdef MTS + if (uO.aflag) + G.outfile = fopen(G.filename, FOPWT); + else + G.outfile = fopen(G.filename, FOPW); + if (G.outfile == (FILE *)NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } +#else /* !MTS */ +#ifdef TANDEM + if (SSTAT(G.filename, &G.statbuf) == 0) { + Trace((stderr, "open_outfile: stat(%s) returns 0 (file exists)\n", + FnFilter1(G.filename))); + if (unlink(G.filename) != 0) { + Trace((stderr, "open_outfile: existing file %s is read-only\n", + FnFilter1(G.filename))); + chmod(G.filename, S_IRUSR | S_IWUSR); + Trace((stderr, "open_outfile: %s now writable\n", + FnFilter1(G.filename))); + if (unlink(G.filename) != 0) + return 1; + } + Trace((stderr, "open_outfile: %s now deleted\n", + FnFilter1(G.filename))); + } + if (G.pInfo->textmode) + G.outfile = fopen(G.filename, FOPWT); + else + G.outfile = fopen(G.filename, FOPW); + if (G.outfile == (FILE *)NULL) { + Info(slide, 1, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } +#else /* !TANDEM */ +#ifdef DEBUG + Info(slide, 1, ((char *)slide, + "open_outfile: doing fopen(%s) for reading\n", FnFilter1(G.filename))); + if ((G.outfile = fopen(G.filename, FOPR)) == (FILE *)NULL) + Info(slide, 1, ((char *)slide, + "open_outfile: fopen(%s) for reading failed: does not exist\n", + FnFilter1(G.filename))); + else { + Info(slide, 1, ((char *)slide, + "open_outfile: fopen(%s) for reading succeeded: file exists\n", + FnFilter1(G.filename))); + fclose(G.outfile); + } +#endif /* DEBUG */ +#ifdef NOVELL_BUG_FAILSAFE + if (G.dne && ((G.outfile = fopen(G.filename, FOPR)) != (FILE *)NULL)) { + Info(slide, 0x401, ((char *)slide, LoadFarString(NovellBug), + FnFilter1(G.filename))); + fclose(G.outfile); + return 1; /* with "./" fix in checkdir(), should never reach here */ + } +#endif /* NOVELL_BUG_FAILSAFE */ + Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", + FnFilter1(G.filename))); + if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) { + Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), + FnFilter1(G.filename))); + return 1; + } + Trace((stderr, "open_outfile: fopen(%s) for writing succeeded\n", + FnFilter1(G.filename))); +#endif /* !TANDEM */ +#endif /* !MTS */ +#endif /* !TOPS20 */ + +#ifdef USE_FWRITE +#ifdef DOS_OS2_W32 + /* 16-bit MSC: buffer size must be strictly LESS than 32K (WSIZE): bogus */ + setbuf(G.outfile, (char *)NULL); /* make output unbuffered */ +#else /* !DOS_OS2_W32 */ +#ifndef RISCOS +#ifdef _IOFBF /* make output fully buffered (works just about like write()) */ + setvbuf(G.outfile, (char *)slide, _IOFBF, WSIZE); +#else + setbuf(G.outfile, (char *)slide); +#endif +#endif /* !RISCOS */ +#endif /* ?DOS_OS2_W32 */ +#endif /* USE_FWRITE */ + return 0; + +} /* end function open_outfile() */ + +#endif /* !VMS && !AOS_VS && !CMS_MVS && !MACOS */ + + + + + +/* + * These functions allow NEXTBYTE to function without needing two bounds + * checks. Call defer_leftover_input() if you ever have filled G.inbuf + * by some means other than readbyte(), and you then want to start using + * NEXTBYTE. When going back to processing bytes without NEXTBYTE, call + * undefer_input(). For example, extract_or_test_member brackets its + * central section that does the decompression with these two functions. + * If you need to check the number of bytes remaining in the current + * file while using NEXTBYTE, check (G.csize + G.incnt), not G.csize. + */ + +/****************************/ +/* function undefer_input() */ +/****************************/ + +void undefer_input(__G) + __GDEF +{ + if (G.incnt > 0) + G.csize += G.incnt; + if (G.incnt_leftover > 0) { + /* We know that "(G.csize < MAXINT)" so we can cast G.csize to int: + * This condition was checked when G.incnt_leftover was set > 0 in + * defer_leftover_input(), and it is NOT allowed to touch G.csize + * before calling undefer_input() when (G.incnt_leftover > 0) + * (single exception: see read_byte()'s "G.csize <= 0" handling) !! + */ + G.incnt = G.incnt_leftover + (int)G.csize; + G.inptr = G.inptr_leftover - (int)G.csize; + G.incnt_leftover = 0; + } else if (G.incnt < 0) + G.incnt = 0; +} /* end function undefer_input() */ + + + + + +/***********************************/ +/* function defer_leftover_input() */ +/***********************************/ + +void defer_leftover_input(__G) + __GDEF +{ + if ((long)G.incnt > G.csize) { + /* (G.csize < MAXINT), we can safely cast it to int !! */ + if (G.csize < 0L) + G.csize = 0L; + G.inptr_leftover = G.inptr + (int)G.csize; + G.incnt_leftover = G.incnt - (int)G.csize; + G.incnt = (int)G.csize; + } else + G.incnt_leftover = 0; + G.csize -= G.incnt; +} /* end function defer_leftover_input() */ + + + + + +/**********************/ +/* Function readbuf() */ +/**********************/ + +unsigned readbuf(__G__ buf, size) /* return number of bytes read into buf */ + __GDEF + char *buf; + register unsigned size; +{ + register unsigned count; + unsigned n; + + n = size; + while (size) { + if (G.incnt <= 0) { + if ((G.incnt = aceread((char *)G.inbuf, INBUFSIZ)) == 0) + return (n-size); + else if (G.incnt < 0) { + /* another hack, but no real harm copying same thing twice */ + (*G.message)((zvoid *)&G, + (uch *)LoadFarString(ReadError), /* CANNOT use slide */ + (ulg)strlen(LoadFarString(ReadError)), 0x401); + return 0; /* discarding some data; better than lock-up */ + } + /* buffer ALWAYS starts on a block boundary: */ + G.cur_zipfile_bufstart += INBUFSIZ; + G.inptr = G.inbuf; + } + count = MIN(size, (unsigned)G.incnt); + memcpy(buf, G.inptr, count); + buf += count; + G.inptr += count; + G.incnt -= count; + size -= count; + } + return n; + +} /* end function readbuf() */ + + + + + +/***********************/ +/* Function readbyte() */ +/***********************/ + +int readbyte(__G) /* refill inbuf and return a byte if available, else EOF */ + __GDEF +{ + if (G.mem_mode) + return EOF; + if (G.csize <= 0) { + G.csize--; /* for tests done after exploding */ + G.incnt = 0; + return EOF; + } + if (G.incnt <= 0) { + if ((G.incnt = aceread((char *)G.inbuf, INBUFSIZ)) == 0) { + G.incnt = 0; /* do not allow negative value to affect stuff */ + return EOF; + } else if (G.incnt < 0) { /* "fail" (abort, retry, ...) returns this */ + /* another hack, but no real harm copying same thing twice */ + (*G.message)((zvoid *)&G, + (uch *)LoadFarString(ReadError), + (ulg)strlen(LoadFarString(ReadError)), 0x401); + echon(); +#ifdef WINDLL + longjmp(dll_error_return, 1); +#else + DESTROYGLOBALS() + EXIT(PK_BADERR); /* totally bailing; better than lock-up */ +#endif + } + G.cur_zipfile_bufstart += INBUFSIZ; /* always starts on block bndry */ + G.inptr = G.inbuf; + defer_leftover_input(__G); /* decrements G.csize */ + } + +#if CRYPT + if (G.pInfo->encrypted) { + uch *p; + int n; + + /* This was previously set to decrypt one byte beyond G.csize, when + * incnt reached that far. GRR said, "but it's required: why?" This + * was a bug in fillinbuf() -- was it also a bug here? + */ + for (n = G.incnt, p = G.inptr; n--; p++) + zdecode(*p); + } +#endif /* CRYPT */ + + --G.incnt; + return *G.inptr++; + +} /* end function readbyte() */ + + + + + +#ifdef USE_ZLIB + +/************************/ +/* Function fillinbuf() */ +/************************/ + +int fillinbuf(__G) /* like readbyte() except returns number of bytes in inbuf */ + __GDEF +{ + if (G.mem_mode || + (G.incnt = aceread((char *)G.inbuf, INBUFSIZ)) <= 0) + return 0; + G.cur_zipfile_bufstart += INBUFSIZ; /* always starts on a block boundary */ + G.inptr = G.inbuf; + defer_leftover_input(__G); /* decrements G.csize */ + +#if CRYPT + if (G.pInfo->encrypted) { + uch *p; + int n; + + for (n = G.incnt, p = G.inptr; n--; p++) + zdecode(*p); + } +#endif /* CRYPT */ + + return G.incnt; + +} /* end function fillinbuf() */ + +#endif /* USE_ZLIB */ + + + + + +#ifndef VMS /* for VMS use code in vms.c */ + +/********************/ +/* Function flush() */ /* returns PK error codes: */ +/********************/ /* if cflag => always 0; PK_DISK if write error */ + +int flush(__G__ rawbuf, size, unshrink) + __GDEF + uch *rawbuf; + ulg size; + int unshrink; +{ + register uch *p, *q; + uch *transbuf; +#if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) + ulg transbufsiz; +#endif + /* static int didCRlast = FALSE; moved to globals.h */ + + +/*--------------------------------------------------------------------------- + Compute the CRC first; if testing or if disk is full, that's it. + ---------------------------------------------------------------------------*/ + + G.crc32val = crc32(G.crc32val, rawbuf, (extent)size); + +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_IN_PROGRESS, G.zipfn, G.filename, NULL)) + return IZ_CTRLC; /* cancel operation by user request */ +#endif + + if (uO.tflag || size == 0L) /* testing or nothing to write: all done */ + return PK_OK; + + if (G.disk_full) + return PK_DISK; /* disk already full: ignore rest of file */ + +/*--------------------------------------------------------------------------- + Write the bytes rawbuf[0..size-1] to the output device, first converting + end-of-lines and ASCII/EBCDIC as needed. If SMALL_MEM or MED_MEM are NOT + defined, outbuf is assumed to be at least as large as rawbuf and is not + necessarily checked for overflow. + ---------------------------------------------------------------------------*/ + + if (!G.pInfo->textmode) { /* write raw binary data */ + /* GRR: note that for standard MS-DOS compilers, size argument to + * fwrite() can never be more than 65534, so WriteError macro will + * have to be rewritten if size can ever be that large. For now, + * never more than 32K. Also note that write() returns an int, which + * doesn't necessarily limit size to 32767 bytes if write() is used + * on 16-bit systems but does make it more of a pain; however, because + * at least MSC 5.1 has a lousy implementation of fwrite() (as does + * DEC Ultrix cc), write() is used anyway. + */ +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ rawbuf, size); + else +#endif + if (!uO.cflag && WriteError(rawbuf, size, G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, rawbuf, size, 0)) + return 0; + } else { /* textmode: aflag is true */ + if (unshrink) { + /* rawbuf = outbuf */ + transbuf = G.outbuf2; +#if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) + transbufsiz = TRANSBUFSIZ; +#endif + } else { + /* rawbuf = slide */ + transbuf = G.outbuf; +#if (defined(SMALL_MEM) || defined(MED_MEM) || defined(VMS_TEXT_CONV)) + transbufsiz = OUTBUFSIZ; + Trace((stderr, "\ntransbufsiz = OUTBUFSIZ = %u\n", OUTBUFSIZ)); +#endif + } + if (G.newfile) { +#ifdef VMS_TEXT_CONV + /* GRR: really want to check if -aa (or -aaa?) was given... */ + if (rawbuf[1]) { /* first line is more than 255 chars long */ + Trace((stderr, + "\nfirst line of VMS `text' too long; switching to normal extraction\n")); + G.VMS_line_state = -1; /* -1: don't treat as VMS text */ + } else + G.VMS_line_state = 0; /* 0: ready to read line length */ +#endif + G.didCRlast = FALSE; /* no previous buffers written */ + G.newfile = FALSE; + } + +#ifdef VMS_TEXT_CONV + if (G.pInfo->hostnum == VMS_ && G.extra_field && G.VMS_line_state >= 0) + { + /* GRR: really want to check for actual VMS extra field, and + * ideally for variable-length record format */ +/* + printf("\n>>>>>> GRR: file is VMS text and has an extra field\n"); + */ + + p = rawbuf; + q = transbuf; + while(p < rawbuf+(unsigned)size) { + switch (G.VMS_line_state) { + + /* 0: ready to read line length */ + case 0: + G.VMS_line_length = 0; + G.VMS_line_pad = 0; + if (p == rawbuf+(unsigned)size-1) { /* last char */ + G.VMS_line_length = (int)((uch)(*p++)); + G.VMS_line_state = 1; + } else { + G.VMS_line_length = makeword(p); + p += 2; + G.VMS_line_state = 2; + } + if (G.VMS_line_length & 1) /* odd */ + G.VMS_line_pad = 1; + break; + + /* 1: read one byte of length, need second */ + case 1: + G.VMS_line_length += ((int)((uch)(*p++)) << 8); + G.VMS_line_state = 2; + break; + + /* 2: ready to read VMS_line_length chars */ + case 2: + if (G.VMS_line_length < rawbuf+(unsigned)size-p) { + if (G.VMS_line_length >= + transbuf+(unsigned)transbufsiz-q) + { + int outroom = transbuf+(unsigned)transbufsiz-q; + +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, outroom); +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, + (unsigned)outroom); + else +#endif + if (!uO.cflag && WriteError(transbuf, + (unsigned)outroom, G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)outroom, 0)) + return 0; + q = transbuf; + p += outroom; + G.VMS_line_length -= outroom; + /* fall through to normal case */ + } +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, G.VMS_line_length); + q += G.VMS_line_length; + p += G.VMS_line_length; + G.VMS_line_length = 0; /* necessary?? */ + G.VMS_line_state = 3; + + } else { /* remaining input is less than full line */ + int remaining = rawbuf+(unsigned)size-p; + + if (remaining < + transbuf+(unsigned)transbufsiz-q) + { + int outroom = transbuf+(unsigned)transbufsiz-q; + +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, outroom); +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, + (unsigned)(outroom)); + else +#endif + if (!uO.cflag && WriteError(transbuf, + (unsigned)outroom, G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)outroom, 0)) + return 0; + q = transbuf; + p += outroom; + remaining -= outroom; + } +/* GRR: need to change this to *q++ = native(*p++); loop or something */ + memcpy(q, p, remaining); + q += remaining; + p += remaining; + G.VMS_line_length -= remaining; + /* no change in G.VMS_line_state */ + } + break; + + /* 3: ready to PutNativeEOL */ + case 3: + if (q > transbuf+(unsigned)transbufsiz-lenEOL) { +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, + (unsigned)(q-transbuf)); + else +#endif + if (!uO.cflag && + WriteError(transbuf, (unsigned)(q-transbuf), + G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)(q-transbuf), 0)) + return 0; + q = transbuf; + } + PutNativeEOL + if (G.VMS_line_pad) + if (p < rawbuf+(unsigned)size) { + ++p; + G.VMS_line_state = 0; + } else + G.VMS_line_state = 4; + else + G.VMS_line_state = 0; + break; + + /* 4: ready to read pad byte */ + case 4: + ++p; + G.VMS_line_state = 0; + break; + } + } /* end while */ + + } else +#endif /* VMS_TEXT_CONV */ + + /*----------------------------------------------------------------------- + Algorithm: CR/LF => native; lone CR => native; lone LF => native. + This routine is only for non-raw-VMS, non-raw-VM/CMS files (i.e., + stream-oriented files, not record-oriented). + -----------------------------------------------------------------------*/ + + /* else not VMS text */ { + p = rawbuf; + if (*p == LF && G.didCRlast) + ++p; + G.didCRlast = FALSE; + for (q = transbuf; p < rawbuf+(unsigned)size; ++p) { + if (*p == CR) { /* lone CR or CR/LF: EOL either way */ + PutNativeEOL + if (p == rawbuf+(unsigned)size-1) /* last char in buffer */ + G.didCRlast = TRUE; + else if (p[1] == LF) /* get rid of accompanying LF */ + ++p; + } else if (*p == LF) /* lone LF */ + PutNativeEOL + else +#ifndef DOS_FLX_OS2_W32 + if (*p != CTRLZ) /* lose all ^Z's */ +#endif + *q++ = native(*p); + +#if (defined(SMALL_MEM) || defined(MED_MEM)) +# if (lenEOL == 1) /* don't check unshrink: both buffers small but equal */ + if (!unshrink) +# endif + /* check for danger of buffer overflow and flush */ + if (q > transbuf+(unsigned)transbufsiz-lenEOL) { + Trace((stderr, + "p - rawbuf = %u q-transbuf = %u size = %lu\n", + (unsigned)(p-rawbuf), (unsigned)(q-transbuf), size)); + if (!uO.cflag && WriteError(transbuf, + (unsigned)(q-transbuf), G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, + transbuf, (ulg)(q-transbuf), 0)) + return 0; + q = transbuf; + continue; + } +#endif /* SMALL_MEM || MED_MEM */ + } + } + + /*----------------------------------------------------------------------- + Done translating: write whatever we've got to file (or screen). + -----------------------------------------------------------------------*/ + + Trace((stderr, "p - rawbuf = %u q-transbuf = %u size = %lu\n", + (unsigned)(p-rawbuf), (unsigned)(q-transbuf), size)); + if (q > transbuf) { +#ifdef DLL + if (G.redirect_data) + writeToMemory(__G__ transbuf, (unsigned)(q-transbuf)); + else +#endif + if (!uO.cflag && WriteError(transbuf, (unsigned)(q-transbuf), + G.outfile)) + return disk_error(__G); + else if (uO.cflag && (*G.message)((zvoid *)&G, transbuf, + (ulg)(q-transbuf), 0)) + return 0; + } + } + + return 0; + +} /* end function flush() */ + + + + + +/*************************/ +/* Function disk_error() */ +/*************************/ + +static int disk_error(__G) + __GDEF +{ + /* OK to use slide[] here because this file is finished regardless */ + Info(slide, 0x4a1, ((char *)slide, LoadFarString(DiskFullQuery), + FnFilter1(G.filename))); + +#ifndef WINDLL + fgets(G.answerbuf, 9, stdin); + if (*G.answerbuf == 'y') /* stop writing to this file */ + G.disk_full = 1; /* (outfile bad?), but new OK */ + else +#endif + G.disk_full = 2; /* no: exit program */ + + return PK_DISK; + +} /* end function disk_error() */ + +#endif /* !VMS */ + + + + + +/*****************************/ +/* Function UzpMessagePrnt() */ +/*****************************/ + +int UZ_EXP UzpMessagePrnt(pG, buf, size, flag) + zvoid *pG; /* globals struct: always passed */ + uch *buf; /* preformatted string to be printed */ + ulg size; /* length of string (may include nulls) */ + int flag; /* flag bits */ +{ + /* IMPORTANT NOTE: + * The name of the first parameter of UzpMessagePrnt(), which passes + * the "Uz_Globs" address, >>> MUST <<< be identical to the string + * expansion of the __G__ macro in the REENTRANT case (see globals.h). + * This name identity is mandatory for the LoadFarString() macro + * (in the SMALL_MEM case) !!! + */ + int error; + uch *q=buf, *endbuf=buf+(unsigned)size; +#ifdef MORE + uch *p=buf-1; +#endif + FILE *outfp; + + +/*--------------------------------------------------------------------------- + These tests are here to allow fine-tuning of UnZip's output messages, + but none of them will do anything without setting the appropriate bit + in the flag argument of every Info() statement which is to be turned + *off*. That is, all messages are currently turned on for all ports. + To turn off *all* messages, use the UzpMessageNull() function instead + of this one. + ---------------------------------------------------------------------------*/ + +#if (defined(OS2) && defined(DLL)) + if (MSG_NO_DLL2(flag)) /* if OS/2 DLL bit is set, do NOT print this msg */ + return 0; +#endif +#ifdef WINDLL + if (MSG_NO_WDLL(flag)) + return 0; +#endif +#ifdef WINDLL + if (MSG_NO_WGUI(flag)) + return 0; +#endif +/* +#ifdef ACORN_GUI + if (MSG_NO_AGUI(flag)) + return 0; +#endif + */ +#ifdef DLL /* don't display message if data is redirected */ + if (((Uz_Globs *)pG)->redirect_data && + !((Uz_Globs *)pG)->redirect_text) + return 0; +#endif + + if (MSG_STDERR(flag) && !((Uz_Globs *)pG)->UzO.tflag) + outfp = (FILE *)stderr; + else + outfp = (FILE *)stdout; + +#ifdef QUERY_TRNEWLN + /* some systems require termination of query prompts with '\n' to force + * immediate display */ + if (MSG_MNEWLN(flag)) { /* assumes writable buffer (e.g., slide[]) */ + *endbuf++ = '\n'; /* with room for one more char at end of buf */ + ++size; /* (safe assumption: only used for four */ + } /* short queries in extract.c and fileio.c) */ +#endif + + if (MSG_TNEWLN(flag)) { /* again assumes writable buffer: fragile... */ + if ((!size && !((Uz_Globs *)pG)->sol) || + (size && (endbuf[-1] != '\n'))) + { + *endbuf++ = '\n'; + ++size; + } + } + +#ifdef MORE + /* room for --More-- and one line of overlap: */ + ((Uz_Globs *)pG)->height = SCREENLINES - 2; +#endif + + if (MSG_LNEWLN(flag) && !((Uz_Globs *)pG)->sol) { + /* not at start of line: want newline */ +#ifdef OS2DLL + if (!((Uz_Globs *)pG)->redirect_text) { +#endif + putc('\n', outfp); + fflush(outfp); +#ifdef MORE + if (((Uz_Globs *)pG)->M_flag) + { + ++((Uz_Globs *)pG)->numlines; + if (((Uz_Globs *)pG)->numlines % + ((Uz_Globs *)pG)->height == 0L) /* GRR: fix */ + (*((Uz_Globs *)pG)->mpause)((zvoid *)pG, + LoadFarString(MorePrompt), 1); + } +#endif /* MORE */ + if (MSG_STDERR(flag) && ((Uz_Globs *)pG)->UzO.tflag && + !isatty(1) && isatty(2)) + { + /* error output from testing redirected: also send to stderr */ + putc('\n', stderr); + fflush(stderr); + } +#ifdef OS2DLL + } else + REDIRECTC('\n'); +#endif + ((Uz_Globs *)pG)->sol = TRUE; + } + + /* put zipfile name, filename and/or error/warning keywords here */ + +#ifdef MORE + if (((Uz_Globs *)pG)->M_flag +#ifdef OS2DLL + && !((Uz_Globs *)pG)->redirect_text +#endif + ) + { + while (++p < endbuf) { + if (*p == '\n') { + ++((Uz_Globs *)pG)->numlines; + if (((Uz_Globs *)pG)->numlines % + ((Uz_Globs *)pG)->height == 0L) /* GRR: fix */ + { + if ((error = WriteError(q, p-q+1, outfp)) != 0) + return error; + fflush(outfp); + ((Uz_Globs *)pG)->sol = TRUE; + q = p + 1; + (*((Uz_Globs *)pG)->mpause)((zvoid *)pG, + LoadFarString(MorePrompt), 1); + } + } + } /* end while */ + size = (ulg)(p - q); /* remaining text */ + } +#endif /* MORE */ + + if (size) { +#ifdef OS2DLL + if (!((Uz_Globs *)pG)->redirect_text) { +#endif + if ((error = WriteError(q, size, outfp)) != 0) + return error; + fflush(outfp); + if (MSG_STDERR(flag) && ((Uz_Globs *)pG)->UzO.tflag && + !isatty(1) && isatty(2)) + { + /* error output from testing redirected: also send to stderr */ + if ((error = WriteError(q, size, stderr)) != 0) + return error; + fflush(stderr); + } +#ifdef OS2DLL + } else { /* GRR: this is ugly: hide with macro */ + if ((error = REDIRECTPRINT(q, size)) != 0) + return error; + } +#endif + ((Uz_Globs *)pG)->sol = (endbuf[-1] == '\n'); + } + return 0; + +} /* end function UzpMessagePrnt() */ + + + + + +#ifdef DLL + +/*****************************/ +/* Function UzpMessageNull() */ /* convenience routine for no output at all */ +/*****************************/ + +int UZ_EXP UzpMessageNull(pG, buf, size, flag) + zvoid *pG; /* globals struct: always passed */ + uch *buf; /* preformatted string to be printed */ + ulg size; /* length of string (may include nulls) */ + int flag; /* flag bits */ +{ + return 0; + +} /* end function UzpMessageNull() */ + +#endif /* DLL */ + + + + + +/***********************/ +/* Function UzpInput() */ /* GRR: this is a placeholder for now */ +/***********************/ + +int UZ_EXP UzpInput(pG, buf, size, flag) + zvoid *pG; /* globals struct: always passed */ + uch *buf; /* preformatted string to be printed */ + int *size; /* (address of) size of buf and of returned string */ + int flag; /* flag bits (bit 0: no echo) */ +{ + /* tell picky compilers to shut up about "unused variable" warnings */ + pG = pG; buf = buf; flag = flag; + + *size = 0; + return 0; + +} /* end function UzpInput() */ + + + + + +#if (!defined(WINDLL) && !defined(MACOS)) + +/***************************/ +/* Function UzpMorePause() */ +/***************************/ + +void UZ_EXP UzpMorePause(pG, prompt, flag) + zvoid *pG; /* globals struct: always passed */ + ZCONST char *prompt; /* "--More--" prompt */ + int flag; /* 0 = any char OK; 1 = accept only '\n', ' ', q */ + { +#if 0 + uch c; + +/*--------------------------------------------------------------------------- + Print a prompt and wait for the user to press a key, then erase prompt + if possible. + ---------------------------------------------------------------------------*/ + + if (!((Uz_Globs *)pG)->sol) + fprintf(stderr, "\n"); + /* numlines may or may not be used: */ + fprintf(stderr, prompt, ((Uz_Globs *)pG)->numlines); + fflush(stderr); + if (flag & 1) { + do { + c = (uch)FGETCH(0); + } while (c != '\r' && c != '\n' && c != ' ' && c != 'q' && c != 'Q'); + } else + c = (uch)FGETCH(0); + + /* newline was not echoed, so cover up prompt line */ + fprintf(stderr, LoadFarString(HidePrompt)); + fflush(stderr); + + if (ToLower(c) == 'q') { + DESTROYGLOBALS() + EXIT(PK_COOL); + } + + ((Uz_Globs *)pG)->sol = TRUE; + +#endif +} /* end function UzpMorePause() */ + +#endif /* !WINDLL && !MACOS */ + + + + +#ifndef WINDLL + +/**************************/ +/* Function UzpPassword() */ +/**************************/ + +int UZ_EXP UzpPassword (pG, rcnt, pwbuf, size, zfn, efn) + zvoid *pG; /* pointer to UnZip's internal global vars */ + int *rcnt; /* retry counter */ + char *pwbuf; /* buffer for password */ + int size; /* size of password buffer */ + ZCONST char *zfn; /* name of zip archive */ + ZCONST char *efn; /* name of archive entry being processed */ + { +#if CRYPT + int r = IZ_PW_ENTERED; + char *m; + char *prompt; + +#ifndef REENTRANT + /* tell picky compilers to shut up about "unused variable" warnings */ + pG = pG; +#endif + + if (*rcnt == 0) { /* First call for current entry */ + *rcnt = 2; + if ((prompt = (char *)malloc(2*FILNAMSIZ + 15)) != (char *)NULL) { + sprintf(prompt, LoadFarString(PasswPrompt), + FnFilter1(zfn), FnFilter2(efn)); + m = prompt; + } else + m = (char *)LoadFarString(PasswPrompt2); + } else { /* Retry call, previous password was wrong */ + (*rcnt)--; + prompt = NULL; + m = (char *)LoadFarString(PasswRetry); + } + + m = getp(__G__ m, pwbuf, size); + if (prompt != (char *)NULL) { + free(prompt); + } + if (m == (char *)NULL) { + r = IZ_PW_ERROR; + } + else if (*pwbuf == '\0') { + r = IZ_PW_CANCELALL; + } + return r; + +#else /* !CRYPT */ + /* tell picky compilers to shut up about "unused variable" warnings */ + pG = pG; rcnt = rcnt; pwbuf = pwbuf; size = size; zfn = zfn; efn = efn; + + return IZ_PW_ERROR; /* internal error; function should never get called */ +#endif /* ?CRYPT */ + +} /* end function UzpPassword() */ + + + + + +/**********************/ +/* Function handler() */ +/**********************/ + +void handler(signal) /* upon interrupt, turn on echo and exit cleanly */ + int signal; +{ + GETGLOBALS(); + +#if !(defined(SIGBUS) || defined(SIGSEGV)) /* add a newline if not at */ + (*G.message)((zvoid *)&G, slide, 0L, 0x41); /* start of line (to stderr; */ +#endif /* slide[] should be safe) */ + + echon(); + +#ifdef SIGBUS + if (signal == SIGBUS) { + Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt), + "bus error")); + DESTROYGLOBALS() + EXIT(PK_BADERR); + } +#endif /* SIGBUS */ + +#ifdef SIGSEGV + if (signal == SIGSEGV) { + Info(slide, 0x421, ((char *)slide, LoadFarString(ZipfileCorrupt), + "segmentation violation")); + DESTROYGLOBALS() + EXIT(PK_BADERR); + } +#endif /* SIGSEGV */ + + /* probably ctrl-C */ + DESTROYGLOBALS() +#if defined(AMIGA) && defined(__SASC) + _abort(); +#endif + EXIT(IZ_CTRLC); /* was EXIT(0), then EXIT(PK_ERR) */ +} + +#endif /* !WINDLL */ + + + + +#if (!defined(VMS) && !defined(CMS_MVS)) +#if (!defined(OS2) || defined(TIMESTAMP)) + +#if (!defined(HAVE_MKTIME) || defined(AMIGA) || defined(WIN32)) +/* also used in amiga/filedate.c and win32/win32.c */ +ZCONST ush ydays[] = + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; +#endif + +/*******************************/ +/* Function dos_to_unix_time() */ /* used for freshening/updating/timestamps */ +/*******************************/ + +time_t dos_to_unix_time(dosdatetime) + ulg dosdatetime; +{ + time_t m_time; + +#ifdef HAVE_MKTIME + + ZCONST time_t now = time(NULL); + struct tm *tm; +# define YRBASE 1900 + + tm = localtime(&now); + tm->tm_isdst = -1; /* let mktime determine if DST is in effect */ + + /* dissect date */ + tm->tm_year = ((int)(dosdatetime >> 25) & 0x7f) + (1980 - YRBASE); + tm->tm_mon = ((int)(dosdatetime >> 21) & 0x0f) - 1; + tm->tm_mday = ((int)(dosdatetime >> 16) & 0x1f); + + /* dissect time */ + tm->tm_hour = (int)((unsigned)dosdatetime >> 11) & 0x1f; + tm->tm_min = (int)((unsigned)dosdatetime >> 5) & 0x3f; + tm->tm_sec = (int)((unsigned)dosdatetime << 1) & 0x3e; + + m_time = mktime(tm); + NATIVE_TO_TIMET(m_time) /* NOP unless MSC 7.0 or Macintosh */ + TTrace((stderr, " final m_time = %lu\n", (ulg)m_time)); + +#else /* !HAVE_MKTIME */ + + int yr, mo, dy, hh, mm, ss; +#ifdef TOPS20 +# define YRBASE 1900 + struct tmx *tmx; + char temp[20]; +#else /* !TOPS20 */ +# define YRBASE 1970 + int leap; + unsigned days; + struct tm *tm; +#if (!defined(MACOS) && !defined(RISCOS) && !defined(QDOS) && !defined(TANDEM)) +#ifdef WIN32 + TIME_ZONE_INFORMATION tzinfo; + DWORD res; +#else /* ! WIN32 */ +#ifndef BSD4_4 /* GRR: change to !defined(MODERN) ? */ +#if (defined(BSD) || defined(MTS) || defined(__GO32__)) + struct timeb tbp; +#else /* !(BSD || MTS || __GO32__) */ +#ifdef DECLARE_TIMEZONE + extern time_t timezone; +#endif +#endif /* ?(BSD || MTS || __GO32__) */ +#endif /* !BSD4_4 */ +#endif /* ?WIN32 */ +#endif /* !MACOS && !RISCOS && !QDOS && !TANDEM */ +#endif /* ?TOPS20 */ + + + /* dissect date */ + yr = ((int)(dosdatetime >> 25) & 0x7f) + (1980 - YRBASE); + mo = ((int)(dosdatetime >> 21) & 0x0f) - 1; + dy = ((int)(dosdatetime >> 16) & 0x1f) - 1; + + /* dissect time */ + hh = (int)((unsigned)dosdatetime >> 11) & 0x1f; + mm = (int)((unsigned)dosdatetime >> 5) & 0x3f; + ss = (int)((unsigned)dosdatetime & 0x1f) * 2; + +#ifdef TOPS20 + tmx = (struct tmx *)malloc(sizeof(struct tmx)); + sprintf (temp, "%02d/%02d/%02d %02d:%02d:%02d", mo+1, dy+1, yr, hh, mm, ss); + time_parse(temp, tmx, (char *)0); + m_time = time_make(tmx); + free(tmx); + +#else /* !TOPS20 */ + +/*--------------------------------------------------------------------------- + Calculate the number of seconds since the epoch, usually 1 January 1970. + ---------------------------------------------------------------------------*/ + + /* leap = # of leap yrs from YRBASE up to but not including current year */ + leap = ((yr + YRBASE - 1) / 4); /* leap year base factor */ + + /* calculate days from BASE to this year and add expired days this year */ + days = (yr * 365) + (leap - 492) + ydays[mo]; + + /* if year is a leap year and month is after February, add another day */ + if ((mo > 1) && ((yr+YRBASE)%4 == 0) && ((yr+YRBASE) != 2100)) + ++days; /* OK through 2199 */ + + /* convert date & time to seconds relative to 00:00:00, 01/01/YRBASE */ + m_time = (time_t)((unsigned long)(days + dy) * 86400L + + (unsigned long)hh * 3600L + + (unsigned long)(mm * 60 + ss)); + /* - 1; MS-DOS times always rounded up to nearest even second */ + TTrace((stderr, "dos_to_unix_time:\n")); + TTrace((stderr, " m_time before timezone = %lu\n", (ulg)m_time)); + +/*--------------------------------------------------------------------------- + Adjust for local standard timezone offset. + ---------------------------------------------------------------------------*/ + +#if (!defined(MACOS) && !defined(RISCOS) && !defined(QDOS) && !defined(TANDEM)) +#ifdef WIN32 + /* account for timezone differences */ + res = GetTimeZoneInformation(&tzinfo); + if (res != TIME_ZONE_ID_UNKNOWN) + { + m_time += 60*(tzinfo.Bias); +#else /* !WIN32 */ +#if (defined(BSD) || defined(MTS) || defined(__GO32__)) +#ifdef BSD4_4 + if ( (dosdatetime >= DOSTIME_2038_01_18) && + (m_time < (time_t)0x70000000L) ) + m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ + if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ + m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ + if ((tm = localtime(&m_time)) != (struct tm *)NULL) + m_time -= tm->tm_gmtoff; /* sec. EAST of GMT: subtr. */ +#else /* !(BSD4_4 */ + ftime(&tbp); /* get `timezone' */ + m_time += tbp.timezone * 60L; /* seconds WEST of GMT: add */ +#endif /* ?(BSD4_4 || __EMX__) */ +#else /* !(BSD || MTS || __GO32__) */ + /* tzset was already called at start of process_zipfiles() */ + /* tzset(); */ /* set `timezone' variable */ +#ifndef __BEOS__ /* BeOS DR8 has no timezones... */ + m_time += timezone; /* seconds WEST of GMT: add */ +#endif +#endif /* ?(BSD || MTS || __GO32__) */ +#endif /* ?WIN32 */ + TTrace((stderr, " m_time after timezone = %lu\n", (ulg)m_time)); + +/*--------------------------------------------------------------------------- + Adjust for local daylight savings (summer) time. + ---------------------------------------------------------------------------*/ + +#ifndef BSD4_4 /* (DST already added to tm_gmtoff, so skip tm_isdst) */ + if ( (dosdatetime >= DOSTIME_2038_01_18) && + (m_time < (time_t)0x70000000L) ) + m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ + if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ + m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ + TIMET_TO_NATIVE(m_time) /* NOP unless MSC 7.0 or Macintosh */ + if (((tm = localtime((time_t *)&m_time)) != NULL) && tm->tm_isdst) +#ifdef WIN32 + m_time += 60L * tzinfo.DaylightBias; /* adjust with DST bias */ + else + m_time += 60L * tzinfo.StandardBias; /* add StdBias (normally 0) */ +#else + m_time -= 60L * 60L; /* adjust for daylight savings time */ +#endif + NATIVE_TO_TIMET(m_time) /* NOP unless MSC 7.0 or Macintosh */ + TTrace((stderr, " m_time after DST = %lu\n", (ulg)m_time)); +#endif /* !BSD4_4 */ +#ifdef WIN32 + } +#endif +#endif /* !MACOS && !RISCOS && !QDOS && !TANDEM */ +#endif /* ?TOPS20 */ + +#endif /* ?HAVE_MKTIME */ + + if ( (dosdatetime >= DOSTIME_2038_01_18) && + (m_time < (time_t)0x70000000L) ) + m_time = U_TIME_T_MAX; /* saturate in case of (unsigned) overflow */ + if (m_time < (time_t)0L) /* a converted DOS time cannot be negative */ + m_time = S_TIME_T_MAX; /* -> saturate at max signed time_t value */ + + return m_time; + +} /* end function dos_to_unix_time() */ + +#endif /* !OS2 || TIMESTAMP */ +#endif /* !VMS && !CMS_MVS */ + + + +#if (!defined(VMS) && !defined(OS2) && !defined(CMS_MVS)) + +/******************************/ +/* Function check_for_newer() */ /* used for overwriting/freshening/updating */ +/******************************/ + +int check_for_newer(__G__ filename) /* return 1 if existing file is newer */ + __GDEF /* or equal; 0 if older; -1 if doesn't */ + char *filename; /* exist yet */ +{ + time_t existing, archive; +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif +#ifdef AOS_VS + long dyy, dmm, ddd, dhh, dmin, dss; + + + dyy = (lrec.last_mod_dos_datetime >> 25) + 1980; + dmm = (lrec.last_mod_dos_datetime >> 21) & 0x0f; + ddd = (lrec.last_mod_dos_datetime >> 16) & 0x1f; + dhh = (lrec.last_mod_dos_datetime >> 11) & 0x1f; + dmin = (lrec.last_mod_dos_datetime >> 5) & 0x3f; + dss = (lrec.last_mod_dos_datetime & 0x1f) * 2; + + /* under AOS/VS, file times can only be set at creation time, + * with the info in a special DG format. Make sure we can create + * it here - we delete it later & re-create it, whether or not + * it exists now. + */ + if (!zvs_create(filename, (((ulg)dgdate(dmm, ddd, dyy)) << 16) | + (dhh*1800L + dmin*30L + dss/2L), -1L, -1L, (char *) -1, -1, -1, -1)) + return DOES_NOT_EXIST; +#endif /* AOS_VS */ + + Trace((stderr, "check_for_newer: doing stat(%s)\n", FnFilter1(filename))); + if (SSTAT(filename, &G.statbuf)) { + Trace((stderr, + "check_for_newer: stat(%s) returns %d: file does not exist\n", + FnFilter1(filename), SSTAT(filename, &G.statbuf))); +#ifdef SYMLINKS + Trace((stderr, "check_for_newer: doing lstat(%s)\n", + FnFilter1(filename))); + /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ + if (lstat(filename, &G.statbuf) == 0) { + Trace((stderr, + "check_for_newer: lstat(%s) returns 0: symlink does exist\n", + FnFilter1(filename))); + if (QCOND2 && !uO.overwrite_all) + Info(slide, 0, ((char *)slide, LoadFarString(FileIsSymLink), + FnFilter1(filename), " with no real file")); + return EXISTS_AND_OLDER; /* symlink dates are meaningless */ + } +#endif /* SYMLINKS */ + return DOES_NOT_EXIST; + } + Trace((stderr, "check_for_newer: stat(%s) returns 0: file exists\n", + FnFilter1(filename))); + +#ifdef SYMLINKS + /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ + if (lstat(filename, &G.statbuf) == 0 && S_ISLNK(G.statbuf.st_mode)) { + Trace((stderr, "check_for_newer: %s is a symbolic link\n", + FnFilter1(filename))); + if (QCOND2 && !uO.overwrite_all) + Info(slide, 0, ((char *)slide, LoadFarString(FileIsSymLink), + FnFilter1(filename), "")); + return EXISTS_AND_OLDER; /* symlink dates are meaningless */ + } +#endif /* SYMLINKS */ + + NATIVE_TO_TIMET(G.statbuf.st_mtime) /* NOP unless MSC 7.0 or Macintosh */ + +#ifdef USE_EF_UT_TIME + /* The `Unix extra field mtime' should be used for comparison with the + * time stamp of the existing file >>>ONLY<<< when the EF info is also + * used to set the modification time of the extracted file. + */ + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, + G.lrec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TTrace((stderr, "check_for_newer: using Unix extra field mtime\n")); + existing = G.statbuf.st_mtime; + archive = z_utime.mtime; + } else { + /* round up existing filetime to nearest 2 seconds for comparison, + * but saturate in case of arithmetic overflow + */ + existing = ((G.statbuf.st_mtime & 1) && + (G.statbuf.st_mtime + 1 > G.statbuf.st_mtime)) ? + G.statbuf.st_mtime + 1 : G.statbuf.st_mtime; + archive = dos_to_unix_time(G.lrec.last_mod_dos_datetime); + } +#else /* !USE_EF_UT_TIME */ + /* round up existing filetime to nearest 2 seconds for comparison, + * but saturate in case of arithmetic overflow + */ + existing = ((G.statbuf.st_mtime & 1) && + (G.statbuf.st_mtime + 1 > G.statbuf.st_mtime)) ? + G.statbuf.st_mtime + 1 : G.statbuf.st_mtime; + archive = dos_to_unix_time(G.lrec.last_mod_dos_datetime); +#endif /* ?USE_EF_UT_TIME */ + + TTrace((stderr, "check_for_newer: existing %lu, archive %lu, e-a %ld\n", + (ulg)existing, (ulg)archive, (long)(existing-archive))); + + return (existing >= archive); + +} /* end function check_for_newer() */ + +#endif /* !VMS && !OS2 && !CMS_MVS */ + + + + + +/************************/ +/* Function do_string() */ +/************************/ + +int do_string(__G__ len, option) /* return PK-type error code */ + __GDEF + unsigned int len; /* without prototype, ush converted to this */ + int option; +{ + long comment_bytes_left, block_length; + int error=PK_OK; + ush extra_len; +#ifdef AMIGA + char tmp_fnote[2 * AMIGA_FILENOTELEN]; /* extra room for squozen chars */ +#endif + + +/*--------------------------------------------------------------------------- + This function processes arbitrary-length (well, usually) strings. Four + options are allowed: SKIP, wherein the string is skipped (pretty logical, + eh?); DISPLAY, wherein the string is printed to standard output after un- + dergoing any necessary or unnecessary character conversions; DS_FN, + wherein the string is put into the filename[] array after undergoing ap- + propriate conversions (including case-conversion, if that is indicated: + see the global variable pInfo->lcflag); and EXTRA_FIELD, wherein the + `string' is assumed to be an extra field and is copied to the (freshly + malloced) buffer G.extra_field. The third option should be OK since + filename is dimensioned at 1025, but we check anyway. + + The string, by the way, is assumed to start at the current file-pointer + position; its length is given by len. So start off by checking length + of string: if zero, we're already done. + ---------------------------------------------------------------------------*/ + + if (!len) + return PK_COOL; + + switch (option) { + + /* + * First case: print string on standard output. First set loop vari- + * ables, then loop through the comment in chunks of OUTBUFSIZ bytes, + * converting formats and printing as we go. The second half of the + * loop conditional was added because the file might be truncated, in + * which case comment_bytes_left will remain at some non-zero value for + * all time. outbuf and slide are used as scratch buffers because they + * are available (we should be either before or in between any file pro- + * cessing). + */ + + case DISPLAY: + case DISPL_8: + comment_bytes_left = len; + block_length = OUTBUFSIZ; /* for the while statement, first time */ + while (comment_bytes_left > 0 && block_length > 0) { + register uch *p = G.outbuf; + register uch *q = G.outbuf; + + if ((block_length = readbuf(__G__ (char *)G.outbuf, + (unsigned) MIN((long)OUTBUFSIZ, comment_bytes_left))) == 0) + return PK_EOF; + comment_bytes_left -= block_length; + + /* this is why we allocated an extra byte for outbuf: terminate + * with zero (ASCIIZ) */ + G.outbuf[(unsigned)block_length] = '\0'; + + /* remove all ASCII carriage returns from comment before printing + * (since used before A_TO_N(), check for CR instead of '\r') + */ + while (*p) { + while (*p == CR) + ++p; + *q++ = *p++; + } + /* could check whether (p - outbuf) == block_length here */ + *q = '\0'; + + if (option == DISPL_8) { + /* translate the text coded in the entry's host-dependent + "extended ASCII" charset into the compiler's (system's) + internal text code page */ + Ext_ASCII_TO_Native((char *)G.outbuf, G.pInfo->hostnum, + G.crec.version_made_by[0]); +#ifdef WINDLL + /* translate to ANSI (RTL internal codepage may be OEM) */ + INTERN_TO_ISO((char *)G.outbuf, (char *)G.outbuf); +#else /* !WINDLL */ +#ifdef WIN32 + /* Win9x console always uses OEM character coding, and + WinNT console is set to OEM charset by default, too */ + INTERN_TO_OEM((char *)G.outbuf, (char *)G.outbuf); +#endif /* WIN32 */ +#endif /* ?WINDLL */ + } else { + A_TO_N(G.outbuf); /* translate string to native */ + } + +#ifdef WINDLL + /* ran out of local mem -- had to cheat */ + win_fprintf((zvoid *)&G, stdout, len, (char *)G.outbuf); + win_fprintf((zvoid *)&G, stdout, 2, (char *)"\n\n"); +#else /* !WINDLL */ +#ifdef NOANSIFILT /* GRR: can ANSI be used with EBCDIC? */ + (*G.message)((zvoid *)&G, G.outbuf, (ulg)(q-G.outbuf), 0); +#else /* ASCII, filter out ANSI escape sequences and handle ^S (pause) */ + p = G.outbuf - 1; + q = slide; + while (*++p) { + int pause = FALSE; + + if (*p == 0x1B) { /* ASCII escape char */ + *q++ = '^'; + *q++ = '['; + } else if (*p == 0x13) { /* ASCII ^S (pause) */ + pause = TRUE; + if (p[1] == LF) /* ASCII LF */ + *q++ = *++p; + else if (p[1] == CR && p[2] == LF) { /* ASCII CR LF */ + *q++ = *++p; + *q++ = *++p; + } + } else + *q++ = *p; + if ((unsigned)(q-slide) > WSIZE-3 || pause) { /* flush */ + (*G.message)((zvoid *)&G, slide, (ulg)(q-slide), 0); + q = slide; + if (pause && G.extract_flag) /* don't pause for list/test */ + (*G.mpause)((zvoid *)&G, LoadFarString(QuitPrompt), 0); + } + } + (*G.message)((zvoid *)&G, slide, (ulg)(q-slide), 0); +#endif /* ?NOANSIFILT */ +#endif /* ?WINDLL */ + } + /* add '\n' if not at start of line */ + (*G.message)((zvoid *)&G, slide, 0L, 0x40); + break; + + /* + * Second case: read string into filename[] array. The filename should + * never ever be longer than FILNAMSIZ-1 (1024), but for now we'll check, + * just to be sure. + */ + + case DS_FN: + extra_len = 0; + if (len >= FILNAMSIZ) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(FilenameTooLongTrunc))); + error = PK_WARN; + extra_len = (ush)(len - FILNAMSIZ + 1); + len = FILNAMSIZ - 1; + } + if (readbuf(__G__ G.filename, len) == 0) + return PK_EOF; + G.filename[len] = '\0'; /* terminate w/zero: ASCIIZ */ + + /* translate the Zip entry filename coded in host-dependent "extended + ASCII" into the compiler's (system's) internal text code page */ + Ext_ASCII_TO_Native(G.filename, G.pInfo->hostnum, + G.crec.version_made_by[0]); + + if (G.pInfo->lcflag) /* replace with lowercase filename */ + TOLOWER(G.filename, G.filename); + + if (G.pInfo->vollabel && len > 8 && G.filename[8] == '.') { + char *p = G.filename+8; + while (*p++) + p[-1] = *p; /* disk label, and 8th char is dot: remove dot */ + } + + if (!extra_len) /* we're done here */ + break; + + /* + * We truncated the filename, so print what's left and then fall + * through to the SKIP routine. + */ + Info(slide, 0x401, ((char *)slide, "[ %s ]\n", FnFilter1(G.filename))); + len = extra_len; + /* FALL THROUGH... */ + + /* + * Third case: skip string, adjusting readbuf's internal variables + * as necessary (and possibly skipping to and reading a new block of + * data). + */ + + case SKIP: + /* cur_zipfile_bufstart already takes account of extra_bytes, so don't + * correct for it twice: */ + ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr-G.inbuf) + len) + break; + + /* + * Fourth case: assume we're at the start of an "extra field"; malloc + * storage for it and read data into the allocated space. + */ + + case EXTRA_FIELD: + if (G.extra_field != (uch *)NULL) + free(G.extra_field); + if ((G.extra_field = (uch *)malloc(len)) == (uch *)NULL) { + Info(slide, 0x401, ((char *)slide, LoadFarString(ExtraFieldTooLong), + len)); + /* cur_zipfile_bufstart already takes account of extra_bytes, + * so don't correct for it twice: */ + ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr-G.inbuf) + len) + } else + if (readbuf(__G__ (char *)G.extra_field, len) == 0) + return PK_EOF; + break; + +#ifdef AMIGA + /* + * Fifth case, for the Amiga only: take the comment that would ordinarily + * be skipped over, and turn it into a 79 character string that will be + * attached to the file as a "filenote" after it is extracted. + */ + + case FILENOTE: + if ((extra_len = readbuf(__G__ tmp_fnote, (unsigned) + MIN(len, 2 * AMIGA_FILENOTELEN - 1))) == 0) + return PK_EOF; + if ((len -= extra_len) > 0) /* treat remainder as in case SKIP: */ + ZLSEEK(G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr - G.inbuf) + len) + /* convert multi-line text into single line with no ctl-chars: */ + tmp_fnote[extra_len] = '\0'; + while ((short int) --extra_len >= 0) + if ((unsigned) tmp_fnote[extra_len] < ' ') + if (tmp_fnote[extra_len+1] == ' ') /* no excess */ + strcpy(tmp_fnote+extra_len, tmp_fnote+extra_len+1); + else + tmp_fnote[extra_len] = ' '; + tmp_fnote[AMIGA_FILENOTELEN - 1] = '\0'; + if (G.filenotes[G.filenote_slot]) + free(G.filenotes[G.filenote_slot]); /* should not happen */ + G.filenotes[G.filenote_slot] = NULL; + if (tmp_fnote[0]) { + if (!(G.filenotes[G.filenote_slot] = malloc(strlen(tmp_fnote)+1))) + return PK_MEM; + strcpy(G.filenotes[G.filenote_slot], tmp_fnote); + } + break; +#endif /* AMIGA */ + + } /* end switch (option) */ + + return error; + +} /* end function do_string() */ + + + + + +/***********************/ +/* Function makeword() */ +/***********************/ + +ush makeword(b) + ZCONST uch *b; +{ + /* + * Convert Intel style 'short' integer to non-Intel non-16-bit + * host format. This routine also takes care of byte-ordering. + */ + return (ush)((b[1] << 8) | b[0]); +} + + + + + +/***********************/ +/* Function makelong() */ +/***********************/ + +ulg makelong(sig) + ZCONST uch *sig; +{ + /* + * Convert intel style 'long' variable to non-Intel non-16-bit + * host format. This routine also takes care of byte-ordering. + */ + return (((ulg)sig[3]) << 24) + + (((ulg)sig[2]) << 16) + + (((ulg)sig[1]) << 8) + + ((ulg)sig[0]); +} + + + +#if CRYPT + +#ifdef NEED_STR2ISO +/**********************/ +/* Function str2iso() */ +/**********************/ + +char *str2iso(dst, src) + char *dst; /* destination buffer */ + register ZCONST char *src; /* source string */ +{ +#ifdef INTERN_TO_ISO + INTERN_TO_ISO(src, dst); +#else + register uch c; + register char *dstp = dst; + + do { + c = (uch)foreign(*src++); + *dstp++ = (char)ASCII2ISO(c); + } while (c != '\0'); +#endif + + return dst; +} +#endif /* NEED_STR2ISO */ + + +#ifdef NEED_STR2OEM +/**********************/ +/* Function str2oem() */ +/**********************/ + +char *str2oem(dst, src) + char *dst; /* destination buffer */ + register ZCONST char *src; /* source string */ +{ +#ifdef INTERN_TO_OEM + INTERN_TO_OEM(src, dst); +#else + register uch c; + register char *dstp = dst; + + do { + c = (uch)foreign(*src++); + *dstp++ = (char)ASCII2OEM(c); + } while (c != '\0'); +#endif + + return dst; +} +#endif /* NEED_STR2OEM */ + +#endif /* CRYPT */ + + +#ifdef ZMEM /* memset/memcmp/memcpy for systems without either them or */ + /* bzero/bcmp/bcopy */ + /* (no known systems as of 960211) */ + +/*********************/ +/* Function memset() */ +/*********************/ + +zvoid *memset(buf, init, len) + register zvoid *buf; /* buffer location */ + register int init; /* initializer character */ + register unsigned int len; /* length of the buffer */ +{ + zvoid *start; + + start = buf; + while (len--) + *((char *)buf++) = (char)init; + return start; +} + + + +/*********************/ +/* Function memcmp() */ +/*********************/ + +int memcmp(b1, b2, len) + register ZCONST zvoid *b1; + register ZCONST zvoid *b2; + register unsigned int len; +{ + register int c; + + if (len > 0) do { + if ((c = (int)(*((ZCONST unsigned char *)b1)++) - + (int)(*((ZCONST unsigned char *)b2)++)) != 0) + return c; + } while (--len > 0) + return 0; +} + + + +/*********************/ +/* Function memcpy() */ +/*********************/ + +zvoid *memcpy(dst, src, len) + register zvoid *dst; + register ZCONST zvoid *src; + register unsigned int len; +{ + zvoid *start; + + start = dst; + while (len-- > 0) + *((char *)dst)++ = *((ZCONST char *)src)++; + return start; +} + +#endif /* ZMEM */ + + + + + +/************************/ +/* Function zstrnicmp() */ +/************************/ + +int zstrnicmp(s1, s2, n) + register ZCONST char *s1, *s2; + register unsigned n; +{ + for (; n > 0; --n, ++s1, ++s2) { + + if (ToLower(*s1) != ToLower(*s2)) + /* test includes early termination of one string */ + return (ToLower(*s1) < ToLower(*s2))? -1 : 1; + + if (*s1 == '\0') /* both strings terminate early */ + return 0; + } + return 0; +} + + + + + +#ifdef REGULUS /* returns the inode number on success(!)...argh argh argh */ +# undef stat + +/********************/ +/* Function zstat() */ +/********************/ + +int zstat(p, s) + char *p; + struct stat *s; +{ + return (stat(p,s) >= 0? 0 : (-1)); +} + +#endif /* REGULUS */ + + + + + +#ifdef SMALL_MEM + +/*******************************/ +/* Function fLoadFarString() */ /* (and friends...) */ +/*******************************/ + +char *fLoadFarString(__GPRO__ const char Far *sz) +{ + (void)zfstrcpy(G.rgchBigBuffer, sz); + return G.rgchBigBuffer; +} + +char *fLoadFarStringSmall(__GPRO__ const char Far *sz) +{ + (void)zfstrcpy(G.rgchSmallBuffer, sz); + return G.rgchSmallBuffer; +} + +char *fLoadFarStringSmall2(__GPRO__ const char Far *sz) +{ + (void)zfstrcpy(G.rgchSmallBuffer2, sz); + return G.rgchSmallBuffer2; +} + + + + +#if (!defined(_MSC_VER) || (_MSC_VER < 600)) +/*************************/ +/* Function zfstrcpy() */ /* portable clone of _fstrcpy() */ +/*************************/ + +char Far * Far zfstrcpy(char Far *s1, const char Far *s2) +{ + char Far *p = s1; + + while ((*s1++ = *s2++) != '\0'); + return p; +} +#endif /* !_MSC_VER || (_MSC_VER < 600) */ + +#endif /* SMALL_MEM */ diff --git a/utils/Install/sfxzip/funzip.c b/utils/Install/sfxzip/funzip.c new file mode 100644 index 0000000000..e83ae424d2 --- /dev/null +++ b/utils/Install/sfxzip/funzip.c @@ -0,0 +1,468 @@ +/* funzip.c -- put in the public domain by Mark Adler */ + +#define VERSION "3.93 of 21 November 1998" + + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + + History: + vers date who what + ---- --------- -------------- ------------------------------------ + 1.0 13 Aug 92 M. Adler really simple unzip filter. + 1.1 13 Aug 92 M. Adler cleaned up somewhat, give help if + stdin not redirected, warn if more + zip file entries after the first. + 1.2 15 Aug 92 M. Adler added check of lengths for stored + entries, added more help. + 1.3 16 Aug 92 M. Adler removed redundant #define's, added + decryption. + 1.4 27 Aug 92 G. Roelofs added exit(0). + 1.5 1 Sep 92 K. U. Rommel changed read/write modes for OS/2. + 1.6 6 Sep 92 G. Roelofs modified to use dummy crypt.c and + crypt.h instead of -DCRYPT. + 1.7 23 Sep 92 G. Roelofs changed to use DOS_OS2; included + crypt.c under MS-DOS. + 1.8 9 Oct 92 M. Adler improved inflation error msgs. + 1.9 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch; + renamed inflate_entry() to inflate(); + adapted to use new, in-place zdecode. + 2.0 22 Oct 92 M. Adler allow filename argument, prompt for + passwords and don't echo, still allow + command-line password entry, but as an + option. + 2.1 23 Oct 92 J-l. Gailly fixed crypt/store bug, + G. Roelofs removed crypt.c under MS-DOS, fixed + decryption check to compare single byte. + 2.2 28 Oct 92 G. Roelofs removed declaration of key. + 2.3 14 Dec 92 M. Adler replaced fseek (fails on stdin for SCO + Unix V.3.2.4). added quietflg for + inflate.c. + 3.0 11 May 93 M. Adler added gzip support + 3.1 9 Jul 93 K. U. Rommel fixed OS/2 pipe bug (PIPE_ERROR) + 3.2 4 Sep 93 G. Roelofs moved crc_32_tab[] to tables.h; used FOPx + from unzip.h; nuked OUTB macro and outbuf; + replaced flush(); inlined FlushOutput(); + renamed decrypt to encrypted + 3.3 29 Sep 93 G. Roelofs replaced ReadByte() with NEXTBYTE macro; + revised (restored?) flush(); added FUNZIP + 3.4 21 Oct 93 G. Roelofs renamed quietflg to qflag; changed outcnt, + H. Gessau second updcrc() arg and flush() arg to ulg; + added inflate_free(); added "g =" to null + getc(in) to avoid compiler warnings + 3.5 31 Oct 93 H. Gessau changed DOS_OS2 to DOS_NT_OS2 + 3.6 6 Dec 93 H. Gessau added "near" to mask_bits[] + 3.7 9 Dec 93 G. Roelofs added extent typecasts to fwrite() checks + 3.8 28 Jan 94 GRR/JlG initialized g variable in main() for gcc + 3.81 22 Feb 94 M. Hanning-Lee corrected usage message + 3.82 27 Feb 94 G. Roelofs added some typecasts to avoid warnings + 3.83 22 Jul 94 G. Roelofs changed fprintf to macro for DLLs + - 2 Aug 94 - public release with UnZip 5.11 + - 28 Aug 94 - public release with UnZip 5.12 + 3.84 1 Oct 94 K. U. Rommel changes for Metaware High C + 3.85 29 Oct 94 G. Roelofs changed fprintf macro to Info + 3.86 7 May 95 K. Davis RISCOS patches; + P. Kienitz Amiga patches + 3.87 12 Aug 95 G. Roelofs inflate_free(), DESTROYGLOBALS fixes + 3.88 4 Sep 95 C. Spieler reordered macro to work around MSC 5.1 bug + 3.89 22 Nov 95 PK/CS ifdef'd out updcrc() for ASM_CRC + 3.9 17 Dec 95 G. Roelofs modified for USE_ZLIB (new fillinbuf()) + - 30 Apr 96 - public release with UnZip 5.2 + 3.91 17 Aug 96 G. Roelofs main() -> return int (Peter Seebach) + 3.92 13 Apr 97 G. Roelofs minor cosmetic fixes to messages + - 22 Apr 97 - public release with UnZip 5.3 + - 31 May 97 - public release with UnZip 5.31 + 3.93 20 Sep 97 G. Roelofs minor cosmetic fixes to messages + - 3 Nov 97 - public release with UnZip 5.32 + - 28 Nov 98 - public release with UnZip 5.4 + */ + + +/* + + All funzip does is take a zipfile from stdin and decompress the + first entry to stdout. The entry has to be either deflated or + stored. If the entry is encrypted, then the decryption password + must be supplied on the command line as the first argument. + + funzip needs to be linked with inflate.o and crypt.o compiled from + the unzip source. If decryption is desired, the full version of + crypt.c (and crypt.h) from zcrypt21.zip or later must be used. + + */ + +#define FUNZIP +#define UNZIP_INTERNAL +#include "unzip.h" +#include "crypt.h" +#include "ttyio.h" + +#ifdef EBCDIC +# undef EBCDIC /* don't need ebcdic[] */ +#endif +#include "tables.h" /* crc_32_tab[] */ + +#ifndef USE_ZLIB /* zlib's function is called inflate(), too */ +# define UZinflate inflate +#endif + +/* PKZIP header definitions */ +#define ZIPMAG 0x4b50 /* two-byte zip lead-in */ +#define LOCREM 0x0403 /* remaining two bytes in zip signature */ +#define LOCSIG 0x04034b50L /* full signature */ +#define LOCFLG 4 /* offset of bit flag */ +#define CRPFLG 1 /* bit for encrypted entry */ +#define EXTFLG 8 /* bit for extended local header */ +#define LOCHOW 6 /* offset of compression method */ +#define LOCTIM 8 /* file mod time (for decryption) */ +#define LOCCRC 12 /* offset of crc */ +#define LOCSIZ 16 /* offset of compressed size */ +#define LOCLEN 20 /* offset of uncompressed length */ +#define LOCFIL 24 /* offset of file name field length */ +#define LOCEXT 26 /* offset of extra field length */ +#define LOCHDR 28 /* size of local header, including LOCREM */ +#define EXTHDR 16 /* size of extended local header, inc sig */ + +/* GZIP header definitions */ +#define GZPMAG 0x8b1f /* two-byte gzip lead-in */ +#define GZPHOW 0 /* offset of method number */ +#define GZPFLG 1 /* offset of gzip flags */ +#define GZPMUL 2 /* bit for multiple-part gzip file */ +#define GZPISX 4 /* bit for extra field present */ +#define GZPISF 8 /* bit for filename present */ +#define GZPISC 16 /* bit for comment present */ +#define GZPISE 32 /* bit for encryption */ +#define GZPTIM 2 /* offset of Unix file modification time */ +#define GZPEXF 6 /* offset of extra flags */ +#define GZPCOS 7 /* offset of operating system compressed on */ +#define GZPHDR 8 /* length of minimal gzip header */ + +/* Macros for getting two-byte and four-byte header values */ +#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8)) +#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16)) + +/* Function prototypes */ +void err OF((int, char *)); +int main OF((int, char **)); + +/* Globals */ +FILE *out; /* output file (*in moved to G struct) */ +ulg outsiz; /* total bytes written to out */ +int encrypted; /* flag to turn on decryption */ + +/* Masks for inflate.c */ +ZCONST ush near mask_bits[] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + + +#ifdef USE_ZLIB + +int fillinbuf(__G) +__GDEF +/* Fill input buffer for pull-model inflate() in zlib. Return the number of + * bytes in inbuf. */ +{ +/* GRR: check return value from fread(): same as read()? check errno? */ + if ((G.incnt = fread((char *)G.inbuf, 1, INBUFSIZ, G.in)) <= 0) + return 0; + G.inptr = G.inbuf; + +#if CRYPT + if (encrypted) { + uch *p; + int n; + + for (n = G.incnt, p = G.inptr; n--; p++) + zdecode(*p); + } +#endif /* CRYPT */ + + return G.incnt; + +} + +#endif /* USE_ZLIB */ + + +#if (!defined(USE_ZLIB) || defined(USE_OWN_CRCTAB)) +#ifdef USE_ZLIB +ZCONST uLongf *get_crc_table() +{ + return (ZCONST uLongf *)crc_32_tab; +} +#else /* !USE_ZLIB */ +ZCONST ulg near *get_crc_table() +{ + return crc_32_tab; +} +#endif /* ?USE_ZLIB */ +#endif /* !USE_ZLIB || USE_OWN_CRCTAB */ + + +void err(n, m) +int n; +char *m; +/* Exit on error with a message and a code */ +{ + Info(slide, 1, ((char *)slide, "funzip error: %s\n", m)); + DESTROYGLOBALS() + EXIT(n); +} + + +int flush(w) /* used by inflate.c (FLUSH macro) */ +ulg w; /* number of bytes to flush */ +{ + G.crc32val = crc32(G.crc32val, slide, (extent)w); + if (fwrite((char *)slide,1,(extent)w,out) != (extent)w && !PIPE_ERROR) + err(9, "out of space on stdout"); + outsiz += w; + return 0; +} + + +int main(argc, argv) +int argc; +char **argv; +/* Given a zipfile on stdin, decompress the first entry to stdout. */ +{ + ush n; + uch h[LOCHDR]; /* first local header (GZPHDR < LOCHDR) */ + int g = 0; /* true if gzip format */ +#if CRYPT + char *s = " [-password]"; + char *p; /* password */ +#else /* !CRYPT */ + char *s = ""; +#endif /* ?CRYPT */ + CONSTRUCTGLOBALS(); + + /* skip executable name */ + argc--; + argv++; + +#if CRYPT + /* get the command line password, if any */ + p = (char *)NULL; + if (argc && **argv == '-') + { + argc--; + p = 1 + *argv++; + } +#endif /* CRYPT */ + +#ifdef MALLOC_WORK + G.area.Slide = (uch *)calloc(8193, sizeof(short)+sizeof(char)+sizeof(char)); +#endif + + /* if no file argument and stdin not redirected, give the user help */ + if (argc == 0 && isatty(0)) + { + Info(slide, 1, ((char *)slide, "fUnZip (filter UnZip), version %s\n", + VERSION)); + Info(slide, 1, ((char *)slide, "usage: ... | funzip%s | ...\n", s)); + Info(slide, 1, ((char *)slide, " ... | funzip%s > outfile\n", s)); + Info(slide, 1, ((char *)slide, " funzip%s infile.zip > outfile\n",s)); + Info(slide, 1, ((char *)slide, " funzip%s infile.gz > outfile\n", s)); + Info(slide, 1, ((char *)slide, "Extracts to stdout the gzip file or first\ + zip entry of stdin or the given file.\n")); + DESTROYGLOBALS() + EXIT(3); + } + + /* prepare to be a binary filter */ + if (argc) + { + if ((G.in = fopen(*argv, FOPR)) == (FILE *)NULL) + err(2, "cannot find input file"); + } + else + { +#ifdef DOS_FLX_H68_OS2_W32 +#if (defined(__HIGHC__) && !defined(FLEXOS)) + setmode(stdin, _BINARY); +#else + setmode(0, O_BINARY); /* some buggy C libraries require BOTH setmode() */ +#endif /* call AND the fdopen() in binary mode :-( */ +#endif /* DOS_FLX_H68_OS2_W32 */ + +#ifdef RISCOS + G.in = stdin; +#else + if ((G.in = fdopen(0, FOPR)) == (FILE *)NULL) + err(2, "cannot find stdin"); +#endif + } + +#ifdef DOS_FLX_H68_OS2_W32 +#if (defined(__HIGHC__) && !defined(FLEXOS)) + setmode(stdout, _BINARY); +#else + setmode(1, O_BINARY); +#endif +#endif /* DOS_FLX_H68_OS2_W32 */ + +#ifdef RISCOS + out = stdout; +#else + if ((out = fdopen(1, FOPW)) == (FILE *)NULL) + err(2, "cannot write to stdout"); +#endif + + /* read local header, check validity, and skip name and extra fields */ + n = getc(G.in); n |= getc(G.in) << 8; + if (n == ZIPMAG) + { + if (fread((char *)h, 1, LOCHDR, G.in) != LOCHDR || SH(h) != LOCREM) + err(3, "invalid zipfile"); + if (SH(h + LOCHOW) != STORED && SH(h + LOCHOW) != DEFLATED) + err(3, "first entry not deflated or stored--cannot unpack"); + for (n = SH(h + LOCFIL); n--; ) g = getc(G.in); + for (n = SH(h + LOCEXT); n--; ) g = getc(G.in); + g = 0; + encrypted = h[LOCFLG] & CRPFLG; + } + else if (n == GZPMAG) + { + if (fread((char *)h, 1, GZPHDR, G.in) != GZPHDR) + err(3, "invalid gzip file"); + if (h[GZPHOW] != DEFLATED) + err(3, "gzip file not deflated"); + if (h[GZPFLG] & GZPMUL) + err(3, "cannot handle multi-part gzip files"); + if (h[GZPFLG] & GZPISX) + { + n = getc(G.in); n |= getc(G.in) << 8; + while (n--) g = getc(G.in); + } + if (h[GZPFLG] & GZPISF) + while ((g = getc(G.in)) != 0 && g != EOF) ; + if (h[GZPFLG] & GZPISC) + while ((g = getc(G.in)) != 0 && g != EOF) ; + g = 1; + encrypted = h[GZPFLG] & GZPISE; + } + else + err(3, "input not a zip or gzip file"); + + /* if entry encrypted, decrypt and validate encryption header */ + if (encrypted) +#if CRYPT + { + ush i, e; + + if (p == (char *)NULL) { + if ((p = (char *)malloc(IZ_PWLEN+1)) == (char *)NULL) + err(1, "out of memory"); + else if ((p = getp("Enter password: ", p, IZ_PWLEN+1)) == (char *)NULL) + err(1, "no tty to prompt for password"); + } +#if (defined(USE_ZLIB) && !defined(USE_OWN_CRCTAB)) + /* initialize crc_32_tab pointer for decryption */ + CRC_32_TAB = (ZCONST ulg Far *)get_crc_table(); +#endif + init_keys(p); + for (i = 0; i < RAND_HEAD_LEN; i++) + e = NEXTBYTE; + if (e != (ush)(h[LOCFLG] & EXTFLG ? h[LOCTIM + 1] : h[LOCCRC + 3])) + err(3, "incorrect password for first entry"); + } +#else /* !CRYPT */ + err(3, "cannot decrypt entry (need to recompile with full crypt.c)"); +#endif /* ?CRYPT */ + + /* prepare output buffer and crc */ + G.outptr = slide; + G.outcnt = 0L; + outsiz = 0L; + G.crc32val = CRCVAL_INITIAL; + + /* decompress */ + if (g || h[LOCHOW]) + { /* deflated entry */ + int r; + +#ifdef USE_ZLIB + /* need to allocate and prepare input buffer */ + if ((G.inbuf = (uch *)malloc(INBUFSIZ)) == (uch *)NULL) + err(1, "out of memory"); +#endif /* USE_ZLIB */ + if ((r = UZinflate(__G)) != 0) { + if (r == 3) + err(1, "out of memory"); + else + err(4, "invalid compressed data--format violated"); + } + inflate_free(__G); + } + else + { /* stored entry */ + register ulg n; + + n = LG(h + LOCLEN); +#if CRYPT + if (n != LG(h + LOCSIZ) - (encrypted ? RAND_HEAD_LEN : 0)) { +#else + if (n != LG(h + LOCSIZ)) { +#endif + Info(slide, 1, ((char *)slide, "len %ld, siz %ld\n", n, LG(h + LOCSIZ))); + err(4, "invalid compressed data--length mismatch"); + } + while (n--) { + ush c = getc(G.in); +#if CRYPT + if (encrypted) + zdecode(c); +#endif + *G.outptr++ = (uch)c; + if (++G.outcnt == WSIZE) /* do FlushOutput() */ + { + G.crc32val = crc32(G.crc32val, slide, (extent)G.outcnt); + if (fwrite((char *)slide, 1,(extent)G.outcnt,out) != (extent)G.outcnt + && !PIPE_ERROR) + err(9, "out of space on stdout"); + outsiz += G.outcnt; + G.outptr = slide; + G.outcnt = 0L; + } + } + } + if (G.outcnt) /* flush one last time; no need to reset G.outptr/outcnt */ + { + G.crc32val = crc32(G.crc32val, slide, (extent)G.outcnt); + if (fwrite((char *)slide, 1,(extent)G.outcnt,out) != (extent)G.outcnt + && !PIPE_ERROR) + err(9, "out of space on stdout"); + outsiz += G.outcnt; + } + fflush(out); + + /* if extended header, get it */ + if (g) + { + if (fread((char *)h + LOCCRC, 1, 8, G.in) != 8) + err(3, "gzip file ended prematurely"); + } + else + if ((h[LOCFLG] & EXTFLG) && + fread((char *)h + LOCCRC - 4, 1, EXTHDR, G.in) != EXTHDR) + err(3, "zipfile ended prematurely"); + + /* validate decompression */ + if (LG(h + LOCCRC) != G.crc32val) + err(4, "invalid compressed data--crc error"); + if (LG((g ? (h + LOCSIZ) : (h + LOCLEN))) != outsiz) + err(4, "invalid compressed data--length error"); + + /* check if there are more entries */ + if (!g && fread((char *)h, 1, 4, G.in) == 4 && LG(h) == LOCSIG) + Info(slide, 1, ((char *)slide, + "funzip warning: zipfile has more than one entry--rest ignored\n")); + + DESTROYGLOBALS() + RETURN (0); +} diff --git a/utils/Install/sfxzip/globals.c b/utils/Install/sfxzip/globals.c new file mode 100644 index 0000000000..d795090b98 --- /dev/null +++ b/utils/Install/sfxzip/globals.c @@ -0,0 +1,204 @@ +/*--------------------------------------------------------------------------- + + globals.c + + Routines to allocate and initialize globals, with or without threads. + + Contents: registerGlobalPointer() + deregisterGlobalPointer() + getGlobalPointer() + globalsCtor() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" + +#ifndef FUNZIP +/* initialization of sigs is completed at runtime so unzip(sfx) executable + * won't look like a zipfile + */ +char central_hdr_sig[4] = {0, 0, 0x01, 0x02}; +char local_hdr_sig[4] = {0, 0, 0x03, 0x04}; +char end_central_sig[4] = {0, 0, 0x05, 0x06}; +/* extern char extd_local_sig[4] = {0, 0, 0x07, 0x08}; NOT USED YET */ + +ZCONST char *fnames[2] = {"*", NULL}; /* default filenames vector */ +#endif + + +#ifndef REENTRANT + Uz_Globs G; +#else /* REENTRANT */ + +# ifndef USETHREADID + Uz_Globs *GG; +# else /* USETHREADID */ +# define THREADID_ENTRIES 0x40 + + int lastScan; + Uz_Globs *threadPtrTable[THREADID_ENTRIES]; + ulg threadIdTable [THREADID_ENTRIES] = { + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* Make sure there are */ + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, /* THREADID_ENTRIES 0s */ + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 + }; + + static ZCONST char Far TooManyThreads[] = + "error: more than %d simultaneous threads.\n\ + Some threads are probably not calling DESTROYTHREAD()\n"; + static ZCONST char Far EntryNotFound[] = + "error: couldn't find global pointer in table.\n\ + Maybe somebody accidentally called DESTROYTHREAD() twice.\n"; + static ZCONST char Far GlobalPointerMismatch[] = + "error: global pointer in table does not match pointer passed as\ + parameter\n"; + +static void registerGlobalPointer OF((__GPRO)); + + + +static void registerGlobalPointer(__G) + __GDEF +{ + int scan=0; + ulg tid = GetThreadId(); + + while (threadIdTable[scan] && scan < THREADID_ENTRIES) + scan++; + + if (scan == THREADID_ENTRIES) { + ZCONST char *tooMany = LoadFarString(TooManyThreads); + Info(slide, 0x421, ((char *)slide, tooMany, THREADID_ENTRIES)); + free(pG); + EXIT(PK_MEM); /* essentially memory error before we've started */ + } + + threadIdTable [scan] = tid; + threadPtrTable[scan] = pG; + lastScan = scan; +} + + + +void deregisterGlobalPointer(__G) + __GDEF +{ + int scan=0; + ulg tid = GetThreadId(); + + + while (threadIdTable[scan] != tid && scan < THREADID_ENTRIES) + scan++; + +/*--------------------------------------------------------------------------- + There are two things we can do if we can't find the entry: ignore it or + scream. The most likely reason for it not to be here is the user calling + this routine twice. Since this could cause BIG problems if any globals + are accessed after the first call, we'd better scream. + ---------------------------------------------------------------------------*/ + + if (scan == THREADID_ENTRIES || threadPtrTable[scan] != pG) { + ZCONST char *noEntry; + if (scan == THREADID_ENTRIES) + noEntry = LoadFarString(EntryNotFound); + else + noEntry = LoadFarString(GlobalPointerMismatch); + Info(slide, 0x421, ((char *)slide, noEntry)); + EXIT(PK_WARN); /* programming error, but after we're all done */ + } + + threadIdTable [scan] = 0; + lastScan = scan; + free(threadPtrTable[scan]); +} + + + +Uz_Globs *getGlobalPointer() +{ + int scan=0; + ulg tid = GetThreadId(); + + while (threadIdTable[scan] != tid && scan < THREADID_ENTRIES) + scan++; + +/*--------------------------------------------------------------------------- + There are two things we can do if we can't find the entry: ignore it or + scream. The most likely reason for it not to be here is the user calling + this routine twice. Since this could cause BIG problems if any globals + are accessed after the first call, we'd better scream. + ---------------------------------------------------------------------------*/ + + if (scan == THREADID_ENTRIES) { + ZCONST char *noEntry = LoadFarString(EntryNotFound); + fprintf(stderr, noEntry); /* can't use Info w/o a global pointer */ + EXIT(PK_ERR); /* programming error while still working */ + } + + return threadPtrTable[scan]; +} + +# endif /* ?USETHREADID */ +#endif /* ?REENTRANT */ + + + +Uz_Globs *globalsCtor() +{ +#ifdef REENTRANT + Uz_Globs *pG = (Uz_Globs *)malloc(sizeof(Uz_Globs)); + + if (!pG) + return (Uz_Globs *)NULL; +#endif /* REENTRANT */ + + /* for REENTRANT version, G is defined as (*pG) */ + + memzero(&G, sizeof(Uz_Globs)); + +#ifndef FUNZIP +#ifdef CMS_MVS + uO.aflag=1; + uO.C_flag=1; +#endif + + uO.lflag=(-1); + G.wildzipfn = ""; + G.pfnames = (char **)fnames; + G.pxnames = (char **)&fnames[1]; + G.pInfo = G.info; + G.sol = TRUE; /* at start of line */ + + G.message = UzpMessagePrnt; + G.input = UzpInput; /* not used by anyone at the moment... */ +#if defined(WINDLL) || defined(MACOS) + G.mpause = NULL; /* has scrollbars: no need for pausing */ +#else + G.mpause = UzpMorePause; +#endif + G.decr_passwd = UzpPassword; +#endif /* !FUNZIP */ + +#if (!defined(DOS_FLX_H68_OS2_W32) && !defined(AMIGA) && !defined(RISCOS)) +#if (!defined(MACOS) && !defined(ATARI) && !defined(VMS)) + G.echofd = -1; +#endif /* !(MACOS || ATARI || VMS) */ +#endif /* !(DOS_FLX_H68_OS2_W32 || AMIGA || RISCOS) */ + +#ifdef SYSTEM_SPECIFIC_CTOR + SYSTEM_SPECIFIC_CTOR(__G); +#endif + +#ifdef REENTRANT +#ifdef USETHREADID + registerGlobalPointer(__G); +#else + GG = &G; +#endif /* ?USETHREADID */ +#endif /* REENTRANT */ + + return &G; +} diff --git a/utils/Install/sfxzip/inflate.c b/utils/Install/sfxzip/inflate.c new file mode 100644 index 0000000000..29877300d2 --- /dev/null +++ b/utils/Install/sfxzip/inflate.c @@ -0,0 +1,1305 @@ +/* inflate.c -- put in the public domain by Mark Adler + version c16b, 29 March 1998 */ + + +/* You can do whatever you like with this source file, though I would + prefer that if you modify it and redistribute it that you include + comments to that effect with your name and the date. Thank you. + + History: + vers date who what + ---- --------- -------------- ------------------------------------ + a ~~ Feb 92 M. Adler used full (large, one-step) lookup table + b1 21 Mar 92 M. Adler first version with partial lookup tables + b2 21 Mar 92 M. Adler fixed bug in fixed-code blocks + b3 22 Mar 92 M. Adler sped up match copies, cleaned up some + b4 25 Mar 92 M. Adler added prototypes; removed window[] (now + is the responsibility of unzip.h--also + changed name to slide[]), so needs diffs + for unzip.c and unzip.h (this allows + compiling in the small model on MSDOS); + fixed cast of q in huft_build(); + b5 26 Mar 92 M. Adler got rid of unintended macro recursion. + b6 27 Mar 92 M. Adler got rid of nextbyte() routine. fixed + bug in inflate_fixed(). + c1 30 Mar 92 M. Adler removed lbits, dbits environment variables. + changed BMAX to 16 for explode. Removed + OUTB usage, and replaced it with flush()-- + this was a 20% speed improvement! Added + an explode.c (to replace unimplod.c) that + uses the huft routines here. Removed + register union. + c2 4 Apr 92 M. Adler fixed bug for file sizes a multiple of 32k. + c3 10 Apr 92 M. Adler reduced memory of code tables made by + huft_build significantly (factor of two to + three). + c4 15 Apr 92 M. Adler added NOMEMCPY do kill use of memcpy(). + worked around a Turbo C optimization bug. + c5 21 Apr 92 M. Adler added the WSIZE #define to allow reducing + the 32K window size for specialized + applications. + c6 31 May 92 M. Adler added some typecasts to eliminate warnings + c7 27 Jun 92 G. Roelofs added some more typecasts (444: MSC bug). + c8 5 Oct 92 J-l. Gailly added ifdef'd code to deal with PKZIP bug. + c9 9 Oct 92 M. Adler removed a memory error message (~line 416). + c10 17 Oct 92 G. Roelofs changed ULONG/UWORD/byte to ulg/ush/uch, + removed old inflate, renamed inflate_entry + to inflate, added Mark's fix to a comment. + c10.5 14 Dec 92 M. Adler fix up error messages for incomplete trees. + c11 2 Jan 93 M. Adler fixed bug in detection of incomplete + tables, and removed assumption that EOB is + the longest code (bad assumption). + c12 3 Jan 93 M. Adler make tables for fixed blocks only once. + c13 5 Jan 93 M. Adler allow all zero length codes (pkzip 2.04c + outputs one zero length code for an empty + distance tree). + c14 12 Mar 93 M. Adler made inflate.c standalone with the + introduction of inflate.h. + c14b 16 Jul 93 G. Roelofs added (unsigned) typecast to w at 470. + c14c 19 Jul 93 J. Bush changed v[N_MAX], l[288], ll[28x+3x] arrays + to static for Amiga. + c14d 13 Aug 93 J-l. Gailly de-complicatified Mark's c[*p++]++ thing. + c14e 8 Oct 93 G. Roelofs changed memset() to memzero(). + c14f 22 Oct 93 G. Roelofs renamed quietflg to qflag; made Trace() + conditional; added inflate_free(). + c14g 28 Oct 93 G. Roelofs changed l/(lx+1) macro to pointer (Cray bug) + c14h 7 Dec 93 C. Ghisler huft_build() optimizations. + c14i 9 Jan 94 A. Verheijen set fixed_t{d,l} to NULL after freeing; + G. Roelofs check NEXTBYTE macro for EOF. + c14j 23 Jan 94 G. Roelofs removed Ghisler "optimizations"; ifdef'd + EOF check. + c14k 27 Feb 94 G. Roelofs added some typecasts to avoid warnings. + c14l 9 Apr 94 G. Roelofs fixed split comments on preprocessor lines + to avoid bug in Encore compiler. + c14m 7 Jul 94 P. Kienitz modified to allow assembler version of + inflate_codes() (define ASM_INFLATECODES) + c14n 22 Jul 94 G. Roelofs changed fprintf to macro for DLL versions + c14o 23 Aug 94 C. Spieler added a newline to a debug statement; + G. Roelofs added another typecast to avoid MSC warning + c14p 4 Oct 94 G. Roelofs added (voidp *) cast to free() argument + c14q 30 Oct 94 G. Roelofs changed fprintf macro to MESSAGE() + c14r 1 Nov 94 G. Roelofs fixed possible redefinition of CHECK_EOF + c14s 7 May 95 S. Maxwell OS/2 DLL globals stuff incorporated; + P. Kienitz "fixed" ASM_INFLATECODES macro/prototype + c14t 18 Aug 95 G. Roelofs added UZinflate() to use zlib functions; + changed voidp to zvoid; moved huft_build() + and huft_free() to end of file + c14u 1 Oct 95 G. Roelofs moved G into definition of MESSAGE macro + c14v 8 Nov 95 P. Kienitz changed ASM_INFLATECODES to use a regular + call with __G__ instead of a macro + c15 3 Aug 96 M. Adler fixed bomb-bug on random input data (Adobe) + c15b 24 Aug 96 M. Adler more fixes for random input data + c15c 28 Mar 97 G. Roelofs changed USE_ZLIB fatal exit code from + PK_MEM2 to PK_MEM3 + c16 20 Apr 97 J. Altman added memzero(v[]) in huft_build() + c16b 29 Mar 98 C. Spieler modified DLL code for slide redirection + */ + + +/* + Inflate deflated (PKZIP's method 8 compressed) data. The compression + method searches for as much of the current string of bytes (up to a + length of 258) in the previous 32K bytes. If it doesn't find any + matches (of at least length 3), it codes the next byte. Otherwise, it + codes the length of the matched string and its distance backwards from + the current position. There is a single Huffman code that codes both + single bytes (called "literals") and match lengths. A second Huffman + code codes the distance information, which follows a length code. Each + length or distance code actually represents a base value and a number + of "extra" (sometimes zero) bits to get to add to the base value. At + the end of each deflated block is a special end-of-block (EOB) literal/ + length code. The decoding process is basically: get a literal/length + code; if EOB then done; if a literal, emit the decoded byte; if a + length then get the distance and emit the referred-to bytes from the + sliding window of previously emitted data. + + There are (currently) three kinds of inflate blocks: stored, fixed, and + dynamic. The compressor outputs a chunk of data at a time and decides + which method to use on a chunk-by-chunk basis. A chunk might typically + be 32K to 64K, uncompressed. If the chunk is uncompressible, then the + "stored" method is used. In this case, the bytes are simply stored as + is, eight bits per byte, with none of the above coding. The bytes are + preceded by a count, since there is no longer an EOB code. + + If the data are compressible, then either the fixed or dynamic methods + are used. In the dynamic method, the compressed data are preceded by + an encoding of the literal/length and distance Huffman codes that are + to be used to decode this block. The representation is itself Huffman + coded, and so is preceded by a description of that code. These code + descriptions take up a little space, and so for small blocks, there is + a predefined set of codes, called the fixed codes. The fixed method is + used if the block ends up smaller that way (usually for quite small + chunks); otherwise the dynamic method is used. In the latter case, the + codes are customized to the probabilities in the current block and so + can code it much better than the pre-determined fixed codes can. + + The Huffman codes themselves are decoded using a multi-level table + lookup, in order to maximize the speed of decoding plus the speed of + building the decoding tables. See the comments below that precede the + lbits and dbits tuning parameters. + + GRR: return values(?) + 0 OK + 1 incomplete table + 2 bad input + 3 not enough memory + */ + + +/* + Notes beyond the 1.93a appnote.txt: + + 1. Distance pointers never point before the beginning of the output + stream. + 2. Distance pointers can point back across blocks, up to 32k away. + 3. There is an implied maximum of 7 bits for the bit length table and + 15 bits for the actual data. + 4. If only one code exists, then it is encoded using one bit. (Zero + would be more efficient, but perhaps a little confusing.) If two + codes exist, they are coded using one bit each (0 and 1). + 5. There is no way of sending zero distance codes--a dummy must be + sent if there are none. (History: a pre 2.0 version of PKZIP would + store blocks with no distance codes, but this was discovered to be + too harsh a criterion.) Valid only for 1.93a. 2.04c does allow + zero distance codes, which is sent as one code of zero bits in + length. + 6. There are up to 286 literal/length codes. Code 256 represents the + end-of-block. Note however that the static length tree defines + 288 codes just to fill out the Huffman codes. Codes 286 and 287 + cannot be used though, since there is no length base or extra bits + defined for them. Similarily, there are up to 30 distance codes. + However, static trees define 32 codes (all 5 bits) to fill out the + Huffman codes, but the last two had better not show up in the data. + 7. Unzip can check dynamic Huffman blocks for complete code sets. + The exception is that a single code would not be complete (see #4). + 8. The five bits following the block type is really the number of + literal codes sent minus 257. + 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits + (1+6+6). Therefore, to output three times the length, you output + three codes (1+1+1), whereas to output four times the same length, + you only need two codes (1+3). Hmm. + 10. In the tree reconstruction algorithm, Code = Code + Increment + only if BitLength(i) is not zero. (Pretty obvious.) + 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) + 12. Note: length code 284 can represent 227-258, but length code 285 + really is 258. The last length deserves its own, short code + since it gets used a lot in very redundant files. The length + 258 is special since 258 - 3 (the min match length) is 255. + 13. The literal/length and distance code bit lengths are read as a + single stream of lengths. It is possible (and advantageous) for + a repeat code (16, 17, or 18) to go across the boundary between + the two sets of lengths. + */ + + +#define PKZIP_BUG_WORKAROUND /* PKZIP 1.93a problem--live with it */ + +/* + inflate.h must supply the uch slide[WSIZE] array, the zvoid typedef + (void if (void *) is accepted, else char) and the NEXTBYTE, + FLUSH() and memzero macros. If the window size is not 32K, it + should also define WSIZE. If INFMOD is defined, it can include + compiled functions to support the NEXTBYTE and/or FLUSH() macros. + There are defaults for NEXTBYTE and FLUSH() below for use as + examples of what those functions need to do. Normally, you would + also want FLUSH() to compute a crc on the data. inflate.h also + needs to provide these typedefs: + + typedef unsigned char uch; + typedef unsigned short ush; + typedef unsigned long ulg; + + This module uses the external functions malloc() and free() (and + probably memset() or bzero() in the memzero() macro). Their + prototypes are normally found in and . + */ + +/* #define DEBUG */ +#define INFMOD /* tell inflate.h to include code to be compiled */ +#include "inflate.h" + + +#ifndef WSIZE /* default is 32K */ +# define WSIZE 0x8000 /* window size--must be a power of two, and at least */ +#endif /* 32K for zip's deflate method */ + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) +# define wsize G._wsize /* wsize is a variable */ +#else +# define wsize WSIZE /* wsize is a constant */ +#endif + + +#ifndef NEXTBYTE /* default is to simply get a byte from stdin */ +# define NEXTBYTE getchar() +#endif + +#ifndef MESSAGE /* only used twice, for fixed strings--NOT general-purpose */ +# define MESSAGE(str,len,flag) pipeit((char *)(str)) +#endif + +#ifndef FLUSH /* default is to simply write the buffer to stdout */ +# define FLUSH(n) fwrite(redirSlide, 1, n, stdout) /* return value not used */ +#endif +/* Warning: the fwrite above might not work on 16-bit compilers, since + 0x8000 might be interpreted as -32,768 by the library function. */ + +#ifndef Trace +# ifdef DEBUG +# define Trace(x) fprintf x +# else +# define Trace(x) +# endif +#endif + + +/*---------------------------------------------------------------------------*/ +#ifdef USE_ZLIB + + +/* + GRR: return values for both original inflate() and UZinflate() + 0 OK + 1 incomplete table(?) + 2 bad input + 3 not enough memory + */ + +/**************************/ +/* Function UZinflate() */ +/**************************/ + +int UZinflate(__G) /* decompress an inflated entry using the zlib routines */ + __GDEF +{ + int err=Z_OK; + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; + else + wsize = WSIZE, redirSlide = slide; +#endif + + G.dstrm.next_out = redirSlide; + G.dstrm.avail_out = wsize; + + G.dstrm.next_in = G.inptr; + G.dstrm.avail_in = G.incnt; + + if (!G.inflInit) { + unsigned i; + int windowBits; + + /* only need to test this stuff once */ + if (zlib_version[0] != ZLIB_VERSION[0]) { + Info(slide, 0x21, ((char *)slide, + "error: incompatible zlib version (expected %s, found %s)\n", + ZLIB_VERSION, zlib_version)); + return 3; + } else if (strcmp(zlib_version, ZLIB_VERSION) != 0) + Info(slide, 0x21, ((char *)slide, + "warning: different zlib version (expected %s, using %s)\n", + ZLIB_VERSION, zlib_version)); + + /* windowBits = log2(wsize) */ + for (i = ((unsigned)wsize * 2 - 1), windowBits = 0; + !(i & 1); i >>= 1, ++windowBits); + if ((unsigned)windowBits > (unsigned)15) + windowBits = 15; + else if (windowBits < 8) + windowBits = 8; + + G.dstrm.zalloc = (alloc_func)Z_NULL; + G.dstrm.zfree = (free_func)Z_NULL; + + Trace((stderr, "initializing inflate()\n")); + err = inflateInit2(&G.dstrm, -windowBits); + + if (err == Z_MEM_ERROR) + return 3; + else if (err != Z_OK) + Trace((stderr, "oops! (inflateInit2() err = %d)\n", err)); + G.inflInit = 1; + } + +#ifdef FUNZIP + while (err != Z_STREAM_END) { +#else /* !FUNZIP */ + while (G.csize > 0) { + Trace((stderr, "first loop: G.csize = %ld\n", G.csize)); +#endif /* ?FUNZIP */ + while (G.dstrm.avail_out > 0) { + err = inflate(&G.dstrm, Z_PARTIAL_FLUSH); + + if (err == Z_DATA_ERROR) + return 2; + else if (err == Z_MEM_ERROR) + return 3; + else if (err != Z_OK && err != Z_STREAM_END) + Trace((stderr, "oops! (inflate(first loop) err = %d)\n", err)); + +#ifdef FUNZIP + if (err == Z_STREAM_END) /* "END-of-entry-condition" ? */ +#else /* !FUNZIP */ + if (G.csize <= 0L) /* "END-of-entry-condition" ? */ +#endif /* ?FUNZIP */ + break; + + if (G.dstrm.avail_in <= 0) { + if (fillinbuf(__G) == 0) + return 2; /* no "END-condition" yet, but no more data */ + + G.dstrm.next_in = G.inptr; + G.dstrm.avail_in = G.incnt; + } + Trace((stderr, " avail_in = %d\n", G.dstrm.avail_in)); + } + FLUSH(wsize - G.dstrm.avail_out); /* flush slide[] */ + Trace((stderr, "inside loop: flushing %ld bytes (ptr diff = %ld)\n", + (long)(wsize - G.dstrm.avail_out), + (long)(G.dstrm.next_out-(Bytef *)redirSlide))); + G.dstrm.next_out = redirSlide; + G.dstrm.avail_out = wsize; + } + + /* no more input, so loop until we have all output */ + Trace((stderr, "beginning final loop: err = %d\n", err)); + while (err != Z_STREAM_END) { + err = inflate(&G.dstrm, Z_PARTIAL_FLUSH); + if (err == Z_DATA_ERROR) + return 2; + else if (err == Z_MEM_ERROR) + return 3; + else if (err == Z_BUF_ERROR) { /* DEBUG */ + Trace((stderr, "zlib inflate() did not detect stream end (%s, %s)\n" + , G.zipfn, G.filename)); + break; + } else if (err != Z_OK && err != Z_STREAM_END) { + Trace((stderr, "oops! (inflate(final loop) err = %d)\n", err)); + DESTROYGLOBALS() + EXIT(PK_MEM3); + } + FLUSH(wsize - G.dstrm.avail_out); /* final flush of slide[] */ + Trace((stderr, "final loop: flushing %ld bytes (ptr diff = %ld)\n", + (long)(wsize - G.dstrm.avail_out), + (long)(G.dstrm.next_out-(Bytef *)redirSlide))); + G.dstrm.next_out = redirSlide; + G.dstrm.avail_out = wsize; + } + Trace((stderr, "total in = %ld, total out = %ld\n", G.dstrm.total_in, + G.dstrm.total_out)); + + G.inptr = (uch *)G.dstrm.next_in; + G.incnt = (G.inbuf + INBUFSIZ) - G.inptr; /* reset for other routines */ + + err = inflateReset(&G.dstrm); + if (err != Z_OK) + Trace((stderr, "oops! (inflateReset() err = %d)\n", err)); + + return 0; +} + + +/*---------------------------------------------------------------------------*/ +#else /* !USE_ZLIB */ + + +/* Function prototypes */ +#ifndef OF +# ifdef __STDC__ +# define OF(a) a +# else +# define OF(a) () +# endif +#endif /* !OF */ +int inflate_codes OF((__GPRO__ struct huft *tl, struct huft *td, + int bl, int bd)); +static int inflate_stored OF((__GPRO)); +static int inflate_fixed OF((__GPRO)); +static int inflate_dynamic OF((__GPRO)); +static int inflate_block OF((__GPRO__ int *e)); + + +/* The inflate algorithm uses a sliding 32K byte window on the uncompressed + stream to find repeated byte strings. This is implemented here as a + circular buffer. The index is updated simply by incrementing and then + and'ing with 0x7fff (32K-1). */ +/* It is left to other modules to supply the 32K area. It is assumed + to be usable as if it were declared "uch slide[32768];" or as just + "uch *slide;" and then malloc'ed in the latter case. The definition + must be in unzip.h, included above. */ + + +/* unsigned wp; moved to globals.h */ /* current position in slide */ + + +/* Tables for deflate from PKZIP's appnote.txt. */ +static ZCONST unsigned border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; +static ZCONST ush cplens[] = { /* Copy lengths for literal codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + /* note: see note #13 above about the 258 in this list. */ +static ZCONST ush cplext[] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */ +static ZCONST ush cpdist[] = { /* Copy offsets for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; +static ZCONST ush cpdext[] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + + +/* moved to consts.h (included in unzip.c), resp. funzip.c */ +#if 0 +/* And'ing with mask_bits[n] masks the lower n bits */ +ZCONST ush near mask_bits[] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; +#endif /* 0 */ + + +/* Macros for inflate() bit peeking and grabbing. + The usage is: + + NEEDBITS(j) + x = b & mask_bits[j]; + DUMPBITS(j) + + where NEEDBITS makes sure that b has at least j bits in it, and + DUMPBITS removes the bits from b. The macros use the variable k + for the number of bits in b. Normally, b and k are register + variables for speed and are initialized at the begining of a + routine that uses these macros from a global bit buffer and count. + + In order to not ask for more bits than there are in the compressed + stream, the Huffman tables are constructed to only ask for just + enough bits to make up the end-of-block code (value 256). Then no + bytes need to be "returned" to the buffer at the end of the last + block. See the huft_build() routine. + */ + +/* These have been moved to globals.h */ +#if 0 +ulg bb; /* bit buffer */ +unsigned bk; /* bits in bit buffer */ +#endif + +#ifndef CHECK_EOF +# define CHECK_EOF /* default as of 5.13/5.2 */ +#endif + +#ifndef CHECK_EOF +# define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE)<>=(n);k-=(n);} + + +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + are not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ + + +static ZCONST int lbits = 9; /* bits in base literal/length lookup table */ +static ZCONST int dbits = 6; /* bits in base distance lookup table */ + + +#ifndef ASM_INFLATECODES + +int inflate_codes(__G__ tl, td, bl, bd) + __GDEF +struct huft *tl, *td; /* literal/length and distance decoder tables */ +int bl, bd; /* number of bits decoded by tl[] and td[] */ +/* inflate (decompress) the codes in a deflated (compressed) block. + Return an error code or zero if it all goes ok. */ +{ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local copies of globals */ + b = G.bb; /* initialize bit buffer */ + k = G.bk; + w = G.wp; /* initialize window position */ + + + /* inflate the coded data */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + while (1) /* do until end of block */ + { + NEEDBITS((unsigned)bl) + if ((e = (t = tl + ((unsigned)b & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + if (e == 16) /* then it's a literal */ + { + redirSlide[w++] = (uch)t->v.n; + if (w == wsize) + { + FLUSH(w); + w = 0; + } + } + else /* it's an EOB or a length */ + { + /* exit if end of block */ + if (e == 15) + break; + + /* get length of block to copy */ + NEEDBITS(e) + n = t->v.n + ((unsigned)b & mask_bits[e]); + DUMPBITS(e); + + /* decode distance of block to copy */ + NEEDBITS((unsigned)bd) + if ((e = (t = td + ((unsigned)b & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + NEEDBITS(e) + d = w - t->v.n - ((unsigned)b & mask_bits[e]); + DUMPBITS(e) + + /* do the copy */ + do { +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) {/* &= w/ wsize unnecessary & wrong if redirect */ + if (d >= wsize) + return 1; /* invalid compressed data */ + n -= (e = (e = wsize - (d > w ? d : w)) > n ? n : e); + } + else +#endif + n -= (e = (e = wsize - ((d &= wsize-1) > w ? d : w)) > n ? n : e); +#ifndef NOMEMCPY + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(redirSlide + w, redirSlide + d, e); + w += e; + d += e; + } + else /* do it slowly to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + redirSlide[w++] = redirSlide[d++]; + } while (--e); + if (w == wsize) + { + FLUSH(w); + w = 0; + } + } while (n); + } + } + + + /* restore the globals from the locals */ + G.wp = w; /* restore global window pointer */ + G.bb = b; /* restore global bit buffer */ + G.bk = k; + + + /* done */ + return 0; +} + +#endif /* ASM_INFLATECODES */ + + + +static int inflate_stored(__G) + __GDEF +/* "decompress" an inflated type 0 (stored) block. */ +{ + unsigned n; /* number of bytes in block */ + unsigned w; /* current window position */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local copies of globals */ + Trace((stderr, "\nstored block")); + b = G.bb; /* initialize bit buffer */ + k = G.bk; + w = G.wp; /* initialize window position */ + + + /* go to byte boundary */ + n = k & 7; + DUMPBITS(n); + + + /* get the length and its complement */ + NEEDBITS(16) + n = ((unsigned)b & 0xffff); + DUMPBITS(16) + NEEDBITS(16) + if (n != (unsigned)((~b) & 0xffff)) + return 1; /* error in compressed data */ + DUMPBITS(16) + + + /* read and output the compressed data */ + while (n--) + { + NEEDBITS(8) + redirSlide[w++] = (uch)b; + if (w == wsize) + { + FLUSH(w); + w = 0; + } + DUMPBITS(8) + } + + + /* restore the globals from the locals */ + G.wp = w; /* restore global window pointer */ + G.bb = b; /* restore global bit buffer */ + G.bk = k; + return 0; +} + + +/* Globals for literal tables (built once) */ +/* Moved to globals.h */ +#if 0 +struct huft *fixed_tl = (struct huft *)NULL; +struct huft *fixed_td; +int fixed_bl, fixed_bd; +#endif + +static int inflate_fixed(__G) + __GDEF +/* decompress an inflated type 1 (fixed Huffman codes) block. We should + either replace this with a custom decoder, or at least precompute the + Huffman tables. */ +{ + /* if first time, set up tables for fixed blocks */ + Trace((stderr, "\nliteral block")); + if (G.fixed_tl == (struct huft *)NULL) + { + int i; /* temporary variable */ + unsigned l[288]; /* length list for huft_build */ + + /* literal table */ + for (i = 0; i < 144; i++) + l[i] = 8; + for (; i < 256; i++) + l[i] = 9; + for (; i < 280; i++) + l[i] = 7; + for (; i < 288; i++) /* make a complete, but wrong code set */ + l[i] = 8; + G.fixed_bl = 7; + if ((i = huft_build(__G__ l, 288, 257, cplens, cplext, + &G.fixed_tl, &G.fixed_bl)) != 0) + { + G.fixed_tl = (struct huft *)NULL; + return i; + } + + /* distance table */ + for (i = 0; i < 30; i++) /* make an incomplete code set */ + l[i] = 5; + G.fixed_bd = 5; + if ((i = huft_build(__G__ l, 30, 0, cpdist, cpdext, + &G.fixed_td, &G.fixed_bd)) > 1) + { + huft_free(G.fixed_tl); + G.fixed_tl = (struct huft *)NULL; + return i; + } + } + + /* decompress until an end-of-block code */ + return inflate_codes(__G__ G.fixed_tl, G.fixed_td, + G.fixed_bl, G.fixed_bd) != 0; +} + + + +static int inflate_dynamic(__G) + __GDEF +/* decompress an inflated type 2 (dynamic Huffman codes) block. */ +{ + int i; /* temporary variables */ + unsigned j; + unsigned l; /* last length */ + unsigned m; /* mask for bit lengths table */ + unsigned n; /* number of lengths to get */ + struct huft *tl; /* literal/length code table */ + struct huft *td; /* distance code table */ + int bl; /* lookup bits for tl */ + int bd; /* lookup bits for td */ + unsigned nb; /* number of bit length codes */ + unsigned nl; /* number of literal/length codes */ + unsigned nd; /* number of distance codes */ +#ifdef PKZIP_BUG_WORKAROUND + unsigned ll[288+32]; /* literal/length and distance code lengths */ +#else + unsigned ll[286+30]; /* literal/length and distance code lengths */ +#endif + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local bit buffer */ + Trace((stderr, "\ndynamic block")); + b = G.bb; + k = G.bk; + + + /* read in table lengths */ + NEEDBITS(5) + nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */ + DUMPBITS(5) + NEEDBITS(5) + nd = 1 + ((unsigned)b & 0x1f); /* number of distance codes */ + DUMPBITS(5) + NEEDBITS(4) + nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */ + DUMPBITS(4) +#ifdef PKZIP_BUG_WORKAROUND + if (nl > 288 || nd > 32) +#else + if (nl > 286 || nd > 30) +#endif + return 1; /* bad lengths */ + + + /* read in bit-length-code lengths */ + for (j = 0; j < nb; j++) + { + NEEDBITS(3) + ll[border[j]] = (unsigned)b & 7; + DUMPBITS(3) + } + for (; j < 19; j++) + ll[border[j]] = 0; + + + /* build decoding table for trees--single level, 7 bit lookup */ + bl = 7; + i = huft_build(__G__ ll, 19, 19, NULL, NULL, &tl, &bl); + if (bl == 0) /* no bit lengths */ + i = 1; + if (i) + { + if (i == 1) + huft_free(tl); + return i; /* incomplete code set */ + } + + + /* read in literal and distance code lengths */ + n = nl + nd; + m = mask_bits[bl]; + i = l = 0; + while ((unsigned)i < n) + { + NEEDBITS((unsigned)bl) + j = (td = tl + ((unsigned)b & m))->b; + DUMPBITS(j) + j = td->v.n; + if (j < 16) /* length of code in bits (0..15) */ + ll[i++] = l = j; /* save last length in l */ + else if (j == 16) /* repeat last length 3 to 6 times */ + { + NEEDBITS(2) + j = 3 + ((unsigned)b & 3); + DUMPBITS(2) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = l; + } + else if (j == 17) /* 3 to 10 zero length codes */ + { + NEEDBITS(3) + j = 3 + ((unsigned)b & 7); + DUMPBITS(3) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + else /* j == 18: 11 to 138 zero length codes */ + { + NEEDBITS(7) + j = 11 + ((unsigned)b & 0x7f); + DUMPBITS(7) + if ((unsigned)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + } + + + /* free decoding table for trees */ + huft_free(tl); + + + /* restore the global bit buffer */ + G.bb = b; + G.bk = k; + + + /* build the decoding tables for literal/length and distance codes */ + bl = lbits; + i = huft_build(__G__ ll, nl, 257, cplens, cplext, &tl, &bl); + if (bl == 0) /* no literals or lengths */ + i = 1; + if (i) + { + if (i == 1) { + if (!uO.qflag) + MESSAGE((uch *)"(incomplete l-tree) ", 21L, 1); + huft_free(tl); + } + return i; /* incomplete code set */ + } + bd = dbits; + i = huft_build(__G__ ll + nl, nd, 0, cpdist, cpdext, &td, &bd); + if (bd == 0 && nl > 257) /* lengths but no distances */ + { + if (!uO.qflag) + MESSAGE((uch *)"(incomplete d-tree) ", 21L, 1); + huft_free(tl); + return 1; + } + if (i == 1) { +#ifdef PKZIP_BUG_WORKAROUND + i = 0; +#else + if (!uO.qflag) + MESSAGE((uch *)"(incomplete d-tree) ", 21L, 1); + huft_free(td); +#endif + } + if (i) + { + huft_free(tl); + return i; + } + + + /* decompress until an end-of-block code */ + if (inflate_codes(__G__ tl, td, bl, bd)) + return 1; + + + /* free the decoding tables, return */ + huft_free(tl); + huft_free(td); + return 0; +} + + + +static int inflate_block(__G__ e) + __GDEF + int *e; /* last block flag */ +/* decompress an inflated block */ +{ + unsigned t; /* block type */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local bit buffer */ + b = G.bb; + k = G.bk; + + + /* read in last block bit */ + NEEDBITS(1) + *e = (int)b & 1; + DUMPBITS(1) + + + /* read in block type */ + NEEDBITS(2) + t = (unsigned)b & 3; + DUMPBITS(2) + + + /* restore the global bit buffer */ + G.bb = b; + G.bk = k; + + + /* inflate that block type */ + if (t == 2) + return inflate_dynamic(__G); + if (t == 0) + return inflate_stored(__G); + if (t == 1) + return inflate_fixed(__G); + + + /* bad block type */ + return 2; +} + + + +int inflate(__G) + __GDEF +/* decompress an inflated entry */ +{ + int e; /* last block flag */ + int r; /* result code */ +#ifdef DEBUG + unsigned h = 0; /* maximum struct huft's malloc'ed */ +#endif + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; + else + wsize = WSIZE, redirSlide = slide; /* how they're #defined if !DLL */ +#endif + + /* initialize window, bit buffer */ + G.wp = 0; + G.bk = 0; + G.bb = 0; + + + /* decompress until the last block */ + do { +#ifdef DEBUG + G.hufts = 0; +#endif + if ((r = inflate_block(__G__ &e)) != 0) + return r; +#ifdef DEBUG + if (G.hufts > h) + h = G.hufts; +#endif + } while (!e); + + + /* flush out redirSlide */ + FLUSH(G.wp); + + + /* return success */ + Trace((stderr, "\n%u bytes in Huffman tables (%d/entry)\n", + h * sizeof(struct huft), sizeof(struct huft))); + return 0; +} + + + +int inflate_free(__G) + __GDEF +{ + if (G.fixed_tl != (struct huft *)NULL) + { + huft_free(G.fixed_td); + huft_free(G.fixed_tl); + G.fixed_td = G.fixed_tl = (struct huft *)NULL; + } + return 0; +} + +#endif /* ?USE_ZLIB */ + + +/* + * GRR: moved huft_build() and huft_free() down here; used by explode() + * and fUnZip regardless of whether USE_ZLIB defined or not + */ + + +/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */ +#define BMAX 16 /* maximum bit length of any code (16 for explode) */ +#define N_MAX 288 /* maximum number of codes in any set */ + + +int huft_build(__G__ b, n, s, d, e, t, m) + __GDEF + ZCONST unsigned *b; /* code lengths in bits (all assumed <= BMAX) */ + unsigned n; /* number of codes (assumed <= N_MAX) */ + unsigned s; /* number of simple-valued codes (0..s-1) */ + ZCONST ush *d; /* list of base values for non-simple codes */ + ZCONST ush *e; /* list of extra bits for non-simple codes */ + struct huft **t; /* result: starting table */ + int *m; /* maximum lookup bits, returns actual */ +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return zero on success, one if + the given code set is incomplete (the tables are still built in this + case), two if the input is invalid (all zero length codes or an + oversubscribed set of lengths), and three if not enough memory. + The code with value 256 is special, and the tables are constructed + so that no bits beyond that code are fetched when that code is + decoded. */ +{ + unsigned a; /* counter for codes of length k */ + unsigned c[BMAX+1]; /* bit length count table */ + unsigned el; /* length of EOB code (value 256) */ + unsigned f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register unsigned i; /* counter, current code */ + register unsigned j; /* counter */ + register int k; /* number of bits in current code */ + int lx[BMAX+1]; /* memory for l[-1..BMAX-1] */ + int *l = lx+1; /* stack of bits per table */ + register unsigned *p; /* pointer into c[], b[], or v[] */ + register struct huft *q; /* points to current table */ + struct huft r; /* table entry for structure assignment */ + struct huft *u[BMAX]; /* table stack */ + unsigned v[N_MAX]; /* values in order of bit length */ + register int w; /* bits before this table == (l * h) */ + unsigned x[BMAX+1]; /* bit offsets, then code stack */ + unsigned *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + unsigned z; /* number of entries in current table */ + + + /* Generate counts for each bit length */ + el = n > 256 ? b[256] : BMAX; /* set length of EOB code, if any */ + memzero((char *)c, sizeof(c)); + p = (unsigned *)b; i = n; + do { + c[*p]++; p++; /* assume all entries <= BMAX */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = (struct huft *)NULL; + *m = 0; + return 0; + } + + + /* Find minimum and maximum length, bound *m by those */ + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((unsigned)*m < j) + *m = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((unsigned)*m > i) + *m = i; + + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) + return 2; /* bad input: more codes than bits */ + if ((y -= c[i]) < 0) + return 2; + c[i] += y; + + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + + /* Make a table of values in order of bit lengths */ + memzero((char *)v, sizeof(v)); + p = (unsigned *)b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + n = x[g]; /* set n to length of v */ + + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = l[-1] = 0; /* no bits decoded yet */ + u[0] = (struct huft *)NULL; /* just to keep compilers happy */ + q = (struct huft *)NULL; /* ditto */ + z = 0; /* ditto */ + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + a = c[k]; + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l[h]) + { + w += l[h++]; /* add bits already decoded */ + + /* compute minimum size table less than or equal to *m bits */ + z = (z = g - w) > (unsigned)*m ? *m : z; /* upper limit */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } + if ((unsigned)w + j > el && (unsigned)w < el) + j = el - w; /* make EOB code end at table */ + z = 1 << j; /* table entries for j-bit table */ + l[h] = j; /* set table size in stack */ + + /* allocate and link in new table */ + if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) == + (struct huft *)NULL) + { + if (h) + huft_free(u[0]); + return 3; /* not enough memory */ + } +#ifdef DEBUG + G.hufts += z + 1; /* track memory usage */ +#endif + *t = q + 1; /* link to list for huft_free() */ + *(t = &(q->v.t)) = (struct huft *)NULL; + u[h] = ++q; /* table starts after link */ + + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.b = (uch)l[h-1]; /* bits to dump before this table */ + r.e = (uch)(16 + j); /* bits in this table */ + r.v.t = q; /* pointer to this table */ + j = (i & ((1 << w) - 1)) >> (w - l[h-1]); + u[h-1][j] = r; /* connect to last table */ + } + } + + /* set up table entry in r */ + r.b = (uch)(k - w); + if (p >= v + n) + r.e = 99; /* out of values--invalid code */ + else if (*p < s) + { + r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ + r.v.n = (ush)*p++; /* simple code is just the value */ + } + else + { + r.e = (uch)e[*p - s]; /* non-simple--look up in lists */ + r.v.n = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + while ((i & ((1 << w) - 1)) != x[h]) + w -= l[--h]; /* don't need to update q */ + } + } + + + /* return actual size of base table */ + *m = l[0]; + + + /* Return true (1) if we were given an incomplete table */ + return y != 0 && g != 1; +} + + + +int huft_free(t) +struct huft *t; /* table to free */ +/* Free the malloc'ed tables built by huft_build(), which makes a linked + list of the tables it made, with the links in a dummy first entry of + each table. */ +{ + register struct huft *p, *q; + + + /* Go through linked list, freeing from the malloced (t[-1]) address. */ + p = t; + while (p != (struct huft *)NULL) + { + q = (--p)->v.t; + free((zvoid *)p); + p = q; + } + return 0; +} diff --git a/utils/Install/sfxzip/list.c b/utils/Install/sfxzip/list.c new file mode 100644 index 0000000000..e5ea1ef6fe --- /dev/null +++ b/utils/Install/sfxzip/list.c @@ -0,0 +1,644 @@ +/*--------------------------------------------------------------------------- + + list.c + + This file contains the non-ZipInfo-specific listing routines for UnZip. + + Contains: list_files() + get_time_stamp() [optional feature] + ratio() + fnprint() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#ifdef WINDLL +# ifdef POCKET_UNZIP +# include "wince/intrface.h" +# else +# include "windll/windll.h" +# endif +#endif + + +#ifdef TIMESTAMP + static int fn_is_dir OF((__GPRO)); +#endif + +#ifndef WINDLL + static ZCONST char Far CompFactorStr[] = "%c%d%%"; + static ZCONST char Far CompFactor100[] = "100%%"; + +#ifdef OS2_EAS + static ZCONST char Far HeadersS[] = + " Length EAs ACLs Date Time Name"; + static ZCONST char Far HeadersS1[] = + " -------- --- ---- ---- ---- ----"; +#else + static ZCONST char Far HeadersS[] = " Length Date Time Name"; + static ZCONST char Far HeadersS1[] = " -------- ---- ---- ----"; +#endif + + static ZCONST char Far HeadersL[] = + " Length Method Size Ratio Date Time CRC-32 Name"; + static ZCONST char Far HeadersL1[] = + "-------- ------ ------- ----- ---- ---- ------ ----"; + static ZCONST char Far *Headers[][2] = + { {HeadersS, HeadersS1}, {HeadersL, HeadersL1} }; + + static ZCONST char Far CaseConversion[] = + "%s (\"^\" ==> case\n%s conversion)\n"; + static ZCONST char Far LongHdrStats[] = + "%8lu %-7s%8lu %4s %02u-%02u-%02u %02u:%02u %08lx %c"; + static ZCONST char Far LongFileTrailer[] = + "-------- ------- --- \ + -------\n%8lu %8lu %4s %u file%s\n"; +#ifdef OS2_EAS + static ZCONST char Far ShortHdrStats[] = + "%9lu %6lu %6lu %02u-%02u-%02u %02u:%02u %c"; + static ZCONST char Far ShortFileTrailer[] = " -------- ----- ----- \ + -------\n%9lu %6lu %6lu %u file%s\n"; + static ZCONST char Far OS2ExtAttrTrailer[] = + "%ld file%s %ld bytes of OS/2 extended attributes attached.\n"; + static ZCONST char Far OS2ACLTrailer[] = + "%ld file%s %ld bytes of access control lists attached.\n"; +#else + static ZCONST char Far ShortHdrStats[] = + "%9lu %02u-%02u-%02u %02u:%02u %c"; + static ZCONST char Far ShortFileTrailer[] = + " -------- -------\n%9lu %u file%s\n"; +#endif /* ?OS2_EAS */ +#endif /* !WINDLL */ + + + + + +/*************************/ +/* Function list_files() */ +/*************************/ + +int list_files(__G) /* return PK-type error code */ + __GDEF +{ + int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL; +#ifndef WINDLL + char sgn, cfactorstr[10]; + int longhdr=(uO.vflag>1); +#endif + int date_format; + unsigned j, methnum, members=0; +#ifdef USE_EF_UT_TIME + iztimes z_utime; + struct tm *t; +#endif + unsigned yr, mo, dy, hh, mm; + ulg csiz, tot_csize=0L, tot_ucsize=0L; +#ifdef OS2_EAS + ulg ea_size, tot_easize=0L, tot_eafiles=0L; + ulg acl_size, tot_aclsize=0L, tot_aclfiles=0L; +#endif + min_info info; + char methbuf[8]; + static ZCONST char dtype[]="NXFS"; /* see zi_short() */ + static ZCONST char Far method[NUM_METHODS+1][8] = + {"Stored", "Shrunk", "Reduce1", "Reduce2", "Reduce3", "Reduce4", + "Implode", "Token", "Defl:#", "EnhDefl", "ImplDCL", "Unk:###"}; + + +/*--------------------------------------------------------------------------- + Unlike extract_or_test_files(), this routine confines itself to the cen- + tral directory. Thus its structure is somewhat simpler, since we can do + just a single loop through the entire directory, listing files as we go. + + So to start off, print the heading line and then begin main loop through + the central directory. The results will look vaguely like the following: + + Length Method Size Ratio Date Time CRC-32 Name ("^" ==> case +-------- ------ ------- ----- ---- ---- ------ ---- conversion) + 44004 Implode 13041 71% 11-02-89 19:34 8b4207f7 Makefile.UNIX + 3438 Shrunk 2209 36% 09-15-90 14:07 a2394fd8 ^dos-file.ext + 16717 Defl:X 5252 69% 11-03-97 06:40 1ce0f189 WHERE +-------- ------- --- ------- + 64159 20502 68% 3 files + ---------------------------------------------------------------------------*/ + + + G.pInfo = &info; + date_format = DATE_FORMAT; + +#ifndef WINDLL + if (uO.qflag < 2) { + if (uO.L_flag) + Info(slide, 0, ((char *)slide, LoadFarString(CaseConversion), + LoadFarStringSmall(Headers[longhdr][0]), + LoadFarStringSmall2(Headers[longhdr][1]))); + else + Info(slide, 0, ((char *)slide, "%s\n%s\n", + LoadFarString(Headers[longhdr][0]), + LoadFarStringSmall(Headers[longhdr][1]))); + } +#endif /* !WINDLL */ + + for (j = 0; j++ < (unsigned)G.ecrec.total_entries_central_dir;) { + + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag, ...: */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) + return error; /* only PK_EOF defined */ + + /* + * We could DISPLAY the filename instead of storing (and possibly trun- + * cating, in the case of a very long name) and printing it, but that + * has the disadvantage of not allowing case conversion--and it's nice + * to be able to see in the listing precisely how you have to type each + * filename in order for unzip to consider it a match. Speaking of + * which, if member names were specified on the command line, check in + * with match() to see if the current file is one of them, and make a + * note of it if it is. + */ + + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != + PK_COOL) /* ^--(uses pInfo->lcflag) */ + { + error_in_archive = error; + if (error > PK_WARN) /* fatal: can't continue */ + return error; + } + if (G.extra_field != (uch *)NULL) { + free(G.extra_field); + G.extra_field = (uch *)NULL; + } + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) + != 0) + { + error_in_archive = error; + if (error > PK_WARN) /* fatal */ + return error; + } + if (!G.process_all_files) { /* check if specified on command line */ + unsigned i; + + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; + break; /* found match, so stop looping */ + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case in match */ + break; + } + } + } + /* + * If current file was specified on command line, or if no names were + * specified, do the listing for this file. Otherwise, get rid of the + * file comment and go back for the next file. + */ + + if (G.process_all_files || do_this_file) { + +#ifdef OS2DLL + /* this is used by UzpFileTree() to allow easy processing of lists + * of zip directory contents */ + if (G.processExternally) { + if ((G.processExternally)(G.filename, &G.crec)) + break; + ++members; + } else { +#endif +#ifdef OS2_EAS + { + uch *ef_ptr = G.extra_field; + int ef_size, ef_len = G.crec.extra_field_length; + ea_size = acl_size = 0; + + while (ef_len >= EB_HEADSIZE) { + ef_size = makeword(&ef_ptr[EB_LEN]); + switch (makeword(&ef_ptr[EB_ID])) { + case EF_OS2: + ea_size = makelong(&ef_ptr[EB_HEADSIZE]); + break; + case EF_ACL: + acl_size = makelong(&ef_ptr[EB_HEADSIZE]); + break; + } + ef_ptr += (ef_size + EB_HEADSIZE); + ef_len -= (ef_size + EB_HEADSIZE); + } + } +#endif +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0, Mac */ + t = localtime(&(z_utime.mtime)); + } else + t = (struct tm *)NULL; + if (t != (struct tm *)NULL) { + mo = (unsigned)(t->tm_mon + 1); + dy = (unsigned)(t->tm_mday); + yr = (unsigned)(t->tm_year % 100); + hh = (unsigned)(t->tm_hour); + mm = (unsigned)(t->tm_min); + } else +#endif /* USE_EF_UT_TIME */ + { + yr = ((((unsigned)(G.crec.last_mod_dos_datetime >> 25) & 0x7f) + + 80) % (unsigned)100); + mo = ((unsigned)(G.crec.last_mod_dos_datetime >> 21) & 0x0f); + dy = ((unsigned)(G.crec.last_mod_dos_datetime >> 16) & 0x1f); + hh = (((unsigned)G.crec.last_mod_dos_datetime >> 11) & 0x1f); + mm = (((unsigned)G.crec.last_mod_dos_datetime >> 5) & 0x3f); + } + /* permute date so it displays according to nat'l convention + * ('methnum' is not yet set, it is used as temporary buffer) */ + switch (date_format) { + case DF_YMD: + methnum = (unsigned)mo; + mo = yr; yr = dy; dy = (ush)methnum; + break; + case DF_DMY: + methnum = (unsigned)mo; + mo = dy; dy = (ush)methnum; + } + + csiz = G.crec.csize; + if (G.crec.general_purpose_bit_flag & 1) + csiz -= 12; /* if encrypted, don't count encryption header */ + if ((cfactor = ratio(G.crec.ucsize, csiz)) < 0) { +#ifndef WINDLL + sgn = '-'; +#endif + cfactor = (-cfactor + 5) / 10; + } else { +#ifndef WINDLL + sgn = ' '; +#endif + cfactor = (cfactor + 5) / 10; + } + + methnum = MIN(G.crec.compression_method, NUM_METHODS); + zfstrcpy(methbuf, method[methnum]); + if (methnum == DEFLATED) { + methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3]; + } else if (methnum >= NUM_METHODS) { + sprintf(&methbuf[4], "%03u", G.crec.compression_method); + } + +#if 0 /* GRR/Euro: add this? */ +#if defined(DOS_FLX_OS2_W32) || defined(UNIX) + for (p = G.filename; *p; ++p) + if (!isprint(*p)) + *p = '?'; /* change non-printable chars to '?' */ +#endif /* DOS_FLX_OS2_W32 || UNIX */ +#endif /* 0 */ + +#ifdef WINDLL + /* send data to application for formatting and printing */ + (*G.lpUserFunctions->SendApplicationMessage)(G.crec.ucsize, csiz, + (ush)cfactor, mo, dy, yr, hh, mm, + (char)(G.pInfo->lcflag ? '^' : ' '), + (LPSTR)fnfilter(G.filename, slide), (LPSTR)methbuf, G.crec.crc32, + (char)((G.crec.general_purpose_bit_flag & 1) ? 'E' : ' ')); +#else /* !WINDLL */ + if (cfactor == 100) + sprintf(cfactorstr, LoadFarString(CompFactor100)); + else + sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) + Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats), + G.crec.ucsize, methbuf, csiz, cfactorstr, mo, dy, + yr, hh, mm, G.crec.crc32, (G.pInfo->lcflag? '^':' '))); + else +#ifdef OS2_EAS + Info(slide, 0, ((char *)slide, LoadFarString(ShortHdrStats), + G.crec.ucsize, ea_size, acl_size, + mo, dy, yr, hh, mm, (G.pInfo->lcflag? '^':' '))); +#else + Info(slide, 0, ((char *)slide, LoadFarString(ShortHdrStats), + G.crec.ucsize, + mo, dy, yr, hh, mm, (G.pInfo->lcflag? '^':' '))); +#endif + /* fnprint(__G);*/ +#endif /* ?WINDLL */ + + if ((error = do_string(__G__ G.crec.file_comment_length, + QCOND? DISPL_8 : SKIP)) != 0) + { + error_in_archive = error; /* might be just warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + tot_ucsize += G.crec.ucsize; + tot_csize += csiz; + ++members; +#ifdef OS2_EAS + if (ea_size) { + tot_easize += ea_size; + ++tot_eafiles; + } + if (acl_size) { + tot_aclsize += acl_size; + ++tot_aclfiles; + } +#endif +#ifdef OS2DLL + } /* end of "if (G.processExternally) {...} else {..." */ +#endif + } else { /* not listing this file */ + SKIP_(G.crec.file_comment_length) + } + } /* end for-loop (j: files in central directory) */ + +/*--------------------------------------------------------------------------- + Print footer line and totals (compressed size, uncompressed size, number + of members in zipfile). + ---------------------------------------------------------------------------*/ + + if (uO.qflag < 2 +#ifdef OS2DLL + && !G.processExternally +#endif + ) { + if ((cfactor = ratio(tot_ucsize, tot_csize)) < 0) { +#ifndef WINDLL + sgn = '-'; +#endif + cfactor = (-cfactor + 5) / 10; + } else { +#ifndef WINDLL + sgn = ' '; +#endif + cfactor = (cfactor + 5) / 10; + } +#ifdef WINDLL + /* pass the totals back to the calling application */ + G.lpUserFunctions->TotalSizeComp = tot_csize; + G.lpUserFunctions->TotalSize = tot_ucsize; + G.lpUserFunctions->CompFactor = cfactor; + G.lpUserFunctions->NumMembers = members; + +#else /* !WINDLL */ + if (cfactor == 100) + sprintf(cfactorstr, LoadFarString(CompFactor100)); + else + sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) { + Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer), + tot_ucsize, tot_csize, cfactorstr, members, members==1? "":"s")); +#ifdef OS2_EAS + if (tot_easize || tot_aclsize) + Info(slide, 0, ((char *)slide, "\n")); + if (tot_eafiles && tot_easize) + Info(slide, 0, ((char *)slide, LoadFarString(OS2ExtAttrTrailer), + tot_eafiles, tot_eafiles == 1? " has" : "s have a total of", + tot_easize)); + if (tot_aclfiles && tot_aclsize) + Info(slide, 0, ((char *)slide, LoadFarString(OS2ACLTrailer), + tot_aclfiles, tot_aclfiles == 1? " has" : "s have a total of", + tot_aclsize)); +#endif /* OS2_EAS */ + } else +#ifdef OS2_EAS + Info(slide, 0, ((char *)slide, LoadFarString(ShortFileTrailer), + tot_ucsize, tot_easize, tot_aclsize, members, members == 1? + "" : "s")); +#else + Info(slide, 0, ((char *)slide, LoadFarString(ShortFileTrailer), + tot_ucsize, members, members == 1? "" : "s")); +#endif /* OS2_EAS */ +#endif /* ?WINDLL */ + } + +/*--------------------------------------------------------------------------- + Double check that we're back at the end-of-central-directory record. + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ G.sig, 4) == 0) /* disk error? */ + return PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + if (members == 0 && error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; + + return error_in_archive; + +} /* end function list_files() */ + + + + + +#ifdef TIMESTAMP + +/************************/ +/* Function fn_is_dir() */ +/************************/ + +static int fn_is_dir(__G) /* returns TRUE if G.filename is directory */ + __GDEF +{ + extent fn_len = strlen(G.filename); + register char endc; + + return fn_len > 0 && + ((endc = G.filename[fn_len-1]) == '/' || + (G.pInfo->hostnum == FS_FAT_ && !strchr(G.filename, '/') && + endc == '\\')); +} + + + + + +/*****************************/ +/* Function get_time_stamp() */ +/*****************************/ + +int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + __GDEF + time_t *last_modtime; + unsigned *nmember; +{ + int do_this_file=FALSE, error, error_in_archive=PK_COOL; + unsigned j; +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif + min_info info; + + +/*--------------------------------------------------------------------------- + Unlike extract_or_test_files() but like list_files(), this function works + on information in the central directory alone. Thus we have a single, + large loop through the entire directory, searching for the latest time + stamp. + ---------------------------------------------------------------------------*/ + + *last_modtime = 0L; /* assuming no zipfile data older than 1970 */ + *nmember = 0; + G.pInfo = &info; + + for (j = 0; j++ < (unsigned)G.ecrec.total_entries_central_dir;) { + + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); + return PK_BADERR; + } + /* process_cdir_file_hdr() sets pInfo->lcflag: */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) + return error; /* only PK_EOF defined */ + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != PK_OK) + { /* ^-- (uses pInfo->lcflag) */ + error_in_archive = error; + if (error > PK_WARN) /* fatal: can't continue */ + return error; + } + if (G.extra_field != (uch *)NULL) { + free(G.extra_field); + G.extra_field = (uch *)NULL; + } + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) + != 0) + { + error_in_archive = error; + if (error > PK_WARN) /* fatal */ + return error; + } + if (!G.process_all_files) { /* check if specified on command line */ + unsigned i; + + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; + break; /* found match, so stop looping */ + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case in match */ + break; + } + } + } + + /* If current file was specified on command line, or if no names were + * specified, check the time for this file. Either way, get rid of the + * file comment and go back for the next file. + * Directory entries are always ignored, to stay compatible with both + * Zip and PKZIP. + */ + if ((G.process_all_files || do_this_file) && !fn_is_dir(__G)) { +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + if (*last_modtime < z_utime.mtime) + *last_modtime = z_utime.mtime; + } else +#endif /* USE_EF_UT_TIME */ + { + time_t modtime = dos_to_unix_time(G.crec.last_mod_dos_datetime); + + if (*last_modtime < modtime) + *last_modtime = modtime; + } + ++*nmember; + } + SKIP_(G.crec.file_comment_length) + + } /* end for-loop (j: files in central directory) */ + +/*--------------------------------------------------------------------------- + Double check that we're back at the end-of-central-directory record. + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; + } + if (*nmember == 0 && error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; + + return error_in_archive; + +} /* end function get_time_stamp() */ + +#endif /* TIMESTAMP */ + + + + + +/********************/ +/* Function ratio() */ /* also used by ZipInfo routines */ +/********************/ + +int ratio(uc, c) + ulg uc, c; +{ + ulg denom; + + if (uc == 0) + return 0; + if (uc > 2000000L) { /* risk signed overflow if multiply numerator */ + denom = uc / 1000L; + return ((uc >= c) ? + (int) ((uc-c + (denom>>1)) / denom) : + -((int) ((c-uc + (denom>>1)) / denom))); + } else { /* ^^^^^^^^ rounding */ + denom = uc; + return ((uc >= c) ? + (int) ((1000L*(uc-c) + (denom>>1)) / denom) : + -((int) ((1000L*(c-uc) + (denom>>1)) / denom))); + } /* ^^^^^^^^ rounding */ +} + + + + + +/************************/ +/* Function fnprint() */ /* also used by ZipInfo routines */ +/************************/ + +void fnprint(__G) /* print filename (after filtering) and newline */ + __GDEF +{ + char *name = fnfilter(G.filename, slide); + + (*G.message)((zvoid *)&G, (uch *)name, (ulg)strlen(name), 0); + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + +} /* end function fnprint() */ diff --git a/utils/Install/sfxzip/makefile b/utils/Install/sfxzip/makefile new file mode 100644 index 0000000000..92be40b56a --- /dev/null +++ b/utils/Install/sfxzip/makefile @@ -0,0 +1,142 @@ +#============================================================================== +# Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only) +# Version: 5.4 19 November 1998 +#============================================================================== + + +# INSTRUCTIONS (such as they are): +# +# "make sunos" -- makes UnZip in current directory on a generic SunOS 4.x Sun +# "make list" -- lists all supported systems (targets) +# "make help" -- provides pointers on what targets to try if problems occur +# "make wombat" -- chokes and dies if you haven't added the specifics for your +# Wombat 68000 (or whatever) to the systems list +# +# CF are flags for the C compiler. LF are flags for the loader. LF2 are more +# flags for the loader, if they need to be at the end of the line instead of at +# the beginning (for example, some libraries). FL and FL2 are the corre- +# sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can +# be used to add default C flags to your compile without editing the Makefile +# (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C). +# +# Some versions of make do not define the macro "$(MAKE)"; this is rare, but +# if things don't work, try using "make" instead of "$(MAKE)" in your system's +# makerule. Or try adding the following line to your .login file: +# setenv MAKE "make" +# (That never works--makes that are too stupid to define MAKE are also too +# stupid to look in the environment--but try it anyway for kicks. :-) ) +# +# Memcpy and memset are provided for those systems that don't have them; they +# are in fileio.c and will be used if -DZMEM is included in CF. These days +# almost all systems have them. +# +# Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila- +# tion does not always imply a working program. + + +##################### +# MACRO DEFINITIONS # +##################### + +# Defaults most systems use (use LOCAL_UNZIP in environment to add flags, +# such as -DDOSWILD). + +# UnZip flags +CC = cc# try using "gcc" target rather than changing this (CC and LD +LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) +AS = as +LOC = $(LOCAL_UNZIP) +AF = $(LOC) +CF = -O -g -I. -I.. -I../inczip $(LOC) -I/usr/local//include -I/usr/X11R6/include -I/usr/local/lib/glib/include -DSTRICT -D__WXGTK__ -DGTK_NO_CHECK_CASTS -D_REENTRANT -D_IODBC_ -Wall +LF = -o sfx -L/usr/local/lib -L/usr/X11R6/lib -L/usr -lwx_gtk -lpng -ljpeg -lstdc++ -lgcc -lc_r -lgtk -lgdk -lgmodule -lglib -lXext -lX11 -lm -lgthread +LF2 = -s + +# general-purpose stuff +#CP = cp +CP = ln +LN = ln +RM = rm -f +CHMOD = chmod +BINPERMS = 755 +MANPERMS = 644 +STRIP = strip +E = +O = .o +M = unix +SHELL = /bin/sh + +# defaults for crc32 stuff and system dependent headers +CRC32 = crc32 + +# object files +OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O +OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O +OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O install$O wxmain$O instsup$O +UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h + +# installation +# (probably can change next two to `install' and `install -d' if you have it) +INSTALL = cp +INSTALL_D = mkdir -p + +############################################### +# BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES # +############################################### + +# this is for GNU make; comment out and notify zip-bugs if it causes errors +.SUFFIXES: .c .o .obj .pic.o + +# yes, we should be able to use the $O macro to combine these two, but it +# fails on some brain-damaged makes (e.g., AIX's)...no big deal +.c.o: + $(CC) -c $(CF) $*.c + +.c.obj: + $(CC) -c $(CF) $*.c + +.c.pic.o: + $(CC) -c $(CF) -o $@ $*.c + +all: sfx + + +# EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS +# make utilities if default: change "unzip$E:" to "unzip$E:&" + +sfx$E: $(OBJS) # add `&' for parallel makes + $(LD) $(LF) $(OBJS) + +crc32$O: crc32.c $(UNZIP_H) ../inczip/zip.h +crctab$O: crctab.c $(UNZIP_H) ../inczip/zip.h +crypt$O: crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +envargs$O: envargs.c $(UNZIP_H) +explode$O: explode.c $(UNZIP_H) +extract$O: extract.c $(UNZIP_H) ../inczip/crypt.h +fileio$O: fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h +funzip$O: funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h +globals$O: globals.c $(UNZIP_H) +inflate$O: inflate.c ../inczip/inflate.h $(UNZIP_H) +list$O: list.c $(UNZIP_H) +match$O: match.c $(UNZIP_H) +process$O: process.c $(UNZIP_H) +ttyio$O: ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +unreduce$O: unreduce.c $(UNZIP_H) +unshrink$O: unshrink.c $(UNZIP_H) +unzip$O: unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h +zipinfo$O: zipinfo.c $(UNZIP_H) + +unix$O: unix.c $(UNZIP_H) ../inczip/version.h # Unix only + $(CC) -c $(CF) unix.c + +install$O: ../install.c + $(CC) -c $(CF) ../install.c + +wxmain$O: ../wxmain.cpp + $(CC) -c $(CF) ../wxmain.cpp + +instsup$O: ../instsup.cpp + $(CC) -c $(CF) ../instsup.cpp + + + diff --git a/utils/Install/sfxzip/makefile.b32 b/utils/Install/sfxzip/makefile.b32 new file mode 100644 index 0000000000..ce4e11187e --- /dev/null +++ b/utils/Install/sfxzip/makefile.b32 @@ -0,0 +1,135 @@ +# Makefile for UnZip(SFX) and fUnZip for Borland C++ for Windows 95/NT +# Version: 5.4 and later Alvin Koh, Jim Knoble, Christian Spieler, etc. +# Adapted from the MS-DOS makefile by E-Yen Tan +# +# Last revised: 24 Nov 98 +# +# + + +# Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD) +# should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added +# to the declaration of LOC here: +LOC = $(LOCAL_UNZIP) + +# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. +CPU_TYP = 4 + +# (De)Select inclusion of optimized assembler CRC32 routine: +USE_ASMCRC = 0 + +# If you have bcc32i, you should define: +# CC = bcc32i +# This compiler generates a faster code. +CC = bcc32 +AS = tasm32 + +!if $(USE_ASMCRC) +ASMFLG = -DASM_CRC +ASMOBJS = crc_i386.obj +!else +ASMFLG = +ASMOBJS = +!endif + +!if $(UNCLEAN) +DIRT = -DUSE_SMITH_CODE -DUSE_UNSHRINK +!else +DIRT = +!endif + +# compiler flags + +ASCPUFLAG = __$(CPU_TYP)86 +!if $(CPU_TYP) != 0 +CC_CPUFLG = -$(CPU_TYP) +!endif +ASFLAGS = -ml -m2 -w0 -D$(ASCPUFLAG) $(LOC) +CFLAGS = -Od -w- $(CC_CPUFLG) -ff- -k- -P-.C -I. -I.. -I../inczip -I../../../include $(ASMFLG) $(LOC) $(DIRT) -v -D__WXMSW__ -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE -DWIN32 -D__WIN95__ -D__WINDOWS__ -I$(WXDIR)\include +LDFLAGS = -L$(WXWIN)\lib -aa -c # for bcc +LINK = ilink32 +LIBS = wx32 cw32mt import32 ole2w32 winpng zlib jpeg xpm tiff + +UNFLAGS = $(CFLAGS) + +# implicit rules + +.asm.obj: + $(AS) $(ASFLAGS) $< + +.c.obj: + $(CC) -c $(UNFLAGS) {$< } + +# list macros + +OBJU1 = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj explode.obj +OBJU2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj +OBJU3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj +OBJUS = win32.obj nt.obj install.obj wxmain.obj instsup.obj $(ASMOBJS) +OBJU = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJUS) + +UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h ../inczip/w32cfg.h + +# explicit rules + +all: sfx.exe + +sfx.exe: $(OBJU) sfx.res + $(LINK) $(LDFLAGS) @&&! +c0w32.obj $(OBJU) +sfx.exe +nul +$(LIBS) + +sfx.res +! + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.rws + -erase *.tds + -erase *.il? + +# individual file dependencies + +crc32.obj: crc32.c $(UNZIP_H) ../inczip/zip.h +crctab.obj: crctab.c $(UNZIP_H) ../inczip/zip.h +crypt.obj: crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +envargs.obj: envargs.c $(UNZIP_H) +explode.obj: explode.c $(UNZIP_H) +extract.obj: extract.c $(UNZIP_H) ../inczip/crypt.h +fileio.obj: fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h +globals.obj: globals.c $(UNZIP_H) +inflate.obj: inflate.c ../inczip/inflate.h $(UNZIP_H) +list.obj: list.c $(UNZIP_H) +match.obj: match.c $(UNZIP_H) +process.obj: process.c $(UNZIP_H) +ttyio.obj: ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +unreduce.obj: unreduce.c $(UNZIP_H) +unshrink.obj: unshrink.c $(UNZIP_H) +unzip.obj: unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h +zipinfo.obj: zipinfo.c $(UNZIP_H) + +#crc_i386.obj: win32/crc_i386.asm +# $(AS) $(ASFLAGS) win32\crc_i386.asm, $*.obj ; + +win32.obj: win32.c $(UNZIP_H) + $(CC) -c $(UNFLAGS) win32.c + +nt.obj: nt.c $(UNZIP_H) + $(CC) -c $(UNFLAGS) nt.c + +install.obj: ../install.c $(UNZIP_H) + $(CC) -c $(UNFLAGS) ../install.c + +wxmain.obj: ../wxmain.cpp $(UNZIP_H) + $(CC) -P- -c $(UNFLAGS) ../wxmain.cpp + +instsup.obj: ../instsup.cpp $(UNZIP_H) + $(CC) -P- -c $(UNFLAGS) ../instsup.cpp + +sfx.res : sfx.rc $(WXWIN)\include\wx\msw\wx.rc + brc32 -r /i$(BCCDIR)\include /i$(WXWIN)\include /i$(WXWIN)\contrib\include sfx diff --git a/utils/Install/sfxzip/makefile.g95 b/utils/Install/sfxzip/makefile.g95 new file mode 100644 index 0000000000..3049513be8 --- /dev/null +++ b/utils/Install/sfxzip/makefile.g95 @@ -0,0 +1,164 @@ +# Makefile for UnZip, fUnZip and UnZipSFX for native Win32-Intel ports of gcc. +# Currently supported implementations: Cygnus/Win32 and MinGW32. +# +# First version: Cosmin Truta , Dec 1997. +# Last revision: Christian Spieler, 29-Apr-1998 +# +# To use, do "make -f win32/makefile.gcc". + + +### Optional section + +# Optional nonstandard preprocessor flags (as -DUSE_ZLIB or -DUSE_SMITH_CODE) +# should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added +# to the declaration of LOCFLAGS here: +LOCFLAGS = $(LOCAL_UNZIP) + + +### Compiler-specific section + +# ------------ GNU C ------------ +CC = gcc + +#AS = as +AS = $(CC) + +#LD = ld +LD = $(CC) + +# Quiet +CC_QUIET_OPT = +AS_QUIET_OPT = $(CC_QUIET_OPT) +LD_QUIET_OPT = $(CC_QUIET_OPT) + +# Warnings +CC_WARN_OPT = -Wall +AS_WARN_OPT = $(CC_WARN_OPT) +LD_WARN_OPT = + +# Debug version +CC_DEBUG_OPT = -g +AS_DEBUG_OPT = $(CC_DEBUG_OPT) +LD_DEBUG_OPT = $(CC_DEBUG_OPT) + +# Release version +CC_RELEASE_OPT = +AS_RELEASE_OPT = +#LD_RELEASE_OPT = -s + +# Smallest code +CC_SIZE_OPT = -O1 + +# Fastest code +CC_SPEED_OPT = -O2 + +# Output object file name +CC_OUT_OPT = -o + +# Other specific options +#CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32 -mno-cygwin +CC_SPECIFIC_OPT = -c -DWIN32 -I../inczip -g -I.. -D_X86_=1 -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -I../../../include -I../../../src/png -I../../../src/jpeg -I../../../src/zlib -I../../../include/wx/msw/gnuwin32 -DSTRICT -D__WXMSW__ -D__WINDOWS__ -D__WXDEBUG__ -Wall -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions +AS_SPECIFIC_OPT = -c +LD_SPECIFIC_OPT = -Wl,--subsystem,windows -mwindows -L../../../lib -o $@ + +# Libraries for the debug & release version +LD_RELEASE_LIBS = ../../../lib/libwx.a -lpng -ljpeg -lzlib -lxpm -lstdc++ -lgcc -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lole32 -loleaut32 -luuid -lodbc32 -lwsock32 +LD_DEBUG_LIBS = $(LD_RELEASE_LIBS) + + +### System-specific section + +# Suffixes +OBJ = .o +EXE = .exe + +.SUFFIXES: .c .S $(OBJ) $(EXE) + +# Commands +RM = rm -f + + +### General section + +CFLAGS = $(CC_SPECIFIC_OPT) $(CC_QUIET_OPT) $(CC_WARN_OPT) $(LOCFLAGS) \ + $(CC_OUT_OPT) $@ +ASFLAGS = $(AS_SPECIFIC_OPT) $(AS_QUIET_OPT) $(AS_WARN_OPT) $(LOCFLAGS) +LDFLAGS = $(LD_SPECIFIC_OPT) $(LD_QUIET_OPT) $(LD_WARN_OPT) + +# To build with debug info, use 'make DEBUG=1'. +ifdef DEBUG +CVER = $(CC_DEBUG_OPT) +ASVER = $(AS_DEBUG_OPT) +LDVER = $(LD_DEBUG_OPT) +GENFLAGS = +FFLAGS = -DFUNZIP +SFXFLAGS = -DSFX +LDLIBS = $(LD_DEBUG_LIBS) +else +CVER = $(CC_RELEASE_OPT) +ASVER = $(AS_RELEASE_OPT) +LDVER = $(LD_RELEASE_OPT) +GENFLAGS = $(CC_SPEED_OPT) +FFLAGS = $(CC_SPEED_OPT) -DFUNZIP +SFXFLAGS = $(CC_SIZE_OPT) -DSFX +LDLIBS = $(LD_RELEASE_LIBS) +endif + +# Object files +OBJA = crc_i386$(OBJ) install$(OBJ) wxmain$(OBJ) instsup$(OBJ) +OBJS1 = unzip$(OBJ) crc32$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) +OBJS2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) inflate$(OBJ) +OBJS3 = list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) unreduce$(OBJ) +OBJS4 = unshrink$(OBJ) zipinfo$(OBJ) win32$(OBJ) nt$(OBJ) +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJA) + +UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h ../inczip/w32cfg.h + + +# Default target is all the executables +unzips: sfx$(EXE) + +sfx$(EXE): $(OBJS) + $(LD) $(LDFLAGS) $(LDVER) $(OBJS) $(LDLIBS) + +# How to compile sources +.c$(OBJ): + $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $< +.S$(OBJ): + $(AS) $(ASFLAGS) $(ASVER) $(GENFLAGS) $< + +# Dependencies +crc32$(OBJ): crc32.c $(UNZIP_H) ../inczip/zip.h +crctab$(OBJ): crctab.c $(UNZIP_H) ../inczip/zip.h +crypt$(OBJ): crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +envargs$(OBJ): envargs.c $(UNZIP_H) +explode$(OBJ): explode.c $(UNZIP_H) +extract$(OBJ): extract.c $(UNZIP_H) ../inczip/crypt.h +fileio$(OBJ): fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h +funzip$(OBJ): funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h +globals$(OBJ): globals.c $(UNZIP_H) +inflate$(OBJ): inflate.c ../inczip/inflate.h $(UNZIP_H) +list$(OBJ): list.c $(UNZIP_H) +match$(OBJ): match.c $(UNZIP_H) +process$(OBJ): process.c $(UNZIP_H) +ttyio$(OBJ): ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +unreduce$(OBJ): unreduce.c $(UNZIP_H) +unshrink$(OBJ): unshrink.c $(UNZIP_H) +unzip$(OBJ): unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h +zipinfo$(OBJ): zipinfo.c $(UNZIP_H) +crc_i386$(OBJ): crc_i386.S +win32$(OBJ): win32.c $(UNZIP_H) ../inczip/nt.h +nt$(OBJ): nt.c ../inczip/nt.h + +install$(OBJ): ../install.c + $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $< + +wxmain$(OBJ): ../wxmain.cpp + $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $< + +instsup$(OBJ): ../instsup.cpp + $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $< + +clean: + $(RM) *$(OBJ) + $(RM) *$(EXE) diff --git a/utils/Install/sfxzip/makefile.gcc b/utils/Install/sfxzip/makefile.gcc new file mode 100644 index 0000000000..92be40b56a --- /dev/null +++ b/utils/Install/sfxzip/makefile.gcc @@ -0,0 +1,142 @@ +#============================================================================== +# Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only) +# Version: 5.4 19 November 1998 +#============================================================================== + + +# INSTRUCTIONS (such as they are): +# +# "make sunos" -- makes UnZip in current directory on a generic SunOS 4.x Sun +# "make list" -- lists all supported systems (targets) +# "make help" -- provides pointers on what targets to try if problems occur +# "make wombat" -- chokes and dies if you haven't added the specifics for your +# Wombat 68000 (or whatever) to the systems list +# +# CF are flags for the C compiler. LF are flags for the loader. LF2 are more +# flags for the loader, if they need to be at the end of the line instead of at +# the beginning (for example, some libraries). FL and FL2 are the corre- +# sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can +# be used to add default C flags to your compile without editing the Makefile +# (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C). +# +# Some versions of make do not define the macro "$(MAKE)"; this is rare, but +# if things don't work, try using "make" instead of "$(MAKE)" in your system's +# makerule. Or try adding the following line to your .login file: +# setenv MAKE "make" +# (That never works--makes that are too stupid to define MAKE are also too +# stupid to look in the environment--but try it anyway for kicks. :-) ) +# +# Memcpy and memset are provided for those systems that don't have them; they +# are in fileio.c and will be used if -DZMEM is included in CF. These days +# almost all systems have them. +# +# Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila- +# tion does not always imply a working program. + + +##################### +# MACRO DEFINITIONS # +##################### + +# Defaults most systems use (use LOCAL_UNZIP in environment to add flags, +# such as -DDOSWILD). + +# UnZip flags +CC = cc# try using "gcc" target rather than changing this (CC and LD +LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) +AS = as +LOC = $(LOCAL_UNZIP) +AF = $(LOC) +CF = -O -g -I. -I.. -I../inczip $(LOC) -I/usr/local//include -I/usr/X11R6/include -I/usr/local/lib/glib/include -DSTRICT -D__WXGTK__ -DGTK_NO_CHECK_CASTS -D_REENTRANT -D_IODBC_ -Wall +LF = -o sfx -L/usr/local/lib -L/usr/X11R6/lib -L/usr -lwx_gtk -lpng -ljpeg -lstdc++ -lgcc -lc_r -lgtk -lgdk -lgmodule -lglib -lXext -lX11 -lm -lgthread +LF2 = -s + +# general-purpose stuff +#CP = cp +CP = ln +LN = ln +RM = rm -f +CHMOD = chmod +BINPERMS = 755 +MANPERMS = 644 +STRIP = strip +E = +O = .o +M = unix +SHELL = /bin/sh + +# defaults for crc32 stuff and system dependent headers +CRC32 = crc32 + +# object files +OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O +OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O +OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O install$O wxmain$O instsup$O +UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h + +# installation +# (probably can change next two to `install' and `install -d' if you have it) +INSTALL = cp +INSTALL_D = mkdir -p + +############################################### +# BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES # +############################################### + +# this is for GNU make; comment out and notify zip-bugs if it causes errors +.SUFFIXES: .c .o .obj .pic.o + +# yes, we should be able to use the $O macro to combine these two, but it +# fails on some brain-damaged makes (e.g., AIX's)...no big deal +.c.o: + $(CC) -c $(CF) $*.c + +.c.obj: + $(CC) -c $(CF) $*.c + +.c.pic.o: + $(CC) -c $(CF) -o $@ $*.c + +all: sfx + + +# EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS +# make utilities if default: change "unzip$E:" to "unzip$E:&" + +sfx$E: $(OBJS) # add `&' for parallel makes + $(LD) $(LF) $(OBJS) + +crc32$O: crc32.c $(UNZIP_H) ../inczip/zip.h +crctab$O: crctab.c $(UNZIP_H) ../inczip/zip.h +crypt$O: crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +envargs$O: envargs.c $(UNZIP_H) +explode$O: explode.c $(UNZIP_H) +extract$O: extract.c $(UNZIP_H) ../inczip/crypt.h +fileio$O: fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h +funzip$O: funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h +globals$O: globals.c $(UNZIP_H) +inflate$O: inflate.c ../inczip/inflate.h $(UNZIP_H) +list$O: list.c $(UNZIP_H) +match$O: match.c $(UNZIP_H) +process$O: process.c $(UNZIP_H) +ttyio$O: ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h +unreduce$O: unreduce.c $(UNZIP_H) +unshrink$O: unshrink.c $(UNZIP_H) +unzip$O: unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h +zipinfo$O: zipinfo.c $(UNZIP_H) + +unix$O: unix.c $(UNZIP_H) ../inczip/version.h # Unix only + $(CC) -c $(CF) unix.c + +install$O: ../install.c + $(CC) -c $(CF) ../install.c + +wxmain$O: ../wxmain.cpp + $(CC) -c $(CF) ../wxmain.cpp + +instsup$O: ../instsup.cpp + $(CC) -c $(CF) ../instsup.cpp + + + diff --git a/utils/Install/sfxzip/makefile.os2 b/utils/Install/sfxzip/makefile.os2 new file mode 100644 index 0000000000..6778bd50ab --- /dev/null +++ b/utils/Install/sfxzip/makefile.os2 @@ -0,0 +1,670 @@ +# Makefile for UnZip, UnZipSFX and fUnZip 24 November 1998 +# +# supported compilers: +# - Microsoft C, version 6.00 or higher, for use under OS/2 1.x (16-bit) +# - Watcom C/C++, version 9.0+, for use under OS/2 1.x or 2.x+ (16/32-bit) +# - emx+gcc, version 0.9c or higher, for use under OS/2 2.x+ (32-bit) +# - IBM C Set++, for use under OS/2 2.x+ (32-bit) +# - Borland C++, for use under OS/2 2.x+ (32-bit) +# - Metaware High C/C++, for use under OS/2 2.x+ (32-bit) +# +# supported cross-compilers: +# - Microsoft C, version 6.0 or 7.0, for use under DOS (16-bit) +# - Watcom C/C++, version 9.0+, for use under DOS/Win95/NT (16/32-bit) +# - GNU gcc (emx), version 0.9c or higher, for use under DOS/Win95/NT (32-bit) +# +# supported assemblers: +# - Microsoft MASM 6.00 with Microsoft C +# - Watcom WASM with Watcom C/C++ +# - GNU as with GNU gcc + +# To use MASM 5.x instead of MASM 6.00: +# - set AS="masm -t -Ml" +# - set ASEOL=";" + +# To use, enter "{d,n}make -f os2/makefile.os2" (this makefile depends on its +# name being "makefile.os2", and it must be in the os2 subdirectory). + +# Notes on Microsoft C 6.00 compilation for OS/2: +# +# The resulting programs can be used under OS/2 protected mode only, not +# under DOS. A larger stack has to be used for OS/2 because system calls +# use more stack than under DOS; 8k is recommended by Microsoft. + +# Notes on IBM C Set++, Watcom C/C++, Borland C++ or emx+gcc compilation: +# +# The resulting programs can be used under protected mode of OS/2 2.x or +# higher only, not under OS/2 1.x and not under DOS. +# +# The NFLAGS macro is used to work around an optimization bug in the IBM +# C++ Set compiler; this is fixed by CSD #4, so NFLAGS="" can be used for +# all targets below. + +# Notes on Watcom C/C++ compilation for DOS with the PMODE/W extender: +# +# You need to add the following section to your \watcom\binb\wlsystem.lnk +# file and also need to copy pmodew.exe to the same directory: +# +# system begin pmodew +# option osname='PMODE/W' +# libpath %WATCOM%\lib386 +# libpath %WATCOM%\lib386\dos +# op stub=pmodew.exe +# format os2 le +# end +# +# PMODE/W 1.16 or higher is required. See also msdos/README for important +# notes about PMODE/W bugs. + +default: + @echo "Enter `$(MAKE) -f os2/makefile.os2 target' from the main" + @echo "UnZip directory, where target is one of:" + @echo " msc mscdebug mscdos ibm ibmdyn ibmdebug ibmprof" + @echo " ibmdll ibmdyndll ibmdebugdll ibmprofdll" + @echo " metaware borland gcc gccdyn gccdebug gccdos gccwin32" + @echo " watcom watcom16 watcomdos watcom16dos pmodew watcomwin32" + +# MS C 6.00 for OS/2, 16-bit (should figure out way to split unzip/funzip +# compiles so former is always large model and latter always small model...) +msc: + $(MAKE) -f os2/makefile.os2 all \ + CC="cl -nologo -AL -Ocegit -Gs -I. $(FP)" \ + CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="ml -nologo -c -Zm -Cp" \ + ASFLAGS="-D__LARGE__ -D__286" \ + LDFLAGS="-F 2000 -Lp -Fe" \ + LDFLAGS2="-link /noe" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + DEF="os2\unzip.def" + +# MS C 6.00 for OS/2, debug version +mscdebug: + $(MAKE) -f os2/makefile.os2 all \ + CC="cl -nologo -AL -Zi -Od -I. $(FP)" \ + CFLAGS="-G2 -Zp1 -W3 -DOS2 -DMSC -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="ml -nologo -c -Zim -Cp" \ + ASFLAGS="-D__LARGE__ -D__286" \ + LDFLAGS="-F 2000 -Lp -Fe" \ + LDFLAGS2="-link /noe" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + DEF="os2\unzip.def" + +# cross-compilation for MS-DOS with MS C 6.00 (same comment as above...formerly; +# now unzip is medium model again, with [almost] all strings in far memory) +mscdos: + $(MAKE) -f os2/makefile.os2 all \ + CC="cl -nologo -AM -Oaict -Gs -I. $(FP)" \ + CFLAGS="-Zp1 -W3 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="ml -nologo -c -Zm -Cp" \ + ASFLAGS="-D__MEDIUM__" \ + LDFLAGS="-F 0C00 -Lr -Fe" \ + LDFLAGS2="-link /noe /exe" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" + +# IBM C Set, statically linked runtime +ibm: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -O -Gs -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, dynamically linked runtime +ibmdyn: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -O -Gs -Gd -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, debug version +ibmdebug: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -Ti -I." \ + CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, profiling version for PROFIT +ibmprof: + $(MAKE) -f os2/makefile.os2 all \ + CC="icc -Q -O -Gs -Gh -Ti -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-B/ST:0x50000 -Fe" \ + LDFLAGS2="cppopa3.obj" \ + OUT="-Fo" \ + OBJ=".obj" \ + DEF="os2\unzip.def" + +# IBM C Set, statically linked runtime +ibmdll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -O -Gs -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# IBM C Set, dynamically linked runtime +ibmdyndll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -O -Gs -Gd -I." \ + CFLAGS="-Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# IBM C Set, debug version +ibmdebugdll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -Ti -I." \ + CFLAGS="-Sm -Sp1 -D__DEBUG_ALLOC__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# IBM C Set, profiling version for PROFIT +ibmprofdll: + $(MAKE) -f os2/makefile.os2 dll \ + CC="icc -Q -O -Gs -Gh -Ti -I." \ + CFLAGS="-Gm -Sm -Sp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="-Gm -Ge- -DDLL -DOS2DLL -DAPI_DOC" \ + LDFLAGS="-Fe" \ + LDFLAGS2="profit.obj" \ + OUT="-Fo" \ + OBJ=".obj" \ + DLLDEF="os2\rexxapi.def" \ + STUBDEF="os2\stub.def" \ + DEF="os2\unzip.def" \ + APILIB="REXX.lib" + +# Watcom C/386 9.0 or higher +watcom: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=os2v2 -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=os2v2 -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=os2v2 -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + DEF="" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/286 9.0 or higher +watcom16: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl -bt=os2 -zq -ml -Ox -s -I." \ + CFLAGS="-Zp1 -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=os2 -zq -2 -ml" \ + ASFLAGS="" \ + LDFLAGS="-k0x2000 -x -l=os2 -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i86" \ + CRC32F="crc_i86" \ + CRC32X="crc_i86" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/386 9.0 or higher, crosscompilation for DOS, DOS4GW extender +watcomdos: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=dos4g -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=dos4g -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=dos4g -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/386 9.0 or higher, crosscompilation for DOS, PMODE/W extender +pmodew: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=dos4g -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=dos4g -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=pmodew -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/286 9.0 or higher, crosscompilation for DOS +watcom16dos: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl -bt=dos -zq -ml -Ox -s -I." \ + CFLAGS="-Zp1 -DMSDOS $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=dos -0 -mm" \ + ASFLAGS="-D__MEDIUM__" \ + LDFLAGS="-k0xC00 -x -l=dos -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + OBJU2="msdos.obj" \ + OBJX2="msdos_.obj" \ + OSDEP_H="msdos/doscfg.h" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# Watcom C/386 9.0 or higher, crosscompilation for Win95/NT +watcomwin32: + $(MAKE) -f os2/makefile.os2 all \ + CC="wcl386 -bt=NT -zq -Ox -s -I." \ + CFLAGS="-Zp1 -DWIN32 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="wasm -bt=NT -zq -3 -mf" \ + ASFLAGS="" \ + LDFLAGS="-k0x50000 -x -l=NT -Fe=" \ + LDFLAGS2="" \ + OUT="-Fo" \ + OBJ=".obj" \ + OBJU2="win32.obj nt.obj" \ + OBJX2="win32_.obj nt_.obj" \ + CRC32="crc_i386" \ + CRC32F="crc_i386" \ + CRC32X="crc_i386" \ + DEF="" \ + DIRSEP="\\" \ + AS_DIRSEP="\\" + +# MetaWare High C/C++ 3.2 +metaware: + $(MAKE) -f os2/makefile.os2 all \ + CC="hc -O2 -I." \ + CFLAGS="-D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-o " \ + LDFLAGS2="" \ + OUT="-o ./" \ + OBJ=".obj" \ + DEF="-Hdef=os2\unzip.def" + +# Borland C++ +borland: + $(MAKE) -f os2/makefile.os2 all \ + CC="bcc -O -I. -Ios2" \ + CFLAGS="-w- -D__cdecl -D__32BIT__ -DOS2 $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + LDFLAGS="-e" \ + LDFLAGS2="" \ + OUT="-o" \ + OBJ=".obj" \ + DEF="-sDos2\unzip.def" + +# emx, gcc, OMF format, statically linked C runtime +gcc: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -Zomf -O -I." \ + CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc -Zomf" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zsmall-conv -Zstack 320 -Zsys -s" \ + OUT="-o" \ + OBJ=".obj" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + DEF="os2/unzip.def" + +# emx, gcc, OMF format, dynamically linked C runtime +gccdyn: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -Zomf -O -I." \ + CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc -Zomf" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zstack 320 -Zcrtdll -s" \ + OUT="-o" \ + OBJ=".obj" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + DEF="os2/unzip.def" + +# emx, gcc, a.out format, with debug info for gdb +gccdebug: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -g -I." \ + CFLAGS="-Wall -DOS2 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc -g" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zsmall-conv" \ + OUT="-o" \ + OBJ=".o" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" + +# emx, gcc, a.out format, cross-compilation for MS-DOS +gccdos: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -O -I." \ + CFLAGS="-Wall -DMSDOS -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc" \ + ASFLAGS="-Di386" \ + LDFLAGS="-o ./" \ + LDFLAGS2="-Zsmall-conv -s" \ + OUT="-o" \ + OBJ=".o" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + OBJU2="msdos.o" \ + OBJX2="msdos_.o" \ + OSDEP_H="msdos/doscfg.h" + +# emx, gcc, RSXNT, cross-compilation for Win32, statically linked C runtime +gccwin32: + $(MAKE) -f os2/makefile.os2 all \ + CC="gcc -Zwin32 -O2 -I." \ + CFLAGS="-Wall -DWIN32 -DASM_CRC $(LOCAL_UNZIP)" \ + NFLAGS="" \ + DLLFLAG="" \ + AS="gcc" \ + ASFLAGS="-Di386" \ + LDFLAGS="-Zsys -o ./" \ + LDFLAGS2="-ladvapi32 -Zsmall-conv -s" \ + OUT="-o" \ + OBJ=".o" \ + CRC32="crc_gcc" \ + CRC32F="crc_gcc" \ + CRC32X="crc_gcc" \ + OBJU2="win32.o nt.o" \ + OBJX2="win32_.o nt_.o" \ + OBJF2="win32f.o" \ + OSDEP_H="win32/w32cfg.h" + +# variables + +# LOCAL_UNZIP = -DREENTRANT + +# default settings for target dependent macros: +DIRSEP = / +AS_DIRSEP = / + +OSDEP_H = os2/os2data.h os2/os2cfg.h +CRC32 = crc32 +CRC32F = crc32f +CRC32X = crc32_ + +OBJU = unzip$(OBJ) $(CRC32)$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ) \ + explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) \ + inflate$(OBJ) list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) \ + unreduce$(OBJ) unshrink$(OBJ) zipinfo$(OBJ) +OBJU2 = os2$(OBJ) os2acl$(OBJ) +OBJX = unzipsf_$(OBJ) $(CRC32X)$(OBJ) crctab_$(OBJ) crypt_$(OBJ) \ + extract_$(OBJ) fileio_$(OBJ) globals_$(OBJ) inflate_$(OBJ) \ + match_$(OBJ) process_$(OBJ) ttyio_$(OBJ) +OBJX2 = os2_$(OBJ) os2acl_$(OBJ) +OBJDLL= api$(OBJ) apihelp$(OBJ) rexxhelp$(OBJ) rexxapi$(OBJ) +OBJF = funzip$(OBJ) $(CRC32F)$(OBJ) cryptf$(OBJ) inflatef$(OBJ) \ + globalsf$(OBJ) ttyiof$(OBJ) +OBJF2 = + +UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) + +# rules + +.SUFFIXES: .c .asm $(OBJ) + +.c$(OBJ): + $(CC) -c $(CFLAGS) $(DLLFLAG) $< + +.asm$(OBJ): + $(AS) $(ASFLAGS) $< $(ASEOL) + +# targets + +all: unzip.exe funzip.exe unzipsfx.exe +dll: unzip32.dll unzip.stb funzip.exe unzipsfx.exe + +unzip.exe: $(OBJU) $(OBJU2) + $(CC) $(LDFLAGS)$@ $(DEF) $(OBJU) $(OBJU2) $(LDFLAGS2) + +funzip.exe: $(OBJF) $(OBJF2) + $(CC) $(LDFLAGS)$@ $(DEF) $(OBJF) $(OBJF2) $(LDFLAGS2) + +unzipsfx.exe: $(OBJX) $(OBJX2) + $(CC) $(LDFLAGS)$@ $(DEF) $(OBJX) $(OBJX2) $(LDFLAGS2) + +unzip32.dll: $(DLLDEF) $(OBJU) $(OBJU2) $(OBJDLL) + $(CC) $(DLLFLAG) $(LDFLAGS)$@ $(DLLDEF) $(OBJU) $(OBJDLL) $(OBJU2) $(APILIB) $(LDFLAGS2) + +unzip.stb: unzipstb$(OBJ) $(STUBDEF) + $(CC) $(LDFLAGS)$@ $(STUBDEF) unzipstb$(OBJ) $(LDFLAGS2) + copy unzip.stb unzip.exe + +# dependencies + +apihelp$(OBJ): apihelp.c $(UNZIP_H) version.h +crc32$(OBJ): crc32.c $(UNZIP_H) zip.h +crctab$(OBJ): crctab.c $(UNZIP_H) zip.h +envargs$(OBJ): envargs.c $(UNZIP_H) +explode$(OBJ): explode.c $(UNZIP_H) +extract$(OBJ): extract.c $(UNZIP_H) crypt.h +fileio$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h +globals$(OBJ): globals.c $(UNZIP_H) +inflate$(OBJ): inflate.c $(UNZIP_H) +list$(OBJ): list.c $(UNZIP_H) +match$(OBJ): match.c $(UNZIP_H) +process$(OBJ): process.c $(UNZIP_H) +ttyio$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h +unreduce$(OBJ): unreduce.c $(UNZIP_H) +unshrink$(OBJ): unshrink.c $(UNZIP_H) +unzip$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h +api$(OBJ): api.c $(UNZIP_H) version.h +zipinfo$(OBJ): zipinfo.c $(UNZIP_H) + +funzip$(OBJ): funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h # funzip only + $(CC) -c $(CFLAGS) funzip.c + +unzipstb$(OBJ): unzipstb.c # DLL version + $(CC) -c $(CFLAGS) unzipstb.c + +msdos$(OBJ): msdos/msdos.c $(UNZIP_H) version.h # DOS only + $(CC) -c $(CFLAGS) msdos$(DIRSEP)msdos.c + +msdos_$(OBJ): msdos/msdos.c $(UNZIP_H) # DOS unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ msdos$(DIRSEP)msdos.c + +win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h version.h # Win32 only + $(CC) -c $(CFLAGS) win32$(DIRSEP)win32.c + +nt$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # Win32 only + $(CC) -c $(CFLAGS) win32$(DIRSEP)nt.c + +win32_$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # Win32 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ win32$(DIRSEP)win32.c + +nt_$(OBJ): win32/nt.c $(UNZIP_H) win32/nt.h # Win32 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ win32$(DIRSEP)nt.c + +win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # Win32 funzip + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ win32$(DIRSEP)win32.c + +os2$(OBJ): os2/os2.c $(UNZIP_H) version.h # OS/2 only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)os2.c + +os2_$(OBJ): os2/os2.c $(UNZIP_H) # OS/2 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2$(DIRSEP)os2.c + +os2acl$(OBJ): os2/os2acl.c $(UNZIP_H) version.h # OS/2 only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)os2acl.c + +os2acl_$(OBJ): os2/os2acl.c $(UNZIP_H) version.h # OS/2 unzipsfx + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ os2$(DIRSEP)os2acl.c + +rexxhelp$(OBJ): os2/rexxhelp.c # OS/2 DLL only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)rexxhelp.c + +rexxapi$(OBJ): os2/rexxapi.c # OS/2 DLL only + $(CC) -c $(CFLAGS) $(DLLFLAG) os2$(DIRSEP)rexxapi.c + +crc_i86$(OBJ): msdos/crc_i86.asm # 16bit only + $(AS) $(ASFLAGS) msdos$(AS_DIRSEP)crc_i86.asm $(ASEOL) + +crc_i386$(OBJ): win32/crc_i386.asm # 32bit, MASM + $(AS) $(ASFLAGS) win32$(AS_DIRSEP)crc_i386.asm $(ASEOL) + +crc_gcc$(OBJ): crc_i386.S # 32bit, GNU AS + $(AS) $(ASFLAGS) -x assembler-with-cpp -c -o $@ crc_i386.S + +# NFLAGS are solely used as work-around for optimization bug in IBM C++ Set +crypt$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h + $(CC) -c $(CFLAGS) $(DLLFLAG) $(NFLAGS) crypt.c + +cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only + $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ crypt.c + +crc32f$(OBJ): crc32.c $(UNZIP_H) zip.h # funzip only + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ crc32.c + +globalsf$(OBJ): globals.c $(UNZIP_H) # funzip only + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ globals.c + +inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only + $(CC) -c $(CFLAGS) -DFUNZIP $(OUT)$@ inflate.c + +ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only + $(CC) -c $(CFLAGS) $(NFLAGS) -DFUNZIP $(OUT)$@ ttyio.c + +crc32_$(OBJ): crc32.c $(UNZIP_H) zip.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crc32.c + +crctab_$(OBJ): crctab.c $(UNZIP_H) zip.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crctab.c + +crypt_$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ crypt.c + +extract_$(OBJ): extract.c $(UNZIP_H) crypt.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ extract.c + +fileio_$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ fileio.c + +globals_$(OBJ): globals.c $(UNZIP_H) # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ globals.c + +inflate_$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ inflate.c + +match_$(OBJ): match.c $(UNZIP_H) # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ match.c + +process_$(OBJ): process.c $(UNZIP_H) # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ process.c + +ttyio_$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ ttyio.c + +unzipsf_$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only + $(CC) -c $(CFLAGS) -DSFX $(OUT)$@ unzip.c diff --git a/utils/Install/sfxzip/match.c b/utils/Install/sfxzip/match.c new file mode 100644 index 0000000000..77355d4400 --- /dev/null +++ b/utils/Install/sfxzip/match.c @@ -0,0 +1,294 @@ +/*--------------------------------------------------------------------------- + + match.c + + The match() routine recursively compares a string to a "pattern" (regular + expression), returning TRUE if a match is found or FALSE if not. This + version is specifically for use with unzip.c: as did the previous match() + routines from SEA and J. Kercheval, it leaves the case (upper, lower, or + mixed) of the string alone, but converts any uppercase characters in the + pattern to lowercase if indicated by the global var pInfo->lcflag (which + is to say, string is assumed to have been converted to lowercase already, + if such was necessary). + + GRR: reversed order of text, pattern in matche() (now same as match()); + added ignore_case/ic flags, Case() macro. + + PaulK: replaced matche() with recmatch() from Zip, modified to have an + ignore_case argument; replaced test frame with simpler one. + + --------------------------------------------------------------------------- + + Copyright on recmatch() from Zip's util.c (although recmatch() was almost + certainly written by Mark Adler...ask me how I can tell :-) ): + + Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, Jean-loup Gailly, + Kai Uwe Rommel and Igor Mandrichenko. + + Permission is granted to any individual or institution to use, copy, + or redistribute this software so long as all of the original files are + included unmodified, that it is not sold for profit, and that this copy- + right notice is retained. + + --------------------------------------------------------------------------- + + Match the pattern (wildcard) against the string (fixed): + + match(string, pattern, ignore_case); + + returns TRUE if string matches pattern, FALSE otherwise. In the pattern: + + `*' matches any sequence of characters (zero or more) + `?' matches any single character + [SET] matches any character in the specified set, + [!SET] or [^SET] matches any character not in the specified set. + + A set is composed of characters or ranges; a range looks like ``character + hyphen character'' (as in 0-9 or A-Z). [0-9a-zA-Z_] is the minimal set of + characters allowed in the [..] pattern construct. Other characters are + allowed (i.e., 8-bit characters) if your system will support them. + + To suppress the special syntactic significance of any of ``[]*?!^-\'', in- + side or outside a [..] construct, and match the character exactly, precede + it with a ``\'' (backslash). + + Note that "*.*" and "*." are treated specially under MS-DOS if DOSWILD is + defined. See the DOSWILD section below for an explanation. Note also + that with VMSWILD defined, '%' is used instead of '?', and sets (ranges) + are delimited by () instead of []. + + ---------------------------------------------------------------------------*/ + + + +/* define ToLower() in here (for Unix, define ToLower to be macro (using + * isupper()); otherwise just use tolower() */ +#define UNZIP_INTERNAL +#include "unzip.h" + +#if 0 /* this is not useful until it matches Amiga names insensitively */ +#ifdef AMIGA /* some other platforms might also want to use this */ +# define ANSI_CHARSET /* MOVE INTO UNZIP.H EVENTUALLY */ +#endif +#endif /* 0 */ + +#ifdef ANSI_CHARSET +# ifdef ToLower +# undef ToLower +# endif + /* uppercase letters are values 41 thru 5A, C0 thru D6, and D8 thru DE */ +# define IsUpper(c) (c>=0xC0 ? c<=0xDE && c!=0xD7 : c>=0x41 && c<=0x5A) +# define ToLower(c) (IsUpper((uch) c) ? (unsigned) c | 0x20 : (unsigned) c) +#endif +#define Case(x) (ic? ToLower(x) : (x)) + +#ifdef VMSWILD +# define WILDCHAR '%' +# define BEG_RANGE '(' +# define END_RANGE ')' +#else +# define WILDCHAR '?' +# define BEG_RANGE '[' +# define END_RANGE ']' +#endif + +#if 0 /* GRR: add this to unzip.h someday... */ +#if !(defined(MSDOS) && defined(DOSWILD)) +#define match(s,p,ic) (recmatch((ZCONST uch *)p,(ZCONST uch *)s,ic) == 1) +int recmatch OF((ZCONST uch *pattern, ZCONST uch *string, int ignore_case)); +#endif +#endif /* 0 */ +static int recmatch OF((ZCONST uch *pattern, ZCONST uch *string, + int ignore_case)); + + + +/* match() is a shell to recmatch() to return only Boolean values. */ + +int match(string, pattern, ignore_case) + ZCONST char *string, *pattern; + int ignore_case; +{ +#if (defined(MSDOS) && defined(DOSWILD)) + char *dospattern; + int j = strlen(pattern); + +/*--------------------------------------------------------------------------- + Optional MS-DOS preprocessing section: compare last three chars of the + wildcard to "*.*" and translate to "*" if found; else compare the last + two characters to "*." and, if found, scan the non-wild string for dots. + If in the latter case a dot is found, return failure; else translate the + "*." to "*". In either case, continue with the normal (Unix-like) match + procedure after translation. (If not enough memory, default to normal + match.) This causes "a*.*" and "a*." to behave as MS-DOS users expect. + ---------------------------------------------------------------------------*/ + + if ((dospattern = (char *)malloc(j+1)) != NULL) { + strcpy(dospattern, pattern); + if (!strcmp(dospattern+j-3, "*.*")) { + dospattern[j-2] = '\0'; /* nuke the ".*" */ + } else if (!strcmp(dospattern+j-2, "*.")) { + char *p = strchr(string, '.'); + + if (p) { /* found a dot: match fails */ + free(dospattern); + return 0; + } + dospattern[j-1] = '\0'; /* nuke the end "." */ + } + j = recmatch((uch *)dospattern, (uch *)string, ignore_case); + free(dospattern); + return j == 1; + } else +#endif /* MSDOS && DOSWILD */ + return recmatch((uch *)pattern, (uch *)string, ignore_case) == 1; +} + + + +static int recmatch(p, s, ic) + ZCONST uch *p; /* sh pattern to match */ + ZCONST uch *s; /* string to which to match it */ + int ic; /* true for case insensitivity */ +/* Recursively compare the sh pattern p with the string s and return 1 if + * they match, and 0 or 2 if they don't or if there is a syntax error in the + * pattern. This routine recurses on itself no more deeply than the number + * of characters in the pattern. */ +{ + unsigned int c; /* pattern char or start of range in [-] loop */ + + /* Get first character, the pattern for new recmatch calls follows */ + c = *p++; + + /* If that was the end of the pattern, match if string empty too */ + if (c == 0) + return *s == 0; + + /* '?' (or '%') matches any character (but not an empty string) */ + if (c == WILDCHAR) + return *s ? recmatch(p, s + 1, ic) : 0; + + /* '*' matches any number of characters, including zero */ +#ifdef AMIGA + if (c == '#' && *p == '?') /* "#?" is Amiga-ese for "*" */ + c = '*', p++; +#endif /* AMIGA */ + if (c == '*') { + if (*p == 0) + return 1; + for (; *s; s++) + if ((c = recmatch(p, s, ic)) != 0) + return (int)c; + return 2; /* 2 means give up--match will return false */ + } + + /* Parse and process the list of characters and ranges in brackets */ + if (c == BEG_RANGE) { + int e; /* flag true if next char to be taken literally */ + ZCONST uch *q; /* pointer to end of [-] group */ + int r; /* flag true to match anything but the range */ + + if (*s == 0) /* need a character to match */ + return 0; + p += (r = (*p == '!' || *p == '^')); /* see if reverse */ + for (q = p, e = 0; *q; q++) /* find closing bracket */ + if (e) + e = 0; + else + if (*q == '\\') /* GRR: change to ^ for MS-DOS, OS/2? */ + e = 1; + else if (*q == END_RANGE) + break; + if (*q != END_RANGE) /* nothing matches if bad syntax */ + return 0; + for (c = 0, e = *p == '-'; p < q; p++) { /* go through the list */ + if (e == 0 && *p == '\\') /* set escape flag if \ */ + e = 1; + else if (e == 0 && *p == '-') /* set start of range if - */ + c = *(p-1); + else { + unsigned int cc = Case(*s); + + if (*(p+1) != '-') + for (c = c ? c : *p; c <= *p; c++) /* compare range */ + if ((unsigned)Case(c) == cc) /* typecast for MSC bug */ + return r ? 0 : recmatch(q + 1, s + 1, ic); + c = e = 0; /* clear range, escape flags */ + } + } + return r ? recmatch(q + 1, s + 1, ic) : 0; /* bracket match failed */ + } + + /* if escape ('\'), just compare next character */ + if (c == '\\' && (c = *p++) == 0) /* if \ at end, then syntax error */ + return 0; + + /* just a character--compare it */ +#ifdef QDOS + return QMatch(Case((uch)c), Case(*s)) ? recmatch(p, ++s, ic) : 0; +#else + return Case((uch)c) == Case(*s) ? recmatch(p, ++s, ic) : 0; +#endif + +} /* end function recmatch() */ + + + + + +int iswild(p) /* originally only used for stat()-bug workaround in */ + ZCONST char *p; /* VAX C, Turbo/Borland C, Watcom C, Atari MiNT libs; */ +{ /* now used in process_zipfiles() as well */ + for (; *p; ++p) + if (*p == '\\' && *(p+1)) + ++p; +#ifdef VMS + else if (*p == '%' || *p == '*') +#else /* !VMS */ +#ifdef AMIGA + else if (*p == '?' || *p == '*' || (*p=='#' && p[1]=='?') || *p == '[') +#else /* !AMIGA */ + else if (*p == '?' || *p == '*' || *p == '[') +#endif /* ?AMIGA */ +#endif /* ?VMS */ +#ifdef QDOS + return (int)p; +#else + return TRUE; +#endif + + return FALSE; + +} /* end function iswild() */ + + + + + +#ifdef TEST_MATCH + +#define put(s) {fputs(s,stdout); fflush(stdout);} + +void main() +{ + char pat[256], str[256]; + + for (;;) { + put("Pattern (return to exit): "); + gets(pat); + if (!pat[0]) + break; + for (;;) { + put("String (return for new pattern): "); + gets(str); + if (!str[0]) + break; + pipeit("Case sensitive: %s insensitive: %s\n", + match(str, pat, 0) ? "YES" : "NO", + match(str, pat, 1) ? "YES" : "NO"); + } + } + EXIT(0); +} + +#endif /* TEST_MATCH */ diff --git a/utils/Install/sfxzip/nt.c b/utils/Install/sfxzip/nt.c new file mode 100644 index 0000000000..ab4cea3a9f --- /dev/null +++ b/utils/Install/sfxzip/nt.c @@ -0,0 +1,659 @@ +/* + + Copyright (c) 1996 Scott Field + + Module Name: + + nt.c + + Abstract: + + This module implements WinNT security descriptor operations for the + Win32 Info-ZIP project. Operation such as setting file security, + using/querying local and remote privileges, and queuing of operations + is performed here. The contents of this module are only relevant + when the code is running on Windows NT, and the target volume supports + persistent Acl storage. + + User privileges that allow accessing certain privileged aspects of the + security descriptor (such as the Sacl) are only used if the user specified + to do so. + + Author: + + Scott Field (sfield@microsoft.com) + + Last revised: 18 Jan 97 + + */ + +#define WIN32_LEAN_AND_MEAN +#define UNZIP_INTERNAL +#include "unzip.h" +#include +#ifdef __RSXNT__ +# include "rsxntwin.h" +#endif +#include "nt.h" + + +#ifdef NTSD_EAS /* This file is only needed for NTSD handling */ + +/* Borland C++ does not define FILE_SHARE_DELETE. Others also? */ +#ifndef FILE_SHARE_DELETE +# define FILE_SHARE_DELETE 0x00000004 +#endif + + +/* private prototypes */ + +static BOOL Initialize(VOID); +#if 0 /* currently unused */ +static BOOL Shutdown(VOID); +#endif +static BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer); +static VOID GetRemotePrivilegesSet(CHAR *FileName, PDWORD dwRemotePrivileges); +static VOID InitLocalPrivileges(VOID); + + +BOOL bInitialized = FALSE; /* module level stuff initialized? */ +HANDLE hInitMutex = NULL; /* prevent multiple initialization */ + +BOOL g_bRestorePrivilege = FALSE; /* for local set file security override */ +BOOL g_bSaclPrivilege = FALSE; /* for local set sacl operations, only when + restore privilege not present */ + +/* our single cached volume capabilities structure that describes the last + volume root we encountered. A single entry like this works well in the + zip/unzip scenario for a number of reasons: + 1. typically one extraction path during unzip. + 2. typically process one volume at a time during zip, and then move + on to the next. + 3. no cleanup code required and no memory leaks. + 4. simple code. + + This approach should be reworked to a linked list approach if we expect to + be called by many threads which are processing a variety of input/output + volumes, since lock contention and stale data may become a bottleneck. */ + +VOLUMECAPS g_VolumeCaps; +CRITICAL_SECTION VolumeCapsLock; + + +/* our deferred set structure linked list element, used for making a copy + of input data which is used at a later time to process the original input + at a time when it makes more sense. eg, applying security to newly created + directories, after all files have been placed in such directories. */ + +CRITICAL_SECTION SetDeferLock; + +typedef struct _DEFERRED_SET { + struct _DEFERRED_SET *Next; + uch *buffer; /* must point to DWORD aligned block */ + PVOLUMECAPS VolumeCaps; + char *resource; +} DEFERRED_SET, *PDEFERRED_SET, *LPDEFERRED_SET; + +PDEFERRED_SET pSetHead = NULL; +PDEFERRED_SET pSetTail; + +static BOOL Initialize(VOID) +{ + HANDLE hMutex; + HANDLE hOldMutex; + + if(bInitialized) return TRUE; + + hMutex = CreateMutex(NULL, TRUE, NULL); + if(hMutex == NULL) return FALSE; + + hOldMutex = (HANDLE)InterlockedExchange((LPLONG)&hInitMutex, (LONG)hMutex); + + if(hOldMutex != NULL) { + /* somebody setup the mutex already */ + InterlockedExchange((LPLONG)&hInitMutex, (LONG)hOldMutex); + + CloseHandle(hMutex); /* close new, un-needed mutex */ + + /* wait for initialization to complete and return status */ + WaitForSingleObject(hOldMutex, INFINITE); + ReleaseMutex(hOldMutex); + + return bInitialized; + } + + /* initialize module level resources */ + + InitializeCriticalSection( &SetDeferLock ); + + InitializeCriticalSection( &VolumeCapsLock ); + memset(&g_VolumeCaps, 0, sizeof(VOLUMECAPS)); + + InitLocalPrivileges(); + + bInitialized = TRUE; + + ReleaseMutex(hMutex); /* release correct mutex */ + + return TRUE; +} + +#if 0 /* currently not used ! */ +static BOOL Shutdown(VOID) +{ + /* really need to free critical sections, disable enabled privilges, etc, + but doing so brings up possibility of race conditions if those resources + are about to be used. The easiest way to handle this is let these + resources be freed when the process terminates... */ + + return TRUE; +} +#endif /* never */ + + +static BOOL DeferSet(char *resource, PVOLUMECAPS VolumeCaps, uch *buffer) +{ + PDEFERRED_SET psd; + DWORD cbDeferSet; + DWORD cbResource; + DWORD cbBuffer; + + if(!bInitialized) if(!Initialize()) return FALSE; + + cbResource = lstrlenA(resource) + 1; + cbBuffer = GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)buffer); + cbDeferSet = sizeof(DEFERRED_SET) + cbBuffer + sizeof(VOLUMECAPS) + + cbResource; + + psd = (PDEFERRED_SET)HeapAlloc(GetProcessHeap(), 0, cbDeferSet); + if(psd == NULL) return FALSE; + + psd->Next = NULL; + psd->buffer = (uch *)(psd+1); + psd->VolumeCaps = (PVOLUMECAPS)((char *)psd->buffer + cbBuffer); + psd->resource = (char *)((char *)psd->VolumeCaps + sizeof(VOLUMECAPS)); + + memcpy(psd->buffer, buffer, cbBuffer); + memcpy(psd->VolumeCaps, VolumeCaps, sizeof(VOLUMECAPS)); + psd->VolumeCaps->bProcessDefer = TRUE; + memcpy(psd->resource, resource, cbResource); + + /* take defer lock */ + EnterCriticalSection( &SetDeferLock ); + + /* add element at tail of list */ + + if(pSetHead == NULL) { + pSetHead = psd; + } else { + pSetTail->Next = psd; + } + + pSetTail = psd; + + /* release defer lock */ + LeaveCriticalSection( &SetDeferLock ); + + return TRUE; +} + +BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed, + PDWORD dwDirectoryFail, PDWORD dwBytesFail) +{ + PDEFERRED_SET This; + PDEFERRED_SET Next; + + *dwDirectoryCount = 0; + *dwBytesProcessed = 0; + + *dwDirectoryFail = 0; + *dwBytesFail = 0; + + if(!bInitialized) return TRUE; /* nothing to do */ + + EnterCriticalSection( &SetDeferLock ); + + This = pSetHead; + + while(This) { + + if(SecuritySet(This->resource, This->VolumeCaps, This->buffer)) { + (*dwDirectoryCount)++; + *dwBytesProcessed += + GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer); + } else { + (*dwDirectoryFail)++; + *dwBytesFail += + GetSecurityDescriptorLength((PSECURITY_DESCRIPTOR)This->buffer); + } + + Next = This->Next; + HeapFree(GetProcessHeap(), 0, This); + This = Next; + } + + pSetHead = NULL; + + LeaveCriticalSection( &SetDeferLock ); + + return TRUE; +} + +BOOL ValidateSecurity(uch *securitydata) +{ + PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)securitydata; + PACL pAcl; + PSID pSid; + BOOL bAclPresent; + BOOL bDefaulted; + + if(!IsWinNT()) return TRUE; /* don't do anything if not on WinNT */ + + if(!IsValidSecurityDescriptor(sd)) return FALSE; + + /* verify Dacl integrity */ + + if(!GetSecurityDescriptorDacl(sd, &bAclPresent, &pAcl, &bDefaulted)) + return FALSE; + + if(bAclPresent) { + if(!IsValidAcl(pAcl)) return FALSE; + } + + /* verify Sacl integrity */ + + if(!GetSecurityDescriptorSacl(sd, &bAclPresent, &pAcl, &bDefaulted)) + return FALSE; + + if(bAclPresent) { + if(!IsValidAcl(pAcl)) return FALSE; + } + + /* verify owner integrity */ + + if(!GetSecurityDescriptorOwner(sd, &pSid, &bDefaulted)) + return FALSE; + + if(pSid != NULL) { + if(!IsValidSid(pSid)) return FALSE; + } + + /* verify group integrity */ + + if(!GetSecurityDescriptorGroup(sd, &pSid, &bDefaulted)) + return FALSE; + + if(pSid != NULL) { + if(!IsValidSid(pSid)) return FALSE; + } + + return TRUE; +} + +static VOID GetRemotePrivilegesSet(char *FileName, PDWORD dwRemotePrivileges) +{ + HANDLE hFile; + + *dwRemotePrivileges = 0; + + /* see if we have the SeRestorePrivilege */ + + hFile = CreateFileA( + FileName, + ACCESS_SYSTEM_SECURITY | WRITE_DAC | WRITE_OWNER | READ_CONTROL, + FILE_SHARE_READ | FILE_SHARE_DELETE, /* no sd updating allowed here */ + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + NULL + ); + + if(hFile != INVALID_HANDLE_VALUE) { + /* no remote way to determine SeRestorePrivilege -- just try a + read/write to simulate it */ + SECURITY_INFORMATION si = DACL_SECURITY_INFORMATION | + SACL_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION; + PSECURITY_DESCRIPTOR sd; + DWORD cbBuf = 0; + + GetKernelObjectSecurity(hFile, si, NULL, cbBuf, &cbBuf); + + if(ERROR_INSUFFICIENT_BUFFER == GetLastError()) { + if((sd = HeapAlloc(GetProcessHeap(), 0, cbBuf)) != NULL) { + if(GetKernelObjectSecurity(hFile, si, sd, cbBuf, &cbBuf)) { + if(SetKernelObjectSecurity(hFile, si, sd)) + *dwRemotePrivileges |= OVERRIDE_RESTORE; + } + HeapFree(GetProcessHeap(), 0, sd); + } + } + + CloseHandle(hFile); + } else { + + /* see if we have the SeSecurityPrivilege */ + /* note we don't need this if we have SeRestorePrivilege */ + + hFile = CreateFileA( + FileName, + ACCESS_SYSTEM_SECURITY, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, /* max */ + NULL, + OPEN_EXISTING, + 0, + NULL + ); + + if(hFile != INVALID_HANDLE_VALUE) { + CloseHandle(hFile); + *dwRemotePrivileges |= OVERRIDE_SACL; + } + } +} + + +BOOL GetVolumeCaps( + char *rootpath, /* filepath, or NULL */ + char *name, /* filename associated with rootpath */ + PVOLUMECAPS VolumeCaps /* result structure describing capabilities */ + ) +{ + char TempRootPath[MAX_PATH + 1]; + DWORD cchTempRootPath = 0; + BOOL bSuccess = TRUE; /* assume success until told otherwise */ + + if(!bInitialized) if(!Initialize()) return FALSE; + + /* process the input path to produce a consistent path suitable for + compare operations and also suitable for certain picky Win32 API + that don't like forward slashes */ + + if(rootpath != NULL && rootpath[0] != '\0') { + DWORD i; + + cchTempRootPath = lstrlen(rootpath); + if(cchTempRootPath > MAX_PATH) return FALSE; + + /* copy input, converting forward slashes to back slashes as we go */ + + for(i = 0 ; i <= cchTempRootPath ; i++) { + if(rootpath[i] == '/') TempRootPath[i] = '\\'; + else TempRootPath[i] = rootpath[i]; + } + + /* check for UNC and Null terminate or append trailing \ as + appropriate */ + + /* possible valid UNCs we are passed follow: + \\machine\foo\bar (path is \\machine\foo\) + \\machine\foo (path is \\machine\foo\) + \\machine\foo\ + \\.\c$\ (FIXFIX: Win32API doesn't like this - GetComputerName()) + LATERLATER: handling mounted DFS drives in the future will require + slightly different logic which isn't available today. + This is required because directories can point at + different servers which have differing capabilities. + */ + + if(TempRootPath[0] == '\\' && TempRootPath[1] == '\\') { + DWORD slash = 0; + + for(i = 2 ; i < cchTempRootPath ; i++) { + if(TempRootPath[i] == '\\') { + slash++; + + if(slash == 2) { + i++; + TempRootPath[i] = '\0'; + cchTempRootPath = i; + break; + } + } + } + + /* if there was only one slash found, just tack another onto the + end */ + + if(slash == 1 && TempRootPath[cchTempRootPath] != '\\') { + TempRootPath[cchTempRootPath] = TempRootPath[0]; /* '\' */ + TempRootPath[cchTempRootPath+1] = '\0'; + cchTempRootPath++; + } + + } else { + + if(TempRootPath[1] == ':') { + + /* drive letter specified, truncate to root */ + TempRootPath[2] = '\\'; + TempRootPath[3] = '\0'; + cchTempRootPath = 3; + } else { + + /* must be file on current drive */ + TempRootPath[0] = '\0'; + cchTempRootPath = 0; + } + + } + + } /* if path != NULL */ + + /* grab lock protecting cached entry */ + EnterCriticalSection( &VolumeCapsLock ); + + if(!g_VolumeCaps.bValid || + lstrcmpi(g_VolumeCaps.RootPath, TempRootPath) != 0) + { + + /* no match found, build up new entry */ + + DWORD dwFileSystemFlags; + DWORD dwRemotePrivileges = 0; + BOOL bRemote = FALSE; + + /* release lock during expensive operations */ + LeaveCriticalSection( &VolumeCapsLock ); + + bSuccess = GetVolumeInformation( + (TempRootPath[0] == '\0') ? NULL : TempRootPath, + NULL, 0, + NULL, NULL, + &dwFileSystemFlags, + NULL, 0); + + + /* only if target volume supports Acls, and we were told to use + privileges do we need to go out and test for the remote case */ + + if(bSuccess && (dwFileSystemFlags & FS_PERSISTENT_ACLS) && + VolumeCaps->bUsePrivileges) + { + if(GetDriveType( (TempRootPath[0] == '\0') ? NULL : TempRootPath ) + == DRIVE_REMOTE) + { + bRemote = TRUE; + + /* make a determination about our remote capabilities */ + + GetRemotePrivilegesSet(name, &dwRemotePrivileges); + } + } + + /* always take the lock again, since we release it below */ + EnterCriticalSection( &VolumeCapsLock ); + + /* replace the existing data if successful */ + if(bSuccess) { + + lstrcpynA(g_VolumeCaps.RootPath, TempRootPath, cchTempRootPath+1); + g_VolumeCaps.bProcessDefer = FALSE; + g_VolumeCaps.dwFileSystemFlags = dwFileSystemFlags; + g_VolumeCaps.bRemote = bRemote; + g_VolumeCaps.dwRemotePrivileges = dwRemotePrivileges; + g_VolumeCaps.bValid = TRUE; + } + } + + if(bSuccess) { + /* copy input elements */ + g_VolumeCaps.bUsePrivileges = VolumeCaps->bUsePrivileges; + g_VolumeCaps.dwFileAttributes = VolumeCaps->dwFileAttributes; + + /* give caller results */ + memcpy(VolumeCaps, &g_VolumeCaps, sizeof(VOLUMECAPS)); + } else { + g_VolumeCaps.bValid = FALSE; + } + + LeaveCriticalSection( &VolumeCapsLock ); /* release lock */ + + return bSuccess; +} + + +BOOL SecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata) +{ + HANDLE hFile; + DWORD dwDesiredAccess = 0; + DWORD dwFlags = 0; + PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR)securitydata; + SECURITY_DESCRIPTOR_CONTROL sdc; + SECURITY_INFORMATION RequestedInfo = 0; + DWORD dwRev; + BOOL bRestorePrivilege = FALSE; + BOOL bSaclPrivilege = FALSE; + BOOL bSuccess; + + if(!bInitialized) if(!Initialize()) return FALSE; + + /* defer directory processing */ + + if(VolumeCaps->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + if(!VolumeCaps->bProcessDefer) { + return DeferSet(resource, VolumeCaps, securitydata); + } else { + /* opening a directory requires FILE_FLAG_BACKUP_SEMANTICS */ + dwFlags |= FILE_FLAG_BACKUP_SEMANTICS; + } + } + + /* evaluate the input security desriptor and act accordingly */ + + if(!IsValidSecurityDescriptor(sd)) + return FALSE; + + if(!GetSecurityDescriptorControl(sd, &sdc, &dwRev)) + return FALSE; + + /* setup privilege usage based on if told we can use privileges, and if so, + what privileges we have */ + + if(VolumeCaps->bUsePrivileges) { + if(VolumeCaps->bRemote) { + /* use remotely determined privileges */ + if(VolumeCaps->dwRemotePrivileges & OVERRIDE_RESTORE) + bRestorePrivilege = TRUE; + + if(VolumeCaps->dwRemotePrivileges & OVERRIDE_SACL) + bSaclPrivilege = TRUE; + + } else { + /* use local privileges */ + bRestorePrivilege = g_bRestorePrivilege; + bSaclPrivilege = g_bSaclPrivilege; + } + } + + + /* if a Dacl is present write Dacl out */ + /* if we have SeRestorePrivilege, write owner and group info out */ + + if(sdc & SE_DACL_PRESENT) { + dwDesiredAccess |= WRITE_DAC; + RequestedInfo |= DACL_SECURITY_INFORMATION; + + if(bRestorePrivilege) { + dwDesiredAccess |= WRITE_OWNER; + RequestedInfo |= (OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION); + } + } + + /* if a Sacl is present and we have either SeRestorePrivilege or + SeSystemSecurityPrivilege try to write Sacl out */ + + if((sdc & SE_SACL_PRESENT) && (bRestorePrivilege || bSaclPrivilege)) { + dwDesiredAccess |= ACCESS_SYSTEM_SECURITY; + RequestedInfo |= SACL_SECURITY_INFORMATION; + } + + if(RequestedInfo == 0) /* nothing to do */ + return FALSE; + + if(bRestorePrivilege) + dwFlags |= FILE_FLAG_BACKUP_SEMANTICS; + + hFile = CreateFileA( + resource, + dwDesiredAccess, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,/* max sharing */ + NULL, + OPEN_EXISTING, + dwFlags, + NULL + ); + + if(hFile == INVALID_HANDLE_VALUE) + return FALSE; + + bSuccess = SetKernelObjectSecurity(hFile, RequestedInfo, sd); + + CloseHandle(hFile); + + return bSuccess; +} + +static VOID InitLocalPrivileges(VOID) +{ + HANDLE hToken; + TOKEN_PRIVILEGES tp; + + /* try to enable some interesting privileges that give us the ability + to get some security information that we normally cannot. + + note that enabling privileges is only relevant on the local machine; + when accessing files that are on a remote machine, any privileges + that are present on the remote machine get enabled by default. */ + + if(!OpenProcessToken(GetCurrentProcess(), + TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, &hToken)) + return; + + tp.PrivilegeCount = 1; + tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + + if(LookupPrivilegeValue(NULL, SE_RESTORE_NAME, &tp.Privileges[0].Luid)) { + + /* try to enable SeRestorePrivilege; if this succeeds, we can write + all aspects of the security descriptor */ + + if(AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) && + GetLastError() == ERROR_SUCCESS) g_bRestorePrivilege = TRUE; + + } + + /* try to enable SeSystemSecurityPrivilege, if SeRestorePrivilege not + present; if this succeeds, we can write the Sacl */ + + if(!g_bRestorePrivilege && + LookupPrivilegeValue(NULL, SE_SECURITY_NAME, &tp.Privileges[0].Luid)) { + + if(AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) && + GetLastError() == ERROR_SUCCESS) g_bSaclPrivilege = TRUE; + } + + CloseHandle(hToken); +} +#endif /* NTSD_EAS */ diff --git a/utils/Install/sfxzip/os2.c b/utils/Install/sfxzip/os2.c new file mode 100644 index 0000000000..a9a962796c --- /dev/null +++ b/utils/Install/sfxzip/os2.c @@ -0,0 +1,2187 @@ +/*--------------------------------------------------------------------------- + + os2.c + + OS/2-specific routines for use with Info-ZIP's UnZip 5.1 and later. + + This file contains the OS/2 versions of the file name/attribute/time/etc + code. Most or all of the routines which make direct use of OS/2 system + calls (i.e., the non-lowercase routines) are Kai Uwe Rommel's. The read- + dir() suite was written by Michael Rendell and ported to OS/2 by Kai Uwe; + it is in the public domain. + + Contains: GetCountryInfo() + GetFileTime() + SetFileTime() (TIMESTAMP only) + stamp_file() (TIMESTAMP only) + Utime2DosDateTime() + SetPathAttrTimes() + SetEAs() + GetLoadPath() + opendir() + closedir() + readdir() + [ seekdir() ] not used + [ telldir() ] not used + free_dircontents() + getdirent() + IsFileSystemFAT() + do_wild() + mapattr() + mapname() + checkdir() + isfloppy() + IsFileNameValid() + map2fat() + SetLongNameEA() + close_outfile() + check_for_newer() + dateformat() + version() + InitNLS() + IsUpperNLS() + ToLowerNLS() + StringLower() + DebugMalloc() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#include "os2acl.h" + +extern ZCONST char Far TruncEAs[]; + +/* local prototypes */ + +#ifdef TIMESTAMP + static int SetFileTime(ZCONST char *name, ulg stamp); +#endif +#if defined(USE_EF_UT_TIME) || defined(TIMESTAMP) + static ulg Utime2DosDateTime OF((time_t uxtime)); +#endif +static int getOS2filetimes OF((__GPRO__ + ulg *pM_dt, ulg *pA_dt, ulg *pC_dt)); +static void SetPathAttrTimes OF((__GPRO__ int flags, int dir)); +static int SetEAs OF((__GPRO__ const char *path, + void *ef_block)); +static int SetACL OF((__GPRO__ const char *path, + void *ef_block)); +static int EvalExtraFields OF((__GPRO__ const char *path, + void *extra_field, unsigned ef_len)); +static int isfloppy OF((int nDrive)); +static int IsFileNameValid OF((const char *name)); +static void map2fat OF((char *pathcomp, char **pEndFAT)); +static int SetLongNameEA OF((char *name, char *longname)); +static void InitNLS OF((void)); + + +/*****************************/ +/* Strings used in os2.c */ +/*****************************/ + +#ifndef SFX + static char Far CantAllocateWildcard[] = + "warning: cannot allocate wildcard buffers\n"; +#endif +static char Far Creating[] = " creating: %-22s "; +static char Far ConversionFailed[] = "mapname: conversion of %s failed\n"; +static char Far Labelling[] = "labelling %c: %-22s\n"; +static char Far ErrSetVolLabel[] = "mapname: error setting volume label\n"; +static char Far PathTooLong[] = "checkdir error: path too long: %s\n"; +static char Far CantCreateDir[] = "checkdir error: cannot create %s\n\ + unable to process %s.\n"; +static char Far DirIsntDirectory[] = + "checkdir error: %s exists but is not directory\n\ + unable to process %s.\n"; +static char Far PathTooLongTrunc[] = + "checkdir warning: path too long; truncating\n %s\n\ + -> %s\n"; +#if (!defined(SFX) || defined(SFX_EXDIR)) + static char Far CantCreateExtractDir[] = + "checkdir: cannot create extraction directory: %s\n"; +#endif + +#ifndef __EMX__ +# if (_MSC_VER >= 600) || defined(__IBMC__) +# include /* have special MSC/IBM C mkdir prototype */ +# else /* own prototype because dir.h conflicts? */ + int mkdir(const char *path); +# endif +# define MKDIR(path,mode) mkdir(path) +#else +# define MKDIR(path,mode) mkdir(path,mode) +#endif + + +#ifdef __32BIT__ + +USHORT DosDevIOCtl32(PVOID pData, USHORT cbData, PVOID pParms, USHORT cbParms, + USHORT usFunction, USHORT usCategory, HFILE hDevice) +{ + ULONG ulParmLengthInOut = cbParms, ulDataLengthInOut = cbData; + return (USHORT) DosDevIOCtl(hDevice, usCategory, usFunction, + pParms, cbParms, &ulParmLengthInOut, + pData, cbData, &ulDataLengthInOut); +} + +# define DosDevIOCtl DosDevIOCtl32 +#else +# define DosDevIOCtl DosDevIOCtl2 +#endif + + +typedef struct +{ + ush nID; + ush nSize; + ulg lSize; +} +EFHEADER, *PEFHEADER; + + +#ifdef __32BIT__ + +#define DosFindFirst(p1, p2, p3, p4, p5, p6) \ + DosFindFirst(p1, p2, p3, p4, p5, p6, 1) + +#else + +typedef struct +{ + ULONG oNextEntryOffset; + BYTE fEA; + BYTE cbName; + USHORT cbValue; + CHAR szName[1]; +} +FEA2, *PFEA2; + +typedef struct +{ + ULONG cbList; + FEA2 list[1]; +} +FEA2LIST, *PFEA2LIST; + +#define DosQueryCurrentDisk DosQCurDisk +#define DosQueryFSAttach(p1, p2, p3, p4, p5) \ + DosQFSAttach(p1, p2, p3, p4, p5, 0) +#define DosEnumAttribute(p1, p2, p3, p4, p5, p6, p7) \ + DosEnumAttribute(p1, p2, p3, p4, p5, p6, p7, 0) +#define DosFindFirst(p1, p2, p3, p4, p5, p6) \ + DosFindFirst(p1, p2, p3, p4, p5, p6, 0) +#define DosMapCase DosCaseMap +#define DosSetPathInfo(p1, p2, p3, p4, p5) \ + DosSetPathInfo(p1, p2, p3, p4, p5, 0) +#define DosQueryPathInfo(p1, p2, p3, p4) \ + DosQPathInfo(p1, p2, p3, p4, 0) +#define DosQueryFileInfo DosQFileInfo +#define DosMapCase DosCaseMap +#define DosQueryCtryInfo DosGetCtryInfo + +#endif /* !__32BIT__ */ + + + + + +/* + * @(#) dir.h 1.4 87/11/06 Public Domain. + */ + +#define A_RONLY 0x01 +#define A_HIDDEN 0x02 +#define A_SYSTEM 0x04 +#define A_LABEL 0x08 +#define A_DIR 0x10 +#define A_ARCHIVE 0x20 + + +const int attributes = A_DIR | A_HIDDEN | A_SYSTEM; + + +extern DIR *opendir(__GPRO__ ZCONST char *); +extern struct direct *readdir(__GPRO__ DIR *); +extern void seekdir(DIR *, long); +extern long telldir(DIR *); +extern void closedir(DIR *); +#define rewinddir(dirp) seekdir(dirp, 0L) + +int IsFileSystemFAT(__GPRO__ ZCONST char *dir); +char *StringLower(char *szArg); + + + + +/* + * @(#)dir.c 1.4 87/11/06 Public Domain. + */ + + +#ifndef S_IFMT +# define S_IFMT 0xF000 +#endif + + +#ifndef SFX + static char *getdirent(__GPRO__ ZCONST char *); + static void free_dircontents(struct _dircontents *); +#endif /* !SFX */ + + + + +int GetCountryInfo(void) +{ + COUNTRYINFO ctryi; + COUNTRYCODE ctryc; +#ifdef __32BIT__ + ULONG cbInfo; +#else + USHORT cbInfo; +#endif + + ctryc.country = ctryc.codepage = 0; + + if ( DosQueryCtryInfo(sizeof(ctryi), &ctryc, &ctryi, &cbInfo) != NO_ERROR ) + return 0; + + return ctryi.fsDateFmt; +} + + +long GetFileTime(ZCONST char *name) +{ +#ifdef __32BIT__ + FILESTATUS3 fs; +#else + FILESTATUS fs; +#endif + USHORT nDate, nTime; + + if ( DosQueryPathInfo((PSZ) name, 1, (PBYTE) &fs, sizeof(fs)) ) + return -1; + + nDate = * (USHORT *) &fs.fdateLastWrite; + nTime = * (USHORT *) &fs.ftimeLastWrite; + + return ((ULONG) nDate) << 16 | nTime; +} + + +#ifdef TIMESTAMP + +static int SetFileTime(ZCONST char *name, ulg stamp) /* swiped from Zip */ +{ + FILESTATUS fs; + USHORT fd, ft; + + if (DosQueryPathInfo((PSZ) name, FIL_STANDARD, (PBYTE) &fs, sizeof(fs))) + return -1; + + fd = (USHORT) (stamp >> 16); + ft = (USHORT) stamp; + fs.fdateLastWrite = fs.fdateCreation = * (FDATE *) &fd; + fs.ftimeLastWrite = fs.ftimeCreation = * (FTIME *) &ft; + + if (DosSetPathInfo((PSZ) name, FIL_STANDARD, (PBYTE) &fs, sizeof(fs), 0)) + return -1; + + return 0; +} + + +int stamp_file(ZCONST char *fname, time_t modtime) +{ + return SetFileTime(fname, Utime2DosDateTime(modtime)); +} + +#endif /* TIMESTAMP */ + + +/* The following DOS date/time structures are machine-dependent as they + * assume "little-endian" byte order. For OS/2-specific code, which + * is run on x86 CPUs (or emulators?), this assumption is valid; but + * care should be taken when using this code as template for other ports. + */ +typedef union { + ULONG timevalue; /* combined value, useful for comparisons */ + struct { + FTIME ft; /* system file time record: + * USHORT twosecs : 5 + * USHORT minutes : 6; + * USHORT hours : 5; */ + FDATE fd; /* system file date record: + * USHORT day : 5 + * USHORT month : 4; + * USHORT year : 7; */ + } _fdt; +} F_DATE_TIME, *PF_DATE_TIME; + + +#if defined(USE_EF_UT_TIME) || defined(TIMESTAMP) + +static ulg Utime2DosDateTime(uxtime) + time_t uxtime; +{ + F_DATE_TIME dosfiletime; + struct tm *t; + + /* round up to even seconds */ + /* round up (down if "up" overflows) to even seconds */ + if (((ulg)uxtime) & 1) + uxtime = (uxtime + 1 > uxtime) ? uxtime + 1 : uxtime - 1; + + t = localtime(&(uxtime)); + if (t == (struct tm *)NULL) { + /* time conversion error; use current time instead, hoping + that localtime() does not reject it as well! */ + time_t now = time(NULL); + t = localtime(&now); + } + if (t->tm_year < 80) { + dosfiletime._fdt.ft.twosecs = 0; + dosfiletime._fdt.ft.minutes = 0; + dosfiletime._fdt.ft.hours = 0; + dosfiletime._fdt.fd.day = 1; + dosfiletime._fdt.fd.month = 1; + dosfiletime._fdt.fd.year = 0; + } else { + dosfiletime._fdt.ft.twosecs = t->tm_sec >> 1; + dosfiletime._fdt.ft.minutes = t->tm_min; + dosfiletime._fdt.ft.hours = t->tm_hour; + dosfiletime._fdt.fd.day = t->tm_mday; + dosfiletime._fdt.fd.month = t->tm_mon + 1; + dosfiletime._fdt.fd.year = t->tm_year - 80; + } + return dosfiletime.timevalue; + +} /* end function Utime2DosDateTime() */ + +#endif /* USE_EF_UT_TIME || TIMESTAMP */ + + +static int getOS2filetimes(__GPRO__ ulg *pM_dt, ulg *pA_dt, ulg *pC_dt) +{ +#ifdef USE_EF_UT_TIME + unsigned eb_izux_flg; + iztimes z_utime; +#endif + + /* Copy and/or convert time and date variables, if necessary; */ + /* return a flag indicating which time stamps are available. */ +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + ((eb_izux_flg = ef_scan_for_izux(G.extra_field, + G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, + &z_utime, NULL)) & EB_UT_FL_MTIME)) + { + TTrace((stderr, "getOS2filetimes: UT e.f. modif. time = %lu\n", + z_utime.mtime)); + *pM_dt = Utime2DosDateTime(z_utime.mtime); + if (eb_izux_flg & EB_UT_FL_ATIME) { + TTrace((stderr, "getOS2filetimes: UT e.f. access time = %lu\n", + z_utime.atime)); + *pA_dt = Utime2DosDateTime(z_utime.atime); + } + if (eb_izux_flg & EB_UT_FL_CTIME) { + TTrace((stderr, "getOS2filetimes: UT e.f. creation time = %lu\n", + z_utime.ctime)); + *pC_dt = Utime2DosDateTime(z_utime.ctime); + } else { + /* no creation time value supplied, set it to modification time */ + *pC_dt = *pM_dt; + eb_izux_flg |= EB_UT_FL_CTIME; + } + return (int)eb_izux_flg; + } +#endif /* USE_EF_UT_TIME */ + *pC_dt = *pM_dt = G.lrec.last_mod_dos_datetime; + TTrace((stderr, "\ngetOS2filetimes: DOS dir modific./creation time = %lu\n", + *pM_dt)); + return (EB_UT_FL_MTIME | EB_UT_FL_CTIME); +} + + +static void SetPathAttrTimes(__GPRO__ int flags, int dir) +{ + HFILE hFile; +#ifdef __32BIT__ + ULONG nAction; +#else + USHORT nAction; +#endif + FILESTATUS fs; + USHORT nLength; + char szName[CCHMAXPATH]; + ulg Mod_dt, Acc_dt, Cre_dt; + int gotTimes; + + strcpy(szName, G.filename); + nLength = strlen(szName); + if (szName[nLength - 1] == '/') + szName[nLength - 1] = 0; + + if (dir) + { + if ( DosQueryPathInfo(szName, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)) ) + return; + } + else + { + /* for regular files, open them and operate on the file handle, to + work around certain network operating system bugs ... */ + + if ( DosOpen(szName, &hFile, &nAction, 0, 0, + OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW, + OPEN_SHARE_DENYREADWRITE | OPEN_ACCESS_READWRITE, 0) ) + return; + + if ( DosQueryFileInfo(hFile, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)) ) + return; + } + + /* set date/time stamps */ + gotTimes = getOS2filetimes(__G__ &Mod_dt, &Acc_dt, &Cre_dt); + if (gotTimes & EB_UT_FL_MTIME) { + fs.fdateLastWrite = ((F_DATE_TIME *)&Mod_dt)->_fdt.fd; + fs.ftimeLastWrite = ((F_DATE_TIME *)&Mod_dt)->_fdt.ft; + } + if (gotTimes & EB_UT_FL_ATIME) { + fs.fdateLastAccess = ((F_DATE_TIME *)&Acc_dt)->_fdt.fd; + fs.ftimeLastAccess = ((F_DATE_TIME *)&Acc_dt)->_fdt.ft; + } + if (gotTimes & EB_UT_FL_CTIME) { + fs.fdateCreation = ((F_DATE_TIME *)&Cre_dt)->_fdt.fd; + fs.ftimeCreation = ((F_DATE_TIME *)&Cre_dt)->_fdt.ft; + } + + if ( flags != -1 ) + fs.attrFile = flags; /* hidden, system, archive, read-only */ + + if (dir) + { + DosSetPathInfo(szName, FIL_STANDARD, (PBYTE) &fs, sizeof(fs), 0); + } + else + { + DosSetFileInfo(hFile, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)); + DosClose(hFile); + } +} + + +typedef struct +{ + ULONG cbList; /* length of value + 22 */ +#ifdef __32BIT__ + ULONG oNext; +#endif + BYTE fEA; /* 0 */ + BYTE cbName; /* length of ".LONGNAME" = 9 */ + USHORT cbValue; /* length of value + 4 */ + BYTE szName[10]; /* ".LONGNAME" */ + USHORT eaType; /* 0xFFFD for length-preceded ASCII */ + USHORT eaSize; /* length of value */ + BYTE szValue[CCHMAXPATH]; +} +FEALST; + + +static int SetEAs(__GPRO__ const char *path, void *ef_block) +{ /* returns almost-PK errors */ + EFHEADER *pEAblock = (PEFHEADER) ef_block; +#ifdef __32BIT__ + EAOP2 eaop; + PFEA2LIST pFEA2list; +#else + EAOP eaop; + PFEALIST pFEAlist; + PFEA pFEA; + PFEA2LIST pFEA2list; + PFEA2 pFEA2; + ULONG nLength2; +#endif + USHORT nLength; + char szName[CCHMAXPATH]; + int error; + + if ( ef_block == NULL || pEAblock -> nID != EF_OS2 ) + return PK_OK; /* not an OS/2 extra field: assume OK */ + + if ( pEAblock->nSize < 4 || (pEAblock->lSize > 0L && pEAblock->nSize <= 10) ) + return IZ_EF_TRUNC; /* no compressed data! */ + + strcpy(szName, path); + nLength = strlen(szName); + if (szName[nLength - 1] == '/') + szName[nLength - 1] = 0; + + if ( (pFEA2list = (PFEA2LIST) malloc((size_t) pEAblock -> lSize)) == NULL ) + return PK_MEM4; + + if ( (error = memextract(__G__ (uch *)pFEA2list, pEAblock->lSize, + (uch *)(pEAblock+1), (ulg)(pEAblock->nSize - 4))) != PK_OK ) + { + free(pFEA2list); + return error; + } + +#ifdef __32BIT__ + eaop.fpGEA2List = NULL; + eaop.fpFEA2List = pFEA2list; +#else + pFEAlist = (PVOID) pFEA2list; + pFEA2 = pFEA2list -> list; + pFEA = pFEAlist -> list; + + do + { + nLength2 = pFEA2 -> oNextEntryOffset; + nLength = sizeof(FEA) + pFEA2 -> cbName + 1 + pFEA2 -> cbValue; + + memcpy(pFEA, (PCH) pFEA2 + sizeof(pFEA2 -> oNextEntryOffset), nLength); + + pFEA2 = (PFEA2) ((PCH) pFEA2 + nLength2); + pFEA = (PFEA) ((PCH) pFEA + nLength); + } + while ( nLength2 != 0 ); + + pFEAlist -> cbList = (PCH) pFEA - (PCH) pFEAlist; + + eaop.fpGEAList = NULL; + eaop.fpFEAList = pFEAlist; +#endif + + eaop.oError = 0; + DosSetPathInfo(szName, FIL_QUERYEASIZE, (PBYTE) &eaop, sizeof(eaop), 0); + + if (!uO.tflag && QCOND2) + Info(slide, 0, ((char *)slide, " (%ld bytes EAs)", pFEA2list -> cbList)); + + free(pFEA2list); + return PK_COOL; +} + + +static int SetACL(__GPRO__ const char *path, void *ef_block) +{ /* returns almost-PK errors */ + EFHEADER *pACLblock = (PEFHEADER) ef_block; + char *szACL; + int error; + + if ( ef_block == NULL || pACLblock -> nID != EF_ACL ) + return PK_OK; /* not an OS/2 extra field: assume OK */ + + if (pACLblock->nSize < 4 || (pACLblock->lSize > 0L && pACLblock->nSize <= 10)) + return IZ_EF_TRUNC; /* no compressed data! */ + + if ( (szACL = malloc((size_t) pACLblock -> lSize)) == NULL ) + return PK_MEM4; + + if ( (error = memextract(__G__ (uch *)szACL, pACLblock->lSize, + (uch *)(pACLblock+1), (ulg)(pACLblock->nSize - 4))) != PK_OK ) + { + free(szACL); + return error; + } + + if (acl_set(NULL, path, szACL) == 0) + if (!uO.tflag && QCOND2) + Info(slide, 0, ((char *)slide, " (%ld bytes ACL)", strlen(szACL))); + + free(szACL); + return PK_COOL; +} + + +#ifdef SFX + +char *GetLoadPath(__GPRO) +{ +#ifdef __32BIT__ /* generic for 32-bit API */ + PTIB pptib; + PPIB pppib; + char *szPath; + + DosGetInfoBlocks(&pptib, &pppib); + szPath = pppib -> pib_pchenv; +#else /* 16-bit, note: requires large data model */ + SEL selEnv; + USHORT offCmd; + char *szPath; + + DosGetEnv(&selEnv, &offCmd); + szPath = MAKEP(selEnv, 0); +#endif + + while (*szPath) /* find end of process environment */ + szPath = strchr(szPath, 0) + 1; + + return szPath + 1; /* .exe file name follows environment */ + +} /* end function GetLoadPath() */ + + + + + +#else /* !SFX */ + +DIR *opendir(__GPRO__ const char *name) +{ + struct stat statb; + DIR *dirp; + char c; + char *s; + struct _dircontents *dp; + char nbuf[MAXPATHLEN + 1]; + int len; + + strcpy(nbuf, name); + if ((len = strlen(nbuf)) == 0) + return NULL; + + if ( ((c = nbuf[len - 1]) == '\\' || c == '/') && (len > 1) ) + { + nbuf[len - 1] = 0; + --len; + + if ( nbuf[len - 1] == ':' ) + { + strcpy(nbuf+len, "\\."); + len += 2; + } + } + else + if ( nbuf[len - 1] == ':' ) + { + strcpy(nbuf+len, "."); + ++len; + } + + /* GRR: Borland and Watcom C return non-zero on wildcards... < 0 ? */ + if (stat(nbuf, &statb) < 0 || (statb.st_mode & S_IFMT) != S_IFDIR) + { + Trace((stderr, "opendir: stat(%s) returns negative or not directory\n", + nbuf)); + return NULL; + } + + if ( (dirp = malloc(sizeof(DIR))) == NULL ) + return NULL; + + if ( nbuf[len - 1] == '.' && (len == 1 || nbuf[len - 2] != '.') ) + strcpy(nbuf+len-1, "*"); + else + if ( ((c = nbuf[len - 1]) == '\\' || c == '/') && (len == 1) ) + strcpy(nbuf+len, "*"); + else + strcpy(nbuf+len, "\\*"); + + /* len is no longer correct (but no longer needed) */ + Trace((stderr, "opendir: nbuf = [%s]\n", nbuf)); + + dirp -> dd_loc = 0; + dirp -> dd_contents = dirp -> dd_cp = NULL; + + if ((s = getdirent(__G__ nbuf)) == NULL) + return dirp; + + do + { + if (((dp = malloc(sizeof(struct _dircontents))) == NULL) || + ((dp -> _d_entry = malloc(strlen(s) + 1)) == NULL) ) + { + if (dp) + free(dp); + free_dircontents(dirp -> dd_contents); + + return NULL; + } + + if (dirp -> dd_contents) + { + dirp -> dd_cp -> _d_next = dp; + dirp -> dd_cp = dirp -> dd_cp -> _d_next; + } + else + dirp -> dd_contents = dirp -> dd_cp = dp; + + strcpy(dp -> _d_entry, s); + dp -> _d_next = NULL; + + dp -> _d_size = G.os2.find.cbFile; + dp -> _d_mode = G.os2.find.attrFile; + dp -> _d_time = *(unsigned *) &(G.os2.find.ftimeLastWrite); + dp -> _d_date = *(unsigned *) &(G.os2.find.fdateLastWrite); + } + while ((s = getdirent(__G__ NULL)) != NULL); + + dirp -> dd_cp = dirp -> dd_contents; + + return dirp; +} + + +void closedir(DIR * dirp) +{ + free_dircontents(dirp -> dd_contents); + free(dirp); +} + + +struct direct *readdir(__GPRO__ DIR * dirp) +{ + /* moved to os2data.h so it can be global */ + /* static struct direct dp; */ + + if (dirp -> dd_cp == NULL) + return NULL; + + G.os2.dp.d_namlen = G.os2.dp.d_reclen = + strlen(strcpy(G.os2.dp.d_name, dirp -> dd_cp -> _d_entry)); + + G.os2.dp.d_ino = 0; + + G.os2.dp.d_size = dirp -> dd_cp -> _d_size; + G.os2.dp.d_mode = dirp -> dd_cp -> _d_mode; + G.os2.dp.d_time = dirp -> dd_cp -> _d_time; + G.os2.dp.d_date = dirp -> dd_cp -> _d_date; + + dirp -> dd_cp = dirp -> dd_cp -> _d_next; + dirp -> dd_loc++; + + return &G.os2.dp; +} + + + +#if 0 /* not used in unzip; retained for possibly future use */ + +void seekdir(DIR * dirp, long off) +{ + long i = off; + struct _dircontents *dp; + + if (off >= 0) + { + for (dp = dirp -> dd_contents; --i >= 0 && dp; dp = dp -> _d_next); + + dirp -> dd_loc = off - (i + 1); + dirp -> dd_cp = dp; + } +} + + +long telldir(DIR * dirp) +{ + return dirp -> dd_loc; +} + +#endif /* 0 */ + + + +static void free_dircontents(struct _dircontents * dp) +{ + struct _dircontents *odp; + + while (dp) + { + if (dp -> _d_entry) + free(dp -> _d_entry); + + dp = (odp = dp) -> _d_next; + free(odp); + } +} + + +static char *getdirent(__GPRO__ ZCONST char *dir) +{ + int done; + /* moved to os2data.h so it can be global */ + /* static int lower; */ + + if (dir != NULL) + { /* get first entry */ + G.os2.hdir = HDIR_SYSTEM; + G.os2.count = 1; + done = DosFindFirst((PSZ) dir, &G.os2.hdir, attributes, + &G.os2.find, sizeof(G.os2.find), &G.os2.count); + G.os2.lower = IsFileSystemFAT(__G__ dir); + } + else /* get next entry */ + done = DosFindNext(G.os2.hdir, + &G.os2.find, sizeof(G.os2.find), &G.os2.count); + + if (done == 0) + { + if ( G.os2.lower ) + StringLower(G.os2.find.achName); + return G.os2.find.achName; + } + else + { + DosFindClose(G.os2.hdir); + return NULL; + } +} + + + +int IsFileSystemFAT(__GPRO__ ZCONST char *dir) /* FAT / HPFS detection */ +{ + /* moved to os2data.h so they can be global */ + /* static USHORT nLastDrive=(USHORT)(-1), nResult; */ + ULONG lMap; + BYTE bData[64]; + char bName[3]; +#ifdef __32BIT__ + ULONG nDrive, cbData; + PFSQBUFFER2 pData = (PFSQBUFFER2) bData; +#else + USHORT nDrive, cbData; + PFSQBUFFER pData = (PFSQBUFFER) bData; +#endif + + /* We separate FAT and HPFS+other file systems here. + at the moment I consider other systems to be similar to HPFS, + i.e. support long file names and case sensitive */ + + if ( isalpha(dir[0]) && (dir[1] == ':') ) + nDrive = toupper(dir[0]) - '@'; + else + DosQueryCurrentDisk(&nDrive, &lMap); + + if ( nDrive == G.os2.nLastDrive ) + return G.os2.nResult; + + bName[0] = (char) (nDrive + '@'); + bName[1] = ':'; + bName[2] = 0; + + G.os2.nLastDrive = nDrive; + cbData = sizeof(bData); + + if ( !DosQueryFSAttach(bName, 0, FSAIL_QUERYNAME, (PVOID) pData, &cbData) ) + G.os2.nResult = !strcmp((char *) (pData -> szFSDName) + pData -> cbName, + "FAT"); + else + G.os2.nResult = FALSE; + + /* End of this ugly code */ + return G.os2.nResult; +} /* end function IsFileSystemFAT() */ + + + + + +/************************/ +/* Function do_wild() */ +/************************/ + +char *do_wild(__G__ wildspec) + __GDEF + char *wildspec; /* only used first time on a given dir */ +{ + /* moved to os2data.h so they can be global */ +#if 0 + static DIR *dir = NULL; + static char *dirname, *wildname, matchname[FILNAMSIZ]; + static int firstcall=TRUE, have_dirname, dirnamelen; +#endif + char *fnamestart; + struct direct *file; + + + /* Even when we're just returning wildspec, we *always* do so in + * matchname[]--calling routine is allowed to append four characters + * to the returned string, and wildspec may be a pointer to argv[]. + */ + if (G.os2.firstcall) { /* first call: must initialize everything */ + G.os2.firstcall = FALSE; + + if (!iswild(wildspec)) { + strcpy(G.os2.matchname, wildspec); + G.os2.have_dirname = FALSE; + G.os2.dir = NULL; + return G.os2.matchname; + } + + /* break the wildspec into a directory part and a wildcard filename */ + if ((G.os2.wildname = strrchr(wildspec, '/')) == NULL && + (G.os2.wildname = strrchr(wildspec, ':')) == NULL) { + G.os2.dirname = "."; + G.os2.dirnamelen = 1; + G.os2.have_dirname = FALSE; + G.os2.wildname = wildspec; + } else { + ++G.os2.wildname; /* point at character after '/' or ':' */ + G.os2.dirnamelen = G.os2.wildname - wildspec; + if ((G.os2.dirname = (char *)malloc(G.os2.dirnamelen+1)) == NULL) { + Info(slide, 1, ((char *)slide, + LoadFarString(CantAllocateWildcard))); + strcpy(G.os2.matchname, wildspec); + return G.os2.matchname; /* but maybe filespec was not a wildcard */ + } + strncpy(G.os2.dirname, wildspec, G.os2.dirnamelen); + G.os2.dirname[G.os2.dirnamelen] = '\0'; /* terminate for strcpy below */ + G.os2.have_dirname = TRUE; + } + Trace((stderr, "do_wild: dirname = [%s]\n", G.os2.dirname)); + + if ((G.os2.dir = opendir(__G__ G.os2.dirname)) != NULL) { + if (G.os2.have_dirname) { + strcpy(G.os2.matchname, G.os2.dirname); + fnamestart = G.os2.matchname + G.os2.dirnamelen; + } else + fnamestart = G.os2.matchname; + while ((file = readdir(__G__ G.os2.dir)) != NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.os2.wildname, 1) && /* 1 == ignore case */ + /* skip "." and ".." directory entries */ + strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.os2.matchname; + } + } + /* if we get to here directory is exhausted, so close it */ + closedir(G.os2.dir); + G.os2.dir = NULL; + } +#ifdef DEBUG + else { + Trace((stderr, "do_wild: opendir(%s) returns NULL\n", G.os2.dirname)); + } +#endif /* DEBUG */ + + /* return the raw wildspec in case that works (e.g., directory not + * searchable, but filespec was not wild and file is readable) */ + strcpy(G.os2.matchname, wildspec); + return G.os2.matchname; + } + + /* last time through, might have failed opendir but returned raw wildspec */ + if (G.os2.dir == NULL) { + G.os2.firstcall = TRUE; /* nothing left to try--reset for new wildspec */ + if (G.os2.have_dirname) + free(G.os2.dirname); + return (char *)NULL; + } + + /* If we've gotten this far, we've read and matched at least one entry + * successfully (in a previous call), so dirname has been copied into + * matchname already. + */ + if (G.os2.have_dirname) { + /* strcpy(G.os2.matchname, G.os2.dirname); */ + fnamestart = G.os2.matchname + G.os2.dirnamelen; + } else + fnamestart = G.os2.matchname; + while ((file = readdir(__G__ G.os2.dir)) != NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.os2.wildname, 1)) { /* 1 == ignore case */ + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.os2.matchname; + } + } + + closedir(G.os2.dir); /* have read at least one dir entry; nothing left */ + G.os2.dir = NULL; + G.os2.firstcall = TRUE; /* reset for new wildspec */ + if (G.os2.have_dirname) + free(G.os2.dirname); + return (char *)NULL; + +} /* end function do_wild() */ + +#endif /* !SFX */ + + +/* scan extra fields for something we happen to know */ + +static int EvalExtraFields(__GPRO__ const char *path, + void *extra_field, unsigned ef_len) +{ + char *ef_ptr = extra_field; + PEFHEADER pEFblock; + int rc = PK_OK; + + while (ef_len >= sizeof(EFHEADER)) + { + pEFblock = (PEFHEADER) ef_ptr; + + if (pEFblock -> nSize > (ef_len - EB_HEADSIZE)) + return PK_ERR; /* claimed EFblock length exceeds EF size! */ + + switch (pEFblock -> nID) + { + case EF_OS2: + rc = SetEAs(__G__ path, ef_ptr); + break; + case EF_ACL: + rc = (uO.X_flag) ? SetACL(__G__ path, ef_ptr) : PK_OK; + break; +#if 0 + case EF_IZUNIX: + case EF_PKUNIX: + /* handled elsewhere */ + break; +#endif + default: + TTrace((stderr,"EvalExtraFields: unknown extra field block, ID=%d\n", + pEFblock -> nID)); + break; + } + + ef_ptr += (pEFblock -> nSize + EB_HEADSIZE); + ef_len -= (pEFblock -> nSize + EB_HEADSIZE); + + if (rc != PK_OK) + break; + } + + return rc; +} + + + +/************************/ +/* Function mapattr() */ +/************************/ + +int mapattr(__G) + __GDEF +{ + /* set archive bit (file is not backed up): */ + G.pInfo->file_attr = (unsigned)(G.crec.external_file_attributes | 32) & 0xff; + return 0; +} + + + + + +/************************/ +/* Function mapname() */ +/************************/ + +/* + * There are presently two possibilities in OS/2: the output filesystem is + * FAT, or it is HPFS. If the former, we need to map to FAT, obviously, but + * we *also* must map to HPFS and store that version of the name in extended + * attributes. Either way, we need to map to HPFS, so the main mapname + * routine does that. In the case that the output file system is FAT, an + * extra filename-mapping routine is called in checkdir(). While it should + * be possible to determine the filesystem immediately upon entry to mapname(), + * it is conceivable that the DOS APPEND utility could be added to OS/2 some- + * day, allowing a FAT directory to be APPENDed to an HPFS drive/path. There- + * fore we simply check the filesystem at each path component. + * + * Note that when alternative IFSes become available/popular, everything will + * become immensely more complicated. For example, a Minix filesystem would + * have limited filename lengths like FAT but no extended attributes in which + * to store the longer versions of the names. A BSD Unix filesystem would + * support paths of length 1024 bytes or more, but it is not clear that FAT + * EAs would allow such long .LONGNAME fields or that OS/2 would properly + * restore such fields when moving files from FAT to the new filesystem. + * + * GRR: some or all of the following chars should be checked in either + * mapname (HPFS) or map2fat (FAT), depending: ,=^+'"[]<>|\t& + */ + /* return 0 if no error, 1 if caution (filename */ +int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ + __GDEF /* dir doesn't exist), 3 if error (skip file), */ + int renamed; /* or 10 if out of memory (skip file) */ +{ /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ + char pathcomp[FILNAMSIZ]; /* path-component buffer */ + char *pp, *cp=(char *)NULL; /* character pointers */ + char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ + int quote = FALSE; /* flag: next char is literal */ + int error = 0; + register unsigned workch; /* hold the character being tested */ + + +/*--------------------------------------------------------------------------- + Initialize various pointers and counters and stuff. + ---------------------------------------------------------------------------*/ + + /* can create path as long as not just freshening, or if user told us */ + G.create_dirs = (!uO.fflag || renamed); + + G.os2.created_dir = FALSE; /* not yet */ + G.os2.renamed_fullpath = FALSE; + G.os2.fnlen = strlen(G.filename); + +/* GRR: for VMS, convert to internal format now or later? or never? */ + if (renamed) { + cp = G.filename - 1; /* point to beginning of renamed name... */ + while (*++cp) + if (*cp == '\\') /* convert backslashes to forward */ + *cp = '/'; + cp = G.filename; + /* use temporary rootpath if user gave full pathname */ + if (G.filename[0] == '/') { + G.os2.renamed_fullpath = TRUE; + pathcomp[0] = '/'; /* copy the '/' and terminate */ + pathcomp[1] = '\0'; + ++cp; + } else if (isalpha(G.filename[0]) && G.filename[1] == ':') { + G.os2.renamed_fullpath = TRUE; + pp = pathcomp; + *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ + *pp++ = *cp++; + if (*cp == '/') + *pp++ = *cp++; /* otherwise add "./"? */ + *pp = '\0'; + } + } + + /* pathcomp is ignored unless renamed_fullpath is TRUE: */ + if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* init path buffer */ + return error; /* ...unless no mem or vol label on hard disk */ + + *pathcomp = '\0'; /* initialize translation buffer */ + pp = pathcomp; /* point to translation buffer */ + if (!renamed) { /* cp already set if renamed */ + if (uO.jflag) /* junking directories */ +/* GRR: watch out for VMS version... */ + cp = (char *)strrchr(G.filename, '/'); + if (cp == (char *)NULL) /* no '/' or not junking dirs */ + cp = G.filename; /* point to internal zipfile-member pathname */ + else + ++cp; /* point to start of last component of path */ + } + +/*--------------------------------------------------------------------------- + Begin main loop through characters in filename. + ---------------------------------------------------------------------------*/ + + while ((workch = (uch)*cp++) != 0) { + + if (quote) { /* if character quoted, */ + *pp++ = (char)workch; /* include it literally */ + quote = FALSE; + } else + switch (workch) { + case '/': /* can assume -j flag not given */ + *pp = '\0'; + if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) + return error; + pp = pathcomp; /* reset conversion buffer for next piece */ + lastsemi = (char *)NULL; /* leave directory semi-colons alone */ + break; + + case ':': + *pp++ = '_'; /* drive names not stored in zipfile, */ + break; /* so no colons allowed */ + + case ';': /* start of VMS version? */ + lastsemi = pp; /* remove VMS version later... */ + *pp++ = ';'; /* but keep semicolon for now */ + break; + + case '\026': /* control-V quote for special chars */ + quote = TRUE; /* set flag for next character */ + break; + + case ' ': /* keep spaces unless specifically */ + if (uO.sflag) /* requested to change to underscore */ + *pp++ = '_'; + else + *pp++ = ' '; + break; + + default: + /* allow ASCII 255 and European characters in filenames: */ + if (isprint(workch) || workch >= 127) + *pp++ = (char)workch; + } /* end switch */ + + } /* end while loop */ + + *pp = '\0'; /* done with pathcomp: terminate it */ + + /* if not saving them, remove VMS version numbers (appended "###") */ + if (!uO.V_flag && lastsemi) { + pp = lastsemi + 1; /* semi-colon was kept: expect #s after */ + while (isdigit((uch)(*pp))) + ++pp; + if (*pp == '\0') /* only digits between ';' and end: nuke */ + *lastsemi = '\0'; + } + +/*--------------------------------------------------------------------------- + Report if directory was created (and no file to create: filename ended + in '/'), check name to be sure it exists, and combine path and name be- + fore exiting. + ---------------------------------------------------------------------------*/ + + if (G.filename[G.os2.fnlen-1] == '/') { + checkdir(__G__ G.filename, GETPATH); + if (G.os2.created_dir) { + if (!uO.qflag) + Info(slide, 0, ((char *)slide, LoadFarString(Creating), + G.filename)); + if (G.extra_field) { /* zipfile extra field has extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", G.filename)); + Info(slide, 1, ((char *)slide, LoadFarString(TruncEAs), + makeword(G.extra_field+2)-10, "\n")); + } else if (!uO.qflag) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + } else if (!uO.qflag) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + + /* set date/time stamps */ + SetPathAttrTimes(__G__ G.pInfo->file_attr & ~A_ARCHIVE, 1); + + return IZ_CREATED_DIR; /* dir time already set */ + + } else if (G.extra_field && uO.overwrite_all) { + /* overwrite EAs of existing directory since user requested it */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + Info(slide, 0x421, ((char *)slide, "%-22s ", G.filename)); + Info(slide, 0x401, ((char *)slide, LoadFarString(TruncEAs), + makeword(G.extra_field+2)-10, "\n")); + } + + /* set date/time stamps (dirs only have creation times) */ + SetPathAttrTimes(__G__ G.pInfo->file_attr & ~A_ARCHIVE, 1); + } + return 2; /* dir existed already; don't look for data to extract */ + } + + if (*pathcomp == '\0') { + Info(slide, 1, ((char *)slide, LoadFarString(ConversionFailed), + G.filename)); + return 3; + } + + checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ + checkdir(__G__ G.filename, GETPATH); + Trace((stderr, "mapname returns with filename = [%s] (error = %d)\n\n", + G.filename, error)); + + if (G.pInfo->vollabel) { /* set the volume label now */ + VOLUMELABEL FSInfoBuf; +/* GRR: "VOLUMELABEL" defined for IBM C and emx, but haven't checked MSC... */ + + strcpy(FSInfoBuf.szVolLabel, G.filename); + FSInfoBuf.cch = (BYTE)strlen(FSInfoBuf.szVolLabel); + + if (!uO.qflag) + Info(slide, 0, ((char *)slide, LoadFarString(Labelling), + (char)(G.os2.nLabelDrive + 'a' - 1), G.filename)); + if (DosSetFSInfo(G.os2.nLabelDrive, FSIL_VOLSER, (PBYTE)&FSInfoBuf, + sizeof(VOLUMELABEL))) + { + Info(slide, 1, ((char *)slide, LoadFarString(ErrSetVolLabel))); + return 3; + } + return 2; /* success: skip the "extraction" quietly */ + } + + return error; + +} /* end function mapname() */ + + + + + +/***********************/ +/* Function checkdir() */ +/***********************/ + +int checkdir(__G__ pathcomp, flag) + __GDEF + char *pathcomp; + int flag; +/* + * returns: 1 - (on APPEND_NAME) truncated filename + * 2 - path doesn't exist, not allowed to create + * 3 - path doesn't exist, tried to create and failed; or + * path exists and is not a directory, but is supposed to be + * 4 - path is too long + * 10 - can't allocate memory for filename buffers + */ +{ + /* moved to os2data.h so they can be global */ +#if 0 + static int rootlen = 0; /* length of rootpath */ + static char *rootpath; /* user's "extract-to" directory */ + static char *buildpathHPFS; /* full path (so far) to extracted file, */ + static char *buildpathFAT; /* both HPFS/EA (main) and FAT versions */ + static char *endHPFS; /* corresponding pointers to end of */ + static char *endFAT; /* buildpath ('\0') */ +#endif + +# define FN_MASK 7 +# define FUNCTION (flag & FN_MASK) + + + +/*--------------------------------------------------------------------------- + APPEND_DIR: append the path component to the path being built and check + for its existence. If doesn't exist and we are creating directories, do + so for this one; else signal success or error as appropriate. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_DIR) { + char *p = pathcomp; + int longdirEA, too_long=FALSE; + + Trace((stderr, "appending dir segment [%s]\n", pathcomp)); + while ((*G.os2.endHPFS = *p++) != '\0') /* copy to HPFS filename */ + ++G.os2.endHPFS; + if (IsFileNameValid(G.os2.buildpathHPFS)) { + longdirEA = FALSE; + p = pathcomp; + while ((*G.os2.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.os2.endFAT; + } else { + longdirEA = TRUE; +/* GRR: check error return? */ + map2fat(pathcomp, &G.os2.endFAT); /* map, put in FAT fn, update endFAT */ + } + + /* GRR: could do better check, see if overrunning buffer as we go: + * check endHPFS-G.os2.buildpathHPFS after each append, set warning variable + * if within 20 of FILNAMSIZ; then if var set, do careful check when + * appending. Clear variable when begin new path. */ + + /* next check: need to append '/', at least one-char name, '\0' */ + if ((G.os2.endHPFS-G.os2.buildpathHPFS) > FILNAMSIZ-3) + too_long = TRUE; /* check if extracting dir? */ +#ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ + if (GetFileTime(G.os2.buildpathFAT) == -1 || stat(G.os2.buildpathFAT, &G.statbuf)) +#else + if (stat(G.os2.buildpathFAT, &G.statbuf)) /* path doesn't exist */ +#endif + { + if (!G.create_dirs) { /* told not to create (freshening) */ + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ + Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), + G.os2.buildpathHPFS)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + if (MKDIR(G.os2.buildpathFAT, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, LoadFarString(CantCreateDir), + G.os2.buildpathFAT, G.filename)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 3; /* path didn't exist, tried to create, failed */ + } + G.os2.created_dir = TRUE; + /* only set EA if creating directory */ +/* GRR: need trailing '/' before function call? */ + if (longdirEA) { +#ifdef DEBUG + int e = +#endif + SetLongNameEA(G.os2.buildpathFAT, pathcomp); + Trace((stderr, "APPEND_DIR: SetLongNameEA() returns %d\n", e)); + } + } else if (!S_ISDIR(G.statbuf.st_mode)) { + Info(slide, 1, ((char *)slide, LoadFarString(DirIsntDirectory), + G.os2.buildpathFAT, G.filename)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 3; /* path existed but wasn't dir */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, LoadFarString(PathTooLong), + G.os2.buildpathHPFS)); + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + *G.os2.endHPFS++ = '/'; + *G.os2.endFAT++ = '/'; + *G.os2.endHPFS = *G.os2.endFAT = '\0'; + Trace((stderr, "buildpathHPFS now = [%s]\n", G.os2.buildpathHPFS)); + Trace((stderr, "buildpathFAT now = [%s]\n", G.os2.buildpathFAT)); + return 0; + + } /* end if (FUNCTION == APPEND_DIR) */ + +/*--------------------------------------------------------------------------- + GETPATH: copy full FAT path to the string pointed at by pathcomp (want + filename to reflect name used on disk, not EAs; if full path is HPFS, + buildpathFAT and buildpathHPFS will be identical). Also free both paths. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == GETPATH) { + Trace((stderr, "getting and freeing FAT path [%s]\n", G.os2.buildpathFAT)); + Trace((stderr, "freeing HPFS path [%s]\n", G.os2.buildpathHPFS)); + strcpy(pathcomp, G.os2.buildpathFAT); + free(G.os2.buildpathFAT); + free(G.os2.buildpathHPFS); + G.os2.buildpathHPFS = G.os2.buildpathFAT = G.os2.endHPFS = G.os2.endFAT = (char *)NULL; + return 0; + } + +/*--------------------------------------------------------------------------- + APPEND_NAME: assume the path component is the filename; append it and + return without checking for existence. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_NAME) { + char *p = pathcomp; + int error = 0; + + Trace((stderr, "appending filename [%s]\n", pathcomp)); + while ((*G.os2.endHPFS = *p++) != '\0') { /* copy to HPFS filename */ + ++G.os2.endHPFS; + if ((G.os2.endHPFS-G.os2.buildpathHPFS) >= FILNAMSIZ) { + *--G.os2.endHPFS = '\0'; + Info(slide, 1, ((char *)slide, LoadFarString(PathTooLongTrunc), + G.filename, G.os2.buildpathHPFS)); + error = 1; /* filename truncated */ + } + } + +/* GRR: how can longnameEA ever be set before this point??? we don't want + * to save the original name to EAs if user renamed it, do we? + * + * if (!G.os2.longnameEA && ((G.os2.longnameEA = !IsFileNameValid(name)) != 0)) + */ + if (G.pInfo->vollabel || IsFileNameValid(G.os2.buildpathHPFS)) { + G.os2.longnameEA = FALSE; + p = pathcomp; + while ((*G.os2.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.os2.endFAT; + } else { + G.os2.longnameEA = TRUE; + if ((G.os2.lastpathcomp = (char *)malloc(strlen(pathcomp)+1)) == + (char *)NULL) + { + Info(slide, 1, ((char *)slide, + "checkdir warning: cannot save longname EA: out of memory\n")); + G.os2.longnameEA = FALSE; + error = 1; /* can't set .LONGNAME extended attribute */ + } else /* used and freed in close_outfile() */ + strcpy(G.os2.lastpathcomp, pathcomp); + map2fat(pathcomp, &G.os2.endFAT); /* map, put in FAT fn, update endFAT */ + } + Trace((stderr, "buildpathHPFS: %s\nbuildpathFAT: %s\n", + G.os2.buildpathHPFS, G.os2.buildpathFAT)); + + return error; /* could check for existence, prompt for new name... */ + + } /* end if (FUNCTION == APPEND_NAME) */ + +/*--------------------------------------------------------------------------- + INIT: allocate and initialize buffer space for the file currently being + extracted. If file was renamed with an absolute path, don't prepend the + extract-to path. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == INIT) { + Trace((stderr, "initializing buildpathHPFS and buildpathFAT to ")); + if ((G.os2.buildpathHPFS = (char *)malloc(G.os2.fnlen+G.os2.rootlen+1)) == (char *)NULL) + return 10; + if ((G.os2.buildpathFAT = (char *)malloc(G.os2.fnlen+G.os2.rootlen+1)) == (char *)NULL) { + free(G.os2.buildpathHPFS); + return 10; + } + if (G.pInfo->vollabel) { /* use root or renamed path, but don't store */ +/* GRR: for network drives, do strchr() and return IZ_VOL_LABEL if not [1] */ + if (G.os2.renamed_fullpath && pathcomp[1] == ':') + *G.os2.buildpathHPFS = (char)ToLower(*pathcomp); + else if (!G.os2.renamed_fullpath && G.os2.rootlen > 1 && G.os2.rootpath[1] == ':') + *G.os2.buildpathHPFS = (char)ToLower(*G.os2.rootpath); + else { + ULONG lMap; + DosQueryCurrentDisk(&G.os2.nLabelDrive, &lMap); + *G.os2.buildpathHPFS = (char)(G.os2.nLabelDrive - 1 + 'a'); + } + G.os2.nLabelDrive = *G.os2.buildpathHPFS - 'a' + 1; /* save for mapname() */ + if (uO.volflag == 0 || *G.os2.buildpathHPFS < 'a' || /* no labels/bogus? */ + (uO.volflag == 1 && !isfloppy(G.os2.nLabelDrive))) { /* -$: no fixed */ + free(G.os2.buildpathHPFS); + free(G.os2.buildpathFAT); + return IZ_VOL_LABEL; /* skipping with message */ + } + *G.os2.buildpathHPFS = '\0'; + } else if (G.os2.renamed_fullpath) /* pathcomp = valid data */ + strcpy(G.os2.buildpathHPFS, pathcomp); + else if (G.os2.rootlen > 0) + strcpy(G.os2.buildpathHPFS, G.os2.rootpath); + else + *G.os2.buildpathHPFS = '\0'; + G.os2.endHPFS = G.os2.buildpathHPFS; + G.os2.endFAT = G.os2.buildpathFAT; + while ((*G.os2.endFAT = *G.os2.endHPFS) != '\0') { + ++G.os2.endFAT; + ++G.os2.endHPFS; + } + Trace((stderr, "[%s]\n", G.os2.buildpathHPFS)); + return 0; + } + +/*--------------------------------------------------------------------------- + ROOT: if appropriate, store the path in rootpath and create it if neces- + sary; else assume it's a zipfile member and return. This path segment + gets used in extracting all members from every zipfile specified on the + command line. Note that under OS/2 and MS-DOS, if a candidate extract-to + directory specification includes a drive letter (leading "x:"), it is + treated just as if it had a trailing '/'--that is, one directory level + will be created if the path doesn't exist, unless this is otherwise pro- + hibited (e.g., freshening). + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) || defined(SFX_EXDIR)) + if (FUNCTION == ROOT) { + Trace((stderr, "initializing root path to [%s]\n", pathcomp)); + if (pathcomp == (char *)NULL) { + G.os2.rootlen = 0; + return 0; + } + if ((G.os2.rootlen = strlen(pathcomp)) > 0) { + int had_trailing_pathsep=FALSE, has_drive=FALSE, xtra=2; + + if (isalpha(pathcomp[0]) && pathcomp[1] == ':') + has_drive = TRUE; /* drive designator */ + if (pathcomp[G.os2.rootlen-1] == '/') { + pathcomp[--G.os2.rootlen] = '\0'; + had_trailing_pathsep = TRUE; + } + if (has_drive && (G.os2.rootlen == 2)) { + if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ + xtra = 3; /* room for '.' + '/' + 0 at end of "x:" */ + } else if (G.os2.rootlen > 0) { /* need not check "x:." and "x:/" */ +#ifdef MSC /* MSC 6.00 bug: stat(non-existent-dir) == 0 [exists!] */ + if (GetFileTime(pathcomp) == -1 || + SSTAT(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) +#else + if (SSTAT(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) +#endif + { /* path does not exist */ + if (!G.create_dirs /* || iswild(pathcomp) */ + ) { + G.os2.rootlen = 0; + return 2; /* treat as stored file */ + } + /* create directory (could add loop here to scan pathcomp + * and create more than one level, but really necessary?) */ + if (MKDIR(pathcomp, 0777) == -1) { + Info(slide, 1, ((char *)slide, + LoadFarString(CantCreateExtractDir), pathcomp)); + G.os2.rootlen = 0; /* path didn't exist, tried to create, */ + return 3; /* failed: file exists, or need 2+ levels */ + } + } + } + if ((G.os2.rootpath = (char *)malloc(G.os2.rootlen+xtra)) == (char *)NULL) { + G.os2.rootlen = 0; + return 10; + } + strcpy(G.os2.rootpath, pathcomp); + if (xtra == 3) /* had just "x:", make "x:." */ + G.os2.rootpath[G.os2.rootlen++] = '.'; + G.os2.rootpath[G.os2.rootlen++] = '/'; + G.os2.rootpath[G.os2.rootlen] = '\0'; + Trace((stderr, "rootpath now = [%s]\n", G.os2.rootpath)); + } + return 0; + } +#endif /* !SFX || SFX_EXDIR */ + +/*--------------------------------------------------------------------------- + END: free rootpath, immediately prior to program exit. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == END) { + Trace((stderr, "freeing rootpath\n")); + if (G.os2.rootlen > 0) { + free(G.os2.rootpath); + G.os2.rootlen = 0; + } + return 0; + } + + return 99; /* should never reach */ + +} /* end function checkdir() */ + + + + + +/***********************/ +/* Function isfloppy() */ /* more precisely, is it removable? */ +/***********************/ + +static int isfloppy(nDrive) + int nDrive; /* 1 == A:, 2 == B:, etc. */ +{ + uch ParmList[1] = {0}; + uch DataArea[1] = {0}; + char Name[3]; + HFILE handle; +#ifdef __32BIT__ + ULONG rc; + ULONG action; +#else + USHORT rc; + USHORT action; +#endif + + + Name[0] = (char) (nDrive + 'A' - 1); + Name[1] = ':'; + Name[2] = 0; + + rc = DosOpen(Name, &handle, &action, 0L, FILE_NORMAL, FILE_OPEN, + OPEN_FLAGS_DASD | OPEN_FLAGS_FAIL_ON_ERROR | + OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0L); + + if (rc == ERROR_NOT_READY) /* must be removable */ + return TRUE; + else if (rc) { /* other error: do default a/b heuristic instead */ + Trace((stderr, "error in DosOpen(DASD): guessing...\n", rc)); + return (nDrive == 1 || nDrive == 2)? TRUE : FALSE; + } + + rc = DosDevIOCtl(DataArea, sizeof(DataArea), ParmList, sizeof(ParmList), + DSK_BLOCKREMOVABLE, IOCTL_DISK, handle); + DosClose(handle); + + if (rc) { /* again, just check for a/b */ + Trace((stderr, "error in DosDevIOCtl category IOCTL_DISK, function " + "DSK_BLOCKREMOVABLE\n (rc = 0x%04x): guessing...\n", rc)); + return (nDrive == 1 || nDrive == 2)? TRUE : FALSE; + } else { + return DataArea[0] ? FALSE : TRUE; + } +} /* end function isfloppy() */ + + + + + +static int IsFileNameValid(const char *name) +{ + HFILE hf; +#ifdef __32BIT__ + ULONG uAction; +#else + USHORT uAction; +#endif + + switch( DosOpen((PSZ) name, &hf, &uAction, 0, 0, FILE_OPEN, + OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0) ) + { + case ERROR_INVALID_NAME: + case ERROR_FILENAME_EXCED_RANGE: + return FALSE; + case NO_ERROR: + DosClose(hf); + default: + return TRUE; + } +} + + + + + +/**********************/ +/* Function map2fat() */ +/**********************/ + +static void map2fat(pathcomp, pEndFAT) + char *pathcomp, **pEndFAT; +{ + char *ppc = pathcomp; /* variable pointer to pathcomp */ + char *pEnd = *pEndFAT; /* variable pointer to buildpathFAT */ + char *pBegin = *pEndFAT; /* constant pointer to start of this comp. */ + char *last_dot = (char *)NULL; /* last dot not converted to underscore */ + int dotname = FALSE; /* flag: path component begins with dot */ + /* ("." and ".." don't count) */ + register unsigned workch; /* hold the character being tested */ + + + /* Only need check those characters which are legal in HPFS but not + * in FAT: to get here, must already have passed through mapname. + * (GRR: oops, small bug--if char was quoted, no longer have any + * knowledge of that.) Also must truncate path component to ensure + * 8.3 compliance... + */ + while ((workch = (uch)*ppc++) != 0) { + switch (workch) { + case '[': /* add '"' '+' ',' '=' ?? */ + case ']': + *pEnd++ = '_'; /* convert brackets to underscores */ + break; + + case '.': + if (pEnd == *pEndFAT) { /* nothing appended yet... */ + if (*ppc == '\0') /* don't bother appending a */ + break; /* "./" component to the path */ + else if (*ppc == '.' && ppc[1] == '\0') { /* "../" */ + *pEnd++ = '.'; /* add first dot, unchanged... */ + ++ppc; /* skip second dot, since it will */ + } else { /* be "added" at end of if-block */ + *pEnd++ = '_'; /* FAT doesn't allow null filename */ + dotname = TRUE; /* bodies, so map .exrc -> _.exrc */ + } /* (extra '_' now, "dot" below) */ + } else if (dotname) { /* found a second dot, but still */ + dotname = FALSE; /* have extra leading underscore: */ + *pEnd = '\0'; /* remove it by shifting chars */ + pEnd = *pEndFAT + 1; /* left one space (e.g., .p1.p2: */ + while (pEnd[1]) { /* __p1 -> _p1_p2 -> _p1.p2 when */ + *pEnd = pEnd[1]; /* finished) [opt.: since first */ + ++pEnd; /* two chars are same, can start */ + } /* shifting at second position] */ + } + last_dot = pEnd; /* point at last dot so far... */ + *pEnd++ = '_'; /* convert dot to underscore for now */ + break; + + default: + *pEnd++ = (char)workch; + + } /* end switch */ + } /* end while loop */ + + *pEnd = '\0'; /* terminate buildpathFAT */ + + /* NOTE: keep in mind that pEnd points to the end of the path + * component, and *pEndFAT still points to the *beginning* of it... + * Also note that the algorithm does not try to get too fancy: + * if there are no dots already, the name either gets truncated + * at 8 characters or the last underscore is converted to a dot + * (only if more characters are saved that way). In no case is + * a dot inserted between existing characters. + */ + if (last_dot == (char *)NULL) { /* no dots: check for underscores... */ + char *plu = strrchr(pBegin, '_'); /* pointer to last underscore */ + + if (plu == (char *)NULL) { /* no dots, no underscores: truncate at 8 */ + *pEndFAT += 8; /* chars (could insert '.' and keep 11...) */ + if (*pEndFAT > pEnd) + *pEndFAT = pEnd; /* oops...didn't have 8 chars to truncate */ + else + **pEndFAT = '\0'; + } else if (MIN(plu - pBegin, 8) + MIN(pEnd - plu - 1, 3) > 8) { + last_dot = plu; /* be lazy: drop through to next if-block */ + } else if ((pEnd - *pEndFAT) > 8) { + *pEndFAT += 8; /* more fits into just basename than if */ + **pEndFAT = '\0'; /* convert last underscore to dot */ + } else + *pEndFAT = pEnd; /* whole thing fits into 8 chars or less */ + } + + if (last_dot != (char *)NULL) { /* one dot (or two, in the case of */ + *last_dot = '.'; /* "..") is OK: put it back in */ + + if ((last_dot - pBegin) > 8) { + char *p, *q; + int i; + + p = last_dot; + q = last_dot = pBegin + 8; + for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ + *q++ = *p++; /* shift ".ext" left and */ + *q = '\0'; /* truncate/terminate it */ + *pEndFAT = q; + } else if ((pEnd - last_dot) > 4) { /* too many chars in extension */ + *pEndFAT = last_dot + 4; + **pEndFAT = '\0'; + } else + *pEndFAT = pEnd; /* filename is fine; point at terminating zero */ + + if ((last_dot - pBegin) > 0 && last_dot[-1] == ' ') + last_dot[-1] = '_'; /* NO blank in front of '.'! */ + } +} /* end function map2fat() */ + + + + + +static int SetLongNameEA(char *name, char *longname) +{ + EAOP eaop; + FEALST fealst; + + eaop.fpFEAList = (PFEALIST) &fealst; + eaop.fpGEAList = NULL; + eaop.oError = 0; + + strcpy((char *) fealst.szName, ".LONGNAME"); + strcpy((char *) fealst.szValue, longname); + + fealst.cbList = sizeof(fealst) - CCHMAXPATH + strlen((char *) fealst.szValue); + fealst.cbName = (BYTE) strlen((char *) fealst.szName); + fealst.cbValue = sizeof(USHORT) * 2 + strlen((char *) fealst.szValue); + +#ifdef __32BIT__ + fealst.oNext = 0; +#endif + fealst.fEA = 0; + fealst.eaType = 0xFFFD; + fealst.eaSize = strlen((char *) fealst.szValue); + + return DosSetPathInfo(name, FIL_QUERYEASIZE, + (PBYTE) &eaop, sizeof(eaop), 0); +} + + + + + +/****************************/ +/* Function close_outfile() */ +/****************************/ + + /* GRR: need to return error level!! */ + +void close_outfile(__G) /* only for extracted files, not directories */ + __GDEF +{ + fclose(G.outfile); + + /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ + if (G.extra_field) { /* zipfile extra field may have extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", G.filename)); + Info(slide, 1, ((char *)slide, LoadFarString(TruncEAs), + makeword(G.extra_field+2)-10, uO.qflag? "\n" : "")); + } + } + + if (G.os2.longnameEA) { +#ifdef DEBUG + int e = +#endif + SetLongNameEA(G.filename, G.os2.lastpathcomp); + Trace((stderr, "close_outfile: SetLongNameEA() returns %d\n", e)); + free(G.os2.lastpathcomp); + } + + /* set date/time and permissions */ + SetPathAttrTimes(__G__ G.pInfo->file_attr, 0); + +} /* end function close_outfile() */ + + + + + +/******************************/ +/* Function check_for_newer() */ +/******************************/ + +int check_for_newer(__G__ filename) /* return 1 if existing file newer or equal; */ + __GDEF + char *filename; /* 0 if older; -1 if doesn't exist yet */ +{ + ulg existing, archive; +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif + + if ((existing = (ulg)GetFileTime(filename)) == (ulg)-1) + return DOES_NOT_EXIST; + +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, + G.lrec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TTrace((stderr, "check_for_newer: using Unix extra field mtime\n")); + archive = Utime2DosDateTime(z_utime.mtime); + } else { + archive = G.lrec.last_mod_dos_datetime; + } +#else /* !USE_EF_UT_TIME */ + archive = G.lrec.last_mod_dos_datetime; +#endif /* ?USE_EF_UT_TIME */ + + return (existing >= archive); +} /* end function check_for_newer() */ + + + + + +#ifndef SFX + +/*************************/ +/* Function dateformat() */ +/*************************/ + +int dateformat() +{ +/*----------------------------------------------------------------------------- + For those operating systems which support it, this function returns a value + which tells how national convention says that numeric dates are displayed. + Return values are DF_YMD, DF_DMY and DF_MDY. + -----------------------------------------------------------------------------*/ + + switch (GetCountryInfo()) { + case 0: + return DF_MDY; + case 1: + return DF_DMY; + case 2: + return DF_YMD; + } + return DF_MDY; /* default if error */ + +} /* end function dateformat() */ + + + + + +/************************/ +/* Function version() */ +/************************/ + +void version(__G) + __GDEF +{ + int len; +#if defined(__IBMC__) || defined(__WATCOMC__) || defined(_MSC_VER) + char buf[80]; +#endif + + len = sprintf((char *)slide, LoadFarString(CompiledWith), + +#if defined(__GNUC__) +# ifdef __EMX__ /* __EMX__ is defined as "1" only (sigh) */ + "emx+gcc ", __VERSION__, +# else + "gcc/2 ", __VERSION__, +# endif +#elif defined(__IBMC__) + "IBM ", +# if (__IBMC__ < 200) + (sprintf(buf, "C Set/2 %d.%02d", __IBMC__/100,__IBMC__%100), buf), +# elif (__IBMC__ < 300) + (sprintf(buf, "C Set++ %d.%02d", __IBMC__/100,__IBMC__%100), buf), +# else + (sprintf(buf, "Visual Age C++ %d.%02d", __IBMC__/100,__IBMC__%100), buf), +# endif +#elif defined(__WATCOMC__) + "Watcom C", (sprintf(buf, " (__WATCOMC__ = %d)", __WATCOMC__), buf), +#elif defined(__TURBOC__) +# ifdef __BORLANDC__ + "Borland C++", +# if (__BORLANDC__ < 0x0460) + " 1.0", +# elif (__BORLANDC__ == 0x0460) + " 1.5", /* from Kai Uwe: three less than DOS */ +# else + " 2.0", /* (__BORLANDC__ == 0x0500)? */ +# endif +# else + "Turbo C", /* these are probably irrelevant */ +# if (__TURBOC__ >= 661) + "++ 1.0 or later", +# elif (__TURBOC__ == 661) + " 3.0?", +# elif (__TURBOC__ == 397) + " 2.0", +# else + " 1.0 or 1.5?", +# endif +# endif +#elif defined(MSC) + "Microsoft C ", +# ifdef _MSC_VER + (sprintf(buf, "%d.%02d", _MSC_VER/100, _MSC_VER%100), buf), +# else + "5.1 or earlier", +# endif +#else + "unknown compiler", "", +#endif /* ?compilers */ + + "OS/2", + +/* GRR: does IBM C/2 identify itself as IBM rather than Microsoft? */ +#if (defined(MSC) || (defined(__WATCOMC__) && !defined(__386__))) +# if defined(M_I86HM) || defined(__HUGE__) + " (16-bit, huge)", +# elif defined(M_I86LM) || defined(__LARGE__) + " (16-bit, large)", +# elif defined(M_I86MM) || defined(__MEDIUM__) + " (16-bit, medium)", +# elif defined(M_I86CM) || defined(__COMPACT__) + " (16-bit, compact)", +# elif defined(M_I86SM) || defined(__SMALL__) + " (16-bit, small)", +# elif defined(M_I86TM) || defined(__TINY__) + " (16-bit, tiny)", +# else + " (16-bit)", +# endif +#else + " 2.x/3.x (32-bit)", +#endif + +#ifdef __DATE__ + " on ", __DATE__ +#else + "", "" +#endif + ); + + (*G.message)((zvoid *)&G, slide, (ulg)len, 0); + /* MSC can't handle huge macro expansions */ + + /* temporary debugging code for Borland compilers only */ + /* __TCPLUSPLUS__, __BCPLUSPLUS__ not defined for v1.5 */ +#if (defined(__TURBOC__) && defined(DEBUG)) + Info(slide, 0, ((char *)slide, "\t(__TURBOC__ = 0x%04x = %d)\n", __TURBOC__, + __TURBOC__)); +#ifdef __BORLANDC__ + Info(slide, 0, ((char *)slide, "\t(__BORLANDC__ = 0x%04x)\n",__BORLANDC__)); +#else + Info(slide, 0, ((char *)slide, "\tdebug(__BORLANDC__ not defined)\n")); +#endif +#endif /* __TURBOC__ && DEBUG */ + +} /* end function version() */ + +#endif /* !SFX */ + + + +/* This table can be static because it is pseudo-constant */ +static unsigned char cUpperCase[256], cLowerCase[256]; +static BOOL bInitialized=FALSE; + +/* Initialize the tables of upper- and lowercase characters, including + handling of country-dependent characters. */ + +static void InitNLS(void) +{ + unsigned nCnt, nU; + COUNTRYCODE cc; + + if (bInitialized == FALSE) { + bInitialized = TRUE; + + for ( nCnt = 0; nCnt < 256; nCnt++ ) + cUpperCase[nCnt] = cLowerCase[nCnt] = (unsigned char) nCnt; + + cc.country = cc.codepage = 0; + DosMapCase(sizeof(cUpperCase), &cc, (PCHAR) cUpperCase); + + for ( nCnt = 0; nCnt < 256; nCnt++ ) { + nU = cUpperCase[nCnt]; + if (nU != nCnt && cLowerCase[nU] == (unsigned char) nU) + cLowerCase[nU] = (unsigned char) nCnt; + } + + for ( nCnt = 'A'; nCnt <= 'Z'; nCnt++ ) + cLowerCase[nCnt] = (unsigned char) (nCnt - 'A' + 'a'); + } +} + + +int IsUpperNLS(int nChr) +{ + return (cUpperCase[nChr] == (unsigned char) nChr); +} + + +int ToLowerNLS(int nChr) +{ + return cLowerCase[nChr]; +} + + +char *StringLower(char *szArg) +{ + unsigned char *szPtr; + + for ( szPtr = (unsigned char *) szArg; *szPtr; szPtr++ ) + *szPtr = cLowerCase[*szPtr]; + return szArg; +} + + +#if defined(__IBMC__) && defined(__DEBUG_ALLOC__) +void DebugMalloc(void) +{ + _dump_allocated(0); /* print out debug malloc memory statistics */ +} +#endif + + +#if defined(REENTRANT) && defined(USETHREADID) +ulg GetThreadId(void) +{ + PTIB pptib; /* Address of a pointer to the + Thread Information Block */ + PPIB pppib; /* Address of a pointer to the + Process Information Block */ + + DosGetInfoBlocks(&pptib, &pppib); + return pptib->tib_ptib2->tib2_ultid; +} +#endif /* defined(REENTRANT) && defined(USETHREADID) */ + + +void os2GlobalsCtor(__GPRO) +{ + G.os2.nLastDrive = (USHORT)(-1); + G.os2.firstcall = TRUE; + +#ifdef OS2DLL + G.os2.rexx_mes = "0"; +#endif + + InitNLS(); +} diff --git a/utils/Install/sfxzip/os2acl.c b/utils/Install/sfxzip/os2acl.c new file mode 100644 index 0000000000..c58f6e0419 --- /dev/null +++ b/utils/Install/sfxzip/os2acl.c @@ -0,0 +1,381 @@ +/* os2acl.c - access to OS/2 (LAN Server) ACLs + * + * Author: Kai Uwe Rommel + * Created: Mon Aug 08 1994 + * + * This code is in the public domain. + */ + +/* + * supported 32-bit compilers: + * - emx+gcc + * - IBM C Set++ 2.1 or newer + * - Watcom C/C++ 10.0 or newer + * + * supported 16-bit compilers: + * - MS C 6.00A + * - Watcom C/C++ 10.0 or newer + * + * supported OS/2 LAN environments: + * - IBM LAN Server/Requester 3.0, 4.0 and 5.0 (Warp Server) + * - IBM Peer 1.0 (Warp Connect) + */ + +#ifdef KUR + static char *rcsid = + "$Id$"; + static char *rcsrev = "$Revision$"; +#endif + +/* + * $Log$ + * Revision 1.1.2.1 2000/04/11 12:38:06 BS + * Added wxInstall a self extracting installation program using wxWindows. + * + * Revision 1.3 1996/04/03 19:18:27 rommel + * minor fixes + * + * Revision 1.2 1996/03/30 22:03:52 rommel + * avoid frequent dynamic allocation for every call + * streamlined code + * + * Revision 1.1 1996/03/30 09:35:00 rommel + * Initial revision + * + */ + +#include +#include +#include +#include +#include + +#define INCL_NOPM +#define INCL_DOS +#define INCL_DOSERRORS +#include + +#include "os2/os2acl.h" + +#define UNLEN 20 + +#if defined(__WATCOMC__) && defined(__386__) && !defined(__32BIT__) +#define __32BIT__ +#endif + +#ifdef __32BIT__ +typedef ULONG U_INT; +#ifdef __EMX__ +#define PSTR16 _far16ptr +#define PTR16(x) _emx_32to16(x) +#else /* other 32-bit */ +#define PSTR16 PCHAR16 +#define PTR16(x) ((PCHAR16)(x)) +#endif +#else /* 16-bit */ +typedef USHORT U_INT; +#define PSTR16 PSZ +#define PTR16(x) (x) +#endif + +typedef struct access_list +{ + char acl_ugname[UNLEN+1]; + char acl_pad; + USHORT acl_access; +} +ACCLIST; + +typedef struct access_info +{ + PSTR16 acc_resource_name; + USHORT acc_attr; + USHORT acc_count; +} +ACCINFO; + +static ACCINFO *ai; +static char *path, *data; + +#ifdef __32BIT__ + +#ifdef __EMX__ + +static USHORT (APIENTRY *_NetAccessGetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail); +static USHORT (APIENTRY *_NetAccessSetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum); +static USHORT (APIENTRY *_NetAccessAdd)(PSZ pszServer, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer); + +USHORT NetAccessGetInfo(PSZ pszServer, PSZ pszResource, USHORT sLevel, + PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail) +{ + return (USHORT) + (_THUNK_PROLOG (4+4+2+4+2+4); + _THUNK_FLAT (pszServer); + _THUNK_FLAT (pszResource); + _THUNK_SHORT (sLevel); + _THUNK_FLAT (pbBuffer); + _THUNK_SHORT (cbBuffer); + _THUNK_FLAT (pcbTotalAvail); + _THUNK_CALLI (_emx_32to16(_NetAccessGetInfo))); +} + +USHORT NetAccessSetInfo(PSZ pszServer, PSZ pszResource, USHORT sLevel, + PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum) +{ + return (USHORT) + (_THUNK_PROLOG (4+4+2+4+2+2); + _THUNK_FLAT (pszServer); + _THUNK_FLAT (pszResource); + _THUNK_SHORT (sLevel); + _THUNK_FLAT (pbBuffer); + _THUNK_SHORT (cbBuffer); + _THUNK_SHORT (sParmNum); + _THUNK_CALLI (_emx_32to16(_NetAccessSetInfo))); +} + +USHORT NetAccessAdd(PSZ pszServer, USHORT sLevel, + PVOID pbBuffer, USHORT cbBuffer) +{ + return (USHORT) + (_THUNK_PROLOG (4+2+4+2); + _THUNK_FLAT (pszServer); + _THUNK_SHORT (sLevel); + _THUNK_FLAT (pbBuffer); + _THUNK_SHORT (cbBuffer); + _THUNK_CALLI (_emx_32to16(_NetAccessAdd))); +} + +#else /* other 32-bit */ + +APIRET16 (* APIENTRY16 NetAccessGetInfo)(PCHAR16 pszServer, PCHAR16 pszResource, + USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer, PVOID16 pcbTotalAvail); +APIRET16 (* APIENTRY16 NetAccessSetInfo)(PCHAR16 pszServer, PCHAR16 pszResource, + USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer, USHORT sParmNum); +APIRET16 (* APIENTRY16 NetAccessAdd)(PCHAR16 pszServer, + USHORT sLevel, PVOID16 pbBuffer, USHORT cbBuffer); + +#define _NetAccessGetInfo NetAccessGetInfo +#define _NetAccessSetInfo NetAccessSetInfo +#define _NetAccessAdd NetAccessAdd + +#if !defined(__IBMC__) || !defined(__TILED__) +#define _tmalloc malloc +#define _tfree free +#endif + +#endif +#else /* 16-bit */ + +USHORT (APIENTRY *NetAccessGetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, PUSHORT pcbTotalAvail); +USHORT (APIENTRY *NetAccessSetInfo)(PSZ pszServer, PSZ pszResource, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer, USHORT sParmNum); +USHORT (APIENTRY *NetAccessAdd)(PSZ pszServer, + USHORT sLevel, PVOID pbBuffer, USHORT cbBuffer); + +#define _NetAccessGetInfo NetAccessGetInfo +#define _NetAccessSetInfo NetAccessSetInfo +#define _NetAccessAdd NetAccessAdd + +#define _tmalloc malloc +#define _tfree free + +#define DosQueryProcAddr(handle, ord, name, funcptr) \ + DosGetProcAddr(handle, name, funcptr) +#define DosQueryCurrentDir DosQCurDir +#define DosQueryCurrentDisk DosQCurDisk + +#endif + + +static BOOL acl_init(void) +{ + static BOOL initialized, netapi_avail; + HMODULE netapi; + char buf[256]; + + if (initialized) + return netapi_avail; + + initialized = TRUE; + + if (DosLoadModule(buf, sizeof(buf), "NETAPI", &netapi)) + return FALSE; + + if (DosQueryProcAddr(netapi, 0, "NETACCESSGETINFO", (PFN *) &_NetAccessGetInfo) || + DosQueryProcAddr(netapi, 0, "NETACCESSSETINFO", (PFN *) &_NetAccessSetInfo) || + DosQueryProcAddr(netapi, 0, "NETACCESSADD", (PFN *) &_NetAccessAdd)) + return FALSE; + +#if defined(__WATCOMC__) && defined(__386__) + NetAccessGetInfo = (PVOID) (ULONG) (PVOID16) NetAccessGetInfo; + NetAccessSetInfo = (PVOID) (ULONG) (PVOID16) NetAccessSetInfo; + NetAccessAdd = (PVOID) (ULONG) (PVOID16) NetAccessAdd; +#endif + + if ((path = _tmalloc(CCHMAXPATH)) == NULL) + return FALSE; + if ((data = _tmalloc(ACL_BUFFERSIZE)) == NULL) + return FALSE; + if ((ai = _tmalloc(sizeof(ACCINFO))) == NULL) + return -1; + + netapi_avail = TRUE; + + return netapi_avail; +} + +static void acl_mkpath(char *buffer, const char *source) +{ + char *ptr; + static char cwd[CCHMAXPATH]; + static U_INT cwdlen; + U_INT cdrive; + ULONG drivemap; + + if (isalpha(source[0]) && source[1] == ':') + buffer[0] = 0; /* fully qualified names */ + else + { + if (cwd[0] == 0) + { + DosQueryCurrentDisk(&cdrive, &drivemap); + cwd[0] = (char)(cdrive + '@'); + cwd[1] = ':'; + cwd[2] = '\\'; + cwdlen = sizeof(cwd) - 3; + DosQueryCurrentDir(0, cwd + 3, &cwdlen); + cwdlen = strlen(cwd); + } + + if (source[0] == '/' || source[0] == '\\') + { + if (source[1] == '/' || source[1] == '\\') + buffer[0] = 0; /* UNC names */ + else + { + strncpy(buffer, cwd, 2); + buffer[2] = 0; + } + } + else + { + strcpy(buffer, cwd); + if (cwd[cwdlen - 1] != '\\' && cwd[cwdlen - 1] != '/') + strcat(buffer, "/"); + } + } + + strcat(buffer, source); + + for (ptr = buffer; *ptr; ptr++) + if (*ptr == '/') + *ptr = '\\'; + + if (ptr[-1] == '\\') + ptr[-1] = 0; + + strupr(buffer); +} + +static int acl_bin2text(char *data, char *text) +{ + ACCINFO *ai; + ACCLIST *al; + U_INT cnt, offs; + + ai = (ACCINFO *) data; + al = (ACCLIST *) (data + sizeof(ACCINFO)); + + offs = sprintf(text, "ACL1:%X,%d\n", + ai -> acc_attr, ai -> acc_count); + + for (cnt = 0; cnt < ai -> acc_count; cnt++) + offs += sprintf(text + offs, "%s,%X\n", + al[cnt].acl_ugname, al[cnt].acl_access); + + return strlen(text); +} + +int acl_get(char *server, const char *resource, char *buffer) +{ + USHORT datalen; + PSZ srv = NULL; + int rc; + + if (!acl_init()) + return -1; + + if (server) + srv = server; + + acl_mkpath(path, resource); + datalen = 0; + + rc = NetAccessGetInfo(srv, path, 1, data, ACL_BUFFERSIZE, &datalen); + + if (rc == 0) + acl_bin2text(data, buffer); + + return rc; +} + +static int acl_text2bin(char *data, char *text, char *path) +{ + ACCINFO *ai; + ACCLIST *al; + char *ptr, *ptr2; + U_INT cnt; + + ai = (ACCINFO *) data; + ai -> acc_resource_name = PTR16(path); + + if (sscanf(text, "ACL1:%hX,%hd", + &ai -> acc_attr, &ai -> acc_count) != 2) + return ERROR_INVALID_PARAMETER; + + al = (ACCLIST *) (data + sizeof(ACCINFO)); + ptr = strchr(text, '\n') + 1; + + for (cnt = 0; cnt < ai -> acc_count; cnt++) + { + ptr2 = strchr(ptr, ','); + strncpy(al[cnt].acl_ugname, ptr, ptr2 - ptr); + al[cnt].acl_ugname[ptr2 - ptr] = 0; + sscanf(ptr2 + 1, "%hx", &al[cnt].acl_access); + ptr = strchr(ptr, '\n') + 1; + } + + return sizeof(ACCINFO) + ai -> acc_count * sizeof(ACCLIST); +} + +int acl_set(char *server, const char *resource, char *buffer) +{ + USHORT datalen; + PSZ srv = NULL; + + if (!acl_init()) + return -1; + + if (server) + srv = server; + + acl_mkpath(path, resource); + + ai -> acc_resource_name = PTR16(path); + ai -> acc_attr = 0; + ai -> acc_count = 0; + + NetAccessAdd(srv, 1, ai, sizeof(ACCINFO)); + /* Ignore any errors, most probably because ACL already exists. */ + /* In any such case, try updating the existing ACL. */ + + datalen = acl_text2bin(data, buffer, path); + + return NetAccessSetInfo(srv, path, 1, data, datalen, 0); +} + +/* end of os2acl.c */ diff --git a/utils/Install/sfxzip/process.c b/utils/Install/sfxzip/process.c new file mode 100644 index 0000000000..73be25466a --- /dev/null +++ b/utils/Install/sfxzip/process.c @@ -0,0 +1,1400 @@ +/*--------------------------------------------------------------------------- + + process.c + + This file contains the top-level routines for processing multiple zipfiles. + + Contains: process_zipfiles() + free_G_buffers() + do_seekable() + find_ecrec() + uz_end_central() + process_cdir_file_hdr() + get_cdir_ent() + process_local_file_hdr() + ef_scan_for_izux() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#ifdef WINDLL +# ifdef POCKET_UNZIP +# include "wince/intrface.h" +# else +# include "windll/windll.h" +# endif +#endif + +#include "install.h" +#include "instsup.h" +extern int installstate; + +off_t acelseek(off_t offset, int whence); +int aceread(void *buf, size_t count); +int aceopen(const char *path, int flags); +int aceclose(int fd); +int acesize(void); +int acetell(int fd); +char *replacestr(char *str1, char *str2, char *str3); + +static int do_seekable OF((__GPRO__ int lastchance)); +static int find_ecrec OF((__GPRO__ long searchlen)); + +static ZCONST char Far CannotAllocateBuffers[] = + "error: cannot allocate unzip buffers\n"; + +#ifdef SFX + static ZCONST char Far CannotFindMyself[] = + "unzipsfx: cannot find myself! [%s]\n"; + +#else /* !SFX */ + /* process_zipfiles() strings */ +# if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) + static ZCONST char Far WarnInvalidTZ[] = + "Warning: TZ environment variable not found, cannot use UTC times!!\n"; +# endif + static ZCONST char Far FilesProcessOK[] = + "%d archive%s successfully processed.\n"; + static ZCONST char Far ArchiveWarning[] = + "%d archive%s had warnings but no fatal errors.\n"; + static ZCONST char Far ArchiveFatalError[] = + "%d archive%s had fatal errors.\n"; + static ZCONST char Far FileHadNoZipfileDir[] = + "%d file%s had no zipfile directory.\n"; + static ZCONST char Far ZipfileWasDir[] = "1 \"zipfile\" was a directory.\n"; + static ZCONST char Far ManyZipfilesWereDir[] = + "%d \"zipfiles\" were directories.\n"; + static ZCONST char Far NoZipfileFound[] = "No zipfiles found.\n"; + + /* do_seekable() strings */ +# ifdef UNIX + static ZCONST char Far CannotFindZipfileDirMsg[] = + "%s: cannot find zipfile directory in one of %s or\n\ + %s%s.zip, and cannot find %s, period.\n"; + static ZCONST char Far CannotFindEitherZipfile[] = + "%s: cannot find %s, %s.zip or %s.\n"; /* ", so there" removed 970918 */ +# else /* !UNIX */ +# ifndef AMIGA + static ZCONST char Far CannotFindWildcardMatch[] = + "%s: cannot find any matches for wildcard specification \"%s\".\n"; +# endif /* !AMIGA */ + static ZCONST char Far CannotFindZipfileDirMsg[] = + "%s: cannot find zipfile directory in %s,\n\ + %sand cannot find %s, period.\n"; + static ZCONST char Far CannotFindEitherZipfile[] = + "%s: cannot find either %s or %s.\n"; /* ", so there" removed 970918 */ +# endif /* ?UNIX */ + extern ZCONST char Far Zipnfo[]; /* in unzip.c */ +#ifndef WINDLL + static ZCONST char Far Unzip[] = "unzip"; +#else + static ZCONST char Far Unzip[] = "UnZip DLL"; +#endif + static ZCONST char Far MaybeExe[] = + "note: %s may be a plain executable, not an archive\n"; + static ZCONST char Far CentDirNotInZipMsg[] = "\n\ + [%s]:\n\ + Zipfile is disk %u of a multi-disk archive, and this is not the disk on\n\ + which the central zipfile directory begins (disk %u).\n"; + static ZCONST char Far EndCentDirBogus[] = + "\nwarning [%s]: end-of-central-directory record claims this\n\ + is disk %u but that the central directory starts on disk %u; this is a\n\ + contradiction. Attempting to process anyway.\n"; +# ifdef NO_MULTIPART + static ZCONST char Far NoMultiDiskArcSupport[] = + "\nerror [%s]: zipfile is part of multi-disk archive\n\ + (sorry, not yet supported).\n"; + static ZCONST char Far MaybePakBug[] = "warning [%s]:\ + zipfile claims to be 2nd disk of a 2-part archive;\n\ + attempting to process anyway. If no further errors occur, this archive\n\ + was probably created by PAK v2.51 or earlier. This bug was reported to\n\ + NoGate in March 1991 and was supposed to have been fixed by mid-1991; as\n\ + of mid-1992 it still hadn't been. (If further errors do occur, archive\n\ + was probably created by PKZIP 2.04c or later; UnZip does not yet support\n\ + multi-part archives.)\n"; +# else + static ZCONST char Far MaybePakBug[] = "warning [%s]:\ + zipfile claims to be last disk of a multi-part archive;\n\ + attempting to process anyway, assuming all parts have been concatenated\n\ + together in order. Expect \"errors\" and warnings...true multi-part support\ +\n doesn't exist yet (coming soon).\n"; +# endif + static ZCONST char Far ExtraBytesAtStart[] = + "warning [%s]: %ld extra byte%s at beginning or within zipfile\n\ + (attempting to process anyway)\n"; +#endif /* ?SFX */ + +static ZCONST char Far MissingBytes[] = + "error [%s]: missing %ld bytes in zipfile\n\ + (attempting to process anyway)\n"; +static ZCONST char Far NullCentDirOffset[] = + "error [%s]: NULL central directory offset\n\ + (attempting to process anyway)\n"; +static ZCONST char Far ZipfileEmpty[] = "warning [%s]: zipfile is empty\n"; +static ZCONST char Far CentDirStartNotFound[] = + "error [%s]: start of central directory not found;\n\ + zipfile corrupt.\n%s"; +#ifndef SFX + static ZCONST char Far CentDirTooLong[] = + "error [%s]: reported length of central directory is\n\ + %ld bytes too long (Atari STZip zipfile? J.H.Holm ZIPSPLIT 1.1\n\ + zipfile?). Compensating...\n"; + static ZCONST char Far CentDirEndSigNotFound[] = "\ + End-of-central-directory signature not found. Either this file is not\n\ + a zipfile, or it constitutes one disk of a multi-part archive. In the\n\ + latter case the central directory and zipfile comment will be found on\n\ + the last disk(s) of this archive.\n"; +#else /* SFX */ + static ZCONST char Far CentDirEndSigNotFound[] = + " End-of-central-directory signature not found.\n"; +#endif /* ?SFX */ +static ZCONST char Far ZipfileCommTrunc1[] = + "\ncaution: zipfile comment truncated\n"; + + + + +/*******************************/ +/* Function process_zipfiles() */ +/*******************************/ + +int process_zipfiles(__G) /* return PK-type error code */ + __GDEF +{ +#ifndef SFX + char *lastzipfn = (char *)NULL; + int NumWinFiles, NumLoseFiles, NumWarnFiles; + int NumMissDirs, NumMissFiles; +#endif + int error=0, error_in_archive=0; + extern unsigned current_file; + extern char installdir2[]; + + +/*--------------------------------------------------------------------------- + Start by allocating buffers and (re)constructing the various PK signature + strings. + ---------------------------------------------------------------------------*/ + + G.inbuf = (uch *)malloc(INBUFSIZ + 4); /* 4 extra for hold[] (below) */ + G.outbuf = (uch *)malloc(OUTBUFSIZ + 1); /* 1 extra for string term. */ + + if ((G.inbuf == (uch *)NULL) || (G.outbuf == (uch *)NULL)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotAllocateBuffers))); + return(PK_MEM); + } + G.hold = G.inbuf + INBUFSIZ; /* to check for boundary-spanning sigs */ +#ifndef VMS /* VMS uses its own buffer scheme for textmode flush(). */ +#ifdef SMALL_MEM + G.outbuf2 = G.outbuf+RAWBUFSIZ; /* never changes */ +#endif +#endif /* !VMS */ + +#if 0 /* CRC_32_TAB has been NULLified by CONSTRUCTGLOBALS !!!! */ + /* allocate the CRC table only later when we know we have a zipfile */ + CRC_32_TAB = NULL; +#endif /* 0 */ + + /* finish up initialization of magic signature strings */ + local_hdr_sig[0] /* = extd_local_sig[0] */ = 0x50; /* ASCII 'P', */ + central_hdr_sig[0] = end_central_sig[0] = 0x50; /* not EBCDIC */ + + local_hdr_sig[1] /* = extd_local_sig[1] */ = 0x4B; /* ASCII 'K', */ + central_hdr_sig[1] = end_central_sig[1] = 0x4B; /* not EBCDIC */ + +/*--------------------------------------------------------------------------- + Make sure timezone info is set correctly; localtime() returns GMT on + some OSes (e.g., Solaris 2.x) if this isn't done first. The ifdefs were + initially copied from dos_to_unix_time() in fileio.c. probably, they are + still too strict; any listed OS that supplies tzset(), regardless of + whether the function does anything, should be removed from the ifdefs. + ---------------------------------------------------------------------------*/ + +#if (defined(IZ_CHECK_TZ) && defined(USE_EF_UT_TIME)) +# ifndef VALID_TIMEZONE +# define VALID_TIMEZONE(tmp) \ + (((tmp = getenv("TZ")) != NULL) && (*tmp != '\0')) +# endif + { + char *p; + G.tz_is_valid = VALID_TIMEZONE(p); +# ifndef SFX + if (!G.tz_is_valid) { + Info(slide, 0x401, ((char *)slide, LoadFarString(WarnInvalidTZ))); + error_in_archive = error = PK_WARN; + } +# endif /* !SFX */ + } +#endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */ + +/* For systems that do not have tzset() but supply this function using another + name (_tzset() or something similar), an appropiate "#define tzset ..." + should be added to the system specifc configuration section. */ +#if (!defined(T20_VMS) && !defined(MACOS) && !defined(RISCOS) && !defined(QDOS)) +#if (!defined(BSD) && !defined(MTS) && !defined(CMS_MVS) && !defined(TANDEM)) + tzset(); +#endif +#endif + +/*--------------------------------------------------------------------------- + Match (possible) wildcard zipfile specification with existing files and + attempt to process each. If no hits, try again after appending ".zip" + suffix. If still no luck, give up. + ---------------------------------------------------------------------------*/ + +#ifdef SFX + if ((error = do_seekable(__G__ 0)) == PK_NOZIP) { +#ifdef EXE_EXTENSION + int len=strlen(G.argv0); + + /* append .exe if appropriate; also .sfx? */ + if ( (G.zipfn = (char *)malloc(len+sizeof(EXE_EXTENSION))) != + (char *)NULL ) { + strcpy(G.zipfn, G.argv0); + strcpy(G.zipfn+len, EXE_EXTENSION); + error = do_seekable(__G__ 0); + free(G.zipfn); + G.zipfn = G.argv0; /* for "cannot find myself" message only */ + } +#endif /* EXE_EXTENSION */ +#ifdef WIN32 + G.zipfn = G.argv0; /* for "cannot find myself" message only */ +#endif + } + if (error) { + if (error == IZ_DIR) + error_in_archive = PK_NOZIP; + else + error_in_archive = error; + if (error == PK_NOZIP) + Info(slide, 1, ((char *)slide, LoadFarString(CannotFindMyself), + G.zipfn)); + } + +#else /* !SFX */ + NumWinFiles = NumLoseFiles = NumWarnFiles = 0; + current_file = NumMissDirs = NumMissFiles = 0; + + while ((G.zipfn = do_wild(__G__ G.wildzipfn)) != (char *)NULL) { + Trace((stderr, "do_wild( %s ) returns %s\n", G.wildzipfn, G.zipfn)); + + lastzipfn = G.zipfn; + + /* print a blank line between the output of different zipfiles */ + if (!uO.qflag && error != PK_NOZIP && error != IZ_DIR +#ifdef TIMESTAMP + && (!uO.T_flag || uO.zipinfo_mode) +#endif + && (NumWinFiles+NumLoseFiles+NumWarnFiles+NumMissFiles) > 0) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + + if ((error = do_seekable(__G__ 0)) == PK_WARN) + ++NumWarnFiles; + else if (error == IZ_DIR) + ++NumMissDirs; + else if (error == PK_NOZIP) + ++NumMissFiles; + else if (error) + ++NumLoseFiles; + else + ++NumWinFiles; + + current_file = NumWinFiles; + + if(installstate == INSTALLING) + DoGUI(); + + if (error != IZ_DIR && error > error_in_archive) + error_in_archive = error; + Trace((stderr, "do_seekable(0) returns %d\n", error)); +#ifdef WINDLL + if (error == IZ_CTRLC) { + free_G_buffers(__G); + return error; + } +#endif + + } /* end while-loop (wildcard zipfiles) */ + + if ((NumWinFiles + NumWarnFiles + NumLoseFiles) == 0 && + (NumMissDirs + NumMissFiles) == 1 && lastzipfn != (char *)NULL) + { + NumMissDirs = NumMissFiles = 0; + if (error_in_archive == PK_NOZIP) + error_in_archive = PK_COOL; + +#if (!defined(UNIX) && !defined(AMIGA)) /* filenames with wildcard characters */ + if (iswild(G.wildzipfn)) + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotFindWildcardMatch), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn)); + else +#endif + { + char *p = lastzipfn + strlen(lastzipfn); + + G.zipfn = lastzipfn; + strcpy(p, ZSUFX); + +#if defined(UNIX) || defined(QDOS) + /* only Unix has case-sensitive filesystems */ + /* Well FlexOS (sometimes) also has them, but support is per media */ + /* and a pig to code for, so treat as case insensitive for now */ + /* we do this under QDOS to check for .zip as well as _zip */ + if ((error = do_seekable(__G__ 0)) == PK_NOZIP || error == IZ_DIR) { + if (error == IZ_DIR) + ++NumMissDirs; + strcpy(p, ALT_ZSUFX); + error = do_seekable(__G__ 1); + } +#else + error = do_seekable(__G__ 1); +#endif + if (error == PK_WARN) /* GRR: make this a switch/case stmt ... */ + ++NumWarnFiles; + else if (error == IZ_DIR) + ++NumMissDirs; + else if (error == PK_NOZIP) + /* increment again => bug: "1 file had no zipfile directory." */ + /* ++NumMissFiles */ ; + else if (error) + ++NumLoseFiles; + else + ++NumWinFiles; + + if (error > error_in_archive) + error_in_archive = error; + Trace((stderr, "do_seekable(1) returns %d\n", error)); +#ifdef WINDLL + if (error == IZ_CTRLC) { + free_G_buffers(__G); + return error; + } +#endif + } + } +#endif /* ?SFX */ + +/*--------------------------------------------------------------------------- + Print summary of all zipfiles, assuming zipfile spec was a wildcard (no + need for a summary if just one zipfile). + ---------------------------------------------------------------------------*/ + +#ifndef SFX + if (iswild(G.wildzipfn) && uO.qflag < 3 +#ifdef TIMESTAMP + && !(uO.T_flag && uO.qflag && !uO.zipinfo_mode) +#endif + ) + { + if ((NumMissFiles + NumLoseFiles + NumWarnFiles > 0 || NumWinFiles != 1) +#ifdef TIMESTAMP + && !(uO.T_flag && !uO.zipinfo_mode) +#endif + && !(uO.tflag && uO.qflag > 1)) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0x401); + if ((NumWinFiles > 1) || (NumWinFiles == 1 && + NumMissDirs + NumMissFiles + NumLoseFiles + NumWarnFiles > 0)) + Info(slide, 0x401, ((char *)slide, LoadFarString(FilesProcessOK), + NumWinFiles, (NumWinFiles == 1)? " was" : "s were")); + if (NumWarnFiles > 0) + Info(slide, 0x401, ((char *)slide, LoadFarString(ArchiveWarning), + NumWarnFiles, (NumWarnFiles == 1)? "" : "s")); + if (NumLoseFiles > 0) + Info(slide, 0x401, ((char *)slide, LoadFarString(ArchiveFatalError), + NumLoseFiles, (NumLoseFiles == 1)? "" : "s")); + if (NumMissFiles > 0) + Info(slide, 0x401, ((char *)slide, + LoadFarString(FileHadNoZipfileDir), NumMissFiles, + (NumMissFiles == 1)? "" : "s")); + if (NumMissDirs == 1) + Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileWasDir))); + else if (NumMissDirs > 0) + Info(slide, 0x401, ((char *)slide, + LoadFarString(ManyZipfilesWereDir), NumMissDirs)); + if (NumWinFiles + NumLoseFiles + NumWarnFiles == 0) + Info(slide, 0x401, ((char *)slide, LoadFarString(NoZipfileFound))); + } +#endif /* !SFX */ + + /* free allocated memory */ + free_G_buffers(__G); + + return error_in_archive; + +} /* end function process_zipfiles() */ + + + + + +/*****************************/ +/* Function free_G_buffers() */ +/*****************************/ + +void free_G_buffers(__G) /* releases all memory allocated in global vars */ + __GDEF +{ + inflate_free(__G); + checkdir(__G__ (char *)NULL, END); + +#ifdef DYNALLOC_CRCTAB + if (CRC_32_TAB) { + free_crc_table(); + CRC_32_TAB = NULL; + } +#endif + + if (G.key != (char *)NULL) { + free(G.key); + G.key = (char *)NULL; + } + +#if (!defined(VMS) && !defined(SMALL_MEM)) + /* VMS uses its own buffer scheme for textmode flush() */ + if (G.outbuf2) { + free(G.outbuf2); /* malloc'd ONLY if unshrink and -a */ + G.outbuf2 = (uch *)NULL; + } +#endif + + if (G.outbuf) + free(G.outbuf); + if (G.inbuf) + free(G.inbuf); + G.inbuf = G.outbuf = (uch *)NULL; + +#ifdef MALLOC_WORK + if (G.area.Slide) { + free(G.area.Slide); + G.area.Slide = (uch *)NULL; + } +#endif + +} /* end function free_G_buffers() */ + + + + + +/**************************/ +/* Function do_seekable() */ +/**************************/ + +static int do_seekable(__G__ lastchance) /* return PK-type error code */ + __GDEF + int lastchance; +{ +#ifndef SFX + /* static int no_ecrec = FALSE; SKM: moved to globals.h */ + int maybe_exe=FALSE; + int too_weird_to_continue=FALSE; +#ifdef TIMESTAMP + time_t uxstamp; + unsigned nmember = 0; +#endif +#endif + int error=0, error_in_archive; + + +/*--------------------------------------------------------------------------- + Open the zipfile for reading in BINARY mode to prevent CR/LF translation, + which would corrupt the bit streams. + ---------------------------------------------------------------------------*/ + +#if 0 + if (SSTAT(G.zipfn, &G.statbuf) || + (error = S_ISDIR(G.statbuf.st_mode)) != 0) + { +#ifndef SFX + if (lastchance) { +#if defined(UNIX) || defined(QDOS) + if (G.no_ecrec) + Info(slide, 1, ((char *)slide, + LoadFarString(CannotFindZipfileDirMsg), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, uO.zipinfo_mode? " " : "", G.wildzipfn, + G.zipfn)); + else + Info(slide, 1, ((char *)slide, + LoadFarString(CannotFindEitherZipfile), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, G.wildzipfn, G.zipfn)); +#else /* !UNIX */ + if (G.no_ecrec) + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotFindZipfileDirMsg), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, uO.zipinfo_mode? " " : "", G.zipfn)); + else + Info(slide, 0x401, ((char *)slide, + LoadFarString(CannotFindEitherZipfile), uO.zipinfo_mode? + LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip), + G.wildzipfn, G.zipfn)); +#endif /* ?UNIX */ + } +#endif /* !SFX */ + return error? IZ_DIR : PK_NOZIP; + } + G.ziplen = G.statbuf.st_size; +#endif + G.ziplen = acesize(); + +#ifndef SFX +#if defined(UNIX) || defined(DOS_OS2_W32) + if (G.statbuf.st_mode & S_IEXEC) /* no extension on Unix exes: might */ + maybe_exe = TRUE; /* find unzip, not unzip.zip; etc. */ +#endif +#endif /* !SFX */ + +#ifdef VMS + if (check_format(__G)) /* check for variable-length format */ + return PK_ERR; +#endif + + if (open_input_file(__G)) /* this should never happen, given */ + return PK_NOZIP; /* the stat() test above, but... */ + +/*--------------------------------------------------------------------------- + Find and process the end-of-central-directory header. UnZip need only + check last 65557 bytes of zipfile: comment may be up to 65535, end-of- + central-directory record is 18 bytes, and signature itself is 4 bytes; + add some to allow for appended garbage. Since ZipInfo is often used as + a debugging tool, search the whole zipfile if zipinfo_mode is true. + ---------------------------------------------------------------------------*/ + + /* initialize the CRC table pointer (once) */ + if (CRC_32_TAB == NULL) { + if ((CRC_32_TAB = get_crc_table()) == NULL) + return PK_MEM; + } + +#if (!defined(SFX) || defined(SFX_EXDIR)) + /* check out if specified extraction root directory exists */ + if (uO.exdir != (char *)NULL && G.extract_flag) { + G.create_dirs = !uO.fflag; + if ((error = checkdir(__G__ uO.exdir, ROOT)) > 2) + return error; /* out of memory, or file in way */ + } +#endif /* !SFX || SFX_EXDIR */ + + G.cur_zipfile_bufstart = 0; + G.inptr = G.inbuf; + +#if (!defined(WINDLL) && !defined(SFX)) +#ifdef TIMESTAMP + if (!uO.zipinfo_mode && !uO.qflag && !uO.T_flag) +#else + if (!uO.zipinfo_mode && !uO.qflag) +#endif +#ifdef WIN32 /* Win32 console may require codepage conversion for G.zipfn */ + Info(slide, 0, ((char *)slide, "Archive: %s\n", FnFilter1(G.zipfn))); +#else + Info(slide, 0, ((char *)slide, "Archive: %s\n", G.zipfn)); +#endif +#endif /* !WINDLL && !SFX */ + + if (( +#ifndef NO_ZIPINFO + uO.zipinfo_mode && + ((error_in_archive = find_ecrec(__G__ G.ziplen)) != 0 || + (error_in_archive = zi_end_central(__G)) > PK_WARN)) + || (!uO.zipinfo_mode && +#endif + ((error_in_archive = find_ecrec(__G__ MIN(G.ziplen,66000L))) != 0 || + (error_in_archive = uz_end_central(__G)) > PK_WARN))) + { + CLOSE_INFILE(); + +#ifdef SFX + ++lastchance; /* avoid picky compiler warnings */ + return error_in_archive; +#else + if (maybe_exe) + Info(slide, 0x401, ((char *)slide, LoadFarString(MaybeExe), + G.zipfn)); + if (lastchance) + return error_in_archive; + else { + G.no_ecrec = TRUE; /* assume we found wrong file: e.g., */ + return PK_NOZIP; /* unzip instead of unzip.zip */ + } +#endif /* ?SFX */ + } + + if ((uO.zflag > 0) && !uO.zipinfo_mode) { /* unzip: zflag = comment ONLY */ + CLOSE_INFILE(); + return error_in_archive; + } + +/*--------------------------------------------------------------------------- + Test the end-of-central-directory info for incompatibilities (multi-disk + archives) or inconsistencies (missing or extra bytes in zipfile). + ---------------------------------------------------------------------------*/ + +#ifdef NO_MULTIPART + error = !uO.zipinfo_mode && (G.ecrec.number_this_disk == 1) && + (G.ecrec.num_disk_start_cdir == 1); +#else + error = !uO.zipinfo_mode && (G.ecrec.number_this_disk != 0); +#endif + +#ifndef SFX + if (uO.zipinfo_mode && + G.ecrec.number_this_disk != G.ecrec.num_disk_start_cdir) + { + if (G.ecrec.number_this_disk > G.ecrec.num_disk_start_cdir) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentDirNotInZipMsg), G.zipfn, + G.ecrec.number_this_disk, G.ecrec.num_disk_start_cdir)); + error_in_archive = PK_FIND; + too_weird_to_continue = TRUE; + } else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(EndCentDirBogus), G.zipfn, + G.ecrec.number_this_disk, G.ecrec.num_disk_start_cdir)); + error_in_archive = PK_WARN; + } +#ifdef NO_MULTIPART /* concatenation of multiple parts works in some cases */ + } else if (!uO.zipinfo_mode && !error && G.ecrec.number_this_disk != 0) { + Info(slide, 0x401, ((char *)slide, LoadFarString(NoMultiDiskArcSupport), + G.zipfn)); + error_in_archive = PK_FIND; + too_weird_to_continue = TRUE; +#endif + } + + if (!too_weird_to_continue) { /* (relatively) normal zipfile: go for it */ + if (error) { + Info(slide, 0x401, ((char *)slide, LoadFarString(MaybePakBug), + G.zipfn)); + error_in_archive = PK_WARN; + } +#endif /* !SFX */ + if ((G.extra_bytes = G.real_ecrec_offset-G.expect_ecrec_offset) < + (LONGINT)0) + { + Info(slide, 0x401, ((char *)slide, LoadFarString(MissingBytes), + G.zipfn, (long)(-G.extra_bytes))); + error_in_archive = PK_ERR; + } else if (G.extra_bytes > 0) { + if ((G.ecrec.offset_start_central_directory == 0) && + (G.ecrec.size_central_directory != 0)) /* zip 1.5 -go bug */ + { + Info(slide, 0x401, ((char *)slide, + LoadFarString(NullCentDirOffset), G.zipfn)); + G.ecrec.offset_start_central_directory = G.extra_bytes; + G.extra_bytes = 0; + error_in_archive = PK_ERR; + } +#ifndef SFX + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExtraBytesAtStart), G.zipfn, + (long)G.extra_bytes, (G.extra_bytes == 1)? "":"s")); + error_in_archive = PK_WARN; + } +#endif /* !SFX */ + } + + /*----------------------------------------------------------------------- + Check for empty zipfile and exit now if so. + -----------------------------------------------------------------------*/ + + if (G.expect_ecrec_offset==0L && G.ecrec.size_central_directory==0) { + if (uO.zipinfo_mode) + Info(slide, 0, ((char *)slide, "%sEmpty zipfile.\n", + uO.lflag>9? "\n " : "")); + else + Info(slide, 0x401, ((char *)slide, LoadFarString(ZipfileEmpty), + G.zipfn)); + CLOSE_INFILE(); + return (error_in_archive > PK_WARN)? error_in_archive : PK_WARN; + } + + /*----------------------------------------------------------------------- + Compensate for missing or extra bytes, and seek to where the start + of central directory should be. If header not found, uncompensate + and try again (necessary for at least some Atari archives created + with STZip, as well as archives created by J.H. Holm's ZIPSPLIT 1.1). + -----------------------------------------------------------------------*/ + + ZLSEEK( G.ecrec.offset_start_central_directory ) +#ifdef OLD_SEEK_TEST + if (readbuf(G.sig, 4) == 0) { + CLOSE_INFILE(); + return PK_ERR; /* file may be locked, or possibly disk error(?) */ + } + if (strncmp(G.sig, central_hdr_sig, 4)) +#else + if ((readbuf(__G__ G.sig, 4) == 0) || + strncmp(G.sig, central_hdr_sig, 4)) +#endif + { +#ifndef SFX + long tmp = G.extra_bytes; +#endif + + G.extra_bytes = 0; + ZLSEEK( G.ecrec.offset_start_central_directory ) + if ((readbuf(__G__ G.sig, 4) == 0) || + strncmp(G.sig, central_hdr_sig, 4)) + { + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentDirStartNotFound), G.zipfn, + LoadFarStringSmall(ReportMsg))); + CLOSE_INFILE(); + return PK_BADERR; + } +#ifndef SFX + Info(slide, 0x401, ((char *)slide, LoadFarString(CentDirTooLong), + G.zipfn, -tmp)); +#endif + error_in_archive = PK_ERR; + } + + /*----------------------------------------------------------------------- + Seek to the start of the central directory one last time, since we + have just read the first entry's signature bytes; then list, extract + or test member files as instructed, and close the zipfile. + -----------------------------------------------------------------------*/ + + Trace((stderr, "about to extract/list files (error = %d)\n", + error_in_archive)); + + ZLSEEK( G.ecrec.offset_start_central_directory ) + +#ifdef DLL + /* G.fValidate is used only to look at an archive to see if + it appears to be a valid archive. There is no interest + in what the archive contains, nor in validating that the + entries in the archive are in good condition. This is + currently used only in the Windows DLLs for purposes of + checking archives within an archive to determine whether + or not to display the inner archives. + */ + if (!G.fValidate) +#endif + { +#ifndef NO_ZIPINFO + if (uO.zipinfo_mode) + error = zipinfo(__G); /* ZIPINFO 'EM */ + else +#endif +#ifndef SFX +#ifdef TIMESTAMP + if (uO.T_flag) + error = get_time_stamp(__G__ &uxstamp, &nmember); + else +#endif + if (uO.vflag && !uO.tflag && !uO.cflag) + error = list_files(__G); /* LIST 'EM */ + else +#endif /* !SFX */ + error = extract_or_test_files(__G); /* EXTRACT OR TEST 'EM */ + + Trace((stderr, "done with extract/list files (error = %d)\n", + error)); + } + + if (error > error_in_archive) /* don't overwrite stronger error */ + error_in_archive = error; /* with (for example) a warning */ +#ifndef SFX + } /* end if (!too_weird_to_continue) */ +#endif + + CLOSE_INFILE(); + +#ifdef TIMESTAMP + if (uO.T_flag && !uO.zipinfo_mode && (nmember > 0)) { +# ifdef WIN32 + if (stamp_file(__G__ G.zipfn, uxstamp)) { /* TIME-STAMP 'EM */ +# else + if (stamp_file(G.zipfn, uxstamp)) { /* TIME-STAMP 'EM */ +# endif + Info(slide, 0x201, ((char *)slide, + "warning: cannot set time for %s\n", G.zipfn)); + if (error_in_archive < PK_WARN) + error_in_archive = PK_WARN; + } + } +#endif + return error_in_archive; + +} /* end function do_seekable() */ + + + + + +/*************************/ +/* Function find_ecrec() */ +/*************************/ + +static int find_ecrec(__G__ searchlen) /* return PK-class error */ + __GDEF + long searchlen; +{ + int i, numblks, found=FALSE; + LONGINT tail_len; + ec_byte_rec byterec; + + +/*--------------------------------------------------------------------------- + Treat case of short zipfile separately. + ---------------------------------------------------------------------------*/ + + if (G.ziplen <= INBUFSIZ) { + acelseek(0L, SEEK_SET); + if ((G.incnt = aceread((char *)G.inbuf,(unsigned int)G.ziplen)) + == (int)G.ziplen) + + /* 'P' must be at least 22 bytes from end of zipfile */ + for (G.inptr = G.inbuf+(int)G.ziplen-22; G.inptr >= G.inbuf; + --G.inptr) + if ((native(*G.inptr) == 'P') && + !strncmp((char *)G.inptr, end_central_sig, 4)) { + G.incnt -= (int)(G.inptr - G.inbuf); + found = TRUE; + break; + } + +/*--------------------------------------------------------------------------- + Zipfile is longer than INBUFSIZ: may need to loop. Start with short + block at end of zipfile (if not TOO short). + ---------------------------------------------------------------------------*/ + + } else { + if ((tail_len = G.ziplen % INBUFSIZ) > ECREC_SIZE) { +#ifdef USE_STRM_INPUT + fseek((FILE *)G.zipfd, G.ziplen-tail_len, SEEK_SET); + G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); +#else /* !USE_STRM_INPUT */ + G.cur_zipfile_bufstart = acelseek(G.ziplen-tail_len, + SEEK_SET); +#endif /* ?USE_STRM_INPUT */ + if ((G.incnt = aceread((char *)G.inbuf, + (unsigned int)tail_len)) != (int)tail_len) + goto fail; /* it's expedient... */ + + /* 'P' must be at least 22 bytes from end of zipfile */ + for (G.inptr = G.inbuf+(int)tail_len-22; G.inptr >= G.inbuf; + --G.inptr) + if ((native(*G.inptr) == 'P') && + !strncmp((char *)G.inptr, end_central_sig, 4)) { + G.incnt -= (int)(G.inptr - G.inbuf); + found = TRUE; + break; + } + /* sig may span block boundary: */ + strncpy((char *)G.hold, (char *)G.inbuf, 3); + } else + G.cur_zipfile_bufstart = G.ziplen - tail_len; + + /*----------------------------------------------------------------------- + Loop through blocks of zipfile data, starting at the end and going + toward the beginning. In general, need not check whole zipfile for + signature, but may want to do so if testing. + -----------------------------------------------------------------------*/ + + numblks = (int)((searchlen - tail_len + (INBUFSIZ-1)) / INBUFSIZ); + /* ==amount= ==done== ==rounding== =blksiz= */ + + for (i = 1; !found && (i <= numblks); ++i) { + G.cur_zipfile_bufstart -= INBUFSIZ; + acelseek(G.cur_zipfile_bufstart, SEEK_SET); + if ((G.incnt = aceread((char *)G.inbuf,INBUFSIZ)) + != INBUFSIZ) + break; /* fall through and fail */ + + for (G.inptr = G.inbuf+INBUFSIZ-1; G.inptr >= G.inbuf; + --G.inptr) + if ((native(*G.inptr) == 'P') && + !strncmp((char *)G.inptr, end_central_sig, 4)) { + G.incnt -= (int)(G.inptr - G.inbuf); + found = TRUE; + break; + } + /* sig may span block boundary: */ + strncpy((char *)G.hold, (char *)G.inbuf, 3); + } + } /* end if (ziplen > INBUFSIZ) */ + +/*--------------------------------------------------------------------------- + Searched through whole region where signature should be without finding + it. Print informational message and die a horrible death. + ---------------------------------------------------------------------------*/ + +fail: + if (!found) { + if (uO.qflag || uO.zipinfo_mode) + Info(slide, 0x401, ((char *)slide, "[%s]\n", G.zipfn)); + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentDirEndSigNotFound))); + return PK_ERR; /* failed */ + } + +/*--------------------------------------------------------------------------- + Found the signature, so get the end-central data before returning. Do + any necessary machine-type conversions (byte ordering, structure padding + compensation) by reading data into character array and copying to struct. + ---------------------------------------------------------------------------*/ + + G.real_ecrec_offset = G.cur_zipfile_bufstart + (G.inptr-G.inbuf); +#ifdef TEST + pipeit("\n found end-of-central-dir signature at offset %ld (%.8lXh)\n", + G.real_ecrec_offset, G.real_ecrec_offset); + pipeit(" from beginning of file; offset %d (%.4Xh) within block\n", + G.inptr-G.inbuf, G.inptr-G.inbuf); +#endif + + if (readbuf(__G__ (char *)byterec, ECREC_SIZE+4) == 0) + return PK_EOF; + + G.ecrec.number_this_disk = + makeword(&byterec[NUMBER_THIS_DISK]); + G.ecrec.num_disk_start_cdir = + makeword(&byterec[NUM_DISK_WITH_START_CENTRAL_DIR]); + G.ecrec.num_entries_centrl_dir_ths_disk = + makeword(&byterec[NUM_ENTRIES_CENTRL_DIR_THS_DISK]); + G.ecrec.total_entries_central_dir = + makeword(&byterec[TOTAL_ENTRIES_CENTRAL_DIR]); + G.ecrec.size_central_directory = + makelong(&byterec[SIZE_CENTRAL_DIRECTORY]); + G.ecrec.offset_start_central_directory = + makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]); + G.ecrec.zipfile_comment_length = + makeword(&byterec[ZIPFILE_COMMENT_LENGTH]); + + G.expect_ecrec_offset = G.ecrec.offset_start_central_directory + + G.ecrec.size_central_directory; + return PK_COOL; + +} /* end function find_ecrec() */ + + + + + +/*****************************/ +/* Function uz_end_central() */ +/*****************************/ + +int uz_end_central(__G) /* return PK-type error code */ + __GDEF +{ + int error = PK_COOL; + + +/*--------------------------------------------------------------------------- + Get the zipfile comment (up to 64KB long), if any, and print it out. + Then position the file pointer to the beginning of the central directory + and fill buffer. + ---------------------------------------------------------------------------*/ + +#ifdef WINDLL + /* for comment button: */ + if ((!G.fValidate) && (G.lpUserFunctions != NULL)) + G.lpUserFunctions->cchComment = G.ecrec.zipfile_comment_length; + if (G.ecrec.zipfile_comment_length && (uO.zflag > 0)) +#else /* !WINDLL */ + if (G.ecrec.zipfile_comment_length && (uO.zflag > 0 || + (uO.zflag == 0 && +#ifdef TIMESTAMP + !uO.T_flag && +#endif + !uO.qflag))) +#endif /* ?WINDLL */ + { + if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ZipfileCommTrunc1))); + error = PK_WARN; + } + } + return error; + +} /* end function uz_end_central() */ + + + + + +/************************************/ +/* Function process_cdir_file_hdr() */ +/************************************/ + +int process_cdir_file_hdr(__G) /* return PK-type error code */ + __GDEF +{ + int error; + + +/*--------------------------------------------------------------------------- + Get central directory info, save host and method numbers, and set flag + for lowercase conversion of filename, depending on the OS from which the + file is coming. + ---------------------------------------------------------------------------*/ + + if ((error = get_cdir_ent(__G)) != 0) + return error; + + G.pInfo->hostnum = MIN(G.crec.version_made_by[1], NUM_HOSTS); +/* extnum = MIN(crec.version_needed_to_extract[1], NUM_HOSTS); */ + + G.pInfo->lcflag = 0; + if (uO.L_flag) /* user specified case-conversion */ + switch (G.pInfo->hostnum) { + case FS_FAT_: /* PKZIP and zip -k store in uppercase */ + case CPM_: /* like MS-DOS, right? */ + case VM_CMS_: /* all caps? */ + case MVS_: /* all caps? */ + case TANDEM_: + case TOPS20_: + case VMS_: /* our Zip uses lowercase, but ASi's doesn't */ + /* case Z_SYSTEM_: ? */ + /* case QDOS_: ? */ + G.pInfo->lcflag = 1; /* convert filename to lowercase */ + break; + + default: /* AMIGA_, FS_HPFS_, FS_NTFS_, MAC_, UNIX_, ATARI_, */ + break; /* FS_VFAT_, BEOS_ (Z_SYSTEM_): no conversion */ + } + + /* do Amigas (AMIGA_) also have volume labels? */ + if (IS_VOLID(G.crec.external_file_attributes) && + (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ || + G.pInfo->hostnum == FS_NTFS_ || G.pInfo->hostnum == ATARI_)) + { + G.pInfo->vollabel = TRUE; + G.pInfo->lcflag = 0; /* preserve case of volume labels */ + } else + G.pInfo->vollabel = FALSE; + + return PK_COOL; + +} /* end function process_cdir_file_hdr() */ + + + + + +/***************************/ +/* Function get_cdir_ent() */ +/***************************/ + +int get_cdir_ent(__G) /* return PK-type error code */ + __GDEF +{ + cdir_byte_hdr byterec; + + +/*--------------------------------------------------------------------------- + Read the next central directory entry and do any necessary machine-type + conversions (byte ordering, structure padding compensation--do so by + copying the data from the array into which it was read (byterec) to the + usable struct (crec)). + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ (char *)byterec, CREC_SIZE) == 0) + return PK_EOF; + + G.crec.version_made_by[0] = byterec[C_VERSION_MADE_BY_0]; + G.crec.version_made_by[1] = byterec[C_VERSION_MADE_BY_1]; + G.crec.version_needed_to_extract[0] = + byterec[C_VERSION_NEEDED_TO_EXTRACT_0]; + G.crec.version_needed_to_extract[1] = + byterec[C_VERSION_NEEDED_TO_EXTRACT_1]; + + G.crec.general_purpose_bit_flag = + makeword(&byterec[C_GENERAL_PURPOSE_BIT_FLAG]); + G.crec.compression_method = + makeword(&byterec[C_COMPRESSION_METHOD]); + G.crec.last_mod_dos_datetime = + makelong(&byterec[C_LAST_MOD_DOS_DATETIME]); + G.crec.crc32 = + makelong(&byterec[C_CRC32]); + G.crec.csize = + makelong(&byterec[C_COMPRESSED_SIZE]); + G.crec.ucsize = + makelong(&byterec[C_UNCOMPRESSED_SIZE]); + G.crec.filename_length = + makeword(&byterec[C_FILENAME_LENGTH]); + G.crec.extra_field_length = + makeword(&byterec[C_EXTRA_FIELD_LENGTH]); + G.crec.file_comment_length = + makeword(&byterec[C_FILE_COMMENT_LENGTH]); + G.crec.disk_number_start = + makeword(&byterec[C_DISK_NUMBER_START]); + G.crec.internal_file_attributes = + makeword(&byterec[C_INTERNAL_FILE_ATTRIBUTES]); + G.crec.external_file_attributes = + makelong(&byterec[C_EXTERNAL_FILE_ATTRIBUTES]); /* LONG, not word! */ + G.crec.relative_offset_local_header = + makelong(&byterec[C_RELATIVE_OFFSET_LOCAL_HEADER]); + + return PK_COOL; + +} /* end function get_cdir_ent() */ + + + + + +/*************************************/ +/* Function process_local_file_hdr() */ +/*************************************/ + +int process_local_file_hdr(__G) /* return PK-type error code */ + __GDEF +{ + local_byte_hdr byterec; + + +/*--------------------------------------------------------------------------- + Read the next local file header and do any necessary machine-type con- + versions (byte ordering, structure padding compensation--do so by copy- + ing the data from the array into which it was read (byterec) to the + usable struct (lrec)). + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ (char *)byterec, LREC_SIZE) == 0) + return PK_EOF; + + G.lrec.version_needed_to_extract[0] = + byterec[L_VERSION_NEEDED_TO_EXTRACT_0]; + G.lrec.version_needed_to_extract[1] = + byterec[L_VERSION_NEEDED_TO_EXTRACT_1]; + + G.lrec.general_purpose_bit_flag = + makeword(&byterec[L_GENERAL_PURPOSE_BIT_FLAG]); + G.lrec.compression_method = makeword(&byterec[L_COMPRESSION_METHOD]); + G.lrec.last_mod_dos_datetime = makelong(&byterec[L_LAST_MOD_DOS_DATETIME]); + G.lrec.crc32 = makelong(&byterec[L_CRC32]); + G.lrec.csize = makelong(&byterec[L_COMPRESSED_SIZE]); + G.lrec.ucsize = makelong(&byterec[L_UNCOMPRESSED_SIZE]); + G.lrec.filename_length = makeword(&byterec[L_FILENAME_LENGTH]); + G.lrec.extra_field_length = makeword(&byterec[L_EXTRA_FIELD_LENGTH]); + + G.csize = (long) G.lrec.csize; + G.ucsize = (long) G.lrec.ucsize; + + if ((G.lrec.general_purpose_bit_flag & 8) != 0) { + /* can't trust local header, use central directory: */ + G.lrec.crc32 = G.pInfo->crc; + G.csize = (long)(G.lrec.csize = G.pInfo->compr_size); + G.ucsize = (long)(G.lrec.ucsize = G.pInfo->uncompr_size); + } + + return PK_COOL; + +} /* end function process_local_file_hdr() */ + + +#ifdef USE_EF_UT_TIME + +/*******************************/ +/* Function ef_scan_for_izux() */ +/*******************************/ + +unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime, + z_utim, z_uidgid) + uch *ef_buf; /* buffer containing extra field */ + unsigned ef_len; /* total length of extra field */ + int ef_is_c; /* flag indicating "is central extra field" */ + ulg dos_mdatetime; /* last_mod_file_date_time in DOS format */ + iztimes *z_utim; /* return storage: atime, mtime, ctime */ + ush *z_uidgid; /* return storage: uid and gid */ +{ + unsigned flags = 0; + unsigned eb_id; + unsigned eb_len; + int have_new_type_eb = FALSE; + int ut_zip_unzip_compatible = FALSE; + +/*--------------------------------------------------------------------------- + This function scans the extra field for EF_TIME, EF_IZUNIX2, EF_IZUNIX, or + EF_PKUNIX blocks containing Unix-style time_t (GMT) values for the entry's + access, creation, and modification time. + If a valid block is found, the time stamps are copied to the iztimes + structure (provided the z_utim pointer is not NULL). + If a IZUNIX2 block is found or the IZUNIX block contains UID/GID fields, + and the z_uidgid array pointer is valid (!= NULL), the owner info is + transfered as well. + The presence of an EF_TIME or EF_IZUNIX2 block results in ignoring all + data from probably present obsolete EF_IZUNIX blocks. + If multiple blocks of the same type are found, only the information from + the last block is used. + The return value is a combination of the EF_TIME Flags field with an + additional flag bit indicating the presence of valid UID/GID info, + or 0 in case of failure. + ---------------------------------------------------------------------------*/ + + if (ef_len == 0 || ef_buf == NULL || (z_utim == 0 && z_uidgid == NULL)) + return 0; + + TTrace((stderr,"\nef_scan_for_izux: scanning extra field of length %u\n", + ef_len)); + + while (ef_len >= EB_HEADSIZE) { + eb_id = makeword(EB_ID + ef_buf); + eb_len = makeword(EB_LEN + ef_buf); + + if (eb_len > (ef_len - EB_HEADSIZE)) { + /* discovered some extra field inconsistency! */ + TTrace((stderr, + "ef_scan_for_izux: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } + + switch (eb_id) { + case EF_TIME: + flags &= ~0x0ff; /* ignore previous IZUNIX or EF_TIME fields */ + have_new_type_eb = TRUE; + if ( eb_len >= EB_UT_MINLEN && z_utim != NULL) { + unsigned eb_idx = EB_UT_TIME1; + TTrace((stderr,"ef_scan_for_izux: found TIME extra field\n")); + flags |= (ef_buf[EB_HEADSIZE+EB_UT_FLAGS] & 0x0ff); + if ((flags & EB_UT_FL_MTIME)) { + if ((eb_idx+4) <= eb_len) { + z_utim->mtime = makelong((EB_HEADSIZE+eb_idx) + ef_buf); + eb_idx += 4; + TTrace((stderr," UT e.f. modification time = %ld\n", + z_utim->mtime)); + + if ((ulg)(z_utim->mtime) & (ulg)(0x80000000L)) { + ut_zip_unzip_compatible = + ((time_t)0x80000000L < (time_t)0L) + ? (dos_mdatetime == DOSTIME_MINIMUM) + : (dos_mdatetime >= DOSTIME_2038_01_18); + if (!ut_zip_unzip_compatible) { + /* UnZip interpretes mtime differently than Zip; + without modtime: ignore complete UT field */ + flags &= ~0x0ff; /* no time_t times available */ + TTrace((stderr, + " UT modtime range error; ignore e.f.!\n")); + break; /* stop scanning this field */ + } + } else { + /* cannot determine, safe assumption is FALSE */ + ut_zip_unzip_compatible = FALSE; + } + } else { + flags &= ~EB_UT_FL_MTIME; + TTrace((stderr," UT e.f. truncated; no modtime\n")); + } + } + if (ef_is_c) { + break; /* central version of TIME field ends here */ + } + + if (flags & EB_UT_FL_ATIME) { + if ((eb_idx+4) <= eb_len) { + z_utim->atime = makelong((EB_HEADSIZE+eb_idx) + ef_buf); + eb_idx += 4; + TTrace((stderr," UT e.f. access time = %ld\n", + z_utim->atime)); + if (((ulg)(z_utim->atime) & (ulg)(0x80000000L)) && + !ut_zip_unzip_compatible) { + flags &= ~EB_UT_FL_ATIME; + TTrace((stderr, + " UT access time range error: skip time!\n")); + } + } else { + flags &= ~EB_UT_FL_ATIME; + } + } + if (flags & EB_UT_FL_CTIME) { + if ((eb_idx+4) <= eb_len) { + z_utim->ctime = makelong((EB_HEADSIZE+eb_idx) + ef_buf); + TTrace((stderr," UT e.f. creation time = %ld\n", + z_utim->ctime)); + if (((ulg)(z_utim->ctime) & (ulg)(0x80000000L)) && + !ut_zip_unzip_compatible) { + flags &= ~EB_UT_FL_CTIME; + TTrace((stderr, + " UT creation time range error: skip time!\n")); + } + } else { + flags &= ~EB_UT_FL_CTIME; + } + } + } + break; + + case EF_IZUNIX2: + if (!have_new_type_eb) { + flags &= ~0x0ff; /* ignore any previous IZUNIX field */ + have_new_type_eb = TRUE; + } + if (eb_len >= EB_UX2_MINLEN && z_uidgid != NULL) { + z_uidgid[0] = makeword((EB_HEADSIZE+EB_UX2_UID) + ef_buf); + z_uidgid[1] = makeword((EB_HEADSIZE+EB_UX2_GID) + ef_buf); + flags |= EB_UX2_VALID; /* signal success */ + } + break; + + case EF_IZUNIX: + case EF_PKUNIX: /* PKUNIX e.f. layout is identical to IZUNIX */ + if (eb_len >= EB_UX_MINLEN) { + TTrace((stderr,"ef_scan_for_izux: found %s extra field\n", + (eb_id == EF_IZUNIX ? "IZUNIX" : "PKUNIX"))); + if (have_new_type_eb) { + break; /* Ignore IZUNIX extra field block ! */ + } + if (z_utim != NULL) { + z_utim->atime = makelong((EB_HEADSIZE+EB_UX_ATIME)+ef_buf); + z_utim->mtime = makelong((EB_HEADSIZE+EB_UX_MTIME)+ef_buf); + TTrace((stderr," Unix EF actime = %ld\n", z_utim->atime)); + TTrace((stderr," Unix EF modtime = %ld\n", z_utim->mtime)); + flags |= (EB_UT_FL_MTIME | EB_UT_FL_ATIME); + if ((ulg)(z_utim->mtime) & (ulg)(0x80000000L)) { + ut_zip_unzip_compatible = + ((time_t)0x80000000L < (time_t)0L) + ? (dos_mdatetime == DOSTIME_MINIMUM) + : (dos_mdatetime >= DOSTIME_2038_01_18); + if (!ut_zip_unzip_compatible) { + /* UnZip interpretes mtime differently than Zip; + without modtime: ignore complete UT field */ + flags &= ~0x0ff; /* no time_t times available */ + TTrace((stderr, + " UX modtime range error: ignore e.f.!\n")); + } + } else { + /* cannot determine, safe assumption is FALSE */ + ut_zip_unzip_compatible = FALSE; + } + if ((ulg)(z_utim->atime) & (ulg)(0x80000000L) && + !ut_zip_unzip_compatible && (flags & 0x0ff)) { + /* atime not in range of UnZip's time_t */ + flags &= ~EB_UT_FL_ATIME; + TTrace((stderr, + " UX access time range error: skip time!\n")); + } + } + if (eb_len >= EB_UX_FULLSIZE && z_uidgid != NULL) { + z_uidgid[0] = makeword((EB_HEADSIZE+EB_UX_UID) + ef_buf); + z_uidgid[1] = makeword((EB_HEADSIZE+EB_UX_GID) + ef_buf); + flags |= EB_UX2_VALID; + } + } + break; + + default: + break; + } + + /* Skip this extra field block */ + ef_buf += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + } + + return flags; +} + +#endif /* USE_EF_UT_TIME */ diff --git a/utils/Install/sfxzip/rexxapi.c b/utils/Install/sfxzip/rexxapi.c new file mode 100644 index 0000000000..43b4ddde3e --- /dev/null +++ b/utils/Install/sfxzip/rexxapi.c @@ -0,0 +1,886 @@ +/********************************************************************** +* REXXAPI.C * +* * +* This program adds a ZIP engine directly to the REXX language. * +* The functions are: * +* UZDropFuncs -- Makes all functions in this package * +* unknown to REXX. * +* UZLoadFuncs -- Makes all functions in this package * +* known to REXX so REXX programs may * +* call them. * +* UZFileTree -- Searches for files matching a given * +* filespec, including files in * +* subdirectories. * +* UZUnZip -- Unzip command-line entry point. * +* This is functionally equivalent to * +* using Unzip as an external program. * +* UZUnZipToVar -- Unzip one file to a variable * +* UZUnZipToStem -- Unzip files to a variable array * +* UZVer -- Returns the Unzip version number * +* * +**********************************************************************/ +/* Include files */ + +#ifdef OS2DLL + +#define INCL_DOS +#define INCL_DOSMEMMGR +#include +#include +#include +#include + +#define UNZIP_INTERNAL +#include "../unzip.h" +#include "../version.h" + + +/*********************************************************************/ +/* Various definitions used by various functions. */ +/*********************************************************************/ + +RexxFunctionHandler UZDropFuncs; +RexxFunctionHandler UZLoadFuncs; +RexxFunctionHandler UZFileTree; +RexxFunctionHandler UZUnZip; +RexxFunctionHandler UZUnZipToVar; +RexxFunctionHandler UZUnZipToStem; +RexxFunctionHandler UZVer; +RexxFunctionHandler UZAPIVer; + + +int SetOutputVar(__GPRO__ const char *name); +int SetOutputVarStem(__GPRO__ const char *name); +int SetOutputVarLength(__GPRO); +int WriteToVariable(__GPRO__ const char *name, char *buffer, int len); +int PrintToSubVariable(__GPRO__ int idx, const char *format,...); +int PrintToVariable(__GPRO__ const char *name, const char *format,...); +int _PrintToVariable(__GPRO__ const char *name, const char *format, va_list arg_ptr); +int TextSetNext(__GPRO__ char *format, int len, int all); + +#define EZRXSTRING(r,p) {(r).strptr=(PCH)p;(r).strlength=(ULONG)strlen((r).strptr);} + + +/*********************************************************************/ +/* RxFncTable */ +/* Array of names of the UNZIPAPI functions. */ +/* This list is used for registration and deregistration. */ +/*********************************************************************/ + +static PSZ RxFncTable[] = + { + "UZDropFuncs", + "UZLoadFuncs", + "UZFileSearch", + "UZFileTree", + "UZUnZip", + "UZUnZipToVar", + "UZUnZipToStem", + "UZVer", + }; + +/*********************************************************************/ +/* Numeric Error Return Strings */ +/*********************************************************************/ + +#define NO_UTIL_ERROR "0" /* No error whatsoever */ +#define ERROR_NOMEM "2" /* Insufficient memory */ + +/*********************************************************************/ +/* Numeric Return calls */ +/*********************************************************************/ + +#define INVALID_ROUTINE 40 /* Raise Rexx error */ +#define VALID_ROUTINE 0 /* Successful completion */ + +/*********************************************************************/ +/* Some useful macros */ +/*********************************************************************/ + +#define BUILDRXSTRING(t, s) { \ + strcpy((t)->strptr,(s));\ + (t)->strlength = strlen((s)); \ +} + + +/*********************************************************************/ +/**************** UNZIPAPI Supporting Functions ********************/ +/**************** UNZIPAPI Supporting Functions ********************/ +/**************** UNZIPAPI Supporting Functions ********************/ +/*********************************************************************/ + + +int RexxReturn(__GPRO__ int nodefault, RXSTRING *retstr) +{ + int ret = G.os2.rexx_error; + if (G.filenotfound) + G.os2.rexx_mes = "file not found"; + if (*G.os2.rexx_mes != '0') { + if (retstr->strlength > 255) { + DosFreeMem(retstr->strptr); + retstr->strptr = NULL; + } + } else if (nodefault) + goto noBuild; + BUILDRXSTRING(retstr, G.os2.rexx_mes); + noBuild: + DESTROYGLOBALS(); + return ret; +} + +/* Get a variable from REXX, return 0 if OK */ +int GetVariable(__GPRO__ const char *name) +{ + G.os2.request.shvnext = NULL; + EZRXSTRING(G.os2.request.shvname, name); + G.os2.request.shvnamelen = G.os2.request.shvname.strlength; + G.os2.request.shvvalue.strptr = G.os2.buffer; + G.os2.request.shvvalue.strlength = IBUF_LEN; + G.os2.request.shvvaluelen = IBUF_LEN; + G.os2.request.shvcode = RXSHV_SYFET; + G.os2.request.shvret = 0; + switch (RexxVariablePool(&G.os2.request)) { + case RXSHV_MEMFL: + G.os2.rexx_mes = ERROR_NOMEM; + break; + case RXSHV_BADN: + case RXSHV_NEWV: + G.os2.request.shvvaluelen = 0; + case RXSHV_OK: + *(G.os2.buffer+G.os2.request.shvvaluelen) = 0; + return G.os2.request.shvvaluelen; + } + return 0; +} + + +/* Get REXX compound variable */ +/* Stem must exist in G.os2.getvar_buf w/ length in G.os2.getvar_len */ +int GetVariableIndex(__GPRO__ int index) +{ + sprintf(G.os2.getvar_buf+G.os2.getvar_len,"%d",index); + return GetVariable(__G__ G.os2.getvar_buf); +} + + +/* Transfer REXX array to standard C string array */ +/* Returns number of elements */ +/* User is responsible for calling KillStringArray */ + +int CompoundToStringArray(__GPRO__ char ***pointer, const char *name) +{ + int count; + int total; + char **trav; + + G.os2.getvar_len = strlen(name); + memcpy(G.os2.getvar_buf,name,G.os2.getvar_len+1); + if (*(G.os2.getvar_buf+G.os2.getvar_len-1) != '.') + *(G.os2.getvar_buf+G.os2.getvar_len++) = '.', *(G.os2.getvar_buf+G.os2.getvar_len) = 0; + + if (GetVariableIndex(__G__ 0)) + return 0; + + total = atoi(G.os2.buffer); + *pointer = (char **)malloc((total+1)<<2); + trav = *pointer; + for (count = 1; count <= total; count++) { + GetVariableIndex(__G__ count); + trav[count-1] = (char *)malloc(strlen(G.os2.buffer)+1); + strcpy(trav[count-1],G.os2.buffer); + } + trav[count-1] = NULL; + return total; +} + + +/* Kill string array created by CompoundToStringArray */ + +void KillStringArray(char **pointer) +{ + char **trav=pointer; + while (*trav != NULL) { + free(*trav); + trav++; + } + free(pointer); +} + + +/************************************************************************* +* Function: UZDropFuncs * +* * +* Syntax: call UZDropFuncs * +* * +* Return: NO_UTIL_ERROR - Successful. * +*************************************************************************/ + +ULONG UZDropFuncs(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + INT entries; /* Num of entries */ + INT j; /* Counter */ + + if (numargs != 0) /* no arguments for this */ + return INVALID_ROUTINE; /* raise an error */ + + retstr->strlength = 0; /* return a null string result*/ + + entries = sizeof(RxFncTable)/sizeof(PSZ); + + for (j = 0; j < entries; j++) + RexxDeregisterFunction(RxFncTable[j]); + + return VALID_ROUTINE; /* no error on call */ +} + + +/************************************************************************* +* Function: UZFileTree * +* * +* Syntax: call UZFileTree zipfile, stem[, include-filespec] * +* [, exclude-filespec][, options] * +* * +* Params: zipfile - Name of zip file to search. * +* stem - Name of stem var to store results in. * +* include - Filespec to search for (may include * and ?). * +* exclude - Filespec to exclude (may include * and ?). * +* options - Either of the following: * +* 'F' - Give file statistics. * +* Length Date Time Name * +* 'Z' - Give zip statistics, too. * +* Length Method Size Ratio Date Time CRC-32 Name* +* Default is to return only filenames * +* * +* Return: NO_UTIL_ERROR - Successful. * +* ERROR_NOMEM - Out of memory. * +*************************************************************************/ + +ULONG UZFileTree(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + /* validate arguments */ + char *incname[2]; + char *excname[2]; + CONSTRUCTGLOBALS(); + + if (numargs < 2 || numargs > 5 || + !RXVALIDSTRING(args[0]) || + !RXVALIDSTRING(args[1]) || + args[0].strlength > 255) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + /* initialize data area */ + SetOutputVarStem(__G__ args[1].strptr); + G.wildzipfn = args[0].strptr; + G.process_all_files = TRUE; + + uO.lflag = 1; + uO.zipinfo_mode = TRUE; + uO.C_flag = 1; + G.extract_flag = FALSE; + uO.qflag = 2; + + if (numargs >= 3 && /* check third option */ + !RXNULLSTRING(args[2]) && + args[2].strlength > 0) { /* a zero length string isn't */ + if (!(G.filespecs = CompoundToStringArray(__G__ &G.pfnames,args[2].strptr))) { + G.pfnames = incname; + incname[0] = args[2].strptr; + incname[1] = NULL; + G.filespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs >= 4 && /* check third option */ + !RXNULLSTRING(args[3]) && + args[3].strlength > 0) { /* a zero length string isn't */ + if (!(G.xfilespecs = CompoundToStringArray(__G__ &G.pxnames,args[3].strptr))) { + G.pxnames = excname; + excname[0] = args[3].strptr; + excname[1] = NULL; + G.xfilespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs == 5 && /* check third option */ + !RXNULLSTRING(args[4]) && + args[4].strlength > 0) { /* a zero length string isn't */ + int first = *args[4].strptr & 0x5f; + + if (first == 'Z') + uO.vflag = 2, uO.lflag = 0, uO.zipinfo_mode = FALSE; + else if (first == 'F') + uO.vflag = 1, uO.lflag = 0, uO.zipinfo_mode = FALSE; + } + + process_zipfiles(__G); + SetOutputVarLength(__G); + if (G.filespecs > 0 && G.pfnames != incname) + KillStringArray(G.pfnames); + if (G.xfilespecs > 0 && G.pxnames != excname) + KillStringArray(G.pxnames); + return RexxReturn(__G__ 0,retstr); /* no error on call */ +} + + +/************************************************************************* +* Function: UZUnZipToVar * +* * +* Syntax: call UZUnZipToVar zipfile, filespec [, stem] * +* * +* Params: zipfile - Name of zip file to search. * +* filespec - File to extract * +* stem - If you specify a stem variable, the file will be * +* extracted to the variable, one line per index * +* In this case, 0 will be returned * +* * +* Return: Extracted file * +* ERROR_NOMEM - Out of memory. * +*************************************************************************/ + +ULONG UZUnZipToVar(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + CONSTRUCTGLOBALS(); + UzpBuffer *ub = (UzpBuffer *)retstr; + /* validate arguments */ + if (numargs < 2 || numargs > 3 || + !RXVALIDSTRING(args[0]) || + !RXVALIDSTRING(args[1]) || + args[0].strlength == 0 || + args[1].strlength == 0) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + + uO.C_flag = 1; + G.redirect_data=1; + if (numargs == 3) { + if (!RXVALIDSTRING(args[2]) || + RXNULLSTRING(args[1]) || + args[2].strlength == 0) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + SetOutputVarStem(__G__ args[2].strptr); + G.redirect_text = 0; + G.redirect_data++; + } + unzipToMemory(__G__ args[0].strptr, args[1].strptr, + G.redirect_data==1 ? ub : NULL); + return RexxReturn(__G__ G.redirect_data==1,retstr); +} + + +/************************************************************************* +* Function: UZUnZipToStem * +* * +* Syntax: call UZUnZipToStem zipfile, stem[, include-filespec] * +* [, exclude-filespec][, mode] * +* * +* Params: zipfile - Name of zip file to search. * +* stem - Name of stem var to store files in. * +* include - Filespec to search for (may include * and ?). * +* exclude - Filespec to exclude (may include * and ?). * +* mode - Specifies 'F'lat or 'T'ree mode. Umm, this is * +* hard to explain so I'll give an example, too. * +* Assuming a file unzip.zip containing: * +* unzip.c * +* unshrink.c * +* extract.c * +* os2/makefile.os2 * +* os2/os2.c * +* os2/dll/dll.def * +* os2/dll/unzipapi.c * +* * +* -- In flat mode, each file is stored in * +* stem.fullname i.e. stem."os2/dll/unzipapi.c" * +* A list of files is created in stem. * +* * +* Flat mode returns: * +* stem.0 = 7 * +* stem.1 = unzip.c * +* stem.2 = unshrink.c * +* stem.3 = extract.c * +* stem.4 = os2/makefile.os2 * +* stem.5 = os2/os2.c * +* stem.6 = os2/dll/dll.def * +* stem.7 = os2/dll/unzipapi.c * +* * +* And the following contain the contents of the * +* various programs: * +* stem.unzip.c * +* stem.unshrink.c * +* stem.extract.c * +* stem.os2/makefile.os2 * +* stem.os2/os2.c * +* stem.os2/dll/dll.def * +* stem.os2/dll/unzipapi.c * +* * +* -- In tree mode, slashes are converted to periods* +* in the pathname thus the above file would have* +* been stored in stem.os2.dll.unzipapi.c * +* The index would then be stored in stem.OS2. * +* DLL.. * +* * +* NOTE: All path names are converted to uppercase * +* * +* Tree mode returns: * +* stem.0 = 4 * +* stem.1 = unzip.c * +* stem.2 = unshrink.c * +* stem.3 = extract.c * +* stem.4 = OS2/ * +* * +* stem.OS2.0 = 3 * +* stem.OS2.1 = makefile.os2 * +* stem.OS2.2 = os2.c * +* stem.OS2.3 = DLL/ * +* * +* stem.OS2.DLL.0 = 2 * +* stem.OS2.DLL.1 = def * +* stem.OS2.DLL.2 = unzipapi.c * +* * +* And the following contain the contents of the * +* various programs: * +* stem.unzip.c * +* stem.unshrink.c * +* stem.extract.c * +* stem.OS2.makefile.os2 * +* stem.OS2.os2.c * +* stem.OS2.DLL.dll.def * +* stem.OS2.DLL.unzipapi.c * +* * +* * +* Return: NO_UTIL_ERROR - Successful. * +* ERROR_NOMEM - Out of memory. * +*************************************************************************/ + +ULONG UZUnZipToStem(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + char *incname[2]; + char *excname[2]; + CONSTRUCTGLOBALS(); + /* validate arguments */ + if (numargs < 2 || numargs > 5 || + !RXVALIDSTRING(args[0]) || + !RXVALIDSTRING(args[1]) || + args[0].strlength > 255) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + /* initialize data area */ + G.wildzipfn = args[0].strptr; + G.process_all_files = TRUE; + + uO.C_flag = 1; + G.extract_flag = TRUE; + SetOutputVarStem(__G__ args[1].strptr); + G.redirect_data = 3; + G.redirect_text = 0; + + if (numargs >= 3 && /* check third option */ + !RXNULLSTRING(args[2]) && + args[2].strlength > 0) { /* a zero length string isn't */ + if (!(G.filespecs = CompoundToStringArray(__G__ &G.pfnames,args[2].strptr))) { + G.pfnames = incname; + incname[0] = args[2].strptr; + incname[1] = NULL; + G.filespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs >= 4 && /* check third option */ + !RXNULLSTRING(args[3]) && + args[3].strlength > 0) { /* a zero length string isn't */ + if (!(G.xfilespecs = CompoundToStringArray(__G__ &G.pxnames,args[3].strptr))) { + G.pxnames = excname; + excname[0] = args[3].strptr; + excname[1] = NULL; + G.xfilespecs = 1; + } + G.process_all_files = FALSE; + } + + if (numargs == 5 && /* check third option */ + !RXNULLSTRING(args[4]) && + (*args[4].strptr & 0x5f) == 'T') { + G.redirect_data++; + G.os2.request.shvnext = NULL; + EZRXSTRING(G.os2.request.shvname, args[4].strptr); + G.os2.request.shvnamelen = G.os2.request.shvname.strlength; + G.os2.request.shvcode = RXSHV_SYDRO; + G.os2.request.shvret = 0; + RexxVariablePool(&G.os2.request); + } + + + uO.qflag = 2; + + process_zipfiles(__G); + if (G.filespecs > 0 && G.pfnames != incname) + KillStringArray(G.pfnames); + if (G.xfilespecs > 0 && G.pxnames != excname) + KillStringArray(G.pxnames); + if (G.redirect_data == 3) + SetOutputVarLength(__G); + return RexxReturn(__G__ 0,retstr); /* no error on call */ +} + + +/************************************************************************* +* Function: UZLoadFuncs * +* * +* Syntax: call UZLoadFuncs [option] * +* * +* Params: none * +* * +* Return: null string * +*************************************************************************/ + +ULONG UZLoadFuncs(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + INT entries; /* Num of entries */ + INT j; /* Counter */ + + retstr->strlength = 0; /* set return value */ + /* check arguments */ + if (numargs > 0) + return INVALID_ROUTINE; + + entries = sizeof(RxFncTable)/sizeof(PSZ); + + for (j = 0; j < entries; j++) { + RexxRegisterFunctionDll(RxFncTable[j], + "UNZIP32", RxFncTable[j]); + } + return VALID_ROUTINE; +} + + + +/************************************************************************* +* Function: UZVer * +* * +* Syntax: call UZVer * +* * +* Return: Version of Unzip * +*************************************************************************/ + +ULONG UZVer(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + if (numargs > 1) /* validate arg count */ + return INVALID_ROUTINE; + + if (numargs == 0 || (*args[0].strptr & 0x5f) != 'L') + /* strcpy( retstr->strptr, UZ_VERNUM ); "5.13a BETA" */ + sprintf( retstr->strptr, "%d.%d%d%s", UZ_MAJORVER, UZ_MINORVER, + PATCHLEVEL, BETALEVEL ); + else + /* strcpy( retstr->strptr, UZ_VERSION ); UZ_VERNUM" of 26 Sep 94" */ + sprintf( retstr->strptr, "%d.%d%d%s of %s", UZ_MAJORVER, UZ_MINORVER, + PATCHLEVEL, BETALEVEL, VERSION_DATE ); + retstr->strlength = strlen(retstr->strptr); + return VALID_ROUTINE; +} + + +/************************************************************************* +* Function: UZUnZip * +* * +* Syntax: call UZUnZip * +* * +* Return: Unzip return code * +*************************************************************************/ + +ULONG UZUnZip(CHAR *name, ULONG numargs, RXSTRING args[], + CHAR *queuename, RXSTRING *retstr) +{ + char *argv[30]; + char *scan; + int argc=0; + int idx; + CONSTRUCTGLOBALS(); + + if (numargs < 1 || numargs > 2 || + args[0].strlength > 255) { + DESTROYGLOBALS(); + return INVALID_ROUTINE; /* Invalid call to routine */ + } + /* initialize data area */ + if (numargs == 2) + SetOutputVarStem(__G__ args[1].strptr); + + scan = args[0].strptr; + argv[argc++] = ""; /* D:\\SOURCECODE\\UNZIP51S\\UNZIP.COM"; */ + while (*scan == ' ') + scan++; + argv[argc++] = scan; + while ( (scan = strchr(scan,' ')) != NULL) { + *scan++ = 0; + while (*scan == ' ') + scan++; + argv[argc++] = scan; + } + if (*argv[argc-1] == 0) + argc--; + argv[argc] = 0; + + /* GRR: should resetMainFlags() be called in here somewhere? */ + + sprintf(retstr->strptr, "%d", unzip(__G__ argc, argv)); /* a.k.a. MAIN() */ + if (numargs == 2) + SetOutputVarLength(__G); + retstr->strlength = strlen(retstr->strptr); + return RexxReturn(__G__ 1,retstr); +} + +int varmessage(__GPRO__ uch *buf, ulg size) +{ + if (size > 0) + memcpy(G.os2.buffer+G.os2.putchar_idx,buf,size); + G.os2.putchar_idx = TextSetNext(__G__ G.os2.buffer, size+G.os2.putchar_idx,0); + return 0; +} + +int varputchar(__GPRO__ int c) +{ + G.os2.buffer[G.os2.putchar_idx++] = c; + if (c == '\n') { + G.os2.buffer[G.os2.putchar_idx] = 0; + if (G.os2.output_var[0]) + G.os2.putchar_idx = TextSetNext(__G__ G.os2.buffer, G.os2.putchar_idx,0); + else { + G.os2.buffer[--G.os2.putchar_idx] = 0; + puts(G.os2.buffer); + G.os2.putchar_idx = 0; + } + } + return 1; +} + + + +int SetOutputVarStem(__GPRO__ const char *name) +{ + int len=strlen(name); + G.redirect_text=1; + G.os2.output_idx = 0; + strcpy(G.os2.output_var, name); + if (len) { + strupr(G.os2.output_var); /* uppercase the name */ + if (*(G.os2.output_var+len-1) != '.') { + *(G.os2.output_var+len) = '.'; + len++; + *(G.os2.output_var+len) = 0; + } + WriteToVariable(__G__ G.os2.output_var,"",0); + } + G.os2.stem_len = len; + return G.os2.stem_len; +} + +int SetOutputVar(__GPRO__ const char *name) +{ + int len=strlen(name); + G.redirect_text=1; + G.os2.output_idx = 0; + strcpy(G.os2.output_var, name); + strupr(G.os2.output_var); /* uppercase the name */ + if (*(name+len-1) == '.') + G.os2.stem_len = len; + else + G.os2.stem_len = 0; + return G.os2.stem_len; +} + +int SetOutputVarLength(__GPRO) +{ + if (G.os2.stem_len > 0) { + if (G.os2.putchar_idx) + TextSetNext(__G__ G.os2.buffer,G.os2.putchar_idx,1); + return PrintToSubVariable(__G__ 0,"%d",G.os2.output_idx); + } + return 0; +} + +int PrintToVariable(__GPRO__ const char *name, const char *format,...) +{ + va_list arg_ptr; + int ret; + + va_start(arg_ptr, format); + ret = _PrintToVariable(__G__ name, format, arg_ptr); + va_end(arg_ptr); + return ret; +} + +int WriteToVariable(__GPRO__ const char *name, char *buffer, int len) +{ + G.os2.request.shvnext = NULL; + EZRXSTRING(G.os2.request.shvname, name); + G.os2.request.shvnamelen = G.os2.request.shvname.strlength; + G.os2.request.shvvalue.strptr = buffer; + G.os2.request.shvvalue.strlength = len; + G.os2.request.shvvaluelen = len; + G.os2.request.shvcode = RXSHV_SET; + G.os2.request.shvret = 0; + switch (RexxVariablePool(&G.os2.request)) { + case RXSHV_BADN: + G.os2.rexx_error = INVALID_ROUTINE; + break; + case RXSHV_MEMFL: + G.os2.rexx_mes = ERROR_NOMEM; + break; + case RXSHV_OK: + return 0; + } + return INVALID_ROUTINE; /* error on non-zero */ +} + +int _PrintToVariable(__GPRO__ const char *name, const char *format, va_list arg_ptr) +{ + int ret = vsprintf(G.os2.buffer, format, arg_ptr); + WriteToVariable(__G__ name, G.os2.buffer, strlen(G.os2.buffer)); + return ret; +} + +int PrintToSubVariable(__GPRO__ int idx, const char *format, ...) +{ + va_list arg_ptr; + int ret; + + if (G.os2.stem_len == 0) + return INVALID_ROUTINE; /* error on non-zero */ + sprintf(G.os2.output_var+G.os2.stem_len,"%d",idx); + + va_start(arg_ptr, format); + ret = _PrintToVariable(__G__ G.os2.output_var, format, arg_ptr); + va_end(arg_ptr); + return ret; +} + + +int WriteToNextVariable(__GPRO__ char *buffer, int len) +{ + if (G.os2.stem_len > 0) { + G.os2.output_idx++; + sprintf(G.os2.output_var+G.os2.stem_len,"%d",G.os2.output_idx); + } + return WriteToVariable(__G__ G.os2.output_var, buffer, len); +} + + +int TextSetNext(__GPRO__ char *buffer, int len, int all) +{ + char *scan = buffer, *next, *base=buffer; + int remaining=len; + int ret; + + while ((next = strchr(scan,'\n')) != NULL && remaining > 0) { + if (next > scan && *(next-1) == 0xd) + *(next-1) = 0; + else + *next = 0; + if (WriteToNextVariable(__G__ scan,strlen(scan))) + return 0; + next++; + remaining -= (next-scan); + scan = next; + } + if (remaining > 0) + if (all) { + *(scan+remaining) = 0; + WriteToNextVariable(__G__ scan,remaining); + } else { + memcpy(buffer,scan,remaining); + return remaining; + } + + return 0; +} + +int finish_REXX_redirect(__GPRO) +{ + char *scan, *ptr; + int idx=0, first=1, offset; + + if (!G.redirect_size) + return 0; + switch(G.redirect_data) { + case 1: + break; + case 2: + TextSetNext(__G__ G.redirect_buffer, G.redirect_size, 1); + SetOutputVarLength(__G); + DosFreeMem(G.redirect_buffer); + G.redirect_buffer = NULL; + G.redirect_size = 0; + break; + case 3: + WriteToNextVariable(__G__ G.filename,strlen(G.filename)); + sprintf(G.os2.output_var+G.os2.stem_len,G.filename); + WriteToVariable(__G__ G.os2.output_var, G.redirect_buffer, G.redirect_size); + DosFreeMem(G.redirect_buffer); + G.redirect_buffer = NULL; + G.redirect_size = 0; + break; + case 4: + if ((scan = strrchr(G.filename,'/')) != NULL) { + idx = *scan; + *scan = 0; + strupr(G.filename); + *scan = idx; + } + scan = G.os2.output_var+G.os2.stem_len; + strcpy(scan,G.filename); + while ((scan = strchr(scan,'/')) != NULL) + *scan = '.'; + WriteToVariable(__G__ G.os2.output_var, G.redirect_buffer, G.redirect_size); + DosFreeMem(G.redirect_buffer); + G.redirect_buffer = NULL; + G.redirect_size = 0; + strcpy(G.os2.getvar_buf, G.os2.output_var); + do { + if ((scan = strrchr(G.filename,'/')) == NULL) + offset = 0; + else + offset = scan-G.filename+1; + if (first || !GetVariable(__G__ G.os2.output_var)) { + ptr = G.os2.getvar_buf+offset+G.os2.stem_len; + *ptr = '0'; + *(ptr+1) = 0; + if (!GetVariable(__G__ G.os2.getvar_buf)) + idx = 1; + else + idx = atoi(G.os2.buffer)+1; + PrintToVariable(__G__ G.os2.getvar_buf,"%d",idx); + sprintf(ptr,"%d",idx); + if (!first) { + PrintToVariable(__G__ G.os2.output_var,"%d",idx); + idx = strlen(G.filename); + *(G.filename+idx) = '/'; + *(G.filename+idx+1) = 0; + } + WriteToVariable(__G__ G.os2.getvar_buf,G.filename+offset,strlen(G.filename+offset)); + first=0; + } + if (offset) { + *(G.os2.output_var+G.os2.stem_len+offset-1) = 0; + *scan = 0; + } + } while (offset); + break; + } + return 0; +} + +#endif /* OS2DLL */ diff --git a/utils/Install/sfxzip/rexxhelp.c b/utils/Install/sfxzip/rexxhelp.c new file mode 100644 index 0000000000..20a72597a8 --- /dev/null +++ b/utils/Install/sfxzip/rexxhelp.c @@ -0,0 +1,178 @@ +/* rexxhelp.c */ + +#if defined(API_DOC) && defined(OS2DLL) + +#define UNZIP_INTERNAL +#include "../unzip.h" +#include "../version.h" + +APIDocStruct REXXDetails[] = { + { "UZDROPFUNCS" , "UZDropFuncs" , + "call UZDropFuncs", + "Use this function to drop all the loaded UnZip functions.\n" +"\t\tOnce this function is processed by a REXX program, the\n" +"\t\tUnZip functions are not accessible in any OS/2 sessions.\n" }, + + { "UZLOADFUNCS" , "UZLoadFuncs" , + "call UZLoadFuncs", + "Use this function to make all of the UnZip functions\n" +" in this package available to all OS/2 sessions.\n\n" +" Example: call RxFuncAdd 'UZLoadFuncs', 'UNZIPAPI', 'UZLoadFuncs'\n" +" call UZLoadFuncs\n" }, + + { "UZFILETREE" , "UZFileTree" , + "rc = UZFileTree(zipfile, stem, [include], [exclude], [options])\n\n" +" zipfile - Name of ZIP file to search\n" +" stem - Name of the stem variable for results\n" +" Note: stem.0 contains the number of files found.\n" +" include - Optional stem variable specifying a list of files (including\n" +" wildcards) to include. stem.0 must indicate number of items.\n" +" exclude - Optional stem variable specifying a list of files (including\n" +" wildcards) to exclude. stem.0 must indicate number of items.\n" +" NOTE: If lists are not needed, filespec strings may be passed.\n" +" options - One of the following:\n" +" 'O' - Give file names only. This is the default.\n" +" 'F' - Give file statistics in the form:\n" +" Length Date Time Name\n" +" 'Z' - Also give ZIP statistics in the form:\n" +" Length Method Size Ratio Date Time CRC-32 Name", + "Finds all files in the specified ZIP with the specified\n" +" filespec and places their descriptions in a stem variable.\n\n" +" rc: Return codes\n" +" 0 Successful\n" +" 2 Error. Not enough memory.\n\n" +" Examples:\n" +" /* Return a list of all .NDX files in pcboard.qwk */\n" +" rc = UZFileTree('pcboard.qwk', 'stem.', '*.ndx')\n\n" +" /* Return a list of all files except *.NDX and *.DAT */\n" +" exc.0 = 2; exc.1 = '*.ndx'; exc.2 = '*.dat'\n" +" rc = UZFileTree('pcboard.qwk', 'stem.',,'exc.')\n" }, + + { "UZUNZIP" , "UZUnZip" , + "rc = UZUnZip('parameters', [stem])\n\n" +" parameters - The entire list of parameters you would use from\n" +" the command-line\n" +" stem - The name of an optional stem variable where any\n" +" output should be redirected.\n" +" NOTE: If a stem is not specified, all output will\n" +" go to the console.", + "Provide a direct entry point to the command line interface.\n\n" +" rc: UnZip return code\n\n" +" Examples: /* Test the archive 'unzip51s.zip' and return output in stem.*/\n" +" rc = UZUnZip('-t unzip51s.zip','stem.')\n" +" /* Extract the archive, display output on screen */\n" +" call UZUnZip 'doom.zip'\n" +" /* Extract all .NDX files from the archive */\n" +" call UZUnZip 'pcboard.qwk *.ndx','stem.'\n" }, + + { "UZUNZIPTOVAR" , "UZUnZipToVar" , + "rc = UZUnZipToVar('zipfile', 'filename', [stem])\n\n" +" zipfile - Name of ZIP file to search\n" +" filename - Name of file to extract from zipfile\n" +" stem - Optional stem variable to extract the file to.\n" +" If you specify a stem variable, the file will be extracted\n" +" to the variable, one line per index, stem.0 containing a\n" +" line count. In this case, 0 will be returned in rc.\n" +" If NO stem variable is specified, the entire file will be\n" +" extracted to rc.", + "Unzip one file to a variable.\n\n" +" rc: If no stem variable is specified, rc contains the contents of\n" +" the extracted file if successful or an error-code if not.\n" +" If a stem variable IS specified, rc contains 0 if successful.\n"}, + + /* GRR: "include" and "exclude" used to be identified as stem variables + * (Daniel H bug report) + */ + { "UZUNZIPTOSTEM", "UZUnZipToStem", + "rc = UZUnZipToStem(zipfile, stem, [include], [exclude], [mode])\n" +" zipfile - Name of ZIP file to search\n" +" stem - Stem variable used to store the extracted files\n" +" include - Optional string variable specifying a list of files (including\n" +" wildcards) to include. stem.0 must indicate number of items.\n" +" exclude - Optional string variable specifying a list of files (including\n" +" wildcards) to exclude. stem.0 must indicate number of items.\n" +" NOTE: If lists are not needed, filespec strings may be passed.\n" +" mode - Optional mode parameter specifies either 'F'lat (the default)\n" +" or 'T'ree mode.\n" +" -- In flat mode, each file is stored in stem.fullname i.e.\n" +" stem.os2/dll/unzipapi.c. A list of files is created in\n" +" stem.\n" +" -- In tree mode, slashes are converted to periods in the\n" +" pathname thus the above file would have been stored in\n" +" stem.OS2.DLL.unzipapi.c and an index stored for each\n" +" directory, i.e. stem.OS2.DLL. = \"unzipapi.c\",\n" +" stem.OS2. = \"DLL/\", stem. = \"OS2/\"", + "Unzip files to a stem variable.\n\n" +" Example: Assuming a file unzip.zip containing:\n" +" unzip.c, unshrink.c, extract.c,\n" +" os2/makefile.os2, os2/os2.c\n" +" os2/dll/dll.def, os2/dll/unzipapi.c\n\n" +" rc = UZUnZipToStem('unzip.zip', 'stem.')\n" +" Returns: stem.0 = 7\n" +" stem.1 = unzip.c\n" +" stem.2 = unshrink.c\n" +" stem.3 = extract.c\n" +" stem.4 = os2/makefile.os2\n" +" stem.5 = os2/os2.c\n" +" stem.6 = os2/dll/dll.def\n" +" stem.7 = os2/dll/unzipapi.c\n" +" And the following contain the contents of the\n" +" various files:\n" +" stem.unzip.c\n" +" stem.unshrink.c\n" +" stem.extract.c\n" +" stem.os2/makefile.os2\n" +" stem.os2/os2.c\n" +" stem.os2/dll/dll.def\n" +" stem.os2/dll/unzipapi.c\n\n" +" rc = UZUnZipToStem('unzip.zip', 'stem.',,,'TREE')\n" +" Returns: stem.0 = 4\n" +" stem.1 = unzip.c\n" +" stem.2 = unshrink.c\n" +" stem.3 = extract.c\n" +" stem.4 = OS2/\n" +" stem.OS2.0 = 3\n" +" stem.OS2.1 = makefile.os2\n" +" stem.OS2.2 = os2.c\n" +" stem.OS2.3 = DLL/\n" +" stem.OS2.DLL.0 = 2\n" +" stem.OS2.DLL.1 = def\n" +" stem.OS2.DLL.2 = unzipapi.c\n" +"\n" +" And the following contain the contents of the\n" +" various programs:\n" +" stem.unzip.c\n" +" stem.unshrink.c\n" +" stem.extract.c\n" +" stem.OS2.makefile.os2\n" +" stem.OS2.os2.c\n" +" stem.OS2.DLL.dll.def\n" +" stem.OS2.DLL.unzipapi.c\n" }, + + { "UZVER" , "UZVer" , + "rc = UZVer([option])\n\n" +" rc String containing UnZip version info in the form 'x.xx'\n" +" If option is 'L' then info is in the form 'x.xx of ", + "Returns the version number of UnZip\n" }, + + { "UZAPIVER" , "UZAPIVer" , + "rc = UZAPIVer([option])\n\n" +" rc String containing API version info in the form 'x.xx'\n" +" If option is 'L' then info is in the form 'x.xx of ", + "Returns the version number of the API\n" }, + { 0 } +}; + +char *REXXBrief = "\ +REXX functions:\n\ + UZDropFuncs -- Makes all functions in this package unknown to REXX\n\ + UZLoadFuncs -- Makes all functions in this package known to REXX\n\ + UZFileTree -- Searches for files matching a given filespec\n\ + UZUnZip -- UnZip command-line entry point\n\ + UZUnZipToVar -- Unzip one file to a variable\n\ + UZUnZipToStem -- Unzip files to a variable array\n\ + UZVer -- Returns the UnZip version number\n\ + UZAPIVer -- Returns the API version number\n"; + + +#endif /* API_DOC && OS2DLL */ diff --git a/utils/Install/sfxzip/sfx.RES b/utils/Install/sfxzip/sfx.RES new file mode 100644 index 0000000000000000000000000000000000000000..09bcebd7887a75a6a5d6fa5fb08771241e46bbfb GIT binary patch literal 13744 zcmeHNO^jT{5w16H?6>}rXN@9^1z|=U5XVJ9(JBUJY%gA0F}AVS;pgH-kRKEWhM#B_ zZ2VqGBqL=d!_iWN$=}5%q~u`9Nc%)0#fO#5DdGg9L<*eZL5{>YjHmN`)!j31o@Zxm zyvBmiyEU(?yQ;dos;jzQ&xnXr0LEBAb)eh^Yzkn^DtS~Mll}6L9FSe|1fE-Eo9xDO z3iwvk_R4gRcVc`^(Ibg0y6RnWtGprKci04;_XE7_?U1rhW*}{^>=`0;Q0BSBipk2H zlAp`Z@b@y-^t3!9Ps(9=PJRqRuA>Ivquh+NlSMAYtvPOgSHBw1_jmi zLbrytlz{&9lrevS*erZJe3)-xQj-8<*6aS+j{UM99<~>shhXWgx|{6G2lr0_+O0s( z)G{q&KPxJW_9-Y+);=XEt-O8g)L^4jWc@5Rgh*vf=v(vhBgie z0yEV_!nd)z-bceH00sgQYyy-3s{trEwOtc>0@TpH2?6jRlK|2fE?2cCX~X?GAn0B} z0HPL%VM5x;o+ZQlXrD&n?TBu>b+#g-Z4~BgR8+34jn>MV8)%~mjJFf;Ius9oDO5!M zQ^O%)vM!bQXMj5w0Ju2YU;UDbUnamh+%H4xrMh{IW4)Rm8d2w4v{daGQ(2 zG3Mj9V)L)n7FcH+``Vv^g|-4~w$Mh1221$T!-#d$h<3YV2jC&ZKVL@Ms+hCYDrL*s zYDME-)Wo?0PpM!}Z2yPI{6?6lk_45hq)?f!6}H||D{Q-~R+!pWE9`u&R=BrV3+^f= zK@rBAzZX33SzgMZtR+fTZv*vqIdc}lTf!zxl*Zk15_ift86R9sU>tA<;8wsoz^X)~kRo`_0>P%gxn;DC_QRK$L-ZrwXd6X2 z8;xO!Oso3uTjO8AkAhYy2~K>PNX)D@PQr!DY1Aq;OXn}P$_tmFVoVQyYT~~iF)?rp519B}!go!4xEvpAmls}bm(IV~qRepN)s$oCSQwLI zBZEh*>O&j80l(1gkz#ug5*XBjEK@ukpQ+<-VyjUmWoO4?eYA}p#o082_p+Vh%V-;o zvjVw!CMGh zhY|^^smv{;atyI80<-}Jcok{z36n&hAwX8KYppNFp(9qg)He#IH0blZEw2jv0Y{b|;80*S6(neAjc{!2bzmpPnQVB2L zDPi{*pb01gH#oO=1Mq2A;tNfUDt=)jo^~+gLtMMb1?uAiQ3Y zkT6z}>EgKjs4ynSf}+H&*CZ}(9e`uNkN)x(GFK}|y;79f@iD25A(x1nNH=n&T}8Yq z4+7fwdep_c5#wKH+`{BU*^C2Z4mLar8?J`^BG@lXt^~MUkOWB0LlZS4Q^H+Sxm{l7 zefANYNBi-|TSi+(+h~2xM#Ey=3fRca<;!}Qn_Ncw5%0!%d*^Svm%DRVE1%%?qXOmO zr4A6N8nfropbzl?N1O)F@RHado+KK}`H3nZku*)gf)K(ef)iUG_(T;z%#{f7FIyTp zJl9{!;bs7jN&|SK0ld-h;vxD3an}&Z7-o`4!w-2vZQVwLa#$2^MUfJ~30-L^0g?8i z5|JP#-dQ})N2^hfw8P<$5V76UV-jJ_ndT(OEo)XA3wPz^w~Zb&$Xoc7wo94OGrz4cpM} z>zk7}-b29x-8*93?4a{+BmiKrE}#uab&FJyA25Gr9?g6@Y~t)m0SQJXEK#_jNy9uo zN^Ne>9G{s@40+gjyqCzvz72XOz6+T*zY#hlk08I}_fP&iB1l9TjD5_cE0rQXZ&Qy7 za(-nU=H~bnmE0?sd9Th&T_$un_5-Bh*-S|qjV&4U?3ri~KkM-`@@u7w>X!Z;Sx5X# zRJZaR{!T+I?&uTj1*><;g#hb`+Xc|Xbe2H$n*A5qi#h<@`0zB2gfD^>Uk{RMC8 zg1m!%!SU^GQV6$SN*rY+xqi7%=xL!UsfngA@ z3&>9?$t7iAw?XyfDT9wqb>OEAtN7-E0<<4h+qkK*8C|SvH%2551ceocgFt0^oCNG% z3eVGn+{vqN1{b>hc$}Zs**0Xpy4?PH#$|B5dHqnG5aSETmBHa}63ysayZamt6>;`b zYRdw9y58Q|l&DW+&!(sep9A>wX}L3sqP;I>&#DMAN`T&Z#apuMc{K?}WAc8*J3VIU zOMRD-KdZu=PZc3`@LlSg9PnClK<;rAp96M~Gco7NRQEI0l;odfexL9``xl zHR2$*@>@0s)Uo*Ca=;$$azHb$DW5^mw>hliZvjVmXNIWqxJhi1*h>*X@RiR2@58FD z^eKLuu>(G3%jn#%nDeJq%5*c&C^v2Q@W+os@hal-AluNWW2g2xB7J4*EDL#1-m2=tUD_pu-(|e=tk~X@+*!k9@*jWc?9f89eX(PM$q?h zbTaqs^L!U%Xs_4~*WMhE|w=X&%NOHKb*@Jd6b=?&6(?H;8a?>M?F2za#j1 ziZjRKq#-SN^z6~P{T&j|BM;h_K)-|(aOaFT+f0k9y6^K3SusbHWL$GJL+qdIRjyv_?-mYZ-;J)My zDZ%eczkkt`D+?m{mxTrUz$dDD$F|(QY}E0R0@eoKUGS{)t;I^WQ5=Z&;}BpJwAA_p zsXiO7UHP)>+^%`&0r=+NN^izGdlR>pbyz1>%=vr3^0e-suHDn2SJ&&`@M_4=Z7eIm zg8bd_3|4s%_0el(47>&4ZTbP~zKo+nu;n^z3M1Kq^-bsNznVHuo3edwy0Me>Db!!W z|8dlJqJw?Yq}ho!^0WTZ6q{`wk9yRvztXQ`!vY~aNKU`qr&-&l(LLwq01DDiPlG`V ze%{CVxO#T})cGWoLm%qvdkzZw~l-?dAR8%eP0y z_cMDiyEn6YwvpM(gR$Z|?C}NtM(yF|toF#-)yW(lm!7~W|Nj%0U}5Z9jr-IPKhiYM>!(jg1lvv;+pdww)8pmS%DI}jw3OcMS-iX-d=1WFjTBDT8NE~I4d|Y_9?&~< PPVc(HPCYqSqxb&-^+!7H literal 0 HcmV?d00001 diff --git a/utils/Install/sfxzip/sfx.rc b/utils/Install/sfxzip/sfx.rc new file mode 100644 index 0000000000..82bdf07561 --- /dev/null +++ b/utils/Install/sfxzip/sfx.rc @@ -0,0 +1,2 @@ +#include "wx/msw/wx.rc" + diff --git a/utils/Install/sfxzip/ttyio.c b/utils/Install/sfxzip/ttyio.c new file mode 100644 index 0000000000..c755d1c5a3 --- /dev/null +++ b/utils/Install/sfxzip/ttyio.c @@ -0,0 +1,625 @@ +/*--------------------------------------------------------------------------- + + ttyio.c + + This file contains routines for doing console input/output, including code + for non-echoing input. It is used by the encryption/decryption code but + does not contain any restricted code itself. This file is shared between + Info-ZIP's Zip and UnZip. + + Contains: echo() (VMS only) + Echon() (Unix only) + Echoff() (Unix only) + screenlines() (Unix only) + zgetch() (Unix and non-Unix versions) + getp() ("PC," Unix/Atari/Be, VMS/VMCMS/MVS) + + ---------------------------------------------------------------------------*/ + +#define __TTYIO_C /* identifies this source module */ + +#include "zip.h" +#include "crypt.h" + +#if (CRYPT || (defined(UNZIP) && !defined(FUNZIP))) +/* Non-echo console/keyboard input is needed for (en/de)cryption's password + * entry, and for UnZip(SFX)'s MORE and Pause features. + * (The corresponding #endif is found at the end of this module.) + */ + +#include "ttyio.h" + +#ifndef PUTC +# define PUTC putc +#endif + +#ifdef ZIP +# ifdef GLOBAL /* used in Amiga system headers, maybe others too */ +# undef GLOBAL +# endif +# define GLOBAL(g) g +#else +# define GLOBAL(g) G.g +#endif + +#ifdef __BEOS__ /* why yes, we do */ +# define HAVE_TERMIOS_H +#endif + +#ifdef _POSIX_VERSION +# ifndef USE_POSIX_TERMIOS +# define USE_POSIX_TERMIOS /* use POSIX style termio (termios) */ +# endif +# ifndef HAVE_TERMIOS_H +# define HAVE_TERMIOS_H /* POSIX termios.h */ +# endif +#endif /* _POSIX_VERSION */ + +#ifdef UNZIP /* Zip handles this with the unix/configure script */ +# ifndef _POSIX_VERSION +# if (defined(SYSV) || defined(CRAY)) && !defined(__MINT__) +# ifndef USE_SYSV_TERMIO +# define USE_SYSV_TERMIO +# endif +# ifdef COHERENT +# ifndef HAVE_TERMIO_H +# define HAVE_TERMIO_H +# endif +# ifdef HAVE_SYS_TERMIO_H +# undef HAVE_SYS_TERMIO_H +# endif +# else /* !COHERENT */ +# ifdef HAVE_TERMIO_H +# undef HAVE_TERMIO_H +# endif +# ifndef HAVE_SYS_TERMIO_H +# define HAVE_SYS_TERMIO_H +# endif +# endif /* ?COHERENT */ +# endif /* (SYSV || CRAY) && !__MINT__ */ +# endif /* !_POSIX_VERSION */ +# if !(defined(BSD4_4) || defined(SYSV) || defined(__convexc__)) +# ifndef NO_FCNTL_H +# define NO_FCNTL_H +# endif +# endif /* !(BSD4_4 || SYSV || __convexc__) */ +#endif /* UNZIP */ + +#ifdef HAVE_TERMIOS_H +# ifndef USE_POSIX_TERMIOS +# define USE_POSIX_TERMIOS +# endif +#endif + +#if (defined(HAVE_TERMIO_H) || defined(HAVE_SYS_TERMIO_H)) +# ifndef USE_SYSV_TERMIO +# define USE_SYSV_TERMIO +# endif +#endif + +#if (defined(UNZIP) && !defined(FUNZIP) && defined(UNIX) && defined(MORE)) +# include +# define GOT_IOCTL_H + /* int ioctl OF((int, int, zvoid *)); GRR: may need for some systems */ +#endif + +#ifndef HAVE_WORKING_GETCH + /* include system support for switching of console echo */ +# ifdef VMS +# include +# include +# include +# include +# include +# else /* !VMS */ +# ifdef HAVE_TERMIOS_H +# include +# define sgttyb termios +# define sg_flags c_lflag +# define GTTY(f, s) tcgetattr(f, (zvoid *) s) +# define STTY(f, s) tcsetattr(f, TCSAFLUSH, (zvoid *) s) +# else /* !HAVE_TERMIOS_H */ +# ifdef USE_SYSV_TERMIO /* Amdahl, Cray, all SysV? */ +# ifdef HAVE_TERMIO_H +# include +# endif +# ifdef HAVE_SYS_TERMIO_H +# include +# endif +# ifdef NEED_PTEM +# include +# include +# endif +# define sgttyb termio +# define sg_flags c_lflag +# define GTTY(f,s) ioctl(f,TCGETA,(zvoid *)s) +# define STTY(f,s) ioctl(f,TCSETAW,(zvoid *)s) +# else /* !USE_SYSV_TERMIO */ +# ifndef CMS_MVS +# if (!defined(MINIX) && !defined(GOT_IOCTL_H)) +# include +# endif +# include +# define GTTY gtty +# define STTY stty +# ifdef UNZIP + /* + * XXX : Are these declarations needed at all ???? + */ + /* + * GRR: let's find out... Hmmm, appears not... + int gtty OF((int, struct sgttyb *)); + int stty OF((int, struct sgttyb *)); + */ +# endif +# endif /* !CMS_MVS */ +# endif /* ?USE_SYSV_TERMIO */ +# endif /* ?HAVE_TERMIOS_H */ +# ifndef NO_FCNTL_H +# ifndef UNZIP +# include +# endif +# else + char *ttyname OF((int)); +# endif +# endif /* ?VMS */ +#endif /* !HAVE_WORKING_GETCH */ + + + +#ifndef HAVE_WORKING_GETCH +#ifdef VMS + +/* + * Turn keyboard echoing on or off (VMS). Loosely based on VMSmunch.c + * and hence on Joe Meadows' file.c code. + */ +int echo(opt) + int opt; +{ + /* + * For VMS v5.x: + * IO$_SENSEMODE/SETMODE info: Programming, Vol. 7A, System Programming, + * I/O User's: Part I, sec. 8.4.1.1, 8.4.3, 8.4.5, 8.6 + * sys$assign(), sys$qio() info: Programming, Vol. 4B, System Services, + * System Services Reference Manual, pp. sys-23, sys-379 + * fixed-length descriptor info: Programming, Vol. 3, System Services, + * Intro to System Routines, sec. 2.9.2 + * Greg Roelofs, 15 Aug 91 + */ + + /* SKM: make global? */ + static struct dsc$descriptor_s DevDesc = + {11, DSC$K_DTYPE_T, DSC$K_CLASS_S, "SYS$COMMAND"}; + /* {dsc$w_length, dsc$b_dtype, dsc$b_class, dsc$a_pointer}; */ + static short DevChan, iosb[4]; + static long status; + static unsigned long oldmode[2], newmode[2]; /* each = 8 bytes */ + + + /* assign a channel to standard input */ + status = sys$assign(&DevDesc, &DevChan, 0, 0); + if (!(status & 1)) + return status; + + /* use sys$qio and the IO$_SENSEMODE function to determine the current + * tty status (for password reading, could use IO$_READVBLK function + * instead, but echo on/off will be more general) + */ + status = sys$qiow(0, DevChan, IO$_SENSEMODE, &iosb, 0, 0, + oldmode, 8, 0, 0, 0, 0); + if (!(status & 1)) + return status; + status = iosb[0]; + if (!(status & 1)) + return status; + + /* copy old mode into new-mode buffer, then modify to be either NOECHO or + * ECHO (depending on function argument opt) + */ + newmode[0] = oldmode[0]; + newmode[1] = oldmode[1]; + if (opt == 0) /* off */ + newmode[1] |= TT$M_NOECHO; /* set NOECHO bit */ + else + newmode[1] &= ~((unsigned long) TT$M_NOECHO); /* clear NOECHO bit */ + + /* use the IO$_SETMODE function to change the tty status */ + status = sys$qiow(0, DevChan, IO$_SETMODE, &iosb, 0, 0, + newmode, 8, 0, 0, 0, 0); + if (!(status & 1)) + return status; + status = iosb[0]; + if (!(status & 1)) + return status; + + /* deassign the sys$input channel by way of clean-up */ + status = sys$dassgn(DevChan); + if (!(status & 1)) + return status; + + return SS$_NORMAL; /* we be happy */ + +} /* end function echo() */ + + +#else /* !VMS: basically Unix */ + + +/* For VM/CMS and MVS, non-echo terminal input is not (yet?) supported. */ +#ifndef CMS_MVS + +#ifdef ZIP /* moved to globals.h for UnZip */ + static int echofd=(-1); /* file descriptor whose echo is off */ +#endif + +/* + * Turn echo off for file descriptor f. Assumes that f is a tty device. + */ +void Echoff(__G__ f) + __GDEF + int f; /* file descriptor for which to turn echo off */ +{ + struct sgttyb sg; /* tty device structure */ + + GLOBAL(echofd) = f; + GTTY(f, &sg); /* get settings */ + sg.sg_flags &= ~ECHO; /* turn echo off */ + STTY(f, &sg); +} + +/* + * Turn echo back on for file descriptor echofd. + */ +void Echon(__G) + __GDEF +{ + struct sgttyb sg; /* tty device structure */ + + if (GLOBAL(echofd) != -1) { + GTTY(GLOBAL(echofd), &sg); /* get settings */ + sg.sg_flags |= ECHO; /* turn echo on */ + STTY(GLOBAL(echofd), &sg); + GLOBAL(echofd) = -1; + } +} + +#endif /* !CMS_MVS */ +#endif /* ?VMS */ + + +#if (defined(UNZIP) && !defined(FUNZIP)) + +#if (defined(UNIX) || defined(__BEOS__)) +#ifdef MORE + +/* + * Get the number of lines on the output terminal. SCO Unix apparently + * defines TIOCGWINSZ but doesn't support it (!M_UNIX). + * + * GRR: will need to know width of terminal someday, too, to account for + * line-wrapping. + */ + +#if (defined(TIOCGWINSZ) && !defined(M_UNIX)) + +int screenlines() +{ + struct winsize wsz; +#ifdef DEBUG_WINSZ + static int firsttime = TRUE; +#endif + + /* see termio(4) under, e.g., SunOS */ + if (ioctl(1, TIOCGWINSZ, &wsz) == 0) { +#ifdef DEBUG_WINSZ + if (firsttime) { + firsttime = FALSE; + fprintf(stderr, "ttyio.c screenlines(): ws_row = %d\n", + wsz.ws_row); + } +#endif + /* number of columns = ws_col */ + return (wsz.ws_row > 0)? wsz.ws_row : 24; /* number of rows */ + + } else { /* this happens when piping to more(1), for example */ +#ifdef DEBUG_WINSZ + if (firsttime) { + firsttime = FALSE; + fprintf(stderr, + "ttyio.c screenlines(): ioctl(TIOCGWINSZ) failed\n")); + } +#endif + return 24; /* VT-100 assumed to be minimal hardware */ + } +} + +#else /* !TIOCGWINSZ: service not available, fall back to semi-bogus method */ + +int screenlines() +{ + char *envptr, *getenv(); + int n; + + /* GRR: this is overly simplistic, but don't have access to stty/gtty + * system anymore + */ + envptr = getenv("LINES"); + if (envptr == (char *)NULL || (n = atoi(envptr)) < 5) + return 24; /* VT-100 assumed to be minimal hardware */ + else + return n; +} + +#endif /* ?(TIOCGWINSZ && !M_UNIX) */ +#endif /* MORE */ + + +/* + * Get a character from the given file descriptor without echo or newline. + */ +int zgetch(__G__ f) + __GDEF + int f; /* file descriptor from which to read */ +{ +#if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) + char oldmin, oldtim; +#endif + char c; + struct sgttyb sg; /* tty device structure */ + + GTTY(f, &sg); /* get settings */ +#if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) + oldmin = sg.c_cc[VMIN]; /* save old values */ + oldtim = sg.c_cc[VTIME]; + sg.c_cc[VMIN] = 1; /* need only one char to return read() */ + sg.c_cc[VTIME] = 0; /* no timeout */ + sg.sg_flags &= ~ICANON; /* canonical mode off */ +#else + sg.sg_flags |= CBREAK; /* cbreak mode on */ +#endif + sg.sg_flags &= ~ECHO; /* turn echo off, too */ + STTY(f, &sg); /* set cbreak mode */ + GLOBAL(echofd) = f; /* in case ^C hit (not perfect: still CBREAK) */ + + read(f, &c, 1); /* read our character */ + +#if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) + sg.c_cc[VMIN] = oldmin; /* restore old values */ + sg.c_cc[VTIME] = oldtim; + sg.sg_flags |= ICANON; /* canonical mode on */ +#else + sg.sg_flags &= ~CBREAK; /* cbreak mode off */ +#endif + sg.sg_flags |= ECHO; /* turn echo on */ + STTY(f, &sg); /* restore canonical mode */ + GLOBAL(echofd) = -1; + + return (int)c; +} + + +#else /* !UNIX && !__BEOS__ */ + + +int zgetch(__G__ f) + __GDEF + int f; /* file descriptor from which to read (must be open already) */ +{ + char c, c2; + +/*--------------------------------------------------------------------------- + Get a character from the given file descriptor without echo; can't fake + CBREAK mode (i.e., newline required), but can get rid of all chars up to + and including newline. + ---------------------------------------------------------------------------*/ + + echoff(f); + read(f, &c, 1); + if (c != '\n') + do { + read(f, &c2, 1); /* throw away all other chars up thru newline */ + } while (c2 != '\n'); + echon(); + return (int)c; +} + +#endif /* ?(UNIX || __BEOS__) */ + +#endif /* UNZIP && !FUNZIP */ +#endif /* !HAVE_WORKING_GETCH */ + + +#if CRYPT /* getp() is only used with full encryption */ + +/* + * Simple compile-time check for source compatibility between + * zcrypt and ttyio: + */ +#if (!defined(CR_MAJORVER) || (CR_MAJORVER < 2) || (CR_MINORVER < 7)) + error: This Info-ZIP tool requires zcrypt 2.7 or later. +#endif + +/* + * Get a password of length n-1 or less into *p using the prompt *m. + * The entered password is not echoed. + */ + +#ifdef HAVE_WORKING_GETCH +/* + * For the AMIGA, getch() is defined as Agetch(), which is in + * amiga/filedate.c; SAS/C 6.x provides a getch(), but since Agetch() + * uses the infrastructure that is already in place in filedate.c, it is + * smaller. With this function, echoff() and echon() are not needed. + * + * For the MAC, a non-echo macgetch() function is defined in the MacOS + * specific sources which uses the event handling mechanism of the + * desktop window manager to get a character from the keyboard. + * + * For the other systems in this section, a non-echo getch() function + * is either contained the C runtime library (conio package), or getch() + * is defined as an alias for a similar system specific RTL function. + */ + +#ifndef WINDLL /* WINDLL does not support a console interface */ +#ifndef QDOS /* QDOS supplies a variant of this function */ + +/* This is the getp() function for all systems (with TTY type user interface) + * that supply a working `non-echo' getch() function for "raw" console input. + */ +char *getp(__G__ m, p, n) + __GDEF + ZCONST char *m; /* prompt for password */ + char *p; /* return value: line input */ + int n; /* bytes available in p[] */ +{ + char c; /* one-byte buffer for read() to use */ + int i; /* number of characters input */ + char *w; /* warning on retry */ + + /* get password */ + w = ""; + do { + fputs(w, stderr); /* warning if back again */ + fputs(m, stderr); /* display prompt and flush */ + fflush(stderr); + i = 0; + do { /* read line, keeping first n characters */ + if ((c = (char)getch()) == '\r') + c = '\n'; /* until user hits CR */ + if (c == 8 || c == 127) { + if (i > 0) i--; /* the `backspace' and `del' keys works */ + } + else if (i < n) + p[i++] = c; /* truncate past n */ + } while (c != '\n'); + PUTC('\n', stderr); fflush(stderr); + w = "(line too long--try again)\n"; + } while (p[i-1] != '\n'); + p[i-1] = 0; /* terminate at newline */ + + return p; /* return pointer to password */ + +} /* end function getp() */ + +#endif /* !QDOS */ +#endif /* !WINDLL */ + + +#else /* !HAVE_WORKING_GETCH */ + + +#if (defined(UNIX) || defined(__MINT__) || defined(__BEOS__)) + +#ifndef _PATH_TTY +# ifdef __MINT__ +# define _PATH_TTY ttyname(2) +# else +# define _PATH_TTY "/dev/tty" +# endif +#endif + +char *getp(__G__ m, p, n) + __GDEF + ZCONST char *m; /* prompt for password */ + char *p; /* return value: line input */ + int n; /* bytes available in p[] */ +{ + char c; /* one-byte buffer for read() to use */ + int i; /* number of characters input */ + char *w; /* warning on retry */ + int f; /* file descriptor for tty device */ + +#ifdef PASSWD_FROM_STDIN + /* Read from stdin. This is unsafe if the password is stored on disk. */ + f = 0; +#else + /* turn off echo on tty */ + + if ((f = open(_PATH_TTY, 0)) == -1) + return NULL; +#endif + /* get password */ + w = ""; + do { + fputs(w, stderr); /* warning if back again */ + fputs(m, stderr); /* prompt */ + fflush(stderr); + i = 0; + echoff(f); + do { /* read line, keeping n */ + read(f, &c, 1); + if (i < n) + p[i++] = c; + } while (c != '\n'); + echon(); + PUTC('\n', stderr); fflush(stderr); + w = "(line too long--try again)\n"; + } while (p[i-1] != '\n'); + p[i-1] = 0; /* terminate at newline */ + +#ifndef PASSWD_FROM_STDIN + close(f); +#endif + + return p; /* return pointer to password */ + +} /* end function getp() */ + +#endif /* UNIX || __MINT__ || __BEOS__ */ + + + +#if (defined(VMS) || defined(CMS_MVS)) + +char *getp(__G__ m, p, n) + __GDEF + ZCONST char *m; /* prompt for password */ + char *p; /* return value: line input */ + int n; /* bytes available in p[] */ +{ + char c; /* one-byte buffer for read() to use */ + int i; /* number of characters input */ + char *w; /* warning on retry */ + FILE *f; /* file structure for SYS$COMMAND device */ + +#ifdef PASSWD_FROM_STDIN + f = stdin; +#else + if ((f = fopen(ctermid(NULL), "r")) == NULL) + return NULL; +#endif + + /* get password */ + fflush(stdout); + w = ""; + do { + if (*w) /* bug: VMS apparently adds \n to NULL fputs */ + fputs(w, stderr); /* warning if back again */ + fputs(m, stderr); /* prompt */ + fflush(stderr); + i = 0; + echoff(f); + do { /* read line, keeping n */ + if ((c = (char)getc(f)) == '\r') + c = '\n'; + if (i < n) + p[i++] = c; + } while (c != '\n'); + echon(); + PUTC('\n', stderr); fflush(stderr); + w = "(line too long--try again)\n"; + } while (p[i-1] != '\n'); + p[i-1] = 0; /* terminate at newline */ +#ifndef PASSWD_FROM_STDIN + fclose(f); +#endif + + return p; /* return pointer to password */ + +} /* end function getp() */ + +#endif /* VMS || CMS_MVS */ +#endif /* ?HAVE_WORKING_GETCH */ +#endif /* CRYPT */ +#endif /* CRYPT || (UNZIP && !FUNZIP) */ diff --git a/utils/Install/sfxzip/unix.c b/utils/Install/sfxzip/unix.c new file mode 100644 index 0000000000..c9eaaabafc --- /dev/null +++ b/utils/Install/sfxzip/unix.c @@ -0,0 +1,1424 @@ +/*--------------------------------------------------------------------------- + + unix.c + + Unix-specific routines for use with Info-ZIP's UnZip 5.3 and later. + + Contains: readdir() + do_wild() <-- generic enough to put in fileio.c? + mapattr() + mapname() + checkdir() + mkdir() + close_outfile() + set_direc_attribs() + stamp_file() + version() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" + +#ifdef SCO_XENIX +# define SYSNDIR +#else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ +# if defined(__convexc__) || defined(SYSV) || defined(CRAY) || defined(BSD4_4) +# define DIRENT +# endif +#endif +#if defined(_AIX) +# define DIRENT +#endif +#ifdef COHERENT +# if defined(_I386) || (defined(__COHERENT__) && (__COHERENT__ >= 0x420)) +# define DIRENT +# endif +#endif + +/* GRR: may need to uncomment this: */ +#if 0 +#if defined(_POSIX_VERSION) +# define DIRENT +#endif +#endif + +#ifdef DIRENT +# include +#else +# ifdef SYSV +# ifdef SYSNDIR +# include +# else +# include +# endif +# else /* !SYSV */ +# ifndef NO_SYSDIR +# include +# endif +# endif /* ?SYSV */ +# ifndef dirent +# define dirent direct +# endif +#endif /* ?DIRENT */ + +#ifdef ACORN_FTYPE_NFS +/* Acorn bits for NFS filetyping */ +typedef struct { + uch ID[2]; + uch size[2]; + uch ID_2[4]; + uch loadaddr[4]; + uch execaddr[4]; + uch attr[4]; +} RO_extra_block; + +static int isRISCOSexfield OF((uch *extra_field)); +#endif /* ACORN_FTYPE_NFS */ + +static int created_dir; /* used in mapname(), checkdir() */ +static int renamed_fullpath; /* ditto */ + + +#ifndef SFX +#ifdef NO_DIR /* for AT&T 3B1 */ + +#define opendir(path) fopen(path,"r") +#define closedir(dir) fclose(dir) +typedef FILE DIR; + +/* + * Apparently originally by Rich Salz. + * Cleaned up and modified by James W. Birdsall. + */ +struct dirent *readdir(dirp) + DIR *dirp; +{ + static struct dirent entry; + + if (dirp == NULL) + return NULL; + + for (;;) + if (fread(&entry, sizeof (struct dirent), 1, dirp) == 0) + return (struct dirent *)NULL; + else if (entry.d_ino) + return &entry; + +} /* end function readdir() */ + +#endif /* NO_DIR */ + + +/**********************/ +/* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ +/**********************/ + +char *do_wild(__G__ wildspec) + __GDEF + char *wildspec; /* only used first time on a given dir */ +{ + static DIR *dir = (DIR *)NULL; + static char *dirname, *wildname, matchname[FILNAMSIZ]; + static int firstcall=TRUE, have_dirname, dirnamelen; + struct dirent *file; + + + /* Even when we're just returning wildspec, we *always* do so in + * matchname[]--calling routine is allowed to append four characters + * to the returned string, and wildspec may be a pointer to argv[]. + */ + if (firstcall) { /* first call: must initialize everything */ + firstcall = FALSE; + + if (!iswild(wildspec)) { + strcpy(matchname, wildspec); + have_dirname = FALSE; + dir = NULL; + return matchname; + } + + /* break the wildspec into a directory part and a wildcard filename */ + if ((wildname = strrchr(wildspec, '/')) == (char *)NULL) { + dirname = "."; + dirnamelen = 1; + have_dirname = FALSE; + wildname = wildspec; + } else { + ++wildname; /* point at character after '/' */ + dirnamelen = wildname - wildspec; + if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { + Info(slide, 0x201, ((char *)slide, + "warning: cannot allocate wildcard buffers\n")); + strcpy(matchname, wildspec); + return matchname; /* but maybe filespec was not a wildcard */ + } + strncpy(dirname, wildspec, dirnamelen); + dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ + have_dirname = TRUE; + } + + if ((dir = opendir(dirname)) != (DIR *)NULL) { + while ((file = readdir(dir)) != (struct dirent *)NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + if (file->d_name[0] == '.' && wildname[0] != '.') + continue; /* Unix: '*' and '?' do not match leading dot */ + if (match(file->d_name, wildname, 0) && /* 0 == case sens. */ + /* skip "." and ".." directory entries */ + strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { + Trace((stderr, "do_wild: match() succeeds\n")); + if (have_dirname) { + strcpy(matchname, dirname); + strcpy(matchname+dirnamelen, file->d_name); + } else + strcpy(matchname, file->d_name); + return matchname; + } + } + /* if we get to here directory is exhausted, so close it */ + closedir(dir); + dir = (DIR *)NULL; + } + + /* return the raw wildspec in case that works (e.g., directory not + * searchable, but filespec was not wild and file is readable) */ + strcpy(matchname, wildspec); + return matchname; + } + + /* last time through, might have failed opendir but returned raw wildspec */ + if (dir == (DIR *)NULL) { + firstcall = TRUE; /* nothing left to try--reset for new wildspec */ + if (have_dirname) + free(dirname); + return (char *)NULL; + } + + /* If we've gotten this far, we've read and matched at least one entry + * successfully (in a previous call), so dirname has been copied into + * matchname already. + */ + while ((file = readdir(dir)) != (struct dirent *)NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + if (file->d_name[0] == '.' && wildname[0] != '.') + continue; /* Unix: '*' and '?' do not match leading dot */ + if (match(file->d_name, wildname, 0)) { /* 0 == don't ignore case */ + Trace((stderr, "do_wild: match() succeeds\n")); + if (have_dirname) { + /* strcpy(matchname, dirname); */ + strcpy(matchname+dirnamelen, file->d_name); + } else + strcpy(matchname, file->d_name); + return matchname; + } + } + + closedir(dir); /* have read at least one dir entry; nothing left */ + dir = (DIR *)NULL; + firstcall = TRUE; /* reset for new wildspec */ + if (have_dirname) + free(dirname); + return (char *)NULL; + +} /* end function do_wild() */ + +#endif /* !SFX */ + + + + + +/**********************/ +/* Function mapattr() */ +/**********************/ + +int mapattr(__G) + __GDEF +{ + ulg tmp = G.crec.external_file_attributes; + + G.pInfo->file_attr = 0; + /* initialized to 0 for check in "default" branch below... */ + + switch (G.pInfo->hostnum) { + case AMIGA_: + tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ + G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); + break; + case UNIX_: + case VMS_: + case ACORN_: + case ATARI_: + case BEOS_: + case QDOS_: + case TANDEM_: + G.pInfo->file_attr = (unsigned)(tmp >> 16); + if (G.pInfo->file_attr != 0 || !G.extra_field) { + return 0; + } else { + /* Some (non-Info-ZIP) implementations of Zip for Unix and + * VMS (and probably others ??) leave 0 in the upper 16-bit + * part of the external_file_attributes field. Instead, they + * store file permission attributes in some extra field. + * As a work-around, we search for the presence of one of + * these extra fields and fall back to the MSDOS compatible + * part of external_file_attributes if one of the known + * e.f. types has been detected. + * Later, we might implement extraction of the permission + * bits from the VMS extra field. But for now, the work-around + * should be sufficient to provide "readable" extracted files. + * (For ASI Unix e.f., an experimental remap from the e.f. + * mode value IS already provided!) + */ + ush ebID; + unsigned ebLen; + uch *ef = G.extra_field; + unsigned ef_len = G.crec.extra_field_length; + int r = FALSE; + + while (!r && ef_len >= EB_HEADSIZE) { + ebID = makeword(ef); + ebLen = (unsigned)makeword(ef+EB_LEN); + if (ebLen > (ef_len - EB_HEADSIZE)) + /* discoverd some e.f. inconsistency! */ + break; + switch (ebID) { + case EF_ASIUNIX: + if (ebLen >= (EB_ASI_MODE+2)) { + G.pInfo->file_attr = + (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); + /* force stop of loop: */ + ef_len = (ebLen + EB_HEADSIZE); + break; + } + /* else: fall through! */ + case EF_PKVMS: + /* "found nondecypherable e.f. with perm. attr" */ + r = TRUE; + default: + break; + } + ef_len -= (ebLen + EB_HEADSIZE); + ef += (ebLen + EB_HEADSIZE); + } + if (!r) + return 0; + } + /* fall through! */ + /* all remaining cases: expand MSDOS read-only bit into write perms */ + case FS_FAT_: + /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the + * Unix attributes in the upper 16 bits of the external attributes + * field, just like Info-ZIP's Zip for Unix. We try to use that + * value, after a check for consistency with the MSDOS attribute + * bits (see below). + */ + G.pInfo->file_attr = (unsigned)(tmp >> 16); + /* fall through! */ + case FS_HPFS_: + case FS_NTFS_: + case MAC_: + case TOPS20_: + default: + /* read-only bit --> write perms; subdir bit --> dir exec bit */ + tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; + if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) + /* keep previous G.pInfo->file_attr setting, when its "owner" + * part appears to be consistent with DOS attribute flags! + */ + return 0; + G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); + break; + } /* end switch (host-OS-created-by) */ + + /* for originating systems with no concept of "group," "other," "system": */ + umask( (int)(tmp=umask(0)) ); /* apply mask to expanded r/w(/x) perms */ + G.pInfo->file_attr &= ~tmp; + + return 0; + +} /* end function mapattr() */ + + + + + +/************************/ +/* Function mapname() */ +/************************/ + /* return 0 if no error, 1 if caution (filename */ +int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ + __GDEF /* dir doesn't exist), 3 if error (skip file), */ + int renamed; /* or 10 if out of memory (skip file) */ +{ /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ + char pathcomp[FILNAMSIZ]; /* path-component buffer */ + char *pp, *cp=(char *)NULL; /* character pointers */ + char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ +#ifdef ACORN_FTYPE_NFS + char *lastcomma=(char *)NULL; /* pointer to last comma in pathcomp */ +#endif + int quote = FALSE; /* flags */ + int error = 0; + register unsigned workch; /* hold the character being tested */ + + +/*--------------------------------------------------------------------------- + Initialize various pointers and counters and stuff. + ---------------------------------------------------------------------------*/ + + if (G.pInfo->vollabel) + return IZ_VOL_LABEL; /* can't set disk volume labels in Unix */ + + /* can create path as long as not just freshening, or if user told us */ + G.create_dirs = (!uO.fflag || renamed); + + created_dir = FALSE; /* not yet */ + + /* user gave full pathname: don't prepend rootpath */ + renamed_fullpath = (renamed && (*G.filename == '/')); + + if (checkdir(__G__ (char *)NULL, INIT) == 10) + return 10; /* initialize path buffer, unless no memory */ + + *pathcomp = '\0'; /* initialize translation buffer */ + pp = pathcomp; /* point to translation buffer */ + if (uO.jflag) /* junking directories */ + cp = (char *)strrchr(G.filename, '/'); + if (cp == (char *)NULL) /* no '/' or not junking dirs */ + cp = G.filename; /* point to internal zipfile-member pathname */ + else + ++cp; /* point to start of last component of path */ + +/*--------------------------------------------------------------------------- + Begin main loop through characters in filename. + ---------------------------------------------------------------------------*/ + + while ((workch = (uch)*cp++) != 0) { + + if (quote) { /* if character quoted, */ + *pp++ = (char)workch; /* include it literally */ + quote = FALSE; + } else + switch (workch) { + case '/': /* can assume -j flag not given */ + *pp = '\0'; + if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) + return error; + pp = pathcomp; /* reset conversion buffer for next piece */ + lastsemi = (char *)NULL; /* leave directory semi-colons alone */ + break; + + case ';': /* VMS version (or DEC-20 attrib?) */ + lastsemi = pp; + *pp++ = ';'; /* keep for now; remove VMS ";##" */ + break; /* later, if requested */ + +#ifdef ACORN_FTYPE_NFS + case ',': /* NFS filetype extension */ + lastcomma = pp; + *pp++ = ','; /* keep for now; may need to remove */ + break; /* later, if requested */ +#endif + + case '\026': /* control-V quote for special chars */ + quote = TRUE; /* set flag for next character */ + break; + +#ifdef MTS + case ' ': /* change spaces to underscore under */ + *pp++ = '_'; /* MTS; leave as spaces under Unix */ + break; +#endif + + default: + /* allow European characters in filenames: */ + if (isprint(workch) || (128 <= workch && workch <= 254)) + *pp++ = (char)workch; + } /* end switch */ + + } /* end while loop */ + + *pp = '\0'; /* done with pathcomp: terminate it */ + + /* if not saving them, remove VMS version numbers (appended ";###") */ + if (!uO.V_flag && lastsemi) { + pp = lastsemi + 1; + while (isdigit((uch)(*pp))) + ++pp; + if (*pp == '\0') /* only digits between ';' and end: nuke */ + *lastsemi = '\0'; + } + +#ifdef ACORN_FTYPE_NFS + /* translate Acorn filetype information if asked to do so */ + if (uO.acorn_nfs_ext && isRISCOSexfield(G.extra_field)) { + /* file *must* have a RISC OS extra field */ + int ft = (int)makelong(((RO_extra_block *)G.extra_field)->loadaddr); + /*32-bit*/ + if (lastcomma) { + pp = lastcomma + 1; + while (isxdigit((uch)(*pp))) ++pp; + if (pp == lastcomma+4 && *pp == '\0') *lastcomma='\0'; /* nuke */ + } + if ((ft & 1<<31)==0) ft=0x000FFD00; + sprintf(pathcomp+strlen(pathcomp), ",%03x", ft>>8 & 0xFFF); + } +#endif /* ACORN_FTYPE_NFS */ + +/*--------------------------------------------------------------------------- + Report if directory was created (and no file to create: filename ended + in '/'), check name to be sure it exists, and combine path and name be- + fore exiting. + ---------------------------------------------------------------------------*/ + + if (G.filename[strlen(G.filename) - 1] == '/') { + checkdir(__G__ G.filename, GETPATH); + if (created_dir) { + if (QCOND2) { + Info(slide, 0, ((char *)slide, " creating: %s\n", + G.filename)); + } +#ifndef NO_CHMOD + /* set approx. dir perms (make sure can still read/write in dir) */ + if (chmod(G.filename, (0xffff & G.pInfo->file_attr) | 0700)) + perror("chmod (directory attributes) error"); +#endif + return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ + } + return 2; /* dir existed already; don't look for data to extract */ + } + + if (*pathcomp == '\0') { + Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", + G.filename)); + return 3; + } + + checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ + checkdir(__G__ G.filename, GETPATH); + + return error; + +} /* end function mapname() */ + + + + +#if 0 /*========== NOTES ==========*/ + + extract-to dir: a:path/ + buildpath: path1/path2/ ... (NULL-terminated) + pathcomp: filename + + mapname(): + loop over chars in zipfile member name + checkdir(path component, COMPONENT | CREATEDIR) --> map as required? + (d:/tmp/unzip/) (disk:[tmp.unzip.) + (d:/tmp/unzip/jj/) (disk:[tmp.unzip.jj.) + (d:/tmp/unzip/jj/temp/) (disk:[tmp.unzip.jj.temp.) + finally add filename itself and check for existence? (could use with rename) + (d:/tmp/unzip/jj/temp/msg.outdir) (disk:[tmp.unzip.jj.temp]msg.outdir) + checkdir(name, GETPATH) --> copy path to name and free space + +#endif /* 0 */ + + + + +/***********************/ +/* Function checkdir() */ +/***********************/ + +int checkdir(__G__ pathcomp, flag) + __GDEF + char *pathcomp; + int flag; +/* + * returns: 1 - (on APPEND_NAME) truncated filename + * 2 - path doesn't exist, not allowed to create + * 3 - path doesn't exist, tried to create and failed; or + * path exists and is not a directory, but is supposed to be + * 4 - path is too long + * 10 - can't allocate memory for filename buffers + */ +{ + static int rootlen = 0; /* length of rootpath */ + static char *rootpath; /* user's "extract-to" directory */ + static char *buildpath; /* full path (so far) to extracted file */ + static char *end; /* pointer to end of buildpath ('\0') */ + +# define FN_MASK 7 +# define FUNCTION (flag & FN_MASK) + + + +/*--------------------------------------------------------------------------- + APPEND_DIR: append the path component to the path being built and check + for its existence. If doesn't exist and we are creating directories, do + so for this one; else signal success or error as appropriate. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_DIR) { + int too_long = FALSE; +#ifdef SHORT_NAMES + char *old_end = end; +#endif + + Trace((stderr, "appending dir segment [%s]\n", pathcomp)); + while ((*end = *pathcomp++) != '\0') + ++end; +#ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ + if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ + *(end = old_end + FILENAME_MAX) = '\0'; +#endif + + /* GRR: could do better check, see if overrunning buffer as we go: + * check end-buildpath after each append, set warning variable if + * within 20 of FILNAMSIZ; then if var set, do careful check when + * appending. Clear variable when begin new path. */ + + if ((end-buildpath) > FILNAMSIZ-3) /* need '/', one-char name, '\0' */ + too_long = TRUE; /* check if extracting directory? */ + if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ + if (!G.create_dirs) { /* told not to create (freshening) */ + free(buildpath); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", buildpath)); + free(buildpath); + return 4; /* no room for filenames: fatal */ + } + if (mkdir(buildpath, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, + "checkdir error: cannot create %s\n\ + unable to process %s.\n", buildpath, G.filename)); + free(buildpath); + return 3; /* path didn't exist, tried to create, failed */ + } + created_dir = TRUE; + } else if (!S_ISDIR(G.statbuf.st_mode)) { + Info(slide, 1, ((char *)slide, + "checkdir error: %s exists but is not directory\n\ + unable to process %s.\n", buildpath, G.filename)); + free(buildpath); + return 3; /* path existed but wasn't dir */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", buildpath)); + free(buildpath); + return 4; /* no room for filenames: fatal */ + } + *end++ = '/'; + *end = '\0'; + Trace((stderr, "buildpath now = [%s]\n", buildpath)); + return 0; + + } /* end if (FUNCTION == APPEND_DIR) */ + +/*--------------------------------------------------------------------------- + GETPATH: copy full path to the string pointed at by pathcomp, and free + buildpath. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == GETPATH) { + strcpy(pathcomp, buildpath); + Trace((stderr, "getting and freeing path [%s]\n", pathcomp)); + free(buildpath); + buildpath = end = (char *)NULL; + return 0; + } + +/*--------------------------------------------------------------------------- + APPEND_NAME: assume the path component is the filename; append it and + return without checking for existence. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_NAME) { +#ifdef SHORT_NAMES + char *old_end = end; +#endif + + Trace((stderr, "appending filename [%s]\n", pathcomp)); + while ((*end = *pathcomp++) != '\0') { + ++end; +#ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ + if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ + *(end = old_end + FILENAME_MAX) = '\0'; +#endif + if ((end-buildpath) >= FILNAMSIZ) { + *--end = '\0'; + Info(slide, 0x201, ((char *)slide, + "checkdir warning: path too long; truncating\n\ + %s\n -> %s\n", G.filename, buildpath)); + return 1; /* filename truncated */ + } + } + Trace((stderr, "buildpath now = [%s]\n", buildpath)); + return 0; /* could check for existence here, prompt for new name... */ + } + +/*--------------------------------------------------------------------------- + INIT: allocate and initialize buffer space for the file currently being + extracted. If file was renamed with an absolute path, don't prepend the + extract-to path. + ---------------------------------------------------------------------------*/ + +/* GRR: for VMS and TOPS-20, add up to 13 to strlen */ + + if (FUNCTION == INIT) { + Trace((stderr, "initializing buildpath to ")); +#ifdef ACORN_FTYPE_NFS + if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+ + (uO.acorn_nfs_ext ? 5 : 1))) +#else + if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) +#endif + == (char *)NULL) + return 10; + if ((rootlen > 0) && !renamed_fullpath) { + strcpy(buildpath, rootpath); + end = buildpath + rootlen; + } else { + *buildpath = '\0'; + end = buildpath; + } + Trace((stderr, "[%s]\n", buildpath)); + return 0; + } + +/*--------------------------------------------------------------------------- + ROOT: if appropriate, store the path in rootpath and create it if neces- + sary; else assume it's a zipfile member and return. This path segment + gets used in extracting all members from every zipfile specified on the + command line. + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) || defined(SFX_EXDIR)) + if (FUNCTION == ROOT) { + Trace((stderr, "initializing root path to [%s]\n", pathcomp)); + if (pathcomp == (char *)NULL) { + rootlen = 0; + return 0; + } + if ((rootlen = strlen(pathcomp)) > 0) { + if (pathcomp[rootlen-1] == '/') { + pathcomp[--rootlen] = '\0'; + } + if (rootlen > 0 && (stat(pathcomp, &G.statbuf) || + !S_ISDIR(G.statbuf.st_mode))) /* path does not exist */ + { + if (!G.create_dirs /* || iswild(pathcomp) */ ) { + rootlen = 0; + return 2; /* skip (or treat as stored file) */ + } + /* create the directory (could add loop here to scan pathcomp + * and create more than one level, but why really necessary?) */ + if (mkdir(pathcomp, 0777) == -1) { + Info(slide, 1, ((char *)slide, + "checkdir: cannot create extraction directory: %s\n", + pathcomp)); + rootlen = 0; /* path didn't exist, tried to create, and */ + return 3; /* failed: file exists, or 2+ levels required */ + } + } + if ((rootpath = (char *)malloc(rootlen+2)) == (char *)NULL) { + rootlen = 0; + return 10; + } + strcpy(rootpath, pathcomp); + rootpath[rootlen++] = '/'; + rootpath[rootlen] = '\0'; + Trace((stderr, "rootpath now = [%s]\n", rootpath)); + } + return 0; + } +#endif /* !SFX || SFX_EXDIR */ + +/*--------------------------------------------------------------------------- + END: free rootpath, immediately prior to program exit. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == END) { + Trace((stderr, "freeing rootpath\n")); + if (rootlen > 0) { + free(rootpath); + rootlen = 0; + } + return 0; + } + + return 99; /* should never reach */ + +} /* end function checkdir() */ + + + + + +#ifdef NO_MKDIR + +/********************/ +/* Function mkdir() */ +/********************/ + +int mkdir(path, mode) + char *path; + int mode; /* ignored */ +/* + * returns: 0 - successful + * -1 - failed (errno not set, however) + */ +{ + char command[FILNAMSIZ+40]; /* buffer for system() call */ + + /* GRR 930416: added single quotes around path to avoid bug with + * creating directories with ampersands in name; not yet tested */ + sprintf(command, "IFS=\" \t\n\" /bin/mkdir '%s' 2>/dev/null", path); + if (system(command)) + return -1; + return 0; +} + +#endif /* NO_MKDIR */ + + + + + +#if 0 +#ifdef MORE + +/**************************/ +/* Function screenlines() */ +/**************************/ + +int screenlines() +{ + char *envptr, *getenv(); + int n; + + /* GRR: this is overly simplistic; should use winsize struct and + * appropriate TIOCGWINSZ ioctl(), assuming exists on enough systems + */ + envptr = getenv("LINES"); + if (envptr == (char *)NULL || (n = atoi(envptr)) < 5) + return 24; /* VT-100 assumed to be minimal hardware */ + else + return n; +} + +#endif /* MORE */ +#endif /* 0 */ + + + + + +#ifndef MTS + +/****************************/ +/* Function close_outfile() */ +/****************************/ + +void close_outfile(__G) /* GRR: change to return PK-style warning level */ + __GDEF +{ + iztimes zt; + ush z_uidgid[2]; + unsigned eb_izux_flg; + +/*--------------------------------------------------------------------------- + If symbolic links are supported, allocate a storage area, put the uncom- + pressed "data" in it, and create the link. Since we know it's a symbolic + link to start with, we shouldn't have to worry about overflowing unsigned + ints with unsigned longs. + ---------------------------------------------------------------------------*/ + +#ifdef SYMLINKS + if (G.symlnk) { + unsigned ucsize = (unsigned)G.lrec.ucsize; + char *linktarget = (char *)malloc((unsigned)G.lrec.ucsize+1); + + fclose(G.outfile); /* close "data" file... */ + G.outfile = fopen(G.filename, FOPR); /* ...and reopen for reading */ + if (!linktarget || fread(linktarget, 1, ucsize, G.outfile) != + (int)ucsize) + { + Info(slide, 0x201, ((char *)slide, + "warning: symbolic link (%s) failed\n", G.filename)); + if (linktarget) + free(linktarget); + fclose(G.outfile); + return; + } + fclose(G.outfile); /* close "data" file for good... */ + unlink(G.filename); /* ...and delete it */ + linktarget[ucsize] = '\0'; + if (QCOND2) + Info(slide, 0, ((char *)slide, "-> %s ", linktarget)); + if (symlink(linktarget, G.filename)) /* create the real link */ + perror("symlink error"); + free(linktarget); + return; /* can't set time on symlinks */ + } +#endif /* SYMLINKS */ + + fclose(G.outfile); +#ifdef QLZIP + if (G.extra_field) { + static void qlfix OF((__GPRO__ uch *ef_ptr, unsigned ef_len)); + + qlfix(__G__ G.extra_field, G.lrec.extra_field_length); + } +#endif + +/*--------------------------------------------------------------------------- + Convert from MSDOS-format local time and date to Unix-format 32-bit GMT + time: adjust base year from 1980 to 1970, do usual conversions from + yy/mm/dd hh:mm:ss to elapsed seconds, and account for timezone and day- + light savings time differences. If we have a Unix extra field, however, + we're laughing: both mtime and atime are ours. On the other hand, we + then have to check for restoration of UID/GID. + ---------------------------------------------------------------------------*/ + + eb_izux_flg = (G.extra_field ? ef_scan_for_izux(G.extra_field, + G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, +#ifdef IZ_CHECK_TZ + (G.tz_is_valid ? &zt : NULL), +#else + &zt, +#endif + z_uidgid) : 0); + if (eb_izux_flg & EB_UT_FL_MTIME) { + TTrace((stderr, "\nclose_outfile: Unix e.f. modif. time = %ld\n", + zt.mtime)); + } else { + zt.mtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); + } + if (eb_izux_flg & EB_UT_FL_ATIME) { + TTrace((stderr, "close_outfile: Unix e.f. access time = %ld\n", + zt.atime)); + } else { + zt.atime = zt.mtime; + TTrace((stderr, "\nclose_outfile: modification/access times = %ld\n", + zt.mtime)); + } + + /* if -X option was specified and we have UID/GID info, restore it */ + if (uO.X_flag && eb_izux_flg & EB_UX2_VALID) { + TTrace((stderr, "close_outfile: restoring Unix UID/GID info\n")); + if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1])) + { + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: cannot set UID %d and/or GID %d for %s\n", + z_uidgid[0], z_uidgid[1], G.filename)); + else + Info(slide, 0x201, ((char *)slide, + " (warning) cannot set UID %d and/or GID %d", + z_uidgid[0], z_uidgid[1])); + } + } + + /* set the file's access and modification times */ + if (utime(G.filename, (ztimbuf *)&zt)) { +#ifdef AOS_VS + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, "... cannot set time for %s\n", + G.filename)); + else + Info(slide, 0x201, ((char *)slide, "... cannot set time")); +#else + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: cannot set times for %s\n", G.filename)); + else + Info(slide, 0x201, ((char *)slide, + " (warning) cannot set times")); +#endif /* ?AOS_VS */ + } + +/*--------------------------------------------------------------------------- + Change the file permissions from default ones to those stored in the + zipfile. + ---------------------------------------------------------------------------*/ + +#ifndef NO_CHMOD + if (chmod(G.filename, 0xffff & G.pInfo->file_attr)) + perror("chmod (file attributes) error"); +#endif + +} /* end function close_outfile() */ + +#endif /* !MTS */ + + + + +#ifdef SET_DIR_ATTRIB +/* messages of code for setting directory attributes */ +static char Far DirlistUidGidFailed[] = + "warning: cannot set UID %d and/or GID %d for %s\n"; +static char Far DirlistUtimeFailed[] = + "warning: cannot set modification, access times for %s\n"; +# ifndef NO_CHMOD + static char Far DirlistChmodFailed[] = + "warning: cannot set permissions for %s\n"; +# endif + + +int set_direc_attribs(__G__ d) + __GDEF + dirtime *d; +{ + int errval = PK_OK; + + if (d->have_uidgid && + chown(d->fn, (uid_t)d->uidgid[0], (gid_t)d->uidgid[1])) + { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistUidGidFailed), + d->uidgid[0], d->uidgid[1], d->fn)); + if (!errval) + errval = PK_WARN; + } + if (utime(d->fn, &d->u.t2)) { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistUtimeFailed), d->fn)); + if (!errval) + errval = PK_WARN; + } +#ifndef NO_CHMOD + if (chmod(d->fn, 0xffff & d->perms)) { + Info(slide, 0x201, ((char *)slide, + LoadFarString(DirlistChmodFailed), d->fn)); + /* perror("chmod (file attributes) error"); */ + if (!errval) + errval = PK_WARN; + } +#endif /* !NO_CHMOD */ + return errval; +} /* end function set_directory_attributes() */ + +#endif /* SET_DIR_ATTRIB */ + + + + +#ifdef TIMESTAMP + +/***************************/ +/* Function stamp_file() */ +/***************************/ + +int stamp_file(fname, modtime) + ZCONST char *fname; + time_t modtime; +{ + ztimbuf tp; + + tp.modtime = tp.actime = modtime; + return (utime(fname, &tp)); + +} /* end function stamp_file() */ + +#endif /* TIMESTAMP */ + + + + +#ifndef SFX + +/************************/ +/* Function version() */ +/************************/ + +void version(__G) + __GDEF +{ +#if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE) || defined(NetBSD) + char buf1[40]; +#if defined(CRAY) || defined(NX_CURRENT_COMPILER_RELEASE) + char buf2[40]; +#endif +#endif + + /* Pyramid, NeXT have problems with huge macro expansion, too: no Info() */ + sprintf((char *)slide, LoadFarString(CompiledWith), + +#ifdef __GNUC__ +# ifdef NX_CURRENT_COMPILER_RELEASE + (sprintf(buf1, "NeXT DevKit %d.%02d ", NX_CURRENT_COMPILER_RELEASE/100, + NX_CURRENT_COMPILER_RELEASE%100), buf1), + (strlen(__VERSION__) > 8)? "(gcc)" : + (sprintf(buf2, "(gcc %s)", __VERSION__), buf2), +# else + "gcc ", __VERSION__, +# endif +#else +# if defined(CRAY) && defined(_RELEASE) + "cc ", (sprintf(buf1, "version %d", _RELEASE), buf1), +# else +# ifdef __VERSION__ + "cc ", __VERSION__, +# else + "cc", "", +# endif +# endif +#endif + + "Unix", + +#if defined(sgi) || defined(__sgi) + " (Silicon Graphics IRIX)", +#else +#ifdef sun +# ifdef sparc +# ifdef __SVR4 + " (Sun SPARC/Solaris)", +# else /* may or may not be SunOS */ + " (Sun SPARC)", +# endif +# else +# if defined(sun386) || defined(i386) + " (Sun 386i)", +# else +# if defined(mc68020) || defined(__mc68020__) + " (Sun 3)", +# else /* mc68010 or mc68000: Sun 2 or earlier */ + " (Sun 2)", +# endif +# endif +# endif +#else +#ifdef __hpux + " (HP/UX)", +#else +#ifdef __osf__ + " (DEC OSF/1)", +#else +#ifdef _AIX + " (IBM AIX)", +#else +#ifdef aiws + " (IBM RT/AIX)", +#else +#if defined(CRAY) || defined(cray) +# ifdef _UNICOS + (sprintf(buf2, " (Cray UNICOS release %d)", _UNICOS), buf2), +# else + " (Cray UNICOS)", +# endif +#else +#if defined(uts) || defined(UTS) + " (Amdahl UTS)", +#else +#ifdef NeXT +# ifdef mc68000 + " (NeXTStep/black)", +# else + " (NeXTStep for Intel)", +# endif +#else /* the next dozen or so are somewhat order-dependent */ +#ifdef LINUX +# ifdef __ELF__ + " (Linux ELF)", +# else + " (Linux a.out)", +# endif +#else +#ifdef MINIX + " (Minix)", +#else +#ifdef M_UNIX + " (SCO Unix)", +#else +#ifdef M_XENIX + " (SCO Xenix)", +#else +#ifdef __NetBSD__ +# ifdef NetBSD0_8 + (sprintf(buf1, " (NetBSD 0.8%c)", (char)(NetBSD0_8 - 1 + 'A')), buf1), +# else +# ifdef NetBSD0_9 + (sprintf(buf1, " (NetBSD 0.9%c)", (char)(NetBSD0_9 - 1 + 'A')), buf1), +# else +# ifdef NetBSD1_0 + (sprintf(buf1, " (NetBSD 1.0%c)", (char)(NetBSD1_0 - 1 + 'A')), buf1), +# else + (BSD4_4 == 0.5)? " (NetBSD before 0.9)" : " (NetBSD 1.1 or later)", +# endif +# endif +# endif +#else +#ifdef __FreeBSD__ + (BSD4_4 == 0.5)? " (FreeBSD 1.x)" : " (FreeBSD 2.0 or later)", +#else +#ifdef __bsdi__ + (BSD4_4 == 0.5)? " (BSD/386 1.0)" : " (BSD/386 1.1 or later)", +#else +#ifdef __386BSD__ + (BSD4_4 == 1)? " (386BSD, post-4.4 release)" : " (386BSD)", +#else +#if defined(i486) || defined(__i486) || defined(__i486__) + " (Intel 486)", +#else +#if defined(i386) || defined(__i386) || defined(__i386__) + " (Intel 386)", +#else +#ifdef pyr + " (Pyramid)", +#else +#ifdef ultrix +# ifdef mips + " (DEC/MIPS)", +# else +# ifdef vax + " (DEC/VAX)", +# else /* __alpha? */ + " (DEC/Alpha)", +# endif +# endif +#else +#ifdef gould + " (Gould)", +#else +#ifdef MTS + " (MTS)", +#else +#ifdef __convexc__ + " (Convex)", +#else +#ifdef __QNX__ + " (QNX 4)", +#else +#ifdef __QNXNTO__ + " (QNX Neutrino)", +#else +#ifdef Lynx + " (LynxOS)", +#else + "", +#endif /* Lynx */ +#endif /* QNX Neutrino */ +#endif /* QNX 4 */ +#endif /* Convex */ +#endif /* MTS */ +#endif /* Gould */ +#endif /* DEC */ +#endif /* Pyramid */ +#endif /* 386 */ +#endif /* 486 */ +#endif /* 386BSD */ +#endif /* BSDI BSD/386 */ +#endif /* NetBSD */ +#endif /* FreeBSD */ +#endif /* SCO Xenix */ +#endif /* SCO Unix */ +#endif /* Minix */ +#endif /* Linux */ +#endif /* NeXT */ +#endif /* Amdahl */ +#endif /* Cray */ +#endif /* RT/AIX */ +#endif /* AIX */ +#endif /* OSF/1 */ +#endif /* HP/UX */ +#endif /* Sun */ +#endif /* SGI */ + +#ifdef __DATE__ + " on ", __DATE__ +#else + "", "" +#endif + ); + + (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); + +} /* end function version() */ + +#endif /* !SFX */ + + + + +#ifdef QLZIP + +struct qdirect { + long d_length __attribute__ ((packed)); /* file length */ + unsigned char d_access __attribute__ ((packed)); /* file access type */ + unsigned char d_type __attribute__ ((packed)); /* file type */ + long d_datalen __attribute__ ((packed)); /* data length */ + long d_reserved __attribute__ ((packed));/* Unused */ + short d_szname __attribute__ ((packed)); /* size of name */ + char d_name[36] __attribute__ ((packed));/* name area */ + long d_update __attribute__ ((packed)); /* last update */ + long d_refdate __attribute__ ((packed)); + long d_backup __attribute__ ((packed)); /* EOD */ +}; + +#define LONGID "QDOS02" +#define EXTRALEN (sizeof(struct qdirect) + 8) +#define JBLONGID "QZHD" +#define JBEXTRALEN (sizeof(jbextra) - 4 * sizeof(char)) + +typedef struct { + char eb_header[4] __attribute__ ((packed)); /* place_holder */ + char longid[8] __attribute__ ((packed)); + struct qdirect header __attribute__ ((packed)); +} qdosextra; + +typedef struct { + char eb_header[4]; /* place_holder */ + char longid[4]; + struct qdirect header; +} jbextra; + + + +/* The following two functions SH() and LG() convert big-endian short + * and long numbers into native byte order. They are some kind of + * counterpart to the generic UnZip's makeword() and makelong() functions. + */ +static ush SH(ush val) +{ + uch swapbuf[2]; + + swapbuf[1] = (uch)(val & 0xff); + swapbuf[0] = (uch)(val >> 8); + return (*(ush *)swapbuf); +} + + + +static ulg LG(ulg val) +{ + /* convert the big-endian unsigned long number `val' to the machine + * dependant representation + */ + ush swapbuf[2]; + + swapbuf[1] = SH((ush)(val & 0xffff)); + swapbuf[0] = SH((ush)(val >> 16)); + return (*(ulg *)swapbuf); +} + + + +static void qlfix(__G__ ef_ptr, ef_len) + __GDEF + uch *ef_ptr; + unsigned ef_len; +{ + while (ef_len >= EB_HEADSIZE) + { + unsigned eb_id = makeword(EB_ID + ef_ptr); + unsigned eb_len = makeword(EB_LEN + ef_ptr); + + if (eb_len > (ef_len - EB_HEADSIZE)) { + /* discovered some extra field inconsistency! */ + Trace((stderr, + "qlfix: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } + + switch (eb_id) { + case EF_QDOS: + { + struct _ntc_ + { + long id; + long dlen; + } ntc; + long dlen = 0; + + qdosextra *extra = (qdosextra *)ef_ptr; + jbextra *jbp = (jbextra *)ef_ptr; + + if (!strncmp(extra->longid, LONGID, strlen(LONGID))) + { + if (eb_len != EXTRALEN) + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in Qdos field for %s\n", + G.filename)); + else + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in Qdos field")); + + if (extra->header.d_type) + { + dlen = extra->header.d_datalen; + } + } + + if (!strncmp(jbp->longid, JBLONGID, strlen(JBLONGID))) + { + if (eb_len != JBEXTRALEN) + if (uO.qflag) + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in QZ field for %s\n", + G.filename)); + else + Info(slide, 0x201, ((char *)slide, + "warning: invalid length in QZ field")); + if(jbp->header.d_type) + { + dlen = jbp->header.d_datalen; + } + } + + if ((long)LG(dlen) > 0) + { + G.outfile = fopen(G.filename,"r+"); + fseek(G.outfile, -8, SEEK_END); + fread(&ntc, 8, 1, G.outfile); + if(ntc.id != *(long *)"XTcc") + { + ntc.id = *(long *)"XTcc"; + ntc.dlen = dlen; + fwrite (&ntc, 8, 1, G.outfile); + } + Info(slide, 0x201, ((char *)slide, "QData = %d", LG(dlen))); + fclose(G.outfile); + } + return; /* finished, cancel further extra field scanning */ + } + + default: + Trace((stderr,"qlfix: unknown extra field block, ID=%d\n", + eb_id)); + } + + /* Skip this extra field block */ + ef_ptr += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + } +} +#endif /* QLZIP */ + + + + +#ifdef ACORN_FTYPE_NFS + +/* Acorn bits for NFS filetyping */ + +static int isRISCOSexfield(uch *extra_field) +{ + if (extra_field != NULL) { + RO_extra_block *block = (RO_extra_block *)extra_field; + return ( + makeword(block->ID) == EF_SPARK && + (makeword(block->size) == 24 || makeword(block->size) == 20) && + makelong(block->ID_2) == 0x30435241 /* ARC0 */); + } + return FALSE; +} +#endif /* ACORN_FTYPE_NFS */ diff --git a/utils/Install/sfxzip/unreduce.c b/utils/Install/sfxzip/unreduce.c new file mode 100644 index 0000000000..4cfb3fec6f --- /dev/null +++ b/utils/Install/sfxzip/unreduce.c @@ -0,0 +1,230 @@ +/*--------------------------------------------------------------------------- + + unreduce.c + + The Reducing algorithm is actually a combination of two distinct algorithms. + The first algorithm compresses repeated byte sequences, and the second al- + gorithm takes the compressed stream from the first algorithm and applies a + probabilistic compression method. + + * Copyright 1989 Samuel H. Smith; All rights reserved + * + * Do not distribute modified versions without my permission. + * Do not remove or alter this notice or any other copyright notice. + * If you use this in your own program you must distribute source code. + * Do not use any of this in a commercial product. + + See the accompanying file "COPYING" in UnZip source and binary distributions + for further information. This code is NOT used unless USE_SMITH_CODE is + explicitly defined (==> COPYRIGHT_CLEAN is not defined). + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" /* defines COPYRIGHT_CLEAN by default */ + + +#ifndef COPYRIGHT_CLEAN + +/**************************************/ +/* UnReduce Defines, Typedefs, etc. */ +/**************************************/ + +#define DLE 144 + +typedef uch f_array[64]; /* for followers[256][64] */ + + + +/******************************/ +/* UnReduce Local Functions */ +/******************************/ + +static void LoadFollowers OF((__GPRO__ f_array *followers, uch *Slen)); + + + +/*******************************/ +/* UnReduce Global Constants */ +/*******************************/ + +static ZCONST shrint L_table[] = +{0, 0x7f, 0x3f, 0x1f, 0x0f}; + +static ZCONST shrint D_shift[] = +{0, 0x07, 0x06, 0x05, 0x04}; +static ZCONST shrint D_mask[] = +{0, 0x01, 0x03, 0x07, 0x0f}; + +static ZCONST shrint B_table[] = +{8, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8}; + + + + + +/*************************/ +/* Function unreduce() */ +/*************************/ + +void unreduce(__G) /* expand probabilistically reduced data */ + __GDEF +{ + register int lchar = 0; + shrint nchar; + shrint ExState = 0; + shrint V = 0; + shrint Len = 0; + long s = G.ucsize; /* number of bytes left to decompress */ + unsigned w = 0; /* position in output window slide[] */ + unsigned u = 1; /* true if slide[] unflushed */ + uch Slen[256]; + + f_array *followers = (f_array *)(slide + 0x4000); + int factor = G.lrec.compression_method - 1; + + LoadFollowers(__G__ followers, Slen); + + while (s > 0 /* && (!zipeof) */) { + if (Slen[lchar] == 0) + READBITS(8, nchar) /* ; */ + else { + READBITS(1, nchar) /* ; */ + if (nchar != 0) + READBITS(8, nchar) /* ; */ + else { + shrint follower; + int bitsneeded = B_table[Slen[lchar]]; + + READBITS(bitsneeded, follower) /* ; */ + nchar = followers[lchar][follower]; + } + } + /* expand the resulting byte */ + switch (ExState) { + + case 0: + if (nchar != DLE) { + s--; + slide[w++] = (uch)nchar; + if (w == 0x4000) { + flush(__G__ slide, (ulg)w, 0); + w = u = 0; + } + } + else + ExState = 1; + break; + + case 1: + if (nchar != 0) { + V = nchar; + Len = V & L_table[factor]; + if (Len == L_table[factor]) + ExState = 2; + else + ExState = 3; + } else { + s--; + slide[w++] = DLE; + if (w == 0x4000) + { + flush(__G__ slide, (ulg)w, 0); + w = u = 0; + } + ExState = 0; + } + break; + + case 2:{ + Len += nchar; + ExState = 3; + } + break; + + case 3:{ + register unsigned e; + register unsigned n = Len + 3; + register unsigned d = w - ((((V >> D_shift[factor]) & + D_mask[factor]) << 8) + nchar + 1); + + s -= n; + do { + n -= (e = (e = 0x4000 - ((d &= 0x3fff) > w ? d : w)) > n ? + n : e); + if (u && w <= d) + { + memzero(slide + w, e); + w += e; + d += e; + } + else + if (w - d < e) /* (assume unsigned comparison) */ + do { /* slow to avoid memcpy() overlap */ + slide[w++] = slide[d++]; + } while (--e); + else + { + memcpy(slide + w, slide + d, e); + w += e; + d += e; + } + if (w == 0x4000) + { + flush(__G__ slide, (ulg)w, 0); + w = u = 0; + } + } while (n); + + ExState = 0; + } + break; + } + + /* store character for next iteration */ + lchar = nchar; + } + + /* flush out slide */ + flush(__G__ slide, (ulg)w, 0); +} + + + + + +/******************************/ +/* Function LoadFollowers() */ +/******************************/ + +static void LoadFollowers(__G__ followers, Slen) + __GDEF + f_array *followers; + uch *Slen; +{ + register int x; + register int i; + + for (x = 255; x >= 0; x--) { + READBITS(6, Slen[x]) /* ; */ + for (i = 0; (uch)i < Slen[x]; i++) + READBITS(8, followers[x][i]) /* ; */ + } +} + +#endif /* !COPYRIGHT_CLEAN */ diff --git a/utils/Install/sfxzip/unshrink.c b/utils/Install/sfxzip/unshrink.c new file mode 100644 index 0000000000..287b4baf54 --- /dev/null +++ b/utils/Install/sfxzip/unshrink.c @@ -0,0 +1,301 @@ +/*--------------------------------------------------------------------------- + + unshrink.c version 1.21 23 Nov 95 + + + NOTE: This code may or may not infringe on the so-called "Welch + patent" owned by Unisys. (From reading the patent, it appears + that a pure LZW decompressor is *not* covered, but this claim has + not been tested in court, and Unisys is reported to believe other- + wise.) It is therefore the responsibility of the user to acquire + whatever license(s) may be required for legal use of this code. + + THE INFO-ZIP GROUP DISCLAIMS ALL LIABILITY FOR USE OF THIS CODE + IN VIOLATION OF APPLICABLE PATENT LAW. + + + Shrinking is basically a dynamic LZW algorithm with allowed code sizes of + up to 13 bits; in addition, there is provision for partial clearing of + leaf nodes. PKWARE uses the special code 256 (decimal) to indicate a + change in code size or a partial clear of the code tree: 256,1 for the + former and 256,2 for the latter. [Note that partial clearing can "orphan" + nodes: the parent-to-be can be cleared before its new child is added, + but the child is added anyway (as an orphan, as though the parent still + existed). When the tree fills up to the point where the parent node is + reused, the orphan is effectively "adopted." Versions prior to 1.05 were + affected more due to greater use of pointers (to children and siblings + as well as parents).] + + This replacement version of unshrink.c was written from scratch. It is + based only on the algorithms described in Mark Nelson's _The Data Compres- + sion Book_ and in Terry Welch's original paper in the June 1984 issue of + IEEE _Computer_; no existing source code, including any in Nelson's book, + was used. + + Memory requirements have been reduced in this version and are now no more + than the original Sam Smith code. This is still larger than any of the + other algorithms: at a minimum, 8K+8K+16K (stack+values+parents) assuming + 16-bit short ints, and this does not even include the output buffer (the + other algorithms leave the uncompressed data in the work area, typically + called slide[]). For machines with a 64KB data space this is a problem, + particularly when text conversion is required and line endings have more + than one character. UnZip's solution is to use two roughly equal halves + of outbuf for the ASCII conversion in such a case; the "unshrink" argument + to flush() signals that this is the case. + + For large-memory machines, a second outbuf is allocated for translations, + but only if unshrinking and only if translations are required. + + | binary mode | text mode + --------------------------------------------------- + big mem | big outbuf | big outbuf + big outbuf2 <- malloc'd here + small mem | small outbuf | half + half small outbuf + + Copyright 1994, 1995 Greg Roelofs. See the accompanying file "COPYING" + in UnZip 5.20 (or later) source or binary distributions. + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" /* defines LZW_CLEAN by default */ + + +#ifndef LZW_CLEAN + +static void partial_clear OF((__GPRO)); + +#ifdef DEBUG +# define OUTDBG(c) \ + if ((c)<32 || (c)>=127) pipeit("\\x%02x",(c)); else { } +#else +# define OUTDBG(c) +#endif + +/* HSIZE is defined as 2^13 (8192) in unzip.h */ +#define BOGUSCODE 256 +#define FLAG_BITS parent /* upper bits of parent[] used as flag bits */ +#define CODE_MASK (HSIZE - 1) /* 0x1fff (lower bits are parent's index) */ +#define FREE_CODE HSIZE /* 0x2000 (code is unused or was cleared) */ +#define HAS_CHILD (HSIZE << 1) /* 0x4000 (code has a child--do not clear) */ + +#define parent G.area.shrink.Parent +#define Value G.area.shrink.value /* "value" conflicts with Pyramid ioctl.h */ +#define stack G.area.shrink.Stack + + +/***********************/ +/* Function unshrink() */ +/***********************/ + +int unshrink(__G) + __GDEF +{ + int offset = (HSIZE - 1); + uch *stacktop = stack + offset; + register uch *newstr; + int codesize=9, len, KwKwK, error; + shrint code, oldcode, freecode, curcode; + shrint lastfreecode; + unsigned int outbufsiz; +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + /* Normally realbuf and outbuf will be the same. However, if the data + * are redirected to a large memory buffer, realbuf will point to the + * new location while outbuf will remain pointing to the malloc'd + * memory buffer. */ + uch *realbuf = G.outbuf; +#else +# define realbuf G.outbuf +#endif + + +/*--------------------------------------------------------------------------- + Initialize various variables. + ---------------------------------------------------------------------------*/ + + lastfreecode = BOGUSCODE; + +#ifndef VMS /* VMS uses its own buffer scheme for textmode flush(). */ +#ifndef SMALL_MEM + /* non-memory-limited machines: allocate second (large) buffer for + * textmode conversion in flush(), but only if needed */ + if (G.pInfo->textmode && !G.outbuf2 && + (G.outbuf2 = (uch *)malloc(TRANSBUFSIZ)) == (uch *)NULL) + return PK_MEM3; +#endif +#endif /* !VMS */ + + for (code = 0; code < BOGUSCODE; ++code) { + Value[code] = (uch)code; + parent[code] = BOGUSCODE; + } + for (code = BOGUSCODE+1; code < HSIZE; ++code) + parent[code] = FREE_CODE; + +#if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) { /* use normal outbuf unless we're a DLL routine */ + realbuf = G.redirect_buffer; + outbufsiz = G.redirect_size; + } else +#endif +#ifdef DLL + if (G.pInfo->textmode && !G.redirect_data) +#else + if (G.pInfo->textmode) +#endif + outbufsiz = RAWBUFSIZ; + else + outbufsiz = OUTBUFSIZ; + G.outptr = realbuf; + G.outcnt = 0L; + +/*--------------------------------------------------------------------------- + Get and output first code, then loop over remaining ones. + ---------------------------------------------------------------------------*/ + + READBITS(codesize, oldcode) + if (!G.zipeof) { + *G.outptr++ = (uch)oldcode; + OUTDBG((uch)oldcode) + ++G.outcnt; + } + + do { + READBITS(codesize, code) + if (G.zipeof) + break; + if (code == BOGUSCODE) { /* possible to have consecutive escapes? */ + READBITS(codesize, code) + if (code == 1) { + ++codesize; + Trace((stderr, " (codesize now %d bits)\n", codesize)); + } else if (code == 2) { + Trace((stderr, " (partial clear code)\n")); + partial_clear(__G); /* clear leafs (nodes with no children) */ + Trace((stderr, " (done with partial clear)\n")); + lastfreecode = BOGUSCODE; /* reset start of free-node search */ + } + continue; + } + + /*----------------------------------------------------------------------- + Translate code: traverse tree from leaf back to root. + -----------------------------------------------------------------------*/ + + newstr = stacktop; + curcode = code; + + if (parent[curcode] == FREE_CODE) { + /* or (FLAG_BITS[curcode] & FREE_CODE)? */ + KwKwK = TRUE; + Trace((stderr, " (found a KwKwK code %d; oldcode = %d)\n", code, + oldcode)); + --newstr; /* last character will be same as first character */ + curcode = oldcode; + } else + KwKwK = FALSE; + + do { + *newstr-- = Value[curcode]; + curcode = (shrint)(parent[curcode] & CODE_MASK); + } while (curcode != BOGUSCODE); + + len = (int)(stacktop - newstr++); + if (KwKwK) + *stacktop = *newstr; + + /*----------------------------------------------------------------------- + Write expanded string in reverse order to output buffer. + -----------------------------------------------------------------------*/ + + Trace((stderr, "code %4d; oldcode %4d; char %3d (%c); string [", code, + oldcode, (int)(*newstr), (*newstr<32 || *newstr>=127)? ' ':*newstr)); + + { + register uch *p; + + for (p = newstr; p < newstr+len; ++p) { + *G.outptr++ = *p; + OUTDBG(*p) + if (++G.outcnt == outbufsiz) { + Trace((stderr, "doing flush(), outcnt = %lu\n", G.outcnt)); + if ((error = flush(__G__ realbuf, G.outcnt, TRUE)) != 0) + pipeit("unshrink: flush() error (%d)\n", + error); + Trace((stderr, "done with flush()\n")); + G.outptr = realbuf; + G.outcnt = 0L; + } + } + } + + /*----------------------------------------------------------------------- + Add new leaf (first character of newstr) to tree as child of oldcode. + -----------------------------------------------------------------------*/ + + /* search for freecode */ + freecode = (shrint)(lastfreecode + 1); + /* add if-test before loop for speed? */ + while (parent[freecode] != FREE_CODE) + ++freecode; + lastfreecode = freecode; + Trace((stderr, "]; newcode %d\n", freecode)); + + Value[freecode] = *newstr; + parent[freecode] = oldcode; + oldcode = code; + + } while (!G.zipeof); + +/*--------------------------------------------------------------------------- + Flush any remaining data and return to sender... + ---------------------------------------------------------------------------*/ + + if (G.outcnt > 0L) { + Trace((stderr, "doing final flush(), outcnt = %lu\n", G.outcnt)); + if ((error = flush(__G__ realbuf, G.outcnt, TRUE)) != 0) + pipeit("unshrink: flush() error (%d)\n", error); + Trace((stderr, "done with flush()\n")); + } + + return PK_OK; + +} /* end function unshrink() */ + + + + + +/****************************/ +/* Function partial_clear() */ /* no longer recursive... */ +/****************************/ + +static void partial_clear(__G) + __GDEF +{ + register shrint code; + + /* clear all nodes which have no children (i.e., leaf nodes only) */ + + /* first loop: mark each parent as such */ + for (code = BOGUSCODE+1; code < HSIZE; ++code) { + register shrint cparent = (shrint)(parent[code] & CODE_MASK); + + if (cparent > BOGUSCODE && cparent != FREE_CODE) + FLAG_BITS[cparent] |= HAS_CHILD; /* set parent's child-bit */ + } + + /* second loop: clear all nodes *not* marked as parents; reset flag bits */ + for (code = BOGUSCODE+1; code < HSIZE; ++code) { + if (FLAG_BITS[code] & HAS_CHILD) /* just clear child-bit */ + FLAG_BITS[code] &= ~HAS_CHILD; + else { /* leaf: lose it */ + Trace((stderr, "%d\n", code)); + parent[code] = FREE_CODE; + } + } + + return; +} + +#endif /* !LZW_CLEAN */ diff --git a/utils/Install/sfxzip/unzip.c b/utils/Install/sfxzip/unzip.c new file mode 100644 index 0000000000..09968d4190 --- /dev/null +++ b/utils/Install/sfxzip/unzip.c @@ -0,0 +1,1744 @@ +/*--------------------------------------------------------------------------- + + unzip.c + + UnZip - a zipfile extraction utility. See below for make instructions, or + read the comments in Makefile and the various Contents files for more de- + tailed explanations. To report a bug, send a *complete* description to + Zip-Bugs@lists.wku.edu; include machine type, operating system and ver- + sion, compiler and version, and reasonably detailed error messages or prob- + lem report. To join Info-ZIP, see the instructions in README. + + UnZip 5.x is a greatly expanded and partially rewritten successor to 4.x, + which in turn was almost a complete rewrite of version 3.x. For a detailed + revision history, see UnzpHist.zip at quest.jpl.nasa.gov. For a list of + the many (near infinite) contributors, see "CONTRIBS" in the UnZip source + distribution. + + --------------------------------------------------------------------------- + + [from original zipinfo.c] + + This program reads great gobs of totally nifty information, including the + central directory stuff, from ZIP archives ("zipfiles" for short). It + started as just a testbed for fooling with zipfiles, but at this point it + is actually a useful utility. It also became the basis for the rewrite of + UnZip (3.16 -> 4.0), using the central directory for processing rather than + the individual (local) file headers. + + As of ZipInfo v2.0 and UnZip v5.1, the two programs are combined into one. + If the executable is named "unzip" (or "unzip.exe", depending), it behaves + like UnZip by default; if it is named "zipinfo" or "ii", it behaves like + ZipInfo. The ZipInfo behavior may also be triggered by use of unzip's -Z + option; for example, "unzip -Z [zipinfo_options] archive.zip". + + Another dandy product from your buddies at Newtware! + + Author: Greg Roelofs, newt@pobox.com, http://pobox.com/~newt/ + 23 August 1990 -> April 1997 + + --------------------------------------------------------------------------- + + Version: unzip5??.{tar.Z | tar.gz | zip} for Unix, VMS, OS/2, MS-DOS, Amiga, + Atari, Windows 3.x/95/NT/CE, Macintosh, Human68K, Acorn RISC OS, + BeOS, SMS/QDOS, VM/CMS, MVS, AOS/VS and TOPS-20. Decryption + requires sources in zcrypt28.zip. See the accompanying "WHERE" + file in the main source distribution for ftp, uucp, BBS and mail- + server sites, or see http://www.cdrom.com/pub/infozip/UnZip.html . + + Copyrights: see accompanying file "COPYING" in UnZip source distribution. + (This software is free but NOT IN THE PUBLIC DOMAIN. There + are some restrictions on commercial use.) + + ---------------------------------------------------------------------------*/ + + + +#define UNZIP_C +#define UNZIP_INTERNAL +#include "unzip.h" /* includes, typedefs, macros, prototypes, etc. */ +#include "crypt.h" +#include "version.h" + +#ifndef WINDLL /* The WINDLL port uses windll/windll.c instead... */ + +/*******************/ +/* Local Functions */ +/*******************/ + +#ifndef SFX +static void show_version_info OF((__GPRO)); +#endif + + +/*************/ +/* Constants */ +/*************/ + +#include "consts.h" /* all constant global variables are in here */ + /* (non-constant globals were moved to globals.c) */ + +/* constant local variables: */ + +#ifndef SFX + static ZCONST char Far EnvUnZip[] = ENV_UNZIP; + static ZCONST char Far EnvUnZip2[] = ENV_UNZIP2; + static ZCONST char Far EnvZipInfo[] = ENV_ZIPINFO; + static ZCONST char Far EnvZipInfo2[] = ENV_ZIPINFO2; +#ifdef RISCOS + static ZCONST char Far EnvUnZipExts[] = ENV_UNZIPEXTS; +#endif /* RISCOS */ +#endif + +#if (!defined(SFX) || defined(SFX_EXDIR)) + static ZCONST char Far NotExtracting[] = + "caution: not extracting; -d ignored\n"; + static ZCONST char Far MustGiveExdir[] = + "error: must specify directory to which to extract with -d option\n"; + static ZCONST char Far OnlyOneExdir[] = + "error: -d option used more than once (only one exdir allowed)\n"; +#endif + +#if CRYPT + static ZCONST char Far MustGivePasswd[] = + "error: must give decryption password with -P option\n"; +#endif + +#ifndef SFX + static ZCONST char Far Zfirst[] = + "error: -Z must be first option for ZipInfo mode (check UNZIP variable?)\n"; +#endif +static ZCONST char Far InvalidOptionsMsg[] = "error:\ + -fn or any combination of -c, -l, -p, -t, -u and -v options invalid\n"; +static ZCONST char Far IgnoreOOptionMsg[] = + "caution: both -n and -o specified; ignoring -o\n"; + +/* usage() strings */ +#ifndef SFX +#ifdef VMS + static ZCONST char Far Example3[] = "vms.c"; + static ZCONST char Far Example2[] = " unzip\ + \"-V\" foo \"Bar\" => must quote uppercase options and filenames in VMS\n"; +#else /* !VMS */ + static ZCONST char Far Example3[] = "ReadMe"; +#ifdef RISCOS + static ZCONST char Far Example2[] = +" unzip foo -d RAM:$ => extract all files from foo into RAMDisc\n"; +#else /* !RISCOS */ +#if (defined(OS2) || (defined(DOS_FLX_OS2_W32) && defined(MORE))) + static ZCONST char Far Example2[] = + ""; /* no room: too many local3[] items */ +#else /* !OS2 */ +#ifdef MACOS + static ZCONST char Far Example2[] = ""; /* not needed */ +#else /* !MACOS */ + static ZCONST char Far Example2[] = " \ + unzip -p foo | more => send contents of foo.zip via pipe into program more\n"; +#endif /* ?MACOS */ +#endif /* ?OS2 */ +#endif /* ?RISCOS */ +#endif /* ?VMS */ + +/* local1[]: command options */ +#if (defined(DLL) && defined(API_DOC)) + static ZCONST char Far local1[] = + " -A print extended help for API functions"; +#else /* !(DLL && API_DOC) */ + static ZCONST char Far local1[] = ""; +#endif /* ?(DLL && API_DOC) */ + +/* local2[] and local3[]: modifier options */ +#ifdef DOS_FLX_OS2_W32 +#ifdef FLEXOS + static ZCONST char Far local2[] = ""; +#else + static ZCONST char Far local2[] = + " -$ label removables (-$$ => fixed disks)"; +#endif +#ifdef OS2 +#ifdef MORE + static ZCONST char Far local3[] = "\ + -X restore ACLs if supported -s spaces in filenames => '_'\n\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = " \ + -X restore ACLs if supported -s spaces in filenames => '_'\n\n"; +#endif /* ?MORE */ +#else /* !OS2 */ +#ifdef WIN32 +#ifdef MORE + static ZCONST char Far local3[] = "\ + -X restore ACLs (-XX => use privileges) -s spaces in filenames => '_'\n\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = " \ + -X restore ACLs (-XX => use privileges) -s spaces in filenames => '_'\n\n"; +#endif /* ?MORE */ +#else /* !WIN32 */ +#ifdef MORE + static ZCONST char Far local3[] = " -\ +M pipe through \"more\" pager -s spaces in filenames => '_'\n\n"; +#else + static ZCONST char Far local3[] = "\ + -s spaces in filenames => '_'\n"; +#endif +#endif /* ?WIN32 */ +#endif /* ?OS2 || ?WIN32 */ +#else /* !DOS_FLX_OS2_W32 */ +#ifdef VMS + static ZCONST char Far local2[] = "\"-X\" restore owner/protection info"; +#ifdef MORE + static ZCONST char Far local3[] = " \ + \"-M\" pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = "\n"; +#endif +#else /* !VMS */ +#if (defined(__BEOS__) || defined(TANDEM) || defined(UNIX)) + static ZCONST char Far local2[] = " -X restore UID/GID info"; +#ifdef MORE + static ZCONST char Far local3[] = "\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = "\n"; +#endif +#else /* !(__BEOS__ || TANDEM || UNIX) */ +#ifdef AMIGA + static ZCONST char Far local2[] = " -N restore comments as filenotes"; +#ifdef MORE + static ZCONST char Far local3[] = "\ + -M pipe through \"more\" pager\n"; +#else + static ZCONST char Far local3[] = "\n"; +#endif +#else /* !AMIGA */ +#ifdef MACOS + static ZCONST char Far local2[] = " -E show Mac info during extraction"; + static ZCONST char Far local3[] = " \ + -i ignore filenames in mac extra info -J junk (ignore) Mac extra info\n\n"; +#else /* !MACOS */ +#ifdef MORE + static ZCONST char Far local2[] = " -M pipe through \"more\" pager"; + static ZCONST char Far local3[] = "\n"; +#else + static ZCONST char Far local2[] = ""; /* Atari, Mac, CMS/MVS etc. */ + static ZCONST char Far local3[] = ""; +#endif +#endif /* ?MACOS */ +#endif /* ?AMIGA */ +#endif /* ?(__BEOS__ || TANDEM || UNIX) */ +#endif /* ?VMS */ +#endif /* ?DOS_FLX_OS2_W32 */ +#endif /* !SFX */ + +#ifndef NO_ZIPINFO +#ifdef VMS + static ZCONST char Far ZipInfoExample[] = "* or % (e.g., \"*font-%.zip\")"; +#else + static ZCONST char Far ZipInfoExample[] = "*, ?, [] (e.g., \"[a-j]*.zip\")"; +#endif + +static ZCONST char Far ZipInfoUsageLine1[] = "\ +ZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group.\n\ +\n\ +List name, date/time, attribute, size, compression method, etc., about files\n\ +in list (excluding those in xlist) contained in the specified .zip archive(s).\ +\n\"file[.zip]\" may be a wildcard name containing %s.\n\n\ + usage: zipinfo [-12smlvChMtTz] file[.zip] [list...] [-x xlist...]\n\ + or: unzip %s-Z%s [-12smlvChMtTz] file[.zip] [list...] [-x xlist...]\n"; + +static ZCONST char Far ZipInfoUsageLine2[] = "\nmain\ + listing-format options: -s short Unix \"ls -l\" format (def.)\n\ + -1 filenames ONLY, one per line -m medium Unix \"ls -l\" format\n\ + -2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ + -v verbose, multi-page format\n"; + +static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ + -h print header line -t print totals for listed files or for all\n\ + -z print zipfile comment %c-T%c print file times in sortable decimal format\ +\n %c-C%c be case-insensitive %s\ + -x exclude filenames that follow from listing\n"; +#ifdef MORE +#ifdef VMS + static ZCONST char Far ZipInfoUsageLine4[] = + " \"-M\" page output through built-in \"more\"\n"; +#else + static ZCONST char Far ZipInfoUsageLine4[] = + " -M page output through built-in \"more\"\n"; +#endif +#else /* !MORE */ + static ZCONST char Far ZipInfoUsageLine4[] = ""; +#endif /* ?MORE */ +#endif /* !NO_ZIPINFO */ + +#ifdef BETA +# ifdef VMSCLI + /* BetaVersion[] is also used in vms/cmdline.c: do not make it static */ + ZCONST char Far BetaVersion[] = "%s\ + THIS IS STILL A BETA VERSION OF UNZIP%s -- DO NOT DISTRIBUTE.\n\n"; +# else + static ZCONST char Far BetaVersion[] = "%s\ + THIS IS STILL A BETA VERSION OF UNZIP%s -- DO NOT DISTRIBUTE.\n\n"; +# endif +#endif + +#ifdef SFX +# ifdef VMSCLI + /* UnzipSFXBanner[] is also used in vms/cmdline.c: do not make it static */ + ZCONST char Far UnzipSFXBanner[] = +# else + static ZCONST char Far UnzipSFXBanner[] = +# endif + "UnZipSFX %d.%d%d%s of %s, by Info-ZIP (Zip-Bugs@lists.wku.edu).\n"; +# ifdef SFX_EXDIR + static ZCONST char Far UnzipSFXOpts[] = + "Valid options are -tfupcz and -d ; modifiers are -abjnoqCL%sV%s.\n"; +# else + static ZCONST char Far UnzipSFXOpts[] = + "Valid options are -tfupcz; modifiers are -abjnoqCL%sV%s.\n"; +# endif +#else /* !SFX */ + static ZCONST char Far CompileOptions[] = + "UnZip special compilation options:\n"; + static ZCONST char Far CompileOptFormat[] = "\t%s\n"; + static ZCONST char Far EnvOptions[] = + "\nUnZip and ZipInfo environment options:\n"; + static ZCONST char Far EnvOptFormat[] = "%16s: %s\n"; + static ZCONST char Far None[] = "[none]"; +# ifdef ACORN_FTYPE_NFS + static ZCONST char Far AcornFtypeNFS[] = "ACORN_FTYPE_NFS"; +# endif +# ifdef ASM_CRC + static ZCONST char Far AsmCRC[] = "ASM_CRC"; +# endif +# ifdef ASM_INFLATECODES + static ZCONST char Far AsmInflateCodes[] = "ASM_INFLATECODES"; +# endif +# ifdef CHECK_VERSIONS + static ZCONST char Far Check_Versions[] = "CHECK_VERSIONS"; +# endif +# ifdef COPYRIGHT_CLEAN + static ZCONST char Far Copyright_Clean[] = + "COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)"; +# endif +# ifdef DEBUG + static ZCONST char Far UDebug[] = "DEBUG"; +# endif +# ifdef DEBUG_TIME + static ZCONST char Far DebugTime[] = "DEBUG_TIME"; +# endif +# ifdef DLL + static ZCONST char Far Dll[] = "DLL"; +# endif +# ifdef DOSWILD + static ZCONST char Far DosWild[] = "DOSWILD"; +# endif +# ifdef LZW_CLEAN + static ZCONST char Far LZW_Clean[] = + "LZW_CLEAN (PKZIP/Zip 1.x unshrinking method not supported)"; +# endif +# ifndef MORE + static ZCONST char Far No_More[] = "NO_MORE"; +# endif +# ifdef NO_ZIPINFO + static ZCONST char Far No_ZipInfo[] = "NO_ZIPINFO"; +# endif +# ifdef NTSD_EAS + static ZCONST char Far NTSDExtAttrib[] = "NTSD_EAS"; +# endif +# ifdef OS2_EAS + static ZCONST char Far OS2ExtAttrib[] = "OS2_EAS"; +# endif +# ifdef QLZIP + static ZCONST char Far SMSExFldOnUnix[] = "QLZIP"; +# endif +# ifdef REENTRANT + static ZCONST char Far Reentrant[] = "REENTRANT"; +# endif +# ifdef REGARGS + static ZCONST char Far RegArgs[] = "REGARGS"; +# endif +# ifdef RETURN_CODES + static ZCONST char Far Return_Codes[] = "RETURN_CODES"; +# endif +# ifdef SET_DIR_ATTRIB + static ZCONST char Far SetDirAttrib[] = "SET_DIR_ATTRIB"; +# endif +# ifdef TIMESTAMP + static ZCONST char Far TimeStamp[] = "TIMESTAMP"; +# endif +# ifdef UNIXBACKUP + static ZCONST char Far UnixBackup[] = "UNIXBACKUP"; +# endif +# ifdef USE_EF_UT_TIME + static ZCONST char Far Use_EF_UT_time[] = "USE_EF_UT_TIME"; +# endif +# ifndef LZW_CLEAN + static ZCONST char Far Use_Unshrink[] = + "USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)"; +# endif +# ifndef COPYRIGHT_CLEAN + static ZCONST char Far Use_Smith_Code[] = + "USE_SMITH_CODE (PKZIP 0.9x unreducing method supported)"; +# endif +# ifdef USE_VFAT + static ZCONST char Far Use_VFAT_support[] = "USE_VFAT"; +# endif +# ifdef USE_ZLIB + static ZCONST char Far UseZlib[] = + "USE_ZLIB (compiled with version %s; using version %s)"; +# endif +# ifdef VMS_TEXT_CONV + static ZCONST char Far VmsTextConv[] = "VMS_TEXT_CONV"; +# endif +# ifdef VMSCLI + static ZCONST char Far VmsCLI[] = "VMSCLI"; +# endif +# ifdef VMSWILD + static ZCONST char Far VmsWild[] = "VMSWILD"; +# endif +# if CRYPT +# ifdef PASSWD_FROM_STDIN + static ZCONST char Far PasswdStdin[] = "PASSWD_FROM_STDIN"; +# endif + static ZCONST char Far Decryption[] = + "\t[decryption, version %d.%d%s of %s]\n"; + static ZCONST char Far CryptDate[] = CR_VERSION_DATE; +# endif +# ifndef __RSXNT__ +# ifdef __EMX__ + static ZCONST char Far EnvEMX[] = "EMX"; + static ZCONST char Far EnvEMXOPT[] = "EMXOPT"; +# endif +# if (defined(__GO32__) && (!defined(__DJGPP__) || (__DJGPP__ < 2))) + static ZCONST char Far EnvGO32[] = "GO32"; + static ZCONST char Far EnvGO32TMP[] = "GO32TMP"; +# endif +# endif /* !__RSXNT__ */ + +#ifdef VMS +/* UnzipUsageLine1[] is also used in vms/cmdline.c: do not make it static */ + ZCONST char Far UnzipUsageLine1[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. For more details see: unzip -v.\n\n"; +#ifdef COPYRIGHT_CLEAN + static ZCONST char Far UnzipUsageLine1v[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send\n\ +bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#else + static ZCONST char Far UnzipUsageLine1v[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ +Send bug reports to authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#endif /* ?COPYRIGHT_CLEAN */ +#else /* !VMS */ +#ifdef COPYRIGHT_CLEAN + static ZCONST char Far UnzipUsageLine1[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send\n\ +bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#else + static ZCONST char Far UnzipUsageLine1[] = "\ +UnZip %d.%d%d%s of %s, by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ +Send bug reports to authors at Zip-Bugs@lists.wku.edu; see README for details.\ +\n\n"; +#endif /* ?COPYRIGHT_CLEAN */ +#define UnzipUsageLine1v UnzipUsageLine1 +#endif /* ?VMS */ + +static ZCONST char Far UnzipUsageLine2v[] = "\ +Latest sources and executables are at ftp://ftp.cdrom.com/pub/infozip/ , as of\ +\nabove date; see http://www.cdrom.com/pub/infozip/UnZip.html for other sites.\ +\n\n"; + +#ifdef MACOS +static ZCONST char Far UnzipUsageLine2[] = "\ +Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-d exdir]\n \ + Default action is to extract files in list, to exdir;\n\ + file[.zip] may be a wildcard. %s\n"; +#else /* !MACOS */ +#ifdef VM_CMS +static ZCONST char Far UnzipUsageLine2[] = "\ +Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d fm]\n \ + Default action is to extract files in list, except those in xlist, to disk fm;\n\ + file[.zip] may be a wildcard. %s\n"; +#else /* !VM_CMS */ +static ZCONST char Far UnzipUsageLine2[] = "\ +Usage: unzip %s[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]\n \ + Default action is to extract files in list, except those in xlist, to exdir;\n\ + file[.zip] may be a wildcard. %s\n"; +#endif /* ?VM_CMS */ +#endif /* ?MACOS */ + +#ifdef NO_ZIPINFO +# define ZIPINFO_MODE_OPTION "" + static ZCONST char Far ZipInfoMode[] = + "(ZipInfo mode is disabled in this version.)"; +#else +# define ZIPINFO_MODE_OPTION "[-Z] " +# ifdef VMS + static ZCONST char Far ZipInfoMode[] = + "\"-Z\" => ZipInfo mode (`unzip \"-Z\"' for usage)."; +# else + static ZCONST char Far ZipInfoMode[] = + "-Z => ZipInfo mode (\"unzip -Z\" for usage)."; +# endif +#endif /* ?NO_ZIPINFO */ + +#ifdef VMS + static ZCONST char Far VMSusageLine2b[] = "\ +=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe\ +\n"; +#endif + +#ifdef MACOS +static ZCONST char Far UnzipUsageLine3[] = "\n\ + -d extract files into exdir -l list files (short format)\n\ + -f freshen existing files, create none -t test compressed archive data\n\ + -u update files, create if necessary -z display archive comment\n\ +%s\n"; +#else /* !MACOS */ +#ifdef VM_CMS +static ZCONST char Far UnzipUsageLine3[] = "\n\ + -p extract files to pipe, no messages -l list files (short format)\n\ + -f freshen existing files, create none -t test compressed archive data\n\ + -u update files, create if necessary -z display archive comment\n\ + -x exclude files that follow (in xlist) -d extract files onto disk fm\n\ +%s\n"; +#else /* !VM_CMS */ +static ZCONST char Far UnzipUsageLine3[] = "\n\ + -p extract files to pipe, no messages -l list files (short format)\n\ + -f freshen existing files, create none -t test compressed archive data\n\ + -u update files, create if necessary -z display archive comment\n\ + -x exclude files that follow (in xlist) -d extract files into exdir\n\ +%s\n"; +#endif /* ?VM_CMS */ +#endif /* ?MACOS */ + +static ZCONST char Far UnzipUsageLine4[] = "\ +modifiers: -q quiet mode (-qq => quieter)\n\ + -n never overwrite existing files -a auto-convert any text files\n\ + -o overwrite files WITHOUT prompting -aa treat ALL files as text\n \ + -j junk paths (do not make directories) -v be verbose/print version info\n\ + %c-C%c match filenames case-insensitively %c-L%c make (some) names \ +lowercase\n %-42s %c-V%c retain VMS version numbers\n%s"; + +static ZCONST char Far UnzipUsageLine5[] = "\ +Examples (see unzip.doc for more info):\n\ + unzip data1 -x joe => extract all files except joe from zipfile data1.zip\n\ +%s\ + unzip -fo foo %-6s => quietly replace existing %s if archive file newer\n"; +#endif /* ?SFX */ + + + + + +/*****************************/ +/* main() / UzpMain() stub */ +/*****************************/ + +int installer_unpack(char *aname, int depricated) /* return PK-type error code (except under VMS) */ +{ + int r, argc = 3; + char tempfile[256]; + char *argv[4]; + + argv[0] = "install.exe"; + argv[1] = "install.exe"; + argv[2] = tempfile; + argv[3] = NULL; + + if(aname) + strcpy(tempfile, aname); + else + argc = 2; + + CONSTRUCTGLOBALS(); + r = unzip(__G__ argc, argv); + DESTROYGLOBALS() + RETURN(r); +} + +void resetglobals(void) { } + +int pipeit(char *format, ...) +{ + return 0; +} + + +/*******************************/ +/* Primary UnZip entry point */ +/*******************************/ + +int unzip(__G__ argc, argv) + __GDEF + int argc; + char *argv[]; +{ +#ifndef NO_ZIPINFO + char *p; +#endif +#ifdef DOS_FLX_H68_OS2_W32 + int i; +#endif + int retcode, error=FALSE; + +#if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) + extern void DebugMalloc(void); + + atexit(DebugMalloc); +#endif + +#ifdef MALLOC_WORK + G.area.Slide =(uch *)calloc(8193, sizeof(shrint)+sizeof(uch)+sizeof(uch)); + G.area.shrink.Parent = (shrint *)G.area.Slide; + G.area.shrink.value = G.area.Slide + (sizeof(shrint)*(HSIZE+1)); + G.area.shrink.Stack = G.area.Slide + + (sizeof(shrint) + sizeof(uch))*(HSIZE+1); +#endif + +/*--------------------------------------------------------------------------- + Macintosh initialization code. + ---------------------------------------------------------------------------*/ + +#ifdef MACOS + { + int a; + + for (a = 0; a < 4; ++a) + G.rghCursor[a] = GetCursor(a+128); + G.giCursor = 0; + } +#endif + +/*--------------------------------------------------------------------------- + Human68K initialization code. + ---------------------------------------------------------------------------*/ + +#ifdef __human68k__ + InitTwentyOne(); +#endif + +/*--------------------------------------------------------------------------- + Acorn RISC OS initialization code. + ---------------------------------------------------------------------------*/ + +#ifdef RISCOS + set_prefix(); +#endif + +/*--------------------------------------------------------------------------- + Set signal handler for restoring echo, warn of zipfile corruption, etc. + ---------------------------------------------------------------------------*/ + +#ifdef SIGINT + signal(SIGINT, handler); +#endif +#ifdef SIGTERM /* some systems really have no SIGTERM */ + signal(SIGTERM, handler); +#endif +#ifdef SIGBUS + signal(SIGBUS, handler); +#endif +#ifdef SIGSEGV + signal(SIGSEGV, handler); +#endif + +#if (defined(WIN32) && defined(__RSXNT__)) + for (i = 0 ; i < argc; i++) { + _ISO_INTERN(argv[i]); + } +#endif + +/*--------------------------------------------------------------------------- + First figure out if we're running in UnZip mode or ZipInfo mode, and put + the appropriate environment-variable options into the queue. Then rip + through any command-line options lurking about... + ---------------------------------------------------------------------------*/ + +#ifdef SFX + G.argv0 = argv[0]; +#if (defined(OS2) || defined(WIN32)) + G.zipfn = GetLoadPath(__G);/* non-MSC NT puts path into G.filename[] */ +#else + G.zipfn = G.argv0; +#endif + +#ifdef VMSCLI + { + ulg status = vms_unzip_cmdline(&argc, &argv); + if (!(status & 1)) + return status; + } +#endif /* VMSCLI */ + + uO.zipinfo_mode = FALSE; + error = uz_opts(__G__ &argc, &argv); /* UnZipSFX call only */ + +#else /* !SFX */ + +#ifdef RISCOS + /* get the extensions to swap from environment */ + getRISCOSexts(ENV_UNZIPEXTS); +#endif + +#ifdef MSDOS + /* extract MKS extended argument list from environment (before envargs!) */ + mksargs(&argc, &argv); +#endif + +#ifdef VMSCLI + { + ulg status = vms_unzip_cmdline(&argc, &argv); + if (!(status & 1)) + return status; + } +#endif /* VMSCLI */ + + G.noargs = (argc == 1); /* no options, no zipfile, no anything */ + +#ifndef NO_ZIPINFO + for (p = argv[0] + strlen(argv[0]); p >= argv[0]; --p) { + if (*p == DIR_END +#ifdef DIR_END2 + || *p == DIR_END2 +#endif + ) + break; + } + ++p; + + if (STRNICMP(p, LoadFarStringSmall(Zipnfo), 7) == 0 || + STRNICMP(p, "ii", 2) == 0 || + (argc > 1 && strncmp(argv[1], "-Z", 2) == 0)) + { + uO.zipinfo_mode = TRUE; + envargs(__G__ &argc, &argv, LoadFarStringSmall(EnvZipInfo), + LoadFarStringSmall2(EnvZipInfo2)); + error = zi_opts(__G__ &argc, &argv); + } else +#endif /* NO_ZIPINFO */ + { + uO.zipinfo_mode = FALSE; + envargs(__G__ &argc, &argv, LoadFarStringSmall(EnvUnZip), + LoadFarStringSmall2(EnvUnZip2)); + error = uz_opts(__G__ &argc, &argv); + } + +#endif /* ?SFX */ + + if ((argc < 0) || error) + return error; + +/*--------------------------------------------------------------------------- + Now get the zipfile name from the command line and then process any re- + maining options and file specifications. + ---------------------------------------------------------------------------*/ + +#ifdef DOS_FLX_H68_OS2_W32 + /* convert MSDOS-style directory separators to Unix-style ones for + * user's convenience (include zipfile name itself) + */ +#ifdef SFX + for (G.pfnames = argv, i = argc; i > 0; --i) { +#else + /* argc does not include the zipfile specification */ + for (G.pfnames = argv, i = argc+1; i > 0; --i) { +#endif + char *q; + + for (q = *G.pfnames; *q; ++q) + if (*q == '\\') + *q = '/'; + ++G.pfnames; + } +#endif /* DOS_FLX_H68_OS2_W32 */ + +#ifndef SFX + G.wildzipfn = *argv++; +#endif + +#if (defined(SFX) && !defined(SFX_EXDIR)) /* only check for -x */ + + G.filespecs = argc; + G.xfilespecs = 0; + + if (argc > 0) { + char **pp = argv-1; + + G.pfnames = argv; + while (*++pp) + if (strcmp(*pp, "-x") == 0) { + if (pp > argv) { + *pp = 0; /* terminate G.pfnames */ + G.filespecs = pp - G.pfnames; + } else { + G.pfnames = (char **)fnames; /* defaults */ + G.filespecs = 0; + } + G.pxnames = pp + 1; /* excluded-names ptr: _after_ -x */ + G.xfilespecs = argc - G.filespecs - 1; + break; /* skip rest of args */ + } + G.process_all_files = FALSE; + } else + G.process_all_files = TRUE; /* for speed */ + +#else /* !SFX || SFX_EXDIR */ /* check for -x or -d */ + + G.filespecs = argc; + G.xfilespecs = 0; + + if (argc > 0) { + int in_files=FALSE, in_xfiles=FALSE; + char **pp = argv-1; + + G.process_all_files = FALSE; + G.pfnames = argv; + while (*++pp) { + Trace((stderr, "pp - argv = %d\n", pp-argv)); +#ifdef CMS_MVS + if (!uO.exdir && STRNICMP(*pp, "-d", 2) == 0) { +#else + if (!uO.exdir && strncmp(*pp, "-d", 2) == 0) { +#endif + int firstarg = (pp == argv); + + uO.exdir = (*pp) + 2; + if (in_files) { /* ... zipfile ... -d exdir ... */ + *pp = (char *)NULL; /* terminate G.pfnames */ + G.filespecs = pp - G.pfnames; + in_files = FALSE; + } else if (in_xfiles) { + *pp = (char *)NULL; /* terminate G.pxnames */ + G.xfilespecs = pp - G.pxnames; + /* "... -x xlist -d exdir": nothing left */ + } + /* first check for "-dexdir", then for "-d exdir" */ + if (*uO.exdir == '\0') { + if (*++pp) + uO.exdir = *pp; + else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); /* don't extract here by accident */ + } + } + if (firstarg) { /* ... zipfile -d exdir ... */ + if (pp[1]) { + G.pfnames = pp + 1; /* argv+2 */ + G.filespecs = argc - (G.pfnames-argv); /* for now... */ + } else { + G.process_all_files = TRUE; + G.pfnames = (char **)fnames; /* GRR: necessary? */ + G.filespecs = 0; /* GRR: necessary? */ + break; + } + } + } else if (!in_xfiles) { + if (strcmp(*pp, "-x") == 0) { + in_xfiles = TRUE; + if (pp == G.pfnames) { + G.pfnames = (char **)fnames; /* defaults */ + G.filespecs = 0; + } else if (in_files) { + *pp = 0; /* terminate G.pfnames */ + G.filespecs = pp - G.pfnames; /* adjust count */ + in_files = FALSE; + } + G.pxnames = pp + 1; /* excluded-names ptr starts after -x */ + G.xfilespecs = argc - (G.pxnames-argv); /* anything left */ + } else + in_files = TRUE; + } + } + } else + G.process_all_files = TRUE; /* for speed */ + + if (uO.exdir != (char *)NULL && !G.extract_flag) /* -d ignored */ + Info(slide, 0x401, ((char *)slide, LoadFarString(NotExtracting))); +#endif /* ?(SFX && !SFX_EXDIR) */ + +/*--------------------------------------------------------------------------- + Okey dokey, we have everything we need to get started. Let's roll. + ---------------------------------------------------------------------------*/ + + retcode = process_zipfiles(__G); + return(retcode); + +} /* end main()/unzip() */ + + + + + +/**********************/ +/* Function uz_opts() */ +/**********************/ + +int uz_opts(__G__ pargc, pargv) + __GDEF + int *pargc; + char ***pargv; +{ + char **argv, *s; + int argc, c, error=FALSE, negative=0; + + + argc = *pargc; + argv = *pargv; + + while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { + s = *argv + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ +#ifdef CMS_MVS + switch (tolower(c)) +#else + switch (c) +#endif + { + case ('-'): + ++negative; + break; + case ('a'): + if (negative) { + uO.aflag = MAX(uO.aflag-negative,0); + negative = 0; + } else + ++uO.aflag; + break; +#if (defined(DLL) && defined(API_DOC)) + case ('A'): /* extended help for API */ + APIhelp(__G__ argc, argv); + *pargc = -1; /* signal to exit successfully */ + return 0; +#endif + case ('b'): + if (negative) { +#ifdef VMS + uO.bflag = MAX(uO.bflag-negative,0); +#endif + negative = 0; /* do nothing: "-b" is default */ + } else { +#ifdef VMS + if (uO.aflag == 0) + ++uO.bflag; +#endif + uO.aflag = 0; + } + break; +#ifdef UNIXBACKUP + case ('B'): /* -B: back up existing files */ + if (negative) + uO.B_flag = FALSE, negative = 0; + else + uO.B_flag = TRUE; + break; +#endif + case ('c'): + if (negative) { + uO.cflag = FALSE, negative = 0; +#ifdef NATIVE + uO.aflag = 0; +#endif + } else { + uO.cflag = TRUE; +#ifdef NATIVE + uO.aflag = 2; /* so you can read it on the screen */ +#endif +#ifdef DLL + if (G.redirect_text) + G.redirect_data = 2; +#endif + } + break; +#ifndef CMS_MVS + case ('C'): /* -C: match filenames case-insensitively */ + if (negative) + uO.C_flag = FALSE, negative = 0; + else + uO.C_flag = TRUE; + break; +#endif /* !CMS_MVS */ +#if (!defined(SFX) || defined(SFX_EXDIR)) + case ('d'): + if (negative) { /* negative not allowed with -d exdir */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); /* don't extract here by accident */ + } + if (uO.exdir != (char *)NULL) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(OnlyOneExdir))); + return(PK_PARAM); /* GRR: stupid restriction? */ + } else { + /* first check for "-dexdir", then for "-d exdir" */ + uO.exdir = s; + if (*uO.exdir == '\0') { + if (argc > 1) { + --argc; + uO.exdir = *++argv; + if (*uO.exdir == '-') { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); + } + /* else uO.exdir points at extraction dir */ + } else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGiveExdir))); + return(PK_PARAM); + } + } + /* uO.exdir now points at extraction dir (-dexdir or + * -d exdir); point s at end of exdir to avoid mis- + * interpretation of exdir characters as more options + */ + if (*s != 0) + while (*++s != 0) + ; + } + break; +#endif /* !SFX || SFX_EXDIR */ + case ('e'): /* just ignore -e, -x options (extract) */ + break; +#ifdef MACOS + case ('E'): /* -E [MacOS] display Mac e.f. when restoring */ + if( negative ) { + uO.E_flag = FALSE, negative = 0; + } else { + uO.E_flag = TRUE; + } + break; +#endif /* MACOS */ + case ('f'): /* "freshen" (extract only newer files) */ + if (negative) + uO.fflag = uO.uflag = FALSE, negative = 0; + else + uO.fflag = uO.uflag = TRUE; + break; +#if (defined(RISCOS) || defined(ACORN_FTYPE_NFS)) + case ('F'): /* Acorn filetype & NFS extension handling */ + if (negative) + uO.acorn_nfs_ext = FALSE, negative = 0; + else + uO.acorn_nfs_ext = TRUE; + break; +#endif /* RISCOS || ACORN_FTYPE_NFS */ + case ('h'): /* just print help message and quit */ + *pargc = -1; + return USAGE(PK_OK); +#ifdef MACOS + case ('i'): /* -i [MacOS] ignore filenames stored in Mac ef */ + if( negative ) { + uO.i_flag = FALSE, negative = 0; + } else { + uO.i_flag = TRUE; + } + break; +#endif /* MACOS */ + case ('j'): /* junk pathnames/directory structure */ + if (negative) + uO.jflag = FALSE, negative = 0; + else + uO.jflag = TRUE; + break; +#if (defined(__BEOS__) || defined(MACOS)) + case ('J'): /* Junk BeOS or MacOS file attributes */ + if( negative ) { + uO.J_flag = FALSE, negative = 0; + } else { + uO.J_flag = TRUE; + } + break; +#endif /* __BEOS__ || MACOS */ +#ifndef SFX + case ('l'): + if (negative) { + uO.vflag = MAX(uO.vflag-negative,0); + negative = 0; + } else + ++uO.vflag; + break; +#endif /* !SFX */ +#ifndef CMS_MVS + case ('L'): /* convert (some) filenames to lowercase */ + if (negative) + uO.L_flag = FALSE, negative = 0; + else + uO.L_flag = TRUE; + break; +#endif /* !CMS_MVS */ +#ifdef MORE +#ifdef CMS_MVS + case ('m'): +#endif + case ('M'): /* send all screen output through "more" fn. */ +/* GRR: eventually check for numerical argument => height */ + if (negative) + G.M_flag = FALSE, negative = 0; + else + G.M_flag = TRUE; + break; +#endif /* MORE */ + case ('n'): /* don't overwrite any files */ + if (negative) + uO.overwrite_none = FALSE, negative = 0; + else + uO.overwrite_none = TRUE; + break; +#ifdef AMIGA + case ('N'): /* restore comments as filenotes */ + if (negative) + uO.N_flag = FALSE, negative = 0; + else + uO.N_flag = TRUE; + break; +#endif /* AMIGA */ + case ('o'): /* OK to overwrite files without prompting */ + if (negative) { + uO.overwrite_all = MAX(uO.overwrite_all-negative,0); + negative = 0; + } else + ++uO.overwrite_all; + break; + case ('p'): /* pipes: extract to stdout, no messages */ + if (negative) { + uO.cflag = FALSE; + uO.qflag = MAX(uO.qflag-999,0); + negative = 0; + } else { + uO.cflag = TRUE; + uO.qflag += 999; + } + break; +#if CRYPT + /* GRR: yes, this is highly insecure, but dozens of people + * have pestered us for this, so here we go... */ + case ('P'): + if (negative) { /* negative not allowed with -P passwd */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGivePasswd))); + return(PK_PARAM); /* don't extract here by accident */ + } + if (uO.pwdarg != (char *)NULL) { +/* + GRR: eventually support multiple passwords? + Info(slide, 0x401, ((char *)slide, + LoadFarString(OnlyOnePasswd))); + return(PK_PARAM); + */ + } else { + /* first check for "-Ppasswd", then for "-P passwd" */ + uO.pwdarg = s; + if (*uO.pwdarg == '\0') { + if (argc > 1) { + --argc; + uO.pwdarg = *++argv; + if (*uO.pwdarg == '-') { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGivePasswd))); + return(PK_PARAM); + } + /* else pwdarg points at decryption password */ + } else { + Info(slide, 0x401, ((char *)slide, + LoadFarString(MustGivePasswd))); + return(PK_PARAM); + } + } + /* pwdarg now points at decryption password (-Ppasswd or + * -P passwd); point s at end of passwd to avoid mis- + * interpretation of passwd characters as more options + */ + if (*s != 0) + while (*++s != 0) + ; + } + break; +#endif /* CRYPT */ + case ('q'): /* quiet: fewer comments/messages */ + if (negative) { + uO.qflag = MAX(uO.qflag-negative,0); + negative = 0; + } else + ++uO.qflag; + break; +#ifdef QDOS + case ('Q'): /* QDOS flags */ + qlflag ^= strtol(s, &s, 10); + break; /* we XOR this as we can config qlflags */ +#endif +#ifdef DOS_FLX_OS2_W32 + case ('s'): /* spaces in filenames: allow by default */ + if (negative) + uO.sflag = FALSE, negative = 0; + else + uO.sflag = TRUE; + break; +#endif /* DOS_FLX_OS2_W32 */ + case ('t'): + if (negative) + uO.tflag = FALSE, negative = 0; + else + uO.tflag = TRUE; + break; +#ifdef TIMESTAMP + case ('T'): + if (negative) + uO.T_flag = FALSE, negative = 0; + else + uO.T_flag = TRUE; + break; +#endif + case ('u'): /* update (extract only new and newer files) */ + if (negative) + uO.uflag = FALSE, negative = 0; + else + uO.uflag = TRUE; + break; +#ifndef CMS_MVS + case ('U'): /* obsolete; to be removed in version 6.0 */ + if (negative) + uO.L_flag = TRUE, negative = 0; + else + uO.L_flag = FALSE; + break; +#endif /* !CMS_MVS */ +#ifndef SFX + case ('v'): /* verbose */ + if (negative) { + uO.vflag = MAX(uO.vflag-negative,0); + negative = 0; + } else if (uO.vflag) + ++uO.vflag; + else + uO.vflag = 2; + break; +#endif /* !SFX */ +#ifndef CMS_MVS + case ('V'): /* Version (retain VMS/DEC-20 file versions) */ + if (negative) + uO.V_flag = FALSE, negative = 0; + else + uO.V_flag = TRUE; + break; +#endif /* !CMS_MVS */ + case ('x'): /* extract: default */ +#ifdef SFX + /* when 'x' is the only option in this argument, and the + * next arg is not an option, assume this initiates an + * exclusion list (-x xlist): terminate option-scanning + * and leave uz_opts with argv still pointing to "-x"; + * the xlist is processed later + */ + if (s - argv[0] == 2 && *s == '\0' && + argc > 1 && argv[1][0] != '-') { + /* break out of nested loops without "++argv;--argc" */ + goto opts_done; + } +#endif /* SFX */ + break; +#if (defined(RESTORE_UIDGID) || defined(OS2_W32)) + case ('X'): /* restore owner/protection info (need privs?) */ + if (negative) { + uO.X_flag = MAX(uO.X_flag-negative,0); + negative = 0; + } else + ++uO.X_flag; + break; +#endif /* RESTORE_UIDGID || OS2_W32 */ + case ('z'): /* display only the archive comment */ + if (negative) { + uO.zflag = MAX(uO.zflag-negative,0); + negative = 0; + } else + ++uO.zflag; + break; +#ifndef SFX + case ('Z'): /* should have been first option (ZipInfo) */ + Info(slide, 0x401, ((char *)slide, LoadFarString(Zfirst))); + error = TRUE; + break; +#endif /* !SFX */ +#ifdef DOS_OS2_W32 + case ('$'): + if (negative) { + uO.volflag = MAX(uO.volflag-negative,0); + negative = 0; + } else + ++uO.volflag; + break; +#endif /* DOS_OS2_W32 */ + default: + error = TRUE; + break; + + } /* end switch */ + } /* end while (not end of argument string) */ + } /* end while (not done with switches) */ + +/*--------------------------------------------------------------------------- + Check for nonsensical combinations of options. + ---------------------------------------------------------------------------*/ + +#ifdef SFX +opts_done: /* yes, very ugly...but only used by UnZipSFX with -x xlist */ +#endif + + if ((uO.cflag && uO.tflag) || (uO.cflag && uO.uflag) || + (uO.tflag && uO.uflag) || (uO.fflag && uO.overwrite_none)) + { + Info(slide, 0x401, ((char *)slide, LoadFarString(InvalidOptionsMsg))); + error = TRUE; + } + if (uO.aflag > 2) + uO.aflag = 2; +#ifdef VMS + if (uO.bflag > 2) + uO.bflag = 2; +#endif + if (uO.overwrite_all && uO.overwrite_none) { + Info(slide, 0x401, ((char *)slide, LoadFarString(IgnoreOOptionMsg))); + uO.overwrite_all = FALSE; + } +#ifdef MORE + if (G.M_flag && !isatty(1)) /* stdout redirected: "more" func. useless */ + G.M_flag = 0; +#endif + +#ifdef SFX + if (error) +#else + if ((argc-- == 0) || error) +#endif + { + *pargc = argc; + *pargv = argv; +#ifndef SFX + if (uO.vflag >= 2 && argc == -1) { /* "unzip -v" */ + show_version_info(__G); + return PK_OK; + } + if (!G.noargs && !error) + error = PK_PARAM; /* had options (not -h or -v) but no zipfile */ +#endif /* !SFX */ + return USAGE(error); + } + +#ifdef SFX + /* print our banner unless we're being fairly quiet */ + if (uO.qflag < 2) + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(UnzipSFXBanner), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); +#ifdef BETA + /* always print the beta warning: no unauthorized distribution!! */ + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(BetaVersion), "\n", + "SFX")); +#endif +#endif /* SFX */ + + if (uO.cflag || uO.tflag || uO.vflag || uO.zflag +#ifdef TIMESTAMP + || uO.T_flag +#endif + ) + G.extract_flag = FALSE; + else + G.extract_flag = TRUE; + + *pargc = argc; + *pargv = argv; + return PK_OK; + +} /* end function uz_opts() */ + + + + +/********************/ +/* Function usage() */ +/********************/ + +#ifdef SFX +# ifdef VMS +# define LOCAL "X. Quote uppercase options" +# endif +# ifdef UNIX +# define LOCAL "X" +# endif +# ifdef DOS_OS2_W32 +# define LOCAL "s$" +# endif +# ifdef FLEXOS +# define LOCAL "s" +# endif +# ifdef AMIGA +# define LOCAL "N" +# endif + /* Default for all other systems: */ +# ifndef LOCAL +# define LOCAL "" +# endif + +# ifdef MORE +# define SFXOPT1 "M" +# else +# define SFXOPT1 "" +# endif + +int usage(__G__ error) /* return PK-type error code */ + __GDEF + int error; +{ + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(UnzipSFXBanner), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(UnzipSFXOpts), + SFXOPT1, LOCAL)); +#ifdef BETA + Info(slide, error? 1 : 0, ((char *)slide, LoadFarString(BetaVersion), "\n", + "SFX")); +#endif + + if (error) + return PK_PARAM; + else + return PK_COOL; /* just wanted usage screen: no error */ + +} /* end function usage() */ + + + + + +#else /* !SFX */ +# ifdef VMS +# define QUOT '\"' +# define QUOTS "\"" +# else +# define QUOT ' ' +# define QUOTS "" +# endif + +int usage(__G__ error) /* return PK-type error code */ + __GDEF + int error; +{ + int flag = (error? 1 : 0); + + +/*--------------------------------------------------------------------------- + Print either ZipInfo usage or UnZip usage, depending on incantation. + (Strings must be no longer than 512 bytes for Turbo C, apparently.) + ---------------------------------------------------------------------------*/ + + if (uO.zipinfo_mode) { + +#ifndef NO_ZIPINFO + + Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine1), + ZI_MAJORVER, ZI_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate), + LoadFarStringSmall2(ZipInfoExample), QUOTS,QUOTS)); + Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine2))); + Info(slide, flag, ((char *)slide, LoadFarString(ZipInfoUsageLine3), + QUOT,QUOT, QUOT,QUOT, LoadFarStringSmall(ZipInfoUsageLine4))); +#ifdef VMS + Info(slide, flag, ((char *)slide, "\nRemember that non-lowercase\ + filespecs must be quoted in VMS (e.g., \"Makefile\").\n")); +#endif + +#endif /* !NO_ZIPINFO */ + + } else { /* UnZip mode */ + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine1), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); +#ifdef BETA + Info(slide, flag, ((char *)slide, LoadFarString(BetaVersion), "", "")); +#endif + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine2), + ZIPINFO_MODE_OPTION, LoadFarStringSmall(ZipInfoMode))); +#ifdef VMS + if (!error) /* maybe no command-line tail found; show extra help */ + Info(slide, flag, ((char *)slide, LoadFarString(VMSusageLine2b))); +#endif + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine3), + LoadFarStringSmall(local1))); + + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine4), + QUOT,QUOT, QUOT,QUOT, LoadFarStringSmall(local2), QUOT,QUOT, + LoadFarStringSmall2(local3))); + + /* This is extra work for SMALL_MEM, but it will work since + * LoadFarStringSmall2 uses the same buffer. Remember, this + * is a hack. */ + Info(slide, flag, ((char *)slide, LoadFarString(UnzipUsageLine5), + LoadFarStringSmall(Example2), LoadFarStringSmall2(Example3), + LoadFarStringSmall2(Example3))); + + } /* end if (uO.zipinfo_mode) */ + + if (error) + return PK_PARAM; + else + return PK_COOL; /* just wanted usage screen: no error */ + +} /* end function usage() */ + +#endif /* ?SFX */ + + + + +#ifndef SFX + +/********************************/ +/* Function show_version_info() */ +/********************************/ + +static void show_version_info(__G) + __GDEF +{ + if (uO.qflag > 3) /* "unzip -vqqqq" */ + Info(slide, 0, ((char *)slide, "%d\n", + (UZ_MAJORVER*100 + UZ_MINORVER*10 + PATCHLEVEL))); + else { + char *envptr, *getenv(); + int numopts = 0; + + Info(slide, 0, ((char *)slide, LoadFarString(UnzipUsageLine1v), + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, BETALEVEL, + LoadFarStringSmall(VersionDate))); + Info(slide, 0, ((char *)slide, + LoadFarString(UnzipUsageLine2v))); + version(__G); + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptions))); +#ifdef ACORN_FTYPE_NFS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(AcornFtypeNFS))); + ++numopts; +#endif +#ifdef ASM_CRC + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(AsmCRC))); + ++numopts; +#endif +#ifdef ASM_INFLATECODES + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(AsmInflateCodes))); + ++numopts; +#endif +#ifdef CHECK_VERSIONS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Check_Versions))); + ++numopts; +#endif +#ifdef COPYRIGHT_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Copyright_Clean))); + ++numopts; +#endif +#ifdef DEBUG + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(UDebug))); + ++numopts; +#endif +#ifdef DEBUG_TIME + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(DebugTime))); + ++numopts; +#endif +#ifdef DLL + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Dll))); + ++numopts; +#endif +#ifdef DOSWILD + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(DosWild))); + ++numopts; +#endif +#ifdef LZW_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(LZW_Clean))); + ++numopts; +#endif +#ifndef MORE + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(No_More))); + ++numopts; +#endif +#ifdef NO_ZIPINFO + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(No_ZipInfo))); + ++numopts; +#endif +#ifdef NTSD_EAS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(NTSDExtAttrib))); + ++numopts; +#endif +#ifdef OS2_EAS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(OS2ExtAttrib))); + ++numopts; +#endif +#ifdef QLZIP + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(SMSExFldOnUnix))); + ++numopts; +#endif +#ifdef REENTRANT + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Reentrant))); + ++numopts; +#endif +#ifdef REGARGS + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(RegArgs))); + ++numopts; +#endif +#ifdef RETURN_CODES + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Return_Codes))); + ++numopts; +#endif +#ifdef SET_DIR_ATTRIB + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(SetDirAttrib))); + ++numopts; +#endif +#ifdef TIMESTAMP + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(TimeStamp))); + ++numopts; +#endif +#ifdef UNIXBACKUP + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(UnixBackup))); + ++numopts; +#endif +#ifdef USE_EF_UT_TIME + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_EF_UT_time))); + ++numopts; +#endif +#ifndef COPYRIGHT_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_Smith_Code))); + ++numopts; +#endif +#ifndef LZW_CLEAN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_Unshrink))); + ++numopts; +#endif +#ifdef USE_VFAT + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(Use_VFAT_support))); + ++numopts; +#endif +#ifdef USE_ZLIB + sprintf((char *)(slide+256), LoadFarStringSmall(UseZlib), + ZLIB_VERSION, zlib_version); + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + (char *)(slide+256))); + ++numopts; +#endif +#ifdef VMS_TEXT_CONV + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(VmsTextConv))); + ++numopts; +#endif +#ifdef VMSCLI + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(VmsCLI))); + ++numopts; +#endif +#ifdef VMSWILD + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(VmsWild))); + ++numopts; +#endif +#if CRYPT +# ifdef PASSWD_FROM_STDIN + Info(slide, 0, ((char *)slide, LoadFarString(CompileOptFormat), + LoadFarStringSmall(PasswdStdin))); +# endif + Info(slide, 0, ((char *)slide, LoadFarString(Decryption), + CR_MAJORVER, CR_MINORVER, CR_BETA_VER, + LoadFarStringSmall(CryptDate))); + ++numopts; +#endif /* CRYPT */ + if (numopts == 0) + Info(slide, 0, ((char *)slide, + LoadFarString(CompileOptFormat), + LoadFarStringSmall(None))); + + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptions))); + envptr = getenv(LoadFarStringSmall(EnvUnZip)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvUnZip), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvUnZip2)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvUnZip2), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvZipInfo)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvZipInfo), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvZipInfo2)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvZipInfo2), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#ifndef __RSXNT__ +#ifdef __EMX__ + envptr = getenv(LoadFarStringSmall(EnvEMX)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvEMX), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvEMXOPT)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvEMXOPT), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#endif /* __EMX__ */ +#if (defined(__GO32__) && (!defined(__DJGPP__) || (__DJGPP__ < 2))) + envptr = getenv(LoadFarStringSmall(EnvGO32)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvGO32), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); + envptr = getenv(LoadFarStringSmall(EnvGO32TMP)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvGO32TMP), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#endif /* __GO32__ && !(__DJGPP__ >= 2) */ +#endif /* !__RSXNT__ */ +#ifdef RISCOS + envptr = getenv(LoadFarStringSmall(EnvUnZipExts)); + Info(slide, 0, ((char *)slide, LoadFarString(EnvOptFormat), + LoadFarStringSmall(EnvUnZipExts), + (envptr == (char *)NULL || *envptr == 0)? + LoadFarStringSmall2(None) : envptr)); +#endif /* RISCOS */ + } +} /* end function show_version() */ + +#endif /* !SFX */ +#endif /* !WINDLL */ diff --git a/utils/Install/sfxzip/unzipstb.c b/utils/Install/sfxzip/unzipstb.c new file mode 100644 index 0000000000..6ca238a89f --- /dev/null +++ b/utils/Install/sfxzip/unzipstb.c @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------- + + unzipstb.c + + Simple stub function for UnZip DLL (or shared library, whatever); does + exactly the same thing as normal UnZip, except for additional printf()s + of various version numbers, solely as a demonstration of what can/should + be checked when using the DLL. (If major version numbers ever differ, + assume program is incompatible with DLL--especially if DLL version is + older. This is not likely to be a problem with *this* simple program, + but most user programs will be much more complex.) + + ---------------------------------------------------------------------------*/ + +#include +#include "unzip.h" +#include "version.h" + +int main(int argc, char *argv[]) +{ + static UzpVer *pVersion; /* no pervert jokes, please... */ + + pVersion = UzpVersion(); + + printf("UnZip stub: checking version numbers (DLL is dated %s)\n", + pVersion->date); + printf(" UnZip versions: expecting %d.%d%d, using %d.%d%d%s\n", + UZ_MAJORVER, UZ_MINORVER, PATCHLEVEL, pVersion->unzip.major, + pVersion->unzip.minor, pVersion->unzip.patchlevel, pVersion->betalevel); + printf(" ZipInfo versions: expecting %d.%d%d, using %d.%d%d\n", + ZI_MAJORVER, ZI_MINORVER, PATCHLEVEL, pVersion->zipinfo.major, + pVersion->zipinfo.minor, pVersion->zipinfo.patchlevel); + +/* + D2_M*VER and os2dll.* are obsolete, though retained for compatibility: + + printf(" OS2 DLL versions: expecting %d.%d%d, using %d.%d%d\n", + D2_MAJORVER, D2_MINORVER, PATCHLEVEL, pVersion->os2dll.major, + pVersion->os2dll.minor, pVersion->os2dll.patchlevel); + */ + + if (pVersion->flag & 2) + printf(" using zlib version %s\n", pVersion->zlib_version); + printf("\n"); + + /* call the actual UnZip routine (string-arguments version) */ + return UzpMain(argc, argv); +} diff --git a/utils/Install/sfxzip/win32.c b/utils/Install/sfxzip/win32.c new file mode 100644 index 0000000000..f50ee5f9dd --- /dev/null +++ b/utils/Install/sfxzip/win32.c @@ -0,0 +1,2390 @@ +/*--------------------------------------------------------------------------- + + win32.c + + 32-bit Windows-specific (NT/95) routines for use with Info-ZIP's UnZip 5.3 + and later. + + Contains: GetLoadPath() + Opendir() + Readdir() + Closedir() + process_defer_NT() process any deferred items + SetSD() set security descriptor on file + EvalExtraFields() evaluate and process and extra field NOW + IsWinNT() indicate type of WIN32 platform + test_NTSD() test integrity of NT security data + utime2FileTime() + FStampIsLocTime() + FileTime2utime() + VFatFileTime2utime() + UTCtime2Localtime() + NTtzbugWorkaround() + getNTfiletime() + close_outfile() + stamp_file() + isfloppy() + NTQueryVolInfo() + IsVolumeOldFAT() + do_wild() + mapattr() + mapname() + map2fat() + checkdir() + version() + zstat_win32() + getch_win32() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" +#include /* must be AFTER unzip.h to avoid struct G problems */ +#ifdef __RSXNT__ +# include "rsxntwin.h" +#endif +#include "nt.h" + +#ifndef FUNZIP /* most of this file is not used with fUnZip */ + +#if (defined(__GO32__) || defined(__EMX__) || defined(__CYGWIN32__)) +# define MKDIR(path,mode) mkdir(path,mode) +#else +# define MKDIR(path,mode) mkdir(path) +#endif + +#ifdef HAVE_WORKING_DIRENT_H +# undef HAVE_WORKING_DIRENT_H +#endif +/* The emxrtl dirent support of (__GO32__ || __EMX__) converts to lowercase! */ +#if defined(__CYGWIN32__) +# define HAVE_WORKING_DIRENT_H +#endif + +#ifndef SFX +# ifdef HAVE_WORKING_DIRENT_H +# include /* use readdir() */ +# define zdirent dirent +# define zDIR DIR +# define Opendir opendir +# define Readdir readdir +# define Closedir closedir +# else /* !HAVE_WORKING_DIRENT_H */ + typedef struct zdirent { + char reserved [21]; + char ff_attrib; + short ff_ftime; + short ff_fdate; + long size; + char d_name[MAX_PATH]; + int d_first; + HANDLE d_hFindFile; + } zDIR; + + static zDIR *Opendir (const char *n); + static struct zdirent *Readdir (zDIR *d); + static void Closedir (zDIR *d); +# endif /* ?HAVE_WORKING_DIRENT_H */ +#endif /* !SFX */ + + +/* Function prototypes */ +#ifdef NTSD_EAS + static int SetSD(__GPRO__ char *path, PVOLUMECAPS VolumeCaps, + uch *eb_ptr, unsigned eb_len); + static int EvalExtraFields(__GPRO__ char *path, uch *ef_ptr, + unsigned ef_len); +#endif + +#if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND) || \ + defined(TIMESTAMP)) + static void utime2FileTime(time_t ut, FILETIME *pft); + static int FStampIsLocTime(__GPRO__ const char *path); +#endif /* USE_EF_UT_TIME || NT_TZBUG_WORKAROUND || TIMESTAMP */ +#ifdef NT_TZBUG_WORKAROUND + static int FileTime2utime(const FILETIME *pft, time_t *ut); +#ifdef W32_STAT_BANDAID + static int VFatFileTime2utime(const FILETIME *pft, time_t *ut); +#endif + static time_t UTCtime2Localtime(time_t utctime); + static void NTtzbugWorkaround(time_t ut, FILETIME *pft); +#endif /* NT_TZBUG_WORKAROUND */ + +static int getNTfiletime (__GPRO__ FILETIME *pModFT, FILETIME *pAccFT, + FILETIME *pCreFT); +static int isfloppy (int nDrive); +static int NTQueryVolInfo (__GPRO__ const char *name); +static int IsVolumeOldFAT (__GPRO__ const char *name); +static void map2fat (char *pathcomp, char **pEndFAT); + + +#ifdef __MINGW32__ + int _CRT_glob = 0; /* suppress command line globbing by C RTL */ +#endif + +/* static int created_dir; */ /* used by mapname(), checkdir() */ +/* static int renamed_fullpath; */ /* ditto */ +/* static int fnlen; */ /* ditto */ +/* static unsigned nLabelDrive; */ /* ditto */ + +extern char Far TruncNTSD[]; /* in extract.c */ + + + +#ifdef SFX + +/**************************/ +/* Function GetLoadPath() */ +/**************************/ + +char *GetLoadPath(__GPRO) +{ +#ifdef MSC + extern char *_pgmptr; + return _pgmptr; + +#else /* use generic API call */ + + GetModuleFileName(NULL, G.filename, FILNAMSIZ-1); + _ISO_INTERN(G.filename); /* translate to codepage of C rtl's stdio */ + return G.filename; +#endif + +} /* end function GetLoadPath() */ + + + + + +#else /* !SFX */ + +#ifndef HAVE_WORKING_DIRENT_H + +/**********************/ /* Borrowed from ZIP 2.0 sources */ +/* Function Opendir() */ /* Difference: no special handling for */ +/**********************/ /* hidden or system files. */ + +static zDIR *Opendir(n) + const char *n; /* directory to open */ +{ + zDIR *d; /* malloc'd return value */ + char *p; /* malloc'd temporary string */ + WIN32_FIND_DATA fd; + extent len = strlen(n); + + /* Start searching for files in directory n */ + + if ((d = (zDIR *)malloc(sizeof(zDIR))) == NULL || + (p = malloc(strlen(n) + 5)) == NULL) + { + if (d != (zDIR *)NULL) + free((void *)d); + return (zDIR *)NULL; + } + INTERN_TO_ISO(n, p); + if (len > 0) { + if (p[len-1] == ':') + p[len++] = '.'; /* x: => x:. */ + else if (p[len-1] == '/' || p[len-1] == '\\') + --len; /* foo/ => foo */ + } + strcpy(p+len, "/*"); + + if (INVALID_HANDLE_VALUE == (d->d_hFindFile = FindFirstFile(p, &fd))) { + free((zvoid *)d); + free((zvoid *)p); + return NULL; + } + strcpy(d->d_name, fd.cFileName); + + free((zvoid *)p); + d->d_first = 1; + return d; + +} /* end of function Opendir() */ + + + + +/**********************/ /* Borrowed from ZIP 2.0 sources */ +/* Function Readdir() */ /* Difference: no special handling for */ +/**********************/ /* hidden or system files. */ + +static struct zdirent *Readdir(d) + zDIR *d; /* directory stream from which to read */ +{ + /* Return pointer to first or next directory entry, or NULL if end. */ + + if ( d->d_first ) + d->d_first = 0; + else + { + WIN32_FIND_DATA fd; + + if ( !FindNextFile(d->d_hFindFile, &fd) ) + return NULL; + + ISO_TO_INTERN(fd.cFileName, d->d_name); + } + return (struct zdirent *)d; + +} /* end of function Readdir() */ + + + + +/***********************/ +/* Function Closedir() */ /* Borrowed from ZIP 2.0 sources */ +/***********************/ + +static void Closedir(d) + zDIR *d; /* directory stream to close */ +{ + FindClose(d->d_hFindFile); + free(d); +} + +#endif /* !HAVE_WORKING_DIRENT_H */ +#endif /* ?SFX */ + + + + +#ifdef NTSD_EAS + +/*********************************/ +/* Function process_defer_NT() */ +/*********************************/ + +void process_defer_NT(__G) + __GDEF +{ + /* process deferred items */ + + DWORD dir, bytes; + DWORD dirfail, bytesfail; + + ProcessDefer(&dir, &bytes, &dirfail, &bytesfail); + + if (!uO.tflag && (uO.qflag < 2)) { + if (dir) + Info(slide, 0, ((char *)slide, + " updated: %lu directory entries with %lu bytes security", + (ulg)dir, (ulg)bytes)); + if (dirfail) + Info(slide, 0, ((char *)slide, + " failed: %lu directory entries with %lu bytes security", + (ulg)dirfail, (ulg)bytesfail)); + } +} + + + +/**********************/ +/* Function SetSD() */ /* return almost-PK errors */ +/**********************/ + +static int SetSD(__G__ path, VolumeCaps, eb_ptr, eb_len) + __GDEF + char *path; + PVOLUMECAPS VolumeCaps; + uch *eb_ptr; + unsigned eb_len; +{ + ulg ntsd_ucSize; + uch *security_data; + int error; + + if (eb_ptr == NULL || eb_len < EB_NTSD_L_LEN) + return PK_OK; /* not a valid NTSD extra field: assume OK */ + + /* check if we know how to handle this version */ + if (*(eb_ptr + (EB_HEADSIZE+EB_NTSD_VERSION)) > (uch)EB_NTSD_MAX_VER) + return PK_OK; + + ntsd_ucSize = makelong(eb_ptr + (EB_HEADSIZE+EB_UCSIZE_P)); + if (ntsd_ucSize > 0L && eb_len <= (EB_NTSD_L_LEN + EB_CMPRHEADLEN)) + return IZ_EF_TRUNC; /* no compressed data! */ + + /* allocate storage for uncompressed data */ + security_data = (uch *)malloc((extent)ntsd_ucSize); + if (security_data == (uch *)NULL) + return PK_MEM4; + + error = memextract(__G__ security_data, ntsd_ucSize, + (eb_ptr + (EB_HEADSIZE+EB_NTSD_L_LEN)), (ulg)(eb_len - EB_NTSD_L_LEN)); + + if (error == PK_OK) { + if (SecuritySet(path, VolumeCaps, security_data)) { + error = PK_COOL; + if (!uO.tflag && (uO.qflag < 2) && + (!(VolumeCaps->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) + Info(slide, 0, ((char *)slide, " (%ld bytes security)", + ntsd_ucSize)); + } + } + + free(security_data); + return error; +} + + + + +/********************************/ /* scan extra fields for something */ +/* Function EvalExtraFields() */ /* we happen to know */ +/********************************/ + +static int EvalExtraFields(__G__ path, ef_ptr, ef_len) + __GDEF + char *path; + uch *ef_ptr; + unsigned ef_len; +{ + int rc = PK_OK; + + if (!uO.X_flag) + return PK_OK; /* user said don't process ACLs; for now, no other + extra block types are handled here */ + + while (ef_len >= EB_HEADSIZE) + { + unsigned eb_id = makeword(EB_ID + ef_ptr); + unsigned eb_len = makeword(EB_LEN + ef_ptr); + + if (eb_len > (ef_len - EB_HEADSIZE)) { + /* discovered some extra field inconsistency! */ + Trace((stderr, + "EvalExtraFields: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } + + switch (eb_id) + { + /* process security descriptor extra data if: + Caller is WinNT AND + Target local/remote drive supports acls AND + Target file is not a directory (else we defer processing + until later) + */ + case EF_NTSD: + if (IsWinNT()) { + VOLUMECAPS VolumeCaps; + + /* provide useful input */ + VolumeCaps.dwFileAttributes = G.pInfo->file_attr; + VolumeCaps.bUsePrivileges = (uO.X_flag > 1); + + /* check target volume capabilities - just fall through + * and try if fail */ + if (GetVolumeCaps(G.rootpath, path, &VolumeCaps) && + !(VolumeCaps.dwFileSystemFlags & FS_PERSISTENT_ACLS)) + { + rc = PK_OK; + break; + } + rc = SetSD(__G__ path, &VolumeCaps, ef_ptr, eb_len); + } else + rc = PK_OK; + break; + +#if 0 + /* perhaps later we can add support for unzipping OS/2 EAs to NT */ + case EF_OS2: + rc = SetEAs(__G__ path, ef_ptr); + break; + + case EF_PKUNIX: + case EF_IZUNIX: + case EF_IZUNIX2: + case EF_TIME: + break; /* handled elsewhere */ +#else /* ! 0 */ +#ifdef DEBUG + case EF_AV: + case EF_OS2: + case EF_PKVMS: + case EF_PKW32: + case EF_PKUNIX: + case EF_IZVMS: + case EF_IZUNIX: + case EF_IZUNIX2: + case EF_TIME: + case EF_MAC3: + case EF_JLMAC: + case EF_ZIPIT: + case EF_VMCMS: + case EF_MVS: + case EF_ACL: + case EF_BEOS: + case EF_QDOS: + case EF_AOSVS: + case EF_SPARK: + case EF_MD5: + case EF_ASIUNIX: + break; /* shut up for other known e.f. blocks */ +#endif /* DEBUG */ +#endif /* ? 0 */ + + default: + Trace((stderr, + "EvalExtraFields: unknown extra field block, ID=%u\n", + eb_id)); + break; + } + + ef_ptr += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + + if (rc != PK_OK) + break; + } + + return rc; +} + + + + +#ifndef SFX + +/**************************/ +/* Function test_NTSD() */ /* returns PK_WARN when NTSD data is invalid */ +/**************************/ + +#ifdef __BORLANDC__ +/* Turn off warning about not using all parameters for this function only */ +#pragma argsused +#endif +int test_NTSD(__G__ eb, eb_size, eb_ucptr, eb_ucsize) + __GDEF + uch *eb; + unsigned eb_size; + uch *eb_ucptr; + ulg eb_ucsize; +{ + int r = PK_OK; + + if (!ValidateSecurity(eb_ucptr)) + r = PK_WARN; + return r; + +} /* end function test_NTSD() */ + +#endif /* !SFX */ +#endif /* NTSD_EAS */ + + + + +/**********************/ +/* Function IsWinNT() */ +/**********************/ + +int IsWinNT(void) /* returns TRUE if real NT, FALSE if Win95 or Win32s */ +{ + static DWORD g_PlatformId = 0xFFFFFFFF; /* saved platform indicator */ + + if (g_PlatformId == 0xFFFFFFFF) { + /* note: GetVersionEx() doesn't exist on WinNT 3.1 */ + if (GetVersion() < 0x80000000) + g_PlatformId = TRUE; + else + g_PlatformId = FALSE; + } + return (int)g_PlatformId; +} + + +/* DEBUG_TIME insertion: */ +#ifdef DEBUG_TIME +static int show_NTFileTime(FILE *hdo, char *TTmsg, int isloc, FILETIME *pft); + +static int show_NTFileTime(FILE *hdo, char *TTmsg, int isloc, FILETIME *pft) +{ + SYSTEMTIME w32tm; + int rval; + + rval = FileTimeToSystemTime(pft, &w32tm); + if (!rval) { + fprintf(hdo, "%s\n %08lX,%08lX (%s) -> Conversion failed !!!\n", + TTmsg, (ulg)(pft->dwHighDateTime), (ulg)(pft->dwLowDateTime), + (isloc ? "local" : "UTC")); + } else { + fprintf(hdo, "%s\n %08lx,%08lx -> %04u-%02u-%02u, %02u:%02u:%02u %s\n", + TTmsg, (ulg)(pft->dwHighDateTime), (ulg)(pft->dwLowDateTime), + w32tm.wYear, w32tm.wMonth, w32tm.wDay, w32tm.wHour, + w32tm.wMinute, w32tm.wSecond, (isloc ? "local" : "UTC")); + } + return rval; +} +#define FTTrace(x) show_NTFileTime x +#else +#define FTTrace(x) +#endif /* DEBUG_TIME */ +/* end of TIME_DEBUG insertion */ + +#if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND) || \ + defined(TIMESTAMP)) + +#if ((defined(__GNUC__) || defined(ULONG_LONG_MAX)) && !defined(HAVE_INT64)) + typedef long long LLONG64; + typedef unsigned long long ULLNG64; +# define HAVE_INT64 +#endif +#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1100) && !defined(HAVE_INT64)) + typedef __int64 LLONG64; + typedef unsigned __int64 ULLNG64; +# define HAVE_INT64 +#endif +#if (defined(_MSC_VER) && (_MSC_VER >= 1100) && !defined(HAVE_INT64)) + typedef __int64 LLONG64; + typedef unsigned __int64 ULLNG64; +# define HAVE_INT64 +#endif + +/*****************************/ +/* Function utime2FileTime() */ /* convert Unix time_t format into the */ +/*****************************/ /* form used by SetFileTime() in NT/95 */ + +#define UNIX_TIME_ZERO_HI 0x019DB1DEUL +#define UNIX_TIME_ZERO_LO 0xD53E8000UL +#define NT_QUANTA_PER_UNIX 10000000L + +static void utime2FileTime(time_t ut, FILETIME *pft) +{ +#ifdef HAVE_INT64 + ULLNG64 NTtime; + + /* NT_QUANTA_PER_UNIX is small enough so that "ut * NT_QUANTA_PER_UNIX" + * cannot overflow in 64-bit signed calculation, regardless wether "ut" + * is signed or unsigned. */ + NTtime = ((LLONG64)ut * NT_QUANTA_PER_UNIX) + + ((ULLNG64)UNIX_TIME_ZERO_LO + ((ULLNG64)UNIX_TIME_ZERO_HI << 32)); + pft->dwLowDateTime = (DWORD)NTtime; + pft->dwHighDateTime = (DWORD)(NTtime >> 32); + +#else /* !HAVE_INT64 (64-bit integer arithmetics may not be supported) */ + unsigned int b1, b2, carry = 0; + unsigned long r0, r1, r2, r3; + long r4; /* signed, to catch environments with signed time_t */ + + b1 = ut & 0xFFFF; + b2 = (ut >> 16) & 0xFFFF; /* if ut is over 32 bits, too bad */ + r1 = b1 * (NT_QUANTA_PER_UNIX & 0xFFFF); + r2 = b1 * (NT_QUANTA_PER_UNIX >> 16); + r3 = b2 * (NT_QUANTA_PER_UNIX & 0xFFFF); + r4 = b2 * (NT_QUANTA_PER_UNIX >> 16); + r0 = (r1 + (r2 << 16)) & 0xFFFFFFFFL; + if (r0 < r1) + carry++; + r1 = r0; + r0 = (r0 + (r3 << 16)) & 0xFFFFFFFFL; + if (r0 < r1) + carry++; + pft->dwLowDateTime = r0 + UNIX_TIME_ZERO_LO; + if (pft->dwLowDateTime < r0) + carry++; + pft->dwHighDateTime = r4 + (r2 >> 16) + (r3 >> 16) + + UNIX_TIME_ZERO_HI + carry; +#endif /* ?HAVE_INT64 */ + +} /* end function utime2FileTime() */ + + + +/******************************/ +/* Function FStampIsLocTime() */ +/******************************/ + +static int FStampIsLocTime(__GPRO__ const char *path) +{ + return (NTQueryVolInfo(__G__ path) ? G.lastVolLocTim : FALSE); +} + +#endif /* USE_EF_UT_TIME || NT_TZBUG_WORKAROUND || TIMESTAMP */ + + + +#ifndef NT_TZBUG_WORKAROUND +# define UTIME_BOUNDCHECK_1(utimval) \ + if (fs_uses_loctime) { \ + utime_dosmin = dos_to_unix_time(DOSTIME_MINIMUM); \ + if ((ulg)utimval < (ulg)utime_dosmin) \ + utimval = utime_dosmin; \ + } +# define UTIME_BOUNDCHECK_N(utimval) \ + if (fs_uses_loctime && ((ulg)utimval < (ulg)utime_dosmin)) \ + utimval = utime_dosmin; +# define NT_TZBUG_PRECOMPENSATE(ut, pft) + +#else /* NT_TZBUG_WORKAROUND */ +# define UNIX_TIME_UMAX_HI 0x0236485EUL +# define UNIX_TIME_UMAX_LO 0xD4A5E980UL +# define UNIX_TIME_SMIN_HI 0x0151669EUL +# define UNIX_TIME_SMIN_LO 0xD53E8000UL +# define UNIX_TIME_SMAX_HI 0x01E9FD1EUL +# define UNIX_TIME_SMAX_LO 0xD4A5E980UL +# define UTIME_1980_JAN_01_00_00 315532800L +# define UTIME_BOUNDCHECK_1(utimval) +# define UTIME_BOUNDCHECK_N(utimval) +# define NT_TZBUG_PRECOMPENSATE(ut, pft) \ + if (fs_uses_loctime) NTtzbugWorkaround(ut, pft); + + /* nonzero if `y' is a leap year, else zero */ +# define leap(y) (((y)%4 == 0 && (y)%100 != 0) || (y)%400 == 0) + /* number of leap years from 1970 to `y' (not including `y' itself) */ +# define nleap(y) (((y)-1969)/4 - ((y)-1901)/100 + ((y)-1601)/400) + +extern ZCONST ush ydays[]; /* defined in fileio.c */ + +/*****************************/ +/* Function FileTime2utime() */ +/*****************************/ + +static int FileTime2utime(const FILETIME *pft, time_t *ut) +{ +#ifdef HAVE_INT64 + ULLNG64 NTtime; + + NTtime = ((ULLNG64)pft->dwLowDateTime + + ((ULLNG64)pft->dwHighDateTime << 32)); + + /* underflow and overflow handling */ +#ifdef CHECK_UTIME_SIGNED_UNSIGNED + if ((time_t)0x80000000L < (time_t)0L) + { + if (NTtime < ((ULLNG64)UNIX_TIME_SMIN_LO + + ((ULLNG64)UNIX_TIME_SMIN_HI << 32))) { + *ut = (time_t)LONG_MIN; + return FALSE; + } + if (NTtime > ((ULLNG64)UNIX_TIME_SMAX_LO + + ((ULLNG64)UNIX_TIME_SMAX_HI << 32))) { + *ut = (time_t)LONG_MAX; + return FALSE; + } + } + else +#endif /* CHECK_UTIME_SIGNED_UNSIGNED */ + { + if (NTtime < ((ULLNG64)UNIX_TIME_ZERO_LO + + ((ULLNG64)UNIX_TIME_ZERO_HI << 32))) { + *ut = (time_t)0; + return FALSE; + } + if (NTtime > ((ULLNG64)UNIX_TIME_UMAX_LO + + ((ULLNG64)UNIX_TIME_UMAX_HI << 32))) { + *ut = (time_t)ULONG_MAX; + return FALSE; + } + } + + NTtime -= ((ULLNG64)UNIX_TIME_ZERO_LO + + ((ULLNG64)UNIX_TIME_ZERO_HI << 32)); + *ut = (time_t)(NTtime / (unsigned long)NT_QUANTA_PER_UNIX); + return TRUE; +#else /* !HAVE_INT64 (64-bit integer arithmetics may not be supported) */ + time_t days; + SYSTEMTIME w32tm; + + /* underflow and overflow handling */ +#ifdef CHECK_UTIME_SIGNED_UNSIGNED + if ((time_t)0x80000000L < (time_t)0L) + { + if ((pft->dwHighDateTime < UNIX_TIME_SMIN_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMIN_HI) && + (pft->dwLowDateTime < UNIX_TIME_SMIN_LO))) { + *ut = (time_t)LONG_MIN; + return FALSE; + if ((pft->dwHighDateTime > UNIX_TIME_SMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_SMAX_LO))) { + *ut = (time_t)LONG_MAX; + return FALSE; + } + } + else +#endif /* CHECK_UTIME_SIGNED_UNSIGNED */ + { + if ((pft->dwHighDateTime < UNIX_TIME_ZERO_HI) || + ((pft->dwHighDateTime == UNIX_TIME_ZERO_HI) && + (pft->dwLowDateTime < UNIX_TIME_ZERO_LO))) { + *ut = (time_t)0; + return FALSE; + } + if ((pft->dwHighDateTime > UNIX_TIME_UMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_UMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_UMAX_LO))) { + *ut = (time_t)ULONG_MAX; + return FALSE; + } + } + + FileTimeToSystemTime(pft, &w32tm); + + /* set `days' to the number of days into the year */ + days = w32tm.wDay - 1 + ydays[w32tm.wMonth-1] + + (w32tm.wMonth > 2 && leap (w32tm.wYear)); + + /* now set `days' to the number of days since 1 Jan 1970 */ + days += 365 * (time_t)(w32tm.wYear - 1970) + + (time_t)(nleap(w32tm.wYear)); + + *ut = (time_t)(86400L * days + 3600L * (time_t)w32tm.wHour + + (time_t)(60 * w32tm.wMinute + w32tm.wSecond)); + return TRUE; +#endif /* ?HAVE_INT64 */ +} /* end function FileTime2utime() */ + + + +#ifdef W32_STAT_BANDAID +/*********************************/ +/* Function VFatFileTime2utime() */ +/*********************************/ + +static int VFatFileTime2utime(const FILETIME *pft, time_t *ut) +{ + FILETIME lft; +#ifndef HAVE_MKTIME + WORD wDOSDate, wDOSTime; +#else + SYSTEMTIME w32tm; + struct tm ltm; +#endif + + FileTimeToLocalFileTime(pft, &lft); + FTTrace((stdout, "VFatFT2utime, feed for mktime()", 1, &lft)); +#ifndef HAVE_MKTIME + /* This version of the FILETIME-to-UNIXTIME conversion function + * uses DOS-DATE-TIME format as intermediate stage. For modification + * and access times, this is no problem. But, the extra fine resolution + * of the VFAT-stored creation time gets lost. + */ + FileTimeToDosDateTime(&lft, &wDOSDate, &wDOSTime); + TTrace((stdout,"DosDateTime is %04u-%02u-%02u %02u:%02u:%02u\n", + (unsigned)((wDOSDate>>9)&0x7f)+1980,(unsigned)((wDOSDate>>5)&0x0f), + (unsigned)(wDOSDate&0x1f),(unsigned)((wDOSTime>>11)&0x1f), + (unsigned)((wDOSTime>>5)&0x3f),(unsigned)((wDOSTime<<1)&0x3e))); + *ut = dos_to_unix_time(((ulg)wDOSDate << 16) | (ulg)wDOSTime); + + /* a cheap error check: dos_to_unix_time() only returns an odd time + * when clipping at maximum time_t value. DOS_DATE_TIME values have + * a resolution of 2 seconds and are therefore even numbers. + */ + return (((*ut)&1) == (time_t)0); +#else /* HAVE_MKTIME */ + FileTimeToSystemTime(&lft, &w32tm); + /* underflow and overflow handling */ + /* TODO: The range checks are not accurate, the actual limits may + * be off by one daylight-saving-time shift (typically 1 hour), + * depending on the current state of "is_dst". + */ +#ifdef CHECK_UTIME_SIGNED_UNSIGNED + if ((time_t)0x80000000L < (time_t)0L) + { + if ((pft->dwHighDateTime < UNIX_TIME_SMIN_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMIN_HI) && + (pft->dwLowDateTime < UNIX_TIME_SMIN_LO))) { + *ut = (time_t)LONG_MIN; + return FALSE; + if ((pft->dwHighDateTime > UNIX_TIME_SMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_SMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_SMAX_LO))) { + *ut = (time_t)LONG_MAX; + return FALSE; + } + } + else +#endif /* CHECK_UTIME_SIGNED_UNSIGNED */ + { + if ((pft->dwHighDateTime < UNIX_TIME_ZERO_HI) || + ((pft->dwHighDateTime == UNIX_TIME_ZERO_HI) && + (pft->dwLowDateTime < UNIX_TIME_ZERO_LO))) { + *ut = (time_t)0; + return FALSE; + } + if ((pft->dwHighDateTime > UNIX_TIME_UMAX_HI) || + ((pft->dwHighDateTime == UNIX_TIME_UMAX_HI) && + (pft->dwLowDateTime > UNIX_TIME_UMAX_LO))) { + *ut = (time_t)ULONG_MAX; + return FALSE; + } + } + ltm.tm_year = w32tm.wYear - 1900; + ltm.tm_mon = w32tm.wMonth - 1; + ltm.tm_mday = w32tm.wDay; + ltm.tm_hour = w32tm.wHour; + ltm.tm_min = w32tm.wMinute; + ltm.tm_sec = w32tm.wSecond; + ltm.tm_isdst = -1; /* let mktime determine if DST is in effect */ + *ut = mktime(<m); + + /* a cheap error check: mktime returns "(time_t)-1L" on conversion errors. + * Normally, we would have to apply a consistency check because "-1" + * could also be a valid time. But, it is quite unlikely to read back odd + * time numbers from file systems that store time stamps in DOS format. + * (The only known exception is creation time on VFAT partitions.) + */ + return (*ut != (time_t)-1L); +#endif /* ?HAVE_MKTIME */ + +} /* end function VFatFileTime2utime() */ +#endif /* W32_STAT_BANDAID */ + + + +/********************************/ +/* Function UTCtime2Localtime() */ /* borrowed from Zip's mkgmtime() */ +/********************************/ + +static time_t UTCtime2Localtime(time_t utctime) +{ + time_t utc = utctime; + struct tm *tm; + unsigned years, months, days, hours, minutes, seconds; + + +#ifdef __BORLANDC__ /* Borland C++ 5.x crashes when trying to reference tm */ + if (utc < UTIME_1980_JAN_01_00_00) + utc = UTIME_1980_JAN_01_00_00; +#endif + tm = localtime(&utc); + if (tm == (struct tm *)NULL) + /* localtime() did not accept given utc time value; as an emergency + exit, the unconverted utctime value is returned */ + return utctime; + + years = tm->tm_year + 1900; /* year - 1900 -> year */ + months = tm->tm_mon; /* 0..11 */ + days = tm->tm_mday - 1; /* 1..31 -> 0..30 */ + hours = tm->tm_hour; /* 0..23 */ + minutes = tm->tm_min; /* 0..59 */ + seconds = tm->tm_sec; /* 0..61 in ANSI C */ + + /* set `days' to the number of days into the year */ + days += ydays[months] + (months > 1 && leap(years)); + + /* now set `days' to the number of days since 1 Jan 1970 */ + days += 365 * (years - 1970) + nleap(years); + + return (time_t)(86400L * (ulg)days + 3600L * (ulg)hours + + (ulg)(60 * minutes + seconds)); + +} /* end function UTCtime2Localtime() */ + + + +/********************************/ +/* Function NTtzbugWorkaround() */ +/********************************/ + +static void NTtzbugWorkaround(time_t ut, FILETIME *pft) +{ + FILETIME C_RTL_locft, NTAPI_locft; + time_t ux_loctime = UTCtime2Localtime(ut); + + /* This routine is only used when the target file system stores time- + * stamps as local time in MSDOS format. Thus we make sure that the + * resulting timestamp is within the range of MSDOS date-time values. */ + if (ux_loctime < UTIME_1980_JAN_01_00_00) + ux_loctime = UTIME_1980_JAN_01_00_00; + + utime2FileTime(ux_loctime, &C_RTL_locft); + if (!FileTimeToLocalFileTime(pft, &NTAPI_locft)) + return; + else { + long time_shift_l, time_shift_h; + int carry = 0; + + time_shift_l = C_RTL_locft.dwLowDateTime - NTAPI_locft.dwLowDateTime; + if (C_RTL_locft.dwLowDateTime < NTAPI_locft.dwLowDateTime) + carry--; + time_shift_h = C_RTL_locft.dwHighDateTime - NTAPI_locft.dwHighDateTime; + pft->dwLowDateTime += time_shift_l; + if (pft->dwLowDateTime < (ulg)time_shift_l) + carry++; + pft->dwHighDateTime += time_shift_h + carry; + TTrace((stdout, "FileTime shift: %08lx:%08lx\n", + time_shift_h+carry,time_shift_l)); + } +} /* end function NTtzbugWorkaround() */ + +#endif /* ?NT_TZBUG_WORKAROUND */ + + + +/****************************/ /* Get the file time in a format that */ +/* Function getNTfiletime() */ /* can be used by SetFileTime() in NT */ +/****************************/ + +static int getNTfiletime(__G__ pModFT, pAccFT, pCreFT) + __GDEF + FILETIME *pModFT; + FILETIME *pAccFT; + FILETIME *pCreFT; +{ +#ifdef NT_TZBUG_WORKAROUND + time_t ux_modtime; +#else /* !NT_TZBUG_WORKAROUND */ + FILETIME locft; /* 64-bit value made up of two 32-bit [low & high] */ + WORD wDOSDate; /* for converting from DOS date to Windows NT */ + WORD wDOSTime; +#endif /* ?NT_TZBUG_WORKAROUND */ +#ifdef USE_EF_UT_TIME + unsigned eb_izux_flg; + iztimes z_utime; /* struct for Unix-style actime & modtime, + creatime */ +#endif +#if (defined(USE_EF_UT_TIME) && !defined(NT_TZBUG_WORKAROUND)) + time_t utime_dosmin; +# endif +#if (defined(USE_EF_UT_TIME) || defined(NT_TZBUG_WORKAROUND)) + int fs_uses_loctime = FStampIsLocTime(__G__ G.filename); +#endif + + /* Copy and/or convert time and date variables, if necessary; + * return a flag indicating which time stamps are available. */ +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + ((eb_izux_flg = ef_scan_for_izux(G.extra_field, + G.lrec.extra_field_length, 0, G.lrec.last_mod_dos_datetime, + &z_utime, NULL)) & EB_UT_FL_MTIME)) + { + TTrace((stderr, "getNTfiletime: Unix e.f. modif. time = %lu\n", + z_utime.mtime)); + UTIME_BOUNDCHECK_1(z_utime.mtime) + utime2FileTime(z_utime.mtime, pModFT); + NT_TZBUG_PRECOMPENSATE(z_utime.mtime, pModFT) + if (eb_izux_flg & EB_UT_FL_ATIME) { + UTIME_BOUNDCHECK_N(z_utime.atime) + utime2FileTime(z_utime.atime, pAccFT); + NT_TZBUG_PRECOMPENSATE(z_utime.atime, pAccFT) + } + if (eb_izux_flg & EB_UT_FL_CTIME) { + UTIME_BOUNDCHECK_N(z_utime.ctime) + utime2FileTime(z_utime.ctime, pCreFT); + NT_TZBUG_PRECOMPENSATE(z_utime.ctime, pCreFT) + } + return (int)eb_izux_flg; + } +#endif /* USE_EF_UT_TIME */ +#ifdef NT_TZBUG_WORKAROUND + ux_modtime = dos_to_unix_time(G.lrec.last_mod_dos_datetime); + utime2FileTime(ux_modtime, pModFT); + NT_TZBUG_PRECOMPENSATE(ux_modtime, pModFT) +#else /* !NT_TZBUG_WORKAROUND */ + + wDOSTime = (WORD)(G.lrec.last_mod_dos_datetime); + wDOSDate = (WORD)(G.lrec.last_mod_dos_datetime >> 16); + + /* The DosDateTimeToFileTime() function converts a DOS date/time + * into a 64-bit Windows NT file time */ + if (!DosDateTimeToFileTime(wDOSDate, wDOSTime, &locft)) + { + Info(slide, 0, ((char *)slide, "DosDateTime failed: %d\n", + (int)GetLastError())); + return 0; + } + if (!LocalFileTimeToFileTime(&locft, pModFT)) + { + Info(slide, 0, ((char *)slide, "LocalFileTime failed: %d\n", + (int)GetLastError())); + *pModFT = locft; + } +#endif /* ?NT_TZBUG_WORKAROUND */ + *pAccFT = *pModFT; + return (EB_UT_FL_MTIME | EB_UT_FL_ATIME); + +} /* end function getNTfiletime() */ + + + + +/****************************/ +/* Function close_outfile() */ +/****************************/ + +void close_outfile(__G) + __GDEF +{ + FILETIME Modft; /* File time type defined in NT, `last modified' time */ + FILETIME Accft; /* NT file time type, `last access' time */ + FILETIME Creft; /* NT file time type, `file creation' time */ + HANDLE hFile; /* File handle defined in NT */ + int gotTime; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(G.filename) + 1); + + INTERN_TO_ISO(G.filename, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname G.filename +#endif + + /* Close the file and then re-open it using the Win32 + * CreateFile call, so that the file can be created + * with GENERIC_WRITE access, otherwise the SetFileTime + * call will fail. */ + fclose(G.outfile); + + /* don't set the time stamp and attributes on standard output */ + if (uO.cflag) + return; + + gotTime = getNTfiletime(__G__ &Modft, &Accft, &Creft); + + /* open a handle to the file before processing extra fields; + we do this in case new security on file prevents us from updating + time stamps */ + hFile = CreateFile(Ansi_Fname, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + + /* sfield@microsoft.com: set attributes before time in case we decide to + support other filetime members later. This also allows us to apply + attributes before the security is changed, which may prevent this + from succeeding otherwise. Also, since most files don't have + any interesting attributes, only change them if something other than + FILE_ATTRIBUTE_ARCHIVE appears in the attributes. This works well + as an optimization because FILE_ATTRIBUTE_ARCHIVE gets applied to the + file anyway, when it's created new. */ + if((G.pInfo->file_attr & 0x7F) & ~FILE_ATTRIBUTE_ARCHIVE) { + if (!SetFileAttributes(Ansi_Fname, G.pInfo->file_attr & 0x7F)) + Info(slide, 1, ((char *)slide, + "\nwarning (%d): could not set file attributes\n", + (int)GetLastError())); + } + +#ifdef NTSD_EAS + /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ + if (G.extra_field) { /* zipfile extra field may have extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 1, ((char *)slide, LoadFarString(TruncNTSD), + makeword(G.extra_field+2)-10, uO.qflag? "\n":"")); + } + } +#endif /* NTSD_EAS */ + + if ( hFile == INVALID_HANDLE_VALUE ) + Info(slide, 1, ((char *)slide, + "\nCreateFile error %d when trying set file time\n", + (int)GetLastError())); + else { + if (gotTime) { + FILETIME *pModft = (gotTime & EB_UT_FL_MTIME) ? &Modft : NULL; + FILETIME *pAccft = (gotTime & EB_UT_FL_ATIME) ? &Accft : NULL; + FILETIME *pCreft = (gotTime & EB_UT_FL_CTIME) ? &Creft : NULL; + + if (!SetFileTime(hFile, pCreft, pAccft, pModft)) + Info(slide, 0, ((char *)slide, "\nSetFileTime failed: %d\n", + (int)GetLastError())); + } + CloseHandle(hFile); + } + + return; + +#undef Ansi_Fname + +} /* end function close_outfile() */ + + + + +#ifdef TIMESTAMP + +/*************************/ +/* Function stamp_file() */ +/*************************/ + +int stamp_file(__GPRO__ ZCONST char *fname, time_t modtime) +{ + FILETIME Modft; /* File time type defined in NT, `last modified' time */ + HANDLE hFile; /* File handle defined in NT */ + int errstat = 0; /* return status: 0 == "OK", -1 == "Failure" */ +#ifndef NT_TZBUG_WORKAROUND + time_t utime_dosmin; /* internal variable for UTIME_BOUNDCHECK_1 */ +#endif + int fs_uses_loctime = FStampIsLocTime(__G__ fname); +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(fname) + 1); + + INTERN_TO_ISO(fname, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname fname +#endif + + /* open a handle to the file to prepare setting the mod-time stamp */ + hFile = CreateFile(Ansi_Fname, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if ( hFile == INVALID_HANDLE_VALUE ) { + errstat = -1; + } else { + /* convert time_t modtime into WIN32 native 64bit format */ + UTIME_BOUNDCHECK_1(modtime) + utime2FileTime(modtime, &Modft); + NT_TZBUG_PRECOMPENSATE(modtime, &Modft) + /* set Access and Modification times of the file to modtime */ + if (!SetFileTime(hFile, NULL, &Modft, &Modft)) { + errstat = -1; + } + CloseHandle(hFile); + } + + return errstat; + +#undef Ansi_Fname +} /* end function stamp_file() */ + +#endif /* TIMESTAMP */ + + + + +/***********************/ +/* Function isfloppy() */ /* more precisely, is it removable? */ +/***********************/ + +static int isfloppy(int nDrive) /* 1 == A:, 2 == B:, etc. */ +{ + char rootPathName[4]; + + rootPathName[0] = (char)('A' + nDrive - 1); /* build the root path */ + rootPathName[1] = ':'; /* name, e.g. "A:/" */ + rootPathName[2] = '/'; + rootPathName[3] = '\0'; + + return (GetDriveType(rootPathName) == DRIVE_REMOVABLE); + +} /* end function isfloppy() */ + + + + +/*****************************/ +/* Function NTQueryVolInfo() */ +/*****************************/ + +/* + * Note: 8.3 limits on filenames apply only to old-style FAT filesystems. + * More recent versions of Windows (Windows NT 3.5 / Windows 4.0) + * can support long filenames (LFN) on FAT filesystems. Check the + * filesystem maximum component length field to detect LFN support. + */ + +static int NTQueryVolInfo(__GPRO__ const char *name) +{ + /* static char lastRootPath[4] = ""; */ + /* static int lastVolOldFAT; */ + /* static int lastVolLocTim; */ + char *tmp0; + char tmp1[MAX_PATH], tmp2[MAX_PATH]; + unsigned volSerNo, maxCompLen, fileSysFlags; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(name) + 1); + + INTERN_TO_ISO(name, ansi_name); + name = ansi_name; +#endif + + if ((!strncmp(name, "//", 2) || !strncmp(name,"\\\\", 2)) && + (name[2] != '\0' && name[2] != '/' && name[2] != '\\')) { + /* GetFullPathname() and GetVolumeInformation() do not work + * on UNC names. For now, we return "error". + * **FIXME**: check if UNC name is mapped to a drive letter + * and use mapped drive for volume info query. + */ + return FALSE; + } + if (isalpha((uch)name[0]) && (name[1] == ':')) + tmp0 = (char *)name; + else + { + if (!GetFullPathName(name, MAX_PATH, tmp1, &tmp0)) + return FALSE; + tmp0 = &tmp1[0]; + } + if (strncmp(G.lastRootPath, tmp0, 2) != 0) { + /* For speed, we skip repeated queries for the same device */ + strncpy(G.lastRootPath, tmp0, 2); /* Build the root path name, */ + G.lastRootPath[2] = '/'; /* e.g. "A:/" */ + G.lastRootPath[3] = '\0'; + + if (!GetVolumeInformation((LPCTSTR)G.lastRootPath, + (LPTSTR)tmp1, (DWORD)MAX_PATH, + (LPDWORD)&volSerNo, (LPDWORD)&maxCompLen, + (LPDWORD)&fileSysFlags, (LPTSTR)tmp2, (DWORD)MAX_PATH)) { + G.lastRootPath[0] = '\0'; + return FALSE; + } + + /* LFNs are available if the component length is > 12 */ + G.lastVolOldFAT = (maxCompLen <= 12); +/* G.lastVolOldFAT = !strncmp(strupr(tmp2), "FAT", 3); old version */ + + /* Volumes in (V)FAT and (OS/2) HPFS format store file timestamps in + * local time! + */ + G.lastVolLocTim = !strncmp(strupr(tmp2), "VFAT", 4) || + !strncmp(tmp2, "HPFS", 4) || + !strncmp(tmp2, "FAT", 3); + } + + return TRUE; + +} /* end function NTQueryVolInfo() */ + + + + +/*****************************/ +/* Function IsVolumeOldFAT() */ +/*****************************/ + +static int IsVolumeOldFAT(__GPRO__ const char *name) +{ + return (NTQueryVolInfo(__G__ name) ? G.lastVolOldFAT : FALSE); +} + + + + +#ifndef SFX + +/************************/ +/* Function do_wild() */ /* identical to OS/2 version */ +/************************/ + +char *do_wild(__G__ wildspec) + __GDEF + char *wildspec; /* only used first time on a given dir */ +{ + /* static zDIR *wild_dir = NULL; */ + /* static char *dirname, *wildname, matchname[FILNAMSIZ]; */ + /* static int firstcall=TRUE, have_dirname, dirnamelen; */ + char *fnamestart; + struct zdirent *file; + + /* Even when we're just returning wildspec, we *always* do so in + * matchname[]--calling routine is allowed to append four characters + * to the returned string, and wildspec may be a pointer to argv[]. + */ + if (!G.notfirstcall) { /* first call: must initialize everything */ + G.notfirstcall = TRUE; + + if (!iswild(wildspec)) { + strcpy(G.matchname, wildspec); + G.have_dirname = FALSE; + G.wild_dir = NULL; + return G.matchname; + } + + /* break the wildspec into a directory part and a wildcard filename */ + if ((G.wildname = strrchr(wildspec, '/')) == NULL && + (G.wildname = strrchr(wildspec, ':')) == NULL) { + G.dirname = "."; + G.dirnamelen = 1; + G.have_dirname = FALSE; + G.wildname = wildspec; + } else { + ++G.wildname; /* point at character after '/' or ':' */ + G.dirnamelen = G.wildname - wildspec; + if ((G.dirname = (char *)malloc(G.dirnamelen+1)) == NULL) { + Info(slide, 1, ((char *)slide, + "warning: cannot allocate wildcard buffers\n")); + strcpy(G.matchname, wildspec); + return G.matchname; /* but maybe filespec was not a wildcard */ + } + strncpy(G.dirname, wildspec, G.dirnamelen); + G.dirname[G.dirnamelen] = '\0'; /* terminate for strcpy below */ + G.have_dirname = TRUE; + } + Trace((stderr, "do_wild: dirname = [%s]\n", G.dirname)); + + if ((G.wild_dir = (zvoid *)Opendir(G.dirname)) != NULL) { + if (G.have_dirname) { + strcpy(G.matchname, G.dirname); + fnamestart = G.matchname + G.dirnamelen; + } else + fnamestart = G.matchname; + while ((file = Readdir((zDIR *)G.wild_dir)) != NULL) { + Trace((stderr, "do_wild: Readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.wildname, 1) && /* 1 == ignore case */ + /* skip "." and ".." directory entries */ + strcmp(fnamestart, ".") && strcmp(fnamestart, "..")) { + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.matchname; + } + } + /* if we get to here directory is exhausted, so close it */ + Closedir((zDIR *)G.wild_dir); + G.wild_dir = NULL; + } + Trace((stderr, "do_wild: Opendir(%s) returns NULL\n", G.dirname)); + + /* return the raw wildspec in case that works (e.g., directory not + * searchable, but filespec was not wild and file is readable) */ + strcpy(G.matchname, wildspec); + return G.matchname; + } + + /* last time through, might have failed opendir but returned raw wildspec */ + if (G.wild_dir == NULL) { + G.notfirstcall = FALSE; /* reset for new wildspec */ + if (G.have_dirname) + free(G.dirname); + return (char *)NULL; + } + + /* If we've gotten this far, we've read and matched at least one entry + * successfully (in a previous call), so dirname has been copied into + * matchname already. + */ + if (G.have_dirname) { + /* strcpy(G.matchname, G.dirname); */ + fnamestart = G.matchname + G.dirnamelen; + } else + fnamestart = G.matchname; + while ((file = Readdir((zDIR *)G.wild_dir)) != NULL) { + Trace((stderr, "do_wild: readdir returns %s\n", file->d_name)); + strcpy(fnamestart, file->d_name); + if (strrchr(fnamestart, '.') == (char *)NULL) + strcat(fnamestart, "."); + if (match(fnamestart, G.wildname, 1)) { /* 1 == ignore case */ + Trace((stderr, "do_wild: match() succeeds\n")); + /* remove trailing dot */ + fnamestart += strlen(fnamestart) - 1; + if (*fnamestart == '.') + *fnamestart = '\0'; + return G.matchname; + } + } + + Closedir((zDIR *)G.wild_dir); /* at least one entry read; nothing left */ + G.wild_dir = NULL; + G.notfirstcall = FALSE; /* reset for new wildspec */ + if (G.have_dirname) + free(G.dirname); + return (char *)NULL; + +} /* end function do_wild() */ + +#endif /* !SFX */ + + + +/**********************/ +/* Function mapattr() */ +/**********************/ + +/* Identical to MS-DOS, OS/2 versions. However, NT has a lot of extra + * permission stuff, so this function should probably be extended in the + * future. */ + +int mapattr(__G) + __GDEF +{ + /* set archive bit for file entries (file is not backed up): */ + G.pInfo->file_attr = ((unsigned)G.crec.external_file_attributes | + (G.crec.external_file_attributes & FILE_ATTRIBUTE_DIRECTORY ? + 0 : FILE_ATTRIBUTE_ARCHIVE)) & 0xff; + return 0; + +} /* end function mapattr() */ + + + + +/************************/ +/* Function mapname() */ +/************************/ + /* return 0 if no error, 1 if caution (filename */ +int mapname(__G__ renamed) /* truncated), 2 if warning (skip file because */ + __GDEF /* dir doesn't exist), 3 if error (skip file), */ + int renamed; /* or 10 if out of memory (skip file) */ +{ /* [also IZ_VOL_LABEL, IZ_CREATED_DIR] */ + char pathcomp[FILNAMSIZ]; /* path-component buffer */ + char *pp, *cp=NULL; /* character pointers */ + char *lastsemi = NULL; /* pointer to last semi-colon in pathcomp */ + int error; + register unsigned workch; /* hold the character being tested */ + + +/*--------------------------------------------------------------------------- + Initialize various pointers and counters and stuff. + ---------------------------------------------------------------------------*/ + + /* can create path as long as not just freshening, or if user told us */ + G.create_dirs = (!uO.fflag || renamed); + + G.created_dir = FALSE; /* not yet */ + G.renamed_fullpath = FALSE; + G.fnlen = strlen(G.filename); + + if (renamed) { + cp = G.filename - 1; /* point to beginning of renamed name... */ + while (*++cp) + if (*cp == '\\') /* convert backslashes to forward */ + *cp = '/'; + cp = G.filename; + /* use temporary rootpath if user gave full pathname */ + if (G.filename[0] == '/') { + G.renamed_fullpath = TRUE; + pathcomp[0] = '/'; /* copy the '/' and terminate */ + pathcomp[1] = '\0'; + ++cp; + } else if (isalpha((uch)G.filename[0]) && G.filename[1] == ':') { + G.renamed_fullpath = TRUE; + pp = pathcomp; + *pp++ = *cp++; /* copy the "d:" (+ '/', possibly) */ + *pp++ = *cp++; + if (*cp == '/') + *pp++ = *cp++; /* otherwise add "./"? */ + *pp = '\0'; + } + } + + /* pathcomp is ignored unless renamed_fullpath is TRUE: */ + if ((error = checkdir(__G__ pathcomp, INIT)) != 0) /* init path buffer */ + return error; /* ...unless no mem or vol label on hard disk */ + + *pathcomp = '\0'; /* initialize translation buffer */ + pp = pathcomp; /* point to translation buffer */ + if (!renamed) { /* cp already set if renamed */ + if (uO.jflag) /* junking directories */ + cp = (char *)strrchr(G.filename, '/'); + if (cp == NULL) /* no '/' or not junking dirs */ + cp = G.filename; /* point to internal zipfile-member pathname */ + else + ++cp; /* point to start of last component of path */ + } + +/*--------------------------------------------------------------------------- + Begin main loop through characters in filename. + ---------------------------------------------------------------------------*/ + + while ((workch = (uch)*cp++) != 0) { + + switch (workch) { + case '/': /* can assume -j flag not given */ + *pp = '\0'; + if ((error = checkdir(__G__ pathcomp, APPEND_DIR)) > 1) + return error; + pp = pathcomp; /* reset conversion buffer for next piece */ + lastsemi = NULL; /* leave directory semi-colons alone */ + break; + + case ':': /* drive names not stored in zipfile, */ + case '<': /* so no colons allowed */ + case '>': /* no redirection symbols allowed either */ + case '|': /* no pipe signs allowed */ + case '"': /* no double quotes allowed */ + case '?': /* no wildcards allowed */ + case '*': + *pp++ = '_'; /* these rules apply equally to FAT and NTFS */ + break; + case ';': /* start of VMS version? */ + lastsemi = pp; /* remove VMS version later... */ + *pp++ = ';'; /* but keep semicolon for now */ + break; + + case ' ': /* keep spaces unless specifically */ + /* NT cannot create filenames with spaces on FAT volumes */ + if (uO.sflag || IsVolumeOldFAT(__G__ G.filename)) + *pp++ = '_'; + else + *pp++ = ' '; + break; + + default: + /* allow European characters in filenames: */ + if (isprint(workch) || workch >= 127) + *pp++ = (char)workch; + } /* end switch */ + } /* end while loop */ + + *pp = '\0'; /* done with pathcomp: terminate it */ + + /* if not saving them, remove VMS version numbers (appended "###") */ + if (!uO.V_flag && lastsemi) { + pp = lastsemi + 1; /* semi-colon was kept: expect #'s after */ + while (isdigit((uch)(*pp))) + ++pp; + if (*pp == '\0') /* only digits between ';' and end: nuke */ + *lastsemi = '\0'; + } + +/*--------------------------------------------------------------------------- + Report if directory was created (and no file to create: filename ended + in '/'), check name to be sure it exists, and combine path and name be- + fore exiting. + ---------------------------------------------------------------------------*/ + + if (G.filename[G.fnlen-1] == '/') { + checkdir(__G__ G.filename, GETPATH); + if (G.created_dir) { +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(G.filename) + 1); + + INTERN_TO_ISO(G.filename, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname G.filename +#endif + if (QCOND2) { + Info(slide, 0, ((char *)slide, " creating: %-22s\n", + FnFilter1(G.filename))); + } + + /* set file attributes: + The default for newly created directories is "DIR attribute + flags set", so there is no need to change attributes unless + one of the DOS style attribute flags is set. The readonly + attribute need not be masked, since it does not prevent + modifications in the new directory. */ + if(G.pInfo->file_attr & (0x7F & ~FILE_ATTRIBUTE_DIRECTORY)) { + if (!SetFileAttributes(Ansi_Fname, G.pInfo->file_attr & 0x7F)) + Info(slide, 1, ((char *)slide, + "\nwarning (%d): could not set file attributes for %s\n", + (int)GetLastError(), G.filename)); + } + +#ifdef NTSD_EAS + /* set extra fields, both stored-in-zipfile and .LONGNAME flavors */ + if (G.extra_field) { /* zipfile e.f. may have extended attribs */ + int err = EvalExtraFields(__G__ G.filename, G.extra_field, + G.lrec.extra_field_length); + + if (err == IZ_EF_TRUNC) { + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", + FnFilter1(G.filename))); + Info(slide, 1, ((char *)slide, LoadFarString(TruncNTSD), + makeword(G.extra_field+2)-10, uO.qflag? "\n":"")); + } + } +#endif /* NTSD_EAS */ + return IZ_CREATED_DIR; /* set dir time (note trailing '/') */ + } + return 2; /* dir existed already; don't look for data to extract */ + } + + if (*pathcomp == '\0') { + Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", + FnFilter1(G.filename))); + return 3; + } + + checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ + checkdir(__G__ G.filename, GETPATH); + Trace((stderr, "mapname returns with filename = [%s] (error = %d)\n\n", + FnFilter1(G.filename), error)); + + if (G.pInfo->vollabel) { /* set the volume label now */ + char drive[4]; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_name = (char *)alloca(strlen(G.filename) + 1); + INTERN_TO_ISO(G.filename, ansi_name); +# define Ansi_Fname ansi_name +#else +# define Ansi_Fname G.filename +#endif + + /* Build a drive string, e.g. "b:" */ + drive[0] = (char)('a' + G.nLabelDrive - 1); + strcpy(drive + 1, ":\\"); + if (QCOND2) + Info(slide, 0, ((char *)slide, "labelling %s %-22s\n", drive, + FnFilter1(G.filename))); + if (!SetVolumeLabel(drive, Ansi_Fname)) { + Info(slide, 1, ((char *)slide, + "mapname: error setting volume label\n")); + return 3; + } + return 2; /* success: skip the "extraction" quietly */ +#undef Ansi_Fname + } + + return error; + +} /* end function mapname() */ + + + + +/**********************/ +/* Function map2fat() */ /* Not quite identical to OS/2 version */ +/**********************/ + +static void map2fat(pathcomp, pEndFAT) + char *pathcomp, **pEndFAT; +{ + char *ppc = pathcomp; /* variable pointer to pathcomp */ + char *pEnd = *pEndFAT; /* variable pointer to buildpathFAT */ + char *pBegin = *pEndFAT; /* constant pointer to start of this comp. */ + char *last_dot = NULL; /* last dot not converted to underscore */ + int dotname = FALSE; /* flag: path component begins with dot */ + /* ("." and ".." don't count) */ + register unsigned workch; /* hold the character being tested */ + + + /* Only need check those characters which are legal in NTFS but not + * in FAT: to get here, must already have passed through mapname. + * Also must truncate path component to ensure 8.3 compliance. + */ + while ((workch = (uch)*ppc++) != 0) { + switch (workch) { + case '[': + case ']': + case '+': + case ',': + case ';': + case '=': + *pEnd++ = '_'; /* convert brackets to underscores */ + break; + + case '.': + if (pEnd == *pEndFAT) { /* nothing appended yet... */ + if (*ppc == '\0') /* don't bother appending a */ + break; /* "./" component to the path */ + else if (*ppc == '.' && ppc[1] == '\0') { /* "../" */ + *pEnd++ = '.'; /* add first dot, unchanged... */ + ++ppc; /* skip second dot, since it will */ + } else { /* be "added" at end of if-block */ + *pEnd++ = '_'; /* FAT doesn't allow null filename */ + dotname = TRUE; /* bodies, so map .exrc -> _.exrc */ + } /* (extra '_' now, "dot" below) */ + } else if (dotname) { /* found a second dot, but still */ + dotname = FALSE; /* have extra leading underscore: */ + *pEnd = '\0'; /* remove it by shifting chars */ + pEnd = *pEndFAT + 1; /* left one space (e.g., .p1.p2: */ + while (pEnd[1]) { /* __p1 -> _p1_p2 -> _p1.p2 when */ + *pEnd = pEnd[1]; /* finished) [opt.: since first */ + ++pEnd; /* two chars are same, can start */ + } /* shifting at second position] */ + } + last_dot = pEnd; /* point at last dot so far... */ + *pEnd++ = '_'; /* convert dot to underscore for now */ + break; + + default: + *pEnd++ = (char)workch; + + } /* end switch */ + } /* end while loop */ + + *pEnd = '\0'; /* terminate buildpathFAT */ + + /* NOTE: keep in mind that pEnd points to the end of the path + * component, and *pEndFAT still points to the *beginning* of it... + * Also note that the algorithm does not try to get too fancy: + * if there are no dots already, the name either gets truncated + * at 8 characters or the last underscore is converted to a dot + * (only if more characters are saved that way). In no case is + * a dot inserted between existing characters. + */ + if (last_dot == NULL) { /* no dots: check for underscores... */ + char *plu = strrchr(pBegin, '_'); /* pointer to last underscore */ + + if (plu == NULL) { /* no dots, no underscores: truncate at 8 chars */ + *pEndFAT += 8; /* (or could insert '.' and keep 11...?) */ + if (*pEndFAT > pEnd) + *pEndFAT = pEnd; /* oops...didn't have 8 chars to truncate */ + else + **pEndFAT = '\0'; + } else if (MIN(plu - pBegin, 8) + MIN(pEnd - plu - 1, 3) > 8) { + last_dot = plu; /* be lazy: drop through to next if-blk */ + } else if ((pEnd - *pEndFAT) > 8) { + *pEndFAT += 8; /* more fits into just basename than if */ + **pEndFAT = '\0'; /* convert last underscore to dot */ + } else + *pEndFAT = pEnd; /* whole thing fits into 8 chars or less */ + } + + if (last_dot != NULL) { /* one dot (or two, in the case of */ + *last_dot = '.'; /* "..") is OK: put it back in */ + + if ((last_dot - pBegin) > 8) { + char *p, *q; + int i; + + p = last_dot; + q = last_dot = pBegin + 8; + for (i = 0; (i < 4) && *p; ++i) /* too many chars in basename: */ + *q++ = *p++; /* shift .ext left and trun- */ + *q = '\0'; /* cate/terminate it */ + *pEndFAT = q; + } else if ((pEnd - last_dot) > 4) { /* too many chars in extension */ + *pEndFAT = last_dot + 4; + **pEndFAT = '\0'; + } else + *pEndFAT = pEnd; /* filename is fine; point at terminating zero */ + + if ((last_dot - pBegin) > 0 && last_dot[-1] == ' ') + last_dot[-1] = '_'; /* NO blank in front of '.'! */ + } +} /* end function map2fat() */ + + + + +/***********************/ /* Borrowed from os2.c for UnZip 5.1. */ +/* Function checkdir() */ /* Difference: no EA stuff */ +/***********************/ /* HPFS stuff works on NTFS too */ + +int checkdir(__G__ pathcomp, flag) + __GDEF + char *pathcomp; + int flag; +/* + * returns: 1 - (on APPEND_NAME) truncated filename + * 2 - path doesn't exist, not allowed to create + * 3 - path doesn't exist, tried to create and failed; or + * path exists and is not a directory, but is supposed to be + * 4 - path is too long + * 10 - can't allocate memory for filename buffers + */ +{ + /* static int rootlen = 0; */ /* length of rootpath */ + /* static char *rootpath; */ /* user's "extract-to" directory */ + /* static char *buildpathHPFS; */ /* full path (so far) to extracted file, */ + /* static char *buildpathFAT; */ /* both HPFS/EA (main) and FAT versions */ + /* static char *endHPFS; */ /* corresponding pointers to end of */ + /* static char *endFAT; */ /* buildpath ('\0') */ + +# define FN_MASK 7 +# define FUNCTION (flag & FN_MASK) + + + +/*--------------------------------------------------------------------------- + APPEND_DIR: append the path component to the path being built and check + for its existence. If doesn't exist and we are creating directories, do + so for this one; else signal success or error as appropriate. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_DIR) { + char *p = pathcomp; + int too_long=FALSE; + + Trace((stderr, "appending dir segment [%s]\n", pathcomp)); + while ((*G.endHPFS = *p++) != '\0') /* copy to HPFS filename */ + ++G.endHPFS; + if (!IsVolumeOldFAT(__G__ G.buildpathHPFS)) { + p = pathcomp; + while ((*G.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.endFAT; + } else + map2fat(pathcomp, &G.endFAT); /* map into FAT fn, update endFAT */ + + /* GRR: could do better check, see if overrunning buffer as we go: + * check endHPFS-buildpathHPFS after each append, set warning variable + * if within 20 of FILNAMSIZ; then if var set, do careful check when + * appending. Clear variable when begin new path. */ + + /* next check: need to append '/', at least one-char name, '\0' */ + if ((G.endHPFS-G.buildpathHPFS) > FILNAMSIZ-3) + too_long = TRUE; /* check if extracting dir? */ +#ifdef FIX_STAT_BUG + /* Borland C++ 5.0 does not handle a call to stat() well if the + * directory does not exist (it tends to crash in strange places.) + * This is apparently a problem only when compiling for GUI rather + * than console. The code below attempts to work around this problem. + */ + if (access(G.buildpathFAT, 0) != 0) { + if (!G.create_dirs) { /* told not to create (freshening) */ + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", + FnFilter1(G.buildpathHPFS))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + if (MKDIR(G.buildpathFAT, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, + "checkdir error: cannot create %s\n\ + unable to process %s.\n", + FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 3; /* path didn't exist, tried to create, failed */ + } + G.created_dir = TRUE; + } +#endif /* FIX_STAT_BUG */ + if (SSTAT(G.buildpathFAT, &G.statbuf)) /* path doesn't exist */ + { + if (!G.create_dirs) { /* told not to create (freshening) */ + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 2; /* path doesn't exist: nothing to do */ + } + if (too_long) { /* GRR: should allow FAT extraction w/o EAs */ + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", + FnFilter1(G.buildpathHPFS))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + if (MKDIR(G.buildpathFAT, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, + "checkdir error: cannot create %s\n\ + unable to process %s.\n", + FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 3; /* path didn't exist, tried to create, failed */ + } + G.created_dir = TRUE; + } else if (!S_ISDIR(G.statbuf.st_mode)) { + Info(slide, 1, ((char *)slide, + "checkdir error: %s exists but is not directory\n \ + unable to process %s.\n", + FnFilter2(G.buildpathFAT), FnFilter1(G.filename))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 3; /* path existed but wasn't dir */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", + FnFilter1(G.buildpathHPFS))); + free(G.buildpathHPFS); + free(G.buildpathFAT); + return 4; /* no room for filenames: fatal */ + } + *G.endHPFS++ = '/'; + *G.endFAT++ = '/'; + *G.endHPFS = *G.endFAT = '\0'; + Trace((stderr, "buildpathHPFS now = [%s]\nbuildpathFAT now = [%s]\n", + FnFilter1(G.buildpathHPFS), FnFilter2(G.buildpathFAT))); + return 0; + + } /* end if (FUNCTION == APPEND_DIR) */ + +/*--------------------------------------------------------------------------- + GETPATH: copy full FAT path to the string pointed at by pathcomp (want + filename to reflect name used on disk, not EAs; if full path is HPFS, + buildpathFAT and buildpathHPFS will be identical). Also free both paths. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == GETPATH) { + Trace((stderr, "getting and freeing FAT path [%s]\n", + FnFilter1(G.buildpathFAT))); + Trace((stderr, "freeing HPFS path [%s]\n", + FnFilter1(G.buildpathHPFS))); + strcpy(pathcomp, G.buildpathFAT); + free(G.buildpathFAT); + free(G.buildpathHPFS); + G.buildpathHPFS = G.buildpathFAT = G.endHPFS = G.endFAT = NULL; + return 0; + } + +/*--------------------------------------------------------------------------- + APPEND_NAME: assume the path component is the filename; append it and + return without checking for existence. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_NAME) { + char *p = pathcomp; + int error = 0; + + Trace((stderr, "appending filename [%s]\n", FnFilter1(pathcomp))); + while ((*G.endHPFS = *p++) != '\0') { /* copy to HPFS filename */ + ++G.endHPFS; + if ((G.endHPFS-G.buildpathHPFS) >= FILNAMSIZ) { + *--G.endHPFS = '\0'; + Info(slide, 1, ((char *)slide, + "checkdir warning: path too long; truncating\n \ + %s\n -> %s\n", + FnFilter1(G.filename), FnFilter2(G.buildpathHPFS))); + error = 1; /* filename truncated */ + } + } + + if ( G.pInfo->vollabel || !IsVolumeOldFAT(__G__ G.buildpathHPFS)) { + p = pathcomp; + while ((*G.endFAT = *p++) != '\0') /* copy to FAT filename, too */ + ++G.endFAT; + } else + map2fat(pathcomp, &G.endFAT); /* map into FAT fn, update endFAT */ + Trace((stderr, "buildpathHPFS: %s\nbuildpathFAT: %s\n", + FnFilter1(G.buildpathHPFS), FnFilter2(G.buildpathFAT))); + + return error; /* could check for existence, prompt for new name... */ + + } /* end if (FUNCTION == APPEND_NAME) */ + +/*--------------------------------------------------------------------------- + INIT: allocate and initialize buffer space for the file currently being + extracted. If file was renamed with an absolute path, don't prepend the + extract-to path. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == INIT) { + Trace((stderr, "initializing buildpathHPFS and buildpathFAT to ")); + if ((G.buildpathHPFS = (char *)malloc(G.fnlen+G.rootlen+1)) == NULL) + return 10; + if ((G.buildpathFAT = (char *)malloc(G.fnlen+G.rootlen+1)) == NULL) { + free(G.buildpathHPFS); + return 10; + } + if (G.pInfo->vollabel) { /* use root or renamed path, but don't store */ +/* GRR: for network drives, do strchr() and return IZ_VOL_LABEL if not [1] */ + if (G.renamed_fullpath && pathcomp[1] == ':') + *G.buildpathHPFS = (char)ToLower(*pathcomp); + else if (!G.renamed_fullpath && G.rootlen > 1 && + G.rootpath[1] == ':') + *G.buildpathHPFS = (char)ToLower(*G.rootpath); + else { + char tmpN[MAX_PATH], *tmpP; + if (GetFullPathName(".", MAX_PATH, tmpN, &tmpP) > MAX_PATH) + { /* by definition of MAX_PATH we should never get here */ + Info(slide, 1, ((char *)slide, + "checkdir warning: current dir path too long\n")); + return 1; /* can't get drive letter */ + } + G.nLabelDrive = *tmpN - 'a' + 1; + *G.buildpathHPFS = (char)(G.nLabelDrive - 1 + 'a'); + } + G.nLabelDrive = *G.buildpathHPFS - 'a' + 1; /* save for mapname() */ + if (uO.volflag == 0 || *G.buildpathHPFS < 'a' /* no labels/bogus? */ + || (uO.volflag == 1 && !isfloppy(G.nLabelDrive))) { /* !fixed */ + free(G.buildpathHPFS); + free(G.buildpathFAT); + return IZ_VOL_LABEL; /* skipping with message */ + } + *G.buildpathHPFS = '\0'; + } else if (G.renamed_fullpath) /* pathcomp = valid data */ + strcpy(G.buildpathHPFS, pathcomp); + else if (G.rootlen > 0) + strcpy(G.buildpathHPFS, G.rootpath); + else + *G.buildpathHPFS = '\0'; + G.endHPFS = G.buildpathHPFS; + G.endFAT = G.buildpathFAT; + while ((*G.endFAT = *G.endHPFS) != '\0') { + ++G.endFAT; + ++G.endHPFS; + } + Trace((stderr, "[%s]\n", FnFilter1(G.buildpathHPFS))); + return 0; + } + +/*--------------------------------------------------------------------------- + ROOT: if appropriate, store the path in rootpath and create it if neces- + sary; else assume it's a zipfile member and return. This path segment + gets used in extracting all members from every zipfile specified on the + command line. Note that under OS/2 and MS-DOS, if a candidate extract-to + directory specification includes a drive letter (leading "x:"), it is + treated just as if it had a trailing '/'--that is, one directory level + will be created if the path doesn't exist, unless this is otherwise pro- + hibited (e.g., freshening). + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) || defined(SFX_EXDIR)) + if (FUNCTION == ROOT) { + Trace((stderr, "initializing root path to [%s]\n", + FnFilter1(pathcomp))); + if (pathcomp == NULL) { + G.rootlen = 0; + return 0; + } + if ((G.rootlen = strlen(pathcomp)) > 0) { + int had_trailing_pathsep=FALSE, has_drive=FALSE, xtra=2; + + if (isalpha((uch)pathcomp[0]) && pathcomp[1] == ':') + has_drive = TRUE; /* drive designator */ + if (pathcomp[G.rootlen-1] == '/' || pathcomp[G.rootlen-1] == '\\') { + pathcomp[--G.rootlen] = '\0'; + had_trailing_pathsep = TRUE; + } + if (has_drive && (G.rootlen == 2)) { + if (!had_trailing_pathsep) /* i.e., original wasn't "x:/" */ + xtra = 3; /* room for '.' + '/' + 0 at end of "x:" */ + } else if (G.rootlen > 0) { /* need not check "x:." and "x:/" */ + if (SSTAT(pathcomp, &G.statbuf) || !S_ISDIR(G.statbuf.st_mode)) + { + /* path does not exist */ + if (!G.create_dirs /* || iswild(pathcomp) */ ) { + G.rootlen = 0; + return 2; /* treat as stored file */ + } + /* create directory (could add loop here to scan pathcomp + * and create more than one level, but really necessary?) */ + if (MKDIR(pathcomp, 0777) == -1) { + Info(slide, 1, ((char *)slide, + "checkdir: cannot create extraction directory: %s\n", + FnFilter1(pathcomp))); + G.rootlen = 0; /* path didn't exist, tried to create, */ + return 3; /* failed: file exists, or need 2+ levels */ + } + } + } + if ((G.rootpath = (char *)malloc(G.rootlen+xtra)) == NULL) { + G.rootlen = 0; + return 10; + } + strcpy(G.rootpath, pathcomp); + if (xtra == 3) /* had just "x:", make "x:." */ + G.rootpath[G.rootlen++] = '.'; + G.rootpath[G.rootlen++] = '/'; + G.rootpath[G.rootlen] = '\0'; + Trace((stderr, "rootpath now = [%s]\n", FnFilter1(G.rootpath))); + } + return 0; + } +#endif /* !SFX || SFX_EXDIR */ + +/*--------------------------------------------------------------------------- + END: free rootpath, immediately prior to program exit. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == END) { + Trace((stderr, "freeing rootpath\n")); + if (G.rootlen > 0) { + free(G.rootpath); + G.rootlen = 0; + } + return 0; + } + + return 99; /* should never reach */ + +} /* end function checkdir() */ + + + + + +#ifndef SFX +#ifndef WINDLL + +/************************/ +/* Function version() */ +/************************/ + +void version(__G) + __GDEF +{ + int len; +#if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__DJGPP__)) + char buf[80]; +#if (defined(_MSC_VER) && (_MSC_VER > 900)) + char buf2[80]; +#endif +#endif + + len = sprintf((char *)slide, CompiledWith, + +#if defined(_MSC_VER) /* MSC == VC++, but what about SDK compiler? */ + (sprintf(buf, "Microsoft C %d.%02d ", _MSC_VER/100, _MSC_VER%100), buf), +# if (_MSC_VER == 800) + "(Visual C++ v1.1)", +# elif (_MSC_VER == 850) + "(Windows NT v3.5 SDK)", +# elif (_MSC_VER == 900) + "(Visual C++ v2.x)", +# elif (_MSC_VER > 900) + (sprintf(buf2, "(Visual C++ %d.%d)", _MSC_VER/100 - 6, _MSC_VER%100/10), + buf2), +# else + "(bad version)", +# endif +#elif defined(__WATCOMC__) +# if (__WATCOMC__ % 10 > 0) + (sprintf(buf, "Watcom C/C++ %d.%02d", __WATCOMC__ / 100, + __WATCOMC__ % 100), buf), "", +# else + (sprintf(buf, "Watcom C/C++ %d.%d", __WATCOMC__ / 100, + (__WATCOMC__ % 100) / 10), buf), "", +# endif +#elif defined(__BORLANDC__) + "Borland C++", +# if (__BORLANDC__ < 0x0200) + " 1.0", +# elif (__BORLANDC__ == 0x0200) + " 2.0", +# elif (__BORLANDC__ == 0x0400) + " 3.0", +# elif (__BORLANDC__ == 0x0410) /* __BCPLUSPLUS__ = 0x0310 */ + " 3.1", +# elif (__BORLANDC__ == 0x0452) /* __BCPLUSPLUS__ = 0x0320 */ + " 4.0 or 4.02", +# elif (__BORLANDC__ == 0x0460) /* __BCPLUSPLUS__ = 0x0340 */ + " 4.5", +# elif (__BORLANDC__ == 0x0500) /* __BCPLUSPLUS__ = 0x0340 */ + " 5.0", +# elif (__BORLANDC__ == 0x0520) /* __BCPLUSPLUS__ = 0x0520 */ + " 5.2 (C++ Builder)", /* GRR: assume this will stay sync'd? */ +# else + " later than 5.2", +# endif +#elif defined(__LCC__) + "LCC-Win32", "", +#elif defined(__GNUC__) +# if defined(__RSXNT__) +# if (defined(__DJGPP__) && !defined(__EMX__)) + (sprintf(buf, "rsxnt(djgpp v%d.%02d) / gcc ", + __DJGPP__, __DJGPP_MINOR__), buf), +# elif defined(__DJGPP__) + (sprintf(buf, "rsxnt(emx+djgpp v%d.%02d) / gcc ", + __DJGPP__, __DJGPP_MINOR__), buf), +# elif (defined(__GO32__) && !defined(__EMX__)) + "rsxnt(djgpp v1.x) / gcc ", +# elif defined(__GO32__) + "rsxnt(emx + djgpp v1.x) / gcc ", +# elif defined(__EMX__) + "rsxnt(emx)+gcc ", +# else + "rsxnt(unknown) / gcc ", +# endif +# elif defined(__CYGWIN32__) + "cygnus win32 / gcc ", +# elif defined(__MINGW32__) + "mingw32 / gcc ", +# else + "gcc ", +# endif + __VERSION__, +#else /* !_MSC_VER, !__WATCOMC__, !__BORLANDC__, !__LCC__, !__GNUC__ */ + "unknown compiler (SDK?)", "", +#endif /* ?compilers */ + + "Windows 95 / Windows NT", "\n(32-bit)", + +#ifdef __DATE__ + " on ", __DATE__ +#else + "", "" +#endif + ); + + (*G.message)((zvoid *)&G, slide, (ulg)len, 0); + + return; + +} /* end function version() */ + +#endif /* !WINDLL */ +#endif /* !SFX */ + + + +#ifdef W32_STAT_BANDAID + +/* All currently known variants of WIN32 operating systems (Windows 95/98, + * WinNT 3.x, 4.0, 5.0) have a nasty bug in the OS kernel concerning + * conversions between UTC and local time: In the time conversion functions + * of the Win32 API, the timezone offset (including seasonal daylight saving + * shift) between UTC and local time evaluation is erratically based on the + * current system time. The correct evaluation must determine the offset + * value as it {was/is/will be} for the actual time to be converted. + * + * Some versions of MS C runtime lib's stat() returns utc time-stamps so + * that localtime(timestamp) corresponds to the (potentially false) local + * time shown by the OS' system programs (Explorer, command shell dir, etc.) + * The RSXNT port follows the same strategy, but fails to recognize the + * access-time attribute. + * + * For the NTFS file system (and other filesystems that store time-stamps + * as UTC values), this results in st_mtime (, st_{c|a}time) fields which + * are not stable but vary according to the seasonal change of "daylight + * saving time in effect / not in effect". + * + * Other C runtime libs (CygWin, or the CRT DLLs supplied with Win95/NT + * return the unix-time equivalent of the UTC FILETIME values as got back + * from the Win32 API call. This time, return values from NTFS are correct + * whereas utimes from files on (V)FAT volumes vary according to the DST + * switches. + * + * To achieve timestamp consistency of UTC (UT extra field) values in + * Zip archives, the Info-ZIP programs require work-around code for + * proper time handling in stat() (and other time handling routines). + */ +/* stat() functions under Windows95 tend to fail for root directories. * + * Watcom and Borland, at least, are affected by this bug. Watcom made * + * a partial fix for 11.0 but still missed some cases. This substitute * + * detects the case and fills in reasonable values. Otherwise we get * + * effects like failure to extract to a root dir because it's not found. */ + +int zstat_win32(__W32STAT_GLOBALS__ const char *path, struct stat *buf) +{ + if (!stat(path, buf)) + { +#ifdef NT_TZBUG_WORKAROUND + /* stat was successful, now redo the time-stamp fetches */ + int fs_uses_loctime = FStampIsLocTime(__G__ path); + HANDLE h; + FILETIME Modft, Accft, Creft; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_path = (char *)alloca(strlen(path) + 1); + + INTERN_TO_ISO(path, ansi_path); +# define Ansi_Path ansi_path +#else +# define Ansi_Path path +#endif + + TTrace((stdout, "stat(%s) finds modtime %08lx\n", path, buf->st_mtime)); + h = CreateFile(Ansi_Path, GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (h != INVALID_HANDLE_VALUE) { + BOOL ftOK = GetFileTime(h, &Creft, &Accft, &Modft); + CloseHandle(h); + + if (ftOK) { + FTTrace((stdout, "GetFileTime returned Modft", 0, &Modft)); + FTTrace((stdout, "GetFileTime returned Creft", 0, &Creft)); + if (!fs_uses_loctime) { + /* On a filesystem that stores UTC timestamps, we refill + * the time fields of the struct stat buffer by directly + * using the UTC values as returned by the Win32 + * GetFileTime() API call. + */ + FileTime2utime(&Modft, &(buf->st_mtime)); + if (Accft.dwLowDateTime != 0 || Accft.dwHighDateTime != 0) + FileTime2utime(&Accft, &(buf->st_atime)); + else + buf->st_atime = buf->st_mtime; + if (Creft.dwLowDateTime != 0 || Creft.dwHighDateTime != 0) + FileTime2utime(&Creft, &(buf->st_ctime)); + else + buf->st_ctime = buf->st_mtime; + TTrace((stdout,"NTFS, recalculated modtime %08lx\n", + buf->st_mtime)); + } else { + /* On VFAT and FAT-like filesystems, the FILETIME values + * are converted back to the stable local time before + * converting them to UTC unix time-stamps. + */ + VFatFileTime2utime(&Modft, &(buf->st_mtime)); + if (Accft.dwLowDateTime != 0 || Accft.dwHighDateTime != 0) + VFatFileTime2utime(&Accft, &(buf->st_atime)); + else + buf->st_atime = buf->st_mtime; + if (Creft.dwLowDateTime != 0 || Creft.dwHighDateTime != 0) + VFatFileTime2utime(&Creft, &(buf->st_ctime)); + else + buf->st_ctime = buf->st_mtime; + TTrace((stdout, "VFAT, recalculated modtime %08lx\n", + buf->st_mtime)); + } + } + } +# undef Ansi_Path +#endif /* NT_TZBUG_WORKAROUND */ + return 0; + } +#ifdef W32_STATROOT_FIX + else + { + DWORD flags; +#ifdef __RSXNT__ /* RSXNT/EMX C rtl uses OEM charset */ + char *ansi_path = (char *)alloca(strlen(path) + 1); + + INTERN_TO_ISO(path, ansi_path); +# define Ansi_Path ansi_path +#else +# define Ansi_Path path +#endif + + flags = GetFileAttributes(Ansi_Path); + if (flags != 0xFFFFFFFF && flags & FILE_ATTRIBUTE_DIRECTORY) { + Trace((stderr, "\nstat(\"%s\",...) failed on existing directory\n", + path)); + memset(buf, 0, sizeof(struct stat)); + buf->st_atime = buf->st_ctime = buf->st_mtime = + dos_to_unix_time(DOSTIME_MINIMUM); /* 1-1-80 */ + buf->st_mode = S_IFDIR | S_IREAD | + ((flags & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE); + return 0; + } /* assumes: stat() won't fail on non-dirs without good reason */ +# undef Ansi_Path + } +#endif /* W32_STATROOT_FIX */ + return -1; +} + +#endif /* W32_STAT_BANDAID */ + +#endif /* !FUNZIP */ + + + +#ifndef WINDLL +/* This replacement getch() function was originally created for Watcom C + * and then additionally used with CYGWIN. Since UnZip 5.4, all other Win32 + * ports apply this replacement rather that their supplied getch() (or + * alike) function. There are problems with unabsorbed LF characters left + * over in the keyboard buffer under Win95 (and 98) when ENTER was pressed. + * (Under Win95, ENTER returns two(!!) characters: CR-LF.) This problem + * does not appear when run on a WinNT console prompt! + */ + +/* Watcom 10.6's getch() does not handle Alt+. */ +/* Note that if PASSWD_FROM_STDIN is defined, the file containing */ +/* the password must have a carriage return after the word, not a */ +/* Unix-style newline (linefeed only). This discards linefeeds. */ + +int getch_win32(void) +{ + HANDLE stin; + DWORD rc; + unsigned char buf[2]; + int ret = -1; + DWORD odemode = ~(DWORD)0; + +# ifdef PASSWD_FROM_STDIN + stin = GetStdHandle(STD_INPUT_HANDLE); +# else + stin = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + if (stin == INVALID_HANDLE_VALUE) + return -1; +# endif + if (GetConsoleMode(stin, &odemode)) + SetConsoleMode(stin, ENABLE_PROCESSED_INPUT); /* raw except ^C noticed */ + if (ReadFile(stin, &buf, 1, &rc, NULL) && rc == 1) + ret = buf[0]; + /* when the user hits return we get CR LF. We discard the LF, not the CR, + * because when we call this for the first time after a previous input + * such as the one for "replace foo? [y]es, ..." the LF may still be in + * the input stream before whatever the user types at our prompt. */ + if (ret == '\n') + if (ReadFile(stin, &buf, 1, &rc, NULL) && rc == 1) + ret = buf[0]; + if (odemode != ~(DWORD)0) + SetConsoleMode(stin, odemode); +# ifndef PASSWD_FROM_STDIN + CloseHandle(stin); +# endif + return ret; +} +#endif /* !WINDLL */ diff --git a/utils/Install/sfxzip/zipinfo.c b/utils/Install/sfxzip/zipinfo.c new file mode 100644 index 0000000000..c244c1e92f --- /dev/null +++ b/utils/Install/sfxzip/zipinfo.c @@ -0,0 +1,1912 @@ +/*--------------------------------------------------------------------------- + + zipinfo.c Greg Roelofs et al. + + This file contains all of the ZipInfo-specific listing routines for UnZip. + + Contains: zi_opts() + zi_end_central() + zipinfo() + zi_long() + zi_short() + zi_time() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "unzip.h" + + +#ifndef NO_ZIPINFO /* strings use up too much space in small-memory systems */ + +/* Define OS-specific attributes for use on ALL platforms--the S_xxxx + * versions of these are defined differently (or not defined) by different + * compilers and operating systems. */ + +#define UNX_IFMT 0170000 /* Unix file type mask */ +#define UNX_IFDIR 0040000 /* Unix directory */ +#define UNX_IFREG 0100000 /* Unix regular file */ +#define UNX_IFSOCK 0140000 /* Unix socket (BSD, not SysV or Amiga) */ +#define UNX_IFLNK 0120000 /* Unix symbolic link (not SysV, Amiga) */ +#define UNX_IFBLK 0060000 /* Unix block special (not Amiga) */ +#define UNX_IFCHR 0020000 /* Unix character special (not Amiga) */ +#define UNX_IFIFO 0010000 /* Unix fifo (BCC, not MSC or Amiga) */ +#define UNX_ISUID 04000 /* Unix set user id on execution */ +#define UNX_ISGID 02000 /* Unix set group id on execution */ +#define UNX_ISVTX 01000 /* Unix directory permissions control */ +#define UNX_ENFMT UNX_ISGID /* Unix record locking enforcement flag */ +#define UNX_IRWXU 00700 /* Unix read, write, execute: owner */ +#define UNX_IRUSR 00400 /* Unix read permission: owner */ +#define UNX_IWUSR 00200 /* Unix write permission: owner */ +#define UNX_IXUSR 00100 /* Unix execute permission: owner */ +#define UNX_IRWXG 00070 /* Unix read, write, execute: group */ +#define UNX_IRGRP 00040 /* Unix read permission: group */ +#define UNX_IWGRP 00020 /* Unix write permission: group */ +#define UNX_IXGRP 00010 /* Unix execute permission: group */ +#define UNX_IRWXO 00007 /* Unix read, write, execute: other */ +#define UNX_IROTH 00004 /* Unix read permission: other */ +#define UNX_IWOTH 00002 /* Unix write permission: other */ +#define UNX_IXOTH 00001 /* Unix execute permission: other */ + +#define VMS_IRUSR UNX_IRUSR /* VMS read/owner */ +#define VMS_IWUSR UNX_IWUSR /* VMS write/owner */ +#define VMS_IXUSR UNX_IXUSR /* VMS execute/owner */ +#define VMS_IRGRP UNX_IRGRP /* VMS read/group */ +#define VMS_IWGRP UNX_IWGRP /* VMS write/group */ +#define VMS_IXGRP UNX_IXGRP /* VMS execute/group */ +#define VMS_IROTH UNX_IROTH /* VMS read/other */ +#define VMS_IWOTH UNX_IWOTH /* VMS write/other */ +#define VMS_IXOTH UNX_IXOTH /* VMS execute/other */ + +#define AMI_IFMT 06000 /* Amiga file type mask */ +#define AMI_IFDIR 04000 /* Amiga directory */ +#define AMI_IFREG 02000 /* Amiga regular file */ +#define AMI_IHIDDEN 00200 /* to be supported in AmigaDOS 3.x */ +#define AMI_ISCRIPT 00100 /* executable script (text command file) */ +#define AMI_IPURE 00040 /* allow loading into resident memory */ +#define AMI_IARCHIVE 00020 /* not modified since bit was last set */ +#define AMI_IREAD 00010 /* can be opened for reading */ +#define AMI_IWRITE 00004 /* can be opened for writing */ +#define AMI_IEXECUTE 00002 /* executable image, a loadable runfile */ +#define AMI_IDELETE 00001 /* can be deleted */ + +#define LFLAG 3 /* short "ls -l" type listing */ + +static int zi_long OF((__GPRO__ ulg *pEndprev)); +static int zi_short OF((__GPRO)); +static void zi_showMacTypeCreator + OF((__GPRO__ uch *ebfield)); +static char *zi_time OF((__GPRO__ ZCONST ulg *datetimez, + ZCONST time_t *modtimez, char *d_t_str)); + + +/**********************************************/ +/* Strings used in zipinfo.c (ZipInfo half) */ +/**********************************************/ + +static char nullStr[] = ""; + +static ZCONST char Far LongHeader[] = "Archive: %s %ld bytes %d file%s\n"; +static ZCONST char Far ShortHeader[] = "Archive: %s %ld %d\n"; +static ZCONST char Far EndCentDirRec[] = "\nEnd-of-central-directory record:\n"; +static ZCONST char Far LineSeparators[] = "-------------------------------\n\n"; +static ZCONST char Far ActOffsetCentDir[] = "\ + Actual offset of end-of-central-dir record: %9ld (%.8lXh)\n\ + Expected offset of end-of-central-dir record: %9ld (%.8lXh)\n\ + (based on the length of the central directory and its expected offset)\n\n"; +static ZCONST char Far SinglePartArchive1[] = "\ + This zipfile constitutes the sole disk of a single-part archive; its\n\ + central directory contains %u %s. The central directory is %lu\n\ + (%.8lXh) bytes long, and its (expected) offset in bytes from the\n"; +static ZCONST char Far SinglePartArchive2[] = "\ + beginning of the zipfile is %lu (%.8lXh).\n\n"; +static ZCONST char Far MultiPartArchive1[] = "\ + This zipfile constitutes disk %u of a multi-part archive. The central\n\ + directory starts on disk %u; %u of its entries %s contained within\n"; +static ZCONST char Far MultiPartArchive2[] = "\ + this zipfile, out of a total of %u %s. The entire central\n\ + directory is %lu (%.8lXh) bytes long, and its offset in bytes from\n"; +static ZCONST char Far MultiPartArchive3[] = "\ + the beginning of the zipfile in which it begins is %lu (%.8lXh).\n\n"; +static ZCONST char Far NoZipfileComment[] = " There is no zipfile comment.\n"; +static ZCONST char Far ZipfileCommentDesc[] = + " The zipfile comment is %u bytes long and contains the following text:\n\n"; +static ZCONST char Far ZipfileCommBegin[] = + "======================== zipfile comment begins ==========================\n"; +static ZCONST char Far ZipfileCommEnd[] = + "========================= zipfile comment ends ===========================\n"; +static ZCONST char Far ZipfileCommTrunc2[] = "\n The zipfile comment is truncated.\n"; +static ZCONST char Far ZipfileCommTruncMsg[] = + "\ncaution: zipfile comment truncated\n"; + +static ZCONST char Far CentralDirEntry[] = + "\nCentral directory entry #%d:\n---------------------------\n\n"; +static ZCONST char Far ZipfileStats[] = + "%d file%s, %lu bytes uncompressed, %lu bytes compressed: %s%d.%d%%\n"; + +/* zi_long() strings */ +static ZCONST char Far OS_FAT[] = "MS-DOS, OS/2 or NT FAT"; +static ZCONST char Far OS_Amiga[] = "Amiga"; +static ZCONST char Far OS_VMS[] = "VMS"; +static ZCONST char Far OS_Unix[] = "Unix"; +static ZCONST char Far OS_VMCMS[] = "VM/CMS"; +static ZCONST char Far OS_AtariST[] = "Atari ST"; +static ZCONST char Far OS_HPFS[] = "OS/2 or NT HPFS"; +static ZCONST char Far OS_Macintosh[] = "Macintosh HFS"; +static ZCONST char Far OS_ZSystem[] = "Z-System"; +static ZCONST char Far OS_CPM[] = "CP/M"; +static ZCONST char Far OS_TOPS20[] = "TOPS-20"; +static ZCONST char Far OS_NTFS[] = "NTFS"; +static ZCONST char Far OS_QDOS[] = "SMS/QDOS"; +static ZCONST char Far OS_Acorn[] = "Acorn RISC OS"; +static ZCONST char Far OS_MVS[] = "MVS"; +static ZCONST char Far OS_VFAT[] = "Win32 VFAT"; +static ZCONST char Far OS_BeOS[] = "BeOS"; +static ZCONST char Far OS_Tandem[] = "Tandem NSK"; + +static ZCONST char Far MthdNone[] = "none (stored)"; +static ZCONST char Far MthdShrunk[] = "shrunk"; +static ZCONST char Far MthdRedF1[] = "reduced (factor 1)"; +static ZCONST char Far MthdRedF2[] = "reduced (factor 2)"; +static ZCONST char Far MthdRedF3[] = "reduced (factor 3)"; +static ZCONST char Far MthdRedF4[] = "reduced (factor 4)"; +static ZCONST char Far MthdImplode[] = "imploded"; +static ZCONST char Far MthdToken[] = "tokenized"; +static ZCONST char Far MthdDeflate[] = "deflated"; +static ZCONST char Far MthdEnDeflate[] = "deflated (enhanced)"; +static ZCONST char Far MthdDCLImplode[] = "imploded (PK DCL)"; + +static ZCONST char Far DeflNorm[] = "normal"; +static ZCONST char Far DeflMax[] = "maximum"; +static ZCONST char Far DeflFast[] = "fast"; +static ZCONST char Far DeflSFast[] = "superfast"; + +static ZCONST char Far ExtraBytesPreceding[] = + " There are an extra %ld bytes preceding this file.\n\n"; + +static ZCONST char Far UnknownNo[] = "unknown (%d)"; + +static ZCONST char Far LocalHeaderOffset[] = + "\n offset of local header from start of archive: %lu (%.8lXh) bytes\n"; +static ZCONST char Far HostOS[] = + " file system or operating system of origin: %s\n"; +static ZCONST char Far EncodeSWVer[] = + " version of encoding software: %d.%d\n"; +static ZCONST char Far MinOSCompReq[] = + " minimum file system compatibility required: %s\n"; +static ZCONST char Far MinSWVerReq[] = + " minimum software version required to extract: %d.%d\n"; +static ZCONST char Far CompressMethod[] = + " compression method: %s\n"; +static ZCONST char Far SlideWindowSizeImplode[] = + " size of sliding dictionary (implosion): %cK\n"; +static ZCONST char Far ShannonFanoTrees[] = + " number of Shannon-Fano trees (implosion): %c\n"; +static ZCONST char Far CompressSubtype[] = + " compression sub-type (deflation): %s\n"; +static ZCONST char Far FileSecurity[] = + " file security status: %sencrypted\n"; +static ZCONST char Far ExtendedLocalHdr[] = + " extended local header: %s\n"; +static ZCONST char Far FileModDate[] = + " file last modified on (DOS date/time): %s\n"; +#ifdef USE_EF_UT_TIME + static ZCONST char Far UT_FileModDate[] = + " file last modified on (UT extra field modtime): %s %s\n"; + static ZCONST char Far LocalTime[] = "local"; +#ifndef NO_GMTIME + static ZCONST char Far GMTime[] = "UTC"; +#endif +#endif /* USE_EF_UT_TIME */ +static ZCONST char Far CRC32Value[] = + " 32-bit CRC value (hex): %.8lx\n"; +static ZCONST char Far CompressedFileSize[] = + " compressed size: %lu bytes\n"; +static ZCONST char Far UncompressedFileSize[] = + " uncompressed size: %lu bytes\n"; +static ZCONST char Far FilenameLength[] = + " length of filename: %u characters\n"; +static ZCONST char Far ExtraFieldLength[] = + " length of extra field: %u bytes\n"; +static ZCONST char Far FileCommentLength[] = + " length of file comment: %u characters\n"; +static ZCONST char Far FileDiskNum[] = + " disk number on which file begins: disk %u\n"; +static ZCONST char Far ApparentFileType[] = + " apparent file type: %s\n"; +static ZCONST char Far VMSFileAttributes[] = + " VMS file attributes (%06o octal): %s\n"; +static ZCONST char Far AmigaFileAttributes[] = + " Amiga file attributes (%06o octal): %s\n"; +static ZCONST char Far UnixFileAttributes[] = + " Unix file attributes (%06o octal): %s\n"; +static ZCONST char Far NonMSDOSFileAttributes[] = + " non-MSDOS external file attributes: %06lX hex\n"; +static ZCONST char Far MSDOSFileAttributes[] = + " MS-DOS file attributes (%02X hex): none\n"; +static ZCONST char Far MSDOSFileAttributesRO[] = + " MS-DOS file attributes (%02X hex): read-only\n"; +static ZCONST char Far MSDOSFileAttributesAlpha[] = + " MS-DOS file attributes (%02X hex): %s%s%s%s%s%s\n"; + + +static ZCONST char Far ExtraFieldTrunc[] = "\n\ + error: EF data block (type 0x%04x) size %u exceeds remaining extra field\n\ + space %u; block length has been truncated.\n"; +static ZCONST char Far ExtraFields[] = "\n\ + The central-directory extra field contains:"; +static ZCONST char Far ExtraFieldType[] = "\n\ + - A subfield with ID 0x%04x (%s) and %u data bytes"; +static ZCONST char Far efAV[] = "PKWARE AV"; +static ZCONST char Far efOS2[] = "OS/2"; +static ZCONST char Far efPKVMS[] = "PKWARE VMS"; +static ZCONST char Far efPKWin32[] = "PKWARE Win32"; +static ZCONST char Far efPKUnix[] = "PKWARE Unix"; +static ZCONST char Far efIZVMS[] = "Info-ZIP VMS"; +static ZCONST char Far efIZUnix[] = "old Info-ZIP Unix/OS2/NT"; +static ZCONST char Far efIZUnix2[] = "Unix UID/GID"; +static ZCONST char Far efTime[] = "universal time"; +static ZCONST char Far efJLMac[] = "old Info-ZIP Macintosh"; +static ZCONST char Far efMac3[] = "new Info-ZIP Macintosh"; +static ZCONST char Far efZipIt[] = "ZipIt Macintosh"; +static ZCONST char Far efZipIt2[] = "ZipIt Macintosh (short)"; +static ZCONST char Far efVMCMS[] = "VM/CMS"; +static ZCONST char Far efMVS[] = "MVS"; +static ZCONST char Far efACL[] = "OS/2 ACL"; +static ZCONST char Far efNTSD[] = "Security Descriptor"; +static ZCONST char Far efBeOS[] = "BeOS"; +static ZCONST char Far efQDOS[] = "SMS/QDOS"; +static ZCONST char Far efAOSVS[] = "AOS/VS"; +static ZCONST char Far efSpark[] = "Acorn SparkFS"; +static ZCONST char Far efMD5[] = "Fred Kantor MD5"; +static ZCONST char Far efASiUnix[] = "ASi Unix"; +static ZCONST char Far efUnknown[] = "unknown"; + +static ZCONST char Far OS2EAs[] = ".\n\ + The local extra field has %lu bytes of OS/2 extended attributes.\n\ + (May not match OS/2 \"dir\" amount due to storage method)"; +static ZCONST char Far izVMSdata[] = ". The extra\n\ + field is %s and has %lu bytes of VMS %s information%s"; +static ZCONST char Far izVMSstored[] = "stored"; +static ZCONST char Far izVMSrleenc[] = "run-length encoded"; +static ZCONST char Far izVMSdeflat[] = "deflated"; +static ZCONST char Far izVMScunknw[] = "compressed(?)"; +static ZCONST char Far *izVMScomp[4] = + {izVMSstored, izVMSrleenc, izVMSdeflat, izVMScunknw}; +static ZCONST char Far ACLdata[] = ".\n\ + The local extra field has %lu bytes of access control list information"; +static ZCONST char Far NTSDData[] = ".\n\ + The local extra field has %lu bytes of NT security descriptor data"; +static ZCONST char Far UTdata[] = ".\n\ + The local extra field has UTC/GMT %s time%s"; +static ZCONST char Far UTmodification[] = "modification"; +static ZCONST char Far UTaccess[] = "access"; +static ZCONST char Far UTcreation[] = "creation"; +static ZCONST char Far ZipItFname[] = ".\n\ + The Mac long filename is %s.\n"; +static ZCONST char Far Mac3data[] = ".\n\ + The local extra field has %lu bytes of %scompressed Macintosh\n\ + finder attributes"; + /* MacOSdata[] is used by EF_MAC3, EF_ZIPIT, EF_ZIPIT2 and EF_JLEE e. f. */ +static ZCONST char Far MacOSdata[] = ".\n\ + The associated file has type code `%c%c%c%c' and creator code `%c%c%c%c'"; +static ZCONST char Far MacOSdata1[] = ".\n\ + The associated file has type code `0x%lx' and creator code `0x%lx'"; +static ZCONST char Far MacOSJLEEflags[] = "\n File is marked as %s"; +static ZCONST char Far MacOS_RF[] = "Resource-fork"; +static ZCONST char Far MacOS_DF[] = "Data-fork"; +static ZCONST char Far MacOSMAC3flags[] = ".\n\ + File is marked as %s, File Dates are in %d Bit"; +static ZCONST char Far BeOSdata[] = ".\n\ + The local extra field has %lu bytes of %scompressed BeOS file attributes"; + /* The associated file has type code `%c%c%c%c' and creator code `%c%c%c%c'" */ +static ZCONST char Far QDOSdata[] = ".\n\ + The QDOS extra field subtype is `%c%c%c%c'"; +static ZCONST char Far AOSVSdata[] = ".\n\ + The AOS/VS extra field revision is %d.%d"; +static ZCONST char Far MD5data[] = ".\n\ + The 128-bit MD5 signature is %s"; +#ifdef CMS_MVS + static ZCONST char Far VmMvsExtraField[] = ".\n\ + The stored file open mode (FLDATA TYPE) is \"%s\""; + static ZCONST char Far VmMvsInvalid[] = "[invalid]"; +#endif /* CMS_MVS */ + +static ZCONST char Far First20[] = ". The first\n 20 are: "; +static ZCONST char Far ColonIndent[] = ":\n "; +static ZCONST char Far efFormat[] = " %02x"; + +static ZCONST char Far lExtraFieldType[] = "\n\ + There %s a local extra field with ID 0x%04x (%s) and\n\ + %u data bytes (%s).\n"; +static ZCONST char Far efIZuid[] = + "GMT modification/access times and Unix UID/GID"; +static ZCONST char Far efIZnouid[] = "GMT modification/access times only"; + + +static ZCONST char Far NoFileComment[] = "\n There is no file comment.\n"; +static ZCONST char Far FileCommBegin[] = "\n\ +------------------------- file comment begins ----------------------------\n"; +static ZCONST char Far FileCommEnd[] = "\ +-------------------------- file comment ends -----------------------------\n"; + +/* zi_time() strings */ +static ZCONST char Far BogusFmt[] = "%03d"; +static ZCONST char Far DMYHMTime[] = "%2u-%s-%02u %02u:%02u"; +static ZCONST char Far YMDHMSTime[] = "%u %s %u %02u:%02u:%02u"; +static ZCONST char Far DecimalTime[] = "%04u%02u%02u.%02u%02u%02u"; +static ZCONST char Far YMDHMSTimeError[] = "???? ??? ?? ??:??:??"; + + + + + +#ifndef WINDLL + +/************************/ +/* Function zi_opts() */ +/************************/ + +int zi_opts(__G__ pargc, pargv) + int *pargc; + char ***pargv; + __GDEF +{ + char **argv, *s; + int argc, c, error=FALSE, negative=0; + int hflag_slmv=TRUE, hflag_2=FALSE; /* diff options => diff defaults */ + int tflag_slm=TRUE, tflag_2v=FALSE; + int explicit_h=FALSE, explicit_t=FALSE; + + +#ifdef MACOS + uO.lflag = LFLAG; /* reset default on each call */ +#endif + G.extract_flag = FALSE; /* zipinfo does not extract to disk */ + argc = *pargc; + argv = *pargv; + + while (--argc > 0 && (*++argv)[0] == '-') { + s = argv[0] + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ + switch (c) { + case '-': + ++negative; + break; + case '1': /* shortest listing: JUST filenames */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 1; + break; + case '2': /* just filenames, plus headers if specified */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 2; + break; +#ifndef CMS_MVS + case ('C'): /* -C: match filenames case-insensitively */ + if (negative) + uO.C_flag = FALSE, negative = 0; + else + uO.C_flag = TRUE; + break; +#endif /* !CMS_MVS */ + case 'h': /* header line */ + if (negative) + hflag_2 = hflag_slmv = FALSE, negative = 0; + else { + hflag_2 = hflag_slmv = explicit_h = TRUE; + if (uO.lflag == -1) + uO.lflag = 0; + } + break; + case 'l': /* longer form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 5; + break; + case 'm': /* medium form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 4; + break; +#ifdef MORE + case 'M': /* send output through built-in "more" */ + if (negative) + G.M_flag = FALSE, negative = 0; + else + G.M_flag = TRUE; + break; +#endif + case 's': /* default: shorter "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 3; + break; + case 't': /* totals line */ + if (negative) + tflag_2v = tflag_slm = FALSE, negative = 0; + else { + tflag_2v = tflag_slm = explicit_t = TRUE; + if (uO.lflag == -1) + uO.lflag = 0; + } + break; + case ('T'): /* use (sortable) decimal time format */ + if (negative) + uO.T_flag = FALSE, negative = 0; + else + uO.T_flag = TRUE; + break; + case 'v': /* turbo-verbose listing */ + if (negative) + uO.lflag = -2, negative = 0; + else + uO.lflag = 10; + break; + case 'z': /* print zipfile comment */ + if (negative) + uO.zflag = negative = 0; + else + uO.zflag = 1; + break; + case 'Z': /* ZipInfo mode: ignore */ + break; + default: + error = TRUE; + break; + } + } + } + if ((argc-- == 0) || error) { + *pargc = argc; + *pargv = argv; + return USAGE(error); + } + +#ifdef MORE + if (G.M_flag && !isatty(1)) /* stdout redirected: "more" func useless */ + G.M_flag = 0; +#endif + + /* if no listing options given (or all negated), or if only -h/-t given + * with individual files specified, use default listing format */ + if ((uO.lflag < 0) || ((argc > 0) && (uO.lflag == 0))) + uO.lflag = LFLAG; + + /* set header and totals flags to default or specified values */ + switch (uO.lflag) { + case 0: /* 0: can only occur if either -t or -h explicitly given; */ + case 2: /* therefore set both flags equal to normally false value */ + uO.hflag = hflag_2; + uO.tflag = tflag_2v; + break; + case 1: /* only filenames, *always* */ + uO.hflag = FALSE; + uO.tflag = FALSE; + uO.zflag = FALSE; + break; + case 3: + case 4: + case 5: + uO.hflag = ((argc > 0) && !explicit_h)? FALSE : hflag_slmv; + uO.tflag = ((argc > 0) && !explicit_t)? FALSE : tflag_slm; + break; + case 10: + uO.hflag = hflag_slmv; + uO.tflag = tflag_2v; + break; + } + + *pargc = argc; + *pargv = argv; + return 0; + +} /* end function zi_opts() */ + +#endif /* !WINDLL */ + + + + + +/*******************************/ +/* Function zi_end_central() */ +/*******************************/ + +int zi_end_central(__G) /* return PK-type error code */ + __GDEF +{ + int error = PK_COOL; + + +/*--------------------------------------------------------------------------- + Print out various interesting things about the zipfile. + ---------------------------------------------------------------------------*/ + + /* header fits on one line, for anything up to 10GB and 10000 files: */ + if (uO.hflag) + Info(slide, 0, ((char *)slide, ((int)strlen(G.zipfn) < 39)? + LoadFarString(LongHeader) : LoadFarString(ShortHeader), G.zipfn, + (long)G.ziplen, G.ecrec.total_entries_central_dir, + (G.ecrec.total_entries_central_dir==1)? + nullStr : "s")); + + /* verbose format */ + if (uO.lflag > 9) { + Info(slide, 0, ((char *)slide, LoadFarString(EndCentDirRec))); + Info(slide, 0, ((char *)slide, LoadFarString(LineSeparators))); + + Info(slide, 0, ((char *)slide, LoadFarString(ActOffsetCentDir), + (long)G.real_ecrec_offset, (long)G.real_ecrec_offset, + (long)G.expect_ecrec_offset, (long)G.expect_ecrec_offset)); + + if (G.ecrec.number_this_disk == 0) { + Info(slide, 0, ((char *)slide, LoadFarString(SinglePartArchive1), + G.ecrec.total_entries_central_dir, + (G.ecrec.total_entries_central_dir == 1)? "entry" : "entries", + G.ecrec.size_central_directory, + G.ecrec.size_central_directory)); + Info(slide, 0, ((char *)slide, LoadFarString(SinglePartArchive2), + G.ecrec.offset_start_central_directory, + G.ecrec.offset_start_central_directory)); + } else { + Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive1), + G.ecrec.number_this_disk + 1, + G.ecrec.num_disk_start_cdir + 1, + G.ecrec.num_entries_centrl_dir_ths_disk, + (G.ecrec.num_entries_centrl_dir_ths_disk == 1)? "is" : "are")); + Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive2), + G.ecrec.total_entries_central_dir, + (G.ecrec.total_entries_central_dir == 1) ? "entry" : "entries", + G.ecrec.size_central_directory, + G.ecrec.size_central_directory)); + Info(slide, 0, ((char *)slide, LoadFarString(MultiPartArchive3), + G.ecrec.offset_start_central_directory, + G.ecrec.offset_start_central_directory)); + } + + /*----------------------------------------------------------------------- + Get the zipfile comment, if any, and print it out. (Comment may be + up to 64KB long. May the fleas of a thousand camels infest the arm- + pits of anyone who actually takes advantage of this fact.) + -----------------------------------------------------------------------*/ + + if (!G.ecrec.zipfile_comment_length) + Info(slide, 0, ((char *)slide, LoadFarString(NoZipfileComment))); + else { + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommentDesc), + G.ecrec.zipfile_comment_length)); + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommBegin))); + if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) + error = PK_WARN; + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileCommEnd))); + if (error) + Info(slide, 0, ((char *)slide, + LoadFarString(ZipfileCommTrunc2))); + } /* endif (comment exists) */ + + /* non-verbose mode: print zipfile comment only if requested */ + } else if (uO.zflag && G.ecrec.zipfile_comment_length) { + if (do_string(__G__ G.ecrec.zipfile_comment_length, DISPLAY)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(ZipfileCommTruncMsg))); + error = PK_WARN; + } + } /* endif (verbose) */ + + return error; + +} /* end function zi_end_central() */ + + + + + +/************************/ +/* Function zipinfo() */ +/************************/ + +int zipinfo(__G) /* return PK-type error code */ + __GDEF +{ + int do_this_file=FALSE, error, error_in_archive=PK_COOL; + int *fn_matched=NULL, *xn_matched=NULL; + unsigned j, members=0; + ulg tot_csize=0L, tot_ucsize=0L; + ulg endprev; /* buffers end of previous entry for zi_long()'s check + * of extra bytes */ + + +/*--------------------------------------------------------------------------- + Malloc space for check on unmatched filespecs (no big deal if one or both + are NULL). + ---------------------------------------------------------------------------*/ + + if (G.filespecs > 0 && + (fn_matched=(int *)malloc(G.filespecs*sizeof(int))) != NULL) + for (j = 0; j < G.filespecs; ++j) + fn_matched[j] = FALSE; + + if (G.xfilespecs > 0 && + (xn_matched=(int *)malloc(G.xfilespecs*sizeof(int))) != NULL) + for (j = 0; j < G.xfilespecs; ++j) + xn_matched[j] = FALSE; + +/*--------------------------------------------------------------------------- + Set file pointer to start of central directory, then loop through cen- + tral directory entries. Check that directory-entry signature bytes are + actually there (just a precaution), then process the entry. We know + the entire central directory is on this disk: we wouldn't have any of + this information unless the end-of-central-directory record was on this + disk, and we wouldn't have gotten to this routine unless this is also + the disk on which the central directory starts. In practice, this had + better be the *only* disk in the archive, but maybe someday we'll add + multi-disk support. + ---------------------------------------------------------------------------*/ + + uO.L_flag = FALSE; /* zipinfo mode: never convert name to lowercase */ + G.pInfo = G.info; /* (re-)initialize, (just to make sure) */ + G.pInfo->textmode = 0; /* so one can read on screen (is this ever used?) */ + + /* reset endprev for new zipfile; account for multi-part archives (?) */ + endprev = (G.crec.relative_offset_local_header == 4L)? 4L : 0L; + + + for (j = 0; j++ < (unsigned)G.ecrec.total_entries_central_dir;) { + if (readbuf(__G__ G.sig, 4) == 0) + return PK_EOF; + if (strncmp(G.sig, central_hdr_sig, 4)) { /* just to make sure */ + Info(slide, 0x401, ((char *)slide, LoadFarString(CentSigMsg), j)); + return PK_BADERR; /* sig not found */ + } + /* process_cdir_file_hdr() sets pInfo->hostnum, pInfo->lcflag, ...: */ + if ((error = process_cdir_file_hdr(__G)) != PK_COOL) + return error; /* only PK_EOF defined */ + + if ((error = do_string(__G__ G.crec.filename_length, DS_FN)) != + PK_COOL) + { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + + if (!G.process_all_files) { /* check if specified on command line */ + unsigned i; + + do_this_file = FALSE; + for (i = 0; i < G.filespecs; i++) + if (match(G.filename, G.pfnames[i], uO.C_flag)) { + do_this_file = TRUE; + if (fn_matched) + fn_matched[i] = TRUE; + break; /* found match, so stop looping */ + } + if (do_this_file) { /* check if this is an excluded file */ + for (i = 0; i < G.xfilespecs; i++) + if (match(G.filename, G.pxnames[i], uO.C_flag)) { + do_this_file = FALSE; /* ^-- ignore case in match */ + if (xn_matched) + xn_matched[i] = TRUE; + break; + } + } + } + + /*----------------------------------------------------------------------- + If current file was specified on command line, or if no names were + specified, do the listing for this file. Otherwise, get rid of the + file comment and go back for the next file. + -----------------------------------------------------------------------*/ + + if (G.process_all_files || do_this_file) { + + switch (uO.lflag) { + case 1: + case 2: + fnprint(__G); + SKIP_(G.crec.extra_field_length) + SKIP_(G.crec.file_comment_length) + break; + + case 3: + case 4: + case 5: + if ((error = zi_short(__G)) != PK_COOL) { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + break; + + case 10: + Info(slide, 0, ((char *)slide, + LoadFarString(CentralDirEntry), j)); + if ((error = zi_long(__G__ &endprev)) != PK_COOL) { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + break; + + default: + SKIP_(G.crec.extra_field_length) + SKIP_(G.crec.file_comment_length) + break; + + } /* end switch (lflag) */ + + tot_csize += G.crec.csize; + tot_ucsize += G.crec.ucsize; + if (G.crec.general_purpose_bit_flag & 1) + tot_csize -= 12; /* don't count encryption header */ + ++members; + +#ifdef DLL + if ((G.statreportcb != NULL) && + (*G.statreportcb)(__G__ UZ_ST_FINISH_MEMBER, G.zipfn, + G.filename, NULL)) { + if (fn_matched) + free((zvoid *)fn_matched); + if (xn_matched) + free((zvoid *)xn_matched); + return IZ_CTRLC; /* cancel operation by user request */ + } +#endif +#ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); +#endif + + } else { /* not listing this file */ + SKIP_(G.crec.extra_field_length) + SKIP_(G.crec.file_comment_length) + + } /* end if (list member?) */ + + } /* end for-loop (j: member files) */ + +/*--------------------------------------------------------------------------- + Check that we actually found requested files; if so, print totals. + ---------------------------------------------------------------------------*/ + + if (uO.tflag) { + char *sgn = ""; + int cfactor = ratio(tot_ucsize, tot_csize); + + if (cfactor < 0) { + sgn = "-"; + cfactor = -cfactor; + } + Info(slide, 0, ((char *)slide, LoadFarString(ZipfileStats), + members, (members==1)? nullStr:"s", tot_ucsize, + tot_csize, sgn, cfactor/10, cfactor%10)); + } + +/*--------------------------------------------------------------------------- + Check for unmatched filespecs on command line and print warning if any + found. + ---------------------------------------------------------------------------*/ + + if (fn_matched) { + for (j = 0; j < G.filespecs; ++j) + if (!fn_matched[j]) + Info(slide, 0x401, ((char *)slide, + LoadFarString(FilenameNotMatched), G.pfnames[j])); + free((zvoid *)fn_matched); + } + if (xn_matched) { + for (j = 0; j < G.xfilespecs; ++j) + if (!xn_matched[j]) + Info(slide, 0x401, ((char *)slide, + LoadFarString(ExclFilenameNotMatched), G.pxnames[j])); + free((zvoid *)xn_matched); + } + +/*--------------------------------------------------------------------------- + Double check that we're back at the end-of-central-directory record. + ---------------------------------------------------------------------------*/ + + if (readbuf(__G__ G.sig, 4) == 0) /* disk error? */ + return PK_EOF; + if (strncmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ + Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + if (members == 0 && error_in_archive <= PK_WARN) + error_in_archive = PK_FIND; + + if (uO.lflag >= 10) + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + + return error_in_archive; + +} /* end function zipinfo() */ + + + + + +/************************/ +/* Function zi_long() */ +/************************/ + +static int zi_long(__G__ pEndprev) /* return PK-type error code */ + __GDEF + ulg *pEndprev; /* for zi_long() check of extra bytes */ +{ +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif + int error, error_in_archive=PK_COOL; + ush hostnum, hostver, extnum, extver, methnum, xattr; + char workspace[12], attribs[22]; + ZCONST char *varmsg_str; + char unkn[16]; + static ZCONST char Far *os[NUM_HOSTS] = { + OS_FAT, OS_Amiga, OS_VMS, OS_Unix, OS_VMCMS, OS_AtariST, OS_HPFS, + OS_Macintosh, OS_ZSystem, OS_CPM, OS_TOPS20, OS_NTFS, OS_QDOS, + OS_Acorn, OS_VFAT, OS_MVS, OS_BeOS, OS_Tandem + }; + static ZCONST char Far *method[NUM_METHODS] = { + MthdNone, MthdShrunk, MthdRedF1, MthdRedF2, MthdRedF3, MthdRedF4, + MthdImplode, MthdToken, MthdDeflate, MthdEnDeflate, MthdDCLImplode + }; + static ZCONST char Far *dtypelng[4] = { + DeflNorm, DeflMax, DeflFast, DeflSFast + }; + + +/*--------------------------------------------------------------------------- + Check whether there's any extra space inside the zipfile. If *pEndprev is + zero, it's probably a signal that OS/2 extra fields are involved (with + unknown compressed size). We won't worry about prepended junk here... + ---------------------------------------------------------------------------*/ + + if (G.crec.relative_offset_local_header != *pEndprev && *pEndprev > 0L) { + /* GRR DEBUG + Info(slide, 0, ((char *)slide, + " [crec.relative_offset_local_header = %lu, endprev = %lu]\n", + G.crec.relative_offset_local_header, *pEndprev)); + */ + Info(slide, 0, ((char *)slide, LoadFarString(ExtraBytesPreceding), + (long)G.crec.relative_offset_local_header - (long)(*pEndprev))); + } + + /* calculate endprev for next time around (problem: extra fields may + * differ in length between local and central-directory records) */ + *pEndprev = G.crec.relative_offset_local_header + 4L + LREC_SIZE + + G.crec.filename_length + G.crec.extra_field_length + + G.crec.file_comment_length + G.crec.csize; + +/*--------------------------------------------------------------------------- + Read the extra field, if any. It may be used to get UNIX style modtime. + ---------------------------------------------------------------------------*/ + + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) + { + if (G.extra_field != NULL) { + free(G.extra_field); + G.extra_field = NULL; + } + error_in_archive = error; + /* The premature return in case of a "fatal" error (PK_EOF) is + * delayed until we analyze the extra field contents. + * This allows us to display all the other info that has been + * successfully read in. + */ + } + +/*--------------------------------------------------------------------------- + Print out various interesting things about the compressed file. + ---------------------------------------------------------------------------*/ + + hostnum = (ush)(G.pInfo->hostnum); + hostver = G.crec.version_made_by[0]; + extnum = (ush)MIN(G.crec.version_needed_to_extract[1], NUM_HOSTS); + extver = G.crec.version_needed_to_extract[0]; + methnum = (ush)MIN(G.crec.compression_method, NUM_METHODS); + + (*G.message)((zvoid *)&G, (uch *)" ", 2L, 0); fnprint(__G); + + Info(slide, 0, ((char *)slide, LoadFarString(LocalHeaderOffset), + G.crec.relative_offset_local_header, + G.crec.relative_offset_local_header)); + + if (hostnum >= NUM_HOSTS) { + sprintf(unkn, LoadFarString(UnknownNo), + (int)G.crec.version_made_by[1]); + varmsg_str = unkn; + } else { + varmsg_str = LoadFarStringSmall(os[hostnum]); + } + Info(slide, 0, ((char *)slide, LoadFarString(HostOS), varmsg_str)); + Info(slide, 0, ((char *)slide, LoadFarString(EncodeSWVer), hostver/10, + hostver%10)); + + if (extnum >= NUM_HOSTS) { + sprintf(unkn, LoadFarString(UnknownNo), + (int)G.crec.version_needed_to_extract[1]); + varmsg_str = unkn; + } else { + varmsg_str = LoadFarStringSmall(os[extnum]); + } + Info(slide, 0, ((char *)slide, LoadFarString(MinOSCompReq), varmsg_str)); + Info(slide, 0, ((char *)slide, LoadFarString(MinSWVerReq), extver/10, + extver%10)); + + if (methnum >= NUM_METHODS) { + sprintf(unkn, LoadFarString(UnknownNo), G.crec.compression_method); + varmsg_str = unkn; + } else { + varmsg_str = LoadFarStringSmall(method[methnum]); + } + Info(slide, 0, ((char *)slide, LoadFarString(CompressMethod), varmsg_str)); + if (methnum == IMPLODED) { + Info(slide, 0, ((char *)slide, LoadFarString(SlideWindowSizeImplode), + (G.crec.general_purpose_bit_flag & 2)? '8' : '4')); + Info(slide, 0, ((char *)slide, LoadFarString(ShannonFanoTrees), + (G.crec.general_purpose_bit_flag & 4)? '3' : '2')); + } else if (methnum == DEFLATED) { + ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); + + Info(slide, 0, ((char *)slide, LoadFarString(CompressSubtype), + LoadFarStringSmall(dtypelng[dnum]))); + } + + Info(slide, 0, ((char *)slide, LoadFarString(FileSecurity), + (G.crec.general_purpose_bit_flag & 1) ? nullStr : "not ")); + Info(slide, 0, ((char *)slide, LoadFarString(ExtendedLocalHdr), + (G.crec.general_purpose_bit_flag & 8) ? "yes" : "no")); + /* print upper 3 bits for amusement? */ + + /* For printing of date & time, a "char d_t_buf[21]" is required. + * To save stack space, we reuse the "char attribs[22]" buffer which + * is not used yet. + */ +# define d_t_buf attribs + + zi_time(__G__ &G.crec.last_mod_dos_datetime, NULL, d_t_buf); + Info(slide, 0, ((char *)slide, LoadFarString(FileModDate), d_t_buf)); +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ + d_t_buf[0] = (char)0; /* signal "show local time" */ + zi_time(__G__ &G.crec.last_mod_dos_datetime, &(z_utime.mtime), d_t_buf); + Info(slide, 0, ((char *)slide, LoadFarString(UT_FileModDate), + d_t_buf, LoadFarStringSmall(LocalTime))); +#ifndef NO_GMTIME + d_t_buf[0] = (char)1; /* signal "show UTC (GMT) time" */ + zi_time(__G__ &G.crec.last_mod_dos_datetime, &(z_utime.mtime), d_t_buf); + Info(slide, 0, ((char *)slide, LoadFarString(UT_FileModDate), + d_t_buf, LoadFarStringSmall(GMTime))); +#endif /* !NO_GMTIME */ + } +#endif /* USE_EF_UT_TIME */ + + Info(slide, 0, ((char *)slide, LoadFarString(CRC32Value), G.crec.crc32)); + Info(slide, 0, ((char *)slide, LoadFarString(CompressedFileSize), + G.crec.csize)); + Info(slide, 0, ((char *)slide, LoadFarString(UncompressedFileSize), + G.crec.ucsize)); + Info(slide, 0, ((char *)slide, LoadFarString(FilenameLength), + G.crec.filename_length)); + Info(slide, 0, ((char *)slide, LoadFarString(ExtraFieldLength), + G.crec.extra_field_length)); + Info(slide, 0, ((char *)slide, LoadFarString(FileCommentLength), + G.crec.file_comment_length)); + Info(slide, 0, ((char *)slide, LoadFarString(FileDiskNum), + G.crec.disk_number_start + 1)); + Info(slide, 0, ((char *)slide, LoadFarString(ApparentFileType), + (G.crec.internal_file_attributes & 1)? "text" + : (G.crec.internal_file_attributes & 2)? "ebcdic" + : "binary")); /* changed to accept EBCDIC */ +#ifdef ATARI + printf(" external file attributes (hex): %.8lx\n", + G.crec.external_file_attributes); +#endif + xattr = (ush)((G.crec.external_file_attributes >> 16) & 0xFFFF); + if (hostnum == VMS_) { + char *p=attribs, *q=attribs+1; + int i, j, k; + + for (k = 0; k < 12; ++k) + workspace[k] = 0; + if (xattr & VMS_IRUSR) + workspace[0] = 'R'; + if (xattr & VMS_IWUSR) { + workspace[1] = 'W'; + workspace[3] = 'D'; + } + if (xattr & VMS_IXUSR) + workspace[2] = 'E'; + if (xattr & VMS_IRGRP) + workspace[4] = 'R'; + if (xattr & VMS_IWGRP) { + workspace[5] = 'W'; + workspace[7] = 'D'; + } + if (xattr & VMS_IXGRP) + workspace[6] = 'E'; + if (xattr & VMS_IROTH) + workspace[8] = 'R'; + if (xattr & VMS_IWOTH) { + workspace[9] = 'W'; + workspace[11] = 'D'; + } + if (xattr & VMS_IXOTH) + workspace[10] = 'E'; + + *p++ = '('; + for (k = j = 0; j < 3; ++j) { /* loop over groups of permissions */ + for (i = 0; i < 4; ++i, ++k) /* loop over perms within a group */ + if (workspace[k]) + *p++ = workspace[k]; + *p++ = ','; /* group separator */ + if (j == 0) + while ((*p++ = *q++) != ',') + ; /* system, owner perms are same */ + } + *p-- = 0; + *p = ')'; /* overwrite last comma */ + Info(slide, 0, ((char *)slide, LoadFarString(VMSFileAttributes), xattr, + attribs)); + + } else if (hostnum == AMIGA_) { + switch (xattr & AMI_IFMT) { + case AMI_IFDIR: attribs[0] = 'd'; break; + case AMI_IFREG: attribs[0] = '-'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & AMI_IHIDDEN)? 'h' : '-'; + attribs[2] = (xattr & AMI_ISCRIPT)? 's' : '-'; + attribs[3] = (xattr & AMI_IPURE)? 'p' : '-'; + attribs[4] = (xattr & AMI_IARCHIVE)? 'a' : '-'; + attribs[5] = (xattr & AMI_IREAD)? 'r' : '-'; + attribs[6] = (xattr & AMI_IWRITE)? 'w' : '-'; + attribs[7] = (xattr & AMI_IEXECUTE)? 'e' : '-'; + attribs[8] = (xattr & AMI_IDELETE)? 'd' : '-'; + attribs[9] = 0; /* better dlm the string */ + Info(slide, 0, ((char *)slide, LoadFarString(AmigaFileAttributes), + xattr, attribs)); + + } else if ((hostnum != FS_FAT_) && (hostnum != FS_HPFS_) && + (hostnum != FS_NTFS_) && (hostnum != FS_VFAT_) && + (hostnum != ACORN_) && + (hostnum != VM_CMS_) && (hostnum != MVS_)) + { /* assume Unix-like */ + switch ((unsigned)(xattr & UNX_IFMT)) { + case (unsigned)UNX_IFDIR: attribs[0] = 'd'; break; + case (unsigned)UNX_IFREG: attribs[0] = '-'; break; + case (unsigned)UNX_IFLNK: attribs[0] = 'l'; break; + case (unsigned)UNX_IFBLK: attribs[0] = 'b'; break; + case (unsigned)UNX_IFCHR: attribs[0] = 'c'; break; + case (unsigned)UNX_IFIFO: attribs[0] = 'p'; break; + case (unsigned)UNX_IFSOCK: attribs[0] = 's'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & UNX_IRUSR)? 'r' : '-'; + attribs[4] = (xattr & UNX_IRGRP)? 'r' : '-'; + attribs[7] = (xattr & UNX_IROTH)? 'r' : '-'; + + attribs[2] = (xattr & UNX_IWUSR)? 'w' : '-'; + attribs[5] = (xattr & UNX_IWGRP)? 'w' : '-'; + attribs[8] = (xattr & UNX_IWOTH)? 'w' : '-'; + + if (xattr & UNX_IXUSR) + attribs[3] = (xattr & UNX_ISUID)? 's' : 'x'; + else + attribs[3] = (xattr & UNX_ISUID)? 'S' : '-'; /* S = undefined */ + if (xattr & UNX_IXGRP) + attribs[6] = (xattr & UNX_ISGID)? 's' : 'x'; /* == UNX_ENFMT */ + else + attribs[6] = (xattr & UNX_ISGID)? 'l' : '-'; + if (xattr & UNX_IXOTH) + attribs[9] = (xattr & UNX_ISVTX)? 't' : 'x'; /* "sticky bit" */ + else + attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-'; /* T = undefined */ + attribs[10] = 0; + + Info(slide, 0, ((char *)slide, LoadFarString(UnixFileAttributes), xattr, + attribs)); + + } else { + Info(slide, 0, ((char *)slide, LoadFarString(NonMSDOSFileAttributes), + G.crec.external_file_attributes >> 8)); + + } /* endif (hostnum: external attributes format) */ + + if ((xattr=(ush)(G.crec.external_file_attributes & 0xFF)) == 0) + Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributes), + xattr)); + else if (xattr == 1) + Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributesRO), + xattr)); + else + Info(slide, 0, ((char *)slide, LoadFarString(MSDOSFileAttributesAlpha), + xattr, (xattr&1)? "rdo " : nullStr, + (xattr&2)? "hid " : nullStr, + (xattr&4)? "sys " : nullStr, + (xattr&8)? "lab " : nullStr, + (xattr&16)? "dir " : nullStr, + (xattr&32)? "arc" : nullStr)); + +/*--------------------------------------------------------------------------- + Analyze the extra field, if any, and print the file comment, if any (the + filename has already been printed, above). That finishes up this file + entry... + ---------------------------------------------------------------------------*/ + + if (G.crec.extra_field_length > 0) { + uch *ef_ptr = G.extra_field; + ush ef_len = G.crec.extra_field_length; + ush eb_id, eb_datalen; + ZCONST char Far *ef_fieldname; + + if (error_in_archive > PK_WARN) /* fatal: can't continue */ + /* delayed "fatal error" return from extra field reading */ + return error; + if (G.extra_field == (uch *)NULL) + return PK_ERR; /* not consistent with crec length */ + + Info(slide, 0, ((char *)slide, LoadFarString(ExtraFields))); + + while (ef_len >= EB_HEADSIZE) { + eb_id = makeword(&ef_ptr[EB_ID]); + eb_datalen = makeword(&ef_ptr[EB_LEN]); + ef_ptr += EB_HEADSIZE; + ef_len -= EB_HEADSIZE; + + if (eb_datalen > (ush)ef_len) { + Info(slide, 0x421, ((char *)slide, + LoadFarString(ExtraFieldTrunc), eb_id, eb_datalen, ef_len)); + eb_datalen = ef_len; + } + + switch (eb_id) { + case EF_AV: + ef_fieldname = efAV; + break; + case EF_OS2: + ef_fieldname = efOS2; + break; + case EF_ACL: + ef_fieldname = efACL; + break; + case EF_NTSD: + ef_fieldname = efNTSD; + break; + case EF_PKVMS: + ef_fieldname = efPKVMS; + break; + case EF_IZVMS: + ef_fieldname = efIZVMS; + break; + case EF_PKW32: + ef_fieldname = efPKWin32; + break; + case EF_PKUNIX: + ef_fieldname = efPKUnix; + break; + case EF_IZUNIX: + ef_fieldname = efIZUnix; + if (G.crec.version_made_by[1] == UNIX_ && *pEndprev > 0L) + *pEndprev += 4L; /* also have UID/GID in local copy */ + break; + case EF_IZUNIX2: + ef_fieldname = efIZUnix2; + if (*pEndprev > 0L) + *pEndprev += 4L; /* 4 byte UID/GID in local copy */ + break; + case EF_TIME: + ef_fieldname = efTime; + break; + case EF_MAC3: + ef_fieldname = efMac3; + break; + case EF_JLMAC: + ef_fieldname = efJLMac; + break; + case EF_ZIPIT: + ef_fieldname = efZipIt; + break; + case EF_ZIPIT2: + ef_fieldname = efZipIt2; + break; + case EF_VMCMS: + ef_fieldname = efVMCMS; + break; + case EF_MVS: + ef_fieldname = efMVS; + break; + case EF_BEOS: + ef_fieldname = efBeOS; + break; + case EF_QDOS: + ef_fieldname = efQDOS; + break; + case EF_AOSVS: + ef_fieldname = efAOSVS; + break; + case EF_SPARK: /* from RISC OS */ + ef_fieldname = efSpark; + break; + case EF_MD5: + ef_fieldname = efMD5; + break; + case EF_ASIUNIX: + ef_fieldname = efASiUnix; + break; + default: + ef_fieldname = efUnknown; + break; + } + Info(slide, 0, ((char *)slide, LoadFarString(ExtraFieldType), + eb_id, LoadFarStringSmall(ef_fieldname), eb_datalen)); + + /* additional, field-specific information: */ + switch (eb_id) { + case EF_OS2: + case EF_ACL: + if (eb_datalen >= EB_OS2_HLEN) { + if (eb_id == EF_OS2) + ef_fieldname = OS2EAs; + else + ef_fieldname = ACLdata; + Info(slide, 0, ((char *)slide, + LoadFarString(ef_fieldname), makelong(ef_ptr))); + *pEndprev = 0L; /* no clue about csize of local */ + } + break; + case EF_NTSD: + if (eb_datalen >= EB_NTSD_C_LEN) { + Info(slide, 0, ((char *)slide, LoadFarString(NTSDData), + makelong(ef_ptr))); + *pEndprev = 0L; /* no clue about csize of local */ + } + break; + case EF_IZVMS: + if (eb_datalen >= 8) { + char *p, q[8]; + int compr = makeword(ef_ptr+4) & 7; + + *q = '\0'; + if (compr > 3) + compr = 3; + if (strncmp((char *)ef_ptr, "VFAB", 4) == 0) + p = "FAB"; + else if (strncmp((char *)ef_ptr, "VALL", 4) == 0) + p = "XABALL"; + else if (strncmp((char *)ef_ptr, "VFHC", 4) == 0) + p = "XABFHC"; + else if (strncmp((char *)ef_ptr, "VDAT", 4) == 0) + p = "XABDAT"; + else if (strncmp((char *)ef_ptr, "VRDT", 4) == 0) + p = "XABRDT"; + else if (strncmp((char *)ef_ptr, "VPRO", 4) == 0) + p = "XABPRO"; + else if (strncmp((char *)ef_ptr, "VKEY", 4) == 0) + p = "XABKEY"; + else if (strncmp((char *)ef_ptr, "VMSV", 4) == 0) { + p = "version"; + if (eb_datalen >= 16) { + q[0] = ' '; + q[1] = '('; + strncpy(q+2, (char *)ef_ptr+12, 4); + q[6] = ')'; + q[7] = '\0'; + } + } else + p = "version"; + Info(slide, 0, ((char *)slide, LoadFarString(izVMSdata), + LoadFarStringSmall(izVMScomp[compr]), + makeword(ef_ptr+6), p, q)); + } + break; + case EF_TIME: + if (eb_datalen >= 1) { + char types[80]; + int num = 0, len; + + *types = '\0'; + if (*ef_ptr & 1) { + strcpy(types, LoadFarString(UTmodification)); + ++num; + } + if (*ef_ptr & 2) { + len = strlen(types); + if (num) + types[len++] = '/'; + strcpy(types+len, LoadFarString(UTaccess)); + ++num; + if (*pEndprev > 0L) + *pEndprev += 4L; + } + if (*ef_ptr & 4) { + len = strlen(types); + if (num) + types[len++] = '/'; + strcpy(types+len, LoadFarString(UTcreation)); + ++num; + if (*pEndprev > 0L) + *pEndprev += 4L; + } + if (num > 0) + Info(slide, 0, ((char *)slide, + LoadFarString(UTdata), types, + num == 1? nullStr : "s")); + } + break; + case EF_MAC3: + if (eb_datalen >= EB_MAC3_HLEN) { + ulg eb_uc = makelong(ef_ptr); + unsigned mac3_flgs = makeword(ef_ptr+EB_FLGS_OFFS); + unsigned eb_is_uc = mac3_flgs & EB_M3_FL_UNCMPR; + + Info(slide, 0, ((char *)slide, LoadFarString(Mac3data), + eb_uc, eb_is_uc ? "un" : nullStr)); + if (eb_is_uc) { + if (*pEndprev > 0L) + *pEndprev += makelong(ef_ptr); + } else { + *pEndprev = 0L; /* no clue about csize of local */ + } + + Info(slide, 0, ((char *)slide, + LoadFarString(MacOSMAC3flags), + LoadFarStringSmall(mac3_flgs & EB_M3_FL_DATFRK ? + MacOS_DF : MacOS_RF), + (mac3_flgs & EB_M3_FL_TIME64 ? 64 : 32))); + zi_showMacTypeCreator(__G__ &ef_ptr[6]); + } + break; + case EF_ZIPIT2: + if (eb_datalen >= 5 && + strncmp((char *)ef_ptr, "ZPIT", 4) == 0) { + + if (eb_datalen >= 12) { + zi_showMacTypeCreator(__G__ &ef_ptr[4]); + } + } + + case EF_ZIPIT: + if (eb_datalen >= 5 && + strncmp((char *)ef_ptr, "ZPIT", 4) == 0) { + unsigned fnlen = ef_ptr[4]; + + if (eb_datalen >= fnlen + (5 + 8)) { + uch nullchar = ef_ptr[fnlen+5]; + + ef_ptr[fnlen+5] = '\0'; /* terminate filename */ + Info(slide, 0, ((char *)slide, + LoadFarString(ZipItFname), (char *)ef_ptr+5)); + ef_ptr[fnlen+5] = nullchar; + zi_showMacTypeCreator(__G__ &ef_ptr[fnlen+5]); + } + } + break; + case EF_JLMAC: + if (eb_datalen >= 40 && + strncmp((char *)ef_ptr, "JLEE", 4) == 0) + { + zi_showMacTypeCreator(__G__ &ef_ptr[4]); + + Info(slide, 0, ((char *)slide, + LoadFarString(MacOSJLEEflags), + LoadFarStringSmall(ef_ptr[31] & 1 ? + MacOS_DF : MacOS_RF))); + } + break; +#ifdef CMS_MVS + case EF_VMCMS: + case EF_MVS: + { + char type[100]; + + Info(slide, 0, ((char *)slide, + LoadFarString(VmMvsExtraField), + (getVMMVSexfield(type, ef_ptr-EB_HEADSIZE, + (unsigned)eb_datalen) > 0)? + type : LoadFarStringSmall(VmMvsInvalid))); + } + break; +#endif /* CMS_MVS */ + case EF_BEOS: + if (eb_datalen >= EB_BEOS_HLEN) { + ulg eb_uc = makelong(ef_ptr); + unsigned eb_is_uc = + *(ef_ptr+EB_FLGS_OFFS) & EB_BE_FL_UNCMPR; + + Info(slide, 0, ((char *)slide, LoadFarString(BeOSdata), + eb_uc, eb_is_uc ? "un" : nullStr)); + if (eb_is_uc) { + if (*pEndprev > 0L) + *pEndprev += makelong(ef_ptr); + } else { + *pEndprev = 0L; /* no clue about csize of local */ + } + } + break; + case EF_QDOS: + if (eb_datalen >= 4) { + Info(slide, 0, ((char *)slide, LoadFarString(QDOSdata), + ef_ptr[0], ef_ptr[1], ef_ptr[2], ef_ptr[3])); + } + break; + case EF_AOSVS: + if (eb_datalen >= 5) { + Info(slide, 0, ((char *)slide, LoadFarString(AOSVSdata), + ((int)(uch)ef_ptr[4])/10, ((int)(uch)ef_ptr[4])%10)); + } + break; + case EF_MD5: + if (eb_datalen >= 19) { + char md5[33]; + int i; + + for (i = 0; i < 16; ++i) + sprintf(&md5[i<<1], "%02x", ef_ptr[15-i]); + md5[32] = '\0'; + Info(slide, 0, ((char *)slide, LoadFarString(MD5data), + md5)); + break; + } /* else: fall through !! */ + default: + if (eb_datalen > 0) { + ush i, n; + + if (eb_datalen <= 24) { + Info(slide, 0, ((char *)slide, + LoadFarString(ColonIndent))); + n = eb_datalen; + } else { + Info(slide, 0, ((char *)slide, + LoadFarString(First20))); + n = 20; + } + for (i = 0; i < n; ++i) + Info(slide, 0, ((char *)slide, + LoadFarString(efFormat), ef_ptr[i])); + } + break; + } + (*G.message)((zvoid *)&G, (uch *)".", 1L, 0); + + ef_ptr += eb_datalen; + ef_len -= eb_datalen; + } + (*G.message)((zvoid *)&G, (uch *)"\n", 1L, 0); + } + + /* high bit == Unix/OS2/NT GMT times (mtime, atime); next bit == UID/GID */ + if ((xattr = (ush)((G.crec.external_file_attributes & 0xC000) >> 12)) & 8) + { + if (hostnum == UNIX_ || hostnum == FS_HPFS_ || hostnum == FS_NTFS_) + { + Info(slide, 0, ((char *)slide, LoadFarString(lExtraFieldType), + "is", EF_IZUNIX, LoadFarStringSmall(efIZUnix), + (unsigned)(xattr&12), (xattr&4)? efIZuid : efIZnouid)); + if (*pEndprev > 0L) + *pEndprev += (ulg)(xattr&12); + } + else if (hostnum == FS_FAT_ && !(xattr&4)) + Info(slide, 0, ((char *)slide, LoadFarString(lExtraFieldType), + "may be", EF_IZUNIX, LoadFarStringSmall(efIZUnix), 8, + efIZnouid)); + } + + if (!G.crec.file_comment_length) + Info(slide, 0, ((char *)slide, LoadFarString(NoFileComment))); + else { + Info(slide, 0, ((char *)slide, LoadFarString(FileCommBegin))); + if ((error = do_string(__G__ G.crec.file_comment_length, DISPL_8)) != + PK_COOL) + { + error_in_archive = error; /* might be warning */ + if (error > PK_WARN) /* fatal */ + return error; + } + Info(slide, 0, ((char *)slide, LoadFarString(FileCommEnd))); + } + + return error_in_archive; + +} /* end function zi_long() */ + + + + + +/*************************/ +/* Function zi_short() */ +/*************************/ + +static int zi_short(__G) /* return PK-type error code */ + __GDEF +{ +#ifdef USE_EF_UT_TIME + iztimes z_utime; + time_t *z_modtim; +#endif + int k, error, error_in_archive=PK_COOL; + ush methnum, hostnum, hostver, xattr; + char *p, workspace[12], attribs[16]; + char methbuf[5]; + static ZCONST char dtype[5]="NXFS"; /* normal, maximum, fast, superfast */ + static ZCONST char Far os[NUM_HOSTS+1][4] = { + "fat", "ami", "vms", "unx", "cms", "atr", "hpf", "mac", "zzz", + "cpm", "t20", "ntf", "qds", "aco", "vft", "mvs", "be ", "nsk", + "???" + }; + static ZCONST char Far method[NUM_METHODS+1][5] = { + "stor", "shrk", "re:1", "re:2", "re:3", "re:4", "i#:#", "tokn", + "def#", "edef", "dcli", "u###" + }; + + +/*--------------------------------------------------------------------------- + Print out various interesting things about the compressed file. + ---------------------------------------------------------------------------*/ + + methnum = (ush)MIN(G.crec.compression_method, NUM_METHODS); + hostnum = (ush)(G.pInfo->hostnum); + hostver = G.crec.version_made_by[0]; +/* + extnum = MIN(G.crec.version_needed_to_extract[1], NUM_HOSTS); + extver = G.crec.version_needed_to_extract[0]; + */ + + zfstrcpy(methbuf, method[methnum]); + if (methnum == IMPLODED) { + methbuf[1] = (char)((G.crec.general_purpose_bit_flag & 2)? '8' : '4'); + methbuf[3] = (char)((G.crec.general_purpose_bit_flag & 4)? '3' : '2'); + } else if (methnum == DEFLATED) { + ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); + methbuf[3] = dtype[dnum]; + } else if (methnum >= NUM_METHODS) { /* unknown */ + sprintf(&methbuf[1], "%03u", G.crec.compression_method); + } + + for (k = 0; k < 15; ++k) + attribs[k] = ' '; + attribs[15] = 0; + + xattr = (ush)((G.crec.external_file_attributes >> 16) & 0xFFFF); + switch (hostnum) { + case VMS_: + { int i, j; + + for (k = 0; k < 12; ++k) + workspace[k] = 0; + if (xattr & VMS_IRUSR) + workspace[0] = 'R'; + if (xattr & VMS_IWUSR) { + workspace[1] = 'W'; + workspace[3] = 'D'; + } + if (xattr & VMS_IXUSR) + workspace[2] = 'E'; + if (xattr & VMS_IRGRP) + workspace[4] = 'R'; + if (xattr & VMS_IWGRP) { + workspace[5] = 'W'; + workspace[7] = 'D'; + } + if (xattr & VMS_IXGRP) + workspace[6] = 'E'; + if (xattr & VMS_IROTH) + workspace[8] = 'R'; + if (xattr & VMS_IWOTH) { + workspace[9] = 'W'; + workspace[11] = 'D'; + } + if (xattr & VMS_IXOTH) + workspace[10] = 'E'; + + p = attribs; + for (k = j = 0; j < 3; ++j) { /* groups of permissions */ + for (i = 0; i < 4; ++i, ++k) /* perms within a group */ + if (workspace[k]) + *p++ = workspace[k]; + *p++ = ','; /* group separator */ + } + *--p = ' '; /* overwrite last comma */ + if ((p - attribs) < 12) + sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); + } + break; + + case FS_FAT_: + case FS_HPFS_: + case FS_NTFS_: + case VM_CMS_: + case FS_VFAT_: + case MVS_: + case ACORN_: + xattr = (ush)(G.crec.external_file_attributes & 0xFF); + sprintf(attribs, ".r.-... %d.%d", hostver/10, hostver%10); + attribs[2] = (xattr & 0x01)? '-' : 'w'; + attribs[5] = (xattr & 0x02)? 'h' : '-'; + attribs[6] = (xattr & 0x04)? 's' : '-'; + attribs[4] = (xattr & 0x20)? 'a' : '-'; + if (xattr & 0x10) { + attribs[0] = 'd'; + attribs[3] = 'x'; + } else + attribs[0] = '-'; + if (IS_VOLID(xattr)) + attribs[0] = 'V'; + else if ((p = strrchr(G.filename, '.')) != (char *)NULL) { + ++p; + if (STRNICMP(p, "com", 3) == 0 || STRNICMP(p, "exe", 3) == 0 || + STRNICMP(p, "btm", 3) == 0 || STRNICMP(p, "cmd", 3) == 0 || + STRNICMP(p, "bat", 3) == 0) + attribs[3] = 'x'; + } + break; + + case AMIGA_: + switch (xattr & AMI_IFMT) { + case AMI_IFDIR: attribs[0] = 'd'; break; + case AMI_IFREG: attribs[0] = '-'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & AMI_IHIDDEN)? 'h' : '-'; + attribs[2] = (xattr & AMI_ISCRIPT)? 's' : '-'; + attribs[3] = (xattr & AMI_IPURE)? 'p' : '-'; + attribs[4] = (xattr & AMI_IARCHIVE)? 'a' : '-'; + attribs[5] = (xattr & AMI_IREAD)? 'r' : '-'; + attribs[6] = (xattr & AMI_IWRITE)? 'w' : '-'; + attribs[7] = (xattr & AMI_IEXECUTE)? 'e' : '-'; + attribs[8] = (xattr & AMI_IDELETE)? 'd' : '-'; + sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); + break; + + default: /* assume Unix-like */ + switch ((unsigned)(xattr & UNX_IFMT)) { + case (unsigned)UNX_IFDIR: attribs[0] = 'd'; break; + case (unsigned)UNX_IFREG: attribs[0] = '-'; break; + case (unsigned)UNX_IFLNK: attribs[0] = 'l'; break; + case (unsigned)UNX_IFBLK: attribs[0] = 'b'; break; + case (unsigned)UNX_IFCHR: attribs[0] = 'c'; break; + case (unsigned)UNX_IFIFO: attribs[0] = 'p'; break; + case (unsigned)UNX_IFSOCK: attribs[0] = 's'; break; + default: attribs[0] = '?'; break; + } + attribs[1] = (xattr & UNX_IRUSR)? 'r' : '-'; + attribs[4] = (xattr & UNX_IRGRP)? 'r' : '-'; + attribs[7] = (xattr & UNX_IROTH)? 'r' : '-'; + attribs[2] = (xattr & UNX_IWUSR)? 'w' : '-'; + attribs[5] = (xattr & UNX_IWGRP)? 'w' : '-'; + attribs[8] = (xattr & UNX_IWOTH)? 'w' : '-'; + + if (xattr & UNX_IXUSR) + attribs[3] = (xattr & UNX_ISUID)? 's' : 'x'; + else + attribs[3] = (xattr & UNX_ISUID)? 'S' : '-'; /* S==undefined */ + if (xattr & UNX_IXGRP) + attribs[6] = (xattr & UNX_ISGID)? 's' : 'x'; /* == UNX_ENFMT */ + else + /* attribs[6] = (xattr & UNX_ISGID)? 'l' : '-'; real 4.3BSD */ + attribs[6] = (xattr & UNX_ISGID)? 'S' : '-'; /* SunOS 4.1.x */ + if (xattr & UNX_IXOTH) + attribs[9] = (xattr & UNX_ISVTX)? 't' : 'x'; /* "sticky bit" */ + else + attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-'; /* T==undefined */ + + sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); + break; + + } /* end switch (hostnum: external attributes format) */ + + Info(slide, 0, ((char *)slide, "%s %s %8lu ", attribs, + LoadFarStringSmall(os[hostnum]), G.crec.ucsize)); + Info(slide, 0, ((char *)slide, "%c", + (G.crec.general_purpose_bit_flag & 1)? + ((G.crec.internal_file_attributes & 1)? 'T' : 'B') : /* encrypted */ + ((G.crec.internal_file_attributes & 1)? 't' : 'b'))); /* plaintext */ + k = (G.crec.extra_field_length || + /* a local-only "UX" (old Unix/OS2/NT GMT times "IZUNIX") e.f.? */ + ((G.crec.external_file_attributes & 0x8000) && + (hostnum == UNIX_ || hostnum == FS_HPFS_ || hostnum == FS_NTFS_))); + Info(slide, 0, ((char *)slide, "%c", k? + ((G.crec.general_purpose_bit_flag & 8)? 'X' : 'x') : /* extra field */ + ((G.crec.general_purpose_bit_flag & 8)? 'l' : '-'))); /* no extra field */ + /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ extended local header or not */ + + if (uO.lflag == 4) { + ulg csiz = G.crec.csize; + + if (G.crec.general_purpose_bit_flag & 1) + csiz -= 12; /* if encrypted, don't count encryption header */ + Info(slide, 0, ((char *)slide, "%3d%%", + (ratio(G.crec.ucsize,csiz)+5)/10)); + } else if (uO.lflag == 5) + Info(slide, 0, ((char *)slide, " %8lu", G.crec.csize)); + + /* Read the extra field, if any. The extra field info may be used + * in the file modification time section, below. + */ + if ((error = do_string(__G__ G.crec.extra_field_length, EXTRA_FIELD)) != 0) + { + if (G.extra_field != NULL) { + free(G.extra_field); + G.extra_field = NULL; + } + error_in_archive = error; + /* We do not return prematurely in case of a "fatal" error (PK_EOF). + * This does not hurt here, because we do not need to read from the + * zipfile again before the end of this function. + */ + } + + /* For printing of date & time, a "char d_t_buf[16]" is required. + * To save stack space, we reuse the "char attribs[16]" buffer whose + * content is no longer needed. + */ +# define d_t_buf attribs +#ifdef USE_EF_UT_TIME + z_modtim = G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.crec.extra_field_length, 1, + G.crec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME) + ? &z_utime.mtime : NULL; + TIMET_TO_NATIVE(z_utime.mtime) /* NOP unless MSC 7.0 or Macintosh */ + d_t_buf[0] = (char)0; /* signal "show local time" */ +#else +# define z_modtim NULL +#endif + Info(slide, 0, ((char *)slide, " %s %s ", methbuf, + zi_time(__G__ &G.crec.last_mod_dos_datetime, z_modtim, d_t_buf))); + fnprint(__G); + +/*--------------------------------------------------------------------------- + Skip the file comment, if any (the filename has already been printed, + above). That finishes up this file entry... + ---------------------------------------------------------------------------*/ + + SKIP_(G.crec.file_comment_length) + + return error_in_archive; + +} /* end function zi_short() */ + + + + + +/**************************************/ +/* Function zi_showMacTypeCreator() */ +/**************************************/ + +static void zi_showMacTypeCreator(__G__ ebfield) + __GDEF + uch *ebfield; +{ + /* not every Type / Creator character is printable */ + if (isprint(ebfield[0]) && isprint(ebfield[1]) && + isprint(ebfield[2]) && isprint(ebfield[3]) && + isprint(ebfield[4]) && isprint(ebfield[5]) && + isprint(ebfield[6]) && isprint(ebfield[7])) { + Info(slide, 0, ((char *)slide, LoadFarString(MacOSdata), + ebfield[0], ebfield[1], ebfield[2], ebfield[3], + ebfield[4], ebfield[5], ebfield[6], ebfield[7])); + } else { + Info(slide, 0, ((char *)slide, LoadFarString(MacOSdata1), + (((ulg)ebfield[0]) << 24) + + (((ulg)ebfield[1]) << 16) + + (((ulg)ebfield[2]) << 8) + + ((ulg)ebfield[3]), + (((ulg)ebfield[4]) << 24) + + (((ulg)ebfield[5]) << 16) + + (((ulg)ebfield[6]) << 8) + + ((ulg)ebfield[7]))); + } +} /* end function zi_showMacTypeCreator() */ + + + + + +/************************/ +/* Function zi_time() */ +/************************/ + +static char *zi_time(__G__ datetimez, modtimez, d_t_str) + __GDEF + ZCONST ulg *datetimez; + ZCONST time_t *modtimez; + char *d_t_str; +{ + unsigned yr, mo, dy, hh, mm, ss; + char monthbuf[4]; + ZCONST char *monthstr; + static ZCONST char Far month[12][4] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; +#ifdef USE_EF_UT_TIME + struct tm *t; +#endif + + + +/*--------------------------------------------------------------------------- + Convert the file-modification date and time info to a string of the form + "1991 Feb 23 17:15:00", "23-Feb-91 17:15" or "19910223.171500", depending + on values of lflag and T_flag. If using Unix-time extra fields, convert + to local time or not, depending on value of first character in d_t_str[]. + ---------------------------------------------------------------------------*/ + +#ifdef USE_EF_UT_TIME + if (modtimez != NULL) { +#ifndef NO_GMTIME + /* check for our secret message from above... */ + t = (d_t_str[0] == (char)1)? gmtime(modtimez) : localtime(modtimez); +#else + t = localtime(modtimez); +#endif + if (uO.lflag > 9 && t == (struct tm *)NULL) + /* time conversion error in verbose listing format, + * return string with '?' instead of data + */ + return (strcpy(d_t_str, LoadFarString(YMDHMSTimeError))); + } else + t = (struct tm *)NULL; + if (t != (struct tm *)NULL) { + mo = (unsigned)(t->tm_mon + 1); + dy = (unsigned)(t->tm_mday); + yr = (unsigned)(t->tm_year); + + hh = (unsigned)(t->tm_hour); + mm = (unsigned)(t->tm_min); + ss = (unsigned)(t->tm_sec); + } else +#endif /* USE_EF_UT_TIME */ + { + yr = ((unsigned)(*datetimez >> 25) & 0x7f) + 80; + mo = ((unsigned)(*datetimez >> 21) & 0x0f); + dy = ((unsigned)(*datetimez >> 16) & 0x1f); + + hh = (((unsigned)*datetimez >> 11) & 0x1f); + mm = (((unsigned)*datetimez >> 5) & 0x3f); + ss = (((unsigned)*datetimez << 1) & 0x3e); + } + + if (mo == 0 || mo > 12) { + sprintf(monthbuf, LoadFarString(BogusFmt), mo); + monthstr = monthbuf; + } else + monthstr = LoadFarStringSmall(month[mo-1]); + + if (uO.lflag > 9) /* verbose listing format */ + sprintf(d_t_str, LoadFarString(YMDHMSTime), yr+1900, monthstr, dy, hh, + mm, ss); + else if (uO.T_flag) + sprintf(d_t_str, LoadFarString(DecimalTime), yr+1900, mo, dy, hh, mm, + ss); + else /* was: if ((uO.lflag >= 3) && (uO.lflag <= 5)) */ + sprintf(d_t_str, LoadFarString(DMYHMTime), dy, monthstr, yr%100, hh, + mm); + + return d_t_str; + +} /* end function zi_time() */ + +#endif /* !NO_ZIPINFO */ diff --git a/utils/Install/wxmain.cpp b/utils/Install/wxmain.cpp new file mode 100644 index 0000000000..39cbad18ce --- /dev/null +++ b/utils/Install/wxmain.cpp @@ -0,0 +1,316 @@ +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#include "wx/resource.h" +#include "install.h" +#include "instsup.h" + +#include + +#if !defined(__EMX__) && !defined(__OS2__) && !defined(WIN32) && !defined(WINNT) +#define stricmp strcasecmp +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +extern char installdir[]; + +#ifdef __cplusplus +} +#endif + +typedef struct _wxCommands { + int id; + char file[50]; +} wxCommands; + +#define COMMANDMAX 20 + +wxCommands wxcommands[COMMANDMAX]; +char finishedscript[256] = ""; +char percentname[256] = ""; + +class MyApp: public wxApp +{ +public: + MyApp(); + + virtual bool OnInit(); + + virtual ~MyApp(); +}; + +class MyDialog : public wxDialog +{ +public: + void handle_button(wxCommandEvent& event); +}; + +class MyThread : public wxThread +{ +public: + virtual void *Entry(); +}; + +void *MyThread::Entry() +{ + install_thread(NULL); + return NULL; +} + +MyDialog *dialog = NULL; + +IMPLEMENT_APP(MyApp) + +MyApp::MyApp() +{ +} + +wxCondition *InstCond = NULL; + +void updatepercent(void) +{ + wxGauge *tmp = (wxGauge *)wxFindWindowByName(percentname, dialog); + + if(tmp) + { + unsigned long sliderpos; + int pixels = 100; + extern int current_file, files; + + sliderpos = (unsigned long)(((float)(current_file)/(float)files)*pixels); + tmp->SetValue(sliderpos); + } +} + +int parse_ini(char *filename) +{ + FILE *f; + int b; + + for(b=0;bLoadFromResource(NULL, "dialog1"); + dialog->Show(TRUE); + + /*MyApp::SetTopWindow(dialog);*/ + } + else if(stricmp(entry, "closeold") == 0) + { + if(dialog) + dialog->Destroy(); + dialog = NULL; + } + else if(stricmp(entry, "getcheck") == 0) + { + wxCheckBox *tmp = (wxCheckBox *)wxFindWindowByName(entrydata, dialog); + + if(tmp) + { + if(!tmp->GetValue()) + { + parse_ini(entrydata2); + bytesread = 0; + } + } + } + else if(stricmp(entry, "gettext") == 0) + { + wxTextCtrl *tmp = (wxTextCtrl *)wxFindWindowByName(entrydata, dialog); + wxString bleah; + + if(tmp) + { + if((bleah = tmp->GetValue())) + strcpy(installdir, bleah); + } + } + else if(stricmp(entry, "settext") == 0) + { + wxTextCtrl *tmp = (wxTextCtrl *)wxFindWindowByName(entrydata, dialog); + + if(tmp) + tmp->SetValue(installdir); + } + else if(stricmp(entry, "message") == 0) + mesg(entrydata); + else if(stricmp(entry, "disable") == 0) + { + wxButton *tmp = (wxButton *)wxFindWindowByName(entrydata, dialog); + if(tmp) + tmp->Disable(); + } + else if(stricmp(entry, "grabfile") == 0) + grabfile(entrydata); + else if(stricmp(entry, "remove") == 0) + remove(entrydata); + else if(stricmp(entry, "system") == 0) + wxExecute(entrydata); + else if(stricmp(entry, "startinst") == 0) + { + strcpy(percentname, entrydata); + strcpy(finishedscript, entrydata2); + + /* I couldn't get it working with threads, even when + using conditions it blocked the message loop making + it unreadable, so I am going with wxYield for the + moment. */ +#if 0 + MyThread *thread = new MyThread(); + + if ( thread->Create() != wxTHREAD_NO_ERROR ) + { + error("Can't create thread!"); + } + strcpy(finishedscript, entrydata); + + InstCond = new wxCondition(); + + thread->Run(); + + wxMutex *test = new wxMutex(); + + InstCond->Wait(*test); +#endif + install_thread(NULL); + create_wps_objects(); + parse_ini(finishedscript); + } + else if(stricmp(entry, "mleview") == 0) + { + FILE *f; + unsigned long bytes; + char buffer[1025]; + wxTextCtrl *tmp = (wxTextCtrl *)wxFindWindowByName(entrydata, dialog); + + if(tmp) + { + grabfile(entrydata2); + + if((f = fopen(entrydata2, "rb"))!= NULL) + { + while(!feof(f)) + { + memset(buffer, 0, 1025); + bytes = fread(buffer, 1, 1024, f); + *tmp << buffer; + } + fclose(f); + } + remove(entrydata2); + tmp->ShowPosition(0); + } + + } + else if(stricmp(entry, "setbutton") == 0) + { + for(b=0;bConnect( atol(entrydata), -1, wxEVT_COMMAND_BUTTON_CLICKED, + (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) + &MyDialog::handle_button); + + } + } + fclose(f); + remove(filename); + return TRUE; + } + remove(filename); + return FALSE; +} + +void MyDialog::handle_button(wxCommandEvent& event ) +{ + int b; + + for(b=0;bfj;(a}CV`%O8V#mmmJDyQBv OnOUrUdY)b7H68$h?f`fI literal 225 zcmV<703QEGNk%v~VLt#E0Pz3-zrVld=jU&4Z(9HWEC2ui06zd20008IjE||y?GK}z zNf>~$-n{z{YJwGn=81mem9{RpmcUHc_KoNIPRH~B4DyD9p%LJl6@Sa4^Epcbno6kk zD5XxT&EQg7>t<(Iwfoo diff --git a/utils/dialoged/docs/body.tex b/utils/dialoged/docs/body.tex index c88202c1ac..db941abadf 100644 --- a/utils/dialoged/docs/body.tex +++ b/utils/dialoged/docs/body.tex @@ -41,12 +41,15 @@ all dialogs in a particular directory. \subsection{File menu} \begin{twocollist}\itemsep=0pt -\twocolitem{New dialog}{Creates a new dialog resource.} -\twocolitem{New project}{Creates a new project (clears index and resets project name).} -\twocolitem{Open}{Opens an existing resource file.} +\twocolitem{New Dialog}{Creates a new dialog resource.} +\twocolitem{New Project}{Creates a new project (clears index and resets project name).} +\twocolitem{Open...}{Opens an existing resource file.} \twocolitem{Save}{Saves the current resources.} \twocolitem{Save As...}{Saves the current resources in a named file.} \twocolitem{Clear}{Clears the current resources.} +\twocolitem{Convert Old Resources...}{Takes a directory of wxWindows 1.68 dialog resources, +and converts them to wxWindows 2 resources, in a separate directory. See +\helpref{Converting old files}{convertingoldfiles}.} \twocolitem{Exit}{Exits the program.} \end{twocollist} @@ -63,7 +66,7 @@ item.} \subsection{Help menu} \begin{twocollist}\itemsep=0pt -\twocolitem{Help topics}{Displays on-line help at the contents page.} +\twocolitem{Help Topics}{Displays on-line help at the contents page.} \twocolitem{About}{Displays an dialog showing the Dialog Editor version and author.} \end{twocollist} @@ -76,15 +79,21 @@ The command toolbar consists of the following tools: \twocolitem{\icon{new.eps}{New}}{Clears the project.} \twocolitem{\icon{open.eps}{Open}}{Opens an existing resource file.} \twocolitem{\icon{save.eps}{Save}}{Saves the current resources.} -\twocolitem{\icon{vert.eps}{Horizontal align}}{Aligns the centre of the selected items horizontally.} -\twocolitem{\icon{alignt.eps}{Horizontal top-align}}{Aligns the top sides of the selected items horizontally.} -\twocolitem{\icon{alignb.eps}{Horizontal bottom-align}}{Aligns the bottom sides of the selected items horizontally.} -\twocolitem{\icon{horiz.eps}{Vertical align}}{Aligns the centre of the selected items vertically.} -\twocolitem{\icon{alignl.eps}{Vertical left-align}}{Aligns the left sides of the selected items vertically.} -\twocolitem{\icon{alignr.eps}{Vertical right-align}}{Aligns the right sides of the selected items vertically.} -\twocolitem{\icon{copysize.eps}{Copy size}}{Copies the size of the first selected item to the subsequently selected item(s).} -\twocolitem{\icon{tofront.eps}{To front}}{Puts the selected item(s) to the front of the display list.} -\twocolitem{\icon{toback.eps}{To back}}{Puts the selected item(s) to the back of the display list.} +\twocolitem{\icon{vert.eps}{Horizontal align}}{Aligns the centre of the selected controls horizontally.} +\twocolitem{\icon{alignt.eps}{Horizontal top-align}}{Aligns the top sides of the selected controls horizontally.} +\twocolitem{\icon{alignb.eps}{Horizontal bottom-align}}{Aligns the bottom sides of the selected controls horizontally.} +\twocolitem{\icon{horiz.eps}{Vertical align}}{Aligns the centre of the selected controls vertically.} +\twocolitem{\icon{alignl.eps}{Vertical left-align}}{Aligns the left sides of the selected controls vertically.} +\twocolitem{\icon{alignr.eps}{Vertical right-align}}{Aligns the right sides of the selected controls vertically.} +\twocolitem{\icon{copysize.eps}{Copy size}}{Copies the size of the first selected control to the subsequently selected control(s).} +\twocolitem{\icon{copywdth.eps}{Copy width}}{Copies the width of the first selected control to the subsequently selected control(s).} +\twocolitem{\icon{copyhght.eps}{Copy height}}{Copies the height of the first selected control to the subsequently selected control(s).} +\twocolitem{\icon{disthor.eps}{Distribute horizontally}}{Evenly distributes the space between the selected controls, horizontally. Note that the controls +should be selected in order from left to right.} +\twocolitem{\icon{distvert.eps}{Distribute vertically}}{Evenly distributes the space between the selected controls, vertically. Note that the controls +should be selected in order from top to bottom.} +\twocolitem{\icon{tofront.eps}{To front}}{Puts the selected control(s) to the front of the display list.} +\twocolitem{\icon{toback.eps}{To back}}{Puts the selected control(s) to the back of the display list.} \twocolitem{\icon{help.eps}{Help}}{Invokes Dialog Editor help.} \end{twocollist} @@ -198,3 +207,28 @@ resource files for different platforms, with spacing modified to suit each environment. The best thing is to try your dialog resource on several platforms and see whether tweaking is required for some platforms. +\section{Converting old files}\label{convertingoldfiles} + +Dialog Editor can make an attempt at converting dialog resources created with Dialog Editor for wxWindows 1.68. +The command is {\bf Convert Old Resources...} on the {\bf File} menu. + +You need to specify two directories, an input and an output directory. Dialog Editor will +do the following conversions: + +\begin{enumerate}\itemsep=0pt +\item wxMultiText becomes a wxTextCtrl with wxTE\_MULTILINE style. +\item wxText becomes a wxTextCtrl. +\item wxMessage becomes either a wxStaticText or wxStaticBitmap. +\item wxButton becomes a wxBitmapButton if necessary. +\item wxGroupBox becomes wxStaticBox. +\item Controls that no longer have labels, such as wxTextCtrl and wxListBox, +have a separate wxStaticText control created for them at approximately the correct +position. The label's window name becomes ControlName_Label where ControlName is +the name of the control that formerly had the label. +\item Identifiers are allocated. +\item Font sizes are reduced to counter the decreased font size now created by wxWindows +for a given point size. +\item The dialog height is reduced slightly to compensate for the fact that the dialog caption +is no longer included in the size. +\end{enumerate} + diff --git a/utils/dialoged/docs/changes.tex b/utils/dialoged/docs/changes.tex index fbe44245ff..b091a6f5a1 100644 --- a/utils/dialoged/docs/changes.tex +++ b/utils/dialoged/docs/changes.tex @@ -2,6 +2,15 @@ \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setfooter{\thepage}{}{}{}{}{\thepage}% +April 22nd, 2000 Version 2.1 + +\begin{itemize}\itemsep=0pt +\item Various bug fixes. +\item Added buttons for distributing space horizontally and vertically, and +for copying width and height independently. +\item Added 'Convert old resources' facility. +\end{itemize} + December 31st 1998, Version 2.0 \begin{itemize}\itemsep=0pt diff --git a/utils/dialoged/docs/contents.gif b/utils/dialoged/docs/contents.gif index 3dddfa3dd5f0c652e8b27cd6c29e1fdd49ced5a8..27b90fa28e4eea638b6e3e60fb98268609137a53 100644 GIT binary patch literal 821 zcmZ?wbhEHbbYM_m_|5kxA zV8N1xh6Z3tW&ovR5CxG0Pz3-zrVld=jU&4Z(9HWEC2ui06_p40008OjE||y?GK}z zO&EZ)-n{z{a)K3v=81;mmA0S4Fj_r^UyThZDG{h6k9m zHI_(7spd!5_$SH6m{1neLJC=LW*CWs5-7l8QOyEhc<-c33U(+@TbVjj$VkR1MENvhJx~PcJAG~H{hco>I&FF8i6E<`e4=p0Ioenp#T5? literal 0 HcmV?d00001 diff --git a/utils/dialoged/docs/copywdth.gif b/utils/dialoged/docs/copywdth.gif new file mode 100644 index 0000000000000000000000000000000000000000..76642631bea00872fa19eae9ce3750582753ed86 GIT binary patch literal 127 zcmZ?wbhEHb6ky1qBS{4D3LnU_&`KJCL9{4K*KT9{^AUNBsZ* literal 0 HcmV?d00001 diff --git a/utils/dialoged/docs/disthor.gif b/utils/dialoged/docs/disthor.gif new file mode 100644 index 0000000000000000000000000000000000000000..70fbbf96b255994ad607cebbb115b63f9f27150e GIT binary patch literal 123 zcmZ?wbhEHb6ky1qDEHAYd=p4F>EmK1?1)!^A072LP#ZK*#_9 literal 0 HcmV?d00001 diff --git a/utils/dialoged/docs/distvert.gif b/utils/dialoged/docs/distvert.gif new file mode 100644 index 0000000000000000000000000000000000000000..81cdd9486fc30ee8a97e5abc784d9ae5b007e0f9 GIT binary patch literal 113 zcmZ?wbhEHb6ky6}0ST>xYUhPqXeDpFLaP^Gf}W3KN4h02DwiiU0rr literal 0 HcmV?d00001 diff --git a/utils/dialoged/docs/forward.gif b/utils/dialoged/docs/forward.gif index 9c8421838a9822c3bcc3d5b9a40732a72647b558..f1379c14d361b2d7f64ca5e592bda4af94f147a8 100644 GIT binary patch literal 877 zcmZ?wbhEHbbYM_m_|59_k^7`NQ&{w!+r zf%KU9zk~i;0ZD#X^N5AuKea*5ueKt+`*Q6=#S#sWkN~ N6xIITmGWvyEC7LnF*yJL diff --git a/utils/dialoged/docs/tex2rtf.ini b/utils/dialoged/docs/tex2rtf.ini index 8d897c9c63..fae9a56f09 100644 --- a/utils/dialoged/docs/tex2rtf.ini +++ b/utils/dialoged/docs/tex2rtf.ini @@ -14,6 +14,11 @@ htmlBrowseButtons = bitmap winHelpVersion = 3 winHelpContents = yes winHelpTitle = "Dialog Editor Manual" +;; +;; These two are for generating MS HTML Help project, contents and index files. +;; +htmlWorkshopFiles = true +htmlIndex = true truncateFilenames = yes \overview [2] { \sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}} \htmlonly{\image{}{books.gif}}\helpref{#1}{#2} diff --git a/utils/dialoged/docs/up.gif b/utils/dialoged/docs/up.gif index f9e7031e64cf9bd17eac8190eefce2526d90a052..870c89e80a826e3b225cc8fe9a30edf9c5a66c22 100644 GIT binary patch literal 998 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7p%TfE +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=DialogEdVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DialogEdVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DialogEdVC.mak" CFG="DialogEdVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DialogEdVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "DialogEdVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "DialogEdVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "DialogEdVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dialoged.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dialoged.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dialoged.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dialoged.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "DialogEdVC - Win32 Release" +# Name "DialogEdVC - Win32 Debug" +# Name "DialogEdVC - Win32 Debug DLL" +# Name "DialogEdVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\dialoged.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dialoged.h +# End Source File +# Begin Source File + +SOURCE=.\dialoged.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\dlghndlr.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dlghndlr.h +# End Source File +# Begin Source File + +SOURCE=.\edlist.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\edlist.h +# End Source File +# Begin Source File + +SOURCE=.\edtree.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\edtree.h +# End Source File +# Begin Source File + +SOURCE=.\reseditr.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\reseditr.h +# End Source File +# Begin Source File + +SOURCE=.\reswrite.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\symbtabl.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\symbtabl.h +# End Source File +# Begin Source File + +SOURCE=.\winprop.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\winprop.h +# End Source File +# Begin Source File + +SOURCE=.\winstyle.cpp + +!IF "$(CFG)" == "DialogEdVC - Win32 Release" + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "DialogEdVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\winstyle.h +# End Source File +# End Target +# End Project diff --git a/utils/dialoged/src/DialogEdVC.dsw b/utils/dialoged/src/DialogEdVC.dsw new file mode 100644 index 0000000000..38e0a15fe3 --- /dev/null +++ b/utils/dialoged/src/DialogEdVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DialogEdVC"=.\DialogEdVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/utils/dialoged/src/bitmaps/copyhght.bmp b/utils/dialoged/src/bitmaps/copyhght.bmp new file mode 100644 index 0000000000000000000000000000000000000000..9ee3fd18071dfacb139d15f34afd530fdf879332 GIT binary patch literal 238 zcmZ?rea8R+Wk5;;hy{R{ABY(lSb!u0Lj{<`M(k%`03wF{`ymvN1Tq;895}$x(9i&s z_zy-5|NnznKn#Q+As|r>1neLJC=LW*CWs5-7l8QOyEhc<-c33U(+@TbVjj$VkR1MENvhJx~PcJAG~H{hco>I&FF8i6E<`e4=p0Ioenp#T5? literal 0 HcmV?d00001 diff --git a/utils/dialoged/src/bitmaps/copywdth.xpm b/utils/dialoged/src/bitmaps/copywdth.xpm new file mode 100644 index 0000000000..9e0c0aa73f --- /dev/null +++ b/utils/dialoged/src/bitmaps/copywdth.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * copywdth_xpm[] = { +"16 15 3 1", +" c #c0c0c0", +". c Black", +"X c Yellow", +" ", +" . ........ . ", +" . .XXXXXX. . ", +" . .XXXXXX. . ", +" . .XXXXXX. . ", +" . .XXXXXX. . ", +" . ........ . ", +" .. .. ", +" . ........ . ", +" . .XXXXXX. . ", +" . .XXXXXX. . ", +" . .XXXXXX. . ", +" . .XXXXXX. . ", +" . ........ . ", +" "}; diff --git a/utils/dialoged/src/bitmaps/disthor.bmp b/utils/dialoged/src/bitmaps/disthor.bmp new file mode 100644 index 0000000000000000000000000000000000000000..dcd3c8fde862b6e38396ab0241b76321100b18a5 GIT binary patch literal 238 zcmZ?rea8R+Wk5;;hy{R{ABY(lSb!u0Lj{<`M(k%`03wF{`ymvN1Tq;895}$x(9i&s p_zy-5|NnznKn#Q+As|r>1qBS{4D3LnU_&`KJCL9{4K*KT9{^AUNBsZ* literal 0 HcmV?d00001 diff --git a/utils/dialoged/src/bitmaps/disthor.xpm b/utils/dialoged/src/bitmaps/disthor.xpm new file mode 100644 index 0000000000..befa8fd0dd --- /dev/null +++ b/utils/dialoged/src/bitmaps/disthor.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * disthor_xpm[] = { +"16 15 3 1", +" c #c0c0c0", +". c Black", +"X c Yellow", +" ", +" ... ... ... ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" ... ... ... ", +" "}; diff --git a/utils/dialoged/src/bitmaps/distvert.bmp b/utils/dialoged/src/bitmaps/distvert.bmp new file mode 100644 index 0000000000000000000000000000000000000000..9f50a39dd2a9819885333fd17853991c0695c29e GIT binary patch literal 238 zcmZ?rea8R+Wk5;;hy{R{ABY(lSb!u0Lj{<`M(k%`03wF{`ymvN1Tq;895}$x(9i&s p_zy-5|NnznKn#Q+As|r>1qDEHAYd=p4F>EmK1?1)!^A072LP#ZK*#_9 literal 0 HcmV?d00001 diff --git a/utils/dialoged/src/bitmaps/distvert.xpm b/utils/dialoged/src/bitmaps/distvert.xpm new file mode 100644 index 0000000000..d6c39e40d7 --- /dev/null +++ b/utils/dialoged/src/bitmaps/distvert.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * distvert_xpm[] = { +"16 15 3 1", +" c #c0c0c0", +". c Black", +"X c Yellow", +" ", +" .............. ", +" .XXXXXXXXXXXX. ", +" .............. ", +" ", +" ", +" .............. ", +" .XXXXXXXXXXXX. ", +" .............. ", +" ", +" ", +" .............. ", +" .XXXXXXXXXXXX. ", +" .............. ", +" "}; diff --git a/utils/dialoged/src/dialoged.cpp b/utils/dialoged/src/dialoged.cpp index 776852971d..d59b19d8f1 100644 --- a/utils/dialoged/src/dialoged.cpp +++ b/utils/dialoged/src/dialoged.cpp @@ -28,8 +28,8 @@ IMPLEMENT_APP(MyApp) BEGIN_EVENT_TABLE(MyApp, wxApp) - EVT_MENU(OBJECT_MENU_EDIT, MyApp::OnObjectPopupMenu) - EVT_MENU(OBJECT_MENU_DELETE, MyApp::OnObjectPopupMenu) +EVT_MENU(OBJECT_MENU_EDIT, MyApp::OnObjectPopupMenu) +EVT_MENU(OBJECT_MENU_DELETE, MyApp::OnObjectPopupMenu) END_EVENT_TABLE() MyApp::MyApp(void) @@ -44,14 +44,14 @@ bool MyApp::OnInit(void) { theResourceManager = new wxResourceManager; theResourceManager->Initialize(); - + theResourceManager->ShowResourceEditor(TRUE); - + if (argc > 1) theResourceManager->Load(argv[1]); - + SetTopWindow(theResourceManager->GetEditorFrame()); - + return TRUE; } diff --git a/utils/dialoged/src/dialoged.h b/utils/dialoged/src/dialoged.h index 72abac89c1..458733bc17 100644 --- a/utils/dialoged/src/dialoged.h +++ b/utils/dialoged/src/dialoged.h @@ -26,16 +26,16 @@ class MyChild; // Define a new application class MyApp: public wxApp { - public: +public: MyApp(void); bool OnInit(void); int OnExit(void); - + void OnObjectPopupMenu(wxCommandEvent& event) { ObjectMenuProc((wxMenu *)event.GetEventObject(), event); } - + private: DECLARE_EVENT_TABLE() }; diff --git a/utils/dialoged/src/dialoged.rc b/utils/dialoged/src/dialoged.rc index e931061123..693b33821c 100644 --- a/utils/dialoged/src/dialoged.rc +++ b/utils/dialoged/src/dialoged.rc @@ -57,6 +57,10 @@ HELPTOOL BITMAP "bitmaps/help.bmp" COPYSIZETOOL BITMAP "bitmaps/copysize.bmp" TOFRONTTOOL BITMAP "bitmaps/tofront.bmp" TOBACKTOOL BITMAP "bitmaps/toback.bmp" +COPYWIDTHTOOL BITMAP "bitmaps/copywdth.bmp" +COPYHEIGHTTOOL BITMAP "bitmaps/copyhght.bmp" +DISTHORIZTOOL BITMAP "bitmaps/disthor.bmp" +DISTVERTTOOL BITMAP "bitmaps/distvert.bmp" WXWINBMP BITMAP "bitmaps/wxwin.bmp" diff --git a/utils/dialoged/src/dlghndlr.cpp b/utils/dialoged/src/dlghndlr.cpp index 721af4b4b0..e6760ed49e 100644 --- a/utils/dialoged/src/dlghndlr.cpp +++ b/utils/dialoged/src/dlghndlr.cpp @@ -38,38 +38,38 @@ IMPLEMENT_CLASS(wxResourceEditorDialogHandler, wxEvtHandler) IMPLEMENT_CLASS(wxResourceEditorControlHandler, wxEvtHandler) BEGIN_EVENT_TABLE(wxResourceEditorDialogHandler, wxEvtHandler) - EVT_PAINT(wxResourceEditorDialogHandler::OnPaint) - EVT_MOUSE_EVENTS(wxResourceEditorDialogHandler::OnMouseEvent) - EVT_SIZE(wxResourceEditorDialogHandler::OnSize) +EVT_PAINT(wxResourceEditorDialogHandler::OnPaint) +EVT_MOUSE_EVENTS(wxResourceEditorDialogHandler::OnMouseEvent) +EVT_SIZE(wxResourceEditorDialogHandler::OnSize) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxResourceEditorControlHandler, wxEvtHandler) - EVT_MOUSE_EVENTS(wxResourceEditorControlHandler::OnMouseEvent) +EVT_MOUSE_EVENTS(wxResourceEditorControlHandler::OnMouseEvent) END_EVENT_TABLE() /* - * Dialog box event handler - */ +* Dialog box event handler +*/ wxResourceEditorDialogHandler::wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource, - wxEvtHandler *oldHandler, wxResourceManager *manager) + wxEvtHandler *oldHandler, wxResourceManager *manager) { - handlerDialog = dialog; - handlerResource = resource; - handlerOldHandler = oldHandler; - resourceManager = manager; - - dragMode = wxDRAG_MODE_NONE; - dragType = wxDRAG_TYPE_NONE; - dragItem = NULL; - firstDragX = 0; - firstDragY = 0; - oldDragX = 0; - oldDragY = 0; - dragTolerance = 3; - checkTolerance = TRUE; - m_mouseCaptured = FALSE; -// m_treeItem = 0; + handlerDialog = dialog; + handlerResource = resource; + handlerOldHandler = oldHandler; + resourceManager = manager; + + dragMode = wxDRAG_MODE_NONE; + dragType = wxDRAG_TYPE_NONE; + dragItem = NULL; + firstDragX = 0; + firstDragY = 0; + oldDragX = 0; + oldDragY = 0; + dragTolerance = 3; + checkTolerance = TRUE; + m_mouseCaptured = FALSE; + // m_treeItem = 0; } wxResourceEditorDialogHandler::~wxResourceEditorDialogHandler(void) @@ -78,227 +78,227 @@ wxResourceEditorDialogHandler::~wxResourceEditorDialogHandler(void) void wxResourceEditorDialogHandler::OnItemSelect(wxControl *item, bool select) { - if (select) - resourceManager->AddSelection(item); - else - resourceManager->RemoveSelection(item); + if (select) + resourceManager->AddSelection(item); + else + resourceManager->RemoveSelection(item); } void wxResourceEditorDialogHandler::OnPaint(wxPaintEvent& WXUNUSED(event)) { - wxPaintDC dc(handlerDialog); - - PaintSelectionHandles(dc); + wxPaintDC dc(handlerDialog); + + PaintSelectionHandles(dc); } // Add event handlers for all children void wxResourceEditorDialogHandler::AddChildHandlers(void) { - wxNode *node = handlerDialog->GetChildren().First(); - while ( node ) - { - wxControl *child = (wxControl *)node->Data(); - wxEvtHandler *childHandler = child->GetEventHandler(); - if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler == child ) - child->PushEventHandler(new wxResourceEditorControlHandler(child, childHandler)); - node = node->Next(); - } + wxNode *node = handlerDialog->GetChildren().First(); + while ( node ) + { + wxControl *child = (wxControl *)node->Data(); + wxEvtHandler *childHandler = child->GetEventHandler(); + if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler == child ) + child->PushEventHandler(new wxResourceEditorControlHandler(child, childHandler)); + node = node->Next(); + } } void wxResourceEditorDialogHandler::OnLeftClick(int x, int y, int keys) { - if (keys & wxKEY_CTRL) - { - wxResourceManager::GetCurrentResourceManager()->EditWindow(handlerDialog); - return; - } - - // Deselect all items if click on panel - if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() == RESED_POINTER) - { - int needsRefresh = 0; - wxNode *node = handlerDialog->GetChildren().First(); - while (node) + if (keys & wxKEY_CTRL) { - wxControl *item = (wxControl *)node->Data(); - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected()) - { - needsRefresh ++; - OnItemSelect(item, FALSE); - childHandler->SelectItem(FALSE); - } - node = node->Next(); + wxResourceManager::GetCurrentResourceManager()->EditWindow(handlerDialog); + return; } - if (needsRefresh > 0) + + // Deselect all items if click on panel + if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() == RESED_POINTER) { - wxClientDC dc(handlerDialog); - dc.Clear(); - handlerDialog->Refresh(); + int needsRefresh = 0; + wxNode *node = handlerDialog->GetChildren().First(); + while (node) + { + wxControl *item = (wxControl *)node->Data(); + wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected()) + { + needsRefresh ++; + OnItemSelect(item, FALSE); + childHandler->SelectItem(FALSE); + } + node = node->Next(); + } + if (needsRefresh > 0) + { + wxClientDC dc(handlerDialog); + dc.Clear(); + handlerDialog->Refresh(); + } + return; } - return; - } - - // Round down to take account of dialog units - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerDialog); - if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { + + // Round down to take account of dialog units + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerDialog); + if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { wxPoint pt = handlerDialog->ConvertPixelsToDialog(wxPoint(x, y)); - + // Convert back so we've rounded down pt = handlerDialog->ConvertDialogToPixels(pt); pt = handlerDialog->ConvertPixelsToDialog(pt); pt = handlerDialog->ConvertDialogToPixels(pt); x = pt.x; y = pt.y; - } - - switch (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection()) - { - case RESED_BUTTON: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxButton", x, y); - break; - case RESED_BMPBUTTON: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxBitmapButton", x, y, TRUE); - break; - case RESED_STATICTEXT: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticText", x, y); - break; - case RESED_STATICBMP: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBitmap", x, y, TRUE); - break; - case RESED_TEXTCTRL_SINGLE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (single-line)", x, y); - break; - case RESED_TEXTCTRL_MULTIPLE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (multi-line)", x, y); - break; - case RESED_CHOICE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxChoice", x, y); - break; - case RESED_COMBOBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxComboBox", x, y); - break; - case RESED_CHECKBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxCheckBox", x, y); - break; - case RESED_RADIOBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioBox", x, y); - break; - case RESED_RADIOBUTTON: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioButton", x, y); - break; - case RESED_LISTBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxListBox", x, y); - break; - case RESED_SLIDER: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxSlider", x, y); - break; - case RESED_GAUGE: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxGauge", x, y); - break; - case RESED_STATICBOX: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBox", x, y); - break; - case RESED_SCROLLBAR: - resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxScrollBar", x, y); - break; - default: - break; - } - - // Now switch pointer on. - if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() != RESED_POINTER) - { - wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->SetItemState(RESED_POINTER, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); - } + } + + switch (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection()) + { + case RESED_BUTTON: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxButton", x, y); + break; + case RESED_BMPBUTTON: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxBitmapButton", x, y, TRUE); + break; + case RESED_STATICTEXT: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticText", x, y); + break; + case RESED_STATICBMP: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBitmap", x, y, TRUE); + break; + case RESED_TEXTCTRL_SINGLE: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (single-line)", x, y); + break; + case RESED_TEXTCTRL_MULTIPLE: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (multi-line)", x, y); + break; + case RESED_CHOICE: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxChoice", x, y); + break; + case RESED_COMBOBOX: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxComboBox", x, y); + break; + case RESED_CHECKBOX: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxCheckBox", x, y); + break; + case RESED_RADIOBOX: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioBox", x, y); + break; + case RESED_RADIOBUTTON: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioButton", x, y); + break; + case RESED_LISTBOX: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxListBox", x, y); + break; + case RESED_SLIDER: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxSlider", x, y); + break; + case RESED_GAUGE: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxGauge", x, y); + break; + case RESED_STATICBOX: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBox", x, y); + break; + case RESED_SCROLLBAR: + resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxScrollBar", x, y); + break; + default: + break; + } + + // Now switch pointer on. + if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() != RESED_POINTER) + { + wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->SetItemState(RESED_POINTER, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); + } } void wxResourceEditorDialogHandler::OnRightClick(int x, int y, int WXUNUSED(keys)) { - wxMenu *menu = resourceManager->GetPopupMenu(); - menu->SetClientData((char *)handlerDialog); - handlerDialog->PopupMenu(menu, x, y); + wxMenu *menu = resourceManager->GetPopupMenu(); + menu->SetClientData((char *)handlerDialog); + handlerDialog->PopupMenu(menu, x, y); } void wxResourceEditorDialogHandler::OnItemLeftClick(wxControl *item, int WXUNUSED(x), int WXUNUSED(y), int keys) { - if (keys & wxKEY_CTRL) - { - wxResourceManager::GetCurrentResourceManager()->EditWindow(item); - return; - } - -/* - // If this is a wxStaticBox and the pointer isn't an arrow, chances - // are that we really meant to place an item on the panel. - // Fake this event. - if ((item->GetClassInfo() == CLASSINFO(wxStaticBox)) && resourceManager->GetEditorPalette()->currentlySelected != PALETTE_ARROW) - { + if (keys & wxKEY_CTRL) + { + wxResourceManager::GetCurrentResourceManager()->EditWindow(item); + return; + } + + /* + // If this is a wxStaticBox and the pointer isn't an arrow, chances + // are that we really meant to place an item on the panel. + // Fake this event. + if ((item->GetClassInfo() == CLASSINFO(wxStaticBox)) && resourceManager->GetEditorPalette()->currentlySelected != PALETTE_ARROW) + { OnLeftClick(x, y, keys); return; - } -*/ - - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - - if (childHandler->IsSelected()) - { - childHandler->SelectItem(FALSE); - OnItemSelect(item, FALSE); - - wxClientDC dc(handlerDialog); - dc.Clear(); - handlerDialog->Refresh(); - } - else - { - childHandler->SelectItem(TRUE); - OnItemSelect(item, TRUE); + } + */ - // Deselect other items if shift is not pressed - int needsRefresh = 0; - if (!(keys & wxKEY_SHIFT)) + wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + + if (childHandler->IsSelected()) { - wxNode *node = item->GetParent()->GetChildren().First(); - while (node) - { - wxControl *child = (wxControl *)node->Data(); - wxResourceEditorControlHandler *childHandler2 = (wxResourceEditorControlHandler *)child->GetEventHandler(); - if (child->IsKindOf(CLASSINFO(wxControl)) && childHandler2->IsSelected() && child != item) + childHandler->SelectItem(FALSE); + OnItemSelect(item, FALSE); + + wxClientDC dc(handlerDialog); + dc.Clear(); + handlerDialog->Refresh(); + } + else + { + childHandler->SelectItem(TRUE); + OnItemSelect(item, TRUE); + + // Deselect other items if shift is not pressed + int needsRefresh = 0; + if (!(keys & wxKEY_SHIFT)) { - childHandler2->SelectItem(FALSE); - OnItemSelect(child, FALSE); - needsRefresh ++; + wxNode *node = item->GetParent()->GetChildren().First(); + while (node) + { + wxControl *child = (wxControl *)node->Data(); + wxResourceEditorControlHandler *childHandler2 = (wxResourceEditorControlHandler *)child->GetEventHandler(); + if (child->IsKindOf(CLASSINFO(wxControl)) && childHandler2->IsSelected() && child != item) + { + childHandler2->SelectItem(FALSE); + OnItemSelect(child, FALSE); + needsRefresh ++; + } + node = node->Next(); + } + } + + wxClientDC dc(handlerDialog); + childHandler->DrawSelectionHandles(dc); + + if (needsRefresh > 0) + { + dc.Clear(); + handlerDialog->Refresh(); } - node = node->Next(); - } } - - wxClientDC dc(handlerDialog); - childHandler->DrawSelectionHandles(dc); - - if (needsRefresh > 0) - { - dc.Clear(); - handlerDialog->Refresh(); - } - } } void wxResourceEditorDialogHandler::OnItemRightClick(wxControl *item, int x, int y, int WXUNUSED(keys)) { /* - if (keys & wxKEY_CTRL) - { - wxDebugMsg("Item %s, selected = %d\n", item->GetName(), item->IsSelected()); - return; - } -*/ - - wxMenu *menu = resourceManager->GetPopupMenu(); - menu->SetClientData((char *)item); - handlerDialog->PopupMenu(menu, x, y); +if (keys & wxKEY_CTRL) +{ +wxDebugMsg("Item %s, selected = %d\n", item->GetName(), item->IsSelected()); +return; +} + */ + + wxMenu *menu = resourceManager->GetPopupMenu(); + menu->SetClientData((char *)item); + handlerDialog->PopupMenu(menu, x, y); } // Under Windows 95, you can resize a panel interactively depending on @@ -308,7 +308,7 @@ void wxResourceEditorDialogHandler::OnSize(wxSizeEvent& event) // Update the associated resource int w, h; handlerDialog->GetClientSize(& w, & h); - + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerDialog); if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) { @@ -321,328 +321,328 @@ void wxResourceEditorDialogHandler::OnSize(wxSizeEvent& event) // An event outside any items: may be a drag event. void wxResourceEditorDialogHandler::OnMouseEvent(wxMouseEvent& event) { - if (GetEvtHandlerEnabled()) - { - // If we're dragging an item or selection handle, - // continue dragging. - if (dragMode != wxDRAG_MODE_NONE) + if (GetEvtHandlerEnabled()) { - ProcessItemEvent(dragItem, event, dragType); - return; - } - - wxCoord x, y; - event.GetPosition(&x, &y); - - // Find which selection handle we're on, if any - wxNode *node = handlerDialog->GetChildren().First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - int selHandle = childHandler->SelectionHandleHitTest(x, y); - if (selHandle > 0) + // If we're dragging an item or selection handle, + // continue dragging. + if (dragMode != wxDRAG_MODE_NONE) { - ProcessItemEvent(item, event, selHandle); - return; + ProcessItemEvent(dragItem, event, dragType); + return; } - } - node = node->Next(); - } - - // We're not on an item or selection handle. - // so... check for a left or right click event - // to send to the application. - int keys = 0; - if (event.ShiftDown()) keys = keys | wxKEY_SHIFT; - if (event.ControlDown()) keys = keys | wxKEY_CTRL; - - if (event.LeftUp()) - { - if (m_mouseCaptured) + + wxCoord x, y; + event.GetPosition(&x, &y); + + // Find which selection handle we're on, if any + wxNode *node = handlerDialog->GetChildren().First(); + while (node) { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; + wxWindow *win = (wxWindow *)node->Data(); + if (win->IsKindOf(CLASSINFO(wxControl))) + { + wxControl *item = (wxControl *)win; + wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + int selHandle = childHandler->SelectionHandleHitTest(x, y); + if (selHandle > 0) + { + ProcessItemEvent(item, event, selHandle); + return; + } + } + node = node->Next(); } - - OnLeftClick(x, y, keys); - } - else if (event.RightDown()) - { - if (m_mouseCaptured) + + // We're not on an item or selection handle. + // so... check for a left or right click event + // to send to the application. + int keys = 0; + if (event.ShiftDown()) keys = keys | wxKEY_SHIFT; + if (event.ControlDown()) keys = keys | wxKEY_CTRL; + + if (event.LeftUp()) { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + + OnLeftClick(x, y, keys); } - - OnRightClick(x, y, keys); - } - else if (event.LeftDClick()) - { - if (m_mouseCaptured) + else if (event.RightDown()) { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + + OnRightClick(x, y, keys); + } + else if (event.LeftDClick()) + { + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + wxResourceManager::GetCurrentResourceManager()->EditWindow(handlerDialog); } - wxResourceManager::GetCurrentResourceManager()->EditWindow(handlerDialog); } - } - else - event.Skip(); + else + event.Skip(); } void wxResourceEditorDialogHandler::OnItemEvent(wxControl *item, wxMouseEvent& event) { - if (!GetEvtHandlerEnabled()) - return; - - // Not a selection handle event: just a normal item event. - // Transform to panel coordinates. - wxCoord x, y; - item->GetPosition(&x, &y); - - event.m_x = event.m_x + x; - event.m_y = event.m_y + y; - - ProcessItemEvent(item, event, dragType); + if (!GetEvtHandlerEnabled()) + return; + + // Not a selection handle event: just a normal item event. + // Transform to panel coordinates. + wxCoord x, y; + item->GetPosition(&x, &y); + + event.m_x = event.m_x + x; + event.m_y = event.m_y + y; + + ProcessItemEvent(item, event, dragType); } void wxResourceEditorDialogHandler::ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle) { - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - - wxCoord x, y; - event.GetPosition(&x, &y); - int keys = 0; - if (event.ShiftDown()) keys = keys | wxKEY_SHIFT; - if (event.ControlDown()) keys = keys | wxKEY_CTRL; - bool dragging = event.Dragging(); - if (dragging) - { - int dx = (int)abs((x - firstDragX)); - int dy = (int)abs((y - firstDragY)); - if (checkTolerance && (dx <= dragTolerance) && (dy <= dragTolerance)) + wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + + wxCoord x, y; + event.GetPosition(&x, &y); + int keys = 0; + if (event.ShiftDown()) keys = keys | wxKEY_SHIFT; + if (event.ControlDown()) keys = keys | wxKEY_CTRL; + bool dragging = event.Dragging(); + if (dragging) { - return; + int dx = (int)abs((x - firstDragX)); + int dy = (int)abs((y - firstDragY)); + if (checkTolerance && (dx <= dragTolerance) && (dy <= dragTolerance)) + { + return; + } + else + // If we've ignored the tolerance once, then ALWAYS ignore + // tolerance in this drag, even if we come back within + // the tolerance range. + { + checkTolerance = FALSE; + } } - else - // If we've ignored the tolerance once, then ALWAYS ignore - // tolerance in this drag, even if we come back within - // the tolerance range. - { - checkTolerance = FALSE; - } - } - if (event.LeftDClick()) - { - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - - wxResourceManager::GetCurrentResourceManager()->EditWindow(item); - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_LEFT) - { - dragMode = wxDRAG_MODE_CONTINUE_LEFT; - wxClientDC dc(handlerDialog); - childHandler->OnDragBegin(x, y, keys, dc, selectionHandle); - oldDragX = x; oldDragY = y; - if (!m_mouseCaptured) + if (event.LeftDClick()) { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + + wxResourceManager::GetCurrentResourceManager()->EditWindow(item); } - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT) - { - wxClientDC dc(handlerDialog); - childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle); - childHandler->OnDragContinue(TRUE, x, y, keys, dc, selectionHandle); - oldDragX = x; oldDragY = y; - } - else if (event.LeftUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT) - { - wxClientDC dc(handlerDialog); - dragMode = wxDRAG_MODE_NONE; - checkTolerance = TRUE; - - childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle); - childHandler->OnDragEnd(x, y, keys, dc, selectionHandle); - - dragItem = NULL; - dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) + else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_LEFT) { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; + dragMode = wxDRAG_MODE_CONTINUE_LEFT; + wxClientDC dc(handlerDialog); + childHandler->OnDragBegin(x, y, keys, dc, selectionHandle); + oldDragX = x; oldDragY = y; + if (!m_mouseCaptured) + { + handlerDialog->CaptureMouse(); + m_mouseCaptured = TRUE; + } } - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_RIGHT) - { - wxClientDC dc(handlerDialog); - dragMode = wxDRAG_MODE_CONTINUE_RIGHT; - childHandler->OnDragBegin(x, y, keys, dc, selectionHandle); - oldDragX = x; oldDragY = y; - - if (!m_mouseCaptured) - { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; + else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT) + { + wxClientDC dc(handlerDialog); + childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle); + childHandler->OnDragContinue(TRUE, x, y, keys, dc, selectionHandle); + oldDragX = x; oldDragY = y; } - } - else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT) - { - oldDragX = x; oldDragY = y; - } - // Obsolete; no longer try to right-drag - else if (event.RightUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT) - { - dragMode = wxDRAG_MODE_NONE; - checkTolerance = TRUE; - dragItem = NULL; - dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) + else if (event.LeftUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_LEFT) { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; + wxClientDC dc(handlerDialog); + dragMode = wxDRAG_MODE_NONE; + checkTolerance = TRUE; + + childHandler->OnDragContinue(FALSE, oldDragX, oldDragY, keys, dc, selectionHandle); + childHandler->OnDragEnd(x, y, keys, dc, selectionHandle); + + dragItem = NULL; + dragType = wxDRAG_TYPE_NONE; + + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } } - } - else if (event.IsButton()) - { - checkTolerance = TRUE; - - if (event.LeftDown()) + else if (dragging && dragItem && dragMode == wxDRAG_MODE_START_RIGHT) { - dragItem = item; - dragMode = wxDRAG_MODE_START_LEFT; - firstDragX = x; - firstDragY = y; - dragType = selectionHandle; - - if (!m_mouseCaptured) - { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; - } + wxClientDC dc(handlerDialog); + dragMode = wxDRAG_MODE_CONTINUE_RIGHT; + childHandler->OnDragBegin(x, y, keys, dc, selectionHandle); + oldDragX = x; oldDragY = y; + + if (!m_mouseCaptured) + { + handlerDialog->CaptureMouse(); + m_mouseCaptured = TRUE; + } } - else if (event.RightDown()) + else if (dragging && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT) + { + oldDragX = x; oldDragY = y; + } + // Obsolete; no longer try to right-drag + else if (event.RightUp() && dragItem && dragMode == wxDRAG_MODE_CONTINUE_RIGHT) { - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - - if (item) + dragMode = wxDRAG_MODE_NONE; + checkTolerance = TRUE; + dragItem = NULL; + dragType = wxDRAG_TYPE_NONE; + + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + } + else if (event.IsButton()) + { + checkTolerance = TRUE; + + if (event.LeftDown()) + { + dragItem = item; + dragMode = wxDRAG_MODE_START_LEFT; + firstDragX = x; + firstDragY = y; + dragType = selectionHandle; + + if (!m_mouseCaptured) + { + handlerDialog->CaptureMouse(); + m_mouseCaptured = TRUE; + } + } + else if (event.RightDown()) + { + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + + if (item) + childHandler->OnRightClick(x, y, keys); + else + OnRightClick(x, y, keys); + + dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; + + /* + dragItem = item; + dragMode = wxDRAG_MODE_START_RIGHT; + firstDragX = x; + firstDragY = y; + dragType = selectionHandle; + + if (!m_mouseCaptured) + { + handlerDialog->CaptureMouse(); + m_mouseCaptured = TRUE; + } + */ + } + else if (event.LeftUp()) + { + if (dragItem) + childHandler->OnLeftClick(x, y, keys); + else + OnLeftClick(x, y, keys); + + dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; + + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + } + else if (event.RightUp()) + { + /* + if (dragItem) childHandler->OnRightClick(x, y, keys); - else + else OnRightClick(x, y, keys); - - dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; - - /* - dragItem = item; - dragMode = wxDRAG_MODE_START_RIGHT; - firstDragX = x; - firstDragY = y; - dragType = selectionHandle; - - if (!m_mouseCaptured) - { - handlerDialog->CaptureMouse(); - m_mouseCaptured = TRUE; - } - */ + + dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; + + if (m_mouseCaptured) + { + handlerDialog->ReleaseMouse(); + m_mouseCaptured = FALSE; + } + */ + } } - else if (event.LeftUp()) - { - if (dragItem) - childHandler->OnLeftClick(x, y, keys); - else - OnLeftClick(x, y, keys); - - dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - } - else if (event.RightUp()) - { - /* - if (dragItem) - childHandler->OnRightClick(x, y, keys); - else - OnRightClick(x, y, keys); - - dragItem = NULL; dragMode = wxDRAG_MODE_NONE; dragType = wxDRAG_TYPE_NONE; - - if (m_mouseCaptured) - { - handlerDialog->ReleaseMouse(); - m_mouseCaptured = FALSE; - } - */ - } - } } // Calls DrawSelectionHandles for all items if // edit mode is on. void wxResourceEditorDialogHandler::PaintSelectionHandles(wxDC& dc) { - if (!GetEvtHandlerEnabled()) - return; - - dc.BeginDrawing(); - - wxNode *node = handlerDialog->GetChildren().First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) + if (!GetEvtHandlerEnabled()) + return; + + dc.BeginDrawing(); + + wxNode *node = handlerDialog->GetChildren().First(); + while (node) { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - - // Don't draw handles for an item that's being moved: it'll - // smear. - if (childHandler->IsSelected() && (item != dragItem)) - childHandler->DrawSelectionHandles(dc); + wxWindow *win = (wxWindow *)node->Data(); + if (win->IsKindOf(CLASSINFO(wxControl))) + { + wxControl *item = (wxControl *)win; + wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + + // Don't draw handles for an item that's being moved: it'll + // smear. + if (childHandler->IsSelected() && (item != dragItem)) + childHandler->DrawSelectionHandles(dc); + } + node = node->Next(); } - node = node->Next(); - } - dc.EndDrawing(); + dc.EndDrawing(); } /* - * Event handler for controls - */ +* Event handler for controls +*/ int wxResourceEditorControlHandler::dragOffsetX = 0; int wxResourceEditorControlHandler::dragOffsetY = 0; wxResourceEditorControlHandler::wxResourceEditorControlHandler(wxControl *control, - wxEvtHandler *oldHandler) + wxEvtHandler *oldHandler) { - handlerControl = control; - handlerOldHandler = oldHandler; - - handleSize = 6; - handleMargin = 1; - isSelected = FALSE; - dragOffsetX = 0; - dragOffsetY = 0; -// m_treeItem = 0; + handlerControl = control; + handlerOldHandler = oldHandler; + + handleSize = 6; + handleMargin = 1; + isSelected = FALSE; + dragOffsetX = 0; + dragOffsetY = 0; + // m_treeItem = 0; } wxResourceEditorControlHandler::~wxResourceEditorControlHandler(void) @@ -650,481 +650,484 @@ wxResourceEditorControlHandler::~wxResourceEditorControlHandler(void) } /* - * Manipulation and drawing of items in Edit Mode - */ - +* Manipulation and drawing of items in Edit Mode +*/ + void wxResourceEditorControlHandler::SelectItem(bool select) { - isSelected = select; + isSelected = select; } // Returns TRUE or FALSE bool wxResourceEditorControlHandler::HitTest(int x, int y) { - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - return ((x >= xpos) && (x <= (xpos + width)) && (y >= ypos) && (y <= (ypos + height))); + int xpos, ypos, width, height; + handlerControl->GetPosition(&xpos, &ypos); + handlerControl->GetSize(&width, &height); + + return ((x >= xpos) && (x <= (xpos + width)) && (y >= ypos) && (y <= (ypos + height))); } // Calculate position of the 8 handles void wxResourceEditorControlHandler::CalcSelectionHandles(int *hx, int *hy) { - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - int middleX = (xpos + (width/2)); - int middleY = (ypos + (height/2)); - - // Start from top middle, clockwise. -/* - 7 0 1 - - 6 2 - - 5 4 3 -*/ - - hx[0] = (int)(middleX - (handleSize/2)); - hy[0] = ypos - handleSize - handleMargin; - - hx[1] = xpos + width + handleMargin; - hy[1] = ypos - handleSize - handleMargin; - - hx[2] = xpos + width + handleMargin; - hy[2] = (int)(middleY - (handleSize/2)); - - hx[3] = xpos + width + handleMargin; - hy[3] = ypos + height + handleMargin; - - hx[4] = (int)(middleX - (handleSize/2)); - hy[4] = ypos + height + handleMargin; - - hx[5] = xpos - handleSize - handleMargin; - hy[5] = ypos + height + handleMargin; - - hx[6] = xpos - handleSize - handleMargin; - hy[6] = (int)(middleY - (handleSize/2)); - - hx[7] = xpos - handleSize - handleMargin; - hy[7] = ypos - handleSize - handleMargin; + int xpos, ypos, width, height; + handlerControl->GetPosition(&xpos, &ypos); + handlerControl->GetSize(&width, &height); + int middleX = (xpos + (width/2)); + int middleY = (ypos + (height/2)); + + // Start from top middle, clockwise. + /* + 7 0 1 + + 6 2 + + 5 4 3 + */ + + hx[0] = (int)(middleX - (handleSize/2)); + hy[0] = ypos - handleSize - handleMargin; + + hx[1] = xpos + width + handleMargin; + hy[1] = ypos - handleSize - handleMargin; + + hx[2] = xpos + width + handleMargin; + hy[2] = (int)(middleY - (handleSize/2)); + + hx[3] = xpos + width + handleMargin; + hy[3] = ypos + height + handleMargin; + + hx[4] = (int)(middleX - (handleSize/2)); + hy[4] = ypos + height + handleMargin; + + hx[5] = xpos - handleSize - handleMargin; + hy[5] = ypos + height + handleMargin; + + hx[6] = xpos - handleSize - handleMargin; + hy[6] = (int)(middleY - (handleSize/2)); + + hx[7] = xpos - handleSize - handleMargin; + hy[7] = ypos - handleSize - handleMargin; } // Returns 0 (no hit), 1 - 8 for which selection handle // (clockwise from top middle) int wxResourceEditorControlHandler::SelectionHandleHitTest(int x, int y) { - // Handle positions - int hx[8]; - int hy[8]; - CalcSelectionHandles(hx, hy); - - int i; - for (i = 0; i < 8; i++) - { - if ((x >= hx[i]) && (x <= (hx[i] + handleSize)) && (y >= hy[i]) && (y <= (hy[i] + handleSize))) - return (i + 1); - } - return 0; + // Handle positions + int hx[8]; + int hy[8]; + CalcSelectionHandles(hx, hy); + + int i; + for (i = 0; i < 8; i++) + { + if ((x >= hx[i]) && (x <= (hx[i] + handleSize)) && (y >= hy[i]) && (y <= (hy[i] + handleSize))) + return (i + 1); + } + return 0; } void wxResourceEditorControlHandler::DrawSelectionHandles(wxDC& dc, bool WXUNUSED(erase)) { - dc.SetOptimization(FALSE); - - dc.SetLogicalFunction(wxCOPY); - dc.SetPen(* wxBLACK_PEN); - dc.SetBrush(* wxBLACK_BRUSH); - - dc.SetOptimization(TRUE); - - // Handle positions - int hx[8]; - int hy[8]; - CalcSelectionHandles(hx, hy); - - int i; - for (i = 0; i < 8; i++) - { - dc.DrawRectangle(hx[i], hy[i], handleSize, handleSize); - } + dc.SetOptimization(FALSE); + + dc.SetLogicalFunction(wxCOPY); + dc.SetPen(* wxBLACK_PEN); + dc.SetBrush(* wxBLACK_BRUSH); + + dc.SetOptimization(TRUE); + + // Handle positions + int hx[8]; + int hy[8]; + CalcSelectionHandles(hx, hy); + + int i; + for (i = 0; i < 8; i++) + { + dc.DrawRectangle(hx[i], hy[i], handleSize, handleSize); + } } void wxResourceEditorControlHandler::DrawBoundingBox(wxDC& dc, int x, int y, int w, int h) { - dc.DrawRectangle(x, y, w, h); + dc.DrawRectangle(x, y, w, h); } // If selectionHandle is zero, not dragging the selection handle. void wxResourceEditorControlHandler::OnDragBegin(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle) { - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - dc.BeginDrawing(); - -// dc.DestroyClippingRegion(); - - wxPanel *panel = (wxPanel *)handlerControl->GetParent(); - - // Erase selection handles -// DrawSelectionHandles(dc, TRUE); - - dc.SetOptimization(FALSE); - - dc.SetLogicalFunction(wxINVERT); - - wxPen pen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(pen); - dc.SetBrush(* wxTRANSPARENT_BRUSH); - - dc.SetOptimization(TRUE); - - if (selectionHandle > 0) - { - panel->Refresh(); - - DrawBoundingBox(dc, xpos, ypos, width, height); - } - else - { - panel->Refresh(); - - dragOffsetX = (x - xpos); - dragOffsetY = (y - ypos); - - DrawBoundingBox(dc, xpos, ypos, width, height); - - // Also draw bounding boxes for other selected items - wxNode *node = panel->GetChildren().First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) + int xpos, ypos, width, height; + handlerControl->GetPosition(&xpos, &ypos); + handlerControl->GetSize(&width, &height); + + dc.BeginDrawing(); + + // dc.DestroyClippingRegion(); + + wxPanel *panel = (wxPanel *)handlerControl->GetParent(); + + // Erase selection handles + // DrawSelectionHandles(dc, TRUE); + + dc.SetOptimization(FALSE); + + dc.SetLogicalFunction(wxINVERT); + + wxPen pen(wxColour(0, 0, 0), 1, wxDOT); + dc.SetPen(pen); + dc.SetBrush(* wxTRANSPARENT_BRUSH); + + dc.SetOptimization(TRUE); + + if (selectionHandle > 0) + { + panel->Refresh(); + + DrawBoundingBox(dc, xpos, ypos, width, height); + } + else + { + panel->Refresh(); + + dragOffsetX = (x - xpos); + dragOffsetY = (y - ypos); + + DrawBoundingBox(dc, xpos, ypos, width, height); + + // Also draw bounding boxes for other selected items + wxNode *node = panel->GetChildren().First(); + while (node) { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if ((item != handlerControl) && handler->IsSelected()) - { - int x1, y1, w1, h1; - item->GetPosition(&x1, &y1); - item->GetSize(&w1, &h1); - handler->DrawBoundingBox(dc, x1, y1, w1, h1); - } + wxWindow *win = (wxWindow *)node->Data(); + if (win->IsKindOf(CLASSINFO(wxControl))) + { + wxControl *item = (wxControl *)win; + wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + if ((item != handlerControl) && handler->IsSelected()) + { + int x1, y1, w1, h1; + item->GetPosition(&x1, &y1); + item->GetSize(&w1, &h1); + handler->DrawBoundingBox(dc, x1, y1, w1, h1); + } + } + node = node->Next(); } - node = node->Next(); - } - } - dc.EndDrawing(); + } + dc.EndDrawing(); } void wxResourceEditorControlHandler::OnDragContinue(bool WXUNUSED(paintIt), int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle) { - wxPanel *panel = (wxPanel *)handlerControl->GetParent(); - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - if (selectionHandle > 0) - { -/* - 8 1 2 - - 7 3 - - 6 5 4 -*/ - - int x1, y1, width1, height1; - - switch (selectionHandle) + wxPanel *panel = (wxPanel *)handlerControl->GetParent(); + int xpos, ypos, width, height; + handlerControl->GetPosition(&xpos, &ypos); + handlerControl->GetSize(&width, &height); + + if (selectionHandle > 0) { - case 1: - x1 = xpos; - y1 = y; - width1 = width; - height1 = (ypos + height) - y; - break; - case 5: - x1 = xpos; - y1 = ypos; - width1 = width; - height1 = (y - ypos); - break; - case 3: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = height; - break; - case 7: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = height; - break; - case 2: - x1 = xpos; - y1 = y; - width1 = (x - xpos); - height1 = (ypos + height) - y; - break; - case 4: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = (y - ypos); - break; - case 6: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = y - ypos; - break; - case 8: - x1 = x; - y1 = y; - width1 = (xpos + width) - x; - height1 = (ypos + height) - y; - break; - } - dc.BeginDrawing(); - - dc.SetLogicalFunction(wxINVERT); - wxPen pen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(pen); - dc.SetBrush(* wxTRANSPARENT_BRUSH); - - DrawBoundingBox(dc, x1, y1, width1, height1); - - dc.EndDrawing(); - } - else - { - dc.BeginDrawing(); - dc.SetLogicalFunction(wxINVERT); - wxPen pen(wxColour(0, 0, 0), 1, wxDOT); - dc.SetPen(pen); - dc.SetBrush(* wxTRANSPARENT_BRUSH); - - DrawBoundingBox(dc, (int)(x - dragOffsetX), (int)(y - dragOffsetY), width, height); - - // Also draw bounding boxes for other selected items - wxNode *node = panel->GetChildren().First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) + /* + 8 1 2 + + 7 3 + + 6 5 4 + */ + + int x1, y1, width1, height1; + + switch (selectionHandle) { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if ((item != handlerControl) && handler->IsSelected()) - { - int x1, y1, w1, h1; - item->GetPosition(&x1, &y1); - item->GetSize(&w1, &h1); - int x2 = (int)(x1 + (x - dragOffsetX) - xpos); - int y2 = (int)(y1 + (y - dragOffsetY) - ypos); - handler->DrawBoundingBox(dc, x2, y2, w1, h1); - } + case 1: + x1 = xpos; + y1 = y; + width1 = width; + height1 = (ypos + height) - y; + break; + case 5: + x1 = xpos; + y1 = ypos; + width1 = width; + height1 = (y - ypos); + break; + case 3: + x1 = xpos; + y1 = ypos; + width1 = (x - xpos); + height1 = height; + break; + case 7: + x1 = x; + y1 = ypos; + width1 = (xpos + width) - x; + height1 = height; + break; + case 2: + x1 = xpos; + y1 = y; + width1 = (x - xpos); + height1 = (ypos + height) - y; + break; + case 4: + x1 = xpos; + y1 = ypos; + width1 = (x - xpos); + height1 = (y - ypos); + break; + case 6: + x1 = x; + y1 = ypos; + width1 = (xpos + width) - x; + height1 = y - ypos; + break; + case 8: + x1 = x; + y1 = y; + width1 = (xpos + width) - x; + height1 = (ypos + height) - y; + break; } - node = node->Next(); - } - dc.EndDrawing(); - } + dc.BeginDrawing(); + + dc.SetLogicalFunction(wxINVERT); + wxPen pen(wxColour(0, 0, 0), 1, wxDOT); + dc.SetPen(pen); + dc.SetBrush(* wxTRANSPARENT_BRUSH); + + DrawBoundingBox(dc, x1, y1, width1, height1); + + dc.EndDrawing(); + } + else + { + dc.BeginDrawing(); + dc.SetLogicalFunction(wxINVERT); + wxPen pen(wxColour(0, 0, 0), 1, wxDOT); + dc.SetPen(pen); + dc.SetBrush(* wxTRANSPARENT_BRUSH); + + DrawBoundingBox(dc, (int)(x - dragOffsetX), (int)(y - dragOffsetY), width, height); + + // Also draw bounding boxes for other selected items + wxNode *node = panel->GetChildren().First(); + while (node) + { + wxWindow *win = (wxWindow *)node->Data(); + if (win->IsKindOf(CLASSINFO(wxControl))) + { + wxControl *item = (wxControl *)win; + wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + if ((item != handlerControl) && handler->IsSelected()) + { + int x1, y1, w1, h1; + item->GetPosition(&x1, &y1); + item->GetSize(&w1, &h1); + int x2 = (int)(x1 + (x - dragOffsetX) - xpos); + int y2 = (int)(y1 + (y - dragOffsetY) - ypos); + handler->DrawBoundingBox(dc, x2, y2, w1, h1); + } + } + node = node->Next(); + } + dc.EndDrawing(); + } } void wxResourceEditorControlHandler::OnDragEnd(int x, int y, int WXUNUSED(keys), wxDC& dc, int selectionHandle) { - wxPanel *panel = (wxPanel *)handlerControl->GetParent(); - - dc.BeginDrawing(); - - int xpos, ypos, width, height; - handlerControl->GetPosition(&xpos, &ypos); - handlerControl->GetSize(&width, &height); - - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerControl); - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerControl->GetParent()); - - if (selectionHandle > 0) - { - int x1, y1, width1, height1; - - switch (selectionHandle) + wxPanel *panel = (wxPanel *)handlerControl->GetParent(); + + dc.BeginDrawing(); + + int xpos, ypos, width, height; + handlerControl->GetPosition(&xpos, &ypos); + handlerControl->GetSize(&width, &height); + + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerControl); + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(handlerControl->GetParent()); + + if (selectionHandle > 0) { - case 1: - x1 = xpos; - y1 = y; - width1 = width; - height1 = (ypos + height) - y; - break; - case 5: - x1 = xpos; - y1 = ypos; - width1 = width; - height1 = (y - ypos); - break; - case 3: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = height; - break; - case 7: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = height; - break; - case 2: - x1 = xpos; - y1 = y; - width1 = (x - xpos); - height1 = (ypos + height) - y; - break; - case 4: - x1 = xpos; - y1 = ypos; - width1 = (x - xpos); - height1 = (y - ypos); - break; - case 6: - x1 = x; - y1 = ypos; - width1 = (xpos + width) - x; - height1 = y - ypos; - break; - case 8: - x1 = x; - y1 = y; - width1 = (xpos + width) - x; - height1 = (ypos + height) - y; - break; - } - // Update the associated resource - // We need to convert to dialog units if this is not a dialog or panel, but - // the parent resource specifies dialog units. - int resourceX = x1; - int resourceY = y1; - int resourceWidth = width1; - int resourceHeight = height1; - - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = handlerControl->GetParent()->ConvertPixelsToDialog(wxPoint(x1, y1)); - wxSize sz = handlerControl->GetParent()->ConvertPixelsToDialog(wxSize(width1, height1)); - - // Convert back so we've rounded down - sz = handlerControl->GetParent()->ConvertDialogToPixels(sz); - sz = handlerControl->GetParent()->ConvertPixelsToDialog(sz); - resourceWidth = sz.x; resourceHeight = sz.y; - - sz = handlerControl->GetParent()->ConvertDialogToPixels(sz); - width1 = sz.x; - height1 = sz.y; - - pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); - pt = handlerControl->GetParent()->ConvertPixelsToDialog(pt); - resourceX = pt.x; resourceY = pt.y; - - pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); - x1 = pt.x; - y1 = pt.y; - } - handlerControl->SetSize(x1, y1, width1, height1); - resource->SetSize(resourceX, resourceY, resourceWidth, resourceHeight); - } - else - { - // Correction 31/12/98. We need to round down the values to take into account - // the fact that several pixels map to the same dialog unit. - - int newX = (int)(x - dragOffsetX); - int newY = (int)(y - dragOffsetY); - int resourceX = newX; - int resourceY = newY; - - // Update the associated resource - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = handlerControl->GetParent()->ConvertPixelsToDialog(wxPoint(newX, newY)); - pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); - pt = handlerControl->GetParent()->ConvertPixelsToDialog(pt); - resourceX = pt.x; resourceY = pt.y; - pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); - - // Having converted it several times, we know it'll map to dialog units exactly. - newX = pt.x; - newY = pt.y; - } - handlerControl->Move(newX, newY); - OldOnMove(newX, newY); - - resource->SetSize(resourceX, resourceY, resource->GetWidth(), resource->GetHeight()); - - // Also move other selected items - wxNode *node = panel->GetChildren().First(); - while (node) - { - wxWindow *win = (wxWindow *)node->Data(); - if (win->IsKindOf(CLASSINFO(wxControl))) - { - wxControl *item = (wxControl *)win; - wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if ((item != handlerControl) && handler->IsSelected()) + int x1, y1, width1, height1; + + switch (selectionHandle) { - int x1, y1; - item->GetPosition(&x1, &y1); - int x2 = (int)(x1 + (x - dragOffsetX) - xpos); - int y2 = (int)(y1 + (y - dragOffsetY) - ypos); - - // Update the associated resource - resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item); - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = item->GetParent()->ConvertPixelsToDialog(wxPoint(x2, y2)); - pt = item->GetParent()->ConvertDialogToPixels(pt); - pt = item->GetParent()->ConvertPixelsToDialog(pt); - + case 1: + x1 = xpos; + y1 = y; + width1 = width; + height1 = (ypos + height) - y; + break; + case 5: + x1 = xpos; + y1 = ypos; + width1 = width; + height1 = (y - ypos); + break; + case 3: + x1 = xpos; + y1 = ypos; + width1 = (x - xpos); + height1 = height; + break; + case 7: + x1 = x; + y1 = ypos; + width1 = (xpos + width) - x; + height1 = height; + break; + case 2: + x1 = xpos; + y1 = y; + width1 = (x - xpos); + height1 = (ypos + height) - y; + break; + case 4: + x1 = xpos; + y1 = ypos; + width1 = (x - xpos); + height1 = (y - ypos); + break; + case 6: + x1 = x; + y1 = ypos; + width1 = (xpos + width) - x; + height1 = y - ypos; + break; + case 8: + x1 = x; + y1 = y; + width1 = (xpos + width) - x; + height1 = (ypos + height) - y; + break; + } + // Update the associated resource + // We need to convert to dialog units if this is not a dialog or panel, but + // the parent resource specifies dialog units. + int resourceX = x1; + int resourceY = y1; + int resourceWidth = width1; + int resourceHeight = height1; + + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = handlerControl->GetParent()->ConvertPixelsToDialog(wxPoint(x1, y1)); + wxSize sz = handlerControl->GetParent()->ConvertPixelsToDialog(wxSize(width1, height1)); + + // Convert back so we've rounded down + sz = handlerControl->GetParent()->ConvertDialogToPixels(sz); + sz = handlerControl->GetParent()->ConvertPixelsToDialog(sz); + resourceWidth = sz.x; resourceHeight = sz.y; + + sz = handlerControl->GetParent()->ConvertDialogToPixels(sz); + width1 = sz.x; + height1 = sz.y; + + pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); + pt = handlerControl->GetParent()->ConvertPixelsToDialog(pt); + resourceX = pt.x; resourceY = pt.y; + + pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); + x1 = pt.x; + y1 = pt.y; + } + handlerControl->SetSize(x1, y1, width1, height1); + resource->SetSize(resourceX, resourceY, resourceWidth, resourceHeight); + } + else + { + // Correction 31/12/98. We need to round down the values to take into account + // the fact that several pixels map to the same dialog unit. + + int newX = (int)(x - dragOffsetX); + int newY = (int)(y - dragOffsetY); + int resourceX = newX; + int resourceY = newY; + + // Update the associated resource + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = handlerControl->GetParent()->ConvertPixelsToDialog(wxPoint(newX, newY)); + pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); + pt = handlerControl->GetParent()->ConvertPixelsToDialog(pt); resourceX = pt.x; resourceY = pt.y; pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); - - // Having converted it several times, we know it'll map to dialog units exactly - x2 = pt.x; - y2 = pt.y; - } - - item->Move(x2, y2); - ((wxResourceEditorControlHandler *)item->GetEventHandler())->OldOnMove(x2, y2); - ((wxResourceEditorControlHandler *)item->GetEventHandler())->DrawSelectionHandles(dc); - - resource->SetSize(resourceX, resourceY, resource->GetWidth(), resource->GetHeight()); - + + // Having converted it several times, we know it'll map to dialog units exactly. + newX = pt.x; + newY = pt.y; + } + handlerControl->Move(newX, newY); + OldOnMove(newX, newY); + + resource->SetSize(resourceX, resourceY, resource->GetWidth(), resource->GetHeight()); + + // Also move other selected items + wxNode *node = panel->GetChildren().First(); + while (node) + { + wxWindow *win = (wxWindow *)node->Data(); + if (win->IsKindOf(CLASSINFO(wxControl))) + { + wxControl *item = (wxControl *)win; + wxResourceEditorControlHandler *handler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + if ((item != handlerControl) && handler->IsSelected()) + { + int x1, y1; + item->GetPosition(&x1, &y1); + int x2 = (int)(x1 + (x - dragOffsetX) - xpos); + int y2 = (int)(y1 + (y - dragOffsetY) - ypos); + + resourceX = x2; + resourceY = y2; + + // Update the associated resource + resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item); + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = item->GetParent()->ConvertPixelsToDialog(wxPoint(x2, y2)); + pt = item->GetParent()->ConvertDialogToPixels(pt); + pt = item->GetParent()->ConvertPixelsToDialog(pt); + + resourceX = pt.x; resourceY = pt.y; + pt = handlerControl->GetParent()->ConvertDialogToPixels(pt); + + // Having converted it several times, we know it'll map to dialog units exactly + x2 = pt.x; + y2 = pt.y; + } + + item->Move(x2, y2); + ((wxResourceEditorControlHandler *)item->GetEventHandler())->OldOnMove(x2, y2); + ((wxResourceEditorControlHandler *)item->GetEventHandler())->DrawSelectionHandles(dc); + + resource->SetSize(resourceX, resourceY, resource->GetWidth(), resource->GetHeight()); + + } + } + node = node->Next(); } - } - node = node->Next(); } - } - dc.SetOptimization(FALSE); - - dc.SetLogicalFunction(wxCOPY); - dc.SetPen(* wxBLACK_PEN); - dc.SetBrush(* wxBLACK_BRUSH); - - dc.SetOptimization(TRUE); - - // Force it to repaint the selection handles (if any) - // since the panel thinks we're still within a drag and - // won't paint the handles. - if (IsSelected()) - DrawSelectionHandles(dc); - - dc.EndDrawing(); - - panel->Refresh(); + dc.SetOptimization(FALSE); + + dc.SetLogicalFunction(wxCOPY); + dc.SetPen(* wxBLACK_PEN); + dc.SetBrush(* wxBLACK_BRUSH); + + dc.SetOptimization(TRUE); + + // Force it to repaint the selection handles (if any) + // since the panel thinks we're still within a drag and + // won't paint the handles. + if (IsSelected()) + DrawSelectionHandles(dc); + + dc.EndDrawing(); + + panel->Refresh(); } // These functions call OnItemEvent, OnItemMove and OnItemSize @@ -1132,71 +1135,71 @@ void wxResourceEditorControlHandler::OnDragEnd(int x, int y, int WXUNUSED(keys), void wxResourceEditorControlHandler::OnMouseEvent(wxMouseEvent& event) { /* - if ((event.m_eventType == wxEVENT_TYPE_LEFT_DCLICK) || - (event.m_eventType == wxEVENT_TYPE_RIGHT_DCLICK)) - return; -*/ - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - if ( !panelHandler->GetEvtHandlerEnabled() ) - { - event.Skip(); - return; - } +if ((event.m_eventType == wxEVENT_TYPE_LEFT_DCLICK) || +(event.m_eventType == wxEVENT_TYPE_RIGHT_DCLICK)) +return; + */ + wxWindow *panel = handlerControl->GetParent(); + if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) + return; + wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); + if ( !panelHandler->GetEvtHandlerEnabled() ) + { + event.Skip(); + return; + } - panelHandler->OnItemEvent(handlerControl, event); + panelHandler->OnItemEvent(handlerControl, event); } void wxResourceEditorControlHandler::OldOnMove(int x, int y) { - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemMove(handlerControl, x, y); + wxWindow *panel = handlerControl->GetParent(); + if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) + return; + + wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); + panelHandler->OnItemMove(handlerControl, x, y); } void wxResourceEditorControlHandler::OldOnSize(int w, int h) { - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemSize(handlerControl, w, h); + wxWindow *panel = handlerControl->GetParent(); + if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) + return; + + wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); + panelHandler->OnItemSize(handlerControl, w, h); } void wxResourceEditorControlHandler::OnSelect(bool select) { - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemSelect(handlerControl, select); + wxWindow *panel = handlerControl->GetParent(); + if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) + return; + + wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); + panelHandler->OnItemSelect(handlerControl, select); } void wxResourceEditorControlHandler::OnLeftClick(int x, int y, int keys) { - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemLeftClick(handlerControl, x, y, keys); + wxWindow *panel = handlerControl->GetParent(); + if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) + return; + + wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); + panelHandler->OnItemLeftClick(handlerControl, x, y, keys); } void wxResourceEditorControlHandler::OnRightClick(int x, int y, int keys) { - wxWindow *panel = handlerControl->GetParent(); - if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) - return; - - wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); - panelHandler->OnItemRightClick(handlerControl, x, y, keys); + wxWindow *panel = handlerControl->GetParent(); + if ( !panel->GetEventHandler()->IsKindOf(CLASSINFO(wxResourceEditorDialogHandler)) ) + return; + + wxResourceEditorDialogHandler *panelHandler = (wxResourceEditorDialogHandler *)panel->GetEventHandler(); + panelHandler->OnItemRightClick(handlerControl, x, y, keys); } diff --git a/utils/dialoged/src/dlghndlr.h b/utils/dialoged/src/dlghndlr.h index 80a9cf5ac8..e54ba36097 100644 --- a/utils/dialoged/src/dlghndlr.h +++ b/utils/dialoged/src/dlghndlr.h @@ -25,114 +25,125 @@ class wxResourceEditorDialogHandler: public wxEvtHandler { -DECLARE_CLASS(wxResourceEditorDialogHandler) - public: - wxResourceManager *resourceManager; - wxPanel *handlerDialog; - wxItemResource *handlerResource; - wxEvtHandler *handlerOldHandler; - - wxControl *dragItem; - int dragMode; - int dragType; - int dragTolerance; - bool checkTolerance; - int firstDragX; - int firstDragY; - int oldDragX; - int oldDragY; - bool m_mouseCaptured; -// long m_treeItem; - - wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource, wxEvtHandler *oldHandler, - wxResourceManager *manager); - ~wxResourceEditorDialogHandler(void); - - void OnPaint(wxPaintEvent& event); - void OnMouseEvent(wxMouseEvent& event); - void OnSize(wxSizeEvent& event); - - virtual void OnItemEvent(wxControl *win, wxMouseEvent& event); - virtual void OnLeftClick(int x, int y, int keys); - virtual void OnRightClick(int x, int y, int keys); - virtual void OnItemLeftClick(wxControl *item, int x, int y, int keys); - virtual void OnItemRightClick(wxControl *item, int x, int y, int keys); - virtual void OnItemSelect(wxControl *item, bool select); - virtual void OnItemMove( - wxControl *WXUNUSED(item), int WXUNUSED(x), int WXUNUSED(y) ) {}; - virtual void OnItemSize( - wxControl *WXUNUSED(item), int WXUNUSED(w), int WXUNUSED(h) ) {}; - - void AddChildHandlers(void); - void PaintSelectionHandles(wxDC& dc); - void ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle); - -// Accessors -/* - inline long GetTreeItem() const { return m_treeItem; } - inline void SetTreeItem(long item) { m_treeItem = item; } -*/ - -DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxResourceEditorDialogHandler) +public: + wxResourceManager *resourceManager; + wxPanel *handlerDialog; + wxItemResource *handlerResource; + wxEvtHandler *handlerOldHandler; + + wxControl *dragItem; + int dragMode; + int dragType; + int dragTolerance; + bool checkTolerance; + int firstDragX; + int firstDragY; + int oldDragX; + int oldDragY; + bool m_mouseCaptured; + // long m_treeItem; + + wxResourceEditorDialogHandler(wxPanel *dialog, wxItemResource *resource, wxEvtHandler *oldHandler, + wxResourceManager *manager); + ~wxResourceEditorDialogHandler(void); + + void OnPaint(wxPaintEvent& event); + void OnMouseEvent(wxMouseEvent& event); + void OnSize(wxSizeEvent& event); + + virtual void OnItemEvent(wxControl *win, wxMouseEvent& event); + virtual void OnLeftClick(int x, int y, int keys); + virtual void OnRightClick(int x, int y, int keys); + virtual void OnItemLeftClick(wxControl *item, int x, int y, int keys); + virtual void OnItemRightClick(wxControl *item, int x, int y, int keys); + virtual void OnItemSelect(wxControl *item, bool select); + virtual void OnItemMove( + wxControl *WXUNUSED(item), int WXUNUSED(x), int WXUNUSED(y) ) {}; + virtual void OnItemSize( + wxControl *WXUNUSED(item), int WXUNUSED(w), int WXUNUSED(h) ) {}; + + void AddChildHandlers(void); + void PaintSelectionHandles(wxDC& dc); + void ProcessItemEvent(wxControl *item, wxMouseEvent& event, int selectionHandle); + + // Accessors + /* + inline long GetTreeItem() const { return m_treeItem; } + inline void SetTreeItem(long item) { m_treeItem = item; } + */ + + DECLARE_EVENT_TABLE() }; class wxResourceEditorControlHandler: public wxEvtHandler { -DECLARE_CLASS(wxResourceEditorControlHandler) - public: -// wxResourceManager *resourceManager; - wxControl *handlerControl; -// wxItemResource *handlerResource; - wxEvtHandler *handlerOldHandler; + DECLARE_CLASS(wxResourceEditorControlHandler) +public: + // wxResourceManager *resourceManager; + wxControl *handlerControl; + // wxItemResource *handlerResource; + wxEvtHandler *handlerOldHandler; + + bool isSelected; + int handleSize; // selection handle size + int handleMargin; // Distance between item edge and handle edge + long m_treeItem; + static int dragOffsetX; // Distance between pointer at start of drag and + static int dragOffsetY; // top-left of item + + wxResourceEditorControlHandler(wxControl *control, wxEvtHandler *oldHandler); + ~wxResourceEditorControlHandler(void); + + void OnMouseEvent(wxMouseEvent& event); + + // Manipulation and drawing of items in Edit Mode + + // Calculate position of the 8 handles + virtual void CalcSelectionHandles(int *hx, int *hy); + virtual void DrawSelectionHandles(wxDC& dc, bool erase = FALSE); + virtual void DrawBoundingBox(wxDC& dc, int x, int y, int w, int h); + virtual void SelectItem(bool select); + virtual inline bool IsSelected(void) { return isSelected; } + + // Returns TRUE or FALSE + virtual bool HitTest(int x, int y); + + // Returns 0 (no hit), 1 - 8 for which selection handle + // (clockwise from top middle) + virtual int SelectionHandleHitTest(int x, int y); + + // If selectionHandle is zero, not dragging the selection handle. + virtual void OnDragBegin(int x, int y, int keys, wxDC& dc, int selectionHandle); + virtual void OnDragContinue(bool paintIt, int x, int y, int keys, wxDC& dc, int selectionHandle); + virtual void OnDragEnd(int x, int y, int keys, wxDC& dc, int selectionHandle); + + // These functions call panel functions + // by default. + virtual void OldOnMove(int x, int y); + virtual void OldOnSize(int w, int h); + virtual void OnLeftClick(int x, int y, int keys); + virtual void OnRightClick(int x, int y, int keys); + virtual void OnSelect(bool select); + + // Accessors + /* + inline long GetTreeItem() const { return m_treeItem; } + inline void SetTreeItem(long item) { m_treeItem = item; } + */ + + DECLARE_EVENT_TABLE() +}; - bool isSelected; - int handleSize; // selection handle size - int handleMargin; // Distance between item edge and handle edge - long m_treeItem; - static int dragOffsetX; // Distance between pointer at start of drag and - static int dragOffsetY; // top-left of item - - wxResourceEditorControlHandler(wxControl *control, wxEvtHandler *oldHandler); - ~wxResourceEditorControlHandler(void); - - void OnMouseEvent(wxMouseEvent& event); - - // Manipulation and drawing of items in Edit Mode - - // Calculate position of the 8 handles - virtual void CalcSelectionHandles(int *hx, int *hy); - virtual void DrawSelectionHandles(wxDC& dc, bool erase = FALSE); - virtual void DrawBoundingBox(wxDC& dc, int x, int y, int w, int h); - virtual void SelectItem(bool select); - virtual inline bool IsSelected(void) { return isSelected; } - - // Returns TRUE or FALSE - virtual bool HitTest(int x, int y); - - // Returns 0 (no hit), 1 - 8 for which selection handle - // (clockwise from top middle) - virtual int SelectionHandleHitTest(int x, int y); - - // If selectionHandle is zero, not dragging the selection handle. - virtual void OnDragBegin(int x, int y, int keys, wxDC& dc, int selectionHandle); - virtual void OnDragContinue(bool paintIt, int x, int y, int keys, wxDC& dc, int selectionHandle); - virtual void OnDragEnd(int x, int y, int keys, wxDC& dc, int selectionHandle); - - // These functions call panel functions - // by default. - virtual void OldOnMove(int x, int y); - virtual void OldOnSize(int w, int h); - virtual void OnLeftClick(int x, int y, int keys); - virtual void OnRightClick(int x, int y, int keys); - virtual void OnSelect(bool select); - -// Accessors -/* - inline long GetTreeItem() const { return m_treeItem; } - inline void SetTreeItem(long item) { m_treeItem = item; } -*/ - -DECLARE_EVENT_TABLE() +// This dialog, for testing dialogs, has to intercept commands before +// they go up the hierarchy and accidentally set off arbitrary +// Dialog Editor functionality +class ResourceEditorDialogTester: public wxDialog +{ +public: + ResourceEditorDialogTester() {} + + bool ProcessEvent(wxEvent& event); }; #endif diff --git a/utils/dialoged/src/edlist.cpp b/utils/dialoged/src/edlist.cpp index 087736aaf4..205a6fd153 100644 --- a/utils/dialoged/src/edlist.cpp +++ b/utils/dialoged/src/edlist.cpp @@ -41,8 +41,8 @@ BEGIN_EVENT_TABLE(wxResourceEditorControlList, wxListCtrl) END_EVENT_TABLE() wxResourceEditorControlList::wxResourceEditorControlList(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style): - wxListCtrl(parent, id, pos, size, style), m_imageList(16, 16, TRUE) + long style): +wxListCtrl(parent, id, pos, size, style), m_imageList(16, 16, TRUE) { Initialize(); } @@ -74,7 +74,7 @@ void wxResourceEditorControlList::Initialize() wxIcon icon16("RADIOBTN_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); wxIcon icon17("SCROLBAR_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); #else - + #include "bitmaps/arrow.xpm" wxIcon icon1( arrow_xpm ); #include "bitmaps/button.xpm" @@ -110,7 +110,7 @@ void wxResourceEditorControlList::Initialize() #include "bitmaps/scrolbar.xpm" wxIcon icon17( scrolbar_xpm ); #endif - + m_imageList.Add(icon1); m_imageList.Add(icon2); m_imageList.Add(icon3); @@ -130,7 +130,7 @@ void wxResourceEditorControlList::Initialize() m_imageList.Add(icon17); SetImageList(& m_imageList, wxIMAGE_LIST_SMALL); - + long id = InsertItem(0, "Pointer", 0); id = InsertItem(1, "wxButton", 1); id = InsertItem(2, "wxBitmapButton", 2); @@ -148,14 +148,14 @@ void wxResourceEditorControlList::Initialize() id = InsertItem(14, "wxRadioBox", 14); id = InsertItem(15, "wxRadioButton", 15); id = InsertItem(16, "wxScrollBar", 16); - -/* + + /* InsertItem(RESED_TREECTRL, "wxTreeCtrl", 16); InsertItem(RESED_LISTCTRL, "wxListCtrl", 17); InsertItem(RESED_SPINBUTTON, "wxSpinButton", 18); -*/ - -// SetColumnWidth(-1, 80); + */ + + // SetColumnWidth(-1, 80); } // Get selection, or -1 diff --git a/utils/dialoged/src/edlist.h b/utils/dialoged/src/edlist.h index 9777c01355..6ab9369f1f 100644 --- a/utils/dialoged/src/edlist.h +++ b/utils/dialoged/src/edlist.h @@ -21,15 +21,15 @@ public: wxResourceEditorControlList(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style = wxLC_SMALL_ICON|wxLC_AUTOARRANGE|wxLC_SINGLE_SEL); ~wxResourceEditorControlList(); - + // Load icons and add to the list void Initialize(); - + // Get selection, or -1 long GetSelection() const; - -DECLARE_EVENT_TABLE() - + + DECLARE_EVENT_TABLE() + protected: wxImageList m_imageList; }; diff --git a/utils/dialoged/src/edtree.cpp b/utils/dialoged/src/edtree.cpp index 00086583d8..168fa100cd 100644 --- a/utils/dialoged/src/edtree.cpp +++ b/utils/dialoged/src/edtree.cpp @@ -38,13 +38,13 @@ #include "reseditr.h" BEGIN_EVENT_TABLE(wxResourceEditorProjectTree, wxTreeCtrl) - EVT_LEFT_DCLICK(wxResourceEditorProjectTree::LeftDClick) - EVT_TREE_SEL_CHANGED(IDC_TREECTRL, wxResourceEditorProjectTree::OnSelChanged) +EVT_LEFT_DCLICK(wxResourceEditorProjectTree::LeftDClick) +EVT_TREE_SEL_CHANGED(IDC_TREECTRL, wxResourceEditorProjectTree::OnSelChanged) END_EVENT_TABLE() wxResourceEditorProjectTree::wxResourceEditorProjectTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style): - wxTreeCtrl(parent, id, pos, size, style) + long style): +wxTreeCtrl(parent, id, pos, size, style) { } @@ -54,18 +54,18 @@ void wxResourceEditorProjectTree::LeftDClick(wxMouseEvent& WXUNUSED(event)) long sel = GetSelection(); if (sel == -1) return; - + if (GetItemData(sel) == 0) return; - + wxItemResource* res = (wxResourceTreeData *)GetItemData(sel)->GetResource(); wxString resType(res->GetType()); if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel") return; - + wxResourceEditorFrame *frame = (wxResourceEditorFrame *)wxWindow::GetParent(); wxResourceManager *manager = frame->manager; - + manager->EditSelectedResource(); #endif } @@ -75,18 +75,18 @@ void wxResourceEditorProjectTree::OnSelChanged(wxTreeEvent& WXUNUSED(event)) long sel = GetSelection(); if (sel == -1) return; - + if (GetItemData(sel) == 0) return; - + if (m_invalid) return; - + wxItemResource* res = ((wxResourceTreeData *)GetItemData(sel))->GetResource(); wxString resType(res->GetType()); if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel") return; - + wxResourceManager::GetCurrentResourceManager()->Edit(res); } diff --git a/utils/dialoged/src/edtree.h b/utils/dialoged/src/edtree.h index 3928c5aa7d..37b05dcd59 100644 --- a/utils/dialoged/src/edtree.h +++ b/utils/dialoged/src/edtree.h @@ -19,17 +19,17 @@ class wxResourceEditorProjectTree: public wxTreeCtrl public: wxResourceEditorProjectTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style = wxTR_HAS_BUTTONS); - + void LeftDClick(wxMouseEvent& event); void OnSelChanged(wxTreeEvent& event); - + inline void SetInvalid(bool invalid) { m_invalid = invalid; } - + protected: bool m_invalid; // While TRUE, don't respond to selections etc. - -DECLARE_EVENT_TABLE() - + + DECLARE_EVENT_TABLE() + }; #endif diff --git a/utils/dialoged/src/makefile.vc b/utils/dialoged/src/makefile.vc index fce0a56fd7..83b6066167 100644 --- a/utils/dialoged/src/makefile.vc +++ b/utils/dialoged/src/makefile.vc @@ -84,6 +84,8 @@ DOCSOURCES=$(LOCALDOCDIR)\dialoged.tex $(LOCALDOCDIR)\body.tex\ $(LOCALDOCDIR)\classes.tex $(LOCALDOCDIR)\tech.tex html: $(DOCDIR)\html\dialoged\dlged.htm +htmlhelp: $(DOCDIR)\htmlhelp\dialoged.chm +htb: $(DOCDIR)\htb\dialoged.htb hlp: $(DOCDIR)\winhelp\dialoged.hlp pdfrtf: $(DOCDIR)\pdf\dialoged.rtf ps: $(DOCDIR)\ps\dialoged.ps @@ -110,11 +112,30 @@ $(DOCDIR)\pdf\dialoged.rtf: $(DOCSOURCES) $(DOCDIR)\html\dialoged\dlged.htm: $(DOCSOURCES) cd $(LOCALDOCDIR) -mkdir $(DOCDIR)\html\dialoged + -copy *.gif $(DOCDIR)\html\dialoged -start /w tex2rtf $(LOCALDOCDIR)\dialoged.tex $(DOCDIR)\html\dialoged\dlged.htm -twice -html -erase $(DOCDIR)\html\dialoged\*.con -erase $(DOCDIR)\html\dialoged\*.ref cd $(THISDIR) +$(DOCDIR)\htmlhelp\dialoged.chm : $(DOCDIR)\html\dialoged\dlged.htm $(DOCDIR)\html\dialoged\dlged.hhp + cd $(DOCDIR)\html\dialoged + -hhc dlged.hhp + move $(DOCDIR)\html\dialoged\dlged.chm $(DOCDIR)\htmlhelp\dialoged.chm + cd $(THISDIR) + +# An htb file is a zip file containing the .htm, .gif, .hhp, .hhc and .hhk +# files, renamed to htb. +# This can then be used with e.g. helpview. +# Optionally, a cached version of the .hhp file can be generated with hhp2cached. +$(DOCDIR)\htb\dialoged.htb: $(DOCDIR)\html\dialoged\dlged.htm + cd $(DOCDIR)\html\dialoged + -erase /Y dialoged.zip dialoged.htb + zip32 dialoged.zip *.htm *.gif *.hhp *.hhc *.hhk + -mkdir $(DOCDIR)\htb + move dialoged.zip $(DOCDIR)\htb\dialoged.htb + cd $(THISDIR) + $(LOCALDOCDIR)\dialoged.dvi: $(DOCSOURCES) cd $(LOCALDOCDIR) -latex dialoged diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp index 1e831519df..5f1b105bbb 100644 --- a/utils/dialoged/src/reseditr.cpp +++ b/utils/dialoged/src/reseditr.cpp @@ -38,6 +38,8 @@ #include "wx/scrolbar.h" #include "wx/config.h" +#include "wx/dir.h" +#include "wx/progdlg.h" #include #include @@ -71,6 +73,10 @@ wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL; #include "bitmaps/toback.xpm" #include "bitmaps/help.xpm" #include "bitmaps/wxwin.xpm" +#include "bitmaps/distvert.xpm" +#include "bitmaps/disthor.xpm" +#include "bitmaps/copywdth.xpm" +#include "bitmaps/copyhght.xpm" #include "bitmaps/dialog.xpm" #include "bitmaps/folder1.xpm" @@ -79,529 +85,508 @@ wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL; #endif /* - * Resource manager - */ +* Resource manager +*/ wxResourceManager::wxResourceManager(): - m_imageList(16, 16, TRUE) +m_imageList(16, 16, TRUE) { - sm_currentResourceManager = this; - m_editorFrame = NULL; - m_editorPanel = NULL; - m_popupMenu = NULL; - m_editorResourceTree = NULL; - m_editorControlList = NULL; - m_nameCounter = 1; - m_symbolIdCounter = 99; - m_modified = FALSE; - m_currentFilename = ""; - m_symbolFilename = ""; - m_editorToolBar = NULL; - - // Default window positions - m_resourceEditorWindowSize.width = 500; - m_resourceEditorWindowSize.height = 450; - - m_resourceEditorWindowSize.x = 0; - m_resourceEditorWindowSize.y = 0; - - m_propertyWindowSize.width = 300; - m_propertyWindowSize.height = 300; - + sm_currentResourceManager = this; + m_editorFrame = NULL; + m_editorPanel = NULL; + m_popupMenu = NULL; + m_editorResourceTree = NULL; + m_editorControlList = NULL; + m_nameCounter = 1; + m_symbolIdCounter = 99; + m_modified = FALSE; + m_currentFilename = ""; + m_symbolFilename = ""; + m_editorToolBar = NULL; + + // Default window positions + m_resourceEditorWindowSize.width = 500; + m_resourceEditorWindowSize.height = 450; + + m_resourceEditorWindowSize.x = 0; + m_resourceEditorWindowSize.y = 0; + + m_propertyWindowSize.width = 300; + m_propertyWindowSize.height = 300; + #ifdef __WXMSW__ - m_helpController = NULL; + m_helpController = NULL; #endif - - m_bitmapImage = NULL; - m_rootDialogItem = 0; + + m_bitmapImage = NULL; + m_rootDialogItem = 0; } wxResourceManager::~wxResourceManager() { - sm_currentResourceManager = NULL; - SaveOptions(); - + sm_currentResourceManager = NULL; + SaveOptions(); + #ifdef __WXMSW__ - if (m_helpController) - { - m_helpController->Quit(); - delete m_helpController; - m_helpController = NULL; - } + if (m_helpController) + { + m_helpController->Quit(); + delete m_helpController; + m_helpController = NULL; + } #endif - - delete m_bitmapImage; - delete m_popupMenu; + + delete m_bitmapImage; + delete m_popupMenu; } bool wxResourceManager::Initialize() { - // Set up the resource filename for each platform. - // TODO: This shold be replaced by wxConfig usage. + // Set up the resource filename for each platform. + // TODO: This shold be replaced by wxConfig usage. #ifdef __WXMSW__ - // dialoged.ini in the Windows directory - wxString windowsDir = wxGetOSDirectory(); - windowsDir += "\\dialoged.ini" ; - - m_optionsResourceFilename = windowsDir; + // dialoged.ini in the Windows directory + wxString windowsDir = wxGetOSDirectory(); + windowsDir += "\\dialoged.ini" ; + + m_optionsResourceFilename = windowsDir; #elif defined(__WXGTK__) || defined(__WXMOTIF__) - wxGetHomeDir( &m_optionsResourceFilename ); - m_optionsResourceFilename += "/.dialogedrc"; + wxGetHomeDir( &m_optionsResourceFilename ); + m_optionsResourceFilename += "/.dialogedrc"; #else #error "Unsupported platform." #endif - - LoadOptions(); - + + LoadOptions(); + #ifdef __WXMSW__ - m_helpController = new wxHelpController; - m_helpController->Initialize("dialoged"); + m_helpController = new wxHelpController; + m_helpController->Initialize("dialoged"); #endif - - m_popupMenu = new wxMenu; - m_popupMenu->Append(OBJECT_MENU_EDIT, "Edit properties"); - m_popupMenu->Append(OBJECT_MENU_DELETE, "Delete object"); - - if (!m_bitmapImage) - { + + m_popupMenu = new wxMenu; + m_popupMenu->Append(OBJECT_MENU_EDIT, "Edit properties"); + m_popupMenu->Append(OBJECT_MENU_DELETE, "Delete object"); + + if (!m_bitmapImage) + { #ifdef __WXMSW__ - m_bitmapImage = new wxBitmap("WXWINBMP", wxBITMAP_TYPE_BMP_RESOURCE); + m_bitmapImage = new wxBitmap("WXWINBMP", wxBITMAP_TYPE_BMP_RESOURCE); #endif #if defined(__WXGTK__) || defined(__WXMOTIF__) - m_bitmapImage = new wxBitmap( wxwin_xpm ); + m_bitmapImage = new wxBitmap( wxwin_xpm ); #endif - } - - // Initialize the image list icons + } + + // Initialize the image list icons #ifdef __WXMSW__ - wxIcon icon1("DIALOG_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon2("FOLDER1_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon3("FOLDER2_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); - wxIcon icon4("BUTTONSM_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); + wxIcon icon1("DIALOG_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); + wxIcon icon2("FOLDER1_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); + wxIcon icon3("FOLDER2_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); + wxIcon icon4("BUTTONSM_ICON", wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); #else - wxIcon icon1( dialog_xpm ); - wxIcon icon2( folder1_xpm ); - wxIcon icon3( folder2_xpm ); - wxIcon icon4( buttonsm_xpm ); + wxIcon icon1( dialog_xpm ); + wxIcon icon2( folder1_xpm ); + wxIcon icon3( folder2_xpm ); + wxIcon icon4( buttonsm_xpm ); #endif - m_imageList.Add(icon1); - m_imageList.Add(icon2); - m_imageList.Add(icon3); - m_imageList.Add(icon4); - - m_symbolTable.AddStandardSymbols(); - - return TRUE; + m_imageList.Add(icon1); + m_imageList.Add(icon2); + m_imageList.Add(icon3); + m_imageList.Add(icon4); + + m_symbolTable.AddStandardSymbols(); + + return TRUE; } bool wxResourceManager::LoadOptions() { - wxConfig config("DialogEd", "wxWindows"); + wxConfig config("DialogEd", "wxWindows"); + + config.Read("editorWindowX", &m_resourceEditorWindowSize.x); + config.Read("editorWindowY", &m_resourceEditorWindowSize.y); + config.Read("editorWindowWidth", &m_resourceEditorWindowSize.width); + config.Read("editorWindowHeight", &m_resourceEditorWindowSize.height); + config.Read("propertyWindowX", &m_propertyWindowSize.x); + config.Read("propertyWindowY", &m_propertyWindowSize.y); + config.Read("propertyWindowWidth", &m_propertyWindowSize.width); + config.Read("propertyWindowHeight", &m_propertyWindowSize.height); - config.Read("editorWindowX", &m_resourceEditorWindowSize.x); - config.Read("editorWindowY", &m_resourceEditorWindowSize.y); - config.Read("editorWindowWidth", &m_resourceEditorWindowSize.width); - config.Read("editorWindowHeight", &m_resourceEditorWindowSize.height); - config.Read("propertyWindowX", &m_propertyWindowSize.x); - config.Read("propertyWindowY", &m_propertyWindowSize.y); - config.Read("propertyWindowWidth", &m_propertyWindowSize.width); - config.Read("propertyWindowHeight", &m_propertyWindowSize.height); - - /* - wxGetResource("DialogEd", "editorWindowX", &m_resourceEditorWindowSize.x, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "editorWindowY", &m_resourceEditorWindowSize.y, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "editorWindowWidth", &m_resourceEditorWindowSize.width, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "editorWindowHeight", &m_resourceEditorWindowSize.height, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowX", &m_propertyWindowSize.x, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowY", &m_propertyWindowSize.y, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowWidth", &m_propertyWindowSize.width, m_optionsResourceFilename.GetData()); - wxGetResource("DialogEd", "propertyWindowHeight", &m_propertyWindowSize.height, m_optionsResourceFilename.GetData()); - */ - return TRUE; + return TRUE; } bool wxResourceManager::SaveOptions() { - wxConfig config("DialogEd", "wxWindows"); - - config.Write("editorWindowX", (long) m_resourceEditorWindowSize.x); - config.Write("editorWindowY", (long) m_resourceEditorWindowSize.y); - config.Write("editorWindowWidth", (long) m_resourceEditorWindowSize.width); - config.Write("editorWindowHeight", (long) m_resourceEditorWindowSize.height); - config.Write("propertyWindowX", (long) m_propertyWindowSize.x); - config.Write("propertyWindowY", (long) m_propertyWindowSize.y); - config.Write("propertyWindowWidth", (long) m_propertyWindowSize.width); - config.Write("propertyWindowHeight", (long) m_propertyWindowSize.height); - /* - wxWriteResource("DialogEd", "editorWindowX", m_resourceEditorWindowSize.x, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "editorWindowY", m_resourceEditorWindowSize.y, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "editorWindowWidth", m_resourceEditorWindowSize.width, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "editorWindowHeight", m_resourceEditorWindowSize.height, m_optionsResourceFilename.GetData()); - - wxWriteResource("DialogEd", "propertyWindowX", m_propertyWindowSize.x, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "propertyWindowY", m_propertyWindowSize.y, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "propertyWindowWidth", m_propertyWindowSize.width, m_optionsResourceFilename.GetData()); - wxWriteResource("DialogEd", "propertyWindowHeight", m_propertyWindowSize.height, m_optionsResourceFilename.GetData()); - */ - - return TRUE; + wxConfig config("DialogEd", "wxWindows"); + + config.Write("editorWindowX", (long) m_resourceEditorWindowSize.x); + config.Write("editorWindowY", (long) m_resourceEditorWindowSize.y); + config.Write("editorWindowWidth", (long) m_resourceEditorWindowSize.width); + config.Write("editorWindowHeight", (long) m_resourceEditorWindowSize.height); + config.Write("propertyWindowX", (long) m_propertyWindowSize.x); + config.Write("propertyWindowY", (long) m_propertyWindowSize.y); + config.Write("propertyWindowWidth", (long) m_propertyWindowSize.width); + config.Write("propertyWindowHeight", (long) m_propertyWindowSize.height); + + return TRUE; } // Show or hide the resource editor frame, which displays a list // of resources with ability to edit them. bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *WXUNUSED(parent), const char *title) { - if (show) - { - if (m_editorFrame) + if (show) { - m_editorFrame->Iconize(FALSE); - m_editorFrame->Show(TRUE); - return TRUE; - } - m_editorFrame = OnCreateEditorFrame(title); - SetFrameTitle(""); - wxMenuBar *menuBar = OnCreateEditorMenuBar(m_editorFrame); - m_editorFrame->SetMenuBar(menuBar); - - m_editorToolBar = (EditorToolBar *)OnCreateToolBar(m_editorFrame); - m_editorControlList = new wxResourceEditorControlList(m_editorFrame, IDC_LISTCTRL, wxPoint(0, 0), wxSize(-1, -1)); - m_editorResourceTree = new wxResourceEditorProjectTree(m_editorFrame, IDC_TREECTRL, wxPoint(0, 0), wxSize(-1, -1), - wxTR_HAS_BUTTONS); - m_editorPanel = OnCreateEditorPanel(m_editorFrame); - - m_editorResourceTree->SetImageList(& m_imageList); - - // Constraints for toolbar - wxLayoutConstraints *c = new wxLayoutConstraints; - c->left.SameAs (m_editorFrame, wxLeft, 0); - c->top.SameAs (m_editorFrame, wxTop, 0); - c->right.SameAs (m_editorFrame, wxRight, 0); - c->bottom.Unconstrained(); - c->width.Unconstrained(); - c->height.Absolute(28); - m_editorToolBar->SetConstraints(c); - - // Constraints for listbox - c = new wxLayoutConstraints; - c->left.SameAs (m_editorFrame, wxLeft, 0); - c->top.SameAs (m_editorToolBar, wxBottom, 0); - c->right.Absolute (150); - c->bottom.SameAs (m_editorControlList, wxTop, 0); - c->width.Unconstrained(); - c->height.Unconstrained(); - m_editorResourceTree->SetConstraints(c); - - // Constraints for panel - c = new wxLayoutConstraints; - c->left.SameAs (m_editorResourceTree, wxRight, 0); - c->top.SameAs (m_editorToolBar, wxBottom, 0); - c->right.SameAs (m_editorFrame, wxRight, 0); - c->bottom.SameAs (m_editorControlList, wxTop, 0); - c->width.Unconstrained(); - c->height.Unconstrained(); - m_editorPanel->SetConstraints(c); - - // Constraints for control list (bottom window) - c = new wxLayoutConstraints; - c->left.SameAs (m_editorFrame, wxLeft, 0); - c->right.SameAs (m_editorFrame, wxRight, 0); - c->bottom.SameAs (m_editorFrame, wxBottom, 0); - c->width.Unconstrained(); + if (m_editorFrame) + { + m_editorFrame->Iconize(FALSE); + m_editorFrame->Show(TRUE); + return TRUE; + } + m_editorFrame = OnCreateEditorFrame(title); + SetFrameTitle(""); + wxMenuBar *menuBar = OnCreateEditorMenuBar(m_editorFrame); + m_editorFrame->SetMenuBar(menuBar); + + m_editorToolBar = (EditorToolBar *)OnCreateToolBar(m_editorFrame); + m_editorControlList = new wxResourceEditorControlList(m_editorFrame, IDC_LISTCTRL, wxPoint(0, 0), wxSize(-1, -1)); + m_editorResourceTree = new wxResourceEditorProjectTree(m_editorFrame, IDC_TREECTRL, wxPoint(0, 0), wxSize(-1, -1), + wxTR_HAS_BUTTONS); + m_editorPanel = OnCreateEditorPanel(m_editorFrame); + + m_editorResourceTree->SetImageList(& m_imageList); + + // Constraints for toolbar + wxLayoutConstraints *c = new wxLayoutConstraints; + c->left.SameAs (m_editorFrame, wxLeft, 0); + c->top.SameAs (m_editorFrame, wxTop, 0); + c->right.SameAs (m_editorFrame, wxRight, 0); + c->bottom.Unconstrained(); + c->width.Unconstrained(); + c->height.Absolute(28); + m_editorToolBar->SetConstraints(c); + + // Constraints for listbox + c = new wxLayoutConstraints; + c->left.SameAs (m_editorFrame, wxLeft, 0); + c->top.SameAs (m_editorToolBar, wxBottom, 0); + c->right.Absolute (150); + c->bottom.SameAs (m_editorControlList, wxTop, 0); + c->width.Unconstrained(); + c->height.Unconstrained(); + m_editorResourceTree->SetConstraints(c); + + // Constraints for panel + c = new wxLayoutConstraints; + c->left.SameAs (m_editorResourceTree, wxRight, 0); + c->top.SameAs (m_editorToolBar, wxBottom, 0); + c->right.SameAs (m_editorFrame, wxRight, 0); + c->bottom.SameAs (m_editorControlList, wxTop, 0); + c->width.Unconstrained(); + c->height.Unconstrained(); + m_editorPanel->SetConstraints(c); + + // Constraints for control list (bottom window) + c = new wxLayoutConstraints; + c->left.SameAs (m_editorFrame, wxLeft, 0); + c->right.SameAs (m_editorFrame, wxRight, 0); + c->bottom.SameAs (m_editorFrame, wxBottom, 0); + c->width.Unconstrained(); #if defined(__WXGTK__) || defined(__WXMOTIF__) - c->height.Absolute(120); + c->height.Absolute(120); #else - c->height.Absolute(60); + c->height.Absolute(60); #endif - - m_editorControlList->SetConstraints(c); - - m_editorFrame->SetAutoLayout(TRUE); - - UpdateResourceList(); - - m_editorFrame->Show(TRUE); - return TRUE; - } - else - { - if (m_editorFrame->Close()) - { - m_editorFrame = NULL; - m_editorPanel = NULL; + + m_editorControlList->SetConstraints(c); + + m_editorFrame->SetAutoLayout(TRUE); + + UpdateResourceList(); + + m_editorFrame->Show(TRUE); + return TRUE; } - } - return TRUE; + else + { + if (m_editorFrame->Close()) + { + m_editorFrame = NULL; + m_editorPanel = NULL; + } + } + return TRUE; } void wxResourceManager::SetFrameTitle(const wxString& filename) { - if (m_editorFrame) - { - if (filename == wxString("")) - m_editorFrame->SetTitle("wxWindows Dialog Editor - untitled"); - else + if (m_editorFrame) { - wxString str("wxWindows Dialog Editor - "); - wxString str2(wxFileNameFromPath(WXSTRINGCAST filename)); - str += str2; - m_editorFrame->SetTitle(str); + if (filename == wxString("")) + m_editorFrame->SetTitle("wxWindows Dialog Editor - untitled"); + else + { + wxString str("wxWindows Dialog Editor - "); + wxString str2(wxFileNameFromPath(WXSTRINGCAST filename)); + str += str2; + m_editorFrame->SetTitle(str); + } } - } } bool wxResourceManager::Save() { - if (m_currentFilename == wxString("")) - return SaveAs(); - else - return Save(m_currentFilename); + if (m_currentFilename == wxString("")) + return SaveAs(); + else + return Save(m_currentFilename); } bool wxResourceManager::Save(const wxString& filename) { - // Ensure all visible windows are saved to their resources - m_currentFilename = filename; - SetFrameTitle(m_currentFilename); - InstantiateAllResourcesFromWindows(); - if (m_resourceTable.Save(filename)) - { - m_symbolTable.WriteIncludeFile(m_symbolFilename); - Modify(FALSE); - return TRUE; - } - else - return FALSE; + // Ensure all visible windows are saved to their resources + m_currentFilename = filename; + SetFrameTitle(m_currentFilename); + InstantiateAllResourcesFromWindows(); + if (m_resourceTable.Save(filename)) + { + m_symbolTable.WriteIncludeFile(m_symbolFilename); + Modify(FALSE); + return TRUE; + } + else + return FALSE; } bool wxResourceManager::SaveAs() { - wxString s(wxFileSelector("Save resource file", wxPathOnly(WXSTRINGCAST m_currentFilename), wxFileNameFromPath(WXSTRINGCAST m_currentFilename), - "wxr", "*.wxr", wxSAVE | wxOVERWRITE_PROMPT, wxTheApp->GetTopWindow())); + wxString s(wxFileSelector("Save resource file", wxPathOnly(WXSTRINGCAST m_currentFilename), wxFileNameFromPath(WXSTRINGCAST m_currentFilename), + "wxr", "*.wxr", wxSAVE | wxOVERWRITE_PROMPT, wxTheApp->GetTopWindow())); - if (s.IsNull() || s == "") - return FALSE; + if (s.IsNull() || s == "") + return FALSE; - m_currentFilename = s; - wxStripExtension(m_currentFilename); - m_currentFilename += ".wxr"; - - // Construct include filename from this file - m_symbolFilename = m_currentFilename; - - wxStripExtension(m_symbolFilename); - m_symbolFilename += ".h"; - - Save(m_currentFilename); - return TRUE; + m_currentFilename = s; + wxStripExtension(m_currentFilename); + m_currentFilename += ".wxr"; + + // Construct include filename from this file + m_symbolFilename = m_currentFilename; + + wxStripExtension(m_symbolFilename); + m_symbolFilename += ".h"; + + Save(m_currentFilename); + return TRUE; } bool wxResourceManager::SaveIfModified() { - if (Modified()) - return Save(); - else return TRUE; + if (Modified()) + return Save(); + else return TRUE; } bool wxResourceManager::Load(const wxString& filename) { - return New(TRUE, filename); + return New(TRUE, filename); } bool wxResourceManager::New(bool loadFromFile, const wxString& filename) { - if (!Clear(TRUE, FALSE)) - return FALSE; - - m_symbolTable.AddStandardSymbols(); - - if (loadFromFile) - { - wxString str = filename; - if (str == wxString("")) - { - wxString f(wxFileSelector("Open resource file", NULL, NULL, "wxr", "*.wxr", 0, wxTheApp->GetTopWindow())); - if (!f.IsNull() && f != "") - str = f; - else + if (!Clear(TRUE, FALSE)) return FALSE; - } - if (!m_resourceTable.ParseResourceFile(str)) + m_symbolTable.AddStandardSymbols(); + + if (loadFromFile) { - wxMessageBox("Could not read file.", "Resource file load error", wxOK | wxICON_EXCLAMATION); - return FALSE; - } - m_currentFilename = str; - - SetFrameTitle(m_currentFilename); - - UpdateResourceList(); - - // Construct include filename from this file - m_symbolFilename = m_currentFilename; - - wxStripExtension(m_symbolFilename); - m_symbolFilename += ".h"; - - if (!m_symbolTable.ReadIncludeFile(m_symbolFilename)) - { - wxString str("Could not find include file "); - str += m_symbolFilename; - str += ".\nDialog Editor maintains a header file containing id symbols to be used in the application.\n"; - str += "The next time this .wxr file is saved, a header file will be saved also."; - wxMessageBox(str, "Dialog Editor Warning", wxOK ); - - m_symbolIdCounter = 99; + wxString str = filename; + if (str == wxString("")) + { + wxString f(wxFileSelector("Open resource file", wxGetCwd(), wxEmptyString, "wxr", "*.wxr", 0, wxTheApp->GetTopWindow())); + if (!f.IsNull() && f != "") + str = f; + else + return FALSE; + } + + if (!m_resourceTable.ParseResourceFile(str)) + { + wxMessageBox("Could not read file.", "Resource file load error", wxOK | wxICON_EXCLAMATION); + return FALSE; + } + m_currentFilename = str; + + SetFrameTitle(m_currentFilename); + + UpdateResourceList(); + + // Construct include filename from this file + m_symbolFilename = m_currentFilename; + + wxStripExtension(m_symbolFilename); + m_symbolFilename += ".h"; + + if (!m_symbolTable.ReadIncludeFile(m_symbolFilename)) + { + wxString str("Could not find include file "); + str += m_symbolFilename; + str += ".\nDialog Editor maintains a header file containing id symbols to be used in the application.\n"; + str += "The next time this .wxr file is saved, a header file will be saved also."; + wxMessageBox(str, "Dialog Editor Warning", wxOK ); + + m_symbolIdCounter = 99; + } + else + { + // Set the id counter to the last known id + m_symbolIdCounter = m_symbolTable.FindHighestId(); + } + + // Now check in case some (or all) resources don't have resource ids, or they + // don't match the .h file, or something of that nature. + bool altered = RepairResourceIds(); + if (altered) + { + wxMessageBox("Some resources have had new identifiers associated with them, since they were missing.", + "Dialog Editor Warning", wxOK ); + Modify(TRUE); + } + else + Modify(FALSE); + + return TRUE; } else { - // Set the id counter to the last known id - m_symbolIdCounter = m_symbolTable.FindHighestId(); + SetFrameTitle(""); + m_currentFilename = ""; } - - // Now check in case some (or all) resources don't have resource ids, or they - // don't match the .h file, or something of that nature. - bool altered = RepairResourceIds(); - if (altered) - { - wxMessageBox("Some resources have had new identifiers associated with them, since they were missing.", - "Dialog Editor Warning", wxOK ); - Modify(TRUE); - } - else - Modify(FALSE); - + Modify(FALSE); + return TRUE; - } - else - { - SetFrameTitle(""); - m_currentFilename = ""; - } - Modify(FALSE); - - return TRUE; } bool wxResourceManager::Clear(bool WXUNUSED(deleteWindows), bool force) { - wxPropertyInfo::CloseWindow(); - - if (!force && Modified()) - { - int ans = wxMessageBox("Save modified resource file?", "Dialog Editor", wxYES_NO | wxCANCEL); - if (ans == wxCANCEL) - return FALSE; - if (ans == wxYES) - if (!SaveIfModified()) - return FALSE; - if (ans == wxNO) - Modify(FALSE); - } - - ClearCurrentDialog(); - DisassociateWindows(); - - m_symbolTable.Clear(); - m_resourceTable.ClearTable(); - UpdateResourceList(); - - return TRUE; + wxPropertyInfo::CloseWindow(); + + if (!force && Modified()) + { + int ans = wxMessageBox("Save modified resource file?", "Dialog Editor", wxYES_NO | wxCANCEL); + if (ans == wxCANCEL) + return FALSE; + if (ans == wxYES) + if (!SaveIfModified()) + return FALSE; + if (ans == wxNO) + Modify(FALSE); + } + + ClearCurrentDialog(); + DisassociateWindows(); + + m_symbolTable.Clear(); + m_resourceTable.ClearTable(); + UpdateResourceList(); + + return TRUE; } bool wxResourceManager::DisassociateWindows() { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - DisassociateResource(res); - } - - return TRUE; + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) + { + wxItemResource *res = (wxItemResource *)node->Data(); + DisassociateResource(res); + } + + return TRUE; } void wxResourceManager::AssociateResource(wxItemResource *resource, wxWindow *win) { - if (!m_resourceAssociations.Get((long)resource)) - m_resourceAssociations.Put((long)resource, win); - - wxNode *node = resource->GetChildren().First(); - wxNode* node2 = win->GetChildren().First(); - while (node && node2) - { - wxItemResource *child = (wxItemResource *)node->Data(); - wxWindow* childWindow = (wxWindow*) node2->Data(); - - if (child->GetId() != childWindow->GetId()) + if (!m_resourceAssociations.Get((long)resource)) + m_resourceAssociations.Put((long)resource, win); + + wxNode *node = resource->GetChildren().First(); + wxNode* node2 = win->GetChildren().First(); + while (node && node2) { - wxString msg; - msg.Printf("AssociateResource: error when associating child window %ld with resource %ld", child->GetId(), childWindow->GetId()); - wxMessageBox(msg, "Dialog Editor problem", wxOK); - } - else if (childWindow->GetName() != child->GetName()) - { - wxString msg; - msg.Printf("AssociateResource: error when associating child window with resource %s", child->GetName() ? (const char*) child->GetName() : "(unnamed)"); - wxMessageBox(msg, "Dialog Editor problem", wxOK); - } - else - { - AssociateResource(child, childWindow); - } - - // New code to avoid the problem of duplicate ids and names. We simply - // traverse the child windows and child resources in parallel, - // checking for any mismatch. + wxItemResource *child = (wxItemResource *)node->Data(); + wxWindow* childWindow = (wxWindow*) node2->Data(); + + if (child->GetId() != childWindow->GetId()) + { + wxString msg; + msg.Printf("AssociateResource: error when associating child window %ld with resource %ld", child->GetId(), childWindow->GetId()); + wxMessageBox(msg, "Dialog Editor problem", wxOK); + } + else if (childWindow->GetName() != child->GetName()) + { + wxString msg; + msg.Printf("AssociateResource: error when associating child window with resource %s", child->GetName() ? (const char*) child->GetName() : "(unnamed)"); + wxMessageBox(msg, "Dialog Editor problem", wxOK); + } + else + { + AssociateResource(child, childWindow); + } + + // New code to avoid the problem of duplicate ids and names. We simply + // traverse the child windows and child resources in parallel, + // checking for any mismatch. #if 0 - wxWindow *childWindow = (wxWindow *)m_resourceAssociations.Get((long)child); - if (!childWindow) - // childWindow = win->FindWindow(child->GetName()); - childWindow = win->FindWindow(child->GetId()); - if (childWindow) - AssociateResource(child, childWindow); - else - { - wxString msg; - msg.Printf("AssociateResource: cannot find child window %s", child->GetName() ? (const char*) child->GetName() : "(unnamed)"); - wxMessageBox(msg, "Dialog Editor problem", wxOK); - } + wxWindow *childWindow = (wxWindow *)m_resourceAssociations.Get((long)child); + if (!childWindow) + // childWindow = win->FindWindow(child->GetName()); + childWindow = win->FindWindow(child->GetId()); + if (childWindow) + AssociateResource(child, childWindow); + else + { + wxString msg; + msg.Printf("AssociateResource: cannot find child window %s", child->GetName() ? (const char*) child->GetName() : "(unnamed)"); + wxMessageBox(msg, "Dialog Editor problem", wxOK); + } #endif - node = node->Next(); - node2 = node2->Next(); - } + node = node->Next(); + node2 = node2->Next(); + } } bool wxResourceManager::DisassociateResource(wxItemResource *resource) { - wxWindow *win = FindWindowForResource(resource); - if (!win) - return FALSE; - - // Disassociate children of window - wxNode *node = win->GetChildren().First(); - while (node) - { - wxWindow *child = (wxWindow *)node->Data(); - if (child->IsKindOf(CLASSINFO(wxControl))) - DisassociateResource(child); - node = node->Next(); - } - - RemoveSelection(win); - m_resourceAssociations.Delete((long)resource); - return TRUE; + wxWindow *win = FindWindowForResource(resource); + if (!win) + return FALSE; + + // Disassociate children of window + wxNode *node = win->GetChildren().First(); + while (node) + { + wxWindow *child = (wxWindow *)node->Data(); + if (child->IsKindOf(CLASSINFO(wxControl))) + DisassociateResource(child); + node = node->Next(); + } + + RemoveSelection(win); + m_resourceAssociations.Delete((long)resource); + return TRUE; } bool wxResourceManager::DisassociateResource(wxWindow *win) { - wxItemResource *res = FindResourceForWindow(win); - if (res) - return DisassociateResource(res); - else - return FALSE; + wxItemResource *res = FindResourceForWindow(win); + if (res) + return DisassociateResource(res); + else + return FALSE; } // Saves the window info into the resource, and deletes the @@ -610,23 +595,23 @@ bool wxResourceManager::DisassociateResource(wxWindow *win) bool wxResourceManager::SaveInfoAndDeleteHandler(wxWindow* win) { wxItemResource *res = FindResourceForWindow(win); - + if (win->IsKindOf(CLASSINFO(wxPanel))) { wxResourceEditorDialogHandler* handler = (wxResourceEditorDialogHandler*) win->GetEventHandler(); win->PopEventHandler(); - + // Now reset all child event handlers wxNode *node = win->GetChildren().First(); while ( node ) { - wxWindow *child = (wxWindow *)node->Data(); - wxEvtHandler *childHandler = child->GetEventHandler(); - if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler != child ) - { - child->PopEventHandler(TRUE); - } - node = node->Next(); + wxWindow *child = (wxWindow *)node->Data(); + wxEvtHandler *childHandler = child->GetEventHandler(); + if ( child->IsKindOf(CLASSINFO(wxControl)) && childHandler != child ) + { + child->PopEventHandler(TRUE); + } + node = node->Next(); } delete handler; } @@ -634,12 +619,12 @@ bool wxResourceManager::SaveInfoAndDeleteHandler(wxWindow* win) { win->PopEventHandler(TRUE); } - + // Save the information InstantiateResourceFromWindow(res, win, TRUE); - -// DisassociateResource(win); - + + // DisassociateResource(win); + return TRUE; } @@ -653,813 +638,948 @@ bool wxResourceManager::DeleteWindow(wxWindow* win) m_editorPanel->m_childWindow = NULL; clearDisplay = TRUE; } - + win->Destroy(); - + if (clearDisplay) m_editorPanel->Clear(); - + return TRUE; } wxItemResource *wxResourceManager::FindResourceForWindow(wxWindow *win) { - m_resourceAssociations.BeginFind(); - wxNode *node; - while ((node = m_resourceAssociations.Next())) - { - wxWindow *w = (wxWindow *)node->Data(); - if (w == win) + m_resourceAssociations.BeginFind(); + wxNode *node; + while ((node = m_resourceAssociations.Next())) { - return (wxItemResource *)node->GetKeyInteger(); + wxWindow *w = (wxWindow *)node->Data(); + if (w == win) + { + return (wxItemResource *)node->GetKeyInteger(); + } } - } - return NULL; + return NULL; } wxWindow *wxResourceManager::FindWindowForResource(wxItemResource *resource) { - return (wxWindow *)m_resourceAssociations.Get((long)resource); + return (wxWindow *)m_resourceAssociations.Get((long)resource); } void wxResourceManager::MakeUniqueName(char *prefix, char *buf) { - while (TRUE) - { - sprintf(buf, "%s%d", prefix, m_nameCounter); - m_nameCounter ++; - - if (!m_resourceTable.FindResource(buf)) - return; - } + while (TRUE) + { + sprintf(buf, "%s%d", prefix, m_nameCounter); + m_nameCounter ++; + + if (!m_resourceTable.FindResource(buf)) + return; + } } wxFrame *wxResourceManager::OnCreateEditorFrame(const char *title) { - /* - int frameWidth = 420; - int frameHeight = 300; - */ - - wxResourceEditorFrame *frame = new wxResourceEditorFrame(this, NULL, title, - wxPoint(m_resourceEditorWindowSize.x, m_resourceEditorWindowSize.y), - wxSize(m_resourceEditorWindowSize.width, m_resourceEditorWindowSize.height), - wxDEFAULT_FRAME_STYLE); - - frame->CreateStatusBar(1); - - frame->SetAutoLayout(TRUE); + wxResourceEditorFrame *frame = new wxResourceEditorFrame(this, NULL, title, + wxPoint(m_resourceEditorWindowSize.x, m_resourceEditorWindowSize.y), + wxSize(m_resourceEditorWindowSize.width, m_resourceEditorWindowSize.height), + wxDEFAULT_FRAME_STYLE); + + frame->CreateStatusBar(1); + + frame->SetAutoLayout(TRUE); #ifdef __WXMSW__ - frame->SetIcon(wxIcon("DIALOGEDICON")); + frame->SetIcon(wxIcon("DIALOGEDICON")); #endif - return frame; + return frame; } wxMenuBar *wxResourceManager::OnCreateEditorMenuBar(wxFrame *WXUNUSED(parent)) { - wxMenuBar *menuBar = new wxMenuBar; - - wxMenu *fileMenu = new wxMenu; - fileMenu->Append(RESED_NEW_DIALOG, "New &dialog", "Create a new dialog"); - fileMenu->AppendSeparator(); - fileMenu->Append(wxID_NEW, "&New project", "Clear the current project"); - fileMenu->Append(wxID_OPEN, "&Open...", "Load a resource file"); - fileMenu->Append(wxID_SAVE, "&Save", "Save a resource file"); - fileMenu->Append(wxID_SAVEAS, "Save &As...", "Save a resource file as..."); - fileMenu->Append(RESED_CLEAR, "&Clear", "Clear current resources"); - fileMenu->AppendSeparator(); - fileMenu->Append(wxID_EXIT, "E&xit", "Exit resource editor"); - - wxMenu *editMenu = new wxMenu; - editMenu->Append(RESED_TEST, "&Test Dialog", "Test dialog"); - editMenu->Append(RESED_RECREATE, "&Recreate", "Recreate the selected resource(s)"); - editMenu->Append(RESED_DELETE, "&Delete", "Delete the selected resource(s)"); - - wxMenu *helpMenu = new wxMenu; - helpMenu->Append(RESED_CONTENTS, "&Help topics", "Invokes the on-line help"); - helpMenu->AppendSeparator(); - helpMenu->Append(wxID_ABOUT, "&About", "About wxWindows Dialog Editor"); - - menuBar->Append(fileMenu, "&File"); - menuBar->Append(editMenu, "&Edit"); - menuBar->Append(helpMenu, "&Help"); - - return menuBar; + wxMenuBar *menuBar = new wxMenuBar; + + wxMenu *fileMenu = new wxMenu; + fileMenu->Append(RESED_NEW_DIALOG, "New &Dialog", "Create a new dialog"); + fileMenu->AppendSeparator(); + fileMenu->Append(wxID_NEW, "&New Project", "Clear the current project"); + fileMenu->Append(wxID_OPEN, "&Open...", "Load a resource file"); + fileMenu->Append(wxID_SAVE, "&Save", "Save a resource file"); + fileMenu->Append(wxID_SAVEAS, "Save &As...", "Save a resource file as..."); + fileMenu->Append(RESED_CLEAR, "&Clear", "Clear current resources"); + fileMenu->AppendSeparator(); + fileMenu->Append(RESED_CONVERT_WXRS, "Convert Old &Resources...", "Convert old resources to new"); + fileMenu->AppendSeparator(); + fileMenu->Append(wxID_EXIT, "E&xit", "Exit resource editor"); + + wxMenu *editMenu = new wxMenu; + editMenu->Append(RESED_TEST, "&Test Dialog", "Test dialog"); + editMenu->Append(RESED_RECREATE, "&Recreate", "Recreate the selected resource(s)"); + editMenu->Append(RESED_DELETE, "&Delete", "Delete the selected resource(s)"); + + wxMenu *helpMenu = new wxMenu; + helpMenu->Append(RESED_CONTENTS, "&Help Topics", "Invokes the on-line help"); + helpMenu->AppendSeparator(); + helpMenu->Append(wxID_ABOUT, "&About", "About wxWindows Dialog Editor"); + + menuBar->Append(fileMenu, "&File"); + menuBar->Append(editMenu, "&Edit"); + menuBar->Append(helpMenu, "&Help"); + + return menuBar; } wxResourceEditorScrolledWindow *wxResourceManager::OnCreateEditorPanel(wxFrame *parent) { - wxResourceEditorScrolledWindow *panel = new wxResourceEditorScrolledWindow(parent, wxDefaultPosition, wxDefaultSize, -// wxSUNKEN_BORDER|wxCLIP_CHILDREN); + wxResourceEditorScrolledWindow *panel = new wxResourceEditorScrolledWindow(parent, wxDefaultPosition, wxDefaultSize, + // wxSUNKEN_BORDER|wxCLIP_CHILDREN); #ifdef __WXMOTIF__ - wxBORDER); + wxBORDER); #else wxSUNKEN_BORDER); #endif - - panel->SetScrollbars(10, 10, 100, 100); - - return panel; + + panel->SetScrollbars(10, 10, 100, 100); + + return panel; } wxToolBar *wxResourceManager::OnCreateToolBar(wxFrame *parent) { - // Load palette bitmaps + // Load palette bitmaps #ifdef __WXMSW__ - wxBitmap ToolbarLoadBitmap("LOADTOOL"); - wxBitmap ToolbarSaveBitmap("SAVETOOL"); - wxBitmap ToolbarNewBitmap("NEWTOOL"); - wxBitmap ToolbarVertBitmap("VERTTOOL"); - wxBitmap ToolbarAlignTBitmap("ALIGNTTOOL"); - wxBitmap ToolbarAlignBBitmap("ALIGNBTOOL"); - wxBitmap ToolbarHorizBitmap("HORIZTOOL"); - wxBitmap ToolbarAlignLBitmap("ALIGNLTOOL"); - wxBitmap ToolbarAlignRBitmap("ALIGNRTOOL"); - wxBitmap ToolbarCopySizeBitmap("COPYSIZETOOL"); - wxBitmap ToolbarToBackBitmap("TOBACKTOOL"); - wxBitmap ToolbarToFrontBitmap("TOFRONTTOOL"); - wxBitmap ToolbarHelpBitmap("HELPTOOL"); + wxBitmap ToolbarLoadBitmap("LOADTOOL"); + wxBitmap ToolbarSaveBitmap("SAVETOOL"); + wxBitmap ToolbarNewBitmap("NEWTOOL"); + wxBitmap ToolbarVertBitmap("VERTTOOL"); + wxBitmap ToolbarAlignTBitmap("ALIGNTTOOL"); + wxBitmap ToolbarAlignBBitmap("ALIGNBTOOL"); + wxBitmap ToolbarHorizBitmap("HORIZTOOL"); + wxBitmap ToolbarAlignLBitmap("ALIGNLTOOL"); + wxBitmap ToolbarAlignRBitmap("ALIGNRTOOL"); + wxBitmap ToolbarCopySizeBitmap("COPYSIZETOOL"); + wxBitmap ToolbarToBackBitmap("TOBACKTOOL"); + wxBitmap ToolbarToFrontBitmap("TOFRONTTOOL"); + wxBitmap ToolbarHelpBitmap("HELPTOOL"); + wxBitmap ToolbarCopyWidthBitmap("COPYWIDTHTOOL"); + wxBitmap ToolbarCopyHeightBitmap("COPYHEIGHTTOOL"); + wxBitmap ToolbarDistributeHorizBitmap("DISTHORIZTOOL"); + wxBitmap ToolbarDistributeVertBitmap("DISTVERTTOOL"); #endif #if defined(__WXGTK__) || defined(__WXMOTIF__) - wxBitmap ToolbarLoadBitmap( load_xpm ); - wxBitmap ToolbarSaveBitmap( save_xpm); - wxBitmap ToolbarNewBitmap( new_xpm ); - wxBitmap ToolbarVertBitmap( vert_xpm ); - wxBitmap ToolbarAlignTBitmap( alignt_xpm ); - wxBitmap ToolbarAlignBBitmap( alignb_xpm ); - wxBitmap ToolbarHorizBitmap( horiz_xpm ); - wxBitmap ToolbarAlignLBitmap( alignl_xpm ); - wxBitmap ToolbarAlignRBitmap( alignr_xpm ); - wxBitmap ToolbarCopySizeBitmap( copysize_xpm ); - wxBitmap ToolbarToBackBitmap( toback_xpm ); - wxBitmap ToolbarToFrontBitmap( tofront_xpm ); - wxBitmap ToolbarHelpBitmap( help_xpm ); + wxBitmap ToolbarLoadBitmap( load_xpm ); + wxBitmap ToolbarSaveBitmap( save_xpm); + wxBitmap ToolbarNewBitmap( new_xpm ); + wxBitmap ToolbarVertBitmap( vert_xpm ); + wxBitmap ToolbarAlignTBitmap( alignt_xpm ); + wxBitmap ToolbarAlignBBitmap( alignb_xpm ); + wxBitmap ToolbarHorizBitmap( horiz_xpm ); + wxBitmap ToolbarAlignLBitmap( alignl_xpm ); + wxBitmap ToolbarAlignRBitmap( alignr_xpm ); + wxBitmap ToolbarCopySizeBitmap( copysize_xpm ); + wxBitmap ToolbarToBackBitmap( toback_xpm ); + wxBitmap ToolbarToFrontBitmap( tofront_xpm ); + wxBitmap ToolbarHelpBitmap( help_xpm ); + wxBitmap ToolbarCopyWidthBitmap(copywdth_xpm); + wxBitmap ToolbarCopyHeightBitmap(copyhght_xpm); + wxBitmap ToolbarDistributeHorizBitmap(disthor_xpm); + wxBitmap ToolbarDistributeVertBitmap(distvert_xpm); #endif - - // Create the toolbar - EditorToolBar *toolbar = new EditorToolBar(parent, wxPoint(0, 0), wxSize(-1, -1), wxNO_BORDER|wxTB_HORIZONTAL); - toolbar->SetMargins(2, 2); - + + // Create the toolbar + EditorToolBar *toolbar = new EditorToolBar(parent, wxPoint(0, 0), wxSize(-1, -1), wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT); + toolbar->SetMargins(2, 2); + #ifdef __WXMSW__ - int width = 24; - int dx = 2; - int gap = 6; + int width = 24; + int dx = 2; + int gap = 6; #else - int width = 24; // ToolbarLoadBitmap->GetWidth(); ??? - int dx = 2; - int gap = 6; + int width = 24; // ToolbarLoadBitmap->GetWidth(); ??? + int dx = 2; + int gap = 6; #endif - int currentX = gap; - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_NEW, ToolbarNewBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "New dialog"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_LOAD_FILE, ToolbarLoadBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Load"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_SAVE_FILE, ToolbarSaveBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Save"); - currentX += width + dx + gap; - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_FORMAT_HORIZ, ToolbarVertBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Horizontal align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_VERT_TOP_ALIGN, ToolbarAlignTBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Top align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_VERT_BOT_ALIGN, ToolbarAlignBBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Bottom align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_VERT, ToolbarHorizBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Vertical align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN, ToolbarAlignLBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Left align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN, ToolbarAlignRBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Right align"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_COPY_SIZE, ToolbarCopySizeBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Copy size"); - currentX += width + dx + gap; - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_TO_FRONT, ToolbarToFrontBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "To front"); - currentX += width + dx; - toolbar->AddTool(TOOLBAR_TO_BACK, ToolbarToBackBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "To back"); - currentX += width + dx + gap; - - toolbar->AddSeparator(); - toolbar->AddTool(TOOLBAR_HELP, ToolbarHelpBitmap, wxNullBitmap, - FALSE, currentX, -1, NULL, "Help"); - currentX += width + dx; - - toolbar->Realize(); - - return toolbar; + int currentX = gap; + //toolbar->AddSeparator(); + toolbar->AddTool(TOOLBAR_NEW, ToolbarNewBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "New dialog"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_LOAD_FILE, ToolbarLoadBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Load"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_SAVE_FILE, ToolbarSaveBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Save"); + currentX += width + dx + gap; + toolbar->AddSeparator(); + toolbar->AddTool(TOOLBAR_FORMAT_HORIZ, ToolbarVertBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Horizontal align"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_FORMAT_VERT_TOP_ALIGN, ToolbarAlignTBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Top align"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_FORMAT_VERT_BOT_ALIGN, ToolbarAlignBBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Bottom align"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_FORMAT_VERT, ToolbarHorizBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Vertical align"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN, ToolbarAlignLBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Left align"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN, ToolbarAlignRBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Right align"); + currentX += width + dx + gap; + toolbar->AddSeparator(); + toolbar->AddTool(TOOLBAR_COPY_SIZE, ToolbarCopySizeBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Copy size"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_COPY_WIDTH, ToolbarCopyWidthBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Copy width"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_COPY_HEIGHT, ToolbarCopyHeightBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Copy height"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_DISTRIBUTE_HORIZ, ToolbarDistributeHorizBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Distribute horizontally"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_DISTRIBUTE_VERT, ToolbarDistributeVertBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Distribute vertically"); + currentX += width + dx + gap; + toolbar->AddSeparator(); + toolbar->AddTool(TOOLBAR_TO_FRONT, ToolbarToFrontBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "To front"); + currentX += width + dx; + toolbar->AddTool(TOOLBAR_TO_BACK, ToolbarToBackBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "To back"); + currentX += width + dx + gap; + + toolbar->AddSeparator(); + toolbar->AddTool(TOOLBAR_HELP, ToolbarHelpBitmap, wxNullBitmap, + FALSE, currentX, -1, NULL, "Help"); + currentX += width + dx; + + toolbar->Realize(); + + return toolbar; } void wxResourceManager::UpdateResourceList() { - if (!m_editorResourceTree) - return; - - m_editorResourceTree->SetInvalid(TRUE); - m_editorResourceTree->DeleteAllItems(); - - long id = m_editorResourceTree->AddRoot("Dialogs", 1, 2); - - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel" || resType == "wxBitmap") + if (!m_editorResourceTree) + return; + + m_editorResourceTree->SetInvalid(TRUE); + m_editorResourceTree->DeleteAllItems(); + + long id = m_editorResourceTree->AddRoot("Dialogs", 1, 2); + + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - AddItemsRecursively(id, res); + wxItemResource *res = (wxItemResource *)node->Data(); + wxString resType(res->GetType()); + if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel" || resType == "wxBitmap") + { + AddItemsRecursively(id, res); + } } - } - m_editorResourceTree->Expand(id); - m_editorResourceTree->SetInvalid(FALSE); + m_editorResourceTree->Expand(id); + m_editorResourceTree->SetInvalid(FALSE); } void wxResourceManager::AddItemsRecursively(long parent, wxItemResource *resource) { - wxString theString(""); - theString = resource->GetName(); - - int imageId = 0; - wxString resType(resource->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") - imageId = 0; - else - imageId = 3; - - long id = m_editorResourceTree->AppendItem(parent, theString, imageId ); - - m_editorResourceTree->SetItemData(id, new wxResourceTreeData(resource)); - - if (strcmp(resource->GetType(), "wxBitmap") != 0) - { - wxNode *node = resource->GetChildren().First(); - while (node) + wxString theString(""); + theString = resource->GetName(); + + int imageId = 0; + wxString resType(resource->GetType()); + if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") + imageId = 0; + else + imageId = 3; + + long id = m_editorResourceTree->AppendItem(parent, theString, imageId ); + + m_editorResourceTree->SetItemData(id, new wxResourceTreeData(resource)); + + if (strcmp(resource->GetType(), "wxBitmap") != 0) { - wxItemResource *res = (wxItemResource *)node->Data(); - AddItemsRecursively(id, res); - node = node->Next(); + wxNode *node = resource->GetChildren().First(); + while (node) + { + wxItemResource *res = (wxItemResource *)node->Data(); + AddItemsRecursively(id, res); + node = node->Next(); + } } - } -// m_editorResourceTree->ExpandItem(id, wxTREE_EXPAND_EXPAND); + // m_editorResourceTree->ExpandItem(id, wxTREE_EXPAND_EXPAND); } bool wxResourceManager::EditSelectedResource() { - int sel = m_editorResourceTree->GetSelection(); - if (sel != 0) - { - wxResourceTreeData *data = (wxResourceTreeData *)m_editorResourceTree->GetItemData(sel); - wxItemResource *res = data->GetResource(); - return Edit(res); - } - return FALSE; + int sel = m_editorResourceTree->GetSelection(); + if (sel != 0) + { + wxResourceTreeData *data = (wxResourceTreeData *)m_editorResourceTree->GetItemData(sel); + wxItemResource *res = data->GetResource(); + return Edit(res); + } + return FALSE; } bool wxResourceManager::Edit(wxItemResource *res) { - wxPropertyInfo::CloseWindow(); - - ClearCurrentDialog(); - - wxString resType(res->GetType()); - wxPanel *panel = (wxPanel *)FindWindowForResource(res); - - if (panel) - { - wxMessageBox("Should not find panel in wxResourceManager::Edit"); - return FALSE; - } - else - { -// long style = res->GetStyle(); -// res->SetStyle(style|wxRAISED_BORDER); + wxPropertyInfo::CloseWindow(); + + ClearCurrentDialog(); + + wxString resType(res->GetType()); + wxPanel *panel = (wxPanel *)FindWindowForResource(res); + + if (panel) + { + wxMessageBox("Should not find panel in wxResourceManager::Edit"); + return FALSE; + } + else + { + // long style = res->GetStyle(); + // res->SetStyle(style|wxRAISED_BORDER); panel = new wxPanel; wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, res, panel->GetEventHandler(), - this); - + this); + panel->LoadFromResource(m_editorPanel, res->GetName(), &m_resourceTable); - + panel->PushEventHandler(handler); - -// res->SetStyle(style); - handler->AddChildHandlers(); // Add event handlers for all controls + + // res->SetStyle(style); + handler->AddChildHandlers(); // Add event handlers for all controls AssociateResource(res, panel); - + m_editorPanel->m_childWindow = panel; panel->Move(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY()); panel->Show(TRUE); panel->Refresh(); - + wxClientDC dc(m_editorPanel); m_editorPanel->DrawTitle(dc); - } - return FALSE; + } + return FALSE; } bool wxResourceManager::CreateNewPanel() { - wxPropertyInfo::CloseWindow(); - - ClearCurrentDialog(); - - char buf[256]; - MakeUniqueName("dialog", buf); - - wxItemResource *resource = new wxItemResource; - resource->SetType("wxDialog"); - resource->SetName(buf); - resource->SetTitle(buf); - resource->SetResourceStyle(wxRESOURCE_USE_DEFAULTS); - resource->SetResourceStyle(wxRESOURCE_DIALOG_UNITS); - - wxString newIdName; - int id = GenerateWindowId("ID_DIALOG", newIdName); - resource->SetId(id); - - // This is now guaranteed to be unique, so just add to symbol table - m_symbolTable.AddSymbol(newIdName, id); - - m_resourceTable.AddResource(resource); - - wxSize size(400, 300); - - wxPanel *panel = new wxPanel(m_editorPanel, -1, - wxPoint(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY()), - size, wxRAISED_BORDER|wxDEFAULT_DIALOG_STYLE, buf); - m_editorPanel->m_childWindow = panel; - - resource->SetStyle(panel->GetWindowStyleFlag()); - - // Store dialog units in resource - size = panel->ConvertPixelsToDialog(size); - - resource->SetSize(10, 10, size.x, size.y); - - // For editing in situ we will need to use the hash table to ensure - // we don't dereference invalid pointers. -// resourceWindowTable.Put((long)resource, panel); - - wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, resource, panel->GetEventHandler(), - this); - panel->PushEventHandler(handler); - - AssociateResource(resource, panel); - UpdateResourceList(); - - Modify(TRUE); - m_editorPanel->m_childWindow->Refresh(); - -// panel->Refresh(); - - wxClientDC dc(m_editorPanel); - m_editorPanel->DrawTitle(dc); - - return TRUE; + wxPropertyInfo::CloseWindow(); + + ClearCurrentDialog(); + + char buf[256]; + MakeUniqueName("dialog", buf); + + wxItemResource *resource = new wxItemResource; + resource->SetType("wxDialog"); + resource->SetName(buf); + resource->SetTitle(buf); + resource->SetResourceStyle(wxRESOURCE_USE_DEFAULTS); + resource->SetResourceStyle(wxRESOURCE_DIALOG_UNITS); + + wxString newIdName; + int id = GenerateWindowId("ID_DIALOG", newIdName); + resource->SetId(id); + + // This is now guaranteed to be unique, so just add to symbol table + m_symbolTable.AddSymbol(newIdName, id); + + m_resourceTable.AddResource(resource); + + wxSize size(400, 300); + + wxPanel *panel = new wxPanel(m_editorPanel, -1, + wxPoint(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY()), + size, wxRAISED_BORDER|wxDEFAULT_DIALOG_STYLE, buf); + m_editorPanel->m_childWindow = panel; + + resource->SetStyle(panel->GetWindowStyleFlag()); + + // Store dialog units in resource + size = panel->ConvertPixelsToDialog(size); + + resource->SetSize(10, 10, size.x, size.y); + + // For editing in situ we will need to use the hash table to ensure + // we don't dereference invalid pointers. + // resourceWindowTable.Put((long)resource, panel); + + wxResourceEditorDialogHandler *handler = new wxResourceEditorDialogHandler(panel, resource, panel->GetEventHandler(), + this); + panel->PushEventHandler(handler); + + AssociateResource(resource, panel); + UpdateResourceList(); + + Modify(TRUE); + m_editorPanel->m_childWindow->Refresh(); + + // panel->Refresh(); + + wxClientDC dc(m_editorPanel); + m_editorPanel->DrawTitle(dc); + + return TRUE; } bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *panel, char *iType, int x, int y, bool isBitmap) { - char buf[256]; - if (!panel->IsKindOf(CLASSINFO(wxPanel)) && !panel->IsKindOf(CLASSINFO(wxDialog))) - return FALSE; - - Modify(TRUE); - - wxItemResource *res = new wxItemResource; - wxControl *newItem = NULL; - - if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) - { - wxPoint pt = panel->ConvertPixelsToDialog(wxPoint(x, y)); - res->SetSize(pt.x, pt.y, -1, -1); - } - else res->SetSize(x, y, -1, -1); - - res->SetType(iType); - - wxString prefix; - - wxString itemType(iType); - - if (itemType == "wxButton") + char buf[256]; + if (!panel->IsKindOf(CLASSINFO(wxPanel)) && !panel->IsKindOf(CLASSINFO(wxDialog))) + return FALSE; + + Modify(TRUE); + + wxItemResource *res = new wxItemResource; + wxControl *newItem = NULL; + + if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) { - prefix = "ID_BUTTON"; - MakeUniqueName("button", buf); - res->SetName(buf); - if (isBitmap) + wxPoint pt = panel->ConvertPixelsToDialog(wxPoint(x, y)); + res->SetSize(pt.x, pt.y, -1, -1); + } + else res->SetSize(x, y, -1, -1); + + res->SetType(iType); + + wxString prefix; + + wxString itemType(iType); + + if (itemType == "wxButton") + { + prefix = "ID_BUTTON"; + MakeUniqueName("button", buf); + res->SetName(buf); + if (isBitmap) + newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), wxBU_AUTODRAW, wxDefaultValidator, buf); + else + newItem = new wxButton(panel, -1, "Button", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); + } + if (itemType == "wxBitmapButton") + { + prefix = "ID_BITMAPBUTTON"; + MakeUniqueName("button", buf); + res->SetName(buf); newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), wxBU_AUTODRAW, wxDefaultValidator, buf); - else - newItem = new wxButton(panel, -1, "Button", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); } - if (itemType == "wxBitmapButton") + else if (itemType == "wxMessage" || itemType == "wxStaticText") { - prefix = "ID_BITMAPBUTTON"; - MakeUniqueName("button", buf); - res->SetName(buf); - newItem = new wxBitmapButton(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), wxBU_AUTODRAW, wxDefaultValidator, buf); + prefix = "ID_STATIC"; + MakeUniqueName("statictext", buf); + res->SetName(buf); + if (isBitmap) + newItem = new wxStaticBitmap(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(0, 0), 0, buf); + else + newItem = new wxStaticText(panel, -1, "Static", wxPoint(x, y), wxSize(-1, -1), 0, buf); } - else if (itemType == "wxMessage" || itemType == "wxStaticText") + else if (itemType == "wxStaticBitmap") { - prefix = "ID_STATIC"; - MakeUniqueName("statictext", buf); - res->SetName(buf); - if (isBitmap) - newItem = new wxStaticBitmap(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(0, 0), 0, buf); - else - newItem = new wxStaticText(panel, -1, "Static", wxPoint(x, y), wxSize(-1, -1), 0, buf); + prefix = "ID_STATICBITMAP"; + MakeUniqueName("static", buf); + res->SetName(buf); + newItem = new wxStaticBitmap(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, buf); } - else if (itemType == "wxStaticBitmap") + else if (itemType == "wxCheckBox") { - prefix = "ID_STATICBITMAP"; - MakeUniqueName("static", buf); - res->SetName(buf); - newItem = new wxStaticBitmap(panel, -1, * m_bitmapImage, wxPoint(x, y), wxSize(-1, -1), 0, buf); + prefix = "ID_CHECKBOX"; + MakeUniqueName("checkbox", buf); + res->SetName(buf); + newItem = new wxCheckBox(panel, -1, "Checkbox", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); } - else if (itemType == "wxCheckBox") + else if (itemType == "wxListBox") { - prefix = "ID_CHECKBOX"; - MakeUniqueName("checkbox", buf); - res->SetName(buf); - newItem = new wxCheckBox(panel, -1, "Checkbox", wxPoint(x, y), wxSize(-1, -1), 0, wxDefaultValidator, buf); + prefix = "ID_LISTBOX"; + MakeUniqueName("listbox", buf); + res->SetName(buf); + newItem = new wxListBox(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf); } - else if (itemType == "wxListBox") + else if (itemType == "wxRadioBox") { - prefix = "ID_LISTBOX"; - MakeUniqueName("listbox", buf); - res->SetName(buf); - newItem = new wxListBox(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf); + prefix = "ID_RADIOBOX"; + MakeUniqueName("radiobox", buf); + res->SetName(buf); + wxString names[] = { "One", "Two" }; + newItem = new wxRadioBox(panel, -1, "Radiobox", wxPoint(x, y), wxSize(-1, -1), 2, names, 2, + wxHORIZONTAL, wxDefaultValidator, buf); + res->SetStringValues(wxStringList("One", "Two", NULL)); } - else if (itemType == "wxRadioBox") + else if (itemType == "wxRadioButton") { - prefix = "ID_RADIOBOX"; - MakeUniqueName("radiobox", buf); - res->SetName(buf); - wxString names[] = { "One", "Two" }; - newItem = new wxRadioBox(panel, -1, "Radiobox", wxPoint(x, y), wxSize(-1, -1), 2, names, 2, - wxHORIZONTAL, wxDefaultValidator, buf); - res->SetStringValues(wxStringList("One", "Two", NULL)); + prefix = "ID_RADIOBUTTON"; + MakeUniqueName("radiobutton", buf); + res->SetName(buf); + wxString names[] = { "One", "Two" }; + newItem = new wxRadioButton(panel, -1, "Radiobutton", wxPoint(x, y), wxSize(-1, -1), + 0, wxDefaultValidator, buf); } - else if (itemType == "wxRadioButton") + else if (itemType == "wxChoice") { - prefix = "ID_RADIOBUTTON"; - MakeUniqueName("radiobutton", buf); - res->SetName(buf); - wxString names[] = { "One", "Two" }; - newItem = new wxRadioButton(panel, -1, "Radiobutton", wxPoint(x, y), wxSize(-1, -1), - 0, wxDefaultValidator, buf); + prefix = "ID_CHOICE"; + MakeUniqueName("choice", buf); + res->SetName(buf); + newItem = new wxChoice(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf); } - else if (itemType == "wxChoice") + else if (itemType == "wxComboBox") { - prefix = "ID_CHOICE"; - MakeUniqueName("choice", buf); - res->SetName(buf); - newItem = new wxChoice(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf); + prefix = "ID_COMBOBOX"; + MakeUniqueName("combobox", buf); + res->SetName(buf); + newItem = new wxComboBox(panel, -1, "", wxPoint(x, y), wxSize(-1, -1), 0, NULL, wxCB_DROPDOWN, wxDefaultValidator, buf); } - else if (itemType == "wxComboBox") + else if (itemType == "wxGroupBox" || itemType == "wxStaticBox") { - prefix = "ID_COMBOBOX"; - MakeUniqueName("combobox", buf); - res->SetName(buf); - newItem = new wxComboBox(panel, -1, "", wxPoint(x, y), wxSize(-1, -1), 0, NULL, wxCB_DROPDOWN, wxDefaultValidator, buf); + prefix = "ID_STATICBOX"; + MakeUniqueName("staticbox", buf); + res->SetName(buf); + newItem = new wxStaticBox(panel, -1, "Static", wxPoint(x, y), wxSize(200, 200), 0, buf); } - else if (itemType == "wxGroupBox" || itemType == "wxStaticBox") + else if (itemType == "wxGauge") { - prefix = "ID_STATICBOX"; - MakeUniqueName("staticbox", buf); - res->SetName(buf); - newItem = new wxStaticBox(panel, -1, "Static", wxPoint(x, y), wxSize(200, 200), 0, buf); + prefix = "ID_GAUGE"; + MakeUniqueName("gauge", buf); + res->SetName(buf); + newItem = new wxGauge(panel, -1, 10, wxPoint(x, y), wxSize(80, 30), wxHORIZONTAL, wxDefaultValidator, buf); } - else if (itemType == "wxGauge") + else if (itemType == "wxSlider") { - prefix = "ID_GAUGE"; - MakeUniqueName("gauge", buf); - res->SetName(buf); - newItem = new wxGauge(panel, -1, 10, wxPoint(x, y), wxSize(80, 30), wxHORIZONTAL, wxDefaultValidator, buf); + prefix = "ID_SLIDER"; + MakeUniqueName("slider", buf); + res->SetName(buf); + newItem = new wxSlider(panel, -1, 1, 1, 10, wxPoint(x, y), wxSize(120, -1), wxHORIZONTAL, wxDefaultValidator, buf); } - else if (itemType == "wxSlider") + else if (itemType == "wxText" || itemType == "wxTextCtrl (single-line)") { - prefix = "ID_SLIDER"; - MakeUniqueName("slider", buf); - res->SetName(buf); - newItem = new wxSlider(panel, -1, 1, 1, 10, wxPoint(x, y), wxSize(120, -1), wxHORIZONTAL, wxDefaultValidator, buf); + prefix = "ID_TEXTCTRL"; + MakeUniqueName("textctrl", buf); + res->SetName(buf); + res->SetType("wxTextCtrl"); + newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, -1), 0, wxDefaultValidator, buf); } - else if (itemType == "wxText" || itemType == "wxTextCtrl (single-line)") + else if (itemType == "wxMultiText" || itemType == "wxTextCtrl (multi-line)") { - prefix = "ID_TEXTCTRL"; - MakeUniqueName("textctrl", buf); - res->SetName(buf); - res->SetType("wxTextCtrl"); - newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, -1), 0, wxDefaultValidator, buf); + prefix = "ID_TEXTCTRL"; + MakeUniqueName("textctrl", buf); + res->SetName(buf); + res->SetType("wxTextCtrl"); + newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, 100), wxTE_MULTILINE, wxDefaultValidator, buf); } - else if (itemType == "wxMultiText" || itemType == "wxTextCtrl (multi-line)") + else if (itemType == "wxScrollBar") { - prefix = "ID_TEXTCTRL"; - MakeUniqueName("textctrl", buf); - res->SetName(buf); - res->SetType("wxTextCtrl"); - newItem = new wxTextCtrl(panel, -1, "", wxPoint(x, y), wxSize(120, 100), wxTE_MULTILINE, wxDefaultValidator, buf); + prefix = "ID_SCROLLBAR"; + MakeUniqueName("scrollbar", buf); + res->SetName(buf); + newItem = new wxScrollBar(panel, -1, wxPoint(x, y), wxSize(140, -1), wxHORIZONTAL, wxDefaultValidator, buf); } - else if (itemType == "wxScrollBar") + if (!newItem) + return FALSE; + + int actualW, actualH; + newItem->GetSize(&actualW, &actualH); + wxSize actualSize(actualW, actualH); + + if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) { - prefix = "ID_SCROLLBAR"; - MakeUniqueName("scrollbar", buf); - res->SetName(buf); - newItem = new wxScrollBar(panel, -1, wxPoint(x, y), wxSize(140, -1), wxHORIZONTAL, wxDefaultValidator, buf); + actualSize = panel->ConvertPixelsToDialog(actualSize); } - if (!newItem) - return FALSE; - - int actualW, actualH; - newItem->GetSize(&actualW, &actualH); - wxSize actualSize(actualW, actualH); - - if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) - { - actualSize = panel->ConvertPixelsToDialog(actualSize); - } - res->SetSize(res->GetX(), res->GetY(), actualSize.x, actualSize.y); - - wxString newIdName; - int id = GenerateWindowId(prefix, newIdName); - res->SetId(id); - - // This is now guaranteed to be unique, so just add to symbol table - m_symbolTable.AddSymbol(newIdName, id); - - newItem->PushEventHandler(new wxResourceEditorControlHandler(newItem, newItem)); - - res->SetStyle(newItem->GetWindowStyleFlag()); - AssociateResource(res, newItem); - panelResource->GetChildren().Append(res); - - UpdateResourceList(); - - return TRUE; + res->SetSize(res->GetX(), res->GetY(), actualSize.x, actualSize.y); + + wxString newIdName; + int id = GenerateWindowId(prefix, newIdName); + res->SetId(id); + + // This is now guaranteed to be unique, so just add to symbol table + m_symbolTable.AddSymbol(newIdName, id); + + newItem->PushEventHandler(new wxResourceEditorControlHandler(newItem, newItem)); + + res->SetStyle(newItem->GetWindowStyleFlag()); + AssociateResource(res, newItem); + panelResource->GetChildren().Append(res); + + UpdateResourceList(); + + return TRUE; } void wxResourceManager::ClearCurrentDialog() { - if (m_editorPanel->m_childWindow) - { - SaveInfoAndDeleteHandler(m_editorPanel->m_childWindow); - DisassociateResource(m_editorPanel->m_childWindow); - DeleteWindow(m_editorPanel->m_childWindow); - m_editorPanel->m_childWindow = NULL; - m_editorPanel->Clear(); - } + if (m_editorPanel->m_childWindow) + { + SaveInfoAndDeleteHandler(m_editorPanel->m_childWindow); + DisassociateResource(m_editorPanel->m_childWindow); + DeleteWindow(m_editorPanel->m_childWindow); + m_editorPanel->m_childWindow = NULL; + m_editorPanel->Clear(); + } } bool wxResourceManager::TestCurrentDialog(wxWindow* parent) { - if (m_editorPanel->m_childWindow) - { - wxItemResource* item = FindResourceForWindow(m_editorPanel->m_childWindow); - if (!item) - return FALSE; - - // Make sure the resources are up-to-date w.r.t. the window - InstantiateResourceFromWindow(item, m_editorPanel->m_childWindow, TRUE); - - wxDialog* dialog = new wxDialog; - bool success = FALSE; - if (dialog->LoadFromResource(parent, item->GetName(), & m_resourceTable)) + if (m_editorPanel->m_childWindow) { - dialog->Centre(); - dialog->ShowModal(); - success = TRUE; + wxItemResource* item = FindResourceForWindow(m_editorPanel->m_childWindow); + if (!item) + return FALSE; + + // Make sure the resources are up-to-date w.r.t. the window + InstantiateResourceFromWindow(item, m_editorPanel->m_childWindow, TRUE); + + ResourceEditorDialogTester* dialog = new ResourceEditorDialogTester; + bool success = FALSE; + if (dialog->LoadFromResource(parent, item->GetName(), & m_resourceTable)) + { + dialog->Centre(); + dialog->ShowModal(); + success = TRUE; + } + return success; } - return success; - } - return FALSE; + return FALSE; } // Find the first dialog or panel for which // there is a selected panel item. wxWindow *wxResourceManager::FindParentOfSelection() { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxWindow *win = FindWindowForResource(res); - if (win) + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - wxNode *node1 = win->GetChildren().First(); - while (node1) - { - wxControl *item = (wxControl *)node1->Data(); - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected()) - return win; - node1 = node1->Next(); - } + wxItemResource *res = (wxItemResource *)node->Data(); + wxWindow *win = FindWindowForResource(res); + if (win) + { + wxNode *node1 = win->GetChildren().First(); + while (node1) + { + wxControl *item = (wxControl *)node1->Data(); + wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + if (item->IsKindOf(CLASSINFO(wxControl)) && childHandler->IsSelected()) + return win; + node1 = node1->Next(); + } + } } - } - return NULL; + return NULL; } // Format the panel items according to 'flag' void wxResourceManager::AlignItems(int flag) { - wxWindow *win = FindParentOfSelection(); - if (!win) - return; - - wxNode *node = GetSelections().First(); - if (!node) - return; + wxWindow *win = FindParentOfSelection(); + if (!win) + return; - wxControl *firstSelection = (wxControl *)node->Data(); - if (firstSelection->GetParent() != win) - return; + wxNode *node = GetSelections().First(); + if (!node) + return; - int firstX, firstY; - int firstW, firstH; - firstSelection->GetPosition(&firstX, &firstY); - firstSelection->GetSize(&firstW, &firstH); - int centreX = (int)(firstX + (firstW / 2)); - int centreY = (int)(firstY + (firstH / 2)); - - while ((node = node->Next())) - { - wxControl *item = (wxControl *)node->Data(); - if (item->GetParent() == win) + wxControl *firstSelection = (wxControl *)node->Data(); + if (firstSelection->GetParent() != win) + return; + + int firstX, firstY; + int firstW, firstH; + firstSelection->GetPosition(&firstX, &firstY); + firstSelection->GetSize(&firstW, &firstH); + int centreX = (int)(firstX + (firstW / 2)); + int centreY = (int)(firstY + (firstH / 2)); + + while ((node = node->Next())) { - int x, y, w, h; - item->GetPosition(&x, &y); - item->GetSize(&w, &h); - - int newX, newY; - - switch (flag) - { - case TOOLBAR_FORMAT_HORIZ: + wxControl *item = (wxControl *)node->Data(); + if (item->GetParent() == win) { - newX = x; - newY = (int)(centreY - (h/2.0)); - break; + int x, y, w, h; + item->GetPosition(&x, &y); + item->GetSize(&w, &h); + + int newX, newY; + + switch (flag) + { + case TOOLBAR_FORMAT_HORIZ: + { + newX = x; + newY = (int)(centreY - (h/2.0)); + break; + } + case TOOLBAR_FORMAT_VERT: + { + newX = (int)(centreX - (w/2.0)); + newY = y; + break; + } + case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN: + { + newX = firstX; + newY = y; + break; + } + case TOOLBAR_FORMAT_VERT_TOP_ALIGN: + { + newX = x; + newY = firstY; + break; + } + case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN: + { + newX = firstX + firstW - w; + newY = y; + break; + } + case TOOLBAR_FORMAT_VERT_BOT_ALIGN: + { + newX = x; + newY = firstY + firstH - h; + break; + } + default: + newX = x; newY = y; + break; + } + + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item); + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent()); + + item->SetSize(newX, newY, w, h); + + // Also update the associated resource + // We need to convert to dialog units if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = item->GetParent()->ConvertPixelsToDialog(wxPoint(newX, newY)); + newX = pt.x; newY = pt.y; + wxSize sz = item->GetParent()->ConvertPixelsToDialog(wxSize(w, h)); + w = sz.x; h = sz.y; + } + resource->SetSize(newX, newY, w, h); } - case TOOLBAR_FORMAT_VERT: - { - newX = (int)(centreX - (w/2.0)); - newY = y; - break; - } - case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN: - { - newX = firstX; - newY = y; - break; - } - case TOOLBAR_FORMAT_VERT_TOP_ALIGN: - { - newX = x; - newY = firstY; - break; - } - case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN: - { - newX = firstX + firstW - w; - newY = y; - break; - } - case TOOLBAR_FORMAT_VERT_BOT_ALIGN: - { - newX = x; - newY = firstY + firstH - h; - break; - } - default: - newX = x; newY = y; - break; - } - - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item); - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent()); - - item->SetSize(newX, newY, w, h); - - // Also update the associated resource - // We need to convert to dialog units if this is not a dialog or panel, but - // the parent resource specifies dialog units. - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = item->GetParent()->ConvertPixelsToDialog(wxPoint(newX, newY)); - newX = pt.x; newY = pt.y; - wxSize sz = item->GetParent()->ConvertPixelsToDialog(wxSize(w, h)); - w = sz.x; h = sz.y; - } - resource->SetSize(newX, newY, w, h); } - } - win->Refresh(); + win->Refresh(); } // Copy the first image's size to subsequent images -void wxResourceManager::CopySize() +void wxResourceManager::CopySize(int command) { - wxWindow *win = FindParentOfSelection(); - if (!win) - return; - - wxNode *node = GetSelections().First(); - if (!node) - return; + bool copyWidth = (command == TOOLBAR_COPY_SIZE || command == TOOLBAR_COPY_WIDTH) ; + bool copyHeight = (command == TOOLBAR_COPY_SIZE || command == TOOLBAR_COPY_HEIGHT) ; - wxControl *firstSelection = (wxControl *)node->Data(); - if (firstSelection->GetParent() != win) - return; + wxWindow *win = FindParentOfSelection(); + if (!win) + return; - int firstX, firstY; - int firstW, firstH; - firstSelection->GetPosition(&firstX, &firstY); - firstSelection->GetSize(&firstW, &firstH); - - while ((node = node->Next())) - { - wxControl *item = (wxControl *)node->Data(); - if (item->GetParent() == win) - { - item->SetSize(-1, -1, firstW, firstH); - - int fw = firstW; - int fh = firstH; - - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item); - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent()); - - // Also update the associated resource - // We need to convert to dialog units if this is not a dialog or panel, but - // the parent resource specifies dialog units. - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxSize sz = item->GetParent()->ConvertPixelsToDialog(wxSize(firstW, firstH)); - fw = sz.x; fh = sz.y; - } - resource->SetSize(resource->GetX(), resource->GetY(), fw, fh); - - } - } - win->Refresh(); + wxNode *node = GetSelections().First(); + if (!node) + return; + + wxControl *firstSelection = (wxControl *)node->Data(); + if (firstSelection->GetParent() != win) + return; + + int firstX, firstY; + int firstW, firstH; + firstSelection->GetPosition(&firstX, &firstY); + firstSelection->GetSize(&firstW, &firstH); + + while ((node = node->Next())) + { + wxControl *item = (wxControl *)node->Data(); + if (item->GetParent() == win) + { + wxSize sz = item->GetSize(); + int widthToSet = (copyWidth ? firstW : sz.x); + int heightToSet = (copyHeight ? firstH : sz.y); + + item->SetSize(-1, -1, widthToSet, heightToSet); + + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item); + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent()); + + widthToSet = resource->GetWidth(); + heightToSet = resource->GetHeight(); + + // Also update the associated resource + // We need to convert to dialog units if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxSize convertedSize = item->GetParent()->ConvertPixelsToDialog(wxSize(firstW, firstH)); + if (copyWidth) + widthToSet = convertedSize.x; + if (copyHeight) + heightToSet = convertedSize.y; + } + resource->SetSize(resource->GetX(), resource->GetY(), widthToSet, heightToSet); + } + } + win->Refresh(); } void wxResourceManager::ToBackOrFront(bool toBack) { - wxWindow *win = FindParentOfSelection(); - if (!win) - return; - wxItemResource *winResource = FindResourceForWindow(win); - - wxNode *node = GetSelections().First(); - while (node) - { - wxControl *item = (wxControl *)node->Data(); - wxItemResource *itemResource = FindResourceForWindow(item); - if (item->GetParent() == win) + wxWindow *win = FindParentOfSelection(); + if (!win) + return; + wxItemResource *winResource = FindResourceForWindow(win); + + wxNode *node = GetSelections().First(); + while (node) { - win->GetChildren().DeleteObject(item); - if (winResource) - winResource->GetChildren().DeleteObject(itemResource); - if (toBack) - { - win->GetChildren().Insert(item); - if (winResource) - winResource->GetChildren().Insert(itemResource); - } - else - { - win->GetChildren().Append(item); - if (winResource) - winResource->GetChildren().Append(itemResource); - } + wxControl *item = (wxControl *)node->Data(); + wxItemResource *itemResource = FindResourceForWindow(item); + if (item->GetParent() == win) + { + win->GetChildren().DeleteObject(item); + if (winResource) + winResource->GetChildren().DeleteObject(itemResource); + if (toBack) + { + win->GetChildren().Insert(item); + if (winResource) + winResource->GetChildren().Insert(itemResource); + } + else + { + win->GetChildren().Append(item); + if (winResource) + winResource->GetChildren().Append(itemResource); + } + } + node = node->Next(); } - node = node->Next(); - } -// win->Refresh(); + // win->Refresh(); +} + +// Distribute controls evenly between first and last +void wxResourceManager::DistributePositions(int command) +{ + bool horizontal = (command == TOOLBAR_DISTRIBUTE_HORIZ) ; + + wxWindow *win = FindParentOfSelection(); + if (!win) + return; + + if (GetSelections().Number() < 3) + { + wxMessageBox(wxT("Sorry, distributing less than three controls does not make sense.")); + return; + } + + wxControl *firstSelection = (wxControl*) GetSelections().First()->Data(); + wxControl *lastSelection = (wxControl*) GetSelections().Last()->Data(); + + // For now, assume the ordering is correct (the user selected the controls in order). + // TODO: explicitly order the selections in terms of increading x or y position. + + // Find the total amount of space between all controls + int totalControlSpace = 0; // How much space the controls take up + + wxNode* node = GetSelections().First(); + while (node) + { + wxControl* control = (wxControl*) node->Data(); + + int x, y; + int w, h; + control->GetPosition(&x, &y); + control->GetSize(&w, &h); + + // Don't include the space taken up by the first and last controls. + if (control != firstSelection && control != lastSelection) + { + if (horizontal) + totalControlSpace += w; + else + totalControlSpace += h; + } + + node = node->Next(); + } + + + int firstX, firstY, lastX, lastY; + int firstW, firstH, lastW, lastH; + firstSelection->GetPosition(&firstX, &firstY); + firstSelection->GetSize(&firstW, &firstH); + + lastSelection->GetPosition(&lastX, &lastY); + lastSelection->GetSize(&lastW, &lastH); + + /* + + firstX lastX + |===| |====| |======| |==| + + */ + + int spacing, currentPos; + if (horizontal) + { + spacing = ((lastX - (firstX + firstW)) - totalControlSpace) / (GetSelections().Number() - 1); + currentPos = firstX + firstW + spacing; + } + else + { + spacing = ((lastY - (firstY + firstH)) - totalControlSpace) / (GetSelections().Number() - 1); + currentPos = firstY + firstH + spacing; + } + + node = GetSelections().First(); + + while ((node = node->Next())) + { + wxControl *item = (wxControl *)node->Data(); + wxSize sz = item->GetSize(); + wxPoint pos = item->GetPosition(); + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item); + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(item->GetParent()); + + int controlX = (horizontal ? currentPos : pos.x); + int controlY = (horizontal ? pos.y : currentPos); + + item->Move(controlX, controlY); + + int resX = controlX; + int resY = controlY; + + // Also update the associated resource + // We need to convert to dialog units if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint convertedPos = item->GetParent()->ConvertPixelsToDialog(wxPoint(resX, resY)); + resX = convertedPos.x; + resY = convertedPos.y; + } + resource->SetSize(resX, resY, resource->GetWidth(), resource->GetHeight()); + + currentPos += (horizontal ? (sz.x + spacing) : (sz.y + spacing)); + } + win->Refresh(); } void wxResourceManager::AddSelection(wxWindow *win) { - if (!m_selections.Member(win)) - m_selections.Append(win); + if (!m_selections.Member(win)) + m_selections.Append(win); } void wxResourceManager::RemoveSelection(wxWindow *win) { - m_selections.DeleteObject(win); + m_selections.DeleteObject(win); } void wxResourceManager::DeselectItemIfNecessary(wxWindow *win) @@ -1485,188 +1605,188 @@ void wxResourceManager::DeselectItemIfNecessary(wxWindow *win) // any resource which has this as a parent. bool wxResourceManager::RemoveResourceFromParent(wxItemResource *res) { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *thisRes = (wxItemResource *)node->Data(); - if (thisRes->GetChildren().Member(res)) + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - thisRes->GetChildren().DeleteObject(res); - return TRUE; + wxItemResource *thisRes = (wxItemResource *)node->Data(); + if (thisRes->GetChildren().Member(res)) + { + thisRes->GetChildren().DeleteObject(res); + return TRUE; + } } - } - return FALSE; + return FALSE; } bool wxResourceManager::DeleteResource(wxItemResource *res) { - if (!res) - return FALSE; - - RemoveResourceFromParent(res); - - wxNode *node = res->GetChildren().First(); - while (node) - { - wxNode *next = node->Next(); - wxItemResource *child = (wxItemResource *)node->Data(); - DeleteResource(child); - node = next; - } - - // If this is a button or message resource, delete the - // associate bitmap resource if not being used. - wxString resType(res->GetType()); - -/* shouldn't have to do this now bitmaps are ref-counted - if ((resType == "wxMessage" || resType == "wxStaticBitmap" || resType == "wxButton" || resType == "wxBitmapButton") && res->GetValue4()) - { + if (!res) + return FALSE; + + RemoveResourceFromParent(res); + + wxNode *node = res->GetChildren().First(); + while (node) + { + wxNode *next = node->Next(); + wxItemResource *child = (wxItemResource *)node->Data(); + DeleteResource(child); + node = next; + } + + // If this is a button or message resource, delete the + // associate bitmap resource if not being used. + wxString resType(res->GetType()); + + /* shouldn't have to do this now bitmaps are ref-counted + if ((resType == "wxMessage" || resType == "wxStaticBitmap" || resType == "wxButton" || resType == "wxBitmapButton") && res->GetValue4()) + { PossiblyDeleteBitmapResource(res->GetValue4()); - } -*/ - - // Remove symbol from table if appropriate - if (!IsSymbolUsed(res, res->GetId())) - { - m_symbolTable.RemoveSymbol(res->GetId()); - } - - m_resourceTable.Delete(res->GetName()); - delete res; - Modify(TRUE); - return TRUE; + } + */ + + // Remove symbol from table if appropriate + if (!IsSymbolUsed(res, res->GetId())) + { + m_symbolTable.RemoveSymbol(res->GetId()); + } + + m_resourceTable.Delete(res->GetName()); + delete res; + Modify(TRUE); + return TRUE; } bool wxResourceManager::DeleteResource(wxWindow *win) { - DeselectItemIfNecessary(win); - - wxItemResource *res = FindResourceForWindow(win); - - DisassociateResource(res); - DeleteResource(res); - UpdateResourceList(); - - return TRUE; + DeselectItemIfNecessary(win); + + wxItemResource *res = FindResourceForWindow(win); + + DisassociateResource(res); + DeleteResource(res); + UpdateResourceList(); + + return TRUE; } // Will eventually have bitmap type information, for different // kinds of bitmap. wxString wxResourceManager::AddBitmapResource(const wxString& filename) { - wxItemResource *resource = FindBitmapResourceByFilename(filename); - if (!resource) - { - char buf[256]; - MakeUniqueName("bitmap", buf); - resource = new wxItemResource; - resource->SetType("wxBitmap"); - resource->SetName(buf); - - // A bitmap resource has one or more children, specifying - // alternative bitmaps. - wxItemResource *child = new wxItemResource; - child->SetType("wxBitmap"); - child->SetName(filename); - child->SetValue1(wxBITMAP_TYPE_BMP); - child->SetValue2(RESOURCE_PLATFORM_ANY); - child->SetValue3(0); // Depth - child->SetSize(0,0,0,0); - resource->GetChildren().Append(child); - - m_resourceTable.AddResource(resource); - - UpdateResourceList(); - } - if (resource) - return resource->GetName(); - else - return wxEmptyString; + wxItemResource *resource = FindBitmapResourceByFilename(filename); + if (!resource) + { + char buf[256]; + MakeUniqueName("bitmap", buf); + resource = new wxItemResource; + resource->SetType("wxBitmap"); + resource->SetName(buf); + + // A bitmap resource has one or more children, specifying + // alternative bitmaps. + wxItemResource *child = new wxItemResource; + child->SetType("wxBitmap"); + child->SetName(filename); + child->SetValue1(wxBITMAP_TYPE_BMP); + child->SetValue2(RESOURCE_PLATFORM_ANY); + child->SetValue3(0); // Depth + child->SetSize(0,0,0,0); + resource->GetChildren().Append(child); + + m_resourceTable.AddResource(resource); + + UpdateResourceList(); + } + if (resource) + return resource->GetName(); + else + return wxEmptyString; } - // Delete the bitmap resource if it isn't being used by another resource. +// Delete the bitmap resource if it isn't being used by another resource. void wxResourceManager::PossiblyDeleteBitmapResource(const wxString& resourceName) { - if (!IsBitmapResourceUsed(resourceName)) - { - wxItemResource *res = m_resourceTable.FindResource(resourceName); - DeleteResource(res); - UpdateResourceList(); - } + if (!IsBitmapResourceUsed(resourceName)) + { + wxItemResource *res = m_resourceTable.FindResource(resourceName); + DeleteResource(res); + UpdateResourceList(); + } } bool wxResourceManager::IsBitmapResourceUsed(const wxString& resourceName) { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxDialog") + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - wxString childResType(child->GetType()); - - if ((childResType == "wxMessage" || childResType == "wxButton") && - child->GetValue4() && - (strcmp(child->GetValue4(), resourceName) == 0)) - return TRUE; - node1 = node1->Next(); - } + wxItemResource *res = (wxItemResource *)node->Data(); + wxString resType(res->GetType()); + if (resType == "wxDialog") + { + wxNode *node1 = res->GetChildren().First(); + while (node1) + { + wxItemResource *child = (wxItemResource *)node1->Data(); + wxString childResType(child->GetType()); + + if ((childResType == "wxMessage" || childResType == "wxButton") && + child->GetValue4() && + (strcmp(child->GetValue4(), resourceName) == 0)) + return TRUE; + node1 = node1->Next(); + } + } } - } - return FALSE; + return FALSE; } // Given a wxButton or wxMessage, find the corresponding bitmap filename. wxString wxResourceManager::FindBitmapFilenameForResource(wxItemResource *resource) { - if (!resource || (resource->GetValue4() == "")) - return wxEmptyString; - wxItemResource *bitmapResource = m_resourceTable.FindResource(resource->GetValue4()); - if (!bitmapResource) - return wxEmptyString; - - wxNode *node = bitmapResource->GetChildren().First(); - while (node) - { - // Eventually augment this to return a bitmap of the right kind or something... - // Maybe the root of the filename remains the same, so it doesn't matter which we - // pick up. Otherwise how do we specify multiple filenames... too boring... - wxItemResource *child = (wxItemResource *)node->Data(); - return child->GetName(); + if (!resource || (resource->GetValue4() == "")) + return wxEmptyString; + wxItemResource *bitmapResource = m_resourceTable.FindResource(resource->GetValue4()); + if (!bitmapResource) + return wxEmptyString; - //node = node->Next(); - } - return wxEmptyString; + wxNode *node = bitmapResource->GetChildren().First(); + while (node) + { + // Eventually augment this to return a bitmap of the right kind or something... + // Maybe the root of the filename remains the same, so it doesn't matter which we + // pick up. Otherwise how do we specify multiple filenames... too boring... + wxItemResource *child = (wxItemResource *)node->Data(); + return child->GetName(); + + //node = node->Next(); + } + return wxEmptyString; } wxItemResource *wxResourceManager::FindBitmapResourceByFilename(const wxString& filename) { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxBitmap") + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - if (child->GetName() && (strcmp(child->GetName(), filename) == 0)) - return res; - node1 = node1->Next(); - } + wxItemResource *res = (wxItemResource *)node->Data(); + wxString resType(res->GetType()); + if (resType == "wxBitmap") + { + wxNode *node1 = res->GetChildren().First(); + while (node1) + { + wxItemResource *child = (wxItemResource *)node1->Data(); + if (child->GetName() && (strcmp(child->GetName(), filename) == 0)) + return res; + node1 = node1->Next(); + } + } } - } - return NULL; + return NULL; } // Is this window identifier symbol in use? @@ -1675,29 +1795,29 @@ wxItemResource *wxResourceManager::FindBitmapResourceByFilename(const wxString& // in use. bool wxResourceManager::IsSymbolUsed(wxItemResource* thisResource, wxWindowID id) { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - if ((res != thisResource) && (res->GetId() == id)) - return TRUE; - - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - if ((child != thisResource) && (child->GetId() == id)) - return TRUE; - node1 = node1->Next(); - } + wxItemResource *res = (wxItemResource *)node->Data(); + + wxString resType(res->GetType()); + if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") + { + if ((res != thisResource) && (res->GetId() == id)) + return TRUE; + + wxNode *node1 = res->GetChildren().First(); + while (node1) + { + wxItemResource *child = (wxItemResource *)node1->Data(); + if ((child != thisResource) && (child->GetId() == id)) + return TRUE; + node1 = node1->Next(); + } + } } - } - return FALSE; + return FALSE; } // Is this window identifier compatible with the given name? (i.e. @@ -1718,29 +1838,29 @@ bool wxResourceManager::IsIdentifierOK(const wxString& name, wxWindowID id) // must be changed. void wxResourceManager::ChangeIds(int oldId, int newId) { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - if (res->GetId() == oldId) - res->SetId(newId); - - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - if (child->GetId() == oldId) - child->SetId(newId); - - node1 = node1->Next(); - } + wxItemResource *res = (wxItemResource *)node->Data(); + + wxString resType(res->GetType()); + if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") + { + if (res->GetId() == oldId) + res->SetId(newId); + + wxNode *node1 = res->GetChildren().First(); + while (node1) + { + wxItemResource *child = (wxItemResource *)node1->Data(); + if (child->GetId() == oldId) + child->SetId(newId); + + node1 = node1->Next(); + } + } } - } } // If any resource ids were missing (or their symbol was missing), @@ -1748,314 +1868,314 @@ void wxResourceManager::ChangeIds(int oldId, int newId) // needed repairing. bool wxResourceManager::RepairResourceIds() { - bool repaired = FALSE; - - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") + bool repaired = FALSE; + + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - - if ( (res->GetId() == 0) || ((res->GetId() > 0) && !m_symbolTable.IdExists(res->GetId())) ) - { - wxString newSymbolName; - int newId = GenerateWindowId("ID_DIALOG", newSymbolName) ; - - if (res->GetId() == 0) - { - res->SetId(newId); - m_symbolTable.AddSymbol(newSymbolName, newId); - } - else - { - m_symbolTable.AddSymbol(newSymbolName, res->GetId()); - } - - repaired = TRUE; - } - - wxNode *node1 = res->GetChildren().First(); - while (node1) - { - wxItemResource *child = (wxItemResource *)node1->Data(); - - if ( (child->GetId() == 0) || ((child->GetId() > 0) && !m_symbolTable.IdExists(child->GetId())) ) + wxItemResource *res = (wxItemResource *)node->Data(); + wxString resType(res->GetType()); + if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") { - wxString newSymbolName; - int newId = GenerateWindowId("ID_CONTROL", newSymbolName) ; - - if (child->GetId() == 0) + + if ( (res->GetId() == 0) || ((res->GetId() > 0) && !m_symbolTable.IdExists(res->GetId())) ) { - child->SetId(newId); - m_symbolTable.AddSymbol(newSymbolName, newId); + wxString newSymbolName; + int newId = GenerateWindowId("ID_DIALOG", newSymbolName) ; + + if (res->GetId() == 0) + { + res->SetId(newId); + m_symbolTable.AddSymbol(newSymbolName, newId); + } + else + { + m_symbolTable.AddSymbol(newSymbolName, res->GetId()); + } + + repaired = TRUE; } - else + + wxNode *node1 = res->GetChildren().First(); + while (node1) { - m_symbolTable.AddSymbol(newSymbolName, child->GetId()); + wxItemResource *child = (wxItemResource *)node1->Data(); + + if ( (child->GetId() == 0) || ((child->GetId() > 0) && !m_symbolTable.IdExists(child->GetId())) ) + { + wxString newSymbolName; + int newId = GenerateWindowId("ID_CONTROL", newSymbolName) ; + + if (child->GetId() == 0) + { + child->SetId(newId); + m_symbolTable.AddSymbol(newSymbolName, newId); + } + else + { + m_symbolTable.AddSymbol(newSymbolName, child->GetId()); + } + + repaired = TRUE; + } + + node1 = node1->Next(); } - - repaired = TRUE; } - - node1 = node1->Next(); - } } - } - return repaired; + return repaired; } - // Deletes 'win' and creates a new window from the resource that - // was associated with it. E.g. if you can't change properties on the - // fly, you'll need to delete the window and create it again. +// Deletes 'win' and creates a new window from the resource that +// was associated with it. E.g. if you can't change properties on the +// fly, you'll need to delete the window and create it again. wxWindow *wxResourceManager::RecreateWindowFromResource(wxWindow *win, wxWindowPropertyInfo *info, bool instantiateFirst) { - wxItemResource *resource = FindResourceForWindow(win); - - // Put the current window properties into the wxItemResource object - - wxWindowPropertyInfo *newInfo = NULL; - if (!info) - { - newInfo = CreatePropertyInfoForWindow(win); - info = newInfo; - } - - // May not always want to copy values back from the resource - if (instantiateFirst) - info->InstantiateResource(resource); - - wxWindow *newWin = NULL; - wxWindow *parent = win->GetParent(); - wxItemResource* parentResource = NULL; - if (parent) - parentResource = FindResourceForWindow(parent); - - if (win->IsKindOf(CLASSINFO(wxPanel))) - { - Edit(resource); - newWin = FindWindowForResource(resource); - } - else - { - DisassociateResource(resource); - if (win->GetEventHandler() != win) - win->PopEventHandler(TRUE); - - DeleteWindow(win); - newWin = m_resourceTable.CreateItem((wxPanel *)parent, resource, parentResource); - newWin->PushEventHandler(new wxResourceEditorControlHandler((wxControl*) newWin, (wxControl*) newWin)); - AssociateResource(resource, newWin); - UpdateResourceList(); - } - - if (info) - info->SetPropertyWindow(newWin); + wxItemResource *resource = FindResourceForWindow(win); - if (newInfo) - delete newInfo; - - return newWin; + // Put the current window properties into the wxItemResource object + + wxWindowPropertyInfo *newInfo = NULL; + if (!info) + { + newInfo = CreatePropertyInfoForWindow(win); + info = newInfo; + } + + // May not always want to copy values back from the resource + if (instantiateFirst) + info->InstantiateResource(resource); + + wxWindow *newWin = NULL; + wxWindow *parent = win->GetParent(); + wxItemResource* parentResource = NULL; + if (parent) + parentResource = FindResourceForWindow(parent); + + if (win->IsKindOf(CLASSINFO(wxPanel))) + { + Edit(resource); + newWin = FindWindowForResource(resource); + } + else + { + DisassociateResource(resource); + if (win->GetEventHandler() != win) + win->PopEventHandler(TRUE); + + DeleteWindow(win); + newWin = m_resourceTable.CreateItem((wxPanel *)parent, resource, parentResource); + newWin->PushEventHandler(new wxResourceEditorControlHandler((wxControl*) newWin, (wxControl*) newWin)); + AssociateResource(resource, newWin); + UpdateResourceList(); + } + + if (info) + info->SetPropertyWindow(newWin); + + if (newInfo) + delete newInfo; + + return newWin; } // Delete resource highlighted in the listbox bool wxResourceManager::DeleteSelection() { - int sel = m_editorResourceTree->GetSelection(); - if (sel != 0) - { - wxResourceTreeData *data = (wxResourceTreeData *)m_editorResourceTree->GetItemData(sel); - wxItemResource *res = data->GetResource(); - wxWindow *win = FindWindowForResource(res); - if (win) + int sel = m_editorResourceTree->GetSelection(); + if (sel != 0) { - DeleteResource(win); - DeleteWindow(win); - UpdateResourceList(); - Modify(TRUE); + wxResourceTreeData *data = (wxResourceTreeData *)m_editorResourceTree->GetItemData(sel); + wxItemResource *res = data->GetResource(); + wxWindow *win = FindWindowForResource(res); + if (win) + { + DeleteResource(win); + DeleteWindow(win); + UpdateResourceList(); + Modify(TRUE); + } + return TRUE; } - return TRUE; - } - - return FALSE; + + return FALSE; } // Delete resource highlighted in the listbox bool wxResourceManager::RecreateSelection() { - wxNode *node = GetSelections().First(); - while (node) - { - wxControl *item = (wxControl *)node->Data(); - wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - wxNode *next = node->Next(); - childHandler->SelectItem(FALSE); - - RemoveSelection(item); - - RecreateWindowFromResource(item); - - node = next; - } - return TRUE; + wxNode *node = GetSelections().First(); + while (node) + { + wxControl *item = (wxControl *)node->Data(); + wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); + wxNode *next = node->Next(); + childHandler->SelectItem(FALSE); + + RemoveSelection(item); + + RecreateWindowFromResource(item); + + node = next; + } + return TRUE; } bool wxResourceManager::EditDialog(wxDialog *WXUNUSED(dialog), wxWindow *WXUNUSED(parent)) { - return FALSE; + return FALSE; } // Ensures that all currently shown windows are saved to resources, // e.g. just before writing to a .wxr file. bool wxResourceManager::InstantiateAllResourcesFromWindows() { - m_resourceTable.BeginFind(); - wxNode *node; - while ((node = m_resourceTable.Next())) - { - wxItemResource *res = (wxItemResource *)node->Data(); - wxString resType(res->GetType()); - - if (resType == "wxDialog") + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) { - wxWindow *win = (wxWindow *)FindWindowForResource(res); - if (win) - InstantiateResourceFromWindow(res, win, TRUE); + wxItemResource *res = (wxItemResource *)node->Data(); + wxString resType(res->GetType()); + + if (resType == "wxDialog") + { + wxWindow *win = (wxWindow *)FindWindowForResource(res); + if (win) + InstantiateResourceFromWindow(res, win, TRUE); + } + else if (resType == "wxPanel") + { + wxWindow *win = (wxWindow *)FindWindowForResource(res); + if (win) + InstantiateResourceFromWindow(res, win, TRUE); + } } - else if (resType == "wxPanel") - { - wxWindow *win = (wxWindow *)FindWindowForResource(res); - if (win) - InstantiateResourceFromWindow(res, win, TRUE); - } - } - return TRUE; + return TRUE; } bool wxResourceManager::InstantiateResourceFromWindow(wxItemResource *resource, wxWindow *window, bool recurse) { - wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(window); - info->SetResource(resource); - info->InstantiateResource(resource); - delete info; - - if (recurse) - { - wxNode *node = resource->GetChildren().First(); - while (node) + wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(window); + info->SetResource(resource); + info->InstantiateResource(resource); + delete info; + + if (recurse) { - wxItemResource *child = (wxItemResource *)node->Data(); - wxWindow *childWindow = FindWindowForResource(child); - - if (!childWindow) - { - char buf[200]; - sprintf(buf, "Could not find window %s", (const char*) child->GetName()); - wxMessageBox(buf, "Dialog Editor problem", wxOK); - } - else - InstantiateResourceFromWindow(child, childWindow, recurse); - node = node->Next(); + wxNode *node = resource->GetChildren().First(); + while (node) + { + wxItemResource *child = (wxItemResource *)node->Data(); + wxWindow *childWindow = FindWindowForResource(child); + + if (!childWindow) + { + char buf[200]; + sprintf(buf, "Could not find window %s", (const char*) child->GetName()); + wxMessageBox(buf, "Dialog Editor problem", wxOK); + } + else + InstantiateResourceFromWindow(child, childWindow, recurse); + node = node->Next(); + } } - } - - return TRUE; + + return TRUE; } // Create a window information object for the give window wxWindowPropertyInfo *wxResourceManager::CreatePropertyInfoForWindow(wxWindow *win) { - wxWindowPropertyInfo *info = NULL; - if (win->IsKindOf(CLASSINFO(wxScrollBar))) - { - info = new wxScrollBarPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxStaticBox))) - { - info = new wxGroupBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxCheckBox))) - { - info = new wxCheckBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxSlider))) - { - info = new wxSliderPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxGauge))) - { - info = new wxGaugePropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxListBox))) - { - info = new wxListBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxRadioBox))) - { - info = new wxRadioBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxRadioButton))) - { - info = new wxRadioButtonPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxComboBox))) - { - info = new wxComboBoxPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxChoice))) - { - info = new wxChoicePropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxBitmapButton))) - { - info = new wxBitmapButtonPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxButton))) - { - info = new wxButtonPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxStaticBitmap))) - { - info = new wxStaticBitmapPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxStaticText))) - { - info = new wxStaticTextPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxTextCtrl))) - { - info = new wxTextPropertyInfo(win); - } - else if (win->IsKindOf(CLASSINFO(wxPanel))) - { - info = new wxPanelPropertyInfo(win); - } - else - { - info = new wxWindowPropertyInfo(win); - } - return info; + wxWindowPropertyInfo *info = NULL; + if (win->IsKindOf(CLASSINFO(wxScrollBar))) + { + info = new wxScrollBarPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxStaticBox))) + { + info = new wxGroupBoxPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxCheckBox))) + { + info = new wxCheckBoxPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxSlider))) + { + info = new wxSliderPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxGauge))) + { + info = new wxGaugePropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxListBox))) + { + info = new wxListBoxPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxRadioBox))) + { + info = new wxRadioBoxPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxRadioButton))) + { + info = new wxRadioButtonPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxComboBox))) + { + info = new wxComboBoxPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxChoice))) + { + info = new wxChoicePropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxBitmapButton))) + { + info = new wxBitmapButtonPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxButton))) + { + info = new wxButtonPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxStaticBitmap))) + { + info = new wxStaticBitmapPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxStaticText))) + { + info = new wxStaticTextPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxTextCtrl))) + { + info = new wxTextPropertyInfo(win); + } + else if (win->IsKindOf(CLASSINFO(wxPanel))) + { + info = new wxPanelPropertyInfo(win); + } + else + { + info = new wxWindowPropertyInfo(win); + } + return info; } // Edit the given window void wxResourceManager::EditWindow(wxWindow *win) { - wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(win); - if (info) - { - info->SetResource(FindResourceForWindow(win)); - wxString str("Editing "); - str += win->GetClassInfo()->GetClassName(); - str += ": "; - if (win->GetName() != "") - str += win->GetName(); - else - str += "properties"; - info->Edit(NULL, str); - } + wxWindowPropertyInfo *info = CreatePropertyInfoForWindow(win); + if (info) + { + info->SetResource(FindResourceForWindow(win)); + wxString str("Editing "); + str += win->GetClassInfo()->GetClassName(); + str += ": "; + if (win->GetName() != "") + str += win->GetName(); + else + str += "properties"; + info->Edit(NULL, str); + } } // Generate a window id and a first stab at a name @@ -2064,98 +2184,104 @@ int wxResourceManager::GenerateWindowId(const wxString& prefix, wxString& idName m_symbolIdCounter ++; while (m_symbolTable.IdExists(m_symbolIdCounter)) m_symbolIdCounter ++; - + int nameId = m_symbolIdCounter; - + wxString str; str.Printf("%d", nameId); idName = prefix + str; - + while (m_symbolTable.SymbolExists(idName)) { nameId ++; str.Printf("%d", nameId); idName = prefix + str; } - + return m_symbolIdCounter; } /* - * Resource editor frame - */ +* Resource editor frame +*/ IMPLEMENT_CLASS(wxResourceEditorFrame, wxFrame) BEGIN_EVENT_TABLE(wxResourceEditorFrame, wxFrame) - EVT_MENU(wxID_NEW, wxResourceEditorFrame::OnNew) - EVT_MENU(RESED_NEW_DIALOG, wxResourceEditorFrame::OnNewDialog) - EVT_MENU(wxID_OPEN, wxResourceEditorFrame::OnOpen) - EVT_MENU(RESED_CLEAR, wxResourceEditorFrame::OnClear) - EVT_MENU(wxID_SAVE, wxResourceEditorFrame::OnSave) - EVT_MENU(wxID_SAVEAS, wxResourceEditorFrame::OnSaveAs) - EVT_MENU(wxID_EXIT, wxResourceEditorFrame::OnExit) - EVT_MENU(wxID_ABOUT, wxResourceEditorFrame::OnAbout) - EVT_MENU(RESED_CONTENTS, wxResourceEditorFrame::OnContents) - EVT_MENU(RESED_DELETE, wxResourceEditorFrame::OnDeleteSelection) - EVT_MENU(RESED_RECREATE, wxResourceEditorFrame::OnRecreateSelection) - EVT_MENU(RESED_TEST, wxResourceEditorFrame::OnTest) - EVT_CLOSE(wxResourceEditorFrame::OnCloseWindow) +EVT_MENU(wxID_NEW, wxResourceEditorFrame::OnNew) +EVT_MENU(RESED_NEW_DIALOG, wxResourceEditorFrame::OnNewDialog) +EVT_MENU(wxID_OPEN, wxResourceEditorFrame::OnOpen) +EVT_MENU(RESED_CLEAR, wxResourceEditorFrame::OnClear) +EVT_MENU(wxID_SAVE, wxResourceEditorFrame::OnSave) +EVT_MENU(wxID_SAVEAS, wxResourceEditorFrame::OnSaveAs) +EVT_MENU(wxID_EXIT, wxResourceEditorFrame::OnExit) +EVT_MENU(wxID_ABOUT, wxResourceEditorFrame::OnAbout) +EVT_MENU(RESED_CONTENTS, wxResourceEditorFrame::OnContents) +EVT_MENU(RESED_DELETE, wxResourceEditorFrame::OnDeleteSelection) +EVT_MENU(RESED_RECREATE, wxResourceEditorFrame::OnRecreateSelection) +EVT_MENU(RESED_TEST, wxResourceEditorFrame::OnTest) +EVT_MENU(RESED_CONVERT_WXRS, wxResourceEditorFrame::OnConvertWXRs) +EVT_CLOSE(wxResourceEditorFrame::OnCloseWindow) END_EVENT_TABLE() wxResourceEditorFrame::wxResourceEditorFrame(wxResourceManager *resMan, wxFrame *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxFrame(parent, -1, title, pos, size, style, name) + const wxPoint& pos, const wxSize& size, long style, const wxString& name): +wxFrame(parent, -1, title, pos, size, style, name) { - manager = resMan; + manager = resMan; } wxResourceEditorFrame::~wxResourceEditorFrame() { } +void wxResourceEditorFrame::OnConvertWXRs(wxCommandEvent& WXUNUSED(event)) +{ + manager->ConvertWXRs(); +} + void wxResourceEditorFrame::OnNew(wxCommandEvent& WXUNUSED(event)) { - manager->New(FALSE); + manager->New(FALSE); } void wxResourceEditorFrame::OnNewDialog(wxCommandEvent& WXUNUSED(event)) { - manager->CreateNewPanel(); + manager->CreateNewPanel(); } void wxResourceEditorFrame::OnOpen(wxCommandEvent& WXUNUSED(event)) { - manager->New(TRUE); + manager->New(TRUE); } void wxResourceEditorFrame::OnClear(wxCommandEvent& WXUNUSED(event)) { - manager->Clear(TRUE, FALSE); + manager->Clear(TRUE, FALSE); } void wxResourceEditorFrame::OnSave(wxCommandEvent& WXUNUSED(event)) { - manager->Save(); + manager->Save(); } void wxResourceEditorFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event)) { - manager->SaveAs(); + manager->SaveAs(); } void wxResourceEditorFrame::OnExit(wxCommandEvent& WXUNUSED(event)) { - manager->Clear(TRUE, FALSE) ; - this->Destroy(); + manager->Clear(TRUE, FALSE) ; + this->Destroy(); } void wxResourceEditorFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - char buf[300]; - sprintf(buf, "wxWindows Dialog Editor %.1f\nAuthor: Julian Smart \nJulian Smart (c) 1996-1999", wxDIALOG_EDITOR_VERSION); - wxMessageBox(buf, "About Dialog Editor", wxOK|wxCENTRE); + char buf[300]; + sprintf(buf, "wxWindows Dialog Editor %.1f\nAuthor: Julian Smart \nJulian Smart (c) 1996-1999", wxDIALOG_EDITOR_VERSION); + wxMessageBox(buf, "About Dialog Editor", wxOK|wxCENTRE); } void wxResourceEditorFrame::OnTest(wxCommandEvent& WXUNUSED(event)) @@ -2166,70 +2292,71 @@ void wxResourceEditorFrame::OnTest(wxCommandEvent& WXUNUSED(event)) void wxResourceEditorFrame::OnContents(wxCommandEvent& WXUNUSED(event)) { #ifdef __WXMSW__ - wxBeginBusyCursor(); - manager->GetHelpController()->LoadFile(); - manager->GetHelpController()->DisplayContents(); - wxEndBusyCursor(); + wxBeginBusyCursor(); + manager->GetHelpController()->LoadFile(); + manager->GetHelpController()->DisplayContents(); + wxEndBusyCursor(); #endif } void wxResourceEditorFrame::OnDeleteSelection(wxCommandEvent& WXUNUSED(event)) { - manager->DeleteSelection(); + manager->DeleteSelection(); } void wxResourceEditorFrame::OnRecreateSelection(wxCommandEvent& WXUNUSED(event)) { - manager->RecreateSelection(); + manager->RecreateSelection(); } void wxResourceEditorFrame::OnCloseWindow(wxCloseEvent& event) { - wxPropertyInfo::CloseWindow(); - if (manager->Modified()) - { - if (!manager->Clear(TRUE, FALSE)) - { - event.Veto(); - return; + wxPropertyInfo::CloseWindow(); + manager->ClearCurrentDialog(); + if (manager->Modified()) + { + if (!manager->Clear(TRUE, FALSE)) + { + event.Veto(); + return; + } } - } - if (!IsIconized()) - { - int w, h; - GetSize(&w, &h); - manager->m_resourceEditorWindowSize.width = w; - manager->m_resourceEditorWindowSize.height = h; - - int x, y; - GetPosition(&x, &y); - - manager->m_resourceEditorWindowSize.x = x; - manager->m_resourceEditorWindowSize.y = y; - } - manager->SetEditorFrame(NULL); - manager->SetEditorToolBar(NULL); - - this->Destroy(); + if (!IsIconized()) + { + int w, h; + GetSize(&w, &h); + manager->m_resourceEditorWindowSize.width = w; + manager->m_resourceEditorWindowSize.height = h; + + int x, y; + GetPosition(&x, &y); + + manager->m_resourceEditorWindowSize.x = x; + manager->m_resourceEditorWindowSize.y = y; + } + manager->SetEditorFrame(NULL); + manager->SetEditorToolBar(NULL); + + this->Destroy(); } /* - * Resource editor window that contains the dialog/panel being edited - */ +* Resource editor window that contains the dialog/panel being edited +*/ BEGIN_EVENT_TABLE(wxResourceEditorScrolledWindow, wxScrolledWindow) - EVT_PAINT(wxResourceEditorScrolledWindow::OnPaint) +EVT_PAINT(wxResourceEditorScrolledWindow::OnPaint) END_EVENT_TABLE() wxResourceEditorScrolledWindow::wxResourceEditorScrolledWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, - long style): - wxScrolledWindow(parent, -1, pos, size, style) + long style): +wxScrolledWindow(parent, -1, pos, size, style) { m_marginX = 10; m_marginY = 40; m_childWindow = NULL; - + SetBackgroundColour(* wxWHITE); } @@ -2240,7 +2367,7 @@ wxResourceEditorScrolledWindow::~wxResourceEditorScrolledWindow() void wxResourceEditorScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); - + DrawTitle(dc); } @@ -2254,15 +2381,15 @@ void wxResourceEditorScrolledWindow::DrawTitle(wxDC& dc) wxString str(res->GetTitle()); int x, y; ViewStart(& x, & y); - + wxFont font(10, wxSWISS, wxNORMAL, wxBOLD); dc.SetFont(font); dc.SetBackgroundMode(wxTRANSPARENT); dc.SetTextForeground(wxColour(0, 0, 0)); - + long w, h; dc.GetTextExtent(str, & w, & h); - + dc.DrawText(str, m_marginX + (- x * 10), m_marginY + (- y * 10) - h - 5); } } @@ -2271,181 +2398,556 @@ void wxResourceEditorScrolledWindow::DrawTitle(wxDC& dc) // Popup menu callback void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event) { - wxWindow *data = (wxWindow *)menu->GetClientData(); - if (!data) - return; - - switch (event.GetInt()) - { + wxWindow *data = (wxWindow *)menu->GetClientData(); + if (!data) + return; + + switch (event.GetInt()) + { case OBJECT_MENU_EDIT: - { - wxResourceManager::GetCurrentResourceManager()->EditWindow(data); - break; - } + { + wxResourceManager::GetCurrentResourceManager()->EditWindow(data); + break; + } case OBJECT_MENU_DELETE: - { - wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(data); - - wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data); - wxResourceManager::GetCurrentResourceManager()->DeleteResource(data); - wxResourceManager::GetCurrentResourceManager()->DeleteWindow(data); - break; - } + { + wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(data); + + wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data); + wxResourceManager::GetCurrentResourceManager()->DeleteResource(data); + wxResourceManager::GetCurrentResourceManager()->DeleteWindow(data); + break; + } default: - break; - } + break; + } } /* - * Main toolbar - * - */ +* Main toolbar +* +*/ BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar) // EVT_PAINT(EditorToolBar::OnPaint) END_EVENT_TABLE() EditorToolBar::EditorToolBar(wxFrame *frame, const wxPoint& pos, const wxSize& size, - long style): - wxToolBar(frame, -1, pos, size, style) + long style): +wxToolBar(frame, -1, pos, size, style) { } bool EditorToolBar::OnLeftClick(int toolIndex, bool WXUNUSED(toggled)) { - wxResourceManager *manager = wxResourceManager::GetCurrentResourceManager(); - - switch (toolIndex) - { + wxResourceManager *manager = wxResourceManager::GetCurrentResourceManager(); + + switch (toolIndex) + { case TOOLBAR_LOAD_FILE: - { - manager->New(TRUE); - break; - } + { + manager->New(TRUE); + break; + } case TOOLBAR_NEW: - { - manager->CreateNewPanel(); - break; - } + { + manager->CreateNewPanel(); + break; + } case TOOLBAR_SAVE_FILE: - { - manager->Save(); - break; - } + { + manager->Save(); + break; + } case TOOLBAR_HELP: - { + { #ifdef __WXMSW__ - wxBeginBusyCursor(); - manager->GetHelpController()->LoadFile(); - manager->GetHelpController()->DisplayContents(); - wxEndBusyCursor(); + wxBeginBusyCursor(); + manager->GetHelpController()->DisplayContents(); + wxEndBusyCursor(); #endif - break; - } + break; + } case TOOLBAR_FORMAT_HORIZ: - { - manager->AlignItems(TOOLBAR_FORMAT_HORIZ); - break; - } + { + manager->AlignItems(TOOLBAR_FORMAT_HORIZ); + break; + } case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN); - break; - } + { + manager->AlignItems(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN); + break; + } case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN); - break; - } + { + manager->AlignItems(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN); + break; + } case TOOLBAR_FORMAT_VERT: - { - manager->AlignItems(TOOLBAR_FORMAT_VERT); - break; - } + { + manager->AlignItems(TOOLBAR_FORMAT_VERT); + break; + } case TOOLBAR_FORMAT_VERT_TOP_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_VERT_TOP_ALIGN); - break; - } + { + manager->AlignItems(TOOLBAR_FORMAT_VERT_TOP_ALIGN); + break; + } case TOOLBAR_FORMAT_VERT_BOT_ALIGN: - { - manager->AlignItems(TOOLBAR_FORMAT_VERT_BOT_ALIGN); - break; - } + { + manager->AlignItems(TOOLBAR_FORMAT_VERT_BOT_ALIGN); + break; + } case TOOLBAR_COPY_SIZE: - { - manager->CopySize(); - break; - } + { + manager->CopySize(TOOLBAR_COPY_SIZE); + break; + } + case TOOLBAR_COPY_WIDTH: + { + manager->CopySize(TOOLBAR_COPY_WIDTH); + break; + } + case TOOLBAR_COPY_HEIGHT: + { + manager->CopySize(TOOLBAR_COPY_HEIGHT); + break; + } + case TOOLBAR_DISTRIBUTE_HORIZ: + { + manager->DistributePositions(TOOLBAR_DISTRIBUTE_HORIZ); + break; + } + case TOOLBAR_DISTRIBUTE_VERT: + { + manager->DistributePositions(TOOLBAR_DISTRIBUTE_VERT); + break; + } case TOOLBAR_TO_BACK: - { - manager->ToBackOrFront(TRUE); - break; - } + { + manager->ToBackOrFront(TRUE); + break; + } case TOOLBAR_TO_FRONT: - { - manager->ToBackOrFront(FALSE); - break; - } + { + manager->ToBackOrFront(FALSE); + break; + } default: - break; - } - return TRUE; + break; + } + return TRUE; } void EditorToolBar::OnMouseEnter(int toolIndex) { - wxFrame *frame = (wxFrame *)GetParent(); - - if (!frame) return; - - if (toolIndex > -1) - { - switch (toolIndex) - { + wxFrame *frame = (wxFrame *)GetParent(); + + if (!frame) return; + + if (toolIndex > -1) + { + switch (toolIndex) + { case TOOLBAR_LOAD_FILE: - frame->SetStatusText("Load project file"); - break; + frame->SetStatusText("Load project file"); + break; case TOOLBAR_SAVE_FILE: - frame->SetStatusText("Save project file"); - break; + frame->SetStatusText("Save project file"); + break; case TOOLBAR_NEW: - frame->SetStatusText("Create a new resource"); - break; + frame->SetStatusText("Create a new resource"); + break; case TOOLBAR_FORMAT_HORIZ: - frame->SetStatusText("Align items horizontally"); - break; + frame->SetStatusText("Align items horizontally"); + break; case TOOLBAR_FORMAT_VERT: - frame->SetStatusText("Align items vertically"); - break; + frame->SetStatusText("Align items vertically"); + break; case TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN: - frame->SetStatusText("Left-align items"); - break; + frame->SetStatusText("Left-align items"); + break; case TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN: - frame->SetStatusText("Right-align items"); - break; + frame->SetStatusText("Right-align items"); + break; case TOOLBAR_FORMAT_VERT_TOP_ALIGN: - frame->SetStatusText("Top-align items"); - break; + frame->SetStatusText("Top-align items"); + break; case TOOLBAR_FORMAT_VERT_BOT_ALIGN: - frame->SetStatusText("Bottom-align items"); - break; + frame->SetStatusText("Bottom-align items"); + break; case TOOLBAR_COPY_SIZE: - frame->SetStatusText("Copy size from first selection"); - break; + frame->SetStatusText("Copy size from first selection"); + break; case TOOLBAR_TO_FRONT: - frame->SetStatusText("Put image to front"); - break; + frame->SetStatusText("Put image to front"); + break; case TOOLBAR_TO_BACK: - frame->SetStatusText("Put image to back"); - break; + frame->SetStatusText("Put image to back"); + break; case TOOLBAR_HELP: - frame->SetStatusText("Display help contents"); - break; + frame->SetStatusText("Display help contents"); + break; default: - break; - } - } - else frame->SetStatusText(""); + break; + } + } + else frame->SetStatusText(""); } +bool ResourceEditorDialogTester::ProcessEvent(wxEvent& event) +{ + if (event.IsCommandEvent() && event.GetId() != wxID_OK && event.GetId() != wxID_CANCEL) + { + // Do nothing + return TRUE; + } + else + return wxDialog::ProcessEvent(event); +} + +static int gs_LabelInsertionCount = 0; + +// Convert old WXRs to new +bool wxResourceManager::ConvertWXRs() +{ + gs_LabelInsertionCount = 0; + m_symbolIdCounter = 20000; + + wxString currentPath = wxGetCwd(); + wxString oldWXRPath, newWXRPath; + + wxDirDialog dialog(NULL, wxT("Choose directory for old WXRs"), currentPath); + + if (dialog.ShowModal() == wxID_OK) + { + oldWXRPath = dialog.GetPath(); + } + else + return FALSE; + + wxDirDialog dialog2(NULL, wxT("Choose directory for new WXRs"), oldWXRPath); + + if (dialog2.ShowModal() == wxID_OK) + { + newWXRPath = dialog2.GetPath(); + } + else + return FALSE; + + if (newWXRPath == oldWXRPath) + { + wxMessageBox(wxT("Sorry, the directories must be different.")); + return FALSE; + } + + wxDir dir(oldWXRPath); + if (!dir.IsOpened()) + return FALSE; + + wxArrayString stringArray; + + wxString filename; + bool ok = dir.GetFirst(& filename, wxT("*.wxr")); + while (ok) + { + stringArray.Add(filename); + + ok = dir.GetNext(& filename); + } + + // Pop up a progress dialog + wxProgressDialog progressDialog(wxT("Converting WXR files"), wxT("Converting files...")); + + size_t i; + for (i = 0; i < stringArray.Count(); i++) + { + progressDialog.Update((int) (100.0 * ((double) i / (double) stringArray.Count()))); + + filename = stringArray[i]; + wxString oldPath = oldWXRPath + wxString(wxFILE_SEP_PATH) + filename; + wxString newPath = newWXRPath + wxString(wxFILE_SEP_PATH) + filename; + + DoConvertWXR(oldPath, newPath); + } + + wxString msg; + msg.Printf(wxT("Dialog Editor inserted %d labels."), gs_LabelInsertionCount); + wxMessageBox(msg); + + return TRUE; +} + +bool wxResourceManager::DoConvertWXR(const wxString& oldPath, const wxString& newPath) +{ + + if (!Clear(TRUE, FALSE)) + return FALSE; + + m_symbolTable.AddStandardSymbols(); + + if (!m_resourceTable.ParseResourceFile(oldPath)) + { + wxString msg; + msg.Printf(wxT("Could not read file %s"), (const char*) oldPath); + wxMessageBox(msg, "Resource file load error", wxOK | wxICON_EXCLAMATION); + return FALSE; + } + m_currentFilename = oldPath; + + //SetFrameTitle(m_currentFilename); + + //UpdateResourceList(); + + // Construct include filename from this file + m_symbolFilename = m_currentFilename; + + wxStripExtension(m_symbolFilename); + m_symbolFilename += wxT(".h"); + + if (!m_symbolTable.ReadIncludeFile(m_symbolFilename)) + { + } + else + { + // Set the id counter to the last known id + m_symbolIdCounter = m_symbolTable.FindHighestId(); + } + + // Now check in case some (or all) resources don't have resource ids, or they + // don't match the .h file, or something of that nature. + bool altered = RepairResourceIds(); + + // Do any necessary changes to the resources + m_resourceTable.BeginFind(); + wxNode *node; + while ((node = m_resourceTable.Next())) + { + wxItemResource *res = (wxItemResource *)node->Data(); + ChangeOldToNewResource(NULL, res); + } + + // Change the filename before saving + + m_currentFilename = newPath; + m_symbolFilename = m_currentFilename; + wxStripExtension(m_symbolFilename); + m_symbolFilename += wxT(".h"); + + Modify(TRUE); + + Save(); + + Clear(TRUE, TRUE); + + return TRUE; + +} + +bool wxResourceManager::ChangeOldToNewResource(wxItemResource* parent, wxItemResource* res) +{ + // Change these according to your needs + + // Change all fonts to use system defaults for fonts, colours etc. + static bool s_useSystemDefaultsAlways = FALSE; // TRUE; + + // Increase dialog height by this amount (wxWin 2 uses dialog client size now) + static int s_increaseDialogSize = -18; + + // How many points to decrease the font sizes by, since + // wxWin 2 fonts are larger in Windows + static int s_decreaseFontSize = 3; + + wxString itemType(res->GetType()); + + wxFont font = res->GetFont(); + + if ((s_decreaseFontSize) > 0 && font.Ok()) + { + wxFont newFont = wxFont(font.GetPointSize() - s_decreaseFontSize, + font.GetFamily(), font.GetStyle(), font.GetWeight(), + font.GetUnderlined(), font.GetFaceName()); + res->SetFont(newFont); + } + + if (itemType == wxT("wxDialogBox") || itemType == wxT("wxDialog") || itemType == wxT("wxPanel")) + { + if (itemType == wxT("wxDialogBox")) + res->SetType(wxT("wxDialog")); + + if (itemType == wxT("wxDialogBox") || itemType == wxT("wxDialog")) + { + // Only change the height if it has a caption, i.e. it's going to be + // used as a proper dialog and not a panel + if (res->GetStyle() & wxCAPTION) + res->SetSize(res->GetX(), res->GetY(), res->GetWidth(), res->GetHeight() + s_increaseDialogSize ); + } + + if (s_useSystemDefaultsAlways) + res->SetResourceStyle(res->GetResourceStyle() | wxRESOURCE_USE_DEFAULTS); + + if (res->GetValue1()) + res->SetStyle(res->GetStyle() | wxDIALOG_MODAL); + + wxNode *node = res->GetChildren().First(); + while (node) + { + wxItemResource *child = (wxItemResource *)node->Data(); + + ChangeOldToNewResource(res, child); + node = node->Next(); + } + } + else if (itemType == wxT("wxMessage")) + { + // Figure out if this is a bitmap or text message + if (res->GetValue4().IsEmpty()) + res->SetType(wxT("wxStaticText")); + else + res->SetType(wxT("wxStaticBitmap")); + } + else if (itemType == wxT("wxButton")) + { + // Figure out if this is a bitmap or text message + if (res->GetValue4().IsEmpty()) + { + } + else + res->SetType(wxT("wxBitmapButton")); + } + else if (itemType == wxT("wxGroupBox")) + { + res->SetType(wxT("wxStaticBox")); + } + else if (itemType == wxT("wxText")) + { + res->SetType(wxT("wxTextCtrl")); + } + else if (itemType == wxT("wxMultiText")) + { + res->SetType(wxT("wxTextCtrl")); + res->SetStyle(res->GetStyle() | wxTE_MULTILINE); + } + + itemType = res->GetType(); + + if (!res->GetTitle().IsEmpty() && + (itemType == wxT("wxTextCtrl") || itemType == wxT("wxChoice") || + itemType == wxT("wxComboBox") || itemType == wxT("wxGauge") || + itemType == wxT("wxListBox"))) + { + // Insert a label control resource, adjusting the size of this + // resource accordingly. + InsertLabelResource(parent, res); + } + + return TRUE; +} + +// Insert a label control resource, adjusting the size of this +// resource accordingly. +bool wxResourceManager::InsertLabelResource(wxItemResource* parent, wxItemResource* res) +{ + gs_LabelInsertionCount ++; + + bool isHorizontal = TRUE; + + // Determine panel orientation + if (parent->GetResourceStyle() & wxRESOURCE_VERTICAL_LABEL) + { + isHorizontal = FALSE; + } + else if (parent->GetResourceStyle() & wxRESOURCE_HORIZONTAL_LABEL) + { + isHorizontal = TRUE; + } + + // Now override + if (res->GetResourceStyle() & wxRESOURCE_VERTICAL_LABEL) + { + isHorizontal = FALSE; + } + else if (res->GetResourceStyle() & wxRESOURCE_HORIZONTAL_LABEL) + { + isHorizontal = TRUE; + } + + int x = res->GetX(); + int y = res->GetY(); + int width = res->GetWidth(); + int height = res->GetHeight(); + + // Find the font specified + wxFont font; + if (res->GetFont().Ok()) + font = res->GetFont(); + else + font = parent->GetFont(); + + if (!font.Ok() || (parent->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS)) + font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); + + int labelX, labelY; + wxCoord labelWidth, labelHeight; + wxScreenDC dc; + dc.SetFont(font); + dc.GetTextExtent(res->GetTitle(), & labelWidth, & labelHeight); + + // Vert/horizontal margin between controls + int margin = 3; + + labelX = x; + labelY = y; + //labelWidth += 1; + //labelHeight += 1; + + if (isHorizontal) + { + x += labelWidth + margin; + width -= (labelWidth + margin); + } + else + { + y += labelHeight + margin; + height -= (labelHeight + margin); + + // Fudge factors + if (res->GetType() == wxT("wxTextCtrl")) + { + height += 3; + } + else if (res->GetType() == wxT("wxChoice") || res->GetType() == wxT("wxComboBox")) + { + height -= 4; + } + } + + res->SetSize(x, y, width, height); + + wxItemResource* staticItem = new wxItemResource; + staticItem->SetSize(labelX, labelY, labelWidth, labelHeight); + staticItem->SetTitle(res->GetTitle()); + staticItem->SetFont(font); + staticItem->SetStyle(0); + staticItem->SetType(wxT("wxStaticText")); + + wxString newSymbolName; + int newId = GenerateWindowId(wxT("ID_STATICTEXT"), newSymbolName) ; + staticItem->SetId(newId); + + newSymbolName = res->GetName() + wxT("_Label"); + staticItem->SetName(newSymbolName); + m_symbolTable.AddSymbol(newSymbolName, newId); + + wxNode* node = parent->GetChildren().Member(res); + + wxASSERT( (node != NULL) ); + + parent->GetChildren().Insert(node, staticItem); + + // Remove the title from this resource since we've replaced it + // with a static text control + res->SetTitle(wxEmptyString); + + return TRUE; +} diff --git a/utils/dialoged/src/reseditr.h b/utils/dialoged/src/reseditr.h index 021b867195..89d108e1e0 100644 --- a/utils/dialoged/src/reseditr.h +++ b/utils/dialoged/src/reseditr.h @@ -12,7 +12,7 @@ #ifndef _RESEDITR_H_ #define _RESEDITR_H_ -#define wxDIALOG_EDITOR_VERSION 1.7 +#define wxDIALOG_EDITOR_VERSION 2.1 #ifdef __GNUG__ #pragma interface "reseditr.h" @@ -30,17 +30,18 @@ #include "symbtabl.h" #include "winstyle.h" -#define RESED_DELETE 1 -#define RESED_RECREATE 3 -#define RESED_CLEAR 4 -#define RESED_NEW_DIALOG 5 -#define RESED_NEW_PANEL 6 -#define RESED_TEST 10 +#define RESED_DELETE 301 +#define RESED_RECREATE 303 +#define RESED_CLEAR 304 +#define RESED_NEW_DIALOG 305 +#define RESED_NEW_PANEL 306 +#define RESED_TEST 310 +#define RESED_CONVERT_WXRS 311 // Convert old WXRs to new -#define RESED_CONTENTS 20 +#define RESED_CONTENTS 320 -#define IDC_TREECTRL 100 -#define IDC_LISTCTRL 101 +#define IDC_TREECTRL 500 +#define IDC_LISTCTRL 501 // For control list ('palette') #define RESED_POINTER 0 @@ -65,8 +66,8 @@ #define RESED_SPINBUTTON 19 /* - * Controls loading, saving, user interface of resource editor(s). - */ +* Controls loading, saving, user interface of resource editor(s). +*/ class wxResourceEditorFrame; class EditorToolBar; @@ -83,373 +84,365 @@ class wxResourceEditorControlList; class wxHelpController; /* - * The resourceTable contains a list of wxItemResources (which each may - * have further children, defining e.g. a dialog box with controls). - * - * We need to associate actual windows with each wxItemResource, - * instead of the current 'one current window' scheme. - * - * - We create a new dialog, create a wxItemResource, - * associate the dialog with wxItemResource via a hash table. - * Must be a hash table in case dialog is deleted without - * telling the resource manager. - * - When we save the resource after editing/closing the dialog, - * we check the wxItemResource/wxDialog and children for - * consistency (throw away items no longer in the wxDialog, - * create any new wxItemResources). - * - We save the wxItemResources via the wxPropertyInfo classes, - * so devolve the code to the appropriate class. - * This involves creating a new temporary wxPropertyInfo for - * the purpose. - * - * We currently assume we only create one instance of a window for - * each wxItemResource. We will need to relax this when we're editing - * in situ. - * - * - */ - +* The resourceTable contains a list of wxItemResources (which each may +* have further children, defining e.g. a dialog box with controls). +* +* We need to associate actual windows with each wxItemResource, +* instead of the current 'one current window' scheme. +* +* - We create a new dialog, create a wxItemResource, +* associate the dialog with wxItemResource via a hash table. +* Must be a hash table in case dialog is deleted without +* telling the resource manager. +* - When we save the resource after editing/closing the dialog, +* we check the wxItemResource/wxDialog and children for +* consistency (throw away items no longer in the wxDialog, +* create any new wxItemResources). +* - We save the wxItemResources via the wxPropertyInfo classes, +* so devolve the code to the appropriate class. +* This involves creating a new temporary wxPropertyInfo for +* the purpose. +* +* We currently assume we only create one instance of a window for +* each wxItemResource. We will need to relax this when we're editing +* in situ. +* +* +*/ + class wxResourceTableWithSaving: public wxResourceTable { - public: - wxResourceTableWithSaving():wxResourceTable() - { - // Add all known window styles - m_styleTable.Init(); - } - virtual bool Save(const wxString& filename); - virtual bool SaveResource(wxTextOutputStream& stream, wxItemResource* item, wxItemResource* parentItem); - - void GeneratePanelStyleString(long windowStyle, char *buf); - void GenerateDialogStyleString(long windowStyle, char *buf); - -/* - void GenerateRadioBoxStyleString(long windowStyle, char *buf); - void GenerateMessageStyleString(long windowStyle, char *buf); - void GenerateTextStyleString(long windowStyle, char *buf); - void GenerateButtonStyleString(long windowStyle, char *buf); - void GenerateCheckBoxStyleString(long windowStyle, char *buf); - void GenerateRadioButtonStyleString(long windowStyle, char *buf); - void GenerateListBoxStyleString(long windowStyle, char *buf); - void GenerateSliderStyleString(long windowStyle, char *buf); - void GenerateGroupBoxStyleString(long windowStyle, char *buf); - void GenerateGaugeStyleString(long windowStyle, char *buf); - void GenerateChoiceStyleString(long windowStyle, char *buf); - void GenerateComboBoxStyleString(long windowStyle, char *buf); - void GenerateScrollBarStyleString(long windowStyle, char *buf); -*/ - - void GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf); - -/* - bool GenerateStyle(char *buf, long windowStyle, long flag, char *strStyle); -*/ - - void OutputFont(wxTextOutputStream& stream, const wxFont& font); - wxControl *CreateItem(wxPanel *panel, const wxItemResource *childResource, const wxItemResource* parentResource); - +public: + wxResourceTableWithSaving():wxResourceTable() + { + // Add all known window styles + m_styleTable.Init(); + } + virtual bool Save(const wxString& filename); + virtual bool SaveResource(wxTextOutputStream& stream, wxItemResource* item, wxItemResource* parentItem); + + void GeneratePanelStyleString(long windowStyle, char *buf); + void GenerateDialogStyleString(long windowStyle, char *buf); + + void GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf); + + void OutputFont(wxTextOutputStream& stream, const wxFont& font); + wxControl *CreateItem(wxPanel *panel, const wxItemResource *childResource, const wxItemResource* parentResource); + protected: - wxWindowStyleTable m_styleTable; + wxWindowStyleTable m_styleTable; }; - + class wxResourceEditorScrolledWindow; class wxResourceManager: public wxObject { - friend class wxResourceEditorFrame; - + friend class wxResourceEditorFrame; + public: - wxResourceManager(); - ~wxResourceManager(); + wxResourceManager(); + ~wxResourceManager(); + + // Operations + + // Initializes the resource manager + bool Initialize(); + + // Load/save window size etc. + bool LoadOptions(); + bool SaveOptions(); + + // Show or hide the resource editor frame, which displays a list + // of resources with ability to edit them. + virtual bool ShowResourceEditor(bool show, wxWindow *parent = NULL, const char *title = "wxWindows Dialog Editor"); + + // Convert old WXRs to new + virtual bool ConvertWXRs(); + bool DoConvertWXR(const wxString& oldPath, const wxString& newPath); + bool ChangeOldToNewResource(wxItemResource* parent, wxItemResource* res); + bool InsertLabelResource(wxItemResource* parent, wxItemResource* res); -// Operations - - // Initializes the resource manager - bool Initialize(); - - // Load/save window size etc. - bool LoadOptions(); - bool SaveOptions(); - - // Show or hide the resource editor frame, which displays a list - // of resources with ability to edit them. - virtual bool ShowResourceEditor(bool show, wxWindow *parent = NULL, const char *title = "wxWindows Dialog Editor"); - - virtual bool Save(); - virtual bool SaveAs(); - virtual bool Save(const wxString& filename); - virtual bool Load(const wxString& filename); - virtual bool Clear(bool deleteWindows = TRUE, bool force = TRUE); - virtual void SetFrameTitle(const wxString& filename); - virtual void ClearCurrentDialog(); - virtual bool New(bool loadFromFile = TRUE, const wxString& filename = ""); - virtual bool SaveIfModified(); - virtual void AlignItems(int flag); - virtual void CopySize(); - virtual void ToBackOrFront(bool toBack); - virtual wxWindow *FindParentOfSelection(); - - virtual wxFrame *OnCreateEditorFrame(const char *title); - virtual wxMenuBar *OnCreateEditorMenuBar(wxFrame *parent); - virtual wxResourceEditorScrolledWindow *OnCreateEditorPanel(wxFrame *parent); - virtual wxToolBar *OnCreateToolBar(wxFrame *parent); - - // Create a window information object for the give window - wxWindowPropertyInfo* CreatePropertyInfoForWindow(wxWindow *win); - // Edit the given window - void EditWindow(wxWindow *win); - - virtual void UpdateResourceList(); - virtual void AddItemsRecursively(long parent, wxItemResource *resource); - virtual bool EditSelectedResource(); - virtual bool Edit(wxItemResource *res); - virtual bool CreateNewPanel(); - virtual bool CreatePanelItem(wxItemResource *panelResource, wxPanel *panel, char *itemType, int x = 10, int y = 10, bool isBitmap = FALSE); - virtual bool DeleteSelection(); - virtual bool TestCurrentDialog(wxWindow* parent); - - // Saves the window info into the resource, and deletes the - // handler. Doesn't actually disassociate the window from - // the resources. Replaces OnClose. - virtual bool SaveInfoAndDeleteHandler(wxWindow* win); - - // Destroys the window. If this is the 'current' panel, NULLs the - // variable. - virtual bool DeleteWindow(wxWindow* win); - virtual bool DeleteResource(wxItemResource *res); - virtual bool DeleteResource(wxWindow *win); - - // Add bitmap resource if there isn't already one with this filename. - virtual wxString AddBitmapResource(const wxString& filename); - - // Delete the bitmap resource if it isn't being used by another resource. - virtual void PossiblyDeleteBitmapResource(const wxString& resourceName); - - // Helper function for above - virtual bool IsBitmapResourceUsed(const wxString& resourceName); - - wxItemResource *FindBitmapResourceByFilename(const wxString& filename); - - wxString FindBitmapFilenameForResource(wxItemResource *resource); - - // Is this window identifier in use? - bool IsSymbolUsed(wxItemResource* thisResource, wxWindowID id) ; - - // Is this window identifier compatible with the given name? (i.e. - // does it already exist under a different name) - bool IsIdentifierOK(const wxString& name, wxWindowID id); - - // Change all integer ids that match oldId, to newId. - // This is necessary if an id is changed for one resource - all resources - // must be changed. - void ChangeIds(int oldId, int newId); - - // If any resource ids were missing (or their symbol was missing), - // repair them i.e. give them new ids. Returns TRUE if any resource - // needed repairing. - bool RepairResourceIds(); - - // Deletes 'win' and creates a new window from the resource that - // was associated with it. E.g. if you can't change properties on the - // fly, you'll need to delete the window and create it again. - virtual wxWindow *RecreateWindowFromResource(wxWindow *win, wxWindowPropertyInfo *info = NULL, bool instantiateFirst = TRUE); - - virtual bool RecreateSelection(); - - // Remove selection handles if this control is selected - void DeselectItemIfNecessary(wxWindow *win); - - // Need to search through resource table removing this from - // any resource which has this as a parent. - virtual bool RemoveResourceFromParent(wxItemResource *res); - - virtual bool EditDialog(wxDialog *dialog, wxWindow *parent); - - void AddSelection(wxWindow *win); - void RemoveSelection(wxWindow *win); - - virtual void MakeUniqueName(char *prefix, char *buf); - - // (Dis)associate resource<->physical window - // Doesn't delete any windows. - virtual void AssociateResource(wxItemResource *resource, wxWindow *win); - virtual bool DisassociateResource(wxItemResource *resource); - virtual bool DisassociateResource(wxWindow *win); - virtual bool DisassociateWindows(); - virtual wxItemResource *FindResourceForWindow(wxWindow *win); - virtual wxWindow *FindWindowForResource(wxItemResource *resource); - - virtual bool InstantiateAllResourcesFromWindows(); - virtual bool InstantiateResourceFromWindow(wxItemResource *resource, wxWindow *window, bool recurse = FALSE); - -// Accessors - inline void SetEditorFrame(wxFrame *fr) { m_editorFrame = fr; } - inline void SetEditorToolBar(EditorToolBar *tb) { m_editorToolBar = tb; } - inline wxFrame *GetEditorFrame() const { return m_editorFrame; } - inline wxResourceEditorProjectTree *GetEditorResourceTree() const { return m_editorResourceTree; } - inline wxResourceEditorControlList *GetEditorControlList() const { return m_editorControlList; } - inline wxList& GetSelections() { return m_selections; } - inline wxMenu *GetPopupMenu() const { return m_popupMenu; } + virtual bool Save(); + virtual bool SaveAs(); + virtual bool Save(const wxString& filename); + virtual bool Load(const wxString& filename); + virtual bool Clear(bool deleteWindows = TRUE, bool force = TRUE); + virtual void SetFrameTitle(const wxString& filename); + virtual void ClearCurrentDialog(); + virtual bool New(bool loadFromFile = TRUE, const wxString& filename = ""); + virtual bool SaveIfModified(); + virtual void AlignItems(int flag); + virtual void CopySize(int command); // Copy width, height or both from first control + virtual void ToBackOrFront(bool toBack); + virtual void DistributePositions(int command); // Distribute controls evenly between first and last + virtual wxWindow *FindParentOfSelection(); + + virtual wxFrame *OnCreateEditorFrame(const char *title); + virtual wxMenuBar *OnCreateEditorMenuBar(wxFrame *parent); + virtual wxResourceEditorScrolledWindow *OnCreateEditorPanel(wxFrame *parent); + virtual wxToolBar *OnCreateToolBar(wxFrame *parent); + + // Create a window information object for the give window + wxWindowPropertyInfo* CreatePropertyInfoForWindow(wxWindow *win); + // Edit the given window + void EditWindow(wxWindow *win); + + virtual void UpdateResourceList(); + virtual void AddItemsRecursively(long parent, wxItemResource *resource); + virtual bool EditSelectedResource(); + virtual bool Edit(wxItemResource *res); + virtual bool CreateNewPanel(); + virtual bool CreatePanelItem(wxItemResource *panelResource, wxPanel *panel, char *itemType, int x = 10, int y = 10, bool isBitmap = FALSE); + virtual bool DeleteSelection(); + virtual bool TestCurrentDialog(wxWindow* parent); + + // Saves the window info into the resource, and deletes the + // handler. Doesn't actually disassociate the window from + // the resources. Replaces OnClose. + virtual bool SaveInfoAndDeleteHandler(wxWindow* win); + + // Destroys the window. If this is the 'current' panel, NULLs the + // variable. + virtual bool DeleteWindow(wxWindow* win); + virtual bool DeleteResource(wxItemResource *res); + virtual bool DeleteResource(wxWindow *win); + + // Add bitmap resource if there isn't already one with this filename. + virtual wxString AddBitmapResource(const wxString& filename); + + // Delete the bitmap resource if it isn't being used by another resource. + virtual void PossiblyDeleteBitmapResource(const wxString& resourceName); + + // Helper function for above + virtual bool IsBitmapResourceUsed(const wxString& resourceName); + + wxItemResource *FindBitmapResourceByFilename(const wxString& filename); + + wxString FindBitmapFilenameForResource(wxItemResource *resource); + + // Is this window identifier in use? + bool IsSymbolUsed(wxItemResource* thisResource, wxWindowID id) ; + + // Is this window identifier compatible with the given name? (i.e. + // does it already exist under a different name) + bool IsIdentifierOK(const wxString& name, wxWindowID id); + + // Change all integer ids that match oldId, to newId. + // This is necessary if an id is changed for one resource - all resources + // must be changed. + void ChangeIds(int oldId, int newId); + + // If any resource ids were missing (or their symbol was missing), + // repair them i.e. give them new ids. Returns TRUE if any resource + // needed repairing. + bool RepairResourceIds(); + + // Deletes 'win' and creates a new window from the resource that + // was associated with it. E.g. if you can't change properties on the + // fly, you'll need to delete the window and create it again. + virtual wxWindow *RecreateWindowFromResource(wxWindow *win, wxWindowPropertyInfo *info = NULL, bool instantiateFirst = TRUE); + + virtual bool RecreateSelection(); + + // Remove selection handles if this control is selected + void DeselectItemIfNecessary(wxWindow *win); + + // Need to search through resource table removing this from + // any resource which has this as a parent. + virtual bool RemoveResourceFromParent(wxItemResource *res); + + virtual bool EditDialog(wxDialog *dialog, wxWindow *parent); + + void AddSelection(wxWindow *win); + void RemoveSelection(wxWindow *win); + + virtual void MakeUniqueName(char *prefix, char *buf); + + // (Dis)associate resource<->physical window + // Doesn't delete any windows. + virtual void AssociateResource(wxItemResource *resource, wxWindow *win); + virtual bool DisassociateResource(wxItemResource *resource); + virtual bool DisassociateResource(wxWindow *win); + virtual bool DisassociateWindows(); + virtual wxItemResource *FindResourceForWindow(wxWindow *win); + virtual wxWindow *FindWindowForResource(wxItemResource *resource); + + virtual bool InstantiateAllResourcesFromWindows(); + virtual bool InstantiateResourceFromWindow(wxItemResource *resource, wxWindow *window, bool recurse = FALSE); + + // Accessors + inline void SetEditorFrame(wxFrame *fr) { m_editorFrame = fr; } + inline void SetEditorToolBar(EditorToolBar *tb) { m_editorToolBar = tb; } + inline wxFrame *GetEditorFrame() const { return m_editorFrame; } + inline wxResourceEditorProjectTree *GetEditorResourceTree() const { return m_editorResourceTree; } + inline wxResourceEditorControlList *GetEditorControlList() const { return m_editorControlList; } + inline wxList& GetSelections() { return m_selections; } + inline wxMenu *GetPopupMenu() const { return m_popupMenu; } #ifdef __WXMSW__ - inline wxHelpController *GetHelpController() const { return m_helpController; } + inline wxHelpController *GetHelpController() const { return m_helpController; } #endif - - inline void Modify(bool mod = TRUE) { m_modified = mod; } - inline bool Modified() const { return m_modified; } - - inline wxResourceTable& GetResourceTable() { return m_resourceTable; } - inline wxHashTable& GetResourceAssociations() { return m_resourceAssociations; } - - inline wxString GetCurrentFilename() const { return m_currentFilename; } - static wxResourceManager* GetCurrentResourceManager() { return sm_currentResourceManager; } - - inline void SetSymbolFilename(const wxString& s) { m_symbolFilename = s; } - inline wxString GetSymbolFilename() const { return m_symbolFilename; } - - inline wxRect& GetPropertyWindowSize() { return m_propertyWindowSize; } - inline wxRect& GetResourceEditorWindowSize() { return m_resourceEditorWindowSize; } - - wxResourceSymbolTable& GetSymbolTable() { return m_symbolTable; } - - // Generate a window id and a first stab at a name - int GenerateWindowId(const wxString& prefix, wxString& idName) ; - -// Member variables + + inline void Modify(bool mod = TRUE) { m_modified = mod; } + inline bool Modified() const { return m_modified; } + + inline wxResourceTable& GetResourceTable() { return m_resourceTable; } + inline wxHashTable& GetResourceAssociations() { return m_resourceAssociations; } + + inline wxString GetCurrentFilename() const { return m_currentFilename; } + static wxResourceManager* GetCurrentResourceManager() { return sm_currentResourceManager; } + + inline void SetSymbolFilename(const wxString& s) { m_symbolFilename = s; } + inline wxString GetSymbolFilename() const { return m_symbolFilename; } + + inline wxRect& GetPropertyWindowSize() { return m_propertyWindowSize; } + inline wxRect& GetResourceEditorWindowSize() { return m_resourceEditorWindowSize; } + + wxResourceSymbolTable& GetSymbolTable() { return m_symbolTable; } + + // Generate a window id and a first stab at a name + int GenerateWindowId(const wxString& prefix, wxString& idName) ; + + // Member variables protected: #ifdef __WXMSW__ - wxHelpController* m_helpController; + wxHelpController* m_helpController; #endif - wxResourceTableWithSaving m_resourceTable; - wxFrame* m_editorFrame; - wxResourceEditorScrolledWindow* m_editorPanel; - wxMenu* m_popupMenu; - wxResourceEditorProjectTree* m_editorResourceTree; - wxResourceEditorControlList* m_editorControlList; - EditorToolBar* m_editorToolBar; - int m_nameCounter; - int m_symbolIdCounter; // For generating window ids - bool m_modified; - wxHashTable m_resourceAssociations; - wxList m_selections; - wxString m_currentFilename; - wxBitmap* m_bitmapImage; // Default for static bitmaps/buttons - - wxImageList m_imageList; - long m_rootDialogItem; // Root of dialog hierarchy in tree (unused) - - // Options to be saved/restored - wxString m_optionsResourceFilename; // e.g. dialoged.ini, .dialogrc - wxRect m_propertyWindowSize; - wxRect m_resourceEditorWindowSize; - static wxResourceManager* sm_currentResourceManager; - - // Symbol table with identifiers for controls - wxResourceSymbolTable m_symbolTable; - // Filename for include file, e.g. resource.h - wxString m_symbolFilename; + wxResourceTableWithSaving m_resourceTable; + wxFrame* m_editorFrame; + wxResourceEditorScrolledWindow* m_editorPanel; + wxMenu* m_popupMenu; + wxResourceEditorProjectTree* m_editorResourceTree; + wxResourceEditorControlList* m_editorControlList; + EditorToolBar* m_editorToolBar; + int m_nameCounter; + int m_symbolIdCounter; // For generating window ids + bool m_modified; + wxHashTable m_resourceAssociations; + wxList m_selections; + wxString m_currentFilename; + wxBitmap* m_bitmapImage; // Default for static bitmaps/buttons + + wxImageList m_imageList; + long m_rootDialogItem; // Root of dialog hierarchy in tree (unused) + + // Options to be saved/restored + wxString m_optionsResourceFilename; // e.g. dialoged.ini, .dialogrc + wxRect m_propertyWindowSize; + wxRect m_resourceEditorWindowSize; + static wxResourceManager* sm_currentResourceManager; + + // Symbol table with identifiers for controls + wxResourceSymbolTable m_symbolTable; + // Filename for include file, e.g. resource.h + wxString m_symbolFilename; }; class wxResourceEditorFrame: public wxFrame { - public: - DECLARE_CLASS(wxResourceEditorFrame) - - wxResourceManager *manager; - wxResourceEditorFrame(wxResourceManager *resMan, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600, 400), - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); - ~wxResourceEditorFrame(); - - void OnCloseWindow(wxCloseEvent& event); - - void OnNew(wxCommandEvent& event); - void OnOpen(wxCommandEvent& event); - void OnNewDialog(wxCommandEvent& event); - void OnClear(wxCommandEvent& event); - void OnSave(wxCommandEvent& event); - void OnSaveAs(wxCommandEvent& event); - void OnExit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnContents(wxCommandEvent& event); - void OnDeleteSelection(wxCommandEvent& event); - void OnRecreateSelection(wxCommandEvent& event); - void OnTest(wxCommandEvent& event); - - DECLARE_EVENT_TABLE() +public: + DECLARE_CLASS(wxResourceEditorFrame) + + wxResourceManager *manager; + wxResourceEditorFrame(wxResourceManager *resMan, wxFrame *parent, const wxString& title, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600, 400), + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); + ~wxResourceEditorFrame(); + + void OnCloseWindow(wxCloseEvent& event); + + void OnNew(wxCommandEvent& event); + void OnOpen(wxCommandEvent& event); + void OnNewDialog(wxCommandEvent& event); + void OnClear(wxCommandEvent& event); + void OnSave(wxCommandEvent& event); + void OnSaveAs(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnContents(wxCommandEvent& event); + void OnDeleteSelection(wxCommandEvent& event); + void OnRecreateSelection(wxCommandEvent& event); + void OnTest(wxCommandEvent& event); + void OnConvertWXRs(wxCommandEvent& event); + + DECLARE_EVENT_TABLE() }; class wxResourceEditorScrolledWindow: public wxScrolledWindow { - public: - wxResourceEditorScrolledWindow(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0); - ~wxResourceEditorScrolledWindow(); - - void OnPaint(wxPaintEvent& event); - - void DrawTitle(wxDC& dc); - -// Accessors - inline int GetMarginX() { return m_marginX; } - inline int GetMarginY() { return m_marginY; } - - public: - wxWindow* m_childWindow; - private: - int m_marginX, m_marginY; - - DECLARE_EVENT_TABLE() +public: + wxResourceEditorScrolledWindow(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = 0); + ~wxResourceEditorScrolledWindow(); + + void OnPaint(wxPaintEvent& event); + + void DrawTitle(wxDC& dc); + + // Accessors + inline int GetMarginX() { return m_marginX; } + inline int GetMarginY() { return m_marginY; } + +public: + wxWindow* m_childWindow; +private: + int m_marginX, m_marginY; + + DECLARE_EVENT_TABLE() }; #define OBJECT_MENU_EDIT 1 #define OBJECT_MENU_DELETE 2 /* - * Main toolbar - * - */ - +* Main toolbar +* +*/ + class EditorToolBar: public wxToolBar { public: - EditorToolBar(wxFrame *frame, const wxPoint& pos = wxPoint(0, 0), const wxSize& size = wxSize(0, 0), - long style = wxTB_HORIZONTAL); - bool OnLeftClick(int toolIndex, bool toggled); - void OnMouseEnter(int toolIndex); - -DECLARE_EVENT_TABLE() + EditorToolBar(wxFrame *frame, const wxPoint& pos = wxPoint(0, 0), const wxSize& size = wxSize(0, 0), + long style = wxTB_HORIZONTAL); + bool OnLeftClick(int toolIndex, bool toggled); + void OnMouseEnter(int toolIndex); + + DECLARE_EVENT_TABLE() }; // Toolbar ids -#define TOOLBAR_LOAD_FILE 1 -#define TOOLBAR_SAVE_FILE 2 -#define TOOLBAR_NEW 3 -#define TOOLBAR_TREE 5 -#define TOOLBAR_HELP 6 +#define TOOLBAR_LOAD_FILE 101 +#define TOOLBAR_SAVE_FILE 102 +#define TOOLBAR_NEW 103 +#define TOOLBAR_TREE 105 +#define TOOLBAR_HELP 106 // Formatting tools -#define TOOLBAR_FORMAT_HORIZ 10 -#define TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN 11 -#define TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN 12 -#define TOOLBAR_FORMAT_VERT 13 -#define TOOLBAR_FORMAT_VERT_TOP_ALIGN 14 -#define TOOLBAR_FORMAT_VERT_BOT_ALIGN 15 +#define TOOLBAR_FORMAT_HORIZ 110 +#define TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN 111 +#define TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN 112 +#define TOOLBAR_FORMAT_VERT 113 +#define TOOLBAR_FORMAT_VERT_TOP_ALIGN 114 +#define TOOLBAR_FORMAT_VERT_BOT_ALIGN 115 -#define TOOLBAR_TO_FRONT 16 -#define TOOLBAR_TO_BACK 17 -#define TOOLBAR_COPY_SIZE 18 +#define TOOLBAR_TO_FRONT 116 +#define TOOLBAR_TO_BACK 117 +#define TOOLBAR_COPY_SIZE 118 +#define TOOLBAR_COPY_WIDTH 119 +#define TOOLBAR_COPY_HEIGHT 120 +#define TOOLBAR_DISTRIBUTE_HORIZ 121 +#define TOOLBAR_DISTRIBUTE_VERT 122 /* - * this class is used to store data associated with a tree item - */ +* this class is used to store data associated with a tree item +*/ class wxResourceTreeData : public wxTreeItemData { public: wxResourceTreeData(wxItemResource *resource) { m_resource = resource; } - + wxItemResource *GetResource() const { return m_resource; } - + private: wxItemResource *m_resource; }; diff --git a/utils/dialoged/src/reswrite.cpp b/utils/dialoged/src/reswrite.cpp index 8ae04f8623..8e5588fe92 100644 --- a/utils/dialoged/src/reswrite.cpp +++ b/utils/dialoged/src/reswrite.cpp @@ -43,480 +43,480 @@ char *SafeWord(const wxString& s); // us not to require unique window names. wxControl *wxResourceTableWithSaving::CreateItem(wxPanel *panel, const wxItemResource *childResource, const wxItemResource* parentResource) { - wxControl *item = wxResourceTable::CreateItem(panel, childResource, parentResource); - if (item) - wxResourceManager::GetCurrentResourceManager()->GetResourceAssociations().Put((long)childResource, item); - return item; + wxControl *item = wxResourceTable::CreateItem(panel, childResource, parentResource); + if (item) + wxResourceManager::GetCurrentResourceManager()->GetResourceAssociations().Put((long)childResource, item); + return item; } void wxResourceTableWithSaving::OutputFont(wxTextOutputStream& stream, const wxFont& font) { - stream << "[" << font.GetPointSize() << ", '"; - stream << font.GetFamilyString() << "', '"; - stream << font.GetStyleString() << "', '"; - stream << font.GetWeightString() << "', "; - stream << (int)font.GetUnderlined(); - if (font.GetFaceName() != "") - stream << ", '" << font.GetFaceName() << "'"; - stream << "]"; + stream << "[" << font.GetPointSize() << ", '"; + stream << font.GetFamilyString() << "', '"; + stream << font.GetStyleString() << "', '"; + stream << font.GetWeightString() << "', "; + stream << (int)font.GetUnderlined(); + if (font.GetFaceName() != "") + stream << ", '" << font.GetFaceName() << "'"; + stream << "]"; } /* - * Resource table with saving (basic one only has loading) - */ - +* Resource table with saving (basic one only has loading) +*/ + bool wxResourceTableWithSaving::Save(const wxString& filename) { - wxFileOutputStream file_output( filename ); - if (file_output.LastError()) - return FALSE; - - wxTextOutputStream stream( file_output ); - - BeginFind(); - wxNode *node = NULL; - while ((node = Next())) - { - wxItemResource *item = (wxItemResource *)node->Data(); - wxString resType(item->GetType()); - - if (resType == "wxDialogBox" || resType == "wxDialog" || resType == "wxPanel" || resType == "wxBitmap") - { - if (!SaveResource(stream, item, (wxItemResource*) NULL)) + wxFileOutputStream file_output( filename ); + if (file_output.LastError()) return FALSE; + + wxTextOutputStream stream( file_output ); + + BeginFind(); + wxNode *node = NULL; + while ((node = Next())) + { + wxItemResource *item = (wxItemResource *)node->Data(); + wxString resType(item->GetType()); + + if (resType == "wxDialogBox" || resType == "wxDialog" || resType == "wxPanel" || resType == "wxBitmap") + { + if (!SaveResource(stream, item, (wxItemResource*) NULL)) + return FALSE; + } } - } - return TRUE; + return TRUE; } bool wxResourceTableWithSaving::SaveResource(wxTextOutputStream& stream, wxItemResource* item, wxItemResource* parentItem) { - char styleBuf[400]; - wxString itemType(item->GetType()); - - if (itemType == "wxDialogBox" || itemType == "wxDialog" || itemType == "wxPanel") + char styleBuf[400]; + wxString itemType(item->GetType()); + + if (itemType == "wxDialogBox" || itemType == "wxDialog" || itemType == "wxPanel") { - if (itemType == "wxDialogBox" || itemType == "wxDialog") - { - stream << "static char *" << item->GetName() << " = \"dialog(name = '" << item->GetName() << "',\\\n"; - GenerateDialogStyleString(item->GetStyle(), styleBuf); - } - else - { - stream << "static char *" << item->GetName() << " = \"panel(name = '" << item->GetName() << "',\\\n"; - GenerateDialogStyleString(item->GetStyle(), styleBuf); - } - - stream << " style = '" << styleBuf << "',\\\n"; - stream << " title = " << SafeWord(item->GetTitle()) << ",\\\n"; - stream << " id = " << item->GetId() << ",\\\n"; - stream << " x = " << item->GetX() << ", y = " << item->GetY(); - stream << ", width = " << item->GetWidth() << ", height = " << item->GetHeight(); - - if (1) // item->GetStyle() & wxNO_3D) - { - if (item->GetBackgroundColour().Ok()) + if (itemType == "wxDialogBox" || itemType == "wxDialog") { - char buf[7]; - wxDecToHex(item->GetBackgroundColour().Red(), buf); - wxDecToHex(item->GetBackgroundColour().Green(), buf+2); - wxDecToHex(item->GetBackgroundColour().Blue(), buf+4); - buf[6] = 0; - - stream << ",\\\n " << "background_colour = '" << buf << "'"; + stream << "static char *" << item->GetName() << " = \"dialog(name = '" << item->GetName() << "',\\\n"; + GenerateDialogStyleString(item->GetStyle(), styleBuf); + } + else + { + stream << "static char *" << item->GetName() << " = \"panel(name = '" << item->GetName() << "',\\\n"; + GenerateDialogStyleString(item->GetStyle(), styleBuf); } - } - - int dialogUnits = 0; - int useDefaults = 0; - if ((item->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) - dialogUnits = 1; - if ((item->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0) - useDefaults = 1; - - stream << ",\\\n " << "use_dialog_units = " << dialogUnits; - stream << ",\\\n " << "use_system_defaults = " << useDefaults; - - if (item->GetFont().Ok()) - { - stream << ",\\\n font = "; - OutputFont(stream, item->GetFont()); - } - - if (item->GetChildren().Number() > 0) - stream << ",\\\n"; - else - stream << "\\\n"; - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - stream << " control = ["; + stream << " style = '" << styleBuf << "',\\\n"; + stream << " title = " << SafeWord(item->GetTitle()) << ",\\\n"; + stream << " id = " << item->GetId() << ",\\\n"; + stream << " x = " << item->GetX() << ", y = " << item->GetY(); + stream << ", width = " << item->GetWidth() << ", height = " << item->GetHeight(); - SaveResource(stream, child, item); - - stream << "]"; - - if (node->Next()) - stream << ",\\\n"; - node = node->Next(); - } - stream << ").\";\n\n"; - } - else if (itemType == "wxButton" || itemType == "wxBitmapButton") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - if (item->GetValue4()) - stream << ", '" << item->GetValue4() << "'"; - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxStaticText" || itemType == "wxStaticBitmap") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - if (item->GetValue4()) - stream << ", '" << item->GetValue4() << "'"; - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxCheckBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxCheckBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1(); - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxRadioButton") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxRadioButton, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1(); - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxStaticBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxStaticBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxText" || itemType == "wxMultiText" || itemType == "wxTextCtrl") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxTextCtrl, "; - stream << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << SafeWord(item->GetValue4()); - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxGauge") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxGauge, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1() << ", " << item->GetValue2(); - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxSlider") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxSlider, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3(); - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxScrollBar") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxScrollBar, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3() << ", "; - stream << item->GetValue5(); - } - else if (itemType == "wxListBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxListBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - - // Default list of values - - stream << ", ["; - if (item->GetStringValues().Number() > 0) - { - wxNode *node = item->GetStringValues().First(); + if (1) // item->GetStyle() & wxNO_3D) + { + if (item->GetBackgroundColour().Ok()) + { + char buf[7]; + wxDecToHex(item->GetBackgroundColour().Red(), buf); + wxDecToHex(item->GetBackgroundColour().Green(), buf+2); + wxDecToHex(item->GetBackgroundColour().Blue(), buf+4); + buf[6] = 0; + + stream << ",\\\n " << "background_colour = '" << buf << "'"; + } + } + + int dialogUnits = 0; + int useDefaults = 0; + if ((item->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0) + dialogUnits = 1; + if ((item->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0) + useDefaults = 1; + + stream << ",\\\n " << "use_dialog_units = " << dialogUnits; + stream << ",\\\n " << "use_system_defaults = " << useDefaults; + + if (item->GetFont().Ok()) + { + stream << ",\\\n font = "; + OutputFont(stream, item->GetFont()); + } + + if (item->GetChildren().Number() > 0) + stream << ",\\\n"; + else + stream << "\\\n"; + wxNode *node = item->GetChildren().First(); while (node) { - char *s = (char *)node->Data(); - stream << SafeWord(s); - if (node->Next()) - stream << ", "; - node = node->Next(); + wxItemResource *child = (wxItemResource *)node->Data(); + + stream << " control = ["; + + SaveResource(stream, child, item); + + stream << "]"; + + if (node->Next()) + stream << ",\\\n"; + node = node->Next(); } - } - stream << "]"; -/* Styles are now in the window style, not in a separate arg - stream << ", "; - switch (item->GetValue1()) - { + stream << ").\";\n\n"; + } + else if (itemType == "wxButton" || itemType == "wxBitmapButton") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + if (item->GetValue4()) + stream << ", '" << item->GetValue4() << "'"; + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxStaticText" || itemType == "wxStaticBitmap") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + if (item->GetValue4()) + stream << ", '" << item->GetValue4() << "'"; + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxCheckBox") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxCheckBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + stream << ", " << item->GetValue1(); + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxRadioButton") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxRadioButton, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + stream << ", " << item->GetValue1(); + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxStaticBox") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxStaticBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxText" || itemType == "wxMultiText" || itemType == "wxTextCtrl") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxTextCtrl, "; + stream << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + stream << ", " << SafeWord(item->GetValue4()); + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxGauge") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxGauge, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + stream << ", " << item->GetValue1() << ", " << item->GetValue2(); + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxSlider") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxSlider, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3(); + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxScrollBar") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxScrollBar, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3() << ", "; + stream << item->GetValue5(); + } + else if (itemType == "wxListBox") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxListBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + + // Default list of values + + stream << ", ["; + if (item->GetStringValues().Number() > 0) + { + wxNode *node = item->GetStringValues().First(); + while (node) + { + char *s = (char *)node->Data(); + stream << SafeWord(s); + if (node->Next()) + stream << ", "; + node = node->Next(); + } + } + stream << "]"; + /* Styles are now in the window style, not in a separate arg + stream << ", "; + switch (item->GetValue1()) + { case wxLB_MULTIPLE: { - stream << "'wxLB_MULTIPLE'"; - break; + stream << "'wxLB_MULTIPLE'"; + break; } case wxLB_EXTENDED: { - stream << "'wxLB_EXTENDED'"; - break; + stream << "'wxLB_EXTENDED'"; + break; } case wxLB_SINGLE: default: { - stream << "'wxLB_SINGLE'"; - break; + stream << "'wxLB_SINGLE'"; + break; } - } - */ - - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxChoice" || itemType == "wxComboBox") - { - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - - stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - - if (itemType == "wxComboBox") - stream << ", " << SafeWord(item->GetValue4()); - - // Default list of values - - stream << ", ["; - if (item->GetStringValues().Number() > 0) - { - wxNode *node = item->GetStringValues().First(); - while (node) - { - char *s = (char *)node->Data(); - stream << SafeWord(s); - if (node->Next()) - stream << ", "; - node = node->Next(); } - } - stream << "]"; - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxRadioBox") - { - // Must write out the orientation and number of rows/cols!! - GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - stream << item->GetId() << ", " << "wxRadioBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; - stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; - stream << item->GetWidth() << ", " << item->GetHeight(); - - // Default list of values - - stream << ", ["; - if (item->GetStringValues().Number() > 0) - { - wxNode *node = item->GetStringValues().First(); - while (node) - { - char *s = (char *)node->Data(); - stream << SafeWord(s); - if (node->Next()) - stream << ", "; - node = node->Next(); - } - } - stream << "], " << item->GetValue1(); - if (item->GetFont().Ok()) - { - stream << ",\\\n "; - OutputFont(stream, item->GetFont()); - } - } - else if (itemType == "wxBitmap") - { - stream << "static char *" << item->GetName() << " = \"bitmap(name = '" << item->GetName() << "',\\\n"; - - wxNode *node = item->GetChildren().First(); - while (node) - { - wxItemResource *child = (wxItemResource *)node->Data(); - stream << " bitmap = ["; + */ - char buf[400]; - strcpy(buf, child->GetName()); -#ifdef __WXMSW__ - wxDos2UnixFilename(buf); -#endif - - stream << "'" << buf << "', "; + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxChoice" || itemType == "wxComboBox") + { + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); - int bitmapType = (int)child->GetValue1(); - switch (bitmapType) + stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); + + if (itemType == "wxComboBox") + stream << ", " << SafeWord(item->GetValue4()); + + // Default list of values + + stream << ", ["; + if (item->GetStringValues().Number() > 0) { - case wxBITMAP_TYPE_XBM_DATA: - { - stream << "wxBITMAP_TYPE_XBM_DATA"; - break; - } - case wxBITMAP_TYPE_XPM_DATA: - { - stream << "wxBITMAP_TYPE_XPM_DATA"; - break; - } - case wxBITMAP_TYPE_XBM: - { - stream << "wxBITMAP_TYPE_XBM"; - break; - } - case wxBITMAP_TYPE_XPM: - { - stream << "wxBITMAP_TYPE_XPM"; - break; - } - case wxBITMAP_TYPE_BMP: - { - stream << "wxBITMAP_TYPE_BMP"; - break; - } - case wxBITMAP_TYPE_BMP_RESOURCE: - { - stream << "wxBITMAP_TYPE_BMP_RESOURCE"; - break; - } - case wxBITMAP_TYPE_GIF: - { - stream << "wxBITMAP_TYPE_GIF"; - break; - } - case wxBITMAP_TYPE_TIF: - { - stream << "wxBITMAP_TYPE_TIF"; - break; - } - case wxBITMAP_TYPE_ICO: - { - stream << "wxBITMAP_TYPE_ICO"; - break; - } - case wxBITMAP_TYPE_ICO_RESOURCE: - { - stream << "wxBITMAP_TYPE_ICO_RESOURCE"; - break; - } - case wxBITMAP_TYPE_CUR: - { - stream << "wxBITMAP_TYPE_CUR"; - break; - } - case wxBITMAP_TYPE_CUR_RESOURCE: - { - stream << "wxBITMAP_TYPE_CUR_RESOURCE"; - break; - } - default: - case wxBITMAP_TYPE_ANY: - { - stream << "wxBITMAP_TYPE_ANY"; - break; - } + wxNode *node = item->GetStringValues().First(); + while (node) + { + char *s = (char *)node->Data(); + stream << SafeWord(s); + if (node->Next()) + stream << ", "; + node = node->Next(); + } } - stream << ", "; - int platform = child->GetValue2(); - switch (platform) - { - case RESOURCE_PLATFORM_WINDOWS: - { - stream << "'WINDOWS'"; - break; - } - case RESOURCE_PLATFORM_X: - { - stream << "'X'"; - break; - } - case RESOURCE_PLATFORM_MAC: - { - stream << "'MAC'"; - break; - } - case RESOURCE_PLATFORM_ANY: - { - stream << "'ANY'"; - break; - } - } - int noColours = (int)child->GetValue3(); - if (noColours > 0) - stream << ", " << noColours; - stream << "]"; - - if (node->Next()) - stream << ",\\\n"; + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxRadioBox") + { + // Must write out the orientation and number of rows/cols!! + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxRadioBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; + stream << item->GetWidth() << ", " << item->GetHeight(); - node = node->Next(); + // Default list of values + + stream << ", ["; + if (item->GetStringValues().Number() > 0) + { + wxNode *node = item->GetStringValues().First(); + while (node) + { + char *s = (char *)node->Data(); + stream << SafeWord(s); + if (node->Next()) + stream << ", "; + node = node->Next(); + } + } + stream << "], " << item->GetValue1(); + if (item->GetFont().Ok()) + { + stream << ",\\\n "; + OutputFont(stream, item->GetFont()); + } + } + else if (itemType == "wxBitmap") + { + stream << "static char *" << item->GetName() << " = \"bitmap(name = '" << item->GetName() << "',\\\n"; + + wxNode *node = item->GetChildren().First(); + while (node) + { + wxItemResource *child = (wxItemResource *)node->Data(); + stream << " bitmap = ["; + + char buf[400]; + strcpy(buf, child->GetName()); +#ifdef __WXMSW__ + wxDos2UnixFilename(buf); +#endif + + stream << "'" << buf << "', "; + + int bitmapType = (int)child->GetValue1(); + switch (bitmapType) + { + case wxBITMAP_TYPE_XBM_DATA: + { + stream << "wxBITMAP_TYPE_XBM_DATA"; + break; + } + case wxBITMAP_TYPE_XPM_DATA: + { + stream << "wxBITMAP_TYPE_XPM_DATA"; + break; + } + case wxBITMAP_TYPE_XBM: + { + stream << "wxBITMAP_TYPE_XBM"; + break; + } + case wxBITMAP_TYPE_XPM: + { + stream << "wxBITMAP_TYPE_XPM"; + break; + } + case wxBITMAP_TYPE_BMP: + { + stream << "wxBITMAP_TYPE_BMP"; + break; + } + case wxBITMAP_TYPE_BMP_RESOURCE: + { + stream << "wxBITMAP_TYPE_BMP_RESOURCE"; + break; + } + case wxBITMAP_TYPE_GIF: + { + stream << "wxBITMAP_TYPE_GIF"; + break; + } + case wxBITMAP_TYPE_TIF: + { + stream << "wxBITMAP_TYPE_TIF"; + break; + } + case wxBITMAP_TYPE_ICO: + { + stream << "wxBITMAP_TYPE_ICO"; + break; + } + case wxBITMAP_TYPE_ICO_RESOURCE: + { + stream << "wxBITMAP_TYPE_ICO_RESOURCE"; + break; + } + case wxBITMAP_TYPE_CUR: + { + stream << "wxBITMAP_TYPE_CUR"; + break; + } + case wxBITMAP_TYPE_CUR_RESOURCE: + { + stream << "wxBITMAP_TYPE_CUR_RESOURCE"; + break; + } + default: + case wxBITMAP_TYPE_ANY: + { + stream << "wxBITMAP_TYPE_ANY"; + break; + } + } + stream << ", "; + int platform = child->GetValue2(); + switch (platform) + { + case RESOURCE_PLATFORM_WINDOWS: + { + stream << "'WINDOWS'"; + break; + } + case RESOURCE_PLATFORM_X: + { + stream << "'X'"; + break; + } + case RESOURCE_PLATFORM_MAC: + { + stream << "'MAC'"; + break; + } + case RESOURCE_PLATFORM_ANY: + { + stream << "'ANY'"; + break; + } + } + int noColours = (int)child->GetValue3(); + if (noColours > 0) + stream << ", " << noColours; + + stream << "]"; + + if (node->Next()) + stream << ",\\\n"; + + node = node->Next(); } stream << ").\";\n\n"; } @@ -526,85 +526,85 @@ bool wxResourceTableWithSaving::SaveResource(wxTextOutputStream& stream, wxItemR str += itemType; wxMessageBox(str); } - return TRUE; + return TRUE; } void wxResourceTableWithSaving::GenerateDialogStyleString(long windowStyle, char *buf) { - buf[0] = 0; - m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxDialog", windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); + buf[0] = 0; + m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxDialog", windowStyle, buf); + + if (strlen(buf) == 0) + strcat(buf, "0"); } void wxResourceTableWithSaving::GeneratePanelStyleString(long windowStyle, char *buf) { - buf[0] = 0; - m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); + buf[0] = 0; + m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); + + if (strlen(buf) == 0) + strcat(buf, "0"); } void wxResourceTableWithSaving::GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf) { - buf[0] = 0; - m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); - m_styleTable.GenerateStyleStrings("wxControl", windowStyle, buf); - m_styleTable.GenerateStyleStrings(windowClass, windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); + buf[0] = 0; + m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxControl", windowStyle, buf); + m_styleTable.GenerateStyleStrings(windowClass, windowStyle, buf); + + if (strlen(buf) == 0) + strcat(buf, "0"); } // Returns quoted string or "NULL" char *SafeString(const wxString& s) { - if (s == "") - return "NULL"; - else - { - strcpy(wxBuffer, "\""); - strcat(wxBuffer, s); - strcat(wxBuffer, "\""); - return wxBuffer; - } + if (s == "") + return "NULL"; + else + { + strcpy(wxBuffer, "\""); + strcat(wxBuffer, s); + strcat(wxBuffer, "\""); + return wxBuffer; + } } // Returns quoted string or '' : convert " to \" char *SafeWord(const wxString& s) { - const char *cp; - char *dp; - - if (s == "") - return "''"; - else - { - dp = wxBuffer; - cp = s.c_str(); - *dp++ = '\''; - while(*cp != 0) { - if(*cp == '"') { - *dp++ = '\\'; - *dp++ = '"'; - } else if(*cp == '\'') { - *dp++ = '\\'; - *dp++ = '\''; - } else - *dp++ = *cp; - - cp++; - } - *dp++ = '\''; - *dp++ = 0; - - return wxBuffer; - } + const char *cp; + char *dp; + + if (s == "") + return "''"; + else + { + dp = wxBuffer; + cp = s.c_str(); + *dp++ = '\''; + while(*cp != 0) { + if(*cp == '"') { + *dp++ = '\\'; + *dp++ = '"'; + } else if(*cp == '\'') { + *dp++ = '\\'; + *dp++ = '\''; + } else + *dp++ = *cp; + + cp++; + } + *dp++ = '\''; + *dp++ = 0; + + return wxBuffer; + } } diff --git a/utils/dialoged/src/symbtabl.cpp b/utils/dialoged/src/symbtabl.cpp index 110764e782..bed48b411d 100644 --- a/utils/dialoged/src/symbtabl.cpp +++ b/utils/dialoged/src/symbtabl.cpp @@ -32,7 +32,7 @@ #include "symbtabl.h" wxResourceSymbolTable::wxResourceSymbolTable(): - m_hashTable(wxKEY_STRING) +m_hashTable(wxKEY_STRING) { } @@ -48,70 +48,70 @@ bool wxResourceSymbolTable::ReadIncludeFile(const wxString& filename) wxFile file; if (!wxFileExists(filename)) return FALSE; - + if (!file.Open(filename, wxFile::read)) return FALSE; - + off_t len = file.Length(); if (len == -1) return FALSE; - + Clear(); AddStandardSymbols(); - + wxString str; char* p = str.GetWriteBuf(len + 1); - + if (file.Read(p, len) == wxFile::fd_invalid) { str.UngetWriteBuf(); return FALSE; } str.UngetWriteBuf(); - + // Look for #define occurrences int pos = str.Find("#define"); while (pos != -1) { size_t len = str.Length(); - + size_t i = pos + 8; - + // Eat whitespace until symbol while ((str[i] == ' ' || str[i] == '\t') && (i < len)) i ++; - + size_t start = i; - + // Eat symbol while (str[i] != ' ' && str[i] != '\t' && (i < len)) i ++; size_t end = i-1; - + wxString symbol(str.Mid(start, (end - start + 1))); - + // Eat whitespace until number while ((str[i] == ' ' || str[i] == '\t') && (i < len)) i ++; - + size_t startNum = i; - + // Eat number while (str[i] != ' ' && str[i] != '\t' && str[i] != '\n' && (i < len)) i ++; - + size_t endNum = i-1; - + wxString numStr(str.Mid(startNum, (endNum - startNum + 1))); - + int id = atol(numStr); - + AddSymbol(symbol, id); - + str = str.Right(len - i); pos = str.Find("#define"); } - + return TRUE; } @@ -120,30 +120,30 @@ bool wxResourceSymbolTable::WriteIncludeFile(const wxString& filename) wxFile file; if (!file.Open(filename, wxFile::write)) return FALSE; - + wxString fileOnly(wxFileNameFromPath(filename)); wxString line; line.Printf("/*\n * %s\n * Window identifiers file written by Dialog Editor\n */\n\n", (const char*) fileOnly); - + file.Write(line, line.Length()); - + m_hashTable.BeginFind(); - + wxNode* node = m_hashTable.Next(); while (node) { const char* str = node->GetKeyString(); int id = (int) node->Data() ; - + if (!IsStandardSymbol(str)) { wxString line; line.Printf("#define %s %ld\n", str, id); - + file.Write(line, line.Length()); } - + node = m_hashTable.Next(); } return TRUE; @@ -177,14 +177,14 @@ bool wxResourceSymbolTable::RemoveSymbol(int id) wxString wxResourceSymbolTable::GetSymbolForId(int id) { m_hashTable.BeginFind(); - + wxNode* node = m_hashTable.Next(); while (node) { const char* str = node->GetKeyString(); if (str && ( ((int) node->Data()) == id) ) return wxString(str); - + node = m_hashTable.Next(); } return wxString(""); @@ -203,13 +203,13 @@ bool wxResourceSymbolTable::SymbolExists(const wxString& symbol) const bool wxResourceSymbolTable::IdExists(int id) { m_hashTable.BeginFind(); - + wxNode* node = m_hashTable.Next(); while (node) { if ( (((int) node->Data()) == id) ) return TRUE; - + node = m_hashTable.Next(); } return FALSE; @@ -218,19 +218,19 @@ bool wxResourceSymbolTable::IdExists(int id) int wxResourceSymbolTable::FindHighestId() { int highest = 0; - + m_hashTable.BeginFind(); - + wxNode* node = m_hashTable.Next(); while (node) { int id = ((int) node->Data()); if (id > highest) highest = id; - + node = m_hashTable.Next(); } - + // Make sure we don't clash with future standard wxWindows ids if (highest <= wxID_HIGHEST) highest = wxID_HIGHEST + 1; @@ -238,8 +238,8 @@ int wxResourceSymbolTable::FindHighestId() } /* - * A table of the standard identifiers - */ +* A table of the standard identifiers +*/ struct wxStandardSymbolStruct { @@ -256,7 +256,7 @@ static wxStandardSymbolStruct sg_StandardSymbols[] = { "wxID_STATIC", wxID_STATIC }, { "wxID_YES", wxID_YES }, { "wxID_NO", wxID_NO }, - + { "wxID_OPEN", wxID_OPEN }, { "wxID_CLOSE", wxID_CLOSE }, { "wxID_NEW", wxID_NEW }, @@ -274,14 +274,14 @@ static wxStandardSymbolStruct sg_StandardSymbols[] = { "wxID_HELP_COMMANDS", wxID_HELP_COMMANDS }, { "wxID_HELP_PROCEDURES", wxID_HELP_PROCEDURES }, { "wxID_HELP_CONTEXT", wxID_HELP_CONTEXT }, - + { "wxID_CUT", wxID_CUT }, { "wxID_COPY", wxID_COPY }, { "wxID_PASTE", wxID_PASTE }, { "wxID_CLEAR", wxID_CLEAR }, { "wxID_FIND", wxID_FIND }, { "wxID_DUPLICATE", wxID_DUPLICATE }, - + { "wxID_FILE1", wxID_FILE1 }, { "wxID_FILE2", wxID_FILE2 }, { "wxID_FILE3", wxID_FILE3 }, @@ -291,7 +291,7 @@ static wxStandardSymbolStruct sg_StandardSymbols[] = { "wxID_FILE7", wxID_FILE7 }, { "wxID_FILE8", wxID_FILE8 }, { "wxID_FILE9", wxID_FILE9 } - + }; static int sg_StandardSymbolSize = (sizeof(sg_StandardSymbols)/sizeof(wxStandardSymbolStruct)); @@ -319,12 +319,12 @@ bool wxResourceSymbolTable::IsStandardSymbol(const wxString& symbol) const bool wxResourceSymbolTable::FillComboBox(wxComboBox* comboBox) { m_hashTable.BeginFind(); - + wxNode* node = m_hashTable.Next(); while (node) { const char* str = node->GetKeyString(); - + comboBox->Append(str); node = m_hashTable.Next(); } diff --git a/utils/dialoged/src/symbtabl.h b/utils/dialoged/src/symbtabl.h index 440b14b222..b95bc9fa9e 100644 --- a/utils/dialoged/src/symbtabl.h +++ b/utils/dialoged/src/symbtabl.h @@ -21,8 +21,8 @@ class wxResourceSymbolTable: public wxObject public: wxResourceSymbolTable(); ~wxResourceSymbolTable(); - -// Operations + + // Operations bool ReadIncludeFile(const wxString& filename); bool WriteIncludeFile(const wxString& filename); void Clear(); @@ -31,22 +31,22 @@ public: bool RemoveSymbol(int id); void AddStandardSymbols(); bool FillComboBox(wxComboBox* comboBox); - -// Accessors + + // Accessors wxString GetSymbolForId(int id); int GetIdForSymbol(const wxString& symbol); bool SymbolExists(const wxString& symbol) const; bool IdExists(int id) ; bool IsStandardSymbol(const wxString& symbol) const; int FindHighestId() ; - -// Implementation - -// Member variables + + // Implementation + + // Member variables protected: wxHashTable m_hashTable; }; #endif - // _SYMBTABL_H_ +// _SYMBTABL_H_ diff --git a/utils/dialoged/src/winprop.cpp b/utils/dialoged/src/winprop.cpp index dde79ec61c..e32b9b2940 100644 --- a/utils/dialoged/src/winprop.cpp +++ b/utils/dialoged/src/winprop.cpp @@ -39,61 +39,61 @@ // Causes immediate feedback. void wxResourcePropertyListView::OnPropertyChanged(wxProperty *property) { - // Sets the value of the property back into the actual object, - // IF the property value was modified. - if (property->GetValue().GetModified()) - { - m_propertyInfo->SetProperty(property->GetName(), property); - property->GetValue().SetModified(FALSE); - wxResourceManager::GetCurrentResourceManager()->Modify(TRUE); - } + // Sets the value of the property back into the actual object, + // IF the property value was modified. + if (property->GetValue().GetModified()) + { + m_propertyInfo->SetProperty(property->GetName(), property); + property->GetValue().SetModified(FALSE); + wxResourceManager::GetCurrentResourceManager()->Modify(TRUE); + } } bool wxResourcePropertyListView::OnClose(void) { - int w, h, x, y; - GetManagedWindow()->GetSize(& w, & h); - GetManagedWindow()->GetPosition(& x, & y); - - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width = w; - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height = h; - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x = x; - wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y = y; - - return wxPropertyListView::OnClose(); + int w, h, x, y; + GetManagedWindow()->GetSize(& w, & h); + GetManagedWindow()->GetPosition(& x, & y); + + wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width = w; + wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height = h; + wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x = x; + wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y = y; + + return wxPropertyListView::OnClose(); } wxWindow *wxPropertyInfo::sm_propertyWindow; /* - * wxDialogEditorPropertyListDialog - */ +* wxDialogEditorPropertyListDialog +*/ - /* +/* wxDialogEditorPropertyListDialog::wxDialogEditorPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name): - wxPropertyListDialog(v, parent, title, pos, size, style, name) +const wxPoint& pos, const wxSize& size, +long style, const wxString& name): +wxPropertyListDialog(v, parent, title, pos, size, style, name) { - m_propSheet = NULL; - m_propInfo = NULL; +m_propSheet = NULL; +m_propInfo = NULL; } -wxDialogEditorPropertyListDialog::~wxDialogEditorPropertyListDialog() -{ - delete m_propSheet; - delete m_propInfo; - wxPropertyInfo::sm_propertyWindow = NULL; -} + wxDialogEditorPropertyListDialog::~wxDialogEditorPropertyListDialog() + { + delete m_propSheet; + delete m_propInfo; + wxPropertyInfo::sm_propertyWindow = NULL; + } */ wxDialogEditorPropertyListFrame::wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name): - wxPropertyListFrame(v, parent, title, pos, size, style, name) + const wxPoint& pos, const wxSize& size, + long style, const wxString& name): +wxPropertyListFrame(v, parent, title, pos, size, style, name) { - m_propSheet = NULL; - m_propInfo = NULL; + m_propSheet = NULL; + m_propInfo = NULL; } wxDialogEditorPropertyListFrame::~wxDialogEditorPropertyListFrame() @@ -105,116 +105,116 @@ wxDialogEditorPropertyListFrame::~wxDialogEditorPropertyListFrame() } /* - * wxPropertyInfo - */ +* wxPropertyInfo +*/ // Edit the information represented by this object, whatever that // might be. bool wxPropertyInfo::Edit(wxWindow *WXUNUSED(parent), const wxString& title) { - if (sm_propertyWindow) - { - wxWindowPropertyInfo* thisProp = (wxWindowPropertyInfo*) this; - wxWindowPropertyInfo* oldProp = (wxWindowPropertyInfo*) (((wxDialogEditorPropertyListFrame *) sm_propertyWindow)->GetInfo()); - if (oldProp->GetWindow() == thisProp->GetWindow()) - { - sm_propertyWindow->Raise(); - return TRUE; - } - else - { - CloseWindow(); // Close the window so we can open a new one - } - } - - int width = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width; - int height = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height; - int x = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x; - int y = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y; - - wxPropertySheet *propSheet = new wxPropertySheet; - - wxStringList propNames; - GetPropertyNames(propNames); - - wxNode *node = propNames.First(); - while (node) - { - wxString name((char *)node->Data()); - wxProperty *prop = GetProperty(name); - if (prop) + if (sm_propertyWindow) { - propSheet->AddProperty(prop); + wxWindowPropertyInfo* thisProp = (wxWindowPropertyInfo*) this; + wxWindowPropertyInfo* oldProp = (wxWindowPropertyInfo*) (((wxDialogEditorPropertyListFrame *) sm_propertyWindow)->GetInfo()); + if (oldProp->GetWindow() == thisProp->GetWindow()) + { + sm_propertyWindow->Raise(); + return TRUE; + } + else + { + CloseWindow(); // Close the window so we can open a new one + } } - node = node->Next(); - } - - // Reset 'modified' flags for all property values - propSheet->SetAllModified(FALSE); - - wxResourcePropertyListView *view = new wxResourcePropertyListView(this, NULL, - wxPROP_BUTTON_OK | // wxPROP_BUTTON_CANCEL | - wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES); - - wxDialogEditorPropertyListFrame *propWin = new wxDialogEditorPropertyListFrame(view, - wxResourceManager::GetCurrentResourceManager()->GetEditorFrame(), title, wxPoint(x, y), - wxSize(width, height), wxDEFAULT_FRAME_STYLE); - sm_propertyWindow = propWin; - - propWin->m_registry.RegisterValidator(wxString("real"), new wxRealListValidator); - propWin->m_registry.RegisterValidator(wxString("string"), new wxStringListValidator); - propWin->m_registry.RegisterValidator(wxString("integer"), new wxIntegerListValidator); - propWin->m_registry.RegisterValidator(wxString("bool"), new wxBoolListValidator); - propWin->m_registry.RegisterValidator(wxString("filename"), new wxFilenameListValidator); - propWin->m_registry.RegisterValidator(wxString("stringlist"), new wxListOfStringsListValidator); - propWin->m_registry.RegisterValidator(wxString("window_id"), new wxResourceSymbolValidator); - - propWin->m_propInfo = this; - propWin->m_propSheet = propSheet; - -// view->m_propertyWindow = propWin; - view->AddRegistry(&(propWin->m_registry)); - - propWin->Initialize(); - view->ShowView(propSheet, propWin->GetPropertyPanel()); - - propWin->Show(TRUE); - - // Otherwise doesn't show itself + + int width = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width; + int height = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height; + int x = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x; + int y = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y; + + wxPropertySheet *propSheet = new wxPropertySheet; + + wxStringList propNames; + GetPropertyNames(propNames); + + wxNode *node = propNames.First(); + while (node) + { + wxString name((char *)node->Data()); + wxProperty *prop = GetProperty(name); + if (prop) + { + propSheet->AddProperty(prop); + } + node = node->Next(); + } + + // Reset 'modified' flags for all property values + propSheet->SetAllModified(FALSE); + + wxResourcePropertyListView *view = new wxResourcePropertyListView(this, NULL, + wxPROP_BUTTON_OK | // wxPROP_BUTTON_CANCEL | + wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES); + + wxDialogEditorPropertyListFrame *propWin = new wxDialogEditorPropertyListFrame(view, + wxResourceManager::GetCurrentResourceManager()->GetEditorFrame(), title, wxPoint(x, y), + wxSize(width, height), wxDEFAULT_FRAME_STYLE); + sm_propertyWindow = propWin; + + propWin->m_registry.RegisterValidator(wxString("real"), new wxRealListValidator); + propWin->m_registry.RegisterValidator(wxString("string"), new wxStringListValidator); + propWin->m_registry.RegisterValidator(wxString("integer"), new wxIntegerListValidator); + propWin->m_registry.RegisterValidator(wxString("bool"), new wxBoolListValidator); + propWin->m_registry.RegisterValidator(wxString("filename"), new wxFilenameListValidator); + propWin->m_registry.RegisterValidator(wxString("stringlist"), new wxListOfStringsListValidator); + propWin->m_registry.RegisterValidator(wxString("window_id"), new wxResourceSymbolValidator); + + propWin->m_propInfo = this; + propWin->m_propSheet = propSheet; + + // view->m_propertyWindow = propWin; + view->AddRegistry(&(propWin->m_registry)); + + propWin->Initialize(); + view->ShowView(propSheet, propWin->GetPropertyPanel()); + + propWin->Show(TRUE); + + // Otherwise doesn't show itself #ifdef __WXMOTIF__ - wxNoOptimize noOptimize; - propWin->SetSize(-1, -1, width, height); + wxNoOptimize noOptimize; + propWin->SetSize(-1, -1, width, height); #endif - - return TRUE; + + return TRUE; } void wxPropertyInfo::CloseWindow() { - if (sm_propertyWindow) - { + if (sm_propertyWindow) + { int w, h, x, y; sm_propertyWindow->GetSize(& w, & h); sm_propertyWindow->GetPosition(& x, & y); - + wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width = w; wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height = h; wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x = x; wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y = y; - + sm_propertyWindow->Destroy(); sm_propertyWindow = (wxDialogEditorPropertyListFrame *) NULL; - } + } } /* - * wxWindowPropertyInfo - */ +* wxWindowPropertyInfo +*/ wxWindowPropertyInfo::wxWindowPropertyInfo(wxWindow *win, wxItemResource *res) { - m_propertyWindow = win; - m_propertyResource = res; + m_propertyWindow = win; + m_propertyResource = res; } wxWindowPropertyInfo::~wxWindowPropertyInfo(void) @@ -223,524 +223,526 @@ wxWindowPropertyInfo::~wxWindowPropertyInfo(void) wxProperty *wxWindowPropertyInfo::GetFontProperty(wxString& name, wxFont *font) { - if (!font) - return NULL; + if (!font) + return NULL; - if (name.Contains("Points")) - return new wxProperty(name, (long)font->GetPointSize(), "integer", new wxIntegerListValidator(1, 100)); - else if (name.Contains("Family")) - return new wxProperty(name, font->GetFamilyString(), "string", - new wxStringListValidator(new wxStringList("wxDECORATIVE", "wxROMAN", "wxSCRIPT", "wxSWISS", "wxMODERN", - NULL))); - else if (name.Contains("Style")) - return new wxProperty(name, font->GetStyleString(), "string", - new wxStringListValidator(new wxStringList("wxNORMAL", "wxITALIC", "wxSLANT", NULL))); - else if (name.Contains("Weight")) - return new wxProperty(name, font->GetWeightString(), "string", - new wxStringListValidator(new wxStringList("wxNORMAL", "wxBOLD", "wxLIGHT", NULL))); - else if (name.Contains("Underlined")) - return new wxProperty(name, (bool)font->GetUnderlined(), "bool"); - else - return NULL; + if (name.Contains("Points")) + return new wxProperty(name, (long)font->GetPointSize(), "integer", new wxIntegerListValidator(1, 100)); + else if (name.Contains("Family")) + return new wxProperty(name, font->GetFamilyString(), "string", + new wxStringListValidator(new wxStringList("wxDECORATIVE", "wxROMAN", "wxSCRIPT", "wxSWISS", "wxMODERN", + NULL))); + else if (name.Contains("Style")) + return new wxProperty(name, font->GetStyleString(), "string", + new wxStringListValidator(new wxStringList("wxNORMAL", "wxITALIC", "wxSLANT", NULL))); + else if (name.Contains("Weight")) + return new wxProperty(name, font->GetWeightString(), "string", + new wxStringListValidator(new wxStringList("wxNORMAL", "wxBOLD", "wxLIGHT", NULL))); + else if (name.Contains("Underlined")) + return new wxProperty(name, (bool)font->GetUnderlined(), "bool"); + else + return NULL; } wxFont *wxWindowPropertyInfo::SetFontProperty(wxString& name, wxProperty *property, wxFont *font) { - int pointSize = 12; - int fontFamily = wxMODERN; - int fontStyle = wxNORMAL; - int fontWeight = wxNORMAL; - bool fontUnderlined = FALSE; - - if (name.Contains("Points")) - { - pointSize = (int)property->GetValue().IntegerValue(); - if (font && (pointSize == font->GetPointSize())) - return NULL; // No change - } - else if (font) pointSize = font->GetPointSize(); - - if (name.Contains("Family")) - { - wxString val = property->GetValue().StringValue(); - fontFamily = wxStringToFontFamily(val); + int pointSize = 12; + int fontFamily = wxMODERN; + int fontStyle = wxNORMAL; + int fontWeight = wxNORMAL; + bool fontUnderlined = FALSE; - if (font && (fontFamily == font->GetFamily())) - return NULL; // No change - } - else if (font) fontFamily = font->GetFamily(); - - if (name.Contains("Style")) - { - wxString val = property->GetValue().StringValue(); - fontStyle = wxStringToFontStyle(val); + if (name.Contains("Points")) + { + pointSize = (int)property->GetValue().IntegerValue(); + if (font && (pointSize == font->GetPointSize())) + return NULL; // No change + } + else if (font) pointSize = font->GetPointSize(); - if (font && (fontStyle == font->GetStyle())) - return NULL; // No change - } - else if (font) fontStyle = font->GetStyle(); - if (name.Contains("Weight")) - { - wxString val = property->GetValue().StringValue(); - fontWeight = wxStringToFontWeight(val); - - if (font && (fontWeight == font->GetWeight())) - return NULL; // No change - } - else if (font) fontWeight = font->GetWeight(); - - if (name.Contains("Underlined")) - { - fontUnderlined = property->GetValue().BoolValue(); - - if (font && (fontUnderlined == font->GetUnderlined())) - return NULL; // No change - } - else if (font) fontUnderlined = font->GetUnderlined(); - - wxFont *newFont = wxTheFontList->FindOrCreateFont(pointSize, fontFamily, fontStyle, fontWeight, fontUnderlined); - if (newFont) - { - return newFont; - } - else - return NULL; + if (name.Contains("Family")) + { + wxString val = property->GetValue().StringValue(); + fontFamily = wxStringToFontFamily(val); + + if (font && (fontFamily == font->GetFamily())) + return NULL; // No change + } + else if (font) fontFamily = font->GetFamily(); + + if (name.Contains("Style")) + { + wxString val = property->GetValue().StringValue(); + fontStyle = wxStringToFontStyle(val); + + if (font && (fontStyle == font->GetStyle())) + return NULL; // No change + } + else if (font) fontStyle = font->GetStyle(); + if (name.Contains("Weight")) + { + wxString val = property->GetValue().StringValue(); + fontWeight = wxStringToFontWeight(val); + + if (font && (fontWeight == font->GetWeight())) + return NULL; // No change + } + else if (font) fontWeight = font->GetWeight(); + + if (name.Contains("Underlined")) + { + fontUnderlined = property->GetValue().BoolValue(); + + if (font && (fontUnderlined == font->GetUnderlined())) + return NULL; // No change + } + else if (font) fontUnderlined = font->GetUnderlined(); + + wxFont *newFont = wxTheFontList->FindOrCreateFont(pointSize, fontFamily, fontStyle, fontWeight, fontUnderlined); + if (newFont) + { + return newFont; + } + else + return NULL; } wxProperty *wxWindowPropertyInfo::GetProperty(wxString& name) { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - - wxFont *font = & m_propertyWindow->GetFont(); - if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || - name == "fontUnderlined") - return GetFontProperty(name, font); - else if (name == "name") - return new wxProperty("name", m_propertyWindow->GetName(), "string"); - else if (name == "title") - return new wxProperty("title", m_propertyWindow->GetTitle(), "string"); - else if (name == "x") - { - return new wxProperty("x", (long)resource->GetX(), "integer"); - } - else if (name == "y") - { - return new wxProperty("y", (long)resource->GetY(), "integer"); - } - else if (name == "width") - { - return new wxProperty("width", (long)resource->GetWidth(), "integer"); - } - else if (name == "height") - { - return new wxProperty("height", (long)resource->GetHeight(), "integer"); - } - else if (name == "id") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource) + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + + wxFont *font = & m_propertyWindow->GetFont(); + if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || + name == "fontUnderlined") + return GetFontProperty(name, font); + else if (name == "name") + return new wxProperty("name", m_propertyWindow->GetName(), "string"); + else if (name == "title") + return new wxProperty("title", m_propertyWindow->GetTitle(), "string"); + else if (name == "x") { - int id = resource->GetId(); - wxString idStr; - idStr.Printf("%d", id); - wxString symbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(id); - symbolName += "="; - symbolName += idStr; - // symbolName is now e.g. "ID_PANEL21=105" - return new wxProperty("id", symbolName, "window_id"); + return new wxProperty("x", (long)resource->GetX(), "integer"); + } + else if (name == "y") + { + return new wxProperty("y", (long)resource->GetY(), "integer"); + } + else if (name == "width") + { + return new wxProperty("width", (long)resource->GetWidth(), "integer"); + } + else if (name == "height") + { + return new wxProperty("height", (long)resource->GetHeight(), "integer"); + } + else if (name == "id") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource) + { + int id = resource->GetId(); + wxString idStr; + idStr.Printf("%d", id); + wxString symbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(id); + symbolName += "="; + symbolName += idStr; + // symbolName is now e.g. "ID_PANEL21=105" + return new wxProperty("id", symbolName, "window_id"); + } + else + return NULL; + } + else if (name == "border") + { + wxString border(""); + if (m_propertyWindow->GetWindowStyleFlag() & wxSIMPLE_BORDER) + border = "wxSIMPLE_BORDER"; + else if (m_propertyWindow->GetWindowStyleFlag() & wxRAISED_BORDER) + border = "wxRAISED_BORDER"; + else if (m_propertyWindow->GetWindowStyleFlag() & wxSUNKEN_BORDER) + border = "wxSUNKEN_BORDER"; + else if (m_propertyWindow->GetWindowStyleFlag() & wxDOUBLE_BORDER) + border = "wxDOUBLE_BORDER"; + else if (m_propertyWindow->GetWindowStyleFlag() & wxSTATIC_BORDER) + border = "wxSTATIC_BORDER"; + else if (m_propertyWindow->GetWindowStyleFlag() & wxNO_BORDER) + border = "wxNO_BORDER"; + else + border = "default border"; + + return new wxProperty("border", border, "string", + new wxStringListValidator(new wxStringList("wxSIMPLE_BORDER", "wxRAISED_BORDER", + "wxSUNKEN_BORDER", "wxDOUBLE_BORDER", "wxSTATIC_BORDER", "wxNO_BORDER", "default border", NULL))); } else return NULL; - } - else if (name == "border") - { - wxString border(""); - if (m_propertyWindow->GetWindowStyleFlag() & wxSIMPLE_BORDER) - border = "wxSIMPLE_BORDER"; - else if (m_propertyWindow->GetWindowStyleFlag() & wxRAISED_BORDER) - border = "wxRAISED_BORDER"; - else if (m_propertyWindow->GetWindowStyleFlag() & wxSUNKEN_BORDER) - border = "wxSUNKEN_BORDER"; - else if (m_propertyWindow->GetWindowStyleFlag() & wxDOUBLE_BORDER) - border = "wxDOUBLE_BORDER"; - else if (m_propertyWindow->GetWindowStyleFlag() & wxSTATIC_BORDER) - border = "wxSTATIC_BORDER"; - else - border = "wxNO_BORDER"; - - return new wxProperty("border", border, "string", - new wxStringListValidator(new wxStringList("wxSIMPLE_BORDER", "wxRAISED_BORDER", - "wxSUNKEN_BORDER", "wxDOUBLE_BORDER", "wxSTATIC_BORDER", "wxNO_BORDER", NULL))); - } - else - return NULL; } bool wxWindowPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxFont *font = & m_propertyWindow->GetFont(); - if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, font); - if (newFont) + wxFont *font = & m_propertyWindow->GetFont(); + if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" )) { - m_propertyWindow->SetFont(* newFont); - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource) - { - resource->SetFont(* newFont); - } - } - - return TRUE; - } - else if (name == "name") - { - // Remove old name from resource table, if it's there. - wxItemResource *oldResource = (wxItemResource *)wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Delete(m_propertyWindow->GetName()); - if (oldResource) - { - // It's a top-level resource - m_propertyWindow->SetName(property->GetValue().StringValue()); - oldResource->SetName(property->GetValue().StringValue()); - wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Put(m_propertyWindow->GetName(), oldResource); - } - else - { - // It's a child of something; just set the name of the resource and the window. - m_propertyWindow->SetName(property->GetValue().StringValue()); - m_propertyResource->SetName(property->GetValue().StringValue()); - } - // Refresh the resource manager list, because the name changed. - wxResourceManager::GetCurrentResourceManager()->UpdateResourceList(); - return TRUE; - } - else if (name == "title") - { - m_propertyWindow->SetTitle(property->GetValue().StringValue()); - return TRUE; - } - else if (name == "x") - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - int x, y; - m_propertyWindow->GetPosition(&x, &y); - int newX = (int)property->GetValue().IntegerValue(); - int pixelX = newX; - - // We need to convert to pixels if this is not a dialog or panel, but - // the parent resource specifies dialog units. - if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) - { - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + wxFont *newFont = SetFontProperty(name, property, font); + if (newFont) { - wxPoint pt = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxPoint(newX, y)); - pixelX = pt.x; - } - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(newX, y)); - pixelX = pt.x; - } - } - - if (x != pixelX) - { - m_propertyWindow->Move(pixelX, y); - resource->SetSize(newX, resource->GetY(), resource->GetWidth(), resource->GetHeight()); - } - return TRUE; - } - else if (name == "y") - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - int x, y; - m_propertyWindow->GetPosition(&x, &y); - int newY = (int)property->GetValue().IntegerValue(); - int pixelY = newY; - - // We need to convert to pixels if this is not a dialog or panel, but - // the parent resource specifies dialog units. - if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) - { - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxPoint(x, newY)); - pixelY = pt.y; - } - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(x, newY)); - pixelY = pt.y; - } - } - - if (y != pixelY) - { - m_propertyWindow->Move(x, pixelY); - resource->SetSize(resource->GetX(), newY, resource->GetWidth(), resource->GetHeight()); - } - return TRUE; - } - else if (name == "width") - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - int width, height; - m_propertyWindow->GetSize(&width, &height); - int newWidth = (int)property->GetValue().IntegerValue(); - int pixelWidth = newWidth; - - // We need to convert to pixels if this is not a dialog or panel, but - // the parent resource specifies dialog units. - if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) - { - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxSize sz = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxSize(newWidth, height)); - pixelWidth = sz.x; - } - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxSize sz = m_propertyWindow->ConvertDialogToPixels(wxSize(newWidth, height)); - pixelWidth = sz.x; - } - } - - if (width != pixelWidth) - { - m_propertyWindow->SetSize(pixelWidth, height); - resource->SetSize(resource->GetX(), resource->GetY(), newWidth, resource->GetHeight()); - } - return TRUE; - } - else if (name == "height") - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - int width, height; - m_propertyWindow->GetSize(&width, &height); - int newHeight = (int)property->GetValue().IntegerValue(); - int pixelHeight = newHeight; - - // We need to convert to pixels if this is not a dialog or panel, but - // the parent resource specifies dialog units. - if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) - { - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxSize sz = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxSize(width, newHeight)); - pixelHeight = sz.y; - } - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxSize sz = m_propertyWindow->ConvertDialogToPixels(wxSize(width, newHeight)); - pixelHeight = sz.y; - } - } - - if (height != pixelHeight) - { - m_propertyWindow->SetSize(width, pixelHeight); - resource->SetSize(resource->GetX(), resource->GetY(), resource->GetWidth(), newHeight); - } - return TRUE; - } - else if (name == "id") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource) - { - wxString value = property->GetValue().StringValue(); - - wxString strName = value.Before('='); - wxString strId = value.After('='); - int id = atoi(strId); - - wxString oldSymbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(resource->GetId()); - int oldSymbolId = resource->GetId(); - - if (strName != "") - { - // If we change the id for an existing symbol, we need to: - // 1) Check if there are any other resources currently using the original id. - // If so, will need to change their id to the new id. - // 2) Remove the old symbol, add the new symbol. - // In this check, we don't have to do this, but we need to do it in SetProperty. - - if (strName == oldSymbolName && id != oldSymbolId) + m_propertyWindow->SetFont(* newFont); + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource) { - wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) ); - - // It's OK to change just the id. But we'll need to change all matching ids in all resources, - // because ids are unique and changing one resource's id must change all identical ones. - wxResourceManager::GetCurrentResourceManager()->ChangeIds(oldSymbolId, id); - - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); + resource->SetFont(* newFont); } - - // If we change the name but not the id, we'll just need to remove and - // re-add the symbol/id pair. - if (strName != oldSymbolName && id == oldSymbolId) + } + + return TRUE; + } + else if (name == "name") + { + // Remove old name from resource table, if it's there. + wxItemResource *oldResource = (wxItemResource *)wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Delete(m_propertyWindow->GetName()); + if (oldResource) + { + // It's a top-level resource + m_propertyWindow->SetName(property->GetValue().StringValue()); + oldResource->SetName(property->GetValue().StringValue()); + wxResourceManager::GetCurrentResourceManager()->GetResourceTable().Put(m_propertyWindow->GetName(), oldResource); + } + else + { + // It's a child of something; just set the name of the resource and the window. + m_propertyWindow->SetName(property->GetValue().StringValue()); + m_propertyResource->SetName(property->GetValue().StringValue()); + } + // Refresh the resource manager list, because the name changed. + wxResourceManager::GetCurrentResourceManager()->UpdateResourceList(); + return TRUE; + } + else if (name == "title") + { + m_propertyWindow->SetTitle(property->GetValue().StringValue()); + return TRUE; + } + else if (name == "x") + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + int x, y; + m_propertyWindow->GetPosition(&x, &y); + int newX = (int)property->GetValue().IntegerValue(); + int pixelX = newX; + + // We need to convert to pixels if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) + { + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) { - wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) ); - - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); - - if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName)) - { - wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); - } + wxPoint pt = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxPoint(newX, y)); + pixelX = pt.x; } - - // What if we're changing both the name and the id? - // - if there's no symbol of that name, just remove the old, add the new (in SetProperty) - // - if there is a symbol of that name, if id matches, do nothing. If not, veto. - - if (strName != oldSymbolName && id != oldSymbolId) + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) { - // Remove old symbol if it's not being used - if (!wxResourceManager::GetCurrentResourceManager()->IsSymbolUsed(resource, oldSymbolId) && - !wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) + wxPoint pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(newX, y)); + pixelX = pt.x; + } + } + + if (x != pixelX) + { + m_propertyWindow->Move(pixelX, y); + resource->SetSize(newX, resource->GetY(), resource->GetWidth(), resource->GetHeight()); + } + return TRUE; + } + else if (name == "y") + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + int x, y; + m_propertyWindow->GetPosition(&x, &y); + int newY = (int)property->GetValue().IntegerValue(); + int pixelY = newY; + + // We need to convert to pixels if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) + { + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxPoint(x, newY)); + pixelY = pt.y; + } + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(x, newY)); + pixelY = pt.y; + } + } + + if (y != pixelY) + { + m_propertyWindow->Move(x, pixelY); + resource->SetSize(resource->GetX(), newY, resource->GetWidth(), resource->GetHeight()); + } + return TRUE; + } + else if (name == "width") + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + int width, height; + m_propertyWindow->GetSize(&width, &height); + int newWidth = (int)property->GetValue().IntegerValue(); + int pixelWidth = newWidth; + + // We need to convert to pixels if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) + { + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxSize sz = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxSize(newWidth, height)); + pixelWidth = sz.x; + } + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxSize sz = m_propertyWindow->ConvertDialogToPixels(wxSize(newWidth, height)); + pixelWidth = sz.x; + } + } + + if (width != pixelWidth) + { + m_propertyWindow->SetSize(pixelWidth, height); + resource->SetSize(resource->GetX(), resource->GetY(), newWidth, resource->GetHeight()); + } + return TRUE; + } + else if (name == "height") + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + int width, height; + m_propertyWindow->GetSize(&width, &height); + int newHeight = (int)property->GetValue().IntegerValue(); + int pixelHeight = newHeight; + + // We need to convert to pixels if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) + { + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxSize sz = m_propertyWindow->GetParent()->ConvertDialogToPixels(wxSize(width, newHeight)); + pixelHeight = sz.y; + } + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxSize sz = m_propertyWindow->ConvertDialogToPixels(wxSize(width, newHeight)); + pixelHeight = sz.y; + } + } + + if (height != pixelHeight) + { + m_propertyWindow->SetSize(width, pixelHeight); + resource->SetSize(resource->GetX(), resource->GetY(), resource->GetWidth(), newHeight); + } + return TRUE; + } + else if (name == "id") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource) + { + wxString value = property->GetValue().StringValue(); + + wxString strName = value.Before('='); + wxString strId = value.After('='); + int id = atoi(strId); + + wxString oldSymbolName = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetSymbolForId(resource->GetId()); + int oldSymbolId = resource->GetId(); + + if (strName != "") + { + // If we change the id for an existing symbol, we need to: + // 1) Check if there are any other resources currently using the original id. + // If so, will need to change their id to the new id. + // 2) Remove the old symbol, add the new symbol. + // In this check, we don't have to do this, but we need to do it in SetProperty. + + if (strName == oldSymbolName && id != oldSymbolId) { + wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) ); + + // It's OK to change just the id. But we'll need to change all matching ids in all resources, + // because ids are unique and changing one resource's id must change all identical ones. + wxResourceManager::GetCurrentResourceManager()->ChangeIds(oldSymbolId, id); + wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); - } - - if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName)) - { wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); } + + // If we change the name but not the id, we'll just need to remove and + // re-add the symbol/id pair. + if (strName != oldSymbolName && id == oldSymbolId) + { + wxASSERT( (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) ); + + wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); + + if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName)) + { + wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); + } + } + + // What if we're changing both the name and the id? + // - if there's no symbol of that name, just remove the old, add the new (in SetProperty) + // - if there is a symbol of that name, if id matches, do nothing. If not, veto. + + if (strName != oldSymbolName && id != oldSymbolId) + { + // Remove old symbol if it's not being used + if (!wxResourceManager::GetCurrentResourceManager()->IsSymbolUsed(resource, oldSymbolId) && + !wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(oldSymbolName)) + { + wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().RemoveSymbol(oldSymbolName); + } + + if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().SymbolExists(strName)) + { + wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().AddSymbol(strName, id); + } + } + resource->SetId(id); } - resource->SetId(id); + + return TRUE; } - + else + return FALSE; + } + else if (name == "border") + { + long borderStyle = 0; + wxString val = property->GetValue().StringValue(); + + if (val == "wxSIMPLE_BORDER") + borderStyle = wxSIMPLE_BORDER; + else if (val == "wxRAISED_BORDER") + borderStyle = wxRAISED_BORDER; + else if (val == "wxSUNKEN_BORDER") + borderStyle = wxSUNKEN_BORDER; + else if (val == "wxDOUBLE_BORDER") + borderStyle = wxDOUBLE_BORDER; + else if (val == "wxSTATIC_BORDER") + borderStyle = wxSTATIC_BORDER; + else if (val == "wxNO_BORDER") + borderStyle = wxNO_BORDER; + + SetWindowStyle(m_propertyWindow, wxSIMPLE_BORDER, FALSE); + SetWindowStyle(m_propertyWindow, wxRAISED_BORDER, FALSE); + SetWindowStyle(m_propertyWindow, wxSUNKEN_BORDER, FALSE); + SetWindowStyle(m_propertyWindow, wxDOUBLE_BORDER, FALSE); + SetWindowStyle(m_propertyWindow, wxSTATIC_BORDER, FALSE); + SetWindowStyle(m_propertyWindow, wxNO_BORDER, FALSE); + + SetWindowStyle(m_propertyWindow, borderStyle, TRUE); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); return TRUE; } else return FALSE; - } - else if (name == "border") - { - long borderStyle = wxNO_BORDER; - wxString val = property->GetValue().StringValue(); - - if (val == "wxSIMPLE_BORDER") - borderStyle = wxSIMPLE_BORDER; - else if (val == "wxRAISED_BORDER") - borderStyle = wxRAISED_BORDER; - else if (val == "wxSUNKEN_BORDER") - borderStyle = wxSUNKEN_BORDER; - else if (val == "wxDOUBLE_BORDER") - borderStyle = wxDOUBLE_BORDER; - else if (val == "wxSTATIC_BORDER") - borderStyle = wxSTATIC_BORDER; - else - borderStyle = wxNO_BORDER; - - SetWindowStyle(m_propertyWindow, wxSIMPLE_BORDER, FALSE); - SetWindowStyle(m_propertyWindow, wxRAISED_BORDER, FALSE); - SetWindowStyle(m_propertyWindow, wxSUNKEN_BORDER, FALSE); - SetWindowStyle(m_propertyWindow, wxDOUBLE_BORDER, FALSE); - SetWindowStyle(m_propertyWindow, wxSTATIC_BORDER, FALSE); - SetWindowStyle(m_propertyWindow, wxNO_BORDER, FALSE); - - SetWindowStyle(m_propertyWindow, borderStyle, TRUE); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); - return TRUE; - } - else - return FALSE; } void wxWindowPropertyInfo::GetPropertyNames(wxStringList& names) { - names.Add("id"); - names.Add("name"); - names.Add("x"); - names.Add("y"); - names.Add("width"); - names.Add("height"); - names.Add("border"); - if (!m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) - { - names.Add("fontPoints"); - names.Add("fontFamily"); - names.Add("fontStyle"); - names.Add("fontWeight"); - names.Add("fontUnderlined"); - } + names.Add("id"); + names.Add("name"); + names.Add("x"); + names.Add("y"); + names.Add("width"); + names.Add("height"); + names.Add("border"); + if (!m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) + { + names.Add("fontPoints"); + names.Add("fontFamily"); + names.Add("fontStyle"); + names.Add("fontWeight"); + names.Add("fontUnderlined"); + } } // Fill in the wxItemResource members to mirror the current window settings bool wxWindowPropertyInfo::InstantiateResource(wxItemResource *resource) { -// resource->SetType(m_propertyWindow->GetClassInfo()->GetClassName()); - -// resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); - wxString str(m_propertyWindow->GetName()); - resource->SetName(str); - + // resource->SetType(m_propertyWindow->GetClassInfo()->GetClassName()); + + // resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); + wxString str(m_propertyWindow->GetName()); + resource->SetName(str); + #if 0 // Why did we comment this out? Possibly because of rounding errors - // that will build up as the conversion is repeatedly done. - // so only do the conversion when a resize happens. - int x, y, w, h; - - if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) - m_propertyWindow->GetClientSize(&w, &h); - else - m_propertyWindow->GetSize(&w, &h); - - m_propertyWindow->GetPosition(&x, &y); - - // We need to convert to dialog units if this is not a dialog or panel, but - // the parent resource specifies dialog units. - if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) - { - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxPoint(x, y)); - x = pt.x; y = pt.y; - wxSize sz = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxSize(w, h)); - w = sz.x; h = sz.y; - } - } - else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) - { - if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) - { - wxPoint pt = m_propertyWindow->ConvertPixelsToDialog(wxPoint(x, y)); - x = pt.x; y = pt.y; - wxSize sz = m_propertyWindow->ConvertPixelsToDialog(wxSize(w, h)); - w = sz.x; h = sz.y; - } - } - - resource->SetSize(x, y, w, h); + // that will build up as the conversion is repeatedly done. + // so only do the conversion when a resize happens. + int x, y, w, h; + + if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) + m_propertyWindow->GetClientSize(&w, &h); + else + m_propertyWindow->GetSize(&w, &h); + + m_propertyWindow->GetPosition(&x, &y); + + // We need to convert to dialog units if this is not a dialog or panel, but + // the parent resource specifies dialog units. + if (m_propertyWindow->GetParent() && m_propertyWindow->IsKindOf(CLASSINFO(wxControl))) + { + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxPoint(x, y)); + x = pt.x; y = pt.y; + wxSize sz = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxSize(w, h)); + w = sz.x; h = sz.y; + } + } + else if (m_propertyWindow->IsKindOf(CLASSINFO(wxPanel))) + { + if (resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + wxPoint pt = m_propertyWindow->ConvertPixelsToDialog(wxPoint(x, y)); + x = pt.x; y = pt.y; + wxSize sz = m_propertyWindow->ConvertPixelsToDialog(wxSize(w, h)); + w = sz.x; h = sz.y; + } + } + + resource->SetSize(x, y, w, h); #endif - - return TRUE; + + return TRUE; } // Set the window style @@ -748,7 +750,7 @@ void wxWindowPropertyInfo::SetWindowStyle(wxWindow* win, long style, bool set) { if (style == 0) return; - + if ((win->GetWindowStyleFlag() & style) == style) { if (!set) @@ -766,1482 +768,1496 @@ void wxWindowPropertyInfo::SetWindowStyle(wxWindow* win, long style, bool set) } /* - * Controls - */ +* Controls +*/ wxProperty *wxItemPropertyInfo::GetProperty(wxString& name) { - wxControl *itemWindow = (wxControl *)m_propertyWindow; - wxFont *font = & itemWindow->GetFont(); - - if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || - name == "fontUnderlined") - return GetFontProperty(name, font); - else if (name == "label" && itemWindow->GetLabel()) - return new wxProperty("label", m_propertyWindow->GetLabel(), "string"); - else - return wxWindowPropertyInfo::GetProperty(name); + wxControl *itemWindow = (wxControl *)m_propertyWindow; + wxFont *font = & itemWindow->GetFont(); + + if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || + name == "fontUnderlined") + return GetFontProperty(name, font); + else if (name == "label" && itemWindow->GetLabel()) + return new wxProperty("label", m_propertyWindow->GetLabel(), "string"); + else + return wxWindowPropertyInfo::GetProperty(name); } bool wxItemPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxControl *itemWindow = (wxControl *)m_propertyWindow; + wxControl *itemWindow = (wxControl *)m_propertyWindow; #if 0 - wxFont *font = & itemWindow->GetFont(); - - if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, font); - if (newFont) - itemWindow->SetFont(* newFont); - return TRUE; - } - else + wxFont *font = & itemWindow->GetFont(); + + if (font && (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" )) + { + wxFont *newFont = SetFontProperty(name, property, font); + if (newFont) + itemWindow->SetFont(* newFont); + return TRUE; + } + else #endif - if (name == "label") - { - itemWindow->SetLabel(property->GetValue().StringValue()); - return TRUE; - } - else - return wxWindowPropertyInfo::SetProperty(name, property); + if (name == "label") + { + itemWindow->SetLabel(property->GetValue().StringValue()); + return TRUE; + } + else + return wxWindowPropertyInfo::SetProperty(name, property); } void wxItemPropertyInfo::GetPropertyNames(wxStringList& names) { - wxWindowPropertyInfo::GetPropertyNames(names); - - names.Add("fontPoints"); - names.Add("fontFamily"); - names.Add("fontStyle"); - names.Add("fontWeight"); - names.Add("fontUnderlined"); + wxWindowPropertyInfo::GetPropertyNames(names); + + names.Add("fontPoints"); + names.Add("fontFamily"); + names.Add("fontStyle"); + names.Add("fontWeight"); + names.Add("fontUnderlined"); } bool wxItemPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxWindowPropertyInfo::InstantiateResource(resource); - - wxControl *item = (wxControl *)m_propertyWindow; - wxString str(item->GetLabel()); - resource->SetTitle(str); - - if (item->GetFont().Ok()) - resource->SetFont(* wxTheFontList->FindOrCreateFont(item->GetFont().GetPointSize(), - item->GetFont().GetFamily(), item->GetFont().GetStyle(), item->GetFont().GetWeight(), - item->GetFont().GetUnderlined(), item->GetFont().GetFaceName())); - return TRUE; + wxWindowPropertyInfo::InstantiateResource(resource); + + wxControl *item = (wxControl *)m_propertyWindow; + wxString str(item->GetLabel()); + resource->SetTitle(str); + + if (item->GetFont().Ok()) + resource->SetFont(* wxTheFontList->FindOrCreateFont(item->GetFont().GetPointSize(), + item->GetFont().GetFamily(), item->GetFont().GetStyle(), item->GetFont().GetWeight(), + item->GetFont().GetUnderlined(), item->GetFont().GetFaceName())); + return TRUE; } /* - * Button - */ +* Button +*/ wxProperty *wxButtonPropertyInfo::GetProperty(wxString& name) { - return wxItemPropertyInfo::GetProperty(name); + return wxItemPropertyInfo::GetProperty(name); } bool wxButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - return wxItemPropertyInfo::SetProperty(name, property); + return wxItemPropertyInfo::SetProperty(name, property); } void wxButtonPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); } bool wxButtonPropertyInfo::InstantiateResource(wxItemResource *resource) { - return wxItemPropertyInfo::InstantiateResource(resource); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * wxBitmapButton - */ +* wxBitmapButton +*/ wxProperty *wxBitmapButtonPropertyInfo::GetProperty(wxString& name) { - wxBitmapButton *button = (wxBitmapButton *)m_propertyWindow; - if (name == "bitmapFilename") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button); - wxString str("none.bmp"); - - if (resource) + wxBitmapButton *button = (wxBitmapButton *)m_propertyWindow; + if (name == "bitmapFilename") { - str = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource); + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button); + wxString str("none.bmp"); + + if (resource) + { + str = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource); + } + return new wxProperty("bitmapFilename", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")); } - return new wxProperty("bitmapFilename", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")); - } - else - return wxButtonPropertyInfo::GetProperty(name); + else + return wxButtonPropertyInfo::GetProperty(name); } bool wxBitmapButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxBitmapButton *button = (wxBitmapButton *)m_propertyWindow; - if (name == "bitmapFilename") - { - char *s = property->GetValue().StringValue(); - if (s && wxFileExists(s)) + wxBitmapButton *button = (wxBitmapButton *)m_propertyWindow; + if (name == "bitmapFilename") { - wxString str(s); - wxBitmap *bitmap = new wxBitmap(str, wxBITMAP_TYPE_BMP); - if (!bitmap->Ok()) - { - delete bitmap; - return FALSE; - } - else - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button); - if (resource) + char *s = property->GetValue().StringValue(); + if (s && wxFileExists(s)) { - wxString oldResource(resource->GetValue4()); - wxString resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(str); - resource->SetValue4(resName); - - if (!oldResource.IsNull()) - wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(oldResource); + wxString str(s); + wxBitmap *bitmap = new wxBitmap(str, wxBITMAP_TYPE_BMP); + if (!bitmap->Ok()) + { + delete bitmap; + return FALSE; + } + else + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(button); + if (resource) + { + wxString oldResource(resource->GetValue4()); + wxString resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(str); + resource->SetValue4(resName); + + if (!oldResource.IsNull()) + wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(oldResource); + } + + button->SetLabel(* bitmap); + return TRUE; + } } - - button->SetLabel(* bitmap); - return TRUE; - } + return FALSE; } - return FALSE; - } - else - return wxButtonPropertyInfo::SetProperty(name, property); + else + return wxButtonPropertyInfo::SetProperty(name, property); } void wxBitmapButtonPropertyInfo::GetPropertyNames(wxStringList& names) { - wxButtonPropertyInfo::GetPropertyNames(names); - names.Delete("label"); - names.Add("bitmapFilename"); + wxButtonPropertyInfo::GetPropertyNames(names); + names.Delete("label"); + names.Add("bitmapFilename"); } bool wxBitmapButtonPropertyInfo::InstantiateResource(wxItemResource *resource) { - return wxItemPropertyInfo::InstantiateResource(resource); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * wxStaticText - */ +* wxStaticText +*/ wxProperty *wxStaticTextPropertyInfo::GetProperty(wxString& name) { - return wxItemPropertyInfo::GetProperty(name); + return wxItemPropertyInfo::GetProperty(name); } bool wxStaticTextPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxStaticText* itemWindow = (wxStaticText*) m_propertyWindow; - if (name == "label") - { - // Because setting a wxStaticText control's label may change the - // size, we must get the size and instantiate the resource immediately. - itemWindow->SetLabel(property->GetValue().StringValue()); - int w, h; - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(itemWindow); - - m_propertyWindow->GetSize(&w, &h); - // m_propertyWindow->GetPosition(&x, &y); - - // We need to convert to dialog units if - // the parent resource specifies dialog units. - if (m_propertyWindow->GetParent()) + wxStaticText* itemWindow = (wxStaticText*) m_propertyWindow; + if (name == "label") { - wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); - if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + // Because setting a wxStaticText control's label may change the + // size, we must get the size and instantiate the resource immediately. + itemWindow->SetLabel(property->GetValue().StringValue()); + int w, h; + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(itemWindow); + + m_propertyWindow->GetSize(&w, &h); + // m_propertyWindow->GetPosition(&x, &y); + + // We need to convert to dialog units if + // the parent resource specifies dialog units. + if (m_propertyWindow->GetParent()) { - // wxPoint pt = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxPoint(x, y)); - // x = pt.x; y = pt.y; - wxSize sz = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxSize(w, h)); - w = sz.x; h = sz.y; + wxItemResource* parentResource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow->GetParent()); + if (parentResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) + { + // wxPoint pt = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxPoint(x, y)); + // x = pt.x; y = pt.y; + wxSize sz = m_propertyWindow->GetParent()->ConvertPixelsToDialog(wxSize(w, h)); + w = sz.x; h = sz.y; + } } + resource->SetSize(resource->GetX(), resource->GetY(), w, h); + return TRUE; } - resource->SetSize(resource->GetX(), resource->GetY(), w, h); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + else + return wxItemPropertyInfo::SetProperty(name, property); } void wxStaticTextPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); } bool wxStaticTextPropertyInfo::InstantiateResource(wxItemResource *resource) { - return wxItemPropertyInfo::InstantiateResource(resource); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * wxStaticBitmap - */ +* wxStaticBitmap +*/ wxProperty *wxStaticBitmapPropertyInfo::GetProperty(wxString& name) { - wxStaticBitmap *message = (wxStaticBitmap *)m_propertyWindow; - if (name == "bitmapFilename") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message); - wxString str("none.bmp"); - - if (resource) + wxStaticBitmap *message = (wxStaticBitmap *)m_propertyWindow; + if (name == "bitmapFilename") { - str = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource); + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message); + wxString str("none.bmp"); + + if (resource) + { + str = wxResourceManager::GetCurrentResourceManager()->FindBitmapFilenameForResource(resource); + } + return new wxProperty("bitmapFilename", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")); } - return new wxProperty("bitmapFilename", str.GetData(), "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")); - } - else - return wxItemPropertyInfo::GetProperty(name); + else + return wxItemPropertyInfo::GetProperty(name); } bool wxStaticBitmapPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxStaticBitmap *message = (wxStaticBitmap *)m_propertyWindow; - if (name == "bitmapFilename") - { - char *s = property->GetValue().StringValue(); - if (s && wxFileExists(s)) + wxStaticBitmap *message = (wxStaticBitmap *)m_propertyWindow; + if (name == "bitmapFilename") { - wxString str(s); - - wxBitmap *bitmap = new wxBitmap(str, wxBITMAP_TYPE_BMP); - if (!bitmap->Ok()) - { - delete bitmap; - return FALSE; - } - else - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message); - if (resource) + char *s = property->GetValue().StringValue(); + if (s && wxFileExists(s)) { - wxString oldResource(resource->GetValue4()); - wxString resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(str); - resource->SetValue4(resName); - - if (!oldResource.IsNull()) - wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(oldResource); + wxString str(s); + + wxBitmap *bitmap = new wxBitmap(str, wxBITMAP_TYPE_BMP); + if (!bitmap->Ok()) + { + delete bitmap; + return FALSE; + } + else + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(message); + if (resource) + { + wxString oldResource(resource->GetValue4()); + wxString resName = wxResourceManager::GetCurrentResourceManager()->AddBitmapResource(str); + resource->SetValue4(resName); + + if (!oldResource.IsNull()) + wxResourceManager::GetCurrentResourceManager()->PossiblyDeleteBitmapResource(oldResource); + } + + message->SetBitmap(* bitmap); + return TRUE; + } } - - message->SetBitmap(* bitmap); - return TRUE; - } + return FALSE; } - return FALSE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + else + return wxItemPropertyInfo::SetProperty(name, property); } void wxStaticBitmapPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("bitmapFilename"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("bitmapFilename"); } bool wxStaticBitmapPropertyInfo::InstantiateResource(wxItemResource *resource) { - return wxItemPropertyInfo::InstantiateResource(resource); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Text item - */ +* Text item +*/ wxProperty *wxTextPropertyInfo::GetProperty(wxString& name) { - wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; - if (name == "value") - return new wxProperty("value", text->GetValue(), "string"); - else if (name == "password") - { - bool isPassword = ((text->GetWindowStyleFlag() & wxTE_PASSWORD) == wxTE_PASSWORD); - return new wxProperty("password", isPassword, "bool"); - } - else if (name == "readonly") - { - bool isReadOnly = ((text->GetWindowStyleFlag() & wxTE_READONLY) == wxTE_READONLY); - return new wxProperty("readonly", isReadOnly, "bool"); - } - else - return wxItemPropertyInfo::GetProperty(name); + wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; + if (name == "value") + return new wxProperty("value", text->GetValue(), "string"); + else if (name == "password") + { + bool isPassword = ((text->GetWindowStyleFlag() & wxTE_PASSWORD) == wxTE_PASSWORD); + return new wxProperty("password", isPassword, "bool"); + } + else if (name == "readonly") + { + bool isReadOnly = ((text->GetWindowStyleFlag() & wxTE_READONLY) == wxTE_READONLY); + return new wxProperty("readonly", isReadOnly, "bool"); + } + else + return wxItemPropertyInfo::GetProperty(name); } bool wxTextPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; - if (name == "value") - { - text->SetValue(property->GetValue().StringValue()); - return TRUE; - } - else if (name == "password") - { - long flag = text->GetWindowStyleFlag(); - if (property->GetValue().BoolValue()) + wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; + if (name == "value") { - if ((flag & wxTE_PASSWORD) != wxTE_PASSWORD) - flag |= wxTE_PASSWORD; + text->SetValue(property->GetValue().StringValue()); + return TRUE; + } + else if (name == "password") + { + long flag = text->GetWindowStyleFlag(); + if (property->GetValue().BoolValue()) + { + if ((flag & wxTE_PASSWORD) != wxTE_PASSWORD) + flag |= wxTE_PASSWORD; + } + else + { + if ((flag & wxTE_PASSWORD) == wxTE_PASSWORD) + flag -= wxTE_PASSWORD; + } + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text); + resource->SetStyle(flag); + + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this); + return TRUE; + } + else if (name == "readonly") + { + long flag = text->GetWindowStyleFlag(); + if (property->GetValue().BoolValue()) + { + if ((flag & wxTE_READONLY) != wxTE_READONLY) + flag |= wxTE_READONLY; + } + else + { + if ((flag & wxTE_READONLY) == wxTE_READONLY) + flag -= wxTE_READONLY; + } + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text); + resource->SetStyle(flag); + + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this); + return TRUE; } else - { - if ((flag & wxTE_PASSWORD) == wxTE_PASSWORD) - flag -= wxTE_PASSWORD; - } - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text); - resource->SetStyle(flag); - - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this); - return TRUE; - } - else if (name == "readonly") - { - long flag = text->GetWindowStyleFlag(); - if (property->GetValue().BoolValue()) - { - if ((flag & wxTE_READONLY) != wxTE_READONLY) - flag |= wxTE_READONLY; - } - else - { - if ((flag & wxTE_READONLY) == wxTE_READONLY) - flag -= wxTE_READONLY; - } - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(text); - resource->SetStyle(flag); - - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(text, this); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + return wxItemPropertyInfo::SetProperty(name, property); } void wxTextPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("value"); - names.Add("readonly"); - names.Add("password"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("value"); + names.Add("readonly"); + names.Add("password"); } bool wxTextPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; - wxString str(text->GetValue()); - resource->SetValue4(str); + wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; + wxString str(text->GetValue()); + resource->SetValue4(str); - return wxItemPropertyInfo::InstantiateResource(resource); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Listbox item - */ +* Listbox item +*/ wxProperty *wxListBoxPropertyInfo::GetProperty(wxString& name) { - wxListBox *listBox = (wxListBox *)m_propertyWindow; - if (name == "values") - { - wxStringList *stringList = new wxStringList; - int i; - for (i = 0; i < listBox->Number(); i++) - stringList->Add(listBox->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - else if (name == "multiple") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox); - if (!resource) - return NULL; - - char *mult = "wxLB_SINGLE"; - - if ((listBox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) - mult = "wxLB_MULTIPLE"; - else if ((listBox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0) - mult = "wxLB_EXTENDED"; + wxListBox *listBox = (wxListBox *)m_propertyWindow; + if (name == "values") + { + wxStringList *stringList = new wxStringList; + int i; + for (i = 0; i < listBox->Number(); i++) + stringList->Add(listBox->GetString(i)); + + return new wxProperty(name, stringList, "stringlist"); + } + else if (name == "multiple") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox); + if (!resource) + return NULL; + + char *mult = "wxLB_SINGLE"; + + if ((listBox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) + mult = "wxLB_MULTIPLE"; + else if ((listBox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0) + mult = "wxLB_EXTENDED"; + else + mult = "wxLB_SINGLE"; + + return new wxProperty("multiple", mult, "string", + new wxStringListValidator(new wxStringList("wxLB_SINGLE", "wxLB_MULTIPLE", "wxLB_EXTENDED", + NULL))); + } else - mult = "wxLB_SINGLE"; - - return new wxProperty("multiple", mult, "string", - new wxStringListValidator(new wxStringList("wxLB_SINGLE", "wxLB_MULTIPLE", "wxLB_EXTENDED", - NULL))); - } - else - return wxItemPropertyInfo::GetProperty(name); + return wxItemPropertyInfo::GetProperty(name); } bool wxListBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxListBox *listBox = (wxListBox *)m_propertyWindow; - if (name == "values") - { - listBox->Clear(); - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) + wxListBox *listBox = (wxListBox *)m_propertyWindow; + if (name == "values") { - char *s = expr->StringValue(); - if (s) - listBox->Append(s); - expr = expr->GetNext(); + listBox->Clear(); + wxPropertyValue *expr = property->GetValue().GetFirst(); + while (expr) + { + char *s = expr->StringValue(); + if (s) + listBox->Append(s); + expr = expr->GetNext(); + } + return TRUE; + } + else if (name == "multiple") + { + SetWindowStyle(m_propertyWindow, wxLB_SINGLE, FALSE); + SetWindowStyle(m_propertyWindow, wxLB_MULTIPLE, FALSE); + SetWindowStyle(m_propertyWindow, wxLB_EXTENDED, FALSE); + + wxString str(property->GetValue().StringValue()); + if (str == "wxLB_MULTIPLE") + SetWindowStyle(m_propertyWindow, wxLB_MULTIPLE, TRUE); + else if (str == "wxLB_EXTENDED") + SetWindowStyle(m_propertyWindow, wxLB_EXTENDED, TRUE); + else + SetWindowStyle(m_propertyWindow, wxLB_SINGLE, TRUE); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox); + if (resource) + resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(listBox, this); + return TRUE; } - return TRUE; - } - else if (name == "multiple") - { - SetWindowStyle(m_propertyWindow, wxLB_SINGLE, FALSE); - SetWindowStyle(m_propertyWindow, wxLB_MULTIPLE, FALSE); - SetWindowStyle(m_propertyWindow, wxLB_EXTENDED, FALSE); - - wxString str(property->GetValue().StringValue()); - if (str == "wxLB_MULTIPLE") - SetWindowStyle(m_propertyWindow, wxLB_MULTIPLE, TRUE); - else if (str == "wxLB_EXTENDED") - SetWindowStyle(m_propertyWindow, wxLB_EXTENDED, TRUE); else - SetWindowStyle(m_propertyWindow, wxLB_SINGLE, TRUE); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(listBox); - if (resource) - resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(listBox, this); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + return wxItemPropertyInfo::SetProperty(name, property); } void wxListBoxPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("values"); - names.Add("multiple"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("values"); + names.Add("multiple"); } bool wxListBoxPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxListBox *lbox = (wxListBox *)m_propertyWindow; - // This will be set for the wxItemResource on reading or in SetProperty -// resource->SetValue1(lbox->GetSelectionMode()); - int i; - if (lbox->Number() == 0) - resource->SetStringValues(NULL); - else - { - wxStringList slist; - - for (i = 0; i < lbox->Number(); i++) - slist.Add(lbox->GetString(i)); - - resource->SetStringValues(slist); - } - return wxItemPropertyInfo::InstantiateResource(resource); + wxListBox *lbox = (wxListBox *)m_propertyWindow; + // This will be set for the wxItemResource on reading or in SetProperty + // resource->SetValue1(lbox->GetSelectionMode()); + int i; + if (lbox->Number() == 0) + resource->SetStringValues(NULL); + else + { + wxStringList slist; + + for (i = 0; i < lbox->Number(); i++) + slist.Add(lbox->GetString(i)); + + resource->SetStringValues(slist); + } + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Choice item - */ +* Choice item +*/ wxProperty *wxChoicePropertyInfo::GetProperty(wxString& name) { - wxChoice *choice = (wxChoice *)m_propertyWindow; - if (name == "values") - { - wxStringList* stringList = new wxStringList; - int i; - for (i = 0; i < choice->Number(); i++) - stringList->Add(choice->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - else - return wxItemPropertyInfo::GetProperty(name); + wxChoice *choice = (wxChoice *)m_propertyWindow; + if (name == "values") + { + wxStringList* stringList = new wxStringList; + int i; + for (i = 0; i < choice->Number(); i++) + stringList->Add(choice->GetString(i)); + + return new wxProperty(name, stringList, "stringlist"); + } + else + return wxItemPropertyInfo::GetProperty(name); } bool wxChoicePropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxChoice *choice = (wxChoice *)m_propertyWindow; - if (name == "values") - { - choice->Clear(); - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) + wxChoice *choice = (wxChoice *)m_propertyWindow; + if (name == "values") { - char *s = expr->StringValue(); - if (s) - choice->Append(s); - expr = expr->GetNext(); + choice->Clear(); + wxPropertyValue *expr = property->GetValue().GetFirst(); + while (expr) + { + char *s = expr->StringValue(); + if (s) + choice->Append(s); + expr = expr->GetNext(); + } + if (choice->Number() > 0) + choice->SetSelection(0); + return TRUE; } - if (choice->Number() > 0) - choice->SetSelection(0); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + else + return wxItemPropertyInfo::SetProperty(name, property); } void wxChoicePropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("values"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("values"); } bool wxChoicePropertyInfo::InstantiateResource(wxItemResource *resource) { - wxChoice *choice = (wxChoice *)m_propertyWindow; - int i; - if (choice->Number() == 0) - resource->SetStringValues(NULL); - else - { - wxStringList slist; - - for (i = 0; i < choice->Number(); i++) - slist.Add(choice->GetString(i)); - - resource->SetStringValues(slist); - } - return wxItemPropertyInfo::InstantiateResource(resource); + wxChoice *choice = (wxChoice *)m_propertyWindow; + int i; + if (choice->Number() == 0) + resource->SetStringValues(NULL); + else + { + wxStringList slist; + + for (i = 0; i < choice->Number(); i++) + slist.Add(choice->GetString(i)); + + resource->SetStringValues(slist); + } + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Choice item - */ +* Choice item +*/ wxProperty *wxComboBoxPropertyInfo::GetProperty(wxString& name) { - wxComboBox *choice = (wxComboBox *)m_propertyWindow; - if (name == "values") - { - wxStringList *stringList = new wxStringList; - int i; - for (i = 0; i < choice->Number(); i++) - stringList->Add(choice->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - else if (name == "sort") - { - bool sort = ((m_propertyWindow->GetWindowStyleFlag() & wxCB_SORT) == wxCB_SORT); - return new wxProperty(name, sort, "bool"); - } - else if (name == "style") - { - wxString styleStr("dropdown"); - if (m_propertyWindow->GetWindowStyleFlag() & wxCB_SIMPLE) - styleStr = "simple"; - else if (m_propertyWindow->GetWindowStyleFlag() & wxCB_READONLY) - styleStr = "readonly"; + wxComboBox *choice = (wxComboBox *)m_propertyWindow; + if (name == "values") + { + wxStringList *stringList = new wxStringList; + int i; + for (i = 0; i < choice->Number(); i++) + stringList->Add(choice->GetString(i)); + + return new wxProperty(name, stringList, "stringlist"); + } + else if (name == "sort") + { + bool sort = ((m_propertyWindow->GetWindowStyleFlag() & wxCB_SORT) == wxCB_SORT); + return new wxProperty(name, sort, "bool"); + } + else if (name == "style") + { + wxString styleStr("dropdown"); + if (m_propertyWindow->GetWindowStyleFlag() & wxCB_SIMPLE) + styleStr = "simple"; + else if (m_propertyWindow->GetWindowStyleFlag() & wxCB_READONLY) + styleStr = "readonly"; + else + styleStr = "dropdown"; + + return new wxProperty(name, styleStr, "string", + new wxStringListValidator(new wxStringList("simple", "dropdown", "readonly", + NULL))); + } else - styleStr = "dropdown"; - - return new wxProperty(name, styleStr, "string", - new wxStringListValidator(new wxStringList("simple", "dropdown", "readonly", - NULL))); - } - else - return wxItemPropertyInfo::GetProperty(name); + return wxItemPropertyInfo::GetProperty(name); } bool wxComboBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxComboBox *choice = (wxComboBox *)m_propertyWindow; - if (name == "values") - { - choice->Clear(); - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) + wxComboBox *choice = (wxComboBox *)m_propertyWindow; + if (name == "values") { - char *s = expr->StringValue(); - if (s) - choice->Append(s); - expr = expr->GetNext(); + choice->Clear(); + wxPropertyValue *expr = property->GetValue().GetFirst(); + while (expr) + { + char *s = expr->StringValue(); + if (s) + choice->Append(s); + expr = expr->GetNext(); + } + if (choice->Number() > 0) + choice->SetSelection(0); + return TRUE; } - if (choice->Number() > 0) - choice->SetSelection(0); - return TRUE; - } - else if (name == "sort") - { - SetWindowStyle(m_propertyWindow, wxCB_SORT, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); - - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(m_propertyWindow, this); - return TRUE; - } - else if (name == "style") - { - SetWindowStyle(m_propertyWindow, wxCB_SIMPLE, FALSE); - SetWindowStyle(m_propertyWindow, wxCB_DROPDOWN, FALSE); - SetWindowStyle(m_propertyWindow, wxCB_READONLY, FALSE); - - wxString styleStr(property->GetValue().StringValue()); - if (styleStr == "simple") - SetWindowStyle(m_propertyWindow, wxCB_SIMPLE, TRUE); - else if (styleStr == "dropdown") - SetWindowStyle(m_propertyWindow, wxCB_DROPDOWN, TRUE); - else if (styleStr == "readonly") - SetWindowStyle(m_propertyWindow, wxCB_READONLY, TRUE); - - // Necesary? - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); - - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(m_propertyWindow, this); - - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + else if (name == "sort") + { + SetWindowStyle(m_propertyWindow, wxCB_SORT, property->GetValue().BoolValue()); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); + + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(m_propertyWindow, this); + return TRUE; + } + else if (name == "style") + { + SetWindowStyle(m_propertyWindow, wxCB_SIMPLE, FALSE); + SetWindowStyle(m_propertyWindow, wxCB_DROPDOWN, FALSE); + SetWindowStyle(m_propertyWindow, wxCB_READONLY, FALSE); + + wxString styleStr(property->GetValue().StringValue()); + if (styleStr == "simple") + SetWindowStyle(m_propertyWindow, wxCB_SIMPLE, TRUE); + else if (styleStr == "dropdown") + SetWindowStyle(m_propertyWindow, wxCB_DROPDOWN, TRUE); + else if (styleStr == "readonly") + SetWindowStyle(m_propertyWindow, wxCB_READONLY, TRUE); + + // Necesary? + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + resource->SetStyle(m_propertyWindow->GetWindowStyleFlag()); + + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(m_propertyWindow, this); + + return TRUE; + } + else + return wxItemPropertyInfo::SetProperty(name, property); } void wxComboBoxPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("values"); - names.Add("style"); - names.Add("sort"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("values"); + names.Add("style"); + names.Add("sort"); } bool wxComboBoxPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxComboBox *choice = (wxComboBox *)m_propertyWindow; - int i; - if (choice->Number() == 0) - resource->SetStringValues(NULL); - else - { - wxStringList slist; - - for (i = 0; i < choice->Number(); i++) - slist.Add(choice->GetString(i)); - - resource->SetStringValues(slist); - } - return wxItemPropertyInfo::InstantiateResource(resource); + wxComboBox *choice = (wxComboBox *)m_propertyWindow; + int i; + if (choice->Number() == 0) + resource->SetStringValues(NULL); + else + { + wxStringList slist; + + for (i = 0; i < choice->Number(); i++) + slist.Add(choice->GetString(i)); + + resource->SetStringValues(slist); + } + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Radiobox item - */ +* Radiobox item +*/ wxProperty *wxRadioBoxPropertyInfo::GetProperty(wxString& name) { - wxRadioBox *radioBox = (wxRadioBox *)m_propertyWindow; - if (name == "numberRowsOrCols") - { - return new wxProperty("numberRowsOrCols", (long)radioBox->GetNumberOfRowsOrCols(), "integer"); - } - if (name == "orientation") - { - wxString orient; - if (m_propertyWindow->GetWindowStyleFlag() & wxRA_SPECIFY_COLS) - orient = "wxRA_SPECIFY_COLS"; - else - orient = "wxRA_SPECIFY_ROWS"; - - return new wxProperty("orientation", orient, "string", - new wxStringListValidator(new wxStringList("wxRA_SPECIFY_COLS", "wxRA_SPECIFY_ROWS", - NULL))); - } - else if (name == "values") - { - wxStringList *stringList = new wxStringList; - int i; - for (i = 0; i < radioBox->Number(); i++) - stringList->Add(radioBox->GetString(i)); - - return new wxProperty(name, stringList, "stringlist"); - } - return wxItemPropertyInfo::GetProperty(name); + wxRadioBox *radioBox = (wxRadioBox *)m_propertyWindow; + if (name == "numberRowsOrCols") + { + return new wxProperty("numberRowsOrCols", (long)radioBox->GetNumberOfRowsOrCols(), "integer"); + } + if (name == "orientation") + { + wxString orient; + if (m_propertyWindow->GetWindowStyleFlag() & wxRA_SPECIFY_COLS) + orient = "wxRA_SPECIFY_COLS"; + else + orient = "wxRA_SPECIFY_ROWS"; + + return new wxProperty("orientation", orient, "string", + new wxStringListValidator(new wxStringList("wxRA_SPECIFY_COLS", "wxRA_SPECIFY_ROWS", + NULL))); + } + else if (name == "values") + { + wxStringList *stringList = new wxStringList; + int i; + for (i = 0; i < radioBox->Number(); i++) + stringList->Add(radioBox->GetString(i)); + + return new wxProperty(name, stringList, "stringlist"); + } + return wxItemPropertyInfo::GetProperty(name); } bool wxRadioBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxRadioBox *radioBox = (wxRadioBox *)m_propertyWindow; - if (name == "numberRowsOrCols") - { - wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox); - - radioBox->SetNumberOfRowsOrCols((int)property->GetValue().IntegerValue()); - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this); - return TRUE; - } - else if (name == "orientation") - { - long windowStyle = radioBox->GetWindowStyleFlag(); - wxString val(property->GetValue().StringValue()); - if (val == "wxRA_SPECIFY_COLS") + wxRadioBox *radioBox = (wxRadioBox *)m_propertyWindow; + if (name == "numberRowsOrCols") { - if (windowStyle & wxRA_SPECIFY_ROWS) - windowStyle -= wxRA_SPECIFY_ROWS; - windowStyle |= wxRA_SPECIFY_COLS; + wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox); + + radioBox->SetNumberOfRowsOrCols((int)property->GetValue().IntegerValue()); + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this); + return TRUE; } - else + else if (name == "orientation") { - if (windowStyle & wxRA_SPECIFY_COLS) - windowStyle -= wxRA_SPECIFY_COLS; - windowStyle |= wxRA_SPECIFY_ROWS; + long windowStyle = radioBox->GetWindowStyleFlag(); + wxString val(property->GetValue().StringValue()); + if (val == "wxRA_SPECIFY_COLS") + { + if (windowStyle & wxRA_SPECIFY_ROWS) + windowStyle -= wxRA_SPECIFY_ROWS; + windowStyle |= wxRA_SPECIFY_COLS; + } + else + { + if (windowStyle & wxRA_SPECIFY_COLS) + windowStyle -= wxRA_SPECIFY_COLS; + windowStyle |= wxRA_SPECIFY_ROWS; + } + wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox); + + radioBox->SetWindowStyleFlag(windowStyle); + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(radioBox); + resource->SetStyle(windowStyle); + resource->SetSize(resource->GetX(), resource->GetY(), -1, -1); // Let it calculate it's own size + + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this, FALSE); + return TRUE; + } + else if (name == "values") + { + // Set property into *resource*, not wxRadioBox, and then recreate + // the wxRadioBox. This is because we can't dynamically set the strings + // of a wxRadioBox. + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (!resource) + return FALSE; + + wxStringList stringList; + wxPropertyValue *expr = property->GetValue().GetFirst(); + while (expr) + { + char *s = expr->StringValue(); + if (s) + stringList.Add(s); + expr = expr->GetNext(); + } + resource->SetStringValues(stringList); + resource->SetSize(resource->GetX(), resource->GetY(), -1, -1); // Let it calculate it's own size + m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this, FALSE); + return TRUE; + } + else if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" ) + { + wxFont *font = & m_propertyWindow->GetFont(); + if (!font) + return FALSE; + wxFont *newFont = SetFontProperty(name, property, font); + if (newFont) + { + wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); + if (resource) + { + resource->SetFont(* newFont); + } + + wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox); + + radioBox->SetFont(* newFont); + radioBox->SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT); + return TRUE; + } } - wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox); - - radioBox->SetWindowStyleFlag(windowStyle); - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(radioBox); - resource->SetStyle(windowStyle); - resource->SetSize(resource->GetX(), resource->GetY(), -1, -1); // Let it calculate it's own size - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this, FALSE); - return TRUE; - } - else if (name == "values") - { - // Set property into *resource*, not wxRadioBox, and then recreate - // the wxRadioBox. This is because we can't dynamically set the strings - // of a wxRadioBox. - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (!resource) - return FALSE; - - wxStringList stringList; - wxPropertyValue *expr = property->GetValue().GetFirst(); - while (expr) - { - char *s = expr->StringValue(); - if (s) - stringList.Add(s); - expr = expr->GetNext(); - } - resource->SetStringValues(stringList); - resource->SetSize(resource->GetX(), resource->GetY(), -1, -1); // Let it calculate it's own size - m_propertyWindow = wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this, FALSE); - return TRUE; - } - else if (name == "fontPoints" || name == "fontFamily" || name == "fontStyle" || name == "fontWeight" || name == "fontUnderlined" ) - { - wxFont *font = & m_propertyWindow->GetFont(); - if (!font) - return FALSE; - wxFont *newFont = SetFontProperty(name, property, font); - if (newFont) - { - wxItemResource* resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - if (resource) - { - resource->SetFont(* newFont); - } - - wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(radioBox); - - radioBox->SetFont(* newFont); - radioBox->SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT); - return TRUE; - } - } - - return wxItemPropertyInfo::SetProperty(name, property); + return wxItemPropertyInfo::SetProperty(name, property); } void wxRadioBoxPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); - names.Add("values"); - names.Add("orientation"); - names.Add("numberRowsOrCols"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); + names.Add("values"); + names.Add("orientation"); + names.Add("numberRowsOrCols"); } bool wxRadioBoxPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow; - // Take strings from resource instead -/* - int i; - if (rbox->Number() == 0) + wxRadioBox *rbox = (wxRadioBox *)m_propertyWindow; + // Take strings from resource instead + /* + int i; + if (rbox->Number() == 0) resource->SetStringValues(NULL); - else - { + else + { wxStringList *slist = new wxStringList; - for (i = 0; i < rbox->Number(); i++) + for (i = 0; i < rbox->Number(); i++) slist->Add(rbox->GetString(i)); - resource->SetStringValues(slist); - } -*/ - resource->SetValue1(rbox->GetNumberOfRowsOrCols()); - return wxItemPropertyInfo::InstantiateResource(resource); + resource->SetStringValues(slist); + } + */ + resource->SetValue1(rbox->GetNumberOfRowsOrCols()); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Groupbox item - */ +* Groupbox item +*/ wxProperty *wxGroupBoxPropertyInfo::GetProperty(wxString& name) { - return wxItemPropertyInfo::GetProperty(name); + return wxItemPropertyInfo::GetProperty(name); } bool wxGroupBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - return wxItemPropertyInfo::SetProperty(name, property); + return wxItemPropertyInfo::SetProperty(name, property); } void wxGroupBoxPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); } bool wxGroupBoxPropertyInfo::InstantiateResource(wxItemResource *resource) { - return wxItemPropertyInfo::InstantiateResource(resource); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Checkbox item - */ +* Checkbox item +*/ wxProperty *wxCheckBoxPropertyInfo::GetProperty(wxString& name) { - wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; - if (name == "value") - return new wxProperty("value", checkBox->GetValue(), "bool"); - else - return wxItemPropertyInfo::GetProperty(name); + wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; + if (name == "value") + return new wxProperty("value", checkBox->GetValue(), "bool"); + else + return wxItemPropertyInfo::GetProperty(name); } bool wxCheckBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; - if (name == "value") - { - checkBox->SetValue((bool)property->GetValue().BoolValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + wxCheckBox *checkBox = (wxCheckBox *)m_propertyWindow; + if (name == "value") + { + checkBox->SetValue((bool)property->GetValue().BoolValue()); + return TRUE; + } + else + return wxItemPropertyInfo::SetProperty(name, property); } void wxCheckBoxPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); - names.Add("value"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); + names.Add("value"); } bool wxCheckBoxPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxCheckBox *cbox = (wxCheckBox *)m_propertyWindow; - resource->SetValue1(cbox->GetValue()); - return wxItemPropertyInfo::InstantiateResource(resource); + wxCheckBox *cbox = (wxCheckBox *)m_propertyWindow; + resource->SetValue1(cbox->GetValue()); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Radiobutton item - */ +* Radiobutton item +*/ wxProperty *wxRadioButtonPropertyInfo::GetProperty(wxString& name) { - wxRadioButton *checkBox = (wxRadioButton *)m_propertyWindow; - if (name == "value") - return new wxProperty("value", checkBox->GetValue(), "bool"); - else - return wxItemPropertyInfo::GetProperty(name); + wxRadioButton *checkBox = (wxRadioButton *)m_propertyWindow; + if (name == "value") + return new wxProperty("value", checkBox->GetValue(), "bool"); + else + return wxItemPropertyInfo::GetProperty(name); } bool wxRadioButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxRadioButton *checkBox = (wxRadioButton *)m_propertyWindow; - if (name == "value") - { - checkBox->SetValue((bool)property->GetValue().BoolValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + wxRadioButton *checkBox = (wxRadioButton *)m_propertyWindow; + if (name == "value") + { + checkBox->SetValue((bool)property->GetValue().BoolValue()); + return TRUE; + } + else + return wxItemPropertyInfo::SetProperty(name, property); } void wxRadioButtonPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("label"); - names.Add("value"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); + names.Add("value"); } bool wxRadioButtonPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxRadioButton *cbox = (wxRadioButton *)m_propertyWindow; - resource->SetValue1(cbox->GetValue()); - return wxItemPropertyInfo::InstantiateResource(resource); + wxRadioButton *cbox = (wxRadioButton *)m_propertyWindow; + resource->SetValue1(cbox->GetValue()); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Slider item - */ +* Slider item +*/ wxProperty *wxSliderPropertyInfo::GetProperty(wxString& name) { - wxSlider *slider = (wxSlider *)m_propertyWindow; - if (name == "value") - return new wxProperty("value", (long)slider->GetValue(), "integer"); - else if (name == "orientation") - { - char *pos = NULL; - if (m_propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) - pos = "wxHORIZONTAL"; + wxSlider *slider = (wxSlider *)m_propertyWindow; + if (name == "value") + return new wxProperty("value", (long)slider->GetValue(), "integer"); + else if (name == "orientation") + { + char *pos = NULL; + if (m_propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) + pos = "wxHORIZONTAL"; + else + pos = "wxVERTICAL"; + + return new wxProperty("orientation", pos, "string", + new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", + NULL))); + } + else if (name == "minValue") + return new wxProperty("minValue", (long)slider->GetMin(), "integer"); + else if (name == "maxValue") + return new wxProperty("maxValue", (long)slider->GetMax(), "integer"); else - pos = "wxVERTICAL"; - - return new wxProperty("orientation", pos, "string", - new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", - NULL))); - } - else if (name == "minValue") - return new wxProperty("minValue", (long)slider->GetMin(), "integer"); - else if (name == "maxValue") - return new wxProperty("maxValue", (long)slider->GetMax(), "integer"); - else - return wxItemPropertyInfo::GetProperty(name); + return wxItemPropertyInfo::GetProperty(name); } bool wxSliderPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxSlider *slider = (wxSlider *)m_propertyWindow; - if (name == "value") - { - slider->SetValue((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "orientation") - { - long windowStyle = slider->GetWindowStyleFlag(); - long oldWindowStyle = windowStyle; - wxString val(property->GetValue().StringValue()); - if (val == "wxHORIZONTAL") + wxSlider *slider = (wxSlider *)m_propertyWindow; + if (name == "value") { - if (windowStyle & wxVERTICAL) - windowStyle -= wxVERTICAL; - windowStyle |= wxHORIZONTAL; + slider->SetValue((int)property->GetValue().IntegerValue()); + return TRUE; + } + else if (name == "orientation") + { + long windowStyle = slider->GetWindowStyleFlag(); + long oldWindowStyle = windowStyle; + wxString val(property->GetValue().StringValue()); + if (val == "wxHORIZONTAL") + { + if (windowStyle & wxVERTICAL) + windowStyle -= wxVERTICAL; + windowStyle |= wxHORIZONTAL; + } + else + { + if (windowStyle & wxHORIZONTAL) + windowStyle -= wxHORIZONTAL; + windowStyle |= wxVERTICAL; + } + + if (oldWindowStyle == windowStyle) + return TRUE; + + slider->SetWindowStyleFlag(windowStyle); + + // If the window style has changed, we swap the width and height parameters. + int w, h; + slider->GetSize(&w, &h); + + slider = (wxSlider *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(slider, this); + slider->SetSize(-1, -1, h, w); + m_propertyWindow = slider; + + return TRUE; + } + else if (name == "minValue") + { + slider->SetRange((int)property->GetValue().IntegerValue(), slider->GetMax()); + return TRUE; + } + else if (name == "maxValue") + { + slider->SetRange(slider->GetMin(), (int)property->GetValue().IntegerValue()); + return TRUE; } else - { - if (windowStyle & wxHORIZONTAL) - windowStyle -= wxHORIZONTAL; - windowStyle |= wxVERTICAL; - } - - if (oldWindowStyle == windowStyle) - return TRUE; - - slider->SetWindowStyleFlag(windowStyle); - - // If the window style has changed, we swap the width and height parameters. - int w, h; - slider->GetSize(&w, &h); - - slider = (wxSlider *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(slider, this); - slider->SetSize(-1, -1, h, w); - m_propertyWindow = slider; - - return TRUE; - } - else if (name == "minValue") - { - slider->SetRange((int)property->GetValue().IntegerValue(), slider->GetMax()); - return TRUE; - } - else if (name == "maxValue") - { - slider->SetRange(slider->GetMin(), (int)property->GetValue().IntegerValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + return wxItemPropertyInfo::SetProperty(name, property); } void wxSliderPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("value"); - names.Add("orientation"); - names.Add("minValue"); - names.Add("maxValue"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("value"); + names.Add("orientation"); + names.Add("minValue"); + names.Add("maxValue"); } bool wxSliderPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxSlider *slider = (wxSlider *)m_propertyWindow; - resource->SetValue1(slider->GetValue()); - resource->SetValue2(slider->GetMin()); - resource->SetValue3(slider->GetMax()); - return wxItemPropertyInfo::InstantiateResource(resource); + wxSlider *slider = (wxSlider *)m_propertyWindow; + resource->SetValue1(slider->GetValue()); + resource->SetValue2(slider->GetMin()); + resource->SetValue3(slider->GetMax()); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Gauge item - */ +* Gauge item +*/ wxProperty *wxGaugePropertyInfo::GetProperty(wxString& name) { - wxGauge *gauge = (wxGauge *)m_propertyWindow; - if (name == "value") - return new wxProperty("value", (long)gauge->GetValue(), "integer"); - else if (name == "maxValue") - return new wxProperty("maxValue", (long)gauge->GetRange(), "integer"); - else - return wxItemPropertyInfo::GetProperty(name); + wxGauge *gauge = (wxGauge *)m_propertyWindow; + if (name == "value") + return new wxProperty("value", (long)gauge->GetValue(), "integer"); + else if (name == "maxValue") + return new wxProperty("maxValue", (long)gauge->GetRange(), "integer"); + else + return wxItemPropertyInfo::GetProperty(name); } bool wxGaugePropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxGauge *gauge = (wxGauge *)m_propertyWindow; - if (name == "value") - { - gauge->SetValue((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "maxValue") - { - gauge->SetRange((int)property->GetValue().IntegerValue()); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + wxGauge *gauge = (wxGauge *)m_propertyWindow; + if (name == "value") + { + gauge->SetValue((int)property->GetValue().IntegerValue()); + return TRUE; + } + else if (name == "maxValue") + { + gauge->SetRange((int)property->GetValue().IntegerValue()); + return TRUE; + } + else + return wxItemPropertyInfo::SetProperty(name, property); } void wxGaugePropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("value"); - names.Add("maxValue"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("value"); + names.Add("maxValue"); } bool wxGaugePropertyInfo::InstantiateResource(wxItemResource *resource) { - wxGauge *gauge = (wxGauge *)m_propertyWindow; - resource->SetValue1(gauge->GetValue()); - resource->SetValue2(gauge->GetRange()); - return wxItemPropertyInfo::InstantiateResource(resource); + wxGauge *gauge = (wxGauge *)m_propertyWindow; + resource->SetValue1(gauge->GetValue()); + resource->SetValue2(gauge->GetRange()); + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Scrollbar item - */ +* Scrollbar item +*/ wxProperty *wxScrollBarPropertyInfo::GetProperty(wxString& name) { - wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow; - if (name == "thumbPosition") - return new wxProperty("value", (long)scrollBar->GetThumbPosition(), "integer"); - else if (name == "orientation") - { - char *pos = NULL; - if (m_propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) - pos = "wxHORIZONTAL"; + wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow; + if (name == "thumbPosition") + return new wxProperty("value", (long)scrollBar->GetThumbPosition(), "integer"); + else if (name == "orientation") + { + char *pos = NULL; + if (m_propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) + pos = "wxHORIZONTAL"; + else + pos = "wxVERTICAL"; + + return new wxProperty("orientation", pos, "string", + new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", + NULL))); + } + else if (name == "pageSize") + { + int pageLength = scrollBar->GetPageSize(); + + return new wxProperty("pageSize", (long)pageLength, "integer"); + } + else if (name == "thumbSize") + { + int thumbSize = scrollBar->GetThumbSize(); + + return new wxProperty("thumbSize", (long)thumbSize, "integer"); + } + else if (name == "range") + { + int range = scrollBar->GetRange(); + return new wxProperty("range", (long)range, "integer"); + } else - pos = "wxVERTICAL"; - - return new wxProperty("orientation", pos, "string", - new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", - NULL))); - } - else if (name == "pageSize") - { - int pageLength = scrollBar->GetPageSize(); - - return new wxProperty("pageSize", (long)pageLength, "integer"); - } - else if (name == "thumbSize") - { - int thumbSize = scrollBar->GetThumbSize(); - - return new wxProperty("thumbSize", (long)thumbSize, "integer"); - } - else if (name == "range") - { - int range = scrollBar->GetRange(); - return new wxProperty("range", (long)range, "integer"); - } - else - return wxItemPropertyInfo::GetProperty(name); + return wxItemPropertyInfo::GetProperty(name); } bool wxScrollBarPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow; - if (name == "thumbPosition") - { - scrollBar->SetThumbPosition((int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "orientation") - { - long windowStyle = scrollBar->GetWindowStyleFlag(); - long oldWindowStyle = windowStyle; - wxString val(property->GetValue().StringValue()); - if (val == "wxHORIZONTAL") + wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow; + if (name == "thumbPosition") { - if (windowStyle & wxVERTICAL) - windowStyle -= wxVERTICAL; - windowStyle |= wxHORIZONTAL; + scrollBar->SetThumbPosition((int)property->GetValue().IntegerValue()); + return TRUE; + } + else if (name == "orientation") + { + long windowStyle = scrollBar->GetWindowStyleFlag(); + long oldWindowStyle = windowStyle; + wxString val(property->GetValue().StringValue()); + if (val == "wxHORIZONTAL") + { + if (windowStyle & wxVERTICAL) + windowStyle -= wxVERTICAL; + windowStyle |= wxHORIZONTAL; + } + else + { + if (windowStyle & wxHORIZONTAL) + windowStyle -= wxHORIZONTAL; + windowStyle |= wxVERTICAL; + } + + if (oldWindowStyle == windowStyle) + return TRUE; + + scrollBar->SetWindowStyleFlag(windowStyle); + + // If the window style has changed, we swap the width and height parameters. + // int w, h; + // scrollBar->GetSize(&w, &h); + wxItemResource *item = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(scrollBar); + if ( item ) { + item->SetSize(item->GetX(), item->GetY(), item->GetHeight(), item->GetWidth()); + item->SetStyle(windowStyle); + } /* IF */ + + scrollBar = (wxScrollBar *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(scrollBar, this); + m_propertyWindow = scrollBar; + + return TRUE; + } + else if (name == "pageSize") + { + int pos = scrollBar->GetThumbPosition(); + int range = scrollBar->GetRange(); + int thumbSize = scrollBar->GetThumbSize(); + scrollBar->SetScrollbar(pos, thumbSize, range, (int)property->GetValue().IntegerValue()); + return TRUE; + } + else if (name == "thumbSize") + { + int pos = scrollBar->GetThumbPosition(); + int range = scrollBar->GetRange(); + int pageSize = scrollBar->GetPageSize(); + scrollBar->SetScrollbar(pos, (int)property->GetValue().IntegerValue(), range, pageSize); + return TRUE; + } + else if (name == "range") + { + int pos = scrollBar->GetThumbPosition(); + int thumbSize = scrollBar->GetThumbSize(); + int pageSize = scrollBar->GetPageSize(); + scrollBar->SetScrollbar(pos, thumbSize, (int)property->GetValue().IntegerValue(), pageSize); + return TRUE; } else - { - if (windowStyle & wxHORIZONTAL) - windowStyle -= wxHORIZONTAL; - windowStyle |= wxVERTICAL; - } - - if (oldWindowStyle == windowStyle) - return TRUE; - - scrollBar->SetWindowStyleFlag(windowStyle); - - // If the window style has changed, we swap the width and height parameters. -// int w, h; -// scrollBar->GetSize(&w, &h); - wxItemResource *item = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(scrollBar); - if ( item ) { - item->SetSize(item->GetX(), item->GetY(), item->GetHeight(), item->GetWidth()); - item->SetStyle(windowStyle); - } /* IF */ - - scrollBar = (wxScrollBar *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(scrollBar, this); - m_propertyWindow = scrollBar; - - return TRUE; - } - else if (name == "pageSize") - { - int pos = scrollBar->GetThumbPosition(); - int range = scrollBar->GetRange(); - int thumbSize = scrollBar->GetThumbSize(); - scrollBar->SetScrollbar(pos, thumbSize, range, (int)property->GetValue().IntegerValue()); - return TRUE; - } - else if (name == "thumbSize") - { - int pos = scrollBar->GetThumbPosition(); - int range = scrollBar->GetRange(); - int pageSize = scrollBar->GetPageSize(); - scrollBar->SetScrollbar(pos, (int)property->GetValue().IntegerValue(), range, pageSize); - return TRUE; - } - else if (name == "range") - { - int pos = scrollBar->GetThumbPosition(); - int thumbSize = scrollBar->GetThumbSize(); - int pageSize = scrollBar->GetPageSize(); - scrollBar->SetScrollbar(pos, thumbSize, (int)property->GetValue().IntegerValue(), pageSize); - return TRUE; - } - else - return wxItemPropertyInfo::SetProperty(name, property); + return wxItemPropertyInfo::SetProperty(name, property); } void wxScrollBarPropertyInfo::GetPropertyNames(wxStringList& names) { - wxItemPropertyInfo::GetPropertyNames(names); - names.Add("orientation"); - names.Add("thumbPosition"); - names.Add("thumbSize"); - names.Add("pageSize"); - names.Add("range"); - - // Remove some properties we don't inherit - names.Delete("fontPoints"); - names.Delete("fontFamily"); - names.Delete("fontStyle"); - names.Delete("fontWeight"); - names.Delete("fontUnderlined"); + wxItemPropertyInfo::GetPropertyNames(names); + names.Add("orientation"); + names.Add("thumbPosition"); + names.Add("thumbSize"); + names.Add("pageSize"); + names.Add("range"); + + // Remove some properties we don't inherit + names.Delete("fontPoints"); + names.Delete("fontFamily"); + names.Delete("fontStyle"); + names.Delete("fontWeight"); + names.Delete("fontUnderlined"); } bool wxScrollBarPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxScrollBar *sbar = (wxScrollBar *)m_propertyWindow; - - int thumbPosition = sbar->GetThumbPosition(); - int thumbSize = sbar->GetThumbSize(); - int pageSize = sbar->GetPageSize(); - int range = sbar->GetRange(); - - resource->SetValue1(thumbPosition); - resource->SetValue2(thumbSize); - resource->SetValue3(range); - resource->SetValue5(pageSize); - - return wxItemPropertyInfo::InstantiateResource(resource); + wxScrollBar *sbar = (wxScrollBar *)m_propertyWindow; + + int thumbPosition = sbar->GetThumbPosition(); + int thumbSize = sbar->GetThumbSize(); + int pageSize = sbar->GetPageSize(); + int range = sbar->GetRange(); + + resource->SetValue1(thumbPosition); + resource->SetValue2(thumbSize); + resource->SetValue3(range); + resource->SetValue5(pageSize); + + return wxItemPropertyInfo::InstantiateResource(resource); } /* - * Panels - */ +* Panels +*/ wxProperty *wxPanelPropertyInfo::GetProperty(wxString& name) { - wxPanel *panelWindow = (wxPanel *)m_propertyWindow; - -/* - wxFont *labelFont = panelWindow->GetLabelFont(); - wxFont *buttonFont = panelWindow->GetButtonFont(); - - if (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" || + wxPanel *panelWindow = (wxPanel *)m_propertyWindow; + + /* + wxFont *labelFont = panelWindow->GetLabelFont(); + wxFont *buttonFont = panelWindow->GetButtonFont(); + + if (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" || name == "labelFontUnderlined") - return GetFontProperty(name, labelFont); - else if (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" || + return GetFontProperty(name, labelFont); + else if (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" || name == "buttonFontUnderlined") - return GetFontProperty(name, buttonFont); -*/ - - if (name == "no3D") - { - bool userColours; - if (panelWindow->GetWindowStyleFlag() & wxNO_3D) - userColours = TRUE; + return GetFontProperty(name, buttonFont); + */ + + if (name == "no3D") + { + bool userColours; + if (panelWindow->GetWindowStyleFlag() & wxNO_3D) + userColours = TRUE; + else + userColours = FALSE; + + return new wxProperty(name, (bool)userColours, "bool"); + } + else if (name == "backgroundColour") + { + wxColour col(panelWindow->GetBackgroundColour()); + char buf[7]; + wxDecToHex(col.Red(), buf); + wxDecToHex(col.Green(), buf+2); + wxDecToHex(col.Blue(), buf+4); + + return new wxProperty(name, buf, "string", new wxColourListValidator); + } + else if (name == "title") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + if (resource) + return new wxProperty(name, resource->GetTitle(), "string"); + else + return new wxProperty(name, "Could not get title", "string"); + } + else if (name == "caption") + { + return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxCAPTION) == wxCAPTION), + "bool"); + } + else if (name == "systemMenu") + { + return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxSYSTEM_MENU) == wxSYSTEM_MENU), + "bool"); + } + else if (name == "thickFrame") + { + return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxTHICK_FRAME) == wxTHICK_FRAME), + "bool"); + } + else if (name == "modal") + { + return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL), + "bool"); + } + else if (name == "useSystemDefaults") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + return new wxProperty(name, ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) == wxRESOURCE_USE_DEFAULTS), + "bool"); + } + else if (name == "useDialogUnits") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + return new wxProperty(name, ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == wxRESOURCE_DIALOG_UNITS), + "bool"); + } else - userColours = FALSE; - - return new wxProperty(name, (bool)userColours, "bool"); - } - else if (name == "backgroundColour") - { - wxColour col(panelWindow->GetBackgroundColour()); - char buf[7]; - wxDecToHex(col.Red(), buf); - wxDecToHex(col.Green(), buf+2); - wxDecToHex(col.Blue(), buf+4); - - return new wxProperty(name, buf, "string", new wxColourListValidator); - } - else if (name == "title") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - if (resource) - return new wxProperty(name, resource->GetTitle(), "string"); - else - return new wxProperty(name, "Could not get title", "string"); - } - else if (name == "caption") - { - return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxCAPTION) == wxCAPTION), - "bool"); - } - else if (name == "systemMenu") - { - return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxSYSTEM_MENU) == wxSYSTEM_MENU), - "bool"); - } - else if (name == "thickFrame") - { - return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxTHICK_FRAME) == wxTHICK_FRAME), - "bool"); - } - else if (name == "useSystemDefaults") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - return new wxProperty(name, ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) == wxRESOURCE_USE_DEFAULTS), - "bool"); - } - else if (name == "useDialogUnits") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - return new wxProperty(name, ((resource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) == wxRESOURCE_DIALOG_UNITS), - "bool"); - } - else - return wxWindowPropertyInfo::GetProperty(name); + return wxWindowPropertyInfo::GetProperty(name); } bool wxPanelPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxPanel *panelWindow = (wxPanel *)m_propertyWindow; -/* - wxFont *labelFont = panelWindow->GetLabelFont(); - wxFont *buttonFont = panelWindow->GetButtonFont(); - - if (labelFont && (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" || name == "labelFontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, labelFont); - if (newFont) + wxPanel *panelWindow = (wxPanel *)m_propertyWindow; + /* + wxFont *labelFont = panelWindow->GetLabelFont(); + wxFont *buttonFont = panelWindow->GetButtonFont(); + + if (labelFont && (name == "labelFontPoints" || name == "labelFontFamily" || name == "labelFontStyle" || name == "labelFontWeight" || name == "labelFontUnderlined" )) + { + wxFont *newFont = SetFontProperty(name, property, labelFont); + if (newFont) panelWindow->SetLabelFont(* newFont); - return TRUE; - } - else if (buttonFont && (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" || name == "buttonFontUnderlined" )) - { - wxFont *newFont = SetFontProperty(name, property, buttonFont); - if (newFont) + return TRUE; + } + else if (buttonFont && (name == "buttonFontPoints" || name == "buttonFontFamily" || name == "buttonFontStyle" || name == "buttonFontWeight" || name == "buttonFontUnderlined" )) + { + wxFont *newFont = SetFontProperty(name, property, buttonFont); + if (newFont) panelWindow->SetButtonFont(* newFont); - return TRUE; - } -*/ - - if (name == "no3D") - { - bool userColours = property->GetValue().BoolValue(); + return TRUE; + } + */ - if (userColours) + if (name == "no3D") { - if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) != wxNO_3D) - panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() | wxNO_3D); + bool userColours = property->GetValue().BoolValue(); + + if (userColours) + { + if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) != wxNO_3D) + panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() | wxNO_3D); + } + else + { + if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) == wxNO_3D) + panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() - wxNO_3D); + } + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + + panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); + return TRUE; } - else + else if (name == "backgroundColour") { - if ((panelWindow->GetWindowStyleFlag() & wxNO_3D) == wxNO_3D) - panelWindow->SetWindowStyleFlag(panelWindow->GetWindowStyleFlag() - wxNO_3D); + char *hex = property->GetValue().StringValue(); + int r = wxHexToDec(hex); + int g = wxHexToDec(hex+2); + int b = wxHexToDec(hex+4); + + wxColour col(r,g,b); + panelWindow->SetBackgroundColour(col); + panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); + m_propertyWindow = panelWindow; + return TRUE; } - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); + else if (name == "title") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + if (resource) + { + resource->SetTitle(property->GetValue().StringValue()); + return TRUE; + } + else + return FALSE; + } + else if (name == "caption") + { + SetWindowStyle(panelWindow, wxCAPTION, property->GetValue().BoolValue()); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + return TRUE; + } + else if (name == "thickFrame") + { + SetWindowStyle(panelWindow, wxTHICK_FRAME, property->GetValue().BoolValue()); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + return TRUE; + } + else if (name == "systemMenu") + { + SetWindowStyle(panelWindow, wxSYSTEM_MENU, property->GetValue().BoolValue()); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + return TRUE; + } + else if (name == "modal") + { + SetWindowStyle(panelWindow, wxDIALOG_MODAL, property->GetValue().BoolValue()); - panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); - return TRUE; - } - else if (name == "backgroundColour") - { - char *hex = property->GetValue().StringValue(); - int r = wxHexToDec(hex); - int g = wxHexToDec(hex+2); - int b = wxHexToDec(hex+4); - - wxColour col(r,g,b); - panelWindow->SetBackgroundColour(col); - panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); - m_propertyWindow = panelWindow; - return TRUE; - } - else if (name == "title") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - if (resource) + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + return TRUE; + } + else if (name == "useSystemDefaults") { - resource->SetTitle(property->GetValue().StringValue()); + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + bool useDefaults = property->GetValue().BoolValue(); + long style = resource->GetResourceStyle(); + if (useDefaults) + { + if ((style & wxRESOURCE_USE_DEFAULTS) == 0) + style |= wxRESOURCE_USE_DEFAULTS; + } + else + { + if ((style & wxRESOURCE_USE_DEFAULTS) != 0) + style -= wxRESOURCE_USE_DEFAULTS; + } + resource->SetResourceStyle(style); + panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); + return TRUE; + } + else if (name == "useDialogUnits") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + bool useDialogUnits = property->GetValue().BoolValue(); + long style = resource->GetResourceStyle(); + if (useDialogUnits) + { + if ((style & wxRESOURCE_DIALOG_UNITS) == 0) + { + style |= wxRESOURCE_DIALOG_UNITS; + ConvertDialogUnits(TRUE); // Convert all resources + } + } + else + { + if ((style & wxRESOURCE_DIALOG_UNITS) != 0) + { + style -= wxRESOURCE_DIALOG_UNITS; + ConvertDialogUnits(FALSE); // Convert all resources + } + } + resource->SetResourceStyle(style); + panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); + m_propertyWindow = panelWindow; + // TODO: need to regenerate the width and height properties else they'll be inconsistent. return TRUE; } else - return FALSE; - } - else if (name == "caption") - { - SetWindowStyle(panelWindow, wxCAPTION, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); - return TRUE; - } - else if (name == "thickFrame") - { - SetWindowStyle(panelWindow, wxTHICK_FRAME, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); - return TRUE; - } - else if (name == "systemMenu") - { - SetWindowStyle(panelWindow, wxSYSTEM_MENU, property->GetValue().BoolValue()); - - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - resource->SetStyle(panelWindow->GetWindowStyleFlag()); - return TRUE; - } - else if (name == "useSystemDefaults") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - bool useDefaults = property->GetValue().BoolValue(); - long style = resource->GetResourceStyle(); - if (useDefaults) - { - if ((style & wxRESOURCE_USE_DEFAULTS) == 0) - style |= wxRESOURCE_USE_DEFAULTS; - } - else - { - if ((style & wxRESOURCE_USE_DEFAULTS) != 0) - style -= wxRESOURCE_USE_DEFAULTS; - } - resource->SetResourceStyle(style); - panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); - return TRUE; - } - else if (name == "useDialogUnits") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); - bool useDialogUnits = property->GetValue().BoolValue(); - long style = resource->GetResourceStyle(); - if (useDialogUnits) - { - if ((style & wxRESOURCE_DIALOG_UNITS) == 0) - { - style |= wxRESOURCE_DIALOG_UNITS; - ConvertDialogUnits(TRUE); // Convert all resources - } - } - else - { - if ((style & wxRESOURCE_DIALOG_UNITS) != 0) - { - style -= wxRESOURCE_DIALOG_UNITS; - ConvertDialogUnits(FALSE); // Convert all resources - } - } - resource->SetResourceStyle(style); - panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this); - m_propertyWindow = panelWindow; - // TODO: need to regenerate the width and height properties else they'll be inconsistent. - return TRUE; - } - else - return wxWindowPropertyInfo::SetProperty(name, property); + return wxWindowPropertyInfo::SetProperty(name, property); } void wxPanelPropertyInfo::GetPropertyNames(wxStringList& names) { - wxWindowPropertyInfo::GetPropertyNames(names); - - names.Add("title"); - names.Add("no3D"); - names.Add("backgroundColour"); - names.Add("caption"); - names.Add("systemMenu"); - names.Add("thickFrame"); - names.Add("useSystemDefaults"); - names.Add("useDialogUnits"); + wxWindowPropertyInfo::GetPropertyNames(names); + + names.Add("title"); + names.Add("no3D"); + names.Add("backgroundColour"); + names.Add("caption"); + names.Add("systemMenu"); + names.Add("thickFrame"); + names.Add("useSystemDefaults"); + names.Add("useDialogUnits"); + names.Add("modal"); } bool wxPanelPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxPanel *panel = (wxPanel *)m_propertyWindow; - if (panel->GetFont().Ok()) - resource->SetFont(* wxTheFontList->FindOrCreateFont(panel->GetFont().GetPointSize(), - panel->GetFont().GetFamily(), panel->GetFont().GetStyle(), panel->GetFont().GetWeight(), - panel->GetFont().GetUnderlined(), panel->GetFont().GetFaceName())); - - resource->SetBackgroundColour(wxColour(panel->GetBackgroundColour())); - - return wxWindowPropertyInfo::InstantiateResource(resource); + wxPanel *panel = (wxPanel *)m_propertyWindow; + if (panel->GetFont().Ok()) + resource->SetFont(* wxTheFontList->FindOrCreateFont(panel->GetFont().GetPointSize(), + panel->GetFont().GetFamily(), panel->GetFont().GetStyle(), panel->GetFont().GetWeight(), + panel->GetFont().GetUnderlined(), panel->GetFont().GetFaceName())); + + resource->SetBackgroundColour(wxColour(panel->GetBackgroundColour())); + + return wxWindowPropertyInfo::InstantiateResource(resource); } // Convert this dialog, and its children, to or from dialog units void wxPanelPropertyInfo::ConvertDialogUnits(bool toDialogUnits) { wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(m_propertyWindow); - + wxPoint pt; wxSize sz; if (toDialogUnits) @@ -2255,7 +2271,7 @@ void wxPanelPropertyInfo::ConvertDialogUnits(bool toDialogUnits) pt = m_propertyWindow->ConvertDialogToPixels(wxPoint(resource->GetX(), resource->GetY())); } resource->SetSize(pt.x, pt.y, sz.x, sz.y); - + wxNode* node = m_propertyWindow->GetChildren().First(); while (node) { @@ -2281,85 +2297,85 @@ void wxPanelPropertyInfo::ConvertDialogUnits(bool toDialogUnits) #if 0 /* - * Dialog boxes - */ +* Dialog boxes +*/ wxProperty *wxDialogPropertyInfo::GetProperty(wxString& name) { - wxDialog *dialogWindow = (wxDialog *)m_propertyWindow; - if (name == "modal") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow); - if (!resource) - return NULL; - - bool modal = (resource->GetValue1() != 0); - return new wxProperty(name, modal, "bool"); - } - else - return wxPanelPropertyInfo::GetProperty(name); + wxDialog *dialogWindow = (wxDialog *)m_propertyWindow; + if (name == "modal") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow); + if (!resource) + return NULL; + + bool modal = (resource->GetValue1() != 0); + return new wxProperty(name, modal, "bool"); + } + else + return wxPanelPropertyInfo::GetProperty(name); } bool wxDialogPropertyInfo::SetProperty(wxString& name, wxProperty *property) { - wxDialog *dialogWindow = (wxDialog *)m_propertyWindow; - - if (name == "modal") - { - wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow); - if (!resource) - return FALSE; - - resource->SetValue1(property->GetValue().BoolValue()); - return TRUE; - } - else - return wxPanelPropertyInfo::SetProperty(name, property); + wxDialog *dialogWindow = (wxDialog *)m_propertyWindow; + + if (name == "modal") + { + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(dialogWindow); + if (!resource) + return FALSE; + + resource->SetValue1(property->GetValue().BoolValue()); + return TRUE; + } + else + return wxPanelPropertyInfo::SetProperty(name, property); } void wxDialogPropertyInfo::GetPropertyNames(wxStringList& names) { - wxPanelPropertyInfo::GetPropertyNames(names); - names.Add("title"); - names.Add("modal"); + wxPanelPropertyInfo::GetPropertyNames(names); + names.Add("title"); + names.Add("modal"); } bool wxDialogPropertyInfo::InstantiateResource(wxItemResource *resource) { - wxDialog *dialog = (wxDialog *)m_propertyWindow; - wxString str(dialog->GetTitle()); - resource->SetTitle(str); + wxDialog *dialog = (wxDialog *)m_propertyWindow; + wxString str(dialog->GetTitle()); + resource->SetTitle(str); - return wxPanelPropertyInfo::InstantiateResource(resource); + return wxPanelPropertyInfo::InstantiateResource(resource); } #endif /* - * Utilities - */ - +* Utilities +*/ + int wxStringToFontWeight(wxString& val) { - if (val == "wxBOLD") return wxBOLD; - else if (val == "wxLIGHT") return wxLIGHT; - else return wxNORMAL; + if (val == "wxBOLD") return wxBOLD; + else if (val == "wxLIGHT") return wxLIGHT; + else return wxNORMAL; } int wxStringToFontStyle(wxString& val) { - if (val == "wxITALIC") return wxITALIC; - else if (val == "wxSLANT") return wxSLANT; - else return wxNORMAL; + if (val == "wxITALIC") return wxITALIC; + else if (val == "wxSLANT") return wxSLANT; + else return wxNORMAL; } int wxStringToFontFamily(wxString& val) { - if (val == "wxDECORATIVE") return wxDECORATIVE; - else if (val == "wxROMAN") return wxROMAN; - else if (val == "wxSCRIPT") return wxSCRIPT; - else if (val == "wxMODERN") return wxMODERN; - else if (val == "wxTELETYPE") return wxTELETYPE; - else return wxSWISS; + if (val == "wxDECORATIVE") return wxDECORATIVE; + else if (val == "wxROMAN") return wxROMAN; + else if (val == "wxSCRIPT") return wxSCRIPT; + else if (val == "wxMODERN") return wxMODERN; + else if (val == "wxTELETYPE") return wxTELETYPE; + else return wxSWISS; } /// @@ -2368,7 +2384,7 @@ int wxStringToFontFamily(wxString& val) IMPLEMENT_DYNAMIC_CLASS(wxResourceSymbolValidator, wxPropertyListValidator) wxResourceSymbolValidator::wxResourceSymbolValidator(long flags): - wxPropertyListValidator(flags) +wxPropertyListValidator(flags) { } @@ -2378,7 +2394,7 @@ wxResourceSymbolValidator::~wxResourceSymbolValidator(void) bool wxResourceSymbolValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxPropertyListView *WXUNUSED(view), wxWindow *WXUNUSED(parentWindow)) { - return TRUE; + return TRUE; } // Called when TICK is pressed or focus is lost or view wants to update @@ -2386,11 +2402,11 @@ bool wxResourceSymbolValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxP // Does the transferance from the property editing area to the property itself bool wxResourceSymbolValidator::OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *WXUNUSED(parentWindow)) { - if (!view->GetValueText()) - return FALSE; - wxString value(view->GetValueText()->GetValue()); - property->GetValue() = value ; - return TRUE; + if (!view->GetValueText()) + return FALSE; + wxString value(view->GetValueText()->GetValue()); + property->GetValue() = value ; + return TRUE; } // Called when TICK is pressed or focus is lost or view wants to update @@ -2398,108 +2414,108 @@ bool wxResourceSymbolValidator::OnRetrieveValue(wxProperty *property, wxProperty // Does the transferance from the property editing area to the property itself bool wxResourceSymbolValidator::OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *WXUNUSED(parentWindow)) { - if (!view->GetValueText()) - return FALSE; - wxString str(property->GetValue().GetStringRepresentation()); - view->GetValueText()->SetValue(str); - return TRUE; + if (!view->GetValueText()) + return FALSE; + wxString str(property->GetValue().GetStringRepresentation()); + view->GetValueText()->SetValue(str); + return TRUE; } // Called when the property is double clicked. Extra functionality can be provided, // cycling through possible values. bool wxResourceSymbolValidator::OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) { - if (!view->GetValueText()) - return FALSE; - OnEdit(property, view, parentWindow); - return TRUE; + if (!view->GetValueText()) + return FALSE; + OnEdit(property, view, parentWindow); + return TRUE; } bool wxResourceSymbolValidator::OnPrepareControls(wxProperty *WXUNUSED(property), wxPropertyListView *view, wxWindow *WXUNUSED(parentWindow)) { - if (view->GetConfirmButton()) - view->GetConfirmButton()->Enable(TRUE); - if (view->GetCancelButton()) - view->GetCancelButton()->Enable(TRUE); - if (view->GetEditButton()) - view->GetEditButton()->Enable(TRUE); - if (view->GetValueText()) - view->GetValueText()->Enable((GetFlags() & wxPROP_ALLOW_TEXT_EDITING) == wxPROP_ALLOW_TEXT_EDITING); - return TRUE; + if (view->GetConfirmButton()) + view->GetConfirmButton()->Enable(TRUE); + if (view->GetCancelButton()) + view->GetCancelButton()->Enable(TRUE); + if (view->GetEditButton()) + view->GetEditButton()->Enable(TRUE); + if (view->GetValueText()) + view->GetValueText()->Enable((GetFlags() & wxPROP_ALLOW_TEXT_EDITING) == wxPROP_ALLOW_TEXT_EDITING); + return TRUE; } void wxResourceSymbolValidator::OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow) { - if (!view->GetValueText()) - return; - - wxResourceSymbolDialog* dialog = new wxResourceSymbolDialog(parentWindow, -1, "Edit Symbol"); - - // Split name/id pair e.g. "IDC_TEXT=123" - wxString value(property->GetValue().StringValue()); - - wxString strName = value.Before('='); - wxString strId = value.After('='); - - dialog->SetSymbol(strName); - dialog->SetId(atoi(strId)); - - dialog->Init(); - - if (dialog->ShowModal() == wxID_OK) - { - wxString symbolName(dialog->GetSymbol()); - long id = dialog->GetId(); - - wxString str; - str.Printf("%d", id); - property->GetValue() = symbolName + wxString("=") + str; - - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - } - // Moved from the 'if' branch on suggestion of Roman Pavlov - dialog->Destroy(); + if (!view->GetValueText()) + return; + + wxResourceSymbolDialog* dialog = new wxResourceSymbolDialog(parentWindow, -1, "Edit Symbol"); + + // Split name/id pair e.g. "IDC_TEXT=123" + wxString value(property->GetValue().StringValue()); + + wxString strName = value.Before('='); + wxString strId = value.After('='); + + dialog->SetSymbol(strName); + dialog->SetId(atoi(strId)); + + dialog->Init(); + + if (dialog->ShowModal() == wxID_OK) + { + wxString symbolName(dialog->GetSymbol()); + long id = dialog->GetId(); + + wxString str; + str.Printf("%d", id); + property->GetValue() = symbolName + wxString("=") + str; + + view->DisplayProperty(property); + view->UpdatePropertyDisplayInList(property); + view->OnPropertyChanged(property); + } + // Moved from the 'if' branch on suggestion of Roman Pavlov + dialog->Destroy(); } BEGIN_EVENT_TABLE(wxResourceSymbolDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxResourceSymbolDialog::OnOK) - EVT_COMBOBOX(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnComboBoxSelect) - EVT_TEXT(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnSymbolNameUpdate) +EVT_BUTTON(wxID_OK, wxResourceSymbolDialog::OnOK) +EVT_COMBOBOX(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnComboBoxSelect) +EVT_TEXT(ID_SYMBOLNAME_COMBOBOX, wxResourceSymbolDialog::OnSymbolNameUpdate) END_EVENT_TABLE() wxResourceSymbolDialog::wxResourceSymbolDialog(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos, - const wxSize& size, long style): - wxDialog(parent, id, title, pos, size, style) + const wxSize& size, long style): +wxDialog(parent, id, title, pos, size, style) { int x = 5; int y = 5; - + (void) new wxStaticText(this, -1, "Name: ", wxPoint(x, y)); - + x += 80; - + m_nameCtrl = new wxComboBox(this, ID_SYMBOLNAME_COMBOBOX, "", wxPoint(x, y), wxSize(200, -1), 0, NULL, wxCB_DROPDOWN|wxCB_SORT); - + y += 30; x = 5; - + (void) new wxStaticText(this, -1, "Id: ", wxPoint(x, y)); - + x += 80; - + m_idCtrl = new wxTextCtrl(this, ID_SYMBOLID_TEXTCTRL, "", wxPoint(x, y), wxSize(200, -1)); - + y += 30; x = 5; (void) new wxButton(this, wxID_OK, "OK", wxPoint(x, y), wxSize(80, -1)); - + x += 100; (void) new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(x, y), wxSize(80, -1)); - + Fit(); Centre(); } @@ -2508,10 +2524,10 @@ void wxResourceSymbolDialog::Init() { wxString defaultId; defaultId.Printf("%ld", m_symbolId); - + m_nameCtrl->SetValue(m_symbolName); m_idCtrl->SetValue(defaultId); - + wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().FillComboBox(m_nameCtrl); } @@ -2528,7 +2544,7 @@ bool wxResourceSymbolDialog::CheckValues() wxString nameStr(m_nameCtrl->GetValue()); wxString idStr(m_idCtrl->GetValue()); int id = atoi(idStr); - + if (id <= 0 ) { wxMessageBox("Identifier cannot be missing or zero", "Dialog Editor", wxOK|wxICON_EXCLAMATION, this); @@ -2555,7 +2571,7 @@ bool wxResourceSymbolDialog::CheckValues() return FALSE; } // TODO: other checks on the name syntax. - + if (!wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(nameStr)) { // If we change the id for an existing symbol, we need to: @@ -2563,23 +2579,23 @@ bool wxResourceSymbolDialog::CheckValues() // If so, will need to change their id to the new id, in SetProperty. // 2) Remove the old symbol, add the new symbol. // In this check, we don't have to do this, but we need to do it in SetProperty. - + if (nameStr == GetSymbol() && id != GetId()) { // It's OK to change the id. But we'll need to change all matching ids in all resources, // in SetProperty. } - + // If we change the name but not the id... we'll just need to remove and // re-add the symbol/id pair, in SetProperty. if (nameStr != GetSymbol() && id == GetId()) { } - + // What if we're changing both the name and the id? // - if there's no symbol of that name, just remove the old, add the new (in SetProperty) // - if there is a symbol of that name, if id matches, do nothing. If not, veto. - + if (nameStr != GetSymbol() && id != GetId()) { if (!wxResourceManager::GetCurrentResourceManager()->IsIdentifierOK(nameStr, id)) @@ -2589,12 +2605,12 @@ bool wxResourceSymbolDialog::CheckValues() return FALSE; } } - + } - + SetSymbol(nameStr); SetId(id); - + return TRUE; } diff --git a/utils/dialoged/src/winprop.h b/utils/dialoged/src/winprop.h index 27d1ea5a61..c94458aa79 100644 --- a/utils/dialoged/src/winprop.h +++ b/utils/dialoged/src/winprop.h @@ -28,9 +28,9 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); ~wxDialogEditorPropertyListFrame(); - + wxPropertyInfo* GetInfo() const { return m_propInfo; } - + private: wxPropertySheet* m_propSheet; wxPropertyValidatorRegistry m_registry; @@ -41,17 +41,17 @@ private: // feedback. class wxResourcePropertyListView: public wxPropertyListView { - public: - wxResourcePropertyListView(wxPropertyInfo *info, wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT): - wxPropertyListView(propPanel, flags) - { - m_propertyInfo = info; - } - void OnPropertyChanged(wxProperty *property); - bool OnClose(void); - - wxPropertyInfo* m_propertyInfo; - +public: + wxResourcePropertyListView(wxPropertyInfo *info, wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT): + wxPropertyListView(propPanel, flags) + { + m_propertyInfo = info; + } + void OnPropertyChanged(wxProperty *property); + bool OnClose(void); + + wxPropertyInfo* m_propertyInfo; + }; // Generic class for relating an object to a collection of properties. @@ -61,294 +61,294 @@ class wxResourcePropertyListView: public wxPropertyListView class wxPropertyInfo: public wxObject { friend class wxDialogEditorPropertyListFrame; - protected: - static wxWindow *sm_propertyWindow; - wxPropertyInfo(void) - { - } - ~wxPropertyInfo(void) - { - } - public: - virtual wxProperty *GetProperty(wxString& propName) = 0; - virtual bool SetProperty(wxString& propName, wxProperty *property) = 0; - virtual void GetPropertyNames(wxStringList& names) = 0; - virtual bool Edit(wxWindow *parent, const wxString& title); - static void CloseWindow(); // Close the current window if open. +protected: + static wxWindow *sm_propertyWindow; + wxPropertyInfo(void) + { + } + ~wxPropertyInfo(void) + { + } +public: + virtual wxProperty *GetProperty(wxString& propName) = 0; + virtual bool SetProperty(wxString& propName, wxProperty *property) = 0; + virtual void GetPropertyNames(wxStringList& names) = 0; + virtual bool Edit(wxWindow *parent, const wxString& title); + static void CloseWindow(); // Close the current window if open. }; // For all windows class wxWindowPropertyInfo: public wxPropertyInfo { - public: - wxWindowPropertyInfo(wxWindow *win, wxItemResource *res = NULL); - ~wxWindowPropertyInfo(void); - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - - inline void SetPropertyWindow(wxWindow *win) { m_propertyWindow = win; } - - inline void SetResource(wxItemResource *res) { m_propertyResource = res; } - - // Helper functions for font properties - - wxProperty *GetFontProperty(wxString& name, wxFont *font); - wxFont *SetFontProperty(wxString& name, wxProperty *property, wxFont *oldFont); - - // Fill in the wxItemResource members to mirror the current window settings - virtual bool InstantiateResource(wxItemResource *resource); - - // Set the window style - void SetWindowStyle(wxWindow* win, long style, bool set); - - wxWindow* GetWindow() const { return m_propertyWindow; } - wxItemResource* GetResource() const { return m_propertyResource; } - - protected: - wxWindow* m_propertyWindow; - wxItemResource* m_propertyResource; +public: + wxWindowPropertyInfo(wxWindow *win, wxItemResource *res = NULL); + ~wxWindowPropertyInfo(void); + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + + inline void SetPropertyWindow(wxWindow *win) { m_propertyWindow = win; } + + inline void SetResource(wxItemResource *res) { m_propertyResource = res; } + + // Helper functions for font properties + + wxProperty *GetFontProperty(wxString& name, wxFont *font); + wxFont *SetFontProperty(wxString& name, wxProperty *property, wxFont *oldFont); + + // Fill in the wxItemResource members to mirror the current window settings + virtual bool InstantiateResource(wxItemResource *resource); + + // Set the window style + void SetWindowStyle(wxWindow* win, long style, bool set); + + wxWindow* GetWindow() const { return m_propertyWindow; } + wxItemResource* GetResource() const { return m_propertyResource; } + +protected: + wxWindow* m_propertyWindow; + wxItemResource* m_propertyResource; }; // For panel items class wxItemPropertyInfo: public wxWindowPropertyInfo { - protected: - public: - wxItemPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxWindowPropertyInfo(win, res) {} - ~wxItemPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxItemPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxWindowPropertyInfo(win, res) {} + ~wxItemPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For buttons class wxButtonPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) { } - ~wxButtonPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) { } + ~wxButtonPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For bitmap buttons class wxBitmapButtonPropertyInfo: public wxButtonPropertyInfo { - protected: - public: - wxBitmapButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxButtonPropertyInfo(win, res) { } - ~wxBitmapButtonPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxBitmapButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxButtonPropertyInfo(win, res) { } + ~wxBitmapButtonPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For static text controls class wxStaticTextPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxStaticTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) { } - ~wxStaticTextPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxStaticTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) { } + ~wxStaticTextPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For static bitmap controls class wxStaticBitmapPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxStaticBitmapPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) { } - ~wxStaticBitmapPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxStaticBitmapPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) { } + ~wxStaticBitmapPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For text/multitext items class wxTextPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxTextPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxTextPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxTextPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For list boxes class wxListBoxPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxListBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxListBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxListBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxListBoxPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For choice items class wxChoicePropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxChoicePropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxChoicePropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxChoicePropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxChoicePropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For choice items class wxComboBoxPropertyInfo: public wxChoicePropertyInfo { - protected: - public: - wxComboBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxChoicePropertyInfo(win, res) {} - ~wxComboBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxComboBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxChoicePropertyInfo(win, res) {} + ~wxComboBoxPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For radiobox items class wxRadioBoxPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxRadioBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxRadioBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxRadioBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxRadioBoxPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For groupbox items class wxGroupBoxPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxGroupBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxGroupBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxGroupBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxGroupBoxPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For checkbox items class wxCheckBoxPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxCheckBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxCheckBoxPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxCheckBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxCheckBoxPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For radiobutton items class wxRadioButtonPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxRadioButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxRadioButtonPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxRadioButtonPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxRadioButtonPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For gauge items class wxGaugePropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxGaugePropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxGaugePropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxGaugePropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxGaugePropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For scrollbar items class wxScrollBarPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxScrollBarPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxScrollBarPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxScrollBarPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxScrollBarPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For slider items class wxSliderPropertyInfo: public wxItemPropertyInfo { - protected: - public: - wxSliderPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxItemPropertyInfo(win, res) {} - ~wxSliderPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); +protected: +public: + wxSliderPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxItemPropertyInfo(win, res) {} + ~wxSliderPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); }; // For panels class wxPanelPropertyInfo: public wxWindowPropertyInfo { - protected: - public: - wxPanelPropertyInfo(wxWindow *win, wxItemResource *res = NULL): - wxWindowPropertyInfo(win, res) {} - ~wxPanelPropertyInfo(void) {} - wxProperty *GetProperty(wxString& name); - bool SetProperty(wxString& name, wxProperty *property); - void GetPropertyNames(wxStringList& names); - bool InstantiateResource(wxItemResource *resource); - - // Convert this dialog, and its children, to or from dialog units - void ConvertDialogUnits(bool toDialogUnits); +protected: +public: + wxPanelPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxWindowPropertyInfo(win, res) {} + ~wxPanelPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); + + // Convert this dialog, and its children, to or from dialog units + void ConvertDialogUnits(bool toDialogUnits); }; int wxStringToFontWeight(wxString& val); @@ -356,39 +356,39 @@ int wxStringToFontStyle(wxString& val); int wxStringToFontFamily(wxString& val); /* - * A validator to allow editing symbol/id pairs - */ +* A validator to allow editing symbol/id pairs +*/ class wxResourceSymbolValidator: public wxPropertyListValidator { - DECLARE_DYNAMIC_CLASS(wxResourceSymbolValidator) - protected: - public: - wxResourceSymbolValidator(long flags = 0); - - ~wxResourceSymbolValidator(void); - - // Called when TICK is pressed or focus is lost. - // Return FALSE if value didn't check out; signal to restore old value. - bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when TICK is pressed or focus is lost or view wants to update - // the property list. - // Does the transferance from the property editing area to the property itself - bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - - // Called when the edit (...) button is pressed. - void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); + DECLARE_DYNAMIC_CLASS(wxResourceSymbolValidator) +protected: +public: + wxResourceSymbolValidator(long flags = 0); + + ~wxResourceSymbolValidator(void); + + // Called when TICK is pressed or focus is lost. + // Return FALSE if value didn't check out; signal to restore old value. + bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); + + // Called when TICK is pressed or focus is lost or view wants to update + // the property list. + // Does the transferance from the property editing area to the property itself + bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); + bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); + + bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); + + bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); + + // Called when the edit (...) button is pressed. + void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); }; /* - * A dialog for editing symbol/id pairs - */ +* A dialog for editing symbol/id pairs +*/ class wxResourceSymbolDialog: public wxDialog { @@ -396,31 +396,31 @@ public: wxResourceSymbolDialog(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL); - + void Init(); - + inline void SetSymbol(const wxString& symbol) { m_symbolName = symbol; } inline void SetId(long id) { m_symbolId = id; } - + inline wxString GetSymbol() const { return m_symbolName; } inline long GetId() const { return m_symbolId; } - + bool CheckValues(); void OnOK(wxCommandEvent& event); void OnComboBoxSelect(wxCommandEvent& event); void OnSymbolNameUpdate(wxCommandEvent& event); - + protected: wxString m_symbolName; long m_symbolId; wxComboBox* m_nameCtrl; wxTextCtrl* m_idCtrl; - -DECLARE_EVENT_TABLE() + + DECLARE_EVENT_TABLE() }; #define ID_SYMBOLNAME_COMBOBOX 100 #define ID_SYMBOLID_TEXTCTRL 101 #endif - // _WINPROP_H_ +// _WINPROP_H_ diff --git a/utils/dialoged/src/winstyle.cpp b/utils/dialoged/src/winstyle.cpp index 47b5e92f93..b0b1dae327 100644 --- a/utils/dialoged/src/winstyle.cpp +++ b/utils/dialoged/src/winstyle.cpp @@ -32,244 +32,245 @@ #include "winstyle.h" /* - * Styles - */ +* Styles +*/ - /* wxListBox */ +/* wxListBox */ static wxWindowStylePair g_WindowStylesListBox[] = { - { "wxLB_SINGLE", wxLB_SINGLE }, - { "wxLB_MULTIPLE", wxLB_MULTIPLE }, - { "wxLB_EXTENDED", wxLB_EXTENDED }, - { "wxLB_NEEDED_SB", wxLB_NEEDED_SB }, - { "wxLB_ALWAYS_SB", wxLB_ALWAYS_SB }, - { "wxLB_SORT", wxLB_SORT }, - { "wxLB_OWNERDRAW", wxLB_OWNERDRAW }, - { "wxLB_HSCROLL", wxLB_HSCROLL } + { "wxLB_SINGLE", wxLB_SINGLE }, + { "wxLB_MULTIPLE", wxLB_MULTIPLE }, + { "wxLB_EXTENDED", wxLB_EXTENDED }, + { "wxLB_NEEDED_SB", wxLB_NEEDED_SB }, + { "wxLB_ALWAYS_SB", wxLB_ALWAYS_SB }, + { "wxLB_SORT", wxLB_SORT }, + { "wxLB_OWNERDRAW", wxLB_OWNERDRAW }, + { "wxLB_HSCROLL", wxLB_HSCROLL } }; int g_WindowStylesListBoxCount = sizeof(g_WindowStylesListBox)/sizeof(wxWindowStylePair) ; - - /* wxComboxBox */ + +/* wxComboxBox */ static wxWindowStylePair g_WindowStylesComboBox[] = { - { "wxCB_SIMPLE", wxCB_SIMPLE }, - { "wxCB_DROPDOWN", wxCB_DROPDOWN }, - { "wxCB_READONLY", wxCB_READONLY }, - { "wxCB_SORT", wxCB_SORT } + { "wxCB_SIMPLE", wxCB_SIMPLE }, + { "wxCB_DROPDOWN", wxCB_DROPDOWN }, + { "wxCB_READONLY", wxCB_READONLY }, + { "wxCB_SORT", wxCB_SORT } }; int g_WindowStylesComboBoxCount = sizeof(g_WindowStylesComboBox)/sizeof(wxWindowStylePair) ; #if 0 - /* wxChoice */ +/* wxChoice */ static wxWindowStylePair g_WindowStylesChoice[] = { }; int g_WindowStylesChoiceCount = sizeof(g_WindowStylesChoice)/sizeof(wxWindowStylePair) ; #endif - - /* wxGauge */ + +/* wxGauge */ static wxWindowStylePair g_WindowStylesGauge[] = { - { "wxGA_PROGRESSBAR", wxGA_PROGRESSBAR }, - { "wxGA_HORIZONTAL", wxGA_HORIZONTAL }, - { "wxGA_VERTICAL", wxGA_VERTICAL } + { "wxGA_PROGRESSBAR", wxGA_PROGRESSBAR }, + { "wxGA_HORIZONTAL", wxGA_HORIZONTAL }, + { "wxGA_VERTICAL", wxGA_VERTICAL } }; int g_WindowStylesGaugeCount = sizeof(g_WindowStylesGauge)/sizeof(wxWindowStylePair) ; - /* wxTextCtrl */ +/* wxTextCtrl */ static wxWindowStylePair g_WindowStylesTextCtrl[] = { -// { "wxPASSWORD", wxPASSWORD}, -// { "wxPROCESS_ENTER", wxPROCESS_ENTER}, - { "wxTE_PASSWORD", wxTE_PASSWORD}, - { "wxTE_READONLY", wxTE_READONLY}, - { "wxTE_PROCESS_ENTER", wxTE_PROCESS_ENTER}, - { "wxTE_MULTILINE", wxTE_MULTILINE} + // { "wxPASSWORD", wxPASSWORD}, + // { "wxPROCESS_ENTER", wxPROCESS_ENTER}, + { "wxTE_PASSWORD", wxTE_PASSWORD}, + { "wxTE_READONLY", wxTE_READONLY}, + { "wxTE_PROCESS_ENTER", wxTE_PROCESS_ENTER}, + { "wxTE_MULTILINE", wxTE_MULTILINE} }; int g_WindowStylesTextCtrlCount = sizeof(g_WindowStylesTextCtrl)/sizeof(wxWindowStylePair) ; - /* wxRadioButton */ +/* wxRadioButton */ static wxWindowStylePair g_WindowStylesRadioButton[] = { - { "wxRB_GROUP", wxRB_GROUP } + { "wxRB_GROUP", wxRB_GROUP } }; int g_WindowStylesRadioButtonCount = sizeof(g_WindowStylesRadioButton)/sizeof(wxWindowStylePair) ; - /* wxRadioBox */ +/* wxRadioBox */ static wxWindowStylePair g_WindowStylesRadioBox[] = { - { "wxRA_SPECIFY_COLS", wxRA_SPECIFY_COLS }, - { "wxRA_SPECIFY_ROWS", wxRA_SPECIFY_ROWS } -/* - , - { "wxRA_HORIZONTAL", wxRA_HORIZONTAL }, - { "wxRA_VERTICAL", wxRA_VERTICAL } -*/ + { "wxRA_SPECIFY_COLS", wxRA_SPECIFY_COLS }, + { "wxRA_SPECIFY_ROWS", wxRA_SPECIFY_ROWS } + /* + , + { "wxRA_HORIZONTAL", wxRA_HORIZONTAL }, + { "wxRA_VERTICAL", wxRA_VERTICAL } + */ }; int g_WindowStylesRadioBoxCount = sizeof(g_WindowStylesRadioBox)/sizeof(wxWindowStylePair) ; - /* wxSlider */ +/* wxSlider */ static wxWindowStylePair g_WindowStylesSlider[] = { - { "wxSL_HORIZONTAL", wxSL_HORIZONTAL }, - { "wxSL_VERTICAL", wxSL_VERTICAL }, - { "wxSL_AUTOTICKS", wxSL_AUTOTICKS }, - { "wxSL_LABELS", wxSL_LABELS }, - { "wxSL_LEFT", wxSL_LEFT }, - { "wxSL_TOP", wxSL_TOP }, - { "wxSL_RIGHT", wxSL_RIGHT }, - { "wxSL_BOTTOM", wxSL_BOTTOM }, - { "wxSL_BOTH", wxSL_BOTH }, - { "wxSL_SELRANGE", wxSL_SELRANGE } + { "wxSL_HORIZONTAL", wxSL_HORIZONTAL }, + { "wxSL_VERTICAL", wxSL_VERTICAL }, + { "wxSL_AUTOTICKS", wxSL_AUTOTICKS }, + { "wxSL_LABELS", wxSL_LABELS }, + { "wxSL_LEFT", wxSL_LEFT }, + { "wxSL_TOP", wxSL_TOP }, + { "wxSL_RIGHT", wxSL_RIGHT }, + { "wxSL_BOTTOM", wxSL_BOTTOM }, + { "wxSL_BOTH", wxSL_BOTH }, + { "wxSL_SELRANGE", wxSL_SELRANGE } }; int g_WindowStylesSliderCount = sizeof(g_WindowStylesSlider)/sizeof(wxWindowStylePair) ; - /* wxScrollBar */ +/* wxScrollBar */ static wxWindowStylePair g_WindowStylesScrollBar[] = { - { "wxSB_HORIZONTAL", wxSB_HORIZONTAL }, - { "wxSB_VERTICAL", wxSB_VERTICAL } + { "wxSB_HORIZONTAL", wxSB_HORIZONTAL }, + { "wxSB_VERTICAL", wxSB_VERTICAL } }; int g_WindowStylesScrollBarCount = sizeof(g_WindowStylesScrollBar)/sizeof(wxWindowStylePair) ; - /* wxButton */ +/* wxButton */ static wxWindowStylePair g_WindowStylesButton[] = { - { "wxBU_AUTODRAW", wxBU_AUTODRAW }, - { "wxBU_NOAUTODRAW", wxBU_NOAUTODRAW } + { "wxBU_AUTODRAW", wxBU_AUTODRAW }, + { "wxBU_NOAUTODRAW", wxBU_NOAUTODRAW } }; int g_WindowStylesButtonCount = sizeof(g_WindowStylesButton)/sizeof(wxWindowStylePair) ; - /* wxTreeCtrl */ +/* wxTreeCtrl */ static wxWindowStylePair g_WindowStylesTreeCtrl[] = { - { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS }, - { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS }, - { "wxTR_LINES_AT_ROOT", wxTR_LINES_AT_ROOT } + { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS }, + { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS }, + { "wxTR_LINES_AT_ROOT", wxTR_LINES_AT_ROOT } }; int g_WindowStylesTreeCtrlCount = sizeof(g_WindowStylesTreeCtrl)/sizeof(wxWindowStylePair) ; - /* wxListCtrl */ +/* wxListCtrl */ static wxWindowStylePair g_WindowStylesListCtrl[] = { - { "wxLC_ICON", wxLC_ICON }, - { "wxLC_SMALL_ICON", wxLC_SMALL_ICON }, - { "wxLC_LIST", wxLC_LIST }, - { "wxLC_REPORT", wxLC_REPORT }, - { "wxLC_ALIGN_TOP", wxLC_ALIGN_TOP }, - { "wxLC_ALIGN_LEFT", wxLC_ALIGN_LEFT }, - { "wxLC_AUTOARRANGE", wxLC_AUTOARRANGE }, - { "wxLC_USER_TEXT", wxLC_USER_TEXT }, - { "wxLC_EDIT_LABELS", wxLC_EDIT_LABELS }, - { "wxLC_NO_HEADER", wxLC_NO_HEADER }, - { "wxLC_NO_SORT_HEADER", wxLC_NO_SORT_HEADER }, - { "wxLC_SINGLE_SEL", wxLC_SINGLE_SEL }, - { "wxLC_SORT_ASCENDING", wxLC_SORT_ASCENDING }, - { "wxLC_SORT_DESCENDING", wxLC_SORT_DESCENDING } + { "wxLC_ICON", wxLC_ICON }, + { "wxLC_SMALL_ICON", wxLC_SMALL_ICON }, + { "wxLC_LIST", wxLC_LIST }, + { "wxLC_REPORT", wxLC_REPORT }, + { "wxLC_ALIGN_TOP", wxLC_ALIGN_TOP }, + { "wxLC_ALIGN_LEFT", wxLC_ALIGN_LEFT }, + { "wxLC_AUTOARRANGE", wxLC_AUTOARRANGE }, + { "wxLC_USER_TEXT", wxLC_USER_TEXT }, + { "wxLC_EDIT_LABELS", wxLC_EDIT_LABELS }, + { "wxLC_NO_HEADER", wxLC_NO_HEADER }, + { "wxLC_NO_SORT_HEADER", wxLC_NO_SORT_HEADER }, + { "wxLC_SINGLE_SEL", wxLC_SINGLE_SEL }, + { "wxLC_SORT_ASCENDING", wxLC_SORT_ASCENDING }, + { "wxLC_SORT_DESCENDING", wxLC_SORT_DESCENDING } }; int g_WindowStylesListCtrlCount = sizeof(g_WindowStylesListCtrl)/sizeof(wxWindowStylePair) ; - /* wxSpinButton */ +/* wxSpinButton */ static wxWindowStylePair g_WindowStylesSpinButton[] = { - { "wxSP_VERTICAL", wxSP_VERTICAL}, - { "wxSP_HORIZONTAL", wxSP_HORIZONTAL}, - { "wxSP_ARROW_KEYS", wxSP_ARROW_KEYS}, - { "wxSP_WRAP", wxSP_WRAP} + { "wxSP_VERTICAL", wxSP_VERTICAL}, + { "wxSP_HORIZONTAL", wxSP_HORIZONTAL}, + { "wxSP_ARROW_KEYS", wxSP_ARROW_KEYS}, + { "wxSP_WRAP", wxSP_WRAP} }; int g_WindowStylesSpinButtonCount = sizeof(g_WindowStylesSpinButton)/sizeof(wxWindowStylePair) ; - /* wxSplitterWindow */ +/* wxSplitterWindow */ static wxWindowStylePair g_WindowStylesSplitterWindow[] = { - { "wxSP_NOBORDER", wxSP_NOBORDER}, - { "wxSP_3D", wxSP_3D}, - { "wxSP_BORDER", wxSP_BORDER} + { "wxSP_NOBORDER", wxSP_NOBORDER}, + { "wxSP_3D", wxSP_3D}, + { "wxSP_BORDER", wxSP_BORDER} }; int g_WindowStylesSplitterWindowCount = sizeof(g_WindowStylesSplitterWindow)/sizeof(wxWindowStylePair) ; - /* wxTabCtrl */ +/* wxTabCtrl */ static wxWindowStylePair g_WindowStylesTabCtrl[] = { - { "wxTC_MULTILINE", wxTC_MULTILINE}, - { "wxTC_RIGHTJUSTIFY", wxTC_RIGHTJUSTIFY}, - { "wxTC_FIXEDWIDTH", wxTC_FIXEDWIDTH}, - { "wxTC_OWNERDRAW", wxTC_OWNERDRAW} + { "wxTC_MULTILINE", wxTC_MULTILINE}, + { "wxTC_RIGHTJUSTIFY", wxTC_RIGHTJUSTIFY}, + { "wxTC_FIXEDWIDTH", wxTC_FIXEDWIDTH}, + { "wxTC_OWNERDRAW", wxTC_OWNERDRAW} }; int g_WindowStylesTabCtrlCount = sizeof(g_WindowStylesTabCtrl)/sizeof(wxWindowStylePair) ; - /* wxStatusBar95 */ +/* wxStatusBar95 */ static wxWindowStylePair g_WindowStylesStatusBar[] = { - { "wxST_SIZEGRIP", wxST_SIZEGRIP} + { "wxST_SIZEGRIP", wxST_SIZEGRIP} }; int g_WindowStylesStatusBarCount = sizeof(g_WindowStylesStatusBar)/sizeof(wxWindowStylePair) ; - /* wxControl */ +/* wxControl */ static wxWindowStylePair g_WindowStylesControl[] = { - { "wxFIXED_LENGTH", wxFIXED_LENGTH}, - { "wxALIGN_LEFT", wxALIGN_LEFT}, - { "wxALIGN_CENTRE", wxALIGN_CENTRE}, - { "wxALIGN_RIGHT", wxALIGN_RIGHT}, - { "wxCOLOURED", wxCOLOURED} + { "wxFIXED_LENGTH", wxFIXED_LENGTH}, + { "wxALIGN_LEFT", wxALIGN_LEFT}, + { "wxALIGN_CENTRE", wxALIGN_CENTRE}, + { "wxALIGN_RIGHT", wxALIGN_RIGHT}, + { "wxCOLOURED", wxCOLOURED} }; int g_WindowStylesControlCount = sizeof(g_WindowStylesControl)/sizeof(wxWindowStylePair) ; - - /* wxToolBar */ + +/* wxToolBar */ static wxWindowStylePair g_WindowStylesToolBar[] = { - { "wxTB_3DBUTTONS", wxTB_3DBUTTONS}, - { "wxTB_HORIZONTAL", wxTB_HORIZONTAL}, - { "wxTB_VERTICAL", wxTB_VERTICAL}, - { "wxTB_FLAT", wxTB_FLAT} + { "wxTB_3DBUTTONS", wxTB_3DBUTTONS}, + { "wxTB_HORIZONTAL", wxTB_HORIZONTAL}, + { "wxTB_VERTICAL", wxTB_VERTICAL}, + { "wxTB_FLAT", wxTB_FLAT} }; int g_WindowStylesToolBarCount = sizeof(g_WindowStylesToolBar)/sizeof(wxWindowStylePair) ; - /* Frame/dialog */ +/* Frame/dialog */ static wxWindowStylePair g_WindowStylesDialog[] = { - { "wxSTAY_ON_TOP", wxSTAY_ON_TOP}, - { "wxCAPTION", wxCAPTION}, - { "wxICONIZE", wxICONIZE}, - { "wxMINIMIZE", wxICONIZE}, - { "wxMAXIMIZE", wxMAXIMIZE}, - { "wxTHICK_FRAME", wxTHICK_FRAME}, - { "wxRESIZE_BORDER", wxRESIZE_BORDER}, - { "wxSYSTEM_MENU", wxSYSTEM_MENU}, - { "wxMINIMIZE_BOX", wxMINIMIZE_BOX}, - { "wxMAXIMIZE_BOX", wxMAXIMIZE_BOX}, - { "wxRESIZE_BOX", wxRESIZE_BOX} + { "wxSTAY_ON_TOP", wxSTAY_ON_TOP}, + { "wxCAPTION", wxCAPTION}, + { "wxICONIZE", wxICONIZE}, + { "wxMINIMIZE", wxICONIZE}, + { "wxMAXIMIZE", wxMAXIMIZE}, + { "wxTHICK_FRAME", wxTHICK_FRAME}, + { "wxRESIZE_BORDER", wxRESIZE_BORDER}, + { "wxSYSTEM_MENU", wxSYSTEM_MENU}, + { "wxMINIMIZE_BOX", wxMINIMIZE_BOX}, + { "wxMAXIMIZE_BOX", wxMAXIMIZE_BOX}, + { "wxDIALOG_MODAL", wxDIALOG_MODAL}, + { "wxRESIZE_BOX", wxRESIZE_BOX} }; int g_WindowStylesDialogCount = sizeof(g_WindowStylesDialog)/sizeof(wxWindowStylePair) ; - /* Generic */ +/* Generic */ static wxWindowStylePair g_WindowStylesWindow[] = { - { "wxBORDER", wxBORDER}, - { "wxDOUBLE_BORDER", wxDOUBLE_BORDER}, - { "wxSUNKEN_BORDER", wxSUNKEN_BORDER}, - { "wxRAISED_BORDER", wxRAISED_BORDER}, - { "wxSIMPLE_BORDER", wxSIMPLE_BORDER}, - { "wxSTATIC_BORDER", wxSTATIC_BORDER}, - { "wxTRANSPARENT_WINDOW", wxTRANSPARENT_WINDOW}, - { "wxNO_BORDER", wxNO_BORDER}, - { "wxCLIP_CHILDREN", wxCLIP_CHILDREN} - -/* Would be duplicated with e.g. wxLB_HSCROLL - { "wxVSCROLL", wxVSCROLL }, - { "wxHSCROLL", wxHSCROLL } -*/ + { "wxBORDER", wxBORDER}, + { "wxDOUBLE_BORDER", wxDOUBLE_BORDER}, + { "wxSUNKEN_BORDER", wxSUNKEN_BORDER}, + { "wxRAISED_BORDER", wxRAISED_BORDER}, + { "wxSIMPLE_BORDER", wxSIMPLE_BORDER}, + { "wxSTATIC_BORDER", wxSTATIC_BORDER}, + { "wxTRANSPARENT_WINDOW", wxTRANSPARENT_WINDOW}, + { "wxNO_BORDER", wxNO_BORDER}, + { "wxCLIP_CHILDREN", wxCLIP_CHILDREN} + + /* Would be duplicated with e.g. wxLB_HSCROLL + { "wxVSCROLL", wxVSCROLL }, + { "wxHSCROLL", wxHSCROLL } + */ }; int g_WindowStylesWindowCount = sizeof(g_WindowStylesWindow)/sizeof(wxWindowStylePair) ; /* - * A table holding all class style objects - */ +* A table holding all class style objects +*/ wxWindowStyleTable::wxWindowStyleTable(): - m_classes(wxKEY_STRING) +m_classes(wxKEY_STRING) { } @@ -294,7 +295,7 @@ void wxWindowStyleTable::Init() AddStyles("wxSlider", g_WindowStylesSliderCount, g_WindowStylesSlider); AddStyles("wxGauge", g_WindowStylesGaugeCount, g_WindowStylesGauge); AddStyles("wxComboBox", g_WindowStylesComboBoxCount, g_WindowStylesComboBox); -// AddStyles("wxChoice", g_WindowStylesChoice, g_WindowStylesChoice); + // AddStyles("wxChoice", g_WindowStylesChoice, g_WindowStylesChoice); AddStyles("wxScrollBar", g_WindowStylesScrollBarCount, g_WindowStylesScrollBar); } @@ -334,25 +335,25 @@ bool wxWindowStyleTable::GenerateStyleStrings(const wxString& className, long wi wxWindowStyleClass* styleClass = FindClass(className); if (!styleClass) return FALSE; - + styleClass->GenerateStyleStrings(windowStyle, buf); return TRUE; } /* - * Holds all the styles for a particular class - */ +* Holds all the styles for a particular class +*/ wxWindowStyleClass::wxWindowStyleClass(int n, wxWindowStylePair *styles) { m_styleCount = n; m_styles = styles; -/* + /* m_styles = new wxWindowStylePair[n]; int i; for (i = 0; i < n; i++) - m_styles[i] = styles[i]; -*/ + m_styles[i] = styles[i]; + */ } wxWindowStyleClass::~wxWindowStyleClass() @@ -371,15 +372,15 @@ bool wxWindowStyleClass::GenerateStyle(char *buf, long windowStyle, long flag, c // Ignore zero flags if (flag == 0) return TRUE; - - if ((windowStyle & flag) == flag) - { - if (strlen(buf) > 0) - strcat(buf, " | "); - strcat(buf, (const char*) strStyle); - return TRUE; - } - else - return FALSE; + + if ((windowStyle & flag) == flag) + { + if (strlen(buf) > 0) + strcat(buf, " | "); + strcat(buf, (const char*) strStyle); + return TRUE; + } + else + return FALSE; } diff --git a/utils/dialoged/src/winstyle.h b/utils/dialoged/src/winstyle.h index d7aaf063f4..1f59adf01f 100644 --- a/utils/dialoged/src/winstyle.h +++ b/utils/dialoged/src/winstyle.h @@ -19,8 +19,8 @@ #include "wx/wx.h" /* - * A class for storing/generating window styles. - */ +* A class for storing/generating window styles. +*/ class wxWindowStyleClass; @@ -37,41 +37,41 @@ class wxWindowStyleTable: public wxObject public: wxWindowStyleTable(); ~wxWindowStyleTable(); - -// Operations + + // Operations void ClearTable(); void AddStyles(const wxString& className, int n, wxWindowStylePair *styles); wxWindowStyleClass* FindClass(const wxString& className) ; bool GenerateStyleStrings(const wxString& className, long windowStyle, char *buf); - + // Initialise with all possible styles void Init(); - -// Members + + // Members protected: wxList m_classes; // A list of wxWindowStyleClass objects, indexed by class name - + }; /* - * Classes for storing all the window style identifiers associated with a particular class - */ +* Classes for storing all the window style identifiers associated with a particular class +*/ class wxWindowStyleClass: public wxObject { public: wxWindowStyleClass(int n, wxWindowStylePair *styles); ~wxWindowStyleClass(); - -// Operations + + // Operations void GenerateStyleStrings(long windowStyle, char *buf); bool GenerateStyle(char *buf, long windowStyle, long flag, const wxString& strStyle); - -// Members + + // Members protected: wxWindowStylePair* m_styles; // An array of wxWindowStylePair objects int m_styleCount; }; #endif - // _DE_WINSTYLE_H_ +// _DE_WINSTYLE_H_ diff --git a/utils/hhp2cached/hhp2cachedVC.dsp b/utils/hhp2cached/hhp2cachedVC.dsp new file mode 100644 index 0000000000..66ce0f722a --- /dev/null +++ b/utils/hhp2cached/hhp2cachedVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="hhp2cachedVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=hhp2cachedVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "hhp2cachedVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "hhp2cachedVC.mak" CFG="hhp2cachedVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "hhp2cachedVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "hhp2cachedVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "hhp2cachedVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "hhp2cachedVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "hhp2cachedVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/hhp2cached.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "hhp2cachedVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/hhp2cached.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "hhp2cachedVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/hhp2cached.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ELSEIF "$(CFG)" == "hhp2cachedVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/hhp2cached.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "hhp2cachedVC - Win32 Release" +# Name "hhp2cachedVC - Win32 Debug" +# Name "hhp2cachedVC - Win32 Debug DLL" +# Name "hhp2cachedVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\hhp2cached.cpp + +!IF "$(CFG)" == "hhp2cachedVC - Win32 Release" + +!ELSEIF "$(CFG)" == "hhp2cachedVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "hhp2cachedVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "hhp2cachedVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\hhp2cached.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/utils/hhp2cached/hhp2cachedVC.dsw b/utils/hhp2cached/hhp2cachedVC.dsw new file mode 100644 index 0000000000..475ccbe3fc --- /dev/null +++ b/utils/hhp2cached/hhp2cachedVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "hhp2cachedVC"=.\hhp2cachedVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/utils/makegen/makefile.g95 b/utils/makegen/makefile.g95 index ed4db1b1c3..999082cd24 100644 --- a/utils/makegen/makefile.g95 +++ b/utils/makegen/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=makegen OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/utils/makegen/templates/makefile.g95 b/utils/makegen/templates/makefile.g95 index 41e1be06fd..4783f79139 100644 --- a/utils/makegen/templates/makefile.g95 +++ b/utils/makegen/templates/makefile.g95 @@ -6,5 +6,5 @@ WXDIR = ../.. TARGET=#NAME OBJECTS = $(TARGET).o -include $(WXDIR)\src\makeprog.g95 +include $(WXDIR)/src/makeprog.g95 diff --git a/utils/projgen/makeproj.cpp b/utils/projgen/makeproj.cpp index 70aa07289b..f068b5adbd 100644 --- a/utils/projgen/makeproj.cpp +++ b/utils/projgen/makeproj.cpp @@ -293,7 +293,7 @@ void MyApp::GenerateSamples(const wxString& dir) GenerateSample("TextVC", "text", dir + wxString("/samples/text"), wxStringList("text.cpp", 0)); GenerateSample("ThreadVC", "thread", dir + wxString("/samples/thread"), wxStringList("thread.cpp", 0)); GenerateSample("ToolbarVC", "toolbar", dir + wxString("/samples/toolbar"), wxStringList("toolbar.cpp", 0)); - GenerateSample("TreectrlVC", "treectrl", dir + wxString("/samples/treectrl"), wxStringList("treectrl.cpp", "treetest.h", 0)); + GenerateSample("TreectrlVC", "treectrl", dir + wxString("/samples/treectrl"), wxStringList("treectrl.cpp", "treectrl.h", 0)); GenerateSample("TypetestVC", "typetest", dir + wxString("/samples/typetest"), wxStringList("typetest.cpp", "typetest.h", 0)); GenerateSample("ValidateVC", "validate", dir + wxString("/samples/validate"), wxStringList("validate.cpp", "validate.h", 0)); GenerateSample("ClientVC", "client", dir + wxString("/samples/sockets"), wxStringList("client.cpp", 0)); diff --git a/utils/tex2rtf/Makefile.in b/utils/tex2rtf/Makefile.in index 3e3d5388f5..6d36395442 100644 --- a/utils/tex2rtf/Makefile.in +++ b/utils/tex2rtf/Makefile.in @@ -1,7 +1,7 @@ all: - cd src; make + cd src; $(MAKE) clean: - cd src; make clean + cd src; $(MAKE) clean diff --git a/utils/tex2rtf/docs/back.gif b/utils/tex2rtf/docs/back.gif index 8a61076d3ba74bdedc1d24f60c3d1f5a361a6cee..88a3740f9134d7a569b56a9f76e6aa552672993e 100644 GIT binary patch literal 978 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7H6AG;jlf>Rey!M3TUK6P?i!m{q7|$j(iU2nb+j@t;aY#t_B`I%AGL2Z zO6>3Q?Jm>3v>|kImhI|mtHW1|tWDEBQI>amZ`s68xzaas@2+e3%;$D{>W3T0V&ot1 Q_1d}V>FF7|>?{n{02fm-00000 literal 225 zcmV<703QEGNk%v~VLt#E0Pz3-zrVld=jU&4Z(9HWEC2ui06zd20008IjE||y?GK}z zNf>~$-n{z{YJwGn=81mem9{RpmcUHc_KoNIPRH~B4DyD9p%LJl6@Sa4^Epcbno6kk zD5XxT&EQg7>t<(Iwfoo diff --git a/utils/tex2rtf/docs/contents.gif b/utils/tex2rtf/docs/contents.gif index 3dddfa3dd5f0c652e8b27cd6c29e1fdd49ced5a8..723174f81d04d16e94016186ac0322dcddb603c7 100644 GIT binary patch literal 996 zcmZ?wbhEHbbYM_m_|5kxA zV8N1xh6Z3tW&ovR5Cxe34SwPCqkp^L+21?)C@%eigo zjb6XYK{ltit-ZayK=RQZsqlw)b_u-S7xTMFKYoAy)o)vOlz%vRFz5Xto6e7mgSU6F l8>#t(=cJr!`K{OHv%&EGv6=dhWPNvSd3kw-DjN%fH2`phKPvzL literal 231 zcmVG0Pz3-zrVld=jU&4Z(9HWEC2ui06_p40008OjE||y?GK}z zO&EZ)-n{z{a)K3v=81;mmA0S4Fj_r^UyThZDG{h6k9m zHI_(7spd!5_$SH6m{NZ; wbH-jL-q~hvBDNIFUuAn+=ylY_lIO=twXW(!Y|OjPCFiqa!^6Y8%uEc{09+_1fB*mh literal 164 zcmV;V09*e@Nk%v~VI=?<0Pz3-zrVld=jU&4Z(9HWEC2ui03`qz0007gjE||y?Z1Qp zwAzdF6*A}#V%!v#-{_g@)>Q-cu3}3Ku`2^Nfa3dZ+VyHW%gtsZ`jV7k@%j8Ij}~W) zc{NUP6)X3OWa^|{8nl?rh|gZ1@{(qofnsWu+nmFHSnaq>lB41zSVC9`a)_v*xHx0L S5h*!IS!o$ynW>ps0028gDN7ju diff --git a/utils/tex2rtf/docs/tex2rtf.hpj b/utils/tex2rtf/docs/tex2rtf.hpj index b00537e2d3..bf217fa4ff 100644 --- a/utils/tex2rtf/docs/tex2rtf.hpj +++ b/utils/tex2rtf/docs/tex2rtf.hpj @@ -1,5 +1,5 @@ [OPTIONS] -BMROOT=d:\wx2\wxWind~1\utils\tex2rtf\docs ; Assume that bitmaps are where the source is +BMROOT=c:\wx2sta~1\wxWind~1\utils\tex2rtf\docs ; Assume that bitmaps are where the source is TITLE=Tex2RTF Manual CONTENTS=Contents COMPRESS=HIGH diff --git a/utils/tex2rtf/docs/tex2rtf.ini b/utils/tex2rtf/docs/tex2rtf.ini index fae52d1baf..f907369d52 100644 --- a/utils/tex2rtf/docs/tex2rtf.ini +++ b/utils/tex2rtf/docs/tex2rtf.ini @@ -13,6 +13,11 @@ listItemIndent=40 winHelpContents = yes winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95 generateHPJ = yes +;; +;; These two are for generating MS HTML Help project, contents and index files. +;; +htmlWorkshopFiles = true +htmlIndex = true htmlBrowseButtons = bitmap winHelpTitle = "Tex2RTF Manual" truncateFilenames = yes diff --git a/utils/tex2rtf/docs/tex2rtf.tex b/utils/tex2rtf/docs/tex2rtf.tex index 43b8fe5345..84bdee739e 100644 --- a/utils/tex2rtf/docs/tex2rtf.tex +++ b/utils/tex2rtf/docs/tex2rtf.tex @@ -1,5 +1,5 @@ \documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}% -\input{psbox.tex} +%\input{psbox.tex} \newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}% \newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}% \newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}% @@ -8,7 +8,7 @@ \parskip=10pt% \parindent=0pt% %\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only -\winhelpignore{\title{Manual for Tex2RTF 2.0:\\A \LaTeX\ to RTF and HTML converter}% +\winhelpignore{\title{Manual for Tex2RTF 2.0: A \LaTeX\ to RTF and HTML converter}% \author{Julian Smart}% \date{November 1999}% }% diff --git a/utils/tex2rtf/docs/up.gif b/utils/tex2rtf/docs/up.gif index 316d0d2a14b571bea2eb874efd04bfe509f53b34..870c89e80a826e3b225cc8fe9a30edf9c5a66c22 100644 GIT binary patch literal 998 zcmZ?wbhEHbbYM_m_|5fj;(a}CV`%O8V#mmmJDyQBv znOUrUdY)b7p%TfE%gtCeAWZlgxpoy|ZDMRPr_m>p rx}08pS4?)u<%PW +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Tex2RTFVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Tex2RTFVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Tex2RTFVC.mak" CFG="Tex2RTFVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Tex2RTFVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Tex2RTFVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Tex2RTFVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "Tex2RTFVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/tex2rtf.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/tex2rtf.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/tex2rtf.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/tex2rtf.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "Tex2RTFVC - Win32 Release" +# Name "Tex2RTFVC - Win32 Debug" +# Name "Tex2RTFVC - Win32 Debug DLL" +# Name "Tex2RTFVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\bmputils.h +# End Source File +# Begin Source File + +SOURCE=.\htmlutil.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\readshg.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\readshg.h +# End Source File +# Begin Source File + +SOURCE=.\rtfutils.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\rtfutils.h +# End Source File +# Begin Source File + +SOURCE=.\table.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\table.h +# End Source File +# Begin Source File + +SOURCE=.\tex2any.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\tex2any.h +# End Source File +# Begin Source File + +SOURCE=.\tex2rtf.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\tex2rtf.h +# End Source File +# Begin Source File + +SOURCE=.\tex2rtf.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# Begin Source File + +SOURCE=.\texutils.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\wxhlpblk.h +# End Source File +# Begin Source File + +SOURCE=.\xlputils.cpp + +!IF "$(CFG)" == "Tex2RTFVC - Win32 Release" + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "Tex2RTFVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/utils/tex2rtf/src/Tex2RTFVC.dsw b/utils/tex2rtf/src/Tex2RTFVC.dsw new file mode 100644 index 0000000000..f424d4477d --- /dev/null +++ b/utils/tex2rtf/src/Tex2RTFVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Tex2RTFVC"=.\Tex2RTFVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index 487fb97a62..3bef4525bb 100644 --- a/utils/tex2rtf/src/htmlutil.cpp +++ b/utils/tex2rtf/src/htmlutil.cpp @@ -76,6 +76,10 @@ static bool inTable = FALSE; // This is defined in the Tex2Any library. extern char *BigBuffer; +// DHS Two-column table dimensions. +static int TwoColWidthA = -1; +static int TwoColWidthB = -1; + class HyperReference: public wxObject { public: @@ -1189,8 +1193,12 @@ void HTMLOnMacro(int macroId, int no_args, bool start) { if ( start ) TexOutput("\n\n"); - else + else { TexOutput("\n
    \n"); + // DHS + TwoColWidthA = -1; + TwoColWidthB = -1; + } break; } case ltPAR: @@ -2089,17 +2097,29 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) */ if (arg_no == 1) { - if ( start ) - TexOutput("\n\n"); - else + if ( start ) { + // DHS + if (TwoColWidthA > -1) { + char buf[100]; + sprintf(buf,"\n\n",TwoColWidthA); + TexOutput(buf); + } else + TexOutput("\n\n"); + } else TexOutput("\n\n"); } if (arg_no == 2) { - if ( start ) - TexOutput("\n\n"); - else - TexOutput("\n\n"); + // DHS + if ( start ) { + if (TwoColWidthB > -1) { + char buf[100]; + sprintf(buf,"\n\n",TwoColWidthB); + TexOutput(buf); + } else + TexOutput("\n\n"); + } else + TexOutput("\n\n"); } return TRUE; break; @@ -2153,6 +2173,30 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) TexOutput("

    \n"); break; } + // DHS + case ltTWOCOLWIDTHA: + { + if (start) + { + char *val = GetArgData(); + float points = ParseUnitArgument(val); + TwoColWidthA = (int)((points * 100.0) / 72.0); + } + return FALSE; + break; + } + // DHS + case ltTWOCOLWIDTHB: + { + if (start) + { + char *val = GetArgData(); + float points = ParseUnitArgument(val); + TwoColWidthB = (int)((points * 100.0) / 72.0); + } + return FALSE; + break; + } /* * Accents * diff --git a/utils/tex2rtf/src/makefile.vc b/utils/tex2rtf/src/makefile.vc index bf9327aca7..9552bd1bf8 100644 --- a/utils/tex2rtf/src/makefile.vc +++ b/utils/tex2rtf/src/makefile.vc @@ -91,6 +91,8 @@ cleanall: DOCSOURCES=$(LOCALDOCDIR)\tex2rtf.tex html: $(DOCDIR)\html\tex2rtf\t2rtf.htm +htmlhelp: $(DOCDIR)\htmlhelp\tex2rtf.chm +htb: $(DOCDIR)\htb\tex2rtf.htb hlp: $(DOCDIR)\winhelp\tex2rtf.hlp pdfrtf: $(DOCDIR)\pdf\tex2rtf.rtf ps: $(WXDIR)\docs\ps\tex2rtf.ps @@ -118,11 +120,30 @@ $(DOCDIR)\pdf\tex2rtf.rtf: $(DOCSOURCES) $(DOCDIR)\html\tex2rtf\t2rtf.htm: $(DOCSOURCES) cd $(LOCALDOCDIR) -mkdir $(DOCDIR)\html\tex2rtf + -copy *.gif $(DOCDIR)\html\tex2rtf -start /w tex2rtf $(LOCALDOCDIR)\tex2rtf.tex $(DOCDIR)\html\tex2rtf\t2rtf.htm -twice -html -erase $(DOCDIR)\html\tex2rtf\*.con -erase $(DOCDIR)\html\tex2rtf\*.ref cd $(THISDIR) +$(DOCDIR)\htmlhelp\tex2rtf.chm : $(DOCDIR)\html\tex2rtf\t2rtf.htm $(DOCDIR)\html\tex2rtf\t2rtf.hhp + cd $(DOCDIR)\html\tex2rtf + -hhc t2rtf.hhp + move t2rtf.chm $(DOCDIR)\htmlhelp\tex2rtf.chm + cd $(THISDIR) + +# An htb file is a zip file containing the .htm, .gif, .hhp, .hhc and .hhk +# files, renamed to htb. +# This can then be used with e.g. helpview. +# Optionally, a cached version of the .hhp file can be generated with hhp2cached. +$(DOCDIR)\htb\tex2rtf.htb: $(DOCDIR)\html\tex2rtf\t2rtf.htm + cd $(DOCDIR)\html\tex2rtf + -erase /Y tex2rtf.zip tex2rtf.htb + zip32 tex2rtf.zip *.htm *.gif *.hhp *.hhc *.hhk + -mkdir $(DOCDIR)\htb + move tex2rtf.zip $(DOCDIR)\htb\tex2rtf.htb + cd $(THISDIR) + $(LOCALDOCDIR)\tex2rtf.dvi: $(DOCSOURCES) cd $(LOCALDOCDIR) -latex tex2rtf diff --git a/utils/tex2rtf/src/tex2any.cpp b/utils/tex2rtf/src/tex2any.cpp index cefb10037e..31386d6b43 100644 --- a/utils/tex2rtf/src/tex2any.cpp +++ b/utils/tex2rtf/src/tex2any.cpp @@ -363,6 +363,14 @@ bool FindEndEnvironment(char *buffer, int *pos, char *env) bool readingVerbatim = FALSE; bool readInVerbatim = FALSE; // Within a verbatim, but not nec. verbatiminput +// Switched this off because e.g. \verb${$ causes it to fail. There is no +// detection of \verb yet. +#define CHECK_BRACES 0 + +unsigned long leftCurly = 0; +unsigned long rightCurly = 0; +static wxString currentFileName = ""; + bool read_a_line(char *buf) { if (CurrentInputIndex < 0) @@ -374,6 +382,7 @@ bool read_a_line(char *buf) int ch = -2; int i = 0; buf[0] = 0; + while (ch != EOF && ch != 10) { if (((i == 14) && (strncmp(buf, "\\end{verbatim}", 14) == 0)) || @@ -381,6 +390,26 @@ bool read_a_line(char *buf) readInVerbatim = FALSE; ch = getc(Inputs[CurrentInputIndex]); + +#if CHECK_BRACES + if (ch == '{' && !readInVerbatim) + leftCurly++; + if (ch == '}' && !readInVerbatim) + { + rightCurly++; + if (rightCurly > leftCurly) + { + wxString errBuf; + errBuf.Printf("An extra right Curly brace ('}') was detected at line %l inside file %s",LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str()); + OnError((char *)errBuf.c_str()); + + // Reduce the count of right curly braces, so the mismatched count + // isn't reported on every line that has a '}' after the first mismatch + rightCurly--; + } + } +#endif + if (ch != EOF) { // Check for 2 consecutive newlines and replace with \par @@ -450,8 +479,19 @@ bool read_a_line(char *buf) buf[i] = 0; fclose(Inputs[CurrentInputIndex]); Inputs[CurrentInputIndex] = NULL; - if (CurrentInputIndex > 0) ch = ' '; // No real end of file + if (CurrentInputIndex > 0) + ch = ' '; // No real end of file CurrentInputIndex --; +#if CHECK_BRACES + if (leftCurly != rightCurly) + { + wxString errBuf; + errBuf.Printf("Curly braces do not match inside file %s\n%lu opens, %lu closes", (const char*) currentFileName.c_str(),leftCurly,rightCurly); + OnError((char *)errBuf.c_str()); + } + leftCurly = 0; + rightCurly = 0; +#endif if (readingVerbatim) { readingVerbatim = FALSE; @@ -491,6 +531,7 @@ bool read_a_line(char *buf) if (buf[j-1] == '}') buf[j-1] = 0; // Ignore final brace wxString actualFile = TexPathList.FindValidPath(fileName); + currentFileName = actualFile; if (actualFile == "") { char errBuf[300]; @@ -500,6 +541,9 @@ bool read_a_line(char *buf) } else { + wxString informStr; + informStr.Printf("Processing: %s",actualFile.c_str()); + OnInform((char *)informStr.c_str()); CurrentInputIndex ++; Inputs[CurrentInputIndex] = fopen(actualFile, "r"); LineNumbers[CurrentInputIndex] = 1; @@ -550,18 +594,25 @@ bool read_a_line(char *buf) if (buf[j-1] == '}') buf[j-1] = 0; // Ignore final brace + // Remove backslashes from name + wxString fileNameStr(fileName); + fileNameStr.Replace("\\", ""); + // Ignore some types of input files (e.g. macro definition files) - char *fileOnly = FileNameFromPath(fileName); + char *fileOnly = FileNameFromPath((char*) (const char*) fileNameStr); + currentFileName = fileOnly; if (IgnorableInputFiles.Member(fileOnly)) return read_a_line(buf); - wxString actualFile = TexPathList.FindValidPath(fileName); + wxString actualFile = TexPathList.FindValidPath(fileNameStr); if (actualFile == "") { char buf2[400]; - sprintf(buf2, "%s.tex", fileName); + sprintf(buf2, "%s.tex", (const char*) fileNameStr); actualFile = TexPathList.FindValidPath(buf2); } + currentFileName = actualFile; + if (actualFile == "") { char errBuf[300]; @@ -575,6 +626,9 @@ bool read_a_line(char *buf) // then we look in the same directory as this one. TexPathList.EnsureFileAccessible(actualFile); + wxString informStr; + informStr.Printf("Processing: %s",actualFile.c_str()); + OnInform((char *)informStr.c_str()); CurrentInputIndex ++; Inputs[CurrentInputIndex] = fopen(actualFile, "r"); LineNumbers[CurrentInputIndex] = 1; @@ -600,6 +654,15 @@ bool read_a_line(char *buf) strncmp(buf, "\\end{toocomplex}", 16) == 0) readInVerbatim = FALSE; +#if CHECK_BRACES + if (ch == EOF && leftCurly != rightCurly) + { + wxString errBuf; + errBuf.Printf("Curly braces do not match inside file %s\n%lu opens, %lu closes", (const char*) currentFileName.c_str(),leftCurly,rightCurly); + OnError((char *)errBuf.c_str()); + } +#endif + return (ch == EOF); } @@ -2024,7 +2087,7 @@ void DefineDefaultMacros(void) AddMacroDef(ltNABLA, "nabla", 0); AddMacroDef(ltNEG, "neg", 0); AddMacroDef(ltNEQ, "neq", 0); - AddMacroDef(ltNEWCOUNTER, "newcounter", 1, FALSE, FORBID_ABSOLUTELY); + AddMacroDef(ltNEWCOUNTER, "newcounter", 1, FALSE, (bool)FORBID_ABSOLUTELY); AddMacroDef(ltNEWLINE, "newline", 0); AddMacroDef(ltNEWPAGE, "newpage", 0); AddMacroDef(ltNI, "ni", 0); @@ -2077,8 +2140,8 @@ void DefineDefaultMacros(void) AddMacroDef(ltPRECEQ, "preceq", 0); AddMacroDef(ltPRINTINDEX, "printindex", 0); AddMacroDef(ltPROPTO, "propto", 0); - AddMacroDef(ltPSBOXTO, "psboxto", 1, FALSE, FORBID_ABSOLUTELY); - AddMacroDef(ltPSBOX, "psbox", 1, FALSE, FORBID_ABSOLUTELY); + AddMacroDef(ltPSBOXTO, "psboxto", 1, FALSE, (bool)FORBID_ABSOLUTELY); + AddMacroDef(ltPSBOX, "psbox", 1, FALSE, (bool)FORBID_ABSOLUTELY); AddMacroDef(ltPSI, "psi", 0); AddMacroDef(ltCAP_PSI, "Psi", 0); diff --git a/utils/tex2rtf/src/tex2rtf.cpp b/utils/tex2rtf/src/tex2rtf.cpp index fd069479dc..88d23ff9c8 100644 --- a/utils/tex2rtf/src/tex2rtf.cpp +++ b/utils/tex2rtf/src/tex2rtf.cpp @@ -105,7 +105,11 @@ void ShowOptions(void); #ifdef NO_GUI -extern char *wxBuffer; // we must init it, otherwise tex2rtf will crash +#if wxUSE_GUI || !defined(__UNIX__) +// wxBase for Unix does not have wxBuffer +extern +#endif +char *wxBuffer; // we must init it, otherwise tex2rtf will crash int main(int argc, char **argv) #else @@ -170,7 +174,8 @@ bool MyApp::OnInit() if (!InputFile || !OutputFile) isInteractive = TRUE; - for (int i = n; i < argc;) + int i; + for (i = n; i < argc;) { if (strcmp(argv[i], "-winhelp") == 0) { @@ -497,6 +502,7 @@ void MyFrame::OnExit(wxCommandEvent& event) void MyFrame::OnGo(wxCommandEvent& event) { + passNumber = 1; menuBar->EnableTop(0, FALSE); menuBar->EnableTop(1, FALSE); menuBar->EnableTop(2, FALSE); @@ -826,7 +832,7 @@ bool Go(void) char buf[100]; #ifndef NO_GUI long tim = wxGetElapsedTime(); - sprintf(buf, "Finished in %ld seconds.", (long)(tim/1000.0)); + sprintf(buf, "Finished PASS #%d in %ld seconds.\n", passNumber, (long)(tim/1000.0)); OnInform(buf); if (isInteractive) { diff --git a/utils/tex2rtf/src/texutils.cpp b/utils/tex2rtf/src/texutils.cpp index eec52b6db1..7ead43a89a 100644 --- a/utils/tex2rtf/src/texutils.cpp +++ b/utils/tex2rtf/src/texutils.cpp @@ -528,10 +528,10 @@ void BibReadValue(istream& istr, char *buffer, bool ignoreBraces = TRUE, while (!istr.eof() && !stopping) { // i ++; - if (i >= 2000) + if (i >= 4000) { char buf[100]; - sprintf(buf, "Sorry, value > 2000 chars in bib file at line %ld, terminating.", BibLine); + sprintf(buf, "Sorry, value > 4000 chars in bib file at line %ld, terminating.", BibLine); wxFatalError(buf, "Tex2RTF Fatal Error"); } istr.get(ch); @@ -581,7 +581,7 @@ bool ReadBib(char *filename) OnInform("Reading .bib file..."); char ch; - char fieldValue[2000]; + char fieldValue[4000]; char recordType[100]; char recordKey[100]; char recordField[100]; diff --git a/utils/wxPython/.cvsignore b/utils/wxPython/.cvsignore deleted file mode 100644 index 35d9a3fb04..0000000000 --- a/utils/wxPython/.cvsignore +++ /dev/null @@ -1,124 +0,0 @@ -*.py -*.pyc -*.pyc -*.pyd -*.pyd -*.pyo -*.pyo -*.zip -.cvsignore -.emacs.desktop -__init__.py -__init__.py -__init__.pyc -__init__.pyc -__init__.pyo -__init__.pyo -build.local -cmndlgs.py -cmndlgs.py -cmndlgs.pyc -cmndlgs.pyc -cmndlgs.pyo -cmndlgs.pyo -controls.py -controls.py -controls.pyc -controls.pyc -controls.pyo -controls.pyo -controls2.py -controls2.py -controls2.pyc -controls2.pyc -controls2.pyo -controls2.pyo -docs -events.py -events.py -events.pyc -events.pyc -events.pyo -events.pyo -filelist -frames.py -frames.py -frames.pyc -frames.pyc -frames.pyo -frames.pyo -gdi.py -gdi.py -gdi.pyc -gdi.pyc -gdi.pyo -gdi.pyo -glcanvas.py -glcanvas.pyc -glcanvasc.ilk -glcanvasc.pyd -gpl.txt -image.py -image.pyc -lgpl.txt -licence.txt -licendoc.txt -mdi.py -mdi.py -mdi.pyc -mdi.pyc -mdi.pyo -mdi.pyo -misc.py -misc.py -misc.pyc -misc.pyc -misc.pyo -misc.pyo -preamble.txt -printfw.py -stattool.py -stattool.py -stattool.pyc -stattool.pyc -stattool.pyo -stattool.pyo -update.log -utils.py -utils.py -utils.pyc -utils.pyc -utils.pyo -utilsc.ilk -utilsc.pyd -windows.py -windows.py -windows.pyc -windows.pyc -windows.pyo -windows.pyo -windows2.py -windows2.py -windows2.pyc -windows2.pyc -windows2.pyo -windows2.pyo -windows3.py -windows3.pyc -windows3.pyo -writings -wx.py -wx.py -wx.pyc -wx.pyc -wx.pyo -wxPython.doc -wxc.ilk -wxc.pdb -wxc.pyd -wxp.py -wxp.pyc -wxp.pyo -wxpc.ilk -wxpc.pdb -wxpc.pyd diff --git a/utils/wxPython/BUILD.txt b/utils/wxPython/BUILD.txt deleted file mode 100644 index df6a119675..0000000000 --- a/utils/wxPython/BUILD.txt +++ /dev/null @@ -1,148 +0,0 @@ -Build Instructions ------------------- -I used SWIG (http://www.swig.org) to create the source code for the -extension module. This enabled me to only have to deal with a small -amount of code and only have to bother with the exceptional issues. -SWIG takes care of the rest and generates all the repetative code for -me. You don't need SWIG to build the extension module as all the -generated C++ code is included under the src directory. - -I added a few minor features to SWIG to control some of the code -generation. If you want to play around with this you will need to get -a recent version of SWIG from their CVS or from a daily build. See -http://www.swig.org/ for details. - -wxPython is organized as a Python package. This means that the -directory containing the results of the build process should be a -subdirectory of a directory on the PYTHONPATH. (And preferably should -be named wxPython.) You can control where the build process will dump -wxPython by setting the TARGETDIR variable for the build utility, (see -below.) - - -1. Build and install wxWindows as described in its BuildCVS.txt or - INSTALL.txt file. - -1a. Building wxWindows on Unix/Linux. - - For *nix systems I run configure with these flags: - - --with-gtk - --with-libjpeg - --without-odbc - --enable-unicode=no - --enable-threads=yes - --enable-socket=yes - --enable-static=no - --enable-shared=yes - --disable-std_iostreams - - You can use whatever flags you want, but these work for me. Be - sure to run "make install" to install the wxWindows headers and - shared library. You can check where the wxPython build will expect - to find them by running "wx-config --cflags" and "wx-config --libs" - -1b. Building wxWindows on Win32. - - For Win32 systems I use Visual C++ 6.0, but 5.0 should work. The - wxPython build utility currently does not support any other win32 - compilers. Be sure to copy include/wx/msw/setup0.h to - include/wx/msw/setup.h and edit it for the options you want. At a - minimum you should set the following: - - wxUSE_NEW_GRID 0 - wxUSE_GLOBAL_MEMORY_OPERATORS 0 - wxUSE_LIBTIFF 1 - - I also change these: - - wxUSE_DIALUP_MANAGER 0 - wxUSE_SOCKETS 0 - wxUSE_FS_INET 0 - - There are probably other flags that can be disabled to remove - things not being used in wxPython, but I havn't investigated all - the potential configurations yet. - - I find it easiest to build wxWindows using the makefiles, that way - I don't have to worry about what the IDE might be doing behind the - scenes that might screw things up. Simply go to the src/msw - directory and run: - - nmake -f makefile.vc CRTFLAG=/MD EXTRAFLAGS=-D__NO_VC_CRTDBG__ dll pch - - If you want to make a release build, add FINAL=1 to the nmake - command, as well as to build.local for wxPython, (see below.) - - -2. For either platform, you should be sure to set an environment - variable named WXWIN to be the path to the top of the wxWindows - tree. - - -3. If you are working from a copy of the code retrieved from CVS, then - you will find wxPython in $WXWIN/utils/wxPython. If you are - working from the tar.gz or .zip files then you will probably want - to unpack wxPython in the $WXWIN/utils directory and rename the new - directory to wxPython (or use a symlink.) If you want to keep it - in a separate directory then you can change where the build.py tool - expects to find it by creating a file named build.local (see step 7 - for more examples about build.local,) containing something like - this: - - WXPSRCDIR = "~/MyStuff/wxPython-2.1.11/src" - - -4. At this point you may want to make an alias or symlink, script, - batch file, or whatever on the PATH that invokes - $WXWIN/utils/wxPython/distrib/build.py to help simplify matters - somewhat. For example, on my win32 system I have a file named - build.bat in a directory on the PATH that contains: - - python %WXWIN%/utils/wxPython/distrib/build.py %1 %2 %3 %4 %5 %6 - - -5. Change into the $(WXWIN)/utils/wxPython/src directory. - - -6. If you don't use SWIG, or have a new enough version installed, you - may have to update the timestamps of the files it generates so the - make utility won't think they are out of date and try to run SWIG - to update them. The standard touch utility can do this for you: - - touch gtk/*.cpp gtk/*.py - - -7. 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. For example, you can set a new TARGETDIR (the - installation directory) just by creating a file named build.local - in your wxPython source directory and assign a value to it, like - this: - - TARGETDIR = "/usr/local/lib/python1.5/site-packages/wxPython" - - The build.local file is executed as Python code so you can do very - creative things there if you need to. - - -8. To build and install the add-on modules, change to the appropriate - directory under $WXWIN/utils/wxPython/modules and run the build - utility again. - - -9. Change to the $WXWIN/utils/wxPython/demo directory. - - -10. Try executing the demo program. For example: - - python demo.py - - To run it without requiring a console on win32, you can use the - pythonw.exe version of Python either from the command line or from - a shortcut. diff --git a/utils/wxPython/Makefile b/utils/wxPython/Makefile deleted file mode 100644 index f0c1f754dd..0000000000 --- a/utils/wxPython/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -#---------------------------------------------------------------------- -# Convenience makefile to drive the build script in a more user -# friendly manner. -#---------------------------------------------------------------------- - - -all: - ./buildall -b - - -install: all - ./buildall -i - -clean: - ./buildall -c - -uninstall: - ./buildall -u diff --git a/utils/wxPython/SWIG.patches/Include.patch b/utils/wxPython/SWIG.patches/Include.patch deleted file mode 100644 index 7012b56d59..0000000000 --- a/utils/wxPython/SWIG.patches/Include.patch +++ /dev/null @@ -1,139 +0,0 @@ -*** swig.h.old Wed Feb 04 15:59:40 1998 ---- swig.h Fri Aug 28 15:46:32 1998 -*************** -*** 178,185 **** ---- 178,211 ---- - char *firstkey(); - char *nextkey(); - }; - -+ // ------------------------------------------------------------------- -+ // Simple Vector class -+ // User is responsible for deleting contents before deleteing Vector -+ // ------------------------------------------------------------------- -+ -+ class Vector { -+ public: -+ Vector(size_t allocSize=8); -+ ~Vector(); -+ -+ size_t size() { return m_size; } -+ size_t count() { return m_count; } -+ size_t append(void* object); -+ size_t extend(size_t newSize); -+ -+ void*& operator[] (size_t idx); -+ -+ static void* s_nullPtr; -+ -+ private: -+ size_t m_size; -+ size_t m_count; -+ void** m_data; -+ }; -+ -+ - /************************************************************************ - * class DataType - * - * Defines the basic datatypes supported by the translator. -*************** -*** 684,691 **** ---- 710,761 ---- - extern char *name_get(char *vname, int suppress=0); - extern char *name_set(char *vname, int suppress=0); - extern char *name_construct(char *classname, int suppress=0); - extern char *name_destroy(char *classname, int suppress=0); -+ -+ // ---------------------------------------------------------------------- -+ // class CPP_class -+ // -+ // Class for managing class members (internally) -+ // ---------------------------------------------------------------------- -+ -+ class CPP_member; -+ -+ class CPP_class { -+ public: -+ char *classname; // Real class name -+ char *classrename; // New name of class (if applicable) -+ char *classtype; // class type (struct, union, class) -+ int strip; // Strip off class declarator -+ int wextern; // Value of extern wrapper variable for this class -+ int have_constructor; // Status bit indicating if we've seen a constructor -+ int have_destructor; // Status bit indicating if a destructor has been seen -+ int is_abstract; // Status bit indicating if this is an abstract class -+ int generate_default; // Generate default constructors -+ int objective_c; // Set if this is an objective C class -+ int error; // Set if this class can't be generated -+ int line; // Line number -+ char **baseclass; // Base classes (if any) -+ Hash *local; // Hash table for local types -+ Hash *scope; // Local scope hash table -+ DocEntry *de; // Documentation entry of class -+ CPP_member *members; // Linked list of members -+ CPP_class *next; // Next class -+ static CPP_class *classlist; // List of all classes stored -+ -+ Vector addPragmas; -+ -+ CPP_class(char *name, char *ctype); -+ void add_member(CPP_member *m); -+ CPP_member *search_member(char *name); -+ void inherit_decls(int mode); -+ void emit_decls(); -+ static CPP_class *search(char *name); -+ void create_default(); -+ static void create_all(); -+ }; -+ -+ extern CPP_class *current_class; - - /*********************************************************************** - * -- Revision History - * $Log$ - * Revision 1.2 1999/07/31 07:54:05 RD - * wxPython 2.1b1: - * - * Added the missing wxWindow.GetUpdateRegion() method. - * - * Made a new change in SWIG (update your patches everybody) that - * provides a fix for global shadow objects that get an exception in - * their __del__ when their extension module has already been deleted. - * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about - * line 496 if you want to do it by hand. - * - * It is now possible to run through MainLoop more than once in any one - * process. The cleanup that used to happen as MainLoop completed (and - * prevented it from running again) has been delayed until the wxc module - * is being unloaded by Python. - * - * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added - * wxWindow.PopupMenuXY to be consistent with some other methods. - * - * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. - * - * You can now provide your own app.MainLoop method. See - * wxPython/demo/demoMainLoop.py for an example and some explaination. - * - * Got the in-place-edit for the wxTreeCtrl fixed and added some demo - * code to show how to use it. - * - * Put the wxIcon constructor back in for GTK as it now has one that - * matches MSW's. - * - * Added wxGrid.GetCells - * - * Added wxSystemSettings static methods as functions with names like - * wxSystemSettings_GetSystemColour. - * - * Removed wxPyMenu since using menu callbacks have been depreciated in - * wxWindows. Use wxMenu and events instead. - * - * Added alternate wxBitmap constructor (for MSW only) as - * wxBitmapFromData(data, type, width, height, depth = 1) - * - * Added a helper function named wxPyTypeCast that can convert shadow - * objects of one type into shadow objects of another type. (Like doing - * a down-cast.) See the implementation in wx.py for some docs. - * diff --git a/utils/wxPython/SWIG.patches/Modules.patch b/utils/wxPython/SWIG.patches/Modules.patch deleted file mode 100644 index 0cbc44f0f2..0000000000 --- a/utils/wxPython/SWIG.patches/Modules.patch +++ /dev/null @@ -1,202 +0,0 @@ -*** python.cxx.old Fri Jan 02 23:17:40 1998 ---- python.cxx Fri Aug 28 15:49:18 1998 -*************** -*** 1678,1685 **** ---- 1678,1702 ---- - fprintf(stderr,"%s : Line %d. Unable to locate file %s\n", input_file, line_number, value); - } - } - } -+ } else if (strcmp(cmd, "addtomethod") == 0) { -+ // parse value, expected to be in the form "methodName:line" -+ char* txtptr = strchr(value, ':'); -+ if (txtptr) { -+ // add name and line to a list in current_class -+ *txtptr = 0; -+ txtptr++; -+ AddPragmaData* apData = new AddPragmaData(value, txtptr); -+ current_class->addPragmas.append(apData); -+ -+ } else { -+ fprintf(stderr,"%s : Line %d. Malformed addtomethod pragma. Should be \"methodName:text\"\n", -+ input_file, line_number); -+ } -+ } else if (strcmp(cmd, "addtoclass") == 0) { -+ AddPragmaData* apData = new AddPragmaData("__class__", value); -+ current_class->addPragmas.append(apData); - } else { - fprintf(stderr,"%s : Line %d. Unrecognized pragma.\n", input_file, line_number); - } - } -*** python.h.old Thu Jul 24 23:18:50 1997 ---- python.h Fri Aug 28 15:46:08 1998 -*************** -*** 184,191 **** ---- 184,203 ---- - void cpp_declare_const(char *name, char *iname, DataType *type, char *value); - void cpp_class_decl(char *, char *,char *); - void pragma(char *, char *, char *); - void add_typedef(DataType *t, char *name); -+ -+ void emitAddPragmas(String& output, char* name, char* spacing); - }; - - #define PYSHADOW_MEMBER 0x2 -+ -+ struct AddPragmaData { -+ String m_method; -+ String m_text; -+ -+ AddPragmaData(char* method, char* text) -+ : m_method(method), -+ m_text(text) -+ {} -+ }; - -*** pycpp.cxx.old Fri Jan 02 21:23:22 1998 ---- pycpp.cxx Tue Jul 20 14:34:36 1999 -*************** -*** 275,282 **** ---- 275,283 ---- - #endif - } - } - // if ((t->type != T_VOID) || (t->is_pointer)) -+ emitAddPragmas(*pyclass, realname, tab8); - *pyclass << tab8 << "return val\n"; - - // Change the usage string to reflect our shadow class - -*************** -*** 393,400 **** ---- 394,402 ---- - } - } - *construct << ")\n"; - *construct << tab8 << "self.thisown = 1\n"; -+ emitAddPragmas(*construct, "__init__", tab8); - have_constructor = 1; - } else { - - // Hmmm. We seem to be creating a different constructor. We're just going to create a -*************** -*** 490,503 **** - if (class_renamed) realname = class_name; - else realname = name; - } - -! *pyclass << tab4 << "def __del__(self):\n" - << tab8 << "if self.thisown == 1 :\n" - << tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n"; -! - have_destructor = 1; -- - if (doc_entry) { - doc_entry->usage = ""; - doc_entry->usage << "del this"; - } ---- 492,504 ---- - if (class_renamed) realname = class_name; - else realname = name; - } - -! *pyclass << tab4 << "def __del__(self, " << module << "=" << module << "):\n" - << tab8 << "if self.thisown == 1 :\n" - << tab8 << tab4 << module << "." << name_destroy(realname) << "(self.this)\n"; -! emitAddPragmas(*pyclass, "__del__", tab8); - have_destructor = 1; - if (doc_entry) { - doc_entry->usage = ""; - doc_entry->usage << "del this"; - } -*************** -*** 551,558 **** ---- 552,561 ---- - repr << tab4 << "def __repr__(self):\n" - << tab8 << "return \"\"\n"; - - classes << repr; -+ emitAddPragmas(classes, "__class__", tab4); -+ - } - - // Now build the real class with a normal constructor - -*************** -*** 746,753 **** ---- 749,778 ---- - hash.add(name,copy_string((char *) hash.lookup(t->name))); - } - } - -+ // -------------------------------------------------------------------------------- -+ // PYTHON::emitAddPragmas(String& output, char* name, char* spacing); -+ // -+ // Search the current_class->addPragmas vector for any text belonging to name. -+ // Append the text properly spcaed to the output string. -+ // -+ // -------------------------------------------------------------------------------- -+ -+ void PYTHON::emitAddPragmas(String& output, char* name, char* spacing) -+ { -+ AddPragmaData* apData; -+ size_t count; -+ int i; -+ -+ count = current_class->addPragmas.count(); -+ for (i=0; iaddPragmas[i]; -+ if (strcmp(apData->m_method, name) == 0) { -+ output << spacing << apData->m_text << "\n"; -+ } -+ } -+ } - - /********************************************************************************* - * - * $Log$ - * Revision 1.2 1999/07/31 07:54:05 RD - * wxPython 2.1b1: - * - * Added the missing wxWindow.GetUpdateRegion() method. - * - * Made a new change in SWIG (update your patches everybody) that - * provides a fix for global shadow objects that get an exception in - * their __del__ when their extension module has already been deleted. - * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about - * line 496 if you want to do it by hand. - * - * It is now possible to run through MainLoop more than once in any one - * process. The cleanup that used to happen as MainLoop completed (and - * prevented it from running again) has been delayed until the wxc module - * is being unloaded by Python. - * - * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added - * wxWindow.PopupMenuXY to be consistent with some other methods. - * - * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. - * - * You can now provide your own app.MainLoop method. See - * wxPython/demo/demoMainLoop.py for an example and some explaination. - * - * Got the in-place-edit for the wxTreeCtrl fixed and added some demo - * code to show how to use it. - * - * Put the wxIcon constructor back in for GTK as it now has one that - * matches MSW's. - * - * Added wxGrid.GetCells - * - * Added wxSystemSettings static methods as functions with names like - * wxSystemSettings_GetSystemColour. - * - * Removed wxPyMenu since using menu callbacks have been depreciated in - * wxWindows. Use wxMenu and events instead. - * - * Added alternate wxBitmap constructor (for MSW only) as - * wxBitmapFromData(data, type, width, height, depth = 1) - * - * Added a helper function named wxPyTypeCast that can convert shadow - * objects of one type into shadow objects of another type. (Like doing - * a down-cast.) See the implementation in wx.py for some docs. - * diff --git a/utils/wxPython/SWIG.patches/SWIG.patch b/utils/wxPython/SWIG.patches/SWIG.patch deleted file mode 100644 index a50235c64b..0000000000 --- a/utils/wxPython/SWIG.patches/SWIG.patch +++ /dev/null @@ -1,530 +0,0 @@ -*** cplus.cxx.old Mon Feb 02 15:55:42 1998 ---- cplus.cxx Fri Aug 28 13:02:50 1998 -*************** -*** 581,612 **** - // Class for managing class members (internally) - // ---------------------------------------------------------------------- - - static char *inherit_base_class = 0; - -- class CPP_class { -- public: -- char *classname; // Real class name -- char *classrename; // New name of class (if applicable) -- char *classtype; // class type (struct, union, class) -- int strip; // Strip off class declarator -- int wextern; // Value of extern wrapper variable for this class -- int have_constructor; // Status bit indicating if we've seen a constructor -- int have_destructor; // Status bit indicating if a destructor has been seen -- int is_abstract; // Status bit indicating if this is an abstract class -- int generate_default; // Generate default constructors -- int objective_c; // Set if this is an objective C class -- int error; // Set if this class can't be generated -- int line; // Line number -- char **baseclass; // Base classes (if any) -- Hash *local; // Hash table for local types -- Hash *scope; // Local scope hash table -- DocEntry *de; // Documentation entry of class -- CPP_member *members; // Linked list of members -- CPP_class *next; // Next class -- static CPP_class *classlist; // List of all classes stored - -! CPP_class(char *name, char *ctype) { - CPP_class *c; - classname = copy_string(name); - classtype = copy_string(ctype); - classrename = 0; ---- 581,593 ---- - // Class for managing class members (internally) - // ---------------------------------------------------------------------- - - static char *inherit_base_class = 0; -+ CPP_class *CPP_class::classlist = 0; -+ CPP_class *current_class; - - -! CPP_class::CPP_class(char *name, char *ctype) { - CPP_class *c; - classname = copy_string(name); - classtype = copy_string(ctype); - classrename = 0; -*************** -*** 642,650 **** - // ------------------------------------------------------------------------------ - // Add a new C++ member to this class - // ------------------------------------------------------------------------------ - -! void add_member(CPP_member *m) { - CPP_member *cm; - - // Set base class where this was defined - if (inherit_base_class) ---- 623,631 ---- - // ------------------------------------------------------------------------------ - // Add a new C++ member to this class - // ------------------------------------------------------------------------------ - -! void CPP_class::add_member(CPP_member *m) { - CPP_member *cm; - - // Set base class where this was defined - if (inherit_base_class) -*************** -*** 664,672 **** - // ------------------------------------------------------------------------------ - // Search for a member with the given name. Returns the member on success, 0 on failure - // ------------------------------------------------------------------------------ - -! CPP_member *search_member(char *name) { - CPP_member *m; - char *c; - m = members; - while (m) { ---- 645,653 ---- - // ------------------------------------------------------------------------------ - // Search for a member with the given name. Returns the member on success, 0 on failure - // ------------------------------------------------------------------------------ - -! CPP_member *CPP_class::search_member(char *name) { - CPP_member *m; - char *c; - m = members; - while (m) { -*************** -*** 680,688 **** - // ------------------------------------------------------------------------------ - // Inherit. Put all the declarations associated with this class into the current - // ------------------------------------------------------------------------------ - -! void inherit_decls(int mode) { - CPP_member *m; - m = members; - while (m) { - inherit_base_class = m->base; ---- 661,669 ---- - // ------------------------------------------------------------------------------ - // Inherit. Put all the declarations associated with this class into the current - // ------------------------------------------------------------------------------ - -! void CPP_class::inherit_decls(int mode) { - CPP_member *m; - m = members; - while (m) { - inherit_base_class = m->base; -*************** -*** 696,704 **** - // ------------------------------------------------------------------------------ - // Emit all of the declarations associated with this class - // ------------------------------------------------------------------------------ - -! void emit_decls() { - CPP_member *m = members; - int last_scope = name_scope(0); - abstract = is_abstract; - while (m) { ---- 677,685 ---- - // ------------------------------------------------------------------------------ - // Emit all of the declarations associated with this class - // ------------------------------------------------------------------------------ - -! void CPP_class::emit_decls() { - CPP_member *m = members; - int last_scope = name_scope(0); - abstract = is_abstract; - while (m) { -*************** -*** 713,721 **** - // ------------------------------------------------------------------------------ - // Search for a given class in the list - // ------------------------------------------------------------------------------ - -! static CPP_class *search(char *name) { - CPP_class *c; - c = classlist; - if (!name) return 0; - while (c) { ---- 694,702 ---- - // ------------------------------------------------------------------------------ - // Search for a given class in the list - // ------------------------------------------------------------------------------ - -! CPP_class *CPP_class::search(char *name) { - CPP_class *c; - c = classlist; - if (!name) return 0; - while (c) { -*************** -*** 729,737 **** - // Add default constructors and destructors - // - // ------------------------------------------------------------------------------ - -! void create_default() { - if (!generate_default) return; - - // Try to generate a constructor if not available. - ---- 710,718 ---- - // Add default constructors and destructors - // - // ------------------------------------------------------------------------------ - -! void CPP_class::create_default() { - if (!generate_default) return; - - // Try to generate a constructor if not available. - -*************** -*** 751,764 **** - // ------------------------------------------------------------------------------ - // Dump *all* of the classes saved out to the various - // language modules (this does what cplus_close_class used to do) - // ------------------------------------------------------------------------------ -- static void create_all(); -- }; -- -- CPP_class *CPP_class::classlist = 0; -- static CPP_class *current_class; -- - void CPP_class::create_all() { - CPP_class *c; - c = classlist; - while (c) { ---- 732,739 ---- -*** vector.cxx.old Fri Aug 28 15:23:16 1998 ---- vector.cxx Fri Aug 28 15:46:52 1998 -*************** -*** 0 **** ---- 1,182 ---- -+ -+ /******************************************************************************* -+ * Simplified Wrapper and Interface Generator (SWIG) -+ * -+ * Dave Beazley -+ * -+ * Department of Computer Science Theoretical Division (T-11) -+ * University of Utah Los Alamos National Laboratory -+ * Salt Lake City, Utah 84112 Los Alamos, New Mexico 87545 -+ * beazley@cs.utah.edu beazley@lanl.gov -+ * -+ * Copyright (c) 1995-1997 -+ * The University of Utah and the Regents of the University of California -+ * All Rights Reserved -+ * -+ * Permission is hereby granted, without written agreement and without -+ * license or royalty fees, to use, copy, modify, and distribute this -+ * software and its documentation for any purpose, provided that -+ * (1) The above copyright notice and the following two paragraphs -+ * appear in all copies of the source code and (2) redistributions -+ * including binaries reproduces these notices in the supporting -+ * documentation. Substantial modifications to this software may be -+ * copyrighted by their authors and need not follow the licensing terms -+ * described here, provided that the new terms are clearly indicated in -+ * all files where they apply. -+ * -+ * IN NO EVENT SHALL THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, THE -+ * UNIVERSITY OF UTAH OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY -+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL -+ * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, -+ * EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF -+ * THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, AND THE UNIVERSITY OF UTAH -+ * SPECIFICALLY DISCLAIM ANY WARRANTIES,INCLUDING, BUT NOT LIMITED TO, -+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+ * PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND -+ * THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, -+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -+ * -+ *******************************************************************************/ -+ -+ #include "internal.h" -+ -+ /******************************************************************************* -+ * $Header$ -+ * -+ * File : vector.cxx -+ * -+ * A very simple Vector class. Allways assumes that memory allocations are -+ * successful. Should be made more robust... -+ * -+ *******************************************************************************/ -+ -+ void* Vector::s_nullPtr = NULL; -+ -+ // ----------------------------------------------------------------------------- -+ // Vector::Vector(size_t allocSize = 8) -+ // -+ // Constructor. Creates a new Vector. -+ // -+ // Inputs : initial allocation size (optional) -+ // -+ // Output : New Vector object. -+ // -+ // Side Effects : None -+ // ----------------------------------------------------------------------------- -+ -+ Vector::Vector(size_t allocSize) -+ : m_size(allocSize), -+ m_count(0), -+ m_data(0) -+ { -+ if (m_size) { -+ m_data = new void*[m_size]; -+ int i; -+ for (i=0; i m_size) { -+ newSize = newSize + (GRANULARITY - (newSize % GRANULARITY)); -+ -+ void** temp = new void*[newSize]; -+ memcpy(temp, m_data, m_size*sizeof(void*)); -+ -+ int i; -+ for (i=m_size; i= m_size) { -+ extend(m_count + 1); -+ } -+ -+ m_data[m_count] = object; -+ m_count += 1; -+ -+ return m_count; -+ } -+ -+ -+ // ----------------------------------------------------------------------------- -+ // Vector::operator[] (size_t idx) -+ // -+ // Returns a reference to the void pointer at idx. If idx is beyond the range -+ // of the vector, returns a reference to s_nullPtr. -+ // -+ // ----------------------------------------------------------------------------- -+ -+ void*& Vector::operator[] (size_t idx) { -+ if (idx >= m_size) { -+ s_nullPtr = 0; -+ return s_nullPtr; -+ } -+ -+ return m_data[idx]; -+ } -+ -+ -+ /*********************************************************************** -+ * -+ * -- Revision History -+ * $Log$ -+ * Revision 1.3 1999/07/31 07:54:05 RD -+ * wxPython 2.1b1: -+ * -+ * Added the missing wxWindow.GetUpdateRegion() method. -+ * -+ * Made a new change in SWIG (update your patches everybody) that -+ * provides a fix for global shadow objects that get an exception in -+ * their __del__ when their extension module has already been deleted. -+ * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about -+ * line 496 if you want to do it by hand. -+ * -+ * It is now possible to run through MainLoop more than once in any one -+ * process. The cleanup that used to happen as MainLoop completed (and -+ * prevented it from running again) has been delayed until the wxc module -+ * is being unloaded by Python. -+ * -+ * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added -+ * wxWindow.PopupMenuXY to be consistent with some other methods. -+ * -+ * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. -+ * -+ * You can now provide your own app.MainLoop method. See -+ * wxPython/demo/demoMainLoop.py for an example and some explaination. -+ * -+ * Got the in-place-edit for the wxTreeCtrl fixed and added some demo -+ * code to show how to use it. -+ * -+ * Put the wxIcon constructor back in for GTK as it now has one that -+ * matches MSW's. -+ * -+ * Added wxGrid.GetCells -+ * -+ * Added wxSystemSettings static methods as functions with names like -+ * wxSystemSettings_GetSystemColour. -+ * -+ * Removed wxPyMenu since using menu callbacks have been depreciated in -+ * wxWindows. Use wxMenu and events instead. -+ * -+ * Added alternate wxBitmap constructor (for MSW only) as -+ * wxBitmapFromData(data, type, width, height, depth = 1) -+ * -+ * Added a helper function named wxPyTypeCast that can convert shadow -+ * objects of one type into shadow objects of another type. (Like doing -+ * a down-cast.) See the implementation in wx.py for some docs. -+ * -+ * -+ ***********************************************************************/ -+ -+ -+ -+ -+ -+ -*** makefile.msc.old Mon Jun 23 16:15:32 1997 ---- makefile.msc Fri Aug 28 11:21:58 1998 -*************** -*** 33,50 **** - # Normally, you shouldn't have to change anything below this point # - ######################################################################## - - LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj emit.obj newdoc.obj ascii.obj \ -! html.obj latex.obj cplus.obj lang.obj hash.obj sstring.obj wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj - - LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \ -! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \ - sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx - - LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h - LIBNAME = ..\libswig.lib - INCLUDE = -I../Include -I$(STD_INC) -! CFLAGS = -Zi -nologo -DSWIG_LIB="\"$(SWIG_LIB)\"" -DSWIG_CC="\"$(CC)\"" -DMSDOS -DSTDC_HEADERS=1 -DHAVE_LIBDL=1 $(SWIG_OPTS) - LD_FLAGS = -VERBOSE - - - # ---- 33,50 ---- - # Normally, you shouldn't have to change anything below this point # - ######################################################################## - - LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj emit.obj newdoc.obj ascii.obj \ -! html.obj latex.obj cplus.obj lang.obj hash.obj vector.obj sstring.obj wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj - - LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \ -! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx vector.cxx \ - sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx - - LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h - LIBNAME = ..\libswig.lib - INCLUDE = -I../Include -I$(STD_INC) -! CFLAGS = -Zi -nologo -DSWIG_LIB="\"$(SWIG_LIB)\"" -DSWIG_CC="\"$(CC)\"" -DMSDOS -DSTDC_HEADERS=1 -DHAVE_LIBDL=1 $(SWIG_OPTS) $(OTHERFLAGS) - LD_FLAGS = -VERBOSE - - - # -*** makefile.bc.old Sun Jan 04 13:49:24 1998 ---- makefile.bc Fri Aug 28 15:42:58 1998 -*************** -*** 34,47 **** - ######################################################################## - - LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj \ - emit.obj newdoc.obj ascii.obj \ -! html.obj latex.obj cplus.obj lang.obj hash.obj sstring.obj \ - wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj - - LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \ - emit.cxx newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \ -! sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx - - LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h - LIBNAME = ..\libswig.lib - INCLUDE = -I../Include -I$(STD_INC) ---- 34,47 ---- - ######################################################################## - - LIBOBJS = main.obj scanner.obj symbol.obj include.obj types.obj parms.obj \ - emit.obj newdoc.obj ascii.obj \ -! html.obj latex.obj cplus.obj lang.obj hash.obj vector.obj sstring.obj \ - wrapfunc.obj getopt.obj comment.obj typemap.obj naming.obj - - LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \ - emit.cxx newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \ -! vector.cxx sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx - - LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h - LIBNAME = ..\libswig.lib - INCLUDE = -I../Include -I$(STD_INC) -*** Makefile.in.old Wed May 28 23:56:56 1997 ---- Makefile.in Fri Aug 28 15:43:36 1998 -*************** -*** 51,63 **** - # Normally, you shouldn't have to change anything below this point # - ######################################################################## - - LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \ -! html.o latex.o cplus.o lang.o hash.o sstring.o wrapfunc.o getopt.o comment.o \ - typemap.o naming.o - - LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \ -! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \ - sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx - - LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h - LIB = ../libswig.a ---- 51,63 ---- - # Normally, you shouldn't have to change anything below this point # - ######################################################################## - - LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \ -! html.o latex.o cplus.o lang.o hash.o vector.o sstring.o wrapfunc.o getopt.o comment.o \ - typemap.o naming.o - - LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \ -! newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx vector.cxx \ - sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx - - LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h - LIB = ../libswig.a diff --git a/utils/wxPython/buildall b/utils/wxPython/buildall deleted file mode 100755 index 26870e3f48..0000000000 --- a/utils/wxPython/buildall +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -cd src -python ../distrib/build.py $* -if [ "$?" != "0" ]; then - exit 1 -fi - -cd ../modules -python buildall.py $* -cd .. - diff --git a/utils/wxPython/buildall.bat b/utils/wxPython/buildall.bat deleted file mode 100755 index 0747662fa4..0000000000 --- a/utils/wxPython/buildall.bat +++ /dev/null @@ -1,10 +0,0 @@ - -cd src -python ..\distrib\build.py %1 %2 %3 %4 %5 %6 %7 %8 %9 - -cd ..\modules -python .\buildall.py %1 %2 %3 %4 %5 %6 %7 %8 %9 - - -cd .. - diff --git a/utils/wxPython/demo/FileBrowseButton.py b/utils/wxPython/demo/FileBrowseButton.py deleted file mode 100644 index b970ae7376..0000000000 --- a/utils/wxPython/demo/FileBrowseButton.py +++ /dev/null @@ -1,19 +0,0 @@ - -from wxPython.wx import * -from wxPython.lib.filebrowsebutton import FileBrowseButton - - -#---------------------------------------------------------------------- - -def runTest(frame, nb, log): - win = wxPanel(nb, -1) - fbb = FileBrowseButton(win, -1, wxPoint(20,20), wxSize(350, -1)) - return win - - - -#---------------------------------------------------------------------- - - - -overview = FileBrowseButton.__doc__ diff --git a/utils/wxPython/demo/Main.py b/utils/wxPython/demo/Main.py deleted file mode 100644 index b94fd77952..0000000000 --- a/utils/wxPython/demo/Main.py +++ /dev/null @@ -1,440 +0,0 @@ -#!/bin/env python -#---------------------------------------------------------------------------- -# Name: Main.py -# Purpose: Testing lots of stuff, controls, window types, etc. -# -# Author: Robin Dunn & Gary Dumer -# -# Created: -# RCS-ID: $Id$ -# Copyright: (c) 1999 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -import sys, os -from wxPython.wx import * -from wxPython.lib.splashscreen import SplashScreen - -#--------------------------------------------------------------------------- - -_useSplitter = true -_useNestedSplitter = true - -_treeList = [ - ('New since last release', []), - - ('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']), - - ('Non-Managed Windows', ['wxGrid', 'wxSashWindow', - 'wxScrolledWindow', 'wxSplitterWindow', - 'wxStatusBar', 'wxNotebook', - 'wxHtmlWindow']), - - ('Common Dialogs', ['wxColourDialog', 'wxDirDialog', 'wxFileDialog', - 'wxSingleChoiceDialog', 'wxTextEntryDialog', - 'wxFontDialog', 'wxPageSetupDialog', 'wxPrintDialog', - 'wxMessageDialog', 'wxProgressDialog']), - - ('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice', - 'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl', - 'wxTreeCtrl', 'wxSpinButton', 'wxStaticText', 'wxStaticBitmap', - 'wxRadioBox', 'wxSlider', 'wxToolBar', #'wxToggleButton' - ]), - - ('Window Layout', ['wxLayoutConstraints', 'Sizers', 'OldSizers']), - - ('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'FontEnumerator', - 'wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits', - 'wxImage', 'wxMask', 'PrintFramework', 'wxOGL', - 'PythonEvents', 'Threads']), - - ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog', - 'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar', - 'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow', - 'FileBrowseButton', 'GenericButtons', 'wxEditor']), - - ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']), - - ] - -#--------------------------------------------------------------------------- - -class wxPythonDemo(wxFrame): - def __init__(self, parent, id, title): - wxFrame.__init__(self, parent, -1, title, size = (725, 550)) - - self.cwd = os.getcwd() - - if wxPlatform == '__WXMSW__': - self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO) - self.SetIcon(self.icon) - - self.otherWin = None - EVT_IDLE(self, self.OnIdle) - - self.Centre(wxBOTH) - self.CreateStatusBar(1, wxST_SIZEGRIP) - - if _useSplitter: - splitter = wxSplitterWindow(self, -1) - if _useNestedSplitter: - splitter2 = wxSplitterWindow(splitter, -1) - logParent = nbParent = splitter2 - else: - nbParent = splitter - logParent = wxFrame(self, -1, "wxPython Demo: log window", - (0,0), (500, 150)) - logParent.Show(true) - else: - nbParent = self - logParent = wxFrame(self, -1, "wxPython Demo: log window", - (0,0), (500, 150)) - logParent.Show(true) - - - - # Prevent TreeCtrl from displaying all items after destruction - self.dying = false - - # Make a File menu - self.mainmenu = wxMenuBar() - menu = wxMenu() - exitID = wxNewId() - menu.Append(exitID, 'E&xit\tAlt-X', 'Get the heck outta here!') - EVT_MENU(self, exitID, self.OnFileExit) - self.mainmenu.Append(menu, '&File') - - # Make a Demo menu - menu = wxMenu() - for item in _treeList: - submenu = wxMenu() - for childItem in item[1]: - mID = wxNewId() - submenu.Append(mID, childItem) - EVT_MENU(self, mID, self.OnDemoMenu) - menu.AppendMenu(wxNewId(), item[0], submenu) - self.mainmenu.Append(menu, '&Demo') - - - # Make a Help menu - helpID = wxNewId() - menu = wxMenu() - menu.Append(helpID, '&About\tCtrl-H', 'wxPython RULES!!!') - EVT_MENU(self, helpID, self.OnHelpAbout) - self.mainmenu.Append(menu, '&Help') - self.SetMenuBar(self.mainmenu) - - # set the menu accellerator table... - aTable = wxAcceleratorTable([(wxACCEL_ALT, ord('X'), exitID), - (wxACCEL_CTRL, ord('H'), helpID)]) - self.SetAcceleratorTable(aTable) - - - # Create a TreeCtrl - if _useSplitter: - tID = wxNewId() - self.treeMap = {} - self.tree = wxTreeCtrl(splitter, tID) - #self.tree.SetBackgroundColour(wxNamedColour("Pink")) - root = self.tree.AddRoot("Overview") - firstChild = None - for item in _treeList: - child = self.tree.AppendItem(root, item[0]) - if not firstChild: firstChild = child - for childItem in item[1]: - theDemo = self.tree.AppendItem(child, childItem) - self.treeMap[childItem] = theDemo - - self.tree.Expand(root) - self.tree.Expand(firstChild) - EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded) - EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed) - EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged) - - # Create a Notebook - self.nb = wxNotebook(nbParent, -1) - - # Set up a TextCtrl on the Overview Notebook page - self.ovr = wxTextCtrl(self.nb, -1, style = wxTE_MULTILINE|wxTE_READONLY) - self.nb.AddPage(self.ovr, "Overview") - - - # Set up a TextCtrl on the Demo Code Notebook page - self.txt = wxTextCtrl(self.nb, -1, - style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL) - self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false)) - self.nb.AddPage(self.txt, "Demo Code") - - - # Set up a log on the View Log Notebook page - self.log = wxTextCtrl(logParent, -1, - style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL) - (w, self.charHeight) = self.log.GetTextExtent('X') - self.WriteText('wxPython Demo Log:\n') - - self.Show(true) - - # add the windows to the splitter and split it. - if _useSplitter: - if _useNestedSplitter: - splitter2.SplitHorizontally(self.nb, self.log) - splitter2.SetSashPosition(360, true) - splitter2.SetMinimumPaneSize(20) - - splitter.SplitVertically(self.tree, splitter2) - else: - splitter.SplitVertically(self.tree, self.nb) - - splitter.SetSashPosition(180, true) - splitter.SetMinimumPaneSize(20) - - - # make our log window be stdout - #sys.stdout = self - - # select initial items - self.nb.SetSelection(0) - if _useSplitter: - self.tree.SelectItem(root) - - if len(sys.argv) == 2: - try: - selectedDemo = self.treeMap[sys.argv[1]] - except: - selectedDemo = None - if selectedDemo and _useSplitter: - self.tree.SelectItem(selectedDemo) - self.tree.EnsureVisible(selectedDemo) - - - self.WriteText('window handle: %s\n' % self.GetHandle()) - - - #--------------------------------------------- - def WriteText(self, text): - self.log.WriteText(text) - w, h = self.log.GetClientSizeTuple() - numLines = h/self.charHeight - x, y = self.log.PositionToXY(self.log.GetLastPosition()) - if y > numLines: - self.log.ShowPosition(self.log.XYToPosition(x, y-numLines)) - ##self.log.ShowPosition(self.log.GetLastPosition()) - self.log.SetInsertionPointEnd() - - def write(self, txt): - self.WriteText(txt) - - #--------------------------------------------- - def OnItemExpanded(self, event): - item = event.GetItem() - self.log.WriteText("OnItemExpanded: %s\n" % self.tree.GetItemText(item)) - - #--------------------------------------------- - def OnItemCollapsed(self, event): - item = event.GetItem() - self.log.WriteText("OnItemCollapsed: %s\n" % self.tree.GetItemText(item)) - - #--------------------------------------------- - def OnSelChanged(self, event): - if self.dying: - return - - item = event.GetItem() - itemText = self.tree.GetItemText(item) - self.RunDemo(itemText) - - - #--------------------------------------------- - def RunDemo(self, itemText): - os.chdir(self.cwd) - if self.nb.GetPageCount() == 3: - if self.nb.GetSelection() == 2: - self.nb.SetSelection(0) - self.nb.DeletePage(2) - - if itemText == 'Overview': - self.GetDemoFile('Main.py') - self.SetOverview('Overview', overview) - self.nb.Refresh(); - self.window = None - - else: - if os.path.exists(itemText + '.py'): - wxBeginBusyCursor() - self.GetDemoFile(itemText + '.py') - module = __import__(itemText, globals()) - self.SetOverview(itemText, module.overview) - wxEndBusyCursor() - - # in case runTest is modal, make sure things look right... - self.nb.Refresh(); - wxYield() - - self.window = module.runTest(self, self.nb, self) - if self.window: - self.nb.AddPage(self.window, 'Demo') - wxYield() - self.nb.SetSelection(2) - - else: - self.ovr.Clear() - self.txt.Clear() - self.window = None - - - - #--------------------------------------------- - # Get the Demo files - def GetDemoFile(self, filename): - self.txt.Clear() - #if not self.txt.LoadFile(filename): - # self.txt.WriteText("Cannot open %s file." % filename) - try: - self.txt.SetValue(open(filename).read()) - except IOError: - self.txt.WriteText("Cannot open %s file." % filename) - - - self.txt.SetInsertionPoint(0) - self.txt.ShowPosition(0) - - #--------------------------------------------- - def SetOverview(self, name, text): - self.ovr.Clear() - self.ovr.WriteText(text) - self.nb.SetPageText(0, name) - self.ovr.SetInsertionPoint(0) - self.ovr.ShowPosition(0) - - #--------------------------------------------- - # Menu methods - def OnFileExit(self, event): - self.Close() - - - def OnHelpAbout(self, event): - #about = wxMessageDialog(self, - # "wxPython is a Python extension module that\n" - # "encapsulates the wxWindows GUI classes.\n\n" - # "This demo shows off some of the capabilities\n" - # "of wxPython.\n\n" - # " Developed by Robin Dunn", - # "About wxPython", wxOK) - from About import MyAboutBox - about = MyAboutBox(self) - about.ShowModal() - about.Destroy() - - - #--------------------------------------------- - def OnCloseWindow(self, event): - self.dying = true - self.window = None - self.mainmenu = None - self.Destroy() - - #--------------------------------------------- - def OnIdle(self, event): - if self.otherWin: - self.otherWin.Raise() - self.window = self.otherWin - self.otherWin = None - - #--------------------------------------------- - def OnDemoMenu(self, event): - if _useSplitter: - try: - selectedDemo = self.treeMap[self.mainmenu.GetLabel(event.GetId())] - except: - selectedDemo = None - if selectedDemo: - self.tree.SelectItem(selectedDemo) - self.tree.EnsureVisible(selectedDemo) - else: - self.RunDemo(self.mainmenu.GetLabel(event.GetId())) - -#--------------------------------------------------------------------------- -#--------------------------------------------------------------------------- - -class MyApp(wxApp): - def OnInit(self): - wxImage_AddHandler(wxJPEGHandler()) - wxImage_AddHandler(wxPNGHandler()) - wxImage_AddHandler(wxGIFHandler()) - - self.splash = SplashScreen(None, bitmapfile='bitmaps/splash.gif', - duration=4000, callback=self.AfterSplash) - self.splash.Show(true) - wxYield() - return true - - def AfterSplash(self): - self.splash.Close(true) - frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)") - frame.Show(true) - self.SetTopWindow(frame) - return true - -#--------------------------------------------------------------------------- - -def main(): - try: - demoPath = os.path.split(__file__)[0] - os.chdir(demoPath) - except: - pass - app = MyApp(0) - app.MainLoop() - - -#--------------------------------------------------------------------------- - - - -overview = """\ -Python ------------- - -Python is an interpreted, interactive, object-oriented programming language often compared to Tcl, Perl, Scheme, or Java. - -Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, and new built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. - -wxWindows --------------------- - -wxWindows is a free C++ framework designed to make cross-platform programming child's play. Well, almost. wxWindows 2 supports Windows 3.1/95/98/NT, Unix with GTK/Motif/Lesstif, with a Mac version underway. Other ports are under consideration. - -wxWindows is a set of libraries that allows C++ applications to compile and run on several different types of computers, with minimal source code changes. There is one library per supported GUI (such as Motif, or Windows). As well as providing a common API (Application Programming Interface) for GUI functionality, it provides functionality for accessing some commonly-used operating system facilities, such as copying or deleting files. wxWindows is a 'framework' in the sense that it provides a lot of built-in functionality, which the application can use or replace as required, thus saving a great deal of coding effort. Basic data structures such as strings, linked lists and hash tables are also supported. - -wxPython ----------------- - -wxPython is a Python extension module that encapsulates the wxWindows GUI classes. Currently it is only available for the Win32 and GTK ports of wxWindows, but as soon as the other ports are brought up to the same level as Win32 and GTK, it should be fairly trivial to enable wxPython to be used with the new GUI. - -The wxPython extension module attempts to mirror the class heiarchy of wxWindows as closely as possible. This means that there is a wxFrame class in wxPython that looks, smells, tastes and acts almost the same as the wxFrame class in the C++ version. Unfortunately, because of differences in the languages, wxPython doesn't match wxWindows exactly, but the differences should be easy to absorb because they are natural to Python. For example, some methods that return multiple values via argument pointers in C++ will return a tuple of values in Python. - -There is still much to be done for wxPython, many classes still need to be mirrored. Also, wxWindows is still somewhat of a moving target so it is a bit of an effort just keeping wxPython up to date. On the other hand, there are enough of the core classes completed that useful applications can be written. - -wxPython is close enough to the C++ version that the majority of the wxPython documentation is actually just notes attached to the C++ documents that describe the places where wxPython is different. There is also a series of sample programs included, and a series of documentation pages that assist the programmer in getting started with wxPython. -""" - - - - - - - -#---------------------------------------------------------------------------- -#---------------------------------------------------------------------------- - -if __name__ == '__main__': - main() - -#---------------------------------------------------------------------------- - - - - - - - diff --git a/utils/wxPython/demo/OldSizers.py b/utils/wxPython/demo/OldSizers.py deleted file mode 100644 index 308bcec7c4..0000000000 --- a/utils/wxPython/demo/OldSizers.py +++ /dev/null @@ -1,400 +0,0 @@ -#---------------------------------------------------------------------- -# sizer test code -#---------------------------------------------------------------------- - -from wxPython.wx import * -from wxPython.lib.sizers import * - -#---------------------------------------------------------------------- - -def makeSimpleBox1(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 0) - box.Add(wxButton(win, 1010, "four"), 0) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox2(win): - box = wxBoxSizer(wxVERTICAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 0) - box.Add(wxButton(win, 1010, "four"), 0) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox3(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 0) - box.Add(wxButton(win, 1010, "four"), 0) - box.Add(wxButton(win, 1010, "five"), 1) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox4(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 1) - box.Add(wxButton(win, 1010, "four"), 1) - box.Add(wxButton(win, 1010, "five"), 1) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox5(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0) - box.Add(wxButton(win, 1010, "two"), 0) - box.Add(wxButton(win, 1010, "three"), 3) - box.Add(wxButton(win, 1010, "four"), 1) - box.Add(wxButton(win, 1010, "five"), 1) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBox6(win): - box = wxBoxSizer(wxHORIZONTAL, wxSize(250, 50)) - box.Add(wxButton(win, 1010, "10"), 10) - box.Add(wxButton(win, 1010, "20"), 20) - box.Add(wxButton(win, 1010, "30"), 30) - box.Add(wxButton(win, 1010, "15"), 15) - box.Add(wxButton(win, 1010, "5"), 5) - - return box - -#---------------------------------------------------------------------- - -def makeSimpleBorder1(win): - bdr = wxBorderSizer(wxALL) - btn = wxButton(win, 1010, "border") - btn.SetSize(wxSize(80, 80)) - bdr.Add(btn, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeSimpleBorder2(win): - bdr = wxBorderSizer(wxEAST | wxWEST) - btn = wxButton(win, 1010, "border") - btn.SetSize(wxSize(80, 80)) - bdr.Add(btn, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeSimpleBorder3(win): - bdr = wxBorderSizer(wxNORTH | wxWEST) - btn = wxButton(win, 1010, "border") - btn.SetSize(wxSize(80, 80)) - bdr.Add(btn, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeShapes(win): - box =wxBoxSizer(wxVERTICAL) - box.Add(wxStaticLine(win, -1), 0) - for line in ( - (wxANCHOR_NW, "NorthWest"), - (wxANCHOR_NORTH, "North"), - (wxANCHOR_NE, "NorthEast") - ), ( - (wxANCHOR_WEST, "West"), - (wxANCHOR_NONE, "Center"), - (wxANCHOR_EAST, "East") - ), ( - (wxANCHOR_SW, "SouthWest"), - (wxANCHOR_SOUTH, "South"), - (wxANCHOR_SE, "SouthEast") - ): - linebox =wxBoxSizer(wxHORIZONTAL) - linebox.Add(wxStaticLine(win, -1, style=wxVERTICAL), 0) - for (anchor, label) in line: - sizer =wxShapeSizer(anchor) - sizer.Add(wxButton(win, -1, label, size=wxSize(100, 50))) - linebox.Add(sizer, 1) - linebox.Add(wxStaticLine(win, -1, style=wxVERTICAL), 0) - box.Add(linebox, 1) - box.Add(wxStaticLine(win, -1), 0) - return box - -#---------------------------------------------------------------------- - -def makeBoxInBox(win): - box = wxBoxSizer(wxVERTICAL) - - box.Add(wxButton(win, 1010, "one")) - - box2 = wxBoxSizer(wxHORIZONTAL) - box2.AddMany([ wxButton(win, 1010, "two"), - wxButton(win, 1010, "three"), - wxButton(win, 1010, "four"), - wxButton(win, 1010, "five"), - ]) - - box3 = wxBoxSizer(wxVERTICAL) - box3.AddMany([ (wxButton(win, 1010, "six"), 0), - (wxButton(win, 1010, "seven"), 2), - (wxButton(win, 1010, "eight"), 1), - (wxButton(win, 1010, "nine"), 1), - ]) - - box2.Add(box3, 1) - box.Add(box2, 1) - - box.Add(wxButton(win, 1010, "ten")) - - return box - -#---------------------------------------------------------------------- - -def makeBoxInBorder(win): - bdr = wxBorderSizer(wxALL) - box = makeSimpleBox3(win) - bdr.Add(box, 15) - - return bdr - -#---------------------------------------------------------------------- - -def makeBorderInBox(win): - insideBox = wxBoxSizer(wxHORIZONTAL) - - box2 = wxBoxSizer(wxHORIZONTAL) - box2.AddMany([ wxButton(win, 1010, "one"), - wxButton(win, 1010, "two"), - wxButton(win, 1010, "three"), - wxButton(win, 1010, "four"), - wxButton(win, 1010, "five"), - ]) - - insideBox.Add(box2, 0) - - bdr = wxBorderSizer(wxALL) - bdr.Add(wxButton(win, 1010, "border"), 20) - insideBox.Add(bdr, 1) - - box3 = wxBoxSizer(wxVERTICAL) - box3.AddMany([ (wxButton(win, 1010, "six"), 0), - (wxButton(win, 1010, "seven"), 2), - (wxButton(win, 1010, "eight"), 1), - (wxButton(win, 1010, "nine"), 1), - ]) - insideBox.Add(box3, 1) - - outsideBox = wxBoxSizer(wxVERTICAL) - outsideBox.Add(wxButton(win, 1010, "top")) - outsideBox.Add(insideBox, 1) - outsideBox.Add(wxButton(win, 1010, "bottom")) - - return outsideBox - - -#---------------------------------------------------------------------- - -theTests = [ - ("Simple horizontal boxes", makeSimpleBox1, - "This is a HORIZONTAL box sizer with four non-stretchable buttons held " - "within it. Notice that the buttons are added and aligned in the horizontal " - "dimension. Also notice that they are fixed size in the horizontal dimension, " - "but will stretch vertically." - ), - - ("Simple vertical boxes", makeSimpleBox2, - "Exactly the same as the previous sample but using a VERTICAL box sizer " - "instead of a HORIZONTAL one." - ), - - ("Add a stretchable", makeSimpleBox3, - "We've added one more button with the strechable flag turned on. Notice " - "how it grows to fill the extra space in the otherwise fixed dimension." - ), - - ("More than one stretchable", makeSimpleBox4, - "Here there are several items that are stretchable, they all divide up the " - "extra space evenly." - ), - - ("Weighting factor", makeSimpleBox5, - "This one shows more than one strechable, but one of them has a weighting " - "factor so it gets more of the free space." - ), - -# ("Percent Sizer", makeSimpleBox6, -# "You can use the wxBoxSizer like a Percent Sizer. Just make sure that all " -# "the weighting factors add up to 100!" -# ), - - ("", None, ""), - - ("Simple border sizer", makeSimpleBorder1, - "The wxBorderSizer leaves empty space around its contents. This one " - "gives a border all the way around." - ), - - ("East and West border", makeSimpleBorder2, - "You can pick and choose which sides have borders." - ), - - ("North and West border", makeSimpleBorder3, - "You can pick and choose which sides have borders." - ), - - ("", None, ""), - - - ("Proportional resize", makeShapes, - "The wxShapeSizer preserves the original proportions of the window." - ), - - ("", None, ""), - - ("Boxes inside of boxes", makeBoxInBox, - "This one shows nesting of boxes within boxes within boxes, using both " - "orientations. Notice also that button seven has a greater weighting " - "factor than its siblings." - ), - - ("Boxes inside a Border", makeBoxInBorder, - "Sizers of different types can be nested withing each other as well. " - "Here is a box sizer with several buttons embedded within a border sizer." - ), - - ("Border in a Box", makeBorderInBox, - "Another nesting example. This one has Boxes and a Border inside another Box." - ), - - ] -#---------------------------------------------------------------------- - -class TestFrame(wxFrame): - def __init__(self, parent, title, sizerFunc): - wxFrame.__init__(self, parent, -1, title) - EVT_BUTTON(self, 1010, self.OnButton) - - self.sizer = sizerFunc(self) - self.CreateStatusBar() - self.SetStatusText("Resize this frame to see how the sizers respond...") - self.sizer.FitWindow(self) - - - def OnSize(self, event): - size = self.GetClientSize() - self.sizer.Layout(size) - - def OnCloseWindow(self, event): - self.MakeModal(false) - self.Destroy() - - def OnButton(self, event): - self.Close(true) - -#---------------------------------------------------------------------- - - - -class TestSelectionPanel(wxPanel): - def __init__(self, parent, frame=NULL): - wxPanel.__init__(self, parent, -1) - self.frame = frame - - self.list = wxListBox(self, 401, - wxDLG_PNT(self, 10, 10), wxDLG_SZE(self, 100, 60), - []) - EVT_LISTBOX(self, 401, self.OnSelect) - EVT_LISTBOX_DCLICK(self, 401, self.OnDClick) - - wxButton(self, 402, "Try it!", wxDLG_PNT(self, 120, 10)).SetDefault() - EVT_BUTTON(self, 402, self.OnDClick) - - self.text = wxTextCtrl(self, -1, "", - wxDLG_PNT(self, 10, 80), - wxDLG_SZE(self, 200, 60), - wxTE_MULTILINE | wxTE_READONLY) - - for item in theTests: - self.list.Append(item[0]) - - - - def OnSelect(self, event): - pos = self.list.GetSelection() - self.text.SetValue(theTests[pos][2]) - - - def OnDClick(self, event): - pos = self.list.GetSelection() - title = theTests[pos][0] - func = theTests[pos][1] - - if func: - win = TestFrame(self, title, func) - win.CentreOnParent(wxBOTH) - win.Show(true) - win.MakeModal(true) - -#---------------------------------------------------------------------- - -def runTest(frame, nb, log): - win = TestSelectionPanel(nb, frame) - return win - -overview = wxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \ - wxBoxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \ - wxBorderSizer.__doc__ - -#---------------------------------------------------------------------- - - - -if __name__ == '__main__': - - class MainFrame(wxFrame): - def __init__(self): - wxFrame.__init__(self, NULL, -1, "Testing...") - - self.CreateStatusBar() - mainmenu = wxMenuBar() - menu = wxMenu() - menu.Append(200, 'E&xit', 'Get the heck outta here!') - mainmenu.Append(menu, "&File") - self.SetMenuBar(mainmenu) - EVT_MENU(self, 200, self.OnExit) - self.panel = TestSelectionPanel(self, self) - self.SetSize(wxSize(400, 380)) - - def OnCloseWindow(self, event): - self.Destroy() - - def OnExit(self, event): - self.Close(true) - - - class TestApp(wxApp): - def OnInit(self): - frame = MainFrame() - frame.Show(true) - self.SetTopWindow(frame) - return true - - app = TestApp(0) - app.MainLoop() - - -#---------------------------------------------------------------------- diff --git a/utils/wxPython/demo/wxGrid.py b/utils/wxPython/demo/wxGrid.py deleted file mode 100644 index dca12c088f..0000000000 --- a/utils/wxPython/demo/wxGrid.py +++ /dev/null @@ -1,87 +0,0 @@ - -from wxPython.wx import * - -#--------------------------------------------------------------------------- - -class TestGrid(wxGrid): - def __init__(self, parent, log): - wxGrid.__init__(self, parent, -1) - self.log = log - - self.CreateGrid(16, 16) - self.SetColumnWidth(3, 200) - self.SetRowHeight(4, 45) - self.SetCellValue("First cell", 0, 0) - self.SetCellValue("Another cell", 1, 1) - self.SetCellValue("Yet another cell", 2, 2) - self.SetCellTextFont(wxFont(12, wxROMAN, wxITALIC, wxNORMAL), 0, 0) - self.SetCellTextColour(wxRED, 1, 1) - self.SetCellBackgroundColour(wxCYAN, 2, 2) - self.UpdateDimensions() - self.AdjustScrollbars() - - EVT_GRID_SELECT_CELL(self, self.OnSelectCell) - EVT_GRID_CELL_CHANGE(self, self.OnCellChange) - EVT_GRID_CELL_LCLICK(self, self.OnCellClick) - EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick) - - self.SetEditInPlace(true) - #print self.GetCells() - - - def OnSelectCell(self, event): - self.log.WriteText("OnSelectCell: (%d, %d)\n" % (event.m_row, event.m_col)) - - def OnCellChange(self, event): - self.log.WriteText("OnCellChange: (%d, %d)\n" % (event.m_row, event.m_col)) - - def OnCellClick(self, event): - self.log.WriteText("OnCellClick: (%d, %d)\n" % (event.m_row, event.m_col)) - - def OnLabelClick(self, event): - self.log.WriteText("OnLabelClick: (%d, %d)\n" % (event.m_row, event.m_col)) - #if event.m_row >= 10: - # self.SetLabelValue(wxVERTICAL, 'XX', event.m_row) - # self.Refresh() - #else: - # size = self.GetLabelSize(wxVERTICAL) - # print size - # self.SetLabelSize(wxVERTICAL, size+10) - # self.Refresh() - -#--------------------------------------------------------------------------- - -def runTest(frame, nb, log): - win = TestGrid(nb, log) - return win - -#--------------------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - -overview = """\ -wxGrid is a class for displaying and editing tabular information. - -wxGrid() ------------------ - -wxGrid(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="grid") - -Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns. -""" diff --git a/utils/wxPython/demo/wxTextEntryDialog.py b/utils/wxPython/demo/wxTextEntryDialog.py deleted file mode 100644 index 08e93e237e..0000000000 --- a/utils/wxPython/demo/wxTextEntryDialog.py +++ /dev/null @@ -1,50 +0,0 @@ - -from wxPython.wx import * - -#--------------------------------------------------------------------------- - -def runTest(frame, nb, log): - dlg = wxTextEntryDialog(frame, 'What is your favorite programming language?', - 'Duh??', 'Python') - dlg.SetValue("Python is the best!") #### this doesn't work? - if dlg.ShowModal() == wxID_OK: - log.WriteText('You entered: %s\n' % dlg.GetValue()) - dlg.Destroy() - - -#--------------------------------------------------------------------------- - - - - - - - - - - - - -overview = """\ -This class represents a dialog that requests a one-line text string from the user. It is implemented as a generic wxWindows dialog. - -wxTextEntryDialog() ----------------------------------- - -wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", const wxString& defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition) - -Constructor. Use wxTextEntryDialog::ShowModal to show the dialog. - -Parameters -------------------- - -parent = Parent window. - -message = Message to show on the dialog. - -defaultValue = The default value, which may be the empty string. - -style = A dialog style, specifying the buttons (wxOK, wxCANCEL) and an optional wxCENTRE style. - -pos = Dialog position. -""" diff --git a/utils/wxPython/distrib/.rpmrc b/utils/wxPython/distrib/.rpmrc deleted file mode 100644 index 1fbb510693..0000000000 --- a/utils/wxPython/distrib/.rpmrc +++ /dev/null @@ -1,5 +0,0 @@ -sourcedir : . -builddir : . -rpmdir : . -srcrpmdir : . - diff --git a/utils/wxPython/distrib/makerpm b/utils/wxPython/distrib/makerpm deleted file mode 100755 index c17bcf73e9..0000000000 --- a/utils/wxPython/distrib/makerpm +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -if [ -z $1 ]; then - echo "Please specify a version number on the command line." - exit 1 -fi - -if [ ! -f wxPython.spec.in ]; then - echo "Please run this script from the directory containing the wxPython.spec.in file." - exit 1 -fi - - - -strip /usr/lib/python1.5/site-packages/wxPython/*.so -strip /usr/lib/libwxPyHelpers.so - -cat wxPython.spec.in | sed s/__VERSION__/$1/g > wxPython.spec - -mkdir /usr/doc/wxPython-$1 -cp ../README.txt /usr/doc/wxPython-$1 -cp ../../../docs/preamble.txt /usr/doc/wxPython-$1 -cp ../../../docs/licence.txt /usr/doc/wxPython-$1 -cp ../../../docs/licendoc.txt /usr/doc/wxPython-$1 -cp ../../../docs/lgpl.txt /usr/doc/wxPython-$1 -cp ../../../docs/gpl.txt /usr/doc/wxPython-$1 - -rpm -bb wxPython.spec - -mv /usr/src/redhat/RPMS/*/wxPython*.rpm . -chown rd:users wxPython*.rpm - -rm -r /usr/doc/wxPython-$1 \ No newline at end of file diff --git a/utils/wxPython/distrib/maketgz b/utils/wxPython/distrib/maketgz deleted file mode 100755 index b5799aea5d..0000000000 --- a/utils/wxPython/distrib/maketgz +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -#---------------------------------------------------------------------- -# Make a source distribution as a tar.gz file. This script should be -# run from the directory that holds the wxPython dir (../..) and be -# given a version number as an parameter. The best way to do this is -# run "make dist" in the wxPython/src/ directory. -#---------------------------------------------------------------------- - -if [ -z $1 ]; then - echo "Please specify a version number on the command line." - exit 1 -fi - -if [ ! -d wxPython ]; then - echo "Please run this script from the directory containing the wxPython directory." - exit 1 -fi - -cp $WXWIN/docs/gpl.txt wxPython -cp $WXWIN/docs/lgpl.txt wxPython -cp $WXWIN/docs/licence.txt wxPython -cp $WXWIN/docs/licendoc.txt wxPython -cp $WXWIN/docs/preamble.txt wxPython - -rm -f wxPython/distrib/filelist -for x in `cat wxPython/distrib/wxPython.rsp`; do - ls $x >> wxPython/distrib/filelist -done - - -tar cf wxPython/distrib/dist-temp.tar -T wxPython/distrib/filelist -cd wxPython/distrib -tar xf dist-temp.tar -rm dist-temp.tar -mv wxPython wxPython-$1 -rm wxPython-$1/src/gtk/helpers.cpp - -tar cvf wxPython-$1.tar wxPython-$1 -gzip wxPython-$1.tar - -rm -rf wxPython-$1 - - - - - - - diff --git a/utils/wxPython/distrib/wxPython.rsp b/utils/wxPython/distrib/wxPython.rsp deleted file mode 100644 index 9f1f3fd005..0000000000 --- a/utils/wxPython/distrib/wxPython.rsp +++ /dev/null @@ -1,104 +0,0 @@ -wxPython/*.txt - -wxPython/demo/*.py -wxPython/demo/bitmaps/*.bmp -wxPython/demo/bitmaps/*.ico -wxPython/demo/bitmaps/*.gif -wxPython/demo/bitmaps/*.png -wxPython/demo/bitmaps/*.jpg -wxPython/demo/README.txt -wxPython/demo/*.xml -wxPython/demo/data/*.png -wxPython/demo/data/*.htm -wxPython/demo/data/*.bmp - -wxPython/distrib/build.py - -wxPython/lib/*.py -wxPython/lib/*.txt -wxPython/lib/sizers/*.py -wxPython/lib/sizers/*.txt -wxPython/lib/editor/*.py -wxPython/lib/editor/*.txt - - -wxPython/src/build.cfg -wxPython/src/*.i -wxPython/src/*.py -wxPython/src/*.cpp -wxPython/src/*.c -wxPython/src/*.h -wxPython/src/*.ico -wxPython/src/*.def -wxPython/src/*.rc - -wxPython/src/msw/*.cpp -wxPython/src/msw/*.h -wxPython/src/msw/*.py - -wxPython/src/gtk/*.cpp -wxPython/src/gtk/*.h -wxPython/src/gtk/*.py - -wxpython/src/motif/*.cpp -wxPython/src/motif/*.h -wxPython/src/motif/*.py - - -wxPython/modules/html/build.cfg -wxPython/modules/html/*.i -wxPython/modules/html/*.py -wxPython/modules/html/*.cpp -wxPython/modules/html/*.c -wxPython/modules/html/*.h -wxPython/modules/html/*.def -wxPython/modules/html/*.rc -wxPython/modules/html/*.cpp -wxPython/modules/html/*.h -wxPython/modules/html/*.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/*.cpp -wxPython/modules/ogl/*.h -wxPython/modules/ogl/*.py - - - - diff --git a/utils/wxPython/distrib/wxPython.spec.in b/utils/wxPython/distrib/wxPython.spec.in deleted file mode 100644 index e67b7bb249..0000000000 --- a/utils/wxPython/distrib/wxPython.spec.in +++ /dev/null @@ -1,53 +0,0 @@ -Summary: Cross platform GUI toolkit for use with the Python language. -Name: wxPython -Version: __VERSION__ -Release: 1 -Copyright: wxWindows -Group: Development/Languages/Python -Source: http://alldunn.com/wxPython/wxPython-__VERSION__.tar.gz -Packager: Robin Dunn -Vendor: Total Control Software -Requires: python >= 1.5.1 -Prefix: /usr/lib/python1.5/site-packages - -%description - -This Python package consists of an extension module that wraps around the -wxWindows C++ class library and provides a cross platform GUI toolkit for -use with Python. Currently supported platforms are Win32 and Unix/GTK/X. - -Python is an interpreted, interactive, object-oriented programming language. -Python combines remarkable power with very clear syntax. It has modules, -classes, exceptions, very high level dynamic data types, and dynamic typing. -There are interfaces to many system calls and libraries, and new built-in -modules are easily written in C or C++. Python is also usable as an -extension language for applications that need a programmable interface. - -#%prep -#%setup -#cd wxPython-__VERSION__ -#make -f Makefile.pre.in boot -# -#%build -#make -# -# -#%install -#make install - -%post -/sbin/ldconfig - -%postun -/sbin/ldconfig - -%files -%doc /usr/doc/wxPython-__VERSION__ -/usr/lib/libwxPyHelpers.so -/usr/lib/python1.5/site-packages/wxPython - - - - - - diff --git a/utils/wxPython/distrib/wxPython.wsm b/utils/wxPython/distrib/wxPython.wsm deleted file mode 100644 index 16ffb01726ff7b40183f537dd966985df430adc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33 mcmWF!_BGq8#lXPGFh%`*?#FrN3{0|23?RT5TCS4l$^Zb7zXyW= diff --git a/utils/wxPython/distrib/zipit.bat b/utils/wxPython/distrib/zipit.bat deleted file mode 100755 index 6a32acca72..0000000000 --- a/utils/wxPython/distrib/zipit.bat +++ /dev/null @@ -1,28 +0,0 @@ - -@echo off - -copy %WXWIN%\docs\gpl.txt wxPython -copy %WXWIN%\docs\lgpl.txt wxPython -copy %WXWIN%\docs\licence.txt wxPython -copy %WXWIN%\docs\licendoc.txt wxPython -copy %WXWIN%\docs\preamble.txt wxPython - -zip -@ -r wxPython\wxPython-src-%1.zip < wxPython\distrib\wxPython.rsp - -mkdir wxPython\docs -mkdir wxPython\docs\wx -copy %WXWIN%\docs\html\wx\*.gif wxPython\docs\wx -copy %WXWIN%\docs\html\wx\*.htm wxPython\docs\wx -copy wxPython\docs\wx\wx.htm wxPython\docs\wx\index.htm - -mkdir wxPython\docs\ogl -copy %WXWIN%\docs\html\ogl\*.gif wxPython\docs\ogl -copy %WXWIN%\docs\html\ogl\*.htm wxPython\docs\ogl -copy wxPython\docs\ogl\ogl.htm wxPython\docs\ogl\index.htm - - -zip -r wxPython\wxPython-docs-%1.zip wxPython\docs - -del /sxzy wxPython\docs - -move /R wxPython\*.zip wxPython\distrib diff --git a/utils/wxPython/lib/filebrowsebutton.py b/utils/wxPython/lib/filebrowsebutton.py deleted file mode 100644 index 719287c246..0000000000 --- a/utils/wxPython/lib/filebrowsebutton.py +++ /dev/null @@ -1,170 +0,0 @@ -from wxPython.wx import * -import os - -#---------------------------------------------------------------------- - -class FileBrowseButton(wxPanel): - ''' A control to allow the user to type in a filename - or browse with the standard file dialog to select file - - __init__ ( - parent, id, pos, size -- passed directly to wxPanel initialisation - style = wxTAB_TRAVERSAL -- passed directly to wxPanel initialisation - labelText -- Text for label to left of text field - buttonText -- Text for button which launches the file dialog - toolTip -- Help text - dialogTitle -- Title used in file dialog - startDirectory -- Default directory for file dialog startup - fileMask -- File mask (glob pattern, such as *.*) to use in file dialog - fileMode -- wxOPEN or wxSAVE, indicates type of file dialog to use - changeCallback -- callback receives all changes in value of control - ) - GetValue() -- retrieve current value of text control - SetValue(string) -- set current value of text control - label -- pointer to internal label widget - textControl -- pointer to internal text control - browseButton -- pointer to button - ''' - def __init__ (self, parent, id= -1, - pos = wxDefaultPosition, size = wxDefaultSize, - style = wxTAB_TRAVERSAL, - labelText= "File Entry:", - buttonText= "Browse", - toolTip= "Type filename or browse computer to choose file", - # following are the values for a file dialog box - dialogTitle = "Choose a file", - startDirectory = ".", - initialValue = "", - fileMask = "*.*", - fileMode = wxOPEN, - # callback for when value changes (optional) - changeCallback= None - ): - wxPanel.__init__ (self, parent, id, pos, size, style) - # store variables - self.dialogTitle = dialogTitle - self.startDirectory = startDirectory - self.fileMask = fileMask - self.fileMode = fileMode - self.changeCallback = changeCallback - - box = wxBoxSizer(wxHORIZONTAL) - self.label = wxStaticText(self, -1, labelText, style =wxALIGN_RIGHT ) - font = self.label.GetFont() - w, h, d, e = self.GetFullTextExtent(labelText, font) - self.label.SetSize(wxSize(w+5, h)) - box.Add( self.label, 0, wxCENTER ) - - ID = wxNewId() - self.textControl = wxTextCtrl(self, ID) - self.textControl.SetToolTipString( toolTip ) - box.Add( self.textControl, 1, wxLEFT|wxCENTER, 5) - if changeCallback: - EVT_TEXT(self.textControl, ID, changeCallback) - - ID = wxNewId() - self.browseButton = button =wxButton(self, ID, buttonText) - box.Add( button, 0, wxCENTER) - button.SetToolTipString( toolTip ) - EVT_BUTTON(button, ID, self.OnBrowse) - - # add a border around the whole thing and resize the panel to fit - outsidebox = wxBoxSizer(wxVERTICAL) - outsidebox.Add(box, 1, wxEXPAND|wxALL, 3) - outsidebox.Fit(self) - - self.SetAutoLayout(true) - self.SetSizer( outsidebox ) - self.Layout() - if size.width != -1 or size.height != -1: - self.SetSize(size) - - - - def OnBrowse (self, event = None): - ''' Going to browse for file... ''' - current = self.GetValue () - directory = os.path.split(current) - if os.path.isdir( current): - directory =current - elif directory and os.path.isdir( directory[0] ): - directory = directory [0] - else: - directory = self.startDirectory - dlg = wxFileDialog(self, self.dialogTitle, directory, current, self.fileMask, self.fileMode) - if dlg.ShowModal() == wxID_OK: - self.SetValue (dlg.GetPath()) - dlg.Destroy() - self.textControl.SetFocus() - - - def GetValue (self): - ''' Convenient access to text control value ''' - return self.textControl.GetValue () - - - def SetValue (self, value): - ''' Convenient setting of text control value ''' - return self.textControl.SetValue (value) - - def Enable (self, value): - ''' Convenient enabling/disabling of entire control ''' - self.label.Enable (value) - self.textControl.Enable (value) - return self.browseButton.Enable (value) - - def GetLabel( self ): - ''' Retrieve the label's current text ''' - return self.label.GetLabel() - - def SetLabel( self, value ): - ''' Set the label's current text ''' - return self.label.SetLabel( value ) - - - -#---------------------------------------------------------------------- - - -if __name__ == "__main__": - #from skeletonbuilder import rulesfile - class DemoFrame( wxFrame ): - def __init__(self, parent): - wxFrame.__init__(self, parent, 2400, "File entry with browse", size=(500,100) ) - panel = wxPanel (self,-1) - innerbox = wxBoxSizer(wxVERTICAL) - control = FileBrowseButton(panel) - innerbox.Add( control, 0, wxEXPAND ) - control = FileBrowseButton(panel, labelText = "With Callback", style = wxSUNKEN_BORDER ,changeCallback= self.OnFileNameChanged) - innerbox.Add( control, 0, wxEXPAND|wxALIGN_BOTTOM ) - panel.SetAutoLayout(true) - panel.SetSizer( innerbox ) - - def OnFileNameChanged (self, event): - print "Filename changed", event.GetString () - - def OnCloseMe(self, event): - self.Close(true) - - def OnCloseWindow(self, event): - self.Destroy() - - class DemoApp(wxApp): - def OnInit(self): - wxImage_AddHandler(wxJPEGHandler()) - wxImage_AddHandler(wxPNGHandler()) - wxImage_AddHandler(wxGIFHandler()) - frame = DemoFrame(NULL) - #frame = RulesPanel(NULL ) - frame.Show(true) - self.SetTopWindow(frame) - return true - - def test( ): - app = DemoApp(0) - app.MainLoop() - print 'Creating dialogue' - test( ) - - - diff --git a/utils/wxPython/lib/sizers/.cvsignore b/utils/wxPython/lib/sizers/.cvsignore deleted file mode 100644 index 2f78cf5b66..0000000000 --- a/utils/wxPython/lib/sizers/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pyc - diff --git a/utils/wxPython/lib/sizers/__init__.py b/utils/wxPython/lib/sizers/__init__.py deleted file mode 100644 index d73718ade5..0000000000 --- a/utils/wxPython/lib/sizers/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -#---------------------------------------------------------------------------- -# Name: __init__.py -# Purpose: The presence of this file turns this directory into a -# Python package. -# -# Author: Robin Dunn -# -# Created: 18-May-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- - -from sizer import * -from box import * -from border import * -from shape import * - -#---------------------------------------------------------------------------- -_msg = """\ -Since the wxWindows library now includes its own sizers, the -classes in wxPython.lib.sizers have been deprecated. Please -see the Reference Manual for details of the new classes. - -To contiunue using wxPython.lib.sizers without this -message you can set the WXP_OLDSIZERS envronment -variable to any value. -""" - - -import os -from wxPython.wx import wxMessageDialog, wxOK, wxICON_EXCLAMATION, wxPlatform - -if not os.environ.has_key('WXP_OLDSIZERS'): - if wxPlatform == '__WXMSW__': - dlg = wxMessageDialog(None, _msg, - "Deprecated Feature", - wxOK | wxICON_EXCLAMATION) - dlg.ShowModal() - dlg.Destroy() - else: - print '\a' - print _msg - -#---------------------------------------------------------------------------- diff --git a/utils/wxPython/lib/sizers/border.py b/utils/wxPython/lib/sizers/border.py deleted file mode 100644 index fd054c632e..0000000000 --- a/utils/wxPython/lib/sizers/border.py +++ /dev/null @@ -1,109 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.border -# Purpose: A Sizer that wraps an empty border around its contents -# -# Author: Robin Dunn -# -# Created: 9-June-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from sizer import wxSizer - -wxNORTH = 1 -wxSOUTH = 2 -wxEAST = 4 -wxWEST = 8 -wxALL = wxNORTH | wxSOUTH | wxEAST | wxWEST - -#---------------------------------------------------------------------- - -class wxBorderSizer(wxSizer): - """ - wxBorderSizer - - This sizer provides an empty buffer on one or more sides of it's - contents. It can only hold a single widget, but that can be a - sizer containing other items if you wish. - - The sizer is constructed with a parameter specifying which sides - should have the border. You can use a logical OR of the following - values to specify the sides: - - wxNORTH -- the top side - wxSOUTH -- the bottom side - wxEAST -- the right side - wxWEST -- the left side - wxALL -- all sides - - The width in pixels of the border is specified when the child - widget is Added to the sizer. - - """ - def __init__(self, sides = wxALL): - wxSizer.__init__(self) - self.sides = sides - - - def Add(self, widget, borderSize): - if self.children: - raise ValueError("wxBorderSizer can only contain one child.") - - wxSizer.Add(self, widget, borderSize) - - - def CalcMin(self): - isSizer, widget, width, height, borderSize = self.children[0] - - if isSizer: - width, height = widget.CalcMin() - - if self.sides & wxEAST: - width = width + borderSize - - if self.sides & wxWEST: - width = width + borderSize - - if self.sides & wxNORTH: - height = height + borderSize - - if self.sides & wxSOUTH: - height = height + borderSize - - return width, height - - - def RecalcSizes(self): - isSizer, widget, width, height, borderSize = self.children[0] - width = self.size.width - height = self.size.height - px = self.origin.x - py = self.origin.y - - if self.sides & wxWEST: - width = width - borderSize - px = px + borderSize - if self.sides & wxEAST: - width = width - borderSize - - if self.sides & wxNORTH: - height = height - borderSize - py = py + borderSize - if self.sides & wxSOUTH: - height = height - borderSize - - widget.SetDimensions(px, py, width, height) - - -#---------------------------------------------------------------------- -# -# TODO... Make an abstract class wxBorder whose decendants can be added to -# a wxBorderSizer to provide drawing for the buffer area. Ideas are -# to provide a color border, beveled borders, rounded borders, etc. - - - - - diff --git a/utils/wxPython/lib/sizers/box.py b/utils/wxPython/lib/sizers/box.py deleted file mode 100644 index 64c9378565..0000000000 --- a/utils/wxPython/lib/sizers/box.py +++ /dev/null @@ -1,137 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.box -# Purpose: A sizer/layout managers for wxPython that places items in -# a stretchable box -# -# Author: Robin Dunn and Dirk Holtwick -# -# Created: 17-May-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from sizer import wxSizer -from wxPython.wx import wxVERTICAL, wxHORIZONTAL - -#---------------------------------------------------------------------- - - -class wxBoxSizer(wxSizer): - """ - wxBoxSizer - - A Sizer that lays components out in a box, in the order they are - added to the layout manager, with a given orientation. The - orientation is specified in the constructor with either wxVERTICAL - or wxHORIZONTAL. - - The optional parameter to the Add method (for this sizer it's - called the stretch flag) can be used to flag one or more components - as stretchable, meaning that they will expand to fill available - space in the given orientation. The default is zero, or not - stretchable. - - If the stretch flag is non-zero then the widget will stretch. If - the sizer holds more than one item that is stretchable then they - share the available space. - - If the strech flag is greater than 1 then it serves as a weighting - factor. Widgets with a flag of 2 will get twice as much space as - widgets with 1, etc. - """ - def __init__(self, orientation, size = None): - wxSizer.__init__(self, size) - self.orientation = orientation - - - def CalcMin(self): - self.stretchable = 0 # number of stretchable items - self.minWidth = 0 # minimal size - self.minHeight = 0 - self.fixedWidth = 0 # size without stretched widgets - self.fixedHeight = 0 - - # iterate through children - for (isSizer, widget, width, height, stretch) in self.children: - weight = 1 - if stretch: - weight = stretch - - if isSizer: - # let sub-sizers recalc their required space - width, height = widget.CalcMin() - - # minimal size - if self.orientation == wxVERTICAL: - self.minHeight = self.minHeight + (height * weight) - self.minWidth = max(self.minWidth, width) - else: - self.minWidth = self.minWidth + (width * weight) - self.minHeight = max(self.minHeight, height) - - # stretchable items - if stretch: - self.stretchable = self.stretchable + weight - else: - if self.orientation == wxVERTICAL: - self.fixedHeight = self.fixedHeight + height - self.fixedWidth = max(self.fixedWidth, width) - else: - self.fixedWidth = self.fixedWidth + width - self.fixedHeight = max(self.fixedHeight, height) - - return self.minWidth, self.minHeight - - - - def RecalcSizes(self): - # get current dimensions, save for performance - myWidth = self.size.width - myHeight = self.size.height - - # relative recent positions & sizes - px = self.origin.x - py = self.origin.y - newWidth = 0 - newHeight = 0 - - # calculate space for one stretched item - if self.stretchable: - if self.orientation == wxHORIZONTAL: - delta = (myWidth - self.fixedWidth) / self.stretchable - extra = (myWidth - self.fixedWidth) % self.stretchable - else: - delta = (myHeight - self.fixedHeight) / self.stretchable - extra = (myHeight - self.fixedHeight) % self.stretchable - - # iterate children ... - for (isSizer, widget, width, height, stretch) in self.children: - weight = 1 - if stretch: - weight = stretch - - if isSizer: - width, height = widget.CalcMin() - - # ... vertical - if self.orientation == wxVERTICAL: - newHeight = height - if stretch: - newHeight = (delta * weight) + extra # first stretchable gets extra pixels - extra = 0 - widget.SetDimensions(px, py, myWidth, newHeight) - - # ... horizontal - elif self.orientation == wxHORIZONTAL: - newWidth = width - if stretch: - newWidth = (delta * weight) + extra # first stretchable gets extra pixels - extra = 0 - widget.SetDimensions(px, py, newWidth, myHeight) - - px = px + newWidth - py = py + newHeight - - -#---------------------------------------------------------------------- diff --git a/utils/wxPython/lib/sizers/shape.py b/utils/wxPython/lib/sizers/shape.py deleted file mode 100644 index cd38c23421..0000000000 --- a/utils/wxPython/lib/sizers/shape.py +++ /dev/null @@ -1,97 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.shape -# Purpose: A Sizer that preserves the shape (proportions) -# of the managed window -# -# Created: 7-October-1999 -# RCS-ID: $Id$ -# Copyright: SIA "ANK" -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from sizer import wxSizer - -wxANCHOR_NONE = 0 -wxANCHOR_NORTH = 1 -wxANCHOR_SOUTH = 2 -wxANCHOR_EAST = 4 -wxANCHOR_WEST = 8 -wxANCHOR_NW = wxANCHOR_NORTH | wxANCHOR_WEST -wxANCHOR_NE = wxANCHOR_NORTH | wxANCHOR_EAST -wxANCHOR_SW = wxANCHOR_SOUTH | wxANCHOR_WEST -wxANCHOR_SE = wxANCHOR_SOUTH | wxANCHOR_EAST - -#---------------------------------------------------------------------- - -class wxShapeSizer(wxSizer): - """ - wxShapeSizer - - This sizer preserves the proportional dimensions of the managed - window, leaving empty space either in horizontal or vertical - dimension. - - By default, the managed window is centered within allowed size. - You may specify an anchor parameter to leave all of the extra - space on one side: wxANCHOR_NORTH and wxANCHOR_SOUTH manage - vertical dimension, leaving extra space on the bottom or top side, - respectively; wxANCHOR_EAST and wxANCHOR_WEST do the same in - horizontal dimension. wxANCHOR_NW, wxANCHOR_NE, wxANCHOR_SW - and wxANCHOR_SE are short-cut names for combinations north+west, - north+east, south+west, south+east. - - If both anchors are specified in either direction, south and east - take precedence over north and west, respectively. (Because of - gravity, widgets tend to fall down.) - """ - def __init__(self, anchor =wxANCHOR_NONE): - wxSizer.__init__(self) - self.anchor =anchor - - def Add(self, widget): - if self.children: - raise ValueError("wxShapeSizer can only contain one child.") - - wxSizer.Add(self, widget) - - def CalcMin(self): - isSizer, widget, width, height, borderSize = self.children[0] - - if isSizer: - width, height = widget.CalcMin() - - return width, height - - def RecalcSizes(self): - isSizer, widget, width, height, borderSize = self.children[0] - width =self.size.width - height =self.size.height - px =self.origin.x - py =self.origin.y - anchor =self.anchor - # get current dimensions of the managed window - w, h =self.CalcMin() - ratio =float(w) /h - # in what direction space should be added: - # -1: horisontal - # 1: vertical - # 0: shape is ok - dir =cmp(ratio /width *height, 1) - if dir <0: - # recalculate width - old_width =width - width =height *ratio - if anchor & wxANCHOR_EAST: - px =px +old_width -width - elif not (anchor & wxANCHOR_WEST): - px =px +(old_width -width) /2 - elif dir >0: - # recalculate height - old_height =height - height =width /ratio - if anchor & wxANCHOR_SOUTH: - py =py +old_height -height - elif not (anchor & wxANCHOR_NORTH): - py =py +(old_height -height) /2 - - widget.SetDimensions(px, py, width, height) diff --git a/utils/wxPython/lib/sizers/sizer.py b/utils/wxPython/lib/sizers/sizer.py deleted file mode 100644 index 5cca29cbfe..0000000000 --- a/utils/wxPython/lib/sizers/sizer.py +++ /dev/null @@ -1,112 +0,0 @@ -#---------------------------------------------------------------------- -# Name: wxPython.lib.sizers.sizer -# Purpose: General purpose sizer/layout managers for wxPython -# -# Author: Robin Dunn and Dirk Holtwick -# -# Created: 17-May-1999 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------- - -from wxPython.wx import wxPoint, wxSize - -#---------------------------------------------------------------------- - -class wxSizer: - """ - wxSizer - - An abstract base sizer class. A sizer is able to manage the size and - layout of windows and/or child sizers. - - Derived classes should implement CalcMin, and RecalcSizes. - - A window or sizer is added to this sizer with the Add method: - - def Add(self, widget, opt=0) - - The meaning of the opt parameter is different for each type of - sizer. It may be a single value or a collection of values. - """ - def __init__(self, size = None): - self.children = [] - self.origin = wxPoint(0, 0) - if not size: - size = wxSize(0,0) - self.size = size - - def Add(self, widget, opt=0): - """ - Add a window or a sizer to this sizer. The meaning of the opt - parameter is different for each type of sizer. It may be a single - value or a collection of values. - """ - size = widget.GetSize() - isSizer = isinstance(widget, wxSizer) - self.children.append( (isSizer, widget, size.width, size.height, opt) ) - - - def AddMany(self, widgets): - """ - Add a sequence (list, tuple, etc.) of widgets to this sizer. The - items in the sequence should be tuples containing valid args for - the Add method. - """ - for childinfo in widgets: - if type(childinfo) != type(()): - childinfo = (childinfo, ) - apply(self.Add, childinfo) - - - def SetDimensions(self, x, y, width, height): - self.origin = wxPoint(x, y) - self.size = wxSize(width, height) - self.RecalcSizes() - - def GetSize(self): - return self.size - - def GetPosition(self): - return self.origin - - def CalcMin(self): - raise NotImplementedError("Derived class should implement CalcMin") - - def RecalcSizes(self): - raise NotImplementedError("Derived class should implement RecalcSizes") - - - - def __getMinWindowSize(self, win): - """ - Calculate the best size window to hold this sizer, taking into - account the difference between client size and window size. - """ - min = self.GetMinSize() - a1,a2 = win.GetSizeTuple() - b1,b2 = win.GetClientSizeTuple() - w = min.width + (a1 - b1) - h = min.height + (a2 - b2) - return (w, h) - - - def GetMinSize(self): - minWidth, minHeight = self.CalcMin() - return wxSize(minWidth, minHeight) - - def SetWindowSizeHints(self, win): - w, h = self.__getMinWindowSize(win) - win.SetSizeHints(w,h) - - def FitWindow(self, win): - w, h = self.__getMinWindowSize(win) - win.SetSize(wxSize(w,h)) - - def Layout(self, size): - self.CalcMin() - self.SetDimensions(self.origin.x, self.origin.y, - size.width, size.height) - -#---------------------------------------------------------------------- diff --git a/utils/wxPython/modules/README b/utils/wxPython/modules/README deleted file mode 100644 index 152f6fcc62..0000000000 --- a/utils/wxPython/modules/README +++ /dev/null @@ -1,14 +0,0 @@ -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. diff --git a/utils/wxPython/modules/buildall.py b/utils/wxPython/modules/buildall.py deleted file mode 100755 index 79ef843b1f..0000000000 --- a/utils/wxPython/modules/buildall.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/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', 'ogl', ] #'lseditor'] - - - -for module in MODULELIST: - cwd = os.getcwd() - print "**** Building %s ****" % module - err = build.main([sys.argv[0], '-C', module] + sys.argv[1:]) - os.chdir(cwd) - if err: - break - -sys.exit(err) diff --git a/utils/wxPython/modules/glcanvas/build.cfg b/utils/wxPython/modules/glcanvas/build.cfg deleted file mode 100644 index d10ce6d56f..0000000000 --- a/utils/wxPython/modules/glcanvas/build.cfg +++ /dev/null @@ -1,19 +0,0 @@ -# -*- python -*- -import sys - -MODULE = 'glcanvasc' -SWIGFILES = ['glcanvas.i', ] - - -if sys.platform == 'win32': -# OTHERLIBS = '$(WXDIR)\lib\glcanvas$(LIBEXT).lib glu32.lib opengl32.lib' -# OTHERCFLAGS = '-DWITH_GLCANVAS -I$(WXDIR)/utils/glcanvas/win' - pass - -else: - - print "Warning: Assuming MesaGL libraries. Override OTHERLIBS in build.local\n"\ - " if you have native GL!" - OTHERLIBS = "-lwx_gtk_gl -lMesaGL -lMesaGLU" - - diff --git a/utils/wxPython/modules/glcanvas/glcanvasc.def b/utils/wxPython/modules/glcanvas/glcanvasc.def deleted file mode 100644 index 8be1ced94e..0000000000 --- a/utils/wxPython/modules/glcanvas/glcanvasc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initglcanvasc diff --git a/utils/wxPython/modules/html/.cvsignore b/utils/wxPython/modules/html/.cvsignore deleted file mode 100644 index dc001de65d..0000000000 --- a/utils/wxPython/modules/html/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ - -*.exp -*.lib -*.obj -*.pch -Makefile -Makefile.pre -Setup -build.local -config.c -htmlc.ilk -htmlc.pyd -sedscript diff --git a/utils/wxPython/modules/html/BUGS b/utils/wxPython/modules/html/BUGS deleted file mode 100644 index bc434f15ff..0000000000 --- a/utils/wxPython/modules/html/BUGS +++ /dev/null @@ -1,23 +0,0 @@ -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? diff --git a/utils/wxPython/modules/html/README b/utils/wxPython/modules/html/README deleted file mode 100644 index af1c578849..0000000000 --- a/utils/wxPython/modules/html/README +++ /dev/null @@ -1,20 +0,0 @@ -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. - -Aug. 31 1999 - Added wxHtmlHelpController and wxHtmlHelpSystem wrappers - wxHtmlHelpSystem is a subclass of the controller, and is still very - rough around the edges. The idea is that it gives the python - programmer more freedom in the look'n'feel of the html help window. - Will be opening up negotiations on the wxwin list to see if - the wxHtmlController code can be reorganised in a base and GUI - part. - diff --git a/utils/wxPython/modules/html/build.cfg b/utils/wxPython/modules/html/build.cfg deleted file mode 100644 index 2ce9a59263..0000000000 --- a/utils/wxPython/modules/html/build.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# -*- python -*- - -MODULE = 'htmlc' -SWIGFILES = ['html.i', 'htmlhelp.i' ] - -#PYFILES = ['htmlhelper.py'] -#SOURCES = ['helpsys.cpp'] - -OTHERSWIGFLAGS = '-I../utils' - -# include path for htmlhelp's xpm bitmaps -#OTHERCFLAGS = "-I%s/src/html" % (WXDIR,) - -# There are no platform differences so we don't need separate code directories -GENCODEDIR='.' -SWIGTOOLKITFLAG='' diff --git a/utils/wxPython/modules/html/helpsys.cpp b/utils/wxPython/modules/html/helpsys.cpp deleted file mode 100644 index 4da8e98219..0000000000 --- a/utils/wxPython/modules/html/helpsys.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/* htmlsys.h : wxHtmlHelpSystem is an extension of the wxHtmlHelpController. - * mainly does two things: - * - extend the interface somewhat so the programmer can dictate most of the - * look and feel of the htmlhelp frame. - * - make some protected functions public (adding _ to the function name) so - * that SWIG can wrap them. - * - * Harm van der Heijden 32aug1999 - */ -#include "helpsys.h" -#include -#include -#include - -// Bitmaps: -#ifndef __WXMSW__ -#include "bitmaps/panel.xpm" -#include "bitmaps/back.xpm" -#include "bitmaps/forward.xpm" -#include "bitmaps/book.xpm" -#include "bitmaps/folder.xpm" -#include "bitmaps/page.xpm" -#endif - -IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpSystem, wxHtmlHelpController) - -// The two static funtions below are also defined in htmlhelp.cpp -// maybe they should be protected class functions. -static wxString SafeFileName(const wxString& s) -{ - wxString res = s; - res.Replace(":", "_", TRUE); - res.Replace(" ", "_", TRUE); - res.Replace("/", "_", TRUE); - res.Replace("\\", "_", TRUE); - res.Replace("#", "_", TRUE); - res.Replace(".", "_", TRUE); - return res; -} - -static int IndexCompareFunc(const void *a, const void *b) -{ - return strcmp(((HtmlContentsItem*)a) -> m_Name, ((HtmlContentsItem*)b) -> m_Name); -} - -bool wxHtmlHelpSystem::AddBookParam(const wxString& title, const wxString& contfile, - const wxString& indexfile, const wxString& deftopic, - const wxString& path, bool show_wait_msg) -{ - wxFileSystem fsys; - wxFSFile *fi; - HtmlBookRecord *bookr; - wxString safetitle; - - if (! path.IsEmpty()) - // workaround for bug in ChangePathTo(name, TRUE) - fsys.ChangePathTo(path+"/gaga"); - - bookr = new HtmlBookRecord(path+'/', title, deftopic); - - if (m_ContentsCnt % HTML_REALLOC_STEP == 0) - m_Contents = (HtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + HTML_REALLOC_STEP) * sizeof(HtmlContentsItem)); - m_Contents[m_ContentsCnt].m_Level = 0; - m_Contents[m_ContentsCnt].m_ID = 0; - m_Contents[m_ContentsCnt].m_Page = new char[deftopic.Length() + 1]; - strcpy(m_Contents[m_ContentsCnt].m_Page, deftopic.c_str()); - m_Contents[m_ContentsCnt].m_Name = new char [title.Length() + 1]; - strcpy(m_Contents[m_ContentsCnt].m_Name, title.c_str()); - m_Contents[m_ContentsCnt].m_Book = bookr; - m_ContentsCnt++; - - // Try to find cached binary versions: - safetitle = SafeFileName(title); - fi = fsys.OpenFile(safetitle + ".cached"); - if (fi == NULL) fi = fsys.OpenFile(m_TempPath + safetitle + ".cached"); - if ((fi == NULL) || (m_TempPath == wxEmptyString)) { - LoadMSProject(bookr, fsys, indexfile, contfile, show_wait_msg); - if (m_TempPath != wxEmptyString) { - wxFileOutputStream *outs = new wxFileOutputStream(m_TempPath + safetitle + ".cached"); - SaveCachedBook(bookr, outs); - delete outs; - } - } - else { - LoadCachedBook(bookr, fi -> GetStream()); - delete fi; - } - - m_BookRecords.Add(bookr); - if (m_IndexCnt > 0) - qsort(m_Index, m_IndexCnt, sizeof(HtmlContentsItem), IndexCompareFunc); - - return TRUE; -} - -wxToolBar* wxHtmlHelpSystem::CreateToolBar(wxFrame* frame) -{ - wxToolBar *toolBar; - toolBar = frame -> CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT | wxTB_DOCKABLE); - toolBar -> SetMargins(2, 2); - wxBitmap* toolBarBitmaps[3]; - -#ifdef __WXMSW__ - toolBarBitmaps[0] = new wxBitmap("panel"); - toolBarBitmaps[1] = new wxBitmap("back"); - toolBarBitmaps[2] = new wxBitmap("forward"); - int width = 24; -#else - toolBarBitmaps[0] = new wxBitmap(panel_xpm); - toolBarBitmaps[1] = new wxBitmap(back_xpm); - toolBarBitmaps[2] = new wxBitmap(forward_xpm); - int width = 16; -#endif - - int currentX = 5; - - toolBar -> AddTool(wxID_HTML_PANEL, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Show/hide navigation panel")); - currentX += width + 5; - toolBar -> AddSeparator(); - toolBar -> AddTool(wxID_HTML_BACK, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go back to the previous HTML page")); - currentX += width + 5; - toolBar -> AddTool(wxID_HTML_FORWARD, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go forward to the next HTML page")); - currentX += width + 5; - - toolBar -> Realize(); - - // Can delete the bitmaps since they're reference counted - for (int i = 0; i < 3; i++) delete toolBarBitmaps[i]; - return toolBar; -} - -wxTreeCtrl* wxHtmlHelpSystem::CreateContentsTree(wxWindow* parent) -{ - wxTreeCtrl* tree; - tree = new wxTreeCtrl(parent, wxID_HTML_TREECTRL, wxDefaultPosition, - wxDefaultSize, wxTR_HAS_BUTTONS | wxSUNKEN_BORDER); - tree -> SetImageList(m_ContentsImageList); - return tree; -} - -wxListBox* wxHtmlHelpSystem::CreateIndexList(wxWindow* parent) -{ - return new wxListBox(parent, wxID_HTML_INDEXLIST, wxDefaultPosition, wxDefaultSize, 0); -} - -void wxHtmlHelpSystem::SetControls(wxFrame* frame, wxHtmlWindow* htmlwin, - wxTreeCtrl* contents, wxListBox* index, - wxListBox* searchlist) -{ - m_Frame = frame; - m_HtmlWin = htmlwin; - m_ContentsBox = contents; - m_IndexBox = index; - m_SearchList = searchlist; - m_SearchText = NULL; // provide your own input box - /* if you're setting your own controls, you and your event handlers are - * responsible for any splitter and notebook adjustments, not the - * htmlhelp framework */ - m_Splitter = NULL; - m_NavigPan = NULL; - RefreshLists(); -} - -void wxHtmlHelpSystem::CreateHelpWindow() -{ - wxBusyCursor cur; - wxString oldpath; - wxStatusBar *sbar; - - if (m_Frame) { - m_Frame -> Raise(); - m_Frame -> Show(TRUE); - return; - } - -#if wxUSE_BUSYINFO - wxBusyInfo busyinfo(_("Preparing help window...")); -#endif - - if (m_Config) ReadCustomization(m_Config, m_ConfigRoot); - - m_Frame = new wxFrame(NULL, -1, "", wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h)); - m_Frame -> PushEventHandler(this); - sbar = m_Frame -> CreateStatusBar(); - - CreateToolBar(m_Frame); - - { - m_Splitter = new wxSplitterWindow(m_Frame); - - m_HtmlWin = new wxHtmlWindow(m_Splitter); - m_HtmlWin -> SetRelatedFrame(m_Frame, m_TitleFormat); - m_HtmlWin -> SetRelatedStatusBar(0); - if (m_Config) m_HtmlWin -> ReadCustomization(m_Config, m_ConfigRoot); - - m_NavigPan = new wxNotebook(m_Splitter, wxID_HTML_NOTEBOOK, wxDefaultPosition, wxDefaultSize); - if (m_ContentsCnt) { - m_ContentsBox = CreateContentsTree(m_NavigPan); - m_NavigPan -> AddPage(m_ContentsBox, _("Contents")); - } - - if (m_IndexCnt) { - wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_INDEXPAGE); - wxLayoutConstraints *b1 = new wxLayoutConstraints; - b1 -> top.SameAs (dummy, wxTop, 0); - b1 -> left.SameAs (dummy, wxLeft, 0); - b1 -> width.PercentOf (dummy, wxWidth, 100); - b1 -> bottom.SameAs (dummy, wxBottom, 0); - m_IndexBox = CreateIndexList(dummy); - m_IndexBox -> SetConstraints(b1); - - dummy -> SetAutoLayout(TRUE); - m_NavigPan -> AddPage(dummy, _("Index")); - } - - { - wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_SEARCHPAGE); - - wxLayoutConstraints *b1 = new wxLayoutConstraints; - m_SearchText = new wxTextCtrl(dummy, wxID_HTML_SEARCHTEXT); - b1 -> top.SameAs (dummy, wxTop, 0); - b1 -> left.SameAs (dummy, wxLeft, 0); - b1 -> right.SameAs (dummy, wxRight, 0); - b1 -> height.AsIs(); - m_SearchText -> SetConstraints(b1); - - wxLayoutConstraints *b2 = new wxLayoutConstraints; - m_SearchButton = new wxButton(dummy, wxID_HTML_SEARCHBUTTON, _("Search!")); - b2 -> top.Below (m_SearchText, 10); - b2 -> right.SameAs (dummy, wxRight, 10); - b2 -> width.AsIs(); - b2 -> height.AsIs(); - m_SearchButton -> SetConstraints(b2); - - wxLayoutConstraints *b3 = new wxLayoutConstraints; - m_SearchList = new wxListBox(dummy, wxID_HTML_SEARCHLIST, wxDefaultPosition, wxDefaultSize, 0); - b3 -> top.Below (m_SearchButton, 10); - b3 -> left.SameAs (dummy, wxLeft, 0); - b3 -> right.SameAs (dummy, wxRight, 0); - b3 -> bottom.SameAs (dummy, wxBottom, 0); - m_SearchList -> SetConstraints(b3); - - dummy -> SetAutoLayout(TRUE); - dummy -> Layout(); - m_NavigPan -> AddPage(dummy, _("Search")); - } - - RefreshLists(); - m_NavigPan -> Show(TRUE); - m_HtmlWin -> Show(TRUE); - m_Splitter -> SetMinimumPaneSize(20); - m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); - if (!m_Cfg.navig_on) m_Splitter -> Unsplit(m_NavigPan); - wxYield(); - } - - m_Frame -> Show(TRUE); - wxYield(); -} - -void wxHtmlHelpSystem::RefreshLists() -{ - if (m_Frame) { - CreateContents(); - CreateIndex(); - if (m_SearchList) - m_SearchList -> Clear(); - } -} - -void wxHtmlHelpSystem::OnToolbar(wxCommandEvent& event) -{ - switch (event.GetId()) { - case wxID_HTML_BACK : - if (m_HtmlWin) m_HtmlWin -> HistoryBack(); - break; - case wxID_HTML_FORWARD : - if (m_HtmlWin) m_HtmlWin -> HistoryForward(); - break; - case wxID_HTML_PANEL : - if (! (m_Splitter && m_NavigPan)) - return; - if (m_Splitter -> IsSplit()) { - m_Cfg.sashpos = m_Splitter -> GetSashPosition(); - m_Splitter -> Unsplit(m_NavigPan); - } - else { - m_NavigPan -> Show(TRUE); - m_HtmlWin -> Show(TRUE); - m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos); - } - break; - } -} - -void wxHtmlHelpSystem::OnCloseWindow(wxCloseEvent& event) -{ - int a, b; - - if (m_Splitter && m_NavigPan) { - m_Cfg.navig_on = m_Splitter -> IsSplit(); - if (m_Cfg.navig_on) - m_Cfg.sashpos = m_Splitter -> GetSashPosition(); - m_Frame -> GetPosition(&a, &b); - m_Cfg.x = a, m_Cfg.y = b; - m_Frame -> GetSize(&a, &b); - m_Cfg.w = a, m_Cfg.h = b; - } - if (m_Config) { - WriteCustomization(m_Config, m_ConfigRoot); - m_HtmlWin -> WriteCustomization(m_Config, m_ConfigRoot); - } - m_Frame = NULL; - - //event.Skip(); -} - -BEGIN_EVENT_TABLE(wxHtmlHelpSystem, wxHtmlHelpController) - EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_FORWARD, wxHtmlHelpSystem::OnToolbar) - EVT_CLOSE(wxHtmlHelpSystem::OnCloseWindow) -END_EVENT_TABLE() - diff --git a/utils/wxPython/modules/html/helpsys.h b/utils/wxPython/modules/html/helpsys.h deleted file mode 100644 index e3eb9f645d..0000000000 --- a/utils/wxPython/modules/html/helpsys.h +++ /dev/null @@ -1,76 +0,0 @@ -/* htmlsys.h : wxHtmlHelpSystem is an extension of the wxHtmlHelpController. - * mainly does two things: - * - extend the interface somewhat so the programmer can dictate most of the - * look and feel of the htmlhelp frame. - * - make some protected functions public (adding _ to the function name) so - * that SWIG can wrap them. - * - * Harm van der Heijden 32aug1999 - */ -#ifndef __HELPSYS_H__ -#define __HELPSYS_H__ - -#include - -#if ! wxUSE_HTML -#error "wxHtml needed" -#endif - -#include -#include -#include - -class wxHtmlHelpSystem : public wxHtmlHelpController -{ - DECLARE_DYNAMIC_CLASS(wxHtmlHelpSystem) - - public: - wxHtmlHelpSystem() {}; - ~wxHtmlHelpSystem() {}; - - bool AddBookParam(const wxString& title, const wxString& contfile, - const wxString& indexfile=wxEmptyString, const wxString& deftopic=wxEmptyString, - const wxString& path=wxEmptyString, bool show_wait_msg=FALSE); - // Alternative to AddBook(wxString& hhpfile) - wxToolBar* CreateToolBar(wxFrame* frame); - // creates a dockable toolbar for the frame, containing hide/show, back and forward buttons - wxTreeCtrl* CreateContentsTree(wxWindow* parent); - // creates a treecontrol with imagelist for books, folders etc and id wxID_HTML_TREECTRL - wxListBox* CreateIndexList(wxWindow* parent); - // creates a listbox with the right id - virtual void CreateHelpWindow(); - // Slightly different version than in wxHtmlHelpController; uses helpers above - // Do nothing if the window already exists - void SetControls(wxFrame* frame, wxHtmlWindow* htmlwin, - wxTreeCtrl* contents=NULL, wxListBox* index=NULL, - wxListBox* searchlist=NULL); - // alternative for CreateHelpWindow(), sets frame, htmlwindow, contents tree, index - // listbox and searchlist listbox. If null, their functionality won't be used - - // Some extra accessor functions - wxFrame* GetFrame() { return m_Frame; } - wxHtmlWindow* GetHtmlWindow() { return m_HtmlWin; } - wxTreeCtrl* GetContentsTree() { return m_ContentsBox; } - wxListBox* GetIndexList() { return m_IndexBox; } - wxListBox* GetSearchList() { return m_SearchList; } - wxImageList* GetContentsImageList() { return m_ContentsImageList; } - // public interface for wxHtmlHelpControllers handlers, so wxPython can call them - void OnToolbar(wxCommandEvent& event); - void OnContentsSel(wxTreeEvent& event) {wxHtmlHelpController::OnContentsSel(event);} - void OnIndexSel(wxCommandEvent& event) {wxHtmlHelpController::OnIndexSel(event);} - void OnSearchSel(wxCommandEvent& event) {wxHtmlHelpController::OnSearchSel(event);} - void OnSearch(wxCommandEvent& event) {wxHtmlHelpController::OnSearch(event);} - void OnCloseWindow(wxCloseEvent& event); - - // some more protected functions that should be accessible from wxPython - void RefreshLists(); - void CreateContents() { if (!m_ContentsBox) return; wxHtmlHelpController::CreateContents(); } - // Adds items to m_Contents tree control - void CreateIndex() { if (! m_IndexBox) return; wxHtmlHelpController::CreateIndex(); } - // Adds items to m_IndexList - - DECLARE_EVENT_TABLE() -}; - -#endif - diff --git a/utils/wxPython/modules/html/htmlc.def b/utils/wxPython/modules/html/htmlc.def deleted file mode 100644 index 859311294b..0000000000 --- a/utils/wxPython/modules/html/htmlc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - inithtmlc diff --git a/utils/wxPython/modules/html/htmlhelper.py b/utils/wxPython/modules/html/htmlhelper.py deleted file mode 100644 index 390afd2b04..0000000000 --- a/utils/wxPython/modules/html/htmlhelper.py +++ /dev/null @@ -1,59 +0,0 @@ -# -# 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: break - j = i - while j=s: - break - word = param[i:j] - i=j+1 - if (param[i] == '"'): - j=i+1 - while j 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 diff --git a/utils/wxPython/modules/html/test/helpsys.py b/utils/wxPython/modules/html/test/helpsys.py deleted file mode 100644 index 6acdaae7c0..0000000000 --- a/utils/wxPython/modules/html/test/helpsys.py +++ /dev/null @@ -1,73 +0,0 @@ -from wxPython.wx import * -from wxPython.html import * -import sys,os - -if not os.environ.has_key('WXWIN'): - print "Can't find html samples. Set WXWIN environment variable." - sys.exit(1) - -help = wxHtmlHelpSystem() -# Create the book in a different way, supply title, contents file, index, default topic and basedir -help.AddBookParam('Sample help docs', 'contents.hhc', '', 'main.htm', - os.environ['WXWIN'] + "/samples/html/help/helpfiles") - -class HelpFrame(wxFrame): - def __init__(self): - wxFrame.__init__(self, NULL, -1, "", wxDefaultPosition, wxSize(500,500)) - bar = self.CreateStatusBar(2) - bar.SetStatusWidths([400,100]) - help.CreateToolBar(self) - self.text = wxTextCtrl(bar, 1001, "Hello world", wxPoint(400,0), wxSize(80,30)) - button = wxButton(bar, 1002, "Go", wxPoint(480,0), wxSize(20,30)) - - html = wxHtmlWindow(self,-1) - html.SetRelatedFrame(self, "%s") - html.SetRelatedStatusBar(0) - - self.searchframe = wxMiniFrame(self, -1, "Search result", wxDefaultPosition, wxSize(300,400)) - self.searchbox = wxListBox(self.searchframe, wxID_HTML_SEARCHLIST) - - self.mframe = wxMiniFrame(self, -1, "Contents", wxDefaultPosition, wxSize(300,500)) - tree = help.CreateContentsTree(self.mframe) - help.SetControls(self, html, tree, NULL, self.searchbox) - EVT_TREE_SEL_CHANGED(self, wxID_HTML_TREECTRL, help.OnContentsSel) - EVT_LISTBOX(self, wxID_HTML_SEARCHLIST, help.OnSearchSel) - EVT_TOOL(self, wxID_HTML_PANEL, self.ToggleContents) - EVT_TOOL(self, wxID_HTML_BACK, help.OnToolbar) - EVT_TOOL(self, wxID_HTML_FORWARD, help.OnToolbar) - EVT_TEXT_ENTER(self, 1001, self.OnTextSearch) - EVT_BUTTON(self, 1002, self.OnTextSearch) - EVT_CLOSE(self.mframe, self.OnCloseContents) - EVT_CLOSE(self.searchframe, self.OnCloseSearch) - self.mframe.Show(TRUE) - print help.GetSearchList() - - def ToggleContents(self, event): - self.mframe.Show(not self.mframe.IsShown()) - - def OnCloseContents(self, event): - if event.CanVeto(): - self.mframe.Show(FALSE) - else: - self.mframe.Destroy() - - def OnCloseSearch(self, event): - if event.CanVeto(): - self.searchframe.Show(FALSE) - else: - self.searchframe.Destroy() - - def OnTextSearch(self, event): - self.searchbox.Clear() - self.searchframe.Show(TRUE) - print "searching for %s" % (self.text.GetValue(),) - help.KeywordSearch(self.text.GetValue()) - -class MyApp(wxApp): - def OnInit(self): - frame = HelpFrame() - frame.Show(TRUE) - return TRUE - -theApp = MyApp(0) -theApp.MainLoop() diff --git a/utils/wxPython/modules/html/test/htmlhelp.py b/utils/wxPython/modules/html/test/htmlhelp.py deleted file mode 100644 index 26c61ad4f3..0000000000 --- a/utils/wxPython/modules/html/test/htmlhelp.py +++ /dev/null @@ -1,19 +0,0 @@ -from wxPython.wx import * -from wxPython.html import * -import os,sys - -if not os.environ.has_key('WXWIN'): - print "Can't find html samples. Set WXWIN environment variable." - sys.exit(1) - -# Minimal htmlhelpcontroller sample. Everything is done by the framework -help = wxHtmlHelpController() # Not created in OnInit, otherwise it's deleted before we see it. -help.AddBook(os.environ['WXWIN'] + "/samples/html/help/helpfiles/testing.hhp") - -class MyApp(wxApp): - def OnInit(self): - help.DisplayContents() - return TRUE - -theApp = MyApp(0) -theApp.MainLoop() diff --git a/utils/wxPython/modules/html/test/htmlview.py b/utils/wxPython/modules/html/test/htmlview.py deleted file mode 100644 index 906f3221c1..0000000000 --- a/utils/wxPython/modules/html/test/htmlview.py +++ /dev/null @@ -1,77 +0,0 @@ -from wxPython.wx import * -from wxPython.html import * -import sys - -default_page = """ -

    HTML Viewer

    Please select File->Open -to open a HTML file, or edit this page in the -text control below and select File->Update -

    -The python source can be seen -here. -""" % (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() diff --git a/utils/wxPython/modules/html/test/htmlwidget.py b/utils/wxPython/modules/html/test/htmlwidget.py deleted file mode 100644 index ffa0fcb356..0000000000 --- a/utils/wxPython/modules/html/test/htmlwidget.py +++ /dev/null @@ -1,97 +0,0 @@ -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 = """ -

    wxPython widgets go HTML

    -A bunch of wxPython widgets are scattered on this HTML page. -Here's one: -
    -
    -Here's another: -
    -It should always take up 70% of the page width. -

    And then there's this, listening to button A: -

    -""" - -# 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. -

    Select File->Show it to draw the widgets.""" - -default_page = default_page + "The HTML code for this page is\n

    " + default_page + "
    " - - -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() diff --git a/utils/wxPython/modules/lseditor/.cvsignore b/utils/wxPython/modules/lseditor/.cvsignore deleted file mode 100644 index 68623efe14..0000000000 --- a/utils/wxPython/modules/lseditor/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ - -*.exp -*.lib -*.obj -*.pch -Makefile -Makefile.pre -Setup -build.local -config.c -lseditorc.ilk -lseditorc.pyd -sedscript diff --git a/utils/wxPython/modules/lseditor/BUGS b/utils/wxPython/modules/lseditor/BUGS deleted file mode 100644 index d47d9ac0f6..0000000000 --- a/utils/wxPython/modules/lseditor/BUGS +++ /dev/null @@ -1,6 +0,0 @@ -Known bugs/features - -editor, all: - - (missing feature, really) syntax highlighting data is - compile time. - diff --git a/utils/wxPython/modules/lseditor/COPYING b/utils/wxPython/modules/lseditor/COPYING deleted file mode 100644 index eeb586b392..0000000000 --- a/utils/wxPython/modules/lseditor/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - 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. - - - Copyright (C) 19yy - - 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. - - , 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. diff --git a/utils/wxPython/modules/lseditor/README b/utils/wxPython/modules/lseditor/README deleted file mode 100644 index 8ac706c9f5..0000000000 --- a/utils/wxPython/modules/lseditor/README +++ /dev/null @@ -1,13 +0,0 @@ -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. - diff --git a/utils/wxPython/modules/lseditor/build.cfg b/utils/wxPython/modules/lseditor/build.cfg deleted file mode 100644 index 4499dad9a3..0000000000 --- a/utils/wxPython/modules/lseditor/build.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# -*- python -*- - -MODULE = 'lseditorc' -SWIGFILES = ['lseditor.i'] - -SOURCES = ['finddlg.cpp', 'lseditorpl.cpp', 'markup.cpp', 'plugin.cpp', - 'sourcepainter.cpp', 'tdefs.cpp'] - - diff --git a/utils/wxPython/modules/lseditor/config.h b/utils/wxPython/modules/lseditor/config.h deleted file mode 100644 index b22aa25ec9..0000000000 --- a/utils/wxPython/modules/lseditor/config.h +++ /dev/null @@ -1,82 +0,0 @@ -/* 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 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 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 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 header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Name of package */ -#define PACKAGE "wxStudio" - -/* Version number of package */ -#define VERSION "0.0.2" - diff --git a/utils/wxPython/modules/lseditor/controlarea.h b/utils/wxPython/modules/lseditor/controlarea.h deleted file mode 100644 index 15cb9386af..0000000000 --- a/utils/wxPython/modules/lseditor/controlarea.h +++ /dev/null @@ -1,262 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 diff --git a/utils/wxPython/modules/lseditor/editorpl.h b/utils/wxPython/modules/lseditor/editorpl.h deleted file mode 100644 index 05563eb259..0000000000 --- a/utils/wxPython/modules/lseditor/editorpl.h +++ /dev/null @@ -1,153 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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__ diff --git a/utils/wxPython/modules/lseditor/finddlg.cpp b/utils/wxPython/modules/lseditor/finddlg.cpp deleted file mode 100644 index 0270cac0ba..0000000000 --- a/utils/wxPython/modules/lseditor/finddlg.cpp +++ /dev/null @@ -1,146 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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(); -} diff --git a/utils/wxPython/modules/lseditor/finddlg.h b/utils/wxPython/modules/lseditor/finddlg.h deleted file mode 100644 index dbceaa2b16..0000000000 --- a/utils/wxPython/modules/lseditor/finddlg.h +++ /dev/null @@ -1,38 +0,0 @@ -#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 diff --git a/utils/wxPython/modules/lseditor/gtk/.cvsignore b/utils/wxPython/modules/lseditor/gtk/.cvsignore deleted file mode 100644 index b25c15b81f..0000000000 --- a/utils/wxPython/modules/lseditor/gtk/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/utils/wxPython/modules/lseditor/gtk/lseditor.cpp b/utils/wxPython/modules/lseditor/gtk/lseditor.cpp deleted file mode 100644 index a567818168..0000000000 --- a/utils/wxPython/modules/lseditor/gtk/lseditor.cpp +++ /dev/null @@ -1,1913 +0,0 @@ -/* - * FILE : gtk/lseditor.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 6) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initlseditorc - -#define SWIG_name "lseditorc" - -#include "helpers.h" -#include "lseditorpl.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern byte* byte_LIST_helper(PyObject* source); -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -#ifdef SEPARATE - wxString wxPyEmptyStr(""); -#endif -#ifdef __cplusplus -extern "C" { -#endif -#define new_wxsLSEditorPlugin() (new wxsLSEditorPlugin()) -static PyObject *_wrap_new_wxsLSEditorPlugin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxsLSEditorPlugin",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxsLSEditorPlugin *)new_wxsLSEditorPlugin(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxsLSEditorPlugin_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxsLSEditorPlugin(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxsLSEditorPlugin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxsLSEditorPlugin",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxsLSEditorPlugin. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxsLSEditorPlugin(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_Create(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - wxWindow * _arg1; - wxWindowID _arg2; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","parent","id", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxsLSEditorPlugin_Create",_kwnames,&_argo0,&_argo1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_Create. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_Create. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_Create(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnOpen(_swigobj,_swigarg0) (_swigobj->OnOpen(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_OnOpen(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","fname", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxsLSEditorPlugin_OnOpen",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnOpen. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnOpen(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnSave(_swigobj,_swigarg0) (_swigobj->OnSave(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_OnSave(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","fname", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxsLSEditorPlugin_OnSave",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnSave. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnSave(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnCopy(_swigobj) (_swigobj->OnCopy()) -static PyObject *_wrap_wxsLSEditorPlugin_OnCopy(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnCopy",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnCopy. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnCopy(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnCut(_swigobj) (_swigobj->OnCut()) -static PyObject *_wrap_wxsLSEditorPlugin_OnCut(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnCut",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnCut. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnCut(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnPaste(_swigobj) (_swigobj->OnPaste()) -static PyObject *_wrap_wxsLSEditorPlugin_OnPaste(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnPaste",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnPaste. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnPaste(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnDelete(_swigobj) (_swigobj->OnDelete()) -static PyObject *_wrap_wxsLSEditorPlugin_OnDelete(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnDelete",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnDelete. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnDelete(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnUndo(_swigobj) (_swigobj->OnUndo()) -static PyObject *_wrap_wxsLSEditorPlugin_OnUndo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnUndo",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnUndo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnUndo(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnRedo(_swigobj) (_swigobj->OnRedo()) -static PyObject *_wrap_wxsLSEditorPlugin_OnRedo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnRedo",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnRedo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnRedo(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_SelectAll(_swigobj) (_swigobj->SelectAll()) -static PyObject *_wrap_wxsLSEditorPlugin_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_SelectAll",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SelectAll. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SelectAll(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnGotoLine(_swigobj,_swigarg0,_swigarg1) (_swigobj->OnGotoLine(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_OnGotoLine(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2 = (int ) 0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","lineNo","column", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxsLSEditorPlugin_OnGotoLine",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnGotoLine. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnGotoLine(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnProperties(_swigobj) (_swigobj->OnProperties()) -static PyObject *_wrap_wxsLSEditorPlugin_OnProperties(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnProperties",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnProperties. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnProperties(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnFind(_swigobj) (_swigobj->OnFind()) -static PyObject *_wrap_wxsLSEditorPlugin_OnFind(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnFind",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnFind. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnFind(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnFindNext(_swigobj) (_swigobj->OnFindNext()) -static PyObject *_wrap_wxsLSEditorPlugin_OnFindNext(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnFindNext",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnFindNext. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnFindNext(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnFindPrevious(_swigobj) (_swigobj->OnFindPrevious()) -static PyObject *_wrap_wxsLSEditorPlugin_OnFindPrevious(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnFindPrevious",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnFindPrevious. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnFindPrevious(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnReplace(_swigobj) (_swigobj->OnReplace()) -static PyObject *_wrap_wxsLSEditorPlugin_OnReplace(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnReplace",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnReplace. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnReplace(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnToggleBookmark(_swigobj) (_swigobj->OnToggleBookmark()) -static PyObject *_wrap_wxsLSEditorPlugin_OnToggleBookmark(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnToggleBookmark",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnToggleBookmark. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnToggleBookmark(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnNextBookmark(_swigobj) (_swigobj->OnNextBookmark()) -static PyObject *_wrap_wxsLSEditorPlugin_OnNextBookmark(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnNextBookmark",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnNextBookmark. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnNextBookmark(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnPreviousBookmark(_swigobj) (_swigobj->OnPreviousBookmark()) -static PyObject *_wrap_wxsLSEditorPlugin_OnPreviousBookmark(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnPreviousBookmark",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnPreviousBookmark. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnPreviousBookmark(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnShowBookmarks(_swigobj) (_swigobj->OnShowBookmarks()) -static PyObject *_wrap_wxsLSEditorPlugin_OnShowBookmarks(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_OnShowBookmarks",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnShowBookmarks. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnShowBookmarks(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_SetCheckpoint(_swigobj) (_swigobj->SetCheckpoint()) -static PyObject *_wrap_wxsLSEditorPlugin_SetCheckpoint(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_SetCheckpoint",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SetCheckpoint. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SetCheckpoint(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_CheckpointModified(_swigobj) (_swigobj->CheckpointModified()) -static PyObject *_wrap_wxsLSEditorPlugin_CheckpointModified(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_CheckpointModified",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CheckpointModified. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CheckpointModified(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanCopy(_swigobj) (_swigobj->CanCopy()) -static PyObject *_wrap_wxsLSEditorPlugin_CanCopy(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_CanCopy",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanCopy. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanCopy(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanCut(_swigobj) (_swigobj->CanCut()) -static PyObject *_wrap_wxsLSEditorPlugin_CanCut(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_CanCut",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanCut. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanCut(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanPaste(_swigobj) (_swigobj->CanPaste()) -static PyObject *_wrap_wxsLSEditorPlugin_CanPaste(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_CanPaste",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanPaste. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanPaste(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanUndo(_swigobj) (_swigobj->CanUndo()) -static PyObject *_wrap_wxsLSEditorPlugin_CanUndo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_CanUndo",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanUndo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanUndo(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanRedo(_swigobj) (_swigobj->CanRedo()) -static PyObject *_wrap_wxsLSEditorPlugin_CanRedo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_CanRedo",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanRedo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanRedo(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_GetName(_swigobj) (_swigobj->GetName()) -static PyObject *_wrap_wxsLSEditorPlugin_GetName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - string * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_GetName",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetName. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new string (wxsLSEditorPlugin_GetName(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_string_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxsLSEditorPlugin_IsModified(_swigobj) (_swigobj->IsModified()) -static PyObject *_wrap_wxsLSEditorPlugin_IsModified(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_IsModified",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_IsModified. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_IsModified(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_GetWindow(_swigobj) (_swigobj->GetWindow()) -static PyObject *_wrap_wxsLSEditorPlugin_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_GetWindow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetWindow. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxsLSEditorPlugin_GetWindow(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxsLSEditorPlugin_SetFileName(_swigobj,_swigarg0) (_swigobj->SetFileName(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_SetFileName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","fname", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxsLSEditorPlugin_SetFileName",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SetFileName. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SetFileName(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_HoldCursor(_swigobj,_swigarg0) (_swigobj->HoldCursor(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_HoldCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","hold", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxsLSEditorPlugin_HoldCursor",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_HoldCursor. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_HoldCursor(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_FindWordAtCursor(_swigobj) (_swigobj->FindWordAtCursor()) -static PyObject *_wrap_wxsLSEditorPlugin_FindWordAtCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - string * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_FindWordAtCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_FindWordAtCursor. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new string (wxsLSEditorPlugin_FindWordAtCursor(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_string_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxsLSEditorPlugin_GetCursorPos(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCursorPos(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_GetCursorPos(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int * _arg1; - int * _arg2; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","line","column", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxsLSEditorPlugin_GetCursorPos",_kwnames,&_argo0,&_argo1,&_argo2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetCursorPos. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_GetCursorPos. Expected _int_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxsLSEditorPlugin_GetCursorPos. Expected _int_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetCursorPos(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_SetCursorPos(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetCursorPos(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_SetCursorPos(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","line","column", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxsLSEditorPlugin_SetCursorPos",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SetCursorPos. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SetCursorPos(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_GetPagePos(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPagePos(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_GetPagePos(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int * _arg1; - int * _arg2; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","line","column", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxsLSEditorPlugin_GetPagePos",_kwnames,&_argo0,&_argo1,&_argo2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetPagePos. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_GetPagePos. Expected _int_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxsLSEditorPlugin_GetPagePos. Expected _int_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetPagePos(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_GetText(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->GetText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxsLSEditorPlugin_GetText(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - char ** _arg5; - size_t * _arg6; - PyObject * _argo0 = 0; - PyObject * _argo5 = 0; - PyObject * _argo6 = 0; - char *_kwnames[] = { "self","fromLine","fromColumn","tillLine","tillColumn","ppBuf","length", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiiiOO:wxsLSEditorPlugin_GetText",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_argo5,&_argo6)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo5) { - if (_argo5 == Py_None) { _arg5 = NULL; } - else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_char_pp")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxsLSEditorPlugin_GetText. Expected _char_pp."); - return NULL; - } - } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_size_t_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxsLSEditorPlugin_GetText. Expected _size_t_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetText(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_InsertText(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->InsertText(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_InsertText(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - char * _arg3; - size_t _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","line","column","text","lenght", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiisi:wxsLSEditorPlugin_InsertText",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_InsertText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_InsertText(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_DeleteText(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DeleteText(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_DeleteText(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","fromLine","fromColumn","tillLine","tillColumn", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxsLSEditorPlugin_DeleteText",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_DeleteText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_DeleteText(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_PositionToXY(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - int * _arg3; - int * _arg4; - PyObject * _argo0 = 0; - int temp; - PyObject * _obj3 = 0; - int temp0; - PyObject * _obj4 = 0; - char *_kwnames[] = { "self","line","column","x","y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO:wxsLSEditorPlugin_PositionToXY",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_PositionToXY. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - temp = (int) PyInt_AsLong(_obj3); - _arg3 = &temp; -} -{ - temp0 = (int) PyInt_AsLong(_obj4); - _arg4 = &temp0; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_PositionToXY(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxsLSEditorPlugin_GetSelectionRange(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetSelectionRange(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_GetSelectionRange(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int * _arg1; - int * _arg2; - int * _arg3; - int * _arg4; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - PyObject * _argo3 = 0; - PyObject * _argo4 = 0; - char *_kwnames[] = { "self","fromLine","fromColumn","tillLine","tillColumn", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:wxsLSEditorPlugin_GetSelectionRange",_kwnames,&_argo0,&_argo1,&_argo2,&_argo3,&_argo4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetSelectionRange. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetSelectionRange(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_GetCharacterSize(_swigobj) (_swigobj->GetCharacterSize()) -static PyObject *_wrap_wxsLSEditorPlugin_GetCharacterSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSize * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_GetCharacterSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetCharacterSize. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxsLSEditorPlugin_GetCharacterSize(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxsLSEditorPlugin_IsUnixText(_swigobj) (_swigobj->IsUnixText()) -static PyObject *_wrap_wxsLSEditorPlugin_IsUnixText(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxsLSEditorPlugin_IsUnixText",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_IsUnixText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_IsUnixText(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyMethodDef lseditorcMethods[] = { - { "wxsLSEditorPlugin_IsUnixText", (PyCFunction) _wrap_wxsLSEditorPlugin_IsUnixText, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_GetCharacterSize", (PyCFunction) _wrap_wxsLSEditorPlugin_GetCharacterSize, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_GetSelectionRange", (PyCFunction) _wrap_wxsLSEditorPlugin_GetSelectionRange, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_PositionToXY", (PyCFunction) _wrap_wxsLSEditorPlugin_PositionToXY, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_DeleteText", (PyCFunction) _wrap_wxsLSEditorPlugin_DeleteText, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_InsertText", (PyCFunction) _wrap_wxsLSEditorPlugin_InsertText, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_GetText", (PyCFunction) _wrap_wxsLSEditorPlugin_GetText, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_GetPagePos", (PyCFunction) _wrap_wxsLSEditorPlugin_GetPagePos, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_SetCursorPos", (PyCFunction) _wrap_wxsLSEditorPlugin_SetCursorPos, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_GetCursorPos", (PyCFunction) _wrap_wxsLSEditorPlugin_GetCursorPos, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_FindWordAtCursor", (PyCFunction) _wrap_wxsLSEditorPlugin_FindWordAtCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_HoldCursor", (PyCFunction) _wrap_wxsLSEditorPlugin_HoldCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_SetFileName", (PyCFunction) _wrap_wxsLSEditorPlugin_SetFileName, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_GetWindow", (PyCFunction) _wrap_wxsLSEditorPlugin_GetWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_IsModified", (PyCFunction) _wrap_wxsLSEditorPlugin_IsModified, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_GetName", (PyCFunction) _wrap_wxsLSEditorPlugin_GetName, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_CanRedo", (PyCFunction) _wrap_wxsLSEditorPlugin_CanRedo, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_CanUndo", (PyCFunction) _wrap_wxsLSEditorPlugin_CanUndo, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_CanPaste", (PyCFunction) _wrap_wxsLSEditorPlugin_CanPaste, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_CanCut", (PyCFunction) _wrap_wxsLSEditorPlugin_CanCut, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_CanCopy", (PyCFunction) _wrap_wxsLSEditorPlugin_CanCopy, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_CheckpointModified", (PyCFunction) _wrap_wxsLSEditorPlugin_CheckpointModified, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_SetCheckpoint", (PyCFunction) _wrap_wxsLSEditorPlugin_SetCheckpoint, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnShowBookmarks", (PyCFunction) _wrap_wxsLSEditorPlugin_OnShowBookmarks, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnPreviousBookmark", (PyCFunction) _wrap_wxsLSEditorPlugin_OnPreviousBookmark, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnNextBookmark", (PyCFunction) _wrap_wxsLSEditorPlugin_OnNextBookmark, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnToggleBookmark", (PyCFunction) _wrap_wxsLSEditorPlugin_OnToggleBookmark, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnReplace", (PyCFunction) _wrap_wxsLSEditorPlugin_OnReplace, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnFindPrevious", (PyCFunction) _wrap_wxsLSEditorPlugin_OnFindPrevious, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnFindNext", (PyCFunction) _wrap_wxsLSEditorPlugin_OnFindNext, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnFind", (PyCFunction) _wrap_wxsLSEditorPlugin_OnFind, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnProperties", (PyCFunction) _wrap_wxsLSEditorPlugin_OnProperties, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnGotoLine", (PyCFunction) _wrap_wxsLSEditorPlugin_OnGotoLine, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_SelectAll", (PyCFunction) _wrap_wxsLSEditorPlugin_SelectAll, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnRedo", (PyCFunction) _wrap_wxsLSEditorPlugin_OnRedo, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnUndo", (PyCFunction) _wrap_wxsLSEditorPlugin_OnUndo, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnDelete", (PyCFunction) _wrap_wxsLSEditorPlugin_OnDelete, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnPaste", (PyCFunction) _wrap_wxsLSEditorPlugin_OnPaste, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnCut", (PyCFunction) _wrap_wxsLSEditorPlugin_OnCut, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnCopy", (PyCFunction) _wrap_wxsLSEditorPlugin_OnCopy, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnSave", (PyCFunction) _wrap_wxsLSEditorPlugin_OnSave, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_OnOpen", (PyCFunction) _wrap_wxsLSEditorPlugin_OnOpen, METH_VARARGS | METH_KEYWORDS }, - { "wxsLSEditorPlugin_Create", (PyCFunction) _wrap_wxsLSEditorPlugin_Create, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxsLSEditorPlugin", (PyCFunction) _wrap_delete_wxsLSEditorPlugin, METH_VARARGS | METH_KEYWORDS }, - { "new_wxsLSEditorPlugin", (PyCFunction) _wrap_new_wxsLSEditorPlugin, METH_VARARGS | METH_KEYWORDS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, - { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, - { "_wxPrintQuality","_int",0}, - { "_wxPrintQuality","_signed_int",0}, - { "_wxPrintQuality","_unsigned_int",0}, - { "_wxPrintQuality","_wxWindowID",0}, - { "_wxPrintQuality","_uint",0}, - { "_wxPrintQuality","_EBool",0}, - { "_wxPrintQuality","_size_t",0}, - { "_wxFontData","_class_wxFontData",0}, - { "___wxPyCleanup","_class___wxPyCleanup",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_wxsLSEditorPlugin","_class_wxsLSEditorPlugin",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxGrid","_class_wxGrid",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, - { "_byte","_unsigned_char",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_long","_wxDash",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, - { "_size_t","_wxPrintQuality",0}, - { "_size_t","_unsigned_int",0}, - { "_size_t","_int",0}, - { "_size_t","_wxWindowID",0}, - { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxGrid","_wxGrid",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_uint","_wxPrintQuality",0}, - { "_uint","_size_t",0}, - { "_uint","_unsigned_int",0}, - { "_uint","_int",0}, - { "_uint","_wxWindowID",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxGridEvent","_class_wxGridEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class___wxPyCleanup","___wxPyCleanup",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxToolBarTool","_class_wxToolBarTool",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, - { "_EBool","_wxPrintQuality",0}, - { "_EBool","_signed_int",0}, - { "_EBool","_int",0}, - { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_wxDash",0}, - { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, - { "_signed_int","_wxPrintQuality",0}, - { "_signed_int","_EBool",0}, - { "_signed_int","_wxWindowID",0}, - { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, - { "_WXTYPE","_short",0}, - { "_WXTYPE","_signed_short",0}, - { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, - { "_unsigned_short","_WXTYPE",0}, - { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_wxGridCell","_class_wxGridCell",0}, - { "_signed_short","_WXTYPE",0}, - { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_class_wxsLSEditorPlugin","_wxsLSEditorPlugin",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxToolBarTool","_wxToolBarTool",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, - { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, - { "_unsigned_int","_wxPrintQuality",0}, - { "_unsigned_int","_size_t",0}, - { "_unsigned_int","_uint",0}, - { "_unsigned_int","_wxWindowID",0}, - { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, - { "_short","_WXTYPE",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, - { "_wxWindowID","_wxPrintQuality",0}, - { "_wxWindowID","_size_t",0}, - { "_wxWindowID","_EBool",0}, - { "_wxWindowID","_uint",0}, - { "_wxWindowID","_int",0}, - { "_wxWindowID","_signed_int",0}, - { "_wxWindowID","_unsigned_int",0}, - { "_int","_wxPrintQuality",0}, - { "_int","_size_t",0}, - { "_int","_EBool",0}, - { "_int","_uint",0}, - { "_int","_wxWindowID",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxGridEvent","_wxGridEvent",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_class_wxGridCell","_wxGridCell",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxFrame","_wxFrame",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initlseditorc() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("lseditorc", lseditorcMethods); - d = PyModule_GetDict(m); - - - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); - -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/modules/lseditor/gtk/lseditor.py b/utils/wxPython/modules/lseditor/gtk/lseditor.py deleted file mode 100644 index 2d59fbc2f5..0000000000 --- a/utils/wxPython/modules/lseditor/gtk/lseditor.py +++ /dev/null @@ -1,189 +0,0 @@ -# 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 "" % (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 ------------------ - diff --git a/utils/wxPython/modules/lseditor/lseditor.i b/utils/wxPython/modules/lseditor/lseditor.i deleted file mode 100644 index 19d3641f84..0000000000 --- a/utils/wxPython/modules/lseditor/lseditor.i +++ /dev/null @@ -1,150 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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(); - -%} - -//--------------------------------------------------------------------------- diff --git a/utils/wxPython/modules/lseditor/lseditorc.def b/utils/wxPython/modules/lseditor/lseditorc.def deleted file mode 100644 index b404f4197d..0000000000 --- a/utils/wxPython/modules/lseditor/lseditorc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initlseditorc diff --git a/utils/wxPython/modules/lseditor/lseditorpl.cpp b/utils/wxPython/modules/lseditor/lseditorpl.cpp deleted file mode 100644 index e9fab6a5fb..0000000000 --- a/utils/wxPython/modules/lseditor/lseditorpl.cpp +++ /dev/null @@ -1,344 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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; -} diff --git a/utils/wxPython/modules/lseditor/lseditorpl.h b/utils/wxPython/modules/lseditor/lseditorpl.h deleted file mode 100644 index 6866d0d06d..0000000000 --- a/utils/wxPython/modules/lseditor/lseditorpl.h +++ /dev/null @@ -1,133 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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__ diff --git a/utils/wxPython/modules/lseditor/markup.cpp b/utils/wxPython/modules/lseditor/markup.cpp deleted file mode 100644 index 82306b263b..0000000000 --- a/utils/wxPython/modules/lseditor/markup.cpp +++ /dev/null @@ -1,46 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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[] = -{ - { "","" }, // 0 - { "","" }, // 1 - { "
    ","
    " }, // 2 - { "","" }, // 3 - { "","" }, // 4 - { "","" }, // 5 - { "","" }, // 6 - { "

    ","

    " }, // 7 - { "
    ","" }, // 8 - { "

    ","

    " }, // 9 - { "

    ","

    " }, // 10 - { "

    ","

    " }, // 11 - { "
      ","
    " }, // 12 - { "
  • ","
  • " }, // 13 -}; - -MarkupTagsT get_HTML_markup_tags() -{ - return htmlTags; -} diff --git a/utils/wxPython/modules/lseditor/markup.h b/utils/wxPython/modules/lseditor/markup.h deleted file mode 100644 index a9011353ce..0000000000 --- a/utils/wxPython/modules/lseditor/markup.h +++ /dev/null @@ -1,51 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 diff --git a/utils/wxPython/modules/lseditor/msw/.cvsignore b/utils/wxPython/modules/lseditor/msw/.cvsignore deleted file mode 100644 index b25c15b81f..0000000000 --- a/utils/wxPython/modules/lseditor/msw/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/utils/wxPython/modules/lseditor/msw/lseditor.cpp b/utils/wxPython/modules/lseditor/msw/lseditor.cpp deleted file mode 100644 index 0316145e44..0000000000 --- a/utils/wxPython/modules/lseditor/msw/lseditor.cpp +++ /dev/null @@ -1,1866 +0,0 @@ -/* - * FILE : msw/lseditor.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 6) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initlseditorc - -#define SWIG_name "lseditorc" - -#include "helpers.h" -#include "lseditorpl.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern byte* byte_LIST_helper(PyObject* source); -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -#ifdef SEPARATE - wxString wxPyEmptyStr(""); -#endif -#ifdef __cplusplus -extern "C" { -#endif -#define new_wxsLSEditorPlugin() (new wxsLSEditorPlugin()) -static PyObject *_wrap_new_wxsLSEditorPlugin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxsLSEditorPlugin")) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxsLSEditorPlugin *)new_wxsLSEditorPlugin(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxsLSEditorPlugin_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxsLSEditorPlugin(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxsLSEditorPlugin(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:delete_wxsLSEditorPlugin",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxsLSEditorPlugin. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxsLSEditorPlugin(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_Create(_swigobj,_swigarg0,_swigarg1) (_swigobj->Create(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_Create(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - wxWindow * _arg1; - wxWindowID _arg2; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"OOi:wxsLSEditorPlugin_Create",&_argo0,&_argo1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_Create. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_Create. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_Create(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnOpen(_swigobj,_swigarg0) (_swigobj->OnOpen(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_OnOpen(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"Os:wxsLSEditorPlugin_OnOpen",&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnOpen. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnOpen(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnSave(_swigobj,_swigarg0) (_swigobj->OnSave(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_OnSave(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"Os:wxsLSEditorPlugin_OnSave",&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnSave. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnSave(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnCopy(_swigobj) (_swigobj->OnCopy()) -static PyObject *_wrap_wxsLSEditorPlugin_OnCopy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnCopy",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnCopy. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnCopy(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnCut(_swigobj) (_swigobj->OnCut()) -static PyObject *_wrap_wxsLSEditorPlugin_OnCut(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnCut",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnCut. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnCut(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnPaste(_swigobj) (_swigobj->OnPaste()) -static PyObject *_wrap_wxsLSEditorPlugin_OnPaste(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnPaste",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnPaste. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnPaste(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnDelete(_swigobj) (_swigobj->OnDelete()) -static PyObject *_wrap_wxsLSEditorPlugin_OnDelete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnDelete",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnDelete. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnDelete(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnUndo(_swigobj) (_swigobj->OnUndo()) -static PyObject *_wrap_wxsLSEditorPlugin_OnUndo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnUndo",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnUndo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnUndo(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnRedo(_swigobj) (_swigobj->OnRedo()) -static PyObject *_wrap_wxsLSEditorPlugin_OnRedo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnRedo",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnRedo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnRedo(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_SelectAll(_swigobj) (_swigobj->SelectAll()) -static PyObject *_wrap_wxsLSEditorPlugin_SelectAll(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_SelectAll",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SelectAll. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SelectAll(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnGotoLine(_swigobj,_swigarg0,_swigarg1) (_swigobj->OnGotoLine(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_OnGotoLine(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2 = (int ) 0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"Oi|i:wxsLSEditorPlugin_OnGotoLine",&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnGotoLine. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnGotoLine(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnProperties(_swigobj) (_swigobj->OnProperties()) -static PyObject *_wrap_wxsLSEditorPlugin_OnProperties(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnProperties",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnProperties. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnProperties(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnFind(_swigobj) (_swigobj->OnFind()) -static PyObject *_wrap_wxsLSEditorPlugin_OnFind(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnFind",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnFind. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnFind(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnFindNext(_swigobj) (_swigobj->OnFindNext()) -static PyObject *_wrap_wxsLSEditorPlugin_OnFindNext(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnFindNext",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnFindNext. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnFindNext(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnFindPrevious(_swigobj) (_swigobj->OnFindPrevious()) -static PyObject *_wrap_wxsLSEditorPlugin_OnFindPrevious(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnFindPrevious",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnFindPrevious. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnFindPrevious(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnReplace(_swigobj) (_swigobj->OnReplace()) -static PyObject *_wrap_wxsLSEditorPlugin_OnReplace(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnReplace",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnReplace. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnReplace(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnToggleBookmark(_swigobj) (_swigobj->OnToggleBookmark()) -static PyObject *_wrap_wxsLSEditorPlugin_OnToggleBookmark(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnToggleBookmark",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnToggleBookmark. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnToggleBookmark(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnNextBookmark(_swigobj) (_swigobj->OnNextBookmark()) -static PyObject *_wrap_wxsLSEditorPlugin_OnNextBookmark(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnNextBookmark",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnNextBookmark. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnNextBookmark(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnPreviousBookmark(_swigobj) (_swigobj->OnPreviousBookmark()) -static PyObject *_wrap_wxsLSEditorPlugin_OnPreviousBookmark(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnPreviousBookmark",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnPreviousBookmark. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnPreviousBookmark(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_OnShowBookmarks(_swigobj) (_swigobj->OnShowBookmarks()) -static PyObject *_wrap_wxsLSEditorPlugin_OnShowBookmarks(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_OnShowBookmarks",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_OnShowBookmarks. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_OnShowBookmarks(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_SetCheckpoint(_swigobj) (_swigobj->SetCheckpoint()) -static PyObject *_wrap_wxsLSEditorPlugin_SetCheckpoint(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_SetCheckpoint",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SetCheckpoint. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SetCheckpoint(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_CheckpointModified(_swigobj) (_swigobj->CheckpointModified()) -static PyObject *_wrap_wxsLSEditorPlugin_CheckpointModified(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_CheckpointModified",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CheckpointModified. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CheckpointModified(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanCopy(_swigobj) (_swigobj->CanCopy()) -static PyObject *_wrap_wxsLSEditorPlugin_CanCopy(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_CanCopy",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanCopy. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanCopy(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanCut(_swigobj) (_swigobj->CanCut()) -static PyObject *_wrap_wxsLSEditorPlugin_CanCut(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_CanCut",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanCut. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanCut(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanPaste(_swigobj) (_swigobj->CanPaste()) -static PyObject *_wrap_wxsLSEditorPlugin_CanPaste(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_CanPaste",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanPaste. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanPaste(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanUndo(_swigobj) (_swigobj->CanUndo()) -static PyObject *_wrap_wxsLSEditorPlugin_CanUndo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_CanUndo",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanUndo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanUndo(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_CanRedo(_swigobj) (_swigobj->CanRedo()) -static PyObject *_wrap_wxsLSEditorPlugin_CanRedo(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_CanRedo",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_CanRedo. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_CanRedo(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_GetName(_swigobj) (_swigobj->GetName()) -static PyObject *_wrap_wxsLSEditorPlugin_GetName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - string * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_GetName",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetName. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new string (wxsLSEditorPlugin_GetName(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_string_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxsLSEditorPlugin_IsModified(_swigobj) (_swigobj->IsModified()) -static PyObject *_wrap_wxsLSEditorPlugin_IsModified(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_IsModified",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_IsModified. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_IsModified(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxsLSEditorPlugin_GetWindow(_swigobj) (_swigobj->GetWindow()) -static PyObject *_wrap_wxsLSEditorPlugin_GetWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_GetWindow",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetWindow. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxsLSEditorPlugin_GetWindow(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxsLSEditorPlugin_SetFileName(_swigobj,_swigarg0) (_swigobj->SetFileName(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_SetFileName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - char * _arg1; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"Os:wxsLSEditorPlugin_SetFileName",&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SetFileName. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SetFileName(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_HoldCursor(_swigobj,_swigarg0) (_swigobj->HoldCursor(_swigarg0)) -static PyObject *_wrap_wxsLSEditorPlugin_HoldCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"Oi:wxsLSEditorPlugin_HoldCursor",&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_HoldCursor. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_HoldCursor(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_FindWordAtCursor(_swigobj) (_swigobj->FindWordAtCursor()) -static PyObject *_wrap_wxsLSEditorPlugin_FindWordAtCursor(PyObject *self, PyObject *args) { - PyObject * _resultobj; - string * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_FindWordAtCursor",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_FindWordAtCursor. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new string (wxsLSEditorPlugin_FindWordAtCursor(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_string_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxsLSEditorPlugin_GetCursorPos(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCursorPos(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_GetCursorPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int * _arg1; - int * _arg2; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"OOO:wxsLSEditorPlugin_GetCursorPos",&_argo0,&_argo1,&_argo2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetCursorPos. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_GetCursorPos. Expected _int_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxsLSEditorPlugin_GetCursorPos. Expected _int_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetCursorPos(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_SetCursorPos(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetCursorPos(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_SetCursorPos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"Oii:wxsLSEditorPlugin_SetCursorPos",&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_SetCursorPos. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_SetCursorPos(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_GetPagePos(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPagePos(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxsLSEditorPlugin_GetPagePos(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int * _arg1; - int * _arg2; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"OOO:wxsLSEditorPlugin_GetPagePos",&_argo0,&_argo1,&_argo2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetPagePos. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_GetPagePos. Expected _int_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxsLSEditorPlugin_GetPagePos. Expected _int_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetPagePos(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_GetText(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->GetText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_wxsLSEditorPlugin_GetText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - char ** _arg5; - size_t * _arg6; - PyObject * _argo0 = 0; - PyObject * _argo5 = 0; - PyObject * _argo6 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"OiiiiOO:wxsLSEditorPlugin_GetText",&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_argo5,&_argo6)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo5) { - if (_argo5 == Py_None) { _arg5 = NULL; } - else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_char_pp")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxsLSEditorPlugin_GetText. Expected _char_pp."); - return NULL; - } - } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_size_t_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxsLSEditorPlugin_GetText. Expected _size_t_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetText(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_InsertText(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->InsertText(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_InsertText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - char * _arg3; - size_t _arg4; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"Oiisi:wxsLSEditorPlugin_InsertText",&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_InsertText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_InsertText(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_DeleteText(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DeleteText(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_DeleteText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"Oiiii:wxsLSEditorPlugin_DeleteText",&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_DeleteText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_DeleteText(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_PositionToXY(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int _arg1; - int _arg2; - int * _arg3; - int * _arg4; - PyObject * _argo0 = 0; - PyObject * _argo3 = 0; - PyObject * _argo4 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"OiiOO:wxsLSEditorPlugin_PositionToXY",&_argo0,&_arg1,&_arg2,&_argo3,&_argo4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_PositionToXY. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxsLSEditorPlugin_PositionToXY. Expected _int_p."); - return NULL; - } - } - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxsLSEditorPlugin_PositionToXY. Expected _int_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_PositionToXY(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_GetSelectionRange(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetSelectionRange(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxsLSEditorPlugin_GetSelectionRange(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxsLSEditorPlugin * _arg0; - int * _arg1; - int * _arg2; - int * _arg3; - int * _arg4; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - PyObject * _argo3 = 0; - PyObject * _argo4 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"OOOOO:wxsLSEditorPlugin_GetSelectionRange",&_argo0,&_argo1,&_argo2,&_argo3,&_argo4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetSelectionRange. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxsLSEditorPlugin_GetSelectionRange. Expected _int_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxsLSEditorPlugin_GetSelectionRange(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxsLSEditorPlugin_GetCharacterSize(_swigobj) (_swigobj->GetCharacterSize()) -static PyObject *_wrap_wxsLSEditorPlugin_GetCharacterSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxSize * _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_GetCharacterSize",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_GetCharacterSize. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxsLSEditorPlugin_GetCharacterSize(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxsLSEditorPlugin_IsUnixText(_swigobj) (_swigobj->IsUnixText()) -static PyObject *_wrap_wxsLSEditorPlugin_IsUnixText(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxsLSEditorPlugin * _arg0; - PyObject * _argo0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"O:wxsLSEditorPlugin_IsUnixText",&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxsLSEditorPlugin_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxsLSEditorPlugin_IsUnixText. Expected _wxsLSEditorPlugin_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxsLSEditorPlugin_IsUnixText(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyMethodDef lseditorcMethods[] = { - { "wxsLSEditorPlugin_IsUnixText", _wrap_wxsLSEditorPlugin_IsUnixText, METH_VARARGS }, - { "wxsLSEditorPlugin_GetCharacterSize", _wrap_wxsLSEditorPlugin_GetCharacterSize, METH_VARARGS }, - { "wxsLSEditorPlugin_GetSelectionRange", _wrap_wxsLSEditorPlugin_GetSelectionRange, METH_VARARGS }, - { "wxsLSEditorPlugin_PositionToXY", _wrap_wxsLSEditorPlugin_PositionToXY, METH_VARARGS }, - { "wxsLSEditorPlugin_DeleteText", _wrap_wxsLSEditorPlugin_DeleteText, METH_VARARGS }, - { "wxsLSEditorPlugin_InsertText", _wrap_wxsLSEditorPlugin_InsertText, METH_VARARGS }, - { "wxsLSEditorPlugin_GetText", _wrap_wxsLSEditorPlugin_GetText, METH_VARARGS }, - { "wxsLSEditorPlugin_GetPagePos", _wrap_wxsLSEditorPlugin_GetPagePos, METH_VARARGS }, - { "wxsLSEditorPlugin_SetCursorPos", _wrap_wxsLSEditorPlugin_SetCursorPos, METH_VARARGS }, - { "wxsLSEditorPlugin_GetCursorPos", _wrap_wxsLSEditorPlugin_GetCursorPos, METH_VARARGS }, - { "wxsLSEditorPlugin_FindWordAtCursor", _wrap_wxsLSEditorPlugin_FindWordAtCursor, METH_VARARGS }, - { "wxsLSEditorPlugin_HoldCursor", _wrap_wxsLSEditorPlugin_HoldCursor, METH_VARARGS }, - { "wxsLSEditorPlugin_SetFileName", _wrap_wxsLSEditorPlugin_SetFileName, METH_VARARGS }, - { "wxsLSEditorPlugin_GetWindow", _wrap_wxsLSEditorPlugin_GetWindow, METH_VARARGS }, - { "wxsLSEditorPlugin_IsModified", _wrap_wxsLSEditorPlugin_IsModified, METH_VARARGS }, - { "wxsLSEditorPlugin_GetName", _wrap_wxsLSEditorPlugin_GetName, METH_VARARGS }, - { "wxsLSEditorPlugin_CanRedo", _wrap_wxsLSEditorPlugin_CanRedo, METH_VARARGS }, - { "wxsLSEditorPlugin_CanUndo", _wrap_wxsLSEditorPlugin_CanUndo, METH_VARARGS }, - { "wxsLSEditorPlugin_CanPaste", _wrap_wxsLSEditorPlugin_CanPaste, METH_VARARGS }, - { "wxsLSEditorPlugin_CanCut", _wrap_wxsLSEditorPlugin_CanCut, METH_VARARGS }, - { "wxsLSEditorPlugin_CanCopy", _wrap_wxsLSEditorPlugin_CanCopy, METH_VARARGS }, - { "wxsLSEditorPlugin_CheckpointModified", _wrap_wxsLSEditorPlugin_CheckpointModified, METH_VARARGS }, - { "wxsLSEditorPlugin_SetCheckpoint", _wrap_wxsLSEditorPlugin_SetCheckpoint, METH_VARARGS }, - { "wxsLSEditorPlugin_OnShowBookmarks", _wrap_wxsLSEditorPlugin_OnShowBookmarks, METH_VARARGS }, - { "wxsLSEditorPlugin_OnPreviousBookmark", _wrap_wxsLSEditorPlugin_OnPreviousBookmark, METH_VARARGS }, - { "wxsLSEditorPlugin_OnNextBookmark", _wrap_wxsLSEditorPlugin_OnNextBookmark, METH_VARARGS }, - { "wxsLSEditorPlugin_OnToggleBookmark", _wrap_wxsLSEditorPlugin_OnToggleBookmark, METH_VARARGS }, - { "wxsLSEditorPlugin_OnReplace", _wrap_wxsLSEditorPlugin_OnReplace, METH_VARARGS }, - { "wxsLSEditorPlugin_OnFindPrevious", _wrap_wxsLSEditorPlugin_OnFindPrevious, METH_VARARGS }, - { "wxsLSEditorPlugin_OnFindNext", _wrap_wxsLSEditorPlugin_OnFindNext, METH_VARARGS }, - { "wxsLSEditorPlugin_OnFind", _wrap_wxsLSEditorPlugin_OnFind, METH_VARARGS }, - { "wxsLSEditorPlugin_OnProperties", _wrap_wxsLSEditorPlugin_OnProperties, METH_VARARGS }, - { "wxsLSEditorPlugin_OnGotoLine", _wrap_wxsLSEditorPlugin_OnGotoLine, METH_VARARGS }, - { "wxsLSEditorPlugin_SelectAll", _wrap_wxsLSEditorPlugin_SelectAll, METH_VARARGS }, - { "wxsLSEditorPlugin_OnRedo", _wrap_wxsLSEditorPlugin_OnRedo, METH_VARARGS }, - { "wxsLSEditorPlugin_OnUndo", _wrap_wxsLSEditorPlugin_OnUndo, METH_VARARGS }, - { "wxsLSEditorPlugin_OnDelete", _wrap_wxsLSEditorPlugin_OnDelete, METH_VARARGS }, - { "wxsLSEditorPlugin_OnPaste", _wrap_wxsLSEditorPlugin_OnPaste, METH_VARARGS }, - { "wxsLSEditorPlugin_OnCut", _wrap_wxsLSEditorPlugin_OnCut, METH_VARARGS }, - { "wxsLSEditorPlugin_OnCopy", _wrap_wxsLSEditorPlugin_OnCopy, METH_VARARGS }, - { "wxsLSEditorPlugin_OnSave", _wrap_wxsLSEditorPlugin_OnSave, METH_VARARGS }, - { "wxsLSEditorPlugin_OnOpen", _wrap_wxsLSEditorPlugin_OnOpen, METH_VARARGS }, - { "wxsLSEditorPlugin_Create", _wrap_wxsLSEditorPlugin_Create, METH_VARARGS }, - { "delete_wxsLSEditorPlugin", _wrap_delete_wxsLSEditorPlugin, METH_VARARGS }, - { "new_wxsLSEditorPlugin", _wrap_new_wxsLSEditorPlugin, METH_VARARGS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, - { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, - { "_wxPrintQuality","_int",0}, - { "_wxPrintQuality","_signed_int",0}, - { "_wxPrintQuality","_unsigned_int",0}, - { "_wxPrintQuality","_wxWindowID",0}, - { "_wxPrintQuality","_uint",0}, - { "_wxPrintQuality","_EBool",0}, - { "_wxPrintQuality","_size_t",0}, - { "_wxFontData","_class_wxFontData",0}, - { "___wxPyCleanup","_class___wxPyCleanup",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_wxsLSEditorPlugin","_class_wxsLSEditorPlugin",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxGrid","_class_wxGrid",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, - { "_byte","_unsigned_char",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_long","_wxDash",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, - { "_size_t","_wxPrintQuality",0}, - { "_size_t","_unsigned_int",0}, - { "_size_t","_int",0}, - { "_size_t","_wxWindowID",0}, - { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxGrid","_wxGrid",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_uint","_wxPrintQuality",0}, - { "_uint","_size_t",0}, - { "_uint","_unsigned_int",0}, - { "_uint","_int",0}, - { "_uint","_wxWindowID",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxGridEvent","_class_wxGridEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class___wxPyCleanup","___wxPyCleanup",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxToolBarTool","_class_wxToolBarTool",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, - { "_EBool","_wxPrintQuality",0}, - { "_EBool","_signed_int",0}, - { "_EBool","_int",0}, - { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_wxDash",0}, - { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, - { "_signed_int","_wxPrintQuality",0}, - { "_signed_int","_EBool",0}, - { "_signed_int","_wxWindowID",0}, - { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, - { "_WXTYPE","_short",0}, - { "_WXTYPE","_signed_short",0}, - { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, - { "_unsigned_short","_WXTYPE",0}, - { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_wxGridCell","_class_wxGridCell",0}, - { "_signed_short","_WXTYPE",0}, - { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_class_wxsLSEditorPlugin","_wxsLSEditorPlugin",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxToolBarTool","_wxToolBarTool",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, - { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, - { "_unsigned_int","_wxPrintQuality",0}, - { "_unsigned_int","_size_t",0}, - { "_unsigned_int","_uint",0}, - { "_unsigned_int","_wxWindowID",0}, - { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, - { "_short","_WXTYPE",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, - { "_wxWindowID","_wxPrintQuality",0}, - { "_wxWindowID","_size_t",0}, - { "_wxWindowID","_EBool",0}, - { "_wxWindowID","_uint",0}, - { "_wxWindowID","_int",0}, - { "_wxWindowID","_signed_int",0}, - { "_wxWindowID","_unsigned_int",0}, - { "_int","_wxPrintQuality",0}, - { "_int","_size_t",0}, - { "_int","_EBool",0}, - { "_int","_uint",0}, - { "_int","_wxWindowID",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxGridEvent","_wxGridEvent",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_class_wxGridCell","_wxGridCell",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxFrame","_wxFrame",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initlseditorc() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("lseditorc", lseditorcMethods); - d = PyModule_GetDict(m); - - - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); - -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/modules/lseditor/msw/lseditor.py b/utils/wxPython/modules/lseditor/msw/lseditor.py deleted file mode 100644 index 2d59fbc2f5..0000000000 --- a/utils/wxPython/modules/lseditor/msw/lseditor.py +++ /dev/null @@ -1,189 +0,0 @@ -# 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 "" % (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 ------------------ - diff --git a/utils/wxPython/modules/lseditor/plugin.cpp b/utils/wxPython/modules/lseditor/plugin.cpp deleted file mode 100644 index a6f29627f1..0000000000 --- a/utils/wxPython/modules/lseditor/plugin.cpp +++ /dev/null @@ -1,58 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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; -} diff --git a/utils/wxPython/modules/lseditor/plugin.h b/utils/wxPython/modules/lseditor/plugin.h deleted file mode 100644 index 98781e4690..0000000000 --- a/utils/wxPython/modules/lseditor/plugin.h +++ /dev/null @@ -1,98 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 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__ diff --git a/utils/wxPython/modules/lseditor/sourcepainter.cpp b/utils/wxPython/modules/lseditor/sourcepainter.cpp deleted file mode 100644 index bd54eef49d..0000000000 --- a/utils/wxPython/modules/lseditor/sourcepainter.cpp +++ /dev/null @@ -1,696 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 - using namespace std; -#else - - #include - -#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 ); -} diff --git a/utils/wxPython/modules/lseditor/sourcepainter.h b/utils/wxPython/modules/lseditor/sourcepainter.h deleted file mode 100644 index ac177a9800..0000000000 --- a/utils/wxPython/modules/lseditor/sourcepainter.h +++ /dev/null @@ -1,109 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 diff --git a/utils/wxPython/modules/lseditor/tdefs.cpp b/utils/wxPython/modules/lseditor/tdefs.cpp deleted file mode 100644 index e65b2fe114..0000000000 --- a/utils/wxPython/modules/lseditor/tdefs.cpp +++ /dev/null @@ -1,4233 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: No names yet. -// Purpose: Contrib. demo -// Author: Aleksandras Gluchovas -// Modified by: -// Created: 03/04/1999 -// 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 "wx/file.h" -#include "wx/textdlg.h" -#include "wx/clipbrd.h" -#include "wx/dataobj.h" - -#include - -#include "tdefs.h" -#include "finddlg.h" - -#include - -/***** Implementation for class TBlock *****/ - -void TBlock::RecalcBlockProperties() -{ - char* cur = mBuf; - char* end = mBuf + mTextLen; - mRowCount = 0; - - while( cur < end ) - { - if ( is_eol_char( *cur ) ) ++mRowCount; - - ++cur; - } -} - -/***** Implementation for class TTextIterator *****/ - -string TTextIterator::mSeparators = ",.()[]\t\\+-*/|=<>:;\t\n~?!%"; - -bool TTextIterator::IsSeparator( char ch ) -{ - size_t sz = mSeparators.size(); - - for( size_t i = 0; i != sz; ++i ) - - if ( mSeparators[i] == ch ) return TRUE; - - return FALSE; -} - -char* TTextIterator::GetClosestPos() -{ - char* end = GetBlockEnd(); - char* cur = mpCurRowStart; - size_t col = 0; - - while( cur < end && col < mPos.mCol && !is_eol_char(*cur) ) - { - if ( !is_DOS_eol_char( *cur ) ) ++col; - ++cur; - } - - if ( is_DOS_eol_char( *cur ) ) ++cur; - - return cur; -} - -char* TTextIterator::GotoClosestPos() -{ - char* end = GetBlockEnd(); - char* cur = mpCurRowStart; - size_t col = 0; - - while( cur < end && col < mPos.mCol && !is_eol_char(*cur) ) - { - if ( !is_DOS_eol_char( *cur ) ) ++col; - ++cur; - } - - mPos.mCol = col; - - if ( is_DOS_eol_char( *cur ) ) ++cur; - - return cur; -} - -TTextIterator::TTextIterator() - - : mIsEof( FALSE ) -{} - -bool TTextIterator::IsLastLine() -{ - TBlockIteratorT nextBlk = mBlockIter; - ++nextBlk; - - if ( nextBlk != mEndOfListIter ) return FALSE; - - char* cur = mpCurRowStart; - char* end = GetBlockEnd(); - - while( cur < end && !is_eol_char( *cur ) ) ++cur; - - if ( cur == end ) return TRUE; - - ++cur; - - return ( cur == end ); -} - -char TTextIterator::GetChar() -{ - char* cur = GetClosestPos(); - - if ( is_DOS_eol_char( *cur ) ) - - return *(cur+1); - else - return *cur; -} - -bool TTextIterator::IsEol() -{ - return is_eol_char( GetChar() ) || mIsEof; -} - -bool TTextIterator::IsEof() -{ - return mIsEof; -} - -int TTextIterator::GetDistFromEol() -{ - return 0; // TBD:: -} - -void TTextIterator::NextChar() -{ - char* cur = GotoClosestPos(); - - if ( cur + 1 >= GetBlockEnd() ) - { - TBlockIteratorT nextBlk = mBlockIter; - ++nextBlk; - - if ( nextBlk == mEndOfListIter ) - { - if ( cur != GetBlockEnd() ) - ++mPos.mCol; - - mIsEof = TRUE; - return; - } - - ++mPos.mRow ; - mPos.mCol = 0; - - mBlockIter = nextBlk; - - mFirstRowInBlock = mPos.mRow; - mActualRow = mPos.mRow; - mpCurRowStart = (*mBlockIter).mBuf; - - mIsEof = ( (*mBlockIter).mTextLen == 0 ); - } - else - { - if ( is_eol_char( *cur ) ) - { - ++mPos.mRow; - mPos.mCol = 0; - - mActualRow = mPos.mRow; - mpCurRowStart = cur + 1; - } - else - ++mPos.mCol; - } - - mIsEof = (mpCurRowStart + mPos.mCol) == GetBlockEnd(); -} - -void TTextIterator::PreviousChar() -{ - char* cur = GotoClosestPos(); - - if ( cur == (*mBlockIter).mBuf ) - { - TBlockIteratorT prevBlk = mBlockIter; - --prevBlk; - - if ( prevBlk == mEndOfListIter ) - { - mIsEof = TRUE; - return; - } - - --mPos.mRow; - - mBlockIter = prevBlk; - - cur = GetBlockEnd() - 1; - - char* eolPos = cur; - --cur; // skip EOL - char* start = (*mBlockIter).mBuf; - - while( cur != start && !is_eol_char( *cur ) ) --cur; // goto start of line - - if ( is_eol_char( *cur ) ) ++cur; - - mPos.mCol = (size_t)(eolPos - cur); - mpCurRowStart = cur; - - mFirstRowInBlock = mPos.mRow; - mActualRow = mPos.mRow; - } - else - { - do - { - // FIXME FIXME:: this is more then messy .... ! - - if ( is_eol_char( *(cur-1) ) ) - { - --cur; // goto EOL - - --mPos.mRow; - - char* eolPos = cur; - --cur; // skip EOL - char* start = (*mBlockIter).mBuf; - - while( cur != start && !is_eol_char( *cur ) ) --cur; // goto start of line - - if ( is_eol_char( *cur ) ) ++cur; - - mPos.mCol = (size_t)(eolPos - cur); - mpCurRowStart = cur; - - if ( eolPos != cur && is_DOS_eol_char( *(eolPos-1) ) ) --mPos.mCol; - - mActualRow = mPos.mRow; - - break; - } - else - if ( is_DOS_eol_char( *(cur-1) ) ) - { - --cur; - - if ( cur != (*mBlockIter).mBuf && is_eol_char( *(cur-1) ) ) - - continue; - else - { - --mPos.mCol; - --cur; - } - } - else - { - --mPos.mCol; - break; - } - - } while( 1 ); - } - - mIsEof = (mpCurRowStart + mPos.mCol) == GetBlockEnd(); -} - -void TTextIterator::NextWord() -{ - GotoClosestPos(); - - // skip non-white space ahead - - bool wasSeparator = IsSeparator( GetChar() ); - - while( !IsEof() ) - { - char ch = GetChar(); - - if ( ch == ' ' || - ch == '\t' || - is_eol_char(ch) || - wasSeparator != IsSeparator(ch) ) - - break; - - NextChar(); - } - - // skip all white stpace if any - while( !IsEof() ) - { - char ch = GetChar(); - - if ( ch != ' ' && ch != '\t' && !is_eol_char(ch) ) - - break; - - NextChar(); - } -} - -void TTextIterator::PreviousWord() -{ - GotoClosestPos(); - - PreviousChar(); - - // skip all white stpace if any - while( !IsEof() ) - { - char ch = GetChar(); - - if ( ch != ' ' && ch != '\t' && !is_eol_char(ch) ) - - break; - - PreviousChar(); - } - - bool wasSeparator = IsSeparator( GetChar() ); - - // skip word; - while( !IsEof() ) - { - char ch = GetChar(); - - if ( ch == ' ' || - ch == '\t' || - is_eol_char(ch) || - wasSeparator != IsSeparator(ch) - ) - { - NextChar(); - break; - } - - PreviousChar(); - } -} - -void TTextIterator::ToEndOfLine() -{ - GotoClosestPos(); - - while( !IsEof() ) - { - char ch = GetChar(); - - if ( is_eol_char( ch ) ) break; - - NextChar(); - } -} - -void TTextIterator::ToStartOfLine() -{ - GotoClosestPos(); - - mPos.mCol = 0; - mPos.mRow = mActualRow; -} - -size_t TTextIterator::GetLineLen() -{ - char* cur = mpCurRowStart; - char* end = GetBlockEnd(); - - size_t len = 0; - - while( cur < end && !is_eol_char( *cur ) ) - { - if ( !is_DOS_eol_char( *cur ) ) ++len; - ++cur; - } - - return len; -} - -TPosition TTextIterator::GetPosition() -{ - return mPos; -} - -bool TTextIterator::IsInLastBlock() -{ - TBlockIteratorT next = mBlockIter; - ++next; - - return next == mEndOfListIter; -} - -bool TTextIterator::DetectUnixText() -{ - char* cur = GetBlockStart(); - char* end = GetBlockEnd(); - - bool isUnixText = IS_UNIX_TEXT_BY_DEFAULT; - - while( cur < end ) - { - if ( is_DOS_eol_char( *cur ) ) return FALSE; - - if ( is_eol_char( *cur ) ) return TRUE; - - ++cur; - } - - return isUnixText; -} - -/***** Implementation for class TCppJavaHighlightListener *****/ - -void TCppJavaHighlightListener::OnTextChanged( wxTextEditorModel* pModel, - size_t atRow, size_t nRows, - TEXT_CHANGE_TYPE ct ) -{ - mpModel = pModel; - - /* - - int state = GetStateAtRow( atRow ); - - if ( ct == CT_INSERTED ) - { - RemoveCommentTags( atRow, atRow + nRows + 1 ); - GenerateTagsForRange( atRows, atRows + nRows + 1 ); - } - else - if ( ct == CT_DELETED ) - { - RemoveCommentTags( atRow, atRow + 1 ); - GenerateTagsForRange( atRows, atRows + 1 ); - } - */ -} - -/***** Implementation for class wxTextEditorModel *****/ - -/*** protected methods ***/ - -size_t wxTextEditorModel::GetLineCountInRange( char* from, char* till ) -{ - size_t nLines = 0; - - while( from != till ) - { - if ( is_eol_char( *from ) ) ++nLines; - - ++from; - } - - return nLines; -} - -void wxTextEditorModel::DoInsertText( const TPosition& pos, - char* text, size_t len, - TRange& actualRange ) -{ - // FOR NOW:: very dummy imp. - - char* end = text + len; - - TTextIterator iter = CreateIterator( pos ); - - TBlock& blk = (*iter.mBlockIter); - - char* cur = text; - - char* insertPos = iter.GotoClosestPos(); - actualRange.mFrom = iter.GetPosition(); - - if ( is_eol_char( *insertPos ) && - insertPos != iter.GetBlockStart() && - is_DOS_eol_char( *(insertPos-1) ) - ) - --insertPos; - - size_t sizeAfter = (size_t)(iter.GetBlockEnd() - insertPos); - - size_t nLines = GetLineCountInRange( text, text + len ); - - if ( blk.mTextLen + len < FILLED_BLOCK_LEN ) - { - memmove( insertPos + len, insertPos, sizeAfter ); - - memcpy( insertPos, text, len ); - - blk.mTextLen += len; - - - blk.RecalcBlockProperties(); - - if ( iter.IsInLastBlock() ) - - ++blk.mRowCount; // last block have always the-last-row-to-spare - - // the "nature" of most text editors - - char* endPos = insertPos + len; - - bool found = FALSE; - - /* - // OLD STUFF:: slow & buggy - - while( !iter.IsEof() ) - { - if ( iter.GetClosestPos() == endPos ) - { - actualRange.mTill = iter.GetPosition(); - found = TRUE; - break; - } - - iter.NextChar(); - } - - if ( !found ) - { - actualRange.mTill = iter.GetPosition(); - ++actualRange.mTill.mCol; - - //T_ASSERT( found ); // DBG:: - } - */ - - actualRange.mTill = actualRange.mFrom; - actualRange.mTill.mRow += nLines; - - if ( nLines == 0 ) - - actualRange.mTill.mCol = actualRange.mFrom.mCol + (len); - else - { - cur = end; - - while( cur != insertPos && !is_eol_char( *cur ) ) - - --cur; - - if ( is_eol_char( *cur ) ) ++cur; - - actualRange.mTill.mCol = (int)(end - cur); - } - - NotifyTextChanged( pos.mRow, nLines, CT_INSERTED ); - } - else - { - // TBD::: - - char buf[16]; - sprintf( buf, "%d", FILLED_BLOCK_LEN ); - string msg = "Sorry!!! Currently editor is limited to files less then "; - msg += buf; - msg += " bytes\n(the requested text length is " + - sprintf( buf, "%d", blk.mTextLen + len ); - msg += buf; - msg += " bytes)\n Please, close this file without making any changes."; - - wxMessageBox( msg ); - - GetActiveView()->SetFocus(); - - //T_ASSERT(0); // DBG:: for now - } -} - -void wxTextEditorModel::DoDeleteRange( const TPosition& from, const TPosition& till, - TRange& actualRange - ) -{ - // FOR NOW:: very dummy imp. - - TTextIterator iterFrom = CreateIterator( from ); - TTextIterator iterTill = CreateIterator( till ); - - if ( iterFrom.mBlockIter == iterTill.mBlockIter ) - { - char* fromPos = iterFrom.GotoClosestPos(); - char* tillPos = iterTill.GotoClosestPos(); - char* blockStart = (*iterFrom.mBlockIter).mBuf; - - if ( is_eol_char( *fromPos ) && - fromPos != blockStart && - is_DOS_eol_char( *(fromPos-1) ) - ) - --fromPos; - - if ( is_eol_char( *tillPos ) && - tillPos != blockStart && - is_DOS_eol_char( *(tillPos-1) ) - ) - --tillPos; - - size_t len = (size_t)( tillPos -fromPos ); - - size_t nLines = GetLineCountInRange( fromPos, fromPos + len ); - - size_t sizeAfter = (size_t)(iterFrom.GetBlockEnd() - tillPos); - - memmove( fromPos, tillPos, sizeAfter ); - - (*iterFrom.mBlockIter).mTextLen -= len; - - (*iterFrom.mBlockIter).RecalcBlockProperties(); - - if ( iterFrom.IsInLastBlock() ) - - ++(*iterFrom.mBlockIter).mRowCount; // last block have always the-last-row-to-spare - - // the "nature" of most text editors - - actualRange.mFrom = iterFrom.GetPosition(); - actualRange.mTill = iterTill.GetPosition(); - - NotifyTextChanged( from.mRow, nLines, CT_DELETED ); - } - else - T_ASSERT(0); // DBG:: for now -} - -void wxTextEditorModel::GetTextFromRange( const TPosition& from, const TPosition& till, - char** text, size_t& textLen - ) -{ - TTextIterator iterFrom = CreateIterator( from ); - TTextIterator iterTill = CreateIterator( till ); - - if ( iterFrom.mBlockIter == iterTill.mBlockIter ) - { - char* blockStart = (*iterFrom.mBlockIter).mBuf; - - char* fromPos = iterFrom.GetClosestPos(); - char* tillPos = iterTill.GetClosestPos(); - - if ( is_eol_char( *fromPos ) && - fromPos != blockStart && - is_DOS_eol_char( *(fromPos-1) ) - ) - --fromPos; - - if ( is_eol_char( *tillPos ) && - tillPos != blockStart && - is_DOS_eol_char( *(tillPos-1) ) - ) - --tillPos; - - textLen = (size_t)( tillPos -fromPos ); - - *text = AllocCharacters( textLen ); - - memcpy( *text, fromPos, textLen ); - } - else - T_ASSERT(0); // DBG:: for now -} - -void wxTextEditorModel::LoadTextFromFile( const wxString& fname ) -{ - T_ASSERT( wxFile::Exists( fname ) ); - - DeleteAllText(); - - wxFile fl( fname ); - - char* buf = AllocCharacters( fl.Length() ); - - fl.Read( buf, fl.Length() ); - - TRange result; - DoInsertText( TPosition( 0,0 ), buf, fl.Length(), result ); - - FreeCharacters( buf ); - - TTextIterator iter = CreateIterator( TPosition( 0,0 ) ); - - mIsUnixText = iter.DetectUnixText(); - - ClearUndoBuffer(); - - NotifyAllViews(); -} - -void wxTextEditorModel::SaveTextToFile( const wxString& fname ) -{ - wxFile fl( fname, wxFile::write ); - - char* text = 0; - size_t len = 0; - - GetTextFromRange( TPosition(0,0), TPosition( GetTotalRowCount()+1,0 ), &text, len ); - - fl.Write( text, len ); - fl.Close(); - - FreeCharacters( text ); -} - -void wxTextEditorModel::NotifyTextChanged( size_t atRow, size_t nRows, TEXT_CHANGE_TYPE ct ) -{ - if ( nRows > 0 ) - - MergeChange( atRow, mRowsPerPage ); - else - MergeChange( atRow, 1 ); - - // reposition bookmarsk - - if ( nRows > 0 ) - { - if ( ct == CT_INSERTED ) - { - size_t curPin = FindNextPinFrom( atRow + 1 ); - - while( curPin != NPOS ) - { - mPins[curPin]->mRow += nRows; - - ++curPin; - - if ( curPin == mPins.size() ) break; - } - } - else - if ( ct == CT_DELETED ) - { - size_t curPin = FindNextPinFrom( atRow + 1 ); - size_t fromPin = curPin; - size_t tillRow = atRow + nRows; - - while( curPin != NPOS && mPins[curPin]->mRow < tillRow ) - { - ++curPin; - - if ( curPin == mPins.size() ) break; - } - - if ( fromPin != NPOS && nRows != 0 ) - { - mPins.erase( &mPins[fromPin], &mPins[curPin] ); - - while( curPin < mPins.size() ) - { - mPins[curPin]->mRow -= nRows; - ++curPin; - } - } - } - } - - - // send notificaitons - - for( size_t i = 0; i != mChangeListeners.size(); ++i ) - - mChangeListeners[i]->OnTextChanged( this, atRow, nRows, ct ); -} - -void wxTextEditorModel::NotifyTextChanged( TPosition from, TPosition till, TEXT_CHANGE_TYPE ct ) -{ - ArrangePositions( from, till ); - - NotifyTextChanged( from.mRow, till.mRow - from.mRow + 1, ct ); -} - -void wxTextEditorModel::DoExecuteNewCommand( TCommand& cmd ) -{ - if ( cmd.mType == TCMD_INSERT ) - { - cmd.mPrePos = mCursorPos; - DoInsertText( cmd.mRange.mFrom, cmd.mData, cmd.mDataLen, cmd.mRange ); - } - else - if ( cmd.mType == TCMD_DELETE ) - { - cmd.mPrePos = mCursorPos; - DoDeleteRange( cmd.mRange.mFrom, cmd.mRange.mTill, cmd.mRange ); - } -} - -void wxTextEditorModel::DoReexecuteCommand( TCommand& cmd ) -{ - NotifyTextChanged( mCursorPos.mRow, 1, CT_MODIFIED ); // indicate update of current cursor position - - if ( cmd.mType == TCMD_INSERT ) - { - DoInsertText( cmd.mRange.mFrom, cmd.mData, cmd.mDataLen, cmd.mRange ); - mCursorPos = cmd.mPostPos; - } - else - if ( cmd.mType == TCMD_DELETE ) - { - DoDeleteRange( cmd.mRange.mFrom, cmd.mRange.mTill, cmd.mRange ); - mCursorPos = cmd.mPostPos; - } - - NotifyTextChanged( mCursorPos.mRow, 1, CT_MODIFIED ); // indicate update of current cursor position -} - -void wxTextEditorModel::DoUnexecuteCommand( TCommand& cmd ) -{ - NotifyTextChanged( mCursorPos.mRow, 1, CT_MODIFIED ); // indicate update of current cursor position - - if ( cmd.mType == TCMD_INSERT ) - { - DoDeleteRange( cmd.mRange.mFrom, cmd.mRange.mTill, cmd.mRange ); - mCursorPos = cmd.mPrePos; - } - else - if ( cmd.mType == TCMD_DELETE ) - { - DoInsertText( cmd.mRange.mFrom, cmd.mData, cmd.mDataLen, cmd.mRange ); - mCursorPos = cmd.mPrePos; - } - - NotifyTextChanged( mCursorPos.mRow, 1, CT_MODIFIED ); // indicate update of current cursor position -} - -void wxTextEditorModel::UndoImpl() -{ - --mCurCommand; - - DoUnexecuteCommand( *mCommands[mCurCommand] ); -} - -void wxTextEditorModel::RedoImpl() -{ - DoReexecuteCommand( *mCommands[mCurCommand] ); - - ++mCurCommand; -} - -void wxTextEditorModel::ExecuteCommand( TCommand* pCmd ) -{ - if ( mCurCommand < mCheckPointCmdNo ) - - // new command is executed before the checkpoint, - // and every thing is sliced - invalidate it - - mCheckPointDestroyed = TRUE; - - // slice undo-able commands ahead in the queue, - // they wont ever be reexecuted - - while( mCommands.size() > mCurCommand ) - { - delete mCommands.back(); - - mCommands.pop_back(); - } - - mCommands.push_back( pCmd ); - - DoExecuteNewCommand( *pCmd ); - ++mCurCommand; -} - -bool wxTextEditorModel::CanPrependCommand( TCommand* pCmd ) -{ - if ( mCommands.size() != mCurCommand || - mCommands.size() == 0 ) - - return FALSE; - - TCommand& prevCmd = *mCommands.back(); - - if ( !(prevCmd.mRange.mTill == pCmd->mRange.mFrom) ) - - return FALSE; - - char prevCh = prevCmd.mData[ prevCmd.mDataLen - 1]; - char curCh = pCmd->mData[0]; - - if ( prevCh == curCh ) return TRUE; - - if ( prevCh == ' ' || curCh == ' ') return FALSE; - - if ( TTextIterator::IsSeparator(prevCh) != - TTextIterator::IsSeparator(curCh) ) - - return FALSE; - - return TRUE; -} - -void wxTextEditorModel::PrependCommand( TCommand* pCmd ) -{ - if ( mCheckPointCmdNo == mCurCommand ) - - mCheckPointDestroyed = TRUE; - - TCommand& prevCmd = *mCommands.back(); - - DoExecuteNewCommand( *pCmd ); - - TCommand* pComb = new TCommand(); - - pComb->mType = TCMD_INSERT; - pComb->mDataLen = prevCmd.mDataLen + pCmd->mDataLen; - - pComb->mData = AllocCharacters( pComb->mDataLen ); - pComb->mRange.mFrom = prevCmd.mRange.mFrom; - pComb->mRange.mTill = pCmd->mRange.mTill; - pComb->mPrePos = prevCmd.mPrePos; - pComb->mPostPos = pCmd->mPostPos; - - memcpy( pComb->mData, prevCmd.mData, prevCmd.mDataLen ); - memcpy( pComb->mData + prevCmd.mDataLen, pCmd->mData, pCmd->mDataLen ); - - FreeCharacters( prevCmd.mData ); - FreeCharacters( pCmd->mData ); - - delete &prevCmd; - delete pCmd; - - mCommands[ mCommands.size() - 1 ] = pComb; -} - -void wxTextEditorModel::SetPostPos( const TPosition& pos ) -{ - mCommands[mCurCommand-1]->mPostPos = pos; -} - -bool wxTextEditorModel::SelectionIsEmpty() -{ - return mSelectionStart == mSelectionEnd; -} - -void wxTextEditorModel::StartBatch() -{ - // TBD:: -} - -void wxTextEditorModel::FinishBatch() -{ - // TBD:: -} - -void wxTextEditorModel::DeleteRange( const TPosition& from, const TPosition& till ) -{ - TCommand* pCmd = new TCommand(); - - pCmd->mType = TCMD_DELETE; - - pCmd->mRange.mFrom = from; - pCmd->mRange.mTill = till; - pCmd->mPrePos = mCursorPos; - - GetTextFromRange( from, till, &pCmd->mData, pCmd->mDataLen ); - - ExecuteCommand( pCmd ); -} - -void wxTextEditorModel::InsertText( const TPosition& pos, const char* text, size_t len ) -{ - TCommand* pCmd = new TCommand(); - - pCmd->mType = TCMD_INSERT; - - pCmd->mRange.mFrom = pos; - - pCmd->mData = AllocCharacters( len, text ), - pCmd->mDataLen = len; - pCmd->mPrePos = mCursorPos; - - ExecuteCommand( pCmd ); -} - -void wxTextEditorModel::DeleteSelection() -{ - DeleteRange( mSelectionStart, mSelectionEnd ); - - ResetSelection(); -} - -bool wxTextEditorModel::IsLastLine( const TPosition& pos ) -{ - return FALSE; -} - -TTextIterator wxTextEditorModel::CreateIterator( const TPosition& pos ) -{ - size_t curRow = 0; - - TBlockIteratorT bIter = mBlocks.begin(); - - TTextIterator tIter; - - while( bIter != mBlocks.end() ) - { - TBlockIteratorT nextBlk = bIter; - ++nextBlk; - - if ( nextBlk == mBlocks.end() || - ( pos.mRow >= curRow && - pos.mRow <= curRow + (*bIter).mRowCount ) - ) - { - tIter.mFirstRowInBlock = curRow; - - char* cur = (*bIter).mBuf; - char* end = cur + (*bIter).mTextLen; - - // slightly optimized - - if ( curRow < pos.mRow ) - { - while( cur < end ) - { - if ( is_eol_char( *cur ) ) - { - ++curRow; - - if ( !(curRow < pos.mRow) ) - { - ++cur; - break; - } - } - - ++cur; - } - } - - tIter.mActualRow = curRow; - tIter.mpCurRowStart = cur; - tIter.mPos = pos; - - // FOR NOW:: positioning past the end of file is not supported - tIter.mPos.mRow = curRow; - - tIter.mBlockIter = bIter; - tIter.mEndOfListIter = mBlocks.end(); - - break; - } - else - { - curRow += (*bIter).mRowCount; - ++bIter; - } - } - - return tIter; -} - -void wxTextEditorModel::ArrangePositions( TPosition& upper, TPosition& lower ) -{ - if ( upper > lower ) - { - TPosition tmp( lower ); - lower = upper; - upper = tmp; - } -} - -void wxTextEditorModel::ArrangePositions( size_t& upper, size_t& lower ) -{ - if ( upper > lower ) - { - size_t tmp = lower; - lower = upper; - upper = tmp; - } -} - -void wxTextEditorModel::MergeChange( size_t fromRow, size_t nRows ) -{ - if ( mTextChanged == FALSE ) - { - mChangedFromRow = fromRow; - mChangedTillRow = fromRow + nRows; - mTextChanged = TRUE; - } - else - { - if ( mChangedFromRow > fromRow ) - - mChangedFromRow = fromRow; - - if ( mChangedTillRow < fromRow + nRows ) - - mChangedTillRow = fromRow + nRows; - } -} - -void wxTextEditorModel::TrackSelection() -{ - if ( !mIsSelectionEditMode ) return; - - if ( mPrevCursorPos == mSelectionStart ) - - mSelectionStart = mCursorPos; - else - mSelectionEnd = mCursorPos; - - ArrangePositions( mSelectionStart, mSelectionEnd ); - - NotifyTextChanged( mSelectionStart, mPrevSelectionStart, CT_MODIFIED ); - NotifyTextChanged( mSelectionEnd, mPrevSelectionEnd, CT_MODIFIED ); -} - -void wxTextEditorModel::CheckSelection() -{ - ArrangePositions( mSelectionStart, mSelectionEnd ); - - if ( mIsSelectionEditMode && SelectionIsEmpty() ) - { - mSelectionStart = mCursorPos; - mSelectionEnd = mCursorPos; - } - - if ( !mIsSelectionEditMode && !SelectionIsEmpty() ) - { - ResetSelection(); - } - - mPrevSelectionStart = mSelectionStart; - mPrevSelectionEnd = mSelectionEnd; - mPrevCursorPos = mCursorPos; -} - -void wxTextEditorModel::ResetSelection() -{ - if ( SelectionIsEmpty() ) return; - - MergeChange( mSelectionStart.mRow, - mSelectionEnd.mRow - mSelectionStart.mRow + 1 ); - - NotifyTextChanged( mSelectionStart, mSelectionEnd, CT_MODIFIED ); - - mSelectionStart = TPosition(0,0); - mSelectionEnd = TPosition(0,0); - -} - -void wxTextEditorModel::ClearUndoBuffer() -{ - for( size_t i = 0; i != mCommands.size(); ++i ) - { - TCommand& cmd = *mCommands[i]; - - if ( cmd.mData ) delete [] cmd.mData; - - delete &cmd; - } - - mCommands.erase( mCommands.begin(), mCommands.end() ); - - mCurCommand = 0; -} - -void wxTextEditorModel::GetAllText( char** text, size_t& textLen ) -{ - GetTextFromRange( TPosition(0,0), TPosition( GetTotalRowCount()+1, 0 ), - text, textLen - ); -} - -void wxTextEditorModel::DeleteAllText() -{ - ResetSelection(); - - DeleteRange( TPosition(0,0), TPosition( GetTotalRowCount()+1, 0 ) ); -} - -void wxTextEditorModel::SetSelectionEditMode( bool editIsOn ) -{ - mIsSelectionEditMode = editIsOn; -} - -size_t wxTextEditorModel::GetTotalRowCount() -{ - size_t nRows = 0; - - for( TBlockIteratorT i = mBlocks.begin(); i != mBlocks.end(); ++i ) - - nRows += (*i).mRowCount; - - return nRows; -} - -void wxTextEditorModel::GetSelection( char** text, size_t& textLen ) -{ - GetTextFromRange( GetStartOfSelection(), GetEndOfSelection(), text, textLen ); -} - -void wxTextEditorModel::NotifyView() -{ - mpActiveView->OnModelChanged(); -} - -void wxTextEditorModel::NotifyAllViews() -{ - for( size_t i = 0; i != mViews.size(); ++i ) - - mViews[i]->OnModelChanged(); -} - -void wxTextEditorModel::PrepreForCommand() -{ - mTextChanged = 0; - mChangedFromRow = 0; - mChangedTillRow = 0; -} - -size_t wxTextEditorModel::TextToScrColumn( const TPosition& pos ) -{ - TPosition spos; - - mpActiveView->TextPosToScreenPos( pos, spos ); - - return spos.mCol + mpActiveView->GetPagePos().mCol; -} - -size_t wxTextEditorModel::ScrToTextColumn( TPosition pos ) -{ - TPosition tpos; - - pos.mCol -= mpActiveView->GetPagePos().mCol; - pos.mRow -= mpActiveView->GetPagePos().mRow; - - mpActiveView->ScreenPosToTextPos( pos, tpos ); - - return tpos.mCol; -} - -void wxTextEditorModel::DoMoveCursor( int rows, int cols ) -{ - mCursorPos.mCol = TextToScrColumn( mCursorPos ); - - mCursorPos.mRow += rows; - mCursorPos.mCol += cols; - - mCursorPos.mCol = ScrToTextColumn( mCursorPos ); -} - -/*** public interface ***/ - -wxTextEditorModel::wxTextEditorModel() - - : - mpActiveView( NULL ), - mTabSize( 4 ), - mIsSelectionEditMode( FALSE ), - mRowsPerPage( 0 ), - mTextChanged( FALSE ), - mCurCommand( 0 ), - - mInsertMode ( TRUE ), - mAutoIndentMode ( TRUE ), - mSmartIndentMode( TRUE ), - mWasChanged ( FALSE ), - mIsReadOnly ( FALSE ), - mIsUnixText ( IS_UNIX_TEXT_BY_DEFAULT ) -{ - // at least one block should be present - // (otherwise text-iterators wont work) - - mBlocks.push_back( TBlock() ); -} - -wxTextEditorModel::~wxTextEditorModel() -{ - ClearUndoBuffer(); -} - -char* wxTextEditorModel::AllocCharacters( size_t n ) -{ - return new char[n]; -} - -char* wxTextEditorModel::AllocCharacters( size_t n, const char* srcBuf ) -{ - char* destBuf = AllocCharacters( n ); - - memcpy( destBuf, srcBuf, n ); - - return destBuf; -} - -void wxTextEditorModel::FreeCharacters( char* buf ) -{ - delete [] buf; -} - -void wxTextEditorModel::OnInsertChar( char ch ) -{ - if ( ch == 27 ) return; // hack - - if ( is_DOS_eol_char( ch ) ) ch = '\n'; - - PrepreForCommand(); - StartBatch(); - - TCommand* pCmd = new TCommand(); - - pCmd->mType = TCMD_INSERT; - - if ( ch == '\n' && !mIsUnixText ) - { - // DOS text with CR-LF pair - pCmd->mData = AllocCharacters( 2 ); - pCmd->mDataLen = 2; - pCmd->mData[0] = (char)13; - pCmd->mData[1] = (char)10; - } - else - { - pCmd->mData = AllocCharacters( 1 ); - pCmd->mDataLen = 1; - pCmd->mData[0] = ch; - } - - - if ( !SelectionIsEmpty() ) - { - mCursorPos = mSelectionStart; - DeleteSelection(); - } - - pCmd->mRange.mFrom = mCursorPos; - - if ( mInsertMode == FALSE ) - { - TPosition nextPos( mCursorPos.mRow, mCursorPos.mCol + 1 ); - DeleteRange( mCursorPos, nextPos ); - - SetPostPos( mCursorPos ); - } - - TTextIterator iter = CreateIterator( mCursorPos ); - - size_t lineLen = iter.GetLineLen(); - - bool indentAdded = FALSE; - - if ( mCursorPos.mCol > lineLen ) - { - - wxString s( ' ', mCursorPos.mCol - lineLen ); - InsertText( TPosition( mCursorPos.mRow, lineLen ), s.c_str(), s.length() ); - - SetPostPos( mCursorPos ); - - indentAdded = TRUE; - } - - if ( CanPrependCommand( pCmd ) || indentAdded ) - - PrependCommand( pCmd ); - else - ExecuteCommand( pCmd ); - - ++mCursorPos.mCol; - - if ( is_eol_char( ch ) ) - { - mCursorPos.mCol = 0; - ++mCursorPos.mRow; - - SetPostPos( mCursorPos ); - - if ( mAutoIndentMode ) - { - iter.ToStartOfLine(); - wxString indent; - - while( !iter.IsEol() ) - { - char ch = iter.GetChar(); - - if ( ch == '\t' || ch == ' ' ) - - indent += ch; - else - break; - - iter.NextChar(); - } - - if ( indent.length() ) - { - // auto-indent is always prepended to the command which - // caused it - - mCursorPos = TPosition( mCursorPos.mRow, 0 ); - - - TCommand* pICmd = new TCommand(); - pICmd->mType = TCMD_INSERT; - pICmd->mData = AllocCharacters( indent.length() ); - pICmd->mDataLen = indent.length(); - memcpy( pICmd->mData, indent, indent.length() ); - - pICmd->mRange.mFrom = TPosition( mCursorPos.mRow, 0 ); - - PrependCommand( pICmd ); - - SetPostPos( mCursorPos ); - - mCursorPos.mCol = indent.length(); - } - } - } - else - SetPostPos( mCursorPos ); - - FinishBatch(); - - NotifyAllViews(); -} - -void wxTextEditorModel::OnDelete() -{ - PrepreForCommand(); - StartBatch(); - - if ( !SelectionIsEmpty() ) - { - TPosition startPos = mSelectionStart; - DeleteSelection(); - mCursorPos = startPos; - } - else - { - TTextIterator iter = CreateIterator( mCursorPos ); - - if ( iter.GetLineLen() == mCursorPos.mCol && !iter.IsLastLine() ) - { - TPosition nextPos( mCursorPos.mRow+1, 0 ); - DeleteRange( mCursorPos, nextPos ); - NotifyTextChanged( mCursorPos.mRow, 2, CT_DELETED ); - } - else - { - TPosition nextPos( mCursorPos.mRow, mCursorPos.mCol + 1 ); - DeleteRange( mCursorPos, nextPos ); - } - } - - SetPostPos( mCursorPos ); - - FinishBatch(); - - NotifyAllViews(); -} - -void wxTextEditorModel::OnDeleteBack() -{ - PrepreForCommand(); - StartBatch(); - - if ( !SelectionIsEmpty() ) - { - mCursorPos = mSelectionStart; - DeleteSelection(); - } - else - if ( !(mCursorPos == TPosition(0,0)) ) - { - TPosition prevPos; - - if ( mCursorPos.mCol == 0 ) - { - TTextIterator iter = CreateIterator( mCursorPos ); - iter.PreviousChar(); - - prevPos = iter.GetPosition(); - } - else - prevPos = TPosition( mCursorPos.mRow, mCursorPos.mCol - 1 ); - - DeleteRange( prevPos, mCursorPos ); - - mCursorPos = prevPos; - } - - SetPostPos( mCursorPos ); - - FinishBatch(); - - NotifyAllViews(); - -} - -void wxTextEditorModel::OnDeleteLine() -{ - PrepreForCommand(); - StartBatch(); - - DeleteSelection(); - - TTextIterator iter = CreateIterator( mCursorPos ); - - iter.ToStartOfLine(); - - TPosition from = iter.GetPosition(); - - iter.ToEndOfLine(); - - if ( iter.IsLastLine() == FALSE ) - - iter.NextChar(); // delete eol-char also, if it's not the last line - - TPosition till = iter.GetPosition(); - - DeleteRange( from, till ); - SetPostPos( mCursorPos ); - - FinishBatch(); - - NotifyAllViews(); -} - -void wxTextEditorModel::OnShiftSelectionIndent( bool left ) -{ - if ( SelectionIsEmpty() ) return; - - PrepreForCommand(); - StartBatch(); - - for( size_t row = mSelectionStart.mRow; row != mSelectionEnd.mRow; ++row ) - { - TTextIterator iter = CreateIterator( TPosition( row, 0 ) ); - - if ( left ) - { - int n = 0, pos = 0; - - while( !iter.IsEol() && !iter.IsEof() ) - { - char ch = iter.GetChar(); - - if ( pos == mTabSize ) break; - - if ( ch != ' ' && ch != '\t' ) break; - - ++n; - - if ( ch == '\t' ) break; - - ++pos; - - iter.NextChar(); - } - - if ( n ) DeleteRange( TPosition( row,0 ), TPosition( row, n ) ); - } - else - { - char txt = '\t'; - - InsertText( TPosition( row, 0 ), &txt, sizeof(char) ); - } - } - - FinishBatch(); - NotifyAllViews(); -} - -void wxTextEditorModel::OnPaste() -{ - // FIXME:: "wxLogQueryInterface(..)" linking problems with MSDev4.0 - -#ifdef __HACK_MY_MSDEV40__ - - bool alreadyOpen=wxClipboardOpen(); - if (!alreadyOpen) - { - wxOpenClipboard(); - } - - char* data = (char*)::wxGetClipboardData( wxDF_TEXT ); - - wxCloseClipboard(); - - if ( data == NULL ) return; - - PrepreForCommand(); - StartBatch(); - - if ( !SelectionIsEmpty() ) - { - mCursorPos = GetStartOfSelection(); - DeleteSelection(); - } - - InsertText( mCursorPos, data, strlen( data ) ); - - delete [] data; -#else - - if ( !wxTheClipboard->Open() ) return; - - wxTextDataObject data; - if ( !wxTheClipboard->IsSupported(wxDF_TEXT) ) - { - wxTheClipboard->Close(); - return; - } - - wxTheClipboard->GetData(&data); - - string txt = data.GetText(); - - wxTheClipboard->Close(); - - PrepreForCommand(); - StartBatch(); - - DeleteSelection(); - - InsertText( mCursorPos, txt.c_str(), txt.length() ); -#endif - - - mCursorPos = mCommands.back()->mRange.mTill; - SetPostPos( mCursorPos ); - - FinishBatch(); - NotifyAllViews(); -} - -void wxTextEditorModel::OnCut() -{ - OnCopy(); - - PrepreForCommand(); - StartBatch(); - - DeleteSelection(); - SetPostPos( mCursorPos ); - - - FinishBatch(); - NotifyAllViews(); -} - -void wxTextEditorModel::OnCopy() -{ - if ( !SelectionIsEmpty() ) - { - size_t len = 0; - char* text = NULL; - -#ifndef __HACK_MY_MSDEV40__ - - if ( !wxTheClipboard->Open() ) return; - - GetTextFromRange( mSelectionStart, mSelectionEnd, &text, len ); - - wxString s( text, len ); - - wxTheClipboard->AddData( new wxTextDataObject(s) ); - wxTheClipboard->Close(); - - FreeCharacters( text ); -#else - bool alreadyOpen=wxClipboardOpen(); - if (!alreadyOpen) - { - wxOpenClipboard(); - if (!wxEmptyClipboard()) - { - wxCloseClipboard(); - return; - } - } - - GetTextFromRange( mSelectionStart, mSelectionEnd, &text, len ); - - wxString s( text, len ); - - bool success = ::wxEmptyClipboard(); - - success = wxSetClipboardData( wxDF_TEXT, (wxObject*)s.c_str(), 0,0 ); - - FreeCharacters( text ); - - wxCloseClipboard(); - -#endif - } -} - -bool wxTextEditorModel::CanCopy() -{ - return !SelectionIsEmpty(); -} - -bool wxTextEditorModel::CanPaste() -{ - if ( mIsReadOnly ) return FALSE; - -#ifndef __HACK_MY_MSDEV40__ - - if ( !wxTheClipboard->Open() ) return FALSE; - - if ( !wxTheClipboard->IsSupported(wxDF_TEXT) ) - return FALSE; - - wxTheClipboard->Close(); - - return TRUE; - -#else - - bool success = ::wxClipboardOpen(); - - bool alreadyOpen=wxClipboardOpen(); - if (!alreadyOpen) - { - wxOpenClipboard(); - } - - char* data = (char*)::wxGetClipboardData( wxDF_TEXT ); - - wxCloseClipboard(); - - if ( data != NULL && strlen(data) != 0 ) - { - delete [] data; - return TRUE; - } - else - { - delete [] data; - return FALSE; - } - -#endif - -} - -bool wxTextEditorModel::CanUndo() -{ - return !( mCommands.size() == 0 || - mCurCommand == 0 ); -} - -bool wxTextEditorModel::CanRedo() -{ - return mCurCommand != mCommands.size(); -} - -void wxTextEditorModel::OnUndo() -{ - if ( !CanUndo() ) return; - - PrepreForCommand(); - StartBatch(); - - ResetSelection(); - - UndoImpl(); - - FinishBatch(); - NotifyAllViews(); -} - -void wxTextEditorModel::OnRedo() -{ - if ( !CanRedo() ) return; - - PrepreForCommand(); - StartBatch(); - - ResetSelection(); - - RedoImpl(); - - FinishBatch(); - NotifyAllViews(); -} - -void wxTextEditorModel::OnMoveLeft() -{ - PrepreForCommand(); - CheckSelection(); - - if ( mCursorPos.mCol == 0 ) - { - if ( mCursorPos.mRow != 0 ) - { - --mCursorPos.mRow; - - TTextIterator iter = CreateIterator( mCursorPos ); - - iter.ToEndOfLine(); - - mCursorPos.mCol = iter.GetPosition().mCol; - } - } - else - --mCursorPos.mCol; - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnMoveRight() -{ - PrepreForCommand(); - CheckSelection(); - - ++mCursorPos.mCol; - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnMoveUp() -{ - PrepreForCommand(); - CheckSelection(); - - if ( mCursorPos.mRow != 0 ) - - DoMoveCursor( -1,0 ); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnMoveDown() -{ - PrepreForCommand(); - CheckSelection(); - - if ( mCursorPos.mRow + 1 < GetTotalRowCount() ) - - DoMoveCursor( 1,0 ); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnWordRight() -{ - PrepreForCommand(); - CheckSelection(); - - TTextIterator iter = CreateIterator( mCursorPos ); - - iter.NextWord(); - - mCursorPos = iter.GetPosition(); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnWordLeft() -{ - PrepreForCommand(); - CheckSelection(); - - TTextIterator iter = CreateIterator( mCursorPos ); - - iter.PreviousWord(); - - mCursorPos = iter.GetPosition(); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnMoveToPosition( const TPosition& pos ) -{ - PrepreForCommand(); - CheckSelection(); - - mCursorPos = pos; - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnEndOfLine() -{ - PrepreForCommand(); - CheckSelection(); - - TTextIterator iter = CreateIterator( mCursorPos ); - iter.ToEndOfLine(); - - mCursorPos = iter.GetPosition(); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnStartOfLine() -{ - PrepreForCommand(); - CheckSelection(); - - int prevCol = mCursorPos.mCol; - - TTextIterator iter = CreateIterator( mCursorPos ); - iter.ToStartOfLine(); - - // bypass leading white-space at the begining of the line - - while( !iter.IsEol() ) - { - char ch = iter.GetChar(); - - if ( ch != ' ' && ch != '\t' ) break; - - ++mCursorPos.mCol; - - iter.NextChar(); - } - - mCursorPos = iter.GetPosition(); - - if ( mCursorPos.mCol == prevCol ) - - mCursorPos.mCol = 0; - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnPageUp() -{ - PrepreForCommand(); - CheckSelection(); - - if ( mCursorPos.mRow < mRowsPerPage ) - - mCursorPos.mRow = 0; - else - DoMoveCursor( -mRowsPerPage,0 ); - - mpActiveView->ScrollView( -(int)mRowsPerPage, 0 ); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnPageDown() -{ - PrepreForCommand(); - CheckSelection(); - - if ( mCursorPos.mRow + mRowsPerPage >= GetTotalRowCount() ) - { - if ( GetTotalRowCount() != 0 ) - - mCursorPos.mRow = GetTotalRowCount() - 1; - else - mCursorPos.mRow = 0; - } - else - DoMoveCursor( mRowsPerPage,0 ); - - mpActiveView->ScrollView( mRowsPerPage, 0 ); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnSlideUp() -{ - PrepreForCommand(); - - if ( mpActiveView->GetPagePos().mRow + mRowsPerPage - 1 == mCursorPos.mRow ) - { - if ( mCursorPos.mRow == 0 ) - - return; - - DoMoveCursor( -1,0 ); - } - - mpActiveView->ScrollView( -1, 0 ); - - NotifyView(); -} - -void wxTextEditorModel::OnSlideDown() -{ - PrepreForCommand(); - - if ( mCursorPos.mRow == mpActiveView->GetPagePos().mRow ) - { - if ( mCursorPos.mRow + 1 >= GetTotalRowCount() ) - - return; - - DoMoveCursor( 1,0 ); - } - - mpActiveView->ScrollView( 1, 0 ); - - NotifyView(); -} - -void wxTextEditorModel::OnStartOfText() -{ - PrepreForCommand(); - CheckSelection(); - - mCursorPos.mRow = mCursorPos.mCol = 0; - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnEndOfText() -{ - PrepreForCommand(); - CheckSelection(); - - mCursorPos.mRow = GetTotalRowCount() - 1; - - TTextIterator iter = CreateIterator( mCursorPos ); - - iter.ToEndOfLine(); - - mCursorPos = iter.GetPosition(); - - TrackSelection(); - NotifyView(); -} - -void wxTextEditorModel::OnSelectWord() -{ - PrepreForCommand(); - - TTextIterator iter1 = CreateIterator( mCursorPos ); - iter1.GotoClosestPos(); - - if ( mCursorPos == iter1.GetPosition() ) - { - TTextIterator iter2 = iter1; - - // find the left-edge of the word - - bool wasSeparator = TTextIterator::IsSeparator( iter1.GetChar() ); - - while( !iter1.IsEol() ) - { - char ch = iter1.GetChar(); - - if ( ch == '\t' || - ch == ' ' || - wasSeparator != TTextIterator::IsSeparator( iter1.GetChar() ) - ) - { - iter1.NextChar(); - break; - } - - iter1.PreviousChar(); - } - - // find the left-edge of the word - - while( !iter2.IsEol() ) - { - char ch = iter2.GetChar(); - - if ( ch == '\t' || - ch == ' ' || - wasSeparator != TTextIterator::IsSeparator( iter2.GetChar() ) - ) - break; - - iter2.NextChar(); - } - - if ( !(iter1.GetPosition() == iter2.GetPosition()) ) - { - mSelectionStart = iter1.GetPosition(); - mSelectionEnd = iter2.GetPosition(); - mCursorPos = iter2.GetPosition(); - - NotifyTextChanged( mSelectionStart.mRow, 1, CT_MODIFIED ); - } - } - - NotifyView(); -} - -void wxTextEditorModel::OnSelectAll() -{ - PrepreForCommand(); - - ResetSelection(); - - mSelectionStart = TPosition(0,0); - mSelectionEnd = TPosition( GetTotalRowCount(), 1024 ); // FOR NOW:: hack - - mCursorPos = mSelectionStart; - - NotifyTextChanged( mSelectionStart.mRow, mSelectionEnd.mRow, CT_MODIFIED ); - - NotifyView(); -} - -void wxTextEditorModel::OnToggleBookmark() -{ - size_t curRow = GetCursor().mRow; - - if ( GetPinAt( curRow, TBookmarkPin::GetPinTypeCode() ) != NULL ) - - RemovePinAt( curRow, TBookmarkPin::GetPinTypeCode() ); - else - AddPin( new TBookmarkPin( curRow ) ); - - MergeChange( curRow, 1 ); - - NotifyAllViews(); -} - -void wxTextEditorModel::OnNextBookmark() -{ - size_t pinNo = FindNextPinFrom( mCursorPos.mRow + 1 ); - - while( pinNo != NPOS ) - { - TPinBase& pin = *mPins[pinNo]; - - if ( pin.mTypeCode == BOOKMARK_PIN_TC ) - { - OnGotoLine( pin.mRow, 0 ); - break; - } - - if ( pinNo == mPins.size() ) break; - - ++pinNo; - } -} - -void wxTextEditorModel::OnPreviousBookmark() -{ - if ( mCursorPos.mRow == 0 ) return; - - size_t pinNo = FindPreviousPinFrom( mCursorPos.mRow - 1 ); - - while( pinNo != NPOS ) - { - TPinBase& pin = *mPins[pinNo]; - - if ( pin.mTypeCode == BOOKMARK_PIN_TC ) - { - OnGotoLine( pin.mRow, 0 ); - break; - } - - if ( pinNo == 0 ) break; - - --pinNo; - } -} - -bool wxTextEditorModel::OnFind() -{ - if ( !SelectionIsEmpty() ) - { - if ( GetStartOfSelection().mRow == GetEndOfSelection().mRow ) - { - char* buf = NULL; size_t len = 0; - - GetSelection( &buf, len ); - - mLastFindExpr = string( buf, 0, len ); - - delete [] buf; - } - } - - wxFindTextDialog dlg( GetActiveView(), mLastFindExpr ); - //dlg.SetExpr( mLastFindExpr ); - - if( dlg.ShowModal() == wxID_OK ) - { - mLastFindExpr = dlg.GetExpr(); - - GetActiveView()->SetFocus(); - - return OnFindNext(); - } - - GetActiveView()->SetFocus(); - - return FALSE; -} - -bool wxTextEditorModel::OnFindNext() -{ - PrepreForCommand(); - - string& val = mLastFindExpr; - size_t len = val.length(); - - if ( len == 0 ) - { - NotifyView(); - wxMessageBox( "Secarch string not found!" ); - - GetActiveView()->SetFocus(); - - return FALSE; - } - - char ch1 = val[0]; - - TTextIterator iter = CreateIterator( mCursorPos ); - - while( !iter.IsEof() ) - { - char ch = iter.GetChar(); - - if ( ch == ch1 ) - { - size_t startCol = iter.mPos.mCol; - iter.NextChar(); - ch = iter.GetChar(); - - size_t i = 1; - while( i < len && !iter.IsEof() && ch == val[i] ) - { - ++i; - iter.NextChar(); - ch = iter.GetChar(); - } - - if ( i == len ) - { - if ( !SelectionIsEmpty() ) - - ResetSelection(); - - SetStartOfSelection( TPosition( iter.mPos.mRow, startCol ) ); - SetEndOfSelection( iter.mPos ); - - MergeChange( iter.mPos.mRow, 1 ); - - mCursorPos = iter.mPos; - - OnGotoLine( iter.mPos.mRow, iter.mPos.mCol ); - return TRUE; - } - } - else - iter.NextChar(); - } - - NotifyView(); - MergeChange( mCursorPos.mRow, 2 ); - wxMessageBox( "Secarch string not found!" ); - - GetActiveView()->SetFocus(); - - return FALSE; -} - -bool wxTextEditorModel::OnFindPrevious() -{ - // TBD:: - return FALSE; -} - -void wxTextEditorModel::OnGotoLine( int line, int col ) -{ - if ( mpActiveView == NULL ) return; - - TPosition pagePos = mpActiveView->GetPagePos(); - - if ( line >= pagePos.mRow && - line < pagePos.mRow + mRowsPerPage ) - { - mCursorPos.mRow = (size_t)line; - mCursorPos.mCol = (size_t)col; - - if ( col == - 1) - { - mCursorPos.mCol = 0; - OnStartOfLine(); - } - else - NotifyView(); - - return; - } - - size_t third = mRowsPerPage / 3; - size_t newTop = 0; - - if ( line < third ) - - newTop = 0; - else - newTop = line - third; - - - mpActiveView->ScrollView( (int)newTop - (int)pagePos.mRow, -(int)pagePos.mCol ); - - mCursorPos.mRow = line; - mCursorPos.mCol = col; - - if ( col == - 1) - { - mCursorPos.mCol = 0; - OnStartOfLine(); - } - else - NotifyView(); -} - -void wxTextEditorModel::OnGotoLine() -{ - wxTextEntryDialog* dlg = - new wxTextEntryDialog( mpActiveView, "Line number:", "Goto line", "" ); - - int nTries = 3; - - while( dlg->ShowModal() == wxID_OK && nTries ) - { - ResetSelection(); - - int i = -1; - sscanf( dlg->GetValue(), "%d", &i ); - - if ( i == -1 ) - { - wxMessageBox( "Please enter a number" ); - continue; - } - - - if ( i == 0 ) ++i; - - OnGotoLine( (size_t)(i-1), 0 ); - break; - - --nTries; - } - - GetActiveView()->SetFocus(); -} - - -bool wxTextEditorModel::IsReadOnly() -{ - return mIsReadOnly; -} - -bool wxTextEditorModel::IsModified() -{ - return mCurCommand != 0; -} - -bool wxTextEditorModel::IsInsertMode() -{ - return mInsertMode; -} - -void wxTextEditorModel::SetCheckpoint() -{ - mCheckPointDestroyed = FALSE; - mCheckPointCmdNo = mCurCommand; -} - -bool wxTextEditorModel::CheckpointModified() -{ - if ( mCheckPointDestroyed ) return TRUE; - - return mCheckPointCmdNo != mCurCommand; -} - -TPosition wxTextEditorModel::GetStartOfSelection() -{ - ArrangePositions( mSelectionStart, mSelectionEnd ); - - return mSelectionStart; -} - -TPosition wxTextEditorModel::GetEndOfSelection() -{ - ArrangePositions( mSelectionStart, mSelectionEnd ); - - return mSelectionEnd; -} - -TPosition wxTextEditorModel::GetCursor() -{ - return mCursorPos; -} - -void wxTextEditorModel::SetStartOfSelection( const TPosition& pos ) -{ - mSelectionStart = pos; -} - -void wxTextEditorModel::SetEndOfSelection( const TPosition& pos ) -{ - mSelectionEnd = pos; -} - -void wxTextEditorModel::SetCursor( const TPosition& pos ) -{ - mCursorPos = pos; -} - -void wxTextEditorModel::AddView( wxTextEditorView* pView ) -{ - mViews.push_back( pView ); - pView->SetModel( this ); -} - -void wxTextEditorModel::RemoveView( wxTextEditorView* pView ) -{ - for( size_t i = 0; i != mViews.size(); ++i ) - - if ( mViews[i] == pView ) - { - mViews.erase( & mViews[i] ); - return; - } -} - -void wxTextEditorModel::SetActiveView( wxTextEditorView* pView ) -{ - mpActiveView = pView; -} - -wxTextEditorView* wxTextEditorModel::GetActiveView() -{ - return mpActiveView; -} - -void wxTextEditorModel::SetRowsPerPage( size_t n ) -{ - mRowsPerPage = n; -} - -void wxTextEditorModel::AddPin( TPinBase* pPin ) -{ - // FIXME:: binary search should be used - - size_t beforePin = FindNextPinFrom( pPin->mRow ); - - if ( beforePin != NPOS ) - { - // pins in the same row are ordered in the - // descending order of their type-codes - - while( beforePin < mPins.size() && - mPins[beforePin]->mRow == pPin->mRow && - mPins[beforePin]->mTypeCode < pPin->mTypeCode ) - - ++beforePin; - - if ( beforePin < mPins.size() ) - - mPins.insert( &mPins[beforePin], pPin ); - else - mPins.push_back( pPin ); - } - else - mPins.push_back( pPin ); -} - -PinListT& wxTextEditorModel::GetPins() -{ - return mPins; -} - -size_t wxTextEditorModel::FindFirstPinInRange( size_t fromRow, size_t tillRow ) -{ - // FIXME:: pefrom binary search instead - - for( size_t i = 0; i != mPins.size(); ++i ) - { - TPinBase& pin = *mPins[i]; - - if ( pin.mRow >= tillRow ) return NPOS; - - if ( pin.mRow >= fromRow ) - - return i; - } - - return NPOS; -} - -size_t wxTextEditorModel::FindNextPinFrom( size_t fromRow ) -{ - // FIXME:: pefrom binary search instead - - for( size_t i = 0; i != mPins.size(); ++i ) - { - TPinBase& pin = *mPins[i]; - - if ( pin.mRow >= fromRow ) - - return i; - } - - return NPOS; - -} - -size_t wxTextEditorModel::FindPreviousPinFrom( size_t fromRow ) -{ - // FIXME:: pefrom binary search instead - - if ( mPins.size() == 0 ) return NPOS; - - size_t i = mPins.size() - 1; - - for(;;) - { - TPinBase& pin = *mPins[i]; - - if ( pin.mRow <= fromRow ) - - return i; - - if ( i == 0 ) break; - - --i; - } - - return NPOS; -} - -size_t wxTextEditorModel::GetPinNoAt( size_t row, int pinTypeCode ) -{ - size_t curPin = FindNextPinFrom( row ); - - while( curPin != NPOS ) - { - TPinBase& pin = *mPins[curPin]; - - if ( pin.mRow > row ) return NPOS; - - if ( pin.mTypeCode == pinTypeCode ) return curPin; - - ++curPin; - - if ( curPin == mPins.size() ) return NPOS; - } - - return NPOS; -} - -TPinBase* wxTextEditorModel::GetPinAt( size_t row, int pinTypeCode ) -{ - size_t pinNo = GetPinNoAt( row, pinTypeCode ); - - return ( pinNo == NPOS ) ? NULL : mPins[pinNo]; -} - -void wxTextEditorModel::RemovePinAt( size_t row, int pinTypeCode ) -{ - size_t pinNo = GetPinNoAt( row, pinTypeCode ); - - if ( pinNo != NPOS ) - - mPins.erase( &mPins[pinNo] ); -} - -void wxTextEditorModel::AddChangeListener( TTextChangeListenerBase* pListener ) -{ - mChangeListeners.push_back( pListener ); -} - -/***** Implementation for class wxTextEditorView *****/ - -BEGIN_EVENT_TABLE( wxTextEditorView, wxScrolledWindow ) - - EVT_SIZE ( wxTextEditorView::OnSize ) -#if (( wxVERSION_NUMBER < 2100 ) || (( wxVERSION_NUMBER == 2100 ) && (wxBETA_NUMBER <= 4))) - EVT_SCROLL( wxTextEditorView::OnScroll ) -#else - EVT_SCROLLWIN( wxTextEditorView::OnScroll ) -#endif - EVT_PAINT ( wxTextEditorView::OnPaint ) - - EVT_LEFT_DOWN ( wxTextEditorView::OnLButtonDown ) - EVT_LEFT_UP ( wxTextEditorView::OnLButtonUp ) - EVT_MOTION ( wxTextEditorView::OnMotion ) - EVT_LEFT_DCLICK( wxTextEditorView::OnDblClick ) - - EVT_SET_FOCUS ( wxTextEditorView::OnSetFocus ) - EVT_KILL_FOCUS ( wxTextEditorView::OnKillFocus ) - - EVT_CHAR( wxTextEditorView::OnChar ) - EVT_KEY_DOWN( wxTextEditorView::OnKeyDown ) - - EVT_ERASE_BACKGROUND( wxTextEditorView::OnEraseBackground ) - - -END_EVENT_TABLE() - -TCursorTimer* wxTextEditorView::mpTimer = new TCursorTimer(); - -wxTextEditorView::wxTextEditorView( wxWindow* parent, - wxWindowID id, - wxTextEditorModel* pModel, - int wndStyle, - bool ownsModel ) - - : wxScrolledWindow( parent, id, wxPoint(32768,32768), wxSize(0,0), - wxHSCROLL | wxVSCROLL | wndStyle - ), - mPagePos( 0,0 ), - mDragStarted( FALSE ), - mpDraggedText( NULL ), - mAdjustScrollPending( FALSE ), - mLTMode( FALSE ), - mMaxColumns( 500 ), - - mScrollingOn( TRUE ), - mCursorOn ( TRUE ), - mOwnsModel ( ownsModel ), - - mLastRowsTotal( (size_t)(-1) ) -{ - SetModel( pModel ); - - SetTextDefaults(); - - SetSourcePainter( new SourcePainter() ); - - mCashedIter.mPos = TPosition( (size_t)(-1), 0 ); - - // default - AddPinPainter( new TBookmarkPainter() ); -} - -wxTextEditorView::~wxTextEditorView() -{ - if ( mpTimer->GetView() == this && - mCursorOn && !mLTMode ) - { - mpTimer->SetView( NULL ); - mpTimer->HideCursor( TRUE ); - } - - if ( mOwnsModel && mpModel ) - - delete mpModel; -} - -void wxTextEditorView::SetTextDefaults() -{ - mLeftMargin = 22; - mRightMargin = 0; - mTopMargin = 0; - mBottomMargin = 0; - - mCharDim.x = -1; // not detected yet - mCharDim.y = -1; - - mNormalTextCol = *wxBLACK; - mIndentifierTextCol = *wxBLUE; - mReservedWordTextCol = *wxRED; - mCommentTextCol = wxColour( 0,128,128 ); - - mNormalBkCol = wxColour(255,255,255);//*wxWHITE;//wxColour( 128,220,128 ); - mSelectionFgCol = wxColour(255,255,255);//*wxWHITE; - mSelectionBkCol = wxColour( 0,0,128 ); - - mNormalBkBrush = wxBrush( mNormalBkCol, wxSOLID ); - mSelectedBkBrush = wxBrush( mSelectionBkCol, wxSOLID ); - -#if defined(__WXMSW__) || defined(__WINDOWS__) - mFont.SetFaceName("Fixedsys"); - mFont.SetStyle(40); - mFont.SetWeight(40); - mFont.SetPointSize( 11); -#else - //mFont.SetFamily( wxSWISS ); - mFont = wxSystemSettings::GetSystemFont(wxSYS_OEM_FIXED_FONT); -#endif - - -#if defined(__WXMSW__) || defined(__WINDOWS__) - mFont.RealizeResource(); -#endif - - // reduce flicker un wxGtk - SetBackgroundColour( mNormalBkCol ); -} - -void wxTextEditorView::SetColours( const wxColour& normalBkCol, - const wxColour& selectedBkCol, - const wxColour& selectedTextCol ) -{ - mNormalBkCol = normalBkCol; - mSelectionFgCol = selectedTextCol; - mSelectionBkCol = selectedBkCol; - - mNormalBkBrush = wxBrush( mNormalBkCol, wxSOLID ); - mSelectedBkBrush = wxBrush( mSelectionBkCol, wxSOLID ); -} - -void wxTextEditorView::SetHeighlightingColours( const wxColour& normalTextCol, - const wxColour& identifierTextCol, - const wxColour& reservedWordTextCol, - const wxColour& commentTextCol ) -{ - mNormalTextCol = normalTextCol; - mIndentifierTextCol = identifierTextCol; - mReservedWordTextCol = reservedWordTextCol; - mCommentTextCol = commentTextCol; -} - -void wxTextEditorView::SetMargins( int top, int left, int bottom, int right ) -{ - mLeftMargin = left; - mRightMargin = right; - mTopMargin = top; - mBottomMargin = bottom; -} - -void wxTextEditorView::RecalcPagingInfo() -{ - bool firstRefresh = mCharDim.x == -1; - - if ( firstRefresh ) - - ObtainFontProperties(); - - int w = 0, h = 0; - GetClientSize( &w, &h ); - - w -= mLeftMargin + mRightMargin; - h -= mTopMargin + mBottomMargin; - - mColsPerPage = ( ( w / mCharDim.x ) + - ( ( w % mCharDim.x ) ? 0 : 0 ) ); - - - mRowsPerPage = ( ( h / mCharDim.y ) + - ( ( h % mCharDim.y ) ? 0 : 0 ) ); - - if ( mpModel->GetActiveView() == this ) - - mpModel->SetRowsPerPage( mRowsPerPage ); - - if ( firstRefresh ) - { - // scrolling should not happen at DC-level - EnableScrolling( FALSE, FALSE ); - - if ( mScrollingOn ) - - SetScrollbars( mCharDim.x, mCharDim.y, - mMaxColumns, - mpModel->GetTotalRowCount(), - mPagePos.mCol, - mPagePos.mRow, - TRUE - ); - } - - PositionCursor(); -} - -#if (( wxVERSION_NUMBER < 2100 ) || (( wxVERSION_NUMBER == 2100 ) && (wxBETA_NUMBER <= 4))) - // this changed in ver 2.1 -void wxTextEditorView::OnScroll( wxScrollEvent& event ) -#else -void wxTextEditorView::OnScroll( wxScrollWinEvent& event ) -#endif -{ - if ( !mScrollingOn ) return; - - // overriden implementation of wxScrolledWindow::OnScroll, - // to reduce flicker on wxGtk, by using wxClientDC - // instead of Refresh() - - int orient = event.GetOrientation(); - - int nScrollInc = CalcScrollInc(event); - if (nScrollInc == 0) return; - - if (orient == wxHORIZONTAL) - { - int newPos = m_xScrollPosition + nScrollInc; - SetScrollPos(wxHORIZONTAL, newPos, TRUE ); - } - else - { - int newPos = m_yScrollPosition + nScrollInc; - SetScrollPos(wxVERTICAL, newPos, TRUE ); - } - - if (orient == wxHORIZONTAL) - { - m_xScrollPosition += nScrollInc; - } - else - { - m_yScrollPosition += nScrollInc; - } - - int x,y; - ViewStart( &x, &y ); - - mPagePos.mRow = y; - mPagePos.mCol = x; - - PositionCursor(); - - if ( mAdjustScrollPending ) - { - mLastRowsTotal = mpModel->GetTotalRowCount(); - SetScrollbars( mCharDim.x, mCharDim.y, - mMaxColumns, // FOR NOW:: maximal line-length not calculated - mLastRowsTotal, - mPagePos.mCol, - mPagePos.mRow, - TRUE - ); - - mLastViewStart = mPagePos; - - mAdjustScrollPending = FALSE; - - return; - } - - wxClientDC dc( this ); - - mFullRefreshPending = TRUE; - - PaintRows( mPagePos.mRow, mPagePos.mRow + mRowsPerPage, dc ); -} - -void wxTextEditorView::OnPaint( wxPaintEvent& event ) -{ - //wxScrolledWindow::OnPaint( event ); - if ( mCharDim.x == -1 ) ObtainFontProperties(); - - wxPaintDC dc( this ); - - mFullRefreshPending = TRUE; - - PaintRows( mPagePos.mRow, mPagePos.mRow + mRowsPerPage, dc ); -} - -void wxTextEditorView::OnSize( wxSizeEvent& event ) -{ - RecalcPagingInfo(); - - SyncScrollbars(); - - event.Skip(); -} - -void wxTextEditorView::OnEraseBackground( wxEraseEvent& event ) -{ -#if 0 - int w = 0, h = 0; - - GetClientSize( &w, &h ); - - wxPaintDC dc( this ); - - dc.SetPen( *wxTRANSPARENT_PEN ); - dc.SetBrush( *wxWHITE_BRUSH ); - dc.DrawRectangle( 0,0, w,h ); -#endif -} - -void wxTextEditorView::OnLButtonDown( wxMouseEvent& event ) -{ - if ( mDragStarted ) return; - - mDragStarted = TRUE; - - TPosition textPos; - PixelsToTextPos( event.m_x, event.m_y, textPos ); - - mpModel->SetSelectionEditMode( FALSE ); - - mpModel->OnMoveToPosition( textPos ); - - mpModel->SetSelectionEditMode( TRUE ); - - SetFocus(); - - CaptureMouse(); -} - -void wxTextEditorView::OnLButtonUp( wxMouseEvent& event ) -{ - if ( mDragStarted ) - { - OnMotion( event ); // simulate last motion event - - mpModel->SetSelectionEditMode( FALSE ); - - ReleaseMouse(); - mDragStarted = FALSE; - } -} - -void wxTextEditorView::OnMotion( wxMouseEvent& event ) -{ - if ( mDragStarted ) - { - TPosition textPos; - - if ( event.m_y < 0 && mpModel->GetCursor().mRow == 0 ) - - event.m_y = 0; - - PixelsToTextPos( event.m_x, event.m_y, textPos ); - - mpModel->OnMoveToPosition( textPos ); - } -} - -void wxTextEditorView::OnDblClick( wxMouseEvent& event ) -{ - event.Skip(); - mpModel->OnSelectWord(); -} - -void wxTextEditorView::OnSetFocus( wxFocusEvent& event ) -{ - if ( !mLTMode && mCursorOn ) - { - mpTimer->SetView( this ); - mpTimer->ShowCursor( TRUE ); - } -} - -void wxTextEditorView::OnKillFocus( wxFocusEvent& event ) -{ - if ( !mLTMode && mCursorOn ) - { - mpTimer->HideCursor( TRUE ); - mpTimer->SetView( NULL ); - } -} - -void wxTextEditorView::HoldCursor( bool hold ) -{ - if ( mLTMode || !mCursorOn ) return; - - if ( !hold ) - { - if ( wxWindow::FindFocus() != this ) - { - mpTimer->HideCursor(); - mpTimer->SetView( NULL ); - } - } - else - { - mpTimer->SetView( this ); - mpTimer->ShowCursor(); - } -} - -void wxTextEditorView::OnKeyDown( wxKeyEvent& event ) -{ - // FOR NOW:: hard-coded key-bindings - - mpModel->SetSelectionEditMode( event.ShiftDown() ); - - if ( event.ControlDown() ) - { - if ( event.m_keyCode == WXK_LEFT ) - - mpModel->OnWordLeft(); - else - if ( event.m_keyCode == WXK_RIGHT ) - - mpModel->OnWordRight(); - else - if ( event.m_keyCode == WXK_UP ) - - mpModel->OnSlideUp(); - else - if ( event.m_keyCode == WXK_DOWN ) - - mpModel->OnSlideDown(); - else - if ( event.m_keyCode == WXK_HOME ) - - mpModel->OnStartOfText(); - else - if ( event.m_keyCode == WXK_END ) - - mpModel->OnEndOfText(); - else - if ( event.m_keyCode == WXK_INSERT ) - - mpModel->OnCopy(); - else - event.Skip(); - - /* - else - if ( event.m_keyCode == WXK_NEXT ) - - mpModel->(); - else - if ( event.m_keyCode == WXK_PRIOR ) - - mpModel->(); - */ - } - else - { - if ( event.m_keyCode == WXK_LEFT ) - - mpModel->OnMoveLeft(); - else - if ( event.m_keyCode == WXK_RIGHT ) - - mpModel->OnMoveRight(); - else - if ( event.m_keyCode == WXK_UP ) - - mpModel->OnMoveUp(); - else - if ( event.m_keyCode == WXK_DOWN ) - - mpModel->OnMoveDown(); - else - if ( event.m_keyCode == WXK_HOME ) - - mpModel->OnStartOfLine(); - else - if ( event.m_keyCode == WXK_END ) - - mpModel->OnEndOfLine(); - else - if ( event.m_keyCode == WXK_NEXT ) - - mpModel->OnPageDown(); - else - if ( event.m_keyCode == WXK_PRIOR ) - - mpModel->OnPageUp(); - else - if ( event.m_keyCode == WXK_DELETE ) - - mpModel->OnDelete(); - else - if ( event.m_keyCode == WXK_INSERT && event.ShiftDown() ) - - mpModel->OnPaste(); - else - event.Skip(); - } -} - -void wxTextEditorView::OnChar( wxKeyEvent& event ) -{ - if ( event.ControlDown() ) - { - if ( event.m_keyCode == 'y' ) - - mpModel->OnDeleteLine(); - else - if ( event.m_keyCode == 'v' ) - - mpModel->OnPaste(); - else - if ( event.m_keyCode == 'c' ) - - mpModel->OnCopy(); - else - if ( event.m_keyCode == 'z' ) - - mpModel->OnUndo(); - else - if ( event.m_keyCode == 'a' ) - - mpModel->OnRedo(); - else - event.Skip(); - } - else - if ( event.AltDown() ) - { - if ( event.m_keyCode == WXK_BACK ) - - mpModel->OnUndo(); - else - event.Skip(); - } - else - if ( event.m_keyCode == WXK_BACK ) - - mpModel->OnDeleteBack(); - else - if ( event.m_keyCode == WXK_TAB && event.ShiftDown() ) - - mpModel->OnShiftSelectionIndent( TRUE ); - else - { - if ( !mpModel->SelectionIsEmpty() && event.m_keyCode == WXK_TAB ) - - mpModel->OnShiftSelectionIndent( FALSE ); - else - mpModel->OnInsertChar( event.m_keyCode ); - } -} - -void wxTextEditorView::SetModel( wxTextEditorModel* pModel ) -{ - mpModel = pModel; - mSelectionStart = pModel->GetStartOfSelection(); - mSelectionEnd = pModel->GetEndOfSelection(); - mCursorPos = pModel->GetCursor(); -} - -void wxTextEditorView::SetSourcePainter( SourcePainter* pPainter ) -{ - mpPainter = pPainter; -} - -void wxTextEditorView::AddPinPainter( TPinPainterBase* pPainter ) -{ - mPinPainters.push_back( pPainter ); -} - -void wxTextEditorView::SetDefaultFont( const wxFont& font ) -{ - mFont = font; - -#if defined(__WXMSW__) || defined(__WINDOWS__) - mFont.RealizeResource(); -#endif - - mCharDim.x = -1; - mCharDim.y = -1; - - RecalcPagingInfo(); -} - -void wxTextEditorView::SetRowsPerPage( size_t n ) -{ - mpModel->SetRowsPerPage( n ); - - mRowsPerPage = n; - SyncScrollbars(); - PositionCursor(); -} - -void wxTextEditorView::SetMaxColumns( size_t n ) -{ - mMaxColumns = n; - - SyncScrollbars(); - PositionCursor(); -} - -wxFont& wxTextEditorView::GetDefaultFont() -{ - return mFont; -} - -void wxTextEditorView::SetLineTrackingMode( bool on, const wxColour& col ) -{ - mLTColour = col; - mLTMode = on; - - if ( mpTimer->GetView() == this ) - - mpTimer->HideCursor(); -} - -void wxTextEditorView::EnableCursor( bool enable ) -{ - mCursorOn = enable; -} - -void wxTextEditorView::EnableScrollbars( bool enable ) -{ - mScrollingOn = enable; -} - -bool wxTextEditorView::IsActiveView() -{ - return this == mpModel->GetActiveView(); -} - -void wxTextEditorView::PositionCursor() -{ - if ( !IsActiveView() || - mLTMode || !mCursorOn ) return; - - mpTimer->HideCursor(); - - TextPosToScreenPos( mpModel->GetCursor(), mCursorScrPos ); - - mpTimer->ShowCursor(); -} - -void wxTextEditorView::PixelsToScrPos( int x, int y, int& scrRow, int& scrCol ) -{ - x -= mLeftMargin; - y -= mTopMargin; - - //if ( x < 0 ) x = 0; // FOR NOW:: horizontal auto-scroll disabled - - scrCol = x / mCharDim.x; - scrRow = y / mCharDim.y; -} - -void wxTextEditorView::PixelsToTextPos( int x, int y, TPosition& textPos ) -{ - int scrRow = 0, scrCol = 0; - PixelsToScrPos( x, y, scrRow, scrCol ); - - if ( scrRow + (int)mPagePos.mRow < 0 ) - - scrRow = -(int)mPagePos.mRow; - - if ( scrCol + (int)mPagePos.mCol < 0 ) - - scrCol = -(int)mPagePos.mCol; - - ScreenPosToTextPos( TPosition( scrRow, scrCol ), textPos ); -} - -void wxTextEditorView::ScreenPosToPixels( const TPosition& scrPos, int& x, int& y ) -{ - x = mLeftMargin + scrPos.mCol * mCharDim.x; - y = mTopMargin + scrPos.mRow * mCharDim.y; -} - -void wxTextEditorView::TextPosToScreenPos( const TPosition& txtPos, TPosition& scrPos ) -{ - TTextIterator iter; - - if ( txtPos.mRow != mCashedIter.mPos.mRow ) - { - iter = mpModel->CreateIterator( txtPos ); - mCashedIter = iter; - } - else - { - iter = mCashedIter; - iter.mPos.mCol = txtPos.mCol; - } - - iter.ToStartOfLine(); - - size_t scrCol = 0; - size_t txtCol = 0; - - while( !iter.IsEol() && txtCol < txtPos.mCol ) - { - if ( iter.GetChar() == '\t' ) - { - size_t spacing = ( (scrCol / mpModel->mTabSize) + 1 ) * mpModel->mTabSize - scrCol; - - scrCol += spacing; - } - else - ++scrCol; - - ++txtCol; - iter.NextChar(); - } - - TPosition actualPos = iter.GetPosition(); - - scrCol += txtPos.mCol - txtCol; - - scrPos.mRow = actualPos.mRow - mPagePos.mRow; - scrPos.mCol = scrCol - mPagePos.mCol; -} - -void wxTextEditorView::ScreenPosToTextPos( const TPosition& scrPos, TPosition& txtPos ) -{ - TPosition absScrPos( scrPos.mRow + mPagePos.mRow, scrPos.mCol + mPagePos.mCol ); - - TTextIterator iter = mpModel->CreateIterator( TPosition( absScrPos.mRow, 0 ) ); - - size_t scrCol = 0; - size_t txtCol = 0; - - // iterate over all possible on-screen positions, and find one which matches "absScrPos" - - while( !iter.IsEol() && scrCol < absScrPos.mCol ) - { - if ( iter.GetChar() == '\t' ) - { - size_t spacing = ( (scrCol / mpModel->mTabSize) + 1 ) * mpModel->mTabSize - scrCol; - - scrCol += spacing; - } - else - ++scrCol; - - ++txtCol; - iter.NextChar(); - } - - TPosition actualPos = iter.GetPosition(); - - if ( scrCol == absScrPos.mCol ) - { - txtPos = actualPos; - return; - } - else - if ( scrCol < absScrPos.mCol ) - { - // the absScrPos points past the eol - - txtPos = actualPos; - txtPos.mCol += absScrPos.mCol - scrCol; - } - else - if ( scrCol > absScrPos.mCol ) - { - // there should have been a '\t' char, which made us jump too far forward - - txtPos = actualPos; - --txtPos.mCol; - } -} - -bool wxTextEditorView::IsClipboardCmd( wxKeyEvent& key ) -{ - if ( key.ControlDown() && key.m_keyCode == WXK_CONTROL ) - - return TRUE; - - if ( key.ShiftDown() && key.m_keyCode == WXK_SHIFT ) - - return TRUE; - - if ( key.ControlDown() ) - { - return ( key.m_keyCode == 'C' || - key.m_keyCode == 'c' || - key.m_keyCode == WXK_INSERT ); - } - - return FALSE; -} - -void wxTextEditorView::ObtainFontProperties() -{ - wxClientDC dc(this); - dc.SetFont( mFont ); - - long w,h; - - dc.GetTextExtent( "X", &w, &h ); - - mCharDim.x = w; - mCharDim.y = h; -} - -void wxTextEditorView::SyncViewPortPosition() -{ - - TPosition pos = mpModel->GetCursor(); - - TextPosToScreenPos( pos, pos ); - pos.mRow += mPagePos.mRow; - pos.mCol += mPagePos.mCol; - - if ( pos.mRow < mPagePos.mRow ) - { - mPagePos.mRow = pos.mRow; - mFullRefreshPending = TRUE; - } - else - if ( pos.mRow >= mPagePos.mRow + mRowsPerPage && mRowsPerPage != 0 ) - { - mPagePos.mRow = pos.mRow - mRowsPerPage + 1; - mFullRefreshPending = TRUE; - } - - if ( pos.mCol < mPagePos.mCol ) - { - mPagePos.mCol = pos.mCol; - mFullRefreshPending = TRUE; - } - else - if ( pos.mCol >= mPagePos.mCol + mColsPerPage ) - { - mPagePos.mCol = pos.mCol - mColsPerPage + 1; - mFullRefreshPending = TRUE; - } -} - -void wxTextEditorView::SyncScrollbars() -{ - if ( !mScrollingOn ) return; - - size_t nRows = mpModel->GetTotalRowCount(); - -#if !defined(__WINDOWS__) - - if ( mLastViewStart == mPagePos ) - { - if ( mLastRowsTotal != nRows ) - - mAdjustScrollPending = TRUE; - - return; - } -#else - if ( mLastViewStart == mPagePos && - mLastRowsTotal == nRows ) - - return; -#endif - SetScrollbars( mCharDim.x, mCharDim.y, - mMaxColumns, - nRows, - mPagePos.mCol, - mPagePos.mRow, - TRUE - ); - - mLastViewStart = mPagePos; - mLastRowsTotal = nRows; -} - -void wxTextEditorView::ScrollView( int rows, int cols ) -{ - int pageRow = (int)mPagePos.mRow; - int pageCol = (int)mPagePos.mCol; - - if ( pageRow + rows < 0 ) - pageRow = 0; - else - if ( pageRow + rows > (int)mpModel->GetTotalRowCount() ) - - pageRow = mpModel->GetTotalRowCount(); - else - pageRow = pageRow + rows; - - mPagePos.mRow = (size_t)pageRow; - - if ( pageCol + cols < 0 ) - - pageCol = 0; - else - pageCol = pageCol + cols; - - mPagePos.mCol = pageCol; - - mFullRefreshPending = TRUE; -} - -void wxTextEditorView::OnModelChanged() -{ - // invalidate pre-cached iterator - mCashedIter.mPos = TPosition( (size_t)(-1), 0 ); - - SyncViewPortPosition(); - - if ( mLTMode ) mFullRefreshPending = TRUE; - - if ( mpModel->mTextChanged && !mFullRefreshPending ) - { - wxClientDC dc( this ); - PaintRows( mpModel->mChangedFromRow, mpModel->mChangedTillRow, dc ); - } - else - if ( mFullRefreshPending ) - { - wxClientDC dc( this ); - PaintRows( mPagePos.mRow, mPagePos.mRow + mRowsPerPage, dc ); - } - - if ( IsActiveView() ) - { - PositionCursor(); - SyncScrollbars(); - } -} - -void wxTextEditorView::Activate() -{ - mpModel->SetStartOfSelection( mSelectionStart ); - mpModel->SetEndOfSelection( mSelectionEnd ); - mpModel->SetCursor( mCursorPos ); - - mpModel->SetRowsPerPage( mRowsPerPage ); - - if ( !mLTMode && mCursorOn ) - { - mpTimer->SetView( this ); - mpTimer->ShowCursor(); - } - - mpModel->SetActiveView( this ); -} - -void wxTextEditorView::Deactivate() -{ - mSelectionStart = mpModel->GetStartOfSelection(); - mSelectionEnd = mpModel->GetEndOfSelection(); - mCursorPos = mpModel->GetCursor(); - - if ( mpTimer->GetView() == this && - !mLTMode && mCursorOn ) - - mpTimer->HideCursor( TRUE ); -} - -/*** protected methods ***/ - -char* wxTextEditorView::mpLineBuffer = NULL; -size_t wxTextEditorView::mpLineBufferLen = 0; - -char* wxTextEditorView::GetLineBuffer( size_t len ) -{ - if ( mpLineBuffer == NULL || mpLineBufferLen < len ) - { - if ( !mpLineBuffer ) mpModel->FreeCharacters( mpLineBuffer ); - - mpLineBuffer = mpModel->AllocCharacters( len ); - - mpLineBufferLen = len; - } - - return mpLineBuffer; -} - -TPinPainterBase* wxTextEditorView::FindPainterForPin( TPinBase& pin ) -{ - int pinTc = pin.mTypeCode; - - for( size_t i = 0; i != mPinPainters.size(); ++i ) - - if ( mPinPainters[i]->mPinTypeCode == pinTc ) - - return mPinPainters[i]; - - return NULL; -} - -void wxTextEditorView::PaintDecorations( size_t fromRow, - size_t tillRow, - wxDC& dc, TTextIterator& iter ) -{ - int dcY = ( fromRow - mPagePos.mRow ) * mCharDim.y + mTopMargin; - - size_t curPin = mpModel->FindFirstPinInRange( fromRow, tillRow ); - - PinListT& pins = mpModel->GetPins(); - TPinPainterBase* pPainter = NULL; - - size_t prevRow = fromRow; - int prevY = dcY; - - wxPoint pos; - wxSize dim( mLeftMargin, mCharDim.y ); - - while( curPin != NPOS ) - { - TPinBase& pin = *pins[curPin]; - - if ( pPainter == NULL || - pPainter->mPinTypeCode != pin.mTypeCode ) - - pPainter = FindPainterForPin( pin ); - - - // only pins which have their painters can be "visualized" - - if ( pPainter ) - { - pos.x = 0; - pos.y = ( pin.mRow - mPagePos.mRow )* mCharDim.y + mTopMargin; - - if ( prevRow < pin.mRow ) - { - // fill upper gap - - dc.SetBrush( mNormalBkBrush ); - dc.SetPen( *wxTRANSPARENT_PEN ); - dc.DrawRectangle( 0, prevY, - mLeftMargin + 1, - mCharDim.y * ( pin.mRow - prevRow ) + 1 ); - } - - pPainter->DrawPin( &pin, *this, dc, pos, dim ); - - prevRow = pin.mRow + 1; - prevY = pos.y + mCharDim.y; - } - - ++curPin; - - if ( curPin >= pins.size() || - pins[curPin]->mRow >= tillRow ) - - break; - } - - // fill the reminder - - if ( prevRow < tillRow ) - { - dc.SetBrush( mNormalBkBrush ); - dc.SetPen( *wxTRANSPARENT_PEN ); - dc.DrawRectangle( 0, prevY, - mLeftMargin + 1, - mCharDim.y * ( tillRow - prevRow ) + 1 ); - } - - dc.SetPen( *wxTRANSPARENT_PEN ); -} - -void wxTextEditorView::PaintRows( size_t fromRow, size_t tillRow, wxDC& dc ) -{ - // NOTE:: raws are painted from "fromRow" but not including "tillRow" - [fromRow,tillRow) - - dc.SetPen( *wxTRANSPARENT_PEN ); - - // how much on-screen columns are visable? - - size_t fromScrCol = mPagePos.mCol; - size_t tillScrCol = fromScrCol + mColsPerPage; - - TPosition selStart = mpModel->GetStartOfSelection(); - TPosition selEnd = mpModel->GetEndOfSelection(); - - bool selectionIsEmpty = ( selStart == selEnd ); - - wxColour curFgCol; - wxColour curBkCol; - - wxBrush mLTBrush( mLTColour, wxSOLID ); - - // clip given row-region to the current page - - if ( ( fromRow >= mPagePos.mRow + mRowsPerPage) || - ( tillRow <= mPagePos.mRow ) - ) - - return; - - if ( fromRow < mPagePos.mRow ) fromRow = mPagePos.mRow; - if ( tillRow > mPagePos.mRow + mRowsPerPage ) tillRow = mPagePos.mRow + mRowsPerPage; - - if ( fromRow >= tillRow ) return; - - // now start the renderng - - if ( mpTimer->GetView() == this && mCursorOn && !mLTMode ) - { - mpTimer->Lock(); - mpTimer->SetIsShown( FALSE ); - } - - dc.SetFont( mFont ); - dc.SetBackgroundMode( wxSOLID ); - - TTextIterator iter = mpModel->CreateIterator( TPosition( fromRow, 0 ) ); - - PaintDecorations( fromRow, tillRow, dc, iter ); - - size_t cursorRow = mpModel->GetCursor().mRow; - - size_t curRow = fromRow; - for( ; curRow != tillRow; ++curRow ) - { - // place text into line-buffer - - iter.ToStartOfLine(); - size_t lineLen = iter.GetLineLen(); - - char* lineBuf = GetLineBuffer( lineLen + 1 ); - - size_t i = 0; - - while( !iter.IsEof() && !iter.IsEol() ) - { - lineBuf[i++] = iter.GetChar(); - iter.NextChar(); - } - - iter.NextChar(); // skip eol - - // obtain "highlights" - - mpPainter->SetState( FALSE, FALSE ); - mpPainter->Init( FALSE ); - mpPainter->ProcessSource( lineBuf, lineLen ); - IntListT& blocks = mpPainter->GetBlocks(); - - // setup state vars - - int dcY = ( curRow - mPagePos.mRow ) * mCharDim.y + mTopMargin; - - size_t scrCol = 0; - size_t txtCol = 0; - - size_t curBlk = 0; - size_t curBlkCol = 0; - - int chunkLen = -1; - size_t chunkTxtStart = 0; - size_t chunkScrStart = 0; - - // pre-detect occurance of selection - - bool lineHasSelection = ( selStart.mRow == curRow ) || - ( selEnd.mRow == curRow ); - - bool isInSelection = ( selStart.mRow <= curRow ) && - ( selEnd.mRow >= curRow ); - - if ( isInSelection && selStart.mRow == curRow && - selStart.mCol != 0 ) - - isInSelection = FALSE; - - if ( selStart == selEnd ) - { - lineHasSelection = FALSE; - isInSelection = FALSE; - } - - char ch = '\0'; - - // loop though the text in this row - - do - { - TPosition curPos( curRow, txtCol ); - - // first check if we can finish the current chunk - - bool finishChunk = FALSE; - - if ( curBlk < blocks.size() && - curBlkCol + get_src_block_len( blocks[curBlk] ) == txtCol ) - { - curBlkCol += get_src_block_len( blocks[curBlk] ); - ++curBlk; - finishChunk = TRUE; - } - else - if ( ( !selectionIsEmpty && ( curPos == selStart || curPos == selEnd ) ) - || lineBuf[txtCol] == '\t' - || txtCol == lineLen ) - - finishChunk = TRUE; - - if ( finishChunk && chunkLen != -1 ) - { - // is any part of the chunk visable? - - size_t chunkScrEnd = chunkScrStart + chunkLen; - - if ( ( // if hits from one side or is inside - ( chunkScrStart >= fromScrCol && - chunkScrStart < tillScrCol ) || - ( chunkScrEnd >= fromScrCol && - chunkScrEnd < tillScrCol ) ) || - - // if overlaps the whole range - ( chunkScrStart < fromScrCol && - chunkScrEnd >= tillScrCol ) - - ) - { - // render chunk data to the given DC - - dc.SetTextForeground( curFgCol ); - dc.SetTextBackground( curBkCol ); - - // clip left edge - - if ( chunkScrStart < fromScrCol ) - { - size_t diff = fromScrCol - chunkScrStart; - chunkLen -= diff; - chunkTxtStart += diff; - chunkScrStart += diff; - } - - // clip right edge - - if ( chunkScrEnd > tillScrCol ) - { - size_t diff = chunkScrEnd - tillScrCol; - chunkLen -= diff; - chunkScrEnd -= diff; - } - - // create string - - char tmp = lineBuf[chunkTxtStart + chunkLen]; - - lineBuf[chunkTxtStart + chunkLen] = '\0'; - - // use member-variable, reuse heap-buffer between outputs - mFragment = lineBuf + chunkTxtStart; - - lineBuf[chunkTxtStart + chunkLen] = tmp; - - // draw it - - int dcX = (chunkScrStart - fromScrCol) * mCharDim.x + mLeftMargin; - - dc.DrawText( mFragment, dcX, dcY ); - } - - chunkLen = -1; - - } // end of "if ( finishChunk )" - - if ( txtCol == lineLen ) - break; - - if ( chunkLen == -1 ) - { - // prepare the new chunk - - if ( curBlk < blocks.size() ) - { - switch( get_src_block_rank( blocks[curBlk] ) ) - { - case RANK_BLACK : curFgCol = mNormalTextCol; break; - case RANK_BLUE : curFgCol = mIndentifierTextCol; break; - case RANK_RED : curFgCol = mReservedWordTextCol; break; - case RANK_GREEN : curFgCol = mCommentTextCol; break; - default : break; - } - } - - // track occurence of selection - - if ( lineHasSelection ) - { - isInSelection = TRUE; - - if ( selEnd.mRow == curRow && - selEnd.mCol <= txtCol ) - - isInSelection = FALSE; - - if ( selStart.mRow == curRow && - selStart.mCol > txtCol ) - - isInSelection = FALSE; - } - - if ( isInSelection ) - { - curFgCol = mSelectionFgCol; - curBkCol = mSelectionBkCol; - } - else - { - if ( mLTMode && curRow == cursorRow ) - - curBkCol = mLTColour; - else - curBkCol = mNormalBkCol ; - } - - chunkScrStart = scrCol; - chunkTxtStart = txtCol; - chunkLen = 0; - } - - - ch = lineBuf[txtCol]; - - if ( ch == '\t' ) - { - // tab's are treated specially (for simplicity and speed) - - int dcX = (chunkScrStart - fromScrCol) * mCharDim.x + mLeftMargin; - - if ( !isInSelection ) - { - if ( mLTMode && curRow == cursorRow ) - - dc.SetBrush( mLTBrush ); - else - dc.SetBrush( mNormalBkBrush ); - } - else dc.SetBrush( mSelectedBkBrush ); - - // *** "the rule of TAB..." *** - - size_t spacing = ( (scrCol / mpModel->mTabSize) + 1 ) * mpModel->mTabSize - scrCol; - - int width = spacing * mCharDim.x + 1; - - if ( dcX < mLeftMargin ) - { - width -= mLeftMargin - dcX; - - dcX = mLeftMargin; - } - - if ( width > 0 ) - - dc.DrawRectangle( dcX, dcY, width, mCharDim.y + 1 ); - - scrCol += spacing; - txtCol += 1; - - // move chunk-start forward, after the occurance of '\t' - - chunkLen = -1; - } - else - { - // increase on-screen/in-text positions - - ++scrCol; - ++txtCol; - ++chunkLen; - } - - } while( TRUE ); - - // fill the reminding white-space after eol - - if ( scrCol < tillScrCol && - ( !isInSelection || - ( isInSelection && curRow == selEnd.mRow ) ) - ) - { - if ( scrCol < fromScrCol ) scrCol = fromScrCol; - - int dcX = ( scrCol - fromScrCol ) * mCharDim.x + mLeftMargin; - - if ( mLTMode && curRow == cursorRow ) - - dc.SetBrush ( mLTBrush ); - else - dc.SetBrush( mNormalBkBrush ); - - dc.DrawRectangle( dcX, dcY, - mCharDim.x * ( tillScrCol - scrCol ) + 1, - mCharDim.y + 1 ); - } - - // render selection which is located past the eol - - if ( ( lineHasSelection || isInSelection ) && - !( selEnd.mRow == curRow && selEnd.mCol <= txtCol ) - ) - { - // determine start of selection on-screen - - size_t scrSelStart = scrCol + ( selStart.mCol - txtCol ); - - if ( isInSelection ) - - scrSelStart = scrCol; - - size_t scrSelEnd = tillScrCol; - - if ( selEnd.mRow == curRow ) - - scrSelEnd = scrCol + ( selEnd.mCol - txtCol ); - - // clipping - - if ( scrSelStart < fromScrCol ) scrSelStart = fromScrCol; - if ( scrSelEnd > tillScrCol ) scrSelEnd = tillScrCol; - - // drawing - - if ( scrSelEnd > scrSelStart ) - { - int dcX = ( scrSelStart - fromScrCol ) * mCharDim.x + mLeftMargin; - - dc.SetBrush( mSelectedBkBrush ); - dc.DrawRectangle( dcX, dcY, - mCharDim.x * ( scrSelEnd - scrSelStart ) + 1, - mCharDim.y + 1 ); - } - } - - if ( iter.IsEof() ) - { - ++curRow; - break; - } - - } // end of "for(...)" - - if ( curRow < tillRow ) - { - dc.SetBrush( mNormalBkBrush ); - - int dcY = mTopMargin + (curRow - mPagePos.mRow)*mCharDim.y; - int dcX = mLeftMargin; - - dc.DrawRectangle( dcX, dcY, mColsPerPage*mCharDim.x + 1, - ( tillRow - curRow ) * mCharDim.y + 1 - ); - } - - if ( mFullRefreshPending ) - { - dc.SetBrush( mNormalBkBrush ); - - // fill in "corners" which are never reached by characters - - int w,h; - GetClientSize( &w, &h ); - - dc.SetBrush( mNormalBkBrush ); - - int dcX = tillScrCol*mCharDim.x + mLeftMargin; - - dc.DrawRectangle( dcX, mTopMargin, w - dcX + 1, h ); - - int dcY = mTopMargin + mRowsPerPage*mCharDim.y; - - dc.DrawRectangle( 0, dcY, w, h - dcY + 2 ); - - ++curRow; - - // any past-the-eof lines left at the bottom? - } - - mFullRefreshPending = FALSE; - - if ( mpTimer->GetView() == this && mCursorOn && !mLTMode ) - - mpTimer->Unlock(); - -} // end of PaintRows(..) - -/***** Implementation for class TBookmarkPainter *****/ - -TBookmarkPainter::TBookmarkPainter() - - : TPinPainterBase( BOOKMARK_PIN_TC ), - mBkBrush( wxColour( 0,255,255 ), wxSOLID ) -{ -} - -void TBookmarkPainter::DrawPin( TPinBase* pPin, wxTextEditorView& view, wxDC& dc, - const wxPoint& pos, const wxSize& dim ) -{ - dc.SetPen( *wxBLACK_PEN ); - dc.SetBrush( mBkBrush ); - dc.DrawRoundedRectangle( pos.x+2, pos.y, dim.x-4, dim.y, 4 ); -} - -/***** Implementation for class TBreakpointPainter *****/ - -TBreakpointPainter::TBreakpointPainter() - - : TPinPainterBase( BRKPOINT_PIN_TC ), - mBkBrush( wxColour( 196,0,0 ), wxSOLID ) -{ -} - -void TBreakpointPainter::DrawPin( TPinBase* pPin, wxTextEditorView& view, wxDC& dc, - const wxPoint& pos, const wxSize& dim ) -{ - dc.SetPen( *wxBLACK_PEN ); - dc.SetBrush( mBkBrush ); - dc.DrawRoundedRectangle( pos.x+6, pos.y+2, dim.x-12, dim.y-4, 30 ); -} - -/***** Implementation for class TCursorTimer *****/ - -TCursorTimer::TCursorTimer() - - : mIsLocked( FALSE ), - mIsShown ( FALSE ), - mBlinkInterval( 500 ), - mBrush( wxColour(0,0,0), wxSOLID ), - mMissOneTick( FALSE ) -{ -} - -void TCursorTimer::Notify() -{ - if ( mIsLocked ) return; - - if ( mMissOneTick ) - { - // this trick is used because it's not - // possible to restart the timer under wxGtk - - mMissOneTick = FALSE; - return; - } - - - mIsLocked = TRUE; - - DrawCursor(); - - mIsShown = !mIsShown; - - mIsLocked = FALSE; -} - -void TCursorTimer::SetView( wxTextEditorView* pView ) -{ - mpView = pView; -} - -wxTextEditorView* TCursorTimer::GetView() -{ - return mpView; - -} - -void TCursorTimer::HideCursor( bool forceHide ) -{ - Lock(); - - if ( mIsShown ) - { - DrawCursor(); - mIsShown = FALSE; - } - - Unlock(); -} - -void TCursorTimer::ShowCursor( bool forceShow ) -{ - Lock(); - - if ( !forceShow ) - { - DrawCursor(); - mIsShown = TRUE; - - if ( mStarted ) - mMissOneTick = TRUE; - } - - Unlock(); - - if ( !mStarted ) - { - Start( mBlinkInterval ); - mStarted = TRUE; - } -} - -void TCursorTimer::Lock() -{ -// while( mIsLocked ); - - mIsLocked = TRUE; -} - -void TCursorTimer::Unlock() -{ - mIsLocked = FALSE; -} - -void TCursorTimer::SetIsShown( bool isShown ) -{ - mIsShown = isShown; -} - -/*** protected methods ***/ - -void TCursorTimer::DrawCursor() -{ - if ( mpView == NULL ) return; - - wxClientDC dc( mpView ); - - int x = 0, y = 0; - - mpView->ScreenPosToPixels( mpView->mCursorScrPos, x, y ); - - dc.SetLogicalFunction( wxINVERT ); - dc.SetBrush( mBrush ); - - dc.SetPen( *wxTRANSPARENT_PEN ); - dc.DrawRectangle( x,y, 3, mpView->mCharDim.y + 1 ); - dc.SetBackgroundMode( wxSOLID ); -} diff --git a/utils/wxPython/modules/lseditor/tdefs.h b/utils/wxPython/modules/lseditor/tdefs.h deleted file mode 100644 index 7538980d1e..0000000000 --- a/utils/wxPython/modules/lseditor/tdefs.h +++ /dev/null @@ -1,903 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 - #include -#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 TBlockListT; - typedef vector TCommandListT; - typedef vector 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 PinListT; - typedef vector 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 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__ diff --git a/utils/wxPython/modules/lseditor/test/editor.py b/utils/wxPython/modules/lseditor/test/editor.py deleted file mode 100644 index 715b1e53fa..0000000000 --- a/utils/wxPython/modules/lseditor/test/editor.py +++ /dev/null @@ -1,118 +0,0 @@ -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() diff --git a/utils/wxPython/modules/lseditor/wxsdefs.h b/utils/wxPython/modules/lseditor/wxsdefs.h deleted file mode 100644 index 0014d7f6f4..0000000000 --- a/utils/wxPython/modules/lseditor/wxsdefs.h +++ /dev/null @@ -1,374 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 - - -#include "controlarea.h" - -#ifdef wxUSE_TEMPLATE_STL -#include -#include -//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 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_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 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 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 diff --git a/utils/wxPython/modules/lseditor/wxstlac.h b/utils/wxPython/modules/lseditor/wxstlac.h deleted file mode 100644 index 447bc1b01c..0000000000 --- a/utils/wxPython/modules/lseditor/wxstlac.h +++ /dev/null @@ -1,659 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 -#include -#include -#include -#include - - -// 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 diff --git a/utils/wxPython/modules/lseditor/wxstldefs.h b/utils/wxPython/modules/lseditor/wxstldefs.h deleted file mode 100644 index 51e680f0d0..0000000000 --- a/utils/wxPython/modules/lseditor/wxstldefs.h +++ /dev/null @@ -1,49 +0,0 @@ -#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 - using namespace std; - #ifdef WIN32xxx - #include - #else - - //#include - //#include - // 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 StrListT; - typedef vector IntListT; - -#else - - typedef WXSTL_VECTOR(string) StrListT; - typedef WXSTL_VECTOR_SHALLOW_COPY(int) IntListT; - -#endif - -#endif diff --git a/utils/wxPython/modules/lseditor/wxstllst.h b/utils/wxPython/modules/lseditor/wxstllst.h deleted file mode 100644 index 9bcf331f44..0000000000 --- a/utils/wxPython/modules/lseditor/wxstllst.h +++ /dev/null @@ -1,555 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 -#include -#include -#include -#include - -// 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 \ No newline at end of file diff --git a/utils/wxPython/modules/lseditor/wxstlvec.h b/utils/wxPython/modules/lseditor/wxstlvec.h deleted file mode 100644 index bc6fe504e0..0000000000 --- a/utils/wxPython/modules/lseditor/wxstlvec.h +++ /dev/null @@ -1,857 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 -#include // imports memmove() -#include -#include -#include -#include - -// 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 diff --git a/utils/wxPython/modules/ogl/build.cfg b/utils/wxPython/modules/ogl/build.cfg deleted file mode 100644 index 9f13a069d5..0000000000 --- a/utils/wxPython/modules/ogl/build.cfg +++ /dev/null @@ -1,23 +0,0 @@ -# -*- python -*- -import sys - -MODULE = 'oglc' -SWIGFILES = ['ogl.i', 'oglbasic.i', 'oglshapes.i', 'oglshapes2.i', 'oglcanvas.i'] -SOURCES = ['oglhelpers.cpp'] - - -OTHERCFLAGS = '-I$(WXWIN)/contrib/include' - -if sys.platform == 'win32': - OTHERLIBS = '$(WXWIN)/contrib/lib/ogl$(LIBEXT).lib' -else: - OTHERLIBS = '-L$(WXWIN)/build/contrib/lib -logl' - -#OTHERSWIGFLAGS = '-stat' -SWIGDEPS = '_ogldefs.i' -OTHERDEPS = 'oglhelpers.h $(WXPSRCDIR)/helpers.h' - - -# There are no platform differences so we don't need separate code directories -GENCODEDIR='.' -SWIGTOOLKITFLAG='' diff --git a/utils/wxPython/modules/ogl/ogl.cpp b/utils/wxPython/modules/ogl/ogl.cpp deleted file mode 100644 index 3751d4ab16..0000000000 --- a/utils/wxPython/modules/ogl/ogl.cpp +++ /dev/null @@ -1,718 +0,0 @@ -/* - * FILE : ./ogl.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initoglc - -#define SWIG_name "oglc" - -#include "helpers.h" -#include "oglhelpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - -static char* wxStringErrorMsg = "string type is required for parameter"; - -#if defined(__WXMSW__) - wxString wxPyEmptyStr(""); - wxPoint wxPyDefaultPosition(-1, -1); - wxSize wxPyDefaultSize(-1, -1); -#endif - -extern "C" SWIGEXPORT(void) initoglbasicc(); -extern "C" SWIGEXPORT(void) initoglshapesc(); -extern "C" SWIGEXPORT(void) initoglshapes2c(); -extern "C" SWIGEXPORT(void) initoglcanvasc(); -#ifdef __cplusplus -extern "C" { -#endif -static PyObject *_wrap_wxOGLInitialize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLInitialize",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxOGLInitialize(); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxOGLCleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLCleanUp",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxOGLCleanUp(); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef oglcMethods[] = { - { "wxOGLCleanUp", (PyCFunction) _wrap_wxOGLCleanUp, METH_VARARGS | METH_KEYWORDS }, - { "wxOGLInitialize", (PyCFunction) _wrap_wxOGLInitialize, METH_VARARGS | METH_KEYWORDS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, - { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, - { "_wxPrintQuality","_wxCoord",0}, - { "_wxPrintQuality","_int",0}, - { "_wxPrintQuality","_signed_int",0}, - { "_wxPrintQuality","_unsigned_int",0}, - { "_wxPrintQuality","_wxWindowID",0}, - { "_wxPrintQuality","_uint",0}, - { "_wxPrintQuality","_EBool",0}, - { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxPySizer","_class_wxPySizer",0}, - { "_wxPyCompositeShape","_class_wxPyCompositeShape",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_class_wxPyRectangleShape","_wxPyRectangleShape",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxOGLConstraint","_wxOGLConstraint",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPseudoMetaFile","_class_wxPseudoMetaFile",0}, - { "_class_wxArrowHead","_wxArrowHead",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, - { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_wxShapeRegion","_class_wxShapeRegion",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, - { "_wxPyBitmapShape","_class_wxPyBitmapShape",0}, - { "_class_wxPyEllipseShape","_wxPyEllipseShape",0}, - { "_size_t","_wxCoord",0}, - { "_size_t","_wxPrintQuality",0}, - { "_size_t","_unsigned_int",0}, - { "_size_t","_int",0}, - { "_size_t","_wxWindowID",0}, - { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, - { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_class_wxPyDivisionShape","_wxPyDivisionShape",0}, - { "_uint","_wxCoord",0}, - { "_uint","_wxPrintQuality",0}, - { "_uint","_size_t",0}, - { "_uint","_unsigned_int",0}, - { "_uint","_int",0}, - { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxPyShapeCanvas","_class_wxPyShapeCanvas",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxPyBitmapShape","_wxPyBitmapShape",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyControlPoint","_class_wxPyControlPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_class_wxPyDrawnShape","_wxPyDrawnShape",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxPseudoMetaFile","_wxPseudoMetaFile",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, - { "_class_wxShapeRegion","_wxShapeRegion",0}, - { "_EBool","_wxCoord",0}, - { "_EBool","_wxPrintQuality",0}, - { "_EBool","_signed_int",0}, - { "_EBool","_int",0}, - { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxPyCircleShape","_class_wxPyCircleShape",0}, - { "_class_wxPyShapeCanvas","_wxPyShapeCanvas",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_wxPyLineShape","_class_wxPyLineShape",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_class_wxPyPolygonShape","_wxPyPolygonShape",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, - { "_signed_int","_wxCoord",0}, - { "_signed_int","_wxPrintQuality",0}, - { "_signed_int","_EBool",0}, - { "_signed_int","_wxWindowID",0}, - { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, - { "_wxArrowHead","_class_wxArrowHead",0}, - { "_WXTYPE","_short",0}, - { "_WXTYPE","_signed_short",0}, - { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, - { "_unsigned_short","_WXTYPE",0}, - { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_class_wxPyCircleShape","_wxPyCircleShape",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_wxPyDividedShape","_class_wxPyDividedShape",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, - { "_signed_short","_WXTYPE",0}, - { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_class_wxPyControlPoint","_wxPyControlPoint",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, - { "_wxPyShape","_class_wxPyShape",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, - { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, - { "_unsigned_int","_wxCoord",0}, - { "_unsigned_int","_wxPrintQuality",0}, - { "_unsigned_int","_size_t",0}, - { "_unsigned_int","_uint",0}, - { "_unsigned_int","_wxWindowID",0}, - { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, - { "_short","_WXTYPE",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_wxPyTextShape","_class_wxPyTextShape",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_wxPyDivisionShape","_class_wxPyDivisionShape",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, - { "_wxWindowID","_wxCoord",0}, - { "_wxWindowID","_wxPrintQuality",0}, - { "_wxWindowID","_size_t",0}, - { "_wxWindowID","_EBool",0}, - { "_wxWindowID","_uint",0}, - { "_wxWindowID","_int",0}, - { "_wxWindowID","_signed_int",0}, - { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, - { "_int","_wxCoord",0}, - { "_int","_wxPrintQuality",0}, - { "_int","_size_t",0}, - { "_int","_EBool",0}, - { "_int","_uint",0}, - { "_int","_wxWindowID",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPyLineShape","_wxPyLineShape",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_class_wxPyShape","_wxPyShape",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_wxPyDrawnShape","_class_wxPyDrawnShape",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, - { "_wxCoord","_int",0}, - { "_wxCoord","_signed_int",0}, - { "_wxCoord","_unsigned_int",0}, - { "_wxCoord","_wxWindowID",0}, - { "_wxCoord","_uint",0}, - { "_wxCoord","_EBool",0}, - { "_wxCoord","_size_t",0}, - { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_wxDiagram","_class_wxDiagram",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_class_wxPyDividedShape","_wxPyDividedShape",0}, - { "_wxPyEllipseShape","_class_wxPyEllipseShape",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, - { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, - { "_wxPyRectangleShape","_class_wxPyRectangleShape",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxOGLConstraint","_class_wxOGLConstraint",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxPyTextShape","_wxPyTextShape",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, - { "_class_wxDiagram","_wxDiagram",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initoglc() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("oglc", oglcMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"KEY_SHIFT", PyInt_FromLong((long) KEY_SHIFT)); - PyDict_SetItemString(d,"KEY_CTRL", PyInt_FromLong((long) KEY_CTRL)); - PyDict_SetItemString(d,"ARROW_NONE", PyInt_FromLong((long) ARROW_NONE)); - PyDict_SetItemString(d,"ARROW_END", PyInt_FromLong((long) ARROW_END)); - PyDict_SetItemString(d,"ARROW_BOTH", PyInt_FromLong((long) ARROW_BOTH)); - PyDict_SetItemString(d,"ARROW_MIDDLE", PyInt_FromLong((long) ARROW_MIDDLE)); - PyDict_SetItemString(d,"ARROW_START", PyInt_FromLong((long) ARROW_START)); - PyDict_SetItemString(d,"ARROW_HOLLOW_CIRCLE", PyInt_FromLong((long) ARROW_HOLLOW_CIRCLE)); - PyDict_SetItemString(d,"ARROW_FILLED_CIRCLE", PyInt_FromLong((long) ARROW_FILLED_CIRCLE)); - PyDict_SetItemString(d,"ARROW_ARROW", PyInt_FromLong((long) ARROW_ARROW)); - PyDict_SetItemString(d,"ARROW_SINGLE_OBLIQUE", PyInt_FromLong((long) ARROW_SINGLE_OBLIQUE)); - PyDict_SetItemString(d,"ARROW_DOUBLE_OBLIQUE", PyInt_FromLong((long) ARROW_DOUBLE_OBLIQUE)); - PyDict_SetItemString(d,"ARROW_METAFILE", PyInt_FromLong((long) ARROW_METAFILE)); - PyDict_SetItemString(d,"ARROW_POSITION_END", PyInt_FromLong((long) ARROW_POSITION_END)); - PyDict_SetItemString(d,"ARROW_POSITION_START", PyInt_FromLong((long) ARROW_POSITION_START)); - PyDict_SetItemString(d,"CONTROL_POINT_VERTICAL", PyInt_FromLong((long) CONTROL_POINT_VERTICAL)); - PyDict_SetItemString(d,"CONTROL_POINT_HORIZONTAL", PyInt_FromLong((long) CONTROL_POINT_HORIZONTAL)); - PyDict_SetItemString(d,"CONTROL_POINT_DIAGONAL", PyInt_FromLong((long) CONTROL_POINT_DIAGONAL)); - PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_TO", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_TO)); - PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_FROM", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_FROM)); - PyDict_SetItemString(d,"CONTROL_POINT_LINE", PyInt_FromLong((long) CONTROL_POINT_LINE)); - PyDict_SetItemString(d,"FORMAT_NONE", PyInt_FromLong((long) FORMAT_NONE)); - PyDict_SetItemString(d,"FORMAT_CENTRE_HORIZ", PyInt_FromLong((long) FORMAT_CENTRE_HORIZ)); - PyDict_SetItemString(d,"FORMAT_CENTRE_VERT", PyInt_FromLong((long) FORMAT_CENTRE_VERT)); - PyDict_SetItemString(d,"FORMAT_SIZE_TO_CONTENTS", PyInt_FromLong((long) FORMAT_SIZE_TO_CONTENTS)); - PyDict_SetItemString(d,"LINE_ALIGNMENT_HORIZ", PyInt_FromLong((long) LINE_ALIGNMENT_HORIZ)); - PyDict_SetItemString(d,"LINE_ALIGNMENT_VERT", PyInt_FromLong((long) LINE_ALIGNMENT_VERT)); - PyDict_SetItemString(d,"LINE_ALIGNMENT_TO_NEXT_HANDLE", PyInt_FromLong((long) LINE_ALIGNMENT_TO_NEXT_HANDLE)); - PyDict_SetItemString(d,"LINE_ALIGNMENT_NONE", PyInt_FromLong((long) LINE_ALIGNMENT_NONE)); - PyDict_SetItemString(d,"SHADOW_NONE", PyInt_FromLong((long) SHADOW_NONE)); - PyDict_SetItemString(d,"SHADOW_LEFT", PyInt_FromLong((long) SHADOW_LEFT)); - PyDict_SetItemString(d,"SHADOW_RIGHT", PyInt_FromLong((long) SHADOW_RIGHT)); - PyDict_SetItemString(d,"OP_CLICK_LEFT", PyInt_FromLong((long) OP_CLICK_LEFT)); - PyDict_SetItemString(d,"OP_CLICK_RIGHT", PyInt_FromLong((long) OP_CLICK_RIGHT)); - PyDict_SetItemString(d,"OP_DRAG_LEFT", PyInt_FromLong((long) OP_DRAG_LEFT)); - PyDict_SetItemString(d,"OP_DRAG_RIGHT", PyInt_FromLong((long) OP_DRAG_RIGHT)); - PyDict_SetItemString(d,"OP_ALL", PyInt_FromLong((long) OP_ALL)); - PyDict_SetItemString(d,"ATTACHMENT_MODE_NONE", PyInt_FromLong((long) ATTACHMENT_MODE_NONE)); - PyDict_SetItemString(d,"ATTACHMENT_MODE_EDGE", PyInt_FromLong((long) ATTACHMENT_MODE_EDGE)); - PyDict_SetItemString(d,"ATTACHMENT_MODE_BRANCHING", PyInt_FromLong((long) ATTACHMENT_MODE_BRANCHING)); - PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_NORMAL", PyInt_FromLong((long) BRANCHING_ATTACHMENT_NORMAL)); - PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_BLOB", PyInt_FromLong((long) BRANCHING_ATTACHMENT_BLOB)); - PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_VERTICALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_VERTICALLY)); - PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_HORIZONTALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_HORIZONTALLY)); - PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_BOTH", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_BOTH)); - PyDict_SetItemString(d,"gyCONSTRAINT_LEFT_OF", PyInt_FromLong((long) gyCONSTRAINT_LEFT_OF)); - PyDict_SetItemString(d,"gyCONSTRAINT_RIGHT_OF", PyInt_FromLong((long) gyCONSTRAINT_RIGHT_OF)); - PyDict_SetItemString(d,"gyCONSTRAINT_ABOVE", PyInt_FromLong((long) gyCONSTRAINT_ABOVE)); - PyDict_SetItemString(d,"gyCONSTRAINT_BELOW", PyInt_FromLong((long) gyCONSTRAINT_BELOW)); - PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_TOP)); - PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_BOTTOM)); - PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_LEFT)); - PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_RIGHT)); - PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_TOP)); - PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_BOTTOM)); - PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_LEFT)); - PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_RIGHT)); - PyDict_SetItemString(d,"DIVISION_SIDE_NONE", PyInt_FromLong((long) DIVISION_SIDE_NONE)); - PyDict_SetItemString(d,"DIVISION_SIDE_LEFT", PyInt_FromLong((long) DIVISION_SIDE_LEFT)); - PyDict_SetItemString(d,"DIVISION_SIDE_TOP", PyInt_FromLong((long) DIVISION_SIDE_TOP)); - PyDict_SetItemString(d,"DIVISION_SIDE_RIGHT", PyInt_FromLong((long) DIVISION_SIDE_RIGHT)); - PyDict_SetItemString(d,"DIVISION_SIDE_BOTTOM", PyInt_FromLong((long) DIVISION_SIDE_BOTTOM)); - - - initoglbasicc(); - initoglshapesc(); - initoglshapes2c(); - initoglcanvasc(); - - - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); - -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/modules/ogl/oglc.def b/utils/wxPython/modules/ogl/oglc.def deleted file mode 100644 index 78408b947c..0000000000 --- a/utils/wxPython/modules/ogl/oglc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initoglc diff --git a/utils/wxPython/modules/stubs/.cvsignore b/utils/wxPython/modules/stubs/.cvsignore deleted file mode 100644 index 61bf050b91..0000000000 --- a/utils/wxPython/modules/stubs/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -sedscript -Makefile.pre -Setup -config.c -Makefile -*.obj -*.pch -*.lib -*.exp - diff --git a/utils/wxPython/modules/stubs/README b/utils/wxPython/modules/stubs/README deleted file mode 100644 index f9448c9a03..0000000000 --- a/utils/wxPython/modules/stubs/README +++ /dev/null @@ -1,21 +0,0 @@ -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. diff --git a/utils/wxPython/modules/stubs/gtk/.cvsignore b/utils/wxPython/modules/stubs/gtk/.cvsignore deleted file mode 100644 index b25c15b81f..0000000000 --- a/utils/wxPython/modules/stubs/gtk/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/utils/wxPython/modules/stubs/msw/.cvsignore b/utils/wxPython/modules/stubs/msw/.cvsignore deleted file mode 100644 index b25c15b81f..0000000000 --- a/utils/wxPython/modules/stubs/msw/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/utils/wxPython/modules/utils/.cvsignore b/utils/wxPython/modules/utils/.cvsignore deleted file mode 100644 index 6a5a263c16..0000000000 --- a/utils/wxPython/modules/utils/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -build.local -utilsc.exp -utilsc.ilk -utilsc.pch -utilsc.pyd -wxp.pch diff --git a/utils/wxPython/modules/utils/build.cfg b/utils/wxPython/modules/utils/build.cfg deleted file mode 100644 index 7e1c3509f1..0000000000 --- a/utils/wxPython/modules/utils/build.cfg +++ /dev/null @@ -1,5 +0,0 @@ -# -*- python -*- - -MODULE = 'utilsc' -SWIGFILES = ['utils.i', ] - diff --git a/utils/wxPython/modules/utils/gtk/utils.cpp b/utils/wxPython/modules/utils/gtk/utils.cpp deleted file mode 100644 index af297e19b7..0000000000 --- a/utils/wxPython/modules/utils/gtk/utils.cpp +++ /dev/null @@ -1,1336 +0,0 @@ -/* - * FILE : gtk/utils.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 6) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initutilsc - -#define SWIG_name "utilsc" - -#include "helpers.h" -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern byte* byte_LIST_helper(PyObject* source); -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -#if defined(__WXMSW__) - static wxString wxPyEmptyStr(""); -#endif - - static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { - PyObject* ret = PyTuple_New(3); - if (ret) { - PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); - PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); - PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); - } - return ret; - } -#ifdef __cplusplus -extern "C" { -#endif -#define new_wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _result; - wxString * _arg0 = (wxString *) &wxPyEmptyStr; - wxString * _arg1 = (wxString *) &wxPyEmptyStr; - wxString * _arg2 = (wxString *) &wxPyEmptyStr; - wxString * _arg3 = (wxString *) &wxPyEmptyStr; - long _arg4 = (long ) 0; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _obj3 = 0; - char *_kwnames[] = { "appName","vendorName","localFilename","globalFilename","style", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOOl:new_wxConfig",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_arg4)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} - if (_obj3) -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define delete_wxConfig(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxConfig",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfig. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxConfig(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_DontCreateOnDemand(_swigobj) (_swigobj->DontCreateOnDemand()) -static PyObject *_wrap_wxConfig_DontCreateOnDemand(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_DontCreateOnDemand",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DontCreateOnDemand. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_DontCreateOnDemand(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_DeleteAll(_swigobj) (_swigobj->DeleteAll()) -static PyObject *_wrap_wxConfig_DeleteAll(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_DeleteAll",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteAll. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_DeleteAll(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_DeleteEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteEntry(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_DeleteEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - bool _arg2 = (bool ) TRUE; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - int tempbool2 = (int) TRUE; - char *_kwnames[] = { "self","key","bDeleteGroupIfEmpty", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxConfig_DeleteEntry",_kwnames,&_argo0,&_obj1,&tempbool2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - _arg2 = (bool ) tempbool2; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_DeleteEntry(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_DeleteGroup(_swigobj,_swigarg0) (_swigobj->DeleteGroup(_swigarg0)) -static PyObject *_wrap_wxConfig_DeleteGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_DeleteGroup",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_DeleteGroup(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_Exists(_swigobj,_swigarg0) (_swigobj->Exists(_swigarg0)) -static PyObject *_wrap_wxConfig_Exists(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strName", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_Exists",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Exists. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_Exists(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_Flush(_swigobj,_swigarg0) (_swigobj->Flush(_swigarg0)) -static PyObject *_wrap_wxConfig_Flush(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - bool _arg1 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool1 = (int) FALSE; - char *_kwnames[] = { "self","bCurrentOnly", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_Flush",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Flush. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_Flush(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_GetAppName(_swigobj) (_swigobj->GetAppName()) -static PyObject *_wrap_wxConfig_GetAppName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetAppName",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetAppName. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_GetAppName(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetFirstGroup(wxConfig *self) { - bool cont; - long index = 0; - wxString value; - - cont = self->GetFirstGroup(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetFirstGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetFirstGroup",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetFirstGroup(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetFirstEntry(wxConfig *self) { - bool cont; - long index = 0; - wxString value; - - cont = self->GetFirstEntry(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetFirstEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetFirstEntry",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetFirstEntry(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetNextGroup(wxConfig *self,long index) { - bool cont; - wxString value; - - cont = self->GetNextGroup(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetNextGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - long _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","index", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfig_GetNextGroup",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetNextGroup(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetNextEntry(wxConfig *self,long index) { - bool cont; - wxString value; - - cont = self->GetNextEntry(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetNextEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - long _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","index", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfig_GetNextEntry",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetNextEntry(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -#define wxConfig_GetNumberOfEntries(_swigobj,_swigarg0) (_swigobj->GetNumberOfEntries(_swigarg0)) -static PyObject *_wrap_wxConfig_GetNumberOfEntries(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxConfig * _arg0; - bool _arg1 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool1 = (int) FALSE; - char *_kwnames[] = { "self","bRecursive", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_GetNumberOfEntries",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfEntries. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxConfig_GetNumberOfEntries(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_GetNumberOfGroups(_swigobj,_swigarg0) (_swigobj->GetNumberOfGroups(_swigarg0)) -static PyObject *_wrap_wxConfig_GetNumberOfGroups(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxConfig * _arg0; - bool _arg1 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool1 = (int) FALSE; - char *_kwnames[] = { "self","bRecursive", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_GetNumberOfGroups",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfGroups. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxConfig_GetNumberOfGroups(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_GetPath(_swigobj) (_swigobj->GetPath()) -static PyObject *_wrap_wxConfig_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetPath",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetPath. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_GetPath(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxConfig_GetVendorName(_swigobj) (_swigobj->GetVendorName()) -static PyObject *_wrap_wxConfig_GetVendorName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetVendorName",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetVendorName. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_GetVendorName(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxConfig_HasEntry(_swigobj,_swigarg0) (_swigobj->HasEntry(_swigarg0)) -static PyObject *_wrap_wxConfig_HasEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strName", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_HasEntry",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_HasEntry(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_HasGroup(_swigobj,_swigarg0) (_swigobj->HasGroup(_swigarg0)) -static PyObject *_wrap_wxConfig_HasGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strName", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_HasGroup",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_HasGroup(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_IsExpandingEnvVars(_swigobj) (_swigobj->IsExpandingEnvVars()) -static PyObject *_wrap_wxConfig_IsExpandingEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_IsExpandingEnvVars",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsExpandingEnvVars. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_IsExpandingEnvVars(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_IsRecordingDefaults(_swigobj) (_swigobj->IsRecordingDefaults()) -static PyObject *_wrap_wxConfig_IsRecordingDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_IsRecordingDefaults",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsRecordingDefaults. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_IsRecordingDefaults(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_Read(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_Read(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - wxString * _arg1; - wxString * _arg2 = (wxString *) &wxPyEmptyStr; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","key","defaultVal", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxConfig_Read",_kwnames,&_argo0,&_obj1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Read. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_Read(_arg0,*_arg1,*_arg2)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete _result; -} - return _resultobj; -} - -#define wxConfig_ReadInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_ReadInt(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxConfig * _arg0; - wxString * _arg1; - long _arg2 = (long ) 0; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","defaultVal", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|l:wxConfig_ReadInt",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadInt. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxConfig_ReadInt(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_ReadFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_ReadFloat(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - double _result; - wxConfig * _arg0; - wxString * _arg1; - double _arg2 = (double ) 0.0; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","defaultVal", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|d:wxConfig_ReadFloat",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadFloat. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (double )wxConfig_ReadFloat(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("d",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_SetExpandEnvVars(_swigobj,_swigarg0) (_swigobj->SetExpandEnvVars(_swigarg0)) -static PyObject *_wrap_wxConfig_SetExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - bool _arg1 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool1 = (int) TRUE; - char *_kwnames[] = { "self","bDoIt", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_SetExpandEnvVars",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetExpandEnvVars. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_SetExpandEnvVars(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) -static PyObject *_wrap_wxConfig_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strPath", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_SetPath",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetPath. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_SetPath(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_SetRecordDefaults(_swigobj,_swigarg0) (_swigobj->SetRecordDefaults(_swigarg0)) -static PyObject *_wrap_wxConfig_SetRecordDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - bool _arg1 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool1 = (int) TRUE; - char *_kwnames[] = { "self","bDoIt", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_SetRecordDefaults",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetRecordDefaults. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_SetRecordDefaults(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_Write(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_Write(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - wxString * _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","key","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfig_Write",_kwnames,&_argo0,&_obj1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Write. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_Write(_arg0,*_arg1,*_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxConfig_WriteInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_WriteInt(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - long _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxConfig_WriteInt",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteInt. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_WriteInt(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_WriteFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_WriteFloat(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - double _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOd:wxConfig_WriteFloat",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteFloat. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_WriteFloat(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyMethodDef utilscMethods[] = { - { "wxConfig_WriteFloat", (PyCFunction) _wrap_wxConfig_WriteFloat, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_WriteInt", (PyCFunction) _wrap_wxConfig_WriteInt, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Write", (PyCFunction) _wrap_wxConfig_Write, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_SetRecordDefaults", (PyCFunction) _wrap_wxConfig_SetRecordDefaults, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_SetPath", (PyCFunction) _wrap_wxConfig_SetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_SetExpandEnvVars", (PyCFunction) _wrap_wxConfig_SetExpandEnvVars, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_ReadFloat", (PyCFunction) _wrap_wxConfig_ReadFloat, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_ReadInt", (PyCFunction) _wrap_wxConfig_ReadInt, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Read", (PyCFunction) _wrap_wxConfig_Read, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_IsRecordingDefaults", (PyCFunction) _wrap_wxConfig_IsRecordingDefaults, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_IsExpandingEnvVars", (PyCFunction) _wrap_wxConfig_IsExpandingEnvVars, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_HasGroup", (PyCFunction) _wrap_wxConfig_HasGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_HasEntry", (PyCFunction) _wrap_wxConfig_HasEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetVendorName", (PyCFunction) _wrap_wxConfig_GetVendorName, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetPath", (PyCFunction) _wrap_wxConfig_GetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNumberOfGroups", (PyCFunction) _wrap_wxConfig_GetNumberOfGroups, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNumberOfEntries", (PyCFunction) _wrap_wxConfig_GetNumberOfEntries, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNextEntry", (PyCFunction) _wrap_wxConfig_GetNextEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNextGroup", (PyCFunction) _wrap_wxConfig_GetNextGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetFirstEntry", (PyCFunction) _wrap_wxConfig_GetFirstEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetFirstGroup", (PyCFunction) _wrap_wxConfig_GetFirstGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetAppName", (PyCFunction) _wrap_wxConfig_GetAppName, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Flush", (PyCFunction) _wrap_wxConfig_Flush, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Exists", (PyCFunction) _wrap_wxConfig_Exists, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DeleteGroup", (PyCFunction) _wrap_wxConfig_DeleteGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DeleteEntry", (PyCFunction) _wrap_wxConfig_DeleteEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DeleteAll", (PyCFunction) _wrap_wxConfig_DeleteAll, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DontCreateOnDemand", (PyCFunction) _wrap_wxConfig_DontCreateOnDemand, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxConfig", (PyCFunction) _wrap_delete_wxConfig, METH_VARARGS | METH_KEYWORDS }, - { "new_wxConfig", (PyCFunction) _wrap_new_wxConfig, METH_VARARGS | METH_KEYWORDS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_signed_long","_long",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxConfig","_class_wxConfig",0}, - { "_unsigned_long","_long",0}, - { "_signed_int","_int",0}, - { "_unsigned_short","_short",0}, - { "_signed_short","_short",0}, - { "_unsigned_int","_int",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxConfig","_wxConfig",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initutilsc() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("utilsc", utilscMethods); - d = PyModule_GetDict(m); - - - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); - -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/modules/utils/gtk/utils.py b/utils/wxPython/modules/utils/gtk/utils.py deleted file mode 100644 index 86f4d662d1..0000000000 --- a/utils/wxPython/modules/utils/gtk/utils.py +++ /dev/null @@ -1,111 +0,0 @@ -# This file was created automatically by SWIG. -import utilsc -class wxConfigPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxConfig(self) - def DontCreateOnDemand(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DontCreateOnDemand,(self,) + _args, _kwargs) - return val - def DeleteAll(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DeleteAll,(self,) + _args, _kwargs) - return val - def DeleteEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DeleteEntry,(self,) + _args, _kwargs) - return val - def DeleteGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DeleteGroup,(self,) + _args, _kwargs) - return val - def Exists(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Exists,(self,) + _args, _kwargs) - return val - def Flush(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Flush,(self,) + _args, _kwargs) - return val - def GetAppName(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetAppName,(self,) + _args, _kwargs) - return val - def GetFirstGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetFirstGroup,(self,) + _args, _kwargs) - return val - def GetFirstEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetFirstEntry,(self,) + _args, _kwargs) - return val - def GetNextGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNextGroup,(self,) + _args, _kwargs) - return val - def GetNextEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNextEntry,(self,) + _args, _kwargs) - return val - def GetNumberOfEntries(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNumberOfEntries,(self,) + _args, _kwargs) - return val - def GetNumberOfGroups(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNumberOfGroups,(self,) + _args, _kwargs) - return val - def GetPath(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetPath,(self,) + _args, _kwargs) - return val - def GetVendorName(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetVendorName,(self,) + _args, _kwargs) - return val - def HasEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_HasEntry,(self,) + _args, _kwargs) - return val - def HasGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_HasGroup,(self,) + _args, _kwargs) - return val - def IsExpandingEnvVars(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_IsExpandingEnvVars,(self,) + _args, _kwargs) - return val - def IsRecordingDefaults(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_IsRecordingDefaults,(self,) + _args, _kwargs) - return val - def Read(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Read,(self,) + _args, _kwargs) - return val - def ReadInt(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_ReadInt,(self,) + _args, _kwargs) - return val - def ReadFloat(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_ReadFloat,(self,) + _args, _kwargs) - return val - def SetExpandEnvVars(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_SetExpandEnvVars,(self,) + _args, _kwargs) - return val - def SetPath(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_SetPath,(self,) + _args, _kwargs) - return val - def SetRecordDefaults(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_SetRecordDefaults,(self,) + _args, _kwargs) - return val - def Write(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Write,(self,) + _args, _kwargs) - return val - def WriteInt(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_WriteInt,(self,) + _args, _kwargs) - return val - def WriteFloat(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_WriteFloat,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxConfig(wxConfigPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(utilsc.new_wxConfig,_args,_kwargs) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/modules/utils/msw/utils.cpp b/utils/wxPython/modules/utils/msw/utils.cpp deleted file mode 100644 index e593772604..0000000000 --- a/utils/wxPython/modules/utils/msw/utils.cpp +++ /dev/null @@ -1,1336 +0,0 @@ -/* - * FILE : msw/utils.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 802) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initutilsc - -#define SWIG_name "utilsc" - -#include "helpers.h" -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern byte* byte_LIST_helper(PyObject* source); -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -#if defined(__WXMSW__) - static wxString wxPyEmptyStr(""); -#endif - - static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { - PyObject* ret = PyTuple_New(3); - if (ret) { - PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); - PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); - PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); - } - return ret; - } -#ifdef __cplusplus -extern "C" { -#endif -#define new_wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _result; - wxString * _arg0 = (wxString *) &wxPyEmptyStr; - wxString * _arg1 = (wxString *) &wxPyEmptyStr; - wxString * _arg2 = (wxString *) &wxPyEmptyStr; - wxString * _arg3 = (wxString *) &wxPyEmptyStr; - long _arg4 = (long ) 0; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _obj3 = 0; - char *_kwnames[] = { "appName","vendorName","localFilename","globalFilename","style", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOOl:new_wxConfig",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_arg4)) - return NULL; - if (_obj0) -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} - if (_obj3) -{ - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define delete_wxConfig(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxConfig",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfig. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxConfig(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_DontCreateOnDemand(_swigobj) (_swigobj->DontCreateOnDemand()) -static PyObject *_wrap_wxConfig_DontCreateOnDemand(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_DontCreateOnDemand",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DontCreateOnDemand. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_DontCreateOnDemand(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_DeleteAll(_swigobj) (_swigobj->DeleteAll()) -static PyObject *_wrap_wxConfig_DeleteAll(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_DeleteAll",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteAll. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_DeleteAll(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_DeleteEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteEntry(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_DeleteEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - bool _arg2 = (bool ) TRUE; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - int tempbool2 = (int) TRUE; - char *_kwnames[] = { "self","key","bDeleteGroupIfEmpty", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxConfig_DeleteEntry",_kwnames,&_argo0,&_obj1,&tempbool2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - _arg2 = (bool ) tempbool2; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_DeleteEntry(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_DeleteGroup(_swigobj,_swigarg0) (_swigobj->DeleteGroup(_swigarg0)) -static PyObject *_wrap_wxConfig_DeleteGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_DeleteGroup",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_DeleteGroup(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_Exists(_swigobj,_swigarg0) (_swigobj->Exists(_swigarg0)) -static PyObject *_wrap_wxConfig_Exists(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strName", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_Exists",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Exists. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_Exists(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_Flush(_swigobj,_swigarg0) (_swigobj->Flush(_swigarg0)) -static PyObject *_wrap_wxConfig_Flush(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - bool _arg1 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool1 = (int) FALSE; - char *_kwnames[] = { "self","bCurrentOnly", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_Flush",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Flush. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_Flush(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_GetAppName(_swigobj) (_swigobj->GetAppName()) -static PyObject *_wrap_wxConfig_GetAppName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetAppName",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetAppName. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_GetAppName(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetFirstGroup(wxConfig *self) { - bool cont; - long index = 0; - wxString value; - - cont = self->GetFirstGroup(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetFirstGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetFirstGroup",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetFirstGroup(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetFirstEntry(wxConfig *self) { - bool cont; - long index = 0; - wxString value; - - cont = self->GetFirstEntry(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetFirstEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetFirstEntry",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetFirstEntry(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetNextGroup(wxConfig *self,long index) { - bool cont; - wxString value; - - cont = self->GetNextGroup(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetNextGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - long _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","index", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfig_GetNextGroup",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetNextGroup(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxConfig_GetNextEntry(wxConfig *self,long index) { - bool cont; - wxString value; - - cont = self->GetNextEntry(value, index); - return __EnumerationHelper(cont, value, index); - } -static PyObject *_wrap_wxConfig_GetNextEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxConfig * _arg0; - long _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","index", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfig_GetNextEntry",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxConfig_GetNextEntry(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -#define wxConfig_GetNumberOfEntries(_swigobj,_swigarg0) (_swigobj->GetNumberOfEntries(_swigarg0)) -static PyObject *_wrap_wxConfig_GetNumberOfEntries(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxConfig * _arg0; - bool _arg1 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool1 = (int) FALSE; - char *_kwnames[] = { "self","bRecursive", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_GetNumberOfEntries",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfEntries. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxConfig_GetNumberOfEntries(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_GetNumberOfGroups(_swigobj,_swigarg0) (_swigobj->GetNumberOfGroups(_swigarg0)) -static PyObject *_wrap_wxConfig_GetNumberOfGroups(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxConfig * _arg0; - bool _arg1 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool1 = (int) FALSE; - char *_kwnames[] = { "self","bRecursive", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_GetNumberOfGroups",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfGroups. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxConfig_GetNumberOfGroups(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_GetPath(_swigobj) (_swigobj->GetPath()) -static PyObject *_wrap_wxConfig_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetPath",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetPath. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_GetPath(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxConfig_GetVendorName(_swigobj) (_swigobj->GetVendorName()) -static PyObject *_wrap_wxConfig_GetVendorName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_GetVendorName",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetVendorName. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_GetVendorName(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxConfig_HasEntry(_swigobj,_swigarg0) (_swigobj->HasEntry(_swigarg0)) -static PyObject *_wrap_wxConfig_HasEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strName", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_HasEntry",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasEntry. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_HasEntry(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_HasGroup(_swigobj,_swigarg0) (_swigobj->HasGroup(_swigarg0)) -static PyObject *_wrap_wxConfig_HasGroup(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strName", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_HasGroup",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasGroup. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_HasGroup(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_IsExpandingEnvVars(_swigobj) (_swigobj->IsExpandingEnvVars()) -static PyObject *_wrap_wxConfig_IsExpandingEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_IsExpandingEnvVars",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsExpandingEnvVars. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_IsExpandingEnvVars(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_IsRecordingDefaults(_swigobj) (_swigobj->IsRecordingDefaults()) -static PyObject *_wrap_wxConfig_IsRecordingDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfig_IsRecordingDefaults",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsRecordingDefaults. Expected _wxConfig_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_IsRecordingDefaults(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxConfig_Read(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_Read(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxConfig * _arg0; - wxString * _arg1; - wxString * _arg2 = (wxString *) &wxPyEmptyStr; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","key","defaultVal", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxConfig_Read",_kwnames,&_argo0,&_obj1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Read. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxConfig_Read(_arg0,*_arg1,*_arg2)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete _result; -} - return _resultobj; -} - -#define wxConfig_ReadInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_ReadInt(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxConfig * _arg0; - wxString * _arg1; - long _arg2 = (long ) 0; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","defaultVal", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|l:wxConfig_ReadInt",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadInt. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxConfig_ReadInt(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_ReadFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_ReadFloat(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - double _result; - wxConfig * _arg0; - wxString * _arg1; - double _arg2 = (double ) 0.0; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","defaultVal", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|d:wxConfig_ReadFloat",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadFloat. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (double )wxConfig_ReadFloat(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("d",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_SetExpandEnvVars(_swigobj,_swigarg0) (_swigobj->SetExpandEnvVars(_swigarg0)) -static PyObject *_wrap_wxConfig_SetExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - bool _arg1 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool1 = (int) TRUE; - char *_kwnames[] = { "self","bDoIt", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_SetExpandEnvVars",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetExpandEnvVars. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_SetExpandEnvVars(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) -static PyObject *_wrap_wxConfig_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","strPath", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfig_SetPath",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetPath. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_SetPath(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_SetRecordDefaults(_swigobj,_swigarg0) (_swigobj->SetRecordDefaults(_swigarg0)) -static PyObject *_wrap_wxConfig_SetRecordDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxConfig * _arg0; - bool _arg1 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool1 = (int) TRUE; - char *_kwnames[] = { "self","bDoIt", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfig_SetRecordDefaults",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetRecordDefaults. Expected _wxConfig_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxConfig_SetRecordDefaults(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_Write(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_Write(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - wxString * _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","key","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfig_Write",_kwnames,&_argo0,&_obj1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Write. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_Write(_arg0,*_arg1,*_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxConfig_WriteInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_WriteInt(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - long _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxConfig_WriteInt",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteInt. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_WriteInt(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_WriteFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxConfig_WriteFloat(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxConfig * _arg0; - wxString * _arg1; - double _arg2; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","key","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOd:wxConfig_WriteFloat",_kwnames,&_argo0,&_obj1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteFloat. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxConfig_WriteFloat(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyMethodDef utilscMethods[] = { - { "wxConfig_WriteFloat", (PyCFunction) _wrap_wxConfig_WriteFloat, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_WriteInt", (PyCFunction) _wrap_wxConfig_WriteInt, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Write", (PyCFunction) _wrap_wxConfig_Write, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_SetRecordDefaults", (PyCFunction) _wrap_wxConfig_SetRecordDefaults, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_SetPath", (PyCFunction) _wrap_wxConfig_SetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_SetExpandEnvVars", (PyCFunction) _wrap_wxConfig_SetExpandEnvVars, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_ReadFloat", (PyCFunction) _wrap_wxConfig_ReadFloat, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_ReadInt", (PyCFunction) _wrap_wxConfig_ReadInt, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Read", (PyCFunction) _wrap_wxConfig_Read, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_IsRecordingDefaults", (PyCFunction) _wrap_wxConfig_IsRecordingDefaults, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_IsExpandingEnvVars", (PyCFunction) _wrap_wxConfig_IsExpandingEnvVars, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_HasGroup", (PyCFunction) _wrap_wxConfig_HasGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_HasEntry", (PyCFunction) _wrap_wxConfig_HasEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetVendorName", (PyCFunction) _wrap_wxConfig_GetVendorName, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetPath", (PyCFunction) _wrap_wxConfig_GetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNumberOfGroups", (PyCFunction) _wrap_wxConfig_GetNumberOfGroups, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNumberOfEntries", (PyCFunction) _wrap_wxConfig_GetNumberOfEntries, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNextEntry", (PyCFunction) _wrap_wxConfig_GetNextEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetNextGroup", (PyCFunction) _wrap_wxConfig_GetNextGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetFirstEntry", (PyCFunction) _wrap_wxConfig_GetFirstEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetFirstGroup", (PyCFunction) _wrap_wxConfig_GetFirstGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_GetAppName", (PyCFunction) _wrap_wxConfig_GetAppName, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Flush", (PyCFunction) _wrap_wxConfig_Flush, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_Exists", (PyCFunction) _wrap_wxConfig_Exists, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DeleteGroup", (PyCFunction) _wrap_wxConfig_DeleteGroup, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DeleteEntry", (PyCFunction) _wrap_wxConfig_DeleteEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DeleteAll", (PyCFunction) _wrap_wxConfig_DeleteAll, METH_VARARGS | METH_KEYWORDS }, - { "wxConfig_DontCreateOnDemand", (PyCFunction) _wrap_wxConfig_DontCreateOnDemand, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxConfig", (PyCFunction) _wrap_delete_wxConfig, METH_VARARGS | METH_KEYWORDS }, - { "new_wxConfig", (PyCFunction) _wrap_new_wxConfig, METH_VARARGS | METH_KEYWORDS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_signed_long","_long",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxConfig","_class_wxConfig",0}, - { "_unsigned_long","_long",0}, - { "_signed_int","_int",0}, - { "_unsigned_short","_short",0}, - { "_signed_short","_short",0}, - { "_unsigned_int","_int",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxConfig","_wxConfig",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initutilsc() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("utilsc", utilscMethods); - d = PyModule_GetDict(m); - - - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); - -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/modules/utils/msw/utils.py b/utils/wxPython/modules/utils/msw/utils.py deleted file mode 100644 index 86f4d662d1..0000000000 --- a/utils/wxPython/modules/utils/msw/utils.py +++ /dev/null @@ -1,111 +0,0 @@ -# This file was created automatically by SWIG. -import utilsc -class wxConfigPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxConfig(self) - def DontCreateOnDemand(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DontCreateOnDemand,(self,) + _args, _kwargs) - return val - def DeleteAll(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DeleteAll,(self,) + _args, _kwargs) - return val - def DeleteEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DeleteEntry,(self,) + _args, _kwargs) - return val - def DeleteGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_DeleteGroup,(self,) + _args, _kwargs) - return val - def Exists(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Exists,(self,) + _args, _kwargs) - return val - def Flush(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Flush,(self,) + _args, _kwargs) - return val - def GetAppName(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetAppName,(self,) + _args, _kwargs) - return val - def GetFirstGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetFirstGroup,(self,) + _args, _kwargs) - return val - def GetFirstEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetFirstEntry,(self,) + _args, _kwargs) - return val - def GetNextGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNextGroup,(self,) + _args, _kwargs) - return val - def GetNextEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNextEntry,(self,) + _args, _kwargs) - return val - def GetNumberOfEntries(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNumberOfEntries,(self,) + _args, _kwargs) - return val - def GetNumberOfGroups(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetNumberOfGroups,(self,) + _args, _kwargs) - return val - def GetPath(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetPath,(self,) + _args, _kwargs) - return val - def GetVendorName(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_GetVendorName,(self,) + _args, _kwargs) - return val - def HasEntry(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_HasEntry,(self,) + _args, _kwargs) - return val - def HasGroup(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_HasGroup,(self,) + _args, _kwargs) - return val - def IsExpandingEnvVars(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_IsExpandingEnvVars,(self,) + _args, _kwargs) - return val - def IsRecordingDefaults(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_IsRecordingDefaults,(self,) + _args, _kwargs) - return val - def Read(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Read,(self,) + _args, _kwargs) - return val - def ReadInt(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_ReadInt,(self,) + _args, _kwargs) - return val - def ReadFloat(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_ReadFloat,(self,) + _args, _kwargs) - return val - def SetExpandEnvVars(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_SetExpandEnvVars,(self,) + _args, _kwargs) - return val - def SetPath(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_SetPath,(self,) + _args, _kwargs) - return val - def SetRecordDefaults(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_SetRecordDefaults,(self,) + _args, _kwargs) - return val - def Write(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_Write,(self,) + _args, _kwargs) - return val - def WriteInt(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_WriteInt,(self,) + _args, _kwargs) - return val - def WriteFloat(self, *_args, **_kwargs): - val = apply(utilsc.wxConfig_WriteFloat,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxConfig(wxConfigPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(utilsc.new_wxConfig,_args,_kwargs) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - diff --git a/utils/wxPython/modules/utils/utils.i b/utils/wxPython/modules/utils/utils.i deleted file mode 100644 index b97de6e256..0000000000 --- a/utils/wxPython/modules/utils/utils.i +++ /dev/null @@ -1,139 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// 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 utils - -%{ -#include "helpers.h" -#include -%} - -//--------------------------------------------------------------------------- - -%include typemaps.i -%include my_typemaps.i - - -%{ -#if defined(__WXMSW__) - static wxString wxPyEmptyStr(""); -#endif -%} - - -%{ - static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { - PyObject* ret = PyTuple_New(3); - if (ret) { - PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); - PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); - PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); - } - return ret; - } -%} - -//--------------------------------------------------------------------------- - -class wxConfig { -public: - wxConfig(const wxString& appName = wxPyEmptyStr, - const wxString& vendorName = wxPyEmptyStr, - const wxString& localFilename = wxPyEmptyStr, - const wxString& globalFilename = wxPyEmptyStr, - long style = 0); - ~wxConfig(); - - - void DontCreateOnDemand(); - bool DeleteAll(); // This is supposed to have been fixed... - bool DeleteEntry(const wxString& key, bool bDeleteGroupIfEmpty = TRUE); - bool DeleteGroup(const wxString& key); - bool Exists(wxString& strName); - bool Flush(bool bCurrentOnly = FALSE); - wxString GetAppName(); - - - // Each of these enumeration methods return a 3-tuple consisting of - // the continue flag, the value string, and the index for the next call. - %addmethods { - PyObject* GetFirstGroup() { - bool cont; - long index = 0; - wxString value; - - cont = self->GetFirstGroup(value, index); - return __EnumerationHelper(cont, value, index); - } - - PyObject* GetFirstEntry() { - bool cont; - long index = 0; - wxString value; - - cont = self->GetFirstEntry(value, index); - return __EnumerationHelper(cont, value, index); - } - - PyObject* GetNextGroup(long index) { - bool cont; - wxString value; - - cont = self->GetNextGroup(value, index); - return __EnumerationHelper(cont, value, index); - } - - PyObject* GetNextEntry(long index) { - bool cont; - wxString value; - - cont = self->GetNextEntry(value, index); - return __EnumerationHelper(cont, value, index); - } - } - - - int GetNumberOfEntries(bool bRecursive = FALSE); - int GetNumberOfGroups(bool bRecursive = FALSE); - wxString GetPath(); - wxString GetVendorName(); - bool HasEntry(wxString& strName); - bool HasGroup(const wxString& strName); - bool IsExpandingEnvVars(); - bool IsRecordingDefaults(); - - wxString Read(const wxString& key, const wxString& defaultVal = wxPyEmptyStr); - %name(ReadInt)long Read(const wxString& key, long defaultVal = 0); - %name(ReadFloat)double Read(const wxString& key, double defaultVal = 0.0); - - void SetExpandEnvVars (bool bDoIt = TRUE); - void SetPath(const wxString& strPath); - void SetRecordDefaults(bool bDoIt = TRUE); - - bool Write(const wxString& key, const wxString& value); - %name(WriteInt)bool Write(const wxString& key, long value); - %name(WriteFloat)bool Write(const wxString& key, double value); - -}; - - -//--------------------------------------------------------------------------- - -%init %{ - - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); - -%} - -//--------------------------------------------------------------------------- diff --git a/utils/wxPython/modules/utils/utilsc.def b/utils/wxPython/modules/utils/utilsc.def deleted file mode 100644 index ddb56a1c38..0000000000 --- a/utils/wxPython/modules/utils/utilsc.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - initutilsc diff --git a/utils/wxPython/src/__version__.py b/utils/wxPython/src/__version__.py deleted file mode 100644 index 6006150309..0000000000 --- a/utils/wxPython/src/__version__.py +++ /dev/null @@ -1 +0,0 @@ -ver = '2.1.14' diff --git a/utils/wxPython/src/build.cfg b/utils/wxPython/src/build.cfg deleted file mode 100644 index 27710ddeb3..0000000000 --- a/utils/wxPython/src/build.cfg +++ /dev/null @@ -1,123 +0,0 @@ -# -*- python -*- -import sys - -MODULE = 'wxc' -SWIGFILES = ['wx.i', 'windows.i', 'windows2.i', 'windows3.i', 'events.i', - 'misc.i', 'misc2.i', 'gdi.i', 'mdi.i', 'controls.i', - 'controls2.i', 'cmndlgs.i', 'stattool.i', 'frames.i', - 'image.i', 'printfw.i', 'sizers.i', 'clip_dnd.i' - ] - -PYFILES = ['__init__.py', '__version__.py'] - -SWIGDEPS = '_defs.i my_typemaps.i' -OTHERDEPS = 'helpers.h' - -if sys.platform == 'win32': - RESFILE = 1 - SOURCES = ['helpers.cpp', 'libpy.c'] - LIBS = '$(PYTHONLIB)' - OTHERRULES = """ -dist: - cd ..\.. - wxPython\distrib\zipit.bat $(VERSION) - -dbg: - cd ..\distrib - makedbg.bat $(VERSION) - -dev: - cd ..\distrib - makedev.bat $(VERSION) - -__version__.py: ../distrib/build.py build.cfg - echo ver = '$(VERSION)' > __version__.py - -""" - -else: - DEFAULTRULE = 'default: $(GENCODEDIR) lib$(HELPERLIB)$(SO) $(TARGET)' - OTHERINSTALLTARGETS = 'installLibDemo installHelpers ' - OTHERUNINSTALLTARGETS = 'uninstallLibDemo uninstallHelpers ' - - - OTHERRULES = """ -lib$(HELPERLIB)$(SO) : helpers.o libpy.o - $(LDSHARED) helpers.o libpy.o $(LFLAGS) -o $@ - - -installHelpers: $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) - - -$(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) : lib$(HELPERLIB)$(SO) - cp $< $@ - @echo --------------------------------------------------------- - @echo You may have to run ldconfig, or set an environment - @echo variable in order for $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) - @echo to be found at runtime. See your man pages for ld.so or - @echo equivalent. - @echo --------------------------------------------------------- - - -installLibDemo: - @if [ "$(TARGETDIR)" != ".." -a "$(TARGETDIR)" != "$(WXWIN)/utils/wxPython" ]; then \\ - mkdir $(TARGETDIR)/lib; \\ - mkdir $(TARGETDIR)/lib/sizers; \\ - mkdir $(TARGETDIR)/lib/editor; \\ - mkdir $(TARGETDIR)/demo; \\ - mkdir $(TARGETDIR)/demo/bitmaps; \\ - mkdir $(TARGETDIR)/demo/data; \\ - cp ../lib/*.py $(TARGETDIR)/lib; \\ - cp ../lib/sizers/*.py $(TARGETDIR)/lib/sizers; \\ - cp ../lib/editor/*.py $(TARGETDIR)/lib/editor; \\ - cp ../demo/*.py $(TARGETDIR)/demo; \\ - cp ../lib/*.txt $(TARGETDIR)/lib; \\ - cp ../lib/sizers/*.txt $(TARGETDIR)/lib/sizers; \\ - cp ../lib/editor/*.txt $(TARGETDIR)/lib/editor; \\ - cp ../demo/*.txt $(TARGETDIR)/demo; \\ - cp ../demo/bitmaps/* $(TARGETDIR)/demo/bitmaps; \\ - cp ../demo/data/* $(TARGETDIR)/demo/data; \\ - $(EXECPREFIX)/bin/python $(PYLIB)/compileall.py $(TARGETDIR); \\ - $(EXECPREFIX)/bin/python -O $(PYLIB)/compileall.py $(TARGETDIR); \\ - fi - - - -uninstallLibDemo: - @if [ "$(TARGETDIR)" != ".." -a "$(TARGETDIR)" != "$(WXWIN)/utils/wxPython" ]; then \\ - rm -rf $(TARGETDIR)/lib; \\ - rm -rf $(TARGETDIR)/demo; \\ - fi - - -uninstallHelpers: - rm -f $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) - - -__version__.py: ../distrib/build.py build.cfg - echo ver = \\'$(VERSION)\\' > __version__.py - - -#---------------------------------------------------------------------- - -dist: tgz rpm - -tgz: - cd ../..; wxPython/distrib/maketgz $(VERSION) - -rpm: - cd ../distrib; ./makerpm $(VERSION) - - - -""" - - - - - -OTHERRULES = OTHERRULES + """ - -$(GENCODEDIR)/wx.py : _extras.py - -""" diff --git a/utils/wxPython/src/gtk/dummy b/utils/wxPython/src/gtk/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/gtk/misc2.cpp b/utils/wxPython/src/gtk/misc2.cpp deleted file mode 100644 index db3fabcf7b..0000000000 --- a/utils/wxPython/src/gtk/misc2.cpp +++ /dev/null @@ -1,2497 +0,0 @@ -/* - * FILE : gtk/misc2.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initmisc2c - -#define SWIG_name "misc2c" - -#include "helpers.h" -#include -#include -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - -static char* wxStringErrorMsg = "string type is required for parameter"; - - - wxColour wxSystemSettings_GetSystemColour(int index) { - return wxSystemSettings::GetSystemColour(index); - } - - wxFont wxSystemSettings_GetSystemFont(int index) { - return wxSystemSettings::GetSystemFont(index); - } - - int wxSystemSettings_GetSystemMetric(int index) { - return wxSystemSettings::GetSystemMetric(index); - } - - void wxToolTip_Enable(bool flag) { - wxToolTip::Enable(flag); - } - - void wxToolTip_SetDelay(long milliseconds) { - wxToolTip::SetDelay(milliseconds); - } - - int wxCaret_GetBlinkTime() { - return wxCaret::GetBlinkTime(); - } - - void wxCaret_SetBlinkTime(int milliseconds) { - wxCaret::SetBlinkTime(milliseconds); - } - -class wxPyFontEnumerator : public wxFontEnumerator { -public: - wxPyFontEnumerator() {} - ~wxPyFontEnumerator() {} - - DEC_PYCALLBACK_BOOL_STRING(OnFacename); - DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding); - - PYPRIVATE; -}; - -IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFacename); -IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding); - -#ifdef __cplusplus -extern "C" { -#endif -static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - char * _arg0; - char * _arg1 = (char *) NULL; - char * _arg2 = (char *) NULL; - char * _arg3 = (char *) NULL; - char * _arg4 = (char *) "*.*"; - int _arg5 = (int ) 0; - wxWindow * _arg6 = (wxWindow *) NULL; - int _arg7 = (int ) -1; - int _arg8 = (int ) -1; - PyObject * _argo6 = 0; - char *_kwnames[] = { "message","default_path","default_filename","default_extension","wildcard","flags","parent","x","y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|ssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) - return NULL; - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxFileSelector. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1 = (wxString *) &wxPyEmptyStr; - wxString * _arg2 = (wxString *) &wxPyEmptyStr; - wxWindow * _arg3 = (wxWindow *) NULL; - int _arg4 = (int ) -1; - int _arg5 = (int ) -1; - bool _arg6 = (bool ) TRUE; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _argo3 = 0; - int tempbool6 = (int) TRUE; - char *_kwnames[] = { "message","caption","default_value","parent","x","y","centre", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOiii:wxGetTextFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4,&_arg5,&tempbool6)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetTextFromUser. Expected _wxWindow_p."); - return NULL; - } - } - _arg6 = (bool ) tempbool6; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = (wxWindow *) NULL; - int _arg5 = (int ) -1; - int _arg6 = (int ) -1; - bool _arg7 = (bool ) TRUE; - int _arg8 = (int ) 150; - int _arg9 = (int ) 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - PyObject * _argo4 = 0; - int tempbool7 = (int) TRUE; - char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoice",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoice. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - if (_obj3) { - _arg2 = PyList_Size(_obj3); - } - else { - _arg2 = 0; - } -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = (wxWindow *) NULL; - int _arg5 = (int ) -1; - int _arg6 = (int ) -1; - bool _arg7 = (bool ) TRUE; - int _arg8 = (int ) 150; - int _arg9 = (int ) 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - PyObject * _argo4 = 0; - int tempbool7 = (int) TRUE; - char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoiceIndex",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoiceIndex. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - if (_obj3) { - _arg2 = PyList_Size(_obj3); - } - else { - _arg2 = 0; - } -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} - return _resultobj; -} - -static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1 = (wxString *) &wxPyEmptyStr; - int _arg2 = (int ) wxOK|wxCENTRE; - wxWindow * _arg3 = (wxWindow *) NULL; - int _arg4 = (int ) -1; - int _arg5 = (int ) -1; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _argo3 = 0; - char *_kwnames[] = { "message","caption","style","parent","x","y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOii:wxMessageBox",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4,&_arg5)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMessageBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - wxString * _arg1; - wxString * _arg2; - long _arg3; - long _arg4 = (long ) 0; - long _arg5 = (long ) 100; - wxWindow * _arg6 = (wxWindow *) NULL; - wxPoint * _arg7 = (wxPoint *) &wxPyDefaultPosition; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _argo6 = 0; - wxPoint temp; - PyObject * _obj7 = 0; - char *_kwnames[] = { "message","prompt","caption","value","min","max","parent","pos", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOl|llOO:wxGetNumberFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argo6,&_obj7)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p."); - return NULL; - } - } - if (_obj7) -{ - _arg7 = &temp; - if (! wxPoint_helper(_obj7, &_arg7)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxColourDisplay",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxColourDisplay(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplayDepth",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxDisplayDepth(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCursor * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "cursor", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursor. Expected _wxCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSetCursor(*_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "label","parent", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByLabel. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "name","parent", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByName. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; - PyObject * _argo0 = 0; - char *_kwnames[] = { "cursor", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxBeginBusyCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBeginBusyCursor. Expected _wxCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxBeginBusyCursor(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetActiveWindow",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxGetActiveWindow(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - int _arg1; - char *_kwnames[] = { "name","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"si:wxResourceAddIdentifier",_kwnames,&_arg0,&_arg1)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxResourceClear",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxResourceClear(); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBitmap * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateBitmap",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxIcon * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateIcon",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxIcon (wxResourceCreateIcon(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxMenuBar * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateMenuBar",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char * _arg0; - char *_kwnames[] = { "name", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceGetIdentifier",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxResourceGetIdentifier(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "resource","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseData",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseData. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceParseData(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "filename","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseFile",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseFile. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceParseFile(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "resource","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseString",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseString. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceParseString(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemColour",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxColour (wxSystemSettings_GetSystemColour(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemFont",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxFont (wxSystemSettings_GetSystemFont(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemMetric",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSystemSettings_GetSystemMetric(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _arg0; - int tempbool0; - char *_kwnames[] = { "flag", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxToolTip_Enable",_kwnames,&tempbool0)) - return NULL; - _arg0 = (bool ) tempbool0; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxToolTip_Enable(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _arg0; - char *_kwnames[] = { "milliseconds", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxToolTip_SetDelay",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxToolTip_SetDelay(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxCaret_GetBlinkTime",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxCaret_GetBlinkTime(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxCaret_SetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _arg0; - char *_kwnames[] = { "milliseconds", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxCaret_SetBlinkTime",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_SetBlinkTime(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxPostEvent(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxEvtHandler * _arg0; - wxEvent * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "dest","event", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPostEvent",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPostEvent. Expected _wxEvtHandler_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostEvent. Expected _wxEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPostEvent(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWakeUpIdle",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxWakeUpIdle(); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0)) -static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxToolTip * _result; - wxString * _arg0; - PyObject * _obj0 = 0; - char *_kwnames[] = { "tip", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxToolTip",_kwnames,&_obj0)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxToolTip *)new_wxToolTip(*_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolTip_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define wxToolTip_SetTip(_swigobj,_swigarg0) (_swigobj->SetTip(_swigarg0)) -static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxToolTip * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","tip", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolTip_SetTip",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_SetTip. Expected _wxToolTip_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxToolTip_SetTip(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxToolTip_GetTip(_swigobj) (_swigobj->GetTip()) -static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxToolTip * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetTip",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetTip. Expected _wxToolTip_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxToolTip_GetTip(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxToolTip_GetWindow(_swigobj) (_swigobj->GetWindow()) -static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxToolTip * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetWindow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetWindow. Expected _wxToolTip_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxToolTip_GetWindow(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define new_wxCaret(_swigarg0,_swigarg1) (new wxCaret(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _result; - wxWindow * _arg0; - wxSize * _arg1; - PyObject * _argo0 = 0; - wxSize temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "window","size", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxCaret",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCaret. Expected _wxWindow_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxSize_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxCaret_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxCaret(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxCaret",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCaret. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxCaret(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_IsOk(_swigobj) (_swigobj->IsOk()) -static PyObject *_wrap_wxCaret_IsOk(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsOk",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsOk. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCaret_IsOk(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCaret_IsVisible(_swigobj) (_swigobj->IsVisible()) -static PyObject *_wrap_wxCaret_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsVisible",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsVisible. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCaret_IsVisible(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCaret_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPositionTuple",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPositionTuple. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxCaret_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxCaret_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPoint * _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPosition",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPosition. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxCaret_GetPosition(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxCaret_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_GetSizeTuple(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSizeTuple",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSizeTuple. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxCaret_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxCaret_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSize * _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSize. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxCaret_GetSize(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxCaret_GetWindow(_swigobj) (_swigobj->GetWindow()) -static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetWindow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetWindow. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxCaret_GetWindow(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxCaret_MoveXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->Move(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_MoveXY(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_MoveXY",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_MoveXY. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_MoveXY(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_Move(_swigobj,_swigarg0) (_swigobj->Move(_swigarg0)) -static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - wxPoint * _arg1; - PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","pt", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_Move",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Move. Expected _wxCaret_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxPoint_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_Move(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_SetSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_SetSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_SetSizeWH",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSizeWH. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_SetSizeWH(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0)) -static PyObject *_wrap_wxCaret_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - wxSize * _arg1; - PyObject * _argo0 = 0; - wxSize temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","size", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_SetSize",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSize. Expected _wxCaret_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxSize_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_SetSize(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int _arg1 = (int ) TRUE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","show", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCaret_Show",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Show. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_Show(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_Hide(_swigobj) (_swigobj->Hide()) -static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_Hide",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Hide. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_Hide(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxFontEnumerator() (new wxPyFontEnumerator()) -static PyObject *_wrap_new_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyFontEnumerator * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFontEnumerator",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFontEnumerator_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxPyFontEnumerator(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyFontEnumerator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFontEnumerator",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontEnumerator. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxPyFontEnumerator(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontEnumerator__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) -static PyObject *_wrap_wxFontEnumerator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyFontEnumerator * _arg0; - PyObject * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontEnumerator__setSelf",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator__setSelf. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - _arg1 = _obj1; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFontEnumerator__setSelf(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontEnumerator_EnumerateFacenames(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnumerateFacenames(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontEnumerator_EnumerateFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxPyFontEnumerator * _arg0; - wxFontEncoding _arg1 = (wxFontEncoding ) wxFONTENCODING_SYSTEM; - bool _arg2 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool2 = (int) FALSE; - char *_kwnames[] = { "self","encoding","fixedWidthOnly", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxFontEnumerator_EnumerateFacenames",_kwnames,&_argo0,&_arg1,&tempbool2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateFacenames. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontEnumerator_EnumerateEncodings(_swigobj,_swigarg0) (_swigobj->EnumerateEncodings(_swigarg0)) -static PyObject *_wrap_wxFontEnumerator_EnumerateEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxPyFontEnumerator * _arg0; - char * _arg1 = (char *) ""; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","facename", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|s:wxFontEnumerator_EnumerateEncodings",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateEncodings. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject * wxPyFontEnumerator_GetEncodings(wxPyFontEnumerator *self) { - wxArrayString* arr = self->GetEncodings(); - PyObject* list = PyList_New(0); - for (size_t x=0; xGetCount(); x++) - PyList_Append(list, PyString_FromString((*arr)[x])); - return list; - } -static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxPyFontEnumerator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetEncodings",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetEncodings. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self) { - wxArrayString* arr = self->GetFacenames(); - PyObject* list = PyList_New(0); - for (size_t x=0; xGetCount(); x++) - PyList_Append(list, PyString_FromString((*arr)[x])); - return list; - } -static PyObject *_wrap_wxFontEnumerator_GetFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxPyFontEnumerator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetFacenames",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetFacenames. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -#define new_wxBusyCursor(_swigarg0) (new wxBusyCursor(_swigarg0)) -static PyObject *_wrap_new_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBusyCursor * _result; - wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; - PyObject * _argo0 = 0; - char *_kwnames[] = { "cursor", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBusyCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBusyCursor. Expected _wxCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBusyCursor_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxBusyCursor(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBusyCursor * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxBusyCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBusyCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBusyCursor. Expected _wxBusyCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxBusyCursor(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef misc2cMethods[] = { - { "delete_wxBusyCursor", (PyCFunction) _wrap_delete_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "new_wxBusyCursor", (PyCFunction) _wrap_new_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_GetFacenames", (PyCFunction) _wrap_wxFontEnumerator_GetFacenames, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_GetEncodings", (PyCFunction) _wrap_wxFontEnumerator_GetEncodings, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_EnumerateEncodings", (PyCFunction) _wrap_wxFontEnumerator_EnumerateEncodings, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_EnumerateFacenames", (PyCFunction) _wrap_wxFontEnumerator_EnumerateFacenames, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator__setSelf", (PyCFunction) _wrap_wxFontEnumerator__setSelf, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxFontEnumerator", (PyCFunction) _wrap_delete_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, - { "new_wxFontEnumerator", (PyCFunction) _wrap_new_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_SetSize", (PyCFunction) _wrap_wxCaret_SetSize, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_SetSizeWH", (PyCFunction) _wrap_wxCaret_SetSizeWH, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_Move", (PyCFunction) _wrap_wxCaret_Move, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_MoveXY", (PyCFunction) _wrap_wxCaret_MoveXY, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetWindow", (PyCFunction) _wrap_wxCaret_GetWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetSize", (PyCFunction) _wrap_wxCaret_GetSize, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetSizeTuple", (PyCFunction) _wrap_wxCaret_GetSizeTuple, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetPosition", (PyCFunction) _wrap_wxCaret_GetPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetPositionTuple", (PyCFunction) _wrap_wxCaret_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_IsVisible", (PyCFunction) _wrap_wxCaret_IsVisible, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_IsOk", (PyCFunction) _wrap_wxCaret_IsOk, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxCaret", (PyCFunction) _wrap_delete_wxCaret, METH_VARARGS | METH_KEYWORDS }, - { "new_wxCaret", (PyCFunction) _wrap_new_wxCaret, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_GetWindow", (PyCFunction) _wrap_wxToolTip_GetWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, - { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, - { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, - { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetBlinkTime", (PyCFunction) _wrap_wxCaret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_SetDelay", (PyCFunction) _wrap_wxToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_Enable", (PyCFunction) _wrap_wxToolTip_Enable, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemMetric", (PyCFunction) _wrap_wxSystemSettings_GetSystemMetric, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemFont", (PyCFunction) _wrap_wxSystemSettings_GetSystemFont, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemColour", (PyCFunction) _wrap_wxSystemSettings_GetSystemColour, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseString", (PyCFunction) _wrap_wxResourceParseString, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseFile", (PyCFunction) _wrap_wxResourceParseFile, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseData", (PyCFunction) _wrap_wxResourceParseData, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceGetIdentifier", (PyCFunction) _wrap_wxResourceGetIdentifier, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateMenuBar", (PyCFunction) _wrap_wxResourceCreateMenuBar, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateIcon", (PyCFunction) _wrap_wxResourceCreateIcon, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateBitmap", (PyCFunction) _wrap_wxResourceCreateBitmap, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceClear", (PyCFunction) _wrap_wxResourceClear, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceAddIdentifier", (PyCFunction) _wrap_wxResourceAddIdentifier, METH_VARARGS | METH_KEYWORDS }, - { "wxGetActiveWindow", (PyCFunction) _wrap_wxGetActiveWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxBeginBusyCursor", (PyCFunction) _wrap_wxBeginBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, - { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, - { "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxDisplayDepth", (PyCFunction) _wrap_wxDisplayDepth, METH_VARARGS | METH_KEYWORDS }, - { "wxColourDisplay", (PyCFunction) _wrap_wxColourDisplay, METH_VARARGS | METH_KEYWORDS }, - { "wxGetNumberFromUser", (PyCFunction) _wrap_wxGetNumberFromUser, METH_VARARGS | METH_KEYWORDS }, - { "wxMessageBox", (PyCFunction) _wrap_wxMessageBox, METH_VARARGS | METH_KEYWORDS }, - { "wxGetSingleChoiceIndex", (PyCFunction) _wrap_wxGetSingleChoiceIndex, METH_VARARGS | METH_KEYWORDS }, - { "wxGetSingleChoice", (PyCFunction) _wrap_wxGetSingleChoice, METH_VARARGS | METH_KEYWORDS }, - { "wxGetTextFromUser", (PyCFunction) _wrap_wxGetTextFromUser, METH_VARARGS | METH_KEYWORDS }, - { "wxFileSelector", (PyCFunction) _wrap_wxFileSelector, METH_VARARGS | METH_KEYWORDS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, - { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxPrintQuality","_wxCoord",0}, - { "_wxPrintQuality","_int",0}, - { "_wxPrintQuality","_signed_int",0}, - { "_wxPrintQuality","_unsigned_int",0}, - { "_wxPrintQuality","_wxWindowID",0}, - { "_wxPrintQuality","_uint",0}, - { "_wxPrintQuality","_EBool",0}, - { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, - { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_size_t","_wxCoord",0}, - { "_size_t","_wxPrintQuality",0}, - { "_size_t","_unsigned_int",0}, - { "_size_t","_int",0}, - { "_size_t","_wxWindowID",0}, - { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_uint","_wxCoord",0}, - { "_uint","_wxPrintQuality",0}, - { "_uint","_size_t",0}, - { "_uint","_unsigned_int",0}, - { "_uint","_int",0}, - { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_EBool","_wxCoord",0}, - { "_EBool","_wxPrintQuality",0}, - { "_EBool","_signed_int",0}, - { "_EBool","_int",0}, - { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_signed_int","_wxCoord",0}, - { "_signed_int","_wxPrintQuality",0}, - { "_signed_int","_EBool",0}, - { "_signed_int","_wxWindowID",0}, - { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_WXTYPE","_short",0}, - { "_WXTYPE","_signed_short",0}, - { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxBrush","_wxBrush",0}, - { "_unsigned_short","_WXTYPE",0}, - { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_signed_short","_WXTYPE",0}, - { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_unsigned_int","_wxCoord",0}, - { "_unsigned_int","_wxPrintQuality",0}, - { "_unsigned_int","_size_t",0}, - { "_unsigned_int","_uint",0}, - { "_unsigned_int","_wxWindowID",0}, - { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, - { "_short","_WXTYPE",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_wxWindowID","_wxCoord",0}, - { "_wxWindowID","_wxPrintQuality",0}, - { "_wxWindowID","_size_t",0}, - { "_wxWindowID","_EBool",0}, - { "_wxWindowID","_uint",0}, - { "_wxWindowID","_int",0}, - { "_wxWindowID","_signed_int",0}, - { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_int","_wxCoord",0}, - { "_int","_wxPrintQuality",0}, - { "_int","_size_t",0}, - { "_int","_EBool",0}, - { "_int","_uint",0}, - { "_int","_wxWindowID",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, - { "_wxCoord","_int",0}, - { "_wxCoord","_signed_int",0}, - { "_wxCoord","_unsigned_int",0}, - { "_wxCoord","_wxWindowID",0}, - { "_wxCoord","_uint",0}, - { "_wxCoord","_EBool",0}, - { "_wxCoord","_size_t",0}, - { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initmisc2c() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("misc2c", misc2cMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH)); - PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH)); - PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH)); - PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH)); - PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH)); - PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH)); - PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH)); - PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN)); - PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN)); - PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN)); - PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT)); - PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT)); - PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT)); - PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT)); - PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT)); - PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE)); - PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT)); - PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); - PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); - PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); - PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME)); - PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER)); - PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); - PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); - PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); - PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); - PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); - PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X)); - PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y)); - PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X)); - PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y)); - PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X)); - PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y)); - PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X)); - PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y)); - PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X)); - PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y)); - PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X)); - PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X)); - PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y)); - PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X)); - PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y)); - PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X)); - PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y)); - PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X)); - PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y)); - PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X)); - PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y)); - PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X)); - PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y)); - PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y)); - PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X)); - PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X)); - PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y)); - PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y)); - PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y)); - PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y)); - PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT)); - PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT)); - PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS)); - PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS)); -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/src/gtk/misc2.py b/utils/wxPython/src/gtk/misc2.py deleted file mode 100644 index a052bbd796..0000000000 --- a/utils/wxPython/src/gtk/misc2.py +++ /dev/null @@ -1,325 +0,0 @@ -# This file was created automatically by SWIG. -import misc2c - -from windows import * - -from misc import * - -from gdi import * - -from clip_dnd import * - -from events import * -class wxToolTipPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def SetTip(self, *_args, **_kwargs): - val = apply(misc2c.wxToolTip_SetTip,(self,) + _args, _kwargs) - return val - def GetTip(self, *_args, **_kwargs): - val = apply(misc2c.wxToolTip_GetTip,(self,) + _args, _kwargs) - return val - def GetWindow(self, *_args, **_kwargs): - val = apply(misc2c.wxToolTip_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def __repr__(self): - return "" % (self.this,) -class wxToolTip(wxToolTipPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxToolTip,_args,_kwargs) - self.thisown = 1 - - - - -class wxCaretPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxCaret(self) - def IsOk(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_IsOk,(self,) + _args, _kwargs) - return val - def IsVisible(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_IsVisible,(self,) + _args, _kwargs) - return val - def GetPositionTuple(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetPositionTuple,(self,) + _args, _kwargs) - return val - def GetPosition(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetPosition,(self,) + _args, _kwargs) - if val: val = wxPointPtr(val) ; val.thisown = 1 - return val - def GetSizeTuple(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetSizeTuple,(self,) + _args, _kwargs) - return val - def GetSize(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetSize,(self,) + _args, _kwargs) - if val: val = wxSizePtr(val) ; val.thisown = 1 - return val - def GetWindow(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def MoveXY(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_MoveXY,(self,) + _args, _kwargs) - return val - def Move(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_Move,(self,) + _args, _kwargs) - return val - def SetSizeWH(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_SetSizeWH,(self,) + _args, _kwargs) - return val - def SetSize(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_SetSize,(self,) + _args, _kwargs) - return val - def Show(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_Show,(self,) + _args, _kwargs) - return val - def Hide(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_Hide,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxCaret(wxCaretPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxCaret,_args,_kwargs) - self.thisown = 1 - - - - -class wxFontEnumeratorPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxFontEnumerator(self) - def _setSelf(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator__setSelf,(self,) + _args, _kwargs) - return val - def EnumerateFacenames(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_EnumerateFacenames,(self,) + _args, _kwargs) - return val - def EnumerateEncodings(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_EnumerateEncodings,(self,) + _args, _kwargs) - return val - def GetEncodings(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_GetEncodings,(self,) + _args, _kwargs) - return val - def GetFacenames(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_GetFacenames,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxFontEnumerator(wxFontEnumeratorPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxFontEnumerator,_args,_kwargs) - self.thisown = 1 - self._setSelf(self) - - - - -class wxBusyCursorPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxBusyCursor(self) - def __repr__(self): - return "" % (self.this,) -class wxBusyCursor(wxBusyCursorPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxBusyCursor,_args,_kwargs) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -wxFileSelector = misc2c.wxFileSelector - -wxGetTextFromUser = misc2c.wxGetTextFromUser - -wxGetSingleChoice = misc2c.wxGetSingleChoice - -wxGetSingleChoiceIndex = misc2c.wxGetSingleChoiceIndex - -wxMessageBox = misc2c.wxMessageBox - -wxGetNumberFromUser = misc2c.wxGetNumberFromUser - -wxColourDisplay = misc2c.wxColourDisplay - -wxDisplayDepth = misc2c.wxDisplayDepth - -wxSetCursor = misc2c.wxSetCursor - -def wxFindWindowByLabel(*_args, **_kwargs): - val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs) - if val: val = wxWindowPtr(val) - return val - -def wxFindWindowByName(*_args, **_kwargs): - val = apply(misc2c.wxFindWindowByName,_args,_kwargs) - if val: val = wxWindowPtr(val) - return val - -wxBeginBusyCursor = misc2c.wxBeginBusyCursor - -def wxGetActiveWindow(*_args, **_kwargs): - val = apply(misc2c.wxGetActiveWindow,_args,_kwargs) - if val: val = wxWindowPtr(val) - return val - -wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier - -wxResourceClear = misc2c.wxResourceClear - -def wxResourceCreateBitmap(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateBitmap,_args,_kwargs) - if val: val = wxBitmapPtr(val); val.thisown = 1 - return val - -def wxResourceCreateIcon(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateIcon,_args,_kwargs) - if val: val = wxIconPtr(val); val.thisown = 1 - return val - -def wxResourceCreateMenuBar(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs) - if val: val = wxMenuBarPtr(val) - return val - -wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier - -wxResourceParseData = misc2c.wxResourceParseData - -wxResourceParseFile = misc2c.wxResourceParseFile - -wxResourceParseString = misc2c.wxResourceParseString - -def wxSystemSettings_GetSystemColour(*_args, **_kwargs): - val = apply(misc2c.wxSystemSettings_GetSystemColour,_args,_kwargs) - if val: val = wxColourPtr(val); val.thisown = 1 - return val - -def wxSystemSettings_GetSystemFont(*_args, **_kwargs): - val = apply(misc2c.wxSystemSettings_GetSystemFont,_args,_kwargs) - if val: val = wxFontPtr(val); val.thisown = 1 - return val - -wxSystemSettings_GetSystemMetric = misc2c.wxSystemSettings_GetSystemMetric - -wxToolTip_Enable = misc2c.wxToolTip_Enable - -wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay - -wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime - -wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime - -wxPostEvent = misc2c.wxPostEvent - -wxWakeUpIdle = misc2c.wxWakeUpIdle - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxSYS_WHITE_BRUSH = misc2c.wxSYS_WHITE_BRUSH -wxSYS_LTGRAY_BRUSH = misc2c.wxSYS_LTGRAY_BRUSH -wxSYS_GRAY_BRUSH = misc2c.wxSYS_GRAY_BRUSH -wxSYS_DKGRAY_BRUSH = misc2c.wxSYS_DKGRAY_BRUSH -wxSYS_BLACK_BRUSH = misc2c.wxSYS_BLACK_BRUSH -wxSYS_NULL_BRUSH = misc2c.wxSYS_NULL_BRUSH -wxSYS_HOLLOW_BRUSH = misc2c.wxSYS_HOLLOW_BRUSH -wxSYS_WHITE_PEN = misc2c.wxSYS_WHITE_PEN -wxSYS_BLACK_PEN = misc2c.wxSYS_BLACK_PEN -wxSYS_NULL_PEN = misc2c.wxSYS_NULL_PEN -wxSYS_OEM_FIXED_FONT = misc2c.wxSYS_OEM_FIXED_FONT -wxSYS_ANSI_FIXED_FONT = misc2c.wxSYS_ANSI_FIXED_FONT -wxSYS_ANSI_VAR_FONT = misc2c.wxSYS_ANSI_VAR_FONT -wxSYS_SYSTEM_FONT = misc2c.wxSYS_SYSTEM_FONT -wxSYS_DEVICE_DEFAULT_FONT = misc2c.wxSYS_DEVICE_DEFAULT_FONT -wxSYS_DEFAULT_PALETTE = misc2c.wxSYS_DEFAULT_PALETTE -wxSYS_SYSTEM_FIXED_FONT = misc2c.wxSYS_SYSTEM_FIXED_FONT -wxSYS_DEFAULT_GUI_FONT = misc2c.wxSYS_DEFAULT_GUI_FONT -wxSYS_COLOUR_SCROLLBAR = misc2c.wxSYS_COLOUR_SCROLLBAR -wxSYS_COLOUR_BACKGROUND = misc2c.wxSYS_COLOUR_BACKGROUND -wxSYS_COLOUR_ACTIVECAPTION = misc2c.wxSYS_COLOUR_ACTIVECAPTION -wxSYS_COLOUR_INACTIVECAPTION = misc2c.wxSYS_COLOUR_INACTIVECAPTION -wxSYS_COLOUR_MENU = misc2c.wxSYS_COLOUR_MENU -wxSYS_COLOUR_WINDOW = misc2c.wxSYS_COLOUR_WINDOW -wxSYS_COLOUR_WINDOWFRAME = misc2c.wxSYS_COLOUR_WINDOWFRAME -wxSYS_COLOUR_MENUTEXT = misc2c.wxSYS_COLOUR_MENUTEXT -wxSYS_COLOUR_WINDOWTEXT = misc2c.wxSYS_COLOUR_WINDOWTEXT -wxSYS_COLOUR_CAPTIONTEXT = misc2c.wxSYS_COLOUR_CAPTIONTEXT -wxSYS_COLOUR_ACTIVEBORDER = misc2c.wxSYS_COLOUR_ACTIVEBORDER -wxSYS_COLOUR_INACTIVEBORDER = misc2c.wxSYS_COLOUR_INACTIVEBORDER -wxSYS_COLOUR_APPWORKSPACE = misc2c.wxSYS_COLOUR_APPWORKSPACE -wxSYS_COLOUR_HIGHLIGHT = misc2c.wxSYS_COLOUR_HIGHLIGHT -wxSYS_COLOUR_HIGHLIGHTTEXT = misc2c.wxSYS_COLOUR_HIGHLIGHTTEXT -wxSYS_COLOUR_BTNFACE = misc2c.wxSYS_COLOUR_BTNFACE -wxSYS_COLOUR_BTNSHADOW = misc2c.wxSYS_COLOUR_BTNSHADOW -wxSYS_COLOUR_GRAYTEXT = misc2c.wxSYS_COLOUR_GRAYTEXT -wxSYS_COLOUR_BTNTEXT = misc2c.wxSYS_COLOUR_BTNTEXT -wxSYS_COLOUR_INACTIVECAPTIONTEXT = misc2c.wxSYS_COLOUR_INACTIVECAPTIONTEXT -wxSYS_COLOUR_BTNHIGHLIGHT = misc2c.wxSYS_COLOUR_BTNHIGHLIGHT -wxSYS_COLOUR_3DDKSHADOW = misc2c.wxSYS_COLOUR_3DDKSHADOW -wxSYS_COLOUR_3DLIGHT = misc2c.wxSYS_COLOUR_3DLIGHT -wxSYS_COLOUR_INFOTEXT = misc2c.wxSYS_COLOUR_INFOTEXT -wxSYS_COLOUR_INFOBK = misc2c.wxSYS_COLOUR_INFOBK -wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP -wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE -wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW -wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT -wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT -wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT -wxSYS_MOUSE_BUTTONS = misc2c.wxSYS_MOUSE_BUTTONS -wxSYS_BORDER_X = misc2c.wxSYS_BORDER_X -wxSYS_BORDER_Y = misc2c.wxSYS_BORDER_Y -wxSYS_CURSOR_X = misc2c.wxSYS_CURSOR_X -wxSYS_CURSOR_Y = misc2c.wxSYS_CURSOR_Y -wxSYS_DCLICK_X = misc2c.wxSYS_DCLICK_X -wxSYS_DCLICK_Y = misc2c.wxSYS_DCLICK_Y -wxSYS_DRAG_X = misc2c.wxSYS_DRAG_X -wxSYS_DRAG_Y = misc2c.wxSYS_DRAG_Y -wxSYS_EDGE_X = misc2c.wxSYS_EDGE_X -wxSYS_EDGE_Y = misc2c.wxSYS_EDGE_Y -wxSYS_HSCROLL_ARROW_X = misc2c.wxSYS_HSCROLL_ARROW_X -wxSYS_HSCROLL_ARROW_Y = misc2c.wxSYS_HSCROLL_ARROW_Y -wxSYS_HTHUMB_X = misc2c.wxSYS_HTHUMB_X -wxSYS_ICON_X = misc2c.wxSYS_ICON_X -wxSYS_ICON_Y = misc2c.wxSYS_ICON_Y -wxSYS_ICONSPACING_X = misc2c.wxSYS_ICONSPACING_X -wxSYS_ICONSPACING_Y = misc2c.wxSYS_ICONSPACING_Y -wxSYS_WINDOWMIN_X = misc2c.wxSYS_WINDOWMIN_X -wxSYS_WINDOWMIN_Y = misc2c.wxSYS_WINDOWMIN_Y -wxSYS_SCREEN_X = misc2c.wxSYS_SCREEN_X -wxSYS_SCREEN_Y = misc2c.wxSYS_SCREEN_Y -wxSYS_FRAMESIZE_X = misc2c.wxSYS_FRAMESIZE_X -wxSYS_FRAMESIZE_Y = misc2c.wxSYS_FRAMESIZE_Y -wxSYS_SMALLICON_X = misc2c.wxSYS_SMALLICON_X -wxSYS_SMALLICON_Y = misc2c.wxSYS_SMALLICON_Y -wxSYS_HSCROLL_Y = misc2c.wxSYS_HSCROLL_Y -wxSYS_VSCROLL_X = misc2c.wxSYS_VSCROLL_X -wxSYS_VSCROLL_ARROW_X = misc2c.wxSYS_VSCROLL_ARROW_X -wxSYS_VSCROLL_ARROW_Y = misc2c.wxSYS_VSCROLL_ARROW_Y -wxSYS_VTHUMB_Y = misc2c.wxSYS_VTHUMB_Y -wxSYS_CAPTION_Y = misc2c.wxSYS_CAPTION_Y -wxSYS_MENU_Y = misc2c.wxSYS_MENU_Y -wxSYS_NETWORK_PRESENT = misc2c.wxSYS_NETWORK_PRESENT -wxSYS_PENWINDOWS_PRESENT = misc2c.wxSYS_PENWINDOWS_PRESENT -wxSYS_SHOW_SOUNDS = misc2c.wxSYS_SHOW_SOUNDS -wxSYS_SWAP_BUTTONS = misc2c.wxSYS_SWAP_BUTTONS diff --git a/utils/wxPython/src/gtk/windows2.cpp b/utils/wxPython/src/gtk/windows2.cpp deleted file mode 100644 index 60f52feb47..0000000000 --- a/utils/wxPython/src/gtk/windows2.cpp +++ /dev/null @@ -1,5544 +0,0 @@ -/* - * FILE : gtk/windows2.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initwindows2c - -#define SWIG_name "windows2c" - -#include "helpers.h" -#include -#include -#include -#ifdef __WXMSW__ -#include -#endif - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - -static char* wxStringErrorMsg = "string type is required for parameter"; -#ifdef __cplusplus -extern "C" { -#endif -#define new_wxGridCell() (new wxGridCell()) -static PyObject *_wrap_new_wxGridCell(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCell",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCell *)new_wxGridCell(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxGridCell(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxGridCell(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGridCell",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGridCell. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxGridCell(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetTextValue(_swigobj) (_swigobj->GetTextValue()) -static PyObject *_wrap_wxGridCell_GetTextValue(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCell_GetTextValue",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetTextValue. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxString & _result_ref = wxGridCell_GetTextValue(_arg0); - _result = (wxString *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} - return _resultobj; -} - -#define wxGridCell_SetTextValue(_swigobj,_swigarg0) (_swigobj->SetTextValue(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetTextValue(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","str", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCell_SetTextValue",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetTextValue. Expected _wxGridCell_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGridCell_SetTextValue(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxGridCell_GetFont(_swigobj) (_swigobj->GetFont()) -static PyObject *_wrap_wxGridCell_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCell_GetFont",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetFont. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxGridCell_GetFont(_arg0); - _result = (wxFont *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGridCell_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxFont * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","f", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCell_SetFont",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetFont. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetFont. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGridCell_SetFont(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetTextColour(_swigobj) (_swigobj->GetTextColour()) -static PyObject *_wrap_wxGridCell_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCell_GetTextColour",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetTextColour. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGridCell_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGridCell_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxColour * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","colour", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCell_SetTextColour",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetTextColour. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetTextColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGridCell_SetTextColour(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) -static PyObject *_wrap_wxGridCell_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCell_GetBackgroundColour",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetBackgroundColour. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGridCell_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGridCell_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxColour * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","colour", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCell_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetBackgroundColour. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGridCell_SetBackgroundColour(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetBackgroundBrush(_swigobj) (_swigobj->GetBackgroundBrush()) -static PyObject *_wrap_wxGridCell_GetBackgroundBrush(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBrush * _result; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCell_GetBackgroundBrush",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetBackgroundBrush. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxBrush & _result_ref = wxGridCell_GetBackgroundBrush(_arg0); - _result = (wxBrush *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGridCell_GetAlignment(_swigobj) (_swigobj->GetAlignment()) -static PyObject *_wrap_wxGridCell_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCell_GetAlignment",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetAlignment. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridCell_GetAlignment(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridCell_SetAlignment(_swigobj,_swigarg0) (_swigobj->SetAlignment(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","align", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCell_SetAlignment",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetAlignment. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGridCell_SetAlignment(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGridCell_GetCellBitmap(_swigobj) (_swigobj->GetCellBitmap()) -static PyObject *_wrap_wxGridCell_GetCellBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBitmap * _result; - wxGridCell * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCell_GetCellBitmap",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_GetCellBitmap. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBitmap *)wxGridCell_GetCellBitmap(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGridCell_SetCellBitmap(_swigobj,_swigarg0) (_swigobj->SetCellBitmap(_swigarg0)) -static PyObject *_wrap_wxGridCell_SetCellBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _arg0; - wxBitmap * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","bitmap", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCell_SetCellBitmap",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCell_SetCellBitmap. Expected _wxGridCell_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCell_SetCellBitmap. Expected _wxBitmap_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGridCell_SetCellBitmap(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxGridTowxPanel(void *ptr) { - wxGrid *src; - wxPanel *dest; - src = (wxGrid *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxGridTowxWindow(void *ptr) { - wxGrid *src; - wxWindow *dest; - src = (wxGrid *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxGridTowxEvtHandler(void *ptr) { - wxGrid *src; - wxEvtHandler *dest; - src = (wxGrid *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; - long _arg4 = (long ) 0; - char * _arg5 = (char *) "grid"; - PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj2 = 0; - wxSize temp0; - PyObject * _obj3 = 0; - char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxGrid",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGrid. Expected _wxWindow_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = &temp; - if (! wxPoint_helper(_obj2, &_arg2)) - return NULL; -} - if (_obj3) -{ - _arg3 = &temp0; - if (! wxSize_helper(_obj3, &_arg3)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_AdjustScrollbars(_swigobj) (_swigobj->AdjustScrollbars()) -static PyObject *_wrap_wxGrid_AdjustScrollbars(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_AdjustScrollbars",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AdjustScrollbars. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_AdjustScrollbars(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_AppendCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendCols(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = (int ) 1; - int _arg2 = (int ) TRUE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","n","updateLabels", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendCols",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendCols. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_AppendRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendRows(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = (int ) 1; - int _arg2 = (int ) TRUE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","n","updateLabels", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendRows",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendRows. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_BeginBatch(_swigobj) (_swigobj->BeginBatch()) -static PyObject *_wrap_wxGrid_BeginBatch(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_BeginBatch",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_BeginBatch. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_BeginBatch(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_CellHitTest(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CellHitTest(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxGrid_CellHitTest(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - int * _arg3; - int temp; - int * _arg4; - int temp0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y", NULL }; - - self = self; -{ - _arg3 = &temp; -} -{ - _arg4 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_CellHitTest",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CellHitTest. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_CellHitTest(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg4)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -static bool wxGrid_CreateGrid(wxGrid *self,int rows,int cols,short defaultWidth,short defaultHeight) { - return self->CreateGrid(rows, cols, NULL, NULL, - defaultWidth, defaultHeight); - } -static PyObject *_wrap_wxGrid_CreateGrid(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - short _arg3 = (short ) wxGRID_DEFAULT_CELL_WIDTH; - short _arg4 = (short ) wxGRID_DEFAULT_CELL_HEIGHT; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","rows","cols","defaultWidth","defaultHeight", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|hh:wxGrid_CreateGrid",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CreateGrid. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_CurrentCellVisible(_swigobj) (_swigobj->CurrentCellVisible()) -static PyObject *_wrap_wxGrid_CurrentCellVisible(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CurrentCellVisible",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CurrentCellVisible. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_CurrentCellVisible(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_DeleteCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteCols(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_DeleteCols(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = (int ) 0; - int _arg2 = (int ) 1; - bool _arg3 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "self","pos","n","updateLabels", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_DeleteCols",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_DeleteRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteRows(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_DeleteRows(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = (int ) 0; - int _arg2 = (int ) 1; - bool _arg3 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "self","pos","n","updateLabels", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_DeleteRows",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_EndBatch(_swigobj) (_swigobj->EndBatch()) -static PyObject *_wrap_wxGrid_EndBatch(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_EndBatch",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EndBatch. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_EndBatch(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_GetBatchCount(_swigobj) (_swigobj->GetBatchCount()) -static PyObject *_wrap_wxGrid_GetBatchCount(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetBatchCount",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetBatchCount. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetBatchCount(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCell(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCell(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCell",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCell. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCell *)wxGrid_GetCell(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetCellAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellAlignment(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetCellAlignment(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetDefCellAlignment(_swigobj) (_swigobj->GetCellAlignment()) -static PyObject *_wrap_wxGrid_GetDefCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefCellAlignment",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetDefCellAlignment(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellBackgroundColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellBackgroundColour",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetDefCellBackgroundColour(_swigobj) (_swigobj->GetCellBackgroundColour()) -static PyObject *_wrap_wxGrid_GetDefCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefCellBackgroundColour",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGrid_GetDefCellBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -static PyObject * wxGrid_GetCells(wxGrid *self) { - int row, col; - PyObject* rows = PyList_New(0); - for (row=0; row < self->GetRows(); row++) { - PyObject* rowList = PyList_New(0); - for (col=0; col < self->GetCols(); col++) { - wxGridCell* cell = self->GetCell(row, col); - - bool doSave = wxPyRestoreThread(); - PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell"); - wxPySaveThread(doSave); - - if (PyList_Append(rowList, pyCell) == -1) - return NULL; - } - if (PyList_Append(rows, rowList) == -1) - return NULL; - } - return rows; - } -static PyObject *_wrap_wxGrid_GetCells(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCells",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCells. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxGrid_GetCells(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -#define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellTextColour",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGrid_GetCellTextColour(_arg0,_arg1,_arg2); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetDefCellTextColour(_swigobj) (_swigobj->GetCellTextColour()) -static PyObject *_wrap_wxGrid_GetDefCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefCellTextColour",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGrid_GetDefCellTextColour(_arg0); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetCellTextFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextFont(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellTextFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellTextFont",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxGrid_GetCellTextFont(_arg0,_arg1,_arg2); - _result = (wxFont *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetDefCellTextFont(_swigobj) (_swigobj->GetCellTextFont()) -static PyObject *_wrap_wxGrid_GetDefCellTextFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefCellTextFont",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxGrid_GetDefCellTextFont(_arg0); - _result = (wxFont *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetCellValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellValue(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellValue",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxString & _result_ref = wxGrid_GetCellValue(_arg0,_arg1,_arg2); - _result = (wxString *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} - return _resultobj; -} - -#define wxGrid_GetCols(_swigobj) (_swigobj->GetCols()) -static PyObject *_wrap_wxGrid_GetCols(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCols",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCols. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetCols(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetColumnWidth(_swigobj,_swigarg0) (_swigobj->GetColumnWidth(_swigarg0)) -static PyObject *_wrap_wxGrid_GetColumnWidth(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetColumnWidth",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColumnWidth. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetColumnWidth(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCurrentRect(_swigobj) (_swigobj->GetCurrentRect()) -static PyObject *_wrap_wxGrid_GetCurrentRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRect * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCurrentRect",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCurrentRect. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxGrid_GetCurrentRect(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGrid_GetCursorColumn(_swigobj) (_swigobj->GetCursorColumn()) -static PyObject *_wrap_wxGrid_GetCursorColumn(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCursorColumn",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCursorColumn. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetCursorColumn(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetCursorRow(_swigobj) (_swigobj->GetCursorRow()) -static PyObject *_wrap_wxGrid_GetCursorRow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCursorRow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCursorRow. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetCursorRow(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetEditable(_swigobj) (_swigobj->GetEditable()) -static PyObject *_wrap_wxGrid_GetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetEditable",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetEditable. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_GetEditable(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetHorizScrollBar(_swigobj) (_swigobj->GetHorizScrollBar()) -static PyObject *_wrap_wxGrid_GetHorizScrollBar(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxScrollBar * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetHorizScrollBar",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetHorizScrollBar. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxScrollBar *)wxGrid_GetHorizScrollBar(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetLabelAlignment(_swigobj,_swigarg0) (_swigobj->GetLabelAlignment(_swigarg0)) -static PyObject *_wrap_wxGrid_GetLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","orientation", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetLabelAlignment",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelAlignment. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetLabelAlignment(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetLabelBackgroundColour(_swigobj) (_swigobj->GetLabelBackgroundColour()) -static PyObject *_wrap_wxGrid_GetLabelBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelBackgroundColour",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGrid_GetLabelBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetLabelSize(_swigobj,_swigarg0) (_swigobj->GetLabelSize(_swigarg0)) -static PyObject *_wrap_wxGrid_GetLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","orientation", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetLabelSize",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelSize. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetLabelSize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetLabelTextColour(_swigobj) (_swigobj->GetLabelTextColour()) -static PyObject *_wrap_wxGrid_GetLabelTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelTextColour",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextColour. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxColour & _result_ref = wxGrid_GetLabelTextColour(_arg0); - _result = (wxColour *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetLabelTextFont(_swigobj) (_swigobj->GetLabelTextFont()) -static PyObject *_wrap_wxGrid_GetLabelTextFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelTextFont",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextFont. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFont & _result_ref = wxGrid_GetLabelTextFont(_arg0); - _result = (wxFont *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetLabelValue(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_GetLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","orientation","pos", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetLabelValue",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxString & _result_ref = wxGrid_GetLabelValue(_arg0,_arg1,_arg2); - _result = (wxString *) &_result_ref; - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} - return _resultobj; -} - -#define wxGrid_GetRowHeight(_swigobj,_swigarg0) (_swigobj->GetRowHeight(_swigarg0)) -static PyObject *_wrap_wxGrid_GetRowHeight(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetRowHeight",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowHeight. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetRowHeight(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetRows(_swigobj) (_swigobj->GetRows()) -static PyObject *_wrap_wxGrid_GetRows(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetRows",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRows. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetRows(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetScrollPosX(_swigobj) (_swigobj->GetScrollPosX()) -static PyObject *_wrap_wxGrid_GetScrollPosX(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetScrollPosX",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetScrollPosX. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetScrollPosX(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetScrollPosY(_swigobj) (_swigobj->GetScrollPosY()) -static PyObject *_wrap_wxGrid_GetScrollPosY(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetScrollPosY",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetScrollPosY. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGrid_GetScrollPosY(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_GetTextItem(_swigobj) (_swigobj->GetTextItem()) -static PyObject *_wrap_wxGrid_GetTextItem(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetTextItem",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetTextItem. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)wxGrid_GetTextItem(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_GetVertScrollBar(_swigobj) (_swigobj->GetVertScrollBar()) -static PyObject *_wrap_wxGrid_GetVertScrollBar(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxScrollBar * _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetVertScrollBar",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetVertScrollBar. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxScrollBar *)wxGrid_GetVertScrollBar(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGrid_InsertCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertCols(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_InsertCols(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = (int ) 0; - int _arg2 = (int ) 1; - bool _arg3 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "self","pos","n","updateLabels", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_InsertCols",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertCols. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_InsertRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertRows(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_InsertRows(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - int _arg1 = (int ) 0; - int _arg2 = (int ) 1; - bool _arg3 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "self","pos","n","updateLabels", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_InsertRows",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertRows. Expected _wxGrid_p."); - return NULL; - } - } - _arg3 = (bool ) tempbool3; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_OnActivate(_swigobj,_swigarg0) (_swigobj->OnActivate(_swigarg0)) -static PyObject *_wrap_wxGrid_OnActivate(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","active", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_OnActivate",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_OnActivate. Expected _wxGrid_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_OnActivate(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellAlignment(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellAlignment(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - int _arg3; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","alignment","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxGrid_SetCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellAlignment(_swigobj,_swigarg0) (_swigobj->SetCellAlignment(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","alignment", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetDefCellAlignment",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellAlignment. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetDefCellAlignment(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellBackgroundColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - int _arg2; - int _arg3; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","colour","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGrid_SetCellBackgroundColour",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetCellBackgroundColour(_arg0,*_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetCellBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","colour", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefCellBackgroundColour",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetDefCellBackgroundColour(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellTextColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextColour(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - int _arg2; - int _arg3; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","colour","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGrid_SetCellTextColour",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellTextColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetCellTextColour(_arg0,*_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellTextColour(_swigobj,_swigarg0) (_swigobj->SetCellTextColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","colour", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefCellTextColour",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellTextColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetDefCellTextColour(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellTextFont(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextFont(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellTextFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - int _arg2; - int _arg3; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","font","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGrid_SetCellTextFont",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetCellTextFont. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetCellTextFont(_arg0,*_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDefCellTextFont(_swigobj,_swigarg0) (_swigobj->SetCellTextFont(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDefCellTextFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","font", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefCellTextFont",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefCellTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefCellTextFont. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetDefCellTextFont(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetCellValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellValue(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxString * _arg1; - int _arg2; - int _arg3; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","val","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGrid_SetCellValue",_kwnames,&_argo0,&_obj1,&_arg2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetCellValue(_arg0,*_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxGrid_SetColumnWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColumnWidth(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetColumnWidth(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","col","width", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetColumnWidth",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColumnWidth. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetColumnWidth(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetDividerPen(_swigobj,_swigarg0) (_swigobj->SetDividerPen(_swigarg0)) -static PyObject *_wrap_wxGrid_SetDividerPen(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxPen * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","pen", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDividerPen",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDividerPen. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDividerPen. Expected _wxPen_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetDividerPen(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) -static PyObject *_wrap_wxGrid_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","editable", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetEditable",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetEditable. Expected _wxGrid_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetEditable(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetGridCursor(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetGridCursor(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetGridCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetGridCursor",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetGridCursor. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetGridCursor(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelAlignment(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","orientation","alignment", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetLabelAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelAlignment. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetLabelAlignment(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetLabelBackgroundColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelBackgroundColour",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelBackgroundColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelBackgroundColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","orientation","size", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetLabelSize",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelSize. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetLabelSize(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelTextColour(_swigobj,_swigarg0) (_swigobj->SetLabelTextColour(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxColour * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelTextColour",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextColour. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelTextColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetLabelTextColour(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelTextFont(_swigobj,_swigarg0) (_swigobj->SetLabelTextFont(_swigarg0)) -static PyObject *_wrap_wxGrid_SetLabelTextFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - wxFont * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","font", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelTextFont",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextFont. Expected _wxGrid_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelTextFont. Expected _wxFont_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetLabelTextFont(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_SetLabelValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetLabelValue(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxGrid_SetLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - wxString * _arg2; - int _arg3; - PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","orientation","value","pos", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOi:wxGrid_SetLabelValue",_kwnames,&_argo0,&_arg1,&_obj2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelValue. Expected _wxGrid_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetLabelValue(_arg0,_arg1,*_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxGrid_SetRowHeight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowHeight(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxGrid_SetRowHeight(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","row","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetRowHeight",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowHeight. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetRowHeight(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_UpdateDimensions(_swigobj) (_swigobj->UpdateDimensions()) -static PyObject *_wrap_wxGrid_UpdateDimensions(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_UpdateDimensions",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_UpdateDimensions. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_UpdateDimensions(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxGrid_GetEditInPlace(_swigobj) (_swigobj->GetEditInPlace()) -static PyObject *_wrap_wxGrid_GetEditInPlace(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGrid * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetEditInPlace",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetEditInPlace. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGrid_GetEditInPlace(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGrid_SetEditInPlace(_swigobj,_swigarg0) (_swigobj->SetEditInPlace(_swigarg0)) -static PyObject *_wrap_wxGrid_SetEditInPlace(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGrid * _arg0; - int _arg1 = (int ) TRUE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","edit", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_SetEditInPlace",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetEditInPlace. Expected _wxGrid_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxGrid_SetEditInPlace(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxGridEventTowxEvent(void *ptr) { - wxGridEvent *src; - wxEvent *dest; - src = (wxGridEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxGridEvent_m_row_set(_swigobj,_swigval) (_swigobj->m_row = _swigval,_swigval) -static PyObject *_wrap_wxGridEvent_m_row_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_row", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridEvent_m_row_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_row_set. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_row_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_row_get(_swigobj) ((int ) _swigobj->m_row) -static PyObject *_wrap_wxGridEvent_m_row_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_m_row_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_row_get. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_row_get(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_col_set(_swigobj,_swigval) (_swigobj->m_col = _swigval,_swigval) -static PyObject *_wrap_wxGridEvent_m_col_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridEvent_m_col_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_col_set. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_col_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_col_get(_swigobj) ((int ) _swigobj->m_col) -static PyObject *_wrap_wxGridEvent_m_col_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_m_col_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_col_get. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_col_get(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) -static PyObject *_wrap_wxGridEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_x", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridEvent_m_x_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_x_set. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_x_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_x_get(_swigobj) ((int ) _swigobj->m_x) -static PyObject *_wrap_wxGridEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_m_x_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_x_get. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_x_get(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) -static PyObject *_wrap_wxGridEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","m_y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridEvent_m_y_set",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_y_set. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_y_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_y_get(_swigobj) ((int ) _swigobj->m_y) -static PyObject *_wrap_wxGridEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_m_y_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_y_get. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_m_y_get(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_control_set(_swigobj,_swigval) (_swigobj->m_control = _swigval,_swigval) -static PyObject *_wrap_wxGridEvent_m_control_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGridEvent * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","m_control", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridEvent_m_control_set",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_control_set. Expected _wxGridEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGridEvent_m_control_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_control_get(_swigobj) ((bool ) _swigobj->m_control) -static PyObject *_wrap_wxGridEvent_m_control_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_m_control_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_control_get. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGridEvent_m_control_get(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_shift_set(_swigobj,_swigval) (_swigobj->m_shift = _swigval,_swigval) -static PyObject *_wrap_wxGridEvent_m_shift_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGridEvent * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","m_shift", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridEvent_m_shift_set",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_shift_set. Expected _wxGridEvent_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGridEvent_m_shift_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_shift_get(_swigobj) ((bool ) _swigobj->m_shift) -static PyObject *_wrap_wxGridEvent_m_shift_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_m_shift_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_shift_get. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGridEvent_m_shift_get(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_m_cell_set(_swigobj,_swigval) (_swigobj->m_cell = _swigval,_swigval) -static PyObject *_wrap_wxGridEvent_m_cell_set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _result; - wxGridEvent * _arg0; - wxGridCell * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","m_cell", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridEvent_m_cell_set",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_cell_set. Expected _wxGridEvent_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCell_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridEvent_m_cell_set. Expected _wxGridCell_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCell *)wxGridEvent_m_cell_set(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGridEvent_m_cell_get(_swigobj) ((wxGridCell *) _swigobj->m_cell) -static PyObject *_wrap_wxGridEvent_m_cell_get(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_m_cell_get",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_m_cell_get. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCell *)wxGridEvent_m_cell_get(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxGridEvent_GetRow(_swigobj) (_swigobj->GetRow()) -static PyObject *_wrap_wxGridEvent_GetRow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetRow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetRow. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_GetRow(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_GetCol(_swigobj) (_swigobj->GetCol()) -static PyObject *_wrap_wxGridEvent_GetCol(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetCol",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetCol. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGridEvent_GetCol(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxGridEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPoint * _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetPosition",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetPosition. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxGridEvent_GetPosition(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxGridEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) -static PyObject *_wrap_wxGridEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_ControlDown",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ControlDown. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGridEvent_ControlDown(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) -static PyObject *_wrap_wxGridEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_ShiftDown",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ShiftDown. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGridEvent_ShiftDown(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxGridEvent_GetCell(_swigobj) (_swigobj->GetCell()) -static PyObject *_wrap_wxGridEvent_GetCell(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxGridCell * _result; - wxGridEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetCell",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetCell. Expected _wxGridEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGridCell *)wxGridEvent_GetCell(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCell_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -static void *SwigwxNotebookEventTowxNotifyEvent(void *ptr) { - wxNotebookEvent *src; - wxNotifyEvent *dest; - src = (wxNotebookEvent *) ptr; - dest = (wxNotifyEvent *) src; - return (void *) dest; -} - -static void *SwigwxNotebookEventTowxCommandEvent(void *ptr) { - wxNotebookEvent *src; - wxCommandEvent *dest; - src = (wxNotebookEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxNotebookEventTowxEvent(void *ptr) { - wxNotebookEvent *src; - wxEvent *dest; - src = (wxNotebookEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxNotebookEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxNotebookEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookEvent_GetSelection",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxNotebookEvent_GetSelection(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebookEvent_GetOldSelection(_swigobj) (_swigobj->GetOldSelection()) -static PyObject *_wrap_wxNotebookEvent_GetOldSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxNotebookEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookEvent_GetOldSelection",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetOldSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxNotebookEvent_GetOldSelection(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebookEvent_SetOldSelection(_swigobj,_swigarg0) (_swigobj->SetOldSelection(_swigarg0)) -static PyObject *_wrap_wxNotebookEvent_SetOldSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNotebookEvent * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","page", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebookEvent_SetOldSelection",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_SetOldSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxNotebookEvent_SetOldSelection(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxNotebookEvent_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxNotebookEvent_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNotebookEvent * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","page", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebookEvent_SetSelection",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_SetSelection. Expected _wxNotebookEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxNotebookEvent_SetSelection(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxNotebookTowxControl(void *ptr) { - wxNotebook *src; - wxControl *dest; - src = (wxNotebook *) ptr; - dest = (wxControl *) src; - return (void *) dest; -} - -static void *SwigwxNotebookTowxWindow(void *ptr) { - wxNotebook *src; - wxWindow *dest; - src = (wxNotebook *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxNotebookTowxEvtHandler(void *ptr) { - wxNotebook *src; - wxEvtHandler *dest; - src = (wxNotebook *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNotebook * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; - long _arg4 = (long ) 0; - char * _arg5 = (char *) "notebook"; - PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj2 = 0; - wxSize temp0; - PyObject * _obj3 = 0; - char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxNotebook",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxNotebook. Expected _wxWindow_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = &temp; - if (! wxPoint_helper(_obj2, &_arg2)) - return NULL; -} - if (_obj3) -{ - _arg3 = &temp0; - if (! wxSize_helper(_obj3, &_arg3)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxNotebook_GetPageCount(_swigobj) (_swigobj->GetPageCount()) -static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetPageCount",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageCount. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxNotebook_GetPageCount(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","nPage", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_SetSelection",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetSelection. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxNotebook_SetSelection(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_AdvanceSelection(_swigobj,_swigarg0) (_swigobj->AdvanceSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNotebook * _arg0; - bool _arg1 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool1 = (int) TRUE; - char *_kwnames[] = { "self","bForward", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxNotebook_AdvanceSelection",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AdvanceSelection. Expected _wxNotebook_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxNotebook_AdvanceSelection(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxNotebook_GetSelection(_swigobj) (_swigobj->GetSelection()) -static PyObject *_wrap_wxNotebook_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetSelection",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetSelection. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxNotebook_GetSelection(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetPageText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - wxString * _arg2; - PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","nPage","strText", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxNotebook_SetPageText",_kwnames,&_argo0,&_arg1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageText. Expected _wxNotebook_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxNotebook_GetPageText(_swigobj,_swigarg0) (_swigobj->GetPageText(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxNotebook * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","nPage", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageText",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageText. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxNotebook_SetImageList(_swigobj,_swigarg0) (_swigobj->SetImageList(_swigarg0)) -static PyObject *_wrap_wxNotebook_SetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNotebook * _arg0; - wxImageList * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","imageList", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetImageList",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetImageList. Expected _wxNotebook_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_SetImageList. Expected _wxImageList_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxNotebook_SetImageList(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxNotebook_GetImageList(_swigobj) (_swigobj->GetImageList()) -static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxImageList * _result; - wxNotebook * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetImageList",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetImageList. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxImageList *)wxNotebook_GetImageList(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxNotebook_GetPageImage(_swigobj,_swigarg0) (_swigobj->GetPageImage(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","nPage", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageImage",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageImage. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_SetPageImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageImage(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","nPage","nImage", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxNotebook_SetPageImage",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageImage. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_GetRowCount(_swigobj) (_swigobj->GetRowCount()) -static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxNotebook * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetRowCount",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetRowCount. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxNotebook_GetRowCount(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) -static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","nPage", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_DeletePage",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeletePage. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_RemovePage(_swigobj,_swigarg0) (_swigobj->RemovePage(_swigarg0)) -static PyObject *_wrap_wxNotebook_RemovePage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","nPage", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_RemovePage",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_RemovePage. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_DeleteAllPages(_swigobj) (_swigobj->DeleteAllPages()) -static PyObject *_wrap_wxNotebook_DeleteAllPages(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_DeleteAllPages",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeleteAllPages. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxNotebook_DeleteAllPages(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_AddPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->AddPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxNotebook * _arg0; - wxWindow * _arg1; - wxString * _arg2; - int _arg3 = (int ) FALSE; - int _arg4 = (int ) -1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","pPage","strText","bSelect","imageId", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:wxNotebook_AddPage",_kwnames,&_argo0,&_argo1,&_obj2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AddPage. Expected _wxNotebook_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_AddPage. Expected _wxWindow_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxNotebook * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","nPage", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPage",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPage. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -static void wxNotebook_ResizeChildren(wxNotebook *self) { - wxSizeEvent evt(self->GetClientSize()); - self->GetEventHandler()->ProcessEvent(evt); - } -static PyObject *_wrap_wxNotebook_ResizeChildren(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNotebook * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_ResizeChildren",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_ResizeChildren. Expected _wxNotebook_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxNotebook_ResizeChildren(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxSplitterEventTowxCommandEvent(void *ptr) { - wxSplitterEvent *src; - wxCommandEvent *dest; - src = (wxSplitterEvent *) ptr; - dest = (wxCommandEvent *) src; - return (void *) dest; -} - -static void *SwigwxSplitterEventTowxEvent(void *ptr) { - wxSplitterEvent *src; - wxEvent *dest; - src = (wxSplitterEvent *) ptr; - dest = (wxEvent *) src; - return (void *) dest; -} - -#define wxSplitterEvent_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) -static PyObject *_wrap_wxSplitterEvent_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetSashPosition",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetSashPosition. Expected _wxSplitterEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterEvent_GetSashPosition(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterEvent_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxSplitterEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetX",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetX. Expected _wxSplitterEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterEvent_GetX(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterEvent_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxSplitterEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetY",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetY. Expected _wxSplitterEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterEvent_GetY(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterEvent_GetWindowBeingRemoved(_swigobj) (_swigobj->GetWindowBeingRemoved()) -static PyObject *_wrap_wxSplitterEvent_GetWindowBeingRemoved(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxSplitterEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetWindowBeingRemoved",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetWindowBeingRemoved. Expected _wxSplitterEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxSplitterEvent_SetSashPosition(_swigobj,_swigarg0) (_swigobj->SetSashPosition(_swigarg0)) -static PyObject *_wrap_wxSplitterEvent_SetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterEvent * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","pos", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterEvent_SetSashPosition",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_SetSashPosition. Expected _wxSplitterEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSplitterEvent_SetSashPosition(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void *SwigwxSplitterWindowTowxWindow(void *ptr) { - wxSplitterWindow *src; - wxWindow *dest; - src = (wxSplitterWindow *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxSplitterWindowTowxEvtHandler(void *ptr) { - wxSplitterWindow *src; - wxEvtHandler *dest; - src = (wxSplitterWindow *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -#define new_wxSplitterWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxSplitterWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) -static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterWindow * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; - long _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN; - char * _arg5 = (char *) "splitterWindow"; - PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj2 = 0; - wxSize temp0; - PyObject * _obj3 = 0; - char *_kwnames[] = { "parent","id","point","size","style","name", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSplitterWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSplitterWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_obj2) -{ - _arg2 = &temp; - if (! wxPoint_helper(_obj2, &_arg2)) - return NULL; -} - if (_obj3) -{ - _arg3 = &temp0; - if (! wxSize_helper(_obj3, &_arg3)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSplitterWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxSplitterWindow_GetBorderSize(_swigobj) (_swigobj->GetBorderSize()) -static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetBorderSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetBorderSize. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetBorderSize(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_GetMinimumPaneSize(_swigobj) (_swigobj->GetMinimumPaneSize()) -static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetMinimumPaneSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetMinimumPaneSize. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) -static PyObject *_wrap_wxSplitterWindow_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashPosition",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashPosition. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetSashPosition(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_GetSashSize(_swigobj) (_swigobj->GetSashSize()) -static PyObject *_wrap_wxSplitterWindow_GetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashSize. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetSashSize(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_GetSplitMode(_swigobj) (_swigobj->GetSplitMode()) -static PyObject *_wrap_wxSplitterWindow_GetSplitMode(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSplitMode",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSplitMode. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSplitterWindow_GetSplitMode(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_GetWindow1(_swigobj) (_swigobj->GetWindow1()) -static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow1",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow1. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxSplitterWindow_GetWindow2(_swigobj) (_swigobj->GetWindow2()) -static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow2",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow2. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxSplitterWindow_Initialize(_swigobj,_swigarg0) (_swigobj->Initialize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_Initialize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterWindow * _arg0; - wxWindow * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","window", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSplitterWindow_Initialize",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Initialize. Expected _wxSplitterWindow_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Initialize. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_Initialize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSplitterWindow_IsSplit(_swigobj) (_swigobj->IsSplit()) -static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxSplitterWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_IsSplit",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_IsSplit. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_IsSplit(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_ReplaceWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReplaceWindow(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxSplitterWindow * _arg0; - wxWindow * _arg1; - wxWindow * _arg2; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","winOld","winNew", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxSplitterWindow_ReplaceWindow",_kwnames,&_argo0,&_argo1,&_argo2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_ReplaceWindow. Expected _wxSplitterWindow_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_SetBorderSize(_swigobj,_swigarg0) (_swigobj->SetBorderSize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterWindow * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","width", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetBorderSize",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetBorderSize. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetBorderSize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSplitterWindow_SetSashPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSashPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterWindow * _arg0; - int _arg1; - int _arg2 = (int ) TRUE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","position","redraw", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxSplitterWindow_SetSashPosition",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashPosition. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSplitterWindow_SetSashSize(_swigobj,_swigarg0) (_swigobj->SetSashSize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterWindow * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","width", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSashSize",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashSize. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetSashSize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSplitterWindow_SetMinimumPaneSize(_swigobj,_swigarg0) (_swigobj->SetMinimumPaneSize(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterWindow * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","paneSize", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetMinimumPaneSize",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetMinimumPaneSize. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSplitterWindow_SetSplitMode(_swigobj,_swigarg0) (_swigobj->SetSplitMode(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_SetSplitMode(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSplitterWindow * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","mode", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSplitMode",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSplitMode. Expected _wxSplitterWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSplitterWindow_SetSplitMode(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxSplitterWindow_SplitHorizontally(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitHorizontally(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxSplitterWindow * _arg0; - wxWindow * _arg1; - wxWindow * _arg2; - int _arg3 = (int ) 0; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitHorizontally",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitHorizontally. Expected _wxSplitterWindow_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_SplitVertically(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitVertically(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxSplitterWindow_SplitVertically(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxSplitterWindow * _arg0; - wxWindow * _arg1; - wxWindow * _arg2; - int _arg3 = (int ) 0; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitVertically",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitVertically. Expected _wxSplitterWindow_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxSplitterWindow_Unsplit(_swigobj,_swigarg0) (_swigobj->Unsplit(_swigarg0)) -static PyObject *_wrap_wxSplitterWindow_Unsplit(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxSplitterWindow * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","toRemove", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxSplitterWindow_Unsplit",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Unsplit. Expected _wxSplitterWindow_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Unsplit. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyMethodDef windows2cMethods[] = { - { "wxSplitterWindow_Unsplit", (PyCFunction) _wrap_wxSplitterWindow_Unsplit, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SplitVertically", (PyCFunction) _wrap_wxSplitterWindow_SplitVertically, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SplitHorizontally", (PyCFunction) _wrap_wxSplitterWindow_SplitHorizontally, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_SetSplitMode, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_SetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SetSashSize", (PyCFunction) _wrap_wxSplitterWindow_SetSashSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_SetSashPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_SetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_SetBorderSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_ReplaceWindow", (PyCFunction) _wrap_wxSplitterWindow_ReplaceWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_IsSplit", (PyCFunction) _wrap_wxSplitterWindow_IsSplit, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_Initialize", (PyCFunction) _wrap_wxSplitterWindow_Initialize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetWindow2", (PyCFunction) _wrap_wxSplitterWindow_GetWindow2, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetWindow1", (PyCFunction) _wrap_wxSplitterWindow_GetWindow1, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_GetSplitMode, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetSashSize", (PyCFunction) _wrap_wxSplitterWindow_GetSashSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_GetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterWindow_GetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_GetBorderSize, METH_VARARGS | METH_KEYWORDS }, - { "new_wxSplitterWindow", (PyCFunction) _wrap_new_wxSplitterWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterEvent_SetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_SetSashPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterEvent_GetWindowBeingRemoved", (PyCFunction) _wrap_wxSplitterEvent_GetWindowBeingRemoved, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterEvent_GetY", (PyCFunction) _wrap_wxSplitterEvent_GetY, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterEvent_GetX", (PyCFunction) _wrap_wxSplitterEvent_GetX, METH_VARARGS | METH_KEYWORDS }, - { "wxSplitterEvent_GetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_ResizeChildren", (PyCFunction) _wrap_wxNotebook_ResizeChildren, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetPage", (PyCFunction) _wrap_wxNotebook_GetPage, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_AddPage", (PyCFunction) _wrap_wxNotebook_AddPage, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_DeleteAllPages", (PyCFunction) _wrap_wxNotebook_DeleteAllPages, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_RemovePage", (PyCFunction) _wrap_wxNotebook_RemovePage, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_DeletePage", (PyCFunction) _wrap_wxNotebook_DeletePage, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetRowCount", (PyCFunction) _wrap_wxNotebook_GetRowCount, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_SetPageImage", (PyCFunction) _wrap_wxNotebook_SetPageImage, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetPageImage", (PyCFunction) _wrap_wxNotebook_GetPageImage, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetImageList", (PyCFunction) _wrap_wxNotebook_GetImageList, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_SetImageList", (PyCFunction) _wrap_wxNotebook_SetImageList, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetPageText", (PyCFunction) _wrap_wxNotebook_GetPageText, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_SetPageText", (PyCFunction) _wrap_wxNotebook_SetPageText, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetSelection", (PyCFunction) _wrap_wxNotebook_GetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_AdvanceSelection", (PyCFunction) _wrap_wxNotebook_AdvanceSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_SetSelection", (PyCFunction) _wrap_wxNotebook_SetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetPageCount", (PyCFunction) _wrap_wxNotebook_GetPageCount, METH_VARARGS | METH_KEYWORDS }, - { "new_wxNotebook", (PyCFunction) _wrap_new_wxNotebook, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebookEvent_SetSelection", (PyCFunction) _wrap_wxNotebookEvent_SetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebookEvent_SetOldSelection", (PyCFunction) _wrap_wxNotebookEvent_SetOldSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebookEvent_GetOldSelection", (PyCFunction) _wrap_wxNotebookEvent_GetOldSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebookEvent_GetSelection", (PyCFunction) _wrap_wxNotebookEvent_GetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_GetCell", (PyCFunction) _wrap_wxGridEvent_GetCell, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_ShiftDown", (PyCFunction) _wrap_wxGridEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_ControlDown", (PyCFunction) _wrap_wxGridEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_GetPosition", (PyCFunction) _wrap_wxGridEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_GetCol", (PyCFunction) _wrap_wxGridEvent_GetCol, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_GetRow", (PyCFunction) _wrap_wxGridEvent_GetRow, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_cell_get", (PyCFunction) _wrap_wxGridEvent_m_cell_get, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_cell_set", (PyCFunction) _wrap_wxGridEvent_m_cell_set, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_shift_get", (PyCFunction) _wrap_wxGridEvent_m_shift_get, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_shift_set", (PyCFunction) _wrap_wxGridEvent_m_shift_set, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_control_get", (PyCFunction) _wrap_wxGridEvent_m_control_get, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_control_set", (PyCFunction) _wrap_wxGridEvent_m_control_set, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_y_get", (PyCFunction) _wrap_wxGridEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_y_set", (PyCFunction) _wrap_wxGridEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_x_get", (PyCFunction) _wrap_wxGridEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_x_set", (PyCFunction) _wrap_wxGridEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_col_get", (PyCFunction) _wrap_wxGridEvent_m_col_get, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_col_set", (PyCFunction) _wrap_wxGridEvent_m_col_set, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_row_get", (PyCFunction) _wrap_wxGridEvent_m_row_get, METH_VARARGS | METH_KEYWORDS }, - { "wxGridEvent_m_row_set", (PyCFunction) _wrap_wxGridEvent_m_row_set, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetEditInPlace", (PyCFunction) _wrap_wxGrid_SetEditInPlace, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetEditInPlace", (PyCFunction) _wrap_wxGrid_GetEditInPlace, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_UpdateDimensions", (PyCFunction) _wrap_wxGrid_UpdateDimensions, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetRowHeight", (PyCFunction) _wrap_wxGrid_SetRowHeight, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetLabelValue", (PyCFunction) _wrap_wxGrid_SetLabelValue, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetLabelTextFont", (PyCFunction) _wrap_wxGrid_SetLabelTextFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetLabelTextColour", (PyCFunction) _wrap_wxGrid_SetLabelTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetLabelSize", (PyCFunction) _wrap_wxGrid_SetLabelSize, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetLabelBackgroundColour", (PyCFunction) _wrap_wxGrid_SetLabelBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetLabelAlignment", (PyCFunction) _wrap_wxGrid_SetLabelAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetGridCursor", (PyCFunction) _wrap_wxGrid_SetGridCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetEditable", (PyCFunction) _wrap_wxGrid_SetEditable, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetDividerPen", (PyCFunction) _wrap_wxGrid_SetDividerPen, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetColumnWidth", (PyCFunction) _wrap_wxGrid_SetColumnWidth, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetCellValue", (PyCFunction) _wrap_wxGrid_SetCellValue, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetDefCellTextFont", (PyCFunction) _wrap_wxGrid_SetDefCellTextFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetCellTextFont", (PyCFunction) _wrap_wxGrid_SetCellTextFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetDefCellTextColour", (PyCFunction) _wrap_wxGrid_SetDefCellTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetCellTextColour", (PyCFunction) _wrap_wxGrid_SetCellTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetDefCellBackgroundColour", (PyCFunction) _wrap_wxGrid_SetDefCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetCellBackgroundColour", (PyCFunction) _wrap_wxGrid_SetCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetDefCellAlignment", (PyCFunction) _wrap_wxGrid_SetDefCellAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_SetCellAlignment", (PyCFunction) _wrap_wxGrid_SetCellAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_OnActivate", (PyCFunction) _wrap_wxGrid_OnActivate, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_InsertRows", (PyCFunction) _wrap_wxGrid_InsertRows, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_InsertCols", (PyCFunction) _wrap_wxGrid_InsertCols, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetVertScrollBar", (PyCFunction) _wrap_wxGrid_GetVertScrollBar, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetTextItem", (PyCFunction) _wrap_wxGrid_GetTextItem, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetScrollPosY", (PyCFunction) _wrap_wxGrid_GetScrollPosY, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetScrollPosX", (PyCFunction) _wrap_wxGrid_GetScrollPosX, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetRows", (PyCFunction) _wrap_wxGrid_GetRows, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetRowHeight", (PyCFunction) _wrap_wxGrid_GetRowHeight, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetLabelValue", (PyCFunction) _wrap_wxGrid_GetLabelValue, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetLabelTextFont", (PyCFunction) _wrap_wxGrid_GetLabelTextFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetLabelTextColour", (PyCFunction) _wrap_wxGrid_GetLabelTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetLabelSize", (PyCFunction) _wrap_wxGrid_GetLabelSize, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetLabelBackgroundColour", (PyCFunction) _wrap_wxGrid_GetLabelBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetLabelAlignment", (PyCFunction) _wrap_wxGrid_GetLabelAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetHorizScrollBar", (PyCFunction) _wrap_wxGrid_GetHorizScrollBar, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetEditable", (PyCFunction) _wrap_wxGrid_GetEditable, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCursorRow", (PyCFunction) _wrap_wxGrid_GetCursorRow, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCursorColumn", (PyCFunction) _wrap_wxGrid_GetCursorColumn, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCurrentRect", (PyCFunction) _wrap_wxGrid_GetCurrentRect, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetColumnWidth", (PyCFunction) _wrap_wxGrid_GetColumnWidth, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCols", (PyCFunction) _wrap_wxGrid_GetCols, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCellValue", (PyCFunction) _wrap_wxGrid_GetCellValue, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetDefCellTextFont", (PyCFunction) _wrap_wxGrid_GetDefCellTextFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCellTextFont", (PyCFunction) _wrap_wxGrid_GetCellTextFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetDefCellTextColour", (PyCFunction) _wrap_wxGrid_GetDefCellTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCellTextColour", (PyCFunction) _wrap_wxGrid_GetCellTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCells", (PyCFunction) _wrap_wxGrid_GetCells, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetDefCellBackgroundColour", (PyCFunction) _wrap_wxGrid_GetDefCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCellBackgroundColour", (PyCFunction) _wrap_wxGrid_GetCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetDefCellAlignment", (PyCFunction) _wrap_wxGrid_GetDefCellAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCellAlignment", (PyCFunction) _wrap_wxGrid_GetCellAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetCell", (PyCFunction) _wrap_wxGrid_GetCell, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_GetBatchCount", (PyCFunction) _wrap_wxGrid_GetBatchCount, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_EndBatch", (PyCFunction) _wrap_wxGrid_EndBatch, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_DeleteRows", (PyCFunction) _wrap_wxGrid_DeleteRows, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_DeleteCols", (PyCFunction) _wrap_wxGrid_DeleteCols, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_CurrentCellVisible", (PyCFunction) _wrap_wxGrid_CurrentCellVisible, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_CreateGrid", (PyCFunction) _wrap_wxGrid_CreateGrid, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_CellHitTest", (PyCFunction) _wrap_wxGrid_CellHitTest, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_BeginBatch", (PyCFunction) _wrap_wxGrid_BeginBatch, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_AppendRows", (PyCFunction) _wrap_wxGrid_AppendRows, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_AppendCols", (PyCFunction) _wrap_wxGrid_AppendCols, METH_VARARGS | METH_KEYWORDS }, - { "wxGrid_AdjustScrollbars", (PyCFunction) _wrap_wxGrid_AdjustScrollbars, METH_VARARGS | METH_KEYWORDS }, - { "new_wxGrid", (PyCFunction) _wrap_new_wxGrid, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_SetCellBitmap", (PyCFunction) _wrap_wxGridCell_SetCellBitmap, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_GetCellBitmap", (PyCFunction) _wrap_wxGridCell_GetCellBitmap, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_SetAlignment", (PyCFunction) _wrap_wxGridCell_SetAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_GetAlignment", (PyCFunction) _wrap_wxGridCell_GetAlignment, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_GetBackgroundBrush", (PyCFunction) _wrap_wxGridCell_GetBackgroundBrush, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_SetBackgroundColour", (PyCFunction) _wrap_wxGridCell_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_GetBackgroundColour", (PyCFunction) _wrap_wxGridCell_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_SetTextColour", (PyCFunction) _wrap_wxGridCell_SetTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_GetTextColour", (PyCFunction) _wrap_wxGridCell_GetTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_SetFont", (PyCFunction) _wrap_wxGridCell_SetFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_GetFont", (PyCFunction) _wrap_wxGridCell_GetFont, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_SetTextValue", (PyCFunction) _wrap_wxGridCell_SetTextValue, METH_VARARGS | METH_KEYWORDS }, - { "wxGridCell_GetTextValue", (PyCFunction) _wrap_wxGridCell_GetTextValue, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxGridCell", (PyCFunction) _wrap_delete_wxGridCell, METH_VARARGS | METH_KEYWORDS }, - { "new_wxGridCell", (PyCFunction) _wrap_new_wxGridCell, METH_VARARGS | METH_KEYWORDS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, - { "_wxEvent","_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, - { "_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, - { "_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, - { "_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent}, - { "_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, - { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxPrintQuality","_wxCoord",0}, - { "_wxPrintQuality","_int",0}, - { "_wxPrintQuality","_signed_int",0}, - { "_wxPrintQuality","_unsigned_int",0}, - { "_wxPrintQuality","_wxWindowID",0}, - { "_wxPrintQuality","_uint",0}, - { "_wxPrintQuality","_EBool",0}, - { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxEvtHandler","_class_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, - { "_class_wxEvtHandler","_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, - { "_class_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler}, - { "_class_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler}, - { "_class_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler}, - { "_class_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, - { "_wxNotifyEvent","_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxGrid","_class_wxGrid",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, - { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_size_t","_wxCoord",0}, - { "_size_t","_wxPrintQuality",0}, - { "_size_t","_unsigned_int",0}, - { "_size_t","_int",0}, - { "_size_t","_wxWindowID",0}, - { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxGrid",SwigwxGridTowxPanel}, - { "_wxPanel","_wxGrid",SwigwxGridTowxPanel}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxGrid","_wxGrid",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_uint","_wxCoord",0}, - { "_uint","_wxPrintQuality",0}, - { "_uint","_size_t",0}, - { "_uint","_unsigned_int",0}, - { "_uint","_int",0}, - { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, - { "_class_wxEvent","_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, - { "_class_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, - { "_class_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, - { "_class_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent}, - { "_class_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxGridEvent","_class_wxGridEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, - { "_wxCommandEvent","_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, - { "_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, - { "_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, - { "_class_wxNotifyEvent","_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_EBool","_wxCoord",0}, - { "_EBool","_wxPrintQuality",0}, - { "_EBool","_signed_int",0}, - { "_EBool","_int",0}, - { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_class_wxGrid",SwigwxGridTowxPanel}, - { "_class_wxPanel","_wxGrid",SwigwxGridTowxPanel}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_signed_int","_wxCoord",0}, - { "_signed_int","_wxPrintQuality",0}, - { "_signed_int","_EBool",0}, - { "_signed_int","_wxWindowID",0}, - { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_WXTYPE","_short",0}, - { "_WXTYPE","_signed_short",0}, - { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, - { "_unsigned_short","_WXTYPE",0}, - { "_unsigned_short","_short",0}, - { "_class_wxWindow","_class_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, - { "_class_wxWindow","_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, - { "_class_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow}, - { "_class_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow}, - { "_class_wxWindow","_class_wxGrid",SwigwxGridTowxWindow}, - { "_class_wxWindow","_wxGrid",SwigwxGridTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_wxGridCell","_class_wxGridCell",0}, - { "_signed_short","_WXTYPE",0}, - { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl}, - { "_wxControl","_wxNotebook",SwigwxNotebookTowxControl}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, - { "_unsigned_int","_wxCoord",0}, - { "_unsigned_int","_wxPrintQuality",0}, - { "_unsigned_int","_size_t",0}, - { "_unsigned_int","_uint",0}, - { "_unsigned_int","_wxWindowID",0}, - { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, - { "_short","_WXTYPE",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxWindowID","_wxCoord",0}, - { "_wxWindowID","_wxPrintQuality",0}, - { "_wxWindowID","_size_t",0}, - { "_wxWindowID","_EBool",0}, - { "_wxWindowID","_uint",0}, - { "_wxWindowID","_int",0}, - { "_wxWindowID","_signed_int",0}, - { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_int","_wxCoord",0}, - { "_int","_wxPrintQuality",0}, - { "_int","_size_t",0}, - { "_int","_EBool",0}, - { "_int","_uint",0}, - { "_int","_wxWindowID",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl}, - { "_class_wxControl","_wxNotebook",SwigwxNotebookTowxControl}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, - { "_wxCoord","_int",0}, - { "_wxCoord","_signed_int",0}, - { "_wxCoord","_unsigned_int",0}, - { "_wxCoord","_wxWindowID",0}, - { "_wxCoord","_uint",0}, - { "_wxCoord","_EBool",0}, - { "_wxCoord","_size_t",0}, - { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxGridEvent","_wxGridEvent",0}, - { "_class_wxCommandEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, - { "_class_wxCommandEvent","_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, - { "_class_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, - { "_class_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxGridCell","_wxGridCell",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxEvtHandler","_class_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, - { "_wxEvtHandler","_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, - { "_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler}, - { "_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler}, - { "_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler}, - { "_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_wxWindow","_class_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, - { "_wxWindow","_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, - { "_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow}, - { "_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow}, - { "_wxWindow","_class_wxGrid",SwigwxGridTowxWindow}, - { "_wxWindow","_wxGrid",SwigwxGridTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initwindows2c() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("windows2c", windows2cMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxGRID_TEXT_CTRL", PyInt_FromLong((long) wxGRID_TEXT_CTRL)); - PyDict_SetItemString(d,"wxGRID_HSCROLL", PyInt_FromLong((long) wxGRID_HSCROLL)); - PyDict_SetItemString(d,"wxGRID_VSCROLL", PyInt_FromLong((long) wxGRID_VSCROLL)); - PyDict_SetItemString(d,"wxEVT_GRID_SELECT_CELL", PyInt_FromLong((long) wxEVT_GRID_SELECT_CELL)); - PyDict_SetItemString(d,"wxEVT_GRID_CREATE_CELL", PyInt_FromLong((long) wxEVT_GRID_CREATE_CELL)); - PyDict_SetItemString(d,"wxEVT_GRID_CHANGE_LABELS", PyInt_FromLong((long) wxEVT_GRID_CHANGE_LABELS)); - PyDict_SetItemString(d,"wxEVT_GRID_CHANGE_SEL_LABEL", PyInt_FromLong((long) wxEVT_GRID_CHANGE_SEL_LABEL)); - PyDict_SetItemString(d,"wxEVT_GRID_CELL_CHANGE", PyInt_FromLong((long) wxEVT_GRID_CELL_CHANGE)); - PyDict_SetItemString(d,"wxEVT_GRID_CELL_LCLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_LCLICK)); - PyDict_SetItemString(d,"wxEVT_GRID_CELL_RCLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_RCLICK)); - PyDict_SetItemString(d,"wxEVT_GRID_LABEL_LCLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_LCLICK)); - PyDict_SetItemString(d,"wxEVT_GRID_LABEL_RCLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_RCLICK)); -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/src/gtk/windows2.py b/utils/wxPython/src/gtk/windows2.py deleted file mode 100644 index fba23472ae..0000000000 --- a/utils/wxPython/src/gtk/windows2.py +++ /dev/null @@ -1,600 +0,0 @@ -# This file was created automatically by SWIG. -import windows2c - -from misc import * - -from gdi import * - -from windows import * - -from clip_dnd import * - -from controls import * - -from events import * -import wx -class wxGridCellPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,windows2c=windows2c): - if self.thisown == 1 : - windows2c.delete_wxGridCell(self) - def GetTextValue(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_GetTextValue,(self,) + _args, _kwargs) - return val - def SetTextValue(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_SetTextValue,(self,) + _args, _kwargs) - return val - def GetFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_GetFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) - return val - def SetFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_SetFont,(self,) + _args, _kwargs) - return val - def GetTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def SetTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_SetTextColour,(self,) + _args, _kwargs) - return val - def GetBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_GetBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def SetBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_SetBackgroundColour,(self,) + _args, _kwargs) - return val - def GetBackgroundBrush(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_GetBackgroundBrush,(self,) + _args, _kwargs) - if val: val = wxBrushPtr(val) - return val - def GetAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_GetAlignment,(self,) + _args, _kwargs) - return val - def SetAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_SetAlignment,(self,) + _args, _kwargs) - return val - def GetCellBitmap(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_GetCellBitmap,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) - return val - def SetCellBitmap(self, *_args, **_kwargs): - val = apply(windows2c.wxGridCell_SetCellBitmap,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxGridCell(wxGridCellPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(windows2c.new_wxGridCell,_args,_kwargs) - self.thisown = 1 - - - - -class wxGridPtr(wxPanelPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def AdjustScrollbars(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_AdjustScrollbars,(self,) + _args, _kwargs) - return val - def AppendCols(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_AppendCols,(self,) + _args, _kwargs) - return val - def AppendRows(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_AppendRows,(self,) + _args, _kwargs) - return val - def BeginBatch(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_BeginBatch,(self,) + _args, _kwargs) - return val - def CellHitTest(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_CellHitTest,(self,) + _args, _kwargs) - return val - def CreateGrid(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_CreateGrid,(self,) + _args, _kwargs) - return val - def CurrentCellVisible(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_CurrentCellVisible,(self,) + _args, _kwargs) - return val - def DeleteCols(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_DeleteCols,(self,) + _args, _kwargs) - return val - def DeleteRows(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_DeleteRows,(self,) + _args, _kwargs) - return val - def EndBatch(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_EndBatch,(self,) + _args, _kwargs) - return val - def GetBatchCount(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetBatchCount,(self,) + _args, _kwargs) - return val - def GetCell(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCell,(self,) + _args, _kwargs) - if val: val = wxGridCellPtr(val) - return val - def GetCellAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCellAlignment,(self,) + _args, _kwargs) - return val - def GetDefCellAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetDefCellAlignment,(self,) + _args, _kwargs) - return val - def GetCellBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCellBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def GetDefCellBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetDefCellBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def GetCells(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCells,(self,) + _args, _kwargs) - return val - def GetCellTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCellTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def GetDefCellTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetDefCellTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def GetCellTextFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCellTextFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) - return val - def GetDefCellTextFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetDefCellTextFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) - return val - def GetCellValue(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCellValue,(self,) + _args, _kwargs) - return val - def GetCols(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCols,(self,) + _args, _kwargs) - return val - def GetColumnWidth(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetColumnWidth,(self,) + _args, _kwargs) - return val - def GetCurrentRect(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCurrentRect,(self,) + _args, _kwargs) - if val: val = wxRectPtr(val) ; val.thisown = 1 - return val - def GetCursorColumn(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCursorColumn,(self,) + _args, _kwargs) - return val - def GetCursorRow(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetCursorRow,(self,) + _args, _kwargs) - return val - def GetEditable(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetEditable,(self,) + _args, _kwargs) - return val - def GetHorizScrollBar(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetHorizScrollBar,(self,) + _args, _kwargs) - if val: val = wxScrollBarPtr(val) - return val - def GetLabelAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetLabelAlignment,(self,) + _args, _kwargs) - return val - def GetLabelBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetLabelBackgroundColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def GetLabelSize(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetLabelSize,(self,) + _args, _kwargs) - return val - def GetLabelTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetLabelTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) - return val - def GetLabelTextFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetLabelTextFont,(self,) + _args, _kwargs) - if val: val = wxFontPtr(val) - return val - def GetLabelValue(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetLabelValue,(self,) + _args, _kwargs) - return val - def GetRowHeight(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetRowHeight,(self,) + _args, _kwargs) - return val - def GetRows(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetRows,(self,) + _args, _kwargs) - return val - def GetScrollPosX(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetScrollPosX,(self,) + _args, _kwargs) - return val - def GetScrollPosY(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetScrollPosY,(self,) + _args, _kwargs) - return val - def GetTextItem(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetTextItem,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) - return val - def GetVertScrollBar(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetVertScrollBar,(self,) + _args, _kwargs) - if val: val = wxScrollBarPtr(val) - return val - def InsertCols(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_InsertCols,(self,) + _args, _kwargs) - return val - def InsertRows(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_InsertRows,(self,) + _args, _kwargs) - return val - def OnActivate(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_OnActivate,(self,) + _args, _kwargs) - return val - def SetCellAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetCellAlignment,(self,) + _args, _kwargs) - return val - def SetDefCellAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetDefCellAlignment,(self,) + _args, _kwargs) - return val - def SetCellBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetCellBackgroundColour,(self,) + _args, _kwargs) - return val - def SetDefCellBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetDefCellBackgroundColour,(self,) + _args, _kwargs) - return val - def SetCellTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetCellTextColour,(self,) + _args, _kwargs) - return val - def SetDefCellTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetDefCellTextColour,(self,) + _args, _kwargs) - return val - def SetCellTextFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetCellTextFont,(self,) + _args, _kwargs) - return val - def SetDefCellTextFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetDefCellTextFont,(self,) + _args, _kwargs) - return val - def SetCellValue(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetCellValue,(self,) + _args, _kwargs) - return val - def SetColumnWidth(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetColumnWidth,(self,) + _args, _kwargs) - return val - def SetDividerPen(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetDividerPen,(self,) + _args, _kwargs) - return val - def SetEditable(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetEditable,(self,) + _args, _kwargs) - return val - def SetGridCursor(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetGridCursor,(self,) + _args, _kwargs) - return val - def SetLabelAlignment(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetLabelAlignment,(self,) + _args, _kwargs) - return val - def SetLabelBackgroundColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetLabelBackgroundColour,(self,) + _args, _kwargs) - return val - def SetLabelSize(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetLabelSize,(self,) + _args, _kwargs) - return val - def SetLabelTextColour(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetLabelTextColour,(self,) + _args, _kwargs) - return val - def SetLabelTextFont(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetLabelTextFont,(self,) + _args, _kwargs) - return val - def SetLabelValue(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetLabelValue,(self,) + _args, _kwargs) - return val - def SetRowHeight(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetRowHeight,(self,) + _args, _kwargs) - return val - def UpdateDimensions(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_UpdateDimensions,(self,) + _args, _kwargs) - return val - def GetEditInPlace(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_GetEditInPlace,(self,) + _args, _kwargs) - return val - def SetEditInPlace(self, *_args, **_kwargs): - val = apply(windows2c.wxGrid_SetEditInPlace,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxGrid(wxGridPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(windows2c.new_wxGrid,_args,_kwargs) - self.thisown = 1 - wx._StdWindowCallbacks(self) - wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL) - wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL) - wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS) - wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL) - wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE) - wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK) - wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK) - wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK) - wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK) - - - - -class wxGridEventPtr(wxEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetRow(self, *_args, **_kwargs): - val = apply(windows2c.wxGridEvent_GetRow,(self,) + _args, _kwargs) - return val - def GetCol(self, *_args, **_kwargs): - val = apply(windows2c.wxGridEvent_GetCol,(self,) + _args, _kwargs) - return val - def GetPosition(self, *_args, **_kwargs): - val = apply(windows2c.wxGridEvent_GetPosition,(self,) + _args, _kwargs) - if val: val = wxPointPtr(val) ; val.thisown = 1 - return val - def ControlDown(self, *_args, **_kwargs): - val = apply(windows2c.wxGridEvent_ControlDown,(self,) + _args, _kwargs) - return val - def ShiftDown(self, *_args, **_kwargs): - val = apply(windows2c.wxGridEvent_ShiftDown,(self,) + _args, _kwargs) - return val - def GetCell(self, *_args, **_kwargs): - val = apply(windows2c.wxGridEvent_GetCell,(self,) + _args, _kwargs) - if val: val = wxGridCellPtr(val) - return val - def __setattr__(self,name,value): - if name == "m_row" : - windows2c.wxGridEvent_m_row_set(self,value) - return - if name == "m_col" : - windows2c.wxGridEvent_m_col_set(self,value) - return - if name == "m_x" : - windows2c.wxGridEvent_m_x_set(self,value) - return - if name == "m_y" : - windows2c.wxGridEvent_m_y_set(self,value) - return - if name == "m_control" : - windows2c.wxGridEvent_m_control_set(self,value) - return - if name == "m_shift" : - windows2c.wxGridEvent_m_shift_set(self,value) - return - if name == "m_cell" : - windows2c.wxGridEvent_m_cell_set(self,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_row" : - return windows2c.wxGridEvent_m_row_get(self) - if name == "m_col" : - return windows2c.wxGridEvent_m_col_get(self) - if name == "m_x" : - return windows2c.wxGridEvent_m_x_get(self) - if name == "m_y" : - return windows2c.wxGridEvent_m_y_get(self) - if name == "m_control" : - return windows2c.wxGridEvent_m_control_get(self) - if name == "m_shift" : - return windows2c.wxGridEvent_m_shift_get(self) - if name == "m_cell" : - return wxGridCellPtr(windows2c.wxGridEvent_m_cell_get(self)) - raise AttributeError,name - def __repr__(self): - return "" % (self.this,) -class wxGridEvent(wxGridEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxNotebookEventPtr(wxNotifyEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSelection(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebookEvent_GetSelection,(self,) + _args, _kwargs) - return val - def GetOldSelection(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebookEvent_GetOldSelection,(self,) + _args, _kwargs) - return val - def SetOldSelection(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebookEvent_SetOldSelection,(self,) + _args, _kwargs) - return val - def SetSelection(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebookEvent_SetSelection,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxNotebookEvent(wxNotebookEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxNotebookPtr(wxControlPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPageCount(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_GetPageCount,(self,) + _args, _kwargs) - return val - def SetSelection(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_SetSelection,(self,) + _args, _kwargs) - return val - def AdvanceSelection(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_AdvanceSelection,(self,) + _args, _kwargs) - return val - def GetSelection(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_GetSelection,(self,) + _args, _kwargs) - return val - def SetPageText(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_SetPageText,(self,) + _args, _kwargs) - return val - def GetPageText(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_GetPageText,(self,) + _args, _kwargs) - return val - def SetImageList(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_SetImageList,(self,) + _args, _kwargs) - return val - def GetImageList(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_GetImageList,(self,) + _args, _kwargs) - if val: val = wxImageListPtr(val) - return val - def GetPageImage(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_GetPageImage,(self,) + _args, _kwargs) - return val - def SetPageImage(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_SetPageImage,(self,) + _args, _kwargs) - return val - def GetRowCount(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_GetRowCount,(self,) + _args, _kwargs) - return val - def DeletePage(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_DeletePage,(self,) + _args, _kwargs) - return val - def RemovePage(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_RemovePage,(self,) + _args, _kwargs) - return val - def DeleteAllPages(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_DeleteAllPages,(self,) + _args, _kwargs) - return val - def AddPage(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_AddPage,(self,) + _args, _kwargs) - return val - def GetPage(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_GetPage,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def ResizeChildren(self, *_args, **_kwargs): - val = apply(windows2c.wxNotebook_ResizeChildren,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxNotebook(wxNotebookPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(windows2c.new_wxNotebook,_args,_kwargs) - self.thisown = 1 - wx._StdWindowCallbacks(self) - - - - -class wxSplitterEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetSashPosition(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterEvent_GetSashPosition,(self,) + _args, _kwargs) - return val - def GetX(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterEvent_GetX,(self,) + _args, _kwargs) - return val - def GetY(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterEvent_GetY,(self,) + _args, _kwargs) - return val - def GetWindowBeingRemoved(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterEvent_GetWindowBeingRemoved,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def SetSashPosition(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterEvent_SetSashPosition,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxSplitterEvent(wxSplitterEventPtr): - def __init__(self,this): - self.this = this - - - - -class wxSplitterWindowPtr(wxWindowPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetBorderSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetBorderSize,(self,) + _args, _kwargs) - return val - def GetMinimumPaneSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetMinimumPaneSize,(self,) + _args, _kwargs) - return val - def GetSashPosition(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetSashPosition,(self,) + _args, _kwargs) - return val - def GetSashSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetSashSize,(self,) + _args, _kwargs) - return val - def GetSplitMode(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetSplitMode,(self,) + _args, _kwargs) - return val - def GetWindow1(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetWindow1,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def GetWindow2(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_GetWindow2,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def Initialize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_Initialize,(self,) + _args, _kwargs) - return val - def IsSplit(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs) - return val - def ReplaceWindow(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs) - return val - def SetBorderSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs) - return val - def SetSashPosition(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SetSashPosition,(self,) + _args, _kwargs) - return val - def SetSashSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SetSashSize,(self,) + _args, _kwargs) - return val - def SetMinimumPaneSize(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SetMinimumPaneSize,(self,) + _args, _kwargs) - return val - def SetSplitMode(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SetSplitMode,(self,) + _args, _kwargs) - return val - def SplitHorizontally(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SplitHorizontally,(self,) + _args, _kwargs) - return val - def SplitVertically(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_SplitVertically,(self,) + _args, _kwargs) - return val - def Unsplit(self, *_args, **_kwargs): - val = apply(windows2c.wxSplitterWindow_Unsplit,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxSplitterWindow(wxSplitterWindowPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(windows2c.new_wxSplitterWindow,_args,_kwargs) - self.thisown = 1 - wx._StdWindowCallbacks(self) - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxGRID_TEXT_CTRL = windows2c.wxGRID_TEXT_CTRL -wxGRID_HSCROLL = windows2c.wxGRID_HSCROLL -wxGRID_VSCROLL = windows2c.wxGRID_VSCROLL -wxEVT_GRID_SELECT_CELL = windows2c.wxEVT_GRID_SELECT_CELL -wxEVT_GRID_CREATE_CELL = windows2c.wxEVT_GRID_CREATE_CELL -wxEVT_GRID_CHANGE_LABELS = windows2c.wxEVT_GRID_CHANGE_LABELS -wxEVT_GRID_CHANGE_SEL_LABEL = windows2c.wxEVT_GRID_CHANGE_SEL_LABEL -wxEVT_GRID_CELL_CHANGE = windows2c.wxEVT_GRID_CELL_CHANGE -wxEVT_GRID_CELL_LCLICK = windows2c.wxEVT_GRID_CELL_LCLICK -wxEVT_GRID_CELL_RCLICK = windows2c.wxEVT_GRID_CELL_RCLICK -wxEVT_GRID_LABEL_LCLICK = windows2c.wxEVT_GRID_LABEL_LCLICK -wxEVT_GRID_LABEL_RCLICK = windows2c.wxEVT_GRID_LABEL_RCLICK diff --git a/utils/wxPython/src/makefile.nt b/utils/wxPython/src/makefile.nt deleted file mode 100644 index 42d9af86b7..0000000000 --- a/utils/wxPython/src/makefile.nt +++ /dev/null @@ -1,339 +0,0 @@ -#---------------------------------------------------------------------------- -# Name: makefile.nt -# Purpose: Win32, VC++ 5 makefile for wxPython -# -# Author: Robin Dunn -# -# Created: 3/27/97 -# RCS-ID: $Id$ -# Copyright: (c) 1998 by Total Control Software -# Licence: wxWindows license -#---------------------------------------------------------------------------- -VERSION=0.5.4 - -# Set WXDIR to the root wxWindows directory for your system -WXDIR = $(WXWIN) - -# Set this to the root of the Python installation -PYTHONDIR=d:\Python - -# Set this to 1 for a non-debug, optimised compile -FINAL=0 - -# Set this to where you want the stuff installed at. It should -# be a directory contained in a PYTHONPATH directory, and should be -# named wxPython -TARGETDIR=.. - -# Set this to 1 for make to pre-compile the Python modules, 0 to -# just copy the sources and let Python compile them at the first -# runtime. -COMPILEPY=0 - -SEPARATE=0 - -#---------------------------------------------------------------------- - -WXUSINGDLL=0 -NOPCH=1 -THISDIR=$(WXDIR)\utils\wxPython - -EXTRALIBS=$(PYTHONDIR)\libs\python15.lib -EXTRAINC=-I$(PYTHONDIR)\include -I. -EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H -OVERRIDEFLAGS=/GX- - - -SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ -GENCODEDIR=msw - - -!include $(WXDIR)\src\ntwxwin.mak - -#---------------------------------------------------------------------- - -TARGET = wxc - -OBJECTS = wx.obj helpers.obj windows.obj events.obj \ - misc.obj gdi.obj mdi.obj controls.obj \ - controls2.obj windows2.obj cmndlgs.obj stattool.obj \ - frames.obj windows3.obj \ -!if "$(SEPARATE)" == "0" - utils.obj -!else - -TARGET2 = utilsc -OBJECTS2 = utils.obj -target2=$(TARGETDIR)\$(TARGET2).pyd -!endif - -PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \ - $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \ - $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \ - $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \ - $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \ - $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \ - $(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \ - $(TARGETDIR)\__init__.py - - -#---------------------------------------------------------------------- - -!if "$(FINAL)" == "0" -DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES -!else -DEBUGLFLAGS = /INCREMENTAL:NO -!endif - -LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \ - /machine:I386 /implib:./$(TARGET).lib /nologo - -LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \ - /machine:I386 /implib:./$(TARGET2).lib /nologo - -#---------------------------------------------------------------------- - -default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles - -all: wx $(TARGET) $(TARGET2) - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.nt FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.nt clean - cd $(THISDIR) - - -pycfiles : $(PYMODULES) -!if "$(COMPILEPY)" == "1" - $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR) - $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR) -!endif - -#---------------------------------------------------------------------- - -$(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res - $(link) @<< -/out:$@ /dll -$(LFLAGS) -$(DUMMYOBJ) $(OBJECTS) $(TARGET).res -$(LIBS) -<< - -$(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2) - $(link) @<< -/out:$@ /dll -$(LFLAGS2) -$(DUMMYOBJ) $(OBJECTS2) -$(LIBS) -<< - - -$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc - $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc - - - -# implicit rule for compiling .cpp files -{}.cpp{}.obj: - $(cc) @<< -$(CPPFLAGS) /c /Tp $< -<< - -{$(GENCODEDIR)}.cpp{}.obj: - $(cc) @<< -$(CPPFLAGS) /c /Tp $< -<< - - -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb - -erase *.pch - -erase $(TARGET).exp - -erase $(TARGET).lib - -erase $(TARGETDIR)\$(TARGET).* -!if "$(SEPARATE)" != "0" - -erase $(TARGET2).exp - -erase $(TARGET2).lib - -erase $(TARGETDIR)\$(TARGET2).* -!endif - -erase $(TARGETDIR)\$(TARGET).pyd - -erase $(TARGETDIR)\*.py - -erase $(TARGETDIR)\*.pyc - -erase $(TARGETDIR)\*.pyo - - - -#------------------------------------------------------------------------ - -.SUFFIXES : .i .py - -# Implicit rules to run SWIG -{}.i{$(GENCODEDIR)}.cpp: - swig $(SWIGFLAGS) -c -o $@ $< - -{}.i{$(GENCODEDIR)}.py: - swig $(SWIGFLAGS) -c -o $@ $< - - -{$(GENCODEDIR)}.py{$(TARGETDIR)}.py: - copy $< $@ - -{}.py{$(TARGETDIR)}.py: - copy $< $@ - -#{}.py{$(TARGETDIR)}.$(PYEXT): -# $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')" - - - - -# This one must leave out the -c flag so we define the whole rule -$(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py - swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i - - -# Define some dependencies. These MUST use forward slashes so SWIG -# will write the shadow file to the right directory. -$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i -$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i -$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i -$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i -$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i -$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i -$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i -$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i -$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i -$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i -$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i -$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i - -!if "$(SEPARATE)" == "1" -$(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i - swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i -!else -$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i -!endif - - -$(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py -$(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py -$(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py -$(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py -$(TARGETDIR)\events.py : $(GENCODEDIR)\events.py -$(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py -$(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py -$(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py -$(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py -$(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py -$(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py -$(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py -$(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py -$(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py -$(TARGETDIR)\__init__.py : __init__.py - - -SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \ - $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py \ - $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py \ - $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \ - $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \ - $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \ - $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \ - $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \ - $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \ - $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py\ - $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py \ - $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \ - $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \ - $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \ - - -sources : $(SOURCES) - - -dist: - cd ..\.. - wxPython\distrib\zipit.bat $(VERSION) - -#------------------------------------------------------------------------ -# -# $Log$ -# Revision 1.12 1999/06/28 21:39:47 VZ -# 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 -# -# Revision 1.11 1999/02/06 23:47:02 RD -# -# Changing makefile.nt to makefile.vc as in rest of wxWindows -# -# Revision 1.10 1999/02/01 00:10:40 RD -# -# Added the missing EVT_LIST_ITEM_SELECTED and friends. -# -# Revision 1.9 1999/01/30 07:30:13 RD -# -# Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc. -# -# Various cleanup, tweaks, minor additions, etc. to maintain -# compatibility with the current wxWindows. -# -# Revision 1.8 1998/12/21 19:58:06 RD -# -# Now compiles with /GX- on MSW. -# -# Revision 1.7 1998/12/15 20:41:20 RD -# Changed the import semantics from "from wxPython import *" to "from -# wxPython.wx import *" This is for people who are worried about -# namespace pollution, they can use "from wxPython import wx" and then -# prefix all the wxPython identifiers with "wx." -# -# Added wxTaskbarIcon for wxMSW. -# -# Made the events work for wxGrid. -# -# Added wxConfig. -# -# Added wxMiniFrame for wxGTK, (untested.) -# -# Changed many of the args and return values that were pointers to gdi -# objects to references to reflect changes in the wxWindows API. -# -# Other assorted fixes and additions. -# -# Revision 1.6 1998/10/02 06:40:41 RD -# -# Version 0.4 of wxPython for MSW. -# -# Revision 1.5 1998/08/19 00:38:23 RD -# -# A few tweaks -# -# Revision 1.4 1998/08/18 21:55:10 RD -# -# New build directory structure -# -# Revision 1.3 1998/08/15 07:36:37 RD -# - Moved the header in the .i files out of the code that gets put into -# the .cpp files. It caused CVS conflicts because of the RCS ID being -# different each time. -# -# - A few minor fixes. -# -# Revision 1.2 1998/08/14 03:34:23 RD -# made pre-compiling the python files optional -# -# Revision 1.1 1998/08/09 08:25:51 RD -# Initial version -# diff --git a/utils/wxPython/src/motif/dummy b/utils/wxPython/src/motif/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/msw/.cvsignore b/utils/wxPython/src/msw/.cvsignore deleted file mode 100644 index 5c511172dc..0000000000 --- a/utils/wxPython/src/msw/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.doc diff --git a/utils/wxPython/src/msw/dummy b/utils/wxPython/src/msw/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/msw/misc2.cpp b/utils/wxPython/src/msw/misc2.cpp deleted file mode 100644 index 813d3fec65..0000000000 --- a/utils/wxPython/src/msw/misc2.cpp +++ /dev/null @@ -1,2503 +0,0 @@ -/* - * FILE : msw/misc2.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a) __declspec(dllexport) a -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export -# else -# define SWIGEXPORT(a) a -# endif -# endif -#else -# define SWIGEXPORT(a) a -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -extern void SWIG_MakePtr(char *, void *, char *); -extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); -extern char *SWIG_GetPtr(char *, void **, char *); -extern char *SWIG_GetPtrObj(PyObject *, void **, char *); -extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); -extern PyObject *SWIG_newvarlink(void); -#ifdef __cplusplus -} -#endif -#define SWIG_init initmisc2c - -#define SWIG_name "misc2c" - -#include "helpers.h" -#include -#include -#include -#include - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - -static char* wxStringErrorMsg = "string type is required for parameter"; - - - wxColour wxSystemSettings_GetSystemColour(int index) { - return wxSystemSettings::GetSystemColour(index); - } - - wxFont wxSystemSettings_GetSystemFont(int index) { - return wxSystemSettings::GetSystemFont(index); - } - - int wxSystemSettings_GetSystemMetric(int index) { - return wxSystemSettings::GetSystemMetric(index); - } - - void wxToolTip_Enable(bool flag) { - wxToolTip::Enable(flag); - } - - void wxToolTip_SetDelay(long milliseconds) { - wxToolTip::SetDelay(milliseconds); - } - - int wxCaret_GetBlinkTime() { - return wxCaret::GetBlinkTime(); - } - - void wxCaret_SetBlinkTime(int milliseconds) { - wxCaret::SetBlinkTime(milliseconds); - } - -class wxPyFontEnumerator : public wxFontEnumerator { -public: - wxPyFontEnumerator() {} - ~wxPyFontEnumerator() {} - - DEC_PYCALLBACK_BOOL_STRING(OnFacename); - DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding); - - PYPRIVATE; -}; - -IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFacename); -IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding); - -#ifdef __cplusplus -extern "C" { -#endif -static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - char * _arg0; - char * _arg1 = (char *) NULL; - char * _arg2 = (char *) NULL; - char * _arg3 = (char *) NULL; - char * _arg4 = (char *) "*.*"; - int _arg5 = (int ) 0; - wxWindow * _arg6 = (wxWindow *) NULL; - int _arg7 = (int ) -1; - int _arg8 = (int ) -1; - PyObject * _argo6 = 0; - char *_kwnames[] = { "message","default_path","default_filename","default_extension","wildcard","flags","parent","x","y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|ssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) - return NULL; - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxFileSelector. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1 = (wxString *) &wxPyEmptyStr; - wxString * _arg2 = (wxString *) &wxPyEmptyStr; - wxWindow * _arg3 = (wxWindow *) NULL; - int _arg4 = (int ) -1; - int _arg5 = (int ) -1; - bool _arg6 = (bool ) TRUE; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _argo3 = 0; - int tempbool6 = (int) TRUE; - char *_kwnames[] = { "message","caption","default_value","parent","x","y","centre", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOiii:wxGetTextFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4,&_arg5,&tempbool6)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj2) -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetTextFromUser. Expected _wxWindow_p."); - return NULL; - } - } - _arg6 = (bool ) tempbool6; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = (wxWindow *) NULL; - int _arg5 = (int ) -1; - int _arg6 = (int ) -1; - bool _arg7 = (bool ) TRUE; - int _arg8 = (int ) 150; - int _arg9 = (int ) 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - PyObject * _argo4 = 0; - int tempbool7 = (int) TRUE; - char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoice",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoice. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - if (_obj3) { - _arg2 = PyList_Size(_obj3); - } - else { - _arg2 = 0; - } -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} -{ - delete _result; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1; - int _arg2; - wxString * _arg3; - wxWindow * _arg4 = (wxWindow *) NULL; - int _arg5 = (int ) -1; - int _arg6 = (int ) -1; - bool _arg7 = (bool ) TRUE; - int _arg8 = (int ) 150; - int _arg9 = (int ) 200; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj3 = 0; - PyObject * _argo4 = 0; - int tempbool7 = (int) TRUE; - char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoiceIndex",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_obj3) -{ - _arg3 = wxString_LIST_helper(_obj3); - if (_arg3 == NULL) { - return NULL; - } -} - if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoiceIndex. Expected _wxWindow_p."); - return NULL; - } - } - _arg7 = (bool ) tempbool7; -{ - if (_obj3) { - _arg2 = PyList_Size(_obj3); - } - else { - _arg2 = 0; - } -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - delete [] _arg3; -} - return _resultobj; -} - -static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxString * _arg0; - wxString * _arg1 = (wxString *) &wxPyEmptyStr; - int _arg2 = (int ) wxOK|wxCENTRE; - wxWindow * _arg3 = (wxWindow *) NULL; - int _arg4 = (int ) -1; - int _arg5 = (int ) -1; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _argo3 = 0; - char *_kwnames[] = { "message","caption","style","parent","x","y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOii:wxMessageBox",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4,&_arg5)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_obj1) -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMessageBox. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - wxString * _arg1; - wxString * _arg2; - long _arg3; - long _arg4 = (long ) 0; - long _arg5 = (long ) 100; - wxWindow * _arg6 = (wxWindow *) NULL; - wxPoint * _arg7 = (wxPoint *) &wxPyDefaultPosition; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - PyObject * _argo6 = 0; - wxPoint temp; - PyObject * _obj7 = 0; - char *_kwnames[] = { "message","prompt","caption","value","min","max","parent","pos", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOl|llOO:wxGetNumberFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argo6,&_obj7)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p."); - return NULL; - } - } - if (_obj7) -{ - _arg7 = &temp; - if (! wxPoint_helper(_obj7, &_arg7)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxColourDisplay",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxColourDisplay(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplayDepth",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxDisplayDepth(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCursor * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "cursor", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursor. Expected _wxCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxSetCursor(*_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "label","parent", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByLabel. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxString * _arg0; - wxWindow * _arg1 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "name","parent", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByName. Expected _wxWindow_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; - PyObject * _argo0 = 0; - char *_kwnames[] = { "cursor", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxBeginBusyCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBeginBusyCursor. Expected _wxCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxBeginBusyCursor(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetActiveWindow",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxGetActiveWindow(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - int _arg1; - char *_kwnames[] = { "name","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"si:wxResourceAddIdentifier",_kwnames,&_arg0,&_arg1)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxResourceClear",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxResourceClear(); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBitmap * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateBitmap",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxIcon * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateIcon",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxIcon (wxResourceCreateIcon(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxMenuBar * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateMenuBar",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char * _arg0; - char *_kwnames[] = { "name", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceGetIdentifier",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxResourceGetIdentifier(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "resource","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseData",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseData. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceParseData(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "filename","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseFile",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseFile. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceParseFile(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "resource","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseString",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseString. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxResourceParseString(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemColour",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxColour (wxSystemSettings_GetSystemColour(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemFont",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxFont (wxSystemSettings_GetSystemFont(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemMetric",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSystemSettings_GetSystemMetric(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _arg0; - int tempbool0; - char *_kwnames[] = { "flag", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxToolTip_Enable",_kwnames,&tempbool0)) - return NULL; - _arg0 = (bool ) tempbool0; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxToolTip_Enable(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _arg0; - char *_kwnames[] = { "milliseconds", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxToolTip_SetDelay",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxToolTip_SetDelay(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxCaret_GetBlinkTime",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxCaret_GetBlinkTime(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxCaret_SetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _arg0; - char *_kwnames[] = { "milliseconds", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxCaret_SetBlinkTime",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_SetBlinkTime(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxPostEvent(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxEvtHandler * _arg0; - wxEvent * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "dest","event", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPostEvent",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPostEvent. Expected _wxEvtHandler_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostEvent. Expected _wxEvent_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPostEvent(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWakeUpIdle",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxWakeUpIdle(); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0)) -static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxToolTip * _result; - wxString * _arg0; - PyObject * _obj0 = 0; - char *_kwnames[] = { "tip", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxToolTip",_kwnames,&_obj0)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxToolTip *)new_wxToolTip(*_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolTip_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - -#define wxToolTip_SetTip(_swigobj,_swigarg0) (_swigobj->SetTip(_swigarg0)) -static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxToolTip * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","tip", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolTip_SetTip",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_SetTip. Expected _wxToolTip_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxToolTip_SetTip(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxToolTip_GetTip(_swigobj) (_swigobj->GetTip()) -static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxToolTip * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetTip",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetTip. Expected _wxToolTip_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxToolTip_GetTip(_arg0)); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxToolTip_GetWindow(_swigobj) (_swigobj->GetWindow()) -static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxToolTip * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetWindow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetWindow. Expected _wxToolTip_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxToolTip_GetWindow(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define new_wxCaret(_swigarg0,_swigarg1) (new wxCaret(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _result; - wxWindow * _arg0; - wxSize * _arg1; - PyObject * _argo0 = 0; - wxSize temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "window","size", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxCaret",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCaret. Expected _wxWindow_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxSize_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxCaret_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxCaret(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxCaret",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCaret. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxCaret(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_IsOk(_swigobj) (_swigobj->IsOk()) -static PyObject *_wrap_wxCaret_IsOk(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsOk",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsOk. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCaret_IsOk(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCaret_IsVisible(_swigobj) (_swigobj->IsVisible()) -static PyObject *_wrap_wxCaret_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsVisible",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsVisible. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCaret_IsVisible(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxCaret_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPositionTuple",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPositionTuple. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxCaret_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxCaret_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPoint * _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPosition",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPosition. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxCaret_GetPosition(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxCaret_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_GetSizeTuple(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSizeTuple",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSizeTuple. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - -#define wxCaret_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxCaret_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSize * _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSize. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxCaret_GetSize(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxCaret_GetWindow(_swigobj) (_swigobj->GetWindow()) -static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetWindow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetWindow. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxCaret_GetWindow(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxCaret_MoveXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->Move(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_MoveXY(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_MoveXY",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_MoveXY. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_MoveXY(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_Move(_swigobj,_swigarg0) (_swigobj->Move(_swigarg0)) -static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - wxPoint * _arg1; - PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","pt", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_Move",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Move. Expected _wxCaret_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxPoint_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_Move(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_SetSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxCaret_SetSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int _arg1; - int _arg2; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_SetSizeWH",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSizeWH. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_SetSizeWH(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0)) -static PyObject *_wrap_wxCaret_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - wxSize * _arg1; - PyObject * _argo0 = 0; - wxSize temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","size", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_SetSize",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSize. Expected _wxCaret_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxSize_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_SetSize(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - int _arg1 = (int ) TRUE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","show", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCaret_Show",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Show. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_Show(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxCaret_Hide(_swigobj) (_swigobj->Hide()) -static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxCaret * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_Hide",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Hide. Expected _wxCaret_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxCaret_Hide(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxFontEnumerator() (new wxPyFontEnumerator()) -static PyObject *_wrap_new_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyFontEnumerator * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFontEnumerator",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFontEnumerator_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxPyFontEnumerator(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyFontEnumerator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFontEnumerator",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontEnumerator. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxPyFontEnumerator(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontEnumerator__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) -static PyObject *_wrap_wxFontEnumerator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyFontEnumerator * _arg0; - PyObject * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontEnumerator__setSelf",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator__setSelf. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - _arg1 = _obj1; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFontEnumerator__setSelf(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxFontEnumerator_EnumerateFacenames(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnumerateFacenames(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontEnumerator_EnumerateFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxPyFontEnumerator * _arg0; - wxFontEncoding _arg1 = (wxFontEncoding ) wxFONTENCODING_SYSTEM; - bool _arg2 = (bool ) FALSE; - PyObject * _argo0 = 0; - int tempbool2 = (int) FALSE; - char *_kwnames[] = { "self","encoding","fixedWidthOnly", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxFontEnumerator_EnumerateFacenames",_kwnames,&_argo0,&_arg1,&tempbool2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateFacenames. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } - _arg2 = (bool ) tempbool2; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFontEnumerator_EnumerateEncodings(_swigobj,_swigarg0) (_swigobj->EnumerateEncodings(_swigarg0)) -static PyObject *_wrap_wxFontEnumerator_EnumerateEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxPyFontEnumerator * _arg0; - char * _arg1 = (char *) ""; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","facename", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|s:wxFontEnumerator_EnumerateEncodings",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateEncodings. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject * wxPyFontEnumerator_GetEncodings(wxPyFontEnumerator *self) { - wxArrayString* arr = self->GetEncodings(); - PyObject* list = PyList_New(0); - for (size_t x=0; xGetCount(); x++) - PyList_Append(list, PyString_FromString((*arr)[x])); - return list; - } -static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxPyFontEnumerator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetEncodings",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetEncodings. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -static PyObject * wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self) { - wxArrayString* arr = self->GetFacenames(); - PyObject* list = PyList_New(0); - for (size_t x=0; xGetCount(); x++) - PyList_Append(list, PyString_FromString((*arr)[x])); - return list; - } -static PyObject *_wrap_wxFontEnumerator_GetFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxPyFontEnumerator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetFacenames",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetFacenames. Expected _wxPyFontEnumerator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - -#define new_wxBusyCursor(_swigarg0) (new wxBusyCursor(_swigarg0)) -static PyObject *_wrap_new_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBusyCursor * _result; - wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; - PyObject * _argo0 = 0; - char *_kwnames[] = { "cursor", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBusyCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBusyCursor. Expected _wxCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBusyCursor_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxBusyCursor(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBusyCursor * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxBusyCursor",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBusyCursor_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBusyCursor. Expected _wxBusyCursor_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxBusyCursor(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef misc2cMethods[] = { - { "delete_wxBusyCursor", (PyCFunction) _wrap_delete_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "new_wxBusyCursor", (PyCFunction) _wrap_new_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_GetFacenames", (PyCFunction) _wrap_wxFontEnumerator_GetFacenames, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_GetEncodings", (PyCFunction) _wrap_wxFontEnumerator_GetEncodings, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_EnumerateEncodings", (PyCFunction) _wrap_wxFontEnumerator_EnumerateEncodings, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator_EnumerateFacenames", (PyCFunction) _wrap_wxFontEnumerator_EnumerateFacenames, METH_VARARGS | METH_KEYWORDS }, - { "wxFontEnumerator__setSelf", (PyCFunction) _wrap_wxFontEnumerator__setSelf, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxFontEnumerator", (PyCFunction) _wrap_delete_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, - { "new_wxFontEnumerator", (PyCFunction) _wrap_new_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_SetSize", (PyCFunction) _wrap_wxCaret_SetSize, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_SetSizeWH", (PyCFunction) _wrap_wxCaret_SetSizeWH, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_Move", (PyCFunction) _wrap_wxCaret_Move, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_MoveXY", (PyCFunction) _wrap_wxCaret_MoveXY, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetWindow", (PyCFunction) _wrap_wxCaret_GetWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetSize", (PyCFunction) _wrap_wxCaret_GetSize, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetSizeTuple", (PyCFunction) _wrap_wxCaret_GetSizeTuple, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetPosition", (PyCFunction) _wrap_wxCaret_GetPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetPositionTuple", (PyCFunction) _wrap_wxCaret_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_IsVisible", (PyCFunction) _wrap_wxCaret_IsVisible, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_IsOk", (PyCFunction) _wrap_wxCaret_IsOk, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxCaret", (PyCFunction) _wrap_delete_wxCaret, METH_VARARGS | METH_KEYWORDS }, - { "new_wxCaret", (PyCFunction) _wrap_new_wxCaret, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_GetWindow", (PyCFunction) _wrap_wxToolTip_GetWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, - { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, - { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, - { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, - { "wxCaret_GetBlinkTime", (PyCFunction) _wrap_wxCaret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_SetDelay", (PyCFunction) _wrap_wxToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS }, - { "wxToolTip_Enable", (PyCFunction) _wrap_wxToolTip_Enable, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemMetric", (PyCFunction) _wrap_wxSystemSettings_GetSystemMetric, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemFont", (PyCFunction) _wrap_wxSystemSettings_GetSystemFont, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemColour", (PyCFunction) _wrap_wxSystemSettings_GetSystemColour, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseString", (PyCFunction) _wrap_wxResourceParseString, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseFile", (PyCFunction) _wrap_wxResourceParseFile, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseData", (PyCFunction) _wrap_wxResourceParseData, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceGetIdentifier", (PyCFunction) _wrap_wxResourceGetIdentifier, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateMenuBar", (PyCFunction) _wrap_wxResourceCreateMenuBar, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateIcon", (PyCFunction) _wrap_wxResourceCreateIcon, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateBitmap", (PyCFunction) _wrap_wxResourceCreateBitmap, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceClear", (PyCFunction) _wrap_wxResourceClear, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceAddIdentifier", (PyCFunction) _wrap_wxResourceAddIdentifier, METH_VARARGS | METH_KEYWORDS }, - { "wxGetActiveWindow", (PyCFunction) _wrap_wxGetActiveWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxBeginBusyCursor", (PyCFunction) _wrap_wxBeginBusyCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, - { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, - { "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS }, - { "wxDisplayDepth", (PyCFunction) _wrap_wxDisplayDepth, METH_VARARGS | METH_KEYWORDS }, - { "wxColourDisplay", (PyCFunction) _wrap_wxColourDisplay, METH_VARARGS | METH_KEYWORDS }, - { "wxGetNumberFromUser", (PyCFunction) _wrap_wxGetNumberFromUser, METH_VARARGS | METH_KEYWORDS }, - { "wxMessageBox", (PyCFunction) _wrap_wxMessageBox, METH_VARARGS | METH_KEYWORDS }, - { "wxGetSingleChoiceIndex", (PyCFunction) _wrap_wxGetSingleChoiceIndex, METH_VARARGS | METH_KEYWORDS }, - { "wxGetSingleChoice", (PyCFunction) _wrap_wxGetSingleChoice, METH_VARARGS | METH_KEYWORDS }, - { "wxGetTextFromUser", (PyCFunction) _wrap_wxGetTextFromUser, METH_VARARGS | METH_KEYWORDS }, - { "wxFileSelector", (PyCFunction) _wrap_wxFileSelector, METH_VARARGS | METH_KEYWORDS }, - { NULL, NULL } -}; -#ifdef __cplusplus -} -#endif -/* - * This table is used by the pointer type-checker - */ -static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, - { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxPrintQuality","_wxCoord",0}, - { "_wxPrintQuality","_int",0}, - { "_wxPrintQuality","_signed_int",0}, - { "_wxPrintQuality","_unsigned_int",0}, - { "_wxPrintQuality","_wxWindowID",0}, - { "_wxPrintQuality","_uint",0}, - { "_wxPrintQuality","_EBool",0}, - { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, - { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_long","_wxDash",0}, - { "_long","_unsigned_long",0}, - { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_size_t","_wxCoord",0}, - { "_size_t","_wxPrintQuality",0}, - { "_size_t","_unsigned_int",0}, - { "_size_t","_int",0}, - { "_size_t","_wxWindowID",0}, - { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_uint","_wxCoord",0}, - { "_uint","_wxPrintQuality",0}, - { "_uint","_size_t",0}, - { "_uint","_unsigned_int",0}, - { "_uint","_int",0}, - { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_EBool","_wxCoord",0}, - { "_EBool","_wxPrintQuality",0}, - { "_EBool","_signed_int",0}, - { "_EBool","_int",0}, - { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, - { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_signed_int","_wxCoord",0}, - { "_signed_int","_wxPrintQuality",0}, - { "_signed_int","_EBool",0}, - { "_signed_int","_wxWindowID",0}, - { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_WXTYPE","_short",0}, - { "_WXTYPE","_signed_short",0}, - { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxBrush","_wxBrush",0}, - { "_unsigned_short","_WXTYPE",0}, - { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_signed_short","_WXTYPE",0}, - { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_unsigned_int","_wxCoord",0}, - { "_unsigned_int","_wxPrintQuality",0}, - { "_unsigned_int","_size_t",0}, - { "_unsigned_int","_uint",0}, - { "_unsigned_int","_wxWindowID",0}, - { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, - { "_short","_WXTYPE",0}, - { "_short","_unsigned_short",0}, - { "_short","_signed_short",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_wxWindowID","_wxCoord",0}, - { "_wxWindowID","_wxPrintQuality",0}, - { "_wxWindowID","_size_t",0}, - { "_wxWindowID","_EBool",0}, - { "_wxWindowID","_uint",0}, - { "_wxWindowID","_int",0}, - { "_wxWindowID","_signed_int",0}, - { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_int","_wxCoord",0}, - { "_int","_wxPrintQuality",0}, - { "_int","_size_t",0}, - { "_int","_EBool",0}, - { "_int","_uint",0}, - { "_int","_wxWindowID",0}, - { "_int","_unsigned_int",0}, - { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, - { "_wxCoord","_int",0}, - { "_wxCoord","_signed_int",0}, - { "_wxCoord","_unsigned_int",0}, - { "_wxCoord","_wxWindowID",0}, - { "_wxCoord","_uint",0}, - { "_wxCoord","_EBool",0}, - { "_wxCoord","_size_t",0}, - { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, -{0,0,0}}; - -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void) initmisc2c() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("misc2c", misc2cMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH)); - PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH)); - PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH)); - PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH)); - PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH)); - PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH)); - PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH)); - PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN)); - PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN)); - PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN)); - PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT)); - PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT)); - PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT)); - PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT)); - PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT)); - PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE)); - PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT)); - PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); - PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); - PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); - PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME)); - PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER)); - PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); - PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); - PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); - PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); - PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); - PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); - PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X)); - PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y)); - PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X)); - PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y)); - PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X)); - PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y)); - PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X)); - PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y)); - PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X)); - PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y)); - PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X)); - PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X)); - PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y)); - PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X)); - PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y)); - PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X)); - PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y)); - PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X)); - PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y)); - PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X)); - PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y)); - PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X)); - PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y)); - PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y)); - PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X)); - PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X)); - PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y)); - PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y)); - PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y)); - PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y)); - PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT)); - PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT)); - PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS)); - PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS)); -{ - int i; - for (i = 0; _swig_mapping[i].n1; i++) - SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); -} -} diff --git a/utils/wxPython/src/msw/misc2.py b/utils/wxPython/src/msw/misc2.py deleted file mode 100644 index a052bbd796..0000000000 --- a/utils/wxPython/src/msw/misc2.py +++ /dev/null @@ -1,325 +0,0 @@ -# This file was created automatically by SWIG. -import misc2c - -from windows import * - -from misc import * - -from gdi import * - -from clip_dnd import * - -from events import * -class wxToolTipPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def SetTip(self, *_args, **_kwargs): - val = apply(misc2c.wxToolTip_SetTip,(self,) + _args, _kwargs) - return val - def GetTip(self, *_args, **_kwargs): - val = apply(misc2c.wxToolTip_GetTip,(self,) + _args, _kwargs) - return val - def GetWindow(self, *_args, **_kwargs): - val = apply(misc2c.wxToolTip_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def __repr__(self): - return "" % (self.this,) -class wxToolTip(wxToolTipPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxToolTip,_args,_kwargs) - self.thisown = 1 - - - - -class wxCaretPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxCaret(self) - def IsOk(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_IsOk,(self,) + _args, _kwargs) - return val - def IsVisible(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_IsVisible,(self,) + _args, _kwargs) - return val - def GetPositionTuple(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetPositionTuple,(self,) + _args, _kwargs) - return val - def GetPosition(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetPosition,(self,) + _args, _kwargs) - if val: val = wxPointPtr(val) ; val.thisown = 1 - return val - def GetSizeTuple(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetSizeTuple,(self,) + _args, _kwargs) - return val - def GetSize(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetSize,(self,) + _args, _kwargs) - if val: val = wxSizePtr(val) ; val.thisown = 1 - return val - def GetWindow(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) - return val - def MoveXY(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_MoveXY,(self,) + _args, _kwargs) - return val - def Move(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_Move,(self,) + _args, _kwargs) - return val - def SetSizeWH(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_SetSizeWH,(self,) + _args, _kwargs) - return val - def SetSize(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_SetSize,(self,) + _args, _kwargs) - return val - def Show(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_Show,(self,) + _args, _kwargs) - return val - def Hide(self, *_args, **_kwargs): - val = apply(misc2c.wxCaret_Hide,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxCaret(wxCaretPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxCaret,_args,_kwargs) - self.thisown = 1 - - - - -class wxFontEnumeratorPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxFontEnumerator(self) - def _setSelf(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator__setSelf,(self,) + _args, _kwargs) - return val - def EnumerateFacenames(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_EnumerateFacenames,(self,) + _args, _kwargs) - return val - def EnumerateEncodings(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_EnumerateEncodings,(self,) + _args, _kwargs) - return val - def GetEncodings(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_GetEncodings,(self,) + _args, _kwargs) - return val - def GetFacenames(self, *_args, **_kwargs): - val = apply(misc2c.wxFontEnumerator_GetFacenames,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxFontEnumerator(wxFontEnumeratorPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxFontEnumerator,_args,_kwargs) - self.thisown = 1 - self._setSelf(self) - - - - -class wxBusyCursorPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxBusyCursor(self) - def __repr__(self): - return "" % (self.this,) -class wxBusyCursor(wxBusyCursorPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(misc2c.new_wxBusyCursor,_args,_kwargs) - self.thisown = 1 - - - - - - -#-------------- FUNCTION WRAPPERS ------------------ - -wxFileSelector = misc2c.wxFileSelector - -wxGetTextFromUser = misc2c.wxGetTextFromUser - -wxGetSingleChoice = misc2c.wxGetSingleChoice - -wxGetSingleChoiceIndex = misc2c.wxGetSingleChoiceIndex - -wxMessageBox = misc2c.wxMessageBox - -wxGetNumberFromUser = misc2c.wxGetNumberFromUser - -wxColourDisplay = misc2c.wxColourDisplay - -wxDisplayDepth = misc2c.wxDisplayDepth - -wxSetCursor = misc2c.wxSetCursor - -def wxFindWindowByLabel(*_args, **_kwargs): - val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs) - if val: val = wxWindowPtr(val) - return val - -def wxFindWindowByName(*_args, **_kwargs): - val = apply(misc2c.wxFindWindowByName,_args,_kwargs) - if val: val = wxWindowPtr(val) - return val - -wxBeginBusyCursor = misc2c.wxBeginBusyCursor - -def wxGetActiveWindow(*_args, **_kwargs): - val = apply(misc2c.wxGetActiveWindow,_args,_kwargs) - if val: val = wxWindowPtr(val) - return val - -wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier - -wxResourceClear = misc2c.wxResourceClear - -def wxResourceCreateBitmap(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateBitmap,_args,_kwargs) - if val: val = wxBitmapPtr(val); val.thisown = 1 - return val - -def wxResourceCreateIcon(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateIcon,_args,_kwargs) - if val: val = wxIconPtr(val); val.thisown = 1 - return val - -def wxResourceCreateMenuBar(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs) - if val: val = wxMenuBarPtr(val) - return val - -wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier - -wxResourceParseData = misc2c.wxResourceParseData - -wxResourceParseFile = misc2c.wxResourceParseFile - -wxResourceParseString = misc2c.wxResourceParseString - -def wxSystemSettings_GetSystemColour(*_args, **_kwargs): - val = apply(misc2c.wxSystemSettings_GetSystemColour,_args,_kwargs) - if val: val = wxColourPtr(val); val.thisown = 1 - return val - -def wxSystemSettings_GetSystemFont(*_args, **_kwargs): - val = apply(misc2c.wxSystemSettings_GetSystemFont,_args,_kwargs) - if val: val = wxFontPtr(val); val.thisown = 1 - return val - -wxSystemSettings_GetSystemMetric = misc2c.wxSystemSettings_GetSystemMetric - -wxToolTip_Enable = misc2c.wxToolTip_Enable - -wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay - -wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime - -wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime - -wxPostEvent = misc2c.wxPostEvent - -wxWakeUpIdle = misc2c.wxWakeUpIdle - - - -#-------------- VARIABLE WRAPPERS ------------------ - -wxSYS_WHITE_BRUSH = misc2c.wxSYS_WHITE_BRUSH -wxSYS_LTGRAY_BRUSH = misc2c.wxSYS_LTGRAY_BRUSH -wxSYS_GRAY_BRUSH = misc2c.wxSYS_GRAY_BRUSH -wxSYS_DKGRAY_BRUSH = misc2c.wxSYS_DKGRAY_BRUSH -wxSYS_BLACK_BRUSH = misc2c.wxSYS_BLACK_BRUSH -wxSYS_NULL_BRUSH = misc2c.wxSYS_NULL_BRUSH -wxSYS_HOLLOW_BRUSH = misc2c.wxSYS_HOLLOW_BRUSH -wxSYS_WHITE_PEN = misc2c.wxSYS_WHITE_PEN -wxSYS_BLACK_PEN = misc2c.wxSYS_BLACK_PEN -wxSYS_NULL_PEN = misc2c.wxSYS_NULL_PEN -wxSYS_OEM_FIXED_FONT = misc2c.wxSYS_OEM_FIXED_FONT -wxSYS_ANSI_FIXED_FONT = misc2c.wxSYS_ANSI_FIXED_FONT -wxSYS_ANSI_VAR_FONT = misc2c.wxSYS_ANSI_VAR_FONT -wxSYS_SYSTEM_FONT = misc2c.wxSYS_SYSTEM_FONT -wxSYS_DEVICE_DEFAULT_FONT = misc2c.wxSYS_DEVICE_DEFAULT_FONT -wxSYS_DEFAULT_PALETTE = misc2c.wxSYS_DEFAULT_PALETTE -wxSYS_SYSTEM_FIXED_FONT = misc2c.wxSYS_SYSTEM_FIXED_FONT -wxSYS_DEFAULT_GUI_FONT = misc2c.wxSYS_DEFAULT_GUI_FONT -wxSYS_COLOUR_SCROLLBAR = misc2c.wxSYS_COLOUR_SCROLLBAR -wxSYS_COLOUR_BACKGROUND = misc2c.wxSYS_COLOUR_BACKGROUND -wxSYS_COLOUR_ACTIVECAPTION = misc2c.wxSYS_COLOUR_ACTIVECAPTION -wxSYS_COLOUR_INACTIVECAPTION = misc2c.wxSYS_COLOUR_INACTIVECAPTION -wxSYS_COLOUR_MENU = misc2c.wxSYS_COLOUR_MENU -wxSYS_COLOUR_WINDOW = misc2c.wxSYS_COLOUR_WINDOW -wxSYS_COLOUR_WINDOWFRAME = misc2c.wxSYS_COLOUR_WINDOWFRAME -wxSYS_COLOUR_MENUTEXT = misc2c.wxSYS_COLOUR_MENUTEXT -wxSYS_COLOUR_WINDOWTEXT = misc2c.wxSYS_COLOUR_WINDOWTEXT -wxSYS_COLOUR_CAPTIONTEXT = misc2c.wxSYS_COLOUR_CAPTIONTEXT -wxSYS_COLOUR_ACTIVEBORDER = misc2c.wxSYS_COLOUR_ACTIVEBORDER -wxSYS_COLOUR_INACTIVEBORDER = misc2c.wxSYS_COLOUR_INACTIVEBORDER -wxSYS_COLOUR_APPWORKSPACE = misc2c.wxSYS_COLOUR_APPWORKSPACE -wxSYS_COLOUR_HIGHLIGHT = misc2c.wxSYS_COLOUR_HIGHLIGHT -wxSYS_COLOUR_HIGHLIGHTTEXT = misc2c.wxSYS_COLOUR_HIGHLIGHTTEXT -wxSYS_COLOUR_BTNFACE = misc2c.wxSYS_COLOUR_BTNFACE -wxSYS_COLOUR_BTNSHADOW = misc2c.wxSYS_COLOUR_BTNSHADOW -wxSYS_COLOUR_GRAYTEXT = misc2c.wxSYS_COLOUR_GRAYTEXT -wxSYS_COLOUR_BTNTEXT = misc2c.wxSYS_COLOUR_BTNTEXT -wxSYS_COLOUR_INACTIVECAPTIONTEXT = misc2c.wxSYS_COLOUR_INACTIVECAPTIONTEXT -wxSYS_COLOUR_BTNHIGHLIGHT = misc2c.wxSYS_COLOUR_BTNHIGHLIGHT -wxSYS_COLOUR_3DDKSHADOW = misc2c.wxSYS_COLOUR_3DDKSHADOW -wxSYS_COLOUR_3DLIGHT = misc2c.wxSYS_COLOUR_3DLIGHT -wxSYS_COLOUR_INFOTEXT = misc2c.wxSYS_COLOUR_INFOTEXT -wxSYS_COLOUR_INFOBK = misc2c.wxSYS_COLOUR_INFOBK -wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP -wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE -wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW -wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT -wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT -wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT -wxSYS_MOUSE_BUTTONS = misc2c.wxSYS_MOUSE_BUTTONS -wxSYS_BORDER_X = misc2c.wxSYS_BORDER_X -wxSYS_BORDER_Y = misc2c.wxSYS_BORDER_Y -wxSYS_CURSOR_X = misc2c.wxSYS_CURSOR_X -wxSYS_CURSOR_Y = misc2c.wxSYS_CURSOR_Y -wxSYS_DCLICK_X = misc2c.wxSYS_DCLICK_X -wxSYS_DCLICK_Y = misc2c.wxSYS_DCLICK_Y -wxSYS_DRAG_X = misc2c.wxSYS_DRAG_X -wxSYS_DRAG_Y = misc2c.wxSYS_DRAG_Y -wxSYS_EDGE_X = misc2c.wxSYS_EDGE_X -wxSYS_EDGE_Y = misc2c.wxSYS_EDGE_Y -wxSYS_HSCROLL_ARROW_X = misc2c.wxSYS_HSCROLL_ARROW_X -wxSYS_HSCROLL_ARROW_Y = misc2c.wxSYS_HSCROLL_ARROW_Y -wxSYS_HTHUMB_X = misc2c.wxSYS_HTHUMB_X -wxSYS_ICON_X = misc2c.wxSYS_ICON_X -wxSYS_ICON_Y = misc2c.wxSYS_ICON_Y -wxSYS_ICONSPACING_X = misc2c.wxSYS_ICONSPACING_X -wxSYS_ICONSPACING_Y = misc2c.wxSYS_ICONSPACING_Y -wxSYS_WINDOWMIN_X = misc2c.wxSYS_WINDOWMIN_X -wxSYS_WINDOWMIN_Y = misc2c.wxSYS_WINDOWMIN_Y -wxSYS_SCREEN_X = misc2c.wxSYS_SCREEN_X -wxSYS_SCREEN_Y = misc2c.wxSYS_SCREEN_Y -wxSYS_FRAMESIZE_X = misc2c.wxSYS_FRAMESIZE_X -wxSYS_FRAMESIZE_Y = misc2c.wxSYS_FRAMESIZE_Y -wxSYS_SMALLICON_X = misc2c.wxSYS_SMALLICON_X -wxSYS_SMALLICON_Y = misc2c.wxSYS_SMALLICON_Y -wxSYS_HSCROLL_Y = misc2c.wxSYS_HSCROLL_Y -wxSYS_VSCROLL_X = misc2c.wxSYS_VSCROLL_X -wxSYS_VSCROLL_ARROW_X = misc2c.wxSYS_VSCROLL_ARROW_X -wxSYS_VSCROLL_ARROW_Y = misc2c.wxSYS_VSCROLL_ARROW_Y -wxSYS_VTHUMB_Y = misc2c.wxSYS_VTHUMB_Y -wxSYS_CAPTION_Y = misc2c.wxSYS_CAPTION_Y -wxSYS_MENU_Y = misc2c.wxSYS_MENU_Y -wxSYS_NETWORK_PRESENT = misc2c.wxSYS_NETWORK_PRESENT -wxSYS_PENWINDOWS_PRESENT = misc2c.wxSYS_PENWINDOWS_PRESENT -wxSYS_SHOW_SOUNDS = misc2c.wxSYS_SHOW_SOUNDS -wxSYS_SWAP_BUTTONS = misc2c.wxSYS_SWAP_BUTTONS diff --git a/utils/wxPython/src/qt/dummy b/utils/wxPython/src/qt/dummy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/utils/wxPython/src/wxc.def b/utils/wxPython/src/wxc.def deleted file mode 100644 index 87d2d233b6..0000000000 --- a/utils/wxPython/src/wxc.def +++ /dev/null @@ -1,6 +0,0 @@ -EXPORTS - initwxc - SWIG_GetPtr - SWIG_MakePtr - SWIG_RegisterMapping - SWIG_newvarlink diff --git a/utils/wxPython/src/wxp.cpp b/utils/wxPython/src/wxp.cpp deleted file mode 100644 index cea3c3c5c4..0000000000 --- a/utils/wxPython/src/wxp.cpp +++ /dev/null @@ -1,2049 +0,0 @@ -/* - * FILE : wxp.cpp - * - * This file was automatically generated by : - * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) - * - * Portions Copyright (c) 1995-1998 - * The University of Utah and The Regents of the University of California. - * Permission is granted to distribute this file in any manner provided - * this notice remains intact. - * - * Do not make changes to this file--changes will be lost! - * - */ - - -#define SWIGCODE -/* Implementation : PYTHON */ - -#define SWIGPYTHON -#include -#include -/*********************************************************************** - * $Header$ - * swig_lib/python/python.cfg - * - * This file contains coded needed to add variable linking to the - * Python interpreter. C variables are added as a new kind of Python - * datatype. - * - * Also contains supporting code for building python under Windows - * and things like that. - * - * $Log$ - * Revision 1.6 1999/06/28 21:39:47 VZ - * 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 - * - * Revision 1.5 1998/08/18 21:50:09 RD - * - * moving the SWIG-generated files to toolkit specific subdirectories - * - * Revision 1.4 1998/08/15 07:36:51 RD - * - Moved the header in the .i files out of the code that gets put into - * the .cpp files. It caused CVS conflicts because of the RCS ID being - * different each time. - * - * - A few minor fixes. - * - ************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -#ifdef __cplusplus -} -#endif - -/* Definitions for Windows/Unix exporting */ -#if defined(__WIN32__) -# if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b -# else -# define SWIGEXPORT(a,b) a b -# endif -# endif -#else -# define SWIGEXPORT(a,b) a b -#endif - -#ifdef SWIG_GLOBAL -#ifdef __cplusplus -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static -#endif - -typedef struct { - char *name; - PyObject *(*get_attr)(void); - int (*set_attr)(PyObject *); -} swig_globalvar; - -typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar **vars; - int nvars; - int maxvars; -} swig_varlinkobject; - -/* ---------------------------------------------------------------------- - swig_varlink_repr() - - Function for python repr method - ---------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_repr(swig_varlinkobject *v) -{ - v = v; - return PyString_FromString(""); -} - -/* --------------------------------------------------------------------- - swig_varlink_print() - - Print out all of the global variable names - --------------------------------------------------------------------- */ - -static int -swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) -{ - - int i = 0; - flags = flags; - fprintf(fp,"Global variables { "); - while (v->vars[i]) { - fprintf(fp,"%s", v->vars[i]->name); - i++; - if (v->vars[i]) fprintf(fp,", "); - } - fprintf(fp," }\n"); - return 0; -} - -/* -------------------------------------------------------------------- - swig_varlink_getattr - - This function gets the value of a variable and returns it as a - PyObject. In our case, we'll be looking at the datatype and - converting into a number or string - -------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_getattr(swig_varlinkobject *v, char *n) -{ - int i = 0; - char temp[128]; - - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->get_attr)(); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return NULL; -} - -/* ------------------------------------------------------------------- - swig_varlink_setattr() - - This function sets the value of a variable. - ------------------------------------------------------------------- */ - -static int -swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) -{ - char temp[128]; - int i = 0; - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->set_attr)(p); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return 1; -} - -statichere PyTypeObject varlinktype = { -/* PyObject_HEAD_INIT(&PyType_Type) Note : This doesn't work on some machines */ - PyObject_HEAD_INIT(0) - 0, - "varlink", /* Type name */ - sizeof(swig_varlinkobject), /* Basic size */ - 0, /* Itemsize */ - 0, /* Deallocator */ - (printfunc) swig_varlink_print, /* Print */ - (getattrfunc) swig_varlink_getattr, /* get attr */ - (setattrfunc) swig_varlink_setattr, /* Set attr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_mapping*/ - 0, /* tp_hash */ -}; - -/* Create a variable linking object for use later */ - -SWIGSTATIC PyObject * -SWIG_newvarlink(void) -{ - swig_varlinkobject *result = 0; - result = PyMem_NEW(swig_varlinkobject,1); - varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ - result->ob_type = &varlinktype; - /* _Py_NewReference(result); Does not seem to be necessary */ - result->nvars = 0; - result->maxvars = 64; - result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *)); - result->vars[0] = 0; - result->ob_refcnt = 0; - Py_XINCREF((PyObject *) result); - return ((PyObject*) result); -} - -SWIGSTATIC void -SWIG_addvarlink(PyObject *p, char *name, - PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) -{ - swig_varlinkobject *v; - v= (swig_varlinkobject *) p; - - if (v->nvars >= v->maxvars -1) { - v->maxvars = 2*v->maxvars; - v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *)); - if (v->vars == NULL) { - fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n"); - exit(1); - } - } - v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1); - strcpy(v->vars[v->nvars]->name,name); - v->vars[v->nvars]->get_attr = get_attr; - v->vars[v->nvars]->set_attr = set_attr; - v->nvars++; - v->vars[v->nvars] = 0; -} - - - -/***************************************************************************** - * $Header$ - * - * swigptr.swg - * - * This file contains supporting code for the SWIG run-time type checking - * mechanism. The following functions are available : - * - * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)); - * - * Registers a new type-mapping with the type-checker. origtype is the - * original datatype and newtype is an equivalent type. cast is optional - * pointer to a function to cast pointer values between types (this - * is typically used to cast pointers from derived classes to base classes in C++) - * - * SWIG_MakePtr(char *buffer, void *ptr, char *typestring); - * - * Makes a pointer string from a pointer and typestring. The result is returned - * in buffer which is assumed to hold enough space for the result. - * - * char * SWIG_GetPtr(char *buffer, void **ptr, char *type) - * - * Gets a pointer value from a string. If there is a type-mismatch, returns - * a character string to the received type. On success, returns NULL. - * - * - * You can remap these functions by making a file called "swigptr.swg" in - * your the same directory as the interface file you are wrapping. - * - * These functions are normally declared static, but this file can be - * can be used in a multi-module environment by redefining the symbol - * SWIGSTATIC. - *****************************************************************************/ - -#include - -#ifdef SWIG_GLOBAL -#ifdef __cplusplus -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static -#endif - - -/* SWIG pointer structure */ - -typedef struct SwigPtrType { - char *name; /* Datatype name */ - int len; /* Length (used for optimization) */ - void *(*cast)(void *); /* Pointer casting function */ - struct SwigPtrType *next; /* Linked list pointer */ -} SwigPtrType; - -/* Pointer cache structure */ - -typedef struct { - int stat; /* Status (valid) bit */ - SwigPtrType *tp; /* Pointer to type structure */ - char name[256]; /* Given datatype name */ - char mapped[256]; /* Equivalent name */ -} SwigCacheType; - -/* Some variables */ - -static int SwigPtrMax = 64; /* Max entries that can be currently held */ - /* This value may be adjusted dynamically */ -static int SwigPtrN = 0; /* Current number of entries */ -static int SwigPtrSort = 0; /* Status flag indicating sort */ -static int SwigStart[256]; /* Starting positions of types */ - -/* Pointer table */ -static SwigPtrType *SwigPtrTable = 0; /* Table containing pointer equivalences */ - -/* Cached values */ - -#define SWIG_CACHESIZE 8 -#define SWIG_CACHEMASK 0x7 -static SwigCacheType SwigCache[SWIG_CACHESIZE]; -static int SwigCacheIndex = 0; -static int SwigLastCache = 0; - -/* Sort comparison function */ -static int swigsort(const void *data1, const void *data2) { - SwigPtrType *d1 = (SwigPtrType *) data1; - SwigPtrType *d2 = (SwigPtrType *) data2; - return strcmp(d1->name,d2->name); -} - -/* Binary Search function */ -static int swigcmp(const void *key, const void *data) { - char *k = (char *) key; - SwigPtrType *d = (SwigPtrType *) data; - return strncmp(k,d->name,d->len); -} - -/* Register a new datatype with the type-checker */ - -SWIGSTATIC -void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) { - - int i; - SwigPtrType *t = 0,*t1; - - /* Allocate the pointer table if necessary */ - - if (!SwigPtrTable) { - SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType)); - SwigPtrN = 0; - } - /* Grow the table */ - if (SwigPtrN >= SwigPtrMax) { - SwigPtrMax = 2*SwigPtrMax; - SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType)); - } - for (i = 0; i < SwigPtrN; i++) - if (strcmp(SwigPtrTable[i].name,origtype) == 0) { - t = &SwigPtrTable[i]; - break; - } - if (!t) { - t = &SwigPtrTable[SwigPtrN]; - t->name = origtype; - t->len = strlen(t->name); - t->cast = 0; - t->next = 0; - SwigPtrN++; - } - - /* Check for existing entry */ - - while (t->next) { - if ((strcmp(t->name,newtype) == 0)) { - if (cast) t->cast = cast; - return; - } - t = t->next; - } - - /* Now place entry (in sorted order) */ - - t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType)); - t1->name = newtype; - t1->len = strlen(t1->name); - t1->cast = cast; - t1->next = 0; - t->next = t1; - SwigPtrSort = 0; -} - -/* Make a pointer value string */ - -SWIGSTATIC -void SWIG_MakePtr(char *_c, const void *_ptr, char *type) { - static char _hex[16] = - {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'a', 'b', 'c', 'd', 'e', 'f'}; - unsigned long _p, _s; - char _result[20], *_r; /* Note : a 64-bit hex number = 16 digits */ - _r = _result; - _p = (unsigned long) _ptr; - if (_p > 0) { - while (_p > 0) { - _s = _p & 0xf; - *(_r++) = _hex[_s]; - _p = _p >> 4; - } - *_r = '_'; - while (_r >= _result) - *(_c++) = *(_r--); - } else { - strcpy (_c, "NULL"); - } - if (_ptr) - strcpy (_c, type); -} - -/* Define for backwards compatibility */ - -#define _swig_make_hex SWIG_MakePtr - -/* Function for getting a pointer value */ - -SWIGSTATIC -char *SWIG_GetPtr(char *_c, void **ptr, char *_t) -{ - unsigned long _p; - char temp_type[256]; - char *name; - int i, len; - SwigPtrType *sp,*tp; - SwigCacheType *cache; - int start, end; - _p = 0; - - /* Pointer values must start with leading underscore */ - if (*_c == '_') { - _c++; - /* Extract hex value from pointer */ - while (*_c) { - if ((*_c >= '0') && (*_c <= '9')) - _p = (_p << 4) + (*_c - '0'); - else if ((*_c >= 'a') && (*_c <= 'f')) - _p = (_p << 4) + ((*_c - 'a') + 10); - else - break; - _c++; - } - - if (_t) { - if (strcmp(_t,_c)) { - if (!SwigPtrSort) { - qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort); - for (i = 0; i < 256; i++) { - SwigStart[i] = SwigPtrN; - } - for (i = SwigPtrN-1; i >= 0; i--) { - SwigStart[(int) (SwigPtrTable[i].name[1])] = i; - } - for (i = 255; i >= 1; i--) { - if (SwigStart[i-1] > SwigStart[i]) - SwigStart[i-1] = SwigStart[i]; - } - SwigPtrSort = 1; - for (i = 0; i < SWIG_CACHESIZE; i++) - SwigCache[i].stat = 0; - } - - /* First check cache for matches. Uses last cache value as starting point */ - cache = &SwigCache[SwigLastCache]; - for (i = 0; i < SWIG_CACHESIZE; i++) { - if (cache->stat) { - if (strcmp(_t,cache->name) == 0) { - if (strcmp(_c,cache->mapped) == 0) { - cache->stat++; - *ptr = (void *) _p; - if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr); - return (char *) 0; - } - } - } - SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK; - if (!SwigLastCache) cache = SwigCache; - else cache++; - } - /* We have a type mismatch. Will have to look through our type - mapping table to figure out whether or not we can accept this datatype */ - - start = SwigStart[(int) _t[1]]; - end = SwigStart[(int) _t[1]+1]; - sp = &SwigPtrTable[start]; - while (start < end) { - if (swigcmp(_t,sp) == 0) break; - sp++; - start++; - } - if (start >= end) sp = 0; - /* Try to find a match for this */ - if (sp) { - while (swigcmp(_t,sp) == 0) { - name = sp->name; - len = sp->len; - tp = sp->next; - /* Try to find entry for our given datatype */ - while(tp) { - if (tp->len >= 255) { - return _c; - } - strcpy(temp_type,tp->name); - strncat(temp_type,_t+len,255-tp->len); - if (strcmp(_c,temp_type) == 0) { - - strcpy(SwigCache[SwigCacheIndex].mapped,_c); - strcpy(SwigCache[SwigCacheIndex].name,_t); - SwigCache[SwigCacheIndex].stat = 1; - SwigCache[SwigCacheIndex].tp = tp; - SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK; - - /* Get pointer value */ - *ptr = (void *) _p; - if (tp->cast) *ptr = (*(tp->cast))(*ptr); - return (char *) 0; - } - tp = tp->next; - } - sp++; - /* Hmmm. Didn't find it this time */ - } - } - /* Didn't find any sort of match for this data. - Get the pointer value and return the received type */ - *ptr = (void *) _p; - return _c; - } else { - /* Found a match on the first try. Return pointer value */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - /* No type specified. Good luck */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - if (strcmp (_c, "NULL") == 0) { - *ptr = (void *) 0; - return (char *) 0; - } - *ptr = (void *) 0; - return _c; - } -} - -/* Compatibility mode */ - -#define _swig_get_hex SWIG_GetPtr - -#define SWIG_init initwxpc - -#define SWIG_name "wxpc" - - -#ifdef __WXMSW__ -#include -#undef FindWindow -#undef GetCharWidth -#undef LoadAccelerators -#endif - - -#include "helpers.h" - -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} - -static PyObject* t_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyTuple_Check(target)) { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); - - o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return target; -} - - -extern int* int_LIST_helper(PyObject* source); -extern long* long_LIST_helper(PyObject* source); -extern char** string_LIST_helper(PyObject* source); -extern wxPoint* wxPoint_LIST_helper(PyObject* source); -extern wxBitmap** wxBitmap_LIST_helper(PyObject* source); -extern wxString* wxString_LIST_helper(PyObject* source); -#ifdef __WXMSW__ -extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -#endif - - -static char* wxStringErrorMsg = "string type is required for parameter"; - -#ifdef __WXMSW__ // If building for win32... - -#include -#undef GetClassName - -extern HINSTANCE wxhInstance; - -BOOL WINAPI DllMain( - HINSTANCE hinstDLL, // handle to DLL module - DWORD fdwReason, // reason for calling function - LPVOID lpvReserved // reserved - ) -{ - wxhInstance = hinstDLL; - return 1; -} -#endif - - -extern "C" SWIGEXPORT(void,initwindowsc)(); -extern "C" SWIGEXPORT(void,initwindows2c)(); -extern "C" SWIGEXPORT(void,initeventsc)(); -extern "C" SWIGEXPORT(void,initmiscc)(); -extern "C" SWIGEXPORT(void,initgdic)(); -extern "C" SWIGEXPORT(void,initmdic)(); -extern "C" SWIGEXPORT(void,initcontrolsc)(); -extern "C" SWIGEXPORT(void,initcontrols2c)(); -extern "C" SWIGEXPORT(void,initcmndlgsc)(); - -static int _wrap_wxPyDefaultPosition_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxPyDefaultPosition is read-only."); - return 1; -} - -static PyObject *_wrap_wxPyDefaultPosition_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultPosition,"_wxPoint_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static int _wrap_wxPyDefaultSize_set(PyObject *val) { - - PyErr_SetString(PyExc_TypeError,"Variable wxPyDefaultSize is read-only."); - return 1; -} - -static PyObject *_wrap_wxPyDefaultSize_get() { - PyObject * pyobj; - char ptemp[128]; - - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultSize,"_wxSize_p"); - pyobj = PyString_FromString(ptemp); - return pyobj; -} - -static void *SwigwxPyAppTowxEvtHandler(void *ptr) { - wxPyApp *src; - wxEvtHandler *dest; - src = (wxPyApp *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -static wxPyApp *new_wxPyApp() { - wxPythonApp = new wxPyApp(); - return wxPythonApp; - } - -static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _result; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,":new_wxPyApp")) - return NULL; - _result = (wxPyApp *)new_wxPyApp(); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPyApp_GetAppName(_swigobj) (_swigobj->GetAppName()) -static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetAppName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetAppName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetAppName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_GetAuto3D(_swigobj) (_swigobj->GetAuto3D()) -static PyObject *_wrap_wxPyApp_GetAuto3D(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetAuto3D",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetAuto3D. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_GetAuto3D(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetClassName(_swigobj) (_swigobj->GetClassName()) -static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetClassName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetClassName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetClassName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_GetExitOnFrameDelete(_swigobj) (_swigobj->GetExitOnFrameDelete()) -static PyObject *_wrap_wxPyApp_GetExitOnFrameDelete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetExitOnFrameDelete",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetExitOnFrameDelete. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetPrintMode(_swigobj) (_swigobj->GetPrintMode()) -static PyObject *_wrap_wxPyApp_GetPrintMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetPrintMode",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetPrintMode. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (int )wxPyApp_GetPrintMode(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_GetTopWindow(_swigobj) (_swigobj->GetTopWindow()) -static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxWindow * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetTopWindow",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetTopWindow. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxPyApp_GetVendorName(_swigobj) (_swigobj->GetVendorName()) -static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxString * _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_GetVendorName",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetVendorName. Expected _wxPyApp_p."); - return NULL; - } - } - _result = new wxString (wxPyApp_GetVendorName(_arg0)); -{ - _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxPyApp_Dispatch(_swigobj) (_swigobj->Dispatch()) -static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Dispatch",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Dispatch. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_Dispatch(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_ExitMainLoop(_swigobj) (_swigobj->ExitMainLoop()) -static PyObject *_wrap_wxPyApp_ExitMainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_ExitMainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_ExitMainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_ExitMainLoop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_Initialized(_swigobj) (_swigobj->Initialized()) -static PyObject *_wrap_wxPyApp_Initialized(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Initialized",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Initialized. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_Initialized(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_MainLoop(_swigobj) (_swigobj->MainLoop()) -static PyObject *_wrap_wxPyApp_MainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - int _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_MainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_MainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (int )wxPyApp_MainLoop(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_Pending(_swigobj) (_swigobj->Pending()) -static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args) { - PyObject * _resultobj; - bool _result; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_Pending",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_Pending. Expected _wxPyApp_p."); - return NULL; - } - } - _result = (bool )wxPyApp_Pending(_arg0); - _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyApp_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetAppName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetAppName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetAppName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_SetAuto3D(_swigobj,_swigarg0) (_swigobj->SetAuto3D(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetAuto3D(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetAuto3D",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetAuto3D. Expected _wxPyApp_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPyApp_SetAuto3D(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetClassName(_swigobj,_swigarg0) (_swigobj->SetClassName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetClassName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetClassName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetClassName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_SetExitOnFrameDelete(_swigobj,_swigarg0) (_swigobj->SetExitOnFrameDelete(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetExitOnFrameDelete(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - bool _arg1; - char * _argc0 = 0; - int tempbool1; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetExitOnFrameDelete",&_argc0,&tempbool1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetExitOnFrameDelete. Expected _wxPyApp_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; - wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetPrintMode(_swigobj,_swigarg0) (_swigobj->SetPrintMode(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetPrintMode(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - int _arg1; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"si:wxPyApp_SetPrintMode",&_argc0,&_arg1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetPrintMode. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_SetPrintMode(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetTopWindow(_swigobj,_swigarg0) (_swigobj->SetTopWindow(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetTopWindow(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxWindow * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxPyApp_SetTopWindow",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetTopWindow. Expected _wxPyApp_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyApp_SetTopWindow. Expected _wxWindow_p."); - return NULL; - } - } - wxPyApp_SetTopWindow(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyApp_SetVendorName(_swigobj,_swigarg0) (_swigobj->SetVendorName(_swigarg0)) -static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxPyApp_SetVendorName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetVendorName. Expected _wxPyApp_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxPyApp_SetVendorName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxPyApp_AfterMainLoop(_swigobj) (_swigobj->AfterMainLoop()) -static PyObject *_wrap_wxPyApp_AfterMainLoop(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxPyApp * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxPyApp_AfterMainLoop",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_AfterMainLoop. Expected _wxPyApp_p."); - return NULL; - } - } - wxPyApp_AfterMainLoop(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyMethodDef wxpcMethods[] = { - { "wxPyApp_AfterMainLoop", _wrap_wxPyApp_AfterMainLoop, 1 }, - { "wxPyApp_SetVendorName", _wrap_wxPyApp_SetVendorName, 1 }, - { "wxPyApp_SetTopWindow", _wrap_wxPyApp_SetTopWindow, 1 }, - { "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 }, - { "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 }, - { "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 }, - { "wxPyApp_SetAuto3D", _wrap_wxPyApp_SetAuto3D, 1 }, - { "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 }, - { "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 }, - { "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 }, - { "wxPyApp_Initialized", _wrap_wxPyApp_Initialized, 1 }, - { "wxPyApp_ExitMainLoop", _wrap_wxPyApp_ExitMainLoop, 1 }, - { "wxPyApp_Dispatch", _wrap_wxPyApp_Dispatch, 1 }, - { "wxPyApp_GetVendorName", _wrap_wxPyApp_GetVendorName, 1 }, - { "wxPyApp_GetTopWindow", _wrap_wxPyApp_GetTopWindow, 1 }, - { "wxPyApp_GetPrintMode", _wrap_wxPyApp_GetPrintMode, 1 }, - { "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 }, - { "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 }, - { "wxPyApp_GetAuto3D", _wrap_wxPyApp_GetAuto3D, 1 }, - { "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 }, - { "new_wxPyApp", _wrap_new_wxPyApp, 1 }, - { "_wxSetDictionary", __wxSetDictionary, 1 }, - { "_wxStart", __wxStart, 1 }, - { NULL, NULL } -}; -static PyObject *SWIG_globals; -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT(void,initwxpc)() { - PyObject *m, *d; - SWIG_globals = SWIG_newvarlink(); - m = Py_InitModule("wxpc", wxpcMethods); - d = PyModule_GetDict(m); - PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long) wxMAJOR_VERSION)); - PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long) wxMINOR_VERSION)); - PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long) wxRELEASE_NUMBER)); - PyDict_SetItemString(d,"UNKNOWN", PyInt_FromLong((long) UNKNOWN)); - PyDict_SetItemString(d,"NOT_FOUND", PyInt_FromLong((long) NOT_FOUND)); - PyDict_SetItemString(d,"wxVSCROLL", PyInt_FromLong((long) wxVSCROLL)); - PyDict_SetItemString(d,"wxHSCROLL", PyInt_FromLong((long) wxHSCROLL)); - PyDict_SetItemString(d,"wxCAPTION", PyInt_FromLong((long) wxCAPTION)); - PyDict_SetItemString(d,"wxDOUBLE_BORDER", PyInt_FromLong((long) wxDOUBLE_BORDER)); - PyDict_SetItemString(d,"wxSUNKEN_BORDER", PyInt_FromLong((long) wxSUNKEN_BORDER)); - PyDict_SetItemString(d,"wxRAISED_BORDER", PyInt_FromLong((long) wxRAISED_BORDER)); - PyDict_SetItemString(d,"wxBORDER", PyInt_FromLong((long) wxBORDER)); - PyDict_SetItemString(d,"wxSIMPLE_BORDER", PyInt_FromLong((long) wxSIMPLE_BORDER)); - PyDict_SetItemString(d,"wxSTATIC_BORDER", PyInt_FromLong((long) wxSTATIC_BORDER)); - PyDict_SetItemString(d,"wxTRANSPARENT_WINDOW", PyInt_FromLong((long) wxTRANSPARENT_WINDOW)); - PyDict_SetItemString(d,"wxNO_BORDER", PyInt_FromLong((long) wxNO_BORDER)); - PyDict_SetItemString(d,"wxUSER_COLOURS", PyInt_FromLong((long) wxUSER_COLOURS)); - PyDict_SetItemString(d,"wxNO_3D", PyInt_FromLong((long) wxNO_3D)); - PyDict_SetItemString(d,"wxTAB_TRAVERSAL", PyInt_FromLong((long) wxTAB_TRAVERSAL)); - PyDict_SetItemString(d,"wxHORIZONTAL", PyInt_FromLong((long) wxHORIZONTAL)); - PyDict_SetItemString(d,"wxVERTICAL", PyInt_FromLong((long) wxVERTICAL)); - PyDict_SetItemString(d,"wxBOTH", PyInt_FromLong((long) wxBOTH)); - PyDict_SetItemString(d,"wxCENTER_FRAME", PyInt_FromLong((long) wxCENTER_FRAME)); - PyDict_SetItemString(d,"wxSTAY_ON_TOP", PyInt_FromLong((long) wxSTAY_ON_TOP)); - PyDict_SetItemString(d,"wxICONIZE", PyInt_FromLong((long) wxICONIZE)); - PyDict_SetItemString(d,"wxMINIMIZE", PyInt_FromLong((long) wxMINIMIZE)); - PyDict_SetItemString(d,"wxMAXIMIZE", PyInt_FromLong((long) wxMAXIMIZE)); - PyDict_SetItemString(d,"wxTHICK_FRAME", PyInt_FromLong((long) wxTHICK_FRAME)); - PyDict_SetItemString(d,"wxSYSTEM_MENU", PyInt_FromLong((long) wxSYSTEM_MENU)); - PyDict_SetItemString(d,"wxMINIMIZE_BOX", PyInt_FromLong((long) wxMINIMIZE_BOX)); - PyDict_SetItemString(d,"wxMAXIMIZE_BOX", PyInt_FromLong((long) wxMAXIMIZE_BOX)); - PyDict_SetItemString(d,"wxTINY_CAPTION_HORIZ", PyInt_FromLong((long) wxTINY_CAPTION_HORIZ)); - PyDict_SetItemString(d,"wxTINY_CAPTION_VERT", PyInt_FromLong((long) wxTINY_CAPTION_VERT)); - PyDict_SetItemString(d,"wxRESIZE_BOX", PyInt_FromLong((long) wxRESIZE_BOX)); - PyDict_SetItemString(d,"wxRESIZE_BORDER", PyInt_FromLong((long) wxRESIZE_BORDER)); - PyDict_SetItemString(d,"wxDIALOG_MODAL", PyInt_FromLong((long) wxDIALOG_MODAL)); - PyDict_SetItemString(d,"wxDIALOG_MODELESS", PyInt_FromLong((long) wxDIALOG_MODELESS)); - PyDict_SetItemString(d,"wxDEFAULT_FRAME_STYLE", PyInt_FromLong((long) wxDEFAULT_FRAME_STYLE)); - PyDict_SetItemString(d,"wxDEFAULT_DIALOG_STYLE", PyInt_FromLong((long) wxDEFAULT_DIALOG_STYLE)); - PyDict_SetItemString(d,"wxRETAINED", PyInt_FromLong((long) wxRETAINED)); - PyDict_SetItemString(d,"wxBACKINGSTORE", PyInt_FromLong((long) wxBACKINGSTORE)); - PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS)); - PyDict_SetItemString(d,"wxTB_HORIZONTAL", PyInt_FromLong((long) wxTB_HORIZONTAL)); - PyDict_SetItemString(d,"wxTB_VERTICAL", PyInt_FromLong((long) wxTB_VERTICAL)); - PyDict_SetItemString(d,"wxCOLOURED", PyInt_FromLong((long) wxCOLOURED)); - PyDict_SetItemString(d,"wxFIXED_LENGTH", PyInt_FromLong((long) wxFIXED_LENGTH)); - PyDict_SetItemString(d,"wxALIGN_LEFT", PyInt_FromLong((long) wxALIGN_LEFT)); - PyDict_SetItemString(d,"wxALIGN_CENTER", PyInt_FromLong((long) wxALIGN_CENTER)); - PyDict_SetItemString(d,"wxALIGN_CENTRE", PyInt_FromLong((long) wxALIGN_CENTRE)); - PyDict_SetItemString(d,"wxALIGN_RIGHT", PyInt_FromLong((long) wxALIGN_RIGHT)); - PyDict_SetItemString(d,"wxLB_NEEDED_SB", PyInt_FromLong((long) wxLB_NEEDED_SB)); - PyDict_SetItemString(d,"wxLB_ALWAYS_SB", PyInt_FromLong((long) wxLB_ALWAYS_SB)); - PyDict_SetItemString(d,"wxLB_SORT", PyInt_FromLong((long) wxLB_SORT)); - PyDict_SetItemString(d,"wxLB_SINGLE", PyInt_FromLong((long) wxLB_SINGLE)); - PyDict_SetItemString(d,"wxLB_MULTIPLE", PyInt_FromLong((long) wxLB_MULTIPLE)); - PyDict_SetItemString(d,"wxLB_EXTENDED", PyInt_FromLong((long) wxLB_EXTENDED)); - PyDict_SetItemString(d,"wxLB_OWNERDRAW", PyInt_FromLong((long) wxLB_OWNERDRAW)); - PyDict_SetItemString(d,"wxLB_HSCROLL", PyInt_FromLong((long) wxLB_HSCROLL)); - PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER)); - PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD)); - PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); - PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); - PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); - PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE)); - PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE)); - PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN)); - PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT)); - PyDict_SetItemString(d,"wxCB_READONLY", PyInt_FromLong((long) wxCB_READONLY)); - PyDict_SetItemString(d,"wxRA_HORIZONTAL", PyInt_FromLong((long) wxRA_HORIZONTAL)); - PyDict_SetItemString(d,"wxRA_VERTICAL", PyInt_FromLong((long) wxRA_VERTICAL)); - PyDict_SetItemString(d,"wxRB_GROUP", PyInt_FromLong((long) wxRB_GROUP)); - PyDict_SetItemString(d,"wxGA_PROGRESSBAR", PyInt_FromLong((long) wxGA_PROGRESSBAR)); - PyDict_SetItemString(d,"wxGA_HORIZONTAL", PyInt_FromLong((long) wxGA_HORIZONTAL)); - PyDict_SetItemString(d,"wxGA_VERTICAL", PyInt_FromLong((long) wxGA_VERTICAL)); - PyDict_SetItemString(d,"wxSL_HORIZONTAL", PyInt_FromLong((long) wxSL_HORIZONTAL)); - PyDict_SetItemString(d,"wxSL_VERTICAL", PyInt_FromLong((long) wxSL_VERTICAL)); - PyDict_SetItemString(d,"wxSL_AUTOTICKS", PyInt_FromLong((long) wxSL_AUTOTICKS)); - PyDict_SetItemString(d,"wxSL_LABELS", PyInt_FromLong((long) wxSL_LABELS)); - PyDict_SetItemString(d,"wxSL_LEFT", PyInt_FromLong((long) wxSL_LEFT)); - PyDict_SetItemString(d,"wxSL_TOP", PyInt_FromLong((long) wxSL_TOP)); - PyDict_SetItemString(d,"wxSL_RIGHT", PyInt_FromLong((long) wxSL_RIGHT)); - PyDict_SetItemString(d,"wxSL_BOTTOM", PyInt_FromLong((long) wxSL_BOTTOM)); - PyDict_SetItemString(d,"wxSL_BOTH", PyInt_FromLong((long) wxSL_BOTH)); - PyDict_SetItemString(d,"wxSL_SELRANGE", PyInt_FromLong((long) wxSL_SELRANGE)); - PyDict_SetItemString(d,"wxSB_HORIZONTAL", PyInt_FromLong((long) wxSB_HORIZONTAL)); - PyDict_SetItemString(d,"wxSB_VERTICAL", PyInt_FromLong((long) wxSB_VERTICAL)); - PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW)); - PyDict_SetItemString(d,"wxBU_NOAUTODRAW", PyInt_FromLong((long) wxBU_NOAUTODRAW)); - PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS)); - PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS)); - PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON)); - PyDict_SetItemString(d,"wxLC_SMALL_ICON", PyInt_FromLong((long) wxLC_SMALL_ICON)); - PyDict_SetItemString(d,"wxLC_LIST", PyInt_FromLong((long) wxLC_LIST)); - PyDict_SetItemString(d,"wxLC_REPORT", PyInt_FromLong((long) wxLC_REPORT)); - PyDict_SetItemString(d,"wxLC_ALIGN_TOP", PyInt_FromLong((long) wxLC_ALIGN_TOP)); - PyDict_SetItemString(d,"wxLC_ALIGN_LEFT", PyInt_FromLong((long) wxLC_ALIGN_LEFT)); - PyDict_SetItemString(d,"wxLC_AUTOARRANGE", PyInt_FromLong((long) wxLC_AUTOARRANGE)); - PyDict_SetItemString(d,"wxLC_USER_TEXT", PyInt_FromLong((long) wxLC_USER_TEXT)); - PyDict_SetItemString(d,"wxLC_EDIT_LABELS", PyInt_FromLong((long) wxLC_EDIT_LABELS)); - PyDict_SetItemString(d,"wxLC_NO_HEADER", PyInt_FromLong((long) wxLC_NO_HEADER)); - PyDict_SetItemString(d,"wxLC_NO_SORT_HEADER", PyInt_FromLong((long) wxLC_NO_SORT_HEADER)); - PyDict_SetItemString(d,"wxLC_SINGLE_SEL", PyInt_FromLong((long) wxLC_SINGLE_SEL)); - PyDict_SetItemString(d,"wxLC_SORT_ASCENDING", PyInt_FromLong((long) wxLC_SORT_ASCENDING)); - PyDict_SetItemString(d,"wxLC_SORT_DESCENDING", PyInt_FromLong((long) wxLC_SORT_DESCENDING)); - PyDict_SetItemString(d,"wxLC_MASK_TYPE", PyInt_FromLong((long) wxLC_MASK_TYPE)); - PyDict_SetItemString(d,"wxLC_MASK_ALIGN", PyInt_FromLong((long) wxLC_MASK_ALIGN)); - PyDict_SetItemString(d,"wxLC_MASK_SORT", PyInt_FromLong((long) wxLC_MASK_SORT)); - PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL)); - PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL)); - PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS)); - PyDict_SetItemString(d,"wxSP_WRAP", PyInt_FromLong((long) wxSP_WRAP)); - PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); - PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); - PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); - PyDict_SetItemString(d,"wxTAB_MULTILINE", PyInt_FromLong((long) wxTAB_MULTILINE)); - PyDict_SetItemString(d,"wxTAB_RIGHTJUSTIFY", PyInt_FromLong((long) wxTAB_RIGHTJUSTIFY)); - PyDict_SetItemString(d,"wxTAB_FIXEDWIDTH", PyInt_FromLong((long) wxTAB_FIXEDWIDTH)); - PyDict_SetItemString(d,"wxTAB_OWNERDRAW", PyInt_FromLong((long) wxTAB_OWNERDRAW)); - PyDict_SetItemString(d,"wxFLOOD_SURFACE", PyInt_FromLong((long) wxFLOOD_SURFACE)); - PyDict_SetItemString(d,"wxFLOOD_BORDER", PyInt_FromLong((long) wxFLOOD_BORDER)); - PyDict_SetItemString(d,"wxODDEVEN_RULE", PyInt_FromLong((long) wxODDEVEN_RULE)); - PyDict_SetItemString(d,"wxWINDING_RULE", PyInt_FromLong((long) wxWINDING_RULE)); - PyDict_SetItemString(d,"wxTOOL_TOP", PyInt_FromLong((long) wxTOOL_TOP)); - PyDict_SetItemString(d,"wxTOOL_BOTTOM", PyInt_FromLong((long) wxTOOL_BOTTOM)); - PyDict_SetItemString(d,"wxTOOL_LEFT", PyInt_FromLong((long) wxTOOL_LEFT)); - PyDict_SetItemString(d,"wxTOOL_RIGHT", PyInt_FromLong((long) wxTOOL_RIGHT)); - PyDict_SetItemString(d,"wxOK", PyInt_FromLong((long) wxOK)); - PyDict_SetItemString(d,"wxYES_NO", PyInt_FromLong((long) wxYES_NO)); - PyDict_SetItemString(d,"wxCANCEL", PyInt_FromLong((long) wxCANCEL)); - PyDict_SetItemString(d,"wxYES", PyInt_FromLong((long) wxYES)); - PyDict_SetItemString(d,"wxNO", PyInt_FromLong((long) wxNO)); - PyDict_SetItemString(d,"wxICON_EXCLAMATION", PyInt_FromLong((long) wxICON_EXCLAMATION)); - PyDict_SetItemString(d,"wxICON_HAND", PyInt_FromLong((long) wxICON_HAND)); - PyDict_SetItemString(d,"wxICON_QUESTION", PyInt_FromLong((long) wxICON_QUESTION)); - PyDict_SetItemString(d,"wxICON_INFORMATION", PyInt_FromLong((long) wxICON_INFORMATION)); - PyDict_SetItemString(d,"wxICON_STOP", PyInt_FromLong((long) wxICON_STOP)); - PyDict_SetItemString(d,"wxICON_ASTERISK", PyInt_FromLong((long) wxICON_ASTERISK)); - PyDict_SetItemString(d,"wxICON_MASK", PyInt_FromLong((long) wxICON_MASK)); - PyDict_SetItemString(d,"wxCENTRE", PyInt_FromLong((long) wxCENTRE)); - PyDict_SetItemString(d,"wxCENTER", PyInt_FromLong((long) wxCENTER)); - PyDict_SetItemString(d,"wxSIZE_AUTO_WIDTH", PyInt_FromLong((long) wxSIZE_AUTO_WIDTH)); - PyDict_SetItemString(d,"wxSIZE_AUTO_HEIGHT", PyInt_FromLong((long) wxSIZE_AUTO_HEIGHT)); - PyDict_SetItemString(d,"wxSIZE_AUTO", PyInt_FromLong((long) wxSIZE_AUTO)); - PyDict_SetItemString(d,"wxSIZE_USE_EXISTING", PyInt_FromLong((long) wxSIZE_USE_EXISTING)); - PyDict_SetItemString(d,"wxSIZE_ALLOW_MINUS_ONE", PyInt_FromLong((long) wxSIZE_ALLOW_MINUS_ONE)); - PyDict_SetItemString(d,"wxDF_TEXT", PyInt_FromLong((long) wxDF_TEXT)); - PyDict_SetItemString(d,"wxDF_BITMAP", PyInt_FromLong((long) wxDF_BITMAP)); - PyDict_SetItemString(d,"wxDF_METAFILE", PyInt_FromLong((long) wxDF_METAFILE)); - PyDict_SetItemString(d,"wxDF_DIB", PyInt_FromLong((long) wxDF_DIB)); - PyDict_SetItemString(d,"wxDF_OEMTEXT", PyInt_FromLong((long) wxDF_OEMTEXT)); - PyDict_SetItemString(d,"wxDF_FILENAME", PyInt_FromLong((long) wxDF_FILENAME)); - PyDict_SetItemString(d,"wxPORTRAIT", PyInt_FromLong((long) wxPORTRAIT)); - PyDict_SetItemString(d,"wxLANDSCAPE", PyInt_FromLong((long) wxLANDSCAPE)); - PyDict_SetItemString(d,"wxID_OPEN", PyInt_FromLong((long) wxID_OPEN)); - PyDict_SetItemString(d,"wxID_CLOSE", PyInt_FromLong((long) wxID_CLOSE)); - PyDict_SetItemString(d,"wxID_NEW", PyInt_FromLong((long) wxID_NEW)); - PyDict_SetItemString(d,"wxID_SAVE", PyInt_FromLong((long) wxID_SAVE)); - PyDict_SetItemString(d,"wxID_SAVEAS", PyInt_FromLong((long) wxID_SAVEAS)); - PyDict_SetItemString(d,"wxID_REVERT", PyInt_FromLong((long) wxID_REVERT)); - PyDict_SetItemString(d,"wxID_EXIT", PyInt_FromLong((long) wxID_EXIT)); - PyDict_SetItemString(d,"wxID_UNDO", PyInt_FromLong((long) wxID_UNDO)); - PyDict_SetItemString(d,"wxID_REDO", PyInt_FromLong((long) wxID_REDO)); - PyDict_SetItemString(d,"wxID_HELP", PyInt_FromLong((long) wxID_HELP)); - PyDict_SetItemString(d,"wxID_PRINT", PyInt_FromLong((long) wxID_PRINT)); - PyDict_SetItemString(d,"wxID_PRINT_SETUP", PyInt_FromLong((long) wxID_PRINT_SETUP)); - PyDict_SetItemString(d,"wxID_PREVIEW", PyInt_FromLong((long) wxID_PREVIEW)); - PyDict_SetItemString(d,"wxID_ABOUT", PyInt_FromLong((long) wxID_ABOUT)); - PyDict_SetItemString(d,"wxID_HELP_CONTENTS", PyInt_FromLong((long) wxID_HELP_CONTENTS)); - PyDict_SetItemString(d,"wxID_HELP_COMMANDS", PyInt_FromLong((long) wxID_HELP_COMMANDS)); - PyDict_SetItemString(d,"wxID_HELP_PROCEDURES", PyInt_FromLong((long) wxID_HELP_PROCEDURES)); - PyDict_SetItemString(d,"wxID_HELP_CONTEXT", PyInt_FromLong((long) wxID_HELP_CONTEXT)); - PyDict_SetItemString(d,"wxID_CUT", PyInt_FromLong((long) wxID_CUT)); - PyDict_SetItemString(d,"wxID_COPY", PyInt_FromLong((long) wxID_COPY)); - PyDict_SetItemString(d,"wxID_PASTE", PyInt_FromLong((long) wxID_PASTE)); - PyDict_SetItemString(d,"wxID_CLEAR", PyInt_FromLong((long) wxID_CLEAR)); - PyDict_SetItemString(d,"wxID_FIND", PyInt_FromLong((long) wxID_FIND)); - PyDict_SetItemString(d,"wxID_FILE1", PyInt_FromLong((long) wxID_FILE1)); - PyDict_SetItemString(d,"wxID_FILE2", PyInt_FromLong((long) wxID_FILE2)); - PyDict_SetItemString(d,"wxID_FILE3", PyInt_FromLong((long) wxID_FILE3)); - PyDict_SetItemString(d,"wxID_FILE4", PyInt_FromLong((long) wxID_FILE4)); - PyDict_SetItemString(d,"wxID_FILE5", PyInt_FromLong((long) wxID_FILE5)); - PyDict_SetItemString(d,"wxID_FILE6", PyInt_FromLong((long) wxID_FILE6)); - PyDict_SetItemString(d,"wxID_FILE7", PyInt_FromLong((long) wxID_FILE7)); - PyDict_SetItemString(d,"wxID_FILE8", PyInt_FromLong((long) wxID_FILE8)); - PyDict_SetItemString(d,"wxID_FILE9", PyInt_FromLong((long) wxID_FILE9)); - PyDict_SetItemString(d,"wxID_OK", PyInt_FromLong((long) wxID_OK)); - PyDict_SetItemString(d,"wxID_CANCEL", PyInt_FromLong((long) wxID_CANCEL)); - PyDict_SetItemString(d,"wxID_APPLY", PyInt_FromLong((long) wxID_APPLY)); - PyDict_SetItemString(d,"wxID_YES", PyInt_FromLong((long) wxID_YES)); - PyDict_SetItemString(d,"wxID_NO", PyInt_FromLong((long) wxID_NO)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP", PyInt_FromLong((long) wxBITMAP_TYPE_BMP)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_BMP_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_BMP_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ICO", PyInt_FromLong((long) wxBITMAP_TYPE_ICO)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ICO_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_ICO_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_CUR", PyInt_FromLong((long) wxBITMAP_TYPE_CUR)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_CUR_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_CUR_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XBM", PyInt_FromLong((long) wxBITMAP_TYPE_XBM)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XBM_DATA", PyInt_FromLong((long) wxBITMAP_TYPE_XBM_DATA)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XPM", PyInt_FromLong((long) wxBITMAP_TYPE_XPM)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_XPM_DATA", PyInt_FromLong((long) wxBITMAP_TYPE_XPM_DATA)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_TIF", PyInt_FromLong((long) wxBITMAP_TYPE_TIF)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_TIF_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_TIF_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_GIF", PyInt_FromLong((long) wxBITMAP_TYPE_GIF)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_GIF_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_GIF_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_PNG", PyInt_FromLong((long) wxBITMAP_TYPE_PNG)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_PNG_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_PNG_RESOURCE)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_ANY", PyInt_FromLong((long) wxBITMAP_TYPE_ANY)); - PyDict_SetItemString(d,"wxBITMAP_TYPE_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_RESOURCE)); - PyDict_SetItemString(d,"wxOPEN", PyInt_FromLong((long) wxOPEN)); - PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE)); - PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY)); - PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT)); - PyDict_SetItemString(d,"wxACCEL_ALT", PyInt_FromLong((long) wxACCEL_ALT)); - PyDict_SetItemString(d,"wxACCEL_CTRL", PyInt_FromLong((long) wxACCEL_CTRL)); - PyDict_SetItemString(d,"wxACCEL_SHIFT", PyInt_FromLong((long) wxACCEL_SHIFT)); - PyDict_SetItemString(d,"ERR_PARAM", PyInt_FromLong((long) ERR_PARAM)); - PyDict_SetItemString(d,"ERR_NODATA", PyInt_FromLong((long) ERR_NODATA)); - PyDict_SetItemString(d,"ERR_CANCEL", PyInt_FromLong((long) ERR_CANCEL)); - PyDict_SetItemString(d,"ERR_SUCCESS", PyInt_FromLong((long) ERR_SUCCESS)); - PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); - PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); - PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); - PyDict_SetItemString(d,"wxSCRIPT", PyInt_FromLong((long) wxSCRIPT)); - PyDict_SetItemString(d,"wxSWISS", PyInt_FromLong((long) wxSWISS)); - PyDict_SetItemString(d,"wxMODERN", PyInt_FromLong((long) wxMODERN)); - PyDict_SetItemString(d,"wxTELETYPE", PyInt_FromLong((long) wxTELETYPE)); - PyDict_SetItemString(d,"wxVARIABLE", PyInt_FromLong((long) wxVARIABLE)); - PyDict_SetItemString(d,"wxFIXED", PyInt_FromLong((long) wxFIXED)); - PyDict_SetItemString(d,"wxNORMAL", PyInt_FromLong((long) wxNORMAL)); - PyDict_SetItemString(d,"wxLIGHT", PyInt_FromLong((long) wxLIGHT)); - PyDict_SetItemString(d,"wxBOLD", PyInt_FromLong((long) wxBOLD)); - PyDict_SetItemString(d,"wxITALIC", PyInt_FromLong((long) wxITALIC)); - PyDict_SetItemString(d,"wxSLANT", PyInt_FromLong((long) wxSLANT)); - PyDict_SetItemString(d,"wxSOLID", PyInt_FromLong((long) wxSOLID)); - PyDict_SetItemString(d,"wxDOT", PyInt_FromLong((long) wxDOT)); - PyDict_SetItemString(d,"wxLONG_DASH", PyInt_FromLong((long) wxLONG_DASH)); - PyDict_SetItemString(d,"wxSHORT_DASH", PyInt_FromLong((long) wxSHORT_DASH)); - PyDict_SetItemString(d,"wxDOT_DASH", PyInt_FromLong((long) wxDOT_DASH)); - PyDict_SetItemString(d,"wxUSER_DASH", PyInt_FromLong((long) wxUSER_DASH)); - PyDict_SetItemString(d,"wxTRANSPARENT", PyInt_FromLong((long) wxTRANSPARENT)); - PyDict_SetItemString(d,"wxSTIPPLE", PyInt_FromLong((long) wxSTIPPLE)); - PyDict_SetItemString(d,"wxBDIAGONAL_HATCH", PyInt_FromLong((long) wxBDIAGONAL_HATCH)); - PyDict_SetItemString(d,"wxCROSSDIAG_HATCH", PyInt_FromLong((long) wxCROSSDIAG_HATCH)); - PyDict_SetItemString(d,"wxFDIAGONAL_HATCH", PyInt_FromLong((long) wxFDIAGONAL_HATCH)); - PyDict_SetItemString(d,"wxCROSS_HATCH", PyInt_FromLong((long) wxCROSS_HATCH)); - PyDict_SetItemString(d,"wxHORIZONTAL_HATCH", PyInt_FromLong((long) wxHORIZONTAL_HATCH)); - PyDict_SetItemString(d,"wxVERTICAL_HATCH", PyInt_FromLong((long) wxVERTICAL_HATCH)); - PyDict_SetItemString(d,"wxJOIN_BEVEL", PyInt_FromLong((long) wxJOIN_BEVEL)); - PyDict_SetItemString(d,"wxJOIN_MITER", PyInt_FromLong((long) wxJOIN_MITER)); - PyDict_SetItemString(d,"wxJOIN_ROUND", PyInt_FromLong((long) wxJOIN_ROUND)); - PyDict_SetItemString(d,"wxCAP_ROUND", PyInt_FromLong((long) wxCAP_ROUND)); - PyDict_SetItemString(d,"wxCAP_PROJECTING", PyInt_FromLong((long) wxCAP_PROJECTING)); - PyDict_SetItemString(d,"wxCAP_BUTT", PyInt_FromLong((long) wxCAP_BUTT)); - PyDict_SetItemString(d,"wxCLEAR", PyInt_FromLong((long) wxCLEAR)); - PyDict_SetItemString(d,"wxXOR", PyInt_FromLong((long) wxXOR)); - PyDict_SetItemString(d,"wxINVERT", PyInt_FromLong((long) wxINVERT)); - PyDict_SetItemString(d,"wxOR_REVERSE", PyInt_FromLong((long) wxOR_REVERSE)); - PyDict_SetItemString(d,"wxAND_REVERSE", PyInt_FromLong((long) wxAND_REVERSE)); - PyDict_SetItemString(d,"wxCOPY", PyInt_FromLong((long) wxCOPY)); - PyDict_SetItemString(d,"wxAND", PyInt_FromLong((long) wxAND)); - PyDict_SetItemString(d,"wxAND_INVERT", PyInt_FromLong((long) wxAND_INVERT)); - PyDict_SetItemString(d,"wxNO_OP", PyInt_FromLong((long) wxNO_OP)); - PyDict_SetItemString(d,"wxNOR", PyInt_FromLong((long) wxNOR)); - PyDict_SetItemString(d,"wxEQUIV", PyInt_FromLong((long) wxEQUIV)); - PyDict_SetItemString(d,"wxSRC_INVERT", PyInt_FromLong((long) wxSRC_INVERT)); - PyDict_SetItemString(d,"wxOR_INVERT", PyInt_FromLong((long) wxOR_INVERT)); - PyDict_SetItemString(d,"wxNAND", PyInt_FromLong((long) wxNAND)); - PyDict_SetItemString(d,"wxOR", PyInt_FromLong((long) wxOR)); - PyDict_SetItemString(d,"wxSET", PyInt_FromLong((long) wxSET)); - PyDict_SetItemString(d,"wxSRC_OR", PyInt_FromLong((long) wxSRC_OR)); - PyDict_SetItemString(d,"wxSRC_AND", PyInt_FromLong((long) wxSRC_AND)); - PyDict_SetItemString(d,"WXK_BACK", PyInt_FromLong((long) WXK_BACK)); - PyDict_SetItemString(d,"WXK_TAB", PyInt_FromLong((long) WXK_TAB)); - PyDict_SetItemString(d,"WXK_RETURN", PyInt_FromLong((long) WXK_RETURN)); - PyDict_SetItemString(d,"WXK_ESCAPE", PyInt_FromLong((long) WXK_ESCAPE)); - PyDict_SetItemString(d,"WXK_SPACE", PyInt_FromLong((long) WXK_SPACE)); - PyDict_SetItemString(d,"WXK_DELETE", PyInt_FromLong((long) WXK_DELETE)); - PyDict_SetItemString(d,"WXK_START", PyInt_FromLong((long) WXK_START)); - PyDict_SetItemString(d,"WXK_LBUTTON", PyInt_FromLong((long) WXK_LBUTTON)); - PyDict_SetItemString(d,"WXK_RBUTTON", PyInt_FromLong((long) WXK_RBUTTON)); - PyDict_SetItemString(d,"WXK_CANCEL", PyInt_FromLong((long) WXK_CANCEL)); - PyDict_SetItemString(d,"WXK_MBUTTON", PyInt_FromLong((long) WXK_MBUTTON)); - PyDict_SetItemString(d,"WXK_CLEAR", PyInt_FromLong((long) WXK_CLEAR)); - PyDict_SetItemString(d,"WXK_SHIFT", PyInt_FromLong((long) WXK_SHIFT)); - PyDict_SetItemString(d,"WXK_CONTROL", PyInt_FromLong((long) WXK_CONTROL)); - PyDict_SetItemString(d,"WXK_MENU", PyInt_FromLong((long) WXK_MENU)); - PyDict_SetItemString(d,"WXK_PAUSE", PyInt_FromLong((long) WXK_PAUSE)); - PyDict_SetItemString(d,"WXK_CAPITAL", PyInt_FromLong((long) WXK_CAPITAL)); - PyDict_SetItemString(d,"WXK_PRIOR", PyInt_FromLong((long) WXK_PRIOR)); - PyDict_SetItemString(d,"WXK_NEXT", PyInt_FromLong((long) WXK_NEXT)); - PyDict_SetItemString(d,"WXK_END", PyInt_FromLong((long) WXK_END)); - PyDict_SetItemString(d,"WXK_HOME", PyInt_FromLong((long) WXK_HOME)); - PyDict_SetItemString(d,"WXK_LEFT", PyInt_FromLong((long) WXK_LEFT)); - PyDict_SetItemString(d,"WXK_UP", PyInt_FromLong((long) WXK_UP)); - PyDict_SetItemString(d,"WXK_RIGHT", PyInt_FromLong((long) WXK_RIGHT)); - PyDict_SetItemString(d,"WXK_DOWN", PyInt_FromLong((long) WXK_DOWN)); - PyDict_SetItemString(d,"WXK_SELECT", PyInt_FromLong((long) WXK_SELECT)); - PyDict_SetItemString(d,"WXK_PRINT", PyInt_FromLong((long) WXK_PRINT)); - PyDict_SetItemString(d,"WXK_EXECUTE", PyInt_FromLong((long) WXK_EXECUTE)); - PyDict_SetItemString(d,"WXK_SNAPSHOT", PyInt_FromLong((long) WXK_SNAPSHOT)); - PyDict_SetItemString(d,"WXK_INSERT", PyInt_FromLong((long) WXK_INSERT)); - PyDict_SetItemString(d,"WXK_HELP", PyInt_FromLong((long) WXK_HELP)); - PyDict_SetItemString(d,"WXK_NUMPAD0", PyInt_FromLong((long) WXK_NUMPAD0)); - PyDict_SetItemString(d,"WXK_NUMPAD1", PyInt_FromLong((long) WXK_NUMPAD1)); - PyDict_SetItemString(d,"WXK_NUMPAD2", PyInt_FromLong((long) WXK_NUMPAD2)); - PyDict_SetItemString(d,"WXK_NUMPAD3", PyInt_FromLong((long) WXK_NUMPAD3)); - PyDict_SetItemString(d,"WXK_NUMPAD4", PyInt_FromLong((long) WXK_NUMPAD4)); - PyDict_SetItemString(d,"WXK_NUMPAD5", PyInt_FromLong((long) WXK_NUMPAD5)); - PyDict_SetItemString(d,"WXK_NUMPAD6", PyInt_FromLong((long) WXK_NUMPAD6)); - PyDict_SetItemString(d,"WXK_NUMPAD7", PyInt_FromLong((long) WXK_NUMPAD7)); - PyDict_SetItemString(d,"WXK_NUMPAD8", PyInt_FromLong((long) WXK_NUMPAD8)); - PyDict_SetItemString(d,"WXK_NUMPAD9", PyInt_FromLong((long) WXK_NUMPAD9)); - PyDict_SetItemString(d,"WXK_MULTIPLY", PyInt_FromLong((long) WXK_MULTIPLY)); - PyDict_SetItemString(d,"WXK_ADD", PyInt_FromLong((long) WXK_ADD)); - PyDict_SetItemString(d,"WXK_SEPARATOR", PyInt_FromLong((long) WXK_SEPARATOR)); - PyDict_SetItemString(d,"WXK_SUBTRACT", PyInt_FromLong((long) WXK_SUBTRACT)); - PyDict_SetItemString(d,"WXK_DECIMAL", PyInt_FromLong((long) WXK_DECIMAL)); - PyDict_SetItemString(d,"WXK_DIVIDE", PyInt_FromLong((long) WXK_DIVIDE)); - PyDict_SetItemString(d,"WXK_F1", PyInt_FromLong((long) WXK_F1)); - PyDict_SetItemString(d,"WXK_F2", PyInt_FromLong((long) WXK_F2)); - PyDict_SetItemString(d,"WXK_F3", PyInt_FromLong((long) WXK_F3)); - PyDict_SetItemString(d,"WXK_F4", PyInt_FromLong((long) WXK_F4)); - PyDict_SetItemString(d,"WXK_F5", PyInt_FromLong((long) WXK_F5)); - PyDict_SetItemString(d,"WXK_F6", PyInt_FromLong((long) WXK_F6)); - PyDict_SetItemString(d,"WXK_F7", PyInt_FromLong((long) WXK_F7)); - PyDict_SetItemString(d,"WXK_F8", PyInt_FromLong((long) WXK_F8)); - PyDict_SetItemString(d,"WXK_F9", PyInt_FromLong((long) WXK_F9)); - PyDict_SetItemString(d,"WXK_F10", PyInt_FromLong((long) WXK_F10)); - PyDict_SetItemString(d,"WXK_F11", PyInt_FromLong((long) WXK_F11)); - PyDict_SetItemString(d,"WXK_F12", PyInt_FromLong((long) WXK_F12)); - PyDict_SetItemString(d,"WXK_F13", PyInt_FromLong((long) WXK_F13)); - PyDict_SetItemString(d,"WXK_F14", PyInt_FromLong((long) WXK_F14)); - PyDict_SetItemString(d,"WXK_F15", PyInt_FromLong((long) WXK_F15)); - PyDict_SetItemString(d,"WXK_F16", PyInt_FromLong((long) WXK_F16)); - PyDict_SetItemString(d,"WXK_F17", PyInt_FromLong((long) WXK_F17)); - PyDict_SetItemString(d,"WXK_F18", PyInt_FromLong((long) WXK_F18)); - PyDict_SetItemString(d,"WXK_F19", PyInt_FromLong((long) WXK_F19)); - PyDict_SetItemString(d,"WXK_F20", PyInt_FromLong((long) WXK_F20)); - PyDict_SetItemString(d,"WXK_F21", PyInt_FromLong((long) WXK_F21)); - PyDict_SetItemString(d,"WXK_F22", PyInt_FromLong((long) WXK_F22)); - PyDict_SetItemString(d,"WXK_F23", PyInt_FromLong((long) WXK_F23)); - PyDict_SetItemString(d,"WXK_F24", PyInt_FromLong((long) WXK_F24)); - PyDict_SetItemString(d,"WXK_NUMLOCK", PyInt_FromLong((long) WXK_NUMLOCK)); - PyDict_SetItemString(d,"WXK_SCROLL", PyInt_FromLong((long) WXK_SCROLL)); - PyDict_SetItemString(d,"WXK_PAGEUP", PyInt_FromLong((long) WXK_PAGEUP)); - PyDict_SetItemString(d,"WXK_PAGEDOWN", PyInt_FromLong((long) WXK_PAGEDOWN)); - PyDict_SetItemString(d,"wxCURSOR_ARROW", PyInt_FromLong((long) wxCURSOR_ARROW)); - PyDict_SetItemString(d,"wxCURSOR_BULLSEYE", PyInt_FromLong((long) wxCURSOR_BULLSEYE)); - PyDict_SetItemString(d,"wxCURSOR_CHAR", PyInt_FromLong((long) wxCURSOR_CHAR)); - PyDict_SetItemString(d,"wxCURSOR_CROSS", PyInt_FromLong((long) wxCURSOR_CROSS)); - PyDict_SetItemString(d,"wxCURSOR_HAND", PyInt_FromLong((long) wxCURSOR_HAND)); - PyDict_SetItemString(d,"wxCURSOR_IBEAM", PyInt_FromLong((long) wxCURSOR_IBEAM)); - PyDict_SetItemString(d,"wxCURSOR_LEFT_BUTTON", PyInt_FromLong((long) wxCURSOR_LEFT_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_MAGNIFIER", PyInt_FromLong((long) wxCURSOR_MAGNIFIER)); - PyDict_SetItemString(d,"wxCURSOR_MIDDLE_BUTTON", PyInt_FromLong((long) wxCURSOR_MIDDLE_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_NO_ENTRY", PyInt_FromLong((long) wxCURSOR_NO_ENTRY)); - PyDict_SetItemString(d,"wxCURSOR_PAINT_BRUSH", PyInt_FromLong((long) wxCURSOR_PAINT_BRUSH)); - PyDict_SetItemString(d,"wxCURSOR_PENCIL", PyInt_FromLong((long) wxCURSOR_PENCIL)); - PyDict_SetItemString(d,"wxCURSOR_POINT_LEFT", PyInt_FromLong((long) wxCURSOR_POINT_LEFT)); - PyDict_SetItemString(d,"wxCURSOR_POINT_RIGHT", PyInt_FromLong((long) wxCURSOR_POINT_RIGHT)); - PyDict_SetItemString(d,"wxCURSOR_QUESTION_ARROW", PyInt_FromLong((long) wxCURSOR_QUESTION_ARROW)); - PyDict_SetItemString(d,"wxCURSOR_RIGHT_BUTTON", PyInt_FromLong((long) wxCURSOR_RIGHT_BUTTON)); - PyDict_SetItemString(d,"wxCURSOR_SIZENESW", PyInt_FromLong((long) wxCURSOR_SIZENESW)); - PyDict_SetItemString(d,"wxCURSOR_SIZENS", PyInt_FromLong((long) wxCURSOR_SIZENS)); - PyDict_SetItemString(d,"wxCURSOR_SIZENWSE", PyInt_FromLong((long) wxCURSOR_SIZENWSE)); - PyDict_SetItemString(d,"wxCURSOR_SIZEWE", PyInt_FromLong((long) wxCURSOR_SIZEWE)); - PyDict_SetItemString(d,"wxCURSOR_SIZING", PyInt_FromLong((long) wxCURSOR_SIZING)); - PyDict_SetItemString(d,"wxCURSOR_SPRAYCAN", PyInt_FromLong((long) wxCURSOR_SPRAYCAN)); - PyDict_SetItemString(d,"wxCURSOR_WAIT", PyInt_FromLong((long) wxCURSOR_WAIT)); - PyDict_SetItemString(d,"wxCURSOR_WATCH", PyInt_FromLong((long) wxCURSOR_WATCH)); - PyDict_SetItemString(d,"wxCURSOR_BLANK", PyInt_FromLong((long) wxCURSOR_BLANK)); - PyDict_SetItemString(d,"FALSE", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"false", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"TRUE", PyInt_FromLong((long) 1)); - PyDict_SetItemString(d,"true", PyInt_FromLong((long) 1)); - PyDict_SetItemString(d,"wxEVT_NULL", PyInt_FromLong((long) wxEVT_NULL)); - PyDict_SetItemString(d,"wxEVT_FIRST", PyInt_FromLong((long) wxEVT_FIRST)); - PyDict_SetItemString(d,"wxEVT_COMMAND_BUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_BUTTON_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHECKBOX_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_CHECKBOX_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHOICE_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_CHOICE_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LISTBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LISTBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LISTBOX_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_LISTBOX_DOUBLECLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_CHECKLISTBOX_TOGGLED", PyInt_FromLong((long) wxEVT_COMMAND_CHECKLISTBOX_TOGGLED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TEXT_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TEXT_ENTER)); - PyDict_SetItemString(d,"wxEVT_COMMAND_MENU_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_MENU_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SLIDER_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SLIDER_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RADIOBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_RADIOBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RADIOBUTTON_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_RADIOBUTTON_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SCROLLBAR_UPDATED", PyInt_FromLong((long) wxEVT_COMMAND_SCROLLBAR_UPDATED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_VLBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_VLBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_COMBOBOX_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_COMBOBOX_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_CLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_RCLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_RCLICKED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_ENTER)); - PyDict_SetItemString(d,"wxEVT_SET_FOCUS", PyInt_FromLong((long) wxEVT_SET_FOCUS)); - PyDict_SetItemString(d,"wxEVT_KILL_FOCUS", PyInt_FromLong((long) wxEVT_KILL_FOCUS)); - PyDict_SetItemString(d,"wxEVT_LEFT_DOWN", PyInt_FromLong((long) wxEVT_LEFT_DOWN)); - PyDict_SetItemString(d,"wxEVT_LEFT_UP", PyInt_FromLong((long) wxEVT_LEFT_UP)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_DOWN", PyInt_FromLong((long) wxEVT_MIDDLE_DOWN)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_UP", PyInt_FromLong((long) wxEVT_MIDDLE_UP)); - PyDict_SetItemString(d,"wxEVT_RIGHT_DOWN", PyInt_FromLong((long) wxEVT_RIGHT_DOWN)); - PyDict_SetItemString(d,"wxEVT_RIGHT_UP", PyInt_FromLong((long) wxEVT_RIGHT_UP)); - PyDict_SetItemString(d,"wxEVT_MOTION", PyInt_FromLong((long) wxEVT_MOTION)); - PyDict_SetItemString(d,"wxEVT_ENTER_WINDOW", PyInt_FromLong((long) wxEVT_ENTER_WINDOW)); - PyDict_SetItemString(d,"wxEVT_LEAVE_WINDOW", PyInt_FromLong((long) wxEVT_LEAVE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_MIDDLE_DCLICK)); - PyDict_SetItemString(d,"wxEVT_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_DOWN", PyInt_FromLong((long) wxEVT_NC_LEFT_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_UP", PyInt_FromLong((long) wxEVT_NC_LEFT_UP)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DOWN", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_UP", PyInt_FromLong((long) wxEVT_NC_MIDDLE_UP)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DOWN", PyInt_FromLong((long) wxEVT_NC_RIGHT_DOWN)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_UP", PyInt_FromLong((long) wxEVT_NC_RIGHT_UP)); - PyDict_SetItemString(d,"wxEVT_NC_MOTION", PyInt_FromLong((long) wxEVT_NC_MOTION)); - PyDict_SetItemString(d,"wxEVT_NC_ENTER_WINDOW", PyInt_FromLong((long) wxEVT_NC_ENTER_WINDOW)); - PyDict_SetItemString(d,"wxEVT_NC_LEAVE_WINDOW", PyInt_FromLong((long) wxEVT_NC_LEAVE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_NC_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_NC_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_MIDDLE_DCLICK", PyInt_FromLong((long) wxEVT_NC_MIDDLE_DCLICK)); - PyDict_SetItemString(d,"wxEVT_NC_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_NC_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_CHAR", PyInt_FromLong((long) wxEVT_CHAR)); - PyDict_SetItemString(d,"wxEVT_SCROLL_TOP", PyInt_FromLong((long) wxEVT_SCROLL_TOP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLL_BOTTOM)); - PyDict_SetItemString(d,"wxEVT_SCROLL_LINEUP", PyInt_FromLong((long) wxEVT_SCROLL_LINEUP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_LINEDOWN", PyInt_FromLong((long) wxEVT_SCROLL_LINEDOWN)); - PyDict_SetItemString(d,"wxEVT_SCROLL_PAGEUP", PyInt_FromLong((long) wxEVT_SCROLL_PAGEUP)); - PyDict_SetItemString(d,"wxEVT_SCROLL_PAGEDOWN", PyInt_FromLong((long) wxEVT_SCROLL_PAGEDOWN)); - PyDict_SetItemString(d,"wxEVT_SCROLL_THUMBTRACK", PyInt_FromLong((long) wxEVT_SCROLL_THUMBTRACK)); - PyDict_SetItemString(d,"wxEVT_SIZE", PyInt_FromLong((long) wxEVT_SIZE)); - PyDict_SetItemString(d,"wxEVT_MOVE", PyInt_FromLong((long) wxEVT_MOVE)); - PyDict_SetItemString(d,"wxEVT_CLOSE_WINDOW", PyInt_FromLong((long) wxEVT_CLOSE_WINDOW)); - PyDict_SetItemString(d,"wxEVT_END_SESSION", PyInt_FromLong((long) wxEVT_END_SESSION)); - PyDict_SetItemString(d,"wxEVT_QUERY_END_SESSION", PyInt_FromLong((long) wxEVT_QUERY_END_SESSION)); - PyDict_SetItemString(d,"wxEVT_ACTIVATE_APP", PyInt_FromLong((long) wxEVT_ACTIVATE_APP)); - PyDict_SetItemString(d,"wxEVT_POWER", PyInt_FromLong((long) wxEVT_POWER)); - PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); - PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); - PyDict_SetItemString(d,"wxEVT_ACTIVATE", PyInt_FromLong((long) wxEVT_ACTIVATE)); - PyDict_SetItemString(d,"wxEVT_CREATE", PyInt_FromLong((long) wxEVT_CREATE)); - PyDict_SetItemString(d,"wxEVT_DESTROY", PyInt_FromLong((long) wxEVT_DESTROY)); - PyDict_SetItemString(d,"wxEVT_SHOW", PyInt_FromLong((long) wxEVT_SHOW)); - PyDict_SetItemString(d,"wxEVT_ICONIZE", PyInt_FromLong((long) wxEVT_ICONIZE)); - PyDict_SetItemString(d,"wxEVT_MAXIMIZE", PyInt_FromLong((long) wxEVT_MAXIMIZE)); - PyDict_SetItemString(d,"wxEVT_MOUSE_CAPTURE_CHANGED", PyInt_FromLong((long) wxEVT_MOUSE_CAPTURE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_PAINT", PyInt_FromLong((long) wxEVT_PAINT)); - PyDict_SetItemString(d,"wxEVT_ERASE_BACKGROUND", PyInt_FromLong((long) wxEVT_ERASE_BACKGROUND)); - PyDict_SetItemString(d,"wxEVT_NC_PAINT", PyInt_FromLong((long) wxEVT_NC_PAINT)); - PyDict_SetItemString(d,"wxEVT_PAINT_ICON", PyInt_FromLong((long) wxEVT_PAINT_ICON)); - PyDict_SetItemString(d,"wxEVT_MENU_CHAR", PyInt_FromLong((long) wxEVT_MENU_CHAR)); - PyDict_SetItemString(d,"wxEVT_MENU_INIT", PyInt_FromLong((long) wxEVT_MENU_INIT)); - PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT)); - PyDict_SetItemString(d,"wxEVT_POPUP_MENU_INIT", PyInt_FromLong((long) wxEVT_POPUP_MENU_INIT)); - PyDict_SetItemString(d,"wxEVT_CONTEXT_MENU", PyInt_FromLong((long) wxEVT_CONTEXT_MENU)); - PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED)); - PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED)); - PyDict_SetItemString(d,"wxEVT_QUERY_NEW_PALETTE", PyInt_FromLong((long) wxEVT_QUERY_NEW_PALETTE)); - PyDict_SetItemString(d,"wxEVT_PALETTE_CHANGED", PyInt_FromLong((long) wxEVT_PALETTE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_JOY_BUTTON_DOWN", PyInt_FromLong((long) wxEVT_JOY_BUTTON_DOWN)); - PyDict_SetItemString(d,"wxEVT_JOY_BUTTON_UP", PyInt_FromLong((long) wxEVT_JOY_BUTTON_UP)); - PyDict_SetItemString(d,"wxEVT_JOY_MOVE", PyInt_FromLong((long) wxEVT_JOY_MOVE)); - PyDict_SetItemString(d,"wxEVT_JOY_ZMOVE", PyInt_FromLong((long) wxEVT_JOY_ZMOVE)); - PyDict_SetItemString(d,"wxEVT_DROP_FILES", PyInt_FromLong((long) wxEVT_DROP_FILES)); - PyDict_SetItemString(d,"wxEVT_DRAW_ITEM", PyInt_FromLong((long) wxEVT_DRAW_ITEM)); - PyDict_SetItemString(d,"wxEVT_MEASURE_ITEM", PyInt_FromLong((long) wxEVT_MEASURE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMPARE_ITEM", PyInt_FromLong((long) wxEVT_COMPARE_ITEM)); - PyDict_SetItemString(d,"wxEVT_INIT_DIALOG", PyInt_FromLong((long) wxEVT_INIT_DIALOG)); - PyDict_SetItemString(d,"wxEVT_IDLE", PyInt_FromLong((long) wxEVT_IDLE)); - PyDict_SetItemString(d,"wxEVT_UPDATE_UI", PyInt_FromLong((long) wxEVT_UPDATE_UI)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LEFT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LEFT_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_COMMAND_LEFT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_RIGHT_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_COMMAND_RIGHT_DCLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_SET_FOCUS", PyInt_FromLong((long) wxEVT_COMMAND_SET_FOCUS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_KILL_FOCUS", PyInt_FromLong((long) wxEVT_COMMAND_KILL_FOCUS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_ENTER)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_DRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_RDRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_RDRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_DELETE_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_TREE_DELETE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_GET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_TREE_GET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_EXPANDED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_EXPANDED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_EXPANDING", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_EXPANDING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_KEY_DOWN", PyInt_FromLong((long) wxEVT_COMMAND_TREE_KEY_DOWN)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_DRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_RDRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_RDRAG)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_END_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_END_LABEL_EDIT)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_DELETE_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_LIST_DELETE_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS", PyInt_FromLong((long) wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_GET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_LIST_GET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_SET_INFO", PyInt_FromLong((long) wxEVT_COMMAND_LIST_SET_INFO)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_SELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_SELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_DESELECTED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_DESELECTED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_KEY_DOWN", PyInt_FromLong((long) wxEVT_COMMAND_LIST_KEY_DOWN)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_INSERT_ITEM", PyInt_FromLong((long) wxEVT_COMMAND_LIST_INSERT_ITEM)); - PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_COL_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_COL_CLICK)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGING)); - PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)); - PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)); - PyDict_SetItemString(d,"__version__", PyString_FromString("0.3.1")); - PyDict_SetItemString(d,"cvar", SWIG_globals); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); - - // We don't want to run the wxEntry or OnInit yet, so we just do the - // beginings of what it would have done... See __wxStart() for the - // rest. -#ifdef __WXMSW__ - wxApp::Initialize((WXHINSTANCE)wxhInstance); -#endif -#ifdef __WXGTK__ - wxApp::CommonInit(); -#endif - - -// wxPyWindows = new wxHashTable(wxKEY_INTEGER, 100); - - // Since these modules are all linked together, initialize them now - // because python won't be able to find their shared library files, - // (since there isn't any.) - initwindowsc(); - initwindows2c(); - initeventsc(); - initmiscc(); - initgdic(); - initmdic(); - initcontrolsc(); - initcontrols2c(); - initcmndlgsc(); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0); - SWIG_RegisterMapping("_wxEvent","_class_wxEvent",0); - SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0); - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0); - SWIG_RegisterMapping("_wxFontData","_class_wxFontData",0); - SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0); - SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_class_wxEvtHandler","_wxEvtHandler",0); - SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0); - SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0); - SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0); - SWIG_RegisterMapping("_wxMask","_class_wxMask",0); - SWIG_RegisterMapping("_wxGrid","_class_wxGrid",0); - SWIG_RegisterMapping("_wxPageSetupData","_class_wxPageSetupData",0); - SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxColourData","_wxColourData",0); - SWIG_RegisterMapping("_wxPen","_class_wxPen",0); - SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_byte","_unsigned_char",0); - SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0); - SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0); - SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0); - SWIG_RegisterMapping("_wxNotebookEvent","_class_wxNotebookEvent",0); - SWIG_RegisterMapping("_long","_wxDash",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0); - SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0); - SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0); - SWIG_RegisterMapping("_wxDC","_class_wxDC",0); - SWIG_RegisterMapping("_wxListEvent","_class_wxListEvent",0); - SWIG_RegisterMapping("_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); - SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); - SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); - SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); - SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); - SWIG_RegisterMapping("_wxTextCtrl","_class_wxTextCtrl",0); - SWIG_RegisterMapping("_class_wxMask","_wxMask",0); - SWIG_RegisterMapping("_class_wxKeyEvent","_wxKeyEvent",0); - SWIG_RegisterMapping("_class_wxGrid","_wxGrid",0); - SWIG_RegisterMapping("_class_wxPageSetupData","_wxPageSetupData",0); - SWIG_RegisterMapping("_wxColour","_class_wxColour",0); - SWIG_RegisterMapping("_class_wxDialog","_wxDialog",0); - SWIG_RegisterMapping("_wxPageSetupDialog","_class_wxPageSetupDialog",0); - SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0); - SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0); - SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0); - SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0); - SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0); - SWIG_RegisterMapping("_uint","_unsigned_int",0); - SWIG_RegisterMapping("_uint","_int",0); - SWIG_RegisterMapping("_uint","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0); - SWIG_RegisterMapping("_wxRect","_class_wxRect",0); - SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0); - SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0); - SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0); - SWIG_RegisterMapping("_class_wxButton","_wxButton",0); - SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0); - SWIG_RegisterMapping("_class_wxFontData","_wxFontData",0); - SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0); - SWIG_RegisterMapping("_wxPrintDialog","_class_wxPrintDialog",0); - SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0); - SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0); - SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0); - SWIG_RegisterMapping("_wxColourDialog","_class_wxColourDialog",0); - SWIG_RegisterMapping("_wxPrintData","_class_wxPrintData",0); - SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0); - SWIG_RegisterMapping("_wxMessageDialog","_class_wxMessageDialog",0); - SWIG_RegisterMapping("_wxTextEntryDialog","_class_wxTextEntryDialog",0); - SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0); - SWIG_RegisterMapping("_wxMDIChildFrame","_class_wxMDIChildFrame",0); - SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0); - SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0); - SWIG_RegisterMapping("_EBool","_signed_int",0); - SWIG_RegisterMapping("_EBool","_int",0); - SWIG_RegisterMapping("_EBool","_wxWindowID",0); - SWIG_RegisterMapping("_class_wxDropFilesEvent","_wxDropFilesEvent",0); - SWIG_RegisterMapping("_wxStaticText","_class_wxStaticText",0); - SWIG_RegisterMapping("_wxFont","_class_wxFont",0); - SWIG_RegisterMapping("_wxCloseEvent","_class_wxCloseEvent",0); - SWIG_RegisterMapping("_wxNotebook","_class_wxNotebook",0); - SWIG_RegisterMapping("_unsigned_long","_wxDash",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_class_wxRect","_wxRect",0); - SWIG_RegisterMapping("_class_wxDC","_wxDC",0); - SWIG_RegisterMapping("_wxPyApp","_class_wxPyApp",0); - SWIG_RegisterMapping("_wxMDIParentFrame","_class_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxTreeEvent","_wxTreeEvent",0); - SWIG_RegisterMapping("_class_wxDirDialog","_wxDirDialog",0); - SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0); - SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0); - SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxSpinButton","_wxSpinButton",0); - SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxPanel","_wxPanel",0); - SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0); - SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0); - SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0); - SWIG_RegisterMapping("_class_wxMessageDialog","_wxMessageDialog",0); - SWIG_RegisterMapping("_signed_int","_EBool",0); - SWIG_RegisterMapping("_signed_int","_wxWindowID",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_class_wxTextCtrl","_wxTextCtrl",0); - SWIG_RegisterMapping("_wxLayoutConstraints","_class_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxMetaFileDC","_class_wxMetaFileDC",0); - SWIG_RegisterMapping("_wxMenu","_class_wxMenu",0); - SWIG_RegisterMapping("_class_wxMoveEvent","_wxMoveEvent",0); - SWIG_RegisterMapping("_wxListBox","_class_wxListBox",0); - SWIG_RegisterMapping("_wxScreenDC","_class_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxMDIChildFrame","_wxMDIChildFrame",0); - SWIG_RegisterMapping("_WXTYPE","_short",0); - SWIG_RegisterMapping("_WXTYPE","_signed_short",0); - SWIG_RegisterMapping("_WXTYPE","_unsigned_short",0); - SWIG_RegisterMapping("_wxFileDialog","_class_wxFileDialog",0); - SWIG_RegisterMapping("_class_wxMDIClientWindow","_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxBrush","_wxBrush",0); - SWIG_RegisterMapping("_unsigned_short","_WXTYPE",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_class_wxWindow","_wxWindow",0); - SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0); - SWIG_RegisterMapping("_class_wxFont","_wxFont",0); - SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0); - SWIG_RegisterMapping("_wxTreeItem","_class_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0); - SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0); - SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0); - SWIG_RegisterMapping("_wxListCtrl","_class_wxListCtrl",0); - SWIG_RegisterMapping("_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0); - SWIG_RegisterMapping("_class_wxPoint","_wxPoint",0); - SWIG_RegisterMapping("_wxRealPoint","_class_wxRealPoint",0); - SWIG_RegisterMapping("_class_wxRadioBox","_wxRadioBox",0); - SWIG_RegisterMapping("_wxGridCell","_class_wxGridCell",0); - SWIG_RegisterMapping("_signed_short","_WXTYPE",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0); - SWIG_RegisterMapping("_class_wxPrintDialog","_wxPrintDialog",0); - SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0); - SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0); - SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); - SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); - SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); - SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); - SWIG_RegisterMapping("_unsigned_char","_byte",0); - SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); - SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0); - SWIG_RegisterMapping("_wxControl","_class_wxControl",0); - SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0); - SWIG_RegisterMapping("_wxTabCtrl","_class_wxTabCtrl",0); - SWIG_RegisterMapping("_unsigned_int","_uint",0); - SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_wxIcon","_class_wxIcon",0); - SWIG_RegisterMapping("_wxDialog","_class_wxDialog",0); - SWIG_RegisterMapping("_class_wxPyMenu","_wxPyMenu",0); - SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0); - SWIG_RegisterMapping("_class_wxPen","_wxPen",0); - SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0); - SWIG_RegisterMapping("_short","_WXTYPE",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0); - SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0); - SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0); - SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0); - SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0); - SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0); - SWIG_RegisterMapping("_wxTabEvent","_class_wxTabEvent",0); - SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0); - SWIG_RegisterMapping("_class_wxNotebook","_wxNotebook",0); - SWIG_RegisterMapping("_wxWindowID","_EBool",0); - SWIG_RegisterMapping("_wxWindowID","_uint",0); - SWIG_RegisterMapping("_wxWindowID","_int",0); - SWIG_RegisterMapping("_wxWindowID","_signed_int",0); - SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0); - SWIG_RegisterMapping("_int","_EBool",0); - SWIG_RegisterMapping("_int","_uint",0); - SWIG_RegisterMapping("_int","_wxWindowID",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxMouseEvent","_wxMouseEvent",0); - SWIG_RegisterMapping("_class_wxListEvent","_wxListEvent",0); - SWIG_RegisterMapping("_wxButton","_class_wxButton",0); - SWIG_RegisterMapping("_class_wxPyApp","_wxPyApp",0); - SWIG_RegisterMapping("_wxSize","_class_wxSize",0); - SWIG_RegisterMapping("_class_wxPrinterDC","_wxPrinterDC",0); - SWIG_RegisterMapping("_class_wxMDIParentFrame","_wxMDIParentFrame",0); - SWIG_RegisterMapping("_class_wxPaintDC","_wxPaintDC",0); - SWIG_RegisterMapping("_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0); - SWIG_RegisterMapping("_class_wxInitDialogEvent","_wxInitDialogEvent",0); - SWIG_RegisterMapping("_class_wxComboBox","_wxComboBox",0); - SWIG_RegisterMapping("_class_wxRadioButton","_wxRadioButton",0); - SWIG_RegisterMapping("_wxTreeCtrl","_class_wxTreeCtrl",0); - SWIG_RegisterMapping("_class_wxLayoutConstraints","_wxLayoutConstraints",0); - SWIG_RegisterMapping("_wxIconizeEvent","_class_wxIconizeEvent",0); - SWIG_RegisterMapping("_class_wxControl","_wxControl",0); - SWIG_RegisterMapping("_wxStaticBitmap","_class_wxStaticBitmap",0); - SWIG_RegisterMapping("_class_wxTabCtrl","_wxTabCtrl",0); - SWIG_RegisterMapping("_class_wxIcon","_wxIcon",0); - SWIG_RegisterMapping("_class_wxColour","_wxColour",0); - SWIG_RegisterMapping("_class_wxScreenDC","_wxScreenDC",0); - SWIG_RegisterMapping("_class_wxPageSetupDialog","_wxPageSetupDialog",0); - SWIG_RegisterMapping("_class_wxIdleEvent","_wxIdleEvent",0); - SWIG_RegisterMapping("_wxEraseEvent","_class_wxEraseEvent",0); - SWIG_RegisterMapping("_class_wxMiniFrame","_wxMiniFrame",0); - SWIG_RegisterMapping("_class_wxJoystickEvent","_wxJoystickEvent",0); - SWIG_RegisterMapping("_wxFontDialog","_class_wxFontDialog",0); - SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0); - SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0); - SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0); - SWIG_RegisterMapping("_class_wxTreeItem","_wxTreeItem",0); - SWIG_RegisterMapping("_class_wxCommandEvent","_wxCommandEvent",0); - SWIG_RegisterMapping("_class_wxClientDC","_wxClientDC",0); - SWIG_RegisterMapping("_class_wxSizeEvent","_wxSizeEvent",0); - SWIG_RegisterMapping("_class_wxListCtrl","_wxListCtrl",0); - SWIG_RegisterMapping("_class_wxGridCell","_wxGridCell",0); - SWIG_RegisterMapping("_class_wxSize","_wxSize",0); - SWIG_RegisterMapping("_class_wxBitmap","_wxBitmap",0); - SWIG_RegisterMapping("_class_wxMemoryDC","_wxMemoryDC",0); - SWIG_RegisterMapping("_wxMenuBar","_class_wxMenuBar",0); - SWIG_RegisterMapping("_wxTreeEvent","_class_wxTreeEvent",0); - SWIG_RegisterMapping("_wxDirDialog","_class_wxDirDialog",0); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler); - SWIG_RegisterMapping("_wxEvtHandler","_class_wxEvtHandler",0); - SWIG_RegisterMapping("_wxMenuItem","_class_wxMenuItem",0); - SWIG_RegisterMapping("_class_wxScrollBar","_wxScrollBar",0); - SWIG_RegisterMapping("_class_wxColourDialog","_wxColourDialog",0); - SWIG_RegisterMapping("_class_wxPrintData","_wxPrintData",0); - SWIG_RegisterMapping("_wxDash","_unsigned_long",0); - SWIG_RegisterMapping("_wxDash","_long",0); - SWIG_RegisterMapping("_class_wxScrolledWindow","_wxScrolledWindow",0); - SWIG_RegisterMapping("_class_wxTextEntryDialog","_wxTextEntryDialog",0); - SWIG_RegisterMapping("_wxKeyEvent","_class_wxKeyEvent",0); - SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0); - SWIG_RegisterMapping("_wxColourData","_class_wxColourData",0); - SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0); - SWIG_RegisterMapping("_wxMDIClientWindow","_class_wxMDIClientWindow",0); - SWIG_RegisterMapping("_class_wxFontDialog","_wxFontDialog",0); - SWIG_RegisterMapping("_wxWindow","_class_wxWindow",0); - SWIG_RegisterMapping("_class_wxTabEvent","_wxTabEvent",0); - SWIG_RegisterMapping("_class_wxFrame","_wxFrame",0); -} diff --git a/utils/wxPython/tests/paul.pyc b/utils/wxPython/tests/paul.pyc deleted file mode 100644 index d5b68375dcab2113638b87afc62ed1b3c09e4e15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1091 zcma)5O>fgc5PfSqNfW9THBjIH3OB2V9^k+kHGq0(8j%y}A+qdEvZ}G8>{dxo&>qr1 z!B5~{GBZ}21aTm-NBc1|`}V!(U%l4voA)15&@ZCbUQqD#DBJ?Mg7OhEKnEBrWD57d z2KY7%;ZKkS(2;C}j~g{)5e9LMn>8q0tv=6_?^;d>5Wsf$gb1Dz1L>$Rq?INzX);v! zI*1udFO3LO6Cvz7uBpM-;Q*ts2G$e!I}+-PL^IIHuqt&L;UNr}BO>9{6W0}`65E_|+o}jsymZjC5 zq%$@|h@$m#O93{daCUwcGh};6foP_bu1WH8vd_q3dENiilZq^#*d`?prsd+Q%#vIb z`l4MwaZ{<1bC|2Hwr*aoB;hhG3u0Rm-26_9&f7y63wPe7m?2HH8*#sa?AWYOhU$%K zsS|pis;bMLE&i^GsY~Ue2kCYk9z7^`90^x^|Gr6Y^*rS=R?ohs0ev^VEyjl!|CGhM zr?D8H!S_gN{*%;4T+oJp#!^>mFzdaT -#include -#include -#include - -#if wxUSE_IOSTREAMH -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif -#else -#include -#endif - -#include "wx/window.h" -#include "wx/utils.h" -#include "wx/list.h" -#include "prop.h" - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyValue, wxObject) - -wxPropertyValue::wxPropertyValue(void) -{ - m_type = wxPropertyValueNull; - m_next = NULL; - m_last = NULL; - m_value.first = NULL; - m_clientData = NULL; - m_modifiedFlag = FALSE; -} - -wxPropertyValue::wxPropertyValue(const wxPropertyValue& copyFrom) -{ - m_modifiedFlag = FALSE; - Copy((wxPropertyValue& )copyFrom); -} - -wxPropertyValue::wxPropertyValue(const char *val) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueString; - - m_value.string = copystring(val); - m_clientData = NULL; - m_next = NULL; - m_last = NULL; -} - -wxPropertyValue::wxPropertyValue(const wxString& val) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueString; - - m_value.string = copystring((const char *)val); - m_clientData = NULL; - m_next = NULL; - m_last = NULL; -} - -wxPropertyValue::wxPropertyValue(long the_integer) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueInteger; - m_value.integer = the_integer; - m_clientData = NULL; - m_next = NULL; -} - -wxPropertyValue::wxPropertyValue(bool val) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValuebool; - m_value.integer = val; - m_clientData = NULL; - m_next = NULL; -} - -wxPropertyValue::wxPropertyValue(float the_real) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueReal; - m_value.real = the_real; - m_clientData = NULL; - m_next = NULL; -} - -wxPropertyValue::wxPropertyValue(double the_real) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueReal; - m_value.real = (float)the_real; - m_clientData = NULL; - m_next = NULL; -} - -// Pointer versions: we have a pointer to the real C++ value. -wxPropertyValue::wxPropertyValue(char **val) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueStringPtr; - - m_value.stringPtr = val; - m_clientData = NULL; - m_next = NULL; - m_last = NULL; -} - -wxPropertyValue::wxPropertyValue(long *val) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueIntegerPtr; - m_value.integerPtr = val; - m_clientData = NULL; - m_next = NULL; -} - -wxPropertyValue::wxPropertyValue(bool *val) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueboolPtr; - m_value.boolPtr = val; - m_clientData = NULL; - m_next = NULL; -} - -wxPropertyValue::wxPropertyValue(float *val) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueRealPtr; - m_value.realPtr = val; - m_clientData = NULL; - m_next = NULL; -} - -wxPropertyValue::wxPropertyValue(wxList *the_list) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueList; - m_clientData = NULL; - m_last = NULL; - m_value.first = NULL; - - wxNode *node = the_list->First(); - while (node) - { - wxPropertyValue *expr = (wxPropertyValue *)node->Data(); - Append(expr); - node = node->Next(); - } - - delete the_list; -} - -wxPropertyValue::wxPropertyValue(wxStringList *the_list) -{ - m_modifiedFlag = FALSE; - m_type = wxPropertyValueList; - m_clientData = NULL; - m_last = NULL; - m_value.first = NULL; - - wxNode *node = the_list->First(); - while (node) - { - char *s = (char *)node->Data(); - Append(new wxPropertyValue(s)); - node = node->Next(); - } - delete the_list; -} - -wxPropertyValue::~wxPropertyValue(void) -{ - switch (m_type) - { - case wxPropertyValueInteger: - case wxPropertyValuebool: - case wxPropertyValueReal: - { - break; - } - case wxPropertyValueString: - { - delete[] m_value.string; - break; - } - case wxPropertyValueList: - { - wxPropertyValue *expr = m_value.first; - while (expr) - { - wxPropertyValue *expr1 = expr->m_next; - - delete expr; - expr = expr1; - } - break; - } - default: - case wxPropertyValueNull: break; - } -} - -void wxPropertyValue::Append(wxPropertyValue *expr) -{ - m_modifiedFlag = TRUE; - if (!m_value.first) - m_value.first = expr; - - if (m_last) - m_last->m_next = expr; - m_last = expr; -} - -void wxPropertyValue::Insert(wxPropertyValue *expr) -{ - m_modifiedFlag = TRUE; - expr->m_next = m_value.first; - m_value.first = expr; - - if (!m_last) - m_last = expr; -} - -// Delete from list -void wxPropertyValue::Delete(wxPropertyValue *node) -{ - wxPropertyValue *expr = GetFirst(); - - wxPropertyValue *previous = NULL; - while (expr && (expr != node)) - { - previous = expr; - expr = expr->GetNext(); - } - - if (expr) - { - if (previous) - previous->m_next = expr->m_next; - - // If node was the first in the list, - // make the list point to the NEXT one. - if (GetFirst() == expr) - { - m_value.first = expr->m_next; - } - - // If node was the last in the list, - // make the list 'last' pointer point to the PREVIOUS one. - if (GetLast() == expr) - { - if (previous) - m_last = previous; - else - m_last = NULL; - } - m_modifiedFlag = TRUE; - delete expr; - } - -} - -void wxPropertyValue::ClearList(void) -{ - wxPropertyValue *val = GetFirst(); - if (val) - m_modifiedFlag = TRUE; - - while (val) - { - wxPropertyValue *next = val->GetNext(); - delete val; - val = next; - } - m_value.first = NULL; - m_last = NULL; -} - -wxPropertyValue *wxPropertyValue::NewCopy(void) const -{ - switch (m_type) - { - case wxPropertyValueInteger: - return new wxPropertyValue(m_value.integer); - case wxPropertyValuebool: - return new wxPropertyValue((bool) (m_value.integer != 0)); - case wxPropertyValueReal: - return new wxPropertyValue(m_value.real); - case wxPropertyValueString: - return new wxPropertyValue(m_value.string); - case wxPropertyValueList: - { - wxPropertyValue *expr = m_value.first; - wxPropertyValue *new_list = new wxPropertyValue; - new_list->SetType(wxPropertyValueList); - while (expr) - { - wxPropertyValue *expr2 = expr->NewCopy(); - new_list->Append(expr2); - expr = expr->m_next; - } - return new_list; - } - case wxPropertyValueIntegerPtr: - return new wxPropertyValue(m_value.integerPtr); - case wxPropertyValueRealPtr: - return new wxPropertyValue(m_value.realPtr); - case wxPropertyValueboolPtr: - return new wxPropertyValue(m_value.boolPtr); - case wxPropertyValueStringPtr: - return new wxPropertyValue(m_value.stringPtr); - - case wxPropertyValueNull: -#ifdef __X__ - cerr << "Should never get here!\n"; -#endif - break; - } - return NULL; -} - -void wxPropertyValue::Copy(wxPropertyValue& copyFrom) -{ - m_type = copyFrom.Type(); - - switch (m_type) - { - case wxPropertyValueInteger: - (*this) = copyFrom.IntegerValue(); - return ; - - case wxPropertyValueReal: - (*this) = copyFrom.RealValue(); - return ; - - case wxPropertyValueString: - (*this) = wxString(copyFrom.StringValue()); - return ; - - case wxPropertyValuebool: - (*this) = copyFrom.BoolValue(); - return ; - - // Pointers - case wxPropertyValueboolPtr: - (*this) = copyFrom.BoolValuePtr(); - return ; - case wxPropertyValueRealPtr: - (*this) = copyFrom.RealValuePtr(); - return ; - case wxPropertyValueIntegerPtr: - (*this) = copyFrom.IntegerValuePtr(); - return ; - case wxPropertyValueStringPtr: - { - char** s = copyFrom.StringValuePtr(); - (*this) = s != 0; - return ; - } - - case wxPropertyValueList: - { - m_value.first = NULL; - m_next = NULL; - m_last = NULL; - wxPropertyValue *expr = copyFrom.m_value.first; - while (expr) - { - wxPropertyValue *expr2 = expr->NewCopy(); - Append(expr2); - expr = expr->m_next; - } - return; - } - case wxPropertyValueNull: -#ifdef __X__ - cerr << "Should never get here!\n"; -#endif - break; - } -} - -// Return nth argument of a clause (starting from 1) -wxPropertyValue *wxPropertyValue::Arg(wxPropertyValueType type, int arg) const -{ - wxPropertyValue *expr = m_value.first; - for (int i = 1; i < arg; i++) - if (expr) - expr = expr->m_next; - - if (expr && (expr->m_type == type)) - return expr; - else - return NULL; -} - -// Return nth argument of a list expression (starting from zero) -wxPropertyValue *wxPropertyValue::Nth(int arg) const -{ - if (m_type != wxPropertyValueList) - return NULL; - - wxPropertyValue *expr = m_value.first; - for (int i = 0; i < arg; i++) - if (expr) - expr = expr->m_next; - else return NULL; - - if (expr) - return expr; - else - return NULL; -} - - // Returns the number of elements in a list expression -int wxPropertyValue::Number(void) const -{ - if (m_type != wxPropertyValueList) - return 0; - - int i = 0; - wxPropertyValue *expr = m_value.first; - while (expr) - { - expr = expr->m_next; - i ++; - } - return i; -} - -void wxPropertyValue::WritePropertyClause(ostream& stream) // Write this expression as a top-level clause -{ - if (m_type != wxPropertyValueList) - return; - - wxPropertyValue *node = m_value.first; - if (node) - { - node->WritePropertyType(stream); - stream << "("; - node = node->m_next; - bool first = TRUE; - while (node) - { - if (!first) - stream << " "; - node->WritePropertyType(stream); - node = node->m_next; - if (node) stream << ",\n"; - first = FALSE; - } - stream << ").\n\n"; - } -} - -void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any other subexpression -{ - switch (m_type) - { - case wxPropertyValueInteger: - { - stream << m_value.integer; - break; - } - case wxPropertyValueIntegerPtr: - { - stream << *m_value.integerPtr; - break; - } - case wxPropertyValuebool: - { - if (m_value.integer) - stream << "True"; - else - stream << "False"; - break; - } - case wxPropertyValueboolPtr: - { - if (*m_value.integerPtr) - stream << "True"; - else - stream << "False"; - break; - } - case wxPropertyValueReal: - { - float f = m_value.real; - sprintf(wxBuffer, "%.6g", (double)f); - stream << wxBuffer; - break; - } - case wxPropertyValueRealPtr: - { - float f = *m_value.realPtr; -/* Now the parser can cope with this. - // Prevent printing in 'e' notation. Any better way? - if (fabs(f) < 0.00001) - f = 0.0; -*/ - sprintf(wxBuffer, "%.6g", f); - stream << wxBuffer; - break; - } - case wxPropertyValueString: - { -// stream << "\""; - int i; - int len = strlen(m_value.string); - for (i = 0; i < len; i++) - { - char ch = m_value.string[i]; -// if (ch == '"' || ch == '\\') -// stream << "\\"; - stream << ch; - } - -// stream << "\""; - break; - } - case wxPropertyValueStringPtr: - { - int i; - int len = strlen(*(m_value.stringPtr)); - for (i = 0; i < len; i++) - { - char ch = *(m_value.stringPtr)[i]; - - } - break; - } - case wxPropertyValueList: - { - if (!m_value.first) - stream << "[]"; - else - { - wxPropertyValue *expr = m_value.first; - - stream << "["; - while (expr) - { - expr->WritePropertyType(stream); - expr = expr->m_next; - if (expr) stream << ", "; - } - stream << "]"; - } - break; - } - case wxPropertyValueNull: break; - } -} - -wxString wxPropertyValue::GetStringRepresentation(void) -{ - char buf[500]; - buf[0] = 0; - - ostrstream str((char *)buf, (int)500, ios::out); - WritePropertyType(str); - str << '\0'; - str.flush(); - - wxString theString(buf); - return theString; -} - -void wxPropertyValue::operator=(const wxPropertyValue& val) -{ - m_modifiedFlag = TRUE; - Copy((wxPropertyValue&)val); -} - -// void wxPropertyValue::operator=(const char *val) -void wxPropertyValue::operator=(const wxString& val1) -{ - const char *val = (const char *)val1; - - m_modifiedFlag = TRUE; - if (m_type == wxPropertyValueNull) - m_type = wxPropertyValueString; - - if (m_type == wxPropertyValueString) - { - if (val) - m_value.string = copystring(val); - else - m_value.string = NULL; - } - else if (m_type == wxPropertyValueStringPtr) - { - if (*m_value.stringPtr) - delete[] *m_value.stringPtr; - if (val) - *m_value.stringPtr = copystring(val); - else - *m_value.stringPtr = NULL; - } - - m_clientData = NULL; - m_next = NULL; - m_last = NULL; - -} - -void wxPropertyValue::operator=(const long val) -{ - m_modifiedFlag = TRUE; - if (m_type == wxPropertyValueNull) - m_type = wxPropertyValueInteger; - - if (m_type == wxPropertyValueInteger) - m_value.integer = val; - else if (m_type == wxPropertyValueIntegerPtr) - *m_value.integerPtr = val; - else if (m_type == wxPropertyValueReal) - m_value.real = (float)val; - else if (m_type == wxPropertyValueRealPtr) - *m_value.realPtr = (float)val; - - m_clientData = NULL; - m_next = NULL; -} - -void wxPropertyValue::operator=(const bool val) -{ - m_modifiedFlag = TRUE; - if (m_type == wxPropertyValueNull) - m_type = wxPropertyValuebool; - - if (m_type == wxPropertyValuebool) - m_value.integer = (long)val; - else if (m_type == wxPropertyValueboolPtr) - *m_value.boolPtr = val; - - m_clientData = NULL; - m_next = NULL; -} - -void wxPropertyValue::operator=(const float val) -{ - m_modifiedFlag = TRUE; - if (m_type == wxPropertyValueNull) - m_type = wxPropertyValueReal; - - if (m_type == wxPropertyValueInteger) - m_value.integer = (long)val; - else if (m_type == wxPropertyValueIntegerPtr) - *m_value.integerPtr = (long)val; - else if (m_type == wxPropertyValueReal) - m_value.real = val; - else if (m_type == wxPropertyValueRealPtr) - *m_value.realPtr = val; - - m_clientData = NULL; - m_next = NULL; -} - -void wxPropertyValue::operator=(const char **val) -{ - m_modifiedFlag = TRUE; - m_type = wxPropertyValueStringPtr; - - if (val) - m_value.stringPtr = (char **)val; - else - m_value.stringPtr = NULL; - m_clientData = NULL; - m_next = NULL; - m_last = NULL; - -} - -void wxPropertyValue::operator=(const long *val) -{ - m_modifiedFlag = TRUE; - m_type = wxPropertyValueIntegerPtr; - m_value.integerPtr = (long *)val; - m_clientData = NULL; - m_next = NULL; -} - -void wxPropertyValue::operator=(const bool *val) -{ - m_modifiedFlag = TRUE; - m_type = wxPropertyValueboolPtr; - m_value.boolPtr = (bool *)val; - m_clientData = NULL; - m_next = NULL; -} - -void wxPropertyValue::operator=(const float *val) -{ - m_modifiedFlag = TRUE; - m_type = wxPropertyValueRealPtr; - m_value.realPtr = (float *)val; - m_clientData = NULL; - m_next = NULL; -} - -long wxPropertyValue::IntegerValue(void) const - { - if (m_type == wxPropertyValueInteger) - return m_value.integer; - else if (m_type == wxPropertyValueReal) - return (long)m_value.real; - else if (m_type == wxPropertyValueIntegerPtr) - return *m_value.integerPtr; - else if (m_type == wxPropertyValueRealPtr) - return (long)(*m_value.realPtr); - else return 0; - } - -long *wxPropertyValue::IntegerValuePtr(void) const -{ - return m_value.integerPtr; -} - -float wxPropertyValue::RealValue(void) const { - if (m_type == wxPropertyValueReal) - return m_value.real; - else if (m_type == wxPropertyValueRealPtr) - return *m_value.realPtr; - else if (m_type == wxPropertyValueInteger) - return (float)m_value.integer; - else if (m_type == wxPropertyValueIntegerPtr) - return (float)*(m_value.integerPtr); - else return 0.0; - } - -float *wxPropertyValue::RealValuePtr(void) const -{ - return m_value.realPtr; -} - -bool wxPropertyValue::BoolValue(void) const { - if (m_type == wxPropertyValueReal) - return (m_value.real != 0.0); - if (m_type == wxPropertyValueRealPtr) - return (*(m_value.realPtr) != 0.0); - else if (m_type == wxPropertyValueInteger) - return (m_value.integer != 0); - else if (m_type == wxPropertyValueIntegerPtr) - return (*(m_value.integerPtr) != 0); - else if (m_type == wxPropertyValuebool) - return (m_value.integer != 0); - else if (m_type == wxPropertyValueboolPtr) - return (*(m_value.boolPtr) != 0); - else return FALSE; - } - -bool *wxPropertyValue::BoolValuePtr(void) const -{ - return m_value.boolPtr; -} - -char *wxPropertyValue::StringValue(void) const { - if (m_type == wxPropertyValueString) - return m_value.string; - else if (m_type == wxPropertyValueStringPtr) - return *(m_value.stringPtr); - else return NULL; - } - -char **wxPropertyValue::StringValuePtr(void) const -{ - return m_value.stringPtr; -} - -/* - * A property (name plus value) - */ - -IMPLEMENT_DYNAMIC_CLASS(wxProperty, wxObject) - -wxProperty::wxProperty(void) -{ - m_propertyRole = (char *)NULL; - m_propertyValidator = NULL; - m_propertyWindow = NULL; - m_enabled = TRUE; -} - -wxProperty::wxProperty(wxProperty& copyFrom) -{ - m_value = copyFrom.GetValue(); - m_name = copyFrom.GetName(); - m_propertyRole = copyFrom.GetRole(); - m_propertyValidator = copyFrom.GetValidator(); - m_enabled = copyFrom.IsEnabled(); - m_propertyWindow = NULL; -} - -wxProperty::wxProperty(wxString nm, wxString role, wxPropertyValidator *ed):m_name(nm), m_propertyRole(role) -{ - m_propertyValidator = ed; - m_propertyWindow = NULL; - m_enabled = TRUE; -} - -wxProperty::wxProperty(wxString nm, const wxPropertyValue& val, wxString role, wxPropertyValidator *ed): - m_name(nm), m_value(val), m_propertyRole(role) -{ - m_propertyValidator = ed; - m_propertyWindow = NULL; - m_enabled = TRUE; -} - -wxProperty::~wxProperty(void) -{ - if (m_propertyValidator) - delete m_propertyValidator; -} - -wxPropertyValue& wxProperty::GetValue(void) const -{ - return (wxPropertyValue&) m_value; -} - -wxPropertyValidator *wxProperty::GetValidator(void) const -{ - return m_propertyValidator; -} - -wxString& wxProperty::GetName(void) const -{ - return (wxString&) m_name; -} - -wxString& wxProperty::GetRole(void) const -{ - return (wxString&) m_propertyRole; -} - -void wxProperty::SetValue(const wxPropertyValue& val) -{ - m_value = val; -} - -void wxProperty::SetValidator(wxPropertyValidator *ed) -{ - m_propertyValidator = ed; -} - -void wxProperty::SetRole(wxString& role) -{ - m_propertyRole = role; -} - -void wxProperty::SetName(wxString& nm) -{ - m_name = nm; -} - -void wxProperty::operator=(const wxPropertyValue& val) -{ - m_value = val; -} - -/* - * Base property view class - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyView, wxEvtHandler) - -wxPropertyView::wxPropertyView(long flags) -{ - m_buttonFlags = flags; - m_propertySheet = NULL; - m_currentValidator = NULL; - m_currentProperty = NULL; -} - -wxPropertyView::~wxPropertyView(void) -{ -} - -void wxPropertyView::AddRegistry(wxPropertyValidatorRegistry *registry) -{ - m_validatorRegistryList.Append(registry); -} - -wxPropertyValidator *wxPropertyView::FindPropertyValidator(wxProperty *property) -{ - if (property->GetValidator()) - return property->GetValidator(); - - wxNode *node = m_validatorRegistryList.First(); - while (node) - { - wxPropertyValidatorRegistry *registry = (wxPropertyValidatorRegistry *)node->Data(); - wxPropertyValidator *validator = registry->GetValidator(property->GetRole()); - if (validator) - return validator; - node = node->Next(); - } - return NULL; -/* - if (!wxDefaultPropertyValidator) - wxDefaultPropertyValidator = new wxPropertyListValidator; - return wxDefaultPropertyValidator; -*/ -} - -/* - * Property sheet - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject) - -wxPropertySheet::wxPropertySheet(void):m_properties(wxKEY_STRING) -{ -} - -wxPropertySheet::~wxPropertySheet(void) -{ - Clear(); -} - -bool wxPropertySheet::Save( ostream& WXUNUSED(str) ) -{ - return FALSE; -} - -bool wxPropertySheet::Load( ostream& WXUNUSED(str) ) -{ - return FALSE; -} - -void wxPropertySheet::UpdateAllViews( wxPropertyView *WXUNUSED(thisView) ) -{ -} - -// Add a property -void wxPropertySheet::AddProperty(wxProperty *property) -{ - m_properties.Append((const char*) property->GetName(), property); -} - -// Get property by name -wxProperty *wxPropertySheet::GetProperty(wxString name) -{ - wxNode *node = m_properties.Find((const char*) name); - if (!node) - return NULL; - else - return (wxProperty *)node->Data(); -} - -// Clear all properties -void wxPropertySheet::Clear(void) -{ - wxNode *node = m_properties.First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - wxNode *next = node->Next(); - delete prop; - delete node; - node = next; - } -} - -// Sets/clears the modified flag for each property value -void wxPropertySheet::SetAllModified(bool flag) -{ - wxNode *node = m_properties.First(); - while (node) - { - wxProperty *prop = (wxProperty *)node->Data(); - prop->GetValue().SetModified(flag); - node = node->Next(); - } -} - -/* - * Property validator registry - * - */ - -IMPLEMENT_DYNAMIC_CLASS(wxPropertyValidatorRegistry, wxHashTable) - -wxPropertyValidatorRegistry::wxPropertyValidatorRegistry(void):wxHashTable(wxKEY_STRING) -{ -} - -wxPropertyValidatorRegistry::~wxPropertyValidatorRegistry(void) -{ - ClearRegistry(); -} - -void wxPropertyValidatorRegistry::RegisterValidator(const wxString& typeName, wxPropertyValidator *validator) -{ - Put((const char*) typeName, validator); -} - -wxPropertyValidator *wxPropertyValidatorRegistry::GetValidator(const wxString& typeName) -{ - return (wxPropertyValidator *)Get((const char*) typeName); -} - -void wxPropertyValidatorRegistry::ClearRegistry(void) -{ - BeginFind(); - wxNode *node; - while (node = Next()) - { - delete (wxPropertyValidator *)node->Data(); - } -} - - /* - * Property validator - */ - - -IMPLEMENT_ABSTRACT_CLASS(wxPropertyValidator, wxEvtHandler) - -wxPropertyValidator::wxPropertyValidator(long flags) -{ - m_validatorFlags = flags; - m_validatorProperty = NULL; -} - -wxPropertyValidator::~wxPropertyValidator(void) -{} - -bool wxPropertyValidator::StringToFloat (char *s, float *number) { - double num; - bool ok = StringToDouble (s, &num); - *number = (float) num; - return ok; -} - -bool wxPropertyValidator::StringToDouble (char *s, double *number) { - bool ok = TRUE; - char *value_ptr; - *number = strtod (s, &value_ptr); - if (value_ptr) { - int len = strlen (value_ptr); - for (int i = 0; i < len; i++) { - ok = (isspace (value_ptr[i]) != 0); - if (!ok) return FALSE; - } - } - return ok; -} - -bool wxPropertyValidator::StringToInt (char *s, int *number) { - long num; - bool ok = StringToLong (s, &num); - *number = (int) num; - return ok; -} - -bool wxPropertyValidator::StringToLong (char *s, long *number) { - bool ok = TRUE; - char *value_ptr; - *number = strtol (s, &value_ptr, 10); - if (value_ptr) { - int len = strlen (value_ptr); - for (int i = 0; i < len; i++) { - ok = (isspace (value_ptr[i]) != 0); - if (!ok) return FALSE; - } - } - return ok; -} - -char *wxPropertyValidator::FloatToString (float number) { - static char buf[20]; - sprintf (buf, "%.6g", number); - return buf; -} - -char *wxPropertyValidator::DoubleToString (double number) { - static char buf[20]; - sprintf (buf, "%.6g", number); - return buf; -} - -char *wxPropertyValidator::IntToString (int number) { - return ::IntToString (number); -} - -char *wxPropertyValidator::LongToString (long number) { - return ::LongToString (number); - } - - diff --git a/wx-config.in b/wx-config.in index b1e5374d87..172c164a50 100755 --- a/wx-config.in +++ b/wx-config.in @@ -6,13 +6,41 @@ exec_prefix_set=no CC="@CC@" CXX="@CXX@" LD="@SHARED_LD@" +cross_compiling=@cross_compiling@ +target=@host_alias@ -usage="\ -Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--cc] [--cxx] [--ld]" +usage() +{ + cat <&2 - exit 1 + usage 1 1>&2 fi while test $# -gt 0; do @@ -41,20 +69,26 @@ while test $# -gt 0; do --version) echo @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@ ;; + --cppflags) + cppflags + ;; --cflags) - if test @includedir@ != /usr/include ; then - if test @includedir@ != /usr/include/c++ ; then - includes=-I@includedir@ - fi - fi - includes="$includes -I@libdir@/wx/include" - echo $includes @CODE_GEN_FLAGS@ @WXDEBUG_DEFINE@ @TOOLKIT_DEF@ @TOOLKIT_INCLUDE@ + echo `cppflags` @CODE_GEN_FLAGS@ + ;; + --cxxflags) + echo `cppflags` @CODE_GEN_FLAGS@ @CODE_GEN_FLAGS_CXX@ ;; --libs) - if test @libdir@ != /usr/lib ; then - libs="-L@libdir@" + if test "@libdir@" != "/usr/lib" \ + -a \( "${cross_compiling}" != "yes" \ + -o "@libdir@" != "/usr/${target}/lib" \) ; + then + libs="-L@libdir@" fi - echo $libs -l@WX_LIBRARY@ @EXTRA_LIBS@ + echo $libs @LDFLAGS@ @WXCONFIG_LIBS@ @EXTRA_LIBS@ + ;; + --gl-libs) + echo @WXCONFIG_LIBS_GL@ ;; --cc) echo $CC @@ -66,8 +100,7 @@ while test $# -gt 0; do echo $LD ;; *) - echo "${usage}" 1>&2 - exit 1 + usage 1 1>&2 ;; esac shift diff --git a/wxBase.dsp b/wxBase.dsp index 4ef0f85a84..b8e860264e 100644 --- a/wxBase.dsp +++ b/wxBase.dsp @@ -40,8 +40,8 @@ RSC=rc.exe # PROP Output_Dir "BaseRelease" # PROP Intermediate_Dir "BaseRelease" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c -# ADD CPP /nologo /MT /W3 /Zi /O2 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D WIN95=1 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN32__" /D "_MT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c +# ADD CPP /nologo /MD /W4 /Zi /O1 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D WIN95=1 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN32__" /D "_MT" /Yu"wx/wxprec.h" /FD /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -63,8 +63,8 @@ LIB32=link.exe -lib # PROP Output_Dir "BaseDebug" # PROP Intermediate_Dir "BaseDebug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c -# ADD CPP /nologo /MTd /W4 /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D DEBUG=1 /D WXDEBUG=1 /D "__WXDEBUG__" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /Fr /Yu"wx/wxprec.h" /FD /c +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MT" /YX /FD /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D DEBUG=1 /D WXDEBUG=1 /D "__WXDEBUG__" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /Yu"wx/wxprec.h" /FD /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=bscmake.exe @@ -117,6 +117,10 @@ SOURCE=.\src\common\dynlib.cpp # End Source File # Begin Source File +SOURCE=.\src\common\encconv.cpp +# End Source File +# Begin Source File + SOURCE=.\src\common\event.cpp # End Source File # Begin Source File @@ -141,6 +145,10 @@ SOURCE=.\src\common\filesys.cpp # End Source File # Begin Source File +SOURCE=.\src\common\fontmap.cpp +# End Source File +# Begin Source File + SOURCE=.\src\common\fs_inet.cpp # End Source File # Begin Source File @@ -356,21 +364,5 @@ SOURCE=.\src\msw\gsockmsw.c # End Source File -# Begin Source File - -SOURCE=.\src\common\y_tab.c - -!IF "$(CFG)" == "wxBase - Win32 Release" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "wxBase - Win32 Debug" - -# ADD CPP /W1 -# SUBTRACT CPP /YX /Yc /Yu - -!ENDIF - -# End Source File # End Target # End Project diff --git a/wxBase.dsw b/wxBase.dsw new file mode 100644 index 0000000000..fec4d2c29c --- /dev/null +++ b/wxBase.dsw @@ -0,0 +1,41 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "wxBase"=.\wxBase.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "wxBaseDll"=.\wxBaseDll.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/wxBase.spec b/wxBase.spec index 898787cc03..5cdf25b116 100644 --- a/wxBase.spec +++ b/wxBase.spec @@ -1,6 +1,6 @@ -# Note that this is NOT a relocatable package %define pref /usr -%define ver 2.1.14 +%define ver 2.2.9 +%define ver2 2.2 %define rel 0 Summary: wxBase library - non-GUI support classes of wxWindows toolkit @@ -9,10 +9,13 @@ Version: %{ver} Release: %{rel} Copyright: wxWindows Licence Group: Development/Libraries -Source: wxBase-%{ver}.tar.gz -URL: none +Source: wxBase-%{ver}.tar.bz2 +URL: http://www.wxwindows.org/ Packager: Vadim Zeitlin -BuildRoot: /tmp/wxBase_rpm +Prefix: %{pref} +BuildRoot: /var/tmp/%{name}-root + +Provides: wxbase %description wxBase is a collection of C++ classes providing basic data structures (strings, @@ -32,8 +35,8 @@ Requires: wxBase Header files for wxBase. You need them to develop programs using wxBase. %prep -%setup -n wxBase -./configure --prefix=%{pref} --disable-gui --disable-std_iostreams +%setup -n wxBase-%{ver} +./configure --prefix=%{pref} --no-recursion --disable-gui --disable-std_iostreams %build if [ "$SMP" != "" ]; then @@ -44,9 +47,10 @@ fi $MAKE %install -rm -rf $RPM_BUILD_ROOT make prefix=$RPM_BUILD_ROOT%{pref} install +%find_lang wxstd + %clean rm -rf $RPM_BUILD_ROOT @@ -56,16 +60,16 @@ rm -rf $RPM_BUILD_ROOT %postun /sbin/ldconfig -%files -%defattr (644, root, root, 755) -%doc COPYING.LIB INSTALL.txt LICENCE.txt README.txt SYMBOLS.txt TODO.txt -%attr(755, -, -) %{pref}/lib/libwxbase* +%files -f wxstd.lang +%defattr (-, root, root) +%doc COPYING.LIB LICENCE.txt README.txt SYMBOLS.txt +%{pref}/lib/libwx_base* + +%files devel +%defattr (-, root, root) +%dir %{pref}/include/wx %dir %{pref}/lib/wx -%dir %{pref}/lib/wx/include -%dir %{pref}/lib/wx/include/wx -%{pref}/lib/wx/include/wx/setup.h - -%files devel -f src/rpmfiles.lst -%defattr (644, root, root, 755) -%attr(755, -, -) %{pref}/bin/wx-config +%{pref}/lib/wx/* +%{pref}/include/wx/* +%{pref}/bin/wx*-config diff --git a/wxBaseDll.dsp b/wxBaseDll.dsp new file mode 100644 index 0000000000..7f1d11a522 --- /dev/null +++ b/wxBaseDll.dsp @@ -0,0 +1,376 @@ +# Microsoft Developer Studio Project File - Name="wxBaseDll" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=wxBaseDll - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "wxBaseDll.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "wxBaseDll.mak" CFG="wxBaseDll - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "wxBaseDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "wxBaseDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "wxBaseDll - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "BaseReleaseDll" +# PROP Intermediate_Dir "BaseReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W4 /O1 /I "$(wx)\include" /I "$(wx)\src\zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "$(wx)\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"BaseReleaseDll/wxbase221.dll" +# ADD LINK32 kernel32.lib user32.lib advapi32.lib wsock32.lib /nologo /version:2.2 /dll /machine:I386 /out:"BaseReleaseDll/wxbase221.dll" + +!ELSEIF "$(CFG)" == "wxBaseDll - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "BaseDebugDll" +# PROP Intermediate_Dir "BaseDebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W4 /Gm /Zi /Od /I "$(wx)\include" /I "$(wx)\src\zlib" /D "_DEBUG" /D wxUSE_GUI=0 /D "__WIN95__" /D "WIN32" /D "_WIN32" /D WINVER=0x400 /D "__WINDOWS__" /D "__WIN32__" /D "__WXMSW__" /D "_MT" /D "WXMAKINGDLL" /D "__WXDEBUG__" /Yu"wx/wxprec.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "$(wx)\include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"BaseDebugDll/wxbase221d.dll" +# ADD LINK32 kernel32.lib user32.lib advapi32.lib wsock32.lib /nologo /version:2.2 /dll /debug /machine:I386 /pdbtype:sept /out:"BaseDebugDll/wxbase221d.dll" + +!ENDIF + +# Begin Target + +# Name "wxBaseDll - Win32 Release" +# Name "wxBaseDll - Win32 Debug" +# Begin Source File + +SOURCE=.\src\common\base.rc +# End Source File +# Begin Source File + +SOURCE=.\src\msw\dummydll.cpp +# ADD CPP /Yc"wx/wxprec.h" +# End Source File +# Begin Source File + +SOURCE=.\src\common\appcmn.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\cmdline.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\config.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\datetime.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\datstrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\dynarray.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\dynlib.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\encconv.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\event.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\ffile.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\file.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\fileconf.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\filefn.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\filesys.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\fontmap.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\fs_inet.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\fs_mem.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\fs_zip.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\ftp.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\hash.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\http.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\intl.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\ipcbase.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\list.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\log.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\longlong.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\mimecmn.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\module.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\mstream.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\object.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\objstrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\process.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\protocol.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\sckaddr.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\sckfile.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\sckipc.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\sckstrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\serbase.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\socket.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\strconv.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\stream.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\string.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\textfile.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\timercmn.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\tokenzr.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\txtstrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\url.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\utilscmn.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\variant.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\wfstream.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\wxchar.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\zipstrm.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\zstream.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\common\init.cpp +# End Source File + +# Begin Source File + +SOURCE=.\src\msw\dde.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\dir.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\main.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\mimetype.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\regconf.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\registry.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\thread.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\utils.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\msw\utilsexc.cpp +# End Source File + +# Begin Source File + +SOURCE=.\src\common\extended.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File +# Begin Source File + +SOURCE=.\src\common\unzip.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File + +# Begin Source File + +SOURCE=.\src\msw\gsocket.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File +# Begin Source File + +SOURCE=.\src\msw\gsockmsw.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File + +# End Target +# End Project diff --git a/wxGTK.spec b/wxGTK.spec index 7267e19966..e2e73e868b 100644 --- a/wxGTK.spec +++ b/wxGTK.spec @@ -1,6 +1,6 @@ -# Note that this is NOT a relocatable package %define pref /usr -%define ver 2.1.14 +%define ver 2.2.9 +%define ver2 2.2 %define rel 0 Summary: The GTK+ 1.2 port of the wxWindows library @@ -9,16 +9,22 @@ Version: %{ver} Release: %{rel} Copyright: wxWindows Licence Group: X11/Libraries -Source: wxGTK-%{ver}.tgz -URL: http://wesley.informatik.uni-freiburg.de/~wxxt/docs.html -Packager: Robert Roebling -BuildRoot: /tmp/wxgtk_root +Source: wxGTK-%{ver}.tar.bz2 +URL: http://www.wxwindows.org/ +Prefix: %{pref} +BuildRoot: /var/tmp/%{name}-root +Packager: Vadim Zeitlin # all packages providing an implementation of wxWindows library (regardless of # the toolkit used) should provide the (virtual) wxwin package, this makes it # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxqt..." Provides: wxwin +# in addition, we should provide libwx_gtk as automatic generator only notices +# libwx_gtk-%{ver}-%{rel} +Provides: libwx_gtk.so +Provides: libwx_gtk-%{ver2}.so + %description wxWindows is a free C++ library for cross-platform GUI development. With wxWindows, you can create applications for different GUIs (GTK+, @@ -41,8 +47,10 @@ Requires: wxGTK OpenGl add-on library for wxGTK, the GTK+ 1.2 port of the wxWindows library. %prep -%setup -n wxGTK -./configure --prefix=%{pref} --enable-burnt_name --with-odbc --with-opengl +%setup -n wxGTK-%{ver} +export CPPFLAGS=-I/usr/X11R6/include +export LDFLAGS=-L/usr/X11R6/lib +./configure --prefix=%{pref} --no-recursion --enable-burnt_name --with-odbc --with-opengl %build if [ "$SMP" != "" ]; then @@ -53,11 +61,9 @@ fi $MAKE %install -rm -rf $RPM_BUILD_ROOT make prefix=$RPM_BUILD_ROOT%{pref} install -%clean -rm -rf $RPM_BUILD_ROOT +%find_lang wxstd %post /sbin/ldconfig @@ -65,21 +71,21 @@ rm -rf $RPM_BUILD_ROOT %postun /sbin/ldconfig -%files -%defattr (644, root, root, 755) +%files -f wxstd.lang +%defattr(-, root, root) %doc COPYING.LIB INSTALL.txt LICENCE.txt README.txt SYMBOLS.txt TODO.txt %dir %{pref}/share/wx %{pref}/share/wx/* -%attr(755, -, -) %{pref}/lib/libwx_gtk* +%{pref}/lib/libwx_gtk* %files devel -%defattr (644, root, root, 755) +%defattr(-, root, root) %dir %{pref}/include/wx %{pref}/include/wx/* %dir %{pref}/lib/wx %{pref}/lib/wx/* -%attr(755, -, -) %{pref}/bin/wxgtk-config -%attr(755, -, -) %{pref}/bin/wx-config +%{pref}/bin/wx*-config %files gl -%attr(755, -, -) %{pref}/lib/libwx_gtk_gl* +%defattr(-, root, root) +%{pref}/lib/libwx_gtk_gl* diff --git a/wxMotif.spec b/wxMotif.spec index 9e9e874dcd..bc25506322 100644 --- a/wxMotif.spec +++ b/wxMotif.spec @@ -1,17 +1,20 @@ +# RPM .spec file for wxMotif. Based on the .spec file for wxGTK +# (c) by Robert Roebling. Modifications (c) 2000/03 by Robert Fendt. + # Note that this is NOT a relocatable package %define pref /usr -%define ver 2.1.14 +%define ver 2.2.8 %define rel 0 -Summary: The Motif port of the wxWindows library +Summary: The Motif/Lesstif port of the wxWindows library Name: wxMotif Version: %{ver} Release: %{rel} Copyright: wxWindows Licence Group: X11/Libraries -Source: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxMotif-2.1.0-b8.tgz -URL: http://wesley.informatik.uni-freiburg.de/~wxxt/docs.html -Packager: Robert Roebling +Source: wxMotif-%{ver}.tar.bz2 +URL: http://www.wxwindows.org +Packager: Robert Fendt BuildRoot: /tmp/wxmotif_root # all packages providing an implementation of wxWindows library (regardless of @@ -24,12 +27,33 @@ wxWindows is a free C++ library for cross-platform GUI development. With wxWindows, you can create applications for different GUIs (GTK+, Motif/LessTif, MS Windows, Mac) from the same source code. +%package devel +Summary: The Motif/Lesstif port of the wxWindows library +Group: X11/Libraries +Requires: wxMotif + +%description devel +Header files for wxMotif, the Motif/Lesstif port of the wxWindows library. + +%package gl +Summary: The Motif/Lesstif port of the wxWindows library, OpenGl add-on. +Group: X11/Libraries +Requires: wxMotif + +%description gl +OpenGl add-on library for wxMotif, the Motif/Lesstif port of the wxWindows library. + %prep %setup -n wxMotif -./configure --prefix=%{pref} --disable-threads --disable-std_iostreams +./configure --prefix=%{pref} --enable-burnt_name --with-odbc --with-opengl --with-motif %build -make +if [ "$SMP" != "" ]; then + export MAKE="make -j$SMP" +else + export MAKE="make" +fi +$MAKE %install rm -rf $RPM_BUILD_ROOT @@ -47,12 +71,19 @@ rm -rf $RPM_BUILD_ROOT %files %defattr (644, root, root, 755) %doc COPYING.LIB INSTALL.txt LICENCE.txt README.txt SYMBOLS.txt TODO.txt +%dir %{pref}/share/wx +%{pref}/share/wx/* +%attr(755, root, root) %{pref}/lib/libwx_motif.* +%attr(755, root, root) %{pref}/lib/libwx_motif-2.1.* + +%files devel +%defattr (644, root, root, 755) %dir %{pref}/include/wx %{pref}/include/wx/* %dir %{pref}/lib/wx %{pref}/lib/wx/* -%dir %{pref}/share/wx -%{pref}/share/wx/* -%attr(755, -, -) %{pref}/lib/libwx_motif* -%attr(755, -, -) %{pref}/bin/wx-config +%attr(755, root, root) %{pref}/bin/wxmotif-config +%attr(755, root, root) %{pref}/bin/wx-config +%files gl +%attr(755, root, root) %{pref}/lib/libwx_motif_gl* diff --git a/wxPython/.cvsignore b/wxPython/.cvsignore new file mode 100644 index 0000000000..bf3bcde0de --- /dev/null +++ b/wxPython/.cvsignore @@ -0,0 +1,8 @@ +.emacs.desktop +MANIFEST +build +build.local +dist +licence +temp +update.log diff --git a/wxPython/BUILD.unix.txt b/wxPython/BUILD.unix.txt new file mode 100644 index 0000000000..14ae7aedf4 --- /dev/null +++ b/wxPython/BUILD.unix.txt @@ -0,0 +1,271 @@ +Building wxPython on Unix or Unix-like Systems +---------------------------------------------- + +The basic steps for building wxPython for Unix or Unix-like systems +are: + + 1. Compile and/or install glib and gtk+ + 2. Compile and/or install wxGTK + 3. Compile and install wxPython + +We'll go into more detail of each of these steps below, but first a +few bits of background information on tools. + +I use a tool called SWIG (http://www.swig.org) to help generate the +C++ sources used in the wxPython extension module. However you don't +need to have SWIG unless you want to modify the *.i files. If you do +you'll want to have version 1.1-883 of SWIG and you'll need to change +a flag in the setup.py script as described below. + +I use the new Python Distutils tool to build wxPython. It is included +with Python 2.0, but if you want to use Python 1.5.2 or 1.6 then +you'll need to download and install Distutils 1.0 from +http://www.python.org/sigs/distutils-sig/ + +I usually use RedHat Linux when working on the wxGTK version of +wxPython, but I occasionally build and test on Solaris and I hope to +be able to add some other platforms soon. The compiler I use is +whatever comes with the current version of RedHat I am using. I find +that there are less portability problems with the RPMs if I don't try +using the latest and greatest compilers all the time. On the other +platforms I usually stick with as recent a version of GCC that I can +find pre-built for that platform. + +Okay, now on the the fun stuff... + + +1. Compile and/or install glib and gtk+ +--------------------------------------- + +A. First of all, check and see if you've already got glib/gtk+ on your + system, all the Linux distributions I know of come with it, at + least as an option. Look for libglib.* and libgtk.* in your system's + standard library directories. You'll also need the headers and + config scripts in order to build things that use glib/gtk. Try + running gtk-config: + + gtk-config --version + + If you have version 1.2.5 or better then you're all set. You can + skip to step #2. + +B. If your system has a binary package mechanism, (RPMs, debs, + whatever...) check and see if binaries for glib abd gtk+ are + available. Be sure to get the runtime library package as well as + the development package, if they are separate. Install them with + your package tool, and skip to step #2. + +C. If all else fails, you can get the source code for glib and gtk+ at + http://www.gtk.org/. Fetch the latest of each in the 1.2.x + series. Compile and install each of them like this: + + gzip -d [package].tar.gz | tar xvf - + cd [package] + ./configure + make + make install + + The last step will probably have to be done as root. Also, if your + system needs anything done to update the dynamic loader for shared + libraries, (such as running ldconfig on Linux) then do it after + each library is installed. + + + +2. Compile and/or install wxGTK +------------------------------- + +A. You can find the sources and RPMs for wxGTK at + ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/, or + just follow the download links from http://wxwindows.org/. You can + also check out a current snapshot of the sources from the CVS + server. (Some information about annonymous CVS access is at + http://wxwindows.org/cvs.htm.) The advantage of using CVS is that + you can easily update as soon as the developers check in new + sources or fixes. The advantage of using a released version is + that it usually has had more testing done. You can decide which + method is best for you. + +B. You'll usually want to use a version of wxGTK that has the same + version number as the wxPython sources you are using. (Another + advantage of using CVS is that you'll get both at the same time.) + +C. If using the RPMs be sure to get both the wxGTK and wxGTK-devel + RPMs (at a minimum) and then install them as root. + + rpm -Uhv wxGTK-2.2.2-0.i386.rpm wxGTK-devel-2.2.2-0.i386.rpm + +D. If using the sources (either from the tarball or from CVS) then + configure it like this: + + cd wxWindows # or whatever your top-level directory is called + mkdir build + cd build + ../configure --with-gtk + + There are gobs and gobs of options for the configure script, run + ../configure --help to see them all. I'll describe some that I find + useful here. + + If you have OpenGL or compatible libraries installed, then add the + --with-opengl flag. + + If you are on Solaris and are using a recent version of GCC, then + you'll probably want to add the --enable-permissive flag so the + compiler won't barf on your broken X11 header files. + + To make a debugging version of wxGTK, add the --enable-debug flag. + This sets the -g flag for the compiler and also activates some + special debugging code in wxWindows by defining the __WXDEBUG__ + macro. You'll get some extra asserts, failure logging, etc. + + To make a static library and not make a shared library, use the + --disable-shared and --enable-static flags. + +E. Now just compile and install. You need to use GNU make, so if your + system has something else get GNU make and build and install it and + use it instead of your system's default make command. + + make + make install + + The last step will probably have to be done as root. Also, if your + system needs anything done to update the dynamic loader for shared + libraries, (such as running ldconfig on Linux) then do it now. + +F. You can test your build by changing to one of the directories under + build/samples or build/demos, running make and then running the + executable that is built. + + + +3. Compile and install wxPython +------------------------------- + +A. You have the same options (and same advantages/disadvantages) for + getting the wxPython source, either a released snapshot or from + CVS. The released version file is named wxPython-[version].tar.gz + and is available at http://wxpython.org/download.php. If you want + to use CVS you'll find wxPython in the wxWindows CVS tree (see + above) in the wxWindows/wxPython directory. + +B. As mentioned previouslly, wxPython is built with the standard + Python Distutils tool. If you are using Python 2.0 or later you + are all set, otherwise you need to download and install Distutils + 1.0 from http://www.python.org/sigs/distutils-sig/. + + On Unix systems Distutils figures out what commands and flags to + use for the compiler and linker by looking in the Makefile that was + used to build Python itself. Most of the time this works okay. If + it doesn't, there doesn't seem to be a way to override the values + that Distutils uses without hacking either Distutils itself, or + Python's Makefile. (Complain to the distutils-sig about this + please.) For example, on my Solaris system I had to edit + /usr/local/lib/python1.5/config/Makefile and replace + + LDSHARED=ld -G + + with + + LDSHARED=gcc -G + + This particular problem has been fixed in Python 1.6 and beyond, + but there may be similar issues on other platforms. + + While we're on the subject of how Python was built... Since + wxPython is a C++ extension some platforms and/or compilers will + require that the Python executable was linked with the C++ linker + in order for everything to work correctly. If you build and + install Python yourself then this is easy to take care of, + otherwise you may have to mess with binary packages or bribe your + system administrator... + + In my case on Solaris wxPython applications would core dump on + exit. The core file indicated that the fault happened after + _exit() was called and the run-time was trying to execute cleanup + code. After relinking the Python executable the problem went away. + To build Python to link with the C++ linker do this: + + cd Python-2.0 # wherever the root of the source tree is + rm python # in case it's still there from an old build + make LINKCC=g++ # or whatever your C++ command is + make install + + +C. Change to the root wxPython directory and look at the setup.py + file. This is the script that configures and defines all the + information that Distutils needs to build wxPython. There are some + options near the begining of the script that you may want or need + to change based on your system and what options you have selected + up to this point, (sources from tar.gz or from CVS, etc.) You can + either change these flags directly in setup.py or supply them on + the command-line. + + BUILD_GLCANVAS Set to zero if you don't want to build the + Open GL canvas extension module. If you don't + have OpenGL or compatible libraries then you'll + need to set this to zero. + + BUILD_OGL Set to zero if you don't want to build the + Object Graphics Library extension module. + + BUILD_STC Set to zero if you don't want to build the + wxStyledTextCtrl (the Scintilla wrapper) + extension module. + + USE_SWIG If you have edited any of the *.i files you + will need to set this flag to non-zero so SWIG + will be executed to regenerate the wrapper C++ + and shadow python files. + + IN_CVS_TREE If you are using the CVS version of the + wxWindows and wxPython sources then you will + need to set this flag to non-zero. This is + needed because some source files from the + wxWindows tree are copied to be under the + wxPython tree in order to keep Distutils happy. + With this flag set then setup.py will + automatically keep these copied sources up to + date if the original version is ever updated. + If you are using the tar.gz version of the + Python sources then these copied sources are + already present in your source tree. + + +D. To build and install wxPython you simply need to execute the + setup.py script. If you have more than one version of Python + installed, be sure to execute setup.py with the version you want to + build wxPython for. Depending on the permissions on your + site-packages directory you may need to be root to run the install + command. + + python setup.py build + python setup.py install + +E. At this point you should be able to change into the wxPython/demo + directory and run the demo: + + python demo.py + +F. If you would like to make a test build that doesn't overwrite the + installed version of wxPython you can do so with this command + instead of the install command above: + + python setup.py build_ext --inplace + + This will build the wxPython package in the local wxPython + directory instead of installing it under your Python installation. + To run using this test version just add the base wxPython source + directory to the PYTHONPATH: + + export PYTHONPATH=~/projects/wxWindows/wxPython + # or whatever is required for your shell + cd ~/projects/wxWindows/wxPython/demo + python demo.py + + +That's all folks! + + +----------------- +robin@alldunn.com diff --git a/wxPython/BUILD.win32.txt b/wxPython/BUILD.win32.txt new file mode 100644 index 0000000000..d86ccfa952 --- /dev/null +++ b/wxPython/BUILD.win32.txt @@ -0,0 +1,276 @@ +Building wxPython on Win32 +-------------------------- + + +Building wxPython for use on win32 systems is a fairly simple process +consisting of just a few steps. However depending on where you get +your sources from and what your desired end result is, there are +several permutations of those steps. At a high level the basic steps +are: + + 1. Get the wxWindows sources + 2. Build the wxWindows DLL + 3. Get the wxPython sources + 4. Build and Install wxPython + +We'll go into more detail of each of these steps below, but first a +few bits of background information on tools. + +I use a tool called SWIG (http://www.swig.org) to help generate the +C++ sources used in the wxPython extension module. However you don't +need to have SWIG unless you want to modify the *.i files. If you do +you'll want to have version 1.1-883 of SWIG and you'll need to change +a flag in the setup.py script as described below. + +I use the new Python Distutils tool to build wxPython. It is included +with Python 2.0, but if you want to use Python 1.5.2 or 1.6 then +you'll need to download and install Distutils 1.0 from +http://www.python.org/sigs/distutils-sig/ + +I use Microsoft Visual C++ 6.0 (5.0 with the service packs should work +also) to compile the wxPython C++ sources. Since I am using Distutils +it should be easier now to build with other win32 compilers such as +the free mingw32 or Borland compilers, but I havn't tried them yet. +If anybody wants to try it I'll take any required patches for the +setup script and for these instructions. + +And now on to the fun stuff... + + + +1. Get the wxWindows sources +---------------------------- + +A. There are a few possible ways to get sources for wxWindows. You + can download a released version from http://wxwindows.org/ or you + can get current development sources from the CVS server. (Some + information about annonymous CVS access is at + http://wxwindows.org/cvs.htm.) The advantage of using CVS is that + you can easily update as soon as the developers check in new + sources or fixes. The advantage of using a released version is + that it usually has had more testing done. You can decide which + method is best for you. + +B. You'll usually want to use wxWindows sources that have the same + version number as the wxPython sources you are using. (Another + advantage of using CVS is that you'll get both at the same time.) + +C. Once you get the sources be sure to put them in a path without a + space in it (i.e., NOT c:\Program Files\wx) and set an environment + variable named WXWIN to this directory. For example: + + mkdir \wx2 + cd \wx2 + unzip wxMSW-2.2.2.zip + set WXWIN=c:\wx2 + + You'll probably want to add that last line to your autoexec.bat or + System Properties depending on the type of system you are on. + +D. Change to the wx2\include\wx\msw directory and copy setup0.h to + setup.h and then edit setup.h. This is how you control which parts + of wxWindows are compiled into or left out of the build, simply by + turning options on or off. At a minimum you should set the + following: + + wxUSE_NEW_GRID 1 + wxUSE_GLOBAL_MEMORY_OPERATORS 0 + wxUSE_LIBTIFF 1 + wxUSE_GLCANVAS 1 + wxDIALOG_UNIT_COMPATIBILITY 0 + + I also turn off the following as they are not currently used in + wxPython. There are probably others that can be turned off to + help save space, but I havn't investigated all the potential + configurations yet. Please note that wxPython doesn't (yet) check + these flags for its own build, so if you turn off something that + wxPython expects then you'll get link errors later on. + + wxUSE_DIALUP_MANAGER 0 + wxUSE_DYNLIB_CLASS 0 + wxUSE_DOC_VIEW_ARCHITECTURE 0 + wxUSE_PLOT 0 + wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0 + + + + +2. Build the wxWindows DLL +--------------------------- + +A. Although MSVC project files are provided I always use the makefiles + to build wxWindows because by default the flags are compatible with + Python, (and I make sure they stay that way.) You would have to + edit the project files a bit to make it work otherwise. + +B. There are three different types of wxWindows DLLs that can be + produced by the VC makefile simply by providing a flag on the nmake + command-line, I call the three types DEBUG, FINAL, and HYBRID. + (The last one is brand new, you'll need my version of the 2.2.2 + sources to get the HYBRID capability.) Here are some more details: + + DEBUG Specified with "FINAL=0" and produces a DLL named + wx[version]d.dll. This DLL is compiled with full + debugging information and with the __WXDEBUG__ set which + enables some debugging-only code in wxWindows such as + assertions and failure log messages. The /MDd flag is + used which means that it is linked with the debugging + version of the C runtime library and also that you must + use the debugging version of Python, (python_d.exe and + pythonXX_d.dll) which also means that all extensions + loaded by Python should also have the _d in the name. + With this option you can use the MSVC debugger to trace + though the Python interpreter, as well as the code for the + wxPython extension and the wxWindows DLL. + + FINAL Specified with "FINAL=1" and produces a DLL named + wx[version].dll. This DLL is compiled with optimizations + turned on and without debugging information and without + __WXDEBUG__. The /MD flag is used which means that you + can use this version with the standard python.exe. This + is the version that I use when making the binary installer + for win32. + + HYBRID Specified with "FINAL=hybrid" and produces a DLL named + wx[version]h.dll. This DLL is almost the same as the + DEBUG version except the /MD flag is used which means that + you can use the standard python.exe but you still get the + debugging info and the __WXDEBUG__ code enabled. With the + debugger you can trace through the the code for the + wxPython extension and the wxWindows DLL, but not the + Python interpreter. You might use this version when you + want to deploy a wxPython app with the __WXDEBUG__ code + enabled. I use this mode most of the time during + development simply because it's easier than having to + remember to type python_d all the time. + + Since different DLL names and object file directories are used you + can build all three types if you like. + +C. Change to the wx2\src\msw directory and type the following command, + using the value for FINAL that you want: + + nmake -f makefile.vc dll pch USE_GLCANVAS=1 FINAL=hybrid + + Your machine will then crunch away for possibly a long time, + depending on your hardware, and when it's done you should have a + DLL and some library files in \wx2\lib. + +D. You'll either need to add \wx2\lib to the PATH or copy the DLL file + to a directory already on the PATH so the DLL can be found at runtime. + +E. You can test your build by changing to one of the directories under + \wx2\samples or \wx2\demos and typing (using the right FINAL flag): + + nmake -f makefile.vc FINAL=hybrid WXUSINGDLL=1 + + and then executing the resulting .exe file. + + + +3. Get the wxPython sources +--------------------------- + +A. You have the same options (and same advantages/disadvantages) for + getting the wxPython source, either a released snapshot or from + CVS. The released version file is named wxPython-[version].tar.gz + and is available at http://wxpython.org/download.php. You can use + WinZip to unpack it if you don't have tar and gzip. If you want to + use CVS you'll find wxPython in the wxWindows CVS tree (see above) + in the wxWindows/wxPython directory. + + + +4. Build and Install wxPython +----------------------------- + +A. As mentioned previouslly, wxPython is built with the standard + Python Distutils tool. If you are using Python 2.0c1 or later you + are all set, otherwise you need to download and install Distutils + 1.0 from http://www.python.org/sigs/distutils-sig/. + +B. Change to the root wxPython directory and look at the setup.py + file. This is the script that configures and defines all the + information that Distutils needs to build wxPython. There are some + options near the begining of the script that you may want or need + to change based on what options you have selected up to this point, + (type of DLL built, sources from tar.gz or from CVS, etc.) You can + either change these flags directly in setup.py or supply them on + the command-line. + + BUILD_GLCANVAS Set to zero if you don't want to build the + Open GL canvas extension module. + + BUILD_OGL Set to zero if you don't want to build the + Object Graphics Library extension module. + + BUILD_STC Set to zero if you don't want to build the + wxStyledTextCtrl (the Scintilla wrapper) + extension module. + + USE_SWIG If you have edited any of the *.i files you + will need to set this flag to non-zero so SWIG + will be executed to regenerate the wrapper C++ + and shadow python files. + + IN_CVS_TREE If you are using the CVS version of the + wxWindows and wxPython sources then you will + need to set this flag to non-zero. This is + needed because some source files from the + wxWindows tree are copied to be under the + wxPython tree in order to keep Distutils happy. + With this flag set then setup.py will + automatically keep these copied sources up to + date if the original version is ever updated. + If you are using the tar.gz version of the + Python sources then these copied sources are + already present in your source tree. + + +C. To build and install wxPython you simply need to execute the + setup.py script. If you have more than one version of Python + installed, be sure to execute setup.py with the version you want to + build wxPython for. + + Depending on what kind of wxWindows DLL you built there are + different command-line parameters you'll want to pass to setup (in + addition to possibly one or more of the above): + + FINAL: python setup.py install + + DEBUG: python setup.py build --debug install + + HYBRID: python setup.py HYBRID=1 install + + +D. At this point you should be able to change into the wxPython\demo + directory and run the demo: + + python demo.py + +E. If you would like to make a test build that doesn't overwrite the + installed version of wxPython you can do so with one of these + commands instead of the install command above: + + FINAL: python setup.py build_ext --inplace + + DEBUG: python setup.py build_ext --debug --inplace + + HYBRID: python setup.py HYBRID=1 build_ext --inplace + + This will build the wxPython package in the local wxPython + directory instead of installing it under your Python installation. + To run using this test version just add the base wxPython source + directory to the PYTHONPATH: + + set PYTHONPATH=c:\wx2\wxPython + cd c:\wx2\wxPython\demo + python demo.py + + +That's all folks! + + +----------------- +robin@alldunn.com + diff --git a/utils/wxPython/CHANGES.txt b/wxPython/CHANGES.txt similarity index 72% rename from utils/wxPython/CHANGES.txt rename to wxPython/CHANGES.txt index c249a26efe..f2a4b06311 100644 --- a/utils/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -2,7 +2,195 @@ CHANGES.txt for wxPython ---------------------------------------------------------------------- -New in 2.1.14 +2.2.7 +----- + +No changes happened in the Python wrappers for this release, only +changes and fixes in the wxWindows library. + + +2.2.6 +----- + +No changes happened in the Python wrappers for this release, only +changes and fixes in the wxWindows library. + + +2.2.5 +----- + +New typemaps for wxString when compiling for Python 2.0 and beyond +that allow Unicode objects to be passed as well as String objects. If +a Unicode object is passed PyString_AsStringAndSize is used to convert +it to a wxString using the default encoding. + +Fixed the generic buttons so tool tips work for them. + +Fixed a bug in the demo's tree control. + +Added a listbox to the listbox demo that shows how to find items with +a matching prefix as keys are typed. + +Added code to the wxListCtrl demo to show how to get text from a +column in report mode. + +Added code to the toolbar demo to clear the long help from the status +bar after 2 seconds. + +Added wxJoystick. + +Fixed wxTimer so it can be used as described in the docs, either with +a Notify method in a subclass, or sending an event to a wxEvtHandler +object, (usually a window.) + +Added wxNotifyEvent.Allow() + +Fixed GOBS of reference leaks. + +Massive code changes and cleanup to allow wxPython to be split into +multiple extension modules again. A Python CObject is used to allow +the "export" of SWIG functions and other common helper functions from +the wxc module to other modules, even if they are in separate shared +libraries. Should also be usable from 3rd party code, just include +wxPython/src/export.h + +Changed the default setup so the following are built as separate +extension modules: calendar, glcanvas, grid, html, ogl, stc, and +utils. Will probably add more later. + +Changed the wxPrinterDC to use the new constructor taking a +wxPrintData object. The old ctor is still there using the +wxPrinterDC2 name. + +Added wxPython.lib.anchors.py from Riaan Booysen. It contains a class +that implements Delphi's Anchors with wxLayoutConstraints. + +Added wxPython.lib.fancytext from Timothy Hochberg. + +Changed the GenericButtons to send their event in idle time, so the +mouse won't be captured when the event handler is called. + +Added wxPython.lib.rpcMixin from Greg Landrum, although it's not +integrated with the demo yet. It allows a wxPython GUI to be an +XML-RPC server. + + + +New in 2.2.2 +------------ + +Significantly changed how the wxStyledtextCtrl code that wraps +Scintilla is implemented. Most of it is now automatically generated +from an interface definition file provided by Scintilla. This means +that it will be much easier to stay in sync with new Scintilla +releases, but also means that some of the method and identifier names +have changed. See wxPython/demo/data/stc.h for a copy of the C++ +interface from which the Python interface is generated. There is now +some inline documentation in that file that should really help explain +how things work. + +I am now using the Python Distutils to build wxPython and to make some +of the distribution files. (See http://www.python.org/sigs/distutils-sig/) +This means no more messing with my kludgy build.py/Makefile hack, +builds will be more consistent with other Python extensions that also +use Distutils, and will hopefully make wxPython easier to build for +platforms where there have been troubles before. If you are building +wxPython for Python 1.5.2 or for 1.6, then you will need to get and +install version 1.0 of Distutils from the website above. If you are +using Python 2.0 then you already have it. + +Added wxInputStream and the wxFileSystem family of classes, +contributed by Joerg Baumann. + +Added wxProcess and support for it to wxExecute. wxProcess lets you +get notified when an asyncronous child process terminates, and also to +get input/output streams for the child process's stdout, stderr and +stdin. + +Removed the old python sizers. + +Added __add__, __sub__ and __cmp__ (equality check only) for wxPoint +and wxRealPoint. + +Changed the build to make one big extension module instead of one for +the core and each contrib. This allowed me to do away with the +libwxPyHelpers.so on unix systems. + +Lots of little fixes here and there. + +Some hacks on wxGTK to try and make the AutoComplete listbox in the +wxStyledTextCtrl to behave better. It's still not as nice as on +wxMSW, but at least it's a bit more usable now. + + + + +New in 2.2.1 +------------ + +Various tweaks, fixes, missing methods, etc. + +Added example use of wxTaskBarIcon to the demo. + + + +New in 2.2.0 +------------ + +Added wxLog and friends. + +Added wxFrame.ShowFullScreen for MSW. + +Added PyShellWindow to the wxPython.lib package. + + + +New in 2.1.16 +------------- + +Added an attribute named labelDelta to the generic buttons that +specifies how far to offset the label when the button is in the +depressed state. + +Added wxTipProvider and friends. See the demo for an example. + +wxGrid can now change the cell highlight colour. + +Added wxDragImage. + +Fixed printing on wxGTK. + +Added wxDateTime, wxTimeSpan, and wxDateSpan to wxPython.utils. + +Added wxCalendarCtrl. + +WARNING: A while back I asked what should be done about the Magic +Method Names. (Methods that are automatically turned into event +handlers by virtue of their name.) The consensus was that it is more +confusing to have them than to try and expand them to have greater +coverage. I am finally getting around to removing the code that +generates the event binding. This means that if you are using any of +the following method names without a EVT_* call that you need to +modify your code to add the EVT_* to hook the event to the method. + + OnChar + OnSize + OnEraseBackground + OnSysColourChanged + OnInitDialog + OnPaint + OnIdle + OnActivate + OnMenuHighlight + OnCloseWindow + OnScroll + +Added wxSpinCtrl. + + + + +New in 2.1.15 ------------- Fixed wxTreeCtrl.HitTest to return both the tree item as well as the @@ -16,6 +204,43 @@ Fixed some problems in OGL. Also wxShape.SetClientData and Added wxListCtrl.SortItems and changed the demo to show how to use it. +Plugged a memory leak. + +Wrapped the new wxGrid and friends. The old wxGrid class is no longer +available. There are some incompatibilities, and unfortunately the +new classes are not documented yet, (however the methods are more +consistent with each other now so you may be able to guess pretty +good...) + +Updated filebrowsebutton.py and calendar.py with changes from their +authors. There is now a FileBrowseButtonWithHistory class (what a +mouthful!) and wxCalendar has printing support. + +Added ActiveXWrapper to the library, and some good demos of it too. +It works great for embedding a COM (a.k.a OCX, a.k.a ActiveX) control +in a window and calling its methods. It actually creates a new class +on the fly that derives from wxWindow, the COM CoClass and others +needed to make it all work. The resulting class can be instantiated +just like wxWindow, used in sizers, etc. It also responds to all COM +method calls, properties, etc., and if the class or a mix-in has +matching method names, then the COM events will be propogated back to +them. + +Created a typemap that allows a string to be used for parameters +expecting a wxColour type. The string is either a colour name as +defined in the wxColourDatabase, or a colour spec of the form +"#RRGGBB". See the wxStyledTextCtrl demo for an example. + +I almost forgot to mention the wxStyledTextCtrl! Yes, the +wxStyledTextCtrl is finally in wxPython!! (And the crowd goes +wild...) There's no documentaTion yet (the crowd boos and hisses...) +but I've included a very readable source file in the +wxPython/demo/data directory, a couple fairly good examples, and you +can also refer to the Scintilla documentaion at +http://www.scintilla.org/ScintillaDoc.html to help fill in the gaps +until the docs are done. (The croud murmers contentedly as the tool +provider smiles convincingly and removes his flame-proof suit.) + diff --git a/wxPython/MANIFEST.in b/wxPython/MANIFEST.in new file mode 100644 index 0000000000..2f1074b3fd --- /dev/null +++ b/wxPython/MANIFEST.in @@ -0,0 +1,94 @@ +include *.txt +include my_distutils.py +## include my_install_data.py +include licence/*.txt +include b +include b.bat + +include demo/*.py +include demo/bitmaps/*.bmp +include demo/bitmaps/*.ico +include demo/bitmaps/*.gif +include demo/bitmaps/*.png +include demo/bitmaps/*.jpg +include demo/README.txt +include demo/*.xml +include demo/data/*.png +include demo/data/*.htm +include demo/data/*.html +include demo/data/*.bmp +include demo/data/*.txt +include demo/data/*.i +include demo/data/*.h +include demo/data/*.py + +include wxPython/lib/*.py +include wxPython/lib/*.txt +include wxPython/lib/editor/*.py +include wxPython/lib/editor/*.txt + +exclude wxPython/* +exclude tests +exclude SWIG + +include src/*.i +include src/*.py +include src/*.cpp +include src/*.c +include src/*.h +include src/*.ico +include src/*.rc + +include src/msw/*.cpp +include src/msw/*.h +include src/msw/*.py + +include src/gtk/*.cpp +include src/gtk/*.h +include src/gtk/*.py + +# src/motif/*.cpp +# src/motif/*.h +# src/motif/*.py + + +include contrib/glcanvas/*.i +include contrib/glcanvas/*.py +include contrib/glcanvas/*.cpp +include contrib/glcanvas/*.c +include contrib/glcanvas/*.h +include contrib/glcanvas/msw/*.cpp +include contrib/glcanvas/msw/*.h +include contrib/glcanvas/msw/*.py +include contrib/glcanvas/gtk/*.cpp +include contrib/glcanvas/gtk/*.h +include contrib/glcanvas/gtk/*.py + +include contrib/ogl/*.txt +include contrib/ogl/*.i +include contrib/ogl/*.py +include contrib/ogl/*.cpp +include contrib/ogl/*.c +include contrib/ogl/*.h +include contrib/ogl/contrib/include/wx/ogl/*.h +include contrib/ogl/contrib/src/ogl/*.cpp + +include contrib/stc/*.txt +include contrib/stc/*.i +include contrib/stc/*.py +include contrib/stc/*.cpp +include contrib/stc/*.c +include contrib/stc/*.h +include contrib/stc/*.cpp +include contrib/stc/*.py +include contrib/stc/contrib/include/wx/stc/*.h +include contrib/stc/contrib/src/stc/*.h +include contrib/stc/contrib/src/stc/*.cpp +include contrib/stc/contrib/src/stc/*.txt +include contrib/stc/contrib/src/stc/*.py +include contrib/stc/contrib/src/stc/*.in +include contrib/stc/contrib/src/stc/scintilla/include/*.h +include contrib/stc/contrib/src/stc/scintilla/include/*.iface +include contrib/stc/contrib/src/stc/scintilla/src/*.h +include contrib/stc/contrib/src/stc/scintilla/src/*.cxx + diff --git a/utils/wxPython/README.txt b/wxPython/README.txt similarity index 57% rename from utils/wxPython/README.txt rename to wxPython/README.txt index 6222375387..87388be57d 100644 --- a/utils/wxPython/README.txt +++ b/wxPython/README.txt @@ -26,22 +26,35 @@ Service Pack 4+, or the HTML Workshop at http://msdn.microsoft.com/workshop/author/htmlhelp/download.asp. +For some features, the latest common controls library from microsoft +is required. You can get this by installing IE 5.0 or Office 2000. +You can also get it independently from here: + +http://download.microsoft.com/download/platformsdk/Comctl32/5.80.2614.3600/W9XNT4/EN-US/50comupd.exe + +Windows 95 users may also need the WinSock 2.0 and OpenGL libraries. +These can be found at these sites: + + +http://www.microsoft.com/windows95/downloads/contents/wuadmintools/s_wunetworkingtools/w95sockets2/default.asp + +http://www.opengl.org/Downloads/Downloads.html + Getting Help ------------ Since wxPython is a blending of multiple technologies, help comes from -multiple sources. See the http://alldunn.com/wxPython for details on -various sources of help, but probably the best source is the -wxPython-users mail list. You can view the archive or subscribe by -going to +multiple sources. See the http://wxPython.org/ for details on various +sources of help, but probably the best source is the wxPython-users +mail list. You can view the archive or subscribe by going to - http://starship.python.net/mailman/listinfo/wxpython-users + http://lists.wxwindows.org/mailman/listinfo/wxpython-users Or you can send mail directly to the list using this address: - wxpython-users@starship.python.net + wxpython-users@lists.wxwindows.org Other Info @@ -52,13 +65,16 @@ Please also see the following files in this directory: CHANGES.txt Information about new features, fixes, etc. in each release. - BUILD.txt Instructions for building wxPython on various - platforms. + BUILD.unix.txt Instructions for building wxPython on various + Unix-like platforms. - licence.txt Text of the wxWindows license. + BUILD.win32.txt Instructions for building wxPython on Windows. + + licence/* Text of the wxWindows license. ----------------- + +----------------- Robin Dunn robin@alldunn.com @@ -68,3 +84,5 @@ robin@alldunn.com + + diff --git a/wxPython/SWIG/README.txt b/wxPython/SWIG/README.txt new file mode 100644 index 0000000000..2343c669bb --- /dev/null +++ b/wxPython/SWIG/README.txt @@ -0,0 +1,6 @@ + +Some minor tweaks were made to these files to allow wxPython to build +with Python 1.6. Just put these in your swig_lib/python dir and +you'll be all set. These are from SWIG 1.1-810, (yes, I am a bit +behind.) + diff --git a/wxPython/SWIG/pyexp.swg b/wxPython/SWIG/pyexp.swg new file mode 100644 index 0000000000..a7305579be --- /dev/null +++ b/wxPython/SWIG/pyexp.swg @@ -0,0 +1,32 @@ +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif diff --git a/wxPython/SWIG/typemaps.i b/wxPython/SWIG/typemaps.i new file mode 100644 index 0000000000..041a00a818 --- /dev/null +++ b/wxPython/SWIG/typemaps.i @@ -0,0 +1,561 @@ +// +// SWIG Typemap library +// Dave Beazley +// May 5, 1997 +// +// Python implementation +// +// This library provides standard typemaps for modifying SWIG's behavior. +// With enough entries in this file, I hope that very few people actually +// ever need to write a typemap. +// +// Disclaimer : Unless you really understand how typemaps work, this file +// probably isn't going to make much sense. +// +#ifdef AUTODOC +%section "Typemap Library (Python)",info,after,pre,nosort,skip=1,chop_left=3,chop_right=0,chop_top=0,chop_bottom=0 +%text %{ +%include typemaps.i + +The SWIG typemap library provides a language independent mechanism for +supporting output arguments, input values, and other C function +calling mechanisms. The primary use of the library is to provide a +better interface to certain C function--especially those involving +pointers. +%} + +#endif + +// ------------------------------------------------------------------------ +// Pointer handling +// +// These mappings provide support for input/output arguments and common +// uses for C/C++ pointers. +// ------------------------------------------------------------------------ + +// INPUT typemaps. +// These remap a C pointer to be an "INPUT" value which is passed by value +// instead of reference. + + +#ifdef AUTODOC +%subsection "Input Methods" + +%text %{ +The following methods can be applied to turn a pointer into a simple +"input" value. That is, instead of passing a pointer to an object, +you would use a real value instead. + + int *INPUT + short *INPUT + long *INPUT + unsigned int *INPUT + unsigned short *INPUT + unsigned long *INPUT + unsigned char *INPUT + float *INPUT + double *INPUT + +To use these, suppose you had a C function like this : + + double fadd(double *a, double *b) { + return *a+*b; + } + +You could wrap it with SWIG as follows : + + %include typemaps.i + double fadd(double *INPUT, double *INPUT); + +or you can use the %apply directive : + + %include typemaps.i + %apply double *INPUT { double *a, double *b }; + double fadd(double *a, double *b); + +%} +#endif + +%typemap(python,in) double *INPUT(double temp) +{ + temp = PyFloat_AsDouble($source); + $target = &temp; +} + +%typemap(python,in) float *INPUT(float temp) +{ + temp = (float) PyFloat_AsDouble($source); + $target = &temp; +} + +%typemap(python,in) int *INPUT(int temp) +{ + temp = (int) PyInt_AsLong($source); + $target = &temp; +} + +%typemap(python,in) short *INPUT(short temp) +{ + temp = (short) PyInt_AsLong($source); + $target = &temp; +} + +%typemap(python,in) long *INPUT(long temp) +{ + temp = (long) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned int *INPUT(unsigned int temp) +{ + temp = (unsigned int) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned short *INPUT(unsigned short temp) +{ + temp = (unsigned short) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned long *INPUT(unsigned long temp) +{ + temp = (unsigned long) PyInt_AsLong($source); + $target = &temp; +} +%typemap(python,in) unsigned char *INPUT(unsigned char temp) +{ + temp = (unsigned char) PyInt_AsLong($source); + $target = &temp; +} + +%typemap(python,in) signed char *INPUT(signed char temp) +{ + temp = (unsigned char) PyInt_AsLong($source); + $target = &temp; +} + +// OUTPUT typemaps. These typemaps are used for parameters that +// are output only. The output value is appended to the result as +// a list element. + +#ifdef AUTODOC +%subsection "Output Methods" + +%text %{ +The following methods can be applied to turn a pointer into an "output" +value. When calling a function, no input value would be given for +a parameter, but an output value would be returned. In the case of +multiple output values, they are returned in the form of a Python tuple. + + int *OUTPUT + short *OUTPUT + long *OUTPUT + unsigned int *OUTPUT + unsigned short *OUTPUT + unsigned long *OUTPUT + unsigned char *OUTPUT + float *OUTPUT + double *OUTPUT + +A Python List can also be returned by using L_OUTPUT instead of OUTPUT. + +For example, suppose you were trying to wrap the modf() function in the +C math library which splits x into integral and fractional parts (and +returns the integer part in one of its parameters).K: + + double modf(double x, double *ip); + +You could wrap it with SWIG as follows : + + %include typemaps.i + double modf(double x, double *OUTPUT); + +or you can use the %apply directive : + + %include typemaps.i + %apply double *OUTPUT { double *ip }; + double modf(double x, double *ip); + +The Python output of the function would be a tuple containing both +output values. +%} +#endif + +// Helper function for List output + +%{ +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} +%} + +// Force the argument to be ignored. + +%typemap(python,ignore) int *L_OUTPUT(int temp), + short *L_OUTPUT(short temp), + long *L_OUTPUT(long temp), + unsigned int *L_OUTPUT(unsigned int temp), + unsigned short *L_OUTPUT(unsigned short temp), + unsigned long *L_OUTPUT(unsigned long temp), + unsigned char *L_OUTPUT(unsigned char temp), + signed char *L_OUTPUT(signed char temp), + float *L_OUTPUT(float temp), + double *L_OUTPUT(double temp) +{ + $target = &temp; +} + +%typemap(python,argout) int *L_OUTPUT, + short *L_OUTPUT, + long *L_OUTPUT, + unsigned int *L_OUTPUT, + unsigned short *L_OUTPUT, + unsigned long *L_OUTPUT, + unsigned char *L_OUTPUT, + signed char *L_OUTPUT +{ + PyObject *o; + o = PyInt_FromLong((long) (*$source)); + l_output_helper($target,o); +} + +%typemap(python,argout) float *L_OUTPUT, + double *L_OUTPUT +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*$source)); + $target = l_output_helper($target,o); +} + +// These typemaps contributed by Robin Dunn +//---------------------------------------------------------------------- +// +// T_OUTPUT typemap (and helper function) to return multiple argouts as +// a tuple instead of a list. +// +// Author: Robin Dunn +//---------------------------------------------------------------------- + +%{ +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} +%} + +// Force the argument to be ignored. +%typemap(python,ignore) int *T_OUTPUT(int temp), + short *T_OUTPUT(short temp), + long *T_OUTPUT(long temp), + unsigned int *T_OUTPUT(unsigned int temp), + unsigned short *T_OUTPUT(unsigned short temp), + unsigned long *T_OUTPUT(unsigned long temp), + unsigned char *T_OUTPUT(unsigned char temp), + float *T_OUTPUT(float temp), + double *T_OUTPUT(double temp) +{ + $target = &temp; +} + +%typemap(python,argout) int *T_OUTPUT, + short *T_OUTPUT, + long *T_OUTPUT, + unsigned int *T_OUTPUT, + unsigned short *T_OUTPUT, + unsigned long *T_OUTPUT, + unsigned char *T_OUTPUT +{ + PyObject *o; + o = PyInt_FromLong((long) (*$source)); + $target = t_output_helper($target, o); +} + +%typemap(python,argout) float *T_OUTPUT, + double *T_OUTPUT +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*$source)); + $target = t_output_helper($target, o); +} + +// Set the default output typemap + +#ifdef OUTPUT_LIST +%typemap(python,ignore) int *OUTPUT = int *L_OUTPUT; +%typemap(python,ignore) short *OUTPUT = short *L_OUTPUT; +%typemap(python,ignore) long *OUTPUT = long *L_OUTPUT; +%typemap(python,ignore) unsigned *OUTPUT = unsigned *L_OUTPUT; +%typemap(python,ignore) unsigned short *OUTPUT = unsigned short *L_OUTPUT; +%typemap(python,ignore) unsigned long *OUTPUT = unsigned long *L_OUTPUT; +%typemap(python,ignore) unsigned char *OUTPUT = unsigned char *L_OUTPUT; +%typemap(python,ignore) signed char *OUTPUT = signed char *L_OUTPUT; +%typemap(python,ignore) double *OUTPUT = double *L_OUTPUT; +%typemap(python,ignore) float *OUTPUT = float *L_OUTPUT; + +%typemap(python,argout) int *OUTPUT = int *L_OUTPUT; +%typemap(python,argout) short *OUTPUT = short *L_OUTPUT; +%typemap(python,argout) long *OUTPUT = long *L_OUTPUT; +%typemap(python,argout) unsigned *OUTPUT = unsigned *L_OUTPUT; +%typemap(python,argout) unsigned short *OUTPUT = unsigned short *L_OUTPUT; +%typemap(python,argout) unsigned long *OUTPUT = unsigned long *L_OUTPUT; +%typemap(python,argout) unsigned char *OUTPUT = unsigned char *L_OUTPUT; +%typemap(python,argout) signed char *OUTPUT = signed char *L_OUTPUT; +%typemap(python,argout) double *OUTPUT = double *L_OUTPUT; +%typemap(python,argout) float *OUTPUT = float *L_OUTPUT; +#else +%typemap(python,ignore) int *OUTPUT = int *T_OUTPUT; +%typemap(python,ignore) short *OUTPUT = short *T_OUTPUT; +%typemap(python,ignore) long *OUTPUT = long *T_OUTPUT; +%typemap(python,ignore) unsigned *OUTPUT = unsigned *T_OUTPUT; +%typemap(python,ignore) unsigned short *OUTPUT = unsigned short *T_OUTPUT; +%typemap(python,ignore) unsigned long *OUTPUT = unsigned long *T_OUTPUT; +%typemap(python,ignore) unsigned char *OUTPUT = unsigned char *T_OUTPUT; +%typemap(python,ignore) signed char *OUTPUT = signed char *T_OUTPUT; +%typemap(python,ignore) double *OUTPUT = double *T_OUTPUT; +%typemap(python,ignore) float *OUTPUT = float *T_OUTPUT; + +%typemap(python,argout) int *OUTPUT = int *T_OUTPUT; +%typemap(python,argout) short *OUTPUT = short *T_OUTPUT; +%typemap(python,argout) long *OUTPUT = long *T_OUTPUT; +%typemap(python,argout) unsigned *OUTPUT = unsigned *T_OUTPUT; +%typemap(python,argout) unsigned short *OUTPUT = unsigned short *T_OUTPUT; +%typemap(python,argout) unsigned long *OUTPUT = unsigned long *T_OUTPUT; +%typemap(python,argout) unsigned char *OUTPUT = unsigned char *T_OUTPUT; +%typemap(python,argout) signed char *OUTPUT = signed char *T_OUTPUT; +%typemap(python,argout) double *OUTPUT = double *T_OUTPUT; +%typemap(python,argout) float *OUTPUT = float *T_OUTPUT; +#endif + +// INOUT +// Mappings for an argument that is both an input and output +// parameter + + +#ifdef AUTODOC +%subsection "Input/Output Methods" + +%text %{ +The following methods can be applied to make a function parameter both +an input and output value. This combines the behavior of both the +"INPUT" and "OUTPUT" methods described earlier. Output values are +returned in the form of a Python tuple. To return a Python list, +using L_INOUT instead. + + int *INOUT + short *INOUT + long *INOUT + unsigned int *INOUT + unsigned short *INOUT + unsigned long *INOUT + unsigned char *INOUT + float *INOUT + double *INOUT + +For example, suppose you were trying to wrap the following function : + + void neg(double *x) { + *x = -(*x); + } + +You could wrap it with SWIG as follows : + + %include typemaps.i + void neg(double *INOUT); + +or you can use the %apply directive : + + %include typemaps.i + %apply double *INOUT { double *x }; + void neg(double *x); + +Unlike C, this mapping does not directly modify the input value (since +this makes no sense in Python). Rather, the modified input value shows +up as the return value of the function. Thus, to apply this function +to a Python variable you might do this : + + x = neg(x) + +Note : previous versions of SWIG used the symbol 'BOTH' to mark +input/output arguments. This is still supported, but will be slowly +phased out in future releases. +%} + +#endif + +%typemap(python,in) int *INOUT = int *INPUT; +%typemap(python,in) short *INOUT = short *INPUT; +%typemap(python,in) long *INOUT = long *INPUT; +%typemap(python,in) unsigned *INOUT = unsigned *INPUT; +%typemap(python,in) unsigned short *INOUT = unsigned short *INPUT; +%typemap(python,in) unsigned long *INOUT = unsigned long *INPUT; +%typemap(python,in) unsigned char *INOUT = unsigned char *INPUT; +%typemap(python,in) float *INOUT = float *INPUT; +%typemap(python,in) double *INOUT = double *INPUT; + +%typemap(python,argout) int *INOUT = int *OUTPUT; +%typemap(python,argout) short *INOUT = short *OUTPUT; +%typemap(python,argout) long *INOUT = long *OUTPUT; +%typemap(python,argout) unsigned *INOUT = unsigned *OUTPUT; +%typemap(python,argout) unsigned short *INOUT = unsigned short *OUTPUT; +%typemap(python,argout) unsigned long *INOUT = unsigned long *OUTPUT; +%typemap(python,argout) unsigned char *INOUT = unsigned char *OUTPUT; +%typemap(python,argout) float *INOUT = float *OUTPUT; +%typemap(python,argout) double *INOUT = double *OUTPUT; + +%typemap(python,in) int *T_INOUT = int *INPUT; +%typemap(python,in) short *T_INOUT = short *INPUT; +%typemap(python,in) long *T_INOUT = long *INPUT; +%typemap(python,in) unsigned *T_INOUT = unsigned *INPUT; +%typemap(python,in) unsigned short *T_INOUT = unsigned short *INPUT; +%typemap(python,in) unsigned long *T_INOUT = unsigned long *INPUT; +%typemap(python,in) unsigned char *T_INOUT = unsigned char *INPUT; +%typemap(python,in) float *T_INOUT = float *INPUT; +%typemap(python,in) double *T_INOUT = double *INPUT; + +%typemap(python,argout) int *T_INOUT = int *T_OUTPUT; +%typemap(python,argout) short *T_INOUT = short *T_OUTPUT; +%typemap(python,argout) long *T_INOUT = long *T_OUTPUT; +%typemap(python,argout) unsigned *T_INOUT = unsigned *T_OUTPUT; +%typemap(python,argout) unsigned short *T_INOUT = unsigned short *T_OUTPUT; +%typemap(python,argout) unsigned long *T_INOUT = unsigned long *T_OUTPUT; +%typemap(python,argout) unsigned char *T_INOUT = unsigned char *T_OUTPUT; +%typemap(python,argout) float *T_INOUT = float *T_OUTPUT; +%typemap(python,argout) double *T_INOUT = double *T_OUTPUT; + +%typemap(python,in) int *L_INOUT = int *INPUT; +%typemap(python,in) short *L_INOUT = short *INPUT; +%typemap(python,in) long *L_INOUT = long *INPUT; +%typemap(python,in) unsigned *L_INOUT = unsigned *INPUT; +%typemap(python,in) unsigned short *L_INOUT = unsigned short *INPUT; +%typemap(python,in) unsigned long *L_INOUT = unsigned long *INPUT; +%typemap(python,in) unsigned char *L_INOUT = unsigned char *INPUT; +%typemap(python,in) float *L_INOUT = float *INPUT; +%typemap(python,in) double *L_INOUT = double *INPUT; + +%typemap(python,argout) int *L_INOUT = int *L_OUTPUT; +%typemap(python,argout) short *L_INOUT = short *L_OUTPUT; +%typemap(python,argout) long *L_INOUT = long *L_OUTPUT; +%typemap(python,argout) unsigned *L_INOUT = unsigned *L_OUTPUT; +%typemap(python,argout) unsigned short *L_INOUT = unsigned short *L_OUTPUT; +%typemap(python,argout) unsigned long *L_INOUT = unsigned long *L_OUTPUT; +%typemap(python,argout) unsigned char *L_INOUT = unsigned char *L_OUTPUT; +%typemap(python,argout) float *L_INOUT = float *L_OUTPUT; +%typemap(python,argout) double *L_INOUT = double *L_OUTPUT; + +// Backwards compatibility + +%typemap(python,in) int *BOTH = int *INOUT; +%typemap(python,in) short *BOTH = short *INOUT; +%typemap(python,in) long *BOTH = long *INOUT; +%typemap(python,in) unsigned *BOTH = unsigned *INOUT; +%typemap(python,in) unsigned short *BOTH = unsigned short *INOUT; +%typemap(python,in) unsigned long *BOTH = unsigned long *INOUT; +%typemap(python,in) unsigned char *BOTH = unsigned char *INOUT; +%typemap(python,in) float *BOTH = float *INOUT; +%typemap(python,in) double *BOTH = double *INOUT; + +%typemap(python,argout) int *BOTH = int *INOUT; +%typemap(python,argout) short *BOTH = short *INOUT; +%typemap(python,argout) long *BOTH = long *INOUT; +%typemap(python,argout) unsigned *BOTH = unsigned *INOUT; +%typemap(python,argout) unsigned short *BOTH = unsigned short *INOUT; +%typemap(python,argout) unsigned long *BOTH = unsigned long *INOUT; +%typemap(python,argout) unsigned char *BOTH = unsigned char *INOUT; +%typemap(python,argout) float *BOTH = float *INOUT; +%typemap(python,argout) double *BOTH = double *INOUT; + +%typemap(python,in) int *T_BOTH = int *T_INOUT; +%typemap(python,in) short *T_BOTH = short *T_INOUT; +%typemap(python,in) long *T_BOTH = long *T_INOUT; +%typemap(python,in) unsigned *T_BOTH = unsigned *T_INOUT; +%typemap(python,in) unsigned short *T_BOTH = unsigned short *T_INOUT; +%typemap(python,in) unsigned long *T_BOTH = unsigned long *T_INOUT; +%typemap(python,in) unsigned char *T_BOTH = unsigned char *T_INOUT; +%typemap(python,in) float *T_BOTH = float *T_INOUT; +%typemap(python,in) double *T_BOTH = double *T_INOUT; + +%typemap(python,argout) int *T_BOTH = int *T_INOUT; +%typemap(python,argout) short *T_BOTH = short *T_INOUT; +%typemap(python,argout) long *T_BOTH = long *T_INOUT; +%typemap(python,argout) unsigned *T_BOTH = unsigned *T_INOUT; +%typemap(python,argout) unsigned short *T_BOTH = unsigned short *T_INOUT; +%typemap(python,argout) unsigned long *T_BOTH = unsigned long *T_INOUT; +%typemap(python,argout) unsigned char *T_BOTH = unsigned char *T_INOUT; +%typemap(python,argout) float *T_BOTH = float *T_INOUT; +%typemap(python,argout) double *T_BOTH = double *T_INOUT; + +// -------------------------------------------------------------------- +// Special types +// +// -------------------------------------------------------------------- + +#ifdef AUTODOC +%subsection "Special Methods" + +%text %{ +The typemaps.i library also provides the following mappings : + +PyObject * + + When a PyObject * appears as either an input value or return + value of a function, SWIG passes it through unmodified. Thus, + if you want to write a C function that operates on PyObjects, + it is easy to write. For example : + + %include typemaps.i + PyObject *spam(PyObject *obj1, int n); + + Unlike normal Python wrapper functions, These functions can + use any combination of parameters that you wish. + +%} + +#endif + + +// If a PyObject * appears as either an argument or a function return +// value, simply pass it straight through. + +%typemap(python,in) PyObject * { + $target = $source; +} + +%typemap(python,out) PyObject * { + $target = $source; +} + diff --git a/wxPython/b b/wxPython/b new file mode 100755 index 0000000000..c54755b526 --- /dev/null +++ b/wxPython/b @@ -0,0 +1,90 @@ +#!/bin/sh + +if [ "$1" = "15" ]; then + PYVER=1.5 + shift +elif [ "$1" = "20" ]; then + PYVER=2.0 + shift +elif [ "$1" = "21" ]; then + PYVER=2.1 + shift +fi + +python$PYVER -c "import sys;print '\n', sys.version, '\n'" + +SETUP="python$PYVER -u setup.py" +FLAGS="USE_SWIG=1 IN_CVS_TREE=1" +OTHERFLAGS="" + + + +# "c" --> clean +if [ "$1" = "c" ]; then + shift + CMD="$SETUP $FLAGS $OTHERFLAGS clean" + OTHERCMD="rm -f wxPython/*.so" + +# "d" --> clean extension modules only +elif [ "$1" = "d" ]; then + shift + CMD="rm -f wxPython/*.so" + +# "t" --> touch *.i files +elif [ "$1" = "t" ]; then + shift + CMD="set CMD=touch src\*.i; touch contrib\glcanvas\*.i; touch contrib\ogl\*.i; touch contrib\stc\*.i" + +# "i" --> install +elif [ "$1" = "i" ]; then + shift + CMD="$SETUP build $OTHERFLAGS install" + +# "s" --> source dist +elif [ "$1" = "s" ]; then + shift + CMD="$SETUP $OTHERFLAGS sdist" + +# "r" --> rpm dist +elif [ "$1" = "r" ]; then + + # save the original + cp setup.py setup.py.save + + # fix up setup.py the way we want... + sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save > setup.py.temp + sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp > setup.py + + # build wxPython-gl RPM + $SETUP $OTHERFLAGS bdist_rpm --binary-only --doc-files README.txt + rm dist/wxPython-gl*.tar.gz + + # Build wxPython RPM + cp setup.py setup.py.temp + sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp > setup.py + $SETUP $OTHERFLAGS bdist_rpm + + # put the oringal back + cp setup.py.save setup.py + rm setup.py.* + + # rebuild the source dist without the munched up setup.py + $SETUP $OTHERFLAGS sdist + exit 0 + + +# (no command arg) --> normal build for development +else + CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*" +fi + + +echo $CMD +$CMD + + +if [ "$OTHERCMD" != "" ]; then + echo $OTHERCMD + $OTHERCMD +fi + diff --git a/wxPython/b.bat b/wxPython/b.bat new file mode 100755 index 0000000000..afe0718200 --- /dev/null +++ b/wxPython/b.bat @@ -0,0 +1,65 @@ +@echo off +setlocal + +set FLAGS=USE_SWIG=1 IN_CVS_TREE=1 + + +rem Use non-default python? +iff "%1" == "15" .or. "%1" == "20" .or. "%1" == "21" then + set PYTHON=c:\tools\python%1%\python.exe + shift +else + set PYTHON=python +endiff +set SETUP=%PYTHON% -u setup.py + + +%PYTHON% -c "import sys;print '\n', sys.version, '\n'" + + +rem "c" --> clean +iff "%1" == "c" then + shift + set CMD=%SETUP% %FLAGS% clean + set OTHERCMD=del wxPython\*.pyd + +rem just remove the *.pyd's +elseiff "%1" == "d" then + shift + set CMD=del wxPython\*.pyd + +rem "i" --> install +elseiff "%1" == "i" then + shift + set CMD=%SETUP% build install + +rem "s" --> source dist +elseiff "%1" == "s" then + shift + set CMD=%SETUP sdist + +rem "f" --> FINAL +elseiff "%1" == "f" then + shift + set CMD=%SETUP% %FLAGS% FINAL=1 build_ext --inplace %1 %2 %3 %4 %5 %6 %7 %8 %9 + +rem "h" --> HYBRID +elseiff "%1" == "h" then + shift + set CMD=%SETUP% %FLAGS% HYBRID=1 build_ext --inplace %1 %2 %3 %4 %5 %6 %7 %8 %9 + +rem (no command arg) --> normal build for development +else + set CMD=%SETUP% %FLAGS% HYBRID=0 build_ext --inplace --debug %1 %2 %3 %4 %5 %6 %7 %8 %9 +endiff + + + +echo %CMD% +%CMD% + +iff "%OTHERCMD%" != "" then + echo %OTHERCMD% + %OTHERCMD% +endiff + diff --git a/utils/wxPython/modules/.cvsignore b/wxPython/contrib/.cvsignore similarity index 100% rename from utils/wxPython/modules/.cvsignore rename to wxPython/contrib/.cvsignore diff --git a/wxPython/contrib/README b/wxPython/contrib/README new file mode 100644 index 0000000000..53c6b62a39 --- /dev/null +++ b/wxPython/contrib/README @@ -0,0 +1,3 @@ +These sub directories contain add-on modules that are not part of the +core wxPython, either because of licensing issues, optional code in +wxWindows, contrib code in wxWindows, or whatever. diff --git a/utils/wxPython/modules/glcanvas/.cvsignore b/wxPython/contrib/glcanvas/.cvsignore similarity index 100% rename from utils/wxPython/modules/glcanvas/.cvsignore rename to wxPython/contrib/glcanvas/.cvsignore diff --git a/utils/wxPython/modules/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i similarity index 75% rename from utils/wxPython/modules/glcanvas/glcanvas.i rename to wxPython/contrib/glcanvas/glcanvas.i index c1c3c0665d..dfd9ed4c8d 100644 --- a/utils/wxPython/modules/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -14,7 +14,7 @@ %module glcanvas %{ -#include "helpers.h" +#include "export.h" #include %} @@ -35,14 +35,6 @@ %extern events.i -%{ -#if defined(__WXMSW__) - static wxString wxPyEmptyStr(""); - static wxPoint wxPyDefaultPosition(-1, -1); - static wxSize wxPyDefaultSize(-1, -1); -#endif -%} - %pragma(python) code = "import wx" //--------------------------------------------------------------------------- @@ -76,16 +68,36 @@ public: //--------------------------------------------------------------------------- +%typemap(python, in) int *attribList (int *temp) { + int i; + if (PySequence_Check($source)) { + int size = PyObject_Length($source); + temp = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); + for (i = 0; i < size; i++) { + temp[i] = PyInt_AsLong(PySequence_GetItem($source, i)); + } + temp[size] = 0; + $target = temp; + } +} + +%typemap(python, freearg) int *attribList +{ + delete [] $source; +} + + + class wxGLCanvas : public wxScrolledWindow { public: wxGLCanvas(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, long style = 0, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, const char* name = "GLCanvas", - int *attribList = 0, + int *attribList = NULL, const wxPalette& palette = wxNullPalette); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void SetCurrent(); void SetColour(const char *colour); diff --git a/utils/wxPython/modules/glcanvas/gtk/.cvsignore b/wxPython/contrib/glcanvas/gtk/.cvsignore similarity index 100% rename from utils/wxPython/modules/glcanvas/gtk/.cvsignore rename to wxPython/contrib/glcanvas/gtk/.cvsignore diff --git a/utils/wxPython/modules/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp similarity index 57% rename from utils/wxPython/modules/glcanvas/gtk/glcanvas.cpp rename to wxPython/contrib/glcanvas/gtk/glcanvas.cpp index 0d9364428d..29403815e0 100644 --- a/utils/wxPython/modules/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/glcanvas.cpp + * FILE : contrib/glcanvas/gtk/glcanvas.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,63 +55,37 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "glcanvasc" -#include "helpers.h" +#include "export.h" #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; } static char* wxStringErrorMsg = "string type is required for parameter"; - -#if defined(__WXMSW__) - static wxString wxPyEmptyStr(""); - static wxPoint wxPyDefaultPosition(-1, -1); - static wxSize wxPyDefaultSize(-1, -1); -#endif #ifdef __cplusplus extern "C" { #endif @@ -466,24 +442,25 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * wxGLCanvas * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "GLCanvas"; - int * _arg6 = (int *) 0; + int * _arg6 = (int *) NULL; wxPalette * _arg7 = (wxPalette *) &wxNullPalette; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; - PyObject * _argo6 = 0; + int * temp1; + PyObject * _obj6 = 0; PyObject * _argo7 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_argo6,&_argo7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -504,13 +481,19 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * if (! wxSize_helper(_obj3, &_arg3)) return NULL; } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGLCanvas. Expected _int_p."); - return NULL; + if (_obj6) +{ + int i; + if (PySequence_Check(_obj6)) { + int size = PyObject_Length(_obj6); + temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); + for (i = 0; i < size; i++) { + temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i)); } + temp1[size] = 0; + _arg6 = temp1; } +} if (_argo7) { if (_argo7 == Py_None) { _arg7 = NULL; } else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { @@ -530,6 +513,9 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + delete [] _arg6; +} return _resultobj; } @@ -674,17 +660,7 @@ static PyMethodDef glcanvascMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -693,361 +669,96 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, { "_class_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxPySizer","_class_wxPySizer",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_wxGLContext","_class_wxGLContext",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxGLCanvas",SwigwxGLCanvasTowxPanel}, { "_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxGLCanvas",SwigwxGLCanvasTowxPanel}, { "_class_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_class_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_wxGLCanvas","_class_wxGLCanvas",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_class_wxGLContext","_wxGLContext",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -1055,67 +766,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_class_wxGLCanvas","_wxGLCanvas",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, { "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, { "_class_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_class_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/modules/glcanvas/gtk/glcanvas.py b/wxPython/contrib/glcanvas/gtk/glcanvas.py similarity index 96% rename from utils/wxPython/modules/glcanvas/gtk/glcanvas.py rename to wxPython/contrib/glcanvas/gtk/glcanvas.py index 1857262df2..ee1d62d319 100644 --- a/utils/wxPython/modules/glcanvas/gtk/glcanvas.py +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx class wxGLContextPtr : def __init__(self,this): @@ -102,7 +108,7 @@ class wxGLCanvas(wxGLCanvasPtr): def __init__(self,*_args,**_kwargs): self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) diff --git a/utils/wxPython/modules/glcanvas/msw/.cvsignore b/wxPython/contrib/glcanvas/msw/.cvsignore similarity index 100% rename from utils/wxPython/modules/glcanvas/msw/.cvsignore rename to wxPython/contrib/glcanvas/msw/.cvsignore diff --git a/utils/wxPython/modules/glcanvas/msw/glcanvas.cpp b/wxPython/contrib/glcanvas/msw/glcanvas.cpp similarity index 88% rename from utils/wxPython/modules/glcanvas/msw/glcanvas.cpp rename to wxPython/contrib/glcanvas/msw/glcanvas.cpp index 16307d6174..ec3035dbd9 100644 --- a/utils/wxPython/modules/glcanvas/msw/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/glcanvas.cpp + * FILE : contrib/glcanvas/msw/glcanvas.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,12 +55,11 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "glcanvasc" -#include "helpers.h" +#include "export.h" #include static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -104,12 +105,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } static char* wxStringErrorMsg = "string type is required for parameter"; - -#if defined(__WXMSW__) - static wxString wxPyEmptyStr(""); - static wxPoint wxPyDefaultPosition(-1, -1); - static wxSize wxPyDefaultSize(-1, -1); -#endif #ifdef __cplusplus extern "C" { #endif @@ -340,24 +335,25 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * wxGLCanvas * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "GLCanvas"; - int * _arg6 = (int *) 0; + int * _arg6 = (int *) NULL; wxPalette * _arg7 = (wxPalette *) &wxNullPalette; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; - PyObject * _argo6 = 0; + int * temp1; + PyObject * _obj6 = 0; PyObject * _argo7 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_argo6,&_argo7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -378,13 +374,19 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * if (! wxSize_helper(_obj3, &_arg3)) return NULL; } - if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGLCanvas. Expected _int_p."); - return NULL; + if (_obj6) +{ + int i; + if (PySequence_Check(_obj6)) { + int size = PyObject_Length(_obj6); + temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int)); + for (i = 0; i < size; i++) { + temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i)); } + temp1[size] = 0; + _arg6 = temp1; } +} if (_argo7) { if (_argo7 == Py_None) { _arg7 = NULL; } else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { @@ -404,6 +406,9 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + delete [] _arg6; +} return _resultobj; } @@ -549,12 +554,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, + { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -563,7 +573,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -576,12 +588,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, @@ -590,6 +605,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrinter","_class_wxPrinter",0}, { "_wxPen","_class_wxPen",0}, { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_class_wxNotebookSizer","_wxNotebookSizer",0}, { "_byte","_unsigned_char",0}, { "_wxDataObject","_class_wxDataObject",0}, { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, @@ -600,7 +616,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSlider","_class_wxSlider",0}, { "_wxNotebookEvent","_class_wxNotebookEvent",0}, { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -611,6 +626,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizer","_wxSizer",0}, { "_class_wxTIFFHandler","_wxTIFFHandler",0}, { "_class_wxPrintDialogData","_wxPrintDialogData",0}, + { "_wxGridSizer","_class_wxGridSizer",0}, { "_wxGLContext","_class_wxGLContext",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, @@ -624,10 +640,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxProgressDialog","_class_wxProgressDialog",0}, { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, + { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -635,8 +653,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -648,6 +667,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, @@ -655,6 +675,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -678,10 +699,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -689,31 +712,40 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -724,6 +756,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, @@ -739,22 +772,29 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_wxDash",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxGLCanvas",SwigwxGLCanvasTowxPanel}, @@ -770,6 +810,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, { "_class_wxTextCtrl","_wxTextCtrl",0}, + { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, @@ -779,6 +820,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -787,12 +829,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCaret","_wxCaret",0}, { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, + { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_class_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -803,13 +849,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_wxGLCanvas","_class_wxGLCanvas",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -819,6 +868,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -827,10 +877,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMetaFileDC","_wxMetaFileDC",0}, @@ -839,6 +891,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -849,6 +902,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -863,14 +918,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, + { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, + { "_class_wxGridSizer","_wxGridSizer",0}, { "_class_wxGLContext","_wxGLContext",0}, { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_class_wxNotebook","_wxNotebook",0}, { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -881,6 +940,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -889,20 +949,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -912,7 +990,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -923,6 +1000,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -930,17 +1008,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, + { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, { "_wxTIFFHandler","_class_wxTIFFHandler",0}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, @@ -948,17 +1032,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxGLCanvas","_wxGLCanvas",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler}, @@ -968,12 +1055,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollBar","_wxScrollBar",0}, { "_class_wxColourDialog","_wxColourDialog",0}, { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_class_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxColourData","_class_wxColourData",0}, @@ -981,6 +1068,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPalette","_wxPalette",0}, { "_wxFileDataObject","_class_wxFileDataObject",0}, { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, + { "_wxNotebookSizer","_class_wxNotebookSizer",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, @@ -991,6 +1079,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; diff --git a/utils/wxPython/modules/glcanvas/msw/glcanvas.py b/wxPython/contrib/glcanvas/msw/glcanvas.py similarity index 96% rename from utils/wxPython/modules/glcanvas/msw/glcanvas.py rename to wxPython/contrib/glcanvas/msw/glcanvas.py index 49cf2b0415..2e4beb50d8 100644 --- a/utils/wxPython/modules/glcanvas/msw/glcanvas.py +++ b/wxPython/contrib/glcanvas/msw/glcanvas.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx class wxGLContextPtr : def __init__(self,this): @@ -88,7 +94,7 @@ class wxGLCanvas(wxGLCanvasPtr): def __init__(self,*_args,**_kwargs): self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) diff --git a/utils/wxPython/modules/ogl/.cvsignore b/wxPython/contrib/ogl/.cvsignore similarity index 84% rename from utils/wxPython/modules/ogl/.cvsignore rename to wxPython/contrib/ogl/.cvsignore index 7fde13a490..2def21472a 100644 --- a/utils/wxPython/modules/ogl/.cvsignore +++ b/wxPython/contrib/ogl/.cvsignore @@ -1,4 +1,5 @@ Makefile +contrib oglc.exp oglc.ilk oglc.pch diff --git a/wxPython/contrib/ogl/README.txt b/wxPython/contrib/ogl/README.txt new file mode 100644 index 0000000000..7f97e87d0f --- /dev/null +++ b/wxPython/contrib/ogl/README.txt @@ -0,0 +1,7 @@ +Since OGL is not always bundled with distributions of wxWindows, in +order for it to be a standard part of wxPython I need to bundle it +here. The contents of the contrib directory are copies of the +relevant parts of the main contrib directory in wxWindows. The +build.py script in this directory will also build the needed files +from there, so you no longer have to worry about aquiring and building +additional libraries beyond wxWindows itself. diff --git a/utils/wxPython/modules/ogl/_ogldefs.i b/wxPython/contrib/ogl/_ogldefs.i similarity index 100% rename from utils/wxPython/modules/ogl/_ogldefs.i rename to wxPython/contrib/ogl/_ogldefs.i diff --git a/utils/wxPython/modules/ogl/_extras.py b/wxPython/contrib/ogl/_oglextras.py similarity index 100% rename from utils/wxPython/modules/ogl/_extras.py rename to wxPython/contrib/ogl/_oglextras.py diff --git a/wxPython/contrib/ogl/ogl.cpp b/wxPython/contrib/ogl/ogl.cpp new file mode 100644 index 0000000000..1489477d2d --- /dev/null +++ b/wxPython/contrib/ogl/ogl.cpp @@ -0,0 +1,411 @@ +/* + * FILE : contrib/ogl/ogl.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initoglc + +#define SWIG_name "oglc" + +#include "export.h" +#include "oglhelpers.h" + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +//--------------------------------------------------------------------------- +// This one will work for any class for the VERY generic cases, but beyond that +// the helper needs to know more about the type. + +wxList* wxPy_wxListHelper(PyObject* pyList, char* className) { + bool doSave = wxPyRestoreThread(); + if (!PyList_Check(pyList)) { + PyErr_SetString(PyExc_TypeError, "Expected a list object."); + wxPySaveThread(doSave); + return NULL; + } + int count = PyList_Size(pyList); + wxList* list = new wxList; + if (! list) { + PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); + wxPySaveThread(doSave); + return NULL; + } + for (int x=0; xAppend(wxo); + } + wxPySaveThread(doSave); + return list; +} + +//--------------------------------------------------------------------------- + +wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { + bool doSave = wxPyRestoreThread(); + if (!PyList_Check(pyList)) { + PyErr_SetString(PyExc_TypeError, "Expected a list object."); + wxPySaveThread(doSave); + return NULL; + } + int count = PyList_Size(pyList); + wxList* list = new wxList; + if (! list) { + PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); + wxPySaveThread(doSave); + return NULL; + } + for (int x=0; xAppend((wxObject*) new wxRealPoint(val1, val2)); + + } else { + wxRealPoint* wxo = NULL; + if (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) { + PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples"); + wxPySaveThread(doSave); + return NULL; + } + list->Append((wxObject*) new wxRealPoint(*wxo)); + } + } + wxPySaveThread(doSave); + return list; +} + + +//--------------------------------------------------------------------------- + + +extern "C" SWIGEXPORT(void) initoglbasicc(); +extern "C" SWIGEXPORT(void) initoglshapesc(); +extern "C" SWIGEXPORT(void) initoglshapes2c(); +extern "C" SWIGEXPORT(void) initoglcanvasc(); +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap_wxOGLInitialize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLInitialize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxOGLInitialize(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxOGLCleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLCleanUp",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxOGLCleanUp(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyMethodDef oglcMethods[] = { + { "wxOGLCleanUp", (PyCFunction) _wrap_wxOGLCleanUp, METH_VARARGS | METH_KEYWORDS }, + { "wxOGLInitialize", (PyCFunction) _wrap_wxOGLInitialize, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initoglc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("oglc", oglcMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"KEY_SHIFT", PyInt_FromLong((long) KEY_SHIFT)); + PyDict_SetItemString(d,"KEY_CTRL", PyInt_FromLong((long) KEY_CTRL)); + PyDict_SetItemString(d,"ARROW_NONE", PyInt_FromLong((long) ARROW_NONE)); + PyDict_SetItemString(d,"ARROW_END", PyInt_FromLong((long) ARROW_END)); + PyDict_SetItemString(d,"ARROW_BOTH", PyInt_FromLong((long) ARROW_BOTH)); + PyDict_SetItemString(d,"ARROW_MIDDLE", PyInt_FromLong((long) ARROW_MIDDLE)); + PyDict_SetItemString(d,"ARROW_START", PyInt_FromLong((long) ARROW_START)); + PyDict_SetItemString(d,"ARROW_HOLLOW_CIRCLE", PyInt_FromLong((long) ARROW_HOLLOW_CIRCLE)); + PyDict_SetItemString(d,"ARROW_FILLED_CIRCLE", PyInt_FromLong((long) ARROW_FILLED_CIRCLE)); + PyDict_SetItemString(d,"ARROW_ARROW", PyInt_FromLong((long) ARROW_ARROW)); + PyDict_SetItemString(d,"ARROW_SINGLE_OBLIQUE", PyInt_FromLong((long) ARROW_SINGLE_OBLIQUE)); + PyDict_SetItemString(d,"ARROW_DOUBLE_OBLIQUE", PyInt_FromLong((long) ARROW_DOUBLE_OBLIQUE)); + PyDict_SetItemString(d,"ARROW_METAFILE", PyInt_FromLong((long) ARROW_METAFILE)); + PyDict_SetItemString(d,"ARROW_POSITION_END", PyInt_FromLong((long) ARROW_POSITION_END)); + PyDict_SetItemString(d,"ARROW_POSITION_START", PyInt_FromLong((long) ARROW_POSITION_START)); + PyDict_SetItemString(d,"CONTROL_POINT_VERTICAL", PyInt_FromLong((long) CONTROL_POINT_VERTICAL)); + PyDict_SetItemString(d,"CONTROL_POINT_HORIZONTAL", PyInt_FromLong((long) CONTROL_POINT_HORIZONTAL)); + PyDict_SetItemString(d,"CONTROL_POINT_DIAGONAL", PyInt_FromLong((long) CONTROL_POINT_DIAGONAL)); + PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_TO", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_TO)); + PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_FROM", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_FROM)); + PyDict_SetItemString(d,"CONTROL_POINT_LINE", PyInt_FromLong((long) CONTROL_POINT_LINE)); + PyDict_SetItemString(d,"FORMAT_NONE", PyInt_FromLong((long) FORMAT_NONE)); + PyDict_SetItemString(d,"FORMAT_CENTRE_HORIZ", PyInt_FromLong((long) FORMAT_CENTRE_HORIZ)); + PyDict_SetItemString(d,"FORMAT_CENTRE_VERT", PyInt_FromLong((long) FORMAT_CENTRE_VERT)); + PyDict_SetItemString(d,"FORMAT_SIZE_TO_CONTENTS", PyInt_FromLong((long) FORMAT_SIZE_TO_CONTENTS)); + PyDict_SetItemString(d,"LINE_ALIGNMENT_HORIZ", PyInt_FromLong((long) LINE_ALIGNMENT_HORIZ)); + PyDict_SetItemString(d,"LINE_ALIGNMENT_VERT", PyInt_FromLong((long) LINE_ALIGNMENT_VERT)); + PyDict_SetItemString(d,"LINE_ALIGNMENT_TO_NEXT_HANDLE", PyInt_FromLong((long) LINE_ALIGNMENT_TO_NEXT_HANDLE)); + PyDict_SetItemString(d,"LINE_ALIGNMENT_NONE", PyInt_FromLong((long) LINE_ALIGNMENT_NONE)); + PyDict_SetItemString(d,"SHADOW_NONE", PyInt_FromLong((long) SHADOW_NONE)); + PyDict_SetItemString(d,"SHADOW_LEFT", PyInt_FromLong((long) SHADOW_LEFT)); + PyDict_SetItemString(d,"SHADOW_RIGHT", PyInt_FromLong((long) SHADOW_RIGHT)); + PyDict_SetItemString(d,"OP_CLICK_LEFT", PyInt_FromLong((long) OP_CLICK_LEFT)); + PyDict_SetItemString(d,"OP_CLICK_RIGHT", PyInt_FromLong((long) OP_CLICK_RIGHT)); + PyDict_SetItemString(d,"OP_DRAG_LEFT", PyInt_FromLong((long) OP_DRAG_LEFT)); + PyDict_SetItemString(d,"OP_DRAG_RIGHT", PyInt_FromLong((long) OP_DRAG_RIGHT)); + PyDict_SetItemString(d,"OP_ALL", PyInt_FromLong((long) OP_ALL)); + PyDict_SetItemString(d,"ATTACHMENT_MODE_NONE", PyInt_FromLong((long) ATTACHMENT_MODE_NONE)); + PyDict_SetItemString(d,"ATTACHMENT_MODE_EDGE", PyInt_FromLong((long) ATTACHMENT_MODE_EDGE)); + PyDict_SetItemString(d,"ATTACHMENT_MODE_BRANCHING", PyInt_FromLong((long) ATTACHMENT_MODE_BRANCHING)); + PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_NORMAL", PyInt_FromLong((long) BRANCHING_ATTACHMENT_NORMAL)); + PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_BLOB", PyInt_FromLong((long) BRANCHING_ATTACHMENT_BLOB)); + PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_VERTICALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_VERTICALLY)); + PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_HORIZONTALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_HORIZONTALLY)); + PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_BOTH", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_BOTH)); + PyDict_SetItemString(d,"gyCONSTRAINT_LEFT_OF", PyInt_FromLong((long) gyCONSTRAINT_LEFT_OF)); + PyDict_SetItemString(d,"gyCONSTRAINT_RIGHT_OF", PyInt_FromLong((long) gyCONSTRAINT_RIGHT_OF)); + PyDict_SetItemString(d,"gyCONSTRAINT_ABOVE", PyInt_FromLong((long) gyCONSTRAINT_ABOVE)); + PyDict_SetItemString(d,"gyCONSTRAINT_BELOW", PyInt_FromLong((long) gyCONSTRAINT_BELOW)); + PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_TOP)); + PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_BOTTOM)); + PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_LEFT)); + PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_RIGHT)); + PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_TOP)); + PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_BOTTOM)); + PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_LEFT)); + PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_RIGHT)); + PyDict_SetItemString(d,"DIVISION_SIDE_NONE", PyInt_FromLong((long) DIVISION_SIDE_NONE)); + PyDict_SetItemString(d,"DIVISION_SIDE_LEFT", PyInt_FromLong((long) DIVISION_SIDE_LEFT)); + PyDict_SetItemString(d,"DIVISION_SIDE_TOP", PyInt_FromLong((long) DIVISION_SIDE_TOP)); + PyDict_SetItemString(d,"DIVISION_SIDE_RIGHT", PyInt_FromLong((long) DIVISION_SIDE_RIGHT)); + PyDict_SetItemString(d,"DIVISION_SIDE_BOTTOM", PyInt_FromLong((long) DIVISION_SIDE_BOTTOM)); + + + initoglbasicc(); + initoglshapesc(); + initoglshapes2c(); + initoglcanvasc(); + + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/utils/wxPython/modules/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i similarity index 60% rename from utils/wxPython/modules/ogl/ogl.i rename to wxPython/contrib/ogl/ogl.i index 0b00d351f9..a679aed93e 100644 --- a/utils/wxPython/modules/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -14,7 +14,7 @@ %module ogl %{ -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" %} @@ -37,14 +37,6 @@ %import oglcanvas.i -%{ -#if defined(__WXMSW__) - wxString wxPyEmptyStr(""); - wxPoint wxPyDefaultPosition(-1, -1); - wxSize wxPyDefaultSize(-1, -1); -#endif -%} - %pragma(python) code = "import wx" //--------------------------------------------------------------------------- @@ -141,10 +133,88 @@ void wxOGLInitialize(); void wxOGLCleanUp(); -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- %{ +//--------------------------------------------------------------------------- +// This one will work for any class for the VERY generic cases, but beyond that +// the helper needs to know more about the type. + +wxList* wxPy_wxListHelper(PyObject* pyList, char* className) { + bool doSave = wxPyRestoreThread(); + if (!PyList_Check(pyList)) { + PyErr_SetString(PyExc_TypeError, "Expected a list object."); + wxPySaveThread(doSave); + return NULL; + } + int count = PyList_Size(pyList); + wxList* list = new wxList; + if (! list) { + PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); + wxPySaveThread(doSave); + return NULL; + } + for (int x=0; xAppend(wxo); + } + wxPySaveThread(doSave); + return list; +} + +//--------------------------------------------------------------------------- + +wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { + bool doSave = wxPyRestoreThread(); + if (!PyList_Check(pyList)) { + PyErr_SetString(PyExc_TypeError, "Expected a list object."); + wxPySaveThread(doSave); + return NULL; + } + int count = PyList_Size(pyList); + wxList* list = new wxList; + if (! list) { + PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object"); + wxPySaveThread(doSave); + return NULL; + } + for (int x=0; xAppend((wxObject*) new wxRealPoint(val1, val2)); + + } else { + wxRealPoint* wxo = NULL; + if (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) { + PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples"); + wxPySaveThread(doSave); + return NULL; + } + list->Append((wxObject*) new wxRealPoint(*wxo)); + } + } + wxPySaveThread(doSave); + return list; +} + + +//--------------------------------------------------------------------------- + + extern "C" SWIGEXPORT(void) initoglbasicc(); extern "C" SWIGEXPORT(void) initoglshapesc(); extern "C" SWIGEXPORT(void) initoglshapes2c(); @@ -169,7 +239,7 @@ extern "C" SWIGEXPORT(void) initoglcanvasc(); // And this gets appended to the shadow class file. //---------------------------------------------------------------------- -%pragma(python) include="_extras.py"; +%pragma(python) include="_oglextras.py"; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/utils/wxPython/modules/ogl/ogl.py b/wxPython/contrib/ogl/ogl.py similarity index 98% rename from utils/wxPython/modules/ogl/ogl.py rename to wxPython/contrib/ogl/ogl.py index c896a7d261..5c3b81333d 100644 --- a/utils/wxPython/modules/ogl/ogl.py +++ b/wxPython/contrib/ogl/ogl.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -35,6 +37,10 @@ from printfw import * from sizers import * +from filesys import * + +from utils import * + from oglbasic import * from oglshapes import * diff --git a/utils/wxPython/modules/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp similarity index 92% rename from utils/wxPython/modules/ogl/oglbasic.cpp rename to wxPython/contrib/ogl/oglbasic.cpp index b5e499fd0e..f48bebaf59 100644 --- a/utils/wxPython/modules/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -1,9 +1,9 @@ /* - * FILE : oglbasic.cpp + * FILE : contrib/ogl/oglbasic.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,51 +55,31 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "oglbasicc" -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -156,11 +138,22 @@ static PyObject *_wrap_wxShapeRegion_SetText(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -376,11 +369,22 @@ static PyObject *_wrap_wxShapeRegion_SetName(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -416,11 +420,22 @@ static PyObject *_wrap_wxShapeRegion_SetColour(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -507,14 +522,20 @@ static PyObject *_wrap_wxShapeRegion_GetMinSize(PyObject *self, PyObject *args, PyObject * _resultobj; wxShapeRegion * _arg0; double * _arg1; + double temp; double * _arg2; + double temp0; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","x","y", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxShapeRegion_GetMinSize",_kwnames,&_argo0,&_argo1,&_argo2)) +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxShapeRegion_GetMinSize",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -523,20 +544,6 @@ static PyObject *_wrap_wxShapeRegion_GetMinSize(PyObject *self, PyObject *args, return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxShapeRegion_GetMinSize. Expected _double_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxShapeRegion_GetMinSize. Expected _double_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; wxShapeRegion_GetMinSize(_arg0,_arg1,_arg2); @@ -544,6 +551,16 @@ static PyObject *_wrap_wxShapeRegion_GetMinSize(PyObject *self, PyObject *args, wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} return _resultobj; } @@ -552,14 +569,20 @@ static PyObject *_wrap_wxShapeRegion_GetProportion(PyObject *self, PyObject *arg PyObject * _resultobj; wxShapeRegion * _arg0; double * _arg1; + double temp; double * _arg2; + double temp0; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","x","y", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxShapeRegion_GetProportion",_kwnames,&_argo0,&_argo1,&_argo2)) +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxShapeRegion_GetProportion",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -568,20 +591,6 @@ static PyObject *_wrap_wxShapeRegion_GetProportion(PyObject *self, PyObject *arg return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxShapeRegion_GetProportion. Expected _double_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxShapeRegion_GetProportion. Expected _double_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; wxShapeRegion_GetProportion(_arg0,_arg1,_arg2); @@ -589,6 +598,16 @@ static PyObject *_wrap_wxShapeRegion_GetProportion(PyObject *self, PyObject *arg wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} return _resultobj; } @@ -597,14 +616,20 @@ static PyObject *_wrap_wxShapeRegion_GetSize(PyObject *self, PyObject *args, PyO PyObject * _resultobj; wxShapeRegion * _arg0; double * _arg1; + double temp; double * _arg2; + double temp0; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","x","y", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxShapeRegion_GetSize",_kwnames,&_argo0,&_argo1,&_argo2)) +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxShapeRegion_GetSize",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -613,20 +638,6 @@ static PyObject *_wrap_wxShapeRegion_GetSize(PyObject *self, PyObject *args, PyO return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxShapeRegion_GetSize. Expected _double_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxShapeRegion_GetSize. Expected _double_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; wxShapeRegion_GetSize(_arg0,_arg1,_arg2); @@ -634,6 +645,16 @@ static PyObject *_wrap_wxShapeRegion_GetSize(PyObject *self, PyObject *args, PyO wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} return _resultobj; } @@ -642,14 +663,20 @@ static PyObject *_wrap_wxShapeRegion_GetPosition(PyObject *self, PyObject *args, PyObject * _resultobj; wxShapeRegion * _arg0; double * _arg1; + double temp; double * _arg2; + double temp0; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","xp","yp", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxShapeRegion_GetPosition",_kwnames,&_argo0,&_argo1,&_argo2)) +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxShapeRegion_GetPosition",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -658,20 +685,6 @@ static PyObject *_wrap_wxShapeRegion_GetPosition(PyObject *self, PyObject *args, return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxShapeRegion_GetPosition. Expected _double_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_double_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxShapeRegion_GetPosition. Expected _double_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; wxShapeRegion_GetPosition(_arg0,_arg1,_arg2); @@ -679,6 +692,16 @@ static PyObject *_wrap_wxShapeRegion_GetPosition(PyObject *self, PyObject *args, wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} return _resultobj; } @@ -949,11 +972,22 @@ static PyObject *_wrap_wxShapeRegion_SetPenColour(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1127,17 +1161,19 @@ static PyObject *_wrap_new_wxPyShapeEvtHandler(PyObject *self, PyObject *args, P return _resultobj; } -#define wxPyShapeEvtHandler__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyShapeEvtHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyShapeEvtHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyShapeEvtHandler * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShapeEvtHandler__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShapeEvtHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1149,9 +1185,12 @@ static PyObject *_wrap_wxPyShapeEvtHandler__setSelf(PyObject *self, PyObject *ar { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyShapeEvtHandler__setSelf(_arg0,_arg1); + wxPyShapeEvtHandler__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2382,17 +2421,19 @@ static void *SwigwxPyShapeTowxPyShapeEvtHandler(void *ptr) { return (void *) dest; } -#define wxPyShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2404,9 +2445,12 @@ static PyObject *_wrap_wxPyShape__setSelf(PyObject *self, PyObject *args, PyObje { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyShape__setSelf(_arg0,_arg1); + wxPyShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4932,11 +4976,22 @@ static PyObject *_wrap_wxPyShape_AddText(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5077,11 +5132,22 @@ static PyObject *_wrap_wxPyShape_FormatText(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5247,11 +5313,22 @@ static PyObject *_wrap_wxPyShape_SetTextColour(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5348,11 +5425,22 @@ static PyObject *_wrap_wxPyShape_SetRegionName(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5422,11 +5510,22 @@ static PyObject *_wrap_wxPyShape_GetRegionId(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5462,11 +5561,22 @@ static PyObject *_wrap_wxPyShape_NameRegions(PyObject *self, PyObject *args, PyO } if (_obj1) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5611,14 +5721,17 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb wxPyShape * _arg0; wxString * _arg1; int * _arg2; + int temp; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","regionName","regionId", NULL }; + char *_kwnames[] = { "self","regionName", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShape_FindRegion",_kwnames,&_argo0,&_obj1,&_argo2)) +{ + _arg2 = &temp; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShape_FindRegion",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5628,19 +5741,23 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyShape_FindRegion. Expected _int_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; _result = (wxPyShape *)wxPyShape_FindRegion(_arg0,*_arg1,_arg2); @@ -5653,6 +5770,11 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb Py_INCREF(Py_None); _resultobj = Py_None; } +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} { if (_obj1) delete _arg1; @@ -8221,17 +8343,7 @@ static PyMethodDef oglbasiccMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -8240,355 +8352,88 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxPySizer","_class_wxPySizer",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_wxPrintQuality","_time_t",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_wxShapeRegion","_class_wxShapeRegion",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, - { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, - { "_class_wxShapeRegion","_wxShapeRegion",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, - { "_wxPyShape","_class_wxPyShape",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_class_wxPyShape","_wxPyShape",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -8596,63 +8441,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_wxPyShape",SwigwxPyShapeTowxPyShapeEvtHandler}, - { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/modules/ogl/oglbasic.i b/wxPython/contrib/ogl/oglbasic.i similarity index 96% rename from utils/wxPython/modules/ogl/oglbasic.i rename to wxPython/contrib/ogl/oglbasic.i index 89ac277403..43418c3833 100644 --- a/utils/wxPython/modules/ogl/oglbasic.i +++ b/wxPython/contrib/ogl/oglbasic.i @@ -14,7 +14,7 @@ %module oglbasic %{ -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" %} @@ -59,10 +59,10 @@ public: wxString GetText(); wxFont *GetFont(); - void GetMinSize(double *x, double *y); - void GetProportion(double *x, double *y); - void GetSize(double *x, double *y); - void GetPosition(double *xp, double *yp); + void GetMinSize(double *OUTPUT, double *OUTPUT); + void GetProportion(double *OUTPUT, double *OUTPUT); + void GetSize(double *OUTPUT, double *OUTPUT); + void GetPosition(double *OUTPUT, double *OUTPUT); int GetFormatMode(); wxString GetName(); wxString GetColour(); @@ -92,8 +92,8 @@ public: wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL, wxPyShape *shape = NULL); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShapeEvtHandler)" %addmethods { void Destroy() { delete self; } @@ -147,8 +147,8 @@ class wxPyShape : public wxPyShapeEvtHandler { public: // wxPyShape(wxPyShapeCanvas *can = NULL); abstract base class... - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShape)" %addmethods { void Destroy() { delete self; } @@ -302,7 +302,7 @@ public: void AddRegion(wxShapeRegion *region); void ClearRegions(); void AssignNewIds(); - wxPyShape *FindRegion(const wxString& regionName, int *regionId); + wxPyShape *FindRegion(const wxString& regionName, int *OUTPUT); void FindRegionNames(wxStringList& list); void ClearText(int regionId = 0); void RemoveLine(wxPyLineShape *line); diff --git a/utils/wxPython/modules/ogl/oglbasic.py b/wxPython/contrib/ogl/oglbasic.py similarity index 99% rename from utils/wxPython/modules/ogl/oglbasic.py rename to wxPython/contrib/ogl/oglbasic.py index a4d59d9af9..1bb9b5c307 100644 --- a/utils/wxPython/modules/ogl/oglbasic.py +++ b/wxPython/contrib/ogl/oglbasic.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx from oglcanvas import wxPyShapeCanvasPtr class wxShapeRegionPtr : @@ -258,7 +264,7 @@ class wxPyShapeEvtHandler(wxPyShapeEvtHandlerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglbasicc.new_wxPyShapeEvtHandler,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyShapeEvtHandler) @@ -570,7 +576,6 @@ class wxPyShapePtr(wxPyShapeEvtHandlerPtr): return val def FindRegion(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_FindRegion,(self,) + _args, _kwargs) - if val: val = wxPyShapePtr(val) return val def FindRegionNames(self, *_args, **_kwargs): val = apply(oglbasicc.wxPyShape_FindRegionNames,(self,) + _args, _kwargs) diff --git a/utils/wxPython/modules/ogl/oglcanvas.cpp b/wxPython/contrib/ogl/oglcanvas.cpp similarity index 79% rename from utils/wxPython/modules/ogl/oglcanvas.cpp rename to wxPython/contrib/ogl/oglcanvas.cpp index a1f3641750..bd70e9d361 100644 --- a/utils/wxPython/modules/ogl/oglcanvas.cpp +++ b/wxPython/contrib/ogl/oglcanvas.cpp @@ -1,9 +1,9 @@ /* - * FILE : ./oglcanvas.cpp + * FILE : contrib/ogl/oglcanvas.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,51 +55,31 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "oglcanvasc" -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -609,11 +591,22 @@ static PyObject *_wrap_wxDiagram_LoadFile(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -892,11 +885,22 @@ static PyObject *_wrap_wxDiagram_SaveFile(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1178,8 +1182,8 @@ static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObj wxPyShapeCanvas * _result; wxWindow * _arg0 = (wxWindow *) NULL; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxBORDER; PyObject * _argo0 = 0; wxPoint temp; @@ -1226,17 +1230,19 @@ static PyObject *_wrap_new_wxPyShapeCanvas(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxPyShapeCanvas__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyShapeCanvas__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyShapeCanvas__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyShapeCanvas * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShapeCanvas__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShapeCanvas__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1248,9 +1254,12 @@ static PyObject *_wrap_wxPyShapeCanvas__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyShapeCanvas__setSelf(_arg0,_arg1); + wxPyShapeCanvas__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1973,17 +1982,7 @@ static PyMethodDef oglcanvascMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1992,365 +1991,96 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxEvtHandler}, { "_class_wxEvtHandler","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxPySizer","_class_wxPySizer",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_wxShapeRegion","_class_wxShapeRegion",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_wxPanel","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxPyShapeCanvas","_class_wxPyShapeCanvas",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, - { "_class_wxShapeRegion","_wxShapeRegion",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_class_wxPyShapeCanvas","_wxPyShapeCanvas",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, { "_class_wxPanel","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxPanel}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxWindow}, { "_class_wxWindow","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, - { "_wxPyShape","_class_wxPyShape",0}, { "_wxScrolledWindow","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxScrolledWindow}, { "_wxScrolledWindow","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxScrolledWindow}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_class_wxPyShape","_wxPyShape",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -2358,69 +2088,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_wxDiagram","_class_wxDiagram",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, - { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0}, { "_wxEvtHandler","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxEvtHandler}, { "_wxEvtHandler","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, { "_class_wxScrolledWindow","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxScrolledWindow}, { "_class_wxScrolledWindow","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxScrolledWindow}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxWindow}, { "_wxWindow","_wxPyShapeCanvas",SwigwxPyShapeCanvasTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, - { "_class_wxDiagram","_wxDiagram",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/modules/ogl/oglcanvas.i b/wxPython/contrib/ogl/oglcanvas.i similarity index 87% rename from utils/wxPython/modules/ogl/oglcanvas.i rename to wxPython/contrib/ogl/oglcanvas.i index a4474ff181..c6601478de 100644 --- a/utils/wxPython/modules/ogl/oglcanvas.i +++ b/wxPython/contrib/ogl/oglcanvas.i @@ -14,7 +14,7 @@ %module oglcanvas %{ -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" %} @@ -49,7 +49,16 @@ public: void Clear(wxDC& dc); void DeleteAllShapes(); void DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2); + wxPyShape* FindShape(long id); + %pragma(python) addtoclass = "# replaces broken shadow methods + def FindShape(self, *_args, **_kwargs): + from oglbasic import wxPyShapePtr + val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs) + if val: val = wxPyShapePtr(val) + return val + " + wxPyShapeCanvas* GetCanvas(); int GetCount(); double GetGridSpacing(); @@ -112,15 +121,15 @@ public: class wxPyShapeCanvas : public wxScrolledWindow { public: wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxBORDER); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShapeCanvas)" - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" void AddShape(wxPyShape *shape, wxPyShape *addAfter = NULL); diff --git a/utils/wxPython/modules/ogl/oglcanvas.py b/wxPython/contrib/ogl/oglcanvas.py similarity index 95% rename from utils/wxPython/modules/ogl/oglcanvas.py rename to wxPython/contrib/ogl/oglcanvas.py index cfeb03d41b..e8f9b55f72 100644 --- a/utils/wxPython/modules/ogl/oglcanvas.py +++ b/wxPython/contrib/ogl/oglcanvas.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx class wxDiagramPtr : def __init__(self,this): @@ -133,6 +139,13 @@ class wxDiagramPtr : return val def __repr__(self): return "" % (self.this,) + # replaces broken shadow methods + def FindShape(self, *_args, **_kwargs): + from oglbasic import wxPyShapePtr + val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs) + if val: val = wxPyShapePtr(val) + return val + class wxDiagram(wxDiagramPtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglcanvasc.new_wxDiagram,_args,_kwargs) @@ -209,9 +222,9 @@ class wxPyShapeCanvas(wxPyShapeCanvasPtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglcanvasc.new_wxPyShapeCanvas,_args,_kwargs) self.thisown = 1 - self._setSelf(self) - wx._StdWindowCallbacks(self) - wx._StdOnScrollCallbacks(self) + self._setSelf(self, wxPyShapeCanvas) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) diff --git a/utils/wxPython/modules/ogl/oglhelpers.cpp b/wxPython/contrib/ogl/oglhelpers.cpp similarity index 100% rename from utils/wxPython/modules/ogl/oglhelpers.cpp rename to wxPython/contrib/ogl/oglhelpers.cpp diff --git a/utils/wxPython/modules/ogl/oglhelpers.h b/wxPython/contrib/ogl/oglhelpers.h similarity index 98% rename from utils/wxPython/modules/ogl/oglhelpers.h rename to wxPython/contrib/ogl/oglhelpers.h index a24ce863b3..19404c2826 100644 --- a/utils/wxPython/modules/ogl/oglhelpers.h +++ b/wxPython/contrib/ogl/oglhelpers.h @@ -110,8 +110,8 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList); class wxPyShapeCanvas : public wxShapeCanvas { public: wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxBORDER) : wxShapeCanvas(parent, id, pos, size, style) {} diff --git a/utils/wxPython/modules/ogl/oglshapes.cpp b/wxPython/contrib/ogl/oglshapes.cpp similarity index 95% rename from utils/wxPython/modules/ogl/oglshapes.cpp rename to wxPython/contrib/ogl/oglshapes.cpp index ce49440d3d..54de9df707 100644 --- a/utils/wxPython/modules/ogl/oglshapes.cpp +++ b/wxPython/contrib/ogl/oglshapes.cpp @@ -1,9 +1,9 @@ /* - * FILE : ./oglshapes.cpp + * FILE : contrib/ogl/oglshapes.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,51 +55,31 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "oglshapesc" -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -1213,11 +1195,22 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawText(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { _arg2 = &temp; @@ -1565,11 +1558,12 @@ static PyObject *_wrap_wxPseudoMetaFile_SetTextColour(PyObject *self, PyObject * wxPseudoMetaFile * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetTextColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetTextColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1578,13 +1572,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetTextColour(PyObject *self, PyObject * return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetTextColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxPseudoMetaFile_SetTextColour(_arg0,*_arg1); @@ -1601,11 +1593,12 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBackgroundColour(PyObject *self, PyOb wxPseudoMetaFile * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1614,13 +1607,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBackgroundColour(PyObject *self, PyOb return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxPseudoMetaFile_SetBackgroundColour(_arg0,*_arg1); @@ -1702,17 +1693,19 @@ static PyObject *_wrap_new_wxPyRectangleShape(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxPyRectangleShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyRectangleShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyRectangleShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyRectangleShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyRectangleShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyRectangleShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1724,9 +1717,12 @@ static PyObject *_wrap_wxPyRectangleShape__setSelf(PyObject *self, PyObject *arg { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyRectangleShape__setSelf(_arg0,_arg1); + wxPyRectangleShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2847,17 +2843,19 @@ static PyObject *_wrap_new_wxPyControlPoint(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxPyControlPoint__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyControlPoint__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyControlPoint__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyControlPoint * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyControlPoint__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyControlPoint__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2869,9 +2867,12 @@ static PyObject *_wrap_wxPyControlPoint__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyControlPoint__setSelf(_arg0,_arg1); + wxPyControlPoint__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3970,17 +3971,19 @@ static PyObject *_wrap_new_wxPyBitmapShape(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxPyBitmapShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyBitmapShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyBitmapShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyBitmapShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyBitmapShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyBitmapShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3992,9 +3995,12 @@ static PyObject *_wrap_wxPyBitmapShape__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyBitmapShape__setSelf(_arg0,_arg1); + wxPyBitmapShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4125,11 +4131,22 @@ static PyObject *_wrap_wxPyBitmapShape_SetFilename(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5208,17 +5225,19 @@ static PyObject *_wrap_new_wxPyDrawnShape(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxPyDrawnShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyDrawnShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyDrawnShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDrawnShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDrawnShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5230,9 +5249,12 @@ static PyObject *_wrap_wxPyDrawnShape__setSelf(PyObject *self, PyObject *args, P { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyDrawnShape__setSelf(_arg0,_arg1); + wxPyDrawnShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -5727,11 +5749,22 @@ static PyObject *_wrap_wxPyDrawnShape_DrawText(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { _arg2 = &temp; @@ -5940,11 +5973,12 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBackgroundColour(PyObject *self, P wxPyDrawnShape * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5953,13 +5987,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBackgroundColour(PyObject *self, P return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxPyDrawnShape_SetDrawnBackgroundColour(_arg0,*_arg1); @@ -6118,11 +6150,12 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnTextColour(PyObject *self, PyObjec wxPyDrawnShape * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnTextColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnTextColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6131,13 +6164,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnTextColour(PyObject *self, PyObjec return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnTextColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxPyDrawnShape_SetDrawnTextColour(_arg0,*_arg1); @@ -7457,17 +7488,19 @@ static PyObject *_wrap_new_wxPyCompositeShape(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxPyCompositeShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyCompositeShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyCompositeShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyCompositeShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyCompositeShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyCompositeShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7479,9 +7512,12 @@ static PyObject *_wrap_wxPyCompositeShape__setSelf(PyObject *self, PyObject *arg { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyCompositeShape__setSelf(_arg0,_arg1); + wxPyCompositeShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -9072,17 +9108,19 @@ static PyObject *_wrap_new_wxPyDividedShape(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxPyDividedShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyDividedShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyDividedShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDividedShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDividedShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDividedShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -9094,9 +9132,12 @@ static PyObject *_wrap_wxPyDividedShape__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyDividedShape__setSelf(_arg0,_arg1); + wxPyDividedShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -10229,17 +10270,19 @@ static PyObject *_wrap_new_wxPyDivisionShape(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxPyDivisionShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyDivisionShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyDivisionShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDivisionShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDivisionShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10251,9 +10294,12 @@ static PyObject *_wrap_wxPyDivisionShape__setSelf(PyObject *self, PyObject *args { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyDivisionShape__setSelf(_arg0,_arg1); + wxPyDivisionShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -10885,11 +10931,22 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSideColour(PyObject *self, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -11033,11 +11090,22 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSideColour(PyObject *self, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -12453,17 +12521,7 @@ static PyMethodDef oglshapescMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -12472,24 +12530,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxPySizer","_class_wxPySizer",0}, + { "_wxPrintQuality","_time_t",0}, { "_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, - { "_wxPyCompositeShape","_class_wxPyCompositeShape",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, { "_class_wxPyRectangleShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyRectangleShape}, @@ -12502,65 +12545,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyRectangleShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape}, - { "_class_wxPyRectangleShape","_wxPyRectangleShape",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxOGLConstraint","_wxOGLConstraint",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPseudoMetaFile","_class_wxPseudoMetaFile",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_wxShapeRegion","_class_wxShapeRegion",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, - { "_wxPyBitmapShape","_class_wxPyBitmapShape",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler}, @@ -12575,201 +12569,37 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyShapeEvtHandler","_wxPyControlPoint",SwigwxPyControlPointTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler}, - { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPySizer","_wxPySizer",0}, { "_class_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, { "_class_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape}, - { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_class_wxPyDivisionShape","_wxPyDivisionShape",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxPyBitmapShape","_wxPyBitmapShape",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyControlPoint","_class_wxPyControlPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_class_wxPyDrawnShape","_wxPyDrawnShape",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxPseudoMetaFile","_wxPseudoMetaFile",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, - { "_class_wxShapeRegion","_wxShapeRegion",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_wxPyDividedShape","_class_wxPyDividedShape",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_class_wxPyControlPoint","_wxPyControlPoint",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxPyShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape}, { "_wxPyShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape}, { "_wxPyShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShape}, @@ -12784,84 +12614,46 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyShape}, { "_wxPyShape","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape}, { "_wxPyShape","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape}, - { "_wxPyShape","_class_wxPyShape",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_wxPyDivisionShape","_class_wxPyDivisionShape",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxPyShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape}, { "_class_wxPyShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape}, { "_class_wxPyShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShape}, @@ -12876,22 +12668,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyShape}, { "_class_wxPyShape","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape}, { "_class_wxPyShape","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape}, - { "_class_wxPyShape","_wxPyShape",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_wxPyDrawnShape","_class_wxPyDrawnShape",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -12899,37 +12675,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_class_wxPyDividedShape","_wxPyDividedShape",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler}, @@ -12944,13 +12691,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyShapeEvtHandler","_wxPyControlPoint",SwigwxPyControlPointTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler}, - { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, { "_wxPyRectangleShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape}, { "_wxPyRectangleShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape}, { "_wxPyRectangleShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyRectangleShape}, @@ -12963,26 +12703,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyRectangleShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyRectangleShape}, { "_wxPyRectangleShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape}, { "_wxPyRectangleShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape}, - { "_wxPyRectangleShape","_class_wxPyRectangleShape",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxOGLConstraint","_class_wxOGLConstraint",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/modules/ogl/oglshapes.i b/wxPython/contrib/ogl/oglshapes.i similarity index 96% rename from utils/wxPython/modules/ogl/oglshapes.i rename to wxPython/contrib/ogl/oglshapes.i index 6ccecfb1de..6beaa08a41 100644 --- a/utils/wxPython/modules/ogl/oglshapes.i +++ b/wxPython/contrib/ogl/oglshapes.i @@ -14,7 +14,7 @@ %module oglshapes %{ -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" %} @@ -108,8 +108,8 @@ class wxPyRectangleShape : public wxPyShape { public: wxPyRectangleShape(double width = 0.0, double height = 0.0); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyRectangleShape)" void SetCornerRadius(double radius); @@ -158,8 +158,8 @@ public: double size = 0.0, double the_xoffset = 0.0, double the_yoffset = 0.0, int the_type = 0); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyControlPoint)" void SetCornerRadius(double radius); @@ -205,8 +205,8 @@ class wxPyBitmapShape : public wxPyRectangleShape { public: wxPyBitmapShape(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyBitmapShape)" wxBitmap& GetBitmap(); wxString GetFilename(); @@ -254,8 +254,8 @@ class wxPyDrawnShape : public wxPyRectangleShape { public: wxPyDrawnShape(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDrawnShape)" void CalculateSize(); void DestroyClippingRect(); @@ -357,8 +357,8 @@ class wxPyCompositeShape : public wxPyRectangleShape { public: wxPyCompositeShape(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyCompositeShape)" void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL); @@ -455,8 +455,8 @@ class wxPyDividedShape : public wxPyRectangleShape { public: wxPyDividedShape(double width = 0.0, double height = 0.0); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDividedShape)" void EditRegions(); void SetRegionSizes(); @@ -504,8 +504,8 @@ class wxPyDivisionShape : public wxPyCompositeShape { public: wxPyDivisionShape(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDivisionShape)" void AdjustBottom(double bottom, bool test); void AdjustLeft(double left, bool test); diff --git a/utils/wxPython/modules/ogl/oglshapes.py b/wxPython/contrib/ogl/oglshapes.py similarity index 99% rename from utils/wxPython/modules/ogl/oglshapes.py rename to wxPython/contrib/ogl/oglshapes.py index 35813bb1f7..c4dd67874e 100644 --- a/utils/wxPython/modules/ogl/oglshapes.py +++ b/wxPython/contrib/ogl/oglshapes.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -35,6 +37,10 @@ from printfw import * from sizers import * +from filesys import * + +from utils import * + from oglbasic import * import wx class wxPseudoMetaFilePtr : @@ -282,7 +288,7 @@ class wxPyRectangleShape(wxPyRectangleShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapesc.new_wxPyRectangleShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyRectangleShape) @@ -390,7 +396,7 @@ class wxPyControlPoint(wxPyControlPointPtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapesc.new_wxPyControlPoint,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyControlPoint) @@ -508,7 +514,7 @@ class wxPyBitmapShape(wxPyBitmapShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapesc.new_wxPyBitmapShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyBitmapShape) @@ -698,7 +704,7 @@ class wxPyDrawnShape(wxPyDrawnShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapesc.new_wxPyDrawnShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyDrawnShape) @@ -875,7 +881,7 @@ class wxPyCompositeShape(wxPyCompositeShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapesc.new_wxPyCompositeShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyCompositeShape) @@ -986,7 +992,7 @@ class wxPyDividedShape(wxPyDividedShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapesc.new_wxPyDividedShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyDividedShape) @@ -1172,7 +1178,7 @@ class wxPyDivisionShape(wxPyDivisionShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapesc.new_wxPyDivisionShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyDivisionShape) diff --git a/utils/wxPython/modules/ogl/oglshapes2.cpp b/wxPython/contrib/ogl/oglshapes2.cpp similarity index 93% rename from utils/wxPython/modules/ogl/oglshapes2.cpp rename to wxPython/contrib/ogl/oglshapes2.cpp index bee2a9ebe0..b59a21e4c6 100644 --- a/utils/wxPython/modules/ogl/oglshapes2.cpp +++ b/wxPython/contrib/ogl/oglshapes2.cpp @@ -1,9 +1,9 @@ /* - * FILE : ./oglshapes2.cpp + * FILE : contrib/ogl/oglshapes2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,51 +55,31 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "oglshapes2c" -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -160,17 +142,19 @@ static PyObject *_wrap_new_wxPyEllipseShape(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxPyEllipseShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyEllipseShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyEllipseShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyEllipseShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyEllipseShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyEllipseShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -182,9 +166,12 @@ static PyObject *_wrap_wxPyEllipseShape__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyEllipseShape__setSelf(_arg0,_arg1); + wxPyEllipseShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1229,17 +1216,19 @@ static PyObject *_wrap_new_wxPyCircleShape(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxPyCircleShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyCircleShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyCircleShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyCircleShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyCircleShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyCircleShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1251,9 +1240,12 @@ static PyObject *_wrap_wxPyCircleShape__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyCircleShape__setSelf(_arg0,_arg1); + wxPyCircleShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2805,17 +2797,19 @@ static PyObject *_wrap_new_wxPyLineShape(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxPyLineShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyLineShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyLineShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyLineShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyLineShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyLineShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2827,9 +2821,12 @@ static PyObject *_wrap_wxPyLineShape__setSelf(PyObject *self, PyObject *args, Py { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyLineShape__setSelf(_arg0,_arg1); + wxPyLineShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2946,11 +2943,22 @@ static PyObject *_wrap_wxPyLineShape_ClearArrow(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3092,11 +3100,22 @@ static PyObject *_wrap_wxPyLineShape_DeleteArrowHead(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3326,11 +3345,22 @@ static PyObject *_wrap_wxPyLineShape_FindArrowHead(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5306,17 +5336,19 @@ static PyObject *_wrap_new_wxPyPolygonShape(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxPyPolygonShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyPolygonShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyPolygonShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyPolygonShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyPolygonShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyPolygonShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5328,9 +5360,12 @@ static PyObject *_wrap_wxPyPolygonShape__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyPolygonShape__setSelf(_arg0,_arg1); + wxPyPolygonShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -6560,17 +6595,19 @@ static PyObject *_wrap_new_wxPyTextShape(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxPyTextShape__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyTextShape__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyTextShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextShape * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyTextShape__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyTextShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6582,9 +6619,12 @@ static PyObject *_wrap_wxPyTextShape__setSelf(PyObject *self, PyObject *args, Py { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyTextShape__setSelf(_arg0,_arg1); + wxPyTextShape__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -7830,17 +7870,7 @@ static PyMethodDef oglshapes2cMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -7849,87 +7879,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxPySizer","_class_wxPySizer",0}, - { "_wxPyCompositeShape","_class_wxPyCompositeShape",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxPyRectangleShape","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape}, { "_class_wxPyRectangleShape","_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape}, - { "_class_wxPyRectangleShape","_wxPyRectangleShape",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxOGLConstraint","_wxOGLConstraint",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPseudoMetaFile","_class_wxPseudoMetaFile",0}, - { "_class_wxArrowHead","_wxArrowHead",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_wxShapeRegion","_class_wxShapeRegion",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, - { "_wxPyBitmapShape","_class_wxPyBitmapShape",0}, { "_class_wxPyEllipseShape","_class_wxPyCircleShape",SwigwxPyCircleShapeTowxPyEllipseShape}, { "_class_wxPyEllipseShape","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyEllipseShape}, - { "_class_wxPyEllipseShape","_wxPyEllipseShape",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxPyShapeEvtHandler","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxPyShapeEvtHandler}, @@ -7940,205 +7904,35 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyShapeEvtHandler","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_class_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShapeEvtHandler}, { "_class_wxPyShapeEvtHandler","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShapeEvtHandler}, - { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPyCompositeShape","_wxPyCompositeShape",0}, - { "_wxPyPolygonShape","_class_wxPyPolygonShape",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, - { "_class_wxPyDivisionShape","_wxPyDivisionShape",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxPyBitmapShape","_wxPyBitmapShape",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyControlPoint","_class_wxPyControlPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_class_wxPyDrawnShape","_wxPyDrawnShape",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxPseudoMetaFile","_wxPseudoMetaFile",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, - { "_class_wxShapeRegion","_wxShapeRegion",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxPyCircleShape","_class_wxPyCircleShape",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_wxPyLineShape","_class_wxPyLineShape",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_class_wxPyPolygonShape","_wxPyPolygonShape",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, - { "_wxArrowHead","_class_wxArrowHead",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_class_wxPyCircleShape","_wxPyCircleShape",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_wxPyDividedShape","_class_wxPyDividedShape",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_class_wxPyControlPoint","_wxPyControlPoint",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxPyShape","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShape}, { "_wxPyShape","_wxPyTextShape",SwigwxPyTextShapeTowxPyShape}, { "_wxPyShape","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxPyShape}, @@ -8149,86 +7943,46 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyShape","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyShape}, { "_wxPyShape","_class_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShape}, { "_wxPyShape","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShape}, - { "_wxPyShape","_class_wxPyShape",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_wxPyTextShape","_class_wxPyTextShape",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_wxPyDivisionShape","_class_wxPyDivisionShape",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPyLineShape","_wxPyLineShape",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxPyShape","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShape}, { "_class_wxPyShape","_wxPyTextShape",SwigwxPyTextShapeTowxPyShape}, { "_class_wxPyShape","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxPyShape}, @@ -8239,22 +7993,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyShape","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyShape}, { "_class_wxPyShape","_class_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShape}, { "_class_wxPyShape","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShape}, - { "_class_wxPyShape","_wxPyShape",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_wxPyDrawnShape","_class_wxPyDrawnShape",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -8262,40 +8000,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_class_wxPyDividedShape","_wxPyDividedShape",0}, { "_wxPyEllipseShape","_class_wxPyCircleShape",SwigwxPyCircleShapeTowxPyEllipseShape}, { "_wxPyEllipseShape","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyEllipseShape}, - { "_wxPyEllipseShape","_class_wxPyEllipseShape",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxPyShapeEvtHandler","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_wxPyTextShape",SwigwxPyTextShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_class_wxPyPolygonShape",SwigwxPyPolygonShapeTowxPyShapeEvtHandler}, @@ -8306,36 +8014,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyShapeEvtHandler","_wxPyCircleShape",SwigwxPyCircleShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_class_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShapeEvtHandler}, { "_wxPyShapeEvtHandler","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShapeEvtHandler}, - { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, { "_wxPyRectangleShape","_class_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape}, { "_wxPyRectangleShape","_wxPyTextShape",SwigwxPyTextShapeTowxPyRectangleShape}, - { "_wxPyRectangleShape","_class_wxPyRectangleShape",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxOGLConstraint","_class_wxOGLConstraint",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxPyTextShape","_wxPyTextShape",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/modules/ogl/oglshapes2.i b/wxPython/contrib/ogl/oglshapes2.i similarity index 95% rename from utils/wxPython/modules/ogl/oglshapes2.i rename to wxPython/contrib/ogl/oglshapes2.i index e2ff20bb3f..2b90a48590 100644 --- a/utils/wxPython/modules/ogl/oglshapes2.i +++ b/wxPython/contrib/ogl/oglshapes2.i @@ -14,7 +14,7 @@ %module oglshapes2 %{ -#include "helpers.h" +#include "export.h" #include "oglhelpers.h" %} @@ -47,8 +47,8 @@ class wxPyEllipseShape : public wxPyShape { public: wxPyEllipseShape(double width = 0.0, double height = 0.0); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyEllipseShape)" void base_OnDraw(wxDC& dc); void base_OnDrawContents(wxDC& dc); @@ -90,8 +90,8 @@ class wxPyCircleShape : public wxPyEllipseShape { public: wxPyCircleShape(double width = 0.0); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyCircleShape)" void base_OnDraw(wxDC& dc); void base_OnDrawContents(wxDC& dc); @@ -162,8 +162,8 @@ class wxPyLineShape : public wxPyShape { public: wxPyLineShape(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyLineShape)" void AddArrow(int type, int end = ARROW_POSITION_END, double arrowSize = 10.0, double xOffset = 0.0, @@ -259,8 +259,8 @@ class wxPyPolygonShape : public wxPyShape { public: wxPyPolygonShape(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyPolygonShape)" // void Create(wxList* points); @@ -330,8 +330,8 @@ class wxPyTextShape : public wxPyRectangleShape { public: wxPyTextShape(double width = 0.0, double height = 0.0); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyTextShape)" void base_OnDelete(); diff --git a/utils/wxPython/modules/ogl/oglshapes2.py b/wxPython/contrib/ogl/oglshapes2.py similarity index 99% rename from utils/wxPython/modules/ogl/oglshapes2.py rename to wxPython/contrib/ogl/oglshapes2.py index 8398f7cb07..d534c2e986 100644 --- a/utils/wxPython/modules/ogl/oglshapes2.py +++ b/wxPython/contrib/ogl/oglshapes2.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -35,6 +37,10 @@ from printfw import * from sizers import * +from filesys import * + +from utils import * + from oglbasic import * from oglshapes import * @@ -136,7 +142,7 @@ class wxPyEllipseShape(wxPyEllipseShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapes2c.new_wxPyEllipseShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyEllipseShape) @@ -238,7 +244,7 @@ class wxPyCircleShape(wxPyCircleShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapes2c.new_wxPyCircleShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyCircleShape) @@ -528,7 +534,7 @@ class wxPyLineShape(wxPyLineShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapes2c.new_wxPyLineShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyLineShape) @@ -648,7 +654,7 @@ class wxPyPolygonShape(wxPyPolygonShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapes2c.new_wxPyPolygonShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyPolygonShape) @@ -753,7 +759,7 @@ class wxPyTextShape(wxPyTextShapePtr): def __init__(self,*_args,**_kwargs): self.this = apply(oglshapes2c.new_wxPyTextShape,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyTextShape) diff --git a/wxPython/contrib/stc/.cvsignore b/wxPython/contrib/stc/.cvsignore new file mode 100644 index 0000000000..c6fa6bfe52 --- /dev/null +++ b/wxPython/contrib/stc/.cvsignore @@ -0,0 +1,6 @@ +Makefile +Makefile +contrib +stc_c.exp +stc_c.ilk +stc_c.pch diff --git a/wxPython/contrib/stc/README.txt b/wxPython/contrib/stc/README.txt new file mode 100644 index 0000000000..3b772c9cfe --- /dev/null +++ b/wxPython/contrib/stc/README.txt @@ -0,0 +1,7 @@ +Since STC is not always bundled with distributions of wxWindows, in +order for it to be a standard part of wxPython I need to bundle it +here. The contents of the contrib directory are copies of the +relevant parts of the main contrib directory in wxWindows. The +build.py script in this directory will also build the needed files +from there, so you no longer have to worry about aquiring and building +additional libraries beyond wxWindows itself. diff --git a/wxPython/contrib/stc/_stcextras.py b/wxPython/contrib/stc/_stcextras.py new file mode 100644 index 0000000000..96515ec3c5 --- /dev/null +++ b/wxPython/contrib/stc/_stcextras.py @@ -0,0 +1,4 @@ +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxStyledTextEventPtr = wxStyledTextEventPtr +wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr diff --git a/wxPython/contrib/stc/stc.py b/wxPython/contrib/stc/stc.py new file mode 100644 index 0000000000..444839ca45 --- /dev/null +++ b/wxPython/contrib/stc/stc.py @@ -0,0 +1,7 @@ + +# The name "stc.cpp" was causing the debugger to get confused with the +# same module name in the stc library, so I changed the name of this +# one to stc_.cpp and this little stub to make the "stc" Python module +# name still usesable for everything that matters. + +from stc_ import * diff --git a/wxPython/contrib/stc/stc_.cpp b/wxPython/contrib/stc/stc_.cpp new file mode 100644 index 0000000000..d1c3c64267 --- /dev/null +++ b/wxPython/contrib/stc/stc_.cpp @@ -0,0 +1,9007 @@ +/* + * FILE : contrib/stc/stc_.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initstc_c + +#define SWIG_name "stc_c" + +#include "export.h" +#include "wx/stc/stc.h" + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; +#ifdef __cplusplus +extern "C" { +#endif +static void *SwigwxStyledTextCtrlTowxControl(void *ptr) { + wxStyledTextCtrl *src; + wxControl *dest; + src = (wxStyledTextCtrl *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxStyledTextCtrlTowxWindow(void *ptr) { + wxStyledTextCtrl *src; + wxWindow *dest; + src = (wxStyledTextCtrl *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxStyledTextCtrlTowxEvtHandler(void *ptr) { + wxStyledTextCtrl *src; + wxEvtHandler *dest; + src = (wxStyledTextCtrl *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxStyledTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxStyledTextCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_new_wxStyledTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + long _arg4 = (long ) 0; + char * _arg5 = (char *) "styledtext"; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxStyledTextCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxStyledTextCtrl. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStyledTextCtrl *)new_wxStyledTextCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStyledTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStyledTextCtrl_AddText(_swigobj,_swigarg0) (_swigobj->AddText(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AddText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_AddText",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AddText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AddText(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_AddStyledText(_swigobj,_swigarg0) (_swigobj->AddStyledText(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AddStyledText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_AddStyledText",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AddStyledText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AddStyledText(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_InsertText(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_InsertText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","pos","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_InsertText",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_InsertText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_InsertText(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_ClearAll(_swigobj) (_swigobj->ClearAll()) +static PyObject *_wrap_wxStyledTextCtrl_ClearAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_ClearAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ClearAll. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ClearAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_ClearDocumentStyle(_swigobj) (_swigobj->ClearDocumentStyle()) +static PyObject *_wrap_wxStyledTextCtrl_ClearDocumentStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_ClearDocumentStyle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ClearDocumentStyle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ClearDocumentStyle(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetLength(_swigobj) (_swigobj->GetLength()) +static PyObject *_wrap_wxStyledTextCtrl_GetLength(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetLength",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLength. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLength(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetCharAt(_swigobj,_swigarg0) (_swigobj->GetCharAt(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetCharAt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetCharAt",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetCharAt. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetCharAt(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetCurrentPos(_swigobj) (_swigobj->GetCurrentPos()) +static PyObject *_wrap_wxStyledTextCtrl_GetCurrentPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetCurrentPos",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetCurrentPos. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetCurrentPos(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetAnchor(_swigobj) (_swigobj->GetAnchor()) +static PyObject *_wrap_wxStyledTextCtrl_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetAnchor. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetAnchor(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetStyleAt(_swigobj,_swigarg0) (_swigobj->GetStyleAt(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetStyleAt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetStyleAt",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetStyleAt. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetStyleAt(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_Redo(_swigobj) (_swigobj->Redo()) +static PyObject *_wrap_wxStyledTextCtrl_Redo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_Redo",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_Redo. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_Redo(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetUndoCollection(_swigobj,_swigarg0) (_swigobj->SetUndoCollection(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetUndoCollection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","collectUndo", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetUndoCollection",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetUndoCollection. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetUndoCollection(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SelectAll(_swigobj) (_swigobj->SelectAll()) +static PyObject *_wrap_wxStyledTextCtrl_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_SelectAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SelectAll. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SelectAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetSavePoint(_swigobj) (_swigobj->SetSavePoint()) +static PyObject *_wrap_wxStyledTextCtrl_SetSavePoint(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_SetSavePoint",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetSavePoint. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetSavePoint(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetStyledText(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetStyledText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_GetStyledText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","startPos","endPos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_GetStyledText",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetStyledText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxStyledTextCtrl_GetStyledText(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxStyledTextCtrl_CanRedo(_swigobj) (_swigobj->CanRedo()) +static PyObject *_wrap_wxStyledTextCtrl_CanRedo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CanRedo",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CanRedo. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_CanRedo(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerLineFromHandle(_swigobj,_swigarg0) (_swigobj->MarkerLineFromHandle(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerLineFromHandle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","handle", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_MarkerLineFromHandle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerLineFromHandle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_MarkerLineFromHandle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerDeleteHandle(_swigobj,_swigarg0) (_swigobj->MarkerDeleteHandle(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerDeleteHandle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","handle", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_MarkerDeleteHandle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerDeleteHandle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_MarkerDeleteHandle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetUndoCollection(_swigobj) (_swigobj->GetUndoCollection()) +static PyObject *_wrap_wxStyledTextCtrl_GetUndoCollection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetUndoCollection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetUndoCollection. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetUndoCollection(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetViewWhiteSpace(_swigobj) (_swigobj->GetViewWhiteSpace()) +static PyObject *_wrap_wxStyledTextCtrl_GetViewWhiteSpace(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetViewWhiteSpace",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetViewWhiteSpace. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetViewWhiteSpace(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetViewWhiteSpace(_swigobj,_swigarg0) (_swigobj->SetViewWhiteSpace(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetViewWhiteSpace(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","viewWS", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetViewWhiteSpace",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetViewWhiteSpace. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetViewWhiteSpace(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_PositionFromPoint(_swigobj,_swigarg0) (_swigobj->PositionFromPoint(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_PositionFromPoint(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_PositionFromPoint",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_PositionFromPoint. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_PositionFromPoint(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GotoLine(_swigobj,_swigarg0) (_swigobj->GotoLine(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GotoLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GotoLine",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GotoLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_GotoLine(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GotoPos(_swigobj,_swigarg0) (_swigobj->GotoPos(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GotoPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GotoPos",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GotoPos. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_GotoPos(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetAnchor(_swigobj,_swigarg0) (_swigobj->SetAnchor(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","posAnchor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetAnchor",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetAnchor. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetAnchor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetCurLine(_swigobj,_swigarg0) (_swigobj->GetCurLine(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetCurLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxStyledTextCtrl * _arg0; + int * _arg1 = (int *) NULL; + int temp; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetCurLine",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetCurLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxStyledTextCtrl_GetCurLine(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxStyledTextCtrl_GetEndStyled(_swigobj) (_swigobj->GetEndStyled()) +static PyObject *_wrap_wxStyledTextCtrl_GetEndStyled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetEndStyled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetEndStyled. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetEndStyled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_ConvertEOLs(_swigobj) (_swigobj->ConvertEOLs()) +static PyObject *_wrap_wxStyledTextCtrl_ConvertEOLs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_ConvertEOLs",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ConvertEOLs. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ConvertEOLs(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetEOLMode(_swigobj) (_swigobj->GetEOLMode()) +static PyObject *_wrap_wxStyledTextCtrl_GetEOLMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetEOLMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetEOLMode. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetEOLMode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetEOLMode(_swigobj,_swigarg0) (_swigobj->SetEOLMode(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetEOLMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","eolMode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetEOLMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetEOLMode. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetEOLMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StartStyling(_swigobj,_swigarg0,_swigarg1) (_swigobj->StartStyling(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StartStyling(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","mask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StartStyling",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StartStyling. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StartStyling(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetStyling(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStyling(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetStyling(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","length","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetStyling",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetStyling. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetStyling(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetBufferedDraw(_swigobj) (_swigobj->GetBufferedDraw()) +static PyObject *_wrap_wxStyledTextCtrl_GetBufferedDraw(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetBufferedDraw",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetBufferedDraw. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetBufferedDraw(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetBufferedDraw(_swigobj,_swigarg0) (_swigobj->SetBufferedDraw(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetBufferedDraw(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","buffered", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetBufferedDraw",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetBufferedDraw. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetBufferedDraw(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetTabWidth(_swigobj,_swigarg0) (_swigobj->SetTabWidth(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetTabWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","tabWidth", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetTabWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetTabWidth. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetTabWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetTabWidth(_swigobj) (_swigobj->GetTabWidth()) +static PyObject *_wrap_wxStyledTextCtrl_GetTabWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetTabWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetTabWidth. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetTabWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetCodePage(_swigobj,_swigarg0) (_swigobj->SetCodePage(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetCodePage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","codePage", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetCodePage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetCodePage. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetCodePage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerDefine(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->MarkerDefine(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerDefine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + wxColour * _arg3 = (wxColour *) &wxNullColour; + wxColour * _arg4 = (wxColour *) &wxNullColour; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj3 = 0; + wxColour temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","markerNumber","markerSymbol","foreground","background", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|OO:wxStyledTextCtrl_MarkerDefine",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerDefine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxColour_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxColour_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_MarkerDefine(_arg0,_arg1,_arg2,*_arg3,*_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerSetForeground(_swigobj,_swigarg0,_swigarg1) (_swigobj->MarkerSetForeground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerSetForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","markerNumber","fore", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_MarkerSetForeground",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerSetForeground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_MarkerSetForeground(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerSetBackground(_swigobj,_swigarg0,_swigarg1) (_swigobj->MarkerSetBackground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerSetBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","markerNumber","back", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_MarkerSetBackground",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerSetBackground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_MarkerSetBackground(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerAdd(_swigobj,_swigarg0,_swigarg1) (_swigobj->MarkerAdd(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerAdd(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line","markerNumber", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_MarkerAdd",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerAdd. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_MarkerAdd(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerDelete(_swigobj,_swigarg0,_swigarg1) (_swigobj->MarkerDelete(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerDelete(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line","markerNumber", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_MarkerDelete",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerDelete. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_MarkerDelete(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerDeleteAll(_swigobj,_swigarg0) (_swigobj->MarkerDeleteAll(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerDeleteAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","markerNumber", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_MarkerDeleteAll",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerDeleteAll. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_MarkerDeleteAll(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerGet(_swigobj,_swigarg0) (_swigobj->MarkerGet(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerGet(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_MarkerGet",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerGet. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_MarkerGet(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerNext(_swigobj,_swigarg0,_swigarg1) (_swigobj->MarkerNext(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","lineStart","markerMask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_MarkerNext",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerNext. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_MarkerNext(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_MarkerPrevious(_swigobj,_swigarg0,_swigarg1) (_swigobj->MarkerPrevious(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_MarkerPrevious(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","lineStart","markerMask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_MarkerPrevious",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_MarkerPrevious. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_MarkerPrevious(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetMarginType(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMarginType(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetMarginType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","margin","marginType", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetMarginType",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetMarginType. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetMarginType(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetMarginType(_swigobj,_swigarg0) (_swigobj->GetMarginType(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetMarginType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","margin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetMarginType",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetMarginType. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetMarginType(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetMarginWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMarginWidth(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetMarginWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","margin","pixelWidth", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetMarginWidth",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetMarginWidth. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetMarginWidth(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetMarginWidth(_swigobj,_swigarg0) (_swigobj->GetMarginWidth(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetMarginWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","margin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetMarginWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetMarginWidth. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetMarginWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetMarginMask(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMarginMask(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetMarginMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","margin","mask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetMarginMask",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetMarginMask. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetMarginMask(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetMarginMask(_swigobj,_swigarg0) (_swigobj->GetMarginMask(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetMarginMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","margin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetMarginMask",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetMarginMask. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetMarginMask(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetMarginSensitive(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMarginSensitive(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetMarginSensitive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + bool _arg2; + PyObject * _argo0 = 0; + int tempbool2; + char *_kwnames[] = { "self","margin","sensitive", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetMarginSensitive",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetMarginSensitive. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetMarginSensitive(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetMarginSensitive(_swigobj,_swigarg0) (_swigobj->GetMarginSensitive(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetMarginSensitive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","margin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetMarginSensitive",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetMarginSensitive. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetMarginSensitive(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_StyleClearAll(_swigobj) (_swigobj->StyleClearAll()) +static PyObject *_wrap_wxStyledTextCtrl_StyleClearAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_StyleClearAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleClearAll. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleClearAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetForeground(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetForeground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","style","fore", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetForeground",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetForeground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetForeground(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetBackground(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetBackground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","style","back", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetBackground",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetBackground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetBackground(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetBold(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetBold(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetBold(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + bool _arg2; + PyObject * _argo0 = 0; + int tempbool2; + char *_kwnames[] = { "self","style","bold", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StyleSetBold",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetBold. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetBold(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetItalic(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetItalic(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetItalic(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + bool _arg2; + PyObject * _argo0 = 0; + int tempbool2; + char *_kwnames[] = { "self","style","italic", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StyleSetItalic",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetItalic. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetItalic(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style","sizePoints", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StyleSetSize",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetSize. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetFaceName(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetFaceName(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","style","fontName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetFaceName",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetFaceName. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetFaceName(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetEOLFilled(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetEOLFilled(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetEOLFilled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + bool _arg2; + PyObject * _argo0 = 0; + int tempbool2; + char *_kwnames[] = { "self","style","filled", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StyleSetEOLFilled",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetEOLFilled. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetEOLFilled(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleResetDefault(_swigobj) (_swigobj->StyleResetDefault()) +static PyObject *_wrap_wxStyledTextCtrl_StyleResetDefault(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_StyleResetDefault",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleResetDefault. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleResetDefault(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetUnderline(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetUnderline(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetUnderline(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + bool _arg2; + PyObject * _argo0 = 0; + int tempbool2; + char *_kwnames[] = { "self","style","underline", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StyleSetUnderline",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetUnderline. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetUnderline(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetSelForeground(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelForeground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetSelForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + int tempbool1; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","useSetting","fore", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_SetSelForeground",_kwnames,&_argo0,&tempbool1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetSelForeground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetSelForeground(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetSelBackground(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelBackground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetSelBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + int tempbool1; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","useSetting","back", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_SetSelBackground",_kwnames,&_argo0,&tempbool1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetSelBackground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetSelBackground(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetCaretForeground(_swigobj,_swigarg0) (_swigobj->SetCaretForeground(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetCaretForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","fore", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetCaretForeground",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetCaretForeground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetCaretForeground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_CmdKeyAssign(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CmdKeyAssign(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxStyledTextCtrl_CmdKeyAssign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","key","modifiers","cmd", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxStyledTextCtrl_CmdKeyAssign",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CmdKeyAssign. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CmdKeyAssign(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_CmdKeyClear(_swigobj,_swigarg0,_swigarg1) (_swigobj->CmdKeyClear(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_CmdKeyClear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","key","modifiers", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_CmdKeyClear",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CmdKeyClear. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CmdKeyClear(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_CmdKeyClearAll(_swigobj) (_swigobj->CmdKeyClearAll()) +static PyObject *_wrap_wxStyledTextCtrl_CmdKeyClearAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CmdKeyClearAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CmdKeyClearAll. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CmdKeyClearAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetStyleBytes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStyleBytes(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetStyleBytes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + char * _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","length","styleBytes", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ois:wxStyledTextCtrl_SetStyleBytes",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetStyleBytes. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetStyleBytes(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetVisible(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetVisible(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + bool _arg2; + PyObject * _argo0 = 0; + int tempbool2; + char *_kwnames[] = { "self","style","visible", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_StyleSetVisible",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetVisible. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetVisible(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetCaretPeriod(_swigobj) (_swigobj->GetCaretPeriod()) +static PyObject *_wrap_wxStyledTextCtrl_GetCaretPeriod(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetCaretPeriod",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetCaretPeriod. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetCaretPeriod(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetCaretPeriod(_swigobj,_swigarg0) (_swigobj->SetCaretPeriod(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetCaretPeriod(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","periodMilliseconds", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetCaretPeriod",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetCaretPeriod. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetCaretPeriod(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetWordChars(_swigobj,_swigarg0) (_swigobj->SetWordChars(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetWordChars(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","characters", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetWordChars",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetWordChars. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetWordChars(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_BeginUndoAction(_swigobj) (_swigobj->BeginUndoAction()) +static PyObject *_wrap_wxStyledTextCtrl_BeginUndoAction(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_BeginUndoAction",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_BeginUndoAction. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_BeginUndoAction(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_EndUndoAction(_swigobj) (_swigobj->EndUndoAction()) +static PyObject *_wrap_wxStyledTextCtrl_EndUndoAction(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_EndUndoAction",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_EndUndoAction. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_EndUndoAction(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_IndicatorSetStyle(_swigobj,_swigarg0,_swigarg1) (_swigobj->IndicatorSetStyle(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","indic","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_IndicatorSetStyle",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_IndicatorSetStyle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_IndicatorSetStyle(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_IndicatorGetStyle(_swigobj,_swigarg0) (_swigobj->IndicatorGetStyle(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_IndicatorGetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","indic", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_IndicatorGetStyle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_IndicatorGetStyle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_IndicatorGetStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_IndicatorSetForeground(_swigobj,_swigarg0,_swigarg1) (_swigobj->IndicatorSetForeground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_IndicatorSetForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","indic","fore", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_IndicatorSetForeground",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_IndicatorSetForeground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_IndicatorSetForeground(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_IndicatorGetForeground(_swigobj,_swigarg0) (_swigobj->IndicatorGetForeground(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_IndicatorGetForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","indic", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_IndicatorGetForeground",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_IndicatorGetForeground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxStyledTextCtrl_IndicatorGetForeground(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxStyledTextCtrl_SetStyleBits(_swigobj,_swigarg0) (_swigobj->SetStyleBits(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetStyleBits(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","bits", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetStyleBits",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetStyleBits. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetStyleBits(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetStyleBits(_swigobj) (_swigobj->GetStyleBits()) +static PyObject *_wrap_wxStyledTextCtrl_GetStyleBits(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetStyleBits",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetStyleBits. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetStyleBits(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetLineState(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLineState(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetLineState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line","state", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetLineState",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetLineState. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetLineState(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetLineState(_swigobj,_swigarg0) (_swigobj->GetLineState(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetLineState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetLineState",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLineState. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLineState(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetMaxLineState(_swigobj) (_swigobj->GetMaxLineState()) +static PyObject *_wrap_wxStyledTextCtrl_GetMaxLineState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetMaxLineState",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetMaxLineState. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetMaxLineState(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompShow(_swigobj,_swigarg0,_swigarg1) (_swigobj->AutoCompShow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompShow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","lenEntered","itemList", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_AutoCompShow",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompShow. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompShow(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompCancel(_swigobj) (_swigobj->AutoCompCancel()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompCancel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompCancel",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompCancel. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompCancel(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompActive(_swigobj) (_swigobj->AutoCompActive()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompActive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompActive",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompActive. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_AutoCompActive(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompPosStart(_swigobj) (_swigobj->AutoCompPosStart()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompPosStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompPosStart",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompPosStart. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_AutoCompPosStart(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompComplete(_swigobj) (_swigobj->AutoCompComplete()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompComplete(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompComplete",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompComplete. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompComplete(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompStops(_swigobj,_swigarg0) (_swigobj->AutoCompStops(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompStops(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","characterSet", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_AutoCompStops",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompStops. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompStops(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompSetSeparator(_swigobj,_swigarg0) (_swigobj->AutoCompSetSeparator(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetSeparator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","separatorCharacter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_AutoCompSetSeparator",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompSetSeparator. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompSetSeparator(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompGetSeparator(_swigobj) (_swigobj->AutoCompGetSeparator()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetSeparator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompGetSeparator",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompGetSeparator. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_AutoCompGetSeparator(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompSelect(_swigobj,_swigarg0) (_swigobj->AutoCompSelect(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompSelect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_AutoCompSelect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompSelect. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompSelect(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompSetCancelAtStart(_swigobj,_swigarg0) (_swigobj->AutoCompSetCancelAtStart(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetCancelAtStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","cancel", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_AutoCompSetCancelAtStart",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompSetCancelAtStart. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompSetCancelAtStart(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompGetCancelAtStart(_swigobj) (_swigobj->AutoCompGetCancelAtStart()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetCancelAtStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompGetCancelAtStart",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompGetCancelAtStart. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_AutoCompGetCancelAtStart(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompSetFillUps(_swigobj,_swigarg0) (_swigobj->AutoCompSetFillUps(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetFillUps(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","characterSet", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_AutoCompSetFillUps",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompSetFillUps. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompSetFillUps(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompSetChooseSingle(_swigobj,_swigarg0) (_swigobj->AutoCompSetChooseSingle(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetChooseSingle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","chooseSingle", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_AutoCompSetChooseSingle",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompSetChooseSingle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompSetChooseSingle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompGetChooseSingle(_swigobj) (_swigobj->AutoCompGetChooseSingle()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetChooseSingle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompGetChooseSingle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompGetChooseSingle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_AutoCompGetChooseSingle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompSetIgnoreCase(_swigobj,_swigarg0) (_swigobj->AutoCompSetIgnoreCase(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompSetIgnoreCase(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","ignoreCase", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_AutoCompSetIgnoreCase",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompSetIgnoreCase. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AutoCompSetIgnoreCase(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_AutoCompGetIgnoreCase(_swigobj) (_swigobj->AutoCompGetIgnoreCase()) +static PyObject *_wrap_wxStyledTextCtrl_AutoCompGetIgnoreCase(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_AutoCompGetIgnoreCase",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AutoCompGetIgnoreCase. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_AutoCompGetIgnoreCase(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetIndent(_swigobj,_swigarg0) (_swigobj->SetIndent(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","indentSize", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetIndent",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetIndent. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetIndent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetIndent(_swigobj) (_swigobj->GetIndent()) +static PyObject *_wrap_wxStyledTextCtrl_GetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetIndent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetIndent. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetIndent(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetUseTabs(_swigobj,_swigarg0) (_swigobj->SetUseTabs(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetUseTabs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","useTabs", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetUseTabs",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetUseTabs. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetUseTabs(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetUseTabs(_swigobj) (_swigobj->GetUseTabs()) +static PyObject *_wrap_wxStyledTextCtrl_GetUseTabs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetUseTabs",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetUseTabs. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetUseTabs(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetLineIndentation(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLineIndentation(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetLineIndentation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line","indentSize", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetLineIndentation",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetLineIndentation. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetLineIndentation(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetLineIndentation(_swigobj,_swigarg0) (_swigobj->GetLineIndentation(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetLineIndentation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetLineIndentation",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLineIndentation. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLineIndentation(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetLineIndentPosition(_swigobj,_swigarg0) (_swigobj->GetLineIndentPosition(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetLineIndentPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetLineIndentPosition",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLineIndentPosition. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLineIndentPosition(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetColumn(_swigobj,_swigarg0) (_swigobj->GetColumn(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetColumn",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetColumn. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetColumn(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetUseHorizontalScrollBar(_swigobj,_swigarg0) (_swigobj->SetUseHorizontalScrollBar(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetUseHorizontalScrollBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetUseHorizontalScrollBar",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetUseHorizontalScrollBar. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetUseHorizontalScrollBar(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetUseHorizontalScrollBar(_swigobj) (_swigobj->GetUseHorizontalScrollBar()) +static PyObject *_wrap_wxStyledTextCtrl_GetUseHorizontalScrollBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetUseHorizontalScrollBar",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetUseHorizontalScrollBar. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetUseHorizontalScrollBar(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetIndentationGuides(_swigobj,_swigarg0) (_swigobj->SetIndentationGuides(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetIndentationGuides(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetIndentationGuides",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetIndentationGuides. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetIndentationGuides(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetIndentationGuides(_swigobj) (_swigobj->GetIndentationGuides()) +static PyObject *_wrap_wxStyledTextCtrl_GetIndentationGuides(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetIndentationGuides",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetIndentationGuides. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetIndentationGuides(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetHighlightGuide(_swigobj,_swigarg0) (_swigobj->SetHighlightGuide(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetHighlightGuide(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","column", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetHighlightGuide",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetHighlightGuide. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetHighlightGuide(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetHighlightGuide(_swigobj) (_swigobj->GetHighlightGuide()) +static PyObject *_wrap_wxStyledTextCtrl_GetHighlightGuide(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetHighlightGuide",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetHighlightGuide. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetHighlightGuide(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetLineEndPosition(_swigobj,_swigarg0) (_swigobj->GetLineEndPosition(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetLineEndPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetLineEndPosition",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLineEndPosition. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLineEndPosition(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetCodePage(_swigobj) (_swigobj->GetCodePage()) +static PyObject *_wrap_wxStyledTextCtrl_GetCodePage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetCodePage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetCodePage. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetCodePage(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetCaretForeground(_swigobj) (_swigobj->GetCaretForeground()) +static PyObject *_wrap_wxStyledTextCtrl_GetCaretForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetCaretForeground",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetCaretForeground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxStyledTextCtrl_GetCaretForeground(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxStyledTextCtrl_GetReadOnly(_swigobj) (_swigobj->GetReadOnly()) +static PyObject *_wrap_wxStyledTextCtrl_GetReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetReadOnly",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetReadOnly. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetReadOnly(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetCurrentPos(_swigobj,_swigarg0) (_swigobj->SetCurrentPos(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetCurrentPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetCurrentPos",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetCurrentPos. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetCurrentPos(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetSelectionStart(_swigobj,_swigarg0) (_swigobj->SetSelectionStart(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetSelectionStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetSelectionStart",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetSelectionStart. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetSelectionStart(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetSelectionStart(_swigobj) (_swigobj->GetSelectionStart()) +static PyObject *_wrap_wxStyledTextCtrl_GetSelectionStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetSelectionStart",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetSelectionStart. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetSelectionStart(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetSelectionEnd(_swigobj,_swigarg0) (_swigobj->SetSelectionEnd(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetSelectionEnd(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetSelectionEnd",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetSelectionEnd. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetSelectionEnd(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetSelectionEnd(_swigobj) (_swigobj->GetSelectionEnd()) +static PyObject *_wrap_wxStyledTextCtrl_GetSelectionEnd(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetSelectionEnd",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetSelectionEnd. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetSelectionEnd(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetPrintMagnification(_swigobj,_swigarg0) (_swigobj->SetPrintMagnification(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetPrintMagnification(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","magnification", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetPrintMagnification",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetPrintMagnification. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetPrintMagnification(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetPrintMagnification(_swigobj) (_swigobj->GetPrintMagnification()) +static PyObject *_wrap_wxStyledTextCtrl_GetPrintMagnification(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetPrintMagnification",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetPrintMagnification. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetPrintMagnification(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetPrintColourMode(_swigobj,_swigarg0) (_swigobj->SetPrintColourMode(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetPrintColourMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetPrintColourMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetPrintColourMode. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetPrintColourMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetPrintColourMode(_swigobj) (_swigobj->GetPrintColourMode()) +static PyObject *_wrap_wxStyledTextCtrl_GetPrintColourMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetPrintColourMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetPrintColourMode. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetPrintColourMode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_FindText(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->FindText(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxStyledTextCtrl_FindText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + bool _arg4; + bool _arg5; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + int tempbool4; + int tempbool5; + char *_kwnames[] = { "self","minPos","maxPos","text","caseSensitive","wholeWord", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOii:wxStyledTextCtrl_FindText",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&tempbool4,&tempbool5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_FindText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + _arg4 = (bool ) tempbool4; + _arg5 = (bool ) tempbool5; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_FindText(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxStyledTextCtrl_FormatRange(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->FormatRange(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxStyledTextCtrl_FormatRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + bool _arg1; + int _arg2; + int _arg3; + wxDC * _arg4; + wxDC * _arg5; + wxRect * _arg6; + wxRect * _arg7; + PyObject * _argo0 = 0; + int tempbool1; + PyObject * _argo4 = 0; + PyObject * _argo5 = 0; + wxRect temp; + PyObject * _obj6 = 0; + wxRect temp0; + PyObject * _obj7 = 0; + char *_kwnames[] = { "self","doDraw","startPos","endPos","draw","target","renderRect","pageRect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiiOOOO:wxStyledTextCtrl_FormatRange",_kwnames,&_argo0,&tempbool1,&_arg2,&_arg3,&_argo4,&_argo5,&_obj6,&_obj7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_FormatRange. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxStyledTextCtrl_FormatRange. Expected _wxDC_p."); + return NULL; + } + } + if (_argo5) { + if (_argo5 == Py_None) { _arg5 = NULL; } + else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxStyledTextCtrl_FormatRange. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg6 = &temp; + if (! wxRect_helper(_obj6, &_arg6)) + return NULL; +} +{ + _arg7 = &temp0; + if (! wxRect_helper(_obj7, &_arg7)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_FormatRange(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetFirstVisibleLine(_swigobj) (_swigobj->GetFirstVisibleLine()) +static PyObject *_wrap_wxStyledTextCtrl_GetFirstVisibleLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetFirstVisibleLine",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetFirstVisibleLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetFirstVisibleLine(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetLine(_swigobj,_swigarg0) (_swigobj->GetLine(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetLine",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxStyledTextCtrl_GetLine(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxStyledTextCtrl_GetLineCount(_swigobj) (_swigobj->GetLineCount()) +static PyObject *_wrap_wxStyledTextCtrl_GetLineCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetLineCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLineCount. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLineCount(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetMarginLeft(_swigobj,_swigarg0) (_swigobj->SetMarginLeft(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetMarginLeft(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetMarginLeft",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetMarginLeft. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetMarginLeft(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetMarginLeft(_swigobj) (_swigobj->GetMarginLeft()) +static PyObject *_wrap_wxStyledTextCtrl_GetMarginLeft(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetMarginLeft",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetMarginLeft. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetMarginLeft(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetMarginRight(_swigobj,_swigarg0) (_swigobj->SetMarginRight(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetMarginRight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetMarginRight",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetMarginRight. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetMarginRight(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetMarginRight(_swigobj) (_swigobj->GetMarginRight()) +static PyObject *_wrap_wxStyledTextCtrl_GetMarginRight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetMarginRight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetMarginRight. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetMarginRight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetModify(_swigobj) (_swigobj->GetModify()) +static PyObject *_wrap_wxStyledTextCtrl_GetModify(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetModify",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetModify. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetModify(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","start","end", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetSelection",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetSelection. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetSelection(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetSelectedText(_swigobj) (_swigobj->GetSelectedText()) +static PyObject *_wrap_wxStyledTextCtrl_GetSelectedText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetSelectedText",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetSelectedText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxStyledTextCtrl_GetSelectedText(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxStyledTextCtrl_GetTextRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetTextRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_GetTextRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","startPos","endPos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_GetTextRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetTextRange. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxStyledTextCtrl_GetTextRange(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxStyledTextCtrl_HideSelection(_swigobj,_swigarg0) (_swigobj->HideSelection(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_HideSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","normal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_HideSelection",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_HideSelection. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_HideSelection(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_LineFromPosition(_swigobj,_swigarg0) (_swigobj->LineFromPosition(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_LineFromPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_LineFromPosition",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_LineFromPosition. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_LineFromPosition(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_PositionFromLine(_swigobj,_swigarg0) (_swigobj->PositionFromLine(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_PositionFromLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_PositionFromLine",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_PositionFromLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_PositionFromLine(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_LineScroll(_swigobj,_swigarg0,_swigarg1) (_swigobj->LineScroll(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_LineScroll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","columns","lines", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_LineScroll",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_LineScroll. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_LineScroll(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_EnsureCaretVisible(_swigobj) (_swigobj->EnsureCaretVisible()) +static PyObject *_wrap_wxStyledTextCtrl_EnsureCaretVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_EnsureCaretVisible",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_EnsureCaretVisible. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_EnsureCaretVisible(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_ReplaceSelection(_swigobj,_swigarg0) (_swigobj->ReplaceSelection(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_ReplaceSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_ReplaceSelection",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ReplaceSelection. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ReplaceSelection(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_SetReadOnly(_swigobj,_swigarg0) (_swigobj->SetReadOnly(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","readOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetReadOnly",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetReadOnly. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetReadOnly(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_CanPaste(_swigobj) (_swigobj->CanPaste()) +static PyObject *_wrap_wxStyledTextCtrl_CanPaste(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CanPaste",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CanPaste. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_CanPaste(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_CanUndo(_swigobj) (_swigobj->CanUndo()) +static PyObject *_wrap_wxStyledTextCtrl_CanUndo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CanUndo",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CanUndo. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_CanUndo(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_EmptyUndoBuffer(_swigobj) (_swigobj->EmptyUndoBuffer()) +static PyObject *_wrap_wxStyledTextCtrl_EmptyUndoBuffer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_EmptyUndoBuffer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_EmptyUndoBuffer. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_EmptyUndoBuffer(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_Undo(_swigobj) (_swigobj->Undo()) +static PyObject *_wrap_wxStyledTextCtrl_Undo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_Undo",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_Undo. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_Undo(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_Cut(_swigobj) (_swigobj->Cut()) +static PyObject *_wrap_wxStyledTextCtrl_Cut(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_Cut",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_Cut. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_Cut(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_Copy(_swigobj) (_swigobj->Copy()) +static PyObject *_wrap_wxStyledTextCtrl_Copy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_Copy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_Copy. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_Copy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_Paste(_swigobj) (_swigobj->Paste()) +static PyObject *_wrap_wxStyledTextCtrl_Paste(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_Paste",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_Paste. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_Paste(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxStyledTextCtrl_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_Clear. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetText(_swigobj,_swigarg0) (_swigobj->SetText(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetText",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetText(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxStyledTextCtrl_GetText(_swigobj) (_swigobj->GetText()) +static PyObject *_wrap_wxStyledTextCtrl_GetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetText",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxStyledTextCtrl_GetText(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxStyledTextCtrl_GetTextLength(_swigobj) (_swigobj->GetTextLength()) +static PyObject *_wrap_wxStyledTextCtrl_GetTextLength(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetTextLength",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetTextLength. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetTextLength(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetOvertype(_swigobj,_swigarg0) (_swigobj->SetOvertype(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetOvertype(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","overtype", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetOvertype",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetOvertype. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetOvertype(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetOvertype(_swigobj) (_swigobj->GetOvertype()) +static PyObject *_wrap_wxStyledTextCtrl_GetOvertype(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetOvertype",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetOvertype. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetOvertype(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_CallTipShow(_swigobj,_swigarg0,_swigarg1) (_swigobj->CallTipShow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_CallTipShow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","pos","definition", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_CallTipShow",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CallTipShow. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CallTipShow(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_CallTipCancel(_swigobj) (_swigobj->CallTipCancel()) +static PyObject *_wrap_wxStyledTextCtrl_CallTipCancel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CallTipCancel",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CallTipCancel. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CallTipCancel(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_CallTipActive(_swigobj) (_swigobj->CallTipActive()) +static PyObject *_wrap_wxStyledTextCtrl_CallTipActive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CallTipActive",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CallTipActive. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_CallTipActive(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_CallTipPosAtStart(_swigobj) (_swigobj->CallTipPosAtStart()) +static PyObject *_wrap_wxStyledTextCtrl_CallTipPosAtStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CallTipPosAtStart",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CallTipPosAtStart. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_CallTipPosAtStart(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_CallTipSetHighlight(_swigobj,_swigarg0,_swigarg1) (_swigobj->CallTipSetHighlight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_CallTipSetHighlight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","start","end", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_CallTipSetHighlight",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CallTipSetHighlight. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CallTipSetHighlight(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_CallTipSetBackground(_swigobj,_swigarg0) (_swigobj->CallTipSetBackground(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_CallTipSetBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","back", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_CallTipSetBackground",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CallTipSetBackground. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CallTipSetBackground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_VisibleFromDocLine(_swigobj,_swigarg0) (_swigobj->VisibleFromDocLine(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_VisibleFromDocLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_VisibleFromDocLine",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_VisibleFromDocLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_VisibleFromDocLine(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_DocLineFromVisible(_swigobj,_swigarg0) (_swigobj->DocLineFromVisible(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_DocLineFromVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","lineDisplay", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_DocLineFromVisible",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_DocLineFromVisible. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_DocLineFromVisible(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetFoldLevel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetFoldLevel(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetFoldLevel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line","level", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetFoldLevel",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetFoldLevel. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetFoldLevel(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetFoldLevel(_swigobj,_swigarg0) (_swigobj->GetFoldLevel(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetFoldLevel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetFoldLevel",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetFoldLevel. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetFoldLevel(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetLastChild(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetLastChild(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_GetLastChild(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line","level", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_GetLastChild",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLastChild. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLastChild(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetFoldParent(_swigobj,_swigarg0) (_swigobj->GetFoldParent(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetFoldParent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetFoldParent",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetFoldParent. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetFoldParent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_ShowLines(_swigobj,_swigarg0,_swigarg1) (_swigobj->ShowLines(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_ShowLines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","lineStart","lineEnd", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_ShowLines",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ShowLines. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ShowLines(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_HideLines(_swigobj,_swigarg0,_swigarg1) (_swigobj->HideLines(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_HideLines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","lineStart","lineEnd", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_HideLines",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_HideLines. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_HideLines(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetLineVisible(_swigobj,_swigarg0) (_swigobj->GetLineVisible(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetLineVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetLineVisible",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLineVisible. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetLineVisible(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetFoldExpanded(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetFoldExpanded(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetFoldExpanded(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + bool _arg2; + PyObject * _argo0 = 0; + int tempbool2; + char *_kwnames[] = { "self","line","expanded", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetFoldExpanded",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetFoldExpanded. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetFoldExpanded(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetFoldExpanded(_swigobj,_swigarg0) (_swigobj->GetFoldExpanded(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_GetFoldExpanded(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_GetFoldExpanded",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetFoldExpanded. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetFoldExpanded(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_ToggleFold(_swigobj,_swigarg0) (_swigobj->ToggleFold(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_ToggleFold(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_ToggleFold",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ToggleFold. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ToggleFold(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_EnsureVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_EnsureVisible",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_EnsureVisible. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_EnsureVisible(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetFoldFlags(_swigobj,_swigarg0) (_swigobj->SetFoldFlags(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetFoldFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetFoldFlags",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetFoldFlags. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetFoldFlags(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_LineLength(_swigobj,_swigarg0) (_swigobj->LineLength(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_LineLength(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_LineLength",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_LineLength. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_LineLength(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_BraceHighlight(_swigobj,_swigarg0,_swigarg1) (_swigobj->BraceHighlight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_BraceHighlight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos1","pos2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_BraceHighlight",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_BraceHighlight. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_BraceHighlight(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_BraceBadLight(_swigobj,_swigarg0) (_swigobj->BraceBadLight(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_BraceBadLight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_BraceBadLight",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_BraceBadLight. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_BraceBadLight(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_BraceMatch(_swigobj,_swigarg0) (_swigobj->BraceMatch(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_BraceMatch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_BraceMatch",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_BraceMatch. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_BraceMatch(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_GetViewEOL(_swigobj) (_swigobj->GetViewEOL()) +static PyObject *_wrap_wxStyledTextCtrl_GetViewEOL(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetViewEOL",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetViewEOL. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_GetViewEOL(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetViewEOL(_swigobj,_swigarg0) (_swigobj->SetViewEOL(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetViewEOL(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","visible", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetViewEOL",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetViewEOL. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetViewEOL(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetDocPointer(_swigobj) (_swigobj->GetDocPointer()) +static PyObject *_wrap_wxStyledTextCtrl_GetDocPointer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + void * _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetDocPointer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetDocPointer. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (void *)wxStyledTextCtrl_GetDocPointer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_void_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStyledTextCtrl_SetDocPointer(_swigobj,_swigarg0) (_swigobj->SetDocPointer(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetDocPointer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + void * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","docPointer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetDocPointer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetDocPointer. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,(char *) 0 )) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_SetDocPointer. Expected _void_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetDocPointer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetModEventMask(_swigobj,_swigarg0) (_swigobj->SetModEventMask(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetModEventMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetModEventMask",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetModEventMask. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetModEventMask(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetEdgeColumn(_swigobj) (_swigobj->GetEdgeColumn()) +static PyObject *_wrap_wxStyledTextCtrl_GetEdgeColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetEdgeColumn",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetEdgeColumn. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetEdgeColumn(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetEdgeColumn(_swigobj,_swigarg0) (_swigobj->SetEdgeColumn(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","column", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetEdgeColumn",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetEdgeColumn. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetEdgeColumn(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetEdgeMode(_swigobj) (_swigobj->GetEdgeMode()) +static PyObject *_wrap_wxStyledTextCtrl_GetEdgeMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetEdgeMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetEdgeMode. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetEdgeMode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetEdgeMode(_swigobj,_swigarg0) (_swigobj->SetEdgeMode(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetEdgeMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetEdgeMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetEdgeMode. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetEdgeMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetEdgeColour(_swigobj) (_swigobj->GetEdgeColour()) +static PyObject *_wrap_wxStyledTextCtrl_GetEdgeColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetEdgeColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetEdgeColour. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxStyledTextCtrl_GetEdgeColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxStyledTextCtrl_SetEdgeColour(_swigobj,_swigarg0) (_swigobj->SetEdgeColour(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetEdgeColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","edgeColour", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_SetEdgeColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetEdgeColour. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetEdgeColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SearchAnchor(_swigobj) (_swigobj->SearchAnchor()) +static PyObject *_wrap_wxStyledTextCtrl_SearchAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_SearchAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SearchAnchor. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SearchAnchor(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SearchNext(_swigobj,_swigarg0,_swigarg1) (_swigobj->SearchNext(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SearchNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","flags","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_SearchNext",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SearchNext. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_SearchNext(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_SearchPrev(_swigobj,_swigarg0,_swigarg1) (_swigobj->SearchPrev(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SearchPrev(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","flags","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_SearchPrev",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SearchPrev. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_SearchPrev(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_SetCaretPolicy(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetCaretPolicy(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetCaretPolicy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","caretPolicy","caretSlop", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetCaretPolicy",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetCaretPolicy. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetCaretPolicy(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_LinesOnScreen(_swigobj) (_swigobj->LinesOnScreen()) +static PyObject *_wrap_wxStyledTextCtrl_LinesOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_LinesOnScreen",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_LinesOnScreen. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_LinesOnScreen(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_UsePopUp(_swigobj,_swigarg0) (_swigobj->UsePopUp(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_UsePopUp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","allowPopUp", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_UsePopUp",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_UsePopUp. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_UsePopUp(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SelectionIsRectangle(_swigobj) (_swigobj->SelectionIsRectangle()) +static PyObject *_wrap_wxStyledTextCtrl_SelectionIsRectangle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_SelectionIsRectangle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SelectionIsRectangle. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextCtrl_SelectionIsRectangle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_SetZoom(_swigobj,_swigarg0) (_swigobj->SetZoom(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetZoom(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","zoom", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetZoom",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetZoom. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetZoom(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetZoom(_swigobj) (_swigobj->GetZoom()) +static PyObject *_wrap_wxStyledTextCtrl_GetZoom(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetZoom",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetZoom. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetZoom(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_CreateDocument(_swigobj) (_swigobj->CreateDocument()) +static PyObject *_wrap_wxStyledTextCtrl_CreateDocument(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + void * _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_CreateDocument",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CreateDocument. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (void *)wxStyledTextCtrl_CreateDocument(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_void_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxStyledTextCtrl_AddRefDocument(_swigobj,_swigarg0) (_swigobj->AddRefDocument(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_AddRefDocument(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + void * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","docPointer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_AddRefDocument",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_AddRefDocument. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,(char *) 0 )) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_AddRefDocument. Expected _void_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_AddRefDocument(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_ReleaseDocument(_swigobj,_swigarg0) (_swigobj->ReleaseDocument(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_ReleaseDocument(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + void * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","docPointer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextCtrl_ReleaseDocument",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ReleaseDocument. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,(char *) 0 )) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextCtrl_ReleaseDocument. Expected _void_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ReleaseDocument(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetModEventMask(_swigobj) (_swigobj->GetModEventMask()) +static PyObject *_wrap_wxStyledTextCtrl_GetModEventMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetModEventMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetModEventMask. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetModEventMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_StartRecord(_swigobj) (_swigobj->StartRecord()) +static PyObject *_wrap_wxStyledTextCtrl_StartRecord(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_StartRecord",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StartRecord. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StartRecord(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StopRecord(_swigobj) (_swigobj->StopRecord()) +static PyObject *_wrap_wxStyledTextCtrl_StopRecord(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_StopRecord",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StopRecord. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StopRecord(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetLexer(_swigobj,_swigarg0) (_swigobj->SetLexer(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_SetLexer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","lexer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_SetLexer",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetLexer. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetLexer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetLexer(_swigobj) (_swigobj->GetLexer()) +static PyObject *_wrap_wxStyledTextCtrl_GetLexer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetLexer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetLexer. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetLexer(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_Colourise(_swigobj,_swigarg0,_swigarg1) (_swigobj->Colourise(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_Colourise(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","start","end", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_Colourise",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_Colourise. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_Colourise(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetProperty(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetProperty(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetProperty(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","key","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxStyledTextCtrl_SetProperty",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetProperty. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetProperty(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_SetKeyWords(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetKeyWords(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetKeyWords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","keywordSet","keyWords", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_SetKeyWords",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetKeyWords. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetKeyWords(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_GetCurrentLine(_swigobj) (_swigobj->GetCurrentLine()) +static PyObject *_wrap_wxStyledTextCtrl_GetCurrentLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetCurrentLine",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetCurrentLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextCtrl_GetCurrentLine(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetSpec(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetSpec(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetSpec(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","styleNum","spec", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetSpec",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetSpec. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetSpec(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->StyleSetFont(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxFont * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","styleNum","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_StyleSetFont",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetFont. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxStyledTextCtrl_StyleSetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetFont(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_StyleSetFontAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->StyleSetFontAttr(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxStyledTextCtrl_StyleSetFontAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + bool _arg4; + bool _arg5; + bool _arg6; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + int tempbool4; + int tempbool5; + int tempbool6; + char *_kwnames[] = { "self","styleNum","size","faceName","bold","italic","underline", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOiii:wxStyledTextCtrl_StyleSetFontAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&tempbool4,&tempbool5,&tempbool6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_StyleSetFontAttr. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + _arg4 = (bool ) tempbool4; + _arg5 = (bool ) tempbool5; + _arg6 = (bool ) tempbool6; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_StyleSetFontAttr(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxStyledTextCtrl_CmdKeyExecute(_swigobj,_swigarg0) (_swigobj->CmdKeyExecute(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_CmdKeyExecute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","cmd", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_CmdKeyExecute",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CmdKeyExecute. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_CmdKeyExecute(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_SetMargins(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMargins(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_SetMargins(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","left","right", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_SetMargins",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_SetMargins. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_SetMargins(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_GetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSelection(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_GetSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_GetSelection. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_GetSelection(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxStyledTextCtrl_PointFromPosition(_swigobj,_swigarg0) (_swigobj->PointFromPosition(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_PointFromPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_PointFromPosition",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_PointFromPosition. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxStyledTextCtrl_PointFromPosition(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxStyledTextCtrl_ScrollToLine(_swigobj,_swigarg0) (_swigobj->ScrollToLine(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_ScrollToLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","line", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_ScrollToLine",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ScrollToLine. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ScrollToLine(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_ScrollToColumn(_swigobj,_swigarg0) (_swigobj->ScrollToColumn(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_ScrollToColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","column", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_ScrollToColumn",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_ScrollToColumn. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextCtrl_ScrollToColumn(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxStyledTextEventTowxCommandEvent(void *ptr) { + wxStyledTextEvent *src; + wxCommandEvent *dest; + src = (wxStyledTextEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxStyledTextEventTowxEvent(void *ptr) { + wxStyledTextEvent *src; + wxEvent *dest; + src = (wxStyledTextEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxStyledTextEvent(_swigarg0,_swigarg1) (new wxStyledTextEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxStyledTextEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _result; + wxEventType _arg0 = (wxEventType ) 0; + int _arg1 = (int ) 0; + char *_kwnames[] = { "commandType","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxStyledTextEvent",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStyledTextEvent *)new_wxStyledTextEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxStyledTextEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxStyledTextEvent(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxStyledTextEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxStyledTextEvent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxStyledTextEvent. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxStyledTextEvent(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetPosition",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetPosition. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetPosition(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetKey(_swigobj,_swigarg0) (_swigobj->SetKey(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","k", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetKey",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetKey. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetKey(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetModifiers(_swigobj,_swigarg0) (_swigobj->SetModifiers(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetModifiers",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetModifiers. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetModifiers(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetModificationType(_swigobj,_swigarg0) (_swigobj->SetModificationType(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetModificationType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","t", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetModificationType",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetModificationType. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetModificationType(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetText(_swigobj,_swigarg0) (_swigobj->SetText(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","t", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxStyledTextEvent_SetText",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetText. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetText(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetLength(_swigobj,_swigarg0) (_swigobj->SetLength(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetLength(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","len", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetLength",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetLength. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetLength(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetLinesAdded(_swigobj,_swigarg0) (_swigobj->SetLinesAdded(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetLinesAdded(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","num", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetLinesAdded",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetLinesAdded. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetLinesAdded(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetLine(_swigobj,_swigarg0) (_swigobj->SetLine(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetLine",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetLine. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetLine(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetFoldLevelNow(_swigobj,_swigarg0) (_swigobj->SetFoldLevelNow(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetFoldLevelNow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetFoldLevelNow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetFoldLevelNow. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetFoldLevelNow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetFoldLevelPrev(_swigobj,_swigarg0) (_swigobj->SetFoldLevelPrev(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetFoldLevelPrev(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetFoldLevelPrev",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetFoldLevelPrev. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetFoldLevelPrev(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetMargin(_swigobj,_swigarg0) (_swigobj->SetMargin(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetMargin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetMargin",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetMargin. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetMargin(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetMessage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetMessage. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetMessage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetWParam(_swigobj,_swigarg0) (_swigobj->SetWParam(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetWParam(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetWParam",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetWParam. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetWParam(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_SetLParam(_swigobj,_swigarg0) (_swigobj->SetLParam(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_SetLParam(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextEvent_SetLParam",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_SetLParam. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_SetLParam(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxStyledTextEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetPosition. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetKey(_swigobj) (_swigobj->GetKey()) +static PyObject *_wrap_wxStyledTextEvent_GetKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetKey",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetKey. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetKey(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetModifiers(_swigobj) (_swigobj->GetModifiers()) +static PyObject *_wrap_wxStyledTextEvent_GetModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetModifiers",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetModifiers. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetModifiers(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetModificationType(_swigobj) (_swigobj->GetModificationType()) +static PyObject *_wrap_wxStyledTextEvent_GetModificationType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetModificationType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetModificationType. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetModificationType(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetText(_swigobj) (_swigobj->GetText()) +static PyObject *_wrap_wxStyledTextEvent_GetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetText",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetText. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxStyledTextEvent_GetText(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxStyledTextEvent_GetLength(_swigobj) (_swigobj->GetLength()) +static PyObject *_wrap_wxStyledTextEvent_GetLength(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetLength",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetLength. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetLength(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetLinesAdded(_swigobj) (_swigobj->GetLinesAdded()) +static PyObject *_wrap_wxStyledTextEvent_GetLinesAdded(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetLinesAdded",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetLinesAdded. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetLinesAdded(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetLine(_swigobj) (_swigobj->GetLine()) +static PyObject *_wrap_wxStyledTextEvent_GetLine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetLine",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetLine. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetLine(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetFoldLevelNow(_swigobj) (_swigobj->GetFoldLevelNow()) +static PyObject *_wrap_wxStyledTextEvent_GetFoldLevelNow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetFoldLevelNow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetFoldLevelNow. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetFoldLevelNow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetFoldLevelPrev(_swigobj) (_swigobj->GetFoldLevelPrev()) +static PyObject *_wrap_wxStyledTextEvent_GetFoldLevelPrev(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetFoldLevelPrev",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetFoldLevelPrev. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetFoldLevelPrev(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetMargin(_swigobj) (_swigobj->GetMargin()) +static PyObject *_wrap_wxStyledTextEvent_GetMargin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetMargin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetMargin. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetMargin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetMessage(_swigobj) (_swigobj->GetMessage()) +static PyObject *_wrap_wxStyledTextEvent_GetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetMessage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetMessage. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetMessage(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetWParam(_swigobj) (_swigobj->GetWParam()) +static PyObject *_wrap_wxStyledTextEvent_GetWParam(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetWParam",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetWParam. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetWParam(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetLParam(_swigobj) (_swigobj->GetLParam()) +static PyObject *_wrap_wxStyledTextEvent_GetLParam(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetLParam",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetLParam. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxStyledTextEvent_GetLParam(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetShift(_swigobj) (_swigobj->GetShift()) +static PyObject *_wrap_wxStyledTextEvent_GetShift(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetShift",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetShift. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextEvent_GetShift(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetControl(_swigobj) (_swigobj->GetControl()) +static PyObject *_wrap_wxStyledTextEvent_GetControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetControl. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextEvent_GetControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_GetAlt(_swigobj) (_swigobj->GetAlt()) +static PyObject *_wrap_wxStyledTextEvent_GetAlt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxStyledTextEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextEvent_GetAlt",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_GetAlt. Expected _wxStyledTextEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxStyledTextEvent_GetAlt(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextEvent_CopyObject(_swigobj,_swigarg0) (_swigobj->CopyObject(_swigarg0)) +static PyObject *_wrap_wxStyledTextEvent_CopyObject(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextEvent * _arg0; + wxObject * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxStyledTextEvent_CopyObject",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextEvent_CopyObject. Expected _wxStyledTextEvent_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStyledTextEvent_CopyObject. Expected _wxObject_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStyledTextEvent_CopyObject(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyMethodDef stc_cMethods[] = { + { "wxStyledTextEvent_CopyObject", (PyCFunction) _wrap_wxStyledTextEvent_CopyObject, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetAlt", (PyCFunction) _wrap_wxStyledTextEvent_GetAlt, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetControl", (PyCFunction) _wrap_wxStyledTextEvent_GetControl, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetShift", (PyCFunction) _wrap_wxStyledTextEvent_GetShift, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetLParam", (PyCFunction) _wrap_wxStyledTextEvent_GetLParam, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetWParam", (PyCFunction) _wrap_wxStyledTextEvent_GetWParam, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetMessage", (PyCFunction) _wrap_wxStyledTextEvent_GetMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetMargin", (PyCFunction) _wrap_wxStyledTextEvent_GetMargin, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetFoldLevelPrev", (PyCFunction) _wrap_wxStyledTextEvent_GetFoldLevelPrev, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetFoldLevelNow", (PyCFunction) _wrap_wxStyledTextEvent_GetFoldLevelNow, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetLine", (PyCFunction) _wrap_wxStyledTextEvent_GetLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetLinesAdded", (PyCFunction) _wrap_wxStyledTextEvent_GetLinesAdded, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetLength", (PyCFunction) _wrap_wxStyledTextEvent_GetLength, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetText", (PyCFunction) _wrap_wxStyledTextEvent_GetText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetModificationType", (PyCFunction) _wrap_wxStyledTextEvent_GetModificationType, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetModifiers", (PyCFunction) _wrap_wxStyledTextEvent_GetModifiers, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetKey", (PyCFunction) _wrap_wxStyledTextEvent_GetKey, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_GetPosition", (PyCFunction) _wrap_wxStyledTextEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetLParam", (PyCFunction) _wrap_wxStyledTextEvent_SetLParam, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetWParam", (PyCFunction) _wrap_wxStyledTextEvent_SetWParam, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetMessage", (PyCFunction) _wrap_wxStyledTextEvent_SetMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetMargin", (PyCFunction) _wrap_wxStyledTextEvent_SetMargin, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetFoldLevelPrev", (PyCFunction) _wrap_wxStyledTextEvent_SetFoldLevelPrev, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetFoldLevelNow", (PyCFunction) _wrap_wxStyledTextEvent_SetFoldLevelNow, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetLine", (PyCFunction) _wrap_wxStyledTextEvent_SetLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetLinesAdded", (PyCFunction) _wrap_wxStyledTextEvent_SetLinesAdded, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetLength", (PyCFunction) _wrap_wxStyledTextEvent_SetLength, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetText", (PyCFunction) _wrap_wxStyledTextEvent_SetText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetModificationType", (PyCFunction) _wrap_wxStyledTextEvent_SetModificationType, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetModifiers", (PyCFunction) _wrap_wxStyledTextEvent_SetModifiers, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetKey", (PyCFunction) _wrap_wxStyledTextEvent_SetKey, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextEvent_SetPosition", (PyCFunction) _wrap_wxStyledTextEvent_SetPosition, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxStyledTextEvent", (PyCFunction) _wrap_delete_wxStyledTextEvent, METH_VARARGS | METH_KEYWORDS }, + { "new_wxStyledTextEvent", (PyCFunction) _wrap_new_wxStyledTextEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ScrollToColumn", (PyCFunction) _wrap_wxStyledTextCtrl_ScrollToColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ScrollToLine", (PyCFunction) _wrap_wxStyledTextCtrl_ScrollToLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_PointFromPosition", (PyCFunction) _wrap_wxStyledTextCtrl_PointFromPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetSelection", (PyCFunction) _wrap_wxStyledTextCtrl_GetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetMargins", (PyCFunction) _wrap_wxStyledTextCtrl_SetMargins, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CmdKeyExecute", (PyCFunction) _wrap_wxStyledTextCtrl_CmdKeyExecute, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetFontAttr", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetFontAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetFont", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetSpec", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetSpec, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetCurrentLine", (PyCFunction) _wrap_wxStyledTextCtrl_GetCurrentLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetKeyWords", (PyCFunction) _wrap_wxStyledTextCtrl_SetKeyWords, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetProperty", (PyCFunction) _wrap_wxStyledTextCtrl_SetProperty, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_Colourise", (PyCFunction) _wrap_wxStyledTextCtrl_Colourise, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLexer", (PyCFunction) _wrap_wxStyledTextCtrl_GetLexer, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetLexer", (PyCFunction) _wrap_wxStyledTextCtrl_SetLexer, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StopRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StopRecord, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StartRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StartRecord, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetModEventMask", (PyCFunction) _wrap_wxStyledTextCtrl_GetModEventMask, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ReleaseDocument", (PyCFunction) _wrap_wxStyledTextCtrl_ReleaseDocument, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AddRefDocument", (PyCFunction) _wrap_wxStyledTextCtrl_AddRefDocument, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CreateDocument", (PyCFunction) _wrap_wxStyledTextCtrl_CreateDocument, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetZoom", (PyCFunction) _wrap_wxStyledTextCtrl_GetZoom, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetZoom", (PyCFunction) _wrap_wxStyledTextCtrl_SetZoom, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SelectionIsRectangle", (PyCFunction) _wrap_wxStyledTextCtrl_SelectionIsRectangle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_UsePopUp", (PyCFunction) _wrap_wxStyledTextCtrl_UsePopUp, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_LinesOnScreen", (PyCFunction) _wrap_wxStyledTextCtrl_LinesOnScreen, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetCaretPolicy", (PyCFunction) _wrap_wxStyledTextCtrl_SetCaretPolicy, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SearchPrev", (PyCFunction) _wrap_wxStyledTextCtrl_SearchPrev, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SearchNext", (PyCFunction) _wrap_wxStyledTextCtrl_SearchNext, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SearchAnchor", (PyCFunction) _wrap_wxStyledTextCtrl_SearchAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetEdgeColour", (PyCFunction) _wrap_wxStyledTextCtrl_SetEdgeColour, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetEdgeColour", (PyCFunction) _wrap_wxStyledTextCtrl_GetEdgeColour, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetEdgeMode", (PyCFunction) _wrap_wxStyledTextCtrl_SetEdgeMode, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetEdgeMode", (PyCFunction) _wrap_wxStyledTextCtrl_GetEdgeMode, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetEdgeColumn", (PyCFunction) _wrap_wxStyledTextCtrl_SetEdgeColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetEdgeColumn", (PyCFunction) _wrap_wxStyledTextCtrl_GetEdgeColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetModEventMask", (PyCFunction) _wrap_wxStyledTextCtrl_SetModEventMask, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetDocPointer", (PyCFunction) _wrap_wxStyledTextCtrl_SetDocPointer, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetDocPointer", (PyCFunction) _wrap_wxStyledTextCtrl_GetDocPointer, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetViewEOL", (PyCFunction) _wrap_wxStyledTextCtrl_SetViewEOL, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetViewEOL", (PyCFunction) _wrap_wxStyledTextCtrl_GetViewEOL, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_BraceMatch", (PyCFunction) _wrap_wxStyledTextCtrl_BraceMatch, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_BraceBadLight", (PyCFunction) _wrap_wxStyledTextCtrl_BraceBadLight, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_BraceHighlight", (PyCFunction) _wrap_wxStyledTextCtrl_BraceHighlight, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_LineLength", (PyCFunction) _wrap_wxStyledTextCtrl_LineLength, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetFoldFlags", (PyCFunction) _wrap_wxStyledTextCtrl_SetFoldFlags, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_EnsureVisible", (PyCFunction) _wrap_wxStyledTextCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ToggleFold", (PyCFunction) _wrap_wxStyledTextCtrl_ToggleFold, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetFoldExpanded", (PyCFunction) _wrap_wxStyledTextCtrl_GetFoldExpanded, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetFoldExpanded", (PyCFunction) _wrap_wxStyledTextCtrl_SetFoldExpanded, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLineVisible", (PyCFunction) _wrap_wxStyledTextCtrl_GetLineVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_HideLines", (PyCFunction) _wrap_wxStyledTextCtrl_HideLines, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ShowLines", (PyCFunction) _wrap_wxStyledTextCtrl_ShowLines, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetFoldParent", (PyCFunction) _wrap_wxStyledTextCtrl_GetFoldParent, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLastChild", (PyCFunction) _wrap_wxStyledTextCtrl_GetLastChild, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetFoldLevel", (PyCFunction) _wrap_wxStyledTextCtrl_GetFoldLevel, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetFoldLevel", (PyCFunction) _wrap_wxStyledTextCtrl_SetFoldLevel, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_DocLineFromVisible", (PyCFunction) _wrap_wxStyledTextCtrl_DocLineFromVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_VisibleFromDocLine", (PyCFunction) _wrap_wxStyledTextCtrl_VisibleFromDocLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CallTipSetBackground", (PyCFunction) _wrap_wxStyledTextCtrl_CallTipSetBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CallTipSetHighlight", (PyCFunction) _wrap_wxStyledTextCtrl_CallTipSetHighlight, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CallTipPosAtStart", (PyCFunction) _wrap_wxStyledTextCtrl_CallTipPosAtStart, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CallTipActive", (PyCFunction) _wrap_wxStyledTextCtrl_CallTipActive, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CallTipCancel", (PyCFunction) _wrap_wxStyledTextCtrl_CallTipCancel, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CallTipShow", (PyCFunction) _wrap_wxStyledTextCtrl_CallTipShow, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetOvertype", (PyCFunction) _wrap_wxStyledTextCtrl_GetOvertype, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetOvertype", (PyCFunction) _wrap_wxStyledTextCtrl_SetOvertype, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetTextLength", (PyCFunction) _wrap_wxStyledTextCtrl_GetTextLength, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetText", (PyCFunction) _wrap_wxStyledTextCtrl_GetText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetText", (PyCFunction) _wrap_wxStyledTextCtrl_SetText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_Clear", (PyCFunction) _wrap_wxStyledTextCtrl_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_Paste", (PyCFunction) _wrap_wxStyledTextCtrl_Paste, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_Copy", (PyCFunction) _wrap_wxStyledTextCtrl_Copy, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_Cut", (PyCFunction) _wrap_wxStyledTextCtrl_Cut, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_Undo", (PyCFunction) _wrap_wxStyledTextCtrl_Undo, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_EmptyUndoBuffer", (PyCFunction) _wrap_wxStyledTextCtrl_EmptyUndoBuffer, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CanUndo", (PyCFunction) _wrap_wxStyledTextCtrl_CanUndo, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CanPaste", (PyCFunction) _wrap_wxStyledTextCtrl_CanPaste, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetReadOnly", (PyCFunction) _wrap_wxStyledTextCtrl_SetReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ReplaceSelection", (PyCFunction) _wrap_wxStyledTextCtrl_ReplaceSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_EnsureCaretVisible", (PyCFunction) _wrap_wxStyledTextCtrl_EnsureCaretVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_LineScroll", (PyCFunction) _wrap_wxStyledTextCtrl_LineScroll, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_PositionFromLine", (PyCFunction) _wrap_wxStyledTextCtrl_PositionFromLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_LineFromPosition", (PyCFunction) _wrap_wxStyledTextCtrl_LineFromPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_HideSelection", (PyCFunction) _wrap_wxStyledTextCtrl_HideSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetTextRange", (PyCFunction) _wrap_wxStyledTextCtrl_GetTextRange, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetSelectedText", (PyCFunction) _wrap_wxStyledTextCtrl_GetSelectedText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetSelection", (PyCFunction) _wrap_wxStyledTextCtrl_SetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetModify", (PyCFunction) _wrap_wxStyledTextCtrl_GetModify, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetMarginRight", (PyCFunction) _wrap_wxStyledTextCtrl_GetMarginRight, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetMarginRight", (PyCFunction) _wrap_wxStyledTextCtrl_SetMarginRight, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetMarginLeft", (PyCFunction) _wrap_wxStyledTextCtrl_GetMarginLeft, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetMarginLeft", (PyCFunction) _wrap_wxStyledTextCtrl_SetMarginLeft, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLineCount", (PyCFunction) _wrap_wxStyledTextCtrl_GetLineCount, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLine", (PyCFunction) _wrap_wxStyledTextCtrl_GetLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetFirstVisibleLine", (PyCFunction) _wrap_wxStyledTextCtrl_GetFirstVisibleLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_FormatRange", (PyCFunction) _wrap_wxStyledTextCtrl_FormatRange, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_FindText", (PyCFunction) _wrap_wxStyledTextCtrl_FindText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetPrintColourMode", (PyCFunction) _wrap_wxStyledTextCtrl_GetPrintColourMode, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetPrintColourMode", (PyCFunction) _wrap_wxStyledTextCtrl_SetPrintColourMode, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetPrintMagnification", (PyCFunction) _wrap_wxStyledTextCtrl_GetPrintMagnification, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetPrintMagnification", (PyCFunction) _wrap_wxStyledTextCtrl_SetPrintMagnification, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetSelectionEnd", (PyCFunction) _wrap_wxStyledTextCtrl_GetSelectionEnd, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetSelectionEnd", (PyCFunction) _wrap_wxStyledTextCtrl_SetSelectionEnd, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetSelectionStart", (PyCFunction) _wrap_wxStyledTextCtrl_GetSelectionStart, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetSelectionStart", (PyCFunction) _wrap_wxStyledTextCtrl_SetSelectionStart, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetCurrentPos", (PyCFunction) _wrap_wxStyledTextCtrl_SetCurrentPos, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetReadOnly", (PyCFunction) _wrap_wxStyledTextCtrl_GetReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetCaretForeground", (PyCFunction) _wrap_wxStyledTextCtrl_GetCaretForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetCodePage", (PyCFunction) _wrap_wxStyledTextCtrl_GetCodePage, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLineEndPosition", (PyCFunction) _wrap_wxStyledTextCtrl_GetLineEndPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetHighlightGuide", (PyCFunction) _wrap_wxStyledTextCtrl_GetHighlightGuide, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetHighlightGuide", (PyCFunction) _wrap_wxStyledTextCtrl_SetHighlightGuide, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetIndentationGuides", (PyCFunction) _wrap_wxStyledTextCtrl_GetIndentationGuides, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetIndentationGuides", (PyCFunction) _wrap_wxStyledTextCtrl_SetIndentationGuides, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetUseHorizontalScrollBar", (PyCFunction) _wrap_wxStyledTextCtrl_GetUseHorizontalScrollBar, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetUseHorizontalScrollBar", (PyCFunction) _wrap_wxStyledTextCtrl_SetUseHorizontalScrollBar, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetColumn", (PyCFunction) _wrap_wxStyledTextCtrl_GetColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLineIndentPosition", (PyCFunction) _wrap_wxStyledTextCtrl_GetLineIndentPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLineIndentation", (PyCFunction) _wrap_wxStyledTextCtrl_GetLineIndentation, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetLineIndentation", (PyCFunction) _wrap_wxStyledTextCtrl_SetLineIndentation, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetUseTabs", (PyCFunction) _wrap_wxStyledTextCtrl_GetUseTabs, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetUseTabs", (PyCFunction) _wrap_wxStyledTextCtrl_SetUseTabs, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetIndent", (PyCFunction) _wrap_wxStyledTextCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetIndent", (PyCFunction) _wrap_wxStyledTextCtrl_SetIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompGetIgnoreCase", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompGetIgnoreCase, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompSetIgnoreCase", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompSetIgnoreCase, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompGetChooseSingle", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompGetChooseSingle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompSetChooseSingle", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompSetChooseSingle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompSetFillUps", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompSetFillUps, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompGetCancelAtStart", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompGetCancelAtStart, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompSetCancelAtStart", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompSetCancelAtStart, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompSelect", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompSelect, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompGetSeparator", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompGetSeparator, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompSetSeparator", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompSetSeparator, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompStops", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompStops, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompComplete", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompComplete, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompPosStart", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompPosStart, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompActive", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompActive, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompCancel", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompCancel, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AutoCompShow", (PyCFunction) _wrap_wxStyledTextCtrl_AutoCompShow, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetMaxLineState", (PyCFunction) _wrap_wxStyledTextCtrl_GetMaxLineState, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLineState", (PyCFunction) _wrap_wxStyledTextCtrl_GetLineState, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetLineState", (PyCFunction) _wrap_wxStyledTextCtrl_SetLineState, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetStyleBits", (PyCFunction) _wrap_wxStyledTextCtrl_GetStyleBits, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetStyleBits", (PyCFunction) _wrap_wxStyledTextCtrl_SetStyleBits, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_IndicatorGetForeground", (PyCFunction) _wrap_wxStyledTextCtrl_IndicatorGetForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_IndicatorSetForeground", (PyCFunction) _wrap_wxStyledTextCtrl_IndicatorSetForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_IndicatorGetStyle", (PyCFunction) _wrap_wxStyledTextCtrl_IndicatorGetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_IndicatorSetStyle", (PyCFunction) _wrap_wxStyledTextCtrl_IndicatorSetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_EndUndoAction", (PyCFunction) _wrap_wxStyledTextCtrl_EndUndoAction, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_BeginUndoAction", (PyCFunction) _wrap_wxStyledTextCtrl_BeginUndoAction, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetWordChars", (PyCFunction) _wrap_wxStyledTextCtrl_SetWordChars, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetCaretPeriod", (PyCFunction) _wrap_wxStyledTextCtrl_SetCaretPeriod, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetCaretPeriod", (PyCFunction) _wrap_wxStyledTextCtrl_GetCaretPeriod, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetVisible", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetStyleBytes", (PyCFunction) _wrap_wxStyledTextCtrl_SetStyleBytes, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CmdKeyClearAll", (PyCFunction) _wrap_wxStyledTextCtrl_CmdKeyClearAll, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CmdKeyClear", (PyCFunction) _wrap_wxStyledTextCtrl_CmdKeyClear, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CmdKeyAssign", (PyCFunction) _wrap_wxStyledTextCtrl_CmdKeyAssign, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetCaretForeground", (PyCFunction) _wrap_wxStyledTextCtrl_SetCaretForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetSelBackground", (PyCFunction) _wrap_wxStyledTextCtrl_SetSelBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetSelForeground", (PyCFunction) _wrap_wxStyledTextCtrl_SetSelForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetUnderline", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetUnderline, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleResetDefault", (PyCFunction) _wrap_wxStyledTextCtrl_StyleResetDefault, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetEOLFilled", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetEOLFilled, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetFaceName", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetFaceName, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetSize", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetItalic", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetItalic, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetBold", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetBold, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetBackground", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleSetForeground", (PyCFunction) _wrap_wxStyledTextCtrl_StyleSetForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StyleClearAll", (PyCFunction) _wrap_wxStyledTextCtrl_StyleClearAll, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetMarginSensitive", (PyCFunction) _wrap_wxStyledTextCtrl_GetMarginSensitive, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetMarginSensitive", (PyCFunction) _wrap_wxStyledTextCtrl_SetMarginSensitive, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetMarginMask", (PyCFunction) _wrap_wxStyledTextCtrl_GetMarginMask, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetMarginMask", (PyCFunction) _wrap_wxStyledTextCtrl_SetMarginMask, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetMarginWidth", (PyCFunction) _wrap_wxStyledTextCtrl_GetMarginWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetMarginWidth", (PyCFunction) _wrap_wxStyledTextCtrl_SetMarginWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetMarginType", (PyCFunction) _wrap_wxStyledTextCtrl_GetMarginType, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetMarginType", (PyCFunction) _wrap_wxStyledTextCtrl_SetMarginType, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerPrevious", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerPrevious, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerNext", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerNext, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerGet", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerGet, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerDeleteAll", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerDeleteAll, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerDelete", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerDelete, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerAdd", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerAdd, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerSetBackground", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerSetBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerSetForeground", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerSetForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerDefine", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerDefine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetCodePage", (PyCFunction) _wrap_wxStyledTextCtrl_SetCodePage, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetTabWidth", (PyCFunction) _wrap_wxStyledTextCtrl_GetTabWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetTabWidth", (PyCFunction) _wrap_wxStyledTextCtrl_SetTabWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetBufferedDraw", (PyCFunction) _wrap_wxStyledTextCtrl_SetBufferedDraw, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetBufferedDraw", (PyCFunction) _wrap_wxStyledTextCtrl_GetBufferedDraw, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetStyling", (PyCFunction) _wrap_wxStyledTextCtrl_SetStyling, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_StartStyling", (PyCFunction) _wrap_wxStyledTextCtrl_StartStyling, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetEOLMode", (PyCFunction) _wrap_wxStyledTextCtrl_SetEOLMode, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetEOLMode", (PyCFunction) _wrap_wxStyledTextCtrl_GetEOLMode, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ConvertEOLs", (PyCFunction) _wrap_wxStyledTextCtrl_ConvertEOLs, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetEndStyled", (PyCFunction) _wrap_wxStyledTextCtrl_GetEndStyled, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetCurLine", (PyCFunction) _wrap_wxStyledTextCtrl_GetCurLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetAnchor", (PyCFunction) _wrap_wxStyledTextCtrl_SetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GotoPos", (PyCFunction) _wrap_wxStyledTextCtrl_GotoPos, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GotoLine", (PyCFunction) _wrap_wxStyledTextCtrl_GotoLine, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_PositionFromPoint", (PyCFunction) _wrap_wxStyledTextCtrl_PositionFromPoint, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetViewWhiteSpace", (PyCFunction) _wrap_wxStyledTextCtrl_SetViewWhiteSpace, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetViewWhiteSpace", (PyCFunction) _wrap_wxStyledTextCtrl_GetViewWhiteSpace, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetUndoCollection", (PyCFunction) _wrap_wxStyledTextCtrl_GetUndoCollection, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerDeleteHandle", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerDeleteHandle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_MarkerLineFromHandle", (PyCFunction) _wrap_wxStyledTextCtrl_MarkerLineFromHandle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CanRedo", (PyCFunction) _wrap_wxStyledTextCtrl_CanRedo, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetStyledText", (PyCFunction) _wrap_wxStyledTextCtrl_GetStyledText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetSavePoint", (PyCFunction) _wrap_wxStyledTextCtrl_SetSavePoint, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SelectAll", (PyCFunction) _wrap_wxStyledTextCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_SetUndoCollection", (PyCFunction) _wrap_wxStyledTextCtrl_SetUndoCollection, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_Redo", (PyCFunction) _wrap_wxStyledTextCtrl_Redo, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetStyleAt", (PyCFunction) _wrap_wxStyledTextCtrl_GetStyleAt, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetAnchor", (PyCFunction) _wrap_wxStyledTextCtrl_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetCurrentPos", (PyCFunction) _wrap_wxStyledTextCtrl_GetCurrentPos, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetCharAt", (PyCFunction) _wrap_wxStyledTextCtrl_GetCharAt, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_GetLength", (PyCFunction) _wrap_wxStyledTextCtrl_GetLength, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ClearDocumentStyle", (PyCFunction) _wrap_wxStyledTextCtrl_ClearDocumentStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_ClearAll", (PyCFunction) _wrap_wxStyledTextCtrl_ClearAll, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_InsertText", (PyCFunction) _wrap_wxStyledTextCtrl_InsertText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AddStyledText", (PyCFunction) _wrap_wxStyledTextCtrl_AddStyledText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_AddText", (PyCFunction) _wrap_wxStyledTextCtrl_AddText, METH_VARARGS | METH_KEYWORDS }, + { "new_wxStyledTextCtrl", (PyCFunction) _wrap_new_wxStyledTextCtrl, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent}, + { "_wxEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent}, + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_class_wxEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent}, + { "_class_wxEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxEvent}, + { "_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent}, + { "_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow}, + { "_class_wxWindow","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_wxControl","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl}, + { "_wxControl","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxControl","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl}, + { "_class_wxControl","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxControl}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_class_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent}, + { "_wxEvtHandler","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxEvtHandler}, + { "_wxWindow","_class_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow}, + { "_wxWindow","_wxStyledTextCtrl",SwigwxStyledTextCtrlTowxWindow}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initstc_c() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("stc_c", stc_cMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxSTC_INVALID_POSITION", PyInt_FromLong((long) -1)); + PyDict_SetItemString(d,"wxSTC_START", PyInt_FromLong((long) 2000)); + PyDict_SetItemString(d,"wxSTC_OPTIONAL_START", PyInt_FromLong((long) 3000)); + PyDict_SetItemString(d,"wxSTC_LEXER_START", PyInt_FromLong((long) 4000)); + PyDict_SetItemString(d,"wxSTC_CMD_REDO", PyInt_FromLong((long) 2011)); + PyDict_SetItemString(d,"wxSTC_CMD_SELECTALL", PyInt_FromLong((long) 2013)); + PyDict_SetItemString(d,"wxSTC_WS_INVISIBLE", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_WS_VISIBLEALWAYS", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_WS_VISIBLEAFTERINDENT", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_EOL_CRLF", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_EOL_CR", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_EOL_LF", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_CP_UTF8", PyInt_FromLong((long) 65001)); + PyDict_SetItemString(d,"wxSTC_MARKER_MAX", PyInt_FromLong((long) 31)); + PyDict_SetItemString(d,"wxSTC_MARK_CIRCLE", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_MARK_ROUNDRECT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_MARK_ARROW", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_MARK_SMALLRECT", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_MARK_SHORTARROW", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_MARK_EMPTY", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_MARK_ARROWDOWN", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_MARK_MINUS", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_MARK_PLUS", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_MARKNUM_FOLDER", PyInt_FromLong((long) 30)); + PyDict_SetItemString(d,"wxSTC_MARKNUM_FOLDEROPEN", PyInt_FromLong((long) 31)); + PyDict_SetItemString(d,"wxSTC_MARGIN_SYMBOL", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_MARGIN_NUMBER", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_STYLE_DEFAULT", PyInt_FromLong((long) 32)); + PyDict_SetItemString(d,"wxSTC_STYLE_LINENUMBER", PyInt_FromLong((long) 33)); + PyDict_SetItemString(d,"wxSTC_STYLE_BRACELIGHT", PyInt_FromLong((long) 34)); + PyDict_SetItemString(d,"wxSTC_STYLE_BRACEBAD", PyInt_FromLong((long) 35)); + PyDict_SetItemString(d,"wxSTC_STYLE_CONTROLCHAR", PyInt_FromLong((long) 36)); + PyDict_SetItemString(d,"wxSTC_STYLE_INDENTGUIDE", PyInt_FromLong((long) 37)); + PyDict_SetItemString(d,"wxSTC_STYLE_MAX", PyInt_FromLong((long) 127)); + PyDict_SetItemString(d,"wxSTC_CHARSET_ANSI", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_CHARSET_DEFAULT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_CHARSET_BALTIC", PyInt_FromLong((long) 186)); + PyDict_SetItemString(d,"wxSTC_CHARSET_CHINESEBIG5", PyInt_FromLong((long) 136)); + PyDict_SetItemString(d,"wxSTC_CHARSET_EASTEUROPE", PyInt_FromLong((long) 238)); + PyDict_SetItemString(d,"wxSTC_CHARSET_GB2312", PyInt_FromLong((long) 134)); + PyDict_SetItemString(d,"wxSTC_CHARSET_GREEK", PyInt_FromLong((long) 161)); + PyDict_SetItemString(d,"wxSTC_CHARSET_HANGUL", PyInt_FromLong((long) 129)); + PyDict_SetItemString(d,"wxSTC_CHARSET_MAC", PyInt_FromLong((long) 77)); + PyDict_SetItemString(d,"wxSTC_CHARSET_OEM", PyInt_FromLong((long) 255)); + PyDict_SetItemString(d,"wxSTC_CHARSET_RUSSIAN", PyInt_FromLong((long) 204)); + PyDict_SetItemString(d,"wxSTC_CHARSET_SHIFTJIS", PyInt_FromLong((long) 128)); + PyDict_SetItemString(d,"wxSTC_CHARSET_SYMBOL", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_CHARSET_TURKISH", PyInt_FromLong((long) 162)); + PyDict_SetItemString(d,"wxSTC_CHARSET_JOHAB", PyInt_FromLong((long) 130)); + PyDict_SetItemString(d,"wxSTC_CHARSET_HEBREW", PyInt_FromLong((long) 177)); + PyDict_SetItemString(d,"wxSTC_CHARSET_ARABIC", PyInt_FromLong((long) 178)); + PyDict_SetItemString(d,"wxSTC_CHARSET_VIETNAMESE", PyInt_FromLong((long) 163)); + PyDict_SetItemString(d,"wxSTC_CHARSET_THAI", PyInt_FromLong((long) 222)); + PyDict_SetItemString(d,"wxSTC_INDIC_MAX", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_INDIC_PLAIN", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_INDIC_SQUIGGLE", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_INDIC_TT", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_INDIC_DIAGONAL", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_INDIC_STRIKE", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_INDIC0_MASK", PyInt_FromLong((long) 32)); + PyDict_SetItemString(d,"wxSTC_INDIC1_MASK", PyInt_FromLong((long) 64)); + PyDict_SetItemString(d,"wxSTC_INDIC2_MASK", PyInt_FromLong((long) 128)); + PyDict_SetItemString(d,"wxSTC_INDICS_MASK", PyInt_FromLong((long) 32|64|128)); + PyDict_SetItemString(d,"wxSTC_PRINT_NORMAL", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_PRINT_INVERTLIGHT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_PRINT_BLACKONWHITE", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_FIND_DOWN", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_FIND_WHOLEWORD", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_FIND_MATCHCASE", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_FIND_WORDSTART", PyInt_FromLong((long) 0x00100000)); + PyDict_SetItemString(d,"wxSTC_FIND_REGEXP", PyInt_FromLong((long) 0x00200000)); + PyDict_SetItemString(d,"wxSTC_CMD_UNDO", PyInt_FromLong((long) 2176)); + PyDict_SetItemString(d,"wxSTC_CMD_CUT", PyInt_FromLong((long) 2177)); + PyDict_SetItemString(d,"wxSTC_CMD_COPY", PyInt_FromLong((long) 2178)); + PyDict_SetItemString(d,"wxSTC_CMD_PASTE", PyInt_FromLong((long) 2179)); + PyDict_SetItemString(d,"wxSTC_FOLDLEVELBASE", PyInt_FromLong((long) 0x400)); + PyDict_SetItemString(d,"wxSTC_FOLDLEVELWHITEFLAG", PyInt_FromLong((long) 0x1000)); + PyDict_SetItemString(d,"wxSTC_FOLDLEVELHEADERFLAG", PyInt_FromLong((long) 0x2000)); + PyDict_SetItemString(d,"wxSTC_FOLDLEVELNUMBERMASK", PyInt_FromLong((long) 0x0FFF)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEDOWN", PyInt_FromLong((long) 2300)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEDOWNEXTEND", PyInt_FromLong((long) 2301)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEUP", PyInt_FromLong((long) 2302)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEUPEXTEND", PyInt_FromLong((long) 2303)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARLEFT", PyInt_FromLong((long) 2304)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARLEFTEXTEND", PyInt_FromLong((long) 2305)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARRIGHT", PyInt_FromLong((long) 2306)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARRIGHTEXTEND", PyInt_FromLong((long) 2307)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDLEFT", PyInt_FromLong((long) 2308)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDLEFTEXTEND", PyInt_FromLong((long) 2309)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDRIGHT", PyInt_FromLong((long) 2310)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDRIGHTEXTEND", PyInt_FromLong((long) 2311)); + PyDict_SetItemString(d,"wxSTC_CMD_HOME", PyInt_FromLong((long) 2312)); + PyDict_SetItemString(d,"wxSTC_CMD_HOMEEXTEND", PyInt_FromLong((long) 2313)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEEND", PyInt_FromLong((long) 2314)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEENDEXTEND", PyInt_FromLong((long) 2315)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTSTART", PyInt_FromLong((long) 2316)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTSTARTEXTEND", PyInt_FromLong((long) 2317)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTEND", PyInt_FromLong((long) 2318)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTENDEXTEND", PyInt_FromLong((long) 2319)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEUP", PyInt_FromLong((long) 2320)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEUPEXTEND", PyInt_FromLong((long) 2321)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEDOWN", PyInt_FromLong((long) 2322)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEDOWNEXTEND", PyInt_FromLong((long) 2323)); + PyDict_SetItemString(d,"wxSTC_CMD_EDITTOGGLEOVERTYPE", PyInt_FromLong((long) 2324)); + PyDict_SetItemString(d,"wxSTC_CMD_CANCEL", PyInt_FromLong((long) 2325)); + PyDict_SetItemString(d,"wxSTC_CMD_DELETEBACK", PyInt_FromLong((long) 2326)); + PyDict_SetItemString(d,"wxSTC_CMD_TAB", PyInt_FromLong((long) 2327)); + PyDict_SetItemString(d,"wxSTC_CMD_BACKTAB", PyInt_FromLong((long) 2328)); + PyDict_SetItemString(d,"wxSTC_CMD_NEWLINE", PyInt_FromLong((long) 2329)); + PyDict_SetItemString(d,"wxSTC_CMD_FORMFEED", PyInt_FromLong((long) 2330)); + PyDict_SetItemString(d,"wxSTC_CMD_VCHOME", PyInt_FromLong((long) 2331)); + PyDict_SetItemString(d,"wxSTC_CMD_VCHOMEEXTEND", PyInt_FromLong((long) 2332)); + PyDict_SetItemString(d,"wxSTC_CMD_ZOOMIN", PyInt_FromLong((long) 2333)); + PyDict_SetItemString(d,"wxSTC_CMD_ZOOMOUT", PyInt_FromLong((long) 2334)); + PyDict_SetItemString(d,"wxSTC_CMD_DELWORDLEFT", PyInt_FromLong((long) 2335)); + PyDict_SetItemString(d,"wxSTC_CMD_DELWORDRIGHT", PyInt_FromLong((long) 2336)); + PyDict_SetItemString(d,"wxSTC_CMD_LINECUT", PyInt_FromLong((long) 2337)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEDELETE", PyInt_FromLong((long) 2338)); + PyDict_SetItemString(d,"wxSTC_CMD_LINETRANSPOSE", PyInt_FromLong((long) 2339)); + PyDict_SetItemString(d,"wxSTC_CMD_LOWERCASE", PyInt_FromLong((long) 2340)); + PyDict_SetItemString(d,"wxSTC_CMD_UPPERCASE", PyInt_FromLong((long) 2341)); + PyDict_SetItemString(d,"wxSTC_CMD_LINESCROLLDOWN", PyInt_FromLong((long) 2342)); + PyDict_SetItemString(d,"wxSTC_CMD_LINESCROLLUP", PyInt_FromLong((long) 2343)); + PyDict_SetItemString(d,"wxSTC_EDGE_NONE", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_EDGE_LINE", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_EDGE_BACKGROUND", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_CARET_SLOP", PyInt_FromLong((long) 0x01)); + PyDict_SetItemString(d,"wxSTC_CARET_CENTER", PyInt_FromLong((long) 0x02)); + PyDict_SetItemString(d,"wxSTC_CARET_STRICT", PyInt_FromLong((long) 0x04)); + PyDict_SetItemString(d,"wxSTC_MOD_INSERTTEXT", PyInt_FromLong((long) 0x1)); + PyDict_SetItemString(d,"wxSTC_MOD_DELETETEXT", PyInt_FromLong((long) 0x2)); + PyDict_SetItemString(d,"wxSTC_MOD_CHANGESTYLE", PyInt_FromLong((long) 0x4)); + PyDict_SetItemString(d,"wxSTC_MOD_CHANGEFOLD", PyInt_FromLong((long) 0x8)); + PyDict_SetItemString(d,"wxSTC_PERFORMED_USER", PyInt_FromLong((long) 0x10)); + PyDict_SetItemString(d,"wxSTC_PERFORMED_UNDO", PyInt_FromLong((long) 0x20)); + PyDict_SetItemString(d,"wxSTC_PERFORMED_REDO", PyInt_FromLong((long) 0x40)); + PyDict_SetItemString(d,"wxSTC_LASTSTEPINUNDOREDO", PyInt_FromLong((long) 0x100)); + PyDict_SetItemString(d,"wxSTC_MOD_CHANGEMARKER", PyInt_FromLong((long) 0x200)); + PyDict_SetItemString(d,"wxSTC_MOD_BEFOREINSERT", PyInt_FromLong((long) 0x400)); + PyDict_SetItemString(d,"wxSTC_MOD_BEFOREDELETE", PyInt_FromLong((long) 0x800)); + PyDict_SetItemString(d,"wxSTC_MODEVENTMASKALL", PyInt_FromLong((long) 0xF77)); + PyDict_SetItemString(d,"wxSTC_KEY_DOWN", PyInt_FromLong((long) 300)); + PyDict_SetItemString(d,"wxSTC_KEY_UP", PyInt_FromLong((long) 301)); + PyDict_SetItemString(d,"wxSTC_KEY_LEFT", PyInt_FromLong((long) 302)); + PyDict_SetItemString(d,"wxSTC_KEY_RIGHT", PyInt_FromLong((long) 303)); + PyDict_SetItemString(d,"wxSTC_KEY_HOME", PyInt_FromLong((long) 304)); + PyDict_SetItemString(d,"wxSTC_KEY_END", PyInt_FromLong((long) 305)); + PyDict_SetItemString(d,"wxSTC_KEY_PRIOR", PyInt_FromLong((long) 306)); + PyDict_SetItemString(d,"wxSTC_KEY_NEXT", PyInt_FromLong((long) 307)); + PyDict_SetItemString(d,"wxSTC_KEY_DELETE", PyInt_FromLong((long) 308)); + PyDict_SetItemString(d,"wxSTC_KEY_INSERT", PyInt_FromLong((long) 309)); + PyDict_SetItemString(d,"wxSTC_KEY_ESCAPE", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_KEY_BACK", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_KEY_TAB", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_KEY_RETURN", PyInt_FromLong((long) 13)); + PyDict_SetItemString(d,"wxSTC_KEY_ADD", PyInt_FromLong((long) 310)); + PyDict_SetItemString(d,"wxSTC_KEY_SUBTRACT", PyInt_FromLong((long) 311)); + PyDict_SetItemString(d,"wxSTC_KEY_DIVIDE", PyInt_FromLong((long) 312)); + PyDict_SetItemString(d,"wxSTC_SCMOD_SHIFT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_SCMOD_CTRL", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_SCMOD_ALT", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_LEX_CONTAINER", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_LEX_NULL", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_LEX_PYTHON", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_LEX_CPP", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_LEX_HTML", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_LEX_XML", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_LEX_PERL", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_LEX_SQL", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_LEX_VB", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_LEX_PROPERTIES", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_LEX_ERRORLIST", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_LEX_MAKEFILE", PyInt_FromLong((long) 11)); + PyDict_SetItemString(d,"wxSTC_LEX_BATCH", PyInt_FromLong((long) 12)); + PyDict_SetItemString(d,"wxSTC_LEX_XCODE", PyInt_FromLong((long) 13)); + PyDict_SetItemString(d,"wxSTC_LEX_LATEX", PyInt_FromLong((long) 14)); + PyDict_SetItemString(d,"wxSTC_LEX_LUA", PyInt_FromLong((long) 15)); + PyDict_SetItemString(d,"wxSTC_LEX_DIFF", PyInt_FromLong((long) 16)); + PyDict_SetItemString(d,"wxSTC_P_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_P_COMMENTLINE", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_P_NUMBER", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_P_STRING", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_P_CHARACTER", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_P_WORD", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_P_TRIPLE", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_P_TRIPLEDOUBLE", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_P_CLASSNAME", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_P_DEFNAME", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_P_OPERATOR", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_P_IDENTIFIER", PyInt_FromLong((long) 11)); + PyDict_SetItemString(d,"wxSTC_P_COMMENTBLOCK", PyInt_FromLong((long) 12)); + PyDict_SetItemString(d,"wxSTC_P_STRINGEOL", PyInt_FromLong((long) 13)); + PyDict_SetItemString(d,"wxSTC_C_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_C_COMMENT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_C_COMMENTLINE", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_C_COMMENTDOC", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_C_NUMBER", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_C_WORD", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_C_STRING", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_C_CHARACTER", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_C_UUID", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_C_PREPROCESSOR", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_C_OPERATOR", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_C_IDENTIFIER", PyInt_FromLong((long) 11)); + PyDict_SetItemString(d,"wxSTC_C_STRINGEOL", PyInt_FromLong((long) 12)); + PyDict_SetItemString(d,"wxSTC_C_VERBATIM", PyInt_FromLong((long) 13)); + PyDict_SetItemString(d,"wxSTC_H_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_H_TAG", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_H_TAGUNKNOWN", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_H_ATTRIBUTE", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_H_ATTRIBUTEUNKNOWN", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_H_NUMBER", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_H_DOUBLESTRING", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_H_SINGLESTRING", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_H_OTHER", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_H_COMMENT", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_H_ENTITY", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_H_TAGEND", PyInt_FromLong((long) 11)); + PyDict_SetItemString(d,"wxSTC_H_XMLSTART", PyInt_FromLong((long) 12)); + PyDict_SetItemString(d,"wxSTC_H_XMLEND", PyInt_FromLong((long) 13)); + PyDict_SetItemString(d,"wxSTC_H_SCRIPT", PyInt_FromLong((long) 14)); + PyDict_SetItemString(d,"wxSTC_H_ASP", PyInt_FromLong((long) 15)); + PyDict_SetItemString(d,"wxSTC_H_ASPAT", PyInt_FromLong((long) 16)); + PyDict_SetItemString(d,"wxSTC_H_CDATA", PyInt_FromLong((long) 17)); + PyDict_SetItemString(d,"wxSTC_H_QUESTION", PyInt_FromLong((long) 18)); + PyDict_SetItemString(d,"wxSTC_H_VALUE", PyInt_FromLong((long) 19)); + PyDict_SetItemString(d,"wxSTC_HJ_START", PyInt_FromLong((long) 40)); + PyDict_SetItemString(d,"wxSTC_HJ_DEFAULT", PyInt_FromLong((long) 41)); + PyDict_SetItemString(d,"wxSTC_HJ_COMMENT", PyInt_FromLong((long) 42)); + PyDict_SetItemString(d,"wxSTC_HJ_COMMENTLINE", PyInt_FromLong((long) 43)); + PyDict_SetItemString(d,"wxSTC_HJ_COMMENTDOC", PyInt_FromLong((long) 44)); + PyDict_SetItemString(d,"wxSTC_HJ_NUMBER", PyInt_FromLong((long) 45)); + PyDict_SetItemString(d,"wxSTC_HJ_WORD", PyInt_FromLong((long) 46)); + PyDict_SetItemString(d,"wxSTC_HJ_KEYWORD", PyInt_FromLong((long) 47)); + PyDict_SetItemString(d,"wxSTC_HJ_DOUBLESTRING", PyInt_FromLong((long) 48)); + PyDict_SetItemString(d,"wxSTC_HJ_SINGLESTRING", PyInt_FromLong((long) 49)); + PyDict_SetItemString(d,"wxSTC_HJ_SYMBOLS", PyInt_FromLong((long) 50)); + PyDict_SetItemString(d,"wxSTC_HJ_STRINGEOL", PyInt_FromLong((long) 51)); + PyDict_SetItemString(d,"wxSTC_HJA_START", PyInt_FromLong((long) 55)); + PyDict_SetItemString(d,"wxSTC_HJA_DEFAULT", PyInt_FromLong((long) 56)); + PyDict_SetItemString(d,"wxSTC_HJA_COMMENT", PyInt_FromLong((long) 57)); + PyDict_SetItemString(d,"wxSTC_HJA_COMMENTLINE", PyInt_FromLong((long) 58)); + PyDict_SetItemString(d,"wxSTC_HJA_COMMENTDOC", PyInt_FromLong((long) 59)); + PyDict_SetItemString(d,"wxSTC_HJA_NUMBER", PyInt_FromLong((long) 60)); + PyDict_SetItemString(d,"wxSTC_HJA_WORD", PyInt_FromLong((long) 61)); + PyDict_SetItemString(d,"wxSTC_HJA_KEYWORD", PyInt_FromLong((long) 62)); + PyDict_SetItemString(d,"wxSTC_HJA_DOUBLESTRING", PyInt_FromLong((long) 63)); + PyDict_SetItemString(d,"wxSTC_HJA_SINGLESTRING", PyInt_FromLong((long) 64)); + PyDict_SetItemString(d,"wxSTC_HJA_SYMBOLS", PyInt_FromLong((long) 65)); + PyDict_SetItemString(d,"wxSTC_HJA_STRINGEOL", PyInt_FromLong((long) 66)); + PyDict_SetItemString(d,"wxSTC_HB_START", PyInt_FromLong((long) 70)); + PyDict_SetItemString(d,"wxSTC_HB_DEFAULT", PyInt_FromLong((long) 71)); + PyDict_SetItemString(d,"wxSTC_HB_COMMENTLINE", PyInt_FromLong((long) 72)); + PyDict_SetItemString(d,"wxSTC_HB_NUMBER", PyInt_FromLong((long) 73)); + PyDict_SetItemString(d,"wxSTC_HB_WORD", PyInt_FromLong((long) 74)); + PyDict_SetItemString(d,"wxSTC_HB_STRING", PyInt_FromLong((long) 75)); + PyDict_SetItemString(d,"wxSTC_HB_IDENTIFIER", PyInt_FromLong((long) 76)); + PyDict_SetItemString(d,"wxSTC_HB_STRINGEOL", PyInt_FromLong((long) 77)); + PyDict_SetItemString(d,"wxSTC_HBA_START", PyInt_FromLong((long) 80)); + PyDict_SetItemString(d,"wxSTC_HBA_DEFAULT", PyInt_FromLong((long) 81)); + PyDict_SetItemString(d,"wxSTC_HBA_COMMENTLINE", PyInt_FromLong((long) 82)); + PyDict_SetItemString(d,"wxSTC_HBA_NUMBER", PyInt_FromLong((long) 83)); + PyDict_SetItemString(d,"wxSTC_HBA_WORD", PyInt_FromLong((long) 84)); + PyDict_SetItemString(d,"wxSTC_HBA_STRING", PyInt_FromLong((long) 85)); + PyDict_SetItemString(d,"wxSTC_HBA_IDENTIFIER", PyInt_FromLong((long) 86)); + PyDict_SetItemString(d,"wxSTC_HBA_STRINGEOL", PyInt_FromLong((long) 87)); + PyDict_SetItemString(d,"wxSTC_HP_START", PyInt_FromLong((long) 90)); + PyDict_SetItemString(d,"wxSTC_HP_DEFAULT", PyInt_FromLong((long) 91)); + PyDict_SetItemString(d,"wxSTC_HP_COMMENTLINE", PyInt_FromLong((long) 92)); + PyDict_SetItemString(d,"wxSTC_HP_NUMBER", PyInt_FromLong((long) 93)); + PyDict_SetItemString(d,"wxSTC_HP_STRING", PyInt_FromLong((long) 94)); + PyDict_SetItemString(d,"wxSTC_HP_CHARACTER", PyInt_FromLong((long) 95)); + PyDict_SetItemString(d,"wxSTC_HP_WORD", PyInt_FromLong((long) 96)); + PyDict_SetItemString(d,"wxSTC_HP_TRIPLE", PyInt_FromLong((long) 97)); + PyDict_SetItemString(d,"wxSTC_HP_TRIPLEDOUBLE", PyInt_FromLong((long) 98)); + PyDict_SetItemString(d,"wxSTC_HP_CLASSNAME", PyInt_FromLong((long) 99)); + PyDict_SetItemString(d,"wxSTC_HP_DEFNAME", PyInt_FromLong((long) 100)); + PyDict_SetItemString(d,"wxSTC_HP_OPERATOR", PyInt_FromLong((long) 101)); + PyDict_SetItemString(d,"wxSTC_HP_IDENTIFIER", PyInt_FromLong((long) 102)); + PyDict_SetItemString(d,"wxSTC_HPA_START", PyInt_FromLong((long) 105)); + PyDict_SetItemString(d,"wxSTC_HPA_DEFAULT", PyInt_FromLong((long) 106)); + PyDict_SetItemString(d,"wxSTC_HPA_COMMENTLINE", PyInt_FromLong((long) 107)); + PyDict_SetItemString(d,"wxSTC_HPA_NUMBER", PyInt_FromLong((long) 108)); + PyDict_SetItemString(d,"wxSTC_HPA_STRING", PyInt_FromLong((long) 109)); + PyDict_SetItemString(d,"wxSTC_HPA_CHARACTER", PyInt_FromLong((long) 110)); + PyDict_SetItemString(d,"wxSTC_HPA_WORD", PyInt_FromLong((long) 111)); + PyDict_SetItemString(d,"wxSTC_HPA_TRIPLE", PyInt_FromLong((long) 112)); + PyDict_SetItemString(d,"wxSTC_HPA_TRIPLEDOUBLE", PyInt_FromLong((long) 113)); + PyDict_SetItemString(d,"wxSTC_HPA_CLASSNAME", PyInt_FromLong((long) 114)); + PyDict_SetItemString(d,"wxSTC_HPA_DEFNAME", PyInt_FromLong((long) 115)); + PyDict_SetItemString(d,"wxSTC_HPA_OPERATOR", PyInt_FromLong((long) 116)); + PyDict_SetItemString(d,"wxSTC_HPA_IDENTIFIER", PyInt_FromLong((long) 117)); + PyDict_SetItemString(d,"wxSTC_HPHP_DEFAULT", PyInt_FromLong((long) 118)); + PyDict_SetItemString(d,"wxSTC_HPHP_HSTRING", PyInt_FromLong((long) 119)); + PyDict_SetItemString(d,"wxSTC_HPHP_SIMPLESTRING", PyInt_FromLong((long) 120)); + PyDict_SetItemString(d,"wxSTC_HPHP_WORD", PyInt_FromLong((long) 121)); + PyDict_SetItemString(d,"wxSTC_HPHP_NUMBER", PyInt_FromLong((long) 122)); + PyDict_SetItemString(d,"wxSTC_HPHP_VARIABLE", PyInt_FromLong((long) 123)); + PyDict_SetItemString(d,"wxSTC_HPHP_COMMENT", PyInt_FromLong((long) 124)); + PyDict_SetItemString(d,"wxSTC_HPHP_COMMENTLINE", PyInt_FromLong((long) 125)); + PyDict_SetItemString(d,"wxSTC_HPHP_STRINGEOL", PyInt_FromLong((long) 126)); + PyDict_SetItemString(d,"wxSTC_PL_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_PL_HERE", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_PL_COMMENTLINE", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_PL_POD", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_PL_NUMBER", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_PL_WORD", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_PL_STRING", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_PL_CHARACTER", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_PL_PUNCTUATION", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_PL_PREPROCESSOR", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_PL_OPERATOR", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_PL_IDENTIFIER", PyInt_FromLong((long) 11)); + PyDict_SetItemString(d,"wxSTC_PL_SCALAR", PyInt_FromLong((long) 12)); + PyDict_SetItemString(d,"wxSTC_PL_ARRAY", PyInt_FromLong((long) 13)); + PyDict_SetItemString(d,"wxSTC_PL_HASH", PyInt_FromLong((long) 14)); + PyDict_SetItemString(d,"wxSTC_PL_SYMBOLTABLE", PyInt_FromLong((long) 15)); + PyDict_SetItemString(d,"wxSTC_PL_REF", PyInt_FromLong((long) 16)); + PyDict_SetItemString(d,"wxSTC_PL_REGEX", PyInt_FromLong((long) 17)); + PyDict_SetItemString(d,"wxSTC_PL_REGSUBST", PyInt_FromLong((long) 18)); + PyDict_SetItemString(d,"wxSTC_PL_LONGQUOTE", PyInt_FromLong((long) 19)); + PyDict_SetItemString(d,"wxSTC_PL_BACKTICKS", PyInt_FromLong((long) 20)); + PyDict_SetItemString(d,"wxSTC_PL_DATASECTION", PyInt_FromLong((long) 21)); + PyDict_SetItemString(d,"wxSTC_L_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_L_COMMAND", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_L_TAG", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_L_MATH", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_L_COMMENT", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_LUA_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_LUA_COMMENT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_LUA_COMMENTLINE", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_LUA_COMMENTDOC", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_LUA_NUMBER", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_LUA_WORD", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_LUA_STRING", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_LUA_CHARACTER", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_LUA_LITERALSTRING", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_LUA_PREPROCESSOR", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_LUA_OPERATOR", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_LUA_IDENTIFIER", PyInt_FromLong((long) 11)); + PyDict_SetItemString(d,"wxSTC_LUA_STRINGEOL", PyInt_FromLong((long) 12)); + PyDict_SetItemString(d,"wxSTC_ERR_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_ERR_PYTHON", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_ERR_GCC", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_ERR_MS", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_ERR_CMD", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_ERR_BORLAND", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_ERR_PERL", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_MASK_FOLDERS", PyInt_FromLong((long) ((1<<(30))|(1<<(31))))); + PyDict_SetItemString(d,"wxSTCNameStr", PyString_FromString("wxSTCNameStr")); + PyDict_SetItemString(d,"wxEVT_STC_CHANGE", PyInt_FromLong((long) wxEVT_STC_CHANGE)); + PyDict_SetItemString(d,"wxEVT_STC_STYLENEEDED", PyInt_FromLong((long) wxEVT_STC_STYLENEEDED)); + PyDict_SetItemString(d,"wxEVT_STC_CHARADDED", PyInt_FromLong((long) wxEVT_STC_CHARADDED)); + PyDict_SetItemString(d,"wxEVT_STC_UPDATEUI", PyInt_FromLong((long) wxEVT_STC_UPDATEUI)); + PyDict_SetItemString(d,"wxEVT_STC_SAVEPOINTREACHED", PyInt_FromLong((long) wxEVT_STC_SAVEPOINTREACHED)); + PyDict_SetItemString(d,"wxEVT_STC_SAVEPOINTLEFT", PyInt_FromLong((long) wxEVT_STC_SAVEPOINTLEFT)); + PyDict_SetItemString(d,"wxEVT_STC_ROMODIFYATTEMPT", PyInt_FromLong((long) wxEVT_STC_ROMODIFYATTEMPT)); + PyDict_SetItemString(d,"wxEVT_STC_DOUBLECLICK", PyInt_FromLong((long) wxEVT_STC_DOUBLECLICK)); + PyDict_SetItemString(d,"wxEVT_STC_MODIFIED", PyInt_FromLong((long) wxEVT_STC_MODIFIED)); + PyDict_SetItemString(d,"wxEVT_STC_KEY", PyInt_FromLong((long) wxEVT_STC_KEY)); + PyDict_SetItemString(d,"wxEVT_STC_MACRORECORD", PyInt_FromLong((long) wxEVT_STC_MACRORECORD)); + PyDict_SetItemString(d,"wxEVT_STC_MARGINCLICK", PyInt_FromLong((long) wxEVT_STC_MARGINCLICK)); + PyDict_SetItemString(d,"wxEVT_STC_NEEDSHOWN", PyInt_FromLong((long) wxEVT_STC_NEEDSHOWN)); + PyDict_SetItemString(d,"wxEVT_STC_POSCHANGED", PyInt_FromLong((long) wxEVT_STC_POSCHANGED)); + + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/contrib/stc/stc_.i b/wxPython/contrib/stc/stc_.i new file mode 100644 index 0000000000..f3e877f24a --- /dev/null +++ b/wxPython/contrib/stc/stc_.i @@ -0,0 +1,104 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: stc.i +// Purpose: Wrappers for the wxStyledTextCtrl. +// +// Author: Robin Dunn +// +// Created: 12-Oct-1999 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module stc_ + + +%{ +#include "export.h" +#include "wx/stc/stc.h" +%} + +//--------------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +%extern wx.i +%extern windows.i +%extern _defs.i +%extern events.i +%extern controls.i + + +//---------------------------------------------------------------------- +// Get all our defs from the REAL header file. + +%include stc.h + +//---------------------------------------------------------------------- +// Python functions to act like the event macros + +%pragma(python) code = " +def EVT_STC_CHANGE(win, id, fn): + win.Connect(id, -1, wxEVT_STC_CHANGE, fn) + +def EVT_STC_STYLENEEDED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_STYLENEEDED, fn) + +def EVT_STC_CHARADDED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_CHARADDED, fn) + +def EVT_STC_UPDATEUI(win, id, fn): + win.Connect(id, -1, wxEVT_STC_UPDATEUI, fn) + +def EVT_STC_SAVEPOINTREACHED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_SAVEPOINTREACHED, fn) + +def EVT_STC_SAVEPOINTLEFT(win, id, fn): + win.Connect(id, -1, wxEVT_STC_SAVEPOINTLEFT, fn) + +def EVT_STC_ROMODIFYATTEMPT(win, id, fn): + win.Connect(id, -1, wxEVT_STC_ROMODIFYATTEMPT, fn) + +def EVT_STC_DOUBLECLICK(win, id, fn): + win.Connect(id, -1, wxEVT_STC_DOUBLECLICK, fn) + +def EVT_STC_MODIFIED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_MODIFIED, fn) + +def EVT_STC_KEY(win, id, fn): + win.Connect(id, -1, wxEVT_STC_KEY, fn) + +def EVT_STC_MACRORECORD(win, id, fn): + win.Connect(id, -1, wxEVT_STC_MACRORECORD, fn) + +def EVT_STC_MARGINCLICK(win, id, fn): + win.Connect(id, -1, wxEVT_STC_MARGINCLICK, fn) + +def EVT_STC_NEEDSHOWN(win, id, fn): + win.Connect(id, -1, wxEVT_STC_NEEDSHOWN, fn) + +def EVT_STC_POSCHANGED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_POSCHANGED, fn) + + +" + +//---------------------------------------------------------------------- + +%init %{ + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + +%} + + +//---------------------------------------------------------------------- + +%pragma(python) include="_stcextras.py"; + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- + + diff --git a/wxPython/contrib/stc/stc_.py b/wxPython/contrib/stc/stc_.py new file mode 100644 index 0000000000..b77cd7e8d0 --- /dev/null +++ b/wxPython/contrib/stc/stc_.py @@ -0,0 +1,1279 @@ +# This file was created automatically by SWIG. +import stc_c + +from misc import * + +from misc2 import * + +from windows import * + +from gdi import * + +from clip_dnd import * + +from events import * + +from streams import * + +from mdi import * + +from frames import * + +from stattool import * + +from controls import * + +from controls2 import * + +from windows2 import * + +from cmndlgs import * + +from windows3 import * + +from image import * + +from printfw import * + +from sizers import * + +from filesys import * + +from utils import * + +def EVT_STC_CHANGE(win, id, fn): + win.Connect(id, -1, wxEVT_STC_CHANGE, fn) + +def EVT_STC_STYLENEEDED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_STYLENEEDED, fn) + +def EVT_STC_CHARADDED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_CHARADDED, fn) + +def EVT_STC_UPDATEUI(win, id, fn): + win.Connect(id, -1, wxEVT_STC_UPDATEUI, fn) + +def EVT_STC_SAVEPOINTREACHED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_SAVEPOINTREACHED, fn) + +def EVT_STC_SAVEPOINTLEFT(win, id, fn): + win.Connect(id, -1, wxEVT_STC_SAVEPOINTLEFT, fn) + +def EVT_STC_ROMODIFYATTEMPT(win, id, fn): + win.Connect(id, -1, wxEVT_STC_ROMODIFYATTEMPT, fn) + +def EVT_STC_DOUBLECLICK(win, id, fn): + win.Connect(id, -1, wxEVT_STC_DOUBLECLICK, fn) + +def EVT_STC_MODIFIED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_MODIFIED, fn) + +def EVT_STC_KEY(win, id, fn): + win.Connect(id, -1, wxEVT_STC_KEY, fn) + +def EVT_STC_MACRORECORD(win, id, fn): + win.Connect(id, -1, wxEVT_STC_MACRORECORD, fn) + +def EVT_STC_MARGINCLICK(win, id, fn): + win.Connect(id, -1, wxEVT_STC_MARGINCLICK, fn) + +def EVT_STC_NEEDSHOWN(win, id, fn): + win.Connect(id, -1, wxEVT_STC_NEEDSHOWN, fn) + +def EVT_STC_POSCHANGED(win, id, fn): + win.Connect(id, -1, wxEVT_STC_POSCHANGED, fn) + + + +class wxStyledTextCtrlPtr(wxControlPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def AddText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AddText,(self,) + _args, _kwargs) + return val + def AddStyledText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AddStyledText,(self,) + _args, _kwargs) + return val + def InsertText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_InsertText,(self,) + _args, _kwargs) + return val + def ClearAll(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ClearAll,(self,) + _args, _kwargs) + return val + def ClearDocumentStyle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ClearDocumentStyle,(self,) + _args, _kwargs) + return val + def GetLength(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLength,(self,) + _args, _kwargs) + return val + def GetCharAt(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetCharAt,(self,) + _args, _kwargs) + return val + def GetCurrentPos(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetCurrentPos,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetAnchor,(self,) + _args, _kwargs) + return val + def GetStyleAt(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetStyleAt,(self,) + _args, _kwargs) + return val + def Redo(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_Redo,(self,) + _args, _kwargs) + return val + def SetUndoCollection(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetUndoCollection,(self,) + _args, _kwargs) + return val + def SelectAll(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SelectAll,(self,) + _args, _kwargs) + return val + def SetSavePoint(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetSavePoint,(self,) + _args, _kwargs) + return val + def GetStyledText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetStyledText,(self,) + _args, _kwargs) + return val + def CanRedo(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CanRedo,(self,) + _args, _kwargs) + return val + def MarkerLineFromHandle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerLineFromHandle,(self,) + _args, _kwargs) + return val + def MarkerDeleteHandle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerDeleteHandle,(self,) + _args, _kwargs) + return val + def GetUndoCollection(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetUndoCollection,(self,) + _args, _kwargs) + return val + def GetViewWhiteSpace(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetViewWhiteSpace,(self,) + _args, _kwargs) + return val + def SetViewWhiteSpace(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetViewWhiteSpace,(self,) + _args, _kwargs) + return val + def PositionFromPoint(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_PositionFromPoint,(self,) + _args, _kwargs) + return val + def GotoLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GotoLine,(self,) + _args, _kwargs) + return val + def GotoPos(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GotoPos,(self,) + _args, _kwargs) + return val + def SetAnchor(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetAnchor,(self,) + _args, _kwargs) + return val + def GetCurLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetCurLine,(self,) + _args, _kwargs) + return val + def GetEndStyled(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetEndStyled,(self,) + _args, _kwargs) + return val + def ConvertEOLs(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ConvertEOLs,(self,) + _args, _kwargs) + return val + def GetEOLMode(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetEOLMode,(self,) + _args, _kwargs) + return val + def SetEOLMode(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetEOLMode,(self,) + _args, _kwargs) + return val + def StartStyling(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StartStyling,(self,) + _args, _kwargs) + return val + def SetStyling(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetStyling,(self,) + _args, _kwargs) + return val + def GetBufferedDraw(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetBufferedDraw,(self,) + _args, _kwargs) + return val + def SetBufferedDraw(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetBufferedDraw,(self,) + _args, _kwargs) + return val + def SetTabWidth(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetTabWidth,(self,) + _args, _kwargs) + return val + def GetTabWidth(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetTabWidth,(self,) + _args, _kwargs) + return val + def SetCodePage(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetCodePage,(self,) + _args, _kwargs) + return val + def MarkerDefine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerDefine,(self,) + _args, _kwargs) + return val + def MarkerSetForeground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerSetForeground,(self,) + _args, _kwargs) + return val + def MarkerSetBackground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerSetBackground,(self,) + _args, _kwargs) + return val + def MarkerAdd(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerAdd,(self,) + _args, _kwargs) + return val + def MarkerDelete(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerDelete,(self,) + _args, _kwargs) + return val + def MarkerDeleteAll(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerDeleteAll,(self,) + _args, _kwargs) + return val + def MarkerGet(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerGet,(self,) + _args, _kwargs) + return val + def MarkerNext(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerNext,(self,) + _args, _kwargs) + return val + def MarkerPrevious(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_MarkerPrevious,(self,) + _args, _kwargs) + return val + def SetMarginType(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetMarginType,(self,) + _args, _kwargs) + return val + def GetMarginType(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetMarginType,(self,) + _args, _kwargs) + return val + def SetMarginWidth(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetMarginWidth,(self,) + _args, _kwargs) + return val + def GetMarginWidth(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetMarginWidth,(self,) + _args, _kwargs) + return val + def SetMarginMask(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetMarginMask,(self,) + _args, _kwargs) + return val + def GetMarginMask(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetMarginMask,(self,) + _args, _kwargs) + return val + def SetMarginSensitive(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetMarginSensitive,(self,) + _args, _kwargs) + return val + def GetMarginSensitive(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetMarginSensitive,(self,) + _args, _kwargs) + return val + def StyleClearAll(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleClearAll,(self,) + _args, _kwargs) + return val + def StyleSetForeground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetForeground,(self,) + _args, _kwargs) + return val + def StyleSetBackground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetBackground,(self,) + _args, _kwargs) + return val + def StyleSetBold(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetBold,(self,) + _args, _kwargs) + return val + def StyleSetItalic(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetItalic,(self,) + _args, _kwargs) + return val + def StyleSetSize(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetSize,(self,) + _args, _kwargs) + return val + def StyleSetFaceName(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetFaceName,(self,) + _args, _kwargs) + return val + def StyleSetEOLFilled(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetEOLFilled,(self,) + _args, _kwargs) + return val + def StyleResetDefault(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleResetDefault,(self,) + _args, _kwargs) + return val + def StyleSetUnderline(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetUnderline,(self,) + _args, _kwargs) + return val + def SetSelForeground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetSelForeground,(self,) + _args, _kwargs) + return val + def SetSelBackground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetSelBackground,(self,) + _args, _kwargs) + return val + def SetCaretForeground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetCaretForeground,(self,) + _args, _kwargs) + return val + def CmdKeyAssign(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CmdKeyAssign,(self,) + _args, _kwargs) + return val + def CmdKeyClear(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CmdKeyClear,(self,) + _args, _kwargs) + return val + def CmdKeyClearAll(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CmdKeyClearAll,(self,) + _args, _kwargs) + return val + def SetStyleBytes(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetStyleBytes,(self,) + _args, _kwargs) + return val + def StyleSetVisible(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetVisible,(self,) + _args, _kwargs) + return val + def GetCaretPeriod(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetCaretPeriod,(self,) + _args, _kwargs) + return val + def SetCaretPeriod(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetCaretPeriod,(self,) + _args, _kwargs) + return val + def SetWordChars(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetWordChars,(self,) + _args, _kwargs) + return val + def BeginUndoAction(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_BeginUndoAction,(self,) + _args, _kwargs) + return val + def EndUndoAction(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_EndUndoAction,(self,) + _args, _kwargs) + return val + def IndicatorSetStyle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_IndicatorSetStyle,(self,) + _args, _kwargs) + return val + def IndicatorGetStyle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_IndicatorGetStyle,(self,) + _args, _kwargs) + return val + def IndicatorSetForeground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_IndicatorSetForeground,(self,) + _args, _kwargs) + return val + def IndicatorGetForeground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_IndicatorGetForeground,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetStyleBits(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetStyleBits,(self,) + _args, _kwargs) + return val + def GetStyleBits(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetStyleBits,(self,) + _args, _kwargs) + return val + def SetLineState(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetLineState,(self,) + _args, _kwargs) + return val + def GetLineState(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLineState,(self,) + _args, _kwargs) + return val + def GetMaxLineState(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetMaxLineState,(self,) + _args, _kwargs) + return val + def AutoCompShow(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompShow,(self,) + _args, _kwargs) + return val + def AutoCompCancel(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompCancel,(self,) + _args, _kwargs) + return val + def AutoCompActive(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompActive,(self,) + _args, _kwargs) + return val + def AutoCompPosStart(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompPosStart,(self,) + _args, _kwargs) + return val + def AutoCompComplete(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompComplete,(self,) + _args, _kwargs) + return val + def AutoCompStops(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompStops,(self,) + _args, _kwargs) + return val + def AutoCompSetSeparator(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompSetSeparator,(self,) + _args, _kwargs) + return val + def AutoCompGetSeparator(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompGetSeparator,(self,) + _args, _kwargs) + return val + def AutoCompSelect(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompSelect,(self,) + _args, _kwargs) + return val + def AutoCompSetCancelAtStart(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompSetCancelAtStart,(self,) + _args, _kwargs) + return val + def AutoCompGetCancelAtStart(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompGetCancelAtStart,(self,) + _args, _kwargs) + return val + def AutoCompSetFillUps(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompSetFillUps,(self,) + _args, _kwargs) + return val + def AutoCompSetChooseSingle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompSetChooseSingle,(self,) + _args, _kwargs) + return val + def AutoCompGetChooseSingle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompGetChooseSingle,(self,) + _args, _kwargs) + return val + def AutoCompSetIgnoreCase(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompSetIgnoreCase,(self,) + _args, _kwargs) + return val + def AutoCompGetIgnoreCase(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AutoCompGetIgnoreCase,(self,) + _args, _kwargs) + return val + def SetIndent(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetIndent,(self,) + _args, _kwargs) + return val + def GetIndent(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetIndent,(self,) + _args, _kwargs) + return val + def SetUseTabs(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetUseTabs,(self,) + _args, _kwargs) + return val + def GetUseTabs(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetUseTabs,(self,) + _args, _kwargs) + return val + def SetLineIndentation(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetLineIndentation,(self,) + _args, _kwargs) + return val + def GetLineIndentation(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLineIndentation,(self,) + _args, _kwargs) + return val + def GetLineIndentPosition(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLineIndentPosition,(self,) + _args, _kwargs) + return val + def GetColumn(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetColumn,(self,) + _args, _kwargs) + return val + def SetUseHorizontalScrollBar(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetUseHorizontalScrollBar,(self,) + _args, _kwargs) + return val + def GetUseHorizontalScrollBar(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetUseHorizontalScrollBar,(self,) + _args, _kwargs) + return val + def SetIndentationGuides(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetIndentationGuides,(self,) + _args, _kwargs) + return val + def GetIndentationGuides(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetIndentationGuides,(self,) + _args, _kwargs) + return val + def SetHighlightGuide(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetHighlightGuide,(self,) + _args, _kwargs) + return val + def GetHighlightGuide(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetHighlightGuide,(self,) + _args, _kwargs) + return val + def GetLineEndPosition(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLineEndPosition,(self,) + _args, _kwargs) + return val + def GetCodePage(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetCodePage,(self,) + _args, _kwargs) + return val + def GetCaretForeground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetCaretForeground,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetReadOnly(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetReadOnly,(self,) + _args, _kwargs) + return val + def SetCurrentPos(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetCurrentPos,(self,) + _args, _kwargs) + return val + def SetSelectionStart(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetSelectionStart,(self,) + _args, _kwargs) + return val + def GetSelectionStart(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetSelectionStart,(self,) + _args, _kwargs) + return val + def SetSelectionEnd(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetSelectionEnd,(self,) + _args, _kwargs) + return val + def GetSelectionEnd(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetSelectionEnd,(self,) + _args, _kwargs) + return val + def SetPrintMagnification(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetPrintMagnification,(self,) + _args, _kwargs) + return val + def GetPrintMagnification(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetPrintMagnification,(self,) + _args, _kwargs) + return val + def SetPrintColourMode(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetPrintColourMode,(self,) + _args, _kwargs) + return val + def GetPrintColourMode(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetPrintColourMode,(self,) + _args, _kwargs) + return val + def FindText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_FindText,(self,) + _args, _kwargs) + return val + def FormatRange(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_FormatRange,(self,) + _args, _kwargs) + return val + def GetFirstVisibleLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetFirstVisibleLine,(self,) + _args, _kwargs) + return val + def GetLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLine,(self,) + _args, _kwargs) + return val + def GetLineCount(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLineCount,(self,) + _args, _kwargs) + return val + def SetMarginLeft(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetMarginLeft,(self,) + _args, _kwargs) + return val + def GetMarginLeft(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetMarginLeft,(self,) + _args, _kwargs) + return val + def SetMarginRight(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetMarginRight,(self,) + _args, _kwargs) + return val + def GetMarginRight(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetMarginRight,(self,) + _args, _kwargs) + return val + def GetModify(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetModify,(self,) + _args, _kwargs) + return val + def SetSelection(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetSelection,(self,) + _args, _kwargs) + return val + def GetSelectedText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetSelectedText,(self,) + _args, _kwargs) + return val + def GetTextRange(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetTextRange,(self,) + _args, _kwargs) + return val + def HideSelection(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_HideSelection,(self,) + _args, _kwargs) + return val + def LineFromPosition(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_LineFromPosition,(self,) + _args, _kwargs) + return val + def PositionFromLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_PositionFromLine,(self,) + _args, _kwargs) + return val + def LineScroll(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_LineScroll,(self,) + _args, _kwargs) + return val + def EnsureCaretVisible(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_EnsureCaretVisible,(self,) + _args, _kwargs) + return val + def ReplaceSelection(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ReplaceSelection,(self,) + _args, _kwargs) + return val + def SetReadOnly(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetReadOnly,(self,) + _args, _kwargs) + return val + def CanPaste(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CanPaste,(self,) + _args, _kwargs) + return val + def CanUndo(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CanUndo,(self,) + _args, _kwargs) + return val + def EmptyUndoBuffer(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_EmptyUndoBuffer,(self,) + _args, _kwargs) + return val + def Undo(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_Undo,(self,) + _args, _kwargs) + return val + def Cut(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_Cut,(self,) + _args, _kwargs) + return val + def Copy(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_Copy,(self,) + _args, _kwargs) + return val + def Paste(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_Paste,(self,) + _args, _kwargs) + return val + def Clear(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_Clear,(self,) + _args, _kwargs) + return val + def SetText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetText,(self,) + _args, _kwargs) + return val + def GetText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetText,(self,) + _args, _kwargs) + return val + def GetTextLength(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetTextLength,(self,) + _args, _kwargs) + return val + def SetOvertype(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetOvertype,(self,) + _args, _kwargs) + return val + def GetOvertype(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetOvertype,(self,) + _args, _kwargs) + return val + def CallTipShow(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CallTipShow,(self,) + _args, _kwargs) + return val + def CallTipCancel(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CallTipCancel,(self,) + _args, _kwargs) + return val + def CallTipActive(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CallTipActive,(self,) + _args, _kwargs) + return val + def CallTipPosAtStart(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CallTipPosAtStart,(self,) + _args, _kwargs) + return val + def CallTipSetHighlight(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CallTipSetHighlight,(self,) + _args, _kwargs) + return val + def CallTipSetBackground(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CallTipSetBackground,(self,) + _args, _kwargs) + return val + def VisibleFromDocLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_VisibleFromDocLine,(self,) + _args, _kwargs) + return val + def DocLineFromVisible(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_DocLineFromVisible,(self,) + _args, _kwargs) + return val + def SetFoldLevel(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetFoldLevel,(self,) + _args, _kwargs) + return val + def GetFoldLevel(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetFoldLevel,(self,) + _args, _kwargs) + return val + def GetLastChild(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLastChild,(self,) + _args, _kwargs) + return val + def GetFoldParent(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetFoldParent,(self,) + _args, _kwargs) + return val + def ShowLines(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ShowLines,(self,) + _args, _kwargs) + return val + def HideLines(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_HideLines,(self,) + _args, _kwargs) + return val + def GetLineVisible(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLineVisible,(self,) + _args, _kwargs) + return val + def SetFoldExpanded(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetFoldExpanded,(self,) + _args, _kwargs) + return val + def GetFoldExpanded(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetFoldExpanded,(self,) + _args, _kwargs) + return val + def ToggleFold(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ToggleFold,(self,) + _args, _kwargs) + return val + def EnsureVisible(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_EnsureVisible,(self,) + _args, _kwargs) + return val + def SetFoldFlags(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetFoldFlags,(self,) + _args, _kwargs) + return val + def LineLength(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_LineLength,(self,) + _args, _kwargs) + return val + def BraceHighlight(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_BraceHighlight,(self,) + _args, _kwargs) + return val + def BraceBadLight(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_BraceBadLight,(self,) + _args, _kwargs) + return val + def BraceMatch(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_BraceMatch,(self,) + _args, _kwargs) + return val + def GetViewEOL(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetViewEOL,(self,) + _args, _kwargs) + return val + def SetViewEOL(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetViewEOL,(self,) + _args, _kwargs) + return val + def GetDocPointer(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetDocPointer,(self,) + _args, _kwargs) + return val + def SetDocPointer(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetDocPointer,(self,) + _args, _kwargs) + return val + def SetModEventMask(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetModEventMask,(self,) + _args, _kwargs) + return val + def GetEdgeColumn(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetEdgeColumn,(self,) + _args, _kwargs) + return val + def SetEdgeColumn(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetEdgeColumn,(self,) + _args, _kwargs) + return val + def GetEdgeMode(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetEdgeMode,(self,) + _args, _kwargs) + return val + def SetEdgeMode(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetEdgeMode,(self,) + _args, _kwargs) + return val + def GetEdgeColour(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetEdgeColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetEdgeColour(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetEdgeColour,(self,) + _args, _kwargs) + return val + def SearchAnchor(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SearchAnchor,(self,) + _args, _kwargs) + return val + def SearchNext(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SearchNext,(self,) + _args, _kwargs) + return val + def SearchPrev(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SearchPrev,(self,) + _args, _kwargs) + return val + def SetCaretPolicy(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetCaretPolicy,(self,) + _args, _kwargs) + return val + def LinesOnScreen(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_LinesOnScreen,(self,) + _args, _kwargs) + return val + def UsePopUp(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_UsePopUp,(self,) + _args, _kwargs) + return val + def SelectionIsRectangle(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SelectionIsRectangle,(self,) + _args, _kwargs) + return val + def SetZoom(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetZoom,(self,) + _args, _kwargs) + return val + def GetZoom(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetZoom,(self,) + _args, _kwargs) + return val + def CreateDocument(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CreateDocument,(self,) + _args, _kwargs) + return val + def AddRefDocument(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_AddRefDocument,(self,) + _args, _kwargs) + return val + def ReleaseDocument(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ReleaseDocument,(self,) + _args, _kwargs) + return val + def GetModEventMask(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetModEventMask,(self,) + _args, _kwargs) + return val + def StartRecord(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StartRecord,(self,) + _args, _kwargs) + return val + def StopRecord(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StopRecord,(self,) + _args, _kwargs) + return val + def SetLexer(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetLexer,(self,) + _args, _kwargs) + return val + def GetLexer(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetLexer,(self,) + _args, _kwargs) + return val + def Colourise(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_Colourise,(self,) + _args, _kwargs) + return val + def SetProperty(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetProperty,(self,) + _args, _kwargs) + return val + def SetKeyWords(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetKeyWords,(self,) + _args, _kwargs) + return val + def GetCurrentLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetCurrentLine,(self,) + _args, _kwargs) + return val + def StyleSetSpec(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetSpec,(self,) + _args, _kwargs) + return val + def StyleSetFont(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetFont,(self,) + _args, _kwargs) + return val + def StyleSetFontAttr(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_StyleSetFontAttr,(self,) + _args, _kwargs) + return val + def CmdKeyExecute(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_CmdKeyExecute,(self,) + _args, _kwargs) + return val + def SetMargins(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_SetMargins,(self,) + _args, _kwargs) + return val + def GetSelection(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_GetSelection,(self,) + _args, _kwargs) + return val + def PointFromPosition(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_PointFromPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def ScrollToLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ScrollToLine,(self,) + _args, _kwargs) + return val + def ScrollToColumn(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextCtrl_ScrollToColumn,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxStyledTextCtrl(wxStyledTextCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(stc_c.new_wxStyledTextCtrl,_args,_kwargs) + self.thisown = 1 + + + + +class wxStyledTextEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,stc_c=stc_c): + if self.thisown == 1 : + stc_c.delete_wxStyledTextEvent(self) + def SetPosition(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetPosition,(self,) + _args, _kwargs) + return val + def SetKey(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetKey,(self,) + _args, _kwargs) + return val + def SetModifiers(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetModifiers,(self,) + _args, _kwargs) + return val + def SetModificationType(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetModificationType,(self,) + _args, _kwargs) + return val + def SetText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetText,(self,) + _args, _kwargs) + return val + def SetLength(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetLength,(self,) + _args, _kwargs) + return val + def SetLinesAdded(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetLinesAdded,(self,) + _args, _kwargs) + return val + def SetLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetLine,(self,) + _args, _kwargs) + return val + def SetFoldLevelNow(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetFoldLevelNow,(self,) + _args, _kwargs) + return val + def SetFoldLevelPrev(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetFoldLevelPrev,(self,) + _args, _kwargs) + return val + def SetMargin(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetMargin,(self,) + _args, _kwargs) + return val + def SetMessage(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetMessage,(self,) + _args, _kwargs) + return val + def SetWParam(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetWParam,(self,) + _args, _kwargs) + return val + def SetLParam(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_SetLParam,(self,) + _args, _kwargs) + return val + def GetPosition(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetPosition,(self,) + _args, _kwargs) + return val + def GetKey(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetKey,(self,) + _args, _kwargs) + return val + def GetModifiers(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetModifiers,(self,) + _args, _kwargs) + return val + def GetModificationType(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetModificationType,(self,) + _args, _kwargs) + return val + def GetText(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetText,(self,) + _args, _kwargs) + return val + def GetLength(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetLength,(self,) + _args, _kwargs) + return val + def GetLinesAdded(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetLinesAdded,(self,) + _args, _kwargs) + return val + def GetLine(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetLine,(self,) + _args, _kwargs) + return val + def GetFoldLevelNow(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetFoldLevelNow,(self,) + _args, _kwargs) + return val + def GetFoldLevelPrev(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetFoldLevelPrev,(self,) + _args, _kwargs) + return val + def GetMargin(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetMargin,(self,) + _args, _kwargs) + return val + def GetMessage(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetMessage,(self,) + _args, _kwargs) + return val + def GetWParam(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetWParam,(self,) + _args, _kwargs) + return val + def GetLParam(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetLParam,(self,) + _args, _kwargs) + return val + def GetShift(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetShift,(self,) + _args, _kwargs) + return val + def GetControl(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetControl,(self,) + _args, _kwargs) + return val + def GetAlt(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_GetAlt,(self,) + _args, _kwargs) + return val + def CopyObject(self, *_args, **_kwargs): + val = apply(stc_c.wxStyledTextEvent_CopyObject,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxStyledTextEvent(wxStyledTextEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(stc_c.new_wxStyledTextEvent,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxSTC_INVALID_POSITION = stc_c.wxSTC_INVALID_POSITION +wxSTC_START = stc_c.wxSTC_START +wxSTC_OPTIONAL_START = stc_c.wxSTC_OPTIONAL_START +wxSTC_LEXER_START = stc_c.wxSTC_LEXER_START +wxSTC_CMD_REDO = stc_c.wxSTC_CMD_REDO +wxSTC_CMD_SELECTALL = stc_c.wxSTC_CMD_SELECTALL +wxSTC_WS_INVISIBLE = stc_c.wxSTC_WS_INVISIBLE +wxSTC_WS_VISIBLEALWAYS = stc_c.wxSTC_WS_VISIBLEALWAYS +wxSTC_WS_VISIBLEAFTERINDENT = stc_c.wxSTC_WS_VISIBLEAFTERINDENT +wxSTC_EOL_CRLF = stc_c.wxSTC_EOL_CRLF +wxSTC_EOL_CR = stc_c.wxSTC_EOL_CR +wxSTC_EOL_LF = stc_c.wxSTC_EOL_LF +wxSTC_CP_UTF8 = stc_c.wxSTC_CP_UTF8 +wxSTC_MARKER_MAX = stc_c.wxSTC_MARKER_MAX +wxSTC_MARK_CIRCLE = stc_c.wxSTC_MARK_CIRCLE +wxSTC_MARK_ROUNDRECT = stc_c.wxSTC_MARK_ROUNDRECT +wxSTC_MARK_ARROW = stc_c.wxSTC_MARK_ARROW +wxSTC_MARK_SMALLRECT = stc_c.wxSTC_MARK_SMALLRECT +wxSTC_MARK_SHORTARROW = stc_c.wxSTC_MARK_SHORTARROW +wxSTC_MARK_EMPTY = stc_c.wxSTC_MARK_EMPTY +wxSTC_MARK_ARROWDOWN = stc_c.wxSTC_MARK_ARROWDOWN +wxSTC_MARK_MINUS = stc_c.wxSTC_MARK_MINUS +wxSTC_MARK_PLUS = stc_c.wxSTC_MARK_PLUS +wxSTC_MARKNUM_FOLDER = stc_c.wxSTC_MARKNUM_FOLDER +wxSTC_MARKNUM_FOLDEROPEN = stc_c.wxSTC_MARKNUM_FOLDEROPEN +wxSTC_MARGIN_SYMBOL = stc_c.wxSTC_MARGIN_SYMBOL +wxSTC_MARGIN_NUMBER = stc_c.wxSTC_MARGIN_NUMBER +wxSTC_STYLE_DEFAULT = stc_c.wxSTC_STYLE_DEFAULT +wxSTC_STYLE_LINENUMBER = stc_c.wxSTC_STYLE_LINENUMBER +wxSTC_STYLE_BRACELIGHT = stc_c.wxSTC_STYLE_BRACELIGHT +wxSTC_STYLE_BRACEBAD = stc_c.wxSTC_STYLE_BRACEBAD +wxSTC_STYLE_CONTROLCHAR = stc_c.wxSTC_STYLE_CONTROLCHAR +wxSTC_STYLE_INDENTGUIDE = stc_c.wxSTC_STYLE_INDENTGUIDE +wxSTC_STYLE_MAX = stc_c.wxSTC_STYLE_MAX +wxSTC_CHARSET_ANSI = stc_c.wxSTC_CHARSET_ANSI +wxSTC_CHARSET_DEFAULT = stc_c.wxSTC_CHARSET_DEFAULT +wxSTC_CHARSET_BALTIC = stc_c.wxSTC_CHARSET_BALTIC +wxSTC_CHARSET_CHINESEBIG5 = stc_c.wxSTC_CHARSET_CHINESEBIG5 +wxSTC_CHARSET_EASTEUROPE = stc_c.wxSTC_CHARSET_EASTEUROPE +wxSTC_CHARSET_GB2312 = stc_c.wxSTC_CHARSET_GB2312 +wxSTC_CHARSET_GREEK = stc_c.wxSTC_CHARSET_GREEK +wxSTC_CHARSET_HANGUL = stc_c.wxSTC_CHARSET_HANGUL +wxSTC_CHARSET_MAC = stc_c.wxSTC_CHARSET_MAC +wxSTC_CHARSET_OEM = stc_c.wxSTC_CHARSET_OEM +wxSTC_CHARSET_RUSSIAN = stc_c.wxSTC_CHARSET_RUSSIAN +wxSTC_CHARSET_SHIFTJIS = stc_c.wxSTC_CHARSET_SHIFTJIS +wxSTC_CHARSET_SYMBOL = stc_c.wxSTC_CHARSET_SYMBOL +wxSTC_CHARSET_TURKISH = stc_c.wxSTC_CHARSET_TURKISH +wxSTC_CHARSET_JOHAB = stc_c.wxSTC_CHARSET_JOHAB +wxSTC_CHARSET_HEBREW = stc_c.wxSTC_CHARSET_HEBREW +wxSTC_CHARSET_ARABIC = stc_c.wxSTC_CHARSET_ARABIC +wxSTC_CHARSET_VIETNAMESE = stc_c.wxSTC_CHARSET_VIETNAMESE +wxSTC_CHARSET_THAI = stc_c.wxSTC_CHARSET_THAI +wxSTC_INDIC_MAX = stc_c.wxSTC_INDIC_MAX +wxSTC_INDIC_PLAIN = stc_c.wxSTC_INDIC_PLAIN +wxSTC_INDIC_SQUIGGLE = stc_c.wxSTC_INDIC_SQUIGGLE +wxSTC_INDIC_TT = stc_c.wxSTC_INDIC_TT +wxSTC_INDIC_DIAGONAL = stc_c.wxSTC_INDIC_DIAGONAL +wxSTC_INDIC_STRIKE = stc_c.wxSTC_INDIC_STRIKE +wxSTC_INDIC0_MASK = stc_c.wxSTC_INDIC0_MASK +wxSTC_INDIC1_MASK = stc_c.wxSTC_INDIC1_MASK +wxSTC_INDIC2_MASK = stc_c.wxSTC_INDIC2_MASK +wxSTC_INDICS_MASK = stc_c.wxSTC_INDICS_MASK +wxSTC_PRINT_NORMAL = stc_c.wxSTC_PRINT_NORMAL +wxSTC_PRINT_INVERTLIGHT = stc_c.wxSTC_PRINT_INVERTLIGHT +wxSTC_PRINT_BLACKONWHITE = stc_c.wxSTC_PRINT_BLACKONWHITE +wxSTC_FIND_DOWN = stc_c.wxSTC_FIND_DOWN +wxSTC_FIND_WHOLEWORD = stc_c.wxSTC_FIND_WHOLEWORD +wxSTC_FIND_MATCHCASE = stc_c.wxSTC_FIND_MATCHCASE +wxSTC_FIND_WORDSTART = stc_c.wxSTC_FIND_WORDSTART +wxSTC_FIND_REGEXP = stc_c.wxSTC_FIND_REGEXP +wxSTC_CMD_UNDO = stc_c.wxSTC_CMD_UNDO +wxSTC_CMD_CUT = stc_c.wxSTC_CMD_CUT +wxSTC_CMD_COPY = stc_c.wxSTC_CMD_COPY +wxSTC_CMD_PASTE = stc_c.wxSTC_CMD_PASTE +wxSTC_FOLDLEVELBASE = stc_c.wxSTC_FOLDLEVELBASE +wxSTC_FOLDLEVELWHITEFLAG = stc_c.wxSTC_FOLDLEVELWHITEFLAG +wxSTC_FOLDLEVELHEADERFLAG = stc_c.wxSTC_FOLDLEVELHEADERFLAG +wxSTC_FOLDLEVELNUMBERMASK = stc_c.wxSTC_FOLDLEVELNUMBERMASK +wxSTC_CMD_LINEDOWN = stc_c.wxSTC_CMD_LINEDOWN +wxSTC_CMD_LINEDOWNEXTEND = stc_c.wxSTC_CMD_LINEDOWNEXTEND +wxSTC_CMD_LINEUP = stc_c.wxSTC_CMD_LINEUP +wxSTC_CMD_LINEUPEXTEND = stc_c.wxSTC_CMD_LINEUPEXTEND +wxSTC_CMD_CHARLEFT = stc_c.wxSTC_CMD_CHARLEFT +wxSTC_CMD_CHARLEFTEXTEND = stc_c.wxSTC_CMD_CHARLEFTEXTEND +wxSTC_CMD_CHARRIGHT = stc_c.wxSTC_CMD_CHARRIGHT +wxSTC_CMD_CHARRIGHTEXTEND = stc_c.wxSTC_CMD_CHARRIGHTEXTEND +wxSTC_CMD_WORDLEFT = stc_c.wxSTC_CMD_WORDLEFT +wxSTC_CMD_WORDLEFTEXTEND = stc_c.wxSTC_CMD_WORDLEFTEXTEND +wxSTC_CMD_WORDRIGHT = stc_c.wxSTC_CMD_WORDRIGHT +wxSTC_CMD_WORDRIGHTEXTEND = stc_c.wxSTC_CMD_WORDRIGHTEXTEND +wxSTC_CMD_HOME = stc_c.wxSTC_CMD_HOME +wxSTC_CMD_HOMEEXTEND = stc_c.wxSTC_CMD_HOMEEXTEND +wxSTC_CMD_LINEEND = stc_c.wxSTC_CMD_LINEEND +wxSTC_CMD_LINEENDEXTEND = stc_c.wxSTC_CMD_LINEENDEXTEND +wxSTC_CMD_DOCUMENTSTART = stc_c.wxSTC_CMD_DOCUMENTSTART +wxSTC_CMD_DOCUMENTSTARTEXTEND = stc_c.wxSTC_CMD_DOCUMENTSTARTEXTEND +wxSTC_CMD_DOCUMENTEND = stc_c.wxSTC_CMD_DOCUMENTEND +wxSTC_CMD_DOCUMENTENDEXTEND = stc_c.wxSTC_CMD_DOCUMENTENDEXTEND +wxSTC_CMD_PAGEUP = stc_c.wxSTC_CMD_PAGEUP +wxSTC_CMD_PAGEUPEXTEND = stc_c.wxSTC_CMD_PAGEUPEXTEND +wxSTC_CMD_PAGEDOWN = stc_c.wxSTC_CMD_PAGEDOWN +wxSTC_CMD_PAGEDOWNEXTEND = stc_c.wxSTC_CMD_PAGEDOWNEXTEND +wxSTC_CMD_EDITTOGGLEOVERTYPE = stc_c.wxSTC_CMD_EDITTOGGLEOVERTYPE +wxSTC_CMD_CANCEL = stc_c.wxSTC_CMD_CANCEL +wxSTC_CMD_DELETEBACK = stc_c.wxSTC_CMD_DELETEBACK +wxSTC_CMD_TAB = stc_c.wxSTC_CMD_TAB +wxSTC_CMD_BACKTAB = stc_c.wxSTC_CMD_BACKTAB +wxSTC_CMD_NEWLINE = stc_c.wxSTC_CMD_NEWLINE +wxSTC_CMD_FORMFEED = stc_c.wxSTC_CMD_FORMFEED +wxSTC_CMD_VCHOME = stc_c.wxSTC_CMD_VCHOME +wxSTC_CMD_VCHOMEEXTEND = stc_c.wxSTC_CMD_VCHOMEEXTEND +wxSTC_CMD_ZOOMIN = stc_c.wxSTC_CMD_ZOOMIN +wxSTC_CMD_ZOOMOUT = stc_c.wxSTC_CMD_ZOOMOUT +wxSTC_CMD_DELWORDLEFT = stc_c.wxSTC_CMD_DELWORDLEFT +wxSTC_CMD_DELWORDRIGHT = stc_c.wxSTC_CMD_DELWORDRIGHT +wxSTC_CMD_LINECUT = stc_c.wxSTC_CMD_LINECUT +wxSTC_CMD_LINEDELETE = stc_c.wxSTC_CMD_LINEDELETE +wxSTC_CMD_LINETRANSPOSE = stc_c.wxSTC_CMD_LINETRANSPOSE +wxSTC_CMD_LOWERCASE = stc_c.wxSTC_CMD_LOWERCASE +wxSTC_CMD_UPPERCASE = stc_c.wxSTC_CMD_UPPERCASE +wxSTC_CMD_LINESCROLLDOWN = stc_c.wxSTC_CMD_LINESCROLLDOWN +wxSTC_CMD_LINESCROLLUP = stc_c.wxSTC_CMD_LINESCROLLUP +wxSTC_EDGE_NONE = stc_c.wxSTC_EDGE_NONE +wxSTC_EDGE_LINE = stc_c.wxSTC_EDGE_LINE +wxSTC_EDGE_BACKGROUND = stc_c.wxSTC_EDGE_BACKGROUND +wxSTC_CARET_SLOP = stc_c.wxSTC_CARET_SLOP +wxSTC_CARET_CENTER = stc_c.wxSTC_CARET_CENTER +wxSTC_CARET_STRICT = stc_c.wxSTC_CARET_STRICT +wxSTC_MOD_INSERTTEXT = stc_c.wxSTC_MOD_INSERTTEXT +wxSTC_MOD_DELETETEXT = stc_c.wxSTC_MOD_DELETETEXT +wxSTC_MOD_CHANGESTYLE = stc_c.wxSTC_MOD_CHANGESTYLE +wxSTC_MOD_CHANGEFOLD = stc_c.wxSTC_MOD_CHANGEFOLD +wxSTC_PERFORMED_USER = stc_c.wxSTC_PERFORMED_USER +wxSTC_PERFORMED_UNDO = stc_c.wxSTC_PERFORMED_UNDO +wxSTC_PERFORMED_REDO = stc_c.wxSTC_PERFORMED_REDO +wxSTC_LASTSTEPINUNDOREDO = stc_c.wxSTC_LASTSTEPINUNDOREDO +wxSTC_MOD_CHANGEMARKER = stc_c.wxSTC_MOD_CHANGEMARKER +wxSTC_MOD_BEFOREINSERT = stc_c.wxSTC_MOD_BEFOREINSERT +wxSTC_MOD_BEFOREDELETE = stc_c.wxSTC_MOD_BEFOREDELETE +wxSTC_MODEVENTMASKALL = stc_c.wxSTC_MODEVENTMASKALL +wxSTC_KEY_DOWN = stc_c.wxSTC_KEY_DOWN +wxSTC_KEY_UP = stc_c.wxSTC_KEY_UP +wxSTC_KEY_LEFT = stc_c.wxSTC_KEY_LEFT +wxSTC_KEY_RIGHT = stc_c.wxSTC_KEY_RIGHT +wxSTC_KEY_HOME = stc_c.wxSTC_KEY_HOME +wxSTC_KEY_END = stc_c.wxSTC_KEY_END +wxSTC_KEY_PRIOR = stc_c.wxSTC_KEY_PRIOR +wxSTC_KEY_NEXT = stc_c.wxSTC_KEY_NEXT +wxSTC_KEY_DELETE = stc_c.wxSTC_KEY_DELETE +wxSTC_KEY_INSERT = stc_c.wxSTC_KEY_INSERT +wxSTC_KEY_ESCAPE = stc_c.wxSTC_KEY_ESCAPE +wxSTC_KEY_BACK = stc_c.wxSTC_KEY_BACK +wxSTC_KEY_TAB = stc_c.wxSTC_KEY_TAB +wxSTC_KEY_RETURN = stc_c.wxSTC_KEY_RETURN +wxSTC_KEY_ADD = stc_c.wxSTC_KEY_ADD +wxSTC_KEY_SUBTRACT = stc_c.wxSTC_KEY_SUBTRACT +wxSTC_KEY_DIVIDE = stc_c.wxSTC_KEY_DIVIDE +wxSTC_SCMOD_SHIFT = stc_c.wxSTC_SCMOD_SHIFT +wxSTC_SCMOD_CTRL = stc_c.wxSTC_SCMOD_CTRL +wxSTC_SCMOD_ALT = stc_c.wxSTC_SCMOD_ALT +wxSTC_LEX_CONTAINER = stc_c.wxSTC_LEX_CONTAINER +wxSTC_LEX_NULL = stc_c.wxSTC_LEX_NULL +wxSTC_LEX_PYTHON = stc_c.wxSTC_LEX_PYTHON +wxSTC_LEX_CPP = stc_c.wxSTC_LEX_CPP +wxSTC_LEX_HTML = stc_c.wxSTC_LEX_HTML +wxSTC_LEX_XML = stc_c.wxSTC_LEX_XML +wxSTC_LEX_PERL = stc_c.wxSTC_LEX_PERL +wxSTC_LEX_SQL = stc_c.wxSTC_LEX_SQL +wxSTC_LEX_VB = stc_c.wxSTC_LEX_VB +wxSTC_LEX_PROPERTIES = stc_c.wxSTC_LEX_PROPERTIES +wxSTC_LEX_ERRORLIST = stc_c.wxSTC_LEX_ERRORLIST +wxSTC_LEX_MAKEFILE = stc_c.wxSTC_LEX_MAKEFILE +wxSTC_LEX_BATCH = stc_c.wxSTC_LEX_BATCH +wxSTC_LEX_XCODE = stc_c.wxSTC_LEX_XCODE +wxSTC_LEX_LATEX = stc_c.wxSTC_LEX_LATEX +wxSTC_LEX_LUA = stc_c.wxSTC_LEX_LUA +wxSTC_LEX_DIFF = stc_c.wxSTC_LEX_DIFF +wxSTC_P_DEFAULT = stc_c.wxSTC_P_DEFAULT +wxSTC_P_COMMENTLINE = stc_c.wxSTC_P_COMMENTLINE +wxSTC_P_NUMBER = stc_c.wxSTC_P_NUMBER +wxSTC_P_STRING = stc_c.wxSTC_P_STRING +wxSTC_P_CHARACTER = stc_c.wxSTC_P_CHARACTER +wxSTC_P_WORD = stc_c.wxSTC_P_WORD +wxSTC_P_TRIPLE = stc_c.wxSTC_P_TRIPLE +wxSTC_P_TRIPLEDOUBLE = stc_c.wxSTC_P_TRIPLEDOUBLE +wxSTC_P_CLASSNAME = stc_c.wxSTC_P_CLASSNAME +wxSTC_P_DEFNAME = stc_c.wxSTC_P_DEFNAME +wxSTC_P_OPERATOR = stc_c.wxSTC_P_OPERATOR +wxSTC_P_IDENTIFIER = stc_c.wxSTC_P_IDENTIFIER +wxSTC_P_COMMENTBLOCK = stc_c.wxSTC_P_COMMENTBLOCK +wxSTC_P_STRINGEOL = stc_c.wxSTC_P_STRINGEOL +wxSTC_C_DEFAULT = stc_c.wxSTC_C_DEFAULT +wxSTC_C_COMMENT = stc_c.wxSTC_C_COMMENT +wxSTC_C_COMMENTLINE = stc_c.wxSTC_C_COMMENTLINE +wxSTC_C_COMMENTDOC = stc_c.wxSTC_C_COMMENTDOC +wxSTC_C_NUMBER = stc_c.wxSTC_C_NUMBER +wxSTC_C_WORD = stc_c.wxSTC_C_WORD +wxSTC_C_STRING = stc_c.wxSTC_C_STRING +wxSTC_C_CHARACTER = stc_c.wxSTC_C_CHARACTER +wxSTC_C_UUID = stc_c.wxSTC_C_UUID +wxSTC_C_PREPROCESSOR = stc_c.wxSTC_C_PREPROCESSOR +wxSTC_C_OPERATOR = stc_c.wxSTC_C_OPERATOR +wxSTC_C_IDENTIFIER = stc_c.wxSTC_C_IDENTIFIER +wxSTC_C_STRINGEOL = stc_c.wxSTC_C_STRINGEOL +wxSTC_C_VERBATIM = stc_c.wxSTC_C_VERBATIM +wxSTC_H_DEFAULT = stc_c.wxSTC_H_DEFAULT +wxSTC_H_TAG = stc_c.wxSTC_H_TAG +wxSTC_H_TAGUNKNOWN = stc_c.wxSTC_H_TAGUNKNOWN +wxSTC_H_ATTRIBUTE = stc_c.wxSTC_H_ATTRIBUTE +wxSTC_H_ATTRIBUTEUNKNOWN = stc_c.wxSTC_H_ATTRIBUTEUNKNOWN +wxSTC_H_NUMBER = stc_c.wxSTC_H_NUMBER +wxSTC_H_DOUBLESTRING = stc_c.wxSTC_H_DOUBLESTRING +wxSTC_H_SINGLESTRING = stc_c.wxSTC_H_SINGLESTRING +wxSTC_H_OTHER = stc_c.wxSTC_H_OTHER +wxSTC_H_COMMENT = stc_c.wxSTC_H_COMMENT +wxSTC_H_ENTITY = stc_c.wxSTC_H_ENTITY +wxSTC_H_TAGEND = stc_c.wxSTC_H_TAGEND +wxSTC_H_XMLSTART = stc_c.wxSTC_H_XMLSTART +wxSTC_H_XMLEND = stc_c.wxSTC_H_XMLEND +wxSTC_H_SCRIPT = stc_c.wxSTC_H_SCRIPT +wxSTC_H_ASP = stc_c.wxSTC_H_ASP +wxSTC_H_ASPAT = stc_c.wxSTC_H_ASPAT +wxSTC_H_CDATA = stc_c.wxSTC_H_CDATA +wxSTC_H_QUESTION = stc_c.wxSTC_H_QUESTION +wxSTC_H_VALUE = stc_c.wxSTC_H_VALUE +wxSTC_HJ_START = stc_c.wxSTC_HJ_START +wxSTC_HJ_DEFAULT = stc_c.wxSTC_HJ_DEFAULT +wxSTC_HJ_COMMENT = stc_c.wxSTC_HJ_COMMENT +wxSTC_HJ_COMMENTLINE = stc_c.wxSTC_HJ_COMMENTLINE +wxSTC_HJ_COMMENTDOC = stc_c.wxSTC_HJ_COMMENTDOC +wxSTC_HJ_NUMBER = stc_c.wxSTC_HJ_NUMBER +wxSTC_HJ_WORD = stc_c.wxSTC_HJ_WORD +wxSTC_HJ_KEYWORD = stc_c.wxSTC_HJ_KEYWORD +wxSTC_HJ_DOUBLESTRING = stc_c.wxSTC_HJ_DOUBLESTRING +wxSTC_HJ_SINGLESTRING = stc_c.wxSTC_HJ_SINGLESTRING +wxSTC_HJ_SYMBOLS = stc_c.wxSTC_HJ_SYMBOLS +wxSTC_HJ_STRINGEOL = stc_c.wxSTC_HJ_STRINGEOL +wxSTC_HJA_START = stc_c.wxSTC_HJA_START +wxSTC_HJA_DEFAULT = stc_c.wxSTC_HJA_DEFAULT +wxSTC_HJA_COMMENT = stc_c.wxSTC_HJA_COMMENT +wxSTC_HJA_COMMENTLINE = stc_c.wxSTC_HJA_COMMENTLINE +wxSTC_HJA_COMMENTDOC = stc_c.wxSTC_HJA_COMMENTDOC +wxSTC_HJA_NUMBER = stc_c.wxSTC_HJA_NUMBER +wxSTC_HJA_WORD = stc_c.wxSTC_HJA_WORD +wxSTC_HJA_KEYWORD = stc_c.wxSTC_HJA_KEYWORD +wxSTC_HJA_DOUBLESTRING = stc_c.wxSTC_HJA_DOUBLESTRING +wxSTC_HJA_SINGLESTRING = stc_c.wxSTC_HJA_SINGLESTRING +wxSTC_HJA_SYMBOLS = stc_c.wxSTC_HJA_SYMBOLS +wxSTC_HJA_STRINGEOL = stc_c.wxSTC_HJA_STRINGEOL +wxSTC_HB_START = stc_c.wxSTC_HB_START +wxSTC_HB_DEFAULT = stc_c.wxSTC_HB_DEFAULT +wxSTC_HB_COMMENTLINE = stc_c.wxSTC_HB_COMMENTLINE +wxSTC_HB_NUMBER = stc_c.wxSTC_HB_NUMBER +wxSTC_HB_WORD = stc_c.wxSTC_HB_WORD +wxSTC_HB_STRING = stc_c.wxSTC_HB_STRING +wxSTC_HB_IDENTIFIER = stc_c.wxSTC_HB_IDENTIFIER +wxSTC_HB_STRINGEOL = stc_c.wxSTC_HB_STRINGEOL +wxSTC_HBA_START = stc_c.wxSTC_HBA_START +wxSTC_HBA_DEFAULT = stc_c.wxSTC_HBA_DEFAULT +wxSTC_HBA_COMMENTLINE = stc_c.wxSTC_HBA_COMMENTLINE +wxSTC_HBA_NUMBER = stc_c.wxSTC_HBA_NUMBER +wxSTC_HBA_WORD = stc_c.wxSTC_HBA_WORD +wxSTC_HBA_STRING = stc_c.wxSTC_HBA_STRING +wxSTC_HBA_IDENTIFIER = stc_c.wxSTC_HBA_IDENTIFIER +wxSTC_HBA_STRINGEOL = stc_c.wxSTC_HBA_STRINGEOL +wxSTC_HP_START = stc_c.wxSTC_HP_START +wxSTC_HP_DEFAULT = stc_c.wxSTC_HP_DEFAULT +wxSTC_HP_COMMENTLINE = stc_c.wxSTC_HP_COMMENTLINE +wxSTC_HP_NUMBER = stc_c.wxSTC_HP_NUMBER +wxSTC_HP_STRING = stc_c.wxSTC_HP_STRING +wxSTC_HP_CHARACTER = stc_c.wxSTC_HP_CHARACTER +wxSTC_HP_WORD = stc_c.wxSTC_HP_WORD +wxSTC_HP_TRIPLE = stc_c.wxSTC_HP_TRIPLE +wxSTC_HP_TRIPLEDOUBLE = stc_c.wxSTC_HP_TRIPLEDOUBLE +wxSTC_HP_CLASSNAME = stc_c.wxSTC_HP_CLASSNAME +wxSTC_HP_DEFNAME = stc_c.wxSTC_HP_DEFNAME +wxSTC_HP_OPERATOR = stc_c.wxSTC_HP_OPERATOR +wxSTC_HP_IDENTIFIER = stc_c.wxSTC_HP_IDENTIFIER +wxSTC_HPA_START = stc_c.wxSTC_HPA_START +wxSTC_HPA_DEFAULT = stc_c.wxSTC_HPA_DEFAULT +wxSTC_HPA_COMMENTLINE = stc_c.wxSTC_HPA_COMMENTLINE +wxSTC_HPA_NUMBER = stc_c.wxSTC_HPA_NUMBER +wxSTC_HPA_STRING = stc_c.wxSTC_HPA_STRING +wxSTC_HPA_CHARACTER = stc_c.wxSTC_HPA_CHARACTER +wxSTC_HPA_WORD = stc_c.wxSTC_HPA_WORD +wxSTC_HPA_TRIPLE = stc_c.wxSTC_HPA_TRIPLE +wxSTC_HPA_TRIPLEDOUBLE = stc_c.wxSTC_HPA_TRIPLEDOUBLE +wxSTC_HPA_CLASSNAME = stc_c.wxSTC_HPA_CLASSNAME +wxSTC_HPA_DEFNAME = stc_c.wxSTC_HPA_DEFNAME +wxSTC_HPA_OPERATOR = stc_c.wxSTC_HPA_OPERATOR +wxSTC_HPA_IDENTIFIER = stc_c.wxSTC_HPA_IDENTIFIER +wxSTC_HPHP_DEFAULT = stc_c.wxSTC_HPHP_DEFAULT +wxSTC_HPHP_HSTRING = stc_c.wxSTC_HPHP_HSTRING +wxSTC_HPHP_SIMPLESTRING = stc_c.wxSTC_HPHP_SIMPLESTRING +wxSTC_HPHP_WORD = stc_c.wxSTC_HPHP_WORD +wxSTC_HPHP_NUMBER = stc_c.wxSTC_HPHP_NUMBER +wxSTC_HPHP_VARIABLE = stc_c.wxSTC_HPHP_VARIABLE +wxSTC_HPHP_COMMENT = stc_c.wxSTC_HPHP_COMMENT +wxSTC_HPHP_COMMENTLINE = stc_c.wxSTC_HPHP_COMMENTLINE +wxSTC_HPHP_STRINGEOL = stc_c.wxSTC_HPHP_STRINGEOL +wxSTC_PL_DEFAULT = stc_c.wxSTC_PL_DEFAULT +wxSTC_PL_HERE = stc_c.wxSTC_PL_HERE +wxSTC_PL_COMMENTLINE = stc_c.wxSTC_PL_COMMENTLINE +wxSTC_PL_POD = stc_c.wxSTC_PL_POD +wxSTC_PL_NUMBER = stc_c.wxSTC_PL_NUMBER +wxSTC_PL_WORD = stc_c.wxSTC_PL_WORD +wxSTC_PL_STRING = stc_c.wxSTC_PL_STRING +wxSTC_PL_CHARACTER = stc_c.wxSTC_PL_CHARACTER +wxSTC_PL_PUNCTUATION = stc_c.wxSTC_PL_PUNCTUATION +wxSTC_PL_PREPROCESSOR = stc_c.wxSTC_PL_PREPROCESSOR +wxSTC_PL_OPERATOR = stc_c.wxSTC_PL_OPERATOR +wxSTC_PL_IDENTIFIER = stc_c.wxSTC_PL_IDENTIFIER +wxSTC_PL_SCALAR = stc_c.wxSTC_PL_SCALAR +wxSTC_PL_ARRAY = stc_c.wxSTC_PL_ARRAY +wxSTC_PL_HASH = stc_c.wxSTC_PL_HASH +wxSTC_PL_SYMBOLTABLE = stc_c.wxSTC_PL_SYMBOLTABLE +wxSTC_PL_REF = stc_c.wxSTC_PL_REF +wxSTC_PL_REGEX = stc_c.wxSTC_PL_REGEX +wxSTC_PL_REGSUBST = stc_c.wxSTC_PL_REGSUBST +wxSTC_PL_LONGQUOTE = stc_c.wxSTC_PL_LONGQUOTE +wxSTC_PL_BACKTICKS = stc_c.wxSTC_PL_BACKTICKS +wxSTC_PL_DATASECTION = stc_c.wxSTC_PL_DATASECTION +wxSTC_L_DEFAULT = stc_c.wxSTC_L_DEFAULT +wxSTC_L_COMMAND = stc_c.wxSTC_L_COMMAND +wxSTC_L_TAG = stc_c.wxSTC_L_TAG +wxSTC_L_MATH = stc_c.wxSTC_L_MATH +wxSTC_L_COMMENT = stc_c.wxSTC_L_COMMENT +wxSTC_LUA_DEFAULT = stc_c.wxSTC_LUA_DEFAULT +wxSTC_LUA_COMMENT = stc_c.wxSTC_LUA_COMMENT +wxSTC_LUA_COMMENTLINE = stc_c.wxSTC_LUA_COMMENTLINE +wxSTC_LUA_COMMENTDOC = stc_c.wxSTC_LUA_COMMENTDOC +wxSTC_LUA_NUMBER = stc_c.wxSTC_LUA_NUMBER +wxSTC_LUA_WORD = stc_c.wxSTC_LUA_WORD +wxSTC_LUA_STRING = stc_c.wxSTC_LUA_STRING +wxSTC_LUA_CHARACTER = stc_c.wxSTC_LUA_CHARACTER +wxSTC_LUA_LITERALSTRING = stc_c.wxSTC_LUA_LITERALSTRING +wxSTC_LUA_PREPROCESSOR = stc_c.wxSTC_LUA_PREPROCESSOR +wxSTC_LUA_OPERATOR = stc_c.wxSTC_LUA_OPERATOR +wxSTC_LUA_IDENTIFIER = stc_c.wxSTC_LUA_IDENTIFIER +wxSTC_LUA_STRINGEOL = stc_c.wxSTC_LUA_STRINGEOL +wxSTC_ERR_DEFAULT = stc_c.wxSTC_ERR_DEFAULT +wxSTC_ERR_PYTHON = stc_c.wxSTC_ERR_PYTHON +wxSTC_ERR_GCC = stc_c.wxSTC_ERR_GCC +wxSTC_ERR_MS = stc_c.wxSTC_ERR_MS +wxSTC_ERR_CMD = stc_c.wxSTC_ERR_CMD +wxSTC_ERR_BORLAND = stc_c.wxSTC_ERR_BORLAND +wxSTC_ERR_PERL = stc_c.wxSTC_ERR_PERL +wxSTC_MASK_FOLDERS = stc_c.wxSTC_MASK_FOLDERS +wxSTCNameStr = stc_c.wxSTCNameStr +wxEVT_STC_CHANGE = stc_c.wxEVT_STC_CHANGE +wxEVT_STC_STYLENEEDED = stc_c.wxEVT_STC_STYLENEEDED +wxEVT_STC_CHARADDED = stc_c.wxEVT_STC_CHARADDED +wxEVT_STC_UPDATEUI = stc_c.wxEVT_STC_UPDATEUI +wxEVT_STC_SAVEPOINTREACHED = stc_c.wxEVT_STC_SAVEPOINTREACHED +wxEVT_STC_SAVEPOINTLEFT = stc_c.wxEVT_STC_SAVEPOINTLEFT +wxEVT_STC_ROMODIFYATTEMPT = stc_c.wxEVT_STC_ROMODIFYATTEMPT +wxEVT_STC_DOUBLECLICK = stc_c.wxEVT_STC_DOUBLECLICK +wxEVT_STC_MODIFIED = stc_c.wxEVT_STC_MODIFIED +wxEVT_STC_KEY = stc_c.wxEVT_STC_KEY +wxEVT_STC_MACRORECORD = stc_c.wxEVT_STC_MACRORECORD +wxEVT_STC_MARGINCLICK = stc_c.wxEVT_STC_MARGINCLICK +wxEVT_STC_NEEDSHOWN = stc_c.wxEVT_STC_NEEDSHOWN +wxEVT_STC_POSCHANGED = stc_c.wxEVT_STC_POSCHANGED + + +#-------------- USER INCLUDE ----------------------- + +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxStyledTextEventPtr = wxStyledTextEventPtr +wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr diff --git a/utils/wxPython/demo/.cvsignore b/wxPython/demo/.cvsignore similarity index 92% rename from utils/wxPython/demo/.cvsignore rename to wxPython/demo/.cvsignore index dd4052d12f..47c52eb5c3 100644 --- a/utils/wxPython/demo/.cvsignore +++ b/wxPython/demo/.cvsignore @@ -1,5 +1,6 @@ *.pyc .emacs.desktop +b.bat hangman_dict.txt setup.bat test.out diff --git a/utils/wxPython/demo/About.py b/wxPython/demo/About.py similarity index 68% rename from utils/wxPython/demo/About.py rename to wxPython/demo/About.py index 7e9827675e..63a727254f 100644 --- a/utils/wxPython/demo/About.py +++ b/wxPython/demo/About.py @@ -1,3 +1,4 @@ +import sys, string from wxPython.wx import * from wxPython.html import * @@ -12,7 +13,10 @@ class MyAboutBox(wxDialog):
    - +

    wxPython %s

    +

    wxPython %s

    + Running on Python %s
    +
    @@ -25,7 +29,7 @@ sit back and enjoy. Be sure to take a peek at the source code for each demo item so you can learn how to use the classes yourself.

    wxPython is brought to you by Robin Dunn and
    -Total Control Software, Copyright (c) 1997-1999.

    +Total Control Software, Copyright (c) 1997-2001.

    Please see license.txt for licensing information. @@ -40,19 +44,13 @@ demo item so you can learn how to use the classes yourself.

    ''' def __init__(self, parent): - wxDialog.__init__(self, parent, -1, 'About the wxPython demo', - size=wxSize(420, 380)) - self.html = wxHtmlWindow(self, -1) - self.html.SetPage(self.text % wx.__version__) - self.SetAutoLayout(true) - lc = wxLayoutConstraints() - lc.top.SameAs(self, wxTop, 5) - lc.left.SameAs(self, wxLeft, 5) - lc.bottom.SameAs(self, wxBottom, 5) - lc.right.SameAs(self, wxRight, 5) - self.html.SetConstraints(lc) - self.Layout() - + wxDialog.__init__(self, parent, -1, 'About the wxPython demo',) + html = wxHtmlWindow(self, -1, size=(420, -1)) + py_version = string.split(sys.version)[0] + html.SetPage(self.text % (wx.__version__, py_version)) + ir = html.GetInternalRepresentation() + html.SetSize( (ir.GetWidth()+5, ir.GetHeight()+5) ) + self.SetClientSize(html.GetSize()) self.CentreOnParent(wxBOTH) #--------------------------------------------------------------------------- diff --git a/wxPython/demo/ActiveXWrapper_Acrobat.py b/wxPython/demo/ActiveXWrapper_Acrobat.py new file mode 100644 index 0000000000..349429acc3 --- /dev/null +++ b/wxPython/demo/ActiveXWrapper_Acrobat.py @@ -0,0 +1,130 @@ +""" + +This demo shows how to embed an ActiveX control in a wxPython application, (Win32 only.) +

    +The MakeActiveXClass function dynamically builds a new Class on the fly, that has the +same signature and semantics as wxWindow. This means that when you call the function +you get back a new class that you can use just like wxWindow, (set the size and position, +use in a sizer, etc.) except its contents will be the COM control. +

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

    +The MakeActiveXClass function dynamically builds a new Class on the +fly, that has the same signature and semantics as wxWindow. This +means that when you call the function you get back a new class that +you can use just like wxWindow, (set the size and position, use in a +sizer, etc.) except its contents will be the COM control. + +

    +This demo embeds the Internet Exploer WebBrowser control, and shows +how to receive events from the COM control. (The title bar and status +bar are updated as pages change, in addition to the log messages being +shown.) + +""" + +from wxPython.wx import * + +if wxPlatform == '__WXMSW__': + from wxPython.lib.activexwrapper import MakeActiveXClass + import win32com.client.gencache + + try: + browserModule = win32com.client.gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1) + except: + raise ImportError("IE4 or greater does not appear to be installed.") + + +#---------------------------------------------------------------------- + +class TestPanel(wxWindow): + def __init__(self, parent, log, frame=None): + wxWindow.__init__(self, parent, -1)#, style=wxCLIP_CHILDREN) + self.ie = None + self.log = log + self.current = "http://wxPython.org/" + self.frame = frame + if frame: + self.titleBase = frame.GetTitle() + + + sizer = wxBoxSizer(wxVERTICAL) + btnSizer = wxBoxSizer(wxHORIZONTAL) + + # Make a new class that derives from the WebBrowser class in the + # COM module imported above. This class also derives from wxWindow and + # implements the machinery needed to integrate the two worlds. + theClass = MakeActiveXClass(browserModule.WebBrowser, + eventObj = self) + + # Create an instance of that class + self.ie = theClass(self, -1, style=wxSUNKEN_BORDER) + + + #btn = wxButton(self, wxNewId(), " Open ") + #EVT_BUTTON(self, btn.GetId(), self.OnOpenButton) + #btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5) + + btn = wxButton(self, wxNewId(), " Home ") + EVT_BUTTON(self, btn.GetId(), self.OnHomeButton) + btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5) + + btn = wxButton(self, wxNewId(), " <-- ") + EVT_BUTTON(self, btn.GetId(), self.OnPrevPageButton) + btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5) + + btn = wxButton(self, wxNewId(), " --> ") + EVT_BUTTON(self, btn.GetId(), self.OnNextPageButton) + btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5) + + txt = wxStaticText(self, -1, "Location:") + btnSizer.Add(txt, 0, wxCENTER|wxALL, 5) + + self.location = wxComboBox(self, wxNewId(), "", style=wxCB_DROPDOWN) + EVT_COMBOBOX(self, self.location.GetId(), self.OnLocationSelect) + EVT_KEY_UP(self.location, self.OnLocationKey) + #EVT_CHAR(self.location, self.IgnoreReturn) + btnSizer.Add(self.location, 1, wxEXPAND|wxALL, 5) + + sizer.Add(btnSizer, 0, wxEXPAND) + sizer.Add(self.ie, 1, wxEXPAND) + + self.ie.Navigate(self.current) + self.location.Append(self.current) + + self.SetSizer(sizer) + self.SetAutoLayout(true) + EVT_SIZE(self, self.OnSize) + + + def OnSize(self, evt): + self.Layout() + + def __del__(self): + if self.ie: + self.ie.Cleanup() + self.ie = None + + def OnLocationSelect(self, evt): + url = self.location.GetStringSelection() + self.log.write('OnLocationSelect: %s\n' % url) + self.ie.Navigate(url) + + def OnLocationKey(self, evt): + if evt.KeyCode() == WXK_RETURN: + URL = self.location.GetValue() + self.location.Append(URL) + self.ie.Navigate(URL) + else: + evt.Skip() + + def IgnoreReturn(self, evt): + print 'IgnoreReturn' + if evt.KeyCode() != WXK_RETURN: + evt.Skip() + + def OnOpenButton(self, event): + dlg = wxTextEntryDialog(self, "Open Location", + "Enter a full URL or local path", + self.current, wxOK|wxCANCEL) + dlg.CentreOnParent() + if dlg.ShowModal() == wxID_OK: + self.current = dlg.GetValue() + self.ie.Navigate(self.current) + dlg.Destroy() + + def OnHomeButton(self, event): + self.ie.GoHome() ## ET Phone Home! + + def OnPrevPageButton(self, event): + self.ie.GoBack() + + + def OnNextPageButton(self, event): + self.ie.GoForward() + + + # The following event handlers are called by the web browser COM + # control since we passed self to MakeActiveXClass. It will look + # here for matching attributes and call them if they exist. See the + # module generated by makepy for details of method names, etc. + def OnBeforeNavigate2(self, pDisp, URL, *args): + self.log.write('OnBeforeNavigate2: %s\n' % URL) + + def OnNavigateComplete2(self, pDisp, URL): + self.log.write('OnNavigateComplete2: %s\n' % URL) + self.current = URL + self.location.SetValue(URL) + + def OnTitleChange(self, text): + self.log.write('OnTitleChange: %s\n' % text) + if self.frame: + self.frame.SetTitle(self.titleBase + ' -- ' + text) + + def OnStatusTextChange(self, text): + self.log.write('OnStatusTextChange: %s\n' % text) + if self.frame: + self.frame.SetStatusText(text) + + +#---------------------------------------------------------------------- +# for the demo framework... + +def runTest(frame, nb, log): + if wxPlatform == '__WXMSW__': + win = TestPanel(nb, log, frame) + return win + else: + dlg = wxMessageDialog(frame, 'This demo only works on MSW.', + 'Sorry', wxOK | wxICON_INFORMATION) + dlg.ShowModal() + dlg.Destroy() + + +overview = __doc__ + +#---------------------------------------------------------------------- + + +if __name__ == '__main__': + class TestFrame(wxFrame): + def __init__(self): + wxFrame.__init__(self, None, -1, "ActiveX test -- Internet Explorer", + size=(640, 480), + style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) + self.CreateStatusBar() + self.tp = TestPanel(self, sys.stdout, self) + EVT_CLOSE(self, self.OnCloseWindow) + + def OnCloseWindow(self, event): + self.tp.ie.Cleanup() + self.Destroy() + + + app = wxPySimpleApp() + frame = TestFrame() + frame.Show(true) + app.MainLoop() + + + diff --git a/utils/wxPython/demo/ColorPanel.py b/wxPython/demo/ColorPanel.py similarity index 100% rename from utils/wxPython/demo/ColorPanel.py rename to wxPython/demo/ColorPanel.py diff --git a/utils/wxPython/demo/CustomDragAndDrop.py b/wxPython/demo/CustomDragAndDrop.py similarity index 94% rename from utils/wxPython/demo/CustomDragAndDrop.py rename to wxPython/demo/CustomDragAndDrop.py index 560eada75c..eb33d57f3d 100644 --- a/utils/wxPython/demo/CustomDragAndDrop.py +++ b/wxPython/demo/CustomDragAndDrop.py @@ -19,6 +19,7 @@ class DoodlePad(wxWindow): EVT_LEFT_UP(self, self.OnLeftUp) EVT_RIGHT_UP(self, self.OnRightUp) EVT_MOTION(self, self.OnMotion) + EVT_PAINT(self, self.OnPaint) def OnPaint(self, event): @@ -98,6 +99,8 @@ class DoodlePad(wxWindow): result = dropSource.DoDragDrop() self.log.WriteText("DragDrop completed: %d\n" % result) + + #---------------------------------------------------------------------- @@ -106,31 +109,39 @@ class DoodleDropTarget(wxPyDropTarget): wxPyDropTarget.__init__(self) self.log = log self.dv = window + + # specify the type of data we will accept self.data = wxCustomDataObject(wxCustomDataFormat("DoodleLines")) self.SetDataObject(self.data) + + # some virtual methods that track the progress of the drag def OnEnter(self, x, y, d): self.log.WriteText("OnEnter: %d, %d, %d\n" % (x, y, d)) return wxDragCopy - def OnLeave(self): self.log.WriteText("OnLeave\n") - def OnDrop(self, x, y): self.log.WriteText("OnDrop: %d %d\n" % (x, y)) return true + #def OnDragOver(self, x, y, d): + # self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d)) + # return wxDragCopy + + # Called when OnDrop returns true. We need to get the data and + # do something with it. def OnData(self, x, y, d): self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d)) + + # copy the data from the drag source to out data object if self.GetData(): + # convert it back to a list of lines and give it to the viewer linesdata = self.data.GetData() lines = cPickle.loads(linesdata) self.dv.SetLines(lines) return d - #def OnDragOver(self, x, y, d): - # self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d)) - # return wxDragCopy @@ -143,6 +154,7 @@ class DoodleViewer(wxWindow): self.x = self.y = 0 dt = DoodleDropTarget(self, log) self.SetDropTarget(dt) + EVT_PAINT(self, self.OnPaint) def SetLines(self, lines): self.lines = lines diff --git a/utils/wxPython/demo/DialogUnits.py b/wxPython/demo/DialogUnits.py similarity index 98% rename from utils/wxPython/demo/DialogUnits.py rename to wxPython/demo/DialogUnits.py index aba492715f..7f369dd40f 100644 --- a/utils/wxPython/demo/DialogUnits.py +++ b/wxPython/demo/DialogUnits.py @@ -29,6 +29,7 @@ class MyFrame(wxFrame): # Associate some events with methods of this class EVT_SIZE(self, self.OnSize) EVT_MOVE(self, self.OnMove) + EVT_CLOSE(self, self.OnCloseWindow) # Add a panel and some controls to display the size and position panel = wxPanel(self, -1) diff --git a/utils/wxPython/demo/DragAndDrop.py b/wxPython/demo/DragAndDrop.py similarity index 100% rename from utils/wxPython/demo/DragAndDrop.py rename to wxPython/demo/DragAndDrop.py diff --git a/wxPython/demo/FancyText.py b/wxPython/demo/FancyText.py new file mode 100644 index 0000000000..edda6ce178 --- /dev/null +++ b/wxPython/demo/FancyText.py @@ -0,0 +1,41 @@ + +from wxPython.wx import * +from wxPython.lib import fancytext + +#---------------------------------------------------------------------- + +test_str = ('' + 'some |23 textwith subscript' + ' some other text') + +test_str2 = 'big green text' + + +class TestPanel(wxPanel): + def __init__(self, parent): + wxPanel.__init__(self, parent, -1) + EVT_PAINT(self, self.OnPaint) + + + def OnPaint(self, evt): + dc = wxPaintDC(self) + + sz = fancytext.getExtent(test_str, dc) + fancytext.renderToDC(test_str, dc, 20, 20) + + fancytext.renderToDC(test_str2, dc, 20, 20 + sz.height + 10) + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb) + return win + +#---------------------------------------------------------------------- + + + +import string +overview = string.replace(fancytext.__doc__, "<", "<") + diff --git a/wxPython/demo/FileBrowseButton.py b/wxPython/demo/FileBrowseButton.py new file mode 100644 index 0000000000..9967ea355f --- /dev/null +++ b/wxPython/demo/FileBrowseButton.py @@ -0,0 +1,76 @@ +""" Demonstrate filebrowsebutton module of the wxPython.lib Library. + +14.1.2001 Bernhard Reiter + Added demo for DirBrowseButton and improved overview text. +""" +from wxPython.wx import * +from wxPython.lib.filebrowsebutton import FileBrowseButton, FileBrowseButtonWithHistory,DirBrowseButton + + +#---------------------------------------------------------------------- + +class TestPanel(wxPanel): + def __init__(self, parent, ID, log): + wxPanel.__init__(self, parent, ID) + self.log = log + self.fbb = FileBrowseButton(self, -1, wxPoint(20,20), wxSize(450, -1), + changeCallback = self.fbbCallback) + self.fbbh = FileBrowseButtonWithHistory(self, -1, wxPoint(20, 50), + wxSize(450, -1), + #changeCallback = self.fbbhCallback + ) + self.dbb = DirBrowseButton(self, -1, wxPoint(20,80), wxSize(450,-1), + changeCallback = self.dbbCallback) + + + self.fbbh.SetHistory(['You', 'can', 'put', 'some', 'file', 'names', 'here']) + + + def fbbCallback(self, evt): + self.log.write('FileBrowseButton: %s\n' % evt.GetString()) + + + + def fbbhCallback(self, evt): + if hasattr(self, 'fbbh'): + value = evt.GetString() + self.log.write('FileBrowseButtonWithHistory: %s\n' % value) + history = self.fbbh.GetHistory() + history.append(value) + self.fbbh.SetHistory(history) + + def dbbCallback(self, evt): + self.log.write('DirBrowseButton: %s\n' % evt.GetString()) + + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, -1, log) + return win + + + +#---------------------------------------------------------------------- + +overview = """ +

    class FileBrowseButton:

    +
    +%s
    +
    + +

    class FileBrowseButtonWithHistory(FileBrowseButton):

    +
    +%s
    +
    + +

    class DirBrowseButton(FileBrowseButton):

    +
    +%s
    +
    + +< +""" % ( FileBrowseButton.__doc__, + FileBrowseButtonWithHistory.__doc__ , + str(DirBrowseButton.__doc__) ) diff --git a/utils/wxPython/demo/FontEnumerator.py b/wxPython/demo/FontEnumerator.py similarity index 100% rename from utils/wxPython/demo/FontEnumerator.py rename to wxPython/demo/FontEnumerator.py diff --git a/utils/wxPython/demo/GenericButtons.py b/wxPython/demo/GenericButtons.py similarity index 98% rename from utils/wxPython/demo/GenericButtons.py rename to wxPython/demo/GenericButtons.py index 876542eae8..ccdf0ef34a 100644 --- a/utils/wxPython/demo/GenericButtons.py +++ b/wxPython/demo/GenericButtons.py @@ -32,6 +32,7 @@ class TestPanel(wxPanel): b.SetBackgroundColour(wxNamedColour("Navy")) b.SetForegroundColour(wxWHITE) #b.SetUseFocusIndicator(false) + b.SetToolTipString("This is a BIG button...") bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP) b = wxGenBitmapButton(self, -1, bmp, (10, 130)) diff --git a/wxPython/demo/GridCustEditor.py b/wxPython/demo/GridCustEditor.py new file mode 100644 index 0000000000..668dbdc428 --- /dev/null +++ b/wxPython/demo/GridCustEditor.py @@ -0,0 +1,231 @@ +#!/usr/bin/env python + +from wxPython.wx import * +from wxPython.grid import * + +#--------------------------------------------------------------------------- +class MyCellEditor(wxPyGridCellEditor): + """ + This is a sample GridCellEditor that shows you how to make your own custom + grid editors. All the methods that can be overridden are show here. The + ones that must be overridden are marked with "*Must Override*" in the + docstring. + + Notice that in order to call the base class version of these special + methods we use the method name preceded by "base_". This is because these + methods are "virtual" in C++ so if we try to call wxGridCellEditor.Create + for example, then when the wxPython extension module tries to call + ptr->Create(...) then it actually calls the derived class version which + looks up the method in this class and calls it, causing a recursion loop. + If you don't understand any of this, don't worry, just call the "base_" + version instead. + """ + def __init__(self, log): + self.log = log + self.log.write("MyCellEditor ctor\n") + wxPyGridCellEditor.__init__(self) + + + def Create(self, parent, id, evtHandler): + """ + Called to create the control, which must derive from wxControl. + *Must Override* + """ + self.log.write("MyCellEditor: Create\n") + self._tc = wxTextCtrl(parent, id, "") + self._tc.SetInsertionPoint(0) + self.SetControl(self._tc) + if evtHandler: + self._tc.PushEventHandler(evtHandler) + + + def SetSize(self, rect): + """ + Called to position/size the edit control within the cell rectangle. + If you don't fill the cell (the rect) then be sure to override + PaintBackground and do something meaningful there. + """ + self.log.write("MyCellEditor: SetSize %s\n" % rect) + self._tc.SetDimensions(rect.x, rect.y, rect.width+2, rect.height+2) + + + def Show(self, show, attr): + """ + Show or hide the edit control. You can use the attr (if not None) + to set colours or fonts for the control. + """ + self.log.write("MyCellEditor: Show(self, %s, %s)\n" % (show, attr)) + self.base_Show(show, attr) + + + def PaintBackground(self, rect, attr): + """ + Draws the part of the cell not occupied by the edit control. The + base class version just fills it with background colour from the + attribute. In this class the edit control fills the whole cell so + don't do anything at all in order to reduce flicker. + """ + self.log.write("MyCellEditor: PaintBackground\n") + + + def BeginEdit(self, row, col, grid): + """ + Fetch the value from the table and prepare the edit control + to begin editing. Set the focus to the edit control. + *Must Override* + """ + self.log.write("MyCellEditor: BeginEdit (%d,%d)\n" % (row, col)) + self.startValue = grid.GetTable().GetValue(row, col) + self._tc.SetValue(self.startValue) + self._tc.SetInsertionPointEnd() + self._tc.SetFocus() + + # For this example, select the text + self._tc.SetSelection(0, self._tc.GetLastPosition()) + + + def EndEdit(self, row, col, grid): + """ + Complete the editing of the current cell. Returns true if the value + has changed. If necessary, the control may be destroyed. + *Must Override* + """ + self.log.write("MyCellEditor: EndEdit (%d,%d)\n" % (row, col)) + changed = false + + val = self._tc.GetValue() + if val != self.startValue: + changed = true + grid.GetTable().SetValue(row, col, val) # update the table + + self.startValue = '' + self._tc.SetValue('') + return changed + + + def Reset(self): + """ + Reset the value in the control back to its starting value. + *Must Override* + """ + self.log.write("MyCellEditor: Reset\n") + self._tc.SetValue(self.startValue) + self._tc.SetInsertionPointEnd() + + + def IsAcceptedKey(self, evt): + """ + Return TRUE to allow the given key to start editing: the base class + version only checks that the event has no modifiers. F2 is special + and will always start the editor. + """ + self.log.write("MyCellEditor: IsAcceptedKey: %d\n" % (evt.GetKeyCode())) + + ## Oops, there's a bug here, we'll have to do it ourself.. + ##return self.base_IsAcceptedKey(evt) + + return (not (evt.ControlDown() or evt.AltDown()) and + evt.GetKeyCode() != WXK_SHIFT) + + + def StartingKey(self, evt): + """ + If the editor is enabled by pressing keys on the grid, this will be + called to let the editor do something about that first key if desired. + """ + self.log.write("MyCellEditor: StartingKey %d\n" % evt.GetKeyCode()) + key = evt.GetKeyCode() + ch = None + if key in [WXK_NUMPAD0, WXK_NUMPAD1, WXK_NUMPAD2, WXK_NUMPAD3, WXK_NUMPAD4, + WXK_NUMPAD5, WXK_NUMPAD6, WXK_NUMPAD7, WXK_NUMPAD8, WXK_NUMPAD9]: + ch = ch = chr(ord('0') + key - WXK_NUMPAD0) + + elif key < 256 and key >= 0 and chr(key) in string.printable: + ch = chr(key) + if not evt.ShiftDown(): + ch = string.lower(ch) + + if ch is not None: + # For this example, replace the text. Normally we would append it. + #self._tc.AppendText(ch) + self._tc.SetValue(ch) + else: + evt.Skip() + + + def StartingClick(self): + """ + If the editor is enabled by clicking on the cell, this method will be + called to allow the editor to simulate the click on the control if + needed. + """ + self.log.write("MyCellEditor: StartingClick\n") + + + def Destroy(self): + """final cleanup""" + self.log.write("MyCellEditor: Destroy\n") + self.base_Destroy() + + + def Clone(self): + """ + Create a new object which is the copy of this one + *Must Override* + """ + self.log.write("MyCellEditor: Clone\n") + return MyCellEditor(self.log) + + +#--------------------------------------------------------------------------- +class GridEditorTest(wxGrid): + def __init__(self, parent, log): + wxGrid.__init__(self, parent, -1) + self.log = log + + self.CreateGrid(10, 3) + + # Somebody changed the grid so the type registry takes precedence + # over the default attribute set for editors and renderers, so we + # have to set null handlers for the type registry before the + # default editor will get used otherwise... + #self.RegisterDataType(wxGRID_VALUE_STRING, None, None) + #self.SetDefaultEditor(MyCellEditor(self.log)) + + # Or we could just do it like this: + #self.RegisterDataType(wxGRID_VALUE_STRING, + # wxGridCellStringRenderer(), + # MyCellEditor(self.log)) + + # but for this example, we'll just set the custom editor on one cell + self.SetCellEditor(1, 0, MyCellEditor(self.log)) + self.SetCellValue(1, 0, "Try to edit this box") + + # and on a column + attr = wxGridCellAttr() + attr.SetEditor(MyCellEditor(self.log)) + self.SetColAttr(2, attr) + self.SetCellValue(1, 2, "or any in this column") + + self.SetColSize(0, 150) + self.SetColSize(1, 150) + self.SetColSize(2, 150) + +#--------------------------------------------------------------------------- + +class TestFrame(wxFrame): + def __init__(self, parent, log): + wxFrame.__init__(self, parent, -1, "Custom Grid Cell Editor Test", + size=(640,480)) + grid = GridEditorTest(self, log) + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = TestFrame(None, sys.stdout) + frame.Show(true) + app.MainLoop() + + diff --git a/wxPython/demo/GridCustTable.py b/wxPython/demo/GridCustTable.py new file mode 100644 index 0000000000..58fb015cd3 --- /dev/null +++ b/wxPython/demo/GridCustTable.py @@ -0,0 +1,153 @@ +from wxPython.wx import * +from wxPython.grid import * + +import string + +#--------------------------------------------------------------------------- + +class CustomDataTable(wxPyGridTableBase): + """ + """ + + def __init__(self, log): + wxPyGridTableBase.__init__(self) + self.log = log + + self.colLabels = ['ID', 'Description', 'Severity', 'Priority', 'Platform', + 'Opened?', 'Fixed?', 'Tested?'] + + self.dataTypes = [wxGRID_VALUE_NUMBER, + wxGRID_VALUE_STRING, + wxGRID_VALUE_CHOICE + ':only in a million years!,wish list,minor,normal,major,critical', + wxGRID_VALUE_NUMBER + ':1,5', + wxGRID_VALUE_CHOICE + ':all,MSW,GTK,other', + wxGRID_VALUE_BOOL, + wxGRID_VALUE_BOOL, + wxGRID_VALUE_BOOL] + + self.data = [ + [1010, "The foo doesn't bar", "major", 1, 'MSW', 1, 1, 1], + [1011, "I've got a wicket in my wocket", "wish list", 2, 'other', 0, 0, 0], + [1012, "Rectangle() returns a triangle", "critical", 5, 'all', 0, 0, 0] + + ] + + + #-------------------------------------------------- + # required methods for the wxPyGridTableBase interface + + def GetNumberRows(self): + return len(self.data) + 1 + + def GetNumberCols(self): + return len(self.data[0]) + + def IsEmptyCell(self, row, col): + return not self.data[row][col] + + # Get/Set values in the table. The Python version of these + # methods can handle any data-type, (as long as the Editor and + # Renderer understands the type too,) not just strings as in the + # C++ version. + def GetValue(self, row, col): + try: + return self.data[row][col] + except IndexError: + return '' + + def SetValue(self, row, col, value): + try: + self.data[row][col] = value + except IndexError: + # add a new row + self.data.append([''] * self.GetNumberCols()) + self.SetValue(row, col, value) + + # tell the grid we've added a row + msg = wxGridTableMessage(self, # The table + wxGRIDTABLE_NOTIFY_ROWS_APPENDED, # what we did to it + 1) # how many + + self.GetView().ProcessTableMessage(msg) + + + #-------------------------------------------------- + # Some optional methods + + # Called when the grid needs to display labels + def GetColLabelValue(self, col): + return self.colLabels[col] + + # Called to determine the kind of editor/renderer to use by + # default, doesn't necessarily have to be the same type used + # nativly by the editor/renderer if they know how to convert. + def GetTypeName(self, row, col): + return self.dataTypes[col] + + # Called to determine how the data can be fetched and stored by the + # editor and renderer. This allows you to enforce some type-safety + # in the grid. + def CanGetValueAs(self, row, col, typeName): + colType = string.split(self.dataTypes[col], ':')[0] + if typeName == colType: + return true + else: + return false + + def CanSetValueAs(self, row, col, typeName): + return self.CanGetValueAs(row, col, typeName) + + + + + +#--------------------------------------------------------------------------- + + + +class CustTableGrid(wxGrid): + def __init__(self, parent, log): + wxGrid.__init__(self, parent, -1) + + table = CustomDataTable(log) + + # The second parameter means that the grid is to take ownership of the + # table and will destroy it when done. Otherwise you would need to keep + # a reference to it and call it's Destroy method later. + self.SetTable(table, true) + + self.SetRowLabelSize(0) + self.SetMargins(0,0) + self.AutoSizeColumns(false) + + EVT_GRID_CELL_LEFT_DCLICK(self, self.OnLeftDClick) + + + + # I do this because I don't like the default behaviour of not starting the + # cell editor on double clicks, but only a second click. + def OnLeftDClick(self, evt): + if self.CanEnableCellControl(): + self.EnableCellEditControl() + + +#--------------------------------------------------------------------------- + +class TestFrame(wxFrame): + def __init__(self, parent, log): + wxFrame.__init__(self, parent, -1, "Custom Table, data driven Grid Demo", size=(640,480)) + grid = CustTableGrid(self, log) + + + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = TestFrame(None, sys.stdout) + frame.Show(true) + app.MainLoop() + + +#--------------------------------------------------------------------------- diff --git a/wxPython/demo/GridEnterHandler.py b/wxPython/demo/GridEnterHandler.py new file mode 100644 index 0000000000..719c622ef0 --- /dev/null +++ b/wxPython/demo/GridEnterHandler.py @@ -0,0 +1,62 @@ +from wxPython.wx import * +from wxPython.grid import * + +#--------------------------------------------------------------------------- + +class NewEnterHandlingGrid(wxGrid): + def __init__(self, parent, log): + wxGrid.__init__(self, parent, -1) + self.log = log + + self.CreateGrid(20, 6) + + self.SetCellValue(0, 0, "Enter moves to the right") + self.SetCellValue(0, 5, "Enter wraps to next row") + self.SetColSize(0, 150) + self.SetColSize(5, 150) + + EVT_KEY_DOWN(self, self.OnKeyDown) + + + def OnKeyDown(self, evt): + if evt.KeyCode() != WXK_RETURN: + evt.Skip() + return + + if evt.ControlDown(): # the edit control needs this key + evt.Skip() + return + + self.DisableCellEditControl() + success = self.MoveCursorRight(evt.ShiftDown()) + if not success: + newRow = self.GetGridCursorRow() + 1 + if newRow < self.GetTable().GetNumberRows(): + self.SetGridCursor(newRow, 0) + self.MakeCellVisible(newRow, 0) + else: + # this would be a good place to add a new row if your app + # needs to do that + pass + + +#--------------------------------------------------------------------------- + +class TestFrame(wxFrame): + def __init__(self, parent, log): + wxFrame.__init__(self, parent, -1, "Simple Grid Demo", size=(640,480)) + grid = NewEnterHandlingGrid(self, log) + + + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = TestFrame(None, sys.stdout) + frame.Show(true) + app.MainLoop() + + +#--------------------------------------------------------------------------- diff --git a/wxPython/demo/GridHugeTable.py b/wxPython/demo/GridHugeTable.py new file mode 100644 index 0000000000..69e3aed48b --- /dev/null +++ b/wxPython/demo/GridHugeTable.py @@ -0,0 +1,71 @@ +from wxPython.wx import * +from wxPython.grid import * + +#--------------------------------------------------------------------------- + +class HugeTable(wxPyGridTableBase): + + """ + This is all it takes to make a custom data table to plug into a + wxGrid. There are many more methods that can be overridden, but + the ones shown below are the required ones. This table simply + provides strings containing the row and column values. + """ + + def __init__(self, log): + wxPyGridTableBase.__init__(self) + self.log = log + + def GetNumberRows(self): + return 10000 + + def GetNumberCols(self): + return 10000 + + def IsEmptyCell(self, row, col): + return false + + def GetValue(self, row, col): + return str( (row, col) ) + + def SetValue(self, row, col, value): + self.log.write('SetValue(%d, %d, "%s") ignored.\n' % (row, col, value)) + + +#--------------------------------------------------------------------------- + + + +class HugeTableGrid(wxGrid): + def __init__(self, parent, log): + wxGrid.__init__(self, parent, -1) + + table = HugeTable(log) + + # The second parameter means that the grid is to take ownership of the + # table and will destroy it when done. Otherwise you would need to keep + # a reference to it and call it's Destroy method later. + self.SetTable(table, true) + + + +#--------------------------------------------------------------------------- + +class TestFrame(wxFrame): + def __init__(self, parent, log): + wxFrame.__init__(self, parent, -1, "Huge (virtual) Table Demo", size=(640,480)) + grid = HugeTableGrid(self, log) + + + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = TestFrame(None, sys.stdout) + frame.Show(true) + app.MainLoop() + + +#--------------------------------------------------------------------------- diff --git a/wxPython/demo/GridSimple.py b/wxPython/demo/GridSimple.py new file mode 100644 index 0000000000..bafd643cf2 --- /dev/null +++ b/wxPython/demo/GridSimple.py @@ -0,0 +1,189 @@ +from wxPython.wx import * +from wxPython.grid import * + +#--------------------------------------------------------------------------- + +class SimpleGrid(wxGrid): + def __init__(self, parent, log): + wxGrid.__init__(self, parent, -1) + self.log = log + self.moveTo = None + + EVT_IDLE(self, self.OnIdle) + + self.CreateGrid(25, 25) + + # simple cell formatting + self.SetColSize(3, 200) + self.SetRowSize(4, 45) + self.SetCellValue(0, 0, "First cell") + self.SetCellValue(1, 1, "Another cell") + self.SetCellValue(2, 2, "Yet another cell") + self.SetCellFont(0, 0, wxFont(12, wxROMAN, wxITALIC, wxNORMAL)) + self.SetCellTextColour(1, 1, wxRED) + self.SetCellBackgroundColour(2, 2, wxCYAN) + + # attribute objects let you keep a set of formatting values + # in one spot, and reuse them if needed + attr = wxGridCellAttr() + attr.SetTextColour(wxBLACK) + attr.SetBackgroundColour(wxRED) + attr.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD)) + + # you can set cell attributes for the whole row (or column) + self.SetRowAttr(5, attr) + + self.SetColLabelValue(0, "Custom") + self.SetColLabelValue(1, "column") + self.SetColLabelValue(2, "labels") + + # test all the events + EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick) + EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick) + EVT_GRID_CELL_LEFT_DCLICK(self, self.OnCellLeftDClick) + EVT_GRID_CELL_RIGHT_DCLICK(self, self.OnCellRightDClick) + + EVT_GRID_LABEL_LEFT_CLICK(self, self.OnLabelLeftClick) + EVT_GRID_LABEL_RIGHT_CLICK(self, self.OnLabelRightClick) + EVT_GRID_LABEL_LEFT_DCLICK(self, self.OnLabelLeftDClick) + EVT_GRID_LABEL_RIGHT_DCLICK(self, self.OnLabelRightDClick) + + EVT_GRID_ROW_SIZE(self, self.OnRowSize) + EVT_GRID_COL_SIZE(self, self.OnColSize) + + EVT_GRID_RANGE_SELECT(self, self.OnRangeSelect) + EVT_GRID_CELL_CHANGE(self, self.OnCellChange) + EVT_GRID_SELECT_CELL(self, self.OnSelectCell) + + EVT_GRID_EDITOR_SHOWN(self, self.OnEditorShown) + EVT_GRID_EDITOR_HIDDEN(self, self.OnEditorHidden) + + + def OnCellLeftClick(self, evt): + self.log.write("OnCellLeftClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnCellRightClick(self, evt): + self.log.write("OnCellRightClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnCellLeftDClick(self, evt): + self.log.write("OnCellLeftDClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnCellRightDClick(self, evt): + self.log.write("OnCellRightDClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnLabelLeftClick(self, evt): + self.log.write("OnLabelLeftClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnLabelRightClick(self, evt): + self.log.write("OnLabelRightClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnLabelLeftDClick(self, evt): + self.log.write("OnLabelLeftDClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnLabelRightDClick(self, evt): + self.log.write("OnLabelRightDClick: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + + def OnRowSize(self, evt): + self.log.write("OnRowSize: row %d, %s\n" % + (evt.GetRowOrCol(), evt.GetPosition())) + evt.Skip() + + def OnColSize(self, evt): + self.log.write("OnColSize: col %d, %s\n" % + (evt.GetRowOrCol(), evt.GetPosition())) + evt.Skip() + + def OnRangeSelect(self, evt): + if evt.Selecting(): + self.log.write("OnRangeSelect: top-left %s, bottom-right %s\n" % + (evt.GetTopLeftCoords(), evt.GetBottomRightCoords())) + evt.Skip() + + + def OnCellChange(self, evt): + self.log.write("OnCellChange: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + + # Show how to stay in a cell that has bad data. We can't just + # call SetGridCursor here since we are nested inside one so it + # won't have any effect. Instead, set coordinants to move to in + # idle time. + value = self.GetCellValue(evt.GetRow(), evt.GetCol()) + if value == 'no good': + self.moveTo = evt.GetRow(), evt.GetCol() + + def OnIdle(self, evt): + if self.moveTo != None: + self.SetGridCursor(self.moveTo[0], self.moveTo[1]) + self.moveTo = None + + + + def OnSelectCell(self, evt): + self.log.write("OnSelectCell: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + + # Another way to stay in a cell that has a bad value... + row = self.GetGridCursorRow() + col = self.GetGridCursorCol() + if self.IsCellEditControlEnabled(): + self.HideCellEditControl() + self.DisableCellEditControl() + value = self.GetCellValue(row, col) + if value == 'no good 2': + return # cancels the cell selection + else: + evt.Skip() + + + + def OnEditorShown(self, evt): + self.log.write("OnEditorShown: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + def OnEditorHidden(self, evt): + self.log.write("OnEditorHidden: (%d,%d) %s\n" % + (evt.GetRow(), evt.GetCol(), evt.GetPosition())) + evt.Skip() + + +#--------------------------------------------------------------------------- + +class TestFrame(wxFrame): + def __init__(self, parent, log): + wxFrame.__init__(self, parent, -1, "Simple Grid Demo", size=(640,480)) + grid = SimpleGrid(self, log) + + + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = TestFrame(None, sys.stdout) + frame.Show(true) + app.MainLoop() + + +#--------------------------------------------------------------------------- + + diff --git a/wxPython/demo/GridStdEdRend.py b/wxPython/demo/GridStdEdRend.py new file mode 100644 index 0000000000..5835a8227e --- /dev/null +++ b/wxPython/demo/GridStdEdRend.py @@ -0,0 +1,181 @@ +from wxPython.wx import * +from wxPython.grid import * + +import string, random + +#--------------------------------------------------------------------------- + +class MyCustomRenderer(wxPyGridCellRenderer): + def __init__(self): + wxPyGridCellRenderer.__init__(self) + + def Draw(self, grid, attr, dc, rect, row, col, isSelected): + dc.SetBackgroundMode(wxSOLID) + dc.SetBrush(wxBrush(wxBLACK, wxSOLID)) + dc.SetPen(wxTRANSPARENT_PEN) + dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height) + + dc.SetBackgroundMode(wxTRANSPARENT) + dc.SetFont(attr.GetFont()) + + text = grid.GetCellValue(row, col) + colors = [wxRED, wxWHITE, wxCYAN] + x = rect.x + 1 + y = rect.y + 1 + for ch in text: + dc.SetTextForeground(random.choice(colors)) + dc.DrawText(ch, x, y) + w, h = dc.GetTextExtent(ch) + x = x + w + if x > rect.right - 5: + break + + + def GetBestSize(self, grid, attr, dc, row, col): + text = grid.GetCellValue(row, col) + dc.SetFont(attr.GetFont()) + w, h = dc.GetTextExtent(text) + return wxSize(w, h) + + + def Clone(self): + return MyCustomRenderer() + + +#--------------------------------------------------------------------------- + +rendererDemoData = [ + ('wxGridCellStringRenderer\n(the default)', 'this is a text value', wxGridCellStringRenderer, ()), + ('wxGridCellNumberRenderer', '12345', wxGridCellNumberRenderer, ()), + ('wxGridCellFloatRenderer', '1234.5678', wxGridCellFloatRenderer, (6,2)), + ('wxGridCellBoolRenderer', '1', wxGridCellBoolRenderer, ()), + ('MyCustomRenderer', 'This is my renderer', MyCustomRenderer, ()), + ] + +editorDemoData = [ + ('wxGridCellTextEditor\n(the default)', 'Here is some more text', wxGridCellTextEditor, ()), + ('wxGridCellNumberEditor\nwith min,max', '101', wxGridCellNumberEditor, (5, 10005)), + ('wxGridCellNumberEditor\nwithout bounds', '101', wxGridCellNumberEditor, ()), + ('wxGridCellFloatEditor', '1234.5678', wxGridCellFloatEditor, ()), + ('wxGridCellBoolEditor', '1', wxGridCellBoolEditor, ()), + ('wxGridCellChoiceEditor', 'one', wxGridCellChoiceEditor, (['one', 'two', 'three', 'four', + 'kick', 'Microsoft', 'out the', + 'door'], false)), + ] + + +comboDemoData = [ + ('wxGridCellNumberRenderer\nwxGridCellNumberEditor', '20792', wxGridCellNumberRenderer, wxGridCellNumberEditor), + ('wxGridCellBoolRenderer\nwxGridCellBoolEditor', '1', wxGridCellBoolRenderer, wxGridCellBoolEditor), + ] + + +class EditorsAndRenderersGrid(wxGrid): + def __init__(self, parent, log): + wxGrid.__init__(self, parent, -1) + self.log = log + + self.CreateGrid(25, 8) + renCol = 1 + edCol = 4 + + + self.SetCellValue(0, renCol, '''\ +Cell Renderers are used to draw +the contents of the cell when they +need to be refreshed. Different +types of Renderers can be plugged in +to different cells in the grid, it can +even be automatically determined based +on the type of data in the cell. +''') + + self.SetCellValue(0, edCol, '''\ +Cell Editors are used when the +value of the cell is edited by +the user. An editor class is +wrapped around a an object +derived from wxControl and it +implements some methods required +to integrate with the grid. +''') + + self.SetCellValue(16, renCol, '''\ +Here are some combinations of Editors and +Renderers used together. +''') + + row = 2 + for label, value, renderClass, args in rendererDemoData: + renderer = apply(renderClass, args) + self.SetCellValue(row, renCol, label) + self.SetCellValue(row, renCol+1, value) + self.SetCellRenderer(row, renCol+1, renderer) + row = row + 2 + + + row = 2 + for label, value, editorClass, args in editorDemoData: + editor = apply(editorClass, args) + self.SetCellValue(row, edCol, label) + self.SetCellValue(row, edCol+1, value) + self.SetCellEditor(row, edCol+1, editor) + row = row + 2 + + + row = 18 + for label, value, renClass, edClass in comboDemoData: + self.SetCellValue(row, renCol, label) + self.SetCellValue(row, renCol+1, value) + editor = apply(edClass, ()) #args) + renderer = apply(renClass, ()) #args) + self.SetCellEditor(row, renCol+1, editor) + self.SetCellRenderer(row, renCol+1, renderer) + row = row + 2 + + + font = self.GetFont() + font.SetWeight(wxBOLD) + attr = wxGridCellAttr() + attr.SetFont(font) + attr.SetBackgroundColour(wxLIGHT_GREY) + attr.SetReadOnly(true) + attr.SetAlignment(wxRIGHT, -1) + self.SetColAttr(renCol, attr) + self.SetColAttr(edCol, attr) + + # There is a bug in wxGTK for this method... + if wxPlatform != '__WXGTK__': + self.AutoSizeColumns(true) + self.AutoSizeRows(true) + + EVT_GRID_CELL_LEFT_DCLICK(self, self.OnLeftDClick) + + + # I do this because I don't like the default behaviour of not starting the + # cell editor on double clicks, but only a second click. + def OnLeftDClick(self, evt): + if self.CanEnableCellControl(): + self.EnableCellEditControl() + + +#--------------------------------------------------------------------------- + +class TestFrame(wxFrame): + def __init__(self, parent, log): + wxFrame.__init__(self, parent, -1, "Editors and Renderers Demo", size=(640,480)) + grid = EditorsAndRenderersGrid(self, log) + + + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = TestFrame(None, sys.stdout) + frame.Show(true) + app.MainLoop() + + +#--------------------------------------------------------------------------- diff --git a/wxPython/demo/LayoutAnchors.py b/wxPython/demo/LayoutAnchors.py new file mode 100644 index 0000000000..b201372a7e --- /dev/null +++ b/wxPython/demo/LayoutAnchors.py @@ -0,0 +1,140 @@ + +from wxPython.wx import * +from wxPython.lib.anchors import LayoutAnchors + +#---------------------------------------------------------------------- + + +[wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT, + wxID_ANCHORSDEMOFRAMEMAINPANEL, wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL, + wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, wxID_ANCHORSDEMOFRAMEOKBUTTON, + wxID_ANCHORSDEMOFRAMETOPCHECKBOX, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, + wxID_ANCHORSDEMOFRAME, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, + ] = map(lambda _init_ctrls: wxNewId(), range(10)) + +class AnchorsDemoFrame(wxFrame): + def _init_utils(self): + pass + + def _init_ctrls(self, prnt): + wxFrame.__init__(self, size = wxSize(328, 187), id = wxID_ANCHORSDEMOFRAME, title = 'LayoutAnchors Demonstration', parent = prnt, name = 'AnchorsDemoFrame', style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN, pos = wxPoint(261, 123)) + self._init_utils() + + self.mainPanel = wxPanel(size = wxSize(320, 160), parent = self, id = wxID_ANCHORSDEMOFRAMEMAINPANEL, name = 'panel1', style = wxTAB_TRAVERSAL | wxCLIP_CHILDREN, pos = wxPoint(0, 0)) + self.mainPanel.SetAutoLayout(true) + + self.okButton = wxButton(label = 'OK', id = wxID_ANCHORSDEMOFRAMEOKBUTTON, parent = self.mainPanel, name = 'okButton', size = wxSize(72, 24), style = 0, pos = wxPoint(240, 128)) + self.okButton.SetConstraints(LayoutAnchors(self.okButton, false, false, true, true)) + EVT_BUTTON(self.okButton, wxID_ANCHORSDEMOFRAMEOKBUTTON, self.OnOkButtonButton) + + self.backgroundPanel = wxPanel(size = wxSize(304, 80), parent = self.mainPanel, id = wxID_ANCHORSDEMOFRAMEBACKGROUNDPANEL, name = 'backgroundPanel', style = wxSIMPLE_BORDER | wxCLIP_CHILDREN, pos = wxPoint(8, 40)) + self.backgroundPanel.SetBackgroundColour(wxColour(255, 255, 255)) + self.backgroundPanel.SetConstraints(LayoutAnchors(self.backgroundPanel, true, true, true, true)) + + self.anchoredPanel = wxPanel(size = wxSize(88, 48), id = wxID_ANCHORSDEMOFRAMEANCHOREDPANEL, parent = self.backgroundPanel, name = 'anchoredPanel', style = wxSIMPLE_BORDER, pos = wxPoint(104, 16)) + self.anchoredPanel.SetBackgroundColour(wxColour(0, 0, 222)) + self.anchoredPanel.SetConstraints(LayoutAnchors(self.anchoredPanel, false, false, false, false)) + + self.leftCheckBox = wxCheckBox(label = 'Left', id = wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, parent = self.mainPanel, name = 'leftCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(8, 8)) + self.leftCheckBox.SetConstraints(LayoutAnchors(self.leftCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.leftCheckBox, wxID_ANCHORSDEMOFRAMELEFTCHECKBOX, self.OnCheckboxCheckbox) + + self.topCheckBox = wxCheckBox(label = 'Top', id = wxID_ANCHORSDEMOFRAMETOPCHECKBOX, parent = self.mainPanel, name = 'topCheckBox', size = wxSize(40, 16), style = 0, pos = wxPoint(88, 8)) + self.topCheckBox.SetConstraints(LayoutAnchors(self.topCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.topCheckBox, wxID_ANCHORSDEMOFRAMETOPCHECKBOX, self.OnCheckboxCheckbox) + + self.rightCheckBox = wxCheckBox(label = 'Right', id = wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, parent = self.mainPanel, name = 'rightCheckBox', size = wxSize(48, 16), style = 0, pos = wxPoint(168, 8)) + self.rightCheckBox.SetConstraints(LayoutAnchors(self.rightCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.rightCheckBox, wxID_ANCHORSDEMOFRAMERIGHTCHECKBOX, self.OnCheckboxCheckbox) + + self.bottomCheckBox = wxCheckBox(label = 'Bottom', id = wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, parent = self.mainPanel, name = 'bottomCheckBox', size = wxSize(56, 16), style = 0, pos = wxPoint(248, 8)) + self.bottomCheckBox.SetConstraints(LayoutAnchors(self.bottomCheckBox, false, true, false, false)) + EVT_CHECKBOX(self.bottomCheckBox, wxID_ANCHORSDEMOFRAMEBOTTOMCHECKBOX, self.OnCheckboxCheckbox) + + self.helpStaticText = wxStaticText(label = 'Select anchor options above, then resize window to see the effect', id = wxID_ANCHORSDEMOFRAMEHELPSTATICTEXT, parent = self.mainPanel, name = 'helpStaticText', size = wxSize(224, 24), style = wxST_NO_AUTORESIZE, pos = wxPoint(8, 128)) + self.helpStaticText.SetConstraints(LayoutAnchors(self.helpStaticText, true, false, true, true)) + + def __init__(self, parent): + self._init_ctrls(parent) + + def OnCheckboxCheckbox(self, event): + self.anchoredPanel.SetConstraints( + LayoutAnchors(self.anchoredPanel, + self.leftCheckBox.GetValue(), self.topCheckBox.GetValue(), + self.rightCheckBox.GetValue(), self.bottomCheckBox.GetValue()) ) + + def OnOkButtonButton(self, event): + self.Close() + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = AnchorsDemoFrame(frame) + frame.otherWin = win + win.Show(true) + + + + +#---------------------------------------------------------------------- + + + + +overview = """ +

    LayoutAnchors

    + A class that implements Delphi's Anchors with wxLayoutConstraints. +

    + Anchored sides maintain the distance from the edge of the + control to the same edge of the parent. + When neither side is selected, the control keeps the same + relative position to both sides. +

    + The current position and size of the control and it's parent + is used when setting up the constraints. To change the size or + position of an already anchored control, set the constraints to + None, reposition or resize and reapply the anchors. +

    + Examples: +

    + Let's anchor the right and bottom edge of a control and + resize it's parent. +

    +

    +        ctrl.SetConstraints(LayoutAnchors(ctrl, left=0, top=0, right=1, bottom=1))
    +
    +        +=========+         +===================+
    +        | +-----+ |         |                   |
    +        | |     * |   ->    |                   |
    +        | +--*--+ |         |           +-----+ |
    +        +---------+         |           |     * |
    +                            |           +--*--+ |
    +                            +-------------------+
    +        * = anchored edge
    +
    +

    + When anchored on both sides the control will stretch horizontally. +

    +

    +        ctrl.SetConstraints(LayoutAnchors(ctrl, 1, 0, 1, 1))
    +
    +        +=========+         +===================+
    +        | +-----+ |         |                   |
    +        | *     * |   ->    |                   |
    +        | +--*--+ |         | +---------------+ |
    +        +---------+         | *     ctrl      * |
    +                            | +-------*-------+ |
    +                            +-------------------+
    +        * = anchored edge
    +
    + +""" + + + + + + + + + diff --git a/utils/wxPython/demo/Layoutf.py b/wxPython/demo/Layoutf.py similarity index 100% rename from utils/wxPython/demo/Layoutf.py rename to wxPython/demo/Layoutf.py diff --git a/utils/wxPython/demo/MDIDemo.py b/wxPython/demo/MDIDemo.py similarity index 91% rename from utils/wxPython/demo/MDIDemo.py rename to wxPython/demo/MDIDemo.py index 007102cbc8..6251ec4a41 100644 --- a/utils/wxPython/demo/MDIDemo.py +++ b/wxPython/demo/MDIDemo.py @@ -19,7 +19,7 @@ class MyParentFrame(wxMDIParentFrame): menubar.Append(menu, "&File") self.SetMenuBar(menubar) - #self.CreateStatusBar() + self.CreateStatusBar() EVT_MENU(self, 5000, self.OnNewWindow) EVT_MENU(self, 5001, self.OnExit) @@ -32,8 +32,7 @@ class MyParentFrame(wxMDIParentFrame): def OnNewWindow(self, evt): self.winCount = self.winCount + 1 win = wxMDIChildFrame(self, -1, "Child Window: %d" % self.winCount) - cs = win.GetClientSize() - canvas = MyCanvas(win, size=cs) + canvas = MyCanvas(win) win.Show(true) diff --git a/wxPython/demo/MDISashDemo.py b/wxPython/demo/MDISashDemo.py new file mode 100644 index 0000000000..2e4258f487 --- /dev/null +++ b/wxPython/demo/MDISashDemo.py @@ -0,0 +1,140 @@ +#!/usr/bin/env python + +from wxPython.wx import * +from wxScrolledWindow import MyCanvas + +#---------------------------------------------------------------------- + +class MyParentFrame(wxMDIParentFrame): + ID_WINDOW_TOP = 5100 + ID_WINDOW_LEFT1 = 5101 + ID_WINDOW_LEFT2 = 5102 + ID_WINDOW_BOTTOM = 5103 + + def __init__(self): + wxMDIParentFrame.__init__(self, None, -1, "MDI Parent", size=(600,400), + style = wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL) + + self.winCount = 0 + menu = wxMenu() + menu.Append(5000, "&New Window") + menu.AppendSeparator() + menu.Append(5001, "E&xit") + + menubar = wxMenuBar() + menubar.Append(menu, "&File") + self.SetMenuBar(menubar) + + #self.CreateStatusBar() + + EVT_MENU(self, 5000, self.OnNewWindow) + EVT_MENU(self, 5001, self.OnExit) + + + EVT_SASH_DRAGGED_RANGE(self, + self.ID_WINDOW_TOP, self.ID_WINDOW_BOTTOM, + self.OnSashDrag) + EVT_SIZE(self, self.OnSize) + + + # Create some layout windows + # A window like a toolbar + win = wxSashLayoutWindow(self, self.ID_WINDOW_TOP, style = wxNO_BORDER|wxSW_3D) + win.SetDefaultSize((1000, 30)) + win.SetOrientation(wxLAYOUT_HORIZONTAL) + win.SetAlignment(wxLAYOUT_TOP) + win.SetBackgroundColour(wxColour(255, 0, 0)) + win.SetSashVisible(wxSASH_BOTTOM, true) + + self.topWindow = win + + + # A window like a statusbar + win = wxSashLayoutWindow(self, self.ID_WINDOW_BOTTOM, style = wxNO_BORDER|wxSW_3D) + win.SetDefaultSize((1000, 30)) + win.SetOrientation(wxLAYOUT_HORIZONTAL) + win.SetAlignment(wxLAYOUT_BOTTOM) + win.SetBackgroundColour(wxColour(0, 0, 255)) + win.SetSashVisible(wxSASH_TOP, true) + + self.bottomWindow = win + + + # A window to the left of the client window + win = wxSashLayoutWindow(self, self.ID_WINDOW_LEFT1, style = wxNO_BORDER|wxSW_3D) + win.SetDefaultSize((120, 1000)) + win.SetOrientation(wxLAYOUT_VERTICAL) + win.SetAlignment(wxLAYOUT_LEFT) + win.SetBackgroundColour(wxColour(0, 255, 0)) + win.SetSashVisible(wxSASH_RIGHT, TRUE) + win.SetExtraBorderSize(10) + textWindow = wxTextCtrl(win, -1, "", wxDefaultPosition, wxDefaultSize, + wxTE_MULTILINE|wxSUNKEN_BORDER) + textWindow.SetValue("A sub window") + + self.leftWindow1 = win + + + # Another window to the left of the client window + win = wxSashLayoutWindow(self, self.ID_WINDOW_LEFT2, style = wxNO_BORDER|wxSW_3D) + win.SetDefaultSize((120, 1000)) + win.SetOrientation(wxLAYOUT_VERTICAL) + win.SetAlignment(wxLAYOUT_LEFT) + win.SetBackgroundColour(wxColour(0, 255, 255)) + win.SetSashVisible(wxSASH_RIGHT, TRUE) + + self.leftWindow2 = win + + + def OnSashDrag(self, event): + if event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE: + return + + eID = event.GetId() + if eID == self.ID_WINDOW_TOP: + self.topWindow.SetDefaultSize(wxSize(1000, event.GetDragRect().height)) + + elif eID == self.ID_WINDOW_LEFT1: + self.leftWindow1.SetDefaultSize(wxSize(event.GetDragRect().width, 1000)) + + + elif eID == self.ID_WINDOW_LEFT2: + self.leftWindow2.SetDefaultSize(wxSize(event.GetDragRect().width, 1000)) + + elif eID == self.ID_WINDOW_BOTTOM: + self.bottomWindow.SetDefaultSize(wxSize(1000, event.GetDragRect().height)) + + wxLayoutAlgorithm().LayoutMDIFrame(self) + self.GetClientWindow().Refresh() + + + def OnSize(self, event): + wxLayoutAlgorithm().LayoutMDIFrame(self) + + + def OnExit(self, evt): + self.Close(true) + + + def OnNewWindow(self, evt): + self.winCount = self.winCount + 1 + win = wxMDIChildFrame(self, -1, "Child Window: %d" % self.winCount) + canvas = MyCanvas(win) + win.Show(true) + + +#---------------------------------------------------------------------- + +class MyApp(wxApp): + def OnInit(self): + frame = MyParentFrame() + frame.Show(true) + self.SetTopWindow(frame) + return true + + +app = MyApp(0) +app.MainLoop() + + + diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py new file mode 100644 index 0000000000..60600a436a --- /dev/null +++ b/wxPython/demo/Main.py @@ -0,0 +1,544 @@ +#!/bin/env python +#---------------------------------------------------------------------------- +# Name: Main.py +# Purpose: Testing lots of stuff, controls, window types, etc. +# +# Author: Robin Dunn +# +# Created: A long time ago, in a galaxy far, far away... +# RCS-ID: $Id$ +# Copyright: (c) 1999 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------------- + +import sys, os +from wxPython.wx import * +from wxPython.lib.splashscreen import SplashScreen +from wxPython.html import wxHtmlWindow + +#--------------------------------------------------------------------------- + + +_treeList = [ + ('New since last release', ['LayoutAnchors', "FancyText", + ]), + + ('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']), + + ('Non-Managed Windows', ['wxGrid', 'wxSashWindow', + 'wxScrolledWindow', 'wxSplitterWindow', + 'wxStatusBar', 'wxNotebook', + 'wxHtmlWindow', + 'wxStyledTextCtrl_1', 'wxStyledTextCtrl_2',]), + + ('Common Dialogs', ['wxColourDialog', 'wxDirDialog', 'wxFileDialog', + 'wxSingleChoiceDialog', 'wxTextEntryDialog', + 'wxFontDialog', 'wxPageSetupDialog', 'wxPrintDialog', + 'wxMessageDialog', 'wxProgressDialog']), + + ('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice', + 'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl', + 'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText', + 'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar', + 'wxCalendarCtrl', + ]), + + ('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', ]), + + ('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'FontEnumerator', + 'wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits', + 'wxImage', 'wxMask', 'PrintFramework', 'wxOGL', + 'PythonEvents', 'Threads', + 'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE', + 'wxDragImage', "FancyText", + ]), + + ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog', + 'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar', + 'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow', + 'FileBrowseButton', 'GenericButtons', 'wxEditor', + 'PyShellWindow', + ]), + + ('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']), + + ] + +#--------------------------------------------------------------------------- + +class wxPythonDemo(wxFrame): + + def __init__(self, parent, id, title): + wxFrame.__init__(self, parent, -1, title, size = (800, 600), + style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) + + self.cwd = os.getcwd() + self.curOverview = "" + + if wxPlatform == '__WXMSW__': + icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO) + self.SetIcon(icon) + + # setup a taskbar icon, and catch some events from it + self.tbicon = wxTaskBarIcon() + self.tbicon.SetIcon(icon, "wxPython Demo") + EVT_TASKBAR_LEFT_DCLICK(self.tbicon, self.OnTaskBarActivate) + EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarMenu) + EVT_MENU(self.tbicon, self.TBMENU_RESTORE, self.OnTaskBarActivate) + EVT_MENU(self.tbicon, self.TBMENU_CLOSE, self.OnTaskBarClose) + + + self.otherWin = None + EVT_IDLE(self, self.OnIdle) + EVT_CLOSE(self, self.OnCloseWindow) + + self.Centre(wxBOTH) + self.CreateStatusBar(1, wxST_SIZEGRIP) + + splitter = wxSplitterWindow(self, -1, style=wxNO_3D|wxSP_3D) + splitter2 = wxSplitterWindow(splitter, -1, style=wxNO_3D|wxSP_3D) + + + # Prevent TreeCtrl from displaying all items after destruction + self.dying = false + + # Make a File menu + self.mainmenu = wxMenuBar() + menu = wxMenu() + exitID = wxNewId() + menu.Append(exitID, 'E&xit\tAlt-X', 'Get the heck outta here!') + EVT_MENU(self, exitID, self.OnFileExit) + self.mainmenu.Append(menu, '&File') + + # Make a Demo menu + menu = wxMenu() + for item in _treeList: + submenu = wxMenu() + for childItem in item[1]: + mID = wxNewId() + submenu.Append(mID, childItem) + EVT_MENU(self, mID, self.OnDemoMenu) + menu.AppendMenu(wxNewId(), item[0], submenu) + self.mainmenu.Append(menu, '&Demo') + + + # Make a Help menu + helpID = wxNewId() + menu = wxMenu() + menu.Append(helpID, '&About\tCtrl-H', 'wxPython RULES!!!') + EVT_MENU(self, helpID, self.OnHelpAbout) + self.mainmenu.Append(menu, '&Help') + self.SetMenuBar(self.mainmenu) + + # set the menu accellerator table... + aTable = wxAcceleratorTable([(wxACCEL_ALT, ord('X'), exitID), + (wxACCEL_CTRL, ord('H'), helpID)]) + self.SetAcceleratorTable(aTable) + + + # Create a TreeCtrl + tID = wxNewId() + self.treeMap = {} + self.tree = wxTreeCtrl(splitter, tID, + style=wxTR_HAS_BUTTONS | + wxTR_EDIT_LABELS | + wxTR_HAS_VARIABLE_ROW_HEIGHT | + wxSUNKEN_BORDER) + #self.tree.SetBackgroundColour(wxNamedColour("Pink")) + root = self.tree.AddRoot("Overview") + firstChild = None + for item in _treeList: + child = self.tree.AppendItem(root, item[0]) + if not firstChild: firstChild = child + for childItem in item[1]: + theDemo = self.tree.AppendItem(child, childItem) + self.treeMap[childItem] = theDemo + + self.tree.Expand(root) + self.tree.Expand(firstChild) + EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded) + EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed) + EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged) + EVT_LEFT_DOWN (self.tree, self.OnTreeLeftDown) + + # Create a Notebook + self.nb = wxNotebook(splitter2, -1) + + # Set up a wxHtmlWindow on the Overview Notebook page + # we put it in a panel first because there seems to be a + # refresh bug of some sort (wxGTK) when it is directly in + # the notebook... + if 0: # the old way + self.ovr = wxHtmlWindow(self.nb, -1, size=(400, 400)) + self.nb.AddPage(self.ovr, "Overview") + + else: # hopefully I can remove this hacky code soon + panel = wxPanel(self.nb, -1) + self.ovr = wxHtmlWindow(panel, -1, size=(400, 400)) + self.nb.AddPage(panel, "Overview") + + def OnOvrSize(evt, ovr=self.ovr): + ovr.SetSize(evt.GetSize()) + + EVT_SIZE(panel, OnOvrSize) + + self.SetOverview("Overview", overview) + + + # Set up a TextCtrl on the Demo Code Notebook page + self.txt = wxTextCtrl(self.nb, -1, + style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL) + self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false)) + self.nb.AddPage(self.txt, "Demo Code") + + + # Set up a log on the View Log Notebook page + self.log = wxTextCtrl(splitter2, -1, + style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL) + # Set the wxWindows log target to be this textctrl + wxLog_SetActiveTarget(wxLogTextCtrl(self.log)) + + + + self.Show(true) + + # add the windows to the splitter and split it. + splitter2.SplitHorizontally(self.nb, self.log) + splitter2.SetSashPosition(450, true) + splitter2.SetMinimumPaneSize(20) + + splitter.SplitVertically(self.tree, splitter2) + splitter.SetSashPosition(180, true) + splitter.SetMinimumPaneSize(20) + + + # select initial items + self.nb.SetSelection(0) + self.tree.SelectItem(root) + + if len(sys.argv) == 2: + try: + selectedDemo = self.treeMap[sys.argv[1]] + except: + selectedDemo = None + if selectedDemo: + self.tree.SelectItem(selectedDemo) + self.tree.EnsureVisible(selectedDemo) + + + wxLogMessage('window handle: %s' % self.GetHandle()) + + + #--------------------------------------------- + def WriteText(self, text): + if text[-1:] == '\n': + text = text[:-1] + wxLogMessage(text) + + + def write(self, txt): + self.WriteText(txt) + + #--------------------------------------------- + def OnItemExpanded(self, event): + item = event.GetItem() + wxLogMessage("OnItemExpanded: %s" % self.tree.GetItemText(item)) + event.Skip() + + #--------------------------------------------- + def OnItemCollapsed(self, event): + item = event.GetItem() + wxLogMessage("OnItemCollapsed: %s" % self.tree.GetItemText(item)) + event.Skip() + + #--------------------------------------------- + def OnTreeLeftDown(self, event): + pt = event.GetPosition(); + item, flags = self.tree.HitTest(pt) + if item == self.tree.GetSelection(): + self.SetOverview(self.tree.GetItemText(item), self.curOverview) + event.Skip() + + #--------------------------------------------- + def OnSelChanged(self, event): + if self.dying: + return + + item = event.GetItem() + itemText = self.tree.GetItemText(item) + self.RunDemo(itemText) + + + #--------------------------------------------- + def RunDemo(self, itemText): + os.chdir(self.cwd) + if self.nb.GetPageCount() == 3: + if self.nb.GetSelection() == 2: + self.nb.SetSelection(0) + self.nb.DeletePage(2) + + if itemText == 'Overview': + self.GetDemoFile('Main.py') + self.SetOverview('Overview', overview) + self.nb.Refresh(); + self.window = None + + else: + if os.path.exists(itemText + '.py'): + wxBeginBusyCursor() + wxLogMessage("Running demo %s.py..." % itemText) + try: + self.GetDemoFile(itemText + '.py') + module = __import__(itemText, globals()) + self.SetOverview(itemText, module.overview) + finally: + wxEndBusyCursor() + + # in case runTest is modal, make sure things look right... + self.nb.Refresh(); + wxYield() + + self.window = module.runTest(self, self.nb, self) ### + if self.window: + self.nb.AddPage(self.window, 'Demo') + wxYield() + self.nb.SetSelection(2) + + else: + self.ovr.SetPage("") + self.txt.Clear() + self.window = None + + + + #--------------------------------------------- + # Get the Demo files + def GetDemoFile(self, filename): + self.txt.Clear() + try: + self.txt.SetValue(open(filename).read()) + except IOError: + self.txt.WriteText("Cannot open %s file." % filename) + + self.txt.SetInsertionPoint(0) + self.txt.ShowPosition(0) + + #--------------------------------------------- + def SetOverview(self, name, text): + self.curOverview = text + lead = text[:6] + if lead != '' and lead != '': + text = string.join(string.split(text, '\n'), '
    ') + #text = '
    ' + text + '
    ' + self.ovr.SetPage(text) + self.nb.SetPageText(0, name) + + #--------------------------------------------- + # Menu methods + def OnFileExit(self, *event): + self.Close() + + + def OnHelpAbout(self, event): + from About import MyAboutBox + about = MyAboutBox(self) + about.ShowModal() + about.Destroy() + + + #--------------------------------------------- + def OnCloseWindow(self, event): + self.dying = true + self.window = None + self.mainmenu = None + if hasattr(self, "tbicon"): + del self.tbicon + self.Destroy() + + + #--------------------------------------------- + def OnIdle(self, event): + if self.otherWin: + self.otherWin.Raise() + self.window = self.otherWin + self.otherWin = None + + #--------------------------------------------- + def OnDemoMenu(self, event): + try: + selectedDemo = self.treeMap[self.mainmenu.GetLabel(event.GetId())] + except: + selectedDemo = None + if selectedDemo: + self.tree.SelectItem(selectedDemo) + self.tree.EnsureVisible(selectedDemo) + + + #--------------------------------------------- + def OnTaskBarActivate(self, evt): + if self.IsIconized(): + self.Iconize(false) + if not self.IsShown(): + self.Show(true) + self.Raise() + + #--------------------------------------------- + + TBMENU_RESTORE = 1000 + TBMENU_CLOSE = 1001 + + def OnTaskBarMenu(self, evt): + menu = wxMenu() + menu.Append(self.TBMENU_RESTORE, "Restore wxPython Demo") + menu.Append(self.TBMENU_CLOSE, "Close") + self.tbicon.PopupMenu(menu) + menu.Destroy() + + #--------------------------------------------- + def OnTaskBarClose(self, evt): + self.Close() + + # because of the way wxTaskBarIcon.PopupMenu is implemented we have to + # prod the main idle handler a bit to get the window to actually close + wxGetApp().ProcessIdle() + + +#--------------------------------------------------------------------------- +#--------------------------------------------------------------------------- + +class MyApp(wxApp): + def OnInit(self): + wxInitAllImageHandlers() + + self.splash = SplashScreen(None, bitmapfile='bitmaps/splash.gif', + duration=4000, callback=self.AfterSplash) + self.splash.Show(true) + wxYield() + return true + + + def AfterSplash(self): + self.splash.Close(true) + frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)") + frame.Show(true) + self.SetTopWindow(frame) + self.ShowTip(frame) + + + def ShowTip(self, frame): + try: + showTipText = open("data/showTips").read() + showTip, index = eval(showTipText) + except IOError: + showTip, index = (1, 0) + #print showTip, index + if showTip: + tp = wxCreateFileTipProvider("data/tips.txt", index) + showTip = wxShowTip(frame, tp) + index = tp.GetCurrentTip() + open("data/showTips", "w").write(str( (showTip, index) )) + + +#--------------------------------------------------------------------------- + +def main(): + try: + demoPath = os.path.split(__file__)[0] + os.chdir(demoPath) + except: + pass + app = MyApp(0) + app.MainLoop() + + +#--------------------------------------------------------------------------- + + + +overview = """ +

    Python

    + + Python is an interpreted, interactive, object-oriented programming + language often compared to Tcl, Perl, Scheme, or Java. + +

    Python combines remarkable power with very clear syntax. It has + modules, classes, exceptions, very high level dynamic data types, and + dynamic typing. There are interfaces to many system calls and + libraries, and new built-in modules are easily written in C or + C++. Python is also usable as an extension language for applications + that need a programmable interface.

    + +

    wxWindows

    + + wxWindows is a free C++ framework designed to make cross-platform + programming child's play. Well, almost. wxWindows 2 supports Windows + 3.1/95/98/NT, Unix with GTK/Motif/Lesstif, with a Mac version + underway. Other ports are under consideration.

    + + wxWindows is a set of libraries that allows C++ applications to + compile and run on several different types of computers, with minimal + source code changes. There is one library per supported GUI (such as + Motif, or Windows). As well as providing a common API (Application + Programming Interface) for GUI functionality, it provides + functionality for accessing some commonly-used operating system + facilities, such as copying or deleting files. wxWindows is a + 'framework' in the sense that it provides a lot of built-in + functionality, which the application can use or replace as required, + thus saving a great deal of coding effort. Basic data structures such + as strings, linked lists and hash tables are also supported. + +

    +

    wxPython

    + + wxPython is a Python extension module that encapsulates the wxWindows + GUI classes. Currently it is only available for the Win32 and GTK + ports of wxWindows, but as soon as the other ports are brought up to + the same level as Win32 and GTK, it should be fairly trivial to + enable wxPython to be used with the new GUI. + +

    + + The wxPython extension module attempts to mirror the class heiarchy + of wxWindows as closely as possible. This means that there is a + wxFrame class in wxPython that looks, smells, tastes and acts almost + the same as the wxFrame class in the C++ version. Unfortunately, + because of differences in the languages, wxPython doesn't match + wxWindows exactly, but the differences should be easy to absorb + because they are natural to Python. For example, some methods that + return multiple values via argument pointers in C++ will return a + tuple of values in Python. + +

    + + There is still much to be done for wxPython, many classes still need + to be mirrored. Also, wxWindows is still somewhat of a moving target + so it is a bit of an effort just keeping wxPython up to date. On the + other hand, there are enough of the core classes completed that + useful applications can be written. + +

    + + wxPython is close enough to the C++ version that the majority of + the wxPython documentation is actually just notes attached to the C++ + documents that describe the places where wxPython is different. There + is also a series of sample programs included, and a series of + documentation pages that assist the programmer in getting started + with wxPython. + + """ + + +#---------------------------------------------------------------------------- +#---------------------------------------------------------------------------- + +if __name__ == '__main__': + main() + +#---------------------------------------------------------------------------- + + + + + + + diff --git a/utils/wxPython/demo/PrintFramework.py b/wxPython/demo/PrintFramework.py similarity index 100% rename from utils/wxPython/demo/PrintFramework.py rename to wxPython/demo/PrintFramework.py diff --git a/utils/wxPython/demo/PyShell.py b/wxPython/demo/PyShell.py similarity index 80% rename from utils/wxPython/demo/PyShell.py rename to wxPython/demo/PyShell.py index 41edebf719..450f73925b 100644 --- a/utils/wxPython/demo/PyShell.py +++ b/wxPython/demo/PyShell.py @@ -6,7 +6,8 @@ from wxPython.lib.shell import PyShell def runTest(frame, nb, log): - win = PyShell(nb) + testGlobals = {'hello' : 'How are you?'} + win = PyShell(nb, globals=testGlobals) win.Show(true) return win diff --git a/wxPython/demo/PyShellWindow.py b/wxPython/demo/PyShellWindow.py new file mode 100644 index 0000000000..1f68ed8be6 --- /dev/null +++ b/wxPython/demo/PyShellWindow.py @@ -0,0 +1,15 @@ + + +from wxPython.lib.pyshell import PyShellWindow + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = PyShellWindow(nb, -1) + return win + +#---------------------------------------------------------------------- + +import wxPython.lib.pyshell + +overview = wxPython.lib.pyshell.__doc__ diff --git a/utils/wxPython/demo/PythonEvents.py b/wxPython/demo/PythonEvents.py similarity index 100% rename from utils/wxPython/demo/PythonEvents.py rename to wxPython/demo/PythonEvents.py diff --git a/utils/wxPython/demo/README.txt b/wxPython/demo/README.txt similarity index 100% rename from utils/wxPython/demo/README.txt rename to wxPython/demo/README.txt diff --git a/utils/wxPython/demo/Sizers.py b/wxPython/demo/Sizers.py similarity index 99% rename from utils/wxPython/demo/Sizers.py rename to wxPython/demo/Sizers.py index 24545c108d..c200aa1fbf 100644 --- a/utils/wxPython/demo/Sizers.py +++ b/wxPython/demo/Sizers.py @@ -481,6 +481,7 @@ class TestFrame(wxFrame): self.SetAutoLayout(true) self.SetSizer(self.sizer) + EVT_CLOSE(self, self.OnCloseWindow) def OnCloseWindow(self, event): self.MakeModal(false) @@ -563,6 +564,7 @@ if __name__ == '__main__': EVT_MENU(self, 200, self.OnExit) self.panel = TestSelectionPanel(self, self) self.SetSize(wxSize(400, 380)) + EVT_CLOSE(self, self.OnCloseWindow) def OnCloseWindow(self, event): self.Destroy() diff --git a/utils/wxPython/demo/SlashDot.py b/wxPython/demo/SlashDot.py similarity index 99% rename from utils/wxPython/demo/SlashDot.py rename to wxPython/demo/SlashDot.py index bacf005620..cebe1438c5 100644 --- a/utils/wxPython/demo/SlashDot.py +++ b/wxPython/demo/SlashDot.py @@ -43,6 +43,7 @@ class HTMLTextView(wxFrame): wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(600,400)) + EVT_CLOSE(self, self.OnCloseWindow) self.mainmenu = wxMenuBar() menu = wxMenu() @@ -155,6 +156,7 @@ class AppStatusBar(wxStatusBar): self.SetStatusWidths([-1, 100]) self.but = wxButton(self, 1001, "Refresh") EVT_BUTTON(self, 1001, parent.OnViewRefresh) + EVT_SIZE(self, self.OnSize) self.OnSize(None) def logprint(self,x): diff --git a/utils/wxPython/demo/Threads.py b/wxPython/demo/Threads.py similarity index 98% rename from utils/wxPython/demo/Threads.py rename to wxPython/demo/Threads.py index 2dabc263b8..19b759aece 100644 --- a/utils/wxPython/demo/Threads.py +++ b/wxPython/demo/Threads.py @@ -77,6 +77,9 @@ class GraphWindow(wxWindow): self.colors = [ wxRED, wxGREEN, wxBLUE, wxCYAN, wxNamedColour("Yellow"), wxNamedColor("Navy") ] + EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) + EVT_PAINT(self, self.OnPaint) + def SetValue(self, index, value): assert index < len(self.values) @@ -185,6 +188,7 @@ class TestFrame(wxFrame): for t in self.threads: t.Start() + EVT_CLOSE(self, self.OnCloseWindow) def OnUpdate(self, evt): diff --git a/utils/wxPython/demo/XMLtreeview.py b/wxPython/demo/XMLtreeview.py similarity index 77% rename from utils/wxPython/demo/XMLtreeview.py rename to wxPython/demo/XMLtreeview.py index 853bd40b8e..c53e4010c9 100644 --- a/utils/wxPython/demo/XMLtreeview.py +++ b/wxPython/demo/XMLtreeview.py @@ -1,9 +1,16 @@ -import string +import string, sys + +py2 = sys.version[0] == '2' from wxPython.wx import * try: - from xml.parsers import pyexpat + if py2: + from xml.parsers import expat + parsermodule = expat + else: + from xml.parsers import pyexpat + parsermodule = pyexpat haveXML = true except ImportError: haveXML = false @@ -12,7 +19,8 @@ except ImportError: 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/', + 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() @@ -26,6 +34,8 @@ else: # Define a handler for start element events def StartElement(self, name, attrs ): + if py2: + name = name.encode() id = self.AppendItem(self.nodeStack[-1], name) self.nodeStack.append(id) @@ -34,12 +44,14 @@ else: def CharacterData(self, data ): if string.strip(data): + if py2: + data = data.encode() self.AppendItem(self.nodeStack[-1], data) def LoadTree(self, filename): # Create a parser - Parser = pyexpat.ParserCreate() + Parser = parsermodule.ParserCreate() # Tell the parser what the start element handler is Parser.StartElementHandler = self.StartElement diff --git a/utils/wxPython/demo/bitmaps/.cvsignore b/wxPython/demo/bitmaps/.cvsignore similarity index 100% rename from utils/wxPython/demo/bitmaps/.cvsignore rename to wxPython/demo/bitmaps/.cvsignore diff --git a/wxPython/demo/bitmaps/01c.gif b/wxPython/demo/bitmaps/01c.gif new file mode 100644 index 0000000000000000000000000000000000000000..37ac5af437443356ebba9b15c4817d22fe1bbd53 GIT binary patch literal 545 zcmZ?wbhEHbbZ1Cl_{abT4Gawp4gdfDSNta)P#K(`qfnfmlUb6OS(K`foLH1noLa)5 z_>+Z^fq{`h2c!X{m4WHMPs7U7Z~2uC7&{s_-`n$>zllkJ!Kq`}t1eCs?&F4+7(ey$ zd$2#T>wch8cSN9RvWAv*2X9hCgqIuCbmMAtUaZK}I31B%m zsr$OCfJdYO!+{1?F99FV21bT97H@$yo&s!*Gg+eqmb`9wpvKN(Wv=jIB_rbn9*(vo zhlCP_rX?Jclsvi=G@A-JEfgfCH!w5ha@xG&lftaj+@e yXaI%*BZnE-F0gh3_65vL#SB&o9$gLx0vH*X7z8c^Gca(8ua4f&cff&>!5RR&a=1x88z?>~9FFUwHXe)#gyzxy0az^vYVJ-b(J|D)eYFJv}~PFni0{b!=B zfNiKhq-CYQY>}rI_t-|9Xy5*Q+pvfvD@e(*D#9~>7N7^uXp~hyHy7L)ZZpp9`jYpM zZu7Nu`kX{O2)5uI2*wwK&ZR`?_!;CTeslc9ZGm3md-7+y=LBf2GnJ@0{(R8+2>G2g z$6NA41}yOAz1Hry>;57~e9>F-n!E4ttKszABl06qYl=!AX zC1XzM>6*SkBs8~&^#d1>3V$+PPo$GL@>8C->B@%tD)- zZ#o;QB0=2paM%{pz#4YVW<;&*W^Gq4lGTbgX2<1;FTXC=OTQ}egGw*Fp%>RKDTm1bkNO{dOwYH)J51jL6#*g zGEEHzA?_XI2p4m8L+TY7;=*^Z2HeKox@Wgo@~CLbw}LzacW+0AxSM(=OM-8(RFsyN z_nWK-f^C+kzNz=EJixfHa>LXMv^AhGr6RI9WlC6yQj9uq^XM89v{{R{mGt^2YgvX&yi8yplh9)Ye)JL2+{c)WQwothD6LYF&hb0{21 XN8gbKPf994EPV5H>KSOm0LT6Vj4T~S literal 0 HcmV?d00001 diff --git a/wxPython/demo/bitmaps/12h.gif b/wxPython/demo/bitmaps/12h.gif new file mode 100644 index 0000000000000000000000000000000000000000..8e368f3fcba0f023981404cff6d9f60941c97bc1 GIT binary patch literal 2770 zcmaJ?U1%KF89jII?958OJNjX124zMW$x_*3(@bhXw<}Rbwi7EVg$*Upmzc3zHwqQa zl5B(uez>lc)Y}&0f+&3`Wt_a0)Ot*7!c7`z$U|8AQa{A7bsxHrv=J$7-Ir|7ot2?2 zv*D_18bR)al0Y zZ%_a7E1T;2>#zM0o63WSs3t4D9#Sl;s1>&&ES1L$F@PT8RX285V;erR8sT{0skkP8 zP(gIydhS8QKztD6I4ZUnV#QlF*z)d5kHLhO7F9*fD^In0hz5VRrweSfh)IR%x8Krd z(Yzy{MK<9rV=r&#TFRPQ>HoMo(pO%-tI&8$Ukx0uIvgNzwbPmlxAMW2>kia3-ngm- zmcuZ-m|qh}!g^m65>rqsAqpve?lyVdn9~v&8pUhS0oITX%>N1v7}{`R?B}^g)A69u z&dv!$bGu;E@4r0HkP(rOM^Gn3Q$;kti+>2Bk1xK2Ly?KNLWF%j*wD3#!_fTB?l`0- zF(5E31yJ#rg#H zO*VncCKDd<$=gkvg8mgbpXQJ;+KybtKyVgq!@KFakRkJ8o^hr(2zs2-7r2c!C0x3v z7ZJ9#JI@;ddt?)8AMk5+_CP&l%Auo$T)Jm`>>}fn1Ah!71RlMO;$0$0^`Z(510l3f z;UHsCK9zY>q_7wq-pd%UG>6cOEPoV5^4>8Str27;CGZvs@{iJzmu1szYqH^1cp1+s zqzNxAq#Ii{6rm*iZFV2PS9JnZ9gs+apr`62QbH&LwR)e}Iu>BronQjgZ%GT^7NsVo z?tlG^MIORHbtr3vb1&%cIGqj}n4ytPE8h+KJTZ{IXqK5-ByYDLrCi z9sYLT(PUgUq)@6||EkGu$S@ z0eSSmYQvsFqIg)@T;Or!zDgk{q0cf>VeU>_d&6v|#tN?(7AsulV$$dZs#|OC1#@j3 zb4nHdoE2O#+^OdfhiJ+Mj^A+5n=x#6-0I~#yAn;ew67(OADLA;jC1ccUY z6J7zN87G0WqUEi@|Hd3k%W9GZD5OkGgnAwdrua34+PA6e3__ zn_Jhy%MJIZ%#F6-&vDl3W(lWxs0HPz=QPlZ2z^uSc?80dgLs^W- zboq$75tYsuB%4-plH&}Anl&@B&^`-2b^_QmdX_X*Ba?N3cmyL!SxydczM0I_8b%&v zSRrQr0BLFPvB`O+8Er`gSoj^qagEz`fL@ph``){3L@y*Ba|~f#+LG@(j|t^qIEIf3 z;844hmgn1|$70m_Jm1!1(I|T|1Nvl*`mGf7N+v$b^|JPAK=Rajm9I7Hzo{m#5t)U~ zT>4LhhkOrejy9V}*o^}BI+i_W&xHF&>@!ymGPl*|7s8C#x!fbc89f5ydxyf>a^cRp zZ%fc$u{8>9V4cJgYq#W-1%dUGYlj5P(_tpL+@;l+(3<{XU=!}6StjHzHuh*QJq0ZX z1K0(gI{6N(uvovW(Bc|p+_Py!E{Cy6_S0CJ@31jd?Q))Wjo?t#1#j$e=Wq}6oaz5f zu!gn^vunN05Im)kCk1By1xPPQycEe{ecs?)~;=!fK1#@&JcBm2hpxh34m+;@i%JL73p zLb9NgvNe`H1fG(7iP#SY;qVo3+3)s6OdXeV-)ZQmkZ~a+gYCT1>Wh{U z>Xv@`!Qt$Xt|0vQ!({8hVdr~~BjDZ7f89Ok3zc3yZ{X;wPbZ-4NU*l$I_#V3 Nji2sy3rqm3{{q%1M-Ko1 literal 0 HcmV?d00001 diff --git a/wxPython/demo/bitmaps/13d.gif b/wxPython/demo/bitmaps/13d.gif new file mode 100644 index 0000000000000000000000000000000000000000..af411147321592de4e336fd82eb5aa42216d1c7d GIT binary patch literal 2800 zcmZ`*PiP$19sb_D*_o9Yji!oYPtB}$WV}Un-F8ZKSg*t~sgqhsOWC%8#?Zow+TavJ zmSibz(c!I>N`|(<6rFOK)(~gtPMZ(iQKiY`9E6W6T&BV>~YZmYTMU;N?sp13L;<5YDDq4XwC!W% zFuO9SRa$6f-#N2~m@-JDz3VRa5I>47y)1^(T0UaxLL=!|SPo(f z@oMQ{206Ayt7KWiQ1UXfy3%wdePgUu(Jol`AIn}JW_^prrT5?H!+0vF8qMEDd( zK^GXVi-0xo_H)iz7}sN&-9=bwslxrtexA;WLE-k1QR8Q$TuM3QgH%#f*<6wy8Q%+s z#`h!P!r$b&1 zqP03yLX+x$3jtY-p33LcX6x!Gq1E{&rxCijwn;@D>7Q|;x@Fw02FBchu* z5K~MltH6rVFXe2FZD9DE_K8h$EE3xUhpFq3^nAy1Shg02c+Q-npE``Xm?8~iHJuCD zx{s*prcwRUn-*{5HYrwfEU?R}s9H03fwGXJ)uo7>*^4cQ`@)`aMiQ8<$R_S=`lynD zKAax0Jvi^$aJcQZpDBjFW8PKNVsB4^lt_EeC+al75A*q;<85@TavSzNWL$jDgf6Hy|(CQ5fqga~G81>h$(S0?~&5j`j>^AubT^T0b&kdQZIo7B^kB3LUK zvRn*Vd)$_!XC$JRlEE*}Z7ZhIXL_8-utChFum|iL)nNKPZoBYXRhE`)i!xOc z&nKh}2M%ZP-9Nf02DRH#4Z0(SE%X0at}^fS6?5rSq0rB;wvxJ%_n=HxEZb(mOHSE^rl!Z8ZVRI<2Y* zKWm8>k;4S0KdS+-TWy1 z@G`LQC_l!s%@axs24%aCpov|W3T~%n;e_Cg0v?60PotMZAXOv-Y`Ma&y;A7P-51pQ zV5R!sgz_p8_5c8207`OdlAle;|0U%A3gmMJf%JdIR)6W_4Uho< zzyJV1000F5@HyrH0Qf!y1cCrS3czO<$N&U#0Dv4oARhquxi0o83?LW?1Y=-O05BLn z1;pS0U~qgA1A`BU!H0n%2E-8iBnacv0|sHJfItjD5XYx5Kzu+D-zPyJF$|Cx2n5Ce zfj>zBQo#Uy+Ege&Iv|h^1qB}l1s{k)41+@KlN1zS3<@xa0!%@n0-{j)Bm;#Gh~m?x z!$4t5L1D_kAO>O(qhJ7o7{C+^DxYFt(4k<^`6LH}DFwr)!IXo+_EUTeu6!IS6dWoH z96A&nI-lg=FlFE{{UjfUEdz%w2Zt>mhbsrir_EQ4Pltog^izC%wj6x6e0;7Pe6F7q zt)r8y^YQ=V|8WOiZ}RhtArQ#N=Q;lXeEeVete>OLD0_?w0sw@X zWF$n@yf#?6Up)`UQ)tKYj=>YlUuAKNw_9bA86{TMO5j2K{W1dD*hW^+MXk6Z;}D-5 z7)rBzE=f+j-&-n3@;Q2GjT=In_nOz9r!tl$_Y|17?N7d2?LnAv)Rr##mK&^cDdv>G z`%ofN!V^N(Vo96i%!)>PJDPt@cpZl?k=f(c)*7d!t786zA_Jf&!{( zWL*LD#daI^KPXyeaRqBrn6pvSmr55}8S|o28bi_{~e<%*RpI^&MMP4b`JExoDKx65plSU(S9 z*c~zW?+U5L@h13Y-%llFF6;Grn5y@K@T(d3zr^8Q{VZ1%KFLnez~g2iigbAixRJ5ZPIX6 zSeXdS1_hq9$yaqWrkPkyMjeV#Cg0rnhB(W@P7MqNsJpW7_-_UCVlZrG*WKx3cb_AZ zVH+f5A^mCq_{9|v`B!*8mimszi97S}10L43X5ssFOOrb-Aw7HAxo`+TmI(%*_Lho< zOU|hw^AvSTV6=x$)1V1z8!qkXv4ur(R71J=c|0e+R)VdLIIC2`2AT+34!bbNIWD@l zPQUJSCAT8DX|dCN1ZjVoli*+|0mq~`*_#wVBU;`f&8f<| z=ukgX^#e*_#ZALlX&joWTO^$hnp9O_(nBJ9#Icf~37vs7Azg0QLJPSK9t8EE7a@W6 zgIR=ADOAV%C}R|$BwtV?KAhD!z%J~ura4Q?j7Xa_X@3V>B^gQC0*s~Gk+2{na4TUR zjT>VOxqvg9^f!V9F4_f5$G@-X_jVu1hR}DzD?maX2TJgkr(k)j zz11COk4v5Nznr@n)4$$udE3||$s_5hR3-~V81vqKSSoXhJu$eNwSGk%rV zA5!0?n1bnlU9UmIGv3RC2a;3+NXr4Jf(gXqmz-44nAsc>i!Dg8ykCdcgF`4)qcp5r z0W*_E^kMn}W)FnC%gGiWMLKkpa(L1m%NxP6?A2D^qf;D5;k5{rx=Ws4YWKb@x_NNh zc2VY4aGpIs2+gW$^y|*wVG~1%+8ZV*< zq_||_(Zt7k0Sh#n`$H!;_9_>W4yT+j4Qz@9!rh_gdG5_}f=c@rWf-W`x&Otx{4qjS z#f!5KQG|Nwe&v4K2t>#pdjUoKtkPOXTa*+``Ne;7csOF8VjO2H&TH~wnFOxJZ_G$3 z)%apoc90)CN{&mOLZtqfcr;YG{z_9bGDPfH|*frl{DTJTxR;JIOh6=z|UQ z?V!^RY(>O}pL9J!Ly7U1+S{RtCfEKZH1+T)(a;EIq5+-IP&rjyg52AB$`7p=fK7j4 zGE-mx64%QViu-0gi%I6nph?I<@_Fu)t{(^vDZ;s!irooJQ15^KeSaq{XRBxAD(8Y8%~Aqs3+p?^ zP@TzyPR7fLoV6NPw>Rlps=c?VrR_iSCP$huG$m9DCiwX}l_$AcaC4Ej*>8-E1`jkF zC7kOM-115#hj3u@x5o5<4y=cIGMH6kMd5&KgFo22YXaE+%Ru^`c8t{ruM^tqO(Rdk zJJZ@ zzswBuXgxDDi|CjJ{l~_BZSjn`hA2H_r;hnGJt0!FZD1Xgjc^MCd{pc6Wu`*cK@eQ% z1|&d|;ogPVA_{};5T-y`%4Sqq3f9Xa@aU;V##m>NA4Nk-6Go|mm?&0I4O3;&-qQU2 zjno@K!6ENS-i^$9Ja4<8RaZVT-=K!7NwBkijNdK(zpD!j7u3H&6l|E$@P$iRb;4q@ z3FQ*phfvlH0oE^;mJOy@M`1w}49{VcCZwh%b*9|!ob97dyWRT>;xB+o*cB1LvaESZ zQw}YEc>y*K1qbTwpZhox08rp-PPQU%!G+Dl-*GGd(hurh{7Z*b%4dM9bT987HdK>| zqjdjChDyK1YUTb&DWPZz?A{*)!C7)TbG>A1MpHtl@(>adV_M48DJ)VeBsZ3=+7Q{s zIu`mR3@@TgVW%&F9y}e4NLDlj2Lp8K*Gx&v8zF2?RpjUgue^!e5sIxkYj`nZ== zBA|{gITq?>?@jcsl%*AF(4Xy0c5EM+QG320MW7dNd1TV*$I5An#{%okSuwXX4|?QP zx7bi)XH?K1X?E-JPGKFn4P%mRq_{!F&{d!r=T}f39I>1d;~gI!Rp7f-VBv^e{Ql^rcxYrN?3*hu|yv`LBv<)MR0gjs}7Amx8vr z$Wk01<3l~vRjT+(K?cA(B$5V#(!ijZt^hJ(k{TF(3KV+$)#!)p@yn1S;cbTZFR;J$ z9LGwmm@`;7#4<)MI)X;9VpK|mS@DrvlAGz{vTp4g772cs?-@CEJ`n)xhLN1Ed`ZYr z+=8mfx<@W$I*G=4O;y{j4Q9Lx;|h^?5)Ro2_)Qcrict`|T#+fmO&WLWoPc9Y&bav) zcPH^ceaVqSd;G;+DsffA^8h*|1rNS}dFnuPgaJZkHSc#34jl~CK*53Eu2J#AfCZTl z7pbGnegj>?&|!Rg97A({La}PR7hs}*6&wWcft$H^>zEE-4t{D~#i8#TQcQw~;~B25 zO-rSZ*x7|s`M3aI#p**F;+e-`roZA0pfX>43%j=krep1}z_C%0QrxLnX*zMuiI3lR z0h0#5%}kKmB4%xNluj&4@71~XP7H;@DM6b^RN^g2rJ^1*YTtwmL6R`2ep+sf;Wd#& zrOQwCsnZ~}f5(BDWp}dP7(gvyxXO%Zg>unnlQF*=O;8fqiD$9_t0X_0T;(_!h)q*> zpe2DLLsvDD>tU7AVq)gyvk?(jAZ=9PG1!W>u;ZIp@CtEr&jNBC3pz|sr^n*!gI~ls zLUYdC#;KJ4e8$zej;geVXp%oJBksDJ^P*0MxTsTC)F0{z) z+(Pmbr5M@b3v@*|fy@)v4?B7>{e53ShC3p{K}ru|%)jthB{c~W&lW!x*Rwdm*9pJk zIc8ap8N};vRJ{^F-TEefjK}i@u7Jld&<41-iPfqb$q?vz1a25SOog?6lgX0mn`ziX zxzzo&Bm+y0srVEpbm=M>ZxW`&NPmU|PP7v2xO~ zJLuF8y1`!4xB5}kgB|9-%%_6Yv9B1s=fc@5M-SicOp-3O{bVoxpE91lwiBAH+^yQM z^Li_|mbu}SWs3%S?V)xX)f#6OYyp5D28*6pC-=)Z|!YLQ%7TA5co z@Ze>GEBb#91&QqCC~N$Q9lxg06D9nfB5p2X9LtT=Q2ZC0<$ZRy1?JNVFQDBfl&m^P zjIb7#GO8pZ5Db}nKYAyzWQg>*=UX_3{5D#hk8>9EU>@z8It@21B)(R+_toyyIgSiS@N3flFiyEF^1ryAK|#(J@ky{= z?bm=w{w6VEZr%7aQHLIje*;*{jhHP}8%n@>f39u53^7TK;2Mak)q?{dl$+7Y3}W0P zLY3J6)Ec+Um?kKnOoRbEA(R!!NyQiRn?e<_O;Zwydtg?e)!M%5zpmje9R)QHMB5iR1x(XmWG~S9&}mG1{o7#ScFsP&uOFEmK$F z_MyPN<3p!n5Ze|5+BY4_TdiHEXyc2H$7lDUv8ZazFv8Vr;-QWLSO08J$*S&%J4%SG zf`~%ZJWr$&k+2yQ%QPv?(lA=bi2N_~*Kqp7MS>&NMS#W9Gb+7kBx{67^c8ZA@1pQb zV1p(j2Qf@F?dJi54<=FR(_HEwv^_88qO`x zMV6XqtyB2`;YPu8g{{Dv4iLi7uOfG* zHre7?Z;-<9h=HqmUVr`_-PcFx8h0zL^wq?>|Jncp))3BRY24c$7bk+HARMq(u+jA0z6ntljF=P#W~gn#;>Fk8(9^GW`IB^TUUO7aH@!f;tB745 zVcZh+A35iX=UbOrHONtV6(*TQ)5G)-!7_6b<=PfKuQFrU@^FSxXCZI+jU3i0iWwGb zE%_R0C^z49j|=zT#`GwoE&;wt!kL=Ic6`w+xX!o%Z=4^P%D{QmgiIV?+JAdf7JF=n z>~0G~7eG6DB_9aBbE*g`nW$NrXqa2IXE+}mj(y zSlRwH4pYz6j%OfvzkpljvFv*vu)qY&hp&#ggMTD|EdSMJYqijmZrmk;$lSPpr`glhE;9T@xnyhdZ9bbFAw){#>DaV~hB&zJ_IjBRE>NS-|o|?yohR#K~ z#?il^0HmX}KzS@%S`{!iFF^S=N3cR0*mVtQ)mGIJ7Qa|;+*(mO?w6!PNnmjb2wej`zcxh;@ zD>V;#@ELChD(Cc8DjBe9QbmjrK(v!8?Ei93w|Yqk{OiVd_!@;GmVrR*{C6$jxeZ-u z!WctDLB8?GNpOGuyHl&0Qn)@|2g(U~S!4opab>fdAloPk71;6bM#=Z6p1j4M$N@@F z*+y3Nw!^m2o}-ubLGHULAY7x5yv)}-+ORtt&o20UDA$@B!C1>9iew$$KG(Q7o{!ZC z^!d~ALNk{u%giK1xPDQoHKcGDQl^77mVP%R3?uAl7Uja^iPJ5VF7DkwTyZB&tCKPLND$leXn5HugxmG-j79!oeou2*VL`Fo}nm4SPcy5 z{#$CLI*O-bFV{du!OHUwS!UNRS9#k1o#lT=+xX z=GWcy=7){IU;cD_ghLtcj|~F2ms0d~J9|T;8Nu3LDfzm-jgI7w6cjPsVIs_v522Y9 zA>`|N4{{JccZ*y%AlstKC8|!pBVt2!dF;)>n`PXb)efQ!%xP15HaN#y5YrAiY3kql zeW7f#y>mK4WV;zNz2?<6*mDK{U278xbwb9UTik~OB`VBO0kjhaVN4F9%6I>bofxk{ zS)o3Vl9=c>$-1V7iXn{ywb6vUg62F@?{Zbuk3&=usk61)hE^VJQ{v_HYV40m{z{Gx zWVi;aO43mWjd7Av53G?TH5S19ZXH5`+R_27EGV~@(`%R!E|%_Qn&cBw#Xo(iK+@H> z#mdkUXVVf5iQuMEHZt%K(7dzy{X37h8s$1mjrB{q$Lm8rgq%4+wjMh*JYyzRA^3)m ziUt&NHgU@Wz0Mopnjt2tZDt6jWlFj-2kE@#qud5v_U}ych058MRRge|++GTeRVuR? z#}{CxqT^t0cu!x_;HPT9{M3mSs9mJ%iDr$V!rPR!r}W?1B-jf=^pQstM;2(vlqDfx z{OLM36*@x_mot2TWp)7KPblr!%RzKHQ!|wiUa4;--ccjWgBhm=dg$O~9}c{9zT@A# zUpxd8-p%r&fbzJTBzsv0?7SwA@a@RDNb+5@-$&7)l4&32pkQ!wg)ELBQv9hHg0{c< z3UunRl?FvvEc>!KbrjKey`_eZj?QuB1zWboMMpA6%h&vR*<=?wl^jjX^LGh=fYEPq zqtRg;JVNI8C-}OiK`3w8)`iv%^%*9yIOYpaaEmI>gV^ag6`(_Pif{em1{E_pD(?RJ zK`M>@@)mem9_9x;Zw{zuQea;<9JPMO(#-%X6*vyOp<=G5m?r6NS-$}5glY_|3}6ci zE9giPip53vZPQj3VFpm*zR0SWW+M|pF%_&3%lK?hzsHqRNKh$aB|*WRfTnS|SSkjs z86BlCtEcK2JTU!5aV^fN2j9?}PAjiK!&8Lif+?8nNUhoYp|w~8)@;YQzV5e-*q@#P zy1)IZ5dDuuOU-_SQ9{;YY{&IEgy+vNSkm*>JdH$DMA|d?24SLRdoV)$ z*3#IFR^t8xF{JY8+Qu+-Wz6t5J1_?n8^s3=HeDXiO9S8C@SyCf_l|lmTiQ$2>7J{2 z5}_<~H~&k;q1nnE4Bp&WQOj%7&8n*2F$(P*pUsF1G|W`*VPvjJO@2nc=oF^~8T&$Y-A+YvsTbsw6OTvRlQ;uXp>spd`jvI7?h0=$cz`<3k~9fyhZUZn0>4 z=ojd@XT(_@JKyKrJF?jtm^bYcPC{{CW3g^P+$D^w#aYAB%uRG}1c%Q?ISQf6r|ZjC``Vx2ZI021Ci@u=HS)$gB7M z@FoAC=4)e{8*bfomnUVBuSxr(A$7sTKp{1$R~iPhyRzb7!`PMJCZ@3Pfr$2(R&Z|3 zmLIz9W$=W8yr!%XgI#&sjU``{LW8}Wa@+B6o?Bn`5fv>uL3bFRTJ?k83|ra;`MdoO zUT_fcm*upNE&ul?{Q*pa^!~U_nmja~j2grrU*`V9ST|q%vt8>~)qh}g@?fvboh~R+tIPokJJZI1{W-r9J~EXKBW5I2 z3RHzVWN6rm`xlY-weLTzJ{H5lU4*qx7aRR2oobc_)71OU@~%rOTVA)Ot*=JDbq#44 zvWbyMZpQdaCi8f1pwN;0p^z~TPs4{i_I9mpBd4L*Gv0b$8!LX^!Tr(1A~A#8x6R%;@8b=PdBYBygj!Ek(6?%JOAfv}JhM2`J$F$MsP4sFyUyp?LHRDH)>qVs5QV=mVZnMS$|-V$mRJ zDf{mc&IYXg0jrq6Bb2kZH7>1v_M@sE^*=ZK`+Pl43BmsA;O~ZUyxpiRThe$7--+L9 zrRmvFp*Xsus71f41xLyEi2^C2H)?nNIXMtk|IpmTMO}Ms>}cq~kXwP7JoBGhSuW~R z9L8535?nPXv4s6woBOHJnxg?yB@KMUC1Y~_`oh}va=+rz?Y*EP%?t-$yg1D)0sp)Z zpCYJ*p&Mk}ITUNai=#Wqm-0W%hIaV*sn2;f>?@GT|q0N6e>)5{E zvZ?1lGTM9HPaHNfov-thnxY;tF@Wq(5Vug})8#n!ZVP&4kcgiV( zh&vCXfR!|Zq-pY-XI$7@+~&<0B9L`U08LE0z9d4SaQ z;rIX2qE=|!j&}o&+{C2+aQUSc6w#_qeg8+X=@~p1d)X7hm^`2+Nl&FC z2dln2tx$BARCLI*s+5O9@?EEvi64hLw%7&YzVvijzJoVJR+2b~3cW2_SfBL6XZ5LT z+fZ1*fw2v0mHum7flKtZ$`E``mGU)cubEuxhaI8Sf8T0FatK~050{SHxS6G<%S*ZD z?|2}&=(X`n4TsD*T4Gb;bmj`*BJXoUt$qsr$J#go=YsKWi#Os}!9~s)lDw$pAykZM zy<9>8jFH}D%AvF;MKK&r(QA#W+AzXCe;*UdGgspEfZ-Ce+`$?Kl1x!(Ky+tuuQ0&` ziuU^7m&L4%(ek6{Jb>&$WYGOPo=Sd8maw@ALO3wT_TW$@6MuQ@tIagpRuKa$S{LHK z(frm%;V`ELwrDE#Gp&DJx8J-Us>`h#Jp?8GGsjR=Dw%@<-MU8o*Gh!*1^}zyei3jD zU;fAitURnUSeFqGKeKg}{!PO)+F1C0k%q$1AJ=oV6|oHQh@f8zj@n0anqQZ)u~lZ^ zuC&fdmxL=v)8N)wCNqXI$1MB2<6WzW-kMLM&R>)OdW#Sjumu|dwuDMgFG92Q42hz` z-!pn$VrGKl4$h!K{Qpev$AsU#)$SQer3a-mQTl!(y2vi<4!O9ZSK^=_mS~yg=IUid|$x&+ZyJjznKA6nyd&{ac!LkGGVq$G`kjGl-v-renW7bbS^O3mSqWE4+_Rz% z!PLXgd>MmcQw#C(3Gkqj(->yQQ{zT;2kFI*z0+LK4f+edk7PME03=;pDj|Cx2we;X zHeWA_3|r#z&(cz*#$~g5!@y;ShBiML)X%?y>aoiU+}(Bv%ZEX`5u4op{%~}oeMtB5 zv&08IBSGH_6h+C~_^RW77QHdb|=0hv5q!krWIF&s9=Qt;%Hk`?G`8 z$C;5Dy`Ux`l(rSgiq0||?fnR4ElHJU8@K_UoG9o6;!hmRh&GB$(+#%Ad<}5DIp2LR zDreM%>P4{@J?j~5!l-Ut7wSZhBlA%?gA_LU*%^40yp*1QjL{7n?N$&y-AyDYNj%`k zS;O4qu z>)Q`6w~eJ;2i&)i4UPj?$aA6WcH`&Tp}aQk%%6hEyBwpEhaC4#OS=`Pn!Ww3Z+~=& ziUh8?|Lg1F78pm16vaSMKfn5oVsxp2azKovD@IsSnj(`?<|!hj;^fX3{5|Ctx6JUt z9&fvz-uvNYiB`?i*ngJqCbwCRCrjG4(kNm9qsLbbkty~uzLH;Cw}tlboRP!ft+%SR9;uu*8fv?9ik#!I1)pRkEndZVMxa z35dbY2a3T{A%`JTPnL#c#74`p*q33^`i)=mXgZEQ?Ye86*OPa76j{c=itvYdLO@A2 z#r+=G*J|W$alUvS|5h!i5RA>U_LFEHOTylf()K)pD81+p3DJ|U~7WJk<M>Bwz=6}18On3>IYiN1SSc*Q|Z}wXRNLJNT)LaW*#xr z=HmsynN6rbX$sV=w&J=0l@k6K+0Al>$by)ugWEjHWl>5oT>Y|Py4*nGy`eZ-%GqOg znjz;@L~oA$_^SS&3FEzY=nrD7oX%amyl)3-Y1a;PL8(Lmf-Rn}kNjS=G}aM;(l+f0{5p8- z^FcR6&;n6GoOCj#Syk{R@mJO&nq3~N_#8}j{6@*nqN~Es)dcz5`+a1uq(RmN{c z8Wa-r=^jd5tQbj3#KdG|;aKlDGQ2vPDsp($U^!gYSoGaDLSxd%`3N*K&u6o>ee%?L z+8sph+Q8F|R~JK@QY+WekA@OXIVpEUNUuM#dpbWK9I^^Kt7U26zlVh+5oXixitU*) zuS$lt9sLMIuX}_?eCQ#PKnY>ABwQ}V{`i5!XOzHNk;U)ndIq`v{seL$MT>4XBfm&+ zd0?2mZP1s%tDsx!>52xjNs0Aluq#@8zBru(_H-YdUpcfj@;-tmtUMed$B)Hd1;sG1 z<5HGxr4<4=Um9Yda?dX`Lfa-hm%qUVl>ZsO7stFaWvyM688p_yAE18t7i!1W5>!u6 zEX-8^vy%nPf=;tPpm~2&nj^=eJfkX!I>za28mmkhLdyqYX-X%i*T!#gd7how^L6uf z`i0KTK%&fGHO^*n(>>wlnkF6kvO)ra+$HhSy8Af>`)*2f+JQ)((}vC1ahlm zvcg{c-?NHh1v4Act7^}VpE53f&wV5c&>!RYRKK?-xBu=Ldqtne$OMOQWJSl-Yy)@> z-PrcxZ{Vb%MZNLyN2D;vM`!J^xgb10mdEP2p6R1F z7gHz{Hv{5ycWG2N z6aHdMfm(ay4K%NLNehfUjVI~ln_HvonygM2MUS19$|@5+X%sim4(0I@xse1>W7u-S zj~?OhJGIbRILA`!Ql5UVv^jWYWM3=ta0CeRK6dmH{Vd65NG2ejy=j!M5LHz%gHtoNT5c)C`{@J|~tkNM^0CLir?SmkmY1t#Y}dV@1V#Lo3-Iof0#H+v3p^va0ga(6E> zCd{Ea&YoXgqVZp~4vbe3sYg>-8iL&~rhT|7G2}Bfyu?l$Mn+~PcD!vbEDcn#4>nHR3lZ12N4zj5;oT?!trKpwYCQcdPdHC~}L;6~7`R$-cgda)fq??6p%F z4f;Lv5F_2uS60;u-pxFL>4uVciQtRtuV(ccy(b8YiIS}!w{Qh8p2%Wl9@q28u%mcN zAvOO7%ru%XYqH}tRGLU7Yg^DIvCLnavJMKO)6`@j2>$Kg)fWTLCZmQ?2; z??QT27m{qjRaoU#P{BgVjnFmWR%Z@!Dv|`}sBkO|DrHEuM=E|C1_rctWPj;+c*IXR z{ROz|EGQ+Hl&o7~WrFpvhtvTH3p7s#rFWBpgjdulca*RHF&wn4?@CAgi1MbyEG}l0 zU)7&9A={z~F`h}7a#KOZQ%#KW%GO6ex3#%sUBKb4ZvnVH|07+PxO%k%jg3xJI52fe ztYZgK6(BPz*HCEMKjAaY#l01q08j&?af4KD=g4);1f>e0I}4K?tW><&idMX!78u&t zSYr;dumA~4sE99F{BJ~^t2tn^KT=c+DJ-?NXOhF;N_o)mFnz)pZ`~v(0dc?9Sac8R zl+m6{tkWVJ^)i6#pVxLnb%JC}gkBppEfA+^Qh(ge*y6|~>m&3GZc%m;!zmL!V^Y6z+6vU9tTFV#-MmiY8QPhx!wA zyi3somxYBhRg~|q8A3)aA`TCSMaZsvfvG?R0>uVNRQr5sP*pSqQqnULjX2{wG}1A# z63P1SOxEVoaHA~w-?6K=#BY(x%S5$U>uY5zZ$RGLd{t?O!SQM)qi+bO0y%dZ?o`N_ z7A8P`%^mt`O+u%B4JSW#G`Ch@#Jmc)hjCOew0tQKe#(h z)ZD_79Vtv54LaWmeo|<|EgVlJUps~{Xa~nG_TQs1>2{-Sjfd}`$1kN;i?8lZRW7)4 zU>V2bi?0sF2Rga+hO0LZmaQB>CK}Ot>cqtTY6r2uW*rof^uUSbZldZtE^GmJ1#657 z0m6Rr3)RZuRMsTZTm?Y=_dVHCKyM)I0ww$(dnaNW)s8`28V=s!cStpZYR7-C@x&CY7vZfBNfxcVWm;mXK(f>w)masVHZ|5R0xurpT98MDRn zRoRw$2OCP}2|Yq##~+UEavk*TD~%FD+X@1|!ND<<&58<9AN@4gQ19YG1lEiueQQSG z4A}hoHNc19BJmo%l-gYmg?qbI$tv?j4spu25-LG^yK`T?GSr({vEBsPX`^dss0dOm zHPS=n0c$0S;ViI3tLU=MlxRDD6HFo(@DClq5iQ{QHDji|rj~xy^ptcjChw};G=<(( zg6FHb&tl;3a%vyRx_c#;KW}dKt!~VzD(9wRPxF*_1WuFvPAv>pHKLC2eW9|_Je5Bd z;1UFpXC+;RgVrY&@bT)A)s?5xJLkUirg#6{t_!>$S!bIK@Giy9s{xe0Jy3G~3pq!S zb)Cp^_+iZDu<8+)_wxEobYy4$BL#EPg6pmsRz~T0-kv?5h4VbT5Gi+X`uY*A@YjVE ziVSp$zPg(@ydbDH#-J|PxgW+}oW9i6kB6k^^kP9+;Q8P6`|Wk$pOJyOIS2dzE$9As z%`Fc$z*+bXZUIhDuyOI$)JbpPMOGF8NpWrU_J&zTHnrbw0mhth;cO7Lk;Yy9X?Ez2 zM+kGl5IvYHZh-2ejeJw%waQXZI@I^zVFOvXVi$jEt8B+5OMW)C@A=?I-|KSV%fG;v z1Is?`w>xfaCx5QFf``}bd0frOV7{|LhfE){^7}&ii^My%fLQzWAgToHTCs7>36~U@Uj+@hD=2C(_BMHTy@A`2y6e}26ZpbI zaec2dyMebqHlIGoXS*j-c098(Vm<2DjP~^waU?lhEGEk|EA-cKcDY9;P$ESWyEo(&+wlJn`ER0EJi)7xpI3@lO?R*t)cPwbow#Hv)=iXFl^cn z$aU6FH5EZ6sT<70poo+tWjlu>R6&OMjH#E{BQ$F5HrwCOxkf-1{+h5bTLT2ph!;bK zuEn@c`Vr0HI^*A~uIqrOs=R*(Jbi!v9b5?bs7m?aelc@Ig#<$w+Va~k@l0OgfZl$@ zPx&6h2j?S>fwF0p<&p-eb1++>f{5;5v=;K|-T?>IKXiQ>*<}y4&`!NYKkSlRfehm= zmD_1ZT>u)A{RA@`0{x+bEP1btw}9I!L;d$F&W@b=Lu4OZV2kob_wNlpu22@5Et6H; zUvWxhz;bde*tUa<%_c{-ip%Uy|KBX^d>P?Aai7~hI{~&ro5bTC2ilO5nQsPIcAStP zBwHI%{h9IK@cZ4hSZH@Z`RzX=1O~s0W9nDdx9#=g0~Jf@%k(+&=a=nF2l_Pd$gAxx zt0TuIp;M(hJ-OGz>t357nICEx;CM_?1kY{c$~(|0XWo3abh9OnEpGs}zSg_?x4HzQ zjeZjAfT}iJ(D!t?qO8{ItBCfNW6T3LhD%cLzDeWt2&L|p4XCz=$_ajX;fJN_ylzlu za4`!ej#`AA6bfyB$R#i=fR6TkpBHFrYKqmLe^Rz8bhjw)q?1-#a3EmE)Kg})*giY0 z2KEO$d`oc!q$vH$i^}VNj?}Z9wH$VKK%}dh-q?^Y?dy}Tl=Irb#YN2>us@k9^nHKm zuq`ZCl1)eSnTsJF7?fT}(V@oR9N5=jg>l-a3BJD*_kJJbKCIP~c0C1C>dm4n>+mBCk(CCO|& zA*UbBQOZ2#viO@}DDIMy2f=5?)@TzRq_ZugEAhIE);PC+6X7r(0?Un-il^=ej{>Vx z|4evqbIlY*y~}E^ZocT8*_wX)a)C5lZ;ol!Svq8VQCZ{~h4T|U_O1AEayH02YQGHq zs6m!sz(?hLZ!09$wMH-^74^4WGq)049lNPaFEkfha})7i&Dqit*DE;c(9!W9hjpOp z$v_w5s%*z)xPvTt<;9n6!>|Ve83XPwl5H98V&d*Mj8(MDw)1vji4YM_q{b4=v5d8u64^}o6}??s zm?o%i{4H$yzYr&24@xdK1{8y_eL0_PpyW@Hwip|)KD6J`E9E{?PuQp2bj#r=4|sp2 zfTHv_h@mWUEBf}jK0O*AY23y#F05dtxZYwb#o*iL8FQm@Avq}KD)+*W5M3jJ=qSIs zRbj!?y0PoZuw}}Sw=icxg*RCd2&|{5^m5Af?wV&~Fn`NYJUbGieSQU1%3K|}Kja{+ zKo?8hy3vJ2J6iOo{WaE57shkegy#3$c||&cC}|N#3REfJF4VwNFZyNcHA9q%WufZ!d`afc5q~}mv~!o z8S`l7Hi4IwQ!&aZDkr)_Als53vE1)4f>N11FtSV-=~Z~p3TZq(MQZa$>ExZfe4Pw* z58|!+Gs}_jIA%lDqEjwnwM)r>-m9jY{h5Tx%$=*_*UF0xzK9QIvM&%$Q4iy(J6B&S z%cjDx#PwY(n&k1)CVzqU?s!`STXGGHI=n-zR<=5!UMw!mQ;FQ&&LSz=C!>R z(ulx?cYG63$-q4alZ&XjO6qC(5d|!50o|XMnt=+IN=g{e(pp`{@+^hy9Ia7)soeJa zMx?U9jH+YYGDe}qC#c?ylukXUKm=#~1etD;$@b=d=O2Ej`T|`loE|gF9wJvJhXM0J za~B(#Ehv>Ox4YEHiqyXXdoYIonR6M)hzfw~XrWba_-O4uHnrkl(bEW8q8*I~6u4gt zA<}$~j+wL?OKzD2qnykqFy&n=S8}{F@2fdoPJ@m#eZKzgms3-<*ZNWQ#hlEz*9rQ| zuN;kFAsi#0j!=HH4#DEIW{&hix~})gfkcVqa041ZkVc8vYW)bt34v)(`pTuklF-$=1+)C&OrJ^!szHt)fDn9>3N;nJ zq3Q8f;;P|4zMO|v@%NZ$dSQ)7oztKt9@?&DObS(^k1&NeoKL12ppCE{{mi=gjmnT+ zyQat8Rh|$r*Aw%Z<2AN9CnMiO+7A%J!(G_jRe-*jkdBN~V4t|=(UFZh6d z?3b7n?-qN-Jzs^dQc}pPZoXx_U;lM75s=@87shUjA-d z*IJ@;$@bL0>-kY1G><%<|FeWwV_O7#vKZ>}jb1*~3sfG?&{=oCoPw7b+t9x`*Mz45Rbuk zD-_N>iDk*#lZ3=qo|GdR2}7i=?$ReM%B23C3$>^ro@k>T@mdRu5DaZ|MS<(9j^Ng(2>^J*8NawnTm&luau)|KGVmNMUNvR?J#Goj>Z)5 zPIOKi@H_I(=b_Cvq}FrZrZRHehg|DTe7xt|MCIL3=nno9CN-i-7Wt(JKecGIG!*1U z`DzS76DH{_E8@ke`$j0g)wjemsTnW!61PBCuI{@x$2Q=veBEIZ+RvF`9OmXAkW}Xh z_v&3AsI6s+xRx+{ao*Qkx@*x_`gbx?MX}oEkd3fEEN_Ti`4vmjEpM?e4`qJUq1tu+ zRs72FgGbGvdmT)KRM1J?)?zP_;V%p^5dykH!IoFw9Gj0qX#uSnzw0Oj9SdtjkF-tq zuX%Gt?hGe?JtQJxr9+`7AyuOoYtdu54ivkpaX>r!!N0irl%gO+V3mY!=j{ojk9=`6 zJSlTg-p*74_W-2fR$1&LZQqu~Dm(wyWE literal 0 HcmV?d00001 diff --git a/utils/wxPython/tests/bitmaps/copy.bmp b/wxPython/demo/bitmaps/copy.bmp similarity index 100% rename from utils/wxPython/tests/bitmaps/copy.bmp rename to wxPython/demo/bitmaps/copy.bmp diff --git a/utils/wxPython/demo/bitmaps/image.bmp b/wxPython/demo/bitmaps/image.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/image.bmp rename to wxPython/demo/bitmaps/image.bmp diff --git a/utils/wxPython/demo/bitmaps/image.gif b/wxPython/demo/bitmaps/image.gif similarity index 100% rename from utils/wxPython/demo/bitmaps/image.gif rename to wxPython/demo/bitmaps/image.gif diff --git a/utils/wxPython/demo/bitmaps/image.jpg b/wxPython/demo/bitmaps/image.jpg similarity index 100% rename from utils/wxPython/demo/bitmaps/image.jpg rename to wxPython/demo/bitmaps/image.jpg diff --git a/utils/wxPython/demo/bitmaps/image.png b/wxPython/demo/bitmaps/image.png similarity index 100% rename from utils/wxPython/demo/bitmaps/image.png rename to wxPython/demo/bitmaps/image.png diff --git a/utils/wxPython/demo/bitmaps/lb1.bmp b/wxPython/demo/bitmaps/lb1.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/lb1.bmp rename to wxPython/demo/bitmaps/lb1.bmp diff --git a/utils/wxPython/demo/bitmaps/lb2.bmp b/wxPython/demo/bitmaps/lb2.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/lb2.bmp rename to wxPython/demo/bitmaps/lb2.bmp diff --git a/utils/wxPython/tests/bitmaps/mondrian.ico b/wxPython/demo/bitmaps/mondrian.ico similarity index 100% rename from utils/wxPython/tests/bitmaps/mondrian.ico rename to wxPython/demo/bitmaps/mondrian.ico diff --git a/utils/wxPython/tests/bitmaps/new.bmp b/wxPython/demo/bitmaps/new.bmp similarity index 100% rename from utils/wxPython/tests/bitmaps/new.bmp rename to wxPython/demo/bitmaps/new.bmp diff --git a/utils/wxPython/demo/bitmaps/open.bmp b/wxPython/demo/bitmaps/open.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/open.bmp rename to wxPython/demo/bitmaps/open.bmp diff --git a/utils/wxPython/tests/bitmaps/paste.bmp b/wxPython/demo/bitmaps/paste.bmp similarity index 100% rename from utils/wxPython/tests/bitmaps/paste.bmp rename to wxPython/demo/bitmaps/paste.bmp diff --git a/wxPython/demo/bitmaps/robin.jpg b/wxPython/demo/bitmaps/robin.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f559cad0c186e2162a7683a94e77b29b7a86a444 GIT binary patch literal 4799 zcmb7{XIN8RmxfbFCQlv?fBAp;bP^yBINbgDsC?Z8r z=?F;GfG83~MWnZhe)G;d^K;hO|IW4db)WOBXRWnQXHH1~gu%s27Xd&Z5RgN80H^Z+ z9RL^v`m-oOMOhFU2!x6XLPt#vrGeAI;V?QFjGloRLC?U%0D~de5lk$sY;0_BMkEJ2 zD+eH><-sp`SR{f23xA5}1h!g#L*53C^19U}wkdXG3cFe2oi%#zne4ZGnT)a6n zjJ-7Dr#DbrcU+uac(!b7QgqAjqqcROY}@0An6-x`GM8kWdM-_@eAR)m#nC^??I+~l zQf6=Ay|2BUkdcP4J_Qht_Q~hr%!5{)#Zdt-#Luib8KT^#-eacL`xKq+Zg+kG_urga z_!4pyY;4qbul9o7!>HFP(>aY7Z*_`s%4VCd)wsJ}qVlITA|e#&d!X4ARZB&X7K{ z;P;!9p1%#PYi_-ob;(7oG9dL$X=07r_n`Asxpa=>N$~wjk1Yu-q>#O^cp`9CjO{bC zezWhm(3re%9j|7YhvX%J43ME}14RM}1ONo0h!3O!f&U`|MG-0pfQcE3U=d^$K*?j+ z6@*1JDT>fglmbFPr+}o$=5J&+rH=CZ!>0BG^2g?!IkI}KhLB9ttIvg2Z`2=3Z1)}! zzm-0L9b9vg5>uLDeE#NxyU#PdI^A{N+#t?gcj#QW?|eP4{1v@OL8|xsCe3|njtlF1 z8=1Ij`l^O$HFp&2kE)*S-F2xVAz`6fHuGEoAp?#y)>|zO_M9D{GQk2^c`aM&HE+U^ zVj29!;?6X^gH-)Qtkp|bqqUAfYDofwdZI+Ce}{b7gk4mO!FeZgiJ?mO-rTrkZ_&OK zI=g7Im15`mOMpz=%5P6M7k%+GpR<3g$@QDU{Kt{x*UDhs2(2kPcdD4(kMv|&} zBt9>%Ek0`)>gm1qZdEjK_{nDWav#?eoMzPbE>l^5j|kV0#eQ~9xRGWn|6MDuo^G)M zhHS~`I^63!t-W3RKb-02|YD!AobFHEMd(N-)+z#1~hg%Lp ziG6DiwJq#rrLb|Sy{z)8rvUvmf|BMT@3vZF1mBM}*-q}Q6uzEF`um@4O8c6x(@ZFH zCl|H4`yiJ|n~kI7nzN6E(#nl;QpRTU@nr{3e?FO)proKM6X0(KLjElTl=?u$gkTnw zN3pO9Xqn6X%|1${&;XwB(zoK0k3?pDeL3|o=j$+a^-~?Fsd={t1>r1Kgjm@SkxK(! zx;Ha@E(ghUB{6@?vZ2eeu$wl1l5J`dCeb2nEbT6wThpzENm6qyTJ!NE?PU8hZ@O~q z@7;7ISnn7(s$OYYqjkC*rP57Z$hmVKWqGJUfkaUtL4Qp0KafBWfC)^65R_-uVi7=@ z|3w7-LHtlduC}kNWViBmdH;?dro?qWt;%VtJ+Fl?f-^hvTj{WA7E}^Du%#;B6lxSY zBc~w0Lf<$!60e*=2I-k8Fr(oE`?NA6gIDpE!!8ZUUu3MRZ8`YPR3+^zU>Q(r!w&ud z__H*SAZjvSxz*l$vSXXc@t|_?Ym~rn0&eUzk zLJpp?omcqg9C)JAI^N_X1N}Eqk=MV^f2lHWEKRx3dtKFl%hvZphhjM`$ARx+g~#K$netsI{Fy=589XDY=c5!*lv&^7wjJ zNH%UI%vSUUKi9g`8%VE6br?9Yow9+@8W*U(O`Ey6&>rvKL}b0g4>*zzNvOVfv~GZwtJJUeDIN zpPidSAxT9l+{EyEEpHmPY~Of*gQ(ybc%he=*T%`m+rii|W?8z@^gG>ivhNUgPW$b7 zTvvU@2iae+H24b*xXz?sb62g9`zfF?+3kz`q5N=xL$?d)UAfE+C&4RsWW#*Q5jeS^ zUPkal1lifTWk7#`aZZ%&O^bAJF4y+~JD-xElkRmH?>-%~_;UIo8=W8_)Y&_?p<$Yv zc{f7A?aJ9)x$5_ZN0g{--*!C8n81lADcQ^udm`aSnq7*`P`Ug{%#vnS+V=NrwYL|L zNpHp1yAw!DrrUq)B#NMP_y5FyI|>M3qNJrc)*lfgkXh2yz4UYQpPr*3*p-q?8?YtI ze4@HXjG|#Di5!5)MfFRG6~@r?v9xOp7^|GCNHS5ryxIC2q9w*!?ilDx&lIaPlT%7nnv^M7f0jJXUbxpE<{XyG=CMZG91Wfq^N@Zu#pNjUT z)R0%V6gsyWva5*mmXEA-Q?y~MF)!f0kG7>b0Ly-WwOv6L-I)L@SV`aB%570Vsx za`7MZ;6r@`IA0hmPrDGEd!JJ^-TWEcqU5bWGj-S-h0cwZ=C*4|@GUYoXib<|-cU9VYX* z-HUG?E9nylosFzWyoh)_X?fh4@jm?I-rEBbnP2-sa={pUT)V|P+QgZ=e&&|+B5ddF zwTHrXAD(8_^7fW#lPVq?tVS5?T@OBV{G#5vWN&ej9O>?Io9u?!${>vS^~zgadtBqC zB}w$yhF(vP)zSGWE$9*GM+9ei^9U0=8Vv-;FRSz*xsH_?MJ1=?t&ki(P_Yzu_$y;i zC!_Bc5lDrr{flj>O$*(gtAcoD6~n6hCYPh$jdZf3@b}_!d5^&I{*Xz3}uL!*8{=Vs&}VBU9!#PJ9lVymnLE)Ub_=YcX#6uKj{tsI#C~0~ z>r~3461wH>E+cAXHkA$mYkMg%jZLqf{X|6jKp$Ghqgd6>9&@K@#m08p^Xh${&}&rz zLkdBAydKBD&(^H*>N z$v)*tkb%wdE_x*)I?as_Qj*L3eF_(9dy|pA=K_IOhb$%V6UG{;$zBUESZyS!<+_-f zJI{$}Ugf^)7WT>!yUckdBZ04)8b%aX1RS_=7jj?k2@zKyUw5O%3;Nk}h$ZKM)-_3m zCCcBVwQlsZ*$xp>YRBh}87ECxm9%goL3xc{56@OQ0{3%D_(3S8sL`q@4?AAXy6K+e(^_;Krv>g?DDB?&y5PEEF5* zl@a8u`76WrtX9tK15>}UMa`a=r_G+i0SOY0M}}Do^efp69y6`S>HNPy&%Ca8t#l!L}iq#v^D0P`8OHpW8)<4fNVY}@blV}Tyrs_?E z5nEW^tx7ITaq7KM3DVvQ=g@2ivMmcO1b zx<<|%o+^B>_UY_@0Vy3v#Q*>R literal 0 HcmV?d00001 diff --git a/utils/wxPython/demo/bitmaps/smiles.bmp b/wxPython/demo/bitmaps/smiles.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/smiles.bmp rename to wxPython/demo/bitmaps/smiles.bmp diff --git a/utils/wxPython/demo/bitmaps/smiles.ico b/wxPython/demo/bitmaps/smiles.ico similarity index 100% rename from utils/wxPython/demo/bitmaps/smiles.ico rename to wxPython/demo/bitmaps/smiles.ico diff --git a/utils/wxPython/demo/bitmaps/splash.gif b/wxPython/demo/bitmaps/splash.gif similarity index 100% rename from utils/wxPython/demo/bitmaps/splash.gif rename to wxPython/demo/bitmaps/splash.gif diff --git a/utils/wxPython/tests/bitmaps/test2.bmp b/wxPython/demo/bitmaps/test2.bmp similarity index 78% rename from utils/wxPython/tests/bitmaps/test2.bmp rename to wxPython/demo/bitmaps/test2.bmp index 3a6547321271e48f304443d3597480f9e1b6f448..6f57c102c11423944009c3a3e1fb485450ffe66f 100644 GIT binary patch delta 533 zcmY+9O-lk%6o&6uj*O0E2$^U)sdHx>9TgHo2&P?|urDZr!lAY;{P+V!(N@Q^4VsOu zf*`?VxCz=R^ap0s4+z>%bFW{uxZL+X=Y7vPx3Bm0HfDo9gn~XJdj`k(Tcc7kbQTWt zcT{n3!BjwtczRXWQy3a-1cYdp-qz$c*Saob!y^uZ9-B!aPUV9`t+_M>O7~NacYP*> z1eF2N@s8z4j5?BoYrhA2$qwn?#z}bNIcTO%7m#hkFjXQrAg_QW20#_76t~0~Ht{8F zW1iwYT%Nj3d_~cc^atrMkjBoTv^96KVB!O(#PMa+-a)TNXhdeW=k)osBIHD7ytausXecM7u&iW^0SlTMUbOAWuLPL|a!l+G6@F0R z8>wGN`9$&ulHQ#y$RgE@MB=qv(aFZ=SrdD~&IrJ`6{s^CkRJ~fL(o+3$;(UgvG}m7{=kO- delta 691 zcmZvYze^)Q6vv0GnYhRLBVaIIqHdDSZW6O`#nZz>h=rh)5-dbG$-;q^&E0XmrG;R| zR|{!!l_0r*rQ{01?iBw3(_CQ}L9h|mH#1oi&|#MS@_FBR-#2sSp1Bp160unR>xlQx zV)ZZmK8EW;fvwLmmkxP^_>}))X8IRfn`f>{WrfvOp%@D_%7Ncw0gpgEI0kyW=F3)B zR>x}!o`I?v1$UyW^+~CZk+*tuRhPVEpg+;odQ$3e8vPx8osOYaVQ(M=jnt9IVP+D} zH5GmuTgoEl{xjw!&&I$tK7gGrD=Wwk(~^fX5uEKCESZ|JjeOl)5Pr#bm3?GG)+-C{ z;KT6yE<=@$LetWebDm-?`lqOH@C%o)tZECSvO@lBkgGeMnt9_p%@$!esKKXfRCz+n z-~0r$Ee#I(qJTq)2S;xhM92lDi?9OJZGI5P}=ZQ4e;3_YNaA<_JaHe>t6ch9DQZv!;?9YK0D7pYT diff --git a/utils/wxPython/demo/bitmaps/test_image.png b/wxPython/demo/bitmaps/test_image.png similarity index 100% rename from utils/wxPython/demo/bitmaps/test_image.png rename to wxPython/demo/bitmaps/test_image.png diff --git a/utils/wxPython/demo/bitmaps/test_mask.bmp b/wxPython/demo/bitmaps/test_mask.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/test_mask.bmp rename to wxPython/demo/bitmaps/test_mask.bmp diff --git a/utils/wxPython/demo/bitmaps/tog1.bmp b/wxPython/demo/bitmaps/tog1.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/tog1.bmp rename to wxPython/demo/bitmaps/tog1.bmp diff --git a/utils/wxPython/demo/bitmaps/tog2.bmp b/wxPython/demo/bitmaps/tog2.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/tog2.bmp rename to wxPython/demo/bitmaps/tog2.bmp diff --git a/wxPython/demo/data/.cvsignore b/wxPython/demo/data/.cvsignore new file mode 100644 index 0000000000..bf39d8ec3b --- /dev/null +++ b/wxPython/demo/data/.cvsignore @@ -0,0 +1,2 @@ +golf.pdf +showTips diff --git a/wxPython/demo/data/echo.py b/wxPython/demo/data/echo.py new file mode 100644 index 0000000000..d40a9f1988 --- /dev/null +++ b/wxPython/demo/data/echo.py @@ -0,0 +1,29 @@ + + +""" +This is a simple little echo program that is used by the wxProcess +demo. It reads lines from stdin and echos them back to stdout, until +there is an EOF on stdin. + +Enter text in the field below to send to the stdin of the echo +process. Clicking on 'Close Stream' will close the stream in the +demo, and then echo.py should terminate too... +""" + +import sys + +sys.stdout.write( __doc__) +sys.stdout.flush() + +line = sys.stdin.readline() +while line: + line = line[:-1] + sys.stdout.write('\nYou typed "%s"\n' % line) + sys.stdout.flush() + #sys.stderr.write('\nTyped you "%s" Yoda say...\n' % line) + #sys.stderr.flush() + line = sys.stdin.readline() + + +sys.stdout.write('\nExiting...\n') +sys.stdout.flush() diff --git a/wxPython/demo/data/grid.i b/wxPython/demo/data/grid.i new file mode 100644 index 0000000000..37f0db23a5 --- /dev/null +++ b/wxPython/demo/data/grid.i @@ -0,0 +1,1752 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: grid.i +// Purpose: SWIG definitions for the new wxGrid and related classes +// +// Author: Robin Dunn +// +// Created: 17-March-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module grid + +#ifndef OLD_GRID + +%{ +#include "helpers.h" +#include +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i +%import misc.i +%import gdi.i +%import windows.i +%import controls.i +%import events.i + +%pragma(python) code = "import wx" + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- +// Macros, similar to what's in helpers.h, to aid in the creation of +// virtual methods that are able to make callbacks to Python. Many of these +// are specific to wxGrid and so are kept here to reduce the mess in helpers.h +// a bit. + + +%{ +#define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ + wxGridCellAttr* CBNAME(int a, int b) { \ + wxGridCellAttr* rval = NULL; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + wxGridCellAttr* ptr; \ + ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", a, b)); \ + if (ro) { \ + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ + rval = ptr; \ + Py_DECREF(ro); \ + } \ + } \ + else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxGridCellAttr *base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback( \ + Py_BuildValue("(Oii)", \ + wxPyConstructObject((void*)attr, "wxGridCellAttr"), \ + a, b)); \ + else \ + PCLASS::CBNAME(attr, a, b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int a, int b) { \ + PCLASS::CBNAME(attr, a, b); \ + } + + + +#define PYCALLBACK__GCAINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int val) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback( \ + Py_BuildValue("(Oi)", \ + wxPyConstructObject((void*)attr, "wxGridCellAttr"), \ + val)); \ + else \ + PCLASS::CBNAME(attr, val); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int val) { \ + PCLASS::CBNAME(attr, val); \ + } + + + +#define PYCALLBACK_INT__pure(CBNAME) \ + int CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + int rval = 0; \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("()")); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_BOOL_INTINT_pure(CBNAME) \ + bool CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + bool rval = 0; \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("(ii)",a,b)); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + rval = PyString_AsString(PyObject_Str(ro)); \ + Py_DECREF(ro); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ + void CBNAME(int a, int b, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("(iis)",a,b,c.c_str())); \ + wxPySaveThread(doSave); \ + } + + +#define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + rval = PyString_AsString(PyObject_Str(ro)); \ + Py_DECREF(ro); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ + bool CBNAME(int a, int b, const wxString& c) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("(iis)", a,b,c.c_str())); \ + else \ + rval = PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b, const wxString& c) { \ + return PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK_LONG_INTINT(PCLASS, CBNAME) \ + long CBNAME(int a, int b) { \ + long rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + long base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \ + bool CBNAME(int a, int b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_DOUBLE_INTINT(PCLASS, CBNAME) \ + double CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + double rval; \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + rval = PyFloat_AsDouble(PyObject_Str(ro)); \ + Py_DECREF(ro); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + double base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__(PCLASS, CBNAME) \ + void CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("()")); \ + else \ + PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME() { \ + PCLASS::CBNAME(); \ + } + + + + +#define PYCALLBACK_BOOL_SIZETSIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a, size_t b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a, size_t b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_SIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("(i)", a)); \ + else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ + wxString CBNAME(int a) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (m_myInst.findCallback(#CBNAME)) { \ + PyObject* ro; \ + ro = m_myInst.callCallbackObj(Py_BuildValue("(i)",a)); \ + if (ro) { \ + rval = PyString_AsString(PyObject_Str(ro)); \ + Py_DECREF(ro); \ + } \ + } else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ + void CBNAME(int a, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("(is)", a,c.c_str())); \ + else \ + PCLASS::CBNAME(a,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, const wxString& c) { \ + PCLASS::CBNAME(a,c); \ + } + + + + +#define PYCALLBACK_BOOL_(PCLASS, CBNAME) \ + bool CBNAME() { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + rval = m_myInst.callCallback(Py_BuildValue("()")); \ + else \ + rval = PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME() { \ + return PCLASS::CBNAME(); \ + } + + + +#define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \ + void CBNAME(size_t a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("(ii)", a,b)); \ + else \ + PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(size_t a, int b) { \ + PCLASS::CBNAME(a,b); \ + } + + + + +#define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \ + void CBNAME(int a, int b, long c) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, long c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \ + void CBNAME(int a, int b, double c) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("(iif)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, double c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + +#define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \ + void CBNAME(int a, int b, bool c) { \ + bool doSave = wxPyRestoreThread(); \ + if (m_myInst.findCallback(#CBNAME)) \ + m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, bool c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + +%} + +//--------------------------------------------------------------------------- + +class wxGridCellCoords; +class wxGridCellAttr; + + + +#define wxGRID_VALUE_STRING "string" +#define wxGRID_VALUE_BOOL "bool" +#define wxGRID_VALUE_NUMBER "long" +#define wxGRID_VALUE_FLOAT "double" +#define wxGRID_VALUE_CHOICE "choice" +#define wxGRID_VALUE_TEXT "string" +#define wxGRID_VALUE_LONG "long" + +%readonly +wxGridCellCoords wxGridNoCellCoords; +wxRect wxGridNoCellRect; +%readwrite + + +//--------------------------------------------------------------------------- +// wxGridCellRenderer is an ABC, and several derived classes are available. +// Classes implemented in Python should be derived from wxPyGridCellRenderer. + + +class wxGridCellRenderer +{ +public: + void SetParameters(const wxString& params); + void IncRef(); + void DecRef(); + + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected) = 0; + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) = 0; + virtual wxGridCellRenderer *Clone() const = 0; +}; + + +// The C++ version of wxPyGridCellRenderer +%{ +class wxPyGridCellRenderer : public wxGridCellRenderer +{ +public: + wxPyGridCellRenderer() : wxGridCellRenderer() {}; + + // Implement Python callback aware virtual methods + void Draw(wxGrid& grid, wxGridCellAttr& attr, + wxDC& dc, const wxRect& rect, + int row, int col, bool isSelected) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("Draw")) { + m_myInst.callCallback( + Py_BuildValue("(OOOOiii)", + wxPyConstructObject((void*)&grid, "wxGrid"), + wxPyConstructObject((void*)&attr, "wxGridCellAttr"), + wxPyConstructObject((void*)&dc, "wxDC"), + wxPyConstructObject((void*)&rect, "wxRect"), + row, col, isSelected)); + } + wxPySaveThread(doSave); + } + + wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, + int row, int col) { + wxSize rval; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("GetBestSize")) { + PyObject* ro; + wxSize* ptr; + ro = m_myInst.callCallbackObj( + Py_BuildValue("(OOOii)", + wxPyConstructObject((void*)&grid, "wxGrid"), + wxPyConstructObject((void*)&attr, "wxGridCellAttr"), + wxPyConstructObject((void*)&dc, "wxDC"), + row, col)); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) + rval = *ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + wxGridCellRenderer *Clone() const { + wxGridCellRenderer* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("Clone")) { + PyObject* ro; + wxGridCellRenderer* ptr; + ro = m_myInst.callCallbackObj(Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellRenderer_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + +IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters); + +%} + + +// Let SWIG know about it so it can create the Python version +class wxPyGridCellRenderer : public wxGridCellRenderer { +public: + wxPyGridCellRenderer(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellRenderer)" + + void base_SetParameters(const wxString& params); +}; + +//--------------------------------------------------------------------------- +// Predefined Renderers + +class wxGridCellStringRenderer : public wxGridCellRenderer +{ +public: + wxGridCellStringRenderer(); +}; + + +class wxGridCellNumberRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellNumberRenderer(); +}; + + +class wxGridCellFloatRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellFloatRenderer(int width = -1, int precision = -1); + + int GetWidth() const; + void SetWidth(int width); + int GetPrecision() const; + void SetPrecision(int precision); +}; + + +class wxGridCellBoolRenderer : public wxGridCellRenderer +{ +public: + wxGridCellBoolRenderer(); +}; + + + +//--------------------------------------------------------------------------- +// wxGridCellEditor is an ABC, and several derived classes are available. +// Classes implemented in Python should be derived from wxPyGridCellEditor. + +class wxGridCellEditor +{ +public: + bool IsCreated(); + wxControl* GetControl(); + void SetControl(wxControl* control); + + void SetParameters(const wxString& params); + void IncRef(); + void DecRef(); + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) = 0; + virtual void BeginEdit(int row, int col, wxGrid* grid) = 0; + virtual bool EndEdit(int row, int col, wxGrid* grid) = 0; + virtual void Reset() = 0; + virtual wxGridCellEditor *Clone() const = 0; + + virtual void SetSize(const wxRect& rect); + virtual void Show(bool show, wxGridCellAttr *attr = NULL); + virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + virtual bool IsAcceptedKey(wxKeyEvent& event); + virtual void StartingKey(wxKeyEvent& event); + virtual void StartingClick(); + virtual void HandleReturn(wxKeyEvent& event); + virtual void Destroy(); + +}; + + +// The C++ version of wxPyGridCellEditor +%{ +class wxPyGridCellEditor : public wxGridCellEditor +{ +public: + wxPyGridCellEditor() : wxGridCellEditor() {} + + void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("Create")) { + m_myInst.callCallback( + Py_BuildValue("(OiO)", + wxPyConstructObject((void*)parent, "wxWindow"), + id, + wxPyConstructObject((void*)evtHandler, "wxEvtHandler"))); + } + wxPySaveThread(doSave); + } + + + void BeginEdit(int row, int col, wxGrid* grid) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("BeginEdit")) { + m_myInst.callCallback( + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid"))); + } + wxPySaveThread(doSave); + } + + + bool EndEdit(int row, int col, wxGrid* grid) { + bool rv = FALSE; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("EndEdit")) { + rv = m_myInst.callCallback( + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid"))); + } + wxPySaveThread(doSave); + return rv; + } + + + wxGridCellEditor *Clone() const { + wxGridCellEditor* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("Clone")) { + PyObject* ro; + wxGridCellEditor* ptr; + ro = m_myInst.callCallbackObj(Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellEditor_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + void Show(bool show, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("Show")) + m_myInst.callCallback( + Py_BuildValue("(iO)", show, + wxPyConstructObject((void*)attr, "wxGridCellAttr"))); + else + wxGridCellEditor::Show(show, attr); + wxPySaveThread(doSave); + } + void base_Show(bool show, wxGridCellAttr *attr) { + wxGridCellEditor::Show(show, attr); + } + + + void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("PaintBackground")) + m_myInst.callCallback( + Py_BuildValue("(OO)", + wxPyConstructObject((void*)&rectCell, "wxRect"), + wxPyConstructObject((void*)attr, "wxGridCellAttr"))); + else + wxGridCellEditor::PaintBackground(rectCell, attr); + wxPySaveThread(doSave); + } + void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + wxGridCellEditor::PaintBackground(rectCell, attr); + } + + + DEC_PYCALLBACK___pure(Reset); + DEC_PYCALLBACK__constany(SetSize, wxRect); + DEC_PYCALLBACK_bool_any(IsAcceptedKey, wxKeyEvent); + DEC_PYCALLBACK__any(StartingKey, wxKeyEvent); + DEC_PYCALLBACK__any(HandleReturn, wxKeyEvent); + DEC_PYCALLBACK__(StartingClick); + DEC_PYCALLBACK__(Destroy); + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + + +IMP_PYCALLBACK__STRING( wxPyGridCellEditor, wxGridCellEditor, SetParameters); +IMP_PYCALLBACK___pure(wxPyGridCellEditor, wxGridCellEditor, Reset); +IMP_PYCALLBACK__constany(wxPyGridCellEditor, wxGridCellEditor, SetSize, wxRect); +IMP_PYCALLBACK_bool_any(wxPyGridCellEditor, wxGridCellEditor, IsAcceptedKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, StartingKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, HandleReturn, wxKeyEvent); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, StartingClick); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, Destroy); + +%} + + +// Let SWIG know about it so it can create the Python version +class wxPyGridCellEditor : public wxGridCellEditor { +public: + wxPyGridCellEditor(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellEditor)" + + void base_SetSize(const wxRect& rect); + void base_Show(bool show, wxGridCellAttr *attr = NULL); + void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + void base_StartingKey(wxKeyEvent& event); + void base_StartingClick(); + void base_HandleReturn(wxKeyEvent& event); + void base_Destroy(); + void base_SetParameters(const wxString& params); +}; + +//--------------------------------------------------------------------------- +// Predefined Editors + +class wxGridCellTextEditor : public wxGridCellEditor +{ +public: + wxGridCellTextEditor(); +}; + + +class wxGridCellNumberEditor : public wxGridCellTextEditor +{ +public: + wxGridCellNumberEditor(int min = -1, int max = -1); +}; + + +class wxGridCellFloatEditor : public wxGridCellTextEditor +{ +public: + wxGridCellFloatEditor(); +}; + + +class wxGridCellBoolEditor : public wxGridCellEditor +{ +public: + wxGridCellBoolEditor(); +}; + +class wxGridCellChoiceEditor : public wxGridCellEditor +{ +public: + wxGridCellChoiceEditor(int LCOUNT = 0, + const wxString* choices = NULL, + bool allowOthers = FALSE); +#ifdef PRE2115 + %addmethods { + wxGridCellChoiceEditor(PyObject* choices, + bool allowOthers = FALSE) { + + const char** temp = string_LIST_helper(choices); + if (temp) { + int count = PyList_Size(choices); + wxGridCellChoiceEditor* ret; + ret = new wxGridCellChoiceEditor(count, temp, allowOthers); + delete [] temp; + return ret; + } + return NULL; + } + } +#endif +}; + +//--------------------------------------------------------------------------- + + +class wxGridCellAttr +{ +public: + wxGridCellAttr(); + + wxGridCellAttr *Clone() const; + void IncRef(); + void DecRef(); + void SetTextColour(const wxColour& colText); + void SetBackgroundColour(const wxColour& colBack); + void SetFont(const wxFont& font); + void SetAlignment(int hAlign, int vAlign); + void SetReadOnly(bool isReadOnly = TRUE); + + void SetRenderer(wxGridCellRenderer *renderer); + void SetEditor(wxGridCellEditor* editor); + + bool HasTextColour() const; + bool HasBackgroundColour() const; + bool HasFont() const; + bool HasAlignment() const; + bool HasRenderer() const; + bool HasEditor() const; + + const wxColour& GetTextColour() const; + const wxColour& GetBackgroundColour() const; + const wxFont& GetFont() const; + void GetAlignment(int *OUTPUT, int *OUTPUT) const; + wxGridCellRenderer *GetRenderer(wxGrid* grid, int row, int col) const; + wxGridCellEditor *GetEditor(wxGrid* grid, int row, int col) const; + + bool IsReadOnly() const; + void SetDefAttr(wxGridCellAttr* defAttr); +}; + +//--------------------------------------------------------------------------- + +class wxGridCellAttrProvider +{ +public: + wxGridCellAttrProvider(); + // ???? virtual ~wxGridCellAttrProvider(); + + wxGridCellAttr *GetAttr(int row, int col) const; + void SetAttr(wxGridCellAttr *attr, int row, int col); + void SetRowAttr(wxGridCellAttr *attr, int row); + void SetColAttr(wxGridCellAttr *attr, int col); + + void UpdateAttrRows( size_t pos, int numRows ); + void UpdateAttrCols( size_t pos, int numCols ); + +}; + + +// A Python-aware version +%{ +class wxPyGridCellAttrProvider : public wxGridCellAttrProvider +{ +public: + wxPyGridCellAttrProvider() : wxGridCellAttrProvider() {}; + + PYCALLBACK_GCA_INTINT(wxGridCellAttrProvider, GetAttr); + PYCALLBACK__GCAINTINT(wxGridCellAttrProvider, SetAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetRowAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetColAttr); + + PYPRIVATE; +}; +%} + + +// The python-aware version get's SWIGified +class wxPyGridCellAttrProvider : public wxGridCellAttrProvider +{ +public: + wxPyGridCellAttrProvider(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellAttrProvider)" + + wxGridCellAttr *base_GetAttr(int row, int col); + void base_SetAttr(wxGridCellAttr *attr, int row, int col); + void base_SetRowAttr(wxGridCellAttr *attr, int row); + void base_SetColAttr(wxGridCellAttr *attr, int col); +}; + + +//--------------------------------------------------------------------------- +// Grid Table Base class and Python aware version + + + +class wxGridTableBase +{ +public: + // wxGridTableBase(); This is an ABC + //~wxGridTableBase(); + + void SetAttrProvider(wxGridCellAttrProvider *attrProvider); + wxGridCellAttrProvider *GetAttrProvider() const; + void SetView( wxGrid *grid ); + wxGrid * GetView() const; + + + // pure virtuals + virtual int GetNumberRows() = 0; + virtual int GetNumberCols() = 0; + virtual bool IsEmptyCell( int row, int col ) = 0; + virtual wxString GetValue( int row, int col ) = 0; + virtual void SetValue( int row, int col, const wxString& value ) = 0; + + // virtuals overridable in wxPyGridTableBase + virtual wxString GetTypeName( int row, int col ); + virtual bool CanGetValueAs( int row, int col, const wxString& typeName ); + virtual bool CanSetValueAs( int row, int col, const wxString& typeName ); + virtual long GetValueAsLong( int row, int col ); + virtual double GetValueAsDouble( int row, int col ); + virtual bool GetValueAsBool( int row, int col ); + virtual void SetValueAsLong( int row, int col, long value ); + virtual void SetValueAsDouble( int row, int col, double value ); + virtual void SetValueAsBool( int row, int col, bool value ); + + //virtual void* GetValueAsCustom( int row, int col, const wxString& typeName ); + //virtual void SetValueAsCustom( int row, int col, const wxString& typeName, void* value ); + + + virtual void Clear(); + virtual bool InsertRows( size_t pos = 0, size_t numRows = 1 ); + virtual bool AppendRows( size_t numRows = 1 ); + virtual bool DeleteRows( size_t pos = 0, size_t numRows = 1 ); + virtual bool InsertCols( size_t pos = 0, size_t numCols = 1 ); + virtual bool AppendCols( size_t numCols = 1 ); + virtual bool DeleteCols( size_t pos = 0, size_t numCols = 1 ); + + virtual wxString GetRowLabelValue( int row ); + virtual wxString GetColLabelValue( int col ); + virtual void SetRowLabelValue( int row, const wxString& value ); + virtual void SetColLabelValue( int col, const wxString& value ); + + virtual bool CanHaveAttributes(); + + virtual wxGridCellAttr *GetAttr( int row, int col ); + virtual void SetAttr(wxGridCellAttr* attr, int row, int col); + virtual void SetRowAttr(wxGridCellAttr *attr, int row); + virtual void SetColAttr(wxGridCellAttr *attr, int col); + +}; + + + +// Python-aware version +%{ +class wxPyGridTableBase : public wxGridTableBase +{ +public: + wxPyGridTableBase() : wxGridTableBase() {} + + PYCALLBACK_INT__pure(GetNumberRows); + PYCALLBACK_INT__pure(GetNumberCols); + PYCALLBACK_BOOL_INTINT_pure(IsEmptyCell); + PYCALLBACK_STRING_INTINT(wxGridTableBase, GetTypeName); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanGetValueAs); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanSetValueAs); + PYCALLBACK__(wxGridTableBase, Clear); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertCols); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteCols); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendRows); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendCols); + PYCALLBACK_STRING_INT(wxGridTableBase, GetRowLabelValue); + PYCALLBACK_STRING_INT(wxGridTableBase, GetColLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetRowLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetColLabelValue); + PYCALLBACK_BOOL_(wxGridTableBase, CanHaveAttributes); + PYCALLBACK_GCA_INTINT(wxGridTableBase, GetAttr); + PYCALLBACK__GCAINTINT(wxGridTableBase, SetAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetRowAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetColAttr); + + + + wxString GetValue(int row, int col) { + bool doSave = wxPyRestoreThread(); + wxString rval; + if (m_myInst.findCallback("GetValue")) { + PyObject* ro; + ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)",row,col)); + if (ro) { + rval = PyString_AsString(PyObject_Str(ro)); + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + void SetValue(int row, int col, const wxString& val) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("SetValue")) + m_myInst.callCallback(Py_BuildValue("(iis)",row,col,val.c_str())); + wxPySaveThread(doSave); + } + + + // Map the Get/Set methods for the standard non-string types to + // the GetValue and SetValue python methods. + long GetValueAsLong( int row, int col ) { + long rval = 0; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("GetValue")) { + PyObject* ro; + PyObject* num; + ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Int(ro); + if (num) { + rval = PyInt_AsLong(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + double GetValueAsDouble( int row, int col ) { + double rval = 0.0; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("GetValue")) { + PyObject* ro; + PyObject* num; + ro = m_myInst.callCallbackObj(Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Float(ro); + if (num) { + rval = PyFloat_AsDouble(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + bool GetValueAsBool( int row, int col ) { + return (bool)GetValueAsLong(row, col); + } + + void SetValueAsLong( int row, int col, long value ) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("SetValue")) { + m_myInst.callCallback(Py_BuildValue("(iii)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsDouble( int row, int col, double value ) { + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("SetValue")) { + m_myInst.callCallback(Py_BuildValue("(iid)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsBool( int row, int col, bool value ) { + SetValueAsLong( row, col, (long)value ); + } + + + PYPRIVATE; +}; +%} + + +// The python-aware version get's SWIGified +class wxPyGridTableBase : public wxGridTableBase +{ +public: + wxPyGridTableBase(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridTableBase)" + + %addmethods { void Destroy() { delete self; } } + + wxString base_GetTypeName( int row, int col ); + bool base_CanGetValueAs( int row, int col, const wxString& typeName ); + bool base_CanSetValueAs( int row, int col, const wxString& typeName ); + void base_Clear(); + bool base_InsertRows( size_t pos = 0, size_t numRows = 1 ); + bool base_AppendRows( size_t numRows = 1 ); + bool base_DeleteRows( size_t pos = 0, size_t numRows = 1 ); + bool base_InsertCols( size_t pos = 0, size_t numCols = 1 ); + bool base_AppendCols( size_t numCols = 1 ); + bool base_DeleteCols( size_t pos = 0, size_t numCols = 1 ); + wxString base_GetRowLabelValue( int row ); + wxString base_GetColLabelValue( int col ); + void base_SetRowLabelValue( int row, const wxString& value ); + void base_SetColLabelValue( int col, const wxString& value ); + bool base_CanHaveAttributes(); + wxGridCellAttr *base_GetAttr( int row, int col ); + void base_SetAttr(wxGridCellAttr* attr, int row, int col); + void base_SetRowAttr(wxGridCellAttr *attr, int row); + void base_SetColAttr(wxGridCellAttr *attr, int col); +}; + + +//--------------------------------------------------------------------------- +// Predefined Tables + +class wxGridStringTable : public wxGridTableBase +{ +public: + wxGridStringTable( int numRows=0, int numCols=0 ); +}; + +//--------------------------------------------------------------------------- +// The Table can pass messages to the grid to tell it to update itself if +// something has changed. + +enum wxGridTableRequest +{ + wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000, + wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES, + wxGRIDTABLE_NOTIFY_ROWS_INSERTED, + wxGRIDTABLE_NOTIFY_ROWS_APPENDED, + wxGRIDTABLE_NOTIFY_ROWS_DELETED, + wxGRIDTABLE_NOTIFY_COLS_INSERTED, + wxGRIDTABLE_NOTIFY_COLS_APPENDED, + wxGRIDTABLE_NOTIFY_COLS_DELETED +}; + + +class wxGridTableMessage +{ +public: + wxGridTableMessage( wxGridTableBase *table, int id, + int comInt1 = -1, + int comInt2 = -1 ); + ~wxGridTableMessage(); + + void SetTableObject( wxGridTableBase *table ); + wxGridTableBase * GetTableObject() const; + void SetId( int id ); + int GetId(); + void SetCommandInt( int comInt1 ); + int GetCommandInt(); + void SetCommandInt2( int comInt2 ); + int GetCommandInt2(); +}; + + +//--------------------------------------------------------------------------- + +class wxGridCellCoords +{ +public: + wxGridCellCoords( int r=-1, int c=-1 ); + ~wxGridCellCoords(); + + int GetRow() const { return m_row; } + void SetRow( int n ) { m_row = n; } + int GetCol() const { return m_col; } + void SetCol( int n ) { m_col = n; } + void Set( int row, int col ) { m_row = row; m_col = col; } + + %addmethods { + PyObject* asTuple() { + PyObject* tup = PyTuple_New(2); + PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); + PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); + return tup; + } + + int __cmp__( const wxGridCellCoords& other ) { + return *self != other; + } + } + %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())" + %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())" +}; + +// Typemap to allow conversion of sequence objects to wxGridCellCoords... +%typemap(python,in) wxGridCellCoords& (wxGridCellCoords temp) { + $target = &temp; + if (! wxGridCellCoords_helper($source, &$target)) + return NULL; +} + +// ...and here is the associated helper. +%{ +bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) { + + // If source is an object instance then it may already be the right type + if (PyInstance_Check(source)) { + wxGridCellCoords* ptr; + if (SWIG_GetPtrObj(source, (void **)&ptr, "_wxGridCellCoords_p")) + goto error; + *obj = ptr; + return TRUE; + } + // otherwise a 2-tuple of integers is expected + else if (PySequence_Check(source) && PyObject_Length(source) == 2) { + PyObject* o1 = PySequence_GetItem(source, 0); + PyObject* o2 = PySequence_GetItem(source, 1); + **obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2)); + return TRUE; + } + + error: + PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object."); + return FALSE; +} +%} + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- +// The grid itself + + +// Fool SWIG into treating this enum as an int +typedef int WXGRIDSELECTIONMODES; + +// but let the C++ code know what it really is. +%{ +typedef wxGrid::wxGridSelectionModes WXGRIDSELECTIONMODES; +%} + + + +class wxGrid : public wxScrolledWindow +{ +public: + wxGrid( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxWANTS_CHARS, + const char* name = wxPanelNameStr ); + + //~wxGrid(); + + enum wxGridSelectionModes {wxGridSelectCells, + wxGridSelectRows, + wxGridSelectColumns}; + + bool CreateGrid( int numRows, int numCols, + WXGRIDSELECTIONMODES selmode = wxGrid::wxGridSelectCells ); + void SetSelectionMode(WXGRIDSELECTIONMODES selmode); + + + // ------ grid dimensions + // + int GetNumberRows(); + int GetNumberCols(); + + + +#ifdef NOTNEEDED // ???? + // ------ display update functions + // + void CalcRowLabelsExposed( wxRegion& reg ); + void CalcColLabelsExposed( wxRegion& reg ); + void CalcCellsExposed( wxRegion& reg ); + + // ------ event handlers + // + void ProcessRowLabelMouseEvent( wxMouseEvent& event ); + void ProcessColLabelMouseEvent( wxMouseEvent& event ); + void ProcessCornerLabelMouseEvent( wxMouseEvent& event ); + void ProcessGridCellMouseEvent( wxMouseEvent& event ); + void DoEndDragResizeRow(); + void DoEndDragResizeCol(); +#endif + + bool ProcessTableMessage( wxGridTableMessage& ); + + + wxGridTableBase * GetTable() const; + bool SetTable( wxGridTableBase *table, bool takeOwnership=FALSE, + WXGRIDSELECTIONMODES selmode = + wxGrid::wxGridSelectCells ); + + void ClearGrid(); + bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels=TRUE ); + bool AppendRows( int numRows = 1, bool updateLabels=TRUE ); + bool DeleteRows( int pos = 0, int numRows = 1, bool updateLabels=TRUE ); + bool InsertCols( int pos = 0, int numCols = 1, bool updateLabels=TRUE ); + bool AppendCols( int numCols = 1, bool updateLabels=TRUE ); + bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels=TRUE ); + +#ifdef NOTNEEDED // ???? + void DrawGridCellArea( wxDC& dc ); + void DrawGridSpace( wxDC& dc ); + void DrawCellBorder( wxDC& dc, const wxGridCellCoords& ); + void DrawAllGridLines( wxDC& dc, const wxRegion & reg ); + void DrawCell( wxDC& dc, const wxGridCellCoords& ); + void DrawHighlight(wxDC& dc); +#endif + + // this function is called when the current cell highlight must be redrawn + // and may be overridden by the user + virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ); + +#ifdef NOTNEEDED // ???? + void DrawRowLabels( wxDC& dc ); + void DrawRowLabel( wxDC& dc, int row ); + + void DrawColLabels( wxDC& dc ); + void DrawColLabel( wxDC& dc, int col ); +#endif + + // ------ Cell text drawing functions + // + void DrawTextRectangle( wxDC& dc, const wxString&, const wxRect&, + int horizontalAlignment = wxLEFT, + int verticalAlignment = wxTOP ); + + // Split a string containing newline chararcters into an array of + // strings and return the number of lines + // + void StringToLines( const wxString& value, wxArrayString& lines ); + + void GetTextBoxSize( wxDC& dc, + wxArrayString& lines, + long *OUTPUT, long *OUTPUT ); + + + // ------ + // Code that does a lot of grid modification can be enclosed + // between BeginBatch() and EndBatch() calls to avoid screen + // flicker + // + void BeginBatch(); + void EndBatch(); + int GetBatchCount(); + + + // ------ edit control functions + // + bool IsEditable() { return m_editable; } + void EnableEditing( bool edit ); + + void EnableCellEditControl( bool enable = TRUE ); + void DisableCellEditControl(); + bool CanEnableCellControl() const; + bool IsCellEditControlEnabled() const; + bool IsCellEditControlShown() const; + + bool IsCurrentCellReadOnly() const; + + void ShowCellEditControl(); + void HideCellEditControl(); + void SaveEditControlValue(); + + + // ------ grid location functions + // Note that all of these functions work with the logical coordinates of + // grid cells and labels so you will need to convert from device + // coordinates for mouse events etc. + // + + //void XYToCell( int x, int y, wxGridCellCoords& ); + %addmethods { + %new wxGridCellCoords* XYToCell(int x, int y) { + wxGridCellCoords rv; + self->XYToCell(x, y, rv); + return new wxGridCellCoords(rv); + } + } + + int YToRow( int y ); + int XToCol( int x ); + + int YToEdgeOfRow( int y ); + int XToEdgeOfCol( int x ); + + wxRect CellToRect( int row, int col ); + // TODO: ??? wxRect CellToRect( const wxGridCellCoords& coords ); + + + int GetGridCursorRow(); + int GetGridCursorCol(); + + // check to see if a cell is either wholly visible (the default arg) or + // at least partially visible in the grid window + // + bool IsVisible( int row, int col, bool wholeCellVisible = TRUE ); + // TODO: ??? bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = TRUE ); + void MakeCellVisible( int row, int col ); + // TODO: ??? void MakeCellVisible( const wxGridCellCoords& coords ); + + + // ------ grid cursor movement functions + // + void SetGridCursor( int row, int col ); + bool MoveCursorUp( bool expandSelection ); + bool MoveCursorDown( bool expandSelection ); + bool MoveCursorLeft( bool expandSelection ); + bool MoveCursorRight( bool expandSelection ); + bool MovePageDown(); + bool MovePageUp(); + bool MoveCursorUpBlock( bool expandSelection ); + bool MoveCursorDownBlock( bool expandSelection ); + bool MoveCursorLeftBlock( bool expandSelection ); + bool MoveCursorRightBlock( bool expandSelection ); + + + // ------ label and gridline formatting + // + int GetDefaultRowLabelSize(); + int GetRowLabelSize(); + int GetDefaultColLabelSize(); + int GetColLabelSize(); + wxColour GetLabelBackgroundColour(); + wxColour GetLabelTextColour(); + wxFont GetLabelFont(); + void GetRowLabelAlignment( int *OUTPUT, int *OUTPUT ); + void GetColLabelAlignment( int *OUTPUT, int *OUTPUT ); + wxString GetRowLabelValue( int row ); + wxString GetColLabelValue( int col ); + wxColour GetGridLineColour(); + wxColour GetCellHighlightColour(); + + void SetRowLabelSize( int width ); + void SetColLabelSize( int height ); + void SetLabelBackgroundColour( const wxColour& ); + void SetLabelTextColour( const wxColour& ); + void SetLabelFont( const wxFont& ); + void SetRowLabelAlignment( int horiz, int vert ); + void SetColLabelAlignment( int horiz, int vert ); + void SetRowLabelValue( int row, const wxString& ); + void SetColLabelValue( int col, const wxString& ); + void SetGridLineColour( const wxColour& ); + void SetCellHighlightColour( const wxColour& ); + + void EnableDragRowSize( bool enable = TRUE ); + void DisableDragRowSize(); + bool CanDragRowSize(); + void EnableDragColSize( bool enable = TRUE ); + void DisableDragColSize(); + bool CanDragColSize(); + void EnableDragGridSize(bool enable = TRUE); + void DisableDragGridSize(); + bool CanDragGridSize(); + + // this sets the specified attribute for all cells in this row/col + void SetRowAttr(int row, wxGridCellAttr *attr); + void SetColAttr(int col, wxGridCellAttr *attr); + + // shortcuts for setting the column parameters + + // set the format for the data in the column: default is string + void SetColFormatBool(int col); + void SetColFormatNumber(int col); + void SetColFormatFloat(int col, int width = -1, int precision = -1); + void SetColFormatCustom(int col, const wxString& typeName); + + void EnableGridLines( bool enable = TRUE ); + bool GridLinesEnabled(); + + // ------ row and col formatting + // + int GetDefaultRowSize(); + int GetRowSize( int row ); + int GetDefaultColSize(); + int GetColSize( int col ); + wxColour GetDefaultCellBackgroundColour(); + wxColour GetCellBackgroundColour( int row, int col ); + wxColour GetDefaultCellTextColour(); + wxColour GetCellTextColour( int row, int col ); + wxFont GetDefaultCellFont(); + wxFont GetCellFont( int row, int col ); + void GetDefaultCellAlignment( int *horiz, int *vert ); + void GetCellAlignment( int row, int col, int *horiz, int *vert ); + + void SetDefaultRowSize( int height, bool resizeExistingRows = FALSE ); + void SetRowSize( int row, int height ); + void SetDefaultColSize( int width, bool resizeExistingCols = FALSE ); + + void SetColSize( int col, int width ); + + // automatically size the column or row to fit to its contents, if + // setAsMin is TRUE, this optimal width will also be set as minimal width + // for this column + void AutoSizeColumn( int col, bool setAsMin = TRUE ); + void AutoSizeRow( int row, bool setAsMin = TRUE ); + + + // auto size all columns (very ineffective for big grids!) + void AutoSizeColumns( bool setAsMin = TRUE ); + void AutoSizeRows( bool setAsMin = TRUE ); + + // auto size the grid, that is make the columns/rows of the "right" size + // and also set the grid size to just fit its contents + void AutoSize(); + + // column won't be resized to be lesser width - this must be called during + // the grid creation because it won't resize the column if it's already + // narrower than the minimal width + void SetColMinimalWidth( int col, int width ); + void SetRowMinimalHeight( int row, int width ); + + void SetDefaultCellBackgroundColour( const wxColour& ); + void SetCellBackgroundColour( int row, int col, const wxColour& ); + void SetDefaultCellTextColour( const wxColour& ); + + void SetCellTextColour( int row, int col, const wxColour& ); + void SetDefaultCellFont( const wxFont& ); + void SetCellFont( int row, int col, const wxFont& ); + void SetDefaultCellAlignment( int horiz, int vert ); + void SetCellAlignment( int row, int col, int horiz, int vert ); + + // takes ownership of the pointer + void SetDefaultRenderer(wxGridCellRenderer *renderer); + void SetCellRenderer(int row, int col, wxGridCellRenderer *renderer); + wxGridCellRenderer *GetDefaultRenderer() const; + wxGridCellRenderer* GetCellRenderer(int row, int col); + + // takes ownership of the pointer + void SetDefaultEditor(wxGridCellEditor *editor); + void SetCellEditor(int row, int col, wxGridCellEditor *editor); + wxGridCellEditor *GetDefaultEditor() const; + wxGridCellEditor* GetCellEditor(int row, int col); + + + + // ------ cell value accessors + // + wxString GetCellValue( int row, int col ); + // TODO: ??? wxString GetCellValue( const wxGridCellCoords& coords ) + + void SetCellValue( int row, int col, const wxString& s ); + // TODO: ??? void SetCellValue( const wxGridCellCoords& coords, const wxString& s ) + + // returns TRUE if the cell can't be edited + bool IsReadOnly(int row, int col) const; + + // make the cell editable/readonly + void SetReadOnly(int row, int col, bool isReadOnly = TRUE); + + // ------ selections of blocks of cells + // + void SelectRow( int row, bool addToSelected = FALSE ); + void SelectCol( int col, bool addToSelected = FALSE ); + + void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected = FALSE ); + // TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft, + // TODO: ??? const wxGridCellCoords& bottomRight ) + + void SelectAll(); + bool IsSelection(); + void ClearSelection(); + bool IsInSelection( int row, int col ); + // TODO: ??? bool IsInSelection( const wxGridCellCoords& coords ) + + + // This function returns the rectangle that encloses the block of cells + // limited by TopLeft and BottomRight cell in device coords and clipped + // to the client size of the grid window. + // + wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft, + const wxGridCellCoords & bottomRight ); + + + // Access or update the selection fore/back colours + wxColour GetSelectionBackground() const; + wxColour GetSelectionForeground() const; + + void SetSelectionBackground(const wxColour& c); + void SetSelectionForeground(const wxColour& c); + + + // Methods for a registry for mapping data types to Renderers/Editors + void RegisterDataType(const wxString& typeName, + wxGridCellRenderer* renderer, + wxGridCellEditor* editor); + wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const; + // TODO: ??? wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const + wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const; + wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const; + wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const; + + // grid may occupy more space than needed for its rows/columns, this + // function allows to set how big this extra space is + void SetMargins(int extraWidth, int extraHeight); +}; + + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- +// Grid events and stuff + + + +class wxGridEvent : public wxNotifyEvent +{ +public: + wxGridEvent(int id, wxEventType type, wxGrid* obj, + int row=-1, int col=-1, int x=-1, int y=-1, bool sel = TRUE, + bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE); + + virtual int GetRow(); + virtual int GetCol(); + wxPoint GetPosition(); + bool Selecting(); + bool ControlDown(); + bool MetaDown(); + bool ShiftDown(); + bool AltDown(); + +}; + + +class wxGridSizeEvent : public wxNotifyEvent +{ +public: + wxGridSizeEvent(int id, wxEventType type, wxGrid* obj, + int rowOrCol=-1, int x=-1, int y=-1, + bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE); + + int GetRowOrCol(); + wxPoint GetPosition(); + bool ControlDown(); + bool MetaDown(); + bool ShiftDown(); + bool AltDown(); + +}; + + +class wxGridRangeSelectEvent : public wxNotifyEvent +{ +public: + wxGridRangeSelectEvent(int id, wxEventType type, wxGrid* obj, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool sel = TRUE, + bool control=FALSE, bool shift=FALSE, + bool alt=FALSE, bool meta=FALSE); + + wxGridCellCoords GetTopLeftCoords(); + wxGridCellCoords GetBottomRightCoords(); + int GetTopRow(); + int GetBottomRow(); + int GetLeftCol(); + int GetRightCol(); + bool Selecting(); + bool ControlDown(); + bool MetaDown(); + bool ShiftDown(); + bool AltDown(); +}; + +enum { + wxEVT_GRID_CELL_LEFT_CLICK, + wxEVT_GRID_CELL_RIGHT_CLICK, + wxEVT_GRID_CELL_LEFT_DCLICK, + wxEVT_GRID_CELL_RIGHT_DCLICK, + wxEVT_GRID_LABEL_LEFT_CLICK, + wxEVT_GRID_LABEL_RIGHT_CLICK, + wxEVT_GRID_LABEL_LEFT_DCLICK, + wxEVT_GRID_LABEL_RIGHT_DCLICK, + wxEVT_GRID_ROW_SIZE, + wxEVT_GRID_COL_SIZE, + wxEVT_GRID_RANGE_SELECT, + wxEVT_GRID_CELL_CHANGE, + wxEVT_GRID_SELECT_CELL, + wxEVT_GRID_EDITOR_SHOWN, + wxEVT_GRID_EDITOR_HIDDEN, +}; + + + +%pragma(python) code = " +def EVT_GRID_CELL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_CLICK, fn) + +def EVT_GRID_CELL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_CLICK, fn) + +def EVT_GRID_CELL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_DCLICK, fn) + +def EVT_GRID_CELL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_DCLICK, fn) + +def EVT_GRID_LABEL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_CLICK, fn) + +def EVT_GRID_LABEL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_CLICK, fn) + +def EVT_GRID_LABEL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_DCLICK, fn) + +def EVT_GRID_LABEL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_DCLICK, fn) + +def EVT_GRID_ROW_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_ROW_SIZE, fn) + +def EVT_GRID_COL_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_COL_SIZE, fn) + +def EVT_GRID_RANGE_SELECT(win, fn): + win.Connect(-1, -1, wxEVT_GRID_RANGE_SELECT, fn) + +def EVT_GRID_CELL_CHANGE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) + +def EVT_GRID_SELECT_CELL(win, fn): + win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) + +def EVT_GRID_EDITOR_SHOWN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_SHOWN, fn) + +def EVT_GRID_EDITOR_HIDDEN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_HIDDEN, fn) + +" + +//--------------------------------------------------------------------------- + +%pragma(python) include="_gridextras.py"; + +//--------------------------------------------------------------------------- + + +#endif diff --git a/utils/wxPython/demo/data/imagemap.htm b/wxPython/demo/data/imagemap.htm similarity index 100% rename from utils/wxPython/demo/data/imagemap.htm rename to wxPython/demo/data/imagemap.htm diff --git a/utils/wxPython/demo/data/imagemap.png b/wxPython/demo/data/imagemap.png similarity index 100% rename from utils/wxPython/demo/data/imagemap.png rename to wxPython/demo/data/imagemap.png diff --git a/utils/wxPython/demo/data/pic.png b/wxPython/demo/data/pic.png similarity index 100% rename from utils/wxPython/demo/data/pic.png rename to wxPython/demo/data/pic.png diff --git a/utils/wxPython/demo/data/pic2.bmp b/wxPython/demo/data/pic2.bmp similarity index 100% rename from utils/wxPython/demo/data/pic2.bmp rename to wxPython/demo/data/pic2.bmp diff --git a/wxPython/demo/data/pic2.gif b/wxPython/demo/data/pic2.gif new file mode 100644 index 0000000000000000000000000000000000000000..a7f522a20d778b7bec53b75be5c0138f68231689 GIT binary patch literal 9184 zcmXw72T+qs*M8Fr0Ry4eB!mtz6eD7YAr$F^A|j%OfJiqK5dpm+^dizks)iy>&`?D{ zZsv$H$9vpc)r!Onb-KOe{kz5sv}8k(Kp z=gL$aXfGyfLqm_+)R!bNshG!iJCAypor`p)k}>V|x#ij6-j0Uq%Fw$*Ev^=_aX~iA ziz8#bm5y{-IvHBX52WftuU}3L^)}O2hk7$r)8o7bnu{GRWRE(MY6@fJWuVbVX?7N} z&mZ^qUN1fu>P$D0HQ7!nPYUv-rAK@9*5}Smb;gA{zh0icJ5X16&dyNO=@`r$5wE!Vhe}oT@AXeLU4^M^&{T%MM*HW>RI(MS8^rIgkBkELA!g zL)FKGdeijPG2Tp4dYqr5h3Zj9!%Tw1LEvv{|k<6&k&#$3*h^>s8PDq~g`r+b@= z6GEMXylL9%nC9|Sunh=;`w!4IpluuUU%*EGV{ZfcUw}qHpau-60sLP;K@HpPHbbD> z@sR&@LAG5`0~}~TZ1aBw+wpDvHgCKCGq!nKv(4L@ZT=s&>mWf5u>TKk3;ve~*&Y;P z1A^Ir41w+TpR)iUe*E-|9QFF<@pAkk+Ek`O7{hntj4)lXXs?E`TBRc5BV9`Ec#2h) zqDz8f(_G2+Ci7B$s5M*bZa{|J+0|l0q(AuXTr2;Q)j}xq{#9-l>Xq#h6;$>8RN$jO zciwOQ7bUaem!hG=>PL2NOeU)!+_)>NC+0fCwRUL7#jG~n)YS}AZ{0KVA}1sbXj&>yJ1qD6%)8l@ThH*XvZ!HiSB_=; zQ8jC9aDsm$<9GeoOjWz@$GMIZI`_UAEmpNm8vOp*)&A*4;d+?tmg%W`_hhBJmHfkZ zjr&;tiW>J+?sboQ;k&vt{v!1ws;=C3q^IDJFD&Y7IeW0_vqsXsL2X%{HrWSv6tZdd zj6L9@y%Mx=f44YF=)YFu8@^c*5N>%JdBhEow*Og_ht+;R?k8hZu@muphDz3&ar~02 zX?3?}9%OoLBh$DyxPwqsge zp*iVlW!So{rsav*@E3AWkKn!3QKI8U*>3HltmH3#*4Od^7h6%1Vb#_t`sFDMij7Ju zV~>bC)%iFmv9;>xIbVbL$N$7tHM_}pwRS#WdNp^=M*cABT(e6gM?k8sMf4+|B^vdG zB%D~izT8x@aQ$=S;rvec$FPl##d_m0AWF8w76G4SNS`mh2ioHq72R(5Uz^g#gsGeqIcLn2gJNzRkJ*blvW}(K8RX zUu{0W-=EhjshT|-^diFXfy;*{>F+HE|gP(%B84-bFu{ z-qVZAT~2$G|G*yvj~#h#XOKs_ae982Y3uD~AWuc?^ySO(H3WP~5iBlZlcj|`v@*q3N%d748)I-f z>$lUB^-i6U8TS78$PlH-;xB{s|Bz2MFc^A)6I3%K1EZrjsCAhOnAM%f(KcRyt-g+w zA80j_D=$9(*0gk`b;nuO9hh2U57i=xjdF?~Qk!D%=0O6~7#{w5pkaWS;I=RIL#D%+ zm%7qLgEP-mG-drMAiJ*xdB6r!zYf4yDDroN{{Zd4FEC-hFJx+eoXBfjE_B;fXpKk- z(6e3T?_zsIBr#GH$dldLnaupx5;eHQOO9GDW4n(LCeriPrwB}$Kw|C_o%kpxi|>Q5 zz=tZ&r{e7c>c@SM0$EBlg3R9d5!~!&bA+>1$zPur4|MDvB%4J93y0MUd3@a@ zHl$}-jPM;yb1x-GD9;aqD8Mb{ugq&0Lj%a<6HO|(-rBKwx=8i)K4MTpGjTQJ5%*a zN@#}(aEgRJ53GVFq}XoADDFn45+7nA$fO#WNjyXYn98sb@Z0WHHie~S%ELG7J-VkF zP9MX`zOedOoeT?6oXE%QQstmMc_Nflc{gPmgbFAX$;J!P^;ByVof#2OQ{bLG{Bdnc z*L`+#46$|6emA<{?_@V)FKeL~eajp~pc{j%Sh%>O;vqS0E-WCQEp^j;1Zo0cCbIBK z+NObQgJl{>9q%E0@4^*0Rxg8!4N8vk*1={-f>npwfapW2AW$fCkU({h<;if ztBvmahj@h_t*pYawi|RJy@@nMZ22HJh!{;CK!_7U{NE;{{nj7~jXaoPECbHTv{5N% zfUTT)h+yyOD7Da$DzRN#6cafqcg-ARi~J-na=`E)tiXQFq88+yb0m1=1X_GcFEexqhbW)AUQ2P1j-*eI}k=8@I2 zTt4P)D4a>6uLe<4WY&K41cVcxwOaoDjAN%3g}z6Es1)IC$?K0VFXNUXnd*&f34I|$ z!FV5yVCSF4<}u-CMQ1f)jll!VcZx@hZ#P8r{^@*G%Ryb^;MY>*iNY-l-$vvYaOb=4 z^D%@~fg%j6yd(SF?-v6*^8SSW{X{JVREzAr=aT0c}{jkK-<-v2V!h7 z%?w1sMs&JPT-$!6B!y=JpwDu7KgPibA5f_2IRKAw2#C64owPa{`EyV<&PpX@nK%RT zYJvI0)S~^ds7peGAvTfoBsKbLst!BVV**@;g@t?soY-h%DDn^C?!`3rpHw~6vTUD> z{+47=iq*w4^K;2%f#^WCb^C5!Kn6^co$5uAxSj#yyAVNRqS=6GKH;tJPHEqjP8Nkf#ygLT*v-J(43mz=Z{ z@LMd55f9ocwgq^Qczm2D0}af=Z;JLQjHj(XAx^*4?<3-l>oV0~$*c}k3l_eY3*obn zeiX1Kk5@U7^)?=C!UpVT!7Kna3P77!$4<}k0|ghdHW2$Soio$U+)^5}!@~7;85_#R zt13QWIh?RCqlBq2V2627B~fA`52lfI{B|ScG7oAmf`{Uv82~JvaqQ@91QhFWUJQ>K zcSFRfSW0Uq@?~U^q_g{T{^~^Cp3RMAz@oSp(kSRdbp@LFsP0)r9}jvMkE97WbYobu z$f82dF`SW7{-kKOCgjp*`#T=#mFes+arOjFwE6g@=tqsk@eP`; zI3|RP6wZPt^{(9gRw)EP0eH1f%Mdiy`a%G*g(Y$CCR1fzwop3Ha7aU&f37(`cBd@r zI0LZ*3wUzf4~juE3zbuP$Z#wqLk#%{qJ(dNW;MYVS+S-~r5Z&lx|#+cuzt|I+sg@Z zxCnJq5q?4d?^uF_ViB4PU?Uc+aUD|Fu1_$Ajm?%HGjrT=JfE&)g0Atgmyr*Xp(y{G zADl@h3&Eko5(FViyaYMO0ELU-W<2B76s(8|y|n?;J%t(I?tR@*vd`V^$}9QoHu9RS zU~2_Z#yIf#fJBx#Xn>0x0BW|T3NwqMk)|8;VHQeNHaQ?j#X4F|mO#5j^d7nyIcbe4 z-2g%%$Wwr_$m4WSTMDcIPG@7hznbq5qni|&%k%E<8v>M)i;O;K+UeIG>N0|3BSVG} zF<3~R2@^X=jAVpji;_`#oPb}1T3f{jG|^eR-|>J_&%{U;m2)ED)Ldlzfb}o5x@dR@IC2VBvTB| zm{NIu0K8Sfi$ijeDFS#N3wi|)|BbS|!9DNtJ!zLVSw%+Sc&Xcga=NLmO|sxZ=n9Mq zK$QTAE*{{C@4$q0U@6;$AhZ(ro-|;$6NDx}9uEbpi{P?sxCk5d-n5cFYqJ=7G;rDe zxDRP0O7N!eDn$&I+Avp~MKc88C;_}nEb;XztYjAnL&Z8B;PD(4@mot z$^#_S1(l=RdKoUOARi$oghbw5Nhq@VMm!;yF}54B}?@BkNbclx|PC!ge1Zkf|S>fC^!YKz^IEPo~&M$*Y=Q=HyOEB zcPx|wU@1d_O!#pM)bfW#Eu~EHi{bNjn{x#U!l=Okj^5Tn1&u65-1vx0Rf5_Ii1}HX zH39f51U=b!gQr%|0RjByzc+)qfJQ#rngIrnqNB2pe6KOkk8wvOhxaXM{_LPXAtKjh z$AWPY$~g6Jb(x9DowAAvc1);24gi{k?`0zr*l2k+qN0z=V}l*pB&xYh^ax^013=w~fn%|FP%Yb&0(ariW{gLwnX1mOATk?) zS3X&ggvbk~nD^+A*|3tG9(vG`8s*~&v&-<-jgzKg+oN0%B3Gw!^8k(lN3w40A?k$5 zd9w!}fi+K-Fb-DW% zK9(w+VpJ092N<_&cIy)?NGlLOec zYXuI&?oFaV>t`MX=iW?Nf+!9X202fCJ@MsLO*kqU*=q) zZ<22i-&j))OrZ}(VOQJsuwllj@cnQg3y>%oRIK~{D1c||Y^5DO7ZqJ7$CCE0;K3qQ z;L`Z#HLkDuYx(ts_Ad&REMWc}$vbOUX-y2cBLK8BKn4M-5p6i?8%X>s`Q?zwrI@)R zOOR-;LtN}V4?}^&3GAB3fY%DX&8=+FS92M;mb2*qMwIjZNqKlAciB#rJe z6aN9HdJbJN`!2KtFnVmUAOGI@nb}2ULY}3Hjq5}O)#5J`_+v3P0UHtmBuaw^H|Iej09F`xq5q?0&@UH-d07>X#y|Tr z2ZY=RR;a%aq<;Z@0o7ck!pfd|OH&P8*f}g*f(7zm06T;L0uO6qShnHd ziIn&4KR3&d$jlc!FL$)Kw~SWIM`-e3b@R|;0#G*@A7Q9Iq1~gmKpzV3mnOd1MH8oQ^)>+YcyN^%%ETw| z$?MDXsz0J+AMZ_fGP{j8>7Y|!gFK1jv*p2DR6Gy->qii(MDt66$y>|TwJ%D5KM$s$ zBnX^fZ;m)MOJV0KEo=jaQaxogFFVEr&(>$z5Pe%RrHRs<9eN%l>QX-1)aaI94TP~e zT^0*{c`Jnv$0%Y6A84bvMmJ7_hpVB(TevQ9yU zJR9ULH22H=YdB`6vvAogq}aY({_NW+E^$o4WxzdMb^E%1?AC16^jUS`bJKo~<5^}> zqoSVukk#2-&fw6yXDMFtyS~k3!#xT}=bKf%mIEC+eusE4lg^u+AIY8s2mVugC!H{0 z)@8FGZKFW&N>7y1dirtg(3HX*;;E0tKJLTxvr45`Zwahe6<=&XjB&f`E-}Wg`Sx>9 z~}KRJjx8%ScVv2h4#!(q-ah3QT^yUdf7o?jzh(?`?mY^OXlC~ zD_axQ?(f4l8d{Cu9~M}=Vh1!Ep>_1(#g0Bb{w27eYGTKX)ZA-9i_cdyk0NvbxM4Oe z0e!o^j{l~5p6wKp?F*hfxlexeE7KmpEd6G5fUT@-byv`y_sCj4t`D3 z^hoRyKS$~Vw1d%)8IqJ>2Mt+uu4OYH)pXCX50DyO78N5eBngrw@gH9Dvn?-YX5FB~ zv6fSl-$q}ZeO(Vmw^6nHrW}6E7e^Lh$j=OSYj!M4-Q4+Ojh9Oe`oO>FS7YixFRm<{ zwxxztip~?4g9o#JQjRY{Y36vI)J}|53Xc$Oo}5kVv-X%IRrz^)zjBQ(7&3b*y0O?I znvUzk{@@a?;Q~YWVkF6{`cxNjcd)MZ^W?RwL#37*vm&^qnaCQv$A{u! zz{<9IEWWIG@l)5A5)QgKi~ReJne(raSYI3IYr6{SwYi{Ch1b*8dRG^m9WS@_6lZXUYFMU zkT(WLYq)jBb+=x|=xg~NrYHK4eFS_bn5>}2>GJ4EcOSbx-q5OM{?voUFS(0{=klOR z@?I>v&Ynd|wG;!q@in1N5%DZ%=i4W*!=`FoR5t}_?!8ZUKA3*EYGUfT^WE@8I(T7( zwZeCt9xE#OklCHRXz^P1DXKwn^O@DNmc37X@R}24>cH`$FHbGhD-@3pWHWe@MtGY` ztDpD02|3CBQ>B0mHip4|%dOHPOv*cawW^94gC6}W&qhYf_B~u$h31HzaFLAbDhuPg zCIU*sX0@Qyhf7c&d}WtOTGP{~SGmuWyfkP_5+BrF8$Z}15q8hXMzhZEHiap3P?! z_tU*AXcimnVCz+KXz`|YU0cve={+`Asq0PB@2-2gd#Pf-1my1MPsT`cCnm`J=9<|c zUNq;T=BIWDZ)S^Aq#)sLHeA=IuP=o=m(@0U^E*UT}zbHiVcU zOx4UU8-BdiNKBip(}`H`i}ffvkEU3orakC2LKAAlEwHXU1qYe|WmtlbFJTV3yC2>3 z;3F3gM+ZvR?K(lczG($MW9KAY-Er>nkQO1vG{=%OEU6Vx>h>{ShVY4@_#Fah)CoYU z=;GGjpK^jYec$)sb{Kvy!^=>ibwS6#Y)jxk{ zGYdFsb~m8JUX#&v@lMkLGlRWmB0_UVU4%vO+8AI z)-GWNIx}TGtk7!^FX1IUDl0`AON9Kvh3bbM$Yq+b-EtKmFh$)?917z+o!|X*Sa)nAZZbBQ zmj&qhqvEk~BF>TCp0)&uig=bZ#Eru@Xm(#uWX)B%=B~Bea~J9*D=#xLaa`3mEuZ5= z;h@c!H&%)X+aF)>KSrLop9t$xOjakkZ=Sq#{l!!53om}#?YP(UY14Ks$|GCF^jQ|S z?#MdW@7+IMneOaMvYA z9kE@o)z(MNRMHRG-L#e?_p4`PRY{>^6UT9l6hI-I@b;g+nK!o0X$rl_;`qA1gE3XU zTEtSYfw=qNUwu4j=oUd@XH8XCaDf4?Rz6B@Aq*EyxCB2WpDU2`CZrql(#SyCw7BpP zH_gI4wXIyWhLAPJy7F(e^w)|^86H?ovB9SZk1Q>ug%TIVf(&1rYJqIie67F9mDqJt z>_damjbv+9icurPjg?}|z3?a)Q`BP_JSb?`VqbYtk*W6;YBd4KP4F;+WCPvguSNU5 zsTf39h=4I2q6!|@VQlA5=4-DcLlSz)97u*8RtKQdks3f~Pn@`CMk2*1La}-yD zH5L+O{xWS<>a_g}#dI`O(yi>C%*>xN(MT8?^gJY4s5@#k%}C&n9ru@VFEadrzulcf z-R)rhpl@V)LDQoax8Lf|sSy3Ig=6xQ1|()prb+8&qU3>gHLhRwLh^+iJkywH^)++2 z!PG`2_5wScxZbfNN8I#9(13G7pAFn={Q#p9G(BACQ?&jDSxDTam4Hnx$Z3_<%q&(V zCE(7RnKzY6Udha*1!5jxt^WOCGiEPG^(ua!1pB)MP4vBSx5Sv!5Ub_>w9GXVji + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + +#define wxSTC_INVALID_POSITION -1 +#define wxSTC_START 2000 +#define wxSTC_OPTIONAL_START 3000 +#define wxSTC_LEXER_START 4000 +#define wxSTC_CMD_REDO 2011 +#define wxSTC_CMD_SELECTALL 2013 +#define wxSTC_WS_INVISIBLE 0 +#define wxSTC_WS_VISIBLEALWAYS 1 +#define wxSTC_WS_VISIBLEAFTERINDENT 2 +#define wxSTC_EOL_CRLF 0 +#define wxSTC_EOL_CR 1 +#define wxSTC_EOL_LF 2 + +// The SC_CP_UTF8 value can be used to enter Unicode mode. +// This is the same value as CP_UTF8 in Windows +#define wxSTC_CP_UTF8 65001 +#define wxSTC_MARKER_MAX 31 +#define wxSTC_MARK_CIRCLE 0 +#define wxSTC_MARK_ROUNDRECT 1 +#define wxSTC_MARK_ARROW 2 +#define wxSTC_MARK_SMALLRECT 3 +#define wxSTC_MARK_SHORTARROW 4 +#define wxSTC_MARK_EMPTY 5 +#define wxSTC_MARK_ARROWDOWN 6 +#define wxSTC_MARK_MINUS 7 +#define wxSTC_MARK_PLUS 8 +#define wxSTC_MARKNUM_FOLDER 30 +#define wxSTC_MARKNUM_FOLDEROPEN 31 +#define wxSTC_MARGIN_SYMBOL 0 +#define wxSTC_MARGIN_NUMBER 1 +#define wxSTC_STYLE_DEFAULT 32 +#define wxSTC_STYLE_LINENUMBER 33 +#define wxSTC_STYLE_BRACELIGHT 34 +#define wxSTC_STYLE_BRACEBAD 35 +#define wxSTC_STYLE_CONTROLCHAR 36 +#define wxSTC_STYLE_INDENTGUIDE 37 +#define wxSTC_STYLE_MAX 127 + +// Character set identifiers are used in StyleSetCharacterSet. +// The values are the same as the Windows *_CHARSET values. +#define wxSTC_CHARSET_ANSI 0 +#define wxSTC_CHARSET_DEFAULT 1 +#define wxSTC_CHARSET_BALTIC 186 +#define wxSTC_CHARSET_CHINESEBIG5 136 +#define wxSTC_CHARSET_EASTEUROPE 238 +#define wxSTC_CHARSET_GB2312 134 +#define wxSTC_CHARSET_GREEK 161 +#define wxSTC_CHARSET_HANGUL 129 +#define wxSTC_CHARSET_MAC 77 +#define wxSTC_CHARSET_OEM 255 +#define wxSTC_CHARSET_RUSSIAN 204 +#define wxSTC_CHARSET_SHIFTJIS 128 +#define wxSTC_CHARSET_SYMBOL 2 +#define wxSTC_CHARSET_TURKISH 162 +#define wxSTC_CHARSET_JOHAB 130 +#define wxSTC_CHARSET_HEBREW 177 +#define wxSTC_CHARSET_ARABIC 178 +#define wxSTC_CHARSET_VIETNAMESE 163 +#define wxSTC_CHARSET_THAI 222 +#define wxSTC_INDIC_MAX 7 +#define wxSTC_INDIC_PLAIN 0 +#define wxSTC_INDIC_SQUIGGLE 1 +#define wxSTC_INDIC_TT 2 +#define wxSTC_INDIC_DIAGONAL 3 +#define wxSTC_INDIC_STRIKE 4 +#define wxSTC_INDIC0_MASK 32 +#define wxSTC_INDIC1_MASK 64 +#define wxSTC_INDIC2_MASK 128 +#define wxSTC_INDICS_MASK 32 | 64 | 128 + +// PrintColourMode - use same colours as screen. +#define wxSTC_PRINT_NORMAL 0 + +// PrintColourMode - invert the light value of each style for printing. +#define wxSTC_PRINT_INVERTLIGHT 1 + +// PrintColourMode - force black text on white background for printing. +#define wxSTC_PRINT_BLACKONWHITE 2 +#define wxSTC_FIND_DOWN 1 +#define wxSTC_FIND_WHOLEWORD 2 +#define wxSTC_FIND_MATCHCASE 4 +#define wxSTC_FIND_WORDSTART 0x00100000 + +// SCFIND_REGEXP is not yet implemented. +#define wxSTC_FIND_REGEXP 0x00200000 +#define wxSTC_CMD_UNDO 2176 +#define wxSTC_CMD_CUT 2177 +#define wxSTC_CMD_COPY 2178 +#define wxSTC_CMD_PASTE 2179 +#define wxSTC_FOLDLEVELBASE 0x400 +#define wxSTC_FOLDLEVELWHITEFLAG 0x1000 +#define wxSTC_FOLDLEVELHEADERFLAG 0x2000 +#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF +#define wxSTC_CMD_LINEDOWN 2300 +#define wxSTC_CMD_LINEDOWNEXTEND 2301 +#define wxSTC_CMD_LINEUP 2302 +#define wxSTC_CMD_LINEUPEXTEND 2303 +#define wxSTC_CMD_CHARLEFT 2304 +#define wxSTC_CMD_CHARLEFTEXTEND 2305 +#define wxSTC_CMD_CHARRIGHT 2306 +#define wxSTC_CMD_CHARRIGHTEXTEND 2307 +#define wxSTC_CMD_WORDLEFT 2308 +#define wxSTC_CMD_WORDLEFTEXTEND 2309 +#define wxSTC_CMD_WORDRIGHT 2310 +#define wxSTC_CMD_WORDRIGHTEXTEND 2311 +#define wxSTC_CMD_HOME 2312 +#define wxSTC_CMD_HOMEEXTEND 2313 +#define wxSTC_CMD_LINEEND 2314 +#define wxSTC_CMD_LINEENDEXTEND 2315 +#define wxSTC_CMD_DOCUMENTSTART 2316 +#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317 +#define wxSTC_CMD_DOCUMENTEND 2318 +#define wxSTC_CMD_DOCUMENTENDEXTEND 2319 +#define wxSTC_CMD_PAGEUP 2320 +#define wxSTC_CMD_PAGEUPEXTEND 2321 +#define wxSTC_CMD_PAGEDOWN 2322 +#define wxSTC_CMD_PAGEDOWNEXTEND 2323 +#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324 +#define wxSTC_CMD_CANCEL 2325 +#define wxSTC_CMD_DELETEBACK 2326 +#define wxSTC_CMD_TAB 2327 +#define wxSTC_CMD_BACKTAB 2328 +#define wxSTC_CMD_NEWLINE 2329 +#define wxSTC_CMD_FORMFEED 2330 +#define wxSTC_CMD_VCHOME 2331 +#define wxSTC_CMD_VCHOMEEXTEND 2332 +#define wxSTC_CMD_ZOOMIN 2333 +#define wxSTC_CMD_ZOOMOUT 2334 +#define wxSTC_CMD_DELWORDLEFT 2335 +#define wxSTC_CMD_DELWORDRIGHT 2336 +#define wxSTC_CMD_LINECUT 2337 +#define wxSTC_CMD_LINEDELETE 2338 +#define wxSTC_CMD_LINETRANSPOSE 2339 +#define wxSTC_CMD_LOWERCASE 2340 +#define wxSTC_CMD_UPPERCASE 2341 +#define wxSTC_CMD_LINESCROLLDOWN 2342 +#define wxSTC_CMD_LINESCROLLUP 2343 +#define wxSTC_EDGE_NONE 0 +#define wxSTC_EDGE_LINE 1 +#define wxSTC_EDGE_BACKGROUND 2 + +// Show caret within N lines of edge when it's scrolled to view +#define wxSTC_CARET_SLOP 0x01 + +// Center caret on screen when it's scrolled to view +#define wxSTC_CARET_CENTER 0x02 + +// OR this with CARET_CENTER to reposition even when visible, or +// OR this with CARET_SLOP to reposition whenever outside slop border +#define wxSTC_CARET_STRICT 0x04 + +// Notifications +// Type of modification and the action which caused the modification +// These are defined as a bit mask to make it easy to specify which notifications are wanted. +// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +#define wxSTC_MOD_INSERTTEXT 0x1 +#define wxSTC_MOD_DELETETEXT 0x2 +#define wxSTC_MOD_CHANGESTYLE 0x4 +#define wxSTC_MOD_CHANGEFOLD 0x8 +#define wxSTC_PERFORMED_USER 0x10 +#define wxSTC_PERFORMED_UNDO 0x20 +#define wxSTC_PERFORMED_REDO 0x40 +#define wxSTC_LASTSTEPINUNDOREDO 0x100 +#define wxSTC_MOD_CHANGEMARKER 0x200 +#define wxSTC_MOD_BEFOREINSERT 0x400 +#define wxSTC_MOD_BEFOREDELETE 0x800 +#define wxSTC_MODEVENTMASKALL 0xF77 + +// Symbolic key codes and modifier flags +// ASCII and other printable characters below 256 +// Extended keys above 300 +#define wxSTC_KEY_DOWN 300 +#define wxSTC_KEY_UP 301 +#define wxSTC_KEY_LEFT 302 +#define wxSTC_KEY_RIGHT 303 +#define wxSTC_KEY_HOME 304 +#define wxSTC_KEY_END 305 +#define wxSTC_KEY_PRIOR 306 +#define wxSTC_KEY_NEXT 307 +#define wxSTC_KEY_DELETE 308 +#define wxSTC_KEY_INSERT 309 +#define wxSTC_KEY_ESCAPE 7 +#define wxSTC_KEY_BACK 8 +#define wxSTC_KEY_TAB 9 +#define wxSTC_KEY_RETURN 13 +#define wxSTC_KEY_ADD 310 +#define wxSTC_KEY_SUBTRACT 311 +#define wxSTC_KEY_DIVIDE 312 +#define wxSTC_SCMOD_SHIFT 1 +#define wxSTC_SCMOD_CTRL 2 +#define wxSTC_SCMOD_ALT 4 + +// For SciLexer.h +#define wxSTC_LEX_CONTAINER 0 +#define wxSTC_LEX_NULL 1 +#define wxSTC_LEX_PYTHON 2 +#define wxSTC_LEX_CPP 3 +#define wxSTC_LEX_HTML 4 +#define wxSTC_LEX_XML 5 +#define wxSTC_LEX_PERL 6 +#define wxSTC_LEX_SQL 7 +#define wxSTC_LEX_VB 8 +#define wxSTC_LEX_PROPERTIES 9 +#define wxSTC_LEX_ERRORLIST 10 +#define wxSTC_LEX_MAKEFILE 11 +#define wxSTC_LEX_BATCH 12 +#define wxSTC_LEX_XCODE 13 +#define wxSTC_LEX_LATEX 14 +#define wxSTC_LEX_LUA 15 +#define wxSTC_LEX_DIFF 16 + +// Lexical states for SCLEX_PYTHON +#define wxSTC_P_DEFAULT 0 +#define wxSTC_P_COMMENTLINE 1 +#define wxSTC_P_NUMBER 2 +#define wxSTC_P_STRING 3 +#define wxSTC_P_CHARACTER 4 +#define wxSTC_P_WORD 5 +#define wxSTC_P_TRIPLE 6 +#define wxSTC_P_TRIPLEDOUBLE 7 +#define wxSTC_P_CLASSNAME 8 +#define wxSTC_P_DEFNAME 9 +#define wxSTC_P_OPERATOR 10 +#define wxSTC_P_IDENTIFIER 11 +#define wxSTC_P_COMMENTBLOCK 12 +#define wxSTC_P_STRINGEOL 13 + +// Lexical states for SCLEX_CPP, SCLEX_VB +#define wxSTC_C_DEFAULT 0 +#define wxSTC_C_COMMENT 1 +#define wxSTC_C_COMMENTLINE 2 +#define wxSTC_C_COMMENTDOC 3 +#define wxSTC_C_NUMBER 4 +#define wxSTC_C_WORD 5 +#define wxSTC_C_STRING 6 +#define wxSTC_C_CHARACTER 7 +#define wxSTC_C_UUID 8 +#define wxSTC_C_PREPROCESSOR 9 +#define wxSTC_C_OPERATOR 10 +#define wxSTC_C_IDENTIFIER 11 +#define wxSTC_C_STRINGEOL 12 +#define wxSTC_C_VERBATIM 13 + +// Lexical states for SCLEX_HTML, SCLEX_XML +#define wxSTC_H_DEFAULT 0 +#define wxSTC_H_TAG 1 +#define wxSTC_H_TAGUNKNOWN 2 +#define wxSTC_H_ATTRIBUTE 3 +#define wxSTC_H_ATTRIBUTEUNKNOWN 4 +#define wxSTC_H_NUMBER 5 +#define wxSTC_H_DOUBLESTRING 6 +#define wxSTC_H_SINGLESTRING 7 +#define wxSTC_H_OTHER 8 +#define wxSTC_H_COMMENT 9 +#define wxSTC_H_ENTITY 10 + +// XML and ASP +#define wxSTC_H_TAGEND 11 +#define wxSTC_H_XMLSTART 12 +#define wxSTC_H_XMLEND 13 +#define wxSTC_H_SCRIPT 14 +#define wxSTC_H_ASP 15 +#define wxSTC_H_ASPAT 16 +#define wxSTC_H_CDATA 17 +#define wxSTC_H_QUESTION 18 + +// More HTML +#define wxSTC_H_VALUE 19 + +// Embedded Javascript +#define wxSTC_HJ_START 40 +#define wxSTC_HJ_DEFAULT 41 +#define wxSTC_HJ_COMMENT 42 +#define wxSTC_HJ_COMMENTLINE 43 +#define wxSTC_HJ_COMMENTDOC 44 +#define wxSTC_HJ_NUMBER 45 +#define wxSTC_HJ_WORD 46 +#define wxSTC_HJ_KEYWORD 47 +#define wxSTC_HJ_DOUBLESTRING 48 +#define wxSTC_HJ_SINGLESTRING 49 +#define wxSTC_HJ_SYMBOLS 50 +#define wxSTC_HJ_STRINGEOL 51 + +// ASP Javascript +#define wxSTC_HJA_START 55 +#define wxSTC_HJA_DEFAULT 56 +#define wxSTC_HJA_COMMENT 57 +#define wxSTC_HJA_COMMENTLINE 58 +#define wxSTC_HJA_COMMENTDOC 59 +#define wxSTC_HJA_NUMBER 60 +#define wxSTC_HJA_WORD 61 +#define wxSTC_HJA_KEYWORD 62 +#define wxSTC_HJA_DOUBLESTRING 63 +#define wxSTC_HJA_SINGLESTRING 64 +#define wxSTC_HJA_SYMBOLS 65 +#define wxSTC_HJA_STRINGEOL 66 + +// Embedded VBScript +#define wxSTC_HB_START 70 +#define wxSTC_HB_DEFAULT 71 +#define wxSTC_HB_COMMENTLINE 72 +#define wxSTC_HB_NUMBER 73 +#define wxSTC_HB_WORD 74 +#define wxSTC_HB_STRING 75 +#define wxSTC_HB_IDENTIFIER 76 +#define wxSTC_HB_STRINGEOL 77 + +// ASP VBScript +#define wxSTC_HBA_START 80 +#define wxSTC_HBA_DEFAULT 81 +#define wxSTC_HBA_COMMENTLINE 82 +#define wxSTC_HBA_NUMBER 83 +#define wxSTC_HBA_WORD 84 +#define wxSTC_HBA_STRING 85 +#define wxSTC_HBA_IDENTIFIER 86 +#define wxSTC_HBA_STRINGEOL 87 + +// Embedded Python +#define wxSTC_HP_START 90 +#define wxSTC_HP_DEFAULT 91 +#define wxSTC_HP_COMMENTLINE 92 +#define wxSTC_HP_NUMBER 93 +#define wxSTC_HP_STRING 94 +#define wxSTC_HP_CHARACTER 95 +#define wxSTC_HP_WORD 96 +#define wxSTC_HP_TRIPLE 97 +#define wxSTC_HP_TRIPLEDOUBLE 98 +#define wxSTC_HP_CLASSNAME 99 +#define wxSTC_HP_DEFNAME 100 +#define wxSTC_HP_OPERATOR 101 +#define wxSTC_HP_IDENTIFIER 102 + +// ASP Python +#define wxSTC_HPA_START 105 +#define wxSTC_HPA_DEFAULT 106 +#define wxSTC_HPA_COMMENTLINE 107 +#define wxSTC_HPA_NUMBER 108 +#define wxSTC_HPA_STRING 109 +#define wxSTC_HPA_CHARACTER 110 +#define wxSTC_HPA_WORD 111 +#define wxSTC_HPA_TRIPLE 112 +#define wxSTC_HPA_TRIPLEDOUBLE 113 +#define wxSTC_HPA_CLASSNAME 114 +#define wxSTC_HPA_DEFNAME 115 +#define wxSTC_HPA_OPERATOR 116 +#define wxSTC_HPA_IDENTIFIER 117 + +// PHP +#define wxSTC_HPHP_DEFAULT 118 +#define wxSTC_HPHP_HSTRING 119 +#define wxSTC_HPHP_SIMPLESTRING 120 +#define wxSTC_HPHP_WORD 121 +#define wxSTC_HPHP_NUMBER 122 +#define wxSTC_HPHP_VARIABLE 123 +#define wxSTC_HPHP_COMMENT 124 +#define wxSTC_HPHP_COMMENTLINE 125 +#define wxSTC_HPHP_STRINGEOL 126 + +// Lexical states for SCLEX_PERL +#define wxSTC_PL_DEFAULT 0 +#define wxSTC_PL_HERE 1 +#define wxSTC_PL_COMMENTLINE 2 +#define wxSTC_PL_POD 3 +#define wxSTC_PL_NUMBER 4 +#define wxSTC_PL_WORD 5 +#define wxSTC_PL_STRING 6 +#define wxSTC_PL_CHARACTER 7 +#define wxSTC_PL_PUNCTUATION 8 +#define wxSTC_PL_PREPROCESSOR 9 +#define wxSTC_PL_OPERATOR 10 +#define wxSTC_PL_IDENTIFIER 11 +#define wxSTC_PL_SCALAR 12 +#define wxSTC_PL_ARRAY 13 +#define wxSTC_PL_HASH 14 +#define wxSTC_PL_SYMBOLTABLE 15 +#define wxSTC_PL_REF 16 +#define wxSTC_PL_REGEX 17 +#define wxSTC_PL_REGSUBST 18 +#define wxSTC_PL_LONGQUOTE 19 +#define wxSTC_PL_BACKTICKS 20 +#define wxSTC_PL_DATASECTION 21 + +// Lexical states for SCLEX_LATEX +#define wxSTC_L_DEFAULT 0 +#define wxSTC_L_COMMAND 1 +#define wxSTC_L_TAG 2 +#define wxSTC_L_MATH 3 +#define wxSTC_L_COMMENT 4 + +// Lexical states for SCLEX_LUA +#define wxSTC_LUA_DEFAULT 0 +#define wxSTC_LUA_COMMENT 1 +#define wxSTC_LUA_COMMENTLINE 2 +#define wxSTC_LUA_COMMENTDOC 3 +#define wxSTC_LUA_NUMBER 4 +#define wxSTC_LUA_WORD 5 +#define wxSTC_LUA_STRING 6 +#define wxSTC_LUA_CHARACTER 7 +#define wxSTC_LUA_LITERALSTRING 8 +#define wxSTC_LUA_PREPROCESSOR 9 +#define wxSTC_LUA_OPERATOR 10 +#define wxSTC_LUA_IDENTIFIER 11 +#define wxSTC_LUA_STRINGEOL 12 +#define wxSTC_ERR_DEFAULT 0 +#define wxSTC_ERR_PYTHON 1 +#define wxSTC_ERR_GCC 2 +#define wxSTC_ERR_MS 3 +#define wxSTC_ERR_CMD 4 +#define wxSTC_ERR_BORLAND 5 +#define wxSTC_ERR_PERL 6 + +// END of generated section +//---------------------------------------------------------------------- +// Others + +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN)) + + + +//---------------------------------------------------------------------- + +class ScintillaWX; // forward declare +class WordList; +struct SCNotification; + + +extern const wxChar* wxSTCNameStr; + +//---------------------------------------------------------------------- + +class wxStyledTextCtrl : public wxControl { +public: + +#ifdef SWIG + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const char* name = "styledtext"); +#else + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSTCNameStr); +#endif + + +#ifndef SWIG + ~wxStyledTextCtrl(); +#endif + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit stc.h.in instead +// and regenerate + + + // Add text to the document + void AddText(const wxString& text); + + // Add array of cells to document + void AddStyledText(const wxString& text); + + // Insert string at a position + void InsertText(int pos, const wxString& text); + + // Delete all text in the document + void ClearAll(); + + // Set all style bytes to 0, remove all folding information + void ClearDocumentStyle(); + + // The number of characters in the document + int GetLength(); + + // Returns the character byte at the position + int GetCharAt(int pos); + + // Returns the position of the caret + int GetCurrentPos(); + + // Returns the position of the opposite end of the selection to the caret + int GetAnchor(); + + // Returns the style byte at the position + int GetStyleAt(int pos); + + // Redoes the next action on the undo history + void Redo(); + + // Choose between collecting actions into the undo + // history and discarding them. + void SetUndoCollection(bool collectUndo); + + // Select all the text in the document. + void SelectAll(); + + // Remember the current position in the undo history as the position + // at which the document was saved. + void SetSavePoint(); + + // Retrieve a buffer of cells. + wxString GetStyledText(int startPos, int endPos); + + // Are there any redoable actions in the undo history. + bool CanRedo(); + + // Retrieve the line number at which a particular marker is located + int MarkerLineFromHandle(int handle); + + // Delete a marker. + void MarkerDeleteHandle(int handle); + + // Is undo history being collected? + bool GetUndoCollection(); + + // Are white space characters currently visible? + // Returns one of SCWS_* constants. + int GetViewWhiteSpace(); + + // Make white space characters invisible, always visible or visible outside indentation. + void SetViewWhiteSpace(int viewWS); + + // Find the position from a point within the window. + int PositionFromPoint(wxPoint pt); + + // Set caret to start of a line and ensure it is visible. + void GotoLine(int line); + + // Set caret to a position and ensure it is visible. + void GotoPos(int pos); + + // Set the selection anchor to a position. The anchor is the opposite + // end of the selection from the caret. + void SetAnchor(int posAnchor); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. + wxString GetCurLine(int* OUTPUT=NULL); + + // Retrieve the position of the last correctly styled character. + int GetEndStyled(); + + // Convert all line endings in the document to use the current mode. + void ConvertEOLs(); + + // Retrieve the current end of line mode - one of CRLF, CR, or LF. + int GetEOLMode(); + + // Set the current end of line mode. + void SetEOLMode(int eolMode); + + // Set the current styling position to pos and the styling mask to mask. + // The styling mask can be used to protect some bits in each styling byte from + // modification. + void StartStyling(int pos, int mask); + + // Change style from current styling position for length characters to a style + // and move the current styling position to after this newly styled segment. + void SetStyling(int length, int style); + + // Is drawing done first into a buffer or direct to the screen. + bool GetBufferedDraw(); + + // If drawing is buffered then each line of text is drawn into a bitmap buffer + // before drawing it to the screen to avoid flicker. + void SetBufferedDraw(bool buffered); + + // Change the visible size of a tab to be a multiple of the width of a space + // character. + void SetTabWidth(int tabWidth); + + // Retrieve the visible size of a tab. + int GetTabWidth(); + + // Set the code page used to interpret the bytes of the document as characters. + // The SC_CP_UTF8 value can be used to enter Unicode mode. + void SetCodePage(int codePage); + + // Set the symbol used for a particular marker number, + // and optionally the for and background colours. + void MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour); + + // Set the foreground colour used for a particular marker number. + void MarkerSetForeground(int markerNumber, const wxColour& fore); + + // Set the background colour used for a particular marker number. + void MarkerSetBackground(int markerNumber, const wxColour& back); + + // Add a marker to a line. + void MarkerAdd(int line, int markerNumber); + + // Delete a marker from a line + void MarkerDelete(int line, int markerNumber); + + // Delete all markers with a particular number from all lines + void MarkerDeleteAll(int markerNumber); + + // Get a bit mask of all the markers set on a line. + int MarkerGet(int line); + + // Find the next line after lineStart that includes a marker in mask. + int MarkerNext(int lineStart, int markerMask); + + // Find the previous line before lineStart that includes a marker in mask. + int MarkerPrevious(int lineStart, int markerMask); + + // Set a margin to be either numeric or symbolic. + void SetMarginType(int margin, int marginType); + + // Retrieve the type of a margin. + int GetMarginType(int margin); + + // Set the width of a margin to a width expressed in pixels. + void SetMarginWidth(int margin, int pixelWidth); + + // Retrieve the width of a margin in pixels. + int GetMarginWidth(int margin); + + // Set a mask that determines which markers are displayed in a margin. + void SetMarginMask(int margin, int mask); + + // Retrieve the marker mask of a margin. + int GetMarginMask(int margin); + + // Make a margin sensitive or insensitive to mouse clicks. + void SetMarginSensitive(int margin, bool sensitive); + + // Retrieve the mouse click sensitivity of a margin. + bool GetMarginSensitive(int margin); + + // Clear all the styles and make equivalent to the global default style. + void StyleClearAll(); + + // Set the foreground colour of a style. + void StyleSetForeground(int style, const wxColour& fore); + + // Set the background colour of a style. + void StyleSetBackground(int style, const wxColour& back); + + // Set a style to be bold or not. + void StyleSetBold(int style, bool bold); + + // Set a style to be italic or not. + void StyleSetItalic(int style, bool italic); + + // Set the size of characters of a style. + void StyleSetSize(int style, int sizePoints); + + // Set the font of a style. + void StyleSetFaceName(int style, const wxString& fontName); + + // Set a style to have its end of line filled or not. + void StyleSetEOLFilled(int style, bool filled); + + // Reset the default style to its state at startup + void StyleResetDefault(); + + // Set a style to be underlined or not. + void StyleSetUnderline(int style, bool underline); + + // Set the foreground colour of the selection and whether to use this setting. + void SetSelForeground(bool useSetting, const wxColour& fore); + + // Set the background colour of the selection and whether to use this setting. + void SetSelBackground(bool useSetting, const wxColour& back); + + // Set the foreground colour of the caret. + void SetCaretForeground(const wxColour& fore); + + // When key+modifier combination km is pressed perform msg. + void CmdKeyAssign(int key, int modifiers, int cmd); + + // When key+modifier combination km do nothing. + void CmdKeyClear(int key, int modifiers); + + // Drop all key mappings. + void CmdKeyClearAll(); + + // Set the styles for a segment of the document. + void SetStyleBytes(int length, char* styleBytes); + + // Set a style to be visible or not. + void StyleSetVisible(int style, bool visible); + + // Get the time in milliseconds that the caret is on and off. + int GetCaretPeriod(); + + // Get the time in milliseconds that the caret is on and off. 0 = steady on. + void SetCaretPeriod(int periodMilliseconds); + + // Set the set of characters making up words for when moving or selecting + // by word. + void SetWordChars(const wxString& characters); + + // Start a sequence of actions that is undone and redone as a unit. + // May be nested. + void BeginUndoAction(); + + // End a sequence of actions that is undone and redone as a unit. + void EndUndoAction(); + + // Set an indicator to plain, squiggle or TT. + void IndicatorSetStyle(int indic, int style); + + // Retrieve the style of an indicator. + int IndicatorGetStyle(int indic); + + // Set the foreground colour of an indicator. + void IndicatorSetForeground(int indic, const wxColour& fore); + + // Retrieve the foreground colour of an indicator. + wxColour IndicatorGetForeground(int indic); + + // Divide each styling byte into lexical class bits (default:5) and indicator + // bits (default:3). If a lexer requires more than 32 lexical states, then this + // is used to expand the possible states. + void SetStyleBits(int bits); + + // Retrieve number of bits in style bytes used to hold the lexical state. + int GetStyleBits(); + + // Used to hold extra styling information for each line. + void SetLineState(int line, int state); + + // Retrieve the extra styling information for a line. + int GetLineState(int line); + + // Retrieve the last line number that has line state. + int GetMaxLineState(); + + // Display a auto-completion list. + // The lenEntered parameter indicates how many characters before + // the caret should be used to provide context. + void AutoCompShow(int lenEntered, const wxString& itemList); + + // Remove the auto-completion list from the screen. + void AutoCompCancel(); + + // Is there an auto-completion list visible? + bool AutoCompActive(); + + // Retrieve the position of the caret when the auto-completion list was + // displayed. + int AutoCompPosStart(); + + // User has selected an item so remove the list and insert the selection. + void AutoCompComplete(); + + // Define a set of character that when typed cancel the auto-completion list. + void AutoCompStops(const wxString& characterSet); + + // Change the separator character in the string setting up an auto-completion + // list. Default is space but can be changed if items contain space. + void AutoCompSetSeparator(int separatorCharacter); + + // Retrieve the auto-completion list separator character. + int AutoCompGetSeparator(); + + // Select the item in the auto-completion list that starts with a string. + void AutoCompSelect(const wxString& text); + + // Should the auto-completion list be cancelled if the user backspaces to a + // position before where the box was created. + void AutoCompSetCancelAtStart(bool cancel); + + // Retrieve whether auto-completion cancelled by backspacing before start. + bool AutoCompGetCancelAtStart(); + + // Define a set of character that when typed fills up the selected word. + void AutoCompSetFillUps(const wxString& characterSet); + + // Should a single item auto-completion list automatically choose the item. + void AutoCompSetChooseSingle(bool chooseSingle); + + // Retrieve whether a single item auto-completion list automatically choose the item. + bool AutoCompGetChooseSingle(); + + // Set whether case is significant when performing auto-completion searches. + void AutoCompSetIgnoreCase(bool ignoreCase); + + // Retrieve state of ignore case flag. + bool AutoCompGetIgnoreCase(); + + // Set the number of spaces used for one level of indentation. + void SetIndent(int indentSize); + + // Retrieve indentation size. + int GetIndent(); + + // Indentation will only use space characters if useTabs is false, otherwise + // it will use a combination of tabs and spaces. + void SetUseTabs(bool useTabs); + + // Retrieve whether tabs will be used in indentation. + bool GetUseTabs(); + + // Change the indentation of a line to a number of columns. + void SetLineIndentation(int line, int indentSize); + + // Retrieve the number of columns that a line is indented. + int GetLineIndentation(int line); + + // Retrieve the position before the first non indentation character on a line. + int GetLineIndentPosition(int line); + + // Retrieve the column number of a position, taking tab width into account. + int GetColumn(int pos); + + // Show or hide the horizontal scroll bar. + void SetUseHorizontalScrollBar(bool show); + + // Is the horizontal scroll bar visible? + bool GetUseHorizontalScrollBar(); + + // Show or hide indentation guides. + void SetIndentationGuides(bool show); + + // Are the indentation guides visible? + bool GetIndentationGuides(); + + // Set the highlighted indentation guide column. + // 0 = no highlighted guide. + void SetHighlightGuide(int column); + + // Get the highlighted indentation guide column. + int GetHighlightGuide(); + + // Get the position after the last visible characters on a line. + int GetLineEndPosition(int line); + + // Get the code page used to interpret the bytes of the document as characters. + int GetCodePage(); + + // Get the foreground colour of the caret. + wxColour GetCaretForeground(); + + // In read-only mode? + bool GetReadOnly(); + + // Sets the position of the caret. + void SetCurrentPos(int pos); + + // Sets the position that starts the selection - this becomes the anchor. + void SetSelectionStart(int pos); + + // Returns the position at the start of the selection. + int GetSelectionStart(); + + // Sets the position that ends the selection - this becomes the currentPosition. + void SetSelectionEnd(int pos); + + // Returns the position at the end of the selection. + int GetSelectionEnd(); + + // Sets the print magnification added to the point size of each style for printing. + void SetPrintMagnification(int magnification); + + // Returns the print magnification. + int GetPrintMagnification(); + + // Modify colours when printing for clearer printed text. + void SetPrintColourMode(int mode); + + // Returns the print colour mode. + int GetPrintColourMode(); + + // Find some text in the document. + int FindText(int minPos, int maxPos, + const wxString& text, + bool caseSensitive, bool wholeWord); + + // On Windows will draw the document into a display context such as a printer. + int FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect); + + // Retrieve the line at the top of the display. + int GetFirstVisibleLine(); + + // Retrieve the contents of a line. + wxString GetLine(int line); + + // Returns the number of lines in the document. There is always at least one. + int GetLineCount(); + + // Sets the size in pixels of the left margin. + void SetMarginLeft(int width); + + // Returns the size in pixels of the left margin. + int GetMarginLeft(); + + // Sets the size in pixels of the right margin. + void SetMarginRight(int width); + + // Returns the size in pixels of the right margin. + int GetMarginRight(); + + // Is the document different from when it was last saved? + bool GetModify(); + + // Select a range of text. + void SetSelection(int start, int end); + + // Retrieve the selected text. + wxString GetSelectedText(); + + // Retrieve a range of text. + wxString GetTextRange(int startPos, int endPos); + + // Draw the selection in normal style or with selection highlighted. + void HideSelection(bool normal); + + // Retrieve the line containing a position. + int LineFromPosition(int pos); + + // Retrieve the position at the start of a line. + int PositionFromLine(int line); + + // Scroll horizontally and vertically. + void LineScroll(int columns, int lines); + + // Ensure the caret is visible. + void EnsureCaretVisible(); + + // Replace the selected text with the argument text. + void ReplaceSelection(const wxString& text); + + // Set to read only or read write. + void SetReadOnly(bool readOnly); + + // Will a paste succeed? + bool CanPaste(); + + // Are there any undoable actions in the undo history. + bool CanUndo(); + + // Delete the undo history. + void EmptyUndoBuffer(); + + // Undo one action in the undo history. + void Undo(); + + // Cut the selection to the clipboard. + void Cut(); + + // Copy the selection to the clipboard. + void Copy(); + + // Paste the contents of the clipboard into the document replacing the selection. + void Paste(); + + // Clear the selection. + void Clear(); + + // Replace the contents of the document with the argument text. + void SetText(const wxString& text); + + // Retrieve all the text in the document. + wxString GetText(); + + // Retrieve the number of characters in the document. + int GetTextLength(); + + // Set to overtype (true) or insert mode + void SetOvertype(bool overtype); + + // Returns true if overtype mode is active otherwise false is returned. + bool GetOvertype(); + + // Show a call tip containing a definition near position pos. + void CallTipShow(int pos, const wxString& definition); + + // Remove the call tip from the screen. + void CallTipCancel(); + + // Is there an active call tip? + bool CallTipActive(); + + // Retrieve the position where the caret was before displaying the call tip. + int CallTipPosAtStart(); + + // Highlight a segment of the definition. + void CallTipSetHighlight(int start, int end); + + // Set the background colour for the call tip. + void CallTipSetBackground(const wxColour& back); + + // Find the display line of a document line taking hidden lines into account. + int VisibleFromDocLine(int line); + + // Find the document line of a display line taking hidden lines into account. + int DocLineFromVisible(int lineDisplay); + + // Set the fold level of a line. + // This encodes an integer level along with flags indicating whether the + // line is a header and whether it is effectively white space. + void SetFoldLevel(int line, int level); + + // Retrieve the fold level of a line. + int GetFoldLevel(int line); + + // Find the last child line of a header line. + int GetLastChild(int line, int level); + + // Find the parent line of a child line. + int GetFoldParent(int line); + + // Make a range of lines visible. + void ShowLines(int lineStart, int lineEnd); + + // Make a range of lines invisible. + void HideLines(int lineStart, int lineEnd); + + // Is a line visible? + bool GetLineVisible(int line); + + // Show the children of a header line. + void SetFoldExpanded(int line, bool expanded); + + // Is a header line expanded? + bool GetFoldExpanded(int line); + + // Switch a header line between expanded and contracted. + void ToggleFold(int line); + + // Ensure a particular line is visible by expanding any header line hiding it. + void EnsureVisible(int line); + + // Set some debugging options for folding + void SetFoldFlags(int flags); + + // How many characters are on a line, not including end of line characters. + int LineLength(int line); + + // Highlight the characters at two positions. + void BraceHighlight(int pos1, int pos2); + + // Highlight the character at a position indicating there is no matching brace. + void BraceBadLight(int pos); + + // Find the position of a matching brace or INVALID_POSITION if no match. + int BraceMatch(int pos); + + // Are the end of line characters visible. + bool GetViewEOL(); + + // Make the end of line characters visible or invisible + void SetViewEOL(bool visible); + + // Retrieve a pointer to the document object. + void* GetDocPointer(); + + // Change the document object used. + void SetDocPointer(void* docPointer); + + // Set which document modification events are sent to the container. + void SetModEventMask(int mask); + + // Retrieve the column number which text should be kept within. + int GetEdgeColumn(); + + // Set the column number of the edge. + // If text goes past the edge then it is highlighted. + void SetEdgeColumn(int column); + + // Retrieve the edge highlight mode. + int GetEdgeMode(); + + // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that + // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + void SetEdgeMode(int mode); + + // Retrieve the colour used in edge indication. + wxColour GetEdgeColour(); + + // Change the colour used in edge indication. + void SetEdgeColour(const wxColour& edgeColour); + + // Sets the current caret position to be the search anchor. + void SearchAnchor(); + + // Find some text starting at the search anchor. + int SearchNext(int flags, const wxString& text); + + // Find some text starting at the search anchor and moving backwards. + int SearchPrev(int flags, const wxString& text); + + // Set the way the line the caret is on is kept visible. + void SetCaretPolicy(int caretPolicy, int caretSlop); + + // Retrieves the number of lines completely visible. + int LinesOnScreen(); + + // Set whether a pop up menu is displayed automatically when the user presses + // the wrong mouse button. + void UsePopUp(bool allowPopUp); + + // Is the selection a rectangular. The alternative is the more common stream selection. + bool SelectionIsRectangle(); + + // Set the zoom level. This number of points is added to the size of all fonts. + // It may be positive to magnify or negative to reduce. + void SetZoom(int zoom); + + // Retrieve the zoom level. + int GetZoom(); + + // Create a new document object. + // Starts with reference count of 1 and not selected into editor. + void* CreateDocument(); + + // Extend life of document. + void AddRefDocument(void* docPointer); + + // Release a reference to the document, deleting document if it fades to black. + void ReleaseDocument(void* docPointer); + + // Get which document modification events are sent to the container. + int GetModEventMask(); + + // Start notifying the container of all key presses and commands. + void StartRecord(); + + // Stop notifying the container of all key presses and commands. + void StopRecord(); + + // Set the lexing language of the document. + void SetLexer(int lexer); + + // Retrieve the lexing language of the document. + int GetLexer(); + + // Colourise a segment of the document using the current lexing language. + void Colourise(int start, int end); + + // Set up a value that may be used by a lexer for some optional feature. + void SetProperty(const wxString& key, const wxString& value); + + // Set up the key words used by the lexer. + void SetKeyWords(int keywordSet, const wxString& keyWords); + +// END of generated section +//---------------------------------------------------------------------- +// Others... + + + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:#RRGGBB sets the foreground colour + // back:#RRGGBB sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec(int styleNum, const wxString& spec); + + + + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont(int styleNum, wxFont& font); + + + + // Set all font style attributes at once. + void StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline); + + + + // Perform one of the operations defined by the wxSTC_CMD_* constants. + void CmdKeyExecute(int cmd); + + + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins(int left, int right); + + + // Retrieve the start and end positions of the current selection. +#ifdef SWIG + void GetSelection(int* OUTPUT, int* OUTPUT); +#else + void GetSelection(int* startPos, int* endPos); +#endif + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition(int pos); + + + // Scroll enough to make the given line visible + void ScrollToLine(int line); + + + // Scroll enough to make the given column visible + void ScrollToColumn(int column); + +//---------------------------------------------------------------------- + + +#ifndef SWIG +private: + // Event handlers + void OnPaint(wxPaintEvent& evt); + void OnScrollWin(wxScrollWinEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnMouseLeftDown(wxMouseEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseLeftUp(wxMouseEvent& evt); + void OnMouseRightUp(wxMouseEvent& evt); + void OnChar(wxKeyEvent& evt); + void OnKeyDown(wxKeyEvent& evt); + void OnLoseFocus(wxFocusEvent& evt); + void OnGainFocus(wxFocusEvent& evt); + void OnSysColourChanged(wxSysColourChangedEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnMenu(wxCommandEvent& evt); + void OnListBox(wxCommandEvent& evt); + + + // Turn notifications from Scintilla into events + void NotifyChange(); + void NotifyParent(SCNotification* scn); + + long SendMsg(int msg, long wp=0, long lp=0); + +private: + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxStyledTextCtrl) + + ScintillaWX* m_swx; + wxStopWatch m_stopWatch; + + + friend class ScintillaWX; + friend class Platform; +#endif +}; + +//---------------------------------------------------------------------- + +class wxStyledTextEvent : public wxCommandEvent { +public: + wxStyledTextEvent(wxEventType commandType=0, int id=0); + ~wxStyledTextEvent() {} + + void SetPosition(int pos) { m_position = pos; } + void SetKey(int k) { m_key = k; } + void SetModifiers(int m) { m_modifiers = m; } + void SetModificationType(int t) { m_modificationType = t; } + void SetText(const char* t) { m_text = t; } + void SetLength(int len) { m_length = len; } + void SetLinesAdded(int num) { m_linesAdded = num; } + void SetLine(int val) { m_line = val; } + void SetFoldLevelNow(int val) { m_foldLevelNow = val; } + void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } + void SetMargin(int val) { m_margin = val; } + void SetMessage(int val) { m_message = val; } + void SetWParam(int val) { m_wParam = val; } + void SetLParam(int val) { m_lParam = val; } + + int GetPosition() const { return m_position; } + int GetKey() const { return m_key; } + int GetModifiers() const { return m_modifiers; } + int GetModificationType() const { return m_modificationType; } + wxString GetText() const { return m_text; } + int GetLength() const { return m_length; } + int GetLinesAdded() const { return m_linesAdded; } + int GetLine() const { return m_line; } + int GetFoldLevelNow() const { return m_foldLevelNow; } + int GetFoldLevelPrev() const { return m_foldLevelPrev; } + int GetMargin() const { return m_margin; } + int GetMessage() const { return m_message; } + int GetWParam() const { return m_wParam; } + int GetLParam() const { return m_lParam; } + + bool GetShift() const; + bool GetControl() const; + bool GetAlt() const; + + void CopyObject(wxObject& obj) const; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) + + int m_position; + int m_key; + int m_modifiers; + + int m_modificationType; // wxEVT_STC_MODIFIED + wxString m_text; + int m_length; + int m_linesAdded; + int m_line; + int m_foldLevelNow; + int m_foldLevelPrev; + + int m_margin; // wxEVT_STC_MARGINCLICK + + int m_message; // wxEVT_STC_MACRORECORD + int m_wParam; + int m_lParam; +#endif +}; + + +// Event types +enum { + wxEVT_STC_CHANGE = 1650, + wxEVT_STC_STYLENEEDED, + wxEVT_STC_CHARADDED, + wxEVT_STC_UPDATEUI, + wxEVT_STC_SAVEPOINTREACHED, + wxEVT_STC_SAVEPOINTLEFT, + wxEVT_STC_ROMODIFYATTEMPT, + wxEVT_STC_DOUBLECLICK, + wxEVT_STC_MODIFIED, + wxEVT_STC_KEY, + wxEVT_STC_MACRORECORD, + wxEVT_STC_MARGINCLICK, + wxEVT_STC_NEEDSHOWN, + wxEVT_STC_POSCHANGED +}; + + +#ifndef SWIG +typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); + +#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, +#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL }, + +#endif + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- +#endif + + diff --git a/wxPython/demo/data/stc.h.html b/wxPython/demo/data/stc.h.html new file mode 100644 index 0000000000..38aa8c4391 --- /dev/null +++ b/wxPython/demo/data/stc.h.html @@ -0,0 +1,1405 @@ + + +stc.h.html + + +

    +////////////////////////////////////////////////////////////////////////////
    +// Name:        stc.h
    +// Purpose:     A wxWindows implementation of Scintilla.  This class is the
    +//              one meant to be used directly by wx applications.  It does not
    +//              derive directly from the Scintilla classes, and in fact there
    +//              is no mention of Scintilla classes at all in this header.
    +//              This class delegates all method calls and events to the
    +//              Scintilla objects and so forth.  This allows the use of
    +//              Scintilla without polluting the namespace with all the
    +//              classes and itentifiers from Scintilla.
    +//
    +// Author:      Robin Dunn
    +//
    +// Created:     13-Jan-2000
    +// RCS-ID:      $Id$
    +// Copyright:   (c) 2000 by Total Control Software
    +// Licence:     wxWindows license
    +/////////////////////////////////////////////////////////////////////////////
    +
    +#ifndef __stc_h__
    +#define __stc_h__
    +
    +
    +#include <wx/wx.h>
    +
    +//----------------------------------------------------------------------
    +// BEGIN generated section.  The following code is automatically generated
    +//       by gen_iface.py.  Do not edit this file.  Edit stc.h.in instead
    +//       and regenerate
    +
    +#define wxSTC_INVALID_POSITION -1
    +#define wxSTC_START 2000
    +#define wxSTC_OPTIONAL_START 3000
    +#define wxSTC_LEXER_START 4000
    +#define wxSTC_CMD_REDO 2011
    +#define wxSTC_CMD_SELECTALL 2013
    +#define wxSTC_WS_INVISIBLE 0
    +#define wxSTC_WS_VISIBLEALWAYS 1
    +#define wxSTC_WS_VISIBLEAFTERINDENT 2
    +#define wxSTC_EOL_CRLF 0
    +#define wxSTC_EOL_CR 1
    +#define wxSTC_EOL_LF 2
    +
    +// The SC_CP_UTF8 value can be used to enter Unicode mode.
    +// This is the same value as CP_UTF8 in Windows
    +#define wxSTC_CP_UTF8 65001
    +#define wxSTC_MARKER_MAX 31
    +#define wxSTC_MARK_CIRCLE 0
    +#define wxSTC_MARK_ROUNDRECT 1
    +#define wxSTC_MARK_ARROW 2
    +#define wxSTC_MARK_SMALLRECT 3
    +#define wxSTC_MARK_SHORTARROW 4
    +#define wxSTC_MARK_EMPTY 5
    +#define wxSTC_MARK_ARROWDOWN 6
    +#define wxSTC_MARK_MINUS 7
    +#define wxSTC_MARK_PLUS 8
    +#define wxSTC_MARKNUM_FOLDER 30
    +#define wxSTC_MARKNUM_FOLDEROPEN 31
    +#define wxSTC_MARGIN_SYMBOL 0
    +#define wxSTC_MARGIN_NUMBER 1
    +#define wxSTC_STYLE_DEFAULT 32
    +#define wxSTC_STYLE_LINENUMBER 33
    +#define wxSTC_STYLE_BRACELIGHT 34
    +#define wxSTC_STYLE_BRACEBAD 35
    +#define wxSTC_STYLE_CONTROLCHAR 36
    +#define wxSTC_STYLE_INDENTGUIDE 37
    +#define wxSTC_STYLE_MAX 127
    +
    +// Character set identifiers are used in StyleSetCharacterSet.
    +// The values are the same as the Windows *_CHARSET values.
    +#define wxSTC_CHARSET_ANSI 0
    +#define wxSTC_CHARSET_DEFAULT 1
    +#define wxSTC_CHARSET_BALTIC 186
    +#define wxSTC_CHARSET_CHINESEBIG5 136
    +#define wxSTC_CHARSET_EASTEUROPE 238
    +#define wxSTC_CHARSET_GB2312 134
    +#define wxSTC_CHARSET_GREEK 161
    +#define wxSTC_CHARSET_HANGUL 129
    +#define wxSTC_CHARSET_MAC 77
    +#define wxSTC_CHARSET_OEM 255
    +#define wxSTC_CHARSET_RUSSIAN 204
    +#define wxSTC_CHARSET_SHIFTJIS 128
    +#define wxSTC_CHARSET_SYMBOL 2
    +#define wxSTC_CHARSET_TURKISH 162
    +#define wxSTC_CHARSET_JOHAB 130
    +#define wxSTC_CHARSET_HEBREW 177
    +#define wxSTC_CHARSET_ARABIC 178
    +#define wxSTC_CHARSET_VIETNAMESE 163
    +#define wxSTC_CHARSET_THAI 222
    +#define wxSTC_INDIC_MAX 7
    +#define wxSTC_INDIC_PLAIN 0
    +#define wxSTC_INDIC_SQUIGGLE 1
    +#define wxSTC_INDIC_TT 2
    +#define wxSTC_INDIC_DIAGONAL 3
    +#define wxSTC_INDIC_STRIKE 4
    +#define wxSTC_INDIC0_MASK 32
    +#define wxSTC_INDIC1_MASK 64
    +#define wxSTC_INDIC2_MASK 128
    +#define wxSTC_INDICS_MASK 32 | 64 | 128
    +
    +// PrintColourMode - use same colours as screen.
    +#define wxSTC_PRINT_NORMAL 0
    +
    +// PrintColourMode - invert the light value of each style for printing.
    +#define wxSTC_PRINT_INVERTLIGHT 1
    +
    +// PrintColourMode - force black text on white background for printing.
    +#define wxSTC_PRINT_BLACKONWHITE 2
    +#define wxSTC_FIND_DOWN 1
    +#define wxSTC_FIND_WHOLEWORD 2
    +#define wxSTC_FIND_MATCHCASE 4
    +#define wxSTC_FIND_WORDSTART 0x00100000
    +
    +// SCFIND_REGEXP is not yet implemented.
    +#define wxSTC_FIND_REGEXP 0x00200000
    +#define wxSTC_CMD_UNDO 2176
    +#define wxSTC_CMD_CUT 2177
    +#define wxSTC_CMD_COPY 2178
    +#define wxSTC_CMD_PASTE 2179
    +#define wxSTC_FOLDLEVELBASE 0x400
    +#define wxSTC_FOLDLEVELWHITEFLAG 0x1000
    +#define wxSTC_FOLDLEVELHEADERFLAG 0x2000
    +#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF
    +#define wxSTC_CMD_LINEDOWN 2300
    +#define wxSTC_CMD_LINEDOWNEXTEND 2301
    +#define wxSTC_CMD_LINEUP 2302
    +#define wxSTC_CMD_LINEUPEXTEND 2303
    +#define wxSTC_CMD_CHARLEFT 2304
    +#define wxSTC_CMD_CHARLEFTEXTEND 2305
    +#define wxSTC_CMD_CHARRIGHT 2306
    +#define wxSTC_CMD_CHARRIGHTEXTEND 2307
    +#define wxSTC_CMD_WORDLEFT 2308
    +#define wxSTC_CMD_WORDLEFTEXTEND 2309
    +#define wxSTC_CMD_WORDRIGHT 2310
    +#define wxSTC_CMD_WORDRIGHTEXTEND 2311
    +#define wxSTC_CMD_HOME 2312
    +#define wxSTC_CMD_HOMEEXTEND 2313
    +#define wxSTC_CMD_LINEEND 2314
    +#define wxSTC_CMD_LINEENDEXTEND 2315
    +#define wxSTC_CMD_DOCUMENTSTART 2316
    +#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317
    +#define wxSTC_CMD_DOCUMENTEND 2318
    +#define wxSTC_CMD_DOCUMENTENDEXTEND 2319
    +#define wxSTC_CMD_PAGEUP 2320
    +#define wxSTC_CMD_PAGEUPEXTEND 2321
    +#define wxSTC_CMD_PAGEDOWN 2322
    +#define wxSTC_CMD_PAGEDOWNEXTEND 2323
    +#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324
    +#define wxSTC_CMD_CANCEL 2325
    +#define wxSTC_CMD_DELETEBACK 2326
    +#define wxSTC_CMD_TAB 2327
    +#define wxSTC_CMD_BACKTAB 2328
    +#define wxSTC_CMD_NEWLINE 2329
    +#define wxSTC_CMD_FORMFEED 2330
    +#define wxSTC_CMD_VCHOME 2331
    +#define wxSTC_CMD_VCHOMEEXTEND 2332
    +#define wxSTC_CMD_ZOOMIN 2333
    +#define wxSTC_CMD_ZOOMOUT 2334
    +#define wxSTC_CMD_DELWORDLEFT 2335
    +#define wxSTC_CMD_DELWORDRIGHT 2336
    +#define wxSTC_CMD_LINECUT 2337
    +#define wxSTC_CMD_LINEDELETE 2338
    +#define wxSTC_CMD_LINETRANSPOSE 2339
    +#define wxSTC_CMD_LOWERCASE 2340
    +#define wxSTC_CMD_UPPERCASE 2341
    +#define wxSTC_CMD_LINESCROLLDOWN 2342
    +#define wxSTC_CMD_LINESCROLLUP 2343
    +#define wxSTC_EDGE_NONE 0
    +#define wxSTC_EDGE_LINE 1
    +#define wxSTC_EDGE_BACKGROUND 2
    +
    +// Show caret within N lines of edge when it's scrolled to view
    +#define wxSTC_CARET_SLOP 0x01
    +
    +// Center caret on screen when it's scrolled to view
    +#define wxSTC_CARET_CENTER 0x02
    +
    +// OR this with CARET_CENTER to reposition even when visible, or
    +// OR this with CARET_SLOP to reposition whenever outside slop border
    +#define wxSTC_CARET_STRICT 0x04
    +
    +// Notifications
    +// Type of modification and the action which caused the modification
    +// These are defined as a bit mask to make it easy to specify which notifications are wanted.
    +// One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
    +#define wxSTC_MOD_INSERTTEXT 0x1
    +#define wxSTC_MOD_DELETETEXT 0x2
    +#define wxSTC_MOD_CHANGESTYLE 0x4
    +#define wxSTC_MOD_CHANGEFOLD 0x8
    +#define wxSTC_PERFORMED_USER 0x10
    +#define wxSTC_PERFORMED_UNDO 0x20
    +#define wxSTC_PERFORMED_REDO 0x40
    +#define wxSTC_LASTSTEPINUNDOREDO 0x100
    +#define wxSTC_MOD_CHANGEMARKER 0x200
    +#define wxSTC_MOD_BEFOREINSERT 0x400
    +#define wxSTC_MOD_BEFOREDELETE 0x800
    +#define wxSTC_MODEVENTMASKALL 0xF77
    +
    +// Symbolic key codes and modifier flags
    +// ASCII and other printable characters below 256
    +// Extended keys above 300
    +#define wxSTC_KEY_DOWN 300
    +#define wxSTC_KEY_UP 301
    +#define wxSTC_KEY_LEFT 302
    +#define wxSTC_KEY_RIGHT 303
    +#define wxSTC_KEY_HOME 304
    +#define wxSTC_KEY_END 305
    +#define wxSTC_KEY_PRIOR 306
    +#define wxSTC_KEY_NEXT 307
    +#define wxSTC_KEY_DELETE 308
    +#define wxSTC_KEY_INSERT 309
    +#define wxSTC_KEY_ESCAPE 7
    +#define wxSTC_KEY_BACK 8
    +#define wxSTC_KEY_TAB 9
    +#define wxSTC_KEY_RETURN 13
    +#define wxSTC_KEY_ADD 310
    +#define wxSTC_KEY_SUBTRACT 311
    +#define wxSTC_KEY_DIVIDE 312
    +#define wxSTC_SCMOD_SHIFT 1
    +#define wxSTC_SCMOD_CTRL 2
    +#define wxSTC_SCMOD_ALT 4
    +
    +// For SciLexer.h
    +#define wxSTC_LEX_CONTAINER 0
    +#define wxSTC_LEX_NULL 1
    +#define wxSTC_LEX_PYTHON 2
    +#define wxSTC_LEX_CPP 3
    +#define wxSTC_LEX_HTML 4
    +#define wxSTC_LEX_XML 5
    +#define wxSTC_LEX_PERL 6
    +#define wxSTC_LEX_SQL 7
    +#define wxSTC_LEX_VB 8
    +#define wxSTC_LEX_PROPERTIES 9
    +#define wxSTC_LEX_ERRORLIST 10
    +#define wxSTC_LEX_MAKEFILE 11
    +#define wxSTC_LEX_BATCH 12
    +#define wxSTC_LEX_XCODE 13
    +#define wxSTC_LEX_LATEX 14
    +#define wxSTC_LEX_LUA 15
    +#define wxSTC_LEX_DIFF 16
    +
    +// Lexical states for SCLEX_PYTHON
    +#define wxSTC_P_DEFAULT 0
    +#define wxSTC_P_COMMENTLINE 1
    +#define wxSTC_P_NUMBER 2
    +#define wxSTC_P_STRING 3
    +#define wxSTC_P_CHARACTER 4
    +#define wxSTC_P_WORD 5
    +#define wxSTC_P_TRIPLE 6
    +#define wxSTC_P_TRIPLEDOUBLE 7
    +#define wxSTC_P_CLASSNAME 8
    +#define wxSTC_P_DEFNAME 9
    +#define wxSTC_P_OPERATOR 10
    +#define wxSTC_P_IDENTIFIER 11
    +#define wxSTC_P_COMMENTBLOCK 12
    +#define wxSTC_P_STRINGEOL 13
    +
    +// Lexical states for SCLEX_CPP, SCLEX_VB
    +#define wxSTC_C_DEFAULT 0
    +#define wxSTC_C_COMMENT 1
    +#define wxSTC_C_COMMENTLINE 2
    +#define wxSTC_C_COMMENTDOC 3
    +#define wxSTC_C_NUMBER 4
    +#define wxSTC_C_WORD 5
    +#define wxSTC_C_STRING 6
    +#define wxSTC_C_CHARACTER 7
    +#define wxSTC_C_UUID 8
    +#define wxSTC_C_PREPROCESSOR 9
    +#define wxSTC_C_OPERATOR 10
    +#define wxSTC_C_IDENTIFIER 11
    +#define wxSTC_C_STRINGEOL 12
    +#define wxSTC_C_VERBATIM 13
    +
    +// Lexical states for SCLEX_HTML, SCLEX_XML
    +#define wxSTC_H_DEFAULT 0
    +#define wxSTC_H_TAG 1
    +#define wxSTC_H_TAGUNKNOWN 2
    +#define wxSTC_H_ATTRIBUTE 3
    +#define wxSTC_H_ATTRIBUTEUNKNOWN 4
    +#define wxSTC_H_NUMBER 5
    +#define wxSTC_H_DOUBLESTRING 6
    +#define wxSTC_H_SINGLESTRING 7
    +#define wxSTC_H_OTHER 8
    +#define wxSTC_H_COMMENT 9
    +#define wxSTC_H_ENTITY 10
    +
    +// XML and ASP
    +#define wxSTC_H_TAGEND 11
    +#define wxSTC_H_XMLSTART 12
    +#define wxSTC_H_XMLEND 13
    +#define wxSTC_H_SCRIPT 14
    +#define wxSTC_H_ASP 15
    +#define wxSTC_H_ASPAT 16
    +#define wxSTC_H_CDATA 17
    +#define wxSTC_H_QUESTION 18
    +
    +// More HTML
    +#define wxSTC_H_VALUE 19
    +
    +// Embedded Javascript
    +#define wxSTC_HJ_START 40
    +#define wxSTC_HJ_DEFAULT 41
    +#define wxSTC_HJ_COMMENT 42
    +#define wxSTC_HJ_COMMENTLINE 43
    +#define wxSTC_HJ_COMMENTDOC 44
    +#define wxSTC_HJ_NUMBER 45
    +#define wxSTC_HJ_WORD 46
    +#define wxSTC_HJ_KEYWORD 47
    +#define wxSTC_HJ_DOUBLESTRING 48
    +#define wxSTC_HJ_SINGLESTRING 49
    +#define wxSTC_HJ_SYMBOLS 50
    +#define wxSTC_HJ_STRINGEOL 51
    +
    +// ASP Javascript
    +#define wxSTC_HJA_START 55
    +#define wxSTC_HJA_DEFAULT 56
    +#define wxSTC_HJA_COMMENT 57
    +#define wxSTC_HJA_COMMENTLINE 58
    +#define wxSTC_HJA_COMMENTDOC 59
    +#define wxSTC_HJA_NUMBER 60
    +#define wxSTC_HJA_WORD 61
    +#define wxSTC_HJA_KEYWORD 62
    +#define wxSTC_HJA_DOUBLESTRING 63
    +#define wxSTC_HJA_SINGLESTRING 64
    +#define wxSTC_HJA_SYMBOLS 65
    +#define wxSTC_HJA_STRINGEOL 66
    +
    +// Embedded VBScript
    +#define wxSTC_HB_START 70
    +#define wxSTC_HB_DEFAULT 71
    +#define wxSTC_HB_COMMENTLINE 72
    +#define wxSTC_HB_NUMBER 73
    +#define wxSTC_HB_WORD 74
    +#define wxSTC_HB_STRING 75
    +#define wxSTC_HB_IDENTIFIER 76
    +#define wxSTC_HB_STRINGEOL 77
    +
    +// ASP VBScript
    +#define wxSTC_HBA_START 80
    +#define wxSTC_HBA_DEFAULT 81
    +#define wxSTC_HBA_COMMENTLINE 82
    +#define wxSTC_HBA_NUMBER 83
    +#define wxSTC_HBA_WORD 84
    +#define wxSTC_HBA_STRING 85
    +#define wxSTC_HBA_IDENTIFIER 86
    +#define wxSTC_HBA_STRINGEOL 87
    +
    +// Embedded Python
    +#define wxSTC_HP_START 90
    +#define wxSTC_HP_DEFAULT 91
    +#define wxSTC_HP_COMMENTLINE 92
    +#define wxSTC_HP_NUMBER 93
    +#define wxSTC_HP_STRING 94
    +#define wxSTC_HP_CHARACTER 95
    +#define wxSTC_HP_WORD 96
    +#define wxSTC_HP_TRIPLE 97
    +#define wxSTC_HP_TRIPLEDOUBLE 98
    +#define wxSTC_HP_CLASSNAME 99
    +#define wxSTC_HP_DEFNAME 100
    +#define wxSTC_HP_OPERATOR 101
    +#define wxSTC_HP_IDENTIFIER 102
    +
    +// ASP Python
    +#define wxSTC_HPA_START 105
    +#define wxSTC_HPA_DEFAULT 106
    +#define wxSTC_HPA_COMMENTLINE 107
    +#define wxSTC_HPA_NUMBER 108
    +#define wxSTC_HPA_STRING 109
    +#define wxSTC_HPA_CHARACTER 110
    +#define wxSTC_HPA_WORD 111
    +#define wxSTC_HPA_TRIPLE 112
    +#define wxSTC_HPA_TRIPLEDOUBLE 113
    +#define wxSTC_HPA_CLASSNAME 114
    +#define wxSTC_HPA_DEFNAME 115
    +#define wxSTC_HPA_OPERATOR 116
    +#define wxSTC_HPA_IDENTIFIER 117
    +
    +// PHP
    +#define wxSTC_HPHP_DEFAULT 118
    +#define wxSTC_HPHP_HSTRING 119
    +#define wxSTC_HPHP_SIMPLESTRING 120
    +#define wxSTC_HPHP_WORD 121
    +#define wxSTC_HPHP_NUMBER 122
    +#define wxSTC_HPHP_VARIABLE 123
    +#define wxSTC_HPHP_COMMENT 124
    +#define wxSTC_HPHP_COMMENTLINE 125
    +#define wxSTC_HPHP_STRINGEOL 126
    +
    +// Lexical states for SCLEX_PERL
    +#define wxSTC_PL_DEFAULT 0
    +#define wxSTC_PL_HERE 1
    +#define wxSTC_PL_COMMENTLINE 2
    +#define wxSTC_PL_POD 3
    +#define wxSTC_PL_NUMBER 4
    +#define wxSTC_PL_WORD 5
    +#define wxSTC_PL_STRING 6
    +#define wxSTC_PL_CHARACTER 7
    +#define wxSTC_PL_PUNCTUATION 8
    +#define wxSTC_PL_PREPROCESSOR 9
    +#define wxSTC_PL_OPERATOR 10
    +#define wxSTC_PL_IDENTIFIER 11
    +#define wxSTC_PL_SCALAR 12
    +#define wxSTC_PL_ARRAY 13
    +#define wxSTC_PL_HASH 14
    +#define wxSTC_PL_SYMBOLTABLE 15
    +#define wxSTC_PL_REF 16
    +#define wxSTC_PL_REGEX 17
    +#define wxSTC_PL_REGSUBST 18
    +#define wxSTC_PL_LONGQUOTE 19
    +#define wxSTC_PL_BACKTICKS 20
    +#define wxSTC_PL_DATASECTION 21
    +
    +// Lexical states for SCLEX_LATEX
    +#define wxSTC_L_DEFAULT 0
    +#define wxSTC_L_COMMAND 1
    +#define wxSTC_L_TAG 2
    +#define wxSTC_L_MATH 3
    +#define wxSTC_L_COMMENT 4
    +
    +// Lexical states for SCLEX_LUA
    +#define wxSTC_LUA_DEFAULT 0
    +#define wxSTC_LUA_COMMENT 1
    +#define wxSTC_LUA_COMMENTLINE 2
    +#define wxSTC_LUA_COMMENTDOC 3
    +#define wxSTC_LUA_NUMBER 4
    +#define wxSTC_LUA_WORD 5
    +#define wxSTC_LUA_STRING 6
    +#define wxSTC_LUA_CHARACTER 7
    +#define wxSTC_LUA_LITERALSTRING 8
    +#define wxSTC_LUA_PREPROCESSOR 9
    +#define wxSTC_LUA_OPERATOR 10
    +#define wxSTC_LUA_IDENTIFIER 11
    +#define wxSTC_LUA_STRINGEOL 12
    +#define wxSTC_ERR_DEFAULT 0
    +#define wxSTC_ERR_PYTHON 1
    +#define wxSTC_ERR_GCC 2
    +#define wxSTC_ERR_MS 3
    +#define wxSTC_ERR_CMD 4
    +#define wxSTC_ERR_BORLAND 5
    +#define wxSTC_ERR_PERL 6
    +
    +// END of generated section
    +//----------------------------------------------------------------------
    +// Others
    +
    +#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN))
    +
    +
    +
    +//----------------------------------------------------------------------
    +
    +class  ScintillaWX;                      // forward declare
    +class  WordList;
    +struct SCNotification;
    +
    +
    +extern const wxChar* wxSTCNameStr;
    +
    +//----------------------------------------------------------------------
    +
    +class wxStyledTextCtrl : public wxControl {
    +public:
    +
    +#ifdef SWIG
    +    wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
    +                     const wxPoint& pos = wxDefaultPosition,
    +                     const wxSize& size = wxDefaultSize, long style = 0,
    +                     const char* name = "styledtext");
    +#else
    +    wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
    +                     const wxPoint& pos = wxDefaultPosition,
    +                     const wxSize& size = wxDefaultSize, long style = 0,
    +                     const wxString& name = wxSTCNameStr);
    +#endif
    +
    +
    +#ifndef SWIG
    +    ~wxStyledTextCtrl();
    +#endif
    +
    +//----------------------------------------------------------------------
    +// BEGIN generated section.  The following code is automatically generated
    +//       by gen_iface.py.  Do not edit this file.  Edit stc.h.in instead
    +//       and regenerate
    +
    +
    +    // Add text to the document
    +    void AddText(const wxString& text);
    +
    +    // Add array of cells to document
    +    void AddStyledText(const wxString& text);
    +
    +    // Insert string at a position
    +    void InsertText(int pos, const wxString& text);
    +
    +    // Delete all text in the document
    +    void ClearAll();
    +
    +    // Set all style bytes to 0, remove all folding information
    +    void ClearDocumentStyle();
    +
    +    // The number of characters in the document
    +    int GetLength();
    +
    +    // Returns the character byte at the position
    +    int GetCharAt(int pos);
    +
    +    // Returns the position of the caret
    +    int GetCurrentPos();
    +
    +    // Returns the position of the opposite end of the selection to the caret
    +    int GetAnchor();
    +
    +    // Returns the style byte at the position
    +    int GetStyleAt(int pos);
    +
    +    // Redoes the next action on the undo history
    +    void Redo();
    +
    +    // Choose between collecting actions into the undo
    +    // history and discarding them.
    +    void SetUndoCollection(bool collectUndo);
    +
    +    // Select all the text in the document.
    +    void SelectAll();
    +
    +    // Remember the current position in the undo history as the position
    +    // at which the document was saved.
    +    void SetSavePoint();
    +
    +    // Retrieve a buffer of cells.
    +    wxString GetStyledText(int startPos, int endPos);
    +
    +    // Are there any redoable actions in the undo history.
    +    bool CanRedo();
    +
    +    // Retrieve the line number at which a particular marker is located
    +    int MarkerLineFromHandle(int handle);
    +
    +    // Delete a marker.
    +    void MarkerDeleteHandle(int handle);
    +
    +    // Is undo history being collected?
    +    bool GetUndoCollection();
    +
    +    // Are white space characters currently visible?
    +    // Returns one of SCWS_* constants.
    +    int GetViewWhiteSpace();
    +
    +    // Make white space characters invisible, always visible or visible outside indentation.
    +    void SetViewWhiteSpace(int viewWS);
    +
    +    // Find the position from a point within the window.
    +    int PositionFromPoint(wxPoint pt);
    +
    +    // Set caret to start of a line and ensure it is visible.
    +    void GotoLine(int line);
    +
    +    // Set caret to a position and ensure it is visible.
    +    void GotoPos(int pos);
    +
    +    // Set the selection anchor to a position. The anchor is the opposite
    +    // end of the selection from the caret.
    +    void SetAnchor(int posAnchor);
    +
    +    // Retrieve the text of the line containing the caret.
    +    // Returns the index of the caret on the line.
    +    wxString GetCurLine(int* OUTPUT=NULL);
    +
    +    // Retrieve the position of the last correctly styled character.
    +    int GetEndStyled();
    +
    +    // Convert all line endings in the document to use the current mode.
    +    void ConvertEOLs();
    +
    +    // Retrieve the current end of line mode - one of CRLF, CR, or LF.
    +    int GetEOLMode();
    +
    +    // Set the current end of line mode.
    +    void SetEOLMode(int eolMode);
    +
    +    // Set the current styling position to pos and the styling mask to mask.
    +    // The styling mask can be used to protect some bits in each styling byte from
    +    // modification.
    +    void StartStyling(int pos, int mask);
    +
    +    // Change style from current styling position for length characters to a style
    +    // and move the current styling position to after this newly styled segment.
    +    void SetStyling(int length, int style);
    +
    +    // Is drawing done first into a buffer or direct to the screen.
    +    bool GetBufferedDraw();
    +
    +    // If drawing is buffered then each line of text is drawn into a bitmap buffer
    +    // before drawing it to the screen to avoid flicker.
    +    void SetBufferedDraw(bool buffered);
    +
    +    // Change the visible size of a tab to be a multiple of the width of a space
    +    // character.
    +    void SetTabWidth(int tabWidth);
    +
    +    // Retrieve the visible size of a tab.
    +    int GetTabWidth();
    +
    +    // Set the code page used to interpret the bytes of the document as characters.
    +    // The SC_CP_UTF8 value can be used to enter Unicode mode.
    +    void SetCodePage(int codePage);
    +
    +    // Set the symbol used for a particular marker number,
    +    // and optionally the for and background colours.
    +    void MarkerDefine(int markerNumber, int markerSymbol,
    +                         const wxColour& foreground = wxNullColour,
    +                         const wxColour& background = wxNullColour);
    +
    +    // Set the foreground colour used for a particular marker number.
    +    void MarkerSetForeground(int markerNumber, const wxColour& fore);
    +
    +    // Set the background colour used for a particular marker number.
    +    void MarkerSetBackground(int markerNumber, const wxColour& back);
    +
    +    // Add a marker to a line.
    +    void MarkerAdd(int line, int markerNumber);
    +
    +    // Delete a marker from a line
    +    void MarkerDelete(int line, int markerNumber);
    +
    +    // Delete all markers with a particular number from all lines
    +    void MarkerDeleteAll(int markerNumber);
    +
    +    // Get a bit mask of all the markers set on a line.
    +    int MarkerGet(int line);
    +
    +    // Find the next line after lineStart that includes a marker in mask.
    +    int MarkerNext(int lineStart, int markerMask);
    +
    +    // Find the previous line before lineStart that includes a marker in mask.
    +    int MarkerPrevious(int lineStart, int markerMask);
    +
    +    // Set a margin to be either numeric or symbolic.
    +    void SetMarginType(int margin, int marginType);
    +
    +    // Retrieve the type of a margin.
    +    int GetMarginType(int margin);
    +
    +    // Set the width of a margin to a width expressed in pixels.
    +    void SetMarginWidth(int margin, int pixelWidth);
    +
    +    // Retrieve the width of a margin in pixels.
    +    int GetMarginWidth(int margin);
    +
    +    // Set a mask that determines which markers are displayed in a margin.
    +    void SetMarginMask(int margin, int mask);
    +
    +    // Retrieve the marker mask of a margin.
    +    int GetMarginMask(int margin);
    +
    +    // Make a margin sensitive or insensitive to mouse clicks.
    +    void SetMarginSensitive(int margin, bool sensitive);
    +
    +    // Retrieve the mouse click sensitivity of a margin.
    +    bool GetMarginSensitive(int margin);
    +
    +    // Clear all the styles and make equivalent to the global default style.
    +    void StyleClearAll();
    +
    +    // Set the foreground colour of a style.
    +    void StyleSetForeground(int style, const wxColour& fore);
    +
    +    // Set the background colour of a style.
    +    void StyleSetBackground(int style, const wxColour& back);
    +
    +    // Set a style to be bold or not.
    +    void StyleSetBold(int style, bool bold);
    +
    +    // Set a style to be italic or not.
    +    void StyleSetItalic(int style, bool italic);
    +
    +    // Set the size of characters of a style.
    +    void StyleSetSize(int style, int sizePoints);
    +
    +    // Set the font of a style.
    +    void StyleSetFaceName(int style, const wxString& fontName);
    +
    +    // Set a style to have its end of line filled or not.
    +    void StyleSetEOLFilled(int style, bool filled);
    +
    +    // Reset the default style to its state at startup
    +    void StyleResetDefault();
    +
    +    // Set a style to be underlined or not.
    +    void StyleSetUnderline(int style, bool underline);
    +
    +    // Set the foreground colour of the selection and whether to use this setting.
    +    void SetSelForeground(bool useSetting, const wxColour& fore);
    +
    +    // Set the background colour of the selection and whether to use this setting.
    +    void SetSelBackground(bool useSetting, const wxColour& back);
    +
    +    // Set the foreground colour of the caret.
    +    void SetCaretForeground(const wxColour& fore);
    +
    +    // When key+modifier combination km is pressed perform msg.
    +    void CmdKeyAssign(int key, int modifiers, int cmd);
    +
    +    // When key+modifier combination km do nothing.
    +    void CmdKeyClear(int key, int modifiers);
    +
    +    // Drop all key mappings.
    +    void CmdKeyClearAll();
    +
    +    // Set the styles for a segment of the document.
    +    void SetStyleBytes(int length, char* styleBytes);
    +
    +    // Set a style to be visible or not.
    +    void StyleSetVisible(int style, bool visible);
    +
    +    // Get the time in milliseconds that the caret is on and off.
    +    int GetCaretPeriod();
    +
    +    // Get the time in milliseconds that the caret is on and off. 0 = steady on.
    +    void SetCaretPeriod(int periodMilliseconds);
    +
    +    // Set the set of characters making up words for when moving or selecting
    +    // by word.
    +    void SetWordChars(const wxString& characters);
    +
    +    // Start a sequence of actions that is undone and redone as a unit.
    +    // May be nested.
    +    void BeginUndoAction();
    +
    +    // End a sequence of actions that is undone and redone as a unit.
    +    void EndUndoAction();
    +
    +    // Set an indicator to plain, squiggle or TT.
    +    void IndicatorSetStyle(int indic, int style);
    +
    +    // Retrieve the style of an indicator.
    +    int IndicatorGetStyle(int indic);
    +
    +    // Set the foreground colour of an indicator.
    +    void IndicatorSetForeground(int indic, const wxColour& fore);
    +
    +    // Retrieve the foreground colour of an indicator.
    +    wxColour IndicatorGetForeground(int indic);
    +
    +    // Divide each styling byte into lexical class bits (default:5) and indicator
    +    // bits (default:3). If a lexer requires more than 32 lexical states, then this
    +    // is used to expand the possible states.
    +    void SetStyleBits(int bits);
    +
    +    // Retrieve number of bits in style bytes used to hold the lexical state.
    +    int GetStyleBits();
    +
    +    // Used to hold extra styling information for each line.
    +    void SetLineState(int line, int state);
    +
    +    // Retrieve the extra styling information for a line.
    +    int GetLineState(int line);
    +
    +    // Retrieve the last line number that has line state.
    +    int GetMaxLineState();
    +
    +    // Display a auto-completion list.
    +    // The lenEntered parameter indicates how many characters before
    +    // the caret should be used to provide context.
    +    void AutoCompShow(int lenEntered, const wxString& itemList);
    +
    +    // Remove the auto-completion list from the screen.
    +    void AutoCompCancel();
    +
    +    // Is there an auto-completion list visible?
    +    bool AutoCompActive();
    +
    +    // Retrieve the position of the caret when the auto-completion list was
    +    // displayed.
    +    int AutoCompPosStart();
    +
    +    // User has selected an item so remove the list and insert the selection.
    +    void AutoCompComplete();
    +
    +    // Define a set of character that when typed cancel the auto-completion list.
    +    void AutoCompStops(const wxString& characterSet);
    +
    +    // Change the separator character in the string setting up an auto-completion
    +    // list. Default is space but can be changed if items contain space.
    +    void AutoCompSetSeparator(int separatorCharacter);
    +
    +    // Retrieve the auto-completion list separator character.
    +    int AutoCompGetSeparator();
    +
    +    // Select the item in the auto-completion list that starts with a string.
    +    void AutoCompSelect(const wxString& text);
    +
    +    // Should the auto-completion list be cancelled if the user backspaces to a
    +    // position before where the box was created.
    +    void AutoCompSetCancelAtStart(bool cancel);
    +
    +    // Retrieve whether auto-completion cancelled by backspacing before start.
    +    bool AutoCompGetCancelAtStart();
    +
    +    // Define a set of character that when typed fills up the selected word.
    +    void AutoCompSetFillUps(const wxString& characterSet);
    +
    +    // Should a single item auto-completion list automatically choose the item.
    +    void AutoCompSetChooseSingle(bool chooseSingle);
    +
    +    // Retrieve whether a single item auto-completion list automatically choose the item.
    +    bool AutoCompGetChooseSingle();
    +
    +    // Set whether case is significant when performing auto-completion searches.
    +    void AutoCompSetIgnoreCase(bool ignoreCase);
    +
    +    // Retrieve state of ignore case flag.
    +    bool AutoCompGetIgnoreCase();
    +
    +    // Set the number of spaces used for one level of indentation.
    +    void SetIndent(int indentSize);
    +
    +    // Retrieve indentation size.
    +    int GetIndent();
    +
    +    // Indentation will only use space characters if useTabs is false, otherwise
    +    // it will use a combination of tabs and spaces.
    +    void SetUseTabs(bool useTabs);
    +
    +    // Retrieve whether tabs will be used in indentation.
    +    bool GetUseTabs();
    +
    +    // Change the indentation of a line to a number of columns.
    +    void SetLineIndentation(int line, int indentSize);
    +
    +    // Retrieve the number of columns that a line is indented.
    +    int GetLineIndentation(int line);
    +
    +    // Retrieve the position before the first non indentation character on a line.
    +    int GetLineIndentPosition(int line);
    +
    +    // Retrieve the column number of a position, taking tab width into account.
    +    int GetColumn(int pos);
    +
    +    // Show or hide the horizontal scroll bar.
    +    void SetUseHorizontalScrollBar(bool show);
    +
    +    // Is the horizontal scroll bar visible?
    +    bool GetUseHorizontalScrollBar();
    +
    +    // Show or hide indentation guides.
    +    void SetIndentationGuides(bool show);
    +
    +    // Are the indentation guides visible?
    +    bool GetIndentationGuides();
    +
    +    // Set the highlighted indentation guide column.
    +    // 0 = no highlighted guide.
    +    void SetHighlightGuide(int column);
    +
    +    // Get the highlighted indentation guide column.
    +    int GetHighlightGuide();
    +
    +    // Get the position after the last visible characters on a line.
    +    int GetLineEndPosition(int line);
    +
    +    // Get the code page used to interpret the bytes of the document as characters.
    +    int GetCodePage();
    +
    +    // Get the foreground colour of the caret.
    +    wxColour GetCaretForeground();
    +
    +    // In read-only mode?
    +    bool GetReadOnly();
    +
    +    // Sets the position of the caret.
    +    void SetCurrentPos(int pos);
    +
    +    // Sets the position that starts the selection - this becomes the anchor.
    +    void SetSelectionStart(int pos);
    +
    +    // Returns the position at the start of the selection.
    +    int GetSelectionStart();
    +
    +    // Sets the position that ends the selection - this becomes the currentPosition.
    +    void SetSelectionEnd(int pos);
    +
    +    // Returns the position at the end of the selection.
    +    int GetSelectionEnd();
    +
    +    // Sets the print magnification added to the point size of each style for printing.
    +    void SetPrintMagnification(int magnification);
    +
    +    // Returns the print magnification.
    +    int GetPrintMagnification();
    +
    +    // Modify colours when printing for clearer printed text.
    +    void SetPrintColourMode(int mode);
    +
    +    // Returns the print colour mode.
    +    int GetPrintColourMode();
    +
    +    // Find some text in the document.
    +    int FindText(int minPos, int maxPos,
    +                               const wxString& text,
    +                               bool caseSensitive, bool wholeWord);
    +
    +    // On Windows will draw the document into a display context such as a printer.
    +    int FormatRange(bool   doDraw,
    +                               int    startPos,
    +                               int    endPos,
    +                               wxDC*  draw,
    +                               wxDC*  target,  // Why does it use two? Can they be the same?
    +                               wxRect renderRect,
    +                               wxRect pageRect);
    +
    +    // Retrieve the line at the top of the display.
    +    int GetFirstVisibleLine();
    +
    +    // Retrieve the contents of a line.
    +    wxString GetLine(int line);
    +
    +    // Returns the number of lines in the document. There is always at least one.
    +    int GetLineCount();
    +
    +    // Sets the size in pixels of the left margin.
    +    void SetMarginLeft(int width);
    +
    +    // Returns the size in pixels of the left margin.
    +    int GetMarginLeft();
    +
    +    // Sets the size in pixels of the right margin.
    +    void SetMarginRight(int width);
    +
    +    // Returns the size in pixels of the right margin.
    +    int GetMarginRight();
    +
    +    // Is the document different from when it was last saved?
    +    bool GetModify();
    +
    +    // Select a range of text.
    +    void SetSelection(int start, int end);
    +
    +    // Retrieve the selected text.
    +    wxString GetSelectedText();
    +
    +    // Retrieve a range of text.
    +    wxString GetTextRange(int startPos, int endPos);
    +
    +    // Draw the selection in normal style or with selection highlighted.
    +    void HideSelection(bool normal);
    +
    +    // Retrieve the line containing a position.
    +    int LineFromPosition(int pos);
    +
    +    // Retrieve the position at the start of a line.
    +    int PositionFromLine(int line);
    +
    +    // Scroll horizontally and vertically.
    +    void LineScroll(int columns, int lines);
    +
    +    // Ensure the caret is visible.
    +    void EnsureCaretVisible();
    +
    +    // Replace the selected text with the argument text.
    +    void ReplaceSelection(const wxString& text);
    +
    +    // Set to read only or read write.
    +    void SetReadOnly(bool readOnly);
    +
    +    // Will a paste succeed?
    +    bool CanPaste();
    +
    +    // Are there any undoable actions in the undo history.
    +    bool CanUndo();
    +
    +    // Delete the undo history.
    +    void EmptyUndoBuffer();
    +
    +    // Undo one action in the undo history.
    +    void Undo();
    +
    +    // Cut the selection to the clipboard.
    +    void Cut();
    +
    +    // Copy the selection to the clipboard.
    +    void Copy();
    +
    +    // Paste the contents of the clipboard into the document replacing the selection.
    +    void Paste();
    +
    +    // Clear the selection.
    +    void Clear();
    +
    +    // Replace the contents of the document with the argument text.
    +    void SetText(const wxString& text);
    +
    +    // Retrieve all the text in the document.
    +    wxString GetText();
    +
    +    // Retrieve the number of characters in the document.
    +    int GetTextLength();
    +
    +    // Set to overtype (true) or insert mode
    +    void SetOvertype(bool overtype);
    +
    +    // Returns true if overtype mode is active otherwise false is returned.
    +    bool GetOvertype();
    +
    +    // Show a call tip containing a definition near position pos.
    +    void CallTipShow(int pos, const wxString& definition);
    +
    +    // Remove the call tip from the screen.
    +    void CallTipCancel();
    +
    +    // Is there an active call tip?
    +    bool CallTipActive();
    +
    +    // Retrieve the position where the caret was before displaying the call tip.
    +    int CallTipPosAtStart();
    +
    +    // Highlight a segment of the definition.
    +    void CallTipSetHighlight(int start, int end);
    +
    +    // Set the background colour for the call tip.
    +    void CallTipSetBackground(const wxColour& back);
    +
    +    // Find the display line of a document line taking hidden lines into account.
    +    int VisibleFromDocLine(int line);
    +
    +    // Find the document line of a display line taking hidden lines into account.
    +    int DocLineFromVisible(int lineDisplay);
    +
    +    // Set the fold level of a line.
    +    // This encodes an integer level along with flags indicating whether the
    +    // line is a header and whether it is effectively white space.
    +    void SetFoldLevel(int line, int level);
    +
    +    // Retrieve the fold level of a line.
    +    int GetFoldLevel(int line);
    +
    +    // Find the last child line of a header line.
    +    int GetLastChild(int line, int level);
    +
    +    // Find the parent line of a child line.
    +    int GetFoldParent(int line);
    +
    +    // Make a range of lines visible.
    +    void ShowLines(int lineStart, int lineEnd);
    +
    +    // Make a range of lines invisible.
    +    void HideLines(int lineStart, int lineEnd);
    +
    +    // Is a line visible?
    +    bool GetLineVisible(int line);
    +
    +    // Show the children of a header line.
    +    void SetFoldExpanded(int line, bool expanded);
    +
    +    // Is a header line expanded?
    +    bool GetFoldExpanded(int line);
    +
    +    // Switch a header line between expanded and contracted.
    +    void ToggleFold(int line);
    +
    +    // Ensure a particular line is visible by expanding any header line hiding it.
    +    void EnsureVisible(int line);
    +
    +    // Set some debugging options for folding
    +    void SetFoldFlags(int flags);
    +
    +    // How many characters are on a line, not including end of line characters.
    +    int LineLength(int line);
    +
    +    // Highlight the characters at two positions.
    +    void BraceHighlight(int pos1, int pos2);
    +
    +    // Highlight the character at a position indicating there is no matching brace.
    +    void BraceBadLight(int pos);
    +
    +    // Find the position of a matching brace or INVALID_POSITION if no match.
    +    int BraceMatch(int pos);
    +
    +    // Are the end of line characters visible.
    +    bool GetViewEOL();
    +
    +    // Make the end of line characters visible or invisible
    +    void SetViewEOL(bool visible);
    +
    +    // Retrieve a pointer to the document object.
    +    void* GetDocPointer();
    +
    +    // Change the document object used.
    +    void SetDocPointer(void* docPointer);
    +
    +    // Set which document modification events are sent to the container.
    +    void SetModEventMask(int mask);
    +
    +    // Retrieve the column number which text should be kept within.
    +    int GetEdgeColumn();
    +
    +    // Set the column number of the edge.
    +    // If text goes past the edge then it is highlighted.
    +    void SetEdgeColumn(int column);
    +
    +    // Retrieve the edge highlight mode.
    +    int GetEdgeMode();
    +
    +    // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
    +    // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
    +    void SetEdgeMode(int mode);
    +
    +    // Retrieve the colour used in edge indication.
    +    wxColour GetEdgeColour();
    +
    +    // Change the colour used in edge indication.
    +    void SetEdgeColour(const wxColour& edgeColour);
    +
    +    // Sets the current caret position to be the search anchor.
    +    void SearchAnchor();
    +
    +    // Find some text starting at the search anchor.
    +    int SearchNext(int flags, const wxString& text);
    +
    +    // Find some text starting at the search anchor and moving backwards.
    +    int SearchPrev(int flags, const wxString& text);
    +
    +    // Set the way the line the caret is on is kept visible.
    +    void SetCaretPolicy(int caretPolicy, int caretSlop);
    +
    +    // Retrieves the number of lines completely visible.
    +    int LinesOnScreen();
    +
    +    // Set whether a pop up menu is displayed automatically when the user presses
    +    // the wrong mouse button.
    +    void UsePopUp(bool allowPopUp);
    +
    +    // Is the selection a rectangular. The alternative is the more common stream selection.
    +    bool SelectionIsRectangle();
    +
    +    // Set the zoom level. This number of points is added to the size of all fonts.
    +    // It may be positive to magnify or negative to reduce.
    +    void SetZoom(int zoom);
    +
    +    // Retrieve the zoom level.
    +    int GetZoom();
    +
    +    // Create a new document object.
    +    // Starts with reference count of 1 and not selected into editor.
    +    void* CreateDocument();
    +
    +    // Extend life of document.
    +    void AddRefDocument(void* docPointer);
    +
    +    // Release a reference to the document, deleting document if it fades to black.
    +    void ReleaseDocument(void* docPointer);
    +
    +    // Get which document modification events are sent to the container.
    +    int GetModEventMask();
    +
    +    // Start notifying the container of all key presses and commands.
    +    void StartRecord();
    +
    +    // Stop notifying the container of all key presses and commands.
    +    void StopRecord();
    +
    +    // Set the lexing language of the document.
    +    void SetLexer(int lexer);
    +
    +    // Retrieve the lexing language of the document.
    +    int GetLexer();
    +
    +    // Colourise a segment of the document using the current lexing language.
    +    void Colourise(int start, int end);
    +
    +    // Set up a value that may be used by a lexer for some optional feature.
    +    void SetProperty(const wxString& key, const wxString& value);
    +
    +    // Set up the key words used by the lexer.
    +    void SetKeyWords(int keywordSet, const wxString& keyWords);
    +
    +// END of generated section
    +//----------------------------------------------------------------------
    +// Others...
    +
    +
    +    // Returns the line number of the line with the caret.
    +    int GetCurrentLine();
    +
    +    // Extract style settings from a spec-string which is composed of one or
    +    // more of the following comma separated elements:
    +    //
    +    //      bold                    turns on bold
    +    //      italic                  turns on italics
    +    //      fore:#RRGGBB            sets the foreground colour
    +    //      back:#RRGGBB            sets the background colour
    +    //      face:[facename]         sets the font face name to use
    +    //      size:[num]              sets the font size in points
    +    //      eol                     turns on eol filling
    +    //      underline               turns on underlining
    +    //
    +    void StyleSetSpec(int styleNum, const wxString& spec);
    +
    +
    +
    +    // Set style size, face, bold, italic, and underline attributes from
    +    // a wxFont's attributes.
    +    void StyleSetFont(int styleNum, wxFont& font);
    +
    +
    +
    +    // Set all font style attributes at once.
    +    void StyleSetFontAttr(int styleNum, int size,
    +                          const wxString& faceName,
    +                          bool bold, bool italic,
    +                          bool underline);
    +
    +
    +
    +    // Perform one of the operations defined by the wxSTC_CMD_* constants.
    +    void CmdKeyExecute(int cmd);
    +
    +
    +
    +    // Set the left and right margin in the edit area, measured in pixels.
    +    void SetMargins(int left, int right);
    +
    +
    +    // Retrieve the start and end positions of the current selection.
    +#ifdef SWIG
    +    void GetSelection(int* OUTPUT, int* OUTPUT);
    +#else
    +    void GetSelection(int* startPos, int* endPos);
    +#endif
    +
    +    // Retrieve the point in the window where a position is displayed.
    +    wxPoint PointFromPosition(int pos);
    +
    +
    +    // Scroll enough to make the given line visible
    +    void ScrollToLine(int line);
    +
    +
    +    // Scroll enough to make the given column visible
    +    void ScrollToColumn(int column);
    +
    +//----------------------------------------------------------------------
    +
    +
    +#ifndef SWIG
    +private:
    +    // Event handlers
    +    void OnPaint(wxPaintEvent& evt);
    +    void OnScrollWin(wxScrollWinEvent& evt);
    +    void OnSize(wxSizeEvent& evt);
    +    void OnMouseLeftDown(wxMouseEvent& evt);
    +    void OnMouseMove(wxMouseEvent& evt);
    +    void OnMouseLeftUp(wxMouseEvent& evt);
    +    void OnMouseRightUp(wxMouseEvent& evt);
    +    void OnChar(wxKeyEvent& evt);
    +    void OnKeyDown(wxKeyEvent& evt);
    +    void OnLoseFocus(wxFocusEvent& evt);
    +    void OnGainFocus(wxFocusEvent& evt);
    +    void OnSysColourChanged(wxSysColourChangedEvent& evt);
    +    void OnEraseBackground(wxEraseEvent& evt);
    +    void OnMenu(wxCommandEvent& evt);
    +    void OnListBox(wxCommandEvent& evt);
    +
    +
    +    // Turn notifications from Scintilla into events
    +    void NotifyChange();
    +    void NotifyParent(SCNotification* scn);
    +
    +    long SendMsg(int msg, long wp=0, long lp=0);
    +
    +private:
    +    DECLARE_EVENT_TABLE()
    +    DECLARE_CLASS(wxStyledTextCtrl)
    +
    +    ScintillaWX*        m_swx;
    +    wxStopWatch         m_stopWatch;
    +
    +
    +    friend class ScintillaWX;
    +    friend class Platform;
    +#endif
    +};
    +
    +//----------------------------------------------------------------------
    +
    +class wxStyledTextEvent : public wxCommandEvent {
    +public:
    +    wxStyledTextEvent(wxEventType commandType=0, int id=0);
    +    ~wxStyledTextEvent() {}
    +
    +    void SetPosition(int pos)        { m_position = pos; }
    +    void SetKey(int k)               { m_key = k; }
    +    void SetModifiers(int m)         { m_modifiers = m; }
    +    void SetModificationType(int t)  { m_modificationType = t; }
    +    void SetText(const char* t)      { m_text = t; }
    +    void SetLength(int len)          { m_length = len; }
    +    void SetLinesAdded(int num)      { m_linesAdded = num; }
    +    void SetLine(int val)            { m_line = val; }
    +    void SetFoldLevelNow(int val)    { m_foldLevelNow = val; }
    +    void SetFoldLevelPrev(int val)   { m_foldLevelPrev = val; }
    +    void SetMargin(int val)          { m_margin = val; }
    +    void SetMessage(int val)         { m_message = val; }
    +    void SetWParam(int val)          { m_wParam = val; }
    +    void SetLParam(int val)          { m_lParam = val; }
    +
    +    int  GetPosition() const         { return m_position; }
    +    int  GetKey()  const             { return m_key; }
    +    int  GetModifiers() const        { return m_modifiers; }
    +    int  GetModificationType() const { return m_modificationType; }
    +    wxString GetText() const         { return m_text; }
    +    int  GetLength() const           { return m_length; }
    +    int  GetLinesAdded() const       { return m_linesAdded; }
    +    int  GetLine() const             { return m_line; }
    +    int  GetFoldLevelNow() const     { return m_foldLevelNow; }
    +    int  GetFoldLevelPrev() const    { return m_foldLevelPrev; }
    +    int  GetMargin() const           { return m_margin; }
    +    int  GetMessage() const          { return m_message; }
    +    int  GetWParam() const           { return m_wParam; }
    +    int  GetLParam() const           { return m_lParam; }
    +
    +    bool GetShift() const;
    +    bool GetControl() const;
    +    bool GetAlt() const;
    +
    +    void CopyObject(wxObject& obj) const;
    +
    +#ifndef SWIG
    +private:
    +    DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
    +
    +    int  m_position;
    +    int  m_key;
    +    int  m_modifiers;
    +
    +    int  m_modificationType;    // wxEVT_STC_MODIFIED
    +    wxString m_text;
    +    int  m_length;
    +    int  m_linesAdded;
    +    int  m_line;
    +    int  m_foldLevelNow;
    +    int  m_foldLevelPrev;
    +
    +    int  m_margin;              // wxEVT_STC_MARGINCLICK
    +
    +    int  m_message;             // wxEVT_STC_MACRORECORD
    +    int  m_wParam;
    +    int  m_lParam;
    +#endif
    +};
    +
    +
    +// Event types
    +enum {
    +    wxEVT_STC_CHANGE = 1650,
    +    wxEVT_STC_STYLENEEDED,
    +    wxEVT_STC_CHARADDED,
    +    wxEVT_STC_UPDATEUI,
    +    wxEVT_STC_SAVEPOINTREACHED,
    +    wxEVT_STC_SAVEPOINTLEFT,
    +    wxEVT_STC_ROMODIFYATTEMPT,
    +    wxEVT_STC_DOUBLECLICK,
    +    wxEVT_STC_MODIFIED,
    +    wxEVT_STC_KEY,
    +    wxEVT_STC_MACRORECORD,
    +    wxEVT_STC_MARGINCLICK,
    +    wxEVT_STC_NEEDSHOWN,
    +    wxEVT_STC_POSCHANGED
    +};
    +
    +
    +#ifndef SWIG
    +typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
    +
    +#define EVT_STC_CHANGE(id, fn) { wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_STYLENEEDED(id, fn) { wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_CHARADDED(id, fn) { wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_UPDATEUI(id, fn) { wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_SAVEPOINTREACHED(id, fn) { wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_SAVEPOINTLEFT(id, fn) { wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_ROMODIFYATTEMPT(id, fn) { wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_DOUBLECLICK(id, fn) { wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_MODIFIED(id, fn) { wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_KEY(id, fn) { wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_MACRORECORD(id, fn) { wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_MARGINCLICK(id, fn) { wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_NEEDSHOWN(id, fn) { wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +#define EVT_STC_POSCHANGED(id, fn) { wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL },
    +
    +#endif
    +
    +//----------------------------------------------------------------------
    +//----------------------------------------------------------------------
    +#endif
    +
    +
    +
    + + diff --git a/utils/wxPython/demo/data/tables.htm b/wxPython/demo/data/tables.htm similarity index 100% rename from utils/wxPython/demo/data/tables.htm rename to wxPython/demo/data/tables.htm diff --git a/utils/wxPython/demo/data/test.htm b/wxPython/demo/data/test.htm similarity index 99% rename from utils/wxPython/demo/data/test.htm rename to wxPython/demo/data/test.htm index 8ab006086e..f226786737 100644 --- a/utils/wxPython/demo/data/test.htm +++ b/wxPython/demo/data/test.htm @@ -57,6 +57,10 @@ display some tiny nice image, he? this is text......
    Testing image image (try clicking on the image :-) and this is text...... + +
    +Here is a GIF: +
     
     
      diff --git a/wxPython/demo/data/tips.txt b/wxPython/demo/data/tips.txt new file mode 100644 index 0000000000..b56d78fb01 --- /dev/null +++ b/wxPython/demo/data/tips.txt @@ -0,0 +1,7 @@ +Each of the leaf items in the tree is a separate demo. Click and learn! +Use the source Luke! +Many of the demos have some helpful overview text associated with them. Simply click on the first tab in the notebook control after selecting the demo. You can switch back and forth to the demo page as often as you like. +You can also view the source code for each demo by clicking on the second notebook tab. +wxPython now has a company providing commercial support, consulting and training. Go to http://wxpros.com for details. +You shouldn't pee on an electric fence! +Be sure to subscribe to the mail list. Go to http://wxwindows.org/mailman/listinfo/wxpython-users today! diff --git a/utils/wxPython/demo/data/widgetTest.htm b/wxPython/demo/data/widgetTest.htm similarity index 100% rename from utils/wxPython/demo/data/widgetTest.htm rename to wxPython/demo/data/widgetTest.htm diff --git a/utils/wxPython/demo/demo.py b/wxPython/demo/demo.py similarity index 100% rename from utils/wxPython/demo/demo.py rename to wxPython/demo/demo.py diff --git a/utils/wxPython/demo/demoMainLoop.py b/wxPython/demo/demoMainLoop.py similarity index 100% rename from utils/wxPython/demo/demoMainLoop.py rename to wxPython/demo/demoMainLoop.py diff --git a/utils/wxPython/demo/hangman.py b/wxPython/demo/hangman.py similarity index 99% rename from utils/wxPython/demo/hangman.py rename to wxPython/demo/hangman.py index 3f2c6da5c6..31c7c72fb3 100644 --- a/utils/wxPython/demo/hangman.py +++ b/wxPython/demo/hangman.py @@ -124,6 +124,8 @@ class HangmanWnd(wxWindow): else: self.font = wxFont(10, wxMODERN, wxNORMAL, wxNORMAL) self.SetFocus() + EVT_PAINT(self, self.OnPaint) + def StartGame(self, word): self.word = word @@ -252,6 +254,7 @@ class HangmanDemoFrame(wxFrame): def __init__(self, wf, parent, id, pos, size): wxFrame.__init__(self, parent, id, "Hangman demo", pos, size) self.demo = HangmanDemo(wf, self, -1, wxDefaultPosition, wxDefaultSize) + EVT_CLOSE(self, self.OnCloseWindow) def OnCloseWindow(self, event): self.demo.timer.Stop() diff --git a/utils/wxPython/demo/paper.xml b/wxPython/demo/paper.xml similarity index 100% rename from utils/wxPython/demo/paper.xml rename to wxPython/demo/paper.xml diff --git a/utils/wxPython/demo/pyTree.py b/wxPython/demo/pyTree.py similarity index 100% rename from utils/wxPython/demo/pyTree.py rename to wxPython/demo/pyTree.py diff --git a/utils/wxPython/demo/quotes.xml b/wxPython/demo/quotes.xml similarity index 100% rename from utils/wxPython/demo/quotes.xml rename to wxPython/demo/quotes.xml diff --git a/wxPython/demo/redemo.py b/wxPython/demo/redemo.py new file mode 100644 index 0000000000..9215ad529a --- /dev/null +++ b/wxPython/demo/redemo.py @@ -0,0 +1,25 @@ +"""Basic regular expression demostration facility (Perl style syntax).""" + +from wxPython.wx import * +import re + +#---------------------------------------------------------------------- + +class ReDemoPanel(wxPanel): + def __init__(self, parent): + wxPanel.__init__(self, parent, -1) + + rePrompt = wxStaticText(self, -1, "Enter a Perl-style regular expression") + reText = wxTextCtrl(self, 101, "") + + options = self.AddOptions() + + sPrompt = wxStaticText(self, -1, "Enter a string to search") + sText = wxTextCtrl(self, 102, "", style=wxTE_MULTILINE) + + dispPrompt = wxStaticText(self, -1, "Groups:") + dispText = wxTextCtrl(self, 103, "", style=wxTE_MULTILINE|wxTE_READONLY) + + +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- diff --git a/utils/wxPython/demo/run.py b/wxPython/demo/run.py old mode 100644 new mode 100755 similarity index 91% rename from utils/wxPython/demo/run.py rename to wxPython/demo/run.py index 7a2a5f4102..c58a9a86f0 --- a/utils/wxPython/demo/run.py +++ b/wxPython/demo/run.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python #---------------------------------------------------------------------------- # Name: run.py # Purpose: Simple framework for running individual demos @@ -37,7 +37,8 @@ class RunDemoApp(wxApp): def OnInit(self): wxInitAllImageHandlers() - frame = wxFrame(None, -1, "RunDemo: " + self.name, size=(0,0)) + frame = wxFrame(None, -1, "RunDemo: " + self.name, size=(0,0), + style=wxNO_FULL_REPAINT_ON_RESIZE|wxDEFAULT_FRAME_STYLE) frame.CreateStatusBar() frame.Show(true) win = self.demoModule.runTest(frame, frame, Log()) @@ -46,7 +47,8 @@ class RunDemoApp(wxApp): # its own top-level window if win: # so set the frame to a good size for showing stuff - frame.SetSize((600, 450)) + frame.SetSize((640, 480)) + win.SetFocus() else: # otherwise the demo made its own frame, so just put a @@ -78,6 +80,8 @@ def main(argv): raise SystemExit name = argv[1] + if name[-3:] == '.py': + name = name[:-3] module = __import__(name) diff --git a/wxPython/demo/viewer.py b/wxPython/demo/viewer.py new file mode 100644 index 0000000000..ad438e10a0 --- /dev/null +++ b/wxPython/demo/viewer.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python +""" + Run wxPython in a second thread. + + Overview: + Importing this module creates a second thread and starts + wxPython in that thread. Its single method, + add_cone(), sends an event to the second thread + telling it to create a VTK viewer window with a cone in + it. + + This module is meant to be imported into the standard + Python interpreter. It also works with Pythonwin. + It doesn't seem to work with IDLE (on NT anyways). + It should also work in a wxPython application. + + Applications already running a wxPython app do not + need to start a second thread. In these cases, + viewer creates the cone windows in the current + thread. You can test this by running shell.py + that comes with wxPython, importing viewer and + calling add_cone. + + Usage: + [user]$ python + Python 1.5.2 (#1, Sep 17 1999, 20:15:36) ... + Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam + >>> import viewer + >>> viewer.add_cone() # pop up a cone window + >>> a = 1 + 1 + >>> viewer.add_cone() # create another cone window + + Why would anyone do this?: + When using wxPython, the call to app.Mainloop() takes over + the thread from which it is called. This presents a + problem for applications that want to use the standard + Python command line user interface, while occasionaly + creating a GUI window for viewing an image, plot, etc. + One soultion is to mangage the GUI in a second thread. + + wxPython does not behave well if windows are created in + a thread other than the one where wxPython was originally + imported. ( I assume importing wxPython initializes some + info in the thread). The current solution is to make the + original import of wxPython in the second thread and then + create all windows in that second thread. + + Methods in the main thread can create a new window by issuing + events to a "catcher" window in the second thread. This + catcher window has event handlers that actually create the + new window. +""" + +class viewer_thread: + def start(self): + """ start the GUI thread + """ + import thread,time + thread.start_new_thread(self.run, ()) + + def run(self): + """ + Note that viewer_basices is first imported ***here***. + This is the second thread. viewer_basics imports + wxPython. if we imported it at + the module level instead of in this function, + the import would occur in the main thread and + wxPython wouldn't run correctly in the second thread. + """ + from viewer_basics import * + try: + self.app = SecondThreadApp(0) + self.app.MainLoop() + except TypeError: + self.app = None + + def add_cone(self): + """ + send an event to the catcher window in the + other thread and tell it to create a cone window. + """ + import viewer_basics + if self.app: + evt = viewer_basics.AddCone() + viewer_basics.wxPostEvent(self.app.catcher, evt) + else: + viewer_basics.add_cone() + +viewer = viewer_thread() +viewer.start() + +def add_cone(): + viewer.add_cone() + + diff --git a/wxPython/demo/viewer_basics.py b/wxPython/demo/viewer_basics.py new file mode 100644 index 0000000000..fe71140ec3 --- /dev/null +++ b/wxPython/demo/viewer_basics.py @@ -0,0 +1,61 @@ +from wxPython.wx import * +from wxPython.lib import vtk + +#--------------------------------------------------------------------------- +class VtkFrame(wxFrame): + """ + Simple example VTK window that contains a cone. + """ + def __init__(self, parent, id, title): + wxFrame.__init__(self, parent,id,title, size=(450, 300)) + win = vtk.wxVTKRenderWindow(self, -1) + + renWin = win.GetRenderWindow() + + ren = vtk.vtkRenderer() + renWin.AddRenderer(ren) + cone = vtk.vtkConeSource() + coneMapper = vtk.vtkPolyDataMapper() + coneMapper.SetInput(cone.GetOutput()) + coneActor = vtk.vtkActor() + coneActor.SetMapper(coneMapper) + ren.AddActor(coneActor) +#--------------------------------------------------------------------------- +wxEVT_ADD_CONE = 25015 + +def EVT_ADD_CONE(win, func): + win.Connect(-1, -1, wxEVT_ADD_CONE, func) + +class AddCone(wxPyEvent): + def __init__(self): + wxPyEvent.__init__(self) + self.SetEventType(wxEVT_ADD_CONE) + +class HiddenCatcher(wxFrame): + """ + The "catcher" frame in the second thread. + It is invisible. It's only job is to receive + Events from the main thread, and create + the appropriate windows. + """ + def __init__(self): + wxFrame.__init__(self, NULL,-1,'') + EVT_ADD_CONE(self, self.AddCone) + + def AddCone(self,evt): + add_cone() +#--------------------------------------------------------------------------- +class SecondThreadApp(wxApp): + """ + wxApp that lives in the second thread. + """ + def OnInit(self): + catcher = HiddenCatcher() + #self.SetTopWindow(catcher) + self.catcher =catcher + return true +#--------------------------------------------------------------------------- + +def add_cone(): + frame = VtkFrame(NULL, -1, "Cone") + frame.Show(true) diff --git a/utils/wxPython/demo/widgetTest.py b/wxPython/demo/widgetTest.py similarity index 84% rename from utils/wxPython/demo/widgetTest.py rename to wxPython/demo/widgetTest.py index 9a060d045c..ee940e89f4 100644 --- a/utils/wxPython/demo/widgetTest.py +++ b/wxPython/demo/widgetTest.py @@ -1,5 +1,7 @@ +import sys, string + from wxPython.wx import * from wxPython.html import * @@ -41,7 +43,10 @@ class TestHtmlPanel(wxPanel): import About wxPanel.__init__(self, parent, id, size=size) self.html = wxHtmlWindow(self, -1, wxPoint(5,5), wxSize(400, 350)) - self.html.SetPage(About.MyAboutBox.text % wx.__version__) + py_version = string.split(sys.version)[0] + self.html.SetPage(About.MyAboutBox.text % (wx.__version__, py_version)) + ir = self.html.GetInternalRepresentation() + self.html.SetSize( (ir.GetWidth()+5, ir.GetHeight()+5) ) self.Fit() #---------------------------------------------------------------------- diff --git a/utils/wxPython/demo/wxButton.py b/wxPython/demo/wxButton.py similarity index 89% rename from utils/wxPython/demo/wxButton.py rename to wxPython/demo/wxButton.py index b9bdc0bbc7..7ed3113215 100644 --- a/utils/wxPython/demo/wxButton.py +++ b/wxPython/demo/wxButton.py @@ -14,9 +14,11 @@ class TestPanel(wxPanel): b.SetForegroundColour(wxWHITE) b.SetDefault() - wxButton(self, 20, "HELLO AGAIN!", wxPoint(20, 60), wxSize(90, 45)) + b = wxButton(self, 20, "HELLO AGAIN!", wxPoint(20, 60), wxSize(90, 45)) EVT_BUTTON(self, 20, self.OnClick) + b.SetToolTipString("This is a Hello button...") + bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP) mask = wxMaskColour(bmp, wxBLUE) diff --git a/utils/wxPython/demo/wxCalendar.py b/wxPython/demo/wxCalendar.py similarity index 57% rename from utils/wxPython/demo/wxCalendar.py rename to wxPython/demo/wxCalendar.py index eda9cd341a..ca61fa2091 100644 --- a/utils/wxPython/demo/wxCalendar.py +++ b/wxPython/demo/wxCalendar.py @@ -1,18 +1,16 @@ -#! /usr/local/bin/python #---------------------------------------------------------------------------- -# Name: CalendPanel.py -# Purpose: Calendar control display testing on panel +# Name: wxCalendar.py +# Purpose: Calendar control display testing on panel for wxPython demo # # Author: Lorne White (email: lwhite1@planet.eon.net) # # Created: -# Version 0.5 1999/11/03 +# Version 0.8 2000/04/16 # Licence: wxWindows license #---------------------------------------------------------------------------- from wxPython.wx import * -from wxPython.lib.calendar import wxCalendar, Month - +from wxPython.lib.calendar import wxCalendar, Month, PrtCalDraw import os dir_path = os.getcwd() @@ -45,10 +43,11 @@ def GetMonthList(): return monthlist class TestPanel(wxPanel): - def __init__(self, parent, log): + def __init__(self, parent, log, frame): wxPanel.__init__(self, parent, -1) self.log = log + self.frame = frame self.calend = wxCalendar(self, -1, wxPoint(100, 50), wxSize(200, 180)) @@ -69,8 +68,9 @@ class TestPanel(wxPanel): # set attributes of calendar - self.calend.HideTitle() + self.calend.hide_title = TRUE self.calend.HideGrid() + self.calend.SetWeekColor('WHITE', 'BLACK') # display routine @@ -98,7 +98,7 @@ class TestPanel(wxPanel): # button for calendar dialog test - wxStaticText(self, -1, "Test Calendar Dialog", wxPoint(350, 50)).SetBackgroundColour(wxNamedColour('Red')) + wxStaticText(self, -1, "Test Calendar Dialog", wxPoint(350, 50), wxSize(150, -1)) bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP) self.but = wxBitmapButton(self, 60, bmp, wxPoint(380, 80))#, wxSize(30, 30)) @@ -106,12 +106,18 @@ class TestPanel(wxPanel): # button for calendar window test - wxStaticText(self, -1, "Test Calendar Window", wxPoint(350, 150)).SetBackgroundColour(wxNamedColour('Blue')) + wxStaticText(self, -1, "Test Calendar Window", wxPoint(350, 150), wxSize(150, -1)) bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP) self.but = wxBitmapButton(self, 160, bmp, wxPoint(380, 180))#, wxSize(30, 30)) EVT_BUTTON(self, 160, self.TestFrame) + wxStaticText(self, -1, "Test Calendar Print", wxPoint(350, 250), wxSize(150, -1)) + + bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP) + self.but = wxBitmapButton(self, 170, bmp, wxPoint(380, 280))#, wxSize(30, 30)) + EVT_BUTTON(self, 170, self.OnPreview) + # calendar dialog def TestDlg(self, event): @@ -127,6 +133,15 @@ class TestPanel(wxPanel): frame.Show(true) return true +# calendar print preview + + def OnPreview(self, event): + month = self.calend.GetMonth() + year = self.calend.GetYear() + + prt = PrintCalend(self.frame, month, year) + prt.Preview() + # month and year control events def OnSpin(self, event): @@ -160,8 +175,6 @@ class TestPanel(wxPanel): text = '%s CLICK %02d/%02d/%d' % (evt.click, evt.day, evt.month, evt.year) # format date self.log.WriteText('Date Selected: ' + text + '\n') - def OnCloseWindow(self, event): - self.Destroy() # set the highlighted days for the calendar @@ -172,6 +185,7 @@ class TestPanel(wxPanel): except: set_days = [1, 5, 12] + self.calend.AddSelect([4, 11], 'BLUE', 'WHITE') self.calend.SetSelDay(set_days) self.calend.Refresh() @@ -219,7 +233,7 @@ class CalenDlg(wxDialog): # alternate spin button to control the month h = self.date.GetSize().height - self.m_spin = wxSpinButton(self, 120, wxPoint(130, 20), wxSize(h*2, h), wxSP_VERTICAL) + self.m_spin = wxSpinButton(self, 120, wxPoint(120, 20), wxSize(h*2, h), wxSP_VERTICAL) self.m_spin.SetRange(1, 12) self.m_spin.SetValue(start_month) @@ -243,6 +257,8 @@ class CalenDlg(wxDialog): self.calend.SetYear(start_year) self.calend.HideTitle() + self.calend.ShowWeekEnd() + self.ResetDisplay() self.Connect(self.calend.GetId(), -1, 2100, self.MouseClick) @@ -260,9 +276,10 @@ class CalenDlg(wxDialog): def OnMonthSpin(self, event): month = event.GetPosition() - self.date.SetValue(Month[month]) - self.calend.SetMonth(month) - self.calend.Refresh() + if month >= 0 and month <= 12: + self.date.SetValue(Month[month]) + self.calend.SetMonth(month) + self.calend.Refresh() def OnYrSpin(self, event): year = event.GetPosition() @@ -288,6 +305,8 @@ class CalenDlg(wxDialog): except: set_days = [1, 5, 12] + self.calend.AddSelect([4, 11], 'BLUE', 'WHITE') + self.calend.SetSelDay(set_days) self.calend.Refresh() @@ -296,6 +315,7 @@ class CalenDlg(wxDialog): class CalendFrame(wxFrame): def __init__(self, parent, id, title, log): wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(400, 400)) + EVT_CLOSE(self, self.OnCloseWindow) self.log = log self.CreateStatusBar() @@ -311,6 +331,9 @@ class CalendFrame(wxFrame): self.calend = wxCalendar(self, -1) self.calend.SetCurrentDay() self.calend.grid_color = 'BLUE' + self.calend.SetBusType() +# self.calend.ShowWeekEnd() + self.ResetDisplay() self.Connect(self.calend.GetId(), -1, 2100, self.MouseClick) @@ -329,6 +352,8 @@ class CalendFrame(wxFrame): except: set_days = [1, 5, 12] + self.calend.AddSelect([2, 16], 'GREEN', 'WHITE') + self.calend.SetSelDay(set_days) self.calend.Refresh() @@ -392,11 +417,263 @@ class CalendFrame(wxFrame): tb.Realize() +#--------------------------------------------------------------------------- + +# example class for printing/previewing calendars + +class PrintCalend: + def __init__(self, parent, month, year): + self.frame = parent + self.month = month + self.year = year + + self.SetParms() + self.SetCal() + self.printData = wxPrintData() + + def SetCal(self): + self.grid_color = 'BLUE' + self.back_color = 'WHITE' + self.sel_color = 'RED' + self.high_color = 'LIGHT BLUE' + self.font = wxSWISS + self.bold = wxNORMAL + + self.sel_key = None # last used by + self.sel_lst = [] # highlighted selected days + + self.size = None + self.hide_title = FALSE + self.hide_grid = FALSE + self.set_day = None + + def SetParms(self): + self.ymax = 1 + self.xmax = 1 + self.page = 1 + self.total_pg = 1 + + self.preview = None + self.scale = 1.0 + + self.pagew = 8.5 + self.pageh = 11.0 + + self.txt_marg = 0.1 + self.lf_marg = 0 + self.top_marg = 0 + + self.page = 0 + + def SetDates(self, month, year): + self.month = month + self.year = year + + def SetStyleDef(self, desc): + self.style = desc + + def SetCopies(self, copies): # number of copies of label + self.copies = copies + + def SetStart(self, start): # start position of label + self.start = start + + def Preview(self): + printout = SetPrintout(self) + printout2 = SetPrintout(self) + self.preview = wxPrintPreview(printout, printout2, self.printData) + if not self.preview.Ok(): + wxMessageBox("There was a problem printing!", "Printing", wxOK) + return + + self.preview.SetZoom(60) # initial zoom value + + frame = wxPreviewFrame(self.preview, self.frame, "Print preview") + + frame.Initialize() + frame.SetPosition(self.frame.GetPosition()) + frame.SetSize(self.frame.GetSize()) + frame.Show(true) + + def Print(self): + pdd = wxPrintDialogData() + pdd.SetPrintData(self.printData) + printer = wxPrinter(pdd) + printout = SetPrintout(self) + frame = wxFrame(NULL, -1, "Test") + if not printer.Print(frame, printout): + wxMessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wxOK) + else: + self.printData = printer.GetPrintDialogData().GetPrintData() + printout.Destroy() + + def DoDrawing(self, DC): + size = DC.GetSizeTuple() + DC.BeginDrawing() + + cal = PrtCalDraw(self) + + if self.preview is None: + cal.SetPSize(size[0]/self.pagew, size[1]/self.pageh) + cal.SetPreview(FALSE) + + else: + if self.preview == 1: + cal.SetPSize(size[0]/self.pagew, size[1]/self.pageh) + else: + cal.SetPSize(self.pwidth, self.pheight) + + cal.SetPreview(self.preview) + + cal.hide_title = self.hide_title # set the calendar parameters + cal.hide_grid = self.hide_grid + + cal.grid_color = self.grid_color + cal.high_color = self.high_color + cal.back_color = self.back_color + cal.outer_border = FALSE + cal.font = self.font + cal.bold = self.bold + + cal_size = wxSize(3.0, 3.0) + cal.SetSize(cal_size) + + year, month = self.year, self.month + + x = 1.0 + for i in range(2): + y = 0.5 + for j in range(3): + cal.SetCal(year, month) # current month + cal.SetPos(x, y) + + try: + set_days = test_days[month] + except: + set_days = [1, 5, 12] + + cal.AddSelect([2, 16], 'GREEN', 'WHITE') + + cal.DrawCal(DC, set_days) + + year, month = self.IncMonth(year, month) + y = y + 3.5 + x = x + 4.0 # next colum + + DC.EndDrawing() + + self.ymax = DC.MaxY() + self.xmax = DC.MaxX() + + def IncMonth(self, year, month): # next month + month = month + 1 + if month > 12: + month = 1 + year = year + 1 + + return year, month + + def GetTotalPages(self): + self.pg_cnt = 1 + return self.pg_cnt + + def SetPage(self, page): + self.page = page + + def SetPageSize(self, width, height): + self.pwidth, self.pheight = width, height + + def SetTotalSize(self, width, height): + self.ptwidth, self.ptheight = width, height + + def SetPreview(self, preview, scale): + self.preview = preview + self.scale = scale + + def SetTotalSize(self, width, height): + self.ptwidth = width + self.ptheight = height + def SetToolPath(self, tb, id, bmp, title): global dir_path tb.AddSimpleTool(id, wxBitmap(os.path.join(dir_path, bmp), wxBITMAP_TYPE_BMP), title, title) +class SetPrintout(wxPrintout): + def __init__(self, canvas): + wxPrintout.__init__(self) + self.canvas = canvas + self.end_pg = 1 + + def OnBeginDocument(self, start, end): + return self.base_OnBeginDocument(start, end) + + def OnEndDocument(self): + self.base_OnEndDocument() + + def HasPage(self, page): + if page <= self.end_pg: + return true + else: + return false + + def GetPageInfo(self): + self.end_pg = self.canvas.GetTotalPages() + str_pg = 1 + try: + end_pg = self.end_pg + except: + end_pg = 1 + return (str_pg, end_pg, str_pg, end_pg) + + def OnPreparePrinting(self): + self.base_OnPreparePrinting() + + def OnBeginPrinting(self): + dc = self.GetDC() + + self.preview = self.IsPreview() + if (self.preview): + self.pixelsPerInch = self.GetPPIScreen() + else: + self.pixelsPerInch = self.GetPPIPrinter() + + (w, h) = dc.GetSizeTuple() + scaleX = float(w) / 1000 + scaleY = float(h) / 1000 + self.printUserScale = min(scaleX, scaleY) + + self.base_OnBeginPrinting() + + def GetSize(self): + self.psizew, self.psizeh = self.GetPPIPrinter() + return self.psizew, self.psizeh + + def GetTotalSize(self): + self.ptsizew, self.ptsizeh = self.GetPageSizePixels() + return self.ptsizew, self.ptsizeh + + def OnPrintPage(self, page): + dc = self.GetDC() + (w, h) = dc.GetSizeTuple() + scaleX = float(w) / 1000 + scaleY = float(h) / 1000 + self.printUserScale = min(scaleX, scaleY) + dc.SetUserScale(self.printUserScale, self.printUserScale) + + self.preview = self.IsPreview() + + self.canvas.SetPreview(self.preview, self.printUserScale) + self.canvas.SetPage(page) + + self.ptsizew, self.ptsizeh = self.GetPageSizePixels() + self.canvas.SetTotalSize(self.ptsizew, self.ptsizeh) + + self.psizew, self.psizeh = self.GetPPIPrinter() + self.canvas.SetPageSize(self.psizew, self.psizeh) + + self.canvas.DoDrawing(dc) + return true class MyApp(wxApp): def OnInit(self): @@ -426,16 +703,18 @@ if __name__ == '__main__': #--------------------------------------------------------------------------- def runTest(frame, nb, log): - win = TestPanel(nb, log) + win = TestPanel(nb, log, frame) return win #--------------------------------------------------------------------------- overview = """\ -This control provides a calendar control class for displaying and selecting dates. +This control provides a calendar control class for displaying and selecting dates. In addition, the class is extended and can now be used for printing/previewing. -See example for various methods used to set display month, year, and highlighted dates (different colour). +Additional features include weekend highlighting and business type Monday-Sunday format. + +See example for various methods used to set display month, year, and highlighted dates (different font and background colours). by Lorne White diff --git a/wxPython/demo/wxCalendarCtrl.py b/wxPython/demo/wxCalendarCtrl.py new file mode 100644 index 0000000000..b38be582b4 --- /dev/null +++ b/wxPython/demo/wxCalendarCtrl.py @@ -0,0 +1,40 @@ + +from wxPython.wx import * +from wxPython.calendar import * +from wxPython.utils import * + +#---------------------------------------------------------------------- + +class TestPanel(wxPanel): + def __init__(self, parent, ID, log): + wxPanel.__init__(self, parent, ID) + self.log = log + + cal = wxCalendarCtrl(self, 101, wxDateTime_Now(), pos = (25,50), + style = wxCAL_SHOW_HOLIDAYS | wxCAL_SUNDAY_FIRST) + + EVT_CALENDAR(self, 101, self.OnCalSelected) + + + def OnCalSelected(self, evt): + self.log.write('OnCalSelected: %s\n' % evt.GetDate()) + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, -1, log) + return win + +#---------------------------------------------------------------------- + + +overview = """\ + +

      wxCalendarCtrl

      + +Yet another calendar control. This one is a wrapper around the C++ +version described in the docs. This one will probably be a bit more efficient +than the one in wxPython.lib.calendar, but I like a few things about it better, +so I think both will stay in wxPython. +""" diff --git a/utils/wxPython/demo/wxCheckBox.py b/wxPython/demo/wxCheckBox.py similarity index 100% rename from utils/wxPython/demo/wxCheckBox.py rename to wxPython/demo/wxCheckBox.py diff --git a/utils/wxPython/demo/wxCheckListBox.py b/wxPython/demo/wxCheckListBox.py similarity index 100% rename from utils/wxPython/demo/wxCheckListBox.py rename to wxPython/demo/wxCheckListBox.py diff --git a/utils/wxPython/demo/wxChoice.py b/wxPython/demo/wxChoice.py similarity index 94% rename from utils/wxPython/demo/wxChoice.py rename to wxPython/demo/wxChoice.py index 55ddbb5ebf..20b706694b 100644 --- a/utils/wxPython/demo/wxChoice.py +++ b/wxPython/demo/wxChoice.py @@ -15,8 +15,8 @@ class TestChoice(wxPanel): wxPoint(15, 10)) wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 20)) - wxChoice(self, 40, wxPoint(80, 50), wxSize(95, 20), #wxDefaultSize, - sampleList) + wxChoice(self, 40, (80, 50), (95, 125), + choices = sampleList) EVT_CHOICE(self, 40, self.EvtChoice) def EvtChoice(self, event): diff --git a/utils/wxPython/demo/wxColourDialog.py b/wxPython/demo/wxColourDialog.py similarity index 100% rename from utils/wxPython/demo/wxColourDialog.py rename to wxPython/demo/wxColourDialog.py diff --git a/utils/wxPython/demo/wxComboBox.py b/wxPython/demo/wxComboBox.py similarity index 94% rename from utils/wxPython/demo/wxComboBox.py rename to wxPython/demo/wxComboBox.py index b4b3112f05..f3f8de8176 100644 --- a/utils/wxPython/demo/wxComboBox.py +++ b/wxPython/demo/wxComboBox.py @@ -18,11 +18,15 @@ class TestComboBox(wxPanel): wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, -1), sampleList, wxCB_DROPDOWN) EVT_COMBOBOX(self, 500, self.EvtComboBox) + EVT_TEXT(self, 500, self.EvtText) def EvtComboBox(self, event): self.log.WriteText('EvtComboBox: %s\n' % event.GetString()) + def EvtText(self, event): + self.log.WriteText('EvtText: %s\n' % event.GetString()) + #--------------------------------------------------------------------------- def runTest(frame, nb, log): diff --git a/utils/wxPython/demo/wxDialog.py b/wxPython/demo/wxDialog.py similarity index 100% rename from utils/wxPython/demo/wxDialog.py rename to wxPython/demo/wxDialog.py diff --git a/utils/wxPython/demo/wxDirDialog.py b/wxPython/demo/wxDirDialog.py similarity index 100% rename from utils/wxPython/demo/wxDirDialog.py rename to wxPython/demo/wxDirDialog.py diff --git a/wxPython/demo/wxDragImage.py b/wxPython/demo/wxDragImage.py new file mode 100644 index 0000000000..19985b7dd3 --- /dev/null +++ b/wxPython/demo/wxDragImage.py @@ -0,0 +1,249 @@ + +from wxPython.wx import * + +#---------------------------------------------------------------------- + +class DragShape: + def __init__(self, bmp): + self.bmp = bmp + self.pos = wxPoint(0,0) + self.shown = true + self.text = None + self.fullscreen = false + + + def HitTest(self, pt): + rect = self.GetRect() + return rect.Inside(pt.x, pt.y) + + + def GetRect(self): + return wxRect(self.pos.x, self.pos.y, + self.bmp.GetWidth(), self.bmp.GetHeight()) + + + def Draw(self, dc, op = wxCOPY): + if self.bmp.Ok(): + memDC = wxMemoryDC() + memDC.SelectObject(self.bmp) + + dc.Blit(self.pos.x, self.pos.y, + self.bmp.GetWidth(), self.bmp.GetHeight(), + memDC, 0, 0, op, true) + + return true + else: + return false + + + +#---------------------------------------------------------------------- + +class DragCanvas(wxScrolledWindow): + def __init__(self, parent, ID): + wxScrolledWindow.__init__(self, parent, ID) + self.shapes = [] + self.dragImage = None + self.dragShape = None + + self.SetCursor(wxStockCursor(wxCURSOR_ARROW)) + self.bg_bmp = wxBitmap('bitmaps/backgrnd.png', wxBITMAP_TYPE_PNG) + + + # Make a shape from an image and mask. This one will demo + # dragging outside the window + bmp = wxBitmap('bitmaps/test_image.png', wxBITMAP_TYPE_PNG) + mask = wxMaskColour(bmp, wxWHITE) + bmp.SetMask(mask) + shape = DragShape(bmp) + shape.pos = wxPoint(5, 5) + shape.fullscreen = true + self.shapes.append(shape) + + + # Make a shape from some text + text = "Some Text" + font = wxFont(15, wxROMAN, wxNORMAL, wxBOLD) + textExtent = self.GetFullTextExtent(text, font) + bmp = wxEmptyBitmap(textExtent[0], textExtent[1]) + dc = wxMemoryDC() + dc.SelectObject(bmp) + dc.Clear() + dc.SetTextForeground(wxRED) + dc.SetFont(font) + dc.DrawText(text, 0, 0) + dc.SelectObject(wxNullBitmap) + del dc + mask = wxMaskColour(bmp, wxWHITE) + bmp.SetMask(mask) + shape = DragShape(bmp) + shape.pos = wxPoint(5, 100) + shape.text = "Some dragging text" + self.shapes.append(shape) + + + # Make some shapes from some playing card images. + x = 200 + for card in ['01c.gif', '10s.gif', '12h.gif', '13d.gif']: + bmp = wxBitmap('bitmaps/'+card, wxBITMAP_TYPE_GIF) + shape = DragShape(bmp) + shape.pos = wxPoint(x, 5) + self.shapes.append(shape) + x = x + 80 + + + EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) + EVT_PAINT(self, self.OnPaint) + EVT_LEFT_DOWN(self, self.OnLeftDown) + EVT_LEFT_UP(self, self.OnLeftUp) + EVT_MOTION(self, self.OnMotion) + + + + def TileBackground(self, dc): + # tile the background bitmap + sz = self.GetClientSize() + w = self.bg_bmp.GetWidth() + h = self.bg_bmp.GetHeight() + + x = 0 + while x < sz.width: + y = 0 + while y < sz.height: + dc.DrawBitmap(self.bg_bmp, x, y) + y = y + h + x = x + w + + + def DrawShapes(self, dc): + for shape in self.shapes: + if shape.shown: + shape.Draw(dc) + + + def FindShape(self, pt): + for shape in self.shapes: + if shape.HitTest(pt): + return shape + return None + + + def EraseShape(self, shape, dc): + r = shape.GetRect() + dc.SetClippingRegion(r.x, r.y, r.width, r.height) + self.TileBackground(dc) + self.DrawShapes(dc) + dc.DestroyClippingRegion() + + + + + def OnEraseBackground(self, evt): + dc = evt.GetDC() + if not dc: + dc = wxClientDC(self) + self.TileBackground(dc) + + + def OnPaint(self, evt): + dc = wxPaintDC(self) + self.PrepareDC(dc) + self.DrawShapes(dc) + + + def OnLeftDown(self, evt): + shape = self.FindShape(evt.GetPosition()) + if shape: + # get ready to start dragging, but wait for the user to + # move it a bit first + self.dragShape = shape + self.dragStartPos = evt.GetPosition() + + + def OnLeftUp(self, evt): + if not self.dragImage or not self.dragShape: + self.dragImage = None + self.dragShape = None + return + + # end the dragging + self.dragImage.Hide() + self.dragImage.EndDrag() + self.dragImage = None + + # reposition and draw the shape + pt = evt.GetPosition() + newPos = wxPoint(self.dragShape.pos.x + (pt.x - self.dragStartPos.x), + self.dragShape.pos.y + (pt.y - self.dragStartPos.y)) + + dc = wxClientDC(self) + self.dragShape.pos = newPos + self.dragShape.shown = true + self.dragShape.Draw(dc) + self.dragShape = None + + + def OnMotion(self, evt): + if not self.dragShape or not evt.Dragging() or not evt.LeftIsDown(): + return + + # if we have a shape, but havn't started dragging yet + if self.dragShape and not self.dragImage: + + # only start the drag after having moved a couple pixels + tolerance = 4 + pt = evt.GetPosition() + dx = abs(pt.x - self.dragStartPos.x) + dy = abs(pt.y - self.dragStartPos.y) + if dx <= tolerance and dy <= tolerance: + return + + if self.dragShape.text: + self.dragImage = wxDragString(self.dragShape.text, + wxStockCursor(wxCURSOR_HAND)) + else: + self.dragImage = wxDragImage(self.dragShape.bmp, + wxStockCursor(wxCURSOR_HAND)) + + newPos = wxPoint(self.dragShape.pos.x + (pt.x - self.dragStartPos.x), + self.dragShape.pos.y + (pt.y - self.dragStartPos.y)) + + if self.dragShape.fullscreen: + newPos = self.ClientToScreen(newPos) + self.dragImage.BeginDrag((0,0), self, true) + else: + self.dragImage.BeginDrag((0,0), self) + + + # erase the shape since it will be drawn independently now + dc = wxClientDC(self) + self.dragShape.shown = false + self.EraseShape(self.dragShape, dc) + + self.dragImage.Move(newPos) + self.dragImage.Show() + + + # if we have shape and image then move it. + elif self.dragShape and self.dragImage: + pt = evt.GetPosition() + newPos = wxPoint(self.dragShape.pos.x + (pt.x - self.dragStartPos.x), + self.dragShape.pos.y + (pt.y - self.dragStartPos.y)) + if self.dragShape.fullscreen: + newPos = self.ClientToScreen(newPos) + + self.dragImage.Move(newPos) + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = DragCanvas(nb, -1) + return win + +#---------------------------------------------------------------------- + + + +overview = """\ +""" diff --git a/utils/wxPython/demo/wxEditor.py b/wxPython/demo/wxEditor.py similarity index 100% rename from utils/wxPython/demo/wxEditor.py rename to wxPython/demo/wxEditor.py diff --git a/utils/wxPython/demo/wxFileDialog.py b/wxPython/demo/wxFileDialog.py similarity index 92% rename from utils/wxPython/demo/wxFileDialog.py rename to wxPython/demo/wxFileDialog.py index 0287f4ccd5..476efcf8bd 100644 --- a/utils/wxPython/demo/wxFileDialog.py +++ b/wxPython/demo/wxFileDialog.py @@ -4,9 +4,10 @@ from wxPython.wx import * #--------------------------------------------------------------------------- def runTest(frame, nb, log): - dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN) + dlg = wxFileDialog(frame, "Choose a file", ".", "", "*.*", wxOPEN|wxMULTIPLE) if dlg.ShowModal() == wxID_OK: - log.WriteText('You selected: %s\n' % dlg.GetPath()) + for path in dlg.GetPaths(): + log.WriteText('You selected: %s\n' % path) dlg.Destroy() #--------------------------------------------------------------------------- diff --git a/utils/wxPython/demo/wxFloatBar.py b/wxPython/demo/wxFloatBar.py similarity index 96% rename from utils/wxPython/demo/wxFloatBar.py rename to wxPython/demo/wxFloatBar.py index 0936ac224d..2df9552041 100644 --- a/utils/wxPython/demo/wxFloatBar.py +++ b/wxPython/demo/wxFloatBar.py @@ -43,12 +43,13 @@ class TestFloatBar(wxFrame): tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP), wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP), - shortHelpString="Toggle with 2 bitmaps", toggle=true) + shortHelpString="Toggle with 2 bitmaps", isToggle=true) EVT_TOOL(self, 60, self.OnToolClick) EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick) tb.Realize() self.tb = tb + EVT_CLOSE(self, self.OnCloseWindow) def OnCloseWindow(self, event): diff --git a/utils/wxPython/demo/wxFontDialog.py b/wxPython/demo/wxFontDialog.py similarity index 100% rename from utils/wxPython/demo/wxFontDialog.py rename to wxPython/demo/wxFontDialog.py diff --git a/utils/wxPython/demo/wxFrame.py b/wxPython/demo/wxFrame.py similarity index 95% rename from utils/wxPython/demo/wxFrame.py rename to wxPython/demo/wxFrame.py index e0fc080954..9b96b2b7ba 100644 --- a/utils/wxPython/demo/wxFrame.py +++ b/wxPython/demo/wxFrame.py @@ -11,6 +11,8 @@ class MyFrame(wxFrame): button = wxButton(panel, 1003, "Close Me") button.SetPosition(wxPoint(15, 15)) EVT_BUTTON(self, 1003, self.OnCloseMe) + EVT_CLOSE(self, self.OnCloseWindow) + def OnCloseMe(self, event): self.Close(true) diff --git a/utils/wxPython/demo/wxGLCanvas.py b/wxPython/demo/wxGLCanvas.py similarity index 94% rename from utils/wxPython/demo/wxGLCanvas.py rename to wxPython/demo/wxGLCanvas.py index 2da77bfa2a..8813c3f0cd 100644 --- a/utils/wxPython/demo/wxGLCanvas.py +++ b/wxPython/demo/wxGLCanvas.py @@ -8,7 +8,7 @@ except ImportError: try: # The Python OpenGL package can be found at - # http://starship.python.net:9673/crew/da/Code/PyOpenGL/ + # http://PyOpenGL.sourceforge.net/ from OpenGL.GL import * from OpenGL.GLUT import * haveOpenGL = true @@ -28,7 +28,7 @@ elif not haveOpenGL: def runTest(frame, nb, log): dlg = wxMessageDialog(frame, 'The OpenGL package was not found. You can get it at\n' - 'http://starship.python.net:9673/crew/da/Code/PyOpenGL/', + 'http://PyOpenGL.sourceforge.net/', 'Sorry', wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy() @@ -57,8 +57,11 @@ else: class CubeCanvas(wxGLCanvas): def __init__(self, parent): - wxGLCanvas.__init__(self, parent, -1) + wxGLCanvas.__init__(self, parent, -1) #, + #attribList=[GL_RED_BITS, 4, GL_DOUBLEBUFFER] ) EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) + EVT_SIZE(self, self.OnSize) + EVT_PAINT(self, self.OnPaint) self.init = false def OnEraseBackground(self, event): @@ -148,6 +151,8 @@ else: def __init__(self, parent): wxGLCanvas.__init__(self, parent, -1) EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) + EVT_SIZE(self, self.OnSize) + EVT_PAINT(self, self.OnPaint) self.init = false def OnEraseBackground(self, event): diff --git a/utils/wxPython/demo/wxGauge.py b/wxPython/demo/wxGauge.py similarity index 67% rename from utils/wxPython/demo/wxGauge.py rename to wxPython/demo/wxGauge.py index 3d26a6e727..21e185a439 100644 --- a/utils/wxPython/demo/wxGauge.py +++ b/wxPython/demo/wxGauge.py @@ -9,16 +9,15 @@ class TestPanel(wxPanel): self.log = log self.count = 0 - wxStaticText(self, -1, "This example uses the wxGauge control.", + wxStaticText(self, -1, "This example shows the wxGauge control.", wxPoint(45, 15)) - #self.g1 = wxGauge(self, -1, 50, wxPoint(40, 50), wxSize(40, 160), - # wxGA_VERTICAL) - #self.g1.SetBezelFace(3) - #self.g1.SetShadowWidth(3) + self.g1 = wxGauge(self, -1, 50, wxPoint(110, 50), wxSize(250, 25)) + self.g1.SetBezelFace(3) + self.g1.SetShadowWidth(3) - self.g2 = wxGauge(self, -1, 50, wxPoint(110, 50), wxSize(250, 25), - wxGA_HORIZONTAL) + self.g2 = wxGauge(self, -1, 50, wxPoint(110, 95), wxSize(250, 25), + wxGA_HORIZONTAL|wxGA_SMOOTH) self.g2.SetBezelFace(5) self.g2.SetShadowWidth(5) @@ -29,7 +28,7 @@ class TestPanel(wxPanel): self.count = self.count + 1 if self.count >= 50: self.count = 0 - #self.g1.SetValue(self.count) + self.g1.SetValue(self.count) self.g2.SetValue(self.count) diff --git a/wxPython/demo/wxGrid.py b/wxPython/demo/wxGrid.py new file mode 100644 index 0000000000..3cfe506aa3 --- /dev/null +++ b/wxPython/demo/wxGrid.py @@ -0,0 +1,101 @@ + +from wxPython.wx import * + +#--------------------------------------------------------------------------- + +buttonDefs = { + 814 : ('GridSimple', 'Simple wxGrid, catching all events'), + 815 : ('GridStdEdRend', 'wxGrid showing Editors and Renderers'), + 818 : ('GridHugeTable', 'A wxGrid with a HUGE table (100 MILLION cells!)'), + 817 : ('GridCustTable', 'wxGrid using a custom Table, with non-string data'), + 819 : ('GridEnterHandler','Remapping keys to behave differently'), + 820 : ('GridCustEditor', 'Shows how to create a custom Cell Editor'), + } + + +class ButtonPanel(wxPanel): + def __init__(self, parent, log): + wxPanel.__init__(self, parent, -1) + self.log = log + + box = wxBoxSizer(wxVERTICAL) + box.Add(20, 30) + keys = buttonDefs.keys() + keys.sort() + for k in keys: + text = buttonDefs[k][1] + btn = wxButton(self, k, text) + box.Add(btn, 0, wxALIGN_CENTER|wxALL, 15) + EVT_BUTTON(self, k, self.OnButton) + + self.SetAutoLayout(true) + self.SetSizer(box) + + + def OnButton(self, evt): + modName = buttonDefs[evt.GetId()][0] + module = __import__(modName) + frame = module.TestFrame(None, self.log) + frame.Show(true) + + +#--------------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = ButtonPanel(nb, log) + return win + +#--------------------------------------------------------------------------- + + + + + + + + + + +overview = """\ + +

      wxGrid

      + +This demo shows various ways of using the new and +improved wxGrid class. Unfortunatly it has not been +documented yet, and while it is somewhat backwards compatible, if you +try to go by the current wxGrid documentation you will probably just +confuse yourself. +

      +You can look at the sources for these samples to learn a lot about how +the new classes work. +

        +
      1. GridSimple.py A simple grid that shows +how to catch all the various events. + +

        +

      2. GridStdEdRend.py A grid that +uses non-default Cell Editors and Cell Renderers. + +

        +

      3. GridHugeTable.py A grid that +uses a non-default Grid Table. This table is read-only and simply +generates on the fly a unique string for each cell. + +

        +

      4. GridCustTable.py This grid +shows how to deal with tables that have non-string data, and how Cell +Editors and Cell Renderers are automatically chosen based on the data +type. + +

        +

      5. GridEnterHandler.pyThis one +changes how the ENTER key works, moving the current cell left to right +and wrapping around to the next row when needed. +
      +

      +You can also look at the SWIG interface +file used to generate the grid module for a lot more clues as to +how things work. + +""" + diff --git a/utils/wxPython/demo/wxHtmlWindow.py b/wxPython/demo/wxHtmlWindow.py similarity index 95% rename from utils/wxPython/demo/wxHtmlWindow.py rename to wxPython/demo/wxHtmlWindow.py index eb2aac73e3..e2e902d865 100644 --- a/utils/wxPython/demo/wxHtmlWindow.py +++ b/wxPython/demo/wxHtmlWindow.py @@ -13,6 +13,12 @@ class MyHtmlWindow(wxHtmlWindow): def __init__(self, parent, id, log): wxHtmlWindow.__init__(self, parent, id) self.log = log + EVT_SCROLLWIN( self, self.OnScroll ) + + def OnScroll( self, event ): + print 'event.GetOrientation()',event.GetOrientation() + print 'event.GetPosition()',event.GetPosition() + event.Skip() def OnLinkClicked(self, linkinfo): diff --git a/utils/wxPython/demo/wxImage.py b/wxPython/demo/wxImage.py similarity index 100% rename from utils/wxPython/demo/wxImage.py rename to wxPython/demo/wxImage.py diff --git a/utils/wxPython/demo/wxLayoutConstraints.py b/wxPython/demo/wxLayoutConstraints.py similarity index 100% rename from utils/wxPython/demo/wxLayoutConstraints.py rename to wxPython/demo/wxLayoutConstraints.py diff --git a/utils/wxPython/demo/wxListBox.py b/wxPython/demo/wxListBox.py similarity index 63% rename from utils/wxPython/demo/wxListBox.py rename to wxPython/demo/wxListBox.py index 3cba2b0fa2..ce659bd79c 100644 --- a/utils/wxPython/demo/wxListBox.py +++ b/wxPython/demo/wxListBox.py @@ -1,6 +1,51 @@ from wxPython.wx import * +import string + +#--------------------------------------------------------------------------- + +class wxFindPrefixListBox(wxListBox): + def __init__(self, parent, id, pos=wxDefaultPosition, size=wxDefaultSize, + choices=[], style=0, validator=wxDefaultValidator): + wxListBox.__init__(self, parent, id, pos, size, choices, style, validator) + self.typedText = '' + EVT_KEY_UP(self, self.OnKey) + + + def FindPrefix(self, prefix): + if prefix: + prefix = string.lower(prefix) + length = len(prefix) + for x in range(self.Number()): + text = self.GetString(x) + text = string.lower(text) + if text[:length] == prefix: + return x + return -1 + + + def OnKey(self, evt): + key = evt.GetKeyCode() + if key >= 32 and key <= 127: + self.typedText = self.typedText + chr(key) + item = self.FindPrefix(self.typedText) + if item != -1: + self.SetSelection(item) + + elif key == WXK_BACK: # backspace removes one character and backs up + self.typedText = self.typedText[:-1] + if not self.typedText: + self.SetSelection(0) + else: + item = self.FindPrefix(self.typedText) + if item != -1: + self.SetSelection(item) + + else: + evt.Skip() + + #--------------------------------------------------------------------------- class TestListBox(wxPanel): @@ -32,6 +77,16 @@ class TestListBox(wxPanel): self.lb2.SetSelection(0) + sampleList = sampleList + ['test a', 'test aa', 'test aab', + 'test ab', 'test abc', 'test abcc', + 'test abcd' ] + sampleList.sort() + wxStaticText(self, -1, "Find Prefix:", wxPoint(15, 250)) + fp = wxFindPrefixListBox(self, -1, wxPoint(80, 250), wxSize(80, 120), + sampleList, wxLB_SINGLE) + fp.SetSelection(0) + + def EvtListBox(self, event): self.log.WriteText('EvtListBox: %s\n' % event.GetString()) diff --git a/utils/wxPython/demo/wxListCtrl.py b/wxPython/demo/wxListCtrl.py similarity index 82% rename from utils/wxPython/demo/wxListCtrl.py rename to wxPython/demo/wxListCtrl.py index fd521a8bb5..7d915f6cf7 100644 --- a/utils/wxPython/demo/wxListCtrl.py +++ b/wxPython/demo/wxListCtrl.py @@ -60,23 +60,24 @@ musicdata = { class TestListCtrlPanel(wxPanel): def __init__(self, parent, log): - wxPanel.__init__(self, parent, -1) + wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS) self.log = log - tID = NewId() + tID = wxNewId() self.il = wxImageList(16, 16) - idx1 = self.il.Add(wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP)) + bmp = wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP) + idx1 = self.il.AddWithColourMask(bmp, wxWHITE) - self.list = wxListCtrl(self, tID, wxDefaultPosition, wxDefaultSize, - wxLC_REPORT|wxSUNKEN_BORDER) + self.list = wxListCtrl(self, tID, + style=wxLC_REPORT|wxSUNKEN_BORDER) self.list.SetImageList(self.il, wxIMAGE_LIST_SMALL) + # Why doesn't this show up on MSW??? self.list.SetToolTip(wxToolTip("This is a ToolTip!")) - wxToolTip_Enable(true) self.list.InsertColumn(0, "Artist") - self.list.InsertColumn(1, "Title") + self.list.InsertColumn(1, "Title", wxLIST_FORMAT_RIGHT) self.list.InsertColumn(2, "Genre") items = musicdata.items() for x in range(len(items)): @@ -90,10 +91,20 @@ class TestListCtrlPanel(wxPanel): self.list.SetColumnWidth(1, wxLIST_AUTOSIZE) ##self.list.SetColumnWidth(2, wxLIST_AUTOSIZE) - self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) + self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) + + #self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) + #self.list.EnsureVisible(25) + + # show how to change the colour of an item + item = self.list.GetItem(1) + item.SetTextColour(wxBLUE) + self.list.SetItem(item) self.currentItem = 0 + EVT_SIZE(self, self.OnSize) EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected) + EVT_LIST_ITEM_ACTIVATED(self, tID, self.OnItemActivated) EVT_LIST_DELETE_ITEM(self, tID, self.OnItemDelete) EVT_LIST_COL_CLICK(self, tID, self.OnColClick) EVT_LEFT_DCLICK(self.list, self.OnDoubleClick) @@ -112,9 +123,23 @@ class TestListCtrlPanel(wxPanel): self.log.WriteText("x, y = %s\n" % str((self.x, self.y))) event.Skip() + + def getColumnText(self, index, col): + item = self.list.GetItem(index, col) + return item.GetText() + + def OnItemSelected(self, event): self.currentItem = event.m_itemIndex - self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem)) + self.log.WriteText("OnItemSelected: %s, %s, %s\n" % + (self.list.GetItemText(self.currentItem), + self.getColumnText(self.currentItem, 1), + self.getColumnText(self.currentItem, 2))) + + + def OnItemActivated(self, event): + self.currentItem = event.m_itemIndex + self.log.WriteText("OnItemActivated: %s\n" % self.list.GetItemText(self.currentItem)) def OnItemDelete(self, event): self.log.WriteText("OnItemDelete\n") @@ -134,7 +159,7 @@ class TestListCtrlPanel(wxPanel): def OnDoubleClick(self, event): self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem)) - + event.Skip() def OnRightClick(self, event): self.log.WriteText("OnRightClick %s\n" % self.list.GetItemText(self.currentItem)) @@ -156,6 +181,7 @@ class TestListCtrlPanel(wxPanel): EVT_MENU(self, tPopupID5, self.OnPopupFive) self.PopupMenu(menu, wxPoint(self.x, self.y)) menu.Destroy() + event.Skip() def OnPopupOne(self, event): self.log.WriteText("Popup one\n") diff --git a/utils/wxPython/demo/wxMVCTree.py b/wxPython/demo/wxMVCTree.py similarity index 100% rename from utils/wxPython/demo/wxMVCTree.py rename to wxPython/demo/wxMVCTree.py diff --git a/utils/wxPython/demo/wxMask.py b/wxPython/demo/wxMask.py similarity index 97% rename from utils/wxPython/demo/wxMask.py rename to wxPython/demo/wxMask.py index 168aec2bc7..7f93f01901 100644 --- a/utils/wxPython/demo/wxMask.py +++ b/wxPython/demo/wxMask.py @@ -51,8 +51,9 @@ class TestMaskWindow(wxScrolledWindow): mask = wxMaskColour(self.bmp_withcolourmask, wxWHITE) self.bmp_withcolourmask.SetMask(mask) - self.SetScrollbars(20, 20, 600/20, 460/20) + self.SetScrollbars(20, 20, 700/20, 460/20) + EVT_PAINT(self, self.OnPaint) def OnPaint (self, e): diff --git a/utils/wxPython/demo/wxMessageDialog.py b/wxPython/demo/wxMessageDialog.py similarity index 100% rename from utils/wxPython/demo/wxMessageDialog.py rename to wxPython/demo/wxMessageDialog.py diff --git a/utils/wxPython/demo/wxMiniFrame.py b/wxPython/demo/wxMiniFrame.py similarity index 95% rename from utils/wxPython/demo/wxMiniFrame.py rename to wxPython/demo/wxMiniFrame.py index ba9d7e527b..f3cd53a40a 100644 --- a/utils/wxPython/demo/wxMiniFrame.py +++ b/wxPython/demo/wxMiniFrame.py @@ -10,6 +10,7 @@ class MyMiniFrame(wxMiniFrame): button = wxButton(panel, 1003, "Close Me") button.SetPosition(wxPoint(15, 15)) EVT_BUTTON(self, 1003, self.OnCloseMe) + EVT_CLOSE(self, self.OnCloseWindow) def OnCloseMe(self, event): self.Close(true) diff --git a/utils/wxPython/demo/wxMultipleChoiceDialog.py b/wxPython/demo/wxMultipleChoiceDialog.py similarity index 100% rename from utils/wxPython/demo/wxMultipleChoiceDialog.py rename to wxPython/demo/wxMultipleChoiceDialog.py diff --git a/utils/wxPython/demo/wxNotebook.py b/wxPython/demo/wxNotebook.py similarity index 97% rename from utils/wxPython/demo/wxNotebook.py rename to wxPython/demo/wxNotebook.py index fb18f41b9a..00d2f5b9d0 100644 --- a/utils/wxPython/demo/wxNotebook.py +++ b/wxPython/demo/wxNotebook.py @@ -2,7 +2,7 @@ from wxPython.wx import * import ColorPanel -import wxGrid +import GridSimple import wxListCtrl import wxScrolledWindow @@ -31,7 +31,7 @@ class TestNB(wxNotebook): win = ColorPanel.ColoredPanel(self, wxGREEN) self.AddPage(win, "Green") - win = wxGrid.TestGrid(self, log) + win = GridSimple.SimpleGrid(self, log) self.AddPage(win, "Grid") win = wxListCtrl.TestListCtrlPanel(self, log) diff --git a/utils/wxPython/demo/wxOGL.py b/wxPython/demo/wxOGL.py similarity index 98% rename from utils/wxPython/demo/wxOGL.py rename to wxPython/demo/wxOGL.py index 8012b4873b..c963fdd847 100644 --- a/utils/wxPython/demo/wxOGL.py +++ b/wxPython/demo/wxOGL.py @@ -115,6 +115,10 @@ class TestWindow(wxShapeCanvas): def __init__(self, parent, log, frame): wxShapeCanvas.__init__(self, parent) + maxWidth = 1000 + maxHeight = 1000 + self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20) + self.log = log self.frame = frame self.SetBackgroundColour(wxWHITE) diff --git a/utils/wxPython/demo/wxPageSetupDialog.py b/wxPython/demo/wxPageSetupDialog.py similarity index 100% rename from utils/wxPython/demo/wxPageSetupDialog.py rename to wxPython/demo/wxPageSetupDialog.py diff --git a/utils/wxPython/demo/wxPlotCanvas.py b/wxPython/demo/wxPlotCanvas.py similarity index 100% rename from utils/wxPython/demo/wxPlotCanvas.py rename to wxPython/demo/wxPlotCanvas.py diff --git a/utils/wxPython/demo/wxPrintDialog.py b/wxPython/demo/wxPrintDialog.py similarity index 100% rename from utils/wxPython/demo/wxPrintDialog.py rename to wxPython/demo/wxPrintDialog.py diff --git a/wxPython/demo/wxProcess.py b/wxPython/demo/wxProcess.py new file mode 100644 index 0000000000..4e25bd6e6d --- /dev/null +++ b/wxPython/demo/wxProcess.py @@ -0,0 +1,157 @@ + +from wxPython.wx import * + +#---------------------------------------------------------------------- + +class TestPanel(wxPanel): + def __init__(self, parent, ID, log): + wxPanel.__init__(self, parent, ID) + self.log = log + + self.process = None + EVT_IDLE(self, self.OnIdle) + + # We can either derive from wxProcess and override OnTerminate + # or we can let wxProcess send this window an event that is + # caught in the normal way... + EVT_END_PROCESS(self, -1, self.OnProcessEnded) + + + # Make the controls + prompt = wxStaticText(self, -1, 'Command line:') + self.cmd = wxTextCtrl(self, -1, 'python data/echo.py') + self.exBtn = wxButton(self, -1, 'Execute') + + self.out = wxTextCtrl(self, -1, '', style=wxTE_MULTILINE|wxTE_READONLY) + + self.inp = wxTextCtrl(self, -1, '', style=wxTE_PROCESS_ENTER) + self.sndBtn = wxButton(self, -1, 'Send') + self.termBtn = wxButton(self, -1, 'Close Stream') + self.inp.Enable(false) + self.sndBtn.Enable(false) + self.termBtn.Enable(false) + + # Hook up the events + EVT_BUTTON(self, self.exBtn.GetId(), self.OnExecuteBtn) + EVT_BUTTON(self, self.sndBtn.GetId(), self.OnSendText) + EVT_BUTTON(self, self.termBtn.GetId(), self.OnCloseStream) + EVT_TEXT_ENTER(self, self.inp.GetId(), self.OnSendText) + + + # Do the layout + box1 = wxBoxSizer(wxHORIZONTAL) + box1.Add(prompt, 0, wxALIGN_CENTER) + box1.Add(self.cmd, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5) + box1.Add(self.exBtn, 0) + + box2 = wxBoxSizer(wxHORIZONTAL) + box2.Add(self.inp, 1, wxALIGN_CENTER) + box2.Add(self.sndBtn, 0, wxLEFT, 5) + box2.Add(self.termBtn, 0, wxLEFT, 5) + + sizer = wxBoxSizer(wxVERTICAL) + sizer.Add(box1, 0, wxEXPAND|wxALL, 10) + sizer.Add(self.out, 1, wxEXPAND|wxALL, 10) + sizer.Add(box2, 0, wxEXPAND|wxALL, 10) + + self.SetSizer(sizer) + self.SetAutoLayout(true) + + + def __del__(self): + if self.process is not None: + self.process.Detach() + self.process.CloseOutput() + self.process = None + + + def OnExecuteBtn(self, evt): + cmd = self.cmd.GetValue() + + self.process = wxProcess(self) + self.process.Redirect(); + pid = wxExecute(cmd, false, self.process) + self.log.write('OnExecuteBtn: "%s" pid: %s\n' % (cmd, pid)) + + self.inp.Enable(true) + self.sndBtn.Enable(true) + self.termBtn.Enable(true) + self.cmd.Enable(false) + self.exBtn.Enable(false) + self.inp.SetFocus() + + + def OnSendText(self, evt): + text = self.inp.GetValue() + self.inp.SetValue('') + self.log.write('OnSendText: "%s"\n' % text) + self.process.GetOutputStream().write(text + '\n') + self.inp.SetFocus() + + + def OnCloseStream(self, evt): + self.log.write('OnCloseStream\n') + self.process.CloseOutput() + + + def OnIdle(self, evt): + if self.process is not None: + stream = self.process.GetInputStream() + + # Yes, this is weird. For this particular stream, EOF + # simply means that there is no data available to be read, + # not truly the end of file. Also, read() just reads all + # the currently available data, not until the real EOF... + if not stream.eof(): + text = stream.read() + self.out.AppendText(text) + + + def OnProcessEnded(self, evt): + self.log.write('OnProcessEnded, pid:%s, exitCode: %s\n' % + (evt.GetPid(), evt.GetExitCode())) + + stream = self.process.GetInputStream() + if not stream.eof(): + text = stream.read() + self.out.AppendText(text) + + self.process.Destroy() + self.process = None + self.inp.Enable(false) + self.sndBtn.Enable(false) + self.termBtn.Enable(false) + self.cmd.Enable(true) + self.exBtn.Enable(true) + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, -1, log) + return win + + +#---------------------------------------------------------------------- + + +overview = """\ + +

      wxProcess

      + +wxProcess lets you get notified when an asyncronous child process +started by wxExecute terminates, and also to get input/output streams +for the child process's stdout, stderr and stdin. + +

      +This demo launches a simple python script that echos back on stdout +lines that it reads from stdin. You can send text to the echo +process' stdin by typing in the lower textctrl and clicking Send. + +

      +Clicking the Close Stream button will close the demo's end of the +stdin pipe to the child process. In our case that will cause the +child process to exit its main loop. + + +""" diff --git a/utils/wxPython/demo/wxProgressDialog.py b/wxPython/demo/wxProgressDialog.py similarity index 100% rename from utils/wxPython/demo/wxProgressDialog.py rename to wxPython/demo/wxProgressDialog.py diff --git a/utils/wxPython/demo/wxRadioBox.py b/wxPython/demo/wxRadioBox.py similarity index 100% rename from utils/wxPython/demo/wxRadioBox.py rename to wxPython/demo/wxRadioBox.py diff --git a/utils/wxPython/demo/wxSashWindow.py b/wxPython/demo/wxSashWindow.py similarity index 70% rename from utils/wxPython/demo/wxSashWindow.py rename to wxPython/demo/wxSashWindow.py index 446ffce9e4..be6a46d7c5 100644 --- a/utils/wxPython/demo/wxSashWindow.py +++ b/wxPython/demo/wxSashWindow.py @@ -15,8 +15,12 @@ class TestSashWindow(wxPanel): self.log = log + # will occupy the space not used by the Layout Algorithm + self.remainingSpace = wxPanel(self, -1, style=wxSUNKEN_BORDER) + EVT_SASH_DRAGGED_RANGE(self, self.ID_WINDOW_TOP, self.ID_WINDOW_BOTTOM, self.OnSashDrag) + EVT_SIZE(self, self.OnSize) # Create some layout windows @@ -55,10 +59,9 @@ class TestSashWindow(wxPanel): win.SetBackgroundColour(wxColour(0, 255, 0)) win.SetSashVisible(wxSASH_RIGHT, TRUE) win.SetExtraBorderSize(10) - textWindow = wxTextCtrl(win, -1, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxSUNKEN_BORDER) - textWindow.SetValue("A help window") + textWindow.SetValue("A sub window") self.leftWindow1 = win @@ -94,11 +97,11 @@ class TestSashWindow(wxPanel): elif eID == self.ID_WINDOW_BOTTOM: self.bottomWindow.SetDefaultSize(wxSize(1000, event.GetDragRect().height)) - wxLayoutAlgorithm().LayoutWindow(self) - + wxLayoutAlgorithm().LayoutWindow(self, self.remainingSpace) + self.remainingSpace.Refresh() def OnSize(self, event): - wxLayoutAlgorithm().LayoutWindow(self) + wxLayoutAlgorithm().LayoutWindow(self, self.remainingSpace) #--------------------------------------------------------------------------- @@ -124,29 +127,4 @@ def runTest(frame, nb, log): overview = """\ -wxSashLayoutWindow responds to OnCalculateLayout events generated by wxLayoutAlgorithm. It allows the application to use simple accessors to specify how the window should be laid out, rather than having to respond to events. The fact that the class derives from wxSashWindow allows sashes to be used if required, to allow the windows to be user-resizable. - -wxSashLayoutWindow() -------------------------------------------- - -Default constructor. - -wxSashLayoutWindow(wxSashLayoutWindow* parent, wxSashLayoutWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const wxString& name = "layoutWindow") - -Constructs a sash layout window, which can be a child of a frame, dialog or any other non-control window. - -Parameters -------------------- - -parent = Pointer to a parent window. - -id = Window identifier. If -1, will automatically create an identifier. - -pos = Window position. wxDefaultPosition is (-1, -1) which indicates that wxSashLayoutWindows should generate a default position for the window. If using the wxSashLayoutWindow class directly, supply an actual position. - -size = Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows should generate a default size for the window. - -style = Window style. For window styles, please see wxSashLayoutWindow. - -name = Window name. """ diff --git a/utils/wxPython/demo/wxScrolledMessageDialog.py b/wxPython/demo/wxScrolledMessageDialog.py similarity index 100% rename from utils/wxPython/demo/wxScrolledMessageDialog.py rename to wxPython/demo/wxScrolledMessageDialog.py diff --git a/utils/wxPython/demo/wxScrolledWindow.py b/wxPython/demo/wxScrolledWindow.py similarity index 92% rename from utils/wxPython/demo/wxScrolledWindow.py rename to wxPython/demo/wxScrolledWindow.py index 44b5f9fd93..3b6edadb14 100644 --- a/utils/wxPython/demo/wxScrolledWindow.py +++ b/wxPython/demo/wxScrolledWindow.py @@ -12,9 +12,12 @@ class MyCanvas(wxScrolledWindow): self.maxHeight = 1000 self.SetBackgroundColour(wxNamedColor("WHITE")) - self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftButtonEvent) - self.Connect(-1, -1, wxEVT_LEFT_UP, self.OnLeftButtonEvent) - self.Connect(-1, -1, wxEVT_MOTION, self.OnLeftButtonEvent) + EVT_LEFT_DOWN(self, self.OnLeftButtonEvent) + EVT_LEFT_UP(self, self.OnLeftButtonEvent) + EVT_MOTION(self, self.OnLeftButtonEvent) + + EVT_PAINT(self, self.OnPaint) + self.SetCursor(wxStockCursor(wxCURSOR_PENCIL)) bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP) @@ -78,6 +81,9 @@ class MyCanvas(wxScrolledWindow): dc.DrawRectangle(50,500,50,50) dc.DrawRectangle(100,500,50,50) + dc.SetPen(pen1) + dc.DrawEllipticArc(200, 500, 50, 75, 0, 90) + #from wxPython import dch #dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK) @@ -97,7 +103,7 @@ class MyCanvas(wxScrolledWindow): self.x, self.y = self.ConvertEventCoords(event) def ConvertEventCoords(self, event): - xView, yView = self.ViewStart() + xView, yView = self.GetViewStart() xDelta, yDelta = self.GetScrollPixelsPerUnit() return (event.GetX() + (xView * xDelta), event.GetY() + (yView * yDelta)) @@ -109,7 +115,6 @@ class MyCanvas(wxScrolledWindow): self.CaptureMouse() elif event.Dragging(): - print event.GetPosition() dc = wxClientDC(self) self.PrepareDC(dc) dc.BeginDrawing() diff --git a/utils/wxPython/demo/wxSingleChoiceDialog.py b/wxPython/demo/wxSingleChoiceDialog.py similarity index 100% rename from utils/wxPython/demo/wxSingleChoiceDialog.py rename to wxPython/demo/wxSingleChoiceDialog.py diff --git a/utils/wxPython/demo/wxSlider.py b/wxPython/demo/wxSlider.py similarity index 100% rename from utils/wxPython/demo/wxSlider.py rename to wxPython/demo/wxSlider.py diff --git a/utils/wxPython/demo/wxSpinButton.py b/wxPython/demo/wxSpinButton.py similarity index 100% rename from utils/wxPython/demo/wxSpinButton.py rename to wxPython/demo/wxSpinButton.py diff --git a/wxPython/demo/wxSpinCtrl.py b/wxPython/demo/wxSpinCtrl.py new file mode 100644 index 0000000000..7729b88b5d --- /dev/null +++ b/wxPython/demo/wxSpinCtrl.py @@ -0,0 +1,37 @@ + +from wxPython.wx import * + +import string + +#---------------------------------------------------------------------- + +class TestPanel(wxPanel): + def __init__(self, parent, log): + wxPanel.__init__(self, parent, -1) + self.log = log + self.count = 0 + + wxStaticText(self, -1, "This example uses the wxSpinCtrl control.", + wxPoint(45, 15)) + + sc = wxSpinCtrl(self, -1, "", wxPoint(30, 50), wxSize(80, -1)) + sc.SetRange(1,100) + sc.SetValue(5) + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, log) + return win + +#---------------------------------------------------------------------- + + + + + + + +overview = """\ +""" diff --git a/utils/wxPython/demo/wxSplitterWindow.py b/wxPython/demo/wxSplitterWindow.py similarity index 80% rename from utils/wxPython/demo/wxSplitterWindow.py rename to wxPython/demo/wxSplitterWindow.py index 662975b5f8..fac9cbee57 100644 --- a/utils/wxPython/demo/wxSplitterWindow.py +++ b/wxPython/demo/wxSplitterWindow.py @@ -9,9 +9,17 @@ class MySplitter(wxSplitterWindow): wxSplitterWindow.__init__(self, parent, ID) self.log = log EVT_SPLITTER_SASH_POS_CHANGED(self, self.GetId(), self.OnSashChanged) + EVT_SPLITTER_SASH_POS_CHANGING(self, self.GetId(), self.OnSashChanging) def OnSashChanged(self, evt): - self.log.WriteText("sash changed to " + str(evt.GetSashPosition())) + self.log.WriteText("sash changed to %s\n" % str(evt.GetSashPosition())) + # uncomment this to not allow the change + #evt.SetSashPosition(-1) + + def OnSashChanging(self, evt): + self.log.WriteText("sash changing to %s\n" % str(evt.GetSashPosition())) + # uncomment this to not allow the change + #evt.SetSashPosition(-1) #--------------------------------------------------------------------------- diff --git a/utils/wxPython/demo/wxStaticBitmap.py b/wxPython/demo/wxStaticBitmap.py similarity index 73% rename from utils/wxPython/demo/wxStaticBitmap.py rename to wxPython/demo/wxStaticBitmap.py index cb9c8df10b..5075e946c4 100644 --- a/utils/wxPython/demo/wxStaticBitmap.py +++ b/wxPython/demo/wxStaticBitmap.py @@ -14,10 +14,16 @@ class TestPanel(wxPanel): wxStaticText(self, -1, "This is a wxStaticBitmap.", wxPoint(45, 15)) bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP) + mask = wxMaskColour(bmp, wxBLUE) + bmp.SetMask(mask) wxStaticBitmap(self, -1, bmp, wxPoint(80, 50), wxSize(bmp.GetWidth(), bmp.GetHeight())) + bmp = wxBitmap('bitmaps/robin.jpg', wxBITMAP_TYPE_JPEG) + wxStaticBitmap(self, -1, bmp, (80, 150)) + wxStaticText(self, -1, "Hey, if Ousterhout can do it, so can I.", + (200, 175)) #---------------------------------------------------------------------- diff --git a/utils/wxPython/demo/wxStaticText.py b/wxPython/demo/wxStaticText.py similarity index 100% rename from utils/wxPython/demo/wxStaticText.py rename to wxPython/demo/wxStaticText.py diff --git a/utils/wxPython/demo/wxStatusBar.py b/wxPython/demo/wxStatusBar.py similarity index 65% rename from utils/wxPython/demo/wxStatusBar.py rename to wxPython/demo/wxStatusBar.py index 97c32980eb..f40facb72f 100644 --- a/utils/wxPython/demo/wxStatusBar.py +++ b/wxPython/demo/wxStatusBar.py @@ -10,6 +10,9 @@ class CustomStatusBar(wxStatusBar): wxStatusBar.__init__(self, parent, -1) self.SetFieldsCount(3) self.log = log + self.sizeChanged = false + EVT_SIZE(self, self.OnSize) + EVT_IDLE(self, self.OnIdle) self.SetStatusText("A Custom StatusBar...", 0) @@ -17,12 +20,8 @@ class CustomStatusBar(wxStatusBar): EVT_CHECKBOX(self, 1001, self.OnToggleClock) self.cb.SetValue(true) - # figure out how tall to make it. - dc = wxClientDC(self) - dc.SetFont(self.GetFont()) - (w,h) = dc.GetTextExtent('X') - h = int(h * 1.8) - self.SetSize(wxSize(100, h)) + # set the initial position of the checkbox + self.Reposition() # start our timer self.timer = wxPyTimer(self.Notify) @@ -37,6 +36,7 @@ class CustomStatusBar(wxStatusBar): self.SetStatusText(st, 2) self.log.WriteText("tick...\n") + # the checkbox was clicked def OnToggleClock(self, event): if self.cb.GetValue(): @@ -46,11 +46,26 @@ class CustomStatusBar(wxStatusBar): self.timer.Stop() + def OnSize(self, evt): + self.Reposition() # for normal size events + + # Set a flag so the idle time handler will also do the repositioning. + # It is done this way to get around a buglet where GetFieldRect is not + # accurate during the EVT_SIZE resulting from a frame maximize. + self.sizeChanged = true + + + def OnIdle(self, evt): + if self.sizeChanged: + self.Reposition() + + # reposition the checkbox - def OnSize(self, event): + def Reposition(self): rect = self.GetFieldRect(1) self.cb.SetPosition(wxPoint(rect.x+2, rect.y+2)) self.cb.SetSize(wxSize(rect.width-4, rect.height-4)) + self.sizeChanged = false @@ -62,6 +77,7 @@ class TestCustomStatusBar(wxFrame): self.sb = CustomStatusBar(self, log) self.SetStatusBar(self.sb) + EVT_CLOSE(self, self.OnCloseWindow) def OnCloseWindow(self, event): self.sb.timer.Stop() @@ -87,28 +103,4 @@ def runTest(frame, nb, log): overview = """\ A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts of status information. It can contain one or more fields, one or more of which can be variable length according to the size of the window. - -wxStatusBar() ----------------------------- - -Default constructor. - -wxStatusBar(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "statusBar") - -Constructor, creating the window. - -Parameters -------------------- - -parent = The window parent, usually a frame. - -id = The window identifier. It may take a value of -1 to indicate a default value. - -pos = The window position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxWindows, depending on platform. - -size = The window size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxWindows, depending on platform. - -style = The window style. See wxStatusBar. - -name = The name of the window. This parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual windows. """ diff --git a/wxPython/demo/wxStyledTextCtrl_1.py b/wxPython/demo/wxStyledTextCtrl_1.py new file mode 100644 index 0000000000..f7bf221259 --- /dev/null +++ b/wxPython/demo/wxStyledTextCtrl_1.py @@ -0,0 +1,186 @@ + +from wxPython.wx import * +from wxPython.stc import * + +#---------------------------------------------------------------------- + +demoText = """\ + +This editor is provided by a class named wxStyledTextCtrl. As +the name suggests, you can define styles that can be applied to +sections of text. This will typically be used for things like +syntax highlighting code editors, but I'm sure that there are other +applications as well. A style is a combination of font, point size, +forground and background colours. The editor can handle +proportional fonts just as easily as monospaced fonts, and various +styles can use different sized fonts. + +There are a few canned language lexers and colourizers included, +(see the next demo) or you can handle the colourization yourself. +If you do you can simply register an event handler and the editor +will let you know when the visible portion of the text needs +styling. + +wxStyledTextEditor also supports setting markers in the margin... + + + + +...and indicators within the text. You can use these for whatever +you want in your application. Cut, Copy, Paste, Drag and Drop of +text works, as well as virtually unlimited Undo and Redo +capabilities, (right click to try it out.) + +""" + +if wxPlatform == '__WXMSW__': + face1 = 'Arial' + face2 = 'Times New Roman' + face3 = 'Courier New' + pb = 6 +else: + face1 = 'Helvetica' + face2 = 'Times' + face3 = 'Courier' + pb = 10 + + +#---------------------------------------------------------------------- +# This shows how to catch the Modified event from the wxStyledTextCtrl + +class MySTC(wxStyledTextCtrl): + def __init__(self, parent, ID, log): + wxStyledTextCtrl.__init__(self, parent, ID) + self.log = log + + EVT_STC_MODIFIED(self, ID, self.OnModified) + + + def OnModified(self, evt): + self.log.write("""OnModified + Mod type: %s + At position: %d + Lines added: %d + Text Length: %d + Text: %s\n""" % ( self.transModType(evt.GetModificationType()), + evt.GetPosition(), + evt.GetLinesAdded(), + evt.GetLength(), + evt.GetText() )) + + def transModType(self, modType): + st = "" + table = [(wxSTC_MOD_INSERTTEXT, "InsertText"), + (wxSTC_MOD_DELETETEXT, "DeleteText"), + (wxSTC_MOD_CHANGESTYLE, "ChangeStyle"), + (wxSTC_MOD_CHANGEFOLD, "ChangeFold"), + (wxSTC_PERFORMED_USER, "UserFlag"), + (wxSTC_PERFORMED_UNDO, "Undo"), + (wxSTC_PERFORMED_REDO, "Redo"), + (wxSTC_LASTSTEPINUNDOREDO, "Last-Undo/Redo"), + (wxSTC_MOD_CHANGEMARKER, "ChangeMarker"), + (wxSTC_MOD_BEFOREINSERT, "B4-Insert"), + (wxSTC_MOD_BEFOREDELETE, "B4-Delete") + ] + + for flag,text in table: + if flag & modType: + st = st + text + " " + + if not st: + st = 'UNKNOWN' + + return st + + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + ed = MySTC(nb, -1, log) + + ed.SetText(demoText) + ed.EmptyUndoBuffer() + + # make some styles + ed.StyleSetSpec(wxSTC_STYLE_DEFAULT, "size:%d,face:%s" % (pb+2, face3)) + ed.StyleSetSpec(1, "size:%d,bold,face:%s,fore:#0000FF" % (pb+3, face1)) + ed.StyleSetSpec(2, "face:%s,italic,fore:#FF0000,size:%d" % (face2, pb+2)) + ed.StyleSetSpec(3, "face:%s,bold,size:%d" % (face2, pb+3)) + ed.StyleSetSpec(4, "face:%s,size:%d" % (face1, pb)) + + + # now set some text to those styles... Normally this would be + # done in an event handler that happens when text needs displayed. + ed.StartStyling(98, 0xff) + ed.SetStyling(6, 1) # set style for 6 characters using style 1 + + ed.StartStyling(190, 0xff) + ed.SetStyling(20, 2) + + ed.StartStyling(310, 0xff) + ed.SetStyling(4, 3) + ed.SetStyling(2, 0) + ed.SetStyling(10, 4) + + + # line numbers in the margin + ed.SetMarginType(0, wxSTC_MARGIN_NUMBER) + ed.SetMarginWidth(0, 22) + ed.StyleSetSpec(wxSTC_STYLE_LINENUMBER, "size:%d,face:%s" % (pb, face1)) + + # setup some markers + ed.SetMarginType(1, wxSTC_MARGIN_SYMBOL) + ed.MarkerDefine(0, wxSTC_MARK_ROUNDRECT, "#CCFF00", "RED") + ed.MarkerDefine(1, wxSTC_MARK_CIRCLE, "FOREST GREEN", "SIENNA") + ed.MarkerDefine(2, wxSTC_MARK_SHORTARROW, "blue", "blue") + ed.MarkerDefine(3, wxSTC_MARK_ARROW, "#00FF00", "#00FF00") + + # put some markers on some lines + ed.MarkerAdd(17, 0) + ed.MarkerAdd(18, 1) + ed.MarkerAdd(19, 2) + ed.MarkerAdd(20, 3) + ed.MarkerAdd(20, 0) + + + # and finally, an indicator or two + ed.IndicatorSetStyle(0, wxSTC_INDIC_SQUIGGLE) + ed.IndicatorSetForeground(0, wxRED) + ed.IndicatorSetStyle(1, wxSTC_INDIC_DIAGONAL) + ed.IndicatorSetForeground(1, wxBLUE) + ed.IndicatorSetStyle(2, wxSTC_INDIC_STRIKE) + ed.IndicatorSetForeground(2, wxRED) + + ed.StartStyling(836, wxSTC_INDICS_MASK) + ed.SetStyling(10, wxSTC_INDIC0_MASK) + ed.SetStyling(10, wxSTC_INDIC1_MASK) + ed.SetStyling(10, wxSTC_INDIC2_MASK | wxSTC_INDIC1_MASK) + + + return ed + + + +#---------------------------------------------------------------------- + + +overview = """\ + +Once again, no docs yet. Sorry. But this +and this should +be helpful. + +""" + + + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = wxFrame(None, -1, "Tester...", size=(640, 480)) + win = runTest(frame, frame, sys.stdout) + frame.Show(true) + app.MainLoop() + + diff --git a/wxPython/demo/wxStyledTextCtrl_2.py b/wxPython/demo/wxStyledTextCtrl_2.py new file mode 100644 index 0000000000..228c404bdb --- /dev/null +++ b/wxPython/demo/wxStyledTextCtrl_2.py @@ -0,0 +1,307 @@ + +from wxPython.wx import * +from wxPython.stc import * + +import keyword + +#---------------------------------------------------------------------- + +demoText = """\ +## This version of the editor has been set up to edit Python source +## code. Here is a copy of wxPython/demo/Main.py to play with. + + +""" + +#---------------------------------------------------------------------- + + +if wxPlatform == '__WXMSW__': + faces = { 'times': 'Times New Roman', + 'mono' : 'Courier New', + 'helv' : 'Arial', + 'other': 'Comic Sans MS', + 'size' : 8, + 'size2': 6, + } +else: + faces = { 'times': 'Times', + 'mono' : 'Courier', + 'helv' : 'Helvetica', + 'other': 'new century schoolbook', + 'size' : 11, + 'size2': 9, + } + + +#---------------------------------------------------------------------- + +class PythonSTC(wxStyledTextCtrl): + def __init__(self, parent, ID): + wxStyledTextCtrl.__init__(self, parent, ID) + + self.SetLexer(wxSTC_LEX_PYTHON) + self.SetKeyWords(0, string.join(keyword.kwlist)) + + self.SetProperty("fold", "1") + self.SetProperty("tab.timmy.whinge.level", "1") + self.SetMargins(0,0) + + self.SetViewWhiteSpace(false) + #self.SetBufferedDraw(false) + + self.SetEdgeMode(wxSTC_EDGE_BACKGROUND) + self.SetEdgeColumn(78) + + # Setup a margin to hold fold markers + #self.SetFoldFlags(16) ### WHAT IS THIS VALUE? WHAT ARE THE OTHER FLAGS? DOES IT MATTER? + self.SetMarginType(2, wxSTC_MARGIN_SYMBOL) + self.SetMarginMask(2, wxSTC_MASK_FOLDERS) + self.SetMarginSensitive(2, true) + self.SetMarginWidth(2, 15) + self.MarkerDefine(wxSTC_MARKNUM_FOLDER, wxSTC_MARK_ARROW, "navy", "navy") + self.MarkerDefine(wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, "navy", "navy") + + + EVT_STC_UPDATEUI(self, ID, self.OnUpdateUI) + EVT_STC_MARGINCLICK(self, ID, self.OnMarginClick) + + + # Make some styles, The lexer defines what each style is used for, we + # just have to define what each style looks like. This set is adapted from + # Scintilla sample property files. + + self.StyleClearAll() + + # Global default styles for all languages + self.StyleSetSpec(wxSTC_STYLE_DEFAULT, "face:%(helv)s,size:%(size)d" % faces) + self.StyleSetSpec(wxSTC_STYLE_LINENUMBER, "back:#C0C0C0,face:%(helv)s,size:%(size2)d" % faces) + self.StyleSetSpec(wxSTC_STYLE_CONTROLCHAR, "face:%(other)s" % faces) + self.StyleSetSpec(wxSTC_STYLE_BRACELIGHT, "fore:#FFFFFF,back:#0000FF,bold") + self.StyleSetSpec(wxSTC_STYLE_BRACEBAD, "fore:#000000,back:#FF0000,bold") + + # Python styles + # White space + self.StyleSetSpec(wxSTC_P_DEFAULT, "fore:#808080") + # Comment + self.StyleSetSpec(wxSTC_P_COMMENTLINE, "fore:#007F00,face:%(other)s" % faces) + # Number + self.StyleSetSpec(wxSTC_P_NUMBER, "fore:#007F7F") + # String + self.StyleSetSpec(wxSTC_P_STRING, "fore:#7F007F,italic,face:%(times)s" % faces) + # Single quoted string + self.StyleSetSpec(wxSTC_P_CHARACTER, "fore:#7F007F,italic,face:%(times)s" % faces) + # Keyword + self.StyleSetSpec(wxSTC_P_WORD, "fore:#00007F,bold") + # Triple quotes + self.StyleSetSpec(wxSTC_P_TRIPLE, "fore:#7F0000") + # Triple double quotes + self.StyleSetSpec(wxSTC_P_TRIPLEDOUBLE, "fore:#7F0000") + # Class name definition + self.StyleSetSpec(wxSTC_P_CLASSNAME, "fore:#0000FF,bold,underline") + # Function or method name definition + self.StyleSetSpec(wxSTC_P_DEFNAME, "fore:#007F7F,bold") + # Operators + self.StyleSetSpec(wxSTC_P_OPERATOR, "bold") + # Identifiers + #self.StyleSetSpec(wxSTC_P_IDENTIFIER, "bold")#,fore:#FF00FF") + # Comment-blocks + self.StyleSetSpec(wxSTC_P_COMMENTBLOCK, "fore:#7F7F7F") + # End of line where string is not closed + self.StyleSetSpec(wxSTC_P_STRINGEOL, "fore:#000000,face:%(mono)s,back:#E0C0E0,eolfilled" % faces) + + + self.SetCaretForeground("BLUE") + + EVT_KEY_UP(self, self.OnKeyPressed) + + + def OnKeyPressed(self, event): + key = event.KeyCode() + if key == 32 and event.ControlDown(): + pos = self.GetCurrentPos() + # Tips + if event.ShiftDown(): + self.CallTipSetBackground("yellow") + self.CallTipShow(pos, 'param1, param2') + # Code completion + else: + #lst = [] + #for x in range(50000): + # lst.append('%05d' % x) + #st = string.join(lst) + #print len(st) + #self.AutoCompShow(0, st) + self.AutoCompSetIgnoreCase(true) + self.AutoCompShow(0, string.join(keyword.kwlist)) + self.AutoCompSelect('br') + else: + event.Skip() + + + def OnUpdateUI(self, evt): + # check for matching braces + braceAtCaret = -1 + braceOpposite = -1 + charBefore = None + caretPos = self.GetCurrentPos() + if caretPos > 0: + charBefore = self.GetCharAt(caretPos - 1) + styleBefore = self.GetStyleAt(caretPos - 1) + + # check before + if charBefore and chr(charBefore) in "[]{}()" and styleBefore == wxSTC_P_OPERATOR: + braceAtCaret = caretPos - 1 + + # check after + if braceAtCaret < 0: + charAfter = self.GetCharAt(caretPos) + styleAfter = self.GetStyleAt(caretPos) + if charAfter and chr(charAfter) in "[]{}()" and styleAfter == wxSTC_P_OPERATOR: + braceAtCaret = caretPos + + if braceAtCaret >= 0: + braceOpposite = self.BraceMatch(braceAtCaret) + + if braceAtCaret != -1 and braceOpposite == -1: + self.BraceBadLight(braceAtCaret) + else: + self.BraceHighlight(braceAtCaret, braceOpposite) + #pt = self.PointFromPosition(braceOpposite) + #self.Refresh(true, wxRect(pt.x, pt.y, 5,5)) + #print pt + #self.Refresh(false) + + + def OnMarginClick(self, evt): + # fold and unfold as needed + if evt.GetMargin() == 2: + if evt.GetShift() and evt.GetControl(): + self.FoldAll() + else: + lineClicked = self.LineFromPosition(evt.GetPosition()) + if self.GetFoldLevel(lineClicked) & wxSTC_FOLDLEVELHEADERFLAG: + if evt.GetShift(): + self.SetFoldExpanded(lineClicked, true) + self.Expand(lineClicked, true, true, 1) + elif evt.GetControl(): + if self.GetFoldExpanded(lineClicked): + self.SetFoldExpanded(lineClicked, false) + self.Expand(lineClicked, false, true, 0) + else: + self.SetFoldExpanded(lineClicked, true) + self.Expand(lineClicked, true, true, 100) + else: + self.ToggleFold(lineClicked) + + + def FoldAll(self): + lineCount = self.GetLineCount() + expanding = true + + # find out if we are folding or unfolding + for lineNum in range(lineCount): + if self.GetFoldLevel(lineNum) & wxSTC_FOLDLEVELHEADERFLAG: + expanding = not self.GetFoldExpanded(lineNum) + break; + + lineNum = 0 + while lineNum < lineCount: + level = self.GetFoldLevel(lineNum) + if level & wxSTC_FOLDLEVELHEADERFLAG and \ + (level & wxSTC_FOLDLEVELNUMBERMASK) == wxSTC_FOLDLEVELBASE: + + if expanding: + self.SetFoldExpanded(lineNum, true) + lineNum = self.Expand(lineNum, true) + lineNum = lineNum - 1 + else: + lastChild = self.GetLastChild(lineNum, -1) + self.SetFoldExpanded(lineNum, false) + if lastChild > lineNum: + self.HideLines(lineNum+1, lastChild) + + lineNum = lineNum + 1 + + + + def Expand(self, line, doExpand, force=false, visLevels=0, level=-1): + lastChild = self.GetLastChild(line, level) + line = line + 1 + while line <= lastChild: + if force: + if visLevels > 0: + self.ShowLines(line, line) + else: + self.HideLines(line, line) + else: + if doExpand: + self.ShowLines(line, line) + + if level == -1: + level = self.GetFoldLevel(line) + + if level & wxSTC_FOLDLEVELHEADERFLAG: + if force: + if visLevels > 1: + self.SetFoldExpanded(line, true) + else: + self.SetFoldExpanded(line, false) + line = self.Expand(line, doExpand, force, visLevels-1) + + else: + if doExpand and self.GetFoldExpanded(line): + line = self.Expand(line, true, force, visLevels-1) + else: + line = self.Expand(line, false, force, visLevels-1) + else: + line = line + 1; + + return line + + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + ed = PythonSTC(nb, -1) + + ed.SetText(demoText + open('Main.py').read()) + ed.EmptyUndoBuffer() + + + # line numbers in the margin + ed.SetMarginType(1, wxSTC_MARGIN_NUMBER) + ed.SetMarginWidth(1, 25) + + return ed + + + +#---------------------------------------------------------------------- + + +overview = """\ + +Once again, no docs yet. Sorry. But this +and this should +be helpful. + +""" + + +if __name__ == '__main__': + import sys + app = wxPySimpleApp() + frame = wxFrame(None, -1, "Tester...", size=(640, 480)) + win = runTest(frame, frame, sys.stdout) + frame.Show(true) + app.MainLoop() + + + + + + +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- + diff --git a/utils/wxPython/demo/wxTextCtrl.py b/wxPython/demo/wxTextCtrl.py similarity index 68% rename from utils/wxPython/demo/wxTextCtrl.py rename to wxPython/demo/wxTextCtrl.py index 49eaa00e75..8936d34de4 100644 --- a/utils/wxPython/demo/wxTextCtrl.py +++ b/wxPython/demo/wxTextCtrl.py @@ -9,21 +9,30 @@ class TestPanel(wxPanel): self.log = log wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, 25), wxSize(75, 20)) - wxTextCtrl(self, 10, "", wxPoint(80, 25), wxSize(150, 20)) + t = wxTextCtrl(self, 10, "Test it out and see", wxPoint(80, 25), wxSize(150, 20)) + t.SetInsertionPoint(0) EVT_TEXT(self, 10, self.EvtText) + EVT_CHAR(t, self.EvtChar) + wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20)) wxTextCtrl(self, 20, "", wxPoint(80, 50), wxSize(150, 20), wxTE_PASSWORD) EVT_TEXT(self, 20, self.EvtText) wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20)) - wxTextCtrl(self, 30, "", wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE) + t = wxTextCtrl(self, 30, "How does it work with a long line of text set in the control", + wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE) + t.SetInsertionPoint(0) EVT_TEXT(self, 30, self.EvtText) def EvtText(self, event): self.log.WriteText('EvtText: %s\n' % event.GetString()) + def EvtChar(self, event): + self.log.WriteText('EvtChar: %d\n' % event.GetKeyCode()) + event.Skip() + #--------------------------------------------------------------------------- diff --git a/wxPython/demo/wxTextEntryDialog.py b/wxPython/demo/wxTextEntryDialog.py new file mode 100644 index 0000000000..b0049d6506 --- /dev/null +++ b/wxPython/demo/wxTextEntryDialog.py @@ -0,0 +1,30 @@ + +from wxPython.wx import * + +#--------------------------------------------------------------------------- + +def runTest(frame, nb, log): + dlg = wxTextEntryDialog(frame, 'What is your favorite programming language?', + 'Duh??', 'Python') + dlg.SetValue("Python is the best!") #### this doesn't work? + if dlg.ShowModal() == wxID_OK: + log.WriteText('You entered: %s\n' % dlg.GetValue()) + dlg.Destroy() + + +#--------------------------------------------------------------------------- + + + + + + + + + + + + +overview = """\ + +""" diff --git a/utils/wxPython/demo/wxTimer.py b/wxPython/demo/wxTimer.py similarity index 100% rename from utils/wxPython/demo/wxTimer.py rename to wxPython/demo/wxTimer.py diff --git a/utils/wxPython/demo/wxToolBar.py b/wxPython/demo/wxToolBar.py similarity index 51% rename from utils/wxPython/demo/wxToolBar.py rename to wxPython/demo/wxToolBar.py index e4926741b8..e8deb0b9d3 100644 --- a/utils/wxPython/demo/wxToolBar.py +++ b/wxPython/demo/wxToolBar.py @@ -8,11 +8,13 @@ class TestToolBar(wxFrame): wxFrame.__init__(self, parent, -1, 'Test ToolBar', wxPoint(0,0), wxSize(500, 300)) self.log = log + self.timer = None + EVT_CLOSE(self, self.OnCloseWindow) wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE")) - tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER) #|wxTB_FLAT) - #tb = wxToolBar(self, -1, wxDefaultPosition, wxDefaultSize, + tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT) + #tb = wxToolBarSimple(self, -1, wxDefaultPosition, wxDefaultSize, # wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT) #self.SetToolBar(tb) @@ -21,51 +23,73 @@ class TestToolBar(wxFrame): tb.AddSimpleTool(10, wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP), "New", "Long help for 'New'") EVT_TOOL(self, 10, self.OnToolClick) - EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick) - tb.AddSimpleTool(20, wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP), "Open") + tb.AddSimpleTool(20, wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP), + "Open", "Long help for 'Open'") EVT_TOOL(self, 20, self.OnToolClick) - EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick) tb.AddSeparator() - tb.AddSimpleTool(30, wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP), "Copy") + tb.AddSimpleTool(30, wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP), + "Copy", "Long help for 'Copy'") EVT_TOOL(self, 30, self.OnToolClick) - EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick) - tb.AddSimpleTool(40, wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP), "Paste") + tb.AddSimpleTool(40, wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP), + "Paste", "Long help for 'Paste'") EVT_TOOL(self, 40, self.OnToolClick) - EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick) tb.AddSeparator() tool = tb.AddTool(50, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP), - shortHelpString="Toggle this", toggle=true) + shortHelpString="Toggle this", isToggle=true) EVT_TOOL(self, 50, self.OnToolClick) - EVT_TOOL_RCLICKED(self, 50, self.OnToolRClick) tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP), wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP), - shortHelpString="Toggle with 2 bitmaps", toggle=true) + shortHelpString="Toggle with 2 bitmaps", isToggle=true) EVT_TOOL(self, 60, self.OnToolClick) - EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick) + EVT_TOOL_ENTER(self, -1, self.OnToolEnter) + EVT_TOOL_RCLICKED(self, -1, self.OnToolRClick) # Match all + EVT_TIMER(self, -1, self.OnClearSB) tb.AddSeparator() - tb.AddControl(wxComboBox(tb, -1, "", choices=["", "This", "is a", "wxComboBox"], + cbID = wxNewId() + tb.AddControl(wxComboBox(tb, cbID, "", choices=["", "This", "is a", "wxComboBox"], size=(150,-1), style=wxCB_DROPDOWN)) + EVT_COMBOBOX(self, cbID, self.OnCombo) tb.Realize() - def OnCloseWindow(self, event): - self.Destroy() - def OnToolClick(self, event): self.log.WriteText("tool %s clicked\n" % event.GetId()) def OnToolRClick(self, event): self.log.WriteText("tool %s right-clicked\n" % event.GetId()) + def OnCombo(self, event): + self.log.WriteText("combobox item selected: %s\n" % event.GetString()) + + def OnToolEnter(self, event): + self.log.WriteText('OnToolEnter: %s, %s\n' % (event.GetId(), event.GetInt())) + if self.timer is None: + self.timer = wxTimer(self) + self.timer.Start(2000) + event.Skip() + + + def OnClearSB(self, event): # called for the timer event handler + self.SetStatusText("") + self.timer.Stop() + self.timer = None + + + def OnCloseWindow(self, event): + if self.timer is not None: + self.timer.Stop() + self.timer = None + self.Destroy() + #--------------------------------------------------------------------------- def runTest(frame, nb, log): @@ -91,37 +115,5 @@ def runTest(frame, nb, log): overview = """\ -The name wxToolBar is defined to be a synonym for one of the following classes: -wxToolBar95 The native Windows 95 toolbar. Used on Windows 95, NT 4 and above. - -wxToolBarMSW A Windows implementation. Used on 16-bit Windows. - -wxToolBarGTK The GTK toolbar. - -wxToolBarSimple A simple implementation, with scrolling. Used on platforms with no native toolbar control, or where scrolling is required. - -wxToolBar() ------------------------ - -Default constructor. - -wxToolBar(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_HORIZONTAL | wxNO_BORDER, const wxString& name = wxPanelNameStr) - -Constructs a toolbar. - -Parameters -------------------- - -parent = Pointer to a parent window. - -id = Window identifier. If -1, will automatically create an identifier. - -pos = Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows should generate a default position for the window. If using the wxWindow class directly, supply an actual position. - -size = Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows should generate a default size for the window. - -style = Window style. See wxToolBar for details. - -name = Window name. """ diff --git a/utils/wxPython/demo/wxTreeCtrl.py b/wxPython/demo/wxTreeCtrl.py similarity index 70% rename from utils/wxPython/demo/wxTreeCtrl.py rename to wxPython/demo/wxTreeCtrl.py index 41741c08fb..64f8662fd4 100644 --- a/utils/wxPython/demo/wxTreeCtrl.py +++ b/wxPython/demo/wxTreeCtrl.py @@ -5,14 +5,30 @@ import string #--------------------------------------------------------------------------- +class MyTreeCtrl(wxTreeCtrl): + def __init__(self, parent, id, pos, size, style): + wxTreeCtrl.__init__(self, parent, id, pos, size, style) + + + def OnCompareItems(self, item1, item2): + t1 = self.GetItemText(item1) + t2 = self.GetItemText(item2) + if t1 < t2: return -1 + if t1 == t2: return 0 + return 1 + +#--------------------------------------------------------------------------- + class TestTreeCtrlPanel(wxPanel): def __init__(self, parent, log): - wxPanel.__init__(self, parent, -1) + # Use the WANTS_CHARS style so the panel doesn't eat the Return key. + wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS) + EVT_SIZE(self, self.OnSize) self.log = log tID = NewId() - self.tree = wxTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize, + self.tree = MyTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)# | wxTR_MULTIPLE) #il = wxImageList(16, 16) @@ -25,19 +41,27 @@ class TestTreeCtrlPanel(wxPanel): #self.tree.SetImageList(il) #self.il = il + # NOTE: For some reason tree items have to have a data object in + # order to be sorted. Since our compare just uses the labels + # we don't need any real data, so we'll just use None. + self.root = self.tree.AddRoot("The Root Item") + self.tree.SetPyData(self.root, None) #self.tree.SetItemImage(self.root, idx1) for x in range(15): child = self.tree.AppendItem(self.root, "Item %d" % x) + self.tree.SetPyData(child, None) #self.tree.SetItemImage(child, idx2) #self.tree.SetItemSelectedImage(child, idx3) for y in range(5): last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y))) + self.tree.SetPyData(last, None) #self.tree.SetItemImage(last, idx4) #self.tree.SetItemSelectedImage(last, idx5) for z in range(5): - self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z)) + item = self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z)) + self.tree.SetPyData(item, None) self.tree.Expand(self.root) EVT_TREE_ITEM_EXPANDED (self, tID, self.OnItemExpanded) @@ -45,20 +69,25 @@ class TestTreeCtrlPanel(wxPanel): 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_TREE_ITEM_ACTIVATED (self, tID, self.OnActivate) EVT_LEFT_DCLICK(self.tree, self.OnLeftDClick) EVT_RIGHT_DOWN(self.tree, self.OnRightClick) EVT_RIGHT_UP(self.tree, self.OnRightUp) + def OnRightClick(self, event): pt = event.GetPosition(); - item = self.tree.HitTest(pt) - self.log.WriteText("OnRightClick: %s\n" % self.tree.GetItemText(item)) + item, flags = self.tree.HitTest(pt) + self.log.WriteText("OnRightClick: %s, %s\n" % (self.tree.GetItemText(item), + type(item))) self.tree.SelectItem(item) + + def OnRightUp(self, event): pt = event.GetPosition(); - item = self.tree.HitTest(pt) + item, flags = self.tree.HitTest(pt) self.log.WriteText("OnRightUp: %s (manually starting label edit)\n" % self.tree.GetItemText(item)) self.tree.EditLabel(item) @@ -83,11 +112,13 @@ class TestTreeCtrlPanel(wxPanel): return - def OnLeftDClick(self, event): pt = event.GetPosition(); - item = self.tree.HitTest(pt) + item, flags = self.tree.HitTest(pt) self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item)) + parent = self.tree.GetItemParent(item) + self.tree.SortChildren(parent) + event.Skip() def OnSize(self, event): @@ -106,8 +137,16 @@ class TestTreeCtrlPanel(wxPanel): def OnSelChanged(self, event): self.item = event.GetItem() self.log.WriteText("OnSelChanged: %s\n" % self.tree.GetItemText(self.item)) - self.log.WriteText("BoundingRect: %s\n" % - self.tree.GetBoundingRect(self.item, true)) + if wxPlatform == '__WXMSW__': + self.log.WriteText("BoundingRect: %s\n" % + self.tree.GetBoundingRect(self.item, true)) + #items = self.tree.GetSelections() + #print map(self.tree.GetItemText, items) + event.Skip() + + + def OnActivate(self, evt): + self.log.WriteText("OnActivate: %s\n" % self.tree.GetItemText(self.item)) #--------------------------------------------------------------------------- @@ -130,11 +169,6 @@ def runTest(frame, nb, log): - - - - - overview = """\ A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles. diff --git a/utils/wxPython/demo/wxVTKRenderWindow.py b/wxPython/demo/wxVTKRenderWindow.py similarity index 100% rename from utils/wxPython/demo/wxVTKRenderWindow.py rename to wxPython/demo/wxVTKRenderWindow.py diff --git a/utils/wxPython/demo/wxValidator.py b/wxPython/demo/wxValidator.py similarity index 100% rename from utils/wxPython/demo/wxValidator.py rename to wxPython/demo/wxValidator.py diff --git a/utils/wxPython/distrib/.cvsignore b/wxPython/distrib/.cvsignore similarity index 76% rename from utils/wxPython/distrib/.cvsignore rename to wxPython/distrib/.cvsignore index ac95d78017..3f2a47b337 100644 --- a/utils/wxPython/distrib/.cvsignore +++ b/wxPython/distrib/.cvsignore @@ -3,5 +3,4 @@ *.zip build.pyc filelist -wxPython.spec wxp2.wse diff --git a/wxPython/distrib/.rpmrc b/wxPython/distrib/.rpmrc new file mode 100644 index 0000000000..46a92a2043 --- /dev/null +++ b/wxPython/distrib/.rpmrc @@ -0,0 +1,5 @@ +sourcedir: . +builddir: . +rpmdir: . +srcrpmdir: . + diff --git a/wxPython/distrib/README.dbg.txt b/wxPython/distrib/README.dbg.txt new file mode 100644 index 0000000000..ba829d4443 --- /dev/null +++ b/wxPython/distrib/README.dbg.txt @@ -0,0 +1,30 @@ +This zip file contains versions of the wxWindows and wxPython binaries +that have been compiled with __WXDEBUG__ defined. This adds code to +wxWindows that is a bit more agressive about checking parameter +values, return values, and etc. When the debugging library senses +something is wrong it will popup a message dialog telling you so. +Unfortunately the message is specific to the C++ code but it might +give you a hint about what went wrong and how to fix it. + +Another debugging feature is when the wxPython program exits, it will +print to stdout information about any wxWindows C++ objects that +havn't been properly cleaned up. + +This archive contains a new wxWindows DLL named wx[version]d.dll and a +debugging version of the core wxPython module, wxc_d.pyd. These +should be put into your wxPython package directory. Also included are +the debuging version of Python, python_d.exe and python[VER]_d.dll +which can be put wherever you like. + +In order to run the debugging version of wxPython sumply run you +program with python_d.exe instead of python.exe. This lets the +debugging version sit side by side with the production version, with +no need for swapping this around. You will also need _d versions of +any other extension modules you are using. If you need _d's for any +of the other standard Python extensions you can get them here, for 2.0 +at least: + +http://www.pythonlabs.com/products/python2.0/downloads/BeOpen-Python-2.0-Debug.zip + + +Robin diff --git a/utils/wxPython/distrib/autobuild.py b/wxPython/distrib/autobuild.py old mode 100644 new mode 100755 similarity index 52% rename from utils/wxPython/distrib/autobuild.py rename to wxPython/distrib/autobuild.py index 7b0769eba4..edeade7f9a --- a/utils/wxPython/distrib/autobuild.py +++ b/wxPython/distrib/autobuild.py @@ -3,13 +3,18 @@ import sys, os, string, time from ftplib import FTP +cwd = os.getcwd() -logfile = 'e:\\temp\\autobuild.log' +logfile = 'c:\\temp\\autobuild.log' WXDIR = os.environ['WXWIN'] -dllVer = '21_14' -wxpVer = '2.1.14' +dllVer = '22_1' +wxpVer = '2.2.1' dateSt = time.strftime("%Y%m%d", time.localtime(time.time())) +base = os.path.split(sys.argv[0])[0] +base = os.path.join(base, '..') +WXPYDIR = os.path.abspath(base) + #---------------------------------------------------------------------- def do(cmd): @@ -60,94 +65,77 @@ def main(): logSeparator("Cleanup") os.chdir(WXDIR + '/src/msw') do('make cleandll FINAL=1') - os.chdir(WXDIR + '/utils/ogl/src') - do('wxm clean FINAL=1') - os.chdir(WXDIR + '/utils/glcanvas/win') - do('wxm clean FINAL=1') logSeparator("Building Documentation...") os.chdir(WXDIR + '/src/msw') do('make touchmanual htmlhelp') - validateFile(WXDIR + '/docs/html/wx/wx.chm') + validateFile(WXDIR + '/docs/htmlhelp/wx.chm') - logSeparator("Building wxWindows and libraries...") + logSeparator("Building wxWindows and other libraries...") os.chdir(WXDIR + '/src/msw') do('make dll pch FINAL=1') validateFile(WXDIR + '/lib/wx'+dllVer+'.dll') - os.chdir(WXDIR + '/utils/ogl/src') - do('wxm FINAL=1') - os.chdir(WXDIR + '/utils/glcanvas/win') - do('wxm FINAL=1') - validateFile(WXDIR + '/lib/ogl.lib') - validateFile(WXDIR + '/lib/glcanvas.lib') + logSeparator("Cleaning wxPython build directory...") - os.chdir(WXDIR + '/utils/wxPython') - do("del /sxy *.*") - - logSeparator("Copying wxPython workspace to build directory...") - do("copy /s %s %s" % ('e:\\projects\\wxPython\*.*', WXDIR+'\\utils\\wxPython')) - os.chdir(WXDIR + '/utils/wxPython') + os.chdir(WXPYDIR) + do('buildall.bat -c') + os.rename('build.local', 'build.local.save') f = open("build.local", "w") f.write(""" -TARGETDIR = 'e:\\projects\\wx\\utils\\wxPython' -WXPSRCDIR = 'e:\\projects\\wx\\utils\\wxPython\\src' CRTFLAG='/MD' FINAL=1 """) f.close() - logSeparator("Cleaning wxPython...") - os.chdir(WXDIR+'\\utils\\wxPython') - do("buildall -cu") - do("ll") - - logSeparator("Building core wxPython...") - os.chdir(WXDIR+'\\utils\\wxPython\\src') - do("build -bi") - validateFile(WXDIR+'\\utils\\wxPython\\wxc.pyd') - + os.chdir(WXPYDIR + '\\src') + do("build -b") + validateFile(WXPYDIR+'\\wxPython\\wxc.pyd') logSeparator("Building wxPython addon modules...") - os.chdir(WXDIR+'\\utils\\wxPython\\modules') - do("buildall -bi") - validateFile(WXDIR+'\\utils\\wxPython\\utilsc.pyd') - validateFile(WXDIR+'\\utils\\wxPython\\htmlc.pyd') - validateFile(WXDIR+'\\utils\\wxPython\\glcanvasc.pyd') - validateFile(WXDIR+'\\utils\\wxPython\\oglc.pyd') + os.chdir(WXPYDIR+'\\contrib') + do("buildall -b") + validateFile(WXPYDIR+'\\wxPython\\glcanvasc.pyd') + validateFile(WXPYDIR+'\\wxPython\\oglc.pyd') + validateFile(WXPYDIR+'\\wxPython\\stc_c.pyd') + + + os.chdir(WXPYDIR) + os.unlink('build.local') + os.rename('build.local.save', 'build.local') logSeparator("Building installer executable...") - os.chdir(WXDIR+'\\utils\\wxPython\\distrib') + os.chdir(WXPYDIR+'\\distrib') do("autoit2 wise.aut") - srcName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-'+wxpVer+'.EXE' - destName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-'+wxpVer+'-'+dateSt+'.EXE' + srcName = WXPYDIR+'\\distrib\\wxPython-'+wxpVer+'.EXE' + destName = WXPYDIR+'\\distrib\\wxPython-'+wxpVer+'-'+dateSt+'.EXE' validateFile(srcName) try: time.sleep(5) os.rename(srcName, destName) validateFile(destName) except: - pass + logSeparator("****** UNABLE TO RENAME FILE ******") logSeparator("Building source and docs zip files...") - os.chdir(WXDIR+'\\utils') - do("wxPython\\distrib\\zipit.bat %s" % wxpVer) - srcZName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-src-'+wxpVer+'.zip' - destZName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-src-'+wxpVer+'-'+dateSt+'.zip' + os.chdir(WXPYDIR) + do("distrib\\zipit.bat %s" % wxpVer) + srcZName = WXPYDIR+'\\distrib\\wxPython-src-'+wxpVer+'.zip' + destZName = WXPYDIR+'\\distrib\\wxPython-src-'+wxpVer+'-'+dateSt+'.zip' validateFile(srcZName) try: os.rename(srcZName, destZName) except: pass - srcDName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-docs-'+wxpVer+'.zip' - destDName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-docs-'+wxpVer+'-'+dateSt+'.zip' + srcDName = WXPYDIR+'\\distrib\\wxPython-docs-'+wxpVer+'.zip' + destDName = WXPYDIR+'\\distrib\\wxPython-docs-'+wxpVer+'-'+dateSt+'.zip' validateFile(srcDName) try: os.rename(srcDName, destDName) @@ -155,15 +143,14 @@ FINAL=1 pass + # #*#*#*#*#* Comment this out to allow upload... return logSeparator("Uploading to website...") - do('python d:\util32\sendwxp.py %s' % destName) - do('python d:\util32\sendwxp.py %s' % destZName) - do('python d:\util32\sendwxp.py %s' % destDName) - os.unlink(destName) - os.unlink(destZName) + do('python c:\\utils\\sendwxp.py %s' % destName) + #do('python c:\\utils\\sendwxp.py %s' % destZName) + do('python c:\\utils\\sendwxp.py %s' % destDName) logSeparator("Finished!!!") diff --git a/utils/wxPython/distrib/build.py b/wxPython/distrib/build.py similarity index 88% rename from utils/wxPython/distrib/build.py rename to wxPython/distrib/build.py index 7d8a913511..994c154b74 100755 --- a/utils/wxPython/distrib/build.py +++ b/wxPython/distrib/build.py @@ -92,6 +92,7 @@ Configuration Options OTHERTARGETS Other targets to be placed on the default rule line OTHERINSTALLTARGETS Other targets to be placed on the install rule line + OTHERDEFS Text to place near the begining of the Makefile 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 @@ -119,7 +120,10 @@ 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.1.14' +major_version = '2.2' +build_version = '2' + +__version__ = major_version + '.' + build_version #---------------------------------------------------------------------------- @@ -218,7 +222,12 @@ class BuildConfig: #------------------------------------------------------------ def setDefaults(self): + base = os.path.split(sys.argv[0])[0] + base = os.path.join(base, '..') + self.WXPYDIR = os.path.abspath(base) self.VERSION = __version__ + self.MAJVER = major_version + self.BLDVER = build_version self.MODULE = '' self.SWIGFILES = [] self.SWIGFLAGS = '-c++ -shadow -python -keyword -dnone -I$(WXPSRCDIR)' @@ -233,7 +242,7 @@ class BuildConfig: self.OTHERINSTALLTARGETS = '' self.OTHERUNINSTALLTARGETS = '' self.OTHERRULES = '' - self.DEFAULTRULE = 'default: $(GENCODEDIR) $(TARGET)' + self.DEFAULTRULE = 'default: $(GENCODEDIR) $(TARGET) $(BUILDDIR)/$(TARGET) bldpycfiles' self.PYVERSION = sys.version[:3] self.PYPREFIX = sys.prefix self.EXECPREFIX = sys.exec_prefix @@ -242,14 +251,16 @@ class BuildConfig: self.WXP_USE_THREAD = '1' self.WXUSINGDLL = '1' self.OTHERDEP = '' - self.WXPSRCDIR = '$(WXDIR)/utils/wxPython/src' + self.WXPSRCDIR = '$(WXPYDIR)/src' self.SWIGDEPS = '' self.OTHERDEPS = '' + self.OTHERDEFS = '' if sys.platform == 'win32': self.MAKE = 'nmake' - self.PYTHONLIB = '$(PYPREFIX)\\libs\\python15.lib' + compactver = string.join(string.split(self.PYVERSION, '.'), '') + self.PYTHONLIB = '$(PYPREFIX)\\libs\\python%s.lib' % compactver self.TARGETDIR = '$(PYPREFIX)\\wxPython' self.LIBS = '$(PYTHONLIB) $(WXPSRCDIR)\wxc.lib' self.GENCODEDIR = 'msw' @@ -275,15 +286,14 @@ class BuildConfig: self.TARGET = '$(MODULE)module$(SO)' self.OBJEXT = '.o' self.HELPERLIB = 'wxPyHelpers' - self.HELPERLIBDIR = '/usr/local/lib' + self.HELPERLIBDIR = '$(EXECPREFIX)/lib' self.CFLAGS = '-DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD) -I. '\ '`$(WXCONFIG) --cflags` -I$(PYINCLUDE) -I$(EXECINCLUDE) '\ '-I$(WXPSRCDIR)' self.LFLAGS = '-L$(WXPSRCDIR) `$(WXCONFIG) --libs`' - self.LIBS = '-l$(HELPERLIB)' self.RMCMD = '-rm -f ' self.WXCONFIG = 'wx-config' - + self.USE_SONAME = '1' # **** What to do when I start supporting Motif, etc.??? self.GENCODEDIR = 'gtk' @@ -363,8 +373,10 @@ class BuildConfig: for name in self.SWIGFILES: rootname = os.path.splitext(name)[0] text = '$(GENCODEDIR)/%s.cpp $(GENCODEDIR)/%s.py : %s.i %s\n' \ - '$(TARGETDIR)\\%s.py : $(GENCODEDIR)\\%s.py\n' % \ - (rootname, rootname, rootname, self.SWIGDEPS, rootname, rootname) + '$(TARGETDIR)\\%s.py : $(GENCODEDIR)\\%s.py\n' \ + '$(BUILDDIR)\\%s.py : $(GENCODEDIR)\\%s.py\n' % \ + (rootname, rootname, rootname, self.SWIGDEPS, + rootname, rootname, rootname, rootname) depends = depends + text if self.OTHERDEPS: text = '%s%s : %s\n' % \ @@ -386,14 +398,18 @@ class BuildConfig: # and the list of .py files pymodules = "" + bldpymodules = "" for name in self.SWIGFILES: pymodules = pymodules + '$(TARGETDIR)\\%s.py ' % os.path.splitext(name)[0] + bldpymodules = bldpymodules + '$(BUILDDIR)\\%s.py ' % os.path.splitext(name)[0] for name in self.PYFILES: pymodules = pymodules + '$(TARGETDIR)\\%s.py ' % os.path.splitext(name)[0] + bldpymodules = bldpymodules + '$(BUILDDIR)\\%s.py ' % os.path.splitext(name)[0] self.PYMODULES = splitlines(swapslash(pymodules)) + self.BLDPYMODULES = splitlines(swapslash(bldpymodules)) - # now make a list of the python files that would need uninstalled + # now make a list of the python files that would need cleaned up pycleanup = "" for name in self.SWIGFILES: pycleanup = pycleanup + self.makeCleanupList(name) @@ -402,6 +418,15 @@ class BuildConfig: self.PYCLEANUP = swapslash(pycleanup) + # now make a list of the python files that would need uninstalled + pyUninstall = "" + for name in self.SWIGFILES: + pyUninstall = pyUninstall + self.makeUninstallList(name) + for name in self.PYFILES: + pyUninstall = pyUninstall + self.makeUninstallList(name) + self.PYUNINSTALL = swapslash(pyUninstall) + + # finally, build the makefile if sys.platform == 'win32': if self.RESFILE: @@ -420,7 +445,7 @@ class BuildConfig: #------------------------------------------------------------ - def makeCleanupList(self, name): + def makeUninstallList(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]) @@ -428,6 +453,15 @@ class BuildConfig: return st + #------------------------------------------------------------ + def makeCleanupList(self, name): + st = "" + st = st + '\t%s$(BUILDDIR)\\%s.py\n' % (self.RMCMD, os.path.splitext(name)[0]) + st = st + '\t%s$(BUILDDIR)\\%s.pyc\n' % (self.RMCMD, os.path.splitext(name)[0]) + st = st + '\t%s$(BUILDDIR)\\%s.pyo\n' % (self.RMCMD, os.path.splitext(name)[0]) + return st + + #------------------------------------------------------------ def readConfigFiles(self, args): return self.processFile(self.bldCfg, 1) and \ @@ -490,6 +524,8 @@ win32Template = ''' WXDIR = %(WXDIR)s VERSION = %(VERSION)s +MAJVER = %(MAJVER)s +BLDVER = %(BLDVER)s MODULE = %(MODULE)s SWIGFLAGS = %(SWIGFLAGS)s %(SWIGTOOLKITFLAG)s %(OTHERSWIGFLAGS)s CFLAGS = %(CFLAGS)s @@ -504,12 +540,15 @@ WXUSINGDLL = %(WXUSINGDLL)s GENCODEDIR = %(GENCODEDIR)s RESFILE = %(RESFILE)s WXPSRCDIR = %(WXPSRCDIR)s +%(OTHERDEFS)s - +WXPYDIR = %(WXPYDIR)s +BUILDDIR = $(WXPYDIR)\\wxPython TARGETDIR = %(TARGETDIR)s OBJECTS = %(OBJECTS)s PYMODULES = %(PYMODULES)s +BLDPYMODULES = %(BLDPYMODULES)s TARGET = %(TARGET)s @@ -546,7 +585,7 @@ CRTFLAG=%(CRTFLAG)s -install: $(TARGETDIR) $(TARGETDIR)\\$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s +install: default $(TARGETDIR) $(TARGETDIR)\\$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s clean: -erase *.obj @@ -560,11 +599,13 @@ clean: -erase $(MODULE).lib -erase $(MODULE).ilk -erase $(TARGET) + -erase $(BUILDDIR)\$(TARGET) +%(PYCLEANUP)s uninstall: %(OTHERUNINSTALLTARGETS)s -erase $(TARGETDIR)\\$(TARGET) -%(PYCLEANUP)s +%(PYUNINSTALL)s #---------------------------------------------------------------------- @@ -601,6 +642,13 @@ $(CPPFLAGS) /c $< {}.py{$(TARGETDIR)}.py: copy $< $@ + +{$(GENCODEDIR)}.py{$(BUILDDIR)}.py: + copy $< $@ + +{}.py{$(BUILDDIR)}.py: + copy $< $@ + #---------------------------------------------------------------------- $(TARGET) : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(RESFILE) @@ -618,11 +666,16 @@ $(LIBS) $(TARGETDIR)\\$(TARGET) : $(TARGET) copy $(TARGET) $@ +$(BUILDDIR)\\$(TARGET) : $(TARGET) + copy $(TARGET) $@ + pycfiles : $(PYMODULES) $(EXECPREFIX)\\python $(PYPREFIX)\\Lib\\compileall.py -l $(TARGETDIR) $(EXECPREFIX)\\python -O $(PYPREFIX)\Lib\\compileall.py -l $(TARGETDIR) +bldpycfiles : $(BLDPYMODULES) + $(TARGETDIR) : mkdir $(TARGETDIR) @@ -641,7 +694,8 @@ showflags: @echo $(CPPFLAGS) @echo LFLAGS: @echo $(LFLAGS) - + @echo BUILDDIR: + @echo $(BUILDDIR) %(OTHERRULES)s @@ -657,15 +711,15 @@ unixTemplate = ''' # lost if the generator is run again. You have been warned. #---------------------------------------------------------------------- - - WXDIR = %(WXDIR)s VERSION = %(VERSION)s +MAJVER = %(MAJVER)s +BLDVER = %(BLDVER)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 @@ -681,7 +735,11 @@ WXPSRCDIR = %(WXPSRCDIR)s HELPERLIB = %(HELPERLIB)s HELPERLIBDIR = %(HELPERLIBDIR)s WXCONFIG=%(WXCONFIG)s + +WXPYDIR = %(WXPYDIR)s +BUILDDIR = $(WXPYDIR)/wxPython TARGETDIR = %(TARGETDIR)s +%(OTHERDEFS)s CCC = %(CCC)s @@ -694,6 +752,7 @@ CCSHARED = %(CCSHARED)s OBJECTS = %(OBJECTS)s PYMODULES = %(PYMODULES)s +BLDPYMODULES = %(BLDPYMODULES)s TARGET = %(TARGET)s @@ -701,19 +760,28 @@ ifeq ($(WXP_USE_THREAD), 1) THREAD=-DWXP_USE_THREAD endif +USE_SONAME = %(USE_SONAME)s +ifeq ($(USE_SONAME), 1) +LIBS = -l$(HELPERLIB) %(OTHERLIBS)s +else +LIBS = $(WXPSRCDIR)/lib$(HELPERLIB)$(SO) %(OTHERLIBS)s +endif + #---------------------------------------------------------------------- %(DEFAULTRULE)s %(OTHERTARGETS)s -install: $(TARGETDIR) $(TARGETDIR)/$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s +install: default $(TARGETDIR) $(TARGETDIR)/$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s clean: - -rm -f *.o *$(SO) *~ + -rm -f *.o *$(SO) *$(SO).* *~ -rm -f $(TARGET) + -rm -f $(BUILDDIR)/$(TARGET) +%(PYCLEANUP)s uninstall: %(OTHERUNINSTALLTARGETS)s -rm -f $(TARGETDIR)/$(TARGET) -%(PYCLEANUP)s +%(PYUNINSTALL)s #---------------------------------------------------------------------- @@ -743,9 +811,19 @@ endif $(TARGETDIR)/%% : %% cp -f $< $@ +$(TARGETDIR)/$(TARGET) : $(TARGET) + cp -f $< $@ + strip $@ + $(TARGETDIR)/%% : $(GENCODEDIR)/%% cp -f $< $@ +$(BUILDDIR)/%% : %% + cp -f $< $@ + +$(BUILDDIR)/%% : $(GENCODEDIR)/%% + cp -f $< $@ + #---------------------------------------------------------------------- %(DEPENDS)s @@ -756,11 +834,12 @@ $(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) +bldpycfiles : $(BLDPYMODULES) + $(TARGETDIR) : mkdir -p $(TARGETDIR) @@ -774,7 +853,6 @@ $(GENCODEDIR): %(OTHERRULES)s - ''' @@ -785,11 +863,3 @@ if __name__ == '__main__': sys.exit(err) #---------------------------------------------------------------------------- - - - - - - - - diff --git a/wxPython/distrib/makedbg.bat b/wxPython/distrib/makedbg.bat new file mode 100755 index 0000000000..f738789ffa --- /dev/null +++ b/wxPython/distrib/makedbg.bat @@ -0,0 +1,33 @@ +@echo off +rem Builds a zip containing debugging versions of wxWindows and wxPython +rem that could be unziped over a wxPython installation. + +setlocal + +iff "%1" == "15" then + set PCBUILD=c:\projects\Python-1.5.2\PCBuild +elseiff "%1" == "20" then + set PCBUILD=c:\projects\Python-2.0\PCBuild +else + echo Specivy Python version!!! + goto end +endiff + +iff "%2" == "" then + echo Specify wxPython version!!! + goto end +endiff + + +mkdir wxPython-dbg +copy README.dbg.txt wxPython-dbg +copy %WXWIN%\lib\wx*d.dll wxPython-dbg +copy %WXWIN%\wxPython\wxPython\*_d.pyd wxPython-dbg +copy %PCBUILD%\python_d.exe wxPython-dbg +copy %PCBUILD%\python%1_d.dll wxPython-dbg + +zip -r wxPython-dbg-%2-Py%1.zip wxPython-dbg + +del /sx wxPython-dbg + +:end \ No newline at end of file diff --git a/wxPython/distrib/makedemo b/wxPython/distrib/makedemo new file mode 100755 index 0000000000..20b3163651 --- /dev/null +++ b/wxPython/distrib/makedemo @@ -0,0 +1,36 @@ +#!/bin/bash +#---------------------------------------------------------------------- + +if [ -z $1 ]; then + echo "Please specify a version number on the command line." + exit 1 +fi + +if [ ! -d wxPython ]; then + echo "Please run this script from the root wxPython directory." + exit 1 +fi + +mkdir _distrib_tgz +mkdir _distrib_tgz/wxPython-$1 + +cp -R demo _distrib_tgz/wxPython-$1 + +# do some cleanup +rm -rf `find _distrib_tgz/wxPython-$1 -name CVS` +rm -f `find _distrib_tgz/wxPython-$1 -name "*.pyc"` +rm -f `find _distrib_tgz/wxPython-$1 -name .cvsignore` +rm -f _distrib_tgz/wxPython-$1/demo/core +rm -rf _distrib_tgz/wxPython-$1/demo/wxPython + +cd _distrib_tgz + +tar cvf ../dist/wxPython-demo-$1.tar wxPython-$1 +gzip ../dist/wxPython-demo-$1.tar + +cd .. +rm -r _distrib_tgz + + + + diff --git a/wxPython/distrib/makedev.bat b/wxPython/distrib/makedev.bat new file mode 100755 index 0000000000..15735fc6e0 --- /dev/null +++ b/wxPython/distrib/makedev.bat @@ -0,0 +1,41 @@ +@echo off +rem Builds a zip containing stuff needed to link with the wxWindows DLL +rem shipped with wxPython. This allows other developers to create apps +rem or extensions that can share the same DLL. + +mkdir wxWin +mkdir wxWin\lib +copy %WXWIN%\lib\*.lib wxWin\lib +del wxWin\lib\*_d.lib + +mkdir wxWin\src +copy %WXWIN%\src\makevc.env wxWin\src +copy %WXWIN%\src\*.vc wxWin\src + +mkdir wxWin\src\msw +mkdir wxWin\src\msw\ReleaseDLL +copy %WXWIN%\src\msw\*.pch wxWin\src\msw +del wxWin\src\msw\*_d.pch +copy %WXWIN%\src\msw\ReleaseDLL\dummy*.obj wxWin\src\msw\ReleaseDLL + +mkdir wxWin\include +mkdir wxWin\include\wx +mkdir wxWin\include\wx\msw +mkdir wxWin\include\wx\generic +mkdir wxWin\include\wx\html +mkdir wxWin\include\wx\protocol + +copy %WXWIN%\include\wx\*.* wxWin\include\wx +copy /s %WXWIN%\include\wx\msw\* wxWin\include\wx\msw +copy /s %WXWIN%\include\wx\generic\* wxWin\include\wx\generic +copy /s %WXWIN%\include\wx\html\* wxWin\include\wx\html +copy /s %WXWIN%\include\wx\protocol\* wxWin\include\wx\protocol + + +zip -r wxPython-dev-%1.zip wxWin + + +del /sx wxWin + + + diff --git a/wxPython/distrib/makerpm b/wxPython/distrib/makerpm new file mode 100755 index 0000000000..8134d14553 --- /dev/null +++ b/wxPython/distrib/makerpm @@ -0,0 +1,47 @@ +#!/bin/bash + +if [ -z $1 ]; then + echo "Please specify a version number on the command line." + exit 1 +fi + +if [ ! -f wxPython.spec ]; then + echo "Please run this script from the directory containing the wxPython.spec file." + exit 1 +fi + + + +#strip /usr/lib/python1.5/site-packages/wxPython/*.so +#strip /usr/lib/libwxPyHelpers.so +# +#cat wxPython.spec.in | sed s/__VERSION__/$1/g > wxPython.spec +# +#mkdir /usr/doc/wxPython-$1 +#cp ../README.txt /usr/doc/wxPython-$1 +#cp ../../../docs/preamble.txt /usr/doc/wxPython-$1 +#cp ../../../docs/licence.txt /usr/doc/wxPython-$1 +#cp ../../../docs/licendoc.txt /usr/doc/wxPython-$1 +#cp ../../../docs/lgpl.txt /usr/doc/wxPython-$1 +#cp ../../../docs/gpl.txt /usr/doc/wxPython-$1 +# +#rpm -bb wxPython.spec +# +#mv /usr/src/redhat/RPMS/*/wxPython*.rpm . +#chown rd:users wxPython*.rpm +# +#rm -r /usr/doc/wxPython-$1 + +cp -f wxPython-$1.tar.gz /usr/src/redhat/SOURCES +rpm -ba wxPython.spec + +mv /usr/src/redhat/RPMS/*/wxPython*.rpm . +mv /usr/src/redhat/SRPMS/wxPython*.rpm . +chown rd:users wxPython*.rpm +rm -rf /usr/lib/python1.5/site-packages/wxPython/ +rm -f /usr/lib/libwxPyHelpers* +rm -rf /usr/doc/wxPython-$1 + + + + diff --git a/wxPython/distrib/maketgz b/wxPython/distrib/maketgz new file mode 100755 index 0000000000..bb34859cd8 --- /dev/null +++ b/wxPython/distrib/maketgz @@ -0,0 +1,62 @@ +#!/bin/bash +#---------------------------------------------------------------------- +# Make a source distribution as a tar.gz file. This script should be +# run from the directory that holds the wxPython dir (../..) and be +# given a version number as an parameter. The best way to do this is +# run "make dist" in the wxPython/src/ directory. +#---------------------------------------------------------------------- + +if [ -z $1 ]; then + echo "Please specify a version number on the command line." + exit 1 +fi + +if [ ! -d wxPython ]; then + echo "Please run this script from the root wxPython directory." + exit 1 +fi + +mkdir _distrib_tgz +mkdir _distrib_tgz/wxPython-$1 + +# Copy license files +cp $WXWIN/docs/gpl.txt _distrib_tgz/wxPython-$1 +cp $WXWIN/docs/lgpl.txt _distrib_tgz/wxPython-$1 +cp $WXWIN/docs/licence.txt _distrib_tgz/wxPython-$1 +cp $WXWIN/docs/licendoc.txt _distrib_tgz/wxPython-$1 +cp $WXWIN/docs/preamble.txt _distrib_tgz/wxPython-$1 + +# Copy files from the live dirs +# first, get a list of files +for x in `cat distrib/wxPython.rsp`; do + ls $x >> _distrib_tgz/filelist +done + +# and make a tar file containing those files +tar cf _distrib_tgz/dist-temp.tar -T _distrib_tgz/filelist + +# now untar it in the right place +cd _distrib_tgz/wxPython-$1 +tar xf ../dist-temp.tar +cd .. + +# update a few things +rm wxPython-$1/src/gtk/helpers.cpp +touch `find wxPython-$1 -name "*.cpp"` +touch `find wxPython-$1 -name "*.py"` + +# Finally, make the finished tar file +tar cvf ../distrib/wxPython-$1.tar wxPython-$1 +gzip ../distrib/wxPython-$1.tar + +cd .. +rm -rf _distrib_tgz + + + + + + + + + diff --git a/utils/wxPython/distrib/makexferzip b/wxPython/distrib/makexferzip similarity index 100% rename from utils/wxPython/distrib/makexferzip rename to wxPython/distrib/makexferzip diff --git a/utils/wxPython/distrib/makexferzip.bat b/wxPython/distrib/makexferzip.bat similarity index 100% rename from utils/wxPython/distrib/makexferzip.bat rename to wxPython/distrib/makexferzip.bat diff --git a/utils/wxPython/distrib/wise.aut b/wxPython/distrib/wise.aut similarity index 75% rename from utils/wxPython/distrib/wise.aut rename to wxPython/distrib/wise.aut index 6abb399e38..8f97040c2d 100644 --- a/utils/wxPython/distrib/wise.aut +++ b/wxPython/distrib/wise.aut @@ -1,5 +1,5 @@ -run, e:\\Tools\\Wise\\WISE32.EXE wxPython.wse +run, c:\\Tools\\Wise\\WISE32.EXE wxPython.wse winwaitactive, wxPython.wse - Wise Installation System send, !ic sleep, 1000 diff --git a/wxPython/distrib/wxPython.WSM b/wxPython/distrib/wxPython.WSM new file mode 100644 index 0000000000000000000000000000000000000000..4d16063068b14dcb4bb5c0d1cd574e183216bcb5 GIT binary patch literal 33 lcmWF!_BE?9V_;xpn64$7Iwjkip;wiO0R$LB%T*FX8326C2EhOT literal 0 HcmV?d00001 diff --git a/utils/wxPython/distrib/wxPython.bmp b/wxPython/distrib/wxPython.bmp similarity index 100% rename from utils/wxPython/distrib/wxPython.bmp rename to wxPython/distrib/wxPython.bmp diff --git a/wxPython/distrib/wxPython.rsp b/wxPython/distrib/wxPython.rsp new file mode 100644 index 0000000000..bfc9cdf462 --- /dev/null +++ b/wxPython/distrib/wxPython.rsp @@ -0,0 +1,106 @@ +*.txt + +demo/*.py +demo/bitmaps/*.bmp +demo/bitmaps/*.ico +demo/bitmaps/*.gif +demo/bitmaps/*.png +demo/bitmaps/*.jpg +demo/README.txt +demo/*.xml +demo/data/*.png +demo/data/*.htm +demo/data/*.html +demo/data/*.bmp +demo/data/*.txt +demo/data/*.i +demo/data/*.h + +distrib/build.py +distrib/wxPython.spec + +wxPython/lib/*.py +wxPython/lib/*.txt +wxPython/lib/sizers/*.py +wxPython/lib/sizers/*.txt +wxPython/lib/editor/*.py +wxPython/lib/editor/*.txt + + +src/build.cfg +src/*.i +src/*.py +src/*.cpp +src/*.c +src/*.h +src/*.ico +src/*.def +src/*.rc + +src/msw/*.cpp +src/msw/*.h +src/msw/*.py + +src/gtk/*.cpp +src/gtk/*.h +src/gtk/*.py + +src/motif/*.cpp +src/motif/*.h +src/motif/*.py + + +contrib/glcanvas/build.cfg +contrib/glcanvas/*.i +contrib/glcanvas/*.py +contrib/glcanvas/*.cpp +contrib/glcanvas/*.c +contrib/glcanvas/*.h +contrib/glcanvas/*.def +contrib/glcanvas/*.rc +contrib/glcanvas/msw/*.cpp +contrib/glcanvas/msw/*.h +contrib/glcanvas/msw/*.py +contrib/glcanvas/gtk/*.cpp +contrib/glcanvas/gtk/*.h +contrib/glcanvas/gtk/*.py + +contrib/ogl/build.cfg +contrib/ogl/*.txt +contrib/ogl/*.i +contrib/ogl/*.py +contrib/ogl/*.cpp +contrib/ogl/*.c +contrib/ogl/*.h +contrib/ogl/*.def +contrib/ogl/*.rc +contrib/ogl/contrib/include/wx/ogl/*.h +contrib/ogl/contrib/src/ogl/*.cpp + +contrib/stc/build.cfg +contrib/stc/*.txt +contrib/stc/*.i +contrib/stc/*.py +contrib/stc/*.cpp +contrib/stc/*.c +contrib/stc/*.h +contrib/stc/*.def +contrib/stc/*.rc +contrib/stc/*.cpp +contrib/stc/*.h +contrib/stc/*.py +contrib/stc/contrib/include/wx/stc/*.h +contrib/stc/contrib/src/stc/*.h +contrib/stc/contrib/src/stc/*.cpp +contrib/stc/contrib/src/stc/*.txt +contrib/stc/contrib/src/stc/*.py +contrib/stc/contrib/src/stc/scintilla/include/*.h +contrib/stc/contrib/src/stc/scintilla/include/*.iface +contrib/stc/contrib/src/stc/scintilla/src/*.h +contrib/stc/contrib/src/stc/scintilla/src/*.cxx + + + + + + diff --git a/wxPython/distrib/wxPython.spec b/wxPython/distrib/wxPython.spec new file mode 100644 index 0000000000..1a897d0901 --- /dev/null +++ b/wxPython/distrib/wxPython.spec @@ -0,0 +1,101 @@ +%define pref /usr +%define ver 2.2.2 +%define rpmver 0 + +Summary: Cross platform GUI toolkit for use with the Python language. +Name: wxPython +Version: %{ver} +Release: %{rpmver} +Copyright: wxWindows License +Group: Development/Languages/Python +Source: wxPython-%{ver}.tar.gz +Packager: Robin Dunn +URL:http://alldunn.com/wxPython/index.html +Vendor: Total Control Software +Requires: python >= 1.5.2 +##BuildRoot: /tmp/wxPython-build +##Prefix: /usr/lib/python1.5/site-packages + +Prefix: %{pref} + +%description +wxPython is a GUI toolkit for Python that is a wrapper around the +wxWindows C++ GUI library. wxPython provides a large variety of +window types and controls, all imlemented with a native look and +feel (and runtime speed) on the platforms it is supported on. + + +%package gl +Summary: Cross platform GUI toolkit for use with the Python language, OpenGL addon. +Group: Development/Languages/Python +Requires: wxPython + +%description gl +OpenGL add on for wxPython. + +#---------------------------------------------------------------------- + +%prep + +%setup + +%build +NOSWIG=1 +export NOSWIG +cd src +python ../distrib/build.py -b WXPSRCDIR=$PWD USE_SONAME=1 +cd ../contrib/ogl +python ../../distrib/build.py -b WXPSRCDIR=../../src USE_SONAME=1 +cd ../stc +python ../../distrib/build.py -b WXPSRCDIR=../../src USE_SONAME=1 +if [ -z $NOGLCANVAS ]; then + cd ../glcanvas + python ../../distrib/build.py -b WXPSRCDIR=../../src USE_SONAME=1 +fi + +#---------------------------------------------------------------------- + +%install +NOSWIG=1 +export NOSWIG +cd src +python ../distrib/build.py -i +cd ../contrib/ogl +python ../../distrib/build.py -i +cd ../stc +python ../../distrib/build.py -i +if [ -z $NOGLCANVAS ]; then + cd ../glcanvas + python ../../distrib/build.py -i +fi + +#---------------------------------------------------------------------- + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +#---------------------------------------------------------------------- + +%files +%doc BUILD.txt CHANGES.txt README.txt gpl.txt lgpl.txt licence.txt licendoc.txt preamble.txt +%{pref}/lib/libwxPyHelpers* +%{pref}/lib/python1.5/site-packages/wxPython/*.py +%{pref}/lib/python1.5/site-packages/wxPython/*.py? +%{pref}/lib/python1.5/site-packages/wxPython/lib +%{pref}/lib/python1.5/site-packages/wxPython/demo +%{pref}/lib/python1.5/site-packages/wxPython/wxcmodule.so +%{pref}/lib/python1.5/site-packages/wxPython/oglcmodule.so +%{pref}/lib/python1.5/site-packages/wxPython/stc_cmodule.so + +%files gl +%{pref}/lib/python1.5/site-packages/wxPython/glcanvascmodule.so + + + + + + + diff --git a/utils/wxPython/distrib/wxPython.wse b/wxPython/distrib/wxPython.wse similarity index 93% rename from utils/wxPython/distrib/wxPython.wse rename to wxPython/distrib/wxPython.wse index a30d010828..e0f2b2ce80 100644 --- a/utils/wxPython/distrib/wxPython.wse +++ b/wxPython/distrib/wxPython.wse @@ -1,7 +1,7 @@ Document Type: WSE item: Global Version=6.01 - Title=wxPython 2.1 Installation + Title=wxPython 2.2 Installation Flags=10010111 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Japanese Font Name=MS Gothic @@ -17,7 +17,7 @@ item: Global Patch Flags=0000000000001001 Patch Threshold=85 Patch Memory=4000 - EXE Filename=wxPython-2.1.14.exe + EXE Filename=wxPython-2.2.5-Py21.exe FTP Cluster Size=20 Per-User Version ID=1 Dialogs Version=6 @@ -25,7 +25,7 @@ item: Global Variable Default1=C:\WINNT\System32 Variable Flags1=00001000 Variable Name2=_WISE_ - Variable Default2=E:\Tools\Wise + Variable Default2=C:\Tools\Wise Variable Flags2=00001000 Variable Name3=_ODBC16_ Variable Default3=C:\WINNT\System32 @@ -55,12 +55,12 @@ item: End Block end item: Set Variable Variable=APPTITLE - Value=wxPython 2.1 + Value=wxPython 2.2 Flags=10000000 end item: Set Variable Variable=GROUP - Value=wxPython 2.1 + Value=wxPython 2.2 Flags=10000000 end item: Set Variable @@ -72,36 +72,33 @@ item: Set Variable Value=wxPython Flags=10000000 end -item: Check Configuration - Flags=10111011 -end item: Remark - Text= 1.5 and 1.5.1 have a CurrentVersion key -end -item: Get Registry Key Value - Variable=PYTHONVER - Key=SOFTWARE\Python\PythonCore\CurrentVersion - Default=None - Flags=00000100 -end -item: If/While Statement - Variable=PYTHONVER - Value=None -end -item: Remark - Text= Just try 1.5 since 1.5.2b2 doesn't set CurrentVersion but uses 1.5 end item: Set Variable Variable=PYTHONVER - Value=1.5 + Value=2.1 end -item: End Block +item: Remark +end +item: Check Configuration + Flags=10111011 end item: Get Registry Key Value Variable=PYTHONDIR Key=SOFTWARE\Python\PythonCore\%PYTHONVER%\InstallPath Flags=00000100 end +remarked item: If/While Statement + Variable=PYTHONDIR + Value=None +end +remarked item: Get Registry Key Value + Variable=PYTHONDIR + Key=SOFTWARE\Python\PythonCore\%PYTHONVER%\InstallPath + Flags=00000010 +end +remarked item: End Block +end item: If/While Statement Variable=PYTHONDIR Value=None @@ -119,6 +116,8 @@ item: Set Variable Variable=MAINDIR Value=%PYTHONDIR% end +item: Remark +end item: Set Variable Variable=EXPLORER Value=1 @@ -191,7 +190,7 @@ end item: End Block end item: Display Graphic - Pathname=e:\Projects\wx\utils\wxPython\distrib\wxPython.BMP + Pathname=C:\PROJECTS\wx\wxPython\distrib\wxPython.bmp X Position=32784 Y Position=16 Flags=0000001010000000 @@ -805,160 +804,172 @@ end item: Remark end item: Install File - Source=d:\WINNT\System32\Msvcirt.dll + Source=c:\WINNT\System32\Msvcirt.dll Destination=%SYS%\Msvcirt.dll Flags=0000001010000011 end item: Install File - Source=d:\WINNT\System32\Msvcrt.dll + Source=c:\WINNT\System32\Msvcrt.dll Destination=%SYS%\Msvcrt.dll Flags=0000001010000011 end item: Install File - Source=e:\projects\wx\lib\wx21_14.dll - Destination=%SYS%\wx21_14.dll - Flags=0000001010010010 + Source=c:\projects\wx\lib\wx22_5.dll + Destination=%MAINDIR%\wxPython\wx22_5.dll + Flags=0000000010010010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\*.py + Source=c:\Projects\wx\wxPython\wxPython\*.py Destination=%MAINDIR%\wxPython Description=wxPython shadow class modules Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\*.pyd + Source=c:\Projects\wx\wxPython\wxPython\*.pyd Destination=%MAINDIR%\wxPython Description=wxPython extension modules Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\*.txt + Source=c:\Projects\wx\wxPython\wxPython\*.txt Destination=%MAINDIR%\wxPython Description=README file Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\lib\*.py + Source=c:\Projects\wx\wxPython\wxPython\lib\*.py Destination=%MAINDIR%\wxPython\lib Description=wxPython Standard Library Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\lib\sizers\*.py - Destination=%MAINDIR%\wxPython\lib\sizers - Description=wxPython Standard Library - Flags=0000000010000010 -end -item: Install File - Source=e:\Projects\wx\utils\wxPython\lib\editor\*.py + Source=c:\Projects\wx\wxPython\wxPython\lib\editor\*.py Destination=%MAINDIR%\wxPython\lib\editor Description=wxPython Standard Library Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\*.py + Source=c:\Projects\wx\wxPython\wxPython\lib\editor\*.txt + Destination=%MAINDIR%\wxPython\lib\editor + Description=wxPython Standard Library + Flags=0000000010000010 +end +item: Install File + Source=c:\Projects\wx\wxPython\demo\*.py Destination=%MAINDIR%\wxPython\demo Description=Demos Flags=0000000010000010 end item: Install File - Source=E:\Projects\wx\utils\wxPython\demo\README.txt + Source=c:\Projects\wx\wxPython\demo\README.txt Destination=%MAINDIR%\wxPython\demo\README.txt Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\*.xml + Source=c:\Projects\wx\wxPython\demo\*.xml Destination=%MAINDIR%\wxPython\demo Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.bmp + Source=c:\Projects\wx\wxPython\demo\bitmaps\*.bmp Destination=%MAINDIR%\wxPython\demo\bitmaps Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.gif + Source=c:\Projects\wx\wxPython\demo\bitmaps\*.gif Destination=%MAINDIR%\wxPython\demo\bitmaps Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.jpg + Source=c:\Projects\wx\wxPython\demo\bitmaps\*.jpg Destination=%MAINDIR%\wxPython\demo\bitmaps Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.png + Source=c:\Projects\wx\wxPython\demo\bitmaps\*.png Destination=%MAINDIR%\wxPython\demo\bitmaps Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\bitmaps\*.ico + Source=c:\Projects\wx\wxPython\demo\bitmaps\*.ico Destination=%MAINDIR%\wxPython\demo\bitmaps Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\data\*.htm + Source=c:\Projects\wx\wxPython\demo\data\*.htm Destination=%MAINDIR%\wxPython\demo\data Description=Demos Flags=0000000010000010 end item: Install File - Source=e:\Projects\wx\utils\wxPython\demo\data\*.png + Source=c:\Projects\wx\wxPython\demo\data\*.html Destination=%MAINDIR%\wxPython\demo\data Description=Demos Flags=0000000010000010 end +item: Install File + Source=c:\Projects\wx\wxPython\demo\data\*.py + Destination=%MAINDIR%\wxPython\demo\data + Description=Demos + Flags=0000000010000010 +end +item: Install File + Source=c:\Projects\wx\wxPython\demo\data\*.png + Destination=%MAINDIR%\wxPython\demo\data + Description=Demos + Flags=0000000010000010 +end +item: Install File + Source=c:\Projects\wx\wxPython\demo\data\grid.i + Destination=%MAINDIR%\wxPython\demo\data\grid.i + Description=Demos + Flags=0000000010000010 +end +item: Install File + Source=c:\Projects\wx\wxPython\demo\data\stc.h + Destination=%MAINDIR%\wxPython\demo\data\stc.h + Description=Demos + Flags=0000000010000010 +end +item: Install File + Source=c:\Projects\wx\wxPython\demo\data\tips.txt + Destination=%MAINDIR%\wxPython\demo\data\tips.txt + Description=Demos + Flags=0000000010000010 +end item: Remark end item: Install File - Source=E:\PROJECTS\wx\docs\html\wx\wx.chm + Source=C:\PROJECTS\wx\wxPython\*.txt + Destination=%MAINDIR%\wxPython\docs\ + Flags=0000000010000010 +end +item: Install File + Source=C:\PROJECTS\wx\wxPython\licence\*.txt + Destination=%MAINDIR%\wxPython\docs\licence\ + Flags=0000000010000010 +end +item: Remark +end +item: Install File + Source=C:\PROJECTS\wx\docs\htmlhelp\wx.chm Destination=%MAINDIR%\wxPython\docs\wx.chm Description=wxPython documentation Flags=0000000010000010 end item: Install File - Source=E:\PROJECTS\wx\docs\html\ogl\ogl.chm + Source=c:\PROJECTS\wx\docs\htmlhelp\ogl.chm Destination=%MAINDIR%\wxPython\docs\ogl.chm Description=wxPython documentation Flags=0000000010000010 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 end item: Remark @@ -1133,21 +1144,21 @@ item: Create Shortcut Flags=00000001 end item: Create Shortcut - Source=%MAINDIR%\wxPython\docs\licence.txt + Source=%MAINDIR%\wxPython\docs\licence\licence.txt Destination=%CGROUPDIR%\%CGROUP_SAVE%\License.lnk Icon Number=0 Key Type=1536 Flags=00000001 end item: Create Shortcut - Source=%MAINDIR%\wxPython\README.txt + Source=%MAINDIR%\wxPython\docs\README.txt Destination=%CGROUPDIR%\%CGROUP_SAVE%\ReadMe.lnk Icon Number=0 Key Type=1536 Flags=00000001 end item: Create Shortcut - Source=%MAINDIR%\wxPython\CHANGES.txt + Source=%MAINDIR%\wxPython\docs\CHANGES.txt Destination=%CGROUPDIR%\%CGROUP_SAVE%\Changes.lnk Icon Number=0 Key Type=1536 @@ -1182,7 +1193,7 @@ end item: Self-Register OCXs/DLLs Description=Updating System Configuration, Please Wait... end -item: Edit Registry +remarked item: Edit Registry Total Keys=1 Key=SOFTWARE\Python\PythonCore\%PYTHONVER%\PythonPath\wxPython New Value=%MAINDIR% @@ -1327,7 +1338,7 @@ item: Custom Dialog Set end item: Push Button Rectangle=90 68 153 82 - Alternate=0%MAINDIR%\wxPython\README.txt + Alternate=0%MAINDIR%\wxPython\docs\README.txt Action=6 Enabled Color=00000000000000001111111111111111 Create Flags=01010000000000010000000000000000 diff --git a/wxPython/distrib/zipit.bat b/wxPython/distrib/zipit.bat new file mode 100755 index 0000000000..1f00d5777a --- /dev/null +++ b/wxPython/distrib/zipit.bat @@ -0,0 +1,46 @@ +@echo off + +rem **** Make a directory to build up a distribution tree +md _distrib_zip +md _distrib_zip\wxPython-%1 + +REM rem **** Copy the license files +REM copy %WXWIN%\docs\gpl.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\lgpl.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\licence.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\licendoc.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\preamble.txt _distrib_zip\wxPython-%1 + +REM rem **** Make a zip fron the live files +REM zip -@ -r _distrib_zip\temp.zip < distrib\wxPython.rsp + +REM rem **** Unzip it in our build dir +REM cd _distrib_zip\wxPython-%1 +REM unzip ..\temp.zip + +REM rem **** zip up the build dir +REM cd .. +REM zip -r ..\distrib\wxPython-src-%1.zip wxPython-%1 + +cd _distrib_zip + +rem **** copy the docs into the tree +md wxPython-%1\docs +md wxPython-%1\docs\wx +md wxPython-%1\docs\ogl +copy %WXWIN%\docs\html\wx\*.gif wxPython-%1\docs\wx +copy %WXWIN%\docs\html\wx\*.htm wxPython-%1\docs\wx +copy wxPython-%1\docs\wx\wx.htm wxPython-%1\docs\wx\index.htm +copy %WXWIN%\docs\html\ogl\*.gif wxPython-%1\docs\ogl +copy %WXWIN%\docs\html\ogl\*.htm wxPython-%1\docs\ogl +copy wxPython-%1\docs\ogl\ogl.htm wxPython-%1\docs\ogl\index.htm + +rem **** zip up the docs +rem zip -r ..\distrib\wxPython-docs-%1.zip wxPython-%1\docs +tar cvf ..\distrib\wxPython-docs-%1.tar wxPython-%1 +gzip -9 ..\distrib\wxPython-docs-%1.tar + + +rem **** Cleanup +cd .. +del /sxzy _distrib_zip diff --git a/wxPython/my_distutils.py b/wxPython/my_distutils.py new file mode 100644 index 0000000000..dfe39e92a2 --- /dev/null +++ b/wxPython/my_distutils.py @@ -0,0 +1,239 @@ + +import sys, os, string + +from distutils.msvccompiler import MSVCCompiler + +from distutils.errors import \ + DistutilsExecError, DistutilsPlatformError, \ + CompileError, LibError, LinkError +from distutils.ccompiler import \ + CCompiler, gen_preprocess_options, gen_lib_options + +#---------------------------------------------------------------------- + +class MyMSVCCompiler(MSVCCompiler): + + ##------------------------------------------------------------ + ## Override the entire compile method just to add flags to the + ## RC command. There should be an easier way to do this from + ## distutils directly or in a derived class... + ##------------------------------------------------------------ + + def compile (self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=0, + extra_preargs=None, + extra_postargs=None): + + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) + (objects, skip_sources) = self._prep_compile (sources, output_dir) + + if extra_postargs is None: + extra_postargs = [] + + pp_opts = gen_preprocess_options (macros, include_dirs) + compile_opts = extra_preargs or [] + compile_opts.append ('/c') + if debug: + compile_opts.extend (self.compile_options_debug) + else: + compile_opts.extend (self.compile_options) + + for i in range (len (sources)): + src = sources[i] ; obj = objects[i] + ext = (os.path.splitext (src))[1] + + if skip_sources[src]: + self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + else: + self.mkpath (os.path.dirname (obj)) + + if ext in self._c_extensions: + input_opt = "/Tc" + os.path.abspath(src) + elif ext in self._cpp_extensions: + input_opt = "/Tp" + os.path.abspath(src) + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn ([self.rc] + pp_opts + ### RPD changed this line only + [output_opt] + [input_opt]) + except DistutilsExecError, msg: + raise CompileError, msg + continue + elif ext in self._mc_extensions: + + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + + h_dir = os.path.dirname (src) + rc_dir = os.path.dirname (obj) + try: + # first compile .MC to .RC and .H file + self.spawn ([self.mc] + + ['-h', h_dir, '-r', rc_dir] + [src]) + base, _ = os.path.splitext (os.path.basename (src)) + rc_file = os.path.join (rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn ([self.rc] + + ["/fo" + obj] + [rc_file]) + + except DistutilsExecError, msg: + raise CompileError, msg + continue + else: + # how to handle this file? + raise CompileError ( + "Don't know how to compile %s to %s" % \ + (src, obj)) + + output_opt = "/Fo" + obj + try: + self.spawn ([self.cc] + compile_opts + pp_opts + + [input_opt, output_opt] + + extra_postargs) + except DistutilsExecError, msg: + raise CompileError, msg + + return objects + + # compile () + + + + + +#---------------------------------------------------------------------- +# Hack this module and class into the distutils... + +from distutils import ccompiler + +if hasattr(ccompiler, "default_compiler"): + ccompiler.default_compiler['nt'] = 'my_msvc' +elif hasattr(ccompiler, "_default_compilers"): + lst = list(ccompiler._default_compilers) + lst.remove( ('nt', 'msvc') ) + lst.append( ('nt', 'my_msvc') ) + ccompiler._default_compilers = tuple(lst) + + +ccompiler.compiler_class['my_msvc'] = ('my_distutils', + 'MyMSVCCompiler', + 'My MSVC derived class') + + +# make it look like it is part of the package... +import my_distutils +sys.modules['distutils.my_distutils'] = my_distutils + + +#---------------------------------------------------------------------- +# More hacking... Distutils in Python 2.1 changed the strip_dir flag +# passed to object_filenames to true, which causes problems for us since +# there are a few duplicate source/object names between some of the +# extensions in wxPython. This hack replaces the CCompiler._prep_compile +# method with this one. + +from distutils.dep_util import newer_pairwise + +def _prep_compile (self, sources, output_dir): + """Determine the list of object files corresponding to 'sources', + and figure out which ones really need to be recompiled. Return a + list of all object files and a dictionary telling which source + files can be skipped. + """ + # Get the list of expected output (object) files + objects = self.object_filenames (sources, + strip_dir=0, + output_dir=output_dir) + + if self.force: + skip_source = {} # rebuild everything + for source in sources: + skip_source[source] = 0 + else: + # Figure out which source files we have to recompile according + # to a simplistic check -- we just compare the source and + # object file, no deep dependency checking involving header + # files. + skip_source = {} # rebuild everything + for source in sources: # no wait, rebuild nothing + skip_source[source] = 1 + + (n_sources, n_objects) = newer_pairwise (sources, objects) + for source in n_sources: # no really, only rebuild what's + skip_source[source] = 0 # out-of-date + + return (objects, skip_source) + +# _prep_compile () + +CCompiler._prep_compile = _prep_compile + + + + +#---------------------------------------------------------------------- +# Run SWIG the way I want it done + +def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, swig_deps=[]): + from distutils.file_util import copy_file + from distutils.dep_util import newer + from distutils.spawn import spawn + + sources = [] + + for file in files: + basefile = os.path.splitext(file)[0] + i_file = os.path.join(dir, file) + py_file = os.path.join(dir, gendir, basefile+'.py') + cpp_file = os.path.join(dir, gendir, basefile+'.cpp') + + sources.append(cpp_file) + + if USE_SWIG: + for dep in swig_deps: + if newer(dep, py_file) or newer(dep, cpp_file): + force = 1 + break + + if force or newer(i_file, py_file) or newer(i_file, cpp_file): + # we need forward slashes here even on win32 + cpp_file = string.join(string.split(cpp_file, '\\'), '/') + i_file = string.join(string.split(i_file, '\\'), '/') + + cmd = ['swig'] + swig_args + ['-I'+dir, '-c', '-o', cpp_file, i_file] + spawn(cmd, verbose=1) + + # copy the generated python file to the package directory + copy_file(py_file, package, update=not force, verbose=0) + + + return sources + + + +#---------------------------------------------------------------------- +# Update local copies of wxWindows contrib files + + +def contrib_copy_tree(src, dest, verbose=0): + from distutils.dir_util import mkpath, copy_tree + + mkpath(dest, verbose=verbose) + copy_tree(src, dest, update=1, verbose=verbose) + diff --git a/wxPython/my_install_data.py b/wxPython/my_install_data.py new file mode 100644 index 0000000000..4738371ed8 --- /dev/null +++ b/wxPython/my_install_data.py @@ -0,0 +1,167 @@ +"""my_install_data.py + +Provides a more sophisticated facility to install data files +than distutils' install_data does. +You can specify your files as a template like in MANIFEST.in +and you have more control over the copy process. + +""" + +# created 2000/08/01, Rene Liebscher + +########################################################################### +# import some modules we need + +import os,sys,string +from types import StringType,TupleType,ListType +from distutils.util import change_root +from distutils.filelist import FileList +from distutils.command.install_data import install_data + +########################################################################### +# a container class for our more sophisticated install mechanism + +class Data_Files: + """ container for list of data files. + supports alternate base_dirs e.g. 'install_lib','install_header',... + supports a directory where to copy files + supports templates as in MANIFEST.in + supports preserving of paths in filenames + eg. foo/xyz is copied to base_dir/foo/xyz + supports stripping of leading dirs of source paths + eg. foo/bar1/xyz, foo/bar2/abc can be copied to bar1/xyz, bar2/abc + """ + + def __init__(self,base_dir=None,files=None,copy_to=None,template=None,preserve_path=0,strip_dirs=0): + self.base_dir = base_dir + self.files = files + self.copy_to = copy_to + self.template = template + self.preserve_path = preserve_path + self.strip_dirs = strip_dirs + self.finalized = 0 + + def warn (self, msg): + sys.stderr.write ("warning: %s: %s\n" % + ("install_data", msg)) + + def debug_print (self, msg): + """Print 'msg' to stdout if the global DEBUG (taken from the + DISTUTILS_DEBUG environment variable) flag is true. + """ + from distutils.core import DEBUG + if DEBUG: + print msg + + + def finalize(self): + """ complete the files list by processing the given template """ + if self.finalized: + return + if self.files == None: + self.files = [] + if self.template != None: + if type(self.template) == StringType: + self.template = string.split(self.template,";") + filelist = FileList(self.warn,self.debug_print) + for line in self.template: + filelist.process_template_line(string.strip(line)) + filelist.sort() + filelist.remove_duplicates() + self.files.extend(filelist.files) + self.finalized = 1 + +# end class Data_Files + +########################################################################### +# a more sophisticated install routine than distutils install_data + +class my_install_data (install_data): + + def check_data(self,d): + """ check if data are in new format, if not create a suitable object. + returns finalized data object + """ + if not isinstance(d, Data_Files): + self.warn(("old-style data files list found " + "-- please convert to Data_Files instance")) + if type(d) is TupleType: + if len(d) != 2 or not (type(d[1]) is ListType): + raise DistutilsSetupError, \ + ("each element of 'data_files' option must be an " + "Data File instance, a string or 2-tuple (string,[strings])") + d = Data_Files(copy_to=d[0],files=d[1]) + else: + if not (type(d) is StringType): + raise DistutilsSetupError, \ + ("each element of 'data_files' option must be an " + "Data File instance, a string or 2-tuple (string,[strings])") + d = Data_Files(files=[d]) + d.finalize() + return d + + def run(self): + self.outfiles = [] + install_cmd = self.get_finalized_command('install') + + for d in self.data_files: + d = self.check_data(d) + + install_dir = self.install_dir + # alternative base dir given => overwrite install_dir + if d.base_dir != None: + install_dir = getattr(install_cmd,d.base_dir) + + # copy to an other directory + if d.copy_to != None: + if not os.path.isabs(d.copy_to): + # relatiev path to install_dir + dir = os.path.join(install_dir, d.copy_to) + elif install_cmd.root: + # absolute path and alternative root set + dir = change_root(self.root,d.copy_to) + else: + # absolute path + dir = d.copy_to + else: + # simply copy to install_dir + dir = install_dir + # warn if necceassary + self.warn("setup script did not provide a directory to copy files to " + " -- installing right in '%s'" % install_dir) + + dir=os.path.normpath(dir) + # create path + self.mkpath(dir) + + # copy all files + for src in d.files: + if d.strip_dirs > 0: + dst = string.join(string.split(os.path.normcase(src),os.sep)[d.strip_dirs:],os.sep) + else: + dst = src + if d.preserve_path: + # preserve path in filename + self.mkpath(os.path.dirname(os.path.join(dir,dst))) + out = self.copy_file(src, os.path.join(dir,dst)) + else: + out = self.copy_file(src, dir) + if type(out) is TupleType: + out = out[0] + self.outfiles.append(out) + + return self.outfiles + + def get_inputs (self): + inputs = [] + for d in self.data_files: + d = self.check_data(d) + inputs.append(d.files) + return inputs + + def get_outputs (self): + return self.outfiles + + +########################################################################### + diff --git a/wxPython/setup.cfg b/wxPython/setup.cfg new file mode 100644 index 0000000000..b3c032dcb4 --- /dev/null +++ b/wxPython/setup.cfg @@ -0,0 +1,14 @@ +[build_ext] +inplace=0 + + +[sdist] +formats=gztar + + +[bdist_rpm] +release = 2 +group = Development/Languages/Python +packager = Robin Dunn +vendor = wxPROs +doc_files = README.txt BUILD.win32.txt BUILD.unix.txt CHANGES.txt licence/ diff --git a/wxPython/setup.py b/wxPython/setup.py new file mode 100755 index 0000000000..adc44bddf6 --- /dev/null +++ b/wxPython/setup.py @@ -0,0 +1,535 @@ +#!/usr/bin/env python +#---------------------------------------------------------------------- + +import sys, os, string +from distutils.core import setup, Extension +from distutils.file_util import copy_file +from distutils.dir_util import mkpath +from distutils.dep_util import newer + +from my_distutils import run_swig, contrib_copy_tree + +#---------------------------------------------------------------------- +# flags and values that affect this script +#---------------------------------------------------------------------- + +VERSION = "2.2.8" +DESCRIPTION = "Cross platform GUI toolkit for Python" +AUTHOR = "Robin Dunn" +AUTHOR_EMAIL = "robin@alldunn.com" +URL = "http://wxPython.org/" +LICENCE = "wxWindows (LGPL derivative)" +LONG_DESCRIPTION = """\ +wxPython is a GUI toolkit for Python that is a wrapper around the +wxWindows C++ GUI library. wxPython provides a large variety of +window types and controls, all implemented with a native look and +feel (and native runtime speed) on the platforms it is supported +on. +""" + + +BUILD_GLCANVAS = 1 # If true, build the contrib/glcanvas extension module +BUILD_OGL = 1 # If true, build the contrib/ogl extension module +BUILD_STC = 1 # If true, build the contrib/stc extension module +CORE_ONLY = 0 # if true, don't build any of the above +GL_ONLY = 0 # Only used when making the -gl RPM. See the "b" script + # for the ugly details + +USE_SWIG = 0 # Should we actually execute SWIG, or just use the + # files already in the distribution? + +IN_CVS_TREE = 0 # Set to true if building in a full wxWindows CVS + # tree, otherwise will assume all needed files are + # available in the wxPython source distribution + +WX_CONFIG = "wx-config" # Usually you shouldn't need to touch this, + # but you can set it to pass an alternate + # version of wx-config or alternate flags, + # eg. as required by the .deb in-tree build. + +# Some MSW build settings + +FINAL = 1 # Mirrors use of same flag in wx makefiles, + # (0 or 1 only) should probably find a way to + # autodetect this... + +HYBRID = 0 # If set and not debug or FINAL, then build a + # hybrid extension that can be used by the + # non-debug version of python, but contains + # debugging symbols for wxWindows and wxPython. + # wxWindows must have been built with /MD, not /MDd + # (using FINAL=hybrid will do it.) + +WXDLLVER = '22_8' # Version part of DLL name + + +#---------------------------------------------------------------------- +# Some other globals +#---------------------------------------------------------------------- + +PKGDIR = 'wxPython' +wxpExtensions = [] + +force = '--force' in sys.argv or '-f' in sys.argv +debug = '--debug' in sys.argv or '-g' in sys.argv + + +#---------------------------------------------------------------------- +# Check for build flags on the command line +#---------------------------------------------------------------------- + +for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'CORE_ONLY', + 'USE_SWIG', 'IN_CVS_TREE', 'FINAL', 'HYBRID', ]: + for x in range(len(sys.argv)): + if string.find(sys.argv[x], flag) == 0: + pos = string.find(sys.argv[x], '=') + 1 + if pos > 0: + vars()[flag] = eval(sys.argv[x][pos:]) + sys.argv[x] = '' + +for option in ['WX_CONFIG', 'WXDLLVER', ]: + for x in range(len(sys.argv)): + if string.find(sys.argv[x], option) == 0: + pos = string.find(sys.argv[x], '=') + 1 + if pos > 0: + vars()[option] = sys.argv[x][pos:] + sys.argv[x] = '' + +sys.argv = filter(None, sys.argv) + + +if CORE_ONLY: + BUILD_GLCANVAS = 0 + BUILD_OGL = 0 + BUILD_STC = 0 + +#---------------------------------------------------------------------- +# Setup some platform specific stuff +#---------------------------------------------------------------------- + +if os.name == 'nt': + # Set compile flags and such for MSVC. These values are derived + # from the wxWindows makefiles for MSVC, others will probably + # vary... + WXDIR = os.environ['WXWIN'] + WXPLAT = '__WXMSW__' + GENDIR = 'msw' + + if debug: + FINAL = 0 + HYBRID = 0 + + if HYBRID: + FINAL = 0 + + includes = ['src', + os.path.join(WXDIR, 'include'), + ] + + defines = [ ('WIN32', None), # Some of these are no longer + ('__WIN32__', None), # necessary. Anybody know which? + ('_WINDOWS', None), + ('__WINDOWS__', None), + ('WINVER', '0x0400'), + ('__WIN95__', None), + ('STRICT', None), + + (WXPLAT, None), + ('WXUSINGDLL', '1'), + + ('SWIG_GLOBAL', None), + ('HAVE_CONFIG_H', None), + ('WXP_USE_THREAD', '1'), + ] + + if not FINAL or HYBRID: + defines.append( ('__WXDEBUG__', None) ) + + libdirs = [os.path.join(WXDIR, 'lib'), 'build\\ilib'] + + if FINAL: + wxdll = 'wx' + WXDLLVER + elif HYBRID: + wxdll = 'wx' + WXDLLVER + 'h' + else: + wxdll = 'wx' + WXDLLVER + 'd' + + + libs = [wxdll, 'kernel32', 'user32', 'gdi32', 'comdlg32', + 'winspool', 'winmm', 'shell32', 'oldnames', 'comctl32', + 'ctl3d32', 'odbc32', 'ole32', 'oleaut32', 'uuid', 'rpcrt4', + 'advapi32', 'wsock32'] + + cflags = ['/GX-'] # workaround for internal compiler error in MSVC 5 + lflags = None + + if not FINAL and HYBRID: + cflags = cflags + ['/Od', '/Z7'] + lflags = ['/DEBUG', ] + + +elif os.name == 'posix': + # Set flags for Unix type platforms + + WXDIR = '..' # assumes IN_CVS_TREE + WXPLAT = '__WXGTK__' # and assumes GTK... + GENDIR = 'gtk' # Need to allow for Motif eventually too + + includes = ['src'] + defines = [('SWIG_GLOBAL', None), + ('HAVE_CONFIG_H', None), + ('WXP_USE_THREAD', '1'), + ] + libdirs = [] + libs = [] + + cflags = os.popen(WX_CONFIG + ' --cflags', 'r').read()[:-1] + ' ' + \ + os.popen('gtk-config --cflags', 'r').read()[:-1] + cflags = string.split(cflags) + + lflags = os.popen(WX_CONFIG + ' --libs', 'r').read()[:-1] + lflags = string.split(lflags) + + +else: + raise 'Sorry Charlie...' + + +#---------------------------------------------------------------------- +# Check if the version file needs updated +#---------------------------------------------------------------------- + +if IN_CVS_TREE and newer('setup.py', 'src/__version__.py'): + open('src/__version__.py', 'w').write("ver = '%s'\n" % VERSION) + + + +#---------------------------------------------------------------------- +# SWIG defaults +#---------------------------------------------------------------------- + +swig_force = force +swig_args = ['-c++', '-shadow', '-python', '-keyword', '-dnone', #'-dascii', + '-I./src', '-D'+WXPLAT] +swig_deps = ['src/my_typemaps.i'] + + +#---------------------------------------------------------------------- +# Define the CORE extension module +#---------------------------------------------------------------------- + +if not GL_ONLY: + print 'Preparing CORE...' + swig_files = [ 'wx.i', 'windows.i', 'windows2.i', 'windows3.i', 'events.i', + 'misc.i', 'misc2.i', 'gdi.i', 'mdi.i', 'controls.i', + 'controls2.i', 'cmndlgs.i', 'stattool.i', 'frames.i', 'image.i', + 'printfw.i', 'sizers.i', 'clip_dnd.i', + 'filesys.i', 'streams.i', + ##'grid.i', 'html.i', 'htmlhelp.i', 'calendar.i', 'utils.i', + ] + + swig_sources = run_swig(swig_files, 'src', GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args, swig_deps) + + copy_file('src/__init__.py', PKGDIR, update=1, verbose=0) + copy_file('src/__version__.py', PKGDIR, update=1, verbose=0) + + + if IN_CVS_TREE: # update the licence files + mkpath('licence') + for file in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']: + copy_file(WXDIR+'/docs/'+file, 'licence/'+file, update=1, verbose=0) + + + if os.name == 'nt': + rc_file = ['src/wxc.rc'] + else: + rc_file = [] + + + ext = Extension('wxc', ['src/helpers.cpp', + 'src/libpy.c', + ] + rc_file + swig_sources, + + include_dirs = includes, + define_macros = defines, + + library_dirs = libdirs, + libraries = libs, + + extra_compile_args = cflags, + extra_link_args = lflags, + ) + wxpExtensions.append(ext) + + + # Extension for the grid module + swig_sources = run_swig(['grid.i'], 'src', GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args, swig_deps) + ext = Extension('gridc', swig_sources, + include_dirs = includes, + define_macros = defines, + library_dirs = libdirs, + libraries = libs, + extra_compile_args = cflags, + extra_link_args = lflags, + ) + wxpExtensions.append(ext) + + + # Extension for the html modules + swig_sources = run_swig(['html.i', 'htmlhelp.i'], 'src', GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args, swig_deps) + ext = Extension('htmlc', swig_sources, + include_dirs = includes, + define_macros = defines, + library_dirs = libdirs, + libraries = libs, + extra_compile_args = cflags, + extra_link_args = lflags, + ) + wxpExtensions.append(ext) + + + # Extension for the utils module + swig_sources = run_swig(['utils.i'], 'src', GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args, swig_deps) + ext = Extension('utilsc', swig_sources, + include_dirs = includes, + define_macros = defines, + library_dirs = libdirs, + libraries = libs, + extra_compile_args = cflags, + extra_link_args = lflags, + ) + wxpExtensions.append(ext) + + + # Extension for the calendar module + swig_sources = run_swig(['calendar.i'], 'src', GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args, swig_deps) + ext = Extension('calendarc', swig_sources, + include_dirs = includes, + define_macros = defines, + library_dirs = libdirs, + libraries = libs, + extra_compile_args = cflags, + extra_link_args = lflags, + ) + wxpExtensions.append(ext) + + +#---------------------------------------------------------------------- +# Define the GLCanvas extension module +#---------------------------------------------------------------------- + +if BUILD_GLCANVAS or GL_ONLY: + print 'Preparing GLCANVAS...' + location = 'contrib/glcanvas' + swig_files = ['glcanvas.i'] + + swig_sources = run_swig(swig_files, location, GENDIR, PKGDIR, + USE_SWIG, swig_force, swig_args) + + gl_libs = [] + # libwx_gtk_gl is linked in now by wx-config so we don't need + # to add it here. (If it's not you built without --with-opengl + # and are screwed here anyway. + if os.name == 'posix': + gl_libs = ['GL', 'GLU'] + + ext = Extension('glcanvasc', + swig_sources, + + include_dirs = includes, + define_macros = defines, + + library_dirs = libdirs, + libraries = libs + gl_libs, + + extra_compile_args = cflags, + extra_link_args = lflags, + ) + + wxpExtensions.append(ext) + + +#---------------------------------------------------------------------- +# Define the OGL extension module +#---------------------------------------------------------------------- + +if not GL_ONLY and BUILD_OGL: + print 'Preparing OGL...' + location = 'contrib/ogl' + OGLLOC = location + '/contrib/src/ogl' + OGLINC = location + '/contrib/include' + + swig_files = ['ogl.i', 'oglbasic.i', 'oglshapes.i', 'oglshapes2.i', + 'oglcanvas.i'] + + swig_sources = run_swig(swig_files, location, '', PKGDIR, + USE_SWIG, swig_force, swig_args) + + # make sure local copy of contrib files are up to date + if IN_CVS_TREE: + contrib_copy_tree(WXDIR + '/contrib/include/wx/ogl', OGLINC+'/wx/ogl') + contrib_copy_tree(WXDIR + '/contrib/src/ogl', OGLLOC) + + ext = Extension('oglc', ['%s/basic.cpp' % OGLLOC, + '%s/bmpshape.cpp' % OGLLOC, + '%s/composit.cpp' % OGLLOC, + '%s/divided.cpp' % OGLLOC, + '%s/lines.cpp' % OGLLOC, + '%s/misc.cpp' % OGLLOC, + '%s/basic2.cpp' % OGLLOC, + '%s/canvas.cpp' % OGLLOC, + '%s/constrnt.cpp' % OGLLOC, + '%s/drawn.cpp' % OGLLOC, + '%s/mfutils.cpp' % OGLLOC, + '%s/ogldiag.cpp' % OGLLOC, + ] + swig_sources, + + include_dirs = [OGLINC] + includes, + define_macros = defines, + + library_dirs = libdirs, + libraries = libs, + + extra_compile_args = cflags, + extra_link_args = lflags, + ) + + wxpExtensions.append(ext) + + + +#---------------------------------------------------------------------- +# Define the STC extension module +#---------------------------------------------------------------------- + +if not GL_ONLY and BUILD_STC: + print 'Preparing STC...' + location = 'contrib/stc' + STCLOC = location + '/contrib/src/stc' + STCINC = location + '/contrib/include' + STC_H = location + '/contrib/include/wx/stc' + + # make sure local copy of contrib files are up to date + if IN_CVS_TREE: + contrib_copy_tree(WXDIR + '/contrib/include/wx/stc', STCINC+'/wx/stc') + contrib_copy_tree(WXDIR + '/contrib/src/stc', STCLOC) + + + swig_files = ['stc_.i'] + swig_sources = run_swig(swig_files, location, '', PKGDIR, + USE_SWIG, swig_force, + swig_args + ['-I'+STC_H, '-I'+location], + [STC_H+'/stc.h']) + + # copy a project specific py module to the main package dir + copy_file(location+'/stc.py', PKGDIR, update=1, verbose=1) + + # add some include dirs to the standard set + stc_includes = includes[:] + stc_includes.append('%s/scintilla/include' % STCLOC) + stc_includes.append('%s/scintilla/src' % STCLOC) + stc_includes.append(STCINC) + + # and some macro definitions + stc_defines = defines[:] + stc_defines.append( ('__WX__', None) ) + stc_defines.append( ('SCI_LEXER', None) ) + + + ext = Extension('stc_c', + ['%s/scintilla/src/AutoComplete.cxx' % STCLOC, + '%s/scintilla/src/CallTip.cxx' % STCLOC, + '%s/scintilla/src/CellBuffer.cxx' % STCLOC, + '%s/scintilla/src/ContractionState.cxx' % STCLOC, + '%s/scintilla/src/Document.cxx' % STCLOC, + '%s/scintilla/src/Editor.cxx' % STCLOC, + '%s/scintilla/src/Indicator.cxx' % STCLOC, + '%s/scintilla/src/KeyMap.cxx' % STCLOC, + '%s/scintilla/src/KeyWords.cxx' % STCLOC, + '%s/scintilla/src/LineMarker.cxx' % STCLOC, + '%s/scintilla/src/PropSet.cxx' % STCLOC, + '%s/scintilla/src/ScintillaBase.cxx' % STCLOC, + '%s/scintilla/src/Style.cxx' % STCLOC, + '%s/scintilla/src/ViewStyle.cxx' % STCLOC, + '%s/scintilla/src/LexCPP.cxx' % STCLOC, + '%s/scintilla/src/LexHTML.cxx' % STCLOC, + '%s/scintilla/src/LexLua.cxx' % STCLOC, + '%s/scintilla/src/LexOthers.cxx' % STCLOC, + '%s/scintilla/src/LexPerl.cxx' % STCLOC, + '%s/scintilla/src/LexPython.cxx' % STCLOC, + '%s/scintilla/src/LexSQL.cxx' % STCLOC, + '%s/scintilla/src/LexVB.cxx' % STCLOC, + '%s/scintilla/src/DocumentAccessor.cxx' % STCLOC, + '%s/scintilla/src/UniConversion.cxx' % STCLOC, + '%s/scintilla/src/WindowAccessor.cxx' % STCLOC, + '%s/scintilla/src/PosRegExp.cxx' % STCLOC, + + '%s/PlatWX.cpp' % STCLOC, + '%s/ScintillaWX.cpp' % STCLOC, + '%s/stc.cpp' % STCLOC, + ] + swig_sources, + + include_dirs = stc_includes, + define_macros = stc_defines, + + library_dirs = libdirs, + libraries = libs, + + extra_compile_args = cflags, + extra_link_args = lflags, + ) + + wxpExtensions.append(ext) + + + +#---------------------------------------------------------------------- +# Do the Setup/Build/Install/Whatever +#---------------------------------------------------------------------- + +if __name__ == "__main__": + if not GL_ONLY: + setup(name = PKGDIR, + version = VERSION, + description = DESCRIPTION, + long_description = LONG_DESCRIPTION, + author = AUTHOR, + author_email = AUTHOR_EMAIL, + url = URL, + licence = LICENCE, + + packages = [PKGDIR, + PKGDIR+'.lib', + PKGDIR+'.lib.editor', + ], + + ext_package = PKGDIR, + ext_modules = wxpExtensions, + ) + + else: + + setup(name = "wxPython-gl", + version = VERSION, + description = "wxGLCanvas class for wxPython", + author = AUTHOR, + author_email = AUTHOR_EMAIL, + url = URL, + licence = LICENCE, + + py_modules = [ "wxPython.glcanvas" ], + + ext_package = PKGDIR, + ext_modules = wxpExtensions, + ) + + + + +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- diff --git a/utils/wxPython/src/.cvsignore b/wxPython/src/.cvsignore similarity index 78% rename from utils/wxPython/src/.cvsignore rename to wxPython/src/.cvsignore index 6fd3ec59f8..71b0afd835 100644 --- a/utils/wxPython/src/.cvsignore +++ b/wxPython/src/.cvsignore @@ -7,11 +7,16 @@ Setup.save Setup.save Setup.test _make.bat +b.bat build.local compile.py config.c glcanvas.h glcanvasc.exp +libwxPyHelpers.2.1.so.16.0.0 +libwxPyHelpers.2.2.so.0.0.0 +libwxPyHelpers.2.2.so.1.0.0 +libwxPyHelpers.2.2.so.2.0.0 make.bat makefile.test sedscript diff --git a/utils/wxPython/src/__init__.py b/wxPython/src/__init__.py similarity index 100% rename from utils/wxPython/src/__init__.py rename to wxPython/src/__init__.py diff --git a/wxPython/src/__version__.py b/wxPython/src/__version__.py new file mode 100644 index 0000000000..3472dc82f8 --- /dev/null +++ b/wxPython/src/__version__.py @@ -0,0 +1 @@ +ver = '2.2.7' diff --git a/wxPython/src/_calextras.py b/wxPython/src/_calextras.py new file mode 100644 index 0000000000..f2f8bde23c --- /dev/null +++ b/wxPython/src/_calextras.py @@ -0,0 +1,4 @@ + +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxCalendarEventPtr = wxCalendarEventPtr diff --git a/utils/wxPython/src/_defs.i b/wxPython/src/_defs.i similarity index 97% rename from utils/wxPython/src/_defs.i rename to wxPython/src/_defs.i index af2027b9c8..e5c63471ae 100644 --- a/utils/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -157,8 +157,10 @@ typedef int wxWindowID; typedef unsigned int uint; typedef signed int EBool; typedef unsigned int size_t +typedef unsigned int time_t typedef int wxPrintQuality; typedef int wxCoord; +typedef char wxChar; //--------------------------------------------------------------------------- @@ -216,6 +218,10 @@ enum { wxFRAME_TOOL_WINDOW, wxFRAME_FLOAT_ON_PARENT, wxFRAME_NO_WINDOW_MENU, +#ifdef FOR_2_3 + wxFRAME_NO_TASKBAR, + wxFRAME_EX_CONTEXTHELP, +#endif wxED_CLIENT_MARGIN, wxED_BUTTONS_BOTTOM, wxED_BUTTONS_RIGHT, @@ -255,6 +261,7 @@ enum { wxPROCESS_ENTER, wxPASSWORD, wxTE_PROCESS_ENTER, + wxTE_PROCESS_TAB, wxTE_PASSWORD, wxTE_READONLY, wxTE_RICH, @@ -313,12 +320,19 @@ enum { wxLC_MASK_TYPE, wxLC_MASK_ALIGN, wxLC_MASK_SORT, +#ifdef FOR_2_3 + wxLC_HRULES, + wxLC_VRULES, +#endif wxSP_VERTICAL, wxSP_HORIZONTAL, wxSP_ARROW_KEYS, wxSP_WRAP, wxSP_NOBORDER, wxSP_3D, + wxSP_3DSASH, + wxSP_3DBORDER, + wxSP_FULLSASH, wxSP_BORDER, wxSP_LIVE_UPDATE, wxSP_PERMIT_UNSPLIT, @@ -433,10 +447,12 @@ enum { wxHIDE_READONLY, wxOVERWRITE_PROMPT, wxFILE_MUST_EXIST, + wxMULTIPLE, wxACCEL_ALT, wxACCEL_CTRL, wxACCEL_SHIFT, + wxACCEL_NORMAL, wxPD_AUTO_HIDE, wxPD_APP_MODAL, @@ -478,6 +494,14 @@ enum { wxHW_SCROLLBAR_NEVER, wxHW_SCROLLBAR_AUTO, + wxJOYSTICK1, + wxJOYSTICK2, + wxJOY_BUTTON1, + wxJOY_BUTTON2, + wxJOY_BUTTON3, + wxJOY_BUTTON4, + wxJOY_BUTTON_ANY, + }; @@ -949,6 +973,10 @@ enum wxEventType { wxEVT_NAVIGATION_KEY, + wxEVT_TIMER, + + wxEVT_END_PROCESS, + }; diff --git a/utils/wxPython/src/_extras.py b/wxPython/src/_extras.py similarity index 85% rename from utils/wxPython/src/_extras.py rename to wxPython/src/_extras.py index a3d76e54f5..08a0090f25 100644 --- a/utils/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -29,36 +29,36 @@ def _checkForCallback(obj, name, event, theID=-1): except: pass else: obj.Connect(theID, -1, event, cb) -def _StdWindowCallbacks(win): - _checkForCallback(win, "OnChar", wxEVT_CHAR) - _checkForCallback(win, "OnSize", wxEVT_SIZE) - _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) - _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) - _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) - _checkForCallback(win, "OnPaint", wxEVT_PAINT) - _checkForCallback(win, "OnIdle", wxEVT_IDLE) +## def _StdWindowCallbacks(win): +## _checkForCallback(win, "OnChar", wxEVT_CHAR) +## _checkForCallback(win, "OnSize", wxEVT_SIZE) +## _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) +## _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) +## _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) +## _checkForCallback(win, "OnPaint", wxEVT_PAINT) +## _checkForCallback(win, "OnIdle", wxEVT_IDLE) -def _StdFrameCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) - _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) +## def _StdFrameCallbacks(win): +## _StdWindowCallbacks(win) +## _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) +## _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) +## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) -def _StdDialogCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) - _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) - _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) +## def _StdDialogCallbacks(win): +## _StdWindowCallbacks(win) +## _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) +## _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) +## _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) +## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) +## _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) -def _StdOnScrollCallbacks(win): - try: cb = getattr(win, "OnScroll") - except: pass - else: EVT_SCROLL(win, cb) +## def _StdOnScrollCallbacks(win): +## try: cb = getattr(win, "OnScroll") +## except: pass +## else: EVT_SCROLL(win, cb) @@ -526,15 +526,9 @@ def EVT_SPIN_UP(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) def EVT_SPIN_DOWN(win, id, func): - win.Connect(id, -1,wxEVT_SCROLL_LINEDOWN, func) + win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) def EVT_SPIN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) @@ -563,33 +557,33 @@ def EVT_TASKBAR_RIGHT_DCLICK(win, func): win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) -# wxGrid -def EVT_GRID_SELECT_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) +## # wxGrid *** THE OLD ONE *** +## def EVT_GRID_SELECT_CELL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) -def EVT_GRID_CREATE_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) +## def EVT_GRID_CREATE_CELL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) -def EVT_GRID_CHANGE_LABELS(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) +## def EVT_GRID_CHANGE_LABELS(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) -def EVT_GRID_CHANGE_SEL_LABEL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) +## def EVT_GRID_CHANGE_SEL_LABEL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) -def EVT_GRID_CELL_CHANGE(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) +## def EVT_GRID_CELL_CHANGE(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) -def EVT_GRID_CELL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) +## def EVT_GRID_CELL_LCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) -def EVT_GRID_CELL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) +## def EVT_GRID_CELL_RCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) -def EVT_GRID_LABEL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) +## def EVT_GRID_LABEL_LCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) -def EVT_GRID_LABEL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) +## def EVT_GRID_LABEL_RCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) # wxSashWindow @@ -634,9 +628,6 @@ def EVT_LIST_SET_INFO(win, id, func): def EVT_LIST_ITEM_SELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func) -def EVT_LIST_ITEM_ACTIVATED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) - def EVT_LIST_ITEM_DESELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func) @@ -655,6 +646,10 @@ def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func): def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func) +def EVT_LIST_ITEM_ACTIVATED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) + + #wxSplitterWindow @@ -671,22 +666,57 @@ def EVT_SPLITTER_DOUBLECLICKED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, func) +# wxTimer +def EVT_TIMER(win, id, func): + win.Connect(id, -1, wxEVT_TIMER, func) + +# wxProcess +def EVT_END_PROCESS(eh, id, func): + eh.Connect(id, -1, wxEVT_END_PROCESS, func) + + +# wxJoyStick +def EVT_JOY_DOWN(win, func): + win.Connect(-1, -1, wxEVT_JOY_DOWN, func) + +def EVT_JOY_UP(win, func): + win.Connect(-1, -1, wxEVT_JOY_UP, func) + +def EVT_JOY_MOVE(win, func): + win.Connect(-1, -1, wxEVT_JOY_MOVE, func) + +def EVT_JOY_ZMOVE(win, func): + win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func) + +def EVT_JOYSTICK_EVENTS(win, func): + win.Connect(-1, -1, wxEVT_JOY_DOWN, func) + win.Connect(-1, -1, wxEVT_JOY_UP, func) + win.Connect(-1, -1, wxEVT_JOY_MOVE, func) + win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func) + #---------------------------------------------------------------------- class wxTimer(wxPyTimer): - def __init__(self): - wxPyTimer.__init__(self, self.Notify) # derived class must provide - # Notify(self) method. + def __init__(self, evtHandler = None, id = -1): + if evtHandler is None: + wxPyTimer.__init__(self, self.Notify) # derived class must provide + # Notify(self) method. + else: + wxPyTimer.__init__(self, None) + self.SetOwner(evtHandler, id) #---------------------------------------------------------------------- # Some wxWin methods can take "NULL" as parameters, but the shadow classes # expect an object with the SWIG pointer as a 'this' member. This class # and instance fools the shadow into passing the NULL pointer. -class NullObj: +## NOTE: This is not needed anymore as None can be passed instead and +# will be interpreted as NULL. + +class _NullObj: this = 'NULL' # SWIG converts this to (void*)0 -NULL = NullObj() +NULL = _NullObj() #---------------------------------------------------------------------- @@ -695,15 +725,15 @@ NULL = NullObj() wxColor = wxColour wxNamedColor = wxNamedColour -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - # aliases so that C++ documentation applies: -wxDefaultPosition = wxPyDefaultPosition -wxDefaultSize = wxPyDefaultSize +#wxDefaultPosition = wxPyDefaultPosition +#wxDefaultSize = wxPyDefaultSize + # backwards compatibility -wxNoRefBitmap = wxBitmap +wxNoRefBitmap = wxBitmap +wxPyDefaultPosition = wxDefaultPosition +wxPyDefaultSize = wxDefaultSize #---------------------------------------------------------------------- # This helper function will take a wxPython object and convert it to @@ -837,6 +867,20 @@ class wxPySimpleApp(wxApp): return true +class wxPyWidgetTester(wxApp): + def __init__(self, size = (250, 100)): + self.size = size + wxApp.__init__(self, 0) + + def OnInit(self): + self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size) + self.SetTopWindow(self.frame) + return true + + def SetWidget(self, widgetClass, *args): + w = apply(widgetClass, (self.frame,) + args) + self.frame.Show(true) + #---------------------------------------------------------------------------- # DO NOT hold any other references to this object. This is how we know when # to cleanup system resources that wxWin is holding. When this module is diff --git a/wxPython/src/_gridextras.py b/wxPython/src/_gridextras.py new file mode 100644 index 0000000000..198ed644ff --- /dev/null +++ b/wxPython/src/_gridextras.py @@ -0,0 +1,19 @@ + + +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxGridEventPtr = wxGridEventPtr +wx.wxGridSizeEventPtr = wxGridSizeEventPtr +wx.wxGridRangeSelectEventPtr = wxGridRangeSelectEventPtr +wx.wxGridCellRendererPtr = wxGridCellRendererPtr +wx.wxPyGridCellRendererPtr = wxPyGridCellRendererPtr +wx.wxGridCellEditorPtr = wxGridCellEditorPtr +wx.wxPyGridCellEditorPtr = wxPyGridCellEditorPtr +wx.wxGridCellAttrPtr = wxGridCellAttrPtr +wx.wxGridCellAttrProviderPtr = wxGridCellAttrProviderPtr +wx.wxPyGridCellAttrProviderPtr = wxPyGridCellAttrProviderPtr +wx.wxGridTableBasePtr = wxGridTableBasePtr +wx.wxPyGridTableBasePtr = wxPyGridTableBasePtr +wx.wxGridTableMessagePtr = wxGridTableMessagePtr +wx.wxGridCellCoordsPtr = wxGridCellCoordsPtr +wx.wxGridPtr = wxGridPtr diff --git a/utils/wxPython/modules/html/_extras.py b/wxPython/src/_htmlextras.py similarity index 100% rename from utils/wxPython/modules/html/_extras.py rename to wxPython/src/_htmlextras.py diff --git a/wxPython/src/b b/wxPython/src/b new file mode 100755 index 0000000000..2ab601f122 --- /dev/null +++ b/wxPython/src/b @@ -0,0 +1,4 @@ +#!/bin/bash +cd .. +. b $* +cd - diff --git a/wxPython/src/calendar.i b/wxPython/src/calendar.i new file mode 100644 index 0000000000..ee24ecbe02 --- /dev/null +++ b/wxPython/src/calendar.i @@ -0,0 +1,237 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: calendar.i +// Purpose: SWIG definitions for the wxCalendarCtrl +// +// Author: Robin Dunn +// +// Created: 23-May-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module calendar + + +%{ +#include "export.h" +#include +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i +%import misc.i +%import windows.i +%import controls.i +%import events.i +%import utils.i + +%pragma(python) code = "import wx" + +//--------------------------------------------------------------------------- + +enum { + wxCAL_SUNDAY_FIRST, + wxCAL_MONDAY_FIRST, + wxCAL_SHOW_HOLIDAYS, + wxCAL_NO_YEAR_CHANGE, + wxCAL_NO_MONTH_CHANGE, +}; + + +enum wxCalendarHitTestResult +{ + wxCAL_HITTEST_NOWHERE, // outside of anything + wxCAL_HITTEST_HEADER, // on the header (weekdays) + wxCAL_HITTEST_DAY // on a day in the calendar +}; + +// border types for a date +enum wxCalendarDateBorder +{ + wxCAL_BORDER_NONE, // no border (default) + wxCAL_BORDER_SQUARE, // a rectangular border + wxCAL_BORDER_ROUND // a round border +}; + +//--------------------------------------------------------------------------- + + +class wxCalendarDateAttr +{ +public: + // ctors + wxCalendarDateAttr(const wxColour& colText, + const wxColour& colBack = wxNullColour, + const wxColour& colBorder = wxNullColour, + const wxFont& font = wxNullFont, + wxCalendarDateBorder border = wxCAL_BORDER_NONE); + + %name(wxCalendarDateAttrBorder) + wxCalendarDateAttr(wxCalendarDateBorder border, + const wxColour& colBorder = wxNullColour); + + // setters + void SetTextColour(const wxColour& colText); + void SetBackgroundColour(const wxColour& colBack); + void SetBorderColour(const wxColour& col); + void SetFont(const wxFont& font); + void SetBorder(wxCalendarDateBorder border); + void SetHoliday(bool holiday); + + // accessors + bool HasTextColour() const; + bool HasBackgroundColour() const; + bool HasBorderColour() const; + bool HasFont() const; + bool HasBorder() const; + + bool IsHoliday() const; + + const wxColour& GetTextColour() const; + const wxColour& GetBackgroundColour() const; + const wxColour& GetBorderColour() const; + const wxFont& GetFont() const; + wxCalendarDateBorder GetBorder() const; +}; + +//--------------------------------------------------------------------------- + +class wxCalendarCtrl; + +class wxCalendarEvent : public wxCommandEvent +{ +public: + wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type); + + const wxDateTime& GetDate() const; + wxDateTime::WeekDay GetWeekDay() const; + +}; + +enum { + wxEVT_CALENDAR_DOUBLECLICKED, + wxEVT_CALENDAR_SEL_CHANGED, + wxEVT_CALENDAR_DAY_CHANGED, + wxEVT_CALENDAR_MONTH_CHANGED, + wxEVT_CALENDAR_YEAR_CHANGED, + wxEVT_CALENDAR_WEEKDAY_CLICKED, +}; + +%pragma(python) code = " +def EVT_CALENDAR(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_DOUBLECLICKED, fn) + +def EVT_CALENDAR_SEL_CHANGED(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_SEL_CHANGED, fn) + +def EVT_CALENDAR_DAY(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_DAY_CHANGED, fn) + +def EVT_CALENDAR_MONTH(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_MONTH_CHANGED, fn) + +def EVT_CALENDAR_YEAR(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_YEAR_CHANGED, fn) + +def EVT_CALENDAR_WEEKDAY_CLICKED(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_WEEKDAY_CLICKED, fn) + +" + +//--------------------------------------------------------------------------- + +class wxCalendarCtrl : public wxControl +{ +public: + // construction + wxCalendarCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const char* name = "calendar"); + + // set/get the current date + // ------------------------ + + void SetDate(const wxDateTime& date); + const wxDateTime& GetDate() const; + + // calendar mode + // ------------- + + // some calendar styles can't be changed after the control creation by + // just using SetWindowStyle() and Refresh() and the functions below + // should be used instead for them + + // corresponds to wxCAL_NO_YEAR_CHANGE bit + void EnableYearChange(bool enable = TRUE); + + // corresponds to wxCAL_NO_MONTH_CHANGE bit + void EnableMonthChange(bool enable = TRUE); + + // corresponds to wxCAL_SHOW_HOLIDAYS bit + void EnableHolidayDisplay(bool display = TRUE); + + // customization + // ------------- + + // header colours are used for painting the weekdays at the top + void SetHeaderColours(const wxColour& colFg, const wxColour& colBg); + const wxColour& GetHeaderColourFg() const; + const wxColour& GetHeaderColourBg() const; + + // highlight colour is used for the currently selected date + void SetHighlightColours(const wxColour& colFg, const wxColour& colBg); + const wxColour& GetHighlightColourFg() const; + const wxColour& GetHighlightColourBg() const; + + // holiday colour is used for the holidays (if style & wxCAL_SHOW_HOLIDAYS) + void SetHolidayColours(const wxColour& colFg, const wxColour& colBg); + const wxColour& GetHolidayColourFg() const; + const wxColour& GetHolidayColourBg() const; + + // an item without custom attributes is drawn with the default colours and + // font and without border, setting custom attributes allows to modify this + // + // the day parameter should be in 1..31 range, for days 29, 30, 31 the + // corresponding attribute is just unused if there is no such day in the + // current month + + wxCalendarDateAttr *GetAttr(size_t day) const; + void SetAttr(size_t day, wxCalendarDateAttr *attr); + + void SetHoliday(size_t day); + + void ResetAttr(size_t day); + + // returns one of wxCAL_HITTEST_XXX constants and fills either date or wd + // with the corresponding value (none for NOWHERE, the date for DAY and wd + // for HEADER) + wxCalendarHitTestResult HitTest(const wxPoint& pos, + wxDateTime *date = NULL, + wxDateTime::WeekDay *wd = NULL); + +}; + + +//--------------------------------------------------------------------------- + +%init %{ + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); +%} + +//--------------------------------------------------------------------------- + +%pragma(python) include="_calextras.py"; + +//--------------------------------------------------------------------------- + diff --git a/utils/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i similarity index 92% rename from utils/wxPython/src/clip_dnd.i rename to wxPython/src/clip_dnd.i index e054bedf24..6c3b014c8f 100644 --- a/utils/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -151,9 +151,12 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) { if (m_myInst.findCallback("GetDataHere")) { PyObject* ro; ro = m_myInst.callCallbackObj(Py_BuildValue("()")); - rval = (ro != Py_None && PyString_Check(ro)); - if (rval) - memcpy(buf, PyString_AsString(ro), PyString_Size(ro)); + if (ro) { + rval = (ro != Py_None && PyString_Check(ro)); + if (rval) + memcpy(buf, PyString_AsString(ro), PyString_Size(ro)); + Py_DECREF(ro); + } } wxPySaveThread(doSave); return rval; @@ -180,8 +183,8 @@ bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) { class wxPyDataObjectSimple : public wxDataObjectSimple { public: wxPyDataObjectSimple(const wxDataFormat& format = wxPyFormatInvalid); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDataObjectSimple)" }; //---------------------------------------------------------------------- @@ -232,8 +235,8 @@ IMP_PYCALLBACK__STRING(wxPyTextDataObject, wxTextDataObject, SetText); class wxPyTextDataObject : public wxTextDataObject { public: wxPyTextDataObject(const wxString& text = wxEmptyString); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyTextDataObject)" }; //---------------------------------------------------------------------- @@ -266,8 +269,11 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() { PyObject* ro; wxBitmap* ptr; ro = m_myInst.callCallbackObj(Py_BuildValue("()")); - if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p")) - rval = ptr; + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p")) + rval = ptr; + Py_DECREF(ro); + } } wxPySaveThread(doSave); return *rval; @@ -289,8 +295,8 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) { class wxPyBitmapDataObject : public wxBitmapDataObject { public: wxPyBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyBitmapDataObject)" }; @@ -311,8 +317,9 @@ public: return list; } } - - //void AddFile(const wxString &filename); +#ifdef __WXMSW__ + void AddFile(const wxString &filename); +#endif }; @@ -339,6 +346,7 @@ public: } size_t GetSize(); + //void *GetData(); %addmethods { PyObject* GetData() { @@ -435,8 +443,8 @@ public: const wxIcon &go = wxNullIcon); #endif - void _setSelf(PyObject* self, int incref); - %pragma(python) addtomethod = "__init__:self._setSelf(self, 0)" + void _setSelf(PyObject* self, PyObject* _class, int incref); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxDropSource, 0)" ~wxPyDropSource(); void SetData(wxDataObject& data); @@ -490,8 +498,8 @@ class wxPyDropTarget : public wxDropTarget { public: wxPyDropTarget(wxDataObject *dataObject = NULL); %pragma(python) addtomethod = "__init__:if _args:_args[0].thisown = 0" - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDropTarget)" ~wxPyDropTarget(); @@ -544,8 +552,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop); %name(wxTextDropTarget) class wxPyTextDropTarget : public wxPyDropTarget { public: wxPyTextDropTarget(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxTextDropTarget)" //bool OnDropText(wxCoord x, wxCoord y, const wxString& text) = 0; wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def); @@ -603,8 +611,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); { public: wxPyFileDropTarget(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxFileDropTarget)" // bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames) = 0; wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def); diff --git a/utils/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i similarity index 77% rename from utils/wxPython/src/cmndlgs.i rename to wxPython/src/cmndlgs.i index 158e235017..558576d46d 100644 --- a/utils/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -54,7 +54,7 @@ class wxColourDialog : public wxDialog { public: wxColourDialog(wxWindow* parent, wxColourData* data = NULL); - %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" wxColourData& GetColourData(); int ShowModal(); @@ -69,9 +69,9 @@ public: char* message = "Choose a directory", char* defaultPath = "", long style = 0, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); - %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" wxString GetPath(); wxString GetMessage(); @@ -91,9 +91,9 @@ public: char* defaultFile = "", char* wildcard = "*.*", long style = 0, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); - %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" wxString GetDirectory(); wxString GetFilename(); @@ -110,6 +110,32 @@ public: void SetStyle(long style); void SetWildcard(const wxString& wildCard); int ShowModal(); + + %addmethods { + PyObject* GetFilenames() { + wxArrayString arr; + self->GetFilenames(arr); + size_t count = arr.GetCount(); + PyObject* listObj = PyList_New(0); + for(size_t x=0; xGetPaths(arr); + size_t count = arr.GetCount(); + PyObject* listObj = PyList_New(0); + for(size_t x=0; x #include +#include #include #include //#include @@ -48,10 +49,6 @@ //---------------------------------------------------------------------- -%{ -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG -%} - %readonly wxValidator wxDefaultValidator; %readwrite @@ -62,13 +59,13 @@ class wxControl : public wxWindow { public: wxControl(wxWindow *parent, wxWindowID id, - const wxPoint& pos=wxPyDefaultPosition, - const wxSize& size=wxPyDefaultSize, + const wxPoint& pos=wxDefaultPosition, + const wxSize& size=wxDefaultSize, long style=0, - const wxValidator& validator=wxPyDefaultValidator, + const wxValidator& validator=wxDefaultValidator, const char* name="control"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Command(wxCommandEvent& event); wxString GetLabel(); @@ -81,13 +78,13 @@ public: class wxButton : public wxControl { public: wxButton(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "button"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void SetDefault(); void SetBackgroundColour(const wxColour& colour); @@ -106,13 +103,13 @@ public: class wxBitmapButton : public wxButton { public: wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "button"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" wxBitmap& GetBitmapLabel(); wxBitmap& GetBitmapDisabled(); @@ -123,6 +120,9 @@ public: void SetBitmapSelected(const wxBitmap& bitmap); void SetBitmapLabel(const wxBitmap& bitmap); + void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } + int GetMarginX() const { return m_marginX; } + int GetMarginY() const { return m_marginY; } }; //---------------------------------------------------------------------- @@ -130,9 +130,9 @@ public: // class wxToggleButton : public wxControl { // public: // wxToggleButton(wxWindow *parent, wxWindowID id, const wxString& label, -// const wxPoint& pos = wxPyDefaultPosition, -// const wxSize& size = wxPyDefaultSize, long style = 0, -// const wxValidator& validator = wxPyDefaultValidator, +// const wxPoint& pos = wxDefaultPosition, +// const wxSize& size = wxDefaultSize, long style = 0, +// const wxValidator& validator = wxDefaultValidator, // const char* name = "toggle"); // void SetValue(bool value); // bool GetValue() const ; @@ -142,9 +142,9 @@ public: // class wxBitmapToggleButton : public wxToggleButton { // public: // wxBitmapToggleButton(wxWindow *parent, wxWindowID id, const wxBitmap *label, -// const wxPoint& pos = wxPyDefaultPosition, -// const wxSize& size = wxPyDefaultSize, long style = 0, -// const wxValidator& validator = wxPyDefaultValidator, +// const wxPoint& pos = wxDefaultPosition, +// const wxSize& size = wxDefaultSize, long style = 0, +// const wxValidator& validator = wxDefaultValidator, // const char *name = "toggle"); // void SetLabel(const wxBitmap& bitmap); // }; @@ -155,13 +155,13 @@ public: class wxCheckBox : public wxControl { public: wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& val = wxPyDefaultValidator, + const wxValidator& val = wxDefaultValidator, char* name = "checkBox"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool GetValue(); void SetValue(const bool state); @@ -172,14 +172,14 @@ public: class wxChoice : public wxControl { public: wxChoice(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT=0, wxString* choices=NULL, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "choice"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Append(const wxString& item); void Clear(); @@ -199,14 +199,14 @@ public: class wxComboBox : public wxChoice { public: wxComboBox(wxWindow* parent, wxWindowID id, char* value = "", - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT=0, wxString* choices=NULL, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "comboBox"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Append(const wxString& item); // TODO: void Append(const wxString& item, char* clientData); @@ -240,13 +240,13 @@ public: class wxGauge : public wxControl { public: wxGauge(wxWindow* parent, wxWindowID id, int range, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "gauge"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" int GetBezelFace(); int GetRange(); @@ -263,8 +263,8 @@ public: class wxStaticBox : public wxControl { public: wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticBox"); }; @@ -276,8 +276,8 @@ public: class wxStaticLine : public wxControl { public: wxStaticLine( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxPyDefaultPosition, - const wxSize &size = wxPyDefaultSize, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, const char* name = "staticLine" ); }; @@ -288,12 +288,12 @@ public: class wxStaticText : public wxControl { public: wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "staticText"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" wxString GetLabel(); void SetLabel(const wxString& label); @@ -304,14 +304,14 @@ public: class wxListBox : public wxControl { public: wxListBox(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, int LCOUNT, wxString* choices = NULL, long style = 0, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "listBox"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void Append(const wxString& item); // TODO: void Append(const wxString& item, char* clientData); @@ -328,7 +328,7 @@ public: wxArrayInt lst; self->GetSelections(lst); PyObject *tup = PyTuple_New(lst.GetCount()); - for(int i=0; i // For columns only int m_format; // left, right, centre int m_width; // width of column - wxListItem(); - ~wxListItem(); }; -class wxListEvent: public wxCommandEvent { + +class wxListEvent: public wxNotifyEvent { public: int m_code; long m_itemIndex; @@ -120,21 +188,34 @@ public: bool m_cancelled; wxPoint m_pointDrag; wxListItem m_item; -}; + int GetCode(); + long GetIndex(); + long GetOldIndex(); + long GetOldItem(); + int GetColumn(); + bool Cancelled(); + wxPoint GetPoint(); + const wxString& GetLabel(); + const wxString& GetText(); + int GetImage(); + long GetData(); + long GetMask(); + const wxListItem& GetItem(); +}; class wxListCtrl : public wxControl { public: wxListCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxLC_ICON, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "listCtrl"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); bool DeleteItem(long item); @@ -195,7 +276,7 @@ public: #endif long GetTopItem(); long HitTest(const wxPoint& point, int& OUTPUT); - %name(InsertColumnWith)long InsertColumn(long col, wxListItem& info); + %name(InsertColumnInfo)long InsertColumn(long col, wxListItem& info); long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, int width = -1); @@ -230,13 +311,13 @@ public: if (!PyCallable_Check(func)) return FALSE; - return self->SortItems(wxPyTreeCtrl_SortItems, (long)func); + return self->SortItems(wxPyListCtrl_SortItems, (long)func); } } }; %{ - int wxCALLBACK wxPyTreeCtrl_SortItems(long item1, long item2, long funcPtr) { + int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; PyObject* func = (PyObject*)funcPtr; bool doSave = wxPyRestoreThread(); @@ -292,6 +373,12 @@ public: ~wxTreeItemId(); bool IsOk(); + %addmethods { + int __cmp__(wxTreeItemId* other) { + if (! other) return -1; + return *self != *other; + } + } }; @@ -300,15 +387,15 @@ public: class wxPyTreeItemData : public wxTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL) { - if (obj == NULL) + if (obj == NULL) obj = Py_None; - Py_INCREF(obj); - m_obj = obj; + Py_INCREF(obj); + m_obj = obj; } ~wxPyTreeItemData() { bool doSave = wxPyRestoreThread(); - Py_DECREF(m_obj); + Py_DECREF(m_obj); wxPySaveThread(doSave); } @@ -318,7 +405,9 @@ public: } void SetData(PyObject* obj) { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_obj); + wxPySaveThread(doSave); m_obj = obj; Py_INCREF(obj); } @@ -352,21 +441,55 @@ public: }; + +%{ +class wxPyTreeCtrl : public wxTreeCtrl { +public: + wxPyTreeCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + char* name) : + wxTreeCtrl(parent, id, pos, size, style, validator, name) {} + + + int OnCompareItems(const wxTreeItemId& item1, + const wxTreeItemId& item2) { + int rval = 0; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("OnCompareItems")) + rval = m_myInst.callCallback(Py_BuildValue( + "(OO)", + wxPyConstructObject((void*)&item1, "wxTreeItemId"), + wxPyConstructObject((void*)&item2, "wxTreeItemId"))); + else + rval = wxTreeCtrl::OnCompareItems(item1, item2); + wxPySaveThread(doSave); + return rval; + } + PYPRIVATE; +}; + +%} + // These are for the GetFirstChild/GetNextChild methods below %typemap(python, in) long& INOUT = long* INOUT; %typemap(python, argout) long& INOUT = long* INOUT; -class wxTreeCtrl : public wxControl { +%name(wxTreeCtrl)class wxPyTreeCtrl : public wxControl { public: - wxTreeCtrl(wxWindow *parent, wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, - const wxValidator& validator = wxPyDefaultValidator, + const wxValidator& validator = wxDefaultValidator, char* name = "wxTreeCtrl"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxTreeCtrl)" size_t GetCount(); unsigned int GetIndent(); @@ -391,40 +514,44 @@ public: void SetItemHasChildren(const wxTreeItemId& item, bool hasChildren = TRUE); %addmethods { - // [Get|Set]ItemData substitutes. Automatically create wxPyTreeItemData - // if needed. + // [Get|Set]ItemData substitutes. Automatically create wxPyTreeItemData + // if needed. wxPyTreeItemData* GetItemData(const wxTreeItemId& item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(); + data->SetId(item); // set the id self->SetItemData(item, data); } return data; } void SetItemData(const wxTreeItemId& item, wxPyTreeItemData* data) { - self->SetItemData(item, data); - } + data->SetId(item); // set the id + self->SetItemData(item, data); + } - // [Get|Set]PyData are short-cuts. Also made somewhat crash-proof by - // automatically creating data classes. - PyObject* GetPyData(const wxTreeItemId& item) { + // [Get|Set]PyData are short-cuts. Also made somewhat crash-proof by + // automatically creating data classes. + PyObject* GetPyData(const wxTreeItemId& item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(); + data->SetId(item); // set the id self->SetItemData(item, data); } return data->GetData(); - } + } void SetPyData(const wxTreeItemId& item, PyObject* obj) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(obj); + data->SetId(item); // set the id self->SetItemData(item, data); } else data->SetData(obj); - } + } } @@ -445,8 +572,8 @@ public: size_t num, x; num = self->GetSelections(array); for (x=0; x < num; x++) { - PyObject* item = wxPyConstructObject((void*)&array.Item(x), - "wxTreeItemId"); + wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); + PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE); PyList_Append(rval, item); } wxPySaveThread(doSave); @@ -481,6 +608,12 @@ public: const wxString& text, int image = -1, int selectedImage = -1, wxPyTreeItemData *data = NULL); + %name(InsertItemBefore) + wxTreeItemId InsertItem(const wxTreeItemId& parent, + size_t before, + const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); wxTreeItemId AppendItem(const wxTreeItemId& parent, const wxString& text, int image = -1, int selectedImage = -1, @@ -514,6 +647,8 @@ public: bool IsBold(const wxTreeItemId& item) const; wxTreeItemId HitTest(const wxPoint& point, int& OUTPUT); + + void SetItemTextColour(const wxTreeItemId& item, const wxColour& col); void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col); void SetItemFont(const wxTreeItemId& item, const wxFont& font); @@ -541,14 +676,19 @@ public: #endif %pragma(python) addtoclass = " - # Redefine a couple methods that SWIG gets a bit confused on... - def GetFirstChild(self,arg0,arg1): - val1, val2 = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1) + # Redefine some methods that SWIG gets a bit confused on... + def GetFirstChild(self, *_args, **_kwargs): + val1,val2 = apply(controls2c.wxTreeCtrl_GetFirstChild,(self,) + _args, _kwargs) val1 = wxTreeItemIdPtr(val1) val1.thisown = 1 return (val1,val2) - def GetNextChild(self,arg0,arg1): - val1, val2 = controls2c.wxTreeCtrl_GetNextChild(self.this,arg0.this,arg1) + def GetNextChild(self, *_args, **_kwargs): + val1,val2 = apply(controls2c.wxTreeCtrl_GetNextChild,(self,) + _args, _kwargs) + val1 = wxTreeItemIdPtr(val1) + val1.thisown = 1 + return (val1,val2) + def HitTest(self, *_args, **_kwargs): + val1, val2 = apply(controls2c.wxTreeCtrl_HitTest,(self,) + _args, _kwargs) val1 = wxTreeItemIdPtr(val1) val1.thisown = 1 return (val1,val2) @@ -569,12 +709,12 @@ public: class wxTabCtrl : public wxControl { public: wxTabCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "tabCtrl"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool DeleteAllItems(); bool DeleteItem(int item); diff --git a/utils/wxPython/src/events.i b/wxPython/src/events.i similarity index 92% rename from utils/wxPython/src/events.i rename to wxPython/src/events.i index 1464154828..2a9e392b70 100644 --- a/utils/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -26,6 +26,7 @@ // Import some definitions of other classes, etc. %import _defs.i %import misc.i +%import gdi.i //--------------------------------------------------------------------------- @@ -74,7 +75,8 @@ class wxCommandEvent : public wxEvent { public: wxCommandEvent(int commandEventType = 0, int id = 0); - bool Checked(); + bool IsChecked(); + %name(Checked)bool IsChecked(); long GetExtraLong(); int GetInt(); int GetSelection(); @@ -154,6 +156,15 @@ public: wxPoint GetLogicalPosition(const wxDC& dc); long GetX(); long GetY(); + + long m_x, m_y; + bool m_leftDown; + bool m_middleDown; + bool m_rightDown; + bool m_controlDown; + bool m_shiftDown; + bool m_altDown; + bool m_metaDown; }; //--------------------------------------------------------------------------- @@ -168,10 +179,22 @@ public: bool ShiftDown(); long KeyCode(); + long GetKeyCode(); + bool HasModifiers(); + long GetX(); long GetY(); wxPoint GetPosition(); %name(GetPositionTuple) void GetPosition(long* OUTPUT, long* OUTPUT); + + long m_x, m_y; + long m_keyCode; + bool m_controlDown; + bool m_shiftDown; + bool m_altDown; + bool m_metaDown; + bool m_scanCode; + }; //--------------------------------------------------------------------------- @@ -360,6 +383,7 @@ class wxNotifyEvent : public wxCommandEvent { public: wxNotifyEvent(int commandType = wxEVT_NULL, int id = 0); bool IsAllowed(); + void Allow(); void Veto(); }; @@ -388,20 +412,29 @@ public: //--------------------------------------------------------------------------- -class wxWindowCreateEvent : public wxEvent { +class wxWindowCreateEvent : public wxCommandEvent { public: wxWindowCreateEvent(wxWindow *win = NULL); wxWindow *GetWindow(); }; -class wxWindowDestroyEvent : public wxEvent { +class wxWindowDestroyEvent : public wxCommandEvent { public: wxWindowDestroyEvent(wxWindow *win = NULL); wxWindow *GetWindow(); }; +//--------------------------------------------------------------------------- + +class wxTimerEvent : public wxEvent +{ +public: + wxTimerEvent(int id = 0, int interval = 0); + int GetInterval(); +}; + //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/wxPython/src/export.h b/wxPython/src/export.h new file mode 100644 index 0000000000..79412e942e --- /dev/null +++ b/wxPython/src/export.h @@ -0,0 +1,68 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: export.h +// Purpose: To be used from modules that are not part of the core +// wxPython extension in order to get access to some helper +// functions that live in wxc. +// +// Author: Robin Dunn +// +// Created: 14-Dec-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef __wxp_export__ +#define __wxp_export__ + +//---------------------------------------------------------------------- + +#define wxPyUSE_EXPORT +#include "helpers.h" + + +static void wxPyCoreAPI_IMPORT() { + wxPyCoreAPIPtr = (wxPyCoreAPI*)PyCObject_Import("wxPython.wxc", "wxPyCoreAPI"); + if (! wxPyCoreAPIPtr) + wxPyCoreAPIPtr = (wxPyCoreAPI*)PyCObject_Import("wxc", "wxPyCoreAPI"); +} + +#define SWIG_MakePtr(a, b, c) (wxPyCoreAPIPtr->p_SWIG_MakePtr(a, b, c)) +#define SWIG_GetPtr(a, b, c) (wxPyCoreAPIPtr->p_SWIG_GetPtr(a, b, c)) +#define SWIG_GetPtrObj(a, b, c) (wxPyCoreAPIPtr->p_SWIG_GetPtrObj(a, b, c)) +#define SWIG_RegisterMapping(a, b, c) (wxPyCoreAPIPtr->p_SWIG_RegisterMapping(a, b, c)) +#define SWIG_addvarlink(a, b, c, d) (wxPyCoreAPIPtr->p_SWIG_addvarlink(a, b, c, d)) + +#define wxPyRestoreThread() (wxPyCoreAPIPtr->p_wxPyRestoreThread()) +#define wxPySaveThread(a) (wxPyCoreAPIPtr->p_wxPySaveThread(a)) +#define wxPyConstructObject(a,b,c) (wxPyCoreAPIPtr->p_wxPyConstructObject(a,b,c)) +#define wxPy_ConvertList(a,b) (wxPyCoreAPIPtr->p_wxPy_ConvertList(a,b)) +#define byte_LIST_helper(a) (wxPyCoreAPIPtr->p_byte_LIST_helper(a)) +#define int_LIST_helper(a) (wxPyCoreAPIPtr->p_int_LIST_helper(a)) +#define long_LIST_helper(a) (wxPyCoreAPIPtr->p_long_LIST_helper(a)) +#define string_LIST_helper(a) (wxPyCoreAPIPtr->p_string_LIST_helper(a)) +#define wxPoint_LIST_helper(a) (wxPyCoreAPIPtr->p_wxPoint_LIST_helper(a)) +#define wxBitmap_LIST_helper(a) (wxPyCoreAPIPtr->p_wxBitmap_LIST_helper(a)) +#define wxString_LIST_helper(a) (wxPyCoreAPIPtr->p_wxString_LIST_helper(a)) +#define wxAcceleratorEntry_LIST_helper(a) (wxPyCoreAPIPtr->p_wxAcceleratorEntry_LIST_helper(a)) + +#define wxSize_helper(a,b) (wxPyCoreAPIPtr->p_wxSize_helper(a,b)) +#define wxPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxPoint_helper(a,b)) +#define wxRealPoint_helper(a,b) (wxPyCoreAPIPtr->p_wxRealPoint_helper(a,b)) +#define wxRect_helper(a,b) (wxPyCoreAPIPtr->p_wxRect_helper(a,b)) +#define wxColour_helper(a,b) (wxPyCoreAPIPtr->p_wxColour_helper(a,b)) + +#define wxPyCBH_setSelf(a, b, c, d) (wxPyCoreAPIPtr->p_wxPyCBH_setSelf(a,b,c,d)) +#define wxPyCBH_findCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_findCallback(a, b)) +#define wxPyCBH_callCallback(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallback(a, b)) +#define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b)) +#define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a)) + + +// This one is special. It's the first function called in SWIG generated +// modules, so we'll use it to also import the API. +#define SWIG_newvarlink() (wxPyCoreAPI_IMPORT(), wxPyCoreAPIPtr->p_SWIG_newvarlink()) + + +//---------------------------------------------------------------------- +#endif diff --git a/wxPython/src/filesys.i b/wxPython/src/filesys.i new file mode 100644 index 0000000000..99df7c6049 --- /dev/null +++ b/wxPython/src/filesys.i @@ -0,0 +1,276 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: filesys.i +// Purpose: SWIG definitions of the wxFileSystem family of classes +// +// Author: Joerg Baumann +// +// Created: 25-Sept-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Joerg Baumann +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module filesys + +%{ +#include "helpers.h" +#include +#include +#include +#include +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i +%import utils.i +%import image.i +%import streams.i + +%pragma(python) code = "import wx" +%pragma(python) code = "import string" + +//--------------------------------------------------------------------------- + +// // typemaps for wxInputStream: Note wxFSFile object has to do the delete +// // of wxInputStream * +// %typemap(python,in) wxInputStream *stream { +// if (PyInstance_Check($source)) { +// wxPyInputStream* ptr; +// if (SWIG_GetPtrObj($source, (void **) &ptr,"_wxPyInputStream_p")) { +// PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); +// return NULL; +// } +// $target = ptr->wxi; +// } else { +// PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); +// return NULL; +// } +// } + + +// // typemaps for wxInputStream: Note wxFSFile object has to do the delete +// // of wxInputStream * +// %typemap(python,out) wxInputStream* { +// wxPyInputStream * _ptr = NULL; + +// if ($source) { +// _ptr = new wxPyInputStream($source); +// } +// if (_ptr) { +// char swigptr[64]; +// SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + +// PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); +// if (! classobj) { +// Py_INCREF(Py_None); +// $target = Py_None; +// } else { +// PyObject* arg = Py_BuildValue("(s)", swigptr); +// $target = PyInstance_New(classobj, arg, NULL); +// Py_DECREF(arg); + +// // set ThisOwn +// PyObject* one = PyInt_FromLong(1); +// PyObject_SetAttrString($target, "thisown", one); +// Py_DECREF(one); +// } +// } else { +// Py_INCREF(Py_None); +// $target = Py_None; +// } +// } + + + +class wxFSFile { +public: + wxFSFile(wxInputStream *stream, const wxString& loc, + const wxString& mimetype, const wxString& anchor, + wxDateTime modif); + + wxInputStream *GetStream(); + const wxString& GetMimeType(); + const wxString& GetLocation(); + const wxString& GetAnchor(); + wxDateTime GetModificationTime(); +}; + + +// clear typemaps +%typemap(python,in) wxInputStream *stream; +%typemap(python,out) wxInputStream *; + + +//--------------------------------------------------------------------------- + +%{ +// wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling +// the callback functions +class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler() : wxFileSystemHandler() {} + + DEC_PYCALLBACK_BOOL_STRING_pure(CanOpen); + DEC_PYCALLBACK_FSF_FSSTRING_pure(OpenFile); + DEC_PYCALLBACK_STRING_STRINGINT_pure(FindFirst); + DEC_PYCALLBACK_STRING__pure(FindNext); + + wxString GetProtocol(const wxString& location) { + return wxFileSystemHandler::GetProtocol(location); + } + + wxString GetLeftLocation(const wxString& location) { + return wxFileSystemHandler::GetLeftLocation(location); + } + + wxString GetAnchor(const wxString& location) { + return wxFileSystemHandler::GetAnchor(location); + } + + wxString GetRightLocation(const wxString& location) { + return wxFileSystemHandler::GetRightLocation(location); + } + + wxString GetMimeTypeFromExt(const wxString& location){ + return wxFileSystemHandler::GetMimeTypeFromExt(location); + } + + PYPRIVATE; +}; + + +IMP_PYCALLBACK_BOOL_STRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, CanOpen); +IMP_PYCALLBACK_FSF_FSSTRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, OpenFile); +IMP_PYCALLBACK_STRING_STRINGINT_pure(wxPyFileSystemHandler, wxFileSystemHandler, FindFirst); +IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext); +%} + + +%name(wxCPPFileSystemHandler)class wxFileSystemHandler { + wxFileSystemHandler(); +} + +%name(wxFileSystemHandler)class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler(); + + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxFileSystemHandler)" + + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + wxString FindFirst(const wxString& spec, int flags = 0); + wxString FindNext(); + + wxString GetProtocol(const wxString& location); + wxString GetLeftLocation(const wxString& location); + wxString GetAnchor(const wxString& location); + wxString GetRightLocation(const wxString& location) const; + wxString GetMimeTypeFromExt(const wxString& location); +}; + +//--------------------------------------------------------------------------- + +class wxFileSystem { +public: + wxFileSystem(); + + void ChangePathTo(const wxString& location, bool is_dir = FALSE); + wxString GetPath(); + + wxFSFile* OpenFile(const wxString& location); + + wxString FindFirst(const wxString& spec, int flags = 0); + wxString FindNext(); + + static void AddHandler(wxFileSystemHandler *handler); + static void CleanUpHandlers(); +}; + +//--------------------------------------------------------------------------- + +class wxInternetFSHandler : public wxFileSystemHandler { +public: + wxInternetFSHandler(); + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); +}; + + +//--------------------------------------------------------------------------- +class wxZipFSHandler : public wxFileSystemHandler { +public: + wxZipFSHandler(); + + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + wxString FindFirst(const wxString& spec, int flags = 0); + wxString FindNext(); +}; + +//--------------------------------------------------------------------------- + +class wxMemoryFSHandler : public wxFileSystemHandler { +public: + wxMemoryFSHandler(); + + // Remove file from memory FS and free occupied memory + static void RemoveFile(const wxString& filename); + + bool CanOpen(const wxString& location); + wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + wxString FindFirst(const wxString& spec, int flags = 0); + virtual wxString FindNext(); +}; + + +// getting the overloaded static AddFile method right +%inline %{ +void __wxMemoryFSHandler_AddFile_wxImage(const wxString& filename, + wxImage& image, + long type) { + wxMemoryFSHandler::AddFile(filename, image, type); +} + +void __wxMemoryFSHandler_AddFile_wxBitmap(const wxString& filename, + const wxBitmap& bitmap, + long type) { + wxMemoryFSHandler::AddFile(filename, bitmap, type); +} + +// void __wxMemoryFSHandler_AddFile_wxString(const wxString& filename, +// const wxString& textdata) { +// wxMemoryFSHandler::AddFile(filename, textdata); +// } + +void __wxMemoryFSHandler_AddFile_Data(const wxString& filename, + PyObject* data) { + + wxMemoryFSHandler::AddFile(filename, + (void*)PyString_AsString(data), + (size_t)PyString_Size(data)); +} +%} + + +// case switch for overloading +%pragma(python) code = " +import types +def wxMemoryFSHandler_AddFile(filename, a, b=''): + if isinstance(a, wxImage): + __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) + elif isinstance(a, wxBitmap): + __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) + elif type(a) == types.StringType: + #__wxMemoryFSHandler_AddFile_wxString(filename, a) + __wxMemoryFSHandler_AddFile_Data(filename, a) + else: raise TypeError, 'wxImage, wxBitmap or string expected' +" + + +//--------------------------------------------------------------------------- diff --git a/utils/wxPython/src/frames.i b/wxPython/src/frames.i similarity index 75% rename from utils/wxPython/src/frames.i rename to wxPython/src/frames.i index 7cea8d68a1..62e49013c8 100644 --- a/utils/wxPython/src/frames.i +++ b/wxPython/src/frames.i @@ -34,20 +34,27 @@ //---------------------------------------------------------------------- +enum { + wxFULLSCREEN_NOMENUBAR, + wxFULLSCREEN_NOTOOLBAR, + wxFULLSCREEN_NOSTATUSBAR, + wxFULLSCREEN_NOBORDER, + wxFULLSCREEN_NOCAPTION, + wxFULLSCREEN_ALL +}; + + class wxFrame : public wxWindow { public: wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); - %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" void Centre(int direction = wxBOTH); -#ifdef __WXMSW__ - void Command(int id); -#endif wxStatusBar* CreateStatusBar(int number = 1, long style = wxST_SIZEGRIP, wxWindowID id = -1, @@ -56,6 +63,7 @@ public: wxWindowID id = -1, char* name = "toolBar"); + const wxIcon& GetIcon(); wxMenuBar* GetMenuBar(); wxStatusBar* GetStatusBar(); wxString GetTitle(); @@ -63,6 +71,8 @@ public: void Iconize(bool iconize); bool IsIconized(); void Maximize(bool maximize); + bool IsMaximized(); + void Restore(); void SetAcceleratorTable(const wxAcceleratorTable& accel); void SetIcon(const wxIcon& icon); void SetMenuBar(wxMenuBar* menuBar); @@ -71,7 +81,13 @@ public: void SetStatusWidths(int LCOUNT, int* choices); // uses typemap void SetTitle(const wxString& title); void SetToolBar(wxToolBar* toolbar); - + void MakeModal(bool modal = TRUE); + wxPoint GetClientAreaOrigin() const; + bool Command(int id); + bool ProcessCommand(int id); +#ifdef __WXMSW__ + bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); +#endif }; //--------------------------------------------------------------------------- @@ -79,12 +95,12 @@ public: class wxMiniFrame : public wxFrame { public: wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); - %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" }; diff --git a/utils/wxPython/src/gdi.i b/wxPython/src/gdi.i similarity index 95% rename from utils/wxPython/src/gdi.i rename to wxPython/src/gdi.i index 5e91e0cdd4..e66a31dd73 100644 --- a/utils/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -31,6 +31,11 @@ %import _defs.i %import misc.i + +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- // class wxGDIImage { @@ -80,6 +85,23 @@ public: #ifdef __WXMSW__ void SetSize(const wxSize& size); #endif + + wxBitmap GetSubBitmap( const wxRect& rect ); +#ifdef __WXMSW__ + bool CopyFromIcon(const wxIcon& icon); + bool CopyFromCursor(const wxCursor& cursor); + int GetQuality(); + void SetQuality(int q); +#endif + + %pragma(python) addtoclass = " + def __del__(self,gdic=gdic): + try: + if self.thisown == 1 : + gdic.delete_wxBitmap(self) + except: + pass +" }; @@ -152,6 +174,15 @@ public: #ifdef __WXMSW__ void SetSize(const wxSize& size); #endif + %pragma(python) addtoclass = " + def __del__(self,gdic=gdic): + try: + if self.thisown == 1 : + gdic.delete_wxIcon(self) + except: + pass +" + }; @@ -313,6 +344,7 @@ public: }; %new wxColour* wxNamedColour(const wxString& colorName); + %{ // Alternate 'constructor' wxColour* wxNamedColour(const wxString& colorName) { return new wxColour(colorName); @@ -497,6 +529,8 @@ public: void GetDeviceOrigin(int *OUTPUT, int *OUTPUT); void SetAxisOrientation(bool xLeftRight, bool yBottomUp); + void CalcBoundingBox(int x, int y); + void ResetBoundingBox(); }; @@ -560,15 +594,6 @@ public: //--------------------------------------------------------------------------- -#ifdef __WXMSW__ -class wxPrinterDC : public wxDC { -public: - wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, - bool interactive = TRUE, int orientation = wxPORTRAIT); -}; -#endif - -//--------------------------------------------------------------------------- #ifdef __WXMSW__ class wxMetaFileDC : public wxDC { @@ -668,14 +693,14 @@ public: wxImageList(int width, int height, int mask=TRUE, int initialCount=1); ~wxImageList(); -#ifdef __WXMSW__ int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour); %name(AddIcon)int Add(const wxIcon& icon); +#ifdef __WXMSW__ bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); - %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon); #else - int Add(const wxBitmap& bitmap); +// %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon); +// int Add(const wxBitmap& bitmap); bool Replace(int index, const wxBitmap& bitmap); #endif @@ -685,6 +710,7 @@ public: int GetImageCount(); bool Remove(int index); bool RemoveAll(); + void GetSize(int index, int& OUTPUT, int& OUTPUT); }; diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i new file mode 100644 index 0000000000..09a02568f8 --- /dev/null +++ b/wxPython/src/grid.i @@ -0,0 +1,1748 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: grid.i +// Purpose: SWIG definitions for the new wxGrid and related classes +// +// Author: Robin Dunn +// +// Created: 17-March-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module grid + +#ifndef OLD_GRID + +%{ +#include "export.h" +#include +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i +%import misc.i +%import gdi.i +%import windows.i +%import controls.i +%import events.i + +%pragma(python) code = "import wx" + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- +// Macros, similar to what's in helpers.h, to aid in the creation of +// virtual methods that are able to make callbacks to Python. Many of these +// are specific to wxGrid and so are kept here to reduce the mess in helpers.h +// a bit. + + +%{ +#define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ + wxGridCellAttr* CBNAME(int a, int b) { \ + wxGridCellAttr* rval = NULL; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + wxGridCellAttr* ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", a, b)); \ + if (ro) { \ + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ + rval = ptr; \ + Py_DECREF(ro); \ + } \ + } \ + else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxGridCellAttr *base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(attr, a, b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int a, int b) { \ + PCLASS::CBNAME(attr, a, b); \ + } + + + +#define PYCALLBACK__GCAINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int val) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(attr, val); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int val) { \ + PCLASS::CBNAME(attr, val); \ + } + + + +#define PYCALLBACK_INT__pure(CBNAME) \ + int CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + int rval = 0; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_BOOL_INTINT_pure(CBNAME) \ + bool CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + bool rval = 0; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ + void CBNAME(int a, int b, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str())); \ + wxPySaveThread(doSave); \ + } + + +#define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ + bool CBNAME(int a, int b, const wxString& c) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)", a,b,c.c_str())); \ + else \ + rval = PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b, const wxString& c) { \ + return PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK_LONG_INTINT(PCLASS, CBNAME) \ + long CBNAME(int a, int b) { \ + long rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + long base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \ + bool CBNAME(int a, int b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_DOUBLE_INTINT(PCLASS, CBNAME) \ + double CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + double rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyFloat_AsDouble(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + double base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__(PCLASS, CBNAME) \ + void CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + else \ + PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME() { \ + PCLASS::CBNAME(); \ + } + + + + +#define PYCALLBACK_BOOL_SIZETSIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a, size_t b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a, size_t b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_SIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \ + else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ + wxString CBNAME(int a) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)",a)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ + void CBNAME(int a, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(is)", a,c.c_str())); \ + else \ + PCLASS::CBNAME(a,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, const wxString& c) { \ + PCLASS::CBNAME(a,c); \ + } + + + + +#define PYCALLBACK_BOOL_(PCLASS, CBNAME) \ + bool CBNAME() { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + else \ + rval = PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME() { \ + return PCLASS::CBNAME(); \ + } + + + +#define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \ + void CBNAME(size_t a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(size_t a, int b) { \ + PCLASS::CBNAME(a,b); \ + } + + + + +#define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \ + void CBNAME(int a, int b, long c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, long c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \ + void CBNAME(int a, int b, double c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, double c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + +#define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \ + void CBNAME(int a, int b, bool c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, bool c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + +%} + +//--------------------------------------------------------------------------- + +class wxGridCellCoords; +class wxGridCellAttr; + + + +#define wxGRID_VALUE_STRING "string" +#define wxGRID_VALUE_BOOL "bool" +#define wxGRID_VALUE_NUMBER "long" +#define wxGRID_VALUE_FLOAT "double" +#define wxGRID_VALUE_CHOICE "choice" +#define wxGRID_VALUE_TEXT "string" +#define wxGRID_VALUE_LONG "long" + +%readonly +wxGridCellCoords wxGridNoCellCoords; +wxRect wxGridNoCellRect; +%readwrite + + +//--------------------------------------------------------------------------- +// wxGridCellRenderer is an ABC, and several derived classes are available. +// Classes implemented in Python should be derived from wxPyGridCellRenderer. + + +class wxGridCellRenderer +{ +public: + void SetParameters(const wxString& params); + void IncRef(); + void DecRef(); + + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected) = 0; + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) = 0; + virtual wxGridCellRenderer *Clone() const = 0; +}; + + +// The C++ version of wxPyGridCellRenderer +%{ +class wxPyGridCellRenderer : public wxGridCellRenderer +{ +public: + wxPyGridCellRenderer() : wxGridCellRenderer() {}; + + // Implement Python callback aware virtual methods + void Draw(wxGrid& grid, wxGridCellAttr& attr, + wxDC& dc, const wxRect& rect, + int row, int col, bool isSelected) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Draw")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OOOOiii)", + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + wxPyConstructObject((void*)&rect, "wxRect", 0), + row, col, isSelected)); + } + wxPySaveThread(doSave); + } + + wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, + int row, int col) { + wxSize rval; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) { + PyObject* ro; + wxSize* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, + Py_BuildValue("(OOOii)", + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + row, col)); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) + rval = *ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + wxGridCellRenderer *Clone() const { + wxGridCellRenderer* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Clone")) { + PyObject* ro; + wxGridCellRenderer* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellRenderer_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + +IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters); + +%} + + +// Let SWIG know about it so it can create the Python version +class wxPyGridCellRenderer : public wxGridCellRenderer { +public: + wxPyGridCellRenderer(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellRenderer)" + + void base_SetParameters(const wxString& params); +}; + +//--------------------------------------------------------------------------- +// Predefined Renderers + +class wxGridCellStringRenderer : public wxGridCellRenderer +{ +public: + wxGridCellStringRenderer(); +}; + + +class wxGridCellNumberRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellNumberRenderer(); +}; + + +class wxGridCellFloatRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellFloatRenderer(int width = -1, int precision = -1); + + int GetWidth() const; + void SetWidth(int width); + int GetPrecision() const; + void SetPrecision(int precision); +}; + + +class wxGridCellBoolRenderer : public wxGridCellRenderer +{ +public: + wxGridCellBoolRenderer(); +}; + + + +//--------------------------------------------------------------------------- +// wxGridCellEditor is an ABC, and several derived classes are available. +// Classes implemented in Python should be derived from wxPyGridCellEditor. + +class wxGridCellEditor +{ +public: + bool IsCreated(); + wxControl* GetControl(); + void SetControl(wxControl* control); + + void SetParameters(const wxString& params); + void IncRef(); + void DecRef(); + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) = 0; + virtual void BeginEdit(int row, int col, wxGrid* grid) = 0; + virtual bool EndEdit(int row, int col, wxGrid* grid) = 0; + virtual void Reset() = 0; + virtual wxGridCellEditor *Clone() const = 0; + + virtual void SetSize(const wxRect& rect); + virtual void Show(bool show, wxGridCellAttr *attr = NULL); + virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + virtual bool IsAcceptedKey(wxKeyEvent& event); + virtual void StartingKey(wxKeyEvent& event); + virtual void StartingClick(); + virtual void HandleReturn(wxKeyEvent& event); + virtual void Destroy(); + +}; + + +// The C++ version of wxPyGridCellEditor +%{ +class wxPyGridCellEditor : public wxGridCellEditor +{ +public: + wxPyGridCellEditor() : wxGridCellEditor() {} + + void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Create")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OiO)", + wxPyConstructObject((void*)parent, "wxWindow", 0), + id, + wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0))); + } + wxPySaveThread(doSave); + } + + + void BeginEdit(int row, int col, wxGrid* grid) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid", 0))); + } + wxPySaveThread(doSave); + } + + + bool EndEdit(int row, int col, wxGrid* grid) { + bool rv = FALSE; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "EndEdit")) { + rv = wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid", 0))); + } + wxPySaveThread(doSave); + return rv; + } + + + wxGridCellEditor*Clone() const { + wxGridCellEditor* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Clone")) { + PyObject* ro; + wxGridCellEditor* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellEditor_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + void Show(bool show, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Show")) + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iO)", show, + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); + else + wxGridCellEditor::Show(show, attr); + wxPySaveThread(doSave); + } + void base_Show(bool show, wxGridCellAttr *attr) { + wxGridCellEditor::Show(show, attr); + } + + + void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "PaintBackground")) + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OO)", + wxPyConstructObject((void*)&rectCell, "wxRect", 0), + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); + else + wxGridCellEditor::PaintBackground(rectCell, attr); + wxPySaveThread(doSave); + } + void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + wxGridCellEditor::PaintBackground(rectCell, attr); + } + + + DEC_PYCALLBACK___pure(Reset); + DEC_PYCALLBACK__constany(SetSize, wxRect); + DEC_PYCALLBACK_bool_any(IsAcceptedKey, wxKeyEvent); + DEC_PYCALLBACK__any(StartingKey, wxKeyEvent); + DEC_PYCALLBACK__any(HandleReturn, wxKeyEvent); + DEC_PYCALLBACK__(StartingClick); + DEC_PYCALLBACK__(Destroy); + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + + +IMP_PYCALLBACK__STRING( wxPyGridCellEditor, wxGridCellEditor, SetParameters); +IMP_PYCALLBACK___pure(wxPyGridCellEditor, wxGridCellEditor, Reset); +IMP_PYCALLBACK__constany(wxPyGridCellEditor, wxGridCellEditor, SetSize, wxRect); +IMP_PYCALLBACK_bool_any(wxPyGridCellEditor, wxGridCellEditor, IsAcceptedKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, StartingKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, HandleReturn, wxKeyEvent); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, StartingClick); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, Destroy); + +%} + + +// Let SWIG know about it so it can create the Python version +class wxPyGridCellEditor : public wxGridCellEditor { +public: + wxPyGridCellEditor(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellEditor)" + + void base_SetSize(const wxRect& rect); + void base_Show(bool show, wxGridCellAttr *attr = NULL); + void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + void base_IsAcceptedKey(wxKeyEvent& event); + void base_StartingKey(wxKeyEvent& event); + void base_StartingClick(); + void base_HandleReturn(wxKeyEvent& event); + void base_Destroy(); + void base_SetParameters(const wxString& params); +}; + +//--------------------------------------------------------------------------- +// Predefined Editors + +class wxGridCellTextEditor : public wxGridCellEditor +{ +public: + wxGridCellTextEditor(); +}; + + +class wxGridCellNumberEditor : public wxGridCellTextEditor +{ +public: + wxGridCellNumberEditor(int min = -1, int max = -1); +}; + + +class wxGridCellFloatEditor : public wxGridCellTextEditor +{ +public: + wxGridCellFloatEditor(); +}; + + +class wxGridCellBoolEditor : public wxGridCellEditor +{ +public: + wxGridCellBoolEditor(); +}; + +class wxGridCellChoiceEditor : public wxGridCellEditor +{ +public: + wxGridCellChoiceEditor(int LCOUNT = 0, + const wxString* choices = NULL, + bool allowOthers = FALSE); +}; + +//--------------------------------------------------------------------------- + + +class wxGridCellAttr +{ +public: + wxGridCellAttr(); + + wxGridCellAttr *Clone() const; + void IncRef(); + void DecRef(); + void SetTextColour(const wxColour& colText); + void SetBackgroundColour(const wxColour& colBack); + void SetFont(const wxFont& font); + void SetAlignment(int hAlign, int vAlign); + void SetReadOnly(bool isReadOnly = TRUE); + + void SetRenderer(wxGridCellRenderer *renderer); + void SetEditor(wxGridCellEditor* editor); + + bool HasTextColour() const; + bool HasBackgroundColour() const; + bool HasFont() const; + bool HasAlignment() const; + bool HasRenderer() const; + bool HasEditor() const; + + const wxColour& GetTextColour() const; + const wxColour& GetBackgroundColour() const; + const wxFont& GetFont() const; + void GetAlignment(int *OUTPUT, int *OUTPUT) const; + wxGridCellRenderer *GetRenderer(wxGrid* grid, int row, int col) const; + wxGridCellEditor *GetEditor(wxGrid* grid, int row, int col) const; + + bool IsReadOnly() const; + void SetDefAttr(wxGridCellAttr* defAttr); +}; + +//--------------------------------------------------------------------------- + +class wxGridCellAttrProvider +{ +public: + wxGridCellAttrProvider(); + // ???? virtual ~wxGridCellAttrProvider(); + + wxGridCellAttr *GetAttr(int row, int col) const; + void SetAttr(wxGridCellAttr *attr, int row, int col); + void SetRowAttr(wxGridCellAttr *attr, int row); + void SetColAttr(wxGridCellAttr *attr, int col); + + void UpdateAttrRows( size_t pos, int numRows ); + void UpdateAttrCols( size_t pos, int numCols ); + +}; + + +// A Python-aware version +%{ +class wxPyGridCellAttrProvider : public wxGridCellAttrProvider +{ +public: + wxPyGridCellAttrProvider() : wxGridCellAttrProvider() {}; + + PYCALLBACK_GCA_INTINT(wxGridCellAttrProvider, GetAttr); + PYCALLBACK__GCAINTINT(wxGridCellAttrProvider, SetAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetRowAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetColAttr); + + PYPRIVATE; +}; +%} + + +// The python-aware version get's SWIGified +class wxPyGridCellAttrProvider : public wxGridCellAttrProvider +{ +public: + wxPyGridCellAttrProvider(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridCellAttrProvider)" + + wxGridCellAttr *base_GetAttr(int row, int col); + void base_SetAttr(wxGridCellAttr *attr, int row, int col); + void base_SetRowAttr(wxGridCellAttr *attr, int row); + void base_SetColAttr(wxGridCellAttr *attr, int col); +}; + + +//--------------------------------------------------------------------------- +// Grid Table Base class and Python aware version + + + +class wxGridTableBase +{ +public: + // wxGridTableBase(); This is an ABC + //~wxGridTableBase(); + + void SetAttrProvider(wxGridCellAttrProvider *attrProvider); + wxGridCellAttrProvider *GetAttrProvider() const; + void SetView( wxGrid *grid ); + wxGrid * GetView() const; + + + // pure virtuals + virtual int GetNumberRows() = 0; + virtual int GetNumberCols() = 0; + virtual bool IsEmptyCell( int row, int col ) = 0; + virtual wxString GetValue( int row, int col ) = 0; + virtual void SetValue( int row, int col, const wxString& value ) = 0; + + // virtuals overridable in wxPyGridTableBase + virtual wxString GetTypeName( int row, int col ); + virtual bool CanGetValueAs( int row, int col, const wxString& typeName ); + virtual bool CanSetValueAs( int row, int col, const wxString& typeName ); + virtual long GetValueAsLong( int row, int col ); + virtual double GetValueAsDouble( int row, int col ); + virtual bool GetValueAsBool( int row, int col ); + virtual void SetValueAsLong( int row, int col, long value ); + virtual void SetValueAsDouble( int row, int col, double value ); + virtual void SetValueAsBool( int row, int col, bool value ); + + //virtual void* GetValueAsCustom( int row, int col, const wxString& typeName ); + //virtual void SetValueAsCustom( int row, int col, const wxString& typeName, void* value ); + + + virtual void Clear(); + virtual bool InsertRows( size_t pos = 0, size_t numRows = 1 ); + virtual bool AppendRows( size_t numRows = 1 ); + virtual bool DeleteRows( size_t pos = 0, size_t numRows = 1 ); + virtual bool InsertCols( size_t pos = 0, size_t numCols = 1 ); + virtual bool AppendCols( size_t numCols = 1 ); + virtual bool DeleteCols( size_t pos = 0, size_t numCols = 1 ); + + virtual wxString GetRowLabelValue( int row ); + virtual wxString GetColLabelValue( int col ); + virtual void SetRowLabelValue( int row, const wxString& value ); + virtual void SetColLabelValue( int col, const wxString& value ); + + virtual bool CanHaveAttributes(); + + virtual wxGridCellAttr *GetAttr( int row, int col ); + virtual void SetAttr(wxGridCellAttr* attr, int row, int col); + virtual void SetRowAttr(wxGridCellAttr *attr, int row); + virtual void SetColAttr(wxGridCellAttr *attr, int col); + +}; + + + +// Python-aware version +%{ +class wxPyGridTableBase : public wxGridTableBase +{ +public: + wxPyGridTableBase() : wxGridTableBase() {} + + PYCALLBACK_INT__pure(GetNumberRows); + PYCALLBACK_INT__pure(GetNumberCols); + PYCALLBACK_BOOL_INTINT_pure(IsEmptyCell); + PYCALLBACK_STRING_INTINT(wxGridTableBase, GetTypeName); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanGetValueAs); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanSetValueAs); + PYCALLBACK__(wxGridTableBase, Clear); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertCols); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteCols); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendRows); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendCols); + PYCALLBACK_STRING_INT(wxGridTableBase, GetRowLabelValue); + PYCALLBACK_STRING_INT(wxGridTableBase, GetColLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetRowLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetColLabelValue); + PYCALLBACK_BOOL_(wxGridTableBase, CanHaveAttributes); + PYCALLBACK_GCA_INTINT(wxGridTableBase, GetAttr); + PYCALLBACK__GCAINTINT(wxGridTableBase, SetAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetRowAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetColAttr); + + + wxString GetValue(int row, int col) { + bool doSave = wxPyRestoreThread(); + wxString rval; + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); + if (ro) { + PyObject* str = PyObject_Str(ro); + rval = PyString_AsString(str); + Py_DECREF(ro); + Py_DECREF(str); + } + } + wxPySaveThread(doSave); + return rval; + } + + void SetValue(int row, int col, const wxString& val) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); + wxPySaveThread(doSave); + } + + + // Map the Get/Set methods for the standard non-string types to + // the GetValue and SetValue python methods. + long GetValueAsLong( int row, int col ) { + long rval = 0; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + PyObject* num; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Int(ro); + if (num) { + rval = PyInt_AsLong(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + double GetValueAsDouble( int row, int col ) { + double rval = 0.0; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + PyObject* num; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Float(ro); + if (num) { + rval = PyFloat_AsDouble(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + bool GetValueAsBool( int row, int col ) { + return (bool)GetValueAsLong(row, col); + } + + void SetValueAsLong( int row, int col, long value ) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsDouble( int row, int col, double value ) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iid)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsBool( int row, int col, bool value ) { + SetValueAsLong( row, col, (long)value ); + } + + + PYPRIVATE; +}; +%} + + +// The python-aware version get's SWIGified +class wxPyGridTableBase : public wxGridTableBase +{ +public: + wxPyGridTableBase(); + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyGridTableBase)" + + %addmethods { void Destroy() { delete self; } } + + wxString base_GetTypeName( int row, int col ); + bool base_CanGetValueAs( int row, int col, const wxString& typeName ); + bool base_CanSetValueAs( int row, int col, const wxString& typeName ); + void base_Clear(); + bool base_InsertRows( size_t pos = 0, size_t numRows = 1 ); + bool base_AppendRows( size_t numRows = 1 ); + bool base_DeleteRows( size_t pos = 0, size_t numRows = 1 ); + bool base_InsertCols( size_t pos = 0, size_t numCols = 1 ); + bool base_AppendCols( size_t numCols = 1 ); + bool base_DeleteCols( size_t pos = 0, size_t numCols = 1 ); + wxString base_GetRowLabelValue( int row ); + wxString base_GetColLabelValue( int col ); + void base_SetRowLabelValue( int row, const wxString& value ); + void base_SetColLabelValue( int col, const wxString& value ); + bool base_CanHaveAttributes(); + wxGridCellAttr *base_GetAttr( int row, int col ); + void base_SetAttr(wxGridCellAttr* attr, int row, int col); + void base_SetRowAttr(wxGridCellAttr *attr, int row); + void base_SetColAttr(wxGridCellAttr *attr, int col); +}; + + +//--------------------------------------------------------------------------- +// Predefined Tables + +class wxGridStringTable : public wxGridTableBase +{ +public: + wxGridStringTable( int numRows=0, int numCols=0 ); +}; + +//--------------------------------------------------------------------------- +// The Table can pass messages to the grid to tell it to update itself if +// something has changed. + +enum wxGridTableRequest +{ + wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000, + wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES, + wxGRIDTABLE_NOTIFY_ROWS_INSERTED, + wxGRIDTABLE_NOTIFY_ROWS_APPENDED, + wxGRIDTABLE_NOTIFY_ROWS_DELETED, + wxGRIDTABLE_NOTIFY_COLS_INSERTED, + wxGRIDTABLE_NOTIFY_COLS_APPENDED, + wxGRIDTABLE_NOTIFY_COLS_DELETED +}; + + +class wxGridTableMessage +{ +public: + wxGridTableMessage( wxGridTableBase *table, int id, + int comInt1 = -1, + int comInt2 = -1 ); + ~wxGridTableMessage(); + + void SetTableObject( wxGridTableBase *table ); + wxGridTableBase * GetTableObject() const; + void SetId( int id ); + int GetId(); + void SetCommandInt( int comInt1 ); + int GetCommandInt(); + void SetCommandInt2( int comInt2 ); + int GetCommandInt2(); +}; + + +//--------------------------------------------------------------------------- + +class wxGridCellCoords +{ +public: + wxGridCellCoords( int r=-1, int c=-1 ); + ~wxGridCellCoords(); + + int GetRow() const { return m_row; } + void SetRow( int n ) { m_row = n; } + int GetCol() const { return m_col; } + void SetCol( int n ) { m_col = n; } + void Set( int row, int col ) { m_row = row; m_col = col; } + + %addmethods { + PyObject* asTuple() { + PyObject* tup = PyTuple_New(2); + PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); + PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); + return tup; + } + + int __cmp__( const wxGridCellCoords& other ) { + return *self != other; + } + } + %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())" + %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())" +}; + +// Typemap to allow conversion of sequence objects to wxGridCellCoords... +%typemap(python,in) wxGridCellCoords& (wxGridCellCoords temp) { + $target = &temp; + if (! wxGridCellCoords_helper($source, &$target)) + return NULL; +} + +// ...and here is the associated helper. +%{ +bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) { + + // If source is an object instance then it may already be the right type + if (PyInstance_Check(source)) { + wxGridCellCoords* ptr; + if (SWIG_GetPtrObj(source, (void **)&ptr, "_wxGridCellCoords_p")) + goto error; + *obj = ptr; + return TRUE; + } + // otherwise a 2-tuple of integers is expected + else if (PySequence_Check(source) && PyObject_Length(source) == 2) { + PyObject* o1 = PySequence_GetItem(source, 0); + PyObject* o2 = PySequence_GetItem(source, 1); + **obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2)); + return TRUE; + } + + error: + PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object."); + return FALSE; +} +%} + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- +// The grid itself + + +// Fool SWIG into treating this enum as an int +typedef int WXGRIDSELECTIONMODES; + +// but let the C++ code know what it really is. +%{ +typedef wxGrid::wxGridSelectionModes WXGRIDSELECTIONMODES; +%} + + + +class wxGrid : public wxScrolledWindow +{ +public: + wxGrid( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxWANTS_CHARS, + const char* name = wxPanelNameStr ); + + //~wxGrid(); + + enum wxGridSelectionModes {wxGridSelectCells, + wxGridSelectRows, + wxGridSelectColumns}; + + bool CreateGrid( int numRows, int numCols, + WXGRIDSELECTIONMODES selmode = wxGrid::wxGridSelectCells ); + void SetSelectionMode(WXGRIDSELECTIONMODES selmode); + + + // ------ grid dimensions + // + int GetNumberRows(); + int GetNumberCols(); + + + +#ifdef NOTNEEDED // ???? + // ------ display update functions + // + void CalcRowLabelsExposed( wxRegion& reg ); + void CalcColLabelsExposed( wxRegion& reg ); + void CalcCellsExposed( wxRegion& reg ); + + // ------ event handlers + // + void ProcessRowLabelMouseEvent( wxMouseEvent& event ); + void ProcessColLabelMouseEvent( wxMouseEvent& event ); + void ProcessCornerLabelMouseEvent( wxMouseEvent& event ); + void ProcessGridCellMouseEvent( wxMouseEvent& event ); + void DoEndDragResizeRow(); + void DoEndDragResizeCol(); +#endif + + bool ProcessTableMessage( wxGridTableMessage& ); + + + wxGridTableBase * GetTable() const; + bool SetTable( wxGridTableBase *table, bool takeOwnership=FALSE, + WXGRIDSELECTIONMODES selmode = + wxGrid::wxGridSelectCells ); + + void ClearGrid(); + bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels=TRUE ); + bool AppendRows( int numRows = 1, bool updateLabels=TRUE ); + bool DeleteRows( int pos = 0, int numRows = 1, bool updateLabels=TRUE ); + bool InsertCols( int pos = 0, int numCols = 1, bool updateLabels=TRUE ); + bool AppendCols( int numCols = 1, bool updateLabels=TRUE ); + bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels=TRUE ); + +#ifdef NOTNEEDED // ???? + void DrawGridCellArea( wxDC& dc ); + void DrawGridSpace( wxDC& dc ); + void DrawCellBorder( wxDC& dc, const wxGridCellCoords& ); + void DrawAllGridLines( wxDC& dc, const wxRegion & reg ); + void DrawCell( wxDC& dc, const wxGridCellCoords& ); + void DrawHighlight(wxDC& dc); +#endif + + // this function is called when the current cell highlight must be redrawn + // and may be overridden by the user + virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ); + +#ifdef NOTNEEDED // ???? + void DrawRowLabels( wxDC& dc ); + void DrawRowLabel( wxDC& dc, int row ); + + void DrawColLabels( wxDC& dc ); + void DrawColLabel( wxDC& dc, int col ); +#endif + + // ------ Cell text drawing functions + // + void DrawTextRectangle( wxDC& dc, const wxString&, const wxRect&, + int horizontalAlignment = wxLEFT, + int verticalAlignment = wxTOP ); + + // Split a string containing newline chararcters into an array of + // strings and return the number of lines + // + void StringToLines( const wxString& value, wxArrayString& lines ); + + void GetTextBoxSize( wxDC& dc, + wxArrayString& lines, + long *OUTPUT, long *OUTPUT ); + + + // ------ + // Code that does a lot of grid modification can be enclosed + // between BeginBatch() and EndBatch() calls to avoid screen + // flicker + // + void BeginBatch(); + void EndBatch(); + int GetBatchCount(); + + + // ------ edit control functions + // + bool IsEditable() { return m_editable; } + void EnableEditing( bool edit ); + + void EnableCellEditControl( bool enable = TRUE ); + void DisableCellEditControl(); + bool CanEnableCellControl() const; + bool IsCellEditControlEnabled() const; + bool IsCellEditControlShown() const; + + bool IsCurrentCellReadOnly() const; + + void ShowCellEditControl(); + void HideCellEditControl(); + void SaveEditControlValue(); + + + // ------ grid location functions + // Note that all of these functions work with the logical coordinates of + // grid cells and labels so you will need to convert from device + // coordinates for mouse events etc. + // + + //void XYToCell( int x, int y, wxGridCellCoords& ); + %addmethods { + %new wxGridCellCoords* XYToCell(int x, int y) { + wxGridCellCoords rv; + self->XYToCell(x, y, rv); + return new wxGridCellCoords(rv); + } + } + + int YToRow( int y ); + int XToCol( int x ); + + int YToEdgeOfRow( int y ); + int XToEdgeOfCol( int x ); + + wxRect CellToRect( int row, int col ); + // TODO: ??? wxRect CellToRect( const wxGridCellCoords& coords ); + + + int GetGridCursorRow(); + int GetGridCursorCol(); + + // check to see if a cell is either wholly visible (the default arg) or + // at least partially visible in the grid window + // + bool IsVisible( int row, int col, bool wholeCellVisible = TRUE ); + // TODO: ??? bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = TRUE ); + void MakeCellVisible( int row, int col ); + // TODO: ??? void MakeCellVisible( const wxGridCellCoords& coords ); + + + // ------ grid cursor movement functions + // + void SetGridCursor( int row, int col ); + bool MoveCursorUp( bool expandSelection ); + bool MoveCursorDown( bool expandSelection ); + bool MoveCursorLeft( bool expandSelection ); + bool MoveCursorRight( bool expandSelection ); + bool MovePageDown(); + bool MovePageUp(); + bool MoveCursorUpBlock( bool expandSelection ); + bool MoveCursorDownBlock( bool expandSelection ); + bool MoveCursorLeftBlock( bool expandSelection ); + bool MoveCursorRightBlock( bool expandSelection ); + + + // ------ label and gridline formatting + // + int GetDefaultRowLabelSize(); + int GetRowLabelSize(); + int GetDefaultColLabelSize(); + int GetColLabelSize(); + wxColour GetLabelBackgroundColour(); + wxColour GetLabelTextColour(); + wxFont GetLabelFont(); + void GetRowLabelAlignment( int *OUTPUT, int *OUTPUT ); + void GetColLabelAlignment( int *OUTPUT, int *OUTPUT ); + wxString GetRowLabelValue( int row ); + wxString GetColLabelValue( int col ); + wxColour GetGridLineColour(); + wxColour GetCellHighlightColour(); + + void SetRowLabelSize( int width ); + void SetColLabelSize( int height ); + void SetLabelBackgroundColour( const wxColour& ); + void SetLabelTextColour( const wxColour& ); + void SetLabelFont( const wxFont& ); + void SetRowLabelAlignment( int horiz, int vert ); + void SetColLabelAlignment( int horiz, int vert ); + void SetRowLabelValue( int row, const wxString& ); + void SetColLabelValue( int col, const wxString& ); + void SetGridLineColour( const wxColour& ); + void SetCellHighlightColour( const wxColour& ); + + void EnableDragRowSize( bool enable = TRUE ); + void DisableDragRowSize(); + bool CanDragRowSize(); + void EnableDragColSize( bool enable = TRUE ); + void DisableDragColSize(); + bool CanDragColSize(); + void EnableDragGridSize(bool enable = TRUE); + void DisableDragGridSize(); + bool CanDragGridSize(); + + // this sets the specified attribute for all cells in this row/col + void SetRowAttr(int row, wxGridCellAttr *attr); + void SetColAttr(int col, wxGridCellAttr *attr); + + // shortcuts for setting the column parameters + + // set the format for the data in the column: default is string + void SetColFormatBool(int col); + void SetColFormatNumber(int col); + void SetColFormatFloat(int col, int width = -1, int precision = -1); + void SetColFormatCustom(int col, const wxString& typeName); + + void EnableGridLines( bool enable = TRUE ); + bool GridLinesEnabled(); + + // ------ row and col formatting + // + int GetDefaultRowSize(); + int GetRowSize( int row ); + int GetDefaultColSize(); + int GetColSize( int col ); + wxColour GetDefaultCellBackgroundColour(); + wxColour GetCellBackgroundColour( int row, int col ); + wxColour GetDefaultCellTextColour(); + wxColour GetCellTextColour( int row, int col ); + wxFont GetDefaultCellFont(); + wxFont GetCellFont( int row, int col ); + void GetDefaultCellAlignment( int *horiz, int *vert ); + void GetCellAlignment( int row, int col, int *horiz, int *vert ); + + void SetDefaultRowSize( int height, bool resizeExistingRows = FALSE ); + void SetRowSize( int row, int height ); + void SetDefaultColSize( int width, bool resizeExistingCols = FALSE ); + + void SetColSize( int col, int width ); + + // automatically size the column or row to fit to its contents, if + // setAsMin is TRUE, this optimal width will also be set as minimal width + // for this column + void AutoSizeColumn( int col, bool setAsMin = TRUE ); + void AutoSizeRow( int row, bool setAsMin = TRUE ); + + + // auto size all columns (very ineffective for big grids!) + void AutoSizeColumns( bool setAsMin = TRUE ); + void AutoSizeRows( bool setAsMin = TRUE ); + + // auto size the grid, that is make the columns/rows of the "right" size + // and also set the grid size to just fit its contents + void AutoSize(); + + // column won't be resized to be lesser width - this must be called during + // the grid creation because it won't resize the column if it's already + // narrower than the minimal width + void SetColMinimalWidth( int col, int width ); + void SetRowMinimalHeight( int row, int width ); + + void SetDefaultCellBackgroundColour( const wxColour& ); + void SetCellBackgroundColour( int row, int col, const wxColour& ); + void SetDefaultCellTextColour( const wxColour& ); + + void SetCellTextColour( int row, int col, const wxColour& ); + void SetDefaultCellFont( const wxFont& ); + void SetCellFont( int row, int col, const wxFont& ); + void SetDefaultCellAlignment( int horiz, int vert ); + void SetCellAlignment( int row, int col, int horiz, int vert ); + + // takes ownership of the pointer + void SetDefaultRenderer(wxGridCellRenderer *renderer); + void SetCellRenderer(int row, int col, wxGridCellRenderer *renderer); + wxGridCellRenderer *GetDefaultRenderer() const; + wxGridCellRenderer* GetCellRenderer(int row, int col); + + // takes ownership of the pointer + void SetDefaultEditor(wxGridCellEditor *editor); + void SetCellEditor(int row, int col, wxGridCellEditor *editor); + wxGridCellEditor *GetDefaultEditor() const; + wxGridCellEditor* GetCellEditor(int row, int col); + + + + // ------ cell value accessors + // + wxString GetCellValue( int row, int col ); + // TODO: ??? wxString GetCellValue( const wxGridCellCoords& coords ) + + void SetCellValue( int row, int col, const wxString& s ); + // TODO: ??? void SetCellValue( const wxGridCellCoords& coords, const wxString& s ) + + // returns TRUE if the cell can't be edited + bool IsReadOnly(int row, int col) const; + + // make the cell editable/readonly + void SetReadOnly(int row, int col, bool isReadOnly = TRUE); + + // ------ selections of blocks of cells + // + void SelectRow( int row, bool addToSelected = FALSE ); + void SelectCol( int col, bool addToSelected = FALSE ); + + void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected = FALSE ); + // TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft, + // TODO: ??? const wxGridCellCoords& bottomRight ) + + void SelectAll(); + bool IsSelection(); + void ClearSelection(); + bool IsInSelection( int row, int col ); + // TODO: ??? bool IsInSelection( const wxGridCellCoords& coords ) + + + // This function returns the rectangle that encloses the block of cells + // limited by TopLeft and BottomRight cell in device coords and clipped + // to the client size of the grid window. + // + wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft, + const wxGridCellCoords & bottomRight ); + + + // Access or update the selection fore/back colours + wxColour GetSelectionBackground() const; + wxColour GetSelectionForeground() const; + + void SetSelectionBackground(const wxColour& c); + void SetSelectionForeground(const wxColour& c); + + + // Methods for a registry for mapping data types to Renderers/Editors + void RegisterDataType(const wxString& typeName, + wxGridCellRenderer* renderer, + wxGridCellEditor* editor); + wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const; + // TODO: ??? wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const + wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const; + wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const; + wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const; + + // grid may occupy more space than needed for its rows/columns, this + // function allows to set how big this extra space is + void SetMargins(int extraWidth, int extraHeight); +}; + + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- +// Grid events and stuff + + + +class wxGridEvent : public wxNotifyEvent +{ +public: + wxGridEvent(int id, wxEventType type, wxGrid* obj, + int row=-1, int col=-1, int x=-1, int y=-1, bool sel = TRUE, + bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE); + + virtual int GetRow(); + virtual int GetCol(); + wxPoint GetPosition(); + bool Selecting(); + bool ControlDown(); + bool MetaDown(); + bool ShiftDown(); + bool AltDown(); + +}; + + +class wxGridSizeEvent : public wxNotifyEvent +{ +public: + wxGridSizeEvent(int id, wxEventType type, wxGrid* obj, + int rowOrCol=-1, int x=-1, int y=-1, + bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE); + + int GetRowOrCol(); + wxPoint GetPosition(); + bool ControlDown(); + bool MetaDown(); + bool ShiftDown(); + bool AltDown(); + +}; + + +class wxGridRangeSelectEvent : public wxNotifyEvent +{ +public: + wxGridRangeSelectEvent(int id, wxEventType type, wxGrid* obj, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool sel = TRUE, + bool control=FALSE, bool shift=FALSE, + bool alt=FALSE, bool meta=FALSE); + + wxGridCellCoords GetTopLeftCoords(); + wxGridCellCoords GetBottomRightCoords(); + int GetTopRow(); + int GetBottomRow(); + int GetLeftCol(); + int GetRightCol(); + bool Selecting(); + bool ControlDown(); + bool MetaDown(); + bool ShiftDown(); + bool AltDown(); +}; + +enum { + wxEVT_GRID_CELL_LEFT_CLICK, + wxEVT_GRID_CELL_RIGHT_CLICK, + wxEVT_GRID_CELL_LEFT_DCLICK, + wxEVT_GRID_CELL_RIGHT_DCLICK, + wxEVT_GRID_LABEL_LEFT_CLICK, + wxEVT_GRID_LABEL_RIGHT_CLICK, + wxEVT_GRID_LABEL_LEFT_DCLICK, + wxEVT_GRID_LABEL_RIGHT_DCLICK, + wxEVT_GRID_ROW_SIZE, + wxEVT_GRID_COL_SIZE, + wxEVT_GRID_RANGE_SELECT, + wxEVT_GRID_CELL_CHANGE, + wxEVT_GRID_SELECT_CELL, + wxEVT_GRID_EDITOR_SHOWN, + wxEVT_GRID_EDITOR_HIDDEN, +}; + + + +%pragma(python) code = " +def EVT_GRID_CELL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_CLICK, fn) + +def EVT_GRID_CELL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_CLICK, fn) + +def EVT_GRID_CELL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_DCLICK, fn) + +def EVT_GRID_CELL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_DCLICK, fn) + +def EVT_GRID_LABEL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_CLICK, fn) + +def EVT_GRID_LABEL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_CLICK, fn) + +def EVT_GRID_LABEL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_DCLICK, fn) + +def EVT_GRID_LABEL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_DCLICK, fn) + +def EVT_GRID_ROW_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_ROW_SIZE, fn) + +def EVT_GRID_COL_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_COL_SIZE, fn) + +def EVT_GRID_RANGE_SELECT(win, fn): + win.Connect(-1, -1, wxEVT_GRID_RANGE_SELECT, fn) + +def EVT_GRID_CELL_CHANGE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) + +def EVT_GRID_SELECT_CELL(win, fn): + win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) + +def EVT_GRID_EDITOR_SHOWN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_SHOWN, fn) + +def EVT_GRID_EDITOR_HIDDEN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_HIDDEN, fn) + +" + +//--------------------------------------------------------------------------- + +%init %{ + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); +%} + +//--------------------------------------------------------------------------- + +%pragma(python) include="_gridextras.py"; + +//--------------------------------------------------------------------------- + + +#endif diff --git a/utils/wxPython/src/gtk/.cvsignore b/wxPython/src/gtk/.cvsignore similarity index 100% rename from utils/wxPython/src/gtk/.cvsignore rename to wxPython/src/gtk/.cvsignore diff --git a/wxPython/src/gtk/calendar.cpp b/wxPython/src/gtk/calendar.cpp new file mode 100644 index 0000000000..590683fb55 --- /dev/null +++ b/wxPython/src/gtk/calendar.cpp @@ -0,0 +1,1804 @@ +/* + * FILE : src/gtk/calendar.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initcalendarc + +#define SWIG_name "calendarc" + +#include "export.h" +#include + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; +#ifdef __cplusplus +extern "C" { +#endif +#define new_wxCalendarDateAttr(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxCalendarDateAttr(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxCalendarDateAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _result; + wxColour * _arg0; + wxColour * _arg1 = (wxColour *) &wxNullColour; + wxColour * _arg2 = (wxColour *) &wxNullColour; + wxFont * _arg3 = (wxFont *) &wxNullFont; + wxCalendarDateBorder _arg4 = (wxCalendarDateBorder ) (wxCAL_BORDER_NONE); + wxColour temp; + PyObject * _obj0 = 0; + wxColour temp0; + PyObject * _obj1 = 0; + wxColour temp1; + PyObject * _obj2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "colText","colBack","colBorder","font","border", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOi:new_wxCalendarDateAttr",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4)) + return NULL; +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) + return NULL; +} + if (_obj1) +{ + _arg1 = &temp0; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} + if (_obj2) +{ + _arg2 = &temp1; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxCalendarDateAttr. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttr(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarDateAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxCalendarDateAttrBorder(_swigarg0,_swigarg1) (new wxCalendarDateAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxCalendarDateAttrBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _result; + wxCalendarDateBorder _arg0; + wxColour * _arg1 = (wxColour *) &wxNullColour; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "border","colBorder", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|O:new_wxCalendarDateAttrBorder",_kwnames,&_arg0,&_obj1)) + return NULL; + if (_obj1) +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttrBorder(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarDateAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetTextColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetBackgroundColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetBorderColour(_swigobj,_swigarg0) (_swigobj->SetBorderColour(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetBorderColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetBorderColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetBorderColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetBorderColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetFont. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarDateAttr_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetBorder(_swigobj,_swigarg0) (_swigobj->SetBorder(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxCalendarDateBorder _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","border", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarDateAttr_SetBorder",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetBorder. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetBorder(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetHoliday(_swigobj,_swigarg0) (_swigobj->SetHoliday(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetHoliday(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","holiday", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarDateAttr_SetHoliday",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetHoliday. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetHoliday(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) +static PyObject *_wrap_wxCalendarDateAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasTextColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasTextColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasBackgroundColour(_swigobj) (_swigobj->HasBackgroundColour()) +static PyObject *_wrap_wxCalendarDateAttr_HasBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasBackgroundColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasBackgroundColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasBorderColour(_swigobj) (_swigobj->HasBorderColour()) +static PyObject *_wrap_wxCalendarDateAttr_HasBorderColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasBorderColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasBorderColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasBorderColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasFont(_swigobj) (_swigobj->HasFont()) +static PyObject *_wrap_wxCalendarDateAttr_HasFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasFont. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasBorder(_swigobj) (_swigobj->HasBorder()) +static PyObject *_wrap_wxCalendarDateAttr_HasBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasBorder",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasBorder. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasBorder(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_IsHoliday(_swigobj) (_swigobj->IsHoliday()) +static PyObject *_wrap_wxCalendarDateAttr_IsHoliday(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_IsHoliday",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_IsHoliday. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_IsHoliday(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxCalendarDateAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetTextColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarDateAttr_GetTextColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxCalendarDateAttr_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetBackgroundColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarDateAttr_GetBackgroundColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetBorderColour(_swigobj) (_swigobj->GetBorderColour()) +static PyObject *_wrap_wxCalendarDateAttr_GetBorderColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetBorderColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetBorderColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarDateAttr_GetBorderColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxCalendarDateAttr_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetFont. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxFont & _result_ref = wxCalendarDateAttr_GetFont(_arg0); + _result = (wxFont *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetBorder(_swigobj) (_swigobj->GetBorder()) +static PyObject *_wrap_wxCalendarDateAttr_GetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateBorder _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetBorder",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetBorder. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateBorder )wxCalendarDateAttr_GetBorder(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxCalendarEventTowxCommandEvent(void *ptr) { + wxCalendarEvent *src; + wxCommandEvent *dest; + src = (wxCalendarEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxCalendarEventTowxEvent(void *ptr) { + wxCalendarEvent *src; + wxEvent *dest; + src = (wxCalendarEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxCalendarEvent(_swigarg0,_swigarg1) (new wxCalendarEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxCalendarEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarEvent * _result; + wxCalendarCtrl * _arg0; + wxEventType _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cal","type", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:new_wxCalendarEvent",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCalendarEvent. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarEvent *)new_wxCalendarEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarEvent_GetDate(_swigobj) (_swigobj->GetDate()) +static PyObject *_wrap_wxCalendarEvent_GetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarEvent_GetDate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarEvent_GetDate. Expected _wxCalendarEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarEvent_GetDate(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarEvent_GetWeekDay(_swigobj) (_swigobj->GetWeekDay()) +static PyObject *_wrap_wxCalendarEvent_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::WeekDay _result; + wxCalendarEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarEvent_GetWeekDay",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarEvent_GetWeekDay. Expected _wxCalendarEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::WeekDay )wxCalendarEvent_GetWeekDay(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxCalendarCtrlTowxControl(void *ptr) { + wxCalendarCtrl *src; + wxControl *dest; + src = (wxCalendarCtrl *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxCalendarCtrlTowxWindow(void *ptr) { + wxCalendarCtrl *src; + wxWindow *dest; + src = (wxCalendarCtrl *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxCalendarCtrlTowxEvtHandler(void *ptr) { + wxCalendarCtrl *src; + wxEvtHandler *dest; + src = (wxCalendarCtrl *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxCalendarCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxCalendarCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxDateTime * _arg2 = (wxDateTime *) &wxDefaultDateTime; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) (wxCAL_SHOW_HOLIDAYS); + char * _arg6 = (char *) "calendar"; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "parent","id","date","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOls:new_wxCalendarCtrl",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCalendarCtrl. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxCalendarCtrl. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarCtrl *)new_wxCalendarCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetDate(_swigobj,_swigarg0) (_swigobj->SetDate(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarCtrl_SetDate",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetDate. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetDate(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetDate(_swigobj) (_swigobj->GetDate()) +static PyObject *_wrap_wxCalendarCtrl_GetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetDate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetDate. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarCtrl_GetDate(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_EnableYearChange(_swigobj,_swigarg0) (_swigobj->EnableYearChange(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_EnableYearChange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_EnableYearChange",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_EnableYearChange. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_EnableYearChange(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_EnableMonthChange(_swigobj,_swigarg0) (_swigobj->EnableMonthChange(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_EnableMonthChange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_EnableMonthChange",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_EnableMonthChange. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_EnableMonthChange(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_EnableHolidayDisplay(_swigobj,_swigarg0) (_swigobj->EnableHolidayDisplay(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_EnableHolidayDisplay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","display", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_EnableHolidayDisplay",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_EnableHolidayDisplay. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_EnableHolidayDisplay(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_SetHeaderColours(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHeaderColours(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetHeaderColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxColour * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","colFg","colBg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxCalendarCtrl_SetHeaderColours",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHeaderColours. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHeaderColours(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetHeaderColourFg(_swigobj) (_swigobj->GetHeaderColourFg()) +static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourFg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHeaderColourFg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHeaderColourFg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourFg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetHeaderColourBg(_swigobj) (_swigobj->GetHeaderColourBg()) +static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourBg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHeaderColourBg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHeaderColourBg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourBg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetHighlightColours(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHighlightColours(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetHighlightColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxColour * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","colFg","colBg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxCalendarCtrl_SetHighlightColours",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHighlightColours. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHighlightColours(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetHighlightColourFg(_swigobj) (_swigobj->GetHighlightColourFg()) +static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourFg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHighlightColourFg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHighlightColourFg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourFg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetHighlightColourBg(_swigobj) (_swigobj->GetHighlightColourBg()) +static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourBg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHighlightColourBg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHighlightColourBg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourBg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetHolidayColours(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHolidayColours(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetHolidayColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxColour * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","colFg","colBg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxCalendarCtrl_SetHolidayColours",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHolidayColours. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHolidayColours(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetHolidayColourFg(_swigobj) (_swigobj->GetHolidayColourFg()) +static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourFg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHolidayColourFg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHolidayColourFg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourFg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetHolidayColourBg(_swigobj) (_swigobj->GetHolidayColourBg()) +static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourBg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHolidayColourBg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHolidayColourBg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourBg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetAttr(_swigobj,_swigarg0) (_swigobj->GetAttr(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _result; + wxCalendarCtrl * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarCtrl_GetAttr",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetAttr. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateAttr *)wxCalendarCtrl_GetAttr(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarDateAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + size_t _arg1; + wxCalendarDateAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","day","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxCalendarCtrl_SetAttr",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetAttr. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_SetAttr. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_SetHoliday(_swigobj,_swigarg0) (_swigobj->SetHoliday(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetHoliday(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarCtrl_SetHoliday",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHoliday. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHoliday(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_ResetAttr(_swigobj,_swigarg0) (_swigobj->ResetAttr(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_ResetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarCtrl_ResetAttr",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_ResetAttr. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_ResetAttr(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_HitTest(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->HitTest(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxCalendarCtrl_HitTest(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarHitTestResult _result; + wxCalendarCtrl * _arg0; + wxPoint * _arg1; + wxDateTime * _arg2 = (wxDateTime *) NULL; + wxDateTime::WeekDay * _arg3 = (wxDateTime::WeekDay *) NULL; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","pos","date","wd", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OO:wxCalendarCtrl_HitTest",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_HitTest. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_HitTest. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime::WeekDay_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxCalendarCtrl_HitTest. Expected _wxDateTime::WeekDay_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarHitTestResult )wxCalendarCtrl_HitTest(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyMethodDef calendarcMethods[] = { + { "wxCalendarCtrl_HitTest", (PyCFunction) _wrap_wxCalendarCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_ResetAttr", (PyCFunction) _wrap_wxCalendarCtrl_ResetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHoliday", (PyCFunction) _wrap_wxCalendarCtrl_SetHoliday, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetAttr", (PyCFunction) _wrap_wxCalendarCtrl_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetAttr", (PyCFunction) _wrap_wxCalendarCtrl_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHolidayColourBg", (PyCFunction) _wrap_wxCalendarCtrl_GetHolidayColourBg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHolidayColourFg", (PyCFunction) _wrap_wxCalendarCtrl_GetHolidayColourFg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHolidayColours", (PyCFunction) _wrap_wxCalendarCtrl_SetHolidayColours, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHighlightColourBg", (PyCFunction) _wrap_wxCalendarCtrl_GetHighlightColourBg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHighlightColourFg", (PyCFunction) _wrap_wxCalendarCtrl_GetHighlightColourFg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHighlightColours", (PyCFunction) _wrap_wxCalendarCtrl_SetHighlightColours, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHeaderColourBg", (PyCFunction) _wrap_wxCalendarCtrl_GetHeaderColourBg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHeaderColourFg", (PyCFunction) _wrap_wxCalendarCtrl_GetHeaderColourFg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHeaderColours", (PyCFunction) _wrap_wxCalendarCtrl_SetHeaderColours, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_EnableHolidayDisplay", (PyCFunction) _wrap_wxCalendarCtrl_EnableHolidayDisplay, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_EnableMonthChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableMonthChange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_EnableYearChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableYearChange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetDate", (PyCFunction) _wrap_wxCalendarCtrl_GetDate, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetDate", (PyCFunction) _wrap_wxCalendarCtrl_SetDate, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarCtrl", (PyCFunction) _wrap_new_wxCalendarCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarEvent_GetWeekDay", (PyCFunction) _wrap_wxCalendarEvent_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarEvent_GetDate", (PyCFunction) _wrap_wxCalendarEvent_GetDate, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarEvent", (PyCFunction) _wrap_new_wxCalendarEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetBorder", (PyCFunction) _wrap_wxCalendarDateAttr_GetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetFont", (PyCFunction) _wrap_wxCalendarDateAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetBorderColour", (PyCFunction) _wrap_wxCalendarDateAttr_GetBorderColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetBackgroundColour", (PyCFunction) _wrap_wxCalendarDateAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetTextColour", (PyCFunction) _wrap_wxCalendarDateAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_IsHoliday", (PyCFunction) _wrap_wxCalendarDateAttr_IsHoliday, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasBorder", (PyCFunction) _wrap_wxCalendarDateAttr_HasBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasFont", (PyCFunction) _wrap_wxCalendarDateAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasBorderColour", (PyCFunction) _wrap_wxCalendarDateAttr_HasBorderColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasBackgroundColour", (PyCFunction) _wrap_wxCalendarDateAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasTextColour", (PyCFunction) _wrap_wxCalendarDateAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetHoliday", (PyCFunction) _wrap_wxCalendarDateAttr_SetHoliday, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetBorder", (PyCFunction) _wrap_wxCalendarDateAttr_SetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetFont", (PyCFunction) _wrap_wxCalendarDateAttr_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetBorderColour", (PyCFunction) _wrap_wxCalendarDateAttr_SetBorderColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetBackgroundColour", (PyCFunction) _wrap_wxCalendarDateAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetTextColour", (PyCFunction) _wrap_wxCalendarDateAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarDateAttrBorder", (PyCFunction) _wrap_new_wxCalendarDateAttrBorder, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarDateAttr", (PyCFunction) _wrap_new_wxCalendarDateAttr, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_wxEvent","_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_class_wxEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_class_wxEvent","_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_wxCommandEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_wxCommandEvent","_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, + { "_class_wxWindow","_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_wxControl","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_wxControl","_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxControl","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_class_wxControl","_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_class_wxCommandEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_wxEvtHandler","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_wxWindow","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, + { "_wxWindow","_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initcalendarc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("calendarc", calendarcMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxCAL_SUNDAY_FIRST", PyInt_FromLong((long) wxCAL_SUNDAY_FIRST)); + PyDict_SetItemString(d,"wxCAL_MONDAY_FIRST", PyInt_FromLong((long) wxCAL_MONDAY_FIRST)); + PyDict_SetItemString(d,"wxCAL_SHOW_HOLIDAYS", PyInt_FromLong((long) wxCAL_SHOW_HOLIDAYS)); + PyDict_SetItemString(d,"wxCAL_NO_YEAR_CHANGE", PyInt_FromLong((long) wxCAL_NO_YEAR_CHANGE)); + PyDict_SetItemString(d,"wxCAL_NO_MONTH_CHANGE", PyInt_FromLong((long) wxCAL_NO_MONTH_CHANGE)); + PyDict_SetItemString(d,"wxCAL_HITTEST_NOWHERE", PyInt_FromLong((long) wxCAL_HITTEST_NOWHERE)); + PyDict_SetItemString(d,"wxCAL_HITTEST_HEADER", PyInt_FromLong((long) wxCAL_HITTEST_HEADER)); + PyDict_SetItemString(d,"wxCAL_HITTEST_DAY", PyInt_FromLong((long) wxCAL_HITTEST_DAY)); + PyDict_SetItemString(d,"wxCAL_BORDER_NONE", PyInt_FromLong((long) wxCAL_BORDER_NONE)); + PyDict_SetItemString(d,"wxCAL_BORDER_SQUARE", PyInt_FromLong((long) wxCAL_BORDER_SQUARE)); + PyDict_SetItemString(d,"wxCAL_BORDER_ROUND", PyInt_FromLong((long) wxCAL_BORDER_ROUND)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_CALENDAR_DOUBLECLICKED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_SEL_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_SEL_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_DAY_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_DAY_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_MONTH_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_MONTH_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_YEAR_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_YEAR_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_WEEKDAY_CLICKED", PyInt_FromLong((long) wxEVT_CALENDAR_WEEKDAY_CLICKED)); + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/calendar.py b/wxPython/src/gtk/calendar.py new file mode 100644 index 0000000000..68f6bf2c7b --- /dev/null +++ b/wxPython/src/gtk/calendar.py @@ -0,0 +1,244 @@ +# This file was created automatically by SWIG. +import calendarc + +from misc import * + +from windows import * + +from gdi import * + +from clip_dnd import * + +from controls import * + +from events import * + +from utils import * +import wx + +def EVT_CALENDAR(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_DOUBLECLICKED, fn) + +def EVT_CALENDAR_SEL_CHANGED(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_SEL_CHANGED, fn) + +def EVT_CALENDAR_DAY(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_DAY_CHANGED, fn) + +def EVT_CALENDAR_MONTH(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_MONTH_CHANGED, fn) + +def EVT_CALENDAR_YEAR(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_YEAR_CHANGED, fn) + +def EVT_CALENDAR_WEEKDAY_CLICKED(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_WEEKDAY_CLICKED, fn) + + +class wxCalendarDateAttrPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetTextColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetBorderColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetBorderColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetFont,(self,) + _args, _kwargs) + return val + def SetBorder(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetBorder,(self,) + _args, _kwargs) + return val + def SetHoliday(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetHoliday,(self,) + _args, _kwargs) + return val + def HasTextColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasTextColour,(self,) + _args, _kwargs) + return val + def HasBackgroundColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasBackgroundColour,(self,) + _args, _kwargs) + return val + def HasBorderColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasBorderColour,(self,) + _args, _kwargs) + return val + def HasFont(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasFont,(self,) + _args, _kwargs) + return val + def HasBorder(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasBorder,(self,) + _args, _kwargs) + return val + def IsHoliday(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_IsHoliday,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBorderColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetBorderColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetFont(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def GetBorder(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetBorder,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCalendarDateAttr(wxCalendarDateAttrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(calendarc.new_wxCalendarDateAttr,_args,_kwargs) + self.thisown = 1 + + + +def wxCalendarDateAttrBorder(*_args,**_kwargs): + val = wxCalendarDateAttrPtr(apply(calendarc.new_wxCalendarDateAttrBorder,_args,_kwargs)) + val.thisown = 1 + return val + + +class wxCalendarEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetDate(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarEvent_GetDate,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetWeekDay(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarEvent_GetWeekDay,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCalendarEvent(wxCalendarEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(calendarc.new_wxCalendarEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxCalendarCtrlPtr(wxControlPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetDate(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetDate,(self,) + _args, _kwargs) + return val + def GetDate(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetDate,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def EnableYearChange(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_EnableYearChange,(self,) + _args, _kwargs) + return val + def EnableMonthChange(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_EnableMonthChange,(self,) + _args, _kwargs) + return val + def EnableHolidayDisplay(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_EnableHolidayDisplay,(self,) + _args, _kwargs) + return val + def SetHeaderColours(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHeaderColours,(self,) + _args, _kwargs) + return val + def GetHeaderColourFg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHeaderColourFg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetHeaderColourBg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHeaderColourBg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def SetHighlightColours(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHighlightColours,(self,) + _args, _kwargs) + return val + def GetHighlightColourFg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHighlightColourFg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetHighlightColourBg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHighlightColourBg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def SetHolidayColours(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHolidayColours,(self,) + _args, _kwargs) + return val + def GetHolidayColourFg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHolidayColourFg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetHolidayColourBg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHolidayColourBg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetAttr(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetAttr,(self,) + _args, _kwargs) + if val: val = wxCalendarDateAttrPtr(val) + return val + def SetAttr(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetAttr,(self,) + _args, _kwargs) + return val + def SetHoliday(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHoliday,(self,) + _args, _kwargs) + return val + def ResetAttr(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_ResetAttr,(self,) + _args, _kwargs) + return val + def HitTest(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_HitTest,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCalendarCtrl(wxCalendarCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(calendarc.new_wxCalendarCtrl,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxCAL_SUNDAY_FIRST = calendarc.wxCAL_SUNDAY_FIRST +wxCAL_MONDAY_FIRST = calendarc.wxCAL_MONDAY_FIRST +wxCAL_SHOW_HOLIDAYS = calendarc.wxCAL_SHOW_HOLIDAYS +wxCAL_NO_YEAR_CHANGE = calendarc.wxCAL_NO_YEAR_CHANGE +wxCAL_NO_MONTH_CHANGE = calendarc.wxCAL_NO_MONTH_CHANGE +wxCAL_HITTEST_NOWHERE = calendarc.wxCAL_HITTEST_NOWHERE +wxCAL_HITTEST_HEADER = calendarc.wxCAL_HITTEST_HEADER +wxCAL_HITTEST_DAY = calendarc.wxCAL_HITTEST_DAY +wxCAL_BORDER_NONE = calendarc.wxCAL_BORDER_NONE +wxCAL_BORDER_SQUARE = calendarc.wxCAL_BORDER_SQUARE +wxCAL_BORDER_ROUND = calendarc.wxCAL_BORDER_ROUND +wxEVT_CALENDAR_DOUBLECLICKED = calendarc.wxEVT_CALENDAR_DOUBLECLICKED +wxEVT_CALENDAR_SEL_CHANGED = calendarc.wxEVT_CALENDAR_SEL_CHANGED +wxEVT_CALENDAR_DAY_CHANGED = calendarc.wxEVT_CALENDAR_DAY_CHANGED +wxEVT_CALENDAR_MONTH_CHANGED = calendarc.wxEVT_CALENDAR_MONTH_CHANGED +wxEVT_CALENDAR_YEAR_CHANGED = calendarc.wxEVT_CALENDAR_YEAR_CHANGED +wxEVT_CALENDAR_WEEKDAY_CLICKED = calendarc.wxEVT_CALENDAR_WEEKDAY_CLICKED + + +#-------------- USER INCLUDE ----------------------- + + +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxCalendarEventPtr = wxCalendarEventPtr diff --git a/utils/wxPython/src/gtk/clip_dnd.cpp b/wxPython/src/gtk/clip_dnd.cpp similarity index 94% rename from utils/wxPython/src/gtk/clip_dnd.cpp rename to wxPython/src/gtk/clip_dnd.cpp index 3e66153b4c..53952e59db 100644 --- a/utils/wxPython/src/gtk/clip_dnd.cpp +++ b/wxPython/src/gtk/clip_dnd.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/clip_dnd.cpp + * FILE : src/gtk/clip_dnd.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,48 +60,28 @@ extern PyObject *SWIG_newvarlink(void); #include #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -137,9 +119,12 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) { if (m_myInst.findCallback("GetDataHere")) { PyObject* ro; ro = m_myInst.callCallbackObj(Py_BuildValue("()")); - rval = (ro != Py_None && PyString_Check(ro)); - if (rval) - memcpy(buf, PyString_AsString(ro), PyString_Size(ro)); + if (ro) { + rval = (ro != Py_None && PyString_Check(ro)); + if (rval) + memcpy(buf, PyString_AsString(ro), PyString_Size(ro)); + Py_DECREF(ro); + } } wxPySaveThread(doSave); return rval; @@ -192,8 +177,11 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() { PyObject* ro; wxBitmap* ptr; ro = m_myInst.callCallbackObj(Py_BuildValue("()")); - if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p")) - rval = ptr; + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p")) + rval = ptr; + Py_DECREF(ro); + } } wxPySaveThread(doSave); return *rval; @@ -337,11 +325,22 @@ static PyObject *_wrap_wxCustomDataFormat(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCustomDataFormat",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1026,17 +1025,19 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args, return _resultobj; } -#define wxPyDataObjectSimple__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyDataObjectSimple__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyDataObjectSimple__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDataObjectSimple * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDataObjectSimple__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDataObjectSimple__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1048,9 +1049,12 @@ static PyObject *_wrap_wxPyDataObjectSimple__setSelf(PyObject *self, PyObject *a { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyDataObjectSimple__setSelf(_arg0,_arg1); + wxPyDataObjectSimple__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1158,11 +1162,22 @@ static PyObject *_wrap_new_wxTextDataObject(PyObject *self, PyObject *args, PyOb return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1262,11 +1277,22 @@ static PyObject *_wrap_wxTextDataObject_SetText(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1320,11 +1346,22 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1345,17 +1382,19 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxPyTextDataObject__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyTextDataObject__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyTextDataObject__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextDataObject * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyTextDataObject__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyTextDataObject__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1367,9 +1406,12 @@ static PyObject *_wrap_wxPyTextDataObject__setSelf(PyObject *self, PyObject *arg { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyTextDataObject__setSelf(_arg0,_arg1); + wxPyTextDataObject__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1550,17 +1592,19 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args, return _resultobj; } -#define wxPyBitmapDataObject__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyBitmapDataObject__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyBitmapDataObject__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyBitmapDataObject * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyBitmapDataObject__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyBitmapDataObject__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1572,9 +1616,12 @@ static PyObject *_wrap_wxPyBitmapDataObject__setSelf(PyObject *self, PyObject *a { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyBitmapDataObject__setSelf(_arg0,_arg1); + wxPyBitmapDataObject__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2214,18 +2261,20 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxDropSource__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +#define wxDropSource__setSelf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setSelf(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxDropSource__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDropSource * _arg0; PyObject * _arg1; - int _arg2; + PyObject * _arg2; + int _arg3; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self","incref", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class","incref", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxDropSource__setSelf",_kwnames,&_argo0,&_obj1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOi:wxDropSource__setSelf",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2237,9 +2286,12 @@ static PyObject *_wrap_wxDropSource__setSelf(PyObject *self, PyObject *args, PyO { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxDropSource__setSelf(_arg0,_arg1,_arg2); + wxDropSource__setSelf(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2479,17 +2531,19 @@ static PyObject *_wrap_new_wxPyDropTarget(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxPyDropTarget__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDropTarget * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDropTarget__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2501,9 +2555,12 @@ static PyObject *_wrap_wxPyDropTarget__setSelf(PyObject *self, PyObject *args, P { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyDropTarget__setSelf(_arg0,_arg1); + wxPyDropTarget__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2792,17 +2849,19 @@ static PyObject *_wrap_new_wxTextDropTarget(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxTextDropTarget__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxTextDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTextDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextDropTarget * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextDropTarget__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2814,9 +2873,12 @@ static PyObject *_wrap_wxTextDropTarget__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxTextDropTarget__setSelf(_arg0,_arg1); + wxTextDropTarget__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3011,17 +3073,19 @@ static PyObject *_wrap_new_wxFileDropTarget(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxFileDropTarget__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxFileDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxFileDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyFileDropTarget * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDropTarget__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3033,9 +3097,12 @@ static PyObject *_wrap_wxFileDropTarget__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxFileDropTarget__setSelf(_arg0,_arg1); + wxFileDropTarget__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3283,12 +3350,9 @@ static PyMethodDef clip_dndcMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_signed_long","_long",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxBitmapDataObject}, { "_wxBitmapDataObject","_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxBitmapDataObject}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -3297,13 +3361,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, + { "_wxPrintQuality","_time_t",0}, { "_byte","_unsigned_char",0}, { "_wxDataObject","_class_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObject}, { "_wxDataObject","_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObject}, @@ -3323,12 +3381,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObject","_wxPyDataObjectSimple",SwigwxPyDataObjectSimpleTowxDataObject}, { "_wxDataObject","_class_wxDataObjectSimple",SwigwxDataObjectSimpleTowxDataObject}, { "_wxDataObject","_wxDataObjectSimple",SwigwxDataObjectSimpleTowxDataObject}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, { "_wxDataObjectSimple","_class_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObjectSimple}, { "_wxDataObjectSimple","_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObjectSimple}, { "_wxDataObjectSimple","_class_wxFileDataObject",SwigwxFileDataObjectTowxDataObjectSimple}, @@ -3343,27 +3397,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObjectSimple","_wxTextDataObject",SwigwxTextDataObjectTowxDataObjectSimple}, { "_wxDataObjectSimple","_class_wxPyDataObjectSimple",SwigwxPyDataObjectSimpleTowxDataObjectSimple}, { "_wxDataObjectSimple","_wxPyDataObjectSimple",SwigwxPyDataObjectSimpleTowxDataObjectSimple}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_class_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxBitmapDataObject}, { "_class_wxBitmapDataObject","_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxBitmapDataObject}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_class_wxMask","_wxMask",0}, { "_wxTextDataObject","_class_wxPyTextDataObject",SwigwxPyTextDataObjectTowxTextDataObject}, { "_wxTextDataObject","_wxPyTextDataObject",SwigwxPyTextDataObjectTowxTextDataObject}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, { "_class_wxDataObject","_class_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObject}, { "_class_wxDataObject","_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObject}, { "_class_wxDataObject","_class_wxFileDataObject",SwigwxFileDataObjectTowxDataObject}, @@ -3382,9 +3426,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObject","_wxPyDataObjectSimple",SwigwxPyDataObjectSimpleTowxDataObject}, { "_class_wxDataObject","_class_wxDataObjectSimple",SwigwxDataObjectSimpleTowxDataObject}, { "_class_wxDataObject","_wxDataObjectSimple",SwigwxDataObjectSimpleTowxDataObject}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, { "_class_wxDataObjectSimple","_class_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObjectSimple}, { "_class_wxDataObjectSimple","_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObjectSimple}, { "_class_wxDataObjectSimple","_class_wxFileDataObject",SwigwxFileDataObjectTowxDataObjectSimple}, @@ -3399,54 +3440,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObjectSimple","_wxTextDataObject",SwigwxTextDataObjectTowxDataObjectSimple}, { "_class_wxDataObjectSimple","_class_wxPyDataObjectSimple",SwigwxPyDataObjectSimpleTowxDataObjectSimple}, { "_class_wxDataObjectSimple","_wxPyDataObjectSimple",SwigwxPyDataObjectSimpleTowxDataObjectSimple}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_wxDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxDropTarget}, { "_wxDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxDropTarget}, { "_wxDropTarget","_class_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxDropTarget}, { "_wxDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxDropTarget}, { "_wxDropTarget","_class_wxPyDropTarget",SwigwxPyDropTargetTowxDropTarget}, { "_wxDropTarget","_wxPyDropTarget",SwigwxPyDropTargetTowxDropTarget}, - { "_wxDropTarget","_class_wxDropTarget",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget}, { "_class_wxPyDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget}, { "_class_wxPyDropTarget","_class_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget}, { "_class_wxPyDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, { "_class_wxTextDataObject","_class_wxPyTextDataObject",SwigwxPyTextDataObjectTowxTextDataObject}, { "_class_wxTextDataObject","_wxPyTextDataObject",SwigwxPyTextDataObjectTowxTextDataObject}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -3456,44 +3481,24 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxDropTarget}, { "_class_wxDropTarget","_class_wxPyDropTarget",SwigwxPyDropTargetTowxDropTarget}, { "_class_wxDropTarget","_wxPyDropTarget",SwigwxPyDropTargetTowxDropTarget}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3502,22 +3507,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -3525,24 +3528,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_wxRegion","_class_wxRegion",0}, { "_wxPyDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget}, { "_wxPyDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget}, { "_wxPyDropTarget","_class_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget}, { "_wxPyDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/gtk/clip_dnd.py b/wxPython/src/gtk/clip_dnd.py similarity index 98% rename from utils/wxPython/src/gtk/clip_dnd.py rename to wxPython/src/gtk/clip_dnd.py index 471aecf292..3e9416a13d 100644 --- a/utils/wxPython/src/gtk/clip_dnd.py +++ b/wxPython/src/gtk/clip_dnd.py @@ -109,7 +109,7 @@ class wxPyDataObjectSimple(wxPyDataObjectSimplePtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyDataObjectSimple,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyDataObjectSimple) @@ -168,7 +168,7 @@ class wxPyTextDataObject(wxPyTextDataObjectPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyTextDataObject,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyTextDataObject) @@ -207,7 +207,7 @@ class wxPyBitmapDataObject(wxPyBitmapDataObjectPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyBitmapDataObject,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyBitmapDataObject) @@ -333,7 +333,7 @@ class wxDropSource(wxDropSourcePtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxDropSource,_args,_kwargs) self.thisown = 1 - self._setSelf(self, 0) + self._setSelf(self, wxDropSource, 0) @@ -391,7 +391,7 @@ class wxPyDropTarget(wxPyDropTargetPtr): self.this = apply(clip_dndc.new_wxPyDropTarget,_args,_kwargs) self.thisown = 1 if _args:_args[0].thisown = 0 - self._setSelf(self) + self._setSelf(self, wxPyDropTarget) @@ -424,7 +424,7 @@ class wxTextDropTarget(wxTextDropTargetPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxTextDropTarget,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxTextDropTarget) @@ -457,7 +457,7 @@ class wxFileDropTarget(wxFileDropTargetPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxFileDropTarget,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxFileDropTarget) diff --git a/utils/wxPython/src/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp similarity index 86% rename from utils/wxPython/src/gtk/cmndlgs.cpp rename to wxPython/src/gtk/cmndlgs.cpp index 032cfc54dc..f27c296198 100644 --- a/utils/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/cmndlgs.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/cmndlgs.cpp + * FILE : src/gtk/cmndlgs.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,48 +61,28 @@ extern PyObject *SWIG_newvarlink(void); #include #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -288,11 +270,12 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py wxColourData * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourData_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourData_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -301,13 +284,11 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxColourData_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxColourData_SetColour(_arg0,*_arg1); @@ -325,11 +306,12 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar int _arg1; wxColour * _arg2; PyObject * _argo0 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","i","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxColourData_SetCustomColour",_kwnames,&_argo0,&_arg1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxColourData_SetCustomColour",_kwnames,&_argo0,&_arg1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -338,13 +320,11 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxColourData_SetCustomColour. Expected _wxColour_p."); +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); @@ -532,7 +512,7 @@ static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject char * _arg1 = (char *) "Choose a directory"; char * _arg2 = (char *) ""; long _arg3 = (long ) 0; - wxPoint * _arg4 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj4 = 0; @@ -681,11 +661,22 @@ static PyObject *_wrap_wxDirDialog_SetMessage(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -721,11 +712,22 @@ static PyObject *_wrap_wxDirDialog_SetPath(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -810,7 +812,7 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject char * _arg3 = (char *) ""; char * _arg4 = (char *) "*.*"; long _arg5 = (long ) 0; - wxPoint * _arg6 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg6 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj6 = 0; @@ -1082,11 +1084,22 @@ static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1122,11 +1135,22 @@ static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1190,11 +1214,22 @@ static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1230,11 +1265,22 @@ static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1298,11 +1344,22 @@ static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1345,6 +1402,84 @@ static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, Py return _resultobj; } +static PyObject * wxFileDialog_GetFilenames(wxFileDialog *self) { + wxArrayString arr; + self->GetFilenames(arr); + size_t count = arr.GetCount(); + PyObject* listObj = PyList_New(0); + for(size_t x=0; xGetPaths(arr); + size_t count = arr.GetCount(); + PyObject* listObj = PyList_New(0); + for(size_t x=0; x= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj4) { @@ -1627,7 +1784,7 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO char * _arg2 = (char *) "Input Text"; char * _arg3 = (char *) ""; long _arg4 = (long ) wxOK|wxCANCEL|wxCENTRE; - wxPoint * _arg5 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg5 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj5 = 0; @@ -1717,11 +1874,22 @@ static PyObject *_wrap_wxTextEntryDialog_SetValue(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2092,11 +2260,12 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb wxFontData * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontData_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontData_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2105,13 +2274,11 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxFontData_SetColour(_arg0,*_arg1); @@ -2394,7 +2561,7 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj char * _arg1; char * _arg2 = (char *) "Message box"; long _arg3 = (long ) wxOK|wxCANCEL|wxCENTRE; - wxPoint * _arg4 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj4 = 0; @@ -2502,18 +2669,40 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOi:new_wxProgressDialog",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -2634,6 +2823,8 @@ static PyMethodDef cmndlgscMethods[] = { { "wxSingleChoiceDialog_GetStringSelection", (PyCFunction) _wrap_wxSingleChoiceDialog_GetStringSelection, METH_VARARGS | METH_KEYWORDS }, { "wxSingleChoiceDialog_GetSelection", (PyCFunction) _wrap_wxSingleChoiceDialog_GetSelection, METH_VARARGS | METH_KEYWORDS }, { "new_wxSingleChoiceDialog", (PyCFunction) _wrap_new_wxSingleChoiceDialog, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetPaths", (PyCFunction) _wrap_wxFileDialog_GetPaths, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetFilenames", (PyCFunction) _wrap_wxFileDialog_GetFilenames, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_ShowModal", (PyCFunction) _wrap_wxFileDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_SetWildcard", (PyCFunction) _wrap_wxFileDialog_SetWildcard, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_SetStyle", (PyCFunction) _wrap_wxFileDialog_SetStyle, METH_VARARGS | METH_KEYWORDS }, @@ -2677,14 +2868,7 @@ static PyMethodDef cmndlgscMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -2693,11 +2877,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_class_wxEvtHandler","_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler}, @@ -2714,51 +2894,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxEvtHandler","_wxDirDialog",SwigwxDirDialogTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxColourDialog",SwigwxColourDialogTowxEvtHandler}, { "_class_wxEvtHandler","_wxColourDialog",SwigwxColourDialogTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_wxMask","_class_wxMask",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxMessageDialog",SwigwxMessageDialogTowxPanel}, { "_wxPanel","_wxMessageDialog",SwigwxMessageDialogTowxPanel}, { "_wxPanel","_class_wxFontDialog",SwigwxFontDialogTowxPanel}, @@ -2773,15 +2918,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPanel","_wxDirDialog",SwigwxDirDialogTowxPanel}, { "_wxPanel","_class_wxColourDialog",SwigwxColourDialogTowxPanel}, { "_wxPanel","_wxColourDialog",SwigwxColourDialogTowxPanel}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_class_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_class_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog}, @@ -2796,80 +2932,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDialog","_wxDirDialog",SwigwxDirDialogTowxDialog}, { "_class_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog}, { "_class_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxMessageDialog",SwigwxMessageDialogTowxPanel}, { "_class_wxPanel","_wxMessageDialog",SwigwxMessageDialogTowxPanel}, { "_class_wxPanel","_class_wxFontDialog",SwigwxFontDialogTowxPanel}, @@ -2884,30 +2961,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPanel","_wxDirDialog",SwigwxDirDialogTowxPanel}, { "_class_wxPanel","_class_wxColourDialog",SwigwxColourDialogTowxPanel}, { "_class_wxPanel","_wxColourDialog",SwigwxColourDialogTowxPanel}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxProgressDialog",SwigwxProgressDialogTowxWindow}, @@ -2926,47 +2987,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_wxDirDialog",SwigwxDirDialogTowxWindow}, { "_class_wxWindow","_class_wxColourDialog",SwigwxColourDialogTowxWindow}, { "_class_wxWindow","_wxColourDialog",SwigwxColourDialogTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, { "_wxDialog","_class_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_wxDialog","_wxMessageDialog",SwigwxMessageDialogTowxDialog}, { "_wxDialog","_class_wxFontDialog",SwigwxFontDialogTowxDialog}, @@ -2981,68 +3011,36 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDialog","_wxDirDialog",SwigwxDirDialogTowxDialog}, { "_wxDialog","_class_wxColourDialog",SwigwxColourDialogTowxDialog}, { "_wxDialog","_wxColourDialog",SwigwxColourDialogTowxDialog}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, { "_wxFrame","_class_wxProgressDialog",SwigwxProgressDialogTowxFrame}, { "_wxFrame","_wxProgressDialog",SwigwxProgressDialogTowxFrame}, - { "_wxFrame","_class_wxFrame",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -3050,29 +3048,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_wxEvtHandler","_wxProgressDialog",SwigwxProgressDialogTowxEvtHandler}, { "_wxEvtHandler","_class_wxMessageDialog",SwigwxMessageDialogTowxEvtHandler}, @@ -3089,21 +3066,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_wxDirDialog",SwigwxDirDialogTowxEvtHandler}, { "_wxEvtHandler","_class_wxColourDialog",SwigwxColourDialogTowxEvtHandler}, { "_wxEvtHandler","_wxColourDialog",SwigwxColourDialogTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxProgressDialog",SwigwxProgressDialogTowxWindow}, { "_wxWindow","_wxProgressDialog",SwigwxProgressDialogTowxWindow}, { "_wxWindow","_class_wxMessageDialog",SwigwxMessageDialogTowxWindow}, @@ -3120,11 +3082,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxDirDialog",SwigwxDirDialogTowxWindow}, { "_wxWindow","_class_wxColourDialog",SwigwxColourDialogTowxWindow}, { "_wxWindow","_wxColourDialog",SwigwxColourDialogTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, { "_class_wxFrame","_class_wxProgressDialog",SwigwxProgressDialogTowxFrame}, { "_class_wxFrame","_wxProgressDialog",SwigwxProgressDialogTowxFrame}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/cmndlgs.py b/wxPython/src/gtk/cmndlgs.py similarity index 95% rename from utils/wxPython/src/msw/cmndlgs.py rename to wxPython/src/gtk/cmndlgs.py index 1935f27a3e..0947274149 100644 --- a/utils/wxPython/src/msw/cmndlgs.py +++ b/wxPython/src/gtk/cmndlgs.py @@ -71,7 +71,7 @@ class wxColourDialog(wxColourDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxColourDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -104,7 +104,7 @@ class wxDirDialog(wxDirDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxDirDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -158,13 +158,19 @@ class wxFileDialogPtr(wxDialogPtr): def ShowModal(self, *_args, **_kwargs): val = apply(cmndlgsc.wxFileDialog_ShowModal,(self,) + _args, _kwargs) return val + def GetFilenames(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFileDialog_GetFilenames,(self,) + _args, _kwargs) + return val + def GetPaths(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFileDialog_GetPaths,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFileDialog(wxFileDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFileDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -191,7 +197,7 @@ class wxSingleChoiceDialog(wxSingleChoiceDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -215,7 +221,7 @@ class wxTextEntryDialog(wxTextEntryDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxTextEntryDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -296,7 +302,7 @@ class wxFontDialog(wxFontDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFontDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -314,7 +320,7 @@ class wxMessageDialog(wxMessageDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxMessageDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) diff --git a/utils/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp similarity index 89% rename from utils/wxPython/src/gtk/controls.cpp rename to wxPython/src/gtk/controls.cpp index c2945fa8d8..2d9b1b6c11 100644 --- a/utils/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/controls.cpp + * FILE : src/gtk/controls.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -56,6 +58,7 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include #include +#include #include #include //#include @@ -71,48 +74,28 @@ extern PyObject *SWIG_newvarlink(void); #endif -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -120,8 +103,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG - wxSize wxButton_GetDefaultSize() { return wxButton::GetDefaultSize(); } @@ -184,10 +165,10 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k wxControl * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "control"; PyObject * _argo0 = 0; wxPoint temp; @@ -330,11 +311,22 @@ static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -381,10 +373,10 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "button"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -407,11 +399,22 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -484,11 +487,12 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar wxButton * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -497,13 +501,11 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxButton_SetBackgroundColour(_arg0,*_arg1); @@ -520,11 +522,12 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar wxButton * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetForegroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetForegroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -533,13 +536,11 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetForegroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxButton_SetForegroundColour(_arg0,*_arg1); @@ -589,10 +590,10 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje wxWindow * _arg0; wxWindowID _arg1; wxBitmap * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxBU_AUTODRAW; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "button"; PyObject * _argo0 = 0; PyObject * _argo2 = 0; @@ -939,6 +940,89 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a return _resultobj; } +#define wxBitmapButton_SetMargins(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMargins(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxBitmapButton_SetMargins(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxBitmapButton_SetMargins",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmapButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_SetMargins. Expected _wxBitmapButton_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmapButton_GetMarginX(_swigobj) (_swigobj->GetMarginX()) +static PyObject *_wrap_wxBitmapButton_GetMarginX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxBitmapButton * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBitmapButton_GetMarginX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmapButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetMarginX. Expected _wxBitmapButton_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmapButton_GetMarginX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmapButton_GetMarginY(_swigobj) (_swigobj->GetMarginY()) +static PyObject *_wrap_wxBitmapButton_GetMarginY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxBitmapButton * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBitmapButton_GetMarginY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmapButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetMarginY. Expected _wxBitmapButton_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmapButton_GetMarginY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxCheckBoxTowxControl(void *ptr) { wxCheckBox *src; wxControl *dest; @@ -970,10 +1054,10 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "checkBox"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -996,11 +1080,22 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -1127,12 +1222,12 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw wxChoice * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) 0; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "choice"; PyObject * _argo0 = 0; wxPoint temp; @@ -1226,11 +1321,22 @@ static PyObject *_wrap_wxChoice_Append(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1294,11 +1400,22 @@ static PyObject *_wrap_wxChoice_FindString(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1535,11 +1652,22 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1594,12 +1722,12 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; char * _arg2 = (char *) ""; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; int _arg5 = (int ) 0; wxString * _arg6 = (wxString *) NULL; long _arg7 = (long ) 0; - wxValidator * _arg8 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; char * _arg9 = (char *) "comboBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -1693,11 +1821,22 @@ static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1843,11 +1982,22 @@ static PyObject *_wrap_wxComboBox_FindString(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2116,11 +2266,22 @@ static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2297,11 +2458,22 @@ static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2348,10 +2520,10 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa wxWindow * _arg0; wxWindowID _arg1; int _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxGA_HORIZONTAL; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "gauge"; PyObject * _argo0 = 0; wxPoint temp; @@ -2657,8 +2829,8 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticBox"; PyObject * _argo0 = 0; @@ -2681,11 +2853,22 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -2748,8 +2931,8 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject wxStaticLine * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxLI_HORIZONTAL; char * _arg5 = (char *) "staticLine"; PyObject * _argo0 = 0; @@ -2828,8 +3011,8 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticText"; PyObject * _argo0 = 0; @@ -2852,11 +3035,22 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -2941,11 +3135,22 @@ static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2991,12 +3196,12 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k wxListBox * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "listBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -3090,11 +3295,22 @@ static PyObject *_wrap_wxListBox_Append(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3214,11 +3430,22 @@ static PyObject *_wrap_wxListBox_FindString(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3264,7 +3491,7 @@ static PyObject * wxListBox_GetSelections(wxListBox *self) { wxArrayInt lst; self->GetSelections(lst); PyObject *tup = PyTuple_New(lst.GetCount()); - for(int i=0; i= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3633,11 +3871,22 @@ static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3675,11 +3924,22 @@ static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } _arg2 = (bool ) tempbool2; { @@ -3734,12 +3994,12 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje wxCheckListBox * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) 0; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "listBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -3976,10 +4236,10 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; char * _arg2 = (char *) ""; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "text"; PyObject * _argo0 = 0; wxPoint temp; @@ -4364,11 +4624,22 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4509,11 +4780,22 @@ static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4550,11 +4832,22 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4703,11 +4996,22 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4771,11 +5075,22 @@ static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4811,11 +5126,22 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5145,11 +5471,22 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5195,10 +5532,10 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject wxScrollBar * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSB_HORIZONTAL; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "scrollBar"; PyObject * _argo0 = 0; wxPoint temp; @@ -5453,8 +5790,8 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject wxSpinButton * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_HORIZONTAL; char * _arg5 = (char *) "spinButton"; PyObject * _argo0 = 0; @@ -5671,8 +6008,8 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje wxWindow * _arg0; wxWindowID _arg1; wxBitmap * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticBitmap"; PyObject * _argo0 = 0; @@ -5866,13 +6203,13 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; int _arg5 = (int ) 0; wxString * _arg6 = (wxString *) NULL; int _arg7 = (int ) 0; long _arg8 = (long ) wxRA_HORIZONTAL; - wxValidator * _arg9 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; char * _arg10 = (char *) "radioBox"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -5896,11 +6233,22 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -6040,11 +6388,22 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6232,11 +6591,22 @@ static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6300,11 +6670,22 @@ static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6412,10 +6793,10 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "radioButton"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -6438,11 +6819,22 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -6572,10 +6964,10 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw int _arg2; int _arg3; int _arg4; - wxPoint * _arg5 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg6 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg5 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg6 = (wxSize *) &wxDefaultSize; long _arg7 = (long ) wxSL_HORIZONTAL; - wxValidator * _arg8 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; char * _arg9 = (char *) "slider"; PyObject * _argo0 = 0; wxPoint temp; @@ -7154,7 +7546,242 @@ static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static void *SwigwxSpinCtrlTowxSpinButton(void *ptr) { + wxSpinCtrl *src; + wxSpinButton *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxSpinButton *) src; + return (void *) dest; +} + +static void *SwigwxSpinCtrlTowxControl(void *ptr) { + wxSpinCtrl *src; + wxControl *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxSpinCtrlTowxWindow(void *ptr) { + wxSpinCtrl *src; + wxWindow *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxSpinCtrlTowxEvtHandler(void *ptr) { + wxSpinCtrl *src; + wxEvtHandler *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxSpinCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxSpinCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _result; + wxWindow * _arg0; + wxWindowID _arg1 = (wxWindowID ) -1; + char * _arg2 = (char *) ""; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxSP_ARROW_KEYS; + int _arg6 = (int ) 0; + int _arg7 = (int ) 100; + int _arg8 = (int ) 0; + char * _arg9 = (char *) "wxSpinCtrl"; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "parent","id","value","pos","size","style","min","max","initial","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|isOOliiis:new_wxSpinCtrl",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_arg7,&_arg8,&_arg9)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSpinCtrl. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSpinCtrl_GetMax(_swigobj) (_swigobj->GetMax()) +static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMax. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetMin(_swigobj) (_swigobj->GetMin()) +static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMin. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetValue(_swigobj) (_swigobj->GetValue()) +static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetValue",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetValue(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","min","max", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSpinCtrl_SetRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetRange. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSpinCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) +static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSpinCtrl_SetValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetValue(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef controlscMethods[] = { + { "wxSpinCtrl_SetValue", (PyCFunction) _wrap_wxSpinCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_SetRange", (PyCFunction) _wrap_wxSpinCtrl_SetRange, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetValue", (PyCFunction) _wrap_wxSpinCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMin", (PyCFunction) _wrap_wxSpinCtrl_GetMin, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMax", (PyCFunction) _wrap_wxSpinCtrl_GetMax, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSpinCtrl", (PyCFunction) _wrap_new_wxSpinCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetValue", (PyCFunction) _wrap_wxSlider_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetTick", (PyCFunction) _wrap_wxSlider_SetTick, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetThumbLength", (PyCFunction) _wrap_wxSlider_SetThumbLength, METH_VARARGS | METH_KEYWORDS }, @@ -7322,6 +7949,9 @@ static PyMethodDef controlscMethods[] = { { "wxCheckBox_SetValue", (PyCFunction) _wrap_wxCheckBox_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_GetValue", (PyCFunction) _wrap_wxCheckBox_GetValue, METH_VARARGS | METH_KEYWORDS }, { "new_wxCheckBox", (PyCFunction) _wrap_new_wxCheckBox, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmapButton_GetMarginY", (PyCFunction) _wrap_wxBitmapButton_GetMarginY, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmapButton_GetMarginX", (PyCFunction) _wrap_wxBitmapButton_GetMarginX, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmapButton_SetMargins", (PyCFunction) _wrap_wxBitmapButton_SetMargins, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_SetBitmapLabel", (PyCFunction) _wrap_wxBitmapButton_SetBitmapLabel, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_SetBitmapSelected", (PyCFunction) _wrap_wxBitmapButton_SetBitmapSelected, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_SetBitmapFocus", (PyCFunction) _wrap_wxBitmapButton_SetBitmapFocus, METH_VARARGS | METH_KEYWORDS }, @@ -7349,14 +7979,7 @@ static PyMethodDef controlscMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -7365,10 +7988,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler}, { "_class_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler}, @@ -7407,147 +8029,53 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxEvtHandler","_wxButton",SwigwxButtonTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxControl",SwigwxControlTowxEvtHandler}, { "_class_wxEvtHandler","_wxControl",SwigwxControlTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_wxChoice","_class_wxComboBox",SwigwxComboBoxTowxChoice}, { "_wxChoice","_wxComboBox",SwigwxComboBoxTowxChoice}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, + { "_wxChar","_char",0}, { "_class_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton}, { "_class_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, + { "_char","_wxChar",0}, + { "_wxSpinButton","_class_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, + { "_wxSpinButton","_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, + { "_class_wxSpinButton","_class_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, + { "_class_wxSpinButton","_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, { "_wxListBox","_class_wxCheckListBox",SwigwxCheckListBoxTowxListBox}, { "_wxListBox","_wxCheckListBox",SwigwxCheckListBoxTowxListBox}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, + { "_class_wxWindow","_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, { "_class_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow}, { "_class_wxWindow","_wxSlider",SwigwxSliderTowxWindow}, { "_class_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow}, @@ -7586,36 +8114,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_wxButton",SwigwxButtonTowxWindow}, { "_class_wxWindow","_class_wxControl",SwigwxControlTowxWindow}, { "_class_wxWindow","_wxControl",SwigwxControlTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, + { "_wxControl","_class_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, + { "_wxControl","_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, { "_wxControl","_class_wxSlider",SwigwxSliderTowxControl}, { "_wxControl","_wxSlider",SwigwxSliderTowxControl}, { "_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl}, @@ -7652,71 +8155,49 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxControl","_wxBitmapButton",SwigwxBitmapButtonTowxControl}, { "_wxControl","_class_wxButton",SwigwxButtonTowxControl}, { "_wxControl","_wxButton",SwigwxButtonTowxControl}, - { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_class_wxCheckListBox",SwigwxCheckListBoxTowxListBox}, { "_class_wxListBox","_wxCheckListBox",SwigwxCheckListBoxTowxListBox}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, { "_class_wxChoice","_class_wxComboBox",SwigwxComboBoxTowxChoice}, { "_class_wxChoice","_wxComboBox",SwigwxComboBoxTowxChoice}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton}, { "_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, + { "_class_wxControl","_class_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, + { "_class_wxControl","_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, { "_class_wxControl","_class_wxSlider",SwigwxSliderTowxControl}, { "_class_wxControl","_wxSlider",SwigwxSliderTowxControl}, { "_class_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl}, @@ -7753,13 +8234,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxControl","_wxBitmapButton",SwigwxBitmapButtonTowxControl}, { "_class_wxControl","_class_wxButton",SwigwxButtonTowxControl}, { "_class_wxControl","_wxButton",SwigwxButtonTowxControl}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -7767,26 +8241,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxEvtHandler","_class_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, { "_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler}, { "_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler}, { "_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler}, @@ -7825,16 +8283,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_wxButton",SwigwxButtonTowxEvtHandler}, { "_wxEvtHandler","_class_wxControl",SwigwxControlTowxEvtHandler}, { "_wxEvtHandler","_wxControl",SwigwxControlTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, + { "_wxWindow","_class_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, + { "_wxWindow","_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, { "_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow}, { "_wxWindow","_wxSlider",SwigwxSliderTowxWindow}, { "_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow}, @@ -7873,8 +8323,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxButton",SwigwxButtonTowxWindow}, { "_wxWindow","_class_wxControl",SwigwxControlTowxWindow}, { "_wxWindow","_wxControl",SwigwxControlTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/controls.py b/wxPython/src/gtk/controls.py similarity index 93% rename from utils/wxPython/src/msw/controls.py rename to wxPython/src/gtk/controls.py index f0c8a8c0de..974248219c 100644 --- a/utils/wxPython/src/msw/controls.py +++ b/wxPython/src/gtk/controls.py @@ -30,7 +30,7 @@ class wxControl(wxControlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxControl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -54,7 +54,7 @@ class wxButton(wxButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxButton,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -91,13 +91,22 @@ class wxBitmapButtonPtr(wxButtonPtr): def SetBitmapLabel(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_SetBitmapLabel,(self,) + _args, _kwargs) return val + def SetMargins(self, *_args, **_kwargs): + val = apply(controlsc.wxBitmapButton_SetMargins,(self,) + _args, _kwargs) + return val + def GetMarginX(self, *_args, **_kwargs): + val = apply(controlsc.wxBitmapButton_GetMarginX,(self,) + _args, _kwargs) + return val + def GetMarginY(self, *_args, **_kwargs): + val = apply(controlsc.wxBitmapButton_GetMarginY,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxBitmapButton(wxBitmapButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxBitmapButton,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -118,7 +127,7 @@ class wxCheckBox(wxCheckBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -166,7 +175,7 @@ class wxChoice(wxChoicePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxChoice,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -244,7 +253,7 @@ class wxComboBox(wxComboBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxComboBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -283,7 +292,7 @@ class wxGauge(wxGaugePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxGauge,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -332,7 +341,7 @@ class wxStaticText(wxStaticTextPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticText,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -401,7 +410,7 @@ class wxListBox(wxListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxListBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -428,7 +437,7 @@ class wxCheckListBox(wxCheckListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckListBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -551,7 +560,7 @@ class wxTextCtrl(wxTextCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxTextCtrl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -587,7 +596,7 @@ class wxScrollBar(wxScrollBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxScrollBar,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -641,7 +650,7 @@ class wxStaticBitmap(wxStaticBitmapPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticBitmap,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -695,7 +704,7 @@ class wxRadioBox(wxRadioBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -716,7 +725,7 @@ class wxRadioButton(wxRadioButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioButton,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -788,7 +797,36 @@ class wxSlider(wxSliderPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxSlider,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) + + + + +class wxSpinCtrlPtr(wxSpinButtonPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetMax(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMax,(self,) + _args, _kwargs) + return val + def GetMin(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMin,(self,) + _args, _kwargs) + return val + def GetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetValue,(self,) + _args, _kwargs) + return val + def SetRange(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetRange,(self,) + _args, _kwargs) + return val + def SetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetValue,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxSpinCtrl(wxSpinCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(controlsc.new_wxSpinCtrl,_args,_kwargs) + self.thisown = 1 diff --git a/utils/wxPython/src/msw/controls2.cpp b/wxPython/src/gtk/controls2.cpp similarity index 73% rename from utils/wxPython/src/msw/controls2.cpp rename to wxPython/src/gtk/controls2.cpp index 6eaa46dc17..255a9742b2 100644 --- a/utils/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/controls2.cpp + * FILE : src/gtk/controls2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,48 +62,28 @@ extern PyObject *SWIG_newvarlink(void); #include #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -109,9 +91,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -extern wxValidator wxPyDefaultValidator; - - int wxCALLBACK wxPyTreeCtrl_SortItems(long item1, long item2, long funcPtr) { + int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; PyObject* func = (PyObject*)funcPtr; bool doSave = wxPyRestoreThread(); @@ -132,15 +112,15 @@ extern wxValidator wxPyDefaultValidator; class wxPyTreeItemData : public wxTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL) { - if (obj == NULL) + if (obj == NULL) obj = Py_None; - Py_INCREF(obj); - m_obj = obj; + Py_INCREF(obj); + m_obj = obj; } ~wxPyTreeItemData() { bool doSave = wxPyRestoreThread(); - Py_DECREF(m_obj); + Py_DECREF(m_obj); wxPySaveThread(doSave); } @@ -150,16 +130,1273 @@ public: } void SetData(PyObject* obj) { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_obj); + wxPySaveThread(doSave); m_obj = obj; Py_INCREF(obj); } PyObject* m_obj; }; + +class wxPyTreeCtrl : public wxTreeCtrl { +public: + wxPyTreeCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + char* name) : + wxTreeCtrl(parent, id, pos, size, style, validator, name) {} + + + int OnCompareItems(const wxTreeItemId& item1, + const wxTreeItemId& item2) { + int rval = 0; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("OnCompareItems")) + rval = m_myInst.callCallback(Py_BuildValue( + "(OO)", + wxPyConstructObject((void*)&item1, "wxTreeItemId"), + wxPyConstructObject((void*)&item2, "wxTreeItemId"))); + else + rval = wxTreeCtrl::OnCompareItems(item1, item2); + wxPySaveThread(doSave); + return rval; + } + PYPRIVATE; +}; + #ifdef __cplusplus extern "C" { #endif +#define new_wxListItemAttr() (new wxListItemAttr()) +static PyObject *_wrap_new_wxListItemAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxListItemAttr",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListItemAttr *)new_wxListItemAttr(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItemAttr_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxListItemAttr_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_SetTextColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItemAttr_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItemAttr_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxListItemAttr_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_SetBackgroundColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItemAttr_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItemAttr_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxListItemAttr_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_SetFont. Expected _wxListItemAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItemAttr_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItemAttr_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItemAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) +static PyObject *_wrap_wxListItemAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_HasTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_HasTextColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItemAttr_HasTextColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItemAttr_HasBackgroundColour(_swigobj) (_swigobj->HasBackgroundColour()) +static PyObject *_wrap_wxListItemAttr_HasBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_HasBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_HasBackgroundColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItemAttr_HasFont(_swigobj) (_swigobj->HasFont()) +static PyObject *_wrap_wxListItemAttr_HasFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_HasFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_HasFont. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItemAttr_HasFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItemAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxListItemAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_GetTextColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxListItemAttr_GetTextColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItemAttr_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxListItemAttr_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_GetBackgroundColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxListItemAttr_GetBackgroundColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItemAttr_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_GetFont. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxFont & _result_ref = wxListItemAttr_GetFont(_arg0); + _result = (wxFont *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxListItem() (new wxListItem()) +static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxListItem",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListItem *)new_wxListItem(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxListItem(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxListItem",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxListItem. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxListItem(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxListItem_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_Clear. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_ClearAttributes(_swigobj) (_swigobj->ClearAttributes()) +static PyObject *_wrap_wxListItem_ClearAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_ClearAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_ClearAttributes. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_ClearAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0)) +static PyObject *_wrap_wxListItem_SetMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetMask",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetMask. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetMask(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) +static PyObject *_wrap_wxListItem_SetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetId",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetId. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetId(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetColumn(_swigobj,_swigarg0) (_swigobj->SetColumn(_swigarg0)) +static PyObject *_wrap_wxListItem_SetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetColumn",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetColumn. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetColumn(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetState(_swigobj,_swigarg0) (_swigobj->SetState(_swigarg0)) +static PyObject *_wrap_wxListItem_SetState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","state", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetState",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetState. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetState(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetStateMask(_swigobj,_swigarg0) (_swigobj->SetStateMask(_swigarg0)) +static PyObject *_wrap_wxListItem_SetStateMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","stateMask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetStateMask",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetStateMask. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetStateMask(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetText(_swigobj,_swigarg0) (_swigobj->SetText(_swigarg0)) +static PyObject *_wrap_wxListItem_SetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetText",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetText. Expected _wxListItem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetText(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxListItem_SetImage(_swigobj,_swigarg0) (_swigobj->SetImage(_swigarg0)) +static PyObject *_wrap_wxListItem_SetImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","image", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetImage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetImage. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetImage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetData(_swigobj,_swigarg0) (_swigobj->SetData(_swigarg0)) +static PyObject *_wrap_wxListItem_SetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetData",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetData. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetData(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) +static PyObject *_wrap_wxListItem_SetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetWidth. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetAlign(_swigobj,_swigarg0) (_swigobj->SetAlign(_swigarg0)) +static PyObject *_wrap_wxListItem_SetAlign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxListColumnFormat _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","align", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetAlign",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetAlign. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetAlign(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxListItem_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetTextColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxListItem_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetBackgroundColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxListItem_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetFont. Expected _wxListItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItem_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_GetMask(_swigobj) (_swigobj->GetMask()) +static PyObject *_wrap_wxListItem_GetMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetMask. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetId(_swigobj) (_swigobj->GetId()) +static PyObject *_wrap_wxListItem_GetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetId",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetId. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetColumn(_swigobj) (_swigobj->GetColumn()) +static PyObject *_wrap_wxListItem_GetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetColumn",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetColumn. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListItem_GetColumn(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetState(_swigobj) (_swigobj->GetState()) +static PyObject *_wrap_wxListItem_GetState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetState",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetState. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetState(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetText(_swigobj) (_swigobj->GetText()) +static PyObject *_wrap_wxListItem_GetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetText",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetText. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxListItem_GetText(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxListItem_GetImage(_swigobj) (_swigobj->GetImage()) +static PyObject *_wrap_wxListItem_GetImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetImage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetImage. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListItem_GetImage(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetData(_swigobj) (_swigobj->GetData()) +static PyObject *_wrap_wxListItem_GetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetData. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetData(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxListItem_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetWidth. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListItem_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetAlign(_swigobj) (_swigobj->GetAlign()) +static PyObject *_wrap_wxListItem_GetAlign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListColumnFormat _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetAlign",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetAlign. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetAttributes(_swigobj) (_swigobj->GetAttributes()) +static PyObject *_wrap_wxListItem_GetAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetAttributes. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItem_HasAttributes(_swigobj) (_swigobj->HasAttributes()) +static PyObject *_wrap_wxListItem_HasAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_HasAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_HasAttributes. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItem_HasAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxListItem_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetTextColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxListItem_GetTextColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListItem_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxListItem_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetBackgroundColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxListItem_GetBackgroundColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListItem_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxListItem_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetFont. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxListItem_GetFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxListItem_m_mask_set(_swigobj,_swigval) (_swigobj->m_mask = _swigval,_swigval) static PyObject *_wrap_wxListItem_m_mask_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -456,11 +1693,22 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -726,56 +1974,12 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py return _resultobj; } -#define new_wxListItem() (new wxListItem()) -static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxListItem * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxListItem",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxListItem *)new_wxListItem(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxListItem(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxListItem * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxListItem",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxListItem. Expected _wxListItem_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxListItem(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; +static void *SwigwxListEventTowxNotifyEvent(void *ptr) { + wxListEvent *src; + wxNotifyEvent *dest; + src = (wxListEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; } static void *SwigwxListEventTowxCommandEvent(void *ptr) { @@ -1224,6 +2428,373 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxListEvent_GetCode(_swigobj) (_swigobj->GetCode()) +static PyObject *_wrap_wxListEvent_GetCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetCode. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListEvent_GetCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_GetIndex(_swigobj) (_swigobj->GetIndex()) +static PyObject *_wrap_wxListEvent_GetIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetIndex. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetOldIndex(_swigobj) (_swigobj->GetOldIndex()) +static PyObject *_wrap_wxListEvent_GetOldIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetOldIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetOldIndex. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetOldIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetOldItem(_swigobj) (_swigobj->GetOldItem()) +static PyObject *_wrap_wxListEvent_GetOldItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetOldItem",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetOldItem. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetOldItem(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetColumn(_swigobj) (_swigobj->GetColumn()) +static PyObject *_wrap_wxListEvent_GetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetColumn",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetColumn. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListEvent_GetColumn(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_Cancelled(_swigobj) (_swigobj->Cancelled()) +static PyObject *_wrap_wxListEvent_Cancelled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_Cancelled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_Cancelled. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListEvent_Cancelled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_GetPoint(_swigobj) (_swigobj->GetPoint()) +static PyObject *_wrap_wxListEvent_GetPoint(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetPoint",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetPoint. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxListEvent_GetPoint(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListEvent_GetLabel(_swigobj) (_swigobj->GetLabel()) +static PyObject *_wrap_wxListEvent_GetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetLabel",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetLabel. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxListEvent_GetLabel(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxListEvent_GetText(_swigobj) (_swigobj->GetText()) +static PyObject *_wrap_wxListEvent_GetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetText",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetText. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxListEvent_GetText(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxListEvent_GetImage(_swigobj) (_swigobj->GetImage()) +static PyObject *_wrap_wxListEvent_GetImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetImage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetImage. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListEvent_GetImage(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_GetData(_swigobj) (_swigobj->GetData()) +static PyObject *_wrap_wxListEvent_GetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetData. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetData(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetMask(_swigobj) (_swigobj->GetMask()) +static PyObject *_wrap_wxListEvent_GetMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetMask. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetItem(_swigobj) (_swigobj->GetItem()) +static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetItem",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetItem. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxListItem & _result_ref = wxListEvent_GetItem(_arg0); + _result = (wxListItem *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxListCtrlTowxControl(void *ptr) { wxListCtrl *src; wxControl *dest; @@ -1254,10 +2825,10 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject * wxListCtrl * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxLC_ICON; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "listCtrl"; PyObject * _argo0 = 0; wxPoint temp; @@ -1480,12 +3051,10 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args, PyObj #define wxListCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTextCtrl * _result; wxListCtrl * _arg0; long _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","item", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListCtrl_EditLabel",_kwnames,&_argo0,&_arg1)) @@ -1499,80 +3068,11 @@ static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)wxListCtrl_EditLabel(_arg0,_arg1); + wxListCtrl_EditLabel(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxListCtrl_EndEditLabel(_swigobj,_swigarg0) (_swigobj->EndEditLabel(_swigarg0)) -static PyObject *_wrap_wxListCtrl_EndEditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxListCtrl * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","cancel", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListCtrl_EndEditLabel",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EndEditLabel. Expected _wxListCtrl_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxListCtrl_EndEditLabel(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxListCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) -static PyObject *_wrap_wxListCtrl_GetEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxListCtrl * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListCtrl_GetEditControl",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetEditControl. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)wxListCtrl_GetEditControl(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -1628,11 +3128,22 @@ static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } _arg3 = (bool ) tempbool3; { @@ -2167,71 +3678,6 @@ static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject return _resultobj; } -#define wxListCtrl_GetTextColour(_swigobj) (_swigobj->GetTextColour()) -static PyObject *_wrap_wxListCtrl_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - wxListCtrl * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListCtrl_GetTextColour",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetTextColour. Expected _wxListCtrl_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxColour (wxListCtrl_GetTextColour(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxListCtrl_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxListCtrl * _arg0; - wxColour * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","col", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetTextColour",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetTextColour. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetTextColour. Expected _wxColour_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxListCtrl_SetTextColour(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxListCtrl_GetTopItem(_swigobj) (_swigobj->GetTopItem()) static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2304,8 +3750,8 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxListCtrl_InsertColumnWith(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxListCtrl_InsertColumnInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; wxListCtrl * _arg0; @@ -2316,25 +3762,25 @@ static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *arg char *_kwnames[] = { "self","col","info", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnWith",_kwnames,&_argo0,&_arg1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnInfo",_kwnames,&_argo0,&_arg1,&_argo2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnWith. Expected _wxListCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnInfo. Expected _wxListCtrl_p."); return NULL; } } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnWith. Expected _wxListItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnInfo. Expected _wxListItem_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListCtrl_InsertColumnWith(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("l",_result); @@ -2365,11 +3811,22 @@ static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2442,11 +3899,22 @@ static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2513,11 +3981,22 @@ static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2567,11 +4046,12 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject * wxListCtrl * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","col", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2580,13 +4060,11 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject * return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxListCtrl_SetBackgroundColour(_arg0,*_arg1); @@ -2760,11 +4238,22 @@ static PyObject *_wrap_wxListCtrl_SetStringItem(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2925,11 +4414,22 @@ static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3008,7 +4508,7 @@ static bool wxListCtrl_SortItems(wxListCtrl *self,PyObject * func) { if (!PyCallable_Check(func)) return FALSE; - return self->SortItems(wxPyTreeCtrl_SortItems, (long)func); + return self->SortItems(wxPyListCtrl_SortItems, (long)func); } static PyObject *_wrap_wxListCtrl_SortItems(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3120,6 +4620,45 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static int wxTreeItemId___cmp__(wxTreeItemId *self,wxTreeItemId * other) { + if (! other) return -1; + return *self != *other; + } +static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTreeItemId * _arg0; + wxTreeItemId * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeItemId___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItemId___cmp__. Expected _wxTreeItemId_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeItemId___cmp__. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTreeItemId___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxTreeItemData(_swigarg0) (new wxPyTreeItemData(_swigarg0)) static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3451,40 +4990,40 @@ static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void *SwigwxTreeCtrlTowxControl(void *ptr) { - wxTreeCtrl *src; +static void *SwigwxPyTreeCtrlTowxControl(void *ptr) { + wxPyTreeCtrl *src; wxControl *dest; - src = (wxTreeCtrl *) ptr; + src = (wxPyTreeCtrl *) ptr; dest = (wxControl *) src; return (void *) dest; } -static void *SwigwxTreeCtrlTowxWindow(void *ptr) { - wxTreeCtrl *src; +static void *SwigwxPyTreeCtrlTowxWindow(void *ptr) { + wxPyTreeCtrl *src; wxWindow *dest; - src = (wxTreeCtrl *) ptr; + src = (wxPyTreeCtrl *) ptr; dest = (wxWindow *) src; return (void *) dest; } -static void *SwigwxTreeCtrlTowxEvtHandler(void *ptr) { - wxTreeCtrl *src; +static void *SwigwxPyTreeCtrlTowxEvtHandler(void *ptr) { + wxPyTreeCtrl *src; wxEvtHandler *dest; - src = (wxTreeCtrl *) ptr; + src = (wxPyTreeCtrl *) ptr; dest = (wxEvtHandler *) src; return (void *) dest; } -#define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +#define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxPyTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _result; + wxPyTreeCtrl * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "wxTreeCtrl"; PyObject * _argo0 = 0; wxPoint temp; @@ -3526,11 +5065,11 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPy_END_ALLOW_THREADS; } if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p"); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeCtrl_p"); _resultobj = Py_BuildValue("s",_ptemp); } else { Py_INCREF(Py_None); @@ -3539,11 +5078,48 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define wxTreeCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTreeCtrl * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl__setSelf. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTreeCtrl__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxTreeCtrl_GetCount(_swigobj) (_swigobj->GetCount()) static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; size_t _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -3552,8 +5128,8 @@ static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetCount. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetCount. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3570,7 +5146,7 @@ static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObj static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; unsigned int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -3579,8 +5155,8 @@ static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetIndent. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetIndent. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3596,7 +5172,7 @@ static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyOb #define wxTreeCtrl_SetIndent(_swigobj,_swigarg0) (_swigobj->SetIndent(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; unsigned int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","indent", NULL }; @@ -3606,8 +5182,8 @@ static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetIndent. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetIndent. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3625,7 +5201,7 @@ static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyOb static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxImageList * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -3635,8 +5211,8 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3659,7 +5235,7 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxImageList * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -3669,8 +5245,8 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetStateImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetStateImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3692,7 +5268,7 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar #define wxTreeCtrl_SetImageList(_swigobj,_swigarg0) (_swigobj->SetImageList(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxImageList * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3703,8 +5279,8 @@ static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3728,7 +5304,7 @@ static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, P #define wxTreeCtrl_SetStateImageList(_swigobj,_swigarg0) (_swigobj->SetStateImageList(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxImageList * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3739,8 +5315,8 @@ static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *ar return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetStateImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetStateImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3765,7 +5341,7 @@ static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *ar static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; unsigned int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -3774,8 +5350,8 @@ static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSpacing. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSpacing. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3791,7 +5367,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyO #define wxTreeCtrl_SetSpacing(_swigobj,_swigarg0) (_swigobj->SetSpacing(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; unsigned int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","spacing", NULL }; @@ -3801,8 +5377,8 @@ static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetSpacing. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetSpacing. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3820,7 +5396,7 @@ static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3831,8 +5407,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemText. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemText. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3861,7 +5437,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxTreeItemIcon _arg2 = (wxTreeItemIcon ) (wxTreeItemIcon_Normal); PyObject * _argo0 = 0; @@ -3873,8 +5449,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3898,7 +5474,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3909,8 +5485,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemSelectedImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemSelectedImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3933,7 +5509,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject #define wxTreeCtrl_SetItemText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemText(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxString * _arg2; PyObject * _argo0 = 0; @@ -3946,8 +5522,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemText. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemText. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3959,11 +5535,22 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3982,7 +5569,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py #define wxTreeCtrl_SetItemImage(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemImage(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; int _arg2; wxTreeItemIcon _arg3 = (wxTreeItemIcon ) (wxTreeItemIcon_Normal); @@ -3995,8 +5582,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4020,7 +5607,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P #define wxTreeCtrl_SetItemSelectedImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemSelectedImage(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; int _arg2; PyObject * _argo0 = 0; @@ -4032,8 +5619,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemSelectedImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemSelectedImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4057,7 +5644,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject #define wxTreeCtrl_SetItemHasChildren(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemHasChildren(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; bool _arg2 = (bool ) TRUE; PyObject * _argo0 = 0; @@ -4070,8 +5657,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemHasChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemHasChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4093,10 +5680,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a return _resultobj; } -static wxPyTreeItemData * wxTreeCtrl_GetItemData(wxTreeCtrl *self,const wxTreeItemId & item) { +static wxPyTreeItemData * wxPyTreeCtrl_GetItemData(wxPyTreeCtrl *self,const wxTreeItemId & item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(); + data->SetId(item); // set the id self->SetItemData(item, data); } return data; @@ -4104,7 +5692,7 @@ static wxPyTreeItemData * wxTreeCtrl_GetItemData(wxTreeCtrl *self,const wxTreeIt static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTreeItemData * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4116,8 +5704,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4130,7 +5718,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyTreeItemData *)wxTreeCtrl_GetItemData(_arg0,*_arg1); + _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4143,12 +5731,13 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py return _resultobj; } -static void wxTreeCtrl_SetItemData(wxTreeCtrl *self,const wxTreeItemId & item,wxPyTreeItemData * data) { - self->SetItemData(item, data); - } +static void wxPyTreeCtrl_SetItemData(wxPyTreeCtrl *self,const wxTreeItemId & item,wxPyTreeItemData * data) { + data->SetId(item); // set the id + self->SetItemData(item, data); + } static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxPyTreeItemData * _arg2; PyObject * _argo0 = 0; @@ -4161,8 +5750,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4182,7 +5771,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4190,18 +5779,19 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py return _resultobj; } -static PyObject * wxTreeCtrl_GetPyData(wxTreeCtrl *self,const wxTreeItemId & item) { +static PyObject * wxPyTreeCtrl_GetPyData(wxPyTreeCtrl *self,const wxTreeItemId & item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(); + data->SetId(item); // set the id self->SetItemData(item, data); } return data->GetData(); - } + } static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4212,8 +5802,8 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPyData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPyData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4226,7 +5816,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxTreeCtrl_GetPyData(_arg0,*_arg1); + _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; }{ @@ -4235,17 +5825,18 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void wxTreeCtrl_SetPyData(wxTreeCtrl *self,const wxTreeItemId & item,PyObject * obj) { +static void wxPyTreeCtrl_SetPyData(wxPyTreeCtrl *self,const wxTreeItemId & item,PyObject * obj) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(obj); + data->SetId(item); // set the id self->SetItemData(item, data); } else data->SetData(obj); - } + } static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _arg2; PyObject * _argo0 = 0; @@ -4258,8 +5849,8 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetPyData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetPyData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4275,7 +5866,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4287,7 +5878,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4298,8 +5889,8 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4323,7 +5914,7 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4334,8 +5925,8 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ItemHasChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ItemHasChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4359,7 +5950,7 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4370,8 +5961,8 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsExpanded. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsExpanded. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4395,7 +5986,7 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4406,8 +5997,8 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsSelected. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsSelected. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4431,7 +6022,7 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -4441,8 +6032,8 @@ static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetRootItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetRootItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4460,7 +6051,7 @@ static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -4470,8 +6061,8 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelection. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelection. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4489,7 +6080,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4501,8 +6092,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemParent. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemParent. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4523,15 +6114,15 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, return _resultobj; } -static PyObject * wxTreeCtrl_GetSelections(wxTreeCtrl *self) { +static PyObject * wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self) { bool doSave = wxPyRestoreThread(); PyObject* rval = PyList_New(0); wxArrayTreeItemIds array; size_t num, x; num = self->GetSelections(array); for (x=0; x < num; x++) { - PyObject* item = wxPyConstructObject((void*)&array.Item(x), - "wxTreeItemId"); + wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); + PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE); PyList_Append(rval, item); } wxPySaveThread(doSave); @@ -4540,7 +6131,7 @@ static PyObject * wxTreeCtrl_GetSelections(wxTreeCtrl *self) { static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -4549,14 +6140,14 @@ static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelections. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelections. Expected _wxPyTreeCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxTreeCtrl_GetSelections(_arg0); + _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0); wxPy_END_ALLOW_THREADS; }{ @@ -4569,7 +6160,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; size_t _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; bool _arg2 = (bool ) TRUE; PyObject * _argo0 = 0; @@ -4582,8 +6173,8 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetChildrenCount. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetChildrenCount. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4608,7 +6199,7 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; long * _arg2; PyObject * _argo0 = 0; @@ -4623,8 +6214,8 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstChild. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstChild. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4658,7 +6249,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; long * _arg2; PyObject * _argo0 = 0; @@ -4673,8 +6264,8 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextChild. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextChild. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4708,7 +6299,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4720,8 +6311,8 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextSibling. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextSibling. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4746,7 +6337,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4758,8 +6349,8 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevSibling. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevSibling. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4784,7 +6375,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -4794,8 +6385,8 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject * return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstVisibleItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstVisibleItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4813,7 +6404,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject * static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4825,8 +6416,8 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4851,7 +6442,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4863,8 +6454,8 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4889,7 +6480,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4901,8 +6492,8 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetLastChild. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetLastChild. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4927,7 +6518,7 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxString * _arg1; int _arg2 = (int ) -1; int _arg3 = (int ) -1; @@ -4943,17 +6534,28 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AddRoot. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AddRoot. Expected _wxPyTreeCtrl_p."); return NULL; } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -4980,7 +6582,7 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxString * _arg2; int _arg3 = (int ) -1; @@ -4998,8 +6600,8 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_PrependItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_PrependItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5011,11 +6613,22 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -5042,7 +6655,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxTreeItemId * _arg2; wxString * _arg3; @@ -5062,8 +6675,8 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5082,11 +6695,22 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -5109,11 +6733,85 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxTreeCtrl_InsertItemBefore(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTreeItemId * _result; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + size_t _arg2; + wxString * _arg3; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + wxTreeItemData * _arg6 = (wxTreeItemData *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + PyObject * _argo6 = 0; + char *_kwnames[] = { "self","parent","before","text","image","selectedImage","data", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|iiO:wxTreeCtrl_InsertItemBefore",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_arg4,&_arg5,&_argo6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItemBefore. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_InsertItemBefore. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxTreeItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxTreeCtrl_InsertItemBefore. Expected _wxTreeItemData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxTreeCtrl_AppendItem(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->AppendItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxString * _arg2; int _arg3 = (int ) -1; @@ -5131,8 +6829,8 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AppendItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AppendItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5144,11 +6842,22 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -5174,7 +6883,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO #define wxTreeCtrl_Delete(_swigobj,_swigarg0) (_swigobj->Delete(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5185,8 +6894,8 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Delete. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Delete. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5210,7 +6919,7 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec #define wxTreeCtrl_DeleteChildren(_swigobj,_swigarg0) (_swigobj->DeleteChildren(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5221,8 +6930,8 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5246,7 +6955,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, #define wxTreeCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems()) static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -5255,8 +6964,8 @@ static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteAllItems. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteAllItems. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5273,7 +6982,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, #define wxTreeCtrl_Expand(_swigobj,_swigarg0) (_swigobj->Expand(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5284,8 +6993,8 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Expand. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Expand. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5309,7 +7018,7 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec #define wxTreeCtrl_Collapse(_swigobj,_swigarg0) (_swigobj->Collapse(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5320,8 +7029,8 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Collapse. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Collapse. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5345,7 +7054,7 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj #define wxTreeCtrl_CollapseAndReset(_swigobj,_swigarg0) (_swigobj->CollapseAndReset(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5356,8 +7065,8 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_CollapseAndReset. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_CollapseAndReset. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5381,7 +7090,7 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg #define wxTreeCtrl_Toggle(_swigobj,_swigarg0) (_swigobj->Toggle(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5392,8 +7101,8 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Toggle. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Toggle. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5417,7 +7126,7 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec #define wxTreeCtrl_Unselect(_swigobj) (_swigobj->Unselect()) static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -5426,8 +7135,8 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Unselect. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Unselect. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5444,7 +7153,7 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObj #define wxTreeCtrl_UnselectAll(_swigobj) (_swigobj->UnselectAll()) static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -5453,8 +7162,8 @@ static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5471,7 +7180,7 @@ static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, Py #define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5482,8 +7191,8 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SelectItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SelectItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5507,7 +7216,7 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO #define wxTreeCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5518,8 +7227,8 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EnsureVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EnsureVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5543,7 +7252,7 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, #define wxTreeCtrl_ScrollTo(_swigobj,_swigarg0) (_swigobj->ScrollTo(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5554,8 +7263,8 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ScrollTo. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ScrollTo. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5579,21 +7288,19 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj #define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTextCtrl * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","item", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_EditLabel",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EditLabel. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EditLabel. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5606,83 +7313,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) -static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxTreeCtrl * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetEditControl",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxTreeCtrl_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxTreeCtrl_EndEditLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->EndEditLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - wxTreeItemId * _arg1; - int _arg2 = (int ) FALSE; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","item","discardChanges", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_EndEditLabel",_kwnames,&_argo0,&_argo1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EndEditLabel. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EndEditLabel. Expected _wxTreeItemId_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_EndEditLabel(_arg0,*_arg1,_arg2); + wxTreeCtrl_EditLabel(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -5693,7 +7324,7 @@ static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args, P #define wxTreeCtrl_SortChildren(_swigobj,_swigarg0) (_swigobj->SortChildren(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5704,8 +7335,8 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SortChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SortChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5729,7 +7360,7 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P #define wxTreeCtrl_SetItemBold(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBold(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; int _arg2 = (int ) TRUE; PyObject * _argo0 = 0; @@ -5741,8 +7372,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBold. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBold. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5767,7 +7398,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5778,8 +7409,8 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsBold. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsBold. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5803,7 +7434,7 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxPoint * _arg1; int * _arg2; int temp; @@ -5821,8 +7452,8 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_HitTest. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_HitTest. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5849,21 +7480,22 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje #define wxTreeCtrl_SetItemTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemTextColour(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxColour * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","item","col", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemTextColour",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemTextColour",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemTextColour. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemTextColour. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5874,13 +7506,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemTextColour. Expected _wxColour_p."); +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2); @@ -5894,21 +7524,22 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar #define wxTreeCtrl_SetItemBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBackgroundColour(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxColour * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","item","col", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5919,13 +7550,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxColour_p."); +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2); @@ -5939,7 +7568,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje #define wxTreeCtrl_SetItemFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemFont(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxFont * _arg2; PyObject * _argo0 = 0; @@ -5952,8 +7581,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemFont. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemFont. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5981,98 +7610,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxTreeCtrl_SetItemDropHighlight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemDropHighlight(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTreeCtrl_SetItemDropHighlight(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxTreeCtrl * _arg0; - wxTreeItemId * _arg1; - int _arg2 = (int ) TRUE; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","item","highlight", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_SetItemDropHighlight",_kwnames,&_argo0,&_argo1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemDropHighlight. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemDropHighlight. Expected _wxTreeItemId_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_SetItemDropHighlight(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject * wxTreeCtrl_GetBoundingRect(wxTreeCtrl *self,const wxTreeItemId & item,int textOnly) { - wxRect rect; - if (self->GetBoundingRect(item, rect, textOnly)) { - bool doSave = wxPyRestoreThread(); - wxRect* r = new wxRect(rect); - PyObject* val = wxPyConstructObject((void*)r, "wxRect"); - wxPySaveThread(doSave); - return val; - } - else { - Py_INCREF(Py_None); - return Py_None; - } - } -static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - PyObject * _result; - wxTreeCtrl * _arg0; - wxTreeItemId * _arg1; - int _arg2 = (int ) FALSE; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","item","textOnly", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_GetBoundingRect",_kwnames,&_argo0,&_argo1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeCtrl_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeItemId_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -}{ - _resultobj = _result; -} - return _resultobj; -} - static PyMethodDef controls2cMethods[] = { - { "wxTreeCtrl_GetBoundingRect", (PyCFunction) _wrap_wxTreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeCtrl_SetItemDropHighlight", (PyCFunction) _wrap_wxTreeCtrl_SetItemDropHighlight, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemFont", (PyCFunction) _wrap_wxTreeCtrl_SetItemFont, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemTextColour, METH_VARARGS | METH_KEYWORDS }, @@ -6080,8 +7618,6 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_IsBold", (PyCFunction) _wrap_wxTreeCtrl_IsBold, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemBold", (PyCFunction) _wrap_wxTreeCtrl_SetItemBold, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SortChildren", (PyCFunction) _wrap_wxTreeCtrl_SortChildren, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeCtrl_EndEditLabel", (PyCFunction) _wrap_wxTreeCtrl_EndEditLabel, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeCtrl_GetEditControl", (PyCFunction) _wrap_wxTreeCtrl_GetEditControl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_EditLabel", (PyCFunction) _wrap_wxTreeCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_ScrollTo", (PyCFunction) _wrap_wxTreeCtrl_ScrollTo, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_EnsureVisible", (PyCFunction) _wrap_wxTreeCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, @@ -6096,6 +7632,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_DeleteChildren", (PyCFunction) _wrap_wxTreeCtrl_DeleteChildren, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_Delete", (PyCFunction) _wrap_wxTreeCtrl_Delete, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_AppendItem", (PyCFunction) _wrap_wxTreeCtrl_AppendItem, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_InsertItemBefore", (PyCFunction) _wrap_wxTreeCtrl_InsertItemBefore, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_InsertItem", (PyCFunction) _wrap_wxTreeCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_PrependItem", (PyCFunction) _wrap_wxTreeCtrl_PrependItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_AddRoot", (PyCFunction) _wrap_wxTreeCtrl_AddRoot, METH_VARARGS | METH_KEYWORDS }, @@ -6136,6 +7673,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_SetIndent", (PyCFunction) _wrap_wxTreeCtrl_SetIndent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetIndent", (PyCFunction) _wrap_wxTreeCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetCount", (PyCFunction) _wrap_wxTreeCtrl_GetCount, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl__setSelf", (PyCFunction) _wrap_wxTreeCtrl__setSelf, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeCtrl", (PyCFunction) _wrap_new_wxTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetLabel", (PyCFunction) _wrap_wxTreeEvent_GetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetCode", (PyCFunction) _wrap_wxTreeEvent_GetCode, METH_VARARGS | METH_KEYWORDS }, @@ -6147,6 +7685,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeItemData_SetData", (PyCFunction) _wrap_wxTreeItemData_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxTreeItemData_GetData", (PyCFunction) _wrap_wxTreeItemData_GetData, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeItemData", (PyCFunction) _wrap_new_wxTreeItemData, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeItemId___cmp__", (PyCFunction) _wrap_wxTreeItemId___cmp__, METH_VARARGS | METH_KEYWORDS }, { "wxTreeItemId_IsOk", (PyCFunction) _wrap_wxTreeItemId_IsOk, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTreeItemId", (PyCFunction) _wrap_delete_wxTreeItemId, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeItemId", (PyCFunction) _wrap_new_wxTreeItemId, METH_VARARGS | METH_KEYWORDS }, @@ -6170,11 +7709,9 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_InsertStringItem", (PyCFunction) _wrap_wxListCtrl_InsertStringItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertItem", (PyCFunction) _wrap_wxListCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertColumn", (PyCFunction) _wrap_wxListCtrl_InsertColumn, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_InsertColumnWith", (PyCFunction) _wrap_wxListCtrl_InsertColumnWith, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_InsertColumnInfo", (PyCFunction) _wrap_wxListCtrl_InsertColumnInfo, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_HitTest", (PyCFunction) _wrap_wxListCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetTopItem", (PyCFunction) _wrap_wxListCtrl_GetTopItem, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_SetTextColour", (PyCFunction) _wrap_wxListCtrl_SetTextColour, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_GetTextColour", (PyCFunction) _wrap_wxListCtrl_GetTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetSelectedItemCount", (PyCFunction) _wrap_wxListCtrl_GetSelectedItemCount, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetNextItem", (PyCFunction) _wrap_wxListCtrl_GetNextItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetItemText", (PyCFunction) _wrap_wxListCtrl_GetItemText, METH_VARARGS | METH_KEYWORDS }, @@ -6193,8 +7730,6 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_FindItemData", (PyCFunction) _wrap_wxListCtrl_FindItemData, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_FindItem", (PyCFunction) _wrap_wxListCtrl_FindItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_EnsureVisible", (PyCFunction) _wrap_wxListCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_GetEditControl", (PyCFunction) _wrap_wxListCtrl_GetEditControl, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_EndEditLabel", (PyCFunction) _wrap_wxListCtrl_EndEditLabel, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_EditLabel", (PyCFunction) _wrap_wxListCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_ClearAll", (PyCFunction) _wrap_wxListCtrl_ClearAll, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_DeleteAllColumns", (PyCFunction) _wrap_wxListCtrl_DeleteAllColumns, METH_VARARGS | METH_KEYWORDS }, @@ -6203,6 +7738,19 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_DeleteItem", (PyCFunction) _wrap_wxListCtrl_DeleteItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_Arrange", (PyCFunction) _wrap_wxListCtrl_Arrange, METH_VARARGS | METH_KEYWORDS }, { "new_wxListCtrl", (PyCFunction) _wrap_new_wxListCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetItem", (PyCFunction) _wrap_wxListEvent_GetItem, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetMask", (PyCFunction) _wrap_wxListEvent_GetMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetData", (PyCFunction) _wrap_wxListEvent_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetImage", (PyCFunction) _wrap_wxListEvent_GetImage, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetText", (PyCFunction) _wrap_wxListEvent_GetText, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetLabel", (PyCFunction) _wrap_wxListEvent_GetLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetPoint", (PyCFunction) _wrap_wxListEvent_GetPoint, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_Cancelled", (PyCFunction) _wrap_wxListEvent_Cancelled, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetColumn", (PyCFunction) _wrap_wxListEvent_GetColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetOldItem", (PyCFunction) _wrap_wxListEvent_GetOldItem, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetOldIndex", (PyCFunction) _wrap_wxListEvent_GetOldIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetIndex", (PyCFunction) _wrap_wxListEvent_GetIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetCode", (PyCFunction) _wrap_wxListEvent_GetCode, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_item_get", (PyCFunction) _wrap_wxListEvent_m_item_get, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_item_set", (PyCFunction) _wrap_wxListEvent_m_item_set, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_pointDrag_get", (PyCFunction) _wrap_wxListEvent_m_pointDrag_get, METH_VARARGS | METH_KEYWORDS }, @@ -6217,8 +7765,6 @@ static PyMethodDef controls2cMethods[] = { { "wxListEvent_m_itemIndex_set", (PyCFunction) _wrap_wxListEvent_m_itemIndex_set, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_code_get", (PyCFunction) _wrap_wxListEvent_m_code_get, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_code_set", (PyCFunction) _wrap_wxListEvent_m_code_set, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxListItem", (PyCFunction) _wrap_delete_wxListItem, METH_VARARGS | METH_KEYWORDS }, - { "new_wxListItem", (PyCFunction) _wrap_new_wxListItem, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_width_get", (PyCFunction) _wrap_wxListItem_m_width_get, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_width_set", (PyCFunction) _wrap_wxListItem_m_width_set, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_format_get", (PyCFunction) _wrap_wxListItem_m_format_get, METH_VARARGS | METH_KEYWORDS }, @@ -6239,6 +7785,47 @@ static PyMethodDef controls2cMethods[] = { { "wxListItem_m_itemId_set", (PyCFunction) _wrap_wxListItem_m_itemId_set, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_mask_get", (PyCFunction) _wrap_wxListItem_m_mask_get, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_mask_set", (PyCFunction) _wrap_wxListItem_m_mask_set, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetFont", (PyCFunction) _wrap_wxListItem_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetBackgroundColour", (PyCFunction) _wrap_wxListItem_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetTextColour", (PyCFunction) _wrap_wxListItem_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_HasAttributes", (PyCFunction) _wrap_wxListItem_HasAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetAttributes", (PyCFunction) _wrap_wxListItem_GetAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetAlign", (PyCFunction) _wrap_wxListItem_GetAlign, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetWidth", (PyCFunction) _wrap_wxListItem_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetData", (PyCFunction) _wrap_wxListItem_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetImage", (PyCFunction) _wrap_wxListItem_GetImage, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetText", (PyCFunction) _wrap_wxListItem_GetText, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetState", (PyCFunction) _wrap_wxListItem_GetState, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetColumn", (PyCFunction) _wrap_wxListItem_GetColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetId", (PyCFunction) _wrap_wxListItem_GetId, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetMask", (PyCFunction) _wrap_wxListItem_GetMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetFont", (PyCFunction) _wrap_wxListItem_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetBackgroundColour", (PyCFunction) _wrap_wxListItem_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetTextColour", (PyCFunction) _wrap_wxListItem_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetAlign", (PyCFunction) _wrap_wxListItem_SetAlign, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetWidth", (PyCFunction) _wrap_wxListItem_SetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetData", (PyCFunction) _wrap_wxListItem_SetData, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetImage", (PyCFunction) _wrap_wxListItem_SetImage, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetText", (PyCFunction) _wrap_wxListItem_SetText, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetStateMask", (PyCFunction) _wrap_wxListItem_SetStateMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetState", (PyCFunction) _wrap_wxListItem_SetState, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetColumn", (PyCFunction) _wrap_wxListItem_SetColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetId", (PyCFunction) _wrap_wxListItem_SetId, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetMask", (PyCFunction) _wrap_wxListItem_SetMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_ClearAttributes", (PyCFunction) _wrap_wxListItem_ClearAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_Clear", (PyCFunction) _wrap_wxListItem_Clear, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxListItem", (PyCFunction) _wrap_delete_wxListItem, METH_VARARGS | METH_KEYWORDS }, + { "new_wxListItem", (PyCFunction) _wrap_new_wxListItem, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_GetFont", (PyCFunction) _wrap_wxListItemAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_GetBackgroundColour", (PyCFunction) _wrap_wxListItemAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_GetTextColour", (PyCFunction) _wrap_wxListItemAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_HasFont", (PyCFunction) _wrap_wxListItemAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_HasBackgroundColour", (PyCFunction) _wrap_wxListItemAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_HasTextColour", (PyCFunction) _wrap_wxListItemAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_SetFont", (PyCFunction) _wrap_wxListItemAttr_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_SetBackgroundColour", (PyCFunction) _wrap_wxListItemAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_SetTextColour", (PyCFunction) _wrap_wxListItemAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "new_wxListItemAttr", (PyCFunction) _wrap_new_wxListItemAttr, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus @@ -6248,18 +7835,11 @@ static PyMethodDef controls2cMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent}, { "_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent}, { "_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent}, { "_wxEvent","_wxListEvent",SwigwxListEventTowxEvent}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -6268,285 +7848,112 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, - { "_class_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, { "_class_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, + { "_wxChar","_char",0}, { "_class_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent}, { "_class_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent}, { "_class_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent}, { "_class_wxEvent","_wxListEvent",SwigwxListEventTowxEvent}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent}, { "_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent}, { "_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent}, { "_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_char","_wxChar",0}, { "_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, + { "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, - { "_class_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, + { "_class_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, + { "_class_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, { "_class_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow}, { "_class_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, - { "_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, + { "_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, + { "_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, { "_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl}, { "_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, - { "_class_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, + { "_class_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, { "_class_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl}, { "_class_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -6554,54 +7961,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent}, { "_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, - { "_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, + { "_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, { "_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, { "_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, - { "_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, + { "_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, + { "_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, { "_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow}, { "_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, {0,0,0}}; static PyObject *SWIG_globals; @@ -6643,10 +8016,6 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxLIST_ALIGN_LEFT", PyInt_FromLong((long) wxLIST_ALIGN_LEFT)); PyDict_SetItemString(d,"wxLIST_ALIGN_TOP", PyInt_FromLong((long) wxLIST_ALIGN_TOP)); PyDict_SetItemString(d,"wxLIST_ALIGN_SNAP_TO_GRID", PyInt_FromLong((long) wxLIST_ALIGN_SNAP_TO_GRID)); - PyDict_SetItemString(d,"wxLIST_FORMAT_LEFT", PyInt_FromLong((long) wxLIST_FORMAT_LEFT)); - PyDict_SetItemString(d,"wxLIST_FORMAT_RIGHT", PyInt_FromLong((long) wxLIST_FORMAT_RIGHT)); - PyDict_SetItemString(d,"wxLIST_FORMAT_CENTRE", PyInt_FromLong((long) wxLIST_FORMAT_CENTRE)); - PyDict_SetItemString(d,"wxLIST_FORMAT_CENTER", PyInt_FromLong((long) wxLIST_FORMAT_CENTER)); PyDict_SetItemString(d,"wxLIST_AUTOSIZE", PyInt_FromLong((long) wxLIST_AUTOSIZE)); PyDict_SetItemString(d,"wxLIST_AUTOSIZE_USEHEADER", PyInt_FromLong((long) wxLIST_AUTOSIZE_USEHEADER)); PyDict_SetItemString(d,"wxLIST_RECT_BOUNDS", PyInt_FromLong((long) wxLIST_RECT_BOUNDS)); @@ -6656,6 +8025,10 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxLIST_FIND_DOWN", PyInt_FromLong((long) wxLIST_FIND_DOWN)); PyDict_SetItemString(d,"wxLIST_FIND_LEFT", PyInt_FromLong((long) wxLIST_FIND_LEFT)); PyDict_SetItemString(d,"wxLIST_FIND_RIGHT", PyInt_FromLong((long) wxLIST_FIND_RIGHT)); + PyDict_SetItemString(d,"wxLIST_FORMAT_LEFT", PyInt_FromLong((long) wxLIST_FORMAT_LEFT)); + PyDict_SetItemString(d,"wxLIST_FORMAT_RIGHT", PyInt_FromLong((long) wxLIST_FORMAT_RIGHT)); + PyDict_SetItemString(d,"wxLIST_FORMAT_CENTRE", PyInt_FromLong((long) wxLIST_FORMAT_CENTRE)); + PyDict_SetItemString(d,"wxLIST_FORMAT_CENTER", PyInt_FromLong((long) wxLIST_FORMAT_CENTER)); PyDict_SetItemString(d,"wxTreeItemIcon_Normal", PyInt_FromLong((long) wxTreeItemIcon_Normal)); PyDict_SetItemString(d,"wxTreeItemIcon_Selected", PyInt_FromLong((long) wxTreeItemIcon_Selected)); PyDict_SetItemString(d,"wxTreeItemIcon_Expanded", PyInt_FromLong((long) wxTreeItemIcon_Expanded)); diff --git a/utils/wxPython/src/msw/controls2.py b/wxPython/src/gtk/controls2.py similarity index 76% rename from utils/wxPython/src/msw/controls2.py rename to wxPython/src/gtk/controls2.py index a8669d0550..d7d9409983 100644 --- a/utils/wxPython/src/msw/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -13,6 +13,50 @@ from events import * from controls import * import wx +class wxListItemAttrPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_SetFont,(self,) + _args, _kwargs) + return val + def HasTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_HasTextColour,(self,) + _args, _kwargs) + return val + def HasBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_HasBackgroundColour,(self,) + _args, _kwargs) + return val + def HasFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_HasFont,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxListItemAttr(wxListItemAttrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(controls2c.new_wxListItemAttr,_args,_kwargs) + self.thisown = 1 + + + + class wxListItemPtr : def __init__(self,this): self.this = this @@ -20,6 +64,97 @@ class wxListItemPtr : def __del__(self,controls2c=controls2c): if self.thisown == 1 : controls2c.delete_wxListItem(self) + def Clear(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_Clear,(self,) + _args, _kwargs) + return val + def ClearAttributes(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_ClearAttributes,(self,) + _args, _kwargs) + return val + def SetMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetMask,(self,) + _args, _kwargs) + return val + def SetId(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetId,(self,) + _args, _kwargs) + return val + def SetColumn(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetColumn,(self,) + _args, _kwargs) + return val + def SetState(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetState,(self,) + _args, _kwargs) + return val + def SetStateMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetStateMask,(self,) + _args, _kwargs) + return val + def SetText(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetText,(self,) + _args, _kwargs) + return val + def SetImage(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetImage,(self,) + _args, _kwargs) + return val + def SetData(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetData,(self,) + _args, _kwargs) + return val + def SetWidth(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetWidth,(self,) + _args, _kwargs) + return val + def SetAlign(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetAlign,(self,) + _args, _kwargs) + return val + def SetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetFont,(self,) + _args, _kwargs) + return val + def GetMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetMask,(self,) + _args, _kwargs) + return val + def GetId(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetId,(self,) + _args, _kwargs) + return val + def GetColumn(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetColumn,(self,) + _args, _kwargs) + return val + def GetState(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetState,(self,) + _args, _kwargs) + return val + def GetText(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetText,(self,) + _args, _kwargs) + return val + def GetImage(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetImage,(self,) + _args, _kwargs) + return val + def GetData(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetData,(self,) + _args, _kwargs) + return val + def GetWidth(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetWidth,(self,) + _args, _kwargs) + return val + def GetAlign(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetAlign,(self,) + _args, _kwargs) + return val + def GetAttributes(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetAttributes,(self,) + _args, _kwargs) + if val: val = wxListItemAttrPtr(val) + return val + def HasAttributes(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_HasAttributes,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val def __setattr__(self,name,value): if name == "m_mask" : controls2c.wxListItem_m_mask_set(self,value) @@ -84,10 +219,51 @@ class wxListItem(wxListItemPtr): -class wxListEventPtr(wxCommandEventPtr): +class wxListEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetCode(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetCode,(self,) + _args, _kwargs) + return val + def GetIndex(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetIndex,(self,) + _args, _kwargs) + return val + def GetOldIndex(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetOldIndex,(self,) + _args, _kwargs) + return val + def GetOldItem(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetOldItem,(self,) + _args, _kwargs) + return val + def GetColumn(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetColumn,(self,) + _args, _kwargs) + return val + def Cancelled(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_Cancelled,(self,) + _args, _kwargs) + return val + def GetPoint(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetPoint,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def GetLabel(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetLabel,(self,) + _args, _kwargs) + return val + def GetText(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetText,(self,) + _args, _kwargs) + return val + def GetImage(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetImage,(self,) + _args, _kwargs) + return val + def GetData(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetData,(self,) + _args, _kwargs) + return val + def GetMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetMask,(self,) + _args, _kwargs) + return val + def GetItem(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetItem,(self,) + _args, _kwargs) + if val: val = wxListItemPtr(val) + return val def __setattr__(self,name,value): if name == "m_code" : controls2c.wxListEvent_m_code_set(self,value) @@ -160,14 +336,6 @@ class wxListCtrlPtr(wxControlPtr): return val def EditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EditLabel,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) - return val - def EndEditLabel(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_EndEditLabel,(self,) + _args, _kwargs) - return val - def GetEditControl(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_GetEditControl,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) return val def EnsureVisible(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs) @@ -227,21 +395,14 @@ class wxListCtrlPtr(wxControlPtr): def GetSelectedItemCount(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs) return val - def GetTextColour(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_GetTextColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) ; val.thisown = 1 - return val - def SetTextColour(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_SetTextColour,(self,) + _args, _kwargs) - return val def GetTopItem(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetTopItem,(self,) + _args, _kwargs) return val def HitTest(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs) return val - def InsertColumnWith(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_InsertColumnWith,(self,) + _args, _kwargs) + def InsertColumnInfo(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs) return val def InsertColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs) @@ -309,7 +470,7 @@ class wxListCtrl(wxListCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -324,6 +485,9 @@ class wxTreeItemIdPtr : def IsOk(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemId_IsOk,(self,) + _args, _kwargs) return val + def __cmp__(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeItemId___cmp__,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxTreeItemId(wxTreeItemIdPtr): @@ -396,6 +560,9 @@ class wxTreeCtrlPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl__setSelf,(self,) + _args, _kwargs) + return val def GetCount(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetCount,(self,) + _args, _kwargs) return val @@ -531,6 +698,10 @@ class wxTreeCtrlPtr(wxControlPtr): val = apply(controls2c.wxTreeCtrl_InsertItem,(self,) + _args, _kwargs) if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 return val + def InsertItemBefore(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_InsertItemBefore,(self,) + _args, _kwargs) + if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 + return val def AppendItem(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_AppendItem,(self,) + _args, _kwargs) if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 @@ -573,14 +744,6 @@ class wxTreeCtrlPtr(wxControlPtr): return val def EditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) - return val - def GetEditControl(self, *_args, **_kwargs): - val = apply(controls2c.wxTreeCtrl_GetEditControl,(self,) + _args, _kwargs) - if val: val = wxTextCtrlPtr(val) - return val - def EndEditLabel(self, *_args, **_kwargs): - val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self,) + _args, _kwargs) return val def SortChildren(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_SortChildren,(self,) + _args, _kwargs) @@ -603,23 +766,22 @@ class wxTreeCtrlPtr(wxControlPtr): def SetItemFont(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs) return val - def SetItemDropHighlight(self, *_args, **_kwargs): - val = apply(controls2c.wxTreeCtrl_SetItemDropHighlight,(self,) + _args, _kwargs) - return val - def GetBoundingRect(self, *_args, **_kwargs): - val = apply(controls2c.wxTreeCtrl_GetBoundingRect,(self,) + _args, _kwargs) - return val def __repr__(self): return "" % (self.this,) - # Redefine a couple methods that SWIG gets a bit confused on... - def GetFirstChild(self,arg0,arg1): - val1, val2 = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1) + # Redefine some methods that SWIG gets a bit confused on... + def GetFirstChild(self, *_args, **_kwargs): + val1,val2 = apply(controls2c.wxTreeCtrl_GetFirstChild,(self,) + _args, _kwargs) val1 = wxTreeItemIdPtr(val1) val1.thisown = 1 return (val1,val2) - def GetNextChild(self,arg0,arg1): - val1, val2 = controls2c.wxTreeCtrl_GetNextChild(self.this,arg0.this,arg1) + def GetNextChild(self, *_args, **_kwargs): + val1,val2 = apply(controls2c.wxTreeCtrl_GetNextChild,(self,) + _args, _kwargs) + val1 = wxTreeItemIdPtr(val1) + val1.thisown = 1 + return (val1,val2) + def HitTest(self, *_args, **_kwargs): + val1, val2 = apply(controls2c.wxTreeCtrl_HitTest,(self,) + _args, _kwargs) val1 = wxTreeItemIdPtr(val1) val1.thisown = 1 return (val1,val2) @@ -628,7 +790,8 @@ class wxTreeCtrl(wxTreeCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxTreeCtrl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) + self._setSelf(self, wxTreeCtrl) @@ -671,10 +834,6 @@ wxLIST_ALIGN_DEFAULT = controls2c.wxLIST_ALIGN_DEFAULT wxLIST_ALIGN_LEFT = controls2c.wxLIST_ALIGN_LEFT wxLIST_ALIGN_TOP = controls2c.wxLIST_ALIGN_TOP wxLIST_ALIGN_SNAP_TO_GRID = controls2c.wxLIST_ALIGN_SNAP_TO_GRID -wxLIST_FORMAT_LEFT = controls2c.wxLIST_FORMAT_LEFT -wxLIST_FORMAT_RIGHT = controls2c.wxLIST_FORMAT_RIGHT -wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE -wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER wxLIST_AUTOSIZE = controls2c.wxLIST_AUTOSIZE wxLIST_AUTOSIZE_USEHEADER = controls2c.wxLIST_AUTOSIZE_USEHEADER wxLIST_RECT_BOUNDS = controls2c.wxLIST_RECT_BOUNDS @@ -684,6 +843,10 @@ wxLIST_FIND_UP = controls2c.wxLIST_FIND_UP wxLIST_FIND_DOWN = controls2c.wxLIST_FIND_DOWN wxLIST_FIND_LEFT = controls2c.wxLIST_FIND_LEFT wxLIST_FIND_RIGHT = controls2c.wxLIST_FIND_RIGHT +wxLIST_FORMAT_LEFT = controls2c.wxLIST_FORMAT_LEFT +wxLIST_FORMAT_RIGHT = controls2c.wxLIST_FORMAT_RIGHT +wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE +wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER wxTreeItemIcon_Normal = controls2c.wxTreeItemIcon_Normal wxTreeItemIcon_Selected = controls2c.wxTreeItemIcon_Selected wxTreeItemIcon_Expanded = controls2c.wxTreeItemIcon_Expanded diff --git a/utils/wxPython/src/msw/events.cpp b/wxPython/src/gtk/events.cpp similarity index 80% rename from utils/wxPython/src/msw/events.cpp rename to wxPython/src/gtk/events.cpp index fd83a70aa7..1385ddb59a 100644 --- a/utils/wxPython/src/msw/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/events.cpp + * FILE : src/gtk/events.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -56,48 +58,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -764,8 +746,8 @@ static PyObject *_wrap_new_wxCommandEvent(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxCommandEvent_Checked(_swigobj) (_swigobj->Checked()) -static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxCommandEvent_IsChecked(_swigobj) (_swigobj->IsChecked()) +static PyObject *_wrap_wxCommandEvent_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxCommandEvent * _arg0; @@ -773,18 +755,18 @@ static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, Py char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_Checked",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_IsChecked",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_Checked. Expected _wxCommandEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_IsChecked. Expected _wxCommandEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCommandEvent_Checked(_arg0); + _result = (bool )wxCommandEvent_IsChecked(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -951,11 +933,22 @@ static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2176,6 +2169,515 @@ static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxMouseEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_set. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxMouseEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_x_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_set. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxMouseEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_y_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_y_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_leftDown_set(_swigobj,_swigval) (_swigobj->m_leftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_leftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_leftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_leftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_leftDown_get(_swigobj) ((bool ) _swigobj->m_leftDown) +static PyObject *_wrap_wxMouseEvent_m_leftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_leftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_middleDown_set(_swigobj,_swigval) (_swigobj->m_middleDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_middleDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_middleDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_middleDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_middleDown_get(_swigobj) ((bool ) _swigobj->m_middleDown) +static PyObject *_wrap_wxMouseEvent_m_middleDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_middleDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_rightDown_set(_swigobj,_swigval) (_swigobj->m_rightDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_rightDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_rightDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_rightDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_rightDown_get(_swigobj) ((bool ) _swigobj->m_rightDown) +static PyObject *_wrap_wxMouseEvent_m_rightDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_rightDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxMouseEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_controlDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxMouseEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxMouseEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxKeyEventTowxEvent(void *ptr) { wxKeyEvent *src; wxEvent *dest; @@ -2345,6 +2847,60 @@ static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) +static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetKeyCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetKeyCode. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetKeyCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_HasModifiers(_swigobj) (_swigobj->HasModifiers()) +static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_HasModifiers",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_HasModifiers. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_HasModifiers(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2475,6 +3031,456 @@ static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *arg return _resultobj; } +#define wxKeyEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxKeyEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxKeyEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_y_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_set(_swigobj,_swigval) (_swigobj->m_keyCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_keyCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_keyCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_keyCode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_get(_swigobj) ((long ) _swigobj->m_keyCode) +static PyObject *_wrap_wxKeyEvent_m_keyCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_keyCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxKeyEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_controlDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxKeyEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxKeyEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_scanCode_set(_swigobj,_swigval) (_swigobj->m_scanCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_scanCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_scanCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_scanCode_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_scanCode_get(_swigobj) ((bool ) _swigobj->m_scanCode) +static PyObject *_wrap_wxKeyEvent_m_scanCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_scanCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxNavigationKeyEventTowxEvent(void *ptr) { wxNavigationKeyEvent *src; wxEvent *dest; @@ -4192,11 +5198,22 @@ static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4315,6 +5332,33 @@ static PyObject *_wrap_wxNotifyEvent_IsAllowed(PyObject *self, PyObject *args, P return _resultobj; } +#define wxNotifyEvent_Allow(_swigobj) (_swigobj->Allow()) +static PyObject *_wrap_wxNotifyEvent_Allow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotifyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotifyEvent_Allow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotifyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotifyEvent_Allow. Expected _wxNotifyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotifyEvent_Allow(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxNotifyEvent_Veto(_swigobj) (_swigobj->Veto()) static PyObject *_wrap_wxNotifyEvent_Veto(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4537,6 +5581,14 @@ static PyObject *_wrap_wxQueryNewPaletteEvent_GetPaletteRealized(PyObject *self, return _resultobj; } +static void *SwigwxWindowCreateEventTowxCommandEvent(void *ptr) { + wxWindowCreateEvent *src; + wxCommandEvent *dest; + src = (wxWindowCreateEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + static void *SwigwxWindowCreateEventTowxEvent(void *ptr) { wxWindowCreateEvent *src; wxEvent *dest; @@ -4613,6 +5665,14 @@ static PyObject *_wrap_wxWindowCreateEvent_GetWindow(PyObject *self, PyObject *a return _resultobj; } +static void *SwigwxWindowDestroyEventTowxCommandEvent(void *ptr) { + wxWindowDestroyEvent *src; + wxCommandEvent *dest; + src = (wxWindowDestroyEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + static void *SwigwxWindowDestroyEventTowxEvent(void *ptr) { wxWindowDestroyEvent *src; wxEvent *dest; @@ -4689,6 +5749,68 @@ static PyObject *_wrap_wxWindowDestroyEvent_GetWindow(PyObject *self, PyObject * return _resultobj; } +static void *SwigwxTimerEventTowxEvent(void *ptr) { + wxTimerEvent *src; + wxEvent *dest; + src = (wxTimerEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxTimerEvent(_swigarg0,_swigarg1) (new wxTimerEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxTimerEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimerEvent * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + char *_kwnames[] = { "id","interval", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxTimerEvent",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTimerEvent *)new_wxTimerEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimerEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimerEvent_GetInterval(_swigobj) (_swigobj->GetInterval()) +static PyObject *_wrap_wxTimerEvent_GetInterval(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimerEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimerEvent_GetInterval",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimerEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimerEvent_GetInterval. Expected _wxTimerEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimerEvent_GetInterval(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxPyEventTowxEvent(void *ptr) { wxPyEvent *src; wxEvent *dest; @@ -4951,6 +6073,8 @@ static PyMethodDef eventscMethods[] = { { "wxPyEvent_SetSelf", (PyCFunction) _wrap_wxPyEvent_SetSelf, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPyEvent", (PyCFunction) _wrap_delete_wxPyEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyEvent", (PyCFunction) _wrap_new_wxPyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxTimerEvent_GetInterval", (PyCFunction) _wrap_wxTimerEvent_GetInterval, METH_VARARGS | METH_KEYWORDS }, + { "new_wxTimerEvent", (PyCFunction) _wrap_new_wxTimerEvent, METH_VARARGS | METH_KEYWORDS }, { "wxWindowDestroyEvent_GetWindow", (PyCFunction) _wrap_wxWindowDestroyEvent_GetWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindowDestroyEvent", (PyCFunction) _wrap_new_wxWindowDestroyEvent, METH_VARARGS | METH_KEYWORDS }, { "wxWindowCreateEvent_GetWindow", (PyCFunction) _wrap_wxWindowCreateEvent_GetWindow, METH_VARARGS | METH_KEYWORDS }, @@ -4962,6 +6086,7 @@ static PyMethodDef eventscMethods[] = { { "wxPaletteChangedEvent_SetChangedWindow", (PyCFunction) _wrap_wxPaletteChangedEvent_SetChangedWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxPaletteChangedEvent", (PyCFunction) _wrap_new_wxPaletteChangedEvent, METH_VARARGS | METH_KEYWORDS }, { "wxNotifyEvent_Veto", (PyCFunction) _wrap_wxNotifyEvent_Veto, METH_VARARGS | METH_KEYWORDS }, + { "wxNotifyEvent_Allow", (PyCFunction) _wrap_wxNotifyEvent_Allow, METH_VARARGS | METH_KEYWORDS }, { "wxNotifyEvent_IsAllowed", (PyCFunction) _wrap_wxNotifyEvent_IsAllowed, METH_VARARGS | METH_KEYWORDS }, { "new_wxNotifyEvent", (PyCFunction) _wrap_new_wxNotifyEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxSysColourChangedEvent", (PyCFunction) _wrap_new_wxSysColourChangedEvent, METH_VARARGS | METH_KEYWORDS }, @@ -5021,16 +6146,52 @@ static PyMethodDef eventscMethods[] = { { "wxNavigationKeyEvent_SetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_SetDirection, METH_VARARGS | METH_KEYWORDS }, { "wxNavigationKeyEvent_GetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_GetDirection, METH_VARARGS | METH_KEYWORDS }, { "new_wxNavigationKeyEvent", (PyCFunction) _wrap_new_wxNavigationKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_get", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_set", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_get", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_set", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_get", (PyCFunction) _wrap_wxKeyEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_set", (PyCFunction) _wrap_wxKeyEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_get", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_set", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_get", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_set", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_get", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_set", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_get", (PyCFunction) _wrap_wxKeyEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_set", (PyCFunction) _wrap_wxKeyEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_get", (PyCFunction) _wrap_wxKeyEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_set", (PyCFunction) _wrap_wxKeyEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPositionTuple", (PyCFunction) _wrap_wxKeyEvent_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPosition", (PyCFunction) _wrap_wxKeyEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetY", (PyCFunction) _wrap_wxKeyEvent_GetY, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetX", (PyCFunction) _wrap_wxKeyEvent_GetX, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_HasModifiers", (PyCFunction) _wrap_wxKeyEvent_HasModifiers, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_GetKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetKeyCode, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_KeyCode", (PyCFunction) _wrap_wxKeyEvent_KeyCode, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ShiftDown", (PyCFunction) _wrap_wxKeyEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_AltDown", (PyCFunction) _wrap_wxKeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ControlDown", (PyCFunction) _wrap_wxKeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, { "new_wxKeyEvent", (PyCFunction) _wrap_new_wxKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_get", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_set", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_get", (PyCFunction) _wrap_wxMouseEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_set", (PyCFunction) _wrap_wxMouseEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_get", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_set", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_get", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_set", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_get", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_set", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_get", (PyCFunction) _wrap_wxMouseEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_set", (PyCFunction) _wrap_wxMouseEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_get", (PyCFunction) _wrap_wxMouseEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_set", (PyCFunction) _wrap_wxMouseEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetY", (PyCFunction) _wrap_wxMouseEvent_GetY, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetX", (PyCFunction) _wrap_wxMouseEvent_GetX, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetLogicalPosition", (PyCFunction) _wrap_wxMouseEvent_GetLogicalPosition, METH_VARARGS | METH_KEYWORDS }, @@ -5078,7 +6239,8 @@ static PyMethodDef eventscMethods[] = { { "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetInt", (PyCFunction) _wrap_wxCommandEvent_GetInt, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetExtraLong", (PyCFunction) _wrap_wxCommandEvent_GetExtraLong, METH_VARARGS | METH_KEYWORDS }, - { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_Checked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_IsChecked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, { "new_wxCommandEvent", (PyCFunction) _wrap_new_wxCommandEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_SetCanVeto", (PyCFunction) _wrap_wxCloseEvent_SetCanVeto, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_GetVeto", (PyCFunction) _wrap_wxCloseEvent_GetVeto, METH_VARARGS | METH_KEYWORDS }, @@ -5110,11 +6272,12 @@ static PyMethodDef eventscMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_wxEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent}, { "_wxEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent}, { "_wxEvent","_class_wxPyEvent",SwigwxPyEventTowxEvent}, { "_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent}, + { "_wxEvent","_class_wxTimerEvent",SwigwxTimerEventTowxEvent}, + { "_wxEvent","_wxTimerEvent",SwigwxTimerEventTowxEvent}, { "_wxEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_wxEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_wxEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent}, @@ -5173,11 +6336,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvent","_wxCloseEvent",SwigwxCloseEventTowxEvent}, { "_wxEvent","_class_wxSizeEvent",SwigwxSizeEventTowxEvent}, { "_wxEvent","_wxSizeEvent",SwigwxSizeEventTowxEvent}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -5186,44 +6345,31 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_wxPrintQuality","_time_t",0}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_class_wxEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent}, { "_class_wxEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent}, { "_class_wxEvent","_class_wxPyEvent",SwigwxPyEventTowxEvent}, { "_class_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent}, + { "_class_wxEvent","_class_wxTimerEvent",SwigwxTimerEventTowxEvent}, + { "_class_wxEvent","_wxTimerEvent",SwigwxTimerEventTowxEvent}, { "_class_wxEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_class_wxEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_class_wxEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent}, @@ -5282,72 +6428,43 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxEvent","_wxCloseEvent",SwigwxCloseEventTowxEvent}, { "_class_wxEvent","_class_wxSizeEvent",SwigwxSizeEventTowxEvent}, { "_class_wxEvent","_wxSizeEvent",SwigwxSizeEventTowxEvent}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, { "_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, + { "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, { "_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, { "_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, { "_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, { "_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, + { "_char","_wxChar",0}, { "_wxScrollEvent","_class_wxSpinEvent",SwigwxSpinEventTowxScrollEvent}, { "_wxScrollEvent","_wxSpinEvent",SwigwxSpinEventTowxScrollEvent}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -5357,38 +6474,31 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_signed_short",0}, { "_class_wxScrollEvent","_class_wxSpinEvent",SwigwxSpinEventTowxScrollEvent}, { "_class_wxScrollEvent","_wxSpinEvent",SwigwxSpinEventTowxScrollEvent}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -5396,28 +6506,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxCommandEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, { "_class_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_class_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, { "_class_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxSize","_wxSize",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/events.py b/wxPython/src/gtk/events.py similarity index 86% rename from utils/wxPython/src/msw/events.py rename to wxPython/src/gtk/events.py index f088e26c73..3d61ae0ddf 100644 --- a/utils/wxPython/src/msw/events.py +++ b/wxPython/src/gtk/events.py @@ -2,6 +2,8 @@ import eventsc from misc import * + +from gdi import * class wxEventPtr : def __init__(self,this): self.this = this @@ -103,6 +105,9 @@ class wxCommandEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def IsChecked(self, *_args, **_kwargs): + val = apply(eventsc.wxCommandEvent_IsChecked,(self,) + _args, _kwargs) + return val def Checked(self, *_args, **_kwargs): val = apply(eventsc.wxCommandEvent_Checked,(self,) + _args, _kwargs) return val @@ -293,6 +298,55 @@ class wxMouseEventPtr(wxEventPtr): def GetY(self, *_args, **_kwargs): val = apply(eventsc.wxMouseEvent_GetY,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxMouseEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxMouseEvent_m_y_set(self,value) + return + if name == "m_leftDown" : + eventsc.wxMouseEvent_m_leftDown_set(self,value) + return + if name == "m_middleDown" : + eventsc.wxMouseEvent_m_middleDown_set(self,value) + return + if name == "m_rightDown" : + eventsc.wxMouseEvent_m_rightDown_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxMouseEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxMouseEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxMouseEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxMouseEvent_m_metaDown_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxMouseEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxMouseEvent_m_y_get(self) + if name == "m_leftDown" : + return eventsc.wxMouseEvent_m_leftDown_get(self) + if name == "m_middleDown" : + return eventsc.wxMouseEvent_m_middleDown_get(self) + if name == "m_rightDown" : + return eventsc.wxMouseEvent_m_rightDown_get(self) + if name == "m_controlDown" : + return eventsc.wxMouseEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxMouseEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxMouseEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxMouseEvent_m_metaDown_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxMouseEvent(wxMouseEventPtr): @@ -322,6 +376,12 @@ class wxKeyEventPtr(wxEventPtr): def KeyCode(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_KeyCode,(self,) + _args, _kwargs) return val + def GetKeyCode(self, *_args, **_kwargs): + val = apply(eventsc.wxKeyEvent_GetKeyCode,(self,) + _args, _kwargs) + return val + def HasModifiers(self, *_args, **_kwargs): + val = apply(eventsc.wxKeyEvent_HasModifiers,(self,) + _args, _kwargs) + return val def GetX(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetX,(self,) + _args, _kwargs) return val @@ -335,6 +395,50 @@ class wxKeyEventPtr(wxEventPtr): def GetPositionTuple(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetPositionTuple,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxKeyEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxKeyEvent_m_y_set(self,value) + return + if name == "m_keyCode" : + eventsc.wxKeyEvent_m_keyCode_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxKeyEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxKeyEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxKeyEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxKeyEvent_m_metaDown_set(self,value) + return + if name == "m_scanCode" : + eventsc.wxKeyEvent_m_scanCode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxKeyEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxKeyEvent_m_y_get(self) + if name == "m_keyCode" : + return eventsc.wxKeyEvent_m_keyCode_get(self) + if name == "m_controlDown" : + return eventsc.wxKeyEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxKeyEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxKeyEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxKeyEvent_m_metaDown_get(self) + if name == "m_scanCode" : + return eventsc.wxKeyEvent_m_scanCode_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxKeyEvent(wxKeyEventPtr): @@ -706,6 +810,9 @@ class wxNotifyEventPtr(wxCommandEventPtr): def IsAllowed(self, *_args, **_kwargs): val = apply(eventsc.wxNotifyEvent_IsAllowed,(self,) + _args, _kwargs) return val + def Allow(self, *_args, **_kwargs): + val = apply(eventsc.wxNotifyEvent_Allow,(self,) + _args, _kwargs) + return val def Veto(self, *_args, **_kwargs): val = apply(eventsc.wxNotifyEvent_Veto,(self,) + _args, _kwargs) return val @@ -760,7 +867,7 @@ class wxQueryNewPaletteEvent(wxQueryNewPaletteEventPtr): -class wxWindowCreateEventPtr(wxEventPtr): +class wxWindowCreateEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -778,7 +885,7 @@ class wxWindowCreateEvent(wxWindowCreateEventPtr): -class wxWindowDestroyEventPtr(wxEventPtr): +class wxWindowDestroyEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -796,6 +903,23 @@ class wxWindowDestroyEvent(wxWindowDestroyEventPtr): +class wxTimerEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetInterval(self, *_args, **_kwargs): + val = apply(eventsc.wxTimerEvent_GetInterval,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxTimerEvent(wxTimerEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(eventsc.new_wxTimerEvent,_args,_kwargs) + self.thisown = 1 + + + + class wxPyEventPtr(wxEventPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/gtk/filesys.cpp b/wxPython/src/gtk/filesys.cpp new file mode 100644 index 0000000000..c465cf4aff --- /dev/null +++ b/wxPython/src/gtk/filesys.cpp @@ -0,0 +1,2315 @@ +/* + * FILE : src/gtk/filesys.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initfilesysc + +#define SWIG_name "filesysc" + +#include "helpers.h" +#include +#include +#include +#include + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +// wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling +// the callback functions +class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler() : wxFileSystemHandler() {} + + DEC_PYCALLBACK_BOOL_STRING_pure(CanOpen); + DEC_PYCALLBACK_FSF_FSSTRING_pure(OpenFile); + DEC_PYCALLBACK_STRING_STRINGINT_pure(FindFirst); + DEC_PYCALLBACK_STRING__pure(FindNext); + + wxString GetProtocol(const wxString& location) { + return wxFileSystemHandler::GetProtocol(location); + } + + wxString GetLeftLocation(const wxString& location) { + return wxFileSystemHandler::GetLeftLocation(location); + } + + wxString GetAnchor(const wxString& location) { + return wxFileSystemHandler::GetAnchor(location); + } + + wxString GetRightLocation(const wxString& location) { + return wxFileSystemHandler::GetRightLocation(location); + } + + wxString GetMimeTypeFromExt(const wxString& location){ + return wxFileSystemHandler::GetMimeTypeFromExt(location); + } + + PYPRIVATE; +}; + + +IMP_PYCALLBACK_BOOL_STRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, CanOpen); +IMP_PYCALLBACK_FSF_FSSTRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, OpenFile); +IMP_PYCALLBACK_STRING_STRINGINT_pure(wxPyFileSystemHandler, wxFileSystemHandler, FindFirst); +IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext); + +void __wxMemoryFSHandler_AddFile_wxImage(const wxString& filename, + wxImage& image, + long type) { + wxMemoryFSHandler::AddFile(filename, image, type); +} + +void __wxMemoryFSHandler_AddFile_wxBitmap(const wxString& filename, + const wxBitmap& bitmap, + long type) { + wxMemoryFSHandler::AddFile(filename, bitmap, type); +} + +// void __wxMemoryFSHandler_AddFile_wxString(const wxString& filename, +// const wxString& textdata) { +// wxMemoryFSHandler::AddFile(filename, textdata); +// } + +void __wxMemoryFSHandler_AddFile_Data(const wxString& filename, + PyObject* data) { + + wxMemoryFSHandler::AddFile(filename, + (void*)PyString_AsString(data), + (size_t)PyString_Size(data)); +} +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxImage * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","image","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxImage",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxImage. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxBitmap * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","bitmap","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxBitmap",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "filename","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:__wxMemoryFSHandler_AddFile_Data",_kwnames,&_obj0,&_obj1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define new_wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInputStream * _arg0; + wxString * _arg1; + wxString * _arg2; + wxString * _arg3; + wxDateTime * _arg4; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "stream","loc","mimetype","anchor","modif", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:new_wxFSFile",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_argo4)) + return NULL; +{ + if (PyInstance_Check(_obj0)) { + wxPyInputStream* ptr; + if (SWIG_GetPtrObj(_obj0, (void **) &ptr,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } + _arg0 = ptr->wxi; + } else { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxFSFile. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxFSFile_GetStream(_swigobj) (_swigobj->GetStream()) +static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetStream. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxFSFile_GetStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(_resultobj, "thisown", one); + Py_DECREF(one); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxFSFile_GetMimeType(_swigobj) (_swigobj->GetMimeType()) +static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetMimeType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetMimeType. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetLocation(_swigobj) (_swigobj->GetLocation()) +static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetLocation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetLocation. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetLocation(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetAnchor(_swigobj) (_swigobj->GetAnchor()) +static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetAnchor. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetModificationTime(_swigobj) (_swigobj->GetModificationTime()) +static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetModificationTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetModificationTime. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { + wxPyFileSystemHandler *src; + wxFileSystemHandler *dest; + src = (wxPyFileSystemHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxFileSystemHandler() (new wxPyFileSystemHandler()) +static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystemHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFileSystemHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystemHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler__setSelf. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystemHandler__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFileSystemHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_CanOpen. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystemHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxPyFileSystemHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_OpenFile. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileSystemHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystemHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindFirst. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystemHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindNext. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetProtocol(_swigobj,_swigarg0) (_swigobj->GetProtocol(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetProtocol",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetProtocol. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetLeftLocation(_swigobj,_swigarg0) (_swigobj->GetLeftLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetLeftLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetLeftLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetAnchor(_swigobj,_swigarg0) (_swigobj->GetAnchor(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetAnchor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetAnchor. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetRightLocation(_swigobj,_swigarg0) (_swigobj->GetRightLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetRightLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetRightLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetMimeTypeFromExt(_swigobj,_swigarg0) (_swigobj->GetMimeTypeFromExt(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetMimeTypeFromExt",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetMimeTypeFromExt. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define new_wxFileSystem() (new wxFileSystem()) +static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystem",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileSystem *)new_wxFileSystem(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileSystem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystem_ChangePathTo(_swigobj,_swigarg0,_swigarg1) (_swigobj->ChangePathTo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _arg0; + wxString * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","location","is_dir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_ChangePathTo",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_ChangePathTo. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_GetPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_GetPath. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_GetPath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_OpenFile(_swigobj,_swigarg0) (_swigobj->OpenFile(_swigarg0)) +static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxFileSystem * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystem_OpenFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindFirst. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindNext. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_AddHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "handler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_AddHandler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_AddHandler. Expected _wxFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::AddHandler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_CleanUpHandlers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFileSystem_CleanUpHandlers",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::CleanUpHandlers(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxInternetFSHandlerTowxFileSystemHandler(void *ptr) { + wxInternetFSHandler *src; + wxFileSystemHandler *dest; + src = (wxInternetFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxInternetFSHandler() (new wxInternetFSHandler()) +static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInternetFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxInternetFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxInternetFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxInternetFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxInternetFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxInternetFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_CanOpen. Expected _wxInternetFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxInternetFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInternetFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxInternetFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_OpenFile. Expected _wxInternetFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxInternetFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static void *SwigwxZipFSHandlerTowxFileSystemHandler(void *ptr) { + wxZipFSHandler *src; + wxFileSystemHandler *dest; + src = (wxZipFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxZipFSHandler() (new wxZipFSHandler()) +static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxZipFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxZipFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxZipFSHandler *)new_wxZipFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxZipFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxZipFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxZipFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_CanOpen. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxZipFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxZipFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxZipFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_OpenFile. Expected _wxZipFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxZipFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxZipFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxZipFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindFirst. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxZipFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxZipFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindNext. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static void *SwigwxMemoryFSHandlerTowxFileSystemHandler(void *ptr) { + wxMemoryFSHandler *src; + wxFileSystemHandler *dest; + src = (wxMemoryFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxMemoryFSHandler() (new wxMemoryFSHandler()) +static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMemoryFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMemoryFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_RemoveFile",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMemoryFSHandler::RemoveFile(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxMemoryFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMemoryFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_CanOpen. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxMemoryFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxMemoryFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxMemoryFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_OpenFile. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxMemoryFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindFirst. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindNext. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyMethodDef filesyscMethods[] = { + { "wxMemoryFSHandler_FindNext", (PyCFunction) _wrap_wxMemoryFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_FindFirst", (PyCFunction) _wrap_wxMemoryFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_OpenFile", (PyCFunction) _wrap_wxMemoryFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_CanOpen", (PyCFunction) _wrap_wxMemoryFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_RemoveFile", (PyCFunction) _wrap_wxMemoryFSHandler_RemoveFile, METH_VARARGS | METH_KEYWORDS }, + { "new_wxMemoryFSHandler", (PyCFunction) _wrap_new_wxMemoryFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindNext", (PyCFunction) _wrap_wxZipFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindFirst", (PyCFunction) _wrap_wxZipFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_OpenFile", (PyCFunction) _wrap_wxZipFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_CanOpen", (PyCFunction) _wrap_wxZipFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxZipFSHandler", (PyCFunction) _wrap_new_wxZipFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_OpenFile", (PyCFunction) _wrap_wxInternetFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_CanOpen", (PyCFunction) _wrap_wxInternetFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInternetFSHandler", (PyCFunction) _wrap_new_wxInternetFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_CleanUpHandlers", (PyCFunction) _wrap_wxFileSystem_CleanUpHandlers, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_AddHandler", (PyCFunction) _wrap_wxFileSystem_AddHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindNext", (PyCFunction) _wrap_wxFileSystem_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindFirst", (PyCFunction) _wrap_wxFileSystem_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_OpenFile", (PyCFunction) _wrap_wxFileSystem_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_GetPath", (PyCFunction) _wrap_wxFileSystem_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_ChangePathTo", (PyCFunction) _wrap_wxFileSystem_ChangePathTo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystem", (PyCFunction) _wrap_new_wxFileSystem, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetMimeTypeFromExt", (PyCFunction) _wrap_wxFileSystemHandler_GetMimeTypeFromExt, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetRightLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetRightLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetAnchor", (PyCFunction) _wrap_wxFileSystemHandler_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetLeftLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetLeftLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetProtocol", (PyCFunction) _wrap_wxFileSystemHandler_GetProtocol, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindNext", (PyCFunction) _wrap_wxFileSystemHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindFirst", (PyCFunction) _wrap_wxFileSystemHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_OpenFile", (PyCFunction) _wrap_wxFileSystemHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_CanOpen", (PyCFunction) _wrap_wxFileSystemHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler__setSelf", (PyCFunction) _wrap_wxFileSystemHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystemHandler", (PyCFunction) _wrap_new_wxFileSystemHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetModificationTime", (PyCFunction) _wrap_wxFSFile_GetModificationTime, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetAnchor", (PyCFunction) _wrap_wxFSFile_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetLocation", (PyCFunction) _wrap_wxFSFile_GetLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetMimeType", (PyCFunction) _wrap_wxFSFile_GetMimeType, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetStream", (PyCFunction) _wrap_wxFSFile_GetStream, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFSFile", (PyCFunction) _wrap_new_wxFSFile, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_Data", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_Data, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxBitmap", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxBitmap, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxImage", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxImage, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_class_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initfilesysc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("filesysc", filesyscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/filesys.py b/wxPython/src/gtk/filesys.py new file mode 100644 index 0000000000..b0f442faea --- /dev/null +++ b/wxPython/src/gtk/filesys.py @@ -0,0 +1,240 @@ +# This file was created automatically by SWIG. +import filesysc + +from utils import * + +from image import * + +from misc import * + +from gdi import * + +from streams import * +import wx +import string + +import types +def wxMemoryFSHandler_AddFile(filename, a, b=''): + if isinstance(a, wxImage): + __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) + elif isinstance(a, wxBitmap): + __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) + elif type(a) == types.StringType: + #__wxMemoryFSHandler_AddFile_wxString(filename, a) + __wxMemoryFSHandler_AddFile_Data(filename, a) + else: raise TypeError, 'wxImage, wxBitmap or string expected' + +class wxFSFilePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetStream(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetStream,(self,) + _args, _kwargs) + return val + def GetMimeType(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetMimeType,(self,) + _args, _kwargs) + return val + def GetLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetAnchor,(self,) + _args, _kwargs) + return val + def GetModificationTime(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetModificationTime,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __repr__(self): + return "" % (self.this,) +class wxFSFile(wxFSFilePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFSFile,_args,_kwargs) + self.thisown = 1 + + + + +class wxCPPFileSystemHandlerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxCPPFileSystemHandler(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + + + + +class wxFileSystemHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler__setSelf,(self,) + _args, _kwargs) + return val + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindNext,(self,) + _args, _kwargs) + return val + def GetProtocol(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetProtocol,(self,) + _args, _kwargs) + return val + def GetLeftLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetLeftLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetAnchor,(self,) + _args, _kwargs) + return val + def GetRightLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetRightLocation,(self,) + _args, _kwargs) + return val + def GetMimeTypeFromExt(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetMimeTypeFromExt,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystemHandler(wxFileSystemHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystemHandler,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxFileSystemHandler) + + + + +class wxFileSystemPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def ChangePathTo(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_ChangePathTo,(self,) + _args, _kwargs) + return val + def GetPath(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_GetPath,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystem(wxFileSystemPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystem,_args,_kwargs) + self.thisown = 1 + + + + +class wxInternetFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxInternetFSHandler(wxInternetFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxInternetFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxZipFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxZipFSHandler(wxZipFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxZipFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxMemoryFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxMemoryFSHandler(wxMemoryFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxMemoryFSHandler,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +__wxMemoryFSHandler_AddFile_wxImage = filesysc.__wxMemoryFSHandler_AddFile_wxImage + +__wxMemoryFSHandler_AddFile_wxBitmap = filesysc.__wxMemoryFSHandler_AddFile_wxBitmap + +__wxMemoryFSHandler_AddFile_Data = filesysc.__wxMemoryFSHandler_AddFile_Data + +wxFileSystem_AddHandler = filesysc.wxFileSystem_AddHandler + +wxFileSystem_CleanUpHandlers = filesysc.wxFileSystem_CleanUpHandlers + +wxMemoryFSHandler_RemoveFile = filesysc.wxMemoryFSHandler_RemoveFile + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/utils/wxPython/src/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp similarity index 72% rename from utils/wxPython/src/gtk/frames.cpp rename to wxPython/src/gtk/frames.cpp index 91334c11b4..837ea616d1 100644 --- a/utils/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/frames.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/frames.cpp + * FILE : src/gtk/frames.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -56,48 +58,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -130,8 +112,8 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -154,11 +136,22 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -294,6 +287,41 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxFrame_GetIcon(_swigobj) (_swigobj->GetIcon()) +static PyObject *_wrap_wxFrame_GetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIcon * _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetIcon",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetIcon. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxIcon & _result_ref = wxFrame_GetIcon(_arg0); + _result = (wxIcon *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxFrame_GetMenuBar(_swigobj) (_swigobj->GetMenuBar()) static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -515,6 +543,60 @@ static PyObject *_wrap_wxFrame_Maximize(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxFrame_IsMaximized(_swigobj) (_swigobj->IsMaximized()) +static PyObject *_wrap_wxFrame_IsMaximized(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_IsMaximized",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsMaximized. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_IsMaximized(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_Restore(_swigobj) (_swigobj->Restore()) +static PyObject *_wrap_wxFrame_Restore(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_Restore",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Restore. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_Restore(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxFrame_SetAcceleratorTable(_swigobj,_swigarg0) (_swigobj->SetAcceleratorTable(_swigarg0)) static PyObject *_wrap_wxFrame_SetAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -680,11 +762,22 @@ static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -768,11 +861,22 @@ static PyObject *_wrap_wxFrame_SetTitle(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -824,6 +928,121 @@ static PyObject *_wrap_wxFrame_SetToolBar(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxFrame_MakeModal(_swigobj,_swigarg0) (_swigobj->MakeModal(_swigarg0)) +static PyObject *_wrap_wxFrame_MakeModal(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","modal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFrame_MakeModal",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_MakeModal. Expected _wxFrame_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_MakeModal(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFrame_GetClientAreaOrigin(_swigobj) (_swigobj->GetClientAreaOrigin()) +static PyObject *_wrap_wxFrame_GetClientAreaOrigin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetClientAreaOrigin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetClientAreaOrigin. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) +static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Command",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_Command(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_ProcessCommand(_swigobj,_swigarg0) (_swigobj->ProcessCommand(_swigarg0)) +static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_ProcessCommand",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_ProcessCommand. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxMiniFrameTowxFrame(void *ptr) { wxMiniFrame *src; wxFrame *dest; @@ -855,8 +1074,8 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -879,11 +1098,22 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -918,6 +1148,10 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject static PyMethodDef framescMethods[] = { { "new_wxMiniFrame", (PyCFunction) _wrap_new_wxMiniFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_ProcessCommand", (PyCFunction) _wrap_wxFrame_ProcessCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetClientAreaOrigin", (PyCFunction) _wrap_wxFrame_GetClientAreaOrigin, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_MakeModal", (PyCFunction) _wrap_wxFrame_MakeModal, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetToolBar", (PyCFunction) _wrap_wxFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetTitle", (PyCFunction) _wrap_wxFrame_SetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusWidths", (PyCFunction) _wrap_wxFrame_SetStatusWidths, METH_VARARGS | METH_KEYWORDS }, @@ -926,6 +1160,8 @@ static PyMethodDef framescMethods[] = { { "wxFrame_SetMenuBar", (PyCFunction) _wrap_wxFrame_SetMenuBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetIcon", (PyCFunction) _wrap_wxFrame_SetIcon, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetAcceleratorTable", (PyCFunction) _wrap_wxFrame_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_Restore", (PyCFunction) _wrap_wxFrame_Restore, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_IsMaximized", (PyCFunction) _wrap_wxFrame_IsMaximized, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Maximize", (PyCFunction) _wrap_wxFrame_Maximize, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_IsIconized", (PyCFunction) _wrap_wxFrame_IsIconized, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Iconize", (PyCFunction) _wrap_wxFrame_Iconize, METH_VARARGS | METH_KEYWORDS }, @@ -933,6 +1169,7 @@ static PyMethodDef framescMethods[] = { { "wxFrame_GetTitle", (PyCFunction) _wrap_wxFrame_GetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetStatusBar", (PyCFunction) _wrap_wxFrame_GetStatusBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetMenuBar", (PyCFunction) _wrap_wxFrame_GetMenuBar, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetIcon", (PyCFunction) _wrap_wxFrame_GetIcon, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateToolBar", (PyCFunction) _wrap_wxFrame_CreateToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateStatusBar", (PyCFunction) _wrap_wxFrame_CreateStatusBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Centre", (PyCFunction) _wrap_wxFrame_Centre, METH_VARARGS | METH_KEYWORDS }, @@ -946,14 +1183,7 @@ static PyMethodDef framescMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -962,262 +1192,90 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler}, { "_class_wxEvtHandler","_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxFrame",SwigwxFrameTowxEvtHandler}, { "_class_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxMiniFrame",SwigwxMiniFrameTowxWindow}, { "_class_wxWindow","_wxMiniFrame",SwigwxMiniFrameTowxWindow}, { "_class_wxWindow","_class_wxFrame",SwigwxFrameTowxWindow}, { "_class_wxWindow","_wxFrame",SwigwxFrameTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, { "_wxFrame","_class_wxMiniFrame",SwigwxMiniFrameTowxFrame}, { "_wxFrame","_wxMiniFrame",SwigwxMiniFrameTowxFrame}, - { "_wxFrame","_class_wxFrame",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -1225,51 +1283,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, { "_wxEvtHandler","_class_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler}, { "_wxEvtHandler","_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler}, { "_wxEvtHandler","_class_wxFrame",SwigwxFrameTowxEvtHandler}, { "_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, { "_wxWindow","_class_wxMiniFrame",SwigwxMiniFrameTowxWindow}, { "_wxWindow","_wxMiniFrame",SwigwxMiniFrameTowxWindow}, { "_wxWindow","_class_wxFrame",SwigwxFrameTowxWindow}, { "_wxWindow","_wxFrame",SwigwxFrameTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, { "_class_wxFrame","_class_wxMiniFrame",SwigwxMiniFrameTowxFrame}, { "_class_wxFrame","_wxMiniFrame",SwigwxMiniFrameTowxFrame}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; @@ -1281,6 +1306,12 @@ SWIGEXPORT(void) initframesc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("framesc", framescMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxFULLSCREEN_NOMENUBAR", PyInt_FromLong((long) wxFULLSCREEN_NOMENUBAR)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOTOOLBAR", PyInt_FromLong((long) wxFULLSCREEN_NOTOOLBAR)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOSTATUSBAR", PyInt_FromLong((long) wxFULLSCREEN_NOSTATUSBAR)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOBORDER", PyInt_FromLong((long) wxFULLSCREEN_NOBORDER)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOCAPTION", PyInt_FromLong((long) wxFULLSCREEN_NOCAPTION)); + PyDict_SetItemString(d,"wxFULLSCREEN_ALL", PyInt_FromLong((long) wxFULLSCREEN_ALL)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/utils/wxPython/src/msw/frames.py b/wxPython/src/gtk/frames.py similarity index 74% rename from utils/wxPython/src/msw/frames.py rename to wxPython/src/gtk/frames.py index 401953ef13..33ec02f388 100644 --- a/utils/wxPython/src/msw/frames.py +++ b/wxPython/src/gtk/frames.py @@ -22,9 +22,6 @@ class wxFramePtr(wxWindowPtr): def Centre(self, *_args, **_kwargs): val = apply(framesc.wxFrame_Centre,(self,) + _args, _kwargs) return val - def Command(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Command,(self,) + _args, _kwargs) - return val def CreateStatusBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_CreateStatusBar,(self,) + _args, _kwargs) if val: val = wxStatusBarPtr(val) @@ -33,6 +30,10 @@ class wxFramePtr(wxWindowPtr): val = apply(framesc.wxFrame_CreateToolBar,(self,) + _args, _kwargs) if val: val = wxToolBarPtr(val) return val + def GetIcon(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetIcon,(self,) + _args, _kwargs) + if val: val = wxIconPtr(val) + return val def GetMenuBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetMenuBar,(self,) + _args, _kwargs) if val: val = wxMenuBarPtr(val) @@ -57,6 +58,12 @@ class wxFramePtr(wxWindowPtr): def Maximize(self, *_args, **_kwargs): val = apply(framesc.wxFrame_Maximize,(self,) + _args, _kwargs) return val + def IsMaximized(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_IsMaximized,(self,) + _args, _kwargs) + return val + def Restore(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Restore,(self,) + _args, _kwargs) + return val def SetAcceleratorTable(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetAcceleratorTable,(self,) + _args, _kwargs) return val @@ -81,13 +88,26 @@ class wxFramePtr(wxWindowPtr): def SetToolBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetToolBar,(self,) + _args, _kwargs) return val + def MakeModal(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_MakeModal,(self,) + _args, _kwargs) + return val + def GetClientAreaOrigin(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetClientAreaOrigin,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def Command(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Command,(self,) + _args, _kwargs) + return val + def ProcessCommand(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_ProcessCommand,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFrame(wxFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -102,7 +122,7 @@ class wxMiniFrame(wxMiniFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxMiniFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -115,3 +135,9 @@ class wxMiniFrame(wxMiniFramePtr): #-------------- VARIABLE WRAPPERS ------------------ +wxFULLSCREEN_NOMENUBAR = framesc.wxFULLSCREEN_NOMENUBAR +wxFULLSCREEN_NOTOOLBAR = framesc.wxFULLSCREEN_NOTOOLBAR +wxFULLSCREEN_NOSTATUSBAR = framesc.wxFULLSCREEN_NOSTATUSBAR +wxFULLSCREEN_NOBORDER = framesc.wxFULLSCREEN_NOBORDER +wxFULLSCREEN_NOCAPTION = framesc.wxFULLSCREEN_NOCAPTION +wxFULLSCREEN_ALL = framesc.wxFULLSCREEN_ALL diff --git a/utils/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp similarity index 93% rename from utils/wxPython/src/gtk/gdi.cpp rename to wxPython/src/gtk/gdi.cpp index 55af76a37d..d65f961680 100644 --- a/utils/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/gdi.cpp + * FILE : src/gtk/gdi.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,54 +62,36 @@ extern PyObject *SWIG_newvarlink(void); #include #endif -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; } static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); // Alternate 'constructor' wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { return new wxBitmap(width, height, depth); @@ -230,12 +214,13 @@ static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kw wxBitmap * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "bitmap","colour", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMaskColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMaskColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -244,13 +229,11 @@ static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kw return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMaskColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); @@ -338,11 +321,22 @@ static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNamedColour",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1040,11 +1034,22 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:new_wxBitmap",_kwnames,&_obj0,&_arg1)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1182,11 +1187,22 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1225,11 +1241,22 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -1479,6 +1506,43 @@ static PyObject *_wrap_wxBitmap_SetDepth(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxBitmap_GetSubBitmap(_swigobj,_swigarg0) (_swigobj->GetSubBitmap(_swigarg0)) +static PyObject *_wrap_wxBitmap_GetSubBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmap * _result; + wxBitmap * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBitmap_GetSubBitmap",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetSubBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define new_wxMask(_swigarg0) (new wxMask(_swigarg0)) static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1529,11 +1593,22 @@ static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|ii:new_wxIcon",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1603,11 +1678,22 @@ static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2146,11 +2232,22 @@ static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2464,19 +2561,18 @@ static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kw static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxColour",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxColour",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxColour. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; delete_wxColour(_arg0); @@ -2492,19 +2588,18 @@ static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; unsigned char _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Red",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Red",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Red. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (unsigned char )wxColour_Red(_arg0); @@ -2519,19 +2614,18 @@ static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args, PyObject * PyObject * _resultobj; unsigned char _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Green",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Green",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Green. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (unsigned char )wxColour_Green(_arg0); @@ -2546,19 +2640,18 @@ static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; unsigned char _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Blue",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Blue",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Blue. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (unsigned char )wxColour_Blue(_arg0); @@ -2573,19 +2666,18 @@ static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args, PyObject *kwa PyObject * _resultobj; bool _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Ok",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Ok",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Ok. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (bool )wxColour_Ok(_arg0); @@ -2602,19 +2694,18 @@ static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args, PyObject *kw unsigned char _arg1; unsigned char _arg2; unsigned char _arg3; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self","red","green","blue", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbb:wxColour_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbb:wxColour_Set",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Set. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxColour_Set(_arg0,_arg1,_arg2,_arg3); @@ -2636,19 +2727,18 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; PyObject * _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Get",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Get",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Get. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (PyObject *)wxColour_Get(_arg0); @@ -2670,20 +2760,19 @@ static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwarg wxColour * _arg0; int _arg1 = (int ) 1; int _arg2 = (int ) wxSOLID; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "colour","width","style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:new_wxPen",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:new_wxPen",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPen. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (wxPen *)new_wxPen(_arg0,_arg1,_arg2); @@ -2903,11 +2992,12 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args, PyObject wxPen * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPen_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPen_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2916,13 +3006,11 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args, PyObject return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxPen_SetColour(_arg0,*_arg1); @@ -3110,20 +3198,19 @@ static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwa wxBrush * _result; wxColour * _arg0; int _arg1 = (int ) wxSOLID; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "colour","style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBrush",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBrush",_kwnames,&_obj0,&_arg1)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBrush. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (wxBrush *)new_wxBrush(_arg0,_arg1); @@ -3268,11 +3355,12 @@ static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args, PyObjec wxBrush * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBrush_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBrush_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3281,13 +3369,11 @@ static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args, PyObjec return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrush_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxBrush_SetColour(_arg0,*_arg1); @@ -4035,11 +4121,22 @@ static PyObject *_wrap_wxDC_DrawRotatedText(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4157,11 +4254,22 @@ static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args, PyObject *k } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4267,11 +4375,12 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * wxColour * _arg3; int _arg4 = (int ) wxFLOOD_SURFACE; PyObject * _argo0 = 0; - PyObject * _argo3 = 0; + wxColour temp; + PyObject * _obj3 = 0; char *_kwnames[] = { "self","x","y","colour","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO|i:wxDC_FloodFill",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO|i:wxDC_FloodFill",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4280,13 +4389,11 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * return NULL; } } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDC_FloodFill. Expected _wxColour_p."); +{ + _arg3 = &temp; + if (! wxColour_helper(_obj3, &_arg3)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); @@ -4896,11 +5003,22 @@ static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4968,11 +5086,22 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -5733,11 +5862,12 @@ static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args, Py wxDC * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextBackground",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextBackground",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5746,13 +5876,11 @@ static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args, Py return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextBackground. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxDC_SetTextBackground(_arg0,*_arg1); @@ -5769,11 +5897,12 @@ static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args, Py wxDC * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextForeground",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextForeground",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5782,13 +5911,11 @@ static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args, Py return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextForeground. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxDC_SetTextForeground(_arg0,*_arg1); @@ -5849,11 +5976,22 @@ static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args, PyObject *k } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6200,6 +6338,62 @@ static PyObject *_wrap_wxDC_SetAxisOrientation(PyObject *self, PyObject *args, P return _resultobj; } +#define wxDC_CalcBoundingBox(_swigobj,_swigarg0,_swigarg1) (_swigobj->CalcBoundingBox(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_CalcBoundingBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxDC_CalcBoundingBox",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_CalcBoundingBox. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_ResetBoundingBox(_swigobj) (_swigobj->ResetBoundingBox()) +static PyObject *_wrap_wxDC_ResetBoundingBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_ResetBoundingBox",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_ResetBoundingBox. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_ResetBoundingBox(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxMemoryDCTowxDC(void *ptr) { wxMemoryDC *src; wxDC *dest; @@ -6552,11 +6746,22 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC",_kwnames,&_obj0,&tempbool1,&_argo2)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } _arg1 = (bool ) tempbool1; if (_argo2) { @@ -6848,18 +7053,20 @@ static PyObject *_wrap_delete_wxImageList(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxImageList_Add(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +#define wxImageList_Add(_swigobj,_swigarg0,_swigarg1) (_swigobj->Add(_swigarg0,_swigarg1)) static PyObject *_wrap_wxImageList_Add(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; wxImageList * _arg0; wxBitmap * _arg1; + wxBitmap * _arg2 = (wxBitmap *) &wxNullBitmap; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","bitmap", NULL }; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","bitmap","mask", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageList_Add",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxImageList_Add",_kwnames,&_argo0,&_argo1,&_argo2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6875,9 +7082,96 @@ static PyObject *_wrap_wxImageList_Add(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_Add. Expected _wxBitmap_p."); + return NULL; + } + } { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxImageList_Add(_arg0,*_arg1); + _result = (int )wxImageList_Add(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxImageList_AddWithColourMask(_swigobj,_swigarg0,_swigarg1) (_swigobj->Add(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxImageList * _arg0; + wxBitmap * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","bitmap","maskColour", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxImageList_AddWithColourMask",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_AddWithColourMask. Expected _wxImageList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImageList_AddWithColourMask. Expected _wxBitmap_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxImageList_AddIcon(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxImageList_AddIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxImageList * _arg0; + wxIcon * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","icon", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageList_AddIcon",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_AddIcon. Expected _wxImageList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImageList_AddIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxImageList_AddIcon(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -7046,12 +7340,63 @@ static PyObject *_wrap_wxImageList_RemoveAll(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxImageList_GetSize(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxImageList_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImageList * _arg0; + int _arg1; + int * _arg2; + int temp; + int * _arg3; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","index", NULL }; + + self = self; +{ + _arg2 = &temp; +} +{ + _arg3 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxImageList_GetSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_GetSize. Expected _wxImageList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + static PyMethodDef gdicMethods[] = { + { "wxImageList_GetSize", (PyCFunction) _wrap_wxImageList_GetSize, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_RemoveAll", (PyCFunction) _wrap_wxImageList_RemoveAll, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Remove", (PyCFunction) _wrap_wxImageList_Remove, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_GetImageCount", (PyCFunction) _wrap_wxImageList_GetImageCount, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Draw", (PyCFunction) _wrap_wxImageList_Draw, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Replace", (PyCFunction) _wrap_wxImageList_Replace, METH_VARARGS | METH_KEYWORDS }, + { "wxImageList_AddIcon", (PyCFunction) _wrap_wxImageList_AddIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxImageList_AddWithColourMask", (PyCFunction) _wrap_wxImageList_AddWithColourMask, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Add", (PyCFunction) _wrap_wxImageList_Add, METH_VARARGS | METH_KEYWORDS }, { "delete_wxImageList", (PyCFunction) _wrap_delete_wxImageList, METH_VARARGS | METH_KEYWORDS }, { "new_wxImageList", (PyCFunction) _wrap_new_wxImageList, METH_VARARGS | METH_KEYWORDS }, @@ -7070,6 +7415,8 @@ static PyMethodDef gdicMethods[] = { { "new_wxScreenDC", (PyCFunction) _wrap_new_wxScreenDC, METH_VARARGS | METH_KEYWORDS }, { "wxMemoryDC_SelectObject", (PyCFunction) _wrap_wxMemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS }, { "new_wxMemoryDC", (PyCFunction) _wrap_new_wxMemoryDC, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_ResetBoundingBox", (PyCFunction) _wrap_wxDC_ResetBoundingBox, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_CalcBoundingBox", (PyCFunction) _wrap_wxDC_CalcBoundingBox, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetAxisOrientation", (PyCFunction) _wrap_wxDC_SetAxisOrientation, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetDeviceOrigin", (PyCFunction) _wrap_wxDC_GetDeviceOrigin, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetLogicalOrigin", (PyCFunction) _wrap_wxDC_SetLogicalOrigin, METH_VARARGS | METH_KEYWORDS }, @@ -7215,6 +7562,7 @@ static PyMethodDef gdicMethods[] = { { "delete_wxIcon", (PyCFunction) _wrap_delete_wxIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxIcon", (PyCFunction) _wrap_new_wxIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxMask", (PyCFunction) _wrap_new_wxMask, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmap_GetSubBitmap", (PyCFunction) _wrap_wxBitmap_GetSubBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxBitmap_SetDepth", (PyCFunction) _wrap_wxBitmap_SetDepth, METH_VARARGS | METH_KEYWORDS }, { "wxBitmap_SetHeight", (PyCFunction) _wrap_wxBitmap_SetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxBitmap_SetWidth", (PyCFunction) _wrap_wxBitmap_SetWidth, METH_VARARGS | METH_KEYWORDS }, @@ -7245,7 +7593,6 @@ static PyMethodDef gdicMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_signed_long","_long",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, @@ -7255,16 +7602,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, + { "_wxPrintQuality","_time_t",0}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_wxDC","_class_wxPostScriptDC",SwigwxPostScriptDCTowxDC}, { "_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC}, { "_wxDC","_class_wxWindowDC",SwigwxWindowDCTowxDC}, @@ -7277,39 +7618,28 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC}, { "_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC}, - { "_wxDC","_class_wxDC",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxColour","_class_wxColour",0}, - { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_wxFont","_class_wxFont",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_class_wxPostScriptDC",SwigwxPostScriptDCTowxDC}, { "_class_wxDC","_wxPostScriptDC",SwigwxPostScriptDCTowxDC}, { "_class_wxDC","_class_wxWindowDC",SwigwxWindowDCTowxDC}, @@ -7322,50 +7652,32 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDC","_wxScreenDC",SwigwxScreenDCTowxDC}, { "_class_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_class_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC}, - { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -7374,20 +7686,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -7395,14 +7707,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_class_wxPalette","_wxPalette",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py similarity index 96% rename from utils/wxPython/src/gtk/gdi.py rename to wxPython/src/gtk/gdi.py index a0e405a8e2..cd1d2386c7 100644 --- a/utils/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -47,8 +47,20 @@ class wxBitmapPtr : def SetDepth(self, *_args, **_kwargs): val = apply(gdic.wxBitmap_SetDepth,(self,) + _args, _kwargs) return val + def GetSubBitmap(self, *_args, **_kwargs): + val = apply(gdic.wxBitmap_GetSubBitmap,(self,) + _args, _kwargs) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 + return val def __repr__(self): return "" % (self.this,) + + def __del__(self,gdic=gdic): + try: + if self.thisown == 1 : + gdic.delete_wxBitmap(self) + except: + pass + class wxBitmap(wxBitmapPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gdic.new_wxBitmap,_args,_kwargs) @@ -104,6 +116,14 @@ class wxIconPtr : return val def __repr__(self): return "" % (self.this,) + + def __del__(self,gdic=gdic): + try: + if self.thisown == 1 : + gdic.delete_wxIcon(self) + except: + pass + class wxIcon(wxIconPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gdic.new_wxIcon,_args,_kwargs) @@ -591,6 +611,12 @@ class wxDCPtr : def SetAxisOrientation(self, *_args, **_kwargs): val = apply(gdic.wxDC_SetAxisOrientation,(self,) + _args, _kwargs) return val + def CalcBoundingBox(self, *_args, **_kwargs): + val = apply(gdic.wxDC_CalcBoundingBox,(self,) + _args, _kwargs) + return val + def ResetBoundingBox(self, *_args, **_kwargs): + val = apply(gdic.wxDC_ResetBoundingBox,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxDC(wxDCPtr): @@ -732,6 +758,12 @@ class wxImageListPtr : def Add(self, *_args, **_kwargs): val = apply(gdic.wxImageList_Add,(self,) + _args, _kwargs) return val + def AddWithColourMask(self, *_args, **_kwargs): + val = apply(gdic.wxImageList_AddWithColourMask,(self,) + _args, _kwargs) + return val + def AddIcon(self, *_args, **_kwargs): + val = apply(gdic.wxImageList_AddIcon,(self,) + _args, _kwargs) + return val def Replace(self, *_args, **_kwargs): val = apply(gdic.wxImageList_Replace,(self,) + _args, _kwargs) return val @@ -747,6 +779,9 @@ class wxImageListPtr : def RemoveAll(self, *_args, **_kwargs): val = apply(gdic.wxImageList_RemoveAll,(self,) + _args, _kwargs) return val + def GetSize(self, *_args, **_kwargs): + val = apply(gdic.wxImageList_GetSize,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxImageList(wxImageListPtr): diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp new file mode 100644 index 0000000000..f422558420 --- /dev/null +++ b/wxPython/src/gtk/grid.cpp @@ -0,0 +1,13353 @@ +/* + * FILE : src/gtk/grid.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initgridc + +#define SWIG_name "gridc" + +#include "export.h" +#include + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +#define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ + wxGridCellAttr* CBNAME(int a, int b) { \ + wxGridCellAttr* rval = NULL; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + wxGridCellAttr* ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", a, b)); \ + if (ro) { \ + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ + rval = ptr; \ + Py_DECREF(ro); \ + } \ + } \ + else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxGridCellAttr *base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(attr, a, b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int a, int b) { \ + PCLASS::CBNAME(attr, a, b); \ + } + + + +#define PYCALLBACK__GCAINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int val) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(attr, val); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int val) { \ + PCLASS::CBNAME(attr, val); \ + } + + + +#define PYCALLBACK_INT__pure(CBNAME) \ + int CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + int rval = 0; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_BOOL_INTINT_pure(CBNAME) \ + bool CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + bool rval = 0; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ + void CBNAME(int a, int b, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str())); \ + wxPySaveThread(doSave); \ + } + + +#define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ + bool CBNAME(int a, int b, const wxString& c) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)", a,b,c.c_str())); \ + else \ + rval = PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b, const wxString& c) { \ + return PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK_LONG_INTINT(PCLASS, CBNAME) \ + long CBNAME(int a, int b) { \ + long rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + long base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \ + bool CBNAME(int a, int b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_DOUBLE_INTINT(PCLASS, CBNAME) \ + double CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + double rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyFloat_AsDouble(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + double base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__(PCLASS, CBNAME) \ + void CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + else \ + PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME() { \ + PCLASS::CBNAME(); \ + } + + + + +#define PYCALLBACK_BOOL_SIZETSIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a, size_t b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a, size_t b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_SIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \ + else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ + wxString CBNAME(int a) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)",a)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ + void CBNAME(int a, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(is)", a,c.c_str())); \ + else \ + PCLASS::CBNAME(a,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, const wxString& c) { \ + PCLASS::CBNAME(a,c); \ + } + + + + +#define PYCALLBACK_BOOL_(PCLASS, CBNAME) \ + bool CBNAME() { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + else \ + rval = PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME() { \ + return PCLASS::CBNAME(); \ + } + + + +#define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \ + void CBNAME(size_t a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(size_t a, int b) { \ + PCLASS::CBNAME(a,b); \ + } + + + + +#define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \ + void CBNAME(int a, int b, long c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, long c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \ + void CBNAME(int a, int b, double c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, double c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + +#define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \ + void CBNAME(int a, int b, bool c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, bool c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + + +class wxPyGridCellRenderer : public wxGridCellRenderer +{ +public: + wxPyGridCellRenderer() : wxGridCellRenderer() {}; + + // Implement Python callback aware virtual methods + void Draw(wxGrid& grid, wxGridCellAttr& attr, + wxDC& dc, const wxRect& rect, + int row, int col, bool isSelected) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Draw")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OOOOiii)", + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + wxPyConstructObject((void*)&rect, "wxRect", 0), + row, col, isSelected)); + } + wxPySaveThread(doSave); + } + + wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, + int row, int col) { + wxSize rval; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) { + PyObject* ro; + wxSize* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, + Py_BuildValue("(OOOii)", + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + row, col)); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) + rval = *ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + wxGridCellRenderer *Clone() const { + wxGridCellRenderer* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Clone")) { + PyObject* ro; + wxGridCellRenderer* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellRenderer_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + +IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters); + + +class wxPyGridCellEditor : public wxGridCellEditor +{ +public: + wxPyGridCellEditor() : wxGridCellEditor() {} + + void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Create")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OiO)", + wxPyConstructObject((void*)parent, "wxWindow", 0), + id, + wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0))); + } + wxPySaveThread(doSave); + } + + + void BeginEdit(int row, int col, wxGrid* grid) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid", 0))); + } + wxPySaveThread(doSave); + } + + + bool EndEdit(int row, int col, wxGrid* grid) { + bool rv = FALSE; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "EndEdit")) { + rv = wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid", 0))); + } + wxPySaveThread(doSave); + return rv; + } + + + wxGridCellEditor*Clone() const { + wxGridCellEditor* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Clone")) { + PyObject* ro; + wxGridCellEditor* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellEditor_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + void Show(bool show, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Show")) + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iO)", show, + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); + else + wxGridCellEditor::Show(show, attr); + wxPySaveThread(doSave); + } + void base_Show(bool show, wxGridCellAttr *attr) { + wxGridCellEditor::Show(show, attr); + } + + + void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "PaintBackground")) + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OO)", + wxPyConstructObject((void*)&rectCell, "wxRect", 0), + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); + else + wxGridCellEditor::PaintBackground(rectCell, attr); + wxPySaveThread(doSave); + } + void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + wxGridCellEditor::PaintBackground(rectCell, attr); + } + + + DEC_PYCALLBACK___pure(Reset); + DEC_PYCALLBACK__constany(SetSize, wxRect); + DEC_PYCALLBACK_bool_any(IsAcceptedKey, wxKeyEvent); + DEC_PYCALLBACK__any(StartingKey, wxKeyEvent); + DEC_PYCALLBACK__any(HandleReturn, wxKeyEvent); + DEC_PYCALLBACK__(StartingClick); + DEC_PYCALLBACK__(Destroy); + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + + +IMP_PYCALLBACK__STRING( wxPyGridCellEditor, wxGridCellEditor, SetParameters); +IMP_PYCALLBACK___pure(wxPyGridCellEditor, wxGridCellEditor, Reset); +IMP_PYCALLBACK__constany(wxPyGridCellEditor, wxGridCellEditor, SetSize, wxRect); +IMP_PYCALLBACK_bool_any(wxPyGridCellEditor, wxGridCellEditor, IsAcceptedKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, StartingKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, HandleReturn, wxKeyEvent); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, StartingClick); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, Destroy); + + +class wxPyGridCellAttrProvider : public wxGridCellAttrProvider +{ +public: + wxPyGridCellAttrProvider() : wxGridCellAttrProvider() {}; + + PYCALLBACK_GCA_INTINT(wxGridCellAttrProvider, GetAttr); + PYCALLBACK__GCAINTINT(wxGridCellAttrProvider, SetAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetRowAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetColAttr); + + PYPRIVATE; +}; + +class wxPyGridTableBase : public wxGridTableBase +{ +public: + wxPyGridTableBase() : wxGridTableBase() {} + + PYCALLBACK_INT__pure(GetNumberRows); + PYCALLBACK_INT__pure(GetNumberCols); + PYCALLBACK_BOOL_INTINT_pure(IsEmptyCell); + PYCALLBACK_STRING_INTINT(wxGridTableBase, GetTypeName); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanGetValueAs); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanSetValueAs); + PYCALLBACK__(wxGridTableBase, Clear); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertCols); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteCols); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendRows); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendCols); + PYCALLBACK_STRING_INT(wxGridTableBase, GetRowLabelValue); + PYCALLBACK_STRING_INT(wxGridTableBase, GetColLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetRowLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetColLabelValue); + PYCALLBACK_BOOL_(wxGridTableBase, CanHaveAttributes); + PYCALLBACK_GCA_INTINT(wxGridTableBase, GetAttr); + PYCALLBACK__GCAINTINT(wxGridTableBase, SetAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetRowAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetColAttr); + + + wxString GetValue(int row, int col) { + bool doSave = wxPyRestoreThread(); + wxString rval; + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); + if (ro) { + PyObject* str = PyObject_Str(ro); + rval = PyString_AsString(str); + Py_DECREF(ro); + Py_DECREF(str); + } + } + wxPySaveThread(doSave); + return rval; + } + + void SetValue(int row, int col, const wxString& val) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); + wxPySaveThread(doSave); + } + + + // Map the Get/Set methods for the standard non-string types to + // the GetValue and SetValue python methods. + long GetValueAsLong( int row, int col ) { + long rval = 0; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + PyObject* num; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Int(ro); + if (num) { + rval = PyInt_AsLong(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + double GetValueAsDouble( int row, int col ) { + double rval = 0.0; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + PyObject* num; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Float(ro); + if (num) { + rval = PyFloat_AsDouble(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + bool GetValueAsBool( int row, int col ) { + return (bool)GetValueAsLong(row, col); + } + + void SetValueAsLong( int row, int col, long value ) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsDouble( int row, int col, double value ) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iid)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsBool( int row, int col, bool value ) { + SetValueAsLong( row, col, (long)value ); + } + + + PYPRIVATE; +}; + +bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) { + + // If source is an object instance then it may already be the right type + if (PyInstance_Check(source)) { + wxGridCellCoords* ptr; + if (SWIG_GetPtrObj(source, (void **)&ptr, "_wxGridCellCoords_p")) + goto error; + *obj = ptr; + return TRUE; + } + // otherwise a 2-tuple of integers is expected + else if (PySequence_Check(source) && PyObject_Length(source) == 2) { + PyObject* o1 = PySequence_GetItem(source, 0); + PyObject* o2 = PySequence_GetItem(source, 1); + **obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2)); + return TRUE; + } + + error: + PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object."); + return FALSE; +} + +typedef wxGrid::wxGridSelectionModes WXGRIDSELECTIONMODES; +#ifdef __cplusplus +extern "C" { +#endif +static int _wrap_wxGridNoCellCoords_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGridNoCellCoords is read-only."); + return 1; +} + +static PyObject *_wrap_wxGridNoCellCoords_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxGridNoCellCoords,"_wxGridCellCoords_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxGridNoCellRect_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGridNoCellRect is read-only."); + return 1; +} + +static PyObject *_wrap_wxGridNoCellRect_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxGridNoCellRect,"_wxRect_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +#define wxGridCellRenderer_SetParameters(_swigobj,_swigarg0) (_swigobj->SetParameters(_swigarg0)) +static PyObject *_wrap_wxGridCellRenderer_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellRenderer_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_SetParameters. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGridCellRenderer_IncRef(_swigobj) (_swigobj->IncRef()) +static PyObject *_wrap_wxGridCellRenderer_IncRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_IncRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_IncRef. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_IncRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellRenderer_DecRef(_swigobj) (_swigobj->DecRef()) +static PyObject *_wrap_wxGridCellRenderer_DecRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_DecRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_DecRef. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_DecRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellRenderer_Draw(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Draw(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxGridCellRenderer_Draw(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + wxGrid * _arg1; + wxGridCellAttr * _arg2; + wxDC * _arg3; + wxRect * _arg4; + int _arg5; + int _arg6; + bool _arg7; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + wxRect temp; + PyObject * _obj4 = 0; + int tempbool7; + char *_kwnames[] = { "self","grid","attr","dc","rect","row","col","isSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOOiii:wxGridCellRenderer_Draw",_kwnames,&_argo0,&_argo1,&_argo2,&_argo3,&_obj4,&_arg5,&_arg6,&tempbool7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_Draw. Expected _wxGridCellRenderer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellRenderer_Draw. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellRenderer_Draw. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellRenderer_Draw. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg4 = &temp; + if (! wxRect_helper(_obj4, &_arg4)) + return NULL; +} + _arg7 = (bool ) tempbool7; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_Draw(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellRenderer_GetBestSize(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->GetBestSize(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxGridCellRenderer_GetBestSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxGridCellRenderer * _arg0; + wxGrid * _arg1; + wxGridCellAttr * _arg2; + wxDC * _arg3; + int _arg4; + int _arg5; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","grid","attr","dc","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOii:wxGridCellRenderer_GetBestSize",_kwnames,&_argo0,&_argo1,&_argo2,&_argo3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_GetBestSize. Expected _wxGridCellRenderer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellRenderer_GetBestSize. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellRenderer_GetBestSize. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellRenderer_GetBestSize. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGridCellRenderer_GetBestSize(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridCellRenderer_Clone(_swigobj) (_swigobj->Clone()) +static PyObject *_wrap_wxGridCellRenderer_Clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGridCellRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_Clone",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_Clone. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGridCellRenderer_Clone(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxPyGridCellRendererTowxGridCellRenderer(void *ptr) { + wxPyGridCellRenderer *src; + wxGridCellRenderer *dest; + src = (wxPyGridCellRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxPyGridCellRenderer() (new wxPyGridCellRenderer()) +static PyObject *_wrap_new_wxPyGridCellRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridCellRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridCellRenderer *)new_wxPyGridCellRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellRenderer__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellRenderer__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellRenderer * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellRenderer__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellRenderer__setSelf. Expected _wxPyGridCellRenderer_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellRenderer__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellRenderer_base_SetParameters(_swigobj,_swigarg0) (_swigobj->base_SetParameters(_swigarg0)) +static PyObject *_wrap_wxPyGridCellRenderer_base_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellRenderer * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellRenderer_base_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellRenderer_base_SetParameters. Expected _wxPyGridCellRenderer_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellRenderer_base_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static void *SwigwxGridCellStringRendererTowxGridCellRenderer(void *ptr) { + wxGridCellStringRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellStringRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellStringRenderer() (new wxGridCellStringRenderer()) +static PyObject *_wrap_new_wxGridCellStringRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellStringRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellStringRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellStringRenderer *)new_wxGridCellStringRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellStringRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellNumberRendererTowxGridCellStringRenderer(void *ptr) { + wxGridCellNumberRenderer *src; + wxGridCellStringRenderer *dest; + src = (wxGridCellNumberRenderer *) ptr; + dest = (wxGridCellStringRenderer *) src; + return (void *) dest; +} + +static void *SwigwxGridCellNumberRendererTowxGridCellRenderer(void *ptr) { + wxGridCellNumberRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellNumberRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellNumberRenderer() (new wxGridCellNumberRenderer()) +static PyObject *_wrap_new_wxGridCellNumberRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellNumberRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellNumberRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellNumberRenderer *)new_wxGridCellNumberRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellNumberRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellFloatRendererTowxGridCellStringRenderer(void *ptr) { + wxGridCellFloatRenderer *src; + wxGridCellStringRenderer *dest; + src = (wxGridCellFloatRenderer *) ptr; + dest = (wxGridCellStringRenderer *) src; + return (void *) dest; +} + +static void *SwigwxGridCellFloatRendererTowxGridCellRenderer(void *ptr) { + wxGridCellFloatRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellFloatRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellFloatRenderer(_swigarg0,_swigarg1) (new wxGridCellFloatRenderer(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridCellFloatRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatRenderer * _result; + int _arg0 = (int ) -1; + int _arg1 = (int ) -1; + char *_kwnames[] = { "width","precision", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridCellFloatRenderer",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellFloatRenderer *)new_wxGridCellFloatRenderer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellFloatRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellFloatRenderer_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxGridCellFloatRenderer_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellFloatRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellFloatRenderer_GetWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_GetWidth. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellFloatRenderer_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellFloatRenderer_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) +static PyObject *_wrap_wxGridCellFloatRenderer_SetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatRenderer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellFloatRenderer_SetWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_SetWidth. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellFloatRenderer_SetWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellFloatRenderer_GetPrecision(_swigobj) (_swigobj->GetPrecision()) +static PyObject *_wrap_wxGridCellFloatRenderer_GetPrecision(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellFloatRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellFloatRenderer_GetPrecision",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_GetPrecision. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellFloatRenderer_GetPrecision(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellFloatRenderer_SetPrecision(_swigobj,_swigarg0) (_swigobj->SetPrecision(_swigarg0)) +static PyObject *_wrap_wxGridCellFloatRenderer_SetPrecision(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatRenderer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","precision", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellFloatRenderer_SetPrecision",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_SetPrecision. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellFloatRenderer_SetPrecision(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxGridCellBoolRendererTowxGridCellRenderer(void *ptr) { + wxGridCellBoolRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellBoolRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellBoolRenderer() (new wxGridCellBoolRenderer()) +static PyObject *_wrap_new_wxGridCellBoolRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellBoolRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellBoolRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellBoolRenderer *)new_wxGridCellBoolRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellBoolRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellEditor_IsCreated(_swigobj) (_swigobj->IsCreated()) +static PyObject *_wrap_wxGridCellEditor_IsCreated(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_IsCreated",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_IsCreated. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellEditor_IsCreated(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellEditor_GetControl(_swigobj) (_swigobj->GetControl()) +static PyObject *_wrap_wxGridCellEditor_GetControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxControl * _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_GetControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_GetControl. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxControl *)wxGridCellEditor_GetControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellEditor_SetControl(_swigobj,_swigarg0) (_swigobj->SetControl(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_SetControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxControl * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","control", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetControl",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_SetControl. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxControl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_SetControl. Expected _wxControl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_SetControl(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_SetParameters(_swigobj,_swigarg0) (_swigobj->SetParameters(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_SetParameters. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGridCellEditor_IncRef(_swigobj) (_swigobj->IncRef()) +static PyObject *_wrap_wxGridCellEditor_IncRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_IncRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_IncRef. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_IncRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_DecRef(_swigobj) (_swigobj->DecRef()) +static PyObject *_wrap_wxGridCellEditor_DecRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_DecRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_DecRef. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_DecRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellEditor_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxEvtHandler * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","parent","id","evtHandler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO:wxGridCellEditor_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Create. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellEditor_Create. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Create(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_BeginEdit(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->BeginEdit(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellEditor_BeginEdit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + int _arg1; + int _arg2; + wxGrid * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","grid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridCellEditor_BeginEdit",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_BeginEdit. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellEditor_BeginEdit. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_BeginEdit(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_EndEdit(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->EndEdit(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellEditor_EndEdit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellEditor * _arg0; + int _arg1; + int _arg2; + wxGrid * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","grid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridCellEditor_EndEdit",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_EndEdit. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellEditor_EndEdit. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellEditor_EndEdit(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellEditor_Reset(_swigobj) (_swigobj->Reset()) +static PyObject *_wrap_wxGridCellEditor_Reset(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Reset",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Reset. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Reset(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Clone(_swigobj) (_swigobj->Clone()) +static PyObject *_wrap_wxGridCellEditor_Clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Clone",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Clone. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGridCellEditor_Clone(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellEditor_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_SetSize. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_SetSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Show(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellEditor_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + bool _arg1; + wxGridCellAttr * _arg2 = (wxGridCellAttr *) NULL; + PyObject * _argo0 = 0; + int tempbool1; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","show","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxGridCellEditor_Show",_kwnames,&_argo0,&tempbool1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Show. Expected _wxGridCellEditor_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellEditor_Show. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Show(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_PaintBackground(_swigobj,_swigarg0,_swigarg1) (_swigobj->PaintBackground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellEditor_PaintBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxRect * _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","rectCell","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGridCellEditor_PaintBackground",_kwnames,&_argo0,&_obj1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_PaintBackground. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellEditor_PaintBackground. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_PaintBackground(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_IsAcceptedKey(_swigobj,_swigarg0) (_swigobj->IsAcceptedKey(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_IsAcceptedKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_IsAcceptedKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_IsAcceptedKey. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_IsAcceptedKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellEditor_IsAcceptedKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellEditor_StartingKey(_swigobj,_swigarg0) (_swigobj->StartingKey(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_StartingKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_StartingKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_StartingKey. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_StartingKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_StartingKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_StartingClick(_swigobj) (_swigobj->StartingClick()) +static PyObject *_wrap_wxGridCellEditor_StartingClick(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_StartingClick",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_StartingClick. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_StartingClick(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_HandleReturn(_swigobj,_swigarg0) (_swigobj->HandleReturn(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_HandleReturn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_HandleReturn",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_HandleReturn. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_HandleReturn. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_HandleReturn(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Destroy(_swigobj) (_swigobj->Destroy()) +static PyObject *_wrap_wxGridCellEditor_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Destroy. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyGridCellEditorTowxGridCellEditor(void *ptr) { + wxPyGridCellEditor *src; + wxGridCellEditor *dest; + src = (wxPyGridCellEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxPyGridCellEditor() (new wxPyGridCellEditor()) +static PyObject *_wrap_new_wxPyGridCellEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridCellEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridCellEditor *)new_wxPyGridCellEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellEditor__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellEditor__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellEditor__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor__setSelf. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_SetSize(_swigobj,_swigarg0) (_swigobj->base_SetSize(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_SetSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_SetSize. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_SetSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_Show(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_Show(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellEditor_base_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + bool _arg1; + wxGridCellAttr * _arg2 = (wxGridCellAttr *) NULL; + PyObject * _argo0 = 0; + int tempbool1; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","show","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxPyGridCellEditor_base_Show",_kwnames,&_argo0,&tempbool1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_Show. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyGridCellEditor_base_Show. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_Show(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_PaintBackground(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_PaintBackground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellEditor_base_PaintBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxRect * _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","rectCell","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellEditor_base_PaintBackground",_kwnames,&_argo0,&_obj1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_PaintBackground. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyGridCellEditor_base_PaintBackground. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_PaintBackground(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_IsAcceptedKey(_swigobj,_swigarg0) (_swigobj->base_IsAcceptedKey(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_IsAcceptedKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_IsAcceptedKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_IsAcceptedKey. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_IsAcceptedKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_StartingKey(_swigobj,_swigarg0) (_swigobj->base_StartingKey(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_StartingKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_StartingKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_StartingKey. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_StartingKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_StartingKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_StartingClick(_swigobj) (_swigobj->base_StartingClick()) +static PyObject *_wrap_wxPyGridCellEditor_base_StartingClick(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridCellEditor_base_StartingClick",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_StartingClick. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_StartingClick(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_HandleReturn(_swigobj,_swigarg0) (_swigobj->base_HandleReturn(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_HandleReturn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_HandleReturn",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_HandleReturn. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_HandleReturn. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_HandleReturn(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_Destroy(_swigobj) (_swigobj->base_Destroy()) +static PyObject *_wrap_wxPyGridCellEditor_base_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridCellEditor_base_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_Destroy. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_SetParameters(_swigobj,_swigarg0) (_swigobj->base_SetParameters(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_SetParameters. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static void *SwigwxGridCellTextEditorTowxGridCellEditor(void *ptr) { + wxGridCellTextEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellTextEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellTextEditor() (new wxGridCellTextEditor()) +static PyObject *_wrap_new_wxGridCellTextEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellTextEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellTextEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellTextEditor *)new_wxGridCellTextEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellTextEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellNumberEditorTowxGridCellTextEditor(void *ptr) { + wxGridCellNumberEditor *src; + wxGridCellTextEditor *dest; + src = (wxGridCellNumberEditor *) ptr; + dest = (wxGridCellTextEditor *) src; + return (void *) dest; +} + +static void *SwigwxGridCellNumberEditorTowxGridCellEditor(void *ptr) { + wxGridCellNumberEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellNumberEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellNumberEditor(_swigarg0,_swigarg1) (new wxGridCellNumberEditor(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridCellNumberEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellNumberEditor * _result; + int _arg0 = (int ) -1; + int _arg1 = (int ) -1; + char *_kwnames[] = { "min","max", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridCellNumberEditor",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellNumberEditor *)new_wxGridCellNumberEditor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellNumberEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellFloatEditorTowxGridCellTextEditor(void *ptr) { + wxGridCellFloatEditor *src; + wxGridCellTextEditor *dest; + src = (wxGridCellFloatEditor *) ptr; + dest = (wxGridCellTextEditor *) src; + return (void *) dest; +} + +static void *SwigwxGridCellFloatEditorTowxGridCellEditor(void *ptr) { + wxGridCellFloatEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellFloatEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellFloatEditor() (new wxGridCellFloatEditor()) +static PyObject *_wrap_new_wxGridCellFloatEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellFloatEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellFloatEditor *)new_wxGridCellFloatEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellFloatEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellBoolEditorTowxGridCellEditor(void *ptr) { + wxGridCellBoolEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellBoolEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellBoolEditor() (new wxGridCellBoolEditor()) +static PyObject *_wrap_new_wxGridCellBoolEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellBoolEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellBoolEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellBoolEditor *)new_wxGridCellBoolEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellBoolEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellChoiceEditorTowxGridCellEditor(void *ptr) { + wxGridCellChoiceEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellChoiceEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellChoiceEditor(_swigarg0,_swigarg1,_swigarg2) (new wxGridCellChoiceEditor(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxGridCellChoiceEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellChoiceEditor * _result; + int _arg0 = (int ) 0; + wxString * _arg1 = (wxString *) NULL; + bool _arg2 = (bool ) FALSE; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "choices","allowOthers", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxGridCellChoiceEditor",_kwnames,&_obj1,&tempbool2)) + return NULL; + if (_obj1) +{ + _arg1 = wxString_LIST_helper(_obj1); + if (_arg1 == NULL) { + return NULL; + } +} + _arg2 = (bool ) tempbool2; +{ + if (_obj1) { + _arg0 = PyList_Size(_obj1); + } + else { + _arg0 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellChoiceEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + delete [] _arg1; +} + return _resultobj; +} + +#define new_wxGridCellAttr() (new wxGridCellAttr()) +static PyObject *_wrap_new_wxGridCellAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellAttr",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)new_wxGridCellAttr(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_Clone(_swigobj) (_swigobj->Clone()) +static PyObject *_wrap_wxGridCellAttr_Clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_Clone",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_Clone. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxGridCellAttr_Clone(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_IncRef(_swigobj) (_swigobj->IncRef()) +static PyObject *_wrap_wxGridCellAttr_IncRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_IncRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_IncRef. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_IncRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_DecRef(_swigobj) (_swigobj->DecRef()) +static PyObject *_wrap_wxGridCellAttr_DecRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_DecRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_DecRef. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_DecRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetTextColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetBackgroundColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetFont. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttr_SetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hAlign","vAlign", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttr_SetAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetAlignment. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetReadOnly(_swigobj,_swigarg0) (_swigobj->SetReadOnly(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","isReadOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGridCellAttr_SetReadOnly",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetReadOnly. Expected _wxGridCellAttr_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetReadOnly(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetRenderer(_swigobj,_swigarg0) (_swigobj->SetRenderer(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellRenderer * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","renderer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetRenderer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetRenderer. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetRenderer. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetRenderer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetEditor(_swigobj,_swigarg0) (_swigobj->SetEditor(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellEditor * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetEditor",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetEditor. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetEditor. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetEditor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) +static PyObject *_wrap_wxGridCellAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasTextColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasTextColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasBackgroundColour(_swigobj) (_swigobj->HasBackgroundColour()) +static PyObject *_wrap_wxGridCellAttr_HasBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasBackgroundColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasBackgroundColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasFont(_swigobj) (_swigobj->HasFont()) +static PyObject *_wrap_wxGridCellAttr_HasFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasFont. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasAlignment(_swigobj) (_swigobj->HasAlignment()) +static PyObject *_wrap_wxGridCellAttr_HasAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasAlignment. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasAlignment(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasRenderer(_swigobj) (_swigobj->HasRenderer()) +static PyObject *_wrap_wxGridCellAttr_HasRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasRenderer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasRenderer. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasRenderer(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasEditor(_swigobj) (_swigobj->HasEditor()) +static PyObject *_wrap_wxGridCellAttr_HasEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasEditor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasEditor. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasEditor(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetTextColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxGridCellAttr_GetTextColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxGridCellAttr_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetBackgroundColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxGridCellAttr_GetBackgroundColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxGridCellAttr_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetFont. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxFont & _result_ref = wxGridCellAttr_GetFont(_arg0); + _result = (wxFont *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttr_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetAlignment. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_GetAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGridCellAttr_GetRenderer(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetRenderer(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellAttr_GetRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGridCellAttr * _arg0; + wxGrid * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","grid","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttr_GetRenderer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetRenderer. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_GetRenderer. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGridCellAttr_GetRenderer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetEditor(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetEditor(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellAttr_GetEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGridCellAttr * _arg0; + wxGrid * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","grid","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttr_GetEditor",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetEditor. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_GetEditor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGridCellAttr_GetEditor(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_IsReadOnly(_swigobj) (_swigobj->IsReadOnly()) +static PyObject *_wrap_wxGridCellAttr_IsReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_IsReadOnly",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_IsReadOnly. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_IsReadOnly(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_SetDefAttr(_swigobj,_swigarg0) (_swigobj->SetDefAttr(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetDefAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellAttr * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","defAttr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetDefAttr",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetDefAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetDefAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetDefAttr(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxGridCellAttrProvider() (new wxGridCellAttrProvider()) +static PyObject *_wrap_new_wxGridCellAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellAttrProvider",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttrProvider *)new_wxGridCellAttrProvider(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttrProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttrProvider_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxGridCellAttrProvider * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttrProvider_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_GetAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttrProvider_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellAttrProvider_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttrProvider_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_SetAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttrProvider_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridCellAttrProvider_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_SetRowAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttrProvider_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridCellAttrProvider_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_SetColAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttrProvider_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_UpdateAttrRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->UpdateAttrRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + size_t _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttrProvider_UpdateAttrRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_UpdateAttrRows. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_UpdateAttrRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_UpdateAttrCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->UpdateAttrCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + size_t _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttrProvider_UpdateAttrCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_UpdateAttrCols. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_UpdateAttrCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider(void *ptr) { + wxPyGridCellAttrProvider *src; + wxGridCellAttrProvider *dest; + src = (wxPyGridCellAttrProvider *) ptr; + dest = (wxGridCellAttrProvider *) src; + return (void *) dest; +} + +#define new_wxPyGridCellAttrProvider() (new wxPyGridCellAttrProvider()) +static PyObject *_wrap_new_wxPyGridCellAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridCellAttrProvider",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridCellAttrProvider *)new_wxPyGridCellAttrProvider(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridCellAttrProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellAttrProvider__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellAttrProvider__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider__setSelf. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxPyGridCellAttrProvider * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridCellAttrProvider_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_GetAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxPyGridCellAttrProvider_base_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_SetAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellAttrProvider_base_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridCellAttrProvider_base_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_SetRowAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellAttrProvider_base_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider_base_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridCellAttrProvider_base_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_SetColAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellAttrProvider_base_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider_base_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetAttrProvider(_swigobj,_swigarg0) (_swigobj->SetAttrProvider(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_SetAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttrProvider * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attrProvider", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridTableBase_SetAttrProvider",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetAttrProvider. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetAttrProvider. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetAttrProvider(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_GetAttrProvider(_swigobj) (_swigobj->GetAttrProvider()) +static PyObject *_wrap_wxGridTableBase_GetAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetAttrProvider",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetAttrProvider. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttrProvider *)wxGridTableBase_GetAttrProvider(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttrProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableBase_SetView(_swigobj,_swigarg0) (_swigobj->SetView(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_SetView(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGrid * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","grid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridTableBase_SetView",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetView. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetView. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetView(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_GetView(_swigobj) (_swigobj->GetView()) +static PyObject *_wrap_wxGridTableBase_GetView(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetView",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetView. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGrid *)wxGridTableBase_GetView(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableBase_GetNumberRows(_swigobj) (_swigobj->GetNumberRows()) +static PyObject *_wrap_wxGridTableBase_GetNumberRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetNumberRows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetNumberRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableBase_GetNumberRows(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetNumberCols(_swigobj) (_swigobj->GetNumberCols()) +static PyObject *_wrap_wxGridTableBase_GetNumberCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetNumberCols",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetNumberCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableBase_GetNumberCols(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_IsEmptyCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEmptyCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_IsEmptyCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_IsEmptyCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_IsEmptyCell. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_IsEmptyCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValue",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetValue(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_SetValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValue(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridTableBase_SetValue",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValue(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGridTableBase_GetTypeName(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetTypeName(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetTypeName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetTypeName",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetTypeName. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetTypeName(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_CanGetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CanGetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_CanGetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridTableBase_CanGetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_CanGetValueAs. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGridTableBase_CanSetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CanSetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_CanSetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridTableBase_CanSetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_CanSetValueAs. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGridTableBase_GetValueAsLong(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValueAsLong(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValueAsLong(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValueAsLong",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValueAsLong. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGridTableBase_GetValueAsLong(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxGridTableBase_GetValueAsDouble(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValueAsDouble(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValueAsDouble(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValueAsDouble",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValueAsDouble. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxGridTableBase_GetValueAsDouble(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxGridTableBase_GetValueAsBool(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValueAsBool(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValueAsBool(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValueAsBool",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValueAsBool. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_GetValueAsBool(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_SetValueAsLong(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValueAsLong(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValueAsLong(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + long _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiil:wxGridTableBase_SetValueAsLong",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValueAsLong. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValueAsLong(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetValueAsDouble(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValueAsDouble(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValueAsDouble(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + double _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiid:wxGridTableBase_SetValueAsDouble",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValueAsDouble. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValueAsDouble(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetValueAsBool(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValueAsBool(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValueAsBool(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + bool _arg3; + PyObject * _argo0 = 0; + int tempbool3; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxGridTableBase_SetValueAsBool",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValueAsBool. Expected _wxGridTableBase_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValueAsBool(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxGridTableBase_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_Clear. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_InsertRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_InsertRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_InsertRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_InsertRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_InsertRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_AppendRows(_swigobj,_swigarg0) (_swigobj->AppendRows(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_AppendRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGridTableBase_AppendRows",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_AppendRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_AppendRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_DeleteRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_DeleteRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_DeleteRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_DeleteRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_DeleteRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_InsertCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_InsertCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_InsertCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_InsertCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_InsertCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_AppendCols(_swigobj,_swigarg0) (_swigobj->AppendCols(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_AppendCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGridTableBase_AppendCols",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_AppendCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_AppendCols(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_DeleteCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_DeleteCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_DeleteCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_DeleteCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_DeleteCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetRowLabelValue(_swigobj,_swigarg0) (_swigobj->GetRowLabelValue(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_GetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableBase_GetRowLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetRowLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetRowLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_GetColLabelValue(_swigobj,_swigarg0) (_swigobj->GetColLabelValue(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_GetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableBase_GetColLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetColLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetColLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_SetRowLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","row","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGridTableBase_SetRowLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetRowLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetRowLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGridTableBase_SetColLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGridTableBase_SetColLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetColLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetColLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGridTableBase_CanHaveAttributes(_swigobj) (_swigobj->CanHaveAttributes()) +static PyObject *_wrap_wxGridTableBase_CanHaveAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_CanHaveAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_CanHaveAttributes. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_CanHaveAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableBase_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridTableBase_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridTableBase_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetRowAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridTableBase_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetColAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyGridTableBaseTowxGridTableBase(void *ptr) { + wxPyGridTableBase *src; + wxGridTableBase *dest; + src = (wxPyGridTableBase *) ptr; + dest = (wxGridTableBase *) src; + return (void *) dest; +} + +#define new_wxPyGridTableBase() (new wxPyGridTableBase()) +static PyObject *_wrap_new_wxPyGridTableBase(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridTableBase",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridTableBase *)new_wxPyGridTableBase(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridTableBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridTableBase__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridTableBase__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase__setSelf. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxPyGridTableBase_Destroy(wxPyGridTableBase *self) { delete self; } +static PyObject *_wrap_wxPyGridTableBase_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridTableBase_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_Destroy. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_GetTypeName(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetTypeName(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_GetTypeName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridTableBase_base_GetTypeName",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetTypeName. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxPyGridTableBase_base_GetTypeName(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_CanGetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_CanGetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridTableBase_base_CanGetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxPyGridTableBase_base_CanGetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_CanGetValueAs. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_CanSetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_CanSetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridTableBase_base_CanSetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxPyGridTableBase_base_CanSetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_CanSetValueAs. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_Clear(_swigobj) (_swigobj->base_Clear()) +static PyObject *_wrap_wxPyGridTableBase_base_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridTableBase_base_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_Clear. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_InsertRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_InsertRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_InsertRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_InsertRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_InsertRows. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_InsertRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_AppendRows(_swigobj,_swigarg0) (_swigobj->base_AppendRows(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_AppendRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxPyGridTableBase_base_AppendRows",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_AppendRows. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_AppendRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_DeleteRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_DeleteRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_DeleteRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_DeleteRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_DeleteRows. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_DeleteRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_InsertCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_InsertCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_InsertCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_InsertCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_InsertCols. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_InsertCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_AppendCols(_swigobj,_swigarg0) (_swigobj->base_AppendCols(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_AppendCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxPyGridTableBase_base_AppendCols",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_AppendCols. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_AppendCols(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_DeleteCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_DeleteCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_DeleteCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_DeleteCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_DeleteCols. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_DeleteCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_GetRowLabelValue(_swigobj,_swigarg0) (_swigobj->base_GetRowLabelValue(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_GetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyGridTableBase_base_GetRowLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetRowLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxPyGridTableBase_base_GetRowLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_GetColLabelValue(_swigobj,_swigarg0) (_swigobj->base_GetColLabelValue(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_GetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyGridTableBase_base_GetColLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetColLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxPyGridTableBase_base_GetColLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_SetRowLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetRowLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","row","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxPyGridTableBase_base_SetRowLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetRowLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetRowLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_SetColLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetColLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxPyGridTableBase_base_SetColLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetColLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetColLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_CanHaveAttributes(_swigobj) (_swigobj->base_CanHaveAttributes()) +static PyObject *_wrap_wxPyGridTableBase_base_CanHaveAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridTableBase_base_CanHaveAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_CanHaveAttributes. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_CanHaveAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridTableBase_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridTableBase_base_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridTableBase_base_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxPyGridTableBase_base_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridTableBase_base_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridTableBase_base_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetRowAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridTableBase_base_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridTableBase_base_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetColAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridTableBase_base_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxGridStringTableTowxGridTableBase(void *ptr) { + wxGridStringTable *src; + wxGridTableBase *dest; + src = (wxGridStringTable *) ptr; + dest = (wxGridTableBase *) src; + return (void *) dest; +} + +#define new_wxGridStringTable(_swigarg0,_swigarg1) (new wxGridStringTable(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridStringTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridStringTable * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + char *_kwnames[] = { "numRows","numCols", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridStringTable",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridStringTable *)new_wxGridStringTable(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridStringTable_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxGridTableMessage(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxGridTableMessage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxGridTableMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2 = (int ) -1; + int _arg3 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "table","id","comInt1","comInt2", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:new_wxGridTableMessage",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGridTableMessage. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridTableMessage *)new_wxGridTableMessage(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableMessage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxGridTableMessage(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxGridTableMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGridTableMessage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGridTableMessage. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxGridTableMessage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_SetTableObject(_swigobj,_swigarg0) (_swigobj->SetTableObject(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetTableObject(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + wxGridTableBase * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridTableMessage_SetTableObject",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetTableObject. Expected _wxGridTableMessage_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableMessage_SetTableObject. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetTableObject(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetTableObject(_swigobj) (_swigobj->GetTableObject()) +static PyObject *_wrap_wxGridTableMessage_GetTableObject(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetTableObject",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetTableObject. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridTableBase *)wxGridTableMessage_GetTableObject(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableMessage_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableMessage_SetId",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetId. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetId(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetId(_swigobj) (_swigobj->GetId()) +static PyObject *_wrap_wxGridTableMessage_GetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetId",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetId. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableMessage_GetId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableMessage_SetCommandInt(_swigobj,_swigarg0) (_swigobj->SetCommandInt(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetCommandInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","comInt1", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableMessage_SetCommandInt",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetCommandInt. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetCommandInt(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetCommandInt(_swigobj) (_swigobj->GetCommandInt()) +static PyObject *_wrap_wxGridTableMessage_GetCommandInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetCommandInt",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetCommandInt. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableMessage_GetCommandInt(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableMessage_SetCommandInt2(_swigobj,_swigarg0) (_swigobj->SetCommandInt2(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetCommandInt2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","comInt2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableMessage_SetCommandInt2",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetCommandInt2. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetCommandInt2(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetCommandInt2(_swigobj) (_swigobj->GetCommandInt2()) +static PyObject *_wrap_wxGridTableMessage_GetCommandInt2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetCommandInt2",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetCommandInt2. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableMessage_GetCommandInt2(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define new_wxGridCellCoords(_swigarg0,_swigarg1) (new wxGridCellCoords(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridCellCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + int _arg0 = (int ) -1; + int _arg1 = (int ) -1; + char *_kwnames[] = { "r","c", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridCellCoords",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellCoords *)new_wxGridCellCoords(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxGridCellCoords(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxGridCellCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGridCellCoords",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGridCellCoords. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxGridCellCoords(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellCoords_GetRow(_swigobj) (_swigobj->GetRow()) +static PyObject *_wrap_wxGridCellCoords_GetRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellCoords_GetRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_GetRow. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellCoords_GetRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellCoords_SetRow(_swigobj,_swigarg0) (_swigobj->SetRow(_swigarg0)) +static PyObject *_wrap_wxGridCellCoords_SetRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellCoords_SetRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_SetRow. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellCoords_SetRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellCoords_GetCol(_swigobj) (_swigobj->GetCol()) +static PyObject *_wrap_wxGridCellCoords_GetCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellCoords_GetCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_GetCol. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellCoords_GetCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellCoords_SetCol(_swigobj,_swigarg0) (_swigobj->SetCol(_swigarg0)) +static PyObject *_wrap_wxGridCellCoords_SetCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellCoords_SetCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_SetCol. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellCoords_SetCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellCoords_Set(_swigobj,_swigarg0,_swigarg1) (_swigobj->Set(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellCoords_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellCoords_Set",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_Set. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellCoords_Set(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject * wxGridCellCoords_asTuple(wxGridCellCoords *self) { + PyObject* tup = PyTuple_New(2); + PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); + PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); + return tup; + } +static PyObject *_wrap_wxGridCellCoords_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellCoords_asTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_asTuple. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxGridCellCoords_asTuple(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static int wxGridCellCoords___cmp__(wxGridCellCoords *self,const wxGridCellCoords & other) { + return *self != other; + } +static PyObject *_wrap_wxGridCellCoords___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellCoords * _arg0; + wxGridCellCoords * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellCoords___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords___cmp__. Expected _wxGridCellCoords_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellCoords___cmp__. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellCoords___cmp__(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxGridTowxScrolledWindow(void *ptr) { + wxGrid *src; + wxScrolledWindow *dest; + src = (wxGrid *) ptr; + dest = (wxScrolledWindow *) src; + return (void *) dest; +} + +static void *SwigwxGridTowxPanel(void *ptr) { + wxGrid *src; + wxPanel *dest; + src = (wxGrid *) ptr; + dest = (wxPanel *) src; + return (void *) dest; +} + +static void *SwigwxGridTowxWindow(void *ptr) { + wxGrid *src; + wxWindow *dest; + src = (wxGrid *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxGridTowxEvtHandler(void *ptr) { + wxGrid *src; + wxEvtHandler *dest; + src = (wxGrid *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + long _arg4 = (long ) wxWANTS_CHARS; + char * _arg5 = (char *) wxPanelNameStr; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxGrid",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGrid. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_CreateGrid(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CreateGrid(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_CreateGrid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + WXGRIDSELECTIONMODES _arg3 = (WXGRIDSELECTIONMODES ) wxGrid::wxGridSelectCells; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numRows","numCols","selmode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxGrid_CreateGrid",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CreateGrid. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetSelectionMode(_swigobj,_swigarg0) (_swigobj->SetSelectionMode(_swigarg0)) +static PyObject *_wrap_wxGrid_SetSelectionMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + WXGRIDSELECTIONMODES _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","selmode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetSelectionMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetSelectionMode. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetSelectionMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetNumberRows(_swigobj) (_swigobj->GetNumberRows()) +static PyObject *_wrap_wxGrid_GetNumberRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetNumberRows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetNumberRows. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetNumberRows(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetNumberCols(_swigobj) (_swigobj->GetNumberCols()) +static PyObject *_wrap_wxGrid_GetNumberCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetNumberCols",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetNumberCols. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetNumberCols(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ProcessTableMessage(_swigobj,_swigarg0) (_swigobj->ProcessTableMessage(_swigarg0)) +static PyObject *_wrap_wxGrid_ProcessTableMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + wxGridTableMessage * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_ProcessTableMessage",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ProcessTableMessage. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_ProcessTableMessage. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_ProcessTableMessage(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetTable(_swigobj) (_swigobj->GetTable()) +static PyObject *_wrap_wxGrid_GetTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetTable",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetTable. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridTableBase *)wxGrid_GetTable(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_SetTable(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetTable(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + wxGridTableBase * _arg1; + bool _arg2 = (bool ) FALSE; + WXGRIDSELECTIONMODES _arg3 = (WXGRIDSELECTIONMODES ) wxGrid::wxGridSelectCells; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","table","takeOwnership","selmode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|ii:wxGrid_SetTable",_kwnames,&_argo0,&_argo1,&tempbool2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetTable. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetTable. Expected _wxGridTableBase_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_SetTable(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ClearGrid(_swigobj) (_swigobj->ClearGrid()) +static PyObject *_wrap_wxGrid_ClearGrid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_ClearGrid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ClearGrid. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_ClearGrid(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_InsertRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertRows(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_InsertRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numRows","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_InsertRows",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_AppendRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","numRows","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendRows",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_DeleteRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteRows(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_DeleteRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numRows","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_DeleteRows",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_InsertCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertCols(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_InsertCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numCols","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_InsertCols",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertCols. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_AppendCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","numCols","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendCols",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendCols. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_DeleteCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteCols(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_DeleteCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numCols","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_DeleteCols",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteCols. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_DrawCellHighlight(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawCellHighlight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_DrawCellHighlight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxDC * _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","dc","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_DrawCellHighlight",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DrawCellHighlight. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_DrawCellHighlight. Expected _wxDC_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_DrawCellHighlight. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DrawCellHighlight(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DrawTextRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawTextRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxDC * _arg1; + wxString * _arg2; + wxRect * _arg3; + int _arg4 = (int ) wxLEFT; + int _arg5 = (int ) wxTOP; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + wxRect temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","dc","arg3","arg4","horizontalAlignment","verticalAlignment", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO|ii:wxGrid_DrawTextRectangle",_kwnames,&_argo0,&_argo1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DrawTextRectangle. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_DrawTextRectangle. Expected _wxDC_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + _arg3 = &temp; + if (! wxRect_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_StringToLines(_swigobj,_swigarg0,_swigarg1) (_swigobj->StringToLines(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_StringToLines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxString * _arg1; + wxArrayString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","value","lines", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_StringToLines",_kwnames,&_argo0,&_obj1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_StringToLines. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArrayString_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_StringToLines. Expected _wxArrayString_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_StringToLines(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_GetTextBoxSize(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetTextBoxSize(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxDC * _arg1; + wxArrayString * _arg2; + long * _arg3; + long temp; + long * _arg4; + long temp0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","dc","lines", NULL }; + + self = self; +{ + _arg3 = &temp; +} +{ + _arg4 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_GetTextBoxSize",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetTextBoxSize. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_GetTextBoxSize. Expected _wxDC_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArrayString_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_GetTextBoxSize. Expected _wxArrayString_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetTextBoxSize(_arg0,*_arg1,*_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGrid_BeginBatch(_swigobj) (_swigobj->BeginBatch()) +static PyObject *_wrap_wxGrid_BeginBatch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_BeginBatch",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_BeginBatch. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_BeginBatch(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_EndBatch(_swigobj) (_swigobj->EndBatch()) +static PyObject *_wrap_wxGrid_EndBatch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_EndBatch",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EndBatch. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EndBatch(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetBatchCount(_swigobj) (_swigobj->GetBatchCount()) +static PyObject *_wrap_wxGrid_GetBatchCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetBatchCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetBatchCount. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetBatchCount(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsEditable(_swigobj) (_swigobj->IsEditable()) +static PyObject *_wrap_wxGrid_IsEditable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsEditable",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsEditable. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsEditable(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_EnableEditing(_swigobj,_swigarg0) (_swigobj->EnableEditing(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableEditing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","edit", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_EnableEditing",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableEditing. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableEditing(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_EnableCellEditControl(_swigobj,_swigarg0) (_swigobj->EnableCellEditControl(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableCellEditControl",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableCellEditControl(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableCellEditControl(_swigobj) (_swigobj->DisableCellEditControl()) +static PyObject *_wrap_wxGrid_DisableCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableCellEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableCellEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanEnableCellControl(_swigobj) (_swigobj->CanEnableCellControl()) +static PyObject *_wrap_wxGrid_CanEnableCellControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanEnableCellControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanEnableCellControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanEnableCellControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsCellEditControlEnabled(_swigobj) (_swigobj->IsCellEditControlEnabled()) +static PyObject *_wrap_wxGrid_IsCellEditControlEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsCellEditControlEnabled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsCellEditControlEnabled. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsCellEditControlEnabled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsCellEditControlShown(_swigobj) (_swigobj->IsCellEditControlShown()) +static PyObject *_wrap_wxGrid_IsCellEditControlShown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsCellEditControlShown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsCellEditControlShown. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsCellEditControlShown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsCurrentCellReadOnly(_swigobj) (_swigobj->IsCurrentCellReadOnly()) +static PyObject *_wrap_wxGrid_IsCurrentCellReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsCurrentCellReadOnly",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsCurrentCellReadOnly. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsCurrentCellReadOnly(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ShowCellEditControl(_swigobj) (_swigobj->ShowCellEditControl()) +static PyObject *_wrap_wxGrid_ShowCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_ShowCellEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ShowCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_ShowCellEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_HideCellEditControl(_swigobj) (_swigobj->HideCellEditControl()) +static PyObject *_wrap_wxGrid_HideCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_HideCellEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_HideCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_HideCellEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SaveEditControlValue(_swigobj) (_swigobj->SaveEditControlValue()) +static PyObject *_wrap_wxGrid_SaveEditControlValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_SaveEditControlValue",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SaveEditControlValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SaveEditControlValue(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static wxGridCellCoords * wxGrid_XYToCell(wxGrid *self,int x,int y) { + wxGridCellCoords rv; + self->XYToCell(x, y, rv); + return new wxGridCellCoords(rv); + } +static PyObject *_wrap_wxGrid_XYToCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_XYToCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_XYToCell. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellCoords *)wxGrid_XYToCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_YToRow(_swigobj,_swigarg0) (_swigobj->YToRow(_swigarg0)) +static PyObject *_wrap_wxGrid_YToRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_YToRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_YToRow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_YToRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_XToCol(_swigobj,_swigarg0) (_swigobj->XToCol(_swigarg0)) +static PyObject *_wrap_wxGrid_XToCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_XToCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_XToCol. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_XToCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_YToEdgeOfRow(_swigobj,_swigarg0) (_swigobj->YToEdgeOfRow(_swigarg0)) +static PyObject *_wrap_wxGrid_YToEdgeOfRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_YToEdgeOfRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_YToEdgeOfRow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_YToEdgeOfRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_XToEdgeOfCol(_swigobj,_swigarg0) (_swigobj->XToEdgeOfCol(_swigarg0)) +static PyObject *_wrap_wxGrid_XToEdgeOfCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_XToEdgeOfCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_XToEdgeOfCol. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_XToEdgeOfCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_CellToRect(_swigobj,_swigarg0,_swigarg1) (_swigobj->CellToRect(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_CellToRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_CellToRect",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CellToRect. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxGrid_CellToRect(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetGridCursorRow(_swigobj) (_swigobj->GetGridCursorRow()) +static PyObject *_wrap_wxGrid_GetGridCursorRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridCursorRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridCursorRow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetGridCursorRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetGridCursorCol(_swigobj) (_swigobj->GetGridCursorCol()) +static PyObject *_wrap_wxGrid_GetGridCursorCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridCursorCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridCursorCol. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetGridCursorCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsVisible(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->IsVisible(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","row","col","wholeCellVisible", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxGrid_IsVisible",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsVisible. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsVisible(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MakeCellVisible(_swigobj,_swigarg0,_swigarg1) (_swigobj->MakeCellVisible(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_MakeCellVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_MakeCellVisible",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MakeCellVisible. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_MakeCellVisible(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetGridCursor(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetGridCursor(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetGridCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetGridCursor",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetGridCursor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetGridCursor(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_MoveCursorUp(_swigobj,_swigarg0) (_swigobj->MoveCursorUp(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorUp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorUp",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorUp. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorUp(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorDown(_swigobj,_swigarg0) (_swigobj->MoveCursorDown(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorDown",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorDown. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorDown(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorLeft(_swigobj,_swigarg0) (_swigobj->MoveCursorLeft(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorLeft(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorLeft",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorLeft. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorLeft(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorRight(_swigobj,_swigarg0) (_swigobj->MoveCursorRight(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorRight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorRight",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorRight. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorRight(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MovePageDown(_swigobj) (_swigobj->MovePageDown()) +static PyObject *_wrap_wxGrid_MovePageDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_MovePageDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MovePageDown. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MovePageDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MovePageUp(_swigobj) (_swigobj->MovePageUp()) +static PyObject *_wrap_wxGrid_MovePageUp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_MovePageUp",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MovePageUp. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MovePageUp(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorUpBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorUpBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorUpBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorUpBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorUpBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorUpBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorDownBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorDownBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorDownBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorDownBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorDownBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorDownBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorLeftBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorLeftBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorLeftBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorLeftBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorLeftBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorLeftBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorRightBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorRightBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorRightBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorRightBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorRightBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorRightBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultRowLabelSize(_swigobj) (_swigobj->GetDefaultRowLabelSize()) +static PyObject *_wrap_wxGrid_GetDefaultRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRowLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRowLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultRowLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetRowLabelSize(_swigobj) (_swigobj->GetRowLabelSize()) +static PyObject *_wrap_wxGrid_GetRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetRowLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetRowLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultColLabelSize(_swigobj) (_swigobj->GetDefaultColLabelSize()) +static PyObject *_wrap_wxGrid_GetDefaultColLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultColLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultColLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultColLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetColLabelSize(_swigobj) (_swigobj->GetColLabelSize()) +static PyObject *_wrap_wxGrid_GetColLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetColLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetColLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetLabelBackgroundColour(_swigobj) (_swigobj->GetLabelBackgroundColour()) +static PyObject *_wrap_wxGrid_GetLabelBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetLabelBackgroundColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetLabelTextColour(_swigobj) (_swigobj->GetLabelTextColour()) +static PyObject *_wrap_wxGrid_GetLabelTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetLabelTextColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetLabelFont(_swigobj) (_swigobj->GetLabelFont()) +static PyObject *_wrap_wxGrid_GetLabelFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelFont. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxGrid_GetLabelFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetRowLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRowLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetRowLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetRowLabelAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetRowLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGrid_GetColLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetColLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetColLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetColLabelAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetColLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGrid_GetRowLabelValue(_swigobj,_swigarg0) (_swigobj->GetRowLabelValue(_swigarg0)) +static PyObject *_wrap_wxGrid_GetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetRowLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGrid_GetRowLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetColLabelValue(_swigobj,_swigarg0) (_swigobj->GetColLabelValue(_swigarg0)) +static PyObject *_wrap_wxGrid_GetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetColLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGrid_GetColLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetGridLineColour(_swigobj) (_swigobj->GetGridLineColour()) +static PyObject *_wrap_wxGrid_GetGridLineColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridLineColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridLineColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetGridLineColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellHighlightColour(_swigobj) (_swigobj->GetCellHighlightColour()) +static PyObject *_wrap_wxGrid_GetCellHighlightColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCellHighlightColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellHighlightColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetCellHighlightColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_SetRowLabelSize(_swigobj,_swigarg0) (_swigobj->SetRowLabelSize(_swigarg0)) +static PyObject *_wrap_wxGrid_SetRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetRowLabelSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowLabelSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColLabelSize(_swigobj,_swigarg0) (_swigobj->SetColLabelSize(_swigarg0)) +static PyObject *_wrap_wxGrid_SetColLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetColLabelSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColLabelSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetLabelBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetLabelBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetLabelBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetLabelTextColour(_swigobj,_swigarg0) (_swigobj->SetLabelTextColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetLabelTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetLabelTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetLabelFont(_swigobj,_swigarg0) (_swigobj->SetLabelFont(_swigarg0)) +static PyObject *_wrap_wxGrid_SetLabelFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelFont. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetLabelFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetRowLabelAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetColLabelAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","row","arg3", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetRowLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_SetColLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","arg3", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetColLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_SetGridLineColour(_swigobj,_swigarg0) (_swigobj->SetGridLineColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetGridLineColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetGridLineColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetGridLineColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetGridLineColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellHighlightColour(_swigobj,_swigarg0) (_swigobj->SetCellHighlightColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetCellHighlightColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetCellHighlightColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellHighlightColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellHighlightColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_EnableDragRowSize(_swigobj,_swigarg0) (_swigobj->EnableDragRowSize(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableDragRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableDragRowSize",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableDragRowSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableDragRowSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableDragRowSize(_swigobj) (_swigobj->DisableDragRowSize()) +static PyObject *_wrap_wxGrid_DisableDragRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableDragRowSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableDragRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableDragRowSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanDragRowSize(_swigobj) (_swigobj->CanDragRowSize()) +static PyObject *_wrap_wxGrid_CanDragRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanDragRowSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanDragRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanDragRowSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_EnableDragColSize(_swigobj,_swigarg0) (_swigobj->EnableDragColSize(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableDragColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableDragColSize",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableDragColSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableDragColSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableDragColSize(_swigobj) (_swigobj->DisableDragColSize()) +static PyObject *_wrap_wxGrid_DisableDragColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableDragColSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableDragColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableDragColSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanDragColSize(_swigobj) (_swigobj->CanDragColSize()) +static PyObject *_wrap_wxGrid_CanDragColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanDragColSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanDragColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanDragColSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_EnableDragGridSize(_swigobj,_swigarg0) (_swigobj->EnableDragGridSize(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableDragGridSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableDragGridSize",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableDragGridSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableDragGridSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableDragGridSize(_swigobj) (_swigobj->DisableDragGridSize()) +static PyObject *_wrap_wxGrid_DisableDragGridSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableDragGridSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableDragGridSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableDragGridSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanDragGridSize(_swigobj) (_swigobj->CanDragGridSize()) +static PyObject *_wrap_wxGrid_CanDragGridSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanDragGridSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanDragGridSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanDragGridSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","row","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetRowAttr",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowAttr. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","col","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetColAttr",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColAttr. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatBool(_swigobj,_swigarg0) (_swigobj->SetColFormatBool(_swigarg0)) +static PyObject *_wrap_wxGrid_SetColFormatBool(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetColFormatBool",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatBool. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatBool(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatNumber(_swigobj,_swigarg0) (_swigobj->SetColFormatNumber(_swigarg0)) +static PyObject *_wrap_wxGrid_SetColFormatNumber(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetColFormatNumber",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatNumber. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatNumber(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatFloat(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetColFormatFloat(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetColFormatFloat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2 = (int ) -1; + int _arg3 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col","width","precision", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxGrid_SetColFormatFloat",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatFloat. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatFloat(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatCustom(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColFormatCustom(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColFormatCustom(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetColFormatCustom",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatCustom. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatCustom(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_EnableGridLines(_swigobj,_swigarg0) (_swigobj->EnableGridLines(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableGridLines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableGridLines",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableGridLines. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableGridLines(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GridLinesEnabled(_swigobj) (_swigobj->GridLinesEnabled()) +static PyObject *_wrap_wxGrid_GridLinesEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GridLinesEnabled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GridLinesEnabled. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_GridLinesEnabled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultRowSize(_swigobj) (_swigobj->GetDefaultRowSize()) +static PyObject *_wrap_wxGrid_GetDefaultRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRowSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultRowSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetRowSize(_swigobj,_swigarg0) (_swigobj->GetRowSize(_swigarg0)) +static PyObject *_wrap_wxGrid_GetRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetRowSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetRowSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultColSize(_swigobj) (_swigobj->GetDefaultColSize()) +static PyObject *_wrap_wxGrid_GetDefaultColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultColSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultColSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetColSize(_swigobj,_swigarg0) (_swigobj->GetColSize(_swigarg0)) +static PyObject *_wrap_wxGrid_GetColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetColSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetColSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultCellBackgroundColour(_swigobj) (_swigobj->GetDefaultCellBackgroundColour()) +static PyObject *_wrap_wxGrid_GetDefaultCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultCellBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetDefaultCellBackgroundColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellBackgroundColour(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellBackgroundColour",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetDefaultCellTextColour(_swigobj) (_swigobj->GetDefaultCellTextColour()) +static PyObject *_wrap_wxGrid_GetDefaultCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultCellTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetDefaultCellTextColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellTextColour",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetCellTextColour(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetDefaultCellFont(_swigobj) (_swigobj->GetDefaultCellFont()) +static PyObject *_wrap_wxGrid_GetDefaultCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultCellFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellFont. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxGrid_GetDefaultCellFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellFont(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellFont",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellFont. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxGrid_GetCellFont(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetDefaultCellAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDefaultCellAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetDefaultCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int * _arg1; + int * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_GetDefaultCellAlignment",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_GetDefaultCellAlignment. Expected _int_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_GetDefaultCellAlignment. Expected _int_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetDefaultCellAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetCellAlignment(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetCellAlignment(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxGrid_GetCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + int * _arg3; + int * _arg4; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "self","row","col","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO:wxGrid_GetCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_argo4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_GetCellAlignment. Expected _int_p."); + return NULL; + } + } + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGrid_GetCellAlignment. Expected _int_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultRowSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDefaultRowSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetDefaultRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","height","resizeExistingRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SetDefaultRowSize",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultRowSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultRowSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetRowSize",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultColSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDefaultColSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetDefaultColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","width","resizeExistingCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SetDefaultColSize",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultColSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultColSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetColSize",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeColumn(_swigobj,_swigarg0,_swigarg1) (_swigobj->AutoSizeColumn(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AutoSizeColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","col","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_AutoSizeColumn",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeColumn. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeColumn(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeRow(_swigobj,_swigarg0,_swigarg1) (_swigobj->AutoSizeRow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AutoSizeRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","row","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_AutoSizeRow",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeRow. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeRow(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeColumns(_swigobj,_swigarg0) (_swigobj->AutoSizeColumns(_swigarg0)) +static PyObject *_wrap_wxGrid_AutoSizeColumns(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_AutoSizeColumns",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeColumns. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeColumns(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeRows(_swigobj,_swigarg0) (_swigobj->AutoSizeRows(_swigarg0)) +static PyObject *_wrap_wxGrid_AutoSizeRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_AutoSizeRows",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSize(_swigobj) (_swigobj->AutoSize()) +static PyObject *_wrap_wxGrid_AutoSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_AutoSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColMinimalWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColMinimalWidth(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColMinimalWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetColMinimalWidth",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColMinimalWidth. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColMinimalWidth(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowMinimalHeight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowMinimalHeight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowMinimalHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetRowMinimalHeight",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowMinimalHeight. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowMinimalHeight(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetDefaultCellBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultCellBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellBackgroundColour(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxColour * _arg3; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","arg4", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellBackgroundColour",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg3 = &temp; + if (! wxColour_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellBackgroundColour(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellTextColour(_swigobj,_swigarg0) (_swigobj->SetDefaultCellTextColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultCellTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellTextColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextColour(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxColour * _arg3; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","arg4", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellTextColour",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg3 = &temp; + if (! wxColour_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellTextColour(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellFont(_swigobj,_swigarg0) (_swigobj->SetDefaultCellFont(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultCellFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellFont. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefaultCellFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellFont(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellFont(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxFont * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","arg4", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellFont",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellFont. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_SetCellFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellFont(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDefaultCellAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetDefaultCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetDefaultCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellAlignment(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetCellAlignment(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxGrid_SetCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxGrid_SetCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultRenderer(_swigobj,_swigarg0) (_swigobj->SetDefaultRenderer(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxGridCellRenderer * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","renderer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultRenderer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultRenderer. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefaultRenderer. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultRenderer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellRenderer(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellRenderer(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxGridCellRenderer * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","renderer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellRenderer",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellRenderer. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_SetCellRenderer. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellRenderer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetDefaultRenderer(_swigobj) (_swigobj->GetDefaultRenderer()) +static PyObject *_wrap_wxGrid_GetDefaultRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRenderer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRenderer. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRenderer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetCellRenderer(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellRenderer(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellRenderer",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellRenderer. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetCellRenderer(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_SetDefaultEditor(_swigobj,_swigarg0) (_swigobj->SetDefaultEditor(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxGridCellEditor * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultEditor",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultEditor. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefaultEditor. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultEditor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellEditor(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellEditor(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxGridCellEditor * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellEditor",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellEditor. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_SetCellEditor. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellEditor(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetDefaultEditor(_swigobj) (_swigobj->GetDefaultEditor()) +static PyObject *_wrap_wxGrid_GetDefaultEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultEditor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultEditor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditor(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetCellEditor(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellEditor(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellEditor",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellEditor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetCellEditor(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetCellValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellValue",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGrid_GetCellValue(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_SetCellValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellValue(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","s", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellValue",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellValue. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellValue(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGrid_IsReadOnly(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsReadOnly(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_IsReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_IsReadOnly",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsReadOnly. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsReadOnly(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetReadOnly(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetReadOnly(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","row","col","isReadOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxGrid_SetReadOnly",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetReadOnly. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetReadOnly(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectRow(_swigobj,_swigarg0,_swigarg1) (_swigobj->SelectRow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SelectRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","row","addToSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SelectRow",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectRow. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectRow(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectCol(_swigobj,_swigarg0,_swigarg1) (_swigobj->SelectCol(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SelectCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","col","addToSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SelectCol",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectCol. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectCol(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectBlock(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SelectBlock(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4; + bool _arg5 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool5 = (int) FALSE; + char *_kwnames[] = { "self","topRow","leftCol","bottomRow","rightCol","addToSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|i:wxGrid_SelectBlock",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg5 = (bool ) tempbool5; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectAll(_swigobj) (_swigobj->SelectAll()) +static PyObject *_wrap_wxGrid_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_SelectAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectAll. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_IsSelection(_swigobj) (_swigobj->IsSelection()) +static PyObject *_wrap_wxGrid_IsSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsSelection. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsSelection(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ClearSelection(_swigobj) (_swigobj->ClearSelection()) +static PyObject *_wrap_wxGrid_ClearSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_ClearSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ClearSelection. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_ClearSelection(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_IsInSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsInSelection(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_IsInSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_IsInSelection",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsInSelection. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsInSelection(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_BlockToDeviceRect(_swigobj,_swigarg0,_swigarg1) (_swigobj->BlockToDeviceRect(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_BlockToDeviceRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxGrid * _arg0; + wxGridCellCoords * _arg1; + wxGridCellCoords * _arg2; + PyObject * _argo0 = 0; + wxGridCellCoords temp; + PyObject * _obj1 = 0; + wxGridCellCoords temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","topLeft","bottomRight", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_BlockToDeviceRect",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_BlockToDeviceRect. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxGridCellCoords_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxGridCellCoords_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxGrid_BlockToDeviceRect(_arg0,*_arg1,*_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetSelectionBackground(_swigobj) (_swigobj->GetSelectionBackground()) +static PyObject *_wrap_wxGrid_GetSelectionBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectionBackground",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectionBackground. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetSelectionBackground(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetSelectionForeground(_swigobj) (_swigobj->GetSelectionForeground()) +static PyObject *_wrap_wxGrid_GetSelectionForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectionForeground",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectionForeground. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetSelectionForeground(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_SetSelectionBackground(_swigobj,_swigarg0) (_swigobj->SetSelectionBackground(_swigarg0)) +static PyObject *_wrap_wxGrid_SetSelectionBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","c", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetSelectionBackground",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetSelectionBackground. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetSelectionBackground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetSelectionForeground(_swigobj,_swigarg0) (_swigobj->SetSelectionForeground(_swigarg0)) +static PyObject *_wrap_wxGrid_SetSelectionForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","c", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetSelectionForeground",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetSelectionForeground. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetSelectionForeground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_RegisterDataType(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->RegisterDataType(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_RegisterDataType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxString * _arg1; + wxGridCellRenderer * _arg2; + wxGridCellEditor * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","typeName","renderer","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxGrid_RegisterDataType",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_RegisterDataType. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_RegisterDataType. Expected _wxGridCellRenderer_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_RegisterDataType. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_RegisterDataType(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_GetDefaultEditorForCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDefaultEditorForCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetDefaultEditorForCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetDefaultEditorForCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultEditorForCell. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetDefaultRendererForCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDefaultRendererForCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetDefaultRendererForCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetDefaultRendererForCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRendererForCell. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetDefaultEditorForType(_swigobj,_swigarg0) (_swigobj->GetDefaultEditorForType(_swigarg0)) +static PyObject *_wrap_wxGrid_GetDefaultEditorForType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","typeName", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_GetDefaultEditorForType",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultEditorForType. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForType(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_GetDefaultRendererForType(_swigobj,_swigarg0) (_swigobj->GetDefaultRendererForType(_swigarg0)) +static PyObject *_wrap_wxGrid_GetDefaultRendererForType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","typeName", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_GetDefaultRendererForType",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRendererForType. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForType(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_SetMargins(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMargins(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetMargins(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","extraWidth","extraHeight", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetMargins",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetMargins. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetMargins(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxGridEventTowxNotifyEvent(void *ptr) { + wxGridEvent *src; + wxNotifyEvent *dest; + src = (wxGridEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridEventTowxCommandEvent(void *ptr) { + wxGridEvent *src; + wxCommandEvent *dest; + src = (wxGridEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridEventTowxEvent(void *ptr) { + wxGridEvent *src; + wxEvent *dest; + src = (wxGridEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxGridEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10,_swigarg11) (new wxGridEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10,_swigarg11)) +static PyObject *_wrap_new_wxGridEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridEvent * _result; + int _arg0; + wxEventType _arg1; + wxGrid * _arg2; + int _arg3 = (int ) -1; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + int _arg6 = (int ) -1; + bool _arg7 = (bool ) TRUE; + bool _arg8 = (bool ) FALSE; + bool _arg9 = (bool ) FALSE; + bool _arg10 = (bool ) FALSE; + bool _arg11 = (bool ) FALSE; + PyObject * _argo2 = 0; + int tempbool7 = (int) TRUE; + int tempbool8 = (int) FALSE; + int tempbool9 = (int) FALSE; + int tempbool10 = (int) FALSE; + int tempbool11 = (int) FALSE; + char *_kwnames[] = { "id","type","obj","row","col","x","y","sel","control","shift","alt","meta", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiO|iiiiiiiii:new_wxGridEvent",_kwnames,&_arg0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_arg6,&tempbool7,&tempbool8,&tempbool9,&tempbool10,&tempbool11)) + return NULL; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGridEvent. Expected _wxGrid_p."); + return NULL; + } + } + _arg7 = (bool ) tempbool7; + _arg8 = (bool ) tempbool8; + _arg9 = (bool ) tempbool9; + _arg10 = (bool ) tempbool10; + _arg11 = (bool ) tempbool11; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridEvent *)new_wxGridEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10,_arg11); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridEvent_GetRow(_swigobj) (_swigobj->GetRow()) +static PyObject *_wrap_wxGridEvent_GetRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetRow. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridEvent_GetRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_GetCol(_swigobj) (_swigobj->GetCol()) +static PyObject *_wrap_wxGridEvent_GetCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetCol. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridEvent_GetCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxGridEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetPosition. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxGridEvent_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridEvent_Selecting(_swigobj) (_swigobj->Selecting()) +static PyObject *_wrap_wxGridEvent_Selecting(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_Selecting",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_Selecting. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_Selecting(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxGridEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ControlDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxGridEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_MetaDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxGridEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ShiftDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxGridEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_AltDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxGridSizeEventTowxNotifyEvent(void *ptr) { + wxGridSizeEvent *src; + wxNotifyEvent *dest; + src = (wxGridSizeEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridSizeEventTowxCommandEvent(void *ptr) { + wxGridSizeEvent *src; + wxCommandEvent *dest; + src = (wxGridSizeEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridSizeEventTowxEvent(void *ptr) { + wxGridSizeEvent *src; + wxEvent *dest; + src = (wxGridSizeEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxGridSizeEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxGridSizeEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_new_wxGridSizeEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizeEvent * _result; + int _arg0; + wxEventType _arg1; + wxGrid * _arg2; + int _arg3 = (int ) -1; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + bool _arg6 = (bool ) FALSE; + bool _arg7 = (bool ) FALSE; + bool _arg8 = (bool ) FALSE; + bool _arg9 = (bool ) FALSE; + PyObject * _argo2 = 0; + int tempbool6 = (int) FALSE; + int tempbool7 = (int) FALSE; + int tempbool8 = (int) FALSE; + int tempbool9 = (int) FALSE; + char *_kwnames[] = { "id","type","obj","rowOrCol","x","y","control","shift","alt","meta", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiO|iiiiiii:new_wxGridSizeEvent",_kwnames,&_arg0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&tempbool6,&tempbool7,&tempbool8,&tempbool9)) + return NULL; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGridSizeEvent. Expected _wxGrid_p."); + return NULL; + } + } + _arg6 = (bool ) tempbool6; + _arg7 = (bool ) tempbool7; + _arg8 = (bool ) tempbool8; + _arg9 = (bool ) tempbool9; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridSizeEvent *)new_wxGridSizeEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridSizeEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridSizeEvent_GetRowOrCol(_swigobj) (_swigobj->GetRowOrCol()) +static PyObject *_wrap_wxGridSizeEvent_GetRowOrCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_GetRowOrCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_GetRowOrCol. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizeEvent_GetRowOrCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxGridSizeEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_GetPosition. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxGridSizeEvent_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridSizeEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxGridSizeEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_ControlDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxGridSizeEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_MetaDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxGridSizeEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_ShiftDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxGridSizeEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_AltDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxGridRangeSelectEventTowxNotifyEvent(void *ptr) { + wxGridRangeSelectEvent *src; + wxNotifyEvent *dest; + src = (wxGridRangeSelectEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridRangeSelectEventTowxCommandEvent(void *ptr) { + wxGridRangeSelectEvent *src; + wxCommandEvent *dest; + src = (wxGridRangeSelectEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridRangeSelectEventTowxEvent(void *ptr) { + wxGridRangeSelectEvent *src; + wxEvent *dest; + src = (wxGridRangeSelectEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxGridRangeSelectEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxGridRangeSelectEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_new_wxGridRangeSelectEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridRangeSelectEvent * _result; + int _arg0; + wxEventType _arg1; + wxGrid * _arg2; + wxGridCellCoords * _arg3; + wxGridCellCoords * _arg4; + bool _arg5 = (bool ) TRUE; + bool _arg6 = (bool ) FALSE; + bool _arg7 = (bool ) FALSE; + bool _arg8 = (bool ) FALSE; + bool _arg9 = (bool ) FALSE; + PyObject * _argo2 = 0; + wxGridCellCoords temp; + PyObject * _obj3 = 0; + wxGridCellCoords temp0; + PyObject * _obj4 = 0; + int tempbool5 = (int) TRUE; + int tempbool6 = (int) FALSE; + int tempbool7 = (int) FALSE; + int tempbool8 = (int) FALSE; + int tempbool9 = (int) FALSE; + char *_kwnames[] = { "id","type","obj","topLeft","bottomRight","sel","control","shift","alt","meta", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiOOO|iiiii:new_wxGridRangeSelectEvent",_kwnames,&_arg0,&_arg1,&_argo2,&_obj3,&_obj4,&tempbool5,&tempbool6,&tempbool7,&tempbool8,&tempbool9)) + return NULL; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGridRangeSelectEvent. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg3 = &temp; + if (! wxGridCellCoords_helper(_obj3, &_arg3)) + return NULL; +} +{ + _arg4 = &temp0; + if (! wxGridCellCoords_helper(_obj4, &_arg4)) + return NULL; +} + _arg5 = (bool ) tempbool5; + _arg6 = (bool ) tempbool6; + _arg7 = (bool ) tempbool7; + _arg8 = (bool ) tempbool8; + _arg9 = (bool ) tempbool9; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridRangeSelectEvent *)new_wxGridRangeSelectEvent(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridRangeSelectEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetTopLeftCoords(_swigobj) (_swigobj->GetTopLeftCoords()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetTopLeftCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetTopLeftCoords",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetTopLeftCoords. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetTopLeftCoords(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetBottomRightCoords(_swigobj) (_swigobj->GetBottomRightCoords()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRightCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetBottomRightCoords",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetBottomRightCoords. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetBottomRightCoords(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetTopRow(_swigobj) (_swigobj->GetTopRow()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetTopRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetTopRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetTopRow. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetTopRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetBottomRow(_swigobj) (_swigobj->GetBottomRow()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetBottomRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetBottomRow. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetBottomRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetLeftCol(_swigobj) (_swigobj->GetLeftCol()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetLeftCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetLeftCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetLeftCol. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetLeftCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetRightCol(_swigobj) (_swigobj->GetRightCol()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetRightCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetRightCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetRightCol. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetRightCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_Selecting(_swigobj) (_swigobj->Selecting()) +static PyObject *_wrap_wxGridRangeSelectEvent_Selecting(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_Selecting",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_Selecting. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_Selecting(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_ControlDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_MetaDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_ShiftDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_AltDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyMethodDef gridcMethods[] = { + { "wxGridRangeSelectEvent_AltDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_ShiftDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_MetaDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_ControlDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_Selecting", (PyCFunction) _wrap_wxGridRangeSelectEvent_Selecting, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetRightCol", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetRightCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetLeftCol", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetLeftCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetBottomRow", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetBottomRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetTopRow", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetTopRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetBottomRightCoords", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetBottomRightCoords, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetTopLeftCoords", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetTopLeftCoords, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridRangeSelectEvent", (PyCFunction) _wrap_new_wxGridRangeSelectEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_AltDown", (PyCFunction) _wrap_wxGridSizeEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_ShiftDown", (PyCFunction) _wrap_wxGridSizeEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_MetaDown", (PyCFunction) _wrap_wxGridSizeEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_ControlDown", (PyCFunction) _wrap_wxGridSizeEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_GetPosition", (PyCFunction) _wrap_wxGridSizeEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_GetRowOrCol", (PyCFunction) _wrap_wxGridSizeEvent_GetRowOrCol, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridSizeEvent", (PyCFunction) _wrap_new_wxGridSizeEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_AltDown", (PyCFunction) _wrap_wxGridEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_ShiftDown", (PyCFunction) _wrap_wxGridEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_MetaDown", (PyCFunction) _wrap_wxGridEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_ControlDown", (PyCFunction) _wrap_wxGridEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_Selecting", (PyCFunction) _wrap_wxGridEvent_Selecting, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_GetPosition", (PyCFunction) _wrap_wxGridEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_GetCol", (PyCFunction) _wrap_wxGridEvent_GetCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_GetRow", (PyCFunction) _wrap_wxGridEvent_GetRow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridEvent", (PyCFunction) _wrap_new_wxGridEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetMargins", (PyCFunction) _wrap_wxGrid_SetMargins, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRendererForType", (PyCFunction) _wrap_wxGrid_GetDefaultRendererForType, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultEditorForType", (PyCFunction) _wrap_wxGrid_GetDefaultEditorForType, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRendererForCell", (PyCFunction) _wrap_wxGrid_GetDefaultRendererForCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultEditorForCell", (PyCFunction) _wrap_wxGrid_GetDefaultEditorForCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_RegisterDataType", (PyCFunction) _wrap_wxGrid_RegisterDataType, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetSelectionForeground", (PyCFunction) _wrap_wxGrid_SetSelectionForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetSelectionBackground", (PyCFunction) _wrap_wxGrid_SetSelectionBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectionForeground", (PyCFunction) _wrap_wxGrid_GetSelectionForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectionBackground", (PyCFunction) _wrap_wxGrid_GetSelectionBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_BlockToDeviceRect", (PyCFunction) _wrap_wxGrid_BlockToDeviceRect, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsInSelection", (PyCFunction) _wrap_wxGrid_IsInSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ClearSelection", (PyCFunction) _wrap_wxGrid_ClearSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsSelection", (PyCFunction) _wrap_wxGrid_IsSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectAll", (PyCFunction) _wrap_wxGrid_SelectAll, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectBlock", (PyCFunction) _wrap_wxGrid_SelectBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectCol", (PyCFunction) _wrap_wxGrid_SelectCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectRow", (PyCFunction) _wrap_wxGrid_SelectRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetReadOnly", (PyCFunction) _wrap_wxGrid_SetReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsReadOnly", (PyCFunction) _wrap_wxGrid_IsReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellValue", (PyCFunction) _wrap_wxGrid_SetCellValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellValue", (PyCFunction) _wrap_wxGrid_GetCellValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellEditor", (PyCFunction) _wrap_wxGrid_GetCellEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultEditor", (PyCFunction) _wrap_wxGrid_GetDefaultEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellEditor", (PyCFunction) _wrap_wxGrid_SetCellEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultEditor", (PyCFunction) _wrap_wxGrid_SetDefaultEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellRenderer", (PyCFunction) _wrap_wxGrid_GetCellRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRenderer", (PyCFunction) _wrap_wxGrid_GetDefaultRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellRenderer", (PyCFunction) _wrap_wxGrid_SetCellRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultRenderer", (PyCFunction) _wrap_wxGrid_SetDefaultRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellAlignment", (PyCFunction) _wrap_wxGrid_SetCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellAlignment", (PyCFunction) _wrap_wxGrid_SetDefaultCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellFont", (PyCFunction) _wrap_wxGrid_SetCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellFont", (PyCFunction) _wrap_wxGrid_SetDefaultCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellTextColour", (PyCFunction) _wrap_wxGrid_SetCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellTextColour", (PyCFunction) _wrap_wxGrid_SetDefaultCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellBackgroundColour", (PyCFunction) _wrap_wxGrid_SetCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellBackgroundColour", (PyCFunction) _wrap_wxGrid_SetDefaultCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowMinimalHeight", (PyCFunction) _wrap_wxGrid_SetRowMinimalHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColMinimalWidth", (PyCFunction) _wrap_wxGrid_SetColMinimalWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSize", (PyCFunction) _wrap_wxGrid_AutoSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeRows", (PyCFunction) _wrap_wxGrid_AutoSizeRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeColumns", (PyCFunction) _wrap_wxGrid_AutoSizeColumns, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeRow", (PyCFunction) _wrap_wxGrid_AutoSizeRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeColumn", (PyCFunction) _wrap_wxGrid_AutoSizeColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColSize", (PyCFunction) _wrap_wxGrid_SetColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultColSize", (PyCFunction) _wrap_wxGrid_SetDefaultColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowSize", (PyCFunction) _wrap_wxGrid_SetRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultRowSize", (PyCFunction) _wrap_wxGrid_SetDefaultRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellAlignment", (PyCFunction) _wrap_wxGrid_GetCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellAlignment", (PyCFunction) _wrap_wxGrid_GetDefaultCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellFont", (PyCFunction) _wrap_wxGrid_GetCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellFont", (PyCFunction) _wrap_wxGrid_GetDefaultCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellTextColour", (PyCFunction) _wrap_wxGrid_GetCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellTextColour", (PyCFunction) _wrap_wxGrid_GetDefaultCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellBackgroundColour", (PyCFunction) _wrap_wxGrid_GetCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellBackgroundColour", (PyCFunction) _wrap_wxGrid_GetDefaultCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColSize", (PyCFunction) _wrap_wxGrid_GetColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultColSize", (PyCFunction) _wrap_wxGrid_GetDefaultColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowSize", (PyCFunction) _wrap_wxGrid_GetRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRowSize", (PyCFunction) _wrap_wxGrid_GetDefaultRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GridLinesEnabled", (PyCFunction) _wrap_wxGrid_GridLinesEnabled, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableGridLines", (PyCFunction) _wrap_wxGrid_EnableGridLines, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatCustom", (PyCFunction) _wrap_wxGrid_SetColFormatCustom, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatFloat", (PyCFunction) _wrap_wxGrid_SetColFormatFloat, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatNumber", (PyCFunction) _wrap_wxGrid_SetColFormatNumber, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatBool", (PyCFunction) _wrap_wxGrid_SetColFormatBool, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColAttr", (PyCFunction) _wrap_wxGrid_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowAttr", (PyCFunction) _wrap_wxGrid_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanDragGridSize", (PyCFunction) _wrap_wxGrid_CanDragGridSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableDragGridSize", (PyCFunction) _wrap_wxGrid_DisableDragGridSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableDragGridSize", (PyCFunction) _wrap_wxGrid_EnableDragGridSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanDragColSize", (PyCFunction) _wrap_wxGrid_CanDragColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableDragColSize", (PyCFunction) _wrap_wxGrid_DisableDragColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableDragColSize", (PyCFunction) _wrap_wxGrid_EnableDragColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanDragRowSize", (PyCFunction) _wrap_wxGrid_CanDragRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableDragRowSize", (PyCFunction) _wrap_wxGrid_DisableDragRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableDragRowSize", (PyCFunction) _wrap_wxGrid_EnableDragRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellHighlightColour", (PyCFunction) _wrap_wxGrid_SetCellHighlightColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetGridLineColour", (PyCFunction) _wrap_wxGrid_SetGridLineColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColLabelValue", (PyCFunction) _wrap_wxGrid_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowLabelValue", (PyCFunction) _wrap_wxGrid_SetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColLabelAlignment", (PyCFunction) _wrap_wxGrid_SetColLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowLabelAlignment", (PyCFunction) _wrap_wxGrid_SetRowLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetLabelFont", (PyCFunction) _wrap_wxGrid_SetLabelFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetLabelTextColour", (PyCFunction) _wrap_wxGrid_SetLabelTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetLabelBackgroundColour", (PyCFunction) _wrap_wxGrid_SetLabelBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColLabelSize", (PyCFunction) _wrap_wxGrid_SetColLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowLabelSize", (PyCFunction) _wrap_wxGrid_SetRowLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellHighlightColour", (PyCFunction) _wrap_wxGrid_GetCellHighlightColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridLineColour", (PyCFunction) _wrap_wxGrid_GetGridLineColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColLabelValue", (PyCFunction) _wrap_wxGrid_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowLabelValue", (PyCFunction) _wrap_wxGrid_GetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColLabelAlignment", (PyCFunction) _wrap_wxGrid_GetColLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowLabelAlignment", (PyCFunction) _wrap_wxGrid_GetRowLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetLabelFont", (PyCFunction) _wrap_wxGrid_GetLabelFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetLabelTextColour", (PyCFunction) _wrap_wxGrid_GetLabelTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetLabelBackgroundColour", (PyCFunction) _wrap_wxGrid_GetLabelBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColLabelSize", (PyCFunction) _wrap_wxGrid_GetColLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultColLabelSize", (PyCFunction) _wrap_wxGrid_GetDefaultColLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowLabelSize", (PyCFunction) _wrap_wxGrid_GetRowLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRowLabelSize", (PyCFunction) _wrap_wxGrid_GetDefaultRowLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorRightBlock", (PyCFunction) _wrap_wxGrid_MoveCursorRightBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorLeftBlock", (PyCFunction) _wrap_wxGrid_MoveCursorLeftBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorDownBlock", (PyCFunction) _wrap_wxGrid_MoveCursorDownBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorUpBlock", (PyCFunction) _wrap_wxGrid_MoveCursorUpBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MovePageUp", (PyCFunction) _wrap_wxGrid_MovePageUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MovePageDown", (PyCFunction) _wrap_wxGrid_MovePageDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorRight", (PyCFunction) _wrap_wxGrid_MoveCursorRight, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorLeft", (PyCFunction) _wrap_wxGrid_MoveCursorLeft, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorDown", (PyCFunction) _wrap_wxGrid_MoveCursorDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorUp", (PyCFunction) _wrap_wxGrid_MoveCursorUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetGridCursor", (PyCFunction) _wrap_wxGrid_SetGridCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MakeCellVisible", (PyCFunction) _wrap_wxGrid_MakeCellVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsVisible", (PyCFunction) _wrap_wxGrid_IsVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridCursorCol", (PyCFunction) _wrap_wxGrid_GetGridCursorCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridCursorRow", (PyCFunction) _wrap_wxGrid_GetGridCursorRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CellToRect", (PyCFunction) _wrap_wxGrid_CellToRect, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_XToEdgeOfCol", (PyCFunction) _wrap_wxGrid_XToEdgeOfCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_YToEdgeOfRow", (PyCFunction) _wrap_wxGrid_YToEdgeOfRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_XToCol", (PyCFunction) _wrap_wxGrid_XToCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_YToRow", (PyCFunction) _wrap_wxGrid_YToRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_XYToCell", (PyCFunction) _wrap_wxGrid_XYToCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SaveEditControlValue", (PyCFunction) _wrap_wxGrid_SaveEditControlValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_HideCellEditControl", (PyCFunction) _wrap_wxGrid_HideCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ShowCellEditControl", (PyCFunction) _wrap_wxGrid_ShowCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsCurrentCellReadOnly", (PyCFunction) _wrap_wxGrid_IsCurrentCellReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsCellEditControlShown", (PyCFunction) _wrap_wxGrid_IsCellEditControlShown, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsCellEditControlEnabled", (PyCFunction) _wrap_wxGrid_IsCellEditControlEnabled, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanEnableCellControl", (PyCFunction) _wrap_wxGrid_CanEnableCellControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableCellEditControl", (PyCFunction) _wrap_wxGrid_DisableCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableCellEditControl", (PyCFunction) _wrap_wxGrid_EnableCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableEditing", (PyCFunction) _wrap_wxGrid_EnableEditing, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsEditable", (PyCFunction) _wrap_wxGrid_IsEditable, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetBatchCount", (PyCFunction) _wrap_wxGrid_GetBatchCount, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EndBatch", (PyCFunction) _wrap_wxGrid_EndBatch, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_BeginBatch", (PyCFunction) _wrap_wxGrid_BeginBatch, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetTextBoxSize", (PyCFunction) _wrap_wxGrid_GetTextBoxSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_StringToLines", (PyCFunction) _wrap_wxGrid_StringToLines, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DrawTextRectangle", (PyCFunction) _wrap_wxGrid_DrawTextRectangle, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DrawCellHighlight", (PyCFunction) _wrap_wxGrid_DrawCellHighlight, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DeleteCols", (PyCFunction) _wrap_wxGrid_DeleteCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AppendCols", (PyCFunction) _wrap_wxGrid_AppendCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_InsertCols", (PyCFunction) _wrap_wxGrid_InsertCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DeleteRows", (PyCFunction) _wrap_wxGrid_DeleteRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AppendRows", (PyCFunction) _wrap_wxGrid_AppendRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_InsertRows", (PyCFunction) _wrap_wxGrid_InsertRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ClearGrid", (PyCFunction) _wrap_wxGrid_ClearGrid, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetTable", (PyCFunction) _wrap_wxGrid_SetTable, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetTable", (PyCFunction) _wrap_wxGrid_GetTable, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ProcessTableMessage", (PyCFunction) _wrap_wxGrid_ProcessTableMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetNumberCols", (PyCFunction) _wrap_wxGrid_GetNumberCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetNumberRows", (PyCFunction) _wrap_wxGrid_GetNumberRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetSelectionMode", (PyCFunction) _wrap_wxGrid_SetSelectionMode, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CreateGrid", (PyCFunction) _wrap_wxGrid_CreateGrid, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGrid", (PyCFunction) _wrap_new_wxGrid, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords___cmp__", (PyCFunction) _wrap_wxGridCellCoords___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_asTuple", (PyCFunction) _wrap_wxGridCellCoords_asTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_Set", (PyCFunction) _wrap_wxGridCellCoords_Set, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_SetCol", (PyCFunction) _wrap_wxGridCellCoords_SetCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_GetCol", (PyCFunction) _wrap_wxGridCellCoords_GetCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_SetRow", (PyCFunction) _wrap_wxGridCellCoords_SetRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_GetRow", (PyCFunction) _wrap_wxGridCellCoords_GetRow, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxGridCellCoords", (PyCFunction) _wrap_delete_wxGridCellCoords, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellCoords", (PyCFunction) _wrap_new_wxGridCellCoords, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetCommandInt2", (PyCFunction) _wrap_wxGridTableMessage_GetCommandInt2, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetCommandInt2", (PyCFunction) _wrap_wxGridTableMessage_SetCommandInt2, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetCommandInt", (PyCFunction) _wrap_wxGridTableMessage_GetCommandInt, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetCommandInt", (PyCFunction) _wrap_wxGridTableMessage_SetCommandInt, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetId", (PyCFunction) _wrap_wxGridTableMessage_GetId, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetId", (PyCFunction) _wrap_wxGridTableMessage_SetId, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetTableObject", (PyCFunction) _wrap_wxGridTableMessage_GetTableObject, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetTableObject", (PyCFunction) _wrap_wxGridTableMessage_SetTableObject, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxGridTableMessage", (PyCFunction) _wrap_delete_wxGridTableMessage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridTableMessage", (PyCFunction) _wrap_new_wxGridTableMessage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridStringTable", (PyCFunction) _wrap_new_wxGridStringTable, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetColAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetRowAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_CanHaveAttributes", (PyCFunction) _wrap_wxPyGridTableBase_base_CanHaveAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetColLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetRowLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_SetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetColLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetRowLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_GetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_DeleteCols", (PyCFunction) _wrap_wxPyGridTableBase_base_DeleteCols, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_AppendCols", (PyCFunction) _wrap_wxPyGridTableBase_base_AppendCols, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_InsertCols", (PyCFunction) _wrap_wxPyGridTableBase_base_InsertCols, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_DeleteRows", (PyCFunction) _wrap_wxPyGridTableBase_base_DeleteRows, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_AppendRows", (PyCFunction) _wrap_wxPyGridTableBase_base_AppendRows, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_InsertRows", (PyCFunction) _wrap_wxPyGridTableBase_base_InsertRows, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_Clear", (PyCFunction) _wrap_wxPyGridTableBase_base_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_CanSetValueAs", (PyCFunction) _wrap_wxPyGridTableBase_base_CanSetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_CanGetValueAs", (PyCFunction) _wrap_wxPyGridTableBase_base_CanGetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetTypeName", (PyCFunction) _wrap_wxPyGridTableBase_base_GetTypeName, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_Destroy", (PyCFunction) _wrap_wxPyGridTableBase_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase__setSelf", (PyCFunction) _wrap_wxPyGridTableBase__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridTableBase", (PyCFunction) _wrap_new_wxPyGridTableBase, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetColAttr", (PyCFunction) _wrap_wxGridTableBase_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetRowAttr", (PyCFunction) _wrap_wxGridTableBase_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetAttr", (PyCFunction) _wrap_wxGridTableBase_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetAttr", (PyCFunction) _wrap_wxGridTableBase_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_CanHaveAttributes", (PyCFunction) _wrap_wxGridTableBase_CanHaveAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetColLabelValue", (PyCFunction) _wrap_wxGridTableBase_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetRowLabelValue", (PyCFunction) _wrap_wxGridTableBase_SetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetColLabelValue", (PyCFunction) _wrap_wxGridTableBase_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetRowLabelValue", (PyCFunction) _wrap_wxGridTableBase_GetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_DeleteCols", (PyCFunction) _wrap_wxGridTableBase_DeleteCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_AppendCols", (PyCFunction) _wrap_wxGridTableBase_AppendCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_InsertCols", (PyCFunction) _wrap_wxGridTableBase_InsertCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_DeleteRows", (PyCFunction) _wrap_wxGridTableBase_DeleteRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_AppendRows", (PyCFunction) _wrap_wxGridTableBase_AppendRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_InsertRows", (PyCFunction) _wrap_wxGridTableBase_InsertRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_Clear", (PyCFunction) _wrap_wxGridTableBase_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValueAsBool", (PyCFunction) _wrap_wxGridTableBase_SetValueAsBool, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValueAsDouble", (PyCFunction) _wrap_wxGridTableBase_SetValueAsDouble, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValueAsLong", (PyCFunction) _wrap_wxGridTableBase_SetValueAsLong, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValueAsBool", (PyCFunction) _wrap_wxGridTableBase_GetValueAsBool, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValueAsDouble", (PyCFunction) _wrap_wxGridTableBase_GetValueAsDouble, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValueAsLong", (PyCFunction) _wrap_wxGridTableBase_GetValueAsLong, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_CanSetValueAs", (PyCFunction) _wrap_wxGridTableBase_CanSetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_CanGetValueAs", (PyCFunction) _wrap_wxGridTableBase_CanGetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetTypeName", (PyCFunction) _wrap_wxGridTableBase_GetTypeName, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValue", (PyCFunction) _wrap_wxGridTableBase_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValue", (PyCFunction) _wrap_wxGridTableBase_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_IsEmptyCell", (PyCFunction) _wrap_wxGridTableBase_IsEmptyCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetNumberCols", (PyCFunction) _wrap_wxGridTableBase_GetNumberCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetNumberRows", (PyCFunction) _wrap_wxGridTableBase_GetNumberRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetView", (PyCFunction) _wrap_wxGridTableBase_GetView, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetView", (PyCFunction) _wrap_wxGridTableBase_SetView, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetAttrProvider", (PyCFunction) _wrap_wxGridTableBase_GetAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetAttrProvider", (PyCFunction) _wrap_wxGridTableBase_SetAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_SetColAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_SetRowAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_SetAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_GetAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider__setSelf", (PyCFunction) _wrap_wxPyGridCellAttrProvider__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridCellAttrProvider", (PyCFunction) _wrap_new_wxPyGridCellAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_UpdateAttrCols", (PyCFunction) _wrap_wxGridCellAttrProvider_UpdateAttrCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_UpdateAttrRows", (PyCFunction) _wrap_wxGridCellAttrProvider_UpdateAttrRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_SetColAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_SetRowAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_SetAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_GetAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellAttrProvider", (PyCFunction) _wrap_new_wxGridCellAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetDefAttr", (PyCFunction) _wrap_wxGridCellAttr_SetDefAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_IsReadOnly", (PyCFunction) _wrap_wxGridCellAttr_IsReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetEditor", (PyCFunction) _wrap_wxGridCellAttr_GetEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetRenderer", (PyCFunction) _wrap_wxGridCellAttr_GetRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetAlignment", (PyCFunction) _wrap_wxGridCellAttr_GetAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetFont", (PyCFunction) _wrap_wxGridCellAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetTextColour", (PyCFunction) _wrap_wxGridCellAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasEditor", (PyCFunction) _wrap_wxGridCellAttr_HasEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasRenderer", (PyCFunction) _wrap_wxGridCellAttr_HasRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasAlignment", (PyCFunction) _wrap_wxGridCellAttr_HasAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasFont", (PyCFunction) _wrap_wxGridCellAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasTextColour", (PyCFunction) _wrap_wxGridCellAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetEditor", (PyCFunction) _wrap_wxGridCellAttr_SetEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetRenderer", (PyCFunction) _wrap_wxGridCellAttr_SetRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetReadOnly", (PyCFunction) _wrap_wxGridCellAttr_SetReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetAlignment", (PyCFunction) _wrap_wxGridCellAttr_SetAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetFont", (PyCFunction) _wrap_wxGridCellAttr_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetTextColour", (PyCFunction) _wrap_wxGridCellAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_DecRef", (PyCFunction) _wrap_wxGridCellAttr_DecRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_IncRef", (PyCFunction) _wrap_wxGridCellAttr_IncRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_Clone", (PyCFunction) _wrap_wxGridCellAttr_Clone, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellAttr", (PyCFunction) _wrap_new_wxGridCellAttr, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellChoiceEditor", (PyCFunction) _wrap_new_wxGridCellChoiceEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellBoolEditor", (PyCFunction) _wrap_new_wxGridCellBoolEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellFloatEditor", (PyCFunction) _wrap_new_wxGridCellFloatEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellNumberEditor", (PyCFunction) _wrap_new_wxGridCellNumberEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellTextEditor", (PyCFunction) _wrap_new_wxGridCellTextEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_SetParameters", (PyCFunction) _wrap_wxPyGridCellEditor_base_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_Destroy", (PyCFunction) _wrap_wxPyGridCellEditor_base_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_HandleReturn", (PyCFunction) _wrap_wxPyGridCellEditor_base_HandleReturn, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_StartingClick", (PyCFunction) _wrap_wxPyGridCellEditor_base_StartingClick, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_StartingKey", (PyCFunction) _wrap_wxPyGridCellEditor_base_StartingKey, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_IsAcceptedKey", (PyCFunction) _wrap_wxPyGridCellEditor_base_IsAcceptedKey, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_PaintBackground", (PyCFunction) _wrap_wxPyGridCellEditor_base_PaintBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_Show", (PyCFunction) _wrap_wxPyGridCellEditor_base_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_SetSize", (PyCFunction) _wrap_wxPyGridCellEditor_base_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor__setSelf", (PyCFunction) _wrap_wxPyGridCellEditor__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridCellEditor", (PyCFunction) _wrap_new_wxPyGridCellEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Destroy", (PyCFunction) _wrap_wxGridCellEditor_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_HandleReturn", (PyCFunction) _wrap_wxGridCellEditor_HandleReturn, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_StartingClick", (PyCFunction) _wrap_wxGridCellEditor_StartingClick, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_StartingKey", (PyCFunction) _wrap_wxGridCellEditor_StartingKey, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_IsAcceptedKey", (PyCFunction) _wrap_wxGridCellEditor_IsAcceptedKey, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_PaintBackground", (PyCFunction) _wrap_wxGridCellEditor_PaintBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Show", (PyCFunction) _wrap_wxGridCellEditor_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_SetSize", (PyCFunction) _wrap_wxGridCellEditor_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Clone", (PyCFunction) _wrap_wxGridCellEditor_Clone, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Reset", (PyCFunction) _wrap_wxGridCellEditor_Reset, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_EndEdit", (PyCFunction) _wrap_wxGridCellEditor_EndEdit, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_BeginEdit", (PyCFunction) _wrap_wxGridCellEditor_BeginEdit, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Create", (PyCFunction) _wrap_wxGridCellEditor_Create, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_DecRef", (PyCFunction) _wrap_wxGridCellEditor_DecRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_IncRef", (PyCFunction) _wrap_wxGridCellEditor_IncRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_SetParameters", (PyCFunction) _wrap_wxGridCellEditor_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_SetControl", (PyCFunction) _wrap_wxGridCellEditor_SetControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_GetControl", (PyCFunction) _wrap_wxGridCellEditor_GetControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_IsCreated", (PyCFunction) _wrap_wxGridCellEditor_IsCreated, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellBoolRenderer", (PyCFunction) _wrap_new_wxGridCellBoolRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_SetPrecision", (PyCFunction) _wrap_wxGridCellFloatRenderer_SetPrecision, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_GetPrecision", (PyCFunction) _wrap_wxGridCellFloatRenderer_GetPrecision, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_SetWidth", (PyCFunction) _wrap_wxGridCellFloatRenderer_SetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_GetWidth", (PyCFunction) _wrap_wxGridCellFloatRenderer_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellFloatRenderer", (PyCFunction) _wrap_new_wxGridCellFloatRenderer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellNumberRenderer", (PyCFunction) _wrap_new_wxGridCellNumberRenderer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellStringRenderer", (PyCFunction) _wrap_new_wxGridCellStringRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellRenderer_base_SetParameters", (PyCFunction) _wrap_wxPyGridCellRenderer_base_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellRenderer__setSelf", (PyCFunction) _wrap_wxPyGridCellRenderer__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridCellRenderer", (PyCFunction) _wrap_new_wxPyGridCellRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_Clone", (PyCFunction) _wrap_wxGridCellRenderer_Clone, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_GetBestSize", (PyCFunction) _wrap_wxGridCellRenderer_GetBestSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_Draw", (PyCFunction) _wrap_wxGridCellRenderer_Draw, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_DecRef", (PyCFunction) _wrap_wxGridCellRenderer_DecRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_IncRef", (PyCFunction) _wrap_wxGridCellRenderer_IncRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_SetParameters", (PyCFunction) _wrap_wxGridCellRenderer_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_wxEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_wxEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_wxEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_signed_long","_long",0}, + { "_class_wxGridCellRenderer","_class_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_wxPrintQuality","_WXGRIDSELECTIONMODES",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler}, + { "_class_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler}, + { "_wxNotifyEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_WXGRIDSELECTIONMODES",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_wxPanel","_class_wxGrid",SwigwxGridTowxPanel}, + { "_wxPanel","_wxGrid",SwigwxGridTowxPanel}, + { "_uint","_WXGRIDSELECTIONMODES",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_class_wxEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_class_wxEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_class_wxEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_class_wxEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_class_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_class_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_wxCommandEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_wxCommandEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_wxCommandEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_wxCommandEvent","_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_char","_wxChar",0}, + { "_wxGridCellStringRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_wxGridCellStringRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_wxGridCellStringRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_wxGridCellStringRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_class_wxNotifyEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_class_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_wxGridTableBase","_class_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_wxGridTableBase","_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_wxGridTableBase","_class_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_wxGridTableBase","_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_EBool","_WXGRIDSELECTIONMODES",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_class_wxGridCellTextEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_class_wxGridCellTextEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_class_wxGridCellTextEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_class_wxGridCellTextEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_unsigned_long","_long",0}, + { "_WXGRIDSELECTIONMODES","_int",0}, + { "_WXGRIDSELECTIONMODES","_signed_int",0}, + { "_WXGRIDSELECTIONMODES","_unsigned_int",0}, + { "_WXGRIDSELECTIONMODES","_wxWindowID",0}, + { "_WXGRIDSELECTIONMODES","_uint",0}, + { "_WXGRIDSELECTIONMODES","_EBool",0}, + { "_WXGRIDSELECTIONMODES","_size_t",0}, + { "_WXGRIDSELECTIONMODES","_time_t",0}, + { "_WXGRIDSELECTIONMODES","_wxPrintQuality",0}, + { "_WXGRIDSELECTIONMODES","_wxCoord",0}, + { "_class_wxGridCellStringRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_class_wxGridCellStringRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_class_wxGridCellStringRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_class_wxGridCellStringRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_class_wxPanel","_class_wxGrid",SwigwxGridTowxPanel}, + { "_class_wxPanel","_wxGrid",SwigwxGridTowxPanel}, + { "_signed_int","_WXGRIDSELECTIONMODES",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_wxGridCellEditor","_class_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_wxGridCellAttrProvider","_class_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_wxGridCellAttrProvider","_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_class_wxGridTableBase","_class_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_class_wxGridTableBase","_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_class_wxGridTableBase","_class_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_class_wxGridTableBase","_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxGrid",SwigwxGridTowxWindow}, + { "_class_wxWindow","_wxGrid",SwigwxGridTowxWindow}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxScrolledWindow","_class_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_wxScrolledWindow","_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_WXGRIDSELECTIONMODES",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_WXGRIDSELECTIONMODES",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_WXGRIDSELECTIONMODES",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_time_t","_WXGRIDSELECTIONMODES",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxGridCellEditor","_class_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_class_wxGridCellAttrProvider","_class_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_class_wxGridCellAttrProvider","_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_wxCoord","_WXGRIDSELECTIONMODES",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxGridCellRenderer","_class_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_wxGridCellTextEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_wxGridCellTextEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_wxGridCellTextEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_wxGridCellTextEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_class_wxCommandEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler}, + { "_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler}, + { "_class_wxScrolledWindow","_class_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_class_wxScrolledWindow","_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_wxWindow","_class_wxGrid",SwigwxGridTowxWindow}, + { "_wxWindow","_wxGrid",SwigwxGridTowxWindow}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initgridc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("gridc", gridcMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxGRID_VALUE_STRING", PyString_FromString("string")); + PyDict_SetItemString(d,"wxGRID_VALUE_BOOL", PyString_FromString("bool")); + PyDict_SetItemString(d,"wxGRID_VALUE_NUMBER", PyString_FromString("long")); + PyDict_SetItemString(d,"wxGRID_VALUE_FLOAT", PyString_FromString("double")); + PyDict_SetItemString(d,"wxGRID_VALUE_CHOICE", PyString_FromString("choice")); + PyDict_SetItemString(d,"wxGRID_VALUE_TEXT", PyString_FromString("string")); + PyDict_SetItemString(d,"wxGRID_VALUE_LONG", PyString_FromString("long")); + PyDict_SetItemString(d,"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,"wxGridNoCellCoords",_wrap_wxGridNoCellCoords_get, _wrap_wxGridNoCellCoords_set); + SWIG_addvarlink(SWIG_globals,"wxGridNoCellRect",_wrap_wxGridNoCellRect_get, _wrap_wxGridNoCellRect_set); + PyDict_SetItemString(d,"wxGRIDTABLE_REQUEST_VIEW_GET_VALUES", PyInt_FromLong((long) wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)); + PyDict_SetItemString(d,"wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES", PyInt_FromLong((long) wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_ROWS_INSERTED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_ROWS_INSERTED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_ROWS_APPENDED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_ROWS_APPENDED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_ROWS_DELETED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_ROWS_DELETED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_COLS_INSERTED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_COLS_INSERTED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_COLS_APPENDED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_COLS_APPENDED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_COLS_DELETED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_COLS_DELETED)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_LEFT_CLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_LEFT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_RIGHT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_LEFT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_RIGHT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_LEFT_CLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_LEFT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_RIGHT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_LEFT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_RIGHT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_ROW_SIZE", PyInt_FromLong((long) wxEVT_GRID_ROW_SIZE)); + PyDict_SetItemString(d,"wxEVT_GRID_COL_SIZE", PyInt_FromLong((long) wxEVT_GRID_COL_SIZE)); + PyDict_SetItemString(d,"wxEVT_GRID_RANGE_SELECT", PyInt_FromLong((long) wxEVT_GRID_RANGE_SELECT)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_CHANGE", PyInt_FromLong((long) wxEVT_GRID_CELL_CHANGE)); + PyDict_SetItemString(d,"wxEVT_GRID_SELECT_CELL", PyInt_FromLong((long) wxEVT_GRID_SELECT_CELL)); + PyDict_SetItemString(d,"wxEVT_GRID_EDITOR_SHOWN", PyInt_FromLong((long) wxEVT_GRID_EDITOR_SHOWN)); + PyDict_SetItemString(d,"wxEVT_GRID_EDITOR_HIDDEN", PyInt_FromLong((long) wxEVT_GRID_EDITOR_HIDDEN)); + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + PyDict_SetItemString(d,"wxGrid_wxGridSelectCells", PyInt_FromLong((long) wxGrid::wxGridSelectCells)); + PyDict_SetItemString(d,"wxGrid_wxGridSelectRows", PyInt_FromLong((long) wxGrid::wxGridSelectRows)); + PyDict_SetItemString(d,"wxGrid_wxGridSelectColumns", PyInt_FromLong((long) wxGrid::wxGridSelectColumns)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py new file mode 100644 index 0000000000..2ae95724da --- /dev/null +++ b/wxPython/src/gtk/grid.py @@ -0,0 +1,1512 @@ +# This file was created automatically by SWIG. +import gridc + +from misc import * + +from gdi import * + +from windows import * + +from clip_dnd import * + +from controls import * + +from events import * +import wx + +def EVT_GRID_CELL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_CLICK, fn) + +def EVT_GRID_CELL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_CLICK, fn) + +def EVT_GRID_CELL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_DCLICK, fn) + +def EVT_GRID_CELL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_DCLICK, fn) + +def EVT_GRID_LABEL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_CLICK, fn) + +def EVT_GRID_LABEL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_CLICK, fn) + +def EVT_GRID_LABEL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_DCLICK, fn) + +def EVT_GRID_LABEL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_DCLICK, fn) + +def EVT_GRID_ROW_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_ROW_SIZE, fn) + +def EVT_GRID_COL_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_COL_SIZE, fn) + +def EVT_GRID_RANGE_SELECT(win, fn): + win.Connect(-1, -1, wxEVT_GRID_RANGE_SELECT, fn) + +def EVT_GRID_CELL_CHANGE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) + +def EVT_GRID_SELECT_CELL(win, fn): + win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) + +def EVT_GRID_EDITOR_SHOWN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_SHOWN, fn) + +def EVT_GRID_EDITOR_HIDDEN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_HIDDEN, fn) + + +class wxGridCellRendererPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_SetParameters,(self,) + _args, _kwargs) + return val + def IncRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_IncRef,(self,) + _args, _kwargs) + return val + def DecRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_DecRef,(self,) + _args, _kwargs) + return val + def Draw(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_Draw,(self,) + _args, _kwargs) + return val + def GetBestSize(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_GetBestSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def Clone(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_Clone,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellRenderer(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + + + + +class wxPyGridCellRendererPtr(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellRenderer__setSelf,(self,) + _args, _kwargs) + return val + def base_SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellRenderer_base_SetParameters,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridCellRenderer(wxPyGridCellRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridCellRenderer,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridCellRenderer) + + + + +class wxGridCellStringRendererPtr(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellStringRenderer(wxGridCellStringRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellStringRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellNumberRendererPtr(wxGridCellStringRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellNumberRenderer(wxGridCellNumberRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellNumberRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellFloatRendererPtr(wxGridCellStringRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_GetWidth,(self,) + _args, _kwargs) + return val + def SetWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_SetWidth,(self,) + _args, _kwargs) + return val + def GetPrecision(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_GetPrecision,(self,) + _args, _kwargs) + return val + def SetPrecision(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_SetPrecision,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellFloatRenderer(wxGridCellFloatRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellFloatRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellBoolRendererPtr(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellBoolRenderer(wxGridCellBoolRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellBoolRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellEditorPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def IsCreated(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_IsCreated,(self,) + _args, _kwargs) + return val + def GetControl(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_GetControl,(self,) + _args, _kwargs) + if val: val = wxControlPtr(val) + return val + def SetControl(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs) + return val + def SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetParameters,(self,) + _args, _kwargs) + return val + def IncRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_IncRef,(self,) + _args, _kwargs) + return val + def DecRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_DecRef,(self,) + _args, _kwargs) + return val + def Create(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Create,(self,) + _args, _kwargs) + return val + def BeginEdit(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_BeginEdit,(self,) + _args, _kwargs) + return val + def EndEdit(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_EndEdit,(self,) + _args, _kwargs) + return val + def Reset(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Reset,(self,) + _args, _kwargs) + return val + def Clone(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Clone,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def SetSize(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetSize,(self,) + _args, _kwargs) + return val + def Show(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Show,(self,) + _args, _kwargs) + return val + def PaintBackground(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_PaintBackground,(self,) + _args, _kwargs) + return val + def IsAcceptedKey(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_IsAcceptedKey,(self,) + _args, _kwargs) + return val + def StartingKey(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_StartingKey,(self,) + _args, _kwargs) + return val + def StartingClick(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_StartingClick,(self,) + _args, _kwargs) + return val + def HandleReturn(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_HandleReturn,(self,) + _args, _kwargs) + return val + def Destroy(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Destroy,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellEditor(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + + + + +class wxPyGridCellEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor__setSelf,(self,) + _args, _kwargs) + return val + def base_SetSize(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_SetSize,(self,) + _args, _kwargs) + return val + def base_Show(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_Show,(self,) + _args, _kwargs) + return val + def base_PaintBackground(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_PaintBackground,(self,) + _args, _kwargs) + return val + def base_IsAcceptedKey(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_IsAcceptedKey,(self,) + _args, _kwargs) + return val + def base_StartingKey(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_StartingKey,(self,) + _args, _kwargs) + return val + def base_StartingClick(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_StartingClick,(self,) + _args, _kwargs) + return val + def base_HandleReturn(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_HandleReturn,(self,) + _args, _kwargs) + return val + def base_Destroy(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_Destroy,(self,) + _args, _kwargs) + return val + def base_SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_SetParameters,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridCellEditor(wxPyGridCellEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridCellEditor,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridCellEditor) + + + + +class wxGridCellTextEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellTextEditor(wxGridCellTextEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellTextEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellNumberEditorPtr(wxGridCellTextEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellNumberEditor(wxGridCellNumberEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellNumberEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellFloatEditorPtr(wxGridCellTextEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellFloatEditor(wxGridCellFloatEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellFloatEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellBoolEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellBoolEditor(wxGridCellBoolEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellBoolEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellChoiceEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellChoiceEditor(wxGridCellChoiceEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellChoiceEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellAttrPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Clone(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_Clone,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def IncRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_IncRef,(self,) + _args, _kwargs) + return val + def DecRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_DecRef,(self,) + _args, _kwargs) + return val + def SetTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetFont,(self,) + _args, _kwargs) + return val + def SetAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetAlignment,(self,) + _args, _kwargs) + return val + def SetReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetReadOnly,(self,) + _args, _kwargs) + return val + def SetRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetRenderer,(self,) + _args, _kwargs) + return val + def SetEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetEditor,(self,) + _args, _kwargs) + return val + def HasTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasTextColour,(self,) + _args, _kwargs) + return val + def HasBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasBackgroundColour,(self,) + _args, _kwargs) + return val + def HasFont(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasFont,(self,) + _args, _kwargs) + return val + def HasAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasAlignment,(self,) + _args, _kwargs) + return val + def HasRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasRenderer,(self,) + _args, _kwargs) + return val + def HasEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasEditor,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetFont(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def GetAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetAlignment,(self,) + _args, _kwargs) + return val + def GetRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetRenderer,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def GetEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetEditor,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def IsReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_IsReadOnly,(self,) + _args, _kwargs) + return val + def SetDefAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetDefAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellAttr(wxGridCellAttrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellAttr,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellAttrProviderPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_SetAttr,(self,) + _args, _kwargs) + return val + def SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_SetRowAttr,(self,) + _args, _kwargs) + return val + def SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_SetColAttr,(self,) + _args, _kwargs) + return val + def UpdateAttrRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_UpdateAttrRows,(self,) + _args, _kwargs) + return val + def UpdateAttrCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_UpdateAttrCols,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellAttrProvider(wxGridCellAttrProviderPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellAttrProvider,_args,_kwargs) + self.thisown = 1 + + + + +class wxPyGridCellAttrProviderPtr(wxGridCellAttrProviderPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider__setSelf,(self,) + _args, _kwargs) + return val + def base_GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def base_SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_SetAttr,(self,) + _args, _kwargs) + return val + def base_SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_SetRowAttr,(self,) + _args, _kwargs) + return val + def base_SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_SetColAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridCellAttrProvider(wxPyGridCellAttrProviderPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridCellAttrProvider,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridCellAttrProvider) + + + + +class wxGridTableBasePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetAttrProvider(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetAttrProvider,(self,) + _args, _kwargs) + return val + def GetAttrProvider(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetAttrProvider,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrProviderPtr(val) + return val + def SetView(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetView,(self,) + _args, _kwargs) + return val + def GetView(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetView,(self,) + _args, _kwargs) + if val: val = wxGridPtr(val) + return val + def GetNumberRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetNumberRows,(self,) + _args, _kwargs) + return val + def GetNumberCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetNumberCols,(self,) + _args, _kwargs) + return val + def IsEmptyCell(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_IsEmptyCell,(self,) + _args, _kwargs) + return val + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValue,(self,) + _args, _kwargs) + return val + def SetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValue,(self,) + _args, _kwargs) + return val + def GetTypeName(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetTypeName,(self,) + _args, _kwargs) + return val + def CanGetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_CanGetValueAs,(self,) + _args, _kwargs) + return val + def CanSetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_CanSetValueAs,(self,) + _args, _kwargs) + return val + def GetValueAsLong(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValueAsLong,(self,) + _args, _kwargs) + return val + def GetValueAsDouble(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValueAsDouble,(self,) + _args, _kwargs) + return val + def GetValueAsBool(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValueAsBool,(self,) + _args, _kwargs) + return val + def SetValueAsLong(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValueAsLong,(self,) + _args, _kwargs) + return val + def SetValueAsDouble(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValueAsDouble,(self,) + _args, _kwargs) + return val + def SetValueAsBool(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValueAsBool,(self,) + _args, _kwargs) + return val + def Clear(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_Clear,(self,) + _args, _kwargs) + return val + def InsertRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_InsertRows,(self,) + _args, _kwargs) + return val + def AppendRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_AppendRows,(self,) + _args, _kwargs) + return val + def DeleteRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_DeleteRows,(self,) + _args, _kwargs) + return val + def InsertCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_InsertCols,(self,) + _args, _kwargs) + return val + def AppendCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_AppendCols,(self,) + _args, _kwargs) + return val + def DeleteCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_DeleteCols,(self,) + _args, _kwargs) + return val + def GetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetRowLabelValue,(self,) + _args, _kwargs) + return val + def GetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetColLabelValue,(self,) + _args, _kwargs) + return val + def SetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetRowLabelValue,(self,) + _args, _kwargs) + return val + def SetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetColLabelValue,(self,) + _args, _kwargs) + return val + def CanHaveAttributes(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_CanHaveAttributes,(self,) + _args, _kwargs) + return val + def GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetAttr,(self,) + _args, _kwargs) + return val + def SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetRowAttr,(self,) + _args, _kwargs) + return val + def SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetColAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridTableBase(wxGridTableBasePtr): + def __init__(self,this): + self.this = this + + + + +class wxPyGridTableBasePtr(wxGridTableBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase__setSelf,(self,) + _args, _kwargs) + return val + def Destroy(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_Destroy,(self,) + _args, _kwargs) + return val + def base_GetTypeName(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetTypeName,(self,) + _args, _kwargs) + return val + def base_CanGetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_CanGetValueAs,(self,) + _args, _kwargs) + return val + def base_CanSetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_CanSetValueAs,(self,) + _args, _kwargs) + return val + def base_Clear(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_Clear,(self,) + _args, _kwargs) + return val + def base_InsertRows(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_InsertRows,(self,) + _args, _kwargs) + return val + def base_AppendRows(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_AppendRows,(self,) + _args, _kwargs) + return val + def base_DeleteRows(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_DeleteRows,(self,) + _args, _kwargs) + return val + def base_InsertCols(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_InsertCols,(self,) + _args, _kwargs) + return val + def base_AppendCols(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_AppendCols,(self,) + _args, _kwargs) + return val + def base_DeleteCols(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_DeleteCols,(self,) + _args, _kwargs) + return val + def base_GetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetRowLabelValue,(self,) + _args, _kwargs) + return val + def base_GetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetColLabelValue,(self,) + _args, _kwargs) + return val + def base_SetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetRowLabelValue,(self,) + _args, _kwargs) + return val + def base_SetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetColLabelValue,(self,) + _args, _kwargs) + return val + def base_CanHaveAttributes(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_CanHaveAttributes,(self,) + _args, _kwargs) + return val + def base_GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def base_SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetAttr,(self,) + _args, _kwargs) + return val + def base_SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetRowAttr,(self,) + _args, _kwargs) + return val + def base_SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetColAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridTableBase(wxPyGridTableBasePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridTableBase,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridTableBase) + + + + +class wxGridStringTablePtr(wxGridTableBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridStringTable(wxGridStringTablePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridStringTable,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridTableMessagePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gridc=gridc): + if self.thisown == 1 : + gridc.delete_wxGridTableMessage(self) + def SetTableObject(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetTableObject,(self,) + _args, _kwargs) + return val + def GetTableObject(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetTableObject,(self,) + _args, _kwargs) + if val: val = wxGridTableBasePtr(val) + return val + def SetId(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetId,(self,) + _args, _kwargs) + return val + def GetId(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetId,(self,) + _args, _kwargs) + return val + def SetCommandInt(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetCommandInt,(self,) + _args, _kwargs) + return val + def GetCommandInt(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetCommandInt,(self,) + _args, _kwargs) + return val + def SetCommandInt2(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetCommandInt2,(self,) + _args, _kwargs) + return val + def GetCommandInt2(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetCommandInt2,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridTableMessage(wxGridTableMessagePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridTableMessage,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellCoordsPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gridc=gridc): + if self.thisown == 1 : + gridc.delete_wxGridCellCoords(self) + def GetRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_GetRow,(self,) + _args, _kwargs) + return val + def SetRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_SetRow,(self,) + _args, _kwargs) + return val + def GetCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_GetCol,(self,) + _args, _kwargs) + return val + def SetCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_SetCol,(self,) + _args, _kwargs) + return val + def Set(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_Set,(self,) + _args, _kwargs) + return val + def asTuple(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_asTuple,(self,) + _args, _kwargs) + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords___cmp__,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) +class wxGridCellCoords(wxGridCellCoordsPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellCoords,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridPtr(wxScrolledWindowPtr): + wxGridSelectCells = gridc.wxGrid_wxGridSelectCells + wxGridSelectRows = gridc.wxGrid_wxGridSelectRows + wxGridSelectColumns = gridc.wxGrid_wxGridSelectColumns + def __init__(self,this): + self.this = this + self.thisown = 0 + def CreateGrid(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CreateGrid,(self,) + _args, _kwargs) + return val + def SetSelectionMode(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetSelectionMode,(self,) + _args, _kwargs) + return val + def GetNumberRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetNumberRows,(self,) + _args, _kwargs) + return val + def GetNumberCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetNumberCols,(self,) + _args, _kwargs) + return val + def ProcessTableMessage(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ProcessTableMessage,(self,) + _args, _kwargs) + return val + def GetTable(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetTable,(self,) + _args, _kwargs) + if val: val = wxGridTableBasePtr(val) + return val + def SetTable(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetTable,(self,) + _args, _kwargs) + return val + def ClearGrid(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ClearGrid,(self,) + _args, _kwargs) + return val + def InsertRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_InsertRows,(self,) + _args, _kwargs) + return val + def AppendRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AppendRows,(self,) + _args, _kwargs) + return val + def DeleteRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeleteRows,(self,) + _args, _kwargs) + return val + def InsertCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_InsertCols,(self,) + _args, _kwargs) + return val + def AppendCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AppendCols,(self,) + _args, _kwargs) + return val + def DeleteCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeleteCols,(self,) + _args, _kwargs) + return val + def DrawCellHighlight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DrawCellHighlight,(self,) + _args, _kwargs) + return val + def DrawTextRectangle(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DrawTextRectangle,(self,) + _args, _kwargs) + return val + def StringToLines(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_StringToLines,(self,) + _args, _kwargs) + return val + def GetTextBoxSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetTextBoxSize,(self,) + _args, _kwargs) + return val + def BeginBatch(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_BeginBatch,(self,) + _args, _kwargs) + return val + def EndBatch(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EndBatch,(self,) + _args, _kwargs) + return val + def GetBatchCount(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetBatchCount,(self,) + _args, _kwargs) + return val + def IsEditable(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsEditable,(self,) + _args, _kwargs) + return val + def EnableEditing(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableEditing,(self,) + _args, _kwargs) + return val + def EnableCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableCellEditControl,(self,) + _args, _kwargs) + return val + def DisableCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableCellEditControl,(self,) + _args, _kwargs) + return val + def CanEnableCellControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanEnableCellControl,(self,) + _args, _kwargs) + return val + def IsCellEditControlEnabled(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsCellEditControlEnabled,(self,) + _args, _kwargs) + return val + def IsCellEditControlShown(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsCellEditControlShown,(self,) + _args, _kwargs) + return val + def IsCurrentCellReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsCurrentCellReadOnly,(self,) + _args, _kwargs) + return val + def ShowCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ShowCellEditControl,(self,) + _args, _kwargs) + return val + def HideCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_HideCellEditControl,(self,) + _args, _kwargs) + return val + def SaveEditControlValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SaveEditControlValue,(self,) + _args, _kwargs) + return val + def XYToCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_XYToCell,(self,) + _args, _kwargs) + if val: val = wxGridCellCoordsPtr(val) ; val.thisown = 1 + return val + def YToRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_YToRow,(self,) + _args, _kwargs) + return val + def XToCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_XToCol,(self,) + _args, _kwargs) + return val + def YToEdgeOfRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_YToEdgeOfRow,(self,) + _args, _kwargs) + return val + def XToEdgeOfCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_XToEdgeOfCol,(self,) + _args, _kwargs) + return val + def CellToRect(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CellToRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def GetGridCursorRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridCursorRow,(self,) + _args, _kwargs) + return val + def GetGridCursorCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridCursorCol,(self,) + _args, _kwargs) + return val + def IsVisible(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsVisible,(self,) + _args, _kwargs) + return val + def MakeCellVisible(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MakeCellVisible,(self,) + _args, _kwargs) + return val + def SetGridCursor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetGridCursor,(self,) + _args, _kwargs) + return val + def MoveCursorUp(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorUp,(self,) + _args, _kwargs) + return val + def MoveCursorDown(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorDown,(self,) + _args, _kwargs) + return val + def MoveCursorLeft(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorLeft,(self,) + _args, _kwargs) + return val + def MoveCursorRight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorRight,(self,) + _args, _kwargs) + return val + def MovePageDown(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MovePageDown,(self,) + _args, _kwargs) + return val + def MovePageUp(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MovePageUp,(self,) + _args, _kwargs) + return val + def MoveCursorUpBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorUpBlock,(self,) + _args, _kwargs) + return val + def MoveCursorDownBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorDownBlock,(self,) + _args, _kwargs) + return val + def MoveCursorLeftBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorLeftBlock,(self,) + _args, _kwargs) + return val + def MoveCursorRightBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorRightBlock,(self,) + _args, _kwargs) + return val + def GetDefaultRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRowLabelSize,(self,) + _args, _kwargs) + return val + def GetRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowLabelSize,(self,) + _args, _kwargs) + return val + def GetDefaultColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultColLabelSize,(self,) + _args, _kwargs) + return val + def GetColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelSize,(self,) + _args, _kwargs) + return val + def GetLabelBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetLabelBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetLabelTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetLabelTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetLabelFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetLabelFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val + def GetRowLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowLabelAlignment,(self,) + _args, _kwargs) + return val + def GetColLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelAlignment,(self,) + _args, _kwargs) + return val + def GetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowLabelValue,(self,) + _args, _kwargs) + return val + def GetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelValue,(self,) + _args, _kwargs) + return val + def GetGridLineColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridLineColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetCellHighlightColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellHighlightColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowLabelSize,(self,) + _args, _kwargs) + return val + def SetColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelSize,(self,) + _args, _kwargs) + return val + def SetLabelBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetLabelBackgroundColour,(self,) + _args, _kwargs) + return val + def SetLabelTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetLabelTextColour,(self,) + _args, _kwargs) + return val + def SetLabelFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetLabelFont,(self,) + _args, _kwargs) + return val + def SetRowLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowLabelAlignment,(self,) + _args, _kwargs) + return val + def SetColLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelAlignment,(self,) + _args, _kwargs) + return val + def SetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowLabelValue,(self,) + _args, _kwargs) + return val + def SetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelValue,(self,) + _args, _kwargs) + return val + def SetGridLineColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetGridLineColour,(self,) + _args, _kwargs) + return val + def SetCellHighlightColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellHighlightColour,(self,) + _args, _kwargs) + return val + def EnableDragRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableDragRowSize,(self,) + _args, _kwargs) + return val + def DisableDragRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableDragRowSize,(self,) + _args, _kwargs) + return val + def CanDragRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanDragRowSize,(self,) + _args, _kwargs) + return val + def EnableDragColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableDragColSize,(self,) + _args, _kwargs) + return val + def DisableDragColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableDragColSize,(self,) + _args, _kwargs) + return val + def CanDragColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanDragColSize,(self,) + _args, _kwargs) + return val + def EnableDragGridSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableDragGridSize,(self,) + _args, _kwargs) + return val + def DisableDragGridSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableDragGridSize,(self,) + _args, _kwargs) + return val + def CanDragGridSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanDragGridSize,(self,) + _args, _kwargs) + return val + def SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowAttr,(self,) + _args, _kwargs) + return val + def SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColAttr,(self,) + _args, _kwargs) + return val + def SetColFormatBool(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatBool,(self,) + _args, _kwargs) + return val + def SetColFormatNumber(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatNumber,(self,) + _args, _kwargs) + return val + def SetColFormatFloat(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatFloat,(self,) + _args, _kwargs) + return val + def SetColFormatCustom(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatCustom,(self,) + _args, _kwargs) + return val + def EnableGridLines(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableGridLines,(self,) + _args, _kwargs) + return val + def GridLinesEnabled(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GridLinesEnabled,(self,) + _args, _kwargs) + return val + def GetDefaultRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRowSize,(self,) + _args, _kwargs) + return val + def GetRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowSize,(self,) + _args, _kwargs) + return val + def GetDefaultColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultColSize,(self,) + _args, _kwargs) + return val + def GetColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColSize,(self,) + _args, _kwargs) + return val + def GetDefaultCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetDefaultCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetDefaultCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val + def GetCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val + def GetDefaultCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellAlignment,(self,) + _args, _kwargs) + return val + def GetCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellAlignment,(self,) + _args, _kwargs) + return val + def SetDefaultRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultRowSize,(self,) + _args, _kwargs) + return val + def SetRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowSize,(self,) + _args, _kwargs) + return val + def SetDefaultColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultColSize,(self,) + _args, _kwargs) + return val + def SetColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColSize,(self,) + _args, _kwargs) + return val + def AutoSizeColumn(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeColumn,(self,) + _args, _kwargs) + return val + def AutoSizeRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeRow,(self,) + _args, _kwargs) + return val + def AutoSizeColumns(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeColumns,(self,) + _args, _kwargs) + return val + def AutoSizeRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeRows,(self,) + _args, _kwargs) + return val + def AutoSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSize,(self,) + _args, _kwargs) + return val + def SetColMinimalWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColMinimalWidth,(self,) + _args, _kwargs) + return val + def SetRowMinimalHeight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowMinimalHeight,(self,) + _args, _kwargs) + return val + def SetDefaultCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellBackgroundColour,(self,) + _args, _kwargs) + return val + def SetCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellBackgroundColour,(self,) + _args, _kwargs) + return val + def SetDefaultCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellTextColour,(self,) + _args, _kwargs) + return val + def SetCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellTextColour,(self,) + _args, _kwargs) + return val + def SetDefaultCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellFont,(self,) + _args, _kwargs) + return val + def SetCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellFont,(self,) + _args, _kwargs) + return val + def SetDefaultCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellAlignment,(self,) + _args, _kwargs) + return val + def SetCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellAlignment,(self,) + _args, _kwargs) + return val + def SetDefaultRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultRenderer,(self,) + _args, _kwargs) + return val + def SetCellRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellRenderer,(self,) + _args, _kwargs) + return val + def GetDefaultRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRenderer,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def GetCellRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellRenderer,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def SetDefaultEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultEditor,(self,) + _args, _kwargs) + return val + def SetCellEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellEditor,(self,) + _args, _kwargs) + return val + def GetDefaultEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultEditor,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetCellEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellEditor,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetCellValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellValue,(self,) + _args, _kwargs) + return val + def SetCellValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellValue,(self,) + _args, _kwargs) + return val + def IsReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsReadOnly,(self,) + _args, _kwargs) + return val + def SetReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetReadOnly,(self,) + _args, _kwargs) + return val + def SelectRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectRow,(self,) + _args, _kwargs) + return val + def SelectCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectCol,(self,) + _args, _kwargs) + return val + def SelectBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectBlock,(self,) + _args, _kwargs) + return val + def SelectAll(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectAll,(self,) + _args, _kwargs) + return val + def IsSelection(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsSelection,(self,) + _args, _kwargs) + return val + def ClearSelection(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ClearSelection,(self,) + _args, _kwargs) + return val + def IsInSelection(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsInSelection,(self,) + _args, _kwargs) + return val + def BlockToDeviceRect(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_BlockToDeviceRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def GetSelectionBackground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionBackground,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetSelectionForeground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionForeground,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetSelectionBackground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetSelectionBackground,(self,) + _args, _kwargs) + return val + def SetSelectionForeground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetSelectionForeground,(self,) + _args, _kwargs) + return val + def RegisterDataType(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_RegisterDataType,(self,) + _args, _kwargs) + return val + def GetDefaultEditorForCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultEditorForCell,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetDefaultRendererForCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRendererForCell,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def GetDefaultEditorForType(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultEditorForType,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetDefaultRendererForType(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRendererForType,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def SetMargins(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetMargins,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGrid(wxGridPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGrid,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridEventPtr(wxNotifyEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_GetRow,(self,) + _args, _kwargs) + return val + def GetCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_GetCol,(self,) + _args, _kwargs) + return val + def GetPosition(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def Selecting(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_Selecting,(self,) + _args, _kwargs) + return val + def ControlDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_ControlDown,(self,) + _args, _kwargs) + return val + def MetaDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_MetaDown,(self,) + _args, _kwargs) + return val + def ShiftDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_ShiftDown,(self,) + _args, _kwargs) + return val + def AltDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_AltDown,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridEvent(wxGridEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridSizeEventPtr(wxNotifyEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetRowOrCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_GetRowOrCol,(self,) + _args, _kwargs) + return val + def GetPosition(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def ControlDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_ControlDown,(self,) + _args, _kwargs) + return val + def MetaDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_MetaDown,(self,) + _args, _kwargs) + return val + def ShiftDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_ShiftDown,(self,) + _args, _kwargs) + return val + def AltDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_AltDown,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridSizeEvent(wxGridSizeEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridSizeEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridRangeSelectEventPtr(wxNotifyEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetTopLeftCoords(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetTopLeftCoords,(self,) + _args, _kwargs) + if val: val = wxGridCellCoordsPtr(val) ; val.thisown = 1 + return val + def GetBottomRightCoords(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetBottomRightCoords,(self,) + _args, _kwargs) + if val: val = wxGridCellCoordsPtr(val) ; val.thisown = 1 + return val + def GetTopRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetTopRow,(self,) + _args, _kwargs) + return val + def GetBottomRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetBottomRow,(self,) + _args, _kwargs) + return val + def GetLeftCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetLeftCol,(self,) + _args, _kwargs) + return val + def GetRightCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetRightCol,(self,) + _args, _kwargs) + return val + def Selecting(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_Selecting,(self,) + _args, _kwargs) + return val + def ControlDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_ControlDown,(self,) + _args, _kwargs) + return val + def MetaDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_MetaDown,(self,) + _args, _kwargs) + return val + def ShiftDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_ShiftDown,(self,) + _args, _kwargs) + return val + def AltDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_AltDown,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridRangeSelectEvent(wxGridRangeSelectEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridRangeSelectEvent,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxGRID_VALUE_STRING = gridc.wxGRID_VALUE_STRING +wxGRID_VALUE_BOOL = gridc.wxGRID_VALUE_BOOL +wxGRID_VALUE_NUMBER = gridc.wxGRID_VALUE_NUMBER +wxGRID_VALUE_FLOAT = gridc.wxGRID_VALUE_FLOAT +wxGRID_VALUE_CHOICE = gridc.wxGRID_VALUE_CHOICE +wxGRID_VALUE_TEXT = gridc.wxGRID_VALUE_TEXT +wxGRID_VALUE_LONG = gridc.wxGRID_VALUE_LONG +cvar = gridc.cvar +wxGridNoCellCoords = wxGridCellCoordsPtr(gridc.cvar.wxGridNoCellCoords) +wxGridNoCellRect = wxRectPtr(gridc.cvar.wxGridNoCellRect) +wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = gridc.wxGRIDTABLE_REQUEST_VIEW_GET_VALUES +wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES = gridc.wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES +wxGRIDTABLE_NOTIFY_ROWS_INSERTED = gridc.wxGRIDTABLE_NOTIFY_ROWS_INSERTED +wxGRIDTABLE_NOTIFY_ROWS_APPENDED = gridc.wxGRIDTABLE_NOTIFY_ROWS_APPENDED +wxGRIDTABLE_NOTIFY_ROWS_DELETED = gridc.wxGRIDTABLE_NOTIFY_ROWS_DELETED +wxGRIDTABLE_NOTIFY_COLS_INSERTED = gridc.wxGRIDTABLE_NOTIFY_COLS_INSERTED +wxGRIDTABLE_NOTIFY_COLS_APPENDED = gridc.wxGRIDTABLE_NOTIFY_COLS_APPENDED +wxGRIDTABLE_NOTIFY_COLS_DELETED = gridc.wxGRIDTABLE_NOTIFY_COLS_DELETED +wxEVT_GRID_CELL_LEFT_CLICK = gridc.wxEVT_GRID_CELL_LEFT_CLICK +wxEVT_GRID_CELL_RIGHT_CLICK = gridc.wxEVT_GRID_CELL_RIGHT_CLICK +wxEVT_GRID_CELL_LEFT_DCLICK = gridc.wxEVT_GRID_CELL_LEFT_DCLICK +wxEVT_GRID_CELL_RIGHT_DCLICK = gridc.wxEVT_GRID_CELL_RIGHT_DCLICK +wxEVT_GRID_LABEL_LEFT_CLICK = gridc.wxEVT_GRID_LABEL_LEFT_CLICK +wxEVT_GRID_LABEL_RIGHT_CLICK = gridc.wxEVT_GRID_LABEL_RIGHT_CLICK +wxEVT_GRID_LABEL_LEFT_DCLICK = gridc.wxEVT_GRID_LABEL_LEFT_DCLICK +wxEVT_GRID_LABEL_RIGHT_DCLICK = gridc.wxEVT_GRID_LABEL_RIGHT_DCLICK +wxEVT_GRID_ROW_SIZE = gridc.wxEVT_GRID_ROW_SIZE +wxEVT_GRID_COL_SIZE = gridc.wxEVT_GRID_COL_SIZE +wxEVT_GRID_RANGE_SELECT = gridc.wxEVT_GRID_RANGE_SELECT +wxEVT_GRID_CELL_CHANGE = gridc.wxEVT_GRID_CELL_CHANGE +wxEVT_GRID_SELECT_CELL = gridc.wxEVT_GRID_SELECT_CELL +wxEVT_GRID_EDITOR_SHOWN = gridc.wxEVT_GRID_EDITOR_SHOWN +wxEVT_GRID_EDITOR_HIDDEN = gridc.wxEVT_GRID_EDITOR_HIDDEN + + +#-------------- USER INCLUDE ----------------------- + + + +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxGridEventPtr = wxGridEventPtr +wx.wxGridSizeEventPtr = wxGridSizeEventPtr +wx.wxGridRangeSelectEventPtr = wxGridRangeSelectEventPtr +wx.wxGridCellRendererPtr = wxGridCellRendererPtr +wx.wxPyGridCellRendererPtr = wxPyGridCellRendererPtr +wx.wxGridCellEditorPtr = wxGridCellEditorPtr +wx.wxPyGridCellEditorPtr = wxPyGridCellEditorPtr +wx.wxGridCellAttrPtr = wxGridCellAttrPtr +wx.wxGridCellAttrProviderPtr = wxGridCellAttrProviderPtr +wx.wxPyGridCellAttrProviderPtr = wxPyGridCellAttrProviderPtr +wx.wxGridTableBasePtr = wxGridTableBasePtr +wx.wxPyGridTableBasePtr = wxPyGridTableBasePtr +wx.wxGridTableMessagePtr = wxGridTableMessagePtr +wx.wxGridCellCoordsPtr = wxGridCellCoordsPtr +wx.wxGridPtr = wxGridPtr diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp new file mode 100644 index 0000000000..31e2d64819 --- /dev/null +++ b/wxPython/src/gtk/html.cpp @@ -0,0 +1,6104 @@ +/* + * FILE : src/gtk/html.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init inithtmlc + +#define SWIG_name "htmlc" + +#include "export.h" +#include +#include +#include +#include +#include +#include + +#include "printfw.h" + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +class wxPyHtmlTagHandler : public wxHtmlTagHandler { +public: + wxPyHtmlTagHandler() : wxHtmlTagHandler() {}; + + wxHtmlParser* GetParser() { return m_Parser; } + void ParseInner(const wxHtmlTag& tag) { wxHtmlTagHandler::ParseInner(tag); } + + DEC_PYCALLBACK_STRING__pure(GetSupportedTags); + DEC_PYCALLBACK_BOOL_TAG_pure(HandleTag); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_STRING__pure(wxPyHtmlTagHandler, wxHtmlTagHandler, GetSupportedTags); +IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag); + +class wxPyHtmlWinTagHandler : public wxHtmlWinTagHandler { +public: + wxPyHtmlWinTagHandler() : wxHtmlWinTagHandler() {}; + + wxHtmlWinParser* GetParser() { return m_WParser; } + void ParseInner(const wxHtmlTag& tag) + { wxHtmlWinTagHandler::ParseInner(tag); } + + DEC_PYCALLBACK_STRING__pure(GetSupportedTags); + DEC_PYCALLBACK_BOOL_TAG_pure(HandleTag); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_STRING__pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, GetSupportedTags); +IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleTag); + + +class wxPyHtmlTagsModule : public wxHtmlTagsModule { +public: + wxPyHtmlTagsModule(PyObject* thc) : wxHtmlTagsModule() { + m_tagHandlerClass = thc; + Py_INCREF(m_tagHandlerClass); + RegisterModule(this); + wxHtmlWinParser::AddModule(this); + } + + void OnExit() { + bool doSave = wxPyRestoreThread(); + Py_DECREF(m_tagHandlerClass); + m_tagHandlerClass = NULL; + for (size_t x=0; x < m_objArray.GetCount(); x++) { + PyObject* obj = (PyObject*)m_objArray.Item(x); + Py_DECREF(obj); + } + wxPySaveThread(doSave); + }; + + void FillHandlersTable(wxHtmlWinParser *parser) { + // Wave our magic wand... (if it works it's a miracle! ;-) + + // First, make a new instance of the tag handler + bool doSave = wxPyRestoreThread(); + PyObject* arg = Py_BuildValue("()"); + PyObject* obj = PyInstance_New(m_tagHandlerClass, arg, NULL); + Py_DECREF(arg); + wxPySaveThread(doSave); + + // now figure out where it's C++ object is... + wxPyHtmlWinTagHandler* thPtr; + if (SWIG_GetPtrObj(obj, (void **)&thPtr, "_wxPyHtmlWinTagHandler_p")) + return; + + // add it, + parser->AddTagHandler(thPtr); + + // and track it. + m_objArray.Add(obj); + } + +private: + PyObject* m_tagHandlerClass; + wxArrayPtrVoid m_objArray; + +}; + + void wxHtmlWinParser_AddTagHandler(PyObject* tagHandlerClass) { + // Dynamically create a new wxModule. Refcounts tagHandlerClass + // and adds itself to the wxModules list and to the wxHtmlWinParser. + new wxPyHtmlTagsModule(tagHandlerClass); + } + +class wxPyHtmlWindow : public wxHtmlWindow { +public: + wxPyHtmlWindow(wxWindow *parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHW_SCROLLBAR_AUTO, + const wxString& name = "htmlWindow") + : wxHtmlWindow(parent, id, pos, size, style, name) {}; + + void OnLinkClicked(const wxHtmlLinkInfo& link); + void base_OnLinkClicked(const wxHtmlLinkInfo& link); + + DEC_PYCALLBACK__STRING(OnSetTitle); + PYPRIVATE; +}; + + +IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); + + void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) { + PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); + Py_DECREF(obj); + } + else + wxHtmlWindow::OnLinkClicked(link); + wxPySaveThread(doSave); +} +void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { + wxHtmlWindow::OnLinkClicked(link); +} + + void wxHtmlWindow_AddFilter(wxHtmlFilter *filter) { + wxHtmlWindow::AddFilter(filter); + } + + extern "C" SWIGEXPORT(void) inithtmlhelpc(); +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap_wxHtmlWinParser_AddTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "tagHandlerClass", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_AddTagHandler",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_AddTagHandler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxHtmlWindow_AddFilter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlFilter * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "filter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_AddFilter",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlFilter_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_AddFilter. Expected _wxHtmlFilter_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_AddFilter(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxHtmlLinkInfo(_swigarg0,_swigarg1) (new wxHtmlLinkInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxHtmlLinkInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlLinkInfo * _result; + wxString * _arg0; + wxString * _arg1 = (wxString *) &wxEmptyString; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "href","target", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxHtmlLinkInfo",_kwnames,&_obj0,&_obj1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlLinkInfo *)new_wxHtmlLinkInfo(*_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlLinkInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlLinkInfo_GetHref(_swigobj) (_swigobj->GetHref()) +static PyObject *_wrap_wxHtmlLinkInfo_GetHref(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlLinkInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlLinkInfo_GetHref",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlLinkInfo_GetHref. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlLinkInfo_GetHref(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlLinkInfo_GetTarget(_swigobj) (_swigobj->GetTarget()) +static PyObject *_wrap_wxHtmlLinkInfo_GetTarget(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlLinkInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlLinkInfo_GetTarget",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlLinkInfo_GetTarget. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlLinkInfo_GetTarget(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlLinkInfo_GetEvent(_swigobj) (_swigobj->GetEvent()) +static PyObject *_wrap_wxHtmlLinkInfo_GetEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMouseEvent * _result; + wxHtmlLinkInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlLinkInfo_GetEvent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlLinkInfo_GetEvent. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMouseEvent *)wxHtmlLinkInfo_GetEvent(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMouseEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlLinkInfo_GetHtmlCell(_swigobj) (_swigobj->GetHtmlCell()) +static PyObject *_wrap_wxHtmlLinkInfo_GetHtmlCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlLinkInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlLinkInfo_GetHtmlCell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlLinkInfo_GetHtmlCell. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlCell *)wxHtmlLinkInfo_GetHtmlCell(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlTag_GetName(_swigobj) (_swigobj->GetName()) +static PyObject *_wrap_wxHtmlTag_GetName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlTag * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_GetName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_GetName. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlTag_GetName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlTag_HasParam(_swigobj,_swigarg0) (_swigobj->HasParam(_swigarg0)) +static PyObject *_wrap_wxHtmlTag_HasParam(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlTag * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","par", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlTag_HasParam",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_HasParam. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlTag_HasParam(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlTag_GetParam(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetParam(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlTag_GetParam(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlTag * _arg0; + wxString * _arg1; + int _arg2 = (int ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","par","with_commas", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxHtmlTag_GetParam",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_GetParam. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlTag_GetParam(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlTag_GetAllParams(_swigobj) (_swigobj->GetAllParams()) +static PyObject *_wrap_wxHtmlTag_GetAllParams(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlTag * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_GetAllParams",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_GetAllParams. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlTag_GetAllParams(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlTag_IsEnding(_swigobj) (_swigobj->IsEnding()) +static PyObject *_wrap_wxHtmlTag_IsEnding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlTag * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_IsEnding",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_IsEnding. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlTag_IsEnding(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlTag_HasEnding(_swigobj) (_swigobj->HasEnding()) +static PyObject *_wrap_wxHtmlTag_HasEnding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlTag * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_HasEnding",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_HasEnding. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlTag_HasEnding(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlTag_GetBeginPos(_swigobj) (_swigobj->GetBeginPos()) +static PyObject *_wrap_wxHtmlTag_GetBeginPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlTag * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_GetBeginPos",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_GetBeginPos. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlTag_GetBeginPos(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlTag_GetEndPos1(_swigobj) (_swigobj->GetEndPos1()) +static PyObject *_wrap_wxHtmlTag_GetEndPos1(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlTag * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_GetEndPos1",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_GetEndPos1. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlTag_GetEndPos1(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlTag_GetEndPos2(_swigobj) (_swigobj->GetEndPos2()) +static PyObject *_wrap_wxHtmlTag_GetEndPos2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlTag * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTag_GetEndPos2",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTag_GetEndPos2. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlTag_GetEndPos2(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlParser_SetFS(_swigobj,_swigarg0) (_swigobj->SetFS(_swigarg0)) +static PyObject *_wrap_wxHtmlParser_SetFS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + wxFileSystem * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","fs", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_SetFS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_SetFS. Expected _wxHtmlParser_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlParser_SetFS. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlParser_SetFS(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlParser_GetFS(_swigobj) (_swigobj->GetFS()) +static PyObject *_wrap_wxHtmlParser_GetFS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _result; + wxHtmlParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlParser_GetFS",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_GetFS. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileSystem *)wxHtmlParser_GetFS(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileSystem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlParser_Parse(_swigobj,_swigarg0) (_swigobj->Parse(_swigarg0)) +static PyObject *_wrap_wxHtmlParser_Parse(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxObject * _result; + wxHtmlParser * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","source", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_Parse",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_Parse. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxObject *)wxHtmlParser_Parse(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxObject_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlParser_InitParser(_swigobj,_swigarg0) (_swigobj->InitParser(_swigarg0)) +static PyObject *_wrap_wxHtmlParser_InitParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","source", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_InitParser",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_InitParser. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlParser_InitParser(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlParser_DoneParser(_swigobj) (_swigobj->DoneParser()) +static PyObject *_wrap_wxHtmlParser_DoneParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlParser_DoneParser",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_DoneParser. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlParser_DoneParser(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlParser_DoParsing(_swigobj,_swigarg0,_swigarg1) (_swigobj->DoParsing(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlParser_DoParsing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","begin_pos","end_pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxHtmlParser_DoParsing",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_DoParsing. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlParser_DoParsing(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlParser_AddTagHandler(_swigobj,_swigarg0) (_swigobj->AddTagHandler(_swigarg0)) +static PyObject *_wrap_wxHtmlParser_AddTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + wxHtmlTagHandler * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","handler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlParser_AddTagHandler",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_AddTagHandler. Expected _wxHtmlParser_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlParser_AddTagHandler. Expected _wxHtmlTagHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlParser_AddTagHandler(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlParser_GetSource(_swigobj) (_swigobj->GetSource()) +static PyObject *_wrap_wxHtmlParser_GetSource(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlParser_GetSource",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_GetSource. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxString *)wxHtmlParser_GetSource(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxHtmlParser_PushTagHandler(_swigobj,_swigarg0,_swigarg1) (_swigobj->PushTagHandler(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlParser_PushTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + wxHtmlTagHandler * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","handler","tags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlParser_PushTagHandler",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_PushTagHandler. Expected _wxHtmlParser_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlParser_PushTagHandler. Expected _wxHtmlTagHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlParser_PushTagHandler(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlParser_PopTagHandler(_swigobj) (_swigobj->PopTagHandler()) +static PyObject *_wrap_wxHtmlParser_PopTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlParser_PopTagHandler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_PopTagHandler. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlParser_PopTagHandler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxHtmlWinParserTowxHtmlParser(void *ptr) { + wxHtmlWinParser *src; + wxHtmlParser *dest; + src = (wxHtmlWinParser *) ptr; + dest = (wxHtmlParser *) src; + return (void *) dest; +} + +#define new_wxHtmlWinParser(_swigarg0) (new wxHtmlWinParser(_swigarg0)) +static PyObject *_wrap_new_wxHtmlWinParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "wnd", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxHtmlWinParser",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlWinParser. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlWinParser *)new_wxHtmlWinParser(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlWinParser_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_SetDC(_swigobj,_swigarg0) (_swigobj->SetDC(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + wxDC * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dc", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetDC",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetDC. Expected _wxHtmlWinParser_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinParser_SetDC. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetDC(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetDC(_swigobj) (_swigobj->GetDC()) +static PyObject *_wrap_wxHtmlWinParser_GetDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetDC",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetDC. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDC *)wxHtmlWinParser_GetDC(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_GetCharHeight(_swigobj) (_swigobj->GetCharHeight()) +static PyObject *_wrap_wxHtmlWinParser_GetCharHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetCharHeight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetCharHeight. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetCharHeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_GetCharWidth(_swigobj) (_swigobj->GetCharWidth()) +static PyObject *_wrap_wxHtmlWinParser_GetCharWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetCharWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetCharWidth. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetCharWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetWindow. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxHtmlWinParser_GetWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void wxHtmlWinParser_SetFonts(wxHtmlWinParser *self,wxString normal_face,wxString fixed_face,PyObject * sizes) { + int* temp = int_LIST_helper(sizes); + if (temp) { + self->SetFonts(normal_face, fixed_face, temp); + delete [] temp; + } + } +static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","normal_face","fixed_face","sizes", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWinParser_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetFonts. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + _arg3 = _obj3; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetFonts(_arg0,*_arg1,*_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlWinParser_GetContainer(_swigobj) (_swigobj->GetContainer()) +static PyObject *_wrap_wxHtmlWinParser_GetContainer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetContainer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetContainer. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContainerCell *)wxHtmlWinParser_GetContainer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContainerCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_OpenContainer(_swigobj) (_swigobj->OpenContainer()) +static PyObject *_wrap_wxHtmlWinParser_OpenContainer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_OpenContainer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_OpenContainer. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContainerCell *)wxHtmlWinParser_OpenContainer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContainerCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_SetContainer(_swigobj,_swigarg0) (_swigobj->SetContainer(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetContainer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _result; + wxHtmlWinParser * _arg0; + wxHtmlContainerCell * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","c", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetContainer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetContainer. Expected _wxHtmlWinParser_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinParser_SetContainer. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContainerCell *)wxHtmlWinParser_SetContainer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContainerCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_CloseContainer(_swigobj) (_swigobj->CloseContainer()) +static PyObject *_wrap_wxHtmlWinParser_CloseContainer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_CloseContainer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_CloseContainer. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContainerCell *)wxHtmlWinParser_CloseContainer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContainerCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_GetFontSize(_swigobj) (_swigobj->GetFontSize()) +static PyObject *_wrap_wxHtmlWinParser_GetFontSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetFontSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetFontSize. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetFontSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_SetFontSize(_swigobj,_swigarg0) (_swigobj->SetFontSize(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetFontSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","s", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWinParser_SetFontSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetFontSize. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetFontSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetFontBold(_swigobj) (_swigobj->GetFontBold()) +static PyObject *_wrap_wxHtmlWinParser_GetFontBold(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetFontBold",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetFontBold. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetFontBold(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_SetFontBold(_swigobj,_swigarg0) (_swigobj->SetFontBold(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetFontBold(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWinParser_SetFontBold",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetFontBold. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetFontBold(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetFontItalic(_swigobj) (_swigobj->GetFontItalic()) +static PyObject *_wrap_wxHtmlWinParser_GetFontItalic(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetFontItalic",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetFontItalic. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetFontItalic(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_SetFontItalic(_swigobj,_swigarg0) (_swigobj->SetFontItalic(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetFontItalic(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWinParser_SetFontItalic",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetFontItalic. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetFontItalic(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetFontUnderlined(_swigobj) (_swigobj->GetFontUnderlined()) +static PyObject *_wrap_wxHtmlWinParser_GetFontUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetFontUnderlined",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetFontUnderlined. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetFontUnderlined(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_SetFontUnderlined(_swigobj,_swigarg0) (_swigobj->SetFontUnderlined(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetFontUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWinParser_SetFontUnderlined",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetFontUnderlined. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetFontUnderlined(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetFontFixed(_swigobj) (_swigobj->GetFontFixed()) +static PyObject *_wrap_wxHtmlWinParser_GetFontFixed(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetFontFixed",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetFontFixed. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetFontFixed(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_SetFontFixed(_swigobj,_swigarg0) (_swigobj->SetFontFixed(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetFontFixed(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWinParser_SetFontFixed",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetFontFixed. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetFontFixed(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetAlign(_swigobj) (_swigobj->GetAlign()) +static PyObject *_wrap_wxHtmlWinParser_GetAlign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetAlign",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetAlign. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlWinParser_GetAlign(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWinParser_SetAlign(_swigobj,_swigarg0) (_swigobj->SetAlign(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetAlign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","a", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWinParser_SetAlign",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetAlign. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetAlign(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetLinkColor(_swigobj) (_swigobj->GetLinkColor()) +static PyObject *_wrap_wxHtmlWinParser_GetLinkColor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetLinkColor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetLinkColor. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxHtmlWinParser_GetLinkColor(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_SetLinkColor(_swigobj,_swigarg0) (_swigobj->SetLinkColor(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetLinkColor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","clr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetLinkColor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetLinkColor. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetLinkColor(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_GetActualColor(_swigobj) (_swigobj->GetActualColor()) +static PyObject *_wrap_wxHtmlWinParser_GetActualColor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetActualColor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetActualColor. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxHtmlWinParser_GetActualColor(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_SetActualColor(_swigobj,_swigarg0) (_swigobj->SetActualColor(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetActualColor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","clr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetActualColor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetActualColor. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetActualColor(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinParser_SetLink(_swigobj,_swigarg0) (_swigobj->SetLink(_swigarg0)) +static PyObject *_wrap_wxHtmlWinParser_SetLink(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","link", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetLink",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_SetLink. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinParser_SetLink(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlWinParser_CreateCurrentFont(_swigobj) (_swigobj->CreateCurrentFont()) +static PyObject *_wrap_wxHtmlWinParser_CreateCurrentFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_CreateCurrentFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_CreateCurrentFont. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFont *)wxHtmlWinParser_CreateCurrentFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinParser_GetLink(_swigobj) (_swigobj->GetLink()) +static PyObject *_wrap_wxHtmlWinParser_GetLink(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlLinkInfo * _result; + wxHtmlWinParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinParser_GetLink",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlWinParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinParser_GetLink. Expected _wxHtmlWinParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxHtmlLinkInfo (wxHtmlWinParser_GetLink(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxHtmlLinkInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define new_wxHtmlTagHandler() (new wxPyHtmlTagHandler()) +static PyObject *_wrap_new_wxHtmlTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlTagHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlTagHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyHtmlTagHandler *)new_wxHtmlTagHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyHtmlTagHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlTagHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlTagHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlTagHandler * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlTagHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTagHandler__setSelf. Expected _wxPyHtmlTagHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlTagHandler__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlTagHandler_SetParser(_swigobj,_swigarg0) (_swigobj->SetParser(_swigarg0)) +static PyObject *_wrap_wxHtmlTagHandler_SetParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlTagHandler * _arg0; + wxHtmlParser * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","parser", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlTagHandler_SetParser",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTagHandler_SetParser. Expected _wxPyHtmlTagHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlTagHandler_SetParser. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlTagHandler_SetParser(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlTagHandler_GetParser(_swigobj) (_swigobj->GetParser()) +static PyObject *_wrap_wxHtmlTagHandler_GetParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _result; + wxPyHtmlTagHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlTagHandler_GetParser",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTagHandler_GetParser. Expected _wxPyHtmlTagHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlParser *)wxHtmlTagHandler_GetParser(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlParser_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlTagHandler_ParseInner(_swigobj,_swigarg0) (_swigobj->ParseInner(_swigarg0)) +static PyObject *_wrap_wxHtmlTagHandler_ParseInner(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlTagHandler * _arg0; + wxHtmlTag * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","tag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlTagHandler_ParseInner",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlTagHandler_ParseInner. Expected _wxPyHtmlTagHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlTagHandler_ParseInner. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlTagHandler_ParseInner(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler(void *ptr) { + wxPyHtmlWinTagHandler *src; + wxPyHtmlTagHandler *dest; + src = (wxPyHtmlWinTagHandler *) ptr; + dest = (wxPyHtmlTagHandler *) src; + return (void *) dest; +} + +#define new_wxHtmlWinTagHandler() (new wxPyHtmlWinTagHandler()) +static PyObject *_wrap_new_wxHtmlWinTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWinTagHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlWinTagHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyHtmlWinTagHandler *)new_wxHtmlWinTagHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyHtmlWinTagHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinTagHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlWinTagHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWinTagHandler * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWinTagHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWinTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinTagHandler__setSelf. Expected _wxPyHtmlWinTagHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinTagHandler__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinTagHandler_SetParser(_swigobj,_swigarg0) (_swigobj->SetParser(_swigarg0)) +static PyObject *_wrap_wxHtmlWinTagHandler_SetParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWinTagHandler * _arg0; + wxHtmlParser * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","parser", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinTagHandler_SetParser",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWinTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinTagHandler_SetParser. Expected _wxPyHtmlWinTagHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinTagHandler_SetParser. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinTagHandler_SetParser(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWinTagHandler_GetParser(_swigobj) (_swigobj->GetParser()) +static PyObject *_wrap_wxHtmlWinTagHandler_GetParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _result; + wxPyHtmlWinTagHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWinTagHandler_GetParser",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWinTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinTagHandler_GetParser. Expected _wxPyHtmlWinTagHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlWinParser *)wxHtmlWinTagHandler_GetParser(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlWinParser_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWinTagHandler_ParseInner(_swigobj,_swigarg0) (_swigobj->ParseInner(_swigarg0)) +static PyObject *_wrap_wxHtmlWinTagHandler_ParseInner(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWinTagHandler * _arg0; + wxHtmlTag * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","tag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinTagHandler_ParseInner",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWinTagHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWinTagHandler_ParseInner. Expected _wxPyHtmlWinTagHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinTagHandler_ParseInner. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWinTagHandler_ParseInner(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxHtmlCell() (new wxHtmlCell()) +static PyObject *_wrap_new_wxHtmlCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlCell",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlCell *)new_wxHtmlCell(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_GetPosX(_swigobj) (_swigobj->GetPosX()) +static PyObject *_wrap_wxHtmlCell_GetPosX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetPosX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetPosX. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlCell_GetPosX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_GetPosY(_swigobj) (_swigobj->GetPosY()) +static PyObject *_wrap_wxHtmlCell_GetPosY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetPosY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetPosY. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlCell_GetPosY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxHtmlCell_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetWidth. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlCell_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_GetHeight(_swigobj) (_swigobj->GetHeight()) +static PyObject *_wrap_wxHtmlCell_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetHeight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetHeight. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlCell_GetHeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_GetDescent(_swigobj) (_swigobj->GetDescent()) +static PyObject *_wrap_wxHtmlCell_GetDescent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetDescent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetDescent. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlCell_GetDescent(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_GetLink(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetLink(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlCell_GetLink(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlLinkInfo * _result; + wxHtmlCell * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxHtmlCell_GetLink",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetLink. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlLinkInfo *)wxHtmlCell_GetLink(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlLinkInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_GetNext(_swigobj) (_swigobj->GetNext()) +static PyObject *_wrap_wxHtmlCell_GetNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetNext. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlCell *)wxHtmlCell_GetNext(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_GetParent(_swigobj) (_swigobj->GetParent()) +static PyObject *_wrap_wxHtmlCell_GetParent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetParent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetParent. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContainerCell *)wxHtmlCell_GetParent(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContainerCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_SetLink(_swigobj,_swigarg0) (_swigobj->SetLink(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_SetLink(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + wxHtmlLinkInfo * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","link", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlCell_SetLink",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_SetLink. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_SetLink. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_SetLink(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlCell_SetNext(_swigobj,_swigarg0) (_swigobj->SetNext(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_SetNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + wxHtmlCell * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cell", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlCell_SetNext",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_SetNext. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_SetNext. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_SetNext(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlCell_SetParent(_swigobj,_swigarg0) (_swigobj->SetParent(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_SetParent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + wxHtmlContainerCell * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlCell_SetParent",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_SetParent. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_SetParent. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_SetParent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlCell_SetPos(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPos(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlCell_SetPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxHtmlCell_SetPos",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_SetPos. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_SetPos(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlCell_Layout(_swigobj,_swigarg0) (_swigobj->Layout(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_Layout(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","w", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlCell_Layout",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_Layout. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_Layout(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlCell_Draw(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Draw(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxHtmlCell_Draw(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + wxDC * _arg1; + int _arg2; + int _arg3; + int _arg4; + int _arg5; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dc","x","y","view_y1","view_y2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiiii:wxHtmlCell_Draw",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_Draw. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_Draw. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_Draw(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlCell_DrawInvisible(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawInvisible(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxHtmlCell_DrawInvisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + wxDC * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dc","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxHtmlCell_DrawInvisible",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_DrawInvisible. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_DrawInvisible. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_DrawInvisible(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlCell_Find(_swigobj,_swigarg0,_swigarg1) (_swigobj->Find(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlCell_Find(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlCell * _arg0; + int _arg1; + void * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","condition","param", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxHtmlCell_Find",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_Find. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,(char *) 0 )) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxHtmlCell_Find. Expected _void_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlCell *)wxHtmlCell_Find(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_AdjustPagebreak(_swigobj,_swigarg0) (_swigobj->AdjustPagebreak(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_AdjustPagebreak(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlCell * _arg0; + int * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","pagebreak", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlCell_AdjustPagebreak",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_AdjustPagebreak. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_AdjustPagebreak. Expected _int_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlCell_AdjustPagebreak(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_SetCanLiveOnPagebreak(_swigobj,_swigarg0) (_swigobj->SetCanLiveOnPagebreak(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_SetCanLiveOnPagebreak(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","can", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlCell_SetCanLiveOnPagebreak",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_SetCanLiveOnPagebreak. Expected _wxHtmlCell_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlCell_SetCanLiveOnPagebreak(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxHtmlContainerCellTowxHtmlCell(void *ptr) { + wxHtmlContainerCell *src; + wxHtmlCell *dest; + src = (wxHtmlContainerCell *) ptr; + dest = (wxHtmlCell *) src; + return (void *) dest; +} + +#define new_wxHtmlContainerCell(_swigarg0) (new wxHtmlContainerCell(_swigarg0)) +static PyObject *_wrap_new_wxHtmlContainerCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _result; + wxHtmlContainerCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "parent", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxHtmlContainerCell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlContainerCell. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContainerCell *)new_wxHtmlContainerCell(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContainerCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlContainerCell_InsertCell(_swigobj,_swigarg0) (_swigobj->InsertCell(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_InsertCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + wxHtmlCell * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cell", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_InsertCell",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_InsertCell. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_InsertCell. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_InsertCell(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_SetAlignHor(_swigobj,_swigarg0) (_swigobj->SetAlignHor(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_SetAlignHor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","al", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlContainerCell_SetAlignHor",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetAlignHor. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetAlignHor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_GetAlignHor(_swigobj) (_swigobj->GetAlignHor()) +static PyObject *_wrap_wxHtmlContainerCell_GetAlignHor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlContainerCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContainerCell_GetAlignHor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_GetAlignHor. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlContainerCell_GetAlignHor(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlContainerCell_SetAlignVer(_swigobj,_swigarg0) (_swigobj->SetAlignVer(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_SetAlignVer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","al", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlContainerCell_SetAlignVer",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetAlignVer. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetAlignVer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_GetAlignVer(_swigobj) (_swigobj->GetAlignVer()) +static PyObject *_wrap_wxHtmlContainerCell_GetAlignVer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlContainerCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContainerCell_GetAlignVer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_GetAlignVer. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlContainerCell_GetAlignVer(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlContainerCell_SetIndent(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetIndent(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxHtmlContainerCell_SetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + int _arg1; + int _arg2; + int _arg3 = (int ) (wxHTML_UNITS_PIXELS); + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","i","what","units", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxHtmlContainerCell_SetIndent",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetIndent. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetIndent(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_GetIndent(_swigobj,_swigarg0) (_swigobj->GetIndent(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_GetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlContainerCell * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","ind", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlContainerCell_GetIndent",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_GetIndent. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlContainerCell_GetIndent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlContainerCell_GetIndentUnits(_swigobj,_swigarg0) (_swigobj->GetIndentUnits(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_GetIndentUnits(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlContainerCell * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","ind", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlContainerCell_GetIndentUnits",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_GetIndentUnits. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlContainerCell_GetIndentUnits(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlContainerCell_SetAlign(_swigobj,_swigarg0) (_swigobj->SetAlign(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_SetAlign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + wxHtmlTag * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","tag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_SetAlign",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetAlign. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetAlign. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetAlign(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_SetWidthFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetWidthFloat(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlContainerCell_SetWidthFloat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","w","units", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxHtmlContainerCell_SetWidthFloat",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetWidthFloat. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetWidthFloat(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_SetWidthFloatFromTag(_swigobj,_swigarg0) (_swigobj->SetWidthFloat(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_SetWidthFloatFromTag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + wxHtmlTag * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","tag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_SetWidthFloatFromTag",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetWidthFloatFromTag. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetWidthFloatFromTag. Expected _wxHtmlTag_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetWidthFloatFromTag(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_SetMinHeight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMinHeight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlContainerCell_SetMinHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + int _arg1; + int _arg2 = (int ) (wxHTML_ALIGN_TOP); + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","h","align", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxHtmlContainerCell_SetMinHeight",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetMinHeight. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetMinHeight(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","clr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetBackgroundColour. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_SetBorder(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetBorder(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _arg0; + wxColour * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","clr1","clr2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlContainerCell_SetBorder",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_SetBorder. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlContainerCell_GetFirstCell(_swigobj) (_swigobj->GetFirstCell()) +static PyObject *_wrap_wxHtmlContainerCell_GetFirstCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlContainerCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContainerCell_GetFirstCell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_GetFirstCell. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlCell *)wxHtmlContainerCell_GetFirstCell(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxHtmlColourCellTowxHtmlCell(void *ptr) { + wxHtmlColourCell *src; + wxHtmlCell *dest; + src = (wxHtmlColourCell *) ptr; + dest = (wxHtmlCell *) src; + return (void *) dest; +} + +#define new_wxHtmlColourCell(_swigarg0,_swigarg1) (new wxHtmlColourCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxHtmlColourCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlColourCell * _result; + wxColour * _arg0; + int _arg1 = (int ) (wxHTML_CLR_FOREGROUND); + wxColour temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "clr","flags", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxHtmlColourCell",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlColourCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxHtmlWidgetCellTowxHtmlCell(void *ptr) { + wxHtmlWidgetCell *src; + wxHtmlCell *dest; + src = (wxHtmlWidgetCell *) ptr; + dest = (wxHtmlCell *) src; + return (void *) dest; +} + +#define new_wxHtmlWidgetCell(_swigarg0,_swigarg1) (new wxHtmlWidgetCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxHtmlWidgetCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWidgetCell * _result; + wxWindow * _arg0; + int _arg1 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "wnd","w", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxHtmlWidgetCell",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlWidgetCell. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlWidgetCell *)new_wxHtmlWidgetCell(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlWidgetCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_HtmlHistoryItem(_swigarg0,_swigarg1) (new HtmlHistoryItem(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_HtmlHistoryItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + HtmlHistoryItem * _result; + char * _arg0; + char * _arg1; + char *_kwnames[] = { "p","a", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ss:new_HtmlHistoryItem",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (HtmlHistoryItem *)new_HtmlHistoryItem(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_HtmlHistoryItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define HtmlHistoryItem_GetPos(_swigobj) (_swigobj->GetPos()) +static PyObject *_wrap_HtmlHistoryItem_GetPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + HtmlHistoryItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:HtmlHistoryItem_GetPos",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_GetPos. Expected _HtmlHistoryItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )HtmlHistoryItem_GetPos(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define HtmlHistoryItem_SetPos(_swigobj,_swigarg0) (_swigobj->SetPos(_swigarg0)) +static PyObject *_wrap_HtmlHistoryItem_SetPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + HtmlHistoryItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:HtmlHistoryItem_SetPos",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_SetPos. Expected _HtmlHistoryItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + HtmlHistoryItem_SetPos(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define HtmlHistoryItem_GetPage(_swigobj) (_swigobj->GetPage()) +static PyObject *_wrap_HtmlHistoryItem_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + HtmlHistoryItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:HtmlHistoryItem_GetPage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_GetPage. Expected _HtmlHistoryItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = HtmlHistoryItem_GetPage(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define HtmlHistoryItem_GetAnchor(_swigobj) (_swigobj->GetAnchor()) +static PyObject *_wrap_HtmlHistoryItem_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + HtmlHistoryItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:HtmlHistoryItem_GetAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_HtmlHistoryItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of HtmlHistoryItem_GetAnchor. Expected _HtmlHistoryItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = HtmlHistoryItem_GetAnchor(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +static void *SwigwxPyHtmlWindowTowxScrolledWindow(void *ptr) { + wxPyHtmlWindow *src; + wxScrolledWindow *dest; + src = (wxPyHtmlWindow *) ptr; + dest = (wxScrolledWindow *) src; + return (void *) dest; +} + +static void *SwigwxPyHtmlWindowTowxPanel(void *ptr) { + wxPyHtmlWindow *src; + wxPanel *dest; + src = (wxPyHtmlWindow *) ptr; + dest = (wxPanel *) src; + return (void *) dest; +} + +static void *SwigwxPyHtmlWindowTowxWindow(void *ptr) { + wxPyHtmlWindow *src; + wxWindow *dest; + src = (wxPyHtmlWindow *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxPyHtmlWindowTowxEvtHandler(void *ptr) { + wxPyHtmlWindow *src; + wxEvtHandler *dest; + src = (wxPyHtmlWindow *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxHtmlWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPyHtmlWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _result; + wxWindow * _arg0; + int _arg1 = (int ) -1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + int _arg4 = (int ) wxHW_SCROLLBAR_AUTO; + char * _arg5 = (char *) "htmlWindow"; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","id","pos","size","flags","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOis:new_wxHtmlWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlWindow. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyHtmlWindow *)new_wxHtmlWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyHtmlWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWindow__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlWindow__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWindow__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow__setSelf. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_SetPage(_swigobj,_swigarg0) (_swigobj->SetPage(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_SetPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","source", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlWindow_SetPage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_SetPage. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_SetPage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWindow_LoadPage(_swigobj,_swigarg0) (_swigobj->LoadPage(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_LoadPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlWindow_LoadPage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_LoadPage. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_LoadPage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWindow_GetOpenedPage(_swigobj) (_swigobj->GetOpenedPage()) +static PyObject *_wrap_wxHtmlWindow_GetOpenedPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_GetOpenedPage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_GetOpenedPage. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlWindow_GetOpenedPage(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlWindow_SetRelatedFrame(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRelatedFrame(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlWindow_SetRelatedFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxFrame * _arg1; + char * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","frame","format", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOs:wxHtmlWindow_SetRelatedFrame",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_SetRelatedFrame. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_SetRelatedFrame. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_SetRelatedFrame(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_GetRelatedFrame(_swigobj) (_swigobj->GetRelatedFrame()) +static PyObject *_wrap_wxHtmlWindow_GetRelatedFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_GetRelatedFrame",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_GetRelatedFrame. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFrame *)wxHtmlWindow_GetRelatedFrame(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWindow_SetRelatedStatusBar(_swigobj,_swigarg0) (_swigobj->SetRelatedStatusBar(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_SetRelatedStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","bar", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWindow_SetRelatedStatusBar",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_SetRelatedStatusBar. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_SetRelatedStatusBar(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxPyHtmlWindow_SetFonts(wxPyHtmlWindow *self,wxString normal_face,wxString fixed_face,PyObject * sizes) { + int* temp = int_LIST_helper(sizes); + if (temp) { + self->SetFonts(normal_face, fixed_face, temp); + delete [] temp; + } + } +static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","normal_face","fixed_face","sizes", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWindow_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_SetFonts. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + _arg3 = _obj3; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlWindow_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_SetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","title", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlWindow_SetTitle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_SetTitle. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_SetTitle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_SetBorders(_swigobj,_swigarg0) (_swigobj->SetBorders(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_SetBorders(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","b", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlWindow_SetBorders",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_SetBorders. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_SetBorders(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_ReadCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReadCustomization(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlWindow_ReadCustomization(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxConfigBase * _arg1; + char * _arg2 = (char *) ""; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cfg","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|s:wxHtmlWindow_ReadCustomization",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_ReadCustomization. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_ReadCustomization. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_ReadCustomization(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_WriteCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->WriteCustomization(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlWindow_WriteCustomization(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxConfigBase * _arg1; + char * _arg2 = (char *) ""; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cfg","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|s:wxHtmlWindow_WriteCustomization",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_WriteCustomization. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_WriteCustomization. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_WriteCustomization(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_HistoryBack(_swigobj) (_swigobj->HistoryBack()) +static PyObject *_wrap_wxHtmlWindow_HistoryBack(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_HistoryBack",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_HistoryBack. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_HistoryBack(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWindow_HistoryForward(_swigobj) (_swigobj->HistoryForward()) +static PyObject *_wrap_wxHtmlWindow_HistoryForward(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_HistoryForward",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_HistoryForward. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlWindow_HistoryForward(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlWindow_HistoryClear(_swigobj) (_swigobj->HistoryClear()) +static PyObject *_wrap_wxHtmlWindow_HistoryClear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_HistoryClear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_HistoryClear. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_HistoryClear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_GetInternalRepresentation(_swigobj) (_swigobj->GetInternalRepresentation()) +static PyObject *_wrap_wxHtmlWindow_GetInternalRepresentation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContainerCell * _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_GetInternalRepresentation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_GetInternalRepresentation. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContainerCell *)wxHtmlWindow_GetInternalRepresentation(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContainerCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWindow_GetParser(_swigobj) (_swigobj->GetParser()) +static PyObject *_wrap_wxHtmlWindow_GetParser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlWinParser * _result; + wxPyHtmlWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_GetParser",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_GetParser. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlWinParser *)wxHtmlWindow_GetParser(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlWinParser_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlWindow_base_OnLinkClicked(_swigobj,_swigarg0) (_swigobj->base_OnLinkClicked(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_base_OnLinkClicked(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + wxHtmlLinkInfo * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","link", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow_base_OnLinkClicked",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_base_OnLinkClicked. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlLinkInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_base_OnLinkClicked. Expected _wxHtmlLinkInfo_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_base_OnLinkClicked(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlWindow_base_OnSetTitle(_swigobj,_swigarg0) (_swigobj->base_OnSetTitle(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_base_OnSetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlWindow * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","title", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlWindow_base_OnSetTitle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_base_OnSetTitle. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlWindow_base_OnSetTitle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxHtmlDCRenderer() (new wxHtmlDCRenderer()) +static PyObject *_wrap_new_wxHtmlDCRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlDCRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlDCRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlDCRenderer *)new_wxHtmlDCRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlDCRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxHtmlDCRenderer(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxHtmlDCRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlDCRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxHtmlDCRenderer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlDCRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxHtmlDCRenderer. Expected _wxHtmlDCRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxHtmlDCRenderer(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlDCRenderer_SetDC(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDC(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlDCRenderer_SetDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlDCRenderer * _arg0; + wxDC * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dc","maxwidth", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxHtmlDCRenderer_SetDC",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlDCRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlDCRenderer_SetDC. Expected _wxHtmlDCRenderer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlDCRenderer_SetDC. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlDCRenderer_SetDC(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlDCRenderer_SetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlDCRenderer_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlDCRenderer * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxHtmlDCRenderer_SetSize",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlDCRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlDCRenderer_SetSize. Expected _wxHtmlDCRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlDCRenderer_SetSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlDCRenderer_SetHtmlText(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetHtmlText(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxHtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlDCRenderer * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","html","basepath","isdir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|Oi:wxHtmlDCRenderer_SetHtmlText",_kwnames,&_argo0,&_obj1,&_obj2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlDCRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlDCRenderer_SetHtmlText. Expected _wxHtmlDCRenderer_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlDCRenderer_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlDCRenderer_Render(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Render(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxHtmlDCRenderer_Render(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlDCRenderer * _arg0; + int _arg1; + int _arg2; + int _arg3 = (int ) 0; + int _arg4 = (int ) FALSE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","from","dont_render", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|ii:wxHtmlDCRenderer_Render",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlDCRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlDCRenderer_Render. Expected _wxHtmlDCRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlDCRenderer_Render(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlDCRenderer_GetTotalHeight(_swigobj) (_swigobj->GetTotalHeight()) +static PyObject *_wrap_wxHtmlDCRenderer_GetTotalHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlDCRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlDCRenderer_GetTotalHeight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlDCRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlDCRenderer_GetTotalHeight. Expected _wxHtmlDCRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlDCRenderer_GetTotalHeight(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxHtmlPrintoutTowxPyPrintout(void *ptr) { + wxHtmlPrintout *src; + wxPyPrintout *dest; + src = (wxHtmlPrintout *) ptr; + dest = (wxPyPrintout *) src; + return (void *) dest; +} + +#define new_wxHtmlPrintout(_swigarg0) (new wxHtmlPrintout(_swigarg0)) +static PyObject *_wrap_new_wxHtmlPrintout(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlPrintout * _result; + char * _arg0 = (char *) "Printout"; + char *_kwnames[] = { "title", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:new_wxHtmlPrintout",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlPrintout *)new_wxHtmlPrintout(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlPrintout_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxHtmlPrintout(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxHtmlPrintout(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlPrintout * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxHtmlPrintout",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlPrintout_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxHtmlPrintout. Expected _wxHtmlPrintout_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxHtmlPrintout(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlPrintout_SetHtmlText(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetHtmlText(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxHtmlPrintout_SetHtmlText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlPrintout * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","html","basepath","isdir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|Oi:wxHtmlPrintout_SetHtmlText",_kwnames,&_argo0,&_obj1,&_obj2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlPrintout_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlPrintout_SetHtmlText. Expected _wxHtmlPrintout_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlPrintout_SetHtmlText(_arg0,*_arg1,*_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlPrintout_SetHtmlFile(_swigobj,_swigarg0) (_swigobj->SetHtmlFile(_swigarg0)) +static PyObject *_wrap_wxHtmlPrintout_SetHtmlFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlPrintout * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","htmlfile", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlPrintout_SetHtmlFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlPrintout_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlPrintout_SetHtmlFile. Expected _wxHtmlPrintout_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlPrintout_SetHtmlFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlPrintout_SetHeader(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHeader(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlPrintout_SetHeader(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlPrintout * _arg0; + wxString * _arg1; + int _arg2 = (int ) (wxPAGE_ALL); + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","header","pg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxHtmlPrintout_SetHeader",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlPrintout_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlPrintout_SetHeader. Expected _wxHtmlPrintout_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlPrintout_SetHeader(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlPrintout_SetFooter(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetFooter(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlPrintout_SetFooter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlPrintout * _arg0; + wxString * _arg1; + int _arg2 = (int ) (wxPAGE_ALL); + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","footer","pg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxHtmlPrintout_SetFooter",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlPrintout_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlPrintout_SetFooter. Expected _wxHtmlPrintout_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlPrintout_SetFooter(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlPrintout_SetMargins(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SetMargins(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxHtmlPrintout_SetMargins(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlPrintout * _arg0; + float _arg1 = (float ) 25.2; + float _arg2 = (float ) 25.2; + float _arg3 = (float ) 25.2; + float _arg4 = (float ) 25.2; + float _arg5 = (float ) 5; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","top","bottom","left","right","spaces", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|fffff:wxHtmlPrintout_SetMargins",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlPrintout_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlPrintout_SetMargins. Expected _wxHtmlPrintout_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlPrintout_SetMargins(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxHtmlEasyPrinting(_swigarg0,_swigarg1) (new wxHtmlEasyPrinting(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxHtmlEasyPrinting(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _result; + char * _arg0 = (char *) "Printing"; + wxFrame * _arg1 = (wxFrame *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "name","parent_frame", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|sO:new_wxHtmlEasyPrinting",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxHtmlEasyPrinting. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlEasyPrinting *)new_wxHtmlEasyPrinting(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlEasyPrinting_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxHtmlEasyPrinting(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxHtmlEasyPrinting(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxHtmlEasyPrinting",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxHtmlEasyPrinting. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxHtmlEasyPrinting(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlEasyPrinting_PreviewFile(_swigobj,_swigarg0) (_swigobj->PreviewFile(_swigarg0)) +static PyObject *_wrap_wxHtmlEasyPrinting_PreviewFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","htmlfile", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlEasyPrinting_PreviewFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_PreviewFile. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_PreviewFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlEasyPrinting_PreviewText(_swigobj,_swigarg0,_swigarg1) (_swigobj->PreviewText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlEasyPrinting_PreviewText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","htmltext","basepath", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlEasyPrinting_PreviewText",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_PreviewText. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_PreviewText(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlEasyPrinting_PrintFile(_swigobj,_swigarg0) (_swigobj->PrintFile(_swigarg0)) +static PyObject *_wrap_wxHtmlEasyPrinting_PrintFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","htmlfile", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlEasyPrinting_PrintFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_PrintFile. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_PrintFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlEasyPrinting_PrintText(_swigobj,_swigarg0,_swigarg1) (_swigobj->PrintText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlEasyPrinting_PrintText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","htmltext","basepath", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlEasyPrinting_PrintText",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_PrintText. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_PrintText(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlEasyPrinting_PrinterSetup(_swigobj) (_swigobj->PrinterSetup()) +static PyObject *_wrap_wxHtmlEasyPrinting_PrinterSetup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlEasyPrinting_PrinterSetup",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_PrinterSetup. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_PrinterSetup(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlEasyPrinting_PageSetup(_swigobj) (_swigobj->PageSetup()) +static PyObject *_wrap_wxHtmlEasyPrinting_PageSetup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlEasyPrinting_PageSetup",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_PageSetup. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_PageSetup(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlEasyPrinting_SetHeader(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHeader(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlEasyPrinting_SetHeader(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + wxString * _arg1; + int _arg2 = (int ) (wxPAGE_ALL); + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","header","pg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxHtmlEasyPrinting_SetHeader",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_SetHeader. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_SetHeader(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlEasyPrinting_SetFooter(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetFooter(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlEasyPrinting_SetFooter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlEasyPrinting * _arg0; + wxString * _arg1; + int _arg2 = (int ) (wxPAGE_ALL); + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","footer","pg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxHtmlEasyPrinting_SetFooter",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_SetFooter. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlEasyPrinting_SetFooter(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlEasyPrinting_GetPrintData(_swigobj) (_swigobj->GetPrintData()) +static PyObject *_wrap_wxHtmlEasyPrinting_GetPrintData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPrintData * _result; + wxHtmlEasyPrinting * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlEasyPrinting_GetPrintData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_GetPrintData. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPrintData *)wxHtmlEasyPrinting_GetPrintData(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrintData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlEasyPrinting_GetPageSetupData(_swigobj) (_swigobj->GetPageSetupData()) +static PyObject *_wrap_wxHtmlEasyPrinting_GetPageSetupData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPageSetupDialogData * _result; + wxHtmlEasyPrinting * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlEasyPrinting_GetPageSetupData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlEasyPrinting_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlEasyPrinting_GetPageSetupData. Expected _wxHtmlEasyPrinting_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPageSetupDialogData *)wxHtmlEasyPrinting_GetPageSetupData(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPageSetupDialogData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyMethodDef htmlcMethods[] = { + { "wxHtmlEasyPrinting_GetPageSetupData", (PyCFunction) _wrap_wxHtmlEasyPrinting_GetPageSetupData, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_GetPrintData", (PyCFunction) _wrap_wxHtmlEasyPrinting_GetPrintData, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_SetFooter", (PyCFunction) _wrap_wxHtmlEasyPrinting_SetFooter, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_SetHeader", (PyCFunction) _wrap_wxHtmlEasyPrinting_SetHeader, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_PageSetup", (PyCFunction) _wrap_wxHtmlEasyPrinting_PageSetup, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_PrinterSetup", (PyCFunction) _wrap_wxHtmlEasyPrinting_PrinterSetup, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_PrintText", (PyCFunction) _wrap_wxHtmlEasyPrinting_PrintText, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_PrintFile", (PyCFunction) _wrap_wxHtmlEasyPrinting_PrintFile, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_PreviewText", (PyCFunction) _wrap_wxHtmlEasyPrinting_PreviewText, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlEasyPrinting_PreviewFile", (PyCFunction) _wrap_wxHtmlEasyPrinting_PreviewFile, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxHtmlEasyPrinting", (PyCFunction) _wrap_delete_wxHtmlEasyPrinting, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlEasyPrinting", (PyCFunction) _wrap_new_wxHtmlEasyPrinting, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlPrintout_SetMargins", (PyCFunction) _wrap_wxHtmlPrintout_SetMargins, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlPrintout_SetFooter", (PyCFunction) _wrap_wxHtmlPrintout_SetFooter, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlPrintout_SetHeader", (PyCFunction) _wrap_wxHtmlPrintout_SetHeader, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlPrintout_SetHtmlFile", (PyCFunction) _wrap_wxHtmlPrintout_SetHtmlFile, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlPrintout_SetHtmlText", (PyCFunction) _wrap_wxHtmlPrintout_SetHtmlText, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxHtmlPrintout", (PyCFunction) _wrap_delete_wxHtmlPrintout, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlPrintout", (PyCFunction) _wrap_new_wxHtmlPrintout, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlDCRenderer_GetTotalHeight", (PyCFunction) _wrap_wxHtmlDCRenderer_GetTotalHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlDCRenderer_Render", (PyCFunction) _wrap_wxHtmlDCRenderer_Render, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlDCRenderer_SetHtmlText", (PyCFunction) _wrap_wxHtmlDCRenderer_SetHtmlText, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlDCRenderer_SetSize", (PyCFunction) _wrap_wxHtmlDCRenderer_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlDCRenderer_SetDC", (PyCFunction) _wrap_wxHtmlDCRenderer_SetDC, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxHtmlDCRenderer", (PyCFunction) _wrap_delete_wxHtmlDCRenderer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlDCRenderer", (PyCFunction) _wrap_new_wxHtmlDCRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_base_OnSetTitle", (PyCFunction) _wrap_wxHtmlWindow_base_OnSetTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_base_OnLinkClicked", (PyCFunction) _wrap_wxHtmlWindow_base_OnLinkClicked, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_GetParser", (PyCFunction) _wrap_wxHtmlWindow_GetParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_GetInternalRepresentation", (PyCFunction) _wrap_wxHtmlWindow_GetInternalRepresentation, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_HistoryClear", (PyCFunction) _wrap_wxHtmlWindow_HistoryClear, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_HistoryForward", (PyCFunction) _wrap_wxHtmlWindow_HistoryForward, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_HistoryBack", (PyCFunction) _wrap_wxHtmlWindow_HistoryBack, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_WriteCustomization", (PyCFunction) _wrap_wxHtmlWindow_WriteCustomization, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_ReadCustomization", (PyCFunction) _wrap_wxHtmlWindow_ReadCustomization, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_SetBorders", (PyCFunction) _wrap_wxHtmlWindow_SetBorders, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_SetTitle", (PyCFunction) _wrap_wxHtmlWindow_SetTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_SetFonts", (PyCFunction) _wrap_wxHtmlWindow_SetFonts, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_SetRelatedStatusBar", (PyCFunction) _wrap_wxHtmlWindow_SetRelatedStatusBar, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_GetRelatedFrame", (PyCFunction) _wrap_wxHtmlWindow_GetRelatedFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_SetRelatedFrame", (PyCFunction) _wrap_wxHtmlWindow_SetRelatedFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_GetOpenedPage", (PyCFunction) _wrap_wxHtmlWindow_GetOpenedPage, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_LoadPage", (PyCFunction) _wrap_wxHtmlWindow_LoadPage, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_SetPage", (PyCFunction) _wrap_wxHtmlWindow_SetPage, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow__setSelf", (PyCFunction) _wrap_wxHtmlWindow__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlWindow", (PyCFunction) _wrap_new_wxHtmlWindow, METH_VARARGS | METH_KEYWORDS }, + { "HtmlHistoryItem_GetAnchor", (PyCFunction) _wrap_HtmlHistoryItem_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "HtmlHistoryItem_GetPage", (PyCFunction) _wrap_HtmlHistoryItem_GetPage, METH_VARARGS | METH_KEYWORDS }, + { "HtmlHistoryItem_SetPos", (PyCFunction) _wrap_HtmlHistoryItem_SetPos, METH_VARARGS | METH_KEYWORDS }, + { "HtmlHistoryItem_GetPos", (PyCFunction) _wrap_HtmlHistoryItem_GetPos, METH_VARARGS | METH_KEYWORDS }, + { "new_HtmlHistoryItem", (PyCFunction) _wrap_new_HtmlHistoryItem, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlWidgetCell", (PyCFunction) _wrap_new_wxHtmlWidgetCell, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlColourCell", (PyCFunction) _wrap_new_wxHtmlColourCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_GetFirstCell", (PyCFunction) _wrap_wxHtmlContainerCell_GetFirstCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetBorder", (PyCFunction) _wrap_wxHtmlContainerCell_SetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetBackgroundColour", (PyCFunction) _wrap_wxHtmlContainerCell_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetMinHeight", (PyCFunction) _wrap_wxHtmlContainerCell_SetMinHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetWidthFloatFromTag", (PyCFunction) _wrap_wxHtmlContainerCell_SetWidthFloatFromTag, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetWidthFloat", (PyCFunction) _wrap_wxHtmlContainerCell_SetWidthFloat, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetAlign", (PyCFunction) _wrap_wxHtmlContainerCell_SetAlign, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_GetIndentUnits", (PyCFunction) _wrap_wxHtmlContainerCell_GetIndentUnits, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_GetIndent", (PyCFunction) _wrap_wxHtmlContainerCell_GetIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetIndent", (PyCFunction) _wrap_wxHtmlContainerCell_SetIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_GetAlignVer", (PyCFunction) _wrap_wxHtmlContainerCell_GetAlignVer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetAlignVer", (PyCFunction) _wrap_wxHtmlContainerCell_SetAlignVer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_GetAlignHor", (PyCFunction) _wrap_wxHtmlContainerCell_GetAlignHor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_SetAlignHor", (PyCFunction) _wrap_wxHtmlContainerCell_SetAlignHor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_InsertCell", (PyCFunction) _wrap_wxHtmlContainerCell_InsertCell, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlContainerCell", (PyCFunction) _wrap_new_wxHtmlContainerCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_SetCanLiveOnPagebreak", (PyCFunction) _wrap_wxHtmlCell_SetCanLiveOnPagebreak, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_AdjustPagebreak", (PyCFunction) _wrap_wxHtmlCell_AdjustPagebreak, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_Find", (PyCFunction) _wrap_wxHtmlCell_Find, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_DrawInvisible", (PyCFunction) _wrap_wxHtmlCell_DrawInvisible, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_Draw", (PyCFunction) _wrap_wxHtmlCell_Draw, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_Layout", (PyCFunction) _wrap_wxHtmlCell_Layout, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_SetPos", (PyCFunction) _wrap_wxHtmlCell_SetPos, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_SetParent", (PyCFunction) _wrap_wxHtmlCell_SetParent, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_SetNext", (PyCFunction) _wrap_wxHtmlCell_SetNext, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_SetLink", (PyCFunction) _wrap_wxHtmlCell_SetLink, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetParent", (PyCFunction) _wrap_wxHtmlCell_GetParent, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetNext", (PyCFunction) _wrap_wxHtmlCell_GetNext, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetLink", (PyCFunction) _wrap_wxHtmlCell_GetLink, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetDescent", (PyCFunction) _wrap_wxHtmlCell_GetDescent, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetHeight", (PyCFunction) _wrap_wxHtmlCell_GetHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetWidth", (PyCFunction) _wrap_wxHtmlCell_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetPosY", (PyCFunction) _wrap_wxHtmlCell_GetPosY, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetPosX", (PyCFunction) _wrap_wxHtmlCell_GetPosX, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlCell", (PyCFunction) _wrap_new_wxHtmlCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinTagHandler_ParseInner", (PyCFunction) _wrap_wxHtmlWinTagHandler_ParseInner, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinTagHandler_GetParser", (PyCFunction) _wrap_wxHtmlWinTagHandler_GetParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinTagHandler_SetParser", (PyCFunction) _wrap_wxHtmlWinTagHandler_SetParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinTagHandler__setSelf", (PyCFunction) _wrap_wxHtmlWinTagHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlWinTagHandler", (PyCFunction) _wrap_new_wxHtmlWinTagHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTagHandler_ParseInner", (PyCFunction) _wrap_wxHtmlTagHandler_ParseInner, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTagHandler_GetParser", (PyCFunction) _wrap_wxHtmlTagHandler_GetParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTagHandler_SetParser", (PyCFunction) _wrap_wxHtmlTagHandler_SetParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTagHandler__setSelf", (PyCFunction) _wrap_wxHtmlTagHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlTagHandler", (PyCFunction) _wrap_new_wxHtmlTagHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetLink", (PyCFunction) _wrap_wxHtmlWinParser_GetLink, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_CreateCurrentFont", (PyCFunction) _wrap_wxHtmlWinParser_CreateCurrentFont, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetLink", (PyCFunction) _wrap_wxHtmlWinParser_SetLink, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetActualColor", (PyCFunction) _wrap_wxHtmlWinParser_SetActualColor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetActualColor", (PyCFunction) _wrap_wxHtmlWinParser_GetActualColor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetLinkColor", (PyCFunction) _wrap_wxHtmlWinParser_SetLinkColor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetLinkColor", (PyCFunction) _wrap_wxHtmlWinParser_GetLinkColor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetAlign", (PyCFunction) _wrap_wxHtmlWinParser_SetAlign, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetAlign", (PyCFunction) _wrap_wxHtmlWinParser_GetAlign, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetFontFixed", (PyCFunction) _wrap_wxHtmlWinParser_SetFontFixed, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetFontFixed", (PyCFunction) _wrap_wxHtmlWinParser_GetFontFixed, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetFontUnderlined", (PyCFunction) _wrap_wxHtmlWinParser_SetFontUnderlined, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetFontUnderlined", (PyCFunction) _wrap_wxHtmlWinParser_GetFontUnderlined, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetFontItalic", (PyCFunction) _wrap_wxHtmlWinParser_SetFontItalic, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetFontItalic", (PyCFunction) _wrap_wxHtmlWinParser_GetFontItalic, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetFontBold", (PyCFunction) _wrap_wxHtmlWinParser_SetFontBold, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetFontBold", (PyCFunction) _wrap_wxHtmlWinParser_GetFontBold, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetFontSize", (PyCFunction) _wrap_wxHtmlWinParser_SetFontSize, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetFontSize", (PyCFunction) _wrap_wxHtmlWinParser_GetFontSize, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_CloseContainer", (PyCFunction) _wrap_wxHtmlWinParser_CloseContainer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetContainer", (PyCFunction) _wrap_wxHtmlWinParser_SetContainer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_OpenContainer", (PyCFunction) _wrap_wxHtmlWinParser_OpenContainer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetContainer", (PyCFunction) _wrap_wxHtmlWinParser_GetContainer, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetFonts", (PyCFunction) _wrap_wxHtmlWinParser_SetFonts, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetWindow", (PyCFunction) _wrap_wxHtmlWinParser_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetCharWidth", (PyCFunction) _wrap_wxHtmlWinParser_GetCharWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetCharHeight", (PyCFunction) _wrap_wxHtmlWinParser_GetCharHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_GetDC", (PyCFunction) _wrap_wxHtmlWinParser_GetDC, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_SetDC", (PyCFunction) _wrap_wxHtmlWinParser_SetDC, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlWinParser", (PyCFunction) _wrap_new_wxHtmlWinParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_PopTagHandler", (PyCFunction) _wrap_wxHtmlParser_PopTagHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_PushTagHandler", (PyCFunction) _wrap_wxHtmlParser_PushTagHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_GetSource", (PyCFunction) _wrap_wxHtmlParser_GetSource, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_AddTagHandler", (PyCFunction) _wrap_wxHtmlParser_AddTagHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_DoParsing", (PyCFunction) _wrap_wxHtmlParser_DoParsing, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_DoneParser", (PyCFunction) _wrap_wxHtmlParser_DoneParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_InitParser", (PyCFunction) _wrap_wxHtmlParser_InitParser, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_Parse", (PyCFunction) _wrap_wxHtmlParser_Parse, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_GetFS", (PyCFunction) _wrap_wxHtmlParser_GetFS, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_SetFS", (PyCFunction) _wrap_wxHtmlParser_SetFS, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_GetEndPos2", (PyCFunction) _wrap_wxHtmlTag_GetEndPos2, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_GetEndPos1", (PyCFunction) _wrap_wxHtmlTag_GetEndPos1, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_GetBeginPos", (PyCFunction) _wrap_wxHtmlTag_GetBeginPos, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_HasEnding", (PyCFunction) _wrap_wxHtmlTag_HasEnding, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_IsEnding", (PyCFunction) _wrap_wxHtmlTag_IsEnding, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_GetAllParams", (PyCFunction) _wrap_wxHtmlTag_GetAllParams, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_GetParam", (PyCFunction) _wrap_wxHtmlTag_GetParam, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_HasParam", (PyCFunction) _wrap_wxHtmlTag_HasParam, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlTag_GetName", (PyCFunction) _wrap_wxHtmlTag_GetName, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlLinkInfo_GetHtmlCell", (PyCFunction) _wrap_wxHtmlLinkInfo_GetHtmlCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlLinkInfo_GetEvent", (PyCFunction) _wrap_wxHtmlLinkInfo_GetEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlLinkInfo_GetTarget", (PyCFunction) _wrap_wxHtmlLinkInfo_GetTarget, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlLinkInfo_GetHref", (PyCFunction) _wrap_wxHtmlLinkInfo_GetHref, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlLinkInfo", (PyCFunction) _wrap_new_wxHtmlLinkInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_AddFilter", (PyCFunction) _wrap_wxHtmlWindow_AddFilter, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWinParser_AddTagHandler", (PyCFunction) _wrap_wxHtmlWinParser_AddTagHandler, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_class_wxHtmlParser","_class_wxHtmlWinParser",SwigwxHtmlWinParserTowxHtmlParser}, + { "_class_wxHtmlParser","_wxHtmlWinParser",SwigwxHtmlWinParserTowxHtmlParser}, + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxEvtHandler}, + { "_byte","_unsigned_char",0}, + { "_wxPyPrintout","_class_wxHtmlPrintout",SwigwxHtmlPrintoutTowxPyPrintout}, + { "_wxPyPrintout","_wxHtmlPrintout",SwigwxHtmlPrintoutTowxPyPrintout}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_wxPanel","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel}, + { "_wxPanel","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel}, + { "_class_wxPyPrintout","_class_wxHtmlPrintout",SwigwxHtmlPrintoutTowxPyPrintout}, + { "_class_wxPyPrintout","_wxHtmlPrintout",SwigwxHtmlPrintoutTowxPyPrintout}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, + { "_wxHtmlCell","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, + { "_wxHtmlCell","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, + { "_wxHtmlCell","_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, + { "_wxHtmlCell","_class_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, + { "_wxHtmlCell","_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, + { "_char","_wxChar",0}, + { "_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, + { "_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_class_wxPanel","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel}, + { "_class_wxPanel","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_class_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, + { "_class_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, + { "_class_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, + { "_class_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, + { "_class_wxHtmlCell","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, + { "_class_wxHtmlCell","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, + { "_class_wxHtmlCell","_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, + { "_class_wxHtmlCell","_class_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, + { "_class_wxHtmlCell","_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxScrolledWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, + { "_wxScrolledWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxHtmlParser","_class_wxHtmlWinParser",SwigwxHtmlWinParserTowxHtmlParser}, + { "_wxHtmlParser","_wxHtmlWinParser",SwigwxHtmlWinParserTowxHtmlParser}, + { "_wxEvtHandler","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxEvtHandler}, + { "_wxEvtHandler","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxEvtHandler}, + { "_class_wxScrolledWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, + { "_class_wxScrolledWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, + { "_wxWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, + { "_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) inithtmlc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("htmlc", htmlcMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxHTML_ALIGN_LEFT", PyInt_FromLong((long) wxHTML_ALIGN_LEFT)); + PyDict_SetItemString(d,"wxHTML_ALIGN_CENTER", PyInt_FromLong((long) wxHTML_ALIGN_CENTER)); + PyDict_SetItemString(d,"wxHTML_ALIGN_RIGHT", PyInt_FromLong((long) wxHTML_ALIGN_RIGHT)); + PyDict_SetItemString(d,"wxHTML_ALIGN_BOTTOM", PyInt_FromLong((long) wxHTML_ALIGN_BOTTOM)); + PyDict_SetItemString(d,"wxHTML_ALIGN_TOP", PyInt_FromLong((long) wxHTML_ALIGN_TOP)); + PyDict_SetItemString(d,"wxHTML_CLR_FOREGROUND", PyInt_FromLong((long) wxHTML_CLR_FOREGROUND)); + PyDict_SetItemString(d,"wxHTML_CLR_BACKGROUND", PyInt_FromLong((long) wxHTML_CLR_BACKGROUND)); + PyDict_SetItemString(d,"wxHTML_UNITS_PIXELS", PyInt_FromLong((long) wxHTML_UNITS_PIXELS)); + PyDict_SetItemString(d,"wxHTML_UNITS_PERCENT", PyInt_FromLong((long) wxHTML_UNITS_PERCENT)); + PyDict_SetItemString(d,"wxHTML_INDENT_LEFT", PyInt_FromLong((long) wxHTML_INDENT_LEFT)); + PyDict_SetItemString(d,"wxHTML_INDENT_RIGHT", PyInt_FromLong((long) wxHTML_INDENT_RIGHT)); + PyDict_SetItemString(d,"wxHTML_INDENT_TOP", PyInt_FromLong((long) wxHTML_INDENT_TOP)); + PyDict_SetItemString(d,"wxHTML_INDENT_BOTTOM", PyInt_FromLong((long) wxHTML_INDENT_BOTTOM)); + PyDict_SetItemString(d,"wxHTML_INDENT_HORIZONTAL", PyInt_FromLong((long) wxHTML_INDENT_HORIZONTAL)); + PyDict_SetItemString(d,"wxHTML_INDENT_VERTICAL", PyInt_FromLong((long) wxHTML_INDENT_VERTICAL)); + PyDict_SetItemString(d,"wxHTML_INDENT_ALL", PyInt_FromLong((long) wxHTML_INDENT_ALL)); + PyDict_SetItemString(d,"wxHTML_COND_ISANCHOR", PyInt_FromLong((long) wxHTML_COND_ISANCHOR)); + PyDict_SetItemString(d,"wxHTML_COND_ISIMAGEMAP", PyInt_FromLong((long) wxHTML_COND_ISIMAGEMAP)); + PyDict_SetItemString(d,"wxHTML_COND_USER", PyInt_FromLong((long) wxHTML_COND_USER)); + PyDict_SetItemString(d,"wxPAGE_ODD", PyInt_FromLong((long) wxPAGE_ODD)); + PyDict_SetItemString(d,"wxPAGE_EVEN", PyInt_FromLong((long) wxPAGE_EVEN)); + PyDict_SetItemString(d,"wxPAGE_ALL", PyInt_FromLong((long) wxPAGE_ALL)); + + + inithtmlhelpc(); + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/utils/wxPython/modules/html/html.py b/wxPython/src/gtk/html.py similarity index 98% rename from utils/wxPython/modules/html/html.py rename to wxPython/src/gtk/html.py index 4231aac0cd..f8795bcd53 100644 --- a/utils/wxPython/modules/html/html.py +++ b/wxPython/src/gtk/html.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * import wx class wxHtmlLinkInfoPtr : def __init__(self,this): @@ -112,6 +118,7 @@ class wxHtmlParserPtr : return val def GetFS(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_GetFS,(self,) + _args, _kwargs) + if val: val = wxFileSystemPtr(val) return val def Parse(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_Parse,(self,) + _args, _kwargs) @@ -280,7 +287,7 @@ class wxHtmlTagHandler(wxHtmlTagHandlerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlc.new_wxHtmlTagHandler,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxHtmlTagHandler) @@ -308,7 +315,7 @@ class wxHtmlWinTagHandler(wxHtmlWinTagHandlerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlc.new_wxHtmlWinTagHandler,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxHtmlWinTagHandler) @@ -569,9 +576,9 @@ class wxHtmlWindow(wxHtmlWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(htmlc.new_wxHtmlWindow,_args,_kwargs) self.thisown = 1 - self._setSelf(self) - wx._StdWindowCallbacks(self) - wx._StdOnScrollCallbacks(self) + self._setSelf(self, wxHtmlWindow) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) diff --git a/wxPython/src/gtk/htmlhelp.cpp b/wxPython/src/gtk/htmlhelp.cpp new file mode 100644 index 0000000000..64ecfb1525 --- /dev/null +++ b/wxPython/src/gtk/htmlhelp.cpp @@ -0,0 +1,2995 @@ +/* + * FILE : src/gtk/htmlhelp.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init inithtmlhelpc + +#define SWIG_name "htmlhelpc" + +#include "export.h" +#include +#include +#include +#include +#include +#include + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; +#ifdef __cplusplus +extern "C" { +#endif +#define new_wxHtmlHelpFrameCfg() (new wxHtmlHelpFrameCfg()) +static PyObject *_wrap_new_wxHtmlHelpFrameCfg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrameCfg * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlHelpFrameCfg",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlHelpFrameCfg *)new_wxHtmlHelpFrameCfg(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpFrameCfg_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) +static PyObject *_wrap_wxHtmlHelpFrameCfg_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxHtmlHelpFrameCfg_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_x_set. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_x_get(_swigobj) ((long ) _swigobj->x) +static PyObject *_wrap_wxHtmlHelpFrameCfg_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrameCfg_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_x_get. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_x_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) +static PyObject *_wrap_wxHtmlHelpFrameCfg_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxHtmlHelpFrameCfg_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_y_set. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_y_get(_swigobj) ((long ) _swigobj->y) +static PyObject *_wrap_wxHtmlHelpFrameCfg_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrameCfg_y_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_y_get. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_y_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_w_set(_swigobj,_swigval) (_swigobj->w = _swigval,_swigval) +static PyObject *_wrap_wxHtmlHelpFrameCfg_w_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","w", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxHtmlHelpFrameCfg_w_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_w_set. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_w_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_w_get(_swigobj) ((long ) _swigobj->w) +static PyObject *_wrap_wxHtmlHelpFrameCfg_w_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrameCfg_w_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_w_get. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_w_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_h_set(_swigobj,_swigval) (_swigobj->h = _swigval,_swigval) +static PyObject *_wrap_wxHtmlHelpFrameCfg_h_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","h", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxHtmlHelpFrameCfg_h_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_h_set. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_h_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_h_get(_swigobj) ((long ) _swigobj->h) +static PyObject *_wrap_wxHtmlHelpFrameCfg_h_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrameCfg_h_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_h_get. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_h_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_sashpos_set(_swigobj,_swigval) (_swigobj->sashpos = _swigval,_swigval) +static PyObject *_wrap_wxHtmlHelpFrameCfg_sashpos_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","sashpos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxHtmlHelpFrameCfg_sashpos_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_sashpos_set. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_sashpos_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_sashpos_get(_swigobj) ((long ) _swigobj->sashpos) +static PyObject *_wrap_wxHtmlHelpFrameCfg_sashpos_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxHtmlHelpFrameCfg * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrameCfg_sashpos_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_sashpos_get. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxHtmlHelpFrameCfg_sashpos_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_navig_on_set(_swigobj,_swigval) (_swigobj->navig_on = _swigval,_swigval) +static PyObject *_wrap_wxHtmlHelpFrameCfg_navig_on_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlHelpFrameCfg * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","navig_on", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlHelpFrameCfg_navig_on_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_navig_on_set. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlHelpFrameCfg_navig_on_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlHelpFrameCfg_navig_on_get(_swigobj) ((bool ) _swigobj->navig_on) +static PyObject *_wrap_wxHtmlHelpFrameCfg_navig_on_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlHelpFrameCfg * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrameCfg_navig_on_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrameCfg_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrameCfg_navig_on_get. Expected _wxHtmlHelpFrameCfg_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlHelpFrameCfg_navig_on_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define new_wxHtmlBookRecord(_swigarg0,_swigarg1,_swigarg2) (new wxHtmlBookRecord(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlBookRecord * _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "basepath","title","start", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:new_wxHtmlBookRecord",_kwnames,&_obj0,&_obj1,&_obj2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlBookRecord *)new_wxHtmlBookRecord(*_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlBookRecord_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlBookRecord_GetTitle(_swigobj) (_swigobj->GetTitle()) +static PyObject *_wrap_wxHtmlBookRecord_GetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlBookRecord * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlBookRecord_GetTitle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlBookRecord_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlBookRecord_GetTitle. Expected _wxHtmlBookRecord_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlBookRecord_GetTitle(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlBookRecord_GetStart(_swigobj) (_swigobj->GetStart()) +static PyObject *_wrap_wxHtmlBookRecord_GetStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlBookRecord * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlBookRecord_GetStart",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlBookRecord_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlBookRecord_GetStart. Expected _wxHtmlBookRecord_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlBookRecord_GetStart(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlBookRecord_GetBasePath(_swigobj) (_swigobj->GetBasePath()) +static PyObject *_wrap_wxHtmlBookRecord_GetBasePath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlBookRecord * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlBookRecord_GetBasePath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlBookRecord_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlBookRecord_GetBasePath. Expected _wxHtmlBookRecord_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlBookRecord_GetBasePath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlBookRecord_SetContentsRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetContentsRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlBookRecord_SetContentsRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlBookRecord * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","start","end", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxHtmlBookRecord_SetContentsRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlBookRecord_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlBookRecord_SetContentsRange. Expected _wxHtmlBookRecord_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlBookRecord_SetContentsRange(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlBookRecord_GetContentsStart(_swigobj) (_swigobj->GetContentsStart()) +static PyObject *_wrap_wxHtmlBookRecord_GetContentsStart(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlBookRecord * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlBookRecord_GetContentsStart",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlBookRecord_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlBookRecord_GetContentsStart. Expected _wxHtmlBookRecord_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlBookRecord_GetContentsStart(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlBookRecord_GetContentsEnd(_swigobj) (_swigobj->GetContentsEnd()) +static PyObject *_wrap_wxHtmlBookRecord_GetContentsEnd(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlBookRecord * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlBookRecord_GetContentsEnd",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlBookRecord_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlBookRecord_GetContentsEnd. Expected _wxHtmlBookRecord_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlBookRecord_GetContentsEnd(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlContentsItem_m_Level_set(_swigobj,_swigval) (_swigobj->m_Level = _swigval,_swigval) +static PyObject *_wrap_wxHtmlContentsItem_m_Level_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + short _result; + wxHtmlContentsItem * _arg0; + short _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_Level", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxHtmlContentsItem_m_Level_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Level_set. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (short )wxHtmlContentsItem_m_Level_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); + return _resultobj; +} + +#define wxHtmlContentsItem_m_Level_get(_swigobj) ((short ) _swigobj->m_Level) +static PyObject *_wrap_wxHtmlContentsItem_m_Level_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + short _result; + wxHtmlContentsItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContentsItem_m_Level_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Level_get. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (short )wxHtmlContentsItem_m_Level_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); + return _resultobj; +} + +#define wxHtmlContentsItem_m_ID_set(_swigobj,_swigval) (_swigobj->m_ID = _swigval,_swigval) +static PyObject *_wrap_wxHtmlContentsItem_m_ID_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlContentsItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_ID", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlContentsItem_m_ID_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_ID_set. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlContentsItem_m_ID_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlContentsItem_m_ID_get(_swigobj) ((int ) _swigobj->m_ID) +static PyObject *_wrap_wxHtmlContentsItem_m_ID_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlContentsItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContentsItem_m_ID_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_ID_get. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlContentsItem_m_ID_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static char * wxHtmlContentsItem_m_Name_set(wxHtmlContentsItem *obj, char *val) { + if (obj->m_Name) delete [] obj->m_Name; + obj->m_Name = new char[strlen(val)+1]; + strcpy((char *)obj->m_Name,val); + return (char *) val; +} +static PyObject *_wrap_wxHtmlContentsItem_m_Name_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxHtmlContentsItem * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_Name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlContentsItem_m_Name_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Name_set. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxHtmlContentsItem_m_Name_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxHtmlContentsItem_m_Name_get(_swigobj) ((char *) _swigobj->m_Name) +static PyObject *_wrap_wxHtmlContentsItem_m_Name_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxHtmlContentsItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContentsItem_m_Name_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Name_get. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxHtmlContentsItem_m_Name_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +static char * wxHtmlContentsItem_m_Page_set(wxHtmlContentsItem *obj, char *val) { + if (obj->m_Page) delete [] obj->m_Page; + obj->m_Page = new char[strlen(val)+1]; + strcpy((char *)obj->m_Page,val); + return (char *) val; +} +static PyObject *_wrap_wxHtmlContentsItem_m_Page_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxHtmlContentsItem * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_Page", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxHtmlContentsItem_m_Page_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Page_set. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxHtmlContentsItem_m_Page_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxHtmlContentsItem_m_Page_get(_swigobj) ((char *) _swigobj->m_Page) +static PyObject *_wrap_wxHtmlContentsItem_m_Page_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxHtmlContentsItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContentsItem_m_Page_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Page_get. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxHtmlContentsItem_m_Page_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxHtmlContentsItem_m_Book_set(_swigobj,_swigval) (_swigobj->m_Book = _swigval,_swigval) +static PyObject *_wrap_wxHtmlContentsItem_m_Book_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlBookRecord * _result; + wxHtmlContentsItem * _arg0; + wxHtmlBookRecord * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","m_Book", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContentsItem_m_Book_set",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Book_set. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlBookRecord_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContentsItem_m_Book_set. Expected _wxHtmlBookRecord_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlBookRecord_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlContentsItem_m_Book_get(_swigobj) ((wxHtmlBookRecord *) _swigobj->m_Book) +static PyObject *_wrap_wxHtmlContentsItem_m_Book_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlBookRecord * _result; + wxHtmlContentsItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContentsItem_m_Book_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContentsItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContentsItem_m_Book_get. Expected _wxHtmlContentsItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlBookRecord *)wxHtmlContentsItem_m_Book_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlBookRecord_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlSearchStatus_Search(_swigobj) (_swigobj->Search()) +static PyObject *_wrap_wxHtmlSearchStatus_Search(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlSearchStatus * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlSearchStatus_Search",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlSearchStatus_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlSearchStatus_Search. Expected _wxHtmlSearchStatus_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlSearchStatus_Search(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlSearchStatus_IsActive(_swigobj) (_swigobj->IsActive()) +static PyObject *_wrap_wxHtmlSearchStatus_IsActive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlSearchStatus * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlSearchStatus_IsActive",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlSearchStatus_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlSearchStatus_IsActive. Expected _wxHtmlSearchStatus_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlSearchStatus_IsActive(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlSearchStatus_GetCurIndex(_swigobj) (_swigobj->GetCurIndex()) +static PyObject *_wrap_wxHtmlSearchStatus_GetCurIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlSearchStatus * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlSearchStatus_GetCurIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlSearchStatus_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlSearchStatus_GetCurIndex. Expected _wxHtmlSearchStatus_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlSearchStatus_GetCurIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlSearchStatus_GetMaxIndex(_swigobj) (_swigobj->GetMaxIndex()) +static PyObject *_wrap_wxHtmlSearchStatus_GetMaxIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlSearchStatus * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlSearchStatus_GetMaxIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlSearchStatus_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlSearchStatus_GetMaxIndex. Expected _wxHtmlSearchStatus_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlSearchStatus_GetMaxIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlSearchStatus_GetName(_swigobj) (_swigobj->GetName()) +static PyObject *_wrap_wxHtmlSearchStatus_GetName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlSearchStatus * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlSearchStatus_GetName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlSearchStatus_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlSearchStatus_GetName. Expected _wxHtmlSearchStatus_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxHtmlSearchStatus_GetName(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxHtmlSearchStatus_GetContentsItem(_swigobj) (_swigobj->GetContentsItem()) +static PyObject *_wrap_wxHtmlSearchStatus_GetContentsItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContentsItem * _result; + wxHtmlSearchStatus * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlSearchStatus_GetContentsItem",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlSearchStatus_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlSearchStatus_GetContentsItem. Expected _wxHtmlSearchStatus_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContentsItem *)wxHtmlSearchStatus_GetContentsItem(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContentsItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxHtmlHelpData() (new wxHtmlHelpData()) +static PyObject *_wrap_new_wxHtmlHelpData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpData * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlHelpData",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlHelpData *)new_wxHtmlHelpData(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxHtmlHelpData(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxHtmlHelpData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxHtmlHelpData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxHtmlHelpData. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxHtmlHelpData(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpData_SetTempDir(_swigobj,_swigarg0) (_swigobj->SetTempDir(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpData_SetTempDir(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpData_SetTempDir",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_SetTempDir. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpData_SetTempDir(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpData_AddBook(_swigobj,_swigarg0) (_swigobj->AddBook(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpData_AddBook(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlHelpData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","book", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpData_AddBook",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_AddBook. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlHelpData_AddBook(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpData_FindPageByName(_swigobj,_swigarg0) (_swigobj->FindPageByName(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpData_FindPageByName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlHelpData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","page", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpData_FindPageByName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_FindPageByName. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlHelpData_FindPageByName(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlHelpData_FindPageById(_swigobj,_swigarg0) (_swigobj->FindPageById(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpData_FindPageById(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlHelpData * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlHelpData_FindPageById",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_FindPageById. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxHtmlHelpData_FindPageById(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxHtmlHelpData_GetBookRecArray(_swigobj) (_swigobj->GetBookRecArray()) +static PyObject *_wrap_wxHtmlHelpData_GetBookRecArray(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlBookRecArray * _result; + wxHtmlHelpData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpData_GetBookRecArray",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_GetBookRecArray. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxHtmlBookRecArray & _result_ref = wxHtmlHelpData_GetBookRecArray(_arg0); + _result = (wxHtmlBookRecArray *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlBookRecArray_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlHelpData_GetContents(_swigobj) (_swigobj->GetContents()) +static PyObject *_wrap_wxHtmlHelpData_GetContents(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContentsItem * _result; + wxHtmlHelpData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpData_GetContents",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_GetContents. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetContents(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContentsItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlHelpData_GetContentsCnt(_swigobj) (_swigobj->GetContentsCnt()) +static PyObject *_wrap_wxHtmlHelpData_GetContentsCnt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlHelpData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpData_GetContentsCnt",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_GetContentsCnt. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlHelpData_GetContentsCnt(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlHelpData_GetIndex(_swigobj) (_swigobj->GetIndex()) +static PyObject *_wrap_wxHtmlHelpData_GetIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlContentsItem * _result; + wxHtmlHelpData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpData_GetIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_GetIndex. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlContentsItem *)wxHtmlHelpData_GetIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlContentsItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlHelpData_GetIndexCnt(_swigobj) (_swigobj->GetIndexCnt()) +static PyObject *_wrap_wxHtmlHelpData_GetIndexCnt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxHtmlHelpData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpData_GetIndexCnt",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpData_GetIndexCnt. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxHtmlHelpData_GetIndexCnt(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxHtmlHelpFrameTowxFrame(void *ptr) { + wxHtmlHelpFrame *src; + wxFrame *dest; + src = (wxHtmlHelpFrame *) ptr; + dest = (wxFrame *) src; + return (void *) dest; +} + +static void *SwigwxHtmlHelpFrameTowxWindow(void *ptr) { + wxHtmlHelpFrame *src; + wxWindow *dest; + src = (wxHtmlHelpFrame *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxHtmlHelpFrameTowxEvtHandler(void *ptr) { + wxHtmlHelpFrame *src; + wxEvtHandler *dest; + src = (wxHtmlHelpFrame *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxHtmlHelpFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxHtmlHelpFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _result; + wxWindow * _arg0; + int _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + int _arg3 = (int ) wxHF_DEFAULTSTYLE; + wxHtmlHelpData * _arg4 = (wxHtmlHelpData *) NULL; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "parent","wxWindowID","title","style","data", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OiO:new_wxHtmlHelpFrame",_kwnames,&_argo0,&_arg1,&_obj2,&_arg3,&_argo4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlHelpFrame. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxHtmlHelpData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxHtmlHelpFrame. Expected _wxHtmlHelpData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlHelpFrame *)new_wxHtmlHelpFrame(_arg0,_arg1,*_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlHelpFrame_GetData(_swigobj) (_swigobj->GetData()) +static PyObject *_wrap_wxHtmlHelpFrame_GetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpData * _result; + wxHtmlHelpFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrame_GetData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_GetData. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlHelpData *)wxHtmlHelpFrame_GetData(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlHelpFrame_SetTitleFormat(_swigobj,_swigarg0) (_swigobj->SetTitleFormat(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpFrame_SetTitleFormat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","format", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpFrame_SetTitleFormat",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_SetTitleFormat. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_SetTitleFormat(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpFrame_Display(_swigobj,_swigarg0) (_swigobj->Display(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpFrame_Display(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpFrame_Display",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_Display. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_Display(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpFrame_DisplayID(_swigobj,_swigarg0) (_swigobj->Display(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpFrame_DisplayID(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlHelpFrame_DisplayID",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_DisplayID. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_DisplayID(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpFrame_DisplayContents(_swigobj) (_swigobj->DisplayContents()) +static PyObject *_wrap_wxHtmlHelpFrame_DisplayContents(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrame_DisplayContents",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_DisplayContents. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_DisplayContents(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpFrame_DisplayIndex(_swigobj) (_swigobj->DisplayIndex()) +static PyObject *_wrap_wxHtmlHelpFrame_DisplayIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpFrame_DisplayIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_DisplayIndex. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_DisplayIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpFrame_KeywordSearch(_swigobj,_swigarg0) (_swigobj->KeywordSearch(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpFrame_KeywordSearch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlHelpFrame * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","keyword", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpFrame_KeywordSearch",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_KeywordSearch. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlHelpFrame_KeywordSearch(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpFrame_UseConfig(_swigobj,_swigarg0,_swigarg1) (_swigobj->UseConfig(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlHelpFrame_UseConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + wxConfigBase * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","config","rootpath", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlHelpFrame_UseConfig",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_UseConfig. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpFrame_UseConfig. Expected _wxConfigBase_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_UseConfig(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlHelpFrame_ReadCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReadCustomization(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlHelpFrame_ReadCustomization(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + wxConfigBase * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","cfg","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlHelpFrame_ReadCustomization",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_ReadCustomization. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpFrame_ReadCustomization. Expected _wxConfigBase_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_ReadCustomization(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlHelpFrame_WriteCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->WriteCustomization(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlHelpFrame_WriteCustomization(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _arg0; + wxConfigBase * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","cfg","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlHelpFrame_WriteCustomization",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpFrame_WriteCustomization. Expected _wxHtmlHelpFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpFrame_WriteCustomization. Expected _wxConfigBase_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpFrame_WriteCustomization(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static void *SwigwxHtmlHelpControllerTowxEvtHandler(void *ptr) { + wxHtmlHelpController *src; + wxEvtHandler *dest; + src = (wxHtmlHelpController *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxHtmlHelpController() (new wxHtmlHelpController()) +static PyObject *_wrap_new_wxHtmlHelpController(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlHelpController",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlHelpController *)new_wxHtmlHelpController(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpController_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxHtmlHelpController(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxHtmlHelpController(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxHtmlHelpController",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxHtmlHelpController. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxHtmlHelpController(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpController_SetTitleFormat(_swigobj,_swigarg0) (_swigobj->SetTitleFormat(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpController_SetTitleFormat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","format", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpController_SetTitleFormat",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_SetTitleFormat. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_SetTitleFormat(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpController_SetTempDir(_swigobj,_swigarg0) (_swigobj->SetTempDir(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpController_SetTempDir(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpController_SetTempDir",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_SetTempDir. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_SetTempDir(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpController_AddBook(_swigobj,_swigarg0,_swigarg1) (_swigobj->AddBook(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlHelpController_AddBook(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlHelpController * _arg0; + wxString * _arg1; + int _arg2 = (int ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","book","show_wait_msg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxHtmlHelpController_AddBook",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_AddBook. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlHelpController_AddBook(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpController_Display(_swigobj,_swigarg0) (_swigobj->Display(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpController_Display(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpController_Display",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_Display. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_Display(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpController_DisplayID(_swigobj,_swigarg0) (_swigobj->Display(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpController_DisplayID(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxHtmlHelpController_DisplayID",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_DisplayID. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_DisplayID(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpController_DisplayContents(_swigobj) (_swigobj->DisplayContents()) +static PyObject *_wrap_wxHtmlHelpController_DisplayContents(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpController_DisplayContents",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_DisplayContents. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_DisplayContents(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpController_DisplayIndex(_swigobj) (_swigobj->DisplayIndex()) +static PyObject *_wrap_wxHtmlHelpController_DisplayIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpController_DisplayIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_DisplayIndex. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_DisplayIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxHtmlHelpController_KeywordSearch(_swigobj,_swigarg0) (_swigobj->KeywordSearch(_swigarg0)) +static PyObject *_wrap_wxHtmlHelpController_KeywordSearch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlHelpController * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","keyword", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlHelpController_KeywordSearch",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_KeywordSearch. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxHtmlHelpController_KeywordSearch(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlHelpController_UseConfig(_swigobj,_swigarg0,_swigarg1) (_swigobj->UseConfig(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlHelpController_UseConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + wxConfigBase * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","config","rootpath", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlHelpController_UseConfig",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_UseConfig. Expected _wxHtmlHelpController_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpController_UseConfig. Expected _wxConfigBase_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_UseConfig(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlHelpController_ReadCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReadCustomization(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlHelpController_ReadCustomization(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + wxConfigBase * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","cfg","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlHelpController_ReadCustomization",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_ReadCustomization. Expected _wxHtmlHelpController_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpController_ReadCustomization. Expected _wxConfigBase_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_ReadCustomization(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlHelpController_WriteCustomization(_swigobj,_swigarg0,_swigarg1) (_swigobj->WriteCustomization(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlHelpController_WriteCustomization(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpController * _arg0; + wxConfigBase * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","cfg","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxHtmlHelpController_WriteCustomization",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_WriteCustomization. Expected _wxHtmlHelpController_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlHelpController_WriteCustomization. Expected _wxConfigBase_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxHtmlHelpController_WriteCustomization(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxHtmlHelpController_GetFrame(_swigobj) (_swigobj->GetFrame()) +static PyObject *_wrap_wxHtmlHelpController_GetFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlHelpFrame * _result; + wxHtmlHelpController * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlHelpController_GetFrame",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlHelpController_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlHelpController_GetFrame. Expected _wxHtmlHelpController_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxHtmlHelpFrame *)wxHtmlHelpController_GetFrame(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlHelpFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyMethodDef htmlhelpcMethods[] = { + { "wxHtmlHelpController_GetFrame", (PyCFunction) _wrap_wxHtmlHelpController_GetFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_WriteCustomization", (PyCFunction) _wrap_wxHtmlHelpController_WriteCustomization, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_ReadCustomization", (PyCFunction) _wrap_wxHtmlHelpController_ReadCustomization, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_UseConfig", (PyCFunction) _wrap_wxHtmlHelpController_UseConfig, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_KeywordSearch", (PyCFunction) _wrap_wxHtmlHelpController_KeywordSearch, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_DisplayIndex", (PyCFunction) _wrap_wxHtmlHelpController_DisplayIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_DisplayContents", (PyCFunction) _wrap_wxHtmlHelpController_DisplayContents, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_DisplayID", (PyCFunction) _wrap_wxHtmlHelpController_DisplayID, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_Display", (PyCFunction) _wrap_wxHtmlHelpController_Display, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_AddBook", (PyCFunction) _wrap_wxHtmlHelpController_AddBook, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_SetTempDir", (PyCFunction) _wrap_wxHtmlHelpController_SetTempDir, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpController_SetTitleFormat", (PyCFunction) _wrap_wxHtmlHelpController_SetTitleFormat, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxHtmlHelpController", (PyCFunction) _wrap_delete_wxHtmlHelpController, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlHelpController", (PyCFunction) _wrap_new_wxHtmlHelpController, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_WriteCustomization", (PyCFunction) _wrap_wxHtmlHelpFrame_WriteCustomization, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_ReadCustomization", (PyCFunction) _wrap_wxHtmlHelpFrame_ReadCustomization, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_UseConfig", (PyCFunction) _wrap_wxHtmlHelpFrame_UseConfig, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_KeywordSearch", (PyCFunction) _wrap_wxHtmlHelpFrame_KeywordSearch, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_DisplayIndex", (PyCFunction) _wrap_wxHtmlHelpFrame_DisplayIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_DisplayContents", (PyCFunction) _wrap_wxHtmlHelpFrame_DisplayContents, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_DisplayID", (PyCFunction) _wrap_wxHtmlHelpFrame_DisplayID, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_Display", (PyCFunction) _wrap_wxHtmlHelpFrame_Display, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_SetTitleFormat", (PyCFunction) _wrap_wxHtmlHelpFrame_SetTitleFormat, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrame_GetData", (PyCFunction) _wrap_wxHtmlHelpFrame_GetData, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlHelpFrame", (PyCFunction) _wrap_new_wxHtmlHelpFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_GetIndexCnt", (PyCFunction) _wrap_wxHtmlHelpData_GetIndexCnt, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_GetIndex", (PyCFunction) _wrap_wxHtmlHelpData_GetIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_GetContentsCnt", (PyCFunction) _wrap_wxHtmlHelpData_GetContentsCnt, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_GetContents", (PyCFunction) _wrap_wxHtmlHelpData_GetContents, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_GetBookRecArray", (PyCFunction) _wrap_wxHtmlHelpData_GetBookRecArray, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_FindPageById", (PyCFunction) _wrap_wxHtmlHelpData_FindPageById, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_FindPageByName", (PyCFunction) _wrap_wxHtmlHelpData_FindPageByName, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_AddBook", (PyCFunction) _wrap_wxHtmlHelpData_AddBook, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpData_SetTempDir", (PyCFunction) _wrap_wxHtmlHelpData_SetTempDir, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxHtmlHelpData", (PyCFunction) _wrap_delete_wxHtmlHelpData, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlHelpData", (PyCFunction) _wrap_new_wxHtmlHelpData, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlSearchStatus_GetContentsItem", (PyCFunction) _wrap_wxHtmlSearchStatus_GetContentsItem, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlSearchStatus_GetName", (PyCFunction) _wrap_wxHtmlSearchStatus_GetName, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlSearchStatus_GetMaxIndex", (PyCFunction) _wrap_wxHtmlSearchStatus_GetMaxIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlSearchStatus_GetCurIndex", (PyCFunction) _wrap_wxHtmlSearchStatus_GetCurIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlSearchStatus_IsActive", (PyCFunction) _wrap_wxHtmlSearchStatus_IsActive, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlSearchStatus_Search", (PyCFunction) _wrap_wxHtmlSearchStatus_Search, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Book_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Book_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Book_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Book_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Page_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Page_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Page_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Page_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Name_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Name_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Name_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Name_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_ID_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_ID_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_ID_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_ID_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Level_get", (PyCFunction) _wrap_wxHtmlContentsItem_m_Level_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContentsItem_m_Level_set", (PyCFunction) _wrap_wxHtmlContentsItem_m_Level_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlBookRecord_GetContentsEnd", (PyCFunction) _wrap_wxHtmlBookRecord_GetContentsEnd, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlBookRecord_GetContentsStart", (PyCFunction) _wrap_wxHtmlBookRecord_GetContentsStart, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlBookRecord_SetContentsRange", (PyCFunction) _wrap_wxHtmlBookRecord_SetContentsRange, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlBookRecord_GetBasePath", (PyCFunction) _wrap_wxHtmlBookRecord_GetBasePath, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlBookRecord_GetStart", (PyCFunction) _wrap_wxHtmlBookRecord_GetStart, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlBookRecord_GetTitle", (PyCFunction) _wrap_wxHtmlBookRecord_GetTitle, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlBookRecord", (PyCFunction) _wrap_new_wxHtmlBookRecord, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_navig_on_get", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_navig_on_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_navig_on_set", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_navig_on_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_sashpos_get", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_sashpos_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_sashpos_set", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_sashpos_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_h_get", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_h_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_h_set", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_h_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_w_get", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_w_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_w_set", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_w_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_y_get", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_y_set", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_x_get", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlHelpFrameCfg_x_set", (PyCFunction) _wrap_wxHtmlHelpFrameCfg_x_set, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlHelpFrameCfg", (PyCFunction) _wrap_new_wxHtmlHelpFrameCfg, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler}, + { "_class_wxEvtHandler","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler}, + { "_class_wxEvtHandler","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxEvtHandler}, + { "_class_wxEvtHandler","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxEvtHandler}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, + { "_class_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxFrame","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, + { "_wxFrame","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxEvtHandler","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler}, + { "_wxEvtHandler","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler}, + { "_wxEvtHandler","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxEvtHandler}, + { "_wxEvtHandler","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxEvtHandler}, + { "_wxWindow","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, + { "_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, + { "_class_wxFrame","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, + { "_class_wxFrame","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) inithtmlhelpc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("htmlhelpc", htmlhelpcMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxID_HTML_PANEL", PyInt_FromLong((long) wxID_HTML_PANEL)); + PyDict_SetItemString(d,"wxID_HTML_BACK", PyInt_FromLong((long) wxID_HTML_BACK)); + PyDict_SetItemString(d,"wxID_HTML_FORWARD", PyInt_FromLong((long) wxID_HTML_FORWARD)); + PyDict_SetItemString(d,"wxID_HTML_TREECTRL", PyInt_FromLong((long) wxID_HTML_TREECTRL)); + PyDict_SetItemString(d,"wxID_HTML_INDEXPAGE", PyInt_FromLong((long) wxID_HTML_INDEXPAGE)); + PyDict_SetItemString(d,"wxID_HTML_INDEXLIST", PyInt_FromLong((long) wxID_HTML_INDEXLIST)); + PyDict_SetItemString(d,"wxID_HTML_NOTEBOOK", PyInt_FromLong((long) wxID_HTML_NOTEBOOK)); + PyDict_SetItemString(d,"wxID_HTML_SEARCHPAGE", PyInt_FromLong((long) wxID_HTML_SEARCHPAGE)); + PyDict_SetItemString(d,"wxID_HTML_SEARCHTEXT", PyInt_FromLong((long) wxID_HTML_SEARCHTEXT)); + PyDict_SetItemString(d,"wxID_HTML_SEARCHLIST", PyInt_FromLong((long) wxID_HTML_SEARCHLIST)); + PyDict_SetItemString(d,"wxID_HTML_SEARCHBUTTON", PyInt_FromLong((long) wxID_HTML_SEARCHBUTTON)); + PyDict_SetItemString(d,"wxID_HTML_SEARCHCHOICE", PyInt_FromLong((long) wxID_HTML_SEARCHCHOICE)); + PyDict_SetItemString(d,"wxID_HTML_HELPFRAME", PyInt_FromLong((long) wxID_HTML_HELPFRAME)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/utils/wxPython/modules/html/htmlhelp.py b/wxPython/src/gtk/htmlhelp.py similarity index 99% rename from utils/wxPython/modules/html/htmlhelp.py rename to wxPython/src/gtk/htmlhelp.py index a3634b13aa..848ed85489 100644 --- a/utils/wxPython/modules/html/htmlhelp.py +++ b/wxPython/src/gtk/htmlhelp.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * class wxHtmlHelpFrameCfgPtr : def __init__(self,this): self.this = this diff --git a/utils/wxPython/src/gtk/image.cpp b/wxPython/src/gtk/image.cpp similarity index 79% rename from utils/wxPython/src/gtk/image.cpp rename to wxPython/src/gtk/image.cpp index d9f6e06f2c..5f6e8e862f 100644 --- a/utils/wxPython/src/gtk/image.cpp +++ b/wxPython/src/gtk/image.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/image.cpp + * FILE : src/gtk/image.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -56,48 +58,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -191,18 +173,40 @@ static PyObject *_wrap_wxImageFromMime(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageFromMime",_kwnames,&_obj0,&_obj1)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -446,11 +450,22 @@ static PyObject *_wrap_wxImageHandler_SetName(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -486,11 +501,22 @@ static PyObject *_wrap_wxImageHandler_SetExtension(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -554,11 +580,22 @@ static PyObject *_wrap_wxImageHandler_SetMimeType(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -810,7 +847,7 @@ static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwa PyObject * _resultobj; wxImage * _result; wxString * _arg0; - long _arg1 = (long ) wxBITMAP_TYPE_PNG; + long _arg1 = (long ) wxBITMAP_TYPE_ANY; PyObject * _obj0 = 0; char *_kwnames[] = { "name","type", NULL }; char _ptemp[128]; @@ -819,11 +856,22 @@ static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:new_wxImage",_kwnames,&_obj0,&_arg1)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -990,11 +1038,13 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args, PyObject *k #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1)) static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxImage * _result; wxImage * _arg0; int _arg1; int _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","width","height", NULL }; + char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_Rescale",_kwnames,&_argo0,&_arg1,&_arg2)) @@ -1008,11 +1058,17 @@ static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxImage_Rescale(_arg0,_arg1,_arg2); + wxImage & _result_ref = wxImage_Rescale(_arg0,_arg1,_arg2); + _result = (wxImage *) &_result_ref; wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } @@ -1157,11 +1213,22 @@ static PyObject *_wrap_wxImage_LoadFile(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1199,18 +1266,40 @@ static PyObject *_wrap_wxImage_LoadMimeFile(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1251,11 +1340,22 @@ static PyObject *_wrap_wxImage_SaveFile(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1293,18 +1393,40 @@ static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1441,6 +1563,73 @@ static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxImage_Copy(_swigobj) (_swigobj->Copy()) +static PyObject *_wrap_wxImage_Copy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_Copy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Copy(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _arg0; + wxImage * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","image","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxImage_Paste",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImage_Paste(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject * wxImage_GetData(wxImage *self) { unsigned char* data = self->GetData(); int len = self->GetWidth() * self->GetHeight() * 3; @@ -1483,7 +1672,7 @@ static void wxImage_SetData(wxImage *self,PyObject * data) { } size_t len = self->GetWidth() * self->GetHeight() * 3; - dataPtr = new unsigned char[len]; + dataPtr = (unsigned char*) malloc(len); memcpy(dataPtr, PyString_AsString(data), len); self->SetData(dataPtr); } @@ -1686,7 +1875,187 @@ static PyObject *_wrap_wxImage_HasMask(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxImage_Rotate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + double _arg1; + wxPoint * _arg2; + bool _arg3 = (bool ) TRUE; + wxPoint * _arg4 = (wxPoint *) NULL; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + wxPoint temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OdO|iO:wxImage_Rotate",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3,&_obj4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + _arg3 = (bool ) tempbool3; + if (_obj4) +{ + _arg4 = &temp0; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Rotate(_arg0,_arg1,*_arg2,_arg3,_arg4)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0)) +static PyObject *_wrap_wxImage_Rotate90(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","clockwise", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxImage_Rotate90",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rotate90. Expected _wxImage_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Rotate90(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0)) +static PyObject *_wrap_wxImage_Mirror(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","horizontally", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxImage_Mirror",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Mirror(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxImage_Replace(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _arg0; + unsigned char _arg1; + unsigned char _arg2; + unsigned char _arg3; + unsigned char _arg4; + unsigned char _arg5; + unsigned char _arg6; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","r1","g1","b1","r2","g2","b2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbbbbb:wxImage_Replace",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Replace. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImage_Replace(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0)) +static PyObject *_wrap_wxImage_CountColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _result; + wxImage * _arg0; + unsigned long _arg1 = (unsigned long ) (unsigned long)-1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","stopafter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxImage_CountColours",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (unsigned long )wxImage_CountColours(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + static PyMethodDef imagecMethods[] = { + { "wxImage_CountColours", (PyCFunction) _wrap_wxImage_CountColours, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Replace", (PyCFunction) _wrap_wxImage_Replace, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Mirror", (PyCFunction) _wrap_wxImage_Mirror, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Rotate90", (PyCFunction) _wrap_wxImage_Rotate90, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Rotate", (PyCFunction) _wrap_wxImage_Rotate, METH_VARARGS | METH_KEYWORDS }, { "wxImage_HasMask", (PyCFunction) _wrap_wxImage_HasMask, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetMask", (PyCFunction) _wrap_wxImage_SetMask, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetMaskBlue", (PyCFunction) _wrap_wxImage_GetMaskBlue, METH_VARARGS | METH_KEYWORDS }, @@ -1695,6 +2064,8 @@ static PyMethodDef imagecMethods[] = { { "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Paste", (PyCFunction) _wrap_wxImage_Paste, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Copy", (PyCFunction) _wrap_wxImage_Copy, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetSubImage", (PyCFunction) _wrap_wxImage_GetSubImage, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetHeight", (PyCFunction) _wrap_wxImage_GetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetWidth", (PyCFunction) _wrap_wxImage_GetWidth, METH_VARARGS | METH_KEYWORDS }, @@ -1744,11 +2115,7 @@ static PyMethodDef imagecMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_signed_long","_long",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1757,10 +2124,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, + { "_wxPrintQuality","_time_t",0}, { "_wxImageHandler","_class_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler}, { "_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler}, { "_wxImageHandler","_class_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler}, @@ -1775,84 +2139,43 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler}, { "_wxImageHandler","_class_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler}, { "_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_wxPen","_class_wxPen",0}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_class_wxMask","_wxMask",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxRect","_class_wxRect",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_wxFont","_class_wxFont",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_class_wxImageHandler","_class_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler}, { "_class_wxImageHandler","_wxTIFFHandler",SwigwxTIFFHandlerTowxImageHandler}, { "_class_wxImageHandler","_class_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler}, @@ -1867,24 +2190,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler}, { "_class_wxImageHandler","_class_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler}, { "_class_wxImageHandler","_wxPNGHandler",SwigwxPNGHandlerTowxImageHandler}, - { "_class_wxImageHandler","_wxImageHandler",0}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1893,20 +2212,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -1914,16 +2233,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_class_wxPalette","_wxPalette",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/image.py b/wxPython/src/gtk/image.py similarity index 88% rename from utils/wxPython/src/msw/image.py rename to wxPython/src/gtk/image.py index 6e5bbef780..29da52dcc2 100644 --- a/utils/wxPython/src/msw/image.py +++ b/wxPython/src/gtk/image.py @@ -162,6 +162,7 @@ class wxImagePtr : return val def Rescale(self, *_args, **_kwargs): val = apply(imagec.wxImage_Rescale,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) return val def SetRGB(self, *_args, **_kwargs): val = apply(imagec.wxImage_SetRGB,(self,) + _args, _kwargs) @@ -200,6 +201,13 @@ class wxImagePtr : val = apply(imagec.wxImage_GetSubImage,(self,) + _args, _kwargs) if val: val = wxImagePtr(val) ; val.thisown = 1 return val + def Copy(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Copy,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Paste(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Paste,(self,) + _args, _kwargs) + return val def GetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs) return val @@ -224,6 +232,24 @@ class wxImagePtr : def HasMask(self, *_args, **_kwargs): val = apply(imagec.wxImage_HasMask,(self,) + _args, _kwargs) return val + def Rotate(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Rotate,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Rotate90(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Rotate90,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Mirror(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Mirror,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Replace(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Replace,(self,) + _args, _kwargs) + return val + def CountColours(self, *_args, **_kwargs): + val = apply(imagec.wxImage_CountColours,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxImage(wxImagePtr): diff --git a/utils/wxPython/src/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp similarity index 68% rename from utils/wxPython/src/gtk/mdi.cpp rename to wxPython/src/gtk/mdi.cpp index a414baf61c..74f178ac02 100644 --- a/utils/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/mdi.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/mdi.cpp + * FILE : src/gtk/mdi.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -55,48 +57,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -137,8 +119,8 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -161,11 +143,22 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -466,8 +459,8 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj wxMDIParentFrame * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -490,11 +483,22 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -686,14 +690,7 @@ static PyMethodDef mdicMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -702,161 +699,46 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, { "_class_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, { "_class_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, { "_class_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow}, @@ -865,110 +747,48 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow}, { "_class_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, { "_class_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, { "_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, { "_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, { "_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, { "_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, - { "_wxFrame","_class_wxFrame",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -976,58 +796,24 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, { "_wxEvtHandler","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, { "_wxEvtHandler","_wxMDIClientWindow",SwigwxMDIClientWindowTowxEvtHandler}, { "_wxEvtHandler","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, { "_wxEvtHandler","_wxMDIChildFrame",SwigwxMDIChildFrameTowxEvtHandler}, { "_wxEvtHandler","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, { "_wxEvtHandler","_wxMDIParentFrame",SwigwxMDIParentFrameTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, { "_wxWindow","_class_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow}, { "_wxWindow","_wxMDIClientWindow",SwigwxMDIClientWindowTowxWindow}, { "_wxWindow","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow}, { "_wxWindow","_wxMDIChildFrame",SwigwxMDIChildFrameTowxWindow}, { "_wxWindow","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, { "_wxWindow","_wxMDIParentFrame",SwigwxMDIParentFrameTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, { "_class_wxFrame","_class_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, { "_class_wxFrame","_wxMDIChildFrame",SwigwxMDIChildFrameTowxFrame}, { "_class_wxFrame","_class_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, { "_class_wxFrame","_wxMDIParentFrame",SwigwxMDIParentFrameTowxFrame}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/gtk/mdi.py b/wxPython/src/gtk/mdi.py similarity index 95% rename from utils/wxPython/src/gtk/mdi.py rename to wxPython/src/gtk/mdi.py index 915646a66f..bd6c5062b4 100644 --- a/utils/wxPython/src/gtk/mdi.py +++ b/wxPython/src/gtk/mdi.py @@ -54,7 +54,7 @@ class wxMDIParentFrame(wxMDIParentFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIParentFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -78,7 +78,7 @@ class wxMDIChildFrame(wxMDIChildFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIChildFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -93,8 +93,8 @@ class wxMDIClientWindow(wxMDIClientWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIClientWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) - wx._StdOnScrollCallbacks(self) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) diff --git a/utils/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp similarity index 89% rename from utils/wxPython/src/gtk/misc.cpp rename to wxPython/src/gtk/misc.cpp index 4b47a57eb9..f80cea330f 100644 --- a/utils/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/misc.cpp + * FILE : src/gtk/misc.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,48 +60,28 @@ extern PyObject *SWIG_newvarlink(void); #include #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -107,6 +89,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); wxRegion reg2(*r2); @@ -120,7 +104,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool doSave = wxPyRestoreThread(); wxRect* newRect = new wxRect(dest); obj = wxPyConstructObject((void*)newRect, "wxRect"); - PyObject_SetAttrString(obj, "thisown", PyInt_FromLong(1)); + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(obj, "thisown", one); + Py_DECREF(one); wxPySaveThread(doSave); return obj; } @@ -133,6 +119,12 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxGetResource(section, entry, &retval, file); return retval; } + +#if 0 // we want to use the definition from the header, not the + // one SWIG will generate. +extern wxAcceleratorTable wxNullAcceleratorTable; + +#endif #ifdef __cplusplus extern "C" { #endif @@ -312,37 +304,6 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject return _resultobj; } -static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - int _arg1 = (int ) FALSE; - PyObject * _obj0 = 0; - char *_kwnames[] = { "command","sync", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxExecute",_kwnames,&_obj0,&_arg1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxExecute(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; @@ -451,11 +412,22 @@ static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -524,6 +496,28 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetOsDescription",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetOsDescription()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _arg0; @@ -542,6 +536,24 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } +static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _arg0; + char *_kwnames[] = { "milliseconds", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxUsleep",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxUsleep(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -559,23 +571,6 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSafeYield(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _arg0; @@ -627,11 +622,22 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStripMenuCodes",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -651,6 +657,201 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject return _resultobj; } +static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetEmailAddress",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetEmailAddress()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetFullHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetFullHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserId",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserId()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHomeDir",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHomeDir()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxAcceleratorEntry * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "label", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetAccelFromString",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static int _wrap_wxNullAcceleratorTable_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullAcceleratorTable is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullAcceleratorTable_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullAcceleratorTable,"_wxAcceleratorTable_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + #define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1252,6 +1453,121 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj return _resultobj; } +static wxRealPoint wxRealPoint___add__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxRealPoint wxRealPoint___sub__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxRealPoint___cmp__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1475,6 +1791,121 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject return _resultobj; } +static wxPoint wxPoint___add__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxPoint wxPoint___sub__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxPoint___cmp__(wxPoint *self,const wxPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2010,6 +2441,62 @@ static PyObject *_wrap_wxRect_SetBottom(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxRect_Inflate(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inflate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _arg0; + int _arg1; + int _arg2; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","dx","dy", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Inflate",_kwnames,&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxRect_Inflate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxRect_Inside(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inside(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRect * _arg0; + int _arg1; + int _arg2; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","cx","cy", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Inside",_kwnames,&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxRect_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2257,173 +2744,82 @@ static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define new_wxPyTimer(_swigarg0) (new wxPyTimer(_swigarg0)) -static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { +static wxRect wxRect___add__(wxRect *self,const wxRect * rect) { + if (! rect) return *self; + return *self + *rect; + } +static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxPyTimer * _result; - PyObject * _arg0; + wxRect * _result; + wxRect * _arg0; + wxRect * _arg1; + wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "notify", NULL }; + wxRect temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPyTimer",_kwnames,&_obj0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect___add__",_kwnames,&_obj0,&_obj1)) return NULL; { - _arg0 = _obj0; + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyTimer *)new_wxPyTimer(_arg0); + _result = new wxRect (wxRect___add__(_arg0,_arg1)); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTimer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } -#define delete_wxPyTimer(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPyTimer",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyTimer. Expected _wxPyTimer_p."); - return NULL; +static int wxRect___cmp__(wxRect *self,const wxRect * rect) { + if (! rect) return 0; + return *self == *rect; } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxPyTimer(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_GetInterval(_swigobj) (_swigobj->GetInterval()) -static PyObject *_wrap_wxPyTimer_GetInterval(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + wxRect * _arg0; + wxRect * _arg1; + wxRect temp; + PyObject * _obj0 = 0; + wxRect temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_GetInterval",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect___cmp__",_kwnames,&_obj0,&_obj1)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_GetInterval. Expected _wxPyTimer_p."); +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) return NULL; - } - } +} +{ + _arg1 = &temp0; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPyTimer_GetInterval(_arg0); + _result = (int )wxRect___cmp__(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxPyTimer_IsOneShot(_swigobj) (_swigobj->IsOneShot()) -static PyObject *_wrap_wxPyTimer_IsOneShot(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_IsOneShot",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_IsOneShot. Expected _wxPyTimer_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxPyTimer_IsOneShot(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyTimer_Start(_swigobj,_swigarg0,_swigarg1) (_swigobj->Start(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyTimer * _arg0; - int _arg1 = (int ) -1; - int _arg2 = (int ) FALSE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","milliseconds","oneShot", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyTimer_Start",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Start. Expected _wxPyTimer_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPyTimer_Start(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_Stop(_swigobj) (_swigobj->Stop()) -static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_Stop",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Stop. Expected _wxPyTimer_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPyTimer_Stop(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxIndividualLayoutConstraint_Above(_swigobj,_swigarg0,_swigarg1) (_swigobj->Above(_swigarg0,_swigarg1)) static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3067,19 +3463,23 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a return _resultobj; } -#define new_wxRegion() (new wxRegion()) +#define new_wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRegion * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + long _arg1 = (long ) 0; + long _arg2 = (long ) 0; + long _arg3 = (long ) 0; + char *_kwnames[] = { "x","y","width","height", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxRegion",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegion *)new_wxRegion(); + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4327,11 +4727,22 @@ static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxBusyInfo",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4442,12 +4853,8 @@ static PyMethodDef misccMethods[] = { { "wxIndividualLayoutConstraint_AsIs", (PyCFunction) _wrap_wxIndividualLayoutConstraint_AsIs, METH_VARARGS | METH_KEYWORDS }, { "wxIndividualLayoutConstraint_Absolute", (PyCFunction) _wrap_wxIndividualLayoutConstraint_Absolute, METH_VARARGS | METH_KEYWORDS }, { "wxIndividualLayoutConstraint_Above", (PyCFunction) _wrap_wxIndividualLayoutConstraint_Above, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_Stop", (PyCFunction) _wrap_wxPyTimer_Stop, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_Start", (PyCFunction) _wrap_wxPyTimer_Start, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_IsOneShot", (PyCFunction) _wrap_wxPyTimer_IsOneShot, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_GetInterval", (PyCFunction) _wrap_wxPyTimer_GetInterval, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxPyTimer", (PyCFunction) _wrap_delete_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPyTimer", (PyCFunction) _wrap_new_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, + { "wxRect___cmp__", (PyCFunction) _wrap_wxRect___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxRect___add__", (PyCFunction) _wrap_wxRect___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRect_asTuple", (PyCFunction) _wrap_wxRect_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxRect_height_get", (PyCFunction) _wrap_wxRect_height_get, METH_VARARGS | METH_KEYWORDS }, { "wxRect_height_set", (PyCFunction) _wrap_wxRect_height_set, METH_VARARGS | METH_KEYWORDS }, @@ -4457,6 +4864,8 @@ static PyMethodDef misccMethods[] = { { "wxRect_y_set", (PyCFunction) _wrap_wxRect_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxRect_x_get", (PyCFunction) _wrap_wxRect_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxRect_x_set", (PyCFunction) _wrap_wxRect_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Inside", (PyCFunction) _wrap_wxRect_Inside, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Inflate", (PyCFunction) _wrap_wxRect_Inflate, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetBottom", (PyCFunction) _wrap_wxRect_SetBottom, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetTop", (PyCFunction) _wrap_wxRect_SetTop, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetRight", (PyCFunction) _wrap_wxRect_SetRight, METH_VARARGS | METH_KEYWORDS }, @@ -4477,6 +4886,9 @@ static PyMethodDef misccMethods[] = { { "wxRect_GetX", (PyCFunction) _wrap_wxRect_GetX, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRect", (PyCFunction) _wrap_delete_wxRect, METH_VARARGS | METH_KEYWORDS }, { "new_wxRect", (PyCFunction) _wrap_new_wxRect, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___cmp__", (PyCFunction) _wrap_wxPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___sub__", (PyCFunction) _wrap_wxPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___add__", (PyCFunction) _wrap_wxPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_asTuple", (PyCFunction) _wrap_wxPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_Set", (PyCFunction) _wrap_wxPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPoint", (PyCFunction) _wrap_delete_wxPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4485,6 +4897,9 @@ static PyMethodDef misccMethods[] = { { "wxPoint_y_set", (PyCFunction) _wrap_wxPoint_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_get", (PyCFunction) _wrap_wxPoint_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_set", (PyCFunction) _wrap_wxPoint_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___cmp__", (PyCFunction) _wrap_wxRealPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___sub__", (PyCFunction) _wrap_wxRealPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___add__", (PyCFunction) _wrap_wxRealPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_asTuple", (PyCFunction) _wrap_wxRealPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_Set", (PyCFunction) _wrap_wxRealPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRealPoint", (PyCFunction) _wrap_delete_wxRealPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4511,12 +4926,20 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", (PyCFunction) _wrap_wxSize_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_get", (PyCFunction) _wrap_wxSize_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_set", (PyCFunction) _wrap_wxSize_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS }, + { "wxGetFullHostName", (PyCFunction) _wrap_wxGetFullHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHostName", (PyCFunction) _wrap_wxGetHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetEmailAddress", (PyCFunction) _wrap_wxGetEmailAddress, METH_VARARGS | METH_KEYWORDS }, { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, - { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, + { "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS }, { "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS }, + { "wxGetOsDescription", (PyCFunction) _wrap_wxGetOsDescription, METH_VARARGS | METH_KEYWORDS }, { "wxGetOsVersion", (PyCFunction) _wrap_wxGetOsVersion, METH_VARARGS | METH_KEYWORDS }, { "wxStartTimer", (PyCFunction) _wrap_wxStartTimer, METH_VARARGS | METH_KEYWORDS }, { "wxShell", (PyCFunction) _wrap_wxShell, METH_VARARGS | METH_KEYWORDS }, @@ -4524,7 +4947,6 @@ static PyMethodDef misccMethods[] = { { "wxIsBusy", (PyCFunction) _wrap_wxIsBusy, METH_VARARGS | METH_KEYWORDS }, { "wxGetMousePosition", (PyCFunction) _wrap_wxGetMousePosition, METH_VARARGS | METH_KEYWORDS }, { "wxGetElapsedTime", (PyCFunction) _wrap_wxGetElapsedTime, METH_VARARGS | METH_KEYWORDS }, - { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, { "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, { "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS }, @@ -4542,7 +4964,6 @@ static PyMethodDef misccMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_signed_long","_long",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, @@ -4552,59 +4973,48 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxPrintQuality","_time_t",0}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4614,6 +5024,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_signed_short",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4622,15 +5033,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -4638,10 +5054,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxSize","_wxSize",0}, {0,0,0}}; static PyObject *SWIG_globals; @@ -4675,6 +5089,8 @@ SWIGEXPORT(void) initmiscc() { PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); + PyDict_SetItemString(d,"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,"wxNullAcceleratorTable",_wrap_wxNullAcceleratorTable_get, _wrap_wxNullAcceleratorTable_set); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/utils/wxPython/src/gtk/misc.py b/wxPython/src/gtk/misc.py similarity index 91% rename from utils/wxPython/src/gtk/misc.py rename to wxPython/src/gtk/misc.py index 6632857793..d3cc3b8580 100644 --- a/utils/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/misc.py @@ -80,6 +80,17 @@ class wxRealPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRealPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___add__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRealPoint_x_set(self,value) @@ -119,6 +130,17 @@ class wxPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___add__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxPoint_x_set(self,value) @@ -208,9 +230,22 @@ class wxRectPtr : def SetBottom(self, *_args, **_kwargs): val = apply(miscc.wxRect_SetBottom,(self,) + _args, _kwargs) return val + def Inflate(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Inflate,(self,) + _args, _kwargs) + return val + def Inside(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Inside,(self,) + _args, _kwargs) + return val def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRect_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxRect___add__,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxRect___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRect_x_set(self,value) @@ -285,35 +320,6 @@ class wxRect(wxRectPtr): -class wxPyTimerPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxPyTimer(self) - def GetInterval(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_GetInterval,(self,) + _args, _kwargs) - return val - def IsOneShot(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_IsOneShot,(self,) + _args, _kwargs) - return val - def Start(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_Start,(self,) + _args, _kwargs) - return val - def Stop(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_Stop,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxPyTimer(wxPyTimerPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(miscc.new_wxPyTimer,_args,_kwargs) - self.thisown = 1 - - - - class wxIndividualLayoutConstraintPtr : def __init__(self,this): self.this = this @@ -621,8 +627,6 @@ wxDisplaySize = miscc.wxDisplaySize wxEndBusyCursor = miscc.wxEndBusyCursor -wxExecute = miscc.wxExecute - wxGetElapsedTime = miscc.wxGetElapsedTime wxGetMousePosition = miscc.wxGetMousePosition @@ -637,11 +641,13 @@ wxStartTimer = miscc.wxStartTimer wxGetOsVersion = miscc.wxGetOsVersion +wxGetOsDescription = miscc.wxGetOsDescription + wxSleep = miscc.wxSleep -wxYield = miscc.wxYield +wxUsleep = miscc.wxUsleep -wxSafeYield = miscc.wxSafeYield +wxYield = miscc.wxYield wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows @@ -649,6 +655,23 @@ wxGetResource = miscc.wxGetResource wxStripMenuCodes = miscc.wxStripMenuCodes +wxGetEmailAddress = miscc.wxGetEmailAddress + +wxGetHostName = miscc.wxGetHostName + +wxGetFullHostName = miscc.wxGetFullHostName + +wxGetUserId = miscc.wxGetUserId + +wxGetUserName = miscc.wxGetUserName + +wxGetHomeDir = miscc.wxGetHomeDir + +def wxGetAccelFromString(*_args, **_kwargs): + val = apply(miscc.wxGetAccelFromString,_args,_kwargs) + if val: val = wxAcceleratorEntryPtr(val) + return val + #-------------- VARIABLE WRAPPERS ------------------ @@ -675,3 +698,5 @@ wxAbsolute = miscc.wxAbsolute wxOutRegion = miscc.wxOutRegion wxPartRegion = miscc.wxPartRegion wxInRegion = miscc.wxInRegion +cvar = miscc.cvar +wxNullAcceleratorTable = wxAcceleratorTablePtr(miscc.cvar.wxNullAcceleratorTable) diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp new file mode 100644 index 0000000000..19fed346b9 --- /dev/null +++ b/wxPython/src/gtk/misc2.cpp @@ -0,0 +1,5648 @@ +/* + * FILE : src/gtk/misc2.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initmisc2c + +#define SWIG_name "misc2c" + +#include "helpers.h" +#include +#include +#include +#include +#include +#include +#include + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); + + + wxColour wxSystemSettings_GetSystemColour(int index) { + return wxSystemSettings::GetSystemColour(index); + } + + wxFont wxSystemSettings_GetSystemFont(int index) { + return wxSystemSettings::GetSystemFont(index); + } + + int wxSystemSettings_GetSystemMetric(int index) { + return wxSystemSettings::GetSystemMetric(index); + } + + void wxToolTip_Enable(bool flag) { + wxToolTip::Enable(flag); + } + + void wxToolTip_SetDelay(long milliseconds) { + wxToolTip::SetDelay(milliseconds); + } + + int wxCaret_GetBlinkTime() { + return wxCaret::GetBlinkTime(); + } + + void wxCaret_SetBlinkTime(int milliseconds) { + wxCaret::SetBlinkTime(milliseconds); + } + +class wxPyFontEnumerator : public wxFontEnumerator { +public: + wxPyFontEnumerator() {} + ~wxPyFontEnumerator() {} + + DEC_PYCALLBACK_BOOL_STRING(OnFacename); + DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFacename); +IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding); + + +class wxPyTipProvider : public wxTipProvider { +public: + wxPyTipProvider(size_t currentTip) + : wxTipProvider(currentTip) {} + + DEC_PYCALLBACK_STRING__pure(GetTip); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_STRING__pure( wxPyTipProvider, wxTipProvider, GetTip); + + +#include +static wxPoint wxPyNullPoint; + + +wxGenericDragImage* wxDragIcon(const wxIcon& image, + const wxCursor& cursor, + const wxPoint& hotspot) { + return new wxGenericDragImage(image, cursor, hotspot); +} + +wxGenericDragImage* wxDragString(const wxString& str, + const wxCursor& cursor, + const wxPoint& hotspot) { + return new wxGenericDragImage(str, cursor, hotspot); +} + +wxGenericDragImage* wxDragTreeItem(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) { + return new wxGenericDragImage(treeCtrl, id); +} + +wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) { + return new wxGenericDragImage(listCtrl, id); +} + + // C++ version of wxProcess derived class + +class wxPyProcess : public wxProcess { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1) + : wxProcess(parent, id) + {} + + DEC_PYCALLBACK_VOID_INTINT(OnTerminate); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char * _arg0; + char * _arg1 = (char *) NULL; + char * _arg2 = (char *) NULL; + char * _arg3 = (char *) NULL; + char * _arg4 = (char *) "*.*"; + int _arg5 = (int ) 0; + wxWindow * _arg6 = (wxWindow *) NULL; + int _arg7 = (int ) -1; + int _arg8 = (int ) -1; + PyObject * _argo6 = 0; + char *_kwnames[] = { "message","default_path","default_filename","default_extension","wildcard","flags","parent","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|ssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) + return NULL; + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxFileSelector. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxWindow * _arg3 = (wxWindow *) NULL; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + bool _arg6 = (bool ) TRUE; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _argo3 = 0; + int tempbool6 = (int) TRUE; + char *_kwnames[] = { "message","caption","default_value","parent","x","y","centre", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOiii:wxGetTextFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4,&_arg5,&tempbool6)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetTextFromUser. Expected _wxWindow_p."); + return NULL; + } + } + _arg6 = (bool ) tempbool6; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxWindow * _arg3 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "message","caption","default_value","parent", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOO:wxGetPasswordFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetPasswordFromUser. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetPasswordFromUser(*_arg0,*_arg1,*_arg2,_arg3)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + wxString * _arg1; + int _arg2; + wxString * _arg3; + wxWindow * _arg4 = (wxWindow *) NULL; + int _arg5 = (int ) -1; + int _arg6 = (int ) -1; + bool _arg7 = (bool ) TRUE; + int _arg8 = (int ) 150; + int _arg9 = (int ) 200; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + int tempbool7 = (int) TRUE; + char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoice",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj3) +{ + _arg3 = wxString_LIST_helper(_obj3); + if (_arg3 == NULL) { + return NULL; + } +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoice. Expected _wxWindow_p."); + return NULL; + } + } + _arg7 = (bool ) tempbool7; +{ + if (_obj3) { + _arg2 = PyList_Size(_obj3); + } + else { + _arg2 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + delete [] _arg3; +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxString * _arg0; + wxString * _arg1; + int _arg2; + wxString * _arg3; + wxWindow * _arg4 = (wxWindow *) NULL; + int _arg5 = (int ) -1; + int _arg6 = (int ) -1; + bool _arg7 = (bool ) TRUE; + int _arg8 = (int ) 150; + int _arg9 = (int ) 200; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + int tempbool7 = (int) TRUE; + char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoiceIndex",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj3) +{ + _arg3 = wxString_LIST_helper(_obj3); + if (_arg3 == NULL) { + return NULL; + } +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoiceIndex. Expected _wxWindow_p."); + return NULL; + } + } + _arg7 = (bool ) tempbool7; +{ + if (_obj3) { + _arg2 = PyList_Size(_obj3); + } + else { + _arg2 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + delete [] _arg3; +} + return _resultobj; +} + +static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxString * _arg0; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + int _arg2 = (int ) wxOK|wxCENTRE; + wxWindow * _arg3 = (wxWindow *) NULL; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "message","caption","style","parent","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOii:wxMessageBox",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4,&_arg5)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMessageBox. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + long _arg3; + long _arg4 = (long ) 0; + long _arg5 = (long ) 100; + wxWindow * _arg6 = (wxWindow *) NULL; + wxPoint * _arg7 = (wxPoint *) &wxDefaultPosition; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _argo6 = 0; + wxPoint temp; + PyObject * _obj7 = 0; + char *_kwnames[] = { "message","prompt","caption","value","min","max","parent","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOl|llOO:wxGetNumberFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argo6,&_obj7)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj7) +{ + _arg7 = &temp; + if (! wxPoint_helper(_obj7, &_arg7)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxColourDisplay",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxColourDisplay(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplayDepth",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDisplayDepth(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetDisplayDepth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetDisplayDepth",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGetDisplayDepth(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int * _arg0; + int temp; + int * _arg1; + int temp0; + char *_kwnames[] = { NULL }; + + self = self; +{ + _arg0 = &temp; +} +{ + _arg1 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplaySize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDisplaySize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg0)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +static PyObject *_wrap_wxGetDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetDisplaySize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGetDisplaySize()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cursor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSetCursor(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxString * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "label","parent", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByLabel. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxString * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "name","parent", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByName. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cursor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxBeginBusyCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBeginBusyCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBeginBusyCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetActiveWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxGetActiveWindow(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + int _arg1; + char *_kwnames[] = { "name","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"si:wxResourceAddIdentifier",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxResourceClear",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxResourceClear(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmap * _result; + char * _arg0; + char *_kwnames[] = { "resource", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateBitmap",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIcon * _result; + char * _arg0; + char *_kwnames[] = { "resource", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateIcon",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxIcon (wxResourceCreateIcon(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMenuBar * _result; + char * _arg0; + char *_kwnames[] = { "resource", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateMenuBar",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char * _arg0; + char *_kwnames[] = { "name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceGetIdentifier",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxResourceGetIdentifier(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + wxResourceTable * _arg1 = (wxResourceTable *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "resource","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseData",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseData. Expected _wxResourceTable_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceParseData(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + wxResourceTable * _arg1 = (wxResourceTable *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseFile",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseFile. Expected _wxResourceTable_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceParseFile(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + wxResourceTable * _arg1 = (wxResourceTable *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "resource","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseString",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseString. Expected _wxResourceTable_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceParseString(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + int _arg0; + char *_kwnames[] = { "index", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemColour",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxSystemSettings_GetSystemColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + int _arg0; + char *_kwnames[] = { "index", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemFont",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxSystemSettings_GetSystemFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "index", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemMetric",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSystemSettings_GetSystemMetric(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _arg0; + int tempbool0; + char *_kwnames[] = { "flag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxToolTip_Enable",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxToolTip_Enable(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _arg0; + char *_kwnames[] = { "milliseconds", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxToolTip_SetDelay",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxToolTip_SetDelay(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxCaret_GetBlinkTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxCaret_GetBlinkTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxCaret_SetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _arg0; + char *_kwnames[] = { "milliseconds", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxCaret_SetBlinkTime",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_SetBlinkTime(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPostEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _arg0; + wxEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "dest","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPostEvent",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPostEvent. Expected _wxEvtHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostEvent. Expected _wxEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPostEvent(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWakeUpIdle",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWakeUpIdle(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSafeYield. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSafeYield(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + wxTipProvider * _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "parent","tipProvider","showAtStartup", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxShowTip",_kwnames,&_argo0,&_argo1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxShowTip. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxShowTip. Expected _wxTipProvider_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxShowTip(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxCreateFileTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTipProvider * _result; + wxString * _arg0; + size_t _arg1; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename","currentTip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCreateFileTipProvider",_kwnames,&_obj0,&_arg1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTipProvider *)wxCreateFileTipProvider(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTipProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxDragIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxIcon * _arg0; + wxCursor * _arg1 = (wxCursor *) &wxNullCursor; + wxPoint * _arg2 = (wxPoint *) &wxPyNullPoint; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "image","cursor","hotspot", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxDragIcon",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragIcon. Expected _wxIcon_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragIcon. Expected _wxCursor_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragIcon(*_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxDragString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxString * _arg0; + wxCursor * _arg1 = (wxCursor *) &wxNullCursor; + wxPoint * _arg2 = (wxPoint *) &wxPyNullPoint; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "str","cursor","hotspot", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxDragString",_kwnames,&_obj0,&_argo1,&_obj2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragString. Expected _wxCursor_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragString(*_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxDragTreeItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxTreeCtrl * _arg0; + wxTreeItemId * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "treeCtrl","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDragTreeItem",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragTreeItem. Expected _wxTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragTreeItem. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragTreeItem(*_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxDragListItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxListCtrl * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "listCtrl","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDragListItem",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragListItem. Expected _wxListCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragListItem(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxSysErrorCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSysErrorCode",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (unsigned long )wxSysErrorCode(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + unsigned long _arg0 = (unsigned long ) 0; + char *_kwnames[] = { "nErrCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|l:wxSysErrorMsg",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxSysErrorMsg(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +static PyObject *_wrap_wxLogFatalError(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogFatalError",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogFatalError(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogError(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogError",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogError(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogWarning(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogWarning",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogWarning(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogMessage",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogMessage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogInfo",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogInfo(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogVerbose",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogVerbose(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogStatus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogStatus",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogStatus(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogStatusFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pFrame","szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxLogStatusFrame",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogStatusFrame. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogStatus(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogSysError(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogSysError",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogSysError(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + int _arg1 = (int ) FALSE; + wxPyProcess * _arg2 = (wxPyProcess *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "command","sync","process", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxExecute",_kwnames,&_obj0,&_arg1,&_argo2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxExecute. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxExecute(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0)) +static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolTip * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "tip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxToolTip",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxToolTip *)new_wxToolTip(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolTip_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxToolTip_SetTip(_swigobj,_swigarg0) (_swigobj->SetTip(_swigarg0)) +static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolTip * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tip", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolTip_SetTip",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_SetTip. Expected _wxToolTip_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxToolTip_SetTip(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxToolTip_GetTip(_swigobj) (_swigobj->GetTip()) +static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxToolTip * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetTip",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetTip. Expected _wxToolTip_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxToolTip_GetTip(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxToolTip_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxToolTip * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetWindow. Expected _wxToolTip_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxToolTip_GetWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxCaret(_swigarg0,_swigarg1) (new wxCaret(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _result; + wxWindow * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "window","size", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxCaret",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCaret. Expected _wxWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCaret_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxCaret(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxCaret",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCaret. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxCaret(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_IsOk(_swigobj) (_swigobj->IsOk()) +static PyObject *_wrap_wxCaret_IsOk(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsOk",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsOk. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCaret_IsOk(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCaret_IsVisible(_swigobj) (_swigobj->IsVisible()) +static PyObject *_wrap_wxCaret_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsVisible",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsVisible. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCaret_IsVisible(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCaret_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPositionTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPositionTuple. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxCaret_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxCaret_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPosition. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxCaret_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxCaret_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_GetSizeTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSizeTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSizeTuple. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxCaret_GetSize(_swigobj) (_swigobj->GetSize()) +static PyObject *_wrap_wxCaret_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSize. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxCaret_GetSize(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxCaret_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetWindow. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxCaret_GetWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCaret_MoveXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->Move(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_MoveXY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_MoveXY",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_MoveXY. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_MoveXY(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_Move(_swigobj,_swigarg0) (_swigobj->Move(_swigarg0)) +static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_Move",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Move. Expected _wxCaret_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_Move(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_SetSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_SetSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_SetSizeWH",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSizeWH. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_SetSizeWH(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0)) +static PyObject *_wrap_wxCaret_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_SetSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSize. Expected _wxCaret_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_SetSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) +static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int _arg1 = (int ) TRUE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCaret_Show",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Show. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_Show(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_Hide(_swigobj) (_swigobj->Hide()) +static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_Hide",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Hide. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_Hide(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxFontEnumerator() (new wxPyFontEnumerator()) +static PyObject *_wrap_new_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFontEnumerator * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFontEnumerator",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFontEnumerator_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPyFontEnumerator(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFontEnumerator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFontEnumerator",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontEnumerator. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyFontEnumerator(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFontEnumerator__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontEnumerator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFontEnumerator * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFontEnumerator__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator__setSelf. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFontEnumerator__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFontEnumerator_EnumerateFacenames(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnumerateFacenames(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontEnumerator_EnumerateFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFontEnumerator * _arg0; + wxFontEncoding _arg1 = (wxFontEncoding ) wxFONTENCODING_SYSTEM; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","encoding","fixedWidthOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxFontEnumerator_EnumerateFacenames",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateFacenames. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFontEnumerator_EnumerateEncodings(_swigobj,_swigarg0) (_swigobj->EnumerateEncodings(_swigarg0)) +static PyObject *_wrap_wxFontEnumerator_EnumerateEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFontEnumerator * _arg0; + char * _arg1 = (char *) ""; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","facename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|s:wxFontEnumerator_EnumerateEncodings",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateEncodings. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject * wxPyFontEnumerator_GetEncodings(wxPyFontEnumerator *self) { + wxArrayString* arr = self->GetEncodings(); + PyObject* list = PyList_New(0); + for (size_t x=0; xGetCount(); x++) + PyList_Append(list, PyString_FromString((*arr)[x])); + return list; + } +static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPyFontEnumerator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetEncodings",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetEncodings. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self) { + wxArrayString* arr = self->GetFacenames(); + PyObject* list = PyList_New(0); + for (size_t x=0; xGetCount(); x++) + PyList_Append(list, PyString_FromString((*arr)[x])); + return list; + } +static PyObject *_wrap_wxFontEnumerator_GetFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPyFontEnumerator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetFacenames",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetFacenames. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +#define new_wxBusyCursor(_swigarg0) (new wxBusyCursor(_swigarg0)) +static PyObject *_wrap_new_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBusyCursor * _result; + wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cursor", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBusyCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBusyCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBusyCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxBusyCursor(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBusyCursor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxBusyCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBusyCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBusyCursor. Expected _wxBusyCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxBusyCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxWindowDisabler(_swigarg0) (new wxWindowDisabler(_swigarg0)) +static PyObject *_wrap_new_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "winToSkip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxWindowDisabler. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindowDisabler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxWindowDisabler(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindowDisabler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxWindowDisabler. Expected _wxWindowDisabler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define delete_wxTipProvider(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTipProvider * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxTipProvider",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxTipProvider. Expected _wxTipProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxTipProvider(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTipProvider_GetTip(_swigobj) (_swigobj->GetTip()) +static PyObject *_wrap_wxTipProvider_GetTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTipProvider * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTipProvider_GetTip",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipProvider_GetTip. Expected _wxTipProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxTipProvider_GetTip(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxTipProvider_GetCurrentTip(_swigobj) (_swigobj->GetCurrentTip()) +static PyObject *_wrap_wxTipProvider_GetCurrentTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + size_t _result; + wxTipProvider * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTipProvider_GetCurrentTip",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipProvider_GetCurrentTip. Expected _wxTipProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (size_t )wxTipProvider_GetCurrentTip(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxPyTipProviderTowxTipProvider(void *ptr) { + wxPyTipProvider *src; + wxTipProvider *dest; + src = (wxPyTipProvider *) ptr; + dest = (wxTipProvider *) src; + return (void *) dest; +} + +#define new_wxPyTipProvider(_swigarg0) (new wxPyTipProvider(_swigarg0)) +static PyObject *_wrap_new_wxPyTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTipProvider * _result; + size_t _arg0; + char *_kwnames[] = { "currentTip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxPyTipProvider",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyTipProvider *)new_wxPyTipProvider(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTipProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDragImage(_swigarg0,_swigarg1,_swigarg2) (new wxGenericDragImage(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxDragImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxBitmap * _arg0; + wxCursor * _arg1 = (wxCursor *) &wxNullCursor; + wxPoint * _arg2 = (wxPoint *) &wxPyNullPoint; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "image","cursor","hotspot", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:new_wxDragImage",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragImage. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragImage. Expected _wxCursor_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)new_wxDragImage(*_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxGenericDragImage(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxDragImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxDragImage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDragImage. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxGenericDragImage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDragImage_BeginDrag(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->BeginDrag(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDragImage_BeginDrag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + wxWindow * _arg2; + bool _arg3 = (bool ) FALSE; + wxRect * _arg4 = (wxRect *) NULL; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + int tempbool3 = (int) FALSE; + wxRect temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","hotspot","window","fullScreen","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|iO:wxDragImage_BeginDrag",_kwnames,&_argo0,&_obj1,&_argo2,&tempbool3,&_obj4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_BeginDrag. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDragImage_BeginDrag. Expected _wxWindow_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; + if (_obj4) +{ + _arg4 = &temp0; + if (! wxRect_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_BeginDrag(_arg0,*_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_BeginDrag2(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->BeginDrag(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDragImage_BeginDrag2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + wxWindow * _arg2; + wxWindow * _arg3; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","hotspot","window","fullScreenRect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDragImage_BeginDrag2",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_BeginDrag2. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDragImage_BeginDrag2. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDragImage_BeginDrag2. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_BeginDrag2(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_EndDrag(_swigobj) (_swigobj->EndDrag()) +static PyObject *_wrap_wxDragImage_EndDrag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDragImage_EndDrag",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_EndDrag. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_EndDrag(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_Move(_swigobj,_swigarg0) (_swigobj->Move(_swigarg0)) +static PyObject *_wrap_wxDragImage_Move(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDragImage_Move",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_Move. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_Move(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_Show(_swigobj) (_swigobj->Show()) +static PyObject *_wrap_wxDragImage_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDragImage_Show",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_Show. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_Show(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_Hide(_swigobj) (_swigobj->Hide()) +static PyObject *_wrap_wxDragImage_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDragImage_Hide",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_Hide. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_Hide(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_GetImageRect(_swigobj,_swigarg0) (_swigobj->GetImageRect(_swigarg0)) +static PyObject *_wrap_wxDragImage_GetImageRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pos", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDragImage_GetImageRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_GetImageRect. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxDragImage_GetImageRect(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDragImage_RedrawImage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->RedrawImage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDragImage_RedrawImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + wxPoint * _arg2; + bool _arg3; + bool _arg4; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + wxPoint temp0; + PyObject * _obj2 = 0; + int tempbool3; + int tempbool4; + char *_kwnames[] = { "self","oldPos","newPos","eraseOld","drawNew", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOii:wxDragImage_RedrawImage",_kwnames,&_argo0,&_obj1,&_obj2,&tempbool3,&tempbool4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_RedrawImage. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + _arg3 = (bool ) tempbool3; + _arg4 = (bool ) tempbool4; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_RedrawImage(_arg0,*_arg1,*_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define new_wxPyTimer(_swigarg0) (new wxPyTimer(_swigarg0)) +static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "notify", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPyTimer",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyTimer *)new_wxPyTimer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTimer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPyTimer(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPyTimer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyTimer. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyTimer(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyTimer_GetInterval(_swigobj) (_swigobj->GetInterval()) +static PyObject *_wrap_wxPyTimer_GetInterval(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_GetInterval",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_GetInterval. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPyTimer_GetInterval(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyTimer_IsOneShot(_swigobj) (_swigobj->IsOneShot()) +static PyObject *_wrap_wxPyTimer_IsOneShot(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_IsOneShot",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_IsOneShot. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyTimer_IsOneShot(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyTimer_IsRunning(_swigobj) (_swigobj->IsRunning()) +static PyObject *_wrap_wxPyTimer_IsRunning(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_IsRunning",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_IsRunning. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyTimer_IsRunning(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyTimer_SetOwner(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOwner(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyTimer_SetOwner(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + wxEvtHandler * _arg1; + int _arg2 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","owner","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyTimer_SetOwner",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_SetOwner. Expected _wxPyTimer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTimer_SetOwner. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyTimer_SetOwner(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyTimer_Start(_swigobj,_swigarg0,_swigarg1) (_swigobj->Start(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + int _arg1 = (int ) -1; + int _arg2 = (int ) FALSE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","milliseconds","oneShot", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyTimer_Start",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Start. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyTimer_Start(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyTimer_Stop(_swigobj) (_swigobj->Stop()) +static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_Stop",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Stop. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyTimer_Stop(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxLog() (new wxLog()) +static PyObject *_wrap_new_wxLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLog",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)new_wxLog(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxLog_IsEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_IsEnabled",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog::IsEnabled(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_EnableLogging(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + bool _arg0 = (bool ) TRUE; + int tempbool0 = (int) TRUE; + char *_kwnames[] = { "doIt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxLog_EnableLogging",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog::EnableLogging(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_OnLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogLevel * _arg0; + char * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "level","szString","t", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|i:wxLog_OnLog",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogLevel_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_OnLog. Expected _wxLogLevel_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::OnLog(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLog_Flush(_swigobj) (_swigobj->Flush()) +static PyObject *_wrap_wxLog_Flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_Flush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_Flush. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog_Flush(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLog_HasPendingMessages(_swigobj) (_swigobj->HasPendingMessages()) +static PyObject *_wrap_wxLog_HasPendingMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_HasPendingMessages",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_HasPendingMessages. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog_HasPendingMessages(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_FlushActive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_FlushActive",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::FlushActive(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_GetActiveTarget(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_GetActiveTarget",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)wxLog::GetActiveTarget(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxLog_SetActiveTarget(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pLogger", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_SetActiveTarget",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_SetActiveTarget. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)wxLog::SetActiveTarget(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxLog_Suspend(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_Suspend",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::Suspend(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_Resume(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_Resume",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::Resume(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLog_SetVerbose(_swigobj,_swigarg0) (_swigobj->SetVerbose(_swigarg0)) +static PyObject *_wrap_wxLog_SetVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bVerbose", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxLog_SetVerbose",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_SetVerbose. Expected _wxLog_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog_SetVerbose(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_DontCreateOnDemand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_DontCreateOnDemand",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::DontCreateOnDemand(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_SetTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTraceMask * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "ulMask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_SetTraceMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTraceMask_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_SetTraceMask. Expected _wxTraceMask_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::SetTraceMask(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_AddTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_AddTraceMask",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::AddTraceMask(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxLog_RemoveTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_RemoveTraceMask",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::RemoveTraceMask(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxLog_GetVerbose(_swigobj) (_swigobj->GetVerbose()) +static PyObject *_wrap_wxLog_GetVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_GetVerbose",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_GetVerbose. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog_GetVerbose(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_GetTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTraceMask * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_GetTraceMask",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTraceMask (wxLog::GetTraceMask()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTraceMask_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxLog_IsAllowedTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + char *_kwnames[] = { "mask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLog_IsAllowedTraceMask",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog::IsAllowedTraceMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxLogStderrTowxLog(void *ptr) { + wxLogStderr *src; + wxLog *dest; + src = (wxLogStderr *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogStderr() (new wxLogStderr()) +static PyObject *_wrap_new_wxLogStderr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogStderr * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogStderr",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogStderr *)new_wxLogStderr(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogStderr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxLogTextCtrlTowxLog(void *ptr) { + wxLogTextCtrl *src; + wxLog *dest; + src = (wxLogTextCtrl *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogTextCtrl(_swigarg0) (new wxLogTextCtrl(_swigarg0)) +static PyObject *_wrap_new_wxLogTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogTextCtrl * _result; + wxTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pTextCtrl", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxLogTextCtrl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxLogTextCtrl. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogTextCtrl *)new_wxLogTextCtrl(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxLogGuiTowxLog(void *ptr) { + wxLogGui *src; + wxLog *dest; + src = (wxLogGui *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogGui() (new wxLogGui()) +static PyObject *_wrap_new_wxLogGui(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogGui * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogGui",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogGui *)new_wxLogGui(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogGui_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxLogWindowTowxLog(void *ptr) { + wxLogWindow *src; + wxLog *dest; + src = (wxLogWindow *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxLogWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogWindow * _result; + wxFrame * _arg0; + char * _arg1; + bool _arg2 = (bool ) TRUE; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "pParent","szTitle","bShow","bPassToOld", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|ii:new_wxLogWindow",_kwnames,&_argo0,&_arg1,&tempbool2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxLogWindow. Expected _wxFrame_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogWindow *)new_wxLogWindow(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxLogWindow_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) +static PyObject *_wrap_wxLogWindow_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogWindow * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bShow", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxLogWindow_Show",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_Show. Expected _wxLogWindow_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogWindow_Show(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLogWindow_GetFrame(_swigobj) (_swigobj->GetFrame()) +static PyObject *_wrap_wxLogWindow_GetFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _result; + wxLogWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWindow_GetFrame",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_GetFrame. Expected _wxLogWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFrame *)wxLogWindow_GetFrame(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxLogWindow_GetOldLog(_swigobj) (_swigobj->GetOldLog()) +static PyObject *_wrap_wxLogWindow_GetOldLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + wxLogWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWindow_GetOldLog",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_GetOldLog. Expected _wxLogWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)wxLogWindow_GetOldLog(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxLogWindow_IsPassingMessages(_swigobj) (_swigobj->IsPassingMessages()) +static PyObject *_wrap_wxLogWindow_IsPassingMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxLogWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWindow_IsPassingMessages",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_IsPassingMessages. Expected _wxLogWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLogWindow_IsPassingMessages(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxLogWindow_PassMessages(_swigobj,_swigarg0) (_swigobj->PassMessages(_swigarg0)) +static PyObject *_wrap_wxLogWindow_PassMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogWindow * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","bDoPass", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxLogWindow_PassMessages",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_PassMessages. Expected _wxLogWindow_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogWindow_PassMessages(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxLogNull() (new wxLogNull()) +static PyObject *_wrap_new_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogNull * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogNull",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogNull *)new_wxLogNull(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogNull_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxLogNull(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogNull * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLogNull",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogNull_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLogNull. Expected _wxLogNull_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxLogNull(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxProcessEventTowxEvent(void *ptr) { + wxProcessEvent *src; + wxEvent *dest; + src = (wxProcessEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxProcessEvent(_swigarg0,_swigarg1,_swigarg2) (new wxProcessEvent(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxProcessEvent * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + char *_kwnames[] = { "id","pid","exitcode", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxProcessEvent",_kwnames,&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxProcessEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcessEvent_GetPid(_swigobj) (_swigobj->GetPid()) +static PyObject *_wrap_wxProcessEvent_GetPid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetPid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetPid. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetPid(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_GetExitCode(_swigobj) (_swigobj->GetExitCode()) +static PyObject *_wrap_wxProcessEvent_GetExitCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetExitCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetExitCode. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetExitCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_set(_swigobj,_swigval) (_swigobj->m_pid = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_pid_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_pid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_pid_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_get(_swigobj) ((int ) _swigobj->m_pid) +static PyObject *_wrap_wxProcessEvent_m_pid_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_pid_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_set(_swigobj,_swigval) (_swigobj->m_exitcode = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_exitcode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_exitcode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_exitcode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_get(_swigobj) ((int ) _swigobj->m_exitcode) +static PyObject *_wrap_wxProcessEvent_m_exitcode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_exitcode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxPyProcessTowxEvtHandler(void *ptr) { + wxPyProcess *src; + wxEvtHandler *dest; + src = (wxPyProcess *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxProcess(_swigarg0,_swigarg1) (new wxPyProcess(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxProcess(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _result; + wxEvtHandler * _arg0 = (wxEvtHandler *) NULL; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "parent","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxProcess",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxProcess. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyProcess_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void wxPyProcess_Destroy(wxPyProcess *self) { delete self; } +static PyObject *_wrap_wxProcess_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Destroy. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyProcess_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxProcess__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess__setSelf. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_base_OnTerminate(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_OnTerminate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess_base_OnTerminate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pid","status", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxProcess_base_OnTerminate",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_base_OnTerminate. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_Redirect(_swigobj) (_swigobj->Redirect()) +static PyObject *_wrap_wxProcess_Redirect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Redirect",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Redirect. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Redirect(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_IsRedirected(_swigobj) (_swigobj->IsRedirected()) +static PyObject *_wrap_wxProcess_IsRedirected(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_IsRedirected",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_IsRedirected. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxProcess_IsRedirected(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcess_Detach(_swigobj) (_swigobj->Detach()) +static PyObject *_wrap_wxProcess_Detach(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Detach",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Detach. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Detach(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_GetInputStream(_swigobj) (_swigobj->GetInputStream()) +static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetInputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetInputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(_resultobj, "thisown", one); + Py_DECREF(one); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetErrorStream(_swigobj) (_swigobj->GetErrorStream()) +static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetErrorStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetErrorStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(_resultobj, "thisown", one); + Py_DECREF(one); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetOutputStream(_swigobj) (_swigobj->GetOutputStream()) +static PyObject *_wrap_wxProcess_GetOutputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetOutputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetOutputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxOutputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcess_CloseOutput(_swigobj) (_swigobj->CloseOutput()) +static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_CloseOutput",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_CloseOutput. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_CloseOutput(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyMethodDef misc2cMethods[] = { + { "wxProcess_CloseOutput", (PyCFunction) _wrap_wxProcess_CloseOutput, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetOutputStream", (PyCFunction) _wrap_wxProcess_GetOutputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetErrorStream", (PyCFunction) _wrap_wxProcess_GetErrorStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetInputStream", (PyCFunction) _wrap_wxProcess_GetInputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Detach", (PyCFunction) _wrap_wxProcess_Detach, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_IsRedirected", (PyCFunction) _wrap_wxProcess_IsRedirected, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Redirect", (PyCFunction) _wrap_wxProcess_Redirect, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_base_OnTerminate", (PyCFunction) _wrap_wxProcess_base_OnTerminate, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess__setSelf", (PyCFunction) _wrap_wxProcess__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Destroy", (PyCFunction) _wrap_wxProcess_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcess", (PyCFunction) _wrap_new_wxProcess, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_get", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_set", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_get", (PyCFunction) _wrap_wxProcessEvent_m_pid_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_set", (PyCFunction) _wrap_wxProcessEvent_m_pid_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetExitCode", (PyCFunction) _wrap_wxProcessEvent_GetExitCode, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetPid", (PyCFunction) _wrap_wxProcessEvent_GetPid, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcessEvent", (PyCFunction) _wrap_new_wxProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxLogNull", (PyCFunction) _wrap_delete_wxLogNull, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogNull", (PyCFunction) _wrap_new_wxLogNull, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_PassMessages", (PyCFunction) _wrap_wxLogWindow_PassMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_IsPassingMessages", (PyCFunction) _wrap_wxLogWindow_IsPassingMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_GetOldLog", (PyCFunction) _wrap_wxLogWindow_GetOldLog, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_GetFrame", (PyCFunction) _wrap_wxLogWindow_GetFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_Show", (PyCFunction) _wrap_wxLogWindow_Show, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogWindow", (PyCFunction) _wrap_new_wxLogWindow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogGui", (PyCFunction) _wrap_new_wxLogGui, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogTextCtrl", (PyCFunction) _wrap_new_wxLogTextCtrl, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogStderr", (PyCFunction) _wrap_new_wxLogStderr, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_IsAllowedTraceMask", (PyCFunction) _wrap_wxLog_IsAllowedTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetTraceMask", (PyCFunction) _wrap_wxLog_GetTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetVerbose", (PyCFunction) _wrap_wxLog_GetVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_RemoveTraceMask", (PyCFunction) _wrap_wxLog_RemoveTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_AddTraceMask", (PyCFunction) _wrap_wxLog_AddTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetTraceMask", (PyCFunction) _wrap_wxLog_SetTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_DontCreateOnDemand", (PyCFunction) _wrap_wxLog_DontCreateOnDemand, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetVerbose", (PyCFunction) _wrap_wxLog_SetVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_Resume", (PyCFunction) _wrap_wxLog_Resume, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_Suspend", (PyCFunction) _wrap_wxLog_Suspend, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetActiveTarget", (PyCFunction) _wrap_wxLog_SetActiveTarget, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetActiveTarget", (PyCFunction) _wrap_wxLog_GetActiveTarget, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_FlushActive", (PyCFunction) _wrap_wxLog_FlushActive, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_HasPendingMessages", (PyCFunction) _wrap_wxLog_HasPendingMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_Flush", (PyCFunction) _wrap_wxLog_Flush, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_OnLog", (PyCFunction) _wrap_wxLog_OnLog, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_EnableLogging", (PyCFunction) _wrap_wxLog_EnableLogging, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_IsEnabled", (PyCFunction) _wrap_wxLog_IsEnabled, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLog", (PyCFunction) _wrap_new_wxLog, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_Stop", (PyCFunction) _wrap_wxPyTimer_Stop, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_Start", (PyCFunction) _wrap_wxPyTimer_Start, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_SetOwner", (PyCFunction) _wrap_wxPyTimer_SetOwner, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_IsRunning", (PyCFunction) _wrap_wxPyTimer_IsRunning, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_IsOneShot", (PyCFunction) _wrap_wxPyTimer_IsOneShot, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_GetInterval", (PyCFunction) _wrap_wxPyTimer_GetInterval, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxPyTimer", (PyCFunction) _wrap_delete_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyTimer", (PyCFunction) _wrap_new_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_RedrawImage", (PyCFunction) _wrap_wxDragImage_RedrawImage, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_GetImageRect", (PyCFunction) _wrap_wxDragImage_GetImageRect, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_Hide", (PyCFunction) _wrap_wxDragImage_Hide, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_Show", (PyCFunction) _wrap_wxDragImage_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_Move", (PyCFunction) _wrap_wxDragImage_Move, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_EndDrag", (PyCFunction) _wrap_wxDragImage_EndDrag, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_BeginDrag2", (PyCFunction) _wrap_wxDragImage_BeginDrag2, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_BeginDrag", (PyCFunction) _wrap_wxDragImage_BeginDrag, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxDragImage", (PyCFunction) _wrap_delete_wxDragImage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDragImage", (PyCFunction) _wrap_new_wxDragImage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyTipProvider", (PyCFunction) _wrap_new_wxPyTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxTipProvider_GetCurrentTip", (PyCFunction) _wrap_wxTipProvider_GetCurrentTip, METH_VARARGS | METH_KEYWORDS }, + { "wxTipProvider_GetTip", (PyCFunction) _wrap_wxTipProvider_GetTip, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxTipProvider", (PyCFunction) _wrap_delete_wxTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxWindowDisabler", (PyCFunction) _wrap_delete_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, + { "new_wxWindowDisabler", (PyCFunction) _wrap_new_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxBusyCursor", (PyCFunction) _wrap_delete_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxBusyCursor", (PyCFunction) _wrap_new_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_GetFacenames", (PyCFunction) _wrap_wxFontEnumerator_GetFacenames, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_GetEncodings", (PyCFunction) _wrap_wxFontEnumerator_GetEncodings, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_EnumerateEncodings", (PyCFunction) _wrap_wxFontEnumerator_EnumerateEncodings, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_EnumerateFacenames", (PyCFunction) _wrap_wxFontEnumerator_EnumerateFacenames, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator__setSelf", (PyCFunction) _wrap_wxFontEnumerator__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFontEnumerator", (PyCFunction) _wrap_delete_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFontEnumerator", (PyCFunction) _wrap_new_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_SetSize", (PyCFunction) _wrap_wxCaret_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_SetSizeWH", (PyCFunction) _wrap_wxCaret_SetSizeWH, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_Move", (PyCFunction) _wrap_wxCaret_Move, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_MoveXY", (PyCFunction) _wrap_wxCaret_MoveXY, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetWindow", (PyCFunction) _wrap_wxCaret_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetSize", (PyCFunction) _wrap_wxCaret_GetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetSizeTuple", (PyCFunction) _wrap_wxCaret_GetSizeTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetPosition", (PyCFunction) _wrap_wxCaret_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetPositionTuple", (PyCFunction) _wrap_wxCaret_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_IsVisible", (PyCFunction) _wrap_wxCaret_IsVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_IsOk", (PyCFunction) _wrap_wxCaret_IsOk, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxCaret", (PyCFunction) _wrap_delete_wxCaret, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCaret", (PyCFunction) _wrap_new_wxCaret, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_GetWindow", (PyCFunction) _wrap_wxToolTip_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, + { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, + { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, + { "wxLogSysError", (PyCFunction) _wrap_wxLogSysError, METH_VARARGS | METH_KEYWORDS }, + { "wxLogStatusFrame", (PyCFunction) _wrap_wxLogStatusFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxLogStatus", (PyCFunction) _wrap_wxLogStatus, METH_VARARGS | METH_KEYWORDS }, + { "wxLogVerbose", (PyCFunction) _wrap_wxLogVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLogInfo", (PyCFunction) _wrap_wxLogInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxLogMessage", (PyCFunction) _wrap_wxLogMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWarning", (PyCFunction) _wrap_wxLogWarning, METH_VARARGS | METH_KEYWORDS }, + { "wxLogError", (PyCFunction) _wrap_wxLogError, METH_VARARGS | METH_KEYWORDS }, + { "wxLogFatalError", (PyCFunction) _wrap_wxLogFatalError, METH_VARARGS | METH_KEYWORDS }, + { "wxSysErrorMsg", (PyCFunction) _wrap_wxSysErrorMsg, METH_VARARGS | METH_KEYWORDS }, + { "wxSysErrorCode", (PyCFunction) _wrap_wxSysErrorCode, METH_VARARGS | METH_KEYWORDS }, + { "wxDragListItem", (PyCFunction) _wrap_wxDragListItem, METH_VARARGS | METH_KEYWORDS }, + { "wxDragTreeItem", (PyCFunction) _wrap_wxDragTreeItem, METH_VARARGS | METH_KEYWORDS }, + { "wxDragString", (PyCFunction) _wrap_wxDragString, METH_VARARGS | METH_KEYWORDS }, + { "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS }, + { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, + { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, + { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetBlinkTime", (PyCFunction) _wrap_wxCaret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_SetDelay", (PyCFunction) _wrap_wxToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_Enable", (PyCFunction) _wrap_wxToolTip_Enable, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_GetSystemMetric", (PyCFunction) _wrap_wxSystemSettings_GetSystemMetric, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_GetSystemFont", (PyCFunction) _wrap_wxSystemSettings_GetSystemFont, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_GetSystemColour", (PyCFunction) _wrap_wxSystemSettings_GetSystemColour, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceParseString", (PyCFunction) _wrap_wxResourceParseString, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceParseFile", (PyCFunction) _wrap_wxResourceParseFile, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceParseData", (PyCFunction) _wrap_wxResourceParseData, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceGetIdentifier", (PyCFunction) _wrap_wxResourceGetIdentifier, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceCreateMenuBar", (PyCFunction) _wrap_wxResourceCreateMenuBar, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceCreateIcon", (PyCFunction) _wrap_wxResourceCreateIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceCreateBitmap", (PyCFunction) _wrap_wxResourceCreateBitmap, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceClear", (PyCFunction) _wrap_wxResourceClear, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceAddIdentifier", (PyCFunction) _wrap_wxResourceAddIdentifier, METH_VARARGS | METH_KEYWORDS }, + { "wxGetActiveWindow", (PyCFunction) _wrap_wxGetActiveWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxBeginBusyCursor", (PyCFunction) _wrap_wxBeginBusyCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, + { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxGetDisplaySize", (PyCFunction) _wrap_wxGetDisplaySize, METH_VARARGS | METH_KEYWORDS }, + { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, + { "wxGetDisplayDepth", (PyCFunction) _wrap_wxGetDisplayDepth, METH_VARARGS | METH_KEYWORDS }, + { "wxDisplayDepth", (PyCFunction) _wrap_wxDisplayDepth, METH_VARARGS | METH_KEYWORDS }, + { "wxColourDisplay", (PyCFunction) _wrap_wxColourDisplay, METH_VARARGS | METH_KEYWORDS }, + { "wxGetNumberFromUser", (PyCFunction) _wrap_wxGetNumberFromUser, METH_VARARGS | METH_KEYWORDS }, + { "wxMessageBox", (PyCFunction) _wrap_wxMessageBox, METH_VARARGS | METH_KEYWORDS }, + { "wxGetSingleChoiceIndex", (PyCFunction) _wrap_wxGetSingleChoiceIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxGetSingleChoice", (PyCFunction) _wrap_wxGetSingleChoice, METH_VARARGS | METH_KEYWORDS }, + { "wxGetPasswordFromUser", (PyCFunction) _wrap_wxGetPasswordFromUser, METH_VARARGS | METH_KEYWORDS }, + { "wxGetTextFromUser", (PyCFunction) _wrap_wxGetTextFromUser, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSelector", (PyCFunction) _wrap_wxFileSelector, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, + { "_wxLog","_wxLogGui",SwigwxLogGuiTowxLog}, + { "_wxLog","_class_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_wxLog","_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_wxLog","_class_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_wxLog","_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_class_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_class_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_wxTipProvider","_class_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_wxTipProvider","_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_class_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_class_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_class_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, + { "_class_wxLog","_wxLogGui",SwigwxLogGuiTowxLog}, + { "_class_wxLog","_class_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_class_wxLog","_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_class_wxLog","_class_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_class_wxLog","_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_class_wxTipProvider","_class_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_class_wxTipProvider","_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initmisc2c() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("misc2c", misc2cMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH)); + PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH)); + PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH)); + PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH)); + PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN)); + PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN)); + PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN)); + PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT)); + PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); + PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); + PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); + PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); + PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X)); + PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y)); + PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X)); + PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y)); + PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X)); + PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y)); + PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X)); + PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X)); + PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X)); + PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y)); + PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X)); + PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y)); + PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y)); + PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y)); + PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT)); + PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT)); + PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS)); + PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS)); + PyDict_SetItemString(d,"wxLOG_FatalError", PyInt_FromLong((long) wxLOG_FatalError)); + PyDict_SetItemString(d,"wxLOG_Error", PyInt_FromLong((long) wxLOG_Error)); + PyDict_SetItemString(d,"wxLOG_Warning", PyInt_FromLong((long) wxLOG_Warning)); + PyDict_SetItemString(d,"wxLOG_Message", PyInt_FromLong((long) wxLOG_Message)); + PyDict_SetItemString(d,"wxLOG_Info", PyInt_FromLong((long) wxLOG_Info)); + PyDict_SetItemString(d,"wxLOG_Status", PyInt_FromLong((long) wxLOG_Status)); + PyDict_SetItemString(d,"wxLOG_Debug", PyInt_FromLong((long) wxLOG_Debug)); + PyDict_SetItemString(d,"wxLOG_Trace", PyInt_FromLong((long) wxLOG_Trace)); + PyDict_SetItemString(d,"wxLOG_Progress", PyInt_FromLong((long) wxLOG_Progress)); + PyDict_SetItemString(d,"wxLOG_User", PyInt_FromLong((long) wxLOG_User)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py new file mode 100644 index 0000000000..2d7b08bedf --- /dev/null +++ b/wxPython/src/gtk/misc2.py @@ -0,0 +1,761 @@ +# This file was created automatically by SWIG. +import misc2c + +from windows import * + +from misc import * + +from gdi import * + +from clip_dnd import * + +from events import * + +from streams import * +class wxToolTipPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetTip(self, *_args, **_kwargs): + val = apply(misc2c.wxToolTip_SetTip,(self,) + _args, _kwargs) + return val + def GetTip(self, *_args, **_kwargs): + val = apply(misc2c.wxToolTip_GetTip,(self,) + _args, _kwargs) + return val + def GetWindow(self, *_args, **_kwargs): + val = apply(misc2c.wxToolTip_GetWindow,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxToolTip(wxToolTipPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxToolTip,_args,_kwargs) + self.thisown = 1 + + + + +class wxCaretPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxCaret(self) + def IsOk(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_IsOk,(self,) + _args, _kwargs) + return val + def IsVisible(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_IsVisible,(self,) + _args, _kwargs) + return val + def GetPositionTuple(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetPositionTuple,(self,) + _args, _kwargs) + return val + def GetPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def GetSizeTuple(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetSizeTuple,(self,) + _args, _kwargs) + return val + def GetSize(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def GetWindow(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetWindow,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def MoveXY(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_MoveXY,(self,) + _args, _kwargs) + return val + def Move(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_Move,(self,) + _args, _kwargs) + return val + def SetSizeWH(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_SetSizeWH,(self,) + _args, _kwargs) + return val + def SetSize(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_SetSize,(self,) + _args, _kwargs) + return val + def Show(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_Show,(self,) + _args, _kwargs) + return val + def Hide(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_Hide,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCaret(wxCaretPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxCaret,_args,_kwargs) + self.thisown = 1 + + + + +class wxFontEnumeratorPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxFontEnumerator(self) + def _setSelf(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator__setSelf,(self,) + _args, _kwargs) + return val + def EnumerateFacenames(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_EnumerateFacenames,(self,) + _args, _kwargs) + return val + def EnumerateEncodings(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_EnumerateEncodings,(self,) + _args, _kwargs) + return val + def GetEncodings(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_GetEncodings,(self,) + _args, _kwargs) + return val + def GetFacenames(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_GetFacenames,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFontEnumerator(wxFontEnumeratorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxFontEnumerator,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxFontEnumerator) + + + + +class wxBusyCursorPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxBusyCursor(self) + def __repr__(self): + return "" % (self.this,) +class wxBusyCursor(wxBusyCursorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxBusyCursor,_args,_kwargs) + self.thisown = 1 + + + + +class wxWindowDisablerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxWindowDisabler(self) + def __repr__(self): + return "" % (self.this,) +class wxWindowDisabler(wxWindowDisablerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxWindowDisabler,_args,_kwargs) + self.thisown = 1 + + + + +class wxTipProviderPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxTipProvider(self) + def GetTip(self, *_args, **_kwargs): + val = apply(misc2c.wxTipProvider_GetTip,(self,) + _args, _kwargs) + return val + def GetCurrentTip(self, *_args, **_kwargs): + val = apply(misc2c.wxTipProvider_GetCurrentTip,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxTipProvider(wxTipProviderPtr): + def __init__(self,this): + self.this = this + + + + +class wxPyTipProviderPtr(wxTipProviderPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxPyTipProvider(wxPyTipProviderPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxPyTipProvider,_args,_kwargs) + self.thisown = 1 + + + + +class wxDragImagePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxDragImage(self) + def BeginDrag(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_BeginDrag,(self,) + _args, _kwargs) + return val + def BeginDrag2(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_BeginDrag2,(self,) + _args, _kwargs) + return val + def EndDrag(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_EndDrag,(self,) + _args, _kwargs) + return val + def Move(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_Move,(self,) + _args, _kwargs) + return val + def Show(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_Show,(self,) + _args, _kwargs) + return val + def Hide(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_Hide,(self,) + _args, _kwargs) + return val + def GetImageRect(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_GetImageRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def RedrawImage(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_RedrawImage,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxDragImage(wxDragImagePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxDragImage,_args,_kwargs) + self.thisown = 1 + + + + +class wxPyTimerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxPyTimer(self) + def GetInterval(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_GetInterval,(self,) + _args, _kwargs) + return val + def IsOneShot(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_IsOneShot,(self,) + _args, _kwargs) + return val + def IsRunning(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_IsRunning,(self,) + _args, _kwargs) + return val + def SetOwner(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_SetOwner,(self,) + _args, _kwargs) + return val + def Start(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_Start,(self,) + _args, _kwargs) + return val + def Stop(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_Stop,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyTimer(wxPyTimerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxPyTimer,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Flush(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_Flush,(self,) + _args, _kwargs) + return val + def HasPendingMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_HasPendingMessages,(self,) + _args, _kwargs) + return val + def SetVerbose(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_SetVerbose,(self,) + _args, _kwargs) + return val + def GetVerbose(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_GetVerbose,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxLog(wxLogPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLog,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogStderrPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxLogStderr(wxLogStderrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogStderr,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogTextCtrlPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxLogTextCtrl(wxLogTextCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogTextCtrl,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogGuiPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxLogGui(wxLogGuiPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogGui,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogWindowPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Show(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_Show,(self,) + _args, _kwargs) + return val + def GetFrame(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_GetFrame,(self,) + _args, _kwargs) + if val: val = wxFramePtr(val) + return val + def GetOldLog(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_GetOldLog,(self,) + _args, _kwargs) + if val: val = wxLogPtr(val) + return val + def IsPassingMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_IsPassingMessages,(self,) + _args, _kwargs) + return val + def PassMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_PassMessages,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxLogWindow(wxLogWindowPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogWindow,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogNullPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxLogNull(self) + def __repr__(self): + return "" % (self.this,) +class wxLogNull(wxLogNullPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogNull,_args,_kwargs) + self.thisown = 1 + + + + +class wxProcessEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPid(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetPid,(self,) + _args, _kwargs) + return val + def GetExitCode(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetExitCode,(self,) + _args, _kwargs) + return val + def __setattr__(self,name,value): + if name == "m_pid" : + misc2c.wxProcessEvent_m_pid_set(self,value) + return + if name == "m_exitcode" : + misc2c.wxProcessEvent_m_exitcode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_pid" : + return misc2c.wxProcessEvent_m_pid_get(self) + if name == "m_exitcode" : + return misc2c.wxProcessEvent_m_exitcode_get(self) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) +class wxProcessEvent(wxProcessEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcessEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxProcessPtr(wxEvtHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Destroy(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Destroy,(self,) + _args, _kwargs) + return val + def _setSelf(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess__setSelf,(self,) + _args, _kwargs) + return val + def base_OnTerminate(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_base_OnTerminate,(self,) + _args, _kwargs) + return val + def Redirect(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Redirect,(self,) + _args, _kwargs) + return val + def IsRedirected(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_IsRedirected,(self,) + _args, _kwargs) + return val + def Detach(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Detach,(self,) + _args, _kwargs) + return val + def GetInputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetInputStream,(self,) + _args, _kwargs) + return val + def GetErrorStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetErrorStream,(self,) + _args, _kwargs) + return val + def GetOutputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetOutputStream,(self,) + _args, _kwargs) + if val: val = wxOutputStreamPtr(val) + return val + def CloseOutput(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_CloseOutput,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxProcess(wxProcessPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcess,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxProcess) + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +wxFileSelector = misc2c.wxFileSelector + +wxGetTextFromUser = misc2c.wxGetTextFromUser + +wxGetPasswordFromUser = misc2c.wxGetPasswordFromUser + +wxGetSingleChoice = misc2c.wxGetSingleChoice + +wxGetSingleChoiceIndex = misc2c.wxGetSingleChoiceIndex + +wxMessageBox = misc2c.wxMessageBox + +wxGetNumberFromUser = misc2c.wxGetNumberFromUser + +wxColourDisplay = misc2c.wxColourDisplay + +wxDisplayDepth = misc2c.wxDisplayDepth + +wxGetDisplayDepth = misc2c.wxGetDisplayDepth + +wxDisplaySize = misc2c.wxDisplaySize + +def wxGetDisplaySize(*_args, **_kwargs): + val = apply(misc2c.wxGetDisplaySize,_args,_kwargs) + if val: val = wxSizePtr(val); val.thisown = 1 + return val + +wxSetCursor = misc2c.wxSetCursor + +def wxFindWindowByLabel(*_args, **_kwargs): + val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + +def wxFindWindowByName(*_args, **_kwargs): + val = apply(misc2c.wxFindWindowByName,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + +wxBeginBusyCursor = misc2c.wxBeginBusyCursor + +def wxGetActiveWindow(*_args, **_kwargs): + val = apply(misc2c.wxGetActiveWindow,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + +wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier + +wxResourceClear = misc2c.wxResourceClear + +def wxResourceCreateBitmap(*_args, **_kwargs): + val = apply(misc2c.wxResourceCreateBitmap,_args,_kwargs) + if val: val = wxBitmapPtr(val); val.thisown = 1 + return val + +def wxResourceCreateIcon(*_args, **_kwargs): + val = apply(misc2c.wxResourceCreateIcon,_args,_kwargs) + if val: val = wxIconPtr(val); val.thisown = 1 + return val + +def wxResourceCreateMenuBar(*_args, **_kwargs): + val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs) + if val: val = wxMenuBarPtr(val) + return val + +wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier + +wxResourceParseData = misc2c.wxResourceParseData + +wxResourceParseFile = misc2c.wxResourceParseFile + +wxResourceParseString = misc2c.wxResourceParseString + +def wxSystemSettings_GetSystemColour(*_args, **_kwargs): + val = apply(misc2c.wxSystemSettings_GetSystemColour,_args,_kwargs) + if val: val = wxColourPtr(val); val.thisown = 1 + return val + +def wxSystemSettings_GetSystemFont(*_args, **_kwargs): + val = apply(misc2c.wxSystemSettings_GetSystemFont,_args,_kwargs) + if val: val = wxFontPtr(val); val.thisown = 1 + return val + +wxSystemSettings_GetSystemMetric = misc2c.wxSystemSettings_GetSystemMetric + +wxToolTip_Enable = misc2c.wxToolTip_Enable + +wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay + +wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime + +wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime + +wxPostEvent = misc2c.wxPostEvent + +wxWakeUpIdle = misc2c.wxWakeUpIdle + +wxSafeYield = misc2c.wxSafeYield + +wxShowTip = misc2c.wxShowTip + +def wxCreateFileTipProvider(*_args, **_kwargs): + val = apply(misc2c.wxCreateFileTipProvider,_args,_kwargs) + if val: val = wxTipProviderPtr(val); val.thisown = 1 + return val + +def wxDragIcon(*_args, **_kwargs): + val = apply(misc2c.wxDragIcon,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +def wxDragString(*_args, **_kwargs): + val = apply(misc2c.wxDragString,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +def wxDragTreeItem(*_args, **_kwargs): + val = apply(misc2c.wxDragTreeItem,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +def wxDragListItem(*_args, **_kwargs): + val = apply(misc2c.wxDragListItem,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +wxSysErrorCode = misc2c.wxSysErrorCode + +wxSysErrorMsg = misc2c.wxSysErrorMsg + +wxLogFatalError = misc2c.wxLogFatalError + +wxLogError = misc2c.wxLogError + +wxLogWarning = misc2c.wxLogWarning + +wxLogMessage = misc2c.wxLogMessage + +wxLogInfo = misc2c.wxLogInfo + +wxLogVerbose = misc2c.wxLogVerbose + +wxLogStatus = misc2c.wxLogStatus + +wxLogStatusFrame = misc2c.wxLogStatusFrame + +wxLogSysError = misc2c.wxLogSysError + +wxExecute = misc2c.wxExecute + +wxLog_IsEnabled = misc2c.wxLog_IsEnabled + +wxLog_EnableLogging = misc2c.wxLog_EnableLogging + +wxLog_OnLog = misc2c.wxLog_OnLog + +wxLog_FlushActive = misc2c.wxLog_FlushActive + +def wxLog_GetActiveTarget(*_args, **_kwargs): + val = apply(misc2c.wxLog_GetActiveTarget,_args,_kwargs) + if val: val = wxLogPtr(val) + return val + +def wxLog_SetActiveTarget(*_args, **_kwargs): + val = apply(misc2c.wxLog_SetActiveTarget,_args,_kwargs) + if val: val = wxLogPtr(val) + return val + +wxLog_Suspend = misc2c.wxLog_Suspend + +wxLog_Resume = misc2c.wxLog_Resume + +wxLog_DontCreateOnDemand = misc2c.wxLog_DontCreateOnDemand + +wxLog_SetTraceMask = misc2c.wxLog_SetTraceMask + +wxLog_AddTraceMask = misc2c.wxLog_AddTraceMask + +wxLog_RemoveTraceMask = misc2c.wxLog_RemoveTraceMask + +wxLog_GetTraceMask = misc2c.wxLog_GetTraceMask + +wxLog_IsAllowedTraceMask = misc2c.wxLog_IsAllowedTraceMask + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxSYS_WHITE_BRUSH = misc2c.wxSYS_WHITE_BRUSH +wxSYS_LTGRAY_BRUSH = misc2c.wxSYS_LTGRAY_BRUSH +wxSYS_GRAY_BRUSH = misc2c.wxSYS_GRAY_BRUSH +wxSYS_DKGRAY_BRUSH = misc2c.wxSYS_DKGRAY_BRUSH +wxSYS_BLACK_BRUSH = misc2c.wxSYS_BLACK_BRUSH +wxSYS_NULL_BRUSH = misc2c.wxSYS_NULL_BRUSH +wxSYS_HOLLOW_BRUSH = misc2c.wxSYS_HOLLOW_BRUSH +wxSYS_WHITE_PEN = misc2c.wxSYS_WHITE_PEN +wxSYS_BLACK_PEN = misc2c.wxSYS_BLACK_PEN +wxSYS_NULL_PEN = misc2c.wxSYS_NULL_PEN +wxSYS_OEM_FIXED_FONT = misc2c.wxSYS_OEM_FIXED_FONT +wxSYS_ANSI_FIXED_FONT = misc2c.wxSYS_ANSI_FIXED_FONT +wxSYS_ANSI_VAR_FONT = misc2c.wxSYS_ANSI_VAR_FONT +wxSYS_SYSTEM_FONT = misc2c.wxSYS_SYSTEM_FONT +wxSYS_DEVICE_DEFAULT_FONT = misc2c.wxSYS_DEVICE_DEFAULT_FONT +wxSYS_DEFAULT_PALETTE = misc2c.wxSYS_DEFAULT_PALETTE +wxSYS_SYSTEM_FIXED_FONT = misc2c.wxSYS_SYSTEM_FIXED_FONT +wxSYS_DEFAULT_GUI_FONT = misc2c.wxSYS_DEFAULT_GUI_FONT +wxSYS_COLOUR_SCROLLBAR = misc2c.wxSYS_COLOUR_SCROLLBAR +wxSYS_COLOUR_BACKGROUND = misc2c.wxSYS_COLOUR_BACKGROUND +wxSYS_COLOUR_ACTIVECAPTION = misc2c.wxSYS_COLOUR_ACTIVECAPTION +wxSYS_COLOUR_INACTIVECAPTION = misc2c.wxSYS_COLOUR_INACTIVECAPTION +wxSYS_COLOUR_MENU = misc2c.wxSYS_COLOUR_MENU +wxSYS_COLOUR_WINDOW = misc2c.wxSYS_COLOUR_WINDOW +wxSYS_COLOUR_WINDOWFRAME = misc2c.wxSYS_COLOUR_WINDOWFRAME +wxSYS_COLOUR_MENUTEXT = misc2c.wxSYS_COLOUR_MENUTEXT +wxSYS_COLOUR_WINDOWTEXT = misc2c.wxSYS_COLOUR_WINDOWTEXT +wxSYS_COLOUR_CAPTIONTEXT = misc2c.wxSYS_COLOUR_CAPTIONTEXT +wxSYS_COLOUR_ACTIVEBORDER = misc2c.wxSYS_COLOUR_ACTIVEBORDER +wxSYS_COLOUR_INACTIVEBORDER = misc2c.wxSYS_COLOUR_INACTIVEBORDER +wxSYS_COLOUR_APPWORKSPACE = misc2c.wxSYS_COLOUR_APPWORKSPACE +wxSYS_COLOUR_HIGHLIGHT = misc2c.wxSYS_COLOUR_HIGHLIGHT +wxSYS_COLOUR_HIGHLIGHTTEXT = misc2c.wxSYS_COLOUR_HIGHLIGHTTEXT +wxSYS_COLOUR_BTNFACE = misc2c.wxSYS_COLOUR_BTNFACE +wxSYS_COLOUR_BTNSHADOW = misc2c.wxSYS_COLOUR_BTNSHADOW +wxSYS_COLOUR_GRAYTEXT = misc2c.wxSYS_COLOUR_GRAYTEXT +wxSYS_COLOUR_BTNTEXT = misc2c.wxSYS_COLOUR_BTNTEXT +wxSYS_COLOUR_INACTIVECAPTIONTEXT = misc2c.wxSYS_COLOUR_INACTIVECAPTIONTEXT +wxSYS_COLOUR_BTNHIGHLIGHT = misc2c.wxSYS_COLOUR_BTNHIGHLIGHT +wxSYS_COLOUR_3DDKSHADOW = misc2c.wxSYS_COLOUR_3DDKSHADOW +wxSYS_COLOUR_3DLIGHT = misc2c.wxSYS_COLOUR_3DLIGHT +wxSYS_COLOUR_INFOTEXT = misc2c.wxSYS_COLOUR_INFOTEXT +wxSYS_COLOUR_INFOBK = misc2c.wxSYS_COLOUR_INFOBK +wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP +wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE +wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW +wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT +wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT +wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT +wxSYS_MOUSE_BUTTONS = misc2c.wxSYS_MOUSE_BUTTONS +wxSYS_BORDER_X = misc2c.wxSYS_BORDER_X +wxSYS_BORDER_Y = misc2c.wxSYS_BORDER_Y +wxSYS_CURSOR_X = misc2c.wxSYS_CURSOR_X +wxSYS_CURSOR_Y = misc2c.wxSYS_CURSOR_Y +wxSYS_DCLICK_X = misc2c.wxSYS_DCLICK_X +wxSYS_DCLICK_Y = misc2c.wxSYS_DCLICK_Y +wxSYS_DRAG_X = misc2c.wxSYS_DRAG_X +wxSYS_DRAG_Y = misc2c.wxSYS_DRAG_Y +wxSYS_EDGE_X = misc2c.wxSYS_EDGE_X +wxSYS_EDGE_Y = misc2c.wxSYS_EDGE_Y +wxSYS_HSCROLL_ARROW_X = misc2c.wxSYS_HSCROLL_ARROW_X +wxSYS_HSCROLL_ARROW_Y = misc2c.wxSYS_HSCROLL_ARROW_Y +wxSYS_HTHUMB_X = misc2c.wxSYS_HTHUMB_X +wxSYS_ICON_X = misc2c.wxSYS_ICON_X +wxSYS_ICON_Y = misc2c.wxSYS_ICON_Y +wxSYS_ICONSPACING_X = misc2c.wxSYS_ICONSPACING_X +wxSYS_ICONSPACING_Y = misc2c.wxSYS_ICONSPACING_Y +wxSYS_WINDOWMIN_X = misc2c.wxSYS_WINDOWMIN_X +wxSYS_WINDOWMIN_Y = misc2c.wxSYS_WINDOWMIN_Y +wxSYS_SCREEN_X = misc2c.wxSYS_SCREEN_X +wxSYS_SCREEN_Y = misc2c.wxSYS_SCREEN_Y +wxSYS_FRAMESIZE_X = misc2c.wxSYS_FRAMESIZE_X +wxSYS_FRAMESIZE_Y = misc2c.wxSYS_FRAMESIZE_Y +wxSYS_SMALLICON_X = misc2c.wxSYS_SMALLICON_X +wxSYS_SMALLICON_Y = misc2c.wxSYS_SMALLICON_Y +wxSYS_HSCROLL_Y = misc2c.wxSYS_HSCROLL_Y +wxSYS_VSCROLL_X = misc2c.wxSYS_VSCROLL_X +wxSYS_VSCROLL_ARROW_X = misc2c.wxSYS_VSCROLL_ARROW_X +wxSYS_VSCROLL_ARROW_Y = misc2c.wxSYS_VSCROLL_ARROW_Y +wxSYS_VTHUMB_Y = misc2c.wxSYS_VTHUMB_Y +wxSYS_CAPTION_Y = misc2c.wxSYS_CAPTION_Y +wxSYS_MENU_Y = misc2c.wxSYS_MENU_Y +wxSYS_NETWORK_PRESENT = misc2c.wxSYS_NETWORK_PRESENT +wxSYS_PENWINDOWS_PRESENT = misc2c.wxSYS_PENWINDOWS_PRESENT +wxSYS_SHOW_SOUNDS = misc2c.wxSYS_SHOW_SOUNDS +wxSYS_SWAP_BUTTONS = misc2c.wxSYS_SWAP_BUTTONS +wxLOG_FatalError = misc2c.wxLOG_FatalError +wxLOG_Error = misc2c.wxLOG_Error +wxLOG_Warning = misc2c.wxLOG_Warning +wxLOG_Message = misc2c.wxLOG_Message +wxLOG_Info = misc2c.wxLOG_Info +wxLOG_Status = misc2c.wxLOG_Status +wxLOG_Debug = misc2c.wxLOG_Debug +wxLOG_Trace = misc2c.wxLOG_Trace +wxLOG_Progress = misc2c.wxLOG_Progress +wxLOG_User = misc2c.wxLOG_User diff --git a/utils/wxPython/src/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp similarity index 91% rename from utils/wxPython/src/gtk/printfw.cpp rename to wxPython/src/gtk/printfw.cpp index 9ee4734927..51b0812179 100644 --- a/utils/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/printfw.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/printfw.cpp + * FILE : src/gtk/printfw.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,48 +61,28 @@ extern PyObject *SWIG_newvarlink(void); #include "printfw.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -580,11 +562,22 @@ static PyObject *_wrap_wxPrintData_SetPrinterName(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1552,13 +1545,12 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginBottomRight(PyObject *s static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPageSetupDialogData * _arg0; - wxPaperSize * _arg1; + wxPaperSize _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; char *_kwnames[] = { "self","id", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1567,16 +1559,9 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPaperSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupDialogData_SetPaperId. Expected _wxPaperSize_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - wxPageSetupDialogData_SetPaperId(_arg0,*_arg1); + wxPageSetupDialogData_SetPaperId(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2679,17 +2664,19 @@ static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxPrintout__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPrintout__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPrintout__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyPrintout * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPrintout__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPrintout__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2701,9 +2688,12 @@ static PyObject *_wrap_wxPrintout__setSelf(PyObject *self, PyObject *args, PyObj { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPrintout__setSelf(_arg0,_arg1); + wxPrintout__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4114,8 +4104,8 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje wxPrintPreview * _arg0; wxFrame * _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -4146,11 +4136,22 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -4344,14 +4345,7 @@ static PyMethodDef printfwcMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -4360,192 +4354,58 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxPreviewFrame",SwigwxPreviewFrameTowxEvtHandler}, { "_class_wxEvtHandler","_wxPreviewFrame",SwigwxPreviewFrameTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler}, { "_class_wxEvtHandler","_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler}, { "_class_wxEvtHandler","_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_wxMask","_class_wxMask",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPrintDialog",SwigwxPrintDialogTowxPanel}, { "_wxPanel","_wxPrintDialog",SwigwxPrintDialogTowxPanel}, { "_wxPanel","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel}, { "_wxPanel","_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_class_wxPrintDialog",SwigwxPrintDialogTowxDialog}, { "_class_wxDialog","_wxPrintDialog",SwigwxPrintDialogTowxDialog}, { "_class_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog}, { "_class_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxPrintDialog",SwigwxPrintDialogTowxPanel}, { "_class_wxPanel","_wxPrintDialog",SwigwxPrintDialogTowxPanel}, { "_class_wxPanel","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel}, { "_class_wxPanel","_wxPageSetupDialog",SwigwxPageSetupDialogTowxPanel}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxPreviewFrame",SwigwxPreviewFrameTowxWindow}, @@ -4554,117 +4414,50 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_wxPrintDialog",SwigwxPrintDialogTowxWindow}, { "_class_wxWindow","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow}, { "_class_wxWindow","_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, { "_wxDialog","_class_wxPrintDialog",SwigwxPrintDialogTowxDialog}, { "_wxDialog","_wxPrintDialog",SwigwxPrintDialogTowxDialog}, { "_wxDialog","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog}, { "_wxDialog","_wxPageSetupDialog",SwigwxPageSetupDialogTowxDialog}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, { "_wxFrame","_class_wxPreviewFrame",SwigwxPreviewFrameTowxFrame}, { "_wxFrame","_wxPreviewFrame",SwigwxPreviewFrameTowxFrame}, - { "_wxFrame","_class_wxFrame",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -4672,64 +4465,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPreviewFrame",SwigwxPreviewFrameTowxEvtHandler}, { "_wxEvtHandler","_wxPreviewFrame",SwigwxPreviewFrameTowxEvtHandler}, { "_wxEvtHandler","_class_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler}, { "_wxEvtHandler","_wxPrintDialog",SwigwxPrintDialogTowxEvtHandler}, { "_wxEvtHandler","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler}, { "_wxEvtHandler","_wxPageSetupDialog",SwigwxPageSetupDialogTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxPreviewFrame",SwigwxPreviewFrameTowxWindow}, { "_wxWindow","_wxPreviewFrame",SwigwxPreviewFrameTowxWindow}, { "_wxWindow","_class_wxPrintDialog",SwigwxPrintDialogTowxWindow}, { "_wxWindow","_wxPrintDialog",SwigwxPrintDialogTowxWindow}, { "_wxWindow","_class_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow}, { "_wxWindow","_wxPageSetupDialog",SwigwxPageSetupDialogTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, { "_class_wxFrame","_class_wxPreviewFrame",SwigwxPreviewFrameTowxFrame}, { "_class_wxFrame","_wxPreviewFrame",SwigwxPreviewFrameTowxFrame}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/printfw.py b/wxPython/src/gtk/printfw.py similarity index 99% rename from utils/wxPython/src/msw/printfw.py rename to wxPython/src/gtk/printfw.py index aced8dc62b..793dc118bb 100644 --- a/utils/wxPython/src/msw/printfw.py +++ b/wxPython/src/gtk/printfw.py @@ -215,7 +215,7 @@ class wxPageSetupDialog(wxPageSetupDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPageSetupDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -325,7 +325,7 @@ class wxPrintDialog(wxPrintDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPrintDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -386,7 +386,7 @@ class wxPrintout(wxPrintoutPtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPrintout,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPrintout) @@ -508,7 +508,7 @@ class wxPreviewFrame(wxPreviewFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPreviewFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) diff --git a/utils/wxPython/src/gtk/sizers.cpp b/wxPython/src/gtk/sizers.cpp similarity index 52% rename from utils/wxPython/src/gtk/sizers.cpp rename to wxPython/src/gtk/sizers.cpp index da7c59ac85..5cb292eba3 100644 --- a/utils/wxPython/src/gtk/sizers.cpp +++ b/wxPython/src/gtk/sizers.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/sizers.cpp + * FILE : src/gtk/sizers.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -55,48 +57,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -223,6 +205,125 @@ static PyObject *_wrap_wxSizerItem_SetDimension(PyObject *self, PyObject *args, return _resultobj; } +#define wxSizerItem_SetRatioWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRatio(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizerItem_SetRatioWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSizerItem_SetRatioWH",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetRatioWH. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetRatioWH(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_SetRatioSize(_swigobj,_swigarg0) (_swigobj->SetRatio(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetRatioSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetRatioSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetRatioSize. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetRatioSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_SetRatio(_swigobj,_swigarg0) (_swigobj->SetRatio(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetRatio(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + float _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","ratio", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Of:wxSizerItem_SetRatio",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetRatio. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetRatio(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_GetRatio(_swigobj) (_swigobj->GetRatio()) +static PyObject *_wrap_wxSizerItem_GetRatio(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + float _result; + wxSizerItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetRatio",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetRatio. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (float )wxSizerItem_GetRatio(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("f",_result); + return _resultobj; +} + #define wxSizerItem_IsWindow(_swigobj) (_swigobj->IsWindow()) static PyObject *_wrap_wxSizerItem_IsWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -338,6 +439,42 @@ static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxSizerItem_SetWindow(_swigobj,_swigarg0) (_swigobj->SetWindow(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetWindow",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetWindow. Expected _wxSizerItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizerItem_SetWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetWindow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizerItem_GetSizer(_swigobj) (_swigobj->GetSizer()) static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -372,6 +509,42 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxSizerItem_SetSizer(_swigobj,_swigarg0) (_swigobj->SetSizer(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + wxSizer * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetSizer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetSizer. Expected _wxSizerItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizerItem_SetSizer. Expected _wxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetSizer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizerItem_GetOption(_swigobj) (_swigobj->GetOption()) static PyObject *_wrap_wxSizerItem_GetOption(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -771,6 +944,149 @@ static PyObject *_wrap_wxSizer_AddSpacer(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static void wxSizer_InsertWindow(wxSizer *self,int before,wxWindow * window,int option,int flag,int border,PyObject * userData) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, window, option, flag, border, data); + } +static PyObject *_wrap_wxSizer_InsertWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + wxWindow * _arg2; + int _arg3 = (int ) 0; + int _arg4 = (int ) 0; + int _arg5 = (int ) 0; + PyObject * _arg6 = (PyObject *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + PyObject * _obj6 = 0; + char *_kwnames[] = { "self","before","window","option","flag","border","userData", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|iiiO:wxSizer_InsertWindow",_kwnames,&_argo0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_obj6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_InsertWindow. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSizer_InsertWindow. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj6) +{ + _arg6 = _obj6; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_InsertWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxSizer_InsertSizer(wxSizer *self,int before,wxSizer * sizer,int option,int flag,int border,PyObject * userData) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, sizer, option, flag, border, data); + } +static PyObject *_wrap_wxSizer_InsertSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + wxSizer * _arg2; + int _arg3 = (int ) 0; + int _arg4 = (int ) 0; + int _arg5 = (int ) 0; + PyObject * _arg6 = (PyObject *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + PyObject * _obj6 = 0; + char *_kwnames[] = { "self","before","sizer","option","flag","border","userData", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|iiiO:wxSizer_InsertSizer",_kwnames,&_argo0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_obj6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_InsertSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSizer_InsertSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_obj6) +{ + _arg6 = _obj6; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_InsertSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxSizer_InsertSpacer(wxSizer *self,int before,int width,int height,int option,int flag,int border,PyObject * userData) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, width, height, option, flag, border, data); + } +static PyObject *_wrap_wxSizer_InsertSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4 = (int ) 0; + int _arg5 = (int ) 0; + int _arg6 = (int ) 0; + PyObject * _arg7 = (PyObject *) NULL; + PyObject * _argo0 = 0; + PyObject * _obj7 = 0; + char *_kwnames[] = { "self","before","width","height","option","flag","border","userData", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii|iiiO:wxSizer_InsertSpacer",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_obj7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_InsertSpacer. Expected _wxSizer_p."); + return NULL; + } + } + if (_obj7) +{ + _arg7 = _obj7; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_InsertSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void wxSizer_PrependWindow(wxSizer *self,wxWindow * window,int option,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); @@ -1042,6 +1358,147 @@ static PyObject *_wrap_wxSizer_SetDimension(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxSizer_SetMinSize(_swigobj,_swigarg0) (_swigobj->SetMinSize(_swigarg0)) +static PyObject *_wrap_wxSizer_SetMinSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetMinSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetMinSize. Expected _wxSizer_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetMinSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeWindow(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizeWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeWindow",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeWindow. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetItemMinSizeWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetItemMinSizeWindow(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeSizer(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizeSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxSizer * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeSizer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetItemMinSizeSizer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizePos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizePos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxSizer_SetItemMinSizePos",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizePos. Expected _wxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetItemMinSizePos(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizer_GetSize(_swigobj) (_swigobj->GetSize()) static PyObject *_wrap_wxSizer_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1293,17 +1750,19 @@ static PyObject *_wrap_new_wxPySizer(PyObject *self, PyObject *args, PyObject *k return _resultobj; } -#define wxPySizer__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPySizer__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPySizer__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPySizer * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPySizer__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPySizer__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1315,9 +1774,12 @@ static PyObject *_wrap_wxPySizer__setSelf(PyObject *self, PyObject *args, PyObje { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPySizer__setSelf(_arg0,_arg1); + wxPySizer__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1386,6 +1848,62 @@ static PyObject *_wrap_wxBoxSizer_GetOrientation(PyObject *self, PyObject *args, return _resultobj; } +#define wxBoxSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxBoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBoxSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBoxSizer_RecalcSizes. Expected _wxBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBoxSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBoxSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBoxSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBoxSizer_CalcMin. Expected _wxBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxBoxSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static void *SwigwxStaticBoxSizerTowxBoxSizer(void *ptr) { wxStaticBoxSizer *src; wxBoxSizer *dest; @@ -1471,9 +1989,749 @@ static PyObject *_wrap_wxStaticBoxSizer_GetStaticBox(PyObject *self, PyObject *a return _resultobj; } +#define wxStaticBoxSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxStaticBoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStaticBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStaticBoxSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBoxSizer_RecalcSizes. Expected _wxStaticBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStaticBoxSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStaticBoxSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxStaticBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxStaticBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStaticBoxSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBoxSizer_CalcMin. Expected _wxStaticBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxStaticBoxSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static void *SwigwxNotebookSizerTowxSizer(void *ptr) { + wxNotebookSizer *src; + wxSizer *dest; + src = (wxNotebookSizer *) ptr; + dest = (wxSizer *) src; + return (void *) dest; +} + +#define new_wxNotebookSizer(_swigarg0) (new wxNotebookSizer(_swigarg0)) +static PyObject *_wrap_new_wxNotebookSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebookSizer * _result; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "nb", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxNotebookSizer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxNotebookSizer. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxNotebookSizer *)new_wxNotebookSizer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebookSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxNotebookSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxNotebookSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebookSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookSizer_RecalcSizes. Expected _wxNotebookSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebookSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebookSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxNotebookSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxNotebookSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookSizer_CalcMin. Expected _wxNotebookSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxNotebookSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxNotebookSizer_GetNotebook(_swigobj) (_swigobj->GetNotebook()) +static PyObject *_wrap_wxNotebookSizer_GetNotebook(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _result; + wxNotebookSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookSizer_GetNotebook",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookSizer_GetNotebook. Expected _wxNotebookSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxNotebook *)wxNotebookSizer_GetNotebook(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridSizerTowxSizer(void *ptr) { + wxGridSizer *src; + wxSizer *dest; + src = (wxGridSizer *) ptr; + dest = (wxSizer *) src; + return (void *) dest; +} + +#define new_wxGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxGridSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _result; + int _arg0 = (int ) 1; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + int _arg3 = (int ) 0; + char *_kwnames[] = { "rows","cols","vgap","hgap", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxGridSizer",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridSizer *)new_wxGridSizer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxGridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_RecalcSizes. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxGridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_CalcMin. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGridSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridSizer_SetCols(_swigobj,_swigarg0) (_swigobj->SetCols(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","cols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetCols",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetCols. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetCols(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_SetRows(_swigobj,_swigarg0) (_swigobj->SetRows(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","rows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetRows",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetRows. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_SetVGap(_swigobj,_swigarg0) (_swigobj->SetVGap(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetVGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","gap", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetVGap",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetVGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetVGap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_SetHGap(_swigobj,_swigarg0) (_swigobj->SetHGap(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetHGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","gap", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetHGap",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetHGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetHGap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_GetCols(_swigobj) (_swigobj->GetCols()) +static PyObject *_wrap_wxGridSizer_GetCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetCols",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetCols. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetCols(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizer_GetRows(_swigobj) (_swigobj->GetRows()) +static PyObject *_wrap_wxGridSizer_GetRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetRows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetRows. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetRows(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizer_GetVGap(_swigobj) (_swigobj->GetVGap()) +static PyObject *_wrap_wxGridSizer_GetVGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetVGap",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetVGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetVGap(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizer_GetHGap(_swigobj) (_swigobj->GetHGap()) +static PyObject *_wrap_wxGridSizer_GetHGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetHGap",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetHGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetHGap(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxFlexGridSizerTowxGridSizer(void *ptr) { + wxFlexGridSizer *src; + wxGridSizer *dest; + src = (wxFlexGridSizer *) ptr; + dest = (wxGridSizer *) src; + return (void *) dest; +} + +static void *SwigwxFlexGridSizerTowxSizer(void *ptr) { + wxFlexGridSizer *src; + wxSizer *dest; + src = (wxFlexGridSizer *) ptr; + dest = (wxSizer *) src; + return (void *) dest; +} + +#define new_wxFlexGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxFlexGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxFlexGridSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _result; + int _arg0 = (int ) 1; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + int _arg3 = (int ) 0; + char *_kwnames[] = { "rows","cols","vgap","hgap", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxFlexGridSizer",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFlexGridSizer *)new_wxFlexGridSizer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFlexGridSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFlexGridSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxFlexGridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFlexGridSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_RecalcSizes. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxFlexGridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxFlexGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFlexGridSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_CalcMin. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxFlexGridSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxFlexGridSizer_AddGrowableRow(_swigobj,_swigarg0) (_swigobj->AddGrowableRow(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_AddGrowableRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_AddGrowableRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_AddGrowableRow. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_AddGrowableRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_RemoveGrowableRow(_swigobj,_swigarg0) (_swigobj->RemoveGrowableRow(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_RemoveGrowableRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_RemoveGrowableRow. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_RemoveGrowableRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_AddGrowableCol(_swigobj,_swigarg0) (_swigobj->AddGrowableCol(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_AddGrowableCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_AddGrowableCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_AddGrowableCol. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_AddGrowableCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_RemoveGrowableCol(_swigobj,_swigarg0) (_swigobj->RemoveGrowableCol(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_RemoveGrowableCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_RemoveGrowableCol. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_RemoveGrowableCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef sizerscMethods[] = { + { "wxFlexGridSizer_RemoveGrowableCol", (PyCFunction) _wrap_wxFlexGridSizer_RemoveGrowableCol, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_AddGrowableCol", (PyCFunction) _wrap_wxFlexGridSizer_AddGrowableCol, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_RemoveGrowableRow", (PyCFunction) _wrap_wxFlexGridSizer_RemoveGrowableRow, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_AddGrowableRow", (PyCFunction) _wrap_wxFlexGridSizer_AddGrowableRow, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_CalcMin", (PyCFunction) _wrap_wxFlexGridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_RecalcSizes", (PyCFunction) _wrap_wxFlexGridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFlexGridSizer", (PyCFunction) _wrap_new_wxFlexGridSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetHGap", (PyCFunction) _wrap_wxGridSizer_GetHGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetVGap", (PyCFunction) _wrap_wxGridSizer_GetVGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetRows", (PyCFunction) _wrap_wxGridSizer_GetRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetCols", (PyCFunction) _wrap_wxGridSizer_GetCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetHGap", (PyCFunction) _wrap_wxGridSizer_SetHGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetVGap", (PyCFunction) _wrap_wxGridSizer_SetVGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetRows", (PyCFunction) _wrap_wxGridSizer_SetRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetCols", (PyCFunction) _wrap_wxGridSizer_SetCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_CalcMin", (PyCFunction) _wrap_wxGridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_RecalcSizes", (PyCFunction) _wrap_wxGridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridSizer", (PyCFunction) _wrap_new_wxGridSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookSizer_GetNotebook", (PyCFunction) _wrap_wxNotebookSizer_GetNotebook, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookSizer_CalcMin", (PyCFunction) _wrap_wxNotebookSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookSizer_RecalcSizes", (PyCFunction) _wrap_wxNotebookSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, + { "new_wxNotebookSizer", (PyCFunction) _wrap_new_wxNotebookSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticBoxSizer_CalcMin", (PyCFunction) _wrap_wxStaticBoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticBoxSizer_RecalcSizes", (PyCFunction) _wrap_wxStaticBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, { "wxStaticBoxSizer_GetStaticBox", (PyCFunction) _wrap_wxStaticBoxSizer_GetStaticBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxStaticBoxSizer", (PyCFunction) _wrap_new_wxStaticBoxSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxBoxSizer_CalcMin", (PyCFunction) _wrap_wxBoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxBoxSizer_RecalcSizes", (PyCFunction) _wrap_wxBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, { "wxBoxSizer_GetOrientation", (PyCFunction) _wrap_wxBoxSizer_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { "new_wxBoxSizer", (PyCFunction) _wrap_new_wxBoxSizer, METH_VARARGS | METH_KEYWORDS }, { "wxPySizer__setSelf", (PyCFunction) _wrap_wxPySizer__setSelf, METH_VARARGS | METH_KEYWORDS }, @@ -1485,6 +2743,10 @@ static PyMethodDef sizerscMethods[] = { { "wxSizer_GetMinSize", (PyCFunction) _wrap_wxSizer_GetMinSize, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetPosition", (PyCFunction) _wrap_wxSizer_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetSize", (PyCFunction) _wrap_wxSizer_GetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizePos", (PyCFunction) _wrap_wxSizer_SetItemMinSizePos, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizeSizer", (PyCFunction) _wrap_wxSizer_SetItemMinSizeSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizeWindow", (PyCFunction) _wrap_wxSizer_SetItemMinSizeWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetMinSize", (PyCFunction) _wrap_wxSizer_SetMinSize, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetDimension", (PyCFunction) _wrap_wxSizer_SetDimension, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_RemovePos", (PyCFunction) _wrap_wxSizer_RemovePos, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_RemoveSizer", (PyCFunction) _wrap_wxSizer_RemoveSizer, METH_VARARGS | METH_KEYWORDS }, @@ -1492,6 +2754,9 @@ static PyMethodDef sizerscMethods[] = { { "wxSizer_PrependSpacer", (PyCFunction) _wrap_wxSizer_PrependSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_PrependSizer", (PyCFunction) _wrap_wxSizer_PrependSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_PrependWindow", (PyCFunction) _wrap_wxSizer_PrependWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_InsertSpacer", (PyCFunction) _wrap_wxSizer_InsertSpacer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_InsertSizer", (PyCFunction) _wrap_wxSizer_InsertSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_InsertWindow", (PyCFunction) _wrap_wxSizer_InsertWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_AddSpacer", (PyCFunction) _wrap_wxSizer_AddSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_AddSizer", (PyCFunction) _wrap_wxSizer_AddSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_AddWindow", (PyCFunction) _wrap_wxSizer_AddWindow, METH_VARARGS | METH_KEYWORDS }, @@ -1504,11 +2769,17 @@ static PyMethodDef sizerscMethods[] = { { "wxSizerItem_GetBorder", (PyCFunction) _wrap_wxSizerItem_GetBorder, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetFlag", (PyCFunction) _wrap_wxSizerItem_GetFlag, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetOption", (PyCFunction) _wrap_wxSizerItem_GetOption, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetSizer", (PyCFunction) _wrap_wxSizerItem_SetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetSizer", (PyCFunction) _wrap_wxSizerItem_GetSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetWindow", (PyCFunction) _wrap_wxSizerItem_SetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetWindow", (PyCFunction) _wrap_wxSizerItem_GetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsSpacer", (PyCFunction) _wrap_wxSizerItem_IsSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsSizer", (PyCFunction) _wrap_wxSizerItem_IsSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsWindow", (PyCFunction) _wrap_wxSizerItem_IsWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetRatio", (PyCFunction) _wrap_wxSizerItem_GetRatio, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetRatio", (PyCFunction) _wrap_wxSizerItem_SetRatio, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetRatioSize", (PyCFunction) _wrap_wxSizerItem_SetRatioSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetRatioWH", (PyCFunction) _wrap_wxSizerItem_SetRatioWH, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_SetDimension", (PyCFunction) _wrap_wxSizerItem_SetDimension, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_CalcMin", (PyCFunction) _wrap_wxSizerItem_CalcMin, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetSize", (PyCFunction) _wrap_wxSizerItem_GetSize, METH_VARARGS | METH_KEYWORDS }, @@ -1521,14 +2792,7 @@ static PyMethodDef sizerscMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1537,260 +2801,100 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxPySizer","_class_wxPySizer",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_wxPrintQuality","_time_t",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, + { "_class_wxSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_class_wxSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_class_wxSizer","_class_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_class_wxSizer","_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_class_wxSizer","_class_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, + { "_class_wxSizer","_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, { "_class_wxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_class_wxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_class_wxSizer","_class_wxBoxSizer",SwigwxBoxSizerTowxSizer}, { "_class_wxSizer","_wxBoxSizer",SwigwxBoxSizerTowxSizer}, { "_class_wxSizer","_class_wxPySizer",SwigwxPySizerTowxSizer}, { "_class_wxSizer","_wxPySizer",SwigwxPySizerTowxSizer}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, + { "_wxGridSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, + { "_wxGridSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, + { "_wxChar","_char",0}, { "_wxBoxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, { "_wxBoxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, { "_class_wxBoxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, + { "_class_wxGridSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, + { "_class_wxGridSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -1798,45 +2902,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, + { "_wxSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_wxSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_wxSizer","_class_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_wxSizer","_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_wxSizer","_class_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, + { "_wxSizer","_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, { "_wxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_wxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_wxSizer","_class_wxBoxSizer",SwigwxBoxSizerTowxSizer}, { "_wxSizer","_wxBoxSizer",SwigwxBoxSizerTowxSizer}, { "_wxSizer","_class_wxPySizer",SwigwxPySizerTowxSizer}, { "_wxSizer","_wxPySizer",SwigwxPySizerTowxSizer}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/sizers.py b/wxPython/src/gtk/sizers.py similarity index 54% rename from utils/wxPython/src/msw/sizers.py rename to wxPython/src/gtk/sizers.py index 6f809036ad..9dbce08acb 100644 --- a/utils/wxPython/src/msw/sizers.py +++ b/wxPython/src/gtk/sizers.py @@ -29,6 +29,18 @@ class wxSizerItemPtr : def SetDimension(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetDimension,(self,) + _args, _kwargs) return val + def SetRatioWH(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetRatioWH,(self,) + _args, _kwargs) + return val + def SetRatioSize(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetRatioSize,(self,) + _args, _kwargs) + return val + def SetRatio(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetRatio,(self,) + _args, _kwargs) + return val + def GetRatio(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetRatio,(self,) + _args, _kwargs) + return val def IsWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_IsWindow,(self,) + _args, _kwargs) return val @@ -42,10 +54,16 @@ class wxSizerItemPtr : val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs) if val: val = wxWindowPtr(val) return val + def SetWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetWindow,(self,) + _args, _kwargs) + return val def GetSizer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetSizer,(self,) + _args, _kwargs) if val: val = wxSizerPtr(val) return val + def SetSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetSizer,(self,) + _args, _kwargs) + return val def GetOption(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetOption,(self,) + _args, _kwargs) return val @@ -95,6 +113,15 @@ class wxSizerPtr : def AddSpacer(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_AddSpacer,(self,) + _args, _kwargs) return val + def InsertWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_InsertWindow,(self,) + _args, _kwargs) + return val + def InsertSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_InsertSizer,(self,) + _args, _kwargs) + return val + def InsertSpacer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_InsertSpacer,(self,) + _args, _kwargs) + return val def PrependWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_PrependWindow,(self,) + _args, _kwargs) return val @@ -116,6 +143,18 @@ class wxSizerPtr : def SetDimension(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_SetDimension,(self,) + _args, _kwargs) return val + def SetMinSize(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetMinSize,(self,) + _args, _kwargs) + return val + def SetItemMinSizeWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizeWindow,(self,) + _args, _kwargs) + return val + def SetItemMinSizeSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizeSizer,(self,) + _args, _kwargs) + return val + def SetItemMinSizePos(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizePos,(self,) + _args, _kwargs) + return val def GetSize(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_GetSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 @@ -151,6 +190,14 @@ class wxSizerPtr : else: apply(self.AddWindow, args) + def Insert(self, *args): + if type(args[1]) == type(1): + apply(self.InsertSpacer, args) + elif string.find(args[1].this, 'Sizer') != -1: + apply(self.InsertSizer, args) + else: + apply(self.InsertWindow, args) + def Prepend(self, *args): if type(args[0]) == type(1): apply(self.PrependSpacer, args) @@ -173,6 +220,15 @@ class wxSizerPtr : childinfo = (childinfo, ) apply(self.Add, childinfo) + + def SetItemMinSize(self, *args): + if type(args[0]) == type(1): + apply(self.SetItemMinSizePos, args) + elif string.find(args[0].this, 'Sizer') != -1: + apply(self.SetItemMinSizeSizer, args) + else: + apply(self.SetItemMinSizeWindow, args) + class wxSizer(wxSizerPtr): def __init__(self,this): self.this = this @@ -193,7 +249,7 @@ class wxPySizer(wxPySizerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(sizersc.new_wxPySizer,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPySizer) @@ -205,6 +261,13 @@ class wxBoxSizerPtr(wxSizerPtr): def GetOrientation(self, *_args, **_kwargs): val = apply(sizersc.wxBoxSizer_GetOrientation,(self,) + _args, _kwargs) return val + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxBoxSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxBoxSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val def __repr__(self): return "" % (self.this,) class wxBoxSizer(wxBoxSizerPtr): @@ -223,6 +286,13 @@ class wxStaticBoxSizerPtr(wxBoxSizerPtr): val = apply(sizersc.wxStaticBoxSizer_GetStaticBox,(self,) + _args, _kwargs) if val: val = wxStaticBoxPtr(val) return val + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxStaticBoxSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxStaticBoxSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val def __repr__(self): return "" % (self.this,) class wxStaticBoxSizer(wxStaticBoxSizerPtr): @@ -233,6 +303,109 @@ class wxStaticBoxSizer(wxStaticBoxSizerPtr): +class wxNotebookSizerPtr(wxSizerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxNotebookSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxNotebookSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def GetNotebook(self, *_args, **_kwargs): + val = apply(sizersc.wxNotebookSizer_GetNotebook,(self,) + _args, _kwargs) + if val: val = wxNotebookPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxNotebookSizer(wxNotebookSizerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(sizersc.new_wxNotebookSizer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridSizerPtr(wxSizerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def SetCols(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetCols,(self,) + _args, _kwargs) + return val + def SetRows(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetRows,(self,) + _args, _kwargs) + return val + def SetVGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetVGap,(self,) + _args, _kwargs) + return val + def SetHGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetHGap,(self,) + _args, _kwargs) + return val + def GetCols(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetCols,(self,) + _args, _kwargs) + return val + def GetRows(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetRows,(self,) + _args, _kwargs) + return val + def GetVGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetVGap,(self,) + _args, _kwargs) + return val + def GetHGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetHGap,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridSizer(wxGridSizerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(sizersc.new_wxGridSizer,_args,_kwargs) + self.thisown = 1 + + + + +class wxFlexGridSizerPtr(wxGridSizerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def AddGrowableRow(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_AddGrowableRow,(self,) + _args, _kwargs) + return val + def RemoveGrowableRow(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_RemoveGrowableRow,(self,) + _args, _kwargs) + return val + def AddGrowableCol(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_AddGrowableCol,(self,) + _args, _kwargs) + return val + def RemoveGrowableCol(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_RemoveGrowableCol,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFlexGridSizer(wxFlexGridSizerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(sizersc.new_wxFlexGridSizer,_args,_kwargs) + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ diff --git a/utils/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp similarity index 89% rename from utils/wxPython/src/gtk/stattool.cpp rename to wxPython/src/gtk/stattool.cpp index a24e12129a..2e23c90603 100644 --- a/utils/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/stattool.cpp + * FILE : src/gtk/stattool.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,54 +59,36 @@ extern PyObject *SWIG_newvarlink(void); #include #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; } static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); #ifdef __cplusplus extern "C" { #endif @@ -130,8 +114,8 @@ static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject wxStatusBar * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxST_SIZEGRIP; char * _arg5 = (char *) "statusBar"; PyObject * _argo0 = 0; @@ -381,11 +365,22 @@ static PyObject *_wrap_wxStatusBar_SetStatusText(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1068,11 +1063,22 @@ static PyObject *_wrap_wxToolBarToolBase_SetShortHelp(PyObject *self, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1108,11 +1114,22 @@ static PyObject *_wrap_wxToolBarToolBase_SetLongHelp(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1358,11 +1375,11 @@ static void *SwigwxToolBarBaseTowxEvtHandler(void *ptr) { return (void *) dest; } -static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->AddTool(id, bitmap, pushedBitmap, (bool)toggle, + return self->AddTool(id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1382,7 +1399,7 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO PyObject * _obj5 = 0; PyObject * _obj6 = 0; PyObject * _obj7 = 0; - char *_kwnames[] = { "self","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1415,19 +1432,41 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO } if (_obj6) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg6 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj6)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg6 = new wxString(PyString_AsString(_obj6), PyString_Size(_obj6)); + _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6)); +#endif } if (_obj7) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg7 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj7)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg7 = new wxString(PyString_AsString(_obj7), PyString_Size(_obj7)); + _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1452,8 +1491,8 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->AddTool(id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1469,7 +1508,7 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg PyObject * _argo2 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; - char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -1491,19 +1530,41 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg } if (_obj3) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } if (_obj4) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg4 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj4)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4)); + _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1528,11 +1589,11 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)toggle, + return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1553,7 +1614,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject * _obj6 = 0; PyObject * _obj7 = 0; PyObject * _obj8 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1586,19 +1647,41 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, } if (_obj7) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg7 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj7)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg7 = new wxString(PyString_AsString(_obj7), PyString_Size(_obj7)); + _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); +#endif } if (_obj8) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj8) && !PyUnicode_Check(_obj8)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj8, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg8 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj8)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg8 = new wxString(PyString_AsString(_obj8), PyString_Size(_obj8)); + _arg8 = new wxString(PyString_AS_STRING(_obj8), PyString_GET_SIZE(_obj8)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1623,8 +1706,8 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->InsertTool(pos, id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1641,7 +1724,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * PyObject * _argo3 = 0; PyObject * _obj4 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -1663,19 +1746,41 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * } if (_obj4) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg4 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj4)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4)); + _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); +#endif } if (_obj5) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj5) && !PyUnicode_Check(_obj5)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj5, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg5 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj5)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg5 = new wxString(PyString_AsString(_obj5), PyString_Size(_obj5)); + _arg5 = new wxString(PyString_AS_STRING(_obj5), PyString_GET_SIZE(_obj5)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2245,11 +2350,22 @@ static PyObject *_wrap_wxToolBarBase_SetToolShortHelp(PyObject *self, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2319,11 +2435,22 @@ static PyObject *_wrap_wxToolBarBase_SetToolLongHelp(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2817,8 +2944,8 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k wxToolBar * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; char * _arg5 = (char *) wxToolBarNameStr; PyObject * _argo0 = 0; @@ -2940,8 +3067,8 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj wxToolBarSimple * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; char * _arg5 = (char *) wxToolBarNameStr; PyObject * _argo0 = 0; @@ -3114,14 +3241,7 @@ static PyMethodDef stattoolcMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -3130,10 +3250,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxEvtHandler}, { "_class_wxEvtHandler","_wxToolBarSimple",SwigwxToolBarSimpleTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxToolBar",SwigwxToolBarTowxEvtHandler}, @@ -3142,150 +3259,43 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxEvtHandler","_wxToolBarBase",SwigwxToolBarBaseTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxStatusBar",SwigwxStatusBarTowxEvtHandler}, { "_class_wxEvtHandler","_wxStatusBar",SwigwxStatusBarTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, { "_class_wxToolBarBase","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxToolBarBase}, { "_class_wxToolBarBase","_wxToolBarSimple",SwigwxToolBarSimpleTowxToolBarBase}, { "_class_wxToolBarBase","_class_wxToolBar",SwigwxToolBarTowxToolBarBase}, { "_class_wxToolBarBase","_wxToolBar",SwigwxToolBarTowxToolBarBase}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxWindow}, @@ -3296,120 +3306,60 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_wxToolBarBase",SwigwxToolBarBaseTowxWindow}, { "_class_wxWindow","_class_wxStatusBar",SwigwxStatusBarTowxWindow}, { "_class_wxWindow","_wxStatusBar",SwigwxStatusBarTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxControl}, { "_wxControl","_wxToolBarSimple",SwigwxToolBarSimpleTowxControl}, { "_wxControl","_class_wxToolBar",SwigwxToolBarTowxControl}, { "_wxControl","_wxToolBar",SwigwxToolBarTowxControl}, { "_wxControl","_class_wxToolBarBase",SwigwxToolBarBaseTowxControl}, { "_wxControl","_wxToolBarBase",SwigwxToolBarBaseTowxControl}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxToolBarBase","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxToolBarBase}, { "_wxToolBarBase","_wxToolBarSimple",SwigwxToolBarSimpleTowxToolBarBase}, { "_wxToolBarBase","_class_wxToolBar",SwigwxToolBarTowxToolBarBase}, { "_wxToolBarBase","_wxToolBar",SwigwxToolBarTowxToolBarBase}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxControl}, { "_class_wxControl","_wxToolBarSimple",SwigwxToolBarSimpleTowxControl}, { "_class_wxControl","_class_wxToolBar",SwigwxToolBarTowxControl}, { "_class_wxControl","_wxToolBar",SwigwxToolBarTowxControl}, { "_class_wxControl","_class_wxToolBarBase",SwigwxToolBarBaseTowxControl}, { "_class_wxControl","_wxToolBarBase",SwigwxToolBarBaseTowxControl}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -3417,26 +3367,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, { "_wxEvtHandler","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxEvtHandler}, { "_wxEvtHandler","_wxToolBarSimple",SwigwxToolBarSimpleTowxEvtHandler}, { "_wxEvtHandler","_class_wxToolBar",SwigwxToolBarTowxEvtHandler}, @@ -3445,17 +3377,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_wxToolBarBase",SwigwxToolBarBaseTowxEvtHandler}, { "_wxEvtHandler","_class_wxStatusBar",SwigwxStatusBarTowxEvtHandler}, { "_wxEvtHandler","_wxStatusBar",SwigwxStatusBarTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, { "_wxWindow","_class_wxToolBarSimple",SwigwxToolBarSimpleTowxWindow}, { "_wxWindow","_wxToolBarSimple",SwigwxToolBarSimpleTowxWindow}, { "_wxWindow","_class_wxToolBar",SwigwxToolBarTowxWindow}, @@ -3464,8 +3385,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxToolBarBase",SwigwxToolBarBaseTowxWindow}, { "_wxWindow","_class_wxStatusBar",SwigwxStatusBarTowxWindow}, { "_wxWindow","_wxStatusBar",SwigwxStatusBarTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/stattool.py b/wxPython/src/gtk/stattool.py similarity index 99% rename from utils/wxPython/src/msw/stattool.py rename to wxPython/src/gtk/stattool.py index f9cc36b5f9..0b423d7f46 100644 --- a/utils/wxPython/src/msw/stattool.py +++ b/wxPython/src/gtk/stattool.py @@ -51,7 +51,7 @@ class wxStatusBar(wxStatusBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxStatusBar,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -308,7 +308,7 @@ class wxToolBar(wxToolBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxToolBar,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -327,7 +327,7 @@ class wxToolBarSimple(wxToolBarSimplePtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxToolBarSimple,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) diff --git a/wxPython/src/gtk/streams.cpp b/wxPython/src/gtk/streams.cpp new file mode 100644 index 0000000000..a7ba798ceb --- /dev/null +++ b/wxPython/src/gtk/streams.cpp @@ -0,0 +1,845 @@ +/* + * FILE : src/gtk/streams.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initstreamsc + +#define SWIG_name "streamsc" + +#include "helpers.h" +#include +#include + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + // C++ +// definitions of wxStringPtrList and wxPyInputStream +#include +WX_DEFINE_LIST(wxStringPtrList); + + +void wxPyInputStream::close() { + /* do nothing */ +} + +void wxPyInputStream::flush() { + /*do nothing*/ +} + +bool wxPyInputStream::eof() { + if (wxi) + return wxi->Eof(); + else + return TRUE; +} + +wxPyInputStream::~wxPyInputStream() { + /*do nothing*/ +} + +wxString* wxPyInputStream::read(int size) { + wxString* s = NULL; + const int BUFSIZE = 1024; + + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + if (size < 0) { + // init buffers + char * buf = new char[BUFSIZE]; + if (!buf) { + PyErr_NoMemory(); + return NULL; + } + + s = new wxString(); + if (!s) { + delete buf; + PyErr_NoMemory(); + return NULL; + } + + // read until EOF + wxPy_BEGIN_ALLOW_THREADS; + while (! wxi->Eof()) { + wxi->Read(buf, BUFSIZE); + //*s += wxString(buf, wxi->LastRead()); + s->Append(buf, wxi->LastRead()); + } + delete buf; + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + + } else { // Read only size number of characters + s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read size bytes + wxPy_BEGIN_ALLOW_THREADS; + wxi->Read(s->GetWriteBuf(size+1), size); + s->UngetWriteBuf(wxi->LastRead()); + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + } + return s; +} + + +wxString* wxPyInputStream::readline (int size) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init buffer + int i; + char ch; + wxString* s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read until \n or byte limit reached + wxPy_BEGIN_ALLOW_THREADS; + for (i=ch=0; (ch != '\n') && (!wxi->Eof()) && ((size < 0) || (i < size)); i++) { + *s += ch = wxi->GetC(); + } + wxPy_END_ALLOW_THREADS; + + // errorcheck + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return s; +} + + +wxStringPtrList* wxPyInputStream::readlines (int sizehint) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init list + wxStringPtrList* l = new wxStringPtrList(); + if (!l) { + PyErr_NoMemory(); + return NULL; + } + + // read sizehint bytes or until EOF + wxPy_BEGIN_ALLOW_THREADS; + int i; + for (i=0; (!wxi->Eof()) && ((sizehint < 0) || (i < sizehint));) { + wxString* s = readline(); + if (s == NULL) { + l->DeleteContents(TRUE); + l->Clear(); + return NULL; + } + l->Append(s); + i = i + s->Length(); + } + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + l->DeleteContents(TRUE); + l->Clear(); + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return l; +} + + +void wxPyInputStream::seek(int offset, int whence) { + if (wxi) + wxi->SeekI(offset, wxSeekMode(whence)); +} + +int wxPyInputStream::tell(){ + if (wxi) + return wxi->TellI(); +} + + + +// wxInputStream which operates on a Python file-like object +class wxPyCBInputStream : public wxInputStream { +protected: + PyObject* read; + PyObject* seek; + PyObject* tell; + PyObject* py; + + virtual size_t OnSysRead(void *buffer, size_t bufsize) { + if (bufsize == 0) + return 0; + + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("(i)", bufsize); + PyObject* result = PyEval_CallObject(read, arglist); + Py_DECREF(arglist); + + size_t o = 0; + if ((result != NULL) && PyString_Check(result)) { + o = PyString_Size(result); + if (o == 0) + m_lasterror = wxSTREAM_EOF; + if (o > bufsize) + o = bufsize; + strncpy((char*)buffer, PyString_AsString(result), o); + Py_DECREF(result); + + } + else + m_lasterror = wxSTREAM_READ_ERROR; + wxPySaveThread(doSave); + m_lastcount = o; + return o; + } + + virtual size_t OnSysWrite(const void *buffer, size_t bufsize){ + m_lasterror = wxSTREAM_WRITE_ERROR; + return 0; + } + + virtual off_t OnSysSeek(off_t off, wxSeekMode mode){ + bool doSave = wxPyRestoreThread(); + PyObject*arglist = Py_BuildValue("(ii)", off, mode); + PyObject*result = PyEval_CallObject(seek, arglist); + Py_DECREF(arglist); + Py_XDECREF(result); + wxPySaveThread(doSave); + return OnSysTell(); + } + + virtual off_t OnSysTell() const{ + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("()"); + PyObject* result = PyEval_CallObject(tell, arglist); + Py_DECREF(arglist); + off_t o = 0; + if (result != NULL) { + o = PyInt_AsLong(result); + Py_DECREF(result); + }; + wxPySaveThread(doSave); + return o; + } + + wxPyCBInputStream(PyObject *p, PyObject *r, PyObject *s, PyObject *t) + : py(p), read(r), seek(s), tell(t) + {} + +public: + ~wxPyCBInputStream() { + bool doSave = wxPyRestoreThread(); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + wxPySaveThread(doSave); + } + + virtual size_t GetSize() { + if (seek && tell) { + off_t temp = OnSysTell(); + off_t ret = OnSysSeek(0, wxFromEnd); + OnSysSeek(temp, wxFromStart); + return ret; + } + else + return 0; + } + + static wxPyCBInputStream* create(PyObject *py) { + PyObject* read; + PyObject* seek; + PyObject* tell; + + if (!PyInstance_Check(py) && !PyFile_Check(py)) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + return NULL; + } + read = getMethod(py, "read"); + seek = getMethod(py, "seek"); + tell = getMethod(py, "tell"); + + if (!read) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + return NULL; + } + return new wxPyCBInputStream(py, read, seek, tell); + } + + static PyObject* getMethod(PyObject* py, char* name) { + if (!PyObject_HasAttrString(py, name)) + return NULL; + PyObject* o = PyObject_GetAttrString(py, name); + if (!PyMethod_Check(o) && !PyCFunction_Check(o)) { + Py_DECREF(o); + return NULL; + } + return o; + } + +protected: + +}; + +#ifdef __cplusplus +extern "C" { +#endif +static wxPyInputStream *new_wxPyInputStream(PyObject *p) { + wxInputStream* wxi = wxPyCBInputStream::create(p); + if (wxi) + return new wxPyInputStream(wxi); + else + return NULL; + } + +static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxInputStream",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); + +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyInputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxInputStream_close(_swigobj) (_swigobj->close()) +static PyObject *_wrap_wxInputStream_close(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_close",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_close. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_close(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_flush(_swigobj) (_swigobj->flush()) +static PyObject *_wrap_wxInputStream_flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_flush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_flush. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_flush(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_eof(_swigobj) (_swigobj->eof()) +static PyObject *_wrap_wxInputStream_eof(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_eof",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_eof. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (bool )wxInputStream_eof(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_read(_swigobj,_swigarg0) (_swigobj->read(_swigarg0)) +static PyObject *_wrap_wxInputStream_read(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_read",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_read. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_read(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readline(_swigobj,_swigarg0) (_swigobj->readline(_swigarg0)) +static PyObject *_wrap_wxInputStream_readline(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readline",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readline. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_readline(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readlines(_swigobj,_swigarg0) (_swigobj->readlines(_swigarg0)) +static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStringPtrList * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","sizehint", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readlines",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readlines. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyList_New(_result->GetCount()); + wxStringPtrList::Node *node = _result->GetFirst(); + for (int i=0; node; i++) { + wxString *s = node->GetData(); + PyList_SetItem(_resultobj, i, PyString_FromStringAndSize(s->c_str(), s->Len())); + node = node->GetNext(); + delete s; + } + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_seek(_swigobj,_swigarg0,_swigarg1) (_swigobj->seek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInputStream_seek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + int _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","offset","whence", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxInputStream_seek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_seek. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_seek(_arg0,_arg1,_arg2); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_tell(_swigobj) (_swigobj->tell()) +static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_tell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_tell. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (int )wxInputStream_tell(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void wxOutputStream_write(wxOutputStream *self,const wxString & str) { + self->Write(str.c_str(), str.Length()); + } +static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxOutputStream_write",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxOutputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxOutputStream_write. Expected _wxOutputStream_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxOutputStream_write(_arg0,*_arg1); + +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyMethodDef streamscMethods[] = { + { "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readline", (PyCFunction) _wrap_wxInputStream_readline, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_read", (PyCFunction) _wrap_wxInputStream_read, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_eof", (PyCFunction) _wrap_wxInputStream_eof, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_flush", (PyCFunction) _wrap_wxInputStream_flush, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_close", (PyCFunction) _wrap_wxInputStream_close, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInputStream", (PyCFunction) _wrap_new_wxInputStream, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initstreamsc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("streamsc", streamscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/streams.py b/wxPython/src/gtk/streams.py new file mode 100644 index 0000000000..6394f60946 --- /dev/null +++ b/wxPython/src/gtk/streams.py @@ -0,0 +1,66 @@ +# This file was created automatically by SWIG. +import streamsc +import wx +import string +class wxInputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def close(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_close,(self,) + _args, _kwargs) + return val + def flush(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_flush,(self,) + _args, _kwargs) + return val + def eof(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_eof,(self,) + _args, _kwargs) + return val + def read(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_read,(self,) + _args, _kwargs) + return val + def readline(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readline,(self,) + _args, _kwargs) + return val + def readlines(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readlines,(self,) + _args, _kwargs) + return val + def seek(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_seek,(self,) + _args, _kwargs) + return val + def tell(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_tell,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxInputStream(wxInputStreamPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(streamsc.new_wxInputStream,_args,_kwargs) + self.thisown = 1 + + + + +class wxOutputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def write(self, *_args, **_kwargs): + val = apply(streamsc.wxOutputStream_write,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxOutputStream(wxOutputStreamPtr): + def __init__(self,this): + self.this = this + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/wxPython/src/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp new file mode 100644 index 0000000000..2e09af71f1 --- /dev/null +++ b/wxPython/src/gtk/utils.cpp @@ -0,0 +1,7906 @@ +/* + * FILE : src/gtk/utils.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initutilsc + +#define SWIG_name "utilsc" + +#include "export.h" +#include +#include +#include + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); + + static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { + PyObject* ret = PyTuple_New(3); + if (ret) { + PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); + PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); + PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); + } + return ret; + } + +#define LOCAL *(new wxDateTime::TimeZone(wxDateTime::Local)) +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap_wxGetLocalTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetLocalTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetLocalTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetUTCTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUTCTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetUTCTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetCurrentTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetCurrentTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetCurrentTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetLocalTimeMillis(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLongLong * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetLocalTimeMillis",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxLongLong (wxGetLocalTimeMillis()); + + wxPy_END_ALLOW_THREADS; +}{ + PyObject *hi, *lo, *shifter, *shifted; + hi = PyLong_FromLong(_result->GetHi()); + lo = PyLong_FromLong(_result->GetLo()); + shifter = PyLong_FromLong(32); + shifted = PyNumber_Lshift(hi, shifter); + _resultobj = PyNumber_Or(shifted, lo); + Py_DECREF(hi); + Py_DECREF(lo); + Py_DECREF(shifter); + Py_DECREF(shifted); +} + return _resultobj; +} + +#define delete_wxConfigBase(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxConfigBase(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxConfigBase",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfigBase. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxConfigBase(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pConfig", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_Set",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Set. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase *)wxConfigBase::Set(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfigBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_Get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _result; + bool _arg0 = (bool ) TRUE; + int tempbool0 = (int) TRUE; + char *_kwnames[] = { "createOnDemand", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxConfigBase_Get",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase *)wxConfigBase::Get(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfigBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxConfigBase_Create",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase *)wxConfigBase::Create(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfigBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_DontCreateOnDemand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxConfigBase_DontCreateOnDemand",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase::DontCreateOnDemand(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_DeleteAll(_swigobj) (_swigobj->DeleteAll()) +static PyObject *_wrap_wxConfigBase_DeleteAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_DeleteAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_DeleteAll. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_DeleteAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_DeleteEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteEntry(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_DeleteEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","key","bDeleteGroupIfEmpty", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxConfigBase_DeleteEntry",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_DeleteEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_DeleteEntry(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_DeleteGroup(_swigobj,_swigarg0) (_swigobj->DeleteGroup(_swigarg0)) +static PyObject *_wrap_wxConfigBase_DeleteGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_DeleteGroup",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_DeleteGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_DeleteGroup(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_Exists(_swigobj,_swigarg0) (_swigobj->Exists(_swigarg0)) +static PyObject *_wrap_wxConfigBase_Exists(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_Exists",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Exists. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_Exists(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_Flush(_swigobj,_swigarg0) (_swigobj->Flush(_swigarg0)) +static PyObject *_wrap_wxConfigBase_Flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","bCurrentOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_Flush",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Flush. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_Flush(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_GetAppName(_swigobj) (_swigobj->GetAppName()) +static PyObject *_wrap_wxConfigBase_GetAppName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetAppName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetAppName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_GetAppName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetFirstGroup(wxConfigBase *self) { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstGroup(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetFirstGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetFirstGroup",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetFirstGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetFirstGroup(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetFirstEntry(wxConfigBase *self) { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstEntry(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetFirstEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetFirstEntry",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetFirstEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetFirstEntry(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetNextGroup(wxConfigBase *self,long index) { + bool cont; + wxString value; + + cont = self->GetNextGroup(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetNextGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","index", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfigBase_GetNextGroup",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNextGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetNextGroup(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetNextEntry(wxConfigBase *self,long index) { + bool cont; + wxString value; + + cont = self->GetNextEntry(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetNextEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","index", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfigBase_GetNextEntry",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNextEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetNextEntry(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +#define wxConfigBase_GetNumberOfEntries(_swigobj,_swigarg0) (_swigobj->GetNumberOfEntries(_swigarg0)) +static PyObject *_wrap_wxConfigBase_GetNumberOfEntries(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxConfigBase * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","bRecursive", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_GetNumberOfEntries",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNumberOfEntries. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxConfigBase_GetNumberOfEntries(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_GetNumberOfGroups(_swigobj,_swigarg0) (_swigobj->GetNumberOfGroups(_swigarg0)) +static PyObject *_wrap_wxConfigBase_GetNumberOfGroups(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxConfigBase * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","bRecursive", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_GetNumberOfGroups",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNumberOfGroups. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxConfigBase_GetNumberOfGroups(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxConfigBase_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetPath. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_GetPath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfigBase_GetVendorName(_swigobj) (_swigobj->GetVendorName()) +static PyObject *_wrap_wxConfigBase_GetVendorName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetVendorName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetVendorName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_GetVendorName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfigBase_HasEntry(_swigobj,_swigarg0) (_swigobj->HasEntry(_swigarg0)) +static PyObject *_wrap_wxConfigBase_HasEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_HasEntry",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_HasEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_HasEntry(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_HasGroup(_swigobj,_swigarg0) (_swigobj->HasGroup(_swigarg0)) +static PyObject *_wrap_wxConfigBase_HasGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_HasGroup",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_HasGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_HasGroup(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_IsExpandingEnvVars(_swigobj) (_swigobj->IsExpandingEnvVars()) +static PyObject *_wrap_wxConfigBase_IsExpandingEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_IsExpandingEnvVars",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_IsExpandingEnvVars. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_IsExpandingEnvVars(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_IsRecordingDefaults(_swigobj) (_swigobj->IsRecordingDefaults()) +static PyObject *_wrap_wxConfigBase_IsRecordingDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_IsRecordingDefaults",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_IsRecordingDefaults. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_IsRecordingDefaults(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_Read(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","key","defaultVal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxConfigBase_Read",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Read. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_Read(_arg0,*_arg1,*_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfigBase_ReadInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_ReadInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxConfigBase * _arg0; + wxString * _arg1; + long _arg2 = (long ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","defaultVal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|l:wxConfigBase_ReadInt",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_ReadInt. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxConfigBase_ReadInt(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_ReadFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_ReadFloat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxConfigBase * _arg0; + wxString * _arg1; + double _arg2 = (double ) 0.0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","defaultVal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|d:wxConfigBase_ReadFloat",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_ReadFloat. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxConfigBase_ReadFloat(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetExpandEnvVars(_swigobj,_swigarg0) (_swigobj->SetExpandEnvVars(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bDoIt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_SetExpandEnvVars",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetExpandEnvVars. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetExpandEnvVars(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strPath", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_SetPath",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetPath. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetPath(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetRecordDefaults(_swigobj,_swigarg0) (_swigobj->SetRecordDefaults(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetRecordDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bDoIt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_SetRecordDefaults",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetRecordDefaults. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetRecordDefaults(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetAppName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","appName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_SetAppName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetAppName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetAppName(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetVendorName(_swigobj,_swigarg0) (_swigobj->SetVendorName(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetVendorName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","vendorName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_SetVendorName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetVendorName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetVendorName(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfigBase_SetStyle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetStyle. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxConfigBase_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetStyle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetStyle. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxConfigBase_GetStyle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxConfigBase_Write(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_Write(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","key","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfigBase_Write",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Write. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_Write(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxConfigBase_WriteInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_WriteInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + long _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxConfigBase_WriteInt",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_WriteInt. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_WriteInt(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_WriteFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_WriteFloat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + double _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOd:wxConfigBase_WriteFloat",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_WriteFloat. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_WriteFloat(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_GetEntryType(_swigobj,_swigarg0) (_swigobj->GetEntryType(_swigarg0)) +static PyObject *_wrap_wxConfigBase_GetEntryType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase::EntryType _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_GetEntryType",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetEntryType. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase::EntryType )wxConfigBase_GetEntryType(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_RenameEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->RenameEntry(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_RenameEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","oldName","newName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfigBase_RenameEntry",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_RenameEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_RenameEntry(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxConfigBase_RenameGroup(_swigobj,_swigarg0,_swigarg1) (_swigobj->RenameGroup(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_RenameGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","oldName","newName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfigBase_RenameGroup",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_RenameGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_RenameGroup(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxConfigBase_ExpandEnvVars(_swigobj,_swigarg0) (_swigobj->ExpandEnvVars(_swigarg0)) +static PyObject *_wrap_wxConfigBase_ExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_ExpandEnvVars",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_ExpandEnvVars. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_ExpandEnvVars(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +static void *SwigwxConfigTowxConfigBase(void *ptr) { + wxConfig *src; + wxConfigBase *dest; + src = (wxConfig *) ptr; + dest = (wxConfigBase *) src; + return (void *) dest; +} + +#define new_wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfig * _result; + wxString * _arg0 = (wxString *) &wxPyEmptyStr; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxString * _arg3 = (wxString *) &wxPyEmptyStr; + long _arg4 = (long ) 0; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "appName","vendorName","localFilename","globalFilename","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOOl:new_wxConfig",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_arg4)) + return NULL; + if (_obj0) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_obj3) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define delete_wxConfig(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfig * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxConfig",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfig. Expected _wxConfig_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxConfig(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxFileConfigTowxConfigBase(void *ptr) { + wxFileConfig *src; + wxConfigBase *dest; + src = (wxFileConfig *) ptr; + dest = (wxConfigBase *) src; + return (void *) dest; +} + +#define new_wxFileConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFileConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileConfig * _result; + wxString * _arg0 = (wxString *) &wxPyEmptyStr; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxString * _arg3 = (wxString *) &wxPyEmptyStr; + long _arg4 = (long ) 0; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "appName","vendorName","localFilename","globalFilename","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOOl:new_wxFileConfig",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_arg4)) + return NULL; + if (_obj0) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_obj3) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileConfig *)new_wxFileConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileConfig_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define delete_wxFileConfig(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFileConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileConfig * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFileConfig",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFileConfig. Expected _wxFileConfig_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxFileConfig(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_SetCountry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Country _arg0; + char *_kwnames[] = { "country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateTime_SetCountry",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime::SetCountry(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCountry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Country _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_GetCountry",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::Country )wxDateTime::GetCountry(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_IsWestEuropeanCountry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime::Country _arg0 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_IsWestEuropeanCountry",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime::IsWestEuropeanCountry(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCurrentYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime::Calendar _arg0 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_GetCurrentYear",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime::GetCurrentYear(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_ConvertYearToBC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateTime_ConvertYearToBC",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime::ConvertYearToBC(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCurrentMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Month _result; + wxDateTime::Calendar _arg0 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_GetCurrentMonth",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::Month )wxDateTime::GetCurrentMonth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_IsLeapYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Calendar _arg1 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "year","cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_IsLeapYear",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime::IsLeapYear(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCentury(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + char *_kwnames[] = { "year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_GetCentury",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime::GetCentury(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetNumberOfDaysinYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + int _arg0; + wxDateTime::Calendar _arg1 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "year","cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|i:wxDateTime_GetNumberOfDaysinYear",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetNumberOfDaysInMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime::Month _arg0; + int _arg1 = (int ) wxDateTime::Inv_Year; + wxDateTime::Calendar _arg2 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "month","year","cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|ii:wxDateTime_GetNumberOfDaysInMonth",_kwnames,&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetMonthName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime::Month _arg0; + wxDateTime::NameFlags _arg1 = (wxDateTime::NameFlags ) wxDateTime::Name_Full; + char *_kwnames[] = { "month","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|i:wxDateTime_GetMonthName",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime::GetMonthName(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetWeekDayName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime::WeekDay _arg0; + wxDateTime::NameFlags _arg1 = (wxDateTime::NameFlags ) wxDateTime::Name_Full; + char *_kwnames[] = { "weekday","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|i:wxDateTime_GetWeekDayName",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime::GetWeekDayName(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetAmPmStrings(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxString * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "OUTPUT","OUTPUT", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_GetAmPmStrings",_kwnames,&_obj0,&_obj1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime::GetAmPmStrings(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_IsDSTApplicable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "year","country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_IsDSTApplicable",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime::IsDSTApplicable(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetBeginDST(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "year","country", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_GetBeginDST",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::GetBeginDST(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetEndDST(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "year","country", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_GetEndDST",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::GetEndDST(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_Now(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_Now",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::Now()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_Today(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_Today",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::Today()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define new_wxDateTime() (new wxDateTime()) +static PyObject *_wrap_new_wxDateTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxDateTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTime(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromTimeT(_swigarg0) (new wxDateTime(_swigarg0)) +static PyObject *_wrap_new_wxDateTimeFromTimeT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + time_t _arg0; + char *_kwnames[] = { "timet", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxDateTimeFromTimeT",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromJDN(_swigarg0) (new wxDateTime(_swigarg0)) +static PyObject *_wrap_new_wxDateTimeFromJDN(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + double _arg0; + char *_kwnames[] = { "jdn", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"d:new_wxDateTimeFromJDN",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromJDN(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromHMS(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxDateTime(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxDateTimeFromHMS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime::wxDateTime_t _arg0; + wxDateTime::wxDateTime_t _arg1 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg2 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg3 = (wxDateTime::wxDateTime_t ) 0; + char *_kwnames[] = { "hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"h|hhh:new_wxDateTimeFromHMS",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromHMS(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromDMY(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDateTime(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_new_wxDateTimeFromDMY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime::wxDateTime_t _arg0; + wxDateTime::Month _arg1 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg2 = (int ) wxDateTime::Inv_Year; + wxDateTime::wxDateTime_t _arg3 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg4 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg5 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg6 = (wxDateTime::wxDateTime_t ) 0; + char *_kwnames[] = { "day","month","year","hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"h|iihhhh:new_wxDateTimeFromDMY",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromDMY(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxDateTime(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxDateTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxDateTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDateTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxDateTime(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDateTime_SetToCurrent(_swigobj) (_swigobj->SetToCurrent()) +static PyObject *_wrap_wxDateTime_SetToCurrent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_SetToCurrent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToCurrent. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToCurrent(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetTimeT(_swigobj,_swigarg0) (_swigobj->Set(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + time_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","timet", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetTimeT",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetTimeT. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetJDN(_swigobj,_swigarg0) (_swigobj->Set(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetJDN(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + double _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","jdn", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Od:wxDateTime_SetJDN",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetJDN. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetJDN(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetHMS(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDateTime_SetHMS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::wxDateTime_t _arg2 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg3 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg4 = (wxDateTime::wxDateTime_t ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|hhh:wxDateTime_SetHMS",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetHMS. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetHMS(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxDateTime_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::Month _arg2 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg3 = (int ) wxDateTime::Inv_Year; + wxDateTime::wxDateTime_t _arg4 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg5 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg6 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg7 = (wxDateTime::wxDateTime_t ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day","month","year","hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|iihhhh:wxDateTime_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_Set. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_ResetTime(_swigobj) (_swigobj->ResetTime()) +static PyObject *_wrap_wxDateTime_ResetTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_ResetTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ResetTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_ResetTime(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetYear(_swigobj,_swigarg0) (_swigobj->SetYear(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetYear",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetYear. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetYear(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetMonth(_swigobj,_swigarg0) (_swigobj->SetMonth(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::Month _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","month", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetMonth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetMonth. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetMonth(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetDay(_swigobj,_swigarg0) (_swigobj->SetDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetHour(_swigobj,_swigarg0) (_swigobj->SetHour(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetHour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hour", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetHour",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetHour. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetHour(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetMinute(_swigobj,_swigarg0) (_swigobj->SetMinute(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetMinute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","minute", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetMinute",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetMinute. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetMinute(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetSecond(_swigobj,_swigarg0) (_swigobj->SetSecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetSecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","second", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetSecond",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetSecond. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetSecond(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetMillisecond(_swigobj,_swigarg0) (_swigobj->SetMillisecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetMillisecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","millisecond", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetMillisecond",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetMillisecond. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetMillisecond(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->SetToWeekDayInSameWeek(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToWeekDayInSameWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->GetWeekDayInSameWeek(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekDayInSameWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToNextWeekDay(_swigobj,_swigarg0) (_swigobj->SetToNextWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToNextWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToNextWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToNextWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToNextWeekDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetNextWeekDay(_swigobj,_swigarg0) (_swigobj->GetNextWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetNextWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetNextWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetNextWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetNextWeekDay(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToPrevWeekDay(_swigobj,_swigarg0) (_swigobj->SetToPrevWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToPrevWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToPrevWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToPrevWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToPrevWeekDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetPrevWeekDay(_swigobj,_swigarg0) (_swigobj->GetPrevWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetPrevWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetPrevWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetPrevWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetPrevWeekDay(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetToWeekDay(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDateTime_SetToWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + int _arg2 = (int ) 1; + wxDateTime::Month _arg3 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg4 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","n","month","year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|iii:wxDateTime_SetToWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_SetToWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetWeekDay(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDateTime_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + int _arg2 = (int ) 1; + wxDateTime::Month _arg3 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg4 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","n","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|iii:wxDateTime_GetWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToLastWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetToLastWeekDay(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDateTime_SetToLastWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + wxDateTime::Month _arg2 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg3 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","month","year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxDateTime_SetToLastWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToLastWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_SetToLastWeekDay(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetLastWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetLastWeekDay(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDateTime_GetLastWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + wxDateTime::Month _arg2 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg3 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxDateTime_GetLastWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetLastWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetLastWeekDay(_arg0,_arg1,_arg2,_arg3)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numWeek","weekday", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToTheWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numWeek","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToLastMonthDay(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToLastMonthDay(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_SetToLastMonthDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::Month _arg1 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg2 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxDateTime_SetToLastMonthDay",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToLastMonthDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToLastMonthDay(_arg0,_arg1,_arg2); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetLastMonthDay(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetLastMonthDay(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetLastMonthDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::Month _arg1 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg2 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxDateTime_GetLastMonthDay",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetLastMonthDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetLastMonthDay(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToYearDay(_swigobj,_swigarg0) (_swigobj->SetToYearDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToYearDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","yday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetToYearDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToYearDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToYearDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetYearDay(_swigobj,_swigarg0) (_swigobj->GetYearDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetYearDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","yday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_GetYearDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetYearDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetYearDay(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_GetJulianDayNumber(_swigobj) (_swigobj->GetJulianDayNumber()) +static PyObject *_wrap_wxDateTime_GetJulianDayNumber(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetJulianDayNumber",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetJulianDayNumber. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetJulianDayNumber(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetJDN(_swigobj) (_swigobj->GetJDN()) +static PyObject *_wrap_wxDateTime_GetJDN(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetJDN",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetJDN. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetJDN(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetModifiedJulianDayNumber(_swigobj) (_swigobj->GetModifiedJulianDayNumber()) +static PyObject *_wrap_wxDateTime_GetModifiedJulianDayNumber(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetModifiedJulianDayNumber",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetModifiedJulianDayNumber. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetModifiedJulianDayNumber(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetMJD(_swigobj) (_swigobj->GetMJD()) +static PyObject *_wrap_wxDateTime_GetMJD(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetMJD",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMJD. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetMJD(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetRataDie(_swigobj) (_swigobj->GetRataDie()) +static PyObject *_wrap_wxDateTime_GetRataDie(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetRataDie",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetRataDie. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetRataDie(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_ToTimezone(_swigobj,_swigarg0,_swigarg1) (_swigobj->ToTimezone(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_ToTimezone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","tz","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxDateTime_ToTimezone",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ToTimezone. Expected _wxDateTime_p."); + return NULL; + } + } +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_ToTimezone(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_MakeTimezone(_swigobj,_swigarg0,_swigarg1) (_swigobj->MakeTimezone(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_MakeTimezone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","tz","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxDateTime_MakeTimezone",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_MakeTimezone. Expected _wxDateTime_p."); + return NULL; + } + } +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_MakeTimezone(_arg0,*_arg1,_arg2); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_ToGMT(_swigobj,_swigarg0) (_swigobj->ToGMT(_swigarg0)) +static PyObject *_wrap_wxDateTime_ToGMT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_ToGMT",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ToGMT. Expected _wxDateTime_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_ToGMT(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_MakeGMT(_swigobj,_swigarg0) (_swigobj->MakeGMT(_swigarg0)) +static PyObject *_wrap_wxDateTime_MakeGMT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_MakeGMT",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_MakeGMT. Expected _wxDateTime_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_MakeGMT(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_IsDST(_swigobj,_swigarg0) (_swigobj->IsDST(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsDST(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime * _arg0; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_IsDST",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsDST. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime_IsDST(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsValid(_swigobj) (_swigobj->IsValid()) +static PyObject *_wrap_wxDateTime_IsValid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_IsValid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsValid. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsValid(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetTicks(_swigobj) (_swigobj->GetTicks()) +static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + time_t _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetTicks",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetTicks. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (time_t )wxDateTime_GetTicks(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetYear(_swigobj,_swigarg0) (_swigobj->GetYear(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetYear",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetYear. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime_GetYear(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetMonth(_swigobj,_swigarg0) (_swigobj->GetMonth(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Month _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetMonth",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMonth. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::Month )wxDateTime_GetMonth(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetDay(_swigobj,_swigarg0) (_swigobj->GetDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetDay",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetDay. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDay(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetHour(_swigobj,_swigarg0) (_swigobj->GetHour(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetHour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetHour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetHour. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetHour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetMinute(_swigobj,_swigarg0) (_swigobj->GetMinute(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetMinute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetMinute",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMinute. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMinute(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetSecond(_swigobj,_swigarg0) (_swigobj->GetSecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetSecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetSecond",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetSecond. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetSecond(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetMillisecond(_swigobj,_swigarg0) (_swigobj->GetMillisecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetMillisecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetMillisecond",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMillisecond. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMillisecond(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetDayOfYear(_swigobj,_swigarg0) (_swigobj->GetDayOfYear(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetDayOfYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetDayOfYear",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetDayOfYear. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDayOfYear(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetWeekOfYear(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeekOfYear(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetWeekOfYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::WeekFlags _arg1 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; + wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","flags","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxDateTime_GetWeekOfYear",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekOfYear. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfYear(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg2) delete _arg2; +} + return _resultobj; +} + +#define wxDateTime_GetWeekOfMonth(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeekOfMonth(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetWeekOfMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::WeekFlags _arg1 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; + wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","flags","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxDateTime_GetWeekOfMonth",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekOfMonth. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfMonth(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg2) delete _arg2; +} + return _resultobj; +} + +#define wxDateTime_IsWorkDay(_swigobj,_swigarg0) (_swigobj->IsWorkDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsWorkDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_IsWorkDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsWorkDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsWorkDay(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsEqualTo(_swigobj,_swigarg0) (_swigobj->IsEqualTo(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsEqualTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsEqualTo",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsEqualTo. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualTo. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsEqualTo(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsEarlierThan(_swigobj,_swigarg0) (_swigobj->IsEarlierThan(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsEarlierThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsEarlierThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsEarlierThan. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEarlierThan. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsEarlierThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsLaterThan(_swigobj,_swigarg0) (_swigobj->IsLaterThan(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsLaterThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsLaterThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsLaterThan. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsLaterThan. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsLaterThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsStrictlyBetween(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsStrictlyBetween(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_IsStrictlyBetween(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + wxDateTime * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","t1","t2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDateTime_IsStrictlyBetween",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsStrictlyBetween(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsBetween(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsBetween(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_IsBetween(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + wxDateTime * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","t1","t2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDateTime_IsBetween",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsBetween. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsBetween(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsSameDate(_swigobj,_swigarg0) (_swigobj->IsSameDate(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsSameDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsSameDate",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsSameDate. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsSameDate(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsSameTime(_swigobj,_swigarg0) (_swigobj->IsSameTime(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsSameTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsSameTime",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsSameTime. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsSameTime(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsEqualUpTo(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEqualUpTo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_IsEqualUpTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + wxTimeSpan * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","dt","ts", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDateTime_IsEqualUpTo",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsEqualUpTo. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualUpTo. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsEqualUpTo. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsEqualUpTo(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_AddTS(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxDateTime_AddTS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_AddTS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_AddTS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddTS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_AddTS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_AddDS(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxDateTime_AddDS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_AddDS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_AddDS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddDS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_AddDS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SubtractTS(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateTime_SubtractTS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_SubtractTS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SubtractTS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractTS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SubtractTS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SubtractDS(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateTime_SubtractDS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_SubtractDS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SubtractDS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractDS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SubtractDS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_Subtract(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateTime_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_Subtract",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_Subtract. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_Subtract. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxDateTime_Subtract(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___add__TS(wxDateTime *self,const wxTimeSpan & other) { return *self + other; } +static PyObject *_wrap_wxDateTime___add__TS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___add__TS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___add__TS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__TS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___add__TS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___add__DS(wxDateTime *self,const wxDateSpan & other) { return *self + other; } +static PyObject *_wrap_wxDateTime___add__DS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___add__DS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___add__DS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__DS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___add__DS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxDateTime___sub__DT(wxDateTime *self,const wxDateTime & other) { return *self - other; } +static PyObject *_wrap_wxDateTime___sub__DT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___sub__DT",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___sub__DT. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DT. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxDateTime___sub__DT(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___sub__TS(wxDateTime *self,const wxTimeSpan & other) { return *self - other; } +static PyObject *_wrap_wxDateTime___sub__TS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___sub__TS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___sub__TS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__TS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___sub__TS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___sub__DS(wxDateTime *self,const wxDateSpan & other) { return *self - other; } +static PyObject *_wrap_wxDateTime___sub__DS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___sub__DS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___sub__DS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___sub__DS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxDateTime___cmp__(wxDateTime *self,const wxDateTime & other) { + if (*self < other) return -1; + if (*self == other) return 0; + return 1; + } +static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___cmp__. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___cmp__. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime___cmp__(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_ParseRfc822Date(_swigobj,_swigarg0) (_swigobj->ParseRfc822Date(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseRfc822Date",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseRfc822Date. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseRfc822Date(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseFormat(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ParseFormat(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + char * _arg2 = (char *) "%c"; + wxDateTime * _arg3 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","date","format","dateDef", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|sO:wxDateTime_ParseFormat",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseFormat. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDateTime_ParseFormat. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseFormat(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseDateTime(_swigobj,_swigarg0) (_swigobj->ParseDateTime(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseDateTime",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseDateTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseDateTime(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseDate(_swigobj,_swigarg0) (_swigobj->ParseDate(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseDate",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseDate(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseTime(_swigobj,_swigarg0) (_swigobj->ParseTime(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","time", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseTime",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseTime(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_Format(_swigobj,_swigarg0,_swigarg1) (_swigobj->Format(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_Format(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + char * _arg1 = (char *) "%c"; + wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","format","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|sO:wxDateTime_Format",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_Format. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_Format(_arg0,_arg1,*_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_arg2) delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatDate(_swigobj) (_swigobj->FormatDate()) +static PyObject *_wrap_wxDateTime_FormatDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatDate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatDate(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatTime(_swigobj) (_swigobj->FormatTime()) +static PyObject *_wrap_wxDateTime_FormatTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatISODate(_swigobj) (_swigobj->FormatISODate()) +static PyObject *_wrap_wxDateTime_FormatISODate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatISODate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatISODate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatISODate(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatISOTime(_swigobj) (_swigobj->FormatISOTime()) +static PyObject *_wrap_wxDateTime_FormatISOTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatISOTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatISOTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatISOTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Seconds(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "sec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Seconds",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Seconds(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Second(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Second",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Second()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Minutes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "min", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Minutes",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Minutes(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Minute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Minute",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Minute()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Hours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "hours", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Hours",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Hours(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Hour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Hour",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Hour()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Days(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Days",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Days(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Day(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Day",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Day()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Weeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Weeks",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Weeks(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Week(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Week",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Week()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define new_wxTimeSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxTimeSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxTimeSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0 = (long ) 0; + long _arg1 = (long ) 0; + long _arg2 = (long ) 0; + long _arg3 = (long ) 0; + char *_kwnames[] = { "hours","minutes","seconds","milliseconds", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxTimeSpan",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTimeSpan *)new_wxTimeSpan(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxTimeSpan(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxTimeSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxTimeSpan",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxTimeSpan. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxTimeSpan(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTimeSpan_Add(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Add(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_Add",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Add. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Add. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Add(_arg0,*_arg1); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Subtract(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_Subtract",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Subtract. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Subtract. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Subtract(_arg0,*_arg1); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Multiply(_swigobj,_swigarg0) (_swigobj->Multiply(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Multiply(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTimeSpan_Multiply",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Multiply. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Multiply(_arg0,_arg1); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Neg(_swigobj) (_swigobj->Neg()) +static PyObject *_wrap_wxTimeSpan_Neg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_Neg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Neg. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Neg(_arg0); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Abs(_swigobj) (_swigobj->Abs()) +static PyObject *_wrap_wxTimeSpan_Abs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_Abs",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Abs. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan_Abs(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___add__(wxTimeSpan *self,const wxTimeSpan & other) { return *self + other; } +static PyObject *_wrap_wxTimeSpan___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan___add__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___add__. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___add__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___add__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___sub__(wxTimeSpan *self,const wxTimeSpan & other) { return *self - other; } +static PyObject *_wrap_wxTimeSpan___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan___sub__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___sub__. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___sub__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___sub__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___mul__(wxTimeSpan *self,int n) { return *self * n; } +static PyObject *_wrap_wxTimeSpan___mul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTimeSpan___mul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___mul__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___mul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___rmul__(wxTimeSpan *self,int n) { return n * *self; } +static PyObject *_wrap_wxTimeSpan___rmul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTimeSpan___rmul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___rmul__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___rmul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___neg__(wxTimeSpan *self) { return self->Negate(); } +static PyObject *_wrap_wxTimeSpan___neg__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan___neg__",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___neg__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___neg__(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxTimeSpan___cmp__(wxTimeSpan *self,const wxTimeSpan & other) { + if (*self < other) return -1; + if (*self == other) return 0; + return 1; + } +static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___cmp__. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___cmp__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan___cmp__(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsNull(_swigobj) (_swigobj->IsNull()) +static PyObject *_wrap_wxTimeSpan_IsNull(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_IsNull",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsNull. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsNull(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsPositive(_swigobj) (_swigobj->IsPositive()) +static PyObject *_wrap_wxTimeSpan_IsPositive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_IsPositive",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsPositive. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsPositive(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsNegative(_swigobj) (_swigobj->IsNegative()) +static PyObject *_wrap_wxTimeSpan_IsNegative(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_IsNegative",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsNegative. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsNegative(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsEqualTo(_swigobj,_swigarg0) (_swigobj->IsEqualTo(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_IsEqualTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","ts", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_IsEqualTo",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsEqualTo. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsEqualTo. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsEqualTo(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsLongerThan(_swigobj,_swigarg0) (_swigobj->IsLongerThan(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_IsLongerThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","ts", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_IsLongerThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsLongerThan. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsLongerThan. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsLongerThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsShorterThan(_swigobj,_swigarg0) (_swigobj->IsShorterThan(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_IsShorterThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","t", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_IsShorterThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsShorterThan. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsShorterThan. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsShorterThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetWeeks(_swigobj) (_swigobj->GetWeeks()) +static PyObject *_wrap_wxTimeSpan_GetWeeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetWeeks",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetWeeks. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetWeeks(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetDays(_swigobj) (_swigobj->GetDays()) +static PyObject *_wrap_wxTimeSpan_GetDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetDays",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetDays. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetDays(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetHours(_swigobj) (_swigobj->GetHours()) +static PyObject *_wrap_wxTimeSpan_GetHours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetHours",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetHours. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetHours(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetMinutes(_swigobj) (_swigobj->GetMinutes()) +static PyObject *_wrap_wxTimeSpan_GetMinutes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetMinutes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetMinutes. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetMinutes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetSeconds(_swigobj) (_swigobj->GetSeconds()) +static PyObject *_wrap_wxTimeSpan_GetSeconds(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLongLong * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetSeconds",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetSeconds. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxLongLong (wxTimeSpan_GetSeconds(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + PyObject *hi, *lo, *shifter, *shifted; + hi = PyLong_FromLong(_result->GetHi()); + lo = PyLong_FromLong(_result->GetLo()); + shifter = PyLong_FromLong(32); + shifted = PyNumber_Lshift(hi, shifter); + _resultobj = PyNumber_Or(shifted, lo); + Py_DECREF(hi); + Py_DECREF(lo); + Py_DECREF(shifter); + Py_DECREF(shifted); +} + return _resultobj; +} + +#define wxTimeSpan_GetMilliseconds(_swigobj) (_swigobj->GetMilliseconds()) +static PyObject *_wrap_wxTimeSpan_GetMilliseconds(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLongLong * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetMilliseconds",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetMilliseconds. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxLongLong (wxTimeSpan_GetMilliseconds(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + PyObject *hi, *lo, *shifter, *shifted; + hi = PyLong_FromLong(_result->GetHi()); + lo = PyLong_FromLong(_result->GetLo()); + shifter = PyLong_FromLong(32); + shifted = PyNumber_Lshift(hi, shifter); + _resultobj = PyNumber_Or(shifted, lo); + Py_DECREF(hi); + Py_DECREF(lo); + Py_DECREF(shifter); + Py_DECREF(shifted); +} + return _resultobj; +} + +#define wxTimeSpan_Format(_swigobj,_swigarg0) (_swigobj->Format(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Format(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTimeSpan * _arg0; + char * _arg1 = (char *) "%c"; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","format", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|s:wxTimeSpan_Format",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Format. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxTimeSpan_Format(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define new_wxDateSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxDateSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxDateSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + int _arg3 = (int ) 0; + char *_kwnames[] = { "years","months","weeks","days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxDateSpan",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateSpan *)new_wxDateSpan(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxDateSpan(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxDateSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxDateSpan",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDateSpan. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxDateSpan(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Days(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Days",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Days(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Day(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Day",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Day()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Weeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "weeks", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Weeks",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Weeks(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Week(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Week",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Week()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Months(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "mon", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Months",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Months(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Month(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Month",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Month()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Years(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "years", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Years",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Years(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Year(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Year",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Year()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateSpan_SetYears(_swigobj,_swigarg0) (_swigobj->SetYears(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetYears(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetYears",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetYears. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetYears(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_SetMonths(_swigobj,_swigarg0) (_swigobj->SetMonths(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetMonths(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetMonths",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetMonths. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetMonths(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_SetWeeks(_swigobj,_swigarg0) (_swigobj->SetWeeks(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetWeeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetWeeks",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetWeeks. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetWeeks(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_SetDays(_swigobj,_swigarg0) (_swigobj->SetDays(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetDays",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetDays. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetDays(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_GetYears(_swigobj) (_swigobj->GetYears()) +static PyObject *_wrap_wxDateSpan_GetYears(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetYears",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetYears. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetYears(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetMonths(_swigobj) (_swigobj->GetMonths()) +static PyObject *_wrap_wxDateSpan_GetMonths(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetMonths",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetMonths. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetMonths(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetWeeks(_swigobj) (_swigobj->GetWeeks()) +static PyObject *_wrap_wxDateSpan_GetWeeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetWeeks",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetWeeks. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetWeeks(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetDays(_swigobj) (_swigobj->GetDays()) +static PyObject *_wrap_wxDateSpan_GetDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetDays",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetDays. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetDays(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetTotalDays(_swigobj) (_swigobj->GetTotalDays()) +static PyObject *_wrap_wxDateSpan_GetTotalDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetTotalDays",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetTotalDays. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetTotalDays(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_Add(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxDateSpan_Add(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan_Add",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Add. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Add. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Add(_arg0,*_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_Subtract(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateSpan_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan_Subtract",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Subtract. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Subtract. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Subtract(_arg0,*_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_Neg(_swigobj) (_swigobj->Neg()) +static PyObject *_wrap_wxDateSpan_Neg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_Neg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Neg. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Neg(_arg0); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_Multiply(_swigobj,_swigarg0) (_swigobj->Multiply(_swigarg0)) +static PyObject *_wrap_wxDateSpan_Multiply(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","factor", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_Multiply",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Multiply. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Multiply(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static wxDateSpan wxDateSpan___add__(wxDateSpan *self,const wxDateSpan & other) { return *self + other; } +static PyObject *_wrap_wxDateSpan___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan___add__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___add__. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___add__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___add__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___sub__(wxDateSpan *self,const wxDateSpan & other) { return *self - other; } +static PyObject *_wrap_wxDateSpan___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan___sub__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___sub__. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___sub__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___sub__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___mul__(wxDateSpan *self,int n) { return *self * n; } +static PyObject *_wrap_wxDateSpan___mul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan___mul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___mul__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___mul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___rmul__(wxDateSpan *self,int n) { return n * *self; } +static PyObject *_wrap_wxDateSpan___rmul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan___rmul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___rmul__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___rmul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___neg__(wxDateSpan *self) { return self->Negate(); } +static PyObject *_wrap_wxDateSpan___neg__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan___neg__",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___neg__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___neg__(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyMethodDef utilscMethods[] = { + { "wxDateSpan___neg__", (PyCFunction) _wrap_wxDateSpan___neg__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___rmul__", (PyCFunction) _wrap_wxDateSpan___rmul__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___mul__", (PyCFunction) _wrap_wxDateSpan___mul__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___sub__", (PyCFunction) _wrap_wxDateSpan___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___add__", (PyCFunction) _wrap_wxDateSpan___add__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Multiply", (PyCFunction) _wrap_wxDateSpan_Multiply, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Neg", (PyCFunction) _wrap_wxDateSpan_Neg, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Subtract", (PyCFunction) _wrap_wxDateSpan_Subtract, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Add", (PyCFunction) _wrap_wxDateSpan_Add, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetTotalDays", (PyCFunction) _wrap_wxDateSpan_GetTotalDays, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetDays", (PyCFunction) _wrap_wxDateSpan_GetDays, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetWeeks", (PyCFunction) _wrap_wxDateSpan_GetWeeks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetMonths", (PyCFunction) _wrap_wxDateSpan_GetMonths, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetYears", (PyCFunction) _wrap_wxDateSpan_GetYears, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetDays", (PyCFunction) _wrap_wxDateSpan_SetDays, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetWeeks", (PyCFunction) _wrap_wxDateSpan_SetWeeks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetMonths", (PyCFunction) _wrap_wxDateSpan_SetMonths, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetYears", (PyCFunction) _wrap_wxDateSpan_SetYears, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Year", (PyCFunction) _wrap_wxDateSpan_Year, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Years", (PyCFunction) _wrap_wxDateSpan_Years, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Month", (PyCFunction) _wrap_wxDateSpan_Month, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Months", (PyCFunction) _wrap_wxDateSpan_Months, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Week", (PyCFunction) _wrap_wxDateSpan_Week, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Weeks", (PyCFunction) _wrap_wxDateSpan_Weeks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Day", (PyCFunction) _wrap_wxDateSpan_Day, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Days", (PyCFunction) _wrap_wxDateSpan_Days, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxDateSpan", (PyCFunction) _wrap_delete_wxDateSpan, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateSpan", (PyCFunction) _wrap_new_wxDateSpan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Format", (PyCFunction) _wrap_wxTimeSpan_Format, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetMilliseconds", (PyCFunction) _wrap_wxTimeSpan_GetMilliseconds, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetSeconds", (PyCFunction) _wrap_wxTimeSpan_GetSeconds, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetMinutes", (PyCFunction) _wrap_wxTimeSpan_GetMinutes, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetHours", (PyCFunction) _wrap_wxTimeSpan_GetHours, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetDays", (PyCFunction) _wrap_wxTimeSpan_GetDays, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetWeeks", (PyCFunction) _wrap_wxTimeSpan_GetWeeks, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsShorterThan", (PyCFunction) _wrap_wxTimeSpan_IsShorterThan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsLongerThan", (PyCFunction) _wrap_wxTimeSpan_IsLongerThan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsEqualTo", (PyCFunction) _wrap_wxTimeSpan_IsEqualTo, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsNegative", (PyCFunction) _wrap_wxTimeSpan_IsNegative, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsPositive", (PyCFunction) _wrap_wxTimeSpan_IsPositive, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsNull", (PyCFunction) _wrap_wxTimeSpan_IsNull, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___cmp__", (PyCFunction) _wrap_wxTimeSpan___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___neg__", (PyCFunction) _wrap_wxTimeSpan___neg__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___rmul__", (PyCFunction) _wrap_wxTimeSpan___rmul__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___mul__", (PyCFunction) _wrap_wxTimeSpan___mul__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___sub__", (PyCFunction) _wrap_wxTimeSpan___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___add__", (PyCFunction) _wrap_wxTimeSpan___add__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Abs", (PyCFunction) _wrap_wxTimeSpan_Abs, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Neg", (PyCFunction) _wrap_wxTimeSpan_Neg, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Multiply", (PyCFunction) _wrap_wxTimeSpan_Multiply, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Subtract", (PyCFunction) _wrap_wxTimeSpan_Subtract, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Add", (PyCFunction) _wrap_wxTimeSpan_Add, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxTimeSpan", (PyCFunction) _wrap_delete_wxTimeSpan, METH_VARARGS | METH_KEYWORDS }, + { "new_wxTimeSpan", (PyCFunction) _wrap_new_wxTimeSpan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Week", (PyCFunction) _wrap_wxTimeSpan_Week, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Weeks", (PyCFunction) _wrap_wxTimeSpan_Weeks, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Day", (PyCFunction) _wrap_wxTimeSpan_Day, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Days", (PyCFunction) _wrap_wxTimeSpan_Days, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Hour", (PyCFunction) _wrap_wxTimeSpan_Hour, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Hours", (PyCFunction) _wrap_wxTimeSpan_Hours, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Minute", (PyCFunction) _wrap_wxTimeSpan_Minute, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Minutes", (PyCFunction) _wrap_wxTimeSpan_Minutes, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Second", (PyCFunction) _wrap_wxTimeSpan_Second, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Seconds", (PyCFunction) _wrap_wxTimeSpan_Seconds, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatISOTime", (PyCFunction) _wrap_wxDateTime_FormatISOTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatISODate", (PyCFunction) _wrap_wxDateTime_FormatISODate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatTime", (PyCFunction) _wrap_wxDateTime_FormatTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatDate", (PyCFunction) _wrap_wxDateTime_FormatDate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Format", (PyCFunction) _wrap_wxDateTime_Format, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseTime", (PyCFunction) _wrap_wxDateTime_ParseTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseDate", (PyCFunction) _wrap_wxDateTime_ParseDate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseDateTime", (PyCFunction) _wrap_wxDateTime_ParseDateTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseFormat", (PyCFunction) _wrap_wxDateTime_ParseFormat, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseRfc822Date", (PyCFunction) _wrap_wxDateTime_ParseRfc822Date, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___cmp__", (PyCFunction) _wrap_wxDateTime___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___sub__DS", (PyCFunction) _wrap_wxDateTime___sub__DS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___sub__TS", (PyCFunction) _wrap_wxDateTime___sub__TS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___sub__DT", (PyCFunction) _wrap_wxDateTime___sub__DT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___add__DS", (PyCFunction) _wrap_wxDateTime___add__DS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___add__TS", (PyCFunction) _wrap_wxDateTime___add__TS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Subtract", (PyCFunction) _wrap_wxDateTime_Subtract, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SubtractDS", (PyCFunction) _wrap_wxDateTime_SubtractDS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SubtractTS", (PyCFunction) _wrap_wxDateTime_SubtractTS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_AddDS", (PyCFunction) _wrap_wxDateTime_AddDS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_AddTS", (PyCFunction) _wrap_wxDateTime_AddTS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsEqualUpTo", (PyCFunction) _wrap_wxDateTime_IsEqualUpTo, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsSameTime", (PyCFunction) _wrap_wxDateTime_IsSameTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsSameDate", (PyCFunction) _wrap_wxDateTime_IsSameDate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsBetween", (PyCFunction) _wrap_wxDateTime_IsBetween, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsStrictlyBetween", (PyCFunction) _wrap_wxDateTime_IsStrictlyBetween, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsLaterThan", (PyCFunction) _wrap_wxDateTime_IsLaterThan, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsEarlierThan", (PyCFunction) _wrap_wxDateTime_IsEarlierThan, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsEqualTo", (PyCFunction) _wrap_wxDateTime_IsEqualTo, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsWorkDay", (PyCFunction) _wrap_wxDateTime_IsWorkDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekOfMonth", (PyCFunction) _wrap_wxDateTime_GetWeekOfMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekOfYear", (PyCFunction) _wrap_wxDateTime_GetWeekOfYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetDayOfYear", (PyCFunction) _wrap_wxDateTime_GetDayOfYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMillisecond", (PyCFunction) _wrap_wxDateTime_GetMillisecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetSecond", (PyCFunction) _wrap_wxDateTime_GetSecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMinute", (PyCFunction) _wrap_wxDateTime_GetMinute, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetHour", (PyCFunction) _wrap_wxDateTime_GetHour, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetDay", (PyCFunction) _wrap_wxDateTime_GetDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMonth", (PyCFunction) _wrap_wxDateTime_GetMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetYear", (PyCFunction) _wrap_wxDateTime_GetYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetTicks", (PyCFunction) _wrap_wxDateTime_GetTicks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsValid", (PyCFunction) _wrap_wxDateTime_IsValid, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsDST", (PyCFunction) _wrap_wxDateTime_IsDST, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_MakeGMT", (PyCFunction) _wrap_wxDateTime_MakeGMT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ToGMT", (PyCFunction) _wrap_wxDateTime_ToGMT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_MakeTimezone", (PyCFunction) _wrap_wxDateTime_MakeTimezone, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ToTimezone", (PyCFunction) _wrap_wxDateTime_ToTimezone, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetRataDie", (PyCFunction) _wrap_wxDateTime_GetRataDie, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMJD", (PyCFunction) _wrap_wxDateTime_GetMJD, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetModifiedJulianDayNumber", (PyCFunction) _wrap_wxDateTime_GetModifiedJulianDayNumber, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetJDN", (PyCFunction) _wrap_wxDateTime_GetJDN, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetJulianDayNumber", (PyCFunction) _wrap_wxDateTime_GetJulianDayNumber, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetYearDay", (PyCFunction) _wrap_wxDateTime_GetYearDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToYearDay", (PyCFunction) _wrap_wxDateTime_SetToYearDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetLastMonthDay", (PyCFunction) _wrap_wxDateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToLastMonthDay", (PyCFunction) _wrap_wxDateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeek", (PyCFunction) _wrap_wxDateTime_GetWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToTheWeek", (PyCFunction) _wrap_wxDateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetLastWeekDay", (PyCFunction) _wrap_wxDateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToLastWeekDay", (PyCFunction) _wrap_wxDateTime_SetToLastWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekDay", (PyCFunction) _wrap_wxDateTime_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToWeekDay", (PyCFunction) _wrap_wxDateTime_SetToWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetPrevWeekDay", (PyCFunction) _wrap_wxDateTime_GetPrevWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToPrevWeekDay", (PyCFunction) _wrap_wxDateTime_SetToPrevWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetNextWeekDay", (PyCFunction) _wrap_wxDateTime_GetNextWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToNextWeekDay", (PyCFunction) _wrap_wxDateTime_SetToNextWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekDayInSameWeek", (PyCFunction) _wrap_wxDateTime_GetWeekDayInSameWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToWeekDayInSameWeek", (PyCFunction) _wrap_wxDateTime_SetToWeekDayInSameWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetMillisecond", (PyCFunction) _wrap_wxDateTime_SetMillisecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetSecond", (PyCFunction) _wrap_wxDateTime_SetSecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetMinute", (PyCFunction) _wrap_wxDateTime_SetMinute, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetHour", (PyCFunction) _wrap_wxDateTime_SetHour, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetDay", (PyCFunction) _wrap_wxDateTime_SetDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetMonth", (PyCFunction) _wrap_wxDateTime_SetMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetYear", (PyCFunction) _wrap_wxDateTime_SetYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ResetTime", (PyCFunction) _wrap_wxDateTime_ResetTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Set", (PyCFunction) _wrap_wxDateTime_Set, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetHMS", (PyCFunction) _wrap_wxDateTime_SetHMS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetJDN", (PyCFunction) _wrap_wxDateTime_SetJDN, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetTimeT", (PyCFunction) _wrap_wxDateTime_SetTimeT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToCurrent", (PyCFunction) _wrap_wxDateTime_SetToCurrent, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxDateTime", (PyCFunction) _wrap_delete_wxDateTime, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromDMY", (PyCFunction) _wrap_new_wxDateTimeFromDMY, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromHMS", (PyCFunction) _wrap_new_wxDateTimeFromHMS, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromJDN", (PyCFunction) _wrap_new_wxDateTimeFromJDN, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromTimeT", (PyCFunction) _wrap_new_wxDateTimeFromTimeT, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTime", (PyCFunction) _wrap_new_wxDateTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Today", (PyCFunction) _wrap_wxDateTime_Today, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Now", (PyCFunction) _wrap_wxDateTime_Now, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetEndDST", (PyCFunction) _wrap_wxDateTime_GetEndDST, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetBeginDST", (PyCFunction) _wrap_wxDateTime_GetBeginDST, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsDSTApplicable", (PyCFunction) _wrap_wxDateTime_IsDSTApplicable, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetAmPmStrings", (PyCFunction) _wrap_wxDateTime_GetAmPmStrings, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekDayName", (PyCFunction) _wrap_wxDateTime_GetWeekDayName, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMonthName", (PyCFunction) _wrap_wxDateTime_GetMonthName, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetNumberOfDaysInMonth", (PyCFunction) _wrap_wxDateTime_GetNumberOfDaysInMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetNumberOfDaysinYear", (PyCFunction) _wrap_wxDateTime_GetNumberOfDaysinYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCentury", (PyCFunction) _wrap_wxDateTime_GetCentury, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsLeapYear", (PyCFunction) _wrap_wxDateTime_IsLeapYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCurrentMonth", (PyCFunction) _wrap_wxDateTime_GetCurrentMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ConvertYearToBC", (PyCFunction) _wrap_wxDateTime_ConvertYearToBC, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCurrentYear", (PyCFunction) _wrap_wxDateTime_GetCurrentYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsWestEuropeanCountry", (PyCFunction) _wrap_wxDateTime_IsWestEuropeanCountry, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCountry", (PyCFunction) _wrap_wxDateTime_GetCountry, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetCountry", (PyCFunction) _wrap_wxDateTime_SetCountry, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFileConfig", (PyCFunction) _wrap_delete_wxFileConfig, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileConfig", (PyCFunction) _wrap_new_wxFileConfig, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxConfig", (PyCFunction) _wrap_delete_wxConfig, METH_VARARGS | METH_KEYWORDS }, + { "new_wxConfig", (PyCFunction) _wrap_new_wxConfig, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_ExpandEnvVars", (PyCFunction) _wrap_wxConfigBase_ExpandEnvVars, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_RenameGroup", (PyCFunction) _wrap_wxConfigBase_RenameGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_RenameEntry", (PyCFunction) _wrap_wxConfigBase_RenameEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetEntryType", (PyCFunction) _wrap_wxConfigBase_GetEntryType, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_WriteFloat", (PyCFunction) _wrap_wxConfigBase_WriteFloat, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_WriteInt", (PyCFunction) _wrap_wxConfigBase_WriteInt, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Write", (PyCFunction) _wrap_wxConfigBase_Write, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetStyle", (PyCFunction) _wrap_wxConfigBase_GetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetStyle", (PyCFunction) _wrap_wxConfigBase_SetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetVendorName", (PyCFunction) _wrap_wxConfigBase_SetVendorName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetAppName", (PyCFunction) _wrap_wxConfigBase_SetAppName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetRecordDefaults", (PyCFunction) _wrap_wxConfigBase_SetRecordDefaults, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetPath", (PyCFunction) _wrap_wxConfigBase_SetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetExpandEnvVars", (PyCFunction) _wrap_wxConfigBase_SetExpandEnvVars, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_ReadFloat", (PyCFunction) _wrap_wxConfigBase_ReadFloat, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_ReadInt", (PyCFunction) _wrap_wxConfigBase_ReadInt, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Read", (PyCFunction) _wrap_wxConfigBase_Read, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_IsRecordingDefaults", (PyCFunction) _wrap_wxConfigBase_IsRecordingDefaults, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_IsExpandingEnvVars", (PyCFunction) _wrap_wxConfigBase_IsExpandingEnvVars, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_HasGroup", (PyCFunction) _wrap_wxConfigBase_HasGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_HasEntry", (PyCFunction) _wrap_wxConfigBase_HasEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetVendorName", (PyCFunction) _wrap_wxConfigBase_GetVendorName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetPath", (PyCFunction) _wrap_wxConfigBase_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNumberOfGroups", (PyCFunction) _wrap_wxConfigBase_GetNumberOfGroups, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNumberOfEntries", (PyCFunction) _wrap_wxConfigBase_GetNumberOfEntries, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNextEntry", (PyCFunction) _wrap_wxConfigBase_GetNextEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNextGroup", (PyCFunction) _wrap_wxConfigBase_GetNextGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetFirstEntry", (PyCFunction) _wrap_wxConfigBase_GetFirstEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetFirstGroup", (PyCFunction) _wrap_wxConfigBase_GetFirstGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetAppName", (PyCFunction) _wrap_wxConfigBase_GetAppName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Flush", (PyCFunction) _wrap_wxConfigBase_Flush, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Exists", (PyCFunction) _wrap_wxConfigBase_Exists, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DeleteGroup", (PyCFunction) _wrap_wxConfigBase_DeleteGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DeleteEntry", (PyCFunction) _wrap_wxConfigBase_DeleteEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DeleteAll", (PyCFunction) _wrap_wxConfigBase_DeleteAll, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DontCreateOnDemand", (PyCFunction) _wrap_wxConfigBase_DontCreateOnDemand, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Create", (PyCFunction) _wrap_wxConfigBase_Create, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Get", (PyCFunction) _wrap_wxConfigBase_Get, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Set", (PyCFunction) _wrap_wxConfigBase_Set, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxConfigBase", (PyCFunction) _wrap_delete_wxConfigBase, METH_VARARGS | METH_KEYWORDS }, + { "wxGetLocalTimeMillis", (PyCFunction) _wrap_wxGetLocalTimeMillis, METH_VARARGS | METH_KEYWORDS }, + { "wxGetCurrentTime", (PyCFunction) _wrap_wxGetCurrentTime, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUTCTime", (PyCFunction) _wrap_wxGetUTCTime, METH_VARARGS | METH_KEYWORDS }, + { "wxGetLocalTime", (PyCFunction) _wrap_wxGetLocalTime, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_wxConfigBase","_class_wxConfig",SwigwxConfigTowxConfigBase}, + { "_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_class_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_class_wxConfigBase","_class_wxConfig",SwigwxConfigTowxConfigBase}, + { "_class_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initutilsc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("utilsc", utilscMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxCONFIG_USE_LOCAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_LOCAL_FILE)); + PyDict_SetItemString(d,"wxCONFIG_USE_GLOBAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_GLOBAL_FILE)); + PyDict_SetItemString(d,"wxCONFIG_USE_RELATIVE_PATH", PyInt_FromLong((long) wxCONFIG_USE_RELATIVE_PATH)); + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + PyDict_SetItemString(d,"wxConfigBase_Type_Unknown", PyInt_FromLong((long) wxConfigBase::Type_Unknown)); + PyDict_SetItemString(d,"wxConfigBase_Type_String", PyInt_FromLong((long) wxConfigBase::Type_String)); + PyDict_SetItemString(d,"wxConfigBase_Type_Boolean", PyInt_FromLong((long) wxConfigBase::Type_Boolean)); + PyDict_SetItemString(d,"wxConfigBase_Type_Integer", PyInt_FromLong((long) wxConfigBase::Type_Integer)); + PyDict_SetItemString(d,"wxConfigBase_Type_Float", PyInt_FromLong((long) wxConfigBase::Type_Float)); + PyDict_SetItemString(d,"wxDateTime_Local", PyInt_FromLong((long) wxDateTime::Local)); + PyDict_SetItemString(d,"wxDateTime_GMT_12", PyInt_FromLong((long) wxDateTime::GMT_12)); + PyDict_SetItemString(d,"wxDateTime_GMT_11", PyInt_FromLong((long) wxDateTime::GMT_11)); + PyDict_SetItemString(d,"wxDateTime_GMT_10", PyInt_FromLong((long) wxDateTime::GMT_10)); + PyDict_SetItemString(d,"wxDateTime_GMT_9", PyInt_FromLong((long) wxDateTime::GMT_9)); + PyDict_SetItemString(d,"wxDateTime_GMT_8", PyInt_FromLong((long) wxDateTime::GMT_8)); + PyDict_SetItemString(d,"wxDateTime_GMT_7", PyInt_FromLong((long) wxDateTime::GMT_7)); + PyDict_SetItemString(d,"wxDateTime_GMT_6", PyInt_FromLong((long) wxDateTime::GMT_6)); + PyDict_SetItemString(d,"wxDateTime_GMT_5", PyInt_FromLong((long) wxDateTime::GMT_5)); + PyDict_SetItemString(d,"wxDateTime_GMT_4", PyInt_FromLong((long) wxDateTime::GMT_4)); + PyDict_SetItemString(d,"wxDateTime_GMT_3", PyInt_FromLong((long) wxDateTime::GMT_3)); + PyDict_SetItemString(d,"wxDateTime_GMT_2", PyInt_FromLong((long) wxDateTime::GMT_2)); + PyDict_SetItemString(d,"wxDateTime_GMT_1", PyInt_FromLong((long) wxDateTime::GMT_1)); + PyDict_SetItemString(d,"wxDateTime_GMT0", PyInt_FromLong((long) wxDateTime::GMT0)); + PyDict_SetItemString(d,"wxDateTime_GMT1", PyInt_FromLong((long) wxDateTime::GMT1)); + PyDict_SetItemString(d,"wxDateTime_GMT2", PyInt_FromLong((long) wxDateTime::GMT2)); + PyDict_SetItemString(d,"wxDateTime_GMT3", PyInt_FromLong((long) wxDateTime::GMT3)); + PyDict_SetItemString(d,"wxDateTime_GMT4", PyInt_FromLong((long) wxDateTime::GMT4)); + PyDict_SetItemString(d,"wxDateTime_GMT5", PyInt_FromLong((long) wxDateTime::GMT5)); + PyDict_SetItemString(d,"wxDateTime_GMT6", PyInt_FromLong((long) wxDateTime::GMT6)); + PyDict_SetItemString(d,"wxDateTime_GMT7", PyInt_FromLong((long) wxDateTime::GMT7)); + PyDict_SetItemString(d,"wxDateTime_GMT8", PyInt_FromLong((long) wxDateTime::GMT8)); + PyDict_SetItemString(d,"wxDateTime_GMT9", PyInt_FromLong((long) wxDateTime::GMT9)); + PyDict_SetItemString(d,"wxDateTime_GMT10", PyInt_FromLong((long) wxDateTime::GMT10)); + PyDict_SetItemString(d,"wxDateTime_GMT11", PyInt_FromLong((long) wxDateTime::GMT11)); + PyDict_SetItemString(d,"wxDateTime_GMT12", PyInt_FromLong((long) wxDateTime::GMT12)); + PyDict_SetItemString(d,"wxDateTime_WET", PyInt_FromLong((long) wxDateTime::WET)); + PyDict_SetItemString(d,"wxDateTime_WEST", PyInt_FromLong((long) wxDateTime::WEST)); + PyDict_SetItemString(d,"wxDateTime_CET", PyInt_FromLong((long) wxDateTime::CET)); + PyDict_SetItemString(d,"wxDateTime_CEST", PyInt_FromLong((long) wxDateTime::CEST)); + PyDict_SetItemString(d,"wxDateTime_EET", PyInt_FromLong((long) wxDateTime::EET)); + PyDict_SetItemString(d,"wxDateTime_EEST", PyInt_FromLong((long) wxDateTime::EEST)); + PyDict_SetItemString(d,"wxDateTime_MSK", PyInt_FromLong((long) wxDateTime::MSK)); + PyDict_SetItemString(d,"wxDateTime_MSD", PyInt_FromLong((long) wxDateTime::MSD)); + PyDict_SetItemString(d,"wxDateTime_AST", PyInt_FromLong((long) wxDateTime::AST)); + PyDict_SetItemString(d,"wxDateTime_ADT", PyInt_FromLong((long) wxDateTime::ADT)); + PyDict_SetItemString(d,"wxDateTime_EST", PyInt_FromLong((long) wxDateTime::EST)); + PyDict_SetItemString(d,"wxDateTime_EDT", PyInt_FromLong((long) wxDateTime::EDT)); + PyDict_SetItemString(d,"wxDateTime_CST", PyInt_FromLong((long) wxDateTime::CST)); + PyDict_SetItemString(d,"wxDateTime_CDT", PyInt_FromLong((long) wxDateTime::CDT)); + PyDict_SetItemString(d,"wxDateTime_MST", PyInt_FromLong((long) wxDateTime::MST)); + PyDict_SetItemString(d,"wxDateTime_MDT", PyInt_FromLong((long) wxDateTime::MDT)); + PyDict_SetItemString(d,"wxDateTime_PST", PyInt_FromLong((long) wxDateTime::PST)); + PyDict_SetItemString(d,"wxDateTime_PDT", PyInt_FromLong((long) wxDateTime::PDT)); + PyDict_SetItemString(d,"wxDateTime_HST", PyInt_FromLong((long) wxDateTime::HST)); + PyDict_SetItemString(d,"wxDateTime_AKST", PyInt_FromLong((long) wxDateTime::AKST)); + PyDict_SetItemString(d,"wxDateTime_AKDT", PyInt_FromLong((long) wxDateTime::AKDT)); + PyDict_SetItemString(d,"wxDateTime_A_WST", PyInt_FromLong((long) wxDateTime::A_WST)); + PyDict_SetItemString(d,"wxDateTime_A_CST", PyInt_FromLong((long) wxDateTime::A_CST)); + PyDict_SetItemString(d,"wxDateTime_A_EST", PyInt_FromLong((long) wxDateTime::A_EST)); + PyDict_SetItemString(d,"wxDateTime_A_ESST", PyInt_FromLong((long) wxDateTime::A_ESST)); + PyDict_SetItemString(d,"wxDateTime_UTC", PyInt_FromLong((long) wxDateTime::UTC)); + PyDict_SetItemString(d,"wxDateTime_Gregorian", PyInt_FromLong((long) wxDateTime::Gregorian)); + PyDict_SetItemString(d,"wxDateTime_Julian", PyInt_FromLong((long) wxDateTime::Julian)); + PyDict_SetItemString(d,"wxDateTime_Country_Unknown", PyInt_FromLong((long) wxDateTime::Country_Unknown)); + PyDict_SetItemString(d,"wxDateTime_Country_Default", PyInt_FromLong((long) wxDateTime::Country_Default)); + PyDict_SetItemString(d,"wxDateTime_Country_WesternEurope_Start", PyInt_FromLong((long) wxDateTime::Country_WesternEurope_Start)); + PyDict_SetItemString(d,"wxDateTime_Country_EEC", PyInt_FromLong((long) wxDateTime::Country_EEC)); + PyDict_SetItemString(d,"wxDateTime_France", PyInt_FromLong((long) wxDateTime::France)); + PyDict_SetItemString(d,"wxDateTime_Germany", PyInt_FromLong((long) wxDateTime::Germany)); + PyDict_SetItemString(d,"wxDateTime_UK", PyInt_FromLong((long) wxDateTime::UK)); + PyDict_SetItemString(d,"wxDateTime_Country_WesternEurope_End", PyInt_FromLong((long) wxDateTime::Country_WesternEurope_End)); + PyDict_SetItemString(d,"wxDateTime_Russia", PyInt_FromLong((long) wxDateTime::Russia)); + PyDict_SetItemString(d,"wxDateTime_USA", PyInt_FromLong((long) wxDateTime::USA)); + PyDict_SetItemString(d,"wxDateTime_Jan", PyInt_FromLong((long) wxDateTime::Jan)); + PyDict_SetItemString(d,"wxDateTime_Feb", PyInt_FromLong((long) wxDateTime::Feb)); + PyDict_SetItemString(d,"wxDateTime_Mar", PyInt_FromLong((long) wxDateTime::Mar)); + PyDict_SetItemString(d,"wxDateTime_Apr", PyInt_FromLong((long) wxDateTime::Apr)); + PyDict_SetItemString(d,"wxDateTime_May", PyInt_FromLong((long) wxDateTime::May)); + PyDict_SetItemString(d,"wxDateTime_Jun", PyInt_FromLong((long) wxDateTime::Jun)); + PyDict_SetItemString(d,"wxDateTime_Jul", PyInt_FromLong((long) wxDateTime::Jul)); + PyDict_SetItemString(d,"wxDateTime_Aug", PyInt_FromLong((long) wxDateTime::Aug)); + PyDict_SetItemString(d,"wxDateTime_Sep", PyInt_FromLong((long) wxDateTime::Sep)); + PyDict_SetItemString(d,"wxDateTime_Oct", PyInt_FromLong((long) wxDateTime::Oct)); + PyDict_SetItemString(d,"wxDateTime_Nov", PyInt_FromLong((long) wxDateTime::Nov)); + PyDict_SetItemString(d,"wxDateTime_Dec", PyInt_FromLong((long) wxDateTime::Dec)); + PyDict_SetItemString(d,"wxDateTime_Inv_Month", PyInt_FromLong((long) wxDateTime::Inv_Month)); + PyDict_SetItemString(d,"wxDateTime_Sun", PyInt_FromLong((long) wxDateTime::Sun)); + PyDict_SetItemString(d,"wxDateTime_Mon", PyInt_FromLong((long) wxDateTime::Mon)); + PyDict_SetItemString(d,"wxDateTime_Tue", PyInt_FromLong((long) wxDateTime::Tue)); + PyDict_SetItemString(d,"wxDateTime_Wed", PyInt_FromLong((long) wxDateTime::Wed)); + PyDict_SetItemString(d,"wxDateTime_Thu", PyInt_FromLong((long) wxDateTime::Thu)); + PyDict_SetItemString(d,"wxDateTime_Fri", PyInt_FromLong((long) wxDateTime::Fri)); + PyDict_SetItemString(d,"wxDateTime_Sat", PyInt_FromLong((long) wxDateTime::Sat)); + PyDict_SetItemString(d,"wxDateTime_Inv_WeekDay", PyInt_FromLong((long) wxDateTime::Inv_WeekDay)); + PyDict_SetItemString(d,"wxDateTime_Inv_Year", PyInt_FromLong((long) wxDateTime::Inv_Year)); + PyDict_SetItemString(d,"wxDateTime_Name_Full", PyInt_FromLong((long) wxDateTime::Name_Full)); + PyDict_SetItemString(d,"wxDateTime_Name_Abbr", PyInt_FromLong((long) wxDateTime::Name_Abbr)); + PyDict_SetItemString(d,"wxDateTime_Default_First", PyInt_FromLong((long) wxDateTime::Default_First)); + PyDict_SetItemString(d,"wxDateTime_Monday_First", PyInt_FromLong((long) wxDateTime::Monday_First)); + PyDict_SetItemString(d,"wxDateTime_Sunday_First", PyInt_FromLong((long) wxDateTime::Sunday_First)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/utils.py b/wxPython/src/gtk/utils.py new file mode 100644 index 0000000000..be380ee5a4 --- /dev/null +++ b/wxPython/src/gtk/utils.py @@ -0,0 +1,953 @@ +# This file was created automatically by SWIG. +import utilsc +import string +class wxConfigBasePtr : + Type_Unknown = utilsc.wxConfigBase_Type_Unknown + Type_String = utilsc.wxConfigBase_Type_String + Type_Boolean = utilsc.wxConfigBase_Type_Boolean + Type_Integer = utilsc.wxConfigBase_Type_Integer + Type_Float = utilsc.wxConfigBase_Type_Float + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxConfigBase(self) + def DeleteAll(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_DeleteAll,(self,) + _args, _kwargs) + return val + def DeleteEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_DeleteEntry,(self,) + _args, _kwargs) + return val + def DeleteGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_DeleteGroup,(self,) + _args, _kwargs) + return val + def Exists(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Exists,(self,) + _args, _kwargs) + return val + def Flush(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Flush,(self,) + _args, _kwargs) + return val + def GetAppName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetAppName,(self,) + _args, _kwargs) + return val + def GetFirstGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetFirstGroup,(self,) + _args, _kwargs) + return val + def GetFirstEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetFirstEntry,(self,) + _args, _kwargs) + return val + def GetNextGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNextGroup,(self,) + _args, _kwargs) + return val + def GetNextEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNextEntry,(self,) + _args, _kwargs) + return val + def GetNumberOfEntries(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNumberOfEntries,(self,) + _args, _kwargs) + return val + def GetNumberOfGroups(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNumberOfGroups,(self,) + _args, _kwargs) + return val + def GetPath(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetPath,(self,) + _args, _kwargs) + return val + def GetVendorName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetVendorName,(self,) + _args, _kwargs) + return val + def HasEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_HasEntry,(self,) + _args, _kwargs) + return val + def HasGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_HasGroup,(self,) + _args, _kwargs) + return val + def IsExpandingEnvVars(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_IsExpandingEnvVars,(self,) + _args, _kwargs) + return val + def IsRecordingDefaults(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_IsRecordingDefaults,(self,) + _args, _kwargs) + return val + def Read(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Read,(self,) + _args, _kwargs) + return val + def ReadInt(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_ReadInt,(self,) + _args, _kwargs) + return val + def ReadFloat(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_ReadFloat,(self,) + _args, _kwargs) + return val + def SetExpandEnvVars(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetExpandEnvVars,(self,) + _args, _kwargs) + return val + def SetPath(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetPath,(self,) + _args, _kwargs) + return val + def SetRecordDefaults(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetRecordDefaults,(self,) + _args, _kwargs) + return val + def SetAppName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetAppName,(self,) + _args, _kwargs) + return val + def SetVendorName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetVendorName,(self,) + _args, _kwargs) + return val + def SetStyle(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetStyle,(self,) + _args, _kwargs) + return val + def GetStyle(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetStyle,(self,) + _args, _kwargs) + return val + def Write(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Write,(self,) + _args, _kwargs) + return val + def WriteInt(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_WriteInt,(self,) + _args, _kwargs) + return val + def WriteFloat(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_WriteFloat,(self,) + _args, _kwargs) + return val + def GetEntryType(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetEntryType,(self,) + _args, _kwargs) + return val + def RenameEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_RenameEntry,(self,) + _args, _kwargs) + return val + def RenameGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_RenameGroup,(self,) + _args, _kwargs) + return val + def ExpandEnvVars(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_ExpandEnvVars,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxConfigBase(wxConfigBasePtr): + def __init__(self,this): + self.this = this + + + + +class wxConfigPtr(wxConfigBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxConfig(self) + def __repr__(self): + return "" % (self.this,) +class wxConfig(wxConfigPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxConfig,_args,_kwargs) + self.thisown = 1 + + + + +class wxFileConfigPtr(wxConfigBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxFileConfig(self) + def __repr__(self): + return "" % (self.this,) +class wxFileConfig(wxFileConfigPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxFileConfig,_args,_kwargs) + self.thisown = 1 + + + + +class wxDateTimePtr : + Local = utilsc.wxDateTime_Local + GMT_12 = utilsc.wxDateTime_GMT_12 + GMT_11 = utilsc.wxDateTime_GMT_11 + GMT_10 = utilsc.wxDateTime_GMT_10 + GMT_9 = utilsc.wxDateTime_GMT_9 + GMT_8 = utilsc.wxDateTime_GMT_8 + GMT_7 = utilsc.wxDateTime_GMT_7 + GMT_6 = utilsc.wxDateTime_GMT_6 + GMT_5 = utilsc.wxDateTime_GMT_5 + GMT_4 = utilsc.wxDateTime_GMT_4 + GMT_3 = utilsc.wxDateTime_GMT_3 + GMT_2 = utilsc.wxDateTime_GMT_2 + GMT_1 = utilsc.wxDateTime_GMT_1 + GMT0 = utilsc.wxDateTime_GMT0 + GMT1 = utilsc.wxDateTime_GMT1 + GMT2 = utilsc.wxDateTime_GMT2 + GMT3 = utilsc.wxDateTime_GMT3 + GMT4 = utilsc.wxDateTime_GMT4 + GMT5 = utilsc.wxDateTime_GMT5 + GMT6 = utilsc.wxDateTime_GMT6 + GMT7 = utilsc.wxDateTime_GMT7 + GMT8 = utilsc.wxDateTime_GMT8 + GMT9 = utilsc.wxDateTime_GMT9 + GMT10 = utilsc.wxDateTime_GMT10 + GMT11 = utilsc.wxDateTime_GMT11 + GMT12 = utilsc.wxDateTime_GMT12 + WET = utilsc.wxDateTime_WET + WEST = utilsc.wxDateTime_WEST + CET = utilsc.wxDateTime_CET + CEST = utilsc.wxDateTime_CEST + EET = utilsc.wxDateTime_EET + EEST = utilsc.wxDateTime_EEST + MSK = utilsc.wxDateTime_MSK + MSD = utilsc.wxDateTime_MSD + AST = utilsc.wxDateTime_AST + ADT = utilsc.wxDateTime_ADT + EST = utilsc.wxDateTime_EST + EDT = utilsc.wxDateTime_EDT + CST = utilsc.wxDateTime_CST + CDT = utilsc.wxDateTime_CDT + MST = utilsc.wxDateTime_MST + MDT = utilsc.wxDateTime_MDT + PST = utilsc.wxDateTime_PST + PDT = utilsc.wxDateTime_PDT + HST = utilsc.wxDateTime_HST + AKST = utilsc.wxDateTime_AKST + AKDT = utilsc.wxDateTime_AKDT + A_WST = utilsc.wxDateTime_A_WST + A_CST = utilsc.wxDateTime_A_CST + A_EST = utilsc.wxDateTime_A_EST + A_ESST = utilsc.wxDateTime_A_ESST + UTC = utilsc.wxDateTime_UTC + Gregorian = utilsc.wxDateTime_Gregorian + Julian = utilsc.wxDateTime_Julian + Country_Unknown = utilsc.wxDateTime_Country_Unknown + Country_Default = utilsc.wxDateTime_Country_Default + Country_WesternEurope_Start = utilsc.wxDateTime_Country_WesternEurope_Start + Country_EEC = utilsc.wxDateTime_Country_EEC + France = utilsc.wxDateTime_France + Germany = utilsc.wxDateTime_Germany + UK = utilsc.wxDateTime_UK + Country_WesternEurope_End = utilsc.wxDateTime_Country_WesternEurope_End + Russia = utilsc.wxDateTime_Russia + USA = utilsc.wxDateTime_USA + Jan = utilsc.wxDateTime_Jan + Feb = utilsc.wxDateTime_Feb + Mar = utilsc.wxDateTime_Mar + Apr = utilsc.wxDateTime_Apr + May = utilsc.wxDateTime_May + Jun = utilsc.wxDateTime_Jun + Jul = utilsc.wxDateTime_Jul + Aug = utilsc.wxDateTime_Aug + Sep = utilsc.wxDateTime_Sep + Oct = utilsc.wxDateTime_Oct + Nov = utilsc.wxDateTime_Nov + Dec = utilsc.wxDateTime_Dec + Inv_Month = utilsc.wxDateTime_Inv_Month + Sun = utilsc.wxDateTime_Sun + Mon = utilsc.wxDateTime_Mon + Tue = utilsc.wxDateTime_Tue + Wed = utilsc.wxDateTime_Wed + Thu = utilsc.wxDateTime_Thu + Fri = utilsc.wxDateTime_Fri + Sat = utilsc.wxDateTime_Sat + Inv_WeekDay = utilsc.wxDateTime_Inv_WeekDay + Inv_Year = utilsc.wxDateTime_Inv_Year + Name_Full = utilsc.wxDateTime_Name_Full + Name_Abbr = utilsc.wxDateTime_Name_Abbr + Default_First = utilsc.wxDateTime_Default_First + Monday_First = utilsc.wxDateTime_Monday_First + Sunday_First = utilsc.wxDateTime_Sunday_First + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxDateTime(self) + def SetToCurrent(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToCurrent,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetTimeT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetTimeT,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetJDN(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetJDN,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetHMS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetHMS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def Set(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_Set,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def ResetTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ResetTime,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetYear,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetMonth(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetMonth,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetHour(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetHour,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetMinute(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetMinute,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetSecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetSecond,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetMillisecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetMillisecond,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetToWeekDayInSameWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToWeekDayInSameWeek,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetWeekDayInSameWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekDayInSameWeek,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToNextWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToNextWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetNextWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetNextWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToPrevWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToPrevWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetPrevWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetPrevWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToWeekDay,(self,) + _args, _kwargs) + return val + def GetWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToLastWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToLastWeekDay,(self,) + _args, _kwargs) + return val + def GetLastWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetLastWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToTheWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToTheWeek,(self,) + _args, _kwargs) + return val + def GetWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeek,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToLastMonthDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToLastMonthDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetLastMonthDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetLastMonthDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToYearDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToYearDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetYearDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetYearDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def GetJulianDayNumber(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetJulianDayNumber,(self,) + _args, _kwargs) + return val + def GetJDN(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetJDN,(self,) + _args, _kwargs) + return val + def GetModifiedJulianDayNumber(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetModifiedJulianDayNumber,(self,) + _args, _kwargs) + return val + def GetMJD(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMJD,(self,) + _args, _kwargs) + return val + def GetRataDie(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetRataDie,(self,) + _args, _kwargs) + return val + def ToTimezone(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ToTimezone,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def MakeTimezone(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_MakeTimezone,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def ToGMT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ToGMT,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def MakeGMT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_MakeGMT,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def IsDST(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsDST,(self,) + _args, _kwargs) + return val + def IsValid(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsValid,(self,) + _args, _kwargs) + return val + def GetTicks(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetTicks,(self,) + _args, _kwargs) + return val + def GetYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetYear,(self,) + _args, _kwargs) + return val + def GetMonth(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMonth,(self,) + _args, _kwargs) + return val + def GetDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetDay,(self,) + _args, _kwargs) + return val + def GetHour(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetHour,(self,) + _args, _kwargs) + return val + def GetMinute(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMinute,(self,) + _args, _kwargs) + return val + def GetSecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetSecond,(self,) + _args, _kwargs) + return val + def GetMillisecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMillisecond,(self,) + _args, _kwargs) + return val + def GetDayOfYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetDayOfYear,(self,) + _args, _kwargs) + return val + def GetWeekOfYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekOfYear,(self,) + _args, _kwargs) + return val + def GetWeekOfMonth(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekOfMonth,(self,) + _args, _kwargs) + return val + def IsWorkDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsWorkDay,(self,) + _args, _kwargs) + return val + def IsEqualTo(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsEqualTo,(self,) + _args, _kwargs) + return val + def IsEarlierThan(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsEarlierThan,(self,) + _args, _kwargs) + return val + def IsLaterThan(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsLaterThan,(self,) + _args, _kwargs) + return val + def IsStrictlyBetween(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsStrictlyBetween,(self,) + _args, _kwargs) + return val + def IsBetween(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsBetween,(self,) + _args, _kwargs) + return val + def IsSameDate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsSameDate,(self,) + _args, _kwargs) + return val + def IsSameTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsSameTime,(self,) + _args, _kwargs) + return val + def IsEqualUpTo(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsEqualUpTo,(self,) + _args, _kwargs) + return val + def AddTS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_AddTS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def AddDS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_AddDS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SubtractTS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SubtractTS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SubtractDS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SubtractDS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_Subtract,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __add__TS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___add__TS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __add__DS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___add__DS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __sub__DT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___sub__DT,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __sub__TS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___sub__TS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __sub__DS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___sub__DS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___cmp__,(self,) + _args, _kwargs) + return val + def ParseRfc822Date(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseRfc822Date,(self,) + _args, _kwargs) + return val + def ParseFormat(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseFormat,(self,) + _args, _kwargs) + return val + def ParseDateTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseDateTime,(self,) + _args, _kwargs) + return val + def ParseDate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseDate,(self,) + _args, _kwargs) + return val + def ParseTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseTime,(self,) + _args, _kwargs) + return val + def Format(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_Format,(self,) + _args, _kwargs) + return val + def FormatDate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatDate,(self,) + _args, _kwargs) + return val + def FormatTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatTime,(self,) + _args, _kwargs) + return val + def FormatISODate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatISODate,(self,) + _args, _kwargs) + return val + def FormatISOTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatISOTime,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) + + def __add__(self, other): + if string.find(other.this, 'wxTimeSpan') != -1: + return self.__add__TS(other) + if string.find(other.this, 'wxDateSpan') != -1: + return self.__add__DS(other) + raise TypeError, 'Invalid r.h.s. type for __add__' + def __sub__(self, other): + if string.find(other.this, 'wxDateTime') != -1: + return self.__sub__DT(other) + if string.find(other.this, 'wxTimeSpan') != -1: + return self.__sub__TS(other) + if string.find(other.this, 'wxDateSpan') != -1: + return self.__sub__DS(other) + raise TypeError, 'Invalid r.h.s. type for __sub__' + + + def __repr__(self): + return '' % ( self.Format(), self.this) + def __str__(self): + return self.Format() + +class wxDateTime(wxDateTimePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxDateTime,_args,_kwargs) + self.thisown = 1 + + + +def wxDateTimeFromTimeT(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromTimeT,_args,_kwargs)) + val.thisown = 1 + return val + +def wxDateTimeFromJDN(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromJDN,_args,_kwargs)) + val.thisown = 1 + return val + +def wxDateTimeFromHMS(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromHMS,_args,_kwargs)) + val.thisown = 1 + return val + +def wxDateTimeFromDMY(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromDMY,_args,_kwargs)) + val.thisown = 1 + return val + + +class wxTimeSpanPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxTimeSpan(self) + def Add(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Add,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Subtract,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Multiply(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Multiply,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Neg(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Neg,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Abs(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Abs,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __add__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___add__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___sub__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __mul__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___mul__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __rmul__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___rmul__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __neg__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___neg__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___cmp__,(self,) + _args, _kwargs) + return val + def IsNull(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsNull,(self,) + _args, _kwargs) + return val + def IsPositive(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsPositive,(self,) + _args, _kwargs) + return val + def IsNegative(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsNegative,(self,) + _args, _kwargs) + return val + def IsEqualTo(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsEqualTo,(self,) + _args, _kwargs) + return val + def IsLongerThan(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsLongerThan,(self,) + _args, _kwargs) + return val + def IsShorterThan(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsShorterThan,(self,) + _args, _kwargs) + return val + def GetWeeks(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetWeeks,(self,) + _args, _kwargs) + return val + def GetDays(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetDays,(self,) + _args, _kwargs) + return val + def GetHours(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetHours,(self,) + _args, _kwargs) + return val + def GetMinutes(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetMinutes,(self,) + _args, _kwargs) + return val + def GetSeconds(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetSeconds,(self,) + _args, _kwargs) + return val + def GetMilliseconds(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetMilliseconds,(self,) + _args, _kwargs) + return val + def Format(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Format,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxTimeSpan(wxTimeSpanPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxTimeSpan,_args,_kwargs) + self.thisown = 1 + + + + +class wxDateSpanPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxDateSpan(self) + def SetYears(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetYears,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def SetMonths(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetMonths,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def SetWeeks(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetWeeks,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def SetDays(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetDays,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def GetYears(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetYears,(self,) + _args, _kwargs) + return val + def GetMonths(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetMonths,(self,) + _args, _kwargs) + return val + def GetWeeks(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetWeeks,(self,) + _args, _kwargs) + return val + def GetDays(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetDays,(self,) + _args, _kwargs) + return val + def GetTotalDays(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetTotalDays,(self,) + _args, _kwargs) + return val + def Add(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Add,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Subtract,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def Neg(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Neg,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def Multiply(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Multiply,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def __add__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___add__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___sub__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __mul__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___mul__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __rmul__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___rmul__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __neg__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___neg__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __repr__(self): + return "" % (self.this,) +class wxDateSpan(wxDateSpanPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxDateSpan,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +wxGetLocalTime = utilsc.wxGetLocalTime + +wxGetUTCTime = utilsc.wxGetUTCTime + +wxGetCurrentTime = utilsc.wxGetCurrentTime + +wxGetLocalTimeMillis = utilsc.wxGetLocalTimeMillis + +def wxConfigBase_Set(*_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Set,_args,_kwargs) + if val: val = wxConfigBasePtr(val) + return val + +def wxConfigBase_Get(*_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Get,_args,_kwargs) + if val: val = wxConfigBasePtr(val) + return val + +def wxConfigBase_Create(*_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Create,_args,_kwargs) + if val: val = wxConfigBasePtr(val) + return val + +wxConfigBase_DontCreateOnDemand = utilsc.wxConfigBase_DontCreateOnDemand + +wxDateTime_SetCountry = utilsc.wxDateTime_SetCountry + +wxDateTime_GetCountry = utilsc.wxDateTime_GetCountry + +wxDateTime_IsWestEuropeanCountry = utilsc.wxDateTime_IsWestEuropeanCountry + +wxDateTime_GetCurrentYear = utilsc.wxDateTime_GetCurrentYear + +wxDateTime_ConvertYearToBC = utilsc.wxDateTime_ConvertYearToBC + +wxDateTime_GetCurrentMonth = utilsc.wxDateTime_GetCurrentMonth + +wxDateTime_IsLeapYear = utilsc.wxDateTime_IsLeapYear + +wxDateTime_GetCentury = utilsc.wxDateTime_GetCentury + +wxDateTime_GetNumberOfDaysinYear = utilsc.wxDateTime_GetNumberOfDaysinYear + +wxDateTime_GetNumberOfDaysInMonth = utilsc.wxDateTime_GetNumberOfDaysInMonth + +wxDateTime_GetMonthName = utilsc.wxDateTime_GetMonthName + +wxDateTime_GetWeekDayName = utilsc.wxDateTime_GetWeekDayName + +wxDateTime_GetAmPmStrings = utilsc.wxDateTime_GetAmPmStrings + +wxDateTime_IsDSTApplicable = utilsc.wxDateTime_IsDSTApplicable + +def wxDateTime_GetBeginDST(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetBeginDST,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxDateTime_GetEndDST(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetEndDST,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxDateTime_Now(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_Now,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxDateTime_Today(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_Today,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Seconds(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Seconds,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Second(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Second,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Minutes(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Minutes,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Minute(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Minute,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Hours(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Hours,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Hour(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Hour,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Days(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Days,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Day(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Day,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Weeks(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Weeks,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Week(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Week,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Days(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Days,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Day(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Day,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Weeks(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Weeks,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Week(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Week,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Months(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Months,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Month(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Month,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Years(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Years,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Year(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Year,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxCONFIG_USE_LOCAL_FILE = utilsc.wxCONFIG_USE_LOCAL_FILE +wxCONFIG_USE_GLOBAL_FILE = utilsc.wxCONFIG_USE_GLOBAL_FILE +wxCONFIG_USE_RELATIVE_PATH = utilsc.wxCONFIG_USE_RELATIVE_PATH diff --git a/utils/wxPython/src/msw/windows.cpp b/wxPython/src/gtk/windows.cpp similarity index 92% rename from utils/wxPython/src/msw/windows.cpp rename to wxPython/src/gtk/windows.cpp index de92f4ebfc..84b43d80a5 100644 --- a/utils/wxPython/src/msw/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/windows.cpp + * FILE : src/gtk/windows.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -56,48 +58,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -105,6 +87,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + bool wxValidator_IsSilent() { return wxValidator::IsSilent(); } @@ -131,7 +115,10 @@ public: if (self->m_myInst.findCallback("Clone")) { PyObject* ro; ro = self->m_myInst.callCallbackObj(Py_BuildValue("()")); - SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p"); + if (ro) { + SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p"); + Py_DECREF(ro); + } } // This is very dangerous!!! But is the only way I could find // to squash a memory leak. Currently it is okay, but if the @@ -162,13 +149,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); return wxWindow::FindFocus(); } -wxWindow* wxWindow_FromHWND(unsigned long hWnd) { - wxWindow* win = new wxWindow; - win->SetHWND(hWnd); - win->SubclassWin(hWnd); - return win; -} - int wxWindow_NewControlId() { return wxWindow::NewControlId(); } @@ -240,31 +220,6 @@ static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObje return _resultobj; } -static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - unsigned long _arg0; - char *_kwnames[] = { "hWnd", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxWindow_FromHWND",_kwnames,&_arg0)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxWindow_FromHWND(_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; @@ -318,6 +273,31 @@ static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, Py return _resultobj; } +#define new_wxEvtHandler() (new wxEvtHandler()) +static PyObject *_wrap_new_wxEvtHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxEvtHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxEvtHandler *)new_wxEvtHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxEvtHandler_ProcessEvent(_swigobj,_swigarg0) (_swigobj->ProcessEvent(_swigarg0)) static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -354,6 +334,42 @@ static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, return _resultobj; } +#define wxEvtHandler_AddPendingEvent(_swigobj,_swigarg0) (_swigobj->AddPendingEvent(_swigarg0)) +static PyObject *_wrap_wxEvtHandler_AddPendingEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _arg0; + wxEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxEvtHandler_AddPendingEvent",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler_AddPendingEvent. Expected _wxEvtHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxEvtHandler_AddPendingEvent. Expected _wxEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxEvtHandler_AddPendingEvent(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxEvtHandler_GetEvtHandlerEnabled(_swigobj) (_swigobj->GetEvtHandlerEnabled()) static PyObject *_wrap_wxEvtHandler_GetEvtHandlerEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -831,18 +847,20 @@ static PyObject *_wrap_wxPyValidator_Destroy(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxPyValidator__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +#define wxPyValidator__setSelf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setSelf(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyValidator * _arg0; PyObject * _arg1; - int _arg2 = (int ) TRUE; + PyObject * _arg2; + int _arg3 = (int ) TRUE; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self","incref", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class","incref", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyValidator__setSelf",_kwnames,&_argo0,&_obj1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxPyValidator__setSelf",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -854,9 +872,12 @@ static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, Py { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyValidator__setSelf(_arg0,_arg1,_arg2); + wxPyValidator__setSelf(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -878,8 +899,8 @@ static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kw wxWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "panel"; PyObject * _argo0 = 0; @@ -1066,6 +1087,62 @@ static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args, P return _resultobj; } +#define wxWindow_CentreOnScreen(_swigobj,_swigarg0) (_swigobj->CentreOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CentreOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CentreOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CentreOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CentreOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_CenterOnScreen(_swigobj,_swigarg0) (_swigobj->CenterOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CenterOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CenterOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CenterOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CenterOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_ClientToScreenXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->ClientToScreen(_swigarg0,_swigarg1)) static PyObject *_wrap_wxWindow_ClientToScreenXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1236,36 +1313,6 @@ static PyObject *_wrap_wxWindow_DestroyChildren(PyObject *self, PyObject *args, return _resultobj; } -#define wxWindow_DragAcceptFiles(_swigobj,_swigarg0) (_swigobj->DragAcceptFiles(_swigarg0)) -static PyObject *_wrap_wxWindow_DragAcceptFiles(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","accept", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_DragAcceptFiles",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_DragAcceptFiles. Expected _wxWindow_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxWindow_DragAcceptFiles(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxWindow_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1353,11 +1400,22 @@ static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1870,11 +1928,22 @@ static PyObject *_wrap_wxWindow_SetLabel(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2251,11 +2320,22 @@ static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2323,11 +2403,22 @@ static PyObject *_wrap_wxWindow_GetFullTextExtent(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -2458,6 +2549,62 @@ static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *arg return _resultobj; } +#define wxWindow_SetWindowStyleFlag(_swigobj,_swigarg0) (_swigobj->SetWindowStyleFlag(_swigarg0)) +static PyObject *_wrap_wxWindow_SetWindowStyleFlag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxWindow_SetWindowStyleFlag",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetWindowStyleFlag. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_SetWindowStyleFlag(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_SetWindowStyle(_swigobj,_swigarg0) (_swigobj->SetWindowStyle(_swigarg0)) +static PyObject *_wrap_wxWindow_SetWindowStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxWindow_SetWindowStyle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetWindowStyle. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_SetWindowStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_Hide(_swigobj) (_swigobj->Hide()) static PyObject *_wrap_wxWindow_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2780,11 +2927,22 @@ static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -3472,11 +3630,12 @@ static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *ar wxWindow * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3485,13 +3644,11 @@ static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxWindow_SetBackgroundColour(_arg0,*_arg1); @@ -3670,11 +3827,12 @@ static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *ar wxWindow * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetForegroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetForegroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3683,13 +3841,11 @@ static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetForegroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxWindow_SetForegroundColour(_arg0,*_arg1); @@ -3748,11 +3904,22 @@ static PyObject *_wrap_wxWindow_SetName(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3938,6 +4105,44 @@ static PyObject *_wrap_wxWindow_SetPosition(PyObject *self, PyObject *args, PyOb return _resultobj; } +static void wxWindow_SetRect(wxWindow *self,const wxRect & rect,int sizeFlags) { + self->SetSize(rect, sizeFlags); + } +static PyObject *_wrap_wxWindow_SetRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + wxRect * _arg1; + int _arg2 = (int ) wxSIZE_AUTO; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect","sizeFlags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxWindow_SetRect",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetRect. Expected _wxWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_SetRect(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_SetSizeHints(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetSizeHints(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4127,11 +4332,22 @@ static PyObject *_wrap_wxWindow_SetTitle(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4455,11 +4671,22 @@ static PyObject *_wrap_wxWindow_SetToolTipString(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4581,6 +4808,40 @@ static PyObject *_wrap_wxWindow_SetSizer(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxWindow_GetSizer(_swigobj) (_swigobj->GetSizer()) +static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetSizer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetSizer. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSizer *)wxWindow_GetSizer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxWindow_GetValidator(_swigobj) (_swigobj->GetValidator()) static PyObject *_wrap_wxWindow_GetValidator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4842,8 +5103,8 @@ static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwa wxPanel * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxTAB_TRAVERSAL; char * _arg5 = (char *) "panel"; PyObject * _argo0 = 0; @@ -5019,8 +5280,8 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_DIALOG_STYLE; char * _arg6 = (char *) "dialogBox"; PyObject * _argo0 = 0; @@ -5043,11 +5304,22 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -5302,11 +5574,22 @@ static PyObject *_wrap_wxDialog_SetTitle(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5464,8 +5747,8 @@ static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyOb wxScrolledWindow * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxHSCROLL|wxVSCROLL; char * _arg5 = (char *) "scrolledWindow"; PyObject * _argo0 = 0; @@ -5794,7 +6077,7 @@ static PyObject *_wrap_wxScrolledWindow_Scroll(PyObject *self, PyObject *args, P return _resultobj; } -#define wxScrolledWindow_SetScrollbars(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetScrollbars(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +#define wxScrolledWindow_SetScrollbars(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->SetScrollbars(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxScrolledWindow * _arg0; @@ -5804,11 +6087,12 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject * int _arg4; int _arg5 = (int ) 0; int _arg6 = (int ) 0; + int _arg7 = (int ) FALSE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","pixelsPerUnitX","pixelsPerUnitY","noUnitsX","noUnitsY","xPos","yPos", NULL }; + char *_kwnames[] = { "self","pixelsPerUnitX","pixelsPerUnitY","noUnitsX","noUnitsY","xPos","yPos","noRefresh", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|ii:wxScrolledWindow_SetScrollbars",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|iii:wxScrolledWindow_SetScrollbars",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_arg7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5819,7 +6103,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -6107,11 +6391,22 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args, PyObject *kwar return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6156,19 +6451,41 @@ static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args, PyObject *k } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6213,11 +6530,22 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -6228,11 +6556,22 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } if (_obj4) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg4 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj4)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4)); + _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6481,11 +6820,22 @@ static PyObject *_wrap_wxMenu_FindItem(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6587,11 +6937,22 @@ static PyObject *_wrap_wxMenu_SetTitle(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6661,11 +7022,22 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6735,11 +7107,22 @@ static PyObject *_wrap_wxMenu_SetHelpString(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7400,19 +7783,20 @@ static void *SwigwxMenuBarTowxEvtHandler(void *ptr) { return (void *) dest; } -#define new_wxMenuBar() (new wxMenuBar()) +#define new_wxMenuBar(_swigarg0) (new wxMenuBar(_swigarg0)) static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxMenuBar * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + char *_kwnames[] = { "style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMenuBar",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|l:new_wxMenuBar",_kwnames,&_arg0)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenuBar *)new_wxMenuBar(); + _result = (wxMenuBar *)new_wxMenuBar(_arg0); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -7455,11 +7839,22 @@ static PyObject *_wrap_wxMenuBar_Append(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7505,11 +7900,22 @@ static PyObject *_wrap_wxMenuBar_Insert(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7618,11 +8024,22 @@ static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7730,11 +8147,22 @@ static PyObject *_wrap_wxMenuBar_SetLabelTop(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7806,18 +8234,40 @@ static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8010,11 +8460,22 @@ static PyObject *_wrap_wxMenuBar_SetLabel(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8084,11 +8545,22 @@ static PyObject *_wrap_wxMenuBar_SetHelpString(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8167,19 +8639,41 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } _arg4 = (bool ) tempbool4; if (_argo5) { @@ -8348,11 +8842,22 @@ static PyObject *_wrap_wxMenuItem_SetText(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8745,11 +9250,22 @@ static PyObject *_wrap_wxMenuItem_SetHelp(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8985,6 +9501,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetDropTarget", (PyCFunction) _wrap_wxWindow_SetDropTarget, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetValidator", (PyCFunction) _wrap_wxWindow_SetValidator, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetValidator", (PyCFunction) _wrap_wxWindow_GetValidator, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetSizer", (PyCFunction) _wrap_wxWindow_GetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSizer", (PyCFunction) _wrap_wxWindow_SetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetToolTip", (PyCFunction) _wrap_wxWindow_GetToolTip, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetToolTip", (PyCFunction) _wrap_wxWindow_SetToolTip, METH_VARARGS | METH_KEYWORDS }, @@ -9006,6 +9523,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetClientSize", (PyCFunction) _wrap_wxWindow_SetClientSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSizeWH", (PyCFunction) _wrap_wxWindow_SetClientSizeWH, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSizeHints", (PyCFunction) _wrap_wxWindow_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetRect", (PyCFunction) _wrap_wxWindow_SetRect, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetPosition", (PyCFunction) _wrap_wxWindow_SetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSize", (PyCFunction) _wrap_wxWindow_SetSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetDimensions", (PyCFunction) _wrap_wxWindow_SetDimensions, METH_VARARGS | METH_KEYWORDS }, @@ -9050,6 +9568,8 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_IsEnabled", (PyCFunction) _wrap_wxWindow_IsEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_InitDialog", (PyCFunction) _wrap_wxWindow_InitDialog, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Hide", (PyCFunction) _wrap_wxWindow_Hide, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetWindowStyle", (PyCFunction) _wrap_wxWindow_SetWindowStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetWindowStyleFlag", (PyCFunction) _wrap_wxWindow_SetWindowStyleFlag, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetWindowStyleFlag", (PyCFunction) _wrap_wxWindow_GetWindowStyleFlag, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetUpdateRegion", (PyCFunction) _wrap_wxWindow_GetUpdateRegion, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetTitle", (PyCFunction) _wrap_wxWindow_GetTitle, METH_VARARGS | METH_KEYWORDS }, @@ -9084,12 +9604,13 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_FindWindowByName", (PyCFunction) _wrap_wxWindow_FindWindowByName, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FindWindowById", (PyCFunction) _wrap_wxWindow_FindWindowById, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Enable", (PyCFunction) _wrap_wxWindow_Enable, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_DragAcceptFiles", (PyCFunction) _wrap_wxWindow_DragAcceptFiles, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_DestroyChildren", (PyCFunction) _wrap_wxWindow_DestroyChildren, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Destroy", (PyCFunction) _wrap_wxWindow_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Close", (PyCFunction) _wrap_wxWindow_Close, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreen", (PyCFunction) _wrap_wxWindow_ClientToScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreenXY", (PyCFunction) _wrap_wxWindow_ClientToScreenXY, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CenterOnScreen", (PyCFunction) _wrap_wxWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CentreOnScreen", (PyCFunction) _wrap_wxWindow_CentreOnScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CenterOnParent", (PyCFunction) _wrap_wxWindow_CenterOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CentreOnParent", (PyCFunction) _wrap_wxWindow_CentreOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Centre", (PyCFunction) _wrap_wxWindow_Centre, METH_VARARGS | METH_KEYWORDS }, @@ -9111,11 +9632,12 @@ static PyMethodDef windowscMethods[] = { { "wxEvtHandler_GetNextHandler", (PyCFunction) _wrap_wxEvtHandler_GetNextHandler, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_SetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_SetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_GetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_GetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, + { "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_IsSilent", (PyCFunction) _wrap_wxValidator_IsSilent, METH_VARARGS | METH_KEYWORDS }, @@ -9128,10 +9650,7 @@ static PyMethodDef windowscMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_signed_long","_long",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -9140,10 +9659,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler}, { "_class_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler}, @@ -9160,99 +9676,49 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxEvtHandler","_wxPyValidator",SwigwxPyValidatorTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxValidator",SwigwxValidatorTowxEvtHandler}, { "_class_wxEvtHandler","_wxValidator",SwigwxValidatorTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxPen","_class_wxPen",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, { "_wxPanel","_class_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, { "_wxPanel","_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, { "_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel}, { "_wxPanel","_wxDialog",SwigwxDialogTowxPanel}, - { "_wxPanel","_class_wxPanel",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_class_wxValidator","_class_wxPyValidator",SwigwxPyValidatorTowxValidator}, { "_class_wxValidator","_wxPyValidator",SwigwxPyValidatorTowxValidator}, - { "_class_wxValidator","_wxValidator",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, { "_class_wxPanel","_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, { "_class_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel}, { "_class_wxPanel","_wxDialog",SwigwxDialogTowxPanel}, - { "_class_wxPanel","_wxPanel",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_wxMetaFileDC","_class_wxMetaFileDC",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxMenuBar",SwigwxMenuBarTowxWindow}, @@ -9263,45 +9729,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindow","_wxDialog",SwigwxDialogTowxWindow}, { "_class_wxWindow","_class_wxPanel",SwigwxPanelTowxWindow}, { "_class_wxWindow","_wxPanel",SwigwxPanelTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMetaFileDC","_wxMetaFileDC",0}, - { "_class_wxMenu","_wxMenu",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -9310,26 +9753,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxValidator","_class_wxPyValidator",SwigwxPyValidatorTowxValidator}, { "_wxValidator","_wxPyValidator",SwigwxPyValidatorTowxValidator}, - { "_wxValidator","_class_wxValidator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -9337,18 +9776,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, { "_wxEvtHandler","_class_wxMenuBar",SwigwxMenuBarTowxEvtHandler}, { "_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler}, { "_wxEvtHandler","_class_wxMenu",SwigwxMenuTowxEvtHandler}, @@ -9365,14 +9794,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_wxPyValidator",SwigwxPyValidatorTowxEvtHandler}, { "_wxEvtHandler","_class_wxValidator",SwigwxValidatorTowxEvtHandler}, { "_wxEvtHandler","_wxValidator",SwigwxValidatorTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, { "_wxWindow","_class_wxMenuBar",SwigwxMenuBarTowxWindow}, { "_wxWindow","_wxMenuBar",SwigwxMenuBarTowxWindow}, { "_wxWindow","_class_wxScrolledWindow",SwigwxScrolledWindowTowxWindow}, @@ -9381,7 +9802,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxDialog",SwigwxDialogTowxWindow}, { "_wxWindow","_class_wxPanel",SwigwxPanelTowxWindow}, { "_wxWindow","_wxPanel",SwigwxPanelTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, {0,0,0}}; static PyObject *SWIG_globals; diff --git a/utils/wxPython/src/msw/windows.py b/wxPython/src/gtk/windows.py similarity index 95% rename from utils/wxPython/src/msw/windows.py rename to wxPython/src/gtk/windows.py index 4a4df72ca7..892887e080 100644 --- a/utils/wxPython/src/msw/windows.py +++ b/wxPython/src/gtk/windows.py @@ -27,6 +27,9 @@ class wxEvtHandlerPtr : def ProcessEvent(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_ProcessEvent,(self,) + _args, _kwargs) return val + def AddPendingEvent(self, *_args, **_kwargs): + val = apply(windowsc.wxEvtHandler_AddPendingEvent,(self,) + _args, _kwargs) + return val def GetEvtHandlerEnabled(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_GetEvtHandlerEnabled,(self,) + _args, _kwargs) return val @@ -55,9 +58,13 @@ class wxEvtHandlerPtr : return val def __repr__(self): return "" % (self.this,) + + _prop_list_ = {} + class wxEvtHandler(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windowsc.new_wxEvtHandler,_args,_kwargs) + self.thisown = 1 @@ -103,7 +110,7 @@ class wxPyValidator(wxPyValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPyValidator,_args,_kwargs) self.thisown = 1 - self._setSelf(self, 0) + self._setSelf(self, wxPyValidator, 0) @@ -127,6 +134,12 @@ class wxWindowPtr(wxEvtHandlerPtr): def CenterOnParent(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_CenterOnParent,(self,) + _args, _kwargs) return val + def CentreOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CentreOnScreen,(self,) + _args, _kwargs) + return val + def CenterOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CenterOnScreen,(self,) + _args, _kwargs) + return val def ClientToScreenXY(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_ClientToScreenXY,(self,) + _args, _kwargs) return val @@ -143,9 +156,6 @@ class wxWindowPtr(wxEvtHandlerPtr): def DestroyChildren(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_DestroyChildren,(self,) + _args, _kwargs) return val - def DragAcceptFiles(self, *_args, **_kwargs): - val = apply(windowsc.wxWindow_DragAcceptFiles,(self,) + _args, _kwargs) - return val def Enable(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Enable,(self,) + _args, _kwargs) return val @@ -262,6 +272,12 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetWindowStyleFlag(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetWindowStyleFlag,(self,) + _args, _kwargs) return val + def SetWindowStyleFlag(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetWindowStyleFlag,(self,) + _args, _kwargs) + return val + def SetWindowStyle(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetWindowStyle,(self,) + _args, _kwargs) + return val def Hide(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Hide,(self,) + _args, _kwargs) return val @@ -396,6 +412,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetPosition(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetPosition,(self,) + _args, _kwargs) return val + def SetRect(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetRect,(self,) + _args, _kwargs) + return val def SetSizeHints(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizeHints,(self,) + _args, _kwargs) return val @@ -466,6 +485,10 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetSizer(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizer,(self,) + _args, _kwargs) return val + def GetSizer(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val def GetValidator(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetValidator,(self,) + _args, _kwargs) if val: val = wxValidatorPtr(val) @@ -494,18 +517,30 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - # replaces broken shadow method + # replaces broken shadow methods def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val + def GetSizer(self, *_args, **_kwargs): + from sizers import wxSizerPtr + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val + + def GetToolTip(self, *_args, **_kwargs): + from misc2 import wxToolTipPtr + val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) + if val: val = wxToolTipPtr(val) + return val + class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -537,7 +572,7 @@ class wxPanel(wxPanelPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPanel,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -588,7 +623,7 @@ class wxDialog(wxDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -649,8 +684,8 @@ class wxScrolledWindow(wxScrolledWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxScrolledWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) - wx._StdOnScrollCallbacks(self) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) @@ -951,11 +986,6 @@ def wxWindow_FindFocus(*_args, **_kwargs): if val: val = wxWindowPtr(val) return val -def wxWindow_FromHWND(*_args, **_kwargs): - val = apply(windowsc.wxWindow_FromHWND,_args,_kwargs) - if val: val = wxWindowPtr(val) - return val - wxWindow_NewControlId = windowsc.wxWindow_NewControlId wxWindow_NextControlId = windowsc.wxWindow_NextControlId diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp new file mode 100644 index 0000000000..01f1928fb8 --- /dev/null +++ b/wxPython/src/gtk/windows2.cpp @@ -0,0 +1,2030 @@ +/* + * FILE : src/gtk/windows2.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initwindows2c + +#define SWIG_name "windows2c" + +#include "helpers.h" +#ifdef OLD_GRID +#include +#endif +#include +#include +#ifdef __WXMSW__ +#include +#endif + + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; +#ifdef __cplusplus +extern "C" { +#endif +static void *SwigwxNotebookEventTowxNotifyEvent(void *ptr) { + wxNotebookEvent *src; + wxNotifyEvent *dest; + src = (wxNotebookEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + +static void *SwigwxNotebookEventTowxCommandEvent(void *ptr) { + wxNotebookEvent *src; + wxCommandEvent *dest; + src = (wxNotebookEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxNotebookEventTowxEvent(void *ptr) { + wxNotebookEvent *src; + wxEvent *dest; + src = (wxNotebookEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define wxNotebookEvent_GetSelection(_swigobj) (_swigobj->GetSelection()) +static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebookEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookEvent_GetSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetSelection. Expected _wxNotebookEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxNotebookEvent_GetSelection(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebookEvent_GetOldSelection(_swigobj) (_swigobj->GetOldSelection()) +static PyObject *_wrap_wxNotebookEvent_GetOldSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebookEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookEvent_GetOldSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_GetOldSelection. Expected _wxNotebookEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxNotebookEvent_GetOldSelection(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebookEvent_SetOldSelection(_swigobj,_swigarg0) (_swigobj->SetOldSelection(_swigarg0)) +static PyObject *_wrap_wxNotebookEvent_SetOldSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebookEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","page", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebookEvent_SetOldSelection",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_SetOldSelection. Expected _wxNotebookEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebookEvent_SetOldSelection(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebookEvent_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) +static PyObject *_wrap_wxNotebookEvent_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebookEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","page", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebookEvent_SetSelection",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookEvent_SetSelection. Expected _wxNotebookEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebookEvent_SetSelection(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxNotebookTowxControl(void *ptr) { + wxNotebook *src; + wxControl *dest; + src = (wxNotebook *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxNotebookTowxWindow(void *ptr) { + wxNotebook *src; + wxWindow *dest; + src = (wxNotebook *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxNotebookTowxEvtHandler(void *ptr) { + wxNotebook *src; + wxEvtHandler *dest; + src = (wxNotebook *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxNotebook(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + long _arg4 = (long ) 0; + char * _arg5 = (char *) "notebook"; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxNotebook",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxNotebook. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxNotebook_GetPageCount(_swigobj) (_swigobj->GetPageCount()) +static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetPageCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageCount. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxNotebook_GetPageCount(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebook * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","nPage", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_SetSelection",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetSelection. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxNotebook_SetSelection(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_AdvanceSelection(_swigobj,_swigarg0) (_swigobj->AdvanceSelection(_swigarg0)) +static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bForward", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxNotebook_AdvanceSelection",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AdvanceSelection. Expected _wxNotebook_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_AdvanceSelection(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_GetSelection(_swigobj) (_swigobj->GetSelection()) +static PyObject *_wrap_wxNotebook_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetSelection. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxNotebook_GetSelection(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_SetPageText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","nPage","strText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxNotebook_SetPageText",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageText. Expected _wxNotebook_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxNotebook_GetPageText(_swigobj,_swigarg0) (_swigobj->GetPageText(_swigarg0)) +static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxNotebook * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","nPage", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageText",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageText. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxNotebook_SetImageList(_swigobj,_swigarg0) (_swigobj->SetImageList(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxImageList * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","imageList", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetImageList",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetImageList. Expected _wxNotebook_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_SetImageList. Expected _wxImageList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetImageList(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_GetImageList(_swigobj) (_swigobj->GetImageList()) +static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImageList * _result; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetImageList",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetImageList. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxImageList *)wxNotebook_GetImageList(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxNotebook_GetPageImage(_swigobj,_swigarg0) (_swigobj->GetPageImage(_swigarg0)) +static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebook * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","nPage", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageImage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPageImage. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_SetPageImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetPageImage(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","nPage","nImage", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxNotebook_SetPageImage",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageImage. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_GetRowCount(_swigobj) (_swigobj->GetRowCount()) +static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_GetRowCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetRowCount. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxNotebook_GetRowCount(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_SetPageSize(_swigobj,_swigarg0) (_swigobj->SetPageSize(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPageSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageSize. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPageSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_SetPadding(_swigobj,_swigarg0) (_swigobj->SetPadding(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","padding", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPadding",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPadding. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPadding(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) +static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","nPage", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_DeletePage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeletePage. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_RemovePage(_swigobj,_swigarg0) (_swigobj->RemovePage(_swigarg0)) +static PyObject *_wrap_wxNotebook_RemovePage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","nPage", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_RemovePage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_RemovePage. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_DeleteAllPages(_swigobj) (_swigobj->DeleteAllPages()) +static PyObject *_wrap_wxNotebook_DeleteAllPages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_DeleteAllPages",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_DeleteAllPages. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_DeleteAllPages(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNotebook_AddPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->AddPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + wxWindow * _arg1; + wxString * _arg2; + int _arg3 = (int ) FALSE; + int _arg4 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","pPage","strText","bSelect","imageId", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:wxNotebook_AddPage",_kwnames,&_argo0,&_argo1,&_obj2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AddPage. Expected _wxNotebook_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxNotebook_AddPage. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxNotebook_InsertPage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->InsertPage(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxNotebook * _arg0; + int _arg1; + wxWindow * _arg2; + wxString * _arg3; + bool _arg4 = (bool ) FALSE; + int _arg5 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + PyObject * _obj3 = 0; + int tempbool4 = (int) FALSE; + char *_kwnames[] = { "self","nPage","pPage","strText","bSelect","imageId", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO|ii:wxNotebook_InsertPage",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&tempbool4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_InsertPage. Expected _wxNotebook_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxNotebook_InsertPage. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + _arg4 = (bool ) tempbool4; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) +static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxNotebook * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","nPage", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPage. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void wxNotebook_ResizeChildren(wxNotebook *self) { + wxSizeEvent evt(self->GetClientSize()); + self->GetEventHandler()->ProcessEvent(evt); + } +static PyObject *_wrap_wxNotebook_ResizeChildren(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_ResizeChildren",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_ResizeChildren. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_ResizeChildren(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxSplitterEventTowxCommandEvent(void *ptr) { + wxSplitterEvent *src; + wxCommandEvent *dest; + src = (wxSplitterEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxSplitterEventTowxEvent(void *ptr) { + wxSplitterEvent *src; + wxEvent *dest; + src = (wxSplitterEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define wxSplitterEvent_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) +static PyObject *_wrap_wxSplitterEvent_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetSashPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetSashPosition. Expected _wxSplitterEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterEvent_GetSashPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterEvent_GetX(_swigobj) (_swigobj->GetX()) +static PyObject *_wrap_wxSplitterEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetX. Expected _wxSplitterEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterEvent_GetX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterEvent_GetY(_swigobj) (_swigobj->GetY()) +static PyObject *_wrap_wxSplitterEvent_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetY. Expected _wxSplitterEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterEvent_GetY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterEvent_GetWindowBeingRemoved(_swigobj) (_swigobj->GetWindowBeingRemoved()) +static PyObject *_wrap_wxSplitterEvent_GetWindowBeingRemoved(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxSplitterEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterEvent_GetWindowBeingRemoved",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_GetWindowBeingRemoved. Expected _wxSplitterEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSplitterEvent_SetSashPosition(_swigobj,_swigarg0) (_swigobj->SetSashPosition(_swigarg0)) +static PyObject *_wrap_wxSplitterEvent_SetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterEvent_SetSashPosition",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterEvent_SetSashPosition. Expected _wxSplitterEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterEvent_SetSashPosition(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxSplitterWindowTowxWindow(void *ptr) { + wxSplitterWindow *src; + wxWindow *dest; + src = (wxSplitterWindow *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxSplitterWindowTowxEvtHandler(void *ptr) { + wxSplitterWindow *src; + wxEvtHandler *dest; + src = (wxSplitterWindow *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxSplitterWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxSplitterWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + long _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN; + char * _arg5 = (char *) "splitterWindow"; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","id","point","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSplitterWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSplitterWindow. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSplitterWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSplitterWindow_GetBorderSize(_swigobj) (_swigobj->GetBorderSize()) +static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetBorderSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetBorderSize. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterWindow_GetBorderSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_GetMinimumPaneSize(_swigobj) (_swigobj->GetMinimumPaneSize()) +static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetMinimumPaneSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetMinimumPaneSize. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_GetSashPosition(_swigobj) (_swigobj->GetSashPosition()) +static PyObject *_wrap_wxSplitterWindow_GetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashPosition. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterWindow_GetSashPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_GetSashSize(_swigobj) (_swigobj->GetSashSize()) +static PyObject *_wrap_wxSplitterWindow_GetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSashSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSashSize. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterWindow_GetSashSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_GetSplitMode(_swigobj) (_swigobj->GetSplitMode()) +static PyObject *_wrap_wxSplitterWindow_GetSplitMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetSplitMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetSplitMode. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSplitterWindow_GetSplitMode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_GetWindow1(_swigobj) (_swigobj->GetWindow1()) +static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow1",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow1. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSplitterWindow_GetWindow2(_swigobj) (_swigobj->GetWindow2()) +static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetWindow2",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetWindow2. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSplitterWindow_Initialize(_swigobj,_swigarg0) (_swigobj->Initialize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_Initialize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSplitterWindow_Initialize",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Initialize. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Initialize. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterWindow_Initialize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_IsSplit(_swigobj) (_swigobj->IsSplit()) +static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_IsSplit",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_IsSplit. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSplitterWindow_IsSplit(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_ReplaceWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReplaceWindow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + wxWindow * _arg1; + wxWindow * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","winOld","winNew", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxSplitterWindow_ReplaceWindow",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_ReplaceWindow. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_SetBorderSize(_swigobj,_swigarg0) (_swigobj->SetBorderSize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetBorderSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetBorderSize. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterWindow_SetBorderSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_SetSashPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSashPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + int _arg1; + int _arg2 = (int ) TRUE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","position","redraw", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxSplitterWindow_SetSashPosition",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashPosition. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_SetSashSize(_swigobj,_swigarg0) (_swigobj->SetSashSize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSashSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSashSize. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterWindow_SetSashSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_SetMinimumPaneSize(_swigobj,_swigarg0) (_swigobj->SetMinimumPaneSize(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetMinimumPaneSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","paneSize", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetMinimumPaneSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetMinimumPaneSize. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_SetSplitMode(_swigobj,_swigarg0) (_swigobj->SetSplitMode(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetSplitMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetSplitMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetSplitMode. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSplitterWindow_SetSplitMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_SplitHorizontally(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitHorizontally(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + wxWindow * _arg1; + wxWindow * _arg2; + int _arg3 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitHorizontally",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitHorizontally. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitHorizontally. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_SplitVertically(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SplitVertically(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSplitterWindow_SplitVertically(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + wxWindow * _arg1; + wxWindow * _arg2; + int _arg3 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","window1","window2","sashPosition", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxSplitterWindow_SplitVertically",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SplitVertically. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_SplitVertically. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_Unsplit(_swigobj,_swigarg0) (_swigobj->Unsplit(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_Unsplit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","toRemove", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxSplitterWindow_Unsplit",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_Unsplit. Expected _wxSplitterWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_Unsplit. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyMethodDef windows2cMethods[] = { + { "wxSplitterWindow_Unsplit", (PyCFunction) _wrap_wxSplitterWindow_Unsplit, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SplitVertically", (PyCFunction) _wrap_wxSplitterWindow_SplitVertically, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SplitHorizontally", (PyCFunction) _wrap_wxSplitterWindow_SplitHorizontally, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_SetSplitMode, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_SetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetSashSize", (PyCFunction) _wrap_wxSplitterWindow_SetSashSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_SetSashPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_SetBorderSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_ReplaceWindow", (PyCFunction) _wrap_wxSplitterWindow_ReplaceWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_IsSplit", (PyCFunction) _wrap_wxSplitterWindow_IsSplit, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_Initialize", (PyCFunction) _wrap_wxSplitterWindow_Initialize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetWindow2", (PyCFunction) _wrap_wxSplitterWindow_GetWindow2, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetWindow1", (PyCFunction) _wrap_wxSplitterWindow_GetWindow1, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetSplitMode", (PyCFunction) _wrap_wxSplitterWindow_GetSplitMode, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetSashSize", (PyCFunction) _wrap_wxSplitterWindow_GetSashSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_GetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_GetBorderSize, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSplitterWindow", (PyCFunction) _wrap_new_wxSplitterWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterEvent_SetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_SetSashPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterEvent_GetWindowBeingRemoved", (PyCFunction) _wrap_wxSplitterEvent_GetWindowBeingRemoved, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterEvent_GetY", (PyCFunction) _wrap_wxSplitterEvent_GetY, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterEvent_GetX", (PyCFunction) _wrap_wxSplitterEvent_GetX, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterEvent_GetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_ResizeChildren", (PyCFunction) _wrap_wxNotebook_ResizeChildren, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetPage", (PyCFunction) _wrap_wxNotebook_GetPage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_InsertPage", (PyCFunction) _wrap_wxNotebook_InsertPage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_AddPage", (PyCFunction) _wrap_wxNotebook_AddPage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_DeleteAllPages", (PyCFunction) _wrap_wxNotebook_DeleteAllPages, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_RemovePage", (PyCFunction) _wrap_wxNotebook_RemovePage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_DeletePage", (PyCFunction) _wrap_wxNotebook_DeletePage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPadding", (PyCFunction) _wrap_wxNotebook_SetPadding, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPageSize", (PyCFunction) _wrap_wxNotebook_SetPageSize, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetRowCount", (PyCFunction) _wrap_wxNotebook_GetRowCount, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPageImage", (PyCFunction) _wrap_wxNotebook_SetPageImage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetPageImage", (PyCFunction) _wrap_wxNotebook_GetPageImage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetImageList", (PyCFunction) _wrap_wxNotebook_GetImageList, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetImageList", (PyCFunction) _wrap_wxNotebook_SetImageList, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetPageText", (PyCFunction) _wrap_wxNotebook_GetPageText, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPageText", (PyCFunction) _wrap_wxNotebook_SetPageText, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetSelection", (PyCFunction) _wrap_wxNotebook_GetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_AdvanceSelection", (PyCFunction) _wrap_wxNotebook_AdvanceSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetSelection", (PyCFunction) _wrap_wxNotebook_SetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetPageCount", (PyCFunction) _wrap_wxNotebook_GetPageCount, METH_VARARGS | METH_KEYWORDS }, + { "new_wxNotebook", (PyCFunction) _wrap_new_wxNotebook, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookEvent_SetSelection", (PyCFunction) _wrap_wxNotebookEvent_SetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookEvent_SetOldSelection", (PyCFunction) _wrap_wxNotebookEvent_SetOldSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookEvent_GetOldSelection", (PyCFunction) _wrap_wxNotebookEvent_GetOldSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookEvent_GetSelection", (PyCFunction) _wrap_wxNotebookEvent_GetSelection, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, + { "_wxEvent","_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, + { "_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, + { "_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxEvtHandler","_class_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, + { "_class_wxEvtHandler","_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, + { "_class_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler}, + { "_class_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler}, + { "_wxNotifyEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_class_wxEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, + { "_class_wxEvent","_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, + { "_class_wxEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, + { "_class_wxEvent","_wxNotebookEvent",SwigwxNotebookEventTowxEvent}, + { "_wxCommandEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, + { "_wxCommandEvent","_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, + { "_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, + { "_char","_wxChar",0}, + { "_class_wxNotifyEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxNotebookEvent",SwigwxNotebookEventTowxNotifyEvent}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, + { "_class_wxWindow","_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, + { "_class_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow}, + { "_class_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl}, + { "_wxControl","_wxNotebook",SwigwxNotebookTowxControl}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxControl","_class_wxNotebook",SwigwxNotebookTowxControl}, + { "_class_wxControl","_wxNotebook",SwigwxNotebookTowxControl}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_class_wxCommandEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent}, + { "_wxEvtHandler","_class_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, + { "_wxEvtHandler","_wxSplitterWindow",SwigwxSplitterWindowTowxEvtHandler}, + { "_wxEvtHandler","_class_wxNotebook",SwigwxNotebookTowxEvtHandler}, + { "_wxEvtHandler","_wxNotebook",SwigwxNotebookTowxEvtHandler}, + { "_wxWindow","_class_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, + { "_wxWindow","_wxSplitterWindow",SwigwxSplitterWindowTowxWindow}, + { "_wxWindow","_class_wxNotebook",SwigwxNotebookTowxWindow}, + { "_wxWindow","_wxNotebook",SwigwxNotebookTowxWindow}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initwindows2c() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("windows2c", windows2cMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxSPLIT_HORIZONTAL", PyInt_FromLong((long) wxSPLIT_HORIZONTAL)); + PyDict_SetItemString(d,"wxSPLIT_VERTICAL", PyInt_FromLong((long) wxSPLIT_VERTICAL)); + PyDict_SetItemString(d,"wxSPLIT_DRAG_NONE", PyInt_FromLong((long) wxSPLIT_DRAG_NONE)); + PyDict_SetItemString(d,"wxSPLIT_DRAG_DRAGGING", PyInt_FromLong((long) wxSPLIT_DRAG_DRAGGING)); + PyDict_SetItemString(d,"wxSPLIT_DRAG_LEFT_DOWN", PyInt_FromLong((long) wxSPLIT_DRAG_LEFT_DOWN)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/gtk/windows2.py b/wxPython/src/gtk/windows2.py new file mode 100644 index 0000000000..9a14207ce9 --- /dev/null +++ b/wxPython/src/gtk/windows2.py @@ -0,0 +1,230 @@ +# This file was created automatically by SWIG. +import windows2c + +from misc import * + +from gdi import * + +from windows import * + +from clip_dnd import * + +from controls import * + +from events import * +import wx +class wxNotebookEventPtr(wxNotifyEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetSelection(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebookEvent_GetSelection,(self,) + _args, _kwargs) + return val + def GetOldSelection(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebookEvent_GetOldSelection,(self,) + _args, _kwargs) + return val + def SetOldSelection(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebookEvent_SetOldSelection,(self,) + _args, _kwargs) + return val + def SetSelection(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebookEvent_SetSelection,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxNotebookEvent(wxNotebookEventPtr): + def __init__(self,this): + self.this = this + + + + +class wxNotebookPtr(wxControlPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPageCount(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_GetPageCount,(self,) + _args, _kwargs) + return val + def SetSelection(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetSelection,(self,) + _args, _kwargs) + return val + def AdvanceSelection(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_AdvanceSelection,(self,) + _args, _kwargs) + return val + def GetSelection(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_GetSelection,(self,) + _args, _kwargs) + return val + def SetPageText(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPageText,(self,) + _args, _kwargs) + return val + def GetPageText(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_GetPageText,(self,) + _args, _kwargs) + return val + def SetImageList(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetImageList,(self,) + _args, _kwargs) + return val + def GetImageList(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_GetImageList,(self,) + _args, _kwargs) + if val: val = wxImageListPtr(val) + return val + def GetPageImage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_GetPageImage,(self,) + _args, _kwargs) + return val + def SetPageImage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPageImage,(self,) + _args, _kwargs) + return val + def GetRowCount(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_GetRowCount,(self,) + _args, _kwargs) + return val + def SetPageSize(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPageSize,(self,) + _args, _kwargs) + return val + def SetPadding(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPadding,(self,) + _args, _kwargs) + return val + def DeletePage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_DeletePage,(self,) + _args, _kwargs) + return val + def RemovePage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_RemovePage,(self,) + _args, _kwargs) + return val + def DeleteAllPages(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_DeleteAllPages,(self,) + _args, _kwargs) + return val + def AddPage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_AddPage,(self,) + _args, _kwargs) + return val + def InsertPage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_InsertPage,(self,) + _args, _kwargs) + return val + def GetPage(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_GetPage,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def ResizeChildren(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_ResizeChildren,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxNotebook(wxNotebookPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(windows2c.new_wxNotebook,_args,_kwargs) + self.thisown = 1 + #wx._StdWindowCallbacks(self) + + + + +class wxSplitterEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetSashPosition(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterEvent_GetSashPosition,(self,) + _args, _kwargs) + return val + def GetX(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterEvent_GetX,(self,) + _args, _kwargs) + return val + def GetY(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterEvent_GetY,(self,) + _args, _kwargs) + return val + def GetWindowBeingRemoved(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterEvent_GetWindowBeingRemoved,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def SetSashPosition(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterEvent_SetSashPosition,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxSplitterEvent(wxSplitterEventPtr): + def __init__(self,this): + self.this = this + + + + +class wxSplitterWindowPtr(wxWindowPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetBorderSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetBorderSize,(self,) + _args, _kwargs) + return val + def GetMinimumPaneSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetMinimumPaneSize,(self,) + _args, _kwargs) + return val + def GetSashPosition(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetSashPosition,(self,) + _args, _kwargs) + return val + def GetSashSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetSashSize,(self,) + _args, _kwargs) + return val + def GetSplitMode(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetSplitMode,(self,) + _args, _kwargs) + return val + def GetWindow1(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetWindow1,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def GetWindow2(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetWindow2,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def Initialize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_Initialize,(self,) + _args, _kwargs) + return val + def IsSplit(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs) + return val + def ReplaceWindow(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs) + return val + def SetBorderSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs) + return val + def SetSashPosition(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetSashPosition,(self,) + _args, _kwargs) + return val + def SetSashSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetSashSize,(self,) + _args, _kwargs) + return val + def SetMinimumPaneSize(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetMinimumPaneSize,(self,) + _args, _kwargs) + return val + def SetSplitMode(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetSplitMode,(self,) + _args, _kwargs) + return val + def SplitHorizontally(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SplitHorizontally,(self,) + _args, _kwargs) + return val + def SplitVertically(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SplitVertically,(self,) + _args, _kwargs) + return val + def Unsplit(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_Unsplit,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxSplitterWindow(wxSplitterWindowPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(windows2c.new_wxSplitterWindow,_args,_kwargs) + self.thisown = 1 + #wx._StdWindowCallbacks(self) + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxSPLIT_HORIZONTAL = windows2c.wxSPLIT_HORIZONTAL +wxSPLIT_VERTICAL = windows2c.wxSPLIT_VERTICAL +wxSPLIT_DRAG_NONE = windows2c.wxSPLIT_DRAG_NONE +wxSPLIT_DRAG_DRAGGING = windows2c.wxSPLIT_DRAG_DRAGGING +wxSPLIT_DRAG_LEFT_DOWN = windows2c.wxSPLIT_DRAG_LEFT_DOWN diff --git a/utils/wxPython/src/gtk/windows3.cpp b/wxPython/src/gtk/windows3.cpp similarity index 83% rename from utils/wxPython/src/gtk/windows3.cpp rename to wxPython/src/gtk/windows3.cpp index 41041fc87b..d26119fadd 100644 --- a/utils/wxPython/src/gtk/windows3.cpp +++ b/wxPython/src/gtk/windows3.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/windows3.cpp + * FILE : src/gtk/windows3.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,48 +59,28 @@ extern PyObject *SWIG_newvarlink(void); #include #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -320,8 +302,8 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject wxSashWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); char * _arg5 = (char *) "sashWindow"; PyObject * _argo0 = 0; @@ -1294,8 +1276,8 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py wxSashLayoutWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); char * _arg5 = (char *) "layoutWindow"; PyObject * _argo0 = 0; @@ -1734,20 +1716,13 @@ static PyMethodDef windows3cMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_wxEvent","_class_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxEvent}, { "_wxEvent","_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxEvent}, { "_wxEvent","_class_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxEvent}, { "_wxEvent","_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxEvent}, { "_wxEvent","_class_wxSashEvent",SwigwxSashEventTowxEvent}, { "_wxEvent","_wxSashEvent",SwigwxSashEventTowxEvent}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1756,299 +1731,100 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_class_wxEvtHandler","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxSashWindow",SwigwxSashWindowTowxEvtHandler}, { "_class_wxEvtHandler","_wxSashWindow",SwigwxSashWindowTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxGrid","_class_wxGrid",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, { "_wxSashWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, { "_wxSashWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxGrid","_wxGrid",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_class_wxSashWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, { "_class_wxSashWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxSashWindow}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, + { "_wxChar","_char",0}, { "_class_wxEvent","_class_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxEvent}, { "_class_wxEvent","_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxEvent}, { "_class_wxEvent","_class_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxEvent}, { "_class_wxEvent","_wxQueryLayoutInfoEvent",SwigwxQueryLayoutInfoEventTowxEvent}, { "_class_wxEvent","_class_wxSashEvent",SwigwxSashEventTowxEvent}, { "_class_wxEvent","_wxSashEvent",SwigwxSashEventTowxEvent}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxGridEvent","_class_wxGridEvent",0}, - { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent}, { "_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_class_wxWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_class_wxWindow","_class_wxSashWindow",SwigwxSashWindowTowxWindow}, { "_class_wxWindow","_wxSashWindow",SwigwxSashWindowTowxWindow}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_wxGridCell","_class_wxGridCell",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxPen","_wxPen",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -2056,56 +1832,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxGridEvent","_wxGridEvent",0}, { "_class_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxGridCell","_wxGridCell",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, { "_wxEvtHandler","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_wxEvtHandler","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxEvtHandler}, { "_wxEvtHandler","_class_wxSashWindow",SwigwxSashWindowTowxEvtHandler}, { "_wxEvtHandler","_wxSashWindow",SwigwxSashWindowTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, { "_wxWindow","_class_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_wxWindow","_wxSashLayoutWindow",SwigwxSashLayoutWindowTowxWindow}, { "_wxWindow","_class_wxSashWindow",SwigwxSashWindowTowxWindow}, { "_wxWindow","_wxSashWindow",SwigwxSashWindowTowxWindow}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; @@ -2124,6 +1862,9 @@ SWIGEXPORT(void) initwindows3c() { PyDict_SetItemString(d,"wxSASH_NONE", PyInt_FromLong((long) wxSASH_NONE)); PyDict_SetItemString(d,"wxEVT_SASH_DRAGGED", PyInt_FromLong((long) wxEVT_SASH_DRAGGED)); PyDict_SetItemString(d,"wxSW_3D", PyInt_FromLong((long) wxSW_3D)); + PyDict_SetItemString(d,"wxSW_3DSASH", PyInt_FromLong((long) wxSW_3DSASH)); + PyDict_SetItemString(d,"wxSW_3DBORDER", PyInt_FromLong((long) wxSW_3DBORDER)); + PyDict_SetItemString(d,"wxSW_BORDER", PyInt_FromLong((long) wxSW_BORDER)); PyDict_SetItemString(d,"wxSASH_STATUS_OK", PyInt_FromLong((long) wxSASH_STATUS_OK)); PyDict_SetItemString(d,"wxSASH_STATUS_OUT_OF_RANGE", PyInt_FromLong((long) wxSASH_STATUS_OUT_OF_RANGE)); PyDict_SetItemString(d,"wxLAYOUT_HORIZONTAL", PyInt_FromLong((long) wxLAYOUT_HORIZONTAL)); diff --git a/utils/wxPython/src/gtk/windows3.py b/wxPython/src/gtk/windows3.py similarity index 96% rename from utils/wxPython/src/gtk/windows3.py rename to wxPython/src/gtk/windows3.py index bd38484999..7a6fd3ac16 100644 --- a/utils/wxPython/src/gtk/windows3.py +++ b/wxPython/src/gtk/windows3.py @@ -114,7 +114,7 @@ class wxSashWindow(wxSashWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -214,9 +214,9 @@ class wxSashLayoutWindow(wxSashLayoutWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashLayoutWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) - wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT) - wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO) + #wx._StdWindowCallbacks(self) + #wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT) + #wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO) @@ -262,6 +262,9 @@ wxSASH_LEFT = windows3c.wxSASH_LEFT wxSASH_NONE = windows3c.wxSASH_NONE wxEVT_SASH_DRAGGED = windows3c.wxEVT_SASH_DRAGGED wxSW_3D = windows3c.wxSW_3D +wxSW_3DSASH = windows3c.wxSW_3DSASH +wxSW_3DBORDER = windows3c.wxSW_3DBORDER +wxSW_BORDER = windows3c.wxSW_BORDER wxSASH_STATUS_OK = windows3c.wxSASH_STATUS_OK wxSASH_STATUS_OUT_OF_RANGE = windows3c.wxSASH_STATUS_OUT_OF_RANGE wxLAYOUT_HORIZONTAL = windows3c.wxLAYOUT_HORIZONTAL diff --git a/utils/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp similarity index 84% rename from utils/wxPython/src/gtk/wx.cpp rename to wxPython/src/gtk/wx.cpp index 7fed8ba839..a356250b10 100644 --- a/utils/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/wx.cpp + * FILE : src/gtk/wx.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -55,48 +57,28 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - PyObject* o3; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -614,10 +596,16 @@ PyObject *ptrfree(PyObject *_PTRVALUE) { } + wxPyApp* wxGetApp() { + return wxPythonApp; + } + void wxApp_CleanUp() { __wxCleanup(); } + + extern "C" SWIGEXPORT(void) initwindowsc(); extern "C" SWIGEXPORT(void) initwindows2c(); extern "C" SWIGEXPORT(void) initeventsc(); @@ -635,6 +623,49 @@ extern "C" SWIGEXPORT(void) initimagec(); extern "C" SWIGEXPORT(void) initprintfwc(); extern "C" SWIGEXPORT(void) initsizersc(); extern "C" SWIGEXPORT(void) initclip_dndc(); +extern "C" SWIGEXPORT(void) initstreamsc(); +extern "C" SWIGEXPORT(void) initfilesysc(); + + + +// Export a C API in a struct. Other modules will be able to load this from +// the wxc module and will then have safe access to these functions, even if +// in another shared library. +static wxPyCoreAPI API = { + SWIG_MakePtr, + SWIG_GetPtr, + SWIG_GetPtrObj, + SWIG_RegisterMapping, + SWIG_addvarlink, + SWIG_newvarlink, + + wxPySaveThread, + wxPyRestoreThread, + wxPyConstructObject, + wxPy_ConvertList, + + byte_LIST_helper, + int_LIST_helper, + long_LIST_helper, + string_LIST_helper, + wxPoint_LIST_helper, + wxBitmap_LIST_helper, + wxString_LIST_helper, + wxAcceleratorEntry_LIST_helper, + + wxSize_helper, + wxPoint_helper, + wxRealPoint_helper, + wxRect_helper, + wxColour_helper, + + wxPyCBH_setSelf, + wxPyCBH_findCallback, + wxPyCBH_callCallback, + wxPyCBH_callCallbackObj, + wxPyCBH_delete, +}; + #ifdef __cplusplus extern "C" { #endif @@ -815,52 +846,60 @@ static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static int _wrap_wxPyDefaultPosition_set(PyObject *val) { - wxPoint * temp; +static int _wrap_wxDefaultPosition_set(PyObject *val) { - if (val) { - if (val == Py_None) { temp = NULL; } - else if (SWIG_GetPtrObj(val,(void **) &temp,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in value of wxPyDefaultPosition. Expected _wxPoint_p."); - return 1; - } - } - wxPyDefaultPosition = *temp; - return 0; + PyErr_SetString(PyExc_TypeError,"Variable wxDefaultPosition is read-only."); + return 1; } -static PyObject *_wrap_wxPyDefaultPosition_get() { +static PyObject *_wrap_wxDefaultPosition_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultPosition,"_wxPoint_p"); + SWIG_MakePtr(ptemp,(char *) &wxDefaultPosition,"_wxPoint_p"); pyobj = PyString_FromString(ptemp); return pyobj; } -static int _wrap_wxPyDefaultSize_set(PyObject *val) { - wxSize * temp; +static int _wrap_wxDefaultSize_set(PyObject *val) { - if (val) { - if (val == Py_None) { temp = NULL; } - else if (SWIG_GetPtrObj(val,(void **) &temp,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in value of wxPyDefaultSize. Expected _wxSize_p."); - return 1; - } - } - wxPyDefaultSize = *temp; - return 0; + PyErr_SetString(PyExc_TypeError,"Variable wxDefaultSize is read-only."); + return 1; } -static PyObject *_wrap_wxPyDefaultSize_get() { +static PyObject *_wrap_wxDefaultSize_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultSize,"_wxSize_p"); + SWIG_MakePtr(ptemp,(char *) &wxDefaultSize,"_wxSize_p"); pyobj = PyString_FromString(ptemp); return pyobj; } +static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetApp",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyApp *)wxGetApp(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxApp_CleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; char *_kwnames[] = { NULL }; @@ -1126,6 +1165,33 @@ static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxPyApp_GetUseBestVisual(_swigobj) (_swigobj->GetUseBestVisual()) +static PyObject *_wrap_wxPyApp_GetUseBestVisual(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyApp * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyApp_GetUseBestVisual",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetUseBestVisual. Expected _wxPyApp_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyApp_GetUseBestVisual(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPyApp_Dispatch(_swigobj) (_swigobj->Dispatch()) static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1308,11 +1374,22 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1348,11 +1425,22 @@ static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1482,11 +1570,22 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1502,6 +1601,36 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxPyApp_SetUseBestVisual(_swigobj,_swigarg0) (_swigobj->SetUseBestVisual(_swigarg0)) +static PyObject *_wrap_wxPyApp_SetUseBestVisual(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","flag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyApp_SetUseBestVisual",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetUseBestVisual. Expected _wxPyApp_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyApp_SetUseBestVisual(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxPyApp_GetStdIcon(_swigobj,_swigarg0) (_swigobj->GetStdIcon(_swigarg0)) static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1534,6 +1663,7 @@ static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObje static PyMethodDef wxcMethods[] = { { "wxPyApp_GetStdIcon", (PyCFunction) _wrap_wxPyApp_GetStdIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetUseBestVisual", (PyCFunction) _wrap_wxPyApp_SetUseBestVisual, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetVendorName", (PyCFunction) _wrap_wxPyApp_SetVendorName, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetTopWindow", (PyCFunction) _wrap_wxPyApp_SetTopWindow, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetPrintMode", (PyCFunction) _wrap_wxPyApp_SetPrintMode, METH_VARARGS | METH_KEYWORDS }, @@ -1546,6 +1676,7 @@ static PyMethodDef wxcMethods[] = { { "wxPyApp_Initialized", (PyCFunction) _wrap_wxPyApp_Initialized, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_ExitMainLoop", (PyCFunction) _wrap_wxPyApp_ExitMainLoop, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_Dispatch", (PyCFunction) _wrap_wxPyApp_Dispatch, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetUseBestVisual", (PyCFunction) _wrap_wxPyApp_GetUseBestVisual, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetVendorName", (PyCFunction) _wrap_wxPyApp_GetVendorName, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetTopWindow", (PyCFunction) _wrap_wxPyApp_GetTopWindow, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetPrintMode", (PyCFunction) _wrap_wxPyApp_GetPrintMode, METH_VARARGS | METH_KEYWORDS }, @@ -1555,6 +1686,7 @@ static PyMethodDef wxcMethods[] = { { "delete_wxPyApp", (PyCFunction) _wrap_delete_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyApp", (PyCFunction) _wrap_new_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "wxApp_CleanUp", (PyCFunction) _wrap_wxApp_CleanUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGetApp", (PyCFunction) _wrap_wxGetApp, METH_VARARGS | METH_KEYWORDS }, { "_wxSetDictionary", (PyCFunction) __wxSetDictionary, METH_VARARGS | METH_KEYWORDS }, { "_wxStart", (PyCFunction) __wxStart, METH_VARARGS | METH_KEYWORDS }, { "ptrmap", (PyCFunction) _wrap_ptrmap, METH_VARARGS | METH_KEYWORDS }, @@ -1573,17 +1705,7 @@ static PyMethodDef wxcMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, - { "_wxEvent","_class_wxEvent",0}, - { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, - { "_wxMenuEvent","_class_wxMenuEvent",0}, - { "_class_wxJPEGHandler","_wxJPEGHandler",0}, - { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, - { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, - { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, - { "_wxBMPHandler","_class_wxBMPHandler",0}, - { "_wxImage","_class_wxImage",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1592,353 +1714,88 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, - { "_class_wxCustomDataObject","_wxCustomDataObject",0}, - { "_wxFontData","_class_wxFontData",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, - { "_class_wxMenuBar","_wxMenuBar",0}, - { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler}, { "_class_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler}, - { "_class_wxEvtHandler","_wxEvtHandler",0}, - { "_wxPaintEvent","_class_wxPaintEvent",0}, - { "_wxGIFHandler","_class_wxGIFHandler",0}, - { "_wxPySizer","_class_wxPySizer",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, - { "_wxCursor","_class_wxCursor",0}, - { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_wxImageHandler","_class_wxImageHandler",0}, - { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, - { "_wxMask","_class_wxMask",0}, - { "_wxToolTip","_class_wxToolTip",0}, - { "_wxGrid","_class_wxGrid",0}, - { "_wxPNGHandler","_class_wxPNGHandler",0}, - { "_class_wxColourData","_wxColourData",0}, - { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0}, - { "_wxPrinter","_class_wxPrinter",0}, - { "_wxPen","_class_wxPen",0}, - { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, - { "_wxDataObject","_class_wxDataObject",0}, - { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, - { "_wxStaticBox","_class_wxStaticBox",0}, - { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, - { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_wxChoice","_class_wxChoice",0}, - { "_wxSlider","_class_wxSlider",0}, - { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_wxPyPrintout","_class_wxPyPrintout",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_wxImageList","_class_wxImageList",0}, - { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, - { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, - { "_wxBitmapButton","_class_wxBitmapButton",0}, - { "_wxSashWindow","_class_wxSashWindow",0}, - { "_class_wxSizer","_wxSizer",0}, - { "_class_wxTIFFHandler","_wxTIFFHandler",0}, - { "_class_wxPrintDialogData","_wxPrintDialogData",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, - { "_class_wxClipboard","_wxClipboard",0}, - { "_class_wxGauge","_wxGauge",0}, - { "_class_wxSashEvent","_wxSashEvent",0}, - { "_wxDC","_class_wxDC",0}, - { "_wxSizerItem","_class_wxSizerItem",0}, - { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, - { "_wxListEvent","_class_wxListEvent",0}, - { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, - { "_wxProgressDialog","_class_wxProgressDialog",0}, - { "_class_wxBMPHandler","_wxBMPHandler",0}, - { "_wxPrintPreview","_class_wxPrintPreview",0}, - { "_wxSpinEvent","_class_wxSpinEvent",0}, - { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, - { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPaintEvent","_wxPaintEvent",0}, - { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxStatusBar","_wxStatusBar",0}, - { "_class_wxGIFHandler","_wxGIFHandler",0}, - { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, - { "_wxPanel","_class_wxPanel",0}, - { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, - { "_wxCheckBox","_class_wxCheckBox",0}, - { "_wxPyEvent","_class_wxPyEvent",0}, - { "_wxTextCtrl","_class_wxTextCtrl",0}, - { "_class_wxMask","_wxMask",0}, - { "_wxTextDataObject","_class_wxTextDataObject",0}, - { "_class_wxKeyEvent","_wxKeyEvent",0}, - { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxGrid","_wxGrid",0}, - { "_class_wxPNGHandler","_wxPNGHandler",0}, - { "_wxColour","_class_wxColour",0}, - { "_class_wxDialog","_wxDialog",0}, - { "_wxBusyCursor","_class_wxBusyCursor",0}, - { "_wxPageSetupDialog","_class_wxPageSetupDialog",0}, - { "_class_wxPrinter","_wxPrinter",0}, - { "_class_wxFileDataObject","_wxFileDataObject",0}, - { "_wxIdleEvent","_class_wxIdleEvent",0}, - { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, - { "_wxToolBar","_class_wxToolBar",0}, - { "_class_wxDataObject","_wxDataObject",0}, - { "_wxCaret","_class_wxCaret",0}, - { "_wxStaticLine","_class_wxStaticLine",0}, - { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0}, - { "_wxBrush","_class_wxBrush",0}, - { "_wxMiniFrame","_class_wxMiniFrame",0}, - { "_class_wxNotebookEvent","_wxNotebookEvent",0}, - { "_class_wxPyPrintout","_wxPyPrintout",0}, - { "_wxDataFormat","_class_wxDataFormat",0}, - { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, - { "_class_wxSashWindow","_wxSashWindow",0}, - { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, - { "_wxPyValidator","_class_wxPyValidator",0}, - { "_class_wxEvent","_wxEvent",0}, - { "_wxCheckListBox","_class_wxCheckListBox",0}, - { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxGridEvent","_class_wxGridEvent",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxCommandEvent","_class_wxCommandEvent",0}, - { "_wxSizeEvent","_class_wxSizeEvent",0}, - { "_class_wxImage","_wxImage",0}, - { "_wxPoint","_class_wxPoint",0}, - { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, - { "_class_wxButton","_wxButton",0}, - { "_wxRadioBox","_class_wxRadioBox",0}, - { "_class_wxFontData","_wxFontData",0}, - { "_class_wxPNMHandler","_wxPNMHandler",0}, - { "_wxBoxSizer","_class_wxBoxSizer",0}, - { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, - { "_wxWindowDC","_class_wxWindowDC",0}, - { "_wxScrollBar","_class_wxScrollBar",0}, - { "_wxSpinButton","_class_wxSpinButton",0}, - { "_wxColourDialog","_class_wxColourDialog",0}, - { "_wxPrintData","_class_wxPrintData",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, - { "_class_wxNotifyEvent","_wxNotifyEvent",0}, - { "_wxMessageDialog","_class_wxMessageDialog",0}, - { "_class_wxValidator","_wxValidator",0}, - { "_class_wxPyEvent","_wxPyEvent",0}, - { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, - { "_class_wxIconizeEvent","_wxIconizeEvent",0}, - { "_class_wxStaticBitmap","_wxStaticBitmap",0}, - { "_class_wxBusyCursor","_wxBusyCursor",0}, - { "_wxToolBarSimple","_class_wxToolBarSimple",0}, - { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, - { "_wxListItem","_class_wxListItem",0}, - { "_class_wxToolBar","_wxToolBar",0}, - { "_wxDropTarget","_class_wxDropTarget",0}, - { "_class_wxStaticLine","_wxStaticLine",0}, - { "_wxScrollEvent","_class_wxScrollEvent",0}, - { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, - { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, - { "_class_wxDataFormat","_wxDataFormat",0}, - { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, - { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, - { "_class_wxPreviewFrame","_wxPreviewFrame",0}, - { "_wxStaticText","_class_wxStaticText",0}, - { "_wxFont","_class_wxFont",0}, - { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_class_wxSplitterEvent","_wxSplitterEvent",0}, - { "_wxNotebook","_class_wxNotebook",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_class_wxDC","_wxDC",0}, - { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, - { "_class_wxProgressDialog","_wxProgressDialog",0}, - { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, - { "_wxPyApp","_class_wxPyApp",0}, - { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, - { "_wxFocusEvent","_class_wxFocusEvent",0}, - { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, - { "_class_wxSpinButton","_wxSpinButton",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, - { "_class_wxPanel","_wxPanel",0}, - { "_class_wxCheckBox","_wxCheckBox",0}, - { "_wxComboBox","_class_wxComboBox",0}, - { "_wxRadioButton","_class_wxRadioButton",0}, - { "_class_wxMessageDialog","_wxMessageDialog",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_class_wxTextCtrl","_wxTextCtrl",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, - { "_class_wxTextDataObject","_wxTextDataObject",0}, - { "_wxMenu","_class_wxMenu",0}, - { "_class_wxMoveEvent","_wxMoveEvent",0}, - { "_wxListBox","_class_wxListBox",0}, - { "_wxScreenDC","_class_wxScreenDC",0}, - { "_class_wxToolBarSimple","_wxToolBarSimple",0}, - { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, - { "_wxFileDialog","_class_wxFileDialog",0}, - { "_class_wxDropTarget","_wxDropTarget",0}, - { "_class_wxCaret","_wxCaret",0}, - { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, - { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_wxWindow",0}, - { "_wxSplitterWindow","_class_wxSplitterWindow",0}, - { "_class_wxStaticText","_wxStaticText",0}, - { "_wxPrintDialogData","_class_wxPrintDialogData",0}, - { "_class_wxFont","_wxFont",0}, - { "_wxClipboard","_class_wxClipboard",0}, - { "_class_wxPyValidator","_wxPyValidator",0}, - { "_class_wxCloseEvent","_wxCloseEvent",0}, - { "_wxSashEvent","_class_wxSashEvent",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxMenuEvent","_wxMenuEvent",0}, - { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, - { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, - { "_wxClientDC","_class_wxClientDC",0}, - { "_wxMouseEvent","_class_wxMouseEvent",0}, - { "_wxListCtrl","_class_wxListCtrl",0}, - { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, - { "_class_wxRadioBox","_wxRadioBox",0}, - { "_wxGridCell","_class_wxGridCell",0}, - { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_wxMemoryDC","_class_wxMemoryDC",0}, - { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, - { "_class_wxPrintDialog","_wxPrintDialog",0}, - { "_wxPaintDC","_class_wxPaintDC",0}, - { "_class_wxWindowDC","_wxWindowDC",0}, - { "_class_wxFocusEvent","_wxFocusEvent",0}, - { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, - { "_wxStatusBar","_class_wxStatusBar",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, - { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, - { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, - { "_class_wxImageHandler","_wxImageHandler",0}, - { "_wxScrolledWindow","_class_wxScrolledWindow",0}, - { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, - { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxControl",0}, - { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, - { "_wxIcon","_class_wxIcon",0}, - { "_wxDialog","_class_wxDialog",0}, - { "_class_wxListItem","_wxListItem",0}, - { "_class_wxPen","_wxPen",0}, - { "_class_wxFileDialog","_wxFileDialog",0}, - { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, - { "_class_wxStaticBox","_wxStaticBox",0}, - { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0}, - { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, - { "_class_wxPyDropSource","_wxPyDropSource",0}, - { "_class_wxScrollEvent","_wxScrollEvent",0}, - { "_wxJoystickEvent","_class_wxJoystickEvent",0}, - { "_class_wxChoice","_wxChoice",0}, - { "_class_wxSlider","_wxSlider",0}, - { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, - { "_class_wxImageList","_wxImageList",0}, - { "_class_wxBitmapButton","_wxBitmapButton",0}, - { "_wxFrame","_class_wxFrame",0}, - { "_wxPCXHandler","_class_wxPCXHandler",0}, - { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, - { "_class_wxNotebook","_wxNotebook",0}, - { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, - { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, - { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, - { "_class_wxMouseEvent","_wxMouseEvent",0}, - { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, - { "_class_wxListEvent","_wxListEvent",0}, - { "_class_wxPrintPreview","_wxPrintPreview",0}, - { "_class_wxSpinEvent","_wxSpinEvent",0}, - { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, - { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, - { "_wxButton","_class_wxButton",0}, - { "_class_wxPyApp","_wxPyApp",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, - { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, - { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, - { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, - { "_class_wxPaintDC","_wxPaintDC",0}, - { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, - { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, - { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, - { "_class_wxComboBox","_wxComboBox",0}, - { "_class_wxRadioButton","_wxRadioButton",0}, - { "_wxValidator","_class_wxValidator",0}, - { "_wxToolBarBase","_class_wxToolBarBase",0}, - { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, - { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_wxControl",0}, - { "_wxStaticBitmap","_class_wxStaticBitmap",0}, - { "_class_wxIcon","_wxIcon",0}, - { "_class_wxColour","_wxColour",0}, - { "_class_wxScreenDC","_wxScreenDC",0}, - { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, - { "_wxPalette","_class_wxPalette",0}, - { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -1946,63 +1803,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxEraseEvent","_class_wxEraseEvent",0}, - { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, - { "_class_wxJoystickEvent","_wxJoystickEvent",0}, - { "_class_wxMiniFrame","_wxMiniFrame",0}, - { "_wxFontDialog","_class_wxFontDialog",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxSplitterWindow","_wxSplitterWindow",0}, - { "_wxPreviewFrame","_class_wxPreviewFrame",0}, - { "_wxSizer","_class_wxSizer",0}, - { "_class_wxShowEvent","_wxShowEvent",0}, - { "_class_wxPCXHandler","_wxPCXHandler",0}, - { "_wxTIFFHandler","_class_wxTIFFHandler",0}, - { "_wxPyDropTarget","_class_wxPyDropTarget",0}, - { "_wxActivateEvent","_class_wxActivateEvent",0}, - { "_wxGauge","_class_wxGauge",0}, - { "_class_wxCheckListBox","_wxCheckListBox",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxGridEvent","_wxGridEvent",0}, - { "_class_wxCommandEvent","_wxCommandEvent",0}, - { "_class_wxClientDC","_wxClientDC",0}, - { "_class_wxSizeEvent","_wxSizeEvent",0}, - { "_class_wxListCtrl","_wxListCtrl",0}, - { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxGridCell","_wxGridCell",0}, - { "_class_wxSize","_wxSize",0}, - { "_class_wxBitmap","_wxBitmap",0}, - { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxMenuBar","_class_wxMenuBar",0}, - { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler}, { "_wxEvtHandler","_wxPyApp",SwigwxPyAppTowxEvtHandler}, - { "_wxEvtHandler","_class_wxEvtHandler",0}, - { "_wxMenuItem","_class_wxMenuItem",0}, - { "_class_wxScrollBar","_wxScrollBar",0}, - { "_class_wxColourDialog","_wxColourDialog",0}, - { "_class_wxPrintData","_wxPrintData",0}, - { "_class_wxScrolledWindow","_wxScrolledWindow",0}, - { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, - { "_wxKeyEvent","_class_wxKeyEvent",0}, - { "_wxMoveEvent","_class_wxMoveEvent",0}, - { "_wxColourData","_class_wxColourData",0}, - { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0}, - { "_class_wxPalette","_wxPalette",0}, - { "_wxFileDataObject","_class_wxFileDataObject",0}, - { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, - { "_class_wxEraseEvent","_wxEraseEvent",0}, - { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, - { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, - { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_class_wxToolBarToolBase","_wxToolBarToolBase",0}, - { "_class_wxFontDialog","_wxFontDialog",0}, - { "_wxWindow","_class_wxWindow",0}, - { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, - { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; static PyObject *SWIG_globals; @@ -2095,6 +1899,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER)); PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD)); PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); + PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB)); PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); @@ -2159,6 +1964,9 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxSP_WRAP", PyInt_FromLong((long) wxSP_WRAP)); PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); + PyDict_SetItemString(d,"wxSP_3DSASH", PyInt_FromLong((long) wxSP_3DSASH)); + PyDict_SetItemString(d,"wxSP_3DBORDER", PyInt_FromLong((long) wxSP_3DBORDER)); + PyDict_SetItemString(d,"wxSP_FULLSASH", PyInt_FromLong((long) wxSP_FULLSASH)); PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); PyDict_SetItemString(d,"wxSP_LIVE_UPDATE", PyInt_FromLong((long) wxSP_LIVE_UPDATE)); PyDict_SetItemString(d,"wxSP_PERMIT_UNSPLIT", PyInt_FromLong((long) wxSP_PERMIT_UNSPLIT)); @@ -2269,9 +2077,11 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY)); PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT)); PyDict_SetItemString(d,"wxFILE_MUST_EXIST", PyInt_FromLong((long) wxFILE_MUST_EXIST)); + PyDict_SetItemString(d,"wxMULTIPLE", PyInt_FromLong((long) wxMULTIPLE)); PyDict_SetItemString(d,"wxACCEL_ALT", PyInt_FromLong((long) wxACCEL_ALT)); PyDict_SetItemString(d,"wxACCEL_CTRL", PyInt_FromLong((long) wxACCEL_CTRL)); PyDict_SetItemString(d,"wxACCEL_SHIFT", PyInt_FromLong((long) wxACCEL_SHIFT)); + PyDict_SetItemString(d,"wxACCEL_NORMAL", PyInt_FromLong((long) wxACCEL_NORMAL)); PyDict_SetItemString(d,"wxPD_AUTO_HIDE", PyInt_FromLong((long) wxPD_AUTO_HIDE)); PyDict_SetItemString(d,"wxPD_APP_MODAL", PyInt_FromLong((long) wxPD_APP_MODAL)); PyDict_SetItemString(d,"wxPD_CAN_ABORT", PyInt_FromLong((long) wxPD_CAN_ABORT)); @@ -2304,6 +2114,13 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxLI_VERTICAL", PyInt_FromLong((long) wxLI_VERTICAL)); PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER)); PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO)); + PyDict_SetItemString(d,"wxJOYSTICK1", PyInt_FromLong((long) wxJOYSTICK1)); + PyDict_SetItemString(d,"wxJOYSTICK2", PyInt_FromLong((long) wxJOYSTICK2)); + PyDict_SetItemString(d,"wxJOY_BUTTON1", PyInt_FromLong((long) wxJOY_BUTTON1)); + PyDict_SetItemString(d,"wxJOY_BUTTON2", PyInt_FromLong((long) wxJOY_BUTTON2)); + PyDict_SetItemString(d,"wxJOY_BUTTON3", PyInt_FromLong((long) wxJOY_BUTTON3)); + PyDict_SetItemString(d,"wxJOY_BUTTON4", PyInt_FromLong((long) wxJOY_BUTTON4)); + PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY)); PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); @@ -2684,17 +2501,25 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_UNSPLIT", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_UNSPLIT)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)); PyDict_SetItemString(d,"wxEVT_NAVIGATION_KEY", PyInt_FromLong((long) wxEVT_NAVIGATION_KEY)); + PyDict_SetItemString(d,"wxEVT_TIMER", PyInt_FromLong((long) wxEVT_TIMER)); + PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS)); PyDict_SetItemString(d,"__version__", PyString_FromString("0.0.0")); PyDict_SetItemString(d,"cvar", SWIG_globals); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); + SWIG_addvarlink(SWIG_globals,"wxDefaultPosition",_wrap_wxDefaultPosition_get, _wrap_wxDefaultPosition_set); + SWIG_addvarlink(SWIG_globals,"wxDefaultSize",_wrap_wxDefaultSize_get, _wrap_wxDefaultSize_set); + + // Make our API structure a CObject so other modules can import it + // from this module. + PyObject* v = PyCObject_FromVoidPtr(&API, NULL); + PyDict_SetItemString(d,"wxPyCoreAPI", v); + Py_XDECREF(v); __wxPreStart(); // initialize the GUI toolkit, if needed. // Since these modules are all linked together, initialize them now - // because python won't be able to find their shared library files, + // because Python won't be able to find their shared library files, // (since there isn't any.) initwindowsc(); initwindows2c(); @@ -2713,6 +2538,9 @@ SWIGEXPORT(void) initwxc() { initprintfwc(); initsizersc(); initclip_dndc(); + initstreamsc(); + initfilesysc(); + { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/utils/wxPython/src/msw/wx.py b/wxPython/src/gtk/wx.py similarity index 91% rename from utils/wxPython/src/msw/wx.py rename to wxPython/src/gtk/wx.py index d9e6f41a27..63c5c1b3e5 100644 --- a/utils/wxPython/src/msw/wx.py +++ b/wxPython/src/gtk/wx.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * class wxPyAppPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this @@ -44,9 +50,6 @@ class wxPyAppPtr(wxEvtHandlerPtr): def GetAppName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetAppName,(self,) + _args, _kwargs) return val - def GetAuto3D(self, *_args, **_kwargs): - val = apply(wxc.wxPyApp_GetAuto3D,(self,) + _args, _kwargs) - return val def GetClassName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetClassName,(self,) + _args, _kwargs) return val @@ -63,6 +66,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def GetVendorName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetVendorName,(self,) + _args, _kwargs) return val + def GetUseBestVisual(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_GetUseBestVisual,(self,) + _args, _kwargs) + return val def Dispatch(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_Dispatch,(self,) + _args, _kwargs) return val @@ -84,9 +90,6 @@ class wxPyAppPtr(wxEvtHandlerPtr): def SetAppName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_SetAppName,(self,) + _args, _kwargs) return val - def SetAuto3D(self, *_args, **_kwargs): - val = apply(wxc.wxPyApp_SetAuto3D,(self,) + _args, _kwargs) - return val def SetClassName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_SetClassName,(self,) + _args, _kwargs) return val @@ -102,6 +105,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def SetVendorName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_SetVendorName,(self,) + _args, _kwargs) return val + def SetUseBestVisual(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_SetUseBestVisual,(self,) + _args, _kwargs) + return val def GetStdIcon(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetStdIcon,(self,) + _args, _kwargs) if val: val = wxIconPtr(val) ; val.thisown = 1 @@ -138,6 +144,11 @@ _wxStart = wxc._wxStart _wxSetDictionary = wxc._wxSetDictionary +def wxGetApp(*_args, **_kwargs): + val = apply(wxc.wxGetApp,_args,_kwargs) + if val: val = wxPyAppPtr(val) + return val + wxApp_CleanUp = wxc.wxApp_CleanUp @@ -225,6 +236,7 @@ wxLB_HSCROLL = wxc.wxLB_HSCROLL wxPROCESS_ENTER = wxc.wxPROCESS_ENTER wxPASSWORD = wxc.wxPASSWORD wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER +wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_READONLY = wxc.wxTE_READONLY wxTE_RICH = wxc.wxTE_RICH @@ -289,6 +301,9 @@ wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS wxSP_WRAP = wxc.wxSP_WRAP wxSP_NOBORDER = wxc.wxSP_NOBORDER wxSP_3D = wxc.wxSP_3D +wxSP_3DSASH = wxc.wxSP_3DSASH +wxSP_3DBORDER = wxc.wxSP_3DBORDER +wxSP_FULLSASH = wxc.wxSP_FULLSASH wxSP_BORDER = wxc.wxSP_BORDER wxSP_LIVE_UPDATE = wxc.wxSP_LIVE_UPDATE wxSP_PERMIT_UNSPLIT = wxc.wxSP_PERMIT_UNSPLIT @@ -399,9 +414,11 @@ wxSAVE = wxc.wxSAVE wxHIDE_READONLY = wxc.wxHIDE_READONLY wxOVERWRITE_PROMPT = wxc.wxOVERWRITE_PROMPT wxFILE_MUST_EXIST = wxc.wxFILE_MUST_EXIST +wxMULTIPLE = wxc.wxMULTIPLE wxACCEL_ALT = wxc.wxACCEL_ALT wxACCEL_CTRL = wxc.wxACCEL_CTRL wxACCEL_SHIFT = wxc.wxACCEL_SHIFT +wxACCEL_NORMAL = wxc.wxACCEL_NORMAL wxPD_AUTO_HIDE = wxc.wxPD_AUTO_HIDE wxPD_APP_MODAL = wxc.wxPD_APP_MODAL wxPD_CAN_ABORT = wxc.wxPD_CAN_ABORT @@ -434,6 +451,13 @@ wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL wxLI_VERTICAL = wxc.wxLI_VERTICAL wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO +wxJOYSTICK1 = wxc.wxJOYSTICK1 +wxJOYSTICK2 = wxc.wxJOYSTICK2 +wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1 +wxJOY_BUTTON2 = wxc.wxJOY_BUTTON2 +wxJOY_BUTTON3 = wxc.wxJOY_BUTTON3 +wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4 +wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE wxROMAN = wxc.wxROMAN @@ -814,10 +838,12 @@ wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED = wxc.wxEVT_COMMAND_SPLITTER_SASH_POS_CH wxEVT_COMMAND_SPLITTER_UNSPLIT = wxc.wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wxc.wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY +wxEVT_TIMER = wxc.wxEVT_TIMER +wxEVT_END_PROCESS = wxc.wxEVT_END_PROCESS __version__ = wxc.__version__ cvar = wxc.cvar -wxPyDefaultPosition = wxPointPtr(wxc.cvar.wxPyDefaultPosition) -wxPyDefaultSize = wxSizePtr(wxc.cvar.wxPyDefaultSize) +wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition) +wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize) #-------------- USER INCLUDE ----------------------- @@ -853,36 +879,36 @@ def _checkForCallback(obj, name, event, theID=-1): except: pass else: obj.Connect(theID, -1, event, cb) -def _StdWindowCallbacks(win): - _checkForCallback(win, "OnChar", wxEVT_CHAR) - _checkForCallback(win, "OnSize", wxEVT_SIZE) - _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) - _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) - _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) - _checkForCallback(win, "OnPaint", wxEVT_PAINT) - _checkForCallback(win, "OnIdle", wxEVT_IDLE) +## def _StdWindowCallbacks(win): +## _checkForCallback(win, "OnChar", wxEVT_CHAR) +## _checkForCallback(win, "OnSize", wxEVT_SIZE) +## _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) +## _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) +## _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) +## _checkForCallback(win, "OnPaint", wxEVT_PAINT) +## _checkForCallback(win, "OnIdle", wxEVT_IDLE) -def _StdFrameCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) - _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) +## def _StdFrameCallbacks(win): +## _StdWindowCallbacks(win) +## _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) +## _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) +## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) -def _StdDialogCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) - _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) - _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) +## def _StdDialogCallbacks(win): +## _StdWindowCallbacks(win) +## _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) +## _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) +## _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) +## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) +## _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) -def _StdOnScrollCallbacks(win): - try: cb = getattr(win, "OnScroll") - except: pass - else: EVT_SCROLL(win, cb) +## def _StdOnScrollCallbacks(win): +## try: cb = getattr(win, "OnScroll") +## except: pass +## else: EVT_SCROLL(win, cb) @@ -1350,15 +1376,9 @@ def EVT_SPIN_UP(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) def EVT_SPIN_DOWN(win, id, func): - win.Connect(id, -1,wxEVT_SCROLL_LINEDOWN, func) + win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) def EVT_SPIN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) @@ -1387,33 +1407,33 @@ def EVT_TASKBAR_RIGHT_DCLICK(win, func): win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) -# wxGrid -def EVT_GRID_SELECT_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) +## # wxGrid *** THE OLD ONE *** +## def EVT_GRID_SELECT_CELL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) -def EVT_GRID_CREATE_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) +## def EVT_GRID_CREATE_CELL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) -def EVT_GRID_CHANGE_LABELS(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) +## def EVT_GRID_CHANGE_LABELS(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) -def EVT_GRID_CHANGE_SEL_LABEL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) +## def EVT_GRID_CHANGE_SEL_LABEL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) -def EVT_GRID_CELL_CHANGE(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) +## def EVT_GRID_CELL_CHANGE(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) -def EVT_GRID_CELL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) +## def EVT_GRID_CELL_LCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) -def EVT_GRID_CELL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) +## def EVT_GRID_CELL_RCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) -def EVT_GRID_LABEL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) +## def EVT_GRID_LABEL_LCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) -def EVT_GRID_LABEL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) +## def EVT_GRID_LABEL_RCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) # wxSashWindow @@ -1458,9 +1478,6 @@ def EVT_LIST_SET_INFO(win, id, func): def EVT_LIST_ITEM_SELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func) -def EVT_LIST_ITEM_ACTIVATED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) - def EVT_LIST_ITEM_DESELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func) @@ -1479,6 +1496,10 @@ def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func): def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func) +def EVT_LIST_ITEM_ACTIVATED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) + + #wxSplitterWindow @@ -1495,22 +1516,57 @@ def EVT_SPLITTER_DOUBLECLICKED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, func) +# wxTimer +def EVT_TIMER(win, id, func): + win.Connect(id, -1, wxEVT_TIMER, func) + +# wxProcess +def EVT_END_PROCESS(eh, id, func): + eh.Connect(id, -1, wxEVT_END_PROCESS, func) + + +# wxJoyStick +def EVT_JOY_DOWN(win, func): + win.Connect(-1, -1, wxEVT_JOY_DOWN, func) + +def EVT_JOY_UP(win, func): + win.Connect(-1, -1, wxEVT_JOY_UP, func) + +def EVT_JOY_MOVE(win, func): + win.Connect(-1, -1, wxEVT_JOY_MOVE, func) + +def EVT_JOY_ZMOVE(win, func): + win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func) + +def EVT_JOYSTICK_EVENTS(win, func): + win.Connect(-1, -1, wxEVT_JOY_DOWN, func) + win.Connect(-1, -1, wxEVT_JOY_UP, func) + win.Connect(-1, -1, wxEVT_JOY_MOVE, func) + win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func) + #---------------------------------------------------------------------- class wxTimer(wxPyTimer): - def __init__(self): - wxPyTimer.__init__(self, self.Notify) # derived class must provide - # Notify(self) method. + def __init__(self, evtHandler = None, id = -1): + if evtHandler is None: + wxPyTimer.__init__(self, self.Notify) # derived class must provide + # Notify(self) method. + else: + wxPyTimer.__init__(self, None) + self.SetOwner(evtHandler, id) #---------------------------------------------------------------------- # Some wxWin methods can take "NULL" as parameters, but the shadow classes # expect an object with the SWIG pointer as a 'this' member. This class # and instance fools the shadow into passing the NULL pointer. -class NullObj: +## NOTE: This is not needed anymore as None can be passed instead and +# will be interpreted as NULL. + +class _NullObj: this = 'NULL' # SWIG converts this to (void*)0 -NULL = NullObj() +NULL = _NullObj() #---------------------------------------------------------------------- @@ -1519,15 +1575,15 @@ NULL = NullObj() wxColor = wxColour wxNamedColor = wxNamedColour -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - # aliases so that C++ documentation applies: -wxDefaultPosition = wxPyDefaultPosition -wxDefaultSize = wxPyDefaultSize +#wxDefaultPosition = wxPyDefaultPosition +#wxDefaultSize = wxPyDefaultSize + # backwards compatibility -wxNoRefBitmap = wxBitmap +wxNoRefBitmap = wxBitmap +wxPyDefaultPosition = wxDefaultPosition +wxPyDefaultSize = wxDefaultSize #---------------------------------------------------------------------- # This helper function will take a wxPython object and convert it to @@ -1661,6 +1717,20 @@ class wxPySimpleApp(wxApp): return true +class wxPyWidgetTester(wxApp): + def __init__(self, size = (250, 100)): + self.size = size + wxApp.__init__(self, 0) + + def OnInit(self): + self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size) + self.SetTopWindow(self.frame) + return true + + def SetWidget(self, widgetClass, *args): + w = apply(widgetClass, (self.frame,) + args) + self.frame.Show(true) + #---------------------------------------------------------------------------- # DO NOT hold any other references to this object. This is how we know when # to cleanup system resources that wxWin is holding. When this module is diff --git a/utils/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp similarity index 81% rename from utils/wxPython/src/helpers.cpp rename to wxPython/src/helpers.cpp index 9a32b7fc27..5e7b143f0f 100644 --- a/utils/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -33,20 +33,11 @@ //#include //#include -extern GtkWidget *wxRootWindow; +//extern GtkWidget *wxRootWindow; #endif -//--------------------------------------------------------------------------- - -//wxHashTable* wxPyWindows = NULL; - - -wxPoint wxPyDefaultPosition; //wxDefaultPosition); -wxSize wxPyDefaultSize; //wxDefaultSize); -wxString wxPyEmptyStr(""); - #ifdef __WXMSW__ // If building for win32... @@ -105,18 +96,34 @@ int wxPyApp::MainLoop(void) { //--------------------------------------------------------------------- //---------------------------------------------------------------------- +#ifdef __WXMSW__ +#include "wx/msw/msvcrt.h" +#endif + + int WXDLLEXPORT wxEntryStart( int argc, char** argv ); int WXDLLEXPORT wxEntryInitGui(); void WXDLLEXPORT wxEntryCleanup(); +#ifdef WXP_WITH_THREAD +PyThreadState* wxPyEventThreadState = NULL; +#endif + + // This is where we pick up the first part of the wxEntry functionality... -// The rest is in __wxStart and AfterMainLoop. This function is called when +// The rest is in __wxStart and __wxCleanup. This function is called when // wxcmodule is imported. (Before there is a wxApp object.) void __wxPreStart() { + +#ifdef __WXMSW__ +// wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +#endif + #ifdef WXP_WITH_THREAD PyEval_InitThreads(); + wxPyEventThreadState = PyThreadState_Get(); #endif // Bail out if there is already windows created. This means that the @@ -135,17 +142,11 @@ void __wxPreStart() argv[argc] = NULL; wxEntryStart(argc, argv); + delete [] argv; } -#ifdef WXP_WITH_THREAD -PyThreadState* wxPyEventThreadState = NULL; -#endif -static char* __nullArgv[1] = { 0 }; - - - // Start the user application, user App's OnInit method is a parameter here PyObject* __wxStart(PyObject* /* self */, PyObject* args) { @@ -154,22 +155,27 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args) PyObject* result; long bResult; -#ifdef WXP_WITH_THREAD - wxPyEventThreadState = PyThreadState_Get(); -#endif - if (!PyArg_ParseTuple(args, "O", &onInitFunc)) return NULL; +#if 0 // Try it out without this check, soo how it does... if (wxTopLevelWindows.Number() > 0) { PyErr_SetString(PyExc_TypeError, "Only 1 wxApp per process!"); return NULL; } - +#endif // This is the next part of the wxEntry functionality... - wxPythonApp->argc = 0; - wxPythonApp->argv = NULL; + PyObject* sysargv = PySys_GetObject("argv"); + int argc = PyList_Size(sysargv); + char** argv = new char*[argc+1]; + int x; + for(x=0; xargc = argc; + wxPythonApp->argv = argv; wxEntryInitGui(); @@ -240,7 +246,17 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args) //--------------------------------------------------------------------------- -PyObject* wxPyConstructObject(void* ptr, const char* className) { +PyObject* wxPyConstructObject(void* ptr, + const char* className, + int setThisOwn) { + PyObject* obj; + PyObject* arg; + + if (!ptr) { + Py_INCREF(Py_None); + return Py_None; + } + char buff[64]; // should always be big enough... char swigptr[64]; @@ -250,21 +266,31 @@ PyObject* wxPyConstructObject(void* ptr, const char* className) { sprintf(buff, "%sPtr", className); PyObject* classobj = PyDict_GetItemString(wxPython_dict, buff); if (! classobj) { - Py_INCREF(Py_None); - return Py_None; + //Py_INCREF(Py_None); + //return Py_None; + char temp[128]; + sprintf(temp, + "*** Unknown class name %s, tell Robin about it please ***", + buff); + obj = PyString_FromString(temp); + return obj; } - PyObject* arg = Py_BuildValue("(s)", swigptr); - PyObject* obj = PyInstance_New(classobj, arg, NULL); + arg = Py_BuildValue("(s)", swigptr); + obj = PyInstance_New(classobj, arg, NULL); Py_DECREF(arg); + if (setThisOwn) { + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(obj, "thisown", one); + Py_DECREF(one); + } + return obj; } //--------------------------------------------------------------------------- -static unsigned int _wxPyNestCount = 0; - static PyThreadState* myPyThreadState_Get() { PyThreadState* current; current = PyThreadState_Swap(NULL); @@ -273,7 +299,7 @@ static PyThreadState* myPyThreadState_Get() { } -HELPEREXPORT bool wxPyRestoreThread() { +bool wxPyRestoreThread() { // NOTE: The Python API docs state that if a thread already has the // interpreter lock and calls PyEval_RestoreThread again a deadlock // occurs, so I put in this code as a guard condition since there are @@ -282,7 +308,6 @@ HELPEREXPORT bool wxPyRestoreThread() { // already have the lock. (I hope!) // #ifdef WXP_WITH_THREAD - _wxPyNestCount += 1; if (wxPyEventThreadState != myPyThreadState_Get()) { PyEval_RestoreThread(wxPyEventThreadState); return TRUE; @@ -293,12 +318,11 @@ HELPEREXPORT bool wxPyRestoreThread() { } -HELPEREXPORT void wxPySaveThread(bool doSave) { +void wxPySaveThread(bool doSave) { #ifdef WXP_WITH_THREAD if (doSave) { wxPyEventThreadState = PyEval_SaveThread(); } - _wxPyNestCount -= 1; #endif } @@ -360,46 +384,53 @@ void wxPyCallback::EventThunker(wxEvent& event) { //---------------------------------------------------------------------- -wxPyCallbackHelper::wxPyCallbackHelper() { - m_self = NULL; - m_lastFound = NULL; - m_incRef = FALSE; -} - - -wxPyCallbackHelper::~wxPyCallbackHelper() { - bool doSave = wxPyRestoreThread(); - if (m_incRef) - Py_XDECREF(m_self); - wxPySaveThread(doSave); -} - wxPyCallbackHelper::wxPyCallbackHelper(const wxPyCallbackHelper& other) { m_lastFound = NULL; m_self = other.m_self; - if (m_self) + m_class = other.m_class; + if (m_self) { Py_INCREF(m_self); + Py_INCREF(m_class); + } } -void wxPyCallbackHelper::setSelf(PyObject* self, int incref) { +void wxPyCallbackHelper::setSelf(PyObject* self, PyObject* klass, int incref) { m_self = self; + m_class = klass; m_incRef = incref; - if (incref) + if (incref) { Py_INCREF(m_self); + Py_INCREF(m_class); + } } -bool wxPyCallbackHelper::findCallback(const wxString& name) { - m_lastFound = NULL; - if (m_self && PyObject_HasAttrString(m_self, (char*)name.c_str())) - m_lastFound = PyObject_GetAttrString(m_self, (char*)name.c_str()); +// If the object (m_self) has an attibute of the given name, and if that +// attribute is a method, and if that method's class is not from a base class, +// then we'll save a pointer to the method so callCallback can call it. +bool wxPyCallbackHelper::findCallback(const char* name) const { + wxPyCallbackHelper* self = (wxPyCallbackHelper*)this; // cast away const + self->m_lastFound = NULL; + if (m_self && PyObject_HasAttrString(m_self, (char*)name)) { + PyObject* method; + method = PyObject_GetAttrString(m_self, (char*)name); + if (PyMethod_Check(method) && + ((PyMethod_GET_CLASS(method) == m_class) || + PyClass_IsSubclass(PyMethod_GET_CLASS(method), m_class))) { + + self->m_lastFound = method; + } + else { + Py_DECREF(method); + } + } return m_lastFound != NULL; } -int wxPyCallbackHelper::callCallback(PyObject* argTuple) { +int wxPyCallbackHelper::callCallback(PyObject* argTuple) const { PyObject* result; int retval = FALSE; @@ -414,11 +445,17 @@ int wxPyCallbackHelper::callCallback(PyObject* argTuple) { // Invoke the Python callable object, returning the raw PyObject return // value. Caller should DECREF the return value and also call PyEval_SaveThread. -PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) { - PyObject* result; +PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) const { + PyObject* result; - result = PyEval_CallObject(m_lastFound, argTuple); + // Save a copy of the pointer in case the callback generates another + // callback. In that case m_lastFound will have a different value when + // it gets back here... + PyObject* method = m_lastFound; + + result = PyEval_CallObject(method, argTuple); Py_DECREF(argTuple); + Py_DECREF(method); if (!result) { PyErr_Print(); } @@ -426,11 +463,36 @@ PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) { } +void wxPyCBH_setSelf(wxPyCallbackHelper& cbh, PyObject* self, PyObject* klass, int incref) { + cbh.setSelf(self, klass, incref); +} + +bool wxPyCBH_findCallback(const wxPyCallbackHelper& cbh, const char* name) { + return cbh.findCallback(name); +} + +int wxPyCBH_callCallback(const wxPyCallbackHelper& cbh, PyObject* argTuple) { + return cbh.callCallback(argTuple); +} + +PyObject* wxPyCBH_callCallbackObj(const wxPyCallbackHelper& cbh, PyObject* argTuple) { + return cbh.callCallbackObj(argTuple); +} + + +void wxPyCBH_delete(wxPyCallbackHelper* cbh) { + bool doSave = wxPyRestoreThread(); + if (cbh->m_incRef) { + Py_XDECREF(cbh->m_self); + Py_XDECREF(cbh->m_class); + } + wxPySaveThread(doSave); +} //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // These classes can be derived from in Python and passed through the event -// system without loosing anything. They do this by keeping a reference to +// system without losing anything. They do this by keeping a reference to // themselves and some special case handling in wxPyCallback::EventThunker. @@ -515,20 +577,26 @@ wxPyTimer::~wxPyTimer() { } void wxPyTimer::Notify() { - bool doSave = wxPyRestoreThread(); - - PyObject* result; - PyObject* args = Py_BuildValue("()"); - - result = PyEval_CallObject(func, args); - Py_DECREF(args); - if (result) { - Py_DECREF(result); - PyErr_Clear(); - } else { - PyErr_Print(); + if (!func || func == Py_None) { + wxTimer::Notify(); + } + else { + bool doSave = wxPyRestoreThread(); + + PyObject* result; + PyObject* args = Py_BuildValue("()"); + + result = PyEval_CallObject(func, args); + Py_DECREF(args); + if (result) { + Py_DECREF(result); + PyErr_Clear(); + } else { + PyErr_Print(); + } + + wxPySaveThread(doSave); } - wxPySaveThread(doSave); } @@ -907,9 +975,43 @@ bool wxRect_helper(PyObject* source, wxRect** obj) { +bool wxColour_helper(PyObject* source, wxColour** obj) { + + // If source is an object instance then it may already be the right type + if (PyInstance_Check(source)) { + wxColour* ptr; + if (SWIG_GetPtrObj(source, (void **)&ptr, "_wxColour_p")) + goto error; + *obj = ptr; + return TRUE; + } + // otherwise a string is expected + else if (PyString_Check(source)) { + wxString spec = PyString_AS_STRING(source); + if (spec[0U] == '#' && spec.Length() == 7) { // It's #RRGGBB + char* junk; + int red = strtol(spec.Mid(1,2), &junk, 16); + int green = strtol(spec.Mid(3,2), &junk, 16); + int blue = strtol(spec.Mid(5,2), &junk, 16); + **obj = wxColour(red, green, blue); + return TRUE; + } + else { // it's a colour name + **obj = wxColour(spec); + return TRUE; + } + } + + error: + PyErr_SetString(PyExc_TypeError, "Expected a wxColour object or a string containing a colour name or '#RRGGBB'."); + return FALSE; +} + + //---------------------------------------------------------------------- //---------------------------------------------------------------------- //---------------------------------------------------------------------- + diff --git a/utils/wxPython/src/helpers.h b/wxPython/src/helpers.h similarity index 60% rename from utils/wxPython/src/helpers.h rename to wxPython/src/helpers.h index 549968a838..1c2b2ef75b 100644 --- a/utils/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -15,7 +15,6 @@ #include - //---------------------------------------------------------------------- // if we want to handle threads and Python threads are available... @@ -34,15 +33,8 @@ //--------------------------------------------------------------------------- -#if defined(__WXMSW__) -# define HELPEREXPORT __declspec(dllexport) -#else -# define HELPEREXPORT -#endif - typedef unsigned char byte; -//---------------------------------------------------------------------- class wxPyApp: public wxApp { @@ -51,9 +43,7 @@ public: ~wxPyApp(); int MainLoop(void); bool OnInit(void); -//# void AfterMainLoop(void); }; - extern wxPyApp *wxPythonApp; //---------------------------------------------------------------------- @@ -67,41 +57,71 @@ PyObject* __wxSetDictionary(PyObject*, PyObject* args); void wxPyEventThunker(wxObject*, wxEvent& event); -HELPEREXPORT PyObject* wxPyConstructObject(void* ptr, const char* className); -HELPEREXPORT bool wxPyRestoreThread(); -HELPEREXPORT void wxPySaveThread(bool doSave); -HELPEREXPORT PyObject* wxPy_ConvertList(wxListBase* list, const char* className); -HELPEREXPORT long wxPyGetWinHandle(wxWindow* win); +PyObject* wxPyConstructObject(void* ptr, + const char* className, + int setThisOwn=0); +bool wxPyRestoreThread(); +void wxPySaveThread(bool doSave); +PyObject* wxPy_ConvertList(wxListBase* list, const char* className); +long wxPyGetWinHandle(wxWindow* win); + + //---------------------------------------------------------------------- +// Handle wxInputStreams by Joerg Baumann +// See stream.i for implementations -class wxPyUserData : public wxObject { +// list class for return list of strings, e.g. readlines() +WX_DECLARE_LIST(wxString, wxStringPtrList); + + +// C++ class wxPyInputStream to act as base for python class wxInputStream +// Use it in python like a python file object +class wxPyInputStream { public: - wxPyUserData(PyObject* obj) { m_obj = obj; Py_INCREF(m_obj); } - ~wxPyUserData() { - bool doSave = wxPyRestoreThread(); - Py_DECREF(m_obj); - wxPySaveThread(doSave); - } - PyObject* m_obj; + // underlying wxInputStream + wxInputStream* wxi; + +public: + wxPyInputStream(wxInputStream* wxi_) : wxi(wxi_) {} + ~wxPyInputStream(); + + // python file object interface for input files (most of it) + void close(); + void flush(); + bool eof(); + wxString* read(int size=-1); + wxString* readline(int size=-1); + wxStringPtrList* readlines(int sizehint=-1); + void seek(int offset, int whence=0); + int tell(); + /* + bool isatty(); + int fileno(); + void truncate(int size=-1); + void write(wxString data); + void writelines(wxStringPtrList); + */ }; + //---------------------------------------------------------------------- // These are helpers used by the typemaps -HELPEREXPORT byte* byte_LIST_helper(PyObject* source); -HELPEREXPORT int* int_LIST_helper(PyObject* source); -HELPEREXPORT long* long_LIST_helper(PyObject* source); -HELPEREXPORT char** string_LIST_helper(PyObject* source); -HELPEREXPORT wxPoint* wxPoint_LIST_helper(PyObject* source); -HELPEREXPORT wxBitmap** wxBitmap_LIST_helper(PyObject* source); -HELPEREXPORT wxString* wxString_LIST_helper(PyObject* source); -HELPEREXPORT wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); +byte* byte_LIST_helper(PyObject* source); +int* int_LIST_helper(PyObject* source); +long* long_LIST_helper(PyObject* source); +char** string_LIST_helper(PyObject* source); +wxPoint* wxPoint_LIST_helper(PyObject* source); +wxBitmap** wxBitmap_LIST_helper(PyObject* source); +wxString* wxString_LIST_helper(PyObject* source); +wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); -HELPEREXPORT bool wxSize_helper(PyObject* source, wxSize** obj); -HELPEREXPORT bool wxPoint_helper(PyObject* source, wxPoint** obj); -HELPEREXPORT bool wxRealPoint_helper(PyObject* source, wxRealPoint** obj); -HELPEREXPORT bool wxRect_helper(PyObject* source, wxRect** obj); +bool wxSize_helper(PyObject* source, wxSize** obj); +bool wxPoint_helper(PyObject* source, wxPoint** obj); +bool wxRealPoint_helper(PyObject* source, wxRealPoint** obj); +bool wxRect_helper(PyObject* source, wxRect** obj); +bool wxColour_helper(PyObject* source, wxColour** obj); //---------------------------------------------------------------------- @@ -114,14 +134,15 @@ extern "C" char *SWIG_GetPtrObj(PyObject *obj, void **ptr, char *type); #ifdef _MSC_VER # pragma warning(disable:4800) +# pragma warning(disable:4190) #endif // Non-const versions to keep SWIG happy. -extern wxPoint wxPyDefaultPosition; -extern wxSize wxPyDefaultSize; -extern wxString wxPyEmptyStr; +// extern wxPoint wxPyDefaultPosition; +// extern wxSize wxPyDefaultSize; +// extern wxString wxPyEmptyStr; //---------------------------------------------------------------------- @@ -151,41 +172,6 @@ private: }; //--------------------------------------------------------------------------- - - - - -//--------------------------------------------------------------------------- -// This class holds an instance of a Python Shadow Class object and assists -// with looking up and invoking Python callback methods from C++ virtual -// method redirections. For all classes which have virtuals which should be -// overridable in wxPython, a new subclass is created that contains a -// wxPyCallbackHelper. -// -// **** This class should be combined with wxPyCallback defined above. -// - -class HELPEREXPORT wxPyCallbackHelper { -public: - wxPyCallbackHelper(); - ~wxPyCallbackHelper(); - - wxPyCallbackHelper(const wxPyCallbackHelper& other); - - void setSelf(PyObject* self, int incref=TRUE); - - bool findCallback(const wxString& name); - int callCallback(PyObject* argTuple); - PyObject* callCallbackObj(PyObject* argTuple); - -private: - PyObject* m_self; - PyObject* m_lastFound; - int m_incRef; -}; - - -//--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // These Event classes can be derived from in Python and passed through the // event system without loosing anything. They do this by keeping a reference @@ -226,17 +212,141 @@ public: }; +//--------------------------------------------------------------------------- +// Export a C API in a struct. Other modules will be able to load this from +// the wxc module and will then have safe access to these functions, even if +// in another shared library. + +class wxPyCallbackHelper; + +struct wxPyCoreAPI { + + void (*p_SWIG_MakePtr)(char*, void*, char*); + char* (*p_SWIG_GetPtr)(char*, void**, char*); + char* (*p_SWIG_GetPtrObj)(PyObject*, void**, char*); + void (*p_SWIG_RegisterMapping)(char*, char*, void *(*cast)(void *)); + void (*p_SWIG_addvarlink)(PyObject*, char*, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)); + PyObject* (*p_SWIG_newvarlink)(void); + + void (*p_wxPySaveThread)(bool); + bool (*p_wxPyRestoreThread)(); + PyObject* (*p_wxPyConstructObject)(void *, const char *, int); + PyObject* (*p_wxPy_ConvertList)(wxListBase* list, const char* className); + + byte* (*p_byte_LIST_helper)(PyObject* source); + int* (*p_int_LIST_helper)(PyObject* source); + long* (*p_long_LIST_helper)(PyObject* source); + char** (*p_string_LIST_helper)(PyObject* source); + wxPoint* (*p_wxPoint_LIST_helper)(PyObject* source); + wxBitmap** (*p_wxBitmap_LIST_helper)(PyObject* source); + wxString* (*p_wxString_LIST_helper)(PyObject* source); + wxAcceleratorEntry* (*p_wxAcceleratorEntry_LIST_helper)(PyObject* source); + + bool (*p_wxSize_helper)(PyObject* source, wxSize** obj); + bool (*p_wxPoint_helper)(PyObject* source, wxPoint** obj); + bool (*p_wxRealPoint_helper)(PyObject* source, wxRealPoint** obj); + bool (*p_wxRect_helper)(PyObject* source, wxRect** obj); + bool (*p_wxColour_helper)(PyObject* source, wxColour** obj); + + void (*p_wxPyCBH_setSelf)(wxPyCallbackHelper& cbh, PyObject* self, PyObject* klass, int incref); + bool (*p_wxPyCBH_findCallback)(const wxPyCallbackHelper& cbh, const char* name); + int (*p_wxPyCBH_callCallback)(const wxPyCallbackHelper& cbh, PyObject* argTuple); + PyObject* (*p_wxPyCBH_callCallbackObj)(const wxPyCallbackHelper& cbh, PyObject* argTuple); + void (*p_wxPyCBH_delete)(wxPyCallbackHelper* cbh); + +}; + +#ifdef wxPyUSE_EXPORT +static wxPyCoreAPI* wxPyCoreAPIPtr = NULL; // Each module needs one, but may not use it. +#endif + +//--------------------------------------------------------------------------- +// This class holds an instance of a Python Shadow Class object and assists +// with looking up and invoking Python callback methods from C++ virtual +// method redirections. For all classes which have virtuals which should be +// overridable in wxPython, a new subclass is created that contains a +// wxPyCallbackHelper. +// + +class wxPyCallbackHelper { +public: + wxPyCallbackHelper(const wxPyCallbackHelper& other); + + wxPyCallbackHelper() { + m_class = NULL; + m_self = NULL; + m_lastFound = NULL; + m_incRef = FALSE; + } + + ~wxPyCallbackHelper() { +#ifdef wxPyUSE_EXPORT + wxPyCoreAPIPtr->p_wxPyCBH_delete(this); +#else + wxPyCBH_delete(this); +#endif + } + + void setSelf(PyObject* self, PyObject* klass, int incref=TRUE); + bool findCallback(const char* name) const; + int callCallback(PyObject* argTuple) const; + PyObject* callCallbackObj(PyObject* argTuple) const; + +private: + PyObject* m_self; + PyObject* m_class; + PyObject* m_lastFound; + int m_incRef; + + friend void wxPyCBH_delete(wxPyCallbackHelper* cbh); +}; + + +void wxPyCBH_setSelf(wxPyCallbackHelper& cbh, PyObject* self, PyObject* klass, int incref); +bool wxPyCBH_findCallback(const wxPyCallbackHelper& cbh, const char* name); +int wxPyCBH_callCallback(const wxPyCallbackHelper& cbh, PyObject* argTuple); +PyObject* wxPyCBH_callCallbackObj(const wxPyCallbackHelper& cbh, PyObject* argTuple); +void wxPyCBH_delete(wxPyCallbackHelper* cbh); + + + +//---------------------------------------------------------------------- + +class wxPyUserData : public wxObject { +public: + wxPyUserData(PyObject* obj) { + m_obj = obj; + Py_INCREF(m_obj); + } + + ~wxPyUserData() { + bool doSave; +#ifdef wxPyUSE_EXPORT + doSave = wxPyCoreAPIPtr->p_wxPyRestoreThread(); + Py_DECREF(m_obj); + wxPyCoreAPIPtr->p_wxPySaveThread(doSave); +#else + doSave = wxPyRestoreThread(); + Py_DECREF(m_obj); + wxPySaveThread(doSave); +#endif + } + PyObject* m_obj; +}; + + + //--------------------------------------------------------------------------- // These macros are used to implement the virtual methods that should // redirect to a Python method if one exists. The names designate the // return type, if any, as well as any parameter types. //--------------------------------------------------------------------------- -#define PYPRIVATE \ - void _setSelf(PyObject* self, int incref=1) { \ - m_myInst.setSelf(self, incref); \ - } \ - private: wxPyCallbackHelper m_myInst; +#define PYPRIVATE \ + void _setSelf(PyObject* self, PyObject* _class, int incref=1) { \ + wxPyCBH_setSelf(m_myInst, self, _class, incref); \ + } \ + private: wxPyCallbackHelper m_myInst //--------------------------------------------------------------------------- @@ -248,8 +358,8 @@ public: #define IMP_PYCALLBACK__(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME() { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ else \ PCLASS::CBNAME(); \ wxPySaveThread(doSave); \ @@ -269,8 +379,8 @@ public: bool CLASS::CBNAME(int a, int b) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ii)",a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ else \ rval = PCLASS::CBNAME(a,b); \ wxPySaveThread(doSave); \ @@ -282,6 +392,26 @@ public: //--------------------------------------------------------------------------- +#define DEC_PYCALLBACK_VOID_INTINT(CBNAME) \ + void CBNAME(int a, int b); \ + void base_##CBNAME(int a, int b); + + +#define IMP_PYCALLBACK_VOID_INTINT(CLASS, PCLASS, CBNAME) \ + void CLASS::CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ + else \ + PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + } \ + void CLASS::base_##CBNAME(int a, int b) { \ + PCLASS::CBNAME(a,b); \ + } + +//--------------------------------------------------------------------------- + #define DEC_PYCALLBACK_BOOL_INT(CBNAME) \ bool CBNAME(int a); \ bool base_##CBNAME(int a); @@ -291,8 +421,8 @@ public: bool CLASS::CBNAME(int a) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(i)",a)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \ else \ rval = PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -312,8 +442,8 @@ public: bool CLASS::CBNAME(int a) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(i)",a)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \ else rval = FALSE; \ wxPySaveThread(doSave); \ return rval; \ @@ -330,9 +460,11 @@ public: #define IMP_PYCALLBACK__DC(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxDC& a) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(O)", \ - wxPyConstructObject(&a, "wxDC"))); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -353,9 +485,11 @@ public: #define IMP_PYCALLBACK__DCBOOL(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxDC& a, bool b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(Oi)", \ - wxPyConstructObject(&a, "wxDC"), (int)b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a, b); \ wxPySaveThread(doSave); \ @@ -374,9 +508,11 @@ public: #define IMP_PYCALLBACK__DCBOOL(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxDC& a, bool b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(Oi)", \ - wxPyConstructObject(&a, "wxDC"), (int)b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a, b); \ wxPySaveThread(doSave); \ @@ -395,8 +531,8 @@ public: #define IMP_PYCALLBACK__2DBL(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(double a, double b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(dd)",a,b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(dd)",a,b)); \ else \ PCLASS::CBNAME(a, b); \ wxPySaveThread(doSave); \ @@ -415,8 +551,8 @@ public: #define IMP_PYCALLBACK__2DBL2INT(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(double a, double b, int c, int d) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(ddii)", \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ddii)", \ a,b,c,d)); \ else \ PCLASS::CBNAME(a, b, c, d); \ @@ -436,10 +572,11 @@ public: #define IMP_PYCALLBACK__DC4DBLBOOL(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(Oddddi)", \ - wxPyConstructObject(&a, "wxDC"), \ - b, c, d, e, (int)f)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a, b, c, d, e, f); \ wxPySaveThread(doSave); \ @@ -459,10 +596,11 @@ public: bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \ bool doSave = wxPyRestoreThread(); \ bool rval; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(Oddddi)", \ - wxPyConstructObject(&a, "wxDC"), \ - b, c, d, e, (int)f)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\ + Py_DECREF(obj); \ + } \ else \ rval = PCLASS::CBNAME(a, b, c, d, e, f); \ wxPySaveThread(doSave); \ @@ -482,8 +620,8 @@ public: #define IMP_PYCALLBACK__BOOL2DBL2INT(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(bool a, double b, double c, int d, int e) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(idii)", \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iddii)", \ (int)a,b,c,d,e)); \ else \ PCLASS::CBNAME(a, b, c, d, e); \ @@ -503,10 +641,11 @@ public: #define IMP_PYCALLBACK__DC4DBL(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxDC& a, double b, double c, double d, double e) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(Odddd)", \ - wxPyConstructObject(&a, "wxDC"), \ - b, c, d, e)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Odddd)", obj, b, c, d, e)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a, b, c, d, e); \ wxPySaveThread(doSave); \ @@ -525,10 +664,11 @@ public: #define IMP_PYCALLBACK__DCBOOL(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxDC& a, bool b) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(Oi)", \ - wxPyConstructObject(&a, "wxDC"), \ - (int)b)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(&a, "wxDC", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a, b); \ wxPySaveThread(doSave); \ @@ -548,10 +688,11 @@ public: void CLASS::CBNAME(wxControlPoint* a, bool b, double c, double d, \ int e, int f) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(Oiddii)", \ - wxPyConstructObject(a, "wxPyControlPoint"), \ - (int)b, c, d, e, f)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(a, "wxPyControlPoint", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oiddii)", obj, (int)b, c, d, e, f));\ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a, b, c, d, e, f); \ wxPySaveThread(doSave); \ @@ -571,10 +712,11 @@ public: #define IMP_PYCALLBACK__WXCP2DBL2INT(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(wxControlPoint* a, double b, double c, int d, int e) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(Oddii)", \ - wxPyConstructObject(a, "wxPyControlPoint"), \ - b, c, d, e)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject(a, "wxPyControlPoint", 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddii)", obj, b, c, d, e)); \ + Py_DECREF(obj); \ + } \ else \ PCLASS::CBNAME(a, b, c, d, e); \ wxPySaveThread(doSave); \ @@ -594,8 +736,8 @@ public: #define IMP_PYCALLBACK__2DBLINT(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(double a, double b, int c) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(ddi)", a,b,c)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ddi)", a,b,c)); \ else \ PCLASS::CBNAME(a, b, c); \ wxPySaveThread(doSave); \ @@ -614,8 +756,8 @@ public: #define IMP_PYCALLBACK__BOOL2DBLINT(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(bool a, double b, double c, int d) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(iddi)", (int)a,b,c,d)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iddi)", (int)a,b,c,d)); \ else \ PCLASS::CBNAME(a, b, c, d); \ wxPySaveThread(doSave); \ @@ -635,8 +777,8 @@ public: #define IMP_PYCALLBACK__STRING(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME(const wxString& a) { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("(s)", a.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(s)", a.c_str())); \ else \ PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -656,8 +798,8 @@ public: bool CLASS::CBNAME(const wxString& a) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(s)", a.c_str())); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(s)", a.c_str())); \ else \ rval = PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -669,6 +811,65 @@ public: //--------------------------------------------------------------------------- +#define DEC_PYCALLBACK_BOOL_STRING_pure(CBNAME) \ + bool CBNAME(const wxString& a); + \ +#define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \ + bool CLASS::CBNAME(const wxString& a) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(s)", a.c_str())); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + +//--------------------------------------------------------------------------- + +#define DEC_PYCALLBACK_STRING_STRING_pure(CBNAME) \ + wxString CBNAME(const wxString& a); \ + +#define IMP_PYCALLBACK_STRING_STRING_pure(CLASS, PCLASS, CBNAME) \ + wxString CLASS::CBNAME(const wxString& a) { \ + wxString rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(s)", a.c_str())); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + +//--------------------------------------------------------------------------- + +#define DEC_PYCALLBACK_STRING_STRINGINT_pure(CBNAME) \ + wxString CBNAME(const wxString& a,int b); \ + +#define IMP_PYCALLBACK_STRING_STRINGINT_pure(CLASS, PCLASS, CBNAME) \ + wxString CLASS::CBNAME(const wxString& a,int b) { \ + wxString rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(si)", a.c_str(),b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + +//--------------------------------------------------------------------------- + #define DEC_PYCALLBACK_BOOL_STRINGSTRING(CBNAME) \ bool CBNAME(const wxString& a, const wxString& b); \ bool base_##CBNAME(const wxString& a, const wxString& b); @@ -678,8 +879,8 @@ public: bool CLASS::CBNAME(const wxString& a, const wxString& b) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(ss)", \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ss)", \ a.c_str(), b.c_str())); \ else \ rval = PCLASS::CBNAME(a, b); \ @@ -701,10 +902,14 @@ public: wxString CLASS::CBNAME() { \ wxString rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \ - rval = PyString_AsString(PyObject_Str(ro)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ } \ else \ rval = PCLASS::CBNAME(); \ @@ -725,10 +930,14 @@ public: wxString CLASS::CBNAME() { \ wxString rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \ - rval = PyString_AsString(PyObject_Str(ro)); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ } \ wxPySaveThread(doSave); \ return rval; \ @@ -744,9 +953,11 @@ public: bool CLASS::CBNAME(const wxHtmlTag& a) { \ bool rval = FALSE; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(O)", \ - wxPyConstructObject((void*)&a,"wxHtmlTag"))); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)&a,"wxHtmlTag", 0); \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ + Py_DECREF(obj); \ + } \ wxPySaveThread(doSave); \ return rval; \ } @@ -760,8 +971,8 @@ public: #define IMP_PYCALLBACK___pure(CLASS, PCLASS, CBNAME) \ void CLASS::CBNAME() { \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ wxPySaveThread(doSave); \ } @@ -775,12 +986,15 @@ public: wxSize CLASS::CBNAME() { \ wxSize rval(0,0); \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ wxSize* ptr; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \ - if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) \ - rval = *ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); \ + if (ro) { \ + if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) \ + rval = *ptr; \ + Py_DECREF(ro); \ + } \ } \ wxPySaveThread(doSave); \ return rval; \ @@ -797,9 +1011,11 @@ public: bool CLASS::CBNAME(wxWindow* a) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(O)", \ - wxPyConstructObject((void*)a,"wxWindow"))); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)a,"wxWindow", 0);\ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ + Py_DECREF(obj); \ + } \ else \ rval = PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -820,8 +1036,8 @@ public: bool CLASS::CBNAME() { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ else \ rval = PCLASS::CBNAME(); \ wxPySaveThread(doSave); \ @@ -842,8 +1058,8 @@ public: wxDragResult CLASS::CBNAME(wxCoord a, wxCoord b, wxDragResult c) { \ bool doSave = wxPyRestoreThread(); \ int rval; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c));\ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c));\ else \ rval = PCLASS::CBNAME(a, b, c); \ wxPySaveThread(doSave); \ @@ -855,6 +1071,30 @@ public: //--------------------------------------------------------------------------- +#define DEC_PYCALLBACK_FSF_FSSTRING_pure(CBNAME) \ + wxFSFile* CBNAME(wxFileSystem& fs, const wxString& location); \ + +#define IMP_PYCALLBACK_FSF_FSSTRING_pure(CLASS, PCLASS, CBNAME) \ + wxFSFile* CLASS::CBNAME(wxFileSystem& a,const wxString& b) { \ + bool doSave = wxPyRestoreThread(); \ + wxFSFile* rval=0; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + PyObject* obj = wxPyConstructObject(&a, "wxFileSystem", 0); \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(Os)", \ + obj, b.c_str())); \ + if (ro) { \ + SWIG_GetPtrObj(ro, (void **)&rval, "_wxFSFILE_p"); \ + Py_DECREF(ro); \ + } \ + Py_DECREF(obj); \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + }; + +//--------------------------------------------------------------------------- + #define DEC_PYCALLBACK_BOOL_DR(CBNAME) \ bool CBNAME(wxDragResult a); \ bool base_##CBNAME(wxDragResult a); @@ -864,8 +1104,8 @@ public: bool CLASS::CBNAME(wxDragResult a) { \ bool doSave = wxPyRestoreThread(); \ bool rval; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(i)", a)); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \ else \ rval = PCLASS::CBNAME(a); \ wxPySaveThread(doSave); \ @@ -885,8 +1125,8 @@ public: wxDragResult CLASS::CBNAME(wxCoord a, wxCoord b, wxDragResult c) { \ bool doSave = wxPyRestoreThread(); \ int rval; \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(iii)", a,b,c));\ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c));\ wxPySaveThread(doSave); \ return (wxDragResult)rval; \ } \ @@ -901,8 +1141,8 @@ public: bool CLASS::CBNAME(int a, int b, const wxString& c) { \ bool rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("(iis)",a,b,c.c_str()));\ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str()));\ wxPySaveThread(doSave); \ return rval; \ } \ @@ -918,8 +1158,8 @@ public: size_t CLASS::CBNAME() { \ size_t rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) \ - rval = m_myInst.callCallback(Py_BuildValue("()")); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ else \ rval = PCLASS::CBNAME(); \ wxPySaveThread(doSave); \ @@ -940,12 +1180,15 @@ public: wxDataFormat CLASS::CBNAME(size_t a) { \ wxDataFormat rval; \ bool doSave = wxPyRestoreThread(); \ - if (m_myInst.findCallback(#CBNAME)) { \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ wxDataFormat* ptr; \ - ro = m_myInst.callCallbackObj(Py_BuildValue("(i)", a)); \ - if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxDataFormat_p")) \ - rval = *ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)", a)); \ + if (ro) { \ + if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxDataFormat_p")) \ + rval = *ptr; \ + Py_DECREF(ro); \ + } \ } \ else \ rval = PCLASS::CBNAME(a); \ @@ -957,7 +1200,77 @@ public: } //--------------------------------------------------------------------------- + +#define DEC_PYCALLBACK__constany(CBNAME, Type) \ + void CBNAME(const Type& a); \ + void base_##CBNAME(const Type& a); + + +#define IMP_PYCALLBACK__constany(CLASS, PCLASS, CBNAME, Type) \ + void CLASS::CBNAME(const Type& a) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)&a, #Type, 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + } \ + void CLASS::base_##CBNAME(const Type& a) { \ + PCLASS::CBNAME(a); \ + } + + //--------------------------------------------------------------------------- + +#define DEC_PYCALLBACK__any(CBNAME, Type) \ + void CBNAME(Type& a); \ + void base_##CBNAME(Type& a); + + +#define IMP_PYCALLBACK__any(CLASS, PCLASS, CBNAME, Type) \ + void CLASS::CBNAME(Type& a) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)&a, #Type, 0); \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + } \ + void CLASS::base_##CBNAME(Type& a) { \ + PCLASS::CBNAME(a); \ + } + +//--------------------------------------------------------------------------- + +#define DEC_PYCALLBACK_bool_any(CBNAME, Type) \ + bool CBNAME(Type& a); \ + bool base_##CBNAME(Type& a); + + +#define IMP_PYCALLBACK_bool_any(CLASS, PCLASS, CBNAME, Type) \ + bool CLASS::CBNAME(Type& a) { \ + bool rv; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)&a, #Type, 0); \ + rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \ + Py_DECREF(obj); \ + } \ + else \ + rv = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rv; \ + } \ + bool CLASS::base_##CBNAME(Type& a) { \ + return PCLASS::CBNAME(a); \ + } + //--------------------------------------------------------------------------- #endif diff --git a/utils/wxPython/modules/html/html.i b/wxPython/src/html.i similarity index 89% rename from utils/wxPython/modules/html/html.i rename to wxPython/src/html.i index ac4b21f6e0..d87eff32a2 100644 --- a/utils/wxPython/modules/html/html.i +++ b/wxPython/src/html.i @@ -14,7 +14,7 @@ %module html %{ -#include "helpers.h" +#include "export.h" #include #include #include @@ -40,16 +40,6 @@ %extern utils.i -//--------------------------------------------------------------------------- - -%{ -#ifdef __WXMSW__ -wxString wxPyEmptyStr(""); -wxPoint wxPyDefaultPosition(wxDefaultPosition); -wxSize wxPyDefaultSize(wxDefaultSize); -#endif -%} - %pragma(python) code = "import wx" @@ -152,7 +142,16 @@ public: int GetCharHeight(); int GetCharWidth(); wxWindow* GetWindow(); - void SetFonts(wxString normal_face, wxString fixed_face, int *LIST); + //void SetFonts(wxString normal_face, wxString fixed_face, int *LIST); + %addmethods { + void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes) { + int* temp = int_LIST_helper(sizes); + if (temp) { + self->SetFonts(normal_face, fixed_face, temp); + delete [] temp; + } + } + } wxHtmlContainerCell* GetContainer(); wxHtmlContainerCell* OpenContainer(); @@ -208,8 +207,8 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag); public: wxPyHtmlTagHandler(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxHtmlTagHandler)" void SetParser(wxHtmlParser *parser); wxHtmlParser* GetParser(); @@ -243,8 +242,8 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleT public: wxPyHtmlWinTagHandler(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxHtmlWinTagHandler)" void SetParser(wxHtmlParser *parser); wxHtmlWinParser* GetParser(); @@ -266,12 +265,14 @@ public: } void OnExit() { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_tagHandlerClass); m_tagHandlerClass = NULL; for (size_t x=0; x < m_objArray.GetCount(); x++) { PyObject* obj = (PyObject*)m_objArray.Item(x); Py_DECREF(obj); } + wxPySaveThread(doSave); }; void FillHandlersTable(wxHtmlWinParser *parser) { @@ -422,9 +423,10 @@ IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("OnLinkClicked")) { - PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo"); - m_myInst.callCallback(Py_BuildValue("(O)", obj)); + if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) { + PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); + Py_DECREF(obj); } else wxHtmlWindow::OnLinkClicked(link); @@ -440,15 +442,15 @@ void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { %name(wxHtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow { public: wxPyHtmlWindow(wxWindow *parent, int id = -1, - wxPoint& pos = wxPyDefaultPosition, - wxSize& size = wxPyDefaultSize, + wxPoint& pos = wxDefaultPosition, + wxSize& size = wxDefaultSize, int flags=wxHW_SCROLLBAR_AUTO, char* name = "htmlWindow"); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxHtmlWindow)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" bool SetPage(const char* source); @@ -457,7 +459,18 @@ public: void SetRelatedFrame(wxFrame* frame, const char* format); wxFrame* GetRelatedFrame(); void SetRelatedStatusBar(int bar); - void SetFonts(wxString normal_face, wxString fixed_face, int *LIST); + + //void SetFonts(wxString normal_face, wxString fixed_face, int *LIST); + %addmethods { + void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes) { + int* temp = int_LIST_helper(sizes); + if (temp) { + self->SetFonts(normal_face, fixed_face, temp); + delete [] temp; + } + } + } + void SetTitle(const char* title); void SetBorders(int b); void ReadCustomization(wxConfigBase *cfg, char* path = ""); @@ -561,21 +574,13 @@ public: wxClassInfo::CleanUpClasses(); wxClassInfo::InitializeClasses(); - - // Until wxFileSystem is wrapped... - #if wxUSE_FS_ZIP - wxFileSystem::AddHandler(new wxZipFSHandler); - #endif - #if wxUSE_FS_INET -// wxFileSystem::AddHandler(new wxInternetFSHandler); - #endif %} //---------------------------------------------------------------------- // And this gets appended to the shadow class file. //---------------------------------------------------------------------- -%pragma(python) include="_extras.py"; +%pragma(python) include="_htmlextras.py"; //--------------------------------------------------------------------------- diff --git a/utils/wxPython/modules/html/htmlhelp.i b/wxPython/src/htmlhelp.i similarity index 59% rename from utils/wxPython/modules/html/htmlhelp.i rename to wxPython/src/htmlhelp.i index b4f99649b5..0715d1ae0b 100644 --- a/utils/wxPython/modules/html/htmlhelp.i +++ b/wxPython/src/htmlhelp.i @@ -14,7 +14,7 @@ %module htmlhelp %{ -#include "helpers.h" +#include "export.h" #include #include #include @@ -183,94 +183,4 @@ public: }; //--------------------------------------------------------------------------- - - - - - - - - - - - - - - - -#ifdef DO_WE_NEED_TO_KEEP_THIS -class wxHtmlHelpSystem : public wxHtmlHelpController { -public: - wxHtmlHelpSystem() {}; - ~wxHtmlHelpSystem() {}; - - bool AddBookParam(const wxString& title, const wxString& contfile, - const wxString& indexfile=wxEmptyString, const wxString& deftopic=wxEmptyString, - const wxString& path=wxEmptyString, bool show_wait_msg=FALSE); - // Alternative to AddBook(wxString& hhpfile) - wxToolBar* CreateToolBar(wxFrame* frame); - // creates a dockable toolbar for the frame, containing hide/show, back and forward buttons - wxTreeCtrl* CreateContentsTree(wxWindow* parent); - // creates a treecontrol with imagelist for books, folders etc and id wxID_HTML_TREECTRL - wxListBox* CreateIndexList(wxWindow* parent); - // creates a listbox with the right id - virtual void CreateHelpWindow(); - // Slightly different version than in wxHtmlHelpController; uses helpers above - // Do nothing if the window already exists - void SetControls(wxFrame* frame, wxHtmlWindow* htmlwin, - wxTreeCtrl* contents=NULL, wxListBox* index=NULL, - wxListBox* searchlist=NULL); - // alternative for CreateHelpWindow(), sets frame, htmlwindow, contents tree, index - // listbox and searchlist listbox. If null, their functionality won't be used - - // Some extra accessor functions - wxFrame* GetFrame() { return m_Frame; } - wxHtmlWindow* GetHtmlWindow() { return m_HtmlWin; } - wxTreeCtrl* GetContentsTree() { return m_ContentsBox; } - wxListBox* GetIndexList() { return m_IndexBox; } - wxListBox* GetSearchList() { return m_SearchList; } - wxImageList* GetContentsImageList() { return m_ContentsImageList; } - // public interface for wxHtmlHelpControllers handlers, so wxPython can call them - void OnToolbar(wxCommandEvent& event); - void OnContentsSel(wxTreeEvent& event) {wxHtmlHelpController::OnContentsSel(event);} - void OnIndexSel(wxCommandEvent& event) {wxHtmlHelpController::OnIndexSel(event);} - void OnSearchSel(wxCommandEvent& event) {wxHtmlHelpController::OnSearchSel(event);} - void OnSearch(wxCommandEvent& event) {wxHtmlHelpController::OnSearch(event);} - void OnCloseWindow(wxCloseEvent& event); - - // some more protected functions that should be accessible from wxPython - void RefreshLists(); - void CreateContents() { if (!m_IndexBox) return; wxHtmlHelpController::CreateContents(); } - // Adds items to m_Contents tree control - void CreateIndex() { if (! m_ContentsBox) return; wxHtmlHelpController::CreateIndex(); } - // Adds items to m_IndexList -}; - -// just for fun, an Altavista-like search engine (the gems that Vaclav has hidden in wxHtml...) -// but not for wxMSW because it's not DLL exported -//#ifndef __WXMSW__ -#ifdef THIS_IS_NOT_DEFINED_OKAY -class wxSearchEngine -{ - public: - wxSearchEngine() : wxObject() {m_Keyword = NULL;} - ~wxSearchEngine() {if (m_Keyword) free(m_Keyword);} - - void LookFor(const wxString& keyword); - // Sets the keyword we will be searching for - - bool Scan(wxInputStream *stream); - // Scans the stream for the keyword. - // Returns TRUE if the stream contains keyword, fALSE otherwise - %addmethods { - bool ScanFile(const wxString& filename) { - if (filename.IsEmpty()) - return false; - wxFileInputStream istr(filename); - return self->Scan(&istr); - } - } -}; -#endif -#endif //--------------------------------------------------------------------------- diff --git a/utils/wxPython/src/image.i b/wxPython/src/image.i similarity index 85% rename from utils/wxPython/src/image.i rename to wxPython/src/image.i index d6095c7a52..f3155144f1 100644 --- a/utils/wxPython/src/image.i +++ b/wxPython/src/image.i @@ -92,14 +92,14 @@ public: class wxImage { public: - wxImage( const wxString& name, long type = wxBITMAP_TYPE_PNG ); + wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY ); ~wxImage(); wxBitmap ConvertToBitmap(); void Create( int width, int height ); void Destroy(); wxImage Scale( int width, int height ); - void Rescale(int width, int height); + wxImage& Rescale(int width, int height); void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b ); unsigned char GetRed( int x, int y ); @@ -117,6 +117,8 @@ public: int GetHeight(); wxImage GetSubImage(const wxRect& rect); + wxImage Copy(); + void Paste( const wxImage &image, int x, int y ); //unsigned char *GetData(); //void SetData( unsigned char *data ); @@ -137,7 +139,7 @@ public: } size_t len = self->GetWidth() * self->GetHeight() * 3; - dataPtr = new unsigned char[len]; + dataPtr = (unsigned char*) malloc(len); memcpy(dataPtr, PyString_AsString(data), len); self->SetData(dataPtr); } @@ -150,6 +152,17 @@ public: void SetMask( bool mask = TRUE ); bool HasMask(); + wxImage Rotate(double angle, const wxPoint & centre_of_rotation, + bool interpolating = TRUE, wxPoint * offset_after_rotation = NULL) const ; + wxImage Rotate90( bool clockwise = TRUE ) ; + wxImage Mirror( bool horizontally = TRUE ) ; + + void Replace( unsigned char r1, unsigned char g1, unsigned char b1, + unsigned char r2, unsigned char g2, unsigned char b2 ); + + unsigned long CountColours( unsigned long stopafter = (unsigned long) -1 ); + // TODO: unsigned long ComputeHistogram( wxHashTable &h ); + }; // Alternate constructors diff --git a/utils/wxPython/src/libpy.c b/wxPython/src/libpy.c similarity index 98% rename from utils/wxPython/src/libpy.c rename to wxPython/src/libpy.c index 5841d40a50..d8d22da4f4 100644 --- a/utils/wxPython/src/libpy.c +++ b/wxPython/src/libpy.c @@ -5,10 +5,14 @@ * Contains variable linking and pointer type-checking code. ************************************************************************/ +#include +#include + +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" /* Definitions for Windows/Unix exporting */ #if defined(_WIN32) || defined(__WIN32__) @@ -401,13 +405,32 @@ SWIG_GetPtrObj(PyObject *obj, void **ptr, char *type) { if (!PyString_Check(obj)) { if (!PyInstance_Check(obj) || !(sobj = PyObject_GetAttrString(obj,"this"))) return ""; + // PyObject_GetAttrString increases sobj refcout ! + Py_DECREF(sobj); } str = PyString_AsString(sobj); return SWIG_GetPtr(str,ptr,type); } + #ifdef __cplusplus } #endif + + + + + + + + + + + + + + + + diff --git a/utils/wxPython/src/mdi.i b/wxPython/src/mdi.i similarity index 79% rename from utils/wxPython/src/mdi.i rename to wxPython/src/mdi.i index 41de685303..7a69321a9d 100644 --- a/utils/wxPython/src/mdi.i +++ b/wxPython/src/mdi.i @@ -37,12 +37,12 @@ public: wxMDIParentFrame(wxWindow *parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const char* name = "frame"); - %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" void ActivateNext(); void ActivatePrevious(); @@ -55,7 +55,10 @@ public: // TODO: This isn't handled by the standard event-table system... //wxMDIClientWindow* OnCreateClient(); + #ifdef __WXMSW__ + wxMenu* GetWindowMenu(); + void SetWindowMenu(wxMenu* menu); void SetToolBar(wxToolBar* toolbar); #endif void Tile(); @@ -68,12 +71,12 @@ public: wxMDIChildFrame(wxMDIParentFrame* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const char* name = "frame"); - %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" void Activate(); void Maximize(bool maximize); @@ -87,8 +90,8 @@ public: class wxMDIClientWindow : public wxWindow { public: wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" }; //--------------------------------------------------------------------------- diff --git a/utils/wxPython/src/misc.i b/wxPython/src/misc.i similarity index 85% rename from utils/wxPython/src/misc.i rename to wxPython/src/misc.i index 482871611a..70e22c48ac 100644 --- a/utils/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -28,6 +28,10 @@ %import _defs.i +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- @@ -81,6 +85,21 @@ public: PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y)); return tup; } + + wxRealPoint __add__(const wxRealPoint* p) { + if (! p) return *self; + return *self + *p; + } + + wxRealPoint __sub__(const wxRealPoint* p) { + if (! p) return *self; + return *self - *p; + } + + int __cmp__(const wxRealPoint* p) { + if (! p) return 0; + return *self == *p; + } } %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())" %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())" @@ -105,6 +124,21 @@ public: PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); return tup; } + + wxPoint __add__(const wxPoint* p) { + if (! p) return *self; + return *self + *p; + } + + wxPoint __sub__(const wxPoint* p) { + if (! p) return *self; + return *self - *p; + } + + int __cmp__(const wxPoint* p) { + if (! p) return 0; + return *self == *p; + } } %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())" %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())" @@ -141,6 +175,8 @@ public: void SetTop(int top); void SetBottom(int bottom); + void Inflate(int dx, int dy); + bool Inside(int cx, int cy); int x, y, width, height; @@ -153,7 +189,18 @@ public: PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height)); return tup; } + + wxRect __add__(const wxRect* rect) { + if (! rect) return *self; + return *self + *rect; + } + + int __cmp__(const wxRect* rect) { + if (! rect) return 0; + return *self == *rect; + } } + %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())" %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())" %pragma(python) addtoclass = " @@ -198,22 +245,6 @@ public: }; -// %inline %{ -// bool wxIntersectRect(wxRect* dest, wxRect* r1, wxRect* r2) { -// wxRegion reg1(*r1); -// wxRegion reg2(*r2); -// bool success; -// *dest = wxRect(0,0,0,0); -// success = reg1.Intersect(reg2); -// if (success) { -// *dest = reg1.GetBox(); -// return *dest != wxRect(0,0,0,0); -// } -// return FALSE; -// } -// %} - - %inline %{ PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); @@ -228,7 +259,9 @@ public: bool doSave = wxPyRestoreThread(); wxRect* newRect = new wxRect(dest); obj = wxPyConstructObject((void*)newRect, "wxRect"); - PyObject_SetAttrString(obj, "thisown", PyInt_FromLong(1)); + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(obj, "thisown", one); + Py_DECREF(one); wxPySaveThread(doSave); return obj; } @@ -249,7 +282,7 @@ void wxRegisterId(long id); void wxBell(); void wxDisplaySize(int *OUTPUT, int *OUTPUT); void wxEndBusyCursor(); -long wxExecute(const wxString& command, int sync = FALSE); + long wxGetElapsedTime(bool resetTimer = TRUE); #ifdef __WXMSW__ long wxGetFreeMemory(); @@ -260,10 +293,11 @@ wxString wxNow(); bool wxShell(const wxString& command = wxPyEmptyStr); void wxStartTimer(); int wxGetOsVersion(int *OUTPUT, int *OUTPUT); +wxString wxGetOsDescription(); void wxSleep(int secs); +void wxUsleep(unsigned long milliseconds); bool wxYield(); -bool wxSafeYield(); void wxEnableTopLevelWindows(bool enable); %inline %{ @@ -276,20 +310,17 @@ void wxEnableTopLevelWindows(bool enable); wxString wxStripMenuCodes(const wxString& in); + +wxString wxGetEmailAddress(); +wxString wxGetHostName(); +wxString wxGetFullHostName(); +wxString wxGetUserId(); +wxString wxGetUserName(); +wxString wxGetHomeDir(); + + //---------------------------------------------------------------------- -class wxPyTimer { -public: - wxPyTimer(PyObject* notify); - ~wxPyTimer(); - int GetInterval(); - bool IsOneShot(); - void Start(int milliseconds=-1, int oneShot=FALSE); - void Stop(); -}; - -//--------------------------------------------------------------------------- - enum wxEdge { wxLeft, wxTop, wxRight, wxBottom, wxWidth, wxHeight, wxCentre, wxCenter = wxCentre, wxCentreX, wxCentreY }; enum wxRelationship { wxUnconstrained = 0, @@ -348,7 +379,7 @@ enum wxRegionContain { class wxRegion { public: - wxRegion(); + wxRegion(long x=0, long y=0, long width=0, long height=0); ~wxRegion(); void Clear(); @@ -427,6 +458,19 @@ public: }; +wxAcceleratorEntry *wxGetAccelFromString(const wxString& label); + +%readonly +%{ +#if 0 // we want to use the definition from the header, not the + // one SWIG will generate. +%} +extern wxAcceleratorTable wxNullAcceleratorTable; +%{ +#endif +%} +%readwrite + //--------------------------------------------------------------------------- class wxBusyInfo { @@ -435,8 +479,7 @@ public: ~wxBusyInfo(); }; - - //--------------------------------------------------------------------------- + diff --git a/utils/wxPython/src/misc2.i b/wxPython/src/misc2.i similarity index 51% rename from utils/wxPython/src/misc2.i rename to wxPython/src/misc2.i index cc61878322..f1125f6239 100644 --- a/utils/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -20,6 +20,9 @@ #include #include #include +#include +#include +#include %} //---------------------------------------------------------------------- @@ -33,6 +36,11 @@ %import misc.i %import gdi.i %import events.i +%import streams.i + +%{ + static wxString wxPyEmptyStr(""); +%} //--------------------------------------------------------------------------- // Dialog Functions @@ -53,6 +61,11 @@ wxString wxGetTextFromUser(const wxString& message, int x = -1, int y = -1, bool centre = TRUE); +wxString wxGetPasswordFromUser(const wxString& message, + const wxString& caption = wxPyEmptyStr, + const wxString& default_value = wxPyEmptyStr, + wxWindow *parent = NULL); + // TODO: Need to custom wrap this one... // int wxGetMultipleChoice(char* message, char* caption, @@ -89,13 +102,24 @@ long wxGetNumberFromUser(const wxString& message, long value, long min = 0, long max = 100, wxWindow *parent = NULL, - const wxPoint& pos = wxPyDefaultPosition); + const wxPoint& pos = wxDefaultPosition); //--------------------------------------------------------------------------- // GDI Functions bool wxColourDisplay(); + int wxDisplayDepth(); +int wxGetDisplayDepth(); + +void wxDisplaySize(int* OUTPUT, int* OUTPUT); +wxSize wxGetDisplaySize(); + +#ifdef FOR_2_3 +void wxDisplaySizeMM(int* OUTPUT, int* OUTPUT); +wxSize wxGetDisplaySizeMM(); +#endif + void wxSetCursor(wxCursor& cursor); //---------------------------------------------------------------------- @@ -313,8 +337,8 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc public: wxPyFontEnumerator(); ~wxPyFontEnumerator(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxFontEnumerator)" bool EnumerateFacenames( wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all @@ -352,10 +376,372 @@ public: //---------------------------------------------------------------------- +class wxWindowDisabler { +public: + wxWindowDisabler(wxWindow *winToSkip = NULL); + ~wxWindowDisabler(); +}; + +//---------------------------------------------------------------------- + void wxPostEvent(wxEvtHandler *dest, wxEvent& event); void wxWakeUpIdle(); +bool wxSafeYield(wxWindow* win=NULL); + //---------------------------------------------------------------------- + + +class wxTipProvider +{ +public: + // wxTipProvider(size_t currentTip); **** Abstract base class + ~wxTipProvider(); + + virtual wxString GetTip() = 0; + size_t GetCurrentTip(); + +}; + + +// The C++ version of wxPyTipProvider +%{ +class wxPyTipProvider : public wxTipProvider { +public: + wxPyTipProvider(size_t currentTip) + : wxTipProvider(currentTip) {} + + DEC_PYCALLBACK_STRING__pure(GetTip); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_STRING__pure( wxPyTipProvider, wxTipProvider, GetTip); + +%} + + +// Now let SWIG know about it +class wxPyTipProvider : public wxTipProvider { +public: + wxPyTipProvider(size_t currentTip); +}; + + + +bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup = TRUE); +%new wxTipProvider * wxCreateFileTipProvider(const wxString& filename, size_t currentTip); + + +//---------------------------------------------------------------------- + +%{ +#include +static wxPoint wxPyNullPoint; +%} + +%name (wxDragImage) class wxGenericDragImage +{ +public: + + wxGenericDragImage(const wxBitmap& image, + const wxCursor& cursor = wxNullCursor, + const wxPoint& hotspot = wxPyNullPoint); + ~wxGenericDragImage(); + + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, + bool fullScreen = FALSE, wxRect* rect = NULL); + + %name(BeginDrag2) bool BeginDrag(const wxPoint& hotspot, wxWindow* window, + wxWindow* fullScreenRect); + + bool EndDrag(); + bool Move(const wxPoint& pt); + bool Show(); + bool Hide(); + + wxRect GetImageRect(const wxPoint& pos) const; + bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, + bool eraseOld, bool drawNew); +}; + + +// Alternate Constructors +%new wxGenericDragImage* wxDragIcon(const wxIcon& image, + const wxCursor& cursor = wxNullCursor, + const wxPoint& hotspot = wxPyNullPoint); + +%new wxGenericDragImage* wxDragString(const wxString& str, + const wxCursor& cursor = wxNullCursor, + const wxPoint& hotspot = wxPyNullPoint); + +%new wxGenericDragImage* wxDragTreeItem(const wxTreeCtrl& treeCtrl, wxTreeItemId& id); + +%new wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id); + + +%{ + +wxGenericDragImage* wxDragIcon(const wxIcon& image, + const wxCursor& cursor, + const wxPoint& hotspot) { + return new wxGenericDragImage(image, cursor, hotspot); +} + +wxGenericDragImage* wxDragString(const wxString& str, + const wxCursor& cursor, + const wxPoint& hotspot) { + return new wxGenericDragImage(str, cursor, hotspot); +} + +wxGenericDragImage* wxDragTreeItem(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) { + return new wxGenericDragImage(treeCtrl, id); +} + +wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) { + return new wxGenericDragImage(listCtrl, id); +} + +%} + + + +//---------------------------------------------------------------------- + +class wxPyTimer { +public: + wxPyTimer(PyObject* notify); + ~wxPyTimer(); + int GetInterval(); + bool IsOneShot(); + bool IsRunning(); + void SetOwner(wxEvtHandler *owner, int id = -1); + void Start(int milliseconds=-1, int oneShot=FALSE); + void Stop(); +}; + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- + + +enum +{ + wxLOG_FatalError, // program can't continue, abort immediately + wxLOG_Error, // a serious error, user must be informed about it + wxLOG_Warning, // user is normally informed about it but may be ignored + wxLOG_Message, // normal message (i.e. normal output of a non GUI app) + wxLOG_Info, // informational message (a.k.a. 'Verbose') + wxLOG_Status, // informational: might go to the status line of GUI app + wxLOG_Debug, // never shown to the user, disabled in release mode + wxLOG_Trace, // trace messages are also only enabled in debug mode + wxLOG_Progress, // used for progress indicator (not yet) + wxLOG_User = 100 // user defined levels start here +}; + + +class wxLog +{ +public: + wxLog(); + + static bool IsEnabled(); + static bool EnableLogging(bool doIt = TRUE); + static void OnLog(wxLogLevel level, const char *szString, int t=0); + + virtual void Flush(); + bool HasPendingMessages() const; + + static void FlushActive(); + static wxLog *GetActiveTarget(); + static wxLog *SetActiveTarget(wxLog *pLogger); + + static void Suspend(); + static void Resume(); + + void SetVerbose(bool bVerbose = TRUE); + + static void DontCreateOnDemand(); + static void SetTraceMask(wxTraceMask ulMask); + static void AddTraceMask(const wxString& str); + static void RemoveTraceMask(const wxString& str); + + bool GetVerbose() const { return m_bVerbose; } + + static wxTraceMask GetTraceMask(); + static bool IsAllowedTraceMask(const char *mask); + +}; + + +class wxLogStderr : public wxLog +{ +public: + wxLogStderr(/* TODO: FILE *fp = (FILE *) NULL*/); +}; + + +class wxLogTextCtrl : public wxLog +{ +public: + wxLogTextCtrl(wxTextCtrl *pTextCtrl); +}; + + +class wxLogGui : public wxLog +{ +public: + wxLogGui(); +}; + +class wxLogWindow : public wxLog +{ +public: + wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL) + const char *szTitle, // the title of the frame + bool bShow = TRUE, // show window immediately? + bool bPassToOld = TRUE); // pass log messages to the old target? + + void Show(bool bShow = TRUE); + wxFrame *GetFrame() const; + wxLog *GetOldLog() const; + bool IsPassingMessages() const; + void PassMessages(bool bDoPass) { m_bPassMessages = bDoPass; } +}; + + +class wxLogNull +{ +public: + wxLogNull(); + ~wxLogNull(); +}; + + +unsigned long wxSysErrorCode(); +const char* wxSysErrorMsg(unsigned long nErrCode = 0); +void wxLogFatalError(const char *szFormat); +void wxLogError(const char *szFormat); +void wxLogWarning(const char *szFormat); +void wxLogMessage(const char *szFormat); +void wxLogInfo(const char *szFormat); +void wxLogVerbose(const char *szFormat); +void wxLogStatus(const char *szFormat); +%name(wxLogStatusFrame)void wxLogStatus(wxFrame *pFrame, const char *szFormat); +void wxLogSysError(const char *szFormat); + + + +//---------------------------------------------------------------------- + +class wxProcessEvent : public wxEvent { +public: + wxProcessEvent(int id = 0, int pid = 0, int exitcode = 0); + int GetPid(); + int GetExitCode(); + int m_pid, m_exitcode; +}; + + + + +%{ // C++ version of wxProcess derived class + +class wxPyProcess : public wxProcess { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1) + : wxProcess(parent, id) + {} + + DEC_PYCALLBACK_VOID_INTINT(OnTerminate); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); +%} + + +%name(wxProcess)class wxPyProcess : public wxEvtHandler { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1); + %addmethods { void Destroy() { delete self; } } + + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxProcess)" + + void base_OnTerminate(int pid, int status); + + void Redirect(); + bool IsRedirected(); + void Detach(); + + wxInputStream *GetInputStream(); + wxInputStream *GetErrorStream(); + wxOutputStream *GetOutputStream(); + + void CloseOutput(); +}; + + + +long wxExecute(const wxString& command, + int sync = FALSE, + wxPyProcess *process = NULL); + +//---------------------------------------------------------------------- + +#ifdef __WXMSW__ +class wxJoystick { +public: + wxJoystick(int joystick = wxJOYSTICK1); + wxPoint GetPosition(); + int GetZPosition(); + int GetButtonState(); + int GetPOVPosition(); + int GetPOVCTSPosition(); + int GetRudderPosition(); + int GetUPosition(); + int GetVPosition(); + int GetMovementThreshold(); + void SetMovementThreshold(int threshold) ; + + bool IsOk(void); + int GetNumberJoysticks(); + int GetManufacturerId(); + int GetProductId(); + wxString GetProductName(); + int GetXMin(); + int GetYMin(); + int GetZMin(); + int GetXMax(); + int GetYMax(); + int GetZMax(); + int GetNumberButtons(); + int GetNumberAxes(); + int GetMaxButtons(); + int GetMaxAxes(); + int GetPollingMin(); + int GetPollingMax(); + int GetRudderMin(); + int GetRudderMax(); + int GetUMin(); + int GetUMax(); + int GetVMin(); + int GetVMax(); + + bool HasRudder(); + bool HasZ(); + bool HasU(); + bool HasV(); + bool HasPOV(); + bool HasPOV4Dir(); + bool HasPOVCTS(); + + bool SetCapture(wxWindow* win, int pollingFreq = 0); + bool ReleaseCapture(); +}; +#endif + //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/wxPython/src/msw/.cvsignore b/wxPython/src/msw/.cvsignore new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/wxPython/src/msw/.cvsignore @@ -0,0 +1 @@ + diff --git a/wxPython/src/msw/calendar.cpp b/wxPython/src/msw/calendar.cpp new file mode 100644 index 0000000000..232a7de8bc --- /dev/null +++ b/wxPython/src/msw/calendar.cpp @@ -0,0 +1,2057 @@ +/* + * FILE : src/msw/calendar.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initcalendarc + +#define SWIG_name "calendarc" + +#include "export.h" +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; +#ifdef __cplusplus +extern "C" { +#endif +#define new_wxCalendarDateAttr(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxCalendarDateAttr(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxCalendarDateAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _result; + wxColour * _arg0; + wxColour * _arg1 = (wxColour *) &wxNullColour; + wxColour * _arg2 = (wxColour *) &wxNullColour; + wxFont * _arg3 = (wxFont *) &wxNullFont; + wxCalendarDateBorder _arg4 = (wxCalendarDateBorder ) (wxCAL_BORDER_NONE); + wxColour temp; + PyObject * _obj0 = 0; + wxColour temp0; + PyObject * _obj1 = 0; + wxColour temp1; + PyObject * _obj2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "colText","colBack","colBorder","font","border", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOi:new_wxCalendarDateAttr",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4)) + return NULL; +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) + return NULL; +} + if (_obj1) +{ + _arg1 = &temp0; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} + if (_obj2) +{ + _arg2 = &temp1; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxCalendarDateAttr. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttr(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarDateAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxCalendarDateAttrBorder(_swigarg0,_swigarg1) (new wxCalendarDateAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxCalendarDateAttrBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _result; + wxCalendarDateBorder _arg0; + wxColour * _arg1 = (wxColour *) &wxNullColour; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "border","colBorder", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|O:new_wxCalendarDateAttrBorder",_kwnames,&_arg0,&_obj1)) + return NULL; + if (_obj1) +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateAttr *)new_wxCalendarDateAttrBorder(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarDateAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetTextColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetBackgroundColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetBorderColour(_swigobj,_swigarg0) (_swigobj->SetBorderColour(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetBorderColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetBorderColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetBorderColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetBorderColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarDateAttr_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetFont. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarDateAttr_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetBorder(_swigobj,_swigarg0) (_swigobj->SetBorder(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + wxCalendarDateBorder _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","border", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarDateAttr_SetBorder",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetBorder. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetBorder(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_SetHoliday(_swigobj,_swigarg0) (_swigobj->SetHoliday(_swigarg0)) +static PyObject *_wrap_wxCalendarDateAttr_SetHoliday(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","holiday", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarDateAttr_SetHoliday",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_SetHoliday. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarDateAttr_SetHoliday(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarDateAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) +static PyObject *_wrap_wxCalendarDateAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasTextColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasTextColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasBackgroundColour(_swigobj) (_swigobj->HasBackgroundColour()) +static PyObject *_wrap_wxCalendarDateAttr_HasBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasBackgroundColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasBackgroundColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasBorderColour(_swigobj) (_swigobj->HasBorderColour()) +static PyObject *_wrap_wxCalendarDateAttr_HasBorderColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasBorderColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasBorderColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasBorderColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasFont(_swigobj) (_swigobj->HasFont()) +static PyObject *_wrap_wxCalendarDateAttr_HasFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasFont. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_HasBorder(_swigobj) (_swigobj->HasBorder()) +static PyObject *_wrap_wxCalendarDateAttr_HasBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_HasBorder",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_HasBorder. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_HasBorder(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_IsHoliday(_swigobj) (_swigobj->IsHoliday()) +static PyObject *_wrap_wxCalendarDateAttr_IsHoliday(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_IsHoliday",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_IsHoliday. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarDateAttr_IsHoliday(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarDateAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxCalendarDateAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetTextColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarDateAttr_GetTextColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxCalendarDateAttr_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetBackgroundColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarDateAttr_GetBackgroundColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetBorderColour(_swigobj) (_swigobj->GetBorderColour()) +static PyObject *_wrap_wxCalendarDateAttr_GetBorderColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetBorderColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetBorderColour. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarDateAttr_GetBorderColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxCalendarDateAttr_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetFont. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxFont & _result_ref = wxCalendarDateAttr_GetFont(_arg0); + _result = (wxFont *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarDateAttr_GetBorder(_swigobj) (_swigobj->GetBorder()) +static PyObject *_wrap_wxCalendarDateAttr_GetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateBorder _result; + wxCalendarDateAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarDateAttr_GetBorder",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarDateAttr_GetBorder. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateBorder )wxCalendarDateAttr_GetBorder(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxCalendarEventTowxCommandEvent(void *ptr) { + wxCalendarEvent *src; + wxCommandEvent *dest; + src = (wxCalendarEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxCalendarEventTowxEvent(void *ptr) { + wxCalendarEvent *src; + wxEvent *dest; + src = (wxCalendarEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxCalendarEvent(_swigarg0,_swigarg1) (new wxCalendarEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxCalendarEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarEvent * _result; + wxCalendarCtrl * _arg0; + wxEventType _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cal","type", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:new_wxCalendarEvent",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCalendarEvent. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarEvent *)new_wxCalendarEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarEvent_GetDate(_swigobj) (_swigobj->GetDate()) +static PyObject *_wrap_wxCalendarEvent_GetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarEvent_GetDate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarEvent_GetDate. Expected _wxCalendarEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarEvent_GetDate(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarEvent_GetWeekDay(_swigobj) (_swigobj->GetWeekDay()) +static PyObject *_wrap_wxCalendarEvent_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::WeekDay _result; + wxCalendarEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarEvent_GetWeekDay",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarEvent_GetWeekDay. Expected _wxCalendarEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::WeekDay )wxCalendarEvent_GetWeekDay(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxCalendarCtrlTowxControl(void *ptr) { + wxCalendarCtrl *src; + wxControl *dest; + src = (wxCalendarCtrl *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxCalendarCtrlTowxWindow(void *ptr) { + wxCalendarCtrl *src; + wxWindow *dest; + src = (wxCalendarCtrl *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxCalendarCtrlTowxEvtHandler(void *ptr) { + wxCalendarCtrl *src; + wxEvtHandler *dest; + src = (wxCalendarCtrl *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxCalendarCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxCalendarCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxDateTime * _arg2 = (wxDateTime *) &wxDefaultDateTime; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) (wxCAL_SHOW_HOLIDAYS); + char * _arg6 = (char *) "calendar"; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "parent","id","date","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOls:new_wxCalendarCtrl",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCalendarCtrl. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxCalendarCtrl. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarCtrl *)new_wxCalendarCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetDate(_swigobj,_swigarg0) (_swigobj->SetDate(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCalendarCtrl_SetDate",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetDate. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetDate(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetDate(_swigobj) (_swigobj->GetDate()) +static PyObject *_wrap_wxCalendarCtrl_GetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetDate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetDate. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarCtrl_GetDate(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_EnableYearChange(_swigobj,_swigarg0) (_swigobj->EnableYearChange(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_EnableYearChange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_EnableYearChange",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_EnableYearChange. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_EnableYearChange(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_EnableMonthChange(_swigobj,_swigarg0) (_swigobj->EnableMonthChange(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_EnableMonthChange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_EnableMonthChange",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_EnableMonthChange. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_EnableMonthChange(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_EnableHolidayDisplay(_swigobj,_swigarg0) (_swigobj->EnableHolidayDisplay(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_EnableHolidayDisplay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","display", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_EnableHolidayDisplay",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_EnableHolidayDisplay. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_EnableHolidayDisplay(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_SetHeaderColours(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHeaderColours(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetHeaderColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxColour * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","colFg","colBg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxCalendarCtrl_SetHeaderColours",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHeaderColours. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHeaderColours(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetHeaderColourFg(_swigobj) (_swigobj->GetHeaderColourFg()) +static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourFg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHeaderColourFg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHeaderColourFg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourFg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetHeaderColourBg(_swigobj) (_swigobj->GetHeaderColourBg()) +static PyObject *_wrap_wxCalendarCtrl_GetHeaderColourBg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHeaderColourBg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHeaderColourBg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHeaderColourBg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetHighlightColours(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHighlightColours(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetHighlightColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxColour * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","colFg","colBg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxCalendarCtrl_SetHighlightColours",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHighlightColours. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHighlightColours(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetHighlightColourFg(_swigobj) (_swigobj->GetHighlightColourFg()) +static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourFg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHighlightColourFg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHighlightColourFg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourFg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetHighlightColourBg(_swigobj) (_swigobj->GetHighlightColourBg()) +static PyObject *_wrap_wxCalendarCtrl_GetHighlightColourBg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHighlightColourBg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHighlightColourBg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHighlightColourBg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetHolidayColours(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetHolidayColours(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetHolidayColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + wxColour * _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","colFg","colBg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxCalendarCtrl_SetHolidayColours",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHolidayColours. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHolidayColours(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_GetHolidayColourFg(_swigobj) (_swigobj->GetHolidayColourFg()) +static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourFg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHolidayColourFg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHolidayColourFg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourFg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetHolidayColourBg(_swigobj) (_swigobj->GetHolidayColourBg()) +static PyObject *_wrap_wxCalendarCtrl_GetHolidayColourBg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetHolidayColourBg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetHolidayColourBg. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxCalendarCtrl_GetHolidayColourBg(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_GetAttr(_swigobj,_swigarg0) (_swigobj->GetAttr(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarDateAttr * _result; + wxCalendarCtrl * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarCtrl_GetAttr",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetAttr. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarDateAttr *)wxCalendarCtrl_GetAttr(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalendarDateAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + size_t _arg1; + wxCalendarDateAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","day","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxCalendarCtrl_SetAttr",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetAttr. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCalendarDateAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_SetAttr. Expected _wxCalendarDateAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_SetHoliday(_swigobj,_swigarg0) (_swigobj->SetHoliday(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetHoliday(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarCtrl_SetHoliday",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetHoliday. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_SetHoliday(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_ResetAttr(_swigobj,_swigarg0) (_swigobj->ResetAttr(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_ResetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarCtrl * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCalendarCtrl_ResetAttr",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_ResetAttr. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCalendarCtrl_ResetAttr(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCalendarCtrl_HitTest(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->HitTest(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxCalendarCtrl_HitTest(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCalendarHitTestResult _result; + wxCalendarCtrl * _arg0; + wxPoint * _arg1; + wxDateTime * _arg2 = (wxDateTime *) NULL; + wxDateTime::WeekDay * _arg3 = (wxDateTime::WeekDay *) NULL; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","pos","date","wd", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OO:wxCalendarCtrl_HitTest",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_HitTest. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_HitTest. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime::WeekDay_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxCalendarCtrl_HitTest. Expected _wxDateTime::WeekDay_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCalendarHitTestResult )wxCalendarCtrl_HitTest(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyMethodDef calendarcMethods[] = { + { "wxCalendarCtrl_HitTest", (PyCFunction) _wrap_wxCalendarCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_ResetAttr", (PyCFunction) _wrap_wxCalendarCtrl_ResetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHoliday", (PyCFunction) _wrap_wxCalendarCtrl_SetHoliday, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetAttr", (PyCFunction) _wrap_wxCalendarCtrl_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetAttr", (PyCFunction) _wrap_wxCalendarCtrl_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHolidayColourBg", (PyCFunction) _wrap_wxCalendarCtrl_GetHolidayColourBg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHolidayColourFg", (PyCFunction) _wrap_wxCalendarCtrl_GetHolidayColourFg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHolidayColours", (PyCFunction) _wrap_wxCalendarCtrl_SetHolidayColours, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHighlightColourBg", (PyCFunction) _wrap_wxCalendarCtrl_GetHighlightColourBg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHighlightColourFg", (PyCFunction) _wrap_wxCalendarCtrl_GetHighlightColourFg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHighlightColours", (PyCFunction) _wrap_wxCalendarCtrl_SetHighlightColours, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHeaderColourBg", (PyCFunction) _wrap_wxCalendarCtrl_GetHeaderColourBg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetHeaderColourFg", (PyCFunction) _wrap_wxCalendarCtrl_GetHeaderColourFg, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetHeaderColours", (PyCFunction) _wrap_wxCalendarCtrl_SetHeaderColours, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_EnableHolidayDisplay", (PyCFunction) _wrap_wxCalendarCtrl_EnableHolidayDisplay, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_EnableMonthChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableMonthChange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_EnableYearChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableYearChange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetDate", (PyCFunction) _wrap_wxCalendarCtrl_GetDate, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetDate", (PyCFunction) _wrap_wxCalendarCtrl_SetDate, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarCtrl", (PyCFunction) _wrap_new_wxCalendarCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarEvent_GetWeekDay", (PyCFunction) _wrap_wxCalendarEvent_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarEvent_GetDate", (PyCFunction) _wrap_wxCalendarEvent_GetDate, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarEvent", (PyCFunction) _wrap_new_wxCalendarEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetBorder", (PyCFunction) _wrap_wxCalendarDateAttr_GetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetFont", (PyCFunction) _wrap_wxCalendarDateAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetBorderColour", (PyCFunction) _wrap_wxCalendarDateAttr_GetBorderColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetBackgroundColour", (PyCFunction) _wrap_wxCalendarDateAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_GetTextColour", (PyCFunction) _wrap_wxCalendarDateAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_IsHoliday", (PyCFunction) _wrap_wxCalendarDateAttr_IsHoliday, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasBorder", (PyCFunction) _wrap_wxCalendarDateAttr_HasBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasFont", (PyCFunction) _wrap_wxCalendarDateAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasBorderColour", (PyCFunction) _wrap_wxCalendarDateAttr_HasBorderColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasBackgroundColour", (PyCFunction) _wrap_wxCalendarDateAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_HasTextColour", (PyCFunction) _wrap_wxCalendarDateAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetHoliday", (PyCFunction) _wrap_wxCalendarDateAttr_SetHoliday, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetBorder", (PyCFunction) _wrap_wxCalendarDateAttr_SetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetFont", (PyCFunction) _wrap_wxCalendarDateAttr_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetBorderColour", (PyCFunction) _wrap_wxCalendarDateAttr_SetBorderColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetBackgroundColour", (PyCFunction) _wrap_wxCalendarDateAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarDateAttr_SetTextColour", (PyCFunction) _wrap_wxCalendarDateAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarDateAttrBorder", (PyCFunction) _wrap_new_wxCalendarDateAttrBorder, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCalendarDateAttr", (PyCFunction) _wrap_new_wxCalendarDateAttr, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_wxEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_wxEvent","_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_wxEvent","_class_wxEvent",0}, + { "_class_wxActivateEvent","_wxActivateEvent",0}, + { "_signed_long","_long",0}, + { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, + { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, + { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, + { "_class_wxDateTime","_wxDateTime",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, + { "_class_wxRegionIterator","_wxRegionIterator",0}, + { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, + { "_class_wxMenuBar","_wxMenuBar",0}, + { "_class_wxEvtHandler","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxEvtHandler",0}, + { "_wxPaintEvent","_class_wxPaintEvent",0}, + { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxCursor","_class_wxCursor",0}, + { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxMask","_class_wxMask",0}, + { "_wxPen","_class_wxPen",0}, + { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_byte","_unsigned_char",0}, + { "_wxDataObject","_class_wxDataObject",0}, + { "_wxStaticBox","_class_wxStaticBox",0}, + { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, + { "_wxPyDropSource","_class_wxPyDropSource",0}, + { "_wxChoice","_class_wxChoice",0}, + { "_wxSlider","_class_wxSlider",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_wxImageList","_class_wxImageList",0}, + { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, + { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, + { "_wxBitmapButton","_class_wxBitmapButton",0}, + { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_class_wxClipboard","_wxClipboard",0}, + { "_class_wxGauge","_wxGauge",0}, + { "_wxDC","_class_wxDC",0}, + { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_wxSpinEvent","_class_wxSpinEvent",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_class_wxRealPoint","_wxRealPoint",0}, + { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, + { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_class_wxMenuItem","_wxMenuItem",0}, + { "_class_wxPaintEvent","_wxPaintEvent",0}, + { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, + { "_wxPanel","_class_wxPanel",0}, + { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, + { "_wxCheckBox","_class_wxCheckBox",0}, + { "_wxPyEvent","_class_wxPyEvent",0}, + { "_wxTextCtrl","_class_wxTextCtrl",0}, + { "_class_wxMask","_wxMask",0}, + { "_wxTextDataObject","_class_wxTextDataObject",0}, + { "_class_wxKeyEvent","_wxKeyEvent",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, + { "_wxColour","_class_wxColour",0}, + { "_class_wxDialog","_wxDialog",0}, + { "_class_wxFileDataObject","_wxFileDataObject",0}, + { "_wxIdleEvent","_class_wxIdleEvent",0}, + { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, + { "_class_wxDataObject","_wxDataObject",0}, + { "_wxStaticLine","_class_wxStaticLine",0}, + { "_wxBrush","_class_wxBrush",0}, + { "_wxDataFormat","_class_wxDataFormat",0}, + { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, + { "_wxShowEvent","_class_wxShowEvent",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_wxPyValidator","_class_wxPyValidator",0}, + { "_class_wxEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_class_wxEvent","_wxCalendarEvent",SwigwxCalendarEventTowxEvent}, + { "_class_wxEvent","_wxEvent",0}, + { "_wxCheckListBox","_class_wxCheckListBox",0}, + { "_wxRect","_class_wxRect",0}, + { "_wxCommandEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_wxCommandEvent","_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxCommandEvent",0}, + { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_wxPoint","_class_wxPoint",0}, + { "_class_wxButton","_wxButton",0}, + { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, + { "_wxBitmap","_class_wxBitmap",0}, + { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxScrollBar","_class_wxScrollBar",0}, + { "_wxSpinButton","_class_wxSpinButton",0}, + { "_wxCalendarEvent","_class_wxCalendarEvent",0}, + { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_class_wxNotifyEvent","_wxNotifyEvent",0}, + { "_class_wxValidator","_wxValidator",0}, + { "_class_wxPyEvent","_wxPyEvent",0}, + { "_wxConfig","_class_wxConfig",0}, + { "_class_wxIconizeEvent","_wxIconizeEvent",0}, + { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, + { "_wxDropTarget","_class_wxDropTarget",0}, + { "_class_wxStaticLine","_wxStaticLine",0}, + { "_wxScrollEvent","_class_wxScrollEvent",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_class_wxRegion","_wxRegion",0}, + { "_class_wxDataFormat","_wxDataFormat",0}, + { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, + { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, + { "_wxStaticText","_class_wxStaticText",0}, + { "_wxFont","_class_wxFont",0}, + { "_class_wxPyDropTarget","_wxPyDropTarget",0}, + { "_wxCloseEvent","_class_wxCloseEvent",0}, + { "_unsigned_long","_long",0}, + { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_wxDC",0}, + { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_wxFocusEvent","_class_wxFocusEvent",0}, + { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxSpinButton","_wxSpinButton",0}, + { "_class_wxCalendarEvent","_wxCalendarEvent",0}, + { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, + { "_class_wxPanel","_wxPanel",0}, + { "_class_wxCheckBox","_wxCheckBox",0}, + { "_wxComboBox","_class_wxComboBox",0}, + { "_wxRadioButton","_class_wxRadioButton",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_class_wxTextCtrl","_wxTextCtrl",0}, + { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, + { "_class_wxTextDataObject","_wxTextDataObject",0}, + { "_wxMenu","_class_wxMenu",0}, + { "_class_wxMoveEvent","_wxMoveEvent",0}, + { "_wxListBox","_class_wxListBox",0}, + { "_wxScreenDC","_class_wxScreenDC",0}, + { "_class_wxCalendarCtrl","_wxCalendarCtrl",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_class_wxDropTarget","_wxDropTarget",0}, + { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, + { "_class_wxWindow","_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, + { "_class_wxWindow","_wxWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, + { "_class_wxStaticText","_wxStaticText",0}, + { "_class_wxFont","_wxFont",0}, + { "_wxClipboard","_class_wxClipboard",0}, + { "_class_wxPyValidator","_wxPyValidator",0}, + { "_class_wxCloseEvent","_wxCloseEvent",0}, + { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_class_wxMenuEvent","_wxMenuEvent",0}, + { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, + { "_wxClientDC","_class_wxClientDC",0}, + { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_class_wxPoint","_wxPoint",0}, + { "_wxRealPoint","_class_wxRealPoint",0}, + { "_class_wxRadioBox","_wxRadioBox",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxMemoryDC","_class_wxMemoryDC",0}, + { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_wxPaintDC","_class_wxPaintDC",0}, + { "_class_wxWindowDC","_wxWindowDC",0}, + { "_class_wxFocusEvent","_wxFocusEvent",0}, + { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, + { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, + { "_class_wxCursor","_wxCursor",0}, + { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_wxCalendarDateAttr","_class_wxCalendarDateAttr",0}, + { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, + { "_class_wxMenu","_wxMenu",0}, + { "_wxControl","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_wxControl","_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_wxControl","_class_wxControl",0}, + { "_class_wxListBox","_wxListBox",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxIcon","_class_wxIcon",0}, + { "_wxDialog","_class_wxDialog",0}, + { "_class_wxPen","_wxPen",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_class_wxStaticBox","_wxStaticBox",0}, + { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, + { "_class_wxPyDropSource","_wxPyDropSource",0}, + { "_class_wxScrollEvent","_wxScrollEvent",0}, + { "_wxJoystickEvent","_class_wxJoystickEvent",0}, + { "_class_wxChoice","_wxChoice",0}, + { "_class_wxSlider","_wxSlider",0}, + { "_class_wxImageList","_wxImageList",0}, + { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_class_wxMouseEvent","_wxMouseEvent",0}, + { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_class_wxSpinEvent","_wxSpinEvent",0}, + { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxButton","_class_wxButton",0}, + { "_wxSize","_class_wxSize",0}, + { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPaintDC","_wxPaintDC",0}, + { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, + { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, + { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, + { "_class_wxComboBox","_wxComboBox",0}, + { "_class_wxRadioButton","_wxRadioButton",0}, + { "_wxValidator","_class_wxValidator",0}, + { "_class_wxCalendarDateAttr","_wxCalendarDateAttr",0}, + { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, + { "_wxIconizeEvent","_class_wxIconizeEvent",0}, + { "_class_wxControl","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_class_wxControl","_wxCalendarCtrl",SwigwxCalendarCtrlTowxControl}, + { "_class_wxControl","_wxControl",0}, + { "_wxStaticBitmap","_class_wxStaticBitmap",0}, + { "_class_wxIcon","_wxIcon",0}, + { "_class_wxColour","_wxColour",0}, + { "_class_wxScreenDC","_wxScreenDC",0}, + { "_wxPalette","_class_wxPalette",0}, + { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxEraseEvent","_class_wxEraseEvent",0}, + { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, + { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_wxRegion","_class_wxRegion",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_class_wxShowEvent","_wxShowEvent",0}, + { "_wxPyDropTarget","_class_wxPyDropTarget",0}, + { "_wxActivateEvent","_class_wxActivateEvent",0}, + { "_wxGauge","_class_wxGauge",0}, + { "_class_wxCheckListBox","_wxCheckListBox",0}, + { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxCommandEvent","_class_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxCalendarEvent",SwigwxCalendarEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxCommandEvent",0}, + { "_class_wxClientDC","_wxClientDC",0}, + { "_class_wxSizeEvent","_wxSizeEvent",0}, + { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxSize","_wxSize",0}, + { "_class_wxBitmap","_wxBitmap",0}, + { "_class_wxMemoryDC","_wxMemoryDC",0}, + { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, + { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxEvtHandler","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxCalendarCtrl",SwigwxCalendarCtrlTowxEvtHandler}, + { "_wxEvtHandler","_class_wxEvtHandler",0}, + { "_wxMenuItem","_class_wxMenuItem",0}, + { "_class_wxScrollBar","_wxScrollBar",0}, + { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_class_wxConfig","_wxConfig",0}, + { "_wxKeyEvent","_class_wxKeyEvent",0}, + { "_wxMoveEvent","_class_wxMoveEvent",0}, + { "_wxCalendarCtrl","_class_wxCalendarCtrl",0}, + { "_class_wxPalette","_wxPalette",0}, + { "_wxFileDataObject","_class_wxFileDataObject",0}, + { "_class_wxEraseEvent","_wxEraseEvent",0}, + { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, + { "_wxWindow","_class_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, + { "_wxWindow","_wxCalendarCtrl",SwigwxCalendarCtrlTowxWindow}, + { "_wxWindow","_class_wxWindow",0}, + { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initcalendarc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("calendarc", calendarcMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxCAL_SUNDAY_FIRST", PyInt_FromLong((long) wxCAL_SUNDAY_FIRST)); + PyDict_SetItemString(d,"wxCAL_MONDAY_FIRST", PyInt_FromLong((long) wxCAL_MONDAY_FIRST)); + PyDict_SetItemString(d,"wxCAL_SHOW_HOLIDAYS", PyInt_FromLong((long) wxCAL_SHOW_HOLIDAYS)); + PyDict_SetItemString(d,"wxCAL_NO_YEAR_CHANGE", PyInt_FromLong((long) wxCAL_NO_YEAR_CHANGE)); + PyDict_SetItemString(d,"wxCAL_NO_MONTH_CHANGE", PyInt_FromLong((long) wxCAL_NO_MONTH_CHANGE)); + PyDict_SetItemString(d,"wxCAL_HITTEST_NOWHERE", PyInt_FromLong((long) wxCAL_HITTEST_NOWHERE)); + PyDict_SetItemString(d,"wxCAL_HITTEST_HEADER", PyInt_FromLong((long) wxCAL_HITTEST_HEADER)); + PyDict_SetItemString(d,"wxCAL_HITTEST_DAY", PyInt_FromLong((long) wxCAL_HITTEST_DAY)); + PyDict_SetItemString(d,"wxCAL_BORDER_NONE", PyInt_FromLong((long) wxCAL_BORDER_NONE)); + PyDict_SetItemString(d,"wxCAL_BORDER_SQUARE", PyInt_FromLong((long) wxCAL_BORDER_SQUARE)); + PyDict_SetItemString(d,"wxCAL_BORDER_ROUND", PyInt_FromLong((long) wxCAL_BORDER_ROUND)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_CALENDAR_DOUBLECLICKED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_SEL_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_SEL_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_DAY_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_DAY_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_MONTH_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_MONTH_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_YEAR_CHANGED", PyInt_FromLong((long) wxEVT_CALENDAR_YEAR_CHANGED)); + PyDict_SetItemString(d,"wxEVT_CALENDAR_WEEKDAY_CLICKED", PyInt_FromLong((long) wxEVT_CALENDAR_WEEKDAY_CLICKED)); + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/calendar.py b/wxPython/src/msw/calendar.py new file mode 100644 index 0000000000..68f6bf2c7b --- /dev/null +++ b/wxPython/src/msw/calendar.py @@ -0,0 +1,244 @@ +# This file was created automatically by SWIG. +import calendarc + +from misc import * + +from windows import * + +from gdi import * + +from clip_dnd import * + +from controls import * + +from events import * + +from utils import * +import wx + +def EVT_CALENDAR(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_DOUBLECLICKED, fn) + +def EVT_CALENDAR_SEL_CHANGED(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_SEL_CHANGED, fn) + +def EVT_CALENDAR_DAY(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_DAY_CHANGED, fn) + +def EVT_CALENDAR_MONTH(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_MONTH_CHANGED, fn) + +def EVT_CALENDAR_YEAR(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_YEAR_CHANGED, fn) + +def EVT_CALENDAR_WEEKDAY_CLICKED(win, id, fn): + win.Connect(id, -1, wxEVT_CALENDAR_WEEKDAY_CLICKED, fn) + + +class wxCalendarDateAttrPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetTextColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetBorderColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetBorderColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetFont,(self,) + _args, _kwargs) + return val + def SetBorder(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetBorder,(self,) + _args, _kwargs) + return val + def SetHoliday(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_SetHoliday,(self,) + _args, _kwargs) + return val + def HasTextColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasTextColour,(self,) + _args, _kwargs) + return val + def HasBackgroundColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasBackgroundColour,(self,) + _args, _kwargs) + return val + def HasBorderColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasBorderColour,(self,) + _args, _kwargs) + return val + def HasFont(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasFont,(self,) + _args, _kwargs) + return val + def HasBorder(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_HasBorder,(self,) + _args, _kwargs) + return val + def IsHoliday(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_IsHoliday,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBorderColour(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetBorderColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetFont(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def GetBorder(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarDateAttr_GetBorder,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCalendarDateAttr(wxCalendarDateAttrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(calendarc.new_wxCalendarDateAttr,_args,_kwargs) + self.thisown = 1 + + + +def wxCalendarDateAttrBorder(*_args,**_kwargs): + val = wxCalendarDateAttrPtr(apply(calendarc.new_wxCalendarDateAttrBorder,_args,_kwargs)) + val.thisown = 1 + return val + + +class wxCalendarEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetDate(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarEvent_GetDate,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetWeekDay(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarEvent_GetWeekDay,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCalendarEvent(wxCalendarEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(calendarc.new_wxCalendarEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxCalendarCtrlPtr(wxControlPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetDate(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetDate,(self,) + _args, _kwargs) + return val + def GetDate(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetDate,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def EnableYearChange(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_EnableYearChange,(self,) + _args, _kwargs) + return val + def EnableMonthChange(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_EnableMonthChange,(self,) + _args, _kwargs) + return val + def EnableHolidayDisplay(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_EnableHolidayDisplay,(self,) + _args, _kwargs) + return val + def SetHeaderColours(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHeaderColours,(self,) + _args, _kwargs) + return val + def GetHeaderColourFg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHeaderColourFg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetHeaderColourBg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHeaderColourBg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def SetHighlightColours(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHighlightColours,(self,) + _args, _kwargs) + return val + def GetHighlightColourFg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHighlightColourFg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetHighlightColourBg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHighlightColourBg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def SetHolidayColours(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHolidayColours,(self,) + _args, _kwargs) + return val + def GetHolidayColourFg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHolidayColourFg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetHolidayColourBg(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetHolidayColourBg,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetAttr(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_GetAttr,(self,) + _args, _kwargs) + if val: val = wxCalendarDateAttrPtr(val) + return val + def SetAttr(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetAttr,(self,) + _args, _kwargs) + return val + def SetHoliday(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_SetHoliday,(self,) + _args, _kwargs) + return val + def ResetAttr(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_ResetAttr,(self,) + _args, _kwargs) + return val + def HitTest(self, *_args, **_kwargs): + val = apply(calendarc.wxCalendarCtrl_HitTest,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCalendarCtrl(wxCalendarCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(calendarc.new_wxCalendarCtrl,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxCAL_SUNDAY_FIRST = calendarc.wxCAL_SUNDAY_FIRST +wxCAL_MONDAY_FIRST = calendarc.wxCAL_MONDAY_FIRST +wxCAL_SHOW_HOLIDAYS = calendarc.wxCAL_SHOW_HOLIDAYS +wxCAL_NO_YEAR_CHANGE = calendarc.wxCAL_NO_YEAR_CHANGE +wxCAL_NO_MONTH_CHANGE = calendarc.wxCAL_NO_MONTH_CHANGE +wxCAL_HITTEST_NOWHERE = calendarc.wxCAL_HITTEST_NOWHERE +wxCAL_HITTEST_HEADER = calendarc.wxCAL_HITTEST_HEADER +wxCAL_HITTEST_DAY = calendarc.wxCAL_HITTEST_DAY +wxCAL_BORDER_NONE = calendarc.wxCAL_BORDER_NONE +wxCAL_BORDER_SQUARE = calendarc.wxCAL_BORDER_SQUARE +wxCAL_BORDER_ROUND = calendarc.wxCAL_BORDER_ROUND +wxEVT_CALENDAR_DOUBLECLICKED = calendarc.wxEVT_CALENDAR_DOUBLECLICKED +wxEVT_CALENDAR_SEL_CHANGED = calendarc.wxEVT_CALENDAR_SEL_CHANGED +wxEVT_CALENDAR_DAY_CHANGED = calendarc.wxEVT_CALENDAR_DAY_CHANGED +wxEVT_CALENDAR_MONTH_CHANGED = calendarc.wxEVT_CALENDAR_MONTH_CHANGED +wxEVT_CALENDAR_YEAR_CHANGED = calendarc.wxEVT_CALENDAR_YEAR_CHANGED +wxEVT_CALENDAR_WEEKDAY_CLICKED = calendarc.wxEVT_CALENDAR_WEEKDAY_CLICKED + + +#-------------- USER INCLUDE ----------------------- + + +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxCalendarEventPtr = wxCalendarEventPtr diff --git a/utils/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp similarity index 94% rename from utils/wxPython/src/msw/clip_dnd.cpp rename to wxPython/src/msw/clip_dnd.cpp index a1bcc8590e..d4ccd97f49 100644 --- a/utils/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/clip_dnd.cpp + * FILE : src/msw/clip_dnd.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,7 +62,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -137,9 +138,12 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) { if (m_myInst.findCallback("GetDataHere")) { PyObject* ro; ro = m_myInst.callCallbackObj(Py_BuildValue("()")); - rval = (ro != Py_None && PyString_Check(ro)); - if (rval) - memcpy(buf, PyString_AsString(ro), PyString_Size(ro)); + if (ro) { + rval = (ro != Py_None && PyString_Check(ro)); + if (rval) + memcpy(buf, PyString_AsString(ro), PyString_Size(ro)); + Py_DECREF(ro); + } } wxPySaveThread(doSave); return rval; @@ -192,8 +196,11 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() { PyObject* ro; wxBitmap* ptr; ro = m_myInst.callCallbackObj(Py_BuildValue("()")); - if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p")) - rval = ptr; + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p")) + rval = ptr; + Py_DECREF(ro); + } } wxPySaveThread(doSave); return *rval; @@ -337,11 +344,22 @@ static PyObject *_wrap_wxCustomDataFormat(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCustomDataFormat",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1026,17 +1044,19 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args, return _resultobj; } -#define wxPyDataObjectSimple__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyDataObjectSimple__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyDataObjectSimple__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDataObjectSimple * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDataObjectSimple__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDataObjectSimple__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1048,9 +1068,12 @@ static PyObject *_wrap_wxPyDataObjectSimple__setSelf(PyObject *self, PyObject *a { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyDataObjectSimple__setSelf(_arg0,_arg1); + wxPyDataObjectSimple__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1158,11 +1181,22 @@ static PyObject *_wrap_new_wxTextDataObject(PyObject *self, PyObject *args, PyOb return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1262,11 +1296,22 @@ static PyObject *_wrap_wxTextDataObject_SetText(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1320,11 +1365,22 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1345,17 +1401,19 @@ static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxPyTextDataObject__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyTextDataObject__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyTextDataObject__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextDataObject * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyTextDataObject__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyTextDataObject__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1367,9 +1425,12 @@ static PyObject *_wrap_wxPyTextDataObject__setSelf(PyObject *self, PyObject *arg { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyTextDataObject__setSelf(_arg0,_arg1); + wxPyTextDataObject__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1550,17 +1611,19 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args, return _resultobj; } -#define wxPyBitmapDataObject__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyBitmapDataObject__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyBitmapDataObject__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyBitmapDataObject * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyBitmapDataObject__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyBitmapDataObject__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1572,9 +1635,12 @@ static PyObject *_wrap_wxPyBitmapDataObject__setSelf(PyObject *self, PyObject *a { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyBitmapDataObject__setSelf(_arg0,_arg1); + wxPyBitmapDataObject__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1658,6 +1724,57 @@ static PyObject *_wrap_wxFileDataObject_GetFilenames(PyObject *self, PyObject *a return _resultobj; } +#define wxFileDataObject_AddFile(_swigobj,_swigarg0) (_swigobj->AddFile(_swigarg0)) +static PyObject *_wrap_wxFileDataObject_AddFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileDataObject * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDataObject_AddFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDataObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDataObject_AddFile. Expected _wxFileDataObject_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileDataObject_AddFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + static void *SwigwxCustomDataObjectTowxDataObjectSimple(void *ptr) { wxCustomDataObject *src; wxDataObjectSimple *dest; @@ -2232,18 +2349,20 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxDropSource__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +#define wxDropSource__setSelf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setSelf(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxDropSource__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDropSource * _arg0; PyObject * _arg1; - int _arg2; + PyObject * _arg2; + int _arg3; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self","incref", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class","incref", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxDropSource__setSelf",_kwnames,&_argo0,&_obj1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOi:wxDropSource__setSelf",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2255,9 +2374,12 @@ static PyObject *_wrap_wxDropSource__setSelf(PyObject *self, PyObject *args, PyO { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxDropSource__setSelf(_arg0,_arg1,_arg2); + wxDropSource__setSelf(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2497,17 +2619,19 @@ static PyObject *_wrap_new_wxPyDropTarget(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxPyDropTarget__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPyDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPyDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDropTarget * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDropTarget__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2519,9 +2643,12 @@ static PyObject *_wrap_wxPyDropTarget__setSelf(PyObject *self, PyObject *args, P { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyDropTarget__setSelf(_arg0,_arg1); + wxPyDropTarget__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2810,17 +2937,19 @@ static PyObject *_wrap_new_wxTextDropTarget(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxTextDropTarget__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxTextDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTextDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextDropTarget * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextDropTarget__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2832,9 +2961,12 @@ static PyObject *_wrap_wxTextDropTarget__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxTextDropTarget__setSelf(_arg0,_arg1); + wxTextDropTarget__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3029,17 +3161,19 @@ static PyObject *_wrap_new_wxFileDropTarget(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxFileDropTarget__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxFileDropTarget__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxFileDropTarget__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyFileDropTarget * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDropTarget__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileDropTarget__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3051,9 +3185,12 @@ static PyObject *_wrap_wxFileDropTarget__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxFileDropTarget__setSelf(_arg0,_arg1); + wxFileDropTarget__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3256,6 +3393,7 @@ static PyMethodDef clip_dndcMethods[] = { { "wxCustomDataObject_SetData", (PyCFunction) _wrap_wxCustomDataObject_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxCustomDataObject_TakeData", (PyCFunction) _wrap_wxCustomDataObject_TakeData, METH_VARARGS | METH_KEYWORDS }, { "new_wxCustomDataObject", (PyCFunction) _wrap_new_wxCustomDataObject, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDataObject_AddFile", (PyCFunction) _wrap_wxFileDataObject_AddFile, METH_VARARGS | METH_KEYWORDS }, { "wxFileDataObject_GetFilenames", (PyCFunction) _wrap_wxFileDataObject_GetFilenames, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileDataObject", (PyCFunction) _wrap_new_wxFileDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxPyBitmapDataObject__setSelf", (PyCFunction) _wrap_wxPyBitmapDataObject__setSelf, METH_VARARGS | METH_KEYWORDS }, @@ -3315,6 +3453,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -3344,7 +3483,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDataObject","_class_wxDataObject",0}, { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, { "_wxPyDropSource","_class_wxPyDropSource",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -3371,12 +3509,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMask","_wxMask",0}, { "_wxTextDataObject","_class_wxPyTextDataObject",SwigwxPyTextDataObjectTowxTextDataObject}, { "_wxTextDataObject","_wxPyTextDataObject",SwigwxPyTextDataObjectTowxTextDataObject}, @@ -3421,14 +3559,16 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxRect","_class_wxRect",0}, { "_wxPoint","_class_wxPoint",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_wxDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxDropTarget}, @@ -3451,11 +3591,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_class_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget}, { "_class_wxPyDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, @@ -3501,6 +3639,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3515,6 +3654,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3523,15 +3663,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -3547,6 +3694,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_wxRegion","_class_wxRegion",0}, @@ -3562,8 +3710,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxPalette","_wxPalette",0}, { "_wxFileDataObject","_class_wxFileDataObject",0}, { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, diff --git a/utils/wxPython/src/msw/clip_dnd.py b/wxPython/src/msw/clip_dnd.py similarity index 97% rename from utils/wxPython/src/msw/clip_dnd.py rename to wxPython/src/msw/clip_dnd.py index 471aecf292..8be9ceb3a4 100644 --- a/utils/wxPython/src/msw/clip_dnd.py +++ b/wxPython/src/msw/clip_dnd.py @@ -109,7 +109,7 @@ class wxPyDataObjectSimple(wxPyDataObjectSimplePtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyDataObjectSimple,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyDataObjectSimple) @@ -168,7 +168,7 @@ class wxPyTextDataObject(wxPyTextDataObjectPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyTextDataObject,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyTextDataObject) @@ -207,7 +207,7 @@ class wxPyBitmapDataObject(wxPyBitmapDataObjectPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxPyBitmapDataObject,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPyBitmapDataObject) @@ -219,6 +219,9 @@ class wxFileDataObjectPtr(wxDataObjectSimplePtr): def GetFilenames(self, *_args, **_kwargs): val = apply(clip_dndc.wxFileDataObject_GetFilenames,(self,) + _args, _kwargs) return val + def AddFile(self, *_args, **_kwargs): + val = apply(clip_dndc.wxFileDataObject_AddFile,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFileDataObject(wxFileDataObjectPtr): @@ -333,7 +336,7 @@ class wxDropSource(wxDropSourcePtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxDropSource,_args,_kwargs) self.thisown = 1 - self._setSelf(self, 0) + self._setSelf(self, wxDropSource, 0) @@ -391,7 +394,7 @@ class wxPyDropTarget(wxPyDropTargetPtr): self.this = apply(clip_dndc.new_wxPyDropTarget,_args,_kwargs) self.thisown = 1 if _args:_args[0].thisown = 0 - self._setSelf(self) + self._setSelf(self, wxPyDropTarget) @@ -424,7 +427,7 @@ class wxTextDropTarget(wxTextDropTargetPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxTextDropTarget,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxTextDropTarget) @@ -457,7 +460,7 @@ class wxFileDropTarget(wxFileDropTargetPtr): def __init__(self,*_args,**_kwargs): self.this = apply(clip_dndc.new_wxFileDropTarget,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxFileDropTarget) diff --git a/utils/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp similarity index 92% rename from utils/wxPython/src/msw/cmndlgs.cpp rename to wxPython/src/msw/cmndlgs.cpp index f39258cd2b..aaed3689ec 100644 --- a/utils/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/cmndlgs.cpp + * FILE : src/msw/cmndlgs.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,7 +63,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -288,11 +289,12 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py wxColourData * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourData_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourData_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -301,13 +303,11 @@ static PyObject *_wrap_wxColourData_SetColour(PyObject *self, PyObject *args, Py return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxColourData_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxColourData_SetColour(_arg0,*_arg1); @@ -325,11 +325,12 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar int _arg1; wxColour * _arg2; PyObject * _argo0 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","i","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxColourData_SetCustomColour",_kwnames,&_argo0,&_arg1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxColourData_SetCustomColour",_kwnames,&_argo0,&_arg1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -338,13 +339,11 @@ static PyObject *_wrap_wxColourData_SetCustomColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxColourData_SetCustomColour. Expected _wxColour_p."); +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxColourData_SetCustomColour(_arg0,_arg1,*_arg2); @@ -532,7 +531,7 @@ static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject char * _arg1 = (char *) "Choose a directory"; char * _arg2 = (char *) ""; long _arg3 = (long ) 0; - wxPoint * _arg4 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj4 = 0; @@ -681,11 +680,22 @@ static PyObject *_wrap_wxDirDialog_SetMessage(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -721,11 +731,22 @@ static PyObject *_wrap_wxDirDialog_SetPath(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -810,7 +831,7 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject char * _arg3 = (char *) ""; char * _arg4 = (char *) "*.*"; long _arg5 = (long ) 0; - wxPoint * _arg6 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg6 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj6 = 0; @@ -1082,11 +1103,22 @@ static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1122,11 +1154,22 @@ static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1190,11 +1233,22 @@ static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1230,11 +1284,22 @@ static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1298,11 +1363,22 @@ static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1345,6 +1421,84 @@ static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, Py return _resultobj; } +static PyObject * wxFileDialog_GetFilenames(wxFileDialog *self) { + wxArrayString arr; + self->GetFilenames(arr); + size_t count = arr.GetCount(); + PyObject* listObj = PyList_New(0); + for(size_t x=0; xGetPaths(arr); + size_t count = arr.GetCount(); + PyObject* listObj = PyList_New(0); + for(size_t x=0; x= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj4) { @@ -1627,7 +1803,7 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO char * _arg2 = (char *) "Input Text"; char * _arg3 = (char *) ""; long _arg4 = (long ) wxOK|wxCANCEL|wxCENTRE; - wxPoint * _arg5 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg5 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj5 = 0; @@ -1717,11 +1893,22 @@ static PyObject *_wrap_wxTextEntryDialog_SetValue(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2092,11 +2279,12 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb wxFontData * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontData_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontData_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2105,13 +2293,11 @@ static PyObject *_wrap_wxFontData_SetColour(PyObject *self, PyObject *args, PyOb return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxFontData_SetColour(_arg0,*_arg1); @@ -2394,7 +2580,7 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj char * _arg1; char * _arg2 = (char *) "Message box"; long _arg3 = (long ) wxOK|wxCANCEL|wxCENTRE; - wxPoint * _arg4 = (wxPoint *) &wxPyDefaultPosition; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj4 = 0; @@ -2502,18 +2688,40 @@ static PyObject *_wrap_new_wxProgressDialog(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOi:new_wxProgressDialog",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -2634,6 +2842,8 @@ static PyMethodDef cmndlgscMethods[] = { { "wxSingleChoiceDialog_GetStringSelection", (PyCFunction) _wrap_wxSingleChoiceDialog_GetStringSelection, METH_VARARGS | METH_KEYWORDS }, { "wxSingleChoiceDialog_GetSelection", (PyCFunction) _wrap_wxSingleChoiceDialog_GetSelection, METH_VARARGS | METH_KEYWORDS }, { "new_wxSingleChoiceDialog", (PyCFunction) _wrap_new_wxSingleChoiceDialog, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetPaths", (PyCFunction) _wrap_wxFileDialog_GetPaths, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetFilenames", (PyCFunction) _wrap_wxFileDialog_GetFilenames, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_ShowModal", (PyCFunction) _wrap_wxFileDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_SetWildcard", (PyCFunction) _wrap_wxFileDialog_SetWildcard, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_SetStyle", (PyCFunction) _wrap_wxFileDialog_SetStyle, METH_VARARGS | METH_KEYWORDS }, @@ -2693,7 +2903,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -2731,7 +2943,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -2748,13 +2959,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -2811,10 +3022,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -2824,10 +3037,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, @@ -2858,7 +3073,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -2867,9 +3081,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxMessageDialog",SwigwxMessageDialogTowxPanel}, @@ -2965,6 +3179,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3005,6 +3220,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3014,6 +3230,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3024,11 +3241,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -3054,6 +3277,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -3097,8 +3321,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, { "_class_wxColourDialog","_wxColourDialog",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, diff --git a/utils/wxPython/src/gtk/cmndlgs.py b/wxPython/src/msw/cmndlgs.py similarity index 95% rename from utils/wxPython/src/gtk/cmndlgs.py rename to wxPython/src/msw/cmndlgs.py index 1935f27a3e..0947274149 100644 --- a/utils/wxPython/src/gtk/cmndlgs.py +++ b/wxPython/src/msw/cmndlgs.py @@ -71,7 +71,7 @@ class wxColourDialog(wxColourDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxColourDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -104,7 +104,7 @@ class wxDirDialog(wxDirDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxDirDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -158,13 +158,19 @@ class wxFileDialogPtr(wxDialogPtr): def ShowModal(self, *_args, **_kwargs): val = apply(cmndlgsc.wxFileDialog_ShowModal,(self,) + _args, _kwargs) return val + def GetFilenames(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFileDialog_GetFilenames,(self,) + _args, _kwargs) + return val + def GetPaths(self, *_args, **_kwargs): + val = apply(cmndlgsc.wxFileDialog_GetPaths,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFileDialog(wxFileDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFileDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -191,7 +197,7 @@ class wxSingleChoiceDialog(wxSingleChoiceDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxSingleChoiceDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -215,7 +221,7 @@ class wxTextEntryDialog(wxTextEntryDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxTextEntryDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -296,7 +302,7 @@ class wxFontDialog(wxFontDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxFontDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -314,7 +320,7 @@ class wxMessageDialog(wxMessageDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(cmndlgsc.new_wxMessageDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) diff --git a/utils/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp similarity index 90% rename from utils/wxPython/src/msw/controls.cpp rename to wxPython/src/msw/controls.cpp index 898b7a380f..7c63d3c250 100644 --- a/utils/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/controls.cpp + * FILE : src/msw/controls.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -56,6 +58,7 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include #include +#include #include #include //#include @@ -73,7 +76,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -120,8 +122,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -wxValidator wxPyDefaultValidator; // Non-const default because of SWIG - wxSize wxButton_GetDefaultSize() { return wxButton::GetDefaultSize(); } @@ -184,10 +184,10 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k wxControl * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "control"; PyObject * _argo0 = 0; wxPoint temp; @@ -330,11 +330,22 @@ static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -381,10 +392,10 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "button"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -407,11 +418,22 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -484,11 +506,12 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar wxButton * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -497,13 +520,11 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxButton_SetBackgroundColour(_arg0,*_arg1); @@ -520,11 +541,12 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar wxButton * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetForegroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxButton_SetForegroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -533,13 +555,11 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetForegroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxButton_SetForegroundColour(_arg0,*_arg1); @@ -589,10 +609,10 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje wxWindow * _arg0; wxWindowID _arg1; wxBitmap * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxBU_AUTODRAW; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "button"; PyObject * _argo0 = 0; PyObject * _argo2 = 0; @@ -939,6 +959,89 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a return _resultobj; } +#define wxBitmapButton_SetMargins(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMargins(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxBitmapButton_SetMargins(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxBitmapButton_SetMargins",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmapButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_SetMargins. Expected _wxBitmapButton_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBitmapButton_GetMarginX(_swigobj) (_swigobj->GetMarginX()) +static PyObject *_wrap_wxBitmapButton_GetMarginX(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxBitmapButton * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBitmapButton_GetMarginX",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmapButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetMarginX. Expected _wxBitmapButton_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmapButton_GetMarginX(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmapButton_GetMarginY(_swigobj) (_swigobj->GetMarginY()) +static PyObject *_wrap_wxBitmapButton_GetMarginY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxBitmapButton * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBitmapButton_GetMarginY",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmapButton_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapButton_GetMarginY. Expected _wxBitmapButton_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmapButton_GetMarginY(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxCheckBoxTowxControl(void *ptr) { wxCheckBox *src; wxControl *dest; @@ -970,10 +1073,10 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "checkBox"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -996,11 +1099,22 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -1127,12 +1241,12 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw wxChoice * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) 0; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "choice"; PyObject * _argo0 = 0; wxPoint temp; @@ -1226,11 +1340,22 @@ static PyObject *_wrap_wxChoice_Append(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1294,11 +1419,22 @@ static PyObject *_wrap_wxChoice_FindString(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1535,11 +1671,22 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1594,12 +1741,12 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; char * _arg2 = (char *) ""; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; int _arg5 = (int ) 0; wxString * _arg6 = (wxString *) NULL; long _arg7 = (long ) 0; - wxValidator * _arg8 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; char * _arg9 = (char *) "comboBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -1693,11 +1840,22 @@ static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1843,11 +2001,22 @@ static PyObject *_wrap_wxComboBox_FindString(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2116,11 +2285,22 @@ static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2297,11 +2477,22 @@ static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2348,10 +2539,10 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa wxWindow * _arg0; wxWindowID _arg1; int _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxGA_HORIZONTAL; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "gauge"; PyObject * _argo0 = 0; wxPoint temp; @@ -2657,8 +2848,8 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticBox"; PyObject * _argo0 = 0; @@ -2681,11 +2872,22 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -2748,8 +2950,8 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject wxStaticLine * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxLI_HORIZONTAL; char * _arg5 = (char *) "staticLine"; PyObject * _argo0 = 0; @@ -2828,8 +3030,8 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticText"; PyObject * _argo0 = 0; @@ -2852,11 +3054,22 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -2941,11 +3154,22 @@ static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2991,12 +3215,12 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k wxListBox * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "listBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -3090,11 +3314,22 @@ static PyObject *_wrap_wxListBox_Append(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3214,11 +3449,22 @@ static PyObject *_wrap_wxListBox_FindString(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3264,7 +3510,7 @@ static PyObject * wxListBox_GetSelections(wxListBox *self) { wxArrayInt lst; self->GetSelections(lst); PyObject *tup = PyTuple_New(lst.GetCount()); - for(int i=0; i= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3633,11 +3890,22 @@ static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3675,11 +3943,22 @@ static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } _arg2 = (bool ) tempbool2; { @@ -3734,12 +4013,12 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje wxCheckListBox * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) 0; wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; - wxValidator * _arg7 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; char * _arg8 = (char *) "listBox"; PyObject * _argo0 = 0; wxPoint temp; @@ -3976,10 +4255,10 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; char * _arg2 = (char *) ""; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "text"; PyObject * _argo0 = 0; wxPoint temp; @@ -4364,11 +4643,22 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4509,11 +4799,22 @@ static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4550,11 +4851,22 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4703,11 +5015,22 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4771,11 +5094,22 @@ static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4811,11 +5145,22 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5145,11 +5490,22 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5195,10 +5551,10 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject wxScrollBar * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSB_HORIZONTAL; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "scrollBar"; PyObject * _argo0 = 0; wxPoint temp; @@ -5453,8 +5809,8 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject wxSpinButton * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_HORIZONTAL; char * _arg5 = (char *) "spinButton"; PyObject * _argo0 = 0; @@ -5671,8 +6027,8 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje wxWindow * _arg0; wxWindowID _arg1; wxBitmap * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; char * _arg6 = (char *) "staticBitmap"; PyObject * _argo0 = 0; @@ -5866,13 +6222,13 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; int _arg5 = (int ) 0; wxString * _arg6 = (wxString *) NULL; int _arg7 = (int ) 0; long _arg8 = (long ) wxRA_HORIZONTAL; - wxValidator * _arg9 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; char * _arg10 = (char *) "radioBox"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -5896,11 +6252,22 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -6040,11 +6407,22 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6232,11 +6610,22 @@ static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6300,11 +6689,22 @@ static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6412,10 +6812,10 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - wxValidator * _arg6 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; char * _arg7 = (char *) "radioButton"; PyObject * _argo0 = 0; PyObject * _obj2 = 0; @@ -6438,11 +6838,22 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -6572,10 +6983,10 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw int _arg2; int _arg3; int _arg4; - wxPoint * _arg5 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg6 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg5 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg6 = (wxSize *) &wxDefaultSize; long _arg7 = (long ) wxSL_HORIZONTAL; - wxValidator * _arg8 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; char * _arg9 = (char *) "slider"; PyObject * _argo0 = 0; wxPoint temp; @@ -7154,7 +7565,242 @@ static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static void *SwigwxSpinCtrlTowxSpinButton(void *ptr) { + wxSpinCtrl *src; + wxSpinButton *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxSpinButton *) src; + return (void *) dest; +} + +static void *SwigwxSpinCtrlTowxControl(void *ptr) { + wxSpinCtrl *src; + wxControl *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxSpinCtrlTowxWindow(void *ptr) { + wxSpinCtrl *src; + wxWindow *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxSpinCtrlTowxEvtHandler(void *ptr) { + wxSpinCtrl *src; + wxEvtHandler *dest; + src = (wxSpinCtrl *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxSpinCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxSpinCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _result; + wxWindow * _arg0; + wxWindowID _arg1 = (wxWindowID ) -1; + char * _arg2 = (char *) ""; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxSP_ARROW_KEYS; + int _arg6 = (int ) 0; + int _arg7 = (int ) 100; + int _arg8 = (int ) 0; + char * _arg9 = (char *) "wxSpinCtrl"; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "parent","id","value","pos","size","style","min","max","initial","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|isOOliiis:new_wxSpinCtrl",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_arg7,&_arg8,&_arg9)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSpinCtrl. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSpinCtrl_GetMax(_swigobj) (_swigobj->GetMax()) +static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMax. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetMin(_swigobj) (_swigobj->GetMin()) +static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetMin. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_GetValue(_swigobj) (_swigobj->GetValue()) +static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSpinCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSpinCtrl_GetValue",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_GetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSpinCtrl_GetValue(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSpinCtrl_SetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","min","max", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSpinCtrl_SetRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetRange. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSpinCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) +static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSpinCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSpinCtrl_SetValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSpinCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSpinCtrl_SetValue. Expected _wxSpinCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSpinCtrl_SetValue(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef controlscMethods[] = { + { "wxSpinCtrl_SetValue", (PyCFunction) _wrap_wxSpinCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_SetRange", (PyCFunction) _wrap_wxSpinCtrl_SetRange, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetValue", (PyCFunction) _wrap_wxSpinCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMin", (PyCFunction) _wrap_wxSpinCtrl_GetMin, METH_VARARGS | METH_KEYWORDS }, + { "wxSpinCtrl_GetMax", (PyCFunction) _wrap_wxSpinCtrl_GetMax, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSpinCtrl", (PyCFunction) _wrap_new_wxSpinCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetValue", (PyCFunction) _wrap_wxSlider_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetTick", (PyCFunction) _wrap_wxSlider_SetTick, METH_VARARGS | METH_KEYWORDS }, { "wxSlider_SetThumbLength", (PyCFunction) _wrap_wxSlider_SetThumbLength, METH_VARARGS | METH_KEYWORDS }, @@ -7322,6 +7968,9 @@ static PyMethodDef controlscMethods[] = { { "wxCheckBox_SetValue", (PyCFunction) _wrap_wxCheckBox_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_GetValue", (PyCFunction) _wrap_wxCheckBox_GetValue, METH_VARARGS | METH_KEYWORDS }, { "new_wxCheckBox", (PyCFunction) _wrap_new_wxCheckBox, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmapButton_GetMarginY", (PyCFunction) _wrap_wxBitmapButton_GetMarginY, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmapButton_GetMarginX", (PyCFunction) _wrap_wxBitmapButton_GetMarginX, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmapButton_SetMargins", (PyCFunction) _wrap_wxBitmapButton_SetMargins, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_SetBitmapLabel", (PyCFunction) _wrap_wxBitmapButton_SetBitmapLabel, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_SetBitmapSelected", (PyCFunction) _wrap_wxBitmapButton_SetBitmapSelected, METH_VARARGS | METH_KEYWORDS }, { "wxBitmapButton_SetBitmapFocus", (PyCFunction) _wrap_wxBitmapButton_SetBitmapFocus, METH_VARARGS | METH_KEYWORDS }, @@ -7365,10 +8014,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, + { "_class_wxEvtHandler","_class_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler}, { "_class_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler}, @@ -7424,7 +8077,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxChoice","_wxComboBox",SwigwxComboBoxTowxChoice}, { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -7439,13 +8091,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -7471,10 +8123,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -7486,10 +8140,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, + { "_wxSpinButton","_class_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, + { "_wxSpinButton","_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, @@ -7513,16 +8171,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxSpinButton","_class_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, + { "_class_wxSpinButton","_wxSpinCtrl",SwigwxSpinCtrlTowxSpinButton}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -7551,6 +8210,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, + { "_class_wxWindow","_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, { "_class_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow}, { "_class_wxWindow","_wxSlider",SwigwxSliderTowxWindow}, { "_class_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow}, @@ -7619,6 +8280,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, + { "_wxControl","_class_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, + { "_wxControl","_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, { "_wxControl","_class_wxSlider",SwigwxSliderTowxControl}, { "_wxControl","_wxSlider",SwigwxSliderTowxControl}, { "_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl}, @@ -7661,6 +8324,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -7685,6 +8349,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -7694,6 +8359,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -7704,13 +8370,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxBitmapButton",SwigwxBitmapButtonTowxButton}, { "_wxButton","_wxBitmapButton",SwigwxBitmapButtonTowxButton}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -7721,6 +8393,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, + { "_class_wxControl","_class_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, + { "_class_wxControl","_wxSpinCtrl",SwigwxSpinCtrlTowxControl}, { "_class_wxControl","_class_wxSlider",SwigwxSliderTowxControl}, { "_class_wxControl","_wxSlider",SwigwxSliderTowxControl}, { "_class_wxControl","_class_wxRadioButton",SwigwxRadioButtonTowxControl}, @@ -7771,6 +8445,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -7791,6 +8466,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxEvtHandler","_class_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxSpinCtrl",SwigwxSpinCtrlTowxEvtHandler}, { "_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler}, { "_wxEvtHandler","_wxSlider",SwigwxSliderTowxEvtHandler}, { "_wxEvtHandler","_class_wxRadioButton",SwigwxRadioButtonTowxEvtHandler}, @@ -7832,8 +8509,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, @@ -7841,6 +8516,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFileDataObject","_class_wxFileDataObject",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, + { "_wxWindow","_class_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, + { "_wxWindow","_wxSpinCtrl",SwigwxSpinCtrlTowxWindow}, { "_wxWindow","_class_wxSlider",SwigwxSliderTowxWindow}, { "_wxWindow","_wxSlider",SwigwxSliderTowxWindow}, { "_wxWindow","_class_wxRadioButton",SwigwxRadioButtonTowxWindow}, diff --git a/utils/wxPython/src/gtk/controls.py b/wxPython/src/msw/controls.py similarity index 93% rename from utils/wxPython/src/gtk/controls.py rename to wxPython/src/msw/controls.py index f0c8a8c0de..974248219c 100644 --- a/utils/wxPython/src/gtk/controls.py +++ b/wxPython/src/msw/controls.py @@ -30,7 +30,7 @@ class wxControl(wxControlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxControl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -54,7 +54,7 @@ class wxButton(wxButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxButton,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -91,13 +91,22 @@ class wxBitmapButtonPtr(wxButtonPtr): def SetBitmapLabel(self, *_args, **_kwargs): val = apply(controlsc.wxBitmapButton_SetBitmapLabel,(self,) + _args, _kwargs) return val + def SetMargins(self, *_args, **_kwargs): + val = apply(controlsc.wxBitmapButton_SetMargins,(self,) + _args, _kwargs) + return val + def GetMarginX(self, *_args, **_kwargs): + val = apply(controlsc.wxBitmapButton_GetMarginX,(self,) + _args, _kwargs) + return val + def GetMarginY(self, *_args, **_kwargs): + val = apply(controlsc.wxBitmapButton_GetMarginY,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxBitmapButton(wxBitmapButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxBitmapButton,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -118,7 +127,7 @@ class wxCheckBox(wxCheckBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -166,7 +175,7 @@ class wxChoice(wxChoicePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxChoice,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -244,7 +253,7 @@ class wxComboBox(wxComboBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxComboBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -283,7 +292,7 @@ class wxGauge(wxGaugePtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxGauge,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -332,7 +341,7 @@ class wxStaticText(wxStaticTextPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticText,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -401,7 +410,7 @@ class wxListBox(wxListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxListBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -428,7 +437,7 @@ class wxCheckListBox(wxCheckListBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxCheckListBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -551,7 +560,7 @@ class wxTextCtrl(wxTextCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxTextCtrl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -587,7 +596,7 @@ class wxScrollBar(wxScrollBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxScrollBar,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -641,7 +650,7 @@ class wxStaticBitmap(wxStaticBitmapPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxStaticBitmap,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -695,7 +704,7 @@ class wxRadioBox(wxRadioBoxPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioBox,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -716,7 +725,7 @@ class wxRadioButton(wxRadioButtonPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxRadioButton,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -788,7 +797,36 @@ class wxSlider(wxSliderPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controlsc.new_wxSlider,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) + + + + +class wxSpinCtrlPtr(wxSpinButtonPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetMax(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMax,(self,) + _args, _kwargs) + return val + def GetMin(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetMin,(self,) + _args, _kwargs) + return val + def GetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_GetValue,(self,) + _args, _kwargs) + return val + def SetRange(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetRange,(self,) + _args, _kwargs) + return val + def SetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxSpinCtrl_SetValue,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxSpinCtrl(wxSpinCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(controlsc.new_wxSpinCtrl,_args,_kwargs) + self.thisown = 1 diff --git a/utils/wxPython/src/gtk/controls2.cpp b/wxPython/src/msw/controls2.cpp similarity index 70% rename from utils/wxPython/src/gtk/controls2.cpp rename to wxPython/src/msw/controls2.cpp index 0dde7c06f4..2173c6fd8b 100644 --- a/utils/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/controls2.cpp + * FILE : src/msw/controls2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -62,7 +64,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -109,9 +110,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -extern wxValidator wxPyDefaultValidator; - - int wxCALLBACK wxPyTreeCtrl_SortItems(long item1, long item2, long funcPtr) { + int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; PyObject* func = (PyObject*)funcPtr; bool doSave = wxPyRestoreThread(); @@ -132,15 +131,15 @@ extern wxValidator wxPyDefaultValidator; class wxPyTreeItemData : public wxTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL) { - if (obj == NULL) + if (obj == NULL) obj = Py_None; - Py_INCREF(obj); - m_obj = obj; + Py_INCREF(obj); + m_obj = obj; } ~wxPyTreeItemData() { bool doSave = wxPyRestoreThread(); - Py_DECREF(m_obj); + Py_DECREF(m_obj); wxPySaveThread(doSave); } @@ -150,16 +149,1273 @@ public: } void SetData(PyObject* obj) { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_obj); + wxPySaveThread(doSave); m_obj = obj; Py_INCREF(obj); } PyObject* m_obj; }; + +class wxPyTreeCtrl : public wxTreeCtrl { +public: + wxPyTreeCtrl(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + char* name) : + wxTreeCtrl(parent, id, pos, size, style, validator, name) {} + + + int OnCompareItems(const wxTreeItemId& item1, + const wxTreeItemId& item2) { + int rval = 0; + bool doSave = wxPyRestoreThread(); + if (m_myInst.findCallback("OnCompareItems")) + rval = m_myInst.callCallback(Py_BuildValue( + "(OO)", + wxPyConstructObject((void*)&item1, "wxTreeItemId"), + wxPyConstructObject((void*)&item2, "wxTreeItemId"))); + else + rval = wxTreeCtrl::OnCompareItems(item1, item2); + wxPySaveThread(doSave); + return rval; + } + PYPRIVATE; +}; + #ifdef __cplusplus extern "C" { #endif +#define new_wxListItemAttr() (new wxListItemAttr()) +static PyObject *_wrap_new_wxListItemAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxListItemAttr",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListItemAttr *)new_wxListItemAttr(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItemAttr_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxListItemAttr_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_SetTextColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItemAttr_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItemAttr_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxListItemAttr_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_SetBackgroundColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItemAttr_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItemAttr_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxListItemAttr_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItemAttr_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_SetFont. Expected _wxListItemAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItemAttr_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItemAttr_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItemAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) +static PyObject *_wrap_wxListItemAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_HasTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_HasTextColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItemAttr_HasTextColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItemAttr_HasBackgroundColour(_swigobj) (_swigobj->HasBackgroundColour()) +static PyObject *_wrap_wxListItemAttr_HasBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_HasBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_HasBackgroundColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItemAttr_HasFont(_swigobj) (_swigobj->HasFont()) +static PyObject *_wrap_wxListItemAttr_HasFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_HasFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_HasFont. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItemAttr_HasFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItemAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxListItemAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_GetTextColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxListItemAttr_GetTextColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItemAttr_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxListItemAttr_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_GetBackgroundColour. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxListItemAttr_GetBackgroundColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItemAttr_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxListItemAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItemAttr_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItemAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItemAttr_GetFont. Expected _wxListItemAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxFont & _result_ref = wxListItemAttr_GetFont(_arg0); + _result = (wxFont *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxListItem() (new wxListItem()) +static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxListItem",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListItem *)new_wxListItem(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxListItem(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxListItem",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxListItem. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxListItem(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxListItem_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_Clear. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_ClearAttributes(_swigobj) (_swigobj->ClearAttributes()) +static PyObject *_wrap_wxListItem_ClearAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_ClearAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_ClearAttributes. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_ClearAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetMask(_swigobj,_swigarg0) (_swigobj->SetMask(_swigarg0)) +static PyObject *_wrap_wxListItem_SetMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetMask",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetMask. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetMask(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) +static PyObject *_wrap_wxListItem_SetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetId",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetId. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetId(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetColumn(_swigobj,_swigarg0) (_swigobj->SetColumn(_swigarg0)) +static PyObject *_wrap_wxListItem_SetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetColumn",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetColumn. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetColumn(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetState(_swigobj,_swigarg0) (_swigobj->SetState(_swigarg0)) +static PyObject *_wrap_wxListItem_SetState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","state", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetState",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetState. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetState(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetStateMask(_swigobj,_swigarg0) (_swigobj->SetStateMask(_swigarg0)) +static PyObject *_wrap_wxListItem_SetStateMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","stateMask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetStateMask",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetStateMask. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetStateMask(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetText(_swigobj,_swigarg0) (_swigobj->SetText(_swigarg0)) +static PyObject *_wrap_wxListItem_SetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetText",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetText. Expected _wxListItem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetText(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxListItem_SetImage(_swigobj,_swigarg0) (_swigobj->SetImage(_swigarg0)) +static PyObject *_wrap_wxListItem_SetImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","image", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetImage",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetImage. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetImage(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetData(_swigobj,_swigarg0) (_swigobj->SetData(_swigarg0)) +static PyObject *_wrap_wxListItem_SetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListItem_SetData",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetData. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetData(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) +static PyObject *_wrap_wxListItem_SetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetWidth. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetAlign(_swigobj,_swigarg0) (_swigobj->SetAlign(_swigarg0)) +static PyObject *_wrap_wxListItem_SetAlign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxListColumnFormat _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","align", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListItem_SetAlign",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetAlign. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetAlign(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxListItem_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetTextColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxListItem_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetBackgroundColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxListItem_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListItem_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_SetFont. Expected _wxListItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItem_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListItem_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListItem_GetMask(_swigobj) (_swigobj->GetMask()) +static PyObject *_wrap_wxListItem_GetMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetMask. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetId(_swigobj) (_swigobj->GetId()) +static PyObject *_wrap_wxListItem_GetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetId",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetId. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetColumn(_swigobj) (_swigobj->GetColumn()) +static PyObject *_wrap_wxListItem_GetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetColumn",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetColumn. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListItem_GetColumn(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetState(_swigobj) (_swigobj->GetState()) +static PyObject *_wrap_wxListItem_GetState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetState",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetState. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetState(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetText(_swigobj) (_swigobj->GetText()) +static PyObject *_wrap_wxListItem_GetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetText",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetText. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxListItem_GetText(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxListItem_GetImage(_swigobj) (_swigobj->GetImage()) +static PyObject *_wrap_wxListItem_GetImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetImage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetImage. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListItem_GetImage(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetData(_swigobj) (_swigobj->GetData()) +static PyObject *_wrap_wxListItem_GetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetData. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListItem_GetData(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListItem_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxListItem_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetWidth. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListItem_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetAlign(_swigobj) (_swigobj->GetAlign()) +static PyObject *_wrap_wxListItem_GetAlign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListColumnFormat _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetAlign",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetAlign. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetAttributes(_swigobj) (_swigobj->GetAttributes()) +static PyObject *_wrap_wxListItem_GetAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItemAttr * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetAttributes. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListItem_HasAttributes(_swigobj) (_swigobj->HasAttributes()) +static PyObject *_wrap_wxListItem_HasAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_HasAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_HasAttributes. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListItem_HasAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListItem_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxListItem_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetTextColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxListItem_GetTextColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListItem_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxListItem_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetBackgroundColour. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxListItem_GetBackgroundColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListItem_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxListItem_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxListItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListItem_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListItem_GetFont. Expected _wxListItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxListItem_GetFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxListItem_m_mask_set(_swigobj,_swigval) (_swigobj->m_mask = _swigval,_swigval) static PyObject *_wrap_wxListItem_m_mask_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -456,11 +1712,22 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -726,56 +1993,12 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py return _resultobj; } -#define new_wxListItem() (new wxListItem()) -static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxListItem * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxListItem",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxListItem *)new_wxListItem(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxListItem(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxListItem * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxListItem",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxListItem. Expected _wxListItem_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxListItem(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; +static void *SwigwxListEventTowxNotifyEvent(void *ptr) { + wxListEvent *src; + wxNotifyEvent *dest; + src = (wxListEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; } static void *SwigwxListEventTowxCommandEvent(void *ptr) { @@ -1224,6 +2447,373 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxListEvent_GetCode(_swigobj) (_swigobj->GetCode()) +static PyObject *_wrap_wxListEvent_GetCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetCode. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListEvent_GetCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_GetIndex(_swigobj) (_swigobj->GetIndex()) +static PyObject *_wrap_wxListEvent_GetIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetIndex. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetOldIndex(_swigobj) (_swigobj->GetOldIndex()) +static PyObject *_wrap_wxListEvent_GetOldIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetOldIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetOldIndex. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetOldIndex(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetOldItem(_swigobj) (_swigobj->GetOldItem()) +static PyObject *_wrap_wxListEvent_GetOldItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetOldItem",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetOldItem. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetOldItem(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetColumn(_swigobj) (_swigobj->GetColumn()) +static PyObject *_wrap_wxListEvent_GetColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetColumn",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetColumn. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListEvent_GetColumn(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_Cancelled(_swigobj) (_swigobj->Cancelled()) +static PyObject *_wrap_wxListEvent_Cancelled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_Cancelled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_Cancelled. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListEvent_Cancelled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_GetPoint(_swigobj) (_swigobj->GetPoint()) +static PyObject *_wrap_wxListEvent_GetPoint(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetPoint",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetPoint. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxListEvent_GetPoint(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListEvent_GetLabel(_swigobj) (_swigobj->GetLabel()) +static PyObject *_wrap_wxListEvent_GetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetLabel",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetLabel. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxListEvent_GetLabel(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxListEvent_GetText(_swigobj) (_swigobj->GetText()) +static PyObject *_wrap_wxListEvent_GetText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetText",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetText. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxListEvent_GetText(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxListEvent_GetImage(_swigobj) (_swigobj->GetImage()) +static PyObject *_wrap_wxListEvent_GetImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetImage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetImage. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxListEvent_GetImage(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListEvent_GetData(_swigobj) (_swigobj->GetData()) +static PyObject *_wrap_wxListEvent_GetData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetData",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetData. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetData(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetMask(_swigobj) (_swigobj->GetMask()) +static PyObject *_wrap_wxListEvent_GetMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetMask. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxListEvent_GetMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxListEvent_GetItem(_swigobj) (_swigobj->GetItem()) +static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListItem * _result; + wxListEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetItem",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListEvent_GetItem. Expected _wxListEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxListItem & _result_ref = wxListEvent_GetItem(_arg0); + _result = (wxListItem *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxListCtrlTowxControl(void *ptr) { wxListCtrl *src; wxControl *dest; @@ -1254,10 +2844,10 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject * wxListCtrl * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxLC_ICON; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "listCtrl"; PyObject * _argo0 = 0; wxPoint temp; @@ -1480,10 +3070,12 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args, PyObj #define wxListCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxTextCtrl * _result; wxListCtrl * _arg0; long _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","item", NULL }; + char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListCtrl_EditLabel",_kwnames,&_argo0,&_arg1)) @@ -1497,11 +3089,80 @@ static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - wxListCtrl_EditLabel(_arg0,_arg1); + _result = (wxTextCtrl *)wxListCtrl_EditLabel(_arg0,_arg1); wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxListCtrl_EndEditLabel(_swigobj,_swigarg0) (_swigobj->EndEditLabel(_swigarg0)) +static PyObject *_wrap_wxListCtrl_EndEditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxListCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","cancel", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListCtrl_EndEditLabel",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EndEditLabel. Expected _wxListCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxListCtrl_EndEditLabel(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxListCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) +static PyObject *_wrap_wxListCtrl_GetEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextCtrl * _result; + wxListCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListCtrl_GetEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetEditControl. Expected _wxListCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTextCtrl *)wxListCtrl_GetEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } @@ -1557,11 +3218,22 @@ static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } _arg3 = (bool ) tempbool3; { @@ -2096,6 +3768,70 @@ static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject return _resultobj; } +#define wxListCtrl_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxListCtrl_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxListCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListCtrl_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetTextColour. Expected _wxListCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxListCtrl_GetTextColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListCtrl_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListCtrl * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetTextColour. Expected _wxListCtrl_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxListCtrl_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxListCtrl_GetTopItem(_swigobj) (_swigobj->GetTopItem()) static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2168,8 +3904,8 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxListCtrl_InsertColumnWith(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxListCtrl_InsertColumnInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertColumn(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; wxListCtrl * _arg0; @@ -2180,25 +3916,25 @@ static PyObject *_wrap_wxListCtrl_InsertColumnWith(PyObject *self, PyObject *arg char *_kwnames[] = { "self","col","info", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnWith",_kwnames,&_argo0,&_arg1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_InsertColumnInfo",_kwnames,&_argo0,&_arg1,&_argo2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnWith. Expected _wxListCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_InsertColumnInfo. Expected _wxListCtrl_p."); return NULL; } } if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnWith. Expected _wxListItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnInfo. Expected _wxListItem_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxListCtrl_InsertColumnWith(_arg0,_arg1,*_arg2); + _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("l",_result); @@ -2229,11 +3965,22 @@ static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2306,11 +4053,22 @@ static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2377,11 +4135,22 @@ static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2431,11 +4200,12 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject * wxListCtrl * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","col", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListCtrl_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2444,13 +4214,11 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject * return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxListCtrl_SetBackgroundColour(_arg0,*_arg1); @@ -2624,11 +4392,22 @@ static PyObject *_wrap_wxListCtrl_SetStringItem(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2789,11 +4568,22 @@ static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2872,7 +4662,7 @@ static bool wxListCtrl_SortItems(wxListCtrl *self,PyObject * func) { if (!PyCallable_Check(func)) return FALSE; - return self->SortItems(wxPyTreeCtrl_SortItems, (long)func); + return self->SortItems(wxPyListCtrl_SortItems, (long)func); } static PyObject *_wrap_wxListCtrl_SortItems(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2984,6 +4774,45 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static int wxTreeItemId___cmp__(wxTreeItemId *self,wxTreeItemId * other) { + if (! other) return -1; + return *self != *other; + } +static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTreeItemId * _arg0; + wxTreeItemId * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeItemId___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeItemId___cmp__. Expected _wxTreeItemId_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeItemId___cmp__. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTreeItemId___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxTreeItemData(_swigarg0) (new wxPyTreeItemData(_swigarg0)) static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3315,40 +5144,40 @@ static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void *SwigwxTreeCtrlTowxControl(void *ptr) { - wxTreeCtrl *src; +static void *SwigwxPyTreeCtrlTowxControl(void *ptr) { + wxPyTreeCtrl *src; wxControl *dest; - src = (wxTreeCtrl *) ptr; + src = (wxPyTreeCtrl *) ptr; dest = (wxControl *) src; return (void *) dest; } -static void *SwigwxTreeCtrlTowxWindow(void *ptr) { - wxTreeCtrl *src; +static void *SwigwxPyTreeCtrlTowxWindow(void *ptr) { + wxPyTreeCtrl *src; wxWindow *dest; - src = (wxTreeCtrl *) ptr; + src = (wxPyTreeCtrl *) ptr; dest = (wxWindow *) src; return (void *) dest; } -static void *SwigwxTreeCtrlTowxEvtHandler(void *ptr) { - wxTreeCtrl *src; +static void *SwigwxPyTreeCtrlTowxEvtHandler(void *ptr) { + wxPyTreeCtrl *src; wxEvtHandler *dest; - src = (wxTreeCtrl *) ptr; + src = (wxPyTreeCtrl *) ptr; dest = (wxEvtHandler *) src; return (void *) dest; } -#define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +#define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxPyTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _result; + wxPyTreeCtrl * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT; - wxValidator * _arg5 = (wxValidator *) &wxPyDefaultValidator; + wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; char * _arg6 = (char *) "wxTreeCtrl"; PyObject * _argo0 = 0; wxPoint temp; @@ -3390,11 +5219,11 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); wxPy_END_ALLOW_THREADS; } if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p"); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeCtrl_p"); _resultobj = Py_BuildValue("s",_ptemp); } else { Py_INCREF(Py_None); @@ -3403,11 +5232,48 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define wxTreeCtrl__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTreeCtrl * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl__setSelf. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTreeCtrl__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxTreeCtrl_GetCount(_swigobj) (_swigobj->GetCount()) static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; size_t _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -3416,8 +5282,8 @@ static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetCount. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetCount. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3434,7 +5300,7 @@ static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObj static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; unsigned int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -3443,8 +5309,8 @@ static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetIndent. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetIndent. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3460,7 +5326,7 @@ static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyOb #define wxTreeCtrl_SetIndent(_swigobj,_swigarg0) (_swigobj->SetIndent(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; unsigned int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","indent", NULL }; @@ -3470,8 +5336,8 @@ static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetIndent. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetIndent. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3489,7 +5355,7 @@ static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyOb static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxImageList * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -3499,8 +5365,8 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3523,7 +5389,7 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxImageList * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -3533,8 +5399,8 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetStateImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetStateImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3556,7 +5422,7 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar #define wxTreeCtrl_SetImageList(_swigobj,_swigarg0) (_swigobj->SetImageList(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxImageList * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3567,8 +5433,8 @@ static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3592,7 +5458,7 @@ static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, P #define wxTreeCtrl_SetStateImageList(_swigobj,_swigarg0) (_swigobj->SetStateImageList(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxImageList * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3603,8 +5469,8 @@ static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *ar return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetStateImageList. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetStateImageList. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3629,7 +5495,7 @@ static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *ar static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; unsigned int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -3638,8 +5504,8 @@ static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSpacing. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSpacing. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3655,7 +5521,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyO #define wxTreeCtrl_SetSpacing(_swigobj,_swigarg0) (_swigobj->SetSpacing(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; unsigned int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","spacing", NULL }; @@ -3665,8 +5531,8 @@ static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetSpacing. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetSpacing. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3684,7 +5550,7 @@ static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3695,8 +5561,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemText. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemText. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3725,7 +5591,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxTreeItemIcon _arg2 = (wxTreeItemIcon ) (wxTreeItemIcon_Normal); PyObject * _argo0 = 0; @@ -3737,8 +5603,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3762,7 +5628,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3773,8 +5639,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemSelectedImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemSelectedImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3797,7 +5663,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject #define wxTreeCtrl_SetItemText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemText(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxString * _arg2; PyObject * _argo0 = 0; @@ -3810,8 +5676,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemText. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemText. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3823,11 +5689,22 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3846,7 +5723,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py #define wxTreeCtrl_SetItemImage(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemImage(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; int _arg2; wxTreeItemIcon _arg3 = (wxTreeItemIcon ) (wxTreeItemIcon_Normal); @@ -3859,8 +5736,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3884,7 +5761,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P #define wxTreeCtrl_SetItemSelectedImage(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemSelectedImage(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; int _arg2; PyObject * _argo0 = 0; @@ -3896,8 +5773,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemSelectedImage. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemSelectedImage. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3921,7 +5798,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject #define wxTreeCtrl_SetItemHasChildren(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemHasChildren(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; bool _arg2 = (bool ) TRUE; PyObject * _argo0 = 0; @@ -3934,8 +5811,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemHasChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemHasChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3957,10 +5834,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a return _resultobj; } -static wxPyTreeItemData * wxTreeCtrl_GetItemData(wxTreeCtrl *self,const wxTreeItemId & item) { +static wxPyTreeItemData * wxPyTreeCtrl_GetItemData(wxPyTreeCtrl *self,const wxTreeItemId & item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(); + data->SetId(item); // set the id self->SetItemData(item, data); } return data; @@ -3968,7 +5846,7 @@ static wxPyTreeItemData * wxTreeCtrl_GetItemData(wxTreeCtrl *self,const wxTreeIt static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTreeItemData * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3980,8 +5858,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -3994,7 +5872,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyTreeItemData *)wxTreeCtrl_GetItemData(_arg0,*_arg1); + _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4007,12 +5885,13 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py return _resultobj; } -static void wxTreeCtrl_SetItemData(wxTreeCtrl *self,const wxTreeItemId & item,wxPyTreeItemData * data) { - self->SetItemData(item, data); - } +static void wxPyTreeCtrl_SetItemData(wxPyTreeCtrl *self,const wxTreeItemId & item,wxPyTreeItemData * data) { + data->SetId(item); // set the id + self->SetItemData(item, data); + } static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxPyTreeItemData * _arg2; PyObject * _argo0 = 0; @@ -4025,8 +5904,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4046,7 +5925,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4054,18 +5933,19 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py return _resultobj; } -static PyObject * wxTreeCtrl_GetPyData(wxTreeCtrl *self,const wxTreeItemId & item) { +static PyObject * wxPyTreeCtrl_GetPyData(wxPyTreeCtrl *self,const wxTreeItemId & item) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(); + data->SetId(item); // set the id self->SetItemData(item, data); } return data->GetData(); - } + } static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4076,8 +5956,8 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPyData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPyData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4090,7 +5970,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxTreeCtrl_GetPyData(_arg0,*_arg1); + _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; }{ @@ -4099,17 +5979,18 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void wxTreeCtrl_SetPyData(wxTreeCtrl *self,const wxTreeItemId & item,PyObject * obj) { +static void wxPyTreeCtrl_SetPyData(wxPyTreeCtrl *self,const wxTreeItemId & item,PyObject * obj) { wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { data = new wxPyTreeItemData(obj); + data->SetId(item); // set the id self->SetItemData(item, data); } else data->SetData(obj); - } + } static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _arg2; PyObject * _argo0 = 0; @@ -4122,8 +6003,8 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetPyData. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetPyData. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4139,7 +6020,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); + wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4151,7 +6032,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4162,8 +6043,8 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4187,7 +6068,7 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4198,8 +6079,8 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ItemHasChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ItemHasChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4223,7 +6104,7 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4234,8 +6115,8 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsExpanded. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsExpanded. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4259,7 +6140,7 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4270,8 +6151,8 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsSelected. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsSelected. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4295,7 +6176,7 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -4305,8 +6186,8 @@ static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetRootItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetRootItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4324,7 +6205,7 @@ static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -4334,8 +6215,8 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelection. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelection. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4353,7 +6234,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4365,8 +6246,8 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemParent. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemParent. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4387,15 +6268,15 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, return _resultobj; } -static PyObject * wxTreeCtrl_GetSelections(wxTreeCtrl *self) { +static PyObject * wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self) { bool doSave = wxPyRestoreThread(); PyObject* rval = PyList_New(0); wxArrayTreeItemIds array; size_t num, x; num = self->GetSelections(array); for (x=0; x < num; x++) { - PyObject* item = wxPyConstructObject((void*)&array.Item(x), - "wxTreeItemId"); + wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); + PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE); PyList_Append(rval, item); } wxPySaveThread(doSave); @@ -4404,7 +6285,7 @@ static PyObject * wxTreeCtrl_GetSelections(wxTreeCtrl *self) { static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -4413,14 +6294,14 @@ static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelections. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelections. Expected _wxPyTreeCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxTreeCtrl_GetSelections(_arg0); + _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0); wxPy_END_ALLOW_THREADS; }{ @@ -4433,7 +6314,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; size_t _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; bool _arg2 = (bool ) TRUE; PyObject * _argo0 = 0; @@ -4446,8 +6327,8 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetChildrenCount. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetChildrenCount. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4472,7 +6353,7 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; long * _arg2; PyObject * _argo0 = 0; @@ -4487,8 +6368,8 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstChild. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstChild. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4522,7 +6403,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; long * _arg2; PyObject * _argo0 = 0; @@ -4537,8 +6418,8 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextChild. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextChild. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4572,7 +6453,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4584,8 +6465,8 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextSibling. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextSibling. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4610,7 +6491,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4622,8 +6503,8 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevSibling. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevSibling. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4648,7 +6529,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; @@ -4658,8 +6539,8 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject * return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstVisibleItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetFirstVisibleItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4677,7 +6558,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject * static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4689,8 +6570,8 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetNextVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4715,7 +6596,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4727,8 +6608,8 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetPrevVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4753,7 +6634,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4765,8 +6646,8 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetLastChild. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetLastChild. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4791,7 +6672,7 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxString * _arg1; int _arg2 = (int ) -1; int _arg3 = (int ) -1; @@ -4807,17 +6688,28 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AddRoot. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AddRoot. Expected _wxPyTreeCtrl_p."); return NULL; } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -4844,7 +6736,7 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxString * _arg2; int _arg3 = (int ) -1; @@ -4862,8 +6754,8 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_PrependItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_PrependItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4875,11 +6767,22 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -4906,7 +6809,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxTreeItemId * _arg2; wxString * _arg3; @@ -4926,8 +6829,8 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -4946,11 +6849,22 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -4973,11 +6887,85 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxTreeCtrl_InsertItemBefore(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->InsertItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTreeItemId * _result; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + size_t _arg2; + wxString * _arg3; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + wxTreeItemData * _arg6 = (wxTreeItemData *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + PyObject * _argo6 = 0; + char *_kwnames[] = { "self","parent","before","text","image","selectedImage","data", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|iiO:wxTreeCtrl_InsertItemBefore",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_arg4,&_arg5,&_argo6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_InsertItemBefore. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_InsertItemBefore. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxTreeItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxTreeCtrl_InsertItemBefore. Expected _wxTreeItemData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + #define wxTreeCtrl_AppendItem(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->AppendItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxString * _arg2; int _arg3 = (int ) -1; @@ -4995,8 +6983,8 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AppendItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_AppendItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5008,11 +6996,22 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo5) { if (_argo5 == Py_None) { _arg5 = NULL; } @@ -5038,7 +7037,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO #define wxTreeCtrl_Delete(_swigobj,_swigarg0) (_swigobj->Delete(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5049,8 +7048,8 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Delete. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Delete. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5074,7 +7073,7 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec #define wxTreeCtrl_DeleteChildren(_swigobj,_swigarg0) (_swigobj->DeleteChildren(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5085,8 +7084,8 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5110,7 +7109,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, #define wxTreeCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems()) static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -5119,8 +7118,8 @@ static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteAllItems. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteAllItems. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5137,7 +7136,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args, #define wxTreeCtrl_Expand(_swigobj,_swigarg0) (_swigobj->Expand(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5148,8 +7147,8 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Expand. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Expand. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5173,7 +7172,7 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec #define wxTreeCtrl_Collapse(_swigobj,_swigarg0) (_swigobj->Collapse(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5184,8 +7183,8 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Collapse. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Collapse. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5209,7 +7208,7 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj #define wxTreeCtrl_CollapseAndReset(_swigobj,_swigarg0) (_swigobj->CollapseAndReset(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5220,8 +7219,8 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_CollapseAndReset. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_CollapseAndReset. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5245,7 +7244,7 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg #define wxTreeCtrl_Toggle(_swigobj,_swigarg0) (_swigobj->Toggle(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5256,8 +7255,8 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Toggle. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Toggle. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5281,7 +7280,7 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec #define wxTreeCtrl_Unselect(_swigobj) (_swigobj->Unselect()) static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -5290,8 +7289,8 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Unselect. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_Unselect. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5308,7 +7307,7 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObj #define wxTreeCtrl_UnselectAll(_swigobj) (_swigobj->UnselectAll()) static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -5317,8 +7316,8 @@ static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_UnselectAll. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5335,7 +7334,7 @@ static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, Py #define wxTreeCtrl_SelectItem(_swigobj,_swigarg0) (_swigobj->SelectItem(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5346,8 +7345,8 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SelectItem. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SelectItem. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5371,7 +7370,7 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO #define wxTreeCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5382,8 +7381,8 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EnsureVisible. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EnsureVisible. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5407,7 +7406,7 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, #define wxTreeCtrl_ScrollTo(_swigobj,_swigarg0) (_swigobj->ScrollTo(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5418,8 +7417,8 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ScrollTo. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_ScrollTo. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5443,19 +7442,21 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj #define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxTextCtrl * _result; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","item", NULL }; + char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_EditLabel",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EditLabel. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EditLabel. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5468,7 +7469,83 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb } { wxPy_BEGIN_ALLOW_THREADS; - wxTreeCtrl_EditLabel(_arg0,*_arg1); + _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) +static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextCtrl * _result; + wxPyTreeCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTreeCtrl_EndEditLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->EndEditLabel(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + int _arg2 = (int ) FALSE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item","discardChanges", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_EndEditLabel",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EndEditLabel. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EndEditLabel. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTreeCtrl_EndEditLabel(_arg0,*_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -5479,7 +7556,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb #define wxTreeCtrl_SortChildren(_swigobj,_swigarg0) (_swigobj->SortChildren(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5490,8 +7567,8 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SortChildren. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SortChildren. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5515,7 +7592,7 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P #define wxTreeCtrl_SetItemBold(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBold(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; int _arg2 = (int ) TRUE; PyObject * _argo0 = 0; @@ -5527,8 +7604,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBold. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBold. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5553,7 +7630,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -5564,8 +7641,8 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsBold. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_IsBold. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5589,7 +7666,7 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxPoint * _arg1; int * _arg2; int temp; @@ -5607,8 +7684,8 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_HitTest. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_HitTest. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5635,21 +7712,22 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje #define wxTreeCtrl_SetItemTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemTextColour(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxColour * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","item","col", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemTextColour",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemTextColour",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemTextColour. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemTextColour. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5660,13 +7738,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemTextColour. Expected _wxColour_p."); +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2); @@ -5680,21 +7756,22 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar #define wxTreeCtrl_SetItemBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBackgroundColour(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxColour * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","item","col", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5705,13 +7782,11 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxColour_p."); +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2); @@ -5725,7 +7800,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje #define wxTreeCtrl_SetItemFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemFont(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeCtrl * _arg0; + wxPyTreeCtrl * _arg0; wxTreeItemId * _arg1; wxFont * _arg2; PyObject * _argo0 = 0; @@ -5738,8 +7813,8 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemFont. Expected _wxTreeCtrl_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemFont. Expected _wxPyTreeCtrl_p."); return NULL; } } @@ -5767,7 +7842,98 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxTreeCtrl_SetItemDropHighlight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemDropHighlight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTreeCtrl_SetItemDropHighlight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + int _arg2 = (int ) TRUE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item","highlight", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_SetItemDropHighlight",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemDropHighlight. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemDropHighlight. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTreeCtrl_SetItemDropHighlight(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject * wxPyTreeCtrl_GetBoundingRect(wxPyTreeCtrl *self,const wxTreeItemId & item,int textOnly) { + wxRect rect; + if (self->GetBoundingRect(item, rect, textOnly)) { + bool doSave = wxPyRestoreThread(); + wxRect* r = new wxRect(rect); + PyObject* val = wxPyConstructObject((void*)r, "wxRect"); + wxPySaveThread(doSave); + return val; + } + else { + Py_INCREF(Py_None); + return Py_None; + } + } +static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + int _arg2 = (int ) FALSE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item","textOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_GetBoundingRect",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetBoundingRect. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxPyTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + static PyMethodDef controls2cMethods[] = { + { "wxTreeCtrl_GetBoundingRect", (PyCFunction) _wrap_wxTreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_SetItemDropHighlight", (PyCFunction) _wrap_wxTreeCtrl_SetItemDropHighlight, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemFont", (PyCFunction) _wrap_wxTreeCtrl_SetItemFont, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemTextColour, METH_VARARGS | METH_KEYWORDS }, @@ -5775,6 +7941,8 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_IsBold", (PyCFunction) _wrap_wxTreeCtrl_IsBold, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemBold", (PyCFunction) _wrap_wxTreeCtrl_SetItemBold, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SortChildren", (PyCFunction) _wrap_wxTreeCtrl_SortChildren, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_EndEditLabel", (PyCFunction) _wrap_wxTreeCtrl_EndEditLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_GetEditControl", (PyCFunction) _wrap_wxTreeCtrl_GetEditControl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_EditLabel", (PyCFunction) _wrap_wxTreeCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_ScrollTo", (PyCFunction) _wrap_wxTreeCtrl_ScrollTo, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_EnsureVisible", (PyCFunction) _wrap_wxTreeCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, @@ -5789,6 +7957,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_DeleteChildren", (PyCFunction) _wrap_wxTreeCtrl_DeleteChildren, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_Delete", (PyCFunction) _wrap_wxTreeCtrl_Delete, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_AppendItem", (PyCFunction) _wrap_wxTreeCtrl_AppendItem, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_InsertItemBefore", (PyCFunction) _wrap_wxTreeCtrl_InsertItemBefore, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_InsertItem", (PyCFunction) _wrap_wxTreeCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_PrependItem", (PyCFunction) _wrap_wxTreeCtrl_PrependItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_AddRoot", (PyCFunction) _wrap_wxTreeCtrl_AddRoot, METH_VARARGS | METH_KEYWORDS }, @@ -5829,6 +7998,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_SetIndent", (PyCFunction) _wrap_wxTreeCtrl_SetIndent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetIndent", (PyCFunction) _wrap_wxTreeCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetCount", (PyCFunction) _wrap_wxTreeCtrl_GetCount, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl__setSelf", (PyCFunction) _wrap_wxTreeCtrl__setSelf, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeCtrl", (PyCFunction) _wrap_new_wxTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetLabel", (PyCFunction) _wrap_wxTreeEvent_GetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetCode", (PyCFunction) _wrap_wxTreeEvent_GetCode, METH_VARARGS | METH_KEYWORDS }, @@ -5840,6 +8010,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeItemData_SetData", (PyCFunction) _wrap_wxTreeItemData_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxTreeItemData_GetData", (PyCFunction) _wrap_wxTreeItemData_GetData, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeItemData", (PyCFunction) _wrap_new_wxTreeItemData, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeItemId___cmp__", (PyCFunction) _wrap_wxTreeItemId___cmp__, METH_VARARGS | METH_KEYWORDS }, { "wxTreeItemId_IsOk", (PyCFunction) _wrap_wxTreeItemId_IsOk, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTreeItemId", (PyCFunction) _wrap_delete_wxTreeItemId, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeItemId", (PyCFunction) _wrap_new_wxTreeItemId, METH_VARARGS | METH_KEYWORDS }, @@ -5863,9 +8034,11 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_InsertStringItem", (PyCFunction) _wrap_wxListCtrl_InsertStringItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertItem", (PyCFunction) _wrap_wxListCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertColumn", (PyCFunction) _wrap_wxListCtrl_InsertColumn, METH_VARARGS | METH_KEYWORDS }, - { "wxListCtrl_InsertColumnWith", (PyCFunction) _wrap_wxListCtrl_InsertColumnWith, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_InsertColumnInfo", (PyCFunction) _wrap_wxListCtrl_InsertColumnInfo, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_HitTest", (PyCFunction) _wrap_wxListCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetTopItem", (PyCFunction) _wrap_wxListCtrl_GetTopItem, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_SetTextColour", (PyCFunction) _wrap_wxListCtrl_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_GetTextColour", (PyCFunction) _wrap_wxListCtrl_GetTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetSelectedItemCount", (PyCFunction) _wrap_wxListCtrl_GetSelectedItemCount, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetNextItem", (PyCFunction) _wrap_wxListCtrl_GetNextItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetItemText", (PyCFunction) _wrap_wxListCtrl_GetItemText, METH_VARARGS | METH_KEYWORDS }, @@ -5884,6 +8057,8 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_FindItemData", (PyCFunction) _wrap_wxListCtrl_FindItemData, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_FindItem", (PyCFunction) _wrap_wxListCtrl_FindItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_EnsureVisible", (PyCFunction) _wrap_wxListCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_GetEditControl", (PyCFunction) _wrap_wxListCtrl_GetEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_EndEditLabel", (PyCFunction) _wrap_wxListCtrl_EndEditLabel, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_EditLabel", (PyCFunction) _wrap_wxListCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_ClearAll", (PyCFunction) _wrap_wxListCtrl_ClearAll, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_DeleteAllColumns", (PyCFunction) _wrap_wxListCtrl_DeleteAllColumns, METH_VARARGS | METH_KEYWORDS }, @@ -5892,6 +8067,19 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_DeleteItem", (PyCFunction) _wrap_wxListCtrl_DeleteItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_Arrange", (PyCFunction) _wrap_wxListCtrl_Arrange, METH_VARARGS | METH_KEYWORDS }, { "new_wxListCtrl", (PyCFunction) _wrap_new_wxListCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetItem", (PyCFunction) _wrap_wxListEvent_GetItem, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetMask", (PyCFunction) _wrap_wxListEvent_GetMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetData", (PyCFunction) _wrap_wxListEvent_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetImage", (PyCFunction) _wrap_wxListEvent_GetImage, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetText", (PyCFunction) _wrap_wxListEvent_GetText, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetLabel", (PyCFunction) _wrap_wxListEvent_GetLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetPoint", (PyCFunction) _wrap_wxListEvent_GetPoint, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_Cancelled", (PyCFunction) _wrap_wxListEvent_Cancelled, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetColumn", (PyCFunction) _wrap_wxListEvent_GetColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetOldItem", (PyCFunction) _wrap_wxListEvent_GetOldItem, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetOldIndex", (PyCFunction) _wrap_wxListEvent_GetOldIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetIndex", (PyCFunction) _wrap_wxListEvent_GetIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxListEvent_GetCode", (PyCFunction) _wrap_wxListEvent_GetCode, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_item_get", (PyCFunction) _wrap_wxListEvent_m_item_get, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_item_set", (PyCFunction) _wrap_wxListEvent_m_item_set, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_pointDrag_get", (PyCFunction) _wrap_wxListEvent_m_pointDrag_get, METH_VARARGS | METH_KEYWORDS }, @@ -5906,8 +8094,6 @@ static PyMethodDef controls2cMethods[] = { { "wxListEvent_m_itemIndex_set", (PyCFunction) _wrap_wxListEvent_m_itemIndex_set, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_code_get", (PyCFunction) _wrap_wxListEvent_m_code_get, METH_VARARGS | METH_KEYWORDS }, { "wxListEvent_m_code_set", (PyCFunction) _wrap_wxListEvent_m_code_set, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxListItem", (PyCFunction) _wrap_delete_wxListItem, METH_VARARGS | METH_KEYWORDS }, - { "new_wxListItem", (PyCFunction) _wrap_new_wxListItem, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_width_get", (PyCFunction) _wrap_wxListItem_m_width_get, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_width_set", (PyCFunction) _wrap_wxListItem_m_width_set, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_format_get", (PyCFunction) _wrap_wxListItem_m_format_get, METH_VARARGS | METH_KEYWORDS }, @@ -5928,6 +8114,47 @@ static PyMethodDef controls2cMethods[] = { { "wxListItem_m_itemId_set", (PyCFunction) _wrap_wxListItem_m_itemId_set, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_mask_get", (PyCFunction) _wrap_wxListItem_m_mask_get, METH_VARARGS | METH_KEYWORDS }, { "wxListItem_m_mask_set", (PyCFunction) _wrap_wxListItem_m_mask_set, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetFont", (PyCFunction) _wrap_wxListItem_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetBackgroundColour", (PyCFunction) _wrap_wxListItem_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetTextColour", (PyCFunction) _wrap_wxListItem_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_HasAttributes", (PyCFunction) _wrap_wxListItem_HasAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetAttributes", (PyCFunction) _wrap_wxListItem_GetAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetAlign", (PyCFunction) _wrap_wxListItem_GetAlign, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetWidth", (PyCFunction) _wrap_wxListItem_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetData", (PyCFunction) _wrap_wxListItem_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetImage", (PyCFunction) _wrap_wxListItem_GetImage, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetText", (PyCFunction) _wrap_wxListItem_GetText, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetState", (PyCFunction) _wrap_wxListItem_GetState, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetColumn", (PyCFunction) _wrap_wxListItem_GetColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetId", (PyCFunction) _wrap_wxListItem_GetId, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_GetMask", (PyCFunction) _wrap_wxListItem_GetMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetFont", (PyCFunction) _wrap_wxListItem_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetBackgroundColour", (PyCFunction) _wrap_wxListItem_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetTextColour", (PyCFunction) _wrap_wxListItem_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetAlign", (PyCFunction) _wrap_wxListItem_SetAlign, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetWidth", (PyCFunction) _wrap_wxListItem_SetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetData", (PyCFunction) _wrap_wxListItem_SetData, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetImage", (PyCFunction) _wrap_wxListItem_SetImage, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetText", (PyCFunction) _wrap_wxListItem_SetText, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetStateMask", (PyCFunction) _wrap_wxListItem_SetStateMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetState", (PyCFunction) _wrap_wxListItem_SetState, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetColumn", (PyCFunction) _wrap_wxListItem_SetColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetId", (PyCFunction) _wrap_wxListItem_SetId, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_SetMask", (PyCFunction) _wrap_wxListItem_SetMask, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_ClearAttributes", (PyCFunction) _wrap_wxListItem_ClearAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxListItem_Clear", (PyCFunction) _wrap_wxListItem_Clear, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxListItem", (PyCFunction) _wrap_delete_wxListItem, METH_VARARGS | METH_KEYWORDS }, + { "new_wxListItem", (PyCFunction) _wrap_new_wxListItem, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_GetFont", (PyCFunction) _wrap_wxListItemAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_GetBackgroundColour", (PyCFunction) _wrap_wxListItemAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_GetTextColour", (PyCFunction) _wrap_wxListItemAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_HasFont", (PyCFunction) _wrap_wxListItemAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_HasBackgroundColour", (PyCFunction) _wrap_wxListItemAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_HasTextColour", (PyCFunction) _wrap_wxListItemAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_SetFont", (PyCFunction) _wrap_wxListItemAttr_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_SetBackgroundColour", (PyCFunction) _wrap_wxListItemAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListItemAttr_SetTextColour", (PyCFunction) _wrap_wxListItemAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "new_wxListItemAttr", (PyCFunction) _wrap_new_wxListItemAttr, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus @@ -5957,13 +8184,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, { "_class_wxPyTreeItemData","_wxPyTreeItemData",0}, - { "_class_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, - { "_class_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, { "_class_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, { "_class_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, { "_class_wxEvtHandler","_wxEvtHandler",0}, @@ -5972,8 +8201,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxPen","_class_wxPen",0}, { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, @@ -5999,6 +8230,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -6009,10 +8241,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, @@ -6031,10 +8263,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent}, { "_class_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent}, @@ -6052,14 +8286,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, @@ -6089,9 +8327,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -6104,7 +8342,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, { "_class_wxTextCtrl","_wxTextCtrl",0}, + { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -6117,8 +8357,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_class_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, - { "_class_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, + { "_class_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, + { "_class_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, { "_class_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow}, { "_class_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow}, { "_class_wxWindow","_wxWindow",0}, @@ -6147,20 +8387,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, - { "_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, - { "_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, + { "_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, + { "_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, { "_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl}, { "_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -6184,6 +8425,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -6193,6 +8435,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -6204,6 +8447,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, @@ -6218,11 +8468,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRadioButton","_wxRadioButton",0}, { "_wxValidator","_class_wxValidator",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, - { "_class_wxControl","_class_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, - { "_class_wxControl","_wxTreeCtrl",SwigwxTreeCtrlTowxControl}, + { "_class_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, + { "_class_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, { "_class_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl}, { "_class_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl}, { "_class_wxControl","_wxControl",0}, @@ -6239,6 +8488,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -6265,22 +8515,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, - { "_wxEvtHandler","_class_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, - { "_wxEvtHandler","_wxTreeCtrl",SwigwxTreeCtrlTowxEvtHandler}, + { "_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, { "_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, { "_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler}, { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_class_wxPalette","_wxPalette",0}, { "_wxFileDataObject","_class_wxFileDataObject",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, - { "_wxWindow","_class_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, - { "_wxWindow","_wxTreeCtrl",SwigwxTreeCtrlTowxWindow}, + { "_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, + { "_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, { "_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow}, { "_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow}, { "_wxWindow","_class_wxWindow",0}, @@ -6326,10 +8577,6 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxLIST_ALIGN_LEFT", PyInt_FromLong((long) wxLIST_ALIGN_LEFT)); PyDict_SetItemString(d,"wxLIST_ALIGN_TOP", PyInt_FromLong((long) wxLIST_ALIGN_TOP)); PyDict_SetItemString(d,"wxLIST_ALIGN_SNAP_TO_GRID", PyInt_FromLong((long) wxLIST_ALIGN_SNAP_TO_GRID)); - PyDict_SetItemString(d,"wxLIST_FORMAT_LEFT", PyInt_FromLong((long) wxLIST_FORMAT_LEFT)); - PyDict_SetItemString(d,"wxLIST_FORMAT_RIGHT", PyInt_FromLong((long) wxLIST_FORMAT_RIGHT)); - PyDict_SetItemString(d,"wxLIST_FORMAT_CENTRE", PyInt_FromLong((long) wxLIST_FORMAT_CENTRE)); - PyDict_SetItemString(d,"wxLIST_FORMAT_CENTER", PyInt_FromLong((long) wxLIST_FORMAT_CENTER)); PyDict_SetItemString(d,"wxLIST_AUTOSIZE", PyInt_FromLong((long) wxLIST_AUTOSIZE)); PyDict_SetItemString(d,"wxLIST_AUTOSIZE_USEHEADER", PyInt_FromLong((long) wxLIST_AUTOSIZE_USEHEADER)); PyDict_SetItemString(d,"wxLIST_RECT_BOUNDS", PyInt_FromLong((long) wxLIST_RECT_BOUNDS)); @@ -6339,6 +8586,10 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxLIST_FIND_DOWN", PyInt_FromLong((long) wxLIST_FIND_DOWN)); PyDict_SetItemString(d,"wxLIST_FIND_LEFT", PyInt_FromLong((long) wxLIST_FIND_LEFT)); PyDict_SetItemString(d,"wxLIST_FIND_RIGHT", PyInt_FromLong((long) wxLIST_FIND_RIGHT)); + PyDict_SetItemString(d,"wxLIST_FORMAT_LEFT", PyInt_FromLong((long) wxLIST_FORMAT_LEFT)); + PyDict_SetItemString(d,"wxLIST_FORMAT_RIGHT", PyInt_FromLong((long) wxLIST_FORMAT_RIGHT)); + PyDict_SetItemString(d,"wxLIST_FORMAT_CENTRE", PyInt_FromLong((long) wxLIST_FORMAT_CENTRE)); + PyDict_SetItemString(d,"wxLIST_FORMAT_CENTER", PyInt_FromLong((long) wxLIST_FORMAT_CENTER)); PyDict_SetItemString(d,"wxTreeItemIcon_Normal", PyInt_FromLong((long) wxTreeItemIcon_Normal)); PyDict_SetItemString(d,"wxTreeItemIcon_Selected", PyInt_FromLong((long) wxTreeItemIcon_Selected)); PyDict_SetItemString(d,"wxTreeItemIcon_Expanded", PyInt_FromLong((long) wxTreeItemIcon_Expanded)); diff --git a/utils/wxPython/src/gtk/controls2.py b/wxPython/src/msw/controls2.py similarity index 72% rename from utils/wxPython/src/gtk/controls2.py rename to wxPython/src/msw/controls2.py index af228db1dd..6acc423c61 100644 --- a/utils/wxPython/src/gtk/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -13,6 +13,50 @@ from events import * from controls import * import wx +class wxListItemAttrPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_SetFont,(self,) + _args, _kwargs) + return val + def HasTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_HasTextColour,(self,) + _args, _kwargs) + return val + def HasBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_HasBackgroundColour,(self,) + _args, _kwargs) + return val + def HasFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_HasFont,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItemAttr_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxListItemAttr(wxListItemAttrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(controls2c.new_wxListItemAttr,_args,_kwargs) + self.thisown = 1 + + + + class wxListItemPtr : def __init__(self,this): self.this = this @@ -20,6 +64,97 @@ class wxListItemPtr : def __del__(self,controls2c=controls2c): if self.thisown == 1 : controls2c.delete_wxListItem(self) + def Clear(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_Clear,(self,) + _args, _kwargs) + return val + def ClearAttributes(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_ClearAttributes,(self,) + _args, _kwargs) + return val + def SetMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetMask,(self,) + _args, _kwargs) + return val + def SetId(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetId,(self,) + _args, _kwargs) + return val + def SetColumn(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetColumn,(self,) + _args, _kwargs) + return val + def SetState(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetState,(self,) + _args, _kwargs) + return val + def SetStateMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetStateMask,(self,) + _args, _kwargs) + return val + def SetText(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetText,(self,) + _args, _kwargs) + return val + def SetImage(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetImage,(self,) + _args, _kwargs) + return val + def SetData(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetData,(self,) + _args, _kwargs) + return val + def SetWidth(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetWidth,(self,) + _args, _kwargs) + return val + def SetAlign(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetAlign,(self,) + _args, _kwargs) + return val + def SetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_SetFont,(self,) + _args, _kwargs) + return val + def GetMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetMask,(self,) + _args, _kwargs) + return val + def GetId(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetId,(self,) + _args, _kwargs) + return val + def GetColumn(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetColumn,(self,) + _args, _kwargs) + return val + def GetState(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetState,(self,) + _args, _kwargs) + return val + def GetText(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetText,(self,) + _args, _kwargs) + return val + def GetImage(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetImage,(self,) + _args, _kwargs) + return val + def GetData(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetData,(self,) + _args, _kwargs) + return val + def GetWidth(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetWidth,(self,) + _args, _kwargs) + return val + def GetAlign(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetAlign,(self,) + _args, _kwargs) + return val + def GetAttributes(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetAttributes,(self,) + _args, _kwargs) + if val: val = wxListItemAttrPtr(val) + return val + def HasAttributes(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_HasAttributes,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetFont(self, *_args, **_kwargs): + val = apply(controls2c.wxListItem_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val def __setattr__(self,name,value): if name == "m_mask" : controls2c.wxListItem_m_mask_set(self,value) @@ -84,10 +219,51 @@ class wxListItem(wxListItemPtr): -class wxListEventPtr(wxCommandEventPtr): +class wxListEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetCode(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetCode,(self,) + _args, _kwargs) + return val + def GetIndex(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetIndex,(self,) + _args, _kwargs) + return val + def GetOldIndex(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetOldIndex,(self,) + _args, _kwargs) + return val + def GetOldItem(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetOldItem,(self,) + _args, _kwargs) + return val + def GetColumn(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetColumn,(self,) + _args, _kwargs) + return val + def Cancelled(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_Cancelled,(self,) + _args, _kwargs) + return val + def GetPoint(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetPoint,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def GetLabel(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetLabel,(self,) + _args, _kwargs) + return val + def GetText(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetText,(self,) + _args, _kwargs) + return val + def GetImage(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetImage,(self,) + _args, _kwargs) + return val + def GetData(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetData,(self,) + _args, _kwargs) + return val + def GetMask(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetMask,(self,) + _args, _kwargs) + return val + def GetItem(self, *_args, **_kwargs): + val = apply(controls2c.wxListEvent_GetItem,(self,) + _args, _kwargs) + if val: val = wxListItemPtr(val) + return val def __setattr__(self,name,value): if name == "m_code" : controls2c.wxListEvent_m_code_set(self,value) @@ -160,6 +336,14 @@ class wxListCtrlPtr(wxControlPtr): return val def EditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EditLabel,(self,) + _args, _kwargs) + if val: val = wxTextCtrlPtr(val) + return val + def EndEditLabel(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_EndEditLabel,(self,) + _args, _kwargs) + return val + def GetEditControl(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetEditControl,(self,) + _args, _kwargs) + if val: val = wxTextCtrlPtr(val) return val def EnsureVisible(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs) @@ -219,14 +403,21 @@ class wxListCtrlPtr(wxControlPtr): def GetSelectedItemCount(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs) return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_SetTextColour,(self,) + _args, _kwargs) + return val def GetTopItem(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetTopItem,(self,) + _args, _kwargs) return val def HitTest(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs) return val - def InsertColumnWith(self, *_args, **_kwargs): - val = apply(controls2c.wxListCtrl_InsertColumnWith,(self,) + _args, _kwargs) + def InsertColumnInfo(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs) return val def InsertColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs) @@ -294,7 +485,7 @@ class wxListCtrl(wxListCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -309,6 +500,9 @@ class wxTreeItemIdPtr : def IsOk(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemId_IsOk,(self,) + _args, _kwargs) return val + def __cmp__(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeItemId___cmp__,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxTreeItemId(wxTreeItemIdPtr): @@ -381,6 +575,9 @@ class wxTreeCtrlPtr(wxControlPtr): def __init__(self,this): self.this = this self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl__setSelf,(self,) + _args, _kwargs) + return val def GetCount(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetCount,(self,) + _args, _kwargs) return val @@ -516,6 +713,10 @@ class wxTreeCtrlPtr(wxControlPtr): val = apply(controls2c.wxTreeCtrl_InsertItem,(self,) + _args, _kwargs) if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 return val + def InsertItemBefore(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_InsertItemBefore,(self,) + _args, _kwargs) + if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 + return val def AppendItem(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_AppendItem,(self,) + _args, _kwargs) if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 @@ -558,6 +759,14 @@ class wxTreeCtrlPtr(wxControlPtr): return val def EditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs) + if val: val = wxTextCtrlPtr(val) + return val + def GetEditControl(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_GetEditControl,(self,) + _args, _kwargs) + if val: val = wxTextCtrlPtr(val) + return val + def EndEditLabel(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self,) + _args, _kwargs) return val def SortChildren(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_SortChildren,(self,) + _args, _kwargs) @@ -580,17 +789,28 @@ class wxTreeCtrlPtr(wxControlPtr): def SetItemFont(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs) return val + def SetItemDropHighlight(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_SetItemDropHighlight,(self,) + _args, _kwargs) + return val + def GetBoundingRect(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_GetBoundingRect,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) - # Redefine a couple methods that SWIG gets a bit confused on... - def GetFirstChild(self,arg0,arg1): - val1, val2 = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1) + # Redefine some methods that SWIG gets a bit confused on... + def GetFirstChild(self, *_args, **_kwargs): + val1,val2 = apply(controls2c.wxTreeCtrl_GetFirstChild,(self,) + _args, _kwargs) val1 = wxTreeItemIdPtr(val1) val1.thisown = 1 return (val1,val2) - def GetNextChild(self,arg0,arg1): - val1, val2 = controls2c.wxTreeCtrl_GetNextChild(self.this,arg0.this,arg1) + def GetNextChild(self, *_args, **_kwargs): + val1,val2 = apply(controls2c.wxTreeCtrl_GetNextChild,(self,) + _args, _kwargs) + val1 = wxTreeItemIdPtr(val1) + val1.thisown = 1 + return (val1,val2) + def HitTest(self, *_args, **_kwargs): + val1, val2 = apply(controls2c.wxTreeCtrl_HitTest,(self,) + _args, _kwargs) val1 = wxTreeItemIdPtr(val1) val1.thisown = 1 return (val1,val2) @@ -599,7 +819,8 @@ class wxTreeCtrl(wxTreeCtrlPtr): def __init__(self,*_args,**_kwargs): self.this = apply(controls2c.new_wxTreeCtrl,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) + self._setSelf(self, wxTreeCtrl) @@ -642,10 +863,6 @@ wxLIST_ALIGN_DEFAULT = controls2c.wxLIST_ALIGN_DEFAULT wxLIST_ALIGN_LEFT = controls2c.wxLIST_ALIGN_LEFT wxLIST_ALIGN_TOP = controls2c.wxLIST_ALIGN_TOP wxLIST_ALIGN_SNAP_TO_GRID = controls2c.wxLIST_ALIGN_SNAP_TO_GRID -wxLIST_FORMAT_LEFT = controls2c.wxLIST_FORMAT_LEFT -wxLIST_FORMAT_RIGHT = controls2c.wxLIST_FORMAT_RIGHT -wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE -wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER wxLIST_AUTOSIZE = controls2c.wxLIST_AUTOSIZE wxLIST_AUTOSIZE_USEHEADER = controls2c.wxLIST_AUTOSIZE_USEHEADER wxLIST_RECT_BOUNDS = controls2c.wxLIST_RECT_BOUNDS @@ -655,6 +872,10 @@ wxLIST_FIND_UP = controls2c.wxLIST_FIND_UP wxLIST_FIND_DOWN = controls2c.wxLIST_FIND_DOWN wxLIST_FIND_LEFT = controls2c.wxLIST_FIND_LEFT wxLIST_FIND_RIGHT = controls2c.wxLIST_FIND_RIGHT +wxLIST_FORMAT_LEFT = controls2c.wxLIST_FORMAT_LEFT +wxLIST_FORMAT_RIGHT = controls2c.wxLIST_FORMAT_RIGHT +wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE +wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER wxTreeItemIcon_Normal = controls2c.wxTreeItemIcon_Normal wxTreeItemIcon_Selected = controls2c.wxTreeItemIcon_Selected wxTreeItemIcon_Expanded = controls2c.wxTreeItemIcon_Expanded diff --git a/utils/wxPython/src/gtk/events.cpp b/wxPython/src/msw/events.cpp similarity index 80% rename from utils/wxPython/src/gtk/events.cpp rename to wxPython/src/msw/events.cpp index 3a6ea4d9dc..7cb96dd196 100644 --- a/utils/wxPython/src/gtk/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/events.cpp + * FILE : src/msw/events.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,7 +60,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -764,8 +765,8 @@ static PyObject *_wrap_new_wxCommandEvent(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxCommandEvent_Checked(_swigobj) (_swigobj->Checked()) -static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxCommandEvent_IsChecked(_swigobj) (_swigobj->IsChecked()) +static PyObject *_wrap_wxCommandEvent_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxCommandEvent * _arg0; @@ -773,18 +774,18 @@ static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, Py char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_Checked",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_IsChecked",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_Checked. Expected _wxCommandEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_IsChecked. Expected _wxCommandEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCommandEvent_Checked(_arg0); + _result = (bool )wxCommandEvent_IsChecked(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -951,11 +952,22 @@ static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2176,6 +2188,515 @@ static PyObject *_wrap_wxMouseEvent_GetY(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxMouseEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_set. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxMouseEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_x_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_x_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxMouseEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_set. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxMouseEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_y_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_y_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxMouseEvent_m_y_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxMouseEvent_m_leftDown_set(_swigobj,_swigval) (_swigobj->m_leftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_leftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_leftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_leftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_leftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_leftDown_get(_swigobj) ((bool ) _swigobj->m_leftDown) +static PyObject *_wrap_wxMouseEvent_m_leftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_leftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_leftDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_leftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_middleDown_set(_swigobj,_swigval) (_swigobj->m_middleDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_middleDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_middleDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_middleDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_middleDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_middleDown_get(_swigobj) ((bool ) _swigobj->m_middleDown) +static PyObject *_wrap_wxMouseEvent_m_middleDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_middleDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_middleDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_middleDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_rightDown_set(_swigobj,_swigval) (_swigobj->m_rightDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_rightDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_rightDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_rightDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_rightDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_rightDown_get(_swigobj) ((bool ) _swigobj->m_rightDown) +static PyObject *_wrap_wxMouseEvent_m_rightDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_rightDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_rightDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_rightDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_controlDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxMouseEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_controlDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_controlDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_controlDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_shiftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxMouseEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_shiftDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_altDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxMouseEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_altDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxMouseEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMouseEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_set. Expected _wxMouseEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxMouseEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxMouseEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMouseEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMouseEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMouseEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMouseEvent_m_metaDown_get. Expected _wxMouseEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMouseEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxKeyEventTowxEvent(void *ptr) { wxKeyEvent *src; wxEvent *dest; @@ -2345,6 +2866,60 @@ static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) +static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_GetKeyCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_GetKeyCode. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_GetKeyCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_HasModifiers(_swigobj) (_swigobj->HasModifiers()) +static PyObject *_wrap_wxKeyEvent_HasModifiers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_HasModifiers",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_HasModifiers. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_HasModifiers(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxKeyEvent_GetX(_swigobj) (_swigobj->GetX()) static PyObject *_wrap_wxKeyEvent_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2475,6 +3050,456 @@ static PyObject *_wrap_wxKeyEvent_GetPositionTuple(PyObject *self, PyObject *arg return _resultobj; } +#define wxKeyEvent_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_x_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_x_get(_swigobj) ((long ) _swigobj->m_x) +static PyObject *_wrap_wxKeyEvent_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_x_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_x_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_x_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_y_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_y_get(_swigobj) ((long ) _swigobj->m_y) +static PyObject *_wrap_wxKeyEvent_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_y_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_y_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_y_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_set(_swigobj,_swigval) (_swigobj->m_keyCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_keyCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_keyCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxKeyEvent_m_keyCode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_keyCode_get(_swigobj) ((long ) _swigobj->m_keyCode) +static PyObject *_wrap_wxKeyEvent_m_keyCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_keyCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_keyCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxKeyEvent_m_keyCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxKeyEvent_m_controlDown_set(_swigobj,_swigval) (_swigobj->m_controlDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_controlDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_controlDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_controlDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_controlDown_get(_swigobj) ((bool ) _swigobj->m_controlDown) +static PyObject *_wrap_wxKeyEvent_m_controlDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_controlDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_controlDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_controlDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_set(_swigobj,_swigval) (_swigobj->m_shiftDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_shiftDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_shiftDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_shiftDown_get(_swigobj) ((bool ) _swigobj->m_shiftDown) +static PyObject *_wrap_wxKeyEvent_m_shiftDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_shiftDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_shiftDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_shiftDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_set(_swigobj,_swigval) (_swigobj->m_altDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_altDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_altDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_altDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_altDown_get(_swigobj) ((bool ) _swigobj->m_altDown) +static PyObject *_wrap_wxKeyEvent_m_altDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_altDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_altDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_altDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_set(_swigobj,_swigval) (_swigobj->m_metaDown = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_metaDown_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_metaDown", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_metaDown_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_metaDown_get(_swigobj) ((bool ) _swigobj->m_metaDown) +static PyObject *_wrap_wxKeyEvent_m_metaDown_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_metaDown_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_metaDown_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_metaDown_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_scanCode_set(_swigobj,_swigval) (_swigobj->m_scanCode = _swigval,_swigval) +static PyObject *_wrap_wxKeyEvent_m_scanCode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_scanCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxKeyEvent_m_scanCode_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_set. Expected _wxKeyEvent_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxKeyEvent_m_scanCode_get(_swigobj) ((bool ) _swigobj->m_scanCode) +static PyObject *_wrap_wxKeyEvent_m_scanCode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxKeyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_m_scanCode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_m_scanCode_get. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxKeyEvent_m_scanCode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxNavigationKeyEventTowxEvent(void *ptr) { wxNavigationKeyEvent *src; wxEvent *dest; @@ -4192,11 +5217,22 @@ static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4315,6 +5351,33 @@ static PyObject *_wrap_wxNotifyEvent_IsAllowed(PyObject *self, PyObject *args, P return _resultobj; } +#define wxNotifyEvent_Allow(_swigobj) (_swigobj->Allow()) +static PyObject *_wrap_wxNotifyEvent_Allow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotifyEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotifyEvent_Allow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotifyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotifyEvent_Allow. Expected _wxNotifyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotifyEvent_Allow(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxNotifyEvent_Veto(_swigobj) (_swigobj->Veto()) static PyObject *_wrap_wxNotifyEvent_Veto(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4537,6 +5600,14 @@ static PyObject *_wrap_wxQueryNewPaletteEvent_GetPaletteRealized(PyObject *self, return _resultobj; } +static void *SwigwxWindowCreateEventTowxCommandEvent(void *ptr) { + wxWindowCreateEvent *src; + wxCommandEvent *dest; + src = (wxWindowCreateEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + static void *SwigwxWindowCreateEventTowxEvent(void *ptr) { wxWindowCreateEvent *src; wxEvent *dest; @@ -4613,6 +5684,14 @@ static PyObject *_wrap_wxWindowCreateEvent_GetWindow(PyObject *self, PyObject *a return _resultobj; } +static void *SwigwxWindowDestroyEventTowxCommandEvent(void *ptr) { + wxWindowDestroyEvent *src; + wxCommandEvent *dest; + src = (wxWindowDestroyEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + static void *SwigwxWindowDestroyEventTowxEvent(void *ptr) { wxWindowDestroyEvent *src; wxEvent *dest; @@ -4689,6 +5768,68 @@ static PyObject *_wrap_wxWindowDestroyEvent_GetWindow(PyObject *self, PyObject * return _resultobj; } +static void *SwigwxTimerEventTowxEvent(void *ptr) { + wxTimerEvent *src; + wxEvent *dest; + src = (wxTimerEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxTimerEvent(_swigarg0,_swigarg1) (new wxTimerEvent(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxTimerEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimerEvent * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + char *_kwnames[] = { "id","interval", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxTimerEvent",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTimerEvent *)new_wxTimerEvent(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimerEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimerEvent_GetInterval(_swigobj) (_swigobj->GetInterval()) +static PyObject *_wrap_wxTimerEvent_GetInterval(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimerEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimerEvent_GetInterval",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimerEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimerEvent_GetInterval. Expected _wxTimerEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimerEvent_GetInterval(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxPyEventTowxEvent(void *ptr) { wxPyEvent *src; wxEvent *dest; @@ -4951,6 +6092,8 @@ static PyMethodDef eventscMethods[] = { { "wxPyEvent_SetSelf", (PyCFunction) _wrap_wxPyEvent_SetSelf, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPyEvent", (PyCFunction) _wrap_delete_wxPyEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyEvent", (PyCFunction) _wrap_new_wxPyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxTimerEvent_GetInterval", (PyCFunction) _wrap_wxTimerEvent_GetInterval, METH_VARARGS | METH_KEYWORDS }, + { "new_wxTimerEvent", (PyCFunction) _wrap_new_wxTimerEvent, METH_VARARGS | METH_KEYWORDS }, { "wxWindowDestroyEvent_GetWindow", (PyCFunction) _wrap_wxWindowDestroyEvent_GetWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindowDestroyEvent", (PyCFunction) _wrap_new_wxWindowDestroyEvent, METH_VARARGS | METH_KEYWORDS }, { "wxWindowCreateEvent_GetWindow", (PyCFunction) _wrap_wxWindowCreateEvent_GetWindow, METH_VARARGS | METH_KEYWORDS }, @@ -4962,6 +6105,7 @@ static PyMethodDef eventscMethods[] = { { "wxPaletteChangedEvent_SetChangedWindow", (PyCFunction) _wrap_wxPaletteChangedEvent_SetChangedWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxPaletteChangedEvent", (PyCFunction) _wrap_new_wxPaletteChangedEvent, METH_VARARGS | METH_KEYWORDS }, { "wxNotifyEvent_Veto", (PyCFunction) _wrap_wxNotifyEvent_Veto, METH_VARARGS | METH_KEYWORDS }, + { "wxNotifyEvent_Allow", (PyCFunction) _wrap_wxNotifyEvent_Allow, METH_VARARGS | METH_KEYWORDS }, { "wxNotifyEvent_IsAllowed", (PyCFunction) _wrap_wxNotifyEvent_IsAllowed, METH_VARARGS | METH_KEYWORDS }, { "new_wxNotifyEvent", (PyCFunction) _wrap_new_wxNotifyEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxSysColourChangedEvent", (PyCFunction) _wrap_new_wxSysColourChangedEvent, METH_VARARGS | METH_KEYWORDS }, @@ -5021,16 +6165,52 @@ static PyMethodDef eventscMethods[] = { { "wxNavigationKeyEvent_SetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_SetDirection, METH_VARARGS | METH_KEYWORDS }, { "wxNavigationKeyEvent_GetDirection", (PyCFunction) _wrap_wxNavigationKeyEvent_GetDirection, METH_VARARGS | METH_KEYWORDS }, { "new_wxNavigationKeyEvent", (PyCFunction) _wrap_new_wxNavigationKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_get", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_scanCode_set", (PyCFunction) _wrap_wxKeyEvent_m_scanCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_get", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_metaDown_set", (PyCFunction) _wrap_wxKeyEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_get", (PyCFunction) _wrap_wxKeyEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_altDown_set", (PyCFunction) _wrap_wxKeyEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_get", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_shiftDown_set", (PyCFunction) _wrap_wxKeyEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_get", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_controlDown_set", (PyCFunction) _wrap_wxKeyEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_get", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_keyCode_set", (PyCFunction) _wrap_wxKeyEvent_m_keyCode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_get", (PyCFunction) _wrap_wxKeyEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_y_set", (PyCFunction) _wrap_wxKeyEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_get", (PyCFunction) _wrap_wxKeyEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_m_x_set", (PyCFunction) _wrap_wxKeyEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPositionTuple", (PyCFunction) _wrap_wxKeyEvent_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetPosition", (PyCFunction) _wrap_wxKeyEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetY", (PyCFunction) _wrap_wxKeyEvent_GetY, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetX", (PyCFunction) _wrap_wxKeyEvent_GetX, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_HasModifiers", (PyCFunction) _wrap_wxKeyEvent_HasModifiers, METH_VARARGS | METH_KEYWORDS }, + { "wxKeyEvent_GetKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetKeyCode, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_KeyCode", (PyCFunction) _wrap_wxKeyEvent_KeyCode, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ShiftDown", (PyCFunction) _wrap_wxKeyEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_AltDown", (PyCFunction) _wrap_wxKeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ControlDown", (PyCFunction) _wrap_wxKeyEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, { "new_wxKeyEvent", (PyCFunction) _wrap_new_wxKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_get", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_metaDown_set", (PyCFunction) _wrap_wxMouseEvent_m_metaDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_get", (PyCFunction) _wrap_wxMouseEvent_m_altDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_altDown_set", (PyCFunction) _wrap_wxMouseEvent_m_altDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_shiftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_shiftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_get", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_controlDown_set", (PyCFunction) _wrap_wxMouseEvent_m_controlDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_get", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_rightDown_set", (PyCFunction) _wrap_wxMouseEvent_m_rightDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_get", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_middleDown_set", (PyCFunction) _wrap_wxMouseEvent_m_middleDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_get", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_leftDown_set", (PyCFunction) _wrap_wxMouseEvent_m_leftDown_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_get", (PyCFunction) _wrap_wxMouseEvent_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_y_set", (PyCFunction) _wrap_wxMouseEvent_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_get", (PyCFunction) _wrap_wxMouseEvent_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxMouseEvent_m_x_set", (PyCFunction) _wrap_wxMouseEvent_m_x_set, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetY", (PyCFunction) _wrap_wxMouseEvent_GetY, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetX", (PyCFunction) _wrap_wxMouseEvent_GetX, METH_VARARGS | METH_KEYWORDS }, { "wxMouseEvent_GetLogicalPosition", (PyCFunction) _wrap_wxMouseEvent_GetLogicalPosition, METH_VARARGS | METH_KEYWORDS }, @@ -5078,7 +6258,8 @@ static PyMethodDef eventscMethods[] = { { "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetInt", (PyCFunction) _wrap_wxCommandEvent_GetInt, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetExtraLong", (PyCFunction) _wrap_wxCommandEvent_GetExtraLong, METH_VARARGS | METH_KEYWORDS }, - { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_Checked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_IsChecked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, { "new_wxCommandEvent", (PyCFunction) _wrap_new_wxCommandEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_SetCanVeto", (PyCFunction) _wrap_wxCloseEvent_SetCanVeto, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_GetVeto", (PyCFunction) _wrap_wxCloseEvent_GetVeto, METH_VARARGS | METH_KEYWORDS }, @@ -5115,6 +6296,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent}, { "_wxEvent","_class_wxPyEvent",SwigwxPyEventTowxEvent}, { "_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent}, + { "_wxEvent","_class_wxTimerEvent",SwigwxTimerEventTowxEvent}, + { "_wxEvent","_wxTimerEvent",SwigwxTimerEventTowxEvent}, { "_wxEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_wxEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_wxEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent}, @@ -5186,19 +6369,26 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxMask","_class_wxMask",0}, + { "_wxPen","_class_wxPen",0}, { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, + { "_wxImageList","_class_wxImageList",0}, { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxDC","_class_wxDC",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -5210,20 +6400,27 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxPyEvent","_class_wxPyEvent",0}, + { "_class_wxMask","_wxMask",0}, { "_class_wxKeyEvent","_wxKeyEvent",0}, + { "_wxColour","_class_wxColour",0}, { "_wxIdleEvent","_class_wxIdleEvent",0}, { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, + { "_wxBrush","_class_wxBrush",0}, { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_class_wxEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent}, { "_class_wxEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent}, { "_class_wxEvent","_class_wxPyEvent",SwigwxPyEventTowxEvent}, { "_class_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent}, + { "_class_wxEvent","_class_wxTimerEvent",SwigwxTimerEventTowxEvent}, + { "_class_wxEvent","_wxTimerEvent",SwigwxTimerEventTowxEvent}, { "_class_wxEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_class_wxEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent}, { "_class_wxEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent}, @@ -5286,6 +6483,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, { "_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, + { "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, { "_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, @@ -5295,7 +6496,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, { "_wxPoint","_class_wxPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, + { "_char","_wxChar",0}, + { "_wxBitmap","_class_wxBitmap",0}, + { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_class_wxPyEvent","_wxPyEvent",0}, @@ -5311,15 +6515,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRegion","_wxRegion",0}, { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, + { "_wxFont","_class_wxFont",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, @@ -5327,31 +6533,44 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, + { "_wxScreenDC","_class_wxScreenDC",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, + { "_class_wxBrush","_wxBrush",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, + { "_class_wxFont","_wxFont",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, + { "_wxMemoryDC","_class_wxMemoryDC",0}, + { "_wxPaintDC","_class_wxPaintDC",0}, + { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, + { "_class_wxCursor","_wxCursor",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, { "_unsigned_int","_int",0}, + { "_wxIcon","_class_wxIcon",0}, + { "_class_wxPen","_wxPen",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -5359,9 +6578,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollEvent","_wxSpinEvent",SwigwxSpinEventTowxScrollEvent}, { "_class_wxScrollEvent","_wxScrollEvent",0}, { "_wxJoystickEvent","_class_wxJoystickEvent",0}, + { "_class_wxImageList","_wxImageList",0}, { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -5371,6 +6592,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -5381,13 +6603,25 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, + { "_class_wxIcon","_wxIcon",0}, + { "_class_wxColour","_wxColour",0}, + { "_class_wxScreenDC","_wxScreenDC",0}, + { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, @@ -5396,6 +6630,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, @@ -5405,6 +6640,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBusyInfo","_wxBusyInfo",0}, { "_class_wxCommandEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent}, { "_class_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent}, { "_class_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent}, @@ -5412,10 +6651,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxScrollEvent",SwigwxScrollEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxCommandEvent",0}, + { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxSize","_wxSize",0}, + { "_class_wxBitmap","_wxBitmap",0}, + { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, + { "_class_wxPalette","_wxPalette",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, {0,0,0}}; diff --git a/utils/wxPython/src/gtk/events.py b/wxPython/src/msw/events.py similarity index 86% rename from utils/wxPython/src/gtk/events.py rename to wxPython/src/msw/events.py index f088e26c73..3d61ae0ddf 100644 --- a/utils/wxPython/src/gtk/events.py +++ b/wxPython/src/msw/events.py @@ -2,6 +2,8 @@ import eventsc from misc import * + +from gdi import * class wxEventPtr : def __init__(self,this): self.this = this @@ -103,6 +105,9 @@ class wxCommandEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def IsChecked(self, *_args, **_kwargs): + val = apply(eventsc.wxCommandEvent_IsChecked,(self,) + _args, _kwargs) + return val def Checked(self, *_args, **_kwargs): val = apply(eventsc.wxCommandEvent_Checked,(self,) + _args, _kwargs) return val @@ -293,6 +298,55 @@ class wxMouseEventPtr(wxEventPtr): def GetY(self, *_args, **_kwargs): val = apply(eventsc.wxMouseEvent_GetY,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxMouseEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxMouseEvent_m_y_set(self,value) + return + if name == "m_leftDown" : + eventsc.wxMouseEvent_m_leftDown_set(self,value) + return + if name == "m_middleDown" : + eventsc.wxMouseEvent_m_middleDown_set(self,value) + return + if name == "m_rightDown" : + eventsc.wxMouseEvent_m_rightDown_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxMouseEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxMouseEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxMouseEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxMouseEvent_m_metaDown_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxMouseEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxMouseEvent_m_y_get(self) + if name == "m_leftDown" : + return eventsc.wxMouseEvent_m_leftDown_get(self) + if name == "m_middleDown" : + return eventsc.wxMouseEvent_m_middleDown_get(self) + if name == "m_rightDown" : + return eventsc.wxMouseEvent_m_rightDown_get(self) + if name == "m_controlDown" : + return eventsc.wxMouseEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxMouseEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxMouseEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxMouseEvent_m_metaDown_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxMouseEvent(wxMouseEventPtr): @@ -322,6 +376,12 @@ class wxKeyEventPtr(wxEventPtr): def KeyCode(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_KeyCode,(self,) + _args, _kwargs) return val + def GetKeyCode(self, *_args, **_kwargs): + val = apply(eventsc.wxKeyEvent_GetKeyCode,(self,) + _args, _kwargs) + return val + def HasModifiers(self, *_args, **_kwargs): + val = apply(eventsc.wxKeyEvent_HasModifiers,(self,) + _args, _kwargs) + return val def GetX(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetX,(self,) + _args, _kwargs) return val @@ -335,6 +395,50 @@ class wxKeyEventPtr(wxEventPtr): def GetPositionTuple(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetPositionTuple,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxKeyEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxKeyEvent_m_y_set(self,value) + return + if name == "m_keyCode" : + eventsc.wxKeyEvent_m_keyCode_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxKeyEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxKeyEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxKeyEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxKeyEvent_m_metaDown_set(self,value) + return + if name == "m_scanCode" : + eventsc.wxKeyEvent_m_scanCode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxKeyEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxKeyEvent_m_y_get(self) + if name == "m_keyCode" : + return eventsc.wxKeyEvent_m_keyCode_get(self) + if name == "m_controlDown" : + return eventsc.wxKeyEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxKeyEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxKeyEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxKeyEvent_m_metaDown_get(self) + if name == "m_scanCode" : + return eventsc.wxKeyEvent_m_scanCode_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxKeyEvent(wxKeyEventPtr): @@ -706,6 +810,9 @@ class wxNotifyEventPtr(wxCommandEventPtr): def IsAllowed(self, *_args, **_kwargs): val = apply(eventsc.wxNotifyEvent_IsAllowed,(self,) + _args, _kwargs) return val + def Allow(self, *_args, **_kwargs): + val = apply(eventsc.wxNotifyEvent_Allow,(self,) + _args, _kwargs) + return val def Veto(self, *_args, **_kwargs): val = apply(eventsc.wxNotifyEvent_Veto,(self,) + _args, _kwargs) return val @@ -760,7 +867,7 @@ class wxQueryNewPaletteEvent(wxQueryNewPaletteEventPtr): -class wxWindowCreateEventPtr(wxEventPtr): +class wxWindowCreateEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -778,7 +885,7 @@ class wxWindowCreateEvent(wxWindowCreateEventPtr): -class wxWindowDestroyEventPtr(wxEventPtr): +class wxWindowDestroyEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -796,6 +903,23 @@ class wxWindowDestroyEvent(wxWindowDestroyEventPtr): +class wxTimerEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetInterval(self, *_args, **_kwargs): + val = apply(eventsc.wxTimerEvent_GetInterval,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxTimerEvent(wxTimerEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(eventsc.new_wxTimerEvent,_args,_kwargs) + self.thisown = 1 + + + + class wxPyEventPtr(wxEventPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/msw/filesys.cpp b/wxPython/src/msw/filesys.cpp new file mode 100644 index 0000000000..f40624059d --- /dev/null +++ b/wxPython/src/msw/filesys.cpp @@ -0,0 +1,2438 @@ +/* + * FILE : src/msw/filesys.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initfilesysc + +#define SWIG_name "filesysc" + +#include "helpers.h" +#include +#include +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +// wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling +// the callback functions +class wxPyFileSystemHandler : public wxFileSystemHandler { +public: + wxPyFileSystemHandler() : wxFileSystemHandler() {} + + DEC_PYCALLBACK_BOOL_STRING_pure(CanOpen); + DEC_PYCALLBACK_FSF_FSSTRING_pure(OpenFile); + DEC_PYCALLBACK_STRING_STRINGINT_pure(FindFirst); + DEC_PYCALLBACK_STRING__pure(FindNext); + + wxString GetProtocol(const wxString& location) { + return wxFileSystemHandler::GetProtocol(location); + } + + wxString GetLeftLocation(const wxString& location) { + return wxFileSystemHandler::GetLeftLocation(location); + } + + wxString GetAnchor(const wxString& location) { + return wxFileSystemHandler::GetAnchor(location); + } + + wxString GetRightLocation(const wxString& location) { + return wxFileSystemHandler::GetRightLocation(location); + } + + wxString GetMimeTypeFromExt(const wxString& location){ + return wxFileSystemHandler::GetMimeTypeFromExt(location); + } + + PYPRIVATE; +}; + + +IMP_PYCALLBACK_BOOL_STRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, CanOpen); +IMP_PYCALLBACK_FSF_FSSTRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, OpenFile); +IMP_PYCALLBACK_STRING_STRINGINT_pure(wxPyFileSystemHandler, wxFileSystemHandler, FindFirst); +IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext); + +void __wxMemoryFSHandler_AddFile_wxImage(const wxString& filename, + wxImage& image, + long type) { + wxMemoryFSHandler::AddFile(filename, image, type); +} + +void __wxMemoryFSHandler_AddFile_wxBitmap(const wxString& filename, + const wxBitmap& bitmap, + long type) { + wxMemoryFSHandler::AddFile(filename, bitmap, type); +} + +// void __wxMemoryFSHandler_AddFile_wxString(const wxString& filename, +// const wxString& textdata) { +// wxMemoryFSHandler::AddFile(filename, textdata); +// } + +void __wxMemoryFSHandler_AddFile_Data(const wxString& filename, + PyObject* data) { + + wxMemoryFSHandler::AddFile(filename, + (void*)PyString_AsString(data), + (size_t)PyString_Size(data)); +} +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxImage * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","image","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxImage",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxImage. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxImage(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxBitmap * _arg1; + long _arg2; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","bitmap","type", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxBitmap",_kwnames,&_obj0,&_argo1,&_arg2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_wxBitmap(*_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "filename","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:__wxMemoryFSHandler_AddFile_Data",_kwnames,&_obj0,&_obj1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + _arg1 = _obj1; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + __wxMemoryFSHandler_AddFile_Data(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define new_wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInputStream * _arg0; + wxString * _arg1; + wxString * _arg2; + wxString * _arg3; + wxDateTime * _arg4; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "stream","loc","mimetype","anchor","modif", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:new_wxFSFile",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_argo4)) + return NULL; +{ + if (PyInstance_Check(_obj0)) { + wxPyInputStream* ptr; + if (SWIG_GetPtrObj(_obj0, (void **) &ptr,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } + _arg0 = ptr->wxi; + } else { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of new_wxFSFile. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)new_wxFSFile(_arg0,*_arg1,*_arg2,*_arg3,*_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxFSFile_GetStream(_swigobj) (_swigobj->GetStream()) +static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetStream. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxFSFile_GetStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(_resultobj, "thisown", one); + Py_DECREF(one); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxFSFile_GetMimeType(_swigobj) (_swigobj->GetMimeType()) +static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetMimeType",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetMimeType. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetMimeType(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetLocation(_swigobj) (_swigobj->GetLocation()) +static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetLocation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetLocation. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetLocation(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetAnchor(_swigobj) (_swigobj->GetAnchor()) +static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetAnchor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetAnchor. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxString & _result_ref = wxFSFile_GetAnchor(_arg0); + _result = (wxString *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxFSFile_GetModificationTime(_swigobj) (_swigobj->GetModificationTime()) +static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxFSFile * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFSFile_GetModificationTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFSFile_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFSFile_GetModificationTime. Expected _wxFSFile_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxFSFile_GetModificationTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { + wxPyFileSystemHandler *src; + wxFileSystemHandler *dest; + src = (wxPyFileSystemHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxFileSystemHandler() (new wxPyFileSystemHandler()) +static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystemHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyFileSystemHandler *)new_wxFileSystemHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFileSystemHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystemHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFileSystemHandler * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler__setSelf. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystemHandler__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFileSystemHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_CanOpen. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFileSystemHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystemHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxPyFileSystemHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_OpenFile. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileSystemHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystemHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindFirst. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystemHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_FindNext. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetProtocol(_swigobj,_swigarg0) (_swigobj->GetProtocol(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetProtocol",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetProtocol. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetProtocol(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetLeftLocation(_swigobj,_swigarg0) (_swigobj->GetLeftLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetLeftLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetLeftLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetLeftLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetAnchor(_swigobj,_swigarg0) (_swigobj->GetAnchor(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetAnchor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetAnchor. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetAnchor(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetRightLocation(_swigobj,_swigarg0) (_swigobj->GetRightLocation(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetRightLocation",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetRightLocation. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetRightLocation(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystemHandler_GetMimeTypeFromExt(_swigobj,_swigarg0) (_swigobj->GetMimeTypeFromExt(_swigarg0)) +static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyFileSystemHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystemHandler_GetMimeTypeFromExt",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystemHandler_GetMimeTypeFromExt. Expected _wxPyFileSystemHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystemHandler_GetMimeTypeFromExt(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define new_wxFileSystem() (new wxFileSystem()) +static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileSystem",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileSystem *)new_wxFileSystem(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileSystem_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFileSystem_ChangePathTo(_swigobj,_swigarg0,_swigarg1) (_swigobj->ChangePathTo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystem * _arg0; + wxString * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","location","is_dir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_ChangePathTo",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_ChangePathTo. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem_ChangePathTo(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_GetPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_GetPath. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_GetPath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_OpenFile(_swigobj,_swigarg0) (_swigobj->OpenFile(_swigarg0)) +static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxFileSystem * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystem_OpenFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFileSystem_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFileSystem_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindFirst. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxFileSystem_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxFileSystem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_FindNext. Expected _wxFileSystem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSystem_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_AddHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileSystemHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "handler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_AddHandler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileSystemHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileSystem_AddHandler. Expected _wxFileSystemHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::AddHandler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxFileSystem_CleanUpHandlers(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFileSystem_CleanUpHandlers",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileSystem::CleanUpHandlers(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxInternetFSHandlerTowxFileSystemHandler(void *ptr) { + wxInternetFSHandler *src; + wxFileSystemHandler *dest; + src = (wxInternetFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxInternetFSHandler() (new wxInternetFSHandler()) +static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInternetFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxInternetFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInternetFSHandler *)new_wxInternetFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxInternetFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxInternetFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxInternetFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxInternetFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_CanOpen. Expected _wxInternetFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxInternetFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxInternetFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxInternetFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxInternetFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxInternetFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInternetFSHandler_OpenFile. Expected _wxInternetFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxInternetFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static void *SwigwxZipFSHandlerTowxFileSystemHandler(void *ptr) { + wxZipFSHandler *src; + wxFileSystemHandler *dest; + src = (wxZipFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxZipFSHandler() (new wxZipFSHandler()) +static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxZipFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxZipFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxZipFSHandler *)new_wxZipFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxZipFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxZipFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxZipFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_CanOpen. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxZipFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxZipFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxZipFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxZipFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_OpenFile. Expected _wxZipFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxZipFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxZipFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxZipFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindFirst. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxZipFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxZipFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxZipFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxZipFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxZipFSHandler_FindNext. Expected _wxZipFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxZipFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static void *SwigwxMemoryFSHandlerTowxFileSystemHandler(void *ptr) { + wxMemoryFSHandler *src; + wxFileSystemHandler *dest; + src = (wxMemoryFSHandler *) ptr; + dest = (wxFileSystemHandler *) src; + return (void *) dest; +} + +#define new_wxMemoryFSHandler() (new wxMemoryFSHandler()) +static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMemoryFSHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMemoryFSHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMemoryFSHandler *)new_wxMemoryFSHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMemoryFSHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_RemoveFile",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMemoryFSHandler::RemoveFile(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxMemoryFSHandler_CanOpen(_swigobj,_swigarg0) (_swigobj->CanOpen(_swigarg0)) +static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","location", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMemoryFSHandler_CanOpen",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_CanOpen. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxMemoryFSHandler_CanOpen(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxMemoryFSHandler_OpenFile(_swigobj,_swigarg0,_swigarg1) (_swigobj->OpenFile(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFSFile * _result; + wxMemoryFSHandler * _arg0; + wxFileSystem * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","fs","location", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxMemoryFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_OpenFile. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryFSHandler_OpenFile. Expected _wxFileSystem_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindFirst(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindFirst(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","spec","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxMemoryFSHandler_FindFirst",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindFirst. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindFirst(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxMemoryFSHandler_FindNext(_swigobj) (_swigobj->FindNext()) +static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxMemoryFSHandler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_FindNext",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMemoryFSHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMemoryFSHandler_FindNext. Expected _wxMemoryFSHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxMemoryFSHandler_FindNext(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyMethodDef filesyscMethods[] = { + { "wxMemoryFSHandler_FindNext", (PyCFunction) _wrap_wxMemoryFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_FindFirst", (PyCFunction) _wrap_wxMemoryFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_OpenFile", (PyCFunction) _wrap_wxMemoryFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_CanOpen", (PyCFunction) _wrap_wxMemoryFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxMemoryFSHandler_RemoveFile", (PyCFunction) _wrap_wxMemoryFSHandler_RemoveFile, METH_VARARGS | METH_KEYWORDS }, + { "new_wxMemoryFSHandler", (PyCFunction) _wrap_new_wxMemoryFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindNext", (PyCFunction) _wrap_wxZipFSHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_FindFirst", (PyCFunction) _wrap_wxZipFSHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_OpenFile", (PyCFunction) _wrap_wxZipFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxZipFSHandler_CanOpen", (PyCFunction) _wrap_wxZipFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxZipFSHandler", (PyCFunction) _wrap_new_wxZipFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_OpenFile", (PyCFunction) _wrap_wxInternetFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxInternetFSHandler_CanOpen", (PyCFunction) _wrap_wxInternetFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInternetFSHandler", (PyCFunction) _wrap_new_wxInternetFSHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_CleanUpHandlers", (PyCFunction) _wrap_wxFileSystem_CleanUpHandlers, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_AddHandler", (PyCFunction) _wrap_wxFileSystem_AddHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindNext", (PyCFunction) _wrap_wxFileSystem_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_FindFirst", (PyCFunction) _wrap_wxFileSystem_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_OpenFile", (PyCFunction) _wrap_wxFileSystem_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_GetPath", (PyCFunction) _wrap_wxFileSystem_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystem_ChangePathTo", (PyCFunction) _wrap_wxFileSystem_ChangePathTo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystem", (PyCFunction) _wrap_new_wxFileSystem, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetMimeTypeFromExt", (PyCFunction) _wrap_wxFileSystemHandler_GetMimeTypeFromExt, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetRightLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetRightLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetAnchor", (PyCFunction) _wrap_wxFileSystemHandler_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetLeftLocation", (PyCFunction) _wrap_wxFileSystemHandler_GetLeftLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_GetProtocol", (PyCFunction) _wrap_wxFileSystemHandler_GetProtocol, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindNext", (PyCFunction) _wrap_wxFileSystemHandler_FindNext, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_FindFirst", (PyCFunction) _wrap_wxFileSystemHandler_FindFirst, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_OpenFile", (PyCFunction) _wrap_wxFileSystemHandler_OpenFile, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler_CanOpen", (PyCFunction) _wrap_wxFileSystemHandler_CanOpen, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSystemHandler__setSelf", (PyCFunction) _wrap_wxFileSystemHandler__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileSystemHandler", (PyCFunction) _wrap_new_wxFileSystemHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetModificationTime", (PyCFunction) _wrap_wxFSFile_GetModificationTime, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetAnchor", (PyCFunction) _wrap_wxFSFile_GetAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetLocation", (PyCFunction) _wrap_wxFSFile_GetLocation, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetMimeType", (PyCFunction) _wrap_wxFSFile_GetMimeType, METH_VARARGS | METH_KEYWORDS }, + { "wxFSFile_GetStream", (PyCFunction) _wrap_wxFSFile_GetStream, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFSFile", (PyCFunction) _wrap_new_wxFSFile, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_Data", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_Data, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxBitmap", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxBitmap, METH_VARARGS | METH_KEYWORDS }, + { "__wxMemoryFSHandler_AddFile_wxImage", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxImage, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_signed_long","_long",0}, + { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, + { "_wxBMPHandler","_class_wxBMPHandler",0}, + { "_wxImage","_class_wxImage",0}, + { "_class_wxDateTime","_wxDateTime",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxRegionIterator","_wxRegionIterator",0}, + { "_wxGIFHandler","_class_wxGIFHandler",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, + { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxCursor","_class_wxCursor",0}, + { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxMask","_class_wxMask",0}, + { "_wxPNGHandler","_class_wxPNGHandler",0}, + { "_wxPen","_class_wxPen",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_wxImageList","_class_wxImageList",0}, + { "_class_wxTIFFHandler","_wxTIFFHandler",0}, + { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxDC","_class_wxDC",0}, + { "_class_wxBMPHandler","_wxBMPHandler",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_class_wxRealPoint","_wxRealPoint",0}, + { "_wxPNMHandler","_class_wxPNMHandler",0}, + { "_class_wxGIFHandler","_wxGIFHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, + { "_class_wxMask","_wxMask",0}, + { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxColour","_class_wxColour",0}, + { "_wxBrush","_class_wxBrush",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_wxRect","_class_wxRect",0}, + { "_class_wxImage","_wxImage",0}, + { "_wxPoint","_class_wxPoint",0}, + { "_class_wxPNMHandler","_wxPNMHandler",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, + { "_wxBitmap","_class_wxBitmap",0}, + { "_wxWindowDC","_class_wxWindowDC",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, + { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_wxConfig","_class_wxConfig",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_class_wxRegion","_wxRegion",0}, + { "_wxFont","_class_wxFont",0}, + { "_wxFSFile","_class_wxFSFile",0}, + { "_unsigned_long","_long",0}, + { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_wxDC",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, + { "_wxScreenDC","_class_wxScreenDC",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_class_wxBrush","_wxBrush",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, + { "_class_wxFont","_wxFont",0}, + { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxClientDC","_class_wxClientDC",0}, + { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, + { "_wxRealPoint","_class_wxRealPoint",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxMemoryDC","_class_wxMemoryDC",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, + { "_wxPaintDC","_class_wxPaintDC",0}, + { "_class_wxWindowDC","_wxWindowDC",0}, + { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, + { "_class_wxCursor","_wxCursor",0}, + { "_class_wxImageHandler","_wxImageHandler",0}, + { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxIcon","_class_wxIcon",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_class_wxPen","_wxPen",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_class_wxImageList","_wxImageList",0}, + { "_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, + { "_wxPCXHandler","_class_wxPCXHandler",0}, + { "_wxJPEGHandler","_class_wxJPEGHandler",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_wxSize","_class_wxSize",0}, + { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, + { "_class_wxPaintDC","_wxPaintDC",0}, + { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, + { "_class_wxIcon","_wxIcon",0}, + { "_class_wxColour","_wxColour",0}, + { "_class_wxScreenDC","_wxScreenDC",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, + { "_wxPalette","_class_wxPalette",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxRegion","_class_wxRegion",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, + { "_class_wxPCXHandler","_wxPCXHandler",0}, + { "_wxTIFFHandler","_class_wxTIFFHandler",0}, + { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxClientDC","_wxClientDC",0}, + { "_class_wxSize","_wxSize",0}, + { "_class_wxBitmap","_wxBitmap",0}, + { "_class_wxMemoryDC","_wxMemoryDC",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, + { "_class_wxConfig","_wxConfig",0}, + { "_class_wxPalette","_wxPalette",0}, + { "_class_wxFileSystemHandler","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxZipFSHandler",SwigwxZipFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxFileSystemHandler}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initfilesysc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("filesysc", filesyscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/filesys.py b/wxPython/src/msw/filesys.py new file mode 100644 index 0000000000..b0f442faea --- /dev/null +++ b/wxPython/src/msw/filesys.py @@ -0,0 +1,240 @@ +# This file was created automatically by SWIG. +import filesysc + +from utils import * + +from image import * + +from misc import * + +from gdi import * + +from streams import * +import wx +import string + +import types +def wxMemoryFSHandler_AddFile(filename, a, b=''): + if isinstance(a, wxImage): + __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) + elif isinstance(a, wxBitmap): + __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) + elif type(a) == types.StringType: + #__wxMemoryFSHandler_AddFile_wxString(filename, a) + __wxMemoryFSHandler_AddFile_Data(filename, a) + else: raise TypeError, 'wxImage, wxBitmap or string expected' + +class wxFSFilePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetStream(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetStream,(self,) + _args, _kwargs) + return val + def GetMimeType(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetMimeType,(self,) + _args, _kwargs) + return val + def GetLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetAnchor,(self,) + _args, _kwargs) + return val + def GetModificationTime(self, *_args, **_kwargs): + val = apply(filesysc.wxFSFile_GetModificationTime,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __repr__(self): + return "" % (self.this,) +class wxFSFile(wxFSFilePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFSFile,_args,_kwargs) + self.thisown = 1 + + + + +class wxCPPFileSystemHandlerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxCPPFileSystemHandler(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + + + + +class wxFileSystemHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler__setSelf,(self,) + _args, _kwargs) + return val + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_FindNext,(self,) + _args, _kwargs) + return val + def GetProtocol(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetProtocol,(self,) + _args, _kwargs) + return val + def GetLeftLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetLeftLocation,(self,) + _args, _kwargs) + return val + def GetAnchor(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetAnchor,(self,) + _args, _kwargs) + return val + def GetRightLocation(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetRightLocation,(self,) + _args, _kwargs) + return val + def GetMimeTypeFromExt(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystemHandler_GetMimeTypeFromExt,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystemHandler(wxFileSystemHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystemHandler,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxFileSystemHandler) + + + + +class wxFileSystemPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def ChangePathTo(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_ChangePathTo,(self,) + _args, _kwargs) + return val + def GetPath(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_GetPath,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxFileSystem_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFileSystem(wxFileSystemPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxFileSystem,_args,_kwargs) + self.thisown = 1 + + + + +class wxInternetFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxInternetFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxInternetFSHandler(wxInternetFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxInternetFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxZipFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxZipFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxZipFSHandler(wxZipFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxZipFSHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxMemoryFSHandlerPtr(wxCPPFileSystemHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def CanOpen(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_CanOpen,(self,) + _args, _kwargs) + return val + def OpenFile(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_OpenFile,(self,) + _args, _kwargs) + if val: val = wxFSFilePtr(val) + return val + def FindFirst(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindFirst,(self,) + _args, _kwargs) + return val + def FindNext(self, *_args, **_kwargs): + val = apply(filesysc.wxMemoryFSHandler_FindNext,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxMemoryFSHandler(wxMemoryFSHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(filesysc.new_wxMemoryFSHandler,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +__wxMemoryFSHandler_AddFile_wxImage = filesysc.__wxMemoryFSHandler_AddFile_wxImage + +__wxMemoryFSHandler_AddFile_wxBitmap = filesysc.__wxMemoryFSHandler_AddFile_wxBitmap + +__wxMemoryFSHandler_AddFile_Data = filesysc.__wxMemoryFSHandler_AddFile_Data + +wxFileSystem_AddHandler = filesysc.wxFileSystem_AddHandler + +wxFileSystem_CleanUpHandlers = filesysc.wxFileSystem_CleanUpHandlers + +wxMemoryFSHandler_RemoveFile = filesysc.wxMemoryFSHandler_RemoveFile + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/utils/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp similarity index 80% rename from utils/wxPython/src/msw/frames.cpp rename to wxPython/src/msw/frames.cpp index 9b157d3109..8489f08de4 100644 --- a/utils/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/frames.cpp + * FILE : src/msw/frames.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,7 +60,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -130,8 +131,8 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -154,11 +155,22 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -219,34 +231,6 @@ static PyObject *_wrap_wxFrame_Centre(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) -static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFrame * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","id", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Command",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxFrame_Command(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxFrame_CreateStatusBar(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CreateStatusBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -322,6 +306,41 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxFrame_GetIcon(_swigobj) (_swigobj->GetIcon()) +static PyObject *_wrap_wxFrame_GetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIcon * _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetIcon",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetIcon. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxIcon & _result_ref = wxFrame_GetIcon(_arg0); + _result = (wxIcon *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxFrame_GetMenuBar(_swigobj) (_swigobj->GetMenuBar()) static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -543,6 +562,60 @@ static PyObject *_wrap_wxFrame_Maximize(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxFrame_IsMaximized(_swigobj) (_swigobj->IsMaximized()) +static PyObject *_wrap_wxFrame_IsMaximized(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_IsMaximized",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsMaximized. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_IsMaximized(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_Restore(_swigobj) (_swigobj->Restore()) +static PyObject *_wrap_wxFrame_Restore(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_Restore",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Restore. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_Restore(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxFrame_SetAcceleratorTable(_swigobj,_swigarg0) (_swigobj->SetAcceleratorTable(_swigarg0)) static PyObject *_wrap_wxFrame_SetAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -708,11 +781,22 @@ static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -796,11 +880,22 @@ static PyObject *_wrap_wxFrame_SetTitle(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -852,6 +947,152 @@ static PyObject *_wrap_wxFrame_SetToolBar(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxFrame_MakeModal(_swigobj,_swigarg0) (_swigobj->MakeModal(_swigarg0)) +static PyObject *_wrap_wxFrame_MakeModal(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","modal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFrame_MakeModal",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_MakeModal. Expected _wxFrame_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_MakeModal(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFrame_GetClientAreaOrigin(_swigobj) (_swigobj->GetClientAreaOrigin()) +static PyObject *_wrap_wxFrame_GetClientAreaOrigin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetClientAreaOrigin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetClientAreaOrigin. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) +static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Command",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_Command(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_ProcessCommand(_swigobj,_swigarg0) (_swigobj->ProcessCommand(_swigarg0)) +static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_ProcessCommand",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_ProcessCommand. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_ShowFullScreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->ShowFullScreen(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFrame_ShowFullScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + bool _arg1; + long _arg2 = (long ) (wxFULLSCREEN_ALL); + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","show","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|l:wxFrame_ShowFullScreen",_kwnames,&_argo0,&tempbool1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_ShowFullScreen. Expected _wxFrame_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_ShowFullScreen(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxMiniFrameTowxFrame(void *ptr) { wxMiniFrame *src; wxFrame *dest; @@ -883,8 +1124,8 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -907,11 +1148,22 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -946,6 +1198,11 @@ static PyObject *_wrap_new_wxMiniFrame(PyObject *self, PyObject *args, PyObject static PyMethodDef framescMethods[] = { { "new_wxMiniFrame", (PyCFunction) _wrap_new_wxMiniFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_ShowFullScreen", (PyCFunction) _wrap_wxFrame_ShowFullScreen, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_ProcessCommand", (PyCFunction) _wrap_wxFrame_ProcessCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetClientAreaOrigin", (PyCFunction) _wrap_wxFrame_GetClientAreaOrigin, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_MakeModal", (PyCFunction) _wrap_wxFrame_MakeModal, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetToolBar", (PyCFunction) _wrap_wxFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetTitle", (PyCFunction) _wrap_wxFrame_SetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusWidths", (PyCFunction) _wrap_wxFrame_SetStatusWidths, METH_VARARGS | METH_KEYWORDS }, @@ -954,6 +1211,8 @@ static PyMethodDef framescMethods[] = { { "wxFrame_SetMenuBar", (PyCFunction) _wrap_wxFrame_SetMenuBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetIcon", (PyCFunction) _wrap_wxFrame_SetIcon, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetAcceleratorTable", (PyCFunction) _wrap_wxFrame_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_Restore", (PyCFunction) _wrap_wxFrame_Restore, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_IsMaximized", (PyCFunction) _wrap_wxFrame_IsMaximized, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Maximize", (PyCFunction) _wrap_wxFrame_Maximize, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_IsIconized", (PyCFunction) _wrap_wxFrame_IsIconized, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Iconize", (PyCFunction) _wrap_wxFrame_Iconize, METH_VARARGS | METH_KEYWORDS }, @@ -961,9 +1220,9 @@ static PyMethodDef framescMethods[] = { { "wxFrame_GetTitle", (PyCFunction) _wrap_wxFrame_GetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetStatusBar", (PyCFunction) _wrap_wxFrame_GetStatusBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetMenuBar", (PyCFunction) _wrap_wxFrame_GetMenuBar, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetIcon", (PyCFunction) _wrap_wxFrame_GetIcon, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateToolBar", (PyCFunction) _wrap_wxFrame_CreateToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateStatusBar", (PyCFunction) _wrap_wxFrame_CreateStatusBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Centre", (PyCFunction) _wrap_wxFrame_Centre, METH_VARARGS | METH_KEYWORDS }, { "new_wxFrame", (PyCFunction) _wrap_new_wxFrame, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } @@ -991,7 +1250,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -1015,7 +1276,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -1030,13 +1290,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -1065,10 +1325,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -1078,9 +1340,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, @@ -1108,16 +1372,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -1184,6 +1447,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1209,6 +1473,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1218,6 +1483,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1228,11 +1494,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -1258,6 +1530,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -1286,8 +1559,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, @@ -1316,6 +1587,12 @@ SWIGEXPORT(void) initframesc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("framesc", framescMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxFULLSCREEN_NOMENUBAR", PyInt_FromLong((long) wxFULLSCREEN_NOMENUBAR)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOTOOLBAR", PyInt_FromLong((long) wxFULLSCREEN_NOTOOLBAR)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOSTATUSBAR", PyInt_FromLong((long) wxFULLSCREEN_NOSTATUSBAR)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOBORDER", PyInt_FromLong((long) wxFULLSCREEN_NOBORDER)); + PyDict_SetItemString(d,"wxFULLSCREEN_NOCAPTION", PyInt_FromLong((long) wxFULLSCREEN_NOCAPTION)); + PyDict_SetItemString(d,"wxFULLSCREEN_ALL", PyInt_FromLong((long) wxFULLSCREEN_ALL)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/utils/wxPython/src/gtk/frames.py b/wxPython/src/msw/frames.py similarity index 70% rename from utils/wxPython/src/gtk/frames.py rename to wxPython/src/msw/frames.py index 99afcc0c62..48ba73936c 100644 --- a/utils/wxPython/src/gtk/frames.py +++ b/wxPython/src/msw/frames.py @@ -30,6 +30,10 @@ class wxFramePtr(wxWindowPtr): val = apply(framesc.wxFrame_CreateToolBar,(self,) + _args, _kwargs) if val: val = wxToolBarPtr(val) return val + def GetIcon(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetIcon,(self,) + _args, _kwargs) + if val: val = wxIconPtr(val) + return val def GetMenuBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetMenuBar,(self,) + _args, _kwargs) if val: val = wxMenuBarPtr(val) @@ -54,6 +58,12 @@ class wxFramePtr(wxWindowPtr): def Maximize(self, *_args, **_kwargs): val = apply(framesc.wxFrame_Maximize,(self,) + _args, _kwargs) return val + def IsMaximized(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_IsMaximized,(self,) + _args, _kwargs) + return val + def Restore(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Restore,(self,) + _args, _kwargs) + return val def SetAcceleratorTable(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetAcceleratorTable,(self,) + _args, _kwargs) return val @@ -78,13 +88,29 @@ class wxFramePtr(wxWindowPtr): def SetToolBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetToolBar,(self,) + _args, _kwargs) return val + def MakeModal(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_MakeModal,(self,) + _args, _kwargs) + return val + def GetClientAreaOrigin(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetClientAreaOrigin,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def Command(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Command,(self,) + _args, _kwargs) + return val + def ProcessCommand(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_ProcessCommand,(self,) + _args, _kwargs) + return val + def ShowFullScreen(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_ShowFullScreen,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFrame(wxFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -99,7 +125,7 @@ class wxMiniFrame(wxMiniFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxMiniFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -112,3 +138,9 @@ class wxMiniFrame(wxMiniFramePtr): #-------------- VARIABLE WRAPPERS ------------------ +wxFULLSCREEN_NOMENUBAR = framesc.wxFULLSCREEN_NOMENUBAR +wxFULLSCREEN_NOTOOLBAR = framesc.wxFULLSCREEN_NOTOOLBAR +wxFULLSCREEN_NOSTATUSBAR = framesc.wxFULLSCREEN_NOSTATUSBAR +wxFULLSCREEN_NOBORDER = framesc.wxFULLSCREEN_NOBORDER +wxFULLSCREEN_NOCAPTION = framesc.wxFULLSCREEN_NOCAPTION +wxFULLSCREEN_ALL = framesc.wxFULLSCREEN_ALL diff --git a/utils/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp similarity index 94% rename from utils/wxPython/src/msw/gdi.cpp rename to wxPython/src/msw/gdi.cpp index e9b462ca33..6f87090c25 100644 --- a/utils/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/gdi.cpp + * FILE : src/msw/gdi.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -62,7 +64,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -108,6 +109,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); // Alternate 'constructor' wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { return new wxBitmap(width, height, depth); @@ -263,12 +266,13 @@ static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kw wxBitmap * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "bitmap","colour", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMaskColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMaskColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -277,13 +281,11 @@ static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kw return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMaskColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (wxMask *)wxMaskColour(*_arg0,*_arg1); @@ -371,11 +373,22 @@ static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNamedColour",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1073,11 +1086,22 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:new_wxBitmap",_kwnames,&_obj0,&_arg1)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1215,11 +1239,22 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1258,11 +1293,22 @@ static PyObject *_wrap_wxBitmap_SaveFile(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -1638,6 +1684,170 @@ static PyObject *_wrap_wxBitmap_SetSize(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxBitmap_GetSubBitmap(_swigobj,_swigarg0) (_swigobj->GetSubBitmap(_swigarg0)) +static PyObject *_wrap_wxBitmap_GetSubBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmap * _result; + wxBitmap * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBitmap_GetSubBitmap",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetSubBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxBitmap (wxBitmap_GetSubBitmap(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxBitmap_CopyFromIcon(_swigobj,_swigarg0) (_swigobj->CopyFromIcon(_swigarg0)) +static PyObject *_wrap_wxBitmap_CopyFromIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxBitmap * _arg0; + wxIcon * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","icon", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBitmap_CopyFromIcon",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_CopyFromIcon. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_CopyFromIcon. Expected _wxIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxBitmap_CopyFromIcon(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmap_CopyFromCursor(_swigobj,_swigarg0) (_swigobj->CopyFromCursor(_swigarg0)) +static PyObject *_wrap_wxBitmap_CopyFromCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxBitmap * _arg0; + wxCursor * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cursor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBitmap_CopyFromCursor",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_CopyFromCursor. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_CopyFromCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxBitmap_CopyFromCursor(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmap_GetQuality(_swigobj) (_swigobj->GetQuality()) +static PyObject *_wrap_wxBitmap_GetQuality(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxBitmap * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBitmap_GetQuality",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_GetQuality. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxBitmap_GetQuality(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxBitmap_SetQuality(_swigobj,_swigarg0) (_swigobj->SetQuality(_swigarg0)) +static PyObject *_wrap_wxBitmap_SetQuality(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmap * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","q", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxBitmap_SetQuality",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmap_SetQuality. Expected _wxBitmap_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBitmap_SetQuality(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define new_wxMask(_swigarg0) (new wxMask(_swigarg0)) static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1688,11 +1898,22 @@ static PyObject *_wrap_new_wxIcon(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|ii:new_wxIcon",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1762,11 +1983,22 @@ static PyObject *_wrap_wxIcon_LoadFile(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2079,11 +2311,22 @@ static PyObject *_wrap_new_wxCursor(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|ii:new_wxCursor",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2718,11 +2961,22 @@ static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3036,19 +3290,18 @@ static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kw static PyObject *_wrap_delete_wxColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxColour",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxColour",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxColour. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; delete_wxColour(_arg0); @@ -3064,19 +3317,18 @@ static PyObject *_wrap_wxColour_Red(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; unsigned char _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Red",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Red",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Red. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (unsigned char )wxColour_Red(_arg0); @@ -3091,19 +3343,18 @@ static PyObject *_wrap_wxColour_Green(PyObject *self, PyObject *args, PyObject * PyObject * _resultobj; unsigned char _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Green",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Green",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Green. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (unsigned char )wxColour_Green(_arg0); @@ -3118,19 +3369,18 @@ static PyObject *_wrap_wxColour_Blue(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; unsigned char _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Blue",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Blue",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Blue. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (unsigned char )wxColour_Blue(_arg0); @@ -3145,19 +3395,18 @@ static PyObject *_wrap_wxColour_Ok(PyObject *self, PyObject *args, PyObject *kwa PyObject * _resultobj; bool _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Ok",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Ok",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Ok. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (bool )wxColour_Ok(_arg0); @@ -3174,19 +3423,18 @@ static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args, PyObject *kw unsigned char _arg1; unsigned char _arg2; unsigned char _arg3; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self","red","green","blue", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbb:wxColour_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbb:wxColour_Set",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Set. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxColour_Set(_arg0,_arg1,_arg2,_arg3); @@ -3208,19 +3456,18 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; PyObject * _result; wxColour * _arg0; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Get",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxColour_Get",_kwnames,&_obj0)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColour_Get. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (PyObject *)wxColour_Get(_arg0); @@ -3242,20 +3489,19 @@ static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwarg wxColour * _arg0; int _arg1 = (int ) 1; int _arg2 = (int ) wxSOLID; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "colour","width","style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:new_wxPen",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:new_wxPen",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPen. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (wxPen *)new_wxPen(_arg0,_arg1,_arg2); @@ -3475,11 +3721,12 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args, PyObject wxPen * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPen_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPen_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3488,13 +3735,11 @@ static PyObject *_wrap_wxPen_SetColour(PyObject *self, PyObject *args, PyObject return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxPen_SetColour(_arg0,*_arg1); @@ -3647,7 +3892,7 @@ static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject } if (_obj2) { - _arg2 = (unsigned long*)long_LIST_helper(_obj2); + _arg2 = (wxDash*)byte_LIST_helper(_obj2); if (_arg2 == NULL) { return NULL; } @@ -3752,20 +3997,19 @@ static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwa wxBrush * _result; wxColour * _arg0; int _arg1 = (int ) wxSOLID; - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "colour","style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBrush",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxBrush",_kwnames,&_obj0,&_arg1)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBrush. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (wxBrush *)new_wxBrush(_arg0,_arg1); @@ -3910,11 +4154,12 @@ static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args, PyObjec wxBrush * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBrush_SetColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBrush_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3923,13 +4168,11 @@ static PyObject *_wrap_wxBrush_SetColour(PyObject *self, PyObject *args, PyObjec return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrush_SetColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxBrush_SetColour(_arg0,*_arg1); @@ -4677,11 +4920,22 @@ static PyObject *_wrap_wxDC_DrawRotatedText(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4799,11 +5053,22 @@ static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args, PyObject *k } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4909,11 +5174,12 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * wxColour * _arg3; int _arg4 = (int ) wxFLOOD_SURFACE; PyObject * _argo0 = 0; - PyObject * _argo3 = 0; + wxColour temp; + PyObject * _obj3 = 0; char *_kwnames[] = { "self","x","y","colour","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO|i:wxDC_FloodFill",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO|i:wxDC_FloodFill",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4922,13 +5188,11 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * return NULL; } } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDC_FloodFill. Expected _wxColour_p."); +{ + _arg3 = &temp; + if (! wxColour_helper(_obj3, &_arg3)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); @@ -5538,11 +5802,22 @@ static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5610,11 +5885,22 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -6375,11 +6661,12 @@ static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args, Py wxDC * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextBackground",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextBackground",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6388,13 +6675,11 @@ static PyObject *_wrap_wxDC_SetTextBackground(PyObject *self, PyObject *args, Py return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextBackground. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxDC_SetTextBackground(_arg0,*_arg1); @@ -6411,11 +6696,12 @@ static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args, Py wxDC * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextForeground",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDC_SetTextForeground",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6424,13 +6710,11 @@ static PyObject *_wrap_wxDC_SetTextForeground(PyObject *self, PyObject *args, Py return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetTextForeground. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxDC_SetTextForeground(_arg0,*_arg1); @@ -6491,11 +6775,22 @@ static PyObject *_wrap_wxDC_StartDoc(PyObject *self, PyObject *args, PyObject *k } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6842,6 +7137,62 @@ static PyObject *_wrap_wxDC_SetAxisOrientation(PyObject *self, PyObject *args, P return _resultobj; } +#define wxDC_CalcBoundingBox(_swigobj,_swigarg0,_swigarg1) (_swigobj->CalcBoundingBox(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_CalcBoundingBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxDC_CalcBoundingBox",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_CalcBoundingBox. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_CalcBoundingBox(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDC_ResetBoundingBox(_swigobj) (_swigobj->ResetBoundingBox()) +static PyObject *_wrap_wxDC_ResetBoundingBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_ResetBoundingBox",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_ResetBoundingBox. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDC_ResetBoundingBox(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxMemoryDCTowxDC(void *ptr) { wxMemoryDC *src; wxDC *dest; @@ -7169,82 +7520,6 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * return _resultobj; } -static void *SwigwxPrinterDCTowxDC(void *ptr) { - wxPrinterDC *src; - wxDC *dest; - src = (wxPrinterDC *) ptr; - dest = (wxDC *) src; - return (void *) dest; -} - -#define new_wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPrinterDC * _result; - wxString * _arg0; - wxString * _arg1; - wxString * _arg2; - bool _arg3 = (bool ) TRUE; - int _arg4 = (int ) wxPORTRAIT; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "driver","device","output","interactive","orientation", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:new_wxPrinterDC",_kwnames,&_obj0,&_obj1,&_obj2,&tempbool3,&_arg4)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); -} -{ - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); -} - _arg3 = (bool ) tempbool3; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPrinterDC *)new_wxPrinterDC(*_arg0,*_arg1,*_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrinterDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - static void *SwigwxMetaFileDCTowxDC(void *ptr) { wxMetaFileDC *src; wxDC *dest; @@ -7267,11 +7542,22 @@ static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7643,11 +7929,12 @@ static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *a wxColour * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","bitmap","maskColour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxImageList_AddWithColourMask",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxImageList_AddWithColourMask",_kwnames,&_argo0,&_argo1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7663,13 +7950,11 @@ static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *a return NULL; } } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_AddWithColourMask. Expected _wxColour_p."); +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (int )wxImageList_AddWithColourMask(_arg0,*_arg1,*_arg2); @@ -7761,43 +8046,6 @@ static PyObject *_wrap_wxImageList_Replace(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxImageList_ReplaceIcon(_swigobj,_swigarg0,_swigarg1) (_swigobj->Replace(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxImageList_ReplaceIcon(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxImageList * _arg0; - int _arg1; - wxIcon * _arg2; - PyObject * _argo0 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","index","icon", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxImageList_ReplaceIcon",_kwnames,&_argo0,&_arg1,&_argo2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageList_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_ReplaceIcon. Expected _wxImageList_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_ReplaceIcon. Expected _wxIcon_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxImageList_ReplaceIcon(_arg0,_arg1,*_arg2); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - #define wxImageList_Draw(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Draw(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_wxImageList_Draw(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7923,12 +8171,60 @@ static PyObject *_wrap_wxImageList_RemoveAll(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxImageList_GetSize(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxImageList_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImageList * _arg0; + int _arg1; + int * _arg2; + int temp; + int * _arg3; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","index", NULL }; + + self = self; +{ + _arg2 = &temp; +} +{ + _arg3 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxImageList_GetSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImageList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageList_GetSize. Expected _wxImageList_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImageList_GetSize(_arg0,_arg1,*_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + static PyMethodDef gdicMethods[] = { + { "wxImageList_GetSize", (PyCFunction) _wrap_wxImageList_GetSize, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_RemoveAll", (PyCFunction) _wrap_wxImageList_RemoveAll, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Remove", (PyCFunction) _wrap_wxImageList_Remove, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_GetImageCount", (PyCFunction) _wrap_wxImageList_GetImageCount, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Draw", (PyCFunction) _wrap_wxImageList_Draw, METH_VARARGS | METH_KEYWORDS }, - { "wxImageList_ReplaceIcon", (PyCFunction) _wrap_wxImageList_ReplaceIcon, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_Replace", (PyCFunction) _wrap_wxImageList_Replace, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_AddIcon", (PyCFunction) _wrap_wxImageList_AddIcon, METH_VARARGS | METH_KEYWORDS }, { "wxImageList_AddWithColourMask", (PyCFunction) _wrap_wxImageList_AddWithColourMask, METH_VARARGS | METH_KEYWORDS }, @@ -7942,7 +8238,6 @@ static PyMethodDef gdicMethods[] = { { "new_wxPalette", (PyCFunction) _wrap_new_wxPalette, METH_VARARGS | METH_KEYWORDS }, { "wxMetaFileDC_Close", (PyCFunction) _wrap_wxMetaFileDC_Close, METH_VARARGS | METH_KEYWORDS }, { "new_wxMetaFileDC", (PyCFunction) _wrap_new_wxMetaFileDC, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPrinterDC", (PyCFunction) _wrap_new_wxPrinterDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindowDC", (PyCFunction) _wrap_new_wxWindowDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxPaintDC", (PyCFunction) _wrap_new_wxPaintDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxClientDC", (PyCFunction) _wrap_new_wxClientDC, METH_VARARGS | METH_KEYWORDS }, @@ -7952,6 +8247,8 @@ static PyMethodDef gdicMethods[] = { { "new_wxScreenDC", (PyCFunction) _wrap_new_wxScreenDC, METH_VARARGS | METH_KEYWORDS }, { "wxMemoryDC_SelectObject", (PyCFunction) _wrap_wxMemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS }, { "new_wxMemoryDC", (PyCFunction) _wrap_new_wxMemoryDC, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_ResetBoundingBox", (PyCFunction) _wrap_wxDC_ResetBoundingBox, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_CalcBoundingBox", (PyCFunction) _wrap_wxDC_CalcBoundingBox, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetAxisOrientation", (PyCFunction) _wrap_wxDC_SetAxisOrientation, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetDeviceOrigin", (PyCFunction) _wrap_wxDC_GetDeviceOrigin, METH_VARARGS | METH_KEYWORDS }, { "wxDC_SetLogicalOrigin", (PyCFunction) _wrap_wxDC_SetLogicalOrigin, METH_VARARGS | METH_KEYWORDS }, @@ -8113,6 +8410,11 @@ static PyMethodDef gdicMethods[] = { { "delete_wxIcon", (PyCFunction) _wrap_delete_wxIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxIcon", (PyCFunction) _wrap_new_wxIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxMask", (PyCFunction) _wrap_new_wxMask, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmap_SetQuality", (PyCFunction) _wrap_wxBitmap_SetQuality, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmap_GetQuality", (PyCFunction) _wrap_wxBitmap_GetQuality, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmap_CopyFromCursor", (PyCFunction) _wrap_wxBitmap_CopyFromCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmap_CopyFromIcon", (PyCFunction) _wrap_wxBitmap_CopyFromIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxBitmap_GetSubBitmap", (PyCFunction) _wrap_wxBitmap_GetSubBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxBitmap_SetSize", (PyCFunction) _wrap_wxBitmap_SetSize, METH_VARARGS | METH_KEYWORDS }, { "wxBitmap_SetDepth", (PyCFunction) _wrap_wxBitmap_SetDepth, METH_VARARGS | METH_KEYWORDS }, { "wxBitmap_SetHeight", (PyCFunction) _wrap_wxBitmap_SetHeight, METH_VARARGS | METH_KEYWORDS }, @@ -8158,21 +8460,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxMask","_class_wxMask",0}, { "_wxPen","_class_wxPen",0}, { "_byte","_unsigned_char",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_wxDC","_class_wxMetaFileDC",SwigwxMetaFileDCTowxDC}, { "_wxDC","_wxMetaFileDC",SwigwxMetaFileDCTowxDC}, - { "_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC}, - { "_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC}, { "_wxDC","_class_wxWindowDC",SwigwxWindowDCTowxDC}, { "_wxDC","_wxWindowDC",SwigwxWindowDCTowxDC}, { "_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC}, @@ -8186,25 +8486,27 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDC","_class_wxDC",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMask","_wxMask",0}, { "_wxColour","_class_wxColour",0}, { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxRect","_class_wxRect",0}, { "_wxPoint","_class_wxPoint",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_EBool","_wxCoord",0}, @@ -8214,13 +8516,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_EBool","_wxWindowID",0}, { "_class_wxRegion","_wxRegion",0}, { "_wxFont","_class_wxFont",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_class_wxMetaFileDC",SwigwxMetaFileDCTowxDC}, { "_class_wxDC","_wxMetaFileDC",SwigwxMetaFileDCTowxDC}, - { "_class_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC}, - { "_class_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC}, { "_class_wxDC","_class_wxWindowDC",SwigwxWindowDCTowxDC}, { "_class_wxDC","_wxWindowDC",SwigwxWindowDCTowxDC}, { "_class_wxDC","_class_wxPaintDC",SwigwxPaintDCTowxDC}, @@ -8232,7 +8531,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_class_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, @@ -8264,6 +8562,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -8276,6 +8575,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -8284,15 +8584,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_class_wxIcon","_wxIcon",0}, @@ -8306,6 +8613,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, @@ -8313,8 +8621,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxPalette","_wxPalette",0}, {0,0,0}}; diff --git a/utils/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py similarity index 96% rename from utils/wxPython/src/msw/gdi.py rename to wxPython/src/msw/gdi.py index b19e0c86e4..aec000e86d 100644 --- a/utils/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -59,8 +59,32 @@ class wxBitmapPtr : def SetSize(self, *_args, **_kwargs): val = apply(gdic.wxBitmap_SetSize,(self,) + _args, _kwargs) return val + def GetSubBitmap(self, *_args, **_kwargs): + val = apply(gdic.wxBitmap_GetSubBitmap,(self,) + _args, _kwargs) + if val: val = wxBitmapPtr(val) ; val.thisown = 1 + return val + def CopyFromIcon(self, *_args, **_kwargs): + val = apply(gdic.wxBitmap_CopyFromIcon,(self,) + _args, _kwargs) + return val + def CopyFromCursor(self, *_args, **_kwargs): + val = apply(gdic.wxBitmap_CopyFromCursor,(self,) + _args, _kwargs) + return val + def GetQuality(self, *_args, **_kwargs): + val = apply(gdic.wxBitmap_GetQuality,(self,) + _args, _kwargs) + return val + def SetQuality(self, *_args, **_kwargs): + val = apply(gdic.wxBitmap_SetQuality,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) + + def __del__(self,gdic=gdic): + try: + if self.thisown == 1 : + gdic.delete_wxBitmap(self) + except: + pass + class wxBitmap(wxBitmapPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gdic.new_wxBitmap,_args,_kwargs) @@ -125,6 +149,14 @@ class wxIconPtr : return val def __repr__(self): return "" % (self.this,) + + def __del__(self,gdic=gdic): + try: + if self.thisown == 1 : + gdic.delete_wxIcon(self) + except: + pass + class wxIcon(wxIconPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gdic.new_wxIcon,_args,_kwargs) @@ -650,6 +682,12 @@ class wxDCPtr : def SetAxisOrientation(self, *_args, **_kwargs): val = apply(gdic.wxDC_SetAxisOrientation,(self,) + _args, _kwargs) return val + def CalcBoundingBox(self, *_args, **_kwargs): + val = apply(gdic.wxDC_CalcBoundingBox,(self,) + _args, _kwargs) + return val + def ResetBoundingBox(self, *_args, **_kwargs): + val = apply(gdic.wxDC_ResetBoundingBox,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxDC(wxDCPtr): @@ -741,20 +779,6 @@ class wxWindowDC(wxWindowDCPtr): -class wxPrinterDCPtr(wxDCPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def __repr__(self): - return "" % (self.this,) -class wxPrinterDC(wxPrinterDCPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(gdic.new_wxPrinterDC,_args,_kwargs) - self.thisown = 1 - - - - class wxMetaFileDCPtr(wxDCPtr): def __init__(self,this): self.this = this @@ -817,9 +841,6 @@ class wxImageListPtr : def Replace(self, *_args, **_kwargs): val = apply(gdic.wxImageList_Replace,(self,) + _args, _kwargs) return val - def ReplaceIcon(self, *_args, **_kwargs): - val = apply(gdic.wxImageList_ReplaceIcon,(self,) + _args, _kwargs) - return val def Draw(self, *_args, **_kwargs): val = apply(gdic.wxImageList_Draw,(self,) + _args, _kwargs) return val @@ -832,6 +853,9 @@ class wxImageListPtr : def RemoveAll(self, *_args, **_kwargs): val = apply(gdic.wxImageList_RemoveAll,(self,) + _args, _kwargs) return val + def GetSize(self, *_args, **_kwargs): + val = apply(gdic.wxImageList_GetSize,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxImageList(wxImageListPtr): diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp new file mode 100644 index 0000000000..05c0c740b5 --- /dev/null +++ b/wxPython/src/msw/grid.cpp @@ -0,0 +1,13638 @@ +/* + * FILE : src/msw/grid.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initgridc + +#define SWIG_name "gridc" + +#include "export.h" +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + +#define PYCALLBACK_GCA_INTINT(PCLASS, CBNAME) \ + wxGridCellAttr* CBNAME(int a, int b) { \ + wxGridCellAttr* rval = NULL; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + wxGridCellAttr* ptr; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", a, b)); \ + if (ro) { \ + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellAttr_p")) \ + rval = ptr; \ + Py_DECREF(ro); \ + } \ + } \ + else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxGridCellAttr *base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(attr, a, b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int a, int b) { \ + PCLASS::CBNAME(attr, a, b); \ + } + + + +#define PYCALLBACK__GCAINT(PCLASS, CBNAME) \ + void CBNAME(wxGridCellAttr *attr, int val) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \ + Py_DECREF(obj); \ + } \ + else \ + PCLASS::CBNAME(attr, val); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(wxGridCellAttr *attr, int val) { \ + PCLASS::CBNAME(attr, val); \ + } + + + +#define PYCALLBACK_INT__pure(CBNAME) \ + int CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + int rval = 0; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_BOOL_INTINT_pure(CBNAME) \ + bool CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + bool rval = 0; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } \ + wxPySaveThread(doSave); \ + return rval; \ + } + + + +#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ + void CBNAME(int a, int b, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",a,b,c.c_str())); \ + wxPySaveThread(doSave); \ + } + + +#define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ + wxString CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK_BOOL_INTINTSTRING(PCLASS, CBNAME) \ + bool CBNAME(int a, int b, const wxString& c) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)", a,b,c.c_str())); \ + else \ + rval = PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b, const wxString& c) { \ + return PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK_LONG_INTINT(PCLASS, CBNAME) \ + long CBNAME(int a, int b) { \ + long rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + long base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \ + bool CBNAME(int a, int b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_DOUBLE_INTINT(PCLASS, CBNAME) \ + double CBNAME(int a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + double rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",a,b)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyFloat_AsDouble(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a, b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + double base_##CBNAME(int a, int b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + +#define PYCALLBACK__(PCLASS, CBNAME) \ + void CBNAME() { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + else \ + PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME() { \ + PCLASS::CBNAME(); \ + } + + + + +#define PYCALLBACK_BOOL_SIZETSIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a, size_t b) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + rval = PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a, size_t b) { \ + return PCLASS::CBNAME(a,b); \ + } + + + +#define PYCALLBACK_BOOL_SIZET(PCLASS, CBNAME) \ + bool CBNAME(size_t a) { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \ + else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME(size_t a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ + wxString CBNAME(int a) { \ + bool doSave = wxPyRestoreThread(); \ + wxString rval; \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ + PyObject* ro; \ + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)",a)); \ + if (ro) { \ + PyObject* str = PyObject_Str(ro); \ + rval = PyString_AsString(str); \ + Py_DECREF(ro); Py_DECREF(str); \ + } \ + } else \ + rval = PCLASS::CBNAME(a); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + wxString base_##CBNAME(int a) { \ + return PCLASS::CBNAME(a); \ + } + + + +#define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ + void CBNAME(int a, const wxString& c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(is)", a,c.c_str())); \ + else \ + PCLASS::CBNAME(a,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, const wxString& c) { \ + PCLASS::CBNAME(a,c); \ + } + + + + +#define PYCALLBACK_BOOL_(PCLASS, CBNAME) \ + bool CBNAME() { \ + bool rval; \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ + else \ + rval = PCLASS::CBNAME(); \ + wxPySaveThread(doSave); \ + return rval; \ + } \ + bool base_##CBNAME() { \ + return PCLASS::CBNAME(); \ + } + + + +#define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \ + void CBNAME(size_t a, int b) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ + else \ + PCLASS::CBNAME(a,b); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(size_t a, int b) { \ + PCLASS::CBNAME(a,b); \ + } + + + + +#define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \ + void CBNAME(int a, int b, long c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, long c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + +#define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \ + void CBNAME(int a, int b, double c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, double c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + +#define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \ + void CBNAME(int a, int b, bool c) { \ + bool doSave = wxPyRestoreThread(); \ + if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ + else \ + PCLASS::CBNAME(a,b,c); \ + wxPySaveThread(doSave); \ + } \ + void base_##CBNAME(int a, int b, bool c) { \ + PCLASS::CBNAME(a,b,c); \ + } + + + + + +class wxPyGridCellRenderer : public wxGridCellRenderer +{ +public: + wxPyGridCellRenderer() : wxGridCellRenderer() {}; + + // Implement Python callback aware virtual methods + void Draw(wxGrid& grid, wxGridCellAttr& attr, + wxDC& dc, const wxRect& rect, + int row, int col, bool isSelected) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Draw")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OOOOiii)", + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + wxPyConstructObject((void*)&rect, "wxRect", 0), + row, col, isSelected)); + } + wxPySaveThread(doSave); + } + + wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, + int row, int col) { + wxSize rval; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) { + PyObject* ro; + wxSize* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, + Py_BuildValue("(OOOii)", + wxPyConstructObject((void*)&grid, "wxGrid", 0), + wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0), + wxPyConstructObject((void*)&dc, "wxDC", 0), + row, col)); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) + rval = *ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + wxGridCellRenderer *Clone() const { + wxGridCellRenderer* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Clone")) { + PyObject* ro; + wxGridCellRenderer* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellRenderer_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + +IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters); + + +class wxPyGridCellEditor : public wxGridCellEditor +{ +public: + wxPyGridCellEditor() : wxGridCellEditor() {} + + void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Create")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OiO)", + wxPyConstructObject((void*)parent, "wxWindow", 0), + id, + wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0))); + } + wxPySaveThread(doSave); + } + + + void BeginEdit(int row, int col, wxGrid* grid) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) { + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid", 0))); + } + wxPySaveThread(doSave); + } + + + bool EndEdit(int row, int col, wxGrid* grid) { + bool rv = FALSE; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "EndEdit")) { + rv = wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iiO)", row, col, + wxPyConstructObject((void*)grid, "wxGrid", 0))); + } + wxPySaveThread(doSave); + return rv; + } + + + wxGridCellEditor*Clone() const { + wxGridCellEditor* rval = NULL; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Clone")) { + PyObject* ro; + wxGridCellEditor* ptr; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); + if (ro) { + if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxGridCellEditor_p")) + rval = ptr; + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + + void Show(bool show, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "Show")) + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(iO)", show, + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); + else + wxGridCellEditor::Show(show, attr); + wxPySaveThread(doSave); + } + void base_Show(bool show, wxGridCellAttr *attr) { + wxGridCellEditor::Show(show, attr); + } + + + void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "PaintBackground")) + wxPyCBH_callCallback(m_myInst, + Py_BuildValue("(OO)", + wxPyConstructObject((void*)&rectCell, "wxRect", 0), + wxPyConstructObject((void*)attr, "wxGridCellAttr", 0))); + else + wxGridCellEditor::PaintBackground(rectCell, attr); + wxPySaveThread(doSave); + } + void base_PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { + wxGridCellEditor::PaintBackground(rectCell, attr); + } + + + DEC_PYCALLBACK___pure(Reset); + DEC_PYCALLBACK__constany(SetSize, wxRect); + DEC_PYCALLBACK_bool_any(IsAcceptedKey, wxKeyEvent); + DEC_PYCALLBACK__any(StartingKey, wxKeyEvent); + DEC_PYCALLBACK__any(HandleReturn, wxKeyEvent); + DEC_PYCALLBACK__(StartingClick); + DEC_PYCALLBACK__(Destroy); + DEC_PYCALLBACK__STRING(SetParameters); + + PYPRIVATE; +}; + + +IMP_PYCALLBACK__STRING( wxPyGridCellEditor, wxGridCellEditor, SetParameters); +IMP_PYCALLBACK___pure(wxPyGridCellEditor, wxGridCellEditor, Reset); +IMP_PYCALLBACK__constany(wxPyGridCellEditor, wxGridCellEditor, SetSize, wxRect); +IMP_PYCALLBACK_bool_any(wxPyGridCellEditor, wxGridCellEditor, IsAcceptedKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, StartingKey, wxKeyEvent); +IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, HandleReturn, wxKeyEvent); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, StartingClick); +IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, Destroy); + + +class wxPyGridCellAttrProvider : public wxGridCellAttrProvider +{ +public: + wxPyGridCellAttrProvider() : wxGridCellAttrProvider() {}; + + PYCALLBACK_GCA_INTINT(wxGridCellAttrProvider, GetAttr); + PYCALLBACK__GCAINTINT(wxGridCellAttrProvider, SetAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetRowAttr); + PYCALLBACK__GCAINT(wxGridCellAttrProvider, SetColAttr); + + PYPRIVATE; +}; + +class wxPyGridTableBase : public wxGridTableBase +{ +public: + wxPyGridTableBase() : wxGridTableBase() {} + + PYCALLBACK_INT__pure(GetNumberRows); + PYCALLBACK_INT__pure(GetNumberCols); + PYCALLBACK_BOOL_INTINT_pure(IsEmptyCell); + PYCALLBACK_STRING_INTINT(wxGridTableBase, GetTypeName); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanGetValueAs); + PYCALLBACK_BOOL_INTINTSTRING(wxGridTableBase, CanSetValueAs); + PYCALLBACK__(wxGridTableBase, Clear); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteRows); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, InsertCols); + PYCALLBACK_BOOL_SIZETSIZET(wxGridTableBase, DeleteCols); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendRows); + PYCALLBACK_BOOL_SIZET(wxGridTableBase, AppendCols); + PYCALLBACK_STRING_INT(wxGridTableBase, GetRowLabelValue); + PYCALLBACK_STRING_INT(wxGridTableBase, GetColLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetRowLabelValue); + PYCALLBACK__INTSTRING(wxGridTableBase, SetColLabelValue); + PYCALLBACK_BOOL_(wxGridTableBase, CanHaveAttributes); + PYCALLBACK_GCA_INTINT(wxGridTableBase, GetAttr); + PYCALLBACK__GCAINTINT(wxGridTableBase, SetAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetRowAttr); + PYCALLBACK__GCAINT(wxGridTableBase, SetColAttr); + + + wxString GetValue(int row, int col) { + bool doSave = wxPyRestoreThread(); + wxString rval; + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col)); + if (ro) { + PyObject* str = PyObject_Str(ro); + rval = PyString_AsString(str); + Py_DECREF(ro); + Py_DECREF(str); + } + } + wxPySaveThread(doSave); + return rval; + } + + void SetValue(int row, int col, const wxString& val) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iis)",row,col,val.c_str())); + wxPySaveThread(doSave); + } + + + // Map the Get/Set methods for the standard non-string types to + // the GetValue and SetValue python methods. + long GetValueAsLong( int row, int col ) { + long rval = 0; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + PyObject* num; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Int(ro); + if (num) { + rval = PyInt_AsLong(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + double GetValueAsDouble( int row, int col ) { + double rval = 0.0; + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "GetValue")) { + PyObject* ro; + PyObject* num; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)", row, col)); + if (ro && PyNumber_Check(ro)) { + num = PyNumber_Float(ro); + if (num) { + rval = PyFloat_AsDouble(num); + Py_DECREF(num); + } + Py_DECREF(ro); + } + } + wxPySaveThread(doSave); + return rval; + } + + bool GetValueAsBool( int row, int col ) { + return (bool)GetValueAsLong(row, col); + } + + void SetValueAsLong( int row, int col, long value ) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsDouble( int row, int col, double value ) { + bool doSave = wxPyRestoreThread(); + if (wxPyCBH_findCallback(m_myInst, "SetValue")) { + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iid)", row, col, value)); + } + wxPySaveThread(doSave); + } + + void SetValueAsBool( int row, int col, bool value ) { + SetValueAsLong( row, col, (long)value ); + } + + + PYPRIVATE; +}; + +bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) { + + // If source is an object instance then it may already be the right type + if (PyInstance_Check(source)) { + wxGridCellCoords* ptr; + if (SWIG_GetPtrObj(source, (void **)&ptr, "_wxGridCellCoords_p")) + goto error; + *obj = ptr; + return TRUE; + } + // otherwise a 2-tuple of integers is expected + else if (PySequence_Check(source) && PyObject_Length(source) == 2) { + PyObject* o1 = PySequence_GetItem(source, 0); + PyObject* o2 = PySequence_GetItem(source, 1); + **obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2)); + return TRUE; + } + + error: + PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object."); + return FALSE; +} + +typedef wxGrid::wxGridSelectionModes WXGRIDSELECTIONMODES; +#ifdef __cplusplus +extern "C" { +#endif +static int _wrap_wxGridNoCellCoords_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGridNoCellCoords is read-only."); + return 1; +} + +static PyObject *_wrap_wxGridNoCellCoords_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxGridNoCellCoords,"_wxGridCellCoords_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxGridNoCellRect_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxGridNoCellRect is read-only."); + return 1; +} + +static PyObject *_wrap_wxGridNoCellRect_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxGridNoCellRect,"_wxRect_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +#define wxGridCellRenderer_SetParameters(_swigobj,_swigarg0) (_swigobj->SetParameters(_swigarg0)) +static PyObject *_wrap_wxGridCellRenderer_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellRenderer_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_SetParameters. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGridCellRenderer_IncRef(_swigobj) (_swigobj->IncRef()) +static PyObject *_wrap_wxGridCellRenderer_IncRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_IncRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_IncRef. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_IncRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellRenderer_DecRef(_swigobj) (_swigobj->DecRef()) +static PyObject *_wrap_wxGridCellRenderer_DecRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_DecRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_DecRef. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_DecRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellRenderer_Draw(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Draw(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxGridCellRenderer_Draw(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _arg0; + wxGrid * _arg1; + wxGridCellAttr * _arg2; + wxDC * _arg3; + wxRect * _arg4; + int _arg5; + int _arg6; + bool _arg7; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + wxRect temp; + PyObject * _obj4 = 0; + int tempbool7; + char *_kwnames[] = { "self","grid","attr","dc","rect","row","col","isSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOOiii:wxGridCellRenderer_Draw",_kwnames,&_argo0,&_argo1,&_argo2,&_argo3,&_obj4,&_arg5,&_arg6,&tempbool7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_Draw. Expected _wxGridCellRenderer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellRenderer_Draw. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellRenderer_Draw. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellRenderer_Draw. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg4 = &temp; + if (! wxRect_helper(_obj4, &_arg4)) + return NULL; +} + _arg7 = (bool ) tempbool7; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellRenderer_Draw(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellRenderer_GetBestSize(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->GetBestSize(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxGridCellRenderer_GetBestSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxGridCellRenderer * _arg0; + wxGrid * _arg1; + wxGridCellAttr * _arg2; + wxDC * _arg3; + int _arg4; + int _arg5; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","grid","attr","dc","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOii:wxGridCellRenderer_GetBestSize",_kwnames,&_argo0,&_argo1,&_argo2,&_argo3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_GetBestSize. Expected _wxGridCellRenderer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellRenderer_GetBestSize. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellRenderer_GetBestSize. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellRenderer_GetBestSize. Expected _wxDC_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGridCellRenderer_GetBestSize(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridCellRenderer_Clone(_swigobj) (_swigobj->Clone()) +static PyObject *_wrap_wxGridCellRenderer_Clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGridCellRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_Clone",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer_Clone. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGridCellRenderer_Clone(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxPyGridCellRendererTowxGridCellRenderer(void *ptr) { + wxPyGridCellRenderer *src; + wxGridCellRenderer *dest; + src = (wxPyGridCellRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxPyGridCellRenderer() (new wxPyGridCellRenderer()) +static PyObject *_wrap_new_wxPyGridCellRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridCellRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridCellRenderer *)new_wxPyGridCellRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellRenderer__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellRenderer__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellRenderer * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellRenderer__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellRenderer__setSelf. Expected _wxPyGridCellRenderer_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellRenderer__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellRenderer_base_SetParameters(_swigobj,_swigarg0) (_swigobj->base_SetParameters(_swigarg0)) +static PyObject *_wrap_wxPyGridCellRenderer_base_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellRenderer * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellRenderer_base_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellRenderer_base_SetParameters. Expected _wxPyGridCellRenderer_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellRenderer_base_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static void *SwigwxGridCellStringRendererTowxGridCellRenderer(void *ptr) { + wxGridCellStringRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellStringRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellStringRenderer() (new wxGridCellStringRenderer()) +static PyObject *_wrap_new_wxGridCellStringRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellStringRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellStringRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellStringRenderer *)new_wxGridCellStringRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellStringRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellNumberRendererTowxGridCellStringRenderer(void *ptr) { + wxGridCellNumberRenderer *src; + wxGridCellStringRenderer *dest; + src = (wxGridCellNumberRenderer *) ptr; + dest = (wxGridCellStringRenderer *) src; + return (void *) dest; +} + +static void *SwigwxGridCellNumberRendererTowxGridCellRenderer(void *ptr) { + wxGridCellNumberRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellNumberRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellNumberRenderer() (new wxGridCellNumberRenderer()) +static PyObject *_wrap_new_wxGridCellNumberRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellNumberRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellNumberRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellNumberRenderer *)new_wxGridCellNumberRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellNumberRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellFloatRendererTowxGridCellStringRenderer(void *ptr) { + wxGridCellFloatRenderer *src; + wxGridCellStringRenderer *dest; + src = (wxGridCellFloatRenderer *) ptr; + dest = (wxGridCellStringRenderer *) src; + return (void *) dest; +} + +static void *SwigwxGridCellFloatRendererTowxGridCellRenderer(void *ptr) { + wxGridCellFloatRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellFloatRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellFloatRenderer(_swigarg0,_swigarg1) (new wxGridCellFloatRenderer(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridCellFloatRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatRenderer * _result; + int _arg0 = (int ) -1; + int _arg1 = (int ) -1; + char *_kwnames[] = { "width","precision", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridCellFloatRenderer",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellFloatRenderer *)new_wxGridCellFloatRenderer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellFloatRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellFloatRenderer_GetWidth(_swigobj) (_swigobj->GetWidth()) +static PyObject *_wrap_wxGridCellFloatRenderer_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellFloatRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellFloatRenderer_GetWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_GetWidth. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellFloatRenderer_GetWidth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellFloatRenderer_SetWidth(_swigobj,_swigarg0) (_swigobj->SetWidth(_swigarg0)) +static PyObject *_wrap_wxGridCellFloatRenderer_SetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatRenderer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellFloatRenderer_SetWidth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_SetWidth. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellFloatRenderer_SetWidth(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellFloatRenderer_GetPrecision(_swigobj) (_swigobj->GetPrecision()) +static PyObject *_wrap_wxGridCellFloatRenderer_GetPrecision(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellFloatRenderer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellFloatRenderer_GetPrecision",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_GetPrecision. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellFloatRenderer_GetPrecision(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellFloatRenderer_SetPrecision(_swigobj,_swigarg0) (_swigobj->SetPrecision(_swigarg0)) +static PyObject *_wrap_wxGridCellFloatRenderer_SetPrecision(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatRenderer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","precision", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellFloatRenderer_SetPrecision",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellFloatRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellFloatRenderer_SetPrecision. Expected _wxGridCellFloatRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellFloatRenderer_SetPrecision(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxGridCellBoolRendererTowxGridCellRenderer(void *ptr) { + wxGridCellBoolRenderer *src; + wxGridCellRenderer *dest; + src = (wxGridCellBoolRenderer *) ptr; + dest = (wxGridCellRenderer *) src; + return (void *) dest; +} + +#define new_wxGridCellBoolRenderer() (new wxGridCellBoolRenderer()) +static PyObject *_wrap_new_wxGridCellBoolRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellBoolRenderer * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellBoolRenderer",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellBoolRenderer *)new_wxGridCellBoolRenderer(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellBoolRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellEditor_IsCreated(_swigobj) (_swigobj->IsCreated()) +static PyObject *_wrap_wxGridCellEditor_IsCreated(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_IsCreated",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_IsCreated. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellEditor_IsCreated(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellEditor_GetControl(_swigobj) (_swigobj->GetControl()) +static PyObject *_wrap_wxGridCellEditor_GetControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxControl * _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_GetControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_GetControl. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxControl *)wxGridCellEditor_GetControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellEditor_SetControl(_swigobj,_swigarg0) (_swigobj->SetControl(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_SetControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxControl * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","control", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetControl",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_SetControl. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxControl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_SetControl. Expected _wxControl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_SetControl(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_SetParameters(_swigobj,_swigarg0) (_swigobj->SetParameters(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_SetParameters. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGridCellEditor_IncRef(_swigobj) (_swigobj->IncRef()) +static PyObject *_wrap_wxGridCellEditor_IncRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_IncRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_IncRef. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_IncRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_DecRef(_swigobj) (_swigobj->DecRef()) +static PyObject *_wrap_wxGridCellEditor_DecRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_DecRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_DecRef. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_DecRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellEditor_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxEvtHandler * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","parent","id","evtHandler", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO:wxGridCellEditor_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Create. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellEditor_Create. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Create(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_BeginEdit(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->BeginEdit(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellEditor_BeginEdit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + int _arg1; + int _arg2; + wxGrid * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","grid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridCellEditor_BeginEdit",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_BeginEdit. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellEditor_BeginEdit. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_BeginEdit(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_EndEdit(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->EndEdit(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellEditor_EndEdit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellEditor * _arg0; + int _arg1; + int _arg2; + wxGrid * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","grid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridCellEditor_EndEdit",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_EndEdit. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellEditor_EndEdit. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellEditor_EndEdit(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellEditor_Reset(_swigobj) (_swigobj->Reset()) +static PyObject *_wrap_wxGridCellEditor_Reset(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Reset",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Reset. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Reset(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Clone(_swigobj) (_swigobj->Clone()) +static PyObject *_wrap_wxGridCellEditor_Clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Clone",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Clone. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGridCellEditor_Clone(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellEditor_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_SetSize. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_SetSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Show(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellEditor_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + bool _arg1; + wxGridCellAttr * _arg2 = (wxGridCellAttr *) NULL; + PyObject * _argo0 = 0; + int tempbool1; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","show","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxGridCellEditor_Show",_kwnames,&_argo0,&tempbool1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Show. Expected _wxGridCellEditor_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellEditor_Show. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Show(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_PaintBackground(_swigobj,_swigarg0,_swigarg1) (_swigobj->PaintBackground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellEditor_PaintBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxRect * _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","rectCell","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGridCellEditor_PaintBackground",_kwnames,&_argo0,&_obj1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_PaintBackground. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellEditor_PaintBackground. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_PaintBackground(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_IsAcceptedKey(_swigobj,_swigarg0) (_swigobj->IsAcceptedKey(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_IsAcceptedKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_IsAcceptedKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_IsAcceptedKey. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_IsAcceptedKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellEditor_IsAcceptedKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellEditor_StartingKey(_swigobj,_swigarg0) (_swigobj->StartingKey(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_StartingKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_StartingKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_StartingKey. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_StartingKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_StartingKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_StartingClick(_swigobj) (_swigobj->StartingClick()) +static PyObject *_wrap_wxGridCellEditor_StartingClick(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_StartingClick",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_StartingClick. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_StartingClick(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_HandleReturn(_swigobj,_swigarg0) (_swigobj->HandleReturn(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_HandleReturn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_HandleReturn",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_HandleReturn. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_HandleReturn. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_HandleReturn(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellEditor_Destroy(_swigobj) (_swigobj->Destroy()) +static PyObject *_wrap_wxGridCellEditor_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor_Destroy. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellEditor_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyGridCellEditorTowxGridCellEditor(void *ptr) { + wxPyGridCellEditor *src; + wxGridCellEditor *dest; + src = (wxPyGridCellEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxPyGridCellEditor() (new wxPyGridCellEditor()) +static PyObject *_wrap_new_wxPyGridCellEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridCellEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridCellEditor *)new_wxPyGridCellEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellEditor__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellEditor__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellEditor__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor__setSelf. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_SetSize(_swigobj,_swigarg0) (_swigobj->base_SetSize(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_SetSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_SetSize. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_SetSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_Show(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_Show(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellEditor_base_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + bool _arg1; + wxGridCellAttr * _arg2 = (wxGridCellAttr *) NULL; + PyObject * _argo0 = 0; + int tempbool1; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","show","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxPyGridCellEditor_base_Show",_kwnames,&_argo0,&tempbool1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_Show. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyGridCellEditor_base_Show. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_Show(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_PaintBackground(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_PaintBackground(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellEditor_base_PaintBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxRect * _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","rectCell","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellEditor_base_PaintBackground",_kwnames,&_argo0,&_obj1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_PaintBackground. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyGridCellEditor_base_PaintBackground. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_PaintBackground(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_IsAcceptedKey(_swigobj,_swigarg0) (_swigobj->base_IsAcceptedKey(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_IsAcceptedKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_IsAcceptedKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_IsAcceptedKey. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_IsAcceptedKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_IsAcceptedKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_StartingKey(_swigobj,_swigarg0) (_swigobj->base_StartingKey(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_StartingKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_StartingKey",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_StartingKey. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_StartingKey. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_StartingKey(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_StartingClick(_swigobj) (_swigobj->base_StartingClick()) +static PyObject *_wrap_wxPyGridCellEditor_base_StartingClick(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridCellEditor_base_StartingClick",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_StartingClick. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_StartingClick(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_HandleReturn(_swigobj,_swigarg0) (_swigobj->base_HandleReturn(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_HandleReturn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_HandleReturn",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_HandleReturn. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_HandleReturn. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_HandleReturn(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_Destroy(_swigobj) (_swigobj->base_Destroy()) +static PyObject *_wrap_wxPyGridCellEditor_base_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridCellEditor_base_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_Destroy. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellEditor_base_SetParameters(_swigobj,_swigarg0) (_swigobj->base_SetParameters(_swigarg0)) +static PyObject *_wrap_wxPyGridCellEditor_base_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellEditor * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","params", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyGridCellEditor_base_SetParameters",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_SetParameters. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellEditor_base_SetParameters(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static void *SwigwxGridCellTextEditorTowxGridCellEditor(void *ptr) { + wxGridCellTextEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellTextEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellTextEditor() (new wxGridCellTextEditor()) +static PyObject *_wrap_new_wxGridCellTextEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellTextEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellTextEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellTextEditor *)new_wxGridCellTextEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellTextEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellNumberEditorTowxGridCellTextEditor(void *ptr) { + wxGridCellNumberEditor *src; + wxGridCellTextEditor *dest; + src = (wxGridCellNumberEditor *) ptr; + dest = (wxGridCellTextEditor *) src; + return (void *) dest; +} + +static void *SwigwxGridCellNumberEditorTowxGridCellEditor(void *ptr) { + wxGridCellNumberEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellNumberEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellNumberEditor(_swigarg0,_swigarg1) (new wxGridCellNumberEditor(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridCellNumberEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellNumberEditor * _result; + int _arg0 = (int ) -1; + int _arg1 = (int ) -1; + char *_kwnames[] = { "min","max", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridCellNumberEditor",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellNumberEditor *)new_wxGridCellNumberEditor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellNumberEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellFloatEditorTowxGridCellTextEditor(void *ptr) { + wxGridCellFloatEditor *src; + wxGridCellTextEditor *dest; + src = (wxGridCellFloatEditor *) ptr; + dest = (wxGridCellTextEditor *) src; + return (void *) dest; +} + +static void *SwigwxGridCellFloatEditorTowxGridCellEditor(void *ptr) { + wxGridCellFloatEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellFloatEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellFloatEditor() (new wxGridCellFloatEditor()) +static PyObject *_wrap_new_wxGridCellFloatEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellFloatEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellFloatEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellFloatEditor *)new_wxGridCellFloatEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellFloatEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellBoolEditorTowxGridCellEditor(void *ptr) { + wxGridCellBoolEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellBoolEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellBoolEditor() (new wxGridCellBoolEditor()) +static PyObject *_wrap_new_wxGridCellBoolEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellBoolEditor * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellBoolEditor",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellBoolEditor *)new_wxGridCellBoolEditor(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellBoolEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridCellChoiceEditorTowxGridCellEditor(void *ptr) { + wxGridCellChoiceEditor *src; + wxGridCellEditor *dest; + src = (wxGridCellChoiceEditor *) ptr; + dest = (wxGridCellEditor *) src; + return (void *) dest; +} + +#define new_wxGridCellChoiceEditor(_swigarg0,_swigarg1,_swigarg2) (new wxGridCellChoiceEditor(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxGridCellChoiceEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellChoiceEditor * _result; + int _arg0 = (int ) 0; + wxString * _arg1 = (wxString *) NULL; + bool _arg2 = (bool ) FALSE; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "choices","allowOthers", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxGridCellChoiceEditor",_kwnames,&_obj1,&tempbool2)) + return NULL; + if (_obj1) +{ + _arg1 = wxString_LIST_helper(_obj1); + if (_arg1 == NULL) { + return NULL; + } +} + _arg2 = (bool ) tempbool2; +{ + if (_obj1) { + _arg0 = PyList_Size(_obj1); + } + else { + _arg0 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellChoiceEditor *)new_wxGridCellChoiceEditor(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellChoiceEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + delete [] _arg1; +} + return _resultobj; +} + +#define new_wxGridCellAttr() (new wxGridCellAttr()) +static PyObject *_wrap_new_wxGridCellAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellAttr",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)new_wxGridCellAttr(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_Clone(_swigobj) (_swigobj->Clone()) +static PyObject *_wrap_wxGridCellAttr_Clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_Clone",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_Clone. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxGridCellAttr_Clone(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_IncRef(_swigobj) (_swigobj->IncRef()) +static PyObject *_wrap_wxGridCellAttr_IncRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_IncRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_IncRef. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_IncRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_DecRef(_swigobj) (_swigobj->DecRef()) +static PyObject *_wrap_wxGridCellAttr_DecRef(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_DecRef",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_DecRef. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_DecRef(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colText", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetTextColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colBack", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetBackgroundColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetFont(_swigobj,_swigarg0) (_swigobj->SetFont(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetFont. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttr_SetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hAlign","vAlign", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttr_SetAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetAlignment. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetReadOnly(_swigobj,_swigarg0) (_swigobj->SetReadOnly(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","isReadOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGridCellAttr_SetReadOnly",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetReadOnly. Expected _wxGridCellAttr_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetReadOnly(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetRenderer(_swigobj,_swigarg0) (_swigobj->SetRenderer(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellRenderer * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","renderer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetRenderer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetRenderer. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetRenderer. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetRenderer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_SetEditor(_swigobj,_swigarg0) (_swigobj->SetEditor(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellEditor * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetEditor",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetEditor. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetEditor. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetEditor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) +static PyObject *_wrap_wxGridCellAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasTextColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasTextColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasBackgroundColour(_swigobj) (_swigobj->HasBackgroundColour()) +static PyObject *_wrap_wxGridCellAttr_HasBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasBackgroundColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasBackgroundColour(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasFont(_swigobj) (_swigobj->HasFont()) +static PyObject *_wrap_wxGridCellAttr_HasFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasFont. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasAlignment(_swigobj) (_swigobj->HasAlignment()) +static PyObject *_wrap_wxGridCellAttr_HasAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasAlignment. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasAlignment(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasRenderer(_swigobj) (_swigobj->HasRenderer()) +static PyObject *_wrap_wxGridCellAttr_HasRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasRenderer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasRenderer. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasRenderer(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_HasEditor(_swigobj) (_swigobj->HasEditor()) +static PyObject *_wrap_wxGridCellAttr_HasEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasEditor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasEditor. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_HasEditor(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) +static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetTextColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxGridCellAttr_GetTextColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxGridCellAttr_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetBackgroundColour. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxColour & _result_ref = wxGridCellAttr_GetBackgroundColour(_arg0); + _result = (wxColour *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetFont(_swigobj) (_swigobj->GetFont()) +static PyObject *_wrap_wxGridCellAttr_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetFont. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxFont & _result_ref = wxGridCellAttr_GetFont(_arg0); + _result = (wxFont *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttr_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_GetAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetAlignment. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_GetAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGridCellAttr_GetRenderer(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetRenderer(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellAttr_GetRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGridCellAttr * _arg0; + wxGrid * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","grid","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttr_GetRenderer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetRenderer. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_GetRenderer. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGridCellAttr_GetRenderer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_GetEditor(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetEditor(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellAttr_GetEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGridCellAttr * _arg0; + wxGrid * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","grid","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttr_GetEditor",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_GetEditor. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_GetEditor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGridCellAttr_GetEditor(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttr_IsReadOnly(_swigobj) (_swigobj->IsReadOnly()) +static PyObject *_wrap_wxGridCellAttr_IsReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_IsReadOnly",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_IsReadOnly. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridCellAttr_IsReadOnly(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellAttr_SetDefAttr(_swigobj,_swigarg0) (_swigobj->SetDefAttr(_swigarg0)) +static PyObject *_wrap_wxGridCellAttr_SetDefAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _arg0; + wxGridCellAttr * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","defAttr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr_SetDefAttr",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_SetDefAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetDefAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttr_SetDefAttr(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxGridCellAttrProvider() (new wxGridCellAttrProvider()) +static PyObject *_wrap_new_wxGridCellAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxGridCellAttrProvider",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttrProvider *)new_wxGridCellAttrProvider(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttrProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttrProvider_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxGridCellAttrProvider * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttrProvider_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_GetAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxGridCellAttrProvider_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridCellAttrProvider_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridCellAttrProvider_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttrProvider_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_SetAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttrProvider_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridCellAttrProvider_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_SetRowAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttrProvider_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridCellAttrProvider_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_SetColAttr. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttrProvider_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_UpdateAttrRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->UpdateAttrRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + size_t _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttrProvider_UpdateAttrRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_UpdateAttrRows. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_UpdateAttrRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellAttrProvider_UpdateAttrCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->UpdateAttrCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellAttrProvider_UpdateAttrCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _arg0; + size_t _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellAttrProvider_UpdateAttrCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider_UpdateAttrCols. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellAttrProvider_UpdateAttrCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider(void *ptr) { + wxPyGridCellAttrProvider *src; + wxGridCellAttrProvider *dest; + src = (wxPyGridCellAttrProvider *) ptr; + dest = (wxGridCellAttrProvider *) src; + return (void *) dest; +} + +#define new_wxPyGridCellAttrProvider() (new wxPyGridCellAttrProvider()) +static PyObject *_wrap_new_wxPyGridCellAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridCellAttrProvider",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridCellAttrProvider *)new_wxPyGridCellAttrProvider(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridCellAttrProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellAttrProvider__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridCellAttrProvider__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider__setSelf. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxPyGridCellAttrProvider * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridCellAttrProvider_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_GetAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxPyGridCellAttrProvider_base_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxPyGridCellAttrProvider_base_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_SetAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellAttrProvider_base_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridCellAttrProvider_base_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_SetRowAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellAttrProvider_base_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider_base_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridCellAttrProvider_base_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridCellAttrProvider_base_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridCellAttrProvider * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridCellAttrProvider_base_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellAttrProvider_base_SetColAttr. Expected _wxPyGridCellAttrProvider_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellAttrProvider_base_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridCellAttrProvider_base_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetAttrProvider(_swigobj,_swigarg0) (_swigobj->SetAttrProvider(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_SetAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttrProvider * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attrProvider", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridTableBase_SetAttrProvider",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetAttrProvider. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttrProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetAttrProvider. Expected _wxGridCellAttrProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetAttrProvider(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_GetAttrProvider(_swigobj) (_swigobj->GetAttrProvider()) +static PyObject *_wrap_wxGridTableBase_GetAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttrProvider * _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetAttrProvider",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetAttrProvider. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttrProvider *)wxGridTableBase_GetAttrProvider(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttrProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableBase_SetView(_swigobj,_swigarg0) (_swigobj->SetView(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_SetView(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGrid * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","grid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridTableBase_SetView",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetView. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetView. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetView(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_GetView(_swigobj) (_swigobj->GetView()) +static PyObject *_wrap_wxGridTableBase_GetView(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetView",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetView. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGrid *)wxGridTableBase_GetView(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableBase_GetNumberRows(_swigobj) (_swigobj->GetNumberRows()) +static PyObject *_wrap_wxGridTableBase_GetNumberRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetNumberRows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetNumberRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableBase_GetNumberRows(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetNumberCols(_swigobj) (_swigobj->GetNumberCols()) +static PyObject *_wrap_wxGridTableBase_GetNumberCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetNumberCols",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetNumberCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableBase_GetNumberCols(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_IsEmptyCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEmptyCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_IsEmptyCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_IsEmptyCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_IsEmptyCell. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_IsEmptyCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValue",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetValue(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_SetValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValue(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridTableBase_SetValue",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValue(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGridTableBase_GetTypeName(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetTypeName(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetTypeName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetTypeName",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetTypeName. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetTypeName(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_CanGetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CanGetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_CanGetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridTableBase_CanGetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_CanGetValueAs. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGridTableBase_CanSetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CanSetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_CanSetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGridTableBase_CanSetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_CanSetValueAs. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGridTableBase_GetValueAsLong(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValueAsLong(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValueAsLong(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValueAsLong",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValueAsLong. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGridTableBase_GetValueAsLong(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxGridTableBase_GetValueAsDouble(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValueAsDouble(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValueAsDouble(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValueAsDouble",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValueAsDouble. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxGridTableBase_GetValueAsDouble(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxGridTableBase_GetValueAsBool(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetValueAsBool(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetValueAsBool(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetValueAsBool",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetValueAsBool. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_GetValueAsBool(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_SetValueAsLong(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValueAsLong(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValueAsLong(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + long _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiil:wxGridTableBase_SetValueAsLong",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValueAsLong. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValueAsLong(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetValueAsDouble(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValueAsDouble(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValueAsDouble(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + double _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiid:wxGridTableBase_SetValueAsDouble",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValueAsDouble. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValueAsDouble(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetValueAsBool(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetValueAsBool(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetValueAsBool(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + bool _arg3; + PyObject * _argo0 = 0; + int tempbool3; + char *_kwnames[] = { "self","row","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxGridTableBase_SetValueAsBool",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetValueAsBool. Expected _wxGridTableBase_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetValueAsBool(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxGridTableBase_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_Clear. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_InsertRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_InsertRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_InsertRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_InsertRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_InsertRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_AppendRows(_swigobj,_swigarg0) (_swigobj->AppendRows(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_AppendRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGridTableBase_AppendRows",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_AppendRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_AppendRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_DeleteRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_DeleteRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_DeleteRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_DeleteRows. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_DeleteRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_InsertCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->InsertCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_InsertCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_InsertCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_InsertCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_InsertCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_AppendCols(_swigobj,_swigarg0) (_swigobj->AppendCols(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_AppendCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGridTableBase_AppendCols",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_AppendCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_AppendCols(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_DeleteCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_DeleteCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGridTableBase_DeleteCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_DeleteCols. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_DeleteCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetRowLabelValue(_swigobj,_swigarg0) (_swigobj->GetRowLabelValue(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_GetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableBase_GetRowLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetRowLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetRowLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_GetColLabelValue(_swigobj,_swigarg0) (_swigobj->GetColLabelValue(_swigarg0)) +static PyObject *_wrap_wxGridTableBase_GetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableBase_GetColLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetColLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGridTableBase_GetColLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGridTableBase_SetRowLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","row","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGridTableBase_SetRowLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetRowLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetRowLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGridTableBase_SetColLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGridTableBase_SetColLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetColLabelValue. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetColLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGridTableBase_CanHaveAttributes(_swigobj) (_swigobj->CanHaveAttributes()) +static PyObject *_wrap_wxGridTableBase_CanHaveAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_CanHaveAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_CanHaveAttributes. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridTableBase_CanHaveAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableBase_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridTableBase_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_GetAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxGridTableBase_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableBase_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGridTableBase_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridTableBase_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridTableBase_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetRowAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableBase_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridTableBase_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxGridTableBase_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase_SetColAttr. Expected _wxGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableBase_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableBase_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxPyGridTableBaseTowxGridTableBase(void *ptr) { + wxPyGridTableBase *src; + wxGridTableBase *dest; + src = (wxPyGridTableBase *) ptr; + dest = (wxGridTableBase *) src; + return (void *) dest; +} + +#define new_wxPyGridTableBase() (new wxPyGridTableBase()) +static PyObject *_wrap_new_wxPyGridTableBase(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyGridTableBase",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyGridTableBase *)new_wxPyGridTableBase(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyGridTableBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridTableBase__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyGridTableBase__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase__setSelf. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxPyGridTableBase_Destroy(wxPyGridTableBase *self) { delete self; } +static PyObject *_wrap_wxPyGridTableBase_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridTableBase_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_Destroy. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_GetTypeName(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetTypeName(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_GetTypeName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridTableBase_base_GetTypeName",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetTypeName. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxPyGridTableBase_base_GetTypeName(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_CanGetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_CanGetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridTableBase_base_CanGetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxPyGridTableBase_base_CanGetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_CanGetValueAs. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_CanGetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_CanSetValueAs(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_CanSetValueAs(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridTableBase_base_CanSetValueAs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxPyGridTableBase_base_CanSetValueAs",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_CanSetValueAs. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_CanSetValueAs(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_Clear(_swigobj) (_swigobj->base_Clear()) +static PyObject *_wrap_wxPyGridTableBase_base_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridTableBase_base_Clear",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_Clear. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_Clear(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_InsertRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_InsertRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_InsertRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_InsertRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_InsertRows. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_InsertRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_AppendRows(_swigobj,_swigarg0) (_swigobj->base_AppendRows(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_AppendRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxPyGridTableBase_base_AppendRows",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_AppendRows. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_AppendRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_DeleteRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_DeleteRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_DeleteRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_DeleteRows",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_DeleteRows. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_DeleteRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_InsertCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_InsertCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_InsertCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_InsertCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_InsertCols. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_InsertCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_AppendCols(_swigobj,_swigarg0) (_swigobj->base_AppendCols(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_AppendCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxPyGridTableBase_base_AppendCols",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_AppendCols. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_AppendCols(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_DeleteCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_DeleteCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_DeleteCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + size_t _arg1 = (size_t ) 0; + size_t _arg2 = (size_t ) 1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","numCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyGridTableBase_base_DeleteCols",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_DeleteCols. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_DeleteCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_GetRowLabelValue(_swigobj,_swigarg0) (_swigobj->base_GetRowLabelValue(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_GetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyGridTableBase_base_GetRowLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetRowLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxPyGridTableBase_base_GetRowLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_GetColLabelValue(_swigobj,_swigarg0) (_swigobj->base_GetColLabelValue(_swigarg0)) +static PyObject *_wrap_wxPyGridTableBase_base_GetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyGridTableBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyGridTableBase_base_GetColLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetColLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxPyGridTableBase_base_GetColLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_SetRowLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetRowLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","row","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxPyGridTableBase_base_SetRowLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetRowLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetRowLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_SetColLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetColLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxPyGridTableBase_base_SetColLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetColLabelValue. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetColLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxPyGridTableBase_base_CanHaveAttributes(_swigobj) (_swigobj->base_CanHaveAttributes()) +static PyObject *_wrap_wxPyGridTableBase_base_CanHaveAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyGridTableBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridTableBase_base_CanHaveAttributes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_CanHaveAttributes. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyGridTableBase_base_CanHaveAttributes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyGridTableBase_base_GetAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_GetAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxPyGridTableBase * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxPyGridTableBase_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_GetAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellAttr *)wxPyGridTableBase_base_GetAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPyGridTableBase_base_SetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->base_SetAttr(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPyGridTableBase_base_SetAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxPyGridTableBase_base_SetAttr",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridTableBase_base_SetAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetAttr(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridTableBase_base_SetRowAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetRowAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridTableBase_base_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyGridTableBase_base_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyGridTableBase_base_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyGridTableBase * _arg0; + wxGridCellAttr * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxPyGridTableBase_base_SetColAttr",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridTableBase_base_SetColAttr. Expected _wxPyGridTableBase_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridTableBase_base_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyGridTableBase_base_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxGridStringTableTowxGridTableBase(void *ptr) { + wxGridStringTable *src; + wxGridTableBase *dest; + src = (wxGridStringTable *) ptr; + dest = (wxGridTableBase *) src; + return (void *) dest; +} + +#define new_wxGridStringTable(_swigarg0,_swigarg1) (new wxGridStringTable(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridStringTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridStringTable * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + char *_kwnames[] = { "numRows","numCols", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridStringTable",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridStringTable *)new_wxGridStringTable(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridStringTable_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxGridTableMessage(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxGridTableMessage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxGridTableMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _result; + wxGridTableBase * _arg0; + int _arg1; + int _arg2 = (int ) -1; + int _arg3 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "table","id","comInt1","comInt2", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:new_wxGridTableMessage",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGridTableMessage. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridTableMessage *)new_wxGridTableMessage(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableMessage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxGridTableMessage(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxGridTableMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGridTableMessage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGridTableMessage. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxGridTableMessage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_SetTableObject(_swigobj,_swigarg0) (_swigobj->SetTableObject(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetTableObject(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + wxGridTableBase * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridTableMessage_SetTableObject",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetTableObject. Expected _wxGridTableMessage_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridTableMessage_SetTableObject. Expected _wxGridTableBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetTableObject(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetTableObject(_swigobj) (_swigobj->GetTableObject()) +static PyObject *_wrap_wxGridTableMessage_GetTableObject(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetTableObject",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetTableObject. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridTableBase *)wxGridTableMessage_GetTableObject(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridTableMessage_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableMessage_SetId",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetId. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetId(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetId(_swigobj) (_swigobj->GetId()) +static PyObject *_wrap_wxGridTableMessage_GetId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetId",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetId. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableMessage_GetId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableMessage_SetCommandInt(_swigobj,_swigarg0) (_swigobj->SetCommandInt(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetCommandInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","comInt1", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableMessage_SetCommandInt",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetCommandInt. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetCommandInt(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetCommandInt(_swigobj) (_swigobj->GetCommandInt()) +static PyObject *_wrap_wxGridTableMessage_GetCommandInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetCommandInt",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetCommandInt. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableMessage_GetCommandInt(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridTableMessage_SetCommandInt2(_swigobj,_swigarg0) (_swigobj->SetCommandInt2(_swigarg0)) +static PyObject *_wrap_wxGridTableMessage_SetCommandInt2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableMessage * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","comInt2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridTableMessage_SetCommandInt2",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_SetCommandInt2. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridTableMessage_SetCommandInt2(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridTableMessage_GetCommandInt2(_swigobj) (_swigobj->GetCommandInt2()) +static PyObject *_wrap_wxGridTableMessage_GetCommandInt2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridTableMessage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableMessage_GetCommandInt2",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableMessage_GetCommandInt2. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridTableMessage_GetCommandInt2(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define new_wxGridCellCoords(_swigarg0,_swigarg1) (new wxGridCellCoords(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxGridCellCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + int _arg0 = (int ) -1; + int _arg1 = (int ) -1; + char *_kwnames[] = { "r","c", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxGridCellCoords",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellCoords *)new_wxGridCellCoords(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxGridCellCoords(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxGridCellCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGridCellCoords",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGridCellCoords. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxGridCellCoords(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellCoords_GetRow(_swigobj) (_swigobj->GetRow()) +static PyObject *_wrap_wxGridCellCoords_GetRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellCoords_GetRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_GetRow. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellCoords_GetRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellCoords_SetRow(_swigobj,_swigarg0) (_swigobj->SetRow(_swigarg0)) +static PyObject *_wrap_wxGridCellCoords_SetRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellCoords_SetRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_SetRow. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellCoords_SetRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellCoords_GetCol(_swigobj) (_swigobj->GetCol()) +static PyObject *_wrap_wxGridCellCoords_GetCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellCoords_GetCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_GetCol. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellCoords_GetCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridCellCoords_SetCol(_swigobj,_swigarg0) (_swigobj->SetCol(_swigarg0)) +static PyObject *_wrap_wxGridCellCoords_SetCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellCoords_SetCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_SetCol. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellCoords_SetCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridCellCoords_Set(_swigobj,_swigarg0,_swigarg1) (_swigobj->Set(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGridCellCoords_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGridCellCoords_Set",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_Set. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridCellCoords_Set(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject * wxGridCellCoords_asTuple(wxGridCellCoords *self) { + PyObject* tup = PyTuple_New(2); + PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); + PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); + return tup; + } +static PyObject *_wrap_wxGridCellCoords_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxGridCellCoords * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellCoords_asTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords_asTuple. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxGridCellCoords_asTuple(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static int wxGridCellCoords___cmp__(wxGridCellCoords *self,const wxGridCellCoords & other) { + return *self != other; + } +static PyObject *_wrap_wxGridCellCoords___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridCellCoords * _arg0; + wxGridCellCoords * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellCoords___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellCoords___cmp__. Expected _wxGridCellCoords_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellCoords_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellCoords___cmp__. Expected _wxGridCellCoords_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridCellCoords___cmp__(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxGridTowxScrolledWindow(void *ptr) { + wxGrid *src; + wxScrolledWindow *dest; + src = (wxGrid *) ptr; + dest = (wxScrolledWindow *) src; + return (void *) dest; +} + +static void *SwigwxGridTowxPanel(void *ptr) { + wxGrid *src; + wxPanel *dest; + src = (wxGrid *) ptr; + dest = (wxPanel *) src; + return (void *) dest; +} + +static void *SwigwxGridTowxWindow(void *ptr) { + wxGrid *src; + wxWindow *dest; + src = (wxGrid *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxGridTowxEvtHandler(void *ptr) { + wxGrid *src; + wxEvtHandler *dest; + src = (wxGrid *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxGrid(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + long _arg4 = (long ) wxWANTS_CHARS; + char * _arg5 = (char *) wxPanelNameStr; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxGrid",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGrid. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGrid_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_CreateGrid(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CreateGrid(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_CreateGrid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + WXGRIDSELECTIONMODES _arg3 = (WXGRIDSELECTIONMODES ) wxGrid::wxGridSelectCells; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numRows","numCols","selmode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxGrid_CreateGrid",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CreateGrid. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CreateGrid(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetSelectionMode(_swigobj,_swigarg0) (_swigobj->SetSelectionMode(_swigarg0)) +static PyObject *_wrap_wxGrid_SetSelectionMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + WXGRIDSELECTIONMODES _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","selmode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetSelectionMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetSelectionMode. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetSelectionMode(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetNumberRows(_swigobj) (_swigobj->GetNumberRows()) +static PyObject *_wrap_wxGrid_GetNumberRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetNumberRows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetNumberRows. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetNumberRows(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetNumberCols(_swigobj) (_swigobj->GetNumberCols()) +static PyObject *_wrap_wxGrid_GetNumberCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetNumberCols",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetNumberCols. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetNumberCols(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ProcessTableMessage(_swigobj,_swigarg0) (_swigobj->ProcessTableMessage(_swigarg0)) +static PyObject *_wrap_wxGrid_ProcessTableMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + wxGridTableMessage * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_ProcessTableMessage",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ProcessTableMessage. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableMessage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_ProcessTableMessage. Expected _wxGridTableMessage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_ProcessTableMessage(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetTable(_swigobj) (_swigobj->GetTable()) +static PyObject *_wrap_wxGrid_GetTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridTableBase * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetTable",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetTable. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridTableBase *)wxGrid_GetTable(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridTableBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_SetTable(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetTable(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + wxGridTableBase * _arg1; + bool _arg2 = (bool ) FALSE; + WXGRIDSELECTIONMODES _arg3 = (WXGRIDSELECTIONMODES ) wxGrid::wxGridSelectCells; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","table","takeOwnership","selmode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|ii:wxGrid_SetTable",_kwnames,&_argo0,&_argo1,&tempbool2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetTable. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetTable. Expected _wxGridTableBase_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_SetTable(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ClearGrid(_swigobj) (_swigobj->ClearGrid()) +static PyObject *_wrap_wxGrid_ClearGrid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_ClearGrid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ClearGrid. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_ClearGrid(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_InsertRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertRows(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_InsertRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numRows","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_InsertRows",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_InsertRows(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_AppendRows(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendRows(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","numRows","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendRows",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_DeleteRows(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteRows(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_DeleteRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numRows","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_DeleteRows",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_DeleteRows(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_InsertCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->InsertCols(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_InsertCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numCols","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_InsertCols",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_InsertCols. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_InsertCols(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_AppendCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->AppendCols(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","numCols","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendCols",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AppendCols. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_DeleteCols(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DeleteCols(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_DeleteCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 1; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","pos","numCols","updateLabels", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iii:wxGrid_DeleteCols",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeleteCols. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_DeleteCols(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_DrawCellHighlight(_swigobj,_swigarg0,_swigarg1) (_swigobj->DrawCellHighlight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_DrawCellHighlight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxDC * _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","dc","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_DrawCellHighlight",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DrawCellHighlight. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_DrawCellHighlight. Expected _wxDC_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_DrawCellHighlight. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DrawCellHighlight(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DrawTextRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawTextRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxDC * _arg1; + wxString * _arg2; + wxRect * _arg3; + int _arg4 = (int ) wxLEFT; + int _arg5 = (int ) wxTOP; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj2 = 0; + wxRect temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","dc","arg3","arg4","horizontalAlignment","verticalAlignment", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO|ii:wxGrid_DrawTextRectangle",_kwnames,&_argo0,&_argo1,&_obj2,&_obj3,&_arg4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DrawTextRectangle. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_DrawTextRectangle. Expected _wxDC_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + _arg3 = &temp; + if (! wxRect_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_StringToLines(_swigobj,_swigarg0,_swigarg1) (_swigobj->StringToLines(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_StringToLines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxString * _arg1; + wxArrayString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","value","lines", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_StringToLines",_kwnames,&_argo0,&_obj1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_StringToLines. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArrayString_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_StringToLines. Expected _wxArrayString_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_StringToLines(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_GetTextBoxSize(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetTextBoxSize(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxDC * _arg1; + wxArrayString * _arg2; + long * _arg3; + long temp; + long * _arg4; + long temp0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","dc","lines", NULL }; + + self = self; +{ + _arg3 = &temp; +} +{ + _arg4 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_GetTextBoxSize",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetTextBoxSize. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_GetTextBoxSize. Expected _wxDC_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxArrayString_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_GetTextBoxSize. Expected _wxArrayString_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetTextBoxSize(_arg0,*_arg1,*_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGrid_BeginBatch(_swigobj) (_swigobj->BeginBatch()) +static PyObject *_wrap_wxGrid_BeginBatch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_BeginBatch",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_BeginBatch. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_BeginBatch(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_EndBatch(_swigobj) (_swigobj->EndBatch()) +static PyObject *_wrap_wxGrid_EndBatch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_EndBatch",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EndBatch. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EndBatch(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetBatchCount(_swigobj) (_swigobj->GetBatchCount()) +static PyObject *_wrap_wxGrid_GetBatchCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetBatchCount",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetBatchCount. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetBatchCount(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsEditable(_swigobj) (_swigobj->IsEditable()) +static PyObject *_wrap_wxGrid_IsEditable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsEditable",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsEditable. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsEditable(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_EnableEditing(_swigobj,_swigarg0) (_swigobj->EnableEditing(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableEditing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","edit", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_EnableEditing",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableEditing. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableEditing(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_EnableCellEditControl(_swigobj,_swigarg0) (_swigobj->EnableCellEditControl(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableCellEditControl",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableCellEditControl(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableCellEditControl(_swigobj) (_swigobj->DisableCellEditControl()) +static PyObject *_wrap_wxGrid_DisableCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableCellEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableCellEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanEnableCellControl(_swigobj) (_swigobj->CanEnableCellControl()) +static PyObject *_wrap_wxGrid_CanEnableCellControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanEnableCellControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanEnableCellControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanEnableCellControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsCellEditControlEnabled(_swigobj) (_swigobj->IsCellEditControlEnabled()) +static PyObject *_wrap_wxGrid_IsCellEditControlEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsCellEditControlEnabled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsCellEditControlEnabled. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsCellEditControlEnabled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsCellEditControlShown(_swigobj) (_swigobj->IsCellEditControlShown()) +static PyObject *_wrap_wxGrid_IsCellEditControlShown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsCellEditControlShown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsCellEditControlShown. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsCellEditControlShown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsCurrentCellReadOnly(_swigobj) (_swigobj->IsCurrentCellReadOnly()) +static PyObject *_wrap_wxGrid_IsCurrentCellReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsCurrentCellReadOnly",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsCurrentCellReadOnly. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsCurrentCellReadOnly(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ShowCellEditControl(_swigobj) (_swigobj->ShowCellEditControl()) +static PyObject *_wrap_wxGrid_ShowCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_ShowCellEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ShowCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_ShowCellEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_HideCellEditControl(_swigobj) (_swigobj->HideCellEditControl()) +static PyObject *_wrap_wxGrid_HideCellEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_HideCellEditControl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_HideCellEditControl. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_HideCellEditControl(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SaveEditControlValue(_swigobj) (_swigobj->SaveEditControlValue()) +static PyObject *_wrap_wxGrid_SaveEditControlValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_SaveEditControlValue",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SaveEditControlValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SaveEditControlValue(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static wxGridCellCoords * wxGrid_XYToCell(wxGrid *self,int x,int y) { + wxGridCellCoords rv; + self->XYToCell(x, y, rv); + return new wxGridCellCoords(rv); + } +static PyObject *_wrap_wxGrid_XYToCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_XYToCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_XYToCell. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellCoords *)wxGrid_XYToCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_YToRow(_swigobj,_swigarg0) (_swigobj->YToRow(_swigarg0)) +static PyObject *_wrap_wxGrid_YToRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_YToRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_YToRow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_YToRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_XToCol(_swigobj,_swigarg0) (_swigobj->XToCol(_swigarg0)) +static PyObject *_wrap_wxGrid_XToCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_XToCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_XToCol. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_XToCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_YToEdgeOfRow(_swigobj,_swigarg0) (_swigobj->YToEdgeOfRow(_swigarg0)) +static PyObject *_wrap_wxGrid_YToEdgeOfRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_YToEdgeOfRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_YToEdgeOfRow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_YToEdgeOfRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_XToEdgeOfCol(_swigobj,_swigarg0) (_swigobj->XToEdgeOfCol(_swigarg0)) +static PyObject *_wrap_wxGrid_XToEdgeOfCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_XToEdgeOfCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_XToEdgeOfCol. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_XToEdgeOfCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_CellToRect(_swigobj,_swigarg0,_swigarg1) (_swigobj->CellToRect(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_CellToRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_CellToRect",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CellToRect. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxGrid_CellToRect(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetGridCursorRow(_swigobj) (_swigobj->GetGridCursorRow()) +static PyObject *_wrap_wxGrid_GetGridCursorRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridCursorRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridCursorRow. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetGridCursorRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetGridCursorCol(_swigobj) (_swigobj->GetGridCursorCol()) +static PyObject *_wrap_wxGrid_GetGridCursorCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridCursorCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridCursorCol. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetGridCursorCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_IsVisible(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->IsVisible(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","row","col","wholeCellVisible", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxGrid_IsVisible",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsVisible. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsVisible(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MakeCellVisible(_swigobj,_swigarg0,_swigarg1) (_swigobj->MakeCellVisible(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_MakeCellVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_MakeCellVisible",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MakeCellVisible. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_MakeCellVisible(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetGridCursor(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetGridCursor(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetGridCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetGridCursor",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetGridCursor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetGridCursor(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_MoveCursorUp(_swigobj,_swigarg0) (_swigobj->MoveCursorUp(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorUp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorUp",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorUp. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorUp(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorDown(_swigobj,_swigarg0) (_swigobj->MoveCursorDown(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorDown",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorDown. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorDown(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorLeft(_swigobj,_swigarg0) (_swigobj->MoveCursorLeft(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorLeft(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorLeft",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorLeft. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorLeft(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorRight(_swigobj,_swigarg0) (_swigobj->MoveCursorRight(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorRight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorRight",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorRight. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorRight(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MovePageDown(_swigobj) (_swigobj->MovePageDown()) +static PyObject *_wrap_wxGrid_MovePageDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_MovePageDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MovePageDown. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MovePageDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MovePageUp(_swigobj) (_swigobj->MovePageUp()) +static PyObject *_wrap_wxGrid_MovePageUp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_MovePageUp",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MovePageUp. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MovePageUp(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorUpBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorUpBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorUpBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorUpBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorUpBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorUpBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorDownBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorDownBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorDownBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorDownBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorDownBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorDownBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorLeftBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorLeftBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorLeftBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorLeftBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorLeftBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorLeftBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_MoveCursorRightBlock(_swigobj,_swigarg0) (_swigobj->MoveCursorRightBlock(_swigarg0)) +static PyObject *_wrap_wxGrid_MoveCursorRightBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","expandSelection", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_MoveCursorRightBlock",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_MoveCursorRightBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_MoveCursorRightBlock(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultRowLabelSize(_swigobj) (_swigobj->GetDefaultRowLabelSize()) +static PyObject *_wrap_wxGrid_GetDefaultRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRowLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRowLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultRowLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetRowLabelSize(_swigobj) (_swigobj->GetRowLabelSize()) +static PyObject *_wrap_wxGrid_GetRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetRowLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetRowLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultColLabelSize(_swigobj) (_swigobj->GetDefaultColLabelSize()) +static PyObject *_wrap_wxGrid_GetDefaultColLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultColLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultColLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultColLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetColLabelSize(_swigobj) (_swigobj->GetColLabelSize()) +static PyObject *_wrap_wxGrid_GetColLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetColLabelSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetColLabelSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetLabelBackgroundColour(_swigobj) (_swigobj->GetLabelBackgroundColour()) +static PyObject *_wrap_wxGrid_GetLabelBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetLabelBackgroundColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetLabelTextColour(_swigobj) (_swigobj->GetLabelTextColour()) +static PyObject *_wrap_wxGrid_GetLabelTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetLabelTextColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetLabelFont(_swigobj) (_swigobj->GetLabelFont()) +static PyObject *_wrap_wxGrid_GetLabelFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetLabelFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetLabelFont. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxGrid_GetLabelFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetRowLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRowLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetRowLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetRowLabelAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetRowLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGrid_GetColLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetColLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetColLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetColLabelAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetColLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxGrid_GetRowLabelValue(_swigobj,_swigarg0) (_swigobj->GetRowLabelValue(_swigarg0)) +static PyObject *_wrap_wxGrid_GetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetRowLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGrid_GetRowLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetColLabelValue(_swigobj,_swigarg0) (_swigobj->GetColLabelValue(_swigarg0)) +static PyObject *_wrap_wxGrid_GetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetColLabelValue",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGrid_GetColLabelValue(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetGridLineColour(_swigobj) (_swigobj->GetGridLineColour()) +static PyObject *_wrap_wxGrid_GetGridLineColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetGridLineColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetGridLineColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetGridLineColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellHighlightColour(_swigobj) (_swigobj->GetCellHighlightColour()) +static PyObject *_wrap_wxGrid_GetCellHighlightColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetCellHighlightColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellHighlightColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetCellHighlightColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_SetRowLabelSize(_swigobj,_swigarg0) (_swigobj->SetRowLabelSize(_swigarg0)) +static PyObject *_wrap_wxGrid_SetRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetRowLabelSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowLabelSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColLabelSize(_swigobj,_swigarg0) (_swigobj->SetColLabelSize(_swigarg0)) +static PyObject *_wrap_wxGrid_SetColLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetColLabelSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColLabelSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetLabelBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetLabelBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetLabelBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetLabelBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetLabelTextColour(_swigobj,_swigarg0) (_swigobj->SetLabelTextColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetLabelTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetLabelTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetLabelFont(_swigobj,_swigarg0) (_swigobj->SetLabelFont(_swigarg0)) +static PyObject *_wrap_wxGrid_SetLabelFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetLabelFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetLabelFont. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetLabelFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetRowLabelAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColLabelAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColLabelAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColLabelAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetColLabelAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColLabelAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColLabelAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","row","arg3", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetRowLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_SetColLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColLabelValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","arg3", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetColLabelValue",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColLabelValue. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColLabelValue(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_SetGridLineColour(_swigobj,_swigarg0) (_swigobj->SetGridLineColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetGridLineColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetGridLineColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetGridLineColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetGridLineColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellHighlightColour(_swigobj,_swigarg0) (_swigobj->SetCellHighlightColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetCellHighlightColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetCellHighlightColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellHighlightColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellHighlightColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_EnableDragRowSize(_swigobj,_swigarg0) (_swigobj->EnableDragRowSize(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableDragRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableDragRowSize",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableDragRowSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableDragRowSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableDragRowSize(_swigobj) (_swigobj->DisableDragRowSize()) +static PyObject *_wrap_wxGrid_DisableDragRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableDragRowSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableDragRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableDragRowSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanDragRowSize(_swigobj) (_swigobj->CanDragRowSize()) +static PyObject *_wrap_wxGrid_CanDragRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanDragRowSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanDragRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanDragRowSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_EnableDragColSize(_swigobj,_swigarg0) (_swigobj->EnableDragColSize(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableDragColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableDragColSize",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableDragColSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableDragColSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableDragColSize(_swigobj) (_swigobj->DisableDragColSize()) +static PyObject *_wrap_wxGrid_DisableDragColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableDragColSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableDragColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableDragColSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanDragColSize(_swigobj) (_swigobj->CanDragColSize()) +static PyObject *_wrap_wxGrid_CanDragColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanDragColSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanDragColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanDragColSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_EnableDragGridSize(_swigobj,_swigarg0) (_swigobj->EnableDragGridSize(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableDragGridSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableDragGridSize",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableDragGridSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableDragGridSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DisableDragGridSize(_swigobj) (_swigobj->DisableDragGridSize()) +static PyObject *_wrap_wxGrid_DisableDragGridSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_DisableDragGridSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DisableDragGridSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_DisableDragGridSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_CanDragGridSize(_swigobj) (_swigobj->CanDragGridSize()) +static PyObject *_wrap_wxGrid_CanDragGridSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_CanDragGridSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_CanDragGridSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_CanDragGridSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetRowAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","row","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetRowAttr",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowAttr. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_SetRowAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColAttr(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColAttr(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxGridCellAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","col","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetColAttr",_kwnames,&_argo0,&_arg1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColAttr. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_SetColAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColAttr(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatBool(_swigobj,_swigarg0) (_swigobj->SetColFormatBool(_swigarg0)) +static PyObject *_wrap_wxGrid_SetColFormatBool(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetColFormatBool",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatBool. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatBool(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatNumber(_swigobj,_swigarg0) (_swigobj->SetColFormatNumber(_swigarg0)) +static PyObject *_wrap_wxGrid_SetColFormatNumber(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetColFormatNumber",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatNumber. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatNumber(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatFloat(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetColFormatFloat(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetColFormatFloat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2 = (int ) -1; + int _arg3 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col","width","precision", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxGrid_SetColFormatFloat",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatFloat. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatFloat(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColFormatCustom(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColFormatCustom(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColFormatCustom(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","col","typeName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxGrid_SetColFormatCustom",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColFormatCustom. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColFormatCustom(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxGrid_EnableGridLines(_swigobj,_swigarg0) (_swigobj->EnableGridLines(_swigarg0)) +static PyObject *_wrap_wxGrid_EnableGridLines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_EnableGridLines",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_EnableGridLines. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_EnableGridLines(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GridLinesEnabled(_swigobj) (_swigobj->GridLinesEnabled()) +static PyObject *_wrap_wxGrid_GridLinesEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GridLinesEnabled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GridLinesEnabled. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_GridLinesEnabled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultRowSize(_swigobj) (_swigobj->GetDefaultRowSize()) +static PyObject *_wrap_wxGrid_GetDefaultRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRowSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultRowSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetRowSize(_swigobj,_swigarg0) (_swigobj->GetRowSize(_swigarg0)) +static PyObject *_wrap_wxGrid_GetRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetRowSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetRowSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultColSize(_swigobj) (_swigobj->GetDefaultColSize()) +static PyObject *_wrap_wxGrid_GetDefaultColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultColSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetDefaultColSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetColSize(_swigobj,_swigarg0) (_swigobj->GetColSize(_swigarg0)) +static PyObject *_wrap_wxGrid_GetColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_GetColSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGrid_GetColSize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_GetDefaultCellBackgroundColour(_swigobj) (_swigobj->GetDefaultCellBackgroundColour()) +static PyObject *_wrap_wxGrid_GetDefaultCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultCellBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetDefaultCellBackgroundColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellBackgroundColour(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellBackgroundColour",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetCellBackgroundColour(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetDefaultCellTextColour(_swigobj) (_swigobj->GetDefaultCellTextColour()) +static PyObject *_wrap_wxGrid_GetDefaultCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultCellTextColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetDefaultCellTextColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellTextColour(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellTextColour",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetCellTextColour(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetDefaultCellFont(_swigobj) (_swigobj->GetDefaultCellFont()) +static PyObject *_wrap_wxGrid_GetDefaultCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultCellFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellFont. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxGrid_GetDefaultCellFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetCellFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellFont(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellFont",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellFont. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxGrid_GetCellFont(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetDefaultCellAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDefaultCellAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetDefaultCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int * _arg1; + int * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_GetDefaultCellAlignment",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_GetDefaultCellAlignment. Expected _int_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_GetDefaultCellAlignment. Expected _int_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetDefaultCellAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetCellAlignment(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetCellAlignment(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxGrid_GetCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + int * _arg3; + int * _arg4; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + PyObject * _argo4 = 0; + char *_kwnames[] = { "self","row","col","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO:wxGrid_GetCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_argo4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_GetCellAlignment. Expected _int_p."); + return NULL; + } + } + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_int_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGrid_GetCellAlignment. Expected _int_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_GetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultRowSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDefaultRowSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetDefaultRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","height","resizeExistingRows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SetDefaultRowSize",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultRowSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultRowSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetRowSize",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultColSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDefaultColSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetDefaultColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","width","resizeExistingCols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SetDefaultColSize",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultColSize. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultColSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetColSize",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColSize(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeColumn(_swigobj,_swigarg0,_swigarg1) (_swigobj->AutoSizeColumn(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AutoSizeColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","col","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_AutoSizeColumn",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeColumn. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeColumn(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeRow(_swigobj,_swigarg0,_swigarg1) (_swigobj->AutoSizeRow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_AutoSizeRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","row","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_AutoSizeRow",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeRow. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeRow(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeColumns(_swigobj,_swigarg0) (_swigobj->AutoSizeColumns(_swigarg0)) +static PyObject *_wrap_wxGrid_AutoSizeColumns(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_AutoSizeColumns",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeColumns. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeColumns(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeRows(_swigobj,_swigarg0) (_swigobj->AutoSizeRows(_swigarg0)) +static PyObject *_wrap_wxGrid_AutoSizeRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","setAsMin", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGrid_AutoSizeRows",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeRows. Expected _wxGrid_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSizeRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSize(_swigobj) (_swigobj->AutoSize()) +static PyObject *_wrap_wxGrid_AutoSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_AutoSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_AutoSize(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetColMinimalWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColMinimalWidth(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetColMinimalWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetColMinimalWidth",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColMinimalWidth. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetColMinimalWidth(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetRowMinimalHeight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowMinimalHeight(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetRowMinimalHeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","width", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetRowMinimalHeight",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetRowMinimalHeight. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetRowMinimalHeight(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetDefaultCellBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultCellBackgroundColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellBackgroundColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellBackgroundColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellBackgroundColour(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxColour * _arg3; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","arg4", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellBackgroundColour",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellBackgroundColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg3 = &temp; + if (! wxColour_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellBackgroundColour(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellTextColour(_swigobj,_swigarg0) (_swigobj->SetDefaultCellTextColour(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultCellTextColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellTextColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellTextColour(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellTextColour(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxColour * _arg3; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","arg4", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellTextColour",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellTextColour. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg3 = &temp; + if (! wxColour_helper(_obj3, &_arg3)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellTextColour(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellFont(_swigobj,_swigarg0) (_swigobj->SetDefaultCellFont(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","arg2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultCellFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellFont. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefaultCellFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellFont(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellFont(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellFont(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxFont * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","arg4", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellFont",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellFont. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_SetCellFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellFont(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultCellAlignment(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDefaultCellAlignment(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetDefaultCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetDefaultCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultCellAlignment(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellAlignment(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetCellAlignment(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxGrid_SetCellAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col","horiz","vert", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxGrid_SetCellAlignment",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellAlignment. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellAlignment(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetDefaultRenderer(_swigobj,_swigarg0) (_swigobj->SetDefaultRenderer(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxGridCellRenderer * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","renderer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultRenderer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultRenderer. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefaultRenderer. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultRenderer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellRenderer(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellRenderer(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxGridCellRenderer * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","renderer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellRenderer",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellRenderer. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_SetCellRenderer. Expected _wxGridCellRenderer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellRenderer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetDefaultRenderer(_swigobj) (_swigobj->GetDefaultRenderer()) +static PyObject *_wrap_wxGrid_GetDefaultRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRenderer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRenderer. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRenderer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetCellRenderer(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellRenderer(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellRenderer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellRenderer",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellRenderer. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetCellRenderer(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_SetDefaultEditor(_swigobj,_swigarg0) (_swigobj->SetDefaultEditor(_swigarg0)) +static PyObject *_wrap_wxGrid_SetDefaultEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxGridCellEditor * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetDefaultEditor",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetDefaultEditor. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefaultEditor. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetDefaultEditor(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetCellEditor(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellEditor(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxGridCellEditor * _arg3; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","row","col","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellEditor",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellEditor. Expected _wxGrid_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_SetCellEditor. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellEditor(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_GetDefaultEditor(_swigobj) (_swigobj->GetDefaultEditor()) +static PyObject *_wrap_wxGrid_GetDefaultEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultEditor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultEditor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditor(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetCellEditor(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellEditor(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellEditor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellEditor",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellEditor. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetCellEditor(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetCellValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetCellValue(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellValue",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetCellValue. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGrid_GetCellValue(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_SetCellValue(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetCellValue(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetCellValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + wxString * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","row","col","s", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO:wxGrid_SetCellValue",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetCellValue. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetCellValue(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxGrid_IsReadOnly(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsReadOnly(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_IsReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_IsReadOnly",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsReadOnly. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsReadOnly(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_SetReadOnly(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetReadOnly(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_SetReadOnly(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","row","col","isReadOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxGrid_SetReadOnly",_kwnames,&_argo0,&_arg1,&_arg2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetReadOnly. Expected _wxGrid_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetReadOnly(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectRow(_swigobj,_swigarg0,_swigarg1) (_swigobj->SelectRow(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SelectRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","row","addToSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SelectRow",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectRow. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectRow(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectCol(_swigobj,_swigarg0,_swigarg1) (_swigobj->SelectCol(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SelectCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","col","addToSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxGrid_SelectCol",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectCol. Expected _wxGrid_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectCol(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectBlock(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->SelectBlock(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxGrid_SelectBlock(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4; + bool _arg5 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool5 = (int) FALSE; + char *_kwnames[] = { "self","topRow","leftCol","bottomRow","rightCol","addToSelected", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|i:wxGrid_SelectBlock",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectBlock. Expected _wxGrid_p."); + return NULL; + } + } + _arg5 = (bool ) tempbool5; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectBlock(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SelectAll(_swigobj) (_swigobj->SelectAll()) +static PyObject *_wrap_wxGrid_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_SelectAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SelectAll. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SelectAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_IsSelection(_swigobj) (_swigobj->IsSelection()) +static PyObject *_wrap_wxGrid_IsSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_IsSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsSelection. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsSelection(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_ClearSelection(_swigobj) (_swigobj->ClearSelection()) +static PyObject *_wrap_wxGrid_ClearSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_ClearSelection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ClearSelection. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_ClearSelection(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_IsInSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsInSelection(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_IsInSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_IsInSelection",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_IsInSelection. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGrid_IsInSelection(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGrid_BlockToDeviceRect(_swigobj,_swigarg0,_swigarg1) (_swigobj->BlockToDeviceRect(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_BlockToDeviceRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxGrid * _arg0; + wxGridCellCoords * _arg1; + wxGridCellCoords * _arg2; + PyObject * _argo0 = 0; + wxGridCellCoords temp; + PyObject * _obj1 = 0; + wxGridCellCoords temp0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","topLeft","bottomRight", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxGrid_BlockToDeviceRect",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_BlockToDeviceRect. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxGridCellCoords_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxGridCellCoords_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxGrid_BlockToDeviceRect(_arg0,*_arg1,*_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetSelectionBackground(_swigobj) (_swigobj->GetSelectionBackground()) +static PyObject *_wrap_wxGrid_GetSelectionBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectionBackground",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectionBackground. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetSelectionBackground(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_GetSelectionForeground(_swigobj) (_swigobj->GetSelectionForeground()) +static PyObject *_wrap_wxGrid_GetSelectionForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectionForeground",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectionForeground. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxGrid_GetSelectionForeground(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGrid_SetSelectionBackground(_swigobj,_swigarg0) (_swigobj->SetSelectionBackground(_swigarg0)) +static PyObject *_wrap_wxGrid_SetSelectionBackground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","c", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetSelectionBackground",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetSelectionBackground. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetSelectionBackground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_SetSelectionForeground(_swigobj,_swigarg0) (_swigobj->SetSelectionForeground(_swigarg0)) +static PyObject *_wrap_wxGrid_SetSelectionForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","c", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_SetSelectionForeground",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetSelectionForeground. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetSelectionForeground(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_RegisterDataType(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->RegisterDataType(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxGrid_RegisterDataType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + wxString * _arg1; + wxGridCellRenderer * _arg2; + wxGridCellEditor * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","typeName","renderer","editor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxGrid_RegisterDataType",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_RegisterDataType. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellRenderer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGrid_RegisterDataType. Expected _wxGridCellRenderer_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_RegisterDataType. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_RegisterDataType(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_GetDefaultEditorForCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDefaultEditorForCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetDefaultEditorForCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetDefaultEditorForCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultEditorForCell. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetDefaultRendererForCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDefaultRendererForCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_GetDefaultRendererForCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetDefaultRendererForCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRendererForCell. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForCell(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGrid_GetDefaultEditorForType(_swigobj,_swigarg0) (_swigobj->GetDefaultEditorForType(_swigarg0)) +static PyObject *_wrap_wxGrid_GetDefaultEditorForType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _result; + wxGrid * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","typeName", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_GetDefaultEditorForType",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultEditorForType. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellEditor *)wxGrid_GetDefaultEditorForType(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_GetDefaultRendererForType(_swigobj,_swigarg0) (_swigobj->GetDefaultRendererForType(_swigarg0)) +static PyObject *_wrap_wxGrid_GetDefaultRendererForType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellRenderer * _result; + wxGrid * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","typeName", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_GetDefaultRendererForType",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetDefaultRendererForType. Expected _wxGrid_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridCellRenderer *)wxGrid_GetDefaultRendererForType(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGrid_SetMargins(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMargins(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_SetMargins(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","extraWidth","extraHeight", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_SetMargins",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetMargins. Expected _wxGrid_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGrid_SetMargins(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxGridEventTowxNotifyEvent(void *ptr) { + wxGridEvent *src; + wxNotifyEvent *dest; + src = (wxGridEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridEventTowxCommandEvent(void *ptr) { + wxGridEvent *src; + wxCommandEvent *dest; + src = (wxGridEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridEventTowxEvent(void *ptr) { + wxGridEvent *src; + wxEvent *dest; + src = (wxGridEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxGridEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10,_swigarg11) (new wxGridEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9,_swigarg10,_swigarg11)) +static PyObject *_wrap_new_wxGridEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridEvent * _result; + int _arg0; + wxEventType _arg1; + wxGrid * _arg2; + int _arg3 = (int ) -1; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + int _arg6 = (int ) -1; + bool _arg7 = (bool ) TRUE; + bool _arg8 = (bool ) FALSE; + bool _arg9 = (bool ) FALSE; + bool _arg10 = (bool ) FALSE; + bool _arg11 = (bool ) FALSE; + PyObject * _argo2 = 0; + int tempbool7 = (int) TRUE; + int tempbool8 = (int) FALSE; + int tempbool9 = (int) FALSE; + int tempbool10 = (int) FALSE; + int tempbool11 = (int) FALSE; + char *_kwnames[] = { "id","type","obj","row","col","x","y","sel","control","shift","alt","meta", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiO|iiiiiiiii:new_wxGridEvent",_kwnames,&_arg0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_arg6,&tempbool7,&tempbool8,&tempbool9,&tempbool10,&tempbool11)) + return NULL; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGridEvent. Expected _wxGrid_p."); + return NULL; + } + } + _arg7 = (bool ) tempbool7; + _arg8 = (bool ) tempbool8; + _arg9 = (bool ) tempbool9; + _arg10 = (bool ) tempbool10; + _arg11 = (bool ) tempbool11; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridEvent *)new_wxGridEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9,_arg10,_arg11); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridEvent_GetRow(_swigobj) (_swigobj->GetRow()) +static PyObject *_wrap_wxGridEvent_GetRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetRow. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridEvent_GetRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_GetCol(_swigobj) (_swigobj->GetCol()) +static PyObject *_wrap_wxGridEvent_GetCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetCol. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridEvent_GetCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxGridEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_GetPosition. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxGridEvent_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridEvent_Selecting(_swigobj) (_swigobj->Selecting()) +static PyObject *_wrap_wxGridEvent_Selecting(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_Selecting",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_Selecting. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_Selecting(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxGridEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ControlDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxGridEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_MetaDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxGridEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_ShiftDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxGridEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridEvent_AltDown. Expected _wxGridEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxGridSizeEventTowxNotifyEvent(void *ptr) { + wxGridSizeEvent *src; + wxNotifyEvent *dest; + src = (wxGridSizeEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridSizeEventTowxCommandEvent(void *ptr) { + wxGridSizeEvent *src; + wxCommandEvent *dest; + src = (wxGridSizeEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridSizeEventTowxEvent(void *ptr) { + wxGridSizeEvent *src; + wxEvent *dest; + src = (wxGridSizeEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxGridSizeEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxGridSizeEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_new_wxGridSizeEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizeEvent * _result; + int _arg0; + wxEventType _arg1; + wxGrid * _arg2; + int _arg3 = (int ) -1; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + bool _arg6 = (bool ) FALSE; + bool _arg7 = (bool ) FALSE; + bool _arg8 = (bool ) FALSE; + bool _arg9 = (bool ) FALSE; + PyObject * _argo2 = 0; + int tempbool6 = (int) FALSE; + int tempbool7 = (int) FALSE; + int tempbool8 = (int) FALSE; + int tempbool9 = (int) FALSE; + char *_kwnames[] = { "id","type","obj","rowOrCol","x","y","control","shift","alt","meta", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiO|iiiiiii:new_wxGridSizeEvent",_kwnames,&_arg0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&tempbool6,&tempbool7,&tempbool8,&tempbool9)) + return NULL; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGridSizeEvent. Expected _wxGrid_p."); + return NULL; + } + } + _arg6 = (bool ) tempbool6; + _arg7 = (bool ) tempbool7; + _arg8 = (bool ) tempbool8; + _arg9 = (bool ) tempbool9; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridSizeEvent *)new_wxGridSizeEvent(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridSizeEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridSizeEvent_GetRowOrCol(_swigobj) (_swigobj->GetRowOrCol()) +static PyObject *_wrap_wxGridSizeEvent_GetRowOrCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_GetRowOrCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_GetRowOrCol. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizeEvent_GetRowOrCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxGridSizeEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_GetPosition. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxGridSizeEvent_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridSizeEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxGridSizeEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_ControlDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxGridSizeEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_MetaDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxGridSizeEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_ShiftDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizeEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxGridSizeEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizeEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizeEvent_AltDown. Expected _wxGridSizeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridSizeEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxGridRangeSelectEventTowxNotifyEvent(void *ptr) { + wxGridRangeSelectEvent *src; + wxNotifyEvent *dest; + src = (wxGridRangeSelectEvent *) ptr; + dest = (wxNotifyEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridRangeSelectEventTowxCommandEvent(void *ptr) { + wxGridRangeSelectEvent *src; + wxCommandEvent *dest; + src = (wxGridRangeSelectEvent *) ptr; + dest = (wxCommandEvent *) src; + return (void *) dest; +} + +static void *SwigwxGridRangeSelectEventTowxEvent(void *ptr) { + wxGridRangeSelectEvent *src; + wxEvent *dest; + src = (wxGridRangeSelectEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxGridRangeSelectEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9) (new wxGridRangeSelectEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8,_swigarg9)) +static PyObject *_wrap_new_wxGridRangeSelectEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridRangeSelectEvent * _result; + int _arg0; + wxEventType _arg1; + wxGrid * _arg2; + wxGridCellCoords * _arg3; + wxGridCellCoords * _arg4; + bool _arg5 = (bool ) TRUE; + bool _arg6 = (bool ) FALSE; + bool _arg7 = (bool ) FALSE; + bool _arg8 = (bool ) FALSE; + bool _arg9 = (bool ) FALSE; + PyObject * _argo2 = 0; + wxGridCellCoords temp; + PyObject * _obj3 = 0; + wxGridCellCoords temp0; + PyObject * _obj4 = 0; + int tempbool5 = (int) TRUE; + int tempbool6 = (int) FALSE; + int tempbool7 = (int) FALSE; + int tempbool8 = (int) FALSE; + int tempbool9 = (int) FALSE; + char *_kwnames[] = { "id","type","obj","topLeft","bottomRight","sel","control","shift","alt","meta", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiOOO|iiiii:new_wxGridRangeSelectEvent",_kwnames,&_arg0,&_arg1,&_argo2,&_obj3,&_obj4,&tempbool5,&tempbool6,&tempbool7,&tempbool8,&tempbool9)) + return NULL; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGridRangeSelectEvent. Expected _wxGrid_p."); + return NULL; + } + } +{ + _arg3 = &temp; + if (! wxGridCellCoords_helper(_obj3, &_arg3)) + return NULL; +} +{ + _arg4 = &temp0; + if (! wxGridCellCoords_helper(_obj4, &_arg4)) + return NULL; +} + _arg5 = (bool ) tempbool5; + _arg6 = (bool ) tempbool6; + _arg7 = (bool ) tempbool7; + _arg8 = (bool ) tempbool8; + _arg9 = (bool ) tempbool9; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridRangeSelectEvent *)new_wxGridRangeSelectEvent(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridRangeSelectEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetTopLeftCoords(_swigobj) (_swigobj->GetTopLeftCoords()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetTopLeftCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetTopLeftCoords",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetTopLeftCoords. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetTopLeftCoords(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetBottomRightCoords(_swigobj) (_swigobj->GetBottomRightCoords()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRightCoords(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoords * _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetBottomRightCoords",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetBottomRightCoords. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxGridCellCoords (wxGridRangeSelectEvent_GetBottomRightCoords(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxGridCellCoords_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetTopRow(_swigobj) (_swigobj->GetTopRow()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetTopRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetTopRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetTopRow. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetTopRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetBottomRow(_swigobj) (_swigobj->GetBottomRow()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetBottomRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetBottomRow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetBottomRow. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetBottomRow(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetLeftCol(_swigobj) (_swigobj->GetLeftCol()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetLeftCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetLeftCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetLeftCol. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetLeftCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_GetRightCol(_swigobj) (_swigobj->GetRightCol()) +static PyObject *_wrap_wxGridRangeSelectEvent_GetRightCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_GetRightCol",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_GetRightCol. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridRangeSelectEvent_GetRightCol(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_Selecting(_swigobj) (_swigobj->Selecting()) +static PyObject *_wrap_wxGridRangeSelectEvent_Selecting(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_Selecting",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_Selecting. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_Selecting(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_ControlDown(_swigobj) (_swigobj->ControlDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_ControlDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_ControlDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_ControlDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_ControlDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_MetaDown(_swigobj) (_swigobj->MetaDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_MetaDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_MetaDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_MetaDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_MetaDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_ShiftDown(_swigobj) (_swigobj->ShiftDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_ShiftDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_ShiftDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_ShiftDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_ShiftDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridRangeSelectEvent_AltDown(_swigobj) (_swigobj->AltDown()) +static PyObject *_wrap_wxGridRangeSelectEvent_AltDown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridRangeSelectEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridRangeSelectEvent_AltDown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridRangeSelectEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridRangeSelectEvent_AltDown. Expected _wxGridRangeSelectEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxGridRangeSelectEvent_AltDown(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyMethodDef gridcMethods[] = { + { "wxGridRangeSelectEvent_AltDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_ShiftDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_MetaDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_ControlDown", (PyCFunction) _wrap_wxGridRangeSelectEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_Selecting", (PyCFunction) _wrap_wxGridRangeSelectEvent_Selecting, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetRightCol", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetRightCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetLeftCol", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetLeftCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetBottomRow", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetBottomRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetTopRow", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetTopRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetBottomRightCoords", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetBottomRightCoords, METH_VARARGS | METH_KEYWORDS }, + { "wxGridRangeSelectEvent_GetTopLeftCoords", (PyCFunction) _wrap_wxGridRangeSelectEvent_GetTopLeftCoords, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridRangeSelectEvent", (PyCFunction) _wrap_new_wxGridRangeSelectEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_AltDown", (PyCFunction) _wrap_wxGridSizeEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_ShiftDown", (PyCFunction) _wrap_wxGridSizeEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_MetaDown", (PyCFunction) _wrap_wxGridSizeEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_ControlDown", (PyCFunction) _wrap_wxGridSizeEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_GetPosition", (PyCFunction) _wrap_wxGridSizeEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizeEvent_GetRowOrCol", (PyCFunction) _wrap_wxGridSizeEvent_GetRowOrCol, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridSizeEvent", (PyCFunction) _wrap_new_wxGridSizeEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_AltDown", (PyCFunction) _wrap_wxGridEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_ShiftDown", (PyCFunction) _wrap_wxGridEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_MetaDown", (PyCFunction) _wrap_wxGridEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_ControlDown", (PyCFunction) _wrap_wxGridEvent_ControlDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_Selecting", (PyCFunction) _wrap_wxGridEvent_Selecting, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_GetPosition", (PyCFunction) _wrap_wxGridEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_GetCol", (PyCFunction) _wrap_wxGridEvent_GetCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridEvent_GetRow", (PyCFunction) _wrap_wxGridEvent_GetRow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridEvent", (PyCFunction) _wrap_new_wxGridEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetMargins", (PyCFunction) _wrap_wxGrid_SetMargins, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRendererForType", (PyCFunction) _wrap_wxGrid_GetDefaultRendererForType, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultEditorForType", (PyCFunction) _wrap_wxGrid_GetDefaultEditorForType, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRendererForCell", (PyCFunction) _wrap_wxGrid_GetDefaultRendererForCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultEditorForCell", (PyCFunction) _wrap_wxGrid_GetDefaultEditorForCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_RegisterDataType", (PyCFunction) _wrap_wxGrid_RegisterDataType, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetSelectionForeground", (PyCFunction) _wrap_wxGrid_SetSelectionForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetSelectionBackground", (PyCFunction) _wrap_wxGrid_SetSelectionBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectionForeground", (PyCFunction) _wrap_wxGrid_GetSelectionForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectionBackground", (PyCFunction) _wrap_wxGrid_GetSelectionBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_BlockToDeviceRect", (PyCFunction) _wrap_wxGrid_BlockToDeviceRect, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsInSelection", (PyCFunction) _wrap_wxGrid_IsInSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ClearSelection", (PyCFunction) _wrap_wxGrid_ClearSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsSelection", (PyCFunction) _wrap_wxGrid_IsSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectAll", (PyCFunction) _wrap_wxGrid_SelectAll, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectBlock", (PyCFunction) _wrap_wxGrid_SelectBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectCol", (PyCFunction) _wrap_wxGrid_SelectCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SelectRow", (PyCFunction) _wrap_wxGrid_SelectRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetReadOnly", (PyCFunction) _wrap_wxGrid_SetReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsReadOnly", (PyCFunction) _wrap_wxGrid_IsReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellValue", (PyCFunction) _wrap_wxGrid_SetCellValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellValue", (PyCFunction) _wrap_wxGrid_GetCellValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellEditor", (PyCFunction) _wrap_wxGrid_GetCellEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultEditor", (PyCFunction) _wrap_wxGrid_GetDefaultEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellEditor", (PyCFunction) _wrap_wxGrid_SetCellEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultEditor", (PyCFunction) _wrap_wxGrid_SetDefaultEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellRenderer", (PyCFunction) _wrap_wxGrid_GetCellRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRenderer", (PyCFunction) _wrap_wxGrid_GetDefaultRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellRenderer", (PyCFunction) _wrap_wxGrid_SetCellRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultRenderer", (PyCFunction) _wrap_wxGrid_SetDefaultRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellAlignment", (PyCFunction) _wrap_wxGrid_SetCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellAlignment", (PyCFunction) _wrap_wxGrid_SetDefaultCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellFont", (PyCFunction) _wrap_wxGrid_SetCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellFont", (PyCFunction) _wrap_wxGrid_SetDefaultCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellTextColour", (PyCFunction) _wrap_wxGrid_SetCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellTextColour", (PyCFunction) _wrap_wxGrid_SetDefaultCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellBackgroundColour", (PyCFunction) _wrap_wxGrid_SetCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultCellBackgroundColour", (PyCFunction) _wrap_wxGrid_SetDefaultCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowMinimalHeight", (PyCFunction) _wrap_wxGrid_SetRowMinimalHeight, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColMinimalWidth", (PyCFunction) _wrap_wxGrid_SetColMinimalWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSize", (PyCFunction) _wrap_wxGrid_AutoSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeRows", (PyCFunction) _wrap_wxGrid_AutoSizeRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeColumns", (PyCFunction) _wrap_wxGrid_AutoSizeColumns, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeRow", (PyCFunction) _wrap_wxGrid_AutoSizeRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeColumn", (PyCFunction) _wrap_wxGrid_AutoSizeColumn, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColSize", (PyCFunction) _wrap_wxGrid_SetColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultColSize", (PyCFunction) _wrap_wxGrid_SetDefaultColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowSize", (PyCFunction) _wrap_wxGrid_SetRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetDefaultRowSize", (PyCFunction) _wrap_wxGrid_SetDefaultRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellAlignment", (PyCFunction) _wrap_wxGrid_GetCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellAlignment", (PyCFunction) _wrap_wxGrid_GetDefaultCellAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellFont", (PyCFunction) _wrap_wxGrid_GetCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellFont", (PyCFunction) _wrap_wxGrid_GetDefaultCellFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellTextColour", (PyCFunction) _wrap_wxGrid_GetCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellTextColour", (PyCFunction) _wrap_wxGrid_GetDefaultCellTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellBackgroundColour", (PyCFunction) _wrap_wxGrid_GetCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultCellBackgroundColour", (PyCFunction) _wrap_wxGrid_GetDefaultCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColSize", (PyCFunction) _wrap_wxGrid_GetColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultColSize", (PyCFunction) _wrap_wxGrid_GetDefaultColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowSize", (PyCFunction) _wrap_wxGrid_GetRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRowSize", (PyCFunction) _wrap_wxGrid_GetDefaultRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GridLinesEnabled", (PyCFunction) _wrap_wxGrid_GridLinesEnabled, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableGridLines", (PyCFunction) _wrap_wxGrid_EnableGridLines, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatCustom", (PyCFunction) _wrap_wxGrid_SetColFormatCustom, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatFloat", (PyCFunction) _wrap_wxGrid_SetColFormatFloat, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatNumber", (PyCFunction) _wrap_wxGrid_SetColFormatNumber, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColFormatBool", (PyCFunction) _wrap_wxGrid_SetColFormatBool, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColAttr", (PyCFunction) _wrap_wxGrid_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowAttr", (PyCFunction) _wrap_wxGrid_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanDragGridSize", (PyCFunction) _wrap_wxGrid_CanDragGridSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableDragGridSize", (PyCFunction) _wrap_wxGrid_DisableDragGridSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableDragGridSize", (PyCFunction) _wrap_wxGrid_EnableDragGridSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanDragColSize", (PyCFunction) _wrap_wxGrid_CanDragColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableDragColSize", (PyCFunction) _wrap_wxGrid_DisableDragColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableDragColSize", (PyCFunction) _wrap_wxGrid_EnableDragColSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanDragRowSize", (PyCFunction) _wrap_wxGrid_CanDragRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableDragRowSize", (PyCFunction) _wrap_wxGrid_DisableDragRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableDragRowSize", (PyCFunction) _wrap_wxGrid_EnableDragRowSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetCellHighlightColour", (PyCFunction) _wrap_wxGrid_SetCellHighlightColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetGridLineColour", (PyCFunction) _wrap_wxGrid_SetGridLineColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColLabelValue", (PyCFunction) _wrap_wxGrid_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowLabelValue", (PyCFunction) _wrap_wxGrid_SetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColLabelAlignment", (PyCFunction) _wrap_wxGrid_SetColLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowLabelAlignment", (PyCFunction) _wrap_wxGrid_SetRowLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetLabelFont", (PyCFunction) _wrap_wxGrid_SetLabelFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetLabelTextColour", (PyCFunction) _wrap_wxGrid_SetLabelTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetLabelBackgroundColour", (PyCFunction) _wrap_wxGrid_SetLabelBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColLabelSize", (PyCFunction) _wrap_wxGrid_SetColLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetRowLabelSize", (PyCFunction) _wrap_wxGrid_SetRowLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetCellHighlightColour", (PyCFunction) _wrap_wxGrid_GetCellHighlightColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridLineColour", (PyCFunction) _wrap_wxGrid_GetGridLineColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColLabelValue", (PyCFunction) _wrap_wxGrid_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowLabelValue", (PyCFunction) _wrap_wxGrid_GetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColLabelAlignment", (PyCFunction) _wrap_wxGrid_GetColLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowLabelAlignment", (PyCFunction) _wrap_wxGrid_GetRowLabelAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetLabelFont", (PyCFunction) _wrap_wxGrid_GetLabelFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetLabelTextColour", (PyCFunction) _wrap_wxGrid_GetLabelTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetLabelBackgroundColour", (PyCFunction) _wrap_wxGrid_GetLabelBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColLabelSize", (PyCFunction) _wrap_wxGrid_GetColLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultColLabelSize", (PyCFunction) _wrap_wxGrid_GetDefaultColLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetRowLabelSize", (PyCFunction) _wrap_wxGrid_GetRowLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetDefaultRowLabelSize", (PyCFunction) _wrap_wxGrid_GetDefaultRowLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorRightBlock", (PyCFunction) _wrap_wxGrid_MoveCursorRightBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorLeftBlock", (PyCFunction) _wrap_wxGrid_MoveCursorLeftBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorDownBlock", (PyCFunction) _wrap_wxGrid_MoveCursorDownBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorUpBlock", (PyCFunction) _wrap_wxGrid_MoveCursorUpBlock, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MovePageUp", (PyCFunction) _wrap_wxGrid_MovePageUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MovePageDown", (PyCFunction) _wrap_wxGrid_MovePageDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorRight", (PyCFunction) _wrap_wxGrid_MoveCursorRight, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorLeft", (PyCFunction) _wrap_wxGrid_MoveCursorLeft, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorDown", (PyCFunction) _wrap_wxGrid_MoveCursorDown, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MoveCursorUp", (PyCFunction) _wrap_wxGrid_MoveCursorUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetGridCursor", (PyCFunction) _wrap_wxGrid_SetGridCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_MakeCellVisible", (PyCFunction) _wrap_wxGrid_MakeCellVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsVisible", (PyCFunction) _wrap_wxGrid_IsVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridCursorCol", (PyCFunction) _wrap_wxGrid_GetGridCursorCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetGridCursorRow", (PyCFunction) _wrap_wxGrid_GetGridCursorRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CellToRect", (PyCFunction) _wrap_wxGrid_CellToRect, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_XToEdgeOfCol", (PyCFunction) _wrap_wxGrid_XToEdgeOfCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_YToEdgeOfRow", (PyCFunction) _wrap_wxGrid_YToEdgeOfRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_XToCol", (PyCFunction) _wrap_wxGrid_XToCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_YToRow", (PyCFunction) _wrap_wxGrid_YToRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_XYToCell", (PyCFunction) _wrap_wxGrid_XYToCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SaveEditControlValue", (PyCFunction) _wrap_wxGrid_SaveEditControlValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_HideCellEditControl", (PyCFunction) _wrap_wxGrid_HideCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ShowCellEditControl", (PyCFunction) _wrap_wxGrid_ShowCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsCurrentCellReadOnly", (PyCFunction) _wrap_wxGrid_IsCurrentCellReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsCellEditControlShown", (PyCFunction) _wrap_wxGrid_IsCellEditControlShown, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsCellEditControlEnabled", (PyCFunction) _wrap_wxGrid_IsCellEditControlEnabled, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CanEnableCellControl", (PyCFunction) _wrap_wxGrid_CanEnableCellControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DisableCellEditControl", (PyCFunction) _wrap_wxGrid_DisableCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableCellEditControl", (PyCFunction) _wrap_wxGrid_EnableCellEditControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EnableEditing", (PyCFunction) _wrap_wxGrid_EnableEditing, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_IsEditable", (PyCFunction) _wrap_wxGrid_IsEditable, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetBatchCount", (PyCFunction) _wrap_wxGrid_GetBatchCount, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_EndBatch", (PyCFunction) _wrap_wxGrid_EndBatch, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_BeginBatch", (PyCFunction) _wrap_wxGrid_BeginBatch, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetTextBoxSize", (PyCFunction) _wrap_wxGrid_GetTextBoxSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_StringToLines", (PyCFunction) _wrap_wxGrid_StringToLines, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DrawTextRectangle", (PyCFunction) _wrap_wxGrid_DrawTextRectangle, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DrawCellHighlight", (PyCFunction) _wrap_wxGrid_DrawCellHighlight, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DeleteCols", (PyCFunction) _wrap_wxGrid_DeleteCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AppendCols", (PyCFunction) _wrap_wxGrid_AppendCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_InsertCols", (PyCFunction) _wrap_wxGrid_InsertCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DeleteRows", (PyCFunction) _wrap_wxGrid_DeleteRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AppendRows", (PyCFunction) _wrap_wxGrid_AppendRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_InsertRows", (PyCFunction) _wrap_wxGrid_InsertRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ClearGrid", (PyCFunction) _wrap_wxGrid_ClearGrid, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetTable", (PyCFunction) _wrap_wxGrid_SetTable, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetTable", (PyCFunction) _wrap_wxGrid_GetTable, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_ProcessTableMessage", (PyCFunction) _wrap_wxGrid_ProcessTableMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetNumberCols", (PyCFunction) _wrap_wxGrid_GetNumberCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetNumberRows", (PyCFunction) _wrap_wxGrid_GetNumberRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetSelectionMode", (PyCFunction) _wrap_wxGrid_SetSelectionMode, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_CreateGrid", (PyCFunction) _wrap_wxGrid_CreateGrid, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGrid", (PyCFunction) _wrap_new_wxGrid, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords___cmp__", (PyCFunction) _wrap_wxGridCellCoords___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_asTuple", (PyCFunction) _wrap_wxGridCellCoords_asTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_Set", (PyCFunction) _wrap_wxGridCellCoords_Set, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_SetCol", (PyCFunction) _wrap_wxGridCellCoords_SetCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_GetCol", (PyCFunction) _wrap_wxGridCellCoords_GetCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_SetRow", (PyCFunction) _wrap_wxGridCellCoords_SetRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellCoords_GetRow", (PyCFunction) _wrap_wxGridCellCoords_GetRow, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxGridCellCoords", (PyCFunction) _wrap_delete_wxGridCellCoords, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellCoords", (PyCFunction) _wrap_new_wxGridCellCoords, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetCommandInt2", (PyCFunction) _wrap_wxGridTableMessage_GetCommandInt2, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetCommandInt2", (PyCFunction) _wrap_wxGridTableMessage_SetCommandInt2, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetCommandInt", (PyCFunction) _wrap_wxGridTableMessage_GetCommandInt, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetCommandInt", (PyCFunction) _wrap_wxGridTableMessage_SetCommandInt, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetId", (PyCFunction) _wrap_wxGridTableMessage_GetId, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetId", (PyCFunction) _wrap_wxGridTableMessage_SetId, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_GetTableObject", (PyCFunction) _wrap_wxGridTableMessage_GetTableObject, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableMessage_SetTableObject", (PyCFunction) _wrap_wxGridTableMessage_SetTableObject, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxGridTableMessage", (PyCFunction) _wrap_delete_wxGridTableMessage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridTableMessage", (PyCFunction) _wrap_new_wxGridTableMessage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridStringTable", (PyCFunction) _wrap_new_wxGridStringTable, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetColAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetRowAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetAttr", (PyCFunction) _wrap_wxPyGridTableBase_base_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_CanHaveAttributes", (PyCFunction) _wrap_wxPyGridTableBase_base_CanHaveAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetColLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_SetRowLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_SetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetColLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetRowLabelValue", (PyCFunction) _wrap_wxPyGridTableBase_base_GetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_DeleteCols", (PyCFunction) _wrap_wxPyGridTableBase_base_DeleteCols, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_AppendCols", (PyCFunction) _wrap_wxPyGridTableBase_base_AppendCols, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_InsertCols", (PyCFunction) _wrap_wxPyGridTableBase_base_InsertCols, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_DeleteRows", (PyCFunction) _wrap_wxPyGridTableBase_base_DeleteRows, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_AppendRows", (PyCFunction) _wrap_wxPyGridTableBase_base_AppendRows, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_InsertRows", (PyCFunction) _wrap_wxPyGridTableBase_base_InsertRows, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_Clear", (PyCFunction) _wrap_wxPyGridTableBase_base_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_CanSetValueAs", (PyCFunction) _wrap_wxPyGridTableBase_base_CanSetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_CanGetValueAs", (PyCFunction) _wrap_wxPyGridTableBase_base_CanGetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_base_GetTypeName", (PyCFunction) _wrap_wxPyGridTableBase_base_GetTypeName, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase_Destroy", (PyCFunction) _wrap_wxPyGridTableBase_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridTableBase__setSelf", (PyCFunction) _wrap_wxPyGridTableBase__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridTableBase", (PyCFunction) _wrap_new_wxPyGridTableBase, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetColAttr", (PyCFunction) _wrap_wxGridTableBase_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetRowAttr", (PyCFunction) _wrap_wxGridTableBase_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetAttr", (PyCFunction) _wrap_wxGridTableBase_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetAttr", (PyCFunction) _wrap_wxGridTableBase_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_CanHaveAttributes", (PyCFunction) _wrap_wxGridTableBase_CanHaveAttributes, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetColLabelValue", (PyCFunction) _wrap_wxGridTableBase_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetRowLabelValue", (PyCFunction) _wrap_wxGridTableBase_SetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetColLabelValue", (PyCFunction) _wrap_wxGridTableBase_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetRowLabelValue", (PyCFunction) _wrap_wxGridTableBase_GetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_DeleteCols", (PyCFunction) _wrap_wxGridTableBase_DeleteCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_AppendCols", (PyCFunction) _wrap_wxGridTableBase_AppendCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_InsertCols", (PyCFunction) _wrap_wxGridTableBase_InsertCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_DeleteRows", (PyCFunction) _wrap_wxGridTableBase_DeleteRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_AppendRows", (PyCFunction) _wrap_wxGridTableBase_AppendRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_InsertRows", (PyCFunction) _wrap_wxGridTableBase_InsertRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_Clear", (PyCFunction) _wrap_wxGridTableBase_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValueAsBool", (PyCFunction) _wrap_wxGridTableBase_SetValueAsBool, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValueAsDouble", (PyCFunction) _wrap_wxGridTableBase_SetValueAsDouble, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValueAsLong", (PyCFunction) _wrap_wxGridTableBase_SetValueAsLong, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValueAsBool", (PyCFunction) _wrap_wxGridTableBase_GetValueAsBool, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValueAsDouble", (PyCFunction) _wrap_wxGridTableBase_GetValueAsDouble, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValueAsLong", (PyCFunction) _wrap_wxGridTableBase_GetValueAsLong, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_CanSetValueAs", (PyCFunction) _wrap_wxGridTableBase_CanSetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_CanGetValueAs", (PyCFunction) _wrap_wxGridTableBase_CanGetValueAs, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetTypeName", (PyCFunction) _wrap_wxGridTableBase_GetTypeName, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetValue", (PyCFunction) _wrap_wxGridTableBase_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetValue", (PyCFunction) _wrap_wxGridTableBase_GetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_IsEmptyCell", (PyCFunction) _wrap_wxGridTableBase_IsEmptyCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetNumberCols", (PyCFunction) _wrap_wxGridTableBase_GetNumberCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetNumberRows", (PyCFunction) _wrap_wxGridTableBase_GetNumberRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetView", (PyCFunction) _wrap_wxGridTableBase_GetView, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetView", (PyCFunction) _wrap_wxGridTableBase_SetView, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_GetAttrProvider", (PyCFunction) _wrap_wxGridTableBase_GetAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxGridTableBase_SetAttrProvider", (PyCFunction) _wrap_wxGridTableBase_SetAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_SetColAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_SetRowAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_SetAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider_base_GetAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellAttrProvider__setSelf", (PyCFunction) _wrap_wxPyGridCellAttrProvider__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridCellAttrProvider", (PyCFunction) _wrap_new_wxPyGridCellAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_UpdateAttrCols", (PyCFunction) _wrap_wxGridCellAttrProvider_UpdateAttrCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_UpdateAttrRows", (PyCFunction) _wrap_wxGridCellAttrProvider_UpdateAttrRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_SetColAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetColAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_SetRowAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetRowAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_SetAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttrProvider_GetAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_GetAttr, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellAttrProvider", (PyCFunction) _wrap_new_wxGridCellAttrProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetDefAttr", (PyCFunction) _wrap_wxGridCellAttr_SetDefAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_IsReadOnly", (PyCFunction) _wrap_wxGridCellAttr_IsReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetEditor", (PyCFunction) _wrap_wxGridCellAttr_GetEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetRenderer", (PyCFunction) _wrap_wxGridCellAttr_GetRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetAlignment", (PyCFunction) _wrap_wxGridCellAttr_GetAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetFont", (PyCFunction) _wrap_wxGridCellAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_GetTextColour", (PyCFunction) _wrap_wxGridCellAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasEditor", (PyCFunction) _wrap_wxGridCellAttr_HasEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasRenderer", (PyCFunction) _wrap_wxGridCellAttr_HasRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasAlignment", (PyCFunction) _wrap_wxGridCellAttr_HasAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasFont", (PyCFunction) _wrap_wxGridCellAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasTextColour", (PyCFunction) _wrap_wxGridCellAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetEditor", (PyCFunction) _wrap_wxGridCellAttr_SetEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetRenderer", (PyCFunction) _wrap_wxGridCellAttr_SetRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetReadOnly", (PyCFunction) _wrap_wxGridCellAttr_SetReadOnly, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetAlignment", (PyCFunction) _wrap_wxGridCellAttr_SetAlignment, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetFont", (PyCFunction) _wrap_wxGridCellAttr_SetFont, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_SetTextColour", (PyCFunction) _wrap_wxGridCellAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_DecRef", (PyCFunction) _wrap_wxGridCellAttr_DecRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_IncRef", (PyCFunction) _wrap_wxGridCellAttr_IncRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_Clone", (PyCFunction) _wrap_wxGridCellAttr_Clone, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellAttr", (PyCFunction) _wrap_new_wxGridCellAttr, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellChoiceEditor", (PyCFunction) _wrap_new_wxGridCellChoiceEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellBoolEditor", (PyCFunction) _wrap_new_wxGridCellBoolEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellFloatEditor", (PyCFunction) _wrap_new_wxGridCellFloatEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellNumberEditor", (PyCFunction) _wrap_new_wxGridCellNumberEditor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellTextEditor", (PyCFunction) _wrap_new_wxGridCellTextEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_SetParameters", (PyCFunction) _wrap_wxPyGridCellEditor_base_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_Destroy", (PyCFunction) _wrap_wxPyGridCellEditor_base_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_HandleReturn", (PyCFunction) _wrap_wxPyGridCellEditor_base_HandleReturn, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_StartingClick", (PyCFunction) _wrap_wxPyGridCellEditor_base_StartingClick, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_StartingKey", (PyCFunction) _wrap_wxPyGridCellEditor_base_StartingKey, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_IsAcceptedKey", (PyCFunction) _wrap_wxPyGridCellEditor_base_IsAcceptedKey, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_PaintBackground", (PyCFunction) _wrap_wxPyGridCellEditor_base_PaintBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_Show", (PyCFunction) _wrap_wxPyGridCellEditor_base_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_SetSize", (PyCFunction) _wrap_wxPyGridCellEditor_base_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor__setSelf", (PyCFunction) _wrap_wxPyGridCellEditor__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridCellEditor", (PyCFunction) _wrap_new_wxPyGridCellEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Destroy", (PyCFunction) _wrap_wxGridCellEditor_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_HandleReturn", (PyCFunction) _wrap_wxGridCellEditor_HandleReturn, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_StartingClick", (PyCFunction) _wrap_wxGridCellEditor_StartingClick, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_StartingKey", (PyCFunction) _wrap_wxGridCellEditor_StartingKey, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_IsAcceptedKey", (PyCFunction) _wrap_wxGridCellEditor_IsAcceptedKey, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_PaintBackground", (PyCFunction) _wrap_wxGridCellEditor_PaintBackground, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Show", (PyCFunction) _wrap_wxGridCellEditor_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_SetSize", (PyCFunction) _wrap_wxGridCellEditor_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Clone", (PyCFunction) _wrap_wxGridCellEditor_Clone, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Reset", (PyCFunction) _wrap_wxGridCellEditor_Reset, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_EndEdit", (PyCFunction) _wrap_wxGridCellEditor_EndEdit, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_BeginEdit", (PyCFunction) _wrap_wxGridCellEditor_BeginEdit, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_Create", (PyCFunction) _wrap_wxGridCellEditor_Create, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_DecRef", (PyCFunction) _wrap_wxGridCellEditor_DecRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_IncRef", (PyCFunction) _wrap_wxGridCellEditor_IncRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_SetParameters", (PyCFunction) _wrap_wxGridCellEditor_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_SetControl", (PyCFunction) _wrap_wxGridCellEditor_SetControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_GetControl", (PyCFunction) _wrap_wxGridCellEditor_GetControl, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_IsCreated", (PyCFunction) _wrap_wxGridCellEditor_IsCreated, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellBoolRenderer", (PyCFunction) _wrap_new_wxGridCellBoolRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_SetPrecision", (PyCFunction) _wrap_wxGridCellFloatRenderer_SetPrecision, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_GetPrecision", (PyCFunction) _wrap_wxGridCellFloatRenderer_GetPrecision, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_SetWidth", (PyCFunction) _wrap_wxGridCellFloatRenderer_SetWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellFloatRenderer_GetWidth", (PyCFunction) _wrap_wxGridCellFloatRenderer_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellFloatRenderer", (PyCFunction) _wrap_new_wxGridCellFloatRenderer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellNumberRenderer", (PyCFunction) _wrap_new_wxGridCellNumberRenderer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridCellStringRenderer", (PyCFunction) _wrap_new_wxGridCellStringRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellRenderer_base_SetParameters", (PyCFunction) _wrap_wxPyGridCellRenderer_base_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellRenderer__setSelf", (PyCFunction) _wrap_wxPyGridCellRenderer__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyGridCellRenderer", (PyCFunction) _wrap_new_wxPyGridCellRenderer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_Clone", (PyCFunction) _wrap_wxGridCellRenderer_Clone, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_GetBestSize", (PyCFunction) _wrap_wxGridCellRenderer_GetBestSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_Draw", (PyCFunction) _wrap_wxGridCellRenderer_Draw, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_DecRef", (PyCFunction) _wrap_wxGridCellRenderer_DecRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_IncRef", (PyCFunction) _wrap_wxGridCellRenderer_IncRef, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellRenderer_SetParameters", (PyCFunction) _wrap_wxGridCellRenderer_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_wxEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_wxEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_wxEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_wxEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_wxEvent","_class_wxEvent",0}, + { "_class_wxActivateEvent","_wxActivateEvent",0}, + { "_signed_long","_long",0}, + { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxGridCellRenderer","_class_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_class_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_class_wxGridCellRenderer","_wxGridCellRenderer",0}, + { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, + { "_wxGridCellChoiceEditor","_class_wxGridCellChoiceEditor",0}, + { "_wxGridSizeEvent","_class_wxGridSizeEvent",0}, + { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, + { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, + { "_wxPrintQuality","_WXGRIDSELECTIONMODES",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, + { "_class_wxRegionIterator","_wxRegionIterator",0}, + { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, + { "_class_wxMenuBar","_wxMenuBar",0}, + { "_class_wxPyGridCellEditor","_wxPyGridCellEditor",0}, + { "_class_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler}, + { "_class_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler}, + { "_class_wxEvtHandler","_wxEvtHandler",0}, + { "_wxPaintEvent","_class_wxPaintEvent",0}, + { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxCursor","_class_wxCursor",0}, + { "_wxNotifyEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_wxNotifyEvent","_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxMask","_class_wxMask",0}, + { "_wxGridCellNumberEditor","_class_wxGridCellNumberEditor",0}, + { "_wxGrid","_class_wxGrid",0}, + { "_wxPen","_class_wxPen",0}, + { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_byte","_unsigned_char",0}, + { "_wxDataObject","_class_wxDataObject",0}, + { "_wxStaticBox","_class_wxStaticBox",0}, + { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, + { "_wxPyDropSource","_class_wxPyDropSource",0}, + { "_wxChoice","_class_wxChoice",0}, + { "_wxSlider","_class_wxSlider",0}, + { "_wxGridTableMessage","_class_wxGridTableMessage",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_wxImageList","_class_wxImageList",0}, + { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, + { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, + { "_wxBitmapButton","_class_wxBitmapButton",0}, + { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_class_wxClipboard","_wxClipboard",0}, + { "_class_wxGauge","_wxGauge",0}, + { "_wxGridCellCoords","_class_wxGridCellCoords",0}, + { "_wxGridCellNumberRenderer","_class_wxGridCellNumberRenderer",0}, + { "_wxDC","_class_wxDC",0}, + { "_class_wxGridSizeEvent","_wxGridSizeEvent",0}, + { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxGridCellBoolEditor","_wxGridCellBoolEditor",0}, + { "_wxSpinEvent","_class_wxSpinEvent",0}, + { "_size_t","_WXGRIDSELECTIONMODES",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_class_wxRealPoint","_wxRealPoint",0}, + { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, + { "_class_wxGridRangeSelectEvent","_wxGridRangeSelectEvent",0}, + { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_class_wxMenuItem","_wxMenuItem",0}, + { "_class_wxPaintEvent","_wxPaintEvent",0}, + { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, + { "_wxPanel","_class_wxGrid",SwigwxGridTowxPanel}, + { "_wxPanel","_wxGrid",SwigwxGridTowxPanel}, + { "_wxPanel","_class_wxPanel",0}, + { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, + { "_wxCheckBox","_class_wxCheckBox",0}, + { "_wxPyEvent","_class_wxPyEvent",0}, + { "_wxTextCtrl","_class_wxTextCtrl",0}, + { "_class_wxMask","_wxMask",0}, + { "_wxTextDataObject","_class_wxTextDataObject",0}, + { "_class_wxKeyEvent","_wxKeyEvent",0}, + { "_class_wxGrid","_wxGrid",0}, + { "_wxColour","_class_wxColour",0}, + { "_class_wxDialog","_wxDialog",0}, + { "_class_wxFileDataObject","_wxFileDataObject",0}, + { "_wxIdleEvent","_class_wxIdleEvent",0}, + { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, + { "_class_wxDataObject","_wxDataObject",0}, + { "_wxStaticLine","_class_wxStaticLine",0}, + { "_wxBrush","_class_wxBrush",0}, + { "_class_wxGridTableMessage","_wxGridTableMessage",0}, + { "_wxDataFormat","_class_wxDataFormat",0}, + { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, + { "_class_wxGridCellAttr","_wxGridCellAttr",0}, + { "_wxShowEvent","_class_wxShowEvent",0}, + { "_uint","_WXGRIDSELECTIONMODES",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_wxPyValidator","_class_wxPyValidator",0}, + { "_class_wxEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_class_wxEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxEvent}, + { "_class_wxEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_class_wxEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxEvent}, + { "_class_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_class_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent}, + { "_class_wxEvent","_wxEvent",0}, + { "_wxCheckListBox","_class_wxCheckListBox",0}, + { "_class_wxGridCellNumberRenderer","_wxGridCellNumberRenderer",0}, + { "_wxGridEvent","_class_wxGridEvent",0}, + { "_wxRect","_class_wxRect",0}, + { "_wxCommandEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_wxCommandEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_wxCommandEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_wxCommandEvent","_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_wxCommandEvent","_class_wxCommandEvent",0}, + { "_class_wxGridCellChoiceEditor","_wxGridCellChoiceEditor",0}, + { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_wxPoint","_class_wxPoint",0}, + { "_class_wxButton","_wxButton",0}, + { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, + { "_wxBitmap","_class_wxBitmap",0}, + { "_wxGridCellStringRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_wxGridCellStringRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_wxGridCellStringRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_wxGridCellStringRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_wxGridCellStringRenderer","_class_wxGridCellStringRenderer",0}, + { "_wxPyGridTableBase","_class_wxPyGridTableBase",0}, + { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxScrollBar","_class_wxScrollBar",0}, + { "_wxSpinButton","_class_wxSpinButton",0}, + { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_class_wxNotifyEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_class_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxGridEvent",SwigwxGridEventTowxNotifyEvent}, + { "_class_wxNotifyEvent","_wxNotifyEvent",0}, + { "_class_wxValidator","_wxValidator",0}, + { "_class_wxPyEvent","_wxPyEvent",0}, + { "_class_wxIconizeEvent","_wxIconizeEvent",0}, + { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxGridCellNumberEditor","_wxGridCellNumberEditor",0}, + { "_wxDropTarget","_class_wxDropTarget",0}, + { "_class_wxStaticLine","_wxStaticLine",0}, + { "_wxPyGridCellAttrProvider","_class_wxPyGridCellAttrProvider",0}, + { "_wxScrollEvent","_class_wxScrollEvent",0}, + { "_wxGridTableBase","_class_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_wxGridTableBase","_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_wxGridTableBase","_class_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_wxGridTableBase","_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_wxGridTableBase","_class_wxGridTableBase",0}, + { "_wxGridStringTable","_class_wxGridStringTable",0}, + { "_EBool","_WXGRIDSELECTIONMODES",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_class_wxRegion","_wxRegion",0}, + { "_class_wxDataFormat","_wxDataFormat",0}, + { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, + { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, + { "_wxStaticText","_class_wxStaticText",0}, + { "_wxFont","_class_wxFont",0}, + { "_class_wxPyDropTarget","_wxPyDropTarget",0}, + { "_wxCloseEvent","_class_wxCloseEvent",0}, + { "_class_wxPyGridCellRenderer","_wxPyGridCellRenderer",0}, + { "_class_wxGridCellCoords","_wxGridCellCoords",0}, + { "_class_wxGridCellTextEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_class_wxGridCellTextEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_class_wxGridCellTextEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_class_wxGridCellTextEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_class_wxGridCellTextEditor","_wxGridCellTextEditor",0}, + { "_unsigned_long","_long",0}, + { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_wxDC",0}, + { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_WXGRIDSELECTIONMODES","_int",0}, + { "_WXGRIDSELECTIONMODES","_signed_int",0}, + { "_WXGRIDSELECTIONMODES","_unsigned_int",0}, + { "_WXGRIDSELECTIONMODES","_wxWindowID",0}, + { "_WXGRIDSELECTIONMODES","_uint",0}, + { "_WXGRIDSELECTIONMODES","_EBool",0}, + { "_WXGRIDSELECTIONMODES","_size_t",0}, + { "_WXGRIDSELECTIONMODES","_time_t",0}, + { "_WXGRIDSELECTIONMODES","_wxPrintQuality",0}, + { "_WXGRIDSELECTIONMODES","_wxCoord",0}, + { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxGridCellStringRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_class_wxGridCellStringRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellStringRenderer}, + { "_class_wxGridCellStringRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_class_wxGridCellStringRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellStringRenderer}, + { "_class_wxGridCellStringRenderer","_wxGridCellStringRenderer",0}, + { "_class_wxGridCellFloatRenderer","_wxGridCellFloatRenderer",0}, + { "_wxFocusEvent","_class_wxFocusEvent",0}, + { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxSpinButton","_wxSpinButton",0}, + { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, + { "_class_wxPanel","_class_wxGrid",SwigwxGridTowxPanel}, + { "_class_wxPanel","_wxGrid",SwigwxGridTowxPanel}, + { "_class_wxPanel","_wxPanel",0}, + { "_class_wxCheckBox","_wxCheckBox",0}, + { "_wxComboBox","_class_wxComboBox",0}, + { "_wxRadioButton","_class_wxRadioButton",0}, + { "_signed_int","_WXGRIDSELECTIONMODES",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_class_wxTextCtrl","_wxTextCtrl",0}, + { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, + { "_class_wxTextDataObject","_wxTextDataObject",0}, + { "_wxMenu","_class_wxMenu",0}, + { "_class_wxMoveEvent","_wxMoveEvent",0}, + { "_wxListBox","_class_wxListBox",0}, + { "_wxGridCellEditor","_class_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_wxGridCellEditor","_class_wxGridCellEditor",0}, + { "_wxScreenDC","_class_wxScreenDC",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_wxGridCellAttrProvider","_class_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_wxGridCellAttrProvider","_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_wxGridCellAttrProvider","_class_wxGridCellAttrProvider",0}, + { "_class_wxDropTarget","_wxDropTarget",0}, + { "_wxGridCellFloatEditor","_class_wxGridCellFloatEditor",0}, + { "_class_wxPyGridCellAttrProvider","_wxPyGridCellAttrProvider",0}, + { "_class_wxBrush","_wxBrush",0}, + { "_class_wxGridTableBase","_class_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_class_wxGridTableBase","_wxGridStringTable",SwigwxGridStringTableTowxGridTableBase}, + { "_class_wxGridTableBase","_class_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_class_wxGridTableBase","_wxPyGridTableBase",SwigwxPyGridTableBaseTowxGridTableBase}, + { "_class_wxGridTableBase","_wxGridTableBase",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_class_wxGrid",SwigwxGridTowxWindow}, + { "_class_wxWindow","_wxGrid",SwigwxGridTowxWindow}, + { "_class_wxWindow","_wxWindow",0}, + { "_class_wxStaticText","_wxStaticText",0}, + { "_class_wxFont","_wxFont",0}, + { "_wxClipboard","_class_wxClipboard",0}, + { "_class_wxPyValidator","_wxPyValidator",0}, + { "_class_wxCloseEvent","_wxCloseEvent",0}, + { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_class_wxMenuEvent","_wxMenuEvent",0}, + { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, + { "_wxClientDC","_class_wxClientDC",0}, + { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_wxGridCellBoolEditor","_class_wxGridCellBoolEditor",0}, + { "_class_wxPoint","_wxPoint",0}, + { "_wxRealPoint","_class_wxRealPoint",0}, + { "_class_wxRadioBox","_wxRadioBox",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxMemoryDC","_class_wxMemoryDC",0}, + { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_wxPaintDC","_class_wxPaintDC",0}, + { "_class_wxWindowDC","_wxWindowDC",0}, + { "_class_wxFocusEvent","_wxFocusEvent",0}, + { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, + { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, + { "_class_wxCursor","_wxCursor",0}, + { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_wxScrolledWindow","_class_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_wxScrolledWindow","_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, + { "_class_wxMenu","_wxMenu",0}, + { "_wxControl","_class_wxControl",0}, + { "_class_wxListBox","_wxListBox",0}, + { "_unsigned_int","_WXGRIDSELECTIONMODES",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxIcon","_class_wxIcon",0}, + { "_wxDialog","_class_wxDialog",0}, + { "_class_wxPen","_wxPen",0}, + { "_wxGridCellBoolRenderer","_class_wxGridCellBoolRenderer",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_class_wxStaticBox","_wxStaticBox",0}, + { "_class_wxGridCellFloatEditor","_wxGridCellFloatEditor",0}, + { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, + { "_class_wxPyDropSource","_wxPyDropSource",0}, + { "_class_wxScrollEvent","_wxScrollEvent",0}, + { "_wxJoystickEvent","_class_wxJoystickEvent",0}, + { "_class_wxChoice","_wxChoice",0}, + { "_class_wxSlider","_wxSlider",0}, + { "_class_wxImageList","_wxImageList",0}, + { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxGridCellAttr","_class_wxGridCellAttr",0}, + { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, + { "_wxWindowID","_WXGRIDSELECTIONMODES",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, + { "_int","_WXGRIDSELECTIONMODES",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_class_wxMouseEvent","_wxMouseEvent",0}, + { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_class_wxSpinEvent","_wxSpinEvent",0}, + { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_WXGRIDSELECTIONMODES",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxButton","_class_wxButton",0}, + { "_wxSize","_class_wxSize",0}, + { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxPaintDC","_wxPaintDC",0}, + { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, + { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, + { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, + { "_class_wxComboBox","_wxComboBox",0}, + { "_class_wxRadioButton","_wxRadioButton",0}, + { "_wxValidator","_class_wxValidator",0}, + { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, + { "_wxIconizeEvent","_class_wxIconizeEvent",0}, + { "_class_wxControl","_wxControl",0}, + { "_wxStaticBitmap","_class_wxStaticBitmap",0}, + { "_class_wxGridCellEditor","_class_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellChoiceEditor",SwigwxGridCellChoiceEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellBoolEditor",SwigwxGridCellBoolEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellTextEditor",SwigwxGridCellTextEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_class_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxPyGridCellEditor",SwigwxPyGridCellEditorTowxGridCellEditor}, + { "_class_wxGridCellEditor","_wxGridCellEditor",0}, + { "_class_wxIcon","_wxIcon",0}, + { "_class_wxColour","_wxColour",0}, + { "_class_wxScreenDC","_wxScreenDC",0}, + { "_wxPalette","_class_wxPalette",0}, + { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxGridCellAttrProvider","_class_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_class_wxGridCellAttrProvider","_wxPyGridCellAttrProvider",SwigwxPyGridCellAttrProviderTowxGridCellAttrProvider}, + { "_class_wxGridCellAttrProvider","_wxGridCellAttrProvider",0}, + { "_wxCoord","_WXGRIDSELECTIONMODES",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxEraseEvent","_class_wxEraseEvent",0}, + { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, + { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_wxRegion","_class_wxRegion",0}, + { "_class_wxShowEvent","_wxShowEvent",0}, + { "_wxPyDropTarget","_class_wxPyDropTarget",0}, + { "_wxActivateEvent","_class_wxActivateEvent",0}, + { "_wxGauge","_class_wxGauge",0}, + { "_class_wxCheckListBox","_wxCheckListBox",0}, + { "_wxPyGridCellRenderer","_class_wxPyGridCellRenderer",0}, + { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_wxGridCellRenderer","_class_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellBoolRenderer",SwigwxGridCellBoolRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellFloatRenderer",SwigwxGridCellFloatRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellNumberRenderer",SwigwxGridCellNumberRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxGridCellStringRenderer",SwigwxGridCellStringRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_wxPyGridCellRenderer",SwigwxPyGridCellRendererTowxGridCellRenderer}, + { "_wxGridCellRenderer","_class_wxGridCellRenderer",0}, + { "_wxGridCellTextEditor","_class_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_wxGridCellTextEditor","_wxGridCellFloatEditor",SwigwxGridCellFloatEditorTowxGridCellTextEditor}, + { "_wxGridCellTextEditor","_class_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_wxGridCellTextEditor","_wxGridCellNumberEditor",SwigwxGridCellNumberEditorTowxGridCellTextEditor}, + { "_wxGridCellTextEditor","_class_wxGridCellTextEditor",0}, + { "_class_wxGridEvent","_wxGridEvent",0}, + { "_class_wxCommandEvent","_class_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxGridRangeSelectEvent",SwigwxGridRangeSelectEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxGridSizeEvent",SwigwxGridSizeEventTowxCommandEvent}, + { "_class_wxCommandEvent","_class_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxGridEvent",SwigwxGridEventTowxCommandEvent}, + { "_class_wxCommandEvent","_wxCommandEvent",0}, + { "_class_wxClientDC","_wxClientDC",0}, + { "_class_wxSizeEvent","_wxSizeEvent",0}, + { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_wxGridRangeSelectEvent","_class_wxGridRangeSelectEvent",0}, + { "_class_wxSize","_wxSize",0}, + { "_class_wxBitmap","_wxBitmap",0}, + { "_class_wxMemoryDC","_wxMemoryDC",0}, + { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, + { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxGridCellFloatRenderer","_class_wxGridCellFloatRenderer",0}, + { "_wxPyGridCellEditor","_class_wxPyGridCellEditor",0}, + { "_class_wxPyGridTableBase","_wxPyGridTableBase",0}, + { "_wxEvtHandler","_class_wxGrid",SwigwxGridTowxEvtHandler}, + { "_wxEvtHandler","_wxGrid",SwigwxGridTowxEvtHandler}, + { "_wxEvtHandler","_class_wxEvtHandler",0}, + { "_wxMenuItem","_class_wxMenuItem",0}, + { "_class_wxScrollBar","_wxScrollBar",0}, + { "_class_wxScrolledWindow","_class_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_class_wxScrolledWindow","_wxGrid",SwigwxGridTowxScrolledWindow}, + { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_wxKeyEvent","_class_wxKeyEvent",0}, + { "_wxMoveEvent","_class_wxMoveEvent",0}, + { "_class_wxPalette","_wxPalette",0}, + { "_wxFileDataObject","_class_wxFileDataObject",0}, + { "_class_wxGridCellBoolRenderer","_wxGridCellBoolRenderer",0}, + { "_class_wxEraseEvent","_wxEraseEvent",0}, + { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, + { "_class_wxGridStringTable","_wxGridStringTable",0}, + { "_wxWindow","_class_wxGrid",SwigwxGridTowxWindow}, + { "_wxWindow","_wxGrid",SwigwxGridTowxWindow}, + { "_wxWindow","_class_wxWindow",0}, + { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initgridc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("gridc", gridcMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxGRID_VALUE_STRING", PyString_FromString("string")); + PyDict_SetItemString(d,"wxGRID_VALUE_BOOL", PyString_FromString("bool")); + PyDict_SetItemString(d,"wxGRID_VALUE_NUMBER", PyString_FromString("long")); + PyDict_SetItemString(d,"wxGRID_VALUE_FLOAT", PyString_FromString("double")); + PyDict_SetItemString(d,"wxGRID_VALUE_CHOICE", PyString_FromString("choice")); + PyDict_SetItemString(d,"wxGRID_VALUE_TEXT", PyString_FromString("string")); + PyDict_SetItemString(d,"wxGRID_VALUE_LONG", PyString_FromString("long")); + PyDict_SetItemString(d,"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,"wxGridNoCellCoords",_wrap_wxGridNoCellCoords_get, _wrap_wxGridNoCellCoords_set); + SWIG_addvarlink(SWIG_globals,"wxGridNoCellRect",_wrap_wxGridNoCellRect_get, _wrap_wxGridNoCellRect_set); + PyDict_SetItemString(d,"wxGRIDTABLE_REQUEST_VIEW_GET_VALUES", PyInt_FromLong((long) wxGRIDTABLE_REQUEST_VIEW_GET_VALUES)); + PyDict_SetItemString(d,"wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES", PyInt_FromLong((long) wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_ROWS_INSERTED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_ROWS_INSERTED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_ROWS_APPENDED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_ROWS_APPENDED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_ROWS_DELETED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_ROWS_DELETED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_COLS_INSERTED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_COLS_INSERTED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_COLS_APPENDED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_COLS_APPENDED)); + PyDict_SetItemString(d,"wxGRIDTABLE_NOTIFY_COLS_DELETED", PyInt_FromLong((long) wxGRIDTABLE_NOTIFY_COLS_DELETED)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_LEFT_CLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_LEFT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_RIGHT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_LEFT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_CELL_RIGHT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_LEFT_CLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_LEFT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_RIGHT_CLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_LEFT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_LEFT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_LABEL_RIGHT_DCLICK", PyInt_FromLong((long) wxEVT_GRID_LABEL_RIGHT_DCLICK)); + PyDict_SetItemString(d,"wxEVT_GRID_ROW_SIZE", PyInt_FromLong((long) wxEVT_GRID_ROW_SIZE)); + PyDict_SetItemString(d,"wxEVT_GRID_COL_SIZE", PyInt_FromLong((long) wxEVT_GRID_COL_SIZE)); + PyDict_SetItemString(d,"wxEVT_GRID_RANGE_SELECT", PyInt_FromLong((long) wxEVT_GRID_RANGE_SELECT)); + PyDict_SetItemString(d,"wxEVT_GRID_CELL_CHANGE", PyInt_FromLong((long) wxEVT_GRID_CELL_CHANGE)); + PyDict_SetItemString(d,"wxEVT_GRID_SELECT_CELL", PyInt_FromLong((long) wxEVT_GRID_SELECT_CELL)); + PyDict_SetItemString(d,"wxEVT_GRID_EDITOR_SHOWN", PyInt_FromLong((long) wxEVT_GRID_EDITOR_SHOWN)); + PyDict_SetItemString(d,"wxEVT_GRID_EDITOR_HIDDEN", PyInt_FromLong((long) wxEVT_GRID_EDITOR_HIDDEN)); + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + PyDict_SetItemString(d,"wxGrid_wxGridSelectCells", PyInt_FromLong((long) wxGrid::wxGridSelectCells)); + PyDict_SetItemString(d,"wxGrid_wxGridSelectRows", PyInt_FromLong((long) wxGrid::wxGridSelectRows)); + PyDict_SetItemString(d,"wxGrid_wxGridSelectColumns", PyInt_FromLong((long) wxGrid::wxGridSelectColumns)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py new file mode 100644 index 0000000000..2ae95724da --- /dev/null +++ b/wxPython/src/msw/grid.py @@ -0,0 +1,1512 @@ +# This file was created automatically by SWIG. +import gridc + +from misc import * + +from gdi import * + +from windows import * + +from clip_dnd import * + +from controls import * + +from events import * +import wx + +def EVT_GRID_CELL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_CLICK, fn) + +def EVT_GRID_CELL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_CLICK, fn) + +def EVT_GRID_CELL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_LEFT_DCLICK, fn) + +def EVT_GRID_CELL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_RIGHT_DCLICK, fn) + +def EVT_GRID_LABEL_LEFT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_CLICK, fn) + +def EVT_GRID_LABEL_RIGHT_CLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_CLICK, fn) + +def EVT_GRID_LABEL_LEFT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_LEFT_DCLICK, fn) + +def EVT_GRID_LABEL_RIGHT_DCLICK(win, fn): + win.Connect(-1, -1, wxEVT_GRID_LABEL_RIGHT_DCLICK, fn) + +def EVT_GRID_ROW_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_ROW_SIZE, fn) + +def EVT_GRID_COL_SIZE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_COL_SIZE, fn) + +def EVT_GRID_RANGE_SELECT(win, fn): + win.Connect(-1, -1, wxEVT_GRID_RANGE_SELECT, fn) + +def EVT_GRID_CELL_CHANGE(win, fn): + win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) + +def EVT_GRID_SELECT_CELL(win, fn): + win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) + +def EVT_GRID_EDITOR_SHOWN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_SHOWN, fn) + +def EVT_GRID_EDITOR_HIDDEN(win, fn): + win.Connect(-1, -1, wxEVT_GRID_EDITOR_HIDDEN, fn) + + +class wxGridCellRendererPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_SetParameters,(self,) + _args, _kwargs) + return val + def IncRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_IncRef,(self,) + _args, _kwargs) + return val + def DecRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_DecRef,(self,) + _args, _kwargs) + return val + def Draw(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_Draw,(self,) + _args, _kwargs) + return val + def GetBestSize(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_GetBestSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def Clone(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellRenderer_Clone,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellRenderer(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + + + + +class wxPyGridCellRendererPtr(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellRenderer__setSelf,(self,) + _args, _kwargs) + return val + def base_SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellRenderer_base_SetParameters,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridCellRenderer(wxPyGridCellRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridCellRenderer,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridCellRenderer) + + + + +class wxGridCellStringRendererPtr(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellStringRenderer(wxGridCellStringRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellStringRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellNumberRendererPtr(wxGridCellStringRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellNumberRenderer(wxGridCellNumberRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellNumberRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellFloatRendererPtr(wxGridCellStringRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_GetWidth,(self,) + _args, _kwargs) + return val + def SetWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_SetWidth,(self,) + _args, _kwargs) + return val + def GetPrecision(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_GetPrecision,(self,) + _args, _kwargs) + return val + def SetPrecision(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatRenderer_SetPrecision,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellFloatRenderer(wxGridCellFloatRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellFloatRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellBoolRendererPtr(wxGridCellRendererPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellBoolRenderer(wxGridCellBoolRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellBoolRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellEditorPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def IsCreated(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_IsCreated,(self,) + _args, _kwargs) + return val + def GetControl(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_GetControl,(self,) + _args, _kwargs) + if val: val = wxControlPtr(val) + return val + def SetControl(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs) + return val + def SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetParameters,(self,) + _args, _kwargs) + return val + def IncRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_IncRef,(self,) + _args, _kwargs) + return val + def DecRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_DecRef,(self,) + _args, _kwargs) + return val + def Create(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Create,(self,) + _args, _kwargs) + return val + def BeginEdit(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_BeginEdit,(self,) + _args, _kwargs) + return val + def EndEdit(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_EndEdit,(self,) + _args, _kwargs) + return val + def Reset(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Reset,(self,) + _args, _kwargs) + return val + def Clone(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Clone,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def SetSize(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetSize,(self,) + _args, _kwargs) + return val + def Show(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Show,(self,) + _args, _kwargs) + return val + def PaintBackground(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_PaintBackground,(self,) + _args, _kwargs) + return val + def IsAcceptedKey(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_IsAcceptedKey,(self,) + _args, _kwargs) + return val + def StartingKey(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_StartingKey,(self,) + _args, _kwargs) + return val + def StartingClick(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_StartingClick,(self,) + _args, _kwargs) + return val + def HandleReturn(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_HandleReturn,(self,) + _args, _kwargs) + return val + def Destroy(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_Destroy,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellEditor(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + + + + +class wxPyGridCellEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor__setSelf,(self,) + _args, _kwargs) + return val + def base_SetSize(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_SetSize,(self,) + _args, _kwargs) + return val + def base_Show(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_Show,(self,) + _args, _kwargs) + return val + def base_PaintBackground(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_PaintBackground,(self,) + _args, _kwargs) + return val + def base_IsAcceptedKey(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_IsAcceptedKey,(self,) + _args, _kwargs) + return val + def base_StartingKey(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_StartingKey,(self,) + _args, _kwargs) + return val + def base_StartingClick(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_StartingClick,(self,) + _args, _kwargs) + return val + def base_HandleReturn(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_HandleReturn,(self,) + _args, _kwargs) + return val + def base_Destroy(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_Destroy,(self,) + _args, _kwargs) + return val + def base_SetParameters(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_SetParameters,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridCellEditor(wxPyGridCellEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridCellEditor,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridCellEditor) + + + + +class wxGridCellTextEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellTextEditor(wxGridCellTextEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellTextEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellNumberEditorPtr(wxGridCellTextEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellNumberEditor(wxGridCellNumberEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellNumberEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellFloatEditorPtr(wxGridCellTextEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellFloatEditor(wxGridCellFloatEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellFloatEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellBoolEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellBoolEditor(wxGridCellBoolEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellBoolEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellChoiceEditorPtr(wxGridCellEditorPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridCellChoiceEditor(wxGridCellChoiceEditorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellChoiceEditor,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellAttrPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Clone(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_Clone,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def IncRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_IncRef,(self,) + _args, _kwargs) + return val + def DecRef(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_DecRef,(self,) + _args, _kwargs) + return val + def SetTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetTextColour,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetFont(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetFont,(self,) + _args, _kwargs) + return val + def SetAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetAlignment,(self,) + _args, _kwargs) + return val + def SetReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetReadOnly,(self,) + _args, _kwargs) + return val + def SetRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetRenderer,(self,) + _args, _kwargs) + return val + def SetEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetEditor,(self,) + _args, _kwargs) + return val + def HasTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasTextColour,(self,) + _args, _kwargs) + return val + def HasBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasBackgroundColour,(self,) + _args, _kwargs) + return val + def HasFont(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasFont,(self,) + _args, _kwargs) + return val + def HasAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasAlignment,(self,) + _args, _kwargs) + return val + def HasRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasRenderer,(self,) + _args, _kwargs) + return val + def HasEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_HasEditor,(self,) + _args, _kwargs) + return val + def GetTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def GetFont(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def GetAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetAlignment,(self,) + _args, _kwargs) + return val + def GetRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetRenderer,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def GetEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_GetEditor,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def IsReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_IsReadOnly,(self,) + _args, _kwargs) + return val + def SetDefAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttr_SetDefAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellAttr(wxGridCellAttrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellAttr,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellAttrProviderPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_SetAttr,(self,) + _args, _kwargs) + return val + def SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_SetRowAttr,(self,) + _args, _kwargs) + return val + def SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_SetColAttr,(self,) + _args, _kwargs) + return val + def UpdateAttrRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_UpdateAttrRows,(self,) + _args, _kwargs) + return val + def UpdateAttrCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAttrProvider_UpdateAttrCols,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridCellAttrProvider(wxGridCellAttrProviderPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellAttrProvider,_args,_kwargs) + self.thisown = 1 + + + + +class wxPyGridCellAttrProviderPtr(wxGridCellAttrProviderPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider__setSelf,(self,) + _args, _kwargs) + return val + def base_GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def base_SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_SetAttr,(self,) + _args, _kwargs) + return val + def base_SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_SetRowAttr,(self,) + _args, _kwargs) + return val + def base_SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellAttrProvider_base_SetColAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridCellAttrProvider(wxPyGridCellAttrProviderPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridCellAttrProvider,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridCellAttrProvider) + + + + +class wxGridTableBasePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetAttrProvider(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetAttrProvider,(self,) + _args, _kwargs) + return val + def GetAttrProvider(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetAttrProvider,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrProviderPtr(val) + return val + def SetView(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetView,(self,) + _args, _kwargs) + return val + def GetView(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetView,(self,) + _args, _kwargs) + if val: val = wxGridPtr(val) + return val + def GetNumberRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetNumberRows,(self,) + _args, _kwargs) + return val + def GetNumberCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetNumberCols,(self,) + _args, _kwargs) + return val + def IsEmptyCell(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_IsEmptyCell,(self,) + _args, _kwargs) + return val + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValue,(self,) + _args, _kwargs) + return val + def SetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValue,(self,) + _args, _kwargs) + return val + def GetTypeName(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetTypeName,(self,) + _args, _kwargs) + return val + def CanGetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_CanGetValueAs,(self,) + _args, _kwargs) + return val + def CanSetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_CanSetValueAs,(self,) + _args, _kwargs) + return val + def GetValueAsLong(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValueAsLong,(self,) + _args, _kwargs) + return val + def GetValueAsDouble(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValueAsDouble,(self,) + _args, _kwargs) + return val + def GetValueAsBool(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetValueAsBool,(self,) + _args, _kwargs) + return val + def SetValueAsLong(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValueAsLong,(self,) + _args, _kwargs) + return val + def SetValueAsDouble(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValueAsDouble,(self,) + _args, _kwargs) + return val + def SetValueAsBool(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetValueAsBool,(self,) + _args, _kwargs) + return val + def Clear(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_Clear,(self,) + _args, _kwargs) + return val + def InsertRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_InsertRows,(self,) + _args, _kwargs) + return val + def AppendRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_AppendRows,(self,) + _args, _kwargs) + return val + def DeleteRows(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_DeleteRows,(self,) + _args, _kwargs) + return val + def InsertCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_InsertCols,(self,) + _args, _kwargs) + return val + def AppendCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_AppendCols,(self,) + _args, _kwargs) + return val + def DeleteCols(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_DeleteCols,(self,) + _args, _kwargs) + return val + def GetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetRowLabelValue,(self,) + _args, _kwargs) + return val + def GetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetColLabelValue,(self,) + _args, _kwargs) + return val + def SetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetRowLabelValue,(self,) + _args, _kwargs) + return val + def SetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetColLabelValue,(self,) + _args, _kwargs) + return val + def CanHaveAttributes(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_CanHaveAttributes,(self,) + _args, _kwargs) + return val + def GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetAttr,(self,) + _args, _kwargs) + return val + def SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetRowAttr,(self,) + _args, _kwargs) + return val + def SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableBase_SetColAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridTableBase(wxGridTableBasePtr): + def __init__(self,this): + self.this = this + + + + +class wxPyGridTableBasePtr(wxGridTableBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase__setSelf,(self,) + _args, _kwargs) + return val + def Destroy(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_Destroy,(self,) + _args, _kwargs) + return val + def base_GetTypeName(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetTypeName,(self,) + _args, _kwargs) + return val + def base_CanGetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_CanGetValueAs,(self,) + _args, _kwargs) + return val + def base_CanSetValueAs(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_CanSetValueAs,(self,) + _args, _kwargs) + return val + def base_Clear(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_Clear,(self,) + _args, _kwargs) + return val + def base_InsertRows(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_InsertRows,(self,) + _args, _kwargs) + return val + def base_AppendRows(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_AppendRows,(self,) + _args, _kwargs) + return val + def base_DeleteRows(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_DeleteRows,(self,) + _args, _kwargs) + return val + def base_InsertCols(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_InsertCols,(self,) + _args, _kwargs) + return val + def base_AppendCols(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_AppendCols,(self,) + _args, _kwargs) + return val + def base_DeleteCols(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_DeleteCols,(self,) + _args, _kwargs) + return val + def base_GetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetRowLabelValue,(self,) + _args, _kwargs) + return val + def base_GetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetColLabelValue,(self,) + _args, _kwargs) + return val + def base_SetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetRowLabelValue,(self,) + _args, _kwargs) + return val + def base_SetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetColLabelValue,(self,) + _args, _kwargs) + return val + def base_CanHaveAttributes(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_CanHaveAttributes,(self,) + _args, _kwargs) + return val + def base_GetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_GetAttr,(self,) + _args, _kwargs) + if val: val = wxGridCellAttrPtr(val) + return val + def base_SetAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetAttr,(self,) + _args, _kwargs) + return val + def base_SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetRowAttr,(self,) + _args, _kwargs) + return val + def base_SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridTableBase_base_SetColAttr,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyGridTableBase(wxPyGridTableBasePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxPyGridTableBase,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxPyGridTableBase) + + + + +class wxGridStringTablePtr(wxGridTableBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxGridStringTable(wxGridStringTablePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridStringTable,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridTableMessagePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gridc=gridc): + if self.thisown == 1 : + gridc.delete_wxGridTableMessage(self) + def SetTableObject(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetTableObject,(self,) + _args, _kwargs) + return val + def GetTableObject(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetTableObject,(self,) + _args, _kwargs) + if val: val = wxGridTableBasePtr(val) + return val + def SetId(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetId,(self,) + _args, _kwargs) + return val + def GetId(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetId,(self,) + _args, _kwargs) + return val + def SetCommandInt(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetCommandInt,(self,) + _args, _kwargs) + return val + def GetCommandInt(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetCommandInt,(self,) + _args, _kwargs) + return val + def SetCommandInt2(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_SetCommandInt2,(self,) + _args, _kwargs) + return val + def GetCommandInt2(self, *_args, **_kwargs): + val = apply(gridc.wxGridTableMessage_GetCommandInt2,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridTableMessage(wxGridTableMessagePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridTableMessage,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridCellCoordsPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gridc=gridc): + if self.thisown == 1 : + gridc.delete_wxGridCellCoords(self) + def GetRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_GetRow,(self,) + _args, _kwargs) + return val + def SetRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_SetRow,(self,) + _args, _kwargs) + return val + def GetCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_GetCol,(self,) + _args, _kwargs) + return val + def SetCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_SetCol,(self,) + _args, _kwargs) + return val + def Set(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_Set,(self,) + _args, _kwargs) + return val + def asTuple(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords_asTuple,(self,) + _args, _kwargs) + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellCoords___cmp__,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) +class wxGridCellCoords(wxGridCellCoordsPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridCellCoords,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridPtr(wxScrolledWindowPtr): + wxGridSelectCells = gridc.wxGrid_wxGridSelectCells + wxGridSelectRows = gridc.wxGrid_wxGridSelectRows + wxGridSelectColumns = gridc.wxGrid_wxGridSelectColumns + def __init__(self,this): + self.this = this + self.thisown = 0 + def CreateGrid(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CreateGrid,(self,) + _args, _kwargs) + return val + def SetSelectionMode(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetSelectionMode,(self,) + _args, _kwargs) + return val + def GetNumberRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetNumberRows,(self,) + _args, _kwargs) + return val + def GetNumberCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetNumberCols,(self,) + _args, _kwargs) + return val + def ProcessTableMessage(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ProcessTableMessage,(self,) + _args, _kwargs) + return val + def GetTable(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetTable,(self,) + _args, _kwargs) + if val: val = wxGridTableBasePtr(val) + return val + def SetTable(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetTable,(self,) + _args, _kwargs) + return val + def ClearGrid(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ClearGrid,(self,) + _args, _kwargs) + return val + def InsertRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_InsertRows,(self,) + _args, _kwargs) + return val + def AppendRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AppendRows,(self,) + _args, _kwargs) + return val + def DeleteRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeleteRows,(self,) + _args, _kwargs) + return val + def InsertCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_InsertCols,(self,) + _args, _kwargs) + return val + def AppendCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AppendCols,(self,) + _args, _kwargs) + return val + def DeleteCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeleteCols,(self,) + _args, _kwargs) + return val + def DrawCellHighlight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DrawCellHighlight,(self,) + _args, _kwargs) + return val + def DrawTextRectangle(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DrawTextRectangle,(self,) + _args, _kwargs) + return val + def StringToLines(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_StringToLines,(self,) + _args, _kwargs) + return val + def GetTextBoxSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetTextBoxSize,(self,) + _args, _kwargs) + return val + def BeginBatch(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_BeginBatch,(self,) + _args, _kwargs) + return val + def EndBatch(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EndBatch,(self,) + _args, _kwargs) + return val + def GetBatchCount(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetBatchCount,(self,) + _args, _kwargs) + return val + def IsEditable(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsEditable,(self,) + _args, _kwargs) + return val + def EnableEditing(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableEditing,(self,) + _args, _kwargs) + return val + def EnableCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableCellEditControl,(self,) + _args, _kwargs) + return val + def DisableCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableCellEditControl,(self,) + _args, _kwargs) + return val + def CanEnableCellControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanEnableCellControl,(self,) + _args, _kwargs) + return val + def IsCellEditControlEnabled(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsCellEditControlEnabled,(self,) + _args, _kwargs) + return val + def IsCellEditControlShown(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsCellEditControlShown,(self,) + _args, _kwargs) + return val + def IsCurrentCellReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsCurrentCellReadOnly,(self,) + _args, _kwargs) + return val + def ShowCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ShowCellEditControl,(self,) + _args, _kwargs) + return val + def HideCellEditControl(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_HideCellEditControl,(self,) + _args, _kwargs) + return val + def SaveEditControlValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SaveEditControlValue,(self,) + _args, _kwargs) + return val + def XYToCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_XYToCell,(self,) + _args, _kwargs) + if val: val = wxGridCellCoordsPtr(val) ; val.thisown = 1 + return val + def YToRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_YToRow,(self,) + _args, _kwargs) + return val + def XToCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_XToCol,(self,) + _args, _kwargs) + return val + def YToEdgeOfRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_YToEdgeOfRow,(self,) + _args, _kwargs) + return val + def XToEdgeOfCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_XToEdgeOfCol,(self,) + _args, _kwargs) + return val + def CellToRect(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CellToRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def GetGridCursorRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridCursorRow,(self,) + _args, _kwargs) + return val + def GetGridCursorCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridCursorCol,(self,) + _args, _kwargs) + return val + def IsVisible(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsVisible,(self,) + _args, _kwargs) + return val + def MakeCellVisible(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MakeCellVisible,(self,) + _args, _kwargs) + return val + def SetGridCursor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetGridCursor,(self,) + _args, _kwargs) + return val + def MoveCursorUp(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorUp,(self,) + _args, _kwargs) + return val + def MoveCursorDown(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorDown,(self,) + _args, _kwargs) + return val + def MoveCursorLeft(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorLeft,(self,) + _args, _kwargs) + return val + def MoveCursorRight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorRight,(self,) + _args, _kwargs) + return val + def MovePageDown(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MovePageDown,(self,) + _args, _kwargs) + return val + def MovePageUp(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MovePageUp,(self,) + _args, _kwargs) + return val + def MoveCursorUpBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorUpBlock,(self,) + _args, _kwargs) + return val + def MoveCursorDownBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorDownBlock,(self,) + _args, _kwargs) + return val + def MoveCursorLeftBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorLeftBlock,(self,) + _args, _kwargs) + return val + def MoveCursorRightBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_MoveCursorRightBlock,(self,) + _args, _kwargs) + return val + def GetDefaultRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRowLabelSize,(self,) + _args, _kwargs) + return val + def GetRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowLabelSize,(self,) + _args, _kwargs) + return val + def GetDefaultColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultColLabelSize,(self,) + _args, _kwargs) + return val + def GetColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelSize,(self,) + _args, _kwargs) + return val + def GetLabelBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetLabelBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetLabelTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetLabelTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetLabelFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetLabelFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val + def GetRowLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowLabelAlignment,(self,) + _args, _kwargs) + return val + def GetColLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelAlignment,(self,) + _args, _kwargs) + return val + def GetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowLabelValue,(self,) + _args, _kwargs) + return val + def GetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelValue,(self,) + _args, _kwargs) + return val + def GetGridLineColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetGridLineColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetCellHighlightColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellHighlightColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowLabelSize,(self,) + _args, _kwargs) + return val + def SetColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelSize,(self,) + _args, _kwargs) + return val + def SetLabelBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetLabelBackgroundColour,(self,) + _args, _kwargs) + return val + def SetLabelTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetLabelTextColour,(self,) + _args, _kwargs) + return val + def SetLabelFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetLabelFont,(self,) + _args, _kwargs) + return val + def SetRowLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowLabelAlignment,(self,) + _args, _kwargs) + return val + def SetColLabelAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelAlignment,(self,) + _args, _kwargs) + return val + def SetRowLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowLabelValue,(self,) + _args, _kwargs) + return val + def SetColLabelValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelValue,(self,) + _args, _kwargs) + return val + def SetGridLineColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetGridLineColour,(self,) + _args, _kwargs) + return val + def SetCellHighlightColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellHighlightColour,(self,) + _args, _kwargs) + return val + def EnableDragRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableDragRowSize,(self,) + _args, _kwargs) + return val + def DisableDragRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableDragRowSize,(self,) + _args, _kwargs) + return val + def CanDragRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanDragRowSize,(self,) + _args, _kwargs) + return val + def EnableDragColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableDragColSize,(self,) + _args, _kwargs) + return val + def DisableDragColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableDragColSize,(self,) + _args, _kwargs) + return val + def CanDragColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanDragColSize,(self,) + _args, _kwargs) + return val + def EnableDragGridSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableDragGridSize,(self,) + _args, _kwargs) + return val + def DisableDragGridSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DisableDragGridSize,(self,) + _args, _kwargs) + return val + def CanDragGridSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_CanDragGridSize,(self,) + _args, _kwargs) + return val + def SetRowAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowAttr,(self,) + _args, _kwargs) + return val + def SetColAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColAttr,(self,) + _args, _kwargs) + return val + def SetColFormatBool(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatBool,(self,) + _args, _kwargs) + return val + def SetColFormatNumber(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatNumber,(self,) + _args, _kwargs) + return val + def SetColFormatFloat(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatFloat,(self,) + _args, _kwargs) + return val + def SetColFormatCustom(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColFormatCustom,(self,) + _args, _kwargs) + return val + def EnableGridLines(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_EnableGridLines,(self,) + _args, _kwargs) + return val + def GridLinesEnabled(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GridLinesEnabled,(self,) + _args, _kwargs) + return val + def GetDefaultRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRowSize,(self,) + _args, _kwargs) + return val + def GetRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetRowSize,(self,) + _args, _kwargs) + return val + def GetDefaultColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultColSize,(self,) + _args, _kwargs) + return val + def GetColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColSize,(self,) + _args, _kwargs) + return val + def GetDefaultCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetDefaultCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetDefaultCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val + def GetCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val + def GetDefaultCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultCellAlignment,(self,) + _args, _kwargs) + return val + def GetCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellAlignment,(self,) + _args, _kwargs) + return val + def SetDefaultRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultRowSize,(self,) + _args, _kwargs) + return val + def SetRowSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowSize,(self,) + _args, _kwargs) + return val + def SetDefaultColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultColSize,(self,) + _args, _kwargs) + return val + def SetColSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColSize,(self,) + _args, _kwargs) + return val + def AutoSizeColumn(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeColumn,(self,) + _args, _kwargs) + return val + def AutoSizeRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeRow,(self,) + _args, _kwargs) + return val + def AutoSizeColumns(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeColumns,(self,) + _args, _kwargs) + return val + def AutoSizeRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeRows,(self,) + _args, _kwargs) + return val + def AutoSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSize,(self,) + _args, _kwargs) + return val + def SetColMinimalWidth(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColMinimalWidth,(self,) + _args, _kwargs) + return val + def SetRowMinimalHeight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetRowMinimalHeight,(self,) + _args, _kwargs) + return val + def SetDefaultCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellBackgroundColour,(self,) + _args, _kwargs) + return val + def SetCellBackgroundColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellBackgroundColour,(self,) + _args, _kwargs) + return val + def SetDefaultCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellTextColour,(self,) + _args, _kwargs) + return val + def SetCellTextColour(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellTextColour,(self,) + _args, _kwargs) + return val + def SetDefaultCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellFont,(self,) + _args, _kwargs) + return val + def SetCellFont(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellFont,(self,) + _args, _kwargs) + return val + def SetDefaultCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultCellAlignment,(self,) + _args, _kwargs) + return val + def SetCellAlignment(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellAlignment,(self,) + _args, _kwargs) + return val + def SetDefaultRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultRenderer,(self,) + _args, _kwargs) + return val + def SetCellRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellRenderer,(self,) + _args, _kwargs) + return val + def GetDefaultRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRenderer,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def GetCellRenderer(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellRenderer,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def SetDefaultEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetDefaultEditor,(self,) + _args, _kwargs) + return val + def SetCellEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellEditor,(self,) + _args, _kwargs) + return val + def GetDefaultEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultEditor,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetCellEditor(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellEditor,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetCellValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetCellValue,(self,) + _args, _kwargs) + return val + def SetCellValue(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetCellValue,(self,) + _args, _kwargs) + return val + def IsReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsReadOnly,(self,) + _args, _kwargs) + return val + def SetReadOnly(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetReadOnly,(self,) + _args, _kwargs) + return val + def SelectRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectRow,(self,) + _args, _kwargs) + return val + def SelectCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectCol,(self,) + _args, _kwargs) + return val + def SelectBlock(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectBlock,(self,) + _args, _kwargs) + return val + def SelectAll(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SelectAll,(self,) + _args, _kwargs) + return val + def IsSelection(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsSelection,(self,) + _args, _kwargs) + return val + def ClearSelection(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_ClearSelection,(self,) + _args, _kwargs) + return val + def IsInSelection(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_IsInSelection,(self,) + _args, _kwargs) + return val + def BlockToDeviceRect(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_BlockToDeviceRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def GetSelectionBackground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionBackground,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetSelectionForeground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionForeground,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetSelectionBackground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetSelectionBackground,(self,) + _args, _kwargs) + return val + def SetSelectionForeground(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetSelectionForeground,(self,) + _args, _kwargs) + return val + def RegisterDataType(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_RegisterDataType,(self,) + _args, _kwargs) + return val + def GetDefaultEditorForCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultEditorForCell,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetDefaultRendererForCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRendererForCell,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def GetDefaultEditorForType(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultEditorForType,(self,) + _args, _kwargs) + if val: val = wxGridCellEditorPtr(val) + return val + def GetDefaultRendererForType(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetDefaultRendererForType,(self,) + _args, _kwargs) + if val: val = wxGridCellRendererPtr(val) + return val + def SetMargins(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetMargins,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGrid(wxGridPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGrid,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridEventPtr(wxNotifyEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_GetRow,(self,) + _args, _kwargs) + return val + def GetCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_GetCol,(self,) + _args, _kwargs) + return val + def GetPosition(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def Selecting(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_Selecting,(self,) + _args, _kwargs) + return val + def ControlDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_ControlDown,(self,) + _args, _kwargs) + return val + def MetaDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_MetaDown,(self,) + _args, _kwargs) + return val + def ShiftDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_ShiftDown,(self,) + _args, _kwargs) + return val + def AltDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridEvent_AltDown,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridEvent(wxGridEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridSizeEventPtr(wxNotifyEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetRowOrCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_GetRowOrCol,(self,) + _args, _kwargs) + return val + def GetPosition(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def ControlDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_ControlDown,(self,) + _args, _kwargs) + return val + def MetaDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_MetaDown,(self,) + _args, _kwargs) + return val + def ShiftDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_ShiftDown,(self,) + _args, _kwargs) + return val + def AltDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridSizeEvent_AltDown,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridSizeEvent(wxGridSizeEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridSizeEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridRangeSelectEventPtr(wxNotifyEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetTopLeftCoords(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetTopLeftCoords,(self,) + _args, _kwargs) + if val: val = wxGridCellCoordsPtr(val) ; val.thisown = 1 + return val + def GetBottomRightCoords(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetBottomRightCoords,(self,) + _args, _kwargs) + if val: val = wxGridCellCoordsPtr(val) ; val.thisown = 1 + return val + def GetTopRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetTopRow,(self,) + _args, _kwargs) + return val + def GetBottomRow(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetBottomRow,(self,) + _args, _kwargs) + return val + def GetLeftCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetLeftCol,(self,) + _args, _kwargs) + return val + def GetRightCol(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_GetRightCol,(self,) + _args, _kwargs) + return val + def Selecting(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_Selecting,(self,) + _args, _kwargs) + return val + def ControlDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_ControlDown,(self,) + _args, _kwargs) + return val + def MetaDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_MetaDown,(self,) + _args, _kwargs) + return val + def ShiftDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_ShiftDown,(self,) + _args, _kwargs) + return val + def AltDown(self, *_args, **_kwargs): + val = apply(gridc.wxGridRangeSelectEvent_AltDown,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridRangeSelectEvent(wxGridRangeSelectEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gridc.new_wxGridRangeSelectEvent,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxGRID_VALUE_STRING = gridc.wxGRID_VALUE_STRING +wxGRID_VALUE_BOOL = gridc.wxGRID_VALUE_BOOL +wxGRID_VALUE_NUMBER = gridc.wxGRID_VALUE_NUMBER +wxGRID_VALUE_FLOAT = gridc.wxGRID_VALUE_FLOAT +wxGRID_VALUE_CHOICE = gridc.wxGRID_VALUE_CHOICE +wxGRID_VALUE_TEXT = gridc.wxGRID_VALUE_TEXT +wxGRID_VALUE_LONG = gridc.wxGRID_VALUE_LONG +cvar = gridc.cvar +wxGridNoCellCoords = wxGridCellCoordsPtr(gridc.cvar.wxGridNoCellCoords) +wxGridNoCellRect = wxRectPtr(gridc.cvar.wxGridNoCellRect) +wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = gridc.wxGRIDTABLE_REQUEST_VIEW_GET_VALUES +wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES = gridc.wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES +wxGRIDTABLE_NOTIFY_ROWS_INSERTED = gridc.wxGRIDTABLE_NOTIFY_ROWS_INSERTED +wxGRIDTABLE_NOTIFY_ROWS_APPENDED = gridc.wxGRIDTABLE_NOTIFY_ROWS_APPENDED +wxGRIDTABLE_NOTIFY_ROWS_DELETED = gridc.wxGRIDTABLE_NOTIFY_ROWS_DELETED +wxGRIDTABLE_NOTIFY_COLS_INSERTED = gridc.wxGRIDTABLE_NOTIFY_COLS_INSERTED +wxGRIDTABLE_NOTIFY_COLS_APPENDED = gridc.wxGRIDTABLE_NOTIFY_COLS_APPENDED +wxGRIDTABLE_NOTIFY_COLS_DELETED = gridc.wxGRIDTABLE_NOTIFY_COLS_DELETED +wxEVT_GRID_CELL_LEFT_CLICK = gridc.wxEVT_GRID_CELL_LEFT_CLICK +wxEVT_GRID_CELL_RIGHT_CLICK = gridc.wxEVT_GRID_CELL_RIGHT_CLICK +wxEVT_GRID_CELL_LEFT_DCLICK = gridc.wxEVT_GRID_CELL_LEFT_DCLICK +wxEVT_GRID_CELL_RIGHT_DCLICK = gridc.wxEVT_GRID_CELL_RIGHT_DCLICK +wxEVT_GRID_LABEL_LEFT_CLICK = gridc.wxEVT_GRID_LABEL_LEFT_CLICK +wxEVT_GRID_LABEL_RIGHT_CLICK = gridc.wxEVT_GRID_LABEL_RIGHT_CLICK +wxEVT_GRID_LABEL_LEFT_DCLICK = gridc.wxEVT_GRID_LABEL_LEFT_DCLICK +wxEVT_GRID_LABEL_RIGHT_DCLICK = gridc.wxEVT_GRID_LABEL_RIGHT_DCLICK +wxEVT_GRID_ROW_SIZE = gridc.wxEVT_GRID_ROW_SIZE +wxEVT_GRID_COL_SIZE = gridc.wxEVT_GRID_COL_SIZE +wxEVT_GRID_RANGE_SELECT = gridc.wxEVT_GRID_RANGE_SELECT +wxEVT_GRID_CELL_CHANGE = gridc.wxEVT_GRID_CELL_CHANGE +wxEVT_GRID_SELECT_CELL = gridc.wxEVT_GRID_SELECT_CELL +wxEVT_GRID_EDITOR_SHOWN = gridc.wxEVT_GRID_EDITOR_SHOWN +wxEVT_GRID_EDITOR_HIDDEN = gridc.wxEVT_GRID_EDITOR_HIDDEN + + +#-------------- USER INCLUDE ----------------------- + + + +# Stuff these names into the wx namespace so wxPyConstructObject can find them + +wx.wxGridEventPtr = wxGridEventPtr +wx.wxGridSizeEventPtr = wxGridSizeEventPtr +wx.wxGridRangeSelectEventPtr = wxGridRangeSelectEventPtr +wx.wxGridCellRendererPtr = wxGridCellRendererPtr +wx.wxPyGridCellRendererPtr = wxPyGridCellRendererPtr +wx.wxGridCellEditorPtr = wxGridCellEditorPtr +wx.wxPyGridCellEditorPtr = wxPyGridCellEditorPtr +wx.wxGridCellAttrPtr = wxGridCellAttrPtr +wx.wxGridCellAttrProviderPtr = wxGridCellAttrProviderPtr +wx.wxPyGridCellAttrProviderPtr = wxPyGridCellAttrProviderPtr +wx.wxGridTableBasePtr = wxGridTableBasePtr +wx.wxPyGridTableBasePtr = wxPyGridTableBasePtr +wx.wxGridTableMessagePtr = wxGridTableMessagePtr +wx.wxGridCellCoordsPtr = wxGridCellCoordsPtr +wx.wxGridPtr = wxGridPtr diff --git a/utils/wxPython/modules/html/html.cpp b/wxPython/src/msw/html.cpp similarity index 91% rename from utils/wxPython/modules/html/html.cpp rename to wxPython/src/msw/html.cpp index 527702a74e..b2d3b303f0 100644 --- a/utils/wxPython/modules/html/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -1,9 +1,9 @@ /* - * FILE : ./html.cpp + * FILE : src/msw/html.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "htmlc" -#include "helpers.h" +#include "export.h" #include #include #include @@ -65,7 +67,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -112,12 +113,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; -#ifdef __WXMSW__ -wxString wxPyEmptyStr(""); -wxPoint wxPyDefaultPosition(wxDefaultPosition); -wxSize wxPyDefaultSize(wxDefaultSize); -#endif - class wxPyHtmlTagHandler : public wxHtmlTagHandler { public: wxPyHtmlTagHandler() : wxHtmlTagHandler() {}; @@ -162,12 +157,14 @@ public: } void OnExit() { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_tagHandlerClass); m_tagHandlerClass = NULL; for (size_t x=0; x < m_objArray.GetCount(); x++) { PyObject* obj = (PyObject*)m_objArray.Item(x); Py_DECREF(obj); } + wxPySaveThread(doSave); }; void FillHandlersTable(wxHtmlWinParser *parser) { @@ -225,9 +222,10 @@ IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("OnLinkClicked")) { - PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo"); - m_myInst.callCallback(Py_BuildValue("(O)", obj)); + if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) { + PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); + Py_DECREF(obj); } else wxHtmlWindow::OnLinkClicked(link); @@ -308,19 +306,41 @@ static PyObject *_wrap_new_wxHtmlLinkInfo(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxHtmlLinkInfo",_kwnames,&_obj0,&_obj1)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } if (_obj1) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -530,11 +550,22 @@ static PyObject *_wrap_wxHtmlTag_HasParam(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -571,11 +602,22 @@ static PyObject *_wrap_wxHtmlTag_GetParam(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -854,11 +896,22 @@ static PyObject *_wrap_wxHtmlParser_Parse(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -899,11 +952,22 @@ static PyObject *_wrap_wxHtmlParser_InitParser(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1069,11 +1133,22 @@ static PyObject *_wrap_wxHtmlParser_PushTagHandler(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1316,21 +1391,27 @@ static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args, return _resultobj; } -#define wxHtmlWinParser_SetFonts(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetFonts(_swigarg0,_swigarg1,_swigarg2)) +static void wxHtmlWinParser_SetFonts(wxHtmlWinParser *self,wxString normal_face,wxString fixed_face,PyObject * sizes) { + int* temp = int_LIST_helper(sizes); + if (temp) { + self->SetFonts(normal_face, fixed_face, temp); + delete [] temp; + } + } static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxHtmlWinParser * _arg0; wxString * _arg1; wxString * _arg2; - int * _arg3; + PyObject * _arg3; PyObject * _argo0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; - PyObject * _argo3 = 0; - char *_kwnames[] = { "self","normal_face","fixed_face","LIST", NULL }; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","normal_face","fixed_face","sizes", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWinParser_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_argo3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWinParser_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1340,26 +1421,44 @@ static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + _arg3 = _obj3; } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxHtmlWinParser_SetFonts. Expected _int_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; wxHtmlWinParser_SetFonts(_arg0,*_arg1,*_arg2,_arg3); @@ -1894,11 +1993,12 @@ static PyObject *_wrap_wxHtmlWinParser_SetLinkColor(PyObject *self, PyObject *ar wxHtmlWinParser * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","clr", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetLinkColor",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetLinkColor",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1907,13 +2007,11 @@ static PyObject *_wrap_wxHtmlWinParser_SetLinkColor(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinParser_SetLinkColor. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxHtmlWinParser_SetLinkColor(_arg0,*_arg1); @@ -1965,11 +2063,12 @@ static PyObject *_wrap_wxHtmlWinParser_SetActualColor(PyObject *self, PyObject * wxHtmlWinParser * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","clr", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetActualColor",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinParser_SetActualColor",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1978,13 +2077,11 @@ static PyObject *_wrap_wxHtmlWinParser_SetActualColor(PyObject *self, PyObject * return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinParser_SetActualColor. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxHtmlWinParser_SetActualColor(_arg0,*_arg1); @@ -2015,11 +2112,22 @@ static PyObject *_wrap_wxHtmlWinParser_SetLink(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2123,17 +2231,19 @@ static PyObject *_wrap_new_wxHtmlTagHandler(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxHtmlTagHandler__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxHtmlTagHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxHtmlTagHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlTagHandler * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlTagHandler__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlTagHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2145,9 +2255,12 @@ static PyObject *_wrap_wxHtmlTagHandler__setSelf(PyObject *self, PyObject *args, { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlTagHandler__setSelf(_arg0,_arg1); + wxHtmlTagHandler__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2294,17 +2407,19 @@ static PyObject *_wrap_new_wxHtmlWinTagHandler(PyObject *self, PyObject *args, P return _resultobj; } -#define wxHtmlWinTagHandler__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxHtmlWinTagHandler__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxHtmlWinTagHandler__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlWinTagHandler * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWinTagHandler__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWinTagHandler__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2316,9 +2431,12 @@ static PyObject *_wrap_wxHtmlWinTagHandler__setSelf(PyObject *self, PyObject *ar { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWinTagHandler__setSelf(_arg0,_arg1); + wxHtmlWinTagHandler__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -3459,11 +3577,12 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P wxHtmlContainerCell * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","clr", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlContainerCell_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3472,13 +3591,11 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxHtmlContainerCell_SetBackgroundColour(_arg0,*_arg1); @@ -3496,12 +3613,14 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *a wxColour * _arg1; wxColour * _arg2; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; + wxColour temp; + PyObject * _obj1 = 0; + wxColour temp0; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","clr1","clr2", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlContainerCell_SetBorder",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlContainerCell_SetBorder",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3510,20 +3629,16 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *a return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetBorder. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxHtmlContainerCell_SetBorder. Expected _wxColour_p."); +} +{ + _arg2 = &temp0; + if (! wxColour_helper(_obj2, &_arg2)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxHtmlContainerCell_SetBorder(_arg0,*_arg1,*_arg2); @@ -3582,20 +3697,19 @@ static PyObject *_wrap_new_wxHtmlColourCell(PyObject *self, PyObject *args, PyOb wxHtmlColourCell * _result; wxColour * _arg0; int _arg1 = (int ) (wxHTML_CLR_FOREGROUND); - PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj0 = 0; char *_kwnames[] = { "clr","flags", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxHtmlColourCell",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxHtmlColourCell",_kwnames,&_obj0,&_arg1)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxHtmlColourCell. Expected _wxColour_p."); +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; _result = (wxHtmlColourCell *)new_wxHtmlColourCell(*_arg0,_arg1); @@ -3834,8 +3948,8 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject wxPyHtmlWindow * _result; wxWindow * _arg0; int _arg1 = (int ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; int _arg4 = (int ) wxHW_SCROLLBAR_AUTO; char * _arg5 = (char *) "htmlWindow"; PyObject * _argo0 = 0; @@ -3883,17 +3997,19 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxHtmlWindow__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxHtmlWindow__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxHtmlWindow__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlWindow * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlWindow__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3905,9 +4021,12 @@ static PyObject *_wrap_wxHtmlWindow__setSelf(PyObject *self, PyObject *args, PyO { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWindow__setSelf(_arg0,_arg1); + wxHtmlWindow__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4102,21 +4221,27 @@ static PyObject *_wrap_wxHtmlWindow_SetRelatedStatusBar(PyObject *self, PyObject return _resultobj; } -#define wxHtmlWindow_SetFonts(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetFonts(_swigarg0,_swigarg1,_swigarg2)) +static void wxPyHtmlWindow_SetFonts(wxPyHtmlWindow *self,wxString normal_face,wxString fixed_face,PyObject * sizes) { + int* temp = int_LIST_helper(sizes); + if (temp) { + self->SetFonts(normal_face, fixed_face, temp); + delete [] temp; + } + } static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyHtmlWindow * _arg0; wxString * _arg1; wxString * _arg2; - int * _arg3; + PyObject * _arg3; PyObject * _argo0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; - PyObject * _argo3 = 0; - char *_kwnames[] = { "self","normal_face","fixed_face","LIST", NULL }; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","normal_face","fixed_face","sizes", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWindow_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_argo3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWindow_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4126,29 +4251,47 @@ static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + _arg3 = _obj3; } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxHtmlWindow_SetFonts. Expected _int_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - wxHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3); + wxPyHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4649,19 +4792,41 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } _arg3 = (bool ) tempbool3; { @@ -4825,19 +4990,41 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlText(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } _arg3 = (bool ) tempbool3; { @@ -4878,11 +5065,22 @@ static PyObject *_wrap_wxHtmlPrintout_SetHtmlFile(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4919,11 +5117,22 @@ static PyObject *_wrap_wxHtmlPrintout_SetHeader(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4960,11 +5169,22 @@ static PyObject *_wrap_wxHtmlPrintout_SetFooter(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5094,11 +5314,22 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewFile(PyObject *self, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5136,19 +5367,41 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PreviewText(PyObject *self, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5188,11 +5441,22 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintFile(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5230,19 +5494,41 @@ static PyObject *_wrap_wxHtmlEasyPrinting_PrintText(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5337,11 +5623,22 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetHeader(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5378,11 +5675,22 @@ static PyObject *_wrap_wxHtmlEasyPrinting_SetFooter(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5638,12 +5946,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlParser","_wxHtmlParser",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, + { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -5652,7 +5965,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_HtmlHistoryItem","_HtmlHistoryItem",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -5667,16 +5982,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_wxHtmlWidgetCell","_class_wxHtmlWidgetCell",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, - { "_wxGrid","_class_wxGrid",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, { "_class_wxHtmlEasyPrinting","_wxHtmlEasyPrinting",0}, { "_class_wxColourData","_wxColourData",0}, @@ -5684,6 +6001,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrinter","_class_wxPrinter",0}, { "_wxPen","_class_wxPen",0}, { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_class_wxNotebookSizer","_wxNotebookSizer",0}, { "_wxHtmlColourCell","_class_wxHtmlColourCell",0}, { "_byte","_unsigned_char",0}, { "_wxDataObject","_class_wxDataObject",0}, @@ -5707,6 +6025,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizer","_wxSizer",0}, { "_class_wxTIFFHandler","_wxTIFFHandler",0}, { "_class_wxPrintDialogData","_wxPrintDialogData",0}, + { "_wxGridSizer","_class_wxGridSizer",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, @@ -5719,10 +6038,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxProgressDialog","_class_wxProgressDialog",0}, { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, + { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -5731,26 +6052,28 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel}, { "_wxPanel","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, { "_wxTextDataObject","_class_wxTextDataObject",0}, { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxGrid","_wxGrid",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -5777,26 +6100,31 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxGridEvent","_class_wxGridEvent",0}, { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_wxHtmlCell","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, { "_wxHtmlCell","_class_wxHtmlColourCell",SwigwxHtmlColourCellTowxHtmlCell}, @@ -5804,15 +6132,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxHtmlCell","_class_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, { "_wxHtmlCell","_wxHtmlContainerCell",SwigwxHtmlContainerCellTowxHtmlCell}, { "_wxHtmlCell","_class_wxHtmlCell",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, @@ -5823,6 +6154,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -5834,6 +6166,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlTagHandler",0}, @@ -5853,22 +6186,30 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_wxHtmlWinParser","_class_wxHtmlWinParser",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxPanel}, @@ -5885,7 +6226,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, { "_class_wxTextCtrl","_wxTextCtrl",0}, + { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -5894,6 +6237,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, { "_class_wxPyHtmlWindow","_wxPyHtmlWindow",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -5903,15 +6247,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxHtmlLinkInfo","_wxHtmlLinkInfo",0}, { "_class_wxBrush","_wxBrush",0}, + { "_wxTipProvider","_class_wxTipProvider",0}, { "_class_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_class_wxPyHtmlTagHandler","_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler}, { "_class_wxPyHtmlTagHandler","_wxPyHtmlTagHandler",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_class_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -5922,15 +6270,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, - { "_wxGridCell","_class_wxGridCell",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_class_wxHtmlWinParser","_wxHtmlWinParser",0}, { "_class_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell}, @@ -5944,7 +6294,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -5952,20 +6304,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_class_wxHtmlTag","_wxHtmlTag",0}, { "_wxScrolledWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_wxScrolledWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -5976,6 +6331,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -5991,14 +6348,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_class_wxHtmlContainerCell","_wxHtmlContainerCell",0}, + { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, + { "_class_wxGridSizer","_wxGridSizer",0}, { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_class_wxNotebook","_wxNotebook",0}, { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -6009,6 +6370,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -6017,20 +6379,39 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, { "_wxPyHtmlWinTagHandler","_class_wxPyHtmlWinTagHandler",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_wxHtmlDCRenderer","_class_wxHtmlDCRenderer",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -6041,7 +6422,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -6052,6 +6432,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -6059,17 +6440,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, + { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, { "_wxTIFFHandler","_class_wxTIFFHandler",0}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, @@ -6080,20 +6467,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxHtmlParser","_wxHtmlWinParser",SwigwxHtmlWinParserTowxHtmlParser}, { "_wxHtmlParser","_class_wxHtmlParser",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxGridEvent","_wxGridEvent",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxGridCell","_wxGridCell",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxEvtHandler}, @@ -6103,10 +6491,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollBar","_wxScrollBar",0}, { "_class_wxColourDialog","_wxColourDialog",0}, { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, { "_class_wxScrolledWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_class_wxScrolledWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxScrolledWindow}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, @@ -6118,6 +6506,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPalette","_wxPalette",0}, { "_wxFileDataObject","_class_wxFileDataObject",0}, { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, + { "_wxNotebookSizer","_class_wxNotebookSizer",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, @@ -6129,6 +6518,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; @@ -6169,14 +6561,6 @@ SWIGEXPORT(void) inithtmlc() { wxClassInfo::CleanUpClasses(); wxClassInfo::InitializeClasses(); - - // Until wxFileSystem is wrapped... - #if wxUSE_FS_ZIP - wxFileSystem::AddHandler(new wxZipFSHandler); - #endif - #if wxUSE_FS_INET -// wxFileSystem::AddHandler(new wxInternetFSHandler); - #endif { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py new file mode 100644 index 0000000000..f8795bcd53 --- /dev/null +++ b/wxPython/src/msw/html.py @@ -0,0 +1,750 @@ +# This file was created automatically by SWIG. +import htmlc + +from misc import * + +from misc2 import * + +from windows import * + +from gdi import * + +from clip_dnd import * + +from events import * + +from streams import * + +from mdi import * + +from frames import * + +from stattool import * + +from controls import * + +from controls2 import * + +from windows2 import * + +from cmndlgs import * + +from windows3 import * + +from image import * + +from printfw import * + +from sizers import * + +from filesys import * + +from utils import * +import wx +class wxHtmlLinkInfoPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetHref(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlLinkInfo_GetHref,(self,) + _args, _kwargs) + return val + def GetTarget(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlLinkInfo_GetTarget,(self,) + _args, _kwargs) + return val + def GetEvent(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlLinkInfo_GetEvent,(self,) + _args, _kwargs) + if val: val = wxMouseEventPtr(val) + return val + def GetHtmlCell(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlLinkInfo_GetHtmlCell,(self,) + _args, _kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlLinkInfo(wxHtmlLinkInfoPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlLinkInfo,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlTagPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetName(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_GetName,(self,) + _args, _kwargs) + return val + def HasParam(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_HasParam,(self,) + _args, _kwargs) + return val + def GetParam(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_GetParam,(self,) + _args, _kwargs) + return val + def GetAllParams(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_GetAllParams,(self,) + _args, _kwargs) + return val + def IsEnding(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_IsEnding,(self,) + _args, _kwargs) + return val + def HasEnding(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_HasEnding,(self,) + _args, _kwargs) + return val + def GetBeginPos(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_GetBeginPos,(self,) + _args, _kwargs) + return val + def GetEndPos1(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_GetEndPos1,(self,) + _args, _kwargs) + return val + def GetEndPos2(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTag_GetEndPos2,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlTag(wxHtmlTagPtr): + def __init__(self,this): + self.this = this + + + + +class wxHtmlParserPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetFS(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_SetFS,(self,) + _args, _kwargs) + return val + def GetFS(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_GetFS,(self,) + _args, _kwargs) + if val: val = wxFileSystemPtr(val) + return val + def Parse(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_Parse,(self,) + _args, _kwargs) + return val + def InitParser(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_InitParser,(self,) + _args, _kwargs) + return val + def DoneParser(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_DoneParser,(self,) + _args, _kwargs) + return val + def DoParsing(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_DoParsing,(self,) + _args, _kwargs) + return val + def AddTagHandler(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_AddTagHandler,(self,) + _args, _kwargs) + return val + def GetSource(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_GetSource,(self,) + _args, _kwargs) + return val + def PushTagHandler(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_PushTagHandler,(self,) + _args, _kwargs) + return val + def PopTagHandler(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_PopTagHandler,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlParser(wxHtmlParserPtr): + def __init__(self,this): + self.this = this + + + + +class wxHtmlWinParserPtr(wxHtmlParserPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetDC(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetDC,(self,) + _args, _kwargs) + return val + def GetDC(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetDC,(self,) + _args, _kwargs) + if val: val = wxDCPtr(val) + return val + def GetCharHeight(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetCharHeight,(self,) + _args, _kwargs) + return val + def GetCharWidth(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetCharWidth,(self,) + _args, _kwargs) + return val + def GetWindow(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetWindow,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def SetFonts(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetFonts,(self,) + _args, _kwargs) + return val + def GetContainer(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetContainer,(self,) + _args, _kwargs) + if val: val = wxHtmlContainerCellPtr(val) + return val + def OpenContainer(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_OpenContainer,(self,) + _args, _kwargs) + if val: val = wxHtmlContainerCellPtr(val) + return val + def SetContainer(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetContainer,(self,) + _args, _kwargs) + if val: val = wxHtmlContainerCellPtr(val) + return val + def CloseContainer(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_CloseContainer,(self,) + _args, _kwargs) + if val: val = wxHtmlContainerCellPtr(val) + return val + def GetFontSize(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetFontSize,(self,) + _args, _kwargs) + return val + def SetFontSize(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetFontSize,(self,) + _args, _kwargs) + return val + def GetFontBold(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetFontBold,(self,) + _args, _kwargs) + return val + def SetFontBold(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetFontBold,(self,) + _args, _kwargs) + return val + def GetFontItalic(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetFontItalic,(self,) + _args, _kwargs) + return val + def SetFontItalic(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetFontItalic,(self,) + _args, _kwargs) + return val + def GetFontUnderlined(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetFontUnderlined,(self,) + _args, _kwargs) + return val + def SetFontUnderlined(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetFontUnderlined,(self,) + _args, _kwargs) + return val + def GetFontFixed(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetFontFixed,(self,) + _args, _kwargs) + return val + def SetFontFixed(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetFontFixed,(self,) + _args, _kwargs) + return val + def GetAlign(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetAlign,(self,) + _args, _kwargs) + return val + def SetAlign(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetAlign,(self,) + _args, _kwargs) + return val + def GetLinkColor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetLinkColor,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def SetLinkColor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetLinkColor,(self,) + _args, _kwargs) + return val + def GetActualColor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetActualColor,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def SetActualColor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetActualColor,(self,) + _args, _kwargs) + return val + def SetLink(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_SetLink,(self,) + _args, _kwargs) + return val + def CreateCurrentFont(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_CreateCurrentFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def GetLink(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinParser_GetLink,(self,) + _args, _kwargs) + if val: val = wxHtmlLinkInfoPtr(val) ; val.thisown = 1 + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlWinParser(wxHtmlWinParserPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlWinParser,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlTagHandlerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTagHandler__setSelf,(self,) + _args, _kwargs) + return val + def SetParser(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTagHandler_SetParser,(self,) + _args, _kwargs) + return val + def GetParser(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTagHandler_GetParser,(self,) + _args, _kwargs) + if val: val = wxHtmlParserPtr(val) + return val + def ParseInner(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlTagHandler_ParseInner,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlTagHandler(wxHtmlTagHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlTagHandler,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxHtmlTagHandler) + + + + +class wxHtmlWinTagHandlerPtr(wxHtmlTagHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setSelf(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinTagHandler__setSelf,(self,) + _args, _kwargs) + return val + def SetParser(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinTagHandler_SetParser,(self,) + _args, _kwargs) + return val + def GetParser(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinTagHandler_GetParser,(self,) + _args, _kwargs) + if val: val = wxHtmlWinParserPtr(val) + return val + def ParseInner(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWinTagHandler_ParseInner,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlWinTagHandler(wxHtmlWinTagHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlWinTagHandler,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxHtmlWinTagHandler) + + + + +class wxHtmlCellPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPosX(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetPosX,(self,) + _args, _kwargs) + return val + def GetPosY(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetPosY,(self,) + _args, _kwargs) + return val + def GetWidth(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetWidth,(self,) + _args, _kwargs) + return val + def GetHeight(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetHeight,(self,) + _args, _kwargs) + return val + def GetDescent(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetDescent,(self,) + _args, _kwargs) + return val + def GetLink(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetLink,(self,) + _args, _kwargs) + if val: val = wxHtmlLinkInfoPtr(val) + return val + def GetNext(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetNext,(self,) + _args, _kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def GetParent(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_GetParent,(self,) + _args, _kwargs) + if val: val = wxHtmlContainerCellPtr(val) + return val + def SetLink(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_SetLink,(self,) + _args, _kwargs) + return val + def SetNext(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_SetNext,(self,) + _args, _kwargs) + return val + def SetParent(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_SetParent,(self,) + _args, _kwargs) + return val + def SetPos(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_SetPos,(self,) + _args, _kwargs) + return val + def Layout(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_Layout,(self,) + _args, _kwargs) + return val + def Draw(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_Draw,(self,) + _args, _kwargs) + return val + def DrawInvisible(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_DrawInvisible,(self,) + _args, _kwargs) + return val + def Find(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_Find,(self,) + _args, _kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def AdjustPagebreak(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_AdjustPagebreak,(self,) + _args, _kwargs) + return val + def SetCanLiveOnPagebreak(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlCell_SetCanLiveOnPagebreak,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlCell(wxHtmlCellPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlCell,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlContainerCellPtr(wxHtmlCellPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def InsertCell(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_InsertCell,(self,) + _args, _kwargs) + return val + def SetAlignHor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetAlignHor,(self,) + _args, _kwargs) + return val + def GetAlignHor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_GetAlignHor,(self,) + _args, _kwargs) + return val + def SetAlignVer(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetAlignVer,(self,) + _args, _kwargs) + return val + def GetAlignVer(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_GetAlignVer,(self,) + _args, _kwargs) + return val + def SetIndent(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetIndent,(self,) + _args, _kwargs) + return val + def GetIndent(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_GetIndent,(self,) + _args, _kwargs) + return val + def GetIndentUnits(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_GetIndentUnits,(self,) + _args, _kwargs) + return val + def SetAlign(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetAlign,(self,) + _args, _kwargs) + return val + def SetWidthFloat(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetWidthFloat,(self,) + _args, _kwargs) + return val + def SetWidthFloatFromTag(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetWidthFloatFromTag,(self,) + _args, _kwargs) + return val + def SetMinHeight(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetMinHeight,(self,) + _args, _kwargs) + return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetBorder(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_SetBorder,(self,) + _args, _kwargs) + return val + def GetFirstCell(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_GetFirstCell,(self,) + _args, _kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlContainerCell(wxHtmlContainerCellPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlContainerCell,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlColourCellPtr(wxHtmlCellPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxHtmlColourCell(wxHtmlColourCellPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlColourCell,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlWidgetCellPtr(wxHtmlCellPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxHtmlWidgetCell(wxHtmlWidgetCellPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlWidgetCell,_args,_kwargs) + self.thisown = 1 + + + + +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 "" % (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 _setSelf(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow__setSelf,(self,) + _args, _kwargs) + return val + 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 ReadCustomization(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_ReadCustomization,(self,) + _args, _kwargs) + return val + def WriteCustomization(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_WriteCustomization,(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 GetInternalRepresentation(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_GetInternalRepresentation,(self,) + _args, _kwargs) + if val: val = wxHtmlContainerCellPtr(val) + return val + def GetParser(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_GetParser,(self,) + _args, _kwargs) + if val: val = wxHtmlWinParserPtr(val) + return val + def base_OnLinkClicked(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_base_OnLinkClicked,(self,) + _args, _kwargs) + return val + def base_OnSetTitle(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_base_OnSetTitle,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlWindow(wxHtmlWindowPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlWindow,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxHtmlWindow) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) + + + + +class wxHtmlDCRendererPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,htmlc=htmlc): + if self.thisown == 1 : + htmlc.delete_wxHtmlDCRenderer(self) + def SetDC(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlDCRenderer_SetDC,(self,) + _args, _kwargs) + return val + def SetSize(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlDCRenderer_SetSize,(self,) + _args, _kwargs) + return val + def SetHtmlText(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlDCRenderer_SetHtmlText,(self,) + _args, _kwargs) + return val + def Render(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlDCRenderer_Render,(self,) + _args, _kwargs) + return val + def GetTotalHeight(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlDCRenderer_GetTotalHeight,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlDCRenderer(wxHtmlDCRendererPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlDCRenderer,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlPrintoutPtr(wxPrintoutPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,htmlc=htmlc): + if self.thisown == 1 : + htmlc.delete_wxHtmlPrintout(self) + def SetHtmlText(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlPrintout_SetHtmlText,(self,) + _args, _kwargs) + return val + def SetHtmlFile(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlPrintout_SetHtmlFile,(self,) + _args, _kwargs) + return val + def SetHeader(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlPrintout_SetHeader,(self,) + _args, _kwargs) + return val + def SetFooter(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlPrintout_SetFooter,(self,) + _args, _kwargs) + return val + def SetMargins(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlPrintout_SetMargins,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlPrintout(wxHtmlPrintoutPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlPrintout,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlEasyPrintingPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,htmlc=htmlc): + if self.thisown == 1 : + htmlc.delete_wxHtmlEasyPrinting(self) + def PreviewFile(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_PreviewFile,(self,) + _args, _kwargs) + return val + def PreviewText(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_PreviewText,(self,) + _args, _kwargs) + return val + def PrintFile(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_PrintFile,(self,) + _args, _kwargs) + return val + def PrintText(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_PrintText,(self,) + _args, _kwargs) + return val + def PrinterSetup(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_PrinterSetup,(self,) + _args, _kwargs) + return val + def PageSetup(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_PageSetup,(self,) + _args, _kwargs) + return val + def SetHeader(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_SetHeader,(self,) + _args, _kwargs) + return val + def SetFooter(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_SetFooter,(self,) + _args, _kwargs) + return val + def GetPrintData(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_GetPrintData,(self,) + _args, _kwargs) + if val: val = wxPrintDataPtr(val) + return val + def GetPageSetupData(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlEasyPrinting_GetPageSetupData,(self,) + _args, _kwargs) + if val: val = wxPageSetupDialogDataPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlEasyPrinting(wxHtmlEasyPrintingPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlEasyPrinting,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +wxHtmlWinParser_AddTagHandler = htmlc.wxHtmlWinParser_AddTagHandler + +wxHtmlWindow_AddFilter = htmlc.wxHtmlWindow_AddFilter + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxHTML_ALIGN_LEFT = htmlc.wxHTML_ALIGN_LEFT +wxHTML_ALIGN_CENTER = htmlc.wxHTML_ALIGN_CENTER +wxHTML_ALIGN_RIGHT = htmlc.wxHTML_ALIGN_RIGHT +wxHTML_ALIGN_BOTTOM = htmlc.wxHTML_ALIGN_BOTTOM +wxHTML_ALIGN_TOP = htmlc.wxHTML_ALIGN_TOP +wxHTML_CLR_FOREGROUND = htmlc.wxHTML_CLR_FOREGROUND +wxHTML_CLR_BACKGROUND = htmlc.wxHTML_CLR_BACKGROUND +wxHTML_UNITS_PIXELS = htmlc.wxHTML_UNITS_PIXELS +wxHTML_UNITS_PERCENT = htmlc.wxHTML_UNITS_PERCENT +wxHTML_INDENT_LEFT = htmlc.wxHTML_INDENT_LEFT +wxHTML_INDENT_RIGHT = htmlc.wxHTML_INDENT_RIGHT +wxHTML_INDENT_TOP = htmlc.wxHTML_INDENT_TOP +wxHTML_INDENT_BOTTOM = htmlc.wxHTML_INDENT_BOTTOM +wxHTML_INDENT_HORIZONTAL = htmlc.wxHTML_INDENT_HORIZONTAL +wxHTML_INDENT_VERTICAL = htmlc.wxHTML_INDENT_VERTICAL +wxHTML_INDENT_ALL = htmlc.wxHTML_INDENT_ALL +wxHTML_COND_ISANCHOR = htmlc.wxHTML_COND_ISANCHOR +wxHTML_COND_ISIMAGEMAP = htmlc.wxHTML_COND_ISIMAGEMAP +wxHTML_COND_USER = htmlc.wxHTML_COND_USER +wxPAGE_ODD = htmlc.wxPAGE_ODD +wxPAGE_EVEN = htmlc.wxPAGE_EVEN +wxPAGE_ALL = htmlc.wxPAGE_ALL + + +#-------------- USER INCLUDE ----------------------- + + +# Stuff these names into the wx namespace so wxPyConstructObject can find them +import wx +wx.wxHtmlTagPtr = wxHtmlTagPtr +wx.wxHtmlParserPtr = wxHtmlParserPtr +wx.wxHtmlWinParserPtr = wxHtmlWinParserPtr +wx.wxHtmlTagHandlerPtr = wxHtmlTagHandlerPtr +wx.wxHtmlWinTagHandlerPtr = wxHtmlWinTagHandlerPtr +wx.wxHtmlCellPtr = wxHtmlCellPtr +wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr +wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr +wx.HtmlHistoryItemPtr = HtmlHistoryItemPtr +wx.wxHtmlWindowPtr = wxHtmlWindowPtr +wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr diff --git a/utils/wxPython/modules/html/htmlhelp.cpp b/wxPython/src/msw/htmlhelp.cpp similarity index 89% rename from utils/wxPython/modules/html/htmlhelp.cpp rename to wxPython/src/msw/htmlhelp.cpp index ca05dc43ee..0eebb250fd 100644 --- a/utils/wxPython/modules/html/htmlhelp.cpp +++ b/wxPython/src/msw/htmlhelp.cpp @@ -1,9 +1,9 @@ /* - * FILE : ./htmlhelp.cpp + * FILE : src/msw/htmlhelp.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -53,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "htmlhelpc" -#include "helpers.h" +#include "export.h" #include #include #include @@ -63,7 +65,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -486,25 +487,58 @@ static PyObject *_wrap_new_wxHtmlBookRecord(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:new_wxHtmlBookRecord",_kwnames,&_obj0,&_obj1,&_obj2)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1263,11 +1297,22 @@ static PyObject *_wrap_wxHtmlHelpData_SetTempDir(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1304,11 +1349,22 @@ static PyObject *_wrap_wxHtmlHelpData_AddBook(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1344,11 +1400,22 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageByName(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1609,11 +1676,22 @@ static PyObject *_wrap_new_wxHtmlHelpFrame(PyObject *self, PyObject *args, PyObj } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo4) { if (_argo4 == Py_None) { _arg4 = NULL; } @@ -1695,11 +1773,22 @@ static PyObject *_wrap_wxHtmlHelpFrame_SetTitleFormat(PyObject *self, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1735,11 +1824,22 @@ static PyObject *_wrap_wxHtmlHelpFrame_Display(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1858,11 +1958,22 @@ static PyObject *_wrap_wxHtmlHelpFrame_KeywordSearch(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1907,11 +2018,22 @@ static PyObject *_wrap_wxHtmlHelpFrame_UseConfig(PyObject *self, PyObject *args, } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1957,11 +2079,22 @@ static PyObject *_wrap_wxHtmlHelpFrame_ReadCustomization(PyObject *self, PyObjec } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2007,11 +2140,22 @@ static PyObject *_wrap_wxHtmlHelpFrame_WriteCustomization(PyObject *self, PyObje } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2107,11 +2251,22 @@ static PyObject *_wrap_wxHtmlHelpController_SetTitleFormat(PyObject *self, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2147,11 +2302,22 @@ static PyObject *_wrap_wxHtmlHelpController_SetTempDir(PyObject *self, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2189,11 +2355,22 @@ static PyObject *_wrap_wxHtmlHelpController_AddBook(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2228,11 +2405,22 @@ static PyObject *_wrap_wxHtmlHelpController_Display(PyObject *self, PyObject *ar } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2351,11 +2539,22 @@ static PyObject *_wrap_wxHtmlHelpController_KeywordSearch(PyObject *self, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2400,11 +2599,22 @@ static PyObject *_wrap_wxHtmlHelpController_UseConfig(PyObject *self, PyObject * } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2450,11 +2660,22 @@ static PyObject *_wrap_wxHtmlHelpController_ReadCustomization(PyObject *self, Py } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2500,11 +2721,22 @@ static PyObject *_wrap_wxHtmlHelpController_WriteCustomization(PyObject *self, P } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2642,12 +2874,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlParser","_wxHtmlParser",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, + { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -2656,7 +2893,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_HtmlHistoryItem","_HtmlHistoryItem",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, @@ -2674,16 +2913,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, { "_wxHtmlWidgetCell","_class_wxHtmlWidgetCell",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, - { "_wxGrid","_class_wxGrid",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, { "_class_wxHtmlEasyPrinting","_wxHtmlEasyPrinting",0}, { "_class_wxColourData","_wxColourData",0}, @@ -2692,6 +2933,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxHtmlHelpController","_wxHtmlHelpController",0}, { "_wxPen","_class_wxPen",0}, { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_class_wxNotebookSizer","_wxNotebookSizer",0}, { "_wxHtmlColourCell","_class_wxHtmlColourCell",0}, { "_byte","_unsigned_char",0}, { "_wxDataObject","_class_wxDataObject",0}, @@ -2713,6 +2955,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizer","_wxSizer",0}, { "_class_wxTIFFHandler","_wxTIFFHandler",0}, { "_class_wxPrintDialogData","_wxPrintDialogData",0}, + { "_wxGridSizer","_class_wxGridSizer",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, @@ -2725,10 +2968,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxProgressDialog","_class_wxProgressDialog",0}, { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, + { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -2737,24 +2982,26 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, { "_class_wxStatusBar","_wxStatusBar",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxPySizer","_wxPySizer",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, { "_wxTextDataObject","_class_wxTextDataObject",0}, { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, - { "_class_wxGrid","_wxGrid",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -2779,36 +3026,44 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, { "_wxSplitterEvent","_class_wxSplitterEvent",0}, - { "_wxGridEvent","_class_wxGridEvent",0}, { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_wxHtmlCell","_class_wxHtmlCell",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_char","_wxDash",0}, + { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, @@ -2820,6 +3075,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -2831,6 +3087,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_wxPyHtmlTagHandler","_class_wxPyHtmlTagHandler",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -2848,23 +3105,31 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_wxHtmlWinParser","_class_wxHtmlWinParser",0}, { "_wxHtmlSearchStatus","_class_wxHtmlSearchStatus",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -2879,7 +3144,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, { "_class_wxTextCtrl","_wxTextCtrl",0}, + { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_class_wxMoveEvent","_wxMoveEvent",0}, @@ -2890,6 +3157,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyHtmlWindow","_wxPyHtmlWindow",0}, { "_wxHtmlHelpFrameCfg","_class_wxHtmlHelpFrameCfg",0}, { "_wxHtmlHelpController","_class_wxHtmlHelpController",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -2899,13 +3167,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxHtmlLinkInfo","_wxHtmlLinkInfo",0}, { "_class_wxBrush","_wxBrush",0}, + { "_wxTipProvider","_class_wxTipProvider",0}, { "_class_wxPyHtmlTagHandler","_wxPyHtmlTagHandler",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_class_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -2916,15 +3188,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, - { "_wxGridCell","_class_wxGridCell",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, { "_class_wxHtmlWinParser","_wxHtmlWinParser",0}, { "_class_wxHtmlCell","_wxHtmlCell",0}, @@ -2933,7 +3207,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_short",0}, { "_wxMemoryDC","_class_wxMemoryDC",0}, { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_class_wxHtmlHelpData","_wxHtmlHelpData",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, @@ -2942,19 +3218,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxStatusBar","_class_wxStatusBar",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_class_wxHtmlTag","_wxHtmlTag",0}, { "_class_wxHtmlBookRecord","_wxHtmlBookRecord",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_wxControl","_class_wxControl",0}, { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2966,6 +3245,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -2982,16 +3263,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxHtmlHelpFrame","_class_wxHtmlHelpFrame",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, { "_class_wxHtmlContainerCell","_wxHtmlContainerCell",0}, + { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_wxFrame","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, + { "_class_wxGridSizer","_wxGridSizer",0}, { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_class_wxNotebook","_wxNotebook",0}, { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3002,6 +3287,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3010,20 +3296,39 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, { "_wxPyHtmlWinTagHandler","_class_wxPyHtmlWinTagHandler",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_wxHtmlDCRenderer","_class_wxHtmlDCRenderer",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -3034,7 +3339,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -3045,6 +3349,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -3052,18 +3357,24 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_class_wxHtmlHelpFrame","_wxHtmlHelpFrame",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, + { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, { "_wxTIFFHandler","_class_wxTIFFHandler",0}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, @@ -3072,20 +3383,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_wxHtmlParser","_class_wxHtmlParser",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxGridEvent","_wxGridEvent",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_class_wxPyHtmlWinTagHandler","_wxPyHtmlWinTagHandler",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, - { "_class_wxGridCell","_wxGridCell",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_HtmlHistoryItem","_class_HtmlHistoryItem",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler}, @@ -3097,8 +3409,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollBar","_wxScrollBar",0}, { "_class_wxColourDialog","_wxColourDialog",0}, { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_char",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, @@ -3110,6 +3422,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPalette","_wxPalette",0}, { "_wxFileDataObject","_class_wxFileDataObject",0}, { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, + { "_wxNotebookSizer","_class_wxNotebookSizer",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, @@ -3121,6 +3434,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindow","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxWindow}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_class_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_class_wxFrame","_wxHtmlHelpFrame",SwigwxHtmlHelpFrameTowxFrame}, { "_class_wxFrame","_wxFrame",0}, diff --git a/wxPython/src/msw/htmlhelp.py b/wxPython/src/msw/htmlhelp.py new file mode 100644 index 0000000000..848ed85489 --- /dev/null +++ b/wxPython/src/msw/htmlhelp.py @@ -0,0 +1,362 @@ +# This file was created automatically by SWIG. +import htmlhelpc + +from misc import * + +from misc2 import * + +from windows import * + +from gdi import * + +from clip_dnd import * + +from events import * + +from streams import * + +from mdi import * + +from frames import * + +from stattool import * + +from controls import * + +from controls2 import * + +from windows2 import * + +from cmndlgs import * + +from windows3 import * + +from image import * + +from printfw import * + +from sizers import * + +from filesys import * + +from utils import * +class wxHtmlHelpFrameCfgPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __setattr__(self,name,value): + if name == "x" : + htmlhelpc.wxHtmlHelpFrameCfg_x_set(self,value) + return + if name == "y" : + htmlhelpc.wxHtmlHelpFrameCfg_y_set(self,value) + return + if name == "w" : + htmlhelpc.wxHtmlHelpFrameCfg_w_set(self,value) + return + if name == "h" : + htmlhelpc.wxHtmlHelpFrameCfg_h_set(self,value) + return + if name == "sashpos" : + htmlhelpc.wxHtmlHelpFrameCfg_sashpos_set(self,value) + return + if name == "navig_on" : + htmlhelpc.wxHtmlHelpFrameCfg_navig_on_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "x" : + return htmlhelpc.wxHtmlHelpFrameCfg_x_get(self) + if name == "y" : + return htmlhelpc.wxHtmlHelpFrameCfg_y_get(self) + if name == "w" : + return htmlhelpc.wxHtmlHelpFrameCfg_w_get(self) + if name == "h" : + return htmlhelpc.wxHtmlHelpFrameCfg_h_get(self) + if name == "sashpos" : + return htmlhelpc.wxHtmlHelpFrameCfg_sashpos_get(self) + if name == "navig_on" : + return htmlhelpc.wxHtmlHelpFrameCfg_navig_on_get(self) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) +class wxHtmlHelpFrameCfg(wxHtmlHelpFrameCfgPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlhelpc.new_wxHtmlHelpFrameCfg,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlBookRecordPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetTitle(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlBookRecord_GetTitle,(self,) + _args, _kwargs) + return val + def GetStart(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlBookRecord_GetStart,(self,) + _args, _kwargs) + return val + def GetBasePath(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlBookRecord_GetBasePath,(self,) + _args, _kwargs) + return val + def SetContentsRange(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlBookRecord_SetContentsRange,(self,) + _args, _kwargs) + return val + def GetContentsStart(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlBookRecord_GetContentsStart,(self,) + _args, _kwargs) + return val + def GetContentsEnd(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlBookRecord_GetContentsEnd,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlBookRecord(wxHtmlBookRecordPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlhelpc.new_wxHtmlBookRecord,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlContentsItemPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __setattr__(self,name,value): + if name == "m_Level" : + htmlhelpc.wxHtmlContentsItem_m_Level_set(self,value) + return + if name == "m_ID" : + htmlhelpc.wxHtmlContentsItem_m_ID_set(self,value) + return + if name == "m_Name" : + htmlhelpc.wxHtmlContentsItem_m_Name_set(self,value) + return + if name == "m_Page" : + htmlhelpc.wxHtmlContentsItem_m_Page_set(self,value) + return + if name == "m_Book" : + htmlhelpc.wxHtmlContentsItem_m_Book_set(self,value.this) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_Level" : + return htmlhelpc.wxHtmlContentsItem_m_Level_get(self) + if name == "m_ID" : + return htmlhelpc.wxHtmlContentsItem_m_ID_get(self) + if name == "m_Name" : + return htmlhelpc.wxHtmlContentsItem_m_Name_get(self) + if name == "m_Page" : + return htmlhelpc.wxHtmlContentsItem_m_Page_get(self) + if name == "m_Book" : + return wxHtmlBookRecordPtr(htmlhelpc.wxHtmlContentsItem_m_Book_get(self)) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) +class wxHtmlContentsItem(wxHtmlContentsItemPtr): + def __init__(self,this): + self.this = this + + + + +class wxHtmlSearchStatusPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Search(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlSearchStatus_Search,(self,) + _args, _kwargs) + return val + def IsActive(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlSearchStatus_IsActive,(self,) + _args, _kwargs) + return val + def GetCurIndex(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlSearchStatus_GetCurIndex,(self,) + _args, _kwargs) + return val + def GetMaxIndex(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlSearchStatus_GetMaxIndex,(self,) + _args, _kwargs) + return val + def GetName(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlSearchStatus_GetName,(self,) + _args, _kwargs) + return val + def GetContentsItem(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlSearchStatus_GetContentsItem,(self,) + _args, _kwargs) + if val: val = wxHtmlContentsItemPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlSearchStatus(wxHtmlSearchStatusPtr): + def __init__(self,this): + self.this = this + + + + +class wxHtmlHelpDataPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,htmlhelpc=htmlhelpc): + if self.thisown == 1 : + htmlhelpc.delete_wxHtmlHelpData(self) + def SetTempDir(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_SetTempDir,(self,) + _args, _kwargs) + return val + def AddBook(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_AddBook,(self,) + _args, _kwargs) + return val + def FindPageByName(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_FindPageByName,(self,) + _args, _kwargs) + return val + def FindPageById(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_FindPageById,(self,) + _args, _kwargs) + return val + def GetBookRecArray(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_GetBookRecArray,(self,) + _args, _kwargs) + return val + def GetContents(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_GetContents,(self,) + _args, _kwargs) + if val: val = wxHtmlContentsItemPtr(val) + return val + def GetContentsCnt(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_GetContentsCnt,(self,) + _args, _kwargs) + return val + def GetIndex(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_GetIndex,(self,) + _args, _kwargs) + if val: val = wxHtmlContentsItemPtr(val) + return val + def GetIndexCnt(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpData_GetIndexCnt,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlHelpData(wxHtmlHelpDataPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlhelpc.new_wxHtmlHelpData,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlHelpFramePtr(wxFramePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetData(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_GetData,(self,) + _args, _kwargs) + if val: val = wxHtmlHelpDataPtr(val) + return val + def SetTitleFormat(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_SetTitleFormat,(self,) + _args, _kwargs) + return val + def Display(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_Display,(self,) + _args, _kwargs) + return val + def DisplayID(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_DisplayID,(self,) + _args, _kwargs) + return val + def DisplayContents(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_DisplayContents,(self,) + _args, _kwargs) + return val + def DisplayIndex(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_DisplayIndex,(self,) + _args, _kwargs) + return val + def KeywordSearch(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_KeywordSearch,(self,) + _args, _kwargs) + return val + def UseConfig(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_UseConfig,(self,) + _args, _kwargs) + return val + def ReadCustomization(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_ReadCustomization,(self,) + _args, _kwargs) + return val + def WriteCustomization(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpFrame_WriteCustomization,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlHelpFrame(wxHtmlHelpFramePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlhelpc.new_wxHtmlHelpFrame,_args,_kwargs) + self.thisown = 1 + + + + +class wxHtmlHelpControllerPtr(wxEvtHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,htmlhelpc=htmlhelpc): + if self.thisown == 1 : + htmlhelpc.delete_wxHtmlHelpController(self) + def SetTitleFormat(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_SetTitleFormat,(self,) + _args, _kwargs) + return val + def SetTempDir(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_SetTempDir,(self,) + _args, _kwargs) + return val + def AddBook(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_AddBook,(self,) + _args, _kwargs) + return val + def Display(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_Display,(self,) + _args, _kwargs) + return val + def DisplayID(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_DisplayID,(self,) + _args, _kwargs) + return val + def DisplayContents(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_DisplayContents,(self,) + _args, _kwargs) + return val + def DisplayIndex(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_DisplayIndex,(self,) + _args, _kwargs) + return val + def KeywordSearch(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_KeywordSearch,(self,) + _args, _kwargs) + return val + def UseConfig(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_UseConfig,(self,) + _args, _kwargs) + return val + def ReadCustomization(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_ReadCustomization,(self,) + _args, _kwargs) + return val + def WriteCustomization(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_WriteCustomization,(self,) + _args, _kwargs) + return val + def GetFrame(self, *_args, **_kwargs): + val = apply(htmlhelpc.wxHtmlHelpController_GetFrame,(self,) + _args, _kwargs) + if val: val = wxHtmlHelpFramePtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlHelpController(wxHtmlHelpControllerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlhelpc.new_wxHtmlHelpController,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxID_HTML_PANEL = htmlhelpc.wxID_HTML_PANEL +wxID_HTML_BACK = htmlhelpc.wxID_HTML_BACK +wxID_HTML_FORWARD = htmlhelpc.wxID_HTML_FORWARD +wxID_HTML_TREECTRL = htmlhelpc.wxID_HTML_TREECTRL +wxID_HTML_INDEXPAGE = htmlhelpc.wxID_HTML_INDEXPAGE +wxID_HTML_INDEXLIST = htmlhelpc.wxID_HTML_INDEXLIST +wxID_HTML_NOTEBOOK = htmlhelpc.wxID_HTML_NOTEBOOK +wxID_HTML_SEARCHPAGE = htmlhelpc.wxID_HTML_SEARCHPAGE +wxID_HTML_SEARCHTEXT = htmlhelpc.wxID_HTML_SEARCHTEXT +wxID_HTML_SEARCHLIST = htmlhelpc.wxID_HTML_SEARCHLIST +wxID_HTML_SEARCHBUTTON = htmlhelpc.wxID_HTML_SEARCHBUTTON +wxID_HTML_SEARCHCHOICE = htmlhelpc.wxID_HTML_SEARCHCHOICE +wxID_HTML_HELPFRAME = htmlhelpc.wxID_HTML_HELPFRAME diff --git a/utils/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp similarity index 80% rename from utils/wxPython/src/msw/image.cpp rename to wxPython/src/msw/image.cpp index f2e97ed8c0..c46c40550f 100644 --- a/utils/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/image.cpp + * FILE : src/msw/image.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,7 +60,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -191,18 +192,40 @@ static PyObject *_wrap_wxImageFromMime(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImageFromMime",_kwnames,&_obj0,&_obj1)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -446,11 +469,22 @@ static PyObject *_wrap_wxImageHandler_SetName(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -486,11 +520,22 @@ static PyObject *_wrap_wxImageHandler_SetExtension(PyObject *self, PyObject *arg } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -554,11 +599,22 @@ static PyObject *_wrap_wxImageHandler_SetMimeType(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -810,7 +866,7 @@ static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwa PyObject * _resultobj; wxImage * _result; wxString * _arg0; - long _arg1 = (long ) wxBITMAP_TYPE_PNG; + long _arg1 = (long ) wxBITMAP_TYPE_ANY; PyObject * _obj0 = 0; char *_kwnames[] = { "name","type", NULL }; char _ptemp[128]; @@ -819,11 +875,22 @@ static PyObject *_wrap_new_wxImage(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:new_wxImage",_kwnames,&_obj0,&_arg1)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -990,11 +1057,13 @@ static PyObject *_wrap_wxImage_Scale(PyObject *self, PyObject *args, PyObject *k #define wxImage_Rescale(_swigobj,_swigarg0,_swigarg1) (_swigobj->Rescale(_swigarg0,_swigarg1)) static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxImage * _result; wxImage * _arg0; int _arg1; int _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","width","height", NULL }; + char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxImage_Rescale",_kwnames,&_argo0,&_arg1,&_arg2)) @@ -1008,11 +1077,17 @@ static PyObject *_wrap_wxImage_Rescale(PyObject *self, PyObject *args, PyObject } { wxPy_BEGIN_ALLOW_THREADS; - wxImage_Rescale(_arg0,_arg1,_arg2); + wxImage & _result_ref = wxImage_Rescale(_arg0,_arg1,_arg2); + _result = (wxImage *) &_result_ref; wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } @@ -1157,11 +1232,22 @@ static PyObject *_wrap_wxImage_LoadFile(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1199,18 +1285,40 @@ static PyObject *_wrap_wxImage_LoadMimeFile(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1251,11 +1359,22 @@ static PyObject *_wrap_wxImage_SaveFile(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1293,18 +1412,40 @@ static PyObject *_wrap_wxImage_SaveMimeFile(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1441,6 +1582,73 @@ static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxImage_Copy(_swigobj) (_swigobj->Copy()) +static PyObject *_wrap_wxImage_Copy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_Copy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Copy. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Copy(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Paste(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Paste(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _arg0; + wxImage * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","image","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxImage_Paste",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Paste. Expected _wxImage_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImage_Paste(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject * wxImage_GetData(wxImage *self) { unsigned char* data = self->GetData(); int len = self->GetWidth() * self->GetHeight() * 3; @@ -1483,7 +1691,7 @@ static void wxImage_SetData(wxImage *self,PyObject * data) { } size_t len = self->GetWidth() * self->GetHeight() * 3; - dataPtr = new unsigned char[len]; + dataPtr = (unsigned char*) malloc(len); memcpy(dataPtr, PyString_AsString(data), len); self->SetData(dataPtr); } @@ -1686,7 +1894,187 @@ static PyObject *_wrap_wxImage_HasMask(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxImage_Rotate(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Rotate(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxImage_Rotate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + double _arg1; + wxPoint * _arg2; + bool _arg3 = (bool ) TRUE; + wxPoint * _arg4 = (wxPoint *) NULL; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + wxPoint temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","angle","centre_of_rotation","interpolating","offset_after_rotation", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OdO|iO:wxImage_Rotate",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3,&_obj4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rotate. Expected _wxImage_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + _arg3 = (bool ) tempbool3; + if (_obj4) +{ + _arg4 = &temp0; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Rotate(_arg0,_arg1,*_arg2,_arg3,_arg4)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Rotate90(_swigobj,_swigarg0) (_swigobj->Rotate90(_swigarg0)) +static PyObject *_wrap_wxImage_Rotate90(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","clockwise", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxImage_Rotate90",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Rotate90. Expected _wxImage_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Rotate90(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Mirror(_swigobj,_swigarg0) (_swigobj->Mirror(_swigarg0)) +static PyObject *_wrap_wxImage_Mirror(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _result; + wxImage * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","horizontally", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxImage_Mirror",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Mirror. Expected _wxImage_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxImage (wxImage_Mirror(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxImage_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +static PyObject *_wrap_wxImage_Replace(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _arg0; + unsigned char _arg1; + unsigned char _arg2; + unsigned char _arg3; + unsigned char _arg4; + unsigned char _arg5; + unsigned char _arg6; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","r1","g1","b1","r2","g2","b2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Obbbbbb:wxImage_Replace",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_Replace. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxImage_Replace(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxImage_CountColours(_swigobj,_swigarg0) (_swigobj->CountColours(_swigarg0)) +static PyObject *_wrap_wxImage_CountColours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _result; + wxImage * _arg0; + unsigned long _arg1 = (unsigned long ) (unsigned long)-1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","stopafter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxImage_CountColours",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_CountColours. Expected _wxImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (unsigned long )wxImage_CountColours(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + static PyMethodDef imagecMethods[] = { + { "wxImage_CountColours", (PyCFunction) _wrap_wxImage_CountColours, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Replace", (PyCFunction) _wrap_wxImage_Replace, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Mirror", (PyCFunction) _wrap_wxImage_Mirror, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Rotate90", (PyCFunction) _wrap_wxImage_Rotate90, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Rotate", (PyCFunction) _wrap_wxImage_Rotate, METH_VARARGS | METH_KEYWORDS }, { "wxImage_HasMask", (PyCFunction) _wrap_wxImage_HasMask, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetMask", (PyCFunction) _wrap_wxImage_SetMask, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetMaskBlue", (PyCFunction) _wrap_wxImage_GetMaskBlue, METH_VARARGS | METH_KEYWORDS }, @@ -1695,6 +2083,8 @@ static PyMethodDef imagecMethods[] = { { "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Paste", (PyCFunction) _wrap_wxImage_Paste, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_Copy", (PyCFunction) _wrap_wxImage_Copy, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetSubImage", (PyCFunction) _wrap_wxImage_GetSubImage, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetHeight", (PyCFunction) _wrap_wxImage_GetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetWidth", (PyCFunction) _wrap_wxImage_GetWidth, METH_VARARGS | METH_KEYWORDS }, @@ -1757,6 +2147,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, @@ -1780,7 +2171,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNGHandler","_class_wxPNGHandler",0}, { "_wxPen","_class_wxPen",0}, { "_byte","_unsigned_char",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -1790,13 +2180,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxGIFHandler","_wxGIFHandler",0}, { "_class_wxMask","_wxMask",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, @@ -1804,16 +2194,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBrush","_class_wxBrush",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxRect","_class_wxRect",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_EBool","_wxCoord",0}, @@ -1823,11 +2215,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_EBool","_wxWindowID",0}, { "_class_wxRegion","_wxRegion",0}, { "_wxFont","_class_wxFont",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, @@ -1874,6 +2264,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1888,6 +2279,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1896,15 +2288,22 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_class_wxIcon","_wxIcon",0}, @@ -1918,6 +2317,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, @@ -1927,8 +2327,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxPalette","_wxPalette",0}, {0,0,0}}; diff --git a/utils/wxPython/src/gtk/image.py b/wxPython/src/msw/image.py similarity index 88% rename from utils/wxPython/src/gtk/image.py rename to wxPython/src/msw/image.py index 6e5bbef780..29da52dcc2 100644 --- a/utils/wxPython/src/gtk/image.py +++ b/wxPython/src/msw/image.py @@ -162,6 +162,7 @@ class wxImagePtr : return val def Rescale(self, *_args, **_kwargs): val = apply(imagec.wxImage_Rescale,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) return val def SetRGB(self, *_args, **_kwargs): val = apply(imagec.wxImage_SetRGB,(self,) + _args, _kwargs) @@ -200,6 +201,13 @@ class wxImagePtr : val = apply(imagec.wxImage_GetSubImage,(self,) + _args, _kwargs) if val: val = wxImagePtr(val) ; val.thisown = 1 return val + def Copy(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Copy,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Paste(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Paste,(self,) + _args, _kwargs) + return val def GetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs) return val @@ -224,6 +232,24 @@ class wxImagePtr : def HasMask(self, *_args, **_kwargs): val = apply(imagec.wxImage_HasMask,(self,) + _args, _kwargs) return val + def Rotate(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Rotate,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Rotate90(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Rotate90,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Mirror(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Mirror,(self,) + _args, _kwargs) + if val: val = wxImagePtr(val) ; val.thisown = 1 + return val + def Replace(self, *_args, **_kwargs): + val = apply(imagec.wxImage_Replace,(self,) + _args, _kwargs) + return val + def CountColours(self, *_args, **_kwargs): + val = apply(imagec.wxImage_CountColours,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxImage(wxImagePtr): diff --git a/utils/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp similarity index 89% rename from utils/wxPython/src/msw/mdi.cpp rename to wxPython/src/msw/mdi.cpp index b3058c41a8..87a067db11 100644 --- a/utils/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/mdi.cpp + * FILE : src/msw/mdi.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,7 +59,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -137,8 +138,8 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -161,11 +162,22 @@ static PyObject *_wrap_new_wxMDIParentFrame(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -408,6 +420,76 @@ static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *arg return _resultobj; } +#define wxMDIParentFrame_GetWindowMenu(_swigobj) (_swigobj->GetWindowMenu()) +static PyObject *_wrap_wxMDIParentFrame_GetWindowMenu(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMenu * _result; + wxMDIParentFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMDIParentFrame_GetWindowMenu",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIParentFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetWindowMenu. Expected _wxMDIParentFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMenu *)wxMDIParentFrame_GetWindowMenu(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMDIParentFrame_SetWindowMenu(_swigobj,_swigarg0) (_swigobj->SetWindowMenu(_swigarg0)) +static PyObject *_wrap_wxMDIParentFrame_SetWindowMenu(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMDIParentFrame * _arg0; + wxMenu * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","menu", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMDIParentFrame_SetWindowMenu",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIParentFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_SetWindowMenu. Expected _wxMDIParentFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIParentFrame_SetWindowMenu. Expected _wxMenu_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMDIParentFrame_SetWindowMenu(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxMDIParentFrame_SetToolBar(_swigobj,_swigarg0) (_swigobj->SetToolBar(_swigarg0)) static PyObject *_wrap_wxMDIParentFrame_SetToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -502,8 +584,8 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj wxMDIParentFrame * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -526,11 +608,22 @@ static PyObject *_wrap_new_wxMDIChildFrame(PyObject *self, PyObject *args, PyObj } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -706,6 +799,8 @@ static PyMethodDef mdicMethods[] = { { "new_wxMDIChildFrame", (PyCFunction) _wrap_new_wxMDIChildFrame, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_Tile", (PyCFunction) _wrap_wxMDIParentFrame_Tile, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_SetToolBar", (PyCFunction) _wrap_wxMDIParentFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, + { "wxMDIParentFrame_SetWindowMenu", (PyCFunction) _wrap_wxMDIParentFrame_SetWindowMenu, METH_VARARGS | METH_KEYWORDS }, + { "wxMDIParentFrame_GetWindowMenu", (PyCFunction) _wrap_wxMDIParentFrame_GetWindowMenu, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_GetToolBar", (PyCFunction) _wrap_wxMDIParentFrame_GetToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_GetClientWindow", (PyCFunction) _wrap_wxMDIParentFrame_GetClientWindow, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_GetActiveChild", (PyCFunction) _wrap_wxMDIParentFrame_GetActiveChild, METH_VARARGS | METH_KEYWORDS }, @@ -739,7 +834,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -765,7 +862,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -780,13 +876,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -815,10 +911,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -828,9 +926,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, @@ -859,7 +959,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -867,9 +966,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -940,6 +1039,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -967,6 +1067,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -976,6 +1077,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -986,11 +1088,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_class_wxPaintDC","_wxPaintDC",0}, @@ -1017,6 +1125,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -1047,8 +1156,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, diff --git a/utils/wxPython/src/msw/mdi.py b/wxPython/src/msw/mdi.py similarity index 87% rename from utils/wxPython/src/msw/mdi.py rename to wxPython/src/msw/mdi.py index c9d1600d24..b42676e001 100644 --- a/utils/wxPython/src/msw/mdi.py +++ b/wxPython/src/msw/mdi.py @@ -45,6 +45,13 @@ class wxMDIParentFramePtr(wxFramePtr): val = apply(mdic.wxMDIParentFrame_GetToolBar,(self,) + _args, _kwargs) if val: val = wxWindowPtr(val) return val + def GetWindowMenu(self, *_args, **_kwargs): + val = apply(mdic.wxMDIParentFrame_GetWindowMenu,(self,) + _args, _kwargs) + if val: val = wxMenuPtr(val) + return val + def SetWindowMenu(self, *_args, **_kwargs): + val = apply(mdic.wxMDIParentFrame_SetWindowMenu,(self,) + _args, _kwargs) + return val def SetToolBar(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_SetToolBar,(self,) + _args, _kwargs) return val @@ -57,7 +64,7 @@ class wxMDIParentFrame(wxMDIParentFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIParentFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -81,7 +88,7 @@ class wxMDIChildFrame(wxMDIChildFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIChildFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) @@ -96,8 +103,8 @@ class wxMDIClientWindow(wxMDIClientWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(mdic.new_wxMDIClientWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) - wx._StdOnScrollCallbacks(self) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) diff --git a/utils/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp similarity index 89% rename from utils/wxPython/src/msw/misc.cpp rename to wxPython/src/msw/misc.cpp index 5f1b70a733..4d738c1e6f 100644 --- a/utils/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/misc.cpp + * FILE : src/msw/misc.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -60,7 +62,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -107,6 +108,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); wxRegion reg2(*r2); @@ -120,7 +123,9 @@ static char* wxStringErrorMsg = "string type is required for parameter"; bool doSave = wxPyRestoreThread(); wxRect* newRect = new wxRect(dest); obj = wxPyConstructObject((void*)newRect, "wxRect"); - PyObject_SetAttrString(obj, "thisown", PyInt_FromLong(1)); + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(obj, "thisown", one); + Py_DECREF(one); wxPySaveThread(doSave); return obj; } @@ -133,6 +138,12 @@ static char* wxStringErrorMsg = "string type is required for parameter"; wxGetResource(section, entry, &retval, file); return retval; } + +#if 0 // we want to use the definition from the header, not the + // one SWIG will generate. +extern wxAcceleratorTable wxNullAcceleratorTable; + +#endif #ifdef __cplusplus extern "C" { #endif @@ -312,37 +323,6 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject return _resultobj; } -static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxString * _arg0; - int _arg1 = (int ) FALSE; - PyObject * _obj0 = 0; - char *_kwnames[] = { "command","sync", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxExecute",_kwnames,&_obj0,&_arg1)) - return NULL; -{ - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxExecute(*_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; @@ -468,11 +448,22 @@ static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -541,6 +532,28 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetOsDescription",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetOsDescription()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _arg0; @@ -559,6 +572,24 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } +static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _arg0; + char *_kwnames[] = { "milliseconds", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxUsleep",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxUsleep(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -576,23 +607,6 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSafeYield(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _arg0; @@ -644,11 +658,22 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStripMenuCodes",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -668,6 +693,201 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject return _resultobj; } +static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetEmailAddress",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetEmailAddress()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetFullHostName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetFullHostName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserId",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserId()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserName",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetUserName()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHomeDir",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetHomeDir()); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxAcceleratorEntry * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "label", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetAccelFromString",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static int _wrap_wxNullAcceleratorTable_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxNullAcceleratorTable is read-only."); + return 1; +} + +static PyObject *_wrap_wxNullAcceleratorTable_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp,(char *) &wxNullAcceleratorTable,"_wxAcceleratorTable_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + #define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1269,6 +1489,121 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj return _resultobj; } +static wxRealPoint wxRealPoint___add__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxRealPoint wxRealPoint___sub__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRealPoint * _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxRealPoint___cmp__(wxRealPoint *self,const wxRealPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRealPoint * _arg0; + wxRealPoint * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + wxRealPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRealPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1492,6 +1827,121 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject return _resultobj; } +static wxPoint wxPoint___add__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self + *p; + } +static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___add__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxPoint wxPoint___sub__(wxPoint *self,const wxPoint * p) { + if (! p) return *self; + return *self - *p; + } +static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___sub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxPoint___cmp__(wxPoint *self,const wxPoint * p) { + if (! p) return 0; + return *self == *p; + } +static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPoint * _arg0; + wxPoint * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPoint___cmp__(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2027,6 +2477,62 @@ static PyObject *_wrap_wxRect_SetBottom(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxRect_Inflate(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inflate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _arg0; + int _arg1; + int _arg2; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","dx","dy", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Inflate",_kwnames,&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxRect_Inflate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxRect_Inside(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inside(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRect * _arg0; + int _arg1; + int _arg2; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","cx","cy", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Inside",_kwnames,&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxRect_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2274,173 +2780,82 @@ static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define new_wxPyTimer(_swigarg0) (new wxPyTimer(_swigarg0)) -static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { +static wxRect wxRect___add__(wxRect *self,const wxRect * rect) { + if (! rect) return *self; + return *self + *rect; + } +static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxPyTimer * _result; - PyObject * _arg0; + wxRect * _result; + wxRect * _arg0; + wxRect * _arg1; + wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "notify", NULL }; + wxRect temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPyTimer",_kwnames,&_obj0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect___add__",_kwnames,&_obj0,&_obj1)) return NULL; { - _arg0 = _obj0; + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPyTimer *)new_wxPyTimer(_arg0); + _result = new wxRect (wxRect___add__(_arg0,_arg1)); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTimer_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } -#define delete_wxPyTimer(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPyTimer",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyTimer. Expected _wxPyTimer_p."); - return NULL; +static int wxRect___cmp__(wxRect *self,const wxRect * rect) { + if (! rect) return 0; + return *self == *rect; } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxPyTimer(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_GetInterval(_swigobj) (_swigobj->GetInterval()) -static PyObject *_wrap_wxPyTimer_GetInterval(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + wxRect * _arg0; + wxRect * _arg1; + wxRect temp; + PyObject * _obj0 = 0; + wxRect temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_GetInterval",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect___cmp__",_kwnames,&_obj0,&_obj1)) return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_GetInterval. Expected _wxPyTimer_p."); +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) return NULL; - } - } +} +{ + _arg1 = &temp0; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPyTimer_GetInterval(_arg0); + _result = (int )wxRect___cmp__(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxPyTimer_IsOneShot(_swigobj) (_swigobj->IsOneShot()) -static PyObject *_wrap_wxPyTimer_IsOneShot(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_IsOneShot",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_IsOneShot. Expected _wxPyTimer_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxPyTimer_IsOneShot(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxPyTimer_Start(_swigobj,_swigarg0,_swigarg1) (_swigobj->Start(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyTimer * _arg0; - int _arg1 = (int ) -1; - int _arg2 = (int ) FALSE; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","milliseconds","oneShot", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyTimer_Start",_kwnames,&_argo0,&_arg1,&_arg2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Start. Expected _wxPyTimer_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPyTimer_Start(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxPyTimer_Stop(_swigobj) (_swigobj->Stop()) -static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPyTimer * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_Stop",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Stop. Expected _wxPyTimer_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxPyTimer_Stop(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxIndividualLayoutConstraint_Above(_swigobj,_swigarg0,_swigarg1) (_swigobj->Above(_swigarg0,_swigarg1)) static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3084,19 +3499,23 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a return _resultobj; } -#define new_wxRegion() (new wxRegion()) +#define new_wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRegion * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + long _arg1 = (long ) 0; + long _arg2 = (long ) 0; + long _arg3 = (long ) 0; + char *_kwnames[] = { "x","y","width","height", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxRegion",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegion *)new_wxRegion(); + _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4344,11 +4763,22 @@ static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxBusyInfo",_kwnames,&_obj0)) return NULL; { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4459,12 +4889,8 @@ static PyMethodDef misccMethods[] = { { "wxIndividualLayoutConstraint_AsIs", (PyCFunction) _wrap_wxIndividualLayoutConstraint_AsIs, METH_VARARGS | METH_KEYWORDS }, { "wxIndividualLayoutConstraint_Absolute", (PyCFunction) _wrap_wxIndividualLayoutConstraint_Absolute, METH_VARARGS | METH_KEYWORDS }, { "wxIndividualLayoutConstraint_Above", (PyCFunction) _wrap_wxIndividualLayoutConstraint_Above, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_Stop", (PyCFunction) _wrap_wxPyTimer_Stop, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_Start", (PyCFunction) _wrap_wxPyTimer_Start, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_IsOneShot", (PyCFunction) _wrap_wxPyTimer_IsOneShot, METH_VARARGS | METH_KEYWORDS }, - { "wxPyTimer_GetInterval", (PyCFunction) _wrap_wxPyTimer_GetInterval, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxPyTimer", (PyCFunction) _wrap_delete_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPyTimer", (PyCFunction) _wrap_new_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, + { "wxRect___cmp__", (PyCFunction) _wrap_wxRect___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxRect___add__", (PyCFunction) _wrap_wxRect___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRect_asTuple", (PyCFunction) _wrap_wxRect_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxRect_height_get", (PyCFunction) _wrap_wxRect_height_get, METH_VARARGS | METH_KEYWORDS }, { "wxRect_height_set", (PyCFunction) _wrap_wxRect_height_set, METH_VARARGS | METH_KEYWORDS }, @@ -4474,6 +4900,8 @@ static PyMethodDef misccMethods[] = { { "wxRect_y_set", (PyCFunction) _wrap_wxRect_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxRect_x_get", (PyCFunction) _wrap_wxRect_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxRect_x_set", (PyCFunction) _wrap_wxRect_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Inside", (PyCFunction) _wrap_wxRect_Inside, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Inflate", (PyCFunction) _wrap_wxRect_Inflate, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetBottom", (PyCFunction) _wrap_wxRect_SetBottom, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetTop", (PyCFunction) _wrap_wxRect_SetTop, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetRight", (PyCFunction) _wrap_wxRect_SetRight, METH_VARARGS | METH_KEYWORDS }, @@ -4494,6 +4922,9 @@ static PyMethodDef misccMethods[] = { { "wxRect_GetX", (PyCFunction) _wrap_wxRect_GetX, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRect", (PyCFunction) _wrap_delete_wxRect, METH_VARARGS | METH_KEYWORDS }, { "new_wxRect", (PyCFunction) _wrap_new_wxRect, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___cmp__", (PyCFunction) _wrap_wxPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___sub__", (PyCFunction) _wrap_wxPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___add__", (PyCFunction) _wrap_wxPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_asTuple", (PyCFunction) _wrap_wxPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_Set", (PyCFunction) _wrap_wxPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPoint", (PyCFunction) _wrap_delete_wxPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4502,6 +4933,9 @@ static PyMethodDef misccMethods[] = { { "wxPoint_y_set", (PyCFunction) _wrap_wxPoint_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_get", (PyCFunction) _wrap_wxPoint_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_set", (PyCFunction) _wrap_wxPoint_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___cmp__", (PyCFunction) _wrap_wxRealPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___sub__", (PyCFunction) _wrap_wxRealPoint___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___add__", (PyCFunction) _wrap_wxRealPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_asTuple", (PyCFunction) _wrap_wxRealPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_Set", (PyCFunction) _wrap_wxRealPoint_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRealPoint", (PyCFunction) _wrap_delete_wxRealPoint, METH_VARARGS | METH_KEYWORDS }, @@ -4528,12 +4962,20 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", (PyCFunction) _wrap_wxSize_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_get", (PyCFunction) _wrap_wxSize_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_set", (PyCFunction) _wrap_wxSize_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS }, + { "wxGetFullHostName", (PyCFunction) _wrap_wxGetFullHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetHostName", (PyCFunction) _wrap_wxGetHostName, METH_VARARGS | METH_KEYWORDS }, + { "wxGetEmailAddress", (PyCFunction) _wrap_wxGetEmailAddress, METH_VARARGS | METH_KEYWORDS }, { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, - { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, + { "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS }, { "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS }, + { "wxGetOsDescription", (PyCFunction) _wrap_wxGetOsDescription, METH_VARARGS | METH_KEYWORDS }, { "wxGetOsVersion", (PyCFunction) _wrap_wxGetOsVersion, METH_VARARGS | METH_KEYWORDS }, { "wxStartTimer", (PyCFunction) _wrap_wxStartTimer, METH_VARARGS | METH_KEYWORDS }, { "wxShell", (PyCFunction) _wrap_wxShell, METH_VARARGS | METH_KEYWORDS }, @@ -4542,7 +4984,6 @@ static PyMethodDef misccMethods[] = { { "wxGetMousePosition", (PyCFunction) _wrap_wxGetMousePosition, METH_VARARGS | METH_KEYWORDS }, { "wxGetFreeMemory", (PyCFunction) _wrap_wxGetFreeMemory, METH_VARARGS | METH_KEYWORDS }, { "wxGetElapsedTime", (PyCFunction) _wrap_wxGetElapsedTime, METH_VARARGS | METH_KEYWORDS }, - { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, { "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, { "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS }, @@ -4570,6 +5011,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_byte","_unsigned_char",0}, @@ -4578,6 +5020,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -4585,13 +5028,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxRect","_class_wxRect",0}, { "_wxPoint","_class_wxPoint",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, + { "_char","_wxChar",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -4601,7 +5046,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRegion","_wxRegion",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, @@ -4623,6 +5067,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4632,6 +5077,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_signed_short",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4640,12 +5086,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, @@ -4656,6 +5110,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, @@ -4693,6 +5148,8 @@ SWIGEXPORT(void) initmiscc() { PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); + PyDict_SetItemString(d,"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,"wxNullAcceleratorTable",_wrap_wxNullAcceleratorTable_get, _wrap_wxNullAcceleratorTable_set); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/utils/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py similarity index 91% rename from utils/wxPython/src/msw/misc.py rename to wxPython/src/msw/misc.py index 95e4293606..e2ad047487 100644 --- a/utils/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -80,6 +80,17 @@ class wxRealPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRealPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___add__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxRealPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRealPoint_x_set(self,value) @@ -119,6 +130,17 @@ class wxPointPtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxPoint_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___add__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___sub__,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxPoint_x_set(self,value) @@ -208,9 +230,22 @@ class wxRectPtr : def SetBottom(self, *_args, **_kwargs): val = apply(miscc.wxRect_SetBottom,(self,) + _args, _kwargs) return val + def Inflate(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Inflate,(self,) + _args, _kwargs) + return val + def Inside(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Inside,(self,) + _args, _kwargs) + return val def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRect_asTuple,(self,) + _args, _kwargs) return val + def __add__(self, *_args, **_kwargs): + val = apply(miscc.wxRect___add__,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(miscc.wxRect___cmp__,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRect_x_set(self,value) @@ -285,35 +320,6 @@ class wxRect(wxRectPtr): -class wxPyTimerPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxPyTimer(self) - def GetInterval(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_GetInterval,(self,) + _args, _kwargs) - return val - def IsOneShot(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_IsOneShot,(self,) + _args, _kwargs) - return val - def Start(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_Start,(self,) + _args, _kwargs) - return val - def Stop(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_Stop,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxPyTimer(wxPyTimerPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(miscc.new_wxPyTimer,_args,_kwargs) - self.thisown = 1 - - - - class wxIndividualLayoutConstraintPtr : def __init__(self,this): self.this = this @@ -621,8 +627,6 @@ wxDisplaySize = miscc.wxDisplaySize wxEndBusyCursor = miscc.wxEndBusyCursor -wxExecute = miscc.wxExecute - wxGetElapsedTime = miscc.wxGetElapsedTime wxGetFreeMemory = miscc.wxGetFreeMemory @@ -639,11 +643,13 @@ wxStartTimer = miscc.wxStartTimer wxGetOsVersion = miscc.wxGetOsVersion +wxGetOsDescription = miscc.wxGetOsDescription + wxSleep = miscc.wxSleep -wxYield = miscc.wxYield +wxUsleep = miscc.wxUsleep -wxSafeYield = miscc.wxSafeYield +wxYield = miscc.wxYield wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows @@ -651,6 +657,23 @@ wxGetResource = miscc.wxGetResource wxStripMenuCodes = miscc.wxStripMenuCodes +wxGetEmailAddress = miscc.wxGetEmailAddress + +wxGetHostName = miscc.wxGetHostName + +wxGetFullHostName = miscc.wxGetFullHostName + +wxGetUserId = miscc.wxGetUserId + +wxGetUserName = miscc.wxGetUserName + +wxGetHomeDir = miscc.wxGetHomeDir + +def wxGetAccelFromString(*_args, **_kwargs): + val = apply(miscc.wxGetAccelFromString,_args,_kwargs) + if val: val = wxAcceleratorEntryPtr(val) + return val + #-------------- VARIABLE WRAPPERS ------------------ @@ -677,3 +700,5 @@ wxAbsolute = miscc.wxAbsolute wxOutRegion = miscc.wxOutRegion wxPartRegion = miscc.wxPartRegion wxInRegion = miscc.wxInRegion +cvar = miscc.cvar +wxNullAcceleratorTable = wxAcceleratorTablePtr(miscc.cvar.wxNullAcceleratorTable) diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp new file mode 100644 index 0000000000..69f7d7595c --- /dev/null +++ b/wxPython/src/msw/misc2.cpp @@ -0,0 +1,7104 @@ +/* + * FILE : src/msw/misc2.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initmisc2c + +#define SWIG_name "misc2c" + +#include "helpers.h" +#include +#include +#include +#include +#include +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); + + + wxColour wxSystemSettings_GetSystemColour(int index) { + return wxSystemSettings::GetSystemColour(index); + } + + wxFont wxSystemSettings_GetSystemFont(int index) { + return wxSystemSettings::GetSystemFont(index); + } + + int wxSystemSettings_GetSystemMetric(int index) { + return wxSystemSettings::GetSystemMetric(index); + } + + void wxToolTip_Enable(bool flag) { + wxToolTip::Enable(flag); + } + + void wxToolTip_SetDelay(long milliseconds) { + wxToolTip::SetDelay(milliseconds); + } + + int wxCaret_GetBlinkTime() { + return wxCaret::GetBlinkTime(); + } + + void wxCaret_SetBlinkTime(int milliseconds) { + wxCaret::SetBlinkTime(milliseconds); + } + +class wxPyFontEnumerator : public wxFontEnumerator { +public: + wxPyFontEnumerator() {} + ~wxPyFontEnumerator() {} + + DEC_PYCALLBACK_BOOL_STRING(OnFacename); + DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFacename); +IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding); + + +class wxPyTipProvider : public wxTipProvider { +public: + wxPyTipProvider(size_t currentTip) + : wxTipProvider(currentTip) {} + + DEC_PYCALLBACK_STRING__pure(GetTip); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_STRING__pure( wxPyTipProvider, wxTipProvider, GetTip); + + +#include +static wxPoint wxPyNullPoint; + + +wxGenericDragImage* wxDragIcon(const wxIcon& image, + const wxCursor& cursor, + const wxPoint& hotspot) { + return new wxGenericDragImage(image, cursor, hotspot); +} + +wxGenericDragImage* wxDragString(const wxString& str, + const wxCursor& cursor, + const wxPoint& hotspot) { + return new wxGenericDragImage(str, cursor, hotspot); +} + +wxGenericDragImage* wxDragTreeItem(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) { + return new wxGenericDragImage(treeCtrl, id); +} + +wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) { + return new wxGenericDragImage(listCtrl, id); +} + + // C++ version of wxProcess derived class + +class wxPyProcess : public wxProcess { +public: + wxPyProcess(wxEvtHandler *parent = NULL, int id = -1) + : wxProcess(parent, id) + {} + + DEC_PYCALLBACK_VOID_INTINT(OnTerminate); + + PYPRIVATE; +}; + +IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char * _arg0; + char * _arg1 = (char *) NULL; + char * _arg2 = (char *) NULL; + char * _arg3 = (char *) NULL; + char * _arg4 = (char *) "*.*"; + int _arg5 = (int ) 0; + wxWindow * _arg6 = (wxWindow *) NULL; + int _arg7 = (int ) -1; + int _arg8 = (int ) -1; + PyObject * _argo6 = 0; + char *_kwnames[] = { "message","default_path","default_filename","default_extension","wildcard","flags","parent","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|ssssiOii:wxFileSelector",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_argo6,&_arg7,&_arg8)) + return NULL; + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxFileSelector. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxWindow * _arg3 = (wxWindow *) NULL; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + bool _arg6 = (bool ) TRUE; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _argo3 = 0; + int tempbool6 = (int) TRUE; + char *_kwnames[] = { "message","caption","default_value","parent","x","y","centre", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOiii:wxGetTextFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3,&_arg4,&_arg5,&tempbool6)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetTextFromUser. Expected _wxWindow_p."); + return NULL; + } + } + _arg6 = (bool ) tempbool6; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetTextFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxWindow * _arg3 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "message","caption","default_value","parent", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOO:wxGetPasswordFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_argo3)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGetPasswordFromUser. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetPasswordFromUser(*_arg0,*_arg1,*_arg2,_arg3)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + wxString * _arg1; + int _arg2; + wxString * _arg3; + wxWindow * _arg4 = (wxWindow *) NULL; + int _arg5 = (int ) -1; + int _arg6 = (int ) -1; + bool _arg7 = (bool ) TRUE; + int _arg8 = (int ) 150; + int _arg9 = (int ) 200; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + int tempbool7 = (int) TRUE; + char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoice",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj3) +{ + _arg3 = wxString_LIST_helper(_obj3); + if (_arg3 == NULL) { + return NULL; + } +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoice. Expected _wxWindow_p."); + return NULL; + } + } + _arg7 = (bool ) tempbool7; +{ + if (_obj3) { + _arg2 = PyList_Size(_obj3); + } + else { + _arg2 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxGetSingleChoice(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + delete [] _arg3; +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetSingleChoiceIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxString * _arg0; + wxString * _arg1; + int _arg2; + wxString * _arg3; + wxWindow * _arg4 = (wxWindow *) NULL; + int _arg5 = (int ) -1; + int _arg6 = (int ) -1; + bool _arg7 = (bool ) TRUE; + int _arg8 = (int ) 150; + int _arg9 = (int ) 200; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj3 = 0; + PyObject * _argo4 = 0; + int tempbool7 = (int) TRUE; + char *_kwnames[] = { "message","caption","choices","parent","x","y","centre","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|Oiiiii:wxGetSingleChoiceIndex",_kwnames,&_obj0,&_obj1,&_obj3,&_argo4,&_arg5,&_arg6,&tempbool7,&_arg8,&_arg9)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj3) +{ + _arg3 = wxString_LIST_helper(_obj3); + if (_arg3 == NULL) { + return NULL; + } +} + if (_argo4) { + if (_argo4 == Py_None) { _arg4 = NULL; } + else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxGetSingleChoiceIndex. Expected _wxWindow_p."); + return NULL; + } + } + _arg7 = (bool ) tempbool7; +{ + if (_obj3) { + _arg2 = PyList_Size(_obj3); + } + else { + _arg2 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGetSingleChoiceIndex(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + delete [] _arg3; +} + return _resultobj; +} + +static PyObject *_wrap_wxMessageBox(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxString * _arg0; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + int _arg2 = (int ) wxOK|wxCENTRE; + wxWindow * _arg3 = (wxWindow *) NULL; + int _arg4 = (int ) -1; + int _arg5 = (int ) -1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "message","caption","style","parent","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OiOii:wxMessageBox",_kwnames,&_obj0,&_obj1,&_arg2,&_argo3,&_arg4,&_arg5)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxMessageBox. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxMessageBox(*_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetNumberFromUser(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + long _arg3; + long _arg4 = (long ) 0; + long _arg5 = (long ) 100; + wxWindow * _arg6 = (wxWindow *) NULL; + wxPoint * _arg7 = (wxPoint *) &wxDefaultPosition; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _argo6 = 0; + wxPoint temp; + PyObject * _obj7 = 0; + char *_kwnames[] = { "message","prompt","caption","value","min","max","parent","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOl|llOO:wxGetNumberFromUser",_kwnames,&_obj0,&_obj1,&_obj2,&_arg3,&_arg4,&_arg5,&_argo6,&_obj7)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_argo6) { + if (_argo6 == Py_None) { _arg6 = NULL; } + else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxGetNumberFromUser. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj7) +{ + _arg7 = &temp; + if (! wxPoint_helper(_obj7, &_arg7)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetNumberFromUser(*_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5,_arg6,*_arg7); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +static PyObject *_wrap_wxColourDisplay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxColourDisplay",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxColourDisplay(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDisplayDepth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplayDepth",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDisplayDepth(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetDisplayDepth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetDisplayDepth",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGetDisplayDepth(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int * _arg0; + int temp; + int * _arg1; + int temp0; + char *_kwnames[] = { NULL }; + + self = self; +{ + _arg0 = &temp; +} +{ + _arg1 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDisplaySize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDisplaySize(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg0)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +static PyObject *_wrap_wxGetDisplaySize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetDisplaySize",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGetDisplaySize()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cursor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSetCursor(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxFindWindowByLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxString * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "label","parent", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByLabel",_kwnames,&_obj0,&_argo1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByLabel. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxFindWindowByLabel(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxFindWindowByName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxString * _arg0; + wxWindow * _arg1 = (wxWindow *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "name","parent", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFindWindowByName",_kwnames,&_obj0,&_argo1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFindWindowByName. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxFindWindowByName(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxBeginBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cursor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxBeginBusyCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBeginBusyCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBeginBusyCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxGetActiveWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetActiveWindow",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxGetActiveWindow(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + int _arg1; + char *_kwnames[] = { "name","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"si:wxResourceAddIdentifier",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxResourceClear",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxResourceClear(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmap * _result; + char * _arg0; + char *_kwnames[] = { "resource", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateBitmap",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIcon * _result; + char * _arg0; + char *_kwnames[] = { "resource", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateIcon",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxIcon (wxResourceCreateIcon(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMenuBar * _result; + char * _arg0; + char *_kwnames[] = { "resource", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateMenuBar",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuBar_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char * _arg0; + char *_kwnames[] = { "name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceGetIdentifier",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxResourceGetIdentifier(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + wxResourceTable * _arg1 = (wxResourceTable *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "resource","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseData",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseData. Expected _wxResourceTable_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceParseData(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + wxResourceTable * _arg1 = (wxResourceTable *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "filename","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseFile",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseFile. Expected _wxResourceTable_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceParseFile(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + wxResourceTable * _arg1 = (wxResourceTable *) NULL; + PyObject * _argo1 = 0; + char *_kwnames[] = { "resource","table", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseString",_kwnames,&_arg0,&_argo1)) + return NULL; + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseString. Expected _wxResourceTable_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxResourceParseString(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + int _arg0; + char *_kwnames[] = { "index", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemColour",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxColour (wxSystemSettings_GetSystemColour(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + int _arg0; + char *_kwnames[] = { "index", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemFont",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxFont (wxSystemSettings_GetSystemFont(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "index", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemMetric",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxSystemSettings_GetSystemMetric(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _arg0; + int tempbool0; + char *_kwnames[] = { "flag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxToolTip_Enable",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxToolTip_Enable(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _arg0; + char *_kwnames[] = { "milliseconds", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxToolTip_SetDelay",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxToolTip_SetDelay(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxCaret_GetBlinkTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxCaret_GetBlinkTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxCaret_SetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _arg0; + char *_kwnames[] = { "milliseconds", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxCaret_SetBlinkTime",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_SetBlinkTime(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPostEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _arg0; + wxEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "dest","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPostEvent",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPostEvent. Expected _wxEvtHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostEvent. Expected _wxEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPostEvent(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWakeUpIdle",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWakeUpIdle(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSafeYield. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSafeYield(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + wxTipProvider * _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "parent","tipProvider","showAtStartup", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxShowTip",_kwnames,&_argo0,&_argo1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxShowTip. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxShowTip. Expected _wxTipProvider_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxShowTip(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxCreateFileTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTipProvider * _result; + wxString * _arg0; + size_t _arg1; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename","currentTip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCreateFileTipProvider",_kwnames,&_obj0,&_arg1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTipProvider *)wxCreateFileTipProvider(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTipProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxDragIcon(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxIcon * _arg0; + wxCursor * _arg1 = (wxCursor *) &wxNullCursor; + wxPoint * _arg2 = (wxPoint *) &wxPyNullPoint; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "image","cursor","hotspot", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxDragIcon",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragIcon. Expected _wxIcon_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragIcon. Expected _wxCursor_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragIcon(*_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxDragString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxString * _arg0; + wxCursor * _arg1 = (wxCursor *) &wxNullCursor; + wxPoint * _arg2 = (wxPoint *) &wxPyNullPoint; + PyObject * _obj0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "str","cursor","hotspot", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxDragString",_kwnames,&_obj0,&_argo1,&_obj2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragString. Expected _wxCursor_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragString(*_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxDragTreeItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxTreeCtrl * _arg0; + wxTreeItemId * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "treeCtrl","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDragTreeItem",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragTreeItem. Expected _wxTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDragTreeItem. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragTreeItem(*_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxDragListItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxListCtrl * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "listCtrl","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDragListItem",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragListItem. Expected _wxListCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)wxDragListItem(*_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxSysErrorCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSysErrorCode",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (unsigned long )wxSysErrorCode(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + unsigned long _arg0 = (unsigned long ) 0; + char *_kwnames[] = { "nErrCode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|l:wxSysErrorMsg",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxSysErrorMsg(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +static PyObject *_wrap_wxLogFatalError(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogFatalError",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogFatalError(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogError(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogError",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogError(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogWarning(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogWarning",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogWarning(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogMessage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogMessage",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogMessage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogInfo",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogInfo(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogVerbose",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogVerbose(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogStatus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogStatus",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogStatus(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogStatusFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pFrame","szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxLogStatusFrame",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogStatusFrame. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogStatus(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLogSysError(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _arg0; + char *_kwnames[] = { "szFormat", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLogSysError",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogSysError(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxExecute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxString * _arg0; + int _arg1 = (int ) FALSE; + wxPyProcess * _arg2 = (wxPyProcess *) NULL; + PyObject * _obj0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "command","sync","process", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxExecute",_kwnames,&_obj0,&_arg1,&_argo2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxExecute. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxExecute(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0)) +static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolTip * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "tip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxToolTip",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxToolTip *)new_wxToolTip(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolTip_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxToolTip_SetTip(_swigobj,_swigarg0) (_swigobj->SetTip(_swigarg0)) +static PyObject *_wrap_wxToolTip_SetTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolTip * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tip", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolTip_SetTip",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_SetTip. Expected _wxToolTip_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxToolTip_SetTip(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxToolTip_GetTip(_swigobj) (_swigobj->GetTip()) +static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxToolTip * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetTip",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetTip. Expected _wxToolTip_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxToolTip_GetTip(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxToolTip_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxToolTip * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolTip_GetWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolTip_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolTip_GetWindow. Expected _wxToolTip_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxToolTip_GetWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxCaret(_swigarg0,_swigarg1) (new wxCaret(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _result; + wxWindow * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "window","size", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxCaret",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCaret. Expected _wxWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxCaret *)new_wxCaret(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCaret_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxCaret(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxCaret",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCaret. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxCaret(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_IsOk(_swigobj) (_swigobj->IsOk()) +static PyObject *_wrap_wxCaret_IsOk(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsOk",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsOk. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCaret_IsOk(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCaret_IsVisible(_swigobj) (_swigobj->IsVisible()) +static PyObject *_wrap_wxCaret_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsVisible",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsVisible. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCaret_IsVisible(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCaret_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPositionTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPositionTuple. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_GetPositionTuple(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxCaret_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxCaret_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPosition. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxCaret_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxCaret_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_GetSizeTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSizeTuple",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSizeTuple. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_GetSizeTuple(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxCaret_GetSize(_swigobj) (_swigobj->GetSize()) +static PyObject *_wrap_wxCaret_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSize. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxCaret_GetSize(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxCaret_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetWindow",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetWindow. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxCaret_GetWindow(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCaret_MoveXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->Move(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_MoveXY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_MoveXY",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_MoveXY. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_MoveXY(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_Move(_swigobj,_swigarg0) (_swigobj->Move(_swigarg0)) +static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_Move",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Move. Expected _wxCaret_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_Move(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_SetSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCaret_SetSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_SetSizeWH",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSizeWH. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_SetSizeWH(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0)) +static PyObject *_wrap_wxCaret_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_SetSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSize. Expected _wxCaret_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_SetSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) +static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + int _arg1 = (int ) TRUE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCaret_Show",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Show. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_Show(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxCaret_Hide(_swigobj) (_swigobj->Hide()) +static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCaret * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_Hide",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Hide. Expected _wxCaret_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxCaret_Hide(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxFontEnumerator() (new wxPyFontEnumerator()) +static PyObject *_wrap_new_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFontEnumerator * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFontEnumerator",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyFontEnumerator *)new_wxFontEnumerator(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyFontEnumerator_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPyFontEnumerator(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFontEnumerator(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFontEnumerator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFontEnumerator",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFontEnumerator. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyFontEnumerator(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFontEnumerator__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontEnumerator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyFontEnumerator * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFontEnumerator__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator__setSelf. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFontEnumerator__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFontEnumerator_EnumerateFacenames(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnumerateFacenames(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontEnumerator_EnumerateFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFontEnumerator * _arg0; + wxFontEncoding _arg1 = (wxFontEncoding ) wxFONTENCODING_SYSTEM; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","encoding","fixedWidthOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxFontEnumerator_EnumerateFacenames",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateFacenames. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFontEnumerator_EnumerateFacenames(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFontEnumerator_EnumerateEncodings(_swigobj,_swigarg0) (_swigobj->EnumerateEncodings(_swigarg0)) +static PyObject *_wrap_wxFontEnumerator_EnumerateEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyFontEnumerator * _arg0; + char * _arg1 = (char *) ""; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","facename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|s:wxFontEnumerator_EnumerateEncodings",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_EnumerateEncodings. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFontEnumerator_EnumerateEncodings(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject * wxPyFontEnumerator_GetEncodings(wxPyFontEnumerator *self) { + wxArrayString* arr = self->GetEncodings(); + PyObject* list = PyList_New(0); + for (size_t x=0; xGetCount(); x++) + PyList_Append(list, PyString_FromString((*arr)[x])); + return list; + } +static PyObject *_wrap_wxFontEnumerator_GetEncodings(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPyFontEnumerator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetEncodings",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetEncodings. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxPyFontEnumerator_GetEncodings(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxPyFontEnumerator_GetFacenames(wxPyFontEnumerator *self) { + wxArrayString* arr = self->GetFacenames(); + PyObject* list = PyList_New(0); + for (size_t x=0; xGetCount(); x++) + PyList_Append(list, PyString_FromString((*arr)[x])); + return list; + } +static PyObject *_wrap_wxFontEnumerator_GetFacenames(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPyFontEnumerator * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontEnumerator_GetFacenames",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyFontEnumerator_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontEnumerator_GetFacenames. Expected _wxPyFontEnumerator_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxPyFontEnumerator_GetFacenames(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +#define new_wxBusyCursor(_swigarg0) (new wxBusyCursor(_swigarg0)) +static PyObject *_wrap_new_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBusyCursor * _result; + wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR; + PyObject * _argo0 = 0; + char *_kwnames[] = { "cursor", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBusyCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBusyCursor. Expected _wxCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBusyCursor *)new_wxBusyCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBusyCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxBusyCursor(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBusyCursor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxBusyCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBusyCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBusyCursor. Expected _wxBusyCursor_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxBusyCursor(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxWindowDisabler(_swigarg0) (new wxWindowDisabler(_swigarg0)) +static PyObject *_wrap_new_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "winToSkip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxWindowDisabler. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindowDisabler *)new_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindowDisabler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxWindowDisabler(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxWindowDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindowDisabler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxWindowDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindowDisabler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxWindowDisabler. Expected _wxWindowDisabler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxWindowDisabler(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define delete_wxTipProvider(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTipProvider * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxTipProvider",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxTipProvider. Expected _wxTipProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxTipProvider(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTipProvider_GetTip(_swigobj) (_swigobj->GetTip()) +static PyObject *_wrap_wxTipProvider_GetTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTipProvider * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTipProvider_GetTip",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipProvider_GetTip. Expected _wxTipProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxTipProvider_GetTip(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxTipProvider_GetCurrentTip(_swigobj) (_swigobj->GetCurrentTip()) +static PyObject *_wrap_wxTipProvider_GetCurrentTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + size_t _result; + wxTipProvider * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTipProvider_GetCurrentTip",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipProvider_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipProvider_GetCurrentTip. Expected _wxTipProvider_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (size_t )wxTipProvider_GetCurrentTip(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxPyTipProviderTowxTipProvider(void *ptr) { + wxPyTipProvider *src; + wxTipProvider *dest; + src = (wxPyTipProvider *) ptr; + dest = (wxTipProvider *) src; + return (void *) dest; +} + +#define new_wxPyTipProvider(_swigarg0) (new wxPyTipProvider(_swigarg0)) +static PyObject *_wrap_new_wxPyTipProvider(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTipProvider * _result; + size_t _arg0; + char *_kwnames[] = { "currentTip", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxPyTipProvider",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyTipProvider *)new_wxPyTipProvider(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTipProvider_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDragImage(_swigarg0,_swigarg1,_swigarg2) (new wxGenericDragImage(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxDragImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _result; + wxBitmap * _arg0; + wxCursor * _arg1 = (wxCursor *) &wxNullCursor; + wxPoint * _arg2 = (wxPoint *) &wxPyNullPoint; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "image","cursor","hotspot", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:new_wxDragImage",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragImage. Expected _wxBitmap_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragImage. Expected _wxCursor_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGenericDragImage *)new_wxDragImage(*_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDragImage_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxGenericDragImage(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxDragImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxDragImage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDragImage. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxGenericDragImage(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDragImage_BeginDrag(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->BeginDrag(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDragImage_BeginDrag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + wxWindow * _arg2; + bool _arg3 = (bool ) FALSE; + wxRect * _arg4 = (wxRect *) NULL; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + int tempbool3 = (int) FALSE; + wxRect temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","hotspot","window","fullScreen","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|iO:wxDragImage_BeginDrag",_kwnames,&_argo0,&_obj1,&_argo2,&tempbool3,&_obj4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_BeginDrag. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDragImage_BeginDrag. Expected _wxWindow_p."); + return NULL; + } + } + _arg3 = (bool ) tempbool3; + if (_obj4) +{ + _arg4 = &temp0; + if (! wxRect_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_BeginDrag(_arg0,*_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_BeginDrag2(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->BeginDrag(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDragImage_BeginDrag2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + wxWindow * _arg2; + wxWindow * _arg3; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","hotspot","window","fullScreenRect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDragImage_BeginDrag2",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_BeginDrag2. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDragImage_BeginDrag2. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDragImage_BeginDrag2. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_BeginDrag2(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_EndDrag(_swigobj) (_swigobj->EndDrag()) +static PyObject *_wrap_wxDragImage_EndDrag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDragImage_EndDrag",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_EndDrag. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_EndDrag(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_Move(_swigobj,_swigarg0) (_swigobj->Move(_swigarg0)) +static PyObject *_wrap_wxDragImage_Move(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDragImage_Move",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_Move. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_Move(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_Show(_swigobj) (_swigobj->Show()) +static PyObject *_wrap_wxDragImage_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDragImage_Show",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_Show. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_Show(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_Hide(_swigobj) (_swigobj->Hide()) +static PyObject *_wrap_wxDragImage_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDragImage_Hide",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_Hide. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_Hide(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDragImage_GetImageRect(_swigobj,_swigarg0) (_swigobj->GetImageRect(_swigarg0)) +static PyObject *_wrap_wxDragImage_GetImageRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pos", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDragImage_GetImageRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_GetImageRect. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxRect (wxDragImage_GetImageRect(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDragImage_RedrawImage(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->RedrawImage(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDragImage_RedrawImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDragImage * _arg0; + wxPoint * _arg1; + wxPoint * _arg2; + bool _arg3; + bool _arg4; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + wxPoint temp0; + PyObject * _obj2 = 0; + int tempbool3; + int tempbool4; + char *_kwnames[] = { "self","oldPos","newPos","eraseOld","drawNew", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOii:wxDragImage_RedrawImage",_kwnames,&_argo0,&_obj1,&_obj2,&tempbool3,&tempbool4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_RedrawImage. Expected _wxGenericDragImage_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + _arg2 = &temp0; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + _arg3 = (bool ) tempbool3; + _arg4 = (bool ) tempbool4; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDragImage_RedrawImage(_arg0,*_arg1,*_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define new_wxPyTimer(_swigarg0) (new wxPyTimer(_swigarg0)) +static PyObject *_wrap_new_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "notify", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPyTimer",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyTimer *)new_wxPyTimer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTimer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPyTimer(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPyTimer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPyTimer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyTimer. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyTimer(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyTimer_GetInterval(_swigobj) (_swigobj->GetInterval()) +static PyObject *_wrap_wxPyTimer_GetInterval(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_GetInterval",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_GetInterval. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxPyTimer_GetInterval(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyTimer_IsOneShot(_swigobj) (_swigobj->IsOneShot()) +static PyObject *_wrap_wxPyTimer_IsOneShot(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_IsOneShot",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_IsOneShot. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyTimer_IsOneShot(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyTimer_IsRunning(_swigobj) (_swigobj->IsRunning()) +static PyObject *_wrap_wxPyTimer_IsRunning(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_IsRunning",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_IsRunning. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyTimer_IsRunning(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyTimer_SetOwner(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetOwner(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyTimer_SetOwner(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + wxEvtHandler * _arg1; + int _arg2 = (int ) -1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","owner","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyTimer_SetOwner",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_SetOwner. Expected _wxPyTimer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyTimer_SetOwner. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyTimer_SetOwner(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyTimer_Start(_swigobj,_swigarg0,_swigarg1) (_swigobj->Start(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyTimer_Start(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + int _arg1 = (int ) -1; + int _arg2 = (int ) FALSE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","milliseconds","oneShot", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxPyTimer_Start",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Start. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyTimer_Start(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyTimer_Stop(_swigobj) (_swigobj->Stop()) +static PyObject *_wrap_wxPyTimer_Stop(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyTimer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyTimer_Stop",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTimer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyTimer_Stop. Expected _wxPyTimer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyTimer_Stop(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxLog() (new wxLog()) +static PyObject *_wrap_new_wxLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLog",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)new_wxLog(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxLog_IsEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_IsEnabled",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog::IsEnabled(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_EnableLogging(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + bool _arg0 = (bool ) TRUE; + int tempbool0 = (int) TRUE; + char *_kwnames[] = { "doIt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxLog_EnableLogging",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog::EnableLogging(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_OnLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogLevel * _arg0; + char * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "level","szString","t", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|i:wxLog_OnLog",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogLevel_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_OnLog. Expected _wxLogLevel_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::OnLog(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLog_Flush(_swigobj) (_swigobj->Flush()) +static PyObject *_wrap_wxLog_Flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_Flush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_Flush. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog_Flush(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLog_HasPendingMessages(_swigobj) (_swigobj->HasPendingMessages()) +static PyObject *_wrap_wxLog_HasPendingMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_HasPendingMessages",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_HasPendingMessages. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog_HasPendingMessages(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_FlushActive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_FlushActive",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::FlushActive(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_GetActiveTarget(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_GetActiveTarget",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)wxLog::GetActiveTarget(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxLog_SetActiveTarget(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pLogger", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_SetActiveTarget",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_SetActiveTarget. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)wxLog::SetActiveTarget(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxLog_Suspend(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_Suspend",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::Suspend(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_Resume(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_Resume",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::Resume(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLog_SetVerbose(_swigobj,_swigarg0) (_swigobj->SetVerbose(_swigarg0)) +static PyObject *_wrap_wxLog_SetVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bVerbose", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxLog_SetVerbose",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_SetVerbose. Expected _wxLog_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog_SetVerbose(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_DontCreateOnDemand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_DontCreateOnDemand",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::DontCreateOnDemand(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_SetTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTraceMask * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "ulMask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_SetTraceMask",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTraceMask_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_SetTraceMask. Expected _wxTraceMask_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::SetTraceMask(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_AddTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_AddTraceMask",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::AddTraceMask(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxLog_RemoveTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_RemoveTraceMask",_kwnames,&_obj0)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLog::RemoveTraceMask(*_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define wxLog_GetVerbose(_swigobj) (_swigobj->GetVerbose()) +static PyObject *_wrap_wxLog_GetVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxLog * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLog_GetVerbose",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLog_GetVerbose. Expected _wxLog_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog_GetVerbose(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxLog_GetTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTraceMask * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_GetTraceMask",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTraceMask (wxLog::GetTraceMask()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTraceMask_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxLog_IsAllowedTraceMask(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char * _arg0; + char *_kwnames[] = { "mask", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxLog_IsAllowedTraceMask",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLog::IsAllowedTraceMask(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxLogStderrTowxLog(void *ptr) { + wxLogStderr *src; + wxLog *dest; + src = (wxLogStderr *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogStderr() (new wxLogStderr()) +static PyObject *_wrap_new_wxLogStderr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogStderr * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogStderr",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogStderr *)new_wxLogStderr(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogStderr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxLogTextCtrlTowxLog(void *ptr) { + wxLogTextCtrl *src; + wxLog *dest; + src = (wxLogTextCtrl *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogTextCtrl(_swigarg0) (new wxLogTextCtrl(_swigarg0)) +static PyObject *_wrap_new_wxLogTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogTextCtrl * _result; + wxTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pTextCtrl", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxLogTextCtrl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxLogTextCtrl. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogTextCtrl *)new_wxLogTextCtrl(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxLogGuiTowxLog(void *ptr) { + wxLogGui *src; + wxLog *dest; + src = (wxLogGui *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogGui() (new wxLogGui()) +static PyObject *_wrap_new_wxLogGui(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogGui * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogGui",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogGui *)new_wxLogGui(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogGui_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxLogWindowTowxLog(void *ptr) { + wxLogWindow *src; + wxLog *dest; + src = (wxLogWindow *) ptr; + dest = (wxLog *) src; + return (void *) dest; +} + +#define new_wxLogWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxLogWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxLogWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogWindow * _result; + wxFrame * _arg0; + char * _arg1; + bool _arg2 = (bool ) TRUE; + bool _arg3 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool2 = (int) TRUE; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "pParent","szTitle","bShow","bPassToOld", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|ii:new_wxLogWindow",_kwnames,&_argo0,&_arg1,&tempbool2,&tempbool3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxLogWindow. Expected _wxFrame_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogWindow *)new_wxLogWindow(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxLogWindow_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) +static PyObject *_wrap_wxLogWindow_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogWindow * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bShow", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxLogWindow_Show",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_Show. Expected _wxLogWindow_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogWindow_Show(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLogWindow_GetFrame(_swigobj) (_swigobj->GetFrame()) +static PyObject *_wrap_wxLogWindow_GetFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _result; + wxLogWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWindow_GetFrame",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_GetFrame. Expected _wxLogWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFrame *)wxLogWindow_GetFrame(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxLogWindow_GetOldLog(_swigobj) (_swigobj->GetOldLog()) +static PyObject *_wrap_wxLogWindow_GetOldLog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLog * _result; + wxLogWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWindow_GetOldLog",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_GetOldLog. Expected _wxLogWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLog *)wxLogWindow_GetOldLog(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxLogWindow_IsPassingMessages(_swigobj) (_swigobj->IsPassingMessages()) +static PyObject *_wrap_wxLogWindow_IsPassingMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxLogWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogWindow_IsPassingMessages",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_IsPassingMessages. Expected _wxLogWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxLogWindow_IsPassingMessages(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxLogWindow_PassMessages(_swigobj,_swigarg0) (_swigobj->PassMessages(_swigarg0)) +static PyObject *_wrap_wxLogWindow_PassMessages(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogWindow * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","bDoPass", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxLogWindow_PassMessages",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLogWindow_PassMessages. Expected _wxLogWindow_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxLogWindow_PassMessages(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxLogNull() (new wxLogNull()) +static PyObject *_wrap_new_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogNull * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLogNull",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxLogNull *)new_wxLogNull(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxLogNull_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxLogNull(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxLogNull(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLogNull * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLogNull",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLogNull_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLogNull. Expected _wxLogNull_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxLogNull(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxProcessEventTowxEvent(void *ptr) { + wxProcessEvent *src; + wxEvent *dest; + src = (wxProcessEvent *) ptr; + dest = (wxEvent *) src; + return (void *) dest; +} + +#define new_wxProcessEvent(_swigarg0,_swigarg1,_swigarg2) (new wxProcessEvent(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxProcessEvent * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + char *_kwnames[] = { "id","pid","exitcode", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxProcessEvent",_kwnames,&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxProcessEvent *)new_wxProcessEvent(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxProcessEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcessEvent_GetPid(_swigobj) (_swigobj->GetPid()) +static PyObject *_wrap_wxProcessEvent_GetPid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetPid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetPid. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetPid(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_GetExitCode(_swigobj) (_swigobj->GetExitCode()) +static PyObject *_wrap_wxProcessEvent_GetExitCode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_GetExitCode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_GetExitCode. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_GetExitCode(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_set(_swigobj,_swigval) (_swigobj->m_pid = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_pid_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_pid", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_pid_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_pid_get(_swigobj) ((int ) _swigobj->m_pid) +static PyObject *_wrap_wxProcessEvent_m_pid_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_pid_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_pid_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_pid_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_set(_swigobj,_swigval) (_swigobj->m_exitcode = _swigval,_swigval) +static PyObject *_wrap_wxProcessEvent_m_exitcode_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","m_exitcode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxProcessEvent_m_exitcode_set",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_set. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_set(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcessEvent_m_exitcode_get(_swigobj) ((int ) _swigobj->m_exitcode) +static PyObject *_wrap_wxProcessEvent_m_exitcode_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxProcessEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcessEvent_m_exitcode_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxProcessEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcessEvent_m_exitcode_get. Expected _wxProcessEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxProcessEvent_m_exitcode_get(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxPyProcessTowxEvtHandler(void *ptr) { + wxPyProcess *src; + wxEvtHandler *dest; + src = (wxPyProcess *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +#define new_wxProcess(_swigarg0,_swigarg1) (new wxPyProcess(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxProcess(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _result; + wxEvtHandler * _arg0 = (wxEvtHandler *) NULL; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "parent","id", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxProcess",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxProcess. Expected _wxEvtHandler_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyProcess *)new_wxProcess(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyProcess_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void wxPyProcess_Destroy(wxPyProcess *self) { delete self; } +static PyObject *_wrap_wxProcess_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Destroy. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyProcess_Destroy(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxProcess__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess__setSelf. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess__setSelf(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_base_OnTerminate(_swigobj,_swigarg0,_swigarg1) (_swigobj->base_OnTerminate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxProcess_base_OnTerminate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pid","status", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxProcess_base_OnTerminate",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_base_OnTerminate. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_base_OnTerminate(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_Redirect(_swigobj) (_swigobj->Redirect()) +static PyObject *_wrap_wxProcess_Redirect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Redirect",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Redirect. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Redirect(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_IsRedirected(_swigobj) (_swigobj->IsRedirected()) +static PyObject *_wrap_wxProcess_IsRedirected(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_IsRedirected",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_IsRedirected. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxProcess_IsRedirected(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxProcess_Detach(_swigobj) (_swigobj->Detach()) +static PyObject *_wrap_wxProcess_Detach(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_Detach",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_Detach. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_Detach(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxProcess_GetInputStream(_swigobj) (_swigobj->GetInputStream()) +static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetInputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetInputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetInputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(_resultobj, "thisown", one); + Py_DECREF(one); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetErrorStream(_swigobj) (_swigobj->GetErrorStream()) +static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxInputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetErrorStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetErrorStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxInputStream *)wxProcess_GetErrorStream(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + wxPyInputStream * _ptr = NULL; + + if (_result) { + _ptr = new wxPyInputStream(_result); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + _resultobj = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + _resultobj = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString(_resultobj, "thisown", one); + Py_DECREF(one); + } + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +} + return _resultobj; +} + +#define wxProcess_GetOutputStream(_swigobj) (_swigobj->GetOutputStream()) +static PyObject *_wrap_wxProcess_GetOutputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _result; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_GetOutputStream",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_GetOutputStream. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxOutputStream *)wxProcess_GetOutputStream(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxOutputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxProcess_CloseOutput(_swigobj) (_swigobj->CloseOutput()) +static PyObject *_wrap_wxProcess_CloseOutput(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyProcess * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxProcess_CloseOutput",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyProcess_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxProcess_CloseOutput. Expected _wxPyProcess_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxProcess_CloseOutput(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxJoystick(_swigarg0) (new wxJoystick(_swigarg0)) +static PyObject *_wrap_new_wxJoystick(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxJoystick * _result; + int _arg0 = (int ) wxJOYSTICK1; + char *_kwnames[] = { "joystick", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxJoystick",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxJoystick *)new_wxJoystick(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxJoystick_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxJoystick_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxJoystick_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetPosition. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxJoystick_GetPosition(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxJoystick_GetZPosition(_swigobj) (_swigobj->GetZPosition()) +static PyObject *_wrap_wxJoystick_GetZPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetZPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetZPosition. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetZPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetButtonState(_swigobj) (_swigobj->GetButtonState()) +static PyObject *_wrap_wxJoystick_GetButtonState(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetButtonState",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetButtonState. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetButtonState(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetPOVPosition(_swigobj) (_swigobj->GetPOVPosition()) +static PyObject *_wrap_wxJoystick_GetPOVPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetPOVPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetPOVPosition. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetPOVPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetPOVCTSPosition(_swigobj) (_swigobj->GetPOVCTSPosition()) +static PyObject *_wrap_wxJoystick_GetPOVCTSPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetPOVCTSPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetPOVCTSPosition. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetPOVCTSPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetRudderPosition(_swigobj) (_swigobj->GetRudderPosition()) +static PyObject *_wrap_wxJoystick_GetRudderPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetRudderPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetRudderPosition. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetRudderPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetUPosition(_swigobj) (_swigobj->GetUPosition()) +static PyObject *_wrap_wxJoystick_GetUPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetUPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetUPosition. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetUPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetVPosition(_swigobj) (_swigobj->GetVPosition()) +static PyObject *_wrap_wxJoystick_GetVPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetVPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetVPosition. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetVPosition(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetMovementThreshold(_swigobj) (_swigobj->GetMovementThreshold()) +static PyObject *_wrap_wxJoystick_GetMovementThreshold(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetMovementThreshold",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetMovementThreshold. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetMovementThreshold(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_SetMovementThreshold(_swigobj,_swigarg0) (_swigobj->SetMovementThreshold(_swigarg0)) +static PyObject *_wrap_wxJoystick_SetMovementThreshold(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxJoystick * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","threshold", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxJoystick_SetMovementThreshold",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_SetMovementThreshold. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxJoystick_SetMovementThreshold(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxJoystick_IsOk(_swigobj) (_swigobj->IsOk()) +static PyObject *_wrap_wxJoystick_IsOk(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_IsOk",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_IsOk. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_IsOk(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetNumberJoysticks(_swigobj) (_swigobj->GetNumberJoysticks()) +static PyObject *_wrap_wxJoystick_GetNumberJoysticks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetNumberJoysticks",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetNumberJoysticks. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetNumberJoysticks(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetManufacturerId(_swigobj) (_swigobj->GetManufacturerId()) +static PyObject *_wrap_wxJoystick_GetManufacturerId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetManufacturerId",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetManufacturerId. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetManufacturerId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetProductId(_swigobj) (_swigobj->GetProductId()) +static PyObject *_wrap_wxJoystick_GetProductId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetProductId",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetProductId. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetProductId(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetProductName(_swigobj) (_swigobj->GetProductName()) +static PyObject *_wrap_wxJoystick_GetProductName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetProductName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetProductName. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxJoystick_GetProductName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxJoystick_GetXMin(_swigobj) (_swigobj->GetXMin()) +static PyObject *_wrap_wxJoystick_GetXMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetXMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetXMin. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetXMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetYMin(_swigobj) (_swigobj->GetYMin()) +static PyObject *_wrap_wxJoystick_GetYMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetYMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetYMin. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetYMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetZMin(_swigobj) (_swigobj->GetZMin()) +static PyObject *_wrap_wxJoystick_GetZMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetZMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetZMin. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetZMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetXMax(_swigobj) (_swigobj->GetXMax()) +static PyObject *_wrap_wxJoystick_GetXMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetXMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetXMax. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetXMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetYMax(_swigobj) (_swigobj->GetYMax()) +static PyObject *_wrap_wxJoystick_GetYMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetYMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetYMax. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetYMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetZMax(_swigobj) (_swigobj->GetZMax()) +static PyObject *_wrap_wxJoystick_GetZMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetZMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetZMax. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetZMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetNumberButtons(_swigobj) (_swigobj->GetNumberButtons()) +static PyObject *_wrap_wxJoystick_GetNumberButtons(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetNumberButtons",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetNumberButtons. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetNumberButtons(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetNumberAxes(_swigobj) (_swigobj->GetNumberAxes()) +static PyObject *_wrap_wxJoystick_GetNumberAxes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetNumberAxes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetNumberAxes. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetNumberAxes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetMaxButtons(_swigobj) (_swigobj->GetMaxButtons()) +static PyObject *_wrap_wxJoystick_GetMaxButtons(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetMaxButtons",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetMaxButtons. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetMaxButtons(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetMaxAxes(_swigobj) (_swigobj->GetMaxAxes()) +static PyObject *_wrap_wxJoystick_GetMaxAxes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetMaxAxes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetMaxAxes. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetMaxAxes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetPollingMin(_swigobj) (_swigobj->GetPollingMin()) +static PyObject *_wrap_wxJoystick_GetPollingMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetPollingMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetPollingMin. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetPollingMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetPollingMax(_swigobj) (_swigobj->GetPollingMax()) +static PyObject *_wrap_wxJoystick_GetPollingMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetPollingMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetPollingMax. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetPollingMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetRudderMin(_swigobj) (_swigobj->GetRudderMin()) +static PyObject *_wrap_wxJoystick_GetRudderMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetRudderMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetRudderMin. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetRudderMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetRudderMax(_swigobj) (_swigobj->GetRudderMax()) +static PyObject *_wrap_wxJoystick_GetRudderMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetRudderMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetRudderMax. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetRudderMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetUMin(_swigobj) (_swigobj->GetUMin()) +static PyObject *_wrap_wxJoystick_GetUMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetUMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetUMin. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetUMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetUMax(_swigobj) (_swigobj->GetUMax()) +static PyObject *_wrap_wxJoystick_GetUMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetUMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetUMax. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetUMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetVMin(_swigobj) (_swigobj->GetVMin()) +static PyObject *_wrap_wxJoystick_GetVMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetVMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetVMin. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetVMin(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_GetVMax(_swigobj) (_swigobj->GetVMax()) +static PyObject *_wrap_wxJoystick_GetVMax(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_GetVMax",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_GetVMax. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxJoystick_GetVMax(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_HasRudder(_swigobj) (_swigobj->HasRudder()) +static PyObject *_wrap_wxJoystick_HasRudder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_HasRudder",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_HasRudder. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_HasRudder(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_HasZ(_swigobj) (_swigobj->HasZ()) +static PyObject *_wrap_wxJoystick_HasZ(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_HasZ",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_HasZ. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_HasZ(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_HasU(_swigobj) (_swigobj->HasU()) +static PyObject *_wrap_wxJoystick_HasU(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_HasU",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_HasU. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_HasU(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_HasV(_swigobj) (_swigobj->HasV()) +static PyObject *_wrap_wxJoystick_HasV(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_HasV",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_HasV. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_HasV(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_HasPOV(_swigobj) (_swigobj->HasPOV()) +static PyObject *_wrap_wxJoystick_HasPOV(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_HasPOV",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_HasPOV. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_HasPOV(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_HasPOV4Dir(_swigobj) (_swigobj->HasPOV4Dir()) +static PyObject *_wrap_wxJoystick_HasPOV4Dir(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_HasPOV4Dir",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_HasPOV4Dir. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_HasPOV4Dir(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_HasPOVCTS(_swigobj) (_swigobj->HasPOVCTS()) +static PyObject *_wrap_wxJoystick_HasPOVCTS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_HasPOVCTS",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_HasPOVCTS. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_HasPOVCTS(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_SetCapture(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetCapture(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxJoystick_SetCapture(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + wxWindow * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","win","pollingFreq", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxJoystick_SetCapture",_kwnames,&_argo0,&_argo1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_SetCapture. Expected _wxJoystick_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxJoystick_SetCapture. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_SetCapture(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxJoystick_ReleaseCapture(_swigobj) (_swigobj->ReleaseCapture()) +static PyObject *_wrap_wxJoystick_ReleaseCapture(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxJoystick * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxJoystick_ReleaseCapture",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxJoystick_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxJoystick_ReleaseCapture. Expected _wxJoystick_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxJoystick_ReleaseCapture(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyMethodDef misc2cMethods[] = { + { "wxJoystick_ReleaseCapture", (PyCFunction) _wrap_wxJoystick_ReleaseCapture, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_SetCapture", (PyCFunction) _wrap_wxJoystick_SetCapture, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_HasPOVCTS", (PyCFunction) _wrap_wxJoystick_HasPOVCTS, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_HasPOV4Dir", (PyCFunction) _wrap_wxJoystick_HasPOV4Dir, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_HasPOV", (PyCFunction) _wrap_wxJoystick_HasPOV, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_HasV", (PyCFunction) _wrap_wxJoystick_HasV, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_HasU", (PyCFunction) _wrap_wxJoystick_HasU, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_HasZ", (PyCFunction) _wrap_wxJoystick_HasZ, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_HasRudder", (PyCFunction) _wrap_wxJoystick_HasRudder, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetVMax", (PyCFunction) _wrap_wxJoystick_GetVMax, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetVMin", (PyCFunction) _wrap_wxJoystick_GetVMin, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetUMax", (PyCFunction) _wrap_wxJoystick_GetUMax, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetUMin", (PyCFunction) _wrap_wxJoystick_GetUMin, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetRudderMax", (PyCFunction) _wrap_wxJoystick_GetRudderMax, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetRudderMin", (PyCFunction) _wrap_wxJoystick_GetRudderMin, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetPollingMax", (PyCFunction) _wrap_wxJoystick_GetPollingMax, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetPollingMin", (PyCFunction) _wrap_wxJoystick_GetPollingMin, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetMaxAxes", (PyCFunction) _wrap_wxJoystick_GetMaxAxes, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetMaxButtons", (PyCFunction) _wrap_wxJoystick_GetMaxButtons, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetNumberAxes", (PyCFunction) _wrap_wxJoystick_GetNumberAxes, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetNumberButtons", (PyCFunction) _wrap_wxJoystick_GetNumberButtons, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetZMax", (PyCFunction) _wrap_wxJoystick_GetZMax, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetYMax", (PyCFunction) _wrap_wxJoystick_GetYMax, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetXMax", (PyCFunction) _wrap_wxJoystick_GetXMax, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetZMin", (PyCFunction) _wrap_wxJoystick_GetZMin, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetYMin", (PyCFunction) _wrap_wxJoystick_GetYMin, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetXMin", (PyCFunction) _wrap_wxJoystick_GetXMin, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetProductName", (PyCFunction) _wrap_wxJoystick_GetProductName, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetProductId", (PyCFunction) _wrap_wxJoystick_GetProductId, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetManufacturerId", (PyCFunction) _wrap_wxJoystick_GetManufacturerId, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetNumberJoysticks", (PyCFunction) _wrap_wxJoystick_GetNumberJoysticks, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_IsOk", (PyCFunction) _wrap_wxJoystick_IsOk, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_SetMovementThreshold", (PyCFunction) _wrap_wxJoystick_SetMovementThreshold, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetMovementThreshold", (PyCFunction) _wrap_wxJoystick_GetMovementThreshold, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetVPosition", (PyCFunction) _wrap_wxJoystick_GetVPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetUPosition", (PyCFunction) _wrap_wxJoystick_GetUPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetRudderPosition", (PyCFunction) _wrap_wxJoystick_GetRudderPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetPOVCTSPosition", (PyCFunction) _wrap_wxJoystick_GetPOVCTSPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetPOVPosition", (PyCFunction) _wrap_wxJoystick_GetPOVPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetButtonState", (PyCFunction) _wrap_wxJoystick_GetButtonState, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetZPosition", (PyCFunction) _wrap_wxJoystick_GetZPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxJoystick_GetPosition", (PyCFunction) _wrap_wxJoystick_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "new_wxJoystick", (PyCFunction) _wrap_new_wxJoystick, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_CloseOutput", (PyCFunction) _wrap_wxProcess_CloseOutput, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetOutputStream", (PyCFunction) _wrap_wxProcess_GetOutputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetErrorStream", (PyCFunction) _wrap_wxProcess_GetErrorStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_GetInputStream", (PyCFunction) _wrap_wxProcess_GetInputStream, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Detach", (PyCFunction) _wrap_wxProcess_Detach, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_IsRedirected", (PyCFunction) _wrap_wxProcess_IsRedirected, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Redirect", (PyCFunction) _wrap_wxProcess_Redirect, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_base_OnTerminate", (PyCFunction) _wrap_wxProcess_base_OnTerminate, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess__setSelf", (PyCFunction) _wrap_wxProcess__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "wxProcess_Destroy", (PyCFunction) _wrap_wxProcess_Destroy, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcess", (PyCFunction) _wrap_new_wxProcess, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_get", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_exitcode_set", (PyCFunction) _wrap_wxProcessEvent_m_exitcode_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_get", (PyCFunction) _wrap_wxProcessEvent_m_pid_get, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_m_pid_set", (PyCFunction) _wrap_wxProcessEvent_m_pid_set, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetExitCode", (PyCFunction) _wrap_wxProcessEvent_GetExitCode, METH_VARARGS | METH_KEYWORDS }, + { "wxProcessEvent_GetPid", (PyCFunction) _wrap_wxProcessEvent_GetPid, METH_VARARGS | METH_KEYWORDS }, + { "new_wxProcessEvent", (PyCFunction) _wrap_new_wxProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxLogNull", (PyCFunction) _wrap_delete_wxLogNull, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogNull", (PyCFunction) _wrap_new_wxLogNull, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_PassMessages", (PyCFunction) _wrap_wxLogWindow_PassMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_IsPassingMessages", (PyCFunction) _wrap_wxLogWindow_IsPassingMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_GetOldLog", (PyCFunction) _wrap_wxLogWindow_GetOldLog, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_GetFrame", (PyCFunction) _wrap_wxLogWindow_GetFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWindow_Show", (PyCFunction) _wrap_wxLogWindow_Show, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogWindow", (PyCFunction) _wrap_new_wxLogWindow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogGui", (PyCFunction) _wrap_new_wxLogGui, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogTextCtrl", (PyCFunction) _wrap_new_wxLogTextCtrl, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLogStderr", (PyCFunction) _wrap_new_wxLogStderr, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_IsAllowedTraceMask", (PyCFunction) _wrap_wxLog_IsAllowedTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetTraceMask", (PyCFunction) _wrap_wxLog_GetTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetVerbose", (PyCFunction) _wrap_wxLog_GetVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_RemoveTraceMask", (PyCFunction) _wrap_wxLog_RemoveTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_AddTraceMask", (PyCFunction) _wrap_wxLog_AddTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetTraceMask", (PyCFunction) _wrap_wxLog_SetTraceMask, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_DontCreateOnDemand", (PyCFunction) _wrap_wxLog_DontCreateOnDemand, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetVerbose", (PyCFunction) _wrap_wxLog_SetVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_Resume", (PyCFunction) _wrap_wxLog_Resume, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_Suspend", (PyCFunction) _wrap_wxLog_Suspend, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetActiveTarget", (PyCFunction) _wrap_wxLog_SetActiveTarget, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetActiveTarget", (PyCFunction) _wrap_wxLog_GetActiveTarget, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_FlushActive", (PyCFunction) _wrap_wxLog_FlushActive, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_HasPendingMessages", (PyCFunction) _wrap_wxLog_HasPendingMessages, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_Flush", (PyCFunction) _wrap_wxLog_Flush, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_OnLog", (PyCFunction) _wrap_wxLog_OnLog, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_EnableLogging", (PyCFunction) _wrap_wxLog_EnableLogging, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_IsEnabled", (PyCFunction) _wrap_wxLog_IsEnabled, METH_VARARGS | METH_KEYWORDS }, + { "new_wxLog", (PyCFunction) _wrap_new_wxLog, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_Stop", (PyCFunction) _wrap_wxPyTimer_Stop, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_Start", (PyCFunction) _wrap_wxPyTimer_Start, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_SetOwner", (PyCFunction) _wrap_wxPyTimer_SetOwner, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_IsRunning", (PyCFunction) _wrap_wxPyTimer_IsRunning, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_IsOneShot", (PyCFunction) _wrap_wxPyTimer_IsOneShot, METH_VARARGS | METH_KEYWORDS }, + { "wxPyTimer_GetInterval", (PyCFunction) _wrap_wxPyTimer_GetInterval, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxPyTimer", (PyCFunction) _wrap_delete_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyTimer", (PyCFunction) _wrap_new_wxPyTimer, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_RedrawImage", (PyCFunction) _wrap_wxDragImage_RedrawImage, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_GetImageRect", (PyCFunction) _wrap_wxDragImage_GetImageRect, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_Hide", (PyCFunction) _wrap_wxDragImage_Hide, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_Show", (PyCFunction) _wrap_wxDragImage_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_Move", (PyCFunction) _wrap_wxDragImage_Move, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_EndDrag", (PyCFunction) _wrap_wxDragImage_EndDrag, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_BeginDrag2", (PyCFunction) _wrap_wxDragImage_BeginDrag2, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_BeginDrag", (PyCFunction) _wrap_wxDragImage_BeginDrag, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxDragImage", (PyCFunction) _wrap_delete_wxDragImage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDragImage", (PyCFunction) _wrap_new_wxDragImage, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyTipProvider", (PyCFunction) _wrap_new_wxPyTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxTipProvider_GetCurrentTip", (PyCFunction) _wrap_wxTipProvider_GetCurrentTip, METH_VARARGS | METH_KEYWORDS }, + { "wxTipProvider_GetTip", (PyCFunction) _wrap_wxTipProvider_GetTip, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxTipProvider", (PyCFunction) _wrap_delete_wxTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxWindowDisabler", (PyCFunction) _wrap_delete_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, + { "new_wxWindowDisabler", (PyCFunction) _wrap_new_wxWindowDisabler, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxBusyCursor", (PyCFunction) _wrap_delete_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxBusyCursor", (PyCFunction) _wrap_new_wxBusyCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_GetFacenames", (PyCFunction) _wrap_wxFontEnumerator_GetFacenames, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_GetEncodings", (PyCFunction) _wrap_wxFontEnumerator_GetEncodings, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_EnumerateEncodings", (PyCFunction) _wrap_wxFontEnumerator_EnumerateEncodings, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator_EnumerateFacenames", (PyCFunction) _wrap_wxFontEnumerator_EnumerateFacenames, METH_VARARGS | METH_KEYWORDS }, + { "wxFontEnumerator__setSelf", (PyCFunction) _wrap_wxFontEnumerator__setSelf, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFontEnumerator", (PyCFunction) _wrap_delete_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFontEnumerator", (PyCFunction) _wrap_new_wxFontEnumerator, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_SetSize", (PyCFunction) _wrap_wxCaret_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_SetSizeWH", (PyCFunction) _wrap_wxCaret_SetSizeWH, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_Move", (PyCFunction) _wrap_wxCaret_Move, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_MoveXY", (PyCFunction) _wrap_wxCaret_MoveXY, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetWindow", (PyCFunction) _wrap_wxCaret_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetSize", (PyCFunction) _wrap_wxCaret_GetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetSizeTuple", (PyCFunction) _wrap_wxCaret_GetSizeTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetPosition", (PyCFunction) _wrap_wxCaret_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetPositionTuple", (PyCFunction) _wrap_wxCaret_GetPositionTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_IsVisible", (PyCFunction) _wrap_wxCaret_IsVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_IsOk", (PyCFunction) _wrap_wxCaret_IsOk, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxCaret", (PyCFunction) _wrap_delete_wxCaret, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCaret", (PyCFunction) _wrap_new_wxCaret, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_GetWindow", (PyCFunction) _wrap_wxToolTip_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, + { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, + { "wxExecute", (PyCFunction) _wrap_wxExecute, METH_VARARGS | METH_KEYWORDS }, + { "wxLogSysError", (PyCFunction) _wrap_wxLogSysError, METH_VARARGS | METH_KEYWORDS }, + { "wxLogStatusFrame", (PyCFunction) _wrap_wxLogStatusFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxLogStatus", (PyCFunction) _wrap_wxLogStatus, METH_VARARGS | METH_KEYWORDS }, + { "wxLogVerbose", (PyCFunction) _wrap_wxLogVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLogInfo", (PyCFunction) _wrap_wxLogInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxLogMessage", (PyCFunction) _wrap_wxLogMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxLogWarning", (PyCFunction) _wrap_wxLogWarning, METH_VARARGS | METH_KEYWORDS }, + { "wxLogError", (PyCFunction) _wrap_wxLogError, METH_VARARGS | METH_KEYWORDS }, + { "wxLogFatalError", (PyCFunction) _wrap_wxLogFatalError, METH_VARARGS | METH_KEYWORDS }, + { "wxSysErrorMsg", (PyCFunction) _wrap_wxSysErrorMsg, METH_VARARGS | METH_KEYWORDS }, + { "wxSysErrorCode", (PyCFunction) _wrap_wxSysErrorCode, METH_VARARGS | METH_KEYWORDS }, + { "wxDragListItem", (PyCFunction) _wrap_wxDragListItem, METH_VARARGS | METH_KEYWORDS }, + { "wxDragTreeItem", (PyCFunction) _wrap_wxDragTreeItem, METH_VARARGS | METH_KEYWORDS }, + { "wxDragString", (PyCFunction) _wrap_wxDragString, METH_VARARGS | METH_KEYWORDS }, + { "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS }, + { "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS }, + { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, + { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, + { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, + { "wxCaret_GetBlinkTime", (PyCFunction) _wrap_wxCaret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_SetDelay", (PyCFunction) _wrap_wxToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS }, + { "wxToolTip_Enable", (PyCFunction) _wrap_wxToolTip_Enable, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_GetSystemMetric", (PyCFunction) _wrap_wxSystemSettings_GetSystemMetric, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_GetSystemFont", (PyCFunction) _wrap_wxSystemSettings_GetSystemFont, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemSettings_GetSystemColour", (PyCFunction) _wrap_wxSystemSettings_GetSystemColour, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceParseString", (PyCFunction) _wrap_wxResourceParseString, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceParseFile", (PyCFunction) _wrap_wxResourceParseFile, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceParseData", (PyCFunction) _wrap_wxResourceParseData, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceGetIdentifier", (PyCFunction) _wrap_wxResourceGetIdentifier, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceCreateMenuBar", (PyCFunction) _wrap_wxResourceCreateMenuBar, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceCreateIcon", (PyCFunction) _wrap_wxResourceCreateIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceCreateBitmap", (PyCFunction) _wrap_wxResourceCreateBitmap, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceClear", (PyCFunction) _wrap_wxResourceClear, METH_VARARGS | METH_KEYWORDS }, + { "wxResourceAddIdentifier", (PyCFunction) _wrap_wxResourceAddIdentifier, METH_VARARGS | METH_KEYWORDS }, + { "wxGetActiveWindow", (PyCFunction) _wrap_wxGetActiveWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxBeginBusyCursor", (PyCFunction) _wrap_wxBeginBusyCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS }, + { "wxFindWindowByLabel", (PyCFunction) _wrap_wxFindWindowByLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxSetCursor", (PyCFunction) _wrap_wxSetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxGetDisplaySize", (PyCFunction) _wrap_wxGetDisplaySize, METH_VARARGS | METH_KEYWORDS }, + { "wxDisplaySize", (PyCFunction) _wrap_wxDisplaySize, METH_VARARGS | METH_KEYWORDS }, + { "wxGetDisplayDepth", (PyCFunction) _wrap_wxGetDisplayDepth, METH_VARARGS | METH_KEYWORDS }, + { "wxDisplayDepth", (PyCFunction) _wrap_wxDisplayDepth, METH_VARARGS | METH_KEYWORDS }, + { "wxColourDisplay", (PyCFunction) _wrap_wxColourDisplay, METH_VARARGS | METH_KEYWORDS }, + { "wxGetNumberFromUser", (PyCFunction) _wrap_wxGetNumberFromUser, METH_VARARGS | METH_KEYWORDS }, + { "wxMessageBox", (PyCFunction) _wrap_wxMessageBox, METH_VARARGS | METH_KEYWORDS }, + { "wxGetSingleChoiceIndex", (PyCFunction) _wrap_wxGetSingleChoiceIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxGetSingleChoice", (PyCFunction) _wrap_wxGetSingleChoice, METH_VARARGS | METH_KEYWORDS }, + { "wxGetPasswordFromUser", (PyCFunction) _wrap_wxGetPasswordFromUser, METH_VARARGS | METH_KEYWORDS }, + { "wxGetTextFromUser", (PyCFunction) _wrap_wxGetTextFromUser, METH_VARARGS | METH_KEYWORDS }, + { "wxFileSelector", (PyCFunction) _wrap_wxFileSelector, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, + { "_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_wxEvent","_class_wxEvent",0}, + { "_class_wxActivateEvent","_wxActivateEvent",0}, + { "_signed_long","_long",0}, + { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, + { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, + { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, + { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_class_wxRegionIterator","_wxRegionIterator",0}, + { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, + { "_class_wxMenuBar","_wxMenuBar",0}, + { "_class_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_class_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_class_wxEvtHandler","_wxEvtHandler",0}, + { "_wxPaintEvent","_class_wxPaintEvent",0}, + { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, + { "_wxCursor","_class_wxCursor",0}, + { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, + { "_wxLog","_wxLogGui",SwigwxLogGuiTowxLog}, + { "_wxLog","_class_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_wxLog","_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_wxLog","_class_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_wxLog","_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_wxLog","_class_wxLog",0}, + { "_wxMask","_class_wxMask",0}, + { "_wxToolTip","_class_wxToolTip",0}, + { "_wxPen","_class_wxPen",0}, + { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_byte","_unsigned_char",0}, + { "_wxDataObject","_class_wxDataObject",0}, + { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, + { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0}, + { "_wxPyDropSource","_class_wxPyDropSource",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_wxImageList","_class_wxImageList",0}, + { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, + { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, + { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_class_wxClipboard","_wxClipboard",0}, + { "_wxDC","_class_wxDC",0}, + { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_wxSpinEvent","_class_wxSpinEvent",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_class_wxRealPoint","_wxRealPoint",0}, + { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, + { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, + { "_class_wxMenuItem","_wxMenuItem",0}, + { "_class_wxPaintEvent","_wxPaintEvent",0}, + { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, + { "_wxPanel","_class_wxPanel",0}, + { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, + { "_wxPyEvent","_class_wxPyEvent",0}, + { "_class_wxMask","_wxMask",0}, + { "_wxTextDataObject","_class_wxTextDataObject",0}, + { "_class_wxKeyEvent","_wxKeyEvent",0}, + { "_class_wxToolTip","_wxToolTip",0}, + { "_wxColour","_class_wxColour",0}, + { "_class_wxDialog","_wxDialog",0}, + { "_wxBusyCursor","_class_wxBusyCursor",0}, + { "_class_wxFileDataObject","_wxFileDataObject",0}, + { "_wxIdleEvent","_class_wxIdleEvent",0}, + { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0}, + { "_class_wxDataObject","_wxDataObject",0}, + { "_wxCaret","_class_wxCaret",0}, + { "_wxBrush","_class_wxBrush",0}, + { "_wxDataFormat","_class_wxDataFormat",0}, + { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, + { "_wxShowEvent","_class_wxShowEvent",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_wxPyValidator","_class_wxPyValidator",0}, + { "_class_wxEvent","_class_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_class_wxEvent","_wxProcessEvent",SwigwxProcessEventTowxEvent}, + { "_class_wxEvent","_wxEvent",0}, + { "_wxRect","_class_wxRect",0}, + { "_wxCommandEvent","_class_wxCommandEvent",0}, + { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, + { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, + { "_char","_wxChar",0}, + { "_wxBitmap","_class_wxBitmap",0}, + { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, + { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_class_wxNotifyEvent","_wxNotifyEvent",0}, + { "_class_wxValidator","_wxValidator",0}, + { "_class_wxPyEvent","_wxPyEvent",0}, + { "_class_wxIconizeEvent","_wxIconizeEvent",0}, + { "_class_wxBusyCursor","_wxBusyCursor",0}, + { "_wxDropTarget","_class_wxDropTarget",0}, + { "_wxScrollEvent","_class_wxScrollEvent",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_class_wxRegion","_wxRegion",0}, + { "_class_wxDataFormat","_wxDataFormat",0}, + { "_class_wxDropFilesEvent","_wxDropFilesEvent",0}, + { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0}, + { "_wxFont","_class_wxFont",0}, + { "_class_wxPyDropTarget","_wxPyDropTarget",0}, + { "_wxCloseEvent","_class_wxCloseEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, + { "_unsigned_long","_long",0}, + { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_wxDC",0}, + { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_wxGenericDragImage","_class_wxGenericDragImage",0}, + { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, + { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, + { "_wxFocusEvent","_class_wxFocusEvent",0}, + { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, + { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, + { "_class_wxPanel","_wxPanel",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, + { "_class_wxTextDataObject","_wxTextDataObject",0}, + { "_wxMenu","_class_wxMenu",0}, + { "_class_wxMoveEvent","_wxMoveEvent",0}, + { "_wxScreenDC","_class_wxScreenDC",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_class_wxDropTarget","_wxDropTarget",0}, + { "_class_wxCaret","_wxCaret",0}, + { "_class_wxBrush","_wxBrush",0}, + { "_wxTipProvider","_class_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_wxTipProvider","_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, + { "_class_wxFont","_wxFont",0}, + { "_wxClipboard","_class_wxClipboard",0}, + { "_class_wxPyValidator","_wxPyValidator",0}, + { "_class_wxCloseEvent","_wxCloseEvent",0}, + { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_class_wxMenuEvent","_wxMenuEvent",0}, + { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, + { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, + { "_wxClientDC","_class_wxClientDC",0}, + { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_class_wxGenericDragImage","_wxGenericDragImage",0}, + { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, + { "_wxRealPoint","_class_wxRealPoint",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_wxMemoryDC","_class_wxMemoryDC",0}, + { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, + { "_wxPaintDC","_class_wxPaintDC",0}, + { "_class_wxWindowDC","_wxWindowDC",0}, + { "_class_wxFocusEvent","_wxFocusEvent",0}, + { "_class_wxMaximizeEvent","_wxMaximizeEvent",0}, + { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, + { "_class_wxCursor","_wxCursor",0}, + { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, + { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_class_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_class_wxLog","_wxLogWindow",SwigwxLogWindowTowxLog}, + { "_class_wxLog","_class_wxLogGui",SwigwxLogGuiTowxLog}, + { "_class_wxLog","_wxLogGui",SwigwxLogGuiTowxLog}, + { "_class_wxLog","_class_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_class_wxLog","_wxLogTextCtrl",SwigwxLogTextCtrlTowxLog}, + { "_class_wxLog","_class_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_class_wxLog","_wxLogStderr",SwigwxLogStderrTowxLog}, + { "_class_wxLog","_wxLog",0}, + { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, + { "_class_wxMenu","_wxMenu",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxIcon","_class_wxIcon",0}, + { "_wxDialog","_class_wxDialog",0}, + { "_class_wxPen","_wxPen",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0}, + { "_class_wxPyDropSource","_wxPyDropSource",0}, + { "_class_wxScrollEvent","_wxScrollEvent",0}, + { "_wxJoystickEvent","_class_wxJoystickEvent",0}, + { "_class_wxImageList","_wxImageList",0}, + { "_wxPyTipProvider","_class_wxPyTipProvider",0}, + { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_class_wxMouseEvent","_wxMouseEvent",0}, + { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, + { "_class_wxSpinEvent","_wxSpinEvent",0}, + { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, + { "_wxSize","_class_wxSize",0}, + { "_wxRegionIterator","_class_wxRegionIterator",0}, + { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, + { "_class_wxPaintDC","_wxPaintDC",0}, + { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, + { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, + { "_class_wxInitDialogEvent","_wxInitDialogEvent",0}, + { "_wxValidator","_class_wxValidator",0}, + { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, + { "_wxIconizeEvent","_class_wxIconizeEvent",0}, + { "_class_wxIcon","_wxIcon",0}, + { "_class_wxColour","_wxColour",0}, + { "_class_wxScreenDC","_wxScreenDC",0}, + { "_wxPalette","_class_wxPalette",0}, + { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxEraseEvent","_class_wxEraseEvent",0}, + { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, + { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxTipProvider","_class_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_class_wxTipProvider","_wxPyTipProvider",SwigwxPyTipProviderTowxTipProvider}, + { "_class_wxTipProvider","_wxTipProvider",0}, + { "_wxRegion","_class_wxRegion",0}, + { "_class_wxShowEvent","_wxShowEvent",0}, + { "_class_wxPyTipProvider","_wxPyTipProvider",0}, + { "_wxPyDropTarget","_class_wxPyDropTarget",0}, + { "_wxActivateEvent","_class_wxActivateEvent",0}, + { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, + { "_class_wxCommandEvent","_wxCommandEvent",0}, + { "_class_wxClientDC","_wxClientDC",0}, + { "_class_wxSizeEvent","_wxSizeEvent",0}, + { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, + { "_class_wxSize","_wxSize",0}, + { "_class_wxBitmap","_wxBitmap",0}, + { "_class_wxMemoryDC","_wxMemoryDC",0}, + { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, + { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, + { "_wxEvtHandler","_class_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_wxEvtHandler","_wxPyProcess",SwigwxPyProcessTowxEvtHandler}, + { "_wxEvtHandler","_class_wxEvtHandler",0}, + { "_wxMenuItem","_class_wxMenuItem",0}, + { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_wxKeyEvent","_class_wxKeyEvent",0}, + { "_wxMoveEvent","_class_wxMoveEvent",0}, + { "_class_wxPalette","_wxPalette",0}, + { "_wxFileDataObject","_class_wxFileDataObject",0}, + { "_class_wxEraseEvent","_wxEraseEvent",0}, + { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, + { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, + { "_wxWindow","_class_wxWindow",0}, + { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initmisc2c() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("misc2c", misc2cMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxSYS_WHITE_BRUSH", PyInt_FromLong((long) wxSYS_WHITE_BRUSH)); + PyDict_SetItemString(d,"wxSYS_LTGRAY_BRUSH", PyInt_FromLong((long) wxSYS_LTGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_GRAY_BRUSH", PyInt_FromLong((long) wxSYS_GRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_DKGRAY_BRUSH", PyInt_FromLong((long) wxSYS_DKGRAY_BRUSH)); + PyDict_SetItemString(d,"wxSYS_BLACK_BRUSH", PyInt_FromLong((long) wxSYS_BLACK_BRUSH)); + PyDict_SetItemString(d,"wxSYS_NULL_BRUSH", PyInt_FromLong((long) wxSYS_NULL_BRUSH)); + PyDict_SetItemString(d,"wxSYS_HOLLOW_BRUSH", PyInt_FromLong((long) wxSYS_HOLLOW_BRUSH)); + PyDict_SetItemString(d,"wxSYS_WHITE_PEN", PyInt_FromLong((long) wxSYS_WHITE_PEN)); + PyDict_SetItemString(d,"wxSYS_BLACK_PEN", PyInt_FromLong((long) wxSYS_BLACK_PEN)); + PyDict_SetItemString(d,"wxSYS_NULL_PEN", PyInt_FromLong((long) wxSYS_NULL_PEN)); + PyDict_SetItemString(d,"wxSYS_OEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_OEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_FIXED_FONT", PyInt_FromLong((long) wxSYS_ANSI_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_ANSI_VAR_FONT", PyInt_FromLong((long) wxSYS_ANSI_VAR_FONT)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FONT)); + PyDict_SetItemString(d,"wxSYS_DEVICE_DEFAULT_FONT", PyInt_FromLong((long) wxSYS_DEVICE_DEFAULT_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_PALETTE", PyInt_FromLong((long) wxSYS_DEFAULT_PALETTE)); + PyDict_SetItemString(d,"wxSYS_SYSTEM_FIXED_FONT", PyInt_FromLong((long) wxSYS_SYSTEM_FIXED_FONT)); + PyDict_SetItemString(d,"wxSYS_DEFAULT_GUI_FONT", PyInt_FromLong((long) wxSYS_DEFAULT_GUI_FONT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_SCROLLBAR", PyInt_FromLong((long) wxSYS_COLOUR_SCROLLBAR)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BACKGROUND", PyInt_FromLong((long) wxSYS_COLOUR_BACKGROUND)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTION", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTION)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENU", PyInt_FromLong((long) wxSYS_COLOUR_MENU)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOW", PyInt_FromLong((long) wxSYS_COLOUR_WINDOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWFRAME", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWFRAME)); + PyDict_SetItemString(d,"wxSYS_COLOUR_MENUTEXT", PyInt_FromLong((long) wxSYS_COLOUR_MENUTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_WINDOWTEXT", PyInt_FromLong((long) wxSYS_COLOUR_WINDOWTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_CAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_CAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_ACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_ACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVEBORDER", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVEBORDER)); + PyDict_SetItemString(d,"wxSYS_COLOUR_APPWORKSPACE", PyInt_FromLong((long) wxSYS_COLOUR_APPWORKSPACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_HIGHLIGHTTEXT", PyInt_FromLong((long) wxSYS_COLOUR_HIGHLIGHTTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNFACE", PyInt_FromLong((long) wxSYS_COLOUR_BTNFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_BTNSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_GRAYTEXT", PyInt_FromLong((long) wxSYS_COLOUR_GRAYTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNTEXT", PyInt_FromLong((long) wxSYS_COLOUR_BTNTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INACTIVECAPTIONTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INACTIVECAPTIONTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DDKSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DDKSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOTEXT", PyInt_FromLong((long) wxSYS_COLOUR_INFOTEXT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_INFOBK", PyInt_FromLong((long) wxSYS_COLOUR_INFOBK)); + PyDict_SetItemString(d,"wxSYS_COLOUR_DESKTOP", PyInt_FromLong((long) wxSYS_COLOUR_DESKTOP)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DFACE", PyInt_FromLong((long) wxSYS_COLOUR_3DFACE)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DSHADOW", PyInt_FromLong((long) wxSYS_COLOUR_3DSHADOW)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHIGHLIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHIGHLIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_3DHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_3DHILIGHT)); + PyDict_SetItemString(d,"wxSYS_COLOUR_BTNHILIGHT", PyInt_FromLong((long) wxSYS_COLOUR_BTNHILIGHT)); + PyDict_SetItemString(d,"wxSYS_MOUSE_BUTTONS", PyInt_FromLong((long) wxSYS_MOUSE_BUTTONS)); + PyDict_SetItemString(d,"wxSYS_BORDER_X", PyInt_FromLong((long) wxSYS_BORDER_X)); + PyDict_SetItemString(d,"wxSYS_BORDER_Y", PyInt_FromLong((long) wxSYS_BORDER_Y)); + PyDict_SetItemString(d,"wxSYS_CURSOR_X", PyInt_FromLong((long) wxSYS_CURSOR_X)); + PyDict_SetItemString(d,"wxSYS_CURSOR_Y", PyInt_FromLong((long) wxSYS_CURSOR_Y)); + PyDict_SetItemString(d,"wxSYS_DCLICK_X", PyInt_FromLong((long) wxSYS_DCLICK_X)); + PyDict_SetItemString(d,"wxSYS_DCLICK_Y", PyInt_FromLong((long) wxSYS_DCLICK_Y)); + PyDict_SetItemString(d,"wxSYS_DRAG_X", PyInt_FromLong((long) wxSYS_DRAG_X)); + PyDict_SetItemString(d,"wxSYS_DRAG_Y", PyInt_FromLong((long) wxSYS_DRAG_Y)); + PyDict_SetItemString(d,"wxSYS_EDGE_X", PyInt_FromLong((long) wxSYS_EDGE_X)); + PyDict_SetItemString(d,"wxSYS_EDGE_Y", PyInt_FromLong((long) wxSYS_EDGE_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_HSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_HTHUMB_X", PyInt_FromLong((long) wxSYS_HTHUMB_X)); + PyDict_SetItemString(d,"wxSYS_ICON_X", PyInt_FromLong((long) wxSYS_ICON_X)); + PyDict_SetItemString(d,"wxSYS_ICON_Y", PyInt_FromLong((long) wxSYS_ICON_Y)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_X", PyInt_FromLong((long) wxSYS_ICONSPACING_X)); + PyDict_SetItemString(d,"wxSYS_ICONSPACING_Y", PyInt_FromLong((long) wxSYS_ICONSPACING_Y)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_X", PyInt_FromLong((long) wxSYS_WINDOWMIN_X)); + PyDict_SetItemString(d,"wxSYS_WINDOWMIN_Y", PyInt_FromLong((long) wxSYS_WINDOWMIN_Y)); + PyDict_SetItemString(d,"wxSYS_SCREEN_X", PyInt_FromLong((long) wxSYS_SCREEN_X)); + PyDict_SetItemString(d,"wxSYS_SCREEN_Y", PyInt_FromLong((long) wxSYS_SCREEN_Y)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_X", PyInt_FromLong((long) wxSYS_FRAMESIZE_X)); + PyDict_SetItemString(d,"wxSYS_FRAMESIZE_Y", PyInt_FromLong((long) wxSYS_FRAMESIZE_Y)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_X", PyInt_FromLong((long) wxSYS_SMALLICON_X)); + PyDict_SetItemString(d,"wxSYS_SMALLICON_Y", PyInt_FromLong((long) wxSYS_SMALLICON_Y)); + PyDict_SetItemString(d,"wxSYS_HSCROLL_Y", PyInt_FromLong((long) wxSYS_HSCROLL_Y)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_X", PyInt_FromLong((long) wxSYS_VSCROLL_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_X", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_X)); + PyDict_SetItemString(d,"wxSYS_VSCROLL_ARROW_Y", PyInt_FromLong((long) wxSYS_VSCROLL_ARROW_Y)); + PyDict_SetItemString(d,"wxSYS_VTHUMB_Y", PyInt_FromLong((long) wxSYS_VTHUMB_Y)); + PyDict_SetItemString(d,"wxSYS_CAPTION_Y", PyInt_FromLong((long) wxSYS_CAPTION_Y)); + PyDict_SetItemString(d,"wxSYS_MENU_Y", PyInt_FromLong((long) wxSYS_MENU_Y)); + PyDict_SetItemString(d,"wxSYS_NETWORK_PRESENT", PyInt_FromLong((long) wxSYS_NETWORK_PRESENT)); + PyDict_SetItemString(d,"wxSYS_PENWINDOWS_PRESENT", PyInt_FromLong((long) wxSYS_PENWINDOWS_PRESENT)); + PyDict_SetItemString(d,"wxSYS_SHOW_SOUNDS", PyInt_FromLong((long) wxSYS_SHOW_SOUNDS)); + PyDict_SetItemString(d,"wxSYS_SWAP_BUTTONS", PyInt_FromLong((long) wxSYS_SWAP_BUTTONS)); + PyDict_SetItemString(d,"wxLOG_FatalError", PyInt_FromLong((long) wxLOG_FatalError)); + PyDict_SetItemString(d,"wxLOG_Error", PyInt_FromLong((long) wxLOG_Error)); + PyDict_SetItemString(d,"wxLOG_Warning", PyInt_FromLong((long) wxLOG_Warning)); + PyDict_SetItemString(d,"wxLOG_Message", PyInt_FromLong((long) wxLOG_Message)); + PyDict_SetItemString(d,"wxLOG_Info", PyInt_FromLong((long) wxLOG_Info)); + PyDict_SetItemString(d,"wxLOG_Status", PyInt_FromLong((long) wxLOG_Status)); + PyDict_SetItemString(d,"wxLOG_Debug", PyInt_FromLong((long) wxLOG_Debug)); + PyDict_SetItemString(d,"wxLOG_Trace", PyInt_FromLong((long) wxLOG_Trace)); + PyDict_SetItemString(d,"wxLOG_Progress", PyInt_FromLong((long) wxLOG_Progress)); + PyDict_SetItemString(d,"wxLOG_User", PyInt_FromLong((long) wxLOG_User)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py new file mode 100644 index 0000000000..40206dc6a8 --- /dev/null +++ b/wxPython/src/msw/misc2.py @@ -0,0 +1,902 @@ +# This file was created automatically by SWIG. +import misc2c + +from windows import * + +from misc import * + +from gdi import * + +from clip_dnd import * + +from events import * + +from streams import * +class wxToolTipPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetTip(self, *_args, **_kwargs): + val = apply(misc2c.wxToolTip_SetTip,(self,) + _args, _kwargs) + return val + def GetTip(self, *_args, **_kwargs): + val = apply(misc2c.wxToolTip_GetTip,(self,) + _args, _kwargs) + return val + def GetWindow(self, *_args, **_kwargs): + val = apply(misc2c.wxToolTip_GetWindow,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxToolTip(wxToolTipPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxToolTip,_args,_kwargs) + self.thisown = 1 + + + + +class wxCaretPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxCaret(self) + def IsOk(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_IsOk,(self,) + _args, _kwargs) + return val + def IsVisible(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_IsVisible,(self,) + _args, _kwargs) + return val + def GetPositionTuple(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetPositionTuple,(self,) + _args, _kwargs) + return val + def GetPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def GetSizeTuple(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetSizeTuple,(self,) + _args, _kwargs) + return val + def GetSize(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def GetWindow(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_GetWindow,(self,) + _args, _kwargs) + if val: val = wxWindowPtr(val) + return val + def MoveXY(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_MoveXY,(self,) + _args, _kwargs) + return val + def Move(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_Move,(self,) + _args, _kwargs) + return val + def SetSizeWH(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_SetSizeWH,(self,) + _args, _kwargs) + return val + def SetSize(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_SetSize,(self,) + _args, _kwargs) + return val + def Show(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_Show,(self,) + _args, _kwargs) + return val + def Hide(self, *_args, **_kwargs): + val = apply(misc2c.wxCaret_Hide,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxCaret(wxCaretPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxCaret,_args,_kwargs) + self.thisown = 1 + + + + +class wxFontEnumeratorPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxFontEnumerator(self) + def _setSelf(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator__setSelf,(self,) + _args, _kwargs) + return val + def EnumerateFacenames(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_EnumerateFacenames,(self,) + _args, _kwargs) + return val + def EnumerateEncodings(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_EnumerateEncodings,(self,) + _args, _kwargs) + return val + def GetEncodings(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_GetEncodings,(self,) + _args, _kwargs) + return val + def GetFacenames(self, *_args, **_kwargs): + val = apply(misc2c.wxFontEnumerator_GetFacenames,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFontEnumerator(wxFontEnumeratorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxFontEnumerator,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxFontEnumerator) + + + + +class wxBusyCursorPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxBusyCursor(self) + def __repr__(self): + return "" % (self.this,) +class wxBusyCursor(wxBusyCursorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxBusyCursor,_args,_kwargs) + self.thisown = 1 + + + + +class wxWindowDisablerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxWindowDisabler(self) + def __repr__(self): + return "" % (self.this,) +class wxWindowDisabler(wxWindowDisablerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxWindowDisabler,_args,_kwargs) + self.thisown = 1 + + + + +class wxTipProviderPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxTipProvider(self) + def GetTip(self, *_args, **_kwargs): + val = apply(misc2c.wxTipProvider_GetTip,(self,) + _args, _kwargs) + return val + def GetCurrentTip(self, *_args, **_kwargs): + val = apply(misc2c.wxTipProvider_GetCurrentTip,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxTipProvider(wxTipProviderPtr): + def __init__(self,this): + self.this = this + + + + +class wxPyTipProviderPtr(wxTipProviderPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxPyTipProvider(wxPyTipProviderPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxPyTipProvider,_args,_kwargs) + self.thisown = 1 + + + + +class wxDragImagePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxDragImage(self) + def BeginDrag(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_BeginDrag,(self,) + _args, _kwargs) + return val + def BeginDrag2(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_BeginDrag2,(self,) + _args, _kwargs) + return val + def EndDrag(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_EndDrag,(self,) + _args, _kwargs) + return val + def Move(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_Move,(self,) + _args, _kwargs) + return val + def Show(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_Show,(self,) + _args, _kwargs) + return val + def Hide(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_Hide,(self,) + _args, _kwargs) + return val + def GetImageRect(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_GetImageRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def RedrawImage(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_RedrawImage,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxDragImage(wxDragImagePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxDragImage,_args,_kwargs) + self.thisown = 1 + + + + +class wxPyTimerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxPyTimer(self) + def GetInterval(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_GetInterval,(self,) + _args, _kwargs) + return val + def IsOneShot(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_IsOneShot,(self,) + _args, _kwargs) + return val + def IsRunning(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_IsRunning,(self,) + _args, _kwargs) + return val + def SetOwner(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_SetOwner,(self,) + _args, _kwargs) + return val + def Start(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_Start,(self,) + _args, _kwargs) + return val + def Stop(self, *_args, **_kwargs): + val = apply(misc2c.wxPyTimer_Stop,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyTimer(wxPyTimerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxPyTimer,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Flush(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_Flush,(self,) + _args, _kwargs) + return val + def HasPendingMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_HasPendingMessages,(self,) + _args, _kwargs) + return val + def SetVerbose(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_SetVerbose,(self,) + _args, _kwargs) + return val + def GetVerbose(self, *_args, **_kwargs): + val = apply(misc2c.wxLog_GetVerbose,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxLog(wxLogPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLog,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogStderrPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxLogStderr(wxLogStderrPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogStderr,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogTextCtrlPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxLogTextCtrl(wxLogTextCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogTextCtrl,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogGuiPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxLogGui(wxLogGuiPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogGui,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogWindowPtr(wxLogPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Show(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_Show,(self,) + _args, _kwargs) + return val + def GetFrame(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_GetFrame,(self,) + _args, _kwargs) + if val: val = wxFramePtr(val) + return val + def GetOldLog(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_GetOldLog,(self,) + _args, _kwargs) + if val: val = wxLogPtr(val) + return val + def IsPassingMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_IsPassingMessages,(self,) + _args, _kwargs) + return val + def PassMessages(self, *_args, **_kwargs): + val = apply(misc2c.wxLogWindow_PassMessages,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxLogWindow(wxLogWindowPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogWindow,_args,_kwargs) + self.thisown = 1 + + + + +class wxLogNullPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxLogNull(self) + def __repr__(self): + return "" % (self.this,) +class wxLogNull(wxLogNullPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxLogNull,_args,_kwargs) + self.thisown = 1 + + + + +class wxProcessEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPid(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetPid,(self,) + _args, _kwargs) + return val + def GetExitCode(self, *_args, **_kwargs): + val = apply(misc2c.wxProcessEvent_GetExitCode,(self,) + _args, _kwargs) + return val + def __setattr__(self,name,value): + if name == "m_pid" : + misc2c.wxProcessEvent_m_pid_set(self,value) + return + if name == "m_exitcode" : + misc2c.wxProcessEvent_m_exitcode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_pid" : + return misc2c.wxProcessEvent_m_pid_get(self) + if name == "m_exitcode" : + return misc2c.wxProcessEvent_m_exitcode_get(self) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) +class wxProcessEvent(wxProcessEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcessEvent,_args,_kwargs) + self.thisown = 1 + + + + +class wxProcessPtr(wxEvtHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Destroy(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Destroy,(self,) + _args, _kwargs) + return val + def _setSelf(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess__setSelf,(self,) + _args, _kwargs) + return val + def base_OnTerminate(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_base_OnTerminate,(self,) + _args, _kwargs) + return val + def Redirect(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Redirect,(self,) + _args, _kwargs) + return val + def IsRedirected(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_IsRedirected,(self,) + _args, _kwargs) + return val + def Detach(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_Detach,(self,) + _args, _kwargs) + return val + def GetInputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetInputStream,(self,) + _args, _kwargs) + return val + def GetErrorStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetErrorStream,(self,) + _args, _kwargs) + return val + def GetOutputStream(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_GetOutputStream,(self,) + _args, _kwargs) + if val: val = wxOutputStreamPtr(val) + return val + def CloseOutput(self, *_args, **_kwargs): + val = apply(misc2c.wxProcess_CloseOutput,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxProcess(wxProcessPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxProcess,_args,_kwargs) + self.thisown = 1 + self._setSelf(self, wxProcess) + + + + +class wxJoystickPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def GetZPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetZPosition,(self,) + _args, _kwargs) + return val + def GetButtonState(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetButtonState,(self,) + _args, _kwargs) + return val + def GetPOVPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetPOVPosition,(self,) + _args, _kwargs) + return val + def GetPOVCTSPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetPOVCTSPosition,(self,) + _args, _kwargs) + return val + def GetRudderPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetRudderPosition,(self,) + _args, _kwargs) + return val + def GetUPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetUPosition,(self,) + _args, _kwargs) + return val + def GetVPosition(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetVPosition,(self,) + _args, _kwargs) + return val + def GetMovementThreshold(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetMovementThreshold,(self,) + _args, _kwargs) + return val + def SetMovementThreshold(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_SetMovementThreshold,(self,) + _args, _kwargs) + return val + def IsOk(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_IsOk,(self,) + _args, _kwargs) + return val + def GetNumberJoysticks(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetNumberJoysticks,(self,) + _args, _kwargs) + return val + def GetManufacturerId(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetManufacturerId,(self,) + _args, _kwargs) + return val + def GetProductId(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetProductId,(self,) + _args, _kwargs) + return val + def GetProductName(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetProductName,(self,) + _args, _kwargs) + return val + def GetXMin(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetXMin,(self,) + _args, _kwargs) + return val + def GetYMin(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetYMin,(self,) + _args, _kwargs) + return val + def GetZMin(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetZMin,(self,) + _args, _kwargs) + return val + def GetXMax(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetXMax,(self,) + _args, _kwargs) + return val + def GetYMax(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetYMax,(self,) + _args, _kwargs) + return val + def GetZMax(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetZMax,(self,) + _args, _kwargs) + return val + def GetNumberButtons(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetNumberButtons,(self,) + _args, _kwargs) + return val + def GetNumberAxes(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetNumberAxes,(self,) + _args, _kwargs) + return val + def GetMaxButtons(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetMaxButtons,(self,) + _args, _kwargs) + return val + def GetMaxAxes(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetMaxAxes,(self,) + _args, _kwargs) + return val + def GetPollingMin(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetPollingMin,(self,) + _args, _kwargs) + return val + def GetPollingMax(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetPollingMax,(self,) + _args, _kwargs) + return val + def GetRudderMin(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetRudderMin,(self,) + _args, _kwargs) + return val + def GetRudderMax(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetRudderMax,(self,) + _args, _kwargs) + return val + def GetUMin(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetUMin,(self,) + _args, _kwargs) + return val + def GetUMax(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetUMax,(self,) + _args, _kwargs) + return val + def GetVMin(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetVMin,(self,) + _args, _kwargs) + return val + def GetVMax(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_GetVMax,(self,) + _args, _kwargs) + return val + def HasRudder(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_HasRudder,(self,) + _args, _kwargs) + return val + def HasZ(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_HasZ,(self,) + _args, _kwargs) + return val + def HasU(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_HasU,(self,) + _args, _kwargs) + return val + def HasV(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_HasV,(self,) + _args, _kwargs) + return val + def HasPOV(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_HasPOV,(self,) + _args, _kwargs) + return val + def HasPOV4Dir(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_HasPOV4Dir,(self,) + _args, _kwargs) + return val + def HasPOVCTS(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_HasPOVCTS,(self,) + _args, _kwargs) + return val + def SetCapture(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_SetCapture,(self,) + _args, _kwargs) + return val + def ReleaseCapture(self, *_args, **_kwargs): + val = apply(misc2c.wxJoystick_ReleaseCapture,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxJoystick(wxJoystickPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(misc2c.new_wxJoystick,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +wxFileSelector = misc2c.wxFileSelector + +wxGetTextFromUser = misc2c.wxGetTextFromUser + +wxGetPasswordFromUser = misc2c.wxGetPasswordFromUser + +wxGetSingleChoice = misc2c.wxGetSingleChoice + +wxGetSingleChoiceIndex = misc2c.wxGetSingleChoiceIndex + +wxMessageBox = misc2c.wxMessageBox + +wxGetNumberFromUser = misc2c.wxGetNumberFromUser + +wxColourDisplay = misc2c.wxColourDisplay + +wxDisplayDepth = misc2c.wxDisplayDepth + +wxGetDisplayDepth = misc2c.wxGetDisplayDepth + +wxDisplaySize = misc2c.wxDisplaySize + +def wxGetDisplaySize(*_args, **_kwargs): + val = apply(misc2c.wxGetDisplaySize,_args,_kwargs) + if val: val = wxSizePtr(val); val.thisown = 1 + return val + +wxSetCursor = misc2c.wxSetCursor + +def wxFindWindowByLabel(*_args, **_kwargs): + val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + +def wxFindWindowByName(*_args, **_kwargs): + val = apply(misc2c.wxFindWindowByName,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + +wxBeginBusyCursor = misc2c.wxBeginBusyCursor + +def wxGetActiveWindow(*_args, **_kwargs): + val = apply(misc2c.wxGetActiveWindow,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + +wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier + +wxResourceClear = misc2c.wxResourceClear + +def wxResourceCreateBitmap(*_args, **_kwargs): + val = apply(misc2c.wxResourceCreateBitmap,_args,_kwargs) + if val: val = wxBitmapPtr(val); val.thisown = 1 + return val + +def wxResourceCreateIcon(*_args, **_kwargs): + val = apply(misc2c.wxResourceCreateIcon,_args,_kwargs) + if val: val = wxIconPtr(val); val.thisown = 1 + return val + +def wxResourceCreateMenuBar(*_args, **_kwargs): + val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs) + if val: val = wxMenuBarPtr(val) + return val + +wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier + +wxResourceParseData = misc2c.wxResourceParseData + +wxResourceParseFile = misc2c.wxResourceParseFile + +wxResourceParseString = misc2c.wxResourceParseString + +def wxSystemSettings_GetSystemColour(*_args, **_kwargs): + val = apply(misc2c.wxSystemSettings_GetSystemColour,_args,_kwargs) + if val: val = wxColourPtr(val); val.thisown = 1 + return val + +def wxSystemSettings_GetSystemFont(*_args, **_kwargs): + val = apply(misc2c.wxSystemSettings_GetSystemFont,_args,_kwargs) + if val: val = wxFontPtr(val); val.thisown = 1 + return val + +wxSystemSettings_GetSystemMetric = misc2c.wxSystemSettings_GetSystemMetric + +wxToolTip_Enable = misc2c.wxToolTip_Enable + +wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay + +wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime + +wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime + +wxPostEvent = misc2c.wxPostEvent + +wxWakeUpIdle = misc2c.wxWakeUpIdle + +wxSafeYield = misc2c.wxSafeYield + +wxShowTip = misc2c.wxShowTip + +def wxCreateFileTipProvider(*_args, **_kwargs): + val = apply(misc2c.wxCreateFileTipProvider,_args,_kwargs) + if val: val = wxTipProviderPtr(val); val.thisown = 1 + return val + +def wxDragIcon(*_args, **_kwargs): + val = apply(misc2c.wxDragIcon,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +def wxDragString(*_args, **_kwargs): + val = apply(misc2c.wxDragString,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +def wxDragTreeItem(*_args, **_kwargs): + val = apply(misc2c.wxDragTreeItem,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +def wxDragListItem(*_args, **_kwargs): + val = apply(misc2c.wxDragListItem,_args,_kwargs) + if val: val = wxDragImagePtr(val); val.thisown = 1 + return val + +wxSysErrorCode = misc2c.wxSysErrorCode + +wxSysErrorMsg = misc2c.wxSysErrorMsg + +wxLogFatalError = misc2c.wxLogFatalError + +wxLogError = misc2c.wxLogError + +wxLogWarning = misc2c.wxLogWarning + +wxLogMessage = misc2c.wxLogMessage + +wxLogInfo = misc2c.wxLogInfo + +wxLogVerbose = misc2c.wxLogVerbose + +wxLogStatus = misc2c.wxLogStatus + +wxLogStatusFrame = misc2c.wxLogStatusFrame + +wxLogSysError = misc2c.wxLogSysError + +wxExecute = misc2c.wxExecute + +wxLog_IsEnabled = misc2c.wxLog_IsEnabled + +wxLog_EnableLogging = misc2c.wxLog_EnableLogging + +wxLog_OnLog = misc2c.wxLog_OnLog + +wxLog_FlushActive = misc2c.wxLog_FlushActive + +def wxLog_GetActiveTarget(*_args, **_kwargs): + val = apply(misc2c.wxLog_GetActiveTarget,_args,_kwargs) + if val: val = wxLogPtr(val) + return val + +def wxLog_SetActiveTarget(*_args, **_kwargs): + val = apply(misc2c.wxLog_SetActiveTarget,_args,_kwargs) + if val: val = wxLogPtr(val) + return val + +wxLog_Suspend = misc2c.wxLog_Suspend + +wxLog_Resume = misc2c.wxLog_Resume + +wxLog_DontCreateOnDemand = misc2c.wxLog_DontCreateOnDemand + +wxLog_SetTraceMask = misc2c.wxLog_SetTraceMask + +wxLog_AddTraceMask = misc2c.wxLog_AddTraceMask + +wxLog_RemoveTraceMask = misc2c.wxLog_RemoveTraceMask + +wxLog_GetTraceMask = misc2c.wxLog_GetTraceMask + +wxLog_IsAllowedTraceMask = misc2c.wxLog_IsAllowedTraceMask + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxSYS_WHITE_BRUSH = misc2c.wxSYS_WHITE_BRUSH +wxSYS_LTGRAY_BRUSH = misc2c.wxSYS_LTGRAY_BRUSH +wxSYS_GRAY_BRUSH = misc2c.wxSYS_GRAY_BRUSH +wxSYS_DKGRAY_BRUSH = misc2c.wxSYS_DKGRAY_BRUSH +wxSYS_BLACK_BRUSH = misc2c.wxSYS_BLACK_BRUSH +wxSYS_NULL_BRUSH = misc2c.wxSYS_NULL_BRUSH +wxSYS_HOLLOW_BRUSH = misc2c.wxSYS_HOLLOW_BRUSH +wxSYS_WHITE_PEN = misc2c.wxSYS_WHITE_PEN +wxSYS_BLACK_PEN = misc2c.wxSYS_BLACK_PEN +wxSYS_NULL_PEN = misc2c.wxSYS_NULL_PEN +wxSYS_OEM_FIXED_FONT = misc2c.wxSYS_OEM_FIXED_FONT +wxSYS_ANSI_FIXED_FONT = misc2c.wxSYS_ANSI_FIXED_FONT +wxSYS_ANSI_VAR_FONT = misc2c.wxSYS_ANSI_VAR_FONT +wxSYS_SYSTEM_FONT = misc2c.wxSYS_SYSTEM_FONT +wxSYS_DEVICE_DEFAULT_FONT = misc2c.wxSYS_DEVICE_DEFAULT_FONT +wxSYS_DEFAULT_PALETTE = misc2c.wxSYS_DEFAULT_PALETTE +wxSYS_SYSTEM_FIXED_FONT = misc2c.wxSYS_SYSTEM_FIXED_FONT +wxSYS_DEFAULT_GUI_FONT = misc2c.wxSYS_DEFAULT_GUI_FONT +wxSYS_COLOUR_SCROLLBAR = misc2c.wxSYS_COLOUR_SCROLLBAR +wxSYS_COLOUR_BACKGROUND = misc2c.wxSYS_COLOUR_BACKGROUND +wxSYS_COLOUR_ACTIVECAPTION = misc2c.wxSYS_COLOUR_ACTIVECAPTION +wxSYS_COLOUR_INACTIVECAPTION = misc2c.wxSYS_COLOUR_INACTIVECAPTION +wxSYS_COLOUR_MENU = misc2c.wxSYS_COLOUR_MENU +wxSYS_COLOUR_WINDOW = misc2c.wxSYS_COLOUR_WINDOW +wxSYS_COLOUR_WINDOWFRAME = misc2c.wxSYS_COLOUR_WINDOWFRAME +wxSYS_COLOUR_MENUTEXT = misc2c.wxSYS_COLOUR_MENUTEXT +wxSYS_COLOUR_WINDOWTEXT = misc2c.wxSYS_COLOUR_WINDOWTEXT +wxSYS_COLOUR_CAPTIONTEXT = misc2c.wxSYS_COLOUR_CAPTIONTEXT +wxSYS_COLOUR_ACTIVEBORDER = misc2c.wxSYS_COLOUR_ACTIVEBORDER +wxSYS_COLOUR_INACTIVEBORDER = misc2c.wxSYS_COLOUR_INACTIVEBORDER +wxSYS_COLOUR_APPWORKSPACE = misc2c.wxSYS_COLOUR_APPWORKSPACE +wxSYS_COLOUR_HIGHLIGHT = misc2c.wxSYS_COLOUR_HIGHLIGHT +wxSYS_COLOUR_HIGHLIGHTTEXT = misc2c.wxSYS_COLOUR_HIGHLIGHTTEXT +wxSYS_COLOUR_BTNFACE = misc2c.wxSYS_COLOUR_BTNFACE +wxSYS_COLOUR_BTNSHADOW = misc2c.wxSYS_COLOUR_BTNSHADOW +wxSYS_COLOUR_GRAYTEXT = misc2c.wxSYS_COLOUR_GRAYTEXT +wxSYS_COLOUR_BTNTEXT = misc2c.wxSYS_COLOUR_BTNTEXT +wxSYS_COLOUR_INACTIVECAPTIONTEXT = misc2c.wxSYS_COLOUR_INACTIVECAPTIONTEXT +wxSYS_COLOUR_BTNHIGHLIGHT = misc2c.wxSYS_COLOUR_BTNHIGHLIGHT +wxSYS_COLOUR_3DDKSHADOW = misc2c.wxSYS_COLOUR_3DDKSHADOW +wxSYS_COLOUR_3DLIGHT = misc2c.wxSYS_COLOUR_3DLIGHT +wxSYS_COLOUR_INFOTEXT = misc2c.wxSYS_COLOUR_INFOTEXT +wxSYS_COLOUR_INFOBK = misc2c.wxSYS_COLOUR_INFOBK +wxSYS_COLOUR_DESKTOP = misc2c.wxSYS_COLOUR_DESKTOP +wxSYS_COLOUR_3DFACE = misc2c.wxSYS_COLOUR_3DFACE +wxSYS_COLOUR_3DSHADOW = misc2c.wxSYS_COLOUR_3DSHADOW +wxSYS_COLOUR_3DHIGHLIGHT = misc2c.wxSYS_COLOUR_3DHIGHLIGHT +wxSYS_COLOUR_3DHILIGHT = misc2c.wxSYS_COLOUR_3DHILIGHT +wxSYS_COLOUR_BTNHILIGHT = misc2c.wxSYS_COLOUR_BTNHILIGHT +wxSYS_MOUSE_BUTTONS = misc2c.wxSYS_MOUSE_BUTTONS +wxSYS_BORDER_X = misc2c.wxSYS_BORDER_X +wxSYS_BORDER_Y = misc2c.wxSYS_BORDER_Y +wxSYS_CURSOR_X = misc2c.wxSYS_CURSOR_X +wxSYS_CURSOR_Y = misc2c.wxSYS_CURSOR_Y +wxSYS_DCLICK_X = misc2c.wxSYS_DCLICK_X +wxSYS_DCLICK_Y = misc2c.wxSYS_DCLICK_Y +wxSYS_DRAG_X = misc2c.wxSYS_DRAG_X +wxSYS_DRAG_Y = misc2c.wxSYS_DRAG_Y +wxSYS_EDGE_X = misc2c.wxSYS_EDGE_X +wxSYS_EDGE_Y = misc2c.wxSYS_EDGE_Y +wxSYS_HSCROLL_ARROW_X = misc2c.wxSYS_HSCROLL_ARROW_X +wxSYS_HSCROLL_ARROW_Y = misc2c.wxSYS_HSCROLL_ARROW_Y +wxSYS_HTHUMB_X = misc2c.wxSYS_HTHUMB_X +wxSYS_ICON_X = misc2c.wxSYS_ICON_X +wxSYS_ICON_Y = misc2c.wxSYS_ICON_Y +wxSYS_ICONSPACING_X = misc2c.wxSYS_ICONSPACING_X +wxSYS_ICONSPACING_Y = misc2c.wxSYS_ICONSPACING_Y +wxSYS_WINDOWMIN_X = misc2c.wxSYS_WINDOWMIN_X +wxSYS_WINDOWMIN_Y = misc2c.wxSYS_WINDOWMIN_Y +wxSYS_SCREEN_X = misc2c.wxSYS_SCREEN_X +wxSYS_SCREEN_Y = misc2c.wxSYS_SCREEN_Y +wxSYS_FRAMESIZE_X = misc2c.wxSYS_FRAMESIZE_X +wxSYS_FRAMESIZE_Y = misc2c.wxSYS_FRAMESIZE_Y +wxSYS_SMALLICON_X = misc2c.wxSYS_SMALLICON_X +wxSYS_SMALLICON_Y = misc2c.wxSYS_SMALLICON_Y +wxSYS_HSCROLL_Y = misc2c.wxSYS_HSCROLL_Y +wxSYS_VSCROLL_X = misc2c.wxSYS_VSCROLL_X +wxSYS_VSCROLL_ARROW_X = misc2c.wxSYS_VSCROLL_ARROW_X +wxSYS_VSCROLL_ARROW_Y = misc2c.wxSYS_VSCROLL_ARROW_Y +wxSYS_VTHUMB_Y = misc2c.wxSYS_VTHUMB_Y +wxSYS_CAPTION_Y = misc2c.wxSYS_CAPTION_Y +wxSYS_MENU_Y = misc2c.wxSYS_MENU_Y +wxSYS_NETWORK_PRESENT = misc2c.wxSYS_NETWORK_PRESENT +wxSYS_PENWINDOWS_PRESENT = misc2c.wxSYS_PENWINDOWS_PRESENT +wxSYS_SHOW_SOUNDS = misc2c.wxSYS_SHOW_SOUNDS +wxSYS_SWAP_BUTTONS = misc2c.wxSYS_SWAP_BUTTONS +wxLOG_FatalError = misc2c.wxLOG_FatalError +wxLOG_Error = misc2c.wxLOG_Error +wxLOG_Warning = misc2c.wxLOG_Warning +wxLOG_Message = misc2c.wxLOG_Message +wxLOG_Info = misc2c.wxLOG_Info +wxLOG_Status = misc2c.wxLOG_Status +wxLOG_Debug = misc2c.wxLOG_Debug +wxLOG_Trace = misc2c.wxLOG_Trace +wxLOG_Progress = misc2c.wxLOG_Progress +wxLOG_User = misc2c.wxLOG_User diff --git a/utils/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp similarity index 96% rename from utils/wxPython/src/msw/printfw.cpp rename to wxPython/src/msw/printfw.cpp index ddfbd057a7..c224ea72a8 100644 --- a/utils/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/printfw.cpp + * FILE : src/msw/printfw.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -61,7 +63,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -580,11 +581,22 @@ static PyObject *_wrap_wxPrintData_SetPrinterName(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -749,6 +761,149 @@ static PyObject *_wrap_wxPrintData_SetQuality(PyObject *self, PyObject *args, Py return _resultobj; } +static void *SwigwxPrinterDCTowxDC(void *ptr) { + wxPrinterDC *src; + wxDC *dest; + src = (wxPrinterDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +#define new_wxPrinterDC(_swigarg0) (new wxPrinterDC(_swigarg0)) +static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPrinterDC * _result; + wxPrintData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "printData", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPrinterDC",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPrinterDC. Expected _wxPrintData_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPrinterDC *)new_wxPrinterDC(*_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrinterDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPrinterDC2(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxPrinterDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxPrinterDC2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPrinterDC * _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + bool _arg3 = (bool ) TRUE; + int _arg4 = (int ) wxPORTRAIT; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "driver","device","output","interactive","orientation", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:new_wxPrinterDC2",_kwnames,&_obj0,&_obj1,&_obj2,&tempbool3,&_arg4)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + _arg3 = (bool ) tempbool3; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPrinterDC *)new_wxPrinterDC2(*_arg0,*_arg1,*_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPrinterDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + #define new_wxPageSetupDialogData() (new wxPageSetupDialogData()) static PyObject *_wrap_new_wxPageSetupDialogData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1552,13 +1707,12 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginBottomRight(PyObject *s static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPageSetupDialogData * _arg0; - wxPaperSize * _arg1; + wxPaperSize _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; char *_kwnames[] = { "self","id", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1567,16 +1721,9 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPaperSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupDialogData_SetPaperId. Expected _wxPaperSize_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - wxPageSetupDialogData_SetPaperId(_arg0,*_arg1); + wxPageSetupDialogData_SetPaperId(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -2679,17 +2826,19 @@ static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxPrintout__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPrintout__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPrintout__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyPrintout * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPrintout__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPrintout__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2701,9 +2850,12 @@ static PyObject *_wrap_wxPrintout__setSelf(PyObject *self, PyObject *args, PyObj { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPrintout__setSelf(_arg0,_arg1); + wxPrintout__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4114,8 +4266,8 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje wxPrintPreview * _arg0; wxFrame * _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; @@ -4146,11 +4298,22 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -4315,6 +4478,8 @@ static PyMethodDef printfwcMethods[] = { { "wxPageSetupDialogData_EnableHelp", (PyCFunction) _wrap_wxPageSetupDialogData_EnableHelp, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPageSetupDialogData", (PyCFunction) _wrap_delete_wxPageSetupDialogData, METH_VARARGS | METH_KEYWORDS }, { "new_wxPageSetupDialogData", (PyCFunction) _wrap_new_wxPageSetupDialogData, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPrinterDC2", (PyCFunction) _wrap_new_wxPrinterDC2, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPrinterDC", (PyCFunction) _wrap_new_wxPrinterDC, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetQuality", (PyCFunction) _wrap_wxPrintData_SetQuality, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetPaperSize", (PyCFunction) _wrap_wxPrintData_SetPaperSize, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetPaperId", (PyCFunction) _wrap_wxPrintData_SetPaperId, METH_VARARGS | METH_KEYWORDS }, @@ -4360,7 +4525,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -4391,7 +4558,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -4402,6 +4568,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, + { "_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC}, + { "_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC}, { "_wxDC","_class_wxDC",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0}, @@ -4410,14 +4578,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -4456,10 +4625,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -4469,11 +4640,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, @@ -4506,18 +4679,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, + { "_class_wxDC","_class_wxPrinterDC",SwigwxPrinterDCTowxDC}, + { "_class_wxDC","_wxPrinterDC",SwigwxPrinterDCTowxDC}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxPrintDialog",SwigwxPrintDialogTowxPanel}, @@ -4595,6 +4769,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -4625,6 +4800,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -4634,6 +4810,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -4645,12 +4822,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPrintPreview","_wxPrintPreview",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -4676,6 +4860,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -4711,8 +4896,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollBar","_wxScrollBar",0}, { "_class_wxColourDialog","_wxColourDialog",0}, { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, diff --git a/utils/wxPython/src/gtk/printfw.py b/wxPython/src/msw/printfw.py similarity index 97% rename from utils/wxPython/src/gtk/printfw.py rename to wxPython/src/msw/printfw.py index aced8dc62b..ff628475d1 100644 --- a/utils/wxPython/src/gtk/printfw.py +++ b/wxPython/src/msw/printfw.py @@ -91,6 +91,25 @@ class wxPrintData(wxPrintDataPtr): +class wxPrinterDCPtr(wxDCPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxPrinterDC(wxPrinterDCPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(printfwc.new_wxPrinterDC,_args,_kwargs) + self.thisown = 1 + + + +def wxPrinterDC2(*_args,**_kwargs): + val = wxPrinterDCPtr(apply(printfwc.new_wxPrinterDC2,_args,_kwargs)) + val.thisown = 1 + return val + + class wxPageSetupDialogDataPtr : def __init__(self,this): self.this = this @@ -215,7 +234,7 @@ class wxPageSetupDialog(wxPageSetupDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPageSetupDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -325,7 +344,7 @@ class wxPrintDialog(wxPrintDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPrintDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -386,7 +405,7 @@ class wxPrintout(wxPrintoutPtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPrintout,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPrintout) @@ -508,7 +527,7 @@ class wxPreviewFrame(wxPreviewFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(printfwc.new_wxPreviewFrame,_args,_kwargs) self.thisown = 1 - wx._StdFrameCallbacks(self) + #wx._StdFrameCallbacks(self) diff --git a/utils/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp similarity index 57% rename from utils/wxPython/src/msw/sizers.cpp rename to wxPython/src/msw/sizers.cpp index 4e744fc64d..15224016f3 100644 --- a/utils/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/sizers.cpp + * FILE : src/msw/sizers.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,7 +59,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -223,6 +224,125 @@ static PyObject *_wrap_wxSizerItem_SetDimension(PyObject *self, PyObject *args, return _resultobj; } +#define wxSizerItem_SetRatioWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRatio(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizerItem_SetRatioWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSizerItem_SetRatioWH",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetRatioWH. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetRatioWH(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_SetRatioSize(_swigobj,_swigarg0) (_swigobj->SetRatio(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetRatioSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetRatioSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetRatioSize. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetRatioSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_SetRatio(_swigobj,_swigarg0) (_swigobj->SetRatio(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetRatio(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + float _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","ratio", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Of:wxSizerItem_SetRatio",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetRatio. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetRatio(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_GetRatio(_swigobj) (_swigobj->GetRatio()) +static PyObject *_wrap_wxSizerItem_GetRatio(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + float _result; + wxSizerItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetRatio",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetRatio. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (float )wxSizerItem_GetRatio(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("f",_result); + return _resultobj; +} + #define wxSizerItem_IsWindow(_swigobj) (_swigobj->IsWindow()) static PyObject *_wrap_wxSizerItem_IsWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -338,6 +458,42 @@ static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxSizerItem_SetWindow(_swigobj,_swigarg0) (_swigobj->SetWindow(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetWindow",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetWindow. Expected _wxSizerItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizerItem_SetWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetWindow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizerItem_GetSizer(_swigobj) (_swigobj->GetSizer()) static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -372,6 +528,42 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxSizerItem_SetSizer(_swigobj,_swigarg0) (_swigobj->SetSizer(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + wxSizer * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetSizer",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetSizer. Expected _wxSizerItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizerItem_SetSizer. Expected _wxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizerItem_SetSizer(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizerItem_GetOption(_swigobj) (_swigobj->GetOption()) static PyObject *_wrap_wxSizerItem_GetOption(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -771,6 +963,149 @@ static PyObject *_wrap_wxSizer_AddSpacer(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static void wxSizer_InsertWindow(wxSizer *self,int before,wxWindow * window,int option,int flag,int border,PyObject * userData) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, window, option, flag, border, data); + } +static PyObject *_wrap_wxSizer_InsertWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + wxWindow * _arg2; + int _arg3 = (int ) 0; + int _arg4 = (int ) 0; + int _arg5 = (int ) 0; + PyObject * _arg6 = (PyObject *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + PyObject * _obj6 = 0; + char *_kwnames[] = { "self","before","window","option","flag","border","userData", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|iiiO:wxSizer_InsertWindow",_kwnames,&_argo0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_obj6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_InsertWindow. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSizer_InsertWindow. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj6) +{ + _arg6 = _obj6; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_InsertWindow(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxSizer_InsertSizer(wxSizer *self,int before,wxSizer * sizer,int option,int flag,int border,PyObject * userData) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, sizer, option, flag, border, data); + } +static PyObject *_wrap_wxSizer_InsertSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + wxSizer * _arg2; + int _arg3 = (int ) 0; + int _arg4 = (int ) 0; + int _arg5 = (int ) 0; + PyObject * _arg6 = (PyObject *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + PyObject * _obj6 = 0; + char *_kwnames[] = { "self","before","sizer","option","flag","border","userData", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|iiiO:wxSizer_InsertSizer",_kwnames,&_argo0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_obj6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_InsertSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSizer_InsertSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_obj6) +{ + _arg6 = _obj6; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_InsertSizer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void wxSizer_InsertSpacer(wxSizer *self,int before,int width,int height,int option,int flag,int border,PyObject * userData) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, width, height, option, flag, border, data); + } +static PyObject *_wrap_wxSizer_InsertSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4 = (int ) 0; + int _arg5 = (int ) 0; + int _arg6 = (int ) 0; + PyObject * _arg7 = (PyObject *) NULL; + PyObject * _argo0 = 0; + PyObject * _obj7 = 0; + char *_kwnames[] = { "self","before","width","height","option","flag","border","userData", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii|iiiO:wxSizer_InsertSpacer",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_obj7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_InsertSpacer. Expected _wxSizer_p."); + return NULL; + } + } + if (_obj7) +{ + _arg7 = _obj7; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_InsertSpacer(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void wxSizer_PrependWindow(wxSizer *self,wxWindow * window,int option,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); @@ -1042,6 +1377,147 @@ static PyObject *_wrap_wxSizer_SetDimension(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxSizer_SetMinSize(_swigobj,_swigarg0) (_swigobj->SetMinSize(_swigarg0)) +static PyObject *_wrap_wxSizer_SetMinSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetMinSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetMinSize. Expected _wxSizer_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetMinSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeWindow(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizeWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeWindow",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeWindow. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetItemMinSizeWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetItemMinSizeWindow(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeSizer(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizeSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxSizer * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeSizer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetItemMinSizeSizer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizePos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizePos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxSizer_SetItemMinSizePos",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizePos. Expected _wxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxSizer_SetItemMinSizePos(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizer_GetSize(_swigobj) (_swigobj->GetSize()) static PyObject *_wrap_wxSizer_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1293,17 +1769,19 @@ static PyObject *_wrap_new_wxPySizer(PyObject *self, PyObject *args, PyObject *k return _resultobj; } -#define wxPySizer__setSelf(_swigobj,_swigarg0) (_swigobj->_setSelf(_swigarg0)) +#define wxPySizer__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPySizer__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPySizer * _arg0; PyObject * _arg1; + PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPySizer__setSelf",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPySizer__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1315,9 +1793,12 @@ static PyObject *_wrap_wxPySizer__setSelf(PyObject *self, PyObject *args, PyObje { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPySizer__setSelf(_arg0,_arg1); + wxPySizer__setSelf(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -1386,6 +1867,62 @@ static PyObject *_wrap_wxBoxSizer_GetOrientation(PyObject *self, PyObject *args, return _resultobj; } +#define wxBoxSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxBoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBoxSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBoxSizer_RecalcSizes. Expected _wxBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBoxSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBoxSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBoxSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBoxSizer_CalcMin. Expected _wxBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxBoxSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static void *SwigwxStaticBoxSizerTowxBoxSizer(void *ptr) { wxStaticBoxSizer *src; wxBoxSizer *dest; @@ -1471,9 +2008,749 @@ static PyObject *_wrap_wxStaticBoxSizer_GetStaticBox(PyObject *self, PyObject *a return _resultobj; } +#define wxStaticBoxSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxStaticBoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStaticBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStaticBoxSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBoxSizer_RecalcSizes. Expected _wxStaticBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxStaticBoxSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStaticBoxSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxStaticBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxStaticBoxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStaticBoxSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStaticBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStaticBoxSizer_CalcMin. Expected _wxStaticBoxSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxStaticBoxSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static void *SwigwxNotebookSizerTowxSizer(void *ptr) { + wxNotebookSizer *src; + wxSizer *dest; + src = (wxNotebookSizer *) ptr; + dest = (wxSizer *) src; + return (void *) dest; +} + +#define new_wxNotebookSizer(_swigarg0) (new wxNotebookSizer(_swigarg0)) +static PyObject *_wrap_new_wxNotebookSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebookSizer * _result; + wxNotebook * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "nb", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxNotebookSizer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxNotebookSizer. Expected _wxNotebook_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxNotebookSizer *)new_wxNotebookSizer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebookSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxNotebookSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxNotebookSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebookSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookSizer_RecalcSizes. Expected _wxNotebookSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebookSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebookSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxNotebookSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxNotebookSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookSizer_CalcMin. Expected _wxNotebookSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxNotebookSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxNotebookSizer_GetNotebook(_swigobj) (_swigobj->GetNotebook()) +static PyObject *_wrap_wxNotebookSizer_GetNotebook(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _result; + wxNotebookSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebookSizer_GetNotebook",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebookSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebookSizer_GetNotebook. Expected _wxNotebookSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxNotebook *)wxNotebookSizer_GetNotebook(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNotebook_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxGridSizerTowxSizer(void *ptr) { + wxGridSizer *src; + wxSizer *dest; + src = (wxGridSizer *) ptr; + dest = (wxSizer *) src; + return (void *) dest; +} + +#define new_wxGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxGridSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _result; + int _arg0 = (int ) 1; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + int _arg3 = (int ) 0; + char *_kwnames[] = { "rows","cols","vgap","hgap", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxGridSizer",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxGridSizer *)new_wxGridSizer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGridSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxGridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_RecalcSizes. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxGridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_CalcMin. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxGridSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGridSizer_SetCols(_swigobj,_swigarg0) (_swigobj->SetCols(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","cols", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetCols",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetCols. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetCols(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_SetRows(_swigobj,_swigarg0) (_swigobj->SetRows(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","rows", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetRows",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetRows. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetRows(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_SetVGap(_swigobj,_swigarg0) (_swigobj->SetVGap(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetVGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","gap", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetVGap",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetVGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetVGap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_SetHGap(_swigobj,_swigarg0) (_swigobj->SetHGap(_swigarg0)) +static PyObject *_wrap_wxGridSizer_SetHGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","gap", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridSizer_SetHGap",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_SetHGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxGridSizer_SetHGap(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGridSizer_GetCols(_swigobj) (_swigobj->GetCols()) +static PyObject *_wrap_wxGridSizer_GetCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetCols",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetCols. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetCols(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizer_GetRows(_swigobj) (_swigobj->GetRows()) +static PyObject *_wrap_wxGridSizer_GetRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetRows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetRows. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetRows(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizer_GetVGap(_swigobj) (_swigobj->GetVGap()) +static PyObject *_wrap_wxGridSizer_GetVGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetVGap",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetVGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetVGap(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGridSizer_GetHGap(_swigobj) (_swigobj->GetHGap()) +static PyObject *_wrap_wxGridSizer_GetHGap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridSizer_GetHGap",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridSizer_GetHGap. Expected _wxGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxGridSizer_GetHGap(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxFlexGridSizerTowxGridSizer(void *ptr) { + wxFlexGridSizer *src; + wxGridSizer *dest; + src = (wxFlexGridSizer *) ptr; + dest = (wxGridSizer *) src; + return (void *) dest; +} + +static void *SwigwxFlexGridSizerTowxSizer(void *ptr) { + wxFlexGridSizer *src; + wxSizer *dest; + src = (wxFlexGridSizer *) ptr; + dest = (wxSizer *) src; + return (void *) dest; +} + +#define new_wxFlexGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxFlexGridSizer(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxFlexGridSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _result; + int _arg0 = (int ) 1; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + int _arg3 = (int ) 0; + char *_kwnames[] = { "rows","cols","vgap","hgap", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxFlexGridSizer",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFlexGridSizer *)new_wxFlexGridSizer(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFlexGridSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFlexGridSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) +static PyObject *_wrap_wxFlexGridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFlexGridSizer_RecalcSizes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_RecalcSizes. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_RecalcSizes(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_CalcMin(_swigobj) (_swigobj->CalcMin()) +static PyObject *_wrap_wxFlexGridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxFlexGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFlexGridSizer_CalcMin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_CalcMin. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxSize (wxFlexGridSizer_CalcMin(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxFlexGridSizer_AddGrowableRow(_swigobj,_swigarg0) (_swigobj->AddGrowableRow(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_AddGrowableRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_AddGrowableRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_AddGrowableRow. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_AddGrowableRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_RemoveGrowableRow(_swigobj,_swigarg0) (_swigobj->RemoveGrowableRow(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_RemoveGrowableRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_RemoveGrowableRow. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_RemoveGrowableRow(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_AddGrowableCol(_swigobj,_swigarg0) (_swigobj->AddGrowableCol(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_AddGrowableCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_AddGrowableCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_AddGrowableCol. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_AddGrowableCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_RemoveGrowableCol(_swigobj,_swigarg0) (_swigobj->RemoveGrowableCol(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","idx", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_RemoveGrowableCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_RemoveGrowableCol. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFlexGridSizer_RemoveGrowableCol(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef sizerscMethods[] = { + { "wxFlexGridSizer_RemoveGrowableCol", (PyCFunction) _wrap_wxFlexGridSizer_RemoveGrowableCol, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_AddGrowableCol", (PyCFunction) _wrap_wxFlexGridSizer_AddGrowableCol, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_RemoveGrowableRow", (PyCFunction) _wrap_wxFlexGridSizer_RemoveGrowableRow, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_AddGrowableRow", (PyCFunction) _wrap_wxFlexGridSizer_AddGrowableRow, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_CalcMin", (PyCFunction) _wrap_wxFlexGridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_RecalcSizes", (PyCFunction) _wrap_wxFlexGridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFlexGridSizer", (PyCFunction) _wrap_new_wxFlexGridSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetHGap", (PyCFunction) _wrap_wxGridSizer_GetHGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetVGap", (PyCFunction) _wrap_wxGridSizer_GetVGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetRows", (PyCFunction) _wrap_wxGridSizer_GetRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_GetCols", (PyCFunction) _wrap_wxGridSizer_GetCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetHGap", (PyCFunction) _wrap_wxGridSizer_SetHGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetVGap", (PyCFunction) _wrap_wxGridSizer_SetVGap, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetRows", (PyCFunction) _wrap_wxGridSizer_SetRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_SetCols", (PyCFunction) _wrap_wxGridSizer_SetCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_CalcMin", (PyCFunction) _wrap_wxGridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxGridSizer_RecalcSizes", (PyCFunction) _wrap_wxGridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGridSizer", (PyCFunction) _wrap_new_wxGridSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookSizer_GetNotebook", (PyCFunction) _wrap_wxNotebookSizer_GetNotebook, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookSizer_CalcMin", (PyCFunction) _wrap_wxNotebookSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebookSizer_RecalcSizes", (PyCFunction) _wrap_wxNotebookSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, + { "new_wxNotebookSizer", (PyCFunction) _wrap_new_wxNotebookSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticBoxSizer_CalcMin", (PyCFunction) _wrap_wxStaticBoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxStaticBoxSizer_RecalcSizes", (PyCFunction) _wrap_wxStaticBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, { "wxStaticBoxSizer_GetStaticBox", (PyCFunction) _wrap_wxStaticBoxSizer_GetStaticBox, METH_VARARGS | METH_KEYWORDS }, { "new_wxStaticBoxSizer", (PyCFunction) _wrap_new_wxStaticBoxSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxBoxSizer_CalcMin", (PyCFunction) _wrap_wxBoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, + { "wxBoxSizer_RecalcSizes", (PyCFunction) _wrap_wxBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, { "wxBoxSizer_GetOrientation", (PyCFunction) _wrap_wxBoxSizer_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { "new_wxBoxSizer", (PyCFunction) _wrap_new_wxBoxSizer, METH_VARARGS | METH_KEYWORDS }, { "wxPySizer__setSelf", (PyCFunction) _wrap_wxPySizer__setSelf, METH_VARARGS | METH_KEYWORDS }, @@ -1485,6 +2762,10 @@ static PyMethodDef sizerscMethods[] = { { "wxSizer_GetMinSize", (PyCFunction) _wrap_wxSizer_GetMinSize, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetPosition", (PyCFunction) _wrap_wxSizer_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetSize", (PyCFunction) _wrap_wxSizer_GetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizePos", (PyCFunction) _wrap_wxSizer_SetItemMinSizePos, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizeSizer", (PyCFunction) _wrap_wxSizer_SetItemMinSizeSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizeWindow", (PyCFunction) _wrap_wxSizer_SetItemMinSizeWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetMinSize", (PyCFunction) _wrap_wxSizer_SetMinSize, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetDimension", (PyCFunction) _wrap_wxSizer_SetDimension, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_RemovePos", (PyCFunction) _wrap_wxSizer_RemovePos, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_RemoveSizer", (PyCFunction) _wrap_wxSizer_RemoveSizer, METH_VARARGS | METH_KEYWORDS }, @@ -1492,6 +2773,9 @@ static PyMethodDef sizerscMethods[] = { { "wxSizer_PrependSpacer", (PyCFunction) _wrap_wxSizer_PrependSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_PrependSizer", (PyCFunction) _wrap_wxSizer_PrependSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_PrependWindow", (PyCFunction) _wrap_wxSizer_PrependWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_InsertSpacer", (PyCFunction) _wrap_wxSizer_InsertSpacer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_InsertSizer", (PyCFunction) _wrap_wxSizer_InsertSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_InsertWindow", (PyCFunction) _wrap_wxSizer_InsertWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_AddSpacer", (PyCFunction) _wrap_wxSizer_AddSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_AddSizer", (PyCFunction) _wrap_wxSizer_AddSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_AddWindow", (PyCFunction) _wrap_wxSizer_AddWindow, METH_VARARGS | METH_KEYWORDS }, @@ -1504,11 +2788,17 @@ static PyMethodDef sizerscMethods[] = { { "wxSizerItem_GetBorder", (PyCFunction) _wrap_wxSizerItem_GetBorder, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetFlag", (PyCFunction) _wrap_wxSizerItem_GetFlag, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetOption", (PyCFunction) _wrap_wxSizerItem_GetOption, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetSizer", (PyCFunction) _wrap_wxSizerItem_SetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetSizer", (PyCFunction) _wrap_wxSizerItem_GetSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetWindow", (PyCFunction) _wrap_wxSizerItem_SetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetWindow", (PyCFunction) _wrap_wxSizerItem_GetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsSpacer", (PyCFunction) _wrap_wxSizerItem_IsSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsSizer", (PyCFunction) _wrap_wxSizerItem_IsSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsWindow", (PyCFunction) _wrap_wxSizerItem_IsWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetRatio", (PyCFunction) _wrap_wxSizerItem_GetRatio, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetRatio", (PyCFunction) _wrap_wxSizerItem_SetRatio, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetRatioSize", (PyCFunction) _wrap_wxSizerItem_SetRatioSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetRatioWH", (PyCFunction) _wrap_wxSizerItem_SetRatioWH, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_SetDimension", (PyCFunction) _wrap_wxSizerItem_SetDimension, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_CalcMin", (PyCFunction) _wrap_wxSizerItem_CalcMin, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetSize", (PyCFunction) _wrap_wxSizerItem_GetSize, METH_VARARGS | METH_KEYWORDS }, @@ -1529,6 +2819,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, + { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1537,7 +2828,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -1551,6 +2844,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMask","_class_wxMask",0}, { "_wxPen","_class_wxPen",0}, { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_class_wxNotebookSizer","_wxNotebookSizer",0}, { "_byte","_unsigned_char",0}, { "_wxDataObject","_class_wxDataObject",0}, { "_wxStaticBox","_class_wxStaticBox",0}, @@ -1558,13 +2852,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, { "_wxDataObjectSimple","_class_wxDataObjectSimple",0}, { "_wxDropFilesEvent","_class_wxDropFilesEvent",0}, { "_wxBitmapButton","_class_wxBitmapButton",0}, + { "_class_wxSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_class_wxSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_class_wxSizer","_class_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_class_wxSizer","_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_class_wxSizer","_class_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, + { "_class_wxSizer","_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, { "_class_wxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_class_wxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_class_wxSizer","_class_wxBoxSizer",SwigwxBoxSizerTowxSizer}, @@ -1572,22 +2871,26 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizer","_class_wxPySizer",SwigwxPySizerTowxSizer}, { "_class_wxSizer","_wxPySizer",SwigwxPySizerTowxSizer}, { "_class_wxSizer","_wxSizer",0}, + { "_wxGridSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, + { "_wxGridSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, + { "_wxGridSizer","_class_wxGridSizer",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, { "_wxDC","_class_wxDC",0}, { "_wxSizerItem","_class_wxSizerItem",0}, { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, + { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -1614,10 +2917,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -1627,12 +2932,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_wxBoxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, { "_wxBoxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxBoxSizer}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, @@ -1657,16 +2964,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -1730,6 +3036,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1749,9 +3056,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSlider","_wxSlider",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_class_wxGridSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, + { "_class_wxGridSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxGridSizer}, + { "_class_wxGridSizer","_wxGridSizer",0}, { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1762,6 +3073,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1772,11 +3084,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, { "_class_wxPaintDC","_wxPaintDC",0}, @@ -1802,11 +3120,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, { "_wxRegion","_class_wxRegion",0}, + { "_wxSizer","_class_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_wxSizer","_wxFlexGridSizer",SwigwxFlexGridSizerTowxSizer}, + { "_wxSizer","_class_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_wxSizer","_wxGridSizer",SwigwxGridSizerTowxSizer}, + { "_wxSizer","_class_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, + { "_wxSizer","_wxNotebookSizer",SwigwxNotebookSizerTowxSizer}, { "_wxSizer","_class_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_wxSizer","_wxStaticBoxSizer",SwigwxStaticBoxSizerTowxSizer}, { "_wxSizer","_class_wxBoxSizer",SwigwxBoxSizerTowxSizer}, @@ -1832,13 +3157,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_class_wxPalette","_wxPalette",0}, { "_wxFileDataObject","_class_wxFileDataObject",0}, + { "_wxNotebookSizer","_class_wxNotebookSizer",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_class_wxDataObjectComposite","_wxDataObjectComposite",0}, { "_wxWindow","_class_wxWindow",0}, diff --git a/utils/wxPython/src/gtk/sizers.py b/wxPython/src/msw/sizers.py similarity index 54% rename from utils/wxPython/src/gtk/sizers.py rename to wxPython/src/msw/sizers.py index 6f809036ad..9dbce08acb 100644 --- a/utils/wxPython/src/gtk/sizers.py +++ b/wxPython/src/msw/sizers.py @@ -29,6 +29,18 @@ class wxSizerItemPtr : def SetDimension(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetDimension,(self,) + _args, _kwargs) return val + def SetRatioWH(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetRatioWH,(self,) + _args, _kwargs) + return val + def SetRatioSize(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetRatioSize,(self,) + _args, _kwargs) + return val + def SetRatio(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetRatio,(self,) + _args, _kwargs) + return val + def GetRatio(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetRatio,(self,) + _args, _kwargs) + return val def IsWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_IsWindow,(self,) + _args, _kwargs) return val @@ -42,10 +54,16 @@ class wxSizerItemPtr : val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs) if val: val = wxWindowPtr(val) return val + def SetWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetWindow,(self,) + _args, _kwargs) + return val def GetSizer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetSizer,(self,) + _args, _kwargs) if val: val = wxSizerPtr(val) return val + def SetSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetSizer,(self,) + _args, _kwargs) + return val def GetOption(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetOption,(self,) + _args, _kwargs) return val @@ -95,6 +113,15 @@ class wxSizerPtr : def AddSpacer(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_AddSpacer,(self,) + _args, _kwargs) return val + def InsertWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_InsertWindow,(self,) + _args, _kwargs) + return val + def InsertSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_InsertSizer,(self,) + _args, _kwargs) + return val + def InsertSpacer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_InsertSpacer,(self,) + _args, _kwargs) + return val def PrependWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_PrependWindow,(self,) + _args, _kwargs) return val @@ -116,6 +143,18 @@ class wxSizerPtr : def SetDimension(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_SetDimension,(self,) + _args, _kwargs) return val + def SetMinSize(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetMinSize,(self,) + _args, _kwargs) + return val + def SetItemMinSizeWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizeWindow,(self,) + _args, _kwargs) + return val + def SetItemMinSizeSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizeSizer,(self,) + _args, _kwargs) + return val + def SetItemMinSizePos(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizePos,(self,) + _args, _kwargs) + return val def GetSize(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_GetSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 @@ -151,6 +190,14 @@ class wxSizerPtr : else: apply(self.AddWindow, args) + def Insert(self, *args): + if type(args[1]) == type(1): + apply(self.InsertSpacer, args) + elif string.find(args[1].this, 'Sizer') != -1: + apply(self.InsertSizer, args) + else: + apply(self.InsertWindow, args) + def Prepend(self, *args): if type(args[0]) == type(1): apply(self.PrependSpacer, args) @@ -173,6 +220,15 @@ class wxSizerPtr : childinfo = (childinfo, ) apply(self.Add, childinfo) + + def SetItemMinSize(self, *args): + if type(args[0]) == type(1): + apply(self.SetItemMinSizePos, args) + elif string.find(args[0].this, 'Sizer') != -1: + apply(self.SetItemMinSizeSizer, args) + else: + apply(self.SetItemMinSizeWindow, args) + class wxSizer(wxSizerPtr): def __init__(self,this): self.this = this @@ -193,7 +249,7 @@ class wxPySizer(wxPySizerPtr): def __init__(self,*_args,**_kwargs): self.this = apply(sizersc.new_wxPySizer,_args,_kwargs) self.thisown = 1 - self._setSelf(self) + self._setSelf(self, wxPySizer) @@ -205,6 +261,13 @@ class wxBoxSizerPtr(wxSizerPtr): def GetOrientation(self, *_args, **_kwargs): val = apply(sizersc.wxBoxSizer_GetOrientation,(self,) + _args, _kwargs) return val + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxBoxSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxBoxSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val def __repr__(self): return "" % (self.this,) class wxBoxSizer(wxBoxSizerPtr): @@ -223,6 +286,13 @@ class wxStaticBoxSizerPtr(wxBoxSizerPtr): val = apply(sizersc.wxStaticBoxSizer_GetStaticBox,(self,) + _args, _kwargs) if val: val = wxStaticBoxPtr(val) return val + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxStaticBoxSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxStaticBoxSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val def __repr__(self): return "" % (self.this,) class wxStaticBoxSizer(wxStaticBoxSizerPtr): @@ -233,6 +303,109 @@ class wxStaticBoxSizer(wxStaticBoxSizerPtr): +class wxNotebookSizerPtr(wxSizerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxNotebookSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxNotebookSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def GetNotebook(self, *_args, **_kwargs): + val = apply(sizersc.wxNotebookSizer_GetNotebook,(self,) + _args, _kwargs) + if val: val = wxNotebookPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxNotebookSizer(wxNotebookSizerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(sizersc.new_wxNotebookSizer,_args,_kwargs) + self.thisown = 1 + + + + +class wxGridSizerPtr(wxSizerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def SetCols(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetCols,(self,) + _args, _kwargs) + return val + def SetRows(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetRows,(self,) + _args, _kwargs) + return val + def SetVGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetVGap,(self,) + _args, _kwargs) + return val + def SetHGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_SetHGap,(self,) + _args, _kwargs) + return val + def GetCols(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetCols,(self,) + _args, _kwargs) + return val + def GetRows(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetRows,(self,) + _args, _kwargs) + return val + def GetVGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetVGap,(self,) + _args, _kwargs) + return val + def GetHGap(self, *_args, **_kwargs): + val = apply(sizersc.wxGridSizer_GetHGap,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGridSizer(wxGridSizerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(sizersc.new_wxGridSizer,_args,_kwargs) + self.thisown = 1 + + + + +class wxFlexGridSizerPtr(wxGridSizerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def RecalcSizes(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_RecalcSizes,(self,) + _args, _kwargs) + return val + def CalcMin(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_CalcMin,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def AddGrowableRow(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_AddGrowableRow,(self,) + _args, _kwargs) + return val + def RemoveGrowableRow(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_RemoveGrowableRow,(self,) + _args, _kwargs) + return val + def AddGrowableCol(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_AddGrowableCol,(self,) + _args, _kwargs) + return val + def RemoveGrowableCol(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_RemoveGrowableCol,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFlexGridSizer(wxFlexGridSizerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(sizersc.new_wxFlexGridSizer,_args,_kwargs) + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ diff --git a/utils/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp similarity index 94% rename from utils/wxPython/src/msw/stattool.cpp rename to wxPython/src/msw/stattool.cpp index 4a737f496b..4ebba6ad10 100644 --- a/utils/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/stattool.cpp + * FILE : src/msw/stattool.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,7 +61,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -105,6 +106,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); #ifdef __cplusplus extern "C" { #endif @@ -130,8 +133,8 @@ static PyObject *_wrap_new_wxStatusBar(PyObject *self, PyObject *args, PyObject wxStatusBar * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxST_SIZEGRIP; char * _arg5 = (char *) "statusBar"; PyObject * _argo0 = 0; @@ -381,11 +384,22 @@ static PyObject *_wrap_wxStatusBar_SetStatusText(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1068,11 +1082,22 @@ static PyObject *_wrap_wxToolBarToolBase_SetShortHelp(PyObject *self, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1108,11 +1133,22 @@ static PyObject *_wrap_wxToolBarToolBase_SetLongHelp(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1358,11 +1394,11 @@ static void *SwigwxToolBarBaseTowxEvtHandler(void *ptr) { return (void *) dest; } -static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_AddTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->AddTool(id, bitmap, pushedBitmap, (bool)toggle, + return self->AddTool(id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1382,7 +1418,7 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO PyObject * _obj5 = 0; PyObject * _obj6 = 0; PyObject * _obj7 = 0; - char *_kwnames[] = { "self","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1415,19 +1451,41 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO } if (_obj6) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg6 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj6)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg6 = new wxString(PyString_AsString(_obj6), PyString_Size(_obj6)); + _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6)); +#endif } if (_obj7) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg7 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj7)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg7 = new wxString(PyString_AsString(_obj7), PyString_Size(_obj7)); + _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1452,8 +1510,8 @@ static PyObject *_wrap_wxToolBarBase_AddTool(PyObject *self, PyObject *args, PyO return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->AddTool(id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_AddSimpleTool(wxToolBarBase *self,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1469,7 +1527,7 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg PyObject * _argo2 = 0; PyObject * _obj3 = 0; PyObject * _obj4 = 0; - char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -1491,19 +1549,41 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg } if (_obj3) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } if (_obj4) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg4 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj4)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4)); + _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1528,11 +1608,11 @@ static PyObject *_wrap_wxToolBarBase_AddSimpleTool(PyObject *self, PyObject *arg return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int toggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { +static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxBitmap & pushedBitmap,int isToggle,PyObject * clientData,const wxString & shortHelpString,const wxString & longHelpString) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)toggle, + return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1553,7 +1633,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject * _obj6 = 0; PyObject * _obj7 = 0; PyObject * _obj8 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","toggle","clientData","shortHelpString","longHelpString", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","pushedBitmap","isToggle","clientData","shortHelpString","longHelpString", NULL }; char _ptemp[128]; self = self; @@ -1586,19 +1666,41 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, } if (_obj7) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg7 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj7)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg7 = new wxString(PyString_AsString(_obj7), PyString_Size(_obj7)); + _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); +#endif } if (_obj8) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj8) && !PyUnicode_Check(_obj8)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj8, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg8 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj8)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg8 = new wxString(PyString_AsString(_obj8), PyString_Size(_obj8)); + _arg8 = new wxString(PyString_AS_STRING(_obj8), PyString_GET_SIZE(_obj8)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1623,8 +1725,8 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int toggle) { - return self->InsertTool(pos, id, bitmap, wxNullBitmap, toggle, NULL, +static wxToolBarToolBase * wxToolBarBase_InsertSimpleTool(wxToolBarBase *self,size_t pos,int id,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString,int isToggle) { + return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1641,7 +1743,7 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * PyObject * _argo3 = 0; PyObject * _obj4 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","toggle", NULL }; + char *_kwnames[] = { "self","pos","id","bitmap","shortHelpString","longHelpString","isToggle", NULL }; char _ptemp[128]; self = self; @@ -1663,19 +1765,41 @@ static PyObject *_wrap_wxToolBarBase_InsertSimpleTool(PyObject *self, PyObject * } if (_obj4) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg4 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj4)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4)); + _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); +#endif } if (_obj5) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj5) && !PyUnicode_Check(_obj5)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj5, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg5 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj5)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg5 = new wxString(PyString_AsString(_obj5), PyString_Size(_obj5)); + _arg5 = new wxString(PyString_AS_STRING(_obj5), PyString_GET_SIZE(_obj5)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2245,11 +2369,22 @@ static PyObject *_wrap_wxToolBarBase_SetToolShortHelp(PyObject *self, PyObject * } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2319,11 +2454,22 @@ static PyObject *_wrap_wxToolBarBase_SetToolLongHelp(PyObject *self, PyObject *a } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2817,8 +2963,8 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k wxToolBar * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; char * _arg5 = (char *) wxToolBarNameStr; PyObject * _argo0 = 0; @@ -2940,8 +3086,8 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj wxToolBarSimple * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; char * _arg5 = (char *) wxToolBarNameStr; PyObject * _argo0 = 0; @@ -3130,7 +3276,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -3162,7 +3310,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyDropSource","_class_wxPyDropSource",0}, { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -3177,13 +3324,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -3211,10 +3358,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -3224,9 +3373,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, @@ -3254,16 +3405,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxFont","_class_wxFont",0}, { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -3340,6 +3490,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -3362,6 +3513,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -3371,6 +3523,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -3381,11 +3534,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -3421,6 +3580,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -3452,8 +3612,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, diff --git a/utils/wxPython/src/gtk/stattool.py b/wxPython/src/msw/stattool.py similarity index 99% rename from utils/wxPython/src/gtk/stattool.py rename to wxPython/src/msw/stattool.py index f9cc36b5f9..0b423d7f46 100644 --- a/utils/wxPython/src/gtk/stattool.py +++ b/wxPython/src/msw/stattool.py @@ -51,7 +51,7 @@ class wxStatusBar(wxStatusBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxStatusBar,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -308,7 +308,7 @@ class wxToolBar(wxToolBarPtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxToolBar,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -327,7 +327,7 @@ class wxToolBarSimple(wxToolBarSimplePtr): def __init__(self,*_args,**_kwargs): self.this = apply(stattoolc.new_wxToolBarSimple,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) diff --git a/wxPython/src/msw/streams.cpp b/wxPython/src/msw/streams.cpp new file mode 100644 index 0000000000..cc97a57d90 --- /dev/null +++ b/wxPython/src/msw/streams.cpp @@ -0,0 +1,869 @@ +/* + * FILE : src/msw/streams.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initstreamsc + +#define SWIG_name "streamsc" + +#include "helpers.h" +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + // C++ +// definitions of wxStringPtrList and wxPyInputStream +#include +WX_DEFINE_LIST(wxStringPtrList); + + +void wxPyInputStream::close() { + /* do nothing */ +} + +void wxPyInputStream::flush() { + /*do nothing*/ +} + +bool wxPyInputStream::eof() { + if (wxi) + return wxi->Eof(); + else + return TRUE; +} + +wxPyInputStream::~wxPyInputStream() { + /*do nothing*/ +} + +wxString* wxPyInputStream::read(int size) { + wxString* s = NULL; + const int BUFSIZE = 1024; + + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + if (size < 0) { + // init buffers + char * buf = new char[BUFSIZE]; + if (!buf) { + PyErr_NoMemory(); + return NULL; + } + + s = new wxString(); + if (!s) { + delete buf; + PyErr_NoMemory(); + return NULL; + } + + // read until EOF + wxPy_BEGIN_ALLOW_THREADS; + while (! wxi->Eof()) { + wxi->Read(buf, BUFSIZE); + //*s += wxString(buf, wxi->LastRead()); + s->Append(buf, wxi->LastRead()); + } + delete buf; + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + + } else { // Read only size number of characters + s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read size bytes + wxPy_BEGIN_ALLOW_THREADS; + wxi->Read(s->GetWriteBuf(size+1), size); + s->UngetWriteBuf(wxi->LastRead()); + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + } + return s; +} + + +wxString* wxPyInputStream::readline (int size) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init buffer + int i; + char ch; + wxString* s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read until \n or byte limit reached + wxPy_BEGIN_ALLOW_THREADS; + for (i=ch=0; (ch != '\n') && (!wxi->Eof()) && ((size < 0) || (i < size)); i++) { + *s += ch = wxi->GetC(); + } + wxPy_END_ALLOW_THREADS; + + // errorcheck + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return s; +} + + +wxStringPtrList* wxPyInputStream::readlines (int sizehint) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init list + wxStringPtrList* l = new wxStringPtrList(); + if (!l) { + PyErr_NoMemory(); + return NULL; + } + + // read sizehint bytes or until EOF + wxPy_BEGIN_ALLOW_THREADS; + int i; + for (i=0; (!wxi->Eof()) && ((sizehint < 0) || (i < sizehint));) { + wxString* s = readline(); + if (s == NULL) { + l->DeleteContents(TRUE); + l->Clear(); + return NULL; + } + l->Append(s); + i = i + s->Length(); + } + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + l->DeleteContents(TRUE); + l->Clear(); + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return l; +} + + +void wxPyInputStream::seek(int offset, int whence) { + if (wxi) + wxi->SeekI(offset, wxSeekMode(whence)); +} + +int wxPyInputStream::tell(){ + if (wxi) + return wxi->TellI(); +} + + + +// wxInputStream which operates on a Python file-like object +class wxPyCBInputStream : public wxInputStream { +protected: + PyObject* read; + PyObject* seek; + PyObject* tell; + PyObject* py; + + virtual size_t OnSysRead(void *buffer, size_t bufsize) { + if (bufsize == 0) + return 0; + + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("(i)", bufsize); + PyObject* result = PyEval_CallObject(read, arglist); + Py_DECREF(arglist); + + size_t o = 0; + if ((result != NULL) && PyString_Check(result)) { + o = PyString_Size(result); + if (o == 0) + m_lasterror = wxSTREAM_EOF; + if (o > bufsize) + o = bufsize; + strncpy((char*)buffer, PyString_AsString(result), o); + Py_DECREF(result); + + } + else + m_lasterror = wxSTREAM_READ_ERROR; + wxPySaveThread(doSave); + m_lastcount = o; + return o; + } + + virtual size_t OnSysWrite(const void *buffer, size_t bufsize){ + m_lasterror = wxSTREAM_WRITE_ERROR; + return 0; + } + + virtual off_t OnSysSeek(off_t off, wxSeekMode mode){ + bool doSave = wxPyRestoreThread(); + PyObject*arglist = Py_BuildValue("(ii)", off, mode); + PyObject*result = PyEval_CallObject(seek, arglist); + Py_DECREF(arglist); + Py_XDECREF(result); + wxPySaveThread(doSave); + return OnSysTell(); + } + + virtual off_t OnSysTell() const{ + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("()"); + PyObject* result = PyEval_CallObject(tell, arglist); + Py_DECREF(arglist); + off_t o = 0; + if (result != NULL) { + o = PyInt_AsLong(result); + Py_DECREF(result); + }; + wxPySaveThread(doSave); + return o; + } + + wxPyCBInputStream(PyObject *p, PyObject *r, PyObject *s, PyObject *t) + : py(p), read(r), seek(s), tell(t) + {} + +public: + ~wxPyCBInputStream() { + bool doSave = wxPyRestoreThread(); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + wxPySaveThread(doSave); + } + + virtual size_t GetSize() { + if (seek && tell) { + off_t temp = OnSysTell(); + off_t ret = OnSysSeek(0, wxFromEnd); + OnSysSeek(temp, wxFromStart); + return ret; + } + else + return 0; + } + + static wxPyCBInputStream* create(PyObject *py) { + PyObject* read; + PyObject* seek; + PyObject* tell; + + if (!PyInstance_Check(py) && !PyFile_Check(py)) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + return NULL; + } + read = getMethod(py, "read"); + seek = getMethod(py, "seek"); + tell = getMethod(py, "tell"); + + if (!read) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + return NULL; + } + return new wxPyCBInputStream(py, read, seek, tell); + } + + static PyObject* getMethod(PyObject* py, char* name) { + if (!PyObject_HasAttrString(py, name)) + return NULL; + PyObject* o = PyObject_GetAttrString(py, name); + if (!PyMethod_Check(o) && !PyCFunction_Check(o)) { + Py_DECREF(o); + return NULL; + } + return o; + } + +protected: + +}; + +#ifdef __cplusplus +extern "C" { +#endif +static wxPyInputStream *new_wxPyInputStream(PyObject *p) { + wxInputStream* wxi = wxPyCBInputStream::create(p); + if (wxi) + return new wxPyInputStream(wxi); + else + return NULL; + } + +static PyObject *_wrap_new_wxInputStream(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _result; + PyObject * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxInputStream",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = _obj0; +} +{ + _result = (wxPyInputStream *)new_wxPyInputStream(_arg0); + +}{ + char _ptemp[128]; + if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyInputStream_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_close(_swigobj) (_swigobj->close()) +static PyObject *_wrap_wxInputStream_close(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_close",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_close. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_close(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_flush(_swigobj) (_swigobj->flush()) +static PyObject *_wrap_wxInputStream_flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_flush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_flush. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_flush(_arg0); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_eof(_swigobj) (_swigobj->eof()) +static PyObject *_wrap_wxInputStream_eof(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_eof",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_eof. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (bool )wxInputStream_eof(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_read(_swigobj,_swigarg0) (_swigobj->read(_swigarg0)) +static PyObject *_wrap_wxInputStream_read(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_read",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_read. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_read(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readline(_swigobj,_swigarg0) (_swigobj->readline(_swigarg0)) +static PyObject *_wrap_wxInputStream_readline(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readline",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readline. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxString *)wxInputStream_readline(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_readlines(_swigobj,_swigarg0) (_swigobj->readlines(_swigarg0)) +static PyObject *_wrap_wxInputStream_readlines(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStringPtrList * _result; + wxPyInputStream * _arg0; + int _arg1 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","sizehint", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxInputStream_readlines",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_readlines. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (wxStringPtrList *)wxInputStream_readlines(_arg0,_arg1); + +}{ + if (_result) { + _resultobj = PyList_New(_result->GetCount()); + wxStringPtrList::Node *node = _result->GetFirst(); + for (int i=0; node; i++) { + wxString *s = node->GetData(); + PyList_SetItem(_resultobj, i, PyString_FromStringAndSize(s->c_str(), s->Len())); + node = node->GetNext(); + delete s; + } + delete _result; + } + else + _resultobj=0; +} + return _resultobj; +} + +#define wxInputStream_seek(_swigobj,_swigarg0,_swigarg1) (_swigobj->seek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInputStream_seek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyInputStream * _arg0; + int _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","offset","whence", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxInputStream_seek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_seek. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + wxInputStream_seek(_arg0,_arg1,_arg2); + +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxInputStream_tell(_swigobj) (_swigobj->tell()) +static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_tell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_tell. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + _result = (int )wxInputStream_tell(_arg0); + +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void wxOutputStream_write(wxOutputStream *self,const wxString & str) { + self->Write(str.c_str(), str.Length()); + } +static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxOutputStream * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxOutputStream_write",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxOutputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxOutputStream_write. Expected _wxOutputStream_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxOutputStream_write(_arg0,*_arg1); + +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyMethodDef streamscMethods[] = { + { "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_readline", (PyCFunction) _wrap_wxInputStream_readline, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_read", (PyCFunction) _wrap_wxInputStream_read, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_eof", (PyCFunction) _wrap_wxInputStream_eof, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_flush", (PyCFunction) _wrap_wxInputStream_flush, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_close", (PyCFunction) _wrap_wxInputStream_close, METH_VARARGS | METH_KEYWORDS }, + { "new_wxInputStream", (PyCFunction) _wrap_new_wxInputStream, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initstreamsc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("streamsc", streamscMethods); + d = PyModule_GetDict(m); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/streams.py b/wxPython/src/msw/streams.py new file mode 100644 index 0000000000..6394f60946 --- /dev/null +++ b/wxPython/src/msw/streams.py @@ -0,0 +1,66 @@ +# This file was created automatically by SWIG. +import streamsc +import wx +import string +class wxInputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def close(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_close,(self,) + _args, _kwargs) + return val + def flush(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_flush,(self,) + _args, _kwargs) + return val + def eof(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_eof,(self,) + _args, _kwargs) + return val + def read(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_read,(self,) + _args, _kwargs) + return val + def readline(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readline,(self,) + _args, _kwargs) + return val + def readlines(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_readlines,(self,) + _args, _kwargs) + return val + def seek(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_seek,(self,) + _args, _kwargs) + return val + def tell(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_tell,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxInputStream(wxInputStreamPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(streamsc.new_wxInputStream,_args,_kwargs) + self.thisown = 1 + + + + +class wxOutputStreamPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def write(self, *_args, **_kwargs): + val = apply(streamsc.wxOutputStream_write,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxOutputStream(wxOutputStreamPtr): + def __init__(self,this): + self.this = this + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + + + +#-------------- VARIABLE WRAPPERS ------------------ + diff --git a/wxPython/src/msw/utils.cpp b/wxPython/src/msw/utils.cpp new file mode 100644 index 0000000000..4f677d45b6 --- /dev/null +++ b/wxPython/src/msw/utils.cpp @@ -0,0 +1,7937 @@ +/* + * FILE : src/msw/utils.cpp + * + * This file was automatically generated by : + * Simplified Wrapper and Interface Generator (SWIG) + * Version 1.1 (Build 883) + * + * Portions Copyright (c) 1995-1998 + * The University of Utah and The Regents of the University of California. + * Permission is granted to distribute this file in any manner provided + * this notice remains intact. + * + * Do not make changes to this file--changes will be lost! + * + */ + + +#define SWIGCODE +/* Implementation : PYTHON */ + +#define SWIGPYTHON +#include +#include +/* Definitions for Windows/Unix exporting */ +#if defined(__WIN32__) +# if defined(_MSC_VER) +# define SWIGEXPORT(a) __declspec(dllexport) a +# else +# if defined(__BORLANDC__) +# define SWIGEXPORT(a) a _export +# else +# define SWIGEXPORT(a) a +# endif +# endif +#else +# define SWIGEXPORT(a) a +#endif + +#include "Python.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SWIG_MakePtr(char *, void *, char *); +extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); +extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); +extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); +extern PyObject *SWIG_newvarlink(void); +#ifdef __cplusplus +} +#endif +#define SWIG_init initutilsc + +#define SWIG_name "utilsc" + +#include "export.h" +#include +#include +#include + +static PyObject* l_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyList_Check(target)) { + o2 = target; + target = PyList_New(0); + PyList_Append(target, o2); + Py_XDECREF(o2); + } + PyList_Append(target,o); + Py_XDECREF(o); + } + return target; +} + +static PyObject* t_output_helper(PyObject* target, PyObject* o) { + PyObject* o2; + PyObject* o3; + + if (!target) { + target = o; + } else if (target == Py_None) { + Py_DECREF(Py_None); + target = o; + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); + + o2 = target; + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return target; +} + +static char* wxStringErrorMsg = "string type is required for parameter"; + + static wxString wxPyEmptyStr(""); + + static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { + PyObject* ret = PyTuple_New(3); + if (ret) { + PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); + PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); + PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); + } + return ret; + } + +#define LOCAL *(new wxDateTime::TimeZone(wxDateTime::Local)) +#ifdef __cplusplus +extern "C" { +#endif +static PyObject *_wrap_wxGetLocalTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetLocalTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetLocalTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetUTCTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUTCTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetUTCTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetCurrentTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetCurrentTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxGetCurrentTime(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxGetLocalTimeMillis(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLongLong * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetLocalTimeMillis",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxLongLong (wxGetLocalTimeMillis()); + + wxPy_END_ALLOW_THREADS; +}{ + PyObject *hi, *lo, *shifter, *shifted; + hi = PyLong_FromLong(_result->GetHi()); + lo = PyLong_FromLong(_result->GetLo()); + shifter = PyLong_FromLong(32); + shifted = PyNumber_Lshift(hi, shifter); + _resultobj = PyNumber_Or(shifted, lo); + Py_DECREF(hi); + Py_DECREF(lo); + Py_DECREF(shifter); + Py_DECREF(shifted); +} + return _resultobj; +} + +#define delete_wxConfigBase(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxConfigBase(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxConfigBase",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfigBase. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxConfigBase(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "pConfig", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_Set",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Set. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase *)wxConfigBase::Set(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfigBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_Get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _result; + bool _arg0 = (bool ) TRUE; + int tempbool0 = (int) TRUE; + char *_kwnames[] = { "createOnDemand", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxConfigBase_Get",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase *)wxConfigBase::Get(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfigBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxConfigBase_Create",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase *)wxConfigBase::Create(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfigBase_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxConfigBase_DontCreateOnDemand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxConfigBase_DontCreateOnDemand",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase::DontCreateOnDemand(); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_DeleteAll(_swigobj) (_swigobj->DeleteAll()) +static PyObject *_wrap_wxConfigBase_DeleteAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_DeleteAll",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_DeleteAll. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_DeleteAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_DeleteEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeleteEntry(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_DeleteEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","key","bDeleteGroupIfEmpty", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxConfigBase_DeleteEntry",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_DeleteEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_DeleteEntry(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_DeleteGroup(_swigobj,_swigarg0) (_swigobj->DeleteGroup(_swigarg0)) +static PyObject *_wrap_wxConfigBase_DeleteGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_DeleteGroup",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_DeleteGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_DeleteGroup(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_Exists(_swigobj,_swigarg0) (_swigobj->Exists(_swigarg0)) +static PyObject *_wrap_wxConfigBase_Exists(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_Exists",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Exists. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_Exists(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_Flush(_swigobj,_swigarg0) (_swigobj->Flush(_swigarg0)) +static PyObject *_wrap_wxConfigBase_Flush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","bCurrentOnly", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_Flush",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Flush. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_Flush(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_GetAppName(_swigobj) (_swigobj->GetAppName()) +static PyObject *_wrap_wxConfigBase_GetAppName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetAppName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetAppName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_GetAppName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetFirstGroup(wxConfigBase *self) { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstGroup(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetFirstGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetFirstGroup",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetFirstGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetFirstGroup(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetFirstEntry(wxConfigBase *self) { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstEntry(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetFirstEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetFirstEntry",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetFirstEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetFirstEntry(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetNextGroup(wxConfigBase *self,long index) { + bool cont; + wxString value; + + cont = self->GetNextGroup(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetNextGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","index", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfigBase_GetNextGroup",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNextGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetNextGroup(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +static PyObject * wxConfigBase_GetNextEntry(wxConfigBase *self,long index) { + bool cont; + wxString value; + + cont = self->GetNextEntry(value, index); + return __EnumerationHelper(cont, value, index); + } +static PyObject *_wrap_wxConfigBase_GetNextEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxConfigBase * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","index", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfigBase_GetNextEntry",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNextEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfigBase_GetNextEntry(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = _result; +} + return _resultobj; +} + +#define wxConfigBase_GetNumberOfEntries(_swigobj,_swigarg0) (_swigobj->GetNumberOfEntries(_swigarg0)) +static PyObject *_wrap_wxConfigBase_GetNumberOfEntries(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxConfigBase * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","bRecursive", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_GetNumberOfEntries",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNumberOfEntries. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxConfigBase_GetNumberOfEntries(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_GetNumberOfGroups(_swigobj,_swigarg0) (_swigobj->GetNumberOfGroups(_swigarg0)) +static PyObject *_wrap_wxConfigBase_GetNumberOfGroups(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxConfigBase * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","bRecursive", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_GetNumberOfGroups",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetNumberOfGroups. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxConfigBase_GetNumberOfGroups(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxConfigBase_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetPath. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_GetPath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfigBase_GetVendorName(_swigobj) (_swigobj->GetVendorName()) +static PyObject *_wrap_wxConfigBase_GetVendorName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetVendorName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetVendorName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_GetVendorName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfigBase_HasEntry(_swigobj,_swigarg0) (_swigobj->HasEntry(_swigarg0)) +static PyObject *_wrap_wxConfigBase_HasEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_HasEntry",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_HasEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_HasEntry(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_HasGroup(_swigobj,_swigarg0) (_swigobj->HasGroup(_swigarg0)) +static PyObject *_wrap_wxConfigBase_HasGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_HasGroup",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_HasGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_HasGroup(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_IsExpandingEnvVars(_swigobj) (_swigobj->IsExpandingEnvVars()) +static PyObject *_wrap_wxConfigBase_IsExpandingEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_IsExpandingEnvVars",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_IsExpandingEnvVars. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_IsExpandingEnvVars(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_IsRecordingDefaults(_swigobj) (_swigobj->IsRecordingDefaults()) +static PyObject *_wrap_wxConfigBase_IsRecordingDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_IsRecordingDefaults",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_IsRecordingDefaults. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_IsRecordingDefaults(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxConfigBase_Read(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","key","defaultVal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxConfigBase_Read",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Read. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_Read(_arg0,*_arg1,*_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxConfigBase_ReadInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_ReadInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxConfigBase * _arg0; + wxString * _arg1; + long _arg2 = (long ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","defaultVal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|l:wxConfigBase_ReadInt",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_ReadInt. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxConfigBase_ReadInt(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_ReadFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Read(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_ReadFloat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxConfigBase * _arg0; + wxString * _arg1; + double _arg2 = (double ) 0.0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","defaultVal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|d:wxConfigBase_ReadFloat",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_ReadFloat. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxConfigBase_ReadFloat(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetExpandEnvVars(_swigobj,_swigarg0) (_swigobj->SetExpandEnvVars(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bDoIt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_SetExpandEnvVars",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetExpandEnvVars. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetExpandEnvVars(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strPath", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_SetPath",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetPath. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetPath(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetRecordDefaults(_swigobj,_swigarg0) (_swigobj->SetRecordDefaults(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetRecordDefaults(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","bDoIt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxConfigBase_SetRecordDefaults",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetRecordDefaults. Expected _wxConfigBase_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetRecordDefaults(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetAppName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","appName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_SetAppName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetAppName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetAppName(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetVendorName(_swigobj,_swigarg0) (_swigobj->SetVendorName(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetVendorName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","vendorName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_SetVendorName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetVendorName. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetVendorName(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxConfigBase_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxConfigBase_SetStyle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_SetStyle. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfigBase_SetStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxConfigBase_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxConfigBase_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxConfigBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxConfigBase_GetStyle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetStyle. Expected _wxConfigBase_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxConfigBase_GetStyle(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxConfigBase_Write(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_Write(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","key","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfigBase_Write",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_Write. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_Write(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxConfigBase_WriteInt(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_WriteInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + long _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:wxConfigBase_WriteInt",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_WriteInt. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_WriteInt(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_WriteFloat(_swigobj,_swigarg0,_swigarg1) (_swigobj->Write(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_WriteFloat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + double _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","key","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOd:wxConfigBase_WriteFloat",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_WriteFloat. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_WriteFloat(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_GetEntryType(_swigobj,_swigarg0) (_swigobj->GetEntryType(_swigarg0)) +static PyObject *_wrap_wxConfigBase_GetEntryType(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfigBase::EntryType _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_GetEntryType",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_GetEntryType. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfigBase::EntryType )wxConfigBase_GetEntryType(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxConfigBase_RenameEntry(_swigobj,_swigarg0,_swigarg1) (_swigobj->RenameEntry(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_RenameEntry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","oldName","newName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfigBase_RenameEntry",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_RenameEntry. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_RenameEntry(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxConfigBase_RenameGroup(_swigobj,_swigarg0,_swigarg1) (_swigobj->RenameGroup(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxConfigBase_RenameGroup(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxConfigBase * _arg0; + wxString * _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","oldName","newName", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxConfigBase_RenameGroup",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_RenameGroup. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfigBase_RenameGroup(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxConfigBase_ExpandEnvVars(_swigobj,_swigarg0) (_swigobj->ExpandEnvVars(_swigarg0)) +static PyObject *_wrap_wxConfigBase_ExpandEnvVars(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxConfigBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","str", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxConfigBase_ExpandEnvVars",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfigBase_ExpandEnvVars. Expected _wxConfigBase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfigBase_ExpandEnvVars(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} +{ + delete _result; +} + return _resultobj; +} + +static void *SwigwxConfigTowxConfigBase(void *ptr) { + wxConfig *src; + wxConfigBase *dest; + src = (wxConfig *) ptr; + dest = (wxConfigBase *) src; + return (void *) dest; +} + +#define new_wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfig * _result; + wxString * _arg0 = (wxString *) &wxPyEmptyStr; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxString * _arg3 = (wxString *) &wxPyEmptyStr; + long _arg4 = (long ) 0; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "appName","vendorName","localFilename","globalFilename","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOOl:new_wxConfig",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_arg4)) + return NULL; + if (_obj0) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_obj3) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define delete_wxConfig(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxConfig * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxConfig",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfig. Expected _wxConfig_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxConfig(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxFileConfigTowxConfigBase(void *ptr) { + wxFileConfig *src; + wxConfigBase *dest; + src = (wxFileConfig *) ptr; + dest = (wxConfigBase *) src; + return (void *) dest; +} + +#define new_wxFileConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFileConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxFileConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileConfig * _result; + wxString * _arg0 = (wxString *) &wxPyEmptyStr; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxString * _arg3 = (wxString *) &wxPyEmptyStr; + long _arg4 = (long ) 0; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "appName","vendorName","localFilename","globalFilename","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOOl:new_wxFileConfig",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3,&_arg4)) + return NULL; + if (_obj0) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_obj3) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFileConfig *)new_wxFileConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileConfig_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define delete_wxFileConfig(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFileConfig(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileConfig * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFileConfig",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileConfig_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFileConfig. Expected _wxFileConfig_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxFileConfig(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_SetCountry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Country _arg0; + char *_kwnames[] = { "country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateTime_SetCountry",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime::SetCountry(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCountry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Country _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_GetCountry",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::Country )wxDateTime::GetCountry(); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_IsWestEuropeanCountry(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime::Country _arg0 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_IsWestEuropeanCountry",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime::IsWestEuropeanCountry(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCurrentYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime::Calendar _arg0 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_GetCurrentYear",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime::GetCurrentYear(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_ConvertYearToBC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0; + char *_kwnames[] = { "year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateTime_ConvertYearToBC",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime::ConvertYearToBC(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCurrentMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Month _result; + wxDateTime::Calendar _arg0 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_GetCurrentMonth",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::Month )wxDateTime::GetCurrentMonth(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_IsLeapYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Calendar _arg1 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "year","cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_IsLeapYear",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime::IsLeapYear(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetCentury(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + char *_kwnames[] = { "year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:wxDateTime_GetCentury",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime::GetCentury(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetNumberOfDaysinYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + int _arg0; + wxDateTime::Calendar _arg1 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "year","cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|i:wxDateTime_GetNumberOfDaysinYear",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetNumberOfDaysInMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime::Month _arg0; + int _arg1 = (int ) wxDateTime::Inv_Year; + wxDateTime::Calendar _arg2 = (wxDateTime::Calendar ) wxDateTime::Gregorian; + char *_kwnames[] = { "month","year","cal", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|ii:wxDateTime_GetNumberOfDaysInMonth",_kwnames,&_arg0,&_arg1,&_arg2)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime::GetNumberOfDays(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetMonthName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime::Month _arg0; + wxDateTime::NameFlags _arg1 = (wxDateTime::NameFlags ) wxDateTime::Name_Full; + char *_kwnames[] = { "month","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|i:wxDateTime_GetMonthName",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime::GetMonthName(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetWeekDayName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime::WeekDay _arg0; + wxDateTime::NameFlags _arg1 = (wxDateTime::NameFlags ) wxDateTime::Name_Full; + char *_kwnames[] = { "weekday","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i|i:wxDateTime_GetWeekDayName",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime::GetWeekDayName(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetAmPmStrings(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxString * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "OUTPUT","OUTPUT", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_GetAmPmStrings",_kwnames,&_obj0,&_obj1)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime::GetAmPmStrings(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_IsDSTApplicable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "year","country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_IsDSTApplicable",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime::IsDSTApplicable(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetBeginDST(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "year","country", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_GetBeginDST",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::GetBeginDST(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_GetEndDST(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + int _arg0 = (int ) wxDateTime::Inv_Year; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + char *_kwnames[] = { "year","country", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxDateTime_GetEndDST",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::GetEndDST(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_Now(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_Now",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::Now()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateTime_Today(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_Today",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime::Today()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define new_wxDateTime() (new wxDateTime()) +static PyObject *_wrap_new_wxDateTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxDateTime",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTime(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromTimeT(_swigarg0) (new wxDateTime(_swigarg0)) +static PyObject *_wrap_new_wxDateTimeFromTimeT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + time_t _arg0; + char *_kwnames[] = { "timet", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:new_wxDateTimeFromTimeT",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromTimeT(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromJDN(_swigarg0) (new wxDateTime(_swigarg0)) +static PyObject *_wrap_new_wxDateTimeFromJDN(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + double _arg0; + char *_kwnames[] = { "jdn", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"d:new_wxDateTimeFromJDN",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromJDN(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromHMS(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxDateTime(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxDateTimeFromHMS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime::wxDateTime_t _arg0; + wxDateTime::wxDateTime_t _arg1 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg2 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg3 = (wxDateTime::wxDateTime_t ) 0; + char *_kwnames[] = { "hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"h|hhh:new_wxDateTimeFromHMS",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromHMS(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxDateTimeFromDMY(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDateTime(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_new_wxDateTimeFromDMY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime::wxDateTime_t _arg0; + wxDateTime::Month _arg1 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg2 = (int ) wxDateTime::Inv_Year; + wxDateTime::wxDateTime_t _arg3 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg4 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg5 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg6 = (wxDateTime::wxDateTime_t ) 0; + char *_kwnames[] = { "day","month","year","hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"h|iihhhh:new_wxDateTimeFromDMY",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime *)new_wxDateTimeFromDMY(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxDateTime(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxDateTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxDateTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDateTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxDateTime(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxDateTime_SetToCurrent(_swigobj) (_swigobj->SetToCurrent()) +static PyObject *_wrap_wxDateTime_SetToCurrent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_SetToCurrent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToCurrent. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToCurrent(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetTimeT(_swigobj,_swigarg0) (_swigobj->Set(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetTimeT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + time_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","timet", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetTimeT",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetTimeT. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetTimeT(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetJDN(_swigobj,_swigarg0) (_swigobj->Set(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetJDN(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + double _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","jdn", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Od:wxDateTime_SetJDN",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetJDN. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetJDN(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetHMS(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDateTime_SetHMS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::wxDateTime_t _arg2 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg3 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg4 = (wxDateTime::wxDateTime_t ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|hhh:wxDateTime_SetHMS",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetHMS. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetHMS(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxDateTime_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::Month _arg2 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg3 = (int ) wxDateTime::Inv_Year; + wxDateTime::wxDateTime_t _arg4 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg5 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg6 = (wxDateTime::wxDateTime_t ) 0; + wxDateTime::wxDateTime_t _arg7 = (wxDateTime::wxDateTime_t ) 0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day","month","year","hour","minute","second","millisec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|iihhhh:wxDateTime_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_Set. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_ResetTime(_swigobj) (_swigobj->ResetTime()) +static PyObject *_wrap_wxDateTime_ResetTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_ResetTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ResetTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_ResetTime(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetYear(_swigobj,_swigarg0) (_swigobj->SetYear(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetYear",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetYear. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetYear(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetMonth(_swigobj,_swigarg0) (_swigobj->SetMonth(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::Month _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","month", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetMonth",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetMonth. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetMonth(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetDay(_swigobj,_swigarg0) (_swigobj->SetDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","day", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetHour(_swigobj,_swigarg0) (_swigobj->SetHour(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetHour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hour", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetHour",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetHour. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetHour(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetMinute(_swigobj,_swigarg0) (_swigobj->SetMinute(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetMinute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","minute", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetMinute",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetMinute. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetMinute(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetSecond(_swigobj,_swigarg0) (_swigobj->SetSecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetSecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","second", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetSecond",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetSecond. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetSecond(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetMillisecond(_swigobj,_swigarg0) (_swigobj->SetMillisecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetMillisecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","millisecond", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetMillisecond",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetMillisecond. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetMillisecond(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->SetToWeekDayInSameWeek(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToWeekDayInSameWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->GetWeekDayInSameWeek(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekDayInSameWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToNextWeekDay(_swigobj,_swigarg0) (_swigobj->SetToNextWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToNextWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToNextWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToNextWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToNextWeekDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetNextWeekDay(_swigobj,_swigarg0) (_swigobj->GetNextWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetNextWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetNextWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetNextWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetNextWeekDay(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToPrevWeekDay(_swigobj,_swigarg0) (_swigobj->SetToPrevWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToPrevWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToPrevWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToPrevWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToPrevWeekDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetPrevWeekDay(_swigobj,_swigarg0) (_swigobj->GetPrevWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetPrevWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetPrevWeekDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetPrevWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetPrevWeekDay(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetToWeekDay(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDateTime_SetToWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + int _arg2 = (int ) 1; + wxDateTime::Month _arg3 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg4 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","n","month","year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|iii:wxDateTime_SetToWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_SetToWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetWeekDay(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDateTime_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + int _arg2 = (int ) 1; + wxDateTime::Month _arg3 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg4 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","n","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|iii:wxDateTime_GetWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToLastWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetToLastWeekDay(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDateTime_SetToLastWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + wxDateTime::Month _arg2 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg3 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","month","year", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxDateTime_SetToLastWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToLastWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_SetToLastWeekDay(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetLastWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetLastWeekDay(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDateTime_GetLastWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::WeekDay _arg1; + wxDateTime::Month _arg2 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg3 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weekday","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxDateTime_GetLastWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetLastWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetLastWeekDay(_arg0,_arg1,_arg2,_arg3)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numWeek","weekday", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToTheWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeek(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","numWeek","weekday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeek. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToLastMonthDay(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToLastMonthDay(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_SetToLastMonthDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::Month _arg1 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg2 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxDateTime_SetToLastMonthDay",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToLastMonthDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToLastMonthDay(_arg0,_arg1,_arg2); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetLastMonthDay(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetLastMonthDay(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetLastMonthDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::Month _arg1 = (wxDateTime::Month ) wxDateTime::Inv_Month; + int _arg2 = (int ) wxDateTime::Inv_Year; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","month","year", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxDateTime_GetLastMonthDay",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetLastMonthDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetLastMonthDay(_arg0,_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_SetToYearDay(_swigobj,_swigarg0) (_swigobj->SetToYearDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_SetToYearDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","yday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_SetToYearDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SetToYearDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SetToYearDay(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_GetYearDay(_swigobj,_swigarg0) (_swigobj->GetYearDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetYearDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::wxDateTime_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","yday", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh:wxDateTime_GetYearDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetYearDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_GetYearDay(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_GetJulianDayNumber(_swigobj) (_swigobj->GetJulianDayNumber()) +static PyObject *_wrap_wxDateTime_GetJulianDayNumber(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetJulianDayNumber",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetJulianDayNumber. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetJulianDayNumber(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetJDN(_swigobj) (_swigobj->GetJDN()) +static PyObject *_wrap_wxDateTime_GetJDN(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetJDN",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetJDN. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetJDN(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetModifiedJulianDayNumber(_swigobj) (_swigobj->GetModifiedJulianDayNumber()) +static PyObject *_wrap_wxDateTime_GetModifiedJulianDayNumber(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetModifiedJulianDayNumber",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetModifiedJulianDayNumber. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetModifiedJulianDayNumber(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetMJD(_swigobj) (_swigobj->GetMJD()) +static PyObject *_wrap_wxDateTime_GetMJD(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetMJD",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMJD. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetMJD(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_GetRataDie(_swigobj) (_swigobj->GetRataDie()) +static PyObject *_wrap_wxDateTime_GetRataDie(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetRataDie",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetRataDie. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxDateTime_GetRataDie(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxDateTime_ToTimezone(_swigobj,_swigarg0,_swigarg1) (_swigobj->ToTimezone(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_ToTimezone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","tz","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxDateTime_ToTimezone",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ToTimezone. Expected _wxDateTime_p."); + return NULL; + } + } +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_ToTimezone(_arg0,*_arg1,_arg2)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_MakeTimezone(_swigobj,_swigarg0,_swigarg1) (_swigobj->MakeTimezone(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_MakeTimezone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","tz","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxDateTime_MakeTimezone",_kwnames,&_argo0,&_obj1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_MakeTimezone. Expected _wxDateTime_p."); + return NULL; + } + } +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} + _arg2 = (bool ) tempbool2; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_MakeTimezone(_arg0,*_arg1,_arg2); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_ToGMT(_swigobj,_swigarg0) (_swigobj->ToGMT(_swigarg0)) +static PyObject *_wrap_wxDateTime_ToGMT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_ToGMT",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ToGMT. Expected _wxDateTime_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime_ToGMT(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateTime_MakeGMT(_swigobj,_swigarg0) (_swigobj->MakeGMT(_swigarg0)) +static PyObject *_wrap_wxDateTime_MakeGMT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "self","noDST", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_MakeGMT",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_MakeGMT. Expected _wxDateTime_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_MakeGMT(_arg0,_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_IsDST(_swigobj,_swigarg0) (_swigobj->IsDST(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsDST(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime * _arg0; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_IsDST",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsDST. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime_IsDST(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsValid(_swigobj) (_swigobj->IsValid()) +static PyObject *_wrap_wxDateTime_IsValid(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_IsValid",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsValid. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsValid(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetTicks(_swigobj) (_swigobj->GetTicks()) +static PyObject *_wrap_wxDateTime_GetTicks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + time_t _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_GetTicks",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetTicks. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (time_t )wxDateTime_GetTicks(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_GetYear(_swigobj,_swigarg0) (_swigobj->GetYear(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetYear",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetYear. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime_GetYear(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetMonth(_swigobj,_swigarg0) (_swigobj->GetMonth(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::Month _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetMonth",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMonth. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::Month )wxDateTime_GetMonth(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetDay(_swigobj,_swigarg0) (_swigobj->GetDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetDay",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetDay. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDay(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetHour(_swigobj,_swigarg0) (_swigobj->GetHour(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetHour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetHour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetHour. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetHour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetMinute(_swigobj,_swigarg0) (_swigobj->GetMinute(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetMinute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetMinute",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMinute. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMinute(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetSecond(_swigobj,_swigarg0) (_swigobj->GetSecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetSecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetSecond",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetSecond. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetSecond(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetMillisecond(_swigobj,_swigarg0) (_swigobj->GetMillisecond(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetMillisecond(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetMillisecond",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetMillisecond. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetMillisecond(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetDayOfYear(_swigobj,_swigarg0) (_swigobj->GetDayOfYear(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetDayOfYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetDayOfYear",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetDayOfYear. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetDayOfYear(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + +#define wxDateTime_GetWeekOfYear(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeekOfYear(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetWeekOfYear(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::WeekFlags _arg1 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; + wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","flags","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxDateTime_GetWeekOfYear",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekOfYear. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfYear(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg2) delete _arg2; +} + return _resultobj; +} + +#define wxDateTime_GetWeekOfMonth(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeekOfMonth(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_GetWeekOfMonth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::wxDateTime_t _result; + wxDateTime * _arg0; + wxDateTime::WeekFlags _arg1 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; + wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","flags","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:wxDateTime_GetWeekOfMonth",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekOfMonth. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::wxDateTime_t )wxDateTime_GetWeekOfMonth(_arg0,_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("h",_result); +{ + if (_arg2) delete _arg2; +} + return _resultobj; +} + +#define wxDateTime_IsWorkDay(_swigobj,_swigarg0) (_swigobj->IsWorkDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsWorkDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime::Country _arg1 = (wxDateTime::Country ) wxDateTime::Country_Default; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","country", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDateTime_IsWorkDay",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsWorkDay. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsWorkDay(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsEqualTo(_swigobj,_swigarg0) (_swigobj->IsEqualTo(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsEqualTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsEqualTo",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsEqualTo. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualTo. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsEqualTo(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsEarlierThan(_swigobj,_swigarg0) (_swigobj->IsEarlierThan(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsEarlierThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsEarlierThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsEarlierThan. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEarlierThan. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsEarlierThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsLaterThan(_swigobj,_swigarg0) (_swigobj->IsLaterThan(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsLaterThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsLaterThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsLaterThan. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsLaterThan. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsLaterThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsStrictlyBetween(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsStrictlyBetween(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_IsStrictlyBetween(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + wxDateTime * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","t1","t2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDateTime_IsStrictlyBetween",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsStrictlyBetween(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsBetween(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsBetween(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_IsBetween(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + wxDateTime * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","t1","t2", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDateTime_IsBetween",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsBetween. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsBetween. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsBetween(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsSameDate(_swigobj,_swigarg0) (_swigobj->IsSameDate(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsSameDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsSameDate",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsSameDate. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsSameDate(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsSameTime(_swigobj,_swigarg0) (_swigobj->IsSameTime(_swigarg0)) +static PyObject *_wrap_wxDateTime_IsSameTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_IsSameTime",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsSameTime. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsSameTime(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_IsEqualUpTo(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEqualUpTo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_IsEqualUpTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + wxTimeSpan * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","dt","ts", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDateTime_IsEqualUpTo",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_IsEqualUpTo. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualUpTo. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsEqualUpTo. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxDateTime_IsEqualUpTo(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_AddTS(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxDateTime_AddTS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_AddTS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_AddTS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddTS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_AddTS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_AddDS(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxDateTime_AddDS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_AddDS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_AddDS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddDS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_AddDS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SubtractTS(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateTime_SubtractTS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_SubtractTS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SubtractTS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractTS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SubtractTS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_SubtractDS(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateTime_SubtractDS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_SubtractDS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_SubtractDS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractDS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateTime & _result_ref = wxDateTime_SubtractDS(_arg0,*_arg1); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateTime_Subtract(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateTime_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","dt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime_Subtract",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_Subtract. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_Subtract. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxDateTime_Subtract(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___add__TS(wxDateTime *self,const wxTimeSpan & other) { return *self + other; } +static PyObject *_wrap_wxDateTime___add__TS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___add__TS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___add__TS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__TS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___add__TS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___add__DS(wxDateTime *self,const wxDateSpan & other) { return *self + other; } +static PyObject *_wrap_wxDateTime___add__DS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___add__DS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___add__DS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__DS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___add__DS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxDateTime___sub__DT(wxDateTime *self,const wxDateTime & other) { return *self - other; } +static PyObject *_wrap_wxDateTime___sub__DT(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___sub__DT",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___sub__DT. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DT. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxDateTime___sub__DT(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___sub__TS(wxDateTime *self,const wxTimeSpan & other) { return *self - other; } +static PyObject *_wrap_wxDateTime___sub__TS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___sub__TS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___sub__TS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__TS. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___sub__TS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateTime wxDateTime___sub__DS(wxDateTime *self,const wxDateSpan & other) { return *self - other; } +static PyObject *_wrap_wxDateTime___sub__DS(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxDateTime * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___sub__DS",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___sub__DS. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DS. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateTime (wxDateTime___sub__DS(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxDateTime___cmp__(wxDateTime *self,const wxDateTime & other) { + if (*self < other) return -1; + if (*self == other) return 0; + return 1; + } +static PyObject *_wrap_wxDateTime___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateTime * _arg0; + wxDateTime * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateTime___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime___cmp__. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___cmp__. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateTime___cmp__(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateTime_ParseRfc822Date(_swigobj,_swigarg0) (_swigobj->ParseRfc822Date(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseRfc822Date(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseRfc822Date",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseRfc822Date. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseRfc822Date(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseFormat(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->ParseFormat(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + char * _arg2 = (char *) "%c"; + wxDateTime * _arg3 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","date","format","dateDef", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|sO:wxDateTime_ParseFormat",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseFormat. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDateTime_ParseFormat. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseFormat(_arg0,_arg1,_arg2,*_arg3); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseDateTime(_swigobj,_swigarg0) (_swigobj->ParseDateTime(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseDateTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","datetime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseDateTime",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseDateTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseDateTime(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseDate(_swigobj,_swigarg0) (_swigobj->ParseDate(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseDate",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseDate(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_ParseTime(_swigobj,_swigarg0) (_swigobj->ParseTime(_swigarg0)) +static PyObject *_wrap_wxDateTime_ParseTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char * _result; + wxDateTime * _arg0; + char * _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","time", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDateTime_ParseTime",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_ParseTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (char *)wxDateTime_ParseTime(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +#define wxDateTime_Format(_swigobj,_swigarg0,_swigarg1) (_swigobj->Format(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDateTime_Format(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + char * _arg1 = (char *) "%c"; + wxDateTime::TimeZone * _arg2 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","format","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|sO:wxDateTime_Format",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_Format. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj2)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_Format(_arg0,_arg1,*_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_arg2) delete _arg2; +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatDate(_swigobj) (_swigobj->FormatDate()) +static PyObject *_wrap_wxDateTime_FormatDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatDate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatDate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatDate(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatTime(_swigobj) (_swigobj->FormatTime()) +static PyObject *_wrap_wxDateTime_FormatTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatISODate(_swigobj) (_swigobj->FormatISODate()) +static PyObject *_wrap_wxDateTime_FormatISODate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatISODate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatISODate. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatISODate(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxDateTime_FormatISOTime(_swigobj) (_swigobj->FormatISOTime()) +static PyObject *_wrap_wxDateTime_FormatISOTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDateTime * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateTime_FormatISOTime",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_FormatISOTime. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxDateTime_FormatISOTime(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Seconds(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "sec", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Seconds",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Seconds(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Second(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Second",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Second()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Minutes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "min", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Minutes",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Minutes(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Minute(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Minute",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Minute()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Hours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "hours", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Hours",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Hours(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Hour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Hour",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Hour()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Days(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Days",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Days(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Day(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Day",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Day()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Weeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0; + char *_kwnames[] = { "days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxTimeSpan_Weeks",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Weeks(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxTimeSpan_Week(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxTimeSpan_Week",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan::Week()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define new_wxTimeSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxTimeSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxTimeSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + long _arg0 = (long ) 0; + long _arg1 = (long ) 0; + long _arg2 = (long ) 0; + long _arg3 = (long ) 0; + char *_kwnames[] = { "hours","minutes","seconds","milliseconds", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxTimeSpan",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxTimeSpan *)new_wxTimeSpan(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxTimeSpan(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxTimeSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxTimeSpan",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxTimeSpan. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxTimeSpan(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTimeSpan_Add(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Add(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_Add",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Add. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Add. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Add(_arg0,*_arg1); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Subtract(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","diff", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_Subtract",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Subtract. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Subtract. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Subtract(_arg0,*_arg1); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Multiply(_swigobj,_swigarg0) (_swigobj->Multiply(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Multiply(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTimeSpan_Multiply",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Multiply. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Multiply(_arg0,_arg1); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Neg(_swigobj) (_swigobj->Neg()) +static PyObject *_wrap_wxTimeSpan_Neg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_Neg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Neg. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxTimeSpan & _result_ref = wxTimeSpan_Neg(_arg0); + _result = (wxTimeSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxTimeSpan_Abs(_swigobj) (_swigobj->Abs()) +static PyObject *_wrap_wxTimeSpan_Abs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_Abs",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Abs. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan_Abs(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___add__(wxTimeSpan *self,const wxTimeSpan & other) { return *self + other; } +static PyObject *_wrap_wxTimeSpan___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan___add__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___add__. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___add__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___add__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___sub__(wxTimeSpan *self,const wxTimeSpan & other) { return *self - other; } +static PyObject *_wrap_wxTimeSpan___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan___sub__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___sub__. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___sub__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___sub__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___mul__(wxTimeSpan *self,int n) { return *self * n; } +static PyObject *_wrap_wxTimeSpan___mul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTimeSpan___mul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___mul__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___mul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___rmul__(wxTimeSpan *self,int n) { return n * *self; } +static PyObject *_wrap_wxTimeSpan___rmul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTimeSpan___rmul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___rmul__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___rmul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxTimeSpan wxTimeSpan___neg__(wxTimeSpan *self) { return self->Negate(); } +static PyObject *_wrap_wxTimeSpan___neg__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTimeSpan * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan___neg__",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___neg__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxTimeSpan (wxTimeSpan___neg__(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTimeSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static int wxTimeSpan___cmp__(wxTimeSpan *self,const wxTimeSpan & other) { + if (*self < other) return -1; + if (*self == other) return 0; + return 1; + } +static PyObject *_wrap_wxTimeSpan___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan___cmp__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan___cmp__. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___cmp__. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan___cmp__(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsNull(_swigobj) (_swigobj->IsNull()) +static PyObject *_wrap_wxTimeSpan_IsNull(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_IsNull",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsNull. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsNull(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsPositive(_swigobj) (_swigobj->IsPositive()) +static PyObject *_wrap_wxTimeSpan_IsPositive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_IsPositive",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsPositive. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsPositive(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsNegative(_swigobj) (_swigobj->IsNegative()) +static PyObject *_wrap_wxTimeSpan_IsNegative(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_IsNegative",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsNegative. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsNegative(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsEqualTo(_swigobj,_swigarg0) (_swigobj->IsEqualTo(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_IsEqualTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","ts", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_IsEqualTo",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsEqualTo. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsEqualTo. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsEqualTo(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsLongerThan(_swigobj,_swigarg0) (_swigobj->IsLongerThan(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_IsLongerThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","ts", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_IsLongerThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsLongerThan. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsLongerThan. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsLongerThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_IsShorterThan(_swigobj,_swigarg0) (_swigobj->IsShorterThan(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_IsShorterThan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTimeSpan * _arg0; + wxTimeSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","t", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTimeSpan_IsShorterThan",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_IsShorterThan. Expected _wxTimeSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsShorterThan. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTimeSpan_IsShorterThan(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetWeeks(_swigobj) (_swigobj->GetWeeks()) +static PyObject *_wrap_wxTimeSpan_GetWeeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetWeeks",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetWeeks. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetWeeks(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetDays(_swigobj) (_swigobj->GetDays()) +static PyObject *_wrap_wxTimeSpan_GetDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetDays",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetDays. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetDays(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetHours(_swigobj) (_swigobj->GetHours()) +static PyObject *_wrap_wxTimeSpan_GetHours(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetHours",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetHours. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetHours(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetMinutes(_swigobj) (_swigobj->GetMinutes()) +static PyObject *_wrap_wxTimeSpan_GetMinutes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetMinutes",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetMinutes. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxTimeSpan_GetMinutes(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTimeSpan_GetSeconds(_swigobj) (_swigobj->GetSeconds()) +static PyObject *_wrap_wxTimeSpan_GetSeconds(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLongLong * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetSeconds",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetSeconds. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxLongLong (wxTimeSpan_GetSeconds(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + PyObject *hi, *lo, *shifter, *shifted; + hi = PyLong_FromLong(_result->GetHi()); + lo = PyLong_FromLong(_result->GetLo()); + shifter = PyLong_FromLong(32); + shifted = PyNumber_Lshift(hi, shifter); + _resultobj = PyNumber_Or(shifted, lo); + Py_DECREF(hi); + Py_DECREF(lo); + Py_DECREF(shifter); + Py_DECREF(shifted); +} + return _resultobj; +} + +#define wxTimeSpan_GetMilliseconds(_swigobj) (_swigobj->GetMilliseconds()) +static PyObject *_wrap_wxTimeSpan_GetMilliseconds(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLongLong * _result; + wxTimeSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTimeSpan_GetMilliseconds",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_GetMilliseconds. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxLongLong (wxTimeSpan_GetMilliseconds(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ + PyObject *hi, *lo, *shifter, *shifted; + hi = PyLong_FromLong(_result->GetHi()); + lo = PyLong_FromLong(_result->GetLo()); + shifter = PyLong_FromLong(32); + shifted = PyNumber_Lshift(hi, shifter); + _resultobj = PyNumber_Or(shifted, lo); + Py_DECREF(hi); + Py_DECREF(lo); + Py_DECREF(shifter); + Py_DECREF(shifted); +} + return _resultobj; +} + +#define wxTimeSpan_Format(_swigobj,_swigarg0) (_swigobj->Format(_swigarg0)) +static PyObject *_wrap_wxTimeSpan_Format(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTimeSpan * _arg0; + char * _arg1 = (char *) "%c"; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","format", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|s:wxTimeSpan_Format",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTimeSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTimeSpan_Format. Expected _wxTimeSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxTimeSpan_Format(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define new_wxDateSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxDateSpan(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_new_wxDateSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + int _arg3 = (int ) 0; + char *_kwnames[] = { "years","months","weeks","days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxDateSpan",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateSpan *)new_wxDateSpan(_arg0,_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxDateSpan(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxDateSpan(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxDateSpan",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxDateSpan. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxDateSpan(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Days(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "days", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Days",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Days(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Day(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Day",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Day()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Weeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "weeks", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Weeks",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Weeks(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Week(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Week",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Week()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Months(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "mon", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Months",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Months(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Month(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Month",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Month()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Years(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + int _arg0; + char *_kwnames[] = { "years", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxDateSpan_Years",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Years(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject *_wrap_wxDateSpan_Year(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateSpan_Year",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan::Year()); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDateSpan_SetYears(_swigobj,_swigarg0) (_swigobj->SetYears(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetYears(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetYears",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetYears. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetYears(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_SetMonths(_swigobj,_swigarg0) (_swigobj->SetMonths(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetMonths(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetMonths",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetMonths. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetMonths(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_SetWeeks(_swigobj,_swigarg0) (_swigobj->SetWeeks(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetWeeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetWeeks",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetWeeks. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetWeeks(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_SetDays(_swigobj,_swigarg0) (_swigobj->SetDays(_swigarg0)) +static PyObject *_wrap_wxDateSpan_SetDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_SetDays",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_SetDays. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_SetDays(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_GetYears(_swigobj) (_swigobj->GetYears()) +static PyObject *_wrap_wxDateSpan_GetYears(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetYears",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetYears. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetYears(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetMonths(_swigobj) (_swigobj->GetMonths()) +static PyObject *_wrap_wxDateSpan_GetMonths(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetMonths",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetMonths. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetMonths(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetWeeks(_swigobj) (_swigobj->GetWeeks()) +static PyObject *_wrap_wxDateSpan_GetWeeks(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetWeeks",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetWeeks. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetWeeks(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetDays(_swigobj) (_swigobj->GetDays()) +static PyObject *_wrap_wxDateSpan_GetDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetDays",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetDays. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetDays(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_GetTotalDays(_swigobj) (_swigobj->GetTotalDays()) +static PyObject *_wrap_wxDateSpan_GetTotalDays(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_GetTotalDays",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_GetTotalDays. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxDateSpan_GetTotalDays(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDateSpan_Add(_swigobj,_swigarg0) (_swigobj->Add(_swigarg0)) +static PyObject *_wrap_wxDateSpan_Add(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan_Add",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Add. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Add. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Add(_arg0,*_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_Subtract(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) +static PyObject *_wrap_wxDateSpan_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan_Subtract",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Subtract. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Subtract. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Subtract(_arg0,*_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_Neg(_swigobj) (_swigobj->Neg()) +static PyObject *_wrap_wxDateSpan_Neg(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan_Neg",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Neg. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Neg(_arg0); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDateSpan_Multiply(_swigobj,_swigarg0) (_swigobj->Multiply(_swigarg0)) +static PyObject *_wrap_wxDateSpan_Multiply(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","factor", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan_Multiply",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan_Multiply. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxDateSpan & _result_ref = wxDateSpan_Multiply(_arg0,_arg1); + _result = (wxDateSpan *) &_result_ref; + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static wxDateSpan wxDateSpan___add__(wxDateSpan *self,const wxDateSpan & other) { return *self + other; } +static PyObject *_wrap_wxDateSpan___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan___add__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___add__. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___add__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___add__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___sub__(wxDateSpan *self,const wxDateSpan & other) { return *self - other; } +static PyObject *_wrap_wxDateSpan___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + wxDateSpan * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","other", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDateSpan___sub__",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___sub__. Expected _wxDateSpan_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___sub__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___sub__(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___mul__(wxDateSpan *self,int n) { return *self * n; } +static PyObject *_wrap_wxDateSpan___mul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan___mul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___mul__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___mul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___rmul__(wxDateSpan *self,int n) { return n * *self; } +static PyObject *_wrap_wxDateSpan___rmul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateSpan___rmul__",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___rmul__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___rmul__(_arg0,_arg1)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxDateSpan wxDateSpan___neg__(wxDateSpan *self) { return self->Negate(); } +static PyObject *_wrap_wxDateSpan___neg__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateSpan * _result; + wxDateSpan * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDateSpan___neg__",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateSpan_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateSpan___neg__. Expected _wxDateSpan_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxDateSpan (wxDateSpan___neg__(_arg0)); + + wxPy_END_ALLOW_THREADS; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateSpan_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyMethodDef utilscMethods[] = { + { "wxDateSpan___neg__", (PyCFunction) _wrap_wxDateSpan___neg__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___rmul__", (PyCFunction) _wrap_wxDateSpan___rmul__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___mul__", (PyCFunction) _wrap_wxDateSpan___mul__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___sub__", (PyCFunction) _wrap_wxDateSpan___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan___add__", (PyCFunction) _wrap_wxDateSpan___add__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Multiply", (PyCFunction) _wrap_wxDateSpan_Multiply, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Neg", (PyCFunction) _wrap_wxDateSpan_Neg, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Subtract", (PyCFunction) _wrap_wxDateSpan_Subtract, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Add", (PyCFunction) _wrap_wxDateSpan_Add, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetTotalDays", (PyCFunction) _wrap_wxDateSpan_GetTotalDays, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetDays", (PyCFunction) _wrap_wxDateSpan_GetDays, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetWeeks", (PyCFunction) _wrap_wxDateSpan_GetWeeks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetMonths", (PyCFunction) _wrap_wxDateSpan_GetMonths, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_GetYears", (PyCFunction) _wrap_wxDateSpan_GetYears, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetDays", (PyCFunction) _wrap_wxDateSpan_SetDays, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetWeeks", (PyCFunction) _wrap_wxDateSpan_SetWeeks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetMonths", (PyCFunction) _wrap_wxDateSpan_SetMonths, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_SetYears", (PyCFunction) _wrap_wxDateSpan_SetYears, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Year", (PyCFunction) _wrap_wxDateSpan_Year, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Years", (PyCFunction) _wrap_wxDateSpan_Years, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Month", (PyCFunction) _wrap_wxDateSpan_Month, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Months", (PyCFunction) _wrap_wxDateSpan_Months, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Week", (PyCFunction) _wrap_wxDateSpan_Week, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Weeks", (PyCFunction) _wrap_wxDateSpan_Weeks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Day", (PyCFunction) _wrap_wxDateSpan_Day, METH_VARARGS | METH_KEYWORDS }, + { "wxDateSpan_Days", (PyCFunction) _wrap_wxDateSpan_Days, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxDateSpan", (PyCFunction) _wrap_delete_wxDateSpan, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateSpan", (PyCFunction) _wrap_new_wxDateSpan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Format", (PyCFunction) _wrap_wxTimeSpan_Format, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetMilliseconds", (PyCFunction) _wrap_wxTimeSpan_GetMilliseconds, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetSeconds", (PyCFunction) _wrap_wxTimeSpan_GetSeconds, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetMinutes", (PyCFunction) _wrap_wxTimeSpan_GetMinutes, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetHours", (PyCFunction) _wrap_wxTimeSpan_GetHours, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetDays", (PyCFunction) _wrap_wxTimeSpan_GetDays, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_GetWeeks", (PyCFunction) _wrap_wxTimeSpan_GetWeeks, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsShorterThan", (PyCFunction) _wrap_wxTimeSpan_IsShorterThan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsLongerThan", (PyCFunction) _wrap_wxTimeSpan_IsLongerThan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsEqualTo", (PyCFunction) _wrap_wxTimeSpan_IsEqualTo, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsNegative", (PyCFunction) _wrap_wxTimeSpan_IsNegative, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsPositive", (PyCFunction) _wrap_wxTimeSpan_IsPositive, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_IsNull", (PyCFunction) _wrap_wxTimeSpan_IsNull, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___cmp__", (PyCFunction) _wrap_wxTimeSpan___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___neg__", (PyCFunction) _wrap_wxTimeSpan___neg__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___rmul__", (PyCFunction) _wrap_wxTimeSpan___rmul__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___mul__", (PyCFunction) _wrap_wxTimeSpan___mul__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___sub__", (PyCFunction) _wrap_wxTimeSpan___sub__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan___add__", (PyCFunction) _wrap_wxTimeSpan___add__, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Abs", (PyCFunction) _wrap_wxTimeSpan_Abs, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Neg", (PyCFunction) _wrap_wxTimeSpan_Neg, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Multiply", (PyCFunction) _wrap_wxTimeSpan_Multiply, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Subtract", (PyCFunction) _wrap_wxTimeSpan_Subtract, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Add", (PyCFunction) _wrap_wxTimeSpan_Add, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxTimeSpan", (PyCFunction) _wrap_delete_wxTimeSpan, METH_VARARGS | METH_KEYWORDS }, + { "new_wxTimeSpan", (PyCFunction) _wrap_new_wxTimeSpan, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Week", (PyCFunction) _wrap_wxTimeSpan_Week, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Weeks", (PyCFunction) _wrap_wxTimeSpan_Weeks, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Day", (PyCFunction) _wrap_wxTimeSpan_Day, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Days", (PyCFunction) _wrap_wxTimeSpan_Days, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Hour", (PyCFunction) _wrap_wxTimeSpan_Hour, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Hours", (PyCFunction) _wrap_wxTimeSpan_Hours, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Minute", (PyCFunction) _wrap_wxTimeSpan_Minute, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Minutes", (PyCFunction) _wrap_wxTimeSpan_Minutes, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Second", (PyCFunction) _wrap_wxTimeSpan_Second, METH_VARARGS | METH_KEYWORDS }, + { "wxTimeSpan_Seconds", (PyCFunction) _wrap_wxTimeSpan_Seconds, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatISOTime", (PyCFunction) _wrap_wxDateTime_FormatISOTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatISODate", (PyCFunction) _wrap_wxDateTime_FormatISODate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatTime", (PyCFunction) _wrap_wxDateTime_FormatTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_FormatDate", (PyCFunction) _wrap_wxDateTime_FormatDate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Format", (PyCFunction) _wrap_wxDateTime_Format, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseTime", (PyCFunction) _wrap_wxDateTime_ParseTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseDate", (PyCFunction) _wrap_wxDateTime_ParseDate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseDateTime", (PyCFunction) _wrap_wxDateTime_ParseDateTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseFormat", (PyCFunction) _wrap_wxDateTime_ParseFormat, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ParseRfc822Date", (PyCFunction) _wrap_wxDateTime_ParseRfc822Date, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___cmp__", (PyCFunction) _wrap_wxDateTime___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___sub__DS", (PyCFunction) _wrap_wxDateTime___sub__DS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___sub__TS", (PyCFunction) _wrap_wxDateTime___sub__TS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___sub__DT", (PyCFunction) _wrap_wxDateTime___sub__DT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___add__DS", (PyCFunction) _wrap_wxDateTime___add__DS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime___add__TS", (PyCFunction) _wrap_wxDateTime___add__TS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Subtract", (PyCFunction) _wrap_wxDateTime_Subtract, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SubtractDS", (PyCFunction) _wrap_wxDateTime_SubtractDS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SubtractTS", (PyCFunction) _wrap_wxDateTime_SubtractTS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_AddDS", (PyCFunction) _wrap_wxDateTime_AddDS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_AddTS", (PyCFunction) _wrap_wxDateTime_AddTS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsEqualUpTo", (PyCFunction) _wrap_wxDateTime_IsEqualUpTo, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsSameTime", (PyCFunction) _wrap_wxDateTime_IsSameTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsSameDate", (PyCFunction) _wrap_wxDateTime_IsSameDate, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsBetween", (PyCFunction) _wrap_wxDateTime_IsBetween, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsStrictlyBetween", (PyCFunction) _wrap_wxDateTime_IsStrictlyBetween, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsLaterThan", (PyCFunction) _wrap_wxDateTime_IsLaterThan, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsEarlierThan", (PyCFunction) _wrap_wxDateTime_IsEarlierThan, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsEqualTo", (PyCFunction) _wrap_wxDateTime_IsEqualTo, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsWorkDay", (PyCFunction) _wrap_wxDateTime_IsWorkDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekOfMonth", (PyCFunction) _wrap_wxDateTime_GetWeekOfMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekOfYear", (PyCFunction) _wrap_wxDateTime_GetWeekOfYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetDayOfYear", (PyCFunction) _wrap_wxDateTime_GetDayOfYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMillisecond", (PyCFunction) _wrap_wxDateTime_GetMillisecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetSecond", (PyCFunction) _wrap_wxDateTime_GetSecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMinute", (PyCFunction) _wrap_wxDateTime_GetMinute, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetHour", (PyCFunction) _wrap_wxDateTime_GetHour, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetDay", (PyCFunction) _wrap_wxDateTime_GetDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMonth", (PyCFunction) _wrap_wxDateTime_GetMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetYear", (PyCFunction) _wrap_wxDateTime_GetYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetTicks", (PyCFunction) _wrap_wxDateTime_GetTicks, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsValid", (PyCFunction) _wrap_wxDateTime_IsValid, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsDST", (PyCFunction) _wrap_wxDateTime_IsDST, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_MakeGMT", (PyCFunction) _wrap_wxDateTime_MakeGMT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ToGMT", (PyCFunction) _wrap_wxDateTime_ToGMT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_MakeTimezone", (PyCFunction) _wrap_wxDateTime_MakeTimezone, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ToTimezone", (PyCFunction) _wrap_wxDateTime_ToTimezone, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetRataDie", (PyCFunction) _wrap_wxDateTime_GetRataDie, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMJD", (PyCFunction) _wrap_wxDateTime_GetMJD, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetModifiedJulianDayNumber", (PyCFunction) _wrap_wxDateTime_GetModifiedJulianDayNumber, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetJDN", (PyCFunction) _wrap_wxDateTime_GetJDN, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetJulianDayNumber", (PyCFunction) _wrap_wxDateTime_GetJulianDayNumber, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetYearDay", (PyCFunction) _wrap_wxDateTime_GetYearDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToYearDay", (PyCFunction) _wrap_wxDateTime_SetToYearDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetLastMonthDay", (PyCFunction) _wrap_wxDateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToLastMonthDay", (PyCFunction) _wrap_wxDateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeek", (PyCFunction) _wrap_wxDateTime_GetWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToTheWeek", (PyCFunction) _wrap_wxDateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetLastWeekDay", (PyCFunction) _wrap_wxDateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToLastWeekDay", (PyCFunction) _wrap_wxDateTime_SetToLastWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekDay", (PyCFunction) _wrap_wxDateTime_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToWeekDay", (PyCFunction) _wrap_wxDateTime_SetToWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetPrevWeekDay", (PyCFunction) _wrap_wxDateTime_GetPrevWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToPrevWeekDay", (PyCFunction) _wrap_wxDateTime_SetToPrevWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetNextWeekDay", (PyCFunction) _wrap_wxDateTime_GetNextWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToNextWeekDay", (PyCFunction) _wrap_wxDateTime_SetToNextWeekDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekDayInSameWeek", (PyCFunction) _wrap_wxDateTime_GetWeekDayInSameWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToWeekDayInSameWeek", (PyCFunction) _wrap_wxDateTime_SetToWeekDayInSameWeek, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetMillisecond", (PyCFunction) _wrap_wxDateTime_SetMillisecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetSecond", (PyCFunction) _wrap_wxDateTime_SetSecond, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetMinute", (PyCFunction) _wrap_wxDateTime_SetMinute, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetHour", (PyCFunction) _wrap_wxDateTime_SetHour, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetDay", (PyCFunction) _wrap_wxDateTime_SetDay, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetMonth", (PyCFunction) _wrap_wxDateTime_SetMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetYear", (PyCFunction) _wrap_wxDateTime_SetYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ResetTime", (PyCFunction) _wrap_wxDateTime_ResetTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Set", (PyCFunction) _wrap_wxDateTime_Set, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetHMS", (PyCFunction) _wrap_wxDateTime_SetHMS, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetJDN", (PyCFunction) _wrap_wxDateTime_SetJDN, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetTimeT", (PyCFunction) _wrap_wxDateTime_SetTimeT, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetToCurrent", (PyCFunction) _wrap_wxDateTime_SetToCurrent, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxDateTime", (PyCFunction) _wrap_delete_wxDateTime, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromDMY", (PyCFunction) _wrap_new_wxDateTimeFromDMY, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromHMS", (PyCFunction) _wrap_new_wxDateTimeFromHMS, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromJDN", (PyCFunction) _wrap_new_wxDateTimeFromJDN, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTimeFromTimeT", (PyCFunction) _wrap_new_wxDateTimeFromTimeT, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDateTime", (PyCFunction) _wrap_new_wxDateTime, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Today", (PyCFunction) _wrap_wxDateTime_Today, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_Now", (PyCFunction) _wrap_wxDateTime_Now, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetEndDST", (PyCFunction) _wrap_wxDateTime_GetEndDST, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetBeginDST", (PyCFunction) _wrap_wxDateTime_GetBeginDST, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsDSTApplicable", (PyCFunction) _wrap_wxDateTime_IsDSTApplicable, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetAmPmStrings", (PyCFunction) _wrap_wxDateTime_GetAmPmStrings, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekDayName", (PyCFunction) _wrap_wxDateTime_GetWeekDayName, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetMonthName", (PyCFunction) _wrap_wxDateTime_GetMonthName, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetNumberOfDaysInMonth", (PyCFunction) _wrap_wxDateTime_GetNumberOfDaysInMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetNumberOfDaysinYear", (PyCFunction) _wrap_wxDateTime_GetNumberOfDaysinYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCentury", (PyCFunction) _wrap_wxDateTime_GetCentury, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsLeapYear", (PyCFunction) _wrap_wxDateTime_IsLeapYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCurrentMonth", (PyCFunction) _wrap_wxDateTime_GetCurrentMonth, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_ConvertYearToBC", (PyCFunction) _wrap_wxDateTime_ConvertYearToBC, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCurrentYear", (PyCFunction) _wrap_wxDateTime_GetCurrentYear, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_IsWestEuropeanCountry", (PyCFunction) _wrap_wxDateTime_IsWestEuropeanCountry, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetCountry", (PyCFunction) _wrap_wxDateTime_GetCountry, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_SetCountry", (PyCFunction) _wrap_wxDateTime_SetCountry, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFileConfig", (PyCFunction) _wrap_delete_wxFileConfig, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileConfig", (PyCFunction) _wrap_new_wxFileConfig, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxConfig", (PyCFunction) _wrap_delete_wxConfig, METH_VARARGS | METH_KEYWORDS }, + { "new_wxConfig", (PyCFunction) _wrap_new_wxConfig, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_ExpandEnvVars", (PyCFunction) _wrap_wxConfigBase_ExpandEnvVars, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_RenameGroup", (PyCFunction) _wrap_wxConfigBase_RenameGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_RenameEntry", (PyCFunction) _wrap_wxConfigBase_RenameEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetEntryType", (PyCFunction) _wrap_wxConfigBase_GetEntryType, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_WriteFloat", (PyCFunction) _wrap_wxConfigBase_WriteFloat, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_WriteInt", (PyCFunction) _wrap_wxConfigBase_WriteInt, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Write", (PyCFunction) _wrap_wxConfigBase_Write, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetStyle", (PyCFunction) _wrap_wxConfigBase_GetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetStyle", (PyCFunction) _wrap_wxConfigBase_SetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetVendorName", (PyCFunction) _wrap_wxConfigBase_SetVendorName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetAppName", (PyCFunction) _wrap_wxConfigBase_SetAppName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetRecordDefaults", (PyCFunction) _wrap_wxConfigBase_SetRecordDefaults, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetPath", (PyCFunction) _wrap_wxConfigBase_SetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_SetExpandEnvVars", (PyCFunction) _wrap_wxConfigBase_SetExpandEnvVars, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_ReadFloat", (PyCFunction) _wrap_wxConfigBase_ReadFloat, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_ReadInt", (PyCFunction) _wrap_wxConfigBase_ReadInt, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Read", (PyCFunction) _wrap_wxConfigBase_Read, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_IsRecordingDefaults", (PyCFunction) _wrap_wxConfigBase_IsRecordingDefaults, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_IsExpandingEnvVars", (PyCFunction) _wrap_wxConfigBase_IsExpandingEnvVars, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_HasGroup", (PyCFunction) _wrap_wxConfigBase_HasGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_HasEntry", (PyCFunction) _wrap_wxConfigBase_HasEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetVendorName", (PyCFunction) _wrap_wxConfigBase_GetVendorName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetPath", (PyCFunction) _wrap_wxConfigBase_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNumberOfGroups", (PyCFunction) _wrap_wxConfigBase_GetNumberOfGroups, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNumberOfEntries", (PyCFunction) _wrap_wxConfigBase_GetNumberOfEntries, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNextEntry", (PyCFunction) _wrap_wxConfigBase_GetNextEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetNextGroup", (PyCFunction) _wrap_wxConfigBase_GetNextGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetFirstEntry", (PyCFunction) _wrap_wxConfigBase_GetFirstEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetFirstGroup", (PyCFunction) _wrap_wxConfigBase_GetFirstGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_GetAppName", (PyCFunction) _wrap_wxConfigBase_GetAppName, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Flush", (PyCFunction) _wrap_wxConfigBase_Flush, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Exists", (PyCFunction) _wrap_wxConfigBase_Exists, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DeleteGroup", (PyCFunction) _wrap_wxConfigBase_DeleteGroup, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DeleteEntry", (PyCFunction) _wrap_wxConfigBase_DeleteEntry, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DeleteAll", (PyCFunction) _wrap_wxConfigBase_DeleteAll, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_DontCreateOnDemand", (PyCFunction) _wrap_wxConfigBase_DontCreateOnDemand, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Create", (PyCFunction) _wrap_wxConfigBase_Create, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Get", (PyCFunction) _wrap_wxConfigBase_Get, METH_VARARGS | METH_KEYWORDS }, + { "wxConfigBase_Set", (PyCFunction) _wrap_wxConfigBase_Set, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxConfigBase", (PyCFunction) _wrap_delete_wxConfigBase, METH_VARARGS | METH_KEYWORDS }, + { "wxGetLocalTimeMillis", (PyCFunction) _wrap_wxGetLocalTimeMillis, METH_VARARGS | METH_KEYWORDS }, + { "wxGetCurrentTime", (PyCFunction) _wrap_wxGetCurrentTime, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUTCTime", (PyCFunction) _wrap_wxGetUTCTime, METH_VARARGS | METH_KEYWORDS }, + { "wxGetLocalTime", (PyCFunction) _wrap_wxGetLocalTime, METH_VARARGS | METH_KEYWORDS }, + { NULL, NULL } +}; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_class_wxDateTime","_wxDateTime",0}, + { "_wxPrintQuality","_wxCoord",0}, + { "_wxPrintQuality","_int",0}, + { "_wxPrintQuality","_signed_int",0}, + { "_wxPrintQuality","_unsigned_int",0}, + { "_wxPrintQuality","_wxWindowID",0}, + { "_wxPrintQuality","_uint",0}, + { "_wxPrintQuality","_EBool",0}, + { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, + { "_byte","_unsigned_char",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_size_t","_wxCoord",0}, + { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, + { "_size_t","_unsigned_int",0}, + { "_size_t","_int",0}, + { "_size_t","_wxWindowID",0}, + { "_size_t","_uint",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, + { "_uint","_wxCoord",0}, + { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, + { "_uint","_size_t",0}, + { "_uint","_unsigned_int",0}, + { "_uint","_int",0}, + { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, + { "_char","_wxChar",0}, + { "_wxConfig","_class_wxConfig",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, + { "_EBool","_wxCoord",0}, + { "_EBool","_wxPrintQuality",0}, + { "_EBool","_signed_int",0}, + { "_EBool","_int",0}, + { "_EBool","_wxWindowID",0}, + { "_unsigned_long","_long",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_signed_int","_wxCoord",0}, + { "_signed_int","_wxPrintQuality",0}, + { "_signed_int","_EBool",0}, + { "_signed_int","_wxWindowID",0}, + { "_signed_int","_int",0}, + { "_WXTYPE","_wxDateTime_t",0}, + { "_WXTYPE","_short",0}, + { "_WXTYPE","_signed_short",0}, + { "_WXTYPE","_unsigned_short",0}, + { "_unsigned_short","_wxDateTime_t",0}, + { "_unsigned_short","_WXTYPE",0}, + { "_unsigned_short","_short",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, + { "_signed_short","_WXTYPE",0}, + { "_signed_short","_short",0}, + { "_unsigned_char","_byte",0}, + { "_unsigned_int","_wxCoord",0}, + { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, + { "_unsigned_int","_size_t",0}, + { "_unsigned_int","_uint",0}, + { "_unsigned_int","_wxWindowID",0}, + { "_unsigned_int","_int",0}, + { "_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_wxConfigBase","_class_wxConfig",SwigwxConfigTowxConfigBase}, + { "_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, + { "_short","_WXTYPE",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_wxWindowID","_wxCoord",0}, + { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, + { "_wxWindowID","_size_t",0}, + { "_wxWindowID","_EBool",0}, + { "_wxWindowID","_uint",0}, + { "_wxWindowID","_int",0}, + { "_wxWindowID","_signed_int",0}, + { "_wxWindowID","_unsigned_int",0}, + { "_int","_wxCoord",0}, + { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, + { "_int","_size_t",0}, + { "_int","_EBool",0}, + { "_int","_uint",0}, + { "_int","_wxWindowID",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxConfigBase","_class_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_class_wxConfigBase","_wxFileConfig",SwigwxFileConfigTowxConfigBase}, + { "_class_wxConfigBase","_class_wxConfig",SwigwxConfigTowxConfigBase}, + { "_class_wxConfigBase","_wxConfig",SwigwxConfigTowxConfigBase}, + { "_class_wxConfigBase","_wxConfigBase",0}, + { "_wxCoord","_int",0}, + { "_wxCoord","_signed_int",0}, + { "_wxCoord","_unsigned_int",0}, + { "_wxCoord","_wxWindowID",0}, + { "_wxCoord","_uint",0}, + { "_wxCoord","_EBool",0}, + { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, + { "_wxCoord","_wxPrintQuality",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_class_wxConfig","_wxConfig",0}, +{0,0,0}}; + +static PyObject *SWIG_globals; +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT(void) initutilsc() { + PyObject *m, *d; + SWIG_globals = SWIG_newvarlink(); + m = Py_InitModule("utilsc", utilscMethods); + d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxCONFIG_USE_LOCAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_LOCAL_FILE)); + PyDict_SetItemString(d,"wxCONFIG_USE_GLOBAL_FILE", PyInt_FromLong((long) wxCONFIG_USE_GLOBAL_FILE)); + PyDict_SetItemString(d,"wxCONFIG_USE_RELATIVE_PATH", PyInt_FromLong((long) wxCONFIG_USE_RELATIVE_PATH)); + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + PyDict_SetItemString(d,"wxConfigBase_Type_Unknown", PyInt_FromLong((long) wxConfigBase::Type_Unknown)); + PyDict_SetItemString(d,"wxConfigBase_Type_String", PyInt_FromLong((long) wxConfigBase::Type_String)); + PyDict_SetItemString(d,"wxConfigBase_Type_Boolean", PyInt_FromLong((long) wxConfigBase::Type_Boolean)); + PyDict_SetItemString(d,"wxConfigBase_Type_Integer", PyInt_FromLong((long) wxConfigBase::Type_Integer)); + PyDict_SetItemString(d,"wxConfigBase_Type_Float", PyInt_FromLong((long) wxConfigBase::Type_Float)); + PyDict_SetItemString(d,"wxDateTime_Local", PyInt_FromLong((long) wxDateTime::Local)); + PyDict_SetItemString(d,"wxDateTime_GMT_12", PyInt_FromLong((long) wxDateTime::GMT_12)); + PyDict_SetItemString(d,"wxDateTime_GMT_11", PyInt_FromLong((long) wxDateTime::GMT_11)); + PyDict_SetItemString(d,"wxDateTime_GMT_10", PyInt_FromLong((long) wxDateTime::GMT_10)); + PyDict_SetItemString(d,"wxDateTime_GMT_9", PyInt_FromLong((long) wxDateTime::GMT_9)); + PyDict_SetItemString(d,"wxDateTime_GMT_8", PyInt_FromLong((long) wxDateTime::GMT_8)); + PyDict_SetItemString(d,"wxDateTime_GMT_7", PyInt_FromLong((long) wxDateTime::GMT_7)); + PyDict_SetItemString(d,"wxDateTime_GMT_6", PyInt_FromLong((long) wxDateTime::GMT_6)); + PyDict_SetItemString(d,"wxDateTime_GMT_5", PyInt_FromLong((long) wxDateTime::GMT_5)); + PyDict_SetItemString(d,"wxDateTime_GMT_4", PyInt_FromLong((long) wxDateTime::GMT_4)); + PyDict_SetItemString(d,"wxDateTime_GMT_3", PyInt_FromLong((long) wxDateTime::GMT_3)); + PyDict_SetItemString(d,"wxDateTime_GMT_2", PyInt_FromLong((long) wxDateTime::GMT_2)); + PyDict_SetItemString(d,"wxDateTime_GMT_1", PyInt_FromLong((long) wxDateTime::GMT_1)); + PyDict_SetItemString(d,"wxDateTime_GMT0", PyInt_FromLong((long) wxDateTime::GMT0)); + PyDict_SetItemString(d,"wxDateTime_GMT1", PyInt_FromLong((long) wxDateTime::GMT1)); + PyDict_SetItemString(d,"wxDateTime_GMT2", PyInt_FromLong((long) wxDateTime::GMT2)); + PyDict_SetItemString(d,"wxDateTime_GMT3", PyInt_FromLong((long) wxDateTime::GMT3)); + PyDict_SetItemString(d,"wxDateTime_GMT4", PyInt_FromLong((long) wxDateTime::GMT4)); + PyDict_SetItemString(d,"wxDateTime_GMT5", PyInt_FromLong((long) wxDateTime::GMT5)); + PyDict_SetItemString(d,"wxDateTime_GMT6", PyInt_FromLong((long) wxDateTime::GMT6)); + PyDict_SetItemString(d,"wxDateTime_GMT7", PyInt_FromLong((long) wxDateTime::GMT7)); + PyDict_SetItemString(d,"wxDateTime_GMT8", PyInt_FromLong((long) wxDateTime::GMT8)); + PyDict_SetItemString(d,"wxDateTime_GMT9", PyInt_FromLong((long) wxDateTime::GMT9)); + PyDict_SetItemString(d,"wxDateTime_GMT10", PyInt_FromLong((long) wxDateTime::GMT10)); + PyDict_SetItemString(d,"wxDateTime_GMT11", PyInt_FromLong((long) wxDateTime::GMT11)); + PyDict_SetItemString(d,"wxDateTime_GMT12", PyInt_FromLong((long) wxDateTime::GMT12)); + PyDict_SetItemString(d,"wxDateTime_WET", PyInt_FromLong((long) wxDateTime::WET)); + PyDict_SetItemString(d,"wxDateTime_WEST", PyInt_FromLong((long) wxDateTime::WEST)); + PyDict_SetItemString(d,"wxDateTime_CET", PyInt_FromLong((long) wxDateTime::CET)); + PyDict_SetItemString(d,"wxDateTime_CEST", PyInt_FromLong((long) wxDateTime::CEST)); + PyDict_SetItemString(d,"wxDateTime_EET", PyInt_FromLong((long) wxDateTime::EET)); + PyDict_SetItemString(d,"wxDateTime_EEST", PyInt_FromLong((long) wxDateTime::EEST)); + PyDict_SetItemString(d,"wxDateTime_MSK", PyInt_FromLong((long) wxDateTime::MSK)); + PyDict_SetItemString(d,"wxDateTime_MSD", PyInt_FromLong((long) wxDateTime::MSD)); + PyDict_SetItemString(d,"wxDateTime_AST", PyInt_FromLong((long) wxDateTime::AST)); + PyDict_SetItemString(d,"wxDateTime_ADT", PyInt_FromLong((long) wxDateTime::ADT)); + PyDict_SetItemString(d,"wxDateTime_EST", PyInt_FromLong((long) wxDateTime::EST)); + PyDict_SetItemString(d,"wxDateTime_EDT", PyInt_FromLong((long) wxDateTime::EDT)); + PyDict_SetItemString(d,"wxDateTime_CST", PyInt_FromLong((long) wxDateTime::CST)); + PyDict_SetItemString(d,"wxDateTime_CDT", PyInt_FromLong((long) wxDateTime::CDT)); + PyDict_SetItemString(d,"wxDateTime_MST", PyInt_FromLong((long) wxDateTime::MST)); + PyDict_SetItemString(d,"wxDateTime_MDT", PyInt_FromLong((long) wxDateTime::MDT)); + PyDict_SetItemString(d,"wxDateTime_PST", PyInt_FromLong((long) wxDateTime::PST)); + PyDict_SetItemString(d,"wxDateTime_PDT", PyInt_FromLong((long) wxDateTime::PDT)); + PyDict_SetItemString(d,"wxDateTime_HST", PyInt_FromLong((long) wxDateTime::HST)); + PyDict_SetItemString(d,"wxDateTime_AKST", PyInt_FromLong((long) wxDateTime::AKST)); + PyDict_SetItemString(d,"wxDateTime_AKDT", PyInt_FromLong((long) wxDateTime::AKDT)); + PyDict_SetItemString(d,"wxDateTime_A_WST", PyInt_FromLong((long) wxDateTime::A_WST)); + PyDict_SetItemString(d,"wxDateTime_A_CST", PyInt_FromLong((long) wxDateTime::A_CST)); + PyDict_SetItemString(d,"wxDateTime_A_EST", PyInt_FromLong((long) wxDateTime::A_EST)); + PyDict_SetItemString(d,"wxDateTime_A_ESST", PyInt_FromLong((long) wxDateTime::A_ESST)); + PyDict_SetItemString(d,"wxDateTime_UTC", PyInt_FromLong((long) wxDateTime::UTC)); + PyDict_SetItemString(d,"wxDateTime_Gregorian", PyInt_FromLong((long) wxDateTime::Gregorian)); + PyDict_SetItemString(d,"wxDateTime_Julian", PyInt_FromLong((long) wxDateTime::Julian)); + PyDict_SetItemString(d,"wxDateTime_Country_Unknown", PyInt_FromLong((long) wxDateTime::Country_Unknown)); + PyDict_SetItemString(d,"wxDateTime_Country_Default", PyInt_FromLong((long) wxDateTime::Country_Default)); + PyDict_SetItemString(d,"wxDateTime_Country_WesternEurope_Start", PyInt_FromLong((long) wxDateTime::Country_WesternEurope_Start)); + PyDict_SetItemString(d,"wxDateTime_Country_EEC", PyInt_FromLong((long) wxDateTime::Country_EEC)); + PyDict_SetItemString(d,"wxDateTime_France", PyInt_FromLong((long) wxDateTime::France)); + PyDict_SetItemString(d,"wxDateTime_Germany", PyInt_FromLong((long) wxDateTime::Germany)); + PyDict_SetItemString(d,"wxDateTime_UK", PyInt_FromLong((long) wxDateTime::UK)); + PyDict_SetItemString(d,"wxDateTime_Country_WesternEurope_End", PyInt_FromLong((long) wxDateTime::Country_WesternEurope_End)); + PyDict_SetItemString(d,"wxDateTime_Russia", PyInt_FromLong((long) wxDateTime::Russia)); + PyDict_SetItemString(d,"wxDateTime_USA", PyInt_FromLong((long) wxDateTime::USA)); + PyDict_SetItemString(d,"wxDateTime_Jan", PyInt_FromLong((long) wxDateTime::Jan)); + PyDict_SetItemString(d,"wxDateTime_Feb", PyInt_FromLong((long) wxDateTime::Feb)); + PyDict_SetItemString(d,"wxDateTime_Mar", PyInt_FromLong((long) wxDateTime::Mar)); + PyDict_SetItemString(d,"wxDateTime_Apr", PyInt_FromLong((long) wxDateTime::Apr)); + PyDict_SetItemString(d,"wxDateTime_May", PyInt_FromLong((long) wxDateTime::May)); + PyDict_SetItemString(d,"wxDateTime_Jun", PyInt_FromLong((long) wxDateTime::Jun)); + PyDict_SetItemString(d,"wxDateTime_Jul", PyInt_FromLong((long) wxDateTime::Jul)); + PyDict_SetItemString(d,"wxDateTime_Aug", PyInt_FromLong((long) wxDateTime::Aug)); + PyDict_SetItemString(d,"wxDateTime_Sep", PyInt_FromLong((long) wxDateTime::Sep)); + PyDict_SetItemString(d,"wxDateTime_Oct", PyInt_FromLong((long) wxDateTime::Oct)); + PyDict_SetItemString(d,"wxDateTime_Nov", PyInt_FromLong((long) wxDateTime::Nov)); + PyDict_SetItemString(d,"wxDateTime_Dec", PyInt_FromLong((long) wxDateTime::Dec)); + PyDict_SetItemString(d,"wxDateTime_Inv_Month", PyInt_FromLong((long) wxDateTime::Inv_Month)); + PyDict_SetItemString(d,"wxDateTime_Sun", PyInt_FromLong((long) wxDateTime::Sun)); + PyDict_SetItemString(d,"wxDateTime_Mon", PyInt_FromLong((long) wxDateTime::Mon)); + PyDict_SetItemString(d,"wxDateTime_Tue", PyInt_FromLong((long) wxDateTime::Tue)); + PyDict_SetItemString(d,"wxDateTime_Wed", PyInt_FromLong((long) wxDateTime::Wed)); + PyDict_SetItemString(d,"wxDateTime_Thu", PyInt_FromLong((long) wxDateTime::Thu)); + PyDict_SetItemString(d,"wxDateTime_Fri", PyInt_FromLong((long) wxDateTime::Fri)); + PyDict_SetItemString(d,"wxDateTime_Sat", PyInt_FromLong((long) wxDateTime::Sat)); + PyDict_SetItemString(d,"wxDateTime_Inv_WeekDay", PyInt_FromLong((long) wxDateTime::Inv_WeekDay)); + PyDict_SetItemString(d,"wxDateTime_Inv_Year", PyInt_FromLong((long) wxDateTime::Inv_Year)); + PyDict_SetItemString(d,"wxDateTime_Name_Full", PyInt_FromLong((long) wxDateTime::Name_Full)); + PyDict_SetItemString(d,"wxDateTime_Name_Abbr", PyInt_FromLong((long) wxDateTime::Name_Abbr)); + PyDict_SetItemString(d,"wxDateTime_Default_First", PyInt_FromLong((long) wxDateTime::Default_First)); + PyDict_SetItemString(d,"wxDateTime_Monday_First", PyInt_FromLong((long) wxDateTime::Monday_First)); + PyDict_SetItemString(d,"wxDateTime_Sunday_First", PyInt_FromLong((long) wxDateTime::Sunday_First)); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} +} diff --git a/wxPython/src/msw/utils.py b/wxPython/src/msw/utils.py new file mode 100644 index 0000000000..be380ee5a4 --- /dev/null +++ b/wxPython/src/msw/utils.py @@ -0,0 +1,953 @@ +# This file was created automatically by SWIG. +import utilsc +import string +class wxConfigBasePtr : + Type_Unknown = utilsc.wxConfigBase_Type_Unknown + Type_String = utilsc.wxConfigBase_Type_String + Type_Boolean = utilsc.wxConfigBase_Type_Boolean + Type_Integer = utilsc.wxConfigBase_Type_Integer + Type_Float = utilsc.wxConfigBase_Type_Float + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxConfigBase(self) + def DeleteAll(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_DeleteAll,(self,) + _args, _kwargs) + return val + def DeleteEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_DeleteEntry,(self,) + _args, _kwargs) + return val + def DeleteGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_DeleteGroup,(self,) + _args, _kwargs) + return val + def Exists(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Exists,(self,) + _args, _kwargs) + return val + def Flush(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Flush,(self,) + _args, _kwargs) + return val + def GetAppName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetAppName,(self,) + _args, _kwargs) + return val + def GetFirstGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetFirstGroup,(self,) + _args, _kwargs) + return val + def GetFirstEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetFirstEntry,(self,) + _args, _kwargs) + return val + def GetNextGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNextGroup,(self,) + _args, _kwargs) + return val + def GetNextEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNextEntry,(self,) + _args, _kwargs) + return val + def GetNumberOfEntries(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNumberOfEntries,(self,) + _args, _kwargs) + return val + def GetNumberOfGroups(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetNumberOfGroups,(self,) + _args, _kwargs) + return val + def GetPath(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetPath,(self,) + _args, _kwargs) + return val + def GetVendorName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetVendorName,(self,) + _args, _kwargs) + return val + def HasEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_HasEntry,(self,) + _args, _kwargs) + return val + def HasGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_HasGroup,(self,) + _args, _kwargs) + return val + def IsExpandingEnvVars(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_IsExpandingEnvVars,(self,) + _args, _kwargs) + return val + def IsRecordingDefaults(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_IsRecordingDefaults,(self,) + _args, _kwargs) + return val + def Read(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Read,(self,) + _args, _kwargs) + return val + def ReadInt(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_ReadInt,(self,) + _args, _kwargs) + return val + def ReadFloat(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_ReadFloat,(self,) + _args, _kwargs) + return val + def SetExpandEnvVars(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetExpandEnvVars,(self,) + _args, _kwargs) + return val + def SetPath(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetPath,(self,) + _args, _kwargs) + return val + def SetRecordDefaults(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetRecordDefaults,(self,) + _args, _kwargs) + return val + def SetAppName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetAppName,(self,) + _args, _kwargs) + return val + def SetVendorName(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetVendorName,(self,) + _args, _kwargs) + return val + def SetStyle(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_SetStyle,(self,) + _args, _kwargs) + return val + def GetStyle(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetStyle,(self,) + _args, _kwargs) + return val + def Write(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Write,(self,) + _args, _kwargs) + return val + def WriteInt(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_WriteInt,(self,) + _args, _kwargs) + return val + def WriteFloat(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_WriteFloat,(self,) + _args, _kwargs) + return val + def GetEntryType(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_GetEntryType,(self,) + _args, _kwargs) + return val + def RenameEntry(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_RenameEntry,(self,) + _args, _kwargs) + return val + def RenameGroup(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_RenameGroup,(self,) + _args, _kwargs) + return val + def ExpandEnvVars(self, *_args, **_kwargs): + val = apply(utilsc.wxConfigBase_ExpandEnvVars,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxConfigBase(wxConfigBasePtr): + def __init__(self,this): + self.this = this + + + + +class wxConfigPtr(wxConfigBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxConfig(self) + def __repr__(self): + return "" % (self.this,) +class wxConfig(wxConfigPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxConfig,_args,_kwargs) + self.thisown = 1 + + + + +class wxFileConfigPtr(wxConfigBasePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxFileConfig(self) + def __repr__(self): + return "" % (self.this,) +class wxFileConfig(wxFileConfigPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxFileConfig,_args,_kwargs) + self.thisown = 1 + + + + +class wxDateTimePtr : + Local = utilsc.wxDateTime_Local + GMT_12 = utilsc.wxDateTime_GMT_12 + GMT_11 = utilsc.wxDateTime_GMT_11 + GMT_10 = utilsc.wxDateTime_GMT_10 + GMT_9 = utilsc.wxDateTime_GMT_9 + GMT_8 = utilsc.wxDateTime_GMT_8 + GMT_7 = utilsc.wxDateTime_GMT_7 + GMT_6 = utilsc.wxDateTime_GMT_6 + GMT_5 = utilsc.wxDateTime_GMT_5 + GMT_4 = utilsc.wxDateTime_GMT_4 + GMT_3 = utilsc.wxDateTime_GMT_3 + GMT_2 = utilsc.wxDateTime_GMT_2 + GMT_1 = utilsc.wxDateTime_GMT_1 + GMT0 = utilsc.wxDateTime_GMT0 + GMT1 = utilsc.wxDateTime_GMT1 + GMT2 = utilsc.wxDateTime_GMT2 + GMT3 = utilsc.wxDateTime_GMT3 + GMT4 = utilsc.wxDateTime_GMT4 + GMT5 = utilsc.wxDateTime_GMT5 + GMT6 = utilsc.wxDateTime_GMT6 + GMT7 = utilsc.wxDateTime_GMT7 + GMT8 = utilsc.wxDateTime_GMT8 + GMT9 = utilsc.wxDateTime_GMT9 + GMT10 = utilsc.wxDateTime_GMT10 + GMT11 = utilsc.wxDateTime_GMT11 + GMT12 = utilsc.wxDateTime_GMT12 + WET = utilsc.wxDateTime_WET + WEST = utilsc.wxDateTime_WEST + CET = utilsc.wxDateTime_CET + CEST = utilsc.wxDateTime_CEST + EET = utilsc.wxDateTime_EET + EEST = utilsc.wxDateTime_EEST + MSK = utilsc.wxDateTime_MSK + MSD = utilsc.wxDateTime_MSD + AST = utilsc.wxDateTime_AST + ADT = utilsc.wxDateTime_ADT + EST = utilsc.wxDateTime_EST + EDT = utilsc.wxDateTime_EDT + CST = utilsc.wxDateTime_CST + CDT = utilsc.wxDateTime_CDT + MST = utilsc.wxDateTime_MST + MDT = utilsc.wxDateTime_MDT + PST = utilsc.wxDateTime_PST + PDT = utilsc.wxDateTime_PDT + HST = utilsc.wxDateTime_HST + AKST = utilsc.wxDateTime_AKST + AKDT = utilsc.wxDateTime_AKDT + A_WST = utilsc.wxDateTime_A_WST + A_CST = utilsc.wxDateTime_A_CST + A_EST = utilsc.wxDateTime_A_EST + A_ESST = utilsc.wxDateTime_A_ESST + UTC = utilsc.wxDateTime_UTC + Gregorian = utilsc.wxDateTime_Gregorian + Julian = utilsc.wxDateTime_Julian + Country_Unknown = utilsc.wxDateTime_Country_Unknown + Country_Default = utilsc.wxDateTime_Country_Default + Country_WesternEurope_Start = utilsc.wxDateTime_Country_WesternEurope_Start + Country_EEC = utilsc.wxDateTime_Country_EEC + France = utilsc.wxDateTime_France + Germany = utilsc.wxDateTime_Germany + UK = utilsc.wxDateTime_UK + Country_WesternEurope_End = utilsc.wxDateTime_Country_WesternEurope_End + Russia = utilsc.wxDateTime_Russia + USA = utilsc.wxDateTime_USA + Jan = utilsc.wxDateTime_Jan + Feb = utilsc.wxDateTime_Feb + Mar = utilsc.wxDateTime_Mar + Apr = utilsc.wxDateTime_Apr + May = utilsc.wxDateTime_May + Jun = utilsc.wxDateTime_Jun + Jul = utilsc.wxDateTime_Jul + Aug = utilsc.wxDateTime_Aug + Sep = utilsc.wxDateTime_Sep + Oct = utilsc.wxDateTime_Oct + Nov = utilsc.wxDateTime_Nov + Dec = utilsc.wxDateTime_Dec + Inv_Month = utilsc.wxDateTime_Inv_Month + Sun = utilsc.wxDateTime_Sun + Mon = utilsc.wxDateTime_Mon + Tue = utilsc.wxDateTime_Tue + Wed = utilsc.wxDateTime_Wed + Thu = utilsc.wxDateTime_Thu + Fri = utilsc.wxDateTime_Fri + Sat = utilsc.wxDateTime_Sat + Inv_WeekDay = utilsc.wxDateTime_Inv_WeekDay + Inv_Year = utilsc.wxDateTime_Inv_Year + Name_Full = utilsc.wxDateTime_Name_Full + Name_Abbr = utilsc.wxDateTime_Name_Abbr + Default_First = utilsc.wxDateTime_Default_First + Monday_First = utilsc.wxDateTime_Monday_First + Sunday_First = utilsc.wxDateTime_Sunday_First + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxDateTime(self) + def SetToCurrent(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToCurrent,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetTimeT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetTimeT,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetJDN(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetJDN,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetHMS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetHMS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def Set(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_Set,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def ResetTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ResetTime,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetYear,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetMonth(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetMonth,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetHour(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetHour,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetMinute(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetMinute,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetSecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetSecond,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetMillisecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetMillisecond,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SetToWeekDayInSameWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToWeekDayInSameWeek,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetWeekDayInSameWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekDayInSameWeek,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToNextWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToNextWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetNextWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetNextWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToPrevWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToPrevWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetPrevWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetPrevWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToWeekDay,(self,) + _args, _kwargs) + return val + def GetWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToLastWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToLastWeekDay,(self,) + _args, _kwargs) + return val + def GetLastWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetLastWeekDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToTheWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToTheWeek,(self,) + _args, _kwargs) + return val + def GetWeek(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeek,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToLastMonthDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToLastMonthDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetLastMonthDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetLastMonthDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def SetToYearDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SetToYearDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def GetYearDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetYearDay,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def GetJulianDayNumber(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetJulianDayNumber,(self,) + _args, _kwargs) + return val + def GetJDN(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetJDN,(self,) + _args, _kwargs) + return val + def GetModifiedJulianDayNumber(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetModifiedJulianDayNumber,(self,) + _args, _kwargs) + return val + def GetMJD(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMJD,(self,) + _args, _kwargs) + return val + def GetRataDie(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetRataDie,(self,) + _args, _kwargs) + return val + def ToTimezone(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ToTimezone,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def MakeTimezone(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_MakeTimezone,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def ToGMT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ToGMT,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def MakeGMT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_MakeGMT,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def IsDST(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsDST,(self,) + _args, _kwargs) + return val + def IsValid(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsValid,(self,) + _args, _kwargs) + return val + def GetTicks(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetTicks,(self,) + _args, _kwargs) + return val + def GetYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetYear,(self,) + _args, _kwargs) + return val + def GetMonth(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMonth,(self,) + _args, _kwargs) + return val + def GetDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetDay,(self,) + _args, _kwargs) + return val + def GetHour(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetHour,(self,) + _args, _kwargs) + return val + def GetMinute(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMinute,(self,) + _args, _kwargs) + return val + def GetSecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetSecond,(self,) + _args, _kwargs) + return val + def GetMillisecond(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetMillisecond,(self,) + _args, _kwargs) + return val + def GetDayOfYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetDayOfYear,(self,) + _args, _kwargs) + return val + def GetWeekOfYear(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekOfYear,(self,) + _args, _kwargs) + return val + def GetWeekOfMonth(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekOfMonth,(self,) + _args, _kwargs) + return val + def IsWorkDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsWorkDay,(self,) + _args, _kwargs) + return val + def IsEqualTo(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsEqualTo,(self,) + _args, _kwargs) + return val + def IsEarlierThan(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsEarlierThan,(self,) + _args, _kwargs) + return val + def IsLaterThan(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsLaterThan,(self,) + _args, _kwargs) + return val + def IsStrictlyBetween(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsStrictlyBetween,(self,) + _args, _kwargs) + return val + def IsBetween(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsBetween,(self,) + _args, _kwargs) + return val + def IsSameDate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsSameDate,(self,) + _args, _kwargs) + return val + def IsSameTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsSameTime,(self,) + _args, _kwargs) + return val + def IsEqualUpTo(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_IsEqualUpTo,(self,) + _args, _kwargs) + return val + def AddTS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_AddTS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def AddDS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_AddDS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SubtractTS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SubtractTS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def SubtractDS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_SubtractDS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_Subtract,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __add__TS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___add__TS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __add__DS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___add__DS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __sub__DT(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___sub__DT,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __sub__TS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___sub__TS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __sub__DS(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___sub__DS,(self,) + _args, _kwargs) + if val: val = wxDateTimePtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime___cmp__,(self,) + _args, _kwargs) + return val + def ParseRfc822Date(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseRfc822Date,(self,) + _args, _kwargs) + return val + def ParseFormat(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseFormat,(self,) + _args, _kwargs) + return val + def ParseDateTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseDateTime,(self,) + _args, _kwargs) + return val + def ParseDate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseDate,(self,) + _args, _kwargs) + return val + def ParseTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_ParseTime,(self,) + _args, _kwargs) + return val + def Format(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_Format,(self,) + _args, _kwargs) + return val + def FormatDate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatDate,(self,) + _args, _kwargs) + return val + def FormatTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatTime,(self,) + _args, _kwargs) + return val + def FormatISODate(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatISODate,(self,) + _args, _kwargs) + return val + def FormatISOTime(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_FormatISOTime,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) + + def __add__(self, other): + if string.find(other.this, 'wxTimeSpan') != -1: + return self.__add__TS(other) + if string.find(other.this, 'wxDateSpan') != -1: + return self.__add__DS(other) + raise TypeError, 'Invalid r.h.s. type for __add__' + def __sub__(self, other): + if string.find(other.this, 'wxDateTime') != -1: + return self.__sub__DT(other) + if string.find(other.this, 'wxTimeSpan') != -1: + return self.__sub__TS(other) + if string.find(other.this, 'wxDateSpan') != -1: + return self.__sub__DS(other) + raise TypeError, 'Invalid r.h.s. type for __sub__' + + + def __repr__(self): + return '' % ( self.Format(), self.this) + def __str__(self): + return self.Format() + +class wxDateTime(wxDateTimePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxDateTime,_args,_kwargs) + self.thisown = 1 + + + +def wxDateTimeFromTimeT(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromTimeT,_args,_kwargs)) + val.thisown = 1 + return val + +def wxDateTimeFromJDN(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromJDN,_args,_kwargs)) + val.thisown = 1 + return val + +def wxDateTimeFromHMS(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromHMS,_args,_kwargs)) + val.thisown = 1 + return val + +def wxDateTimeFromDMY(*_args,**_kwargs): + val = wxDateTimePtr(apply(utilsc.new_wxDateTimeFromDMY,_args,_kwargs)) + val.thisown = 1 + return val + + +class wxTimeSpanPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxTimeSpan(self) + def Add(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Add,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Subtract,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Multiply(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Multiply,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Neg(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Neg,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) + return val + def Abs(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Abs,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __add__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___add__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___sub__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __mul__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___mul__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __rmul__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___rmul__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __neg__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___neg__,(self,) + _args, _kwargs) + if val: val = wxTimeSpanPtr(val) ; val.thisown = 1 + return val + def __cmp__(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan___cmp__,(self,) + _args, _kwargs) + return val + def IsNull(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsNull,(self,) + _args, _kwargs) + return val + def IsPositive(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsPositive,(self,) + _args, _kwargs) + return val + def IsNegative(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsNegative,(self,) + _args, _kwargs) + return val + def IsEqualTo(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsEqualTo,(self,) + _args, _kwargs) + return val + def IsLongerThan(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsLongerThan,(self,) + _args, _kwargs) + return val + def IsShorterThan(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_IsShorterThan,(self,) + _args, _kwargs) + return val + def GetWeeks(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetWeeks,(self,) + _args, _kwargs) + return val + def GetDays(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetDays,(self,) + _args, _kwargs) + return val + def GetHours(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetHours,(self,) + _args, _kwargs) + return val + def GetMinutes(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetMinutes,(self,) + _args, _kwargs) + return val + def GetSeconds(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetSeconds,(self,) + _args, _kwargs) + return val + def GetMilliseconds(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_GetMilliseconds,(self,) + _args, _kwargs) + return val + def Format(self, *_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Format,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxTimeSpan(wxTimeSpanPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxTimeSpan,_args,_kwargs) + self.thisown = 1 + + + + +class wxDateSpanPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,utilsc=utilsc): + if self.thisown == 1 : + utilsc.delete_wxDateSpan(self) + def SetYears(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetYears,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def SetMonths(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetMonths,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def SetWeeks(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetWeeks,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def SetDays(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_SetDays,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def GetYears(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetYears,(self,) + _args, _kwargs) + return val + def GetMonths(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetMonths,(self,) + _args, _kwargs) + return val + def GetWeeks(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetWeeks,(self,) + _args, _kwargs) + return val + def GetDays(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetDays,(self,) + _args, _kwargs) + return val + def GetTotalDays(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_GetTotalDays,(self,) + _args, _kwargs) + return val + def Add(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Add,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Subtract,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def Neg(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Neg,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def Multiply(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Multiply,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) + return val + def __add__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___add__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __sub__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___sub__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __mul__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___mul__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __rmul__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___rmul__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __neg__(self, *_args, **_kwargs): + val = apply(utilsc.wxDateSpan___neg__,(self,) + _args, _kwargs) + if val: val = wxDateSpanPtr(val) ; val.thisown = 1 + return val + def __repr__(self): + return "" % (self.this,) +class wxDateSpan(wxDateSpanPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(utilsc.new_wxDateSpan,_args,_kwargs) + self.thisown = 1 + + + + + + +#-------------- FUNCTION WRAPPERS ------------------ + +wxGetLocalTime = utilsc.wxGetLocalTime + +wxGetUTCTime = utilsc.wxGetUTCTime + +wxGetCurrentTime = utilsc.wxGetCurrentTime + +wxGetLocalTimeMillis = utilsc.wxGetLocalTimeMillis + +def wxConfigBase_Set(*_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Set,_args,_kwargs) + if val: val = wxConfigBasePtr(val) + return val + +def wxConfigBase_Get(*_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Get,_args,_kwargs) + if val: val = wxConfigBasePtr(val) + return val + +def wxConfigBase_Create(*_args, **_kwargs): + val = apply(utilsc.wxConfigBase_Create,_args,_kwargs) + if val: val = wxConfigBasePtr(val) + return val + +wxConfigBase_DontCreateOnDemand = utilsc.wxConfigBase_DontCreateOnDemand + +wxDateTime_SetCountry = utilsc.wxDateTime_SetCountry + +wxDateTime_GetCountry = utilsc.wxDateTime_GetCountry + +wxDateTime_IsWestEuropeanCountry = utilsc.wxDateTime_IsWestEuropeanCountry + +wxDateTime_GetCurrentYear = utilsc.wxDateTime_GetCurrentYear + +wxDateTime_ConvertYearToBC = utilsc.wxDateTime_ConvertYearToBC + +wxDateTime_GetCurrentMonth = utilsc.wxDateTime_GetCurrentMonth + +wxDateTime_IsLeapYear = utilsc.wxDateTime_IsLeapYear + +wxDateTime_GetCentury = utilsc.wxDateTime_GetCentury + +wxDateTime_GetNumberOfDaysinYear = utilsc.wxDateTime_GetNumberOfDaysinYear + +wxDateTime_GetNumberOfDaysInMonth = utilsc.wxDateTime_GetNumberOfDaysInMonth + +wxDateTime_GetMonthName = utilsc.wxDateTime_GetMonthName + +wxDateTime_GetWeekDayName = utilsc.wxDateTime_GetWeekDayName + +wxDateTime_GetAmPmStrings = utilsc.wxDateTime_GetAmPmStrings + +wxDateTime_IsDSTApplicable = utilsc.wxDateTime_IsDSTApplicable + +def wxDateTime_GetBeginDST(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetBeginDST,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxDateTime_GetEndDST(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetEndDST,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxDateTime_Now(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_Now,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxDateTime_Today(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_Today,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Seconds(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Seconds,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Second(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Second,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Minutes(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Minutes,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Minute(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Minute,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Hours(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Hours,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Hour(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Hour,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Days(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Days,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Day(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Day,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Weeks(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Weeks,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxTimeSpan_Week(*_args, **_kwargs): + val = apply(utilsc.wxTimeSpan_Week,_args,_kwargs) + if val: val = wxTimeSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Days(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Days,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Day(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Day,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Weeks(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Weeks,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Week(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Week,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Months(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Months,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Month(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Month,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Years(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Years,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + +def wxDateSpan_Year(*_args, **_kwargs): + val = apply(utilsc.wxDateSpan_Year,_args,_kwargs) + if val: val = wxDateSpanPtr(val); val.thisown = 1 + return val + + + +#-------------- VARIABLE WRAPPERS ------------------ + +wxCONFIG_USE_LOCAL_FILE = utilsc.wxCONFIG_USE_LOCAL_FILE +wxCONFIG_USE_GLOBAL_FILE = utilsc.wxCONFIG_USE_GLOBAL_FILE +wxCONFIG_USE_RELATIVE_PATH = utilsc.wxCONFIG_USE_RELATIVE_PATH diff --git a/utils/wxPython/src/gtk/windows.cpp b/wxPython/src/msw/windows.cpp similarity index 91% rename from utils/wxPython/src/gtk/windows.cpp rename to wxPython/src/msw/windows.cpp index 577aba3b96..9c913b5b8a 100644 --- a/utils/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -1,9 +1,9 @@ /* - * FILE : gtk/windows.cpp + * FILE : src/msw/windows.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,7 +60,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -105,6 +106,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "string type is required for parameter"; + static wxString wxPyEmptyStr(""); + bool wxValidator_IsSilent() { return wxValidator::IsSilent(); } @@ -131,7 +134,10 @@ public: if (self->m_myInst.findCallback("Clone")) { PyObject* ro; ro = self->m_myInst.callCallbackObj(Py_BuildValue("()")); - SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p"); + if (ro) { + SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p"); + Py_DECREF(ro); + } } // This is very dangerous!!! But is the only way I could find // to squash a memory leak. Currently it is okay, but if the @@ -158,6 +164,17 @@ IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); + wxWindow* wxWindow_FindFocus() { + return wxWindow::FindFocus(); + } + +wxWindow* wxWindow_FromHWND(unsigned long hWnd) { + wxWindow* win = new wxWindow; + win->SetHWND(hWnd); + win->SubclassWin(hWnd); + return win; +} + int wxWindow_NewControlId() { return wxWindow::NewControlId(); } @@ -205,6 +222,55 @@ static PyObject *_wrap_wxValidator_SetBellOnError(PyObject *self, PyObject *args return _resultobj; } +static PyObject *_wrap_wxWindow_FindFocus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_FindFocus",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxWindow_FindFocus(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + unsigned long _arg0; + char *_kwnames[] = { "hWnd", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxWindow_FromHWND",_kwnames,&_arg0)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxWindow *)wxWindow_FromHWND(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; @@ -258,6 +324,31 @@ static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, Py return _resultobj; } +#define new_wxEvtHandler() (new wxEvtHandler()) +static PyObject *_wrap_new_wxEvtHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxEvtHandler",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxEvtHandler *)new_wxEvtHandler(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxEvtHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxEvtHandler_ProcessEvent(_swigobj,_swigarg0) (_swigobj->ProcessEvent(_swigarg0)) static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -294,6 +385,42 @@ static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, return _resultobj; } +#define wxEvtHandler_AddPendingEvent(_swigobj,_swigarg0) (_swigobj->AddPendingEvent(_swigarg0)) +static PyObject *_wrap_wxEvtHandler_AddPendingEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvtHandler * _arg0; + wxEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxEvtHandler_AddPendingEvent",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler_AddPendingEvent. Expected _wxEvtHandler_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxEvtHandler_AddPendingEvent. Expected _wxEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxEvtHandler_AddPendingEvent(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxEvtHandler_GetEvtHandlerEnabled(_swigobj) (_swigobj->GetEvtHandlerEnabled()) static PyObject *_wrap_wxEvtHandler_GetEvtHandlerEnabled(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -771,18 +898,20 @@ static PyObject *_wrap_wxPyValidator_Destroy(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxPyValidator__setSelf(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setSelf(_swigarg0,_swigarg1)) +#define wxPyValidator__setSelf(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->_setSelf(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyValidator * _arg0; PyObject * _arg1; - int _arg2 = (int ) TRUE; + PyObject * _arg2; + int _arg3 = (int ) TRUE; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","self","incref", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class","incref", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyValidator__setSelf",_kwnames,&_argo0,&_obj1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|i:wxPyValidator__setSelf",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -794,9 +923,12 @@ static PyObject *_wrap_wxPyValidator__setSelf(PyObject *self, PyObject *args, Py { _arg1 = _obj1; } +{ + _arg2 = _obj2; +} { wxPy_BEGIN_ALLOW_THREADS; - wxPyValidator__setSelf(_arg0,_arg1,_arg2); + wxPyValidator__setSelf(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -818,8 +950,8 @@ static PyObject *_wrap_new_wxWindow(PyObject *self, PyObject *args, PyObject *kw wxWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "panel"; PyObject * _argo0 = 0; @@ -1006,6 +1138,62 @@ static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args, P return _resultobj; } +#define wxWindow_CentreOnScreen(_swigobj,_swigarg0) (_swigobj->CentreOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CentreOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CentreOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CentreOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CentreOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_CenterOnScreen(_swigobj,_swigarg0) (_swigobj->CenterOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CenterOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CenterOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CenterOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CenterOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_ClientToScreenXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->ClientToScreen(_swigarg0,_swigarg1)) static PyObject *_wrap_wxWindow_ClientToScreenXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1176,6 +1364,36 @@ static PyObject *_wrap_wxWindow_DestroyChildren(PyObject *self, PyObject *args, return _resultobj; } +#define wxWindow_DragAcceptFiles(_swigobj,_swigarg0) (_swigobj->DragAcceptFiles(_swigarg0)) +static PyObject *_wrap_wxWindow_DragAcceptFiles(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","accept", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_DragAcceptFiles",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_DragAcceptFiles. Expected _wxWindow_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_DragAcceptFiles(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1263,11 +1481,22 @@ static PyObject *_wrap_wxWindow_FindWindowByName(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1780,11 +2009,22 @@ static PyObject *_wrap_wxWindow_SetLabel(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2161,11 +2401,22 @@ static PyObject *_wrap_wxWindow_GetTextExtent(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -2233,11 +2484,22 @@ static PyObject *_wrap_wxWindow_GetFullTextExtent(PyObject *self, PyObject *args } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } if (_argo6) { if (_argo6 == Py_None) { _arg6 = NULL; } @@ -2368,6 +2630,62 @@ static PyObject *_wrap_wxWindow_GetWindowStyleFlag(PyObject *self, PyObject *arg return _resultobj; } +#define wxWindow_SetWindowStyleFlag(_swigobj,_swigarg0) (_swigobj->SetWindowStyleFlag(_swigarg0)) +static PyObject *_wrap_wxWindow_SetWindowStyleFlag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxWindow_SetWindowStyleFlag",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetWindowStyleFlag. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_SetWindowStyleFlag(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_SetWindowStyle(_swigobj,_swigarg0) (_swigobj->SetWindowStyle(_swigarg0)) +static PyObject *_wrap_wxWindow_SetWindowStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxWindow_SetWindowStyle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetWindowStyle. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_SetWindowStyle(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_Hide(_swigobj) (_swigobj->Hide()) static PyObject *_wrap_wxWindow_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2690,11 +3008,22 @@ static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -3382,11 +3711,12 @@ static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *ar wxWindow * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetBackgroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetBackgroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3395,13 +3725,11 @@ static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetBackgroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxWindow_SetBackgroundColour(_arg0,*_arg1); @@ -3580,11 +3908,12 @@ static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *ar wxWindow * _arg0; wxColour * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; + wxColour temp; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetForegroundColour",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetForegroundColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3593,13 +3922,11 @@ static PyObject *_wrap_wxWindow_SetForegroundColour(PyObject *self, PyObject *ar return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetForegroundColour. Expected _wxColour_p."); +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) return NULL; - } - } +} { wxPy_BEGIN_ALLOW_THREADS; wxWindow_SetForegroundColour(_arg0,*_arg1); @@ -3658,11 +3985,22 @@ static PyObject *_wrap_wxWindow_SetName(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -3848,6 +4186,44 @@ static PyObject *_wrap_wxWindow_SetPosition(PyObject *self, PyObject *args, PyOb return _resultobj; } +static void wxWindow_SetRect(wxWindow *self,const wxRect & rect,int sizeFlags) { + self->SetSize(rect, sizeFlags); + } +static PyObject *_wrap_wxWindow_SetRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + wxRect * _arg1; + int _arg2 = (int ) wxSIZE_AUTO; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect","sizeFlags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxWindow_SetRect",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetRect. Expected _wxWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_SetRect(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_SetSizeHints(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetSizeHints(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4037,11 +4413,22 @@ static PyObject *_wrap_wxWindow_SetTitle(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4365,11 +4752,22 @@ static PyObject *_wrap_wxWindow_SetToolTipString(PyObject *self, PyObject *args, } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -4491,6 +4889,40 @@ static PyObject *_wrap_wxWindow_SetSizer(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxWindow_GetSizer(_swigobj) (_swigobj->GetSizer()) +static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetSizer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetSizer. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxSizer *)wxWindow_GetSizer(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizer_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxWindow_GetValidator(_swigobj) (_swigobj->GetValidator()) static PyObject *_wrap_wxWindow_GetValidator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4752,8 +5184,8 @@ static PyObject *_wrap_new_wxPanel(PyObject *self, PyObject *args, PyObject *kwa wxPanel * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxTAB_TRAVERSAL; char * _arg5 = (char *) "panel"; PyObject * _argo0 = 0; @@ -4929,8 +5361,8 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_DIALOG_STYLE; char * _arg6 = (char *) "dialogBox"; PyObject * _argo0 = 0; @@ -4953,11 +5385,22 @@ static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kw } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { @@ -5212,11 +5655,22 @@ static PyObject *_wrap_wxDialog_SetTitle(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -5374,8 +5828,8 @@ static PyObject *_wrap_new_wxScrolledWindow(PyObject *self, PyObject *args, PyOb wxScrolledWindow * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxHSCROLL|wxVSCROLL; char * _arg5 = (char *) "scrolledWindow"; PyObject * _argo0 = 0; @@ -5704,7 +6158,7 @@ static PyObject *_wrap_wxScrolledWindow_Scroll(PyObject *self, PyObject *args, P return _resultobj; } -#define wxScrolledWindow_SetScrollbars(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->SetScrollbars(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) +#define wxScrolledWindow_SetScrollbars(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->SetScrollbars(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxScrolledWindow * _arg0; @@ -5714,11 +6168,12 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject * int _arg4; int _arg5 = (int ) 0; int _arg6 = (int ) 0; + int _arg7 = (int ) FALSE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","pixelsPerUnitX","pixelsPerUnitY","noUnitsX","noUnitsY","xPos","yPos", NULL }; + char *_kwnames[] = { "self","pixelsPerUnitX","pixelsPerUnitY","noUnitsX","noUnitsY","xPos","yPos","noRefresh", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|ii:wxScrolledWindow_SetScrollbars",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|iii:wxScrolledWindow_SetScrollbars",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_arg7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5729,7 +6184,7 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6); + wxScrolledWindow_SetScrollbars(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -6017,11 +6472,22 @@ static PyObject *_wrap_new_wxMenu(PyObject *self, PyObject *args, PyObject *kwar return NULL; if (_obj0) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj0)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6066,19 +6532,41 @@ static PyObject *_wrap_wxMenu_Append(PyObject *self, PyObject *args, PyObject *k } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6123,11 +6611,22 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } @@ -6138,11 +6637,22 @@ static PyObject *_wrap_wxMenu_AppendMenu(PyObject *self, PyObject *args, PyObjec } if (_obj4) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg4 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj4)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4)); + _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6391,11 +6901,22 @@ static PyObject *_wrap_wxMenu_FindItem(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6497,11 +7018,22 @@ static PyObject *_wrap_wxMenu_SetTitle(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6571,11 +7103,22 @@ static PyObject *_wrap_wxMenu_SetLabel(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -6645,11 +7188,22 @@ static PyObject *_wrap_wxMenu_SetHelpString(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7310,19 +7864,20 @@ static void *SwigwxMenuBarTowxEvtHandler(void *ptr) { return (void *) dest; } -#define new_wxMenuBar() (new wxMenuBar()) +#define new_wxMenuBar(_swigarg0) (new wxMenuBar(_swigarg0)) static PyObject *_wrap_new_wxMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxMenuBar * _result; - char *_kwnames[] = { NULL }; + long _arg0 = (long ) 0; + char *_kwnames[] = { "style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMenuBar",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|l:new_wxMenuBar",_kwnames,&_arg0)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenuBar *)new_wxMenuBar(); + _result = (wxMenuBar *)new_wxMenuBar(_arg0); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -7365,11 +7920,22 @@ static PyObject *_wrap_wxMenuBar_Append(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7415,11 +7981,22 @@ static PyObject *_wrap_wxMenuBar_Insert(PyObject *self, PyObject *args, PyObject } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7528,11 +8105,22 @@ static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObjec } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7640,11 +8228,22 @@ static PyObject *_wrap_wxMenuBar_SetLabelTop(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7716,18 +8315,40 @@ static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7920,11 +8541,22 @@ static PyObject *_wrap_wxMenuBar_SetLabel(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -7994,11 +8626,22 @@ static PyObject *_wrap_wxMenuBar_SetHelpString(PyObject *self, PyObject *args, P } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8077,19 +8720,41 @@ static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject * } if (_obj2) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } if (_obj3) { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } _arg4 = (bool ) tempbool4; if (_argo5) { @@ -8258,11 +8923,22 @@ static PyObject *_wrap_wxMenuItem_SetText(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8655,11 +9331,22 @@ static PyObject *_wrap_wxMenuItem_SetHelp(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -8895,6 +9582,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetDropTarget", (PyCFunction) _wrap_wxWindow_SetDropTarget, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetValidator", (PyCFunction) _wrap_wxWindow_SetValidator, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetValidator", (PyCFunction) _wrap_wxWindow_GetValidator, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetSizer", (PyCFunction) _wrap_wxWindow_GetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSizer", (PyCFunction) _wrap_wxWindow_SetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetToolTip", (PyCFunction) _wrap_wxWindow_GetToolTip, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetToolTip", (PyCFunction) _wrap_wxWindow_SetToolTip, METH_VARARGS | METH_KEYWORDS }, @@ -8916,6 +9604,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetClientSize", (PyCFunction) _wrap_wxWindow_SetClientSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSizeWH", (PyCFunction) _wrap_wxWindow_SetClientSizeWH, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSizeHints", (PyCFunction) _wrap_wxWindow_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetRect", (PyCFunction) _wrap_wxWindow_SetRect, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetPosition", (PyCFunction) _wrap_wxWindow_SetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSize", (PyCFunction) _wrap_wxWindow_SetSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetDimensions", (PyCFunction) _wrap_wxWindow_SetDimensions, METH_VARARGS | METH_KEYWORDS }, @@ -8960,6 +9649,8 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_IsEnabled", (PyCFunction) _wrap_wxWindow_IsEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_InitDialog", (PyCFunction) _wrap_wxWindow_InitDialog, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Hide", (PyCFunction) _wrap_wxWindow_Hide, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetWindowStyle", (PyCFunction) _wrap_wxWindow_SetWindowStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetWindowStyleFlag", (PyCFunction) _wrap_wxWindow_SetWindowStyleFlag, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetWindowStyleFlag", (PyCFunction) _wrap_wxWindow_GetWindowStyleFlag, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetUpdateRegion", (PyCFunction) _wrap_wxWindow_GetUpdateRegion, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetTitle", (PyCFunction) _wrap_wxWindow_GetTitle, METH_VARARGS | METH_KEYWORDS }, @@ -8994,11 +9685,14 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_FindWindowByName", (PyCFunction) _wrap_wxWindow_FindWindowByName, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FindWindowById", (PyCFunction) _wrap_wxWindow_FindWindowById, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Enable", (PyCFunction) _wrap_wxWindow_Enable, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_DragAcceptFiles", (PyCFunction) _wrap_wxWindow_DragAcceptFiles, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_DestroyChildren", (PyCFunction) _wrap_wxWindow_DestroyChildren, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Destroy", (PyCFunction) _wrap_wxWindow_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Close", (PyCFunction) _wrap_wxWindow_Close, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreen", (PyCFunction) _wrap_wxWindow_ClientToScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreenXY", (PyCFunction) _wrap_wxWindow_ClientToScreenXY, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CenterOnScreen", (PyCFunction) _wrap_wxWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CentreOnScreen", (PyCFunction) _wrap_wxWindow_CentreOnScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CenterOnParent", (PyCFunction) _wrap_wxWindow_CenterOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CentreOnParent", (PyCFunction) _wrap_wxWindow_CentreOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Centre", (PyCFunction) _wrap_wxWindow_Centre, METH_VARARGS | METH_KEYWORDS }, @@ -9020,10 +9714,14 @@ static PyMethodDef windowscMethods[] = { { "wxEvtHandler_GetNextHandler", (PyCFunction) _wrap_wxEvtHandler_GetNextHandler, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_SetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_SetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_GetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_GetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS }, + { "wxEvtHandler_AddPendingEvent", (PyCFunction) _wrap_wxEvtHandler_AddPendingEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS }, + { "new_wxEvtHandler", (PyCFunction) _wrap_new_wxEvtHandler, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS }, { "wxValidator_IsSilent", (PyCFunction) _wrap_wxValidator_IsSilent, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } @@ -9047,6 +9745,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -9086,13 +9785,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxBitmapDataObject","_wxBitmapDataObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_class_wxMenuItem","_wxMenuItem",0}, - { "_class_wxPostScriptDC","_wxPostScriptDC",0}, { "_wxPanel","_class_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, { "_wxPanel","_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, { "_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel}, @@ -9109,15 +9808,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDataObjectSimple","_wxDataObjectSimple",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_wxRect","_class_wxRect",0}, { "_wxPoint","_class_wxPoint",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxValidator","_class_wxPyValidator",SwigwxPyValidatorTowxValidator}, @@ -9136,7 +9837,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_class_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, { "_class_wxPanel","_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, @@ -9149,6 +9849,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, + { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, { "_wxMenu","_class_wxMenu",0}, { "_wxScreenDC","_class_wxScreenDC",0}, @@ -9184,13 +9885,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, - { "_wxPostScriptDC","_class_wxPostScriptDC",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, { "_unsigned_char","_byte",0}, + { "_class_wxMetaFileDC","_wxMetaFileDC",0}, { "_class_wxMenu","_wxMenu",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -9206,6 +9908,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxImageList","_wxImageList",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -9214,12 +9917,20 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_unsigned_int",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, { "_int","_wxWindowID",0}, { "_int","_unsigned_int",0}, { "_int","_signed_int",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, @@ -9240,6 +9951,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_wxRegion","_class_wxRegion",0}, diff --git a/utils/wxPython/src/gtk/windows.py b/wxPython/src/msw/windows.py similarity index 94% rename from utils/wxPython/src/gtk/windows.py rename to wxPython/src/msw/windows.py index 9de0c886da..ce4c9259eb 100644 --- a/utils/wxPython/src/gtk/windows.py +++ b/wxPython/src/msw/windows.py @@ -27,6 +27,9 @@ class wxEvtHandlerPtr : def ProcessEvent(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_ProcessEvent,(self,) + _args, _kwargs) return val + def AddPendingEvent(self, *_args, **_kwargs): + val = apply(windowsc.wxEvtHandler_AddPendingEvent,(self,) + _args, _kwargs) + return val def GetEvtHandlerEnabled(self, *_args, **_kwargs): val = apply(windowsc.wxEvtHandler_GetEvtHandlerEnabled,(self,) + _args, _kwargs) return val @@ -55,9 +58,13 @@ class wxEvtHandlerPtr : return val def __repr__(self): return "" % (self.this,) + + _prop_list_ = {} + class wxEvtHandler(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windowsc.new_wxEvtHandler,_args,_kwargs) + self.thisown = 1 @@ -103,7 +110,7 @@ class wxPyValidator(wxPyValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPyValidator,_args,_kwargs) self.thisown = 1 - self._setSelf(self, 0) + self._setSelf(self, wxPyValidator, 0) @@ -127,6 +134,12 @@ class wxWindowPtr(wxEvtHandlerPtr): def CenterOnParent(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_CenterOnParent,(self,) + _args, _kwargs) return val + def CentreOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CentreOnScreen,(self,) + _args, _kwargs) + return val + def CenterOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CenterOnScreen,(self,) + _args, _kwargs) + return val def ClientToScreenXY(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_ClientToScreenXY,(self,) + _args, _kwargs) return val @@ -143,6 +156,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def DestroyChildren(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_DestroyChildren,(self,) + _args, _kwargs) return val + def DragAcceptFiles(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_DragAcceptFiles,(self,) + _args, _kwargs) + return val def Enable(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Enable,(self,) + _args, _kwargs) return val @@ -259,6 +275,12 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetWindowStyleFlag(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetWindowStyleFlag,(self,) + _args, _kwargs) return val + def SetWindowStyleFlag(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetWindowStyleFlag,(self,) + _args, _kwargs) + return val + def SetWindowStyle(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetWindowStyle,(self,) + _args, _kwargs) + return val def Hide(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Hide,(self,) + _args, _kwargs) return val @@ -393,6 +415,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetPosition(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetPosition,(self,) + _args, _kwargs) return val + def SetRect(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetRect,(self,) + _args, _kwargs) + return val def SetSizeHints(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizeHints,(self,) + _args, _kwargs) return val @@ -463,6 +488,10 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetSizer(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizer,(self,) + _args, _kwargs) return val + def GetSizer(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val def GetValidator(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetValidator,(self,) + _args, _kwargs) if val: val = wxValidatorPtr(val) @@ -491,18 +520,30 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - # replaces broken shadow method + # replaces broken shadow methods def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val + def GetSizer(self, *_args, **_kwargs): + from sizers import wxSizerPtr + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val + + def GetToolTip(self, *_args, **_kwargs): + from misc2 import wxToolTipPtr + val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) + if val: val = wxToolTipPtr(val) + return val + class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -534,7 +575,7 @@ class wxPanel(wxPanelPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxPanel,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -585,7 +626,7 @@ class wxDialog(wxDialogPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxDialog,_args,_kwargs) self.thisown = 1 - wx._StdDialogCallbacks(self) + #wx._StdDialogCallbacks(self) @@ -646,8 +687,8 @@ class wxScrolledWindow(wxScrolledWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxScrolledWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) - wx._StdOnScrollCallbacks(self) + #wx._StdWindowCallbacks(self) + #wx._StdOnScrollCallbacks(self) @@ -943,6 +984,16 @@ wxValidator_IsSilent = windowsc.wxValidator_IsSilent wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError +def wxWindow_FindFocus(*_args, **_kwargs): + val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + +def wxWindow_FromHWND(*_args, **_kwargs): + val = apply(windowsc.wxWindow_FromHWND,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + wxWindow_NewControlId = windowsc.wxWindow_NewControlId wxWindow_NextControlId = windowsc.wxWindow_NextControlId diff --git a/utils/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp similarity index 92% rename from utils/wxPython/src/msw/windows2.cpp rename to wxPython/src/msw/windows2.cpp index 7296f85b36..f03ef79f41 100644 --- a/utils/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/windows2.cpp + * FILE : src/msw/windows2.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -54,7 +56,9 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "windows2c" #include "helpers.h" +#ifdef OLD_GRID #include +#endif #include #include #ifdef __WXMSW__ @@ -63,7 +67,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -276,8 +279,8 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * wxNotebook * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; char * _arg5 = (char *) "notebook"; PyObject * _argo0 = 0; @@ -459,11 +462,22 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -665,6 +679,76 @@ static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxNotebook_SetPageSize(_swigobj,_swigarg0) (_swigobj->SetPageSize(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPageSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPageSize. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPageSize(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_SetPadding(_swigobj,_swigarg0) (_swigobj->SetPadding(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","padding", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetPadding",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetPadding. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxNotebook_SetPadding(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -780,11 +864,22 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -833,11 +928,22 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif } _arg4 = (bool ) tempbool4; { @@ -1099,8 +1205,8 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb wxSplitterWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN; char * _arg5 = (char *) "splitterWindow"; PyObject * _argo0 = 0; @@ -1888,7 +1994,63 @@ static PyObject *_wrap_wxTaskBarIcon_PopupMenu(PyObject *self, PyObject *args, P return _resultobj; } +#define wxTaskBarIcon_IsIconInstalled(_swigobj) (_swigobj->IsIconInstalled()) +static PyObject *_wrap_wxTaskBarIcon_IsIconInstalled(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTaskBarIcon * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTaskBarIcon_IsIconInstalled",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTaskBarIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTaskBarIcon_IsIconInstalled. Expected _wxTaskBarIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTaskBarIcon_IsIconInstalled(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTaskBarIcon_IsOK(_swigobj) (_swigobj->IsOK()) +static PyObject *_wrap_wxTaskBarIcon_IsOK(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTaskBarIcon * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTaskBarIcon_IsOK",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTaskBarIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTaskBarIcon_IsOK. Expected _wxTaskBarIcon_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTaskBarIcon_IsOK(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef windows2cMethods[] = { + { "wxTaskBarIcon_IsOK", (PyCFunction) _wrap_wxTaskBarIcon_IsOK, METH_VARARGS | METH_KEYWORDS }, + { "wxTaskBarIcon_IsIconInstalled", (PyCFunction) _wrap_wxTaskBarIcon_IsIconInstalled, METH_VARARGS | METH_KEYWORDS }, { "wxTaskBarIcon_PopupMenu", (PyCFunction) _wrap_wxTaskBarIcon_PopupMenu, METH_VARARGS | METH_KEYWORDS }, { "wxTaskBarIcon_RemoveIcon", (PyCFunction) _wrap_wxTaskBarIcon_RemoveIcon, METH_VARARGS | METH_KEYWORDS }, { "wxTaskBarIcon_SetIcon", (PyCFunction) _wrap_wxTaskBarIcon_SetIcon, METH_VARARGS | METH_KEYWORDS }, @@ -1925,6 +2087,8 @@ static PyMethodDef windows2cMethods[] = { { "wxNotebook_DeleteAllPages", (PyCFunction) _wrap_wxNotebook_DeleteAllPages, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_RemovePage", (PyCFunction) _wrap_wxNotebook_RemovePage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeletePage", (PyCFunction) _wrap_wxNotebook_DeletePage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPadding", (PyCFunction) _wrap_wxNotebook_SetPadding, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetPageSize", (PyCFunction) _wrap_wxNotebook_SetPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetRowCount", (PyCFunction) _wrap_wxNotebook_GetRowCount, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetPageImage", (PyCFunction) _wrap_wxNotebook_SetPageImage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPageImage", (PyCFunction) _wrap_wxNotebook_GetPageImage, METH_VARARGS | METH_KEYWORDS }, @@ -1970,7 +2134,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -1998,7 +2164,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -2013,13 +2178,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -2046,10 +2211,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, { "_class_wxEvent","_wxSplitterEvent",SwigwxSplitterEventTowxEvent}, @@ -2068,10 +2235,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, @@ -2100,16 +2269,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -2178,6 +2346,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2201,6 +2370,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2210,6 +2380,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -2220,11 +2391,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, @@ -2251,6 +2428,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -2285,8 +2463,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, @@ -2311,6 +2487,11 @@ SWIGEXPORT(void) initwindows2c() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("windows2c", windows2cMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxSPLIT_HORIZONTAL", PyInt_FromLong((long) wxSPLIT_HORIZONTAL)); + PyDict_SetItemString(d,"wxSPLIT_VERTICAL", PyInt_FromLong((long) wxSPLIT_VERTICAL)); + PyDict_SetItemString(d,"wxSPLIT_DRAG_NONE", PyInt_FromLong((long) wxSPLIT_DRAG_NONE)); + PyDict_SetItemString(d,"wxSPLIT_DRAG_DRAGGING", PyInt_FromLong((long) wxSPLIT_DRAG_DRAGGING)); + PyDict_SetItemString(d,"wxSPLIT_DRAG_LEFT_DOWN", PyInt_FromLong((long) wxSPLIT_DRAG_LEFT_DOWN)); PyDict_SetItemString(d,"wxEVT_TASKBAR_MOVE", PyInt_FromLong((long) wxEVT_TASKBAR_MOVE)); PyDict_SetItemString(d,"wxEVT_TASKBAR_LEFT_DOWN", PyInt_FromLong((long) wxEVT_TASKBAR_LEFT_DOWN)); PyDict_SetItemString(d,"wxEVT_TASKBAR_LEFT_UP", PyInt_FromLong((long) wxEVT_TASKBAR_LEFT_UP)); diff --git a/utils/wxPython/src/msw/windows2.py b/wxPython/src/msw/windows2.py similarity index 92% rename from utils/wxPython/src/msw/windows2.py rename to wxPython/src/msw/windows2.py index 7e1f51ca00..9b1c01ba96 100644 --- a/utils/wxPython/src/msw/windows2.py +++ b/wxPython/src/msw/windows2.py @@ -76,6 +76,12 @@ class wxNotebookPtr(wxControlPtr): def GetRowCount(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_GetRowCount,(self,) + _args, _kwargs) return val + def SetPageSize(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPageSize,(self,) + _args, _kwargs) + return val + def SetPadding(self, *_args, **_kwargs): + val = apply(windows2c.wxNotebook_SetPadding,(self,) + _args, _kwargs) + return val def DeletePage(self, *_args, **_kwargs): val = apply(windows2c.wxNotebook_DeletePage,(self,) + _args, _kwargs) return val @@ -104,7 +110,7 @@ class wxNotebook(wxNotebookPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows2c.new_wxNotebook,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -204,7 +210,7 @@ class wxSplitterWindow(wxSplitterWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows2c.new_wxSplitterWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -225,6 +231,12 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr): def PopupMenu(self, *_args, **_kwargs): val = apply(windows2c.wxTaskBarIcon_PopupMenu,(self,) + _args, _kwargs) return val + def IsIconInstalled(self, *_args, **_kwargs): + val = apply(windows2c.wxTaskBarIcon_IsIconInstalled,(self,) + _args, _kwargs) + return val + def IsOK(self, *_args, **_kwargs): + val = apply(windows2c.wxTaskBarIcon_IsOK,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxTaskBarIcon(wxTaskBarIconPtr): @@ -250,6 +262,11 @@ class wxTaskBarIcon(wxTaskBarIconPtr): #-------------- VARIABLE WRAPPERS ------------------ +wxSPLIT_HORIZONTAL = windows2c.wxSPLIT_HORIZONTAL +wxSPLIT_VERTICAL = windows2c.wxSPLIT_VERTICAL +wxSPLIT_DRAG_NONE = windows2c.wxSPLIT_DRAG_NONE +wxSPLIT_DRAG_DRAGGING = windows2c.wxSPLIT_DRAG_DRAGGING +wxSPLIT_DRAG_LEFT_DOWN = windows2c.wxSPLIT_DRAG_LEFT_DOWN wxEVT_TASKBAR_MOVE = windows2c.wxEVT_TASKBAR_MOVE wxEVT_TASKBAR_LEFT_DOWN = windows2c.wxEVT_TASKBAR_LEFT_DOWN wxEVT_TASKBAR_LEFT_UP = windows2c.wxEVT_TASKBAR_LEFT_UP diff --git a/utils/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp similarity index 98% rename from utils/wxPython/src/msw/windows3.cpp rename to wxPython/src/msw/windows3.cpp index 20c25df7ba..2710a673bb 100644 --- a/utils/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/windows3.cpp + * FILE : src/msw/windows3.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -59,7 +61,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -320,8 +321,8 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject wxSashWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); char * _arg5 = (char *) "sashWindow"; PyObject * _argo0 = 0; @@ -1294,8 +1295,8 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py wxSashLayoutWindow * _result; wxWindow * _arg0; wxWindowID _arg1; - wxPoint * _arg2 = (wxPoint *) &wxPyDefaultPosition; - wxSize * _arg3 = (wxSize *) &wxPyDefaultSize; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); char * _arg5 = (char *) "layoutWindow"; PyObject * _argo0 = 0; @@ -1756,7 +1757,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -1781,7 +1784,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxChoice","_class_wxChoice",0}, { "_wxSlider","_class_wxSlider",0}, { "_wxNotebookEvent","_class_wxNotebookEvent",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -1801,13 +1803,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, @@ -1841,10 +1843,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_class_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxEvent}, { "_class_wxEvent","_wxCalculateLayoutEvent",SwigwxCalculateLayoutEventTowxEvent}, @@ -1864,10 +1868,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, @@ -1899,7 +1905,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_wxDash",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, @@ -1907,9 +1912,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -1981,6 +1986,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -2008,6 +2014,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxNotebook","_wxNotebook",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -2017,6 +2024,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollWinEvent","_wxScrollWinEvent",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -2027,11 +2035,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, { "_wxButton","_class_wxButton",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_class_wxPaintDC","_wxPaintDC",0}, @@ -2058,6 +2072,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, @@ -2089,8 +2104,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_class_wxEvtHandler",0}, { "_wxMenuItem","_class_wxMenuItem",0}, { "_class_wxScrollBar","_wxScrollBar",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, @@ -2126,6 +2139,9 @@ SWIGEXPORT(void) initwindows3c() { PyDict_SetItemString(d,"wxSASH_NONE", PyInt_FromLong((long) wxSASH_NONE)); PyDict_SetItemString(d,"wxEVT_SASH_DRAGGED", PyInt_FromLong((long) wxEVT_SASH_DRAGGED)); PyDict_SetItemString(d,"wxSW_3D", PyInt_FromLong((long) wxSW_3D)); + PyDict_SetItemString(d,"wxSW_3DSASH", PyInt_FromLong((long) wxSW_3DSASH)); + PyDict_SetItemString(d,"wxSW_3DBORDER", PyInt_FromLong((long) wxSW_3DBORDER)); + PyDict_SetItemString(d,"wxSW_BORDER", PyInt_FromLong((long) wxSW_BORDER)); PyDict_SetItemString(d,"wxSASH_STATUS_OK", PyInt_FromLong((long) wxSASH_STATUS_OK)); PyDict_SetItemString(d,"wxSASH_STATUS_OUT_OF_RANGE", PyInt_FromLong((long) wxSASH_STATUS_OUT_OF_RANGE)); PyDict_SetItemString(d,"wxLAYOUT_HORIZONTAL", PyInt_FromLong((long) wxLAYOUT_HORIZONTAL)); diff --git a/utils/wxPython/src/msw/windows3.py b/wxPython/src/msw/windows3.py similarity index 96% rename from utils/wxPython/src/msw/windows3.py rename to wxPython/src/msw/windows3.py index bd38484999..7a6fd3ac16 100644 --- a/utils/wxPython/src/msw/windows3.py +++ b/wxPython/src/msw/windows3.py @@ -114,7 +114,7 @@ class wxSashWindow(wxSashWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) + #wx._StdWindowCallbacks(self) @@ -214,9 +214,9 @@ class wxSashLayoutWindow(wxSashLayoutWindowPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windows3c.new_wxSashLayoutWindow,_args,_kwargs) self.thisown = 1 - wx._StdWindowCallbacks(self) - wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT) - wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO) + #wx._StdWindowCallbacks(self) + #wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT) + #wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO) @@ -262,6 +262,9 @@ wxSASH_LEFT = windows3c.wxSASH_LEFT wxSASH_NONE = windows3c.wxSASH_NONE wxEVT_SASH_DRAGGED = windows3c.wxEVT_SASH_DRAGGED wxSW_3D = windows3c.wxSW_3D +wxSW_3DSASH = windows3c.wxSW_3DSASH +wxSW_3DBORDER = windows3c.wxSW_3DBORDER +wxSW_BORDER = windows3c.wxSW_BORDER wxSASH_STATUS_OK = windows3c.wxSASH_STATUS_OK wxSASH_STATUS_OUT_OF_RANGE = windows3c.wxSASH_STATUS_OUT_OF_RANGE wxLAYOUT_HORIZONTAL = windows3c.wxLAYOUT_HORIZONTAL diff --git a/utils/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp similarity index 91% rename from utils/wxPython/src/msw/wx.cpp rename to wxPython/src/msw/wx.cpp index 63748f6506..9adfed458e 100644 --- a/utils/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -1,9 +1,9 @@ /* - * FILE : msw/wx.cpp + * FILE : src/msw/wx.cpp * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Build 810) + * Version 1.1 (Build 883) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -57,7 +59,6 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - PyObject* o3; if (!target) { target = o; } else if (target == Py_None) { @@ -614,10 +615,16 @@ PyObject *ptrfree(PyObject *_PTRVALUE) { } + wxPyApp* wxGetApp() { + return wxPythonApp; + } + void wxApp_CleanUp() { __wxCleanup(); } + + extern "C" SWIGEXPORT(void) initwindowsc(); extern "C" SWIGEXPORT(void) initwindows2c(); extern "C" SWIGEXPORT(void) initeventsc(); @@ -635,6 +642,49 @@ extern "C" SWIGEXPORT(void) initimagec(); extern "C" SWIGEXPORT(void) initprintfwc(); extern "C" SWIGEXPORT(void) initsizersc(); extern "C" SWIGEXPORT(void) initclip_dndc(); +extern "C" SWIGEXPORT(void) initstreamsc(); +extern "C" SWIGEXPORT(void) initfilesysc(); + + + +// Export a C API in a struct. Other modules will be able to load this from +// the wxc module and will then have safe access to these functions, even if +// in another shared library. +static wxPyCoreAPI API = { + SWIG_MakePtr, + SWIG_GetPtr, + SWIG_GetPtrObj, + SWIG_RegisterMapping, + SWIG_addvarlink, + SWIG_newvarlink, + + wxPySaveThread, + wxPyRestoreThread, + wxPyConstructObject, + wxPy_ConvertList, + + byte_LIST_helper, + int_LIST_helper, + long_LIST_helper, + string_LIST_helper, + wxPoint_LIST_helper, + wxBitmap_LIST_helper, + wxString_LIST_helper, + wxAcceleratorEntry_LIST_helper, + + wxSize_helper, + wxPoint_helper, + wxRealPoint_helper, + wxRect_helper, + wxColour_helper, + + wxPyCBH_setSelf, + wxPyCBH_findCallback, + wxPyCBH_callCallback, + wxPyCBH_callCallbackObj, + wxPyCBH_delete, +}; + #ifdef __cplusplus extern "C" { #endif @@ -815,52 +865,60 @@ static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static int _wrap_wxPyDefaultPosition_set(PyObject *val) { - wxPoint * temp; +static int _wrap_wxDefaultPosition_set(PyObject *val) { - if (val) { - if (val == Py_None) { temp = NULL; } - else if (SWIG_GetPtrObj(val,(void **) &temp,"_wxPoint_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in value of wxPyDefaultPosition. Expected _wxPoint_p."); - return 1; - } - } - wxPyDefaultPosition = *temp; - return 0; + PyErr_SetString(PyExc_TypeError,"Variable wxDefaultPosition is read-only."); + return 1; } -static PyObject *_wrap_wxPyDefaultPosition_get() { +static PyObject *_wrap_wxDefaultPosition_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultPosition,"_wxPoint_p"); + SWIG_MakePtr(ptemp,(char *) &wxDefaultPosition,"_wxPoint_p"); pyobj = PyString_FromString(ptemp); return pyobj; } -static int _wrap_wxPyDefaultSize_set(PyObject *val) { - wxSize * temp; +static int _wrap_wxDefaultSize_set(PyObject *val) { - if (val) { - if (val == Py_None) { temp = NULL; } - else if (SWIG_GetPtrObj(val,(void **) &temp,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in value of wxPyDefaultSize. Expected _wxSize_p."); - return 1; - } - } - wxPyDefaultSize = *temp; - return 0; + PyErr_SetString(PyExc_TypeError,"Variable wxDefaultSize is read-only."); + return 1; } -static PyObject *_wrap_wxPyDefaultSize_get() { +static PyObject *_wrap_wxDefaultSize_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp,(char *) &wxPyDefaultSize,"_wxSize_p"); + SWIG_MakePtr(ptemp,(char *) &wxDefaultSize,"_wxSize_p"); pyobj = PyString_FromString(ptemp); return pyobj; } +static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetApp",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyApp *)wxGetApp(); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxApp_CleanUp(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; char *_kwnames[] = { NULL }; @@ -1153,6 +1211,33 @@ static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxPyApp_GetUseBestVisual(_swigobj) (_swigobj->GetUseBestVisual()) +static PyObject *_wrap_wxPyApp_GetUseBestVisual(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyApp * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyApp_GetUseBestVisual",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetUseBestVisual. Expected _wxPyApp_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxPyApp_GetUseBestVisual(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPyApp_Dispatch(_swigobj) (_swigobj->Dispatch()) static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1335,11 +1420,22 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args, PyObje } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1405,11 +1501,22 @@ static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args, PyOb } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1539,11 +1646,22 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO } } { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif } { wxPy_BEGIN_ALLOW_THREADS; @@ -1559,6 +1677,36 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxPyApp_SetUseBestVisual(_swigobj,_swigarg0) (_swigobj->SetUseBestVisual(_swigarg0)) +static PyObject *_wrap_wxPyApp_SetUseBestVisual(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","flag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyApp_SetUseBestVisual",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetUseBestVisual. Expected _wxPyApp_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyApp_SetUseBestVisual(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxPyApp_GetStdIcon(_swigobj,_swigarg0) (_swigobj->GetStdIcon(_swigarg0)) static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1591,6 +1739,7 @@ static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObje static PyMethodDef wxcMethods[] = { { "wxPyApp_GetStdIcon", (PyCFunction) _wrap_wxPyApp_GetStdIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetUseBestVisual", (PyCFunction) _wrap_wxPyApp_SetUseBestVisual, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetVendorName", (PyCFunction) _wrap_wxPyApp_SetVendorName, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetTopWindow", (PyCFunction) _wrap_wxPyApp_SetTopWindow, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetPrintMode", (PyCFunction) _wrap_wxPyApp_SetPrintMode, METH_VARARGS | METH_KEYWORDS }, @@ -1604,6 +1753,7 @@ static PyMethodDef wxcMethods[] = { { "wxPyApp_Initialized", (PyCFunction) _wrap_wxPyApp_Initialized, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_ExitMainLoop", (PyCFunction) _wrap_wxPyApp_ExitMainLoop, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_Dispatch", (PyCFunction) _wrap_wxPyApp_Dispatch, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetUseBestVisual", (PyCFunction) _wrap_wxPyApp_GetUseBestVisual, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetVendorName", (PyCFunction) _wrap_wxPyApp_GetVendorName, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetTopWindow", (PyCFunction) _wrap_wxPyApp_GetTopWindow, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetPrintMode", (PyCFunction) _wrap_wxPyApp_GetPrintMode, METH_VARARGS | METH_KEYWORDS }, @@ -1614,6 +1764,7 @@ static PyMethodDef wxcMethods[] = { { "delete_wxPyApp", (PyCFunction) _wrap_delete_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyApp", (PyCFunction) _wrap_new_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "wxApp_CleanUp", (PyCFunction) _wrap_wxApp_CleanUp, METH_VARARGS | METH_KEYWORDS }, + { "wxGetApp", (PyCFunction) _wrap_wxGetApp, METH_VARARGS | METH_KEYWORDS }, { "_wxSetDictionary", (PyCFunction) __wxSetDictionary, METH_VARARGS | METH_KEYWORDS }, { "_wxStart", (PyCFunction) __wxStart, METH_VARARGS | METH_KEYWORDS }, { "ptrmap", (PyCFunction) _wrap_ptrmap, METH_VARARGS | METH_KEYWORDS }, @@ -1637,12 +1788,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxActivateEvent","_wxActivateEvent",0}, { "_signed_long","_long",0}, { "_wxMenuEvent","_class_wxMenuEvent",0}, + { "_class_wxProcessEvent","_wxProcessEvent",0}, { "_class_wxJPEGHandler","_wxJPEGHandler",0}, + { "_class_wxFSFile","_wxFSFile",0}, { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0}, { "_wxBitmapDataObject","_class_wxBitmapDataObject",0}, { "_class_wxPyCommandEvent","_wxPyCommandEvent",0}, { "_wxBMPHandler","_class_wxBMPHandler",0}, { "_wxImage","_class_wxImage",0}, + { "_wxFlexGridSizer","_class_wxFlexGridSizer",0}, + { "_wxWindowDisabler","_class_wxWindowDisabler",0}, + { "_class_wxDateTime","_wxDateTime",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -1651,7 +1807,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_uint",0}, { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, + { "_wxPrintQuality","_time_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -1664,12 +1822,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPaintEvent","_class_wxPaintEvent",0}, { "_wxGIFHandler","_class_wxGIFHandler",0}, { "_wxPySizer","_class_wxPySizer",0}, + { "_wxInternetFSHandler","_class_wxInternetFSHandler",0}, { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_wxCursor","_class_wxCursor",0}, { "_wxNotifyEvent","_class_wxNotifyEvent",0}, + { "_wxPyProcess","_class_wxPyProcess",0}, + { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0}, { "_wxImageHandler","_class_wxImageHandler",0}, + { "_wxLog","_class_wxLog",0}, { "_class_wxToolBarBase","_wxToolBarBase",0}, - { "_class_wxTreeCtrl","_wxTreeCtrl",0}, { "_wxMask","_class_wxMask",0}, { "_wxToolTip","_class_wxToolTip",0}, { "_wxPNGHandler","_class_wxPNGHandler",0}, @@ -1678,6 +1839,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrinter","_class_wxPrinter",0}, { "_wxPen","_class_wxPen",0}, { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0}, + { "_class_wxNotebookSizer","_wxNotebookSizer",0}, { "_byte","_unsigned_char",0}, { "_wxDataObject","_class_wxDataObject",0}, { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0}, @@ -1688,7 +1850,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxSlider","_class_wxSlider",0}, { "_wxNotebookEvent","_class_wxNotebookEvent",0}, { "_wxPyPrintout","_class_wxPyPrintout",0}, - { "_long","_wxDash",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -1699,6 +1860,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizer","_wxSizer",0}, { "_class_wxTIFFHandler","_wxTIFFHandler",0}, { "_class_wxPrintDialogData","_wxPrintDialogData",0}, + { "_wxGridSizer","_class_wxGridSizer",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_class_wxClipboard","_wxClipboard",0}, { "_class_wxGauge","_wxGauge",0}, @@ -1711,10 +1873,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxProgressDialog","_class_wxProgressDialog",0}, { "_class_wxBMPHandler","_wxBMPHandler",0}, { "_wxPrintPreview","_class_wxPrintPreview",0}, + { "_class_wxFlexGridSizer","_wxFlexGridSizer",0}, { "_wxSpinEvent","_class_wxSpinEvent",0}, { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, + { "_size_t","_time_t",0}, { "_size_t","_unsigned_int",0}, { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, @@ -1722,8 +1886,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxRealPoint","_wxRealPoint",0}, { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0}, { "_wxPNMHandler","_class_wxPNMHandler",0}, - { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0}, + { "_wxLogGui","_class_wxLogGui",0}, + { "_wxPrinterDC","_class_wxPrinterDC",0}, { "_class_wxMenuItem","_wxMenuItem",0}, { "_class_wxPaintEvent","_wxPaintEvent",0}, { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0}, @@ -1733,6 +1898,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPanel","_class_wxPanel",0}, { "_wxInitDialogEvent","_class_wxInitDialogEvent",0}, { "_wxCheckBox","_class_wxCheckBox",0}, + { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0}, { "_wxPyEvent","_class_wxPyEvent",0}, { "_wxTextCtrl","_class_wxTextCtrl",0}, { "_class_wxMask","_wxMask",0}, @@ -1740,6 +1906,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxKeyEvent","_wxKeyEvent",0}, { "_class_wxToolTip","_wxToolTip",0}, { "_class_wxPNGHandler","_wxPNGHandler",0}, + { "_wxFileConfig","_class_wxFileConfig",0}, { "_wxColour","_class_wxColour",0}, { "_class_wxDialog","_wxDialog",0}, { "_wxBusyCursor","_class_wxBusyCursor",0}, @@ -1763,10 +1930,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxShowEvent","_class_wxShowEvent",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, + { "_uint","_time_t",0}, { "_uint","_size_t",0}, { "_uint","_unsigned_int",0}, { "_uint","_int",0}, { "_uint","_wxWindowID",0}, + { "_wxChar","_char",0}, { "_wxPyValidator","_class_wxPyValidator",0}, { "_class_wxEvent","_wxEvent",0}, { "_wxCheckListBox","_class_wxCheckListBox",0}, @@ -1774,31 +1943,40 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxRect","_class_wxRect",0}, { "_wxCommandEvent","_class_wxCommandEvent",0}, { "_wxSizeEvent","_class_wxSizeEvent",0}, + { "_class_wxLogWindow","_wxLogWindow",0}, { "_class_wxImage","_wxImage",0}, { "_wxPoint","_class_wxPoint",0}, + { "_class_wxWindowDisabler","_wxWindowDisabler",0}, { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_class_wxPNMHandler","_wxPNMHandler",0}, { "_wxBoxSizer","_class_wxBoxSizer",0}, + { "_class_wxZipFSHandler","_wxZipFSHandler",0}, + { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxTaskBarIcon","_class_wxTaskBarIcon",0}, { "_wxPrintDialog","_class_wxPrintDialog",0}, - { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxWindowDC","_class_wxWindowDC",0}, + { "_wxTimerEvent","_class_wxTimerEvent",0}, + { "_wxPyTimer","_class_wxPyTimer",0}, { "_wxScrollBar","_class_wxScrollBar",0}, { "_wxSpinButton","_class_wxSpinButton",0}, { "_wxColourDialog","_class_wxColourDialog",0}, { "_wxPrintData","_class_wxPrintData",0}, + { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_class_wxNotifyEvent","_wxNotifyEvent",0}, { "_wxMessageDialog","_class_wxMessageDialog",0}, { "_class_wxValidator","_wxValidator",0}, { "_class_wxPyEvent","_wxPyEvent",0}, { "_wxTextEntryDialog","_class_wxTextEntryDialog",0}, + { "_wxConfig","_class_wxConfig",0}, { "_class_wxIconizeEvent","_wxIconizeEvent",0}, { "_class_wxStaticBitmap","_wxStaticBitmap",0}, + { "_class_wxFileConfig","_wxFileConfig",0}, { "_class_wxBusyCursor","_wxBusyCursor",0}, { "_wxToolBarSimple","_class_wxToolBarSimple",0}, { "_wxMDIChildFrame","_class_wxMDIChildFrame",0}, @@ -1809,6 +1987,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScrollEvent","_class_wxScrollEvent",0}, { "_wxToolBarToolBase","_class_wxToolBarToolBase",0}, { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0}, + { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, @@ -1824,22 +2003,29 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyDropTarget","_wxPyDropTarget",0}, { "_wxCloseEvent","_class_wxCloseEvent",0}, { "_class_wxSplitterEvent","_wxSplitterEvent",0}, + { "_wxProcessEvent","_class_wxProcessEvent",0}, { "_wxNotebook","_class_wxNotebook",0}, - { "_unsigned_long","_wxDash",0}, + { "_wxFSFile","_class_wxFSFile",0}, { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, { "_wxScrollWinEvent","_class_wxScrollWinEvent",0}, + { "_wxGenericDragImage","_class_wxGenericDragImage",0}, { "_class_wxProgressDialog","_wxProgressDialog",0}, { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0}, + { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxPyApp","_class_wxPyApp",0}, { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0}, + { "_class_wxOutputStream","_wxOutputStream",0}, + { "_wxLogTextCtrl","_class_wxLogTextCtrl",0}, { "_wxMDIParentFrame","_class_wxMDIParentFrame",0}, { "_class_wxTreeEvent","_wxTreeEvent",0}, { "_class_wxDirDialog","_wxDirDialog",0}, - { "_class_wxPyTimer","_wxPyTimer",0}, + { "_wxTimeSpan","_class_wxTimeSpan",0}, { "_wxFocusEvent","_class_wxFocusEvent",0}, { "_wxMaximizeEvent","_class_wxMaximizeEvent",0}, + { "_class_wxTimerEvent","_wxTimerEvent",0}, + { "_class_wxPyTimer","_wxPyTimer",0}, { "_class_wxSpinButton","_wxSpinButton",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_class_wxPanel","_wxPanel",0}, @@ -1853,6 +2039,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, { "_class_wxTextCtrl","_wxTextCtrl",0}, + { "_class_wxListItemAttr","_wxListItemAttr",0}, { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, { "_wxMetaFileDC","_class_wxMetaFileDC",0}, { "_class_wxTextDataObject","_wxTextDataObject",0}, @@ -1862,6 +2049,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxScreenDC","_class_wxScreenDC",0}, { "_class_wxToolBarSimple","_wxToolBarSimple",0}, { "_class_wxMDIChildFrame","_wxMDIChildFrame",0}, + { "_WXTYPE","_wxDateTime_t",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, @@ -1870,10 +2058,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCaret","_wxCaret",0}, { "_class_wxMDIClientWindow","_wxMDIClientWindow",0}, { "_class_wxBrush","_wxBrush",0}, + { "_wxTipProvider","_class_wxTipProvider",0}, + { "_unsigned_short","_wxDateTime_t",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, { "_class_wxWindow","_wxWindow",0}, + { "_class_wxLogStderr","_wxLogStderr",0}, { "_wxSplitterWindow","_class_wxSplitterWindow",0}, + { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxStaticText","_wxStaticText",0}, { "_wxPrintDialogData","_class_wxPrintDialogData",0}, { "_class_wxFont","_wxFont",0}, @@ -1884,12 +2076,15 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxBusyInfo","_class_wxBusyInfo",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, + { "_wxJoystick","_class_wxJoystick",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_wxMouseEvent","_class_wxMouseEvent",0}, + { "_class_wxGenericDragImage","_wxGenericDragImage",0}, { "_wxListCtrl","_class_wxListCtrl",0}, { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0}, { "_class_wxPoint","_wxPoint",0}, + { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, { "_class_wxRadioBox","_wxRadioBox",0}, { "_class_wxBoxSizer","_wxBoxSizer",0}, @@ -1899,6 +2094,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyTextDataObject","_class_wxPyTextDataObject",0}, { "_class_wxTaskBarIcon","_wxTaskBarIcon",0}, { "_class_wxPrintDialog","_wxPrintDialog",0}, + { "_wxPyFileSystemHandler","_class_wxPyFileSystemHandler",0}, { "_wxPaintDC","_class_wxPaintDC",0}, { "_class_wxWindowDC","_wxWindowDC",0}, { "_class_wxFocusEvent","_wxFocusEvent",0}, @@ -1907,8 +2103,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_class_wxCursor","_wxCursor",0}, { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0}, + { "_class_wxPyProcess","_wxPyProcess",0}, { "_class_wxImageHandler","_wxImageHandler",0}, { "_wxScrolledWindow","_class_wxScrolledWindow",0}, + { "_class_wxLog","_wxLog",0}, { "_wxTreeItemId","_class_wxTreeItemId",0}, { "_unsigned_char","_byte",0}, { "_class_wxMetaFileDC","_wxMetaFileDC",0}, @@ -1917,6 +2115,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxListBox","_wxListBox",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, + { "_unsigned_int","_time_t",0}, { "_unsigned_int","_size_t",0}, { "_unsigned_int","_uint",0}, { "_unsigned_int","_wxWindowID",0}, @@ -1927,6 +2126,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPen","_wxPen",0}, { "_class_wxFileDialog","_wxFileDialog",0}, { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0}, + { "_wxConfigBase","_class_wxConfigBase",0}, + { "_short","_wxDateTime_t",0}, { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, @@ -1941,13 +2142,17 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0}, { "_class_wxImageList","_wxImageList",0}, { "_class_wxBitmapButton","_wxBitmapButton",0}, + { "_wxFileSystemHandler","_class_wxFileSystemHandler",0}, + { "_wxPyTipProvider","_class_wxPyTipProvider",0}, { "_wxFrame","_class_wxFrame",0}, { "_wxPCXHandler","_class_wxPCXHandler",0}, + { "_class_wxGridSizer","_wxGridSizer",0}, { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0}, { "_class_wxNotebook","_wxNotebook",0}, { "_wxJPEGHandler","_class_wxJPEGHandler",0}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, + { "_wxWindowID","_time_t",0}, { "_wxWindowID","_size_t",0}, { "_wxWindowID","_EBool",0}, { "_wxWindowID","_uint",0}, @@ -1958,6 +2163,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxSizerItem","_wxSizerItem",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, + { "_int","_time_t",0}, { "_int","_size_t",0}, { "_int","_EBool",0}, { "_int","_uint",0}, @@ -1966,20 +2172,38 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_int","_signed_int",0}, { "_class_wxMouseEvent","_wxMouseEvent",0}, { "_wxPyCommandEvent","_class_wxPyCommandEvent",0}, + { "_wxLogWindow","_class_wxLogWindow",0}, { "_class_wxListEvent","_wxListEvent",0}, { "_class_wxPrintPreview","_wxPrintPreview",0}, + { "_wxDateTime_t","_unsigned_short",0}, + { "_wxDateTime_t","_short",0}, + { "_wxDateTime_t","_WXTYPE",0}, { "_class_wxSpinEvent","_wxSpinEvent",0}, { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0}, + { "_wxDateTime","_class_wxDateTime",0}, + { "_time_t","_wxCoord",0}, + { "_time_t","_wxPrintQuality",0}, + { "_time_t","_unsigned_int",0}, + { "_time_t","_int",0}, + { "_time_t","_wxWindowID",0}, + { "_time_t","_uint",0}, + { "_time_t","_size_t",0}, { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0}, + { "_wxLogNull","_class_wxLogNull",0}, { "_wxButton","_class_wxButton",0}, + { "_wxZipFSHandler","_class_wxZipFSHandler",0}, { "_class_wxPyApp","_wxPyApp",0}, { "_wxSize","_class_wxSize",0}, { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_class_wxPyTextDataObject","_wxPyTextDataObject",0}, + { "_class_wxLogTextCtrl","_wxLogTextCtrl",0}, + { "_class_wxLogGui","_wxLogGui",0}, { "_class_wxMDIParentFrame","_wxMDIParentFrame",0}, { "_wxPyTreeItemData","_class_wxPyTreeItemData",0}, + { "_class_wxPrinterDC","_wxPrinterDC",0}, { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0}, + { "_class_wxTimeSpan","_wxTimeSpan",0}, + { "_class_wxPyFileSystemHandler","_wxPyFileSystemHandler",0}, { "_class_wxPaintDC","_wxPaintDC",0}, { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0}, { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0}, @@ -1989,7 +2213,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxValidator","_class_wxValidator",0}, { "_wxToolBarBase","_class_wxToolBarBase",0}, { "_class_wxTreeItemId","_wxTreeItemId",0}, - { "_wxTreeCtrl","_class_wxTreeCtrl",0}, { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxIconizeEvent","_class_wxIconizeEvent",0}, { "_class_wxControl","_wxControl",0}, @@ -2000,6 +2223,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPageSetupDialog","_wxPageSetupDialog",0}, { "_wxPalette","_class_wxPalette",0}, { "_class_wxIdleEvent","_wxIdleEvent",0}, + { "_class_wxConfigBase","_wxConfigBase",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -2007,17 +2231,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_uint",0}, { "_wxCoord","_EBool",0}, { "_wxCoord","_size_t",0}, + { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxEraseEvent","_class_wxEraseEvent",0}, { "_wxDataObjectComposite","_class_wxDataObjectComposite",0}, { "_class_wxJoystickEvent","_wxJoystickEvent",0}, + { "_class_wxTipProvider","_wxTipProvider",0}, { "_class_wxMiniFrame","_wxMiniFrame",0}, { "_wxFontDialog","_class_wxFontDialog",0}, + { "_wxMemoryFSHandler","_class_wxMemoryFSHandler",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxSplitterWindow","_wxSplitterWindow",0}, { "_wxPreviewFrame","_class_wxPreviewFrame",0}, { "_wxSizer","_class_wxSizer",0}, + { "_class_wxDateSpan","_wxDateSpan",0}, + { "_wxFileSystem","_class_wxFileSystem",0}, { "_class_wxShowEvent","_wxShowEvent",0}, + { "_class_wxPyTipProvider","_wxPyTipProvider",0}, { "_class_wxPCXHandler","_wxPCXHandler",0}, { "_wxTIFFHandler","_class_wxTIFFHandler",0}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, @@ -2025,16 +2255,19 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxJoystick","_wxJoystick",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, { "_class_wxListCtrl","_wxListCtrl",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, + { "_class_wxLogNull","_wxLogNull",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0}, { "_wxMenuBar","_class_wxMenuBar",0}, + { "_wxOutputStream","_class_wxOutputStream",0}, { "_wxTreeEvent","_class_wxTreeEvent",0}, { "_wxDirDialog","_class_wxDirDialog",0}, { "_wxEvtHandler","_class_wxPyApp",SwigwxPyAppTowxEvtHandler}, @@ -2044,10 +2277,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxScrollBar","_wxScrollBar",0}, { "_class_wxColourDialog","_wxColourDialog",0}, { "_class_wxPrintData","_wxPrintData",0}, - { "_wxDash","_unsigned_long",0}, - { "_wxDash","_long",0}, { "_class_wxScrolledWindow","_wxScrolledWindow",0}, + { "_wxListItemAttr","_class_wxListItemAttr",0}, { "_class_wxTextEntryDialog","_wxTextEntryDialog",0}, + { "_class_wxConfig","_wxConfig",0}, { "_wxKeyEvent","_class_wxKeyEvent",0}, { "_wxMoveEvent","_class_wxMoveEvent",0}, { "_wxColourData","_class_wxColourData",0}, @@ -2055,6 +2288,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPalette","_wxPalette",0}, { "_wxFileDataObject","_class_wxFileDataObject",0}, { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0}, + { "_wxNotebookSizer","_class_wxNotebookSizer",0}, { "_class_wxEraseEvent","_wxEraseEvent",0}, { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0}, { "_wxMDIClientWindow","_class_wxMDIClientWindow",0}, @@ -2063,6 +2297,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFontDialog","_wxFontDialog",0}, { "_wxWindow","_class_wxWindow",0}, { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0}, + { "_wxLogStderr","_class_wxLogStderr",0}, + { "_class_wxFileSystemHandler","_wxFileSystemHandler",0}, + { "_class_wxFileSystem","_wxFileSystem",0}, { "_class_wxFrame","_wxFrame",0}, {0,0,0}}; @@ -2156,6 +2393,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER)); PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD)); PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); + PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB)); PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); @@ -2220,6 +2458,9 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxSP_WRAP", PyInt_FromLong((long) wxSP_WRAP)); PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); + PyDict_SetItemString(d,"wxSP_3DSASH", PyInt_FromLong((long) wxSP_3DSASH)); + PyDict_SetItemString(d,"wxSP_3DBORDER", PyInt_FromLong((long) wxSP_3DBORDER)); + PyDict_SetItemString(d,"wxSP_FULLSASH", PyInt_FromLong((long) wxSP_FULLSASH)); PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); PyDict_SetItemString(d,"wxSP_LIVE_UPDATE", PyInt_FromLong((long) wxSP_LIVE_UPDATE)); PyDict_SetItemString(d,"wxSP_PERMIT_UNSPLIT", PyInt_FromLong((long) wxSP_PERMIT_UNSPLIT)); @@ -2330,9 +2571,11 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY)); PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT)); PyDict_SetItemString(d,"wxFILE_MUST_EXIST", PyInt_FromLong((long) wxFILE_MUST_EXIST)); + PyDict_SetItemString(d,"wxMULTIPLE", PyInt_FromLong((long) wxMULTIPLE)); PyDict_SetItemString(d,"wxACCEL_ALT", PyInt_FromLong((long) wxACCEL_ALT)); PyDict_SetItemString(d,"wxACCEL_CTRL", PyInt_FromLong((long) wxACCEL_CTRL)); PyDict_SetItemString(d,"wxACCEL_SHIFT", PyInt_FromLong((long) wxACCEL_SHIFT)); + PyDict_SetItemString(d,"wxACCEL_NORMAL", PyInt_FromLong((long) wxACCEL_NORMAL)); PyDict_SetItemString(d,"wxPD_AUTO_HIDE", PyInt_FromLong((long) wxPD_AUTO_HIDE)); PyDict_SetItemString(d,"wxPD_APP_MODAL", PyInt_FromLong((long) wxPD_APP_MODAL)); PyDict_SetItemString(d,"wxPD_CAN_ABORT", PyInt_FromLong((long) wxPD_CAN_ABORT)); @@ -2365,6 +2608,13 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxLI_VERTICAL", PyInt_FromLong((long) wxLI_VERTICAL)); PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER)); PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO)); + PyDict_SetItemString(d,"wxJOYSTICK1", PyInt_FromLong((long) wxJOYSTICK1)); + PyDict_SetItemString(d,"wxJOYSTICK2", PyInt_FromLong((long) wxJOYSTICK2)); + PyDict_SetItemString(d,"wxJOY_BUTTON1", PyInt_FromLong((long) wxJOY_BUTTON1)); + PyDict_SetItemString(d,"wxJOY_BUTTON2", PyInt_FromLong((long) wxJOY_BUTTON2)); + PyDict_SetItemString(d,"wxJOY_BUTTON3", PyInt_FromLong((long) wxJOY_BUTTON3)); + PyDict_SetItemString(d,"wxJOY_BUTTON4", PyInt_FromLong((long) wxJOY_BUTTON4)); + PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY)); PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); @@ -2745,17 +2995,25 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_UNSPLIT", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_UNSPLIT)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)); PyDict_SetItemString(d,"wxEVT_NAVIGATION_KEY", PyInt_FromLong((long) wxEVT_NAVIGATION_KEY)); + PyDict_SetItemString(d,"wxEVT_TIMER", PyInt_FromLong((long) wxEVT_TIMER)); + PyDict_SetItemString(d,"wxEVT_END_PROCESS", PyInt_FromLong((long) wxEVT_END_PROCESS)); PyDict_SetItemString(d,"__version__", PyString_FromString("0.0.0")); PyDict_SetItemString(d,"cvar", SWIG_globals); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); - SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); + SWIG_addvarlink(SWIG_globals,"wxDefaultPosition",_wrap_wxDefaultPosition_get, _wrap_wxDefaultPosition_set); + SWIG_addvarlink(SWIG_globals,"wxDefaultSize",_wrap_wxDefaultSize_get, _wrap_wxDefaultSize_set); + + // Make our API structure a CObject so other modules can import it + // from this module. + PyObject* v = PyCObject_FromVoidPtr(&API, NULL); + PyDict_SetItemString(d,"wxPyCoreAPI", v); + Py_XDECREF(v); __wxPreStart(); // initialize the GUI toolkit, if needed. // Since these modules are all linked together, initialize them now - // because python won't be able to find their shared library files, + // because Python won't be able to find their shared library files, // (since there isn't any.) initwindowsc(); initwindows2c(); @@ -2774,6 +3032,9 @@ SWIGEXPORT(void) initwxc() { initprintfwc(); initsizersc(); initclip_dndc(); + initstreamsc(); + initfilesysc(); + { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/utils/wxPython/src/gtk/wx.py b/wxPython/src/msw/wx.py similarity index 90% rename from utils/wxPython/src/gtk/wx.py rename to wxPython/src/msw/wx.py index fb52fa697b..db7f4024a3 100644 --- a/utils/wxPython/src/gtk/wx.py +++ b/wxPython/src/msw/wx.py @@ -13,6 +13,8 @@ from clip_dnd import * from events import * +from streams import * + from mdi import * from frames import * @@ -34,6 +36,10 @@ from image import * from printfw import * from sizers import * + +from filesys import * + +from utils import * class wxPyAppPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this @@ -44,6 +50,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def GetAppName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetAppName,(self,) + _args, _kwargs) return val + def GetAuto3D(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_GetAuto3D,(self,) + _args, _kwargs) + return val def GetClassName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetClassName,(self,) + _args, _kwargs) return val @@ -60,6 +69,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def GetVendorName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetVendorName,(self,) + _args, _kwargs) return val + def GetUseBestVisual(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_GetUseBestVisual,(self,) + _args, _kwargs) + return val def Dispatch(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_Dispatch,(self,) + _args, _kwargs) return val @@ -81,6 +93,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def SetAppName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_SetAppName,(self,) + _args, _kwargs) return val + def SetAuto3D(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_SetAuto3D,(self,) + _args, _kwargs) + return val def SetClassName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_SetClassName,(self,) + _args, _kwargs) return val @@ -96,6 +111,9 @@ class wxPyAppPtr(wxEvtHandlerPtr): def SetVendorName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_SetVendorName,(self,) + _args, _kwargs) return val + def SetUseBestVisual(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_SetUseBestVisual,(self,) + _args, _kwargs) + return val def GetStdIcon(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetStdIcon,(self,) + _args, _kwargs) if val: val = wxIconPtr(val) ; val.thisown = 1 @@ -132,6 +150,11 @@ _wxStart = wxc._wxStart _wxSetDictionary = wxc._wxSetDictionary +def wxGetApp(*_args, **_kwargs): + val = apply(wxc.wxGetApp,_args,_kwargs) + if val: val = wxPyAppPtr(val) + return val + wxApp_CleanUp = wxc.wxApp_CleanUp @@ -219,6 +242,7 @@ wxLB_HSCROLL = wxc.wxLB_HSCROLL wxPROCESS_ENTER = wxc.wxPROCESS_ENTER wxPASSWORD = wxc.wxPASSWORD wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER +wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_READONLY = wxc.wxTE_READONLY wxTE_RICH = wxc.wxTE_RICH @@ -283,6 +307,9 @@ wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS wxSP_WRAP = wxc.wxSP_WRAP wxSP_NOBORDER = wxc.wxSP_NOBORDER wxSP_3D = wxc.wxSP_3D +wxSP_3DSASH = wxc.wxSP_3DSASH +wxSP_3DBORDER = wxc.wxSP_3DBORDER +wxSP_FULLSASH = wxc.wxSP_FULLSASH wxSP_BORDER = wxc.wxSP_BORDER wxSP_LIVE_UPDATE = wxc.wxSP_LIVE_UPDATE wxSP_PERMIT_UNSPLIT = wxc.wxSP_PERMIT_UNSPLIT @@ -393,9 +420,11 @@ wxSAVE = wxc.wxSAVE wxHIDE_READONLY = wxc.wxHIDE_READONLY wxOVERWRITE_PROMPT = wxc.wxOVERWRITE_PROMPT wxFILE_MUST_EXIST = wxc.wxFILE_MUST_EXIST +wxMULTIPLE = wxc.wxMULTIPLE wxACCEL_ALT = wxc.wxACCEL_ALT wxACCEL_CTRL = wxc.wxACCEL_CTRL wxACCEL_SHIFT = wxc.wxACCEL_SHIFT +wxACCEL_NORMAL = wxc.wxACCEL_NORMAL wxPD_AUTO_HIDE = wxc.wxPD_AUTO_HIDE wxPD_APP_MODAL = wxc.wxPD_APP_MODAL wxPD_CAN_ABORT = wxc.wxPD_CAN_ABORT @@ -428,6 +457,13 @@ wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL wxLI_VERTICAL = wxc.wxLI_VERTICAL wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO +wxJOYSTICK1 = wxc.wxJOYSTICK1 +wxJOYSTICK2 = wxc.wxJOYSTICK2 +wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1 +wxJOY_BUTTON2 = wxc.wxJOY_BUTTON2 +wxJOY_BUTTON3 = wxc.wxJOY_BUTTON3 +wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4 +wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE wxROMAN = wxc.wxROMAN @@ -808,10 +844,12 @@ wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED = wxc.wxEVT_COMMAND_SPLITTER_SASH_POS_CH wxEVT_COMMAND_SPLITTER_UNSPLIT = wxc.wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wxc.wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY +wxEVT_TIMER = wxc.wxEVT_TIMER +wxEVT_END_PROCESS = wxc.wxEVT_END_PROCESS __version__ = wxc.__version__ cvar = wxc.cvar -wxPyDefaultPosition = wxPointPtr(wxc.cvar.wxPyDefaultPosition) -wxPyDefaultSize = wxSizePtr(wxc.cvar.wxPyDefaultSize) +wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition) +wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize) #-------------- USER INCLUDE ----------------------- @@ -847,36 +885,36 @@ def _checkForCallback(obj, name, event, theID=-1): except: pass else: obj.Connect(theID, -1, event, cb) -def _StdWindowCallbacks(win): - _checkForCallback(win, "OnChar", wxEVT_CHAR) - _checkForCallback(win, "OnSize", wxEVT_SIZE) - _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) - _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) - _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) - _checkForCallback(win, "OnPaint", wxEVT_PAINT) - _checkForCallback(win, "OnIdle", wxEVT_IDLE) +## def _StdWindowCallbacks(win): +## _checkForCallback(win, "OnChar", wxEVT_CHAR) +## _checkForCallback(win, "OnSize", wxEVT_SIZE) +## _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND) +## _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED) +## _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG) +## _checkForCallback(win, "OnPaint", wxEVT_PAINT) +## _checkForCallback(win, "OnIdle", wxEVT_IDLE) -def _StdFrameCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) - _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) +## def _StdFrameCallbacks(win): +## _StdWindowCallbacks(win) +## _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE) +## _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT) +## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) -def _StdDialogCallbacks(win): - _StdWindowCallbacks(win) - _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) - _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) - _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) - _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) - _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) +## def _StdDialogCallbacks(win): +## _StdWindowCallbacks(win) +## _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK) +## _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY) +## _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL) +## _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW) +## _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK) -def _StdOnScrollCallbacks(win): - try: cb = getattr(win, "OnScroll") - except: pass - else: EVT_SCROLL(win, cb) +## def _StdOnScrollCallbacks(win): +## try: cb = getattr(win, "OnScroll") +## except: pass +## else: EVT_SCROLL(win, cb) @@ -1344,15 +1382,9 @@ def EVT_SPIN_UP(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) def EVT_SPIN_DOWN(win, id, func): - win.Connect(id, -1,wxEVT_SCROLL_LINEDOWN, func) + win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) def EVT_SPIN(win, id, func): - win.Connect(id, -1, wxEVT_SCROLL_TOP, func) - win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func) - win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) @@ -1381,33 +1413,33 @@ def EVT_TASKBAR_RIGHT_DCLICK(win, func): win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) -# wxGrid -def EVT_GRID_SELECT_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) +## # wxGrid *** THE OLD ONE *** +## def EVT_GRID_SELECT_CELL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn) -def EVT_GRID_CREATE_CELL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) +## def EVT_GRID_CREATE_CELL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn) -def EVT_GRID_CHANGE_LABELS(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) +## def EVT_GRID_CHANGE_LABELS(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn) -def EVT_GRID_CHANGE_SEL_LABEL(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) +## def EVT_GRID_CHANGE_SEL_LABEL(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn) -def EVT_GRID_CELL_CHANGE(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) +## def EVT_GRID_CELL_CHANGE(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn) -def EVT_GRID_CELL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) +## def EVT_GRID_CELL_LCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn) -def EVT_GRID_CELL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) +## def EVT_GRID_CELL_RCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn) -def EVT_GRID_LABEL_LCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) +## def EVT_GRID_LABEL_LCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn) -def EVT_GRID_LABEL_RCLICK(win, fn): - win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) +## def EVT_GRID_LABEL_RCLICK(win, fn): +## win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn) # wxSashWindow @@ -1452,9 +1484,6 @@ def EVT_LIST_SET_INFO(win, id, func): def EVT_LIST_ITEM_SELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func) -def EVT_LIST_ITEM_ACTIVATED(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) - def EVT_LIST_ITEM_DESELECTED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func) @@ -1473,6 +1502,10 @@ def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func): def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func) +def EVT_LIST_ITEM_ACTIVATED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func) + + #wxSplitterWindow @@ -1489,22 +1522,57 @@ def EVT_SPLITTER_DOUBLECLICKED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, func) +# wxTimer +def EVT_TIMER(win, id, func): + win.Connect(id, -1, wxEVT_TIMER, func) + +# wxProcess +def EVT_END_PROCESS(eh, id, func): + eh.Connect(id, -1, wxEVT_END_PROCESS, func) + + +# wxJoyStick +def EVT_JOY_DOWN(win, func): + win.Connect(-1, -1, wxEVT_JOY_DOWN, func) + +def EVT_JOY_UP(win, func): + win.Connect(-1, -1, wxEVT_JOY_UP, func) + +def EVT_JOY_MOVE(win, func): + win.Connect(-1, -1, wxEVT_JOY_MOVE, func) + +def EVT_JOY_ZMOVE(win, func): + win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func) + +def EVT_JOYSTICK_EVENTS(win, func): + win.Connect(-1, -1, wxEVT_JOY_DOWN, func) + win.Connect(-1, -1, wxEVT_JOY_UP, func) + win.Connect(-1, -1, wxEVT_JOY_MOVE, func) + win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func) + #---------------------------------------------------------------------- class wxTimer(wxPyTimer): - def __init__(self): - wxPyTimer.__init__(self, self.Notify) # derived class must provide - # Notify(self) method. + def __init__(self, evtHandler = None, id = -1): + if evtHandler is None: + wxPyTimer.__init__(self, self.Notify) # derived class must provide + # Notify(self) method. + else: + wxPyTimer.__init__(self, None) + self.SetOwner(evtHandler, id) #---------------------------------------------------------------------- # Some wxWin methods can take "NULL" as parameters, but the shadow classes # expect an object with the SWIG pointer as a 'this' member. This class # and instance fools the shadow into passing the NULL pointer. -class NullObj: +## NOTE: This is not needed anymore as None can be passed instead and +# will be interpreted as NULL. + +class _NullObj: this = 'NULL' # SWIG converts this to (void*)0 -NULL = NullObj() +NULL = _NullObj() #---------------------------------------------------------------------- @@ -1513,15 +1581,15 @@ NULL = NullObj() wxColor = wxColour wxNamedColor = wxNamedColour -wxPyDefaultPosition.Set(-1,-1) -wxPyDefaultSize.Set(-1,-1) - # aliases so that C++ documentation applies: -wxDefaultPosition = wxPyDefaultPosition -wxDefaultSize = wxPyDefaultSize +#wxDefaultPosition = wxPyDefaultPosition +#wxDefaultSize = wxPyDefaultSize + # backwards compatibility -wxNoRefBitmap = wxBitmap +wxNoRefBitmap = wxBitmap +wxPyDefaultPosition = wxDefaultPosition +wxPyDefaultSize = wxDefaultSize #---------------------------------------------------------------------- # This helper function will take a wxPython object and convert it to @@ -1655,6 +1723,20 @@ class wxPySimpleApp(wxApp): return true +class wxPyWidgetTester(wxApp): + def __init__(self, size = (250, 100)): + self.size = size + wxApp.__init__(self, 0) + + def OnInit(self): + self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size) + self.SetTopWindow(self.frame) + return true + + def SetWidget(self, widgetClass, *args): + w = apply(widgetClass, (self.frame,) + args) + self.frame.Show(true) + #---------------------------------------------------------------------------- # DO NOT hold any other references to this object. This is how we know when # to cleanup system resources that wxWin is holding. When this module is diff --git a/utils/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i similarity index 76% rename from utils/wxPython/src/my_typemaps.i rename to wxPython/src/my_typemaps.i index fb0fdfc0aa..349cc9245d 100644 --- a/utils/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -162,13 +162,55 @@ static char* wxStringErrorMsg = "string type is required for parameter"; %} +// TODO: Which works best??? + +// Implementation #1 +// %typemap(python, in) wxString& (PyObject* temp, int tmpDoDecRef) { +// temp = $source; +// tmpDoDecRef = 0; +// #if PYTHON_API_VERSION >= 1009 +// if (PyUnicode_Check(temp) { +// temp = PyUnicode_AsUTF8String(temp); +// if (! temp) { +// PyErr_SetString(PyExc_TypeError, "Unicode encoding to UTF8 failed."); +// return NULL; +// } +// tmpDoDecRef = 1; +// #endif +// if (!PyString_Check(temp)) { +// PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); +// return NULL; +// } +// $target = new wxString(PyString_AsString(temp), PyString_Size(temp)); +// #if PYTHON_API_VERESION >= 1009 +// if (tmpDoDecRef) Py_DECREF(temp); +// #endif +// } + + +// Implementation #2 %typemap(python, in) wxString& { +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check($source) && !PyUnicode_Check($source)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize($source, &tmpPtr, &tmpSize) == -1) + return NULL; + $target = new wxString(tmpPtr, tmpSize); +#else if (!PyString_Check($source)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - $target = new wxString(PyString_AsString($source), PyString_Size($source)); + $target = new wxString(PyString_AS_STRING($source), PyString_GET_SIZE($source)); +#endif } + + + + %typemap(python, freearg) wxString& { if ($target) delete $source; @@ -220,6 +262,16 @@ static char* wxStringErrorMsg = "string type is required for parameter"; return NULL; } +//--------------------------------------------------------------------------- +// Typemap to convert strings to wxColour. Two string formats are accepted, +// either a colour name, or a hex colour spec like "#RRGGBB" + +%typemap(python,in) wxColour& (wxColour temp) { + $target = &temp; + if (! wxColour_helper($source, &$target)) + return NULL; +} + //--------------------------------------------------------------------------- // Map T_OUTPUTs for floats to return ints. diff --git a/utils/wxPython/src/printfw.h b/wxPython/src/printfw.h similarity index 100% rename from utils/wxPython/src/printfw.h rename to wxPython/src/printfw.h diff --git a/utils/wxPython/src/printfw.i b/wxPython/src/printfw.i similarity index 91% rename from utils/wxPython/src/printfw.i rename to wxPython/src/printfw.i index c29b3ae291..2586d65229 100644 --- a/utils/wxPython/src/printfw.i +++ b/wxPython/src/printfw.i @@ -98,6 +98,20 @@ public: //---------------------------------------------------------------------- +#ifdef __WXMSW__ +class wxPrinterDC : public wxDC { +public: + wxPrinterDC(const wxPrintData& printData); + %name(wxPrinterDC2) wxPrinterDC(const wxString& driver, + const wxString& device, + const wxString& output, + bool interactive = TRUE, + int orientation = wxPORTRAIT); +}; +#endif + +//--------------------------------------------------------------------------- + class wxPageSetupDialogData { public: wxPageSetupDialogData(); @@ -132,7 +146,7 @@ public: void SetMarginBottomRight(const wxPoint& pt); void SetMinMarginTopLeft(const wxPoint& pt); void SetMinMarginBottomRight(const wxPoint& pt); - void SetPaperId(wxPaperSize& id); + void SetPaperId(wxPaperSize id); void SetPaperSize(const wxSize& size); void SetPrintData(const wxPrintData& printData); }; @@ -142,7 +156,7 @@ class wxPageSetupDialog : public wxDialog { public: wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL); - %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" wxPageSetupDialogData& GetPageSetupData(); int ShowModal(); @@ -189,7 +203,7 @@ class wxPrintDialog : public wxDialog { public: wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL); - %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" wxPrintDialogData& GetPrintDialogData(); %new wxDC* GetPrintDC(); @@ -265,8 +279,8 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage); public: wxPyPrintout(const char* title = "Printout"); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPrintout)" %addmethods { void Destroy() { delete self; } @@ -334,12 +348,12 @@ public: class wxPreviewFrame : public wxFrame { public: wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); - %pragma(python) addtomethod = "__init__:wx._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" void Initialize(); diff --git a/utils/wxPython/src/sizers.i b/wxPython/src/sizers.i similarity index 66% rename from utils/wxPython/src/sizers.i rename to wxPython/src/sizers.i index 341e1cdb04..ab4bd97f15 100644 --- a/utils/wxPython/src/sizers.i +++ b/wxPython/src/sizers.i @@ -44,13 +44,19 @@ public: wxSize GetSize(); wxSize CalcMin(); void SetDimension( wxPoint pos, wxSize size ); + %name(SetRatioWH) void SetRatio( int width, int height ); + %name(SetRatioSize) void SetRatio( wxSize size ); + void SetRatio( float ratio ); + float GetRatio(); bool IsWindow(); bool IsSizer(); bool IsSpacer(); wxWindow *GetWindow(); + void SetWindow( wxWindow *window ); wxSizer *GetSizer(); + void SetSizer( wxSizer *sizer ); int GetOption(); int GetFlag(); int GetBorder(); @@ -93,14 +99,12 @@ public: if (userData) data = new wxPyUserData(userData); self->Add(window, option, flag, border, data); } - void AddSizer(wxSizer *sizer, int option=0, int flag=0, int border=0, PyObject* userData=NULL) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); self->Add(sizer, option, flag, border, data); } - void AddSpacer(int width, int height, int option=0, int flag=0, int border=0, PyObject* userData=NULL) { wxPyUserData* data = NULL; @@ -109,20 +113,38 @@ public: } + void InsertWindow(int before, wxWindow *window, int option=0, int flag=0, + int border=0, PyObject* userData=NULL) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, window, option, flag, border, data); + } + void InsertSizer(int before, wxSizer *sizer, int option=0, int flag=0, + int border=0, PyObject* userData=NULL) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, sizer, option, flag, border, data); + } + void InsertSpacer(int before, int width, int height, int option=0, int flag=0, + int border=0, PyObject* userData=NULL) { + wxPyUserData* data = NULL; + if (userData) data = new wxPyUserData(userData); + self->Insert(before, width, height, option, flag, border, data); + } + + void PrependWindow(wxWindow *window, int option=0, int flag=0, int border=0, PyObject* userData=NULL) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); self->Prepend(window, option, flag, border, data); } - void PrependSizer(wxSizer *sizer, int option=0, int flag=0, int border=0, PyObject* userData=NULL) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); self->Prepend(sizer, option, flag, border, data); } - void PrependSpacer(int width, int height, int option=0, int flag=0, int border=0, PyObject* userData=NULL) { wxPyUserData* data = NULL; @@ -145,6 +167,14 @@ public: else: apply(self.AddWindow, args) + def Insert(self, *args): + if type(args[1]) == type(1): + apply(self.InsertSpacer, args) + elif string.find(args[1].this, 'Sizer') != -1: + apply(self.InsertSizer, args) + else: + apply(self.InsertWindow, args) + def Prepend(self, *args): if type(args[0]) == type(1): apply(self.PrependSpacer, args) @@ -170,6 +200,21 @@ public: void SetDimension( int x, int y, int width, int height ); + void SetMinSize(wxSize size); + + %name(SetItemMinSizeWindow) void SetItemMinSize(wxWindow* window, int width, int height); + %name(SetItemMinSizeSizer) void SetItemMinSize(wxSizer* sizer, int width, int height); + %name(SetItemMinSizePos) void SetItemMinSize(int pos, int width, int height); + + %pragma(python) addtoclass = " + def SetItemMinSize(self, *args): + if type(args[0]) == type(1): + apply(self.SetItemMinSizePos, args) + elif string.find(args[0].this, 'Sizer') != -1: + apply(self.SetItemMinSizeSizer, args) + else: + apply(self.SetItemMinSizeWindow, args) + " wxSize GetSize(); wxPoint GetPosition(); @@ -218,8 +263,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxPySizer, wxSizer); class wxPySizer : public wxSizer { public: wxPySizer(); - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPySizer)" }; @@ -229,6 +274,8 @@ class wxBoxSizer : public wxSizer { public: wxBoxSizer(int orient = wxHORIZONTAL); int GetOrientation(); + void RecalcSizes(); + wxSize CalcMin(); }; //--------------------------------------------------------------------------- @@ -237,6 +284,57 @@ class wxStaticBoxSizer : public wxBoxSizer { public: wxStaticBoxSizer(wxStaticBox *box, int orient = wxHORIZONTAL); wxStaticBox *GetStaticBox(); + void RecalcSizes(); + wxSize CalcMin(); +}; + +//--------------------------------------------------------------------------- + +class wxNotebookSizer: public wxSizer { +public: + wxNotebookSizer( wxNotebook *nb ); + + void RecalcSizes(); + wxSize CalcMin(); + + wxNotebook *GetNotebook(); +}; + +//--------------------------------------------------------------------------- + +class wxGridSizer: public wxSizer +{ +public: + wxGridSizer( int rows=1, int cols=0, int vgap=0, int hgap=0 ); + + void RecalcSizes(); + wxSize CalcMin(); + + void SetCols( int cols ); + void SetRows( int rows ); + void SetVGap( int gap ); + void SetHGap( int gap ); + int GetCols(); + int GetRows(); + int GetVGap(); + int GetHGap(); +}; + +//--------------------------------------------------------------------------- + +class wxFlexGridSizer: public wxGridSizer +{ +public: + wxFlexGridSizer( int rows=1, int cols=0, int vgap=0, int hgap=0 ); + + void RecalcSizes(); + wxSize CalcMin(); + + void AddGrowableRow( size_t idx ); + void RemoveGrowableRow( size_t idx ); + void AddGrowableCol( size_t idx ); + void RemoveGrowableCol( size_t idx ); + }; //--------------------------------------------------------------------------- diff --git a/utils/wxPython/src/stattool.i b/wxPython/src/stattool.i similarity index 91% rename from utils/wxPython/src/stattool.i rename to wxPython/src/stattool.i index 575f8880b5..f2e16f4f69 100644 --- a/utils/wxPython/src/stattool.i +++ b/wxPython/src/stattool.i @@ -32,17 +32,22 @@ %pragma(python) code = "import wx" + +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- class wxStatusBar : public wxWindow { public: wxStatusBar(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxST_SIZEGRIP, char* name = "statusBar"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" %addmethods { %new wxRect* GetFieldRect(long item) { @@ -152,14 +157,14 @@ public: wxToolBarToolBase *AddTool(int id, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - int toggle = FALSE, + int isToggle = FALSE, PyObject *clientData = NULL, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->AddTool(id, bitmap, pushedBitmap, (bool)toggle, + return self->AddTool(id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } @@ -168,8 +173,8 @@ public: const wxBitmap& bitmap, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr, - int toggle = FALSE) { - return self->AddTool(id, bitmap, wxNullBitmap, toggle, NULL, + int isToggle = FALSE) { + return self->AddTool(id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } @@ -179,14 +184,14 @@ public: int id, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - int toggle = FALSE, + int isToggle = FALSE, PyObject *clientData = NULL, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr) { wxPyUserData* udata = NULL; if (clientData) udata = new wxPyUserData(clientData); - return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)toggle, + return self->InsertTool(pos, id, bitmap, pushedBitmap, (bool)isToggle, udata, shortHelpString, longHelpString); } @@ -196,8 +201,8 @@ public: const wxBitmap& bitmap, const wxString& shortHelpString = wxPyEmptyStr, const wxString& longHelpString = wxPyEmptyStr, - int toggle = FALSE) { - return self->InsertTool(pos, id, bitmap, wxNullBitmap, toggle, NULL, + int isToggle = FALSE) { + return self->InsertTool(pos, id, bitmap, wxNullBitmap, isToggle, NULL, shortHelpString, longHelpString); } } @@ -273,12 +278,12 @@ class wxToolBar : public wxToolBarBase { public: wxToolBar(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const char* name = wxToolBarNameStr); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y); }; @@ -290,12 +295,12 @@ class wxToolBarSimple : public wxToolBarBase { public: wxToolBarSimple(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const char* name = wxToolBarNameStr); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y); }; @@ -342,12 +347,12 @@ public: class wxToolBar : public wxControl { public: wxToolBar(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxTB_HORIZONTAL | wxNO_BORDER, char* name = "toolBar"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool AddControl(wxControl * control); diff --git a/wxPython/src/streams.i b/wxPython/src/streams.i new file mode 100644 index 0000000000..84020cb393 --- /dev/null +++ b/wxPython/src/streams.i @@ -0,0 +1,507 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: streams.i +// Purpose: SWIG definitions of the wxFileSystem family of classes +// +// Author: Joerg Baumann +// +// Created: 25-Sept-2000 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Joerg Baumann +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +%module streams + +%{ +#include "helpers.h" +#include +#include +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i + +%pragma(python) code = "import wx" +%pragma(python) code = "import string" + +//---------------------------------------------------------------------- +// typemaps for wxInputStream +%typemap(python,in) wxInputStream *stream { + if (PyInstance_Check($source)) { + wxPyInputStream* ptr; + if (SWIG_GetPtrObj($source, (void **) &ptr,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } + $target = ptr->wxi; + } else { + PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); + return NULL; + } +} + + +// typemaps for wxInputStream +%typemap(python,out) wxInputStream* { + wxPyInputStream * _ptr = NULL; + + if ($source) { + _ptr = new wxPyInputStream($source); + } + if (_ptr) { + char swigptr[64]; + SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); + + PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); + if (! classobj) { + Py_INCREF(Py_None); + $target = Py_None; + } else { + PyObject* arg = Py_BuildValue("(s)", swigptr); + $target = PyInstance_New(classobj, arg, NULL); + Py_DECREF(arg); + + // set ThisOwn + PyObject* one = PyInt_FromLong(1); + PyObject_SetAttrString($target, "thisown", one); + Py_DECREF(one); + } + } else { + Py_INCREF(Py_None); + $target = Py_None; + } +} + +//---------------------------------------------------------------------- + +%{ // C++ +// definitions of wxStringPtrList and wxPyInputStream +#include +WX_DEFINE_LIST(wxStringPtrList); + + +void wxPyInputStream::close() { + /* do nothing */ +} + +void wxPyInputStream::flush() { + /*do nothing*/ +} + +bool wxPyInputStream::eof() { + if (wxi) + return wxi->Eof(); + else + return TRUE; +} + +wxPyInputStream::~wxPyInputStream() { + /*do nothing*/ +} + +wxString* wxPyInputStream::read(int size) { + wxString* s = NULL; + const int BUFSIZE = 1024; + + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + if (size < 0) { + // init buffers + char * buf = new char[BUFSIZE]; + if (!buf) { + PyErr_NoMemory(); + return NULL; + } + + s = new wxString(); + if (!s) { + delete buf; + PyErr_NoMemory(); + return NULL; + } + + // read until EOF + wxPy_BEGIN_ALLOW_THREADS; + while (! wxi->Eof()) { + wxi->Read(buf, BUFSIZE); + //*s += wxString(buf, wxi->LastRead()); + s->Append(buf, wxi->LastRead()); + } + delete buf; + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + + } else { // Read only size number of characters + s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read size bytes + wxPy_BEGIN_ALLOW_THREADS; + wxi->Read(s->GetWriteBuf(size+1), size); + s->UngetWriteBuf(wxi->LastRead()); + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + } + return s; +} + + +wxString* wxPyInputStream::readline (int size) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init buffer + int i; + char ch; + wxString* s = new wxString; + if (!s) { + PyErr_NoMemory(); + return NULL; + } + + // read until \n or byte limit reached + wxPy_BEGIN_ALLOW_THREADS; + for (i=ch=0; (ch != '\n') && (!wxi->Eof()) && ((size < 0) || (i < size)); i++) { + *s += ch = wxi->GetC(); + } + wxPy_END_ALLOW_THREADS; + + // errorcheck + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + delete s; + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return s; +} + + +wxStringPtrList* wxPyInputStream::readlines (int sizehint) { + // check if we have a real wxInputStream to work with + if (!wxi) { + PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below"); + return NULL; + } + + // init list + wxStringPtrList* l = new wxStringPtrList(); + if (!l) { + PyErr_NoMemory(); + return NULL; + } + + // read sizehint bytes or until EOF + wxPy_BEGIN_ALLOW_THREADS; + int i; + for (i=0; (!wxi->Eof()) && ((sizehint < 0) || (i < sizehint));) { + wxString* s = readline(); + if (s == NULL) { + l->DeleteContents(TRUE); + l->Clear(); + return NULL; + } + l->Append(s); + i = i + s->Length(); + } + wxPy_END_ALLOW_THREADS; + + // error check + if (wxi->LastError() == wxSTREAM_READ_ERROR) { + l->DeleteContents(TRUE); + l->Clear(); + PyErr_SetString(PyExc_IOError,"IOError in wxInputStream"); + return NULL; + } + return l; +} + + +void wxPyInputStream::seek(int offset, int whence) { + if (wxi) + wxi->SeekI(offset, wxSeekMode(whence)); +} + +int wxPyInputStream::tell(){ + if (wxi) + return wxi->TellI(); +} + + + +// wxInputStream which operates on a Python file-like object +class wxPyCBInputStream : public wxInputStream { +protected: + PyObject* read; + PyObject* seek; + PyObject* tell; + PyObject* py; + + virtual size_t OnSysRead(void *buffer, size_t bufsize) { + if (bufsize == 0) + return 0; + + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("(i)", bufsize); + PyObject* result = PyEval_CallObject(read, arglist); + Py_DECREF(arglist); + + size_t o = 0; + if ((result != NULL) && PyString_Check(result)) { + o = PyString_Size(result); + if (o == 0) + m_lasterror = wxSTREAM_EOF; + if (o > bufsize) + o = bufsize; + strncpy((char*)buffer, PyString_AsString(result), o); + Py_DECREF(result); + + } + else + m_lasterror = wxSTREAM_READ_ERROR; + wxPySaveThread(doSave); + m_lastcount = o; + return o; + } + + virtual size_t OnSysWrite(const void *buffer, size_t bufsize){ + m_lasterror = wxSTREAM_WRITE_ERROR; + return 0; + } + + virtual off_t OnSysSeek(off_t off, wxSeekMode mode){ + bool doSave = wxPyRestoreThread(); + PyObject*arglist = Py_BuildValue("(ii)", off, mode); + PyObject*result = PyEval_CallObject(seek, arglist); + Py_DECREF(arglist); + Py_XDECREF(result); + wxPySaveThread(doSave); + return OnSysTell(); + } + + virtual off_t OnSysTell() const{ + bool doSave = wxPyRestoreThread(); + PyObject* arglist = Py_BuildValue("()"); + PyObject* result = PyEval_CallObject(tell, arglist); + Py_DECREF(arglist); + off_t o = 0; + if (result != NULL) { + o = PyInt_AsLong(result); + Py_DECREF(result); + }; + wxPySaveThread(doSave); + return o; + } + + wxPyCBInputStream(PyObject *p, PyObject *r, PyObject *s, PyObject *t) + : py(p), read(r), seek(s), tell(t) + {} + +public: + ~wxPyCBInputStream() { + bool doSave = wxPyRestoreThread(); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + wxPySaveThread(doSave); + } + + virtual size_t GetSize() { + if (seek && tell) { + off_t temp = OnSysTell(); + off_t ret = OnSysSeek(0, wxFromEnd); + OnSysSeek(temp, wxFromStart); + return ret; + } + else + return 0; + } + + static wxPyCBInputStream* create(PyObject *py) { + PyObject* read; + PyObject* seek; + PyObject* tell; + + if (!PyInstance_Check(py) && !PyFile_Check(py)) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + return NULL; + } + read = getMethod(py, "read"); + seek = getMethod(py, "seek"); + tell = getMethod(py, "tell"); + + if (!read) { + PyErr_SetString(PyExc_TypeError, "Not a file-like object"); + Py_XDECREF(py); + Py_XDECREF(read); + Py_XDECREF(seek); + Py_XDECREF(tell); + return NULL; + } + return new wxPyCBInputStream(py, read, seek, tell); + } + + static PyObject* getMethod(PyObject* py, char* name) { + if (!PyObject_HasAttrString(py, name)) + return NULL; + PyObject* o = PyObject_GetAttrString(py, name); + if (!PyMethod_Check(o) && !PyCFunction_Check(o)) { + Py_DECREF(o); + return NULL; + } + return o; + } + +protected: + +}; + +%} // End of the C++ +//---------------------------------------------------------------------- + + +// block threads for wxPyInputStream **** WHY? +%except(python) { + $function +} + + +// wxStringPtrList* to python list of strings typemap +%typemap(python, out) wxStringPtrList* { + if ($source) { + $target = PyList_New($source->GetCount()); + wxStringPtrList::Node *node = $source->GetFirst(); + for (int i=0; node; i++) { + wxString *s = node->GetData(); + PyList_SetItem($target, i, PyString_FromStringAndSize(s->c_str(), s->Len())); + node = node->GetNext(); + delete s; + } + delete $source; + } + else + $target=0; +} + + +// transport exceptions via %target=0 +%typemap(python, out) wxPyInputStream* { + char _ptemp[128]; + if ($source) { + SWIG_MakePtr(_ptemp, (char *) $source,"_wxPyInputStream_p"); + $target = Py_BuildValue("s",_ptemp); + } + else + $target=0; +} + + +// transport exceptions via %target=0 +%typemap(python, out) wxString* { + if ($source) { + $target = PyString_FromStringAndSize($source->c_str(), $source->Len()); + delete $source; + } + else + $target=0; +} + + + +%name(wxInputStream) class wxPyInputStream { +public: + %addmethods { + wxPyInputStream(PyObject* p) { + wxInputStream* wxi = wxPyCBInputStream::create(p); + if (wxi) + return new wxPyInputStream(wxi); + else + return NULL; + } + } + void close(); + void flush(); + bool eof(); + wxString* read(int size=-1); + wxString* readline(int size=-1); + wxStringPtrList* readlines(int sizehint=-1); + void seek(int offset, int whence=0); + int tell(); + /* + bool isatty(); + int fileno(); + void truncate(int size=-1); + void write(wxString data); + void writelines(wxStringPtrList); + */ +} + + + +// TODO: make a more fully implemented file interface... +class wxOutputStream { +public: + /* + void close(); + void flush(); + wxString* read(int size=-1); + wxString* readline(int size=-1); + wxStringPtrList* readlines(int sizehint=-1); + void seek(int offset, int whence=0); + int tell(); + bool isatty(); + int fileno(); + void truncate(int size=-1); + void write(wxString data); + void writelines(wxStringPtrList); + */ + + %addmethods { + void write(const wxString& str) { + self->Write(str.c_str(), str.Length()); + } + } +}; + + +// restore except and typemaps +%typemap(python,out) wxStringPtrList*; +%typemap(python,out) wxPyInputStream*; +%typemap(python, out) wxString* { + $target = PyString_FromStringAndSize($source->c_str(), $source->Len()); +} +%except(python) { + wxPy_BEGIN_ALLOW_THREADS; + $function + wxPy_END_ALLOW_THREADS; +} + + diff --git a/wxPython/src/utils.i b/wxPython/src/utils.i new file mode 100644 index 0000000000..100f7a1160 --- /dev/null +++ b/wxPython/src/utils.i @@ -0,0 +1,1040 @@ +///////////////////////////////////////////////////////////////////////////// +// 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 utils + +%{ +#include "export.h" +#include +#include +#include +%} + +//--------------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i + +%pragma(python) code = "import string" + + +//--------------------------------------------------------------------------- + +%{ + static wxString wxPyEmptyStr(""); + + static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { + PyObject* ret = PyTuple_New(3); + if (ret) { + PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); + PyTuple_SET_ITEM(ret, 1, PyString_FromString(str)); + PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); + } + return ret; + } +%} + +//--------------------------------------------------------------------------- + +enum +{ + wxCONFIG_USE_LOCAL_FILE = 1, + wxCONFIG_USE_GLOBAL_FILE = 2, + wxCONFIG_USE_RELATIVE_PATH = 4 +}; + +//--------------------------------------------------------------------------- + +class wxConfigBase { +public: +// wxConfigBase(const wxString& appName = wxPyEmptyStr, **** An ABC +// const wxString& vendorName = wxPyEmptyStr, +// const wxString& localFilename = wxPyEmptyStr, +// const wxString& globalFilename = wxPyEmptyStr, +// long style = 0); + ~wxConfigBase(); + + enum EntryType + { + Type_Unknown, + Type_String, + Type_Boolean, + Type_Integer, // use Read(long *) + Type_Float // use Read(double *) + }; + + // static functions + // sets the config object, returns the previous pointer + static wxConfigBase *Set(wxConfigBase *pConfig); + // get the config object, creates it on demand unless DontCreateOnDemand + // was called + static wxConfigBase *Get(bool createOnDemand = TRUE); + // create a new config object: this function will create the "best" + // implementation of wxConfig available for the current platform, see + // comments near definition wxUSE_CONFIG_NATIVE for details. It returns + // the created object and also sets it as ms_pConfig. + static wxConfigBase *Create(); + // should Get() try to create a new log object if the current one is NULL? + static void DontCreateOnDemand(); + + + + bool DeleteAll(); // This is supposed to have been fixed... + bool DeleteEntry(const wxString& key, bool bDeleteGroupIfEmpty = TRUE); + bool DeleteGroup(const wxString& key); + bool Exists(wxString& strName); + bool Flush(bool bCurrentOnly = FALSE); + wxString GetAppName(); + + + // Each of these enumeration methods return a 3-tuple consisting of + // the continue flag, the value string, and the index for the next call. + %addmethods { + PyObject* GetFirstGroup() { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstGroup(value, index); + return __EnumerationHelper(cont, value, index); + } + + PyObject* GetFirstEntry() { + bool cont; + long index = 0; + wxString value; + + cont = self->GetFirstEntry(value, index); + return __EnumerationHelper(cont, value, index); + } + + PyObject* GetNextGroup(long index) { + bool cont; + wxString value; + + cont = self->GetNextGroup(value, index); + return __EnumerationHelper(cont, value, index); + } + + PyObject* GetNextEntry(long index) { + bool cont; + wxString value; + + cont = self->GetNextEntry(value, index); + return __EnumerationHelper(cont, value, index); + } + } + + + int GetNumberOfEntries(bool bRecursive = FALSE); + int GetNumberOfGroups(bool bRecursive = FALSE); + wxString GetPath(); + wxString GetVendorName(); + bool HasEntry(wxString& strName); + bool HasGroup(const wxString& strName); + bool IsExpandingEnvVars(); + bool IsRecordingDefaults(); + + wxString Read(const wxString& key, const wxString& defaultVal = wxPyEmptyStr); + %name(ReadInt)long Read(const wxString& key, long defaultVal = 0); + %name(ReadFloat)double Read(const wxString& key, double defaultVal = 0.0); + + void SetExpandEnvVars (bool bDoIt = TRUE); + void SetPath(const wxString& strPath); + void SetRecordDefaults(bool bDoIt = TRUE); + void SetAppName(const wxString& appName); + void SetVendorName(const wxString& vendorName); + + void SetStyle(long style); + long GetStyle(); + + bool Write(const wxString& key, const wxString& value); + %name(WriteInt)bool Write(const wxString& key, long value); + %name(WriteFloat)bool Write(const wxString& key, double value); + + EntryType GetEntryType(const wxString& name); + bool RenameEntry(const wxString& oldName, + const wxString& newName); + bool RenameGroup(const wxString& oldName, + const wxString& newName); + wxString ExpandEnvVars(const wxString& str); + + +}; + +//--------------------------------------------------------------------------- + +class wxConfig : public wxConfigBase { +public: + wxConfig(const wxString& appName = wxPyEmptyStr, + const wxString& vendorName = wxPyEmptyStr, + const wxString& localFilename = wxPyEmptyStr, + const wxString& globalFilename = wxPyEmptyStr, + long style = 0); + ~wxConfig(); +}; + +class wxFileConfig : public wxConfigBase { +public: + wxFileConfig(const wxString& appName = wxPyEmptyStr, + const wxString& vendorName = wxPyEmptyStr, + const wxString& localFilename = wxPyEmptyStr, + const wxString& globalFilename = wxPyEmptyStr, + long style = 0); + ~wxFileConfig(); +}; + + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- + +class wxDateTime; +class wxTimeSpan; +class wxDateSpan; + + +%typemap(python,in) wxDateTime::TimeZone& { + $target = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($source)); +} +%typemap(python,freearg) wxDateTime::TimeZone& { + if ($source) delete $source; +} + +%{ +#define LOCAL *(new wxDateTime::TimeZone(wxDateTime::Local)) +%} + + +%typemap(python, out) wxLongLong { + PyObject *hi, *lo, *shifter, *shifted; + hi = PyLong_FromLong($source->GetHi()); + lo = PyLong_FromLong($source->GetLo()); + shifter = PyLong_FromLong(32); + shifted = PyNumber_Lshift(hi, shifter); + $target = PyNumber_Or(shifted, lo); + Py_DECREF(hi); + Py_DECREF(lo); + Py_DECREF(shifter); + Py_DECREF(shifted); +} + + + + +class wxDateTime { +public: + typedef unsigned short wxDateTime_t; + + enum TZ + { + Local, + + GMT_12, GMT_11, GMT_10, GMT_9, GMT_8, GMT_7, + GMT_6, GMT_5, GMT_4, GMT_3, GMT_2, GMT_1, + GMT0, + GMT1, GMT2, GMT3, GMT4, GMT5, GMT6, + GMT7, GMT8, GMT9, GMT10, GMT11, GMT12, + + // Europe + WET = GMT0, // Western Europe Time + WEST = GMT1, // Western Europe Summer Time + CET = GMT1, // Central Europe Time + CEST = GMT2, // Central Europe Summer Time + EET = GMT2, // Eastern Europe Time + EEST = GMT3, // Eastern Europe Summer Time + MSK = GMT3, // Moscow Time + MSD = GMT4, // Moscow Summer Time + + // US and Canada + AST = GMT_4, // Atlantic Standard Time + ADT = GMT_3, // Atlantic Daylight Time + EST = GMT_5, // Eastern Standard Time + EDT = GMT_4, // Eastern Daylight Saving Time + CST = GMT_6, // Central Standard Time + CDT = GMT_5, // Central Daylight Saving Time + MST = GMT_7, // Mountain Standard Time + MDT = GMT_6, // Mountain Daylight Saving Time + PST = GMT_8, // Pacific Standard Time + PDT = GMT_7, // Pacific Daylight Saving Time + HST = GMT_10, // Hawaiian Standard Time + AKST = GMT_9, // Alaska Standard Time + AKDT = GMT_8, // Alaska Daylight Saving Time + + // Australia + + A_WST = GMT8, // Western Standard Time + A_CST = GMT12 + 1, // Central Standard Time (+9.5) + A_EST = GMT10, // Eastern Standard Time + A_ESST = GMT11, // Eastern Summer Time + + // Universal Coordinated Time = the new and politically correct name + // for GMT + UTC = GMT0 + }; + + enum Calendar + { + Gregorian, // current calendar + Julian // calendar in use since -45 until the 1582 (or later) + }; + + enum Country + { + Country_Unknown, // no special information for this country + Country_Default, // set the default country with SetCountry() method + // or use the default country with any other + + // Western European countries: we assume that they all follow the same + // DST rules (true or false?) + Country_WesternEurope_Start, + Country_EEC = Country_WesternEurope_Start, + France, + Germany, + UK, + Country_WesternEurope_End = UK, + + Russia, + + USA + }; + + // symbolic names for the months + enum Month + { + Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Inv_Month + }; + + // symbolic names for the weekdays + enum WeekDay + { + Sun, Mon, Tue, Wed, Thu, Fri, Sat, Inv_WeekDay + }; + + // invalid value for the year + enum Year + { + Inv_Year = SHRT_MIN // should hold in wxDateTime_t + }; + + // flags for GetWeekDayName and GetMonthName + enum NameFlags + { + Name_Full = 0x01, // return full name + Name_Abbr = 0x02 // return abbreviated name + }; + + // flags for GetWeekOfYear and GetWeekOfMonth + enum WeekFlags + { + Default_First, // Sunday_First for US, Monday_First for the rest + Monday_First, // week starts with a Monday + Sunday_First // week starts with a Sunday + }; + + + // static methods + // ------------------------------------------------------------------------ + + // set the current country + static void SetCountry(Country country); + // get the current country + static Country GetCountry(); + + // return TRUE if the country is a West European one (in practice, + // this means that the same DST rules as for EEC apply) + static bool IsWestEuropeanCountry(Country country = Country_Default); + + // return the current year + static int GetCurrentYear(Calendar cal = Gregorian); + + // convert the year as returned by wxDateTime::GetYear() to a year + // suitable for BC/AD notation. The difference is that BC year 1 + // corresponds to the year 0 (while BC year 0 didn't exist) and AD + // year N is just year N. + static int ConvertYearToBC(int year); + + // return the current month + static Month GetCurrentMonth(Calendar cal = Gregorian); + + // returns TRUE if the given year is a leap year in the given calendar + static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian); + + // get the century (19 for 1999, 20 for 2000 and -5 for 492 BC) + static int GetCentury(int year = Inv_Year); + + // returns the number of days in this year (356 or 355 for Gregorian + // calendar usually :-) + %name(GetNumberOfDaysinYear) + static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian); + + // get the number of the days in the given month (default value for + // the year means the current one) + %name(GetNumberOfDaysInMonth) + static wxDateTime_t GetNumberOfDays(Month month, + int year = Inv_Year, + Calendar cal = Gregorian); + + // get the full (default) or abbreviated month name in the current + // locale, returns empty string on error + static wxString GetMonthName(Month month, + NameFlags flags = Name_Full); + + // get the full (default) or abbreviated weekday name in the current + // locale, returns empty string on error + static wxString GetWeekDayName(WeekDay weekday, + NameFlags flags = Name_Full); + + // get the AM and PM strings in the current locale (may be empty) + static void GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT); + + // return TRUE if the given country uses DST for this year + static bool IsDSTApplicable(int year = Inv_Year, + Country country = Country_Default); + + // get the beginning of DST for this year, will return invalid object + // if no DST applicable in this year. The default value of the + // parameter means to take the current year. + static wxDateTime GetBeginDST(int year = Inv_Year, + Country country = Country_Default); + // get the end of DST for this year, will return invalid object + // if no DST applicable in this year. The default value of the + // parameter means to take the current year. + static wxDateTime GetEndDST(int year = Inv_Year, + Country country = Country_Default); + + // return the wxDateTime object for the current time + static inline wxDateTime Now(); + + // return the wxDateTime object for today midnight: i.e. as Now() but + // with time set to 0 + static inline wxDateTime Today(); + + + + // ------------------------------------------------------------------------ + // constructors + + wxDateTime(); + %name(wxDateTimeFromTimeT)wxDateTime(time_t timet); + %name(wxDateTimeFromJDN)wxDateTime(double jdn); + %name(wxDateTimeFromHMS)wxDateTime(wxDateTime_t hour, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); + %name(wxDateTimeFromDMY)wxDateTime(wxDateTime_t day, + Month month = Inv_Month, + int year = Inv_Year, + wxDateTime_t hour = 0, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); + + ~wxDateTime(); + + // ------------------------------------------------------------------------ + // Set methods + + wxDateTime& SetToCurrent(); + + // set to given time_t value + %name(SetTimeT)wxDateTime& Set(time_t timet); + + // set to given JDN (beware of rounding errors) + %name(SetJDN)wxDateTime& Set(double jdn); + + // set to given time, date = today + %name(SetHMS)wxDateTime& Set(wxDateTime_t hour, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); + + // from separate values for each component with explicit date + // (defaults for month and year are the current values) + wxDateTime& Set(wxDateTime_t day, + Month month = Inv_Month, + int year = Inv_Year, // 1999, not 99 please! + wxDateTime_t hour = 0, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); + + // resets time to 00:00:00, doesn't change the date + wxDateTime& ResetTime(); + + // the following functions don't change the values of the other + // fields, i.e. SetMinute() won't change either hour or seconds value + + // set the year + wxDateTime& SetYear(int year); + // set the month + wxDateTime& SetMonth(Month month); + // set the day of the month + wxDateTime& SetDay(wxDateTime_t day); + // set hour + wxDateTime& SetHour(wxDateTime_t hour); + // set minute + wxDateTime& SetMinute(wxDateTime_t minute); + // set second + wxDateTime& SetSecond(wxDateTime_t second); + // set millisecond + wxDateTime& SetMillisecond(wxDateTime_t millisecond); + + + // ------------------------------------------------------------------------ + // calendar calculations + + // set to the given week day in the same week as this one + wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday); + wxDateTime GetWeekDayInSameWeek(WeekDay weekday); + + // set to the next week day following this one + wxDateTime& SetToNextWeekDay(WeekDay weekday); + wxDateTime GetNextWeekDay(WeekDay weekday); + + // set to the previous week day before this one + wxDateTime& SetToPrevWeekDay(WeekDay weekday); + wxDateTime GetPrevWeekDay(WeekDay weekday); + + // set to Nth occurence of given weekday in the given month of the + // given year (time is set to 0), return TRUE on success and FALSE on + // failure. n may be positive (1..5) or negative to count from the end + // of the month (see helper function SetToLastWeekDay()) + bool SetToWeekDay(WeekDay weekday, + int n = 1, + Month month = Inv_Month, + int year = Inv_Year); + wxDateTime GetWeekDay(WeekDay weekday, + int n = 1, + Month month = Inv_Month, + int year = Inv_Year); + + // sets to the last weekday in the given month, year + bool SetToLastWeekDay(WeekDay weekday, + Month month = Inv_Month, + int year = Inv_Year); + wxDateTime GetLastWeekDay(WeekDay weekday, + Month month = Inv_Month, + int year = Inv_Year); + + // sets the date to the given day of the given week in the year, + // returns TRUE on success and FALSE if given date doesn't exist (e.g. + // numWeek is > 53) + bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon); + wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon); + + // sets the date to the last day of the given (or current) month or the + // given (or current) year + wxDateTime& SetToLastMonthDay(Month month = Inv_Month, + int year = Inv_Year); + wxDateTime GetLastMonthDay(Month month = Inv_Month, + int year = Inv_Year); + + // sets to the given year day (1..365 or 366) + wxDateTime& SetToYearDay(wxDateTime_t yday); + wxDateTime GetYearDay(wxDateTime_t yday); + + // The definitions below were taken verbatim from + // + // http://www.capecod.net/~pbaum/date/date0.htm + // + // (Peter Baum's home page) + // + // definition: The Julian Day Number, Julian Day, or JD of a + // particular instant of time is the number of days and fractions of a + // day since 12 hours Universal Time (Greenwich mean noon) on January + // 1 of the year -4712, where the year is given in the Julian + // proleptic calendar. The idea of using this reference date was + // originally proposed by Joseph Scalizer in 1582 to count years but + // it was modified by 19th century astronomers to count days. One + // could have equivalently defined the reference time to be noon of + // November 24, -4713 if were understood that Gregorian calendar rules + // were applied. Julian days are Julian Day Numbers and are not to be + // confused with Julian dates. + // + // definition: The Rata Die number is a date specified as the number + // of days relative to a base date of December 31 of the year 0. Thus + // January 1 of the year 1 is Rata Die day 1. + + // get the Julian Day number (the fractional part specifies the time of + // the day, related to noon - beware of rounding errors!) + double GetJulianDayNumber(); + double GetJDN(); + + // get the Modified Julian Day number: it is equal to JDN - 2400000.5 + // and so integral MJDs correspond to the midnights (and not noons). + // MJD 0 is Nov 17, 1858 + double GetModifiedJulianDayNumber() const { return GetJDN() - 2400000.5; } + double GetMJD(); + + // get the Rata Die number + double GetRataDie(); + + + // ------------------------------------------------------------------------ + // timezone stuff + + // transform to any given timezone + wxDateTime ToTimezone(const wxDateTime::TimeZone& tz, bool noDST = FALSE); + wxDateTime& MakeTimezone(const wxDateTime::TimeZone& tz, bool noDST = FALSE); + + // transform to GMT/UTC + wxDateTime ToGMT(bool noDST = FALSE); + wxDateTime& MakeGMT(bool noDST = FALSE); + + // is daylight savings time in effect at this moment according to the + // rules of the specified country? + // + // Return value is > 0 if DST is in effect, 0 if it is not and -1 if + // the information is not available (this is compatible with ANSI C) + int IsDST(Country country = Country_Default); + + + + // ------------------------------------------------------------------------ + // accessors + + // is the date valid (TRUE even for non initialized objects)? + inline bool IsValid() const; + + // get the number of seconds since the Unix epoch - returns (time_t)-1 + // if the value is out of range + inline time_t GetTicks() const; + + // get the year (returns Inv_Year if date is invalid) + int GetYear(const wxDateTime::TimeZone& tz = LOCAL) const; + + // get the month (Inv_Month if date is invalid) + Month GetMonth(const wxDateTime::TimeZone& tz = LOCAL) const; + + // get the month day (in 1..31 range, 0 if date is invalid) + wxDateTime_t GetDay(const wxDateTime::TimeZone& tz = LOCAL) const; + + // get the day of the week (Inv_WeekDay if date is invalid) + WeekDay GetWeekDay(const wxDateTime::TimeZone& tz = LOCAL) const; + + // get the hour of the day + wxDateTime_t GetHour(const wxDateTime::TimeZone& tz = LOCAL) const; + + // get the minute + wxDateTime_t GetMinute(const wxDateTime::TimeZone& tz = LOCAL) const; + + // get the second + wxDateTime_t GetSecond(const wxDateTime::TimeZone& tz = LOCAL) const; + + // get milliseconds + wxDateTime_t GetMillisecond(const wxDateTime::TimeZone& tz = LOCAL) const; + + + // get the day since the year start (1..366, 0 if date is invalid) + wxDateTime_t GetDayOfYear(const wxDateTime::TimeZone& tz = LOCAL) const; + // get the week number since the year start (1..52 or 53, 0 if date is + // invalid) + wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First, + const wxDateTime::TimeZone& tz = LOCAL) const; + // get the week number since the month start (1..5, 0 if date is + // invalid) + wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First, + const wxDateTime::TimeZone& tz = LOCAL) const; + + // is this date a work day? This depends on a country, of course, + // because the holidays are different in different countries + bool IsWorkDay(Country country = Country_Default) const; + + // is this date later than Gregorian calendar introduction for the + // given country (see enum GregorianAdoption)? + // + // NB: this function shouldn't be considered as absolute authority in + // the matter. Besides, for some countries the exact date of + // adoption of the Gregorian calendar is simply unknown. + //bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const; + + + // ------------------------------------------------------------------------ + // comparison (see also functions below for operator versions) + + // returns TRUE if the two moments are strictly identical + inline bool IsEqualTo(const wxDateTime& datetime) const; + + // returns TRUE if the date is strictly earlier than the given one + inline bool IsEarlierThan(const wxDateTime& datetime) const; + + // returns TRUE if the date is strictly later than the given one + inline bool IsLaterThan(const wxDateTime& datetime) const; + + // returns TRUE if the date is strictly in the given range + inline bool IsStrictlyBetween(const wxDateTime& t1, + const wxDateTime& t2) const; + + // returns TRUE if the date is in the given range + inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const; + + // do these two objects refer to the same date? + inline bool IsSameDate(const wxDateTime& dt) const; + + // do these two objects have the same time? + inline bool IsSameTime(const wxDateTime& dt) const; + + // are these two objects equal up to given timespan? + inline bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const; + + + // ------------------------------------------------------------------------ + // arithmetics with dates (see also below for more operators) + + // add a time span (positive or negative) + %name(AddTS) wxDateTime& Add(const wxTimeSpan& diff); + // add a date span (positive or negative) + %name(AddDS) wxDateTime& Add(const wxDateSpan& diff); + + // subtract a time span (positive or negative) + %name(SubtractTS) wxDateTime& Subtract(const wxTimeSpan& diff); + + // subtract a date span (positive or negative) + %name(SubtractDS) wxDateTime& Subtract(const wxDateSpan& diff); + + // return the difference between two dates + wxTimeSpan Subtract(const wxDateTime& dt) const; + + + %addmethods { + wxDateTime __add__TS(const wxTimeSpan& other) { return *self + other; } + wxDateTime __add__DS(const wxDateSpan& other) { return *self + other; } + + wxTimeSpan __sub__DT(const wxDateTime& other) { return *self - other; } + wxDateTime __sub__TS(const wxTimeSpan& other) { return *self - other; } + wxDateTime __sub__DS(const wxDateSpan& other) { return *self - other; } + + int __cmp__(const wxDateTime& other) { + if (*self < other) return -1; + if (*self == other) return 0; + return 1; + } + } + + %pragma(python) addtoclass = " + def __add__(self, other): + if string.find(other.this, 'wxTimeSpan') != -1: + return self.__add__TS(other) + if string.find(other.this, 'wxDateSpan') != -1: + return self.__add__DS(other) + raise TypeError, 'Invalid r.h.s. type for __add__' + def __sub__(self, other): + if string.find(other.this, 'wxDateTime') != -1: + return self.__sub__DT(other) + if string.find(other.this, 'wxTimeSpan') != -1: + return self.__sub__TS(other) + if string.find(other.this, 'wxDateSpan') != -1: + return self.__sub__DS(other) + raise TypeError, 'Invalid r.h.s. type for __sub__' +" + + // ------------------------------------------------------------------------ + // conversion to/from text: all conversions from text return the pointer to + // the next character following the date specification (i.e. the one where + // the scan had to stop) or NULL on failure. + + // parse a string in RFC 822 format (found e.g. in mail headers and + // having the form "Wed, 10 Feb 1999 19:07:07 +0100") + const char *ParseRfc822Date(const char* date); + + // parse a date/time in the given format (see strptime(3)), fill in + // the missing (in the string) fields with the values of dateDef (by + // default, they will not change if they had valid values or will + // default to Today() otherwise) + const char *ParseFormat(const char *date, + const char *format = "%c", + const wxDateTime& dateDef = wxDefaultDateTime); + + // parse a string containing the date/time in "free" format, this + // function will try to make an educated guess at the string contents + const char *ParseDateTime(const char *datetime); + + // parse a string containing the date only in "free" format (less + // flexible than ParseDateTime) + const char *ParseDate(const char *date); + + // parse a string containing the time only in "free" format + const char *ParseTime(const char *time); + + // this function accepts strftime()-like format string (default + // argument corresponds to the preferred date and time representation + // for the current locale) and returns the string containing the + // resulting text representation + wxString Format(const char *format = "%c", + const wxDateTime::TimeZone& tz = LOCAL) const; + + // preferred date representation for the current locale + wxString FormatDate() const; + + // preferred time representation for the current locale + wxString FormatTime() const; + + // returns the string representing the date in ISO 8601 format + // (YYYY-MM-DD) + wxString FormatISODate() const; + + // returns the string representing the time in ISO 8601 format + // (HH:MM:SS) + wxString FormatISOTime() const; + + %pragma(python) addtoclass = " + def __repr__(self): + return '' % ( self.Format(), self.this) + def __str__(self): + return self.Format() +" + +}; + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- + + +class wxTimeSpan +{ +public: + // return the timespan for the given number of seconds + static wxTimeSpan Seconds(long sec); + static wxTimeSpan Second(); + + // return the timespan for the given number of minutes + static wxTimeSpan Minutes(long min); + static wxTimeSpan Minute(); + + // return the timespan for the given number of hours + static wxTimeSpan Hours(long hours); + static wxTimeSpan Hour(); + + // return the timespan for the given number of days + static wxTimeSpan Days(long days); + static wxTimeSpan Day(); + + // return the timespan for the given number of weeks + static wxTimeSpan Weeks(long days); + static wxTimeSpan Week(); + + // ------------------------------------------------------------------------ + // constructors + + // from separate values for each component, date set to 0 (hours are + // not restricted to 0..24 range, neither are minutes, seconds or + // milliseconds) + wxTimeSpan(long hours = 0, + long minutes = 0, + long seconds = 0, + long milliseconds = 0); + + ~wxTimeSpan(); + + // ------------------------------------------------------------------------ + // arithmetics with time spans + + // add two timespans together + inline wxTimeSpan& Add(const wxTimeSpan& diff); + + // subtract another timespan + inline wxTimeSpan& Subtract(const wxTimeSpan& diff); + + // multiply timespan by a scalar + inline wxTimeSpan& Multiply(int n); + + // negate the value of the timespan + wxTimeSpan& Neg(); + + // return the absolute value of the timespan: does _not_ modify the + // object + inline wxTimeSpan Abs() const; + + %addmethods { + wxTimeSpan __add__(const wxTimeSpan& other) { return *self + other; } + wxTimeSpan __sub__(const wxTimeSpan& other) { return *self - other; } + wxTimeSpan __mul__(int n) { return *self * n; } + wxTimeSpan __rmul__(int n) { return n * *self; } + wxTimeSpan __neg__() { return self->Negate(); } + int __cmp__(const wxTimeSpan& other) { + if (*self < other) return -1; + if (*self == other) return 0; + return 1; + } + } + + // comparaison (see also operator versions below) + // ------------------------------------------------------------------------ + + // is the timespan null? + bool IsNull() const; + + // is the timespan positive? + bool IsPositive() const; + + // is the timespan negative? + bool IsNegative() const; + + // are two timespans equal? + inline bool IsEqualTo(const wxTimeSpan& ts) const; + + // compare two timestamps: works with the absolute values, i.e. -2 + // hours is longer than 1 hour. Also, it will return FALSE if the + // timespans are equal in absolute value. + inline bool IsLongerThan(const wxTimeSpan& ts) const; + + // compare two timestamps: works with the absolute values, i.e. 1 + // hour is shorter than -2 hours. Also, it will return FALSE if the + // timespans are equal in absolute value. + bool IsShorterThan(const wxTimeSpan& t) const; + + // ------------------------------------------------------------------------ + // breaking into days, hours, minutes and seconds + + // get the max number of weeks in this timespan + inline int GetWeeks() const; + // get the max number of days in this timespan + inline int GetDays() const; + // get the max number of hours in this timespan + inline int GetHours() const; + // get the max number of minutes in this timespan + inline int GetMinutes() const; + + + // get the max number of seconds in this timespan + inline wxLongLong GetSeconds() const; + // get the number of milliseconds in this timespan + wxLongLong GetMilliseconds() const; + + // ------------------------------------------------------------------------ + // conversion to text + + // this function accepts strftime()-like format string (default + // argument corresponds to the preferred date and time representation + // for the current locale) and returns the string containing the + // resulting text representation. Notice that only some of format + // specifiers valid for wxDateTime are valid for wxTimeSpan: hours, + // minutes and seconds make sense, but not "PM/AM" string for example. + wxString Format(const char *format = "%c") const; + +// // preferred date representation for the current locale +// wxString FormatDate() const; + +// // preferred time representation for the current locale +// wxString FormatTime() const; + +// %pragma(python) addtoclass = " +// def __repr__(self): +// return '' % ( self.Format(), self.this) +// def __str__(self): +// return self.Format() +// " +}; + + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- + +class wxDateSpan +{ +public: + // this many years/months/weeks/days + wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0) + { + m_years = years; + m_months = months; + m_weeks = weeks; + m_days = days; + } + + ~wxDateSpan(); + + // get an object for the given number of days + static wxDateSpan Days(int days); + static wxDateSpan Day(); + + // get an object for the given number of weeks + static wxDateSpan Weeks(int weeks); + static wxDateSpan Week(); + + // get an object for the given number of months + static wxDateSpan Months(int mon); + static wxDateSpan Month(); + + // get an object for the given number of years + static wxDateSpan Years(int years); + static wxDateSpan Year(); + + + // ------------------------------------------------------------------------ + + // set number of years + wxDateSpan& SetYears(int n); + // set number of months + wxDateSpan& SetMonths(int n); + // set number of weeks + wxDateSpan& SetWeeks(int n); + // set number of days + wxDateSpan& SetDays(int n); + + // get number of years + int GetYears() const; + // get number of months + int GetMonths() const; + // get number of weeks + int GetWeeks() const; + // get number of days + int GetDays() const; + // returns 7*GetWeeks() + GetDays() + int GetTotalDays() const; + + + // ------------------------------------------------------------------------ + + // add another wxDateSpan to us + inline wxDateSpan& Add(const wxDateSpan& other); + + // subtract another wxDateSpan from us + inline wxDateSpan& Subtract(const wxDateSpan& other); + + // inverse the sign of this timespan + inline wxDateSpan& Neg(); + + // multiply all components by a (signed) number + inline wxDateSpan& Multiply(int factor); + + %addmethods { + wxDateSpan __add__(const wxDateSpan& other) { return *self + other; } + wxDateSpan __sub__(const wxDateSpan& other) { return *self - other; } + wxDateSpan __mul__(int n) { return *self * n; } + wxDateSpan __rmul__(int n) { return n * *self; } + wxDateSpan __neg__() { return self->Negate(); } + } +}; + + +//--------------------------------------------------------------------------- + +long wxGetLocalTime(); +long wxGetUTCTime(); +long wxGetCurrentTime(); +wxLongLong wxGetLocalTimeMillis(); + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- + +%init %{ + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); +%} + +//--------------------------------------------------------------------------- + diff --git a/utils/wxPython/src/windows.i b/wxPython/src/windows.i similarity index 78% rename from utils/wxPython/src/windows.i rename to wxPython/src/windows.i index 6894912fd5..1b2abd0737 100644 --- a/utils/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -31,11 +31,19 @@ %pragma(python) code = "import wx" + +%{ + static wxString wxPyEmptyStr(""); +%} + //--------------------------------------------------------------------------- class wxEvtHandler { public: + wxEvtHandler(); + bool ProcessEvent(wxEvent& event); + void AddPendingEvent(wxEvent& event); //bool SearchEventTable(wxEventTable& table, wxEvent& event); bool GetEvtHandlerEnabled(); @@ -64,6 +72,32 @@ public: } } + + %pragma(python) addtoclass = " + _prop_list_ = {} + " + +// %pragma(python) addtoclass = " +// def __getattr__(self, name): +// pl = self._prop_list_ +// if pl.has_key(name): +// getFunc, setFunc = pl[name] +// if getFunc: +// return getattr(self, getFunc)() +// else: +// raise TypeError, '%s property is write-only' % name +// raise AttributeError, name + +// def __setattr__(self, name, value): +// pl = self._prop_list_ +// if pl.has_key(name): +// getFunc, setFunc = pl[name] +// if setFunc: +// return getattr(self, setFunc)(value) +// else: +// raise TypeError, '%s property is read-only' % name +// self.__dict__[name] = value +// " }; @@ -77,6 +111,14 @@ public: wxValidator* Clone(); wxWindow* GetWindow(); void SetWindow(wxWindow* window); + +// // Properties list +// %pragma(python) addtoclass = " +// _prop_list_ = { +// 'window' : ('GetWindow', 'SetWindow'), +// } +// _prop_list_.update(wxEvtHandler._prop_list_) +// " }; %inline %{ @@ -109,7 +151,10 @@ public: if (self->m_myInst.findCallback("Clone")) { PyObject* ro; ro = self->m_myInst.callCallbackObj(Py_BuildValue("()")); - SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p"); + if (ro) { + SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p"); + Py_DECREF(ro); + } } // This is very dangerous!!! But is the only way I could find // to squash a memory leak. Currently it is okay, but if the @@ -144,8 +189,8 @@ public: %addmethods { void Destroy() { delete self; } } - void _setSelf(PyObject* self, int incref=TRUE); - %pragma(python) addtomethod = "__init__:self._setSelf(self, 0)" + void _setSelf(PyObject* self, PyObject* _class, int incref=TRUE); + %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyValidator, 0)" }; @@ -157,18 +202,20 @@ class wxWindow : public wxEvtHandler { public: wxWindow(wxWindow* parent, const wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "panel"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void CaptureMouse(); void Center(int direction = wxBOTH); void Centre(int direction = wxBOTH); void CentreOnParent(int direction = wxBOTH ); void CenterOnParent(int direction = wxBOTH ); + void CentreOnScreen(int direction = wxBOTH ); + void CenterOnScreen(int direction = wxBOTH ); // (uses apply'ed INOUT typemap, see above) %name(ClientToScreenXY)void ClientToScreen(int* x, int* y); @@ -230,6 +277,8 @@ public: wxString GetTitle(); wxRegion GetUpdateRegion(); long GetWindowStyleFlag(); + void SetWindowStyleFlag(long style); + void SetWindowStyle(long style); bool Hide(); void InitDialog(); bool IsEnabled(); @@ -287,6 +336,10 @@ public: void SetPosition(const wxPoint& pos) { self->Move(pos); } + + void SetRect(const wxRect& rect, int sizeFlags=wxSIZE_AUTO) { + self->SetSize(rect, sizeFlags); + } } void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1); @@ -316,6 +369,8 @@ public: wxToolTip* GetToolTip(); void SetSizer(wxSizer* sizer); + wxSizer* GetSizer(); + wxValidator* GetValidator(); void SetValidator(const wxValidator& validator); @@ -327,16 +382,61 @@ public: void SetCaret(wxCaret *caret); wxCaret *GetCaret(); - %pragma(python) addtoclass = "# replaces broken shadow method + %pragma(python) addtoclass = "# replaces broken shadow methods def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val -" + + def GetSizer(self, *_args, **_kwargs): + from sizers import wxSizerPtr + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val + + def GetToolTip(self, *_args, **_kwargs): + from misc2 import wxToolTipPtr + val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) + if val: val = wxToolTipPtr(val) + return val + " + + +// // Properties list +// %pragma(python) addtoclass = " +// _prop_list_ = { +// 'size' : ('GetSize', 'SetSize'), +// 'enabled' : ('IsEnabled', 'Enable'), +// 'background' : ('GetBackgroundColour', 'SetBackgroundColour'), +// 'foreground' : ('GetForegroundColour', 'SetForegroundColour'), +// 'children' : ('GetChildren', None), +// 'charHeight' : ('GetCharHeight', None), +// 'charWidth' : ('GetCharWidth', None), +// 'clientSize' : ('GetClientSize', 'SetClientSize'), +// 'font' : ('GetFont', 'SetFont'), +// 'grandParent' : ('GetGrandParent', None), +// 'handle' : ('GetHandle', None), +// 'label' : ('GetLabel', 'SetLabel'), +// 'name' : ('GetName', 'SetName'), +// 'parent' : ('GetParent', None), +// 'position' : ('GetPosition', 'SetPosition'), +// 'title' : ('GetTitle', 'SetTitle'), +// 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'), +// 'visible' : ('IsShown', 'Show'), +// 'toolTip' : ('GetToolTip', 'SetToolTip'), +// 'sizer' : ('GetSizer', 'SetSizer'), +// 'validator' : ('GetValidator', 'SetValidator'), +// 'dropTarget' : ('GetDropTarget', 'SetDropTarget'), +// 'caret' : ('GetCaret', 'SetCaret'), +// 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'), +// 'constraints' : ('GetConstraints', 'SetConstraints'), + +// } +// _prop_list_.update(wxEvtHandler._prop_list_) +// " }; -//%clear int* x, int* y; @@ -354,7 +454,6 @@ def wxDLG_SZE(win, size_width, height=None): return win.ConvertDialogSizeToPixels(wxSize(size_width, height)) " -#ifdef __WXMSW__ %inline %{ wxWindow* wxWindow_FindFocus() { return wxWindow::FindFocus(); @@ -362,6 +461,7 @@ def wxDLG_SZE(win, size_width, height=None): %} +#ifdef __WXMSW__ %inline %{ wxWindow* wxWindow_FromHWND(unsigned long hWnd) { wxWindow* win = new wxWindow; @@ -391,12 +491,12 @@ class wxPanel : public wxWindow { public: wxPanel(wxWindow* parent, const wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const char* name = "panel"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" void InitDialog(); wxButton* GetDefaultItem(); @@ -419,12 +519,12 @@ public: wxDialog(wxWindow* parent, const wxWindowID id, const wxString& title, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const char* name = "dialogBox"); - %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)" void Centre(int direction = wxBOTH); void EndModal(int retCode); @@ -447,13 +547,13 @@ class wxScrolledWindow : public wxPanel { public: wxScrolledWindow(wxWindow* parent, const wxWindowID id = -1, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, char* name = "scrolledWindow"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" void EnableScrolling(bool xScrolling, bool yScrolling); int GetScrollPageSize(int orient); @@ -465,7 +565,7 @@ public: void Scroll(int x, int y); void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, - int xPos = 0, int yPos = 0); + int xPos = 0, int yPos = 0, int noRefresh=FALSE); void SetScrollPageSize(int orient, int pageSize); void SetTargetWindow(wxWindow* window); void GetViewStart(int* OUTPUT, int* OUTPUT); @@ -550,7 +650,7 @@ public: class wxMenuBar : public wxWindow { public: - wxMenuBar(); + wxMenuBar(long style = 0); bool Append(wxMenu *menu, const wxString& title); bool Insert(size_t pos, wxMenu *menu, const wxString& title); diff --git a/utils/wxPython/src/windows2.i b/wxPython/src/windows2.i similarity index 84% rename from utils/wxPython/src/windows2.i rename to wxPython/src/windows2.i index cf659ab5ac..b5c4d0ebd9 100644 --- a/utils/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -14,7 +14,9 @@ %{ #include "helpers.h" +#ifdef OLD_GRID #include +#endif #include #include #ifdef __WXMSW__ @@ -39,7 +41,7 @@ //--------------------------------------------------------------------------- -//#ifdef OLD_GRID +#ifdef OLD_GRID enum { wxGRID_TEXT_CTRL, @@ -73,21 +75,21 @@ public: class wxGrid : public wxPanel { public: wxGrid(wxWindow* parent, wxWindowID id, - const wxPoint& pos=wxPyDefaultPosition, - const wxSize& size=wxPyDefaultSize, + const wxPoint& pos=wxDefaultPosition, + const wxSize& size=wxDefaultSize, long style=0, char* name="grid"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK)" void AdjustScrollbars(); @@ -236,7 +238,7 @@ enum { wxEVT_GRID_LABEL_RCLICK, }; -//#endif +#endif //--------------------------------------------------------------------------- @@ -254,12 +256,12 @@ class wxNotebook : public wxControl { public: wxNotebook(wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, char* name = "notebook"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" int GetPageCount(); int SetSelection(int nPage); @@ -273,8 +275,8 @@ public: bool SetPageImage(int nPage, int nImage); int GetRowCount(); - // LINK ERROR: void SetPageSize(const wxSize& size); - // LINK ERROR: void SetPadding(const wxSize& padding); + void SetPageSize(const wxSize& size); + void SetPadding(const wxSize& padding); bool DeletePage(int nPage); bool RemovePage(int nPage); bool DeleteAllPages(); @@ -282,13 +284,11 @@ public: const wxString& strText, int bSelect = FALSE, int imageId = -1); -#ifdef __WXMSW__ bool InsertPage(int nPage, /*wxNotebookPage*/ wxWindow *pPage, const wxString& strText, bool bSelect = FALSE, int imageId = -1); -#endif /*wxNotebookPage*/ wxWindow *GetPage(int nPage); %addmethods { @@ -303,6 +303,18 @@ public: //--------------------------------------------------------------------------- + +enum +{ + wxSPLIT_HORIZONTAL, + wxSPLIT_VERTICAL, + wxSPLIT_DRAG_NONE, + wxSPLIT_DRAG_DRAGGING, + wxSPLIT_DRAG_LEFT_DOWN + +}; + + class wxSplitterEvent : public wxCommandEvent { public: int GetSashPosition(); @@ -318,12 +330,12 @@ public: class wxSplitterWindow : public wxWindow { public: wxSplitterWindow(wxWindow* parent, wxWindowID id, - const wxPoint& point = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& point = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style=wxSP_3D|wxCLIP_CHILDREN, char* name = "splitterWindow"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" int GetBorderSize(); int GetMinimumPaneSize(); @@ -366,6 +378,7 @@ public: wxTaskBarIcon(); ~wxTaskBarIcon(); + // We still use the magic methods here since that is the way it is documented... %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE)" %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN)" %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP)" @@ -377,7 +390,8 @@ public: bool SetIcon(const wxIcon& icon, const char* tooltip = ""); bool RemoveIcon(void); bool PopupMenu(wxMenu *menu); - + bool IsIconInstalled(); + bool IsOK(); }; #endif diff --git a/utils/wxPython/src/windows3.i b/wxPython/src/windows3.i similarity index 86% rename from utils/wxPython/src/windows3.i rename to wxPython/src/windows3.i index b5c64af864..1bd4260499 100644 --- a/utils/wxPython/src/windows3.i +++ b/wxPython/src/windows3.i @@ -47,6 +47,9 @@ enum wxSashEdgePosition { enum { wxEVT_SASH_DRAGGED, wxSW_3D, + wxSW_3DSASH, + wxSW_3DBORDER, + wxSW_BORDER }; enum wxSashDragStatus @@ -71,12 +74,12 @@ public: class wxSashWindow: public wxWindow { public: wxSashWindow(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const char* name = "sashWindow"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" bool GetSashVisible(wxSashEdgePosition edge); int GetDefaultBorderSize(); @@ -150,14 +153,14 @@ public: class wxSashLayoutWindow: public wxSashWindow { public: wxSashLayoutWindow(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxPyDefaultPosition, - const wxSize& size = wxPyDefaultSize, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const char* name = "layoutWindow"); - %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)" - %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)" + %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)" + %pragma(python) addtomethod = "__init__:#wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)" wxLayoutAlignment GetAlignment(); diff --git a/utils/wxPython/src/wx.i b/wxPython/src/wx.i similarity index 72% rename from utils/wxPython/src/wx.i rename to wxPython/src/wx.i index 7f2be4dd7e..0f7cd3012e 100644 --- a/utils/wxPython/src/wx.i +++ b/wxPython/src/wx.i @@ -43,7 +43,8 @@ %import image.i %import printfw.i %import sizers.i - +%import streams.i +%import filesys.i %native(_wxStart) __wxStart; %native(_wxSetDictionary) __wxSetDictionary; @@ -51,10 +52,12 @@ //--------------------------------------------------------------------------- -#define __version__ "0.0.0" // The real value is now in build.py... +#define __version__ "0.0.0" // The real value is now in setup.py... -wxPoint wxPyDefaultPosition; -wxSize wxPyDefaultSize; +%readonly +wxPoint wxDefaultPosition; +wxSize wxDefaultSize; +%readwrite //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- @@ -79,6 +82,7 @@ public: int GetPrintMode(); wxWindow * GetTopWindow(); wxString GetVendorName(); + bool GetUseBestVisual(); void Dispatch(); void ExitMainLoop(); @@ -96,12 +100,17 @@ public: void SetPrintMode(int mode); void SetTopWindow(wxWindow* window); void SetVendorName(const wxString& name); - + void SetUseBestVisual(bool flag); wxIcon GetStdIcon(int which); }; +%inline %{ + wxPyApp* wxGetApp() { + return wxPythonApp; + } +%} //---------------------------------------------------------------------- // this is used to cleanup after wxWindows when Python shuts down. @@ -117,6 +126,8 @@ public: //---------------------------------------------------------------------- %{ + + extern "C" SWIGEXPORT(void) initwindowsc(); extern "C" SWIGEXPORT(void) initwindows2c(); extern "C" SWIGEXPORT(void) initeventsc(); @@ -134,17 +145,66 @@ extern "C" SWIGEXPORT(void) initimagec(); extern "C" SWIGEXPORT(void) initprintfwc(); extern "C" SWIGEXPORT(void) initsizersc(); extern "C" SWIGEXPORT(void) initclip_dndc(); +extern "C" SWIGEXPORT(void) initstreamsc(); +extern "C" SWIGEXPORT(void) initfilesysc(); + + + +// Export a C API in a struct. Other modules will be able to load this from +// the wxc module and will then have safe access to these functions, even if +// in another shared library. +static wxPyCoreAPI API = { + SWIG_MakePtr, + SWIG_GetPtr, + SWIG_GetPtrObj, + SWIG_RegisterMapping, + SWIG_addvarlink, + SWIG_newvarlink, + + wxPySaveThread, + wxPyRestoreThread, + wxPyConstructObject, + wxPy_ConvertList, + + byte_LIST_helper, + int_LIST_helper, + long_LIST_helper, + string_LIST_helper, + wxPoint_LIST_helper, + wxBitmap_LIST_helper, + wxString_LIST_helper, + wxAcceleratorEntry_LIST_helper, + + wxSize_helper, + wxPoint_helper, + wxRealPoint_helper, + wxRect_helper, + wxColour_helper, + + wxPyCBH_setSelf, + wxPyCBH_findCallback, + wxPyCBH_callCallback, + wxPyCBH_callCallbackObj, + wxPyCBH_delete, +}; + %} %init %{ + // Make our API structure a CObject so other modules can import it + // from this module. + PyObject* v = PyCObject_FromVoidPtr(&API, NULL); + PyDict_SetItemString(d,"wxPyCoreAPI", v); + Py_XDECREF(v); + __wxPreStart(); // initialize the GUI toolkit, if needed. // Since these modules are all linked together, initialize them now - // because python won't be able to find their shared library files, + // because Python won't be able to find their shared library files, // (since there isn't any.) initwindowsc(); initwindows2c(); @@ -163,6 +223,9 @@ extern "C" SWIGEXPORT(void) initclip_dndc(); initprintfwc(); initsizersc(); initclip_dndc(); + initstreamsc(); + initfilesysc(); + %} //---------------------------------------------------------------------- diff --git a/utils/wxPython/src/wxc.rc b/wxPython/src/wxc.rc similarity index 68% rename from utils/wxPython/src/wxc.rc rename to wxPython/src/wxc.rc index a4d4738e9a..dabba42f8c 100644 --- a/utils/wxPython/src/wxc.rc +++ b/wxPython/src/wxc.rc @@ -1,3 +1,3 @@ -wxpicon ICON "wxp.ico" +aa_wxpicon ICON "wxp.ico" #include "wx/msw/wx.rc" #include "wx/html/msw/wxhtml.rc" diff --git a/utils/wxPython/src/wxp.ico b/wxPython/src/wxp.ico similarity index 100% rename from utils/wxPython/src/wxp.ico rename to wxPython/src/wxp.ico diff --git a/utils/wxPython/tests/.cvsignore b/wxPython/tests/.cvsignore similarity index 100% rename from utils/wxPython/tests/.cvsignore rename to wxPython/tests/.cvsignore diff --git a/utils/wxPython/tests/README.txt b/wxPython/tests/README.txt similarity index 96% rename from utils/wxPython/tests/README.txt rename to wxPython/tests/README.txt index 7411213f1f..ca2d358b96 100644 --- a/utils/wxPython/tests/README.txt +++ b/wxPython/tests/README.txt @@ -6,4 +6,7 @@ program found in ../demo. They are still used from time to time for my development efforts, but they should not be included with any distributions. -Robin \ No newline at end of file +Robin + + + diff --git a/utils/wxPython/tests/TstLstIcon.py b/wxPython/tests/TstLstIcon.py similarity index 100% rename from utils/wxPython/tests/TstLstIcon.py rename to wxPython/tests/TstLstIcon.py diff --git a/utils/wxPython/tests/atom.bmp b/wxPython/tests/atom.bmp similarity index 100% rename from utils/wxPython/tests/atom.bmp rename to wxPython/tests/atom.bmp diff --git a/wxPython/tests/bitmaps/copy.bmp b/wxPython/tests/bitmaps/copy.bmp new file mode 100644 index 0000000000000000000000000000000000000000..4551a06bfa79e0a42c1ffb7cdbb90fd4f699dce2 GIT binary patch literal 238 zcmZvVK?*`K3`9pLxU9$U91{2|@hV+>tjiv)Cz3AyzP{vxy7<$~OeTT!c7JQf6T89- z%?kmn<${;(P#uFN<0A#FuUo(qgT{&F@ekspii W=d@ZzPG(Cb=QBs}_=7thzxV(viB<;y literal 0 HcmV?d00001 diff --git a/wxPython/tests/bitmaps/mondrian.ico b/wxPython/tests/bitmaps/mondrian.ico new file mode 100644 index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53 GIT binary patch literal 766 zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0Zb0l4tjP;1(ew=nJ8j|<6WY3bU0`GK9aK^RUId`!4(ELX-1{H u>6c`QQqJ8_T9s0iQsQ8(Wab^@`3kuPA_p->w)Xt4Pkz>06 literal 0 HcmV?d00001 diff --git a/utils/wxPython/tests/bitmaps/open.bmp b/wxPython/tests/bitmaps/open.bmp similarity index 100% rename from utils/wxPython/tests/bitmaps/open.bmp rename to wxPython/tests/bitmaps/open.bmp diff --git a/wxPython/tests/bitmaps/paste.bmp b/wxPython/tests/bitmaps/paste.bmp new file mode 100644 index 0000000000000000000000000000000000000000..564f514e0df7225f0a7adbe8457b41af537813bd GIT binary patch literal 238 zcmZvVF%Ci@5Jbns$83OZ*I;# co}I%%@f6>ra3+S=gC69}eM%GII+SAI4J;x>B>(^b literal 0 HcmV?d00001 diff --git a/utils/wxPython/tests/bitmaps/smiles.bmp b/wxPython/tests/bitmaps/smiles.bmp similarity index 100% rename from utils/wxPython/tests/bitmaps/smiles.bmp rename to wxPython/tests/bitmaps/smiles.bmp diff --git a/utils/wxPython/tests/bitmaps/smiles.ico b/wxPython/tests/bitmaps/smiles.ico similarity index 100% rename from utils/wxPython/tests/bitmaps/smiles.ico rename to wxPython/tests/bitmaps/smiles.ico diff --git a/utils/wxPython/demo/bitmaps/test2.bmp b/wxPython/tests/bitmaps/test2.bmp similarity index 100% rename from utils/wxPython/demo/bitmaps/test2.bmp rename to wxPython/tests/bitmaps/test2.bmp diff --git a/utils/wxPython/tests/bitmaps/tog1.bmp b/wxPython/tests/bitmaps/tog1.bmp similarity index 100% rename from utils/wxPython/tests/bitmaps/tog1.bmp rename to wxPython/tests/bitmaps/tog1.bmp diff --git a/utils/wxPython/tests/bitmaps/tog2.bmp b/wxPython/tests/bitmaps/tog2.bmp similarity index 100% rename from utils/wxPython/tests/bitmaps/tog2.bmp rename to wxPython/tests/bitmaps/tog2.bmp diff --git a/utils/wxPython/tests/blit.py b/wxPython/tests/blit.py similarity index 100% rename from utils/wxPython/tests/blit.py rename to wxPython/tests/blit.py diff --git a/wxPython/tests/dynamicform.py b/wxPython/tests/dynamicform.py new file mode 100644 index 0000000000..e65b3fddc5 --- /dev/null +++ b/wxPython/tests/dynamicform.py @@ -0,0 +1,62 @@ + + +from wxPython.wx import * + +class FieldData: + def __init__(self, name, label, shortHelp="", defValue="", + size=(-1, -1), style=0, ID=-1): + self.name = name + self.label = label + self.shortHelp = shortHelp + self.defValue = defValue + self.size = size + self.style = style + self.ID = ID + + +class DynamicForm(wxPanel): + def __init__(self, parent, ID, fieldData): + wxPanel.__init__(self, parent, ID) + + sizer = wxFlexGridSizer(cols=2, vgap=5, hgap=5) + for field in fieldData: + label = wxStaticText(self, -1, field.label) + sizer.Add(label, 0, wxALIGN_RIGHT) + text = wxTextCtrl(self, field.ID, field.defValue, + size=field.size, style=field.style) + if field.shortHelp: + text.SetToolTip(wxToolTip(field.shortHelp)) + self.__dict__["get_"+field.name] = text.GetValue + self.__dict__["set_"+field.name] = text.SetValue + sizer.Add(text, 0, wxEXPAND) + + sizer.Fit(self) + self.SetAutoLayout(true) + self.SetSizer(sizer) + + +class TestFrame(wxFrame): + testFields = [ + FieldData("fname", "First name:", "Enter someone's first name"), + FieldData("lname", "Last name:", "Enter someone's last name"), + FieldData("email", "Email address:", "just figure it out..."), + ] + def __init__(self): + wxFrame.__init__(self, None, -1, "This is a test") + form = DynamicForm(self, -1, self.testFields) + form.set_fname("Robin") + form.set_lname("Dunn") + self.form = form + self.Fit() + EVT_CLOSE(self, self.OnCloseWindow) + + def OnCloseWindow(self, evt): + print self.form.get_email() + self.Destroy() + + +app = wxPySimpleApp() +frame = TestFrame() +frame.Show(true) +app.MainLoop() + diff --git a/wxPython/tests/fs_test.py b/wxPython/tests/fs_test.py new file mode 100644 index 0000000000..f9712cd01b --- /dev/null +++ b/wxPython/tests/fs_test.py @@ -0,0 +1,41 @@ + + +from wxPython.wx import * +import glob + +class File2(wxFileSystemHandler): + + def CanOpen(self,location): + return self.GetProtocol(location) == "file2" + + def OpenFile(self,fs,location): + return wxFSFile(wxInputStream(open(self.GetRightLocation(location),"rb")), + location,"text/plain","",wxDateTime()) + + def FindFirst(self,location,flags): + # the flags are ignored + self.files = glob.glob(self.GetRightLocation(location)) + if len(self.files) == 0: + return "" + else: + return self.files[0] + + def FindNext(self): + self.files = self.files[1:] + if len(self.files) == 0: + return "" + else: + return self.files[0] + +# register new handler +wxFileSystem_AddHandler(File2()) +fs = wxFileSystem() + +# cat /etc/passwd +print fs.OpenFile("file2:/projects/files.lst").GetStream().read() + +# ls /etc/* +fn = fs.FindFirst("file2:/projects/*") +while fn: + print fn + fn = fs.FindNext() diff --git a/utils/wxPython/tests/getvalues.py b/wxPython/tests/getvalues.py similarity index 100% rename from utils/wxPython/tests/getvalues.py rename to wxPython/tests/getvalues.py diff --git a/utils/wxPython/tests/grid.py b/wxPython/tests/grid.py similarity index 100% rename from utils/wxPython/tests/grid.py rename to wxPython/tests/grid.py diff --git a/wxPython/tests/gridtest.py b/wxPython/tests/gridtest.py new file mode 100644 index 0000000000..c4988db150 --- /dev/null +++ b/wxPython/tests/gridtest.py @@ -0,0 +1,219 @@ +# wxGrid workout + +import sys + +#---------------------------------------------------------------------------- +from wxPython.wx import * +from wxPython.grid import * + +class MyCellEditor(wxPyGridCellEditor): + """ + A custom GridCellEditor that only accepts numbers. + Also tries to work around wxGTK anomaly that key cannot start edit. + """ + + def Create(self, parent, id, evtHandler): + """ + Called to create the control, which must derive from wxControl. + *Must Override* + """ + print "Create" + theStyle = 0 + if wxPlatform == '__WXMSW__': + theStyle = wxTE_PROCESS_TAB | wxTE_MULTILINE | wxTE_NO_VSCROLL | wxTE_AUTO_SCROLL + #theStyle = wxTE_PROCESS_TAB | wxTE_PROCESS_ENTER + + self._tc = wxTextCtrl(parent, id, "", style=theStyle) + self._tc.SetInsertionPoint(0) + self.SetControl(self._tc) + if evtHandler: + print evtHandler + self._tc.PushEventHandler(evtHandler) + + + def SetSize(self, rect): + """ + Called to position/size the edit control within the cell rectangle. + If you don't fill the cell (the rect) then be sure to override + PaintBackground and do something meaningful there. + """ + self._tc.SetDimensions(rect.x-1, rect.y-1, rect.width+4, rect.height+4) + + def BeginEdit(self, row, col, grid): + """ + Fetch the value from the table and prepare the edit control + to begin editing. Set the focus to the edit control. + *Must Override* + """ + print "BeginEdit" + self.startValue = grid.GetTable().GetValue(row, col) + self._tc.SetValue(self.startValue) + self._tc.SetFocus() + + def EndEdit(self, row, col, grid): + """ + Complete the editing of the current cell. Returns true if the value + has changed. If necessary, the control may be destroyed. + *Must Override* + """ + changed = false + val = self._tc.GetValue() + if val != self.startValue: + changed = true + grid.GetTable().SetValue(row, col, val) # update the table + + self.startValue = '' + self._tc.SetValue('') + return changed + + + def Reset(self): + """ + Reset the value in the control back to its starting value. + *Must Override* + """ + self._tc.SetValue(self.startValue) + self._tc.SetInsertionPointEnd() + + + def IsAcceptedKey(self, evt): + """ + Return TRUE to allow the given key to start editing: the base class + version only checks that the event has no modifiers. + """ + key = evt.GetKeyCode() + print "KeyCode:", key + if (key in range(ord('0'),ord('9')+1) or + key in range(WXK_NUMPAD0, WXK_NUMPAD9+1)): + return true + else: + return false + + + def StartingKey(self, evt): + """ + If the editor is enabled by pressing keys on the grid, this will be + called to let the editor do something about that first key if desired. + """ + key = evt.GetKeyCode() + print "StartingKey", key + ch = None + if key in range(WXK_NUMPAD0, WXK_NUMPAD9+1): + ch = ch = chr(ord('0') + key - WXK_NUMPAD0) + + elif key < 256 and key >= 0 and chr(key) in string.printable: + ch = chr(key) + if not evt.ShiftDown(): + ch = string.lower(ch) + + if ch is not None: + # Replace the text. Other option would be to append it. + # self._tc.AppendText(ch) + self._tc.SetValue(ch) + self._tc.SetInsertionPointEnd() + else: + evt.Skip() + + + def Destroy(self): + """final cleanup""" + self.base_Destroy() + + + def Clone(self): + """ + Create a new object which is the copy of this one + *Must Override* + """ + print "clone" + return MyCellEditor() + + +class MyGrid(wxGrid): + def __init__(self, parent, cust): + wxGrid.__init__(self, parent, -1) + self.CreateGrid(10, 10) + for column in xrange(10): + self.SetColSize(column, 40) + + self.SetDefaultCellAlignment(wxCENTRE, wxCENTRE) + + import os + if cust: + for column in xrange(10): + # Note, we create attr and cell editor for each column + # otherwise segfault at exit, probably tries to free those + # multiple times from each column. + attr = wxGridCellAttr() + attr.SetEditor(MyCellEditor()) + self.SetColAttr(column, attr) + + +#---------------------------------------------------------------------------- + +class CardNoteBook(wxNotebook): + def __init__(self, parent, id): + wxNotebook.__init__(self, parent, id) + + for title, cust in [("Default", 0), ("Custom Cell Editor", 1)]: + win = MyGrid(self, cust) + self.AddPage(win, title) + + EVT_NOTEBOOK_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged) + EVT_KEY_DOWN(self, self.OnKeyDown) + EVT_NAVIGATION_KEY(self, self.OnNavKey) + + + def OnKeyDown(self, evt): + print 'CardNoteBook.OnKeyDown: ', evt.GetKeyCode() + evt.Skip() + + + def OnNavKey(self, evt): + print 'CardNoteBook.OnNavKey:', evt + evt.Skip() + + def OnPageChanged(self, event): + event.Skip() + + +#---------------------------------------------------------------------------- + +class ScoreKeeper(wxFrame): + def __init__(self, parent, id, title): + wxFrame.__init__(self, parent, -1, title, size = (500, 400), + style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) + EVT_CLOSE(self, self.OnCloseWindow) + self.Centre(wxBOTH) + + self.nb = CardNoteBook(self, -1) + #win=MyGrid(self, "GTK") + self.Show(true) + + def OnCloseWindow(self, event): + self.dying = true + self.window = None + self.mainmenu = None + self.Destroy() + + def OnFileExit(self, event): + self.Close() + +#---------------------------------------------------------------------------- + +class MyApp(wxApp): + def OnInit(self): + frame = ScoreKeeper(None, -1, "ScoreKeeper: (A Demonstration)") + frame.Show(true) + self.SetTopWindow(frame) + return true + + + +#--------------------------------------------------------------------------- + +def main(): + app = MyApp(0) + app.MainLoop() + +main() diff --git a/utils/wxPython/tests/hangman.py b/wxPython/tests/hangman.py similarity index 100% rename from utils/wxPython/tests/hangman.py rename to wxPython/tests/hangman.py diff --git a/utils/wxPython/tests/hook.py b/wxPython/tests/hook.py similarity index 100% rename from utils/wxPython/tests/hook.py rename to wxPython/tests/hook.py diff --git a/utils/wxPython/tests/info.bmp b/wxPython/tests/info.bmp similarity index 100% rename from utils/wxPython/tests/info.bmp rename to wxPython/tests/info.bmp diff --git a/utils/wxPython/tests/leave.py b/wxPython/tests/leave.py similarity index 100% rename from utils/wxPython/tests/leave.py rename to wxPython/tests/leave.py diff --git a/utils/wxPython/tests/listGetItem.py b/wxPython/tests/listGetItem.py similarity index 100% rename from utils/wxPython/tests/listGetItem.py rename to wxPython/tests/listGetItem.py diff --git a/utils/wxPython/tests/memleak.py b/wxPython/tests/memleak.py similarity index 100% rename from utils/wxPython/tests/memleak.py rename to wxPython/tests/memleak.py diff --git a/wxPython/tests/og.py b/wxPython/tests/og.py new file mode 100644 index 0000000000..d11968e73d --- /dev/null +++ b/wxPython/tests/og.py @@ -0,0 +1,69 @@ +from wxPython.wx import * +#from Lib.Gui.PlainWidgets import * + +class TestLayoutConstraints(wxPanel): + def __init__(self, parent): + wxPanel.__init__(self, parent, -1) + # + nb = wxNotebook(self, -1) + page = wxPanel(nb, -1) + page.SetBackgroundColour(wxBLUE) + button = wxButton(page, -1, 'press me') + # + nb.AddPage(page, 'testpage') + # + lc = wxLayoutConstraints() + lc.top.PercentOf(parent, wxBottom, 0) + lc.bottom.PercentOf(parent, wxBottom, 100) + lc.left.PercentOf(parent, wxRight, 0) + lc.right.PercentOf(parent, wxRight, 100) + self.SetConstraints(lc) + self.SetAutoLayout(true) + # + lc = wxLayoutConstraints() + lc.top.PercentOf(self, wxBottom, 0) + lc.bottom.PercentOf(self, wxBottom, 100) + lc.left.PercentOf(self, wxRight, 0) + lc.right.PercentOf(self, wxRight, 100) + nb.SetConstraints(lc) +# nb.SetAutoLayout(true) + # +# lc = wxLayoutConstraints() +# lc.top.PercentOf(nb, wxBottom, 0) +# lc.bottom.PercentOf(nb, wxBottom, 100) +# lc.left.PercentOf(nb, wxRight, 0) +# lc.right.PercentOf(nb, wxRight, 100) +# page.SetConstraints(lc) + page.SetAutoLayout(true) + + # this should center "button" on "page": + lc = wxLayoutConstraints() + lc.centreY.PercentOf(page, wxBottom, 50) + lc.centreX.PercentOf(page, wxRight, 50) + lc.width.AsIs() + lc.height.AsIs() + button.SetConstraints(lc) +# button.SetAutoLayout(true) + # + button.Layout() + page.Layout() + nb.Layout() + self.Layout() + + +if __name__ == "__main__": + class MyFrame(wxFrame): + def __init__(self, *argT, **optionD): + apply(wxFrame.__init__, (self,) + argT, optionD) + self.SetAutoLayout(true) + TestLayoutConstraints(self) + + class MyApp(wxApp): + def OnInit(self): + frame = MyFrame(None, -1, "TestLayoutConstraints", + size=wxSize(400,300)) + frame.Show(true) + return true + + app = MyApp() + app.MainLoop() diff --git a/utils/wxPython/tests/paul.py b/wxPython/tests/paul.py similarity index 100% rename from utils/wxPython/tests/paul.py rename to wxPython/tests/paul.py diff --git a/utils/wxPython/tests/popup.py b/wxPython/tests/popup.py similarity index 100% rename from utils/wxPython/tests/popup.py rename to wxPython/tests/popup.py diff --git a/utils/wxPython/tests/pytree.py b/wxPython/tests/pytree.py similarity index 100% rename from utils/wxPython/tests/pytree.py rename to wxPython/tests/pytree.py diff --git a/utils/wxPython/tests/query.bmp b/wxPython/tests/query.bmp similarity index 100% rename from utils/wxPython/tests/query.bmp rename to wxPython/tests/query.bmp diff --git a/utils/wxPython/tests/scroll_paint.py b/wxPython/tests/scroll_paint.py similarity index 100% rename from utils/wxPython/tests/scroll_paint.py rename to wxPython/tests/scroll_paint.py diff --git a/utils/wxPython/tests/spies.py b/wxPython/tests/spies.py similarity index 100% rename from utils/wxPython/tests/spies.py rename to wxPython/tests/spies.py diff --git a/utils/wxPython/tests/spies2.py b/wxPython/tests/spies2.py similarity index 100% rename from utils/wxPython/tests/spies2.py rename to wxPython/tests/spies2.py diff --git a/utils/wxPython/tests/ste.py b/wxPython/tests/ste.py similarity index 100% rename from utils/wxPython/tests/ste.py rename to wxPython/tests/ste.py diff --git a/utils/wxPython/tests/table.bmp b/wxPython/tests/table.bmp similarity index 100% rename from utils/wxPython/tests/table.bmp rename to wxPython/tests/table.bmp diff --git a/utils/wxPython/tests/tabs.py b/wxPython/tests/tabs.py similarity index 100% rename from utils/wxPython/tests/tabs.py rename to wxPython/tests/tabs.py diff --git a/utils/wxPython/tests/test1.py b/wxPython/tests/test1.py similarity index 100% rename from utils/wxPython/tests/test1.py rename to wxPython/tests/test1.py diff --git a/utils/wxPython/tests/test2.py b/wxPython/tests/test2.py similarity index 91% rename from utils/wxPython/tests/test2.py rename to wxPython/tests/test2.py index aacfba61e7..0a1d6d6a7a 100644 --- a/utils/wxPython/tests/test2.py +++ b/wxPython/tests/test2.py @@ -154,7 +154,23 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.1.2.2 2001/01/30 20:54:16 robind +# Gobs of changes move from the main trunk to the 2.2 branch in +# preparataion for 2.2.5 release. See CHANGES.txt for details. +# +# Revision 1.3 2000/10/30 21:05:22 robind +# +# Merged wxPython 2.2.2 over to the main branch +# +# Revision 1.1.2.1 2000/05/16 02:07:01 RD +# +# Moved and reorganized wxPython directories +# +# Now builds into an intermediate wxPython package directory before +# installing +# # Revision 1.3 1999/04/30 03:29:53 RD +# # wxPython 2.0b9, first phase (win32) # Added gobs of stuff, see wxPython/README.txt for details # diff --git a/utils/wxPython/tests/test3.py b/wxPython/tests/test3.py similarity index 92% rename from utils/wxPython/tests/test3.py rename to wxPython/tests/test3.py index da57af5baa..826fcdc34e 100644 --- a/utils/wxPython/tests/test3.py +++ b/wxPython/tests/test3.py @@ -146,7 +146,23 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.1.2.2 2001/01/30 20:54:16 robind +# Gobs of changes move from the main trunk to the 2.2 branch in +# preparataion for 2.2.5 release. See CHANGES.txt for details. +# +# Revision 1.3 2000/10/30 21:05:22 robind +# +# Merged wxPython 2.2.2 over to the main branch +# +# Revision 1.1.2.1 2000/05/16 02:07:01 RD +# +# Moved and reorganized wxPython directories +# +# Now builds into an intermediate wxPython package directory before +# installing +# # Revision 1.6 1999/04/30 03:29:53 RD +# # wxPython 2.0b9, first phase (win32) # Added gobs of stuff, see wxPython/README.txt for details # diff --git a/utils/wxPython/tests/test4.py b/wxPython/tests/test4.py similarity index 98% rename from utils/wxPython/tests/test4.py rename to wxPython/tests/test4.py index 079c4a9215..21ac4a9567 100644 --- a/utils/wxPython/tests/test4.py +++ b/wxPython/tests/test4.py @@ -998,7 +998,23 @@ if __name__ == '__main__': #---------------------------------------------------------------------------- # # $Log$ +# Revision 1.1.2.2 2001/01/30 20:54:16 robind +# Gobs of changes move from the main trunk to the 2.2 branch in +# preparataion for 2.2.5 release. See CHANGES.txt for details. +# +# Revision 1.3 2000/10/30 21:05:22 robind +# +# Merged wxPython 2.2.2 over to the main branch +# +# Revision 1.1.2.1 2000/05/16 02:07:02 RD +# +# Moved and reorganized wxPython directories +# +# Now builds into an intermediate wxPython package directory before +# installing +# # Revision 1.17 1999/08/05 05:06:50 RD +# # Some minor tweaks # # Revision 1.16 1999/04/30 03:29:54 RD diff --git a/utils/wxPython/tests/test5.py b/wxPython/tests/test5.py similarity index 100% rename from utils/wxPython/tests/test5.py rename to wxPython/tests/test5.py diff --git a/utils/wxPython/tests/test6.py b/wxPython/tests/test6.py similarity index 100% rename from utils/wxPython/tests/test6.py rename to wxPython/tests/test6.py diff --git a/utils/wxPython/tests/test7.py b/wxPython/tests/test7.py similarity index 100% rename from utils/wxPython/tests/test7.py rename to wxPython/tests/test7.py diff --git a/utils/wxPython/tests/test8.py b/wxPython/tests/test8.py similarity index 100% rename from utils/wxPython/tests/test8.py rename to wxPython/tests/test8.py diff --git a/utils/wxPython/tests/testDlg.py b/wxPython/tests/testDlg.py similarity index 100% rename from utils/wxPython/tests/testDlg.py rename to wxPython/tests/testDlg.py diff --git a/utils/wxPython/tests/testTree.py b/wxPython/tests/testTree.py similarity index 100% rename from utils/wxPython/tests/testTree.py rename to wxPython/tests/testTree.py diff --git a/utils/wxPython/tests/testi.py b/wxPython/tests/testi.py similarity index 100% rename from utils/wxPython/tests/testi.py rename to wxPython/tests/testi.py diff --git a/utils/wxPython/tests/thrtest.py b/wxPython/tests/thrtest.py similarity index 100% rename from utils/wxPython/tests/thrtest.py rename to wxPython/tests/thrtest.py diff --git a/utils/wxPython/tests/thtest.py b/wxPython/tests/thtest.py similarity index 100% rename from utils/wxPython/tests/thtest.py rename to wxPython/tests/thtest.py diff --git a/utils/wxPython/tests/txml.py b/wxPython/tests/txml.py similarity index 100% rename from utils/wxPython/tests/txml.py rename to wxPython/tests/txml.py diff --git a/utils/wxPython/tests/val.py b/wxPython/tests/val.py similarity index 100% rename from utils/wxPython/tests/val.py rename to wxPython/tests/val.py diff --git a/utils/wxPython/tests/wxPlotCanvas.py b/wxPython/tests/wxPlotCanvas.py similarity index 100% rename from utils/wxPython/tests/wxPlotCanvas.py rename to wxPython/tests/wxPlotCanvas.py diff --git a/utils/wxPython/tests/wxSlash.py b/wxPython/tests/wxSlash.py similarity index 100% rename from utils/wxPython/tests/wxSlash.py rename to wxPython/tests/wxSlash.py diff --git a/utils/wxPython/tests/zigron.py b/wxPython/tests/zigron.py similarity index 100% rename from utils/wxPython/tests/zigron.py rename to wxPython/tests/zigron.py diff --git a/wxPython/wxPython/.cvsignore b/wxPython/wxPython/.cvsignore new file mode 100644 index 0000000000..1f3dad331b --- /dev/null +++ b/wxPython/wxPython/.cvsignore @@ -0,0 +1,3 @@ +*.py +*.pyc +*.pyd diff --git a/utils/wxPython/lib/.cvsignore b/wxPython/wxPython/lib/.cvsignore similarity index 100% rename from utils/wxPython/lib/.cvsignore rename to wxPython/wxPython/lib/.cvsignore diff --git a/utils/wxPython/lib/CDate.py b/wxPython/wxPython/lib/CDate.py similarity index 100% rename from utils/wxPython/lib/CDate.py rename to wxPython/wxPython/lib/CDate.py diff --git a/utils/wxPython/lib/__init__.py b/wxPython/wxPython/lib/__init__.py similarity index 100% rename from utils/wxPython/lib/__init__.py rename to wxPython/wxPython/lib/__init__.py diff --git a/wxPython/wxPython/lib/activexwrapper.py b/wxPython/wxPython/lib/activexwrapper.py new file mode 100644 index 0000000000..479203e9bc --- /dev/null +++ b/wxPython/wxPython/lib/activexwrapper.py @@ -0,0 +1,140 @@ +#---------------------------------------------------------------------- +# Name: wxPython.lib.activexwrapper +# Purpose: a wxWindow derived class that can hold an ActiveX control +# +# Author: Robin Dunn +# +# RCS-ID: $Id$ +# Copyright: (c) 2000 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------- + +from wxPython.wx import * + +try: + import win32ui + import pywin.mfc.activex + import win32com.client +except ImportError: + raise ImportError( "ActiveXWrapper requires PythonWin. Please install the win32all-xxx.exe package.") + +##from win32con import WS_TABSTOP, WS_VISIBLE +WS_TABSTOP = 0x00010000 +WS_VISIBLE = 0x10000000 + +#---------------------------------------------------------------------- + + +def MakeActiveXClass(CoClass, eventClass=None, eventObj=None): + """ + Dynamically construct a new class that derives from wxWindow, the + ActiveX control and the appropriate COM classes. This new class + can be used just like the wxWindow class, but will also respond + appropriately to the methods and properties of the COM object. If + this class, a derived class or a mix-in class has method names + that match the COM object's event names, they will be called + automatically. + + CoClass -- A COM control class from a module generated by + makepy.py from a COM TypeLibrary. Can also accept a + CLSID. + + eventClass -- If given, this class will be added to the set of + base classes that the new class is drived from. It is + good for mix-in classes for catching events. + + eventObj -- If given, this object will be searched for attributes + by the new class's __getattr__ method, (like a mix-in + object.) This is useful if you want to catch COM + callbacks in an existing object, (such as the parent + window.) + + """ + + + if type(CoClass) == type(""): + # use the CLSID to get the real class + CoClass = win32com.client.CLSIDToClass(CoClass) + + # determine the base classes + axEventClass = CoClass.default_source + baseClasses = [wxWindow, pywin.mfc.activex.Control, CoClass, axEventClass] + if eventClass: + baseClasses.append(eventClass) + baseClasses = tuple(baseClasses) + + # define the class attributes + className = 'AXControl_'+CoClass.__name__ + classDict = { '__init__' : axw__init__, + '__getattr__' : axw__getattr__, + 'axw_OnSize' : axw_OnSize, + 'axw_OEB' : axw_OEB, + '_name' : className, + '_eventBase' : axEventClass, + '_eventObj' : eventObj, + 'Cleanup' : axw_Cleanup, + } + + # make a new class object + import new + classObj = new.classobj(className, baseClasses, classDict) + return classObj + + + + +# These functions will be used as methods in the new class +def axw__init__(self, parent, ID, pos=wxDefaultPosition, size=wxDefaultSize, style=0): + # init base classes + pywin.mfc.activex.Control.__init__(self) + wxWindow.__init__(self, parent, -1, pos, size, style) + + win32ui.EnableControlContainer() + self._eventObj = self._eventObj # move from class to instance + + # create a pythonwin wrapper around this wxWindow + handle = self.GetHandle() + self._wnd = win32ui.CreateWindowFromHandle(handle) + + # create the control + sz = self.GetSize() + self.CreateControl(self._name, WS_TABSTOP | WS_VISIBLE, + (0, 0, sz.width, sz.height), self._wnd, ID) + + # init the ax events part of the object + self._eventBase.__init__(self, self._dispobj_) + + # hook some wx events + EVT_SIZE(self, self.axw_OnSize) + EVT_ERASE_BACKGROUND(self, self.axw_OEB) + + +def axw__getattr__(self, attr): + try: + return pywin.mfc.activex.Control.__getattr__(self, attr) + except AttributeError: + try: + eo = self.__dict__['_eventObj'] + return getattr(eo, attr) + except AttributeError: + raise AttributeError('Attribute not found: %s' % attr) + + +def axw_OnSize(self, event): + sz = self.GetClientSize() # get wxWindow size + self.MoveWindow((0, 0, sz.width, sz.height), 1) # move the AXControl + + +def axw_OEB(self, event): + pass + + +def axw_Cleanup(self): + #del self._wnd + self.close() + ## anything else??? + + + + + diff --git a/wxPython/wxPython/lib/anchors.py b/wxPython/wxPython/lib/anchors.py new file mode 100644 index 0000000000..c2e52c433d --- /dev/null +++ b/wxPython/wxPython/lib/anchors.py @@ -0,0 +1,91 @@ +#---------------------------------------------------------------------- +# Name: wxPython.lib.anchors +# Purpose: A class that provides an easy to use interface over layout +# constraints for anchored layout. +# +# Author: Riaan Booysen +# +# Created: 15-Dec-2000 +# RCS-ID: $Id$ +# Copyright: (c) 2000 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------- + +from wxPython.wx import wxLayoutConstraints, wxTop, wxLeft, wxBottom, wxRight, \ + wxHeight, wxWidth + +class LayoutAnchors(wxLayoutConstraints): + """ A class that implements Delphi's Anchors with wxLayoutConstraints. + + Anchored sides maintain the distance from the edge of the + control to the same edge of the parent. + When neither side is selected, the control keeps the same + relative position to both sides. + + The current position and size of the control and it's parent + is used when setting up the constraints. To change the size or + position of an already anchored control, set the constraints to + None, reposition or resize and reapply the anchors. + + Examples: + + Let's anchor the right and bottom edge of a control and + resize it's parent. + + ctrl.SetConstraints(LayoutAnchors(ctrl, left=0, top=0, right=1, bottom=1)) + + +=========+ +===================+ + | +-----+ | | | + | | * | -> | | + | +--*--+ | | +-----+ | + +---------+ | | * | + | +--*--+ | + +-------------------+ + * = anchored edge + + When anchored on both sides the control will stretch horizontally. + + ctrl.SetConstraints(LayoutAnchors(ctrl, 1, 0, 1, 1)) + + +=========+ +===================+ + | +-----+ | | | + | * * | -> | | + | +--*--+ | | +---------------+ | + +---------+ | * ctrl * | + | +-------*-------+ | + +-------------------+ + * = anchored edge + """ + def __init__(self, control, left = 1, top = 1, right = 0, bottom = 0): + wxLayoutConstraints.__init__(self) + parent = control.GetParent() + if not parent: return + + pPos, pSize = parent.GetPosition(), parent.GetClientSize() + cPos, cSize = control.GetPosition(), control.GetSize() + + self.setConstraintSides(self.left, wxLeft, left, + self.right, wxRight, right, + self.width, wxWidth, self.centreX, + cPos.x, cSize.x, pSize.x, parent) + + self.setConstraintSides(self.top, wxTop, top, + self.bottom, wxBottom, bottom, + self.height, wxHeight, self.centreY, + cPos.y, cSize.y, pSize.y, parent) + + def setConstraintSides(self, side1, side1Edge, side1Anchor, + side2, side2Edge, side2Anchor, + size, sizeEdge, centre, + cPos, cSize, pSize, parent): + if side2Anchor: + side2.SameAs(parent, side2Edge, pSize - (cPos + cSize)) + if side1Anchor: + side1.SameAs(parent, side1Edge, cPos) + if not side2Anchor: + size.AsIs() + else: + size.AsIs() + if not side2Anchor: + centre.PercentOf(parent, sizeEdge, + int(((cPos + cSize / 2.0) / pSize)*100)) diff --git a/utils/wxPython/lib/buttons.py b/wxPython/wxPython/lib/buttons.py similarity index 93% rename from utils/wxPython/lib/buttons.py rename to wxPython/wxPython/lib/buttons.py index 7d63710314..fb455c86c4 100644 --- a/utils/wxPython/lib/buttons.py +++ b/wxPython/wxPython/lib/buttons.py @@ -53,6 +53,8 @@ class wxGenButtonEvent(wxPyCommandEvent): #---------------------------------------------------------------------- class wxGenButton(wxControl): + labelDelta = 1 + def __init__(self, parent, ID, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = wxDefaultValidator, @@ -65,6 +67,7 @@ class wxGenButton(wxControl): self.bezelWidth = 2 self.hasFocus = false self.useFocusInd = true + self.evtToSend = [] self.SetLabel(label) self.SetPosition(pos) @@ -75,13 +78,16 @@ class wxGenButton(wxControl): self.SetBestSize(size) self.InitColours() - EVT_LEFT_DOWN(self, self.OnLeftDown) - EVT_LEFT_UP(self, self.OnLeftUp) - EVT_MOTION(self, self.OnMotion) - EVT_SET_FOCUS(self, self.OnGainFocus) - EVT_KILL_FOCUS(self, self.OnLoseFocus) - EVT_KEY_DOWN(self, self.OnKeyDown) - EVT_KEY_UP(self, self.OnKeyUp) + EVT_LEFT_DOWN(self, self.OnLeftDown) + EVT_LEFT_UP(self, self.OnLeftUp) + EVT_MOTION(self, self.OnMotion) + EVT_SET_FOCUS(self, self.OnGainFocus) + EVT_KILL_FOCUS(self, self.OnLoseFocus) + EVT_KEY_DOWN(self, self.OnKeyDown) + EVT_KEY_UP(self, self.OnKeyUp) + EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) + EVT_PAINT(self, self.OnPaint) + EVT_IDLE(self, self.OnIdle) def SetBestSize(self, size=None): @@ -170,7 +176,14 @@ class wxGenButton(wxControl): evt = wxGenButtonEvent(wxEVT_COMMAND_BUTTON_CLICKED, self.GetId()) evt.SetIsDown(not self.up) evt.SetButtonObj(self) - self.GetEventHandler().ProcessEvent(evt) + self.evtToSend.append(evt) + + + def OnIdle(self, evt): + while self.evtToSend: + evt = self.evtToSend[0] + del self.evtToSend[0] + self.GetEventHandler().ProcessEvent(evt) def DrawBezel(self, dc, x1, y1, x2, y2): @@ -202,7 +215,7 @@ class wxGenButton(wxControl): label = self.GetLabel() tw, th = dc.GetTextExtent(label) if not self.up: - dw = dy = 1 + dw = dy = self.labelDelta dc.DrawText(label, (width-tw)/2+dw, (height-th)/2+dy) @@ -244,6 +257,7 @@ class wxGenButton(wxControl): self.CaptureMouse() self.SetFocus() self.Refresh() + event.Skip() def OnLeftUp(self, event): @@ -254,7 +268,7 @@ class wxGenButton(wxControl): self.up = true self.ReleaseMouse() self.Refresh() - + event.Skip() def OnMotion(self, event): if not self.IsEnabled(): @@ -270,6 +284,7 @@ class wxGenButton(wxControl): self.up = true self.Refresh() return + event.Skip() def OnGainFocus(self, event): @@ -362,7 +377,7 @@ class wxGenBitmapButton(wxGenButton): bmp = self.bmpSelected bw,bh = bmp.GetWidth(), bmp.GetHeight() if not self.up: - dw = dy = 1 + dw = dy = self.labelDelta hasMask = bmp.GetMask() != None dc.DrawBitmap(bmp, (width-bw)/2+dw, (height-bh)/2+dy, hasMask) diff --git a/utils/wxPython/lib/calendar.py b/wxPython/wxPython/lib/calendar.py similarity index 56% rename from utils/wxPython/lib/calendar.py rename to wxPython/wxPython/lib/calendar.py index 2c4bbd7112..a4e2ed352e 100644 --- a/utils/wxPython/lib/calendar.py +++ b/wxPython/wxPython/lib/calendar.py @@ -5,7 +5,7 @@ # Author: Lorne White (email: lwhite1@planet.eon.net) # # Created: -# Version 0.5 1999/11/03 +# Version 0.6 2000/03/30 # Licence: wxWindows license #---------------------------------------------------------------------------- @@ -17,27 +17,90 @@ import string, time CalDays = [6, 0, 1, 2, 3, 4, 5] AbrWeekday = {6:"Sun", 0:"Mon", 1:"Tue", 2:"Wed", 3:"Thu", 4:"Fri", 5:"Sat"} -_MIDSIZE = 100 +_MIDSIZE = 160 +BusCalDays = [0, 1, 2, 3, 4, 5, 6] # calendar drawing routing class CalDraw: - def __init__(self): - self.rg = {} - self.y_st = 15 # start of vertical draw default + def __init__(self, parent): + self.pwidth = 1 + self.pheight = 1 + try: + self.scale = parent.scale + except: + self.scale = 1 + + self.DefParms() + + def DefParms(self): + self.grid_color = 'BLACK' # grid and selection colors + self.back_color = 'WHITE' + self.sel_color = 'RED' + + self.high_color = 'LIGHT BLUE' + self.border_color = 'BLACK' + self.week_color = 'LIGHT GREY' + + self.week_font_color = 'BLACK' # font colors + self.day_font_color = 'BLACK' + + self.font = wxSWISS + self.bold = wxNORMAL + + self.hide_title = FALSE + self.hide_grid = FALSE + self.outer_border = TRUE + + self.title_offset = 0 + self.cal_week_scale = 0.7 + self.show_weekend = FALSE + self.cal_type = "NORMAL" + + def SetWeekColor(self, font_color, week_color): # set font and background color for week title + self.week_font_color = font_color + self.week_color = week_color def SetSize(self, size): - self.sizew = size.width - self.sizeh = size.height + self.set_sizew = size.width + self.set_sizeh = size.height -# draw the various elements of the calendar + def InitValues(self): # default dimensions of various elements of the calendar + self.rg = {} + self.cal_sel = {} + self.set_cy_st = 0 # start position + self.set_cx_st = 0 - def DrawCal(self, DC, sel_lst): + self.set_y_mrg = 15 # start of vertical draw default + self.set_x_mrg = 10 + self.set_y_end = 10 + + def SetPos(self, xpos, ypos): + self.set_cx_st = xpos + self.set_cy_st = ypos + + def SetMarg(self, xmarg, ymarg): + self.set_x_st = xmarg + self.set_y_st = ymarg + self.set_y_end = ymarg + + def InitScale(self): # scale position values + self.sizew = self.set_sizew * self.pwidth + self.sizeh = self.set_sizeh * self.pheight + + self.cx_st = self.set_cx_st * self.pwidth # draw start position + self.cy_st = self.set_cy_st * self.pheight + + self.x_mrg = self.set_x_mrg * self.pwidth # calendar draw margins + self.y_mrg = self.set_y_mrg * self.pheight + self.y_end = self.set_y_end * self.pheight + + def DrawCal(self, DC, sel_lst=[]): self.DC = DC + self.InitScale() self.DrawBorder() - if self.hide_title is FALSE: self.DrawMonth() @@ -46,15 +109,32 @@ class CalDraw: self.DrawGrid() self.GetRect() - self.DrawSel(sel_lst) # highlighted days + if self.show_weekend is TRUE: # highlight weekend dates + self.SetWeekEnd() + + self.AddSelect(sel_lst) # overrides the weekend highlight + + self.DrawSel() # highlighted days self.DrawWeek() self.DrawNum() -# draw border around the outside of the main display rectangle + def AddSelect(self, list, cfont=None, cbackgrd = None): + if cfont is None: + cfont = self.sel_color # font digit color + if cbackgrd is None: + cbackgrd = self.high_color # select background color - def DrawBorder(self): - rect = wxRect(0, 0, self.sizew, self.sizeh) # full display window area - self.DC.DrawRectangle(rect.x, rect.y, rect.width, rect.height) + for val in list: + self.cal_sel[val] = (cfont, cbackgrd) + + def DrawBorder(self): # draw border around the outside of the main display rectangle + brush = wxBrush(wxNamedColour(self.back_color), wxSOLID) + self.DC.SetBrush(brush) + self.DC.SetPen(wxPen(wxNamedColour(self.border_color), 1)) + + if self.outer_border is TRUE: + rect = wxRect(self.cx_st, self.cy_st, self.sizew, self.sizeh) # full display window area + self.DC.DrawRectangle(rect.x, rect.y, rect.width, rect.height) def DrawNumVal(self): self.DrawNum() @@ -62,14 +142,20 @@ class CalDraw: # calculate the calendar days and offset position def SetCal(self, year, month): + self.InitValues() # reset initial values + self.year = year self.month = month day = 1 t = Date(year, month, day) - dow = t.day_of_week # start day in month - dim = t.days_in_month # number of days in month - start_pos = dow+1 + dow = self.dow = t.day_of_week # start day in month + dim = self.dim = t.days_in_month # number of days in month + if self.cal_type == "NORMAL": + start_pos = dow+1 + else: + start_pos = dow + self.st_pos = start_pos self.cal = [] @@ -81,9 +167,18 @@ class CalDraw: i = i + 1 return start_pos -# get the display rectange list of the day grid + def SetWeekEnd(self, font_color='BLACK', backgrd = 'LIGHT GREY'): + date = 6 - int(self.dow) # start day of first saturday + while date <= self.dim: + self.cal_sel[date] = (font_color, backgrd) # Saturday + date = date + 1 + if date <= self.dim: + self.cal_sel[date] = (font_color, backgrd) # Sunday + date = date + 6 + else: + date = date + 7 - def GetRect(self): + def GetRect(self): # get the display rectange list of the day grid cnt = 0 for y in self.gridy[1:-1]: for x in self.gridx[:-1]: @@ -98,12 +193,10 @@ class CalDraw: def GetOffset(self): return self.st_pos -# month and year title - - def DrawMonth(self): + def DrawMonth(self): # month and year title month = Month[self.month] - sizef = 12 + sizef = 11 if self.sizeh < _MIDSIZE: sizef = 10 @@ -111,35 +204,45 @@ class CalDraw: self.DC.SetFont(f) tw,th = self.DC.GetTextExtent(month) - adjust = (self.sizew-tw)/2 - self.DC.DrawText(month, adjust, 10) + adjust = self.cx_st + (self.sizew-tw)/2 + self.DC.DrawText(month, adjust, self.cy_st + th) year = str(self.year) tw,th = self.DC.GetTextExtent(year) - adjust = self.sizew-tw-20 + adjust = self.sizew - tw - self.x_mrg - self.y_st = th * 3 + self.title_offset = th * 2 f = wxFont(sizef, self.font, wxNORMAL, self.bold) self.DC.SetFont(f) - self.DC.DrawText(year, adjust, 10) + self.DC.DrawText(year, self.cx_st + adjust, self.cy_st + th) -# draw the week days - - def DrawWeek(self): - sizef = 10 + def DrawWeek(self): # draw the week days + sizef = 8 if self.sizeh < _MIDSIZE: - sizef = 8 + sizef = 7 f = wxFont(sizef, self.font, wxNORMAL, self.bold) self.DC.SetFont(f) + self.DC.SetTextForeground(wxNamedColour(self.week_font_color)) cnt_x = 0 cnt_y = 0 width = self.gridx[1]-self.gridx[0] height = self.gridy[1] - self.gridy[0] - for val in CalDays: + rect_w = self.gridx[7]-self.gridx[0] + + brush = wxBrush(wxNamedColour(self.week_color), wxSOLID) + self.DC.SetBrush(brush) +# self.DC.DrawRectangle(self.gridx[0], self.gridy[0], rect_w+1, height) + + if self.cal_type == "NORMAL": + cal_days = CalDays + else: + cal_days = BusCalDays + + for val in cal_days: day = AbrWeekday[val] if self.sizew < 200: day = day[0] @@ -149,23 +252,32 @@ class CalDraw: x = self.gridx[cnt_x] y = self.gridy[cnt_y] + self.DC.DrawRectangle(self.gridx[cnt_x], self.gridy[0], width+1, height) self.DC.DrawText(day, x+diffx, y+diffy) cnt_x = cnt_x + 1 -# draw the day numbers - def DrawNum(self): + def DrawNum(self): # draw the day numbers sizef = 10 if self.sizeh < _MIDSIZE: sizef = 8 f = wxFont(sizef, self.font, wxNORMAL, self.bold) - self.DC.SetFont(f) cnt_x = 0 cnt_y = 1 for val in self.cal: x = self.gridx[cnt_x] y = self.gridy[cnt_y] + + try: + num_val = int(val) + num_color = self.cal_sel[num_val][0] + except: + num_color = self.day_font_color + + self.DC.SetTextForeground(wxNamedColour(num_color)) + self.DC.SetFont(f) + self.DC.DrawText(val, x+5, y+5) if cnt_x < 6: cnt_x = cnt_x + 1 @@ -173,27 +285,23 @@ class CalDraw: cnt_x = 0 cnt_y = cnt_y + 1 -# calculate the dimensions in the center of the drawing area + def Center(self): # calculate the dimensions in the center of the drawing area + bdw = self.x_mrg * 2 + bdh = self.y_mrg + self.y_end + self.title_offset - def Center(self): - self.x_st = 10 - self.y_end = 10 - - bdw = self.x_st * 2 - bdh = self.y_st + self.y_end - - self.dl_w = (self.sizew-bdw)/7 - self.dl_h = (self.sizeh-bdh)/7 + self.dl_w = int((self.sizew-bdw)/7) + self.dl_h = int((self.sizeh-bdh)/7) + self.dl_th = int(self.dl_h*self.cal_week_scale) # week title adjustment self.cwidth = self.dl_w * 7 - self.cheight = self.dl_h * 6 + self.dl_h/2 + self.cheight = self.dl_h * 6 + self.dl_th -# highlighted selectioned days - - def DrawSel(self, sel_lst): - for key in sel_lst: - brush = wxBrush(wxNamedColour(self.high_color), wxSOLID) + def DrawSel(self): # highlighted selected days + for key in self.cal_sel.keys(): + sel_color = self.cal_sel[key][1] + brush = wxBrush(wxNamedColour(sel_color), wxSOLID) self.DC.SetBrush(brush) + if self.hide_grid is FALSE: self.DC.SetPen(wxPen(wxNamedColour(self.grid_color), 0)) else: @@ -202,18 +310,19 @@ class CalDraw: rect = self.rg[nkey] self.DC.DrawRectangle(rect.x, rect.y, rect.width+1, rect.height+1) -# calculate and draw the grid lines - - def DrawGrid(self): + def DrawGrid(self): # calculate and draw the grid lines self.DC.SetPen(wxPen(wxNamedColour(self.grid_color), 0)) self.gridx = [] self.gridy = [] + self.x_st = self.cx_st + self.x_mrg + self.y_st = self.cy_st + self.y_mrg + self.title_offset # start postion of draw + x1 = self.x_st y1 = self.y_st - y1 = self.y_st - y2 = self.y_st + self.cheight + + y2 = y1 + self.cheight for i in range(8): if self.hide_grid is FALSE: self.DC.DrawLine(x1, y1, x1, y2) @@ -222,17 +331,36 @@ class CalDraw: x1 = self.x_st y1 = self.y_st - x2 = self.x_st + self.cwidth + + x2 = x1 + self.cwidth for i in range(8): if self.hide_grid is FALSE: self.DC.DrawLine(x1, y1, x2, y1) self.gridy.append(y1) if i == 0: - y1 = y1 + self.dl_h/2 + y1 = y1 + self.dl_th else: y1 = y1 + self.dl_h +class PrtCalDraw(CalDraw): + def InitValues(self): + self.rg = {} + self.cal_sel = {} + self.set_cx_st = 1.0 # start draw border location + self.set_cy_st = 1.0 + + self.set_y_mrg = 0.2 # draw offset position + self.set_x_mrg = 0.2 + self.set_y_end = 0.2 + + def SetPSize(self, pwidth, pheight): # calculate the dimensions in the center of the drawing area + self.pwidth = int(pwidth)/self.scale + self.pheight = int(pheight)/self.scale + + def SetPreview(self, preview): + self.preview = preview + class wxCalendar(wxWindow): def __init__(self, parent, id, pos=wxDefaultPosition, size=wxDefaultSize): wxWindow.__init__(self, parent, id, pos, size) @@ -241,10 +369,16 @@ class wxCalendar(wxWindow): self.grid_color = 'BLACK' self.back_color = 'WHITE' + self.hide_grid = FALSE self.sel_color = 'RED' - self.high_color = 'LIGHT BLUE' - self.font = wxSWISS - self.bold = wxNORMAL + self.hide_title = FALSE + self.show_weekend = FALSE + self.cal_type = "NORMAL" + + self.week_color = 'LIGHT GREY' + self.week_font_color = 'BLACK' # font colors + + self.select_list = [] self.SetBackgroundColour(wxNamedColor(self.back_color)) self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftEvent) @@ -258,10 +392,11 @@ class wxCalendar(wxWindow): self.SetNow() # default calendar for current month self.size = None - self.hide_title = FALSE - self.hide_grid = FALSE self.set_day = None + EVT_PAINT(self, self.OnPaint) + + # control some of the main calendar attributes def HideTitle(self): @@ -390,15 +525,28 @@ class wxCalendar(wxWindow): def GetDayHit(self, mx, my): for key in self.rg.keys(): val = self.rg[key] - rt = wxRegion() - rt.UnionRect(val) - if rt.Contains(mx, my) != 0: + ms_rect = wxRect(mx, my, 1, 1) + if wxIntersectRect(ms_rect, val) is not None: result = self.TestDay(key) return result return None # calendar drawing + def SetWeekColor(self, font_color, week_color): # set font and background color for week title + self.week_font_color = font_color + self.week_color = week_color + + def AddSelect(self, list, font_color, back_color): + list_val = [list, font_color, back_color] + self.select_list.append(list_val) + + def ShowWeekEnd(self): + self.show_weekend = TRUE # highlight weekend + + def SetBusType(self): + self.cal_type = "BUS" + def OnPaint(self, event): DC = wxPaintDC(self) self.DoDrawing(DC) @@ -407,7 +555,16 @@ class wxCalendar(wxWindow): DC = wxPaintDC(self) DC.BeginDrawing() - self.cal = cal = CalDraw() + self.cal = cal = CalDraw(self) + + cal.grid_color = self.grid_color + cal.back_color = self.back_color + cal.hide_grid = self.hide_grid + cal.grid_color = self.grid_color + cal.hide_title = self.hide_title + cal.show_weekend = self.show_weekend + cal.cal_type = self.cal_type + if self.size is None: size = self.GetClientSize() else: @@ -415,17 +572,14 @@ class wxCalendar(wxWindow): # drawing attributes - cal.hide_title = self.hide_title - cal.hide_grid = self.hide_grid - - cal.grid_color = self.grid_color - cal.high_color = self.high_color - cal.back_color = self.back_color - cal.font = self.font - cal.bold = self.bold + cal.week_font_color = self.week_font_color + cal.week_color = self.week_color cal.SetSize(size) cal.SetCal(self.year, self.month) + for val in self.select_list: + cal.AddSelect(val[0], val[1], val[2]) + cal.DrawCal(DC, self.sel_lst) self.rg = cal.GetRect() diff --git a/utils/wxPython/lib/dialogs.py b/wxPython/wxPython/lib/dialogs.py similarity index 99% rename from utils/wxPython/lib/dialogs.py rename to wxPython/wxPython/lib/dialogs.py index 27584d516d..e517f105b3 100644 --- a/utils/wxPython/lib/dialogs.py +++ b/wxPython/wxPython/lib/dialogs.py @@ -48,6 +48,7 @@ class wxMultipleChoiceDialog(wxDialog): self.SetAutoLayout(TRUE) self.lst = lst self.Layout() + EVT_SIZE(self, self.OnSize) def OnSize(self, event): self.Layout() diff --git a/utils/wxPython/lib/editor/.cvsignore b/wxPython/wxPython/lib/editor/.cvsignore similarity index 100% rename from utils/wxPython/lib/editor/.cvsignore rename to wxPython/wxPython/lib/editor/.cvsignore diff --git a/utils/wxPython/lib/editor/README.txt b/wxPython/wxPython/lib/editor/README.txt similarity index 100% rename from utils/wxPython/lib/editor/README.txt rename to wxPython/wxPython/lib/editor/README.txt diff --git a/utils/wxPython/lib/editor/__init__.py b/wxPython/wxPython/lib/editor/__init__.py similarity index 100% rename from utils/wxPython/lib/editor/__init__.py rename to wxPython/wxPython/lib/editor/__init__.py diff --git a/utils/wxPython/lib/editor/editor.py b/wxPython/wxPython/lib/editor/editor.py similarity index 99% rename from utils/wxPython/lib/editor/editor.py rename to wxPython/wxPython/lib/editor/editor.py index b34d724798..bfae392817 100644 --- a/utils/wxPython/lib/editor/editor.py +++ b/wxPython/wxPython/lib/editor/editor.py @@ -111,6 +111,8 @@ class wxEditor(wxScrolledWindow): EVT_LEFT_DOWN(self, self.OnMouseClick) EVT_RIGHT_DOWN(self, self.OnMouseClick) EVT_SCROLLWIN(self, self.OnScroll) + EVT_CHAR(self, self.OnChar) + EVT_PAINT(self, self.OnPaint) self.o_cx = self.cx self.o_cy = self.cy diff --git a/utils/wxPython/lib/editor/py_editor.py b/wxPython/wxPython/lib/editor/py_editor.py similarity index 100% rename from utils/wxPython/lib/editor/py_editor.py rename to wxPython/wxPython/lib/editor/py_editor.py diff --git a/utils/wxPython/lib/editor/tokenizer.py b/wxPython/wxPython/lib/editor/tokenizer.py similarity index 96% rename from utils/wxPython/lib/editor/tokenizer.py rename to wxPython/wxPython/lib/editor/tokenizer.py index aafe0aaeb5..1d8e18a8dd 100644 --- a/utils/wxPython/lib/editor/tokenizer.py +++ b/wxPython/wxPython/lib/editor/tokenizer.py @@ -31,7 +31,7 @@ class Tokenizer: tname = tok_name[type] if iskeyword(string): tname = "KEY" - self.toks.append(tname, string, b, e) + self.toks.append( (tname, string, b, e) ) def readline(self): t = self.text diff --git a/wxPython/wxPython/lib/fancytext.py b/wxPython/wxPython/lib/fancytext.py new file mode 100644 index 0000000000..566e24627d --- /dev/null +++ b/wxPython/wxPython/lib/fancytext.py @@ -0,0 +1,249 @@ +"""wxFancyText -- methods for rendering XML specified text + +This module has four main methods: + +def getExtent(str, dc=None, enclose=1): +def renderToBitmap(str, background=None, enclose=1) +def renderToDC(str, dc, x, y, enclose=1) + +In all cases, 'str' is an XML string. The tags in the string can +currently specify the font, subscripts, superscripts, and the angle +sign. The allowable properties of font are size, family, style, weght, +encoding, and color. See the example on the bottom for a better idea +of how this works. + +Note that start and end tags for the string are provided if enclose is +true, so for instance, renderToBitmap("X1") will work. + +""" +# Copyright 2001 Timothy Hochberg +# Use as you see fit. No warantees, I cannot be held responsible, etc. + + + +# TODO: Make a wxFancyTextCtrl class that derives from wxControl. +# Add support for line breaks +# etc. +# - Robin + + + +from wxPython.wx import * +import xml.parsers.expat, copy + +_families = {"default" : wxDEFAULT, "decorative" : wxDECORATIVE, "roman" : wxROMAN, + "swiss" : wxSWISS, "modern" : wxMODERN} +_styles = {"normal" : wxNORMAL, "slant" : wxSLANT, "italic" : wxITALIC} +_weights = {"normal" : wxNORMAL, "light" : wxLIGHT, "bold" : wxBOLD} + +# The next three classes: Renderer, SizeRenderer and DCRenderer are +# what you will need to override to extend the XML language. All of +# the font stuff as well as the subscript and superscript stuff are in +# Renderer. + +class Renderer: + + defaultSize = wxNORMAL_FONT.GetPointSize() + defaultFamily = wxDEFAULT + defaultStyle = wxNORMAL + defaultWeight = wxNORMAL + defaultEncoding = wxFont_GetDefaultEncoding() + defaultColor = "black" + + def __init__(self, dc=None): + if dc == None: + dc = wxMemoryDC() + self.dc = dc + self.offsets = [0] + self.fonts = [{}] + + def startElement(self, name, attrs): + method = "start_" + name + if not hasattr(self, method): + raise ValueError("XML tag '%s' not supported" % name) + getattr(self, method)(attrs) + + def endElement(self, name): + method = "end_" + name + if not hasattr(self, method): + raise ValueError("XML tag '%s' not supported" % name) + getattr(self, method)() + + def start_wxFancyString(self, attrs): + pass + + def end_wxFancyString(self): + pass + + def start_font(self, attrs): + for key, value in attrs.items(): + if key == "size": + value = int(value) + elif key == "family": + value = _families[value] + elif key == "style": + value = _styles[value] + elif key == "weight": + value = _weights[value] + elif key == "encoding": + pass + elif key == "color": + pass + else: + raise ValueError("unknown font attribute '%s'" % key) + attrs[key] = value + font = copy.copy(self.fonts[-1]) + font.update(attrs) + self.fonts.append(font) + + def end_font(self): + self.fonts.pop() + + def start_sub(self, attrs): + if attrs.keys(): + raise ValueError(" does not take attributes") + font = self.getCurrentFont() + self.offsets.append(self.offsets[-1] + self.dc.GetFullTextExtent("M", font)[1]*0.5) + self.start_font({"size" : font.GetPointSize() * 0.8}) + + def end_sub(self): + self.fonts.pop() + self.offsets.pop() + + def start_sup(self, attrs): + if attrs.keys(): + raise ValueError(" does not take attributes") + font = self.getCurrentFont() + self.offsets.append(self.offsets[-1] - self.dc.GetFullTextExtent("M", font)[1]*0.3) + self.start_font({"size" : font.GetPointSize() * 0.8}) + + def end_sup(self): + self.fonts.pop() + self.offsets.pop() + + def getCurrentFont(self): + font = self.fonts[-1] + return wxFont(font.get("size", self.defaultSize), + font.get("family", self.defaultFamily), + font.get("style", self.defaultStyle), + font.get("weight", self.defaultWeight), + encoding = font.get("encoding", self.defaultEncoding)) + + def getCurrentColor(self): + font = self.fonts[-1] + return wxNamedColour(font.get("color", self.defaultColor)) + + +class SizeRenderer(Renderer): + + def __init__(self, dc=None): + Renderer.__init__(self, dc) + self.width = self.height = 0 + self.minY = self.maxY = 0 + + def characterData(self, data): + self.dc.SetFont(self.getCurrentFont()) + width, height = self.dc.GetTextExtent(data) + self.width = self.width + width + self.minY = min(self.minY, self.offsets[-1]) + self.maxY = max(self.maxY, self.offsets[-1] + height) + self.height = self.maxY - self.minY + + def start_angle(self, attrs): + self.characterData("M") + + def end_angle(self): + pass + +class DCRenderer(Renderer): + + def __init__(self, dc=None, x=0, y=0): + Renderer.__init__(self, dc) + self.x = x + self.y = y + + def characterData(self, data): + self.dc.SetFont(self.getCurrentFont()) + self.dc.SetTextForeground(self.getCurrentColor()) + width, height = self.dc.GetTextExtent(data) + self.dc.DrawText(data, self.x, self.y + self.offsets[-1]) + self.x = self.x + width + + def start_angle(self, attrs): + self.dc.SetFont(self.getCurrentFont()) + self.dc.SetPen(wxPen(self.getCurrentColor(), 1)) + width, height, descent, leading = self.dc.GetFullTextExtent("M") + y = self.y + self.offsets[-1] + height - descent + self.dc.DrawLine(self.x, y, self.x+width, y) + self.dc.DrawLine(self.x, y, self.x+width, y-width) + self.x = self.x + width + + def end_angle(self): + pass + +# This is a rendering function that is primarily used internally, +# although it could be used externally if one had overridden the +# Renderer classes. + +def renderToRenderer(str, renderer, enclose=1): + if enclose: + str = '%s' % str + p = xml.parsers.expat.ParserCreate() + p.returns_unicode = 0 + p.StartElementHandler = renderer.startElement + p.EndElementHandler = renderer.endElement + p.CharacterDataHandler = renderer.characterData + p.Parse(str, 1) + + +def getExtent(str, dc=None, enclose=1): + "Return the extent of str" + renderer = SizeRenderer(dc) + renderToRenderer(str, renderer, enclose) + return wxSize(renderer.width, renderer.height) + +# This should probably only be used internally.... + +def getFullExtent(str, dc=None, enclose=1): + renderer = SizeRenderer(dc) + renderToRenderer(str, renderer, enclose) + return renderer.width, renderer.height, -renderer.minY + +def renderToBitmap(str, background=None, enclose=1): + "Return str rendered on a minumum size bitmap" + dc = wxMemoryDC() + width, height, dy = getFullExtent(str, dc) + bmp = wxEmptyBitmap(width, height) + dc.SelectObject(bmp) + if background is not None: + dc.SetBackground(background) + dc.Clear() + renderer = DCRenderer(dc, y=dy) + dc.BeginDrawing() + renderToRenderer(str, renderer, enclose) + dc.EndDrawing() + dc.SelectObject(wxNullBitmap) + return bmp + +def renderToDC(str, dc, x, y, enclose=1): + "Render str onto a wxDC at (x,y)" + width, height, dy = getFullExtent(str, dc) + renderer = DCRenderer(dc, x, y+dy) + renderToRenderer(str, renderer, enclose) + + +if __name__ == "__main__": + str = ('some |23 textwith subscript some other text' + 'big green text') + ID_EXIT = 102 + class myApp(wxApp): + def OnInit(self): + return 1 + app = myApp() + frame = wxFrame(NULL, -1, "wxFancyText demo", wxDefaultPosition) + frame.SetClientSize(getExtent(str)) + bmp = renderToBitmap(str, wxCYAN_BRUSH) + sb = wxStaticBitmap(frame, -1, bmp) + EVT_MENU(frame, ID_EXIT, frame.Destroy) + frame.Show(1) + app.MainLoop() diff --git a/wxPython/wxPython/lib/filebrowsebutton.py b/wxPython/wxPython/lib/filebrowsebutton.py new file mode 100644 index 0000000000..93ea1d3cf6 --- /dev/null +++ b/wxPython/wxPython/lib/filebrowsebutton.py @@ -0,0 +1,424 @@ +#---------------------------------------------------------------------- +# Name: wxPython.lib.filebrowsebutton +# Purpose: Composite controls that provide a Browse button next to +# either a wxTextCtrl or a wxComboBox. The Browse button +# launches a wxFileDialog and loads the result into the +# other control. +# +# Author: Mike Fletcher +# +# RCS-ID: $Id$ +# Copyright: (c) 2000 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------- + +from wxPython.wx import * +import os + +#---------------------------------------------------------------------- + +class FileBrowseButton(wxPanel): + """ A control to allow the user to type in a filename + or browse with the standard file dialog to select file + + __init__ ( + parent, id, pos, size -- passed directly to wxPanel initialisation + style = wxTAB_TRAVERSAL -- passed directly to wxPanel initialisation + labelText -- Text for label to left of text field + buttonText -- Text for button which launches the file dialog + toolTip -- Help text + dialogTitle -- Title used in file dialog + startDirectory -- Default directory for file dialog startup + fileMask -- File mask (glob pattern, such as *.*) to use in file dialog + fileMode -- wxOPEN or wxSAVE, indicates type of file dialog to use + changeCallback -- callback receives all > > changes in value of control + ) + GetValue() -- retrieve current value of text control + SetValue(string) -- set current value of text control + label -- pointer to internal label widget + textControl -- pointer to internal text control + browseButton -- pointer to button + """ + def __init__ (self, parent, id= -1, + pos = wxDefaultPosition, size = wxDefaultSize, + style = wxTAB_TRAVERSAL, + labelText= "File Entry:", + buttonText= "Browse", + toolTip= "Type filename or click browse to choose file", + # following are the values for a file dialog box + dialogTitle = "Choose a file", + startDirectory = ".", + initialValue = "", + fileMask = "*.*", + fileMode = wxOPEN, + # callback for when value changes (optional) + changeCallback= lambda x:x + ): + # store variables + self.labelText = labelText + self.buttonText = buttonText + self.toolTip = toolTip + self.dialogTitle = dialogTitle + self.startDirectory = startDirectory + self.initialValue = initialValue + self.fileMask = fileMask + self.fileMode = fileMode + self.changeCallback = changeCallback + + # get background to match it + try: + self._bc = parent.GetBackgroundColour() + except: + pass + + # create the dialog + self.createDialog(parent, id, pos, size, style ) + # Setting a value causes the changeCallback to be called. + # In this case that would be before the return of the + # constructor. Not good. So a default value on + # SetValue is used to disable the callback + self.SetValue( initialValue, 0) + + def createDialog( self, parent, id, pos, size, style ): + """Setup the graphic representation of the dialog""" + wxPanel.__init__ (self, parent, id, pos, size, style) + # try to set the background colour + try: + self.SetBackgroundColour(self._bc) + except: + pass + box = wxBoxSizer(wxHORIZONTAL) + + self.label = self.createLabel( ) + box.Add( self.label, 0, wxCENTER ) + + self.textControl = self.createTextControl() + box.Add( self.textControl, 1, wxLEFT|wxCENTER, 5) + + self.browseButton = self.createBrowseButton() + box.Add( self.browseButton, 0, wxCENTER) + + # add a border around the whole thing and resize the panel to fit + outsidebox = wxBoxSizer(wxVERTICAL) + outsidebox.Add(box, 1, wxEXPAND|wxALL, 3) + outsidebox.Fit(self) + + self.SetAutoLayout(true) + self.SetSizer( outsidebox ) + self.Layout() + if size.width != -1 or size.height != -1: + self.SetSize(size) + + def SetBackgroundColour(self,color): + wxPanel.SetBackgroundColour(self,color) + self.label.SetBackgroundColour(color) + + def createLabel( self ): + """Create the label/caption""" + label = wxStaticText(self, -1, self.labelText, style =wxALIGN_RIGHT ) + font = label.GetFont() + w, h, d, e = self.GetFullTextExtent(self.labelText, font) + label.SetSize(wxSize(w+5, h)) + return label + + def createTextControl( self): + """Create the text control""" + ID = wxNewId() + textControl = wxTextCtrl(self, ID) + textControl.SetToolTipString( self.toolTip ) + if self.changeCallback: + EVT_TEXT(textControl, ID, self.changeCallback) + EVT_COMBOBOX(textControl, ID, self.changeCallback) + return textControl + + def createBrowseButton( self): + """Create the browse-button control""" + ID = wxNewId() + button =wxButton(self, ID, self.buttonText) + button.SetToolTipString( self.toolTip ) + EVT_BUTTON(button, ID, self.OnBrowse) + return button + + + def OnBrowse (self, event = None): + """ Going to browse for file... """ + current = self.GetValue() + directory = os.path.split(current) + if os.path.isdir( current): + directory = current + current = '' + elif directory and os.path.isdir( directory[0] ): + current = directory[1] + directory = directory [0] + else: + directory = self.startDirectory + dlg = wxFileDialog(self, self.dialogTitle, directory, current, self.fileMask, self.fileMode) + + if dlg.ShowModal() == wxID_OK: + self.SetValue (dlg.GetPath()) + dlg.Destroy() + + + + def GetValue (self): + """ Convenient access to text control value """ + return self.textControl.GetValue () + + def SetValue (self, value, callBack=1): + """ Convenient setting of text control value """ + # Removed the return from here because SetValue doesn't return anything. + self.textControl.SetValue (value) + + def Enable (self, value): + """ Convenient enabling/disabling of entire control """ + self.label.Enable (value) + self.textControl.Enable (value) + return self.browseButton.Enable (value) + + def GetLabel( self ): + """ Retrieve the label's current text """ + return self.label.GetLabel() + + def SetLabel( self, value ): + """ Set the label's current text """ + rvalue = self.label.SetLabel( value ) + self.Refresh( true ) + return rvalue + + + +class FileBrowseButtonWithHistory( FileBrowseButton ): + """ with following additions: + __init__(..., history=None) + + history -- optional list of paths for initial history drop-down + (must be passed by name, not a positional argument) + If history is callable it will must return a list used + for the history drop-down + changeCallback -- as for FileBrowseButton, but with a work-around + for win32 systems which don't appear to create EVT_COMBOBOX + events properly. There is a (slight) chance that this work-around + will cause some systems to create two events for each Combobox + selection. If you discover this condition, please report it! + As for a FileBrowseButton.__init__ otherwise. + GetHistoryControl() + Return reference to the control which implements interfaces + required for manipulating the history list. See GetHistoryControl + documentation for description of what that interface is. + GetHistory() + Return current history list + SetHistory( value=(), selectionIndex = None ) + Set current history list, if selectionIndex is not None, select that index + """ + def __init__( self, *arguments, **namedarguments): + self.history = namedarguments.get( "history" ) + if self.history: + del namedarguments["history"] + + self.historyCallBack=None + if callable(self.history): + self.historyCallBack=self.history + self.history=None + apply( FileBrowseButton.__init__, ( self,)+arguments, namedarguments) + + def createTextControl( self): + """Create the text control""" + ID = wxNewId() + textControl = wxComboBox(self, ID, style = wxCB_DROPDOWN ) + textControl.SetToolTipString( self.toolTip ) + EVT_SET_FOCUS(textControl, self.OnSetFocus) + if self.changeCallback: + EVT_TEXT(textControl, ID, self.changeCallback) + EVT_COMBOBOX(textControl, ID, self.changeCallback) + if self.history: + history=self.history + self.history=None + self.SetHistory( history, control=textControl) + return textControl + + def GetHistoryControl( self ): + """Return a pointer to the control which provides (at least) + the following methods for manipulating the history list.: + Append( item ) -- add item + Clear() -- clear all items + Delete( index ) -- 0-based index to delete from list + SetSelection( index ) -- 0-based index to select in list + Semantics of the methods follow those for the wxComboBox control + """ + return self.textControl + + def SetHistory( self, value=(), selectionIndex = None, control=None ): + """Set the current history list""" + if control is None: + control = self.GetHistoryControl() + if self.history == value: + return + self.history = value + # Clear history values not the selected one. + tempValue=control.GetValue() + # clear previous values + control.Clear() + control.SetValue(tempValue) + # walk through, appending new values + for path in value: + control.Append( path ) + if selectionIndex is not None: + control.SetSelection( selectionIndex ) + + def GetHistory( self ): + """Return the current history list""" + if self.historyCallBack != None: + return self.historyCallBack() + else: + return list( self.history ) + + def OnSetFocus(self, event): + """When the history scroll is selected, update the history""" + if self.historyCallBack != None: + self.SetHistory( self.historyCallBack(), control=self.textControl) + event.Skip() + + if wxPlatform == "__WXMSW__": + def SetValue (self, value, callBack=1): + """ Convenient setting of text control value, works + around limitation of wxComboBox """ + # Removed the return from here because SetValue doesn't return anything. + self.textControl.SetValue (value) + # Hack to call an event handler + class LocalEvent: + def __init__(self, string): + self._string=string + def GetString(self): + return self._string + if callBack==1: + # The callback wasn't being called when SetValue was used ?? + # So added this explicit call to it + self.changeCallback(LocalEvent(value)) + + +class DirBrowseButton(FileBrowseButton): + def __init__(self, parent, id = -1, + pos = wxDefaultPosition, size = wxDefaultSize, + style = wxTAB_TRAVERSAL, + labelText = 'Select a directory:', + buttonText = 'Browse', + toolTip = 'Type directory name or browse to select', + dialogTitle = '', + startDirectory = '.', + changeCallback = None, + dialogClass = wxDirDialog): + FileBrowseButton.__init__(self, parent, id, pos, size, style, + labelText, buttonText, toolTip, + dialogTitle, startDirectory, + changeCallback = changeCallback) + # + self._dirDialog = dialogClass(self, + message = dialogTitle, + defaultPath = startDirectory) + # + def OnBrowse(self, ev = None): + dialog = self._dirDialog + if dialog.ShowModal() == wxID_OK: + self.SetValue(dialog.GetPath()) + # + def __del__(self): + if self.__dict__.has_key('_dirDialog'): + self._dirDialog.Destroy() + + +#---------------------------------------------------------------------- + + +if __name__ == "__main__": + #from skeletonbuilder import rulesfile + class SimpleCallback: + def __init__( self, tag ): + self.tag = tag + def __call__( self, event ): + print self.tag, event.GetString() + class DemoFrame( wxFrame ): + def __init__(self, parent): + wxFrame.__init__(self, parent, 2400, "File entry with browse", size=(500,260) ) + EVT_CLOSE(self, self.OnCloseWindow) + panel = wxPanel (self,-1) + innerbox = wxBoxSizer(wxVERTICAL) + control = FileBrowseButton( + panel, + initialValue = "z:\\temp", + ) + innerbox.Add( control, 0, wxEXPAND ) + middlecontrol = FileBrowseButtonWithHistory( + panel, + labelText = "With History", + initialValue = "d:\\temp", + history = ["c:\\temp", "c:\\tmp", "r:\\temp","z:\\temp"], + changeCallback= SimpleCallback( "With History" ), + ) + innerbox.Add( middlecontrol, 0, wxEXPAND ) + middlecontrol = FileBrowseButtonWithHistory( + panel, + labelText = "History callback", + initialValue = "d:\\temp", + history = self.historyCallBack, + changeCallback= SimpleCallback( "History callback" ), + ) + innerbox.Add( middlecontrol, 0, wxEXPAND ) + self.bottomcontrol = control = FileBrowseButton( + panel, + labelText = "With Callback", + style = wxSUNKEN_BORDER|wxCLIP_CHILDREN , + changeCallback= SimpleCallback( "With Callback" ), + ) + innerbox.Add( control, 0, wxEXPAND) + self.bottommostcontrol = control = DirBrowseButton( + panel, + labelText = "Simple dir browse button", + style = wxSUNKEN_BORDER|wxCLIP_CHILDREN) + innerbox.Add( control, 0, wxEXPAND) + ID = wxNewId() + innerbox.Add( wxButton( panel, ID,"Change Label", ), 1, wxEXPAND) + EVT_BUTTON( self, ID, self.OnChangeLabel ) + ID = wxNewId() + innerbox.Add( wxButton( panel, ID,"Change Value", ), 1, wxEXPAND) + EVT_BUTTON( self, ID, self.OnChangeValue ) + panel.SetAutoLayout(true) + panel.SetSizer( innerbox ) + self.history={"c:\\temp":1, "c:\\tmp":1, "r:\\temp":1,"z:\\temp":1} + + def historyCallBack(self): + keys=self.history.keys() + keys.sort() + return keys + + def OnFileNameChangedHistory (self, event): + self.history[event.GetString ()]=1 + + def OnCloseMe(self, event): + self.Close(true) + def OnChangeLabel( self, event ): + self.bottomcontrol.SetLabel( "Label Updated" ) + def OnChangeValue( self, event ): + self.bottomcontrol.SetValue( "r:\\somewhere\\over\\the\\rainbow.htm" ) + + def OnCloseWindow(self, event): + self.Destroy() + + class DemoApp(wxApp): + def OnInit(self): + wxImage_AddHandler(wxJPEGHandler()) + wxImage_AddHandler(wxPNGHandler()) + wxImage_AddHandler(wxGIFHandler()) + frame = DemoFrame(NULL) + #frame = RulesPanel(NULL ) + frame.Show(true) + self.SetTopWindow(frame) + return true + + def test( ): + app = DemoApp(0) + app.MainLoop() + print 'Creating dialog' + test( ) + + + diff --git a/utils/wxPython/lib/floatbar.py b/wxPython/wxPython/lib/floatbar.py similarity index 99% rename from utils/wxPython/lib/floatbar.py rename to wxPython/wxPython/lib/floatbar.py index 8718318e4a..e7e5e164d5 100644 --- a/utils/wxPython/lib/floatbar.py +++ b/wxPython/wxPython/lib/floatbar.py @@ -147,7 +147,7 @@ else: useStyle = wxDEFAULT_FRAME_STYLE else: useStyle = wxTHICK_FRAME - self.floatframe = wxFrame(self.parentframe, -1, self.title, + self.floatframe = wxMiniFrame(self.parentframe, -1, self.title, style = useStyle) self.Reparent(self.floatframe) diff --git a/utils/wxPython/lib/grids.py b/wxPython/wxPython/lib/grids.py similarity index 88% rename from utils/wxPython/lib/grids.py rename to wxPython/wxPython/lib/grids.py index 2b26ec9ece..8387190002 100644 --- a/utils/wxPython/lib/grids.py +++ b/wxPython/wxPython/lib/grids.py @@ -13,10 +13,24 @@ """ In this module you will find wxGridSizer and wxFlexGridSizer. -wxGridSizer arrainges its items in a grid in which all the widths and -heights are the same. wxFlexgridSizer allows different widths and -heights, and you can also specify rows and/or columns that are -growable. See the demo for a couple examples for how to use them. + +wxGridSizer: Sizes and positions items such that all rows are the same +height and all columns are the same width. You can specify a gap in +pixels to be used between the rows and/or the columns. When you +create the sizer you specify the number of rows or the number of +columns and then as you add items it figures out the other dimension +automatically. Like other sizers, items can be set to fill their +available space, or to be aligned on a side, in a corner, or in the +center of the space. When the sizer is resized, all the items are +resized the same amount so all rows and all columns remain the same +size. + +wxFlexGridSizer: Derives from wxGridSizer and adds the ability for +particular rows and/or columns to be marked as growable. This means +that when the sizer changes size, the growable rows and colums are the +ones that stretch. The others remain at their initial size. + +See the demo for a couple examples for how to use them. """ diff --git a/utils/wxPython/lib/layoutf.py b/wxPython/wxPython/lib/layoutf.py similarity index 99% rename from utils/wxPython/lib/layoutf.py rename to wxPython/wxPython/lib/layoutf.py index cbbd7edd9e..c0f90b2083 100644 --- a/utils/wxPython/lib/layoutf.py +++ b/wxPython/wxPython/lib/layoutf.py @@ -200,6 +200,7 @@ if __name__=='__main__': def __init__(self, parent): wxFrame.__init__(self, parent, -1, 'Test Layout Constraints', wxPyDefaultPosition, wxSize(500, 300)) + EVT_CLOSE(self, self.OnCloseWindow) self.SetAutoLayout(true) EVT_BUTTON(self, 100, self.OnButton) diff --git a/utils/wxPython/lib/mvctree.py b/wxPython/wxPython/lib/mvctree.py similarity index 99% rename from utils/wxPython/lib/mvctree.py rename to wxPython/wxPython/lib/mvctree.py index 699b1b9566..aa37dec0c8 100644 --- a/utils/wxPython/lib/mvctree.py +++ b/wxPython/wxPython/lib/mvctree.py @@ -616,7 +616,7 @@ class TreePainter(Painter): dc.SetPen(self.linepen) dc.SetBrush(self.bgbrush) dc.DrawRectangle(px -4, py-4, 9, 9) - self.knobs.append(kid, Rect(px -4, py -4, 9, 9)) + self.knobs.append( (kid, Rect(px -4, py -4, 9, 9)) ) dc.SetPen(self.textpen) if not kid.expanded: dc.DrawLine(px, py -2, px, py + 3) @@ -627,7 +627,7 @@ class TreePainter(Painter): dc.SetPen(self.linepen) dc.SetBrush(self.bgbrush) dc.DrawRectangle(px -4, py-4, 9, 9) - self.knobs.append(node, Rect(px -4, py -4, 9, 9)) + self.knobs.append( (node, Rect(px -4, py -4, 9, 9)) ) dc.SetPen(self.textpen) if not node.expanded: dc.DrawLine(px, py -2, px, py + 3) @@ -769,6 +769,9 @@ class wxMVCTree(wxScrolledWindow): EVT_MOUSE_EVENTS(self, self.OnMouse) EVT_KEY_DOWN(self, self.OnKeyDown) self.doubleBuffered = true + EVT_SIZE(self, self.OnSize) + EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) + EVT_PAINT(self, self.OnPaint) def Refresh(self): diff --git a/wxPython/wxPython/lib/pyshell.py b/wxPython/wxPython/lib/pyshell.py new file mode 100644 index 0000000000..229e2e5190 --- /dev/null +++ b/wxPython/wxPython/lib/pyshell.py @@ -0,0 +1,325 @@ +#---------------------------------------------------------------------- +# Name: wxPython.lib.pyshell +# Purpose: A Python Interactive Interpreter running in a wxStyledTextCtrl +# window. +# +# Author: Robin Dunn +# +# Created: 7-July-2000 +# RCS-ID: $Id$ +# Copyright: (c) 2000 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------- + +""" +PyShellWindow is a class that provides an Interactive Interpreter running +inside a wxStyledTextCtrl, similar to the Python shell windows found in +IDLE and PythonWin. + +There is still much to be done to improve this class, such as line +buffering/recall, autoindent, calltips, autocomplete, fixing the colourizer, +etc... But it's a good start. + +""" + + +from wxPython.wx import * +from wxPython.stc import * + +import sys, string, keyword +from code import InteractiveInterpreter + +#---------------------------------------------------------------------- +# default styles, etc. to use for the STC + +if wxPlatform == '__WXMSW__': + _defaultSize = 8 +else: + _defaultSize = 10 + + +_default_properties = { + 'selMargin' : 0, + 'marginWidth' : 1, + 'ps1' : '>>> ', + 'stdout' : 'fore:#0000FF', + 'stderr' : 'fore:#007f00', + 'trace' : 'fore:#FF0000', + + 'default' : 'size:%d' % _defaultSize, + 'bracegood' : 'fore:#FFFFFF,back:#0000FF,bold', + 'bracebad' : 'fore:#000000,back:#FF0000,bold', + + # properties for the various Python lexer styles + 'comment' : 'fore:#007F00', + 'number' : 'fore:#007F7F', + 'string' : 'fore:#7F007F,italic', + 'char' : 'fore:#7F007F,italic', + 'keyword' : 'fore:#00007F,bold', + 'triple' : 'fore:#7F0000', + 'tripledouble': 'fore:#7F0000', + 'class' : 'fore:#0000FF,bold,underline', + 'def' : 'fore:#007F7F,bold', + 'operator' : 'bold', + + } + + +# new style numbers +_stdout_style = 15 +_stderr_style = 16 +_trace_style = 17 + + +#---------------------------------------------------------------------- + +class PyShellWindow(wxStyledTextCtrl, InteractiveInterpreter): + def __init__(self, parent, ID, pos=wxDefaultPosition, + size=wxDefaultSize, style=0, + locals=None, properties=None, banner=None): + wxStyledTextCtrl.__init__(self, parent, ID, pos, size, style) + InteractiveInterpreter.__init__(self, locals) + + self.lastPromptPos = 0 + + # the line cache is used to cycle through previous commands + self.lines = [] + self.lastUsedLine = self.curLine = 0 + + # set defaults and then deal with any user defined properties + self.props = {} + self.props.update(_default_properties) + if properties: + self.props.update(properties) + self.UpdateProperties() + + # copyright/banner message + if banner is None: + self.write("Python %s on %s\n" % #%s\n(%s)\n" % + (sys.version, sys.platform, + #sys.copyright, self.__class__.__name__ + )) + else: + self.write("%s\n" % banner) + + # write the initial prompt + self.Prompt() + + # Event handlers + EVT_KEY_DOWN(self, self.OnKey) + EVT_STC_UPDATEUI(self, ID, self.OnUpdateUI) + #EVT_STC_STYLENEEDED(self, ID, self.OnStyle) + + + def GetLocals(self): return self.locals + def SetLocals(self, locals): self.locals = locals + + def GetProperties(self): return self.props + def SetProperties(self, properties): + self.props.update(properties) + self.UpdateProperties() + + + def UpdateProperties(self): + """ + Reset the editor and other settings based on the contents of the + current properties dictionary. + """ + p = self.props + + #self.SetEdgeMode(wxSTC_EDGE_LINE) + #self.SetEdgeColumn(80) + + + # set the selection margin and window margin + self.SetMarginWidth(1, p['selMargin']) + self.SetMargins(p['marginWidth'], p['marginWidth']) + + # styles + self.StyleSetSpec(wxSTC_STYLE_DEFAULT, p['default']) + self.StyleClearAll() + self.StyleSetSpec(_stdout_style, p['stdout']) + self.StyleSetSpec(_stderr_style, p['stderr']) + self.StyleSetSpec(_trace_style, p['trace']) + + self.StyleSetSpec(wxSTC_STYLE_BRACELIGHT, p['bracegood']) + self.StyleSetSpec(wxSTC_STYLE_BRACEBAD, p['bracebad']) + self.StyleSetSpec(wxSTC_P_COMMENTLINE, p['comment']) + self.StyleSetSpec(wxSTC_P_NUMBER, p['number']) + self.StyleSetSpec(wxSTC_P_STRING, p['string']) + self.StyleSetSpec(wxSTC_P_CHARACTER, p['char']) + self.StyleSetSpec(wxSTC_P_WORD, p['keyword']) + self.StyleSetSpec(wxSTC_P_TRIPLE, p['triple']) + self.StyleSetSpec(wxSTC_P_TRIPLEDOUBLE, p['tripledouble']) + self.StyleSetSpec(wxSTC_P_CLASSNAME, p['class']) + self.StyleSetSpec(wxSTC_P_DEFNAME, p['def']) + self.StyleSetSpec(wxSTC_P_OPERATOR, p['operator']) + self.StyleSetSpec(wxSTC_P_COMMENTBLOCK, p['comment']) + + + # used for writing to stdout, etc. + def _write(self, text, style=_stdout_style): + self.lastPromptPos = 0 + pos = self.GetCurrentPos() + self.AddText(text) + self.StartStyling(pos, 0xFF) + self.SetStyling(len(text), style) + self.EnsureCaretVisible() + wxYield() + + write = _write + + def writeTrace(self, text): + self._write(text, _trace_style) + + + def Prompt(self): + # is the current line non-empty? + text, pos = self.GetCurLine() + if pos != 0: + self.AddText('\n') + self.AddText(self.props['ps1']) + self.lastPromptPos = self.GetCurrentPos() + self.EnsureCaretVisible() + self.ScrollToColumn(0) + + + def PushLine(self, text): + # TODO: Add the text to the line cache, manage the cache so + # it doesn't get too big. + pass + + + + def OnKey(self, evt): + key = evt.KeyCode() + if key == WXK_RETURN: + pos = self.GetCurrentPos() + lastPos = self.GetTextLength() + + # if not on the last line, duplicate the current line + if self.GetLineCount()-1 != self.GetCurrentLine(): + text, col = self.GetCurLine() + prompt = self.props['ps1'] + lp = len(prompt) + if text[:lp] == prompt: + text = text[lp:] + + self.SetSelection(self.lastPromptPos, lastPos) + self.ReplaceSelection(text[:-1]) + + else: # try to execute the text from the prompt to the end + if lastPos == self.lastPromptPos: + self.AddText('\n') + self.Prompt() + return + + text = self.GetTextRange(self.lastPromptPos, lastPos) + self.AddText('\n') + + more = self.runsource(text) + if not more: + self.PushLine(text) + self.Prompt() + + # TODO: Add handlers for Alt-P and Alt-N to cycle through entries + # in the line cache + + else: + evt.Skip() + + + def OnStyle(self, evt): + # Only style from the prompt pos to the end + lastPos = self.GetTextLength() + if self.lastPromptPos and self.lastPromptPos != lastPos: + self.SetLexer(wxSTC_LEX_PYTHON) + self.SetKeywords(0, string.join(keyword.kwlist)) + + self.Colourise(self.lastPromptPos, lastPos) + + self.SetLexer(0) + + + def OnUpdateUI(self, evt): + # check for matching braces + braceAtCaret = -1 + braceOpposite = -1 + charBefore = None + caretPos = self.GetCurrentPos() + if caretPos > 0: + charBefore = self.GetCharAt(caretPos - 1) + styleBefore = self.GetStyleAt(caretPos - 1) + + # check before + if charBefore and chr(charBefore) in "[]{}()" and styleBefore == wxSTC_P_OPERATOR: + braceAtCaret = caretPos - 1 + + # check after + if braceAtCaret < 0: + charAfter = self.GetCharAt(caretPos) + styleAfter = self.GetStyleAt(caretPos) + if charAfter and chr(charAfter) in "[]{}()" and styleAfter == wxSTC_P_OPERATOR: + braceAtCaret = caretPos + + if braceAtCaret >= 0: + braceOpposite = self.BraceMatch(braceAtCaret) + + if braceAtCaret != -1 and braceOpposite == -1: + self.BraceBadlight(braceAtCaret) + else: + self.BraceHighlight(braceAtCaret, braceOpposite) + + + + #---------------------------------------------- + # overloaded methods from InteractiveInterpreter + def runsource(self, source): + stdout, stderr = sys.stdout, sys.stderr + sys.stdout = FauxFile(self, _stdout_style) + sys.stderr = FauxFile(self, _stderr_style) + + more = InteractiveInterpreter.runsource(self, source) + + sys.stdout, sys.stderr = stdout, stderr + return more + + def showsyntaxerror(self, filename=None): + self.write = self.writeTrace + InteractiveInterpreter.showsyntaxerror(self, filename) + self.write = self._write + + def showtraceback(self): + self.write = self.writeTrace + InteractiveInterpreter.showtraceback(self) + self.write = self._write + +#---------------------------------------------------------------------- + +class FauxFile: + def __init__(self, psw, style): + self.psw = psw + self.style = style + + def write(self, text): + self.psw.write(text, self.style) + + def writelines(self, lst): + map(self.write, lst) + + def flush(self): + pass + + +#---------------------------------------------------------------------- +# test code + +if __name__ == '__main__': + app = wxPyWidgetTester(size = (640, 480)) + app.SetWidget(PyShellWindow, -1) + app.MainLoop() + + +#---------------------------------------------------------------------- + + diff --git a/wxPython/wxPython/lib/rpcMixin.py b/wxPython/wxPython/lib/rpcMixin.py new file mode 100644 index 0000000000..44736e6bd8 --- /dev/null +++ b/wxPython/wxPython/lib/rpcMixin.py @@ -0,0 +1,236 @@ +#---------------------------------------------------------------------- +# Name: rpcMixin +# Version: 0.1 +# Purpose: provides xmlrpc server functionality for wxPython +# applications via a mixin class +# +# Requires: (1) Python with threading enabled. +# (2) xmlrpclib from PythonWare +# (http://www.pythonware.com/products/xmlrpc/) +# the code was developed and tested using version 0.9.8 +# +# Author: greg Landrum (Landrum@RationalDiscovery.com) +# +# Copyright: (c) 2000 by Greg Landrum and Rational Discovery LLC +# Licence: wxWindows license +#---------------------------------------------------------------------- + +""" +Some Notes: + +1) The xmlrpc server runs in a separate thread from the main GUI + application, communication between the two threads using a custom + event (see the Threads demo in the wxPython docs for more info). + +2) Neither the server nor the client are particularly smart about + checking method names. So it's easy to shoot yourself in the foot + by calling improper methods. It would be pretty easy to add + either a list of allowed methods or a list of forbidden methods. + +3) Authentication of xmlrpc clients is *not* performed. I think it + would be pretty easy to do this in a hacky way, but I haven't done + it yet. + +4) The default port number is 800, it's a windows thing... at least + it seems like a windows thing to me. Since I'm not being smart + about port numbers, you can probably hork yourself arbitrarily by + firing up more than one xmlrpc-active frame at the same time, but + I haven't tried that. + +5) See the bottom of this file for an example of using the class. + +Obligatory disclaimer: + This is my first crack at both using xmlrpc and multi-threaded + programming, so there could be huge horrible bugs or design + flaws. If you see one, I'd love to hear about them. + +""" + +from wxPython.wx import * +import xmlrpcserver +import Threading +import SocketServer + +rpcPENDING = 0 +rpcDONE = 1 +rpcEXCEPT = 2 +class RPCRequest: + """A wrapper to use for handling requests and their responses""" + status = rpcPENDING + result = None + +# here's the ID for external events +wxEVT_EXTERNAL_EVENT = 25015 +class ExternalEvent(wxPyEvent): + """The custom event class used to pass xmlrpc calls from + the server thread into the GUI thread + """ + def __init__(self,method,args): + wxPyEvent.__init__(self) + self.SetEventType(wxEVT_EXTERNAL_EVENT) + self.method = method + self.args = args + self.rpcStatus = RPCRequest() + self.rpcStatusLock = Threading.Lock() + self.rpcCondVar = Threading.Condition() + +def EVT_EXTERNAL_EVENT(win,func): + win.Connect(-1,-1,wxEVT_EXTERNAL_EVENT,func) + +class Handler(xmlrpcserver.RequestHandler): + """The handler class that the xmlrpcserver actually calls + when a request comes in. + """ + def call(self,method,params): + """When an xmlrpc request comes in, this is the method that + gets called. + """ + # construct the event + evt = ExternalEvent(method,params) + + # update the status variable + evt.rpcStatusLock.acquire() + evt.rpcStatus.status = rpcPENDING + evt.rpcStatusLock.release() + + # acquire the condition lock + evt.rpcCondVar.acquire() + # dispatch the event to the GUI + wxPostEvent(self._app,evt) + # wait for the GUI to finish + while evt.rpcStatus.status == rpcPENDING: + evt.rpcCondVar.wait() + evt.rpcCondVar.release() + evt.rpcStatusLock.acquire() + if evt.rpcStatus.status == rpcEXCEPT: + # The GUI threw an exception, release the status lock + # and re-raise the exception + evt.rpcStatusLock.release() + raise evt.rpcStatus.result[0],evt.rpcStatus.result[1] + else: + # everything went through without problems + s = evt.rpcStatus.result + evt.rpcStatusLock.release() + return s + +class rpcMixin: + """A mixin class to provide xmlrpc server functionality to wxPython + frames/windows + + If you want to customize this, probably the best idea is to + override the OnExternal method, which is what's invoked when an + RPC is handled. + + """ + def __init__(self,host='',port=800): + """ + Arguments: + host: (optional) the hostname for the server + port: (optional) the port the server will use + """ + EVT_EXTERNAL_EVENT(self,self.OnExternal) + if hasattr(self,'OnClose'): + self._origOnClose = self.OnClose + else: + self._origOnClose = None + EVT_CLOSE(self,self.OnClose) + + exec('class Handler%d(Handler): pass'%(port)) + exec('tClass= Handler%d'%(port)) + tClass._app = self + self._xmlServ = SocketServer.TCPServer((host,port),tClass) + self.servThread = Threading.Thread(target=self._xmlServ.serve_forever) + self.servThread.setDaemon(1) + self.servThread.start() + + def OnClose(self,event): + """ be sure to shutdown the server and the server thread before + leaving + """ + self._xmlServ = None + self.servThread = None + if self._origOnClose is not None: + self._origOnClose(event) + + def OnExternal(self,event): + """ this is the callback used to handle RPCs + + Exceptions are caught and returned in the global _rpcStatus + structure. This allows the xmlrpc server to report the + exception to the client without mucking up any of the delicate + thread stuff. + """ + event.rpcStatusLock.acquire() + try: + res = eval('apply(self.%s,event.args)'%event.method) + except: + import sys,traceback + traceback.print_exc() + event.rpcStatus.result = sys.exc_info()[:2] + event.rpcStatus.status = rpcEXCEPT + else: + if res is None: + event.rpcStatus.result = [] + else: + event.rpcStatus.result = res + event.rpcStatus.status = rpcDONE + event.rpcStatusLock.release() + event.rpcCondVar.acquire() + event.rpcCondVar.notify() + event.rpcCondVar.release() + +if __name__ == '__main__': + import sys + port = 800 + if len(sys.argv)>1: + port = int(sys.argv[1]) + + class rpcFrame(wxFrame,rpcMixin): + """A simple wxFrame with the rpcMixin functionality added + """ + def __init__(self,*args,**kwargs): + """ rpcHost or rpcPort keyword arguments will be passed along to + the xmlrpc server. + """ + mixinArgs = {} + if kwargs.has_key('rpcHost'): + mixinArgs['host'] = kwargs['rpcHost'] + del kwargs['rpcHost'] + if kwargs.has_key('rpcPort'): + mixinArgs['port'] = kwargs['rpcPort'] + del kwargs['rpcPort'] + + apply(wxFrame.__init__,(self,)+args,kwargs) + apply(rpcMixin.__init__,(self,),mixinArgs) + + EVT_CHAR(self,self.OnChar) + + def TestFunc(self,args): + """a demo method""" + return args + + def OnChar(self,event): + key = event.GetKeyCode() + if key == ord('q'): + self.OnQuit(event) + + def OnQuit(self,event): + self.OnClose(event) + + def OnClose(self,event): + self.Destroy() + + class MyApp(wxApp): + def OnInit(self): + frame = rpcFrame(NULL, -1, "wxPython RPCDemo", wxDefaultPosition, wxSize(300,300),rpcHost='localhost',rpcPort=port) + frame.Show(TRUE) + import time + + #self.SetTopWindow(frame) + frame2 = rpcFrame(NULL, -1, "wxPython RPCDemo2", wxDefaultPosition, wxSize(300,300),rpcHost='localhost',rpcPort=port+1) + frame2.Show(TRUE) + + return TRUE + app = MyApp(0) + app.MainLoop() + diff --git a/utils/wxPython/lib/shell.py b/wxPython/wxPython/lib/shell.py similarity index 99% rename from utils/wxPython/lib/shell.py rename to wxPython/wxPython/lib/shell.py index 2ed16650f3..b919213c42 100644 --- a/utils/wxPython/lib/shell.py +++ b/wxPython/wxPython/lib/shell.py @@ -155,7 +155,8 @@ class PyShellOutput(wxPanel): # refreshes are annoying self.in_batch =0 self.dirty =0 - + EVT_SIZE(self, self.OnSize) + EVT_IDLE(self, self.OnIdle) def OnSize(self, event): self.client.SetSize(self.GetClientSize()) @@ -248,6 +249,7 @@ class PyShell(wxPanel): splitter.SetMinimumPaneSize(20) self.splitter =splitter EVT_SET_FOCUS(self, self.OnSetFocus) + EVT_SIZE(self, self.OnSize) def OnSetFocus(self, event): self.input.SetFocus() diff --git a/utils/wxPython/lib/splashscreen.py b/wxPython/wxPython/lib/splashscreen.py similarity index 94% rename from utils/wxPython/lib/splashscreen.py rename to wxPython/wxPython/lib/splashscreen.py index fc8c04dc86..23878d53e2 100644 --- a/utils/wxPython/lib/splashscreen.py +++ b/wxPython/wxPython/lib/splashscreen.py @@ -59,9 +59,14 @@ class SplashScreen(wxFrame): size = (size[0], wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)) wxFrame.__init__(self, parent, ID, title, pos, size, style) + EVT_LEFT_DOWN(self, self.OnMouseClick) + EVT_CLOSE(self, self.OnCloseWindow) + EVT_PAINT(self, self.OnPaint) + EVT_ERASE_BACKGROUND(self, self.OnEraseBG) + self.Show(true) - dc = wxClientDC(self) - dc.DrawBitmap(self.bitmap, 0,0, false) + #dc = wxClientDC(self) + #dc.DrawBitmap(self.bitmap, 0,0, false) class SplashTimer(wxTimer): def __init__(self, targetFunction): @@ -73,24 +78,23 @@ class SplashScreen(wxFrame): self.timer = SplashTimer(callback) self.timer.Start(duration, 1) # one-shot only - EVT_LEFT_DOWN(self, self.OnMouseClick) def OnPaint(self, event): dc = wxPaintDC(self) dc.DrawBitmap(self.bitmap, 0,0, false) + def OnEraseBG(self, event): + pass def OnSplashExitDefault(self, event=None): self.Close(true) - def OnCloseWindow(self, event=None): self.Show(false) self.timer.Stop() del self.timer self.Destroy() - def OnMouseClick(self, event): self.timer.Notify() diff --git a/utils/wxPython/lib/vtk.py b/wxPython/wxPython/lib/vtk.py similarity index 97% rename from utils/wxPython/lib/vtk.py rename to wxPython/wxPython/lib/vtk.py index eab82b5dc0..7977b6c450 100644 --- a/utils/wxPython/lib/vtk.py +++ b/wxPython/wxPython/lib/vtk.py @@ -55,6 +55,9 @@ class wxVTKRenderWindow(wxScrolledWindow): EVT_RIGHT_UP (self, self.Release) EVT_MOTION (self, self.MouseMotion) + EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) + EVT_PAINT(self, self.OnPaint) + def GetRenderer(self): self.renderWindow.GetRenderers().InitTraversal() diff --git a/utils/wxPython/lib/wxPlotCanvas.py b/wxPython/wxPython/lib/wxPlotCanvas.py similarity index 99% rename from utils/wxPython/lib/wxPlotCanvas.py rename to wxPython/wxPython/lib/wxPlotCanvas.py index 569473ef22..7cd16a3c52 100644 --- a/utils/wxPython/lib/wxPlotCanvas.py +++ b/wxPython/wxPython/lib/wxPlotCanvas.py @@ -176,6 +176,7 @@ class PlotCanvas(wx.wxWindow): self.SetBackgroundColour(wx.wxNamedColour("white")) wx.EVT_SIZE(self,self.reconfigure) + wx.EVT_PAINT(self, self.OnPaint) self._setsize() self.last_draw = None # self.font = self._testFont(font) @@ -183,7 +184,7 @@ class PlotCanvas(wx.wxWindow): def OnPaint(self, event): pdc = wx.wxPaintDC(self) if self.last_draw is not None: - apply(self.draw, self.last_draw + (pdc,)) + apply(self.draw, self.last_draw + (pdc,)) def reconfigure(self, event): (new_width,new_height) = self.GetClientSizeTuple() @@ -341,7 +342,7 @@ class PlotCanvas(wx.wxWindow): ticks = [] t = -grid*Numeric.floor(-lower/grid) while t <= upper: - ticks.append(t, format % (t,)) + ticks.append( (t, format % (t,)) ) t = t + grid return ticks @@ -446,8 +447,6 @@ Are you sure you want to do this?""", "Danger!", wx.wxYES_NO) about = wx.wxMessageDialog(self, __doc__, "About...", wx.wxOK) about.ShowModal() - def OnCloseWindow(self, event): - self.Destroy() class MyApp(wx.wxApp): diff --git a/utils/wxPython/lib/wxpTag.py b/wxPython/wxPython/lib/wxpTag.py similarity index 99% rename from utils/wxPython/lib/wxpTag.py rename to wxPython/wxPython/lib/wxpTag.py index 4cc06d6eff..dde2842919 100644 --- a/utils/wxPython/lib/wxpTag.py +++ b/wxPython/wxPython/lib/wxpTag.py @@ -207,7 +207,7 @@ class wxpTagHandler(wxHtmlWinTagHandler): try: value = eval(value, self.ctx.classMod.__dict__) except: - value = saveValue + value = saveVal # convert to wxColour elif value[0] == '#':